What's New in Version 18?

new features,new features,new features
version 18,version 18,version 18

Automated data preparation. Automated Data Preparation (ADP) handles the task of preparing data for analysis, analyzing your data and identifying fixes, screening out fields (variables) that are problematic or not likely to be useful, deriving new attributes when appropriate, and improving performance through intelligent screening techniques. You can use the algorithm in fully automatic fashion, allowing it to choose and apply fixes, or you can use it in interactive fashion, previewing the changes before they are made and accept or reject them as desired. Automated Data Preparation is available in the Data Preparation add-on option. See the topic Automated Data Preparation for more information.

Bootstrapping. Bootstrapping is a robust method for determining the properties of population estimators (like the mean, median, percentiles, and correlation and regression coefficients) when parametric assumptions do not hold, or when inferences based on parametric assumptions are difficult to compute. Bootstrapping is available in the new Bootstrapping add-on option. See the topic Introduction to Bootstrapping for more information.

New nonparametric tests. Nonparametric tests make minimal assumptions about the underlying distribution of the data. The new nonparametric tests provide a new user interface and Model Viewer output, and include all of the tests available in the legacy nonparametric tests, including: one-sample Wilcoxon signed-rank test, one-sample confidence intervals for the binomial distribution, the related-samples marginal homogeneity test, and the Hodges-Lehman confidence interval for the median of the difference in paired-samples and the difference in medians of two independent samples. Pairwise and stepwise step-down multiple comparisons are also available for all k independent samples and k related samples tests. The Jonckheere-Terpstra test is available without requiring the Exact Tests add-on option. The new nonparametric tests are available in the Statistics Base add-on option. See the topic Nonparametric Tests for more information.

Programmability enhancements. The R Integration Plug-in now supports R debugging features. Additionally, you can create pivot tables from R with multiple row and column dimensions and you can nest multiple pivot tables under a common outline heading. R extension commands can be implemented directly from R source code files, bypassing the need to distribute them as R packages. Also, you can bundle together all components of a custom R or Python procedure, allowing end users to easily install the procedure without manually copying files. Complete documentation for the Python and R Integration Plug-ins is now integrated with the Help system.

Direct marketing tools. The new Direct Marketing add-on option provides a set of tools designed to improve the results of direct marketing campaigns by identifying demographic, purchasing, and other characteristics that define various groups of consumers and targeting specific groups to maximize positive response rates. See the topic Direct Marketing for more information.

Custom Tables enhancements. The Custom Tables add-on option now offers computed categories and significance results integrated into the same table as the values being tested. For more information on computed categories, see Computed Categories. For more information on significance tests in custom tables, see Custom Tables: Test Statistics Tab.

Improved SAS data file support. You can now write data files in SAS 9 format. See the topic Saving Data: Data File Types for more information.

Improved Custom Dialog Builder. The Custom Dialog Builder now has a list box control that supports single or multiple selection. Also, list items for combo box and list box controls can now be dynamically populated with values associated with the variables in a specified target list. In addition, radio buttons can now contain a set of nested controls. See the topic Creating and Managing Custom Dialogs for more information.

Improved display of large pivot tables. New display options are now available that make it easier to view and navigate large pivot tables (tables with hundreds or thousands of rows). See the topic Set Rows to Display for more information.

Improved Twostep Cluster output. The Twostep Cluster procedure now provides interactive model viewer output. Twostep Cluster is available in the Statitics Base option. See the topic The Cluster Viewer for more information.

Additional rule-checking on quality control charts. Rule-checking is now performed on several additional control charts. When rule-checking is requested for an X-bar chart, it will also be performed on the accompanying R (range) or s (standard deviation) chart. Similarly, when rule-checking is requested for an Individuals (Runs) chart, it will also be performed on the accompanying Moving Range chart. Quality control charts are available in the Statistics Base option.

Related Topics

What's New in Version 17.0?
What's New in Version 16.0?
What's New in Version 15.0?
What's New in Version 14.0.1
What's New in Version 14.0?
What's New in Version 13.0?
What's New in Version 12.0?
What's New in Version 11.5?
What's New in Version 11.0
What's New in Version 10.0.5
What's New in Version 10.0
What's New in Version 9.0
What's New in Version 8.0
What's New in Version 7.5
What's New in Version 7.0


Windows

windows,windows,windows

There are a number of different types of windows in PASW Statistics:

Data Editor. The Data Editor displays the contents of the data file. You can create new data files or modify existing data files with the Data Editor. If you have more than one data file open, there is a separate Data Editor window for each data file.

Viewer. All statistical results, tables, and charts are displayed in the Viewer. You can edit the output and save it for later use. A Viewer window opens automatically the first time you run a procedure that generates output.

Pivot Table Editor. Output that is displayed in pivot tables can be modified in many ways with the Pivot Table Editor. You can edit text, swap data in rows and columns, add color, create multidimensional tables, and selectively hide and show results.

Chart Editor. You can modify high-resolution charts and plots in chart windows. You can change the colors, select different type fonts or sizes, switch the horizontal and vertical axes, rotate 3-D scatterplots, and even change the chart type.

Text Output Editor. Text output that is not displayed in pivot tables can be modified with the Text Output Editor. You can edit the output and change font characteristics (type, style, color, size).

Syntax Editor. You can paste your dialog box choices into a syntax window, where your selections appear in the form of command syntax. You can then edit the command syntax to use special features that are not available through dialog boxes. You can save these commands in a file for use in subsequent sessions.

Data Editor and Viewer

Related Topics

Basic Steps in Data Analysis
Designated Window versus Active Window


Designated Window versus Active Window

windows,windows,windows
designated window,designated window,designated window
designated window,designated window,designated window
windows,windows,windows
active window,active window,active window
active window,active window,active window

If you have more than one open Viewer window, output is routed to the designated Viewer window. If you have more than one open Syntax Editor window, command syntax is pasted into the designated Syntax Editor window. The designated windows are indicated by a plus sign in the icon in the title bar. You can change the designated windows at any time.

The designated window should not be confused with the active window, which is the currently selected window. If you have overlapping windows, the active window appears in the foreground. If you open a window, that window automatically becomes the active window and the designated window.

Related Topics

Changing the Designated Window
Windows
Pasting Syntax from Dialog Boxes


Changing the Designated Window

Make the window that you want to designate the active window (click anywhere in the window).

Click the Designate Window button on the toolbar (the plus sign icon).

or

From the menus choose:

Utilities
Designate Window

Note: For Data Editor windows, the active Data Editor window determines the dataset that is used in subsequent calculations or analyses. There is no "designated" Data Editor window. See the topic Basic Handling of Multiple Data Sources for more information.


Status Bar

status bar,status bar,status bar

The status bar at the bottom of each PASW Statistics window provides the following information:

Command status. For each procedure or command that you run, a case counter indicates the number of cases processed so far. For statistical procedures that require iterative processing, the number of iterations is displayed.

Filter status. If you have selected a random sample or a subset of cases for analysis, the message Filter on indicates that some type of case filtering is currently in effect and not all cases in the data file are included in the analysis.

Weight status. The message Weight on indicates that a weight variable is being used to weight cases for analysis.

Split File status. The message Split File on indicates that the data file has been split into separate groups for analysis, based on the values of one or more grouping variables.


Dialog Boxes

dialog boxes,dialog boxes,dialog boxes
variables,variables,variables
variables,variables,variables
in dialog boxes,in dialog boxes,in dialog boxes
string variables,string variables,string variables
in dialog boxes,in dialog boxes,in dialog boxes

Most menu selections open dialog boxes. You use dialog boxes to select variables and options for analysis.

Dialog boxes for statistical procedures and charts typically have two basic components:

Source variable list. A list of variables in the active dataset. Only variable types that are allowed by the selected procedure are displayed in the source list. Use of short string and long string variables is restricted in many procedures.

Target variable list(s). One or more lists indicating the variables that you have chosen for the analysis, such as dependent and independent variable lists.

Related Topics

Define Variable Sets
Using Variable Sets to Show and Hide Variables
Basic Steps in Data Analysis
Variable Names and Variable Labels in Dialog Box Lists
Resizing Dialog Boxes
Dialog Box Controls
Selecting Variables
Data Type, Measurement Level, and Variable List Icons
Getting Information about Variables in Dialog Boxes


Variable Names and Variable Labels in Dialog Box Lists

dialog boxes,dialog boxes,dialog boxes
displaying variable names,displaying variable names,displaying variable names
dialog boxes,dialog boxes,dialog boxes
displaying variable labels,displaying variable labels,displaying variable labels
variable names,variable names,variable names
in dialog boxes,in dialog boxes,in dialog boxes
variable labels,variable labels,variable labels
in dialog boxes,in dialog boxes,in dialog boxes

You can display either variable names or variable labels in dialog box lists, and you can control the sort order of variables in source variable lists. To control the default display attributes of variables in source lists, choose Options on the Edit menu. See the topic General Options for more information.

You can also change the variable list display attributes within dialogs. The method for changing the display attributes depends on the dialog:

• If the dialog provides sorting and display controls above the source variable list, use those controls to change the display attributes.

• If the dialog does not contain sorting controls above the source variable list, right-click on any variable in the source list and select the display attributes from the context menu.

You can display either variable names or variable labels (names are displayed for any variables without defined labels), and you can sort the source list by file order, alphabetical order, or measurement level. (In dialogs with sorting controls above the source variable list, the default selection of None sorts the list in file order.)

Related Topics

Data Editor
Data View
Variable View
Variable Names
Variable Measurement Level
Custom Variable Attributes
Entering Data
To Change Data Type
Copying Data Properties
Date Variables versus Date Format Variables
Transpose
Working with Command Syntax
Multiple Execute Commands
General Options
Dialog Boxes
Resizing Dialog Boxes
Dialog Box Controls
Selecting Variables
Data Type, Measurement Level, and Variable List Icons
Getting Information about Variables in Dialog Boxes


Resizing Dialog Boxes

You can resize dialog boxes just like windows, by clicking and dragging the outside borders or corners. For example, if you make the dialog box wider, the variable lists will also be wider.

Resized dialog box

Related Topics

Dialog Boxes
Variable Names and Variable Labels in Dialog Box Lists
Dialog Box Controls
Selecting Variables
Data Type, Measurement Level, and Variable List Icons
Getting Information about Variables in Dialog Boxes


Dialog Box Controls

dialog boxes,dialog boxes,dialog boxes
controls,controls,controls
OK button,OK button,OK button
Paste button,Paste button,Paste button
Reset button,Reset button,Reset button
Cancel button,Cancel button,Cancel button
Help button,Help button,Help button

There are five standard controls in most dialog boxes:

OK. Runs the procedure. After you select your variables and choose any additional specifications, click OK to run the procedure and close the dialog box. Some dialogs have a Run button instead of the OK button.

Paste. Generates command syntax from the dialog box selections and pastes the syntax into a syntax window. You can then customize the commands with additional features that are not available from dialog boxes.

Reset. Deselects any variables in the selected variable list(s) and resets all specifications in the dialog box and any subdialog boxes to the default state.

Cancel. Cancels any changes that were made in the dialog box settings since the last time it was opened and closes the dialog box. Within a session, dialog box settings are persistent. A dialog box retains your last set of specifications until you override them.

Help. Provides context-sensitive Help. This control takes you to a Help window that contains information about the current dialog box.

Related Topics

Dialog Boxes
Variable Names and Variable Labels in Dialog Box Lists
Resizing Dialog Boxes
Selecting Variables
Data Type, Measurement Level, and Variable List Icons
Getting Information about Variables in Dialog Boxes


Selecting Variables

dialog boxes,dialog boxes,dialog boxes
selecting variables,selecting variables,selecting variables
variables,variables,variables
selecting in dialog boxes,selecting in dialog boxes,selecting in dialog boxes
dialog boxes,dialog boxes,dialog boxes
variables,variables,variables

To select a single variable, simply select it in the source variable list and drag and drop it into the target variable list. You can also use arrow button to move variables from the source list to the target lists. If there is only one target variable list, you can double-click individual variables to move them from the source list to the target list.

You can also select multiple variables:

• To select multiple variables that are grouped together in the variable list, click the first variable and then Shift-click the last variable in the group.

• To select multiple variables that are not grouped together in the variable list, click the first variable, then Ctrl-click the next variable, and so on (Macintosh: Command-click).

Related Topics

Dialog Boxes
Variable Names and Variable Labels in Dialog Box Lists
Resizing Dialog Boxes
Dialog Box Controls
Data Type, Measurement Level, and Variable List Icons
Getting Information about Variables in Dialog Boxes


Data Type, Measurement Level, and Variable List Icons

dialog boxes,dialog boxes,dialog boxes
variable icons,variable icons,variable icons
icons,icons,icons
in dialog boxes,in dialog boxes,in dialog boxes
measurement level,measurement level,measurement level
icons in dialog boxes,icons in dialog boxes,icons in dialog boxes

The icons that are displayed next to variables in dialog box lists provide information about the variable type and measurement level.

Measurement Level | Data Type
 | Numeric | String | Date | Time
Scale (Continuous) |  | n/a |  |
Ordinal |  |  |  |
Nominal |  |  |  |

• For more information on measurement level, see Variable Measurement Level.

• For more information on numeric, string, date, and time data types, see Variable Type.

Related Topics

Dialog Boxes
Variable Names and Variable Labels in Dialog Box Lists
Resizing Dialog Boxes
Dialog Box Controls
Selecting Variables
Getting Information about Variables in Dialog Boxes


Getting Information about Variables in Dialog Boxes

variables,variables,variables
variable information in dialog boxes,variable information in dialog boxes,variable information in dialog boxes
dialog boxes,dialog boxes,dialog boxes
variable information,variable information,variable information

Many dialogs provide the ability to find out more about the variables displayed in the variable lists.

Right-click a variable in the source or target variable list.

Choose Variable Information.

Related Topics

Variable Information
Dialog Boxes
Variable Names and Variable Labels in Dialog Box Lists
Resizing Dialog Boxes
Dialog Box Controls
Selecting Variables
Data Type, Measurement Level, and Variable List Icons


Command Line Options

command line,command line,command line
starting,starting,starting
command line switches,command line switches,command line switches

You can start PASW Statistics from the command line and include various switches to log on to an analytic server or to start production mode, among other options. The command is named paswstat and can be run from one of the following locations.

Platform | Executable Location
Windows | <installation directory>
Mac | <installation directory>/<version>.app/Contents/MacOS
Linux | <installation directory>/bin

Available Switches and Options

paswstat  [-server <inet:hostname:port>] [-user <name>] [-password <password>]
      [-switchserver]
      [-singleseat]
      [-nologo]
      [-production [silent|prompt]]
      [-symbol <values>]
      [<filename>] ...
      [-help|-h]

-server <inet:hostname:port>. The name or IP address and port number of the server. Windows only.

-user <name>. A valid user name. If a domain name is required, precede the user name with the domain name and a backslash (\). Windows only.

-password <password>. The user's password. Windows only.

-switchserver. Display the "Server Login" dialog box. This switch has precedence over the previous -server, -user, and -password switches. Windows only.

-singleseat. Start application in a single seat mode.

-nologo. Start the application without displaying the splash screen.

-production [prompt|silent]. Start the application in production mode. The prompt and silent keywords specify whether to display the dialog box that prompts for runtime values if they are specified in the job. The prompt keyword is the default and shows the dialog box. The silent keyword suppresses the dialog box. If you use the silent keyword, you can define the runtime symbols with the -symbol switch. Otherwise, the default value is used. The -switchserver and -singleseat switches are ignored when using the -production switch.

-symbol <values>. List of symbol-value pairs used in the production job. Each symbol name starts with @. Values that contain spaces should be enclosed in quotes. Rules for including quotes or apostrophes in string literals may vary across operating systems, but enclosing a string that includes single quotes or apostrophes in double quotes usually works (for example, “'a quoted value'”).

<filename> .... List of filenames, which can include all application supported file types. Enclose a file name with double quotes if it contains spaces.

-help|-h. Display the command help.

If the -server, -user, -password, -switchserver, and -singleseat switches are omitted, PASW Statistics runs in the default mode.

Examples

Note: The following examples assume that you changed directories to the executable location. The details may vary by operating system and may require path specifications.

Starting in distributed mode using a specific server:

paswstat -server mypaswstatsvr:3016 -user myuser -password mypassword

Starting in distributed mode using a specific server and a domain name:

paswstat -server mypaswstatsvr:3016 -user "mydomain\myuser" -password mypassword

Starting in single seat mode:

paswstat -singleseat

Starting in production mode, letting PASW Statistics prompt for runtime values:

paswstat C:\job1.spj -production

Starting in production mode with defined symbol-value pairs:

paswstat C:\job1.spj -production silent -macro @sex male @state "North Dakota"

Starting in default mode while opening a data file and a syntax file:

paswstat C:\cars.sav C:\analysis.sps


Basic Steps in Data Analysis

basic steps,basic steps,basic steps
data analysis,data analysis,data analysis
basic steps,basic steps,basic steps
data analysis,data analysis,data analysis

Analyzing data with PASW Statistics is easy. All you have to do is:

Get your data into PASW Statistics. You can open a previously saved PASW Statistics data file, you can read a spreadsheet, database, or text data file, or you can enter your data directly in the Data Editor.

Select a procedure. Select a procedure from the menus to calculate statistics or to create a chart.

Select the variables for the analysis. The variables in the data file are displayed in a dialog box for the procedure.

Run the procedure and look at the results. Results are displayed in the Viewer.

Related Topics

Windows
Dialog Boxes
Viewer
Viewer Outline


Statistics Coach

Statistics Coach,Statistics Coach,Statistics Coach
online Help,online Help,online Help
Statistics Coach,Statistics Coach,Statistics Coach

If you are unfamiliar with PASW Statistics or with the available statistical procedures, the Statistics Coach can help you get started by prompting you with simple questions, nontechnical language, and visual examples that help you select the basic statistical and charting features that are best suited for your data.

To use the Statistics Coach, from the menus in any PASW Statistics window choose:

Help
Statistics Coach

The Statistics Coach covers only a selected subset of procedures. It is designed to provide general assistance for many of the basic, commonly used statistical techniques.

Related Topics

Getting Help


Getting Help

Help windows,Help windows,Help windows
online Help,online Help,online Help
syntax,syntax,syntax
accessing Command Syntax Reference,accessing Command Syntax Reference,accessing Command Syntax Reference
command syntax,command syntax,command syntax
accessing Command Syntax Reference,accessing Command Syntax Reference,accessing Command Syntax Reference
algorithms,algorithms,algorithms

Help is provided in many different forms:

Help menu. The Help menu in most windows provides access to the main Help system, plus tutorials and technical reference material.

• Topics. Provides access to the Contents, Index, and Search tabs, which you can use to find specific Help topics.

• Tutorial. Illustrated, step-by-step instructions on how to use many of the basic features. You don't have to view the whole tutorial from start to finish. You can choose the topics you want to view, skip around and view topics in any order, and use the index or table of contents to find specific topics. You can also click here to start the tutorial.

• Case Studies. Hands-on examples of how to create various types of statistical analyses and how to interpret the results. The sample data files used in the examples are also provided so that you can work through the examples to see exactly how the results were produced. You can choose the specific procedure(s) that you want to learn about from the table of contents or search for relevant topics in the index. You can also click here to open the Case Studies.

• Statistics Coach. A wizard-like approach to guide you through the process of finding the procedure that you want to use. After you make a series of selections, the Statistics Coach opens the dialog box for the statistical, reporting, or charting procedure that meets your selected criteria. You can also click here to open the Statistics Coach.

• Command Syntax Reference. Detailed command syntax reference information is available in two forms: integrated into the overall Help system and as a separate document in PDF form in the Command Syntax Reference, available from the Help menu.

• Statistical Algorithms. The algorithms used for most statistical procedures are available in two forms: integrated into the overall Help system and as a separate document in PDF form available on the manuals CD. For links to specific algorithms in the Help system, choose Algorithms from the Help menu.

Context-sensitive Help. In many places in the user interface, you can get context-sensitive Help.

• Dialog box Help buttons. Most dialog boxes have a Help button that takes you directly to a Help topic for that dialog box. The Help topic provides general information and links to related topics.

• Pivot table context menu Help. Right-click on terms in an activated pivot table in the Viewer and choose What's This? from the context menu to display definitions of the terms.

• Command syntax. In a command syntax window, position the cursor anywhere within a syntax block for a command and press F1 on the keyboard. A complete command syntax chart for that command will be displayed. Complete command syntax documentation is available from the links in the list of related topics and from the Help Contents tab.

Other Resources

Technical Support Web site. Answers to many common problems can be found at http://support.spss.com. (The Technical Support Web site requires a login ID and password. Information on how to obtain an ID and password is provided at the URL listed above.)

Developer Central. Developer Central has resources for all levels of users and application developers. Download utilities, graphics examples, new statistical modules, and articles. Visit Developer Central at http://www.spss.com/devcentral.

Related Topics

Getting Help on Output Terms
Statistics Coach


Getting Help on Output Terms

To see a definition for a term in pivot table output in the Viewer:

Double-click the pivot table to activate it.

Right-click on the term that you want explained.

Choose What's This? from the context menu.

A definition of the term is displayed in a pop-up window.

Show me

Related Topics

Getting Help


Data Files

Data files come in a wide variety of formats, and this software is designed to handle many of them, including:

• Spreadsheets created with Excel and Lotus

• Database tables from many database sources, including Oracle, SQLServer, Access, dBASE, and others

• Tab-delimited and other types of simple text files

• Data files in PASW Statistics format created on other operating systems

• SYSTAT data files

• SAS data files

• Stata data files


Opening Data Files

In addition to files saved in PASW Statistics format, you can open Excel, SAS, Stata, tab-delimited, and other files without converting the files to an intermediate format or entering data definition information.

• Opening a data file makes it the active dataset. If you already have one or more open data files, they remain open and available for subsequent use in the session. Clicking anywhere in the Data Editor window for an open data file will make it the active dataset. See the topic Working with Multiple Data Sources for more information.

• In distributed analysis mode using a remote server to process commands and run procedures, the available data files, folders, and drives are dependent on what is available on or from the remote server. The current server name is indicated at the top of the dialog box. You will not have access to data files on your local computer unless you specify the drive as a shared device and the folders containing your data files as shared folders. See the topic Distributed Analysis Mode for more information.

Related Topics

To Open Data Files
Data File Types
Opening File Options
Reading Excel Files
Reading Excel 95 or Later Files
How to Read Excel 95 or Later Files
Reading Older Excel Files and Other Spreadsheets
Reading dBASE Files
Reading Stata Files
Opening Data Files from a Remote Server
File Access in Local and Distributed Analysis Mode


To Open Data Files

files,files,files
opening,opening,opening
opening files,opening files,opening files
spreadsheet files,spreadsheet files,spreadsheet files
spreadsheet files,spreadsheet files,spreadsheet files
opening files,opening files,opening files
data files,data files,data files
opening,opening,opening
opening files,opening files,opening files
data files,data files,data files
data files,data files,data files
opening files,opening files,opening files
dBASE files,dBASE files,dBASE files
reading,reading,reading
opening files,opening files,opening files
dBASE files,dBASE files,dBASE files
dBASE files,dBASE files,dBASE files
opening files,opening files,opening files
Excel files,Excel files,Excel files
opening,opening,opening
opening files,opening files,opening files
Excel files,Excel files,Excel files
Excel files,Excel files,Excel files
opening files,opening files,opening files
Lotus 1-2-3 files,Lotus 1-2-3 files,Lotus 1-2-3 files
opening,opening,opening
opening files,opening files,opening files
Lotus 1-2-3 files,Lotus 1-2-3 files,Lotus 1-2-3 files
Lotus 1-2-3 files,Lotus 1-2-3 files,Lotus 1-2-3 files
opening files,opening files,opening files
SYSTAT files,SYSTAT files,SYSTAT files
opening,opening,opening
opening files,opening files,opening files
SYSTAT files,SYSTAT files,SYSTAT files
SYSTAT files,SYSTAT files,SYSTAT files
opening files,opening files,opening files
tab-delimited files,tab-delimited files,tab-delimited files
opening,opening,opening
opening files,opening files,opening files
tab-delimited files,tab-delimited files,tab-delimited files
tab-delimited files,tab-delimited files,tab-delimited files
opening files,opening files,opening files
SAS files,SAS files,SAS files
opening,opening,opening
reading,reading,reading
Stata files,Stata files,Stata files
reading,reading,reading
opening,opening,opening
import data,import data,import data
Unicode,Unicode,Unicode

From the menus choose:

File
Open
Data...

In the Open Data dialog box, select the file that you want to open.

Click Open.

Optionally, you can:

• Automatically set the width of each string variable to the longest observed value for that variable using Minimize string widths based on observed values. This is particularly useful when reading code page data files in Unicode mode. See the topic General Options for more information.

• Read variable names from the first row of spreadsheet files.

• Specify a range of cells to read from spreadsheet files.

• Specify a worksheet within an Excel file to read (Excel 95 or later).

For information on reading data from databases, see Reading Database Files. For information on reading data from text data files, see Text Wizard.

Related Topics

Opening Data Files
Data File Types
Opening File Options
Reading Excel Files
Reading Excel 95 or Later Files
How to Read Excel 95 or Later Files
Reading Older Excel Files and Other Spreadsheets
Reading dBASE Files
Reading Stata Files
Opening Data Files from a Remote Server
File Access in Local and Distributed Analysis Mode


Data File Types

data files,data files,data files
opening,opening,opening
opening files,opening files,opening files
data files,data files,data files
data files,data files,data files
opening files,opening files,opening files

PASW Statistics. Opens data files saved in PASW Statistics format and also the DOS product SPSS/PC+.

SPSS/PC+. Opens SPSS/PC+ data files. This is available only on Windows operating systems.

SYSTAT. Opens SYSTAT data files.

PASW Statistics Portable. Opens data files saved in portable format. Saving a file in portable format takes considerably longer than saving the file in PASW Statistics format.

Excel. Opens Excel files.

Lotus 1-2-3. Opens data files saved in 1-2-3 format for release 3.0, 2.0, or 1A of Lotus.

SYLK. Opens data files saved in SYLK (symbolic link) format, a format used by some spreadsheet applications.

dBASE. Opens dBASE-format files for either dBASE IV, dBASE III or III PLUS, or dBASE II. Each case is a record. Variable and value labels and missing-value specifications are lost when you save a file in this format.

SAS. SAS versions 6–9 and SAS transport files. Using command syntax, you can also read value labels from a SAS format catalog file. See the topic GET SAS for more information.

Stata. Stata versions 4–8.

For information on reading data from databases, see Reading Database Files. For information on reading data from text data files, see Text Wizard.

Related Topics

To Open Data Files
Opening File Options
Reading Excel Files
Reading Excel 95 or Later Files
How to Read Excel 95 or Later Files
Reading Older Excel Files and Other Spreadsheets
Reading dBASE Files
Reading Stata Files
Opening Data Files from a Remote Server
File Access in Local and Distributed Analysis Mode


Opening File Options

spreadsheet files,spreadsheet files,spreadsheet files
reading variable names,reading variable names,reading variable names
spreadsheet files,spreadsheet files,spreadsheet files
reading ranges,reading ranges,reading ranges
spreadsheet files,spreadsheet files,spreadsheet files
tab-delimited files,tab-delimited files,tab-delimited files
reading variable names,reading variable names,reading variable names
tab-delimited files,tab-delimited files,tab-delimited files

Read variable names. For spreadsheets, you can read variable names from the first row of the file or the first row of the defined range. The values are converted as necessary to create valid variable names, including converting spaces to underscores. For information on variable naming rules, see Variable Names.

Worksheet. Excel 95 or later files can contain multiple worksheets. By default, the Data Editor reads the first worksheet. To read a different worksheet, select the worksheet from the drop-down list.

Range. For spreadsheet data files, you can also read a range of cells. Use the same method for specifying cell ranges as you would with the spreadsheet application.

Related Topics

To Open Data Files
Opening Data Files
Data File Types
Reading Excel Files
Reading Excel 95 or Later Files
How to Read Excel 95 or Later Files
Reading Older Excel Files and Other Spreadsheets
Reading dBASE Files
Reading Stata Files
Opening Data Files from a Remote Server
File Access in Local and Distributed Analysis Mode


Reading Excel Files

Excel files,Excel files,Excel files
reading variable names,reading variable names,reading variable names
Excel files,Excel files,Excel files
reading ranges,reading ranges,reading ranges
Excel files,Excel files,Excel files

Read variable names. You can read variable names from the first row of the file or the first row of the defined range. Values that don't conform to variable naming rules are converted to valid variable names, and the original names are used as variable labels. For information on variable naming rules, see Variable Names.

Worksheet. Excel files can contain multiple worksheets. By default, the Data Editor reads the first worksheet. To read a different worksheet, select the worksheet from the drop-down list.

Range. You can also read a range of cells. Use the same method for specifying cell ranges as you would in Excel.

Related Topics

How to Read Excel 95 or Later Files
Opening Data Files
To Open Data Files
Data File Types
Opening File Options
Reading Excel 95 or Later Files
Reading Older Excel Files and Other Spreadsheets
Reading dBASE Files
Reading Stata Files
Opening Data Files from a Remote Server
File Access in Local and Distributed Analysis Mode


Reading Excel 95 or Later Files

opening files,opening files,opening files
Excel files,Excel files,Excel files
Excel files,Excel files,Excel files
opening,opening,opening
opening files,opening files,opening files
Excel files,Excel files,Excel files

The following rules apply to reading Excel 95 or later files:

Data type and width. Each column is a variable. The data type and width for each variable are determined by the data type and width in the Excel file. If the column contains more than one data type (for example, date and numeric), the data type is set to string, and all values are read as valid string values.

Blank cells. For numeric variables, blank cells are converted to the system-missing value, indicated by a period. For string variables, a blank is a valid string value, and blank cells are treated as valid string values.

Variable names. If you read the first row of the Excel file (or the first row of the specified range) as variable names, values that don't conform to variable naming rules are converted to valid variable names, and the original names are used as variable labels. For information on variable naming rules, see Variable Names. If you do not read variable names from the Excel file, default variable names are assigned.

Related Topics

Opening Data Files
To Open Data Files
Data File Types
Opening File Options
Reading Excel Files
How to Read Excel 95 or Later Files
Reading Older Excel Files and Other Spreadsheets
Reading dBASE Files
Reading Stata Files
Opening Data Files from a Remote Server
File Access in Local and Distributed Analysis Mode


How to Read Excel 95 or Later Files

opening files,opening files,opening files
Excel files,Excel files,Excel files
Excel files,Excel files,Excel files
opening,opening,opening
opening files,opening files,opening files
Excel files,Excel files,Excel files

From the menus choose:

File
Open
Data…

In the Open File dialog box, select the type of file and the file you want to open.

Click Open.

If the first row of the spreadsheet contains column headings or labels, click Read variable names in the Opening File Options dialog box.

If the data you want to read do not start in the first row of the spreadsheet, enter the cell range in the Opening File Options dialog box.

If the data you want to read are not on the first sheet of the file, select the sheet you want to read.

If all of your data are read as string data, you probably tried to read the first row as data when it really contains headings.

Show me

Related Topics

Opening Data Files
To Open Data Files
Data File Types
Opening File Options
Reading Excel Files
Reading Excel 95 or Later Files
Reading Older Excel Files and Other Spreadsheets
Reading dBASE Files
Reading Stata Files
Opening Data Files from a Remote Server
File Access in Local and Distributed Analysis Mode


Reading Older Excel Files and Other Spreadsheets

opening files,opening files,opening files
spreadsheet files,spreadsheet files,spreadsheet files
spreadsheet files,spreadsheet files,spreadsheet files
opening,opening,opening
opening files,opening files,opening files
spreadsheet files,spreadsheet files,spreadsheet files

The following rules apply to reading Excel files prior to Excel 95 and other spreadsheet data:

Data type and width. The data type and width for each variable are determined by the column width and data type of the first data cell in the column. Values of other types are converted to the system-missing value. If the first data cell in the column is blank, the global default data type for the spreadsheet (usually numeric) is used.

Blank cells. For numeric variables, blank cells are converted to the system-missing value, indicated by a period. For string variables, a blank is a valid string value, and blank cells are treated as valid string values.

Variable names. If you do not read variable names from the spreadsheet, the column letters (A, B, C, ...) are used for variable names for Excel and Lotus files. For SYLK files and Excel files saved in R1C1 display format, the software uses the column number preceded by the letter C for variable names (C1, C2, C3, ...).

Related Topics

Opening Data Files
To Open Data Files
Data File Types
Opening File Options
Reading Excel Files
Reading Excel 95 or Later Files
How to Read Excel 95 or Later Files
Reading dBASE Files
Reading Stata Files
Opening Data Files from a Remote Server
File Access in Local and Distributed Analysis Mode


Reading dBASE Files

opening files,opening files,opening files
dBASE files,dBASE files,dBASE files
dBASE files,dBASE files,dBASE files
reading,reading,reading
opening files,opening files,opening files
dBASE files,dBASE files,dBASE files

Database files are logically very similar to PASW Statistics data files. The following general rules apply to dBASE files:

• Field names are converted to valid variable names. For information on variable naming rules, see Variable Names.

• Colons used in dBASE field names are translated to underscores.

• Records marked for deletion but not actually purged are included. The software creates a new string variable, D_R, which contains an asterisk for cases marked for deletion.

Related Topics

Opening Data Files
To Open Data Files
Data File Types
Opening File Options
Reading Excel Files
Reading Excel 95 or Later Files
How to Read Excel 95 or Later Files
Reading Older Excel Files and Other Spreadsheets
Reading Stata Files
Opening Data Files from a Remote Server
File Access in Local and Distributed Analysis Mode


Reading Stata Files

opening files,opening files,opening files
Stata files,Stata files,Stata files
Stata files,Stata files,Stata files
opening,opening,opening
opening files,opening files,opening files
Stata files,Stata files,Stata files

The following general rules apply to Stata data files:

• Variable names. Stata variable names are converted to PASW Statistics variable names in case-sensitive form. Stata variable names that are identical except for case are converted to valid variable names by appending an underscore and a sequential letter (_A, _B, _C, ..., _Z, _AA, _AB, ..., and so forth).

• Variable labels. Stata variable labels are converted to PASW Statistics variable labels.

• Value labels. Stata value labels are converted to PASW Statistics value labels, except for Stata value labels assigned to "extended" missing values.

• Missing values. Stata "extended" missing values are converted to system-missing values.

• Date conversion. Stata date format values are converted to PASW Statistics DATE format (d-m-y) values. Stata "time-series" date format values (weeks, months, quarters, and so on) are converted to simple numeric (F) format, preserving the original, internal integer value, which is the number of weeks, months, quarters, and so on, since the start of 1960.

Related Topics

Opening Data Files
To Open Data Files
Data File Types
Opening File Options
Reading Excel Files
Reading Excel 95 or Later Files
How to Read Excel 95 or Later Files
Reading Older Excel Files and Other Spreadsheets
Reading dBASE Files
Opening Data Files from a Remote Server
File Access in Local and Distributed Analysis Mode


Reading Database Files

You can read data from any database format for which you have a database driver. In local analysis mode, the necessary drivers must be installed on your local computer. In distributed analysis mode (available with PASW Statistics Server), the drivers must be installed on the remote server.See the topic Distributed Analysis Mode for more information.

Related Topics

GET DATA


To Read Database Files

databases,databases,databases
databases,databases,databases
reading,reading,reading
databases,databases,databases
opening files,opening files,opening files
import data,import data,import data

From the menus choose:

File
Open Database
New Query...

(Or choose Edit Query to work on a saved query)

Select the data source.

If necessary (depending on the data source), select the database file and/or enter a login name, password, and other information.

Select the table(s) and fields. For OLE DB data sources (available only on Windows operating systems), you can only select one table.

Specify any relationships between your tables.

Optionally:

• Specify any selection criteria for your data.

• Add a prompt for user input to create a parameter query.

• Save your constructed query before running it.

You can read data from any database format for which you have a database driver. In local analysis mode, the necessary drivers must be installed on your local computer. In distributed analysis mode (available with the server version), the drivers must be installed on the remote server.

To add data sources in distributed analysis mode, see your system administrator.

Show me


Selecting a Data Source

databases,databases,databases
selecting a data source,selecting a data source,selecting a data source
databases,databases,databases
reading,reading,reading
databases,databases,databases
Microsoft Access,Microsoft Access,Microsoft Access
databases,databases,databases
Microsoft Access,Microsoft Access,Microsoft Access
Access (Microsoft),Access (Microsoft),Access (Microsoft)
databases,databases,databases

Use the first screen of the Database Wizard to select the type of data source to read.

ODBC Data Sources Collapse Hide details

ODBC Data Sources

If you do not have any ODBC data sources configured, or if you want to add a new data source, click Add ODBC Data Source.

• On Linux operating systems, this button is not available. ODBC data sources are specified in odbc.ini, and the ODBCINI environment variables must be set to the location of that file. For more information, see the documentation for your database drivers.

• In distributed analysis mode (available with PASW Statistics Server), this button is not available. To add data sources in distributed analysis mode, see your system administrator.

An ODBC data source consists of two essential pieces of information: the driver that will be used to access the data and the location of the database you want to access. To specify data sources, you must have the appropriate drivers installed. Drivers for a variety of database formats are available at http://www.spss.com/drivers.

OLE DB Data Sources Collapse Hide details

OLE DB Data Sources

To access OLE DB data sources (available only on Microsoft Windows operating systems), you must have the following items installed:

• .NET framework. To obtain the most recent version of the .NET framework, go to http://www.microsoft.com/net.

• PASW Reports for Surveys Components. A version that is compatible with this release can be installed from the installation media. If you are using PASW Statistics Developer, you can download a compatible version from the Downloads tab at www.spss.com/statistics.

The following limitations apply to OLE DB data sources:

• Table joins are not available for OLE DB data sources. You can read only one table at a time.

• You can add OLE DB data sources only in local analysis mode. To add OLE DB data sources in distributed analysis mode on a Windows server, consult your system administrator.

• In distributed analysis mode (available with PASW Statistics Server), OLE DB data sources are available only on Windows servers, and both .NET and PASW Reports for Surveys Components must be installed on the server.

To add an OLE DB data source:

Click Add OLE DB Data Source.

In Data Link Properties, click the Provider tab and select the OLE DB provider.

Click Next or click the Connection tab.

Select the database by entering the directory location and database name or by clicking the button to browse to a database. (A user name and password may also be required.)

Click OK after entering all necessary information. (You can make sure the specified database is available by clicking the Test Connection button.)

Enter a name for the database connection information. (This name will be displayed in the list of available OLE DB data sources.)

Click OK.

This takes you back to the first screen of the Database Wizard, where you can select the saved name from the list of OLE DB data sources and continue to the next step of the wizard.

Deleting OLE DB Data Sources

To delete data source names from the list of OLE DB data sources, delete the UDL file with the name of the data source in:

[drive]:\Documents and Settings\[user login]\Local Settings\Application Data\SPSS\UDL

Enterprise View Driver Collapse Hide details

Enterprise View Driver

The Enterprise View Driver--available to PASW Collaboration and Deployment Services customers--allows you to access data from the Enterprise View. Use of the Enterprise View Driver requires the Statistics Adapter option and a connection to a repository.

The driver uses Data Provider Definitions (DPD) to access data. A DPD maps the virtual table and column definitions from an application view to the physical tables where data resides, whether in a data warehouse, an operational data store, or an online transactional database. DPD's are defined against particular ODBC data sources. To use a DPD, you must have an ODBC data source (defined on the machine that will access the data) with the same name, and which connects to the same data store, as the one referenced in the DPD. Contact your PASW Collaboration and Deployment Services administrator to obtain the necessary information.

Once you have added the necessary ODBC data sources, you can access your data with the Enterprise View Driver.

Select Enterprise View Driver from the list of ODBC Data Sources.

Click Next.

If there is no current connection to a repository, the Connect dialog box opens, allowing you to establish a connection. Once a connection is established, the Enterprise View Driver Details dialog box opens.

Select the Application View containing the desired data.

Select the environment that specifies the desired subset of data from the application view. For example, when analytic is selected, only those application view columns defined as analytic are available. The environment specifies which data providers are available. The default environment is analytic.

Select from the list of available Data Provider Definitions for the selected application view and environment.

Select the label for the desired version of the application view.

Click Continue.

This takes you to the next step of the wizard.

Related Topics

To Read Database Files
Distributed Analysis Mode
Selecting Data Fields
Creating a Relationship between Tables
Limiting Retrieved Cases
Creating a Parameter Query
Aggregating Data
Defining Variables
Sorting Cases
Results


Selecting Data Fields

databases,databases,databases
selecting data fields,selecting data fields,selecting data fields
databases,databases,databases
reading,reading,reading
databases,databases,databases
databases,databases,databases

The Select Data step controls which tables and fields are read. Database fields (columns) are read as variables.

If a table has any field(s) selected, all of its fields will be visible in the following Database Wizard windows, but only fields that are selected in this step will be imported as variables. This enables you to create table joins and to specify criteria by using fields that you are not importing.

Displaying field names. To list the fields in a table, click the plus sign (+) to the left of a table name. To hide the fields, click the minus sign (–) to the left of a table name.

To add a field. Double-click any field in the Available Tables list, or drag it to the Retrieve Fields In This Order list. Fields can be reordered by dragging and dropping them within the fields list.

To remove a field. Double-click any field in the Retrieve Fields In This Order list, or drag it to the Available Tables list.

Sort field names. If this check box is selected, the Database Wizard will display your available fields in alphabetical order.

By default, the list of available tables displays only standard database tables. You can control the type of items that are displayed in the list:

• Tables. Standard database tables.

• Views. Views are virtual or dynamic "tables" defined by queries. These can include joins of multiple tables and/or fields derived from calculations based on the values of other fields.

• Synonyms. A synonym is an alias for a table or view, typically defined in a query.

• System tables. System tables define database properties. In some cases, standard database tables may be classified as system tables and will only be displayed if you select this option. Access to real system tables is often restricted to database administrators.

Note: For OLE DB data sources (available only on Windows operating systems), you can select fields only from a single table. Multiple table joins are not supported for OLE DB data sources.

Related Topics

To Read Database Files
Selecting a Data Source
Creating a Relationship between Tables
Limiting Retrieved Cases
Creating a Parameter Query
Aggregating Data
Defining Variables
Sorting Cases
Results


Creating a Relationship between Tables

databases,databases,databases
creating relationships,creating relationships,creating relationships
databases,databases,databases
table joins,table joins,table joins
databases,databases,databases
inner join,inner join,inner join
outer join,outer join,outer join

The Specify Relationships step allows you to define the relationships between the tables for ODBC data sources. If fields from more than one table are selected, you must define at least one join.

Establishing relationships. To create a relationship, drag a field from any table onto the field to which you want to join it. The Database Wizard will draw a join line between the two fields, indicating their relationship. These fields must be of the same data type.

Auto Join Tables. Attempts to automatically join tables based on primary/foreign keys or matching field names and data type.

Join Type. If outer joins are supported by your driver, you can specify inner joins, left outer joins, or right outer joins.

• Inner joins. An inner join includes only rows where the related fields are equal.

• Outer joins. In addition to one-to-one matching with inner joins, you can also use outer joins to merge tables with a one-to-many matching scheme. For example, you could match a table in which there are only a few records representing data values and associated descriptive labels with values in a table containing hundreds or thousands of records representing survey respondents. A left outer join includes all records from the table on the left and, from the table on the right, includes only those records in which the related fields are equal. In a right outer join, the join imports all records from the table on the right and, from the table on the left, imports only those records in which the related fields are equal.

Related Topics

To Read Database Files
Selecting a Data Source
Selecting Data Fields
Limiting Retrieved Cases
Creating a Parameter Query
Aggregating Data
Defining Variables
Sorting Cases
Results


Limiting Retrieved Cases

databases,databases,databases
conditional expressions,conditional expressions,conditional expressions
databases,databases,databases
Where clause,Where clause,Where clause
databases,databases,databases
specifying criteria,specifying criteria,specifying criteria
databases,databases,databases
parameter queries,parameter queries,parameter queries
databases,databases,databases
databases,databases,databases
random sampling,random sampling,random sampling
random sample,random sample,random sample
databases,databases,databases
databases,databases,databases
random sample,random sample,random sample

The Limit Retrieved Cases step allows you to specify the criteria to select subsets of cases (rows). Limiting cases generally consists of filling the criteria grid with criteria. Criteria consist of two expressions and some relation between them. The expressions return a value of true, false, or missing for each case.

• If the result is true, the case is selected.

• If the result is false or missing, the case is not selected.

• Most criteria use one or more of the six relational operators (<, >, <=, >=, =, and <>).

• Expressions can include field names, constants, arithmetic operators, numeric and other functions, and logical variables. You can use fields that you do not plan to import as variables.

To build your criteria, you need at least two expressions and a relation to connect the expressions.

To build an expression, choose one of the following methods:

• In an Expression cell, type field names, constants, arithmetic operators, numeric and other functions, or logical variables.

• Double-click the field in the Fields list.

• Drag the field from the Fields list to an Expression cell.

• Choose a field from the drop-down menu in any active Expression cell.

To choose the relational operator (such as = or >), put your cursor in the Relation cell and either type the operator or choose it from the drop-down menu.

If the SQL contains WHERE clauses with expressions for case selection, dates and times in expressions need to be specified in a special manner (including the curly braces shown in the examples):

• Date literals should be specified using the general form {d 'yyyy-mm-dd'}.

• Time literals should be specified using the general form {t 'hh:mm:ss'}.

• Date/time literals (timestamps) should be specified using the general form {ts 'yyyy-mm-dd hh:mm:ss'}.

• The entire date and/or time value must be enclosed in single quotes. Years must be expressed in four-digit form, and dates and times must contain two digits for each portion of the value. For example January 1, 2005, 1:05 AM would be expressed as:

{ts '2005-01-01 01:05:00'}

Functions. A selection of built-in arithmetic, logical, string, date, and time SQL functions is provided. You can drag a function from the list into the expression, or you can enter any valid SQL function. See your database documentation for valid SQL functions. A list of standard functions is available at:

http://msdn2.microsoft.com/en-us/library/ms711813.aspx

Use Random Sampling. This option selects a random sample of cases from the data source. For large data sources, you may want to limit the number of cases to a small, representative sample, which can significantly reduce the time that it takes to run procedures. Native random sampling, if available for the data source, is faster than PASW Statistics random sampling, because PASW Statistics random sampling must still read the entire data source to extract a random sample.

Expand Show details Collapse Hide details

• Approximately. Generates a random sample of approximately the specified percentage of cases. Since this routine makes an independent pseudorandom decision for each case, the percentage of cases selected can only approximate the specified percentage. The more cases there are in the data file, the closer the percentage of cases selected is to the specified percentage.

• Exactly. Selects a random sample of the specified number of cases from the specified total number of cases. If the total number of cases specified exceeds the total number of cases in the data file, the sample will contain proportionally fewer cases than the requested number.

Note: If you use random sampling, aggregation (available in distributed mode with PASW Statistics Server) is not available.

Prompt For Value. You can embed a prompt in your query to create a parameter query. When users run the query, they will be asked to enter information (based on what is specified here). You might want to do this if you need to see different views of the same data. For example, you may want to run the same query to see sales figures for different fiscal quarters.

Place your cursor in any Expression cell, and click Prompt For Value to create a prompt.

Related Topics

To Read Database Files
Selecting a Data Source
Selecting Data Fields
Creating a Relationship between Tables
Creating a Parameter Query
Aggregating Data
Defining Variables
Sorting Cases
Results


Creating a Parameter Query

databases,databases,databases
Prompt for Value,Prompt for Value,Prompt for Value
databases,databases,databases
parameter queries,parameter queries,parameter queries
databases,databases,databases

Use the Prompt for Value step to create a dialog box that solicits information from users each time someone runs your query. This feature is useful if you want to query the same data source by using different criteria.

To build a prompt, enter a prompt string and a default value. The prompt string is displayed each time a user runs your query. The string should specify the kind of information to enter. If the user is not selecting from a list, the string should give hints about how the input should be formatted. An example is as follows: Enter a Quarter (Q1, Q2, Q3, ...).

Allow user to select value from list. If this check box is selected, you can limit the user to the values that you place here. Ensure that your values are separated by returns.

Data type. Choose the data type here (Number, String, or Date).

Date and time values must be entered in special manner:

• Date literals should be specified using the general form {d 'yyyy-mm-dd'}.

• Time literals should be specified using the general form {t 'hh:mm:ss'}.

• Date/time literals (timestamps) should be specified using the general form {ts 'yyyy-mm-dd hh:mm:ss'}.

• The entire date and/or time value must be enclosed in single quotes. Years must be expressed in four-digit form, and dates and times must contain two digits for each portion of the value. For example January 1, 2005, 1:05 AM would be expressed as:

{ts '2005-01-01 01:05:00'}

Related Topics

To Read Database Files
Selecting a Data Source
Selecting Data Fields
Creating a Relationship between Tables
Limiting Retrieved Cases
Aggregating Data
Defining Variables
Sorting Cases
Results


Aggregating Data

If you are in distributed mode, connected to a remote server (available with PASW Statistics Server), you can aggregate the data before reading it into PASW Statistics.

You can also aggregate data after reading it into PASW Statistics, but preaggregating may save time for large data sources.

To create aggregated data, select one or more break variables that define how cases are grouped.

Select one or more aggregated variables.

Select an aggregate function for each aggregate variable.

Optionally, create a variable that contains the number of cases in each break group.

Note: If you use PASW Statistics random sampling, aggregation is not available.

Related Topics

Selecting a Data Source
Selecting Data Fields
Creating a Relationship between Tables
Limiting Retrieved Cases
Creating a Parameter Query
Defining Variables
Sorting Cases
Results


Defining Variables

databases,databases,databases
defining variables,defining variables,defining variables
databases,databases,databases
converting strings to numeric variables,converting strings to numeric variables,converting strings to numeric variables
databases,databases,databases

Variable names and labels. The complete database field (column) name is used as the variable label. Unless you modify the variable name, the Database Wizard assigns variable names to each column from the database in one of two ways:

• If the name of the database field forms a valid, unique variable name, the name is used as the variable name.

• If the name of the database field does not form a valid, unique variable name, a new, unique name is automatically generated. For information on variable naming rules, see Variable Names.

Click any cell to edit the variable name.

Converting strings to numeric values. Select the Recode to Numeric box for a string variable if you want to automatically convert it to a numeric variable. String values are converted to consecutive integer values based on alphabetical order of the original values. The original values are retained as value labels for the new variables.

Width for variable-width string fields. This option controls the width of variable-width string values. By default, the width is 255 bytes, and only the first 255 bytes (typically 255 characters in single-byte languages) will be read. The width can be up to 32,767 bytes. Although you probably don't want to truncate string values, you also don't want to specify an unnecessarily large value, which will cause processing to be inefficient.

Minimize string widths based on observed values. Automatically set the width of each string variable to the longest observed value.

Related Topics

To Read Database Files
Selecting a Data Source
Selecting Data Fields
Creating a Relationship between Tables
Limiting Retrieved Cases
Creating a Parameter Query
Aggregating Data
Sorting Cases
Results


Sorting Cases

If you are in distributed mode, connected to a remote server (available with PASW Statistics Server), you can sort the data before reading it into PASW Statistics.

You can also sort data after reading it into PASW Statistics, but presorting may save time for large data sources.

Related Topics

Selecting a Data Source
Selecting Data Fields
Creating a Relationship between Tables
Limiting Retrieved Cases
Creating a Parameter Query
Aggregating Data
Defining Variables
Results


Results

databases,databases,databases
verifying results,verifying results,verifying results
databases,databases,databases
SQL syntax,SQL syntax,SQL syntax
databases,databases,databases
saving queries,saving queries,saving queries
saving files,saving files,saving files
database file queries,database file queries,database file queries
databases,databases,databases

The Results step displays the SQL Select statement for your query.

• You can edit the SQL Select statement before you run the query, but if you click the Back button to make changes in previous steps, the changes to the Select statement will be lost.

• To save the query for future use, use the Save query to file section.

• To paste complete GET DATA syntax into a syntax window, select Paste it into the syntax editor for further modification. Copying and pasting the Select statement from the Results window will not paste the necessary command syntax.

Note: The pasted syntax contains a blank space before the closing quote on each line of SQL that is generated by the wizard. These blanks are not superfluous. When the command is processed, all lines of the SQL statement are merged together in a very literal fashion. Without the space, there would be no space between the last character on one line and first character on the next line.

Related Topics

To Read Database Files
Selecting a Data Source
Selecting Data Fields
Creating a Relationship between Tables
Limiting Retrieved Cases
Creating a Parameter Query
Aggregating Data
Defining Variables
Sorting Cases


Text Wizard

data files,data files,data files
text,text,text
text,text,text
data files,data files,data files
opening files,opening files,opening files
text data files,text data files,text data files
data files,data files,data files
text,text,text
opening files,opening files,opening files
comma-delimited files,comma-delimited files,comma-delimited files
tab-delimited files,tab-delimited files,tab-delimited files
space-delimited data,space-delimited data,space-delimited data
freefield format,freefield format,freefield format
fixed format,fixed format,fixed format
CSV format,CSV format,CSV format
reading data,reading data,reading data

The Text Wizard can read text data files formatted in a variety of ways:

• Tab-delimited files

• Space-delimited files

• Comma-delimited files

• Fixed-field format files

For delimited files, you can also specify other characters as delimiters between values, and you can specify multiple delimiters.

Related Topics

To Read Text Data Files
Text Wizard: Step 1
Text Wizard: Step 2
Text Wizard: Step 3 (Delimited Files)
Text Wizard: Step 3 (Fixed-Width Files)
Text Wizard: Step 4 (Delimited Files)
Text Wizard: Step 4 (Fixed-Width Files)
Text Wizard: Step 5
Text Wizard Formatting Options
Text Wizard: Step 6
GET DATA


To Read Text Data Files

From the menus choose:

File
Read Text Data...

Select the text file in the Open Data dialog box.

Follow the steps in the Text Wizard to define how to read the data file.

Show me


Text Wizard: Step 1

The text file is displayed in a preview window. You can apply a predefined format (previously saved from the Text Wizard) or follow the steps in the Text Wizard to specify how the data should be read.

Related Topics

To Read Text Data Files
Text Wizard
Text Wizard: Step 2
Text Wizard: Step 3 (Delimited Files)
Text Wizard: Step 3 (Fixed-Width Files)
Text Wizard: Step 4 (Delimited Files)
Text Wizard: Step 4 (Fixed-Width Files)
Text Wizard: Step 5
Text Wizard Formatting Options
Text Wizard: Step 6


Text Wizard: Step 2

This step provides information about variables. A variable is similar to a field in a database. For example, each item in a questionnaire is a variable.

How are your variables arranged? To read your data properly, the Text Wizard needs to know how to determine where the data value for one variable ends and the data value for the next variable begins. The arrangement of variables defines the method used to differentiate one variable from the next.

• Delimited. Spaces, commas, tabs, or other characters are used to separate variables. The variables are recorded in the same order for each case but not necessarily in the same column locations.

• Fixed width. Each variable is recorded in the same column location on the same record (line) for each case in the data file. No delimiter is required between variables. In fact, in many text data files generated by computer programs, data values may appear to run together without even spaces separating them. The column location determines which variable is being read.

Are variable names included at the top of your file? If the first row of the data file contains descriptive labels for each variable, you can use these labels as variable names. Values that don't conform to variable naming rules are converted to valid variable names. For information on variable naming rules, see Variable Names.

Related Topics

To Read Text Data Files
Text Wizard
Text Wizard: Step 1
Text Wizard: Step 3 (Delimited Files)
Text Wizard: Step 3 (Fixed-Width Files)
Text Wizard: Step 4 (Delimited Files)
Text Wizard: Step 4 (Fixed-Width Files)
Text Wizard: Step 5
Text Wizard Formatting Options
Text Wizard: Step 6


Text Wizard: Step 3 (Delimited Files)

This step provides information about cases. A case is similar to a record in a database. For example, each respondent to a questionnaire is a case.

The first case of data begins on which line number? Indicates the first line of the data file that contains data values. If the top line(s) of the data file contain descriptive labels or other text that does not represent data values, this will not be line 1.

How are your cases represented? Controls how the Text Wizard determines where each case ends and the next one begins.

• Each line represents a case. Each line contains only one case. It is fairly common for each case to be contained on a single line (row), even though this can be a very long line for data files with a large number of variables. If not all lines contain the same number of data values, the number of variables for each case is determined by the line with the greatest number of data values. Cases with fewer data values are assigned missing values for the additional variables.

• A specific number of variables represents a case. The specified number of variables for each case tells the Text Wizard where to stop reading one case and start reading the next. Multiple cases can be contained on the same line, and cases can start in the middle of one line and be continued on the next line. The Text Wizard determines the end of each case based on the number of values read, regardless of the number of lines. Each case must contain data values (or missing values indicated by delimiters) for all variables, or the data file will be read incorrectly.

How many cases do you want to import? You can import all cases in the data file, the first n cases (n is a number you specify), or a random sample of a specified percentage. Since the random sampling routine makes an independent pseudo-random decision for each case, the percentage of cases selected can only approximate the specified percentage. The more cases there are in the data file, the closer the percentage of cases selected is to the specified percentage.

Related Topics

To Read Text Data Files
Text Wizard
Text Wizard: Step 1
Text Wizard: Step 2
Text Wizard: Step 3 (Fixed-Width Files)
Text Wizard: Step 4 (Delimited Files)
Text Wizard: Step 4 (Fixed-Width Files)
Text Wizard: Step 5
Text Wizard Formatting Options
Text Wizard: Step 6


Text Wizard: Step 3 (Fixed-Width Files)

This step provides information about cases. A case is similar to a record in a database. For example, each respondent to questionnaire is a case.

The first case of data begins on which line number? Indicates the first line of the data file that contains data values. If the top line(s) of the data file contain descriptive labels or other text that does not represent data values, this will not be line 1.

How many lines represent a case? Controls how the Text Wizard determines where each case ends and the next one begins. Each variable is defined by its line number within the case and its column location. You need to specify the number of lines for each case to read the data correctly.

How many cases do you want to import? You can import all cases in the data file, the first n cases (n is a number you specify), or a random sample of a specified percentage. Since the random sampling routine makes an independent pseudo-random decision for each case, the percentage of cases selected can only approximate the specified percentage. The more cases there are in the data file, the closer the percentage of cases selected is to the specified percentage.

Related Topics

To Read Text Data Files
Text Wizard
Text Wizard: Step 1
Text Wizard: Step 2
Text Wizard: Step 3 (Delimited Files)
Text Wizard: Step 4 (Delimited Files)
Text Wizard: Step 4 (Fixed-Width Files)
Text Wizard: Step 5
Text Wizard Formatting Options
Text Wizard: Step 6


Text Wizard: Step 4 (Delimited Files)

This step displays the Text Wizard's best guess on how to read the data file and allows you to modify how the Text Wizard will read variables from the data file.

Which delimiters appear between variables? Indicates the characters or symbols that separate data values. You can select any combination of spaces, commas, semicolons, tabs, or other characters. Multiple, consecutive delimiters without intervening data values are treated as missing values.

What is the text qualifier? Characters used to enclose values that contain delimiter characters. For example, if a comma is the delimiter, values that contain commas will be read incorrectly unless there is a text qualifier enclosing the value, preventing the commas in the value from being interpreted as delimiters between values. CSV-format data files exported from Excel use a double quotation mark (") as a text qualifier. The text qualifier appears at both the beginning and the end of the value, enclosing the entire value.

Related Topics

To Read Text Data Files
Text Wizard
Text Wizard: Step 1
Text Wizard: Step 2
Text Wizard: Step 3 (Delimited Files)
Text Wizard: Step 3 (Fixed-Width Files)
Text Wizard: Step 4 (Fixed-Width Files)
Text Wizard: Step 5
Text Wizard Formatting Options
Text Wizard: Step 6


Text Wizard: Step 4 (Fixed-Width Files)

This step displays the Text Wizard's best guess on how to read the data file and allows you to modify how the Text Wizard will read variables from the data file. Vertical lines in the preview window indicate where the Text Wizard currently thinks each variable begins in the file.

Insert, move, and delete variable break lines as necessary to separate variables. If multiple lines are used for each case, the data will be displayed as one line for each case, with subsequent lines appended to the end of the line.

Notes:

For computer-generated data files that produce a continuous stream of data values with no intervening spaces or other distinguishing characteristics, it may be difficult to determine where each variable begins. Such data files usually rely on a data definition file or some other written description that specifies the line and column location for each variable.

Related Topics

To Read Text Data Files
Text Wizard
Text Wizard: Step 1
Text Wizard: Step 2
Text Wizard: Step 3 (Delimited Files)
Text Wizard: Step 3 (Fixed-Width Files)
Text Wizard: Step 4 (Delimited Files)
Text Wizard: Step 5
Text Wizard Formatting Options
Text Wizard: Step 6


Text Wizard: Step 5

This steps controls the variable name and the data format that the Text Wizard will use to read each variable and which variables will be included in the final data file.

Variable name. You can overwrite the default variable names with your own variable names. If you read variable names from the data file, the Text Wizard will automatically modify variable names that don't conform to variable naming rules. Select a variable in the preview window and then enter a variable name. For information on variable naming rules, see Variable Names.

Data format. Select a variable in the preview window and then select a format from the drop-down list. Shift-click to select multiple contiguous variables or Ctrl-click to select multiple noncontiguous variables.

The default format is determined from the data values in the first 250 rows. If more than one format (e.g., numeric, date, string) is encountered in the first 250 rows, the default format is set to string.

Related Topics

To Read Text Data Files
Text Wizard
Text Wizard: Step 1
Text Wizard: Step 2
Text Wizard: Step 3 (Delimited Files)
Text Wizard: Step 3 (Fixed-Width Files)
Text Wizard: Step 4 (Delimited Files)
Text Wizard: Step 4 (Fixed-Width Files)
Text Wizard Formatting Options
Text Wizard: Step 6


Text Wizard Formatting Options

Formatting options for reading variables with the Text Wizard include:

Do not import. Omit the selected variable(s) from the imported data file.

Numeric. Valid values include numbers, a leading plus or minus sign, and a decimal indicator.

String. Valid values include virtually any keyboard characters and embedded blanks. For delimited files, you can specify the number of characters in the value, up to a maximum of 32,767. By default, the Text Wizard sets the number of characters to the longest string value encountered for the selected variable(s) in the first 250 rows of the file. For fixed-width files, the number of characters in string values is defined by the placement of variable break lines in step 4.

Date/Time. Valid values include dates of the general format dd-mm-yyyy, mm/dd/yyyy, dd.mm.yyyy, yyyy/mm/dd, hh:mm:ss, and a variety of other date and time formats. Months can be represented in digits, Roman numerals, or three-letter abbreviations, or they can be fully spelled out. Select a date format from the list.

Dollar. Valid values are numbers with an optional leading dollar sign and optional commas as thousands separators.

Comma. Valid values include numbers that use a period as a decimal indicator and commas as thousands separators.

Dot. Valid values include numbers that use a comma as a decimal indicator and periods as thousands separators.

Note: Values that contain invalid characters for the selected format will be treated as missing. Values that contain any of the specified delimiters will be treated as multiple values.

Related Topics

To Read Text Data Files
Text Wizard
Text Wizard: Step 1
Text Wizard: Step 2
Text Wizard: Step 3 (Delimited Files)
Text Wizard: Step 3 (Fixed-Width Files)
Text Wizard: Step 4 (Delimited Files)
Text Wizard: Step 4 (Fixed-Width Files)
Text Wizard: Step 5
Text Wizard: Step 6


Text Wizard: Step 6

This is the final step of the Text Wizard. You can save your specifications in a file for use when importing similar text data files. You can also paste the syntax generated by the Text Wizard into a syntax window. You can then customize and/or save the syntax for use in other sessions or in production jobs.

Cache data locally. A data cache is a complete copy of the data file, stored in temporary disk space. Caching the data file can improve performance.

Related Topics

To Read Text Data Files
Text Wizard
Text Wizard: Step 1
Text Wizard: Step 2
Text Wizard: Step 3 (Delimited Files)
Text Wizard: Step 3 (Fixed-Width Files)
Text Wizard: Step 4 (Delimited Files)
Text Wizard: Step 4 (Fixed-Width Files)
Text Wizard: Step 5
Text Wizard Formatting Options


Reading PASW Data Collection Data

data files,data files,data files
PASW Data Collection,PASW Data Collection,PASW Data Collection
Quanvert,Quanvert,Quanvert
Quancept,Quancept,Quancept
PASW Data Collection data,PASW Data Collection data,PASW Data Collection data
Quanvert,Quanvert,Quanvert
Quancept,Quancept,Quancept

On Microsoft Windows operating systems, you can read data from PASW Data Collection products. (Note: This feature is only available with PASW Statistics installed on Microsoft Windows operating systems.)

To read PASW Data Collection data sources, you must have the following items installed:

• .NET framework. To obtain the most recent version of the .NET framework, go to http://www.microsoft.com/net.

• PASW Reports for Surveys Components. A version that is compatible with this release can be installed from the installation media. If you are using PASW Statistics Developer, you can download a compatible version from the Downloads tab at www.spss.com/statistics.

You can read PASW Data Collection data sources only in local analysis mode. This feature is not available in distributed analysis mode using PASW Statistics Server.

To read data from a PASW Data Collection data source:

In any open PASW Statistics window, from the menus choose:

File
Open PASW Data Collection Data

On the Connection tab of Data Link Properties, specify the metadata file, the case data type, and the case data file.

Note: Do not change any of the other settings on the Connection tab or any of the settings on the other Data Link Properties tabs.

Click OK.

In the PASW Data Collection Data Import dialog box, select the variables that you want to include and select any case selection criteria.

Click OK to read the data.

Related Topics

Data Link Properties Connection Tab
Select Variables Tab
Case Selection Tab


Data Link Properties Connection Tab

To read a PASW Data Collection data source, you need to specify:

Metadata Location. The metadata document file (.mdd) that contains questionnaire definition information.

Case Data Type. The format of the case data file. Available formats include:

• Quancept Data File (DRS). Case data in a Quancept .drs, .drz, or .dru file.

• Quanvert Database. Case data in a Quanvert database.

• PASW Data Collection Database (MS SQL Server). Case data in a relational database in SQL Server.

• PASW Data Collection XML Data File. Case data in an XML file.

Case Data Location. The file that contains the case data. The format of this file must be consistent with the selected case data type.

Note: The extent to which other settings on the Connection tab or any settings on the other Data Link Properties tabs may or may not affect reading PASW Data Collection data into PASW Statistics is not known, so we recommend that you do not change any of them.

To open the Data Link Properties Connection tab Collapse Hide details

To open the Data Link Properties Connection tab

From the menus in any open PASW Statistics window, choose:

File
Open PASW Data Collection Data

Related Topics

Reading PASW Data Collection Data
Select Variables Tab
Case Selection Tab


Advanced Tab

The extent to which these settings may or may not affect reading PASW Data Collection data into PASW Statistics is not known; so we recommend that you not change any of them.


Select Variables Tab

You can select a subset of variables to read. By default, all standard variables in the data source are displayed and selected.

• Show System variables. Displays any "system" variables, including variables that indicate interview status (in progress, completed, finish date, and so on). You can then select any system variables that you want to include. By default, all system variables are excluded.

• Show Codes variables. Displays any variables that represent codes that are used for open-ended "Other" responses for categorical variables. You can then select any Codes variables that you want to include. By default, all Codes variables are excluded.

• Show SourceFile variables. Displays any variables that contain filenames of images of scanned responses. You can then select any SourceFile variables that you want to include. By default, all SourceFile variables are excluded.

To open the PASW Data Collection Data Import dialog, Select Cases tab: Collapse Hide details

To open the PASW Data Collection Data Import dialog, Select Cases tab:

From the menus in any open PASW Statistics window, choose:

File
Open PASW Data Collection Data

On the Data Link Properties Connection tab, specify the metadata file, the case data type, and the case data file.

Click OK.

Click the Select Variables tab.

Related Topics

Reading PASW Data Collection Data
Data Link Properties Connection Tab
Case Selection Tab


Case Selection Tab

For PASW Data Collection data sources that contain system variables, you can select cases based on a number of system variable criteria. You do not need to include the corresponding system variables in the list of variables to read, but the necessary system variables must exist in the source data to apply the selection criteria. If the necessary system variables do not exist in the source data, the corresponding selection criteria are ignored.

Data collection status. You can select respondent data, test data, or both. You can also select cases based on any combination of the following interview status parameters:

• Completed successfully

• Active/in progress

• Timed out

• Stopped by script

• Stopped by respondent

• Interview system shutdown

• Signal (terminated by a signal statement in the script)

Data collection finish date. You can select cases based on the data collection finish date.

• Start Date. Cases for which data collection finished on or after the specified date are included.

• End Date. Cases for which data collection finished before the specified date are included. This does not include cases for which data collection finished on the end date.

• If you specify both a start date and end date, this defines a range of finish dates from the start date to (but not including) the end date.

To open the PASW Data Collection Data Import dialog, Case Selection tab: Collapse Hide details

To open the PASW Data Collection Data Import dialog, Case Selection tab:

From the menus in any open PASW Statistics window, choose:

File
Open PASW Data Collection Data

On the Data Link Properties Connection tab, specify the metadata file, the case data type, and the case data file.

Click OK.

Click the Case Selection tab.

Related Topics

Reading PASW Data Collection Data
Data Link Properties Connection Tab
Select Variables Tab


File Information

file information,file information,file information
data files,data files,data files
file information,file information,file information
dictionary,dictionary,dictionary
data files,data files,data files
dictionary information,dictionary information,dictionary information
data files,data files,data files

A data file contains much more than raw data. It also contains any variable definition information, including:

• Variable names

• Variable formats

• Descriptive variable and value labels

This information is stored in the dictionary portion of the data file. The Data Editor provides one way to view the variable definition information. You can also display complete dictionary information for the active dataset or any other data file.

To Display Data File Information

From the menus in the Data Editor window choose:

File
Display Data File Information

For the currently open data file, choose Working File.

For other data files, choose External File, and then select the data file.

The data file information is displayed in the Viewer.

Related Topics

SYSFILE INFO


Saving Data Files

In addition to saving data files in PASW Statistics format, you can save data in a wide variety of external formats, including:

• Excel and other spreadsheet formats

• Tab-delimited and CSV text files

• SAS

• Stata

• Database tables

Related Topics

To Save Modified Data Files
Saving File Options


To Save Modified Data Files

data files,data files,data files
saving,saving,saving
saving files,saving files,saving files
PASW Statistics data files,PASW Statistics data files,PASW Statistics data files
data files,data files,data files
saving files,saving files,saving files
Unicode,Unicode,Unicode

Make the Data Editor the active window (click anywhere in the window to make it active).

From the menus choose:

File
Save

The modified data file is saved, overwriting the previous version of the file.

Note: A data file saved in Unicode mode cannot be read by versions of PASW Statistics prior to 16.0. To save a Unicode data file in a format that can be read by earlier releases, open the file in code page mode and re-save it. The file will be saved in the encoding based on the current locale. Some data loss may occur if the file contains characters not recognized by the current locale. For information on switching between Unicode mode and code page mode, see General Options.

Related Topics

Saving Data Files
Saving File Options


Saving Data Files in External Formats

data files,data files,data files
saving,saving,saving
saving files,saving files,saving files
data files,data files,data files
data files,data files,data files
saving files,saving files,saving files
Excel files,Excel files,Excel files
saving,saving,saving
Lotus 1-2-3 files,Lotus 1-2-3 files,Lotus 1-2-3 files
saving,saving,saving
SAS files,SAS files,SAS files
saving,saving,saving
Stata files,Stata files,Stata files
saving,saving,saving
Excel files,Excel files,Excel files
saving,saving,saving
saving value labels instead of values,saving value labels instead of values,saving value labels instead of values
value labels,value labels,value labels
saving in Excel files,saving in Excel files,saving in Excel files
Lotus 1-2-3 files,Lotus 1-2-3 files,Lotus 1-2-3 files
dBASE files,dBASE files,dBASE files
saving,saving,saving
tab-delimited files,tab-delimited files,tab-delimited files
saving,saving,saving
dBASE files,dBASE files,dBASE files
tab-delimited files,tab-delimited files,tab-delimited files
export data,export data,export data

Make the Data Editor the active window (click anywhere in the window to make it active).

From the menus choose:

File
Save As...

Select a file type from the drop-down list.

Enter a filename for the new data file.

To write variable names to the first row of a spreadsheet or tab-delimited data file:

Click Write variable names to spreadsheet in the Save Data As dialog box.

To save value labels instead of data values in Excel files:

Click Save value labels where defined instead of data values in the Save Data As dialog box.

To save value labels to a SAS syntax file (active only when a SAS file type is selected):

Click Save value labels into a .sas file in the Save Data As dialog box.

For information on exporting data to database tables, see Exporting to a Database.

For information on exporting data for use in PASW Data Collection applications, see Exporting to PASW Data Collection.

Related Topics

Saving Data: Data File Types
Saving File Options
Saving Data Files in Excel Format
Saving Data Files in SAS Format
Saving Data Files in Stata Format
Saving Subsets of Variables
Saving Subsets of Variables


Saving Data: Data File Types

data files,data files,data files
saving,saving,saving
saving files,saving files,saving files
data files,data files,data files
data files,data files,data files
saving files,saving files,saving files
Excel files,Excel files,Excel files
saving,saving,saving
Lotus 1-2-3 files,Lotus 1-2-3 files,Lotus 1-2-3 files
saving,saving,saving
Excel files,Excel files,Excel files
Lotus 1-2-3 files,Lotus 1-2-3 files,Lotus 1-2-3 files
dBASE files,dBASE files,dBASE files
saving,saving,saving
tab-delimited files,tab-delimited files,tab-delimited files
saving,saving,saving
dBASE files,dBASE files,dBASE files
tab-delimited files,tab-delimited files,tab-delimited files
portable files,portable files,portable files
variable names,variable names,variable names
variable names,variable names,variable names
portable files,portable files,portable files
variable names,variable names,variable names
truncating long variable names in earlier releases,truncating long variable names in earlier releases,truncating long variable names in earlier releases
string variables,string variables,string variables
breaking up long strings in earlier releases,breaking up long strings in earlier releases,breaking up long strings in earlier releases
CSV format,CSV format,CSV format
saving data,saving data,saving data

You can save data in the following formats:

PASW Statistics (*.sav). PASW Statistics format.

• Data files saved in PASW Statistics format cannot be read by versions of the software prior to version 7.5. Data files saved in Unicode mode cannot be read by releases of PASW Statistics prior to version 16.0 See the topic General Options for more information.

• When using data files with variable names longer than eight bytes in version 10.x or 11.x, unique, eight-byte versions of variable names are used—but the original variable names are preserved for use in release 12.0 or later. In releases prior to 10.0, the original long variable names are lost if you save the data file.

• When using data files with string variables longer than 255 bytes in versions prior to release 13.0, those string variables are broken up into multiple 255-byte string variables.

Version 7.0 (*.sav). Version 7.0 format. Data files saved in version 7.0 format can be read by version 7.0 and earlier versions but do not include defined multiple response sets or Data Entry for Windows information.

SPSS/PC+ (*.sys). SPSS/PC+ format. If the data file contains more than 500 variables, only the first 500 will be saved. For variables with more than one defined user-missing value, additional user-missing values will be recoded into the first defined user-missing value. This format is available only on Windows operating systems.

PASW Statistics Portable (*.por). Portable format that can be read by other versions of PASW Statistics and versions on other operating systems. Variable names are limited to eight bytes and are automatically converted to unique eight-byte names if necessary. In most cases, saving data in portable format is no longer necessary, since PASW Statistics data files should be platform/operating system independent. You cannot save data files in portable file in Unicode mode. See the topic General Options for more information.

Tab-delimited (*.dat). Text files with values separated by tabs. (Note: Tab characters embedded in string values are preserved as tab characters in the tab-delimited file. No distinction is made between tab characters embedded in values and tab characters that separate values.)

Comma-delimited (*.csv). Text files with values separated by commas or semicolons. If the current PASW Statistics decimal indicator is a period, values are separated by commas. If the current decimal indicator is a comma, values are separated by semicolons.

Fixed ASCII (*.dat). Text file in fixed format, using the default write formats for all variables. There are no tabs or spaces between variable fields.

Excel 2007 (*.xlsx). Microsoft Excel 2007 XLSX-format workbook. The maximum number of variables is 16,000; any additional variables beyond the first 16,000 are dropped. If the dataset contains more than one million cases, multiple sheets are created in the workbook.

Excel 97 through 2003 (*.xls). Microsoft Excel 97 workbook. The maximum number of variables is 256; any additional variables beyond the first 256 are dropped. If the dataset contains more than 65,356 cases, multiple sheets are created in the workbook.

Excel 2.1 (*.xls). Microsoft Excel 2.1 spreadsheet file. The maximum number of variables is 256, and the maximum number of rows is 16,384.

1-2-3 Release 3.0 (*.wk3). Lotus 1-2-3 spreadsheet file, release 3.0. The maximum number of variables that you can save is 256.

1-2-3 Release 2.0 (*.wk1). Lotus 1-2-3 spreadsheet file, release 2.0. The maximum number of variables that you can save is 256.

1-2-3 Release 1.0 (*.wks). Lotus 1-2-3 spreadsheet file, release 1A. The maximum number of variables that you can save is 256.

SYLK (*.slk). Symbolic link format for Microsoft Excel and Multiplan spreadsheet files. The maximum number of variables that you can save is 256.

dBASE IV (*.dbf). dBASE IV format.

dBASE III (*.dbf). dBASE III format.

dBASE II (*.dbf). dBASE II format.

SAS v9+ Windows (*.sas7bdat). SAS versions 9 for Windows.

SAS v9+ UNIX (*.sas7bdat). SAS versions 9 for UNIX.

SAS v7-8 Windows short extension (*.sd7). SAS versions 7–8 for Windows short filename format.

SAS v7-8 Windows long extension (*.sas7bdat). SAS versions 7–8 for Windows long filename format.

SAS v7-8 for UNIX (*.sas7bdat). SAS v8 for UNIX.

SAS v6 for Windows (*.sd2). SAS v6 file format for Windows/OS2.

SAS v6 for UNIX (*.ssd01). SAS v6 file format for UNIX (Sun, HP, IBM).

SAS v6 for Alpha/OSF (*.ssd04). SAS v6 file format for Alpha/OSF (DEC UNIX).

SAS Transport (*.xpt). SAS transport file.

Stata Version 8 Intercooled (*.dta).

Stata Version 8 SE (*.dta).

Stata Version 7 Intercooled (*.dta).

Stata Version 7 SE (*.dta).

Stata Version 6 (*.dta).

Stata Versions 4–5 (*.dta).

Related Topics

Saving Data Files in External Formats
Saving File Options
Saving Data Files in Excel Format
Saving Data Files in SAS Format
Saving Data Files in Stata Format
Saving Subsets of Variables
Saving Subsets of Variables


Saving File Options

spreadsheet files,spreadsheet files,spreadsheet files
writing variable names,writing variable names,writing variable names
spreadsheet files,spreadsheet files,spreadsheet files
tab-delimited files,tab-delimited files,tab-delimited files
writing variable names,writing variable names,writing variable names
tab-delimited files,tab-delimited files,tab-delimited files

For spreadsheet, tab-delimited files, and comma-delimited files, you can write variable names to the first row of the file.

Related Topics

Saving Data Files in External Formats
Saving Data: Data File Types
Saving Data Files in Excel Format
Saving Data Files in SAS Format
Saving Data Files in Stata Format
Saving Subsets of Variables
Saving Subsets of Variables
To Save Modified Data Files


Saving Data Files in Excel Format

You can save your data in one of three Microsoft Excel file formats. Excel 2.1, Excel 97, and Excel 2007.

• Excel 2.1 and Excel 97 are limited to 256 columns; so only the first 256 variables are included.

• Excel 2007 is limited to 16,000 columns; so only the first 16,000 variables are included.

• Excel 2.1 is limited to 16,384 rows; so only the first 16,384 cases are included.

• Excel 97 and Excel 2007 also have limits on the number of rows per sheet, but workbooks can have multiple sheets, and multiple sheets are created if the single-sheet maximum is exceeded.

Variable Types

The following table shows the variable type matching between the original data in PASW Statistics and the exported data in Excel.

PASW Statistics Variable Type | Excel Data Format
Numeric | 0.00; #,##0.00; ...
Comma | 0.00; #,##0.00; ...
Dollar | $#,##0_); ...
Date | d-mmm-yyyy
Time | hh:mm:ss
String | General

Related Topics

Saving Data Files in External Formats
Saving Data: Data File Types
Saving File Options
Saving Data Files in SAS Format
Saving Data Files in Stata Format
Saving Subsets of Variables
Saving Subsets of Variables


Saving Data Files in SAS Format

Special handling is given to various aspects of your data when saved as a SAS file. These cases include:

• Certain characters that are allowed in PASW Statistics variable names are not valid in SAS, such as @, #, and $. These illegal characters are replaced with an underscore when the data are exported.

• PASW Statistics variable names that contain multibyte characters (for example, Japanese or Chinese characters) are converted to variables names of the general form Vnnn, where nnn is an integer value.

• PASW Statistics variable labels containing more than 40 characters are truncated when exported to a SAS v6 file.

• Where they exist, PASW Statistics variable labels are mapped to the SAS variable labels. If no variable label exists in the PASW Statistics data, the variable name is mapped to the SAS variable label.

• SAS allows only one value for system-missing, whereas PASW Statistics allows numerous user-missing values in addition to system-missing. As a result, all user-missing values in PASW Statistics are mapped to a single system-missing value in the SAS file.

• SAS 6-8 data files are saved in the current PASW Statistics locale encoding, regardless of current mode (Unicode or code page). In Unicode mode, SAS 9 files are saved in UTF-8 format. In code page mode, SAS 9 files are saved in the current locale encoding.

• A maximum of 32,767 variables can be saved to SAS 6-8.

Save Value Labels

You have the option of saving the values and value labels associated with your data file to a SAS syntax file. This syntax file contains proc format and proc datasets commands that can be run in SAS to create a SAS format catalog file.

This feature is not supported for the SAS transport file.

Variable Types

The following table shows the variable type matching between the original data in PASW Statistics and the exported data in SAS.

PASW Statistics Variable Type | SAS Variable Type | SAS Data Format
Numeric | Numeric | 12
Comma | Numeric | 12
Dot | Numeric | 12
Scientific Notation | Numeric | 12
Date | Numeric | (Date) for example, MMDDYY10, ...
Date (Time) | Numeric | Time18
Dollar | Numeric | 12
Custom Currency | Numeric | 12
String | Character | $8

Related Topics

Saving Data Files in External Formats
Saving Data: Data File Types
Saving File Options
Saving Data Files in Excel Format
Saving Data Files in Stata Format
Saving Subsets of Variables
Saving Subsets of Variables


Saving Data Files in Stata Format

• Data can be written in Stata 5–8 format and in both Intercooled and SE format (versions 7 and 8 only).

• Data files that are saved in Stata 5 format can be read by Stata 4.

• The first 80 bytes of variable labels are saved as Stata variable labels.

• For numeric variables, the first 80 bytes of value labels are saved as Stata value labels. Value labels are dropped for string variables, non-integer numeric values, and numeric values greater than an absolute value of 2,147,483,647.

• For versions 7 and 8, the first 32 bytes of variable names in case-sensitive form are saved as Stata variable names. For earlier versions, the first eight bytes of variable names are saved as Stata variable names. Any characters other than letters, numbers, and underscores are converted to underscores.

• PASW Statistics variable names that contain multibyte characters (for example, Japanese or Chinese characters) are converted to variable names of the general form Vnnn, where nnn is an integer value.

• For versions 5–6 and Intercooled versions 7–8, the first 80 bytes of string values are saved. For Stata SE 7–8, the first 244 bytes of string values are saved.

• For versions 5–6 and Intercooled versions 7–8, only the first 2,047 variables are saved. For Stata SE 7–8, only the first 32,767 variables are saved.

PASW Statistics Variable Type | Stata Variable Type | Stata Data Format
Numeric | Numeric | g
Comma | Numeric | g
Dot | Numeric | g
Scientific Notation | Numeric | g
Date*, Datetime | Numeric | D_m_Y
Time, DTime | Numeric | g (number of seconds)
Wkday | Numeric | g (1–7)
Month | Numeric | g (1–12)
Dollar | Numeric | g
Custom Currency | Numeric | g
String | String | s

*Date, Adate, Edate, SDate, Jdate, Qyr, Moyr, Wkyr

Related Topics

Saving Data Files in External Formats
Saving Data: Data File Types
Saving File Options
Saving Data Files in Excel Format
Saving Data Files in SAS Format
Saving Subsets of Variables
Saving Subsets of Variables


Saving Subsets of Variables

data files,data files,data files
saving subsets of variables,saving subsets of variables,saving subsets of variables
data files,data files,data files

The Save Data As Variables dialog box allows you to select the variables that you want saved in the new data file. By default, all variables will be saved. Deselect the variables that you don't want to save, or click Drop All and then select the variables that you want to save.

Visible Only. Selects only variables in variable sets currently in use. See the topic Using Variable Sets to Show and Hide Variables for more information.

To Save a Subset of Variables Collapse Hide details

To Save a Subset of Variables

Make the Data Editor the active window (click anywhere in the window to make it active).

From the menus choose:

File
Save As...

Click Variables.

Select the variables that you want to save.

Related Topics

Saving Data Files in External Formats
Saving Data: Data File Types
Saving File Options
Saving Data Files in Excel Format
Saving Data Files in SAS Format
Saving Data Files in Stata Format


Exporting to a Database

databases,databases,databases
saving,saving,saving
updating,updating,updating

You can use the Export to Database Wizard to:

• Replace values in existing database table fields (columns) or add new fields to a table.

• Append new records (rows) to a database table.

• Completely replace a database table or create a new table.

To export data to a database:

From the menus in the Data Editor window for the dataset that contains the data you want to export, choose:

File
Export to Database

Select the database source.

Follow the instructions in the export wizard to export the data.

Creating Database Fields from PASW Statistics Variables

When creating new fields (adding fields to an existing database table, creating a new table, replacing a table), you can specify field names, data type, and width (where applicable).

Field name. The default field names are the same as the PASW Statistics variable names. You can change the field names to any names allowed by the database format. For example, many databases allow characters in field names that aren't allowed in variable names, including spaces. Therefore, a variable name like CallWaiting could be changed to the field name Call Waiting.

Type. The export wizard makes initial data type assignments based on the standard ODBC data types or data types allowed by the selected database format that most closely matches the defined PASW Statistics data format--but databases can make type distinctions that have no direct equivalent in PASW Statistics, and vice versa. For example, most numeric values in PASW Statistics are stored as double-precision floating-point values, whereas database numeric data types include float (double), integer, real, and so on. In addition, many databases don't have equivalents to PASW Statistics time formats. You can change the data type to any type available in the drop-down list.

As a general rule, the basic data type (string or numeric) for the variable should match the basic data type of the database field. If there is a data type mismatch that cannot be resolved by the database, an error results and no data are exported to the database. For example, if you export a string variable to a database field with a numeric data type, an error will result if any values of the string variable contain non-numeric characters.

Width. You can change the defined width for string (char, varchar) field types. Numeric field widths are defined by the data type.

By default, PASW Statistics variable formats are mapped to database field types based on the following general scheme. Actual database field types may vary, depending on the database.

PASW Statistics Variable Format | Database Field Type
Numeric | Float or Double
Comma | Float or Double
Dot | Float or Double
Scientific Notation | Float or Double
Date | Date or Datetime or Timestamp
Datetime | Datetime or Timestamp
Time, DTime | Float or Double (number of seconds)
Wkday | Integer (1–7)
Month | Integer (1–12)
Dollar | Float or Double
Custom Currency | Float or Double
String | Char or Varchar

User-Missing Values

There are two options for the treatment of user-missing values when data from variables are exported to database fields:

• Export as valid values. User-missing values are treated as regular, valid, nonmissing values.

• Export numeric user-missing as nulls and export string user-missing values as blank spaces. Numeric user-missing values are treated the same as system-missing values. String user-missing values are converted to blank spaces (strings cannot be system-missing).

Related Topics

Selecting a Data Source
Choosing How to Export the Data
Selecting a Table
Selecting Cases to Export
Matching Cases to Records
Replacing Values in Existing Fields
Adding New Fields
Appending New Records (Cases)
Creating a New Table or Replacing a Table
Completing the Database Export Wizard


Selecting a Data Source

In the first panel of the Export to Database Wizard, you select the data source to which you want to export data.

You can export data to any database source for which you have the appropriate ODBC driver. (Note: Exporting data to OLE DB data sources is not supported.)

If you do not have any ODBC data sources configured, or if you want to add a new data source, click Add ODBC Data Source.

• On Linux operating systems, this button is not available. ODBC data sources are specified in odbc.ini, and the ODBCINI environment variables must be set to the location of that file. For more information, see the documentation for your database drivers.

• In distributed analysis mode (available with PASW Statistics Server), this button is not available. To add data sources in distributed analysis mode, see your system administrator.

An ODBC data source consists of two essential pieces of information: the driver that will be used to access the data and the location of the database you want to access. To specify data sources, you must have the appropriate drivers installed. Drivers for a variety of database formats are available at http://www.spss.com/drivers.

Some data sources may require a login ID and password before you can proceed to the next step.

Related Topics

Exporting to a Database
Choosing How to Export the Data
Selecting a Table
Selecting Cases to Export
Matching Cases to Records
Replacing Values in Existing Fields
Adding New Fields
Appending New Records (Cases)
Creating a New Table or Replacing a Table
Completing the Database Export Wizard


Choosing How to Export the Data

After you select the data source, you indicate the manner in which you want to export the data.

The following choices are available for exporting data to a database:

• Replace values in existing fields. Replaces values of selected fields in an existing table with values from the selected variables in the active dataset. See the topic Replacing Values in Existing Fields for more information.

• Add new fields to an existing table. Creates new fields in an existing table that contain the values of selected variables in the active dataset. See the topic Adding New Fields for more information. This option is not available for Excel files.

• Append new records to an existing table. Adds new records (rows) to an existing table containing the values from cases in the active dataset. See the topic Appending New Records (Cases) for more information.

• Drop an existing table and create a new table of the same name. Deletes the specified table and creates a new table of the same name that contains selected variables from the active dataset. All information from the original table, including definitions of field properties (for example, primary keys, data types) is lost. See the topic Creating a New Table or Replacing a Table for more information.

• Create a new table. Creates a new table in the database containing data from selected variables in the active dataset. The name can be any value that is allowed as a table name by the data source. The name cannot duplicate the name of an existing table or view in the database. See the topic Creating a New Table or Replacing a Table for more information.

Related Topics

Exporting to a Database
Selecting a Data Source
Selecting a Table
Selecting Cases to Export
Matching Cases to Records
Replacing Values in Existing Fields
Adding New Fields
Appending New Records (Cases)
Creating a New Table or Replacing a Table
Completing the Database Export Wizard


Selecting a Table

When modifying or replacing a table in the database, you need to select the table to modify or replace. This panel in the Export to Database Wizard displays a list of tables and views in the selected database.

By default, the list displays only standard database tables. You can control the type of items that are displayed in the list:

• Tables. Standard database tables.

• Views. Views are virtual or dynamic "tables" defined by queries. These can include joins of multiple tables and/or fields derived from calculations based on the values of other fields. You can append records or replace values of existing fields in views, but the fields that you can modify may be restricted, depending on how the view is structured. For example, you cannot modify a derived field, add fields to a view, or replace a view.

• Synonyms. A synonym is an alias for a table or view, typically defined in a query.

• System tables. System tables define database properties. In some cases, standard database tables may be classified as system tables and will be displayed only if you select this option. Access to real system tables is often restricted to database administrators.

Related Topics

Exporting to a Database
Selecting a Data Source
Choosing How to Export the Data
Selecting Cases to Export
Matching Cases to Records
Replacing Values in Existing Fields
Adding New Fields
Appending New Records (Cases)
Creating a New Table or Replacing a Table
Completing the Database Export Wizard


Selecting Cases to Export

Case selection in the Export to Database Wizard is limited either to all cases or to cases selected using a previously defined filter condition. If no case filtering is in effect, this panel will not appear, and all cases in the active dataset will be exported.

For information on defining a filter condition for case selection, see Select Cases.

Related Topics

Exporting to a Database
Selecting a Data Source
Choosing How to Export the Data
Selecting a Table
Matching Cases to Records
Replacing Values in Existing Fields
Adding New Fields
Appending New Records (Cases)
Creating a New Table or Replacing a Table
Completing the Database Export Wizard


Matching Cases to Records

When adding fields (columns) to an existing table or replacing the values of existing fields, you need to make sure that each case (row) in the active dataset is correctly matched to the corresponding record in the database.

• In the database, the field or set of fields that uniquely identifies each record is often designated as the primary key.

• You need to identify which variable(s) correspond to the primary key field(s) or other fields that uniquely identify each record.

• The fields don't have to be the primary key in the database, but the field value or combination of field values must be unique for each case.

To match variables with fields in the database that uniquely identify each record:

Drag and drop the variable(s) onto the corresponding database fields.

or

Select a variable from the list of variables, select the corresponding field in the database table, and click Connect.

To delete a connection line:

Select the connection line and press the Delete key.

Note: The variable names and database field names may not be identical (since database field names may contain characters not allowed in PASW Statistics variable names), but if the active dataset was created from the database table you are modifying, either the variable names or the variable labels will usually be at least similar to the database field names.

Related Topics

Exporting to a Database
Selecting a Data Source
Choosing How to Export the Data
Selecting a Table
Selecting Cases to Export
Replacing Values in Existing Fields
Adding New Fields
Appending New Records (Cases)
Creating a New Table or Replacing a Table
Completing the Database Export Wizard


Replacing Values in Existing Fields

databases,databases,databases
replacing values in existing fields,replacing values in existing fields,replacing values in existing fields

To replace values of existing fields in a database:

From the menus in the Data Editor window for the dataset that you want to use to replace field values in the database table, choose:

File
Export to Database

Select the database source. See the topic Selecting a Data Source for more information.

In the Choose how to export the data panel of the Export to Database Wizard, select Replace values in existing fields.

In the Select a table or view panel, select the database table. See the topic Selecting a Table for more information.

In the Match cases to records panel, match the variables that uniquely identify each case to the corresponding database field names. See the topic Matching Cases to Records for more information.

For each field for which you want to replace values, drag and drop the variable that contains the new values into the Source of values column, next to the corresponding database field name.

• As a general rule, the basic data type (string or numeric) for the variable should match the basic data type of the database field. If there is a data type mismatch that cannot be resolved by the database, an error results and no data is exported to the database. For example, if you export a string variable to a database field with a numeric data type (for example, double, real, integer), an error will result if any values of the string variable contain non-numeric characters. The letter a in the icon next to a variable denotes a string variable.

• You cannot modify the field name, type, or width. The original database field attributes are preserved; only the values are replaced.

User-Missing Values

There are two options for the treatment of user-missing values when data from variables are exported to database fields:

• Export as valid values. User-missing values are treated as regular, valid, nonmissing values.

• Export numeric user-missing as nulls and export string user-missing values as blank spaces. Numeric user-missing values are treated the same as system-missing values. String user-missing values are converted to blank spaces (strings cannot be system-missing).

Related Topics

Exporting to a Database
Selecting a Data Source
Choosing How to Export the Data
Selecting a Table
Selecting Cases to Export
Matching Cases to Records
Adding New Fields
Appending New Records (Cases)
Creating a New Table or Replacing a Table
Completing the Database Export Wizard


Adding New Fields

databases,databases,databases
adding new fields to a table,adding new fields to a table,adding new fields to a table

To add new fields to an existing database table:

From the menus in the Data Editor window for the dataset that you want to use to add fields to the database table, choose:

File
Export to Database

Select the database source. See the topic Selecting a Data Source for more information.

In the Choose how to export the data panel of the Export to Database Wizard, select Add new fields to an existing table.

In the Select a table or view panel, select the database table. See the topic Selecting a Table for more information.

In the Match cases to records panel, match the variables that uniquely identify each case to the corresponding database field names. See the topic Matching Cases to Records for more information.

Drag and drop the variables that you want to add as new fields to the Source of values column.

For information on field names and data types, see the section on creating database fields from PASW Statistics variables in Exporting to a Database.

Field name. The default field names are the same as the PASW Statistics variable names. You can change the field names to any names allowed by the database format. For example, many databases allow characters in field names that aren't allowed in variable names, including spaces. Therefore, a variable name like CallWaiting could be changed to the field name Call Waiting.

Type. The export wizard makes initial data type assignments based on the standard ODBC data types or data types allowed by the selected database format that most closely matches the defined PASW Statistics data format--but databases can make type distinctions that have no direct equivalent in PASW Statistics, and vice versa. For example, most numeric values in PASW Statistics are stored as double-precision floating-point values, whereas database numeric data types include float (double), integer, real, and so on. In addition, many databases don't have equivalents to PASW Statistics time formats. You can change the data type to any type available in the drop-down list.

As a general rule, the basic data type (string or numeric) for the variable should match the basic data type of the database field. If there is a data type mismatch that cannot be resolved by the database, an error results and no data are exported to the database. For example, if you export a string variable to a database field with a numeric data type, an error will result if any values of the string variable contain non-numeric characters.

Width. You can change the defined width for string (char, varchar) field types. Numeric field widths are defined by the data type.

Show existing fields. Select this option to display a list of existing fields. You cannot use this panel in the Export to Database Wizard to replace existing fields, but it may be helpful to know what fields are already present in the table. If you want to replace the values of existing fields, see Replacing Values in Existing Fields.

User-Missing Values

There are two options for the treatment of user-missing values when data from variables are exported to database fields:

• Export as valid values. User-missing values are treated as regular, valid, nonmissing values.

• Export numeric user-missing as nulls and export string user-missing values as blank spaces. Numeric user-missing values are treated the same as system-missing values. String user-missing values are converted to blank spaces (strings cannot be system-missing).

Related Topics

Exporting to a Database
Selecting a Data Source
Choosing How to Export the Data
Selecting a Table
Selecting Cases to Export
Matching Cases to Records
Replacing Values in Existing Fields
Appending New Records (Cases)
Creating a New Table or Replacing a Table
Completing the Database Export Wizard


Appending New Records (Cases)

databases,databases,databases
appending records (cases) to a table,appending records (cases) to a table,appending records (cases) to a table

To append new records (cases) to a database table:

From the menus in the Data Editor window for the dataset that you want to use to add cases to the database table, choose:

File
Export to Database

Select the database source. See the topic Selecting a Data Source for more information.

In the Choose how to export the data panel of the Export to Database Wizard, select Append new records to an existing table.

In the Select a table or view panel, select the database table. See the topic Selecting a Table for more information.

Match variables in the active dataset to table fields by dragging and dropping variables to the Source of values column.

The Export to Database Wizard will automatically select all variables that match existing fields, based on information about the original database table stored in the active dataset (if available) and/or variable names that are the same as field names. This initial automatic matching is intended only as a guide and does not prevent you from changing the way in which variables are matched with database fields.

When adding new records to an existing table, the following basic rules/limitations apply:

• All cases (or all selected cases) in the active dataset are added to the table. If any of these cases duplicate existing records in the database, an error may result if a duplicate key value is encountered. For information on exporting only selected cases, see Selecting Cases to Export.

• You can use the values of new variables created in the session as the values for existing fields, but you cannot add new fields or change the names of existing fields. To add new fields to a database table, see Adding New Fields.

• Any excluded database fields or fields not matched to a variable will have no values for the added records in the database table. (If the Source of values cell is empty, there is no variable matched to the field.)

User-Missing Values

There are two options for the treatment of user-missing values when data from variables are exported to database fields:

• Export as valid values. User-missing values are treated as regular, valid, nonmissing values.

• Export numeric user-missing as nulls and export string user-missing values as blank spaces. Numeric user-missing values are treated the same as system-missing values. String user-missing values are converted to blank spaces (strings cannot be system-missing).

Related Topics

Exporting to a Database
Selecting a Data Source
Choosing How to Export the Data
Selecting a Table
Selecting Cases to Export
Matching Cases to Records
Replacing Values in Existing Fields
Adding New Fields
Creating a New Table or Replacing a Table
Completing the Database Export Wizard


Creating a New Table or Replacing a Table

databases,databases,databases
creating a new table,creating a new table,creating a new table
replacing a table,replacing a table,replacing a table

To create a new database table or replace an existing database table:

From the menus in the Data Editor window for the dataset that you want to use to create the database table, choose:

File
Export to Database

Select the database source. See the topic Selecting a Data Source for more information.

In the Choose how to export the data panel of the export wizard, select Drop an existing table and create a new table of the same name or select Create a new table and enter a name for the new table.

If you are replacing an existing table, in the Select a table or view panel, select the database table. See the topic Selecting a Table for more information.

Drag and drop variables into the Variables to save column.

Optionally, you can designate variables/fields that define the primary key, change field names, and change the data type.

Primary key. To designate variables as the primary key in the database table, select the box in the column identified with the key icon.

• All values of the primary key must be unique or an error will result.

• If you select a single variable as the primary key, every record (case) must have a unique value for that variable.

• If you select multiple variables as the primary key, this defines a composite primary key, and the combination of values for the selected variables must be unique for each case.

Field name. The default field names are the same as the PASW Statistics variable names. You can change the field names to any names allowed by the database format. For example, many databases allow characters in field names that aren't allowed in variable names, including spaces. Therefore, a variable name like CallWaiting could be changed to the field name Call Waiting.

Type. The export wizard makes initial data type assignments based on the standard ODBC data types or data types allowed by the selected database format that most closely matches the defined PASW Statistics data format--but databases can make type distinctions that have no direct equivalent in PASW Statistics, and vice versa. For example, most numeric values in PASW Statistics are stored as double-precision floating-point values, whereas database numeric data types include float (double), integer, real, and so on. In addition, many databases don't have equivalents to PASW Statistics time formats. You can change the data type to any type available in the drop-down list.

As a general rule, the basic data type (string or numeric) for the variable should match the basic data type of the database field. If there is a data type mismatch that cannot be resolved by the database, an error results and no data are exported to the database. For example, if you export a string variable to a database field with a numeric data type, an error will result if any values of the string variable contain non-numeric characters.

Width. You can change the defined width for string (char, varchar) field types. Numeric field widths are defined by the data type.

User-Missing Values

There are two options for the treatment of user-missing values when data from variables are exported to database fields:

• Export as valid values. User-missing values are treated as regular, valid, nonmissing values.

• Export numeric user-missing as nulls and export string user-missing values as blank spaces. Numeric user-missing values are treated the same as system-missing values. String user-missing values are converted to blank spaces (strings cannot be system-missing).

Related Topics

Exporting to a Database
Selecting a Data Source
Choosing How to Export the Data
Selecting a Table
Selecting Cases to Export
Matching Cases to Records
Replacing Values in Existing Fields
Adding New Fields
Appending New Records (Cases)
Completing the Database Export Wizard


Completing the Database Export Wizard

The last panel of the Export to Database Wizard provides a summary that indicates what data will be exported and how it will be exported. It also gives you the option of either exporting the data or pasting the underlying command syntax to a syntax window.

Summary Information

• Dataset. The PASW Statistics session name for the dataset that will be used to export data. This information is primarily useful if you have multiple open data sources. Data sources opened using the graphical user interface (for example, the Database Wizard) are automatically assigned names such as DataSet1, DataSet2, etc. A data source opened using command syntax will have a dataset name only if one is explicitly assigned.

• Table. The name of the table to be modified or created.

• Cases to Export. Either all cases are exported or cases selected by a previously defined filter condition are exported. See the topic Selecting Cases to Export for more information.

• Action. Indicates how the database will be modified (for example, create a new table, add fields or records to an existing table).

• User-Missing Values. User-missing values can be exported as valid values or treated the same as system-missing for numeric variables and converted to blank spaces for string variables. This setting is controlled in the panel in which you select the variables to export.

Related Topics

Exporting to a Database
Selecting a Data Source
Choosing How to Export the Data
Selecting a Table
Selecting Cases to Export
Matching Cases to Records
Replacing Values in Existing Fields
Adding New Fields
Appending New Records (Cases)
Creating a New Table or Replacing a Table


Exporting to PASW Data Collection

PASW Data Collection data,PASW Data Collection data,PASW Data Collection data
saving,saving,saving

The Export to PASW Data Collection dialog box creates PASW Statistics data files and PASW Data Collection metadata files that you can use to read the data into PASW Data Collection applications. This is particularly useful when "roundtripping" data between PASW Statistics and PASW Data Collection applications.

To export data for use in PASW Data Collection applications:

From the menus in the Data Editor window that contains the data you want to export, choose:

File
Export to PASW Data Collection

Click Data File to specify the name and location of the PASW Statistics data file.

Click Metadata File to specify the name and location of the PASW Data Collection metadata file.

For new variables and datasets not created from PASW Data Collection data sources, PASW Statistics variable attributes are mapped to PASW Data Collection metadata attributes in the metadata file according to the methods described in the SAV DSC documentation in the Data Collection Developer Library.

If the active dataset was created from a PASW Data Collection data source:

• The new metadata file is created by merging the original metadata attributes with metadata attributes for any new variables, plus any changes to original variables that might affect their metadata attributes (for example, addition of, or changes to, value labels).

• For original variables read from the PASW Data Collection data source, any metadata attributes not recognized by PASW Statistics are preserved in their original state. For example, PASW Statistics converts grid variables to regular PASW Statistics variables, but the metadata that defines these grid variables is preserved when you save the new metadata file.

• If any PASW Data Collection variables were automatically renamed to conform to PASW Statistics variable naming rules, the metadata file maps the converted names back to the original PASW Data Collection variable names.

The presence or absence of value labels can affect the metadata attributes of variables and consequently the way those variables are read by PASW Data Collection applications. If value labels have been defined for any nonmissing values of a variable, they should be defined for all nonmissing values of that variable; otherwise, the unlabeled values will be dropped when the data file is read by PASW Data Collection.


Protecting Original Data

data files,data files,data files
protecting,protecting,protecting

To prevent the accidental modification or deletion of your original data, you can mark the file as read-only.

From the Data Editor menus choose:

File
Mark File Read Only

If you make subsequent modifications to the data and then try to save the data file, you can save the data only with a different filename, so the original data are not affected.

You can change the file permissions back to read-write by choosing Mark File Read Write from the File menu.


Virtual Active File

virtual active file,virtual active file,virtual active file
active file,active file,active file
virtual active file,virtual active file,virtual active file
temporary disk space,temporary disk space,temporary disk space
disk space,disk space,disk space
temporary,temporary,temporary
disk space,disk space,disk space
active file,active file,active file
GET DATA,GET DATA,GET DATA
versus GET CAPTURE command,versus GET CAPTURE command,versus GET CAPTURE command
GET DATA,GET DATA,GET DATA
versus DATA LIST command,versus DATA LIST command,versus DATA LIST command
GET DATA,GET DATA,GET DATA
DATA LIST,DATA LIST,DATA LIST
versus GET DATA command,versus GET DATA command,versus GET DATA command
DATA LIST,DATA LIST,DATA LIST

The virtual active file enables you to work with large data files without requiring equally large (or larger) amounts of temporary disk space. For most analysis and charting procedures, the original data source is reread each time you run a different procedure. Procedures that modify the data require a certain amount of temporary disk space to keep track of the changes, and some actions always require enough disk space for at least one entire copy of the data file.

Actions that don't require any temporary disk space include:

• Reading PASW Statistics data files

• Merging two or more PASW Statistics data files

• Reading database tables with the Database Wizard

• Merging PASW Statistics data files with database tables

• Running procedures that read data (for example, Frequencies, Crosstabs, Explore)

Actions that create one or more columns of data in temporary disk space include:

• Computing new variables

• Recoding existing variables

• Running procedures that create or modify variables (for example, saving predicted values in Linear Regression)

Actions that create an entire copy of the data file in temporary disk space include:

• Reading Excel files

• Running procedures that sort data (for example, Sort Cases, Split File)

• Reading data with GET TRANSLATE or DATA LIST commands

• Using the Cache Data facility or the CACHE command

• Launching other applications from PASW Statistics that read the data file (for example, AnswerTree, DecisionTime)

Note: The GET DATA command provides functionality comparable to DATA LIST without creating an entire copy of the data file in temporary disk space. The SPLIT FILE command in command syntax does not sort the data file and therefore does not create a copy of the data file. This command, however, requires sorted data for proper operation, and the dialog box interface for this procedure will automatically sort the data file, resulting in a complete copy of the data file. (Command syntax is not available with the Student Version.)

Actions that create an entire copy of the data file by default:

• Reading databases with the Database Wizard

• Reading text files with the Text Wizard

The Text Wizard provides an optional setting to automatically cache the data. By default, this option is selected. You can turn it off by deselecting Cache data locally. For the Database Wizard, you can paste the generated command syntax and delete the CACHE command.

Related Topics

Creating a Data Cache
To Create a Data Cache
To Cache Data Automatically


Creating a Data Cache

active file,active file,active file
creating a temporary active file,creating a temporary active file,creating a temporary active file
temporary active file,temporary active file,temporary active file
temporary disk space,temporary disk space,temporary disk space
disk space,disk space,disk space
temporary,temporary,temporary
disk space,disk space,disk space
active file,active file,active file
caching,caching,caching
active file,active file,active file
active file,active file,active file
caching,caching,caching
caching,caching,caching
active file,active file,active file
performance,performance,performance
caching data,caching data,caching data
speed,speed,speed
caching data,caching data,caching data
data files,data files,data files
improving performance for large files,improving performance for large files,improving performance for large files
performance,performance,performance
speed,speed,speed
data files,data files,data files

Although the virtual active file can vastly reduce the amount of temporary disk space required, the absence of a temporary copy of the "active" file means that the original data source has to be reread for each procedure. For large data files read from an external source, creating a temporary copy of the data may improve performance. For example, for data tables read from a database source, the SQL query that reads the information from the database must be reexecuted for any command or procedure that needs to read the data. Since virtually all statistical analysis procedures and charting procedures need to read the data, the SQL query is reexecuted for each procedure you run, which can result in a significant increase in processing time if you run a large number of procedures.

If you have sufficient disk space on the computer performing the analysis (either your local computer or a remote server), you can eliminate multiple SQL queries and improve processing time by creating a data cache of the active file. The data cache is a temporary copy of the complete data.

Note: By default, the Database Wizard automatically creates a data cache, but if you use the GET DATA command in command syntax to read a database, a data cache is not automatically created. (Command syntax is not available with the Student Version.)

Related Topics

To Create a Data Cache
To Cache Data Automatically
CACHE


To Create a Data Cache

From the menus choose:

File
Cache Data...

Click OK or Cache Now.

OK creates a data cache the next time the program reads the data (for example, the next time you run a statistical procedure), which is usually what you want because it doesn't require an extra data pass. Cache Now creates a data cache immediately, which shouldn't be necessary under most circumstances. Cache Now is useful primarily for two reasons:

• A data source is "locked" and can't be updated by anyone until you end your session, open a different data source, or cache the data.

• For large data sources, scrolling through the contents of the Data View tab in the Data Editor will be much faster if you cache the data.

Related Topics

Virtual Active File
Creating a Data Cache
To Cache Data Automatically


To Cache Data Automatically

You can use the SET command to automatically create a data cache after a specified number of changes in the active data file. By default, the active data file is automatically cached after 20 changes in the active data file.

From the menus choose:

File
New
Syntax

In the syntax window, type SET CACHE n (where n represents the number of changes in the active data file before the data file is cached).

From the menus in the syntax window choose:

Run
All

Note: The cache setting is not persistent across sessions. Each time you start a new session, the value is reset to the default of 20.

Related Topics

Random Number Generators
To Create a Data Cache


Distributed Analysis Mode

remote servers,remote servers,remote servers
distributed mode,distributed mode,distributed mode

Distributed analysis mode allows you to use a computer other than your local (or desktop) computer for memory-intensive work. Because remote servers that are used for distributed analysis are typically more powerful and faster than your local computer, distributed analysis mode can significantly reduce computer processing time. Distributed analysis with a remote server can be useful if your work involves:

• Large data files, particularly data read from database sources.

• Memory-intensive tasks. Any task that takes a long time in local analysis mode may be a good candidate for distributed analysis.

Distributed analysis affects only data-related tasks, such as reading data, transforming data, computing new variables, and calculating statistics. Distributed analysis has no effect on tasks related to editing output, such as manipulating pivot tables or modifying charts.

Note: Distributed analysis is available only if you have both a local version and access to a licensed server version of the software that is installed on a remote server.

Related Topics

To Select, Switch, or Add Servers
Server Login
Adding and Editing Server Login Settings
Searching for Available Servers
Starting a Distributed Mode Session from a Command Line
Opening Data Files from a Remote Server
File Access in Local and Distributed Analysis Mode
Availability of Procedures in Distributed Analysis Mode
Absolute versus Relative Path Specifications
Selecting a Data Source


Server Login

remote servers,remote servers,remote servers
logging in,logging in,logging in
distributed mode,distributed mode,distributed mode
logging in to a server,logging in to a server,logging in to a server
remote servers,remote servers,remote servers
servers,servers,servers
logging in,logging in,logging in
servers,servers,servers

The Server Login dialog box allows you to select the computer that processes commands and runs procedures. You can select your local computer or a remote server.

You can add, modify, or delete remote servers in the list. Remote servers usually require a user ID and password, and a domain name may also be necessary. Contact your system administrator for information about available servers, a user ID and password, domain names, and other connection information.

You can select a default server and save the user ID, domain name, and password that are associated with any server. You are automatically connected to the default server when you start a new session.

If you are licensed to use the Statistics Adapter and your site is running PASW Collaboration and Deployment Services 3.5 or later, you can click Search... to view a list of servers that are available on your network. If you are not logged on to a repository, you will be prompted to enter connection information before you can view the list of servers.

Note: Distributed analysis is available only if you have both a local version and access to a licensed server version of the software that is installed on a remote server.

Related Topics

To Select, Switch, or Add Servers
Distributed Analysis Mode
Adding and Editing Server Login Settings
Searching for Available Servers
Starting a Distributed Mode Session from a Command Line
Opening Data Files from a Remote Server
File Access in Local and Distributed Analysis Mode
Availability of Procedures in Distributed Analysis Mode
Absolute versus Relative Path Specifications


Adding and Editing Server Login Settings

servers,servers,servers
adding,adding,adding
editing,editing,editing
remote servers,remote servers,remote servers
adding,adding,adding
editing,editing,editing
distributed mode,distributed mode,distributed mode
servers,servers,servers
remote servers,remote servers,remote servers
servers,servers,servers
names,names,names
port numbers,port numbers,port numbers
port numbers,port numbers,port numbers
servers,servers,servers

Use the Server Login Settings dialog box to add or edit connection information for remote servers for use in distributed analysis mode.

Contact your system administrator for a list of available servers, port numbers for the servers, and additional connection information. Do not use the Secure Socket Layer unless instructed to do so by your administrator.

Server Name. A server "name" can be an alphanumeric name that is assigned to a computer (for example, NetworkServer) or a unique IP address that is assigned to a computer (for example, 202.123.456.78).

Port Number. The port number is the port that the server software uses for communications.

Description. You can enter an optional description to display in the servers list.

Connect with Secure Socket Layer. Secure Socket Layer (SSL) encrypts requests for distributed analysis when they are sent to the remote server. Before you use SSL, check with your administrator. For this option to be enabled, SSL must be configured on your desktop computer and the server.

Note: Distributed analysis is available only if you have both a local version and access to a licensed server version of the software that is installed on a remote server.

Related Topics

To Select, Switch, or Add Servers
Distributed Analysis Mode
Server Login
Searching for Available Servers
Starting a Distributed Mode Session from a Command Line
Opening Data Files from a Remote Server
File Access in Local and Distributed Analysis Mode
Availability of Procedures in Distributed Analysis Mode
Absolute versus Relative Path Specifications


To Select, Switch, or Add Servers

From the menus choose:

File
Switch Server...

To select a default server:

In the server list, select the box next to the server that you want to use.

Enter the user ID, domain name, and password that were provided by your administrator.

Note: You are automatically connected to the default server when you start a new session.

To switch to another server:

Select the server from the list.

Enter your user ID, domain name, and password (if necessary).

Note: When you switch servers during a session, all open windows are closed. You will be prompted to save changes before the windows are closed.

To add a server:

Get the server connection information from your administrator.

Click Add to open the Server Login Settings dialog box.

Enter the connection information and optional settings, and then click OK.

To edit a server:

Get the revised connection information from your administrator.

Click Edit to open the Server Login Settings dialog box.

Enter the changes and click OK.

To search for available servers:

Note: The ability to search for available servers is available only if you are licensed to use the Statistics Adapter and your site is running PASW Collaboration and Deployment Services 3.5 or later.

Click Search... to open the Search for Servers dialog box. If you are not logged on to a repository, you will be prompted for connection information.

Select one or more available servers and click OK. The servers will now appear in the Server Login dialog box.

To connect to one of the servers, follow the instructions "To switch to another server."

Contact your system administrator for a list of available servers, port numbers for the servers, and additional connection information.

Name. A server "name" can be an alphanumeric name assigned to a computer (for example, hqdev001) or a unique IP address assigned to a computer (for example, 202.123.456.78).

Port Number. The port number is the port that the server software uses for communications.

Description. Enter an optional description to display in the servers list.

Note: Distributed analysis is available only if you have both a local version and access to a licensed server version of the software that is installed on a remote server.

Related Topics

Distributed Analysis Mode
Server Login
Adding and Editing Server Login Settings
Searching for Available Servers
Starting a Distributed Mode Session from a Command Line
Opening Data Files from a Remote Server
File Access in Local and Distributed Analysis Mode
Availability of Procedures in Distributed Analysis Mode
Absolute versus Relative Path Specifications


Searching for Available Servers

Note: This dialog box is available only if you are licensed to use the Statistics Adapter and you have logged on to a repository(version 3.5 or later).

Use the Search for Servers dialog box to select one or more servers that are available on your network. This dialog box appears when you click Search... on the Server Login dialog box.

Select one or more servers and click OK to add them to the Server Login dialog box. Although you can manually add servers in the Server Login dialog box, searching for available servers lets you connect to servers without requiring that you know the correct server name and port number. This information is automatically provided. However, you still need the correct logon information, such as user name, domain, and password.

Related Topics

Distributed Analysis Mode
Server Login
Adding and Editing Server Login Settings
To Select, Switch, or Add Servers
Starting a Distributed Mode Session from a Command Line
Opening Data Files from a Remote Server
File Access in Local and Distributed Analysis Mode
Availability of Procedures in Distributed Analysis Mode
Absolute versus Relative Path Specifications


Starting a Distributed Mode Session from a Command Line

command line switches,command line switches,command line switches
starting distributed mode from a command line,starting distributed mode from a command line,starting distributed mode from a command line
distributed mode,distributed mode,distributed mode
starting from a command line,starting from a command line,starting from a command line

You can start a distributed mode session from a command line in a command window using command line switches to specify the server, port, user name, and password. Optionally, you can also specify a data file to open.

The general form of the command line specification is:

statistics -server inet:hostname:port -user username
-password password [datafilename]

• hostname:port. The name or IP address and port number of the server.

• username. If you need to specify a domain name, precede your user ID with the domain name and a backslash, as in: -user mydomain\myusername

• datafilename. Path specifications must be relative to the server. For Windows servers, you can use UNC paths. If the path or filename contain any spaces, you must enclose the entire data file specification in quotes or apostrophes, as in:

"\\myserver\my folder\myfile.sav".

See the topic Opening Data Files from a Remote Server for more information.

Related Topics

Distributed Analysis Mode
Server Login
Adding and Editing Server Login Settings
To Select, Switch, or Add Servers
Searching for Available Servers
Opening Data Files from a Remote Server
File Access in Local and Distributed Analysis Mode
Availability of Procedures in Distributed Analysis Mode
Absolute versus Relative Path Specifications


Opening Data Files from a Remote Server

remote servers,remote servers,remote servers
data file access,data file access,data file access
distributed mode,distributed mode,distributed mode
data file access,data file access,data file access
remote servers,remote servers,remote servers
distributed mode,distributed mode,distributed mode
data files,data files,data files
remote servers,remote servers,remote servers
data files,data files,data files

In distributed analysis mode, the Open Remote File dialog box replaces the standard Open File dialog box.

• The contents of the list of available files, folders, and drives depends on what is available on or from the remote server. The current server name is indicated at the top of the dialog box.

• In distributed analysis mode, you will not have access to files on your local computer unless you specify the drive as a shared device or specify the folders containing your data files as shared folders. Consult the documentation for your operating system for information on how to "share" folders on your local computer with the server network.

• If the server is running a different operating system (for example, you are running Windows and the server is running UNIX), you probably won't have access to local data files in distributed analysis mode even if they are in shared folders.

Note: Distributed analysis is available only if you have both a local version and access to a licensed server version of the software that is installed on a remote server.

Related Topics

To Select, Switch, or Add Servers
Searching for Available Servers
Starting a Distributed Mode Session from a Command Line
Distributed Analysis Mode
Adding and Editing Server Login Settings
File Access in Local and Distributed Analysis Mode
Availability of Procedures in Distributed Analysis Mode
Absolute versus Relative Path Specifications
Opening Data Files
To Open Data Files
Data File Types
Opening File Options
Reading Excel Files
Reading Excel 95 or Later Files
How to Read Excel 95 or Later Files
Reading Older Excel Files and Other Spreadsheets
Reading dBASE Files
Reading Stata Files


File Access in Local and Distributed Analysis Mode

remote servers,remote servers,remote servers
data file access,data file access,data file access
distributed mode,distributed mode,distributed mode
data file access,data file access,data file access
remote servers,remote servers,remote servers
distributed mode,distributed mode,distributed mode
data files,data files,data files
remote servers,remote servers,remote servers
data files,data files,data files

The view of data folders (directories) and drives for both your local computer and the network is based on the computer that you are currently using to process commands and run procedures—which is not necessarily the computer in front of you.

Local analysis mode. When you use your local computer as your "server," the view of data files, folders, and drives in the file access dialog box (for opening data files) is similar to what you see in other applications or in Windows Explorer. You can see all of the data files and folders on your computer and any files and folders on mounted network drives.

Distributed analysis mode. When you use another computer as a "remote server" to run commands and procedures, the view of data files, folders, and drives represents the view from the remote server computer. Although you may see familiar folder names (such as Program Files) and drives (such as C), these items are not the folders and drives on your computer; they are the folders and drives on the remote server.

In distributed analysis mode, you will not have access to data files on your local computer unless you specify the drive as a shared device or specify the folders containing your data files as shared folders. If the server is running a different operating system (for example, you are running Windows and the server is running UNIX), you probably won't have access to local data files in distributed analysis mode even if they are in shared folders.

Distributed analysis mode is not the same as accessing data files that reside on another computer on your network. You can access data files on other network devices in local analysis mode or in distributed analysis mode. In local mode, you access other devices from your local computer. In distributed mode, you access other network devices from the remote server.

If you're not sure if you're using local analysis mode or distributed analysis mode, look at the title bar in the dialog box for accessing data files. If the title of the dialog box contains the word Remote (as in Open Remote File), or if the text Remote Server: [server name] appears at the top of the dialog box, you're using distributed analysis mode.

Note: This situation affects only dialog boxes for accessing data files (for example, Open Data, Save Data, Open Database, and Apply Data Dictionary). For all other file types (for example, Viewer files, syntax files, and script files), the local view is always used.

Note: Distributed analysis is available only if you have both a local version and access to a licensed server version of the software that is installed on a remote server.

Related Topics

Distributed Analysis Mode
Server Login
Adding and Editing Server Login Settings
To Select, Switch, or Add Servers
Searching for Available Servers
Starting a Distributed Mode Session from a Command Line
Opening Data Files from a Remote Server
Availability of Procedures in Distributed Analysis Mode
Absolute versus Relative Path Specifications
Opening Data Files
To Open Data Files
Data File Types
Opening File Options
Reading Excel Files
Reading Excel 95 or Later Files
How to Read Excel 95 or Later Files
Reading Older Excel Files and Other Spreadsheets
Reading dBASE Files
Reading Stata Files


Availability of Procedures in Distributed Analysis Mode

distributed mode,distributed mode,distributed mode
available procedures,available procedures,available procedures
remote servers,remote servers,remote servers
available procedures,available procedures,available procedures
remote servers,remote servers,remote servers
distributed mode,distributed mode,distributed mode

In distributed analysis mode, procedures are available for use only if they are installed on both your local version and the version on the remote server.

If you have optional components installed locally that are not available on the remote server and you switch from your local computer to a remote server, the affected procedures will be removed from the menus and the corresponding command syntax will result in errors. Switching back to local mode will restore all affected procedures.

Note: Distributed analysis is available only if you have both a local version and access to a licensed server version of the software that is installed on a remote server.

Related Topics

Distributed Analysis Mode
Server Login
Adding and Editing Server Login Settings
To Select, Switch, or Add Servers
Searching for Available Servers
Starting a Distributed Mode Session from a Command Line
Opening Data Files from a Remote Server
File Access in Local and Distributed Analysis Mode
Absolute versus Relative Path Specifications


Absolute versus Relative Path Specifications

remote servers,remote servers,remote servers
relative paths,relative paths,relative paths
distributed mode,distributed mode,distributed mode
relative paths,relative paths,relative paths
remote servers,remote servers,remote servers
distributed mode,distributed mode,distributed mode

In distributed analysis mode, relative path specifications for data files and command syntax files are relative to the current server, not relative to your local computer. A relative path specification such as /mydocs/mydata.sav does not point to a directory and file on your local drive; it points to a directory and file on the remote server's hard drive.

Windows UNC Path Specifications

If you are using a Windows server version, you can use universal naming convention (UNC) specifications when accessing data and syntax files with command syntax. The general form of a UNC specification is:

\\servername\sharename\path\filename

• Servername is the name of the computer that contains the data file.

• Sharename is the folder (directory) on that computer that is designated as a shared folder.

• Path is any additional folder (subdirectory) path below the shared folder.

• Filename is the name of the data file.

An example is as follows:

GET FILE='\\hqdev001\public\july\sales.sav'.

If the computer does not have a name assigned to it, you can use its IP address, as in:

GET FILE='\\204.125.125.53\public\july\sales.sav'.

Even with UNC path specifications, you can access data and syntax files only from devices and folders that are designated as shared. When you use distributed analysis mode, this situation includes data and syntax files on your local computer.

UNIX Absolute Path Specifications

For UNIX server versions, there is no equivalent to the UNC path, and all directory paths must be absolute paths that start at the root of the server; relative paths are not allowed. For example, if the data file is located in /bin/data and the current directory is also /bin/data, GET FILE='sales.sav' is not valid; you must specify the entire path, as in:

GET FILE='/bin/sales.sav'.
INSERT FILE='/bin/salesjob.sps'.

Note: Distributed analysis is available only if you have both a local version and access to a licensed server version of the software that is installed on a remote server.

Related Topics

Distributed Analysis Mode
Server Login
Adding and Editing Server Login Settings
To Select, Switch, or Add Servers
Searching for Available Servers
Starting a Distributed Mode Session from a Command Line
Opening Data Files from a Remote Server
File Access in Local and Distributed Analysis Mode
Availability of Procedures in Distributed Analysis Mode


Data Editor

Data Editor,Data Editor,Data Editor

The Data Editor provides a convenient, spreadsheet-like method for creating and editing data files. The Data Editor window opens automatically when you start a session.

The Data Editor provides two views of your data:

• Data View. This view displays the actual data values or defined value labels.

• Variable View. This view displays variable definition information, including defined variable and value labels, data type (for example, string, date, or numeric), measurement level (nominal, ordinal, or scale), and user-defined missing values.

In both views, you can add, change, and delete information that is contained in the data file.

Related Topics

Variable Names and Variable Labels in Dialog Box Lists
Data View
Variable View
Variable Names
Variable Measurement Level
Custom Variable Attributes
Entering Data
To Change Data Type
Copying Data Properties
Date Variables versus Date Format Variables
Transpose
Data Value Restrictions in the Data Editor
Case Selection Status in the Data Editor
Data Editor Display Options


Data View

Data Editor,Data Editor,Data Editor
Data View,Data View,Data View
Data View,Data View,Data View

Many of the features of Data View are similar to the features that are found in spreadsheet applications. There are, however, several important distinctions:

• Rows are cases. Each row represents a case or an observation. For example, each individual respondent to a questionnaire is a case.

• Columns are variables. Each column represents a variable or characteristic that is being measured. For example, each item on a questionnaire is a variable.

• Cells contain values. Each cell contains a single value of a variable for a case. The cell is where the case and the variable intersect. Cells contain only data values. Unlike spreadsheet programs, cells in the Data Editor cannot contain formulas.

• The data file is rectangular. The dimensions of the data file are determined by the number of cases and variables. You can enter data in any cell. If you enter data in a cell outside the boundaries of the defined data file, the data rectangle is extended to include any rows and/or columns between that cell and the file boundaries. There are no "empty" cells within the boundaries of the data file. For numeric variables, blank cells are converted to the system-missing value. For string variables, a blank is considered a valid value.

To Display Data View Collapse Hide details

To Display Data View

Make the Data Editor the active window.

Click the Data View tab.

Related Topics

Variable Names and Variable Labels in Dialog Box Lists
Data Editor
Variable View
Variable Names
Variable Measurement Level
Custom Variable Attributes
Entering Data
To Change Data Type
Copying Data Properties
Date Variables versus Date Format Variables
Transpose
Data Value Restrictions in the Data Editor
Case Selection Status in the Data Editor
Data Editor Display Options


Variable View

Data Editor,Data Editor,Data Editor
Variable View,Variable View,Variable View
Variable View,Variable View,Variable View

Variable View contains descriptions of the attributes of each variable in the data file. In Variable View:

• Rows are variables.

• Columns are variable attributes.

You can add or delete variables and modify attributes of variables, including the following attributes:

• Variable name

• Data type

• Number of digits or characters

• Number of decimal places

• Descriptive variable and value labels

• User-defined missing values

• Column width

• Measurement level

All of these attributes are saved when you save the data file.

In addition to defining variable properties in Variable View, there are two other methods for defining variable properties:

• The Copy Data Properties Wizard provides the ability to use an external PASW Statistics data file or another dataset that is available in the current session as a template for defining file and variable properties in the active dataset. You can also use variables in the active dataset as templates for other variables in the active dataset. Copy Data Properties is available on the Data menu in the Data Editor window. See the topic Copying Data Properties for more information.

• Define Variable Properties (also available on the Data menu in the Data Editor window) scans your data and lists all unique data values for any selected variables, identifies unlabeled values, and provides an auto-label feature. This method is particularly useful for categorical variables that use numeric codes to represent categories--for example, 0 = Male, 1 = Female. See the topic Defining Variable Properties for more information.

Related Topics

To Display or Define Variable Attributes
Variable Names and Variable Labels in Dialog Box Lists
Data Editor
Data View
Variable Names
Variable Measurement Level
Custom Variable Attributes
Entering Data
To Change Data Type
Copying Data Properties
Date Variables versus Date Format Variables
Transpose
Data Value Restrictions in the Data Editor
Case Selection Status in the Data Editor
Data Editor Display Options


To Display or Define Variable Attributes

variables,variables,variables
defining,defining,defining
defining variables,defining variables,defining variables
Data Editor,Data Editor,Data Editor
defining variables,defining variables,defining variables
Data Editor,Data Editor,Data Editor
variables,variables,variables

Make the Data Editor the active window.

Double-click a variable name at the top of the column in Data View, or click the Variable View tab.

To define new variables, enter a variable name in any blank row.

Select the attribute(s) that you want to define or modify.

Show me

Related Topics

Variable Names
Variable Measurement Level
Variable Type
Input versus Display Formats
Variable Labels
Value Labels
Missing Values
Column Width
Variable Alignment
Applying Variable Definition Attributes to Multiple Variables


Variable Names

variable names,variable names,variable names
rules,rules,rules
variable names,variable names,variable names
variable names,variable names,variable names
mixed case variable names,mixed case variable names,mixed case variable names
wrapping long variable names in output,wrapping long variable names in output,wrapping long variable names in output

The following rules apply to variable names:

• Each variable name must be unique; duplication is not allowed.

• Variable names can be up to 64 bytes long, and the first character must be a letter or one of the characters @, #, or $. Subsequent characters can be any combination of letters, numbers, nonpunctuation characters, and a period (.). In code page mode, sixty-four bytes typically means 64 characters in single-byte languages (for example, English, French, German, Spanish, Italian, Hebrew, Russian, Greek, Arabic, and Thai) and 32 characters in double-byte languages (for example, Japanese, Chinese, and Korean). Many string characters that only take one byte in code page mode take two or more bytes in Unicode mode. For example, é is one byte in code page format but is two bytes in Unicode format; so résumé is six bytes in a code page file and eight bytes in Unicode mode. For information on Unicode mode, see SET command, UNICODE subcommand.

Note: Letters include any nonpunctuation characters used in writing ordinary words in the languages supported in the platform's character set.

• Variable names cannot contain spaces.

• A # character in the first position of a variable name defines a scratch variable. You can only create scratch variables with command syntax. You cannot specify a # as the first character of a variable in dialog boxes that create new variables. See the topic Scratch Variables for more information.

• A $ sign in the first position indicates that the variable is a system variable. See the topic System Variables for more information. The $ sign is not allowed as the initial character of a user-defined variable.

• The period, the underscore, and the characters $, #, and @ can be used within variable names. For example, A._$@#1 is a valid variable name.

• Variable names ending with a period should be avoided, since the period may be interpreted as a command terminator. You can only create variables that end with a period in command syntax. You cannot create variables that end with a period in dialog boxes that create new variables.

• Variable names ending in underscores should be avoided, since such names may conflict with names of variables automatically created by commands and procedures.

• Reserved keywords cannot be used as variable names. Reserved keywords are ALL, AND, BY, EQ, GE, GT, LE, LT, NE, NOT, OR, TO, and WITH.

• Variable names can be defined with any mixture of uppercase and lowercase characters, and case is preserved for display purposes.

• When long variable names need to wrap onto multiple lines in output, lines are broken at underscores, periods, and points where content changes from lower case to upper case.

Related Topics

Inserting or Modifying Variable Names
Variable Names and Variable Labels in Dialog Box Lists
Data Editor
Data View
Variable View
Variable Measurement Level
Custom Variable Attributes
Entering Data
To Change Data Type
Copying Data Properties
Date Variables versus Date Format Variables
Transpose
Data Value Restrictions in the Data Editor
Case Selection Status in the Data Editor
Data Editor Display Options
To Display or Define Variable Attributes
Variable Type
Input versus Display Formats
Variable Labels
Value Labels
Missing Values
Column Width
Variable Alignment
Applying Variable Definition Attributes to Multiple Variables
RENAME VARIABLES


Inserting or Modifying Variable Names

Make the Data Editor the active window.

Double-click a variable name at the top of the column in Data View or click the Variable View tab.

Enter the new variable name in the Name cell for the variable.

See Variable Names for information on variable naming rules.


Variable Measurement Level

measurement level,measurement level,measurement level
defining,defining,defining
level of measurement,level of measurement,level of measurement
defining,defining,defining
measurement level,measurement level,measurement level
level of measurement,level of measurement,level of measurement
scale,scale,scale
measurement level,measurement level,measurement level
ordinal,ordinal,ordinal
measurement level,measurement level,measurement level
nominal,nominal,nominal
measurement level,measurement level,measurement level
scale,scale,scale
ordinal,ordinal,ordinal
nominal,nominal,nominal

You can specify the level of measurement as scale (numeric data on an interval or ratio scale), ordinal, or nominal. Nominal and ordinal data can be either string (alphanumeric) or numeric.

• Nominal. A variable can be treated as nominal when its values represent categories with no intrinsic ranking (for example, the department of the company in which an employee works). Examples of nominal variables include region, zip code, and religious affiliation.

• Ordinal. A variable can be treated as ordinal when its values represent categories with some intrinsic ranking (for example, levels of service satisfaction from highly dissatisfied to highly satisfied). Examples of ordinal variables include attitude scores representing degree of satisfaction or confidence and preference rating scores.

• Scale. A variable can be treated as scale (continuous) when its values represent ordered categories with a meaningful metric, so that distance comparisons between values are appropriate. Examples of scale variables include age in years and income in thousands of dollars.

Note: For ordinal string variables, the alphabetic order of string values is assumed to reflect the true order of the categories. For example, for a string variable with the values of low, medium, high, the order of the categories is interpreted as high, low, medium, which is not the correct order. In general, it is more reliable to use numeric codes to represent ordinal data.

New numeric variables created during a session are assigned the scale measurement level. For data read from external file formats and PASW Statistics data files that were created prior to version 8.0, default assignment of measurement level is based on the following rules:

• Numeric variables with fewer than 24 unique values and string variables are set to nominal.

• Numeric variables with 24 or more unique values are set to scale.

You can change the scale/nominal cutoff value for numeric variables in the Options dialog box. See the topic Data Options for more information.

The Define Variable Properties dialog box, available from the Data menu, can help you assign the correct measurement level. See the topic Assigning the Measurement Level for more information.

Related Topics

Specifying Measurement Level
Variable Names and Variable Labels in Dialog Box Lists
Data Editor
Data View
Variable View
Variable Names
Custom Variable Attributes
Entering Data
To Change Data Type
Copying Data Properties
Date Variables versus Date Format Variables
Transpose
Data Value Restrictions in the Data Editor
Case Selection Status in the Data Editor
Data Editor Display Options
To Display or Define Variable Attributes
Variable Type
Input versus Display Formats
Variable Labels
Value Labels
Missing Values
Column Width
Variable Alignment
Applying Variable Definition Attributes to Multiple Variables
VARIABLE LEVEL


Specifying Measurement Level

Make the Data Editor the active window.

Double-click a variable name at the top of the column in Data View or click the Variable View tab.

Select the measurement level from the list in the Measure cell for the variable.


Variable Type

data types,data types,data types
custom currency,custom currency,custom currency
custom currency formats,custom currency formats,custom currency formats
data types,data types,data types
data types,data types,data types
data types,data types,data types
defining,defining,defining
defining variables,defining variables,defining variables
data types,data types,data types
defining variables,defining variables,defining variables
numeric format,numeric format,numeric format
COMMA format,COMMA format,COMMA format
DOT format,DOT format,DOT format
scientific notation,scientific notation,scientific notation
date format variables,date format variables,date format variables
DOLLAR format,DOLLAR format,DOLLAR format
string format,string format,string format

Variable Type specifies the data type for each variable. By default, all new variables are assumed to be numeric. You can use Variable Type to change the data type. The contents of the Variable Type dialog box depend on the selected data type. For some data types, there are text boxes for width and number of decimals; for other data types, you can simply select a format from a scrollable list of examples.

The available data types are as follows:

Numeric. A variable whose values are numbers. Values are displayed in standard numeric format. The Data Editor accepts numeric values in standard format or in scientific notation.

Comma. A numeric variable whose values are displayed with commas delimiting every three places and displayed with the period as a decimal delimiter. The Data Editor accepts numeric values for comma variables with or without commas or in scientific notation. Values cannot contain commas to the right of the decimal indicator.

Dot. A numeric variable whose values are displayed with periods delimiting every three places and with the comma as a decimal delimiter. The Data Editor accepts numeric 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 numeric values for such variables with or without an exponent. The exponent can be preceded by 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-date or 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, choose Options, and then click the Data tab).

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

Custom currency. A numeric variable whose values are displayed in one of the custom currency formats that you have defined on the Currency tab of the Options dialog box. Defined custom currency characters cannot be used in data entry but are displayed in the Data Editor.

String. A variable whose values are not numeric and therefore are not used in calculations. The values can contain any characters up to the defined length. Uppercase and lowercase letters are considered distinct. This type is also known as an alphanumeric variable.

Related Topics

To Define Variable Type
To Create Custom Currency Formats
To Display or Define Variable Attributes
Variable Names
Variable Measurement Level
Input versus Display Formats
Variable Labels
Value Labels
Missing Values
Column Width
Variable Alignment
Applying Variable Definition Attributes to Multiple Variables


To Define Variable Type

Make the Data Editor the active window.

If Data View is displayed, double-click the variable name at the top of the column in Data View or click the Variable View tab.

Click the button in the Type cell for the variable that you want to define.

Select the data type in the Variable Type dialog box.

Click OK.


Input versus Display Formats

data types,data types,data types
display formats,display formats,display formats
data types,data types,data types
input formats,input formats,input formats
input formats,input formats,input formats
display formats,display formats,display formats
data types,data types,data types
numeric format,numeric format,numeric format
COMMA format,COMMA format,COMMA format
DOT format,DOT format,DOT format
date format variables,date format variables,date format variables
DOLLAR format,DOLLAR format,DOLLAR format

Depending on the format, the display of values in Data View may differ from the actual value as entered and stored internally. Following are some general guidelines:

• 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 defined number of decimal places and rounds values with more decimals. However, the complete value is used in all computations.

• For string variables, all values are right-padded to the maximum width. For a string variable with a maximum width of three, a value of No is stored internally as 'No ' and is not equivalent to ' No'.

• For date formats, you can use slashes, dashes, spaces, commas, or periods as delimiters between day, month, and year values, and you can enter numbers, three-letter abbreviations, or complete names for month values. Dates of the general format dd-mmm-yy are displayed with dashes as delimiters and three-letter abbreviations for the month. Dates of the general format dd/mm/yy and mm/dd/yy are displayed with slashes for delimiters and numbers for the month. Internally, dates are stored as the number of seconds from October 14, 1582. The century range for dates with two-digit years is determined by your Options settings (from the Edit menu, choose Options, and then click the Data tab).

• For time formats, you can use colons, periods, or spaces as delimiters between hours, minutes, and seconds. Times are displayed with colons as delimiters. Internally, times are stored as a number of seconds that represents a time interval. For example, 10:00:00 is stored internally as 36000, which is 60 (seconds per minute) x 60 (minutes per hour) x 10 (hours).

Related Topics

Data Options
To Display or Define Variable Attributes
Variable Names
Variable Measurement Level
Variable Labels
Value Labels
Missing Values
Column Width
Variable Alignment
Applying Variable Definition Attributes to Multiple Variables


Variable Labels

defining variables,defining variables,defining variables
variable labels,variable labels,variable labels
variable labels,variable labels,variable labels
defining variables,defining variables,defining variables

You can assign descriptive variable labels up to 256 characters (128 characters in double-byte languages). Variable labels can contain spaces and reserved characters that are not allowed in variable names.

Related Topics

To Specify Variable Labels
To Display or Define Variable Attributes
Variable Names
Variable Measurement Level
Variable Type
Input versus Display Formats
Value Labels
Missing Values
Column Width
Variable Alignment
Applying Variable Definition Attributes to Multiple Variables
VARIABLE LABELS


To Specify Variable Labels

Make the Data Editor the active window.

Double-click a variable name at the top of the column in Data View, or click the Variable View tab.

In the Label cell for the variable, enter the descriptive variable label.


Value Labels

defining variables,defining variables,defining variables
value labels,value labels,value labels
value labels,value labels,value labels
defining variables,defining variables,defining variables

You can assign descriptive value labels for each value of a variable. This process is particularly useful if your data file uses numeric codes to represent non-numeric categories (for example, codes of 1 and 2 for male and female).

• Value labels are saved with the data file. You do not need to redefine value labels each time you open a data file.

• Value labels can be up to 120 bytes.

Related Topics

To Specify Value Labels
To Display or Define Variable Attributes
Variable Names
Variable Measurement Level
Variable Type
Input versus Display Formats
Variable Labels
Missing Values
Column Width
Variable Alignment
Applying Variable Definition Attributes to Multiple Variables
VALUE LABELS


To Specify Value Labels

Make the Data Editor the active window.

If Data View is displayed, double-click the variable name at the top of the column in Data View or click the Variable View tab.

Click the button in the Values cell for the variable that you want to define.

For each value, enter the value and a label.

Click Add to enter the value label.

Click OK.

You can also use Define Variable Properties to assist you in the process of assigning value labels. Define Variable Properties scans the data and lists all the unique values for each variable, providing a simple grid to enter value labels next to the corresponding values. See the topic To Define Variable Properties for more information.


Inserting Line Breaks in Labels

line breaks,line breaks,line breaks
variable and value labels,variable and value labels,variable and value labels
wrapping,wrapping,wrapping
variable and value labels,variable and value labels,variable and value labels
variable labels,variable labels,variable labels
inserting line breaks,inserting line breaks,inserting line breaks
value labels,value labels,value labels
inserting line breaks,inserting line breaks,inserting line breaks

Variable labels and value labels automatically wrap to multiple lines in pivot tables and charts if the cell or area isn't wide enough to display the entire label on one line, and you can edit results to insert manual line breaks if you want the label to wrap at a different point. You can also create variable labels and value labels that will always wrap at specified points and be displayed on multiple lines.

For variable labels, select the Label cell for the variable in Variable View in the Data Editor.

For value labels, select the Values cell for the variable in Variable View in the Data Editor, click the button in the cell, and select the label that you want to modify in the Value Labels dialog box.

At the place in the label where you want the label to wrap, type \n.

The \n is not displayed in pivot tables or charts; it is interpreted as a line break character.

Related Topics

To Specify Variable Labels
To Specify Value Labels


Missing Values

defining variables,defining variables,defining variables
missing values,missing values,missing values
missing values,missing values,missing values
defining,defining,defining
user-missing values,user-missing values,user-missing values
defining variables,defining variables,defining variables
missing values,missing values,missing values
missing values,missing values,missing values
string variables,string variables,string variables
string variables,string variables,string variables
missing values,missing values,missing values
missing values,missing values,missing values
string variables,string variables,string variables

Missing Values defines specified data values as user-missing. For example, you might want to distinguish between data that are missing because a respondent refused to answer and data that are missing because the question didn't apply to that respondent. Data values that are specified as user-missing are flagged for special treatment and are excluded from most calculations.

• User-missing value specifications are saved with the data file. You do not need to redefine user-missing values each time you open the data file.

• You can enter up to three discrete (individual) missing values, a range of missing values, or a range plus one discrete value.

• Ranges can be specified only for numeric variables.

• All string values, including null or blank values, are considered to be valid unless you explicitly define them as missing.

• Missing values for string variables cannot exceed eight bytes. (There is no limit on the defined width of the string variable, but defined missing values cannot exceed eight bytes.)

• To define null or blank values as missing for a string variable, enter a single space in one of the fields under the Discrete missing values selection.

Related Topics

To Define Missing Values
To Display or Define Variable Attributes
Variable Names
Variable Measurement Level
Variable Type
Input versus Display Formats
Variable Labels
Value Labels
Column Width
Variable Alignment
Applying Variable Definition Attributes to Multiple Variables
MISSING VALUES


To Define Missing Values

Make the Data Editor the active window.

If Data View is displayed, double-click the variable name at the top of the column in Data View or click the Variable View tab.

Click the button in the Missing cell for the variable that you want to define.

Enter the values or range of values that represent missing data.

• All string values, including null or blank values, are considered to be valid unless you explicitly define them as missing.

• Missing values for string variables cannot exceed eight bytes. (There is no limit on the defined width of the string variable, but defined missing values cannot exceed eight bytes.)

• To define null or blank values as missing for a string variable, enter a single space in one of the fields under the Discrete missing values selection.


Roles

roles,roles,roles
Data Editor,Data Editor,Data Editor
Data Editor,Data Editor,Data Editor
roles,roles,roles

Some dialogs support predefined roles that can be used to pre-select variables for analysis. When you open one of these dialogs, variables that meet the role requirements will be automatically displayed in the destination list(s). Available roles are:

Input. The variable will be used as an input (e.g., predictor, independent variable).

Target. The variable will be used as an output or target (e.g., dependent variable).

Both. The variable will be used as both input and output.

None. The variable has no role assignment.

Partition. The variable will be used to partition the data into separate samples for training, testing, and validation.

Split. Included for round-trip compatibility with PASW Modeler. Variables with this role are not used as split-file variables in PASW Statistics.

• By default, all variables are assigned the Input role. This includes data from external file formats and data files from versions of PASW Statistics prior to version 18.

• Role assignment only affects dialogs that support role assignment. It has no effect on command syntax.

To Assign Roles Collapse Hide details

To Assign Roles

Make the Data Editor the active window.

Double-click a variable name at the top of the column in Data View or click the Variable View tab.

Select the role from the list in the Role cell for the variable.


Column Width

Data Editor,Data Editor,Data Editor
column width,column width,column width
column width,column width,column width
in Data Editor,in Data Editor,in Data Editor
Data Editor,Data Editor,Data Editor
column width,column width,column width

You can specify a number of characters for the column width. Column widths can also be changed in Data View by clicking and dragging the column borders.

• Column width for proportional fonts is based on average character width. Depending on the characters used in the value, more or fewer characters may be displayed in the specified width.

• Column width affect only the display of values in the Data Editor. Changing the column width does not change the defined width of a variable.

Related Topics

To Display or Define Variable Attributes
Variable Names
Variable Measurement Level
Variable Type
Input versus Display Formats
Variable Labels
Value Labels
Missing Values
Variable Alignment
Applying Variable Definition Attributes to Multiple Variables
VARIABLE WIDTH


Variable Alignment

Data Editor,Data Editor,Data Editor
alignment,alignment,alignment
alignment,alignment,alignment
in Data Editor,in Data Editor,in Data Editor
Data Editor,Data Editor,Data Editor
alignment,alignment,alignment

Alignment controls the display of data values and/or value labels in Data View. The default alignment is right for numeric variables and left for string variables. This setting affects only the display in Data View.

Related Topics

Changing the Alignment of Values in Data View
To Display or Define Variable Attributes
Variable Names
Variable Measurement Level
Variable Type
Input versus Display Formats
Variable Labels
Value Labels
Missing Values
Column Width
Applying Variable Definition Attributes to Multiple Variables
VARIABLE ALIGNMENT


Changing the Alignment of Values in Data View

Make the Data Editor the active window.

Double-click a variable name at the top of the column in Data View or click the Variable View tab.

Select the alignment (left, right, center) from the list in the Align cell for the variable.


Applying Variable Definition Attributes to Multiple Variables

defining variables,defining variables,defining variables
copying and pasting attributes,copying and pasting attributes,copying and pasting attributes
variable attributes,variable attributes,variable attributes
copying and pasting,copying and pasting,copying and pasting
defining variables,defining variables,defining variables
variable attributes,variable attributes,variable attributes
defining variables,defining variables,defining variables
templates,templates,templates
templates,templates,templates
variable definition,variable definition,variable definition
defining variables,defining variables,defining variables
templates,templates,templates

After you have defined variable definition attributes for a variable, you can copy one or more attributes and apply them to one or more variables.

Basic copy and paste operations are used to apply variable definition attributes. You can:

• Copy a single attribute (for example, value labels) and paste it to the same attribute cell(s) for one or more variables.

• Copy all attributes from one variable and paste them to one or more other variables.

• Create multiple new variables with all the attributes of a copied variable.

Related Topics

Applying Variable Definition Attributes to Other Variables
Generating Multiple New Variables with the Same Attributes
To Display or Define Variable Attributes
Variable Names
Variable Measurement Level
Variable Type
Input versus Display Formats
Variable Labels
Value Labels
Missing Values
Column Width
Variable Alignment


Applying Variable Definition Attributes to Other Variables

To Apply Individual Attributes from a Defined Variable

In Variable View, select the attribute cell that you want to apply to other variables.

From the menus choose:

Edit
Copy

Select the attribute cell(s) to which you want to apply the attribute. (You can select multiple target variables.)

From the menus choose:

Edit
Paste

If you paste the attribute to blank rows, new variables are created with default attributes for all attributes except the selected attribute.

To Apply All Attributes from a Defined Variable

In Variable View, select the row number for the variable with the attributes that you want to use. (The entire row is highlighted.)

From the menus choose:

Edit
Copy

Select the row number(s) for the variable(s) to which you want to apply the attributes. (You can select multiple target variables.)

From the menus choose:

Edit
Paste

Related Topics

Applying Variable Definition Attributes to Multiple Variables
Generating Multiple New Variables with the Same Attributes


Generating Multiple New Variables with the Same Attributes

defining variables,defining variables,defining variables
copying and pasting attributes,copying and pasting attributes,copying and pasting attributes
variable attributes,variable attributes,variable attributes
copying and pasting,copying and pasting,copying and pasting
defining variables,defining variables,defining variables
variable attributes,variable attributes,variable attributes
defining variables,defining variables,defining variables
templates,templates,templates
templates,templates,templates
variable definition,variable definition,variable definition
defining variables,defining variables,defining variables
templates,templates,templates

In Variable View, click the row number for the variable that has the attributes that you want to use for the new variable. (The entire row is highlighted.)

From the menus choose:

Edit
Copy

Click the empty row number beneath the last defined variable in the data file.

From the menus choose:

Edit
Paste Variables...

In the Paste Variables dialog box, enter the number of variables that you want to create.

Enter a prefix and starting number for the new variables.

Click OK.

The new variable names will consist of the specified prefix plus a sequential number starting with the specified number.

Related Topics

Applying Variable Definition Attributes to Multiple Variables
Applying Variable Definition Attributes to Other Variables


Custom Variable Attributes

custom variable attributes,custom variable attributes,custom variable attributes
variable attributes,variable attributes,variable attributes
custom,custom,custom
attributes,attributes,attributes
custom variable attributes,custom variable attributes,custom variable attributes
custom attributes,custom attributes,custom attributes

In addition to the standard variable attributes (for example, value labels, missing values, measurement level), you can create your own custom variable attributes. Like standard variable attributes, these custom attributes are saved with PASW Statistics data files. Therefore, you could create a variable attribute that identifies the type of response for survey questions (for example, single selection, multiple selection, fill-in-the-blank) or the formulas used for computed variables.

• See the topic Creating Custom Variable Attributes for more information.

• See the topic Displaying and Editing Custom Variable Attributes for more information.

Related Topics

Variable Names and Variable Labels in Dialog Box Lists
Data Editor
Data View
Variable View
Variable Names
Variable Measurement Level
Entering Data
To Change Data Type
Copying Data Properties
Date Variables versus Date Format Variables
Transpose
Data Value Restrictions in the Data Editor
Case Selection Status in the Data Editor
Data Editor Display Options
Creating Custom Variable Attributes
Displaying and Editing Custom Variable Attributes
Variable Attribute Arrays


Creating Custom Variable Attributes

To create new custom attributes:

In Variable View, from the menus choose:

Data
New Custom Attribute...

Drag and drop the variables to which you want to assign the new attribute to the Selected Variables list.

Enter a name for the attribute. Attribute names must follow the same rules as variable names. See the topic Variable Names for more information.

Enter an optional value for the attribute. If you select multiple variables, the value is assigned to all selected variables. You can leave this blank and then enter values for each variable in Variable View.

Expand Show details Collapse Hide details
New Custom Attribute dialog box

Display attribute in the Data Editor. Displays the attribute in Variable View of the Data Editor. For information on controlling the display of custom attributes, see Displaying and Editing Custom Variable Attributes below.

Display Defined List of Attributes. Displays a list of custom attributes already defined for the dataset. Attribute names that begin with a dollar sign ($) are reserved attributes that cannot be modified.

This dialog box generates VARIABLE ATTRIBUTE command syntax.

Related Topics

Custom Variable Attributes
Displaying and Editing Custom Variable Attributes
Variable Attribute Arrays


Displaying and Editing Custom Variable Attributes

Custom variable attributes can be displayed and edited in the Data Editor in Variable View.

Expand Show details Collapse Hide details
Custom variable attributes displayed in Variable View

• Custom variable attribute names are enclosed in square brackets.

• Attribute names that begin with a dollar sign are reserved and cannot be modified.

• A blank cell indicates that the attribute does not exist for that variable; the text Empty displayed in a cell indicates that the attribute exists for that variable but no value has been assigned to the attribute for that variable. Once you enter text in the cell, the attribute exists for that variable with the value you enter.

• The text Array... displayed in a cell indicates that this is an attribute array--an attribute that contains multiple values. Click the button in the cell to display the list of values.

To Display and Edit Custom Variable Attributes Collapse Hide details

To Display and Edit Custom Variable Attributes

In Variable View, from the menus choose:

View
Customize Variable View...

Select (check) the custom variable attributes you want to display. (The custom variable attributes are the ones enclosed in square brackets.)

Once the attributes are displayed in Variable View, you can edit them directly in the Data Editor.

Related Topics

Custom Variable Attributes
Creating Custom Variable Attributes
Variable Attribute Arrays


Variable Attribute Arrays

The text Array... (displayed in a cell for a custom variable attribute in Variable View or in the Custom Variable Properties dialog box in Define Variable Properties) indicates that this is an attribute array, an attribute that contains multiple values. For example, you could have an attribute array that identifies all of the source variables used to compute a derived variable. Click the button in the cell to display and edit the list of values.

Related Topics

Custom Variable Attributes
Creating Custom Variable Attributes
Displaying and Editing Custom Variable Attributes


Customizing Variable View

Variable View,Variable View,Variable View
customizing,customizing,customizing

You can use Customize Variable View to control which attributes are displayed in Variable View (for example, name, type, label) and the order in which they are displayed.

• Any custom variable attributes associated with the dataset are enclosed in square brackets. See the topic Creating Custom Variable Attributes for more information.

• Customized display settings are saved with PASW Statistics data files.

• You can also control the default display and order of attributes in Variable View. See the topic Changing the Default Variable View for more information.

To Customize Variable View Collapse Hide details

To Customize Variable View

In Variable View, from the menus choose:

View
Customize Variable View...

Select (check) the variable attributes you want to display.

Use the up and down arrow buttons to change the display order of the attributes.

Restore Defaults. Apply the default display and order settings.


Spell Checking

spelling,spelling,spelling
Variable and Value Labels Collapse Hide details

Variable and Value Labels

To check the spelling of variable labels and value labels:

Select the Variable View tab in the Data Editor window.

Right-click on the Labels or Values column and from the context menu choose:

Spelling

or

In Variable View, from the menus choose:

Utilities
Spelling

or

In the Value Labels dialog box, click Spelling. (This limits the spell checking to the value labels for a particular variable.)

Spell checking is limited to variable labels and value labels in Variable View of the Data Editor.

String Data Values Collapse Hide details

String Data Values

To check the spelling of string data values:

Select the Data View tab of the Data Editor.

Optionally, select one or more variables (columns) to check. To select a variable, click the variable name at the top of the column.

From the menus choose:

Utilities
Spelling

• If there are no selected variables in Data View, all string variables will be checked.

• If there are no string variables in the dataset or the none of the selected variables is a string variable, the Spelling option on the Utilities menu is disabled.


Entering Data

entering data,entering data,entering data
data entry,data entry,data entry
Data Editor,Data Editor,Data Editor
entering data,entering data,entering data
Data Editor,Data Editor,Data Editor

In Data View, you can enter data directly in the Data Editor. You can enter data in any order. You can enter data by case or by variable, for selected areas or for individual cells.

• The active cell is highlighted.

• The variable name and row number of the active cell are displayed in the top left corner of the Data Editor.

• When you select a cell and enter a data value, the value is displayed in the cell editor at the top of the Data Editor.

• Data values are not recorded until you press Enter or select another cell.

• To enter anything other than simple numeric data, you must define the variable type first.

If you enter a value in an empty column, the Data Editor automatically creates a new variable and assigns a variable name.

Related Topics

To Enter Numeric Data
To Enter Non-Numeric Data
To Use Value Labels for Data Entry
Data Editor
Data View
Variable View
Variable Names
Variable Measurement Level
Custom Variable Attributes
Data Value Restrictions in the Data Editor
Editing Data
Case Selection Status in the Data Editor
Data Editor Display Options
Variable Names and Variable Labels in Dialog Box Lists
To Change Data Type
Copying Data Properties
Date Variables versus Date Format Variables
Transpose


To Enter Numeric Data

Data Editor,Data Editor,Data Editor
entering numeric data,entering numeric data,entering numeric data
entering data,entering data,entering data
numeric,numeric,numeric
Data Editor,Data Editor,Data Editor
entering data,entering data,entering data

Select a cell in Data View.

Enter the data value. (The value is displayed in the cell editor at the top of the Data Editor.)

To record the value, press Enter or select another cell.

Related Topics

Entering Data
To Enter Non-Numeric Data
To Use Value Labels for Data Entry


To Enter Non-Numeric Data

Data Editor,Data Editor,Data Editor
entering non-numeric data,entering non-numeric data,entering non-numeric data
entering data,entering data,entering data
non-numeric,non-numeric,non-numeric
Data Editor,Data Editor,Data Editor
entering data,entering data,entering data
string variables,string variables,string variables
entering data,entering data,entering data
string variables,string variables,string variables

Double-click a variable name at the top of the column in Data View or click the Variable View tab.

Click the button in the Type cell for the variable.

Select the data type in the Variable Type dialog box.

Click OK.

Double-click the row number or click the Data View tab.

Enter the data in the column for the newly defined variable.

Related Topics

Entering Data
To Enter Numeric Data
To Use Value Labels for Data Entry


To Use Value Labels for Data Entry

value labels,value labels,value labels
using for data entry,using for data entry,using for data entry
entering data,entering data,entering data
using value labels,using value labels,using value labels
value labels,value labels,value labels
entering data,entering data,entering data

If value labels aren't currently displayed in Data View, from the menus choose:

View
Value Labels

Click the cell in which you want to enter the value.

Choose a value label from the drop-down list.

The value is entered, and the value label is displayed in the cell.

Note: This process works only if you have defined value labels for the variable.

Related Topics

Entering Data
To Enter Numeric Data
To Enter Non-Numeric Data


Data Value Restrictions in the Data Editor

Data Editor,Data Editor,Data Editor
data value restrictions,data value restrictions,data value restrictions
Data Editor,Data Editor,Data Editor

The defined variable type and width determine the type of value that can be entered in the cell in Data View.

• If you type a character that is not allowed by the defined variable type, the character is not entered.

• For string variables, characters beyond the defined width are not allowed.

• For numeric variables, integer values that exceed the defined width can be entered, but the Data Editor displays either scientific notation or a portion of the value followed by an ellipsis (...) to indicate that the value is wider than the defined width. To display the value in the cell, change the defined width of the variable.

Note: Changing the column width does not affect the variable width.

Related Topics

Data Editor
Data View
Variable View
Variable Names
Variable Measurement Level
Custom Variable Attributes
Entering Data
Editing Data
Case Selection Status in the Data Editor
Data Editor Display Options


Editing Data

editing data,editing data,editing data
Data Editor,Data Editor,Data Editor
editing data,editing data,editing data
Data Editor,Data Editor,Data Editor

With the Data Editor, you can modify data values in Data View in many ways. You can:

• Change data values

• Cut, copy, and paste data values

• Add and delete cases

• Add and delete variables

• Change the order of variables

Related Topics

Replacing or Modifying Data Values
Cutting, Copying, and Pasting Data Values
Inserting New Cases
Inserting New Variables
To Change Data Type
Data Editor
Data View
Variable View
Variable Names
Variable Measurement Level
Custom Variable Attributes
Entering Data
Data Value Restrictions in the Data Editor
Case Selection Status in the Data Editor
Data Editor Display Options


Replacing or Modifying Data Values

To Delete the Old Value and Enter a New Value

In Data View, double-click the cell. (The cell value is displayed in the cell editor.)

Edit the value directly in the cell or in the cell editor.

Press Enter or select another cell to record the new value.


Cutting, Copying, and Pasting Data Values

editing data,editing data,editing data
Data Editor,Data Editor,Data Editor
editing data,editing data,editing data
Data Editor,Data Editor,Data Editor

You can cut, copy, and paste individual cell values or groups of values in the Data Editor. You can:

• Move or copy a single cell value to another cell

• Move or copy a single cell value to a group of cells

• Move or copy the values for a single case (row) to multiple cases

• Move or copy the values for a single variable (column) to multiple variables

• Move or copy a group of cell values to another group of cells

Related Topics

Data Conversion for Pasted Values in the Data Editor
To Change Data Type
Inserting New Cases
Inserting New Variables


Data Conversion for Pasted Values in the Data Editor

editing data,editing data,editing data
Data Editor,Data Editor,Data Editor
editing data,editing data,editing data
Data Editor,Data Editor,Data Editor

If the defined variable types of the source and target cells are not the same, the Data Editor attempts to convert the value. If no conversion is possible, the system-missing value is inserted in the target cell.

Converting numeric or date into string. Numeric (for example, numeric, dollar, dot, or comma) and date formats are converted to strings if they are pasted into a string variable cell. The string value is the numeric value as displayed in the cell. For example, for a dollar format variable, the displayed dollar sign becomes part of the string value. Values that exceed the defined string variable width are truncated.

Converting string into numeric or date. String values that contain acceptable characters for the numeric or date format of the target cell are converted to the equivalent numeric or date value. For example, a string value of 25/12/91 is converted to a valid date if the format type of the target cell is one of the day-month-year formats, but the value is converted to system-missing if the format type of the target cell is one of the month-day-year formats.

Converting date into numeric. Date and time values are converted to a number of seconds if the target cell is one of the numeric formats (for example, numeric, dollar, dot, or comma). Because dates are stored internally as the number of seconds since October 14, 1582, converting dates to numeric values can yield some extremely large numbers. For example, the date 10/29/91 is converted to a numeric value of 12,908,073,600.

Converting numeric into date or time. Numeric values are converted to dates or times if the value represents a number of seconds that can produce a valid date or time. For dates, numeric values that are less than 86,400 are converted to the system-missing value.

Related Topics

Cutting, Copying, and Pasting Data Values
To Change Data Type


Inserting New Cases

cases,cases,cases
inserting new cases,inserting new cases,inserting new cases
Data Editor,Data Editor,Data Editor
inserting new cases,inserting new cases,inserting new cases
cases,cases,cases
Data Editor,Data Editor,Data Editor

Entering data in a cell in a blank row automatically creates a new case. The Data Editor inserts the system-missing value for all other variables for that case. If there are any blank rows between the new case and the existing cases, the blank rows become new cases with the system-missing value for all variables. You can also insert new cases between existing cases.

Related Topics

To Insert New Cases between Existing Cases
Cutting, Copying, and Pasting Data Values
Inserting New Variables
To Change Data Type


To Insert New Cases between Existing Cases

In Data View, select any cell in the case (row) below the position where you want to insert the new case.

From the menus choose:

Edit
Insert Cases

A new row is inserted for the case, and all variables receive the system-missing value.


Inserting New Variables

Data Editor,Data Editor,Data Editor
inserting new variables,inserting new variables,inserting new variables
variables,variables,variables
inserting new variables,inserting new variables,inserting new variables
Data Editor,Data Editor,Data Editor
variables,variables,variables

Entering data in an empty column in Data View or in an empty row in Variable View automatically creates a new variable with a default variable name (the prefix var and a sequential number) and a default data format type (numeric). The Data Editor inserts the system-missing value for all cases for the new variable. If there are any empty columns in Data View or empty rows in Variable View between the new variable and the existing variables, these rows or columns also become new variables with the system-missing value for all cases. You can also insert new variables between existing variables.

Related Topics

To Insert New Variables between Existing Variables
Cutting, Copying, and Pasting Data Values
Inserting New Cases
To Change Data Type


To Insert New Variables between Existing Variables

Select any cell in the variable to the right of (Data View) or below (Variable View) the position where you want to insert the new variable.

From the menus choose:

Edit
Insert Variable

A new variable is inserted with the system-missing value for all cases.


To Move Variables

Data Editor,Data Editor,Data Editor
moving variables,moving variables,moving variables
variables,variables,variables
moving,moving,moving
Data Editor,Data Editor,Data Editor
variables,variables,variables

To select the variable, click the variable name in Data View or the row number for the variable in Variable View.

Drag and drop the variable to the new location.

If you want to place the variable between two existing variables: In Data View, drop the variable on the variable column to the right of where you want to place the variable, or in Variable View, drop the variable on the variable row below where you want to place the variable.


To Change Data Type

Data Editor,Data Editor,Data Editor
changing data type,changing data type,changing data type
data types,data types,data types
changing,changing,changing
Data Editor,Data Editor,Data Editor
data types,data types,data types

You can change the data type for a variable at any time by using the Variable Type dialog box in Variable View. The Data Editor will attempt to convert existing values to the new type. If no conversion is possible, the system-missing value is assigned. The conversion rules are the same as the rules for pasting data values to a variable with a different format type. If the change in data format may result in the loss of missing-value specifications or value labels, the Data Editor displays an alert box and asks whether you want to proceed with the change or cancel it.

Related Topics

Cutting, Copying, and Pasting Data Values
Data Conversion for Pasted Values in the Data Editor
Variable Names and Variable Labels in Dialog Box Lists
Data Editor
Data View
Variable View
Variable Names
Variable Measurement Level
Custom Variable Attributes
Entering Data
Copying Data Properties
Date Variables versus Date Format Variables
Transpose
Inserting New Cases
Inserting New Variables


Finding Cases, Variables, or Imputations

variables,variables,variables
finding in Data Editor,finding in Data Editor,finding in Data Editor
cases,cases,cases
finding in Data Editor,finding in Data Editor,finding in Data Editor
imputations,imputations,imputations
finding in Data Editor,finding in Data Editor,finding in Data Editor

The Go To dialog box finds the specified case (row) number or variable name in the Data Editor.

Cases

For cases, from the menus choose:

Edit
Go to Case...

Enter an integer value that represents the current row number in Data View.

Note: The current row number for a particular case can change due to sorting and other actions.

Variables

For variables, from the menus choose:

Edit
Go to Variable...

Enter the variable name or select the variable from the drop-down list.

Imputations

This feature requires the Missing Values option.

From the menus choose:

Edit
Go to Imputation...

Select the imputation (or Original data) from the drop-down list.

Alternatively, you can select the imputation from the drop-down list in the edit bar in Data View of the Data Editor.

Data Editor with imputation markings ON

Relative case position is preserved when selecting imputations. For example, if there are 1000 cases in the original dataset, case 1034, the 34th case in the first imputation, displays at the top of the grid. If you select imputation 2 in the dropdown, case 2034, the 34th case in imputation 2, would display at the top of the grid. If you select Original data in the dropdown, case 34 would display at the top of the grid. Column position is also preserved when navigating between imputations, so that it is easy to compare values between imputations.


Finding and Replacing Data and Attribute Values

To find and/or replace data values in Data View or attribute values in Variable View:

Click a cell in the column you want to search. (Finding and replacing values is restricted to a single column.)

From the menus choose:

Edit
Find

or

Edit
Replace

Data View

• You cannot search up in Data View. The search direction is always down.

• For dates and times, the formatted values as displayed in Data View are searched. For example, a date displayed as 10/28/2007 will not be found by a search for a date of 10-28-2007.

• For other numeric variables, Contains, Begins with, and Ends with search formatted values. For example, with the Begins with option, a search value of $123 for a Dollar format variable will find both $123.00 and $123.40 but not $1,234. With the Entire cell option, the search value can be formatted or unformatted (simple F numeric format), but only exact numeric values (to the precision displayed in the Data Editor) are matched.

• If value labels are displayed for the selected variable column, the label text is searched, not the underlying data value, and you cannot replace the label text.

Variable View

• Find is only available for the Name, Label, Values, Missing, and custom variable attribute columns.

• Replace is only available for the Label, Values, and custom attribute columns.

• In the Values (value labels) column, the search string can match either the data value or a value label.

Note: Replacing the data value will delete any previous value label associated with that value.


Case Selection Status in the Data Editor

Data Editor,Data Editor,Data Editor
filtered cases,filtered cases,filtered cases
filtered cases,filtered cases,filtered cases
in Data Editor,in Data Editor,in Data Editor
Data Editor,Data Editor,Data Editor
filtered cases,filtered cases,filtered cases

If you have selected a subset of cases but have not discarded unselected cases, unselected cases are marked in the Data Editor with a diagonal line (slash) through the row number.

Related Topics

Random Number Generators
Split File
Select Cases
Data Editor
Data View
Variable View
Variable Names
Variable Measurement Level
Custom Variable Attributes
Entering Data
Data Value Restrictions in the Data Editor
Editing Data
Data Editor Display Options


Data Editor Display Options

Data Editor,Data Editor,Data Editor
display options,display options,display options
value labels,value labels,value labels
in Data Editor,in Data Editor,in Data Editor
fonts,fonts,fonts
in Data Editor,in Data Editor,in Data Editor
Data Editor,Data Editor,Data Editor
value labels,value labels,value labels
fonts,fonts,fonts
Data Editor,Data Editor,Data Editor
multiple views/panes,multiple views/panes,multiple views/panes
multiple views/panes,multiple views/panes,multiple views/panes
Data Editor,Data Editor,Data Editor
pane splitter,pane splitter,pane splitter
Data Editor,Data Editor,Data Editor
window splitter,window splitter,window splitter
Data Editor,Data Editor,Data Editor

The View menu provides several display options for the Data Editor:

Fonts. This option controls the font characteristics of the data display.

Grid Lines. This option toggles the display of grid lines.

Value Labels. This option toggles between the display of actual data values and user-defined descriptive value labels. This option is available only in Data View.

Using Multiple Views

In Data View, you can create multiple views (panes) by using the splitters that are located below the horizontal scroll bar and to the right of the vertical scroll bar.

You can also use the Window menu to insert and remove pane splitters. To insert splitters:

In Data View, from the menus choose:

Window
Split

Splitters are inserted above and to the left of the selected cell.

• If the top left cell is selected, splitters are inserted to divide the current view approximately in half, both horizontally and vertically.

• If any cell other than the top cell in the first column is selected, a horizontal pane splitter is inserted above the selected cell.

• If any cell other than the first cell in the top row is selected, a vertical pane splitter is inserted to the left of the selected cell.

Related Topics

Data Editor
Data View
Variable View
Variable Names
Variable Measurement Level
Custom Variable Attributes
Entering Data
Data Value Restrictions in the Data Editor
Editing Data
Case Selection Status in the Data Editor


Run Pending Transformations

Click OK in the dialog box to run any pending transformations. You can then enter or edit data in the Data Editor.

Click No if you don't want to run pending transformations. If you have pending transformations, you will get a warning the first time that you try to edit data in the Data Editor. You can then edit data in the Data Editor, but your changes may be lost when the pending transformations are run (depending on the nature of the transformations).

To avoid pending transformations:

From the menus choose:

Edit
Options…

Click the Data tab.

Select Calculate values immediately.


Data Editor Printing

printing,printing,printing
data,data,data
Data Editor,Data Editor,Data Editor
printing,printing,printing
printing,printing,printing
Data Editor,Data Editor,Data Editor

A data file is printed as it appears on the screen.

• The information in the currently displayed view is printed. In Data View, the data are printed. In Variable View, data definition information is printed.

• Grid lines are printed if they are currently displayed in the selected view.

• Value labels are printed in Data View if they are currently displayed. Otherwise, the actual data values are printed.

Use the View menu in the Data Editor window to display or hide grid lines and toggle between the display of data values and value labels.

Related Topics

To Print Data Editor Contents


To Print Data Editor Contents

Make the Data Editor the active window.

Click the tab for the view that you want to print.

From the menus choose:

File
Print...


Working with Multiple Data Sources

data files,data files,data files
multiple open data files,multiple open data files,multiple open data files
Data Editor,Data Editor,Data Editor
multiple open data files,multiple open data files,multiple open data files
multiple open data files,multiple open data files,multiple open data files

Starting with version 14.0, multiple data sources can be open at the same time, making it easier to:

• Switch back and forth between data sources.

• Compare the contents of different data sources.

• Copy and paste data between data sources.

• Create multiple subsets of cases and/or variables for analysis.

• Merge multiple data sources from various data formats (for example, spreadsheet, database, text data) without saving each data source first.

Related Topics

Basic Handling of Multiple Data Sources
Working with Multiple Datasets in Command Syntax
Copying and Pasting Information between Datasets
Renaming Datasets
Suppressing Multiple Datasets


Basic Handling of Multiple Data Sources

By default, each data source that you open is displayed in a new Data Editor window. (See General Options for information on changing the default behavior to only display one dataset at a time, in a single Data Editor window.)

• Any previously open data sources remain open and available for further use.

• When you first open a data source, it automatically becomes the active dataset.

• You can change the active dataset simply by clicking anywhere in the Data Editor window of the data source that you want to use or by selecting the Data Editor window for that data source from the Window menu.

• Only the variables in the active dataset are available for analysis.

• You cannot change the active dataset when any dialog box that accesses the data is open (including all dialog boxes that display variable lists).

• At least one Data Editor window must be open during a session. When you close the last open Data Editor window, PASW Statistics automatically shuts down, prompting you to save changes first.

Note: If you use command syntax to open data sources (for example, GET FILE, GET DATA), you need to name each dataset explicitly in order to have more than one data source open at the same time. See the topic DATASET NAME for more information.

Related Topics

Working with Multiple Data Sources
Working with Multiple Datasets in Command Syntax
Copying and Pasting Information between Datasets
Renaming Datasets
Suppressing Multiple Datasets


Working with Multiple Datasets in Command Syntax

If you use command syntax to open data sources (for example, GET FILE, GET DATA), you need to use the DATASET NAME command to name each dataset explicitly in order to have more than one data source open at the same time. See the topic DATASET NAME for more information.

When working with command syntax, the active dataset name is displayed on the toolbar of the syntax window. All of the following actions can change the active dataset:

• Use the DATASET ACTIVATE command. See the topic DATASET ACTIVATE for more information.

• Click anywhere in the Data Editor window of a dataset.

• Select a dataset name from the toolbar in the syntax window.

Open datasets displayed on syntax window toolbar

Related Topics

Working with Multiple Data Sources
Basic Handling of Multiple Data Sources
Copying and Pasting Information between Datasets
Renaming Datasets
Suppressing Multiple Datasets


Copying and Pasting Information between Datasets

You can copy both data and variable definition attributes from one dataset to another dataset in basically the same way that you copy and paste information within a single data file.

• Copying and pasting selected data cells in Data View pastes only the data values, with no variable definition attributes.

• Copying and pasting an entire variable in Data View by selecting the variable name at the top of the column pastes all of the data and all of the variable definition attributes for that variable.

• Copying and pasting variable definition attributes or entire variables in Variable View pastes the selected attributes (or the entire variable definition) but does not paste any data values.

Related Topics

Working with Multiple Data Sources
Basic Handling of Multiple Data Sources
Working with Multiple Datasets in Command Syntax
Renaming Datasets
Suppressing Multiple Datasets


Renaming Datasets

datasets,datasets,datasets
renaming,renaming,renaming
renaming datasets,renaming datasets,renaming datasets

When you open a data source through the menus and dialog boxes, each data source is automatically assigned a dataset name of DataSetn, where n is a sequential integer value, and when you open a data source using command syntax, no dataset name is assigned unless you explicitly specify one with DATASET NAME. To provide more descriptive dataset names:

From the menus in the Data Editor window for the dataset whose name you want to change choose:

File
Rename Dataset...

Enter a new dataset name that conforms to variable naming rules. See the topic Variable Names for more information.

Related Topics

Working with Multiple Data Sources
Basic Handling of Multiple Data Sources
Working with Multiple Datasets in Command Syntax
Copying and Pasting Information between Datasets
Suppressing Multiple Datasets


Suppressing Multiple Datasets

multiple open data files,multiple open data files,multiple open data files
suppressing,suppressing,suppressing

If you prefer to have only one dataset available at a time and want to suppress the multiple dataset feature:

From the menus choose:

Edit
Options...

Click the General tab.

Select (check) Open only one dataset at a time.

See the topic General Options for more information.

Related Topics

Working with Multiple Data Sources
Basic Handling of Multiple Data Sources
Working with Multiple Datasets in Command Syntax
Copying and Pasting Information between Datasets
Renaming Datasets


Data Preparation

Once you've opened a data file or entered data in the Data Editor, you can start creating reports, charts, and analyses without any additional preliminary work. However, there are some additional data preparation features that you may find useful, including the ability to:

• Assign variable properties that describe the data and determine how certain values should be treated.

• Identify cases that may contain duplicate information and exclude those cases from analyses or delete them from the data file. See the topic Identifying Duplicate Cases for more information.

• Create new variables with a few distinct categories that represent ranges of values from variables with a large number of possible values. See the topic Visual Binning for more information.


Variable Properties

Data entered in the Data Editor in Data View or read from an external file format (such as an Excel spreadsheet or a text data file) lack certain variable properties that you may find very useful, including:

• Definition of descriptive value labels for numeric codes (for example, 0 = Male and 1 = Female).

• Identification of missing values codes (for example, 99 = Not applicable).

• Assignment of measurement level (nominal, ordinal, or scale).

All of these variable properties (and others) can be assigned in Variable View in the Data Editor. There are also several utilities that can assist you in this process:

• Define Variable Properties can help you define descriptive value labels and missing values. This is particularly useful for categorical data with numeric codes used for category values. See the topic Defining Variable Properties for more information.

• Copy Data Properties provides the ability to use an existing PASW Statistics data file as a template for file and variable properties in the current data file. This is particularly useful if you frequently use external-format data files that contain similar content (such as monthly reports in Excel format). See the topic Copying Data Properties for more information.

See the topic Variable View for more information.


Defining Variable Properties

defining variables,defining variables,defining variables
value labels,value labels,value labels
value labels,value labels,value labels
defining variables,defining variables,defining variables

Define Variable Properties is designed to assist you in the process of assigning attributes to variables, including creating descriptive value labels for categorical (nominal, ordinal) variables. Define Variable Properties:

• Scans the actual data values and lists all unique data values for each selected variable.

• Identifies unlabeled values and provides an "auto-label" feature.

• Provides the ability to copy defined value labels and other attributes from another variable to the selected variable or from the selected variable to multiple additional variables.

Note: To use Define Variable Properties without first scanning cases, enter 0 for the number of cases to scan.

In the first step of Define Variable Properties, you:

Select the variables for which you want to create value labels or define/change other variable properties, such as missing values or descriptive variable labels.

Specify the number of cases to scan to generate the list of unique values. This is particularly useful for data files with a large number of cases for which a scan of the complete data file might take a significant amount of time.

Specify an upper limit for the number of unique values to display. This is primarily useful to prevent listing hundreds, thousands, or even millions of values for scale (continuous interval, ratio) variables.

Related Topics

To Define Variable Properties
Defining Value Labels and Other Variable Properties
Assigning the Measurement Level
Custom Variable Attributes
Copying Variable Properties


To Define Variable Properties

From the menus choose:

Data
Define Variable Properties...

Select the numeric or string variables for which you want to create value labels or define or change other variable properties, such as missing values or descriptive variable labels.

Specify the number of cases to scan to generate the list of unique values. This is particularly useful for data files with a large number of cases for which a scan of the complete data file might take a significant amount of time.

Specify an upper limit for the number of unique values to display. This is primarily useful to prevent listing hundreds, thousands, or even millions of values for scale (continuous interval, ratio) variables.

Click Continue to open the main Define Variable Properties dialog box.

Select a variable for which you want to create value labels or define or change other variable properties.

Enter the label text for any unlabeled values that are displayed in the Value Label grid.

If there are values for which you want to create value labels but those values are not displayed, you can enter values in the Value column below the last scanned value.

Repeat this process for each listed variable for which you want to create value labels.

Click OK to apply the value labels and other variable properties.

Optionally, you can:

• Automatically determine an appropriate measurement level for a variable.

• Assign variable roles.

• Copy value labels and other attributes from another variable to the selected variable.

• Copy value labels and other attributes from the selected variable to multiple other variables.

• Auto-label values that don't have value labels, using the data value as the label.

• Designate categories as containing missing values.

• Change the variable label and/or display format.

Related Topics

Defining Variable Properties
Defining Value Labels and Other Variable Properties
Assigning the Measurement Level
Custom Variable Attributes
Copying Variable Properties


Defining Value Labels and Other Variable Properties

The Define Variable Properties main dialog box provides the following information for the scanned variables:

Scanned Variable List. For each scanned variable, a check mark in the Unlabeled (U.) column indicates that the variable contains values without assigned value labels.

To sort the variable list to display all variables with unlabeled values at the top of the list:

Click the Unlabeled column heading under Scanned Variable List.

You can also sort by variable name or measurement level by clicking the corresponding column heading under Scanned Variable List.

Value Label Grid

• Label. Displays any value labels that have already been defined. You can add or change labels in this column.

• Value. Unique values for each selected variable. This list of unique values is based on the number of scanned cases. For example, if you scanned only the first 100 cases in the data file, then the list reflects only the unique values present in those cases. If the data file has already been sorted by the variable for which you want to assign value labels, the list may display far fewer unique values than are actually present in the data.

• Count. The number of times each value occurs in the scanned cases.

• Missing. Values defined as representing missing data. You can change the missing values designation of the category by clicking the check box. A check indicates that the category is defined as a user-missing category. If a variable already has a range of values defined as user-missing (for example, 90-99), you cannot add or delete missing values categories for that variable with Define Variable Properties. You can use Variable View in the Data Editor to modify the missing values categories for variables with missing values ranges. See the topic Missing Values for more information.

• Changed. Indicates that you have added or changed a value label.

To change or add a value label, simply enter the text of the value label in the Label column.

If there are values for which you want to create value labels but those values are not displayed, you can enter values in the Value column below the last scanned value.

Note: If you specified 0 for the number of cases to scan in the initial dialog box, the Value Label grid will initially be blank, except for any preexisting value labels and/or defined missing values categories for the selected variable. In addition, the Suggest button for the measurement level will be disabled.

Measurement Level. Value labels are primarily useful for categorical (nominal and ordinal) variables, and some procedures treat categorical and scale variables differently; so it is sometimes important to assign the correct measurement level. However, by default, all new numeric variables are assigned the scale measurement level. Thus, many variables that are in fact categorical may initially be displayed as scale.

If you are unsure of what measurement level to assign to a variable, click Suggest.

Role. Some dialogs support the ability to pre-select variables for analysis based on defined roles. See the topic Roles for more information.

Copy Properties. You can copy value labels and other variable properties from another variable to the currently selected variable or from the currently selected variable to one or more other variables.

Unlabeled Values. To create labels for unlabeled values automatically, click Automatic Labels.

Variable Label and Display Format

You can change the descriptive variable label and the display format.

• You cannot change the variable's fundamental type (string or numeric).

• For string variables, you can change only the variable label, not the display format.

• For numeric variables, you can change the numeric type (such as numeric, date, dollar, or custom currency), width (maximum number of digits, including any decimal and/or grouping indicators), and number of decimal positions.

• For numeric date format, you can select a specific date format (such as dd-mm-yyyy, mm/dd/yy, and yyyyddd)

• For numeric custom format, you can select one of five custom currency formats (CCA through CCE). See the topic Currency Options for more information.

• An asterisk is displayed in the Value column if the specified width is less than the width of the scanned values or the displayed values for preexisting defined value labels or missing values categories.

• A period (.) is displayed if the scanned values or the displayed values for preexisting defined value labels or missing values categories are invalid for the selected display format type. For example, an internal numeric value of less than 86,400 is invalid for a date format variable.

Related Topics

Defining Variable Properties
To Define Variable Properties
Assigning the Measurement Level
Custom Variable Attributes
Copying Variable Properties


Assigning the Measurement Level

level of measurement,level of measurement,level of measurement
measurement level,measurement level,measurement level
scale,scale,scale
measurement level,measurement level,measurement level
nominal,nominal,nominal
measurement level,measurement level,measurement level
ordinal,ordinal,ordinal
measurement level,measurement level,measurement level
categorical data,categorical data,categorical data

When you click Suggest for the measurement level in the Define Variable Properties main dialog box, the current variable is evaluated based on the scanned cases and defined value labels, and a measurement level is suggested in the Suggest Measurement Level dialog box that opens. The Explanation area provides a brief description of the criteria used to provide the suggested measurement level.

Note: Values defined as representing missing values are not included in the evaluation for measurement level. For example, the explanation for the suggested measurement level may indicate that the suggestion is in part based on the fact that the variable contains no negative values, whereas it may in fact contain negative values--but those values are already defined as missing values.

Click Continue to accept the suggested level of measurement or Cancel to leave the measurement level unchanged.

Related Topics

Defining Variable Properties
To Define Variable Properties
Defining Value Labels and Other Variable Properties
Custom Variable Attributes
Copying Variable Properties


Custom Variable Attributes

The Attributes button in Define Variable Properties opens the Custom Variable Attributes dialog box. In addition to the standard variable attributes, such as value labels, missing values, and measurement level, you can create your own custom variable attributes. Like standard variable attributes, these custom attributes are saved with PASW Statistics data files.

Expand Show details Collapse Hide details
Custom Variable Attributes

Name. Attribute names must follow the same rules as variable names. See the topic Variable Names for more information.

Value. The value assigned to the attribute for the selected variable.

• Attribute names that begin with a dollar sign are reserved and cannot be modified. You can view the contents of a reserved attribute by clicking on the button in the desired cell.

• The text Array..., displayed in a Value cell, indicates that this is an attribute array, an attribute that contains multiple values. Click the button in the cell to display the list of values.

Related Topics

Defining Variable Properties
To Define Variable Properties
Defining Value Labels and Other Variable Properties
Assigning the Measurement Level
Copying Variable Properties
Custom Variable Attribute Arrays


Custom Variable Attribute Arrays

The text Array... (displayed in a cell for a custom variable attribute in Variable View or in the Custom Variable Properties dialog box in Define Variable Properties) indicates that this is an attribute array, an attribute that contains multiple values. For example, you could have an attribute array that identifies all of the source variables used to compute a derived variable. Click the button in the cell to display and edit the list of values.

Related Topics

Custom Variable Attributes


Copying Variable Properties

value labels,value labels,value labels
copying,copying,copying
applying to multiple variables,applying to multiple variables,applying to multiple variables

The Apply Labels and Level dialog box is displayed when you click From Another Variable or To Other Variables in the Define Variable Properties main dialog box. It displays all of the scanned variables that match the current variable's type (numeric or string). For string variables, the defined width must also match.

Select a single variable from which to copy value labels and other variable properties (except variable label).

or

Select one or more variables to which to copy value labels and other variable properties.

Click Copy to copy the value labels and the measurement level.

• Existing value labels and missing value categories for target variable(s) are not replaced.

• Value labels and missing value categories for values not already defined for the target variable(s) are added to the set of value labels and missing value categories for the target variable(s).

• The measurement level for the target variable is always replaced.

• The role for the target variable is always replaced.

• If either the source or target variable has a defined range of missing values, missing values definitions are not copied.

Related Topics

Defining Variable Properties
To Define Variable Properties
Defining Value Labels and Other Variable Properties
Assigning the Measurement Level
Custom Variable Attributes


Multiple Response Sets

Custom Tables and the Chart Builder support a special kind of "variable" called a multiple response set. Multiple response sets aren't really "variables" in the normal sense. You can't see them in the Data Editor, and other procedures don't recognize them. Multiple response sets use multiple variables to record responses to questions where the respondent can give more than one answer. Multiple response sets are treated like categorical variables, and most of the things you can do with categorical variables, you can also do with multiple response sets.

Multiple response sets are constructed from multiple variables in the data file. A multiple response set is a special construct within a data file. You can define and save multiple response sets in PASW Statistics data files, but you cannot import or export multiple response sets from/to other file formats. You can copy multiple response sets from other PASW Statistics data files using Copy Data Properties, which is accessed from the Data menu in the Data Editor window. See the topic Copying Data Properties for more information.

Related Topics

Defining Multiple Response Sets
Multiple Response Sets
MRSETS


Defining Multiple Response Sets

multiple response sets,multiple response sets,multiple response sets
defining,defining,defining
multiple dichotomies,multiple dichotomies,multiple dichotomies
multiple categories,multiple categories,multiple categories

To define multiple response sets:

From the menus, choose:

Data
Define Multiple Response Sets...

Select two or more variables. If your variables are coded as dichotomies, indicate which value you want to have counted.

Enter a unique name for each multiple response set. The name can be up to 63 bytes long. A dollar sign is automatically added to the beginning of the set name.

Enter a descriptive label for the set. (This is optional.)

Click Add to add the multiple response set to the list of defined sets.

Dichotomies Collapse Hide details

Dichotomies

A multiple dichotomy set typically consists of multiple dichotomous variables: variables with only two possible values of a yes/no, present/absent, checked/not checked nature. Although the variables may not be strictly dichotomous, all of the variables in the set are coded the same way, and the Counted Value represents the positive/present/checked condition.

For example, a survey asks the question, "Which of the following sources do you rely on for news?" and provides five possible responses. The respondent can indicate multiple choices by checking a box next to each choice. The five responses become five variables in the data file, coded 0 for No (not checked) and 1 for Yes (checked). In the multiple dichotomy set, the Counted Value is 1.

Categories Collapse Hide details

Categories

A multiple category set consists of multiple variables, all coded the same way, often with many possible response categories. For example, a survey item states, "Name up to three nationalities that best describe your ethnic heritage." There may be hundreds of possible responses, but for coding purposes the list is limited to the 40 most common nationalities, with everything else relegated to an "other" category. In the data file, the three choices become three variables, each with 41 categories (40 coded nationalities and one "other" category).

Category Label Source Collapse Hide details

Category Label Source

For multiple dichotomies, you can control how sets are labeled.

• Variable labels. Uses the defined variable labels (or variable names for variables without defined variable labels) as the set category labels. For example, if all of the variables in the set have the same value label (or no defined value labels) for the counted value (for example, Yes), then you should use the variable labels as the set category labels.

• Labels of counted values. Uses the defined value labels of the counted values as set category labels. Select this option only if all variables have a defined value label for the counted value and the value label for the counted value is different for each variable.

• Use variable label as set label. If you select Label of counted values, you can also use the variable label for the first variable in the set with a defined variable label as the set label. If none of the variables in the set have defined variable labels, the name of the first variable in the set is used as the set label.

Related Topics

Multiple Response Sets
Multiple Response Sets
MRSETS


Copying Data Properties

data dictionary,data dictionary,data dictionary
applying from another file,applying from another file,applying from another file
defining variables,defining variables,defining variables
applying a data dictionary,applying a data dictionary,applying a data dictionary
templates,templates,templates
using an external data file as a template,using an external data file as a template,using an external data file as a template

The Copy Data Properties Wizard provides the ability to use an external PASW Statistics data file as a template for defining file and variable properties in the active dataset. You can also use variables in the active dataset as templates for other variables in the active dataset. You can:

• Copy selected file properties from an external data file or open dataset to the active dataset. File properties include documents, file labels, multiple response sets, variable sets, and weighting.

• Copy selected variable properties from an external data file or open dataset to matching variables in the active dataset. Variable properties include value labels, missing values, level of measurement, variable labels, print and write formats, alignment, and column width (in the Data Editor).

• Copy selected variable properties from one variable in either an external data file, open dataset, or the active dataset to many variables in the active dataset.

• Create new variables in the active dataset based on selected variables in an external data file or open dataset.

When copying data properties, the following general rules apply:

• If you use an external data file as the source data file, it must be a data file in PASW Statistics format.

• If you use the active dataset as the source data file, it must contain at least one variable. You cannot use a completely blank active dataset as the source data file.

• Undefined (empty) properties in the source dataset do not overwrite defined properties in the active dataset.

• Variable properties are copied from the source variable only to target variables of a matching type--string (alphanumeric) or numeric (including numeric, date, and currency).

Note: Copy Data Properties replaces Apply Data Dictionary, formerly available on the File menu.

Related Topics

To Copy Data Properties
Weight Cases
Selecting Source and Target Variables
Choosing Variable Properties to Copy
Copying Dataset (File) Properties
Results
Variable Names and Variable Labels in Dialog Box Lists
Data Editor
Data View
Variable View
Variable Names
Variable Measurement Level
Custom Variable Attributes
Entering Data
To Change Data Type
Date Variables versus Date Format Variables
Transpose
APPLY DICTIONARY


To Copy Data Properties

From the menus in the Data Editor window choose:

Data
Copy Data Properties...

Select the data file with the file and/or variable properties that you want to copy. This can be a currently open dataset, an external PASW Statistics data file, or the active dataset.

Follow the step-by-step instructions in the Copy Data Properties Wizard.

Related Topics

Copying Data Properties
Selecting Source and Target Variables
Choosing Variable Properties to Copy
Copying Dataset (File) Properties
Results


Selecting Source and Target Variables

In this step, you can specify the source variables containing the variable properties that you want to copy and the target variables that will receive those variable properties.

Apply properties from selected source dataset variables to matching active dataset variables. Variable properties are copied from one or more selected source variables to matching variables in the active dataset. Variables "match" if both the variable name and type (string or numeric) are the same. For string variables, the defined length must also be the same. By default, only matching variables are displayed in the two variable lists.

• Create matching variables in the active dataset if they do not already exist. This updates the source list to display all variables in the source data file. If you select source variables that do not exist in the active dataset (based on variable name), new variables will be created in the active dataset with the variable names and properties from the source data file.

If the active dataset contains no variables (a blank, new dataset), all variables in the source data file are displayed and new variables based on the selected source variables are automatically created in the active dataset.

Apply properties from a single source variable to selected active dataset variables of the same type. Variable properties from a single selected variable in the source list can be applied to one or more selected variables in the active dataset list. Only variables of the same type (numeric or string) as the selected variable in the source list are displayed in the active dataset list. For string variables, only strings of the same defined length as the source variable are displayed. This option is not available if the active dataset contains no variables.

Note: You cannot create new variables in the active dataset with this option.

Apply dataset properties only--no variable selection. Only file properties (for example, documents, file label, weight) will be applied to the active dataset. No variable properties will be applied. This option is not available if the active dataset is also the source data file.

Related Topics

Copying Data Properties
To Copy Data Properties
Choosing Variable Properties to Copy
Copying Dataset (File) Properties
Results


Choosing Variable Properties to Copy

You can copy selected variable properties from the source variables to the target variables. Undefined (empty) properties in the source variables do not overwrite defined properties in the target variables.

Value Labels. Value labels are descriptive labels associated with data values. Value labels are often used when numeric data values are used to represent non-numeric categories (for example, codes of 1 and 2 for Male and Female). You can replace or merge value labels in the target variables.

• Replace deletes any defined value labels for the target variable and replaces them with the defined value labels from the source variable.

• Merge merges the defined value labels from the source variable with any existing defined value label for the target variable. If the same value has a defined value label in both the source and target variables, the value label in the target variable is unchanged.

Custom Attributes. User-defined custom variable attributes. See the topic Custom Variable Attributes for more information.

• Replace deletes any custom attributes for the target variable and replaces them with the defined attributes from the source variable.

• Merge merges the defined attributes from the source variable with any existing defined attributes for the target variable.

Missing Values. Missing values are values identified as representing missing data (for example, 98 for Do not know and 99 for Not applicable). Typically, these values also have defined value labels that describe what the missing value codes stand for. Any existing defined missing values for the target variable are deleted and replaced with the defined missing values from the source variable.

Variable Label. Descriptive variable labels can contain spaces and reserved characters not allowed in variable names. If you're copying variable properties from a single source variable to multiple target variables, you might want to think twice before selecting this option.

Measurement Level. The measurement level can be nominal, ordinal, or scale.

Role. Some dialogs support the ability to pre-select variables for analysis based on defined roles. See the topic Roles for more information.

Formats. For numeric variables, this controls numeric type (such as numeric, date, or currency), width (total number of displayed characters, including leading and trailing characters and decimal indicator), and number of decimal places displayed. This option is ignored for string variables.

Alignment. This affects only alignment (left, right, center) in Data View in the Data Editor.

Data Editor Column Width. This affects only column width in Data View in the Data Editor.

Related Topics

Copying Data Properties
To Copy Data Properties
Selecting Source and Target Variables
Copying Dataset (File) Properties
Results


Copying Dataset (File) Properties

You can apply selected, global dataset properties from the source data file to the active dataset. (This is not available if the active dataset is the source data file.)

Multiple Response Sets. Applies multiple response set definitions from the source data file to the active dataset.

• Multiple response sets that contain no variables in the active dataset are ignored unless those variables will be created based on specifications in step 2 (Selecting Source and Target Variables) in the Copy Data Properties Wizard.

• Replace deletes all multiple response sets in the active dataset and replaces them with the multiple response sets from the source data file.

• Merge adds multiple response sets from the source data file to the collection of multiple response sets in the active dataset. If a set with the same name exists in both files, the existing set in the active dataset is unchanged.

Variable Sets. Variable sets are used to control the list of variables that are displayed in dialog boxes. Variable sets are defined by selecting Define Variable Sets from the Utilities menu.

• Sets in the source data file that contain variables that do not exist in the active dataset are ignored unless those variables will be created based on specifications in step 2 (Selecting Source and Target Variables) in the Copy Data Properties Wizard.

• Replace deletes any existing variable sets in the active dataset, replacing them with variable sets from the source data file.

• Merge adds variable sets from the source data file to the collection of variable sets in the active dataset. If a set with the same name exists in both files, the existing set in the active dataset is unchanged.

Documents. Notes appended to the data file via the DOCUMENT command.

• Replace deletes any existing documents in the active dataset, replacing them with the documents from the source data file.

• Merge combines documents from the source and active dataset. Unique documents in the source file that do not exist in the active dataset are added to the active dataset. All documents are then sorted by date.

Custom Attributes. Custom data file attributes, typically created with the DATAFILE ATTRIBUTE command in command syntax.

• Replace deletes any existing custom data file attributes in the active dataset, replacing them with the data file attributes from the source data file.

• Merge combines data file attributes from the source and active dataset. Unique attribute names in the source file that do not exist in the active dataset are added to the active dataset. If the same attribute name exists in both data files, the named attribute in the active dataset is unchanged.

Weight Specification. Weights cases by the current weight variable in the source data file if there is a matching variable in the active dataset. This overrides any weighting currently in effect in the active dataset.

File Label. Descriptive label applied to a data file with the FILE LABEL command.

Related Topics

Copying Data Properties
To Copy Data Properties
Selecting Source and Target Variables
Choosing Variable Properties to Copy
Results


Results

The last step in the Copy Data Properties Wizard provides information on the number of variables for which variable properties will be copied from the source data file, the number of new variables that will be created, and the number of dataset (file) properties that will be copied.

You can also choose to paste the generated command syntax into a syntax window and save the syntax for later use.

Related Topics

Copying Data Properties
To Copy Data Properties
Selecting Source and Target Variables
Choosing Variable Properties to Copy
Copying Dataset (File) Properties


Identifying Duplicate Cases

duplicate cases (records),duplicate cases (records),duplicate cases (records)
finding and filtering,finding and filtering,finding and filtering
cases,cases,cases
finding duplicates,finding duplicates,finding duplicates

"Duplicate" cases may occur in your data for many reasons, including:

• Data entry errors in which the same case is accidentally entered more than once.

• Multiple cases share a common primary ID value but have different secondary ID values, such as family members who all live in the same house.

• Multiple cases represent the same case but with different values for variables other than those that identify the case, such as multiple purchases made by the same person or company for different products or at different times.

Identify Duplicate Cases allows you to define duplicate almost any way that you want and provides some control over the automatic determination of primary versus duplicate cases.

How to Identify Duplicate Cases Collapse Hide details

To Identify and Flag Duplicate Cases

From the menus choose:

Data
Identify Duplicate Cases...

Select one or more variables that identify matching cases.

Select one or more of the options in the Variables to Create group.

Optionally, you can:

Select one or more variables to sort cases within groups defined by the selected matching cases variables. The sort order defined by these variables determines the "first" and "last" case in each group. Otherwise, the original file order is used.

Automatically filter duplicate cases so that they won't be included in reports, charts, or calculations of statistics.

Define matching cases by. Cases are considered duplicates if their values match for all selected variables. If you want to identify only cases that are a 100% match in all respects, select all of the variables.

Sort within matching groups by. Cases are automatically sorted by the variables that define matching cases. You can select additional sorting variables that will determine the sequential order of cases in each matching group.

Expand Show details Collapse Hide details

• For each sort variable, you can sort in ascending or descending order.

• If you select multiple sort variables, cases are sorted by each variable within categories of the preceding variable in the list. For example, if you select date as the first sorting variable and amount as the second sorting variable, cases will be sorted by amount within each date.

• Use the up and down arrow buttons to the right of the list to change the sort order of the variables.

• The sort order determines the "first" and "last" case within each matching group, which determines the value of the optional primary indicator variable. For example, if you want to filter out all but the most recent case in each matching group, you could sort cases within the group in ascending order of a date variable, which would make the most recent date the last date in the group.

Indicator of primary cases. Creates a variable with a value of 1 for all unique cases and the case identified as the primary case in each group of matching cases and a value of 0 for the nonprimary duplicates in each group.

Expand Show details Collapse Hide details

• The primary case can be either the last or first case in each matching group, as determined by the sort order within the matching group. If you don't specify any sort variables, the original file order determines the order of cases within each group.

• You can use the indicator variable as a filter variable to exclude nonprimary duplicates from reports and analyses without deleting those cases from the data file.

Sequential count of matching cases in each group. Creates a variable with a sequential value from 1 to n for cases in each matching group. The sequence is based on the current order of cases in each group, which is either the original file order or the order determined by any specified sort variables.

Move matching cases to the top. Sorts the data file so that all groups of matching cases are at the top of the data file, making it easy to visually inspect the matching cases in the Data Editor.

Display frequencies for created variables. Frequency tables containing counts for each value of the created variables. For example, for the primary indicator variable, the table would show the number of cases with a value 0 for that variable, which indicates the number of duplicates, and the number of cases with a value of 1 for that variable, which indicates the number of unique and primary cases.

Missing Values. For numeric variables, the system-missing value is treated like any other value—cases with the system-missing value for an identifier variable are treated as having matching values for that variable. For string variables, cases with no value for an identifier variable are treated as having matching values for that variable.


Visual Binning

recoding values,recoding values,recoding values
banding,banding,banding
Visual Bander,Visual Bander,Visual Bander
categorical data,categorical data,categorical data
converting interval data to discrete categories,converting interval data to discrete categories,converting interval data to discrete categories
binning,binning,binning
collapsing categories,collapsing categories,collapsing categories
scale variables,scale variables,scale variables
binning to create categorical variables,binning to create categorical variables,binning to create categorical variables

Visual Binning is designed to assist you in the process of creating new variables based on grouping contiguous values of existing variables into a limited number of distinct categories. You can use Visual Binning to:

• Create categorical variables from continuous scale variables. For example, you could use a scale income variable to create a new categorical variable that contains income ranges.

• Collapse a large number of ordinal categories into a smaller set of categories. For example, you could collapse a rating scale of nine down to three categories representing low, medium, and high.

In the first step, you:

Select the numeric scale and/or ordinal variables for which you want to create new categorical (binned) variables.

Optionally, you can limit the number of cases to scan. For data files with a large number of cases, limiting the number of cases scanned can save time, but you should avoid this if possible because it will affect the distribution of values used in subsequent calculations in Visual Binning.

Note: String variables and nominal numeric variables are not displayed in the source variable list. Visual Binning requires numeric variables, measured on either a scale or ordinal level, since it assumes that the data values represent some logical order that can be used to group values in a meaningful fashion. You can change the defined measurement level of a variable in Variable View in the Data Editor. See the topic Variable Measurement Level for more information.

Related Topics

To Bin Variables
Binning Variables
Automatically Generating Binned Categories
Copying Binned Categories
User-Missing Values in Visual Binning
Recode into Same Variables


To Bin Variables

From the menus in the Data Editor window choose:

Transform
Visual Binning...

Select the numeric scale and/or ordinal variables for which you want to create new categorical (binned) variables.

Note: String variables and nominal numeric variables are not displayed in the source variable list. Visual Binning requires numeric variables, measured on either a scale or ordinal level, since it assume that the data values represent some logical order that can be used to group values in a meaningful fashion.

Select a variable in the Scanned Variable List.

Enter a name for the new binned variable. Variable names must be unique and must follow variable naming rules. See the topic Variable Names for more information.

Define the binning criteria for the new variable. See the topic Binning Variables for more information.

Click OK.

Related Topics

Visual Binning
Binning Variables
Automatically Generating Binned Categories
Copying Binned Categories
User-Missing Values in Visual Binning


Binning Variables

The Visual Binning main dialog box provides the following information for the scanned variables:

Scanned Variable List. Displays the variables you selected in the initial dialog box. You can sort the list by measurement level (scale or ordinal) or by variable label or name by clicking on the column headings.

Cases Scanned. Indicates the number of cases scanned. All scanned cases without user-missing or system-missing values for the selected variable are used to generate the distribution of values used in calculations in Visual Binning, including the histogram displayed in the main dialog box and cutpoints based on percentiles or standard deviation units.

Missing Values. Indicates the number of scanned cases with user-missing or system-missing values. Missing values are not included in any of the binned categories. See the topic User-Missing Values in Visual Binning for more information.

Current Variable. The name and variable label (if any) for the currently selected variable that will be used as the basis for the new, binned variable.

Binned Variable. Name and optional variable label for the new, binned variable.

• Name. You must enter a name for the new variable. Variable names must be unique and must follow variable naming rules. See the topic Variable Names for more information.

• Label. You can enter a descriptive variable label up to 255 characters long. The default variable label is the variable label (if any) or variable name of the source variable with (Binned) appended to the end of the label.

Minimum and Maximum. Minimum and maximum values for the currently selected variable, based on the scanned cases and not including values defined as user-missing.

Nonmissing Values. The histogram displays the distribution of nonmissing values for the currently selected variable, based on the scanned cases.

• After you define bins for the new variable, vertical lines on the histogram are displayed to indicate the cutpoints that define bins.

• You can click and drag the cutpoint lines to different locations on the histogram, changing the bin ranges.

• You can remove bins by dragging cutpoint lines off the histogram.

Note: The histogram (displaying nonmissing values), the minimum, and the maximum are based on the scanned values. If you do not include all cases in the scan, the true distribution may not be accurately reflected, particularly if the data file has been sorted by the selected variable. If you scan zero cases, no information about the distribution of values is available.

Grid. Displays the values that define the upper endpoints of each bin and optional value labels for each bin.

• Value. The values that define the upper endpoints of each bin. You can enter values or use Make Cutpoints to automatically create bins based on selected criteria. By default, a cutpoint with a value of HIGH is automatically included. This bin will contain any nonmissing values above the other cutpoints. The bin defined by the lowest cutpoint will include all nonmissing values lower than or equal to that value (or simply lower than that value, depending on how you define upper endpoints).

• Label. Optional, descriptive labels for the values of the new, binned variable. Since the values of the new variable will simply be sequential integers from 1 to n, labels that describe what the values represent can be very useful. You can enter labels or use Make Labels to automatically create value labels.

To Delete a Bin from the Grid

Right-click on the either the Value or Label cell for the bin.

From the pop-up context menu, select Delete Row.

Note: If you delete the HIGH bin, any cases with values higher than the last specified cutpoint value will be assigned the system-missing value for the new variable.

To Delete All Labels or Delete All Defined Bins

Right-click anywhere in the grid.

From the pop-up context menu select either Delete All Labels or Delete All Cutpoints.

Upper Endpoints. Controls treatment of upper endpoint values entered in the Value column of the grid.

• Included (<=). Cases with the value specified in the Value cell are included in the binned category. For example, if you specify values of 25, 50, and 75, cases with a value of exactly 25 will go in the first bin, since this will include all cases with values less than or equal to 25.

• Excluded (<). Cases with the value specified in the Value cell are not included in the binned category. Instead, they are included in the next bin. For example, if you specify values of 25, 50, and 75, cases with a value of exactly 25 will go in the second bin rather than the first, since the first bin will contain only cases with values less than 25.

Make Cutpoints. Generates binned categories automatically for equal width intervals, intervals with the same number of cases, or intervals based on standard deviations. This is not available if you scanned zero cases. See the topic Automatically Generating Binned Categories for more information.

Make Labels. Generates descriptive labels for the sequential integer values of the new, binned variable, based on the values in the grid and the specified treatment of upper endpoints (included or excluded).

Reverse scale. By default, values of the new, binned variable are ascending sequential integers from 1 to n. Reversing the scale makes the values descending sequential integers from n to 1.

Copy Bins. You can copy the binning specifications from another variable to the currently selected variable or from the selected variable to multiple other variables. See the topic Copying Binned Categories for more information.

Related Topics

Visual Binning
To Bin Variables
Automatically Generating Binned Categories
Copying Binned Categories
User-Missing Values in Visual Binning


Automatically Generating Binned Categories

The Make Cutpoints dialog box allows you to auto-generate binned categories based on selected criteria.

To Use the Make Cutpoints Dialog Box

From the menus in the Data Editor window choose:

Transform
Visual Binning...

Select the numeric scale and/or ordinal variables for which you want to create new categorical (binned) variables.

Click Continue.

Select (click) a variable in the Scanned Variable List.

Click Make Cutpoints.

Select the criteria for generating cutpoints that will define the binned categories.

Click Apply.

Note: The Make Cutpoints dialog box is not available if you scanned zero cases.

Equal Width Intervals. Generates binned categories of equal width (for example, 1–10, 11–20, and 21–30) based on any two of the following three criteria:

• First Cutpoint Location. The value that defines the upper end of the lowest binned category (for example, a value of 10 indicates a range that includes all values up to 10).

• Number of Cutpoints. The number of binned categories is the number of cutpoints plus one. For example, 9 cutpoints generate 10 binned categories.

• Width. The width of each interval. For example, a value of 10 would bin age in years into 10-year intervals.

Equal Percentiles Based on Scanned Cases. Generates binned categories with an equal number of cases in each bin (using the aempirical algorithm for percentiles), based on either of the following criteria:

• Number of Cutpoints. The number of binned categories is the number of cutpoints plus one. For example, three cutpoints generate four percentile bins (quartiles), each containing 25% of the cases.

• Width (%). Width of each interval, expressed as a percentage of the total number of cases. For example, a value of 33.3 would produce three binned categories (two cutpoints), each containing 33.3% of the cases.

If the source variable contains a relatively small number of distinct values or a large number of cases with the same value, you may get fewer bins than requested. If there are multiple identical values at a cutpoint, they will all go into the same interval; so the actual percentages may not always be exactly equal.

Cutpoints at Mean and Selected Standard Deviations Based on Scanned Cases. Generates binned categories based on the values of the mean and standard deviation of the distribution of the variable.

• If you don't select any of the standard deviation intervals, two binned categories will be created, with the mean as the cutpoint dividing the bins.

• You can select any combination of standard deviation intervals based on one, two, and/or three standard deviations. For example, selecting all three would result in eight binned categories--six bins in one standard deviation intervals and two bins for cases more than three standard deviations above and below the mean.

In a normal distribution, 68% of the cases fall within one standard deviation of the mean; 95%, within two standard deviations; and 99%, within three standard deviations. Creating binned categories based on standard deviations may result in some defined bins outside of the actual data range and even outside of the range of possible data values (for example, a negative salary range).

Note: Calculations of percentiles and standard deviations are based on the scanned cases. If you limit the number of cases scanned, the resulting bins may not contain the proportion of cases that you wanted in those bins, particularly if the data file is sorted by the source variable. For example, if you limit the scan to the first 100 cases of a data file with 1000 cases and the data file is sorted in ascending order of age of respondent, instead of four percentile age bins each containing 25% of the cases, you may find that the first three bins each contain only about 3.3% of the cases, and the last bin contains 90% of the cases.

Related Topics

Visual Binning
To Bin Variables
Binning Variables
Copying Binned Categories
User-Missing Values in Visual Binning


Copying Binned Categories

When creating binned categories for one or more variables, you can copy the binning specifications from another variable to the currently selected variable or from the selected variable to multiple other variables.

To Copy Binning Specifications

From the menus in the Data Editor window choose:

Transform
Visual Binning...

Select the numeric scale and/or ordinal variables for which you want to create new categorical (binned) variables.

Click Continue.

Define binned categories for at least one variable--but do not click OK or Paste.

Select (click) a variable in the Scanned Variable List for which you have defined binned categories.

Click To Other Variables.

Select the variables for which you want to create new variables with the same binned categories.

Click Copy.

or

Select (click) a variable in the Scanned Variable List to which you want to copy defined binned categories.

Click From Another Variable.

Select the variable with the defined binned categories that you want to copy.

Click Copy.

If you have specified value labels for the variable from which you are copying the binning specifications, those are also copied.

Note: Once you click OK in the Visual Binning main dialog box to create new binned variables (or close the dialog box in any other way), you cannot use Visual Binning to copy those binned categories to other variables.

Related Topics

Visual Binning
To Bin Variables
Binning Variables
Automatically Generating Binned Categories
User-Missing Values in Visual Binning


User-Missing Values in Visual Binning

Values defined as user-missing (values identified as codes for missing data) for the source variable are not included in the binned categories for the new variable. User-missing values for the source variables are copied as user-missing values for the new variable, and any defined value labels for missing value codes are also copied.

If a missing value code conflicts with one of the binned category values for the new variable, the missing value code for the new variable is recoded to a nonconflicting value by adding 100 to the highest binned category value. For example, if a value of 1 is defined as user-missing for the source variable and the new variable will have six binned categories, any cases with a value of 1 for the source variable will have a value of 106 for the new variable, and 106 will be defined as user-missing. If the user-missing value for the source variable had a defined value label, that label will be retained as the value label for the recoded value of the new variable.

Note: If the source variable has a defined range of user-missing values of the form LO-n, where n is a positive number, the corresponding user-missing values for the new variable will be negative numbers.

Related Topics

Visual Binning
To Bin Variables
Binning Variables
Automatically Generating Binned Categories
Copying Binned Categories


Computing Variables

data transformations,data transformations,data transformations
computing variables,computing variables,computing variables
computing variables,computing variables,computing variables

Use the Compute dialog box to compute values for a variable based on numeric transformations of other variables.

• You can compute values for numeric or string (alphanumeric) variables.

• You can create new variables or replace the values of existing variables. For new variables, you can also specify the variable type and label.

• You can compute values selectively for subsets of data based on logical conditions.

• You can use a large variety of built-in functions, including arithmetic functions, statistical functions, distribution functions, and string functions.

To Compute Variables Collapse Hide details

To Compute Variables

From the menus choose:

Transform
Compute Variable...

Type the name of a single target variable. It can be an existing variable or a new variable to be added to the active dataset.

To build an expression, either paste components into the Expression field or type directly in the Expression field.

• You can paste functions or commonly used system variables by selecting a group from the Function group list and double-clicking the function or variable in the Functions and Special Variables list (or select the function or variable and click the arrow adjacent to the Function group list). Fill in any parameters indicated by question marks (only applies to functions). The function group labeled All provides a listing of all available functions and system variables. A brief description of the currently selected function or variable is displayed in a reserved area in the dialog box.

• String constants must be enclosed in quotation marks or apostrophes.

• If values contain decimals, a period (.) must be used as the decimal indicator.

• For new string variables, you must also select Type & Label to specify the data type.

Show me

Related Topics

Compute Variable: If Cases
Compute Variable: Type and Label
Functions
Missing Values in Functions
COMPUTE


Compute Variable: If Cases

data transformations,data transformations,data transformations
conditional transformations,conditional transformations,conditional transformations
conditional transformations,conditional transformations,conditional transformations

The If Cases dialog box allows you to apply data transformations to selected subsets of cases, using conditional expressions. A conditional expression returns a value of true, false, or missing for each case.

• If the result of a conditional expression is true, the case is included in the selected subset.

• If the result of a conditional expression is false or missing, the case is not included in the selected subset.

• Most conditional expressions use one or more of the six relational operators (<, >, <=, >=, =, and ~=) on the calculator pad.

• Conditional expressions can include variable names, constants, arithmetic operators, numeric (and other) functions, logical variables, and relational operators.

Specifying Conditional Transformations Collapse Hide details

From the menus choose:

Transform
Compute Variable...

In the data transformation dialog box, click If.

Select Include if case satisfies condition.

Enter the conditional expression.

To build an expression, either paste components into the Expression field or type directly in the Expression field.

• You can paste functions or commonly used system variables by selecting a group from the Function group list and double-clicking the function or variable in the Functions and Special Variables list (or select the function or variable and click the arrow adjacent to the Function group list). Fill in any parameters indicated by question marks (only applies to functions). The function group labeled All provides a listing of all available functions and system variables. A brief description of the currently selected function or variable is displayed in a reserved area in the dialog box.

• String constants must be enclosed in quotation marks or apostrophes.

• If values contain decimals, a period (.) must be used as the decimal indicator.

Related Topics

Computing Variables
Compute Variable: Type and Label
Functions
Missing Values in Functions


Compute Variable: Type and Label

string variables,string variables,string variables
computing new string variables,computing new string variables,computing new string variables
computing variables,computing variables,computing variables
computing new string variables,computing new string variables,computing new string variables
data transformations,data transformations,data transformations
string variables,string variables,string variables

By default, new computed variables are numeric. To compute a new string variable, you must specify the data type and width.

Label. Optional, descriptive variable label up to 255 bytes long. You can enter a label or use the first 110 characters of the compute expression as the label.

Type. Computed variables can be numeric or string (alphanumeric). String variables cannot be used in calculations.

Specifying Type and Label for Computed Variables Collapse Hide details

From the menus choose:

Transform
Compute Variable...

In the Compute dialog box, select Type & Label.

Select the data type. This is required for new string variables.

Related Topics

Computing Variables
Compute Variable: If Cases
Functions
Missing Values in Functions


Functions

functions,functions,functions
data transformations,data transformations,data transformations
functions,functions,functions

Many types of functions are supported, including:

• Arithmetic Functions

• Statistical Functions

• String Functions

• String/Numeric Conversion Functions

• Date and Time Functions

• Random Variable and Distribution Functions

• Missing Value Functions

• Logical Functions

• LAG Function

• VALUELABEL Function

• Scoring Expressions (PASW Statistics Server)

Related Topics

Select Cases: If
Computing Variables
Compute Variable: If Cases
Compute Variable: Type and Label
Missing Values in Functions


Missing Values in Functions

missing values,missing values,missing values
in functions,in functions,in functions
functions,functions,functions
missing value treatment,missing value treatment,missing value treatment

Functions and simple arithmetic expressions treat missing values in different ways. In the expression:

(var1+var2+var3)/3

the result is missing if a case has a missing value for any of the three variables.

In the expression:

MEAN(var1, var2, var3)

the result is missing only if the case has missing values for all three variables.

For statistical functions, you can specify the minimum number of arguments that must have nonmissing values. To do so, type a period and the minimum number after the function name, as in:

MEAN.2(var1, var2, var3)

Related Topics

Computing Variables
Compute Variable: If Cases
Compute Variable: Type and Label
Functions


Random Number Generators

random number seed,random number seed,random number seed
random sample,random sample,random sample
random number seed,random number seed,random number seed

The Random Number Generators dialog box allows you to select the random number generator and set the starting sequence value so you can reproduce a sequence of random numbers.

Active Generator. Two different random number generators are available:

• Version 12 Compatible. The random number generator used in version 12 and previous releases. If you need to reproduce randomized results generated in previous releases based on a specified seed value, use this random number generator.

• Mersenne Twister. A newer random number generator that is more reliable for simulation purposes. If reproducing randomized results from version 12 or earlier is not an issue, use this random number generator.

Active Generator Initialization. The random number seed changes each time a random number is generated for use in transformations (such as random distribution functions), random sampling, or case weighting. To replicate a sequence of random numbers, set the initialization starting point value prior to each analysis that uses the random numbers. The value must be a positive integer.

To select the random number generator and/or set the initialization value: Collapse Hide details

To select the random number generator and/or set the initialization value:

From the menus choose:

Transform
Random Number Generators

Related Topics

To Cache Data Automatically
Select Cases: Random Sample
Case Selection Status in the Data Editor
Split File


Count Occurrences of Values within Cases

counting occurrences,counting occurrences,counting occurrences

This dialog box creates a variable that counts the occurrences of the same value(s) in a list of variables for each case. For example, a survey might contain a list of magazines with yes/no check boxes to indicate which magazines each respondent reads. You could count the number of yes responses for each respondent to create a new variable that contains the total number of magazines read.

To Count Occurrences of Values within Cases Collapse Hide details

To Count Occurrences of Values within Cases

From the menus choose:

Transform
Count Values within Cases...

Enter a target variable name.

Select two or more variables of the same type (numeric or string).

Click Define Values and specify which value or values should be counted.

Optionally, you can define a subset of cases for which to count occurrences of values.

Related Topics

Count Values within Cases: Values to Count
Count Occurrences: If Cases
COUNT


Count Values within Cases: Values to Count

The value of the target variable (on the main dialog box) is incremented by 1 each time one of the selected variables matches a specification in the Values to Count list here. If a case matches several specifications for any variable, the target variable is incremented several times for that variable.

Value specifications can include individual values, missing or system-missing values, and ranges. Ranges include their endpoints and any user-missing values that fall within the range.

Specifying Values to Count Collapse Hide details

From the menus choose:

Transform
Count Values within Cases...

Select two or more variables of the same type (numeric or string).

Click Define Values and specify which value or values should be counted.

Related Topics

Count Occurrences of Values within Cases
Count Occurrences: If Cases


Count Occurrences: If Cases

The If Cases dialog box allows you to count occurrences of values for a selected subset of cases, using conditional expressions. A conditional expression returns a value of true, false, or missing for each case.

• If the result of a conditional expression is true, the case is included in the selected subset.

• If the result of a conditional expression is false or missing, the case is not included in the selected subset.

• Most conditional expressions use one or more of the six relational operators (<, >, <=, >=, =, and ~=) on the calculator pad.

• Conditional expressions can include variable names, constants, arithmetic operators, numeric (and other) functions, logical variables, and relational operators.

Counting Occurrences for a Subset of Cases Collapse Hide details

From the menus choose:

Transform
Count Values within Cases...

In the count occurrences dialog box, click If.

Select Include if case satisfies condition.

Enter the conditional expression.

To build an expression, either paste components into the Expression field or type directly in the Expression field.

• You can paste functions or commonly used system variables by selecting a group from the Function group list and double-clicking the function or variable in the Functions and Special Variables list (or select the function or variable and click the arrow adjacent to the Function group list). Fill in any parameters indicated by question marks (only applies to functions). The function group labeled All provides a listing of all available functions and system variables. A brief description of the currently selected function or variable is displayed in a reserved area in the dialog box.

• String constants must be enclosed in quotation marks or apostrophes.

• If values contain decimals, a period (.) must be used as the decimal indicator.

Related Topics

Count Occurrences of Values within Cases
Count Values within Cases: Values to Count


Shift Values

lead function,lead function,lead function
lag function,lag function,lag function
Shift Values,Shift Values,Shift Values

Shift Values creates new variables that contain the values of existing variables from preceding or subsequent cases.

Name. Name for the new variable. This must be a name that does not already exist in the active dataset. For information on variable naming rules, see Variable Names.

Get value from earlier case (lag). Get the value from a previous case in the active dataset. For example, with the default number of cases value of 1, each case for the new variable has the value of the original variable from the case that immediately precedes it.

Get value from following case (lead). Get the value from a subsequent case in the active dataset. For example, with the default number of cases value of 1, each case for the new variable has the value of the original variable from the next case.

Number of cases to shift. Get the value from the nth preceding or subsequent case, where n is the value specified. The value must be a non-negative integer.

• If split file processing is on, the scope of the shift is limited to each split group. A shift value cannot be obtained from a case in a preceding or subsequent split group.

• Filter status is ignored.

• The value of the result variable is set to system-missing for the first or last n cases in the dataset or split group, where n is the value specified for Number of cases to shift. For example, using the Lag method with a value of 1 would set the result variable to system-missing for the first case in the dataset (or first case in each split group).

• User-missing values are preserved.

• Dictionary information from the original variable, including defined value labels and user-missing value assignments, is applied to the new variable. (Note: Custom variable attributes are not included.)

• A variable label is automatically generated for the new variable that describes the shift operation that created the variable.

To Create a New Variable with Shifted Values Collapse Hide details

To Create a New Variable with Shifted Values

From the menus, choose:

Transform
Shift Values

Select the variable to use as the source of values for the new variable.

Enter a name for the new variable.

Select the shift method (lag or lead) and the number of cases to shift.

Click Change.

Repeat for each new variable you want to create.

Related Topics

SHIFT VALUES


Recode into Same Variables

variables,variables,variables
recoding,recoding,recoding
recoding values,recoding values,recoding values
data transformations,data transformations,data transformations
recoding values,recoding values,recoding values

The Recode into Same Variables dialog box allows you to reassign the values of existing variables or collapse ranges of existing values into new values. For example, you could collapse salaries into salary range categories.

You can recode numeric and string variables. If you select multiple variables, they must all be the same type. You cannot recode numeric and string variables together.

To Recode Values of a Variable Collapse Hide details

To Recode Values of a Variable

From the menus choose:

Transform
Recode into Same Variables...

Select the variables you want to recode. If you select multiple variables, they must be the same type (numeric or string).

Click Old and New Values and specify how to recode values.

Optionally, you can define a subset of cases to recode.

Specifying Values to Recode Collapse Hide details

From the menus choose:

Transform
Recode into Same Variables...

Select the variables you want to recode. If you select multiple variables, they must be of the same type (numeric or string).

Click Old and New Values.

Specify an old value and a new value.

Click Add to place the specification into the Old->New list.

The new value must be of the same type (numeric or string) as the existing variable. For string variables, it must be of the same length as the existing variable.

Related Topics

Visual Binning
Recode into Different Variables
Automatic Recode
Recode into Same Variables: Old and New Values
Recode into Same Variables: If Cases
RECODE


Recode into Same Variables: Old and New Values

variables,variables,variables
recoding,recoding,recoding
recoding values,recoding values,recoding values
data transformations,data transformations,data transformations
recoding values,recoding values,recoding values

You can define values to recode in this dialog box. All value specifications must be the same data type (numeric or string) as the variables selected in the main dialog box.

Old Value. The value(s) to be recoded. You can recode single values, ranges of values, and missing values. System-missing values and ranges cannot be selected for string variables because neither concept applies to string variables. Ranges include their endpoints and any user-missing values that fall within the range.

Expand Show details Collapse Hide details

• Value. Individual old value to be recoded into a new value. The value must be the same data type (numeric or string) as the variable(s) being recoded.

• System-missing. Values assigned by the program when values in your data are undefined according to the format type you have specified, when a numeric field is blank, or when a value resulting from a transformation command is undefined. Numeric system-missing values are displayed as periods. String variables cannot have system-missing values, since any character is legal in a string variable.

• System- or user-missing. Observations with values that either have been defined as user-missing values or are unknown and have been assigned the system-missing value, which is indicated with a period (.).

• Range. Inclusive range of values. Not available for string variables. Any user-missing values within the range are included.

• All other values. Any remaining values not included in one of the specifications on the Old-New list. This appears as ELSE on the Old-New list.

New Value. The single value into which each old value or range of values is recoded. You can enter a value or assign the system-missing value.

Expand Show details Collapse Hide details

• Value. Value into which one or more old values will be recoded. The value must be the same data type (numeric or string) as the old value.

• System-missing. Recodes specified old values into the system-missing value. The system-missing value is not used in calculations, and cases with the system-missing value are excluded from many procedures. Not available for string variables.

Old–>New. The list of specifications that will be used to recode the variable(s). You can add, change, and remove specifications from the list. The list is automatically sorted, based on the old value specification, using the following order: single values, missing values, ranges, and all other values. If you change a recode specification on the list, the procedure automatically re-sorts the list, if necessary, to maintain this order.

Related Topics

Recode into Same Variables
Recode into Same Variables: If Cases


Recode into Same Variables: If Cases

The If Cases dialog box allows you to recode values for a selected subset of cases, using conditional expressions. A conditional expression returns a value of true, false, or missing for each case.

• If the result of a conditional expression is true, the case is included in the selected subset.

• If the result of a conditional expression is false or missing, the case is not included in the selected subset.

• Most conditional expressions use one or more of the six relational operators (<, >, <=, >=, =, and ~=) on the calculator pad.

• Conditional expressions can include variable names, constants, arithmetic operators, numeric (and other) functions, logical variables, and relational operators.

Recoding Values for a Subset of Cases Collapse Hide details

From the menus choose:

Transform
Recode into Same Variables...

In the recode dialog box, click If.

Select Include if case satisfies condition.

Enter the conditional expression.

To build an expression, either paste components into the Expression field or type directly in the Expression field.

• You can paste functions or commonly used system variables by selecting a group from the Function group list and double-clicking the function or variable in the Functions and Special Variables list (or select the function or variable and click the arrow adjacent to the Function group list). Fill in any parameters indicated by question marks (only applies to functions). The function group labeled All provides a listing of all available functions and system variables. A brief description of the currently selected function or variable is displayed in a reserved area in the dialog box.

• String constants must be enclosed in quotation marks or apostrophes.

• If values contain decimals, a period (.) must be used as the decimal indicator.

Related Topics

Recode into Same Variables
Recode into Same Variables: Old and New Values


Recode into Different Variables

variables,variables,variables
recoding,recoding,recoding
recoding values,recoding values,recoding values
data transformations,data transformations,data transformations
recoding values,recoding values,recoding values

The Recode into Different Variables dialog box allows you to reassign the values of existing variables or collapse ranges of existing values into new values for a new variable. For example, you could collapse salaries into a new variable containing salary-range categories.

• You can recode numeric and string variables.

• You can recode numeric variables into string variables and vice versa.

• If you select multiple variables, they must all be the same type. You cannot recode numeric and string variables together.

To Recode Values of a Variable into a New Variable Collapse Hide details

To Recode Values of a Variable into a New Variable

From the menus choose:

Transform
Recode into Different Variables...

Select the variables you want to recode. If you select multiple variables, they must be the same type (numeric or string).

Enter an output (new) variable name for each new variable and click Change.

Click Old and New Values and specify how to recode values.

Optionally, you can define a subset of cases to recode.

Specifying Values to Recode for New Variables Collapse Hide details

From the menus choose:

Transform
Recode into Different Variables...

Select the variables you want to recode. If you select multiple variables, they must be the same type (numeric or string).

Enter an output (new) variable name for each new variable and click Change.

Click Old and New Values.

Specify an old value and a new value.

Click Add to place the specification into the Old–>New list.

Related Topics

Recode into Same Variables
Automatic Recode
Recode into Different Variables: Old and New Values
Recode into Different Variables: If Cases
RECODE


Recode into Different Variables: Old and New Values

variables,variables,variables
recoding,recoding,recoding
recoding values,recoding values,recoding values
data transformations,data transformations,data transformations
recoding values,recoding values,recoding values

You can define values to recode in this dialog box.

Old Value. The value(s) to be recoded. You can recode single values, ranges of values, and missing values. System-missing values and ranges cannot be selected for string variables because neither concept applies to string variables. Old values must be the same data type (numeric or string) as the original variable. Ranges include their endpoints and any user-missing values that fall within the range.

Expand Show details Collapse Hide details

• Value. Individual old value to be recoded into a new value. The value must be the same data type (numeric or string) as the variable(s) being recoded.

• System-missing. Values assigned by the program when values in your data are undefined according to the format type you have specified, when a numeric field is blank, or when a value resulting from a transformation command is undefined. Numeric system-missing values are displayed as periods. String variables cannot have system-missing values, since any character is legal in a string variable.

• System- or user-missing. Observations with values that either have been defined as user-missing values or are unknown and have been assigned the system-missing value, which is indicated with a period (.).

• Range. Inclusive range of values. Not available for string variables. Any user-missing values within the range are included.

• All other values. Any remaining values not included in one of the specifications on the Old-New list. This appears as ELSE on the Old-New list.

New Value. The single value into which each old value or range of values is recoded. New values can be numeric or string.

Expand Show details Collapse Hide details

• Value. Value into which one or more old values will be recoded. The value must be the same data type (numeric or string) as the old value.

• System-missing. Recodes specified old values into the system-missing value. The system-missing value is not used in calculations, and cases with the system-missing value are excluded from many procedures. Not available for string variables.

• Copy old values. Retains the old value. If some values don't require recoding, use this to include the old values. Any old values that are not specified are not included in the new variable, and cases with those values will be assigned the system-missing value for the new variable.

Output variables are strings. Defines the new, recoded variable as a string (alphanumeric) variable. The old variable can be numeric or string.

Convert numeric strings to numbers. Converts string values containing numbers to numeric values. Strings containing anything other than numbers and an optional sign (+ or -) are assigned the system-missing value.

Old–>New. The list of specifications that will be used to recode the variable(s). You can add, change, and remove specifications from the list. The list is automatically sorted, based on the old value specification, using the following order: single values, missing values, ranges, and all other values. If you change a recode specification on the list, the procedure automatically re-sorts the list, if necessary, to maintain this order.

Related Topics

Recode into Different Variables
Recode into Different Variables: If Cases


Recode into Different Variables: If Cases

The If Cases dialog box allows you to recode values for a selected subset of cases, using conditional expressions. A conditional expression returns a value of true, false, or missing for each case.

• If the result of a conditional expression is true, the case is included in the selected subset.

• If the result of a conditional expression is false or missing, the case is not included in the selected subset.

• Most conditional expressions use one or more of the six relational operators (<, >, <=, >=, =, and ~=) on the calculator pad.

• Conditional expressions can include variable names, constants, arithmetic operators, numeric (and other) functions, logical variables, and relational operators.

Recoding Values for a Subset of Cases Collapse Hide details

From the menus choose:

Transform
Recode into Different Variables...

In the recode dialog box, click If.

Select Include if case satisfies condition.

Enter the conditional expression.

To build an expression, either paste components into the Expression field or type directly in the Expression field.

• You can paste functions or commonly used system variables by selecting a group from the Function group list and double-clicking the function or variable in the Functions and Special Variables list (or select the function or variable and click the arrow adjacent to the Function group list). Fill in any parameters indicated by question marks (only applies to functions). The function group labeled All provides a listing of all available functions and system variables. A brief description of the currently selected function or variable is displayed in a reserved area in the dialog box.

• String constants must be enclosed in quotation marks or apostrophes.

• If values contain decimals, a period (.) must be used as the decimal indicator.

Related Topics

Recode into Different Variables
Recode into Different Variables: Old and New Values


Automatic Recode

variables,variables,variables
recoding,recoding,recoding
recoding values,recoding values,recoding values
data transformations,data transformations,data transformations
recoding values,recoding values,recoding values
string variables,string variables,string variables
recoding into consecutive integers,recoding into consecutive integers,recoding into consecutive integers

The Automatic Recode dialog box allows you to convert string and numeric values into consecutive integers. When category codes are not sequential, the resulting empty cells reduce performance and increase memory requirements for many procedures. Additionally, some procedures cannot use string variables, and some require consecutive integer values for factor levels.

• The new variable(s) created by Automatic Recode retain any defined variable and value labels from the old variable. For any values without a defined value label, the original value is used as the label for the recoded value. A table displays the old and new values and value labels.

• String values are recoded in alphabetical order, with uppercase letters preceding their lowercase counterparts.

• Missing values are recoded into missing values higher than any nonmissing values, with their order preserved. For example, if the original variable has 10 nonmissing values, the lowest missing value would be recoded to 11, and the value 11 would be a missing value for the new variable.

Use the same recoding scheme for all variables. This option allows you to apply a single autorecoding scheme to all the selected variables, yielding a consistent coding scheme for all the new variables.

Expand Show details Collapse Hide details

If you select this option, the following rules and limitations apply:

• All variables must be of the same type (numeric or string).

• All observed values for all selected variables are used to create a sorted order of values to recode into sequential integers.

• User-missing values for the new variables are based on the first variable in the list with defined user-missing values. All other values from other original variables, except for system-missing, are treated as valid.

Treat blank string values as user-missing. For string variables, blank or null values are not treated as system-missing. This option will autorecode blank strings into a user-missing value higher than the highest nonmissing value.

Templates

You can save the autorecoding scheme in a template file and then apply it to other variables and other data files.

For example, you may have a large number of alphanumeric product codes that you autorecode into integers every month, but some months new product codes are added that change the original autorecoding scheme. If you save the original scheme in a template and then apply it to the new data that contain the new set of codes, any new codes encountered in the data are autorecoded into values higher than the last value in the template, preserving the original autorecode scheme of the original product codes.

Expand Show details Collapse Hide details

Save template as. Saves the autorecode scheme for the selected variables in an external template file.

• The template contains information that maps the original nonmissing values to the recoded values.

• Only information for nonmissing values is saved in the template. User-missing value information is not retained.

• If you have selected multiple variables for recoding but you have not selected to use the same autorecoding scheme for all variables or you are not applying an existing template as part of the autorecoding, the template will be based on the first variable in the list.

• If you have selected multiple variables for recoding and you have also selected Use the same recoding scheme for all variables and/or you have selected Apply template, then the template will contain the combined autorecoding scheme for all variables.

Apply template from. Applies a previously saved autorecode template to variables selected for recoding, appending any additional values found in the variables to the end of the scheme and preserving the relationship between the original and autorecoded values stored in the saved scheme.

• All variables selected for recoding must be the same type (numeric or string), and that type must match the type defined in the template.

• Templates do not contain any information on user-missing values. User-missing values for the target variables are based on the first variable in the original variable list with defined user-missing values. All other values from other original variables, except for system-missing, are treated as valid.

• Value mappings from the template are applied first. All remaining values are recoded into values higher than the last value in the template, with user-missing values (based on the first variable in the list with defined user-missing values) recoded into values higher than the last valid value.

• If you have selected multiple variables for autorecoding, the template is applied first, followed by a common, combined autorecoding for all additional values found in the selected variables, resulting in a single, common autorecoding scheme for all selected variables.

To Recode String or Numeric Values into Consecutive Integers Collapse Hide details

To Recode String or Numeric Values into Consecutive Integers

From the menus choose:

Transform
Automatic Recode...

Select one or more variables to recode.

For each selected variable, enter a name for the new variable and click New Name.

Related Topics

Recode into Same Variables
Recode into Different Variables
Binomial Test: Related Procedures
Chi-Square Test: Related Procedures
Runs Test: Related Procedures
AUTORECODE


Rank Cases

ranking cases,ranking cases,ranking cases
data transformations,data transformations,data transformations
ranking cases,ranking cases,ranking cases

The Rank Cases dialog box allows you to create new variables containing ranks, normal and Savage scores, and percentile values for numeric variables.

New variable names and descriptive variable labels are automatically generated, based on the original variable name and the selected measure(s). A summary table lists the original variables, the new variables, and the variable labels. (Note: The automatically generated new variable names are limited to a maximum length of 8 bytes.)

Optionally, you can:

• Rank cases in ascending or descending order.

• Organize rankings into subgroups by selecting one or more grouping variables for the By list. Ranks are computed within each group. Groups are defined by the combination of values of the grouping variables. For example, if you select gender and minority as grouping variables, ranks are computed for each combination of gender and minority.

To Rank Cases Collapse Hide details

To Rank Cases

From the menus choose:

Transform
Rank Cases...

Select one or more variables to rank. You can rank only numeric variables.

Optionally, you can rank cases in ascending or descending order and organize ranks into subgroups.

Related Topics

Rank Cases: Types
Rank Cases: Ties
RANK


Rank Cases: Types

Blom estimates,Blom estimates,Blom estimates
Tukey estimates,Tukey estimates,Tukey estimates
Rankit estimates,Rankit estimates,Rankit estimates
Van der Waerden estimates,Van der Waerden estimates,Van der Waerden estimates
ranking cases,ranking cases,ranking cases
Savage scores,Savage scores,Savage scores
Savage scores,Savage scores,Savage scores
ranking cases,ranking cases,ranking cases
fractional ranks,fractional ranks,fractional ranks
ranking cases,ranking cases,ranking cases
percentiles,percentiles,percentiles
proportion estimates,proportion estimates,proportion estimates
in Rank Cases,in Rank Cases,in Rank Cases
normal scores,normal scores,normal scores
in Rank Cases,in Rank Cases,in Rank Cases
z scores,z scores,z scores
in Rank Cases,in Rank Cases,in Rank Cases

You can select multiple ranking methods. A separate ranking variable is created for each method. Ranking methods include simple ranks, Savage scores, fractional ranks, and percentiles. You can also create rankings based on proportion estimates and normal scores.

Expand Show details Collapse Hide details

Rank. Simple rank. The value of the new variable equals its rank.

Savage score. The new variable contains Savage scores based on an exponential distribution.

Fractional rank. The value of the new variable equals rank divided by the sum of the weights of the nonmissing cases.

Fractional rank as percent. Each rank is divided by the number of cases with valid values and multiplied by 100.

Sum of case weights. The value of the new variable equals the sum of case weights. The new variable is a constant for all cases in the same group.

Ntiles. Ranks are based on percentile groups, with each group containing approximately the same number of cases. For example, 4 Ntiles would assign a rank of 1 to cases below the 25th percentile, 2 to cases between the 25th and 50th percentile, 3 to cases between the 50th and 75th percentile, and 4 to cases above the 75th percentile.

Proportion estimates. Estimates of the cumulative proportion of the distribution corresponding to a particular rank.

Normal scores. The z scores corresponding to the estimated cumulative proportion.

Proportion Estimation Formula. For proportion estimates and normal scores, you can select the proportion estimation formula: Blom, Tukey, Rankit, or Van der Waerden.

Expand Show details Collapse Hide details

• Blom. Creates new ranking variable based on proportion estimates that uses the formula (r-3/8) / (w+1/4), where w is the sum of the case weights and r is the rank.

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

• Rankit. Uses the formula (r-1/2) / w, where w is the number of observations and r is the rank, ranging from 1 to w.

• Van der Waerden. Van der Waerden's transformation, defined 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.

Selecting Ranking Methods Collapse Hide details

From the menus choose:

Transform
Rank Cases...

Select one or more variables to rank. You can rank only numeric variables.

Click Rank Types.

Select one or more ranking methods. A separate variable is created for each ranking method.

To create ranks based on proportion estimates or normal scores:

Select Proportion estimates and/or Normal scores.

Select a ranking method.

Related Topics

Rank Cases
Rank Cases: Ties


Rank Cases: Ties

ranking cases,ranking cases,ranking cases
tied values,tied values,tied values

This dialog box controls the method for assigning rankings to cases with the same value on the original variable.

The following table shows how the different methods assign ranks to tied values:

Value | Mean | Low | High | Sequential
10 | 1 | 1 | 1 | 1
15 | 3 | 2 | 4 | 2
15 | 3 | 2 | 4 | 2
15 | 3 | 2 | 4 | 2
16 | 5 | 5 | 5 | 3
20 | 6 | 6 | 6 | 4
Assigning Ranks to Tied Values Collapse Hide details

From the menus choose:

Transform
Rank Cases...

Select one or more variables to rank. You can rank only numeric variables.

Click Ties.

Select a method for assigning ranks to tied values.

Related Topics

Rank Cases
Rank Cases: Types


Date and Time Wizard

date format variables,date format variables,date format variables
create date/time variable from string,create date/time variable from string,create date/time variable from string
create date/time variable from set of variables,create date/time variable from set of variables,create date/time variable from set of variables
add or subtract from date/time variables,add or subtract from date/time variables,add or subtract from date/time variables
extract part of date/time variable,extract part of date/time variable,extract part of date/time variable

The Date and Time Wizard simplifies a number of common tasks associated with date and time variables.

To Use the Date and Time Wizard Collapse Hide details

To Use the Date and Time Wizard

From the menus choose:

Transform
Date and Time Wizard...

Select the task you wish to accomplish and follow the steps to define the task.

• Learn how dates and times are represented. This choice leads to a screen that provides a brief overview of date/time variables in PASW Statistics. By clicking on the Help button, it also provides a link to more detailed information.

• Create a date/time variable from a string containing a date or time. Use this option to create a date/time variable from a string variable. For example, you have a string variable representing dates in the form mm/dd/yyyy and want to create a date/time variable from this.

• Create a date/time variable from variables holding parts of dates or times. This choice allows you to construct a date/time variable from a set of existing variables. For example, you have a variable that represents the month (as an integer), a second that represents the day of the month, and a third that represents the year. You can combine these three variables into a single date/time variable.

• Calculate with dates and times. Use this option to add or subtract values from date/time variables. For example, you can calculate the duration of a process by subtracting a variable representing the start time of the process from another variable representing the end time of the process.

• Extract a part of a date or time variable. This option allows you to extract part of a date/time variable, such as the day of the month from a date/time variable, which has the form mm/dd/yyyy.

• Assign periodicity to a dataset. This choice takes you to the Define Dates dialog box, used to create date/time variables that consist of a set of sequential dates. This feature is typically used to associate dates with time series data.

Note: Tasks are disabled when the dataset lacks the types of variables required to accomplish the task. For instance, if the dataset contains no string variables, then the task to create a date/time variable from a string does not apply and is disabled.

Related Topics

Dates and Times in PASW Statistics
Create a Date/Time Variable from a String
Create a Date/Time Variable from a Set of Variables
Add or Subtract Values from Date/Time Variables
Select Type of Calculation to Perform with Date/Time Variables
Add or Subtract a Duration from a Date
Subtract Date-Format Variables
Subtract Duration Variables
Extract Part of a Date/Time Variable
Date and Time Functions


Dates and Times in PASW Statistics

Variables that represent dates and times in PASW Statistics have a variable type of numeric, with display formats that correspond to the specific date/time formats. These variables are generally referred to as date/time variables. Date/time variables that actually represent dates are distinguished from those that represent a time duration that is independent of any date, such as 20 hours, 10 minutes, and 15 seconds. The latter are referred to as duration variables and the former as date or date/time variables. For a complete list of display formats, see Date and Time Formats .

Date and date/time variables. Date variables have a format representing a date, such as mm/dd/yyyy. Date/time variables have a format representing a date and time, such as dd-mmm-yyyy hh:mm:ss. Internally, date and date/time variables are stored as the number of seconds from October 14, 1582. Date and date/time variables are sometimes referred to as date-format variables.

• Both two- and four-digit year specifications are recognized. By default, two-digit years represent a range beginning 69 years prior to the current date and ending 30 years after the current date. This range is determined by your Options settings and is configurable (from the Edit menu, choose Options and click the Data tab).

• Dashes, periods, commas, slashes, or blanks can be used as delimiters in day-month-year formats.

• Months can be represented in digits, Roman numerals, or three-character abbreviations, and they can be fully spelled out. Three-letter abbreviations and fully spelled-out month names must be in English; month names in other languages are not recognized.

Duration variables. Duration variables have a format representing a time duration, such as hh:mm. They are stored internally as seconds without reference to a particular date.

• In time specifications (applies to date/time and duration variables), colons can be used as delimiters between hours, minutes, and seconds. Hours and minutes are required, but seconds are optional. A period is required to separate seconds from fractional seconds. Hours can be of unlimited magnitude, but the maximum value for minutes is 59 and for seconds is 59.999....

Current date and time. The system variable $TIME holds the current date and time. It represents the number of seconds from October 14, 1582, to the date and time when the transformation command that uses it is executed.

Related Topics

Date and Time Wizard
Create a Date/Time Variable from a String
Create a Date/Time Variable from a Set of Variables
Add or Subtract Values from Date/Time Variables
Select Type of Calculation to Perform with Date/Time Variables
Add or Subtract a Duration from a Date
Subtract Date-Format Variables
Subtract Duration Variables
Extract Part of a Date/Time Variable


Create a Date/Time Variable from a String

To create a date/time variable from a string variable:

Select Create a date/time variable from a string containing a date or time on the introduction screen of the Date and Time Wizard.

Related Topics

Date and Time Wizard
Dates and Times in PASW Statistics
Create a Date/Time Variable from a Set of Variables
Add or Subtract Values from Date/Time Variables
Select Type of Calculation to Perform with Date/Time Variables
Add or Subtract a Duration from a Date
Subtract Date-Format Variables
Subtract Duration Variables
Extract Part of a Date/Time Variable


Select String Variable to Convert to Date/Time Variable

Select the string variable to convert in the Variables list. Note that the list displays only string variables.

Select the pattern from the Patterns list that matches how dates are represented by the string variable. The Sample Values list displays actual values of the selected variable in the data file. Values of the string variable that do not fit the selected pattern result in a value of system-missing for the new variable.

Related Topics

Specify Result of Converting String Variable to Date/Time Variable


Specify Result of Converting String Variable to Date/Time Variable

Enter a name for the Result Variable. This cannot be the name of an existing variable.

Optionally, you can:

• Select a date/time format for the new variable from the Output Format list.

• Assign a descriptive variable label to the new variable.

Related Topics

Select String Variable to Convert to Date/Time Variable


Create a Date/Time Variable from a Set of Variables

To merge a set of existing variables into a single date/time variable:

Select Create a date/time variable from variables holding parts of dates or times on the introduction screen of the Date and Time Wizard.

Related Topics

Date and Time Wizard
Dates and Times in PASW Statistics
Create a Date/Time Variable from a String
Add or Subtract Values from Date/Time Variables
Select Type of Calculation to Perform with Date/Time Variables
Add or Subtract a Duration from a Date
Subtract Date-Format Variables
Subtract Duration Variables
Extract Part of a Date/Time Variable


Select Variables to Merge into Single Date/Time Variable

Select the variables that represent the different parts of the date/time.

• Some combinations of selections are not allowed. For instance, creating a date/time variable from Year and Day of Month is invalid because once Year is chosen, a full date is required.

• You cannot use an existing date/time variable as one of the parts of the final date/time variable you’re creating. Variables that make up the parts of the new date/time variable must be integers. The exception is the allowed use of an existing date/time variable as the Seconds part of the new variable. Since fractional seconds are allowed, the variable used for Seconds is not required to be an integer.

• Values, for any part of the new variable, that are not within the allowed range result in a value of system-missing for the new variable. For instance, if you inadvertently use a variable representing day of month for Month, any cases with day of month values in the range 14–31 will be assigned the system-missing value for the new variable since the valid range for months in PASW Statistics is 1–13.

Related Topics

Specify Date/Time Variable Created by Merging Variables


Specify Date/Time Variable Created by Merging Variables

Enter a name for the Result Variable. This cannot be the name of an existing variable.

Select a date/time format from the Output Format list.

Optionally, you can:

• Assign a descriptive variable label to the new variable.

Related Topics

Select Variables to Merge into Single Date/Time Variable


Add or Subtract Values from Date/Time Variables

To add or subtract values from date/time variables:

Select Calculate with dates and times on the introduction screen of the Date and Time Wizard.

Related Topics

Date and Time Wizard
Dates and Times in PASW Statistics
Create a Date/Time Variable from a String
Create a Date/Time Variable from a Set of Variables
Select Type of Calculation to Perform with Date/Time Variables
Add or Subtract a Duration from a Date
Subtract Date-Format Variables
Subtract Duration Variables
Extract Part of a Date/Time Variable


Select Type of Calculation to Perform with Date/Time Variables

• Add or subtract a duration from a date. Use this option to add to or subtract from a date-format variable. You can add or subtract durations that are fixed values, such as 10 days, or the values from a numeric variable, such as a variable that represents years.

• Calculate the number of time units between two dates. Use this option to obtain the difference between two dates as measured in a chosen unit. For example, you can obtain the number of years or the number of days separating two dates.

• Subtract two durations. Use this option to obtain the difference between two variables that have formats of durations, such as hh:mm or hh:mm:ss.

Note: Tasks are disabled when the dataset lacks the types of variables required to accomplish the task. For instance, if the dataset lacks two variables with formats of durations, then the task to subtract two durations does not apply and is disabled.

Related Topics

Date and Time Wizard
Dates and Times in PASW Statistics
Create a Date/Time Variable from a String
Create a Date/Time Variable from a Set of Variables
Add or Subtract Values from Date/Time Variables
Add or Subtract a Duration from a Date
Subtract Date-Format Variables
Subtract Duration Variables
Extract Part of a Date/Time Variable


Add or Subtract a Duration from a Date

To add or subtract a duration from a date-format variable:

Select Calculate with dates and times on the introduction screen of the Date and Time Wizard.

Select Add or subtract a duration from a date on the screen of the Date and Time Wizard labeled Do Calculations on Dates.

Related Topics

Date and Time Wizard
Dates and Times in PASW Statistics
Create a Date/Time Variable from a String
Create a Date/Time Variable from a Set of Variables
Add or Subtract Values from Date/Time Variables
Select Type of Calculation to Perform with Date/Time Variables
Subtract Date-Format Variables
Subtract Duration Variables
Extract Part of a Date/Time Variable


Select Date/Time Variable and Duration to Add or Subtract

Select a date (or time) variable.

Select a duration variable or enter a value for Duration Constant. Variables used for durations cannot be date or date/time variables. They can be duration variables or simple numeric variables.

Select the unit that the duration represents from the drop-down list. Select Duration if using a variable and the variable is in the form of a duration, such as hh:mm or hh:mm:ss.

Related Topics

Specify Result of Adding or Subtracting a Duration from a Date/Time Variable


Specify Result of Adding or Subtracting a Duration from a Date/Time Variable

Enter a name for Result Variable. This cannot be the name of an existing variable.

Optionally, you can:

• Assign a descriptive variable label to the new variable.

Related Topics

Select Date/Time Variable and Duration to Add or Subtract


Subtract Date-Format Variables

To subtract two date-format variables:

Select Calculate with dates and times on the introduction screen of the Date and Time Wizard.

Select Calculate the number of time units between two dates on the screen of the Date and Time Wizard labeled Do Calculations on Dates.

Related Topics

Date and Time Wizard
Dates and Times in PASW Statistics
Create a Date/Time Variable from a String
Create a Date/Time Variable from a Set of Variables
Add or Subtract Values from Date/Time Variables
Select Type of Calculation to Perform with Date/Time Variables
Add or Subtract a Duration from a Date
Subtract Duration Variables
Extract Part of a Date/Time Variable


Select Date-Format Variables to Subtract

Select the variables to subtract.

Select the unit for the result from the drop-down list.

Select how the result should be calculated (Result Treatment).

Result Treatment Collapse Hide details

Result Treatment

The following options are available for how the result is calculated:

• Truncate to integer. Any fractional portion of the result is ignored. For example, subtracting 10/28/2006 from 10/21/2007 returns a result of 0 for years and 11 for months.

• Round to integer. The result is rounded to the closest integer. For example, subtracting 10/28/2006 from 10/21/2007 returns a result of 1 for years and 12 for months.

• Retain fractional part. The complete value is retained; no rounding or truncation is applied. For example, subtracting 10/28/2006 from 10/21/2007 returns a result of 0.98 for years and 11.76 for months.

For rounding and fractional retention, the result for years is based on average number of days in a year (365.25), and the result for months is based on the average number of days in a month (30.4375). For example, subtracting 2/1/2007 from 3/1/2007 (m/d/y format) returns a fractional result of 0.92 months, whereas subtracting 3/1/2007 from 2/1/2007 returns a fractional difference of 1.02 months. This also affects values calculated on time spans that include leap years. For example, subtracting 2/1/2008 from 3/1/2008 returns a fractional difference of 0.95 months, compared to 0.92 for the same time span in a non-leap year.

Date 1 | Date 2 | Years |  |  | Months
 |  | Truncate | Round | Fraction | Truncate | Round | Fraction
10/21/2006 | 10/28/2007 | 1 | 1 | 1.02 | 12 | 12 | 12.22
10/28/2006 | 10/21/2007 | 0 | 1 | .98 | 11 | 12 | 11.76
2/1/2007 | 3/1/2007 | 0 | 0 | .08 | 1 | 1 | .92
2/1/2008 | 3/1/2008 | 0 | 0 | .08 | 1 | 1 | .95
3/1/2007 | 4/1/2007 | 0 | 0 | .08 | 1 | 1 | 1.02
4/1/2007 | 5/1/2007 | 0 | 0 | .08 | 1 | 1 | .99

Related Topics

Specify Result of Subtracting Two Date-Format Variables


Specify Result of Subtracting Two Date-Format Variables

Enter a name for Result Variable. This cannot be the name of an existing variable.

Optionally, you can:

• Assign a descriptive variable label to the new variable.

Related Topics

Select Date-Format Variables to Subtract


Subtract Duration Variables

To subtract two duration variables:

Select Calculate with dates and times on the introduction screen of the Date and Time Wizard.

Select Subtract two durations on the screen of the Date and Time Wizard labeled Do Calculations on Dates.

Related Topics

Date and Time Wizard
Dates and Times in PASW Statistics
Create a Date/Time Variable from a String
Create a Date/Time Variable from a Set of Variables
Add or Subtract Values from Date/Time Variables
Select Type of Calculation to Perform with Date/Time Variables
Add or Subtract a Duration from a Date
Subtract Date-Format Variables
Extract Part of a Date/Time Variable


Select Duration Variables to Subtract

Select the variables to subtract.

Related Topics

Specify Result of Subtracting Two Duration Variables


Specify Result of Subtracting Two Duration Variables

Enter a name for Result Variable. This cannot be the name of an existing variable.

Select a duration format from the Output Format list.

Optionally, you can:

• Assign a descriptive variable label to the new variable.

Related Topics

Select Duration Variables to Subtract


Extract Part of a Date/Time Variable

To extract a component--such as the year--from a date/time variable:

Select Extract a part of a date or time variable on the introduction screen of the Date and Time Wizard.

Related Topics

Date and Time Wizard
Dates and Times in PASW Statistics
Create a Date/Time Variable from a String
Create a Date/Time Variable from a Set of Variables
Add or Subtract Values from Date/Time Variables
Select Type of Calculation to Perform with Date/Time Variables
Add or Subtract a Duration from a Date
Subtract Date-Format Variables
Subtract Duration Variables


Select Component to Extract from Date/Time Variable

Select the variable containing the date or time part to extract.

Select the part of the variable to extract, from the drop-down list. You can extract information from dates that is not explicitly part of the display date, such as day of the week.

Related Topics

Specify Result of Extracting Component from Date/Time Variable


Specify Result of Extracting Component from Date/Time Variable

Enter a name for Result Variable. This cannot be the name of an existing variable.

If you're extracting the date or time part of a date/time variable, then you must select a format from the Output Format list. In cases where the output format is not required, the Output Format list will be disabled.

Optionally, you can:

• Assign a descriptive variable label to the new variable.

Related Topics

Select Component to Extract from Date/Time Variable


Time Series Data Transformations

time series data,time series data,time series data
data transformations,data transformations,data transformations
data transformations,data transformations,data transformations
time series,time series,time series

Several data transformations that are useful in time series analysis are provided:

• Generate date variables to establish periodicity and to distinguish between historical, validation, and forecasting periods.

• Create new time series variables as functions of existing time series variables.

• Replace system- and user-missing values with estimates based on one of several methods.

A time series is obtained by measuring a variable (or set of variables) regularly over a period of time. Time series data transformations assume a data file structure in which each case (row) represents a set of observations at a different time, and the length of time between cases is uniform.

Related Topics

Create Time Series
Replace Missing Values
Seasonal Decomposition
Spectral Plots
Define Dates
Select Cases: Range


Define Dates

date variables,date variables,date variables
defining for time series data,defining for time series data,defining for time series data
time series data,time series data,time series data
defining date variables,defining date variables,defining date variables

The Define Dates dialog box allows you to generate date variables that can be used to establish the periodicity of a time series and to label output from time series analysis.

Cases Are. Defines the time interval used to generate dates.

• Not dated removes any previously defined date variables. Any variables with the following names are deleted: year_, quarter_, month_, week_, day_, hour_, minute_, second_, and date_.

• Custom indicates the presence of custom date variables created with command syntax (for example, a four-day workweek). This item merely reflects the current state of the active dataset. Selecting it from the list has no effect. (For information on creating custom date variables, see the DATE command.)

First Case Is. Defines the starting date value, which is assigned to the first case. Sequential values, based on the time interval, are assigned to subsequent cases.

Periodicity at higher level. Indicates the repetitive cyclical variation, such as the number of months in a year or the number of days in a week. The value displayed indicates the maximum value you can enter. For hours, minutes, and seconds the maximum is the displayed value minus one.

A new numeric variable is created for each component that is used to define the date. The new variable names end with an underscore. A descriptive string variable, date_, is also created from the components. For example, if you selected Weeks, days, hours, four new variables are created: week_, day_, hour_, and date_.

If date variables have already been defined, they are replaced when you define new date variables that will have the same names as the existing date variables.

To Define Dates for Time Series Data Collapse Hide details

To Define Dates for Time Series Data

From the menus choose:

Data
Define Dates...

Select a time interval from the Cases Are list.

Enter the value(s) that define the starting date for First Case Is, which determines the date assigned to the first case.

Related Topics

Time Series Data Transformations
Create Time Series
Replace Missing Values
Seasonal Decomposition
Spectral Plots
Select Cases: Range
Date Variables versus Date Format Variables
DATE


Date Variables versus Date Format Variables

Date variables created with Define Dates should not be confused with date format variables defined in the Variable View of the Data Editor. Date variables are used to establish periodicity for time series data. Date format variables represent dates and/or times displayed in various date/time formats. Date variables are simple integers representing the number of days, weeks, hours, and so on, from a user-specified starting point. Internally, most date format variables are stored as the number of seconds from October 14, 1582.

Related Topics

Variable Names and Variable Labels in Dialog Box Lists
Data Editor
Data View
Variable View
Variable Names
Variable Measurement Level
Custom Variable Attributes
Entering Data
To Change Data Type
Copying Data Properties
Transpose


Create Time Series

time series data,time series data,time series data
creating new time series variables,creating new time series variables,creating new time series variables
data transformations,data transformations,data transformations
time series,time series,time series

The Create Time Series dialog box allows you to create new variables based on functions of existing numeric time series variables. These transformed values are useful in many time series analysis procedures.

Default new variable names are the first six characters of the existing variable used to create it, followed by an underscore and a sequential number. For example, for the variable price, the new variable name would be price_1. The new variables retain any defined value labels from the original variables.

Available functions for creating time series variables include differences, moving averages, running medians, lag, and lead functions.

To Create New Time Series Variables Collapse Hide details

To Create New Time Series Variables

From the menus choose:

Transform
Create Time Series...

Select the time series function that you want to use to transform the original variable(s).

Select the variable(s) from which you want to create new time series variables. Only numeric variables can be used.

Optionally, you can:

• Enter variable names to override the default new variable names.

• Change the function for a selected variable.

Related Topics

Time Series Data Transformations
Replace Missing Values
Seasonal Decomposition
Spectral Plots
Define Dates
Select Cases: Range
Time Series Transformation Functions
CREATE


Time Series Transformation Functions

time series data,time series data,time series data
transformation functions,transformation functions,transformation functions
difference function,difference function,difference function
seasonal difference function,seasonal difference function,seasonal difference function
centered moving average function,centered moving average function,centered moving average function
prior moving average function,prior moving average function,prior moving average function
running median function,running median function,running median function
cumulative sum function,cumulative sum function,cumulative sum function
LAG (function),LAG (function),LAG (function)
lead function,lead function,lead function
smoothing function,smoothing function,smoothing function
T4253H smoothing,T4253H smoothing,T4253H smoothing

Difference. Nonseasonal difference between successive values in the series. The order is the number of previous values used to calculate the difference. Because one observation is lost for each order of difference, system-missing values appear at the beginning of the series. For example, if the difference order is 2, the first two cases will have the system-missing value for the new variable.

Seasonal difference. Difference between series values a constant span apart. The span is based on the currently defined periodicity. To compute seasonal differences, you must have defined date variables (Data menu, Define Dates) that include a periodic component (such as months of the year). The order is the number of seasonal periods used to compute the difference. The number of cases with the system-missing value at the beginning of the series is equal to the periodicity multiplied by the order. For example, if the current periodicity is 12 and the order is 2, the first 24 cases will have the system-missing value for the new variable.

Centered moving average. Average of a span of series values surrounding and including the current value. The span is the number of series values used to compute the average. If the span is even, the moving average is computed by averaging each pair of uncentered means. The number of cases with the system-missing value at the beginning and at the end of the series for a span of n is equal to n/2 for even span values and (n–1)/2 for odd span values. For example, if the span is 5, the number of cases with the system-missing value at the beginning and at the end of the series is 2.

Prior moving average. Average of the span of series values preceding the current value. The span is the number of preceding series values used to compute the average. The number of cases with the system-missing value at the beginning of the series is equal to the span value.

Running medians. Median of a span of series values surrounding and including the current value. The span is the number of series values used to compute the median. If the span is even, the median is computed by averaging each pair of uncentered medians. The number of cases with the system-missing value at the beginning and at the end of the series for a span of n is equal to n/2 for even span values and (n–1)/2 for odd span values. For example, if the span is 5, the number of cases with the system-missing value at the beginning and at the end of the series is 2.

Cumulative sum. Cumulative sum of series values up to and including the current value.

Lag. Value of a previous case, based on the specified lag order. The order is the number of cases prior to the current case from which the value is obtained. The number of cases with the system-missing value at the beginning of the series is equal to the order value.

Lead. Value of a subsequent case, based on the specified lead order. The order is the number of cases after the current case from which the value is obtained. The number of cases with the system-missing value at the end of the series is equal to the order value.

Smoothing. New series values based on a compound data smoother. The smoother starts with a running median of 4, which is centered by a running median of 2. It then resmoothes these values by applying a running median of 5, a running median of 3, and hanning (running weighted averages). Residuals are computed by subtracting the smoothed series from the original series. This whole process is then repeated on the computed residuals. Finally, the smoothed residuals are computed by subtracting the smoothed values obtained the first time through the process. This is sometimes referred to as T4253H smoothing.

Related Topics

Create Time Series


Replace Missing Values

missing values,missing values,missing values
replacing in time series data,replacing in time series data,replacing in time series data
time series data,time series data,time series data
replacing missing values,replacing missing values,replacing missing values

Missing observations can be problematic in analysis, and some time series measures cannot be computed if there are missing values in the series. Sometimes the value for a particular observation is simply not known. In addition, missing data can result from any of the following:

• Each degree of differencing reduces the length of a series by 1.

• Each degree of seasonal differencing reduces the length of a series by one season.

• If you create new series that contain forecasts beyond the end of the existing series (by clicking a Save button and making suitable choices), the original series and the generated residual series will have missing data for the new observations.

• Some transformations (for example, the log transformation) produce missing data for certain values of the original series.

Missing data at the beginning or end of a series pose no particular problem; they simply shorten the useful length of the series. Gaps in the middle of a series (embedded missing data) can be a much more serious problem. The extent of the problem depends on the analytical procedure you are using.

The Replace Missing Values dialog box allows you to create new time series variables from existing ones, replacing missing values with estimates computed with one of several methods. Default new variable names are the first six characters of the existing variable used to create it, followed by an underscore and a sequential number. For example, for the variable price, the new variable name would be price_1. The new variables retain any defined value labels from the original variables.

To Replace Missing Values for Time Series Variables Collapse Hide details

To Replace Missing Values for Time Series Variables

From the menus choose:

Transform
Replace Missing Values...

Select the estimation method you want to use to replace missing values.

Select the variable(s) for which you want to replace missing values.

Optionally, you can:

• Enter variable names to override the default new variable names.

• Change the estimation method for a selected variable.

Related Topics

Time Series Data Transformations
Define Dates
Create Time Series
Seasonal Decomposition
Spectral Plots
Estimation Methods for Replacing Missing Values
RMV


Estimation Methods for Replacing Missing Values

replacing missing values,replacing missing values,replacing missing values
series mean,series mean,series mean
replacing missing values,replacing missing values,replacing missing values
median of nearby points,median of nearby points,median of nearby points
replacing missing values,replacing missing values,replacing missing values
mean of nearby points,mean of nearby points,mean of nearby points
replacing missing values,replacing missing values,replacing missing values
linear interpolation,linear interpolation,linear interpolation
replacing missing values,replacing missing values,replacing missing values
linear trend,linear trend,linear trend

Series mean. Replaces missing values with the mean for the entire series.

Mean of nearby points. Replaces missing values with the mean of valid surrounding values. The span of nearby points is the number of valid values above and below the missing value used to compute the mean.

Median of nearby points. Replaces missing values with the median of valid surrounding values. The span of nearby points is the number of valid values above and below the missing value used to compute the median.

Linear interpolation. Replaces missing values using a linear interpolation. The last valid value before the missing value and the first valid value after the missing value are used for the interpolation. If the first or last case in the series has a missing value, the missing value is not replaced.

Linear trend at point. Replaces missing values with the linear trend for that point. The existing series is regressed on an index variable scaled 1 to n. Missing values are replaced with their predicted values.

Related Topics

Replace Missing Values


Scoring Data with Predictive Models

scoring,scoring,scoring
models supported for export and scoring,models supported for export and scoring,models supported for export and scoring

The process of applying a predictive model to a set of data is referred to as scoring the data. PASW Statistics, PASW Modeler, and AnswerTree have procedures for building predictive models such as regression, clustering, tree, and neural network models. Once a model has been built, the model specifications can be saved as an XML file containing all of the information necessary to reconstruct the model. The PASW Statistics Server product then provides the means to read an XML model file and apply the model to a dataset.

Example. A credit application is rated for risk based on various aspects of the applicant and the loan in question. The credit score obtained from the risk model is used to accept or reject the loan application.

Scoring is treated as a transformation of the data. The model is expressed internally as a set of numeric transformations to be applied to a given set of variables--the predictor variables specified in the model--in order to obtain a predicted result. In this sense, the process of scoring data with a given model is inherently the same as applying any function, such as a square root function, to a set of data.

Scoring is only available with PASW Statistics Server and can be done interactively by users working in distributed analysis mode. For scoring large data files, you'll probably want to make use of the Batch Facility, a separate executable provided with PASW Statistics Server. For information about using the Batch Facility, see the Batch Facility User's Guide, provided as a PDF file on the PASW Statistics Server product CD.

The scoring process consists of the following:

Loading a model from a file in XML (PMML) format.

Computing your scores as a new variable, using the ApplyModel or StrApplyModel function available in the Compute Variable dialog box.

Show me

Models Supported for Export and Scoring Collapse Hide details

The following table lists the procedures that support the export of model specifications to XML. The exported models can be used with PASW Statistics Server to score new data as described above. The full list of model types that can be scored with PASW Statistics Server is provided in the description of the ApplyModel function.

Procedure name | Command name | Option
Discriminant | DISCRIMINANT | Base
Linear Regression | REGRESSION | Base
TwoStep Cluster | TWOSTEP CLUSTER | Base
Generalized Linear Models | GENLIN | Advanced Statistics
Complex Samples General Linear Model | CSGLM | Complex Samples
Complex Samples Logistic Regression | CSLOGISTIC | Complex Samples
Complex Samples Ordinal Regression | CSORDINAL | Complex Samples
Logistic Regression | LOGISTIC REGRESSION | Regression
Multinomial Logistic Regression | NOMREG | Regression
Decision Tree | TREE | Decision Tree

Related Topics

Loading a Saved Model
Displaying a List of Loaded Models
Additional Features Available with Command Syntax
Scoring Expressions (PASW Statistics Server)
MODEL HANDLE
MODEL LIST
MODEL CLOSE
COMPUTE
Discriminant Analysis
TwoStep Cluster Analysis
Linear Regression
Multinomial Logistic Regression
Logistic Regression
Creating Decision Trees
Complex Samples General Linear Model
Complex Samples Logistic Regression
Generalized Linear Models Response


Loading a Saved Model

model file,model file,model file
loading saved models to score data,loading saved models to score data,loading saved models to score data
scoring,scoring,scoring
loading saved models,loading saved models,loading saved models

The Load Model dialog box allows you to load predictive models saved in XML (PMML) format and is only available when working in distributed analysis mode. Loading models is a necessary first step to scoring data with them.

To Load a Model Collapse Hide details

To Load a Model

From the menus choose:

Transform
Prepare Model
Load Model...

Expand Show details Collapse Hide details
Prepare Model Load Model dialog box

Enter a name to associate with this model. Each loaded model must have a unique name.

Click File and select a model file. The resulting Open File dialog box displays the files that are available in distributed analysis mode. This includes files on the machine where PASW Statistics Server is installed and files on your local computer that reside in shared folders or on shared drives.

Note: When you score data, the model will be applied to variables in the active dataset with the same names as the variables from the model file. You can map variables in the original model to different variables in the active dataset with the use of command syntax (see the MODEL HANDLE command).

Name. A name used to identify this model. The rules for valid model names are the same as for variable names, with the addition of the $ character as an allowed first character. You will use this name to specify the model when scoring data with the ApplyModel or StrApplyModel functions.

File. The XML (PMML) file containing the model specifications.

Missing Values

This group of options controls the treatment of missing values, encountered during the scoring process, for the predictor variables defined in the model. A missing value in the context of scoring refers to one of the following:

• A predictor variable contains no value. For numeric variables, this means the system-missing value. For string variables, this means a null string.

• The value has been defined as user-missing, in the model, for the given predictor. Values defined as user-missing in the active dataset, but not in the model, are not treated as missing values in the scoring process.

• The predictor variable is categorical and the value is not one of the categories defined in the model.

Use Value Substitution. Attempt to use value substitution when scoring cases with missing values. The method for determining a value to substitute for a missing value depends on the type of predictive model.

Expand Show details Collapse Hide details

• PASW Statistics Models. For independent variables in linear regression and discriminant models, if mean value substitution for missing values was specified when building and saving the model, then this mean value is used in place of the missing value in the scoring computation, and scoring proceeds. If the mean value is not available, then the system-missing value is returned.

• AnswerTree models & TREE command models. For the CHAID and Exhaustive CHAID models, the biggest child node is selected for a missing split variable. The biggest child node is the one with the largest population among the child nodes using learning sample cases. For C&RT and QUEST models, surrogate split variables (if any) are used first. (Surrogate splits are splits that attempt to match the original split as closely as possible using alternate predictors.) If no surrogate splits are specified or all surrogate split variables are missing, the biggest child node is used.

• PASW Modeler models. Linear regression models are handled as described under PASW Statistics models. Logistic regression models are handled as described under Logistic Regression models. C&RT Tree models are handled as described for C&RT models under AnswerTree models.

• Logistic Regression models. For covariates in logistic regression models, if a mean value of the predictor was included as part of the saved model, then this mean value is used in place of the missing value in the scoring computation, and scoring proceeds. If the predictor is categorical (for example, a factor in a logistic regression model), or if the mean value is not available, then the system-missing value is returned.

Use System-Missing. Return the system-missing value when scoring a case with a missing value.

Related Topics

Scoring Data with Predictive Models
Displaying a List of Loaded Models
Additional Features Available with Command Syntax
MODEL HANDLE


Displaying a List of Loaded Models

scoring,scoring,scoring
displaying loaded models,displaying loaded models,displaying loaded models

You can obtain a list of the currently loaded models. From the menus (only available in distributed analysis mode) choose:

Transform
Prepare Model
List Model(s)

This will generate a Model Handles table. The table contains a list of all currently loaded models and includes the name (referred to as the model handle) assigned to the model, the type of model, the path to the model file, and the method for handling missing values.

Expand Show details Collapse Hide details
Listing of loaded models

Related Topics

Scoring Data with Predictive Models
Loading a Saved Model
Additional Features Available with Command Syntax
MODEL LIST


Additional Features Available with Command Syntax

From the Load Model dialog box, you can paste your selections into a syntax window and edit the resulting MODEL HANDLE command syntax. This allows you to:

• Map variables in the original model to different variables in the active dataset (with the MAP subcommand). By default, the model is applied to variables in the active dataset with the same names as the variables from the model file.

Related Topics

Scoring Data with Predictive Models
Loading a Saved Model
Displaying a List of Loaded Models
MODEL HANDLE


Sort Cases

cases,cases,cases
sorting,sorting,sorting
sorting cases,sorting cases,sorting cases
file transformations,file transformations,file transformations
sorting cases,sorting cases,sorting cases

This dialog box sorts cases (rows) of the data file based on the values of one or more sorting variables. You can sort cases in ascending or descending order.

• If you select multiple sort variables, cases are sorted by each variable within categories of the preceding variable on the Sort list. For example, if you select gender as the first sorting variable and minority as the second sorting variable, cases will be sorted by minority classification within each gender category.

• The sort sequence is based on the locale-defined order (and is not necessarily the same as the numerical order of the character codes). The default locale is the operating system locale. You can control the locale with the Language setting on the General tab of the Options dialog box (Edit menu).

To Sort Cases Collapse Hide details

To Sort Cases

From the menus choose:

Data
Sort Cases...

Select one or more sorting variables.

The data file is sorted based on the values of the sorting variables. If you select multiple sorting variables, cases are sorted by values of each variable within categories of the prior variable on the Sort list.

Related Topics

Add Cases
Add Variables
Split File
SORT CASES


Sort Variables

variables,variables,variables
sorting,sorting,sorting
sorting,sorting,sorting
variables,variables,variables
sorting variables,sorting variables,sorting variables

You can sort the variables in the active dataset based on the values of any of the variable attributes (e.g., variable name, data type, measurement level), including custom variable attributes.

• Values can be sorted in ascending or descending order.

• You can save the original (pre-sorted) variable order in a custom variable attribute.

• Sorting by values of custom variable attributes is limited to custom variable attributes that are currently visible in Variable View.

For more information on custom variable attributes, see Custom Variable Attributes.

To Sort Variables Collapse Hide details

To Sort Variables

In Variable View of the Data Editor:

Right-click on the attribute column heading and from the context menu choose Sort Ascending or Sort Descending.

or

From the menus in Variable View or Data View, choose:

Data
Sort Variables

Select the attribute you want to use to sort variables.

Select the sort order (ascending or descending).

• The list of variable attributes matches the attribute column names displayed in Variable View of the Data Editor.

• You can save the original (pre-sorted) variable order in a custom variable attribute. For each variable, the value of the attribute is an integer value indicating its position prior to sorting; so by sorting variables based on the value of that custom attribute you can restore the original variable order.


Transpose

transposing variables and cases,transposing variables and cases,transposing variables and cases
data files,data files,data files
transposing,transposing,transposing
data files,data files,data files
flipping,flipping,flipping
file transformations,file transformations,file transformations
transposing variables and cases,transposing variables and cases,transposing variables and cases

Transpose creates a new data file in which the rows and columns in the original data file are transposed so that cases (rows) become variables and variables (columns) become cases. Transpose automatically creates new variable names and displays a list of the new variable names.

• A new string variable that contains the original variable name, case_lbl, is automatically created.

• If the active dataset contains an ID or name variable with unique values, you can use it as the name variable, and its values will be used as variable names in the transposed data file. If it is a numeric variable, the variable names start with the letter V, followed by the numeric value.

• User-missing values are converted to the system-missing value in the transposed data file. To retain any of these values, change the definition of missing values in the Variable View in the Data Editor.

To Transpose Variables and Cases Collapse Hide details

To Transpose Variables and Cases

From the menus choose:

Data
Transpose...

Select one or more variables to transpose into cases.

Optionally, you can select a name variable, and its values will be used as variable names in the transposed data file.

Related Topics

Variable Names and Variable Labels in Dialog Box Lists
Data Editor
Data View
Variable View
Variable Names
Variable Measurement Level
Custom Variable Attributes
Entering Data
To Change Data Type
Copying Data Properties
Date Variables versus Date Format Variables
FLIP


Merging Data Files

You can merge data from two files in two different ways. You can:

• Merge the active dataset with another open dataset or PASW Statistics data file containing the same variables but different cases.

• Merge the active dataset with another open dataset or PASW Statistics data file containing the same cases but different variables.

To Merge Files

From the menus choose:

Data
Merge Files

Select Add Cases or Add Variables.

• For more information on merging files by adding cases (rows), see Add Cases.

• For more information on merging files by adding variables (columns), see Add Variables.


Add Cases

file transformations,file transformations,file transformations
merging data files,merging data files,merging data files
merging data files,merging data files,merging data files
files with different cases,files with different cases,files with different cases

Add Cases merges the active dataset with a second dataset or external PASW Statistics data file that contains the same variables (columns) but different cases (rows). For example, you might record the same information for customers in two different sales regions and maintain the data for each region in separate files. The second dataset can be an external PASW Statistics data file or a dataset available in the current session.

Unpaired Variables. Variables to be excluded from the new, merged data file. Variables from the active dataset are identified with an asterisk (*). Variables from the other dataset are identified with a plus sign (+). By default, this list contains:

• Variables from either data file that do not match a variable name in the other file. You can create pairs from unpaired variables and include them in the new, merged file.

• Variables defined as numeric data in one file and string data in the other file. Numeric variables cannot be merged with string variables.

• String variables of unequal width. The defined width of a string variable must be the same in both data files.

Variables in New Active Dataset. Variables to be included in the new, merged data file. By default, all of the variables that match both the name and the data type (numeric or string) are included on the list.

• You can remove variables from the list if you do not want them to be included in the merged file.

• Any unpaired variables included in the merged file will contain missing data for cases from the file that does not contain that variable.

Indicate case source as variable. Indicates the source data file for each case. This variable has a value of 0 for cases from the active dataset and a value of 1 for cases from the external data file.

To Merge Data Files with the Same Variables and Different Cases Collapse Hide details

To Merge Data Files with the Same Variables and Different Cases

Open at least one of the data files that you want to merge. If you have multiple datasets open, make one of the datasets that you want to merge the active dataset. The cases from this file will appear first in the new, merged data file.

From the menus choose:

Data
Merge Files
Add Cases...

Select the dataset or external PASW Statistics data file to merge with the active dataset.

Remove any variables that you do not want from the Variables in New Active Dataset list.

Add any variable pairs from the Unpaired Variables list that represent the same information recorded under different variable names in the two files. For example, date of birth might have the variable name brthdate in one file and datebrth in the other file.

To Select a Pair of Unpaired Variables

Click one of the variables on the Unpaired Variables list.

Ctrl-click the other variable on the list. (Press the Ctrl key and click the left mouse button at the same time.)

Click Pair to move the variable pair to the Variables in New Active Dataset list. (The variable name from the active dataset is used as the variable name in the merged file.)

Related Topics

Sort Cases
Add Variables
Split File
Add Cases or Variables: Rename
Add Cases: Dictionary Information
Merging More Than Two Data Sources
ADD FILES


Add Cases or Variables: Rename

merging data files,merging data files,merging data files
renaming variables,renaming variables,renaming variables
variables,variables,variables
renaming for merged data files,renaming for merged data files,renaming for merged data files

You can rename variables from either the active dataset or the other dataset before moving them from the unpaired list to the list of variables to be included in the merged data file. Renaming variables enables you to:

• Use the variable name from the other dataset rather than the name from the active dataset for variable pairs (Add Cases)

• Include two variables with the same name but of unmatched types or different string widths (Add Cases), or include two variables with the same name that contain different information (Add Variables). For example, to include both the numeric variable sex from the active dataset and the string variable sex from the other dataset, one of them must be renamed first

Renaming Variables for Merged Data Files Collapse Hide details

Open one of the data files.

From the menus choose:

Data
Merge Files
Add Cases...

or

Data
Merge Files
Add Variables...

Select the variable in the Unpaired (Add Cases) or Excluded (Add Variables) list.

Click Rename.

Enter the new variable name. For information on variable naming rules, see Variable Names.

Related Topics

Add Cases
Add Variables


Add Cases: Dictionary Information

merging data files,merging data files,merging data files
dictionary information,dictionary information,dictionary information
variable labels,variable labels,variable labels
in merged data files,in merged data files,in merged data files
value labels,value labels,value labels
in merged data files,in merged data files,in merged data files

Any existing dictionary information (variable and value labels, user-missing values, display formats) in the active dataset is applied to the merged data file.

• If any dictionary information for a variable is undefined in the active dataset, dictionary information from the other dataset is used.

• If the active dataset contains any defined value labels or user-missing values for a variable, any additional value labels or user-missing values for that variable in the other dataset are ignored.

Related Topics

Add Cases
Merging More Than Two Data Sources


Merging More Than Two Data Sources

Using command syntax, you can merge up to 50 datasets and/or data files. See the topic ADD FILES for more information.

Related Topics

Add Cases
Add Cases: Dictionary Information


Add Variables

merging data files,merging data files,merging data files
files with different variables,files with different variables,files with different variables
file transformations,file transformations,file transformations
merging data files,merging data files,merging data files
keyed table,keyed table,keyed table

Add Variables merges the active dataset with another open dataset or external PASW Statistics data file that contains the same cases (rows) but different variables (columns). For example, you might want to merge a data file that contains pre-test results with one that contains post-test results.

• Cases must be sorted in the same order in both datasets.

• If one or more key variables are used to match cases, the two datasets must be sorted by ascending order of the key variable(s).

• Variable names in the second data file that duplicate variable names in the active dataset are excluded by default because Add Variables assumes that these variables contain duplicate information.

Indicate case source as variable. Indicates the source data file for each case. This variable has a value of 0 for cases from the active dataset and a value of 1 for cases from the external data file.

Excluded Variables. Variables to be excluded from the new, merged data file. By default, this list contains any variable names from the other dataset that duplicate variable names in the active dataset. Variables from the active dataset are identified with an asterisk (*). Variables from the other dataset are identified with a plus sign (+). If you want to include an excluded variable with a duplicate name in the merged file, you can rename it and add it to the list of variables to be included.

New Active Dataset. Variables to be included in the new, merged dataset. By default, all unique variable names in both datasets are included on the list.

Key Variables. If some cases in one dataset do not have matching cases in the other dataset (that is, some cases are missing in one dataset), use key variables to identify and correctly match cases from the two datasets. You can also use key variables with table lookup files.

• The key variables must have the same names in both datasets.

• Both datasets must be sorted by ascending order of the key variables, and the order of variables on the Key Variables list must be the same as their sort sequence.

• Cases that do not match on the key variables are included in the merged file but are not merged with cases from the other file. Unmatched cases contain values for only the variables in the file from which they are taken; variables from the other file contain the system-missing value.

Non-active or active dataset is keyed table. A keyed table, or table lookup file, is a file in which data for each "case" can be applied to multiple cases in the other data file. For example, if one file contains information on individual family members (such as sex, age, education) and the other file contains overall family information (such as total income, family size, location), you can use the file of family data as a table lookup file and apply the common family data to each individual family member in the merged data file.

To Merge Files with the Same Cases but Different Variables Collapse Hide details

To Merge Files with the Same Cases but Different Variables

Open at least one of the data files that you want to merge. If you have multiple datasets open, make one of the datasets that you want to merge the active dataset.

From the menus choose:

Data
Merge Files
Add Variables...

Select the dataset or external PASW Statistics data file to merge with the active dataset.

To Select Key Variables

Select the variables from the external file variables (+) on the Excluded Variables list.

Select Match cases on key variables in sorted files.

Add the variables to the Key Variables list.

The key variables must exist in both the active dataset and the other dataset. Both datasets must be sorted by ascending order of the key variables, and the order of variables on the Key Variables list must be the same as their sort sequence.

Related Topics

Sort Cases
Add Cases
Split File
Add Cases or Variables: Rename
MATCH FILES


Aggregate Data

file transformations,file transformations,file transformations
aggregating data,aggregating data,aggregating data
aggregating data,aggregating data,aggregating data
break variables,break variables,break variables
in Aggregate Data,in Aggregate Data,in Aggregate Data

Aggregate Data aggregates groups of cases in the active dataset into single cases and creates a new, aggregated file or creates new variables in the active dataset that contain aggregated data. Cases are aggregated based on the value of zero or more break (grouping) variables. If no break variables are specified, then the entire dataset is a single break group.

• If you create a new, aggregated data file, the new data file contains one case for each group defined by the break variables. For example, if there is one break variable with two values, the new data file will contain only two cases. If no break variable is specified, the new data file will contain one case.

• If you add aggregate variables to the active dataset, the data file itself is not aggregated. Each case with the same value(s) of the break variable(s) receives the same values for the new aggregate variables. For example, if gender is the only break variable, all males would receive the same value for a new aggregate variable that represents average age. If no break variable is specified, all cases would receive the same value for a new aggregate variable that represents average age.

Break Variable(s). Cases are grouped together based on the values of the break variables. Each unique combination of break variable values defines a group. When creating a new, aggregated data file, all break variables are saved in the new file with their existing names and dictionary information. The break variable, if specified, can be either numeric or string.

Aggregated Variables. Source variables are used with aggregate functions to create new aggregate variables. The aggregate variable name is followed by an optional variable label, the name of the aggregate function, and the source variable name in parentheses.

You can override the default aggregate variable names with new variable names, provide descriptive variable labels, and change the functions used to compute the aggregated data values. You can also create a variable that contains the number of cases in each break group.

To Aggregate a Data File Collapse Hide details

To Aggregate a Data File

From the menus choose:

Data
Aggregate...

Optionally select break variables that define how cases are grouped to create aggregated data. If no break variables are specified, then the entire dataset is a single break group.

Select one or more aggregate variables.

Select an aggregate function for each aggregate variable.

Optionally, you can override the default aggregate variable names with new variable names, provide descriptive variable labels, and create a variable that contains the number of cases in each break group.

Saving Aggregated Results Collapse Hide details

Saving Aggregated Results

You can add aggregate variables to the active dataset or create a new, aggregated data file.

• Add aggregated variables to active dataset. New variables based on aggregate functions are added to the active dataset. The data file itself is not aggregated. Each case with the same value(s) of the break variable(s) receives the same values for the new aggregate variables.

• Create a new dataset containing only the aggregated variables. Saves aggregated data to a new dataset in the current session. The dataset includes the break variables that define the aggregated cases and all aggregate variables defined by aggregate functions. The active dataset is unaffected.

• Write a new data file containing only the aggregated variables. Saves aggregated data to an external data file. The file includes the break variables that define the aggregated cases and all aggregate variables defined by aggregate functions. The active dataset is unaffected.

Sorting Options for Large Data Files Collapse Hide details

Sorting Options for Large Data Files

For very large data files, it may be more efficient to aggregate presorted data.

File is already sorted on break variable(s). If the data have already been sorted by values of the break variables, this option enables the procedure to run more quickly and use less memory. Use this option with caution.

• Data must by sorted by values of the break variables in the same order as the break variables specified for the Aggregate Data procedure.

• If you are adding variables to the active dataset, select this option only if the data are sorted by ascending values of the break variables.

Sort file before aggregating. In very rare instances with large data files, you may find it necessary to sort the data file by values of the break variables prior to aggregating. This option is not recommended unless you encounter memory or performance problems.

Related Topics

Aggregate Data: Aggregate Function
Aggregate Data: Variable Name and Label
AGGREGATE


Aggregate Data: Aggregate Function

aggregating data,aggregating data,aggregating data
aggregate functions,aggregate functions,aggregate functions

This dialog box specifies the function to use to calculate aggregated data values for selected variables on the Aggregate Variables list in the Aggregate Data dialog box. Aggregate functions include:

• Summary functions for numeric variables, including mean, median, standard deviation, and sum

• Number of cases, including unweighted, weighted, nonmissing, and missing

• Percentage or fraction of values above or below a specified value

• Percentage or fraction of values inside or outside of a specified range

Assigning Aggregate Functions Collapse Hide details

From the menus choose:

Data
Aggregate...

Select one or more aggregate variables to include in the new data file.

Select the variables for which you want to assign a different function on the Aggregate Variables list.

Click Function.

Select the function in the Aggregate Function dialog box.

The selected function is assigned to the selected variables on the Aggregate Variables list.

Related Topics

Aggregate Data
Aggregate Data: Variable Name and Label


Aggregate Data: Variable Name and Label

aggregating data,aggregating data,aggregating data
variable names and labels,variable names and labels,variable names and labels

Aggregate Data assigns default variable names for the aggregated variables in the new data file. This dialog box enables you to change the variable name for the selected variable on the Aggregate Variables list and provide a descriptive variable label. See the topic Variable Names for more information.

Changing Aggregate Variable Names Collapse Hide details

From the menus choose:

Data
Aggregate...

Select one or more aggregate variables to include in the new data file.

Select the variable on the Aggregate Variables list.

Click Name and Label.

Enter the new variable name.

Optionally, you can add a descriptive variable label.

Related Topics

Aggregate Data
Aggregate Data: Aggregate Function


Split File

split-file processing,split-file processing,split-file processing
file transformations,file transformations,file transformations
split-file processing,split-file processing,split-file processing

Split File splits the data file into separate groups for analysis based on the values of one or more grouping variables. If you select multiple grouping variables, cases are grouped by each variable within categories of the preceding variable on the Groups Based On list. For example, if you select gender as the first grouping variable and minority as the second grouping variable, cases will be grouped by minority classification within each gender category.

• You can specify up to eight grouping variables.

• Each eight bytes of a long string variable (string variables longer than eight bytes) counts as a variable toward the limit of eight grouping variables.

• Cases should be sorted by values of the grouping variables and in the same order that variables are listed in the Groups Based On list. If the data file isn't already sorted, select Sort the file by grouping variables.

Compare groups. Split-file groups are presented together for comparison purposes. For pivot tables, a single pivot table is created and each split-file variable can be moved between table dimensions. For charts, a separate chart is created for each split-file group and the charts are displayed together in the Viewer.

Organize output by groups. All results from each procedure are displayed separately for each split-file group.

To Split a Data File for Analysis Collapse Hide details

To Split a Data File for Analysis

From the menus choose:

Data
Split File...

Select Compare groups or Organize output by groups.

Select one or more grouping variables.

If the data file isn't already sorted by values of the grouping variables, select Sort the file by grouping variables.

Related Topics

Sort Cases
Add Cases
Add Variables
Case Selection Status in the Data Editor
Random Number Generators
Select Cases
SPLIT FILE


Select Cases

cases,cases,cases
selecting subsets,selecting subsets,selecting subsets
subsets of cases,subsets of cases,subsets of cases
selecting,selecting,selecting
selecting cases,selecting cases,selecting cases
select cases,select cases,select cases

Select Cases provides several methods for selecting a subgroup of cases based on criteria that include variables and complex expressions. You can also select a random sample of cases. The criteria used to define a subgroup can include:

• Variable values and ranges

• Date and time ranges

• Case (row) numbers

• Arithmetic expressions

• Logical expressions

• Functions

Expand Show details Collapse Hide details

All cases. Turns case filtering off and uses all cases.

If condition is satisfied. Use a conditional expression to select cases. If the result of the conditional expression is true, the case is selected. If the result is false or missing, the case is not selected.

Random sample of cases. Selects a random sample based on an approximate percentage or an exact number of cases.

Based on time or case range. Selects cases based on a range of case numbers or a range of dates/times.

Use filter variable. Use the selected numeric variable from the data file as the filter variable. Cases with any value other than 0 or missing for the filter variable are selected.

Output

This section controls the treatment of unselected cases. You can choose one of the following alternatives for the treatment of unselected cases:

• Filter out unselected cases. Unselected cases are not included in the analysis but remain in the dataset. You can use the unselected cases later in the session if you turn filtering off. If you select a random sample or if you select cases based on a conditional expression, this generates a variable named filter_$ with a value of 1 for selected cases and a value of 0 for unselected cases.

• Copy selected cases to a new dataset. Selected cases are copied to a new dataset, leaving the original dataset unaffected. Unselected cases are not included in the new dataset and are left in their original state in the original dataset.

• Delete unselected cases. Unselected cases are deleted from the dataset. Deleted cases can be recovered only by exiting from the file without saving any changes and then reopening the file. The deletion of cases is permanent if you save the changes to the data file.

Note: If you delete unselected cases and save the file, the cases cannot be recovered.

To Select a Subset of Cases Collapse Hide details

To Select a Subset of Cases

From the menus choose:

Data
Select Cases...

Select one of the methods for selecting cases.

Specify the criteria for selecting cases.

Related Topics

Split File
Case Selection Status in the Data Editor
Random Number Generators
Select Cases: If
Select Cases: Random Sample
Select Cases: Range
FILTER
SELECT IF
USE
SAMPLE


Select Cases: If

selecting cases,selecting cases,selecting cases
based on selection criteria,based on selection criteria,based on selection criteria
cases,cases,cases
selecting subsets,selecting subsets,selecting subsets
subsets of cases,subsets of cases,subsets of cases
selecting,selecting,selecting

This dialog box allows you to select subsets of cases using conditional expressions. A conditional expression returns a value of true, false, or missing for each case.

• If the result of a conditional expression is true, the case is included in the selected subset.

• If the result of a conditional expression is false or missing, the case is not included in the selected subset.

• Most conditional expressions use one or more of the six relational operators (<, >, <=, >=, =, and ~=) on the calculator pad.

• Conditional expressions can include variable names, constants, arithmetic operators, numeric (and other) functions, logical variables, and relational operators.

Selecting Cases Based on Conditional Expressions Collapse Hide details

From the menus choose:

Data
Select Cases...

Select If condition is satisfied.

Click If.

Enter the conditional expression.

To build an expression, either paste components into the Expression field or type directly in the Expression field.

• You can paste functions or commonly used system variables by selecting a group from the Function group list and double-clicking the function or variable in the Functions and Special Variables list (or select the function or variable and click the arrow adjacent to the Function group list). Fill in any parameters indicated by question marks (only applies to functions). The function group labeled All provides a listing of all available functions and system variables. A brief description of the currently selected function or variable is displayed in a reserved area in the dialog box.

• String constants must be enclosed in quotation marks or apostrophes.

• If values contain decimals, a period (.) must be used as the decimal indicator.

Related Topics

Functions
Select Cases: Random Sample
Select Cases: Range


Select Cases: Random Sample

selecting cases,selecting cases,selecting cases
random sample,random sample,random sample
subsets of cases,subsets of cases,subsets of cases
random sample,random sample,random sample
random sample,random sample,random sample
selecting,selecting,selecting
sampling,sampling,sampling
random sample,random sample,random sample

This dialog box allows you to select a random sample based on an approximate percentage or an exact number of cases. Sampling is performed without replacement; so, the same case cannot be selected more than once.

Approximately. Generates a random sample of approximately the specified percentage of cases. Since this routine makes an independent pseudo-random decision for each case, the percentage of cases selected can only approximate the specified percentage. The more cases there are in the data file, the closer the percentage of cases selected is to the specified percentage.

Exactly. A user-specified number of cases. You must also specify the number of cases from which to generate the sample. This second number should be less than or equal to the total number of cases in the data file. If the number exceeds the total number of cases in the data file, the sample will contain proportionally fewer cases than the requested number.

Selecting a Random Sample Collapse Hide details

From the menus choose:

Data
Select Cases...

Select Random sample of cases.

Click Sample.

Select the sampling method and enter the percentage or number of cases.

Related Topics

Random Number Generators
Select Cases: If
Select Cases: Range


Select Cases: Range

selecting cases,selecting cases,selecting cases
date range,date range,date range
selecting cases,selecting cases,selecting cases
time range,time range,time range
selecting cases,selecting cases,selecting cases
range of cases,range of cases,range of cases
cases,cases,cases
selecting subsets,selecting subsets,selecting subsets
subsets of cases,subsets of cases,subsets of cases
selecting,selecting,selecting

This dialog box selects cases based on a range of case numbers or a range of dates or times.

• Case ranges are based on row number as displayed in the Data Editor.

• Date and time ranges are available only for time series data with defined date variables (Data menu, Define Dates).

Selecting a Range of Cases or a Range of Dates or Times Collapse Hide details

From the menus choose:

Data
Select Cases...

Select Based on time or case range.

Click Range.

Enter the starting and ending date or time or case numbers.

Related Topics

Time Series Data Transformations
Define Dates
Create Time Series
Seasonal Decomposition
Spectral Plots
Select Cases: If
Select Cases: Random Sample


Weight Cases

cases,cases,cases
weighting,weighting,weighting
weighting cases,weighting cases,weighting cases
file transformations,file transformations,file transformations
weighting cases,weighting cases,weighting cases
weighting cases,weighting cases,weighting cases
fractional weights in Crosstabs,fractional weights in Crosstabs,fractional weights in Crosstabs
Crosstabs,Crosstabs,Crosstabs
fractional weights,fractional weights,fractional weights

Weight Cases gives cases different weights (by simulated replication) for statistical analysis.

• The values of the weighting variable should indicate the number of observations represented by single cases in your data file.

• Cases with zero, negative, or missing values for the weighting variable are excluded from analysis.

• Fractional values are valid and some procedures, such as Frequencies, Crosstabs, and Custom Tables, will use fractional weight values. However, most procedures treat the weighting variable as a replication weight and will simply round fractional weights to the nearest integer. Some procedures ignore the weighting variable completely, and this limitation is noted in the procedure-specific documentation.

Once you apply a weight variable, it remains in effect until you select another weight variable or turn off weighting. If you save a weighted data file, weighting information is saved with the data file. You can turn off weighting at any time, even after the file has been saved in weighted form.

Weights in Crosstabs. The Crosstabs procedure has several options for handling case weights. See the topic Crosstabs Cell Display for more information.

Weights in scatterplots and histograms. Scatterplots and histograms have an option for turning case weights on and off, but this does not affect cases with a zero, negative, or missing value for the weight variable. These cases remain excluded from the chart even if you turn weighting off from within the chart.

To Weight Cases Collapse Hide details

To Weight Cases

From the menus choose:

Data
Weight Cases...

Select Weight cases by.

Select a frequency variable.

The values of the frequency variable are used as case weights. For example, a case with a value of 3 for the frequency variable will represent three cases in the weighted data file.

Related Topics

Copying Data Properties
WEIGHT


Restructuring Data

restructuring data,restructuring data,restructuring data
overview,overview,overview
restructuring data,restructuring data,restructuring data

Use the Restructure Data Wizard to restructure your data for the procedure that you want to use. The wizard replaces the current file with a new, restructured file. The wizard can:

• Restructure selected variables into cases

• Restructure selected cases into variables

• Transpose all data

Related Topics

To Restructure Data
Restructure Data Wizard: Select Type
Example of Variables to Cases
Example of Cases to Variables
Restructure Data Wizard (Variables to Cases): Number of Variable Groups
Restructure Data Wizard (Variables to Cases): Select Variables
Restructure Data Wizard (Variables to Cases): Create Index Variables
Example of One Index for Variables to Cases
Example of Two Indices for Variables to Cases
Restructure Data Wizard (Variables to Cases): Create One Index Variable
Restructure Data Wizard (Variables to Cases): Create Multiple Index Variables
Restructure Data Wizard (Variables to Cases): Options
Restructure Data Wizard (Cases to Variables): Select Variables
Restructure Data Wizard (Cases to Variables): Sort Data
Restructure Data Wizard (Cases to Variables): Options
Restructure Data Wizard: Finish
CASESTOVARS
VARSTOCASES


To Restructure Data

restructuring data,restructuring data,restructuring data
file transformations,file transformations,file transformations
restructuring data,restructuring data,restructuring data
file transformations,file transformations,file transformations

From the menus choose:

Data
Restructure...

Select the type of restructuring that you want to do.

Select the data to restructure.

Optionally, you can:

• Create identification variables, which allow you to trace a value in the new file back to a value in the original file

• Sort the data prior to restructuring

• Define options for the new file

• Paste the command syntax into a syntax window


Restructure Data Wizard: Select Type

restructuring data,restructuring data,restructuring data
types of restructuring,types of restructuring,types of restructuring
restructuring data,restructuring data,restructuring data
file transformations,file transformations,file transformations
restructuring data,restructuring data,restructuring data
file transformations,file transformations,file transformations
data files,data files,data files
restructuring,restructuring,restructuring
data files,data files,data files
variables,variables,variables
restructuring into cases,restructuring into cases,restructuring into cases
variables,variables,variables
cases,cases,cases
restructuring into variables,restructuring into variables,restructuring into variables
cases,cases,cases
variable pairs,variable pairs,variable pairs
creating,creating,creating
variable pairs,variable pairs,variable pairs
grouping variables,grouping variables,grouping variables
creating,creating,creating
grouping variables,grouping variables,grouping variables

Use the Restructure Data Wizard to restructure your data. In the first dialog box, select the type of restructuring that you want to do.

• Restructure selected variables into cases. Choose this when you have groups of related columns in your data and you want them to appear in groups of rows in the new data file.

• Restructure selected cases into variables. Choose this when you have groups of related rows in your data and you want them to appear in groups of columns in the new data file.

• Transpose all data. Choose this when you want to transpose your data. All rows will become columns and all columns will become rows in the new data. This choice closes the Restructure Data Wizard and opens the Transpose Data dialog box.

Deciding How to Restructure the Data

A variable contains information that you want to analyze--for example, a measurement or a score. A case is an observation--for example, an individual. In a simple data structure, each variable is a single column in your data and each case is a single row. So, for example, if you were measuring test scores for all students in a class, all score values would appear in only one column, and there would be a row for each student.

When you analyze data, you are often analyzing how a variable varies according to some condition. The condition can be a specific experimental treatment, a demographic, a point in time, or something else. In data analysis, conditions of interest are often referred to as factors. When you analyze factors, you have a complex data structure. You may have information about a variable in more than one column in your data (for example, a column for each level of a factor), or you may have information about a case in more than one row (for example, a row for each level of a factor). The Restructure Data Wizard helps you to restructure files with a complex data structure.

The structure of the current file and the structure that you want in the new file determine the choices that you make in the wizard.

How are the data arranged in the current file? The current data may be arranged so that factors are recorded in a separate variable (in groups of cases) or with the variable (in groups of variables).

• Groups of cases. Does the current file have variables and conditions recorded in separate columns? For example:

var | factor
8 | 1
9 | 1
3 | 2
1 | 2

In this example, the first two rows are a case group because they are related. They contain data for the same factor level. In PASW Statistics data analysis, the factor is often referred to as a grouping variable when the data are structured this way.

• Groups of columns. Does the current file have variables and conditions recorded in the same column? For example:

var_1 | var_2
8 | 3
9 | 1

In this example, the two columns are a variable group because they are related. They contain data for the same variable--var_1 for factor level 1 and var_2 for factor level 2. In PASW Statistics data analysis, the factor is often referred to as a repeated measure when the data are structured this way.

How should the data be arranged in the new file? This is usually determined by the procedure that you want to use to analyze your data.

• Procedures that require groups of cases. Your data must be structured in case groups to do analyses that require a grouping variable. Examples are univariate, multivariate, and variance components with General Linear Model, Mixed Models, and OLAP Cubes and independent samples with T Test or Nonparametric Tests. If your current data structure is variable groups and you want to do these analyses, select Restructure selected variables into cases.

• Procedures that require groups of variables. Your data must be structured in variable groups to analyze repeated measures. Examples are repeated measures with General Linear Model, time-dependent covariate analysis with Cox Regression Analysis, paired samples with T Test, or related samples with Nonparametric Tests. If your current data structure is case groups and you want to do these analyses, select Restructure selected cases into variables.

Related Topics

To Restructure Data
Restructuring Data
Example of Variables to Cases
Example of Cases to Variables
Restructure Data Wizard (Variables to Cases): Number of Variable Groups
Restructure Data Wizard (Variables to Cases): Select Variables
Restructure Data Wizard (Variables to Cases): Create Index Variables
Example of One Index for Variables to Cases
Example of Two Indices for Variables to Cases
Restructure Data Wizard (Variables to Cases): Create One Index Variable
Restructure Data Wizard (Variables to Cases): Create Multiple Index Variables
Restructure Data Wizard (Variables to Cases): Options
Restructure Data Wizard (Cases to Variables): Select Variables
Restructure Data Wizard (Cases to Variables): Sort Data
Restructure Data Wizard (Cases to Variables): Options
Restructure Data Wizard: Finish
CASESTOVARS
VARSTOCASES


Example of Variables to Cases

restructuring data,restructuring data,restructuring data
example of variables to cases,example of variables to cases,example of variables to cases
restructuring data,restructuring data,restructuring data

In this example, test scores are recorded in separate columns for each factor, A and B.

Current data for variables to cases

You want to do an independent-samples t test. You have a column group consisting of score_a and score_b, but you don't have the grouping variable that the procedure requires. Select Restructure selected variables into cases in the Restructure Data Wizard, restructure one variable group into a new variable named score, and create an index named group. The new data file is shown in the following figure.

New, restructured data for variables to cases

When you run the independent-samples t test, you can now use group as the grouping variable.

Related Topics

Restructuring Data
Restructure Data Wizard: Select Type
Example of Cases to Variables
Restructure Data Wizard (Variables to Cases): Number of Variable Groups
Restructure Data Wizard (Variables to Cases): Select Variables
Restructure Data Wizard (Variables to Cases): Create Index Variables
Example of One Index for Variables to Cases
Example of Two Indices for Variables to Cases
Restructure Data Wizard (Variables to Cases): Create One Index Variable
Restructure Data Wizard (Variables to Cases): Create Multiple Index Variables
Restructure Data Wizard (Variables to Cases): Options
Restructure Data Wizard (Cases to Variables): Select Variables
Restructure Data Wizard (Cases to Variables): Sort Data
Restructure Data Wizard (Cases to Variables): Options
Restructure Data Wizard: Finish


Example of Cases to Variables

restructuring data,restructuring data,restructuring data
example of cases to variables,example of cases to variables,example of cases to variables
restructuring data,restructuring data,restructuring data

In this example, test scores are recorded twice for each subject—before and after a treatment.

Current data for cases to variables

You want to do a paired-samples t test. Your data structure is case groups, but you don't have the repeated measures for the paired variables that the procedure requires. Select Restructure selected cases into variables in the Restructure Data Wizard, use id to identify the row groups in the current data, and use time to create the variable group in the new file.

New, restructured data for cases to variables

When you run the paired-samples t test, you can now use bef and aft as the variable pair.

Related Topics

Restructuring Data
Restructure Data Wizard: Select Type
Example of Variables to Cases
Restructure Data Wizard (Variables to Cases): Number of Variable Groups
Restructure Data Wizard (Variables to Cases): Select Variables
Restructure Data Wizard (Variables to Cases): Create Index Variables
Example of One Index for Variables to Cases
Example of Two Indices for Variables to Cases
Restructure Data Wizard (Variables to Cases): Create One Index Variable
Restructure Data Wizard (Variables to Cases): Create Multiple Index Variables
Restructure Data Wizard (Variables to Cases): Options
Restructure Data Wizard (Cases to Variables): Select Variables
Restructure Data Wizard (Cases to Variables): Sort Data
Restructure Data Wizard (Cases to Variables): Options
Restructure Data Wizard: Finish


Restructure Data Wizard (Variables to Cases): Number of Variable Groups

restructuring data,restructuring data,restructuring data
variable groups for variables to cases,variable groups for variables to cases,variable groups for variables to cases
restructuring data,restructuring data,restructuring data

In this step, decide how many variable groups in the current file that you want to restructure in the new file.

How many variable groups are in the current file? Think about how many variable groups exist in the current data. A group of related columns, called a variable group, records repeated measures of the same variable in separate columns. For example, if you have three columns in the current data--w1, w2, and w3--that record width, you have one variable group. If you have an additional three columns--h1, h2, and h3--that record height, you have two variable groups.

How many variable groups should be in the new file? Consider how many variable groups you want to have represented in the new data file. You do not have to restructure all variable groups into the new file.

• One. The wizard will create a single restructured variable in the new file from one variable group in the current file.

• More than one. The wizard will create multiple restructured variables in the new file. The number that you specify affects the next step, in which the wizard automatically creates the specified number of new variables.

Related Topics

To Restructure Data
Restructuring Data
Restructure Data Wizard: Select Type
Example of Variables to Cases
Example of Cases to Variables
Restructure Data Wizard (Variables to Cases): Select Variables
Restructure Data Wizard (Variables to Cases): Create Index Variables
Example of One Index for Variables to Cases
Example of Two Indices for Variables to Cases
Restructure Data Wizard (Variables to Cases): Create One Index Variable
Restructure Data Wizard (Variables to Cases): Create Multiple Index Variables
Restructure Data Wizard (Variables to Cases): Options
Restructure Data Wizard (Cases to Variables): Select Variables
Restructure Data Wizard (Cases to Variables): Sort Data
Restructure Data Wizard (Cases to Variables): Options
Restructure Data Wizard: Finish


Restructure Data Wizard (Variables to Cases): Select Variables

restructuring data,restructuring data,restructuring data
selecting data for variables to cases,selecting data for variables to cases,selecting data for variables to cases
restructuring data,restructuring data,restructuring data

In this step, provide information about how the variables in the current file should be used in the new file. You can also create a variable that identifies the rows in the new file.

How should the new rows be identified? You can create a variable in the new data file that identifies the row in the current data file that was used to create a group of new rows. The identifier can be a sequential case number or it can be the values of the variable. Use the controls in Case Group Identification to define the identification variable in the new file. Click a cell to change the default variable name and provide a descriptive variable label for the identification variable.

What should be restructured in the new file? In the previous step, you told the wizard how many variable groups you want to restructure. The wizard created one new variable for each group. The values for the variable group will appear in that variable in the new file. Use the controls in Variable to be Transposed to define the restructured variable in the new file.

To Specify One Restructured Variable

Put the variables that make up the variable group that you want to transform into the Variable to be Transposed list. All of the variables in the group must be of the same type (numeric or string).

You can include the same variable more than once in the variable group (variables are copied rather than moved from the source variable list); its values are repeated in the new file.

To Specify Multiple Restructured Variables

Select the first target variable that you want to define from the Target Variable drop-down list.

Put the variables that make up the variable group that you want to transform into the Variable to be Transposed list. All of the variables in the group must be of the same type (numeric or string). You can include the same variable more than once in the variable group. (A variable is copied rather than moved from the source variable list, and its values are repeated in the new file.)

Select the next target variable that you want to define, and repeat the variable selection process for all available target variables.

• Although you can include the same variable more than once in the same target variable group, you cannot include the same variable in more than one target variable group.

• Each target variable group list must contain the same number of variables. (Variables that are listed more than once are included in the count.)

• The number of target variable groups is determined by the number of variable groups that you specified in the previous step. You can change the default variable names here, but you must return to the previous step to change the number of variable groups to restructure.

• You must define variable groups (by selecting variables in the source list) for all available target variables before you can proceed to the next step.

What should be copied into the new file? Variables that aren't restructured can be copied into the new file. Their values will be propagated in the new rows. Move variables that you want to copy into the new file into the Fixed Variable(s) list.

Related Topics

To Restructure Data
Restructuring Data
Restructure Data Wizard: Select Type
Example of Variables to Cases
Example of Cases to Variables
Restructure Data Wizard (Variables to Cases): Number of Variable Groups
Restructure Data Wizard (Variables to Cases): Create Index Variables
Example of One Index for Variables to Cases
Example of Two Indices for Variables to Cases
Restructure Data Wizard (Variables to Cases): Create One Index Variable
Restructure Data Wizard (Variables to Cases): Create Multiple Index Variables
Restructure Data Wizard (Variables to Cases): Options
Restructure Data Wizard (Cases to Variables): Select Variables
Restructure Data Wizard (Cases to Variables): Sort Data
Restructure Data Wizard (Cases to Variables): Options
Restructure Data Wizard: Finish


Restructure Data Wizard (Variables to Cases): Create Index Variables

restructuring data,restructuring data,restructuring data
creating index variables for variables to cases,creating index variables for variables to cases,creating index variables for variables to cases
restructuring data,restructuring data,restructuring data

In this step, decide whether to create index variables. An index is a new variable that sequentially identifies a row group based on the original variable from which the new row was created.

How many index variables should be in the new file? Index variables can be used as grouping variables in procedures. In most cases, a single index variable is sufficient; however, if the variable groups in your current file reflect multiple factor levels, multiple indices may be appropriate.

• One. The wizard will create a single index variable.

• More than one. The wizard will create multiple indices and enter the number of indices that you want to create. The number that you specify affects the next step, in which the wizard automatically creates the specified number of indices.

• None. Select this if you do not want to create index variables in the new file.

Related Topics

To Restructure Data
Restructuring Data
Restructure Data Wizard: Select Type
Example of Variables to Cases
Example of Cases to Variables
Restructure Data Wizard (Variables to Cases): Number of Variable Groups
Restructure Data Wizard (Variables to Cases): Select Variables
Example of One Index for Variables to Cases
Example of Two Indices for Variables to Cases
Restructure Data Wizard (Variables to Cases): Create One Index Variable
Restructure Data Wizard (Variables to Cases): Create Multiple Index Variables
Restructure Data Wizard (Variables to Cases): Options
Restructure Data Wizard (Cases to Variables): Select Variables
Restructure Data Wizard (Cases to Variables): Sort Data
Restructure Data Wizard (Cases to Variables): Options
Restructure Data Wizard: Finish


Example of One Index for Variables to Cases

restructuring data,restructuring data,restructuring data
example of one index for variables to cases,example of one index for variables to cases,example of one index for variables to cases
restructuring data,restructuring data,restructuring data

In the current data, there is one variable group, width, and one factor, time. Width was measured three times and recorded in w1, w2, and w3.

Current data for one index

We'll restructure the variable group into a single variable, width, and create a single numeric index. The new data are shown in the following table.

New, restructured data with one index

Index starts with 1 and increments for each variable in the group. It restarts each time a new row is encountered in the original file. We can now use index in procedures that require a grouping variable.

Related Topics

Restructuring Data
Restructure Data Wizard: Select Type
Example of Variables to Cases
Example of Cases to Variables
Restructure Data Wizard (Variables to Cases): Number of Variable Groups
Restructure Data Wizard (Variables to Cases): Select Variables
Restructure Data Wizard (Variables to Cases): Create Index Variables
Example of Two Indices for Variables to Cases
Restructure Data Wizard (Variables to Cases): Create One Index Variable
Restructure Data Wizard (Variables to Cases): Create Multiple Index Variables
Restructure Data Wizard (Variables to Cases): Options
Restructure Data Wizard (Cases to Variables): Select Variables
Restructure Data Wizard (Cases to Variables): Sort Data
Restructure Data Wizard (Cases to Variables): Options
Restructure Data Wizard: Finish


Example of Two Indices for Variables to Cases

restructuring data,restructuring data,restructuring data
example of two indices for variables to cases,example of two indices for variables to cases,example of two indices for variables to cases
restructuring data,restructuring data,restructuring data

When a variable group records more than one factor, you can create more than one index; however, the current data must be arranged so that the levels of the first factor are a primary index within which the levels of subsequent factors cycle. In the current data, there is one variable group, width, and two factors, A and B. The data are arranged so that levels of factor B cycle within levels of factor A.

Current data for two indices

We'll restructure the variable group into a single variable, width, and create two indices. The new data are shown in the following table.

New, restructured data with two indices

Related Topics

Restructuring Data
Restructure Data Wizard: Select Type
Example of Variables to Cases
Example of Cases to Variables
Restructure Data Wizard (Variables to Cases): Number of Variable Groups
Restructure Data Wizard (Variables to Cases): Select Variables
Restructure Data Wizard (Variables to Cases): Create Index Variables
Example of One Index for Variables to Cases
Restructure Data Wizard (Variables to Cases): Create One Index Variable
Restructure Data Wizard (Variables to Cases): Create Multiple Index Variables
Restructure Data Wizard (Variables to Cases): Options
Restructure Data Wizard (Cases to Variables): Select Variables
Restructure Data Wizard (Cases to Variables): Sort Data
Restructure Data Wizard (Cases to Variables): Options
Restructure Data Wizard: Finish


Restructure Data Wizard (Variables to Cases): Create One Index Variable

restructuring data,restructuring data,restructuring data
creating a single index variable for variables to cases,creating a single index variable for variables to cases,creating a single index variable for variables to cases
restructuring data,restructuring data,restructuring data

In this step, decide what values you want for the index variable. The values can be sequential numbers or the names of the variables in an original variable group. You can also specify a name and a label for the new index variable.

• Sequential numbers. The wizard will automatically assign sequential numbers as index values.

• Variable names. The wizard will use the names of the selected variable group as index values. Choose a variable group from the list.

• Names and labels. Click a cell to change the default variable name and provide a descriptive variable label for the index variable.

Related Topics

To Restructure Data
Restructuring Data
Restructure Data Wizard: Select Type
Example of Variables to Cases
Example of Cases to Variables
Restructure Data Wizard (Variables to Cases): Number of Variable Groups
Restructure Data Wizard (Variables to Cases): Select Variables
Restructure Data Wizard (Variables to Cases): Create Index Variables
Example of One Index for Variables to Cases
Example of Two Indices for Variables to Cases
Restructure Data Wizard (Variables to Cases): Create Multiple Index Variables
Restructure Data Wizard (Variables to Cases): Options
Restructure Data Wizard (Cases to Variables): Select Variables
Restructure Data Wizard (Cases to Variables): Sort Data
Restructure Data Wizard (Cases to Variables): Options
Restructure Data Wizard: Finish


Restructure Data Wizard (Variables to Cases): Create Multiple Index Variables

restructuring data,restructuring data,restructuring data
creating multiple index variables for variables to cases,creating multiple index variables for variables to cases,creating multiple index variables for variables to cases
restructuring data,restructuring data,restructuring data

In this step, specify the number of levels for each index variable. You can also specify a name and a label for the new index variable.

How many levels are recorded in the current file? Consider how many factor levels are recorded in the current data. A level defines a group of cases that experienced identical conditions. If there are multiple factors, the current data must be arranged so that the levels of the first factor are a primary index within which the levels of subsequent factors cycle.

How many levels should be in the new file? Enter the number of levels for each index. The values for multiple index variables are always sequential numbers. The values start at 1 and increment for each level. The first index increments the slowest, and the last index increments the fastest.

Total combined levels. You cannot create more levels than exist in the current data. Because the restructured data will contain one row for each combination of treatments, the wizard checks the number of levels that you create. It will compare the product of the levels that you create to the number of variables in your variable groups. They must match.

Names and labels. Click a cell to change the default variable name and provide a descriptive variable label for the index variables.

Related Topics

To Restructure Data
Restructuring Data
Restructure Data Wizard: Select Type
Example of Variables to Cases
Example of Cases to Variables
Restructure Data Wizard (Variables to Cases): Number of Variable Groups
Restructure Data Wizard (Variables to Cases): Select Variables
Restructure Data Wizard (Variables to Cases): Create Index Variables
Example of One Index for Variables to Cases
Example of Two Indices for Variables to Cases
Restructure Data Wizard (Variables to Cases): Create One Index Variable
Restructure Data Wizard (Variables to Cases): Options
Restructure Data Wizard (Cases to Variables): Select Variables
Restructure Data Wizard (Cases to Variables): Sort Data
Restructure Data Wizard (Cases to Variables): Options
Restructure Data Wizard: Finish


Restructure Data Wizard (Variables to Cases): Options

restructuring data,restructuring data,restructuring data
options for variables to cases,options for variables to cases,options for variables to cases
restructuring data,restructuring data,restructuring data

In this step, specify options for the new, restructured file.

Drop unselected variables? In the Select Variables step (step 3), you selected variable groups to be restructured, variables to be copied, and an identification variable from the current data. The data from the selected variables will appear in the new file. If there are other variables in the current data, you can choose to discard or keep them.

Keep missing data? The wizard checks each potential new row for null values. A null value is a system-missing or blank value. You can choose to keep or discard rows that contain only null values.

Create a count variable? The wizard can create a count variable in the new file. It contains the number of new rows generated by a row in the current data. A count variable may be useful if you choose to discard null values from the new file because that makes it possible to generate a different number of new rows for a given row in the current data. Click a cell to change the default variable name and provide a descriptive variable label for the count variable.

Related Topics

To Restructure Data
Restructuring Data
Restructure Data Wizard: Select Type
Example of Variables to Cases
Example of Cases to Variables
Restructure Data Wizard (Variables to Cases): Number of Variable Groups
Restructure Data Wizard (Variables to Cases): Select Variables
Restructure Data Wizard (Variables to Cases): Create Index Variables
Example of One Index for Variables to Cases
Example of Two Indices for Variables to Cases
Restructure Data Wizard (Variables to Cases): Create One Index Variable
Restructure Data Wizard (Variables to Cases): Create Multiple Index Variables
Restructure Data Wizard (Cases to Variables): Select Variables
Restructure Data Wizard (Cases to Variables): Sort Data
Restructure Data Wizard (Cases to Variables): Options
Restructure Data Wizard: Finish


Restructure Data Wizard (Cases to Variables): Select Variables

restructuring data,restructuring data,restructuring data
selecting data for cases to variables,selecting data for cases to variables,selecting data for cases to variables
restructuring data,restructuring data,restructuring data

In this step, provide information about how the variables in the current file should be used in the new file.

What identifies case groups in the current data? A case group is a group of rows that are related because they measure the same observational unit--for example, an individual or an institution. The wizard needs to know which variables in the current file identify the case groups so that it can consolidate each group into a single row in the new file. Move variables that identify case groups in the current file into the Identifier Variable(s) list. Variables that are used to split the current data file are automatically used to identify case groups. Each time a new combination of identification values is encountered, the wizard will create a new row, so cases in the current file should be sorted by values of the identification variables in the same order that variables are listed in the Identifier Variable(s) list. If the current data file isn't already sorted, you can sort it in the next step.

How should the new variable groups be created in the new file? In the original data, a variable appears in a single column. In the new data file, that variable will appear in multiple new columns. Index variables are variables in the current data that the wizard should use to create the new columns. The restructured data will contain one new variable for each unique value in these columns. Move the variables that should be used to form the new variable groups to the Index Variable(s) list. When the wizard presents options, you can also choose to order the new columns by index.

What happens to the other columns? The wizard automatically decides what to do with the variables that remain in the Current File list. It checks each variable to see if the data values vary within a case group. If they do, the wizard restructures the values into a variable group in the new file. If they don't, the wizard copies the values into the new file.

Related Topics

To Restructure Data
Restructuring Data
Restructure Data Wizard: Select Type
Example of Variables to Cases
Example of Cases to Variables
Restructure Data Wizard (Variables to Cases): Number of Variable Groups
Restructure Data Wizard (Variables to Cases): Select Variables
Restructure Data Wizard (Variables to Cases): Create Index Variables
Example of One Index for Variables to Cases
Example of Two Indices for Variables to Cases
Restructure Data Wizard (Variables to Cases): Create One Index Variable
Restructure Data Wizard (Variables to Cases): Create Multiple Index Variables
Restructure Data Wizard (Variables to Cases): Options
Restructure Data Wizard (Cases to Variables): Sort Data
Restructure Data Wizard (Cases to Variables): Options
Restructure Data Wizard: Finish


Restructure Data Wizard (Cases to Variables): Sort Data

restructuring data,restructuring data,restructuring data
sorting data for cases to variables,sorting data for cases to variables,sorting data for cases to variables
restructuring data,restructuring data,restructuring data

In this step, decide whether to sort the current file before restructuring it. Each time the wizard encounters a new combination of identification values, a new row is created, so it is important that the data are sorted by the variables that identify case groups.

How are the rows ordered in the current file? Consider how the current data are sorted and which variables you are using to identify case groups (specified in the previous step).

• Yes. The wizard will automatically sort the current data by the identification variables in the same order that variables are listed in the Identifier Variable(s) list in the previous step. Choose this when the data aren't sorted by the identification variables or when you aren't sure. This choice requires a separate pass of the data, but it guarantees that the rows are correctly ordered for restructuring.

• No. The wizard will not sort the current data. Choose this when you are sure that the current data are sorted by the variables that identify case groups.

Related Topics

To Restructure Data
Restructuring Data
Restructure Data Wizard: Select Type
Example of Variables to Cases
Example of Cases to Variables
Restructure Data Wizard (Variables to Cases): Number of Variable Groups
Restructure Data Wizard (Variables to Cases): Select Variables
Restructure Data Wizard (Variables to Cases): Create Index Variables
Example of One Index for Variables to Cases
Example of Two Indices for Variables to Cases
Restructure Data Wizard (Variables to Cases): Create One Index Variable
Restructure Data Wizard (Variables to Cases): Create Multiple Index Variables
Restructure Data Wizard (Variables to Cases): Options
Restructure Data Wizard (Cases to Variables): Select Variables
Restructure Data Wizard (Cases to Variables): Options
Restructure Data Wizard: Finish


Restructure Data Wizard (Cases to Variables): Options

restructuring data,restructuring data,restructuring data
options for cases to variables,options for cases to variables,options for cases to variables
restructuring data,restructuring data,restructuring data

In this step, specify options for the new, restructured file.

How should the new variable groups be ordered in the new file?

• By variable. The wizard groups the new variables created from an original variable together.

• By index. The wizard groups the variables according to the values of the index variables.

Example. The variables to be restructured are w and h, and the index is month:

w h month

Grouping by variable results in:

w.jan w.feb h.jan

Grouping by index results in:

w.jan h.jan w.feb

Create a count variable? The wizard can create a count variable in the new file. It contains the number of rows in the current data that were used to create a row in the new data file.

Create indicator variables? The wizard can use the index variables to create indicator variables in the new data file. It creates one new variable for each unique value of the index variable. The indicator variables signal the presence or absence of a value for a case. An indicator variable has the value of 1 if the case has a value; otherwise, it is 0.

Example. The index variable is product. It records the products that a customer purchased. The original data are:

customer | product
1 | chick
1 | eggs
2 | eggs
3 | chick

Creating an indicator variable results in one new variable for each unique value of product. The restructured data are:

customer | indchick | indeggs
1 | 1 | 1
2 | 0 | 1
3 | 1 | 0

In this example, the restructured data could be used to get frequency counts of the products that customers buy.

Related Topics

To Restructure Data
Restructuring Data
Restructure Data Wizard: Select Type
Example of Variables to Cases
Example of Cases to Variables
Restructure Data Wizard (Variables to Cases): Number of Variable Groups
Restructure Data Wizard (Variables to Cases): Select Variables
Restructure Data Wizard (Variables to Cases): Create Index Variables
Example of One Index for Variables to Cases
Example of Two Indices for Variables to Cases
Restructure Data Wizard (Variables to Cases): Create One Index Variable
Restructure Data Wizard (Variables to Cases): Create Multiple Index Variables
Restructure Data Wizard (Variables to Cases): Options
Restructure Data Wizard (Cases to Variables): Select Variables
Restructure Data Wizard (Cases to Variables): Sort Data
Restructure Data Wizard: Finish


Restructure Data Wizard: Finish

restructuring data,restructuring data,restructuring data
and weighted data,and weighted data,and weighted data
restructuring data,restructuring data,restructuring data
weighted data,weighted data,weighted data
and restructured data files,and restructured data files,and restructured data files
weighted data,weighted data,weighted data

This is the final step of the Restructure Data Wizard. Decide what to do with your specifications.

• Restructure now. The wizard will create the new, restructured file. Choose this if you want to replace the current file immediately.

Note: If original data are weighted, the new data will be weighted unless the variable that is used as the weight is restructured or dropped from the new file.

• Paste syntax. The wizard will paste the syntax it generates into a syntax window. Choose this when you are not ready to replace the current file, when you want to modify the syntax, or when you want to save it for future use.

Related Topics

To Restructure Data
Restructuring Data
Restructure Data Wizard: Select Type
Example of Variables to Cases
Example of Cases to Variables
Restructure Data Wizard (Variables to Cases): Number of Variable Groups
Restructure Data Wizard (Variables to Cases): Select Variables
Restructure Data Wizard (Variables to Cases): Create Index Variables
Example of One Index for Variables to Cases
Example of Two Indices for Variables to Cases
Restructure Data Wizard (Variables to Cases): Create One Index Variable
Restructure Data Wizard (Variables to Cases): Create Multiple Index Variables
Restructure Data Wizard (Variables to Cases): Options
Restructure Data Wizard (Cases to Variables): Select Variables
Restructure Data Wizard (Cases to Variables): Sort Data
Restructure Data Wizard (Cases to Variables): Options


Viewer

Viewer,Viewer,Viewer
outline pane,outline pane,outline pane
Viewer,Viewer,Viewer
results pane,results pane,results pane
Viewer,Viewer,Viewer
output,output,output
Viewer,Viewer,Viewer
output,output,output

Results are displayed in the Viewer. You can use the Viewer to:

• Browse results

• Show or hide selected tables and charts

• Change the display order of results by moving selected items

• Move items between the Viewer and other applications

The Viewer is divided into two panes:

• The left pane contains an outline view of the contents.

• The right pane contains statistical tables, charts, and text output.

You can click an item in the outline to go directly to the corresponding table or chart. You can click and drag the right border of the outline pane to change the width of the outline pane.

Related Topics

Basic Steps in Data Analysis
Viewer Outline
Showing and Hiding Results
Moving, Deleting, and Copying Output
Finding and Replacing Information in the Viewer
Saving Output
Opening Old Viewer (.spo) Files


Showing and Hiding Results

output,output,output
showing,showing,showing
output,output,output
hiding,hiding,hiding
output,output,output
Viewer,Viewer,Viewer
hiding results,hiding results,hiding results
showing,showing,showing
results,results,results
Viewer,Viewer,Viewer
hiding,hiding,hiding
showing,showing,showing

In the Viewer, you can selectively show and hide individual tables or results from an entire procedure. This process is useful when you want to shorten the amount of visible output in the contents pane.

Related Topics

To Hide Tables and Charts
To Hide Procedure Results
Controlling the Initial Display State for New Output
Moving, Deleting, and Copying Output
Finding and Replacing Information in the Viewer
Saving Output


To Hide Tables and Charts

pivot tables,pivot tables,pivot tables
hiding,hiding,hiding
charts,charts,charts
hiding,hiding,hiding
pivot tables,pivot tables,pivot tables
charts,charts,charts
hiding,hiding,hiding

Double-click the item's book icon in the outline pane of the Viewer.

or

Click the item to select it.

From the menus choose:

View
Hide

or

Click the closed book (Hide) icon on the Outlining toolbar.

The open book (Show) icon becomes the active icon, indicating that the item is now hidden.

Related Topics

Showing and Hiding Results
To Hide Procedure Results
Controlling the Initial Display State for New Output


To Hide Procedure Results

hiding,hiding,hiding
procedure results,procedure results,procedure results
hiding,hiding,hiding

Click the box to the left of the procedure name in the outline pane.

This hides all results from the procedure and collapses the outline view.

Related Topics

Showing and Hiding Results
To Hide Tables and Charts
Controlling the Initial Display State for New Output


Moving, Deleting, and Copying Output

output,output,output
moving,moving,moving
output,output,output
copying,copying,copying
output,output,output
deleting,deleting,deleting
output,output,output

You can rearrange the results by copying, moving, or deleting an item or a group of items.

Related Topics

To Move Output in the Viewer
To Delete Output in the Viewer
Showing and Hiding Results
Finding and Replacing Information in the Viewer
Saving Output


To Move Output in the Viewer

output,output,output
moving,moving,moving
Viewer,Viewer,Viewer
moving output,moving output,moving output
output,output,output
Viewer,Viewer,Viewer

Select the items in the outline or contents pane.

Drag and drop the selected items into a different location.

Show me

Related Topics

Moving, Deleting, and Copying Output
To Delete Output in the Viewer


To Delete Output in the Viewer

Viewer,Viewer,Viewer
deleting output,deleting output,deleting output
deleting output,deleting output,deleting output
output,output,output
deleting,deleting,deleting
output,output,output
Viewer,Viewer,Viewer

Select the items in the outline or contents pane.

Press the Delete key.

or

From the menus choose:

Edit
Delete

Related Topics

Moving, Deleting, and Copying Output
To Move Output in the Viewer


Changing Initial Alignment

By default, all results are initially left-aligned. To change the initial alignment of new output items:

From the menus choose:

Edit
Options

Click the Viewer tab.

In the Initial Output State group, select the item type (for example, pivot table, chart, text output).

Select the alignment option you want.


Changing Alignment of Output Items

alignment,alignment,alignment
output,output,output
output,output,output
alignment,alignment,alignment
justification,justification,justification
output,output,output
output,output,output
centering,centering,centering
centering output,centering output,centering output
alignment,alignment,alignment
justification,justification,justification
output,output,output

In the outline or contents pane, select the items that you want to align.

From the menus choose:

Format
Align Left

or

Format
Center

or

Format
Align Right


Viewer Outline

Viewer,Viewer,Viewer
outline,outline,outline
outline,outline,outline
in Viewer,in Viewer,in Viewer
Viewer,Viewer,Viewer
outline,outline,outline

The outline pane provides a table of contents of the Viewer document. You can use the outline pane to navigate through your results and control the display. Most actions in the outline pane have a corresponding effect on the contents pane.

• Selecting an item in the outline pane displays the corresponding item in the contents pane.

• Moving an item in the outline pane moves the corresponding item in the contents pane.

• Collapsing the outline view hides the results from all items in the collapsed levels.

Controlling the outline display. To control the outline display, you can:

• Expand and collapse the outline view

• Change the outline level for selected items

• Change the size of items in the outline display

• Change the font that is used in the outline display

Related Topics

Basic Steps in Data Analysis
To Change the Size of Outline Items
To Change the Font in the Outline


To Collapse and Expand the Outline View

Viewer,Viewer,Viewer
collapsing outline,collapsing outline,collapsing outline
Viewer,Viewer,Viewer
expanding outline,expanding outline,expanding outline
outline,outline,outline
collapsing,collapsing,collapsing
outline,outline,outline
expanding,expanding,expanding
Viewer,Viewer,Viewer
outline,outline,outline

Click the box to the left of the outline item that you want to collapse or expand.

or

Click the item in the outline.

From the menus choose:

View
Collapse

or

View
Expand

Related Topics

To Change the Outline Level


To Change the Outline Level

Viewer,Viewer,Viewer
changing outline levels,changing outline levels,changing outline levels
outline,outline,outline
changing levels,changing levels,changing levels
Viewer,Viewer,Viewer
outline,outline,outline

Click the item in the outline pane.

Click the left arrow on the Outlining toolbar to promote the item (move the item to the left).

or

Click the right arrow on the Outlining toolbar to demote the item (move the item to the right).

or

From the menus choose:

Edit
Outline
Promote

or

Edit
Outline
Demote

Related Topics

To Collapse and Expand the Outline View


To Change the Size of Outline Items

Viewer,Viewer,Viewer
changing outline sizes,changing outline sizes,changing outline sizes
sizes,sizes,sizes
in outline,in outline,in outline
sizes,sizes,sizes
Viewer,Viewer,Viewer

From the menus choose:

View
Outline Size

Select the outline size (Small, Medium, or Large).

Related Topics

Viewer Outline
To Change the Font in the Outline


To Change the Font in the Outline

Viewer,Viewer,Viewer
changing outline font,changing outline font,changing outline font
fonts,fonts,fonts
in the outline pane,in the outline pane,in the outline pane
fonts,fonts,fonts
Viewer,Viewer,Viewer

From the menus choose:

View
Outline Font...

Select a font.

Related Topics

Viewer Outline
To Change the Size of Outline Items


Adding Items to the Viewer

In the Viewer, you can add items such as titles, new text, charts, or material from other applications.


To Add a Title or Text

titles,titles,titles
adding to Viewer,adding to Viewer,adding to Viewer
titles,titles,titles
text,text,text
adding to Viewer,adding to Viewer,adding to Viewer
text,text,text

Text items that are not connected to a table or chart can be added to the Viewer.

Click the table, chart, or other object that will precede the title or text.

From the menus choose:

Insert
New Title

or

Insert
New Text

Double-click the new object.

Enter the text.

Related Topics

To Add a Text File


To Add a Text File

text,text,text
adding a text file to the Viewer,adding a text file to the Viewer,adding a text file to the Viewer
files,files,files
adding a text file to the Viewer,adding a text file to the Viewer,adding a text file to the Viewer
text,text,text
files,files,files

In the outline pane or contents pane of the Viewer, click the table, chart, or other object that will precede the text.

From the menus choose:

Insert
Text File...

Select a text file.

To edit the text, double-click it.

Related Topics

To Add a Title or Text


Pasting Objects into the Viewer

Objects from other applications can be pasted into the Viewer. You can use either Paste After or Paste Special. Either type of pasting puts the new object after the currently selected object in the Viewer. Use Paste Special when you want to choose the format of the pasted object.


Finding and Replacing Information in the Viewer

viewer,viewer,viewer
find and replace information,find and replace information,find and replace information
search and replace information,search and replace information,search and replace information
find and replace,find and replace,find and replace
viewer documents,viewer documents,viewer documents
search and replace,search and replace,search and replace
viewer documents,viewer documents,viewer documents

To find or replace information in the Viewer, from the menus choose:

Edit
Find

or

Edit
Replace

You can use Find and Replace to:

• Search the entire document or just the selected items.

• Search down or up from the current location.

• Search both panes or restrict the search to the contents or outline pane.

• Search for hidden items. These include any items hidden in the contents pane (for example, Notes tables, which are hidden by default) and hidden rows and columns in pivot tables.

• Restrict the search criteria to case-sensitive matches.

• Restrict the search criteria in pivot tables to matches of the entire cell contents.

Hidden Items and Pivot Table Layers

• Layers beneath the currently visible layer of a multidimensional pivot table are not considered hidden and will be included in the search area even when hidden items are not included in the search.

• Hidden items include hidden items in the contents pane (items with closed book icons in the outline pane or included within collapsed blocks of the outline pane) and rows and columns in pivot tables either hidden by default (for example, empty rows and columns are hidden by default) or manually hidden by editing the table and selectively hiding specific rows or columns. Hidden items are only included in the search if you explicitly select Include hidden items.

• In both cases, the hidden or nonvisible element that contains the search text or value is displayed when it is found, but the item is returned to its original state afterward.

Related Topics

Viewer
Showing and Hiding Results
Moving, Deleting, and Copying Output
Saving Output


Copying Output into Other Applications

output,output,output
pasting into other applications,pasting into other applications,pasting into other applications
pivot tables,pivot tables,pivot tables
pasting into other applications,pasting into other applications,pasting into other applications
pivot tables,pivot tables,pivot tables
output,output,output
pivot tables,pivot tables,pivot tables
pasting as tables,pasting as tables,pasting as tables
pivot tables,pivot tables,pivot tables
wide tables,wide tables,wide tables
pasting into Microsoft Word,pasting into Microsoft Word,pasting into Microsoft Word

Output objects can be copied and pasted into other applications, such as a word-processing program or a spreadsheet. You can paste output in a variety of formats. Depending on the target application, some or all of the following formats may be available:

Picture (metafile). Pivot tables and charts can be pasted as metafile pictures. The picture format can be resized in the other application, and sometimes a limited amount of editing can be done with the facilities of the other application. Pivot tables that are pasted as pictures retain all borders and font characteristics. For pivot tables, select Files from the Paste Special menu. This format is available only on Windows operating systems.

RTF (rich text format). Pivot tables can be pasted into other applications in RTF format. In most applications, this means that the pivot table is pasted as a table that can then be edited in the other application.

Note: Microsoft Word may not display extremely wide tables properly.

Bitmap. Charts and other graphics can be pasted into other applications as bitmaps.

BIFF. The contents of a table can be pasted into a spreadsheet and retain numeric precision. This format is available only on Windows operating systems.

Text. The contents of a table can be copied and pasted as text. This process can be useful for applications such as e-mail, where the application can accept or transmit only text.

If the target application supports multiple available formats, it may have a Paste Special menu item that allows you to select the format, or it may automatically display a list of available formats.

Related Topics

To Copy and Paste Output Items into Another Application


To Copy and Paste Output Items into Another Application

interactive charts,interactive charts,interactive charts
copying into other applications,copying into other applications,copying into other applications
interactive charts,interactive charts,interactive charts
pivot tables,pivot tables,pivot tables
copying into other applications,copying into other applications,copying into other applications
output,output,output
copying into other applications,copying into other applications,copying into other applications
charts,charts,charts
copying into other applications,copying into other applications,copying into other applications
chartsoutput,chartsoutput,chartsoutput
pivot tables,pivot tables,pivot tables

Select the objects in either the outline or contents pane of the Viewer.

From the Viewer menus choose:

Edit
Copy

From the menus in the target application choose:

Edit
Paste

or

Edit
Paste Special...

• Paste. Output is copied to the Clipboard in a number of formats. Each application determines the "best" format to use for Paste.

• Paste Special. Results are copied to the Clipboard in multiple formats. Paste Special allows you to select the format that you want from the list of formats that are available to the target application.

Copying and pasting model views. All model views, including tables, are pasted as graphic images.

Copying and pasting pivot tables. When pivot tables are pasted in Word/RTF format, tables that are too wide for the document width will either be wrapped, scaled down to fit the document width, or left unchanged, depending on the pivot table options settings. See the topic Pivot Table Options for more information.

Related Topics

Copying Output into Other Applications


Export Output

exporting output,exporting output,exporting output
saving output,saving output,saving output
text format,text format,text format
saving output,saving output,saving output
HTML,HTML,HTML
charts,charts,charts
exporting,exporting,exporting
charts,charts,charts
saving output,saving output,saving output
exporting charts,exporting charts,exporting charts
saving charts,saving charts,saving charts
JPEG files,JPEG files,JPEG files
saving charts,saving charts,saving charts
EPS files,EPS files,EPS files
saving charts,saving charts,saving charts
PICT files,PICT files,PICT files
saving charts,saving charts,saving charts
BMP files,BMP files,BMP files
saving charts,saving charts,saving charts
metafiles,metafiles,metafiles
saving charts,saving charts,saving charts
EMF files,EMF files,EMF files
saving charts,saving charts,saving charts
HTML,HTML,HTML
exporting output,exporting output,exporting output
text,text,text
exporting output as text,exporting output as text,exporting output as text
HTML,HTML,HTML
text,text,text
JPEG files,JPEG files,JPEG files
exporting charts,exporting charts,exporting charts
EPS files,EPS files,EPS files
exporting charts,exporting charts,exporting charts
metafiles,metafiles,metafiles
exporting charts,exporting charts,exporting charts
TIFF files,TIFF files,TIFF files
exporting charts,exporting charts,exporting charts
BMP files,BMP files,BMP files
exporting charts,exporting charts,exporting charts
JPEG files,JPEG files,JPEG files
EPS files,EPS files,EPS files
metafiles,metafiles,metafiles
BMP files,BMP files,BMP files
PostScript files (encapsulated),PostScript files (encapsulated),PostScript files (encapsulated)
exporting charts,exporting charts,exporting charts
output,output,output
exporting,exporting,exporting
pivot tables,pivot tables,pivot tables
exporting as HTML,exporting as HTML,exporting as HTML
pivot tables,pivot tables,pivot tables
output,output,output
PostScript files (encapsulated),PostScript files (encapsulated),PostScript files (encapsulated)
PNG files,PNG files,PNG files
exporting charts,exporting charts,exporting charts
PNG files,PNG files,PNG files
exporting output,exporting output,exporting output
Word format,Word format,Word format
Excel format,Excel format,Excel format
PowerPoint format,PowerPoint format,PowerPoint format
HTML format,HTML format,HTML format
PDF format,PDF format,PDF format
PDF,PDF,PDF
exporting output,exporting output,exporting output
saving output,saving output,saving output
Word format,Word format,Word format
Excel format,Excel format,Excel format
PowerPoint format,PowerPoint format,PowerPoint format
HTML format,HTML format,HTML format
PDF format,PDF format,PDF format
Word format,Word format,Word format
exporting output,exporting output,exporting output
wide tables,wide tables,wide tables
Excel format,Excel format,Excel format
exporting output,exporting output,exporting output
PowerPoint format,PowerPoint format,PowerPoint format
exporting output,exporting output,exporting output

Export Output saves Viewer output in HTML, text, Word/RTF, Excel, PowerPoint (requires PowerPoint 97 or later), and PDF formats. Charts can also be exported in a number of different graphics formats.

Note: Export to PowerPoint is available only on Windows operating systems and is not available in the Student Version.

To Export Output Collapse Hide details

To Export Output

Make the Viewer the active window (click anywhere in the window).

From the menus choose:

File
Export...

Enter a filename (or prefix for charts) and select an export format.

Objects to Export. You can export all objects in the Viewer, all visible objects, or only selected objects.

Document Type. The available options are:

• Word/RTF (*.doc). Pivot tables are exported as Word tables with all formatting attributes intact--for example, cell borders, font styles, and background colors. Text output is exported as formatted RTF. Charts, tree diagrams, and model views are included in PNG format.

Note: Microsoft Word may not display extremely wide tables properly.

• Excel (*.xls). Pivot table rows, columns, and cells are exported as Excel rows, columns, and cells, with all formatting attributes intact--for example, cell borders, font styles, and background colors. Text output is exported with all font attributes intact. Each line in the text output is a row in the Excel file, with the entire contents of the line contained in a single cell. Charts, tree diagrams, and model views are included in PNG format.

• HTML (*.htm). Pivot tables are exported as HTML tables. Text output is exported as preformatted HTML. Charts, tree diagrams, and model views are embedded by reference, and you should export charts in a suitable format for inclusion in HTML documents (for example, PNG and JPEG).

• Portable Document Format (*.pdf). All output is exported as it appears in Print Preview, with all formatting attributes intact.

• PowerPoint file (*.ppt). Pivot tables are exported as Word tables and are embedded on separate slides in the PowerPoint file, with one slide for each pivot table. All formatting attributes of the pivot table are retained--for example, cell borders, font styles, and background colors. Charts, tree diagrams, and model views are exported in TIFF format. Text output is not included.

Export to PowerPoint is available only on Windows operating systems.

• Text (*.txt). Text output formats include plain text, UTF-8, and UTF-16. Pivot tables can be exported in tab-separated or space-separated format. All text output is exported in space-separated format. For charts, tree diagrams, and model views, a line is inserted in the text file for each graphic, indicating the image filename.

• None (Graphics Only). Available export formats include: EPS, JPEG, TIFF, PNG, and BMP. On Windows operating systems, EMF (enhanced metafile) format is also available.

Output Management System. You can also automatically export all output or user-specified types of output as Word, Excel, PDF, HTML, text or PASW Statistics-format data files. See the topic Output Management System for more information.

Related Topics

HTML Options
Word/RTF Options
Excel Options
Publish to Web
Saving Output
PowerPoint Options
PDF Options
Text Options
Graphics Only Options
JPEG Chart Export Options
BMP Chart Export Options
PNG Chart Export Options
EMF and TIFF Chart Export Options
EPS Chart Export Options


HTML Options

HTML,HTML,HTML
exporting output,exporting output,exporting output
exporting output,exporting output,exporting output
HTML,HTML,HTML
saving output,saving output,saving output
HTML,HTML,HTML
HTML,HTML,HTML

The following options are available for exporting output in HTML format:

Layers in pivot tables. By default, inclusion or exclusion of pivot table layers is controlled by the table properties for each pivot table. You can override this setting and include all layers or exclude all but the currently visible layer. See the topic Table Properties: Printing for more information.

Include footnotes and captions. Controls the inclusion or exclusion of all pivot table footnotes and captions.

Views of Models. By default, inclusion or exclusion of model views is controlled by the model properties for each model. You can override this setting and include all views or exclude all but the currently visible view. See the topic Model Properties for more information. (Note: all model views, including tables, are exported as graphics.)

Note: For HTML, you can also control the image file format for exported charts. See the topic Graphics Format Options for more information.

To Set HTML Export Options Collapse Hide details

To Set HTML Export Options

Make the Viewer the active window (click anywhere in the window).

From the menus choose:

File
Export...

Select HTML as the export format.

Click Change Options.

Related Topics

Export Output
Word/RTF Options
Excel Options
Publish to Web
PowerPoint Options
PDF Options
Text Options
Graphics Only Options
JPEG Chart Export Options
BMP Chart Export Options
PNG Chart Export Options
EMF and TIFF Chart Export Options
EPS Chart Export Options


Word/RTF Options

Word format,Word format,Word format
exporting output,exporting output,exporting output
exporting output,exporting output,exporting output
Word format,Word format,Word format
saving output,saving output,saving output
Word format,Word format,Word format

The following options are available for exporting output in Word format:

Layers in pivot tables. By default, inclusion or exclusion of pivot table layers is controlled by the table properties for each pivot table. You can override this setting and include all layers or exclude all but the currently visible layer. See the topic Table Properties: Printing for more information.

Wide Pivot Tables. Controls the treatment of tables that are too wide for the defined document width. By default, the table is wrapped to fit. The table is divided into sections, and row labels are repeated for each section of the table. Alternatively, you can shrink wide tables or make no changes to wide tables and allow them to extend beyond the defined document width.

Include footnotes and captions. Controls the inclusion or exclusion of all pivot table footnotes and captions.

Views of Models. By default, inclusion or exclusion of model views is controlled by the model properties for each model. You can override this setting and include all views or exclude all but the currently visible view. See the topic Model Properties for more information. (Note: all model views, including tables, are exported as graphics.)

Page Setup for Export. This opens a dialog where you can define the page size and margins for the exported document. The document width used to determine wrapping and shrinking behavior is the page width minus the left and right margins.

To Set Word Export Options Collapse Hide details

To Set Word Export Options

Make the Viewer the active window (click anywhere in the window).

From the menus choose:

File
Export...

Select Word/RTF as the export format.

Click Change Options.

Related Topics

Export Output
HTML Options
Excel Options
Publish to Web
PowerPoint Options
PDF Options
Text Options
Graphics Only Options
JPEG Chart Export Options
BMP Chart Export Options
PNG Chart Export Options
EMF and TIFF Chart Export Options
EPS Chart Export Options


Excel Options

Excel format,Excel format,Excel format
exporting output,exporting output,exporting output
exporting output,exporting output,exporting output
Excel format,Excel format,Excel format
saving output,saving output,saving output
Excel format,Excel format,Excel format

The following options are available for exporting output in Excel format:

Create a worksheet or workbook or modify an existing worksheet. By default, a new workbook is created. If a file with the specified name already exists, it will be overwritten. If you select the option to create a worksheet, if a worksheet with the specified name already exists in the specified file, it will be overwritten. If you select the option to modify an existing worksheet, you must also specify the worksheet name. (This is optional for creating a worksheet.) Worksheet names cannot exceed 31 characters and cannot contain forward or back slashes, square brackets, question marks, or asterisks.

If you modify an existing worksheet, charts, model views, and tree diagrams are not included in the exported output.

Location in worksheet. Controls the location within the worksheet for the exported output. By default, exported output will be added after the last column that has any content, starting in the first row, without modifying any existing contents. This is a good choice for adding new columns to an existing worksheet. Adding exported output after the last row is a good choice for adding new rows to an existing worksheet. Adding exported output starting at a specific cell location will overwrite any existing content in the area where the exported output is added.

Layers in pivot tables. By default, inclusion or exclusion of pivot table layers is controlled by the table properties for each pivot table. You can override this setting and include all layers or exclude all but the currently visible layer. See the topic Table Properties: Printing for more information.

Include footnotes and captions. Controls the inclusion or exclusion of all pivot table footnotes and captions.

Views of Models. By default, inclusion or exclusion of model views is controlled by the model properties for each model. You can override this setting and include all views or exclude all but the currently visible view. See the topic Model Properties for more information. (Note: all model views, including tables, are exported as graphics.)

To Set Excel Export Options Collapse Hide details

To Set Excel Export Options

Make the Viewer the active window (click anywhere in the window).

From the menus choose:

File
Export...

Select Excel as the export format.

Click Change Options.

Related Topics

Export Output
HTML Options
Word/RTF Options
Publish to Web
PowerPoint Options
PDF Options
Text Options
Graphics Only Options
JPEG Chart Export Options
BMP Chart Export Options
PNG Chart Export Options
EMF and TIFF Chart Export Options
EPS Chart Export Options


PowerPoint Options

PowerPoint,PowerPoint,PowerPoint
exporting output as PowerPoint,exporting output as PowerPoint,exporting output as PowerPoint
exporting output,exporting output,exporting output
saving output,saving output,saving output
PowerPoint format,PowerPoint format,PowerPoint format
saving output,saving output,saving output
PowerPoint,PowerPoint,PowerPoint

The following options are available for PowerPoint:

Layers in pivot tables. By default, inclusion or exclusion of pivot table layers is controlled by the table properties for each pivot table. You can override this setting and include all layers or exclude all but the currently visible layer. See the topic Table Properties: Printing for more information.

Wide Pivot Tables. Controls the treatment of tables that are too wide for the defined document width. By default, the table is wrapped to fit. The table is divided into sections, and row labels are repeated for each section of the table. Alternatively, you can shrink wide tables or make no changes to wide tables and allow them to extend beyond the defined document width.

Include footnotes and captions. Controls the inclusion or exclusion of all pivot table footnotes and captions.

Use Viewer outline entries as slide titles. Includes a title on each slide that is created by the export. Each slide contains a single item that is exported from the Viewer. The title is formed from the outline entry for the item in the outline pane of the Viewer.

Views of Models. By default, inclusion or exclusion of model views is controlled by the model properties for each model. You can override this setting and include all views or exclude all but the currently visible view. See the topic Model Properties for more information. (Note: all model views, including tables, are exported as graphics.)

Page Setup for Export. This opens a dialog where you can define the page size and margins for the exported document. The document width used to determine wrapping and shrinking behavior is the page width minus the left and right margins.

To Set PowerPoint Export Options Collapse Hide details

To Set PowerPoint Export Options

Make the Viewer the active window (click anywhere in the window).

From the menus choose:

File
Export...

Select PowerPoint as the export format.

Click Change Options.

Note: Export to PowerPoint is available only on Windows operating systems.

Related Topics

Export Output
HTML Options
Word/RTF Options
Excel Options
PDF Options
Text Options
Graphics Only Options
JPEG Chart Export Options
BMP Chart Export Options
PNG Chart Export Options
EMF and TIFF Chart Export Options
EPS Chart Export Options


PDF Options

exporting output,exporting output,exporting output
PDF format,PDF format,PDF format
PDF,PDF,PDF
exporting output,exporting output,exporting output
saving output,saving output,saving output
PDF format,PDF format,PDF format

The following options are available for PDF:

Embed bookmarks. This option includes bookmarks in the PDF document that correspond to the Viewer outline entries. Like the Viewer outline pane, bookmarks can make it much easier to navigate documents with a large number of output objects.

Embed fonts. Embedding fonts ensures that the PDF document will look the same on all computers. Otherwise, if some fonts used in the document are not available on the computer being used to view (or print) the PDF document, font substitution may yield suboptimal results.

Layers in pivot tables. By default, inclusion or exclusion of pivot table layers is controlled by the table properties for each pivot table. You can override this setting and include all layers or exclude all but the currently visible layer. See the topic Table Properties: Printing for more information.

Views of Models. By default, inclusion or exclusion of model views is controlled by the model properties for each model. You can override this setting and include all views or exclude all but the currently visible view. See the topic Model Properties for more information. (Note: all model views, including tables, are exported as graphics.)

To Set PDF Export Options Collapse Hide details

To Set PDF Export Options

Make the Viewer the active window (click anywhere in the window).

From the menus choose:

File
Export...

Select Portable Document Format as the export format.

Click Change Options.

Expand Show details Collapse Hide details
Other Settings That Affect PDF Output Collapse Hide details

Other Settings That Affect PDF Output

Page Setup/Page Attributes. Page size, orientation, margins, content and display of page headers and footers, and printed chart size in PDF documents are controlled by page setup and page attribute options.

Table Properties/TableLooks. Scaling of wide and/or long tables and printing of table layers are controlled by table properties for each table. These properties can also be saved in TableLooks. See the topic Table Properties: Printing for more information.

Default/Current Printer. The resolution (DPI) of the PDF document is the current resolution setting for the default or currently selected printer (which can be changed using Page Setup). The maximum resolution is 1200 DPI. If the printer setting is higher, the PDF document resolution will be 1200 DPI.

Note: High-resolution documents may yield poor results when printed on lower-resolution printers.

Related Topics

Export Output
HTML Options
Word/RTF Options
Excel Options
PowerPoint Options
Text Options
Graphics Only Options
JPEG Chart Export Options
BMP Chart Export Options
PNG Chart Export Options
EMF and TIFF Chart Export Options
EPS Chart Export Options


Text Options

text,text,text
exporting output as text,exporting output as text,exporting output as text
exporting output,exporting output,exporting output
saving output,saving output,saving output
text format,text format,text format
saving output,saving output,saving output
text,text,text

The following options are available for text export:

Pivot Table Format. Pivot tables can be exported in tab-separated or space-separated format. For space-separated format, you can also control:

• Column Width. Autofit does not wrap any column contents, and each column is as wide as the widest label or value in that column. Custom sets a maximum column width that is applied to all columns in the table, and values that exceed that width wrap onto the next line in that column.

• Row/Column Border Character. Controls the characters used to create row and column borders. To suppress display of row and column borders, enter blank spaces for the values.

Layers in pivot tables. By default, inclusion or exclusion of pivot table layers is controlled by the table properties for each pivot table. You can override this setting and include all layers or exclude all but the currently visible layer. See the topic Table Properties: Printing for more information.

Include footnotes and captions. Controls the inclusion or exclusion of all pivot table footnotes and captions.

Views of Models. By default, inclusion or exclusion of model views is controlled by the model properties for each model. You can override this setting and include all views or exclude all but the currently visible view. See the topic Model Properties for more information. (Note: all model views, including tables, are exported as graphics.)

To Set Text Export Options Collapse Hide details

To Set Text Export Options

Make the Viewer the active window (click anywhere in the window).

From the menus choose:

File
Export...

Select Text as the export format.

Click Change Options.

Related Topics

Export Output
HTML Options
Word/RTF Options
Excel Options
PowerPoint Options
PDF Options
Graphics Only Options
JPEG Chart Export Options
BMP Chart Export Options
PNG Chart Export Options
EMF and TIFF Chart Export Options
EPS Chart Export Options


Graphics Only Options

The following options are available for exporting graphics only:

Views of Models. By default, inclusion or exclusion of model views is controlled by the model properties for each model. You can override this setting and include all views or exclude all but the currently visible view. See the topic Model Properties for more information. (Note: all model views, including tables, are exported as graphics.)

Related Topics

Export Output
HTML Options
Word/RTF Options
Excel Options
PowerPoint Options
PDF Options
Text Options
JPEG Chart Export Options
BMP Chart Export Options
PNG Chart Export Options
EMF and TIFF Chart Export Options
EPS Chart Export Options


Graphics Format Options

For HTML and text documents and for exporting charts only, you can select the graphic format, and for each graphic format you can control various optional settings.

To select the graphic format and options for exported charts:

Make the Viewer the active window (click anywhere in the window).

From the menus choose:

File
Export...

Select HTML, Text, or None (Graphics only) as the document type.

Select the graphic file format from the drop-down list.

Click Change Options to change the options for the selected graphic file format.


JPEG Chart Export Options

exporting charts,exporting charts,exporting charts
saving charts,saving charts,saving charts
JPEG files,JPEG files,JPEG files
JPEG files,JPEG files,JPEG files
exporting charts,exporting charts,exporting charts
saving charts,saving charts,saving charts
JPEG files,JPEG files,JPEG files

• Image size. Percentage of original chart size, up to 200 percent.

• Convert to grayscale. Converts colors to shades of gray.

Related Topics

Graphics Format Options
Export Output
HTML Options
Word/RTF Options
Excel Options
PowerPoint Options
PDF Options
Text Options
Graphics Only Options
BMP Chart Export Options
PNG Chart Export Options
EMF and TIFF Chart Export Options
EPS Chart Export Options


BMP Chart Export Options

exporting charts,exporting charts,exporting charts
saving charts,saving charts,saving charts
BMP files,BMP files,BMP files
BMP files,BMP files,BMP files
exporting charts,exporting charts,exporting charts
saving charts,saving charts,saving charts
BMP files,BMP files,BMP files

• Image size. Percentage of original chart size, up to 200 percent.

• Compress image to reduce file size. A lossless compression technique that creates smaller files without affecting image quality.

Related Topics

Graphics Format Options
Export Output
HTML Options
Word/RTF Options
Excel Options
PowerPoint Options
PDF Options
Text Options
Graphics Only Options
JPEG Chart Export Options
PNG Chart Export Options
EMF and TIFF Chart Export Options
EPS Chart Export Options


PNG Chart Export Options

exporting charts,exporting charts,exporting charts
saving charts,saving charts,saving charts
PNG files,PNG files,PNG files
PNG files,PNG files,PNG files
exporting charts,exporting charts,exporting charts
saving charts,saving charts,saving charts
PNG files,PNG files,PNG files
exporting charts,exporting charts,exporting charts
saving charts,saving charts,saving charts

Image size. Percentage of original chart size, up to 200 percent.

Color Depth. Determines the number of colors in the exported chart. A chart that is saved under any depth will have a minimum of the number of colors that are actually used and a maximum of the number of colors that are allowed by the depth. For example, if the chart contains three colors--red, white, and black--and you save it as 16 colors, the chart will remain as three colors.

• If the number of colors in the chart exceeds the number of colors for that depth, the colors will be dithered to replicate the colors in the chart.

• Current screen depth is the number of colors currently displayed on your computer monitor.

Related Topics

Graphics Format Options
Export Output
HTML Options
Word/RTF Options
Excel Options
PowerPoint Options
PDF Options
Text Options
Graphics Only Options
JPEG Chart Export Options
BMP Chart Export Options
EMF and TIFF Chart Export Options
EPS Chart Export Options


EMF and TIFF Chart Export Options

exporting charts,exporting charts,exporting charts
saving charts,saving charts,saving charts
exporting charts,exporting charts,exporting charts
saving charts,saving charts,saving charts
TIFF files,TIFF files,TIFF files
TIFF files,TIFF files,TIFF files
exporting charts,exporting charts,exporting charts
saving charts,saving charts,saving charts
TIFF files,TIFF files,TIFF files

Image size. Percentage of original chart size, up to 200 percent.

Note: EMF (enhanced metafile) format is available only on Windows operating systems.

Related Topics

Graphics Format Options
Export Output
HTML Options
Word/RTF Options
Excel Options
PowerPoint Options
PDF Options
Text Options
Graphics Only Options
JPEG Chart Export Options
BMP Chart Export Options
PNG Chart Export Options
EPS Chart Export Options


EPS Chart Export Options

exporting charts,exporting charts,exporting charts
saving charts,saving charts,saving charts
EPS files,EPS files,EPS files
EPS files,EPS files,EPS files
exporting charts,exporting charts,exporting charts
saving charts,saving charts,saving charts
EPS files,EPS files,EPS files
exporting charts,exporting charts,exporting charts
saving charts,saving charts,saving charts
PostScript files,PostScript files,PostScript files
PostScript files (encapsulated),PostScript files (encapsulated),PostScript files (encapsulated)
exporting charts,exporting charts,exporting charts
saving charts,saving charts,saving charts
PostScript files (encapsulated),PostScript files (encapsulated),PostScript files (encapsulated)

Image size. You can specify the size as a percentage of the original image size (up to 200 percent), or you can specify an image width in pixels (with height determined by the width value and the aspect ratio). The exported image is always proportional to the original.

Include TIFF preview image. Saves a preview with the EPS image in TIFF format for display in applications that cannot display EPS images on screen.

Fonts. Controls the treatment of fonts in EPS images.

• Use font references. If the fonts that are used in the chart are available on the output device, the fonts are used. Otherwise, the output device uses alternate fonts.

• Replace fonts with curves. Turns fonts into PostScript curve data. The text itself is no longer editable as text in applications that can edit EPS graphics. This option is useful if the fonts that are used in the chart are not available on the output device.

Related Topics

Graphics Format Options
Export Output
HTML Options
Word/RTF Options
Excel Options
PowerPoint Options
PDF Options
Text Options
Graphics Only Options
JPEG Chart Export Options
BMP Chart Export Options
PNG Chart Export Options
EMF and TIFF Chart Export Options


Viewer Printing

printing,printing,printing
pivot tables,pivot tables,pivot tables
printing,printing,printing
charts,charts,charts
printing,printing,printing
text output,text output,text output
printing,printing,printing
printing,printing,printing
layers,layers,layers
pivot tables,pivot tables,pivot tables
printing layers,printing layers,printing layers
layers,layers,layers
printing,printing,printing
layers,layers,layers
pivot tables,pivot tables,pivot tables

There are two options for printing the contents of the Viewer window:

All visible output. Prints only items that are currently displayed in the contents pane. Hidden items (items with a closed book icon in the outline pane or hidden in collapsed outline layers) are not printed.

Selection. Prints only items that are currently selected in the outline and/or contents panes.

Related Topics

To Print Output and Charts
Page Attributes: Options
Print Preview


To Print Output and Charts

Make the Viewer the active window (click anywhere in the window).

From the menus choose:

File
Print...

Select the print settings that you want.

Click OK to print.

Related Topics

Viewer Printing
Page Attributes: Options


Print Preview

printing,printing,printing
print preview,print preview,print preview
printing,printing,printing

Print Preview shows you what will print on each page for Viewer documents. It is a good idea to check Print Preview before actually printing a Viewer document, because Print Preview shows you items that may not be visible by looking at the contents pane of the Viewer, including:

• Page breaks

• Hidden layers of pivot tables

• Breaks in wide tables

• Headers and footers that are printed on each page

If any output is currently selected in the Viewer, the preview displays only the selected output. To view a preview for all output, make sure nothing is selected in the Viewer.

Related Topics

Viewer Printing


Page Attributes: Headers and Footers

printing,printing,printing
headers and footers,headers and footers,headers and footers
headers,headers,headers
footers,footers,footers
page setup,page setup,page setup
headers and footers,headers and footers,headers and footers
printing,printing,printing
page setup,page setup,page setup

Headers and footers are the information that is printed at the top and bottom of each page. You can enter any text that you want to use as headers and footers. You can also use the toolbar in the middle of the dialog box to insert:

• Date and time

• Page numbers

• Viewer filename

• Outline heading labels

• Page titles and subtitles

• Make Default uses the settings specified here as the default settings for new Viewer documents. (Note: this makes the current settings on both the Header/Footer tab and the Options tab the default settings.)

• Outline heading labels indicate the first-, second-, third-, and/or fourth-level outline heading for the first item on each page.

• Page titles and subtitles print the current page titles and subtitles. These can be created with New Page Title on the Viewer Insert menu or with the TITLE and SUBTITLE commands. If you have not specified any page titles or subtitles, this setting is ignored.

Note: Font characteristics for new page titles and subtitles are controlled on the Viewer tab of the Options dialog box (accessed by choosing Options on the Edit menu). Font characteristics for existing page titles and subtitles can be changed by editing the titles in the Viewer.

To see how your headers and footers will look on the printed page, choose Print Preview from the File menu.

Related Topics

To Insert Page Headers and Footers
Page Attributes: Options


To Insert Page Headers and Footers

Make the Viewer the active window (click anywhere in the window).

From the menus choose:

File
Page Attributes...

Click the Header/Footer tab.

Enter the header and/or footer that you want to appear on each page.


Page Attributes: Options

page setup,page setup,page setup
chart size,chart size,chart size
printing,printing,printing
chart size,chart size,chart size
printing,printing,printing
page numbers,page numbers,page numbers
page numbering,page numbering,page numbering
printing,printing,printing
page setup,page setup,page setup
printing,printing,printing
space between output items,space between output items,space between output items
Viewer,Viewer,Viewer
space between output items,space between output items,space between output items
Viewer,Viewer,Viewer

This dialog box controls the printed chart size, the space between printed output items, and page numbering.

• Printed Chart Size. Controls the size of the printed chart relative to the defined page size. The chart's aspect ratio (width-to-height ratio) is not affected by the printed chart size. The overall printed size of a chart is limited by both its height and width. When the outer borders of a chart reach the left and right borders of the page, the chart size cannot increase further to fill additional page height.

• Space between items. Controls the space between printed items. Each pivot table, chart, and text object is a separate item. This setting does not affect the display of items in the Viewer.

• Number pages starting with. Numbers pages sequentially, starting with the specified number.

• Make Default. This option uses the settings specified here as the default settings for new Viewer documents. (Note: this makes the current settings on both the Header/Footer tab and the Options tab the default settings.)

Related Topics

To Change Printed Chart Size, Page Numbering, and Space between Printed Items
Viewer Printing
To Print Output and Charts
Page Attributes: Headers and Footers


To Change Printed Chart Size, Page Numbering, and Space between Printed Items

Make the Viewer the active window (click anywhere in the window).

From the menus choose:

File
Page Attributes...

Click the Options tab.

Change the settings and click OK.


Saving Output

output,output,output
saving,saving,saving
Viewer,Viewer,Viewer
saving document,saving document,saving document
output,output,output
Viewer,Viewer,Viewer

The contents of the Viewer can be saved to a Viewer document. The saved document includes both panes of the Viewer window (the outline and the contents).

Related Topics

To Save a Viewer Document
Export Output
Publish to Web
Viewer
Showing and Hiding Results
Moving, Deleting, and Copying Output
Finding and Replacing Information in the Viewer


To Save a Viewer Document

From the Viewer window menus choose:

File
Save

Enter the name of the document, and then click Save.

Optionally, you can lock files to prevent editing in Smartreader (a separate product for working with Viewer documents). If a Viewer document is locked, you can manipulate pivot tables (swap rows and columns, change the displayed layer, etc.) but you cannot edit any output or save any changes to the Viewer document in Smartreader. This setting has no effect on Viewer documents opened in PASW Statistics.

To save results in external formats (for example, HTML or text), use Export on the File menu.


Pivot Tables

pivot tables,pivot tables,pivot tables

Many results are presented in tables that can be pivoted interactively. That is, you can rearrange the rows, columns, and layers.

Related Topics

Manipulating a Pivot Table
Working with Layers
Showing and Hiding Items
TableLooks
Table Properties
Cell Properties
Footnotes and Captions
Data Cell Widths
Changing Column Width
Selecting Rows and Columns in a Pivot Table
Printing Pivot Tables


Manipulating a Pivot Table

pivot tables,pivot tables,pivot tables
manipulating,manipulating,manipulating
pivot tables,pivot tables,pivot tables
editing,editing,editing
pivot tables,pivot tables,pivot tables

Options for manipulating a pivot table include:

• Transposing rows and columns

• Moving rows and columns

• Creating multidimensional layers

• Grouping and ungrouping rows and columns

• Showing and hiding rows, columns, and other information

• Rotating row and column labels

• Finding definitions of terms

Related Topics

Pivot Tables
Working with Layers
Showing and Hiding Items
TableLooks
Table Properties
Cell Properties
Footnotes and Captions
Data Cell Widths
Changing Column Width
Selecting Rows and Columns in a Pivot Table
Printing Pivot Tables
Activating a Pivot Table
Pivoting a Table
Changing Display Order of Elements within a Dimension
Moving Rows and Columns within a Dimension Element
Transposing Rows and Columns
Grouping Rows or Columns
Ungrouping Rows or Columns
Rotating Row or Column Labels


Activating a Pivot Table

pivot tables,pivot tables,pivot tables
editing,editing,editing
pivot tables,pivot tables,pivot tables
pivoting,pivoting,pivoting
pivot tables,pivot tables,pivot tables

Before you can manipulate or modify a pivot table, you need to activate the table. To activate a table:

Double-click the table.

or

Right-click the table and from the context menu choose Edit Content.

From the sub-menu choose either In Viewer or In Separate Window.

• By default, activating the table by double-clicking will activate all but very large tables in the Viewer window. See the topic Pivot Table Options for more information.

• If you want to have more than one pivot table activated at the same time, you must activate the tables in separate windows.

Related Topics

Manipulating a Pivot Table
Pivoting a Table
Changing Display Order of Elements within a Dimension
Moving Rows and Columns within a Dimension Element
Transposing Rows and Columns
Grouping Rows or Columns
Ungrouping Rows or Columns
Rotating Row or Column Labels


Pivoting a Table

pivot tables,pivot tables,pivot tables
using icons,using icons,using icons
pivot tables,pivot tables,pivot tables
pivoting,pivoting,pivoting
pivot tables,pivot tables,pivot tables

Activate the pivot table.

From the menus choose:

Pivot
Pivoting Trays

A table has three dimensions: rows, columns, and layers. A dimension can contain multiple elements (or none at all). You can change the organization of the table by moving elements between or within dimensions. To move an element, just drag and drop it where you want it.

Show me

Related Topics

Manipulating a Pivot Table
Activating a Pivot Table
Changing Display Order of Elements within a Dimension
Moving Rows and Columns within a Dimension Element
Transposing Rows and Columns
Grouping Rows or Columns
Ungrouping Rows or Columns
Rotating Row or Column Labels


Changing Display Order of Elements within a Dimension

display order,display order,display order
pivot tables,pivot tables,pivot tables
changing display order,changing display order,changing display order
pivot tables,pivot tables,pivot tables

To change the display order of elements within a table dimension (row, column, or layer):

Activate the pivot table.

If pivoting trays are not already on, from the Pivot Table menu choose:

Pivot
Pivoting Trays

Drag and drop the elements within the dimension in the pivoting tray.

Related Topics

Manipulating a Pivot Table
Activating a Pivot Table
Pivoting a Table
Moving Rows and Columns within a Dimension Element
Transposing Rows and Columns
Grouping Rows or Columns
Ungrouping Rows or Columns
Rotating Row or Column Labels


Moving Rows and Columns within a Dimension Element

pivot tables,pivot tables,pivot tables
moving rows and columns,moving rows and columns,moving rows and columns
moving rows and columns,moving rows and columns,moving rows and columns
reordering rows and columns,reordering rows and columns,reordering rows and columns
pivot tables,pivot tables,pivot tables
display order,display order,display order
pivot tables,pivot tables,pivot tables
changing display order,changing display order,changing display order

Activate the pivot table.

In the table itself (not the pivoting trays), click the label for the row or column you want to move.

Drag the label to the new position.

From the context menu choose Insert Before or Swap.

Note: Make sure that Drag to Copy on the Edit menu is not enabled (checked). If Drag to Copy is enabled, deselect it.

Related Topics

Manipulating a Pivot Table
Activating a Pivot Table
Pivoting a Table
Changing Display Order of Elements within a Dimension
Transposing Rows and Columns
Grouping Rows or Columns
Ungrouping Rows or Columns
Rotating Row or Column Labels


Transposing Rows and Columns

transposing rows and columns,transposing rows and columns,transposing rows and columns
pivot tables,pivot tables,pivot tables
transposing rows and columns,transposing rows and columns,transposing rows and columns
pivot tables,pivot tables,pivot tables

Activate the pivot table.

From the menus choose:

Pivot
Transpose Rows and Columns

This has the same effect as dragging all of the row elements into the column dimension and dragging all of the column elements into the row dimension.

Related Topics

Manipulating a Pivot Table
Activating a Pivot Table
Pivoting a Table
Changing Display Order of Elements within a Dimension
Moving Rows and Columns within a Dimension Element
Grouping Rows or Columns
Ungrouping Rows or Columns
Rotating Row or Column Labels


Grouping Rows or Columns

pivot tables,pivot tables,pivot tables
grouping rows or columns,grouping rows or columns,grouping rows or columns
pivot tables,pivot tables,pivot tables
inserting group labels,inserting group labels,inserting group labels
pivot tables,pivot tables,pivot tables
grouping rows or columns,grouping rows or columns,grouping rows or columns
adding group labels,adding group labels,adding group labels
inserting group labels,inserting group labels,inserting group labels
group labels,group labels,group labels
labels,labels,labels
inserting group labels,inserting group labels,inserting group labels
labels,labels,labels

Activate the pivot table.

Select the labels for the rows or columns that you want to group together (click and drag or Shift+click to select multiple labels).

From the menus choose:

Edit
Group

A group label is automatically inserted. Double-click the group label to edit the label text.

Note: To add rows or columns to an existing group, you must first ungroup the items that are currently in the group. Then you can create a new group that includes the additional items.

Related Topics

Manipulating a Pivot Table
Activating a Pivot Table
Pivoting a Table
Changing Display Order of Elements within a Dimension
Moving Rows and Columns within a Dimension Element
Transposing Rows and Columns
Ungrouping Rows or Columns
Rotating Row or Column Labels


Ungrouping Rows or Columns

pivot tables,pivot tables,pivot tables
ungrouping rows or columns,ungrouping rows or columns,ungrouping rows or columns
pivot tables,pivot tables,pivot tables
deleting group labels,deleting group labels,deleting group labels
removing group labels,removing group labels,removing group labels
labels,labels,labels
deleting,deleting,deleting
pivot tables,pivot tables,pivot tables
labels,labels,labels

Activate the pivot table.

Click anywhere in the group label for the rows or columns that you want to ungroup.

From the menus choose:

Edit
Ungroup

Ungrouping automatically deletes the group label.

Related Topics

Manipulating a Pivot Table
Activating a Pivot Table
Pivoting a Table
Changing Display Order of Elements within a Dimension
Moving Rows and Columns within a Dimension Element
Transposing Rows and Columns
Grouping Rows or Columns
Rotating Row or Column Labels


Rotating Row or Column Labels

pivot tables,pivot tables,pivot tables
rotating labels,rotating labels,rotating labels
rotating labels,rotating labels,rotating labels
vertical label text,vertical label text,vertical label text
pivot tables,pivot tables,pivot tables

You can rotate labels between horizontal and vertical display for the innermost column labels and the outermost row labels in a table.

Activate the pivot table.

From the menus choose:

Format
Rotate Inner Column Labels

or

Format
Rotate Outer Row Labels

Only the innermost column labels and the outermost row labels can be rotated.

Related Topics

Manipulating a Pivot Table
Activating a Pivot Table
Pivoting a Table
Changing Display Order of Elements within a Dimension
Moving Rows and Columns within a Dimension Element
Transposing Rows and Columns
Grouping Rows or Columns
Ungrouping Rows or Columns


Working with Layers

pivot tables,pivot tables,pivot tables
layers,layers,layers
layers,layers,layers
in pivot tables,in pivot tables,in pivot tables
pivot tables,pivot tables,pivot tables
layers,layers,layers

You can display a separate two-dimensional table for each category or combination of categories. The table can be thought of as stacked in layers, with only the top layer visible.

Show me

Related Topics

Pivot Tables
Manipulating a Pivot Table
Showing and Hiding Items
TableLooks
Table Properties
Cell Properties
Footnotes and Captions
Data Cell Widths
Changing Column Width
Selecting Rows and Columns in a Pivot Table
Printing Pivot Tables
Creating and Displaying Layers
Go to Layer Category


Creating and Displaying Layers

layers,layers,layers
creating,creating,creating
layers,layers,layers
displaying,displaying,displaying
layers,layers,layers

To create layers:

Activate the pivot table.

If pivoting trays are not already on, from the Pivot Table menu choose:

Pivot
Pivoting Trays

Drag an element from the row or column dimension into the layer dimension.

Moving elements to the layer dimension creates a multidimensional table, but only a single two-dimensional "slice" is displayed. The visible table is the table for the top layer. For example, if a yes/no categorical variable is in the layer dimension, then the multidimensional table has two layers: one for the yes category and one for the no category.

Changing the Displayed Layer

Choose a category from the drop-down list of layers (in the pivot table itself, not the pivoting tray).

or

From the menus choose:

Pivot
Go to Layer...

Show me

Related Topics

Working with Layers
Go to Layer Category


Go to Layer Category

layers,layers,layers
displaying,displaying,displaying
layers,layers,layers

Go to Layer Category allows you to change layers in a pivot table. This dialog box is particularly useful when there are many layers or the selected layer has many categories.

Activate the pivot table.

From the menus choose:

Pivot
Go to Layer...

In the Visible Category list, select a layer dimension. The Categories list will display all categories for the selected dimension.

In the Categories list, select the category that you want, and then click OK or Apply.

Related Topics

Working with Layers
Creating and Displaying Layers


Showing and Hiding Items

pivot tables,pivot tables,pivot tables
showing and hiding cells,showing and hiding cells,showing and hiding cells
cells in pivot tables,cells in pivot tables,cells in pivot tables
showing,showing,showing
cells in pivot tables,cells in pivot tables,cells in pivot tables
hiding,hiding,hiding
pivot tables,pivot tables,pivot tables
cells in pivot tables,cells in pivot tables,cells in pivot tables

Many types of cells can be hidden, including:

• Dimension labels

• Categories, including the label cell and data cells in a row or column

• Category labels (without hiding the data cells)

• Footnotes, titles, and captions

Related Topics

Pivot Tables
Manipulating a Pivot Table
Working with Layers
TableLooks
Table Properties
Cell Properties
Footnotes and Captions
Data Cell Widths
Changing Column Width
Selecting Rows and Columns in a Pivot Table
Printing Pivot Tables
Hiding Rows and Columns in a Table
Showing Hidden Rows and Columns in a Table
Hiding and Showing Dimension Labels
Hiding and Showing Table Titles


Hiding Rows and Columns in a Table

hiding,hiding,hiding
rows and columns,rows and columns,rows and columns
hiding,hiding,hiding

Activate the pivot table.

Right-click the category label for the row or column you want to hide.

From the context menu choose:

Select
Data and Label Cells

Right-click the category label again and from the context menu choose Hide Category.

or

From the View menu choose Hide.

Show me

Related Topics

Showing and Hiding Items
Showing Hidden Rows and Columns in a Table
Hiding and Showing Dimension Labels
Hiding and Showing Table Titles


Showing Hidden Rows and Columns in a Table

showing,showing,showing
rows or columns,rows or columns,rows or columns
showing,showing,showing

Activate the pivot table.

Right-click another row or column label in the same dimension as the hidden row or column.

From the context menu choose:

Select
Data and Label Cells

From the menus choose:

View
Show All Categories in [dimension name]

or

To display all hidden rows and columns in an activated pivot table, from the menus choose:

View
Show All

This displays all hidden rows and columns in the table. (If Hide empty rows and columns is selected in Table Properties for this table, a completely empty row or column remains hidden.)

Related Topics

Showing and Hiding Items
Hiding Rows and Columns in a Table
Hiding and Showing Dimension Labels
Hiding and Showing Table Titles


Hiding and Showing Dimension Labels

hiding,hiding,hiding
dimension labels,dimension labels,dimension labels
showing,showing,showing
dimension labels,dimension labels,dimension labels
hiding,hiding,hiding
showing,showing,showing

Activate the pivot table.

Select the dimension label or any category label within the dimension.

From the View menu or the context menu choose Hide Dimension Label or Show Dimension Label.

Related Topics

Showing and Hiding Items
Hiding Rows and Columns in a Table
Showing Hidden Rows and Columns in a Table
Hiding and Showing Table Titles


Hiding and Showing Table Titles

hiding,hiding,hiding
titles,titles,titles
showing,showing,showing
titles,titles,titles

To hide a title:

Activate the pivot table.

Select the title.

From the View menu choose Hide.

To show hidden titles:

From the View menu choose Show All.

Related Topics

Showing and Hiding Items
Hiding Rows and Columns in a Table
Showing Hidden Rows and Columns in a Table
Hiding and Showing Dimension Labels


TableLooks

pivot tables,pivot tables,pivot tables
changing the look,changing the look,changing the look
TableLooks,TableLooks,TableLooks
pivot tables,pivot tables,pivot tables

A TableLook is a set of properties that define the appearance of a table. You can select a previously defined TableLook or create your own TableLook.

• Before or after a TableLook is applied, you can change cell formats for individual cells or groups of cells by using cell properties. The edited cell formats will remain intact, even when you apply a new TableLook. See the topic Cell Properties for more information.

• Optionally, you can reset all cells to the cell formats that are defined by the current TableLook. This resets any cells that have been edited. If As Displayed is selected in the TableLook Files list, any edited cells are reset to the current table properties.

Show me

Note: TableLooks created in earlier versions of PASW Statistics cannot be used in version 16.0 or later.

Related Topics

Pivot Tables
Manipulating a Pivot Table
Working with Layers
Showing and Hiding Items
Table Properties
Cell Properties
Footnotes and Captions
Data Cell Widths
Changing Column Width
Selecting Rows and Columns in a Pivot Table
Printing Pivot Tables
To Apply or Save a TableLook
To Edit or Create a TableLook


To Apply or Save a TableLook

TableLooks,TableLooks,TableLooks
applying,applying,applying
TableLooks,TableLooks,TableLooks

Activate a pivot table.

From the menus choose:

Format
TableLooks...

Select a TableLook from the list of files. To select a file from another directory, click Browse.

Click OK to apply the TableLook to the selected pivot table.

You can also edit TableLooks and create new ones.

Show me

Note: TableLooks created in earlier versions of PASW Statistics cannot be used in version 16.0 or later.

Related Topics

TableLooks
To Edit or Create a TableLook


To Edit or Create a TableLook

TableLooks,TableLooks,TableLooks
creating,creating,creating
TableLooks,TableLooks,TableLooks

Activate a pivot table.

From the menus choose:

Format
TableLooks...

In the TableLooks dialog box, select a TableLook from the list of files.

Click Edit Look.

Adjust the table properties for the attributes that you want, and then click OK.

Click Save Look to save the edited TableLook, or click Save As to save it as a new TableLook.

Editing a TableLook affects only the selected pivot table. An edited TableLook is not applied to any other tables that uses that TableLook unless you select those tables and reapply the TableLook. For information on setting the default TableLook applied to all new tables, see Setting the TableLook for New Pivot Tables.

Show me

Note: TableLooks created in earlier versions of PASW Statistics cannot be used in version 16.0 or later.

Related Topics

TableLooks
To Apply or Save a TableLook


Table Properties

Table Properties allows you to set general properties of a table, set cell styles for various parts of a table, and save a set of those properties as a TableLook. You can:

• Control general properties, such as hiding empty rows or columns and adjusting printing properties.

• Control the format and position of footnote markers.

• Determine specific formats for cells in the data area, for row and column labels, and for other areas of the table.

• Control the width and color of the lines that form the borders of each area of the table.

Related Topics

Pivot Tables
Manipulating a Pivot Table
Working with Layers
Showing and Hiding Items
TableLooks
Cell Properties
Footnotes and Captions
Data Cell Widths
Changing Column Width
Selecting Rows and Columns in a Pivot Table
Printing Pivot Tables
Table Properties: General
Set Rows to Display
Table Properties: Footnotes
Table Properties: Cell Formats
Table Properties: Borders
Table Properties: Printing


To Change Pivot Table Properties

pivot tables,pivot tables,pivot tables
properties,properties,properties
properties,properties,properties
pivot tables,pivot tables,pivot tables
pivot tables,pivot tables,pivot tables
properties,properties,properties

Activate the pivot table.

From the menus choose:

Format
Table Properties...

Select a tab (General, Footnotes, Cell Formats, Borders, or Printing).

Select the options that you want.

Click OK or Apply.

The new properties are applied to the selected pivot table. To apply new table properties to a TableLook instead of just the selected table, edit the TableLook (Format menu, TableLooks).


Table Properties: General

pivot tables,pivot tables,pivot tables
general properties,general properties,general properties
properties,properties,properties
tables,tables,tables
pivot tables,pivot tables,pivot tables
properties,properties,properties
layers,layers,layers
printing,printing,printing
printing,printing,printing
layers,layers,layers
printing,printing,printing
scaling tables,scaling tables,scaling tables
pivot tables,pivot tables,pivot tables
scaling to fit page,scaling to fit page,scaling to fit page
scaling,scaling,scaling
pivot tables,pivot tables,pivot tables
pivot tables,pivot tables,pivot tables
layers,layers,layers
printing,printing,printing
controlling number of rows to display,controlling number of rows to display,controlling number of rows to display
column width,column width,column width
controlling maximum width,controlling maximum width,controlling maximum width
column width,column width,column width
controlling width for wrapped text,controlling width for wrapped text,controlling width for wrapped text
column width,column width,column width
wrapping,wrapping,wrapping
controlling column width for wrapped text,controlling column width for wrapped text,controlling column width for wrapped text
wrapping,wrapping,wrapping

Several properties apply to the table as a whole. You can:

• Show or hide empty rows and columns. (An empty row or column has nothing in any of the data cells.)

• Control the default number of rows to display in long tables. To display all the rows in a table, regardless of how long it is, deselect (uncheck) Display table by rows.

• Control the placement of row labels, which can be in the upper left corner or nested.

• Control maximum and minimum column width (expressed in points).

To change general table properties:

From the menus choose:

Format
Table Properties...

Click the General tab.

Select the options that you want.

Click OK or Apply.

The new properties are applied to the selected pivot table. To apply new table properties to a TableLook instead of just the selected table, edit the TableLook (Format menu, TableLooks).

Related Topics

Table Properties
Set Rows to Display
Table Properties: Footnotes
Table Properties: Cell Formats
Table Properties: Borders
Table Properties: Printing


Set Rows to Display

pivot tables,pivot tables,pivot tables
controlling number of rows to display,controlling number of rows to display,controlling number of rows to display

By default, tables with many rows are displayed in sections of 100 rows. To control the number of rows displayed in a table:

Activate the table.

From the menus choose:

Table Properties
General

Select Display table by rows.

Click Set Rows to Display.

or

From the View menu of an activated pivot table, choose Display table by rows and Set Rows to Display.

Rows to display. Controls the maximum number of rows to display at one time. Navigation controls allow you move to different sections of the table. The minimum value is 10. The default is 100.

Widow/orphan tolerance. Controls the maximum number of rows of the inner most row dimension of the table to split across displayed views of the table. For example, if there are six categories in each group of the inner most row dimension, specifying a value of six would prevent any group from splitting across displayed views. This setting can cause the total number of rows in a displayed view to exceed the specified maximum number of rows to display.

Expand Show details Collapse Hide details
Displayed rows with default tolerance
Tolerance set based on number of rows in inner row dimension group

Related Topics

Table Properties
Table Properties: General
Table Properties: Footnotes
Table Properties: Cell Formats
Table Properties: Borders
Table Properties: Printing


Table Properties: Footnotes

pivot tables,pivot tables,pivot tables
footnote properties,footnote properties,footnote properties
footnotes,footnotes,footnotes
markers,markers,markers
pivot tables,pivot tables,pivot tables
footnotes,footnotes,footnotes

The properties of footnote markers include style and position in relation to text.

• The style of footnote markers is either numbers (1, 2, 3, ...) or letters (a, b, c, ...).

• The footnote markers can be attached to text as superscripts or subscripts.

To change footnote marker properties:

From the menus choose:

Format
Table Properties...

Click the Footnotes tab.

Select a footnote number format.

Select a marker position.

Click OK or Apply.

The new properties are applied to the selected pivot table. To apply new table properties to a TableLook instead of just the selected table, edit the TableLook (Format menu, TableLooks).

Related Topics

Table Properties
Table Properties: General
Set Rows to Display
Table Properties: Cell Formats
Table Properties: Borders
Table Properties: Printing
Footnotes and Captions
Adding Footnotes and Captions
To Hide or Show a Caption
To Hide or Show a Footnote in a Table
Footnote Marker
Renumbering Footnotes


Table Properties: Cell Formats

pivot tables,pivot tables,pivot tables
cell formats,cell formats,cell formats
alternating row colors,alternating row colors,alternating row colors
cells in pivot tables,cells in pivot tables,cells in pivot tables
formats,formats,formats
pivot tables,pivot tables,pivot tables
cells in pivot tables,cells in pivot tables,cells in pivot tables
alternating row colors,alternating row colors,alternating row colors
pivot tables,pivot tables,pivot tables

For formatting, a table is divided into areas: title, layers, corner labels, row labels, column labels, data, caption, and footnotes. For each area of a table, you can modify the associated cell formats. Cell formats include text characteristics (such as font, size, color, and style), horizontal and vertical alignment, background colors, and inner cell margins.

Cell formats are applied to areas (categories of information). They are not characteristics of individual cells. This distinction is an important consideration when pivoting a table.

For example,

• If you specify a bold font as a cell format of column labels, the column labels will appear bold no matter what information is currently displayed in the column dimension. If you move an item from the column dimension to another dimension, it does not retain the bold characteristic of the column labels.

• If you make column labels bold simply by highlighting the cells in an activated pivot table and clicking the Bold button on the toolbar, the contents of those cells will remain bold no matter what dimension you move them to, and the column labels will not retain the bold characteristic for other items moved into the column dimension.

To change cell formats:

From the menus choose:

Format
Table Properties...

Select the Cell Formats tab.

Select an Area from the drop-down list or click an area of the sample.

Select characteristics for the area. Your selections are reflected in the sample.

Click OK or Apply.

The new properties are applied to the selected pivot table. To apply new table properties to a TableLook instead of just the selected table, edit the TableLook (Format menu, TableLooks).

Alternating Row Colors Collapse Hide details

Alternating Row Colors

To apply a different background and/or text color to alternate rows in the Data area of the table:

Select Data from the Area drop-down list.

Select (check) Alternate row color in the Background Color group.

Select the colors to use for the alternate row background and text.

Alternate row colors affect only the Data area of the table. They do not affect row or column label areas.

Related Topics

Table Properties
Table Properties: General
Set Rows to Display
Table Properties: Footnotes
Table Properties: Borders
Table Properties: Printing
Cell Properties
Cell Properties: Font and Background
Cell Properties: Format Value
Cell Properties: Alignment and Margins


Table Properties: Borders

pivot tables,pivot tables,pivot tables
borders,borders,borders
borders,borders,borders
colors in pivot tables,colors in pivot tables,colors in pivot tables
borders,borders,borders
pivot tables,pivot tables,pivot tables
colors in pivot tables,colors in pivot tables,colors in pivot tables

For each border location in a table, you can select a line style and a color. If you select None as the style, there will be no line at the selected location.

To change table borders:

From the menus choose:

Format
Table Properties...

Click the Borders tab.

Select a border location, either by clicking its name in the list or by clicking a line in the Sample area.

Select a line style or select None.

Select a color.

Click OK or Apply.

The new properties are applied to the selected pivot table. To apply new table properties to a TableLook instead of just the selected table, edit the TableLook (Format menu, TableLooks).

To view hidden borders in a pivot table, from the View menu choose Gridlines.

Related Topics

Table Properties
Table Properties: General
Set Rows to Display
Table Properties: Footnotes
Table Properties: Cell Formats
Table Properties: Printing


Table Properties: Printing

layers,layers,layers
printing,printing,printing
printing,printing,printing
layers,layers,layers
printing,printing,printing
scaling tables,scaling tables,scaling tables
pivot tables,pivot tables,pivot tables
scaling to fit page,scaling to fit page,scaling to fit page
scaling,scaling,scaling
pivot tables,pivot tables,pivot tables
pivot tables,pivot tables,pivot tables
layers,layers,layers
printing,printing,printing
pivot tables,pivot tables,pivot tables
continuation text,continuation text,continuation text
continuation text,continuation text,continuation text
for pivot tables,for pivot tables,for pivot tables
continuation text,continuation text,continuation text

You can control the following properties for printed pivot tables:

• Print all layers or only the top layer of the table, and print each layer on a separate page.

• Shrink a table horizontally or vertically to fit the page for printing.

• Control widow/orphan lines by controlling the minimum number of rows and columns that will be contained in any printed section of a table if the table is too wide and/or too long for the defined page size.

Note: If a table is too long to fit on the current page because there is other output above it, but it will fit within the defined page length, the table is automatically printed on a new page, regardless of the widow/orphan setting.

• Include continuation text for tables that don't fit on a single page. You can display continuation text at the bottom of each page and at the top of each page. If neither option is selected, the continuation text will not be displayed.

To control pivot table printing properties:

From the menus choose:

Format
Table Properties...

Click the Printing tab.

Select the printing options that you want.

Click OK or Apply.

The new properties are applied to the selected pivot table. To apply new table properties to a TableLook instead of just the selected table, edit the TableLook (Format menu, TableLooks).

Related Topics

Table Properties
Table Properties: General
Set Rows to Display
Table Properties: Footnotes
Table Properties: Cell Formats
Table Properties: Borders
Printing Pivot Tables
Controlling Table Breaks for Wide and Long Tables


Cell Properties

Cell properties are applied to a selected cell. You can change the font, value format, alignment, margins, and colors. Cell properties override table properties; therefore, if you change table properties, you do not change any individually applied cell properties.

To change cell properties:

Activate a table and select the cell(s) in the table.

From the Format menu or the context menu choose Cell Properties.

Related Topics

Pivot Tables
Manipulating a Pivot Table
Working with Layers
Showing and Hiding Items
TableLooks
Table Properties
Footnotes and Captions
Data Cell Widths
Changing Column Width
Selecting Rows and Columns in a Pivot Table
Printing Pivot Tables
Table Properties: Cell Formats
Cell Properties: Font and Background
Cell Properties: Format Value
Cell Properties: Alignment and Margins


Cell Properties: Font and Background

pivot tables,pivot tables,pivot tables
cell properties,cell properties,cell properties
fonts,fonts,fonts
background color,background color,background color
tables,tables,tables
cell properties,cell properties,cell properties
fonts,fonts,fonts
background color,background color,background color
cell properties,cell properties,cell properties
fonts,fonts,fonts
background color,background color,background color

The Font and Background tab controls the font style and color and background color for the selected cells in the table.

To change font and background attributes for selected cells in a pivot table:

Activate the table.

Select the cell(s) that you want to modify.

From the Format menu or the context menu choose Cell Properties.

Click the Font and Background tab.

Related Topics

Table Properties: Cell Formats
Cell Properties
Cell Properties: Format Value
Cell Properties: Alignment and Margins


Cell Properties: Format Value

pivot tables,pivot tables,pivot tables
cell properties,cell properties,cell properties
tables,tables,tables
cell properties,cell properties,cell properties
cell properties,cell properties,cell properties

The Format Value tab controls value formats for the selected cells. You can select formats for numbers, dates, time, or currencies, and you can adjust the number of decimal digits that are displayed.

To change value formats for selected cells in a pivot table:

Activate the table.

Select the cell(s) that you want to modify.

From the Format menu or the context menu choose Cell Properties.

Click the Format Value tab.

Related Topics

Table Properties: Cell Formats
Cell Properties
Cell Properties: Font and Background
Cell Properties: Alignment and Margins


Cell Properties: Alignment and Margins

pivot tables,pivot tables,pivot tables
cell properties,cell properties,cell properties
alignment,alignment,alignment
margins,margins,margins
tables,tables,tables
cell properties,cell properties,cell properties
alignment,alignment,alignment
margins,margins,margins
cell properties,cell properties,cell properties

The Alignment and Margins tab controls horizontal and vertical alignment of values and top, bottom, left, and right margins for the selected cells. Mixed horizontal alignment aligns the content of each cell according to its type. For example, dates are right-aligned and text values are left-aligned.

To change alignment or margins for selected cells in a pivot table:

Activate the table.

Select the cell(s) that you want to modify.

From the Format menu or the context menu choose Cell Properties.

Click the Alignment and Margins tab.

Related Topics

Table Properties: Cell Formats
Cell Properties
Cell Properties: Font and Background
Cell Properties: Format Value


Footnotes and Captions

You can add footnotes and captions to a table. You can also hide footnotes or captions, change footnote markers, and renumber footnotes.

Some footnote attributes are controlled by table properties. See the topic Table Properties: Footnotes for more information.

Related Topics

Pivot Tables
Manipulating a Pivot Table
Working with Layers
Showing and Hiding Items
TableLooks
Table Properties
Cell Properties
Data Cell Widths
Changing Column Width
Selecting Rows and Columns in a Pivot Table
Printing Pivot Tables
Table Properties: Footnotes
Adding Footnotes and Captions
To Hide or Show a Caption
To Hide or Show a Footnote in a Table
Footnote Marker
Renumbering Footnotes


Adding Footnotes and Captions

pivot tables,pivot tables,pivot tables
footnotes,footnotes,footnotes
captions,captions,captions
footnotes,footnotes,footnotes
captions,captions,captions

To add a caption to a table:

Activate the pivot table.

From the Insert menu choose Caption.

A footnote can be attached to any item in a table. To add a footnote:

Click a title, cell, or caption within an activated pivot table.

From the Insert menu choose Footnote.

Related Topics

Table Properties: Footnotes
Footnotes and Captions
To Hide or Show a Caption
To Hide or Show a Footnote in a Table
Footnote Marker
Renumbering Footnotes


To Hide or Show a Caption

pivot tables,pivot tables,pivot tables
captions,captions,captions
captions,captions,captions
hiding,hiding,hiding
captions,captions,captions
showing,showing,showing
captions,captions,captions

To hide a caption:

Activate the pivot table.

Select the caption.

From the View menu choose Hide.

To show hidden captions:

From the View menu choose Show All.

Related Topics

Table Properties: Footnotes
Footnotes and Captions
Adding Footnotes and Captions
To Hide or Show a Footnote in a Table
Footnote Marker
Renumbering Footnotes


To Hide or Show a Footnote in a Table

pivot tables,pivot tables,pivot tables
footnotes,footnotes,footnotes
captions,captions,captions
footnotes,footnotes,footnotes
captions,captions,captions
hiding,hiding,hiding
footnotes,footnotes,footnotes
showing,showing,showing
footnotes,footnotes,footnotes
hiding,hiding,hiding
showing,showing,showing

To hide a footnote:

Activate the pivot table.

Select the footnote.

From the View menu choose Hide or from the context menu choose Hide Footnote.

To show hidden footnotes:

From the View menu choose Show All Footnotes.

Related Topics

Table Properties: Footnotes
Footnotes and Captions
Adding Footnotes and Captions
To Hide or Show a Caption
Footnote Marker
Renumbering Footnotes


Footnote Marker

pivot tables,pivot tables,pivot tables
footnotes,footnotes,footnotes
captions,captions,captions
footnotes,footnotes,footnotes
captions,captions,captions
footnotes,footnotes,footnotes
markers,markers,markers
footnotes,footnotes,footnotes

Footnote Marker changes the character(s) that can be used to mark a footnote.

To change footnote markers:

Activate the pivot table.

Select a footnote.

From the Format menu choose Footnote Marker.

Enter one or two characters.

Related Topics

Table Properties: Footnotes
Footnotes and Captions
Adding Footnotes and Captions
To Hide or Show a Caption
To Hide or Show a Footnote in a Table
Renumbering Footnotes


Renumbering Footnotes

footnotes,footnotes,footnotes
renumbering,renumbering,renumbering
footnotes,footnotes,footnotes

When you have pivoted a table by switching rows, columns, and layers, the footnotes may be out of order. To renumber the footnotes:

Activate the pivot table.

From the Format menu choose Renumber Footnotes.

Related Topics

Table Properties: Footnotes
Footnotes and Captions
Adding Footnotes and Captions
To Hide or Show a Caption
To Hide or Show a Footnote in a Table
Footnote Marker


Data Cell Widths

pivot tables,pivot tables,pivot tables
cell widths,cell widths,cell widths
cells in pivot tables,cells in pivot tables,cells in pivot tables
widths,widths,widths
pivot tables,pivot tables,pivot tables
cells in pivot tables,cells in pivot tables,cells in pivot tables

Set Data Cell Width is used to set all data cells to the same width.

To set the width for all data cells:

Activate the pivot table.

From the menus choose:

Format
Set Data Cell Widths...

Enter a value for the cell width.

Related Topics

Pivot Tables
Manipulating a Pivot Table
Working with Layers
Showing and Hiding Items
TableLooks
Table Properties
Cell Properties
Footnotes and Captions
Changing Column Width
Selecting Rows and Columns in a Pivot Table
Printing Pivot Tables


Changing Column Width

columns,columns,columns
changing width in pivot tables,changing width in pivot tables,changing width in pivot tables
column width,column width,column width
pivot tables,pivot tables,pivot tables
columns,columns,columns
column width,column width,column width

Activate the pivot table.

Click and drag the column border.

To view hidden borders in a pivot table, from the View menu choose Gridlines.

Related Topics

Pivot Tables
Manipulating a Pivot Table
Working with Layers
Showing and Hiding Items
TableLooks
Table Properties
Cell Properties
Footnotes and Captions
Data Cell Widths
Selecting Rows and Columns in a Pivot Table
Printing Pivot Tables


Displaying Hidden Borders in a Pivot Table

grid lines,grid lines,grid lines
pivot tables,pivot tables,pivot tables
pivot tables,pivot tables,pivot tables
grid lines,grid lines,grid lines
pivot tables,pivot tables,pivot tables
displaying hidden borders,displaying hidden borders,displaying hidden borders
borders,borders,borders
displaying hidden borders,displaying hidden borders,displaying hidden borders
borders,borders,borders
pivot tables,pivot tables,pivot tables
grid lines,grid lines,grid lines

For tables without many visible borders, you can display the hidden borders. This can simplify tasks like changing column widths.

Activate the pivot table.

From the View menu choose Gridlines.


Selecting Rows and Columns in a Pivot Table

rows,rows,rows
selecting in pivot tables,selecting in pivot tables,selecting in pivot tables
columns,columns,columns
selecting in pivot tables,selecting in pivot tables,selecting in pivot tables
pivot tables,pivot tables,pivot tables
selecting rows and columns,selecting rows and columns,selecting rows and columns
selection methods,selection methods,selection methods
selecting rows and columns in pivot tables,selecting rows and columns in pivot tables,selecting rows and columns in pivot tables
rows,rows,rows
columns,columns,columns
pivot tables,pivot tables,pivot tables
selection methods,selection methods,selection methods

In pivot tables, there are some constraints on how you select entire rows and columns, and the visual highlight that indicates the selected row or column may span noncontiguous areas of the table. To select an entire row or column:

Activate the pivot table.

Click a row or column label.

From the menus choose:

Edit
Select
Data and Label Cells

or

Right-click the category label for the row or column.

From the context menu choose:

Select
Data and Label Cells

or

Ctrl+Alt+click the row or column label.

Related Topics

Pivot Tables
Manipulating a Pivot Table
Working with Layers
Showing and Hiding Items
TableLooks
Table Properties
Cell Properties
Footnotes and Captions
Data Cell Widths
Changing Column Width
Printing Pivot Tables


Printing Pivot Tables

Several factors can affect the way that printed pivot tables look, and these factors can be controlled by changing pivot table attributes.

• For multidimensional pivot tables (tables with layers), you can either print all layers or print only the top (visible) layer. See the topic Table Properties: Printing for more information.

• For long or wide pivot tables, you can automatically resize the table to fit the page or control the location of table breaks and page breaks. See the topic Table Properties: Printing for more information.

• For tables that are too wide or too long for a single page, you can control the location of table breaks between pages.

Use Print Preview on the File menu to see how printed pivot tables will look.

Related Topics

Pivot Tables
Manipulating a Pivot Table
Working with Layers
Showing and Hiding Items
TableLooks
Table Properties
Cell Properties
Footnotes and Captions
Data Cell Widths
Changing Column Width
Selecting Rows and Columns in a Pivot Table
Table Properties: Printing
Controlling Table Breaks for Wide and Long Tables


Controlling Table Breaks for Wide and Long Tables

pivot tables,pivot tables,pivot tables
controlling table breaks,controlling table breaks,controlling table breaks
pivot tables,pivot tables,pivot tables
printing large tables,printing large tables,printing large tables
tables,tables,tables
controlling table breaks,controlling table breaks,controlling table breaks
pivot tables,pivot tables,pivot tables
tables,tables,tables
printing,printing,printing
controlling table breaks,controlling table breaks,controlling table breaks
splitting tables,splitting tables,splitting tables
controlling table breaks,controlling table breaks,controlling table breaks
table breaks,table breaks,table breaks
printing,printing,printing
splitting tables,splitting tables,splitting tables

Pivot tables that are either too wide or too long to print within the defined page size are automatically split and printed in multiple sections. (For wide tables, multiple sections will print on the same page if there is room.) You can:

• Control the row and column locations where large tables are split.

• Specify rows and columns that should be kept together when tables are split.

• Rescale large tables to fit the defined page size.

To Specify Row and Column Breaks for Printed Pivot Tables

Activate the pivot table.

Click the column label to the left of where you want to insert the break, or click the row label above where you want to insert the break.

From the menus choose:

Format
Break Here

To Specify Rows or Columns to Keep Together

Select the labels of the rows or columns that you want to keep together. (Click and drag or Shift+click to select multiple row or column labels.)

From the menus choose:

Format
Keep Together

Related Topics

Table Properties: Printing
Printing Pivot Tables


Creating a Chart from a Pivot Table

charts,charts,charts
creating from pivot tables,creating from pivot tables,creating from pivot tables
pivot tables,pivot tables,pivot tables
creating charts from tables,creating charts from tables,creating charts from tables
charts,charts,charts
pivot tables,pivot tables,pivot tables
table chart,table chart,table chart

Double-click the pivot table to activate it.

Select the rows, columns, or cells you want to display in the chart.

Right-click anywhere in the selected area.

Choose Create Graph from the context menu and select a chart type.


Models

models,models,models

Some results are presented as models, which appear in the output Viewer as a special type of visualization. The visualization displayed in the output Viewer is not the only view of the model that is available. A single model contains many different views. You can activate the model in the Model Viewer and interact with the model directly to display the available model views. You can also choose to print and export all the views in the model.

Related Topics

Interacting with a Model
Printing a Model
Exporting a Model


Interacting with a Model

models,models,models
interacting,interacting,interacting
activating,activating,activating

To interact with a model, you first activate it:

Double-click the model.

or

Right-click the model and from the context menu choose Edit Content.

From the submenu choose In Separate Window.

Activating the model displays the model in the Model Viewer. See the topic Working with the Model Viewer for more information.

Related Topics

Models
Printing a Model
Exporting a Model
Working with the Model Viewer


Working with the Model Viewer

models,models,models
Model Viewer,Model Viewer,Model Viewer
Model Viewer,Model Viewer,Model Viewer

The Model Viewer is an interactive tool for displaying the available model views and editing the look of the model views. (For information about displaying the Model Viewer, see Interacting with a Model.) The Model Viewer is split into two parts:

• Main view. The main view appears in the left part of the Model Viewer. The main view displays some general visualization (for example, a network graph) for the model. The main view itself may have more than one model view. The drop-down list below the main view allows you to choose from the available main views.

• Auxiliary view. The auxiliary view appears in the right part of the Model Viewer. The auxiliary view typically displays a more detailed visualization (including tables) of the model compared to the general visualization in the main view. Like the main view, the auxiliary view may have more than one model view. The drop-down list below the auxiliary view allows you to choose from the available main views. The auxiliary can also display specific visualizations for elements that are selected in the main view. For example, depending on the type of model, you may be able to select a variable node in the main view to display a table for that variable in the auxiliary view.

The specific visualizations that are displayed depend on the procedure that created the model. For information about working with specific models, refer to the documentation for the procedure that created the model.

Model View Tables

Tables displayed in the Model Viewer are not pivot tables. You cannot manipulate these tables as you can manipulate pivot tables.

Setting Model Properties

Within the Model Viewer, you can set specific properties for the model. See the topic Model Properties for more information.

Copying Model Views

You can also copy individual model views within the Model Viewer. See the topic Copying Model Views for more information.

Related Topics

Interacting with a Model
Model Properties
Copying Model Views


Model Properties

models,models,models
properties,properties,properties

From within the Model Viewer, choose from the menus:

File
Properties

Each model has associated properties that let you specify which views are printed from the output Viewer. By default, only the view that is visible in the output Viewer is printed. This is always a main view, and only one main view. You can also specify that all available model views are printed. These include all the main views and all the auxiliary views (except for auxiliary views based on selection in the main view; these are not printed). Note that you can also print individual model views within the Model Viewer itself. See the topic Printing a Model for more information.

Related Topics

Working with the Model Viewer


Copying Model Views

models,models,models
copying,copying,copying

From the Edit menu within the Model Viewer, you can copy the currently displayed main view or the currently display auxiliary view. Only one model view is copied. You can paste the model view into the output Viewer, where the individual model view is subsequently rendered as a visualization that can be edited in the Graphboard Editor. Pasting into the output Viewer allows you to display multiple model views simultaneously. You can also paste into other applications, where the view may appear as an image or a table depending on the target application.

Related Topics

Printing a Model
Exporting a Model
Working with the Model Viewer


Printing a Model

models,models,models
printing,printing,printing
printing,printing,printing
models,models,models

Printing from the Model Viewer

You can print a single model view within the Model Viewer itself.

Activate the model in the Model Viewer. See the topic Interacting with a Model for more information.

From the menus choose:

View
Edit Mode

On the General toolbar palette in the main or auxiliary view (depending on which one you want to print), click the print icon. (If this palette is not displayed, choose Palettes>General from the View menu.)

Printing from the Output Viewer

When you print from the output Viewer, the number of views that are printed for a specific model depend on the model's properties. The model can be set to print only the displayed view or all of the available model views. See the topic Model Properties for more information.

Related Topics

Copying Model Views
Models
Interacting with a Model
Exporting a Model


Exporting a Model

models,models,models
exporting,exporting,exporting
exporting,exporting,exporting
models,models,models

By default, when you export models from the output Viewer, inclusion or exclusion of model views is controlled by the model properties for each model. For more information about model properties, see Model Properties. On export, you can override this setting and include all model views or only the currently visible model view. In the Export Output dialog box, click Change Options... in the Document group. For more information about exporting and this dialog box, see Export Output. Note that all model views, including tables, are exported as graphics. Also note that auxiliary views based on selections in the main view are never exported.

Related Topics

Copying Model Views
Models
Interacting with a Model
Printing a Model


Working with Command Syntax

command syntax,command syntax,command syntax
command language,command language,command language
programming with command language,programming with command language,programming with command language
syntax,syntax,syntax

The powerful command language allows you to save and automate many common tasks. It also provides some functionality not found in the menus and dialog boxes.

Most commands are accessible from the menus and dialog boxes. However, some commands and options are available only by using the command language. The command language also allows you to save your jobs in a syntax file so that you can repeat your analysis at a later date or run it in an automated job with the a production job.

A syntax file is simply a text file that contains commands. While it is possible to open a syntax window and type in commands, it is often easier if you let the software help you build your syntax file using one of the following methods:

• Pasting command syntax from dialog boxes

• Copying syntax from the output log

• Copying syntax from the journal file

Detailed command syntax reference information is available in two forms: integrated into the overall Help system and as a separate PDF file, called the Command Syntax Reference, also available from the Help menu. Context-sensitive Help for the current command in a syntax window is available by pressing the F1 key.

Related Topics

Syntax Rules
Copying Syntax from the Output Log
Viewer Options
Variable Names and Variable Labels in Dialog Box Lists
Multiple Execute Commands
General Options
Find and Replace in Syntax Windows


Syntax Rules

command syntax,command syntax,command syntax
syntax rules,syntax rules,syntax rules
syntax,syntax,syntax
syntax rules,syntax rules,syntax rules

When you run commands from a command syntax window during a session, you are running commands in interactive mode.

The following rules apply to command specifications in interactive mode:

• Each command must start on a new line. Commands can begin in any column of a command line and continue for as many lines as needed. The exception is the END DATA command, which must begin in the first column of the first line after the end of data.

• Each command should end with a period as a command terminator. It is best to omit the terminator on BEGIN DATA, however, so that inline data are treated as one continuous specification.

• The command terminator must be the last nonblank character in a command.

• In the absence of a period as the command terminator, a blank line is interpreted as a command terminator.

Note: For compatibility with other modes of command execution (including command files run with INSERT or INCLUDE commands in an interactive session), each line of command syntax should not exceed 256 bytes.

• Most subcommands are separated by slashes (/). The slash before the first subcommand on a command is usually optional.

• Variable names must be spelled out fully.

• Text included within apostrophes or quotation marks must be contained on a single line.

• A period (.) must be used to indicate decimals, regardless of your regional or locale settings.

• Variable names ending in a period can cause errors in commands created by the dialog boxes. You cannot create such variable names in the dialog boxes, and you should generally avoid them.

Command syntax is case insensitive, and three- or four-letter abbreviations can be used for many command specifications. You can use as many lines as you want to specify a single command. You can add space or break lines at almost any point where a single blank is allowed, such as around slashes, parentheses, arithmetic operators, or between variable names. For example,

FREQUENCIES
  VARIABLES=JOBCAT GENDER
  /PERCENTILES=25 50 75
  /BARCHART.

and

freq var=jobcat gender /percent=25 50 75 /bar.

are both acceptable alternatives that generate the same results.

INCLUDE Files

For command files run via the INCLUDE command, batch mode syntax rules apply.

The following rules apply to command specifications in batch mode:

• All commands in the command file must begin in column 1. You can use plus (+) or minus (–) signs in the first column if you want to indent the command specification to make the command file more readable.

• If multiple lines are used for a command, column 1 of each continuation line must be blank.

• Command terminators are optional.

• A line cannot exceed 256 bytes; any additional characters are truncated.

Unless you have existing command files that already use the INCLUDE command, you should probably use the INSERT command instead, since it can accommodate command files that conform to either set of rules. If you generate command syntax by pasting dialog box choices into a syntax window, the format of the commands is suitable for any mode of operation. See the Command Syntax Reference (available in PDF format from the Help menu) for more information.

Related Topics

Working with Command Syntax


Pasting Syntax from Dialog Boxes

command syntax,command syntax,command syntax
pasting,pasting,pasting
syntax,syntax,syntax
pasting,pasting,pasting

The easiest way to build a command syntax file is to make selections in dialog boxes and paste the syntax for the selections into a syntax window. By pasting the syntax at each step of a lengthy analysis, you can build a job file that allows you to repeat the analysis at a later date or run an automated job with the Production Facility.

In the syntax window, you can run the pasted syntax, edit it, and save it in a syntax file.

Related Topics

To Paste Syntax from Dialog Boxes
Designated Window versus Active Window


To Paste Syntax from Dialog Boxes

Open the dialog box and make the selections that you want.

Click Paste.

The command syntax is pasted to the designated syntax window. If you do not have an open syntax window, a new syntax window opens automatically, and the syntax is pasted there.


Copying Syntax from the Output Log

command syntax,command syntax,command syntax
output log,output log,output log
syntax,syntax,syntax
output log,output log,output log

You can build a syntax file by copying command syntax from the log that appears in the Viewer. To use this method, you must select Display commands in the log in the Viewer settings (Edit menu, Options, Viewer tab) before running the analysis. Each command will then appear in the Viewer along with the output from the analysis.

In the syntax window, you can run the pasted syntax, edit it, and save it in a syntax file.

Related Topics

To Copy Syntax from the Output Log
Working with Command Syntax
Viewer Options


To Copy Syntax from the Output Log

Before running the analysis, from the menus choose:

Edit
Options...

On the Viewer tab, select Display commands in the log.

As you run analyses, the commands for your dialog box selections are recorded in the log.

Open a previously saved syntax file or create a new one. To create a new syntax file, from the menus choose:

File
New
Syntax

In the Viewer, double-click a log item to activate it.

Select the text that you want to copy.

From the Viewer menus choose:

Edit
Copy

In a syntax window, from the menus choose:

Edit
Paste


Using the Syntax Editor

command syntax editor,command syntax editor,command syntax editor
syntax editor,syntax editor,syntax editor

The Syntax Editor provides an environment specifically designed for creating, editing, and running command syntax. The Syntax Editor features:

• Auto-Completion. As you type, you can select commands, subcommands, keywords, and keyword values from a context-sensitive list. You can choose to be prompted automatically with the list or display the list on demand.

• Color Coding. Recognized elements of command syntax (commands, subcommands, keywords, and keyword values) are color coded so, at a glance, you can spot unrecognized terms. Also, a number of common syntactical errors--such as unmatched quotes--are color coded for quick identification.

• Breakpoints. You can stop execution of command syntax at specified points, allowing you to inspect the data or output before proceeding.

• Bookmarks. You can set bookmarks that allow you to quickly navigate large command syntax files.

• Step Through. You can step through command syntax one command at a time, advancing to the next command with a single click.

Note: When working with right to left languages, it is recommended to check the Optimize for right to left languages box on the Syntax Editor tab in the Options dialog box.

Related Topics

Syntax Editor Window
Terminology
Auto-Completion
Color Coding
Breakpoints
Bookmarks
Commenting Out Text
Running Command Syntax


Syntax Editor Window

The Syntax Editor window is divided into four areas:

• The editor pane is the main part of the Syntax Editor window and is where you enter and edit command syntax.

• The gutter is adjacent to the editor pane and displays information such as line numbers and breakpoint positions.

• The navigation pane is to the left of the gutter and editor pane and displays a list of all commands in the Syntax Editor window and provides single click navigation to any command.

• The error pane is below the editor pane and displays runtime errors.

syntax editor,syntax editor,syntax editor
line numbers,line numbers,line numbers
breakpoints,breakpoints,breakpoints
bookmarks,bookmarks,bookmarks
command spans,command spans,command spans
command syntax editor,command syntax editor,command syntax editor
line numbers,line numbers,line numbers
breakpoints,breakpoints,breakpoints
bookmarks,bookmarks,bookmarks
command spans,command spans,command spans
Gutter Contents Collapse Hide details

Gutter Contents

Line numbers, breakpoints, bookmarks, command spans, and a progress indicator are displayed in the gutter to the left of the editor pane in the syntax window.

• Line numbers do not account for any external files referenced in INSERT and INCLUDE commands. You can show or hide line numbers by choosing View > Show Line Numbers from the menus.

• Breakpoints stop execution at specified points and are represented as a red circle adjacent to the command on which the breakpoint is set.

• Bookmarks mark specific lines in a command syntax file and are represented as a square enclosing the number (1-9) assigned to the bookmark. Hovering over the icon for a bookmark displays the number of the bookmark and the name, if any, assigned to the bookmark.

• Command spans are icons that provide visual indicators of the start and end of a command. You can show or hide command spans by choosing View > Show Command Spans from the menus.

• The progress of a given syntax run is indicated with a downward pointing arrow in the gutter, stretching from the first command run to the last command run. This is most useful when running command syntax containing breakpoints and when stepping through command syntax. See the topic Running Command Syntax for more information.

Navigation Pane Collapse Hide details

Navigation Pane

The navigation pane contains a list of all recognized commands in the syntax window, displayed in the order in which they occur in the window. Clicking on a command in the navigation pane positions the cursor at the start of the command.

• You can use the Up and Down arrow keys to move through the list of commands or click on a command to navigate to it. A double click will select the command.

• Command names for commands containing certain types of syntactical errors--such as unmatched quotes--are colored red and in bold text by default. See the topic Color Coding for more information.

• The first word of each line of unrecognized text is shown in gray.

• You can show or hide the navigation pane by choosing View > Show Navigation Pane from the menus.

Error Pane Collapse Hide details

Error Pane

The error pane displays runtime errors from the most previous run.

• The information for each error contains the line number on which the error occurred.

• You can use the Up and Down arrow keys to move through the list of errors.

• Clicking on an entry in the list will position the cursor on the line that generated the error.

• You can show or hide the error pane by choosing View > Show Error Pane from the menus.

Related Topics

Using the Syntax Editor
Terminology
Auto-Completion
Color Coding
Breakpoints
Bookmarks
Commenting Out Text
Running Command Syntax


Terminology

Commands. The basic unit of syntax is the command. Each command begins with the command name, which consists of one, two, or three words--for example, DESCRIPTIVES, SORT CASES, or ADD VALUE LABELS.

Subcommands. Most commands contain subcommands. Subcommands provide for additional specifications and begin with a forward slash followed by the name of the subcommand.

Keywords. Keywords are fixed terms that are typically used within a subcommand to specify options available for the subcommand.

Keyword Values. Keywords can have values such as a fixed term that specifies an option or a numeric value.

Example

CODEBOOK gender jobcat salary
  /VARINFO VALUELABELS MISSING
  /OPTIONS VARORDER=MEASURE.

• The name of the command is CODEBOOK.

• VARINFO and OPTIONS are subcommands.

• VALUELABELS, MISSING, and VARORDER are keywords.

• MEASURE is a keyword value associated with VARORDER.

Related Topics

Using the Syntax Editor
Syntax Editor Window
Auto-Completion
Color Coding
Breakpoints
Bookmarks
Commenting Out Text
Running Command Syntax


Auto-Completion

syntax editor,syntax editor,syntax editor
auto-completion,auto-completion,auto-completion
command syntax editor,command syntax editor,command syntax editor
auto-completion,auto-completion,auto-completion

The Syntax Editor provides assistance in the form of auto-completion of commands, subcommands, keywords, and keyword values. By default, you are prompted with a context-sensitive list of available terms. You can display the list on demand by pressing Ctrl+Spacebar and you can close the list by pressing the Esc key.

The Auto Complete menu item on the Tools menu toggles the automatic display of the auto-complete list on or off. You can also enable or disable automatic display of the list from the Syntax Editor tab in the Options dialog box. Toggling the Auto Complete menu item overrides the setting on the Options dialog but does not persist across sessions.

Note: The auto-completion list will close if a space is entered. For commands consisting of multiple words--such as ADD FILES--select the desired command before entering any spaces.

Related Topics

Using the Syntax Editor
Syntax Editor Window
Terminology
Color Coding
Breakpoints
Bookmarks
Commenting Out Text
Running Command Syntax


Color Coding

syntax editor,syntax editor,syntax editor
color coding,color coding,color coding
command syntax editor,command syntax editor,command syntax editor
color coding,color coding,color coding

The Syntax Editor color codes recognized elements of command syntax, such as commands and subcommands, as well as various syntactical errors like unmatched quotes or parentheses. Unrecognized text is not color coded.

Commands. By default, recognized commands are colored blue and in bold text. If, however, there is a recognized syntactical error within the command--such as a missing parenthesis--the command name is colored red and in bold text by default.

Note: Abbreviations of command names--such as FREQ for FREQUENCIES--are not colored, but such abbreviations are valid.

Subcommands. Recognized subcommands are colored green by default. If, however, the subcommand is missing a required equals sign or an invalid equals sign follows it, the subcommand name is colored red by default.

Keywords. Recognized keywords are colored maroon by default. If, however, the keyword is missing a required equals sign or an invalid equals sign follows it, the keyword is colored red by default.

Keyword values. Recognized keyword values are colored pink by default. User-specified values of keywords such as integers, real numbers, and quoted strings are not color coded.

Comments. Text within a comment is colored gray.

Syntactical Errors. Text associated with the following syntactical errors is colored red by default.

• Unmatched Parentheses, Brackets, and Quotes. Unmatched parentheses and brackets within comments and quoted strings are not detected. Unmatched single or double quotes within quoted strings are syntactically valid.

Certain commands contain blocks of text that are not command syntax--such as BEGIN DATA-END DATA, BEGIN GPL-END GPL, and BEGIN PROGRAM-END PROGRAM. Unmatched values are not detected within such blocks.

• Long lines. Long lines are lines containing more than 251 characters.

• End statements. Several commands require either an END statement prior to the command terminator (for example, BEGIN DATA-END DATA) or require a matching END command at some point later in the command stream (for example, LOOP-END LOOP). In both cases, the command will be colored red, by default, until the required END statement is added.

From the Syntax Editor tab in the Options dialog box, you can change default colors and text styles and you can turn color coding off or on. You can also turn color coding of commands, subcommands, keywords, and keyword values off or on by choosing Tools > Color Coding from the menus. You can turn color coding of syntactical errors off or on by choosing Tools > Validation. Choices made on the Tools menu override settings in the Options dialog box but do not persist across sessions.

Note: Color coding of command syntax within macros is not supported.

Related Topics

Using the Syntax Editor
Syntax Editor Window
Terminology
Auto-Completion
Breakpoints
Bookmarks
Commenting Out Text
Running Command Syntax


Breakpoints

syntax editor,syntax editor,syntax editor
breakpoints,breakpoints,breakpoints
command syntax editor,command syntax editor,command syntax editor
breakpoints,breakpoints,breakpoints

Breakpoints allow you to stop execution of command syntax at specified points within the syntax window and continue execution when ready.

• Breakpoints are set at the level of a command and stop execution prior to running the command.

• Breakpoints cannot occur within LOOP-END LOOP, DO IF-END IF, DO REPEAT-END REPEAT, INPUT PROGRAM-END INPUT PROGRAM, and MATRIX-END MATRIX blocks. They can, however, be set at the beginning of such blocks and will stop execution prior to running the block.

• Breakpoints cannot be set on lines containing non-PASW Statistics command syntax, such as occur within BEGIN PROGRAM-END PROGRAM, BEGIN DATA-END DATA, and BEGIN GPL-END GPL blocks.

• Breakpoints are not saved with the command syntax file and are not included in copied text.

• By default, breakpoints are honored during execution. You can toggle whether breakpoints are honored or not from Tools > Honor Breakpoints.

To Insert a Breakpoint Collapse Hide details

To Insert a Breakpoint

Click anywhere in the gutter to the left of the command text.

or

Position the cursor within the desired command.

From the menus choose:

Tools
Toggle Breakpoint

The breakpoint is represented as a red circle in the gutter to the left of the command text and on the same line as the command name.

Clearing Breakpoints Collapse Hide details

Clearing Breakpoints

To clear a single breakpoint:

Click on the icon representing the breakpoint in the gutter to the left of the command text.

or

Position the cursor within the desired command.

From the menus choose:

Tools
Toggle Breakpoint

To clear all breakpoints:

From the menus choose:

Tools
Clear All Breakpoints

See Running Command Syntax for information about the run-time behavior in the presence of breakpoints.

Related Topics

Using the Syntax Editor
Syntax Editor Window
Terminology
Auto-Completion
Color Coding
Bookmarks
Commenting Out Text
Running Command Syntax


Bookmarks

syntax editor,syntax editor,syntax editor
bookmarks,bookmarks,bookmarks
command syntax editor,command syntax editor,command syntax editor
bookmarks,bookmarks,bookmarks

Bookmarks allow you to quickly navigate to specified positions in a command syntax file. You can have up to 9 bookmarks in a given file. Bookmarks are saved with the file, but are not included when copying text.

To Insert a Bookmark Collapse Hide details

To Insert a Bookmark

Position the cursor on the line where you want to insert the bookmark.

From the menus choose:

Tools
Toggle Bookmark

The new bookmark is assigned the next available number, from 1 to 9. It is represented as a square enclosing the assigned number and displayed in the gutter to the left of the command text.

Clearing Bookmarks Collapse Hide details

Clearing Bookmarks

To clear a single bookmark:

Position the cursor on the line containing the bookmark.

From the menus choose:

Tools
Toggle Bookmark

To clear all bookmarks:

From the menus choose:

Tools
Clear All Bookmarks

Renaming a Bookmark Collapse Hide details

Renaming a Bookmark

You can associate a name with a bookmark. This is in addition to the number (1-9) assigned to the bookmark when it was created.

From the menus choose:

Tools
Rename Bookmark

Enter a name for the bookmark and click OK.

The specified name replaces any existing name for the bookmark.

Navigating with Bookmarks Collapse Hide details

Navigating with Bookmarks

To navigate to the next or previous bookmark:

From the menus choose:

Tools
Next Bookmark

or

Tools
Previous Bookmark

To navigate to a specific bookmark:

From the menus choose:

Tools
Go To Bookmark

Select the desired bookmark.

Related Topics

Using the Syntax Editor
Syntax Editor Window
Terminology
Auto-Completion
Color Coding
Breakpoints
Commenting Out Text
Running Command Syntax


Commenting Out Text

syntax editor,syntax editor,syntax editor
commenting out text,commenting out text,commenting out text
command syntax editor,command syntax editor,command syntax editor
commenting out text,commenting out text,commenting out text

You can comment out entire commands as well as text that is not recognized as command syntax.

Select the desired text. When selecting multiple commands, a command will be commented out if any part of it is selected.

From the menus choose:

Tools
Comment Selection

You can comment out a single command by positioning the cursor anywhere within the command and clicking the Comment Selection button on the toolbar.

Related Topics

Using the Syntax Editor
Syntax Editor Window
Terminology
Auto-Completion
Color Coding
Breakpoints
Bookmarks
Running Command Syntax


Running Command Syntax

command syntax,command syntax,command syntax
running,running,running
syntax,syntax,syntax
running,running,running
syntax,syntax,syntax
command syntax,command syntax,command syntax
syntax editor,syntax editor,syntax editor
breakpoints,breakpoints,breakpoints
command syntax editor,command syntax editor,command syntax editor
breakpoints,breakpoints,breakpoints

Highlight the commands that you want to run in the syntax window.

Click the Run button (the right-pointing triangle) on the Syntax Editor toolbar. It runs the selected commands or the command where the cursor is located if there is no selection.

or

Choose one of the items from the Run menu.

• All. Runs all commands in the syntax window, honoring any breakpoints.

• Selection. Runs the currently selected commands, honoring any breakpoints. This includes any partially highlighted commands. If there is no selection, the command where the cursor is positioned is run.

• To End. Runs all commands starting from the first command in the current selection to the last command in the syntax window, honoring any breakpoints. If nothing is selected, the run starts from the command where the cursor is positioned.

• Step Through. Runs the command syntax one command at a time starting from the first command in the syntax window (Step Through From Start) or from the command where the cursor is positioned (Step Through From Current). If there is selected text, the run starts from the first command in the selection. After a given command has run, the cursor advances to the next command and you continue the step through sequence by choosing Continue.

LOOP-END LOOP, DO IF-END IF, DO REPEAT-END REPEAT, INPUT PROGRAM-END INPUT PROGRAM, and MATRIX-END MATRIX blocks are treated as single commands when using Step Through. You can not step into one of these blocks.

• Continue. Continues a run stopped by a breakpoint or Step Through.

Progress Indicator Collapse Hide details

Progress Indicator

The progress of a given syntax run is indicated with a downward pointing arrow in the gutter, spanning the last set of commands run. For instance, you choose to run all commands in a syntax window that contains breakpoints. At the first breakpoint, the arrow will span the region from the first command in the window to the command prior to the one containing the breakpoint. At the second breakpoint, the arrow will stretch from the command containing the first breakpoint to the command prior to the one containing the second breakpoint.

Run-time Behavior with Breakpoints Collapse Hide details

Run-time Behavior with Breakpoints

• When running command syntax containing breakpoints, execution stops at each breakpoint. Specifically, the block of command syntax from a given breakpoint (or beginning of the run) to the next breakpoint (or end of the run) is submitted for execution exactly as if you had selected that syntax and chosen Run > Selection.

• You can work with multiple syntax windows, each with its own set of breakpoints, but there is only one queue for executing command syntax. Once a block of command syntax has been submitted--such as the block of command syntax up to the first breakpoint--no other block of command syntax will be executed until the previous block has completed, regardless of whether the blocks are in the same or different syntax windows.

• With execution stopped at a breakpoint, you can run command syntax in other syntax windows, and inspect Data Editor or Viewer windows. However, modifying the contents of the syntax window containing the breakpoint or changing the cursor position in that window will cancel the run.

Related Topics

Using the Syntax Editor
Syntax Editor Window
Terminology
Auto-Completion
Color Coding
Breakpoints
Bookmarks
Commenting Out Text


Unicode Syntax Files

Unicode command syntax files,Unicode command syntax files,Unicode command syntax files
syntax,syntax,syntax
Unicode command syntax files,Unicode command syntax files,Unicode command syntax files
local encoding,local encoding,local encoding
command syntax files,command syntax files,command syntax files

In Unicode mode, the default format for saving command syntax files created or modified during the session is also Unicode (UTF-8). Unicode-format command syntax files cannot be read by versions of PASW Statistics prior to 16.0. For more information on Unicode mode, see General Options.

To save a syntax file in a format compatible with earlier releases:

From the syntax window menus, choose:

File
Save As

In the Save As dialog, from the Encoding drop-down list, choose Local Encoding. The local encoding is determined by the current locale. See SET command, LOCALE subcommand for more information.


Multiple Execute Commands

EXECUTE (command),EXECUTE (command),EXECUTE (command)
pasted from dialog boxes,pasted from dialog boxes,pasted from dialog boxes
deleting multiple EXECUTES in syntax files,deleting multiple EXECUTES in syntax files,deleting multiple EXECUTES in syntax files
command syntax,command syntax,command syntax
journal file,journal file,journal file
syntax,syntax,syntax
journal file,journal file,journal file

Syntax pasted from dialog boxes or copied from the log or the journal may contain EXECUTE commands. When you run commands from a syntax window, EXECUTE commands are generally unnecessary and may slow performance, particularly with larger data files, because each EXECUTE command reads the entire data file. For more information, see EXECUTE and Command Order.

Lag Functions

One notable exception is transformation commands that contain lag functions. In a series of transformation commands without any intervening EXECUTE commands or other commands that read the data, lag functions are calculated after all other transformations, regardless of command order. For example,

COMPUTE lagvar=LAG(var1).
COMPUTE var1=var1*2.

and

COMPUTE lagvar=LAG(var1).
EXECUTE.
COMPUTE var1=var1*2.

yield very different results for the value of lagvar, since the former uses the transformed value of var1 while the latter uses the original value.

Related Topics

Variable Names and Variable Labels in Dialog Box Lists
Working with Command Syntax
General Options


Building Charts

charts,charts,charts
chart creation,chart creation,chart creation
Chart Builder,Chart Builder,Chart Builder
charts,charts,charts
Chart Builder,Chart Builder,Chart Builder
creating,creating,creating

The Chart Builder allows you to build charts from predefined gallery charts or from the individual parts (for example, axes and bars). You build a chart by dragging and dropping the gallery charts or basic elements onto the canvas, which is the large area to the right of the Variables list in the Chart Builder dialog box. See Chart Builder Layout and Terms for an illustration of the Chart Builder dialog box.

As you are building the chart, the canvas displays a preview of the chart. Although the preview uses defined variable labels and measurement levels, it does not display your actual data. Instead, it uses randomly generated data to provide a rough sketch of how the chart will look. For information about defined variable labels and measurement levels, see Variable Types .

Using the gallery is the preferred method for new users. For information about using the gallery, see Building a Chart from the Gallery . You can also build a chart from basic elements. See Building a Chart from the Basic Elements for more information. This is a more complex method because the gallery charts have predefined options that you need to define explicitly when building from the basic elements.

How to Start the Chart Builder Collapse Hide details

How to Start the Chart Builder

From the menus choose:

Graphs
Chart Builder

Related Topics

Chart Builder Layout and Terms
Variable Types
Building a Chart from the Gallery
Building a Chart from the Basic Elements
Summarizing Separate Variables
Chart Types
Adding and Editing Grouping Variables
Adding Paneling Variables
Adding and Editing Titles and Footnotes
Removing Elements from the Canvas
Using Favorites
Editing Elements
Setting General Options


Chart Builder Layout and Terms

Chart Builder,Chart Builder,Chart Builder
layout,layout,layout
terms,terms,terms

Canvas

The canvas is the area of the Chart Builder dialog box where you build the chart.

Axis Set

An axis set defines one or more axes in a particular coordinate space (like 2-D rectangular or 1-D polar). Adding a gallery item to the canvas automatically creates an axis set. You can also choose one from the Basic Elements tab. Each axis includes an axis drop zone for dragging and dropping variables. Blue text indicates that the zone still requires a variable. Every chart requires that you add a variable to the x-axis drop zone.

Graphic Elements

The graphic elements are the items in the chart that represent data. These are the bars, points, lines, and so on. In the illustration, the graphic element is a bar.

Variables List

The variables list displays the available variables. If a variable selected in this list is categorical, the Categories list shows the defined categories for the variable. (If you don't see the Categories list, drag the bar that separates the categories and variables lists.) Similarly, you can use the Categories list to view the variables that make up a multiple response set. You can also temporarily change a variable's measurement level by right-clicking its name in the Variables list and choosing one of the measurement levels. For more information about defined categories and measurement levels, see Variable Types.

Drop Zones

Drop zones are the areas on the canvas to which you drag and drop a variable from the Variables list. As noted previously, the basic drop zone is the axis drop zone. Certain gallery charts (like clustered or stacked bar charts) include grouping drop zones. You can also add these drop zones, paneling drop zones, and point-labeling drop zones from the Groups/Point ID tab. The illustration shows a grouping zone that contains Gender as the grouping variable. The categories in this variable control the color of the stack segments, as indicated by the text above the grouping zone.

Related Topics

Building Charts
Variable Types
Building a Chart from the Gallery
Building a Chart from the Basic Elements
Summarizing Separate Variables
Chart Types
Adding and Editing Grouping Variables
Adding Paneling Variables
Adding and Editing Titles and Footnotes
Removing Elements from the Canvas
Using Favorites
Editing Elements
Setting General Options


Variable Types

charts,charts,charts
measurement level,measurement level,measurement level
measurement level,measurement level,measurement level
charts,charts,charts
charts,charts,charts
multiple response sets,multiple response sets,multiple response sets
multiple response sets,multiple response sets,multiple response sets
charts,charts,charts

The Chart Builder distinguishes the different measurement levels and handles the variables differently depending on the measurement level. Furthermore, the Chart Builder can graph multiple response sets, which it treats as a categorical variable. An icon next to each variable in the Variables list identifies the variable type.

Measurement Level | Data Type
 | Numeric | String | Date | Time
Scale (Continuous) |  | n/a |  |
Ordinal |  |  |  |
Nominal |  |  |  |
Multiple response set, multiple categories
Multiple response set, multiple dichotomies

Measurement Level

A variable's measurement level is important when you create a chart. Following is a description of the measurement levels. You can temporarily change the measurement level in the Chart Builder by right-clicking the variable in the Variables list and choosing an option. You can also permanently change a variable's measurement level in the Variable View of the Data Editor. See the topic Variable Measurement Level for more information.

Categorical. Data with a limited number of distinct values or categories (for example, gender or religion). Categorical variables can be string (alphanumeric) or numeric variables that use numeric codes to represent categories (for example, 0 = male and 1 = female). Also referred to as qualitative data. Categorical variables can be either nominal or ordinal:

• Nominal. A variable can be treated as nominal when its values represent categories with no intrinsic ranking (for example, the department of the company in which an employee works). Examples of nominal variables include region, zip code, and religious affiliation.

• Ordinal. A variable can be treated as ordinal when its values represent categories with some intrinsic ranking (for example, levels of service satisfaction from highly dissatisfied to highly satisfied). Examples of ordinal variables include attitude scores representing degree of satisfaction or confidence and preference rating scores.

Scale. Data measured on an interval or ratio scale, where the data values indicate both the order of values and the distance between values. For example, a salary of $72,195 is higher than a salary of $52,398, and the distance between the two values is $19,797. Also referred to as quantitative or continuous data.

Categorical variables define categories in the chart, typically to draw separate graphic elements or to group graphic elements. Scale variables are often summarized within categories of categorical variables. For example, a default chart of income for gender categories would display the mean income for males and the mean income for females. The raw values for scale variables can also be plotted, as in a scatterplot. For example, a scatterplot may show the current salary and beginning salary for each case. A categorical variable could be used to group the cases by gender.

Defined Categories and Labels

A variable's defined categories are displayed in the Categories list and on the canvas when you use the categorical variable in a chart. If the variable has no defined categories, the Categories list and the canvas pane will display two placeholder categories: Category 1 and Category 2.

The defined categories displayed in the Chart Builder are based on value labels, descriptive labels assigned to different data values (for example, numeric values of 0 and 1, with value labels of male and female). You can define value labels in Variable View of the Data Editor or with Define Variable Properties on the Data menu in the Data Editor window.

Multiple Response Sets

Custom Tables and the Chart Builder support a special kind of "variable" called a multiple response set. Multiple response sets aren't really "variables" in the normal sense. You can't see them in the Data Editor, and other procedures don't recognize them. Multiple response sets use multiple variables to record responses to questions where the respondent can give more than one answer. Multiple response sets are treated like categorical variables, and most of the things you can do with categorical variables, you can also do with multiple response sets.

Multiple response sets are constructed from multiple variables in the data file. A multiple response set is a special construct within a data file. You can define and save multiple response sets in PASW Statistics data files, but you cannot import or export multiple response sets from/to other file formats. You can copy multiple response sets from other PASW Statistics data files using Copy Data Properties, which is accessed from the Data menu in the Data Editor window. See the topic Copying Data Properties for more information.

Related Topics

Building Charts
Chart Builder Layout and Terms
Building a Chart from the Gallery
Building a Chart from the Basic Elements
Summarizing Separate Variables
Chart Types
Adding and Editing Grouping Variables
Adding Paneling Variables
Adding and Editing Titles and Footnotes
Removing Elements from the Canvas
Using Favorites
Editing Elements
Setting General Options


Building a Chart from the Gallery

Chart Builder,Chart Builder,Chart Builder
gallery,gallery,gallery

The easiest method for building charts is to use the gallery. Following are general steps for building a chart from the gallery. Refer to Chart Types for information specific to the different chart types.

Click the Gallery tab if it is not already displayed.

In the Choose From list, select a category of charts. Each category offers several types.

Drag the picture of the desired chart onto the canvas. You can also double-click the picture. If the canvas already displays a chart, the gallery chart replaces the axis set and graphic elements on the chart.

Drag variables from the Variables list and drop them into the axis drop zones and, if available, the grouping drop zone. If an axis drop zone already displays a statistic and you want to use that statistic, you do not have to drag a variable into the drop zone. You need to add a variable to a zone only when the text in the zone is blue. If the text is black, the zone already contains a variable or statistic. Refer to Statistics and Parameters for information about the available statistics.

Note: The measurement level of your variables is important. The Chart Builder sets defaults based on the measurement level while you are building the chart. Furthermore, the resulting chart may also look different for different measurement levels. You can temporarily change a variable's measurement level by right-clicking the variable and choosing an option. See the topic Variable Types for more information.

If you need to change statistics or modify attributes of the axes or legends (such as the scale range), click Element Properties. See the topic Editing Elements for more information.

In the Edit Properties Of list, select the item you want to change. (For information about the specific properties, click Help.)

After making any changes, click Apply.

If you need to add more variables to the chart (for example, for clustering or paneling), click the Groups/Point ID tab in the Chart Builder dialog box and select one or more options. Then drag categorical variables to the new drop zones that appear on the canvas. See the topic Adding and Editing Grouping Variables for more information.

If you want to transpose the chart (for example, to make the bars horizontal), click the Basic Elements tab and then click Transpose.

Click OK to create the chart. The chart is displayed in the Viewer.

If you often change many default settings for a specific chart, you may want to save it as a favorite. See the topic Using Favorites for more information.

Related Topics

Building Charts
Chart Builder Layout and Terms
Variable Types
Building a Chart from the Basic Elements
Summarizing Separate Variables
Chart Types
Adding and Editing Grouping Variables
Adding Paneling Variables
Adding and Editing Titles and Footnotes
Removing Elements from the Canvas
Using Favorites
Editing Elements
Setting General Options


Building a Chart from the Basic Elements

Chart Builder,Chart Builder,Chart Builder
basic elements,basic elements,basic elements

You can use the basic elements to build a chart from scratch. Basic elements include axes and graphic elements. These elements are "basic" because you can't create a chart without them. If you are using the Chart Builder for the first time, it is recommended that you use the gallery charts instead. Gallery charts automatically set properties and add features to simplify the creation process.

Click the Basic Elements tab if it is not already displayed.

If the canvas is empty, drag an axis set onto the canvas.

Add a graphic element type by dragging a graphic element onto the canvas. Not all graphic elements can be used with a particular axis set. Only the relevant graphic elements are enabled.

Drag variables from the Variables list and drop them into the axis drop zones and, if available, the grouping drop zone. If an axis drop zone already displays a statistic and you want to use that statistic, you do not have to drag a variable into the drop zone. You need to add a variable to a zone only when the text in the zone is blue. If the text is black, the zone already contains a variable or statistic. Refer to Statistics and Parameters for information about the available statistics.

Note: The measurement level of your variables is important. The Chart Builder sets defaults based on the measurement level while you are building the chart. Furthermore, the resulting chart may also look different for different measurement levels. You can temporarily change a variable's measurement level by right-clicking the variable and choosing an option. See the topic Variable Types for more information.

If you need to change statistics or modify attributes of the axes or legends (such as the scale range), click Element Properties. See the topic Editing Elements for more information.

In the Edit Properties Of list, select the item you want to change. (For information about the specific properties, click Help.)

After making any changes, click Apply.

If you need to add more variables to the chart (for example, for clustering or paneling), click the Groups/Point ID tab in the Chart Builder dialog box and select one or more options. Then drag categorical variables to the new drop zones that appear on the canvas. See the topic Adding and Editing Grouping Variables for more information.

If you want to transpose the chart (for example, to make the bars horizontal), click Transpose.

Click OK to create the chart. The chart is displayed in the Viewer.

If you often create a customized chart, you may want to save it as a favorite chart so you don't have to re-create it from scratch each time. See the topic Using Favorites for more information.

Related Topics

Building Charts
Chart Builder Layout and Terms
Variable Types
Building a Chart from the Gallery
Summarizing Separate Variables
Chart Types
Adding and Editing Grouping Variables
Adding Paneling Variables
Adding and Editing Titles and Footnotes
Removing Elements from the Canvas
Using Favorites
Editing Elements
Setting General Options
Example: Creating a Clustered Bar Chart From Basic Elements


Example: Creating a Clustered Bar Chart From Basic Elements

Following are the steps that you would complete to create a clustered bar chart from the basic elements. It is easier to create the same chart from the gallery because the settings in the gallery chart allow you to skip some steps. The example is intended to demonstrate how you use the basic elements if you need to create a chart that doesn't appear in the gallery.

Add the Axes and Graphic Element

Click the Basic Elements tab.

Drag and drop the Bar icon onto the canvas. Adding the graphic element automatically adds a default axis set.

Add the Variables

Select a categorical (nominal or ordinal) variable from the Variables list and drag it into the x-axis drop zone. The categories in this variable determine the categories that appear on the x axis. Without clustering, one bar would be drawn for each category. With clustering, one cluster of bars will be drawn for each category. The number of bars in each cluster is determined later on when you add the clustering grouping zone.

Select a scale variable from the Variables list and drag it into the y-axis drop zone. Alternatively, you could have kept the default Count statistic if that was desired. Note that the Chart Builder defaults the summary statistic to Mean when you add the scale variable to the y axis. You will change it in this example.

Change the Summary Statistic

Click Element Properties to display the Element Properties dialog box.

Bar1 should be selected in the Edit Properties Of list. If it isn't, select it.

From the Statistic drop-down list, select Median.

Click Apply in the Element Properties dialog box.

Add Clustering

Click the Groups/Point ID tab.

Select Cluster on X. Note that a new drop zone appears on the canvas.

Drag a categorical variable from the Variables list to the Cluster zone. In each cluster, one bar will be drawn for each category in the variable. Depending on your style cycle preference, each bar is distinguished by color or pattern. You can change this specific instance by double-clicking the grouping zone. To change the default, choose Options from the Edit menu in the Data Editor. Then click the Charts tab and modify the Style Cycle Preference setting.

Finish

Click OK in the Chart Builder dialog box to create the clustered bar chart that you specified.

Related Topics

Building a Chart from the Basic Elements


Summarizing Separate Variables

Chart Builder,Chart Builder,Chart Builder
summaries of separate variables,summaries of separate variables,summaries of separate variables
summaries of separate variables charts,summaries of separate variables charts,summaries of separate variables charts
separate variables charts,separate variables charts,separate variables charts
charts,charts,charts
separate variables,separate variables,separate variables
summaries of separate variables,summaries of separate variables,summaries of separate variables

You can use the Chart Builder to create charts that summarize and compare multiple variables. For example, if sales data for each year are recorded in a separate variable, you can create a single chart that summarizes sales data for each year in a separate bar.

How to Create a Chart that Summarizes Multiple Variables Collapse Hide details

How to Create a Chart that Summarizes Multiple Variables

Note: Not all chart types support summaries of separate variables as described in this topic. You cannot create summaries of separate variables for histograms, population pyramids, boxplots, and dual axis charts. High-low-close charts summarize separate variables, but these charts have separate zones for each variable. See the topic High-Low Charts for more information.

Drag a gallery chart or a graphic element onto the canvas.

Drag one of the scale variables that you want to summarize to the y axis.

Drag another scale variable to the top section of the y-axis drop zone. Drop the variable when you see the plus sign (+) in the drop zone. The Create Summary Group dialog box then appears.

Note: If the gallery chart contains a point element, the previous action will create an overlay scatterplot. See the topic Scatterplots and Dot Plots for more information. To create summaries of separate variables for a point element, you must first drag a categorical variable to the x axis.

When you summarize multiple variables, the Chart Builder creates a new variable whose categories are the individual variables. This "summary group" variable is put on the x axis and is displayed as INDEX. The y axis displays the summarized value for each variable. The Chart Builder uses an asterisk (*) to indicate any of these constructed variables. Note that you can move the INDEX variable to a paneling or grouping zone if desired. It acts like a categorical variable.

Click OK to create the summary group variable.

If necessary, drag additional variables to the y-axis drop zone.

As with any chart, you can edit the individual elements. For example, you could choose the median as the statistic for each variable, or you could change the scale for one of the axes. See the topic Editing Elements for more information.

How to Remove a Variable from the Summary Group Collapse Hide details

How to Remove a Variable from the Summary Group

Because the summary group variable acts like a categorical variable, you delete a variable from the summary group in the same way that you delete a category from a categorical axis or grouping zone.

Click Element Properties if the Element Properties dialog box is not displayed.

In the Edit Properties Of list, select the axis or group in which the summary group variable appears.

In the Categories group, select the variable and click the delete button.

Click Apply.

You can also right-click the drop zone in which the summary group variable appears and choose Delete Variable from the context menu.

Related Topics

Building Charts
Chart Builder Layout and Terms
Variable Types
Building a Chart from the Gallery
Building a Chart from the Basic Elements
Chart Types
Adding and Editing Grouping Variables
Adding Paneling Variables
Adding and Editing Titles and Footnotes
Removing Elements from the Canvas
Using Favorites
Editing Elements
Setting General Options


Chart Types

The gallery contains a collection of the most commonly used charts. These include:

• Bar charts: Simple, stacked, clustered, 3-D, and error bar. See the topic Bar Charts for more information.

• Line charts: Simple and grouped (multi-line). See the topic Line Charts for more information.

• Area charts: Simple and stacked. See the topic Area Charts for more information.

• Pie charts: Simple. See the topic Pie Charts for more information.

• Scatterplots and dot plots: 1-D, simple, grouped, overlay, and 3-D scatterplots; summary point plots, 1-D dot plots, and drop-line charts. See the topic Scatterplots and Dot Plots for more information.

• Histograms: Simple, stacked, frequency polygons, and population pyramids. See the topic Histograms for more information.

• High-Low charts: High-low-close, range bar, clustered range bar, and difference area. See the topic High-Low Charts for more information.

• Boxplots: Simple and clustered. See the topic Boxplots for more information.

• Dual y-axis charts: Simple. See the topic Dual y-axis Charts for more information.

Related Topics

Building Charts
Chart Builder Layout and Terms
Variable Types
Building a Chart from the Gallery
Building a Chart from the Basic Elements
Summarizing Separate Variables
Adding and Editing Grouping Variables
Adding Paneling Variables
Adding and Editing Titles and Footnotes
Removing Elements from the Canvas
Using Favorites
Editing Elements
Setting General Options


Bar Charts

bar charts,bar charts,bar charts
column charts,column charts,column charts
stacked bar charts,stacked bar charts,stacked bar charts
clustered bar charts,clustered bar charts,clustered bar charts
3-D bar charts,3-D bar charts,3-D bar charts
error bar charts,error bar charts,error bar charts
charts,charts,charts
bar,bar,bar
column,column,column
error bar,error bar,error bar

Bar charts are useful for summarizing categorical variables. For example, you can use a bar chart to show the number of men and the number of women who participated in a survey, or you can use a bar chart to show the mean salary for men and the mean salary for women.

How to Create a Simple Bar Chart Collapse Hide details

How to Create a Simple Bar Chart

In the Chart Builder, click the Gallery tab and select Bar in the Choose From list.

Drag the Simple Bar icon onto the canvas.

Drag a categorical (nominal or ordinal) variable to the x-axis drop zone. You can use a scale variable, but the results will be useful in only a few special cases. A bar chart looks best with a limited number of distinct values. If you create a bar chart with a scale x axis, the bars will be very skinny because each bar is drawn at an exact value, and the bar cannot overlap other continuous values.

Specify a statistic in the Element Properties dialog box. The result of any statistic determines the height of the bars. If the statistic you want does not appear in the Statistic list, it may require a variable. Drag a scale variable to the y-axis drop zone and check if the statistic is now available. There may be other chart type limitations. For example, error bar charts can be calculated only for specific statistics.

How to Create a 3-D Bar Chart Collapse Hide details

How to Create a 3-D Bar Chart

In the Chart Builder, click the Gallery tab and select Bar in the Choose From list.

Drag the Simple 3-D Bar icon onto the canvas.

Drag categorical (nominal or ordinal) variables to the x- and z-axis drop zones.

Specify a statistic in the Element Properties dialog box. The result of any statistic determines the height of the bars. If the statistic you want does not appear in the Statistic drop-down list, it may require a variable. Drag a scale variable to the y-axis drop zone and check if the statistic is now available. There may be other chart type limitations. For example, error bar charts can be calculated only for specific statistics.

Additional Features Collapse Hide details

Additional Features

Clustering and Stacking. Clustering and stacking add dimensionality within the chart. Clustering splits one bar into multiple bars, and stacking creates segments in each bar. Be careful that you choose the right statistic for stacking. When the values are added together (stacked), the result must make sense. For example, adding and stacking mean (averaged) values is not usually meaningful. For more information about specifying stacking and clustering, see Adding and Editing Grouping Variables. The gallery also provides options for these charts.

Paneling. Paneling creates a table of charts, with a cell for each category in the paneling variable. See the topic Adding Paneling Variables for more information.

Related Topics

Line Charts
Area Charts
Pie Charts
Scatterplots and Dot Plots
Histograms
High-Low Charts
Boxplots
Dual y-axis Charts


Line Charts

line charts,line charts,line charts
grouped line charts,grouped line charts,grouped line charts
multi-line charts,multi-line charts,multi-line charts
charts,charts,charts
line,line,line

You can use a line chart to summarize categorical variables, in which case it is similar to a bar chart (see Bar Charts). Line charts are also useful for time-series data.

How to Create a Simple Time-Series Line Chart Collapse Hide details

How to Create a Simple Time-Series Line Chart

In the Chart Builder, click the Gallery tab and select Line in the Choose From list.

Drag the Simple Line icon onto the canvas.

Drag a date variable to the x-axis drop zone.

Drag a scale variable to the y-axis drop zone. This is the variable whose values were recorded over time.

Additional Features Collapse Hide details

Additional Features

Grouping. You can specify a categorical variable for splitting the line into groups. This multi-line chart is useful for comparing the values of the groups. For more information about grouping, see Adding and Editing Grouping Variables. The gallery also provides grouped line charts.

Paneling. Paneling creates a table of charts, with a cell for each category in the paneling variable. See the topic Adding Paneling Variables for more information.

Related Topics

Bar Charts
Area Charts
Pie Charts
Scatterplots and Dot Plots
Histograms
High-Low Charts
Boxplots
Dual y-axis Charts


Area Charts

area charts,area charts,area charts
stacked area charts,stacked area charts,stacked area charts
charts,charts,charts
area,area,area

Area charts share features with bar charts and line charts. Like bar charts, they can be used to summarize categorical data. Like line charts, they can be used for time-series data. The decision to use an area chart over the other options is mostly a cosmetic one.

How to Create a Simple Area Chart Collapse Hide details

How to Create a Simple Area Chart

In the Chart Builder, click the Gallery tab and select Area in the Choose From list.

Drag the Simple Area icon onto the canvas.

Drag a variable to the x-axis drop zone. You can use a scale or categorical (nominal or ordinal) variable.

If necessary, specify a statistic in the Element Properties dialog box. The result of any statistic determines the height of the bars. If the statistic you want does not appear in the Statistic drop-down list, it may require a variable. Drag a scale variable to the y-axis drop zone and check if the statistic is now available.

Additional Features Collapse Hide details

Additional Features

Stacking. Stacking adds dimensionality within the chart. Stacking creates segments in the area. Be careful that you choose the right statistic. When the values are added together (stacked), the result must make sense. For example, adding and stacking mean (averaged) values is not usually meaningful. For more information about specifying stacking and clustering, see Adding and Editing Grouping Variables. The gallery also provides options for a stacked area chart.

Paneling. Paneling creates a table of charts, with a cell for each category in the paneling variable. See the topic Adding Paneling Variables for more information.

Related Topics

Bar Charts
Line Charts
Pie Charts
Scatterplots and Dot Plots
Histograms
High-Low Charts
Boxplots
Dual y-axis Charts


Pie Charts

pie charts,pie charts,pie charts
charts,charts,charts
pie,pie,pie

A pie chart is useful for comparing proportions. For example, you may use a pie chart to demonstrate that a greater proportion of women are enrolled in a certain class.

How to Create a Simple Pie Chart Collapse Hide details

How to Create a Simple Pie Chart

In the Chart Builder, click the Gallery tab and select Pie/Polar in the Choose From list.

Drag the Pie Chart icon onto the canvas.

Drag a categorical (nominal or ordinal) variable to the Slice By drop zone. The categories in this variable determine the number of slices in the pie chart.

Specify a statistic in the Element Properties dialog box. For pie charts, you typically want a count-based statistic or a sum. The result of the statistic determines the size of each slice. If the statistic you want does not appear in the Statistic list, it may require a variable. Drag a scale variable to the Angle Variable drop zone and check if the statistic is now available.

Additional Features Collapse Hide details

Additional Features

Paneling. Paneling creates a table of charts, with a cell for each category in the paneling variable. See the topic Adding Paneling Variables for more information.

Related Topics

Bar Charts
Line Charts
Area Charts
Scatterplots and Dot Plots
Histograms
High-Low Charts
Boxplots
Dual y-axis Charts


Scatterplots and Dot Plots

line charts,line charts,line charts
drop-line,drop-line,drop-line
drop-line charts,drop-line charts,drop-line charts
scatterplots,scatterplots,scatterplots
scatterplots,scatterplots,scatterplots
simple,simple,simple
3-D,3-D,3-D
grouped,grouped,grouped
matrix,matrix,matrix
overlay,overlay,overlay
1-D,1-D,1-D
dot plots,dot plots,dot plots
3-D scatterplots,3-D scatterplots,3-D scatterplots
grouped scatterplots,grouped scatterplots,grouped scatterplots
overlay scatterplots,overlay scatterplots,overlay scatterplots
matrix scatterplots,matrix scatterplots,matrix scatterplots
SPLOMs,SPLOMs,SPLOMs
summary point plot,summary point plot,summary point plot
charts,charts,charts
dot plot,dot plot,dot plot
scatterplot,scatterplot,scatterplot
drop-line,drop-line,drop-line
summary point plot,summary point plot,summary point plot

There are several broad categories of charts created with the point graphic element:

• Scatterplots. These are useful for plotting multivariate data. They can help you determine potential relationships among scale variables. A simple scatterplot uses a 2-D coordinate system to plot two variables. A 3-D scatterplot uses a 3-D coordinate system to plot three variables. When you need to plot more variables, you can try overlay scatterplots and scatterplot matrices (SPLOMs). An overlay scatterplot displays overlaid pairs of x-y variables, with each pair distinguished by color or shape. A SPLOM creates a matrix of 2-D scatterplots, with each variable plotted against every other variable in the SPLOM.

• Dot plots. Like histograms, these are useful for showing the distribution of a single scale variable. The data are binned, but, instead of one value for each bin (like a count), all of the points in each bin are displayed and stacked. These graphs are sometimes called density plots.

• Summary point plots. These are just like a bar chart, except that points are displayed where the top of the bars would have appeared. Because the summary point plot is so similar to a bar chart, refer to Bar Charts for information about creating it.

• Drop-line charts. These are a special type of summary point plot. The points are grouped and a line is drawn through the points in each category. The drop-line chart is useful for comparing a statistic across categorical variables.

How to Create a Simple Scatterplot Collapse Hide details

How to Create a Simple Scatterplot

In the Chart Builder, click the Gallery tab and select Scatter/Dot in the Choose From list.

Drag the Simple Scatter icon onto the canvas.

Drag a scale variable to the x-axis drop zone.

Drag another scale variable to the y-axis drop zone. There is no need to specify a statistic, because scatterplots typically display raw values.

How to Create an Overlay Scatterplot Collapse Hide details

How to Create an Overlay Scatterplot

In the Chart Builder, click the Gallery tab and select Scatter/Dot in the Choose From list.

Drag the Simple Scatter icon onto the canvas.

Drag a scale variable to the x-axis drop zone.

Drag multiple scale variables to the y-axis drop zone. You can select multiple variables by holding down the Ctrl key while selecting each variable.

The last action creates pairs of variables that are drawn as a group. The variable on the x axis is paired with each variable on the y axis. To edit the pairs, open the Element Properties dialog box and select Point1 in the Edit Properties Of list. You can also continue to add more variables to the y axis.

How to Create a Scatterplot Matrix Collapse Hide details

How to Create a Scatterplot Matrix

In the Chart Builder, click the Gallery tab and select Scatter/Dot in the Choose From list.

Drag the Scatterplot Matrix icon onto the canvas.

Drag multiple scale variables to the Scattermatrix drop zone.

Each variable in the drop zone is plotted against every other variable to create a matrix of individual scatterplots. To edit the variables, open the Element Properties dialog box and select Scattermatrix1 in the Edit Properties Of list.

How to Create a Simple Dot Plot Collapse Hide details

How to Create a Simple Dot Plot

In the Chart Builder, click the Gallery tab and select Scatter/Dot in the Choose From list.

Drag the Simple Dot Plot icon onto the canvas.

Drag a scale variable to the x-axis drop zone.

Note: The "statistic" for a dot plot is Dot Plot. You cannot change this.

How to Create a Drop-Line Chart Collapse Hide details

How to Create a Drop-Line Chart

In the Chart Builder, click the Gallery tab and select Scatter/Dot in the Choose From list.

Drag the Drop-line icon onto the canvas.

Drag a categorical variable to the x axis.

Drag another categorical variable to the Set Color grouping zone.

Specify a statistic in the Element Properties dialog box. The result of any statistic determines the position of the point for each combination of categories. A line connects the lowest and highest point in each x-axis category. If the statistic you want does not appear in the Statistic list, it may require a variable. Drag a scale variable to the y-axis drop zone and check if the statistic is now available.

Additional Features Collapse Hide details

Additional Features

Point ID. You can use a variable for labeling the points. Click the Groups/Point ID tab and select Point ID Label. This action adds a new drop zone to the canvas. Drag the variable you want to use for labeling to the new drop zone.

Grouping. You can specify a categorical variable for creating groups of points. This is useful for comparing the values of the groups. For more information about grouping, see Adding and Editing Grouping Variables. The gallery also provides grouped scatterplots and dot plots. Grouping is not available for overlay scatterplots because the variable pairs are already groups.

Paneling. Paneling creates a table of charts, with a cell for each category in the paneling variable. See the topic Adding Paneling Variables for more information.

Related Topics

Bar Charts
Line Charts
Area Charts
Pie Charts
Histograms
High-Low Charts
Boxplots
Dual y-axis Charts


Histograms

population pyramids,population pyramids,population pyramids
histograms,histograms,histograms
frequency polygons,frequency polygons,frequency polygons
charts,charts,charts
histogram,histogram,histogram
frequency polygon,frequency polygon,frequency polygon
population pyramid,population pyramid,population pyramid

Histograms are useful for showing the distribution of a single scale variable. Data are binned and summarized using a count or percentage statistic. A variation of a histogram is a frequency polygon, which is like a typical histogram except that the area graphic element is used instead of the bar graphic element.

Another variation of the histogram is the population pyramid. Its name is derived from its most common use: summarizing population data. When used with population data, it is split by gender to provide two back-to-back, horizontal histograms of age data. In countries with a young population, the shape of the resulting graph resembles a pyramid.

How to Create a Histogram Collapse Hide details

How to Create a Histogram

In the Chart Builder, click the Gallery tab and select Histogram in the Choose From list.

Drag the Simple Histogram icon onto the canvas.

Drag a scale variable to the x-axis drop zone.

Note: The statistic for a histogram is Histogram or Histogram Percent. These statistics bin the data and calculate a count for each bin. If you change the statistic, the chart will no longer be a histogram.

How to Create a Population Pyramid Collapse Hide details

How to Create a Population Pyramid

In the Chart Builder, click the Gallery tab and select Histogram in the Choose From list.

Drag the Population Pyramid icon onto the canvas.

Drag a variable to the Distribution Variable drop zone. The measurement level of the variable is typically scale, in which case the scale values are binned and counts are calculated for each bin. However, you can use a categorical variable, in which case counts are calculated for each category. If the data are already preaggregated with a variable that contains the counts, be sure to weight the data by the count variable before creating the chart.

Drag a categorical variable to the Split Variable drop zone. Although it is possible to use a split variable with many categories, it is recommend to use a variable like gender that has only two categories. The split variable acts as a paneling variable in that it creates multiple graphs.

Additional Features Collapse Hide details

Additional Features

Stacking. Stacking adds dimensionality within the chart. Stacking creates segments in each bar. For more information about specifying stacking, see Adding and Editing Grouping Variables. The gallery also provides an option for a stacked histogram.

Paneling. Paneling creates a table of charts, with a cell for each category in the paneling variable. See the topic Adding Paneling Variables for more information.

Related Topics

Bar Charts
Line Charts
Area Charts
Pie Charts
Scatterplots and Dot Plots
High-Low Charts
Boxplots
Dual y-axis Charts


High-Low Charts

high-low-close charts,high-low-close charts,high-low-close charts
range bar charts,range bar charts,range bar charts
difference area charts,difference area charts,difference area charts
charts,charts,charts
high-low-close charts,high-low-close charts,high-low-close charts
range bar charts,range bar charts,range bar charts
difference area charts,difference area charts,difference area charts

The category of high-low charts encompasses all those charts for which a range of data is displayed between two values.

• Range bar and high-low-close charts. A range bar is the simplest of these charts, with a bar drawn between the low and high variables. In a high-low-close chart, an additional value—the close—is displayed. The close value is always optional, so it's easy to switch from a range bar chart to a high-low-close chart in the Chart Builder.

• Difference area chart. This is a variation of the range bar chart, except that it uses color to show which of the variables is greater at any point. When you create the chart, you specify two variables, neither of which is explicitly defined as the "low" or "high." If you are certain that the "low" value is always less than the "high" value, there is no need to use a difference area chart except for cosmetic reasons.

How to Create a Simple Range Bar Chart Collapse Hide details

How to Create a Simple Range Bar Chart

In the Chart Builder, click the Gallery tab and select High-Low in the Choose From list.

Drag the Simple Range Bar icon onto the canvas.

Drag a categorical (nominal or ordinal) variable to the x-axis drop zone.

Drag a scale variable to the Low Variable drop zone.

Drag a scale variable to the High Variable drop zone.

Specify statistics in the Element Properties dialog box by selecting High-Low-Close in the Edit Properties Of list. The result of one statistic determines the bottom of the bars, and the other determines the top. You can choose different statistics for each variable.

Note: Dragging a variable into the Close Variable drop zone is not required, so you do not need to specify a statistic for this drop zone.

How to Create a High-Low-Close Chart Collapse Hide details

How to Create a High-Low-Close Chart

In the Chart Builder, click the Gallery tab and select High-Low in the Choose From list.

Drag the High-Low-Close icon onto the canvas.

Drag a categorical variable to the x-axis drop zone.

Drag a scale variable to the Low Variable drop zone.

Drag a scale variable to the High Variable drop zone.

Drag a scale variable to the Close Variable drop zone. The values of the Close variable should be in the inclusive range between the Low and High variables.

Specify statistics in the Element Properties dialog box by selecting High-Low-Close in the Edit Properties Of list. The result of one statistic determines the bottom of the bars, and the other determines the top. You can choose different statistics for each variable.

Note: A high-low-close chart is typically drawn with I-beam shaped bars for the high/low values and a circle for the close value. You can change the shape of these elements in the Element Properties dialog box.

How to Create a Difference Area Chart Collapse Hide details

How to Create a Difference Area Chart

In the Chart Builder, click the Gallery tab and select High-Low in the Choose From list.

Drag the Difference Area icon onto the canvas.

Drag a categorical variable to the x-axis drop zone.

Drag a scale variable to each of the y-axis drop zones.

Specify statistics in the Element Properties dialog box by selecting Difference Area in the Edit Properties Of list. The result of one statistic determines the bottom of the area, and the other determines the top. The color changes when one variable statistic is greater than the other. You can choose different statistics for each variable.

Additional Features Collapse Hide details

Additional Features

Clustering. Clustering adds dimensionality within the chart. You cannot cluster a difference area chart, but you can cluster a range bar chart or a high-low-close chart. Clustering splits one bar into multiple bars. For more information about specifying clustering, see Adding and Editing Grouping Variables. The gallery also provides options for these charts.

Paneling. Paneling creates a table of charts, with a cell for each category in the paneling variable. See the topic Adding Paneling Variables for more information.

Related Topics

Bar Charts
Line Charts
Area Charts
Pie Charts
Scatterplots and Dot Plots
Histograms
Boxplots
Dual y-axis Charts


Boxplots

boxplots,boxplots,boxplots
charts,charts,charts
boxplot,boxplot,boxplot

A boxplot shows the five statistics (minimum, first quartile, median, third quartile, and maximum). It is useful for displaying the distribution of a scale variable and pinpointing outliers. You can create a 2-D boxplot that is summarized for each category in a categorical variable, or you can create a 1-D boxplot that is summarized for all cases in the data.

How to Create a Simple 2-D Boxplot Collapse Hide details

How to Create a Simple 2-D Boxplot

In the Chart Builder, click the Gallery tab and select Boxplot in the Choose From list.

Drag the Simple 2-D Boxplot icon onto the canvas.

Drag a categorical (nominal or ordinal) variable to the x-axis drop zone.

Drag a scale variable to the y-axis drop zone.

Note: The "statistic" for a dot plot is Boxplot. You cannot change this.

How to Create a Simple 1-D Boxplot Collapse Hide details

How to Create a Simple 1-D Boxplot

In the Chart Builder, click the Gallery tab and select Boxplot in the Choose From list.

Drag the Simple 1-D Boxplot icon onto the canvas.

Drag a scale variable to the x-axis drop zone.

Note: The "statistic" for a dot plot is Boxplot. You cannot change this.

Additional Features Collapse Hide details

Additional Features

Point ID. By default, the outliers in the boxplot are labeled with the case number. To use a different variable, click the Groups/Point ID tab and select Point ID Label. This action adds a new drop zone to the canvas. Drag the variable you want to use for labeling to the new drop zone.

Clustering. Clustering adds dimensionality within the chart. Clustering splits each box into multiple boxes. For more information about specifying clustering, see Adding and Editing Grouping Variables. The gallery also provides options for these charts.

Paneling. Paneling creates a table of charts, with a cell for each category in the paneling variable. See the topic Adding Paneling Variables for more information.

Related Topics

Bar Charts
Line Charts
Area Charts
Pie Charts
Scatterplots and Dot Plots
Histograms
High-Low Charts
Dual y-axis Charts


Dual y-axis Charts

dual-axis charts,dual-axis charts,dual-axis charts
dual y-axis charts,dual y-axis charts,dual y-axis charts
multiple-axis charts,multiple-axis charts,multiple-axis charts
charts,charts,charts
dual y-axis,dual y-axis,dual y-axis
multiple-axis,multiple-axis,multiple-axis

A dual y-axis chart allows you to summarize or plot two y-axis variables that have different domains. For example, you can plot the number of cases on one axis and the mean salary on another. This chart can also be a mix of different graphic elements so that the dual y-axis chart encompasses several of the different chart types discussed previously. It may display the counts as a line and the mean of each category as a bar.

How to Create a Dual y-axis Chart with a Categorical x Axis Collapse Hide details

How to Create a Dual y-axis Chart with a Categorical x Axis

Note: The gallery includes samples of dual y-axis charts. The following steps use the basic elements so that you can generalize the steps for other varieties of dual axis charts.

In the Chart Builder, click the Basic Elements tab.

Drag the Dual y-axes icon onto the canvas.

Drag the Bar icon onto the canvas. The first graphic element that you add to the canvas is used for the variable on the first y axis, which is the one on the left.

Drag the Line icon onto the canvas. The second graphic element is used for the variable on the second y axis, which is the one on the right.

Note: It is not required to use a bar and a line. You can use other graphic elements, but not all graphic elements are available in a dual y-axis chart.

Drag a categorical variable to the x-axis drop zone. Both y axes default to Count. We will keep count as the statistic on the right-hand y axis.

Drag a scale variable to the left-hand y axis. The statistic defaults to mean.

The resulting graph will display bars for the mean of the scale variable and a line for the count in each category. Note that you can use Element Properties to change the order in which the elements are drawn. For example, if the line were the first element, it may have been drawn behind the bars. You can use the Element Properties dialog box to ensure that the line is drawn last, on top of the bars. See the topic Editing Graphic Element Properties for more information.

Additional Features Collapse Hide details

Additional Features

Paneling. Paneling creates a table of charts, with a cell for each category in the paneling variable. See the topic Adding Paneling Variables for more information.

Related Topics

Bar Charts
Line Charts
Area Charts
Pie Charts
Scatterplots and Dot Plots
Histograms
High-Low Charts
Boxplots


Adding and Editing Grouping Variables

clustered charts,clustered charts,clustered charts
stacked charts,stacked charts,stacked charts
grouped charts,grouped charts,grouped charts
charts,charts,charts
grouped,grouped,grouped
clustered,clustered,clustered
stacked,stacked,stacked

To include more information in your chart, you may want to:

• Cluster or stack graphic elements. An example is a clustered bar chart.

• Vary the color, shape, or pattern of the graphic elements depending on the value of another variable. An example is a grouped scatterplot, with the color of the points in the scatterplot corresponding to categorical values.

You perform these actions by adding a grouping zone to the chart. The grouping zone adds another dimension of information to the chart and requires a variable. Like other drop zones, you drag and drop a variable into the grouping zone. The grouping zone variable's values control how the grouping affects the graphic elements in the chart. For example, if you are using the grouping zone to cluster bars in a bar chart, the grouping zone variable's categories determine the number of bars in each cluster.

How to Add a Grouping Variable Collapse Hide details

How to Add a Grouping Variable

Select the Groups/Point ID tab.

Select an option for adding a clustering or grouping variable. Different options are enabled depending on the axis set and graphic element.

Drag a variable into the new grouping drop zone that appears on the canvas.

How to Delete an Existing Grouping Zone Collapse Hide details

How to Delete an Existing Grouping Zone

Select the Groups/Point ID tab.

Deselect the option for the clustering or grouping variable.

How to Edit an Existing Grouping Zone Collapse Hide details

How to Edit an Existing Grouping Zone

Right-click the grouping drop zone on the canvas and select Edit Grouping Zone. You can also double-click the zone.

Use the Grouping Zone dialog box to select the attribute controlled by the variable in the drop zone and—if available—the graphic element arrangement associated with the drop zone.

You can also modify the categories in the grouping zone (for example, to change the order of the categories). See the topic Editing Grouping Zone Categories for more information.

Using the Grouping Zone Dialog Box Collapse Hide details

Using the Grouping Zone Dialog Box

Distinguish Groups by. Select an aesthetic that specifies how the variable in the grouping zone is used to distinguish each graphic element. For example, if you are adding clustering, you might use Color to create a different colored bar for each category in the grouping variable.

• Color. Use the values of the variable in the grouping zone to vary the color of the graphic elements. For example, if you were creating a stacked bar chart, you may want to vary the color of the stack segments by the categories in another variable.

• Pattern. Use the values of the variable in the grouping zone to vary the pattern or shape of the graphic elements. This option has effects similar to fill color, but it might be a better option for black and white printing.

Arrangement. Select an arrangement for the graphic elements in the zone. You typically need to specify an arrangement only to identify clustering or stacking. Arrangements are not available for all graphic element types. If no option is available, you can ignore this control.

Related Topics

Building Charts
Chart Builder Layout and Terms
Variable Types
Building a Chart from the Gallery
Building a Chart from the Basic Elements
Summarizing Separate Variables
Chart Types
Adding Paneling Variables
Adding and Editing Titles and Footnotes
Removing Elements from the Canvas
Using Favorites
Editing Elements
Setting General Options


Adding Paneling Variables

paneling,paneling,paneling
faceting,faceting,faceting
charts,charts,charts
paneling,paneling,paneling

Paneling (also known as faceting) creates a table of graphs. The rows and columns in the table are determined by categorical variables. Like grouping, paneling essentially adds more dimensions to your chart.

How to Add a Paneling Variable Collapse Hide details

How to Add a Paneling Variable

Click the Groups/Point ID tab.

Select Rows panel variable and/or Columns panel variable.

Drag a variable into the new drop zone that appears on the canvas.

If the panels in the resulting chart are very small, you may want to enlarge the chart or specify that the panel rows can be wrapped. See the topic Setting General Options for more information.

You can also modify the categories in the paneling zone (for example, to change the order of the categories). See the topic Editing Paneling Zone Categories for more information.

How to Remove a Paneling Variable Collapse Hide details

How to Remove a Paneling Variable

Click the Groups/Point ID tab.

Deselect the option for the paneling variable.

Related Topics

Building Charts
Chart Builder Layout and Terms
Variable Types
Building a Chart from the Gallery
Building a Chart from the Basic Elements
Summarizing Separate Variables
Chart Types
Adding and Editing Grouping Variables
Adding and Editing Titles and Footnotes
Removing Elements from the Canvas
Using Favorites
Editing Elements
Setting General Options


Adding and Editing Titles and Footnotes

titles,titles,titles
charts,charts,charts
subtitles,subtitles,subtitles
charts,charts,charts
footnotes,footnotes,footnotes
charts,charts,charts

You can add titles and footnotes to the chart to help a viewer interpret it. The Chart Builder also automatically displays error bar information in the footnotes.

How to Add Titles and Footnotes Collapse Hide details

How to Add Titles and Footnotes

Click the Titles/Footnotes tab.

Select one or more titles and footnotes. The canvas displays some text to indicate that these were added to the chart.

Use the Element Properties dialog box to edit the title/footnote text.

How to Remove a Title or Footnote Collapse Hide details

How to Remove a Title or Footnote

Click the Titles/Footnotes tab.

Deselect the title or footnote that you want to remove.

How to Edit the Title or Footnote Text Collapse Hide details

How to Edit the Title or Footnote Text

When you add titles and footnotes, you cannot edit their associated text directly on the chart. As with other items in the Chart Builder, you edit them using the Element Properties dialog box.

Click Element Properties if the Element Properties dialog box is not displayed.

In the Edit Properties Of list, select a title, subtitle, or footnote (for example, Title 1).

In the content box, type the text associated with the title, subtitle, or footnote.

Click Apply.

You can use special codes in the title or footnote text to include the current date and time. When the chart is created, the code is converted to the result specified in the following table:

Date/Time Codes
Code | Result | Example
@@current_date@@ | Current date, in YYYY-MM-DD format | 2006-08-31
@@current_time@@ | Current time, in HH:MM:SS format | 13:03:46
@@current_YYYY@@ | Current year, in YYYY format | 2006
@@current_YY@@ | Current year, in YY format | 06
@@current_month@@ | Current month (01-12) | 08
@@current_monthname@@ | Current month, full name | August
@@current_weekday@@ | Current weekday, full name | Thursday
@@current_day@@ | Current day of the month (01-31) | 31
@@current_hour@@ | Current hour (01-12) | 01
@@current_hour24@@ | Current hour (00-23) | 13
@@current_min@@ | Current minute (00-59) | 03
@@current_sec@@ | Current second (00-59) | 46
@@current_ampm@@ | a.m. or p.m. | p.m.

Related Topics

Building Charts
Chart Builder Layout and Terms
Variable Types
Building a Chart from the Gallery
Building a Chart from the Basic Elements
Summarizing Separate Variables
Chart Types
Adding and Editing Grouping Variables
Adding Paneling Variables
Removing Elements from the Canvas
Using Favorites
Editing Elements
Setting General Options
Editing Graphic Element Properties
Editing Axis Properties
Editing Grouping Zone Categories
Editing Paneling Zone Categories


Removing Elements from the Canvas

Chart Builder,Chart Builder,Chart Builder
remove elements,remove elements,remove elements

There are various ways to remove elements on the canvas. The following steps describe the easiest method for removing various types of elements.

How to Delete a Graphic Element, Title, or Footnote Collapse Hide details

How to Delete a Graphic Element, Title, or Footnote

Click Element Properties.

In the Edit Properties Of list, select the graphic element, title, or footnote that you want to delete.

Click the delete button to the right of the list.

Click Apply.

How to Delete a Grouping Zone Collapse Hide details

How to Delete a Grouping Zone

Right-click the grouping zone and select Delete Grouping Zone.

or

Click the grouping zone and press Delete.

How to Remove a Variable from an Axis Zone Collapse Hide details

How to Remove a Variable from an Axis Zone

Click the variable in the axis drop zone.

Press the delete key. You can also drag the variable back into the Variables list.

Related Topics

Building Charts
Chart Builder Layout and Terms
Variable Types
Building a Chart from the Gallery
Building a Chart from the Basic Elements
Summarizing Separate Variables
Chart Types
Adding and Editing Grouping Variables
Adding Paneling Variables
Adding and Editing Titles and Footnotes
Using Favorites
Editing Elements
Setting General Options


Using Favorites

Chart Builder,Chart Builder,Chart Builder
favorites,favorites,favorites

You can save all the settings associated with a chart so that you don't have change the defaults each time you create a particular chart. Everything that you can modify with the Chart Builder is saved with the favorite, including statistics and axis properties such as the range. Variables are not saved in the favorite. The favorite is available until you manually delete it.

How to Save a Favorite Collapse Hide details

How to Save a Favorite

Build the chart as you normally would, applying all the desired settings such as statistics and axis properties.

Right-click anywhere in the canvas and choose Add to Favorites.

Enter a name for the favorite (this will show up as a ToolTip) and click OK.

How to Create a Chart from a Favorite Collapse Hide details

How to Create a Chart from a Favorite

Click the Gallery tab and select Favorites.

Drag the favorite onto the canvas as you would a predefined gallery chart.

Add the required variables to drop zones. Variables are not saved with the favorite, so you must always add these.

Click OK to create the chart.

You can also modify any of the chart properties before you create the chart, just as you can with a chart created from the gallery. Therefore, you can override any of the favorite's properties if needed for a particular circumstance.

How to Delete a Favorite Collapse Hide details

How to Delete a Favorite

Click the Gallery tab and select Favorites.

Right-click the favorite's icon and choose Delete from Favorites.

Click OK when prompted.

Related Topics

Building Charts
Chart Builder Layout and Terms
Variable Types
Building a Chart from the Gallery
Building a Chart from the Basic Elements
Summarizing Separate Variables
Chart Types
Adding and Editing Grouping Variables
Adding Paneling Variables
Adding and Editing Titles and Footnotes
Removing Elements from the Canvas
Editing Elements
Setting General Options


Editing Elements

A chart element is a graphic element (for example, a bar), an axis, a grouping zone, or one of the optional elements (such as titles and footnotes). In other words, elements are all of the items that you add to the chart. You can edit these elements by modifying their properties. For example, you can change the statistic that controls the bar height, reorder of the categories on a categorical axis, or transform the axis scale.

To modify the element properties:

Click Element Properties to display the Element Properties dialog box. You use the same dialog box to modify all elements in the chart.

In the Edit Properties Of list, select the element that you want to modify.

Click Apply to save your changes. If you select a different element before clicking Apply, your changes will be discarded. You must save your changes before editing another element.

Check the related topics for information about specific properties.

Related Topics

Editing Graphic Element Properties
Editing Axis Properties
Editing Grouping Zone Categories
Editing Paneling Zone Categories


Editing Graphic Element Properties

normal curve,normal curve,normal curve
charts,charts,charts
charts,charts,charts
normal curve,normal curve,normal curve
histograms,histograms,histograms
normal curve,normal curve,normal curve
population pyramids,population pyramids,population pyramids
normal curve,normal curve,normal curve
error bars,error bars,error bars
charts,charts,charts
charts,charts,charts
error bars,error bars,error bars
bar style,bar style,bar style
drop lines,drop lines,drop lines
dot plot shape,dot plot shape,dot plot shape
interpolation lines,interpolation lines,interpolation lines
scatterplot matrix,scatterplot matrix,scatterplot matrix
variables,variables,variables

The graphic element properties allow you to change the statistic associated with a graphic element and to modify properties specific to a graphic element type (for example, changing the shape of a bar graphic element from a rectangle to an I-beam).

Click Element Properties if the Element Properties dialog box is not displayed.

In the Edit Properties Of list, select an item that identifies a graphic element. An example would be Bar1.

Choose statistic options and, if available, error bar options. Descriptions of options follow.

Choose graphic element-specific options. For example, if the graphic element is a bar, you would be able to choose the shape of the bars, changing them to I-beams if necessary. Descriptions of graphic element-specific options follow.

Note: There is at least one button to the right of the Edit Properties Of list. The delete button allows you to delete a graphic element. See the topic Removing Elements from the Canvas for more information. The arrow buttons appear for dual y-axis charts and control the order in which the elements are drawn in the chart. Select an element and use the arrows to change the order. The last element is drawn on top of the other elements. For information about creating dual y-axis charts, see Dual y-axis Charts.

General Options Collapse Hide details

General Options

Assigned Axis. For dual axis charts, you can specify the axis to which the element is assigned. For example, if you have a bar showing mean values, you might assign the bar to Y-Axis2 so that the mean values appear on the second y axis.

Statistic. Specify a statistic that determines the position of the graphic element on the y axis (for example, the height of the bars in a bar chart or the location of a point in a summary point plot). The statistic is calculated for the displayed variable. For some charts (like high-low-close and summaries of separate variables), there may be more than one variable, each of which can have different statistics. For details about the available functions and parameters, see Statistics and Parameters.

Display normal curve. Superimpose over the histogram a normal curve with the same mean and standard deviation as the data. This is available only when the statistic is Histogram or Histogram Percent.

Display error bars. For charts that summarize a categorical variable, you can choose to display error bars. Error bars are available only for Mean, Median, Count, and Percentage.

Error bars represent. For Mean, you can choose to display confidence intervals around category means, plus and minus n times the variable standard deviation, or plus and minus n times the standard error of the mean. For Median, Count, and Percentage, only confidence intervals are available.

All confidence intervals are individual intervals, with coverage levels (based on the specified alpha) applying to individual categories, not to the set of all categories in the chart simultaneously. For Count and Percentage, the intervals are based on binomial intervals for the proportions of each category of the total over all categories, appropriately rescaled to the count or percentage metric. Note that the confidence intervals for Count, Median, and Percentage are generally not symmetric around the statistic.

Bar Element-Specific Options Collapse Hide details

Bar Element-Specific Options

Bar style. If the graphic element is a bar, you can choose to change its shape.

Point Element-Specific Options Collapse Hide details

Point Element-Specific Options

Stack identical values. If the graphic element is a point and a variable in one of the 2-D axis zones is categorical, you can choose to force points with the same x and y values to be stacked next to each other. Otherwise, the points would completely overlap each other, making them indistinguishable. This behavior is also known as dodging.

Display vertical drop lines between points. When the points are grouped and the chart is summarizing a categorical x-axis variable, you can choose to display a line that connects the points in each x-axis category.

Plot shape. For 1-D dot plots, you can specify a shape for the dot plot:

• Asymmetric. This is the default and, in most cases, the best option. Points are stacked on the x axis.

• Symmetric. The points are centered around the vertical midpoint of the graph (symmetric).

• Flat. Points are drawn on the vertical midpoint of the graph without any position modification.

Y-X Pairs. For overlay scatterplots, displays the pairs of variables. A point group is drawn for each pair. You can delete a pair by selecting it and clicking the delete button. You can also use the arrow buttons to control the order in which the pairs are drawn in the chart. The pair listed last is drawn on top of the previous pairs. For information about creating an overlay scatterplot, see Scatterplots and Dot Plots.

Scattermatrix Element-Specific Options Collapse Hide details

Scattermatrix Element-Specific Options

Matrix Variables. Displays the variables in the scatterplot matrix. You can delete a variable by selecting it and clicking the delete button. You can also use the arrow buttons to control the order of the variables in the matrix. The order may be useful for emphasizing varying degrees of correlation among the variables. For example, you may want to put highly correlated variables together at the top of the list.

Line, Area, and Difference Area Element-Specific Options Collapse Hide details

Line, Area, and Difference Area Element-Specific Options

Interpolation. If the graphic element is a line or an area, you can choose interpolation options. These determine how the line or area is drawn through (interpolated through) data values.

• Straight. Connects the data values in succession by straight lines.

• Step. Draws a horizontal line through each data value, and connects the horizontal lines with vertical lines.

• Jump. Like step interpolation, draws a horizontal line through each data value, but the horizontal lines are not connected.

• Location. For step and jump interpolation, indicates the data value's position on the horizontal line.

• Interpolate through missing values. Forces the line or area to continue through missing values. Otherwise, the line or area breaks at missing values.

Pyramid Element-Specific Options Collapse Hide details

Pyramid Element-Specific Options

Note: The Scale Variable Distribution Options are available when the Distribution Variable is a scale variable. The Categorical Variable Distribution Options are available when the variable is categorical.

Display normal curve. Superimpose over each histogram a normal curve with the same mean and standard deviation as the data.

Anchor Bin. Specify the starting value of a bin. If the value is less than the lowest data value, this is the starting value of the first bin. By default, the first bin will include the lowest data value. The anchor is set so that bin boundaries are at good values. You can change the default so that the first bin includes values that are not in the dataset. For example, you might want the values of 0–5 to be included even though the lowest value in the dataset is 6.

Note: If the variable being binned is a date, the starting value must be a date literal in the date format specified for the variable on the Variable View tab in the Data Editor (for example, 01/01/2001).

Bin Sizes. Change the size of the bins. You can either specify the number of bins or the width of each bin. The width also affects the number of bins. For example, if the axis range is 0–100 and you specify the width as 5, there will be 20 bins. The greater the number of bins, the more detailed the histogram is. However, more bins may make the histogram too irregular to see the shape of the distribution.

Note: If the variable being binned is a date, the units used for the width are days. Therefore, specifying a width of 30 indicates 30 days.

Display error bars. Display error bars representing the confidence interval for the count. The specified alpha must greater than or equal to 50 and less than 100.

High-Low-Close Element-Specific Options Collapse Hide details

High-Low-Close Element-Specific Options

Bar style. Choose a shape for the bar that shows the high and low values.

Point style for close. Choose a shape for the point that shows the close value.

Related Topics

Adding and Editing Titles and Footnotes
Editing Elements
Editing Axis Properties
Editing Grouping Zone Categories
Editing Paneling Zone Categories


Statistics and Parameters

charts,charts,charts
summary functions,summary functions,summary functions
statistics,statistics,statistics
statistics,statistics,statistics
in charts,in charts,in charts

When a graphic element is selected in the Edit Properties Of list, you can choose a statistical summary function for the graphic element. The result of the statistic determines the position of the graphic elements on the y axis. In a 2-D chart, the statistic is calculated for each value on the x axis. In a 3-D chart, it is calculated for the intersection of values on the x axis and z axis. For example, assume that you are creating a bar chart with gender as the x-axis variable and Count as the statistic. One bar is positioned at Male and one at Female. The height of the bars (the position of the bars on the y axis) represents the number (count) of cases in each category. If you were using the same statistic with a point (marker) graphic element, the points would be positioned where the top of the bars would have been.

There are two types of statistical summary functions. The distinction is important because it determines whether you need a variable in the y-axis drop zone.

• Functions that do not require a summary variable. These are functions that do not require a y-axis variable. All count and percentage statistics are in this category. These statistics are available when there is no variable in the y-axis drop zone. If you want to use one of these statistics and there is a variable in the y-axis drop zone, you first need to remove the variable from the drop zone.

• Functions that do require a summary variable. These are functions that do require a y-axis variable. For example, the Mean function requires a variable on which the mean is calculated. There is also the special Value function, which is used to display the variable's raw value without any summary. These statistics are available when there is a variable in the y-axis drop zone.

If there is a question mark (?) next to statistic's name in the Element Properties dialog box, you need to specify a parameter by clicking the Set Parameters button. This parameter controls how the summary function is calculated. Not all statistics use parameters.

Summary Functions That Do Not Require a Summary Variable Collapse Hide details

Summary Functions That Do Not Require a Summary Variable

Histogram. The number of cases in bins (groups) of x-axis variable values. Histogram is available only when the x-axis variable is a scale variable. The parameters specify the size of the bins (using a width or overall number) and an anchor for one of the bins. See the topic Histogram Parameters for more information.

Histogram Percent. The percentage of cases in bins (groups) of x-axis variable values. Histogram Percent is available only when the x-axis variable is a scale variable. The parameters specify the size of the bins (using a width or overall number), an anchor for one of the bins, and the base (denominator) used to calculate the percentage. See the topic Histogram Parameters for more information.

Count. The number of cases with particular x-axis and z-axis (if available) values.

Cumulative Count. The cumulative number of cases with particular x-axis and z-axis (if available) values. Each graphic element shows the number of cases with particular x-axis and z-axis (if available) values plus the total number of cases for every graphic element drawn previously on the same axis in a 2-D chart and drawn previously on both axes in a 3-D chart.

Percentage. The percentage of cases with particular x-axis and z-axis (if available) values. The parameters specify the base (denominator) used to calculate the percentage. See the topic Percentage Base for more information.

Cumulative Percentage. The cumulative percentage of cases with particular x-axis and z-axis (if available) values. Each graphic element shows the percentage of cases with particular x-axis and z-axis (if available) values plus the total percentage of cases for every graphic element drawn previously on the same axis in a 2-D chart and drawn previously on both axes in a 3-D chart. You cannot change the base (denominator) used to calculate the cumulative percentage. The base is always the total count of all cases across all panels.

Responses. The number of responses with particular x-axis and z-axis (if available) multiple response set values. This function is useful only when the x axis and z axis (if available) include multiple response set variables.

Cumulative Responses. The cumulative number of responses with particular x-axis and z-axis (if available) multiple response set values. This function is useful only when the x axis and z axis (if available) include multiple response set variables. Each graphic element shows the number of responses with particular x-axis and z-axis (if available) values plus the total number of responses for every graphic element drawn previously on the same axis in a 2-D chart and drawn previously on both axes in a 3-D chart.

Response Percentage. The percentage of responses with particular x-axis and z-axis (if available) multiple response set values. This function is useful only when the x axis and z axis (if available) include multiple response set variables. The parameters specify the base (denominator) used to calculate the percentage. See the topic Percentage Base for more information.

Cumulative Response Percentage. The cumulative percentage of responses with particular x-axis and z-axis (if available) multiple response set values. This function is useful only when the x axis and z axis (if available) include multiple response set variables. Each graphic element shows the percentage of responses with particular x-axis and z-axis (if available) values plus the total percentage of responses for every graphic element drawn previously on the same axis in a 2-D chart and drawn previously on both axes in a 3-D chart. You cannot change the base (denominator) used to calculate the cumulative response percentage. The base is always the total count of all responses.

Summary Functions that Do Require a Summary Variable Collapse Hide details

Summary Functions that Do Require a Summary Variable

Value. The value of the y-axis variable for cases with particular x-axis, y-axis, and z-axis (if available) values. You might use this statistic if your data were already aggregated, or if you are plotting every case, as in a scatterplot. If you create a bar chart that looks as if it is segmented, you probably should use a summary statistic instead. The apparent segmentation is the result of bars being drawn on top of each other because there are multiple cases with the same value.

Mean. The mean of the y-axis variable is calculated for cases with particular x-axis and z-axis (if available) values.

Median. The median of the y-axis variable is calculated for cases with particular x-axis and z-axis (if available) values.

Group Median. The grouped median of the y-axis variable is calculated for cases with particular x-axis and z-axis (if available) values.

Mode. The mode of the y-axis variable is calculated for cases with particular x-axis and z-axis (if available) values.

Minimum. The minimum of the y-axis variable is calculated for cases with particular x-axis and z-axis (if available) values.

Maximum. The maximum of the y-axis variable is calculated for cases with particular x-axis and z-axis (if available) values.

Valid N. The number of valid cases for the y-axis variable is calculated for particular x-axis and z-axis (if available) values.

Sum. The sum of the y-axis variable is calculated for cases with particular x-axis and z-axis (if available) values.

Cumulative Sum. The cumulative sum of the y-axis variable for cases with particular x-axis and z-axis (if available) values. Each graphic element shows the sum of the y-axis variable for cases with particular x-axis and z-axis (if available) values plus the total sum of the y-axis variable for every graphic element drawn previously on the same axis in a 2-D chart and drawn previously on both axes in a 3-D chart.

Standard deviation. The standard deviation of the y-axis variable is calculated for cases with particular x-axis and z-axis (if available) values.

Variance. The variance of the y-axis variable is calculated for cases with particular x-axis and z-axis (if available) values.

Percentile. The specified percentile of the y-axis variable is calculated for cases with particular x-axis and z-axis (if available) values.

G Percentile. The specified group percentile of the y-axis variable is calculated for cases with particular x-axis and z-axis (if available) values.

Percentage Less Than. The percentage of cases for which the value of the y-axis variable is less than the number you specify is calculated for cases with particular x-axis and z-axis (if available) values.

Percentage Greater Than. The percentage of cases for which the value of the y-axis variable is greater than the number you specify is calculated for cases with particular x-axis and z-axis (if available) values.

Number Less Than. The number of cases for which the value of the y-axis variable is less than the number you specify is calculated for cases with particular x-axis and z-axis (if available) values.

Number Greater Than. The number of cases for which the value of the y-axis variable is greater than the number you specify is calculated for cases with particular x-axis and z-axis (if available) values.

Percentage in Range. The percentage of cases for which the value of the y-axis variable is greater than the minimum and less than the maximum for cases with particular x-axis and z-axis (if available) values.

Number in Range. The number of cases for which the value of the y-axis variable is greater than the minimum and less than the maximum for cases with particular x-axis and z-axis (if available) values.


Percentage Base

charts,charts,charts
percentage base,percentage base,percentage base
percentage base,percentage base,percentage base
charts,charts,charts

Depending on the chart type, the following options are available for the base (denominator) used in percentage calculations. Specifying the percentage base is not available for cumulative percentages. The base for cumulative percentages is always the grand total because a different percentage base could conflict with the cumulative percentage.

Grand Total. Percentages are based on the total number of cases or responses in the chart. Adding up all of the graphic elements across all panels in the chart equals 100%.

Total for Each Axis Category. Percentages are based on the total number of cases or responses in a particular axis category. Adding up the graphic elements in the category equals 100%. This is the percentage base that you would select so that each stack or each cluster adds up to 100%.

Total for Each Legend Variable Category. Percentages are based on the total number of cases or responses with the same color, pattern, or other aesthetic. Adding up the graphic elements with the same aesthetic equals 100%. For example, adding up all of the green bars in the chart would equal 100%.

Total for Each Panel. Percentages are based on the total number of cases or responses in the same panel. Adding up the graphic elements in each panel equals 100%.


Histogram Parameters

Anchor Bin. Specify the starting value of a bin. If the value is less than the lowest data value, this is the starting value of the first bin. By default, the first bin will include the lowest data value. The anchor is set so that bin boundaries are at good values. You can change the default so that the first bin includes values that are not in the dataset. For example, you might want the values of 0–5 to be included even though the lowest value in the dataset is 6.

Note: If the variable being binned is a date, the starting value must be a date literal in the date format specified for the variable on the Variable View tab in the Data Editor (for example, 01/01/2001).

Bin Sizes. Change the size of the bins. You can either specify the number of bins or the width of each bin. The width also affects the number of bins. For example, if the axis range is 0–100 and you specify the width as 5, there will be 20 bins. The greater the number of bins, the more detailed the histogram is. However, more bins may make the histogram too irregular to see the shape of the distribution.

Note: If the variable being binned is a date, the units used for the width are days. Therefore, specifying a width of 30 indicates 30 days.

Denominator for Computing Percentage. For Histogram Percent, specify the base (denominator) used to calculate the percentage. See the topic Percentage Base for more information.


Editing Axis Properties

axis labels,axis labels,axis labels
axis scales,axis scales,axis scales
scales,scales,scales
minimum,minimum,minimum
maximum,maximum,maximum
origin,origin,origin
charts,charts,charts
scales,scales,scales
axes,axes,axes
origin,origin,origin
in charts,in charts,in charts
log scales,log scales,log scales
power scales,power scales,power scales
categorical axes,categorical axes,categorical axes

The axis properties allow you to change attributes such as the range on scale axes and the order of categories on a categorical axis.

Click Element Properties if the Element Properties dialog box is not displayed.

In the Edit Properties Of list, select an axis.

Modify the axis properties. Details appear below, organized by axis type.

Click Apply.

Scale Axis Properties Collapse Hide details

Scale Axis Properties

Axis Label. Specify text for the axis label. The Chart Builder sets a default that you can override.

If Automatic is selected for the values, the values are automatically set at creation to include all of the data and to create appropriate tick labels (for example, 10 instead of 10.0123). If you don't get exactly what you expect from the range settings, re-create the chart and uncheck Automatic for each setting and enter custom values. Alternatively, you can change the settings in the Chart Editor.

Minimum/Maximum. Change the range for the axis. The minimum and maximum values in the data for the graph are listed so that you can set a range that includes all of the data. Other graph elements (for example, annotations) can be hidden when you change the range. If elements you expect to see aren't displayed, change the range back to automatic. If the scale is transformed, the range values are specified in the same units as the data values.

Major Increment. Specify the size of the increments between major ticks/labels. Beginning with the minimum value, a major tick occurs at every increment specified by this number. In general, a division size that divides evenly into your range works best. For example, if your axis minimum is 0 and the maximum is 400, division sizes of 100, 50, or 25 would work well.

Origin. Specify the origin. The origin has a different effect depending on the graph type.

• For charts with bars and lines, the origin specifies the line from which bars and areas extend. The graphic elements originate at the origin and extend toward their value. For example, if your bar chart includes values of 367 and 48 and the origin is 100, one bar extends up from 100 to 367 (in default coordinates), while the other bar extends down to 48. The specified value for the origin must fall within the minimum and maximum.

• For a scatterplot, specifying an origin is useful only with a transformed axis. The effect of changing the origin is most obvious when the data are far from the origin, because the transformation takes the origin into account. For example, assume that the axis is a log scale. The equation for the transformation is y'=log(y-origin). Therefore, if the data points are 1001, 1002, 1010 and the origin is 0, the transformation will look similar to an untransformed scale. However, if you change the origin to 1000, the transformation will look like a log scale as expected.

Scale Type. There are several options for the scale type. Depending on your data, one may be more appropriate than another.

• Linear. Creates a linear, untransformed scale. This is the default.

• Logarithmic (standard) and Logarithmic (safe). Create a log-transformed scale. Optionally, you can enter a base for the log, which must be greater than 1. The transformation formula used for taking the safe log of an axis value x is not log(x). The formula is modified so that it can handle 0 and negative values. Details about the formula follow.

• Power. Creates an exponent-transformed scale. Optionally, you can enter an exponent. The default is 0.5, which would take the square root of the data.

Formula for Safe Log Transformation Collapse Hide details

The safe log formula is:

sign(x) * log(1 + abs(x))

So if you assume that the axis value is –99, the result of the transformation is:

sign(-99) * log(1 + abs(-99)) = -1 * log(1 + 99) = -1 * 2 = -2
Categorical Axis Properties Collapse Hide details

Categorical Axis Properties

Axis Label. Specify text for the axis label. The Chart Builder sets a default that you can override.

Sort by and Direction. Select a sorting option for the categories within the variable. Excluding Custom, any of the sorting options can be ascending or descending.

• Custom. Use the order shown in the Order list.

• Label. Use the category labels for sorting the variable's categories. These are the labels that appear in the chart, usually as tick or legend labels.

• Value. Use the value stored in the dataset for sorting the variable's categories. The category's value is what identifies the category in the dataset. It often differs from its label and is not necessarily descriptive. For example, the value might be a number (for example, 1), while the label is a text description of the category (for example, Female).

Order. Manually change the order in which categories appear in the chart. To change the order, select a category name, and then click either the up or the down arrow to the right of the list. The first category in the list is displayed first on the chart. When you manually change the order, the value of Sort By changes to Custom.

Excluded. This list shows the categories that are excluded from the chart. To exclude categories from the chart, select a category name in the Order list, and then click the delete button. To move the category back, select its name in the Excluded list, and then click the arrow to the right of the list. Other chart elements associated with a category (for example, annotations) can be hidden when you exclude a category. If elements you expect to see aren't displayed when you create the chart, move all excluded categories back to the Order list.

Collapse. Collapse the smallest categories into a single Other category. If the check box is selected, the Chart Builder takes the values on the y axis and sums them across all categories. The Chart Builder then collapses any categories with y-axis values that are less than the specified percentage of the total sum. Use this feature to combine categories that are so small that you don't need to display them separately. For example, consider collapsing if you have a pie chart with many categories. This feature is available for only a limited number of statistics: Count, Percentage, Valid N, and Sum. It is unavailable for high-low-close, difference area, and dual axis charts and for any chart specifying error bars.

Angle Axis Properties (for Pie Charts) Collapse Hide details

Angle Axis Properties (for Pie Charts)

Angle. Rotate the pie chart slices by entering a clock position at which the first slice starts. You can also change whether the category order goes in a clockwise or counterclockwise direction.

Display axis. Show or hide the axis around the perimeter of the pie chart. The axis is not typically displayed for a pie chart, but you may want to show it in some cases. For example, when the pie chart slices represent the sum of a variable, you can show the axis to determine the total of two or more slices.

Related Topics

Adding and Editing Titles and Footnotes
Editing Elements
Editing Graphic Element Properties
Editing Grouping Zone Categories
Editing Paneling Zone Categories


Editing Grouping Zone Categories

legends,legends,legends
in charts,in charts,in charts
charts,charts,charts
legends,legends,legends
chart legends,chart legends,chart legends
categories,categories,categories
in charts,in charts,in charts
sorting,sorting,sorting
chart categories,chart categories,chart categories

You can change the order of the grouping zone categories and collapse small categories into a single, new category. Note that modifying the grouping zone categories is very similar to modifying a categorical axis.

Click Element Properties if the Element Properties dialog box is not displayed.

In the Edit Properties Of list, select an item named GroupAesthetic (Element). An example would be GroupColor (Bar1).

Modify the grouping zone categories. Details appear below.

Click Apply.

Grouping Zone Categories Collapse Hide details

Grouping Zone Categories

Legend Label. Specify text for the legend label. The Chart Builder sets a default that you can override.

Sort by and Direction. Select a sorting option for the categories within the variable. Excluding Custom, any of the sorting options can be ascending or descending.

• Custom. Use the order shown in the Order list.

• Label. Use the category labels for sorting the variable's categories. These are the labels that appear in the chart, usually as tick or legend labels.

• Value. Use the value stored in the dataset for sorting the variable's categories. The category's value is what identifies the category in the dataset. It often differs from its label and is not necessarily descriptive. For example, the value might be a number (for example, 1), while the label is a text description of the category (for example, Female).

Order. Manually change the order in which categories appear in the chart. To change the order, select a category name, and then click either the up or the down arrow to the right of the list. The first category in the list is displayed first on the chart. When you manually change the order, the value of Sort By changes to Custom.

Excluded. This list shows the categories that are excluded from the chart. To exclude categories from the chart, select a category name in the Order list, and then click the delete button. To move the category back, select its name in the Excluded list, and then click the arrow to the right of the list. Other chart elements associated with a category (for example, annotations) can be hidden when you exclude a category. If elements you expect to see aren't displayed when you create the chart, move all excluded categories back to the Order list.

Collapse. Collapse the smallest categories into a single Other category. If the check box is selected, the Chart Builder takes the values on the y axis and sums them across all categories. The Chart Builder then collapses any categories with y-axis values that are less than the specified percentage of the total sum. Use this feature to combine categories that are so small that you don't need to display them separately. For example, consider collapsing if you have a pie chart with many categories. This feature is available for only a limited number of statistics: Count, Percentage, Valid N, and Sum. It is unavailable for high-low-close, difference area, and dual axis charts and for any chart specifying error bars.

Related Topics

Adding and Editing Titles and Footnotes
Editing Elements
Editing Graphic Element Properties
Editing Axis Properties
Editing Paneling Zone Categories


Editing Paneling Zone Categories

paneling,paneling,paneling
charts,charts,charts
charts,charts,charts
paneling categories,paneling categories,paneling categories

You can change the order of the paneling zone categories and collapse small categories into a single, new category. Note that modifying the paneling zone categories is very similar to modifying a categorical axis.

Click Element Properties if the Element Properties dialog box is not displayed.

In the Edit Properties Of list, select an item named Columns Panel (Element) or Rows Panel (Element). An example would be Rows Panel (Bar1).

Modify the grouping zone categories. Details appear below.

Click Apply.

Paneling Zone Categories Collapse Hide details

Paneling Zone Categories

Panel Label. Specify text for the panel label. The Chart Builder sets a default that you can override.

Sort by and Direction. Select a sorting option for the categories within the variable. Excluding Custom, any of the sorting options can be ascending or descending.

• Custom. Use the order shown in the Order list.

• Label. Use the category labels for sorting the variable's categories. These are the labels that appear in the chart, usually as tick or legend labels.

• Value. Use the value stored in the dataset for sorting the variable's categories. The category's value is what identifies the category in the dataset. It often differs from its label and is not necessarily descriptive. For example, the value might be a number (for example, 1), while the label is a text description of the category (for example, Female).

Order. Manually change the order in which categories appear in the chart. To change the order, select a category name, and then click either the up or the down arrow to the right of the list. The first category in the list is displayed first on the chart. When you manually change the order, the value of Sort By changes to Custom.

Excluded. This list shows the categories that are excluded from the chart. To exclude categories from the chart, select a category name in the Order list, and then click the delete button. To move the category back, select its name in the Excluded list, and then click the arrow to the right of the list. Other chart elements associated with a category (for example, annotations) can be hidden when you exclude a category. If elements you expect to see aren't displayed when you create the chart, move all excluded categories back to the Order list.

Collapse. Collapse the smallest categories into a single Other category. If the check box is selected, the Chart Builder takes the values on the y axis and sums them across all categories. The Chart Builder then collapses any categories with y-axis values that are less than the specified percentage of the total sum. Use this feature to combine categories that are so small that you don't need to display them separately. For example, consider collapsing if you have a pie chart with many categories. This feature is available for only a limited number of statistics: Count, Percentage, Valid N, and Sum. It is unavailable for high-low-close, difference area, and dual axis charts and for any chart specifying error bars.

Related Topics

Adding and Editing Titles and Footnotes
Editing Elements
Editing Graphic Element Properties
Editing Axis Properties
Editing Grouping Zone Categories


Setting General Options

templates,templates,templates
templates,templates,templates
charts,charts,charts
charts,charts,charts
templates,templates,templates
missing values,missing values,missing values
missing values,missing values,missing values
charts,charts,charts
charts,charts,charts
missing values,missing values,missing values
size,size,size
wrapping panels,wrapping panels,wrapping panels

The Chart Builder offers general options for the chart. These are options that apply to the overall chart, rather than a specific item on the chart. General options include missing value handling, templates, chart size, and panel wrapping.

Click Options.

Modify the general options. Details about these follow.

Click Apply.

User-Missing Values Collapse Hide details

User-Missing Values

Break Variables. If there are missing values for the variables used to define categories or subgroups, select Include so that the category or categories of user-missing values (values identified as missing by the user) are included in the chart. These "missing" categories also act as break variables in calculating the statistic. The "missing" category or categories are displayed on the category axis or in the legend, adding, for example, an extra bar or a slice to a pie chart. If there are no missing values, the "missing" categories are not displayed.

If you select this option and want to suppress display after the chart is drawn, open the chart in the Chart Editor and choose Properties from the Edit menu. Use the Categories tab to move the categories that you want to suppress to the Excluded list. Note, however, that the statistics are not recalculated if you hide the "missing" categories. Therefore, something like a percent statistic will still take the "missing" categories into account.

Note: This control does not affect system-missing values. These are always excluded from the chart.

Summary Statistics and Case Values. You can choose one of the following alternatives for exclusion of cases having missing values:

• Exclude listwise to obtain a consistent base for the chart. If any of the variables in the chart has a missing value for a given case, the whole case is excluded from the chart.

• Exclude variable-by-variable to maximize the use of the data. If a selected variable has any missing values, the cases having those missing values are excluded when the variable is analyzed.

To see the difference between listwise and variable-by-variable exclusion of missing values, consider the following figures, which show a bar chart for each of the two options.

Listwise exclusion of missing values
Variable-by-variable exclusion of missing values

The data include some system-missing (blank) values in the variables for Current Salary and Employment Category. In some other cases, the value 0 was entered and defined as missing. For both charts, the option Display groups defined by missing values is selected, which adds the category Missing to the other displayed job categories. In each chart, the values of the summary function, Number of cases, are displayed in the bar labels.

In both charts, 26 cases have a system-missing value for the job category, and 13 cases have the user-missing value (0). In the listwise chart, the number of cases is the same for both variables in each bar cluster because whenever a value was missing, the case was excluded for all variables. In the variable-by-variable chart, the number of nonmissing cases for each variable in a category is plotted without regard to missing values in other variables.

Templates Collapse Hide details

Templates

A chart template allows you to apply the attributes of one chart to another. When you open a chart in the Chart Editor, you can save it as a template. You can then apply that template by specifying it at creation or later by applying it in the Chart Editor. For information about creating templates, see Using Chart Templates.

Default Template. This is the template specified by the Options. You can access these by choosing Options from the Edit menu in the Data Editor and then clicking the Charts tab. The default template is applied first, which means that the other templates can override it.

Template Files. Click Add to specify one or more templates with the standard file selection dialog box. These are applied in the order in which they appear. Therefore, templates at the end of the list can override templates at the beginning of the list.

Chart Size and Panels Collapse Hide details

Chart Size and Panels

Chart Size. Specify a percentage greater than 100 to enlarge the chart or less than 100 to shrink it. The percentage is relative to the default chart size.

Panels. When there are many panel columns, select Wrap Panels to allow panels to wrap across rows rather than being forced to fit in a specific row. Unless this option is selected, the panels are shrunk to force them to fit in a row.

Related Topics

Building Charts
Chart Builder Layout and Terms
Variable Types
Building a Chart from the Gallery
Building a Chart from the Basic Elements
Summarizing Separate Variables
Chart Types
Adding and Editing Grouping Variables
Adding Paneling Variables
Adding and Editing Titles and Footnotes
Removing Elements from the Canvas
Using Favorites
Editing Elements


Editing Charts

Chart Editor,Chart Editor,Chart Editor

The Chart Editor provides a powerful, easy-to-use environment where you can customize your charts and explore your data. The Chart Editor features:

• Simple, intuitive user interface. You can quickly select and edit parts of the chart using menus, context menus, and toolbars. You can also enter text directly on a chart.

• Wide range of formatting and statistical options. You can choose from a full range of styles and statistical options.

• Powerful exploratory tools. You can explore your data in various ways, such as by labeling, reordering, and rotating it. You can change chart types and the roles of variables in the chart. You can also add distribution curves and fit, interpolation, and reference lines.

• Flexible templates for consistent look and behavior. You can create customized templates and use them to easily create charts with the look and options that you want. For example, if you always want a specific orientation for axis labels, you can specify the orientation in a template and apply the template to other charts.

How to View the Chart Editor Collapse Hide details

How to View the Chart Editor

Create a chart in PASW Statistics, or open a Viewer file with charts.

Double-click a chart in the Viewer.

Related Topics

What's New and Different
Chart Layout
Chart Editor Fundamentals
Selecting, Moving, and Resizing Chart Elements
Changing How a Chart Looks
Adding and Changing Text in a Chart
Exploring Data in a Chart


What's New and Different

If you used charts in version 15.0, you might want to know what functionality has been added for editing charts, what is now obsolete, what has been renamed, and what has otherwise changed.

What's New Collapse Hide details

What's New

• You can now rotate 3-D charts in real time by clicking and dragging a chart to rotate it. See the topic Exploring 3-D Charts for more information.

• You can now apply a variable to the z axis in a line chart. See the topic Variables and Chart Types for more information.

• You can now apply a variable to the z axis in a histogram. See the topic Variables and Chart Types for more information.

• You can now apply a variable to the stacking variable in a pie chart. See the topic Variables and Chart Types for more information.

What's Renamed Collapse Hide details

What's Renamed

• The 3-D Rotation tab has been renamed to the 3-D Elements tab. Rotation has been moved to a new mode that allows you to rotate a 3-D chart in real time. See the topic Exploring 3-D Charts for more information.

What's Changed Collapse Hide details

What's Changed

• 3-D rotation has been moved to a new mode that allows you to rotate a 3-D chart in real time. See the topic Exploring 3-D Charts for more information.


Chart Layout

Chart Editor,Chart Editor,Chart Editor
chart layout,chart layout,chart layout
chart elements,chart elements,chart elements
inner frame,inner frame,inner frame
outer frame,outer frame,outer frame
data frame,data frame,data frame

The default, basic chart layout is shown in the following figure.

Chart Layout

The different parts of a chart include:

• Outer frame. Frame around all of the elements. Resizing the outer frame resizes everything in the chart except text. You can also think of the outer frame as the chart frame.

• Text. Text appears in different parts of a chart. It can be in a separate text box, as is the title (Count of Employment Category by Gende). Sometimes it is anchored to another chart element, such as axis titles (Count and Employment Category) and tick labels (Clerical, Custodial, and Manager). There are also annotations that you can move around in the data frame. You can edit existing text, and you can insert text by adding a text box, title, footnote, or annotation.

• Data frame. Frame around the axis titles, axis labels, and data. When you resize the data frame, the Chart Editor resizes the data and changes the amount of space allocated to the text within the data frame. The Chart Editor does not change the font size.

• Inner frame. The part of the chart that displays the actual data. Within the inner frame are the bars, lines, pies, data markers (points), annotations, and any other elements that help you to understand and present your data (such as interpolation lines). As a group, bars, lines, pies, and data markers are referred to as graphic elements.

• Legend frame. Frame around the legend (Gender). Legend frames include swatches and labels that help you to interpret the chart. You can move and resize legend frames.

Related Topics

Ways to Select Chart Elements
Moving and Resizing Chart Elements


Chart Editor Fundamentals

Chart Editor,Chart Editor,Chart Editor
properties,properties,properties

The Chart Editor provides various methods for manipulating charts.

Menus

Many actions that you can perform in the Chart Editor are done with the menus, especially when you are adding an item to the chart. For example, you use the menus to add a fit line to a scatterplot. After adding an item to the chart, you often use the Properties dialog box to specify options for the added item.

Properties Dialog Box

Options for the chart and its chart elements can be found in the Properties dialog box.

To view the Properties dialog box, you can:

Double-click a chart element.

or

Select a chart element, and then from the menus choose:

Edit
Properties

Additionally, the Properties dialog box automatically appears when you add an item to the chart.

The Properties dialog box has tabs that allow you to set the options and make other changes to a chart. The tabs that you see in the Properties dialog box are based on your current selection.

Some tabs include a preview to give you an idea of how the changes will affect the selection when you apply them. However, the chart itself does not reflect your changes until you click Apply. You can make changes on more than one tab before you click Apply. If you have to change the selection to modify a different element on the chart, click Apply before changing the selection. If you do not click Apply before changing the selection, clicking Apply at a later point will apply changes only to the element or elements currently selected.

Depending on your selection, only certain settings will be available. The help for the individual tabs specifies what you need to select to view the tabs. If multiple elements are selected, you can change only those settings that are common to all the elements.

Toolbars

The toolbars provide a shortcut for some of the functionality in the Properties dialog box. For example, instead of using the Text tab in the Properties dialog box, you can use the Edit toolbar to change the font and style of the text.

Saving the Changes

Chart modifications are saved when you close the Chart Editor. The modified chart is subsequently displayed in the Viewer.


Selecting, Moving, and Resizing Chart Elements

To modify any elements in a chart, you must first select them. Only after selecting an item do you see all of the available options for modifying the element. You might also need to move and resize chart elements. There are multiple ways to select, move, and resize chart elements.

Related Topics

Ways to Select Chart Elements
Moving and Resizing Chart Elements


Ways to Select Chart Elements

chart elements,chart elements,chart elements
selecting in the Chart Editor,selecting in the Chart Editor,selecting in the Chart Editor
Chart Editor,Chart Editor,Chart Editor
selecting elements,selecting elements,selecting elements

You can select chart elements by:

• Using the menus and tool bar (for the chart and axes).

• Clicking an element. You can also select frames by clicking inside them.

• Right-clicking an element and choosing an option from the Select submenu.

• Pressing the Tab key to cycle through the frames.

• Selecting multiple points simultaneously using lasso selection.

Using the Tab Key and Menus

When you use the Tab key, the Chart Editor selects frames (except for the inner frame) based on a default selection order. You can change the selection order of some elements by bringing them to the front or sending them to the back. See the topic Changing the Display Order for more information.

Not all chart elements can be selected with the Tab key or the menus and tool bar. Only the mouse lets you select every type of chart element. For example, you cannot use the Tab key to select data points in a scatterplot.

Using the Context Menu

Right-click the relevant area of the chart and choose an option from the Select submenu.

Selecting More Than One Element

You must use the mouse if you want to select more than one element. With one or more elements already selected, press Ctrl and then click to extend the selection to include the clicked element. With an extended selection, you can make only those changes that apply to everything in your selection. When you first start working with the Chart Editor, keep your selections simple, so that it is easy to make the change that you want. As you get more experience editing charts, you can extend your selections.

Selecting Multiple Points Simultaneously (Lasso Selection)

For scatterplots and other charts with markers/points, you can use the lasso selection option. Choose Lasso Select Markers from the Edit menu. This action changes your cursor to a lasso. To select points, click and hold the mouse button while drawing the "lasso" around a group of points. Release the mouse button when finished. The Chart Editor then selects all the points encompassed by the lasso.

Canceling a Selection

You can cancel all selections by pressing Esc.

Selecting Grouped Elements

Not all items can be selected individually. For example, tick labels are grouped together and can be selected only as a group.

Selecting Graphic Elements

The Chart Editor allows you to select all graphic elements, all graphic elements in a specific category, or an individual graphic element. You click to drill down to the different levels. In addition, you can click a legend swatch to select a category.

Selecting Laterally

When an item (a graphic element or a group of graphic elements) is selected, you can click another similar item to select it instead. This is called lateral selection. For example, if a single graphic element is selected, you can click another graphic element to select only the clicked element. If a group of graphic elements is selected, you can click another group to select that group (for example, if the female group is selected, you can click the male group to select it instead).

Summary of Different Selection Methods

Use this selection method | To select these chart elements | Benefits and Limitations
Menus/tool bar | Chart (outer frame) and axes | Allows you to use keyboard shortcuts and the mouse, but you can select only a limited number of chart elements.
Tab key | Chart, data frame, legend, and text boxes (including titles and footnotes) | Allows you to quickly select the main chart elements with the keyboard, but you can select only a limited number of them.
Mouse | All | Allows you to select any chart element but you cannot use the keyboard.
Lasso Selection with Mouse | Markers | Allows you to select a group of markers simultaneously, but you cannot select other graphic elements or use the keyboard.

Related Topics

Selecting, Moving, and Resizing Chart Elements
Moving and Resizing Chart Elements


Moving and Resizing Chart Elements

chart elements,chart elements,chart elements
resizing,resizing,resizing
moving,moving,moving
white space,white space,white space
white space,white space,white space
charts,charts,charts

You can use the mouse to resize the outer frame and to move and resize data frames and legend frames. You can also move and resize text boxes, but not other frames with text in them (such as annotations and axis labels). In addition, you can use the Chart Size tab on the Properties window to enter exact dimensions for the outer frame.

How to Move and Resize elements Collapse Hide details

How to Move and Resize elements

Select the chart element you want to move or resize.

To move the element with the mouse. Position the mouse cursor over the element's border. When a four-headed arrow appears, click and drag the element to a new location.

Move Cursor

To move the element with the keyboard. Use the arrow keys to move the element in small increments vertically or horizontally.

To resize the element. Position the mouse cursor over a resizing handle on the element's border. When a two-headed arrow appears, click and drag the resizing handle until the element is the right size. You can also resize the outer frame by using the Chart Size tab.

Resize Cursor
Tip Collapse Hide details

Tip

To maintain the aspect ratio (the ratio of width to height), click one of the corner resizing handles and hold down the Shift key while dragging.

How To Resize the Outer Frame with the Properties Window Collapse Hide details

How To Resize the Outer Frame with the Properties Window

You can also resize the outer frame by entering exact dimensions in the Properties window.

From the menus choose,

Edit
Properties

Use Chart Size tab of the Properties window to specify options for resizing the outer frame:

Click Apply.

Using the Chart Size Tab Collapse Hide details

Using the Chart Size Tab

Height/Width. Enter the height and width for the chart (outer frame). The measurement unit comes from the setting on the General tab of the Options dialog box (Edit menu in the Viewer). Experiment to get the size that works best for your chart. If you make the chart too small, elements can overlap. Also note that resizing the outer frame resizes other chart elements such as the data frame and legend frame.

Maintain aspect ratio. Enforce the same ratio of chart width to chart height. When Maintain aspect ratio is selected, the dimension that you enter automatically updates the other dimension so that the ratio is preserved.

Resize elements when new elements are added/removed. Let the Chart Editor automatically resize items in the chart when other items are added or removed. See the topic Controlling White Space for more information.

Related Topics

Selecting, Moving, and Resizing Chart Elements
Ways to Select Chart Elements


Changing How a Chart Looks

You can change the way a chart looks. For example, you can change the size, font, and color of text, change the color and type of fill in bars, and add ticks and grids to the chart. Although the default format is adequate for most needs, you might want to make the chart clearer or more dramatic for presentation.

Related Topics

Text Formatting
Text Layout
Fill and Border Style
Marker Style
Bar Size and Style
Bar 3-D Effects
Pie Chart 3-D Effects and Slice Positions
Line Style
Axis Titles, Ticks, and Tick Labels
Grid Lines
Number Format
Date Format
Hiding the Legend
Exploding a Pie Chart
Changing the Dot Plot Layout
Changing the Display Order
Transposing a Chart
Controlling White Space


Text Formatting

chart style,chart style,chart style
text formatting,text formatting,text formatting
text,text,text
formatting in a chart,formatting in a chart,formatting in a chart

You can change text formatting with the Properties window or with the toolbar. The formatting applies to all text in a specific chart item, so you cannot change the text formatting for just a portion of the text. For example, if the text of an axis label is Count of Employment Category, you cannot make only the word "Count" bold. Either all of the text is bold, or none of it is.

How to Format Text Collapse Hide details

How to Format Text

Select a text frame in the chart, such as a text box, annotation, or axis title. Do not select the actual text in the frame. Changes apply to all text in the frame.

If the Properties window is not already displayed, from the menus choose:

Edit
Properties

Use the Text tab to specify the text formatting.

Click Apply.

Tip Collapse Hide details

Tip

You can also use the Edit toolbar to change the font family, size, weight, type face, and/or color.

Using the Text Tab Collapse Hide details

Using the Text Tab

Preview. The preview area displays your current choices and shows what the text will look like when you click Apply.

Text. Change the font family, size (in points), and font style. You can use a general family like Serif or SansSerif if you plan to distribute the chart to others who may have different font families on their computers. An appropriate matching font will be used (such as Arial for SansSerif). The Preferred Size and Minimum Size lists apply only when Size is set to Automatic. The Automatic setting allows the Chart Editor to pick a size that is proportional to the overall chart size. It will try to use the Preferred Size setting unless the chart is too small. Then it will reduce the font size as much as needed but without using a size smaller than the Minimum Size setting.

Color. Choose a color for the text:

Click the Text swatch.

Click a color. The swatch changes to the color, and the red, green, and blue settings (R,G,B) appear below the swatch. The color displaying white with a diagonal red line through it is the transparent color. You can customize a color by selecting it and clicking Edit to open a standard dialog box for customizing colors. Use the last row for creating custom colors. Click Reset to revert to the original settings for all colors.

Related Topics

Changing How a Chart Looks
Text Layout
Fill and Border Style
Marker Style
Bar Size and Style
Bar 3-D Effects
Pie Chart 3-D Effects and Slice Positions
Line Style
Axis Titles, Ticks, and Tick Labels
Grid Lines
Number Format
Date Format
Hiding the Legend
Exploding a Pie Chart
Changing the Dot Plot Layout
Changing the Display Order
Transposing a Chart
Controlling White Space


Text Layout

chart style,chart style,chart style
text layout,text layout,text layout
text,text,text
layout in a chart,layout in a chart,layout in a chart

You can change the layout of text in the chart. For example, you can specify that the text is displayed top to bottom or that there is more space between the text and the frame in which it appears.

How to Change the Text Layout Collapse Hide details

How to Change the Text Layout

Select a text frame in the chart, such as a text box, annotation, or axis title. Do not select the actual text in the frame. Changes apply to all text in the frame.

If the Properties window is not already displayed, from the menus choose:

Edit
Properties

Use the Text Layout tab to specify the text layout.

Click Apply.

Using the Text Layout Tab Collapse Hide details

Using the Text Layout Tab

Preview. The preview area displays your current choices and shows what the text will look like when you click Apply.

Justification. Change the position of the text in relation to its frame.

Padding. Specify the number of pixels between the text and the frame in which it appears. The change may not be apparent if the text is justified in the center of the frame.

Orientation. Choose an orientation for the text. You can also specify a custom number of degrees in a clockwise direction from the text being displayed left to right.

Related Topics

Changing How a Chart Looks
Text Formatting
Fill and Border Style
Marker Style
Bar Size and Style
Bar 3-D Effects
Pie Chart 3-D Effects and Slice Positions
Line Style
Axis Titles, Ticks, and Tick Labels
Grid Lines
Number Format
Date Format
Hiding the Legend
Exploding a Pie Chart
Changing the Dot Plot Layout
Changing the Display Order
Transposing a Chart
Controlling White Space


Fill and Border Style

chart style,chart style,chart style
fills,fills,fills
borders,borders,borders
color,color,color

You can change the colors, apply a pattern, or change the line width or border style for the outer frame, data frame, legend frame, text boxes, and bars.

How to Change Fills and Borders Collapse Hide details

How to Change Fills and Borders

Select the chart element you want to change.

If the Properties window is not already displayed, from the menus choose:

Edit
Properties

Use the Fill & Border tab to specify the formatting for the element.

Click Apply.

Tip Collapse Hide details

Tip

You can also use the Edit toolbar to change the fill and border color.

Using the Fill & Border Tab Collapse Hide details

Using the Fill & Border Tab

Preview. The preview area displays your current choices and shows what the fill and border will look like when you click Apply.

Color. Choose a color and pattern for the fill or border:

Click the swatch next to Fill or Border to indicate which you want to change.

Click a color. The swatch changes to the color, and the red, green, and blue settings (R,G,B) appear below the swatch. The color displaying white with a diagonal red line through it is the transparent color. You can customize a color by selecting it and clicking Edit to open a standard dialog box for customizing colors. Use the last row for creating custom colors. Click Reset to revert to the original settings for all colors.

Note: If you change the color of the fill for the floor or backplane in a 3-D chart, the color might be a darker shade than you expect. The darker shade reflects the depth.

Click Pattern to select a pattern for the fill.

Border Style. Change the weight, style, and end caps for the border. End caps are displayed at the ends of each border segment. In most cases, butted end caps are the best choice for non-solid border styles because they use less space. Try round end caps combined with a solid border style and medium weight for a slightly curved effect at the corners.

Related Topics

Changing How a Chart Looks
Text Formatting
Text Layout
Marker Style
Bar Size and Style
Bar 3-D Effects
Pie Chart 3-D Effects and Slice Positions
Line Style
Axis Titles, Ticks, and Tick Labels
Grid Lines
Number Format
Date Format
Hiding the Legend
Exploding a Pie Chart
Changing the Dot Plot Layout
Changing the Display Order
Transposing a Chart
Controlling White Space


Marker Style

markers,markers,markers
style,style,style
data points in charts,data points in charts,data points in charts
markers,markers,markers
points,points,points
style,style,style
symbol,symbol,symbol
data markers in charts,data markers in charts,data markers in charts

You can change the shape of the marker (point) as well as its size, color, and border width. For example, if you are grouping by gender in a scatterplot, you can change the markers to gender symbols.

How to Change the Marker Style Collapse Hide details

How to Change the Marker Style

Select the markers.

If the Properties window is not already displayed, from the menus choose:

Edit
Properties

Use the Marker tab to specify the style settings for the markers.

Click Apply.

Using the Marker Tab Collapse Hide details

Using the Marker Tab

Preview. The preview area displays your current choices and shows what the marker or markers will look like when you click Apply.

Marker. Change the marker type, its size (in points), or the thickness of its border (in points). In general, avoid thick borders unless the marker size is also large. Thick borders on small markers can disguise the marker shape and fill color.

Color. Choose a color and pattern for the fill or border:

Click the swatch next to Fill or Border to indicate which you want to change.

Click a color. The swatch changes to the color, and the red, green, and blue settings (R,G,B) appear below the swatch. The color displaying white with a diagonal red line through it is the transparent color. You can customize a color by selecting it and clicking Edit to open a standard dialog box for customizing colors. Use the last row for creating custom colors. Click Reset to revert to the original settings for all colors.

Tip Collapse Hide details

Tip

For some datasets, you might want to use the data value label as the marker. For example, if your chart includes data for U.S. states, you could use the state's two-letter abbreviation instead of a regular marker. Or you might have data that consist of high- and low-frequency words, in which case you want to use H or L for the data markers. You can substitute the markers with data labels:

Display the data labels for all graphic elements.

Use the Data Value Labels tab to specify the correct variable as the content of the label and center the label on the graphic element. Make sure that Suppress overlapping labels is not selected.

Set the border and fill for the marker to transparent.

Related Topics

Changing How a Chart Looks
Text Formatting
Text Layout
Fill and Border Style
Bar Size and Style
Bar 3-D Effects
Pie Chart 3-D Effects and Slice Positions
Line Style
Axis Titles, Ticks, and Tick Labels
Grid Lines
Number Format
Date Format
Hiding the Legend
Exploding a Pie Chart
Changing the Dot Plot Layout
Changing the Display Order
Transposing a Chart
Controlling White Space


Bar Size and Style

chart style,chart style,chart style
bars,bars,bars
error bars,error bars,error bars
style,style,style

You can change the width of bar graphic elements and bar clusters. You can also change the style for error bars.

How to Change the Bar Size and Style Collapse Hide details

How to Change the Bar Size and Style

Select one or more bars in a bar chart, boxplot, error bar chart, high-low chart, or mixed chart with bars. Any changes that you make will apply to all bars in the chart, not just those selected.

If the Properties window is not already displayed, from the menus choose:

Edit
Properties

Use the Bar Options tab to specify the bar width and the style of error bars.

Click Apply. Changes apply to all bars in the chart.

Using the Bar Options Tab Collapse Hide details

Using the Bar Options Tab

Bars Width. Change the width of the bars and the spacing between them. For simple charts, the value that you specify is the percentage (0 to 100) of the inner frame width allocated for all bars. For clustered charts, the value is a percentage of each cluster width allocated for the bars in each cluster. The bar width affects the spacing between bars. A low percentage results in a large amount of space between the bars. A high percentage leaves very little space between the bars. For boxplots and error bars, you can select Scale boxplot and error bars width based on count so that the bar width you specify is applied to the bar with the largest count. The Chart Editor then scales the rest of the bars based on the count of these bars compared to the largest bar. Therefore, if there are 100 cases in the largest bar and 50 in another, the latter is half as wide as the bar with 100 cases. The size of the largest bar is determined by the specified percentage.

Clusters Width. Change the width of the clusters and the spacing between them. The value that you specify is a percentage (0 to 100) of the inner frame width. The cluster width affects the spacing between clusters. A low percentage leaves more space between the clusters. A high percentage leaves less space between the clusters.

Boxplot and Error Bar Style. If the chart includes error bars and these are selected, specify the style for the error bars.

Related Topics

Changing How a Chart Looks
Text Formatting
Text Layout
Fill and Border Style
Marker Style
Bar 3-D Effects
Pie Chart 3-D Effects and Slice Positions
Line Style
Axis Titles, Ticks, and Tick Labels
Grid Lines
Number Format
Date Format
Hiding the Legend
Exploding a Pie Chart
Changing the Dot Plot Layout
Changing the Display Order
Transposing a Chart
Controlling White Space


Bar 3-D Effects

chart style,chart style,chart style
3-D effects,3-D effects,3-D effects
3-D effects,3-D effects,3-D effects
bar charts,bar charts,bar charts
shadow effect,shadow effect,shadow effect
bar charts,bar charts,bar charts

You can add 3-D effects to bar charts. 3-D effects do not add a third dimension or additional information to the bar chart. 3-D effects add depth to the bars for presentation purposes. If you want a bar chart with three dimensions, create a 3-D bar chart instead.

How to Add 3-D Effects Collapse Hide details

How to Add 3-D Effects

Select the bars.

If the Properties window is not displayed, from the menus choose:

Edit
Properties

Click the Depth & Angle tab.

Select Shadow or 3-D.

Use the rest of the tab to specify options for the effects.

Click Apply.

Using the Depth & Angle Tab Collapse Hide details

Using the Depth & Angle Tab

3-D Effect To apply a 3-D effect, select 3-D. A 3-D effect gives depth to the bars. Use the horizontal and vertical slider in the Angle area to change the angle of projection on the horizontal and vertical planes. Use Front Margin and Rear Margin to specify the margin in front of and behind the bars. These are percentages of the inner frame. Use the Distance area to change the viewing distance from the 3-D bars. By increasing the distance, the bars appear smaller.

Shadow Effect To apply a shadow effect, select Shadow. A shadow effect gives the effect of the bar floating above the plane of the inner frame. Use the horizontal and vertical sliders in the Offset area to change the angle of the light source in relation to the bars.

Related Topics

Changing How a Chart Looks
Text Formatting
Text Layout
Fill and Border Style
Marker Style
Bar Size and Style
Pie Chart 3-D Effects and Slice Positions
Line Style
Axis Titles, Ticks, and Tick Labels
Grid Lines
Number Format
Date Format
Hiding the Legend
Exploding a Pie Chart
Changing the Dot Plot Layout
Changing the Display Order
Transposing a Chart
Controlling White Space


Pie Chart 3-D Effects and Slice Positions

chart style,chart style,chart style
3-D effects,3-D effects,3-D effects
3-D effects,3-D effects,3-D effects
pie charts,pie charts,pie charts
shadow effect,shadow effect,shadow effect
pie charts,pie charts,pie charts

You can add 3-D effects to pie charts. You can also change the position of the slices and the order in which they are displayed.

How to Add 3-D Effects Collapse Hide details

How to Add 3-D Effects

Select the pie chart.

If the Properties window is not displayed, from the menus choose:

Edit
Properties

Click the Depth & Angle tab.

Select Shadow or 3-D.

Use the rest of the tab to specify options for the effects.

Click Apply.

How to Change the Position of the Pie Slices Collapse Hide details

How to Change the Position of the Pie Slices

Select the pie chart.

If the Properties window is not displayed, from the menus choose:

Edit
Properties

Click the Depth & Angle tab.

Use the Position Slices area to specify the pie options.

Click Apply.

Using the Depth & Angle tab Collapse Hide details

Using the Depth & Angle tab

3-D Effect To apply a 3-D effect, select 3-D. A 3-D effect gives depth to the bars or the pie chart. Use the horizontal and vertical slider in the Angle area to change the angle of projection on the horizontal and vertical planes. (The vertical slider is disabled for bars.) You can also use the Depth area to specify the depth of the 3-D effect, which changes the thickness of the 3-D pie. Depth is a percentage of the inner frame. Use the Distance area to change the viewing distance from the 3-D pie. By increasing the distance, the pie chart appears smaller.

Shadow Effect To apply a shadow effect, select Shadow. A shadow effect gives the effect of the pie floating above the plane of the inner frame. Use the horizontal and vertical sliders in the Offset area to change the angle of the light source in relation to the pie.

Position Slices Rotate the pie chart slices by entering a clock position at which the first slice starts. This position is indicated by a thicker line in the example image. You can also change whether categories are displayed in a clockwise or counterclockwise direction.

Related Topics

Changing How a Chart Looks
Text Formatting
Text Layout
Fill and Border Style
Marker Style
Bar Size and Style
Bar 3-D Effects
Line Style
Axis Titles, Ticks, and Tick Labels
Grid Lines
Number Format
Date Format
Hiding the Legend
Exploding a Pie Chart
Changing the Dot Plot Layout
Changing the Display Order
Transposing a Chart
Controlling White Space


Line Style

line charts,line charts,line charts
line style,line style,line style
line style in charts,line style in charts,line style in charts

You can change the color, weight, and style of lines on the chart.

How to Change the Line Style Collapse Hide details

How to Change the Line Style

Select the line, such as a line graphic element or an axis.

If the Properties window is not displayed, from the menus choose:

Edit
Properties

Use the Lines tab to specify the line style.

Click Apply.

Using the Lines Tab Collapse Hide details

Using the Lines Tab

Preview. The preview area displays your current choices and shows what the line will look like when you click Apply.

Lines. Change the weight (in points), style, and end caps for the border. End caps are displayed at the ends of each border segment. For a crisp-looking line graphic element, try square end caps and a solid style.

Color. Choose a color for the line:

Click a color to change the line to that color. The Line swatch changes to the color, and the red, green, and blue settings (R,G,B) appear below the swatch. The color displaying white with a diagonal red line through it is the transparent color. You can customize a color by selecting it and clicking Edit to open a standard dialog box for customizing colors. Use the last row for creating custom colors. Click Reset to revert all colors to their original settings.

Related Topics

Changing How a Chart Looks
Text Formatting
Text Layout
Fill and Border Style
Marker Style
Bar Size and Style
Bar 3-D Effects
Pie Chart 3-D Effects and Slice Positions
Axis Titles, Ticks, and Tick Labels
Grid Lines
Number Format
Date Format
Hiding the Legend
Exploding a Pie Chart
Changing the Dot Plot Layout
Changing the Display Order
Transposing a Chart
Controlling White Space


Axis Titles, Ticks, and Tick Labels

chart style,chart style,chart style
tick labels,tick labels,tick labels
axis titles,axis titles,axis titles
tick labels,tick labels,tick labels
axis labels,axis labels,axis labels
axis titles,axis titles,axis titles
text,text,text
axis labels,axis labels,axis labels
axis titles,axis titles,axis titles
rotating axis labels,rotating axis labels,rotating axis labels
labels,labels,labels
tick labels,tick labels,tick labels
panel labels,panel labels,panel labels
categorical axes,categorical axes,categorical axes
label orientation,label orientation,label orientation
chart style,chart style,chart style
ticks,ticks,ticks
ticks,ticks,ticks
axis ticks,axis ticks,axis ticks
panel labels,panel labels,panel labels

You can hide axis titles and change tick labels by reorienting and moving them. For example, you can rotate all tick labels relative to the axis.

How to Change the Display of Axis Titles, Ticks, and Tick Labels Collapse Hide details

How to Change the Display of Axis Titles, Ticks, and Tick Labels

Select an axis.

If the Properties window is not already displayed, from the menus choose:

Edit
Properties

Use the Labels & Ticks tab to specify the options for the axis title, ticks, and tick labels.

If necessary, use the Text tab to format the labels or title.

Click Apply.

Using the Labels & Ticks Tab Collapse Hide details

Using the Labels & Ticks Tab

Display axis title. Show/hide the axis title.

Display axis. Display the axis in various places in relation to the data frame.

Display labels. Show/hide the tick labels. The tick labels are the text frames that appear with major ticks. The labels can be category names or specific scale values.

Label orientation. Change the orientation of tick labels for categorical axes. You can select one of the built-in orientations, or you can select Custom Degrees, which allows you to enter a specific number of degrees that the labels are rotated in a clockwise direction from the horizontal. Horizontal labels are oriented at 0 degrees. Experiment with various orientations to see which fits best on your chart.

Category Label Placement. Change where the category labels appear on the axis. By default, the Chart Editor automatically places category labels at the major ticks. To change the default, you can select Custom and then enter a number in the Ticks skipped between labels box. The number indicates how many ticks and category labels are skipped between the other major ticks and label. For example, if there are three categories, by default the Chart Editor displays a tick and a label for each category. If you type 1 in the Ticks skipped between labels box, the Chart Editor displays ticks and labels for the first and third category, but not the second, skipped category.

Major/minor ticks. Major tick marks are displayed at each category or at the major increments specified on the Scale tab. Minor tick marks are displayed between the major increments on a scale axis. You can choose how the tick mark appears, and, for minor tick marks, how many minor tick marks appear for each major increment. To change the number of major tick marks on a scale axis, change the major increment on the Scale tab.

Category axes don't have minor tick marks, so you don't have the option to change them.

Related Topics

Text Formatting
Line Style
Changing How a Chart Looks
Text Layout
Fill and Border Style
Marker Style
Bar Size and Style
Bar 3-D Effects
Pie Chart 3-D Effects and Slice Positions
Line Style
Grid Lines
Number Format
Date Format
Hiding the Legend
Exploding a Pie Chart
Changing the Dot Plot Layout
Changing the Display Order
Transposing a Chart
Controlling White Space


Grid Lines

chart style,chart style,chart style
grids,grids,grids
grid lines,grid lines,grid lines
charts,charts,charts

You can display grid lines on your chart and specify where the grid lines appear.

How to Display Grid Lines Collapse Hide details

How to Display Grid Lines

Select the axis on which you want to display grid lines. If no axis is selected, the Chart Editor will display grid lines on all axes.

From the menus choose:

Options
Show Grid Lines

By default, the Chart Editor displays the grid lines at the major increments (for example, each category on a categorical axis). Use the Grid Lines tab to change the position of the grid lines.

If necessary, use the Lines tab to change the line thickness and style for the grid lines.

Click Apply.

Using the Grid Lines Tab Collapse Hide details

Using the Grid Lines Tab

Place grid lines at. Select the type of ticks at which gridlines are displayed.

Related Topics

Line Style
Changing How a Chart Looks
Text Formatting
Text Layout
Fill and Border Style
Marker Style
Bar Size and Style
Bar 3-D Effects
Pie Chart 3-D Effects and Slice Positions
Axis Titles, Ticks, and Tick Labels
Number Format
Date Format
Hiding the Legend
Exploding a Pie Chart
Changing the Dot Plot Layout
Changing the Display Order
Transposing a Chart
Controlling White Space


Number Format

chart style,chart style,chart style
number format,number format,number format
numeric format,numeric format,numeric format
chart axes,chart axes,chart axes
data value labels,data value labels,data value labels
scale axes,scale axes,scale axes
number format,number format,number format
scientific notation,scientific notation,scientific notation
charts,charts,charts
data value labels,data value labels,data value labels
number format,number format,number format

You can change the format for numbers in tick labels on a scale axis or data value labels displaying a number.

Note: You cannot change the number format of a numeric variable used as the labeling variable in a scatterplot or as the categorical axis variable. These are treated as strings.

How to Change the Number Format Collapse Hide details

How to Change the Number Format

Select the scale axis tick labels or the data value labels if they contain numbers.

If the Properties window is not already displayed, from the menus choose:

Edit
Properties

Use the Number Format tab to specify the number formatting.

Click Apply.

Using the Number Format Tab Collapse Hide details

Using the Number Format Tab

Sample. The sample displays your current choices and shows what the numbers will look like when you click Apply.

Decimal places. Enter the number of decimal places that the number should include.

Scaling factor. Use a scale factor when the numbers are large, but you don't want the label to extend too much to accommodate the number. If you change the number format of the tick labels, be sure to edit the axis title or add an annotation to indicate how the number should be interpreted. For example, assume your scale axis displays salaries and the labels are 30,000, 50,000, and 70,000. You might enter a scale factor of 1000 to display 30, 50, and 70. You should then edit the scale axis title to include the text in thousands.

Leading characters. Enter a character to display at the beginning of the number. For example, enter a dollar sign ($) if the numbers are salaries in U.S. dollars.

Trailing characters. Enter a character to display at the end of the number. For example, enter a percentage sign (%) if the numbers are percentages.

Digit grouping. You can choose whether to display a character between groups of digits. The Chart Editor uses the digit grouping character appropriate for your computer's current locale.

Scientific notation. You can choose when to display numbers in scientific notation. Scientific notation is useful for very large or very small numbers.

Related Topics

Changing How a Chart Looks
Text Formatting
Text Layout
Fill and Border Style
Marker Style
Bar Size and Style
Bar 3-D Effects
Pie Chart 3-D Effects and Slice Positions
Line Style
Axis Titles, Ticks, and Tick Labels
Grid Lines
Date Format
Hiding the Legend
Exploding a Pie Chart
Changing the Dot Plot Layout
Changing the Display Order
Transposing a Chart
Controlling White Space


Date Format

chart style,chart style,chart style
date format,date format,date format
date formats,date formats,date formats
chart axes,chart axes,chart axes
scale axes,scale axes,scale axes
date format,date format,date format

You can change the format of dates in tick labels on a scale axis.

You cannot change the format of dates on a categorical axis because these dates are just text, not date variables. However, you can directly edit text in tick labels on a categorical axis, modifying the date as necessary. See the topic Editing Text for more information.

Note: You cannot change the date format of a date variable used as the labeling variable in a scatterplot or as the categorical axis variable. These are treated as strings.

How to Change the Date Format Collapse Hide details

How to Change the Date Format

Select the scale axis tick labels if they contain dates.

If the Properties window is not already displayed, from the menus choose:

Edit
Properties

Use the Date Format tab to specify the date format.

Click Apply.

Using the Date Format Tab Collapse Hide details

Using the Date Format Tab

Sample. The sample displays your current choices and shows what the dates will look like when you click Apply.

Automatic. The Chart Editor automatically chooses a date format, which it determines from the system locale. If you have already set up a date format in PASW Statistics, the Chart Editor will use that format.

Common. Select a common date format, which allows you to customize the specific date format without having to specify the format for each part of the date.

Custom. Select a custom format for each part of the date.

Related Topics

Changing How a Chart Looks
Text Formatting
Text Layout
Fill and Border Style
Marker Style
Bar Size and Style
Bar 3-D Effects
Pie Chart 3-D Effects and Slice Positions
Line Style
Axis Titles, Ticks, and Tick Labels
Grid Lines
Number Format
Hiding the Legend
Exploding a Pie Chart
Changing the Dot Plot Layout
Changing the Display Order
Transposing a Chart
Controlling White Space


Hiding the Legend

chart legend,chart legend,chart legend
hiding,hiding,hiding
legends,legends,legends
charts,charts,charts

By hiding the legend rather than deleting it, you can always display it again if you want.

From the menus choose:

Options
Hide Legend

To display a legend that you previously hid, from the menus choose:

Options
Show Legend

Related Topics

Changing How a Chart Looks
Text Formatting
Text Layout
Fill and Border Style
Marker Style
Bar Size and Style
Bar 3-D Effects
Pie Chart 3-D Effects and Slice Positions
Line Style
Axis Titles, Ticks, and Tick Labels
Grid Lines
Number Format
Date Format
Exploding a Pie Chart
Changing the Dot Plot Layout
Changing the Display Order
Transposing a Chart
Controlling White Space


Exploding a Pie Chart

explode pie charts,explode pie charts,explode pie charts
pie charts,pie charts,pie charts
explode,explode,explode

You can explode (separate) the slices from a pie chart for emphasis. The exploded slices look as if they were cut out from the pie and moved slightly outward from its center.

If you want to explode a specific slice or slices, select them. If no slices are selected, the Chart Editor explodes all slices.

From the menus choose:

Elements
Explode Slice

To undo the explosion, select the pie chart and then choose from the menus:

Elements
Return Slice

Related Topics

Changing How a Chart Looks
Text Formatting
Text Layout
Fill and Border Style
Marker Style
Bar Size and Style
Bar 3-D Effects
Pie Chart 3-D Effects and Slice Positions
Line Style
Axis Titles, Ticks, and Tick Labels
Grid Lines
Number Format
Date Format
Hiding the Legend
Changing the Dot Plot Layout
Changing the Display Order
Transposing a Chart
Controlling White Space


Changing the Dot Plot Layout

dot plots,dot plots,dot plots
layout,layout,layout
chart style,chart style,chart style
dot plot layout,dot plot layout,dot plot layout

You can change the way points are arranged in the dot plot.

Select the dot plot graphic elements.

If the Properties window is not already displayed, from the menus choose:

Edit
Properties

Click the Dot Plot Options tab and select an option from the Plot Layout group.

Click Apply.

Related Topics

Changing How a Chart Looks
Text Formatting
Text Layout
Fill and Border Style
Marker Style
Bar Size and Style
Bar 3-D Effects
Pie Chart 3-D Effects and Slice Positions
Line Style
Axis Titles, Ticks, and Tick Labels
Grid Lines
Number Format
Date Format
Hiding the Legend
Exploding a Pie Chart
Changing the Display Order
Transposing a Chart
Controlling White Space


Changing the Display Order

chart elements,chart elements,chart elements
display order,display order,display order
z order,z order,z order

The display order determines which chart elements are on top of other elements. You can change the display order by bringing an element to the front or sending it to the back. When you bring an element to the front, it appears on top of elements behind it. When you send it to the back, it can be hidden by other elements in front of it.

Select the chart element.

From the menus choose:

Edit
Bring to Front/Send to Back

Related Topics

Changing How a Chart Looks
Text Formatting
Text Layout
Fill and Border Style
Marker Style
Bar Size and Style
Bar 3-D Effects
Pie Chart 3-D Effects and Slice Positions
Line Style
Axis Titles, Ticks, and Tick Labels
Grid Lines
Number Format
Date Format
Hiding the Legend
Exploding a Pie Chart
Changing the Dot Plot Layout
Transposing a Chart
Controlling White Space


Transposing a Chart

rotating charts,rotating charts,rotating charts
transposing charts,transposing charts,transposing charts

You can transpose the coordinate system of some charts. When you transpose the coordinate system, a value at (5, 10) becomes (10, 5). Transposing is most obvious in a bar chart because the bars become horizontal rather than vertical. In a scatterplot, the transposing might not be as obvious.

From the menus choose:

Options
Transpose Chart

To transpose the coordinate system back, repeat the previous step.

Related Topics

Changing How a Chart Looks
Text Formatting
Text Layout
Fill and Border Style
Marker Style
Bar Size and Style
Bar 3-D Effects
Pie Chart 3-D Effects and Slice Positions
Line Style
Axis Titles, Ticks, and Tick Labels
Grid Lines
Number Format
Date Format
Hiding the Legend
Exploding a Pie Chart
Changing the Dot Plot Layout
Changing the Display Order
Controlling White Space


Controlling White Space

white space,white space,white space
charts,charts,charts

The Chart Editor can automatically reclaim the space that was occupied by a deleted or hidden item. For example, if you delete the legend, the Chart Editor can expand the data frame to the edge of the chart and fill the space previously occupied by the legend. The Chart Editor can also allot extra space when an item is added. The Chart Editor shrinks the other items to make the space.

To turn on the feature for automatically controlling white space, follow these steps:

If the Properties window is not already displayed, from the menus choose:

Edit
Properties

Click the Chart Size tab.

Select Resize elements when new elements are added/removed.

Click Apply.

The Chart Editor will automatically reclaim and add space for the following items. Deleting or adding any other items in the chart will not affect the available space.

• Legends

• Titles

• Footnotes

Related Topics

Changing How a Chart Looks
Text Formatting
Text Layout
Fill and Border Style
Marker Style
Bar Size and Style
Bar 3-D Effects
Pie Chart 3-D Effects and Slice Positions
Line Style
Axis Titles, Ticks, and Tick Labels
Grid Lines
Number Format
Date Format
Hiding the Legend
Exploding a Pie Chart
Changing the Dot Plot Layout
Changing the Display Order
Transposing a Chart


Adding and Changing Text in a Chart

chart text,chart text,chart text

You can add the following to charts:

• Text boxes. Text boxes can appear anywhere in a chart. Use them for titles, footnotes, and other general information about the chart. You can drag and drop text boxes to reposition them.

• Titles. Titles are a specific type of text box. When you add one to the chart, it always appears above the data frame and resizes the outer frame if necessary. Like "generic" text boxes, you can drag and drop titles to reposition them.

• Footnotes. Footnotes are another specific type of text box. When you add one to the chart, it always appears below the data frame and resizes the outer frame if necessary. Like "generic" text boxes, you can drag and drop them to reposition them.

• Annotations. Annotations are anchored to specific coordinates in the inner frame. Use them to describe coordinates or data markers in the chart. Annotations can appear only in the inner frame because the annotation is tied to a coordinate. If you reorder categories, the annotation stays with the category. This feature is also useful for templates, because the annotation will appear at the correct coordinates in a chart to which the template is applied. An example is if you wanted all charts to include an annotation that displays "Points above are unusually high".

• Data labels. Data labels are the text frames attached to individual graphic elements. These are useful for identifying the graphic element or for displaying additional information like the underlying data value.

Related Topics

Text Boxes
Titles
Footnotes
Annotations
Data Labels
Editing Text
Deleting and Hiding Text


Text Boxes

text boxes,text boxes,text boxes
charts,charts,charts
text,text,text
charts,charts,charts

Text boxes allow you to place text anywhere in the chart.

How to Add a Text Box Collapse Hide details

How to Add a Text Box

From the menus choose:

Options
Text Box

The Chart Editor creates the text box and automatically positions it in the top center of the chart.

Type the text. To enter line breaks, press Shift+Enter.

Press Enter when you have finished typing.

If necessary, use the Text tab to format the text.

If necessary, drag and drop the text box to move it.

How to Delete a Text Box Collapse Hide details

How to Delete a Text Box

Select the text box by clicking it or by pressing Tab to cycle through the frames in the chart.

Press Delete.

Related Topics

Text Formatting
Adding and Changing Text in a Chart
Titles
Footnotes
Annotations
Data Labels
Editing Text
Deleting and Hiding Text


Titles

chart titles,chart titles,chart titles
titles,titles,titles
charts,charts,charts

Chart titles are text boxes that the Chart Editor automatically positions above the data frame (which is the frame around the axis titles and the graphic elements). If there isn't space for the chart title, by default the Chart Editor enlarges the outer frame to accommodate it. (You can change this default behavior. See Controlling White Space for more information.)

Note: Unlike text boxes, you should not move a title from its default position. If you want to place text at an arbitrary position, use a text box instead. See the topic Text Boxes for more information.

How to Add a Title Collapse Hide details

How to Add a Title

From the menus choose:

Options
Title

The Chart Editor creates the title and automatically positions it above the data frame.

Type the title text. To enter line breaks, press Shift+Enter.

Press Enter when you have finished typing.

If necessary, use the Text tab to format the text.

How to Delete a Title Collapse Hide details

How to Delete a Title

Select the title's frame.

Press Delete.

Related Topics

Text Formatting
Adding and Changing Text in a Chart
Text Boxes
Footnotes
Annotations
Data Labels
Editing Text
Deleting and Hiding Text


Footnotes

chart footnotes,chart footnotes,chart footnotes
footnotes,footnotes,footnotes
charts,charts,charts

Footnotes are text boxes that the Chart Editor automatically positions below the data frame (which is the frame around the axis titles and the graphic elements). If there isn't space for the footnote, by default the Chart Editor enlarges the outer frame to accommodate it. (You can change this default behavior. See Controlling White Space for more information.)

Note: Unlike text boxes, you should not move a footnote from its default position. If you want to place text at an arbitrary position, use a text box instead. See the topic Text Boxes for more information.

How to Add a Footnote Collapse Hide details

How to Add a Footnote

From the menus choose:

Options
Footnote

The Chart Editor creates the footnote and automatically positions it below the data frame.

Type the footnote text. To enter line breaks, press Shift+Enter.

Press Enter when you have finished typing.

If necessary, use the Text tab to format the text.

How to Delete a Footnote Collapse Hide details

How to Delete a Footnote

Select the footnote's frame.

Press Delete.

Related Topics

Text Formatting
Adding and Changing Text in a Chart
Text Boxes
Titles
Annotations
Data Labels
Editing Text
Deleting and Hiding Text


Annotations

annotations,annotations,annotations
charts,charts,charts
chart annotations,chart annotations,chart annotations
text,text,text
chart annotations,chart annotations,chart annotations

Annotations are text frames that are anchored to specific coordinates in the inner frame.

How to Add an Annotation Collapse Hide details

How to Add an Annotation

From the menus choose:

Options
Annotation

The Chart Editor creates an annotation and automatically positions it near the center of the data frame.

Type the annotation text. To enter line breaks, press Shift+Enter.

Press Enter when you have finished typing.

Tip Collapse Hide details

Tip

If you change the axis range after adding an annotation, it might end up being hidden. To display the annotation again, use the Scale tab (see Axis Scale) or the Matrix Axis Scale tab (see Axis Scale for Matrix Scatterplots) to change the axis range.

How to Move an Annotation Collapse Hide details

How to Move an Annotation

There are a couple of options for moving an annotation in a chart. As with text frames, you to drag and drop annotations to a new position in the inner frame. As you drag the annotation, the Chart Editor displays the coordinates to which the annotation would be anchored if you dropped it at that spot. You cannot drag the annotation out of the inner frame.

You can also enter precise coordinates to which you want to anchor the annotation:

Select an annotation in the chart.

If the Properties window is not displayed, from the menus choose:

Edit
Properties

Use the Annotation tab to specify the position of the annotation. You can specify the coordinate to which it is anchored and its orientation in relation to that anchor.

Click Apply.

How to Format an Annotation Collapse Hide details

How to Format an Annotation

Select an annotation in the chart.

If the Properties window is not displayed, from the menus choose:

Edit
Properties

If necessary, use the Text tab to format the text.

Click Apply.

Using the Annotation Tab Collapse Hide details

Using the Annotation Tab

Anchor Point. This setting allows you to specify the position of the annotation in the data frame. You can also drag and drop the annotations, but this setting ensures a precise position. For scale axes, you can enter any number between the minimum and maximum values for the axis. This number indicates the annotation's position along the axis. For categorical axes, you can select a category. The annotation appears where the selected category appears in the chart.

Text Position. Select the location of the annotation text in relation to the anchor point.

Related Topics

Text Formatting
Adding and Changing Text in a Chart
Text Boxes
Titles
Footnotes
Data Labels
Editing Text
Deleting and Hiding Text


Data Labels

case labels,case labels,case labels
data labels,data labels,data labels
data value labels,data value labels,data value labels
text,text,text
data labels,data labels,data labels
labels,labels,labels
data labels,data labels,data labels

You can display the data labels for bar values, pie chart segment values, the median line in a boxplot, and individual cases in a scatterplot or boxplot.

You can specify the contents of the data label. Depending on the type of chart, options include the categorical or legend (grouping) variable, an axis value, a summary statistic (such as counts), the case ID, or the case number. The default for the data label also depends on the chart type.

The Chart Editor provides a special mode for identifying individual cases whose data labels you want to display. This is the data label mode. When you are in data label mode, you can't change anything else in the chart.

How to Display Specific Data Labels Collapse Hide details

How to Display Specific Data Labels

From the menus choose:

Elements
Data Label Mode

The cursor changes shape to indicate that you are in data label mode.

Click the graphic element (pie segment, bar, or marker) for which you want to display the case label. If there are overlapping graphic elements in the spot that you click, the Chart Editor displays the Select Graphic Element to Label dialog box. This dialog box allows you to select the specific graphic element or elements for which you want to display data labels. See the topic Select Graphic Element to Label Dialog Box for more information.

The Chart Editor displays the data label in a default position related to the graphic element.

When you have finished choosing graphic elements, from the menus choose:

Elements
Data Label Mode

The cursor changes back to the arrow to indicate that you are no longer in data label mode.

As an alternative, you can display data labels for all or some graphic elements using the menus.

If you want to display case labels for a specific graphic element or elements, select those elements. If you don't select specific elements, the Chart Editor will display labels for all graphic elements in the chart.

From the menus choose:

Elements
Show Data Labels

The Chart Editor displays the data label in a default position related to the graphic element.

How to Display All Data Labels Collapse Hide details

How to Display All Data Labels

As an alternative to data label mode, you can display data labels for all or some graphic elements using the menus.

If you want to display case labels for a specific graphic element or elements, select those elements. If you don't select specific elements, the Chart Editor will display labels for all graphic elements in the chart.

From the menus choose:

Elements
Show Data Labels

The Chart Editor displays the data label in a default position related to the graphic element.

How to Change the Look for Data Labels Collapse Hide details

How to Change the Look for Data Labels

Select all of the data labels. Selecting individual data labels is not possible, and you must exit data label mode before you can select the labels.

Use the Data Value Labels tab to change the content and position of the data labels.

To change the text formatting of the data labels, use the Text tab.

To change the fill and border for the data labels, use the Fill & Border tab.

How to Remove Individual Data Labels Collapse Hide details

How to Remove Individual Data Labels

You can remove the data labels if you no longer want to display them.

If you are not in data label mode, from the menus choose:

Elements
Data Label Mode

Click a data label.

The Chart Editor no longer displays the data value label.

How to Remove All Data Labels Collapse Hide details

How to Remove All Data Labels

You can also remove all data labels.

From the menus choose:

Elements
Hide Data Labels

The Chart Editor no longer displays the data value labels.

How to Use the Data Value Labels Tab Collapse Hide details

How to Use the Data Value Labels Tab

Displayed. You can have multiline labels with more than one content item. The Displayed list shows you the content items in the label. You can change the order in which the content items appear in the label. To change the order, select a content item, and then click either the up or the down arrow to the right of the list. The first content item in the list is displayed in the first line of the data label.

Note: If the chart is showing a summary statistic such as mean, the Percent label can be misleading. The percentage value is calculated by summing the previously summarized statistics and dividing by the number of items shown in the chart. The original count is not used unless counts are shown in the chart. Therefore, you should show percentage only when the chart shows a statistic with which percent makes sense, such as count and sum.

Not Displayed. This list shows the content items that are excluded from the data label. To exclude content items from the data label, select a content item in the Displayed list, and then click the X button. To move a content item into the label, select its name in the Not Displayed list, and then click the arrow to the right of the list.

Label Position. Select Custom to choose a custom position for all of the data labels. Then click the button that represents where you want the label to appear in relation to the graphic elements. Automatic positions all of the labels so that the labels do not overlap, if possible. You can also move individual data labels by dragging them to a new position directly on the chart. Manual is selected if any of the labels were moved in this way.

Display Options. By default, the Chart Editor does not display overlapping labels. You can override this behavior by selecting Display all labels. This causes the Chart Editor to display all data labels or all the labels for points that you selected in data label mode. You can also specify that a line connects the data label and the graphic element by selecting Display connecting lines to label. Additionally, you can have the border color and text color match the border color of the associated graphic element by selecting Match label color to graphic element.

Related Topics

Text Formatting
Fill and Border Style
Adding and Changing Text in a Chart
Text Boxes
Titles
Footnotes
Annotations
Editing Text
Deleting and Hiding Text


Editing Text

text,text,text
editing in a chart,editing in a chart,editing in a chart

You can directly edit the text in the chart.

Select an element with text in it.

Click the element after selecting it. Be careful not to double-click. The Chart Editor displays a blinking cursor to indicate that you can edit the text.

Edit the text.

Press Enter when you have finished editing the text.

If necessary, use the Text tab format the text.

Related Topics

Adding and Changing Text in a Chart
Text Boxes
Titles
Footnotes
Annotations
Data Labels
Deleting and Hiding Text


Deleting and Hiding Text

text,text,text
deleting in a chart,deleting in a chart,deleting in a chart
hiding in a chart,hiding in a chart,hiding in a chart

You can delete any text boxes or annotation frames that you added to the chart. Most other text you can hide by removing the check mark for an option in the Properties window. If you are trying to delete all of the text, do not delete the text directly (that is, by selecting the text and pressing Delete). Make sure to use the following steps for deleting and hiding text.

How to Delete Text

Select the text box or annotation frame. Make sure that the frame is selected, not the text.

From the menus choose:

Edit
Delete

How to Hide Text

Select the chart element associated with the text. For example, if you want to hide an axis title, select the axis.

On the chart element's tab in the Properties window, clear the check box that controls text display. For example, if you want to hide the axis title, clear the Display Axis Title check box on the Axis Labels tab.

Click Apply.

Related Topics

Adding and Changing Text in a Chart
Text Boxes
Titles
Footnotes
Annotations
Data Labels
Editing Text


Exploring Data in a Chart

You can use the Chart Editor to explore the data in the chart. Depending on the type of chart, there are different ways to explore. You might be able to add interpolation, fit, and reference lines. Or you might transform a scale axis by applying a log function to the axis. You can also change the variable roles—that is, which variables act as the dependent, independent, and grouping variables. These are just some of the options that are available.

Related Topics

Interpolation Lines
Fit Lines
Reference Lines
Spikes
Projection Lines and Category Range Bars
Axis Scale
Axis Scale for Matrix Scatterplots
Derived Axis
Categories
Variables and Chart Types
Displaying Line Markers
Binning (Grouping) Data Values
Displaying a Distribution Curve on a Histogram
Charts in the Scatterplot Matrix Diagonal
Exploring 3-D Charts
Paneled Charts
Error Bars
Linking Back to the Data
Changing Chart Types


Interpolation Lines

interpolation,interpolation,interpolation
line interpolation,line interpolation,line interpolation
chart lines,chart lines,chart lines
interpolation lines,interpolation lines,interpolation lines
step interpolation,step interpolation,step interpolation
jump interpolation,jump interpolation,jump interpolation
spline interpolation,spline interpolation,spline interpolation
missing values,missing values,missing values
line chart,line chart,line chart

An interpolation line connects data values. Interpolation lines apply to line charts, area charts, scatterplots (except for 3-D scatterplots), difference area charts, mean variable in error bar charts, and close variable in high-low-close charts. (Interpolation does not apply to histograms.)

Note that a line in a line, area, or difference area chart is an interpolation line.

How to Add an Interpolation Line Collapse Hide details

How to Add an Interpolation Line

If you want to add an interpolation line that connects graphic elements in a particular group, select the group. If no graphic elements are selected, the Chart Editor will create an interpolation line through all graphic elements.

From the menus choose:

Elements
Interpolation Line

Use the Interpolation Line tab to specify the interpolation method and to specify if interpolation continues through missing values.

If necessary, use the Line Options tab to display a projection line.

If necessary, use the Lines tab to specify the formatting for the interpolation line.

Click Apply.

How to Edit an Interpolation Line Collapse Hide details

How to Edit an Interpolation Line

Select the interpolation line.

From the menus choose:

Edit
Properties

Use the Interpolation Line tab to specify the interpolation method and to specify if interpolation continues through missing values.

If necessary, use the Line Options tab to display a projection line.

If necessary, use the Lines tab to specify the formatting for the interpolation line.

Click Apply.

How to Delete an Interpolation Line Collapse Hide details

How to Delete an Interpolation Line

Select an interpolation line.

Press Delete.

Using the Interpolation Line Tab Collapse Hide details

Using the Interpolation Line Tab

Straight. Connect the data values in succession by straight lines. This method is the same as the one used when a line chart is created.

Step. Draw a horizontal line through each data value, and connect the horizontal lines with vertical lines. Select Left Step, Center Step, or Right Step to indicate the data value's position on the horizontal line.

Jump. Draw a horizontal line through each data value. Select Left Jump, Center Jump, or Right Jump to indicate the data value's position on the horizontal line. Step and Jump work the same way except that Jump does not have vertical connecting lines.

Spline. Connect the data values by a cubic spline.

Interpolate line through missing values. By default, the Chart Editor breaks the line at missing values. You can select the check box to force the Chart Editor to continue the line through missing values.

Related Topics

Projection Lines and Category Range Bars
Line Style
Exploring Data in a Chart
Fit Lines
Reference Lines
Spikes
Axis Scale
Axis Scale for Matrix Scatterplots
Derived Axis
Categories
Variables and Chart Types
Displaying Line Markers
Binning (Grouping) Data Values
Displaying a Distribution Curve on a Histogram
Charts in the Scatterplot Matrix Diagonal
Exploring 3-D Charts
Paneled Charts
Error Bars
Linking Back to the Data
Changing Chart Types


Fit Lines

fit lines,fit lines,fit lines
chart lines,chart lines,chart lines
fit lines,fit lines,fit lines
regression lines,regression lines,regression lines
regression lines,regression lines,regression lines
spikes,spikes,spikes
with fit lines,with fit lines,with fit lines
linear regression lines,linear regression lines,linear regression lines
quadratic regression lines,quadratic regression lines,quadratic regression lines
cubic regression lines,cubic regression lines,cubic regression lines
Loess regression lines,Loess regression lines,Loess regression lines
iterative weighted least squares,iterative weighted least squares,iterative weighted least squares
least squares,least squares,least squares
confidence intervals,confidence intervals,confidence intervals

In a fit line, the data points are fitted to a line that usually does not pass through all of the data points. The fit line represents the trend of the data. Some fits lines are regression based. Others are based on iterative weighted least squares.

Fit lines apply to scatterplots. You can create fit lines for all of the data values on a chart or for the data values in groups, depending on what you select when you create the fit line.

How to Add a Fit Line Collapse Hide details

How to Add a Fit Line

If you want to add a fit line for graphic elements in a particular group, select the group. Otherwise, you do not need to select anything in the chart.

If you selected a specific group or want to add a fit line for all groups, from the menus choose:

Elements
Fit Line at Subgroups

If you want to add a fit line for all graphic elements in the chart, from the menus choose:

Elements
Fit Line at Total

Use the Fit Line tab to specify the options for the fit line.

If necessary, use the Lines tab to specify the formatting for the fit line.

Click Apply.

How to Edit a Fit Line Collapse Hide details

How to Edit a Fit Line

Select a fit line.

From the menus choose:

Edit
Properties

Use the Fit Line tab to specify the options for the fit line.

If necessary, use the Lines tab to specify the formatting for the fit line.

Click Apply.

How to Delete a Fit Line Collapse Hide details

How to Delete a Fit Line

Select a fit line.

Press Delete.

Using the Fit Line Tab Collapse Hide details

Using the Fit Line Tab

Display spikes. Draw spikes (connecting lines) from each data point to the corresponding point on the fit line.

Suppress intercept. Do not use a constant intercept value for the fit line calculation. Therefore, the fit line is drawn through the origin.

Mean of y. Draw a line with no slope at the mean of the y-axis data values.

Linear. Draw a regression line with a linear slope that best fits the data points. The regression is computed using the least squares method and a constant (unless Suppress intercept is selected).

Quadratic. Draw a regression line with a quadratic slope that best fits the data points. The regression is computed using the least squares method and a constant (unless Suppress intercept is selected).

Cubic. Draw a regression line with a cubic slope that best fits the data points. The regression is computed using the least squares method and a constant (unless Suppress intercept is selected).

Loess. Draw a fit line using iterative weighted least squares. This method uses the specified proportion of data points to calculate a local smoother. The default proportion is 50%. In addition to changing the proportion, you can select a specific kernel function. The kernel function specifies which data points in relation to the current point receive more weight. The default works well for most data.

uniform | All data receive equal weights.
epanechnikov | Data near the current point receive higher weights than extreme data receive. This function weights extreme points more than the triweight, biweight, and tricube kernels but less than the Gaussian and Cauchy kernels.
biweight | Data far from the current point receive more weight than the triweight kernel allows but less weight than the Epanechnikov kernel permits.
tricube | Data close to the current point receive higher weights than both the Epanechnikov and biweight kernels allow.
triweight | Data close to the current point receive higher weights than any other kernel allows. Extreme cases get very little weight.
gaussian | Weights follow a normal distribution, resulting in higher weighting of extreme cases than the Epanechnikov, biweight, tricube, and triweight kernels.
cauchy | Extreme values receive more weight than the other kernels, with the exception of the uniform kernel, allow.

Confidence intervals. Draw a pair of lines around the regression fit line to illustrate the confidence level percentage that you specify. Choose Mean to draw the intervals based on the predicted mean from the regression line. Choose Individual to draw the intervals based on individual predicted y values from the regression line. Confidence intervals are not available for Loess fit lines because they are not regression-based.

Related Topics

Line Style
Exploring Data in a Chart
Interpolation Lines
Reference Lines
Spikes
Projection Lines and Category Range Bars
Axis Scale
Axis Scale for Matrix Scatterplots
Derived Axis
Categories
Variables and Chart Types
Displaying Line Markers
Binning (Grouping) Data Values
Displaying a Distribution Curve on a Histogram
Charts in the Scatterplot Matrix Diagonal
Exploring 3-D Charts
Paneled Charts
Error Bars
Linking Back to the Data
Changing Chart Types


Reference Lines

reference lines,reference lines,reference lines
chart lines,chart lines,chart lines
reference lines,reference lines,reference lines

You can add a vertical and/or horizontal line to emphasize a specific value in your chart. For example, if your data are salaries that you want to compare to last year's, you can display a reference line that represents last year's average salary. You can also add a reference line from a specific equation.

How to Add a Horizontal or Vertical Reference Line Collapse Hide details

How to Add a Horizontal or Vertical Reference Line

From the menus choose:

Options
X (Y) Axis Reference Line

The Chart Editor creates the reference line near the center of the chart and opens the Properties window to the Reference Line tab.

Use the Reference Line tab to specify a position for the reference line.

If necessary, use the Lines tab to change the formatting for the reference line. See the topic Line Style for more information.

Click Apply.

How to Add a Reference Line from an Equation Collapse Hide details

How to Add a Reference Line from an Equation

Note: Creating a reference line from an equation is available only for 2-D charts with two scale axes.

From the menus choose:

Options
Reference Line from Equation

The Chart Editor creates a linear equation reference line with a slope of 1 and y-intercept of 0. The Chart Editor also opens the Properties window to the Reference Line tab.

Use the Reference Line tab to modify the equation.

If necessary, use the Lines tab to change the formatting for the reference line. See the topic Line Style for more information.

Click Apply.

How to Edit a Reference Line Collapse Hide details

How to Edit a Reference Line

Select the reference line.

From the menus choose:

Edit
Properties

Axis reference lines only. Use the Reference Line tab to specify a position for the reference line. You can also drag and drop the reference line to a new location. Use the tab if you need to move it to a precise location.

Equation reference lines only. Use the Reference Line tab to define the equation used to create the reference line.

If necessary, use the Lines tab to change the formatting for the reference line. See the topic Line Style for more information.

Click Apply.

How to Delete a Reference Line Collapse Hide details

How to Delete a Reference Line

Select a reference line.

Press Delete.

Using the Reference Line Tab Collapse Hide details

Using the Reference Line Tab

Scale Axis. Change the position of the reference line by entering a numeric value for a scale axis or choosing a common statistic from the Set to drop-down list. You cannot specify a value outside of the range of the displayed scale.

Category Axis. Change the position of the reference line by choosing a category for a categorical axis.

Custom Equation. Specify a custom equation for drawing the reference line. This option is available if you created the reference line by choosing Reference Line from Equation from the Options menu. It is also available for charts created by procedures that produce these lines (like Curve Estimation). For information about valid expressions, see Equation Syntax.

Attach label to line. Attach a label to the reference line for displaying the position of the line. The label displays a numeric value for scale axis reference lines, a category value for category axis reference lines, and an equation for reference lines from an equation.

Related Topics

Equation Syntax
Line Style
Interpolation Lines
Fit Lines
Spikes
Projection Lines and Category Range Bars
Axis Scale
Axis Scale for Matrix Scatterplots
Derived Axis
Categories
Variables and Chart Types
Displaying Line Markers
Binning (Grouping) Data Values
Displaying a Distribution Curve on a Histogram
Charts in the Scatterplot Matrix Diagonal
Exploring 3-D Charts
Paneled Charts
Error Bars
Linking Back to the Data
Changing Chart Types


Equation Syntax

reference lines,reference lines,reference lines
equation syntax,equation syntax,equation syntax

You can customize the equation used to draw a reference line from an equation. This topic provides an overview of the syntax for these equations. For information about adding the reference line and the tab on which you specify the equation, see Reference Lines.

Basic Rules Collapse Hide details

Basic Rules

• The equation is always a function of the variable on the x axis.

• Use x to indicate the variable on the x axis.

• White space in the equation is irrelevant.

• Function parameters can be an absolute value (for example, 50) or x.

Operators Collapse Hide details

Operators

Operator | Meaning | Notes
+ | Addition or string concatenation | Using + with numbers adds the numbers. Using it with strings concatenates the strings.
- | Subtraction |
* | Multiplication |
/ | Division |
( ) | Grouping | Grouped expressions are calculated before other expressions.
** | Exponentiation |
== | Equal |
!= | Not equal |
< | Less than |
> | Greater than |
<= | Less than or equal to |
>= | Greater than or equal to |
&& | Logical AND |
|| | Logical OR |
? : | Conditional | These operators are shorthand for then-else when evaluating a Boolean operand. For example, x>15?”High”:”Low” returns “High” if x > 15. Otherwise, the expression returns “Low”.
Mathematical Functions Collapse Hide details

Mathematical Functions

Function | Result | Notes
abs(n) | The absolute value of n |
acos(n) | The inverse cosine (arcosine) of n |
asin(n) | The inverse sine (arcsine) of n |
atan(n) | The inverse tangent (arctangent) of n |
atanh(n) | The hyperbolic inverse tangent (hyperbolic arctangent) of n |
ceil(n) | The smallest integer that is greater than n | Round up
cos(n) | The cosine of n |
cosh(n) | The hyperbolic cosine of n |
exp(n) | e raised to the power n, where e is the base of the natural logarithms |
floor(n) | The largest integer that is less than n | Round down
gamma(n) | The complete Gamma function of n |
int(n) | The value of n truncated to an integer (toward 0) |
lgamma(n) | The logarithm of the complete Gamma function of n |
log(n) | The natural (base-e) logarithm of n |
log2(n) | The base-2 logarithm of n |
log10(n) | The base-10 logarithm of n |
mod(n, modulus) | The remainder when n is divided by modulus |
pow(n, power) | The value of n raised to the power of power |
round(n) | The integer that results from rounding the absolute value of n and then reaffixing the sign. Numbers ending in 0.5 exactly are rounded away from 0. For example, round(-4.5) rounds to -5. |
sin(n) | The sine of n |
sinh(n) | The hyperbolic sine of n |
sqrt(n) | The positive square root of n |
tan(n) | The tangent of n |
tanh(n) | The hyperbolic tangent of n |
String Functions Collapse Hide details

String Functions

Function | Result | Notes
concatenate(string1, string2) | A string that is the concatenation of string1 and string2 |
datetostring(date) | The string that results when date is converted to a string |
indexof(haystack,needle[,divisor]) | A number that indicates the position of the first occurrence of needle in haystack. The optional third argument, divisor, is a number of characters used to divide needle into separate strings. Each substring is used for searching and the function returns the first occurrence of any of the substrings. For example, indexof(x, “abcd”) will return the value of the starting position of the complete string "abcd" in the string variable x; indexof(x, “abcd”, 1) will return the value of the position of the first occurrence of any of the values in the string; and indexof(x, “abcd”, 2) will return the value of the first occurrence of either "ab" or "cd". Divisor must be a positive integer and must divide evenly into the length of needle. Returns 0 if needle does not occur within haystack. |
length(string) | A number indicating the length of string |
lowercase(string) | string with uppercase letters changed to lowercase and other characters unchanged |
ltrim(string[, char]) | string with any leading instances of char removed. If char is not specified, leading blanks are removed. Char must resolve to a single character. |
midstring(string , start, end) | The substring beginning at position start of string and ending at end |
numbertostring(n) | The string that results when n is converted to a string |
replace(target, old, new) | In target, instances of old are replaced with new. All arguments are strings. |
rtrim(string[, char]) | string with any trailing instances of char removed. If char is not specified, trailing blanks are removed. Char must resolve to a single character. |
stringtodate(string) | The value of the string expression string as a date |
stringtonumber(string) | The value of the string expression string as a number |
substring(string, start, length) | The substring beginning at position start of string and running for length length |
trim(string) | string with any leading and trailing blanks removed |
uppercase(string) | string with lowercase letters changed to uppercase and other characters unchanged |
Date and Time Functions Collapse Hide details

Date and Time Functions

Function | Result | Notes
date() | The current date |
time() | The current time |
Constants Collapse Hide details

Constants

Constant | Meaning | Notes
true | True |
false | False |
pi | pi |
e | Euler's number or the base of the natural logarithm |

Related Topics

Reference Lines


Spikes

spikes,spikes,spikes
scatterplots,scatterplots,scatterplots
spikes,spikes,spikes

You can display a line from each data point to another location in the chart. These lines are called spikes and apply to simple and 3-D scatterplots. Spikes can help emphasize the difference between a data point and some other point of interest. For example, you might add spikes to see which point is furthest from the centroid. Spikes are also useful when printing a 3-D scatterplot.

You can also display spikes from a fit line to the data points. See the topic Fit Lines for more information.

How to Display Spikes on a Scatterplot Collapse Hide details

How to Display Spikes on a Scatterplot

Select all data markers the scatterplot. You cannot display spikes for only one category.

From the menus choose:

Edit
Properties

Use the Spikes tab to specify a location for the spikes.

Click Apply.

Using the Spikes Tab Collapse Hide details

Using the Spikes Tab

None. Do not display spikes.

Floor. Display spikes from each point to the x axis in a 2-D scatterplot or the plane of the x and z axes in a 3-D scatterplot.

Origin. Display spikes from each point to the origin of the axes. The origin is the point at which all of the axes intersect (0,0,0).

Centroid. Display spikes from each point to the centroid of all the points. The coordinates of the centroid are the weighted means for each axis. A missing value in any one of the variables excludes the case from the calculation. Changing the scale does not affect the calculation of the centroid.

Related Topics

Exploring Data in a Chart
Interpolation Lines
Fit Lines
Reference Lines
Projection Lines and Category Range Bars
Axis Scale
Axis Scale for Matrix Scatterplots
Derived Axis
Categories
Variables and Chart Types
Displaying Line Markers
Binning (Grouping) Data Values
Displaying a Distribution Curve on a Histogram
Charts in the Scatterplot Matrix Diagonal
Exploring 3-D Charts
Paneled Charts
Error Bars
Linking Back to the Data
Changing Chart Types


Projection Lines and Category Range Bars

projection line,projection line,projection line
adding to a chart,adding to a chart,adding to a chart
chart lines,chart lines,chart lines
projection lines,projection lines,projection lines

For line charts and charts to which you add an interpolation line, you can display a projection line. You can also display category range bars for charts with multiple lines.

How to Add a Project Line or Category Range Bars Collapse Hide details

How to Add a Project Line or Category Range Bars

Your chart must include a line graphic element.

Select the interpolation line or the line in a line chart.

If the Properties window is not displayed, from the menus choose:

Edit
Properties

Use the Line Options tab to display the projection line in the desired location and to display the category range bars. The check box for displaying category range bars is enabled only if the chart contains multiple lines.

Click Apply.

Using the Line Options Tab Collapse Hide details

Using the Line Options Tab

Display Category Range Bars. For charts with more than one line, you can display bars that connect the lines for each category. These bars emphasize the category ranges.

Display Projection. Create a projection line. Select this option to differentiate visually between values before and after the value in the Category list box or the Value text box. Use Direction to specify whether the projection portion of the line begins before or after the value. The projection will be displayed with a weight different from the other portion of the line. Any other formatting (for example, color) applies to the whole line. Note: This option applies to all line graphic elements in the chart. You cannot have it active for some but not for others.

Related Topics

Exploring Data in a Chart
Interpolation Lines
Fit Lines
Reference Lines
Spikes
Axis Scale
Axis Scale for Matrix Scatterplots
Derived Axis
Categories
Variables and Chart Types
Displaying Line Markers
Binning (Grouping) Data Values
Displaying a Distribution Curve on a Histogram
Charts in the Scatterplot Matrix Diagonal
Exploring 3-D Charts
Paneled Charts
Error Bars
Linking Back to the Data
Changing Chart Types


Axis Scale

axis scale,axis scale,axis scale
axis range,axis range,axis range
chart axis,chart axis,chart axis
scale,scale,scale
range,range,range
transformations,transformations,transformations
scale axes,scale axes,scale axes
range,range,range
transformations,transformations,transformations
origin lines,origin lines,origin lines
axes,axes,axes
margins,margins,margins
scale,scale,scale
range,range,range
margins,margins,margins
scale axis,scale axis,scale axis

You can change the axis scale to specify the range for the axis and whether the axis is linear or transformed. These options apply only to scale axes.

How to Change the Axis Scale Collapse Hide details

How to Change the Axis Scale

Note: You can also use the rescaling tool to change the scale quickly. However, this tool changes the scale of all axes in the chart. See the topic Changing Axis Scales for more information.

Select a scale axis. Note that there are separate steps to change the axis scale on a matrix scatterplot. See the topic Axis Scale for Matrix Scatterplots for more information.

If the Properties window is not already displayed, from the menus choose:

Edit
Properties

Use the Scale tab to specify the axis scale options.

Click Apply.

Using the Scale Tab Collapse Hide details

Using the Scale Tab

If Auto is selected for the values, the Chart Editor automatically sets the value to include all of the data and to create appropriate tick labels (for example, 10 instead of 10.0123). If you don't get the exact results that you expect from the range settings, deselect Auto for each setting and enter custom values.

Minimum/Maximum. Change the range for the axis. The minimum and maximum values in the data for the graph are listed so that you can set a range that includes all of the data. Other graph elements (for example, annotations) can be hidden when you change the range. If elements you expect to see aren't displayed, change the range back to automatic. If the scale is transformed, the range values are specified in the same units as the data values.

Major Increment. Specify the size of the increments between major ticks/labels. Beginning with the minimum value, a major tick occurs at every increment specified by this number. In general, a division size that divides evenly into your range works best. For example, if your axis minimum is 0 and the maximum is 400, division sizes of 100, 50, or 25 would work well.

Origin. Specify the origin. The origin has a different effect depending on the graph type.

• For charts with bars and lines, the origin specifies the line from which bars and areas extend. The graphic elements originate at the origin and extend toward their value. For example, if your bar chart includes values of 367 and 48 and the origin is 100, one bar extends up from 100 to 367 (in default coordinates), while the other bar extends down to 48. The specified value for the origin must fall within the minimum and maximum.

• For a scatterplot, specifying an origin is useful only with a transformed axis. The effect of changing the origin is most obvious when the data are far from the origin, because the transformation takes the origin into account. For example, assume that the axis is a log scale. The equation for the transformation is y'=log(y-origin). Therefore, if the data points are 1001, 1002, 1010 and the origin is 0, the transformation will look similar to an untransformed scale. However, if you change the origin to 1000, the transformation will look like a log scale as expected.

Display Line at Origin. Displays the axis at the value specified in the Origin text box.

Type. Displays the data on a linear or transformed scale. Scale transformations help you to understand the data or to make assumptions necessary for statistical inference. On scatterplots, you might use a transformed scale if the relationship between the independent and dependent variables is nonlinear. You can often transform these relationships into a straight-line relationship. Scale transformations can also be used to make a skewed histogram more symmetric and more like a normal distribution. Note that you are transforming only the scale on which the data are displayed; you are not transforming the actual data.

• Linear. Displays a linear, untransformed scale.

• Log. Displays a log-transformed scale. Optionally, you can enter a base for the log, which must be greater than 1. If Safe is selected, the transformation formula used for taking the log of an axis value x is not log(x). The Chart Editor uses a different formula (safe log), so that it can handle 0 and negative values.

Formula for Safe Log Transformation Collapse Hide details

The safe log formula is:

sign(x) * log(1 + abs(x))

So if you assume that the axis value is –99, the result of the transformation is:

sign(-99) * log(1 + abs(-99)) = -1 * log(1 + 99) = -1 * 2 = -2

• Power. Displays an exponent-transformed scale. Optionally, you can enter a power. The default is 0.5, which would take the square root of the data.

Margins. Creates a margin around the data. You specify a percentage (0 to 50) of the inner frame to use for the margin. The margin appears perpendicular to the selected axis. For example, if you set the upper margin to 5% for the vertical axis, a margin whose thickness is 5% of the data area runs along the top of the data frame.

Related Topics

Axis Scale for Matrix Scatterplots
Exploring Data in a Chart
Interpolation Lines
Fit Lines
Reference Lines
Spikes
Projection Lines and Category Range Bars
Derived Axis
Categories
Variables and Chart Types
Displaying Line Markers
Binning (Grouping) Data Values
Displaying a Distribution Curve on a Histogram
Charts in the Scatterplot Matrix Diagonal
Exploring 3-D Charts
Paneled Charts
Error Bars
Linking Back to the Data
Changing Chart Types


Axis Scale for Matrix Scatterplots

axis scale,axis scale,axis scale
axis range,axis range,axis range
chart axis,chart axis,chart axis
scale,scale,scale
range,range,range
transformations,transformations,transformations
scale axes,scale axes,scale axes
range,range,range
transformations,transformations,transformations
origin lines,origin lines,origin lines
axes,axes,axes
margins,margins,margins
scale,scale,scale
range,range,range
margins,margins,margins
scale axis,scale axis,scale axis

You can change the axis scale on a matrix scatterplot to specify the range for the axis and whether the axis is linear or transformed. Any customizations you make to the axis scale options apply to all variables in the scatterplot.

How to Change the Axis Scale in a Matrix Scatterplot Collapse Hide details

How to Change the Axis Scale in a Matrix Scatterplot

Select a scale axis on the matrix.

If the Properties window is not already displayed, from the menus choose:

Edit
Properties

Use the Matrix Axis Scale tab to specify the axis scale options.

Click Apply.

Using the Matrix Axis Scale Tab Collapse Hide details

Using the Matrix Axis Scale Tab

If Auto is selected for the values, the Chart Editor automatically sets an appropriate value for each individual variable. Therefore, there might be different ranges for the different variables. On the other hand, when you deselect this check box and set the values manually, the values apply to all variables.

Minimum/Maximum. Change the range for all variables. The minimum and maximum values in the data for the chart are listed so that you can set a range that includes all of the data. These are the smallest and largest values across all variables. Other chart elements (for example, annotations) can be hidden when you change the range. If elements you expect to see aren't displayed, change the range back to automatic. If the scale is transformed, the range values are specified in the same units as the data values.

Major Increment. Specify the size of the increments between major ticks/labels. Beginning with the Minimum value, they occur at every increment specified by this number. In general, a division size that divides evenly into your range works best. For example, if your axis minimum is 0 and the maximum is 400, division sizes of 100, 50, or 25 would work well.

Origin. Specify the origin. An origin line is useful for matrix scatterplots with a transformed axis. The effect of changing the origin is most obvious when the data are far from the origin, because the transformation takes the origin into account. For example, assume that the axis is a log scale. The equation for the transformation is y'=log(y-origin). Therefore, if the data points are 1001, 1002, 1010 and the origin is 0, the transformation will look similar to an untransformed scale. However, if you change the origin to 1000, the transformation will look like a log scale as expected.

Display Line at Origin. Displays the axis at the value specified in the Origin text box.

Scale Type. Displays the data for all variables on a linear or transformed scale. A transformed scale is useful if the relationship between the independent and dependent variables is nonlinear. You can often transform these relationships into a straight-line relationship. Transformations help you to understand the data or to make assumptions necessary for statistical inference.

• Linear. Displays a linear, untransformed scale.

• Logarithmic. Displays a log-transformed scale. Optionally, you can enter a base for the log, which must be greater than 1. If Safe is selected, the transformation formula used for taking the log of an axis value x is not log(x). The Chart Editor uses a different formula so that it can take the log of nonpositive values. However, for values much greater than 1, it is essentially equivalent to log(x).

Formula for Safe Log Transformation Collapse Hide details

The safe log formula is:

sign(x) * log(1 + abs(x))

So, if you assume the axis value is –99, the result of the transformation is:

sign(-99) * log(1 + abs(-99)) = -1 * log(1 + 99) = -1 * 2 = -2

• Power. Displays an exponent-transformed scale. Optionally, you can enter a power. The default is 0.5, which would take the square root of the data.

Margins. Creates a margin around the data. You specify a percentage (0 to 50) of the inner frame to use for the margin. The margin appears perpendicular to the selected axis. For example, if you set the upper margin to 5% for the vertical axis, a margin whose thickness is 5% of the data area runs along the top of the data frame.

Related Topics

Axis Scale
Exploring Data in a Chart
Interpolation Lines
Fit Lines
Reference Lines
Spikes
Projection Lines and Category Range Bars
Derived Axis
Categories
Variables and Chart Types
Displaying Line Markers
Binning (Grouping) Data Values
Displaying a Distribution Curve on a Histogram
Charts in the Scatterplot Matrix Diagonal
Exploring 3-D Charts
Paneled Charts
Error Bars
Linking Back to the Data
Changing Chart Types


Derived Axis

derived axes,derived axes,derived axes
chart axis,chart axis,chart axis
derived axis,derived axis,derived axis
scale axes,scale axes,scale axes
derived axes,derived axes,derived axes
axes,axes,axes
derived axes,derived axes,derived axes

You can add a secondary axis that is derived from another axis. For example, if you are working with currency data, you can display both U.S. dollars and euros as scale axes.

How to Add a Derived Axis Collapse Hide details

How to Add a Derived Axis

Select the scale axis for which you want to create a derived axis. This is the primary axis. If no axis is selected, the Chart Editor creates a derived axis for all scale axes in the chart.

From the menus choose:

Options
Show Derived Axis

The Chart Editor adds the derived axis opposite the selected axis, selects it, and opens the Properties window to the Derived Axis tab.

Use the Derived Axis tab to specify the relationship between the derived axis and the primary axis. The range of the primary axis and the relationship between the axes determines the range of the derived axis.

If necessary, use the Labels & Ticks tab to change the display of ticks and labels for the derived axis.

Click Apply.

If necessary, change the derived axis title, which you can edit as you edit other text in the chart. See the topic Editing Text for more information.

How to Remove a Derived Axis Collapse Hide details

How to Remove a Derived Axis

Select the derived axis.

From the menus choose:

Options
Hide Derived Axis

Using the Derived Axis Tab Collapse Hide details

Using the Derived Axis Tab

• Ratio. Change the ratio of the primary axis unit to derived axis unit. For example, assume that the ratio of Euros to U.S. dollars is 1.1 to 1. Type 1 for the scale axis and 1.1 for the derived axis. (Conversely, if you knew that the ratio of U.S. dollars to Euros was 0.9 to 1, you would type 0.9 for the scale axis and 1 for the derived axis.) The ratio must be a positive number.

• Match. Relate a specific position on the primary scale axis to a specific position on the derived axis. In other words, the derived axis is shifted in relation to the primary axis.

Related Topics

Exploring Data in a Chart
Interpolation Lines
Fit Lines
Reference Lines
Spikes
Projection Lines and Category Range Bars
Axis Scale
Axis Scale for Matrix Scatterplots
Categories
Variables and Chart Types
Displaying Line Markers
Binning (Grouping) Data Values
Displaying a Distribution Curve on a Histogram
Charts in the Scatterplot Matrix Diagonal
Exploring 3-D Charts
Paneled Charts
Error Bars
Linking Back to the Data
Changing Chart Types


Categories

categories,categories,categories
changing in a chart,changing in a chart,changing in a chart
categorical axes,categorical axes,categorical axes
collapsing categories,collapsing categories,collapsing categories
margins,margins,margins
categorical axis,categorical axis,categorical axis
axes,axes,axes
margins,margins,margins
categorical,categorical,categorical

You can reorder and exclude categories in a pie chart, a chart with a categorical axis, or a paneled chart.

How to Reorder and Exclude Categories Collapse Hide details

How to Reorder and Exclude Categories

Select any graphic element in the chart.

If the Properties window is not displayed, from the menus choose:

Edit
Properties

Use the Categories tab to specify the order of the categories and which ones you want to exclude.

Click Apply.

Using the Categories Tab Collapse Hide details

Using the Categories Tab

Variable. Select the variable whose categories you want to reorder or exclude.

Collapse. Collapse the smallest categories into a single Other category. If the check box is selected, the Chart Editor collapses any categories whose percentage of the total is less than the specified number. Use this feature to combine categories that are so small that you don't need to display them separately. For example, if you have a pie chart with many categories, consider collapsing categories with a percentage of 10 and under. The percentage is based on the statistic shown in the chart. So if the chart is showing means, the percentage is calculated by summing the mean values, which may not be desired. Therefore, you should use the feature only with statistics for which it makes sense to sum the values, such as count and sum.

Tip Collapse Hide details

Tip

You can change the label for the collapsed category by editing it directly in the chart after you click Apply.

Sort by and Direction. Select a sorting option for the categories within the variable. Excluding Custom, any of the sorting options can be ascending or descending.

Note: Unless you select the Custom option, the Order list does not reflect the order in which the categories will appear in the chart. You can see the new order in the chart by clicking Apply. If the new order is not what you expect, just undo the reordering (select Undo from the Edit menu).

• Custom. Uses the order shown in the Order list.

• Label. Uses the category labels for sorting the variable's categories. These are the labels that appear in the chart, usually as tick labels.

• Statistic. Uses the statistic calculated on the y axis for sorting the variable's categories. Examples of statistics include counts, percentages, and means. If the chart is mixed (a combination of two different data types such as bars and lines), stacked, or clustered, the sort is across the other sets of categories in the chart. For example, consider a clustered bar chart with Employment Category as the categorical axis variable and Gender as the legend variable. If you are sorting categories in the Employment Category variable (that is, sorting the clusters on the x axis), the Chart Editor considers the total of both genders in each employment category when sorting. The sort order of the genders (bars) in each cluster does not change. For box plots, the statistic is always the median of the variable.

• Value. Uses the value stored in the dataset for sorting the variable's categories. The category's value is what identifies the category in the dataset. It often differs from its label and is not necessarily descriptive. For example, the value might be a number (for example, 1), while the label is a text description of the category (for example, Female). The value is displayed in parentheses in the Order list.

Order. Manually change the order in which categories appear in the chart. To change the order, select a category name, and then click either the up or the down arrow to the right of the list. The first category in the list is displayed first on the chart. When you manually change the order, the value of Sort by changes to Custom.

Note: You can also use the rescaling tool to exclude categories on the categorical axis. However, this tool modifies the scale of all axes in the chart. See the topic Changing Axis Scales for more information.

Excluded. This list shows the categories that are excluded from the chart. To exclude categories from the chart, select a category name in the Order list, and then click the X button. To move the category back, select its name in the Excluded list, and then click the arrow to the right of the list. Other chart elements associated with a category (for example, annotations) can be hidden when you exclude a category. If elements you expect to see aren't displayed, move all excluded categories back to the Order list.

Margins. Creates a margin around the data. You specify a percentage (0 to 50) of the inner frame to use for the margin. The margin appears perpendicular to the categorical axis. For example, if you set the upper margin to 5% for the vertical axis, a margin whose thickness is 5% of the data area runs along the top of the data frame.

Related Topics

Exploring Data in a Chart
Interpolation Lines
Fit Lines
Reference Lines
Spikes
Projection Lines and Category Range Bars
Axis Scale
Axis Scale for Matrix Scatterplots
Derived Axis
Variables and Chart Types
Displaying Line Markers
Binning (Grouping) Data Values
Displaying a Distribution Curve on a Histogram
Charts in the Scatterplot Matrix Diagonal
Exploring 3-D Charts
Paneled Charts
Error Bars
Linking Back to the Data
Changing Chart Types


Variables and Chart Types

variables in charts,variables in charts,variables in charts
chart axis,chart axis,chart axis
assigning variables to,assigning variables to,assigning variables to
paneling,paneling,paneling
assigning variables to,assigning variables to,assigning variables to
clustering,clustering,clustering
assigning variables to,assigning variables to,assigning variables to
stacking,stacking,stacking
assigning variables to,assigning variables to,assigning variables to
chart types,chart types,chart types
changing in the Chart Editor,changing in the Chart Editor,changing in the Chart Editor

The Variables tab allows you to change the structure of your chart. You can use the tab to convert the underlying graphic element and to redefine the roles of the variables in chart. Specific examples of these changes include:

• Converting from one chart type to another (for example, converting a bar chart to a line chart or a scatterplot matrix to a 3-D scatterplot).

• Moving a variable to a different axis.

• Changing the clustering or stacking variable.

• Changing the grouping variable.

• Changing the paneling variable.

Examples of Using the Variables Tab provides steps that illustrate some of these examples.

Except for converting the chart type, changes using the Variables tab involve the variable roles. Changing the variable role alters the way in which the Chart Editor calculates statistics. It is not a simple change in the way the chart looks. For example, the fit line calculation is different if you redefine which variable is the x-axis (independent) variable and which is the y-axis (dependent) variable. If you want to show only the variables on different axes, transpose the chart instead. Transposing is like swapping the chart axes. See the topic Transposing a Chart for more information.

Using the Variables Tab Collapse Hide details

Using the Variables Tab

The following descriptions use the term variable for actual variables in the data and for measurement variables (such as count or percentage) that are calculated when the chart is created.

Element Type. Specify the graphic element type. Depending on the underlying structure of the chart, some graphic element types may not be available. When you change the element type, the Chart Editor automatically changes the roles of the variables in the chart, if necessary. For example, if you are converting a clustered bar chart to a pie chart, clustering doesn't make sense for the pie chart. Therefore, the Chart Editor will use the clustering variable for paneling instead.

Variables Grid. The variables grid appears below the Element Type drop-down list. It allows you to change the roles of the variables in the chart. The variable role defines how a variable is used in the chart. For example, you can change a paneling variable into a clustering variable. Or you can move a variable to another axis. In addition to assigning a role for a variable, you can identify the style that is associated with the role, such as whether color or pattern is used for the clustering variable.

The first column in the variables grid identifies the available variables, sorted in alphabetical order. Some available variables may not be in displayed the chart. For each variable, you can assign a role. Click the other cell in the same row as the variable name to reveal a drop-down list that shows the available roles for the variable. If you assign a role that is already assigned to another variable, the Chart Editor swaps the roles of the two variables. You can also choose the first option, Exclude, to exclude the variable from the chart. Excluding a variable isn't always possible, depending on whether the variable is needed to preserve the validity of an underlying statistic.

If you choose a role other than the axis and paneling roles, you can assign an applicable style to the role (such as color for the clustering variable) by clicking the cell directly below the cell that defines the role. Styles appear at the end of the list, but they are not available before choosing a role. You don't have to choose a style. If you don't choose a style, the Chart Editor picks an appropriate default when you click Apply. You can change the variable role style at any time. You can assign multiple styles to the same role (like pattern and color for the grouping variable). Click the next available cell for the variable and choose a style from the list.

Element. Below the variables grid is a group of controls for creating and navigating multiple graphic elements. For example, if you have a chart with markers (points) and lines, you can use these controls to switch between the graphic elements and assign roles to the variables for each element. Overlay scatterplots are always multiple element charts. Another common example is a scatterplot with a fit line. The markers are one element, and the fit line is another. Grouped charts (like a grouped scatterplot), on the other hand, are not multiple element charts. A multiple element chart typically has different variables or statistics assigned to the elements.

To add an element to a chart, click New and then use the variables grid to assign roles to the variables associated with the element. You can navigate the graphic elements in the chart by clicking Next and Previous.

Related Topics

Examples of Using the Variables Tab
Interpolation Lines
Fit Lines
Reference Lines
Spikes
Projection Lines and Category Range Bars
Axis Scale
Axis Scale for Matrix Scatterplots
Derived Axis
Categories
Displaying Line Markers
Binning (Grouping) Data Values
Displaying a Distribution Curve on a Histogram
Charts in the Scatterplot Matrix Diagonal
Exploring 3-D Charts
Paneled Charts
Error Bars
Linking Back to the Data
Changing Chart Types


Examples of Using the Variables Tab

This topic provides several examples of using the Variables tab.

Using Clustering Instead of Stacking Collapse Hide details

Using Clustering Instead of Stacking

Create a stacked bar chart and open it in the Chart Editor.

On the Variables tab, click the cell that displays Stack and select X Cluster.

Click Apply.

Changing the Aesthetic Used for a Grouping Variable Collapse Hide details

Changing the Aesthetic Used for a Grouping Variable

Create a grouped chart (such as a clustered chart or a grouped scatterplot) and open it in the Chart Editor.

On the Variables tab, click the cell that displays the current aesthetic (such as Style: Color) and select a different aesthetic.

Click Apply.

Converting from a Scatterplot Matrix to a 3-D Scatterplot Collapse Hide details

Converting from a Scatterplot Matrix to a 3-D Scatterplot

Create a scatterplot matrix and open it in the Chart Editor.

On the Variables tab, select Marker from the Element drop-down list.

This action creates a 2-D scatterplot that plots the first two variables in the matrix. The other variables are excluded.

Assign one of the other variables to Z Axis. You can also change the variables on the other axes.

Click Apply.

Converting from an Overlay Scatterplot to a Simple 2-D Scatterplot Collapse Hide details

Converting from an Overlay Scatterplot to a Simple 2-D Scatterplot

Create an overlay scatterplot and open it in the Chart Editor.

To convert the overlay scatterplot, you need to delete the extra overlaid elements. Eventually there will be only one element left.

On the Variables tab, use Next and Previous to move to an overlaid element that you want to delete.

Click Delete.

Repeat the previous two steps for each extra overlaid element.

Click Apply.

Related Topics

Variables and Chart Types


Displaying Line Markers

line markers,line markers,line markers
chart lines,chart lines,chart lines
line markers,line markers,line markers

You can display markers for the specific data points on line charts.

From the menus choose:

Elements
Show Line Markers

The Chart Editor displays markers at the data points. If necessary, you can change the formatting for the markers:

If the Properties window is not already displayed, from the menus choose:

Edit
Properties

Use the Marker tab to specify the formatting for the markers.

Related Topics

Marker Style
Exploring Data in a Chart
Interpolation Lines
Fit Lines
Reference Lines
Spikes
Projection Lines and Category Range Bars
Axis Scale
Axis Scale for Matrix Scatterplots
Derived Axis
Categories
Variables and Chart Types
Binning (Grouping) Data Values
Displaying a Distribution Curve on a Histogram
Charts in the Scatterplot Matrix Diagonal
Exploring 3-D Charts
Paneled Charts
Error Bars
Linking Back to the Data
Changing Chart Types


Binning (Grouping) Data Values

bins,bins,bins
binning,binning,binning
point binning,point binning,point binning
grouping points in charts,grouping points in charts,grouping points in charts
scatterplots,scatterplots,scatterplots
binning,binning,binning
histograms,histograms,histograms
binning,binning,binning
data points in charts,data points in charts,data points in charts
binning,binning,binning
grouping,grouping,grouping

Instead of displaying all data values individually, you can bin them. Binning involves grouping individual data values into one instance of a graphic element. A bin may be a point that indicates the number of cases in the bin. Or it may be a histogram bar, whose height indicates the number of cases in the bin.

Use binning when you have such a large number of individual graphic elements in the chart that you cannot distinguish them. To bin, the Chart Editor:

• Divides the data area into a grid of bins of the specified size. For points/markers, you can also specify the shape of the bin.

• Counts the cases within each bin.

• Assigns a color or size corresponding to the count.

• Draws the graphic element on the bin. For points/markers, you can specify the position of the marker relative to each bin (midpoint versus centroid).

The option to bin markers/points is always available. Binning other elements is typically available only when the graph is a type of histogram or the data are unaggregated.

How to Bin Any Element Collapse Hide details

How to Bin Any Element

From the menus choose:

Options
Bin Element

If necessary, use the Binning tab to refine the binning.

Without a selection, all available axes are binned. You can use the Binning tab to change the number of binned axes. You can also select a particular axis or element before binning to bin only the selected axis or element.

How to Remove Binning Collapse Hide details

How to Remove Binning

From the menus choose:

Options
Un-Bin Element

When you remove binning for a histogram, the result may not be useful. You will end up with one bar for each unique value on the x axis. Because the values do not often overlap, each bar will show a count of 1.

Using the Binning Tab with Marker/Point Elements Collapse Hide details

Using the Binning Tab with Marker/Point Elements

Count indicator. Choose color or size to indicate how the data markers show the number of data points in each bin. If you use size, circular markers work best. If you use color, be aware that the markers' border color is used when you first bin the data points. Because the marker border is often black, use the Marker tab to change the color. Do not use very dark or very light colors for the markers. The variation in intensity of these colors does not allow you to distinguish the bin sizes.

Position of markers. Choose where, in the bin, the symbol is displayed. Midpoint is the graphical middle of the bin and makes it less likely that the symbols will overlap. Centroid positions the symbol at the centroid location of the points it represents. The coordinates of the centroid are the weighted means for each axis. A missing value in any one of the variables excludes the case from the calculation. Changing the scale does not affect the calculation of the centroid.

Bin layout. Choose how the bins are defined. Grid divides the data frame into rectangles to create each bin. Hex divides the data frame into hexagons to create each bin. The data points falling into each shape are binned together.

Bin size. Click Automatic to let the Chart Editor pick the number of bins based on the underlying data. Click Custom to enter a specific number of bins for each dimension.

Using the Binning Tab with Other Elements Collapse Hide details

Using the Binning Tab with Other Elements

Axis selection. Select an option for choosing the axes on which binning occurs.

For each axis, you can set the following options.

Automatic. Let the Chart Editor pick bin sizes and widths based on the underlying data.

Custom. Choose your own values for the bin sizes and widths. You can either specify the number of bins or the width of each bin. The width also affects the number of bins. For example, if the axis range is 0–100 and you specify the width as 5, there will be 20 bins. The greater the number of bins, the more detailed the histogram is. However, more bins may make the histogram too irregular to see the shape of the distribution. Note: If the variable being binned is a date, the units used for the width are days. Therefore, specifying a width of 30 indicates 30 days.

Custom value for anchor. Specify the starting value of a bin. By default, the bin will include the lowest data value. The anchor is set so that bin boundaries are at good values. If you specify a value less than the lowest data value, this is the starting value of the first bin. For example, you might want the values of 0–5 to be included in the first bin even though the lowest value in the dataset is 6. In this case, you might set the Custom value for anchor to 0. Note: If the variable being binned is a date, the starting value must be a date literal in the date format specified for the variable on the Variable View tab in the Data Editor (for example, 01/01/2001).

Related Topics

Exploring Data in a Chart
Interpolation Lines
Fit Lines
Reference Lines
Spikes
Projection Lines and Category Range Bars
Axis Scale
Axis Scale for Matrix Scatterplots
Derived Axis
Categories
Variables and Chart Types
Displaying Line Markers
Displaying a Distribution Curve on a Histogram
Charts in the Scatterplot Matrix Diagonal
Exploring 3-D Charts
Paneled Charts
Error Bars
Linking Back to the Data
Changing Chart Types


Displaying a Distribution Curve on a Histogram

normal curve,normal curve,normal curve
histograms,histograms,histograms
distribution curve,distribution curve,distribution curve
histograms,histograms,histograms
histograms,histograms,histograms
distribution curve,distribution curve,distribution curve

If your chart is a histogram, you can add a distribution curve. Several different distributions are available for drawing the curve.

How to Add a Distribution Curve Collapse Hide details

How to Add a Distribution Curve

From the menus choose:

Elements
Show Distribution Curve

The Chart Editor displays a normal curve on the histogram.

Use the Lines tab to specify the formatting for the curve. See the topic Line Style for more information.

Use the Distribution Curve tab to change the distribution type and its parameters.

How to Remove a Distribution Curve Collapse Hide details

How to Remove a Distribution Curve

From the menus choose:

Elements
Hide Distribution Curve

Using the Distribution Curve Tab Collapse Hide details

Using the Distribution Curve Tab

Curves. Choose a distribution type for the curve. Common types appear with an icon showing a sample curve. Select Other curves for more distributions.

Parameters. Select Automatic to let the Chart Editor choose parameters for the distribution. You can select Custom to adjust the parameters so that the distribution better fits the data. Automatic parameters are not available for the distributions listed in Other curves. Enter parameters that make sense for the distribution and your data.

Related Topics

Exploring Data in a Chart
Interpolation Lines
Fit Lines
Reference Lines
Spikes
Projection Lines and Category Range Bars
Axis Scale
Axis Scale for Matrix Scatterplots
Derived Axis
Categories
Variables and Chart Types
Displaying Line Markers
Binning (Grouping) Data Values
Charts in the Scatterplot Matrix Diagonal
Exploring 3-D Charts
Paneled Charts
Error Bars
Linking Back to the Data
Changing Chart Types


Charts in the Scatterplot Matrix Diagonal

scatterplot matrix,scatterplot matrix,scatterplot matrix
charts in the diagonal,charts in the diagonal,charts in the diagonal
histograms,histograms,histograms
scatterplot matrix diagonal,scatterplot matrix diagonal,scatterplot matrix diagonal

If your chart is a scatterplot matrix, you can add histograms or normal curves to the diagonal. Each chart in the diagonal will show the distribution of the variable in the corresponding column.

From the menus choose:

Options
Show Charts in the Diagonal

How to Edit Charts in the Diagonal Collapse Hide details

How to Edit Charts in the Diagonal

Select the Charts in the Diagonal.

If the Properties window is not displayed, from the menus choose:

Edit
Properties

Use the Charts on the Diagonal tab to specify whether the charts in the diagonal should be histograms or normal curves.

If the charts on the diagonal are histograms, you can also modify the histogram options. See the topic Binning (Grouping) Data Values for more information.

Click Apply.

Related Topics

Exploring Data in a Chart
Interpolation Lines
Fit Lines
Reference Lines
Spikes
Projection Lines and Category Range Bars
Axis Scale
Axis Scale for Matrix Scatterplots
Derived Axis
Categories
Variables and Chart Types
Displaying Line Markers
Binning (Grouping) Data Values
Displaying a Distribution Curve on a Histogram
Exploring 3-D Charts
Paneled Charts
Error Bars
Linking Back to the Data
Changing Chart Types


Exploring 3-D Charts

3-D scatterplots,3-D scatterplots,3-D scatterplots
rotating,rotating,rotating
3-D bar charts,3-D bar charts,3-D bar charts
rotating,rotating,rotating
scatterplots,scatterplots,scatterplots
rotating 3-D,rotating 3-D,rotating 3-D
rotating,rotating,rotating
3-D scatterplots,3-D scatterplots,3-D scatterplots
3-D bar charts,3-D bar charts,3-D bar charts

You can rotate a 3-D scatterplot or a 3-D bar chart in several directions and zoom into it. You can also hide the shaded planes and the frame around the chart.

How to Explore 3-D Bar Charts Collapse Hide details

How to Explore 3-D Bar Charts

Select the graphic elements in a 3-D chart.

If the Properties window is not displayed, from the menus choose:

Edit
Properties

Use the 3-D Elements tab to show or hide the backplanes and wireframe or to set the viewing distance.

Click Apply.

If you want to view the chart from a different angle, use 3-D rotation mode to rotate the chart in real time.

Using the 3-D Elements Tab Collapse Hide details

Using the 3-D Elements Tab

Display backplanes. Show the shaded planes, which are the back sides of the box containing the chart. You can also select the backplanes to change the fill and border for them.

Display wireframe. Show the frame of the box containing the chart.

Distance. Zoom into the chart. You can make the chart larger or smaller by making the viewpoint closer or farther. This is like zooming except that the data markers do not change in size. Click Reset to return the settings to the default.

How to Rotate a 3-D Chart Collapse Hide details

How to Rotate a 3-D Chart

From the menus choose:

Edit
3-D Rotation

The cursor changes shape to indicate that you are in 3-D rotation mode.

Click the chart and drag to the desired rotation. For more precise positions, you can enter specific values in the 3-D Rotation dialog box.

When you have finished rotating the chart, from the menus choose:

Edit
3-D Rotation

The cursor changes back to the arrow to indicate that you are no longer in 3-D rotation mode.

Related Topics

Exploring Data in a Chart
Interpolation Lines
Fit Lines
Reference Lines
Spikes
Projection Lines and Category Range Bars
Axis Scale
Axis Scale for Matrix Scatterplots
Derived Axis
Categories
Variables and Chart Types
Displaying Line Markers
Binning (Grouping) Data Values
Displaying a Distribution Curve on a Histogram
Charts in the Scatterplot Matrix Diagonal
Paneled Charts
Error Bars
Linking Back to the Data
Changing Chart Types


Paneled Charts

charts,charts,charts
paneling,paneling,paneling
paneled charts,paneled charts,paneled charts

Paneled charts consist of several smaller charts, each of which appears in a panel. The resulting paneled chart resembles a table. The columns and rows are determined by the values of specified categorical variables. You can define paneling when you create a chart. Or if extra categorical variables are available (for example, a variable used to cluster bars), you can use the Variables tab to convert the current chart to a paneled chart. Use the Panels tab to change the appearance of the panels.

Convert a Chart to a Paneled Chart Collapse Hide details

Convert a Chart to a Paneled Chart

If the Properties window is not displayed, from the menus choose:

Edit
Properties

Click the Variables tab.

Change the role of the categorical variable or variables to Row Panel or Column Panel. The values of a Row Panel variable will determine the panel rows, and the values of a Panel Column variable will determine the panel columns. See Variables and Chart Types for more information about changing variable roles.

Click Apply.

Using the Panels Tab Collapse Hide details

Using the Panels Tab

The Panels Tab is available when panel labels are selected.

Wrap Panels. When there are many panel columns, this setting allows panels to wrap across rows rather than being forced to fit in a specific row. The Chart Editor picks the number of panels for each row so that the panels are proportionally distributed.

Level. Select the variable for which you want to specify mirroring or spacing settings.

Mirror Panels. Mirror the axes of adjacent panels at each variable level. Thus, the direction of the axis alternates for each panel; or, if there are multiple paneling variables, the axis alternates for each group of panels at each variable level. For example, if gender and job category were column paneling variables and you mirrored the panels for gender, the x axis would increase from right to left for all job categories in the first gender and from left to right for all job categories in the second gender.

Panel Spacing. Change the spacing among adjacent panels at the same variable level. This is the spacing between each panel; or, if there are multiple paneling variables, this is the spacing between a group of panels. The actual value represents the percentage of each panel width or height (depending whether the variable is a column or row paneling variable).

Related Topics

Variables and Chart Types
Exploring Data in a Chart
Interpolation Lines
Fit Lines
Reference Lines
Spikes
Projection Lines and Category Range Bars
Axis Scale
Axis Scale for Matrix Scatterplots
Derived Axis
Categories
Displaying Line Markers
Binning (Grouping) Data Values
Displaying a Distribution Curve on a Histogram
Charts in the Scatterplot Matrix Diagonal
Exploring 3-D Charts
Error Bars
Linking Back to the Data
Changing Chart Types


Error Bars

error bars,error bars,error bars
charts,charts,charts
error bars,error bars,error bars

For categorical charts that you created with error bars, you can hide the error bars and display them again if needed. You cannot display error bars on a chart that was not created with error bars.

From the menus choose:

Elements
Show/Hide Error Bars

Related Topics

Bar Size and Style
Exploring Data in a Chart
Interpolation Lines
Fit Lines
Reference Lines
Spikes
Projection Lines and Category Range Bars
Axis Scale
Axis Scale for Matrix Scatterplots
Derived Axis
Categories
Variables and Chart Types
Displaying Line Markers
Binning (Grouping) Data Values
Displaying a Distribution Curve on a Histogram
Charts in the Scatterplot Matrix Diagonal
Exploring 3-D Charts
Paneled Charts
Linking Back to the Data
Changing Chart Types


Changing Axis Scales

axis scale,axis scale,axis scale
axis range,axis range,axis range
chart axis,chart axis,chart axis
scale,scale,scale
range,range,range
scale axes,scale axes,scale axes
range,range,range
axes,axes,axes
scale,scale,scale
categorical,categorical,categorical
range,range,range
categories,categories,categories
changing in a chart,changing in a chart,changing in a chart
categorical axes,categorical axes,categorical axes

You can change the scale of an axis by using the appropriate tab and defining an explicit range for a scale axis or by excluding categories on a categorical axis. See Axis Scale for more information about scale axes. See Categories for more information about categorical axes.

You can also use the rescaling tool to change the scales quickly. This tool is like a zoom feature. It allows you to draw a box in the inner frame and force the scales to change so the inner frame shrinks to the size of the box. The action affects all axes in the chart.

Using the Rescaling Tool Collapse Hide details

Using the Rescaling Tool

From the menus choose:

Edit
Rescale Chart

Click in the inner frame and drag the box to the preferred range.

Confirm that the range is correct when prompted and click OK.

Reverting to the Original Axis Scales Collapse Hide details

Reverting to the Original Axis Scales

From the menus choose:

Edit
Scale to Data


Scaling Stacked Elements to 100%

stacked elements,stacked elements,stacked elements
scale to 100%,scale to 100%,scale to 100%

For charts with stacked graphic elements, you can choose whether the graphic elements are scaled by a calculated value or are scaled to 100%. If they are scaled by a value, the size of each stack varies depending on the statistic used for the y axis. So if the statistic is a count, a bar of 100 would be twice as tall as a bar of 50. If the graphic elements are scaled to 100%, all graphic elements extend to the same height. This is useful for highlighting category differences in each stack.

From the menus choose:

Options
Scale to 100%

or

Options
Scale by Value

The option depends on whether the graphic elements are already scaled to 100%.


Linking Back to the Data

charts,charts,charts
linking to the data,linking to the data,linking to the data
viewing a case in the Data Editor,viewing a case in the Data Editor,viewing a case in the Data Editor
scatterplots,scatterplots,scatterplots
view case in the Data Editor,view case in the Data Editor,view case in the Data Editor
dot plots,dot plots,dot plots
view case in the Data Editor,view case in the Data Editor,view case in the Data Editor

For charts with graphic elements that correspond to one case in the dataset (for example, scatterplots and box plots), you can view the corresponding case in the Data Editor.

Select one or more graphic elements (for example, points).

From the menus choose:

Edit
Go to Case

The Data Editor is activated, with the corresponding case or cases highlighted.

Related Topics

Exploring Data in a Chart
Interpolation Lines
Fit Lines
Reference Lines
Spikes
Projection Lines and Category Range Bars
Axis Scale
Axis Scale for Matrix Scatterplots
Derived Axis
Categories
Variables and Chart Types
Displaying Line Markers
Binning (Grouping) Data Values
Displaying a Distribution Curve on a Histogram
Charts in the Scatterplot Matrix Diagonal
Exploring 3-D Charts
Paneled Charts
Error Bars
Changing Chart Types


Changing Chart Types

chart types,chart types,chart types
changing in the Chart Editor,changing in the Chart Editor,changing in the Chart Editor

You can convert a chart from one type to another. For example, you can convert a bar chart to a pie chart or an overlay scatterplot to a scatterplot matrix.

If the Properties window is not already displayed, from the menus choose:

Edit
Properties

Click the Variables tab.

Choose a graphic element type from the Element Type list. The available types depend on the underlying structure of the chart.

Click Apply.

If you want to change the chart to another variety of the same type (for example, changing a clustered bar chart to a 3-D bar chart), you have to change the variable roles instead. The variable roles are specified in variable grid below the Element Type list. For more information about variable roles and other features of the Variables tab, refer to Variables and Chart Types.

Related Topics

Exploring Data in a Chart
Interpolation Lines
Fit Lines
Reference Lines
Spikes
Projection Lines and Category Range Bars
Axis Scale
Axis Scale for Matrix Scatterplots
Derived Axis
Categories
Variables and Chart Types
Displaying Line Markers
Binning (Grouping) Data Values
Displaying a Distribution Curve on a Histogram
Charts in the Scatterplot Matrix Diagonal
Exploring 3-D Charts
Paneled Charts
Error Bars
Linking Back to the Data


Using Chart Templates

chart templates,chart templates,chart templates
templates,templates,templates
charts,charts,charts
obsolete chart templates (.sct extension),obsolete chart templates (.sct extension),obsolete chart templates (.sct extension)

Chart templates allow you to save the settings from one chart and apply these settings to other charts. You can use chart templates to automatically create charts with:

• A customized look (for example, a corporate color scheme).

• Customized settings (for example, a scale axis range).

• Customized options (for example, fit lines).

After saving a chart template, you can manually apply it in the Chart Editor or specify the template during chart creation. You can also specify a default template whose settings are applied to all charts automatically.

Chart templates created in releases prior to 12.0 will not work in release 12.0 or later. You must create new chart templates. Obsolete chart templates usually have an .sct extension. New chart templates have an .sgt extension.

Related Topics

Saving a Chart Template
Template Settings Details
Applying a Chart Template
Specifying a Default Template
Template Examples
How the Chart Editor Applies Templates


Saving a Chart Template

chart templates,chart templates,chart templates
saving,saving,saving

Edit the chart to have the look, settings, or options that you want to apply automatically to charts when you create them.

From the menus choose:

File
Save Chart Template

Choose the settings to save with the template. It is recommended that you save only those settings you explicitly need in the template. For details about each setting, see Template Settings Details. If you are having trouble finding a setting, click Expand All to expand the whole tree.

Click Continue.

Enter a file name and location for the new template. The template's extension is .sgt.

Click Save.

In the template chart, make sure that you set the properties explicitly; do not rely on an automatic setting to give you the results you expect when you apply the template. For example, assume the default axis range for one chart is 0–100. You like this range and save the chart as a template. But when you apply the template to another chart, the range is not 0–100. This occurs because the axis range was set to automatic. When a setting is automatic, the Chart Editor picks a value that is best for that particular chart. The automatic setting might not be the same as the automatic setting in the chart you used as a template.

Related Topics

Using Chart Templates
Template Settings Details
Applying a Chart Template
Specifying a Default Template
Template Examples
How the Chart Editor Applies Templates


Template Settings Details

chart templates,chart templates,chart templates
settings,settings,settings
contents,contents,contents

Refer to this topic to determine which settings save what aspect of the chart. Not all of the settings listed below are necessarily available when you save a chart as a template. Only those settings that apply to the specific chart are available. For example, if the chart is a simple 2-D bar chart, the 3-D rotation setting is not available.

When the text refers to a template, it is assumed that the template is saved with the settings being discussed. Also, the target chart is the chart to which you are applying the template.

Layout

The layout settings include:

Chart size. Saves outer frame size and aspect ratio.

Text, data, and other frames. Saves size, location, and display order of all other frames, including the legend frame. When you apply a template that includes a frame not in the target chart, the Chart Editor adds the frame to the chart. For example, you can use a template to add a title frame to the chart.

Orientation. Saves the orientation of the chart (horizontal versus vertical), which can change if the chart was transposed.

Text Content

The text content settings include:

Chart titles, footnotes, text boxes, annotations. Saves the text that appears in text boxes and annotations.

The text replaces the equivalent text for the corresponding frame in the target chart. These settings do not add text boxes to a chart if the target chart doesn't include a corresponding text box. However, the Chart Editor will add an annotation if it fits within the coordinates of the chart. Always save the layout when you save text.

The settings do not save data value labels.

Axis titles. Saves the text that appears in axis titles. The text replaces the axis titles in the target chart.

The settings do not save tick labels.

Styles

The styles settings specify:

Text formatting. Saves formatting for all text except the data value label text. This setting also controls whether automatic text resizing is used in the target chart.

Non-graphic element styles. The following settings specify the styles of elements that are not graphic elements or data value labels.

• Fill and border style. Saves all attributes of fills and borders for all non-graphic element frames.

• Line styles. Saves styles of all lines that are not graphic elements, including axis lines and optional lines (for example, reference lines).

Backplane and wireframe display. For 3-D charts, saves whether the backplane and wireframe are displayed.

Graphic element styles. The following settings specify the styles of graphic elements.

• Simple charts. Graphic element styles (such as marker style) in charts without groups (simple charts).

• Style cycles for grouped charts. Saves the graphic element style cycle (such as color cycle of markers) used to create the grouped chart. This was the style cycle used on the Charts tab of the Options dialog box (Edit menu in the Viewer) when the chart was created.

• Optional display of lines and markers. Saves the display of markers on lines, areas, and difference areas. Also saves the display of lines on areas and difference areas.

• Bar width and cluster width. Saves the width of graphic element bars and width of bar clusters.

• Boxplot and error bar style. Specifies which option to display for boxplot and error bars (line, whisker, or bar) and saves the style of the line, whisker, or bar.

• Depth of shadow/3-D effect. Saves the depth setting for shadow and 3-D effects on bars and pies with 3-D effects.

• 3-D rotation. Saves the 3-D rotation settings for true 3-D scatterplots and bar charts.

• Pie charts. The child settings for pie charts save the position of the first slice and specify any exploded slices. The label text of the exploded slice must match the label text of the slice in the target chart.

• Spikes. Saves the display of spikes in simple and 3-D scatterplots.

The template settings replace equivalent settings in the target chart. For example, if a line is red in the target chart but the template settings specify blue for the line color, the line becomes blue. In other cases, the settings merge. For example, if a line is red in the target chart and the template settings specify a weight of 4 for the line, the line appears as red with a weight of 4. If the template settings do not include an equivalent setting in the target chart, the chart does not change.

Axes

The axes settings include:

Scale Axes. The follow settings specify options for scales axes in the chart.

• Location. Specifies where a scale axis appears (top versus bottom or left versus right).

• Range. Specifies whether a scale axis range is set automatically or is set with a specific value. Also saves the minimum and maximum for a scale axis.

• Origin. Specifies if the origin line is displayed and the location of the origin line.

• Type (linear, log, or power). Saves any transformations of a scale axis.

• Scale to 100%. Specifies whether stacked graphic elements are scaled by the statistic value or are scaled to 100%.

• Ticks. The settings specify whether to display and the location (inside, outside, or through) for major and minor ticks and also save the major tick interval for the number of minor ticks per major interval.

• Grids. The settings specify whether major and minor grid lines are displayed on a scale axis.

• Labels. The settings specify whether to display the axis title and the major tick labels. They can also save the format of the major tick labels (date format, number format, and all attributes, including orientation). These settings do not save the content of any labels. To save the content of the axis titles, check the settings under Text Content.

• Margins. Saves the margin settings for a scale axis.

Derived axes. The following settings specify options for derived axes in the chart.

• Display and Ratio/Match. Specifies whether to display the derived axis and saves the settings that define the relationship of the derived axis to the primary axis.

• Ticks. The settings specify whether to display and the location (inside, outside, or through) for major and minor ticks and also save the major tick interval for the number of minor ticks per major interval.

• Grids. The settings specify whether major and minor grid lines are displayed on a derived axis.

• Labels. The settings specify whether to display the axis title and the major tick labels. They can also save the format of the major tick labels (date format, number format, and all attributes, including orientation).

Category axes. The following settings specify options for category axes in the chart.

• Location. Specifies where a category axis appears (top versus bottom or left versus right).

• Category order. Saves the order of categories on the axis if the label text in the template matches the label in the target chart.

• Collapsed categories setting and label. Specifies whether to collapse categories and the label for the collapsed category.

• Category exclusion. Specifies whether any categories are excluded. The label text of the excluded categories in the template must match the label text of the categories in the target chart.

• Tick display and location. Specifies whether to display and the location (inside, outside, or through) for ticks on a category axis.

• Grids. Specifies whether grid lines are displayed on a categorical axis.

• Labels. The settings specify whether to display the axis title and the major tick labels. They can also save the format of the major tick labels (date format, number format, and all attributes, including orientation). These settings do not save the content of any labels. To save the content of the axis titles, check the settings under Text Content.

• Margins. Saves the margin settings for a category axis.

Charts in the diagonal. Specifies whether to display charts in the diagonal of a scatterplot matrix.

Data Value Labels

The data value labels settings include:

Display. Specifies whether to display data value labels and whether to suppress overlapping labels. When the template specifies to display one or more data value labels, it displays all or all non-overlapping labels, even if the display is turned off for specific graphic elements in the target chart.

Content. Specifies the content of the data value labels (such as percentage or count).

Font style. Saves the font family, size, and other formatting for text in data value labels.

Position. Saves the position of the data value label in relation to the graphic element.

Fill and border. Saves the fill and border formatting for the data label, including the option to color border by marker color.

Number/date format. Saves the number and date format for the data value labels. When the template is applied, number and date formats are applied only to similar data value labels. That is, if the number format for data value labels showing percentages is saved in the template but the target chart contains only data value labels of counts, the template will have no effect on the data value labels in the target chart. However, if the target chart does include data value labels of percentages, the numbers in the data value labels are formatted as specified in the template.

Optional Lines

The optional lines settings specify whether optional lines are displayed. The settings also specify the attributes of the optional lines (such as method used for fitting a fit line). They include:

• Display of and options for fit lines.

• Display of distribution curves in histograms.

• Display of and options for interpolation lines.

• Display and location of reference lines.

• Display of projection lines.

If you apply a template that includes a line or normal curve in the target chart, the Chart Editor adds the line or curve to the chart. The exceptions are if the chart does not support the line or curve (for example, a fit line applies only to scatterplots and a normal curve applies only to histograms) or if the reference line is located outside of the axis range.

Error Bar Settings

The error bar settings specify whether to show or hide error bars. This setting does not add error bars if the chart was not created with error bars. It only shows or hides existing error bars.

Legend display

The legend display setting specifies whether to show or hide a legend and the order of the legends when there are multiple legends. Note that the display order of the legend is controlled by the Text, data, and other frames setting in the Layout bundle.

Scatterplot Point Binning

The scatterplot point binning settings specify display of and options for point bins on scatterplots, including whether the binning is by color or size.

Histogram Binning

The histogram binning settings specify binning options for histograms, including the bin anchor and the bin size.

If you want to save the option for displaying the distribution curve on the histogram, use the fit and reference lines settings.

Panel Settings

The panel settings include:

Wrapping. Specifies whether panels are wrapped.

Mirroring. Specifies whether panels are mirrored on a per-level basis.

Panel spacing. Saves the spacing between panels on a per-level basis.

Related Topics

Using Chart Templates
Saving a Chart Template
Applying a Chart Template
Specifying a Default Template
Template Examples
How the Chart Editor Applies Templates


Applying a Chart Template

chart templates,chart templates,chart templates
applying,applying,applying

Open the chart to which you want to apply a template in the Chart Editor.

From the menus choose:

File
Apply Chart Template

Select the file containing the template that you want to apply. You can read the description of the template. You can also click View to check which settings are saved in the template. The Chart Editor will apply all of the listed settings. For details about each setting, see Template Settings Details.

Click Open to apply the settings in the selected template.

If you don't see some results that you expect, make sure that the template options were set explicitly. If a setting is automatic, the result in the chart might not match the chart with which you created the template.

Note: You can also have a default template that is automatically applied to your charts. See the topic Specifying a Default Template for more information.

Related Topics

Using Chart Templates
Saving a Chart Template
Template Settings Details
Specifying a Default Template
Template Examples
How the Chart Editor Applies Templates


Specifying a Default Template

chart templates,chart templates,chart templates
default template,default template,default template

Switch to the Data Viewer or the Output Viewer.

From the menus choose:

Edit
Options

On the Charts tab of the Options dialog box, select Use chart template file in the Chart Template group.

Click Browse.

In the Open dialog box, browse to the template file, and then click Open.

The path of the default template that you selected appears below Use chart template file in the Options dialog box.

Click OK to close the Options dialog box.

Related Topics

Using Chart Templates
Saving a Chart Template
Template Settings Details
Applying a Chart Template
Template Examples
How the Chart Editor Applies Templates


Template Examples

Example 1: Applying a Company Look

Assume that your company colors are blue and gray. In addition to using these colors on all your charts, you want the text Company Confidential to appear on the charts. To do this, you:

Create a chart.

Change colors as appropriate. For example, change the fill color of the outer frame to a pale blue and the fill color of the data frame to pale gray.

Add a text box below the chart with the text Company Confidential.

Save the template (company.sgt) with the following settings:

• Layout

• Titles, Footnotes, and Annotations

• Chart Element Styles

On the Charts tab on the Options dialog box (select Options on the Edit menu in the Viewer), specify company.sgt as the chart template to use for creating charts.

When you create new charts, the Chart Editor automatically applies company.sgt.

Example 2: Reporting on the Same Scale Range

If you report on the same data at regular intervals (for example, monthly sales reports), you want to enforce the same scale axis range for all charts. This functionality is required to compare across charts without having to look at the scale axis values. To do this, you:

Create a chart.

Set the scale axis range to the desired values—for example, 0–100.

Save the template (scale.sgt) with the Scale Range settings.

Apply scale.sgt in the creation dialog box or syntax the next time you create a chart that should use the specified scale axis range.

Example 3: Binning Scatterplot Points at Chart Creation

If your data include many rows, you want to be able to bin scatterplot points at creation time. To do this, you:

Create a scatterplot.

Turn on binning.

Save the template (bin.sgt) with the Scatterplot Point Binning settings.

Apply bin.sgt in the creation dialog box or syntax the next time you create a scatterplot that should use the same binning.

Example 4: Multiple Templates

Assume that you want to apply all of the templates in the other examples. That is, you want the corporate look, the same scale axis range, and the binning of scatterplots. To do this, you:

Create company.sgt and specify it as the default template as explained in example 1.

Create scale.sgt and apply it at creation time as explained in example 2.

Create bin.sgt as explained in example 3, but, instead of applying it at creation time, apply it in the Chart Editor.

You could also have created one template that included all the applicable settings.

Related Topics

Using Chart Templates
Saving a Chart Template
Template Settings Details
Applying a Chart Template
Specifying a Default Template
How the Chart Editor Applies Templates


How the Chart Editor Applies Templates

Chart settings are applied in the following order, with each subsequent setting overriding previous, overlapping ones. That is, if a subsequent template specifies a setting also in a previous template, the subsequent template's setting overrides the previous template's setting. The order of template application is:

• Preferences set on the Charts tab of the Options dialog box, except for the default chart template.

• The default chart template specified on the same tab.

• Templates applied from syntax, in the order that they appear in the syntax. Templates applied later in the syntax override earlier ones.

• Templates applied by the user in the Chart Editor.

The Chart Editor does not carry unused settings from each step. For example, if the default chart template defines a style for a reference line, but the chart created is a pie chart, the reference line settings are not saved with the chart.

Templates modify existing chart elements of the same type. Templates can also add elements to a chart if the chart does not include an element identified in the template. However, templates never delete elements in the chart if they do not exist in the template. The template might hide elements, but it will never delete them.

Related Topics

Using Chart Templates
Saving a Chart Template
Template Settings Details
Applying a Chart Template
Specifying a Default Template
Template Examples


Copying a Chart

copying,copying,copying
charts,charts,charts
charts,charts,charts
copying in the Chart Editor,copying in the Chart Editor,copying in the Chart Editor

You can copy a chart and then paste it into another application, such as Word or PowerPoint.

From the menus choose:

Edit
Copy Chart

Open the application into which you want to paste the chart.

If the application offers a paste special option, use that instead of pasting. With paste special, you can select the format that is best for how you plan to use the chart. If you just paste the chart, it might have jagged edges in the desired output (screen or print).

Screen viewing. If the primary use for the chart is for onscreen presentation rather than printing, paste the chart as a bitmap.

Print. If you plan to print the chart rather than display it onscreen, paste the chart as a metafile (Windows metafile or enhanced metafile) or as an RTF (rich text format) file.


Saving the Chart as XML

saving,saving,saving
charts as XML,charts as XML,charts as XML
charts,charts,charts
saving as XML,saving as XML,saving as XML
ViZml,ViZml,ViZml
ViZml,ViZml,ViZml

You can save the chart as ViZml, which is an XML representation of the chart. You can then recreate the chart by referencing the ViZml file as the graph specification for the GGRAPH command. See the topic GRAPHSPEC Subcommand (GGRAPH command) for more information. For more information about ViZml, refer to the ViZml Reference.

From the menus choose:

File
Export Chart XML

Specify a location and name for the ViZml file.

Click Save.

Because the data are embedded in the ViZml, you may want to remove the data cases from the ViZml.

How to Remove Embedded Data Collapse Hide details

How to Remove Embedded Data

The data with which you created the chart is saved in the XML. If you run the GGRAPH command using the ViZml file as the graph specification, the chart will not reflect changes in the original dataset because the data in the XML file are static. To have the chart update based on updates to the data, you have to remove the embedded data from the XML file.

Open the XML file in a text editor or an XML editor.

Look for the <embeddedSource> element.

Delete the <embeddedSource> element. (If you are using a text editor, don't forget to delete all the child elements of <embeddedSource> and the closing </embeddedSource> tag.

Replace the <embeddedSource> element with <userSource id="graphdataset"/>.

Save your changes.

Now, when you run the GGRAPH command with the updated ViZml file, the chart will show updated data. Be sure to use the GRAPHDATASET subcommand, with the NAME keyword set to graphdataset. Also make sure that the VARIABLES keyword identifies the same variables and functions that you used to create the original chart. Look for the <sourceVariable> elements in the XML to check the names.


Creating and Editing Graphboard Visualizations

,,

Graphboard visualizations are graphs, charts, plots, and other visual representations of data created from a visualization template. PASW Statistics ships with several built-in visualization templates. You can also use a separate product, PASW Viz Designer, to create your own visualization templates. The new visualization templates are effectively custom visualization types.

Graphboard visualizations are edited in the Graphboard Editor, not the Chart Editor.

Related Topics

Creating Graphboard Visualizations
Editing and Exploring Graphboard Visualizations


Creating Graphboard Visualizations

Graphboard visualizations are created by choosing a visualization template in the template chooser.

From the menus choose:

Graphs
Graphboard Template Chooser

The template chooser consists of two main tabs for selecting visualization templates. These two tabs correspond to two different methods for creating a visualization from a template.

• Basic tab. On the Basic tab, you first select the data that you are interested in analyzing and then select a graph that is appropriate for the data. You start from the data rather than a specific graph type. See the topic Basic Tab for more information.

• Detailed tab. On the Detailed tab, you first select a graph type and then specify the data. You can also add details that are not available on the Basic tab. See the topic Detailed Tab for more information.

These methods are not mutually exclusive. While creating the graph, you can switch back and forth between the tabs. The current state of the graph definition is preserved in both tabs (including options that may not be available on the Basic tab).

The template chooser also includes two additional tabs:

• Titles tab. Use this tab to specify any titles and footnotes you want to appear in the resulting visualization. See the topic Titles Tab for more information.

• Options tab. Use this tab to specify the output label in the Output Viewer, the visualization stylesheet, and missing-value handling. See the topic Options Tab for more information.

There are two buttons that allow you to control which visualization templates (and stylesheets) are displayed:

Manage. Manage visualization templates and stylesheets on your computer. You can import, export, rename, and delete visualization templates and stylesheets on your local machine. See the topic Managing Templates and Stylesheets for more information.

Location. Change the location in which visualization templates and stylesheets are stored. The current location is listed to the right of the button. See the topic Setting the Location of Templates and Stylesheets for more information.

Related Topics

Creating and Editing Graphboard Visualizations
Editing and Exploring Graphboard Visualizations
Basic Tab
Detailed Tab
Titles Tab
Options Tab
Available Built-in Visualization Types
Examples


Basic Tab

Basic Tab Collapse Hide details
Basic tab

If you aren't sure which visualization type would best represent your data, use the Basic tab. When you select your data, you are then presented with a subset of visualization types that are appropriate for the data. For examples, see Examples .

Select one or more fields/variables from the list. Use Ctrl+Click to select multiple fields/variables.

measurement level,measurement level,measurement level
changing in visualizations,changing in visualizations,changing in visualizations

Note that the measurement level of the variable determines the type of visualizations that are available. You can change the measurement level by right-clicking the field/variable in the list and choosing an option. For more information about the available measurement level types, see Variable Types .

Select a visualization type. For descriptions of the available types, see Available Built-in Visualization Types .

For certain visualizations, you can choose a summary statistic. Different subsets of statistics are available depending on whether the statistic is count-based or calculated from a continuous field/variable. The available statistics also depend on the template itself. A full list of statistics that may be available follows the next step.

If you want to define more options, such as optional aesthetics and panel fields/variables, click Detailed. See the topic Detailed Tab for more information.

Summary Statistics Calculated from a Continuous Field/Variable

statistics,statistics,statistics
descriptions,descriptions,descriptions

• Mean. A measure of central tendency. The arithmetic average, the sum divided by the number of cases.

• Median. The value above and below which half of the cases fall, the 50th percentile. If there is an even number of cases, the median is the average of the two middle cases when they are sorted in ascending or descending order. The median is a measure of central tendency not sensitive to outlying values (unlike the mean, which can be affected by a few extremely high or low values).

• Mode. The most frequently occurring value. If several values share the greatest frequency of occurrence, each of them is a mode.

• Minimum. The smallest value of a numeric variable.

• Maximum. The largest value of a numeric variable.

• Range. The difference between the minimum and maximum values.

• Mid Range. The middle of the range, that is, the value whose difference from the minimum is equal to its difference from the maximum.

• Sum. The sum or total of the values, across all cases with nonmissing values.

• Cumulative Sum. The cumulative sum of the values. Each graphic element shows the sum for one subgroup plus the total sum of all previous groups.

• Percent Sum. The percentage within each subgroup based on a summed variable compared to the sum across all groups.

• Cumulative Percent Sum. The cumulative percentage within each subgroup based on a summed variable compared to the sum across all groups. Each graphic element shows the percentage for one subgroup plus the total percentage of all previous groups.

• Variance. A measure of dispersion around the mean, equal to the sum of squared deviations from the mean divided by one less than the number of cases. The variance is measured in units that are the square of those of the variable itself.

• Standard Deviation. A measure of dispersion around the mean. In a normal distribution, 68% of cases fall within one standard deviation of the mean and 95% of cases fall within two standard deviations. For example, if the mean age is 45, with a standard deviation of 10, 95% of the cases would be between 25 and 65 in a normal distribution.

• Standard Error. A measure of how much the value of a test statistic varies from sample to sample. It is the standard deviation of the sampling distribution for a statistic. For example, the standard error of the mean is the standard deviation of the sample means.

• Kurtosis. A measure of the extent to which observations cluster around a central point. For a normal distribution, the value of the kurtosis statistic is zero. Positive kurtosis indicates that, relative to a normal distribution, the observations are more clustered about the center of the distribution and have thinner tails until the extreme values of the distribution, at which point the tails of the leptokurtic distribution are thicker relative to a normal distribution. Negative kurtosis indicates that, relative to a normal distribution, the observations cluster less and have thicker tails until the extreme values of the distribution, at which point the tails of the platykurtic distribution are thinner relative to a normal distribution.

• Skewness. A measure of the asymmetry of a distribution. The normal distribution is symmetric and has a skewness value of 0. A distribution with a significant positive skewness has a long right tail. A distribution with a significant negative skewness has a long left tail. As a guideline, a skewness value more than twice its standard error is taken to indicate a departure from symmetry.

The following region statistics may result in more than one graphic element per subgroup. When using the interval, area, or edge graphic elements, a region statistic results in one graphic element showing the range. All other graphic elements result in two separate elements, one showing the start of the range and one showing the end of the range.

• Region: Range. The range of values between the minimum and maximum values.

• Region: 95% Confidence Interval of Mean. A range of values that has a 95% chance of including the population mean.

• Region: 95% Confidence Interval of Individual. A range of values that has a 95% chance of including the predicted value given the individual case.

• Region: 1 Standard Deviation above/below Mean. A range of values between 1 standard deviation above and below the mean.

• Region: 1 Standard Error above/below Mean. A range of values between 1 standard error above and below the mean.

Count-Based Summary Statistics

• Count. The number of rows/cases.

• Cumulative Count. The cumulative number of rows/cases. Each graphic element shows the count for one subgroup plus the total count of all previous groups.

• Percent of Count. The percentage of rows/cases in each subgroup compared to the total number of rows/cases.

• Cumulative Percent of Count. The cumulative percentage of rows/cases in each subgroup compared to the total number of rows/cases. Each graphic element shows the percentage for one subgroup plus the total percentage of all previous groups.

Related Topics

Creating Graphboard Visualizations
Detailed Tab
Titles Tab
Options Tab
Available Built-in Visualization Types
Examples


Variable Types

variable types,variable types,variable types
in visualizations,in visualizations,in visualizations
measurement level,measurement level,measurement level
in visualizations,in visualizations,in visualizations
multiple response sets,multiple response sets,multiple response sets
in visualizations,in visualizations,in visualizations

Icons appear next to variables in variable lists to indicate the variable type and data type. Icons also identify multiple response sets.

Measurement Level | Data Type
 | Numeric | String | Date | Time
Continuous |  | n/a |  |
Ordered Set |  |  |  |
Set |  |  |  |
Multiple response set, multiple categories
Multiple response set, multiple dichotomies

Measurement Level

A variable's measurement level is important when you create a visualization. Following is a description of the measurement levels. You can temporarily change the measurement level by right-clicking a variable in a variable list and choosing an option. In most cases, you need to consider only the two broadest classifications of variables, categorical and continuous:

Categorical. Data with a limited number of distinct values or categories (for example, gender or religion). Categorical fields/variables can be string (alphanumeric) or numeric variables that use numeric codes to represent categories (for example, 0 = male and 1 = female). Also referred to as qualitative data. Sets, ordered sets, and flags are all categorical variables.

• flag. A field/variable with two distinct values, such as Yes and No or 1 and 2. Also known as a dichotomous or binary variable.

• ordered set. A field/variable whose values represent categories with some intrinsic ranking (for example, levels of service satisfaction from highly dissatisfied to highly satisfied). Examples of ordered sets include attitude scores representing degree of satisfaction or confidence and preference rating scores. Also known as an ordinal variable.

• set. A field/variable whose values represent categories with no intrinsic ranking (for example, the department of the company in which an employee works). Examples of nominal variables include region, zip code, and religious affiliation. Also known as a nominal variable.

Continuous. Data measured on an interval or ratio scale, where the data values indicate both the order of values and the distance between values. For example, a salary of $72,195 is higher than a salary of $52,398, and the distance between the two values is $19,797. Also referred to as quantitative, scale, or numeric range data.

Categorical variables define categories in the visualization, typically to draw separate graphic elements or to group graphic elements. Continuous variables are often summarized within categories of categorical variables. For example, a default visualization of income for gender categories would display the mean income for males and the mean income for females. The raw values for continuous variables can also be plotted, as in a scatterplot. For example, a scatterplot may show the current salary and beginning salary for each case. A categorical variable could be used to group the cases by gender.

Data Types

Measurement level isn't the only property of a variable that determines its type. A variable is also stored as a specific data type. Possible data types are strings (non-numeric data such as letters), numeric values (real numbers), and dates. Unlike the measurement level, a variable's data type cannot be changed temporarily. You must change the way the data are stored in the original data set.

Multiple Response Sets

Some data files support a special kind of "variable" called a multiple response set. Multiple response sets aren't really "variables" in the normal sense. Multiple response sets use multiple variables to record responses to questions where the respondent can give more than one answer. Multiple response sets are treated like categorical variables, and most of the things you can do with categorical variables, you can also do with multiple response sets.

Multiple response sets can be multiple dichotomy sets or multiple category sets.

Multiple dichotomy sets. A multiple dichotomy set typically consists of multiple dichotomous variables: variables with only two possible values of a yes/no, present/absent, checked/not checked nature. Although the variables may not be strictly dichotomous, all of the variables in the set are coded the same way.

For example, a survey provides five possible responses to the question, "Which of the following sources do you rely on for news?" The respondent can indicate multiple choices by checking a box next to each choice. The five responses become five variables in the data file, coded 0 for No (not checked) and 1 for Yes (checked).

Multiple category sets. A multiple category set consists of multiple variables, all coded the same way, often with many possible response categories. For example, a survey item states, "Name up to three nationalities that best describe your ethnic heritage." There may be hundreds of possible responses, but for coding purposes the list is limited to the 40 most common nationalities, with everything else relegated to an "other" category. In the data file, the three choices become three variables, each with 41 categories (40 coded nationalities and one "other" category).


Detailed Tab

Detailed Tab Collapse Hide details
Detailed tab

Use the Detailed tab when you know what type of visualization you want to create or when you want to add optional aesthetics, panels, and/or animation to a visualization. For examples, see Examples .

If you selected a visualization type on the Basic tab, it will be displayed. Otherwise, choose one from the drop-down list. For information about the visualization types, see Available Built-in Visualization Types .

To the immediate right of the visualization's thumbnail image are controls for specifying the variables/fields required for the visualization type. You must specify all of these fields/variables.

For certain visualizations, you can select a summary statistic. In some cases (such as with bar charts), you can use one of these summary options for the transparency aesthetic. For descriptions of the summary statistics, see Basic Tab .

You can select one or more of the optional aesthetics. These can add dimensionality by allowing you to include other fields/variables in the visualization. For example, you may use a field/variable to vary the size of points in a scatterplot.

You can select one or more of the paneling or animation options.

Understanding Optional Aesthetics Collapse Hide details

Understanding Optional Aesthetics

aesthetics,aesthetics,aesthetics
in visualizations,in visualizations,in visualizations

Aesthetics (and overlays) add dimensionality to a visualization. The effect of an aesthetic (grouping, clustering, or stacking) depends on the visualization type, the type of field/variable, and the graphic element type and statistic. For example, a categorical field/variable for color may be used to group points in a scatterplot or to create the stacks in a stacked bar chart. A continuous numeric range for color may also be used to indicate the range's values for each point in a scatterplot.

You should experiment with the aesthetics and overlays to find one that fulfills your needs. The following descriptions may help you pick the right one.

Note: Not all aesthetics or overlays are available for all visualization types.

color,color,color
in visualizations,in visualizations,in visualizations

• Color. When color is defined by a categorical variable/field, it splits the visualization based on the individual categories, one color for each category. When color is a continuous numeric range, it varies the color based on the value of the range field/variable. If the graphic element (for example, a bar or box) represents more than one record/case and a range field/variable is used for color, the color varies based on the mean of the range field/variable.

shape,shape,shape
in visualizations,in visualizations,in visualizations

• Shape. Shape is defined by a categorical variable/field that splits the visualization into elements of different shapes, one for each category.

transparency,transparency,transparency
in visualizations,in visualizations,in visualizations

• Transparency. When transparency is defined by a categorical variable/field, it splits the visualization based on the individual categories, one transparency level for each category. When transparency is a continuous numeric range, it varies the transparency based on the value of the range field/variable. If the graphic element (for example, a bar or box) represents more than one record/case and a range field/variable is used for transparency, the color varies based on the mean of the range field/variable. At the largest value, the graphic elements are fully transparent. At the smallest value, they are fully opaque.

data labels,data labels,data labels
in visualizations,in visualizations,in visualizations
labels,labels,labels
in visualizations,in visualizations,in visualizations

• Data Label. Data labels are defined by any type of field/variable whose values are used to create labels that are attached to the graphic elements.

size,size,size
in visualizations,in visualizations,in visualizations

• Size. When size is defined by a categorical variable/field, it splits the visualization based on the individual categories, one size for each category. When size is a continuous numeric range, it varies the size based on the value of the range field/variable. If the graphic element (for example, a bar or box) represents more than one record/case and a range field/variable is used for size, the size varies based on the mean of the range field/variable.

Graph with color overlay aesthetic Close
Graph with size overlay aesthetic Close
Understanding Paneling and Animation Collapse Hide details

Understanding Paneling and Animation

paneling,paneling,paneling
in visualizations,in visualizations,in visualizations
faceting,faceting,faceting
in visualizations,in visualizations,in visualizations

Paneling. Paneling, also known as faceting, creates a table of graphs. One graph is generated for each category in the paneling fields/variables, but all panels appear simultaneously. Paneling is useful for checking whether the visualization is subject to the conditions of the paneling fields/variables. For example, you may panel a histogram by gender to determine whether the frequency distributions are equal across males and females. That is, you can check whether salary is subject to gender differences. Select a categorical field/variable for paneling.

animation,animation,animation
in visualizations,in visualizations,in visualizations

Animation. Animation resembles paneling in that multiple graphs are created from the values of the animation field/variable, but these graphs are not shown together. Rather, you use the controls in Explore mode to animate the output and flip through a sequence of individual graphs. Furthermore, unlike paneling, animation does not require a categorical field/variable. You can specify a continuous field/variable whose values are split up into ranges automatically. You can vary the size of the range with the animation controls in explore mode. Not all visualizations offer animation.

Animated graph: low blood pressure Close
Animated plot using a variable with three categories, slider at low blood pressure
Animated plot using a variable with three categories, slider at normal blood pressure
Animated plot using a variable with three categories, slider at high blood pressure

Related Topics

Creating Graphboard Visualizations
Basic Tab
Titles Tab
Options Tab
Available Built-in Visualization Types
Examples


Titles Tab

visualizations,visualizations,visualizations
titles,titles,titles
footnotes,footnotes,footnotes
titles,titles,titles
adding to visualizations,adding to visualizations,adding to visualizations
footnotes,footnotes,footnotes
adding to visualizations,adding to visualizations,adding to visualizations
Titles Tab Collapse Hide details
Titles tab

Use the Titles tab to define any titles and footnotes that you want to appear in the resulting visualization. The visualization template may contain hard-coded titles. Select Use default titles to preserve titles and footnotes defined in the visualization template. If you want to define your own titles and/or footnotes, select Use custom titles and enter the custom title and/or footnote text. You can add multiple lines within a title or footnote by pressing Enter.

Note that selecting Use custom titles overrides any title or footnote defined in the visualization template, even if you don't explicitly define text for a particular title or footnote.

Related Topics

Creating Graphboard Visualizations
Basic Tab
Detailed Tab
Options Tab
Available Built-in Visualization Types
Examples


Options Tab

Use the Options tab to specify additional features that are applied to the visualization when it's created.

Output Label Collapse Hide details

Output Label

The output label defines the text that appears in the outline pane of the Output Viewer. A default label is generated based on variable and template selections. If you changed the label and later decide that you want to restore the default label, click Default.

visualization stylesheets,visualization stylesheets,visualization stylesheets
applying,applying,applying
Stylesheet Collapse Hide details

Stylesheet

A visualization stylesheet specifies stylistic properties of the visualization. For example, the stylesheet can define fonts, dashings, and colors, among other options. To a certain extent, stylesheets provide a shortcut for edits that you would have to make later. Note, however, that a stylesheet is limited to style changes. Other changes such as the position or the legend or the scale range are not stored in the stylesheet. Click Select to display the Select Stylesheet dialog box and choose a different stylesheet. For more information about this dialog box, see Select Stylesheet Dialog Box.

User-Missing Values Collapse Hide details

User-Missing Values

Break Variables. If there are missing values for the variables used to define categories or subgroups, select Include so that the category or categories of user-missing values (values identified as missing by the user) are included in the chart. These "missing" categories also act as break variables in calculating the statistic. The "missing" category or categories are displayed on the category axis or in the legend, adding, for example, an extra bar or a slice to a pie chart. If there are no missing values, the "missing" categories are not displayed.

If you select this option and want to suppress display after the chart is drawn, open the chart in the Chart Editor and choose Properties from the Edit menu. Use the Categories tab to move the categories that you want to suppress to the Excluded list. Note, however, that the statistics are not recalculated if you hide the "missing" categories. Therefore, something like a percent statistic will still take the "missing" categories into account.

Note: This control does not affect system-missing values. These are always excluded from the chart.

Summary Statistics and Case Values. You can choose one of the following alternatives for exclusion of cases having missing values:

• Exclude listwise to obtain a consistent base for the chart. If any of the variables in the chart has a missing value for a given case, the whole case is excluded from the chart.

• Exclude variable-by-variable to maximize the use of the data. If a selected variable has any missing values, the cases having those missing values are excluded when the variable is analyzed.

To see the difference between listwise and variable-by-variable exclusion of missing values, consider the following figures, which show a bar chart for each of the two options.

Listwise exclusion of missing values
Variable-by-variable exclusion of missing values

The data include some system-missing (blank) values in the variables for Current Salary and Employment Category. In some other cases, the value 0 was entered and defined as missing. For both charts, the option Display groups defined by missing values is selected, which adds the category Missing to the other displayed job categories. In each chart, the values of the summary function, Number of cases, are displayed in the bar labels.

In both charts, 26 cases have a system-missing value for the job category, and 13 cases have the user-missing value (0). In the listwise chart, the number of cases is the same for both variables in each bar cluster because whenever a value was missing, the case was excluded for all variables. In the variable-by-variable chart, the number of nonmissing cases for each variable in a category is plotted without regard to missing values in other variables.

Related Topics

Creating Graphboard Visualizations
Basic Tab
Detailed Tab
Titles Tab
Available Built-in Visualization Types
Examples


Select Stylesheet Dialog Box

The table at the top of the dialog box lists all of the visualization stylesheets that are currently available. Some stylesheets are pre-installed, while others may have been created in the PASW Viz Designer (a separate product).

The bottom of the dialog box shows example visualizations with sample data. Select one of the stylesheets to apply its styles to the example visualizations. These examples can help you determine how the stylesheet will affect your actual visualization.

The dialog box also offers the following options.

Manage. Manage visualization templates and stylesheets on your computer. You can import, export, rename, and delete visualization templates and stylesheets on your local machine. See the topic Managing Templates and Stylesheets for more information.

Location. Change the location in which visualization templates and stylesheets are stored. The current location is listed to the right of the button. See the topic Setting the Location of Templates and Stylesheets for more information.

Related Topics

Options Tab


Setting the Location of Templates and Stylesheets

visualization templates,visualization templates,visualization templates
location,location,location
visualization stylesheets,visualization stylesheets,visualization stylesheets
location,location,location

Visualization templates and stylesheets are stored in a specific local folder or in the repository. When selecting templates and stylesheets, only the built-in templates/stylesheets and templates/stylesheets in this location are displayed. By keeping all templates and stylesheets in one place, SPSS Inc. applications can easily access them. For information about adding additional templates and stylesheets to this location, see Managing Templates and Stylesheets .

How to Set the Location of Templates and Stylesheets Collapse Hide details

How to Set the Location of Templates and Stylesheets

Templates and Stylesheets dialog box

In a template or stylesheet dialog box, click Location... to display the Templates and Stylesheets dialog box.

Select an option for the default location for templates and stylesheets:

Local Machine. Templates and stylesheets are located in a specific folder on your local computer. On Windows XP, this folder is C:\Documents and Settings\<user>\Application Data\SPSSInc\Graphboard. The folder cannot be changed.

Predictive Enterprise Repository. Templates and stylesheets are located in a user-specified folder in the repository. To identify the specific folder, click Folder. For more information, see Using the repository as the Template and Stylesheet Location .

Click OK.


Using the repository as the Template and Stylesheet Location

repository,repository,repository
using as location for visualization templates and stylesheets,using as location for visualization templates and stylesheets,using as location for visualization templates and stylesheets

Visualization templates and stylesheets can be stored in the repository. This location is a specific folder in the repository. If this is set as the default location, any templates and stylesheets in this location are available for selection.

This feature requires the Statistics Adapter option.

How to Set a Folder in repository as the Location for Templates and Stylesheets Collapse Hide details

How to Set a Folder in repository as the Location for Templates and Stylesheets

In a dialog box with a Location button (for example, in the Select Stylesheet dialog box), click Location....

Select Predictive Enterprise Repository.

Click Folder.

Note: If you are not already connected to a repository, you will be prompted for connection information.

In the Select Folder dialog box, select the folder in which templates and stylesheets are stored.

Select Folder dialog box

If desired, select a label from Retrieve Label. Only templates and stylesheets with that label will be displayed.

If you are looking for a folder that contains a particular template or stylesheet, you may want to search for the template or stylesheet on the Search tab. See the topic Searching for Repository Objects for more information. The Select Folder dialog box automatically selects the folder in which the found template or stylesheet is located.

Click Select Folder.


Managing Templates and Stylesheets

templates,templates,templates
importing,importing,importing
exporting,exporting,exporting
renaming,renaming,renaming
deleting,deleting,deleting
visualization templates,visualization templates,visualization templates
importing,importing,importing
exporting,exporting,exporting
renaming,renaming,renaming
deleting,deleting,deleting
importing,importing,importing
visualization templates,visualization templates,visualization templates
exporting,exporting,exporting
visualization templates,visualization templates,visualization templates
renaming,renaming,renaming
visualization templates,visualization templates,visualization templates
deleting,deleting,deleting
visualization templates,visualization templates,visualization templates
stylesheets,stylesheets,stylesheets
importing,importing,importing
exporting,exporting,exporting
renaming,renaming,renaming
deleting,deleting,deleting
visualization stylesheets,visualization stylesheets,visualization stylesheets
importing,importing,importing
exporting,exporting,exporting
renaming,renaming,renaming
deleting,deleting,deleting
importing,importing,importing
visualization stylesheets,visualization stylesheets,visualization stylesheets
exporting,exporting,exporting
visualization stylesheets,visualization stylesheets,visualization stylesheets
renaming,renaming,renaming
visualization stylesheets,visualization stylesheets,visualization stylesheets
deleting,deleting,deleting
visualization stylesheets,visualization stylesheets,visualization stylesheets

You can manage the templates and stylesheets in the local location on your computer by using the Manage Templates and Stylesheets dialog box. This dialog box allows you to import, export, rename, and delete visualization templates and stylesheets in the local location on your computer.

Click Manage... in one of the dialog boxes where you select templates or stylesheets.

Manage Templates and Stylesheets Dialog Box Collapse Hide details

Manage Templates and Stylesheets Dialog Box

Manage Templates and Stylesheets dialog box

The Templates tab lists all the local templates. The Stylesheets tab lists all the local stylesheets, as well as displaying example visualizations with sample data. You can select one of the stylesheets to apply its styles to the example visualizations.

The following buttons operate on whichever tab is currently activated.

Import. Import a visualization template or stylesheet from the file system. Importing a template or stylesheet makes it available to the SPSS Inc. application. If another user sent you a template or stylesheet, you import the template or stylesheet before using it in your application.

Export. Export a visualization template or stylesheet to the file system. Export a template or stylesheet when you want to send it to another user.

Rename. Rename the selected visualization template or stylesheet. You cannot change a template name to one that's already used.

Delete. Delete the selected visualization template(s) or stylesheet(s). You can select multiple templates stylesheets with Ctrl-Clickon Windows and Linux and Command-click on the Mac. There is no undo action for deleting so proceed with caution.


Available Built-in Visualization Types

graphboard,graphboard,graphboard
graph types,graph types,graph types
graph types,graph types,graph types
graphboard,graphboard,graphboard

You can create several different visualization types. All of the following built-in types are available on both the Basic and Detailed tabs.

Available graph types
bar chart,bar chart,bar chart Bar Calculates a summary statistic for a continuous numeric range and displays the results for each category of a categorical field/variable as bars. Requires: A categorical field/variable and a range field or continuous variable | bar chart,bar chart,bar chart of counts,of counts,of counts Bar of Counts Displays the proportion of rows/cases in each category of a categorical field/variable as bars. Requires: A single categorical field/variable
pie chart,pie chart,pie chart Pie Calculates the sum of a continuous numeric range and displays the proportion of that sum distributed in each category of a categorical field/variable as slices of a pie. Requires: A categorical field/variable and a range field or continuous variable | pie chart,pie chart,pie chart using counts,using counts,using counts Pie of Counts Displays the proportion of rows/cases in each category of a categorical field/variable as slices of a pie. Requires: A single categorical field/variable
bar chart,bar chart,bar chart 3-D,3-D,3-D 3-D bar chart,3-D bar chart,3-D bar chart 3-D Bar Calculates a summary statistic for a continuous numeric range and displays the results for the crossing of categories between two categorical fields/variables. Requires: A pair of categorical fields/variables and a range field or continuous variable | pie chart,pie chart,pie chart 3-D,3-D,3-D 3-D pie chart,3-D pie chart,3-D pie chart 3-D Pie This is the same as Pie except with an additional 3-D effect. Requires: A categorical field/variable and a range field or continuous variable
line chart,line chart,line chart Line Calculates a summary statistic for a continuous numeric range for each value of another field/variable and draws a line connecting the values. Requires: A pair of fields/variables of any type | area chart,area chart,area chart Area Calculates a summary statistic for a continuous numeric range for each value of another field/variable and draws an area connecting the values. The difference between a line and area is minimal in that an area resembles a line with the space colored below it. However, if you use a color aesthetic, this results in a simple split of the line and a stacking of the area. Requires: A pair of fields/variables of any type
3-D area chart,3-D area chart,3-D area chart description,description,description area chart,area chart,area chart 3-D,3-D,3-D 3-D Area Displays the values of one continuous numeric range plotted against the values of another and split by a categorical field/variable. An area element is drawn for each category. Requires: A categorical field/variable and a pair of fields/variables of any type | path graph,path graph,path graph Path Displays the values of one field/variable plotted against the values of another, with a line connecting the values in the order they appear in the original dataset. The ordering is the primary difference between a path and a line. Requires: A pair of fields/variables of any type
ribbon chart,ribbon chart,ribbon chart Ribbon Calculates a summary statistic for a continuous numeric range for each value of another field/variable and draws a ribbon connecting the values. A ribbon is essentially a line with 3-D effects. It is not a true 3-D graph. Requires: A pair of fields/variables of any type | surface graph,surface graph,surface graph Surface Displays the values of three fields/variables plotted against the values of one another, with a surface connecting the values. Requires: Three fields/variables of any type
scatterplot,scatterplot,scatterplot Scatterplot Displays the values of one field/variable plotted against the values of another. This graph can highlight the relationship between the fields/variables (if there is one). Requires: A pair of fields/variables of any type | bubble plot,bubble plot,bubble plot Bubble plot Like a basic scatterplot, displays the values of one field/variable plotted against the values of another. The difference is that the values of a third field/variable are used to vary the size of the individual points. Requires: Three fields/variables of any type
binned scatterplot,binned scatterplot,binned scatterplot scatterplot,scatterplot,scatterplot binned,binned,binned Binned Scatterplot Like a basic scatterplot, displays the values of one field/variable plotted against the values of another. The difference is that similar values are binned into groups and that the color or size aesthetic is used to indicate the number of cases in each bin. Requires: A pair of range fields or continuous variables | binned scatterplot,binned scatterplot,binned scatterplot hex bins,hex bins,hex bins scatterplot,scatterplot,scatterplot hex binned,hex binned,hex binned hex binned scatterplot,hex binned scatterplot,hex binned scatterplot Hex Binned Scatterplot See the description of Binned Scatterplot. The difference is the shape of the underlying bins, which are shaped like hexagons rather than circles. The resulting hex binned scatterplot looks similar to the binned scatterplot. However, the number of values in each bin will differ between the graphs because of the shape of the underlying bins. Requires: A pair of range fields or continuous variables
scatterplot,scatterplot,scatterplot 3-D,3-D,3-D 3-D scatterplot,3-D scatterplot,3-D scatterplot 3-D Scatterplot Displays the values of three field/variables plotted against each other. This graph can highlight the relationship between the fields/variables (if there is one). Requires: Three fields/variables of any type | scatterplot matrix (SPLOM),scatterplot matrix (SPLOM),scatterplot matrix (SPLOM) SPLOM,SPLOM,SPLOM Scatterplot Matrix (SPLOM) Displays the values of one field/variable plotted against the values of another for every field/variable. A SPLOM is like a table of scatterplots. The SPLOM also includes a histogram of each field/variable. Requires: Two or more range fields or continuous variables
histogram,histogram,histogram Histogram Displays the frequency distribution of a field/variable. A histogram can help you determine the distribution type and see whether the distribution is skewed. Requires: A single field/variable of any type | histogram,histogram,histogram Histogram with Normal Distribution Displays the frequency distribution of a field/variable with a superimposed curve of the normal distribution. Requires: A single field/variable of any type
histogram,histogram,histogram 3-D,3-D,3-D 3-D histogram,3-D histogram,3-D histogram 3-D Histogram Displays the frequency distribution of a pair of fields/variables. Requires: A pair of range fields or continuous variables | density,density,density 3-D,3-D,3-D 3-D density,3-D density,3-D density 3-D Density Displays the frequency distribution of a pair of continuous numeric ranges. This is similar to a 3-D histogram, with the only difference being that a surface is used instead of bars to show the distribution. Requires: A pair of range fields or continuous variables
dot plot,dot plot,dot plot Dot plot Displays the individual cases/rows and stacks them at the distinct data points on the x axis. This graph is similar to a histogram in that it shows the distribution of the data, but it displays each case/row rather than an aggregated count for a specific bin (range of values). Requires: A single field/variable of any type | dot plot,dot plot,dot plot 2-D,2-D,2-D 2-D dot plot,2-D dot plot,2-D dot plot 2-D Dot Plot Displays the individual cases/rows and stacks them at the distinct data points on the y axis for each category of a categorical field/variable. Requires: A categorical field/variable and a range field or continuous variable
boxplot,boxplot,boxplot Boxplot Calculates the five statistics (minimum, first quartile, median, third quartile, and maximum) for a continuous numeric range for each category of a categorical field/variable. The results are displayed as boxplot/schema elements. The boxplots can help you see how the distribution of continuous data varies among the categories. Requires: A categorical field/variable and a range field or continuous variable | heat map,heat map,heat map Heat map Calculates the mean for a continuous numeric range for the crossing of categories between two categorical fields/variables. Requires: A pair of categorical fields/variables and a range field or continuous variable
parallel coordinates graph,parallel coordinates graph,parallel coordinates graph Parallel Creates parallel axes for each field/variable and draws a line through the field/variable value for every row/case in the data. Requires: Two or more range fields or continuous variables |

Related Topics

Creating Graphboard Visualizations
Basic Tab
Detailed Tab
Titles Tab
Options Tab
Examples


Examples

This section includes several different examples to demonstrate the available options. The examples also provide information for interpreting the resulting visualizations.

It is recommended that you read the examples in the order presented. Subsequent examples build on previous ones. Use the Next and Previous buttons in the top, right corner of the topic to navigate the examples in order.

Related Topics

Creating Graphboard Visualizations
Basic Tab
Detailed Tab
Titles Tab
Options Tab
Available Built-in Visualization Types
Example: Bar Chart with a Summary Statistic
Example: Clustered Bar Chart with a Summary Statistic
Example: Paneled Histogram
Example: Paneled Dot Plot
Example: Boxplot
Example: Pie Chart
Example: Heat Map
Example: Scatterplot Matrix (SPLOM)


Example: Bar Chart with a Summary Statistic

bar chart,bar chart,bar chart
example,example,example

We will create a bar chart that summarizes a continuous numeric field/variable for each category of a set/categorical variable. Specifically, we will create a bar chart that shows the mean salary for men and women.

This and several of the following examples use employee_data.sav, which is a hypothetical dataset containing information about a company's employees. See the topic Sample Files for more information.

On the Basic tab, select gender and salary. (Use Ctrl+Click to select multiple fields/variables.)

Select Bar.

From the Summary drop-down list, select Mean.

Basic tab selections, bar chart with a summary statistic

Click OK.

Bar chart with a summary statistic

We can observe the following:

• Based on the height of the bars, it is clear that the mean salary for males is greater than the mean salary for females.

• The scale for salary begins at 0. This is appropriate for this chart. Using a different minimum value for the scale would distort the difference between mean salaries for males and females.

Related Topics

Examples
Example: Clustered Bar Chart with a Summary Statistic
Example: Paneled Histogram
Example: Paneled Dot Plot
Example: Boxplot
Example: Pie Chart
Example: Heat Map
Example: Scatterplot Matrix (SPLOM)


Example: Clustered Bar Chart with a Summary Statistic

bar chart,bar chart,bar chart
example,example,example
clustered bar chart,clustered bar chart,clustered bar chart
example,example,example

We will now create a clustered bar chart to see whether the difference in mean salary between males and females is subject to job type. Perhaps females, on average, make more than males for certain job types.

Note: This example uses employee_data.sav.

On the Basic tab, select jobcat and salary. (Use Ctrl+Click to select multiple fields/variables.)

Select Bar.

From the Summary list, select Mean.

Click the Detailed tab. Note that your selections from the previous tab are reflected here.

In the Optional Aesthetics group, choose gender from the Color drop-down list.

Detailed tab selections, clustered bar chart

Click OK.

Clustered bar chart

We can observe the following:

• The difference in mean salaries for each job type does not appear to be as great as it was in the bar chart that compared the mean salaries for all males and females. Perhaps there are varying number of males and females in each group. You could check this by creating a bar chart of counts.

• Regardless of job type, the mean salary for males is always greater than the mean salary for females.

Related Topics

Examples
Example: Bar Chart with a Summary Statistic
Example: Paneled Histogram
Example: Paneled Dot Plot
Example: Boxplot
Example: Pie Chart
Example: Heat Map
Example: Scatterplot Matrix (SPLOM)


Example: Paneled Histogram

histogram,histogram,histogram
example,example,example

We will create a histogram that is paneled by gender so we can compare the frequency distributions of salary for men and women. The frequency distribution shows how many cases/rows lie within specific salary ranges. The paneled histogram can help us further analyze the difference in salaries between genders.

Note: This example uses employee_data.sav.

On the Basic tab, select salary.

Select Histogram.

Click the Detailed tab.

In the Panels and Animation group, choose gender from the Panel Across drop-down list.

Detailed tab selections, paneled histogram

Click OK.

Paneled histogram

We can observe the following:

• Neither frequency distribution is a normal distribution. That is, the histograms do not resemble bell curves, as they would if the data were normally distributed.

• The taller bars are on the left side of each graph. Therefore, for both men and women, more make lower rather than higher salaries.

• The frequency distributions of salary among men and women are not equal. Notice the shape of the histograms. There are more men who make higher salaries than woman who make higher salaries.

Related Topics

Examples
Example: Bar Chart with a Summary Statistic
Example: Clustered Bar Chart with a Summary Statistic
Example: Paneled Dot Plot
Example: Boxplot
Example: Pie Chart
Example: Heat Map
Example: Scatterplot Matrix (SPLOM)


Example: Paneled Dot Plot

dot plot,dot plot,dot plot
example,example,example

Like a histogram, a dot plot shows the distribution of a continuous numeric range. Unlike a histogram, which shows counts for binned ranges of data, a dot plot shows every row/case in the data. Therefore, a dot plot provides more granularity compared to the histogram. In fact, using a dot plot may be the preferred starting point when analyzing frequency distributions.

Note: This example uses employee_data.sav.

On the Basic tab, select salary.

Select Dot Plot.

Click the Detailed tab.

In the Panels and Animation group, choose gender from the Panel Down drop-down list.

Detailed tab selections, paneled dot plot

Click OK.

Paneled dot plot

Compared to the histogram (see Example: Paneled Histogram ), we can observe the following:

• The peak at 20,000 that appeared in the histogram for females is less dramatic in the dot plot. There are many cases/rows concentrated around that value, but most of those values are closer to 25,000. This level of granularity is not apparent in the histogram.

• Although the histogram for males suggests that the mean salary for males gradually declines after 40,000, the dot plot shows that the distribution is fairly uniform after that value, to 80,000. At any one salary value in that range, there are three or more males who earn that particular salary.

Related Topics

Examples
Example: Bar Chart with a Summary Statistic
Example: Clustered Bar Chart with a Summary Statistic
Example: Paneled Histogram
Example: Boxplot
Example: Pie Chart
Example: Heat Map
Example: Scatterplot Matrix (SPLOM)


Example: Boxplot

boxplot,boxplot,boxplot
example,example,example

A boxplot is another useful visualization for viewing how the data are distributed. A boxplot contains several statistical measures that we will explore after creating the visualization.

Note: This example uses employee_data.sav.

On the Basic tab, select gender and salary. (Use Ctrl+Click to select multiple fields/variables.)

Select Boxplot.

Basic tab selections, boxplot

Click OK.

Boxplot

Let's explore the different parts of the boxplot:

• The dark line in the middle of the boxes is the median of salary. Half of the cases/rows have a value greater than the median, and half have a value lower. Like the mean, the median is a measure of central tendency. Unlike the mean, it is less influenced by cases/rows with extreme values. In this example, the median is lower than the mean (compare to Example: Bar Chart with a Summary Statistic ). The difference between the mean and median indicates that there are a few cases/rows with extreme values that are elevating the mean. That is, there are a few employees who earn large salaries.

• The bottom of the box indicates the 25th percentile. Twenty-five percent of cases/rows have values below the 25th percentile. The top of the box represents the 75th percentile. Twenty-five percent of cases/rows have values above the 75th percentile. This means that 50% of the case/rows lie within the box. The box is much shorter for females than for males. This is one clue that salary varies less for females than for males. The top and bottom of the box are often called hinges.

• The T-bars that extend from the boxes are called inner fences or whiskers. These extend to 1.5 times the height of the box or, if no case/row has a value in that range, to the minimum or maximum values. If the data are distributed normally, approximately 95% or the data are expected to lie between the inner fences. In this example, the inner fences extend less for females compared to males, another indication that salary varies less for females than for males.

• The points are outliers. These are defined as values that do not fall in the inner fences. Outliers are extreme values. The asterisks or stars are extreme outliers. These represent cases/rows that have values more than three times the height of the boxes. There are several outliers for both females and males. Remember that the mean is greater than the median. The greater mean is caused by these outliers.

Related Topics

Examples
Example: Bar Chart with a Summary Statistic
Example: Clustered Bar Chart with a Summary Statistic
Example: Paneled Histogram
Example: Paneled Dot Plot
Example: Pie Chart
Example: Heat Map
Example: Scatterplot Matrix (SPLOM)


Example: Pie Chart

pie chart,pie chart,pie chart
example,example,example
pie chart,pie chart,pie chart
example,example,example

We will now use a different dataset to explore some other visualization types. The dataset is cars.sav, which is a hypothetical data file that contains information about cars.

We will first create a pie chart to check the proportion of cars that are produced in different geographic regions.

On the Basic tab, select origin.

Select Pie of Counts.

Basic tab selections, pie chart

Click OK.

Pie chart

We can observe the following:

• American cars are the most common cars in the dataset.

• There are a similar number of European and Japanese cars in the dataset. The combination of these groups is less the total number of American cars.

Related Topics

Examples
Example: Bar Chart with a Summary Statistic
Example: Clustered Bar Chart with a Summary Statistic
Example: Paneled Histogram
Example: Paneled Dot Plot
Example: Boxplot
Example: Heat Map
Example: Scatterplot Matrix (SPLOM)


Example: Heat Map

heat map,heat map,heat map
example,example,example

We will now create a categorical heat map to check the mean miles per gallon for cars with a different number of cylinders and produced in different geographic regions.

Note: This example uses cars.sav.

On the Basic tab, select origin, cylinder, and mpg, in that order. (Use Ctrl+Click to select multiple fields/variables.)

Select Heat Map.

Basic tab selections, heat map

Click OK.

Categorical heat map

We can observe the following:

• A heat map is like a table that uses colors instead of numbers to represent the values for the cells. Bright, deep red indicates the highest value, while gray indicates a low value. The value of each cell is the mean of the continuous field/variable for each pair of categories.

• It is clear, regardless of origin, 4-cylinder cars get the best gas mileage, and 8-cylinder cars get the worst gas mileage.

• American cars get the worst gas mileage compared to cars with the same number of cylinders from other regions.

• Four-cylinder Japanese cars get the best gas mileage.

Related Topics

Examples
Example: Bar Chart with a Summary Statistic
Example: Clustered Bar Chart with a Summary Statistic
Example: Paneled Histogram
Example: Paneled Dot Plot
Example: Boxplot
Example: Pie Chart
Example: Scatterplot Matrix (SPLOM)


Example: Scatterplot Matrix (SPLOM)

scatterplot matrix,scatterplot matrix,scatterplot matrix
example,example,example
SPLOM,SPLOM,SPLOM
example,example,example

We will create a scatterplot matrix of several different variables so that we can determine whether there are any relationships among the variables in the dataset.

Note: This example uses cars.sav.

On the Basic tab, select mpg, horse, and weight. (Use Ctrl+Click to select multiple fields/variables.)

Select SPLOM.

Basic tab selections, SPLOM

Click OK.

Scatterplot matrix (SPLOM)

We can observe the following:

• The histograms displayed on the diagonal show the distribution of each variable in the SPLOM. The histogram for mpg appears in the upper left cell, that for horse in the center cell, and that for weight in the lower right cell. None of the variables appears normally distributed. That is, none of the histograms resembles a bell curve.

• There is a negative nonlinear relationship between weight and mpg and between horse and mpg. That is, mpg decreases as weight and horse increase.

• There is a linear relationship between horse and weight. That is, horse increases as weight increases. You may want to create individual scatterplots of the these variables and the other related variables to explore the relationships further.

Related Topics

Examples
Example: Bar Chart with a Summary Statistic
Example: Clustered Bar Chart with a Summary Statistic
Example: Paneled Histogram
Example: Paneled Dot Plot
Example: Boxplot
Example: Pie Chart
Example: Heat Map


Editing and Exploring Graphboard Visualizations

Double-click a graphboard visualization in the Output Viewer to activate the visualization and open it in the Graphboard Editor. The Graphboard Editor allows you to perform a variety of edits, in addition to providing exploratory tools such as animation.

Related Topics

Editing Visualizations
Exploring Visualizations
Creating and Editing Graphboard Visualizations
Creating Graphboard Visualizations


Editing Visualizations

visualizations,visualizations,visualizations
editing,editing,editing
editing visualizations,editing visualizations,editing visualizations

You have several options for editing a visualization in Edit mode. You can:

• Edit text and format it.

• Change the fill color, transparency, and pattern of frames and graphic elements.

• Change the color and dashing of borders and lines.

• Rotate and change the shape and aspect ratio of point elements.

• Change the size of graphic elements (such as bars and points).

• Adjust the space around items by using margins and padding.

• Specify formatting for numbers.

• Change the axis and scale settings.

• Sort, exclude, and collapse categories on a categorical axis.

• Set the orientation of panels.

• Apply transformations to a coordinate system.

• Change statistics, graphic element types, and collision modifiers.

• Change the position of the legend.

• Apply visualization stylesheets.

The following topics describe how to perform these various tasks. It is also recommended that you read the general rules for editing graphs.

How to Switch to Edit Mode

From the menus choose:

View
Edit Mode

Related Topics

General Rules for Editing Visualizations
Editing and Formatting Text
Changing Colors, Patterns, Dashings, and Transparency
Rotating and Changing the Shape and Aspect Ratio of Point Elements
Changing the Size of Graphic Elements
Specifying Margins and Padding
Formatting Numbers
Changing the Axis and Scale Settings
Editing Categories
Changing the Orientation Panels
Changing Statistics and Graphic Elements
Changing the Position of the Legend
Copying a Visualization and Visualization Data
Keyboard Shortcuts


General Rules for Editing Visualizations

editing visualizations,editing visualizations,editing visualizations
rules,rules,rules
selection,selection,selection
automatic settings,automatic settings,automatic settings

Edit Mode

All edits are done in Edit mode. To enable Edit mode, from the menus choose:

View
Edit Mode

Selection

The options available for editing depend on selection. Different toolbar and properties palette options are enabled depending on what is selected. Only the enabled items apply to the current selection. For example, if an axis is selected, the Scale, Major Ticks, and Minor Ticks tabs are available in the properties palette.

Here are some tips for selecting items in the visualization:

• Click an item to select it.

• Select a graphic element (such as points in a scatterplot or bars in a bar chart) with a single click. After initial selection, click again to narrow the selection to groups of graphic elements or a single graphic element.

• Press Esc to deselect everything.

Palettes

palettes,palettes,palettes
displaying,displaying,displaying
moving,moving,moving
hiding,hiding,hiding

When an item is selected in the visualization, the various palettes are updated to reflect the selection. The palettes contain controls for making edits to the selection. Palettes may be toolbars or a panel with multiple controls and tabs. Palettes can be hidden, so ensure the necessary palette is displayed for making edits. Check the View menu for palettes that are currently displayed.

You can reposition the palettes by clicking and dragging the empty space in a toolbar palette or the left side of other palettes. Visual feedback lets you know where you can dock the palette. For non-toolbar palettes, you can also click the close button to hide the palette and the undock button to display the palette in a separate window. Click the help button to display help for the specific palette.

Automatic Settings

-auto- settings,-auto- settings,-auto- settings

Some settings provide an -auto- option. This indicates that automatic values are applied. Which automatic settings are used depends on the specific visualization and data values. You can enter a value to override the automatic setting. If you want to restore the automatic setting, delete the current value and press Enter. The setting will display -auto- again.

Removing/Hiding Items

You can remove/hide various items in the visualization. For example, you can hide the legend or axis label. To delete an item, select it and press Delete. If the item does not allow deletion, nothing will happen. If you accidentally delete an item, press Ctrl+Z to undo the deletion.

State

Some toolbars reflect the state of the current selection, others don't. The properties palette always reflects state. If a toolbar does not reflect state, this is mentioned in the topic that describes the toolbar.

Related Topics

Editing Visualizations


Editing and Formatting Text

editing visualizations,editing visualizations,editing visualizations
text,text,text
visualizations,visualizations,visualizations
text,text,text

You can edit text in place and change the formatting of an entire text block. Note that you can't edit text that is linked directly to data values. For example, you can't edit a tick label because the content of the label is derived from the underlying data. However, you can format any text in the visualization.

How to Edit Text in Place Collapse Hide details

How to Edit Text in Place

Double-click the text block. This action selects all the text. All toolbars are disabled at this time, because you cannot change any other part of the visualization while editing text.

Type to replace the existing text. You can also click the text again to display a cursor. Position the cursor in the desired position and enter the additional text.

How to Format Text Collapse Hide details

How to Format Text

Select the frame containing the text. Do not double-click the text.

Format text using the font toolbar. If the toolbar is not enabled, make sure only the frame containing the text is selected. If the text itself is selected, the toolbar will be disabled.

Font toolbar

You can change the font:

• Color

• Family (for example, Arial or Verdana)

• Size (the unit is pt unless you indicate a different unit, such as pc)

• Weight

• Alignment relative to the text frame

Formatting applies to all the text in a frame. You can't change the formatting of individual letters or words in any particular block of text.

Related Topics

Editing Visualizations
General Rules for Editing Visualizations


Changing Colors, Patterns, Dashings, and Transparency

editing visualizations,editing visualizations,editing visualizations
colors and patterns,colors and patterns,colors and patterns
dashing,dashing,dashing
transparency,transparency,transparency
visualizations,visualizations,visualizations
colors and patterns,colors and patterns,colors and patterns
dashings,dashings,dashings
transparency,transparency,transparency

Many different items in a visualization have a fill and border. The most obvious example is a bar in a bar chart. The color of the bars is the fill color. They may also have a solid, black border around them.

There are other less obvious items in the visualization that have fill colors. If the fill color is transparent, you may not know there is a fill. For example, consider the text in an axis label. It appears as if this text is "floating" text, but it actually appears in a frame that has a transparent fill color. You can see the frame by selecting the axis label.

Any frame in the visualization can have a fill and border style, including the frame around the whole visualization. Also, any fill has an associated opacity/transparency level that can be adjusted.

How to Change the Colors, Patterns, Dashing, and Transparency Collapse Hide details

How to Change the Colors, Patterns, Dashing, and Transparency

Select the item you want to format. For example, select the bars in a bar chart or a frame containing text. If the visualization is split by a categorical variable or field, you can also select the group that corresponds to an individual category. This allows you to change the default aesthetic assigned to that group. For example, you can change the color of one of the stacking groups in a stacked bar chart.

To change the fill color, the border color, or the fill pattern, use the color toolbar.

Color toolbar

Note: This toolbar does not reflect the state of the current selection.

To change a color or fill, you can click the button to select the displayed option or click the drop-down arrow to choose another option. For colors, notice there is one color that looks like white with a red, diagonal line through it. This is the transparent color. You could use this, for example, to hide the borders on bars in a histogram.

• The first button controls the fill color.

• The second button controls the border color.

• The third button controls the fill pattern. The fill pattern uses the border color. Therefore, the fill pattern is visible only if there is a visible border color.

• The fourth control is a slider and text box that control the opacity of the fill color and pattern. A lower percentage means less opacity and more transparency. 100% is fully opaque (no transparency).

To change the dashing of a border or line, use the line toolbar.

Line toolbar

Note: This toolbar does not reflect the state of the current selection.

As with the other toolbar, you can click the button to select the displayed option or click the drop-down arrow to choose another option.

Related Topics

Editing Visualizations
General Rules for Editing Visualizations


Rotating and Changing the Shape and Aspect Ratio of Point Elements

editing visualizations,editing visualizations,editing visualizations
point rotation,point rotation,point rotation
point shape,point shape,point shape
point aspect ratio,point aspect ratio,point aspect ratio
visualizations,visualizations,visualizations
point rotation,point rotation,point rotation
point shape,point shape,point shape
point aspect ratio,point aspect ratio,point aspect ratio

You can rotate point elements, assign a different predefined shape, or change the aspect ratio (the ratio of width to height).

How to Modify Point Elements Collapse Hide details

How to Modify Point Elements

Select the point elements. You cannot rotate or change the shape and aspect ratio of individual point elements.

Use the symbol toolbar to modify the points.

Symbol toolbar

• The first button allows you to change the shape of the points. Click the drop-down arrow and select a predefined shape.

• The second button allows you to rotate the points to a specific compass position. Click the drop-down arrow and then drag the needle to the desired position.

• The third button allows you to change the aspect ratio. Click the drop-down arrow and then click and drag the rectangle that appears. The shape of the rectangle represents the aspect ratio.

Related Topics

Editing Visualizations
General Rules for Editing Visualizations


Changing the Size of Graphic Elements

editing graphs,editing graphs,editing graphs
size of graphic elements,size of graphic elements,size of graphic elements
graphs,graphs,graphs
size of graphic elements,size of graphic elements,size of graphic elements

You can change the size of the graphic elements in the visualization. These include bars, lines, and points among others. If the graphic element is sized by a variable or field, the specified size is the minimum size.

How to Change the Size of the Graphic Elements Collapse Hide details

How to Change the Size of the Graphic Elements

Select the graphic elements you want to resize.

Use the slider or enter a specific size for the option available on the symbol toolbar. The unit is pixels unless you indicate a different unit (see below for a full list of unit abbreviations). You can also specify a percentage (such as 30%), which means that a graphic element uses the specified percentage of the available space. The available space depends on the graphic element type and the specific visualization.

Valid unit abbreviations
Abbreviation | Unit
cm | centimeter
in | inch
mm | millimeter
pc | pica
pt | point
px | pixel
Size control on symbol toolbar

Related Topics

Editing Visualizations
General Rules for Editing Visualizations


Specifying Margins and Padding

editing visualizations,editing visualizations,editing visualizations
margins,margins,margins
padding,padding,padding
visualizations,visualizations,visualizations
margins,margins,margins
padding,padding,padding

If there is too much or too little spacing around or inside a frame in the visualization, you can change its margin and padding settings. The margin is the amount of space between the frame and other items around it. The padding is the amount of space between the border of the frame and the contents of the frame.

How to Specify Margins and Padding Collapse Hide details

How to Specify Margins and Padding

Select the frame for which you want to specify margins and padding. This can be a text frame, the frame around the legend, or even the data frame displaying the graphic elements (such as bars and points).

Use the Margins tab on the properties palette to specify the settings. All sizes are in pixels unless you indicate a different unit (such as cm or in).

Margins tab

Related Topics

Editing Visualizations
General Rules for Editing Visualizations


Formatting Numbers

editing visualizations,editing visualizations,editing visualizations
number formats,number formats,number formats
visualizations,visualizations,visualizations
number formats,number formats,number formats

You can specify the format for numbers in tick labels on a continuous axis or data value labels displaying a number. For example, you can specify that numbers displayed in the tick labels are shown in thousands.

How to Specify Number Formats Collapse Hide details

How to Specify Number Formats

Select the continuous axis tick labels or the data value labels if they contain numbers.

Click the Format tab on the properties palette.

Format tab

Select the desired number formatting options:

Prefix. A character to display at the beginning of the number. For example, enter a dollar sign ($) if the numbers are salaries in U.S. dollars.

Suffix. A character to display at the end of the number. For example, enter a percentage sign (%) if the numbers are percentages.

Min. Integer Digits. Minimum number of digits to display in the integer part of a decimal representation. If the actual value does not contain the minimum number of digits, the integer part of the value will be padded with zeros.

Max. Integer Digits. Maximum number of digits to display in the integer part of a decimal representation. If the actual value exceeds the minimum number of digits, the integer part of the value will be replaced with asterisks.

Min. Decimal Digits. Minimum number of digits to display in the decimal part of a decimal or scientific representation. If the actual value does not contain the minimum number of digits, the decimal part of the value will be padded with zeros.

Max. Decimal Digits. Maximum number of digits to display in the decimal part of a decimal or scientific representation. If the actual value exceeds the minimum number of digits, the decimal is rounded to the appropriate number of digits.

Scientific. Whether to display numbers in scientific notation. Scientific notation is useful for very large or very small numbers. -auto- lets the application determine when scientific notation is appropriate.

Scaling. A scale factor, which is a number by which the original value is divided. Use a scale factor when the numbers are large, but you don't want the label to extend too much to accommodate the number. If you change the number format of the tick labels, be sure to edit the axis title to indicate how the number should be interpreted. For example, assume your scale axis displays salaries and the labels are 30,000, 50,000, and 70,000. You might enter a scale factor of 1000 to display 30, 50, and 70. You should then edit the scale axis title to include the text in thousands.

Parentheses for -ve. Whether parentheses should be displayed around negative values.

Grouping. Whether to display a character between groups of digits. Your computer's current locale determines which character is used for digit grouping.

Related Topics

Editing Visualizations
General Rules for Editing Visualizations


Changing the Axis and Scale Settings

editing visualizations,editing visualizations,editing visualizations
axes,axes,axes
scales,scales,scales
visualizations,visualizations,visualizations
axes,axes,axes
scales,scales,scales

There are several options for modifying axes and scales.

How to Change Axis and Scale Settings Collapse Hide details

How to Change Axis and Scale Settings

Select any part of the axis (for example, the axis label or tick labels).

Use the Scale, Major Ticks, and Minor Ticks tabs on the properties palette to change the axis and scale settings.

Properties palette

Scale tab

Type. Specifies whether the scale is linear or transformed. Scale transformations help you understand the data or make assumptions necessary for statistical inference. On scatterplots, you might use a transformed scale if the relationship between the independent and dependent variables or fields is nonlinear. Scale transformations can also be used to make a skewed histogram more symmetric so that it resembles a normal distribution. Note that you are transforming only the scale on which the data are displayed; you are not transforming the actual data.

• linear. Specifies a linear, untransformed scale.

• log. Specifies a base-10 log transformed scale. To accommodate zero and negative values, this transformation uses a modified version of the log function. This "safe log" function is defined as sign(x) * log(1 + abs(x)). So safeLog(-99) equals:

sign(-99) * log(1 + abs(-99)) = -1 * log(1 + 99) = -1 * 2 = -2

• power. Specifies a power transformed scale, using an exponent of 0.5. To accommodate negative values, this transformation uses a modified version of the power function. This "safe power" function is defined as sign(x) * pow(abs(x), 0.5). So safePower(-100) equals:

sign(-100) * pow(abs(-100), 0.5) = -1* pow(100, 0.5) = -1 * 10 = -10

Min/Max/Nice Low/Nice High. Specifies the range for the scale. Selecting Nice Low and Nice High allows the application to select an appropriate scale based on the data. The minimum and maximum are "nice" because they are typically whole values greater or less than the maximum and minimum data values. For example, if the data range from 4 to 92, a nice low and high for scale may be 0 and 100 rather than the actual data minimum and maximum. Be careful that you don't set a range that is too small and hides important items. Also note that you cannot set an explicit minimum and maximum if the Include zero option is selected.

Low Margin/High Margin. Create margins at the low and/or high end of the axis. The margin appears perpendicular to the selected axis. The unit is pixels unless you indicate a different unit (such as cm or in). For example, if you set the High Margin to 5 for the vertical axis, a horizontal margin of 5 px runs along the top of the data frame.

Reverse. Specifies whether the scale is reversed.

Include zero. Indicates that the scale should include 0. This option is commonly used for bar charts to ensure the bars begin at 0, rather than a value near the height of the smallest bar. If this option is selected, Min and Max are disabled because you cannot set a custom minimum and maximum for the scale range.

Major Ticks/Minor Ticks Tabs

Ticks or tick marks are the lines that appear on an axis. These indicate values at specific intervals or categories. Major ticks are the tick marks with labels. These are also longer than other tick marks. Minor ticks are tick marks that appear between the major tick marks. Some options are specific to the tick type, but most options are available for major and minor ticks.

Show ticks. Specifies whether major or minor ticks are displayed on a graph.

Show gridlines. Specifies whether gridlines are displayed at the major or minor ticks. Gridlines are lines that cross a whole graph from axis to axis.

Position. Specifies the position of the tick marks relative to the axis.

Length. Specifies the length of the tick marks. The unit is pixels unless you indicate a different unit (such as cm or in).

Base. Applies only to major ticks. Specifies the value at which the first major tick appears.

Delta. Applies only to major ticks. Specifies the difference between major ticks. That is, major ticks will appear at every nth value, where n is the delta value.

Divisions. Applies only to minor ticks. Specifies the number of minor tick divisions between major ticks. The number of minor ticks is one less than the number of divisions. For example, assume that there are major ticks at 0 and 100. If you enter 2 as the number of minor tick divisions, there will be one minor tick at 50, dividing the 0–100 range and creating two divisions.

Related Topics

Editing Visualizations
General Rules for Editing Visualizations


Editing Categories

editing visualizations,editing visualizations,editing visualizations
categories,categories,categories
sorting categories,sorting categories,sorting categories
excluding categories,excluding categories,excluding categories
combining categories,combining categories,combining categories
collapsing categories,collapsing categories,collapsing categories
visualizations,visualizations,visualizations
transpose,transpose,transpose
panels,panels,panels
categories,categories,categories

You can edit the categories on a categorical axis in several ways:

• Change the sort order for displaying the categories.

• Exclude specific categories.

• Add a category that does not appear in the data set.

• Collapse/combine small categories into one category.

How to Change the Sort Order of Categories Collapse Hide details

How to Change the Sort Order of Categories

Select a categorical axis. The Categories palette displays the categories on the axis.

Note: If the palette is not visible, make sure that you have it enabled.

In the Categories palette, select a sorting option from the drop-down list:

Custom. Sort categories based on the order in which they appear in the palette. Use the arrow buttons to move categories to the top of the list, up, down, and to the bottom of the list.

Data. Sort categories based on the order in which they occur in the dataset.

Name. Sort categories alphabetically, using the names as displayed in the palette.

Value. Sort categories by the underlying data value, using the values displayed in parentheses in the palette. Only data sources with metadata (such as PASW Statistics data files) support this option.

Statistic. Sort categories based on the calculated statistic for each category. Examples of statistics include counts, percentages, and means. This option is available only if a statistic is used in the graph.

How to Add a Category Collapse Hide details

How to Add a Category

By default, only categories that appear in the data set are available. You can add a category to the visualization if needed.

Select a categorical axis. The Categories palette displays the categories on the axis.

Note: If the palette is not visible, make sure that you have it enabled.

In the Categories palette, click the add category button:

In the Add a new category dialog box, enter a name for the category.

Click OK.

How to Exclude Specific Categories Collapse Hide details

How to Exclude Specific Categories

Select a categorical axis. The Categories palette displays the categories on the axis.

Note: If the palette is not visible, make sure that you have it enabled.

In the Categories palette, select a category name in the Include list, and then click the X button. To move the category back, select its name in the Excluded list, and then click the arrow to the right of the list.

How to Collapse/Combine Small Categories Collapse Hide details

How to Collapse/Combine Small Categories

You can combine categories that are so small you don't need to display them separately. For example, if you have a pie chart with many categories, consider collapsing categories with a percentage less than 10. Collapsing is available only for statistics that are additive. For example, you can't add means together because means are not additive. Therefore, combining/collapsing categories using a mean is not available.

Select a categorical axis. The Categories palette displays the categories on the axis.

Note: If the palette is not visible, make sure that you have it enabled.

In the Categories palette, select Collapse and specify a percentage. Any categories whose percentage of the total is less than the specified number are combined into one category. The percentage is based on the statistic shown in the chart. Collapsing is available only for count-based and summation (sum) statistics.

Related Topics

Editing Visualizations
General Rules for Editing Visualizations


Changing the Orientation Panels

editing visualizations,editing visualizations,editing visualizations
transpose,transpose,transpose
panels,panels,panels
visualizations,visualizations,visualizations
transpose,transpose,transpose
panels,panels,panels

If you are using panels in your visualization, you can change their orientation.

How to Change the Orientation of the Panels Collapse Hide details

How to Change the Orientation of the Panels

Select any part of the visualization.

Click the Panels tab on the properties palette.

Panels tab

Select an option from Layout:

Table. Lays out panels like a table, in that there is a row or column assigned to every individual value.

Transposed. Lays out panels like a table, but also swaps the original rows and columns. This option is not the same as transposing the graph itself. Note that the x axis and the y axis are unchanged when you select this option.

List. Lays out panels like a list, in that each cell represents a combination of values. Columns and rows are no long assigned to individual values. This option allows the panels to wrap if needed.

Related Topics

Editing Visualizations
General Rules for Editing Visualizations


Transforming the Coordinate System

editing visualizations,editing visualizations,editing visualizations
transpose,transpose,transpose
transforming coordinate systems,transforming coordinate systems,transforming coordinate systems
adding 3-D effects,adding 3-D effects,adding 3-D effects
visualizations,visualizations,visualizations
transpose,transpose,transpose
transforming coordinate systems,transforming coordinate systems,transforming coordinate systems
coordinate systems,coordinate systems,coordinate systems
transforming,transforming,transforming
polar coordinates,polar coordinates,polar coordinates

Many visualizations are displayed in a flat, rectangular coordinate system. You can transform the coordinate system as needed. For example, you can apply a polar transformation to the coordinate system, add oblique drop shadow effects, and transpose the axes. You can also undo any of these transformations if they are already applied to the current visualization. For example, a pie chart is drawn in a polar coordinate system. If desired, you can undo the polar transformation and display the pie chart as a single stacked bar in a rectangular coordinate system.

How to Transform the Coordinate System Collapse Hide details

How to Transform the Coordinate System

Select the coordinate system that you want to transform. You select the coordinate system by selecting the frame around the individual graph.

Click the Coordinates tab on the properties palette.

Coordinates tab

Select the transformations that you want to apply to the coordinate system. You can also deselect a transformation to undo it.

Transposed. Changing the orientation of the axes is called transposing. It is similar to swapping the vertical and horizontal axes in a 2-D visualization.

Polar. A polar transformation draws the graphic elements at a specific angle and distance from the center of the graph. A pie chart is a 1-D visualization with a polar transformation that draws the individual bars a specific angles. A radar chart is a 2-D visualization with a polar transformation that draws graphic elements a specific angles and distances from the center of the graph. A 3-D visualization would also include an additional depth dimension.

Oblique. An oblique transformation adds a 3-D effect to the graphic elements. This transformation adds depth to the graphic elements, but the depth is purely decorative. It is not influenced by particular data values.

Same Ratio. Applying the same ratio specifies that the same distance on each scale represents the same difference in data values. For example, 2cm on both scales represent a difference of 1000.

Pre-transform inset %. If axes are clipped after the transformation, you may want to add insets to the graph before applying the transformation. The insets shrink the dimensions by a certain percentage before any transformations are applied to the coordinate system. You have control over the lower x, upper x, lower y, and upper y dimensions, in that order.

Post-transform inset %. If you want to change the aspect ratio of the a graph, you can add insets to the graph after applying the transformation. The insets shrink the dimensions by a certain percentage after any transformations are applied to the coordinate system. These insets can also be applied even if no transformation is applied to the graph. You have control over the lower x, upper x, lower y, and upper y dimensions, in that order.

Related Topics

Editing Visualizations
General Rules for Editing Visualizations


Changing Statistics and Graphic Elements

graphic elements,graphic elements,graphic elements
converting,converting,converting
changing,changing,changing
collision modifiers,collision modifiers,collision modifiers

You can convert a graphic element to another type, change the statistic used to draw the graphic element, or specify the collision modifier that determines what happens when graphic elements overlap.

How to Convert a Graphic Element Collapse Hide details

How to Convert a Graphic Element

Select the graphic element that you want to convert.

Click the Element tab on the properties palette.

Element tab

Select a new graphic element type from the Type list.

graphic elements,graphic elements,graphic elements
types,types,types
Graphic Element Type | Description
Point | A marker identifying a specific data point. A point element is used in scatterplots and other related visualizations.
Interval | A rectangular shape drawn at a specific data value and filling the space between an origin and another data value. An interval element is used in bar charts and histograms.
Line | A line that connects data values.
Path | A line that connects data values in the order they appear in the dataset.
Area | A line that connects data elements with the area between the line and an origin filled in.
Polygon | A multi-sided shape enclosing a data region. A polygon element could be used in a binned scatterplot or a map.
Schema | An element consisting of a box with whiskers and markers indicating outliers. A schema element is used for boxplots.
statistics,statistics,statistics
editing in visualizations,editing in visualizations,editing in visualizations
How to Change the Statistic Collapse Hide details

How to Change the Statistic

Select the graphic element whose statistic you want to change.

Click the Element tab on the properties palette.

Element tab

From the Summary drop-down list, select a new statistic. Note that selecting a statistic aggregates the data. If instead you want the visualization to display unaggregated data, select (no statistic) from the Summary list.

Summary Statistics Calculated from a Continuous Field/Variable

statistics,statistics,statistics
descriptions,descriptions,descriptions

• Mean. A measure of central tendency. The arithmetic average, the sum divided by the number of cases.

• Median. The value above and below which half of the cases fall, the 50th percentile. If there is an even number of cases, the median is the average of the two middle cases when they are sorted in ascending or descending order. The median is a measure of central tendency not sensitive to outlying values (unlike the mean, which can be affected by a few extremely high or low values).

• Mode. The most frequently occurring value. If several values share the greatest frequency of occurrence, each of them is a mode.

• Minimum. The smallest value of a numeric variable.

• Maximum. The largest value of a numeric variable.

• Range. The difference between the minimum and maximum values.

• Mid Range. The middle of the range, that is, the value whose difference from the minimum is equal to its difference from the maximum.

• Sum. The sum or total of the values, across all cases with nonmissing values.

• Cumulative Sum. The cumulative sum of the values. Each graphic element shows the sum for one subgroup plus the total sum of all previous groups.

• Percent Sum. The percentage within each subgroup based on a summed variable compared to the sum across all groups.

• Cumulative Percent Sum. The cumulative percentage within each subgroup based on a summed variable compared to the sum across all groups. Each graphic element shows the percentage for one subgroup plus the total percentage of all previous groups.

• Variance. A measure of dispersion around the mean, equal to the sum of squared deviations from the mean divided by one less than the number of cases. The variance is measured in units that are the square of those of the variable itself.

• Standard Deviation. A measure of dispersion around the mean. In a normal distribution, 68% of cases fall within one standard deviation of the mean and 95% of cases fall within two standard deviations. For example, if the mean age is 45, with a standard deviation of 10, 95% of the cases would be between 25 and 65 in a normal distribution.

• Standard Error. A measure of how much the value of a test statistic varies from sample to sample. It is the standard deviation of the sampling distribution for a statistic. For example, the standard error of the mean is the standard deviation of the sample means.

• Kurtosis. A measure of the extent to which observations cluster around a central point. For a normal distribution, the value of the kurtosis statistic is zero. Positive kurtosis indicates that, relative to a normal distribution, the observations are more clustered about the center of the distribution and have thinner tails until the extreme values of the distribution, at which point the tails of the leptokurtic distribution are thicker relative to a normal distribution. Negative kurtosis indicates that, relative to a normal distribution, the observations cluster less and have thicker tails until the extreme values of the distribution, at which point the tails of the platykurtic distribution are thinner relative to a normal distribution.

• Skewness. A measure of the asymmetry of a distribution. The normal distribution is symmetric and has a skewness value of 0. A distribution with a significant positive skewness has a long right tail. A distribution with a significant negative skewness has a long left tail. As a guideline, a skewness value more than twice its standard error is taken to indicate a departure from symmetry.

The following region statistics may result in more than one graphic element per subgroup. When using the interval, area, or edge graphic elements, a region statistic results in one graphic element showing the range. All other graphic elements result in two separate elements, one showing the start of the range and one showing the end of the range.

• Region: Range. The range of values between the minimum and maximum values.

• Region: 95% Confidence Interval of Mean. A range of values that has a 95% chance of including the population mean.

• Region: 95% Confidence Interval of Individual. A range of values that has a 95% chance of including the predicted value given the individual case.

• Region: 1 Standard Deviation above/below Mean. A range of values between 1 standard deviation above and below the mean.

• Region: 1 Standard Error above/below Mean. A range of values between 1 standard error above and below the mean.

Count-Based Summary Statistics

• Count. The number of rows/cases.

• Cumulative Count. The cumulative number of rows/cases. Each graphic element shows the count for one subgroup plus the total count of all previous groups.

• Percent of Count. The percentage of rows/cases in each subgroup compared to the total number of rows/cases.

• Cumulative Percent of Count. The cumulative percentage of rows/cases in each subgroup compared to the total number of rows/cases. Each graphic element shows the percentage for one subgroup plus the total percentage of all previous groups.

graphic elements,graphic elements,graphic elements
collision modifiers,collision modifiers,collision modifiers
How to Specify the Collision Modifier Collapse Hide details

How to Specify the Collision Modifier

The collision modifier determines what happens when graphic elements overlap.

Select the graphic element for which you want to specify the collision modifier.

Click the Element tab on the properties palette.

Element tab

From the Modifier drop-down list, select a collision modifier. -auto- lets the application determine which collision modifier is appropriate for the graphic element type and statisic.

Overlay. Draw graphic elements on top of each other when they have the same value.

stack,stack,stack

Stack. Stack graphic elements that would normally be superimposed when they have the same data values.

dodge,dodge,dodge
cluster,cluster,cluster

Dodge. Move graphic elements next to other graphic elements that appear at the same value, rather than superimposing them. The graphic elements are arranged symmetrically. That is, the graphic elements are moved to opposite sides of a central position. Dodging is very similar to clustering.

Pile. Move graphic elements next to other graphic elements that appear at the same value, rather than superimposing them. The graphic elements are arranged asymmetrically. That is, the graphic elements are piled on top of one another, with the graphic element on the bottom positioned at a specific value on the scale.

jitter,jitter,jitter

Jitter (normal). Randomly reposition graphic elements at the same data value using a normal distribution.

Jitter (uniform). Randomly reposition graphic elements at the same data value using a uninform distribution.

Related Topics

Editing Visualizations
General Rules for Editing Visualizations


Changing the Position of the Legend

editing visualizations,editing visualizations,editing visualizations
legend position,legend position,legend position
visualizations,visualizations,visualizations
legend position,legend position,legend position
legend,legend,legend
position,position,position

If a graph includes a legend, the legend is typically displayed to the right of a graph. You can change this position if needed.

How to Change the Legend Position Collapse Hide details

How to Change the Legend Position

Select the legend.

Click the Legend tab on the properties palette.

Legend tab

Select a position.

Related Topics

Editing Visualizations
General Rules for Editing Visualizations


Copying a Visualization and Visualization Data

visualizations,visualizations,visualizations
copying,copying,copying
copying visualizations,copying visualizations,copying visualizations

The General palette includes buttons for copying the visualization and its data.

Copying the visualization. This action copies the visualization to the clipboard as an image. Multiple image formats are available. When you paste the image into another application, you can choose a "paste special" option to select one of the available image formats for pasting.

Copying the visualization data. This action copies the underlying data that is used to draw the visualization. The data is copied to the clipboard as plain text or HTML-formatted text. When you paste the data into another application, you can choose a "paste special" option to choose one of these formats for pasting.

Related Topics

Editing Visualizations
General Rules for Editing Visualizations


Keyboard Shortcuts

Keyboard shortcuts
Shortcut Key | Function
Ctrl+Space | Toggle between Explore and Edit mode
Delete | Delete a visualization item
Ctrl+Z | Undo
Ctrl+Y | Redo
F2 | Display outline for selecting items in the graph

Related Topics

Editing Visualizations


Exploring Visualizations

graphs,graphs,graphs
exploring,exploring,exploring
exploring graphs,exploring graphs,exploring graphs

There are several interactive tools for exploring visualizations. Exploring is done through Explore mode. Explore mode allows you to:

• Animate visualizations.

• Rotate 3-D visualizations.

• View tooltips to determine exact data values.

Explore mode also acts as a preview mode because it hides the palettes and emphasizes the visualization itself.

How to Switch to Explore Mode

From the menus choose:

View
Explore Mode

Related Topics

Animating Visualizations
Rotating 3-D Visualizations
Viewing Tooltips


Animating Visualizations

animation,animation,animation
in visualizations,in visualizations,in visualizations

Some visualizations can be created with an animation variable. For information about creating visualizations with an animation variable, see Detailed Tab.

To actually animate the visualization, you must switch to Explore mode. (For more information about switching to Explore mode, see Exploring Visualizations.) After switching to explore mode, you will notice that the animation controllers displayed below a graph are now enabled. These controllers allow you to initiate the animation and specify the range of data or the groups displayed in each slice. By animating the visualization with these controls, you can explore the differences between groups and ranges of data.

Animation controls

Related Topics

Exploring Visualizations
Rotating 3-D Visualizations
Viewing Tooltips


Rotating 3-D Visualizations

3-D visualizations,3-D visualizations,3-D visualizations
rotating,rotating,rotating

To explore 3-D visualizations effectively, it is useful to rotate them. To rotate the visualization, you must switch to Explore mode. (For more information about switching to Explore mode, see Exploring Visualizations.) While in Explore mode, you can click and drag the visualization to rotate it in any direction. The 3-D orientation of the visualization is immediately updated.

Related Topics

Exploring Visualizations
Animating Visualizations
Viewing Tooltips


Viewing Tooltips

tooltips,tooltips,tooltips
displaying in visualizations,displaying in visualizations,displaying in visualizations

Tooltips provide an interactive way in which to display information about specific graphic elements. To display tooltips, you must switch to Explore mode. (For more information about switching to Explore mode, see Exploring Visualizations.) While in Explore mode, you position the mouse cursor over a graphic element. A tooltip displaying additional information about the graphic element is displayed.

Related Topics

Exploring Visualizations
Animating Visualizations
Rotating 3-D Visualizations


Variable Information

variable information,variable information,variable information
variables,variables,variables
definition information,definition information,definition information
variables,variables,variables

The Variables dialog box displays variable definition information for the currently selected variable, including:

• Variable label

• Data format

• User-missing values

• Value labels

• Measurement level

Visible. The Visible column in the variable list indicates if the variable is currently visible in the Data Editor and in dialog box variable lists. Visibility is controlled by variable sets.

Go To. Goes to the selected variable in the Data Editor window.

Paste. Pastes the selected variables into the designated syntax window at the cursor location.

To modify variable definitions, use the Variable view in the Data Editor.

To Obtain Variable Information Collapse Hide details

To Obtain Variable Information

From the menus choose:

Utilities
Variables...

Select the variable for which you want to display variable definition information.

Related Topics

Getting Information about Variables in Dialog Boxes


Data File Comments

data files,data files,data files
adding comments,adding comments,adding comments

You can include descriptive comments with a data file. For PASW Statistics data files, these comments are saved with the data file.

To Add, Modify, Delete, or Display Data File Comments

From the menus choose:

Utilities
Data File Comments...

To display the comments in the Viewer, select Display comments in output.

Comments can be any length but are limited to 80 bytes (typically 80 characters in single-byte languages) per line; lines will automatically wrap at 80 characters. Comments are displayed in the same font as text output to accurately reflect how they will appear when displayed in the Viewer. (See Viewer Options for information on changing the text output font.)

A date stamp (the current date in parentheses) is automatically appended to the end of the list of comments whenever you add or modify comments. This may lead to some ambiguity concerning the dates associated with comments if you modify an existing comment or insert a new comment between existing comments.

Related Topics

ADD DOCUMENT
DOCUMENT
DROP DOCUMENTS


Define Variable Sets

variable sets,variable sets,variable sets
defining,defining,defining
variables,variables,variables
defining variable sets,defining variable sets,defining variable sets
variables,variables,variables
variable sets,variable sets,variable sets
dialog boxes,dialog boxes,dialog boxes
defining variable sets,defining variable sets,defining variable sets
dialog boxes,dialog boxes,dialog boxes

Define Variable Sets creates subsets of variables to display in the Data Editor and in dialog box variable lists. Defined variable sets are saved with PASW Statistics data files.

Set Name. Set names can be up to 64 bytes. Any characters, including blanks, can be used.

Variables in Set. Any combination of numeric and string variables can be included in a set. The order of variables in the set has no effect on the display order of the variables in the Data Editor or in dialog box variable lists. A variable can belong to multiple sets.

To Define Variable Sets Collapse Hide details

To Define Variable Sets

From the menus choose:

Utilities
Define Variable Sets...

Select the variables that you want to include in the set.

Enter a name for the set (up to 64 bytes).

Click Add Set.

Related Topics

Dialog Boxes
Using Variable Sets to Show and Hide Variables


Using Variable Sets to Show and Hide Variables

variable sets,variable sets,variable sets
using,using,using
dialog boxes,dialog boxes,dialog boxes
using variable sets,using variable sets,using variable sets
dialog boxes,dialog boxes,dialog boxes
variable sets,variable sets,variable sets
hiding variables,hiding variables,hiding variables
dialog lists,dialog lists,dialog lists
Data Editor,Data Editor,Data Editor

Use Variable Sets restricts the variables displayed in the Data Editor and in dialog box variable lists to the variables in the selected (checked) sets.

• The set of variables displayed in the Data Editor and in dialog box variable lists is the union of all selected sets.

• A variable can be included in multiple selected sets.

• The order of variables in the selected sets and the order of selected sets have no effect on the display order of variables in the Data Editor or in dialog box variable lists.

• Although the defined variable sets are saved with PASW Statistics data files, the list of currently selected sets is reset to the default, built-in sets each time you open the data file.

The list of available variable sets includes any variable sets defined for the active dataset, plus two built-in sets:

• ALLVARIABLES. This set contains all variables in the data file, including new variables created during a session.

• NEWVARIABLES. This set contains only new variables created during the session.

Note: Even if you save the data file after creating new variables, the new variables are still included in the NEWVARIABLES set until you close and reopen the data file.

At least one variable set must be selected. If ALLVARIABLES is selected, any other selected sets will not have any visible effect, since this set contains all variables.

To define variable sets, use Define Variable Sets on the Utilities menu.

To Select Variable Sets to Display Collapse Hide details

To Select Variable Sets to Display

From the menus choose:

Utilities
Use Variable Sets...

Select the defined variable sets that contain the variables that you want to appear in the Data Editor and in dialog box variable lists.

To Display All Variables

From the menus choose:

Utilities
Show All Variables

Related Topics

Dialog Boxes
Define Variable Sets


Reordering Target Variable Lists

variable lists,variable lists,variable lists
reordering target lists,reordering target lists,reordering target lists
dialog boxes,dialog boxes,dialog boxes
reordering target lists,reordering target lists,reordering target lists
variable lists,variable lists,variable lists
target lists,target lists,target lists

Variables appear on dialog box target lists in the order in which they are selected from the source list. If you want to change the order of variables on a target list—but you don't want to deselect all of the variables and reselect them in the new order—you can move variables up and down on the target list using the Ctrl key (Macintosh: Command key) with the up and down arrow keys. You can move multiple variables simultaneously if they are contiguous (grouped together). You cannot move noncontiguous groups of variables.


Working with Extension Bundles

Extension bundles provide the ability to package custom components, such as custom dialogs and extension commands, so they can be easily installed by end users. For example, if you have created a custom dialog for an extension command and wish to share this with other users, then you'll want to create an extension bundle that contains the custom dialog package (.spd) file, and the files associated with the extension command (the XML file that specifies the syntax of the extension command and the implementation code file(s) written in Python or R). The extension bundle is then what you share with other users.

Show me

Related Topics

Creating Extension Bundles
Installing Extension Bundles
Viewing Installed Extension Bundles
Creating and Managing Custom Dialogs


Creating Extension Bundles

extension bundles,extension bundles,extension bundles
creating extension bundles,creating extension bundles,creating extension bundles

How to Create an Extension Bundle

From the menus choose:

Utilities
Extension Bundles
Create Extension Bundle...

Enter values for all fields on the Required tab.

Enter values for any fields on the Optional tab that are needed for your extension bundle.

Specify a target file for the extension bundle.

Click Save to save the extension bundle to the specified location. This closes the Create Extension Bundle dialog box.

Related Topics

Working with Extension Bundles
Installing Extension Bundles
Viewing Installed Extension Bundles
Required Fields for Extension Bundles
Optional Fields for Extension Bundles


Required Fields for Extension Bundles

Name. A unique name to associate with the extension bundle. It can consist of up to three words and is not case sensitive. Characters are restricted to seven-bit ASCII. To minimize the possibility of name conflicts, you may want to use a multi-word name, where the first word is an identifier for your organization, such as a URL.

Files. Click Add to add the files associated with the extension bundle. An extension bundle must at least include a custom dialog specification (.spd) file, or an XML specification file for an extension command. If an XML specification file is included then the bundle must include at least one python or R code file--specifically, a file of type .py, pyc, .pyo, or .R.

Summary. A short description of the extension bundle, intended to be displayed as a single line.

Description. A more detailed description of the extension bundle than that provided for the Summary field. For example, you might list the major features available with the extension bundle. If the extension bundle provides a wrapper for a function from an R package, then that should be mentioned here.

Author. The author of the extension bundle. You may wish to include an email address.

Version. A version identifier of the form x.x.x, where each component of the identifier must be an integer, as in 1.0.0. Zeros are implied if not provided. For example, a version identifier of 3.1 implies 3.1.0.

Minimum PASW Statistics Version. The minimum version of PASW Statistics required to run the extension bundle.

Related Topics

Creating Extension Bundles
Optional Fields for Extension Bundles


Optional Fields for Extension Bundles

Release Date. An optional release date. No formatting is provided.

Links. An optional set of URL’s to associate with the extension bundle--for example, the author's home page. The format of this field is arbitrary so be sure to delimit multiple URL's with spaces, commas, or some other reasonable delimiter.

Categories. An optional set of categories with which to associate the extension bundle when authoring an extension bundle for posting to Developer Central (http://www.spss.com/devcentral). Enter one or more of the values that appear in the Filter Downloads drop-down list on the Download Library page on Developer Central. For example, you might enter Extension Commands, Statistics, and R.

Required Plug-ins. Check the boxes for any Plug-ins (Python or R) that are required in order to run the custom components associated with the extension bundle. Users will be alerted at install time if they don't have the required Plug-ins.

Required R Packages. Enter the names of any R packages, from the CRAN package repository, that are required for the extension bundle. Names are case sensitive. To add the first package, click anywhere in the Required R Packages control to highlight the entry field. Pressing Enter, with the cursor in a given row, will create a new row. You delete a row by selecting it and pressing Delete. When the extension bundle is installed, PASW Statistics will check if the required R packages exist on the end user's machine and attempt to download and install any that are missing.

Required Python Modules. Enter the names of any Python modules, other than those added to the extension bundle, that are required for the extension bundle. Any such modules should be posted to Developer Central (http://www.spss.com/devcentral). To add the first module, click anywhere in the Required Python Modules control to highlight the entry field. Pressing Enter, with the cursor in a given row, will create a new row. You delete a row by selecting it and pressing Delete. The end user is responsible for downloading any required Python modules and copying them to the extensions directory under the PASW Statistics installation directory, or to an alternate location specified by their SPSS_EXTENSIONS_PATH environment variable.

Translation Catalogues Folder. You can include a folder containing translation catalogues created with the GNU gettext utilities (http://www.gnu.org/software/gettext/). This allows you to provide localized messages and localized output to end users of your extension bundle. For example, if you have stored translation catalogues for your extension bundle under the /myextbundle/po folder, then browse to that folder and select it. Translation catalogues are for use in localizing output from Python and R programs. For more information, see the topics on the R Integration Plug-in and the Python Integration Plug-in, in the Help system.

Related Topics

Creating Extension Bundles
Required Fields for Extension Bundles


Installing Extension Bundles

extension bundles,extension bundles,extension bundles
installing extension bundles,installing extension bundles,installing extension bundles

To install an extension bundle:

From the menus choose:

Utilities
Extension Bundles
Install Extension Bundle...

Select the desired extension bundle. Extension bundles have a file type of spe.

If the extension bundle contains a custom dialog, you will be alerted that you need to restart PASW Statistics to use the dialog. A restart is also required to use any extension commands included with the bundle. To view details for the currently installed extension bundles, choose Utilities>Extension Bundles>View Installed Extension Bundles.

You can also install extension bundles with a command line utility that allows you to install multiple bundles at once. See the topic Batch Installation of Extension Bundles for more information.

Related Topics

Working with Extension Bundles
Creating Extension Bundles
Viewing Installed Extension Bundles
Installation Locations for Extension Bundles
Required R Packages
Batch Installation of Extension Bundles


Installation Locations for Extension Bundles

For Windows and Linux, and by default, installing an extension bundle requires write permission to the PASW Statistics installation directory. If you do not have write permission to the required location or would like to store extension bundles elsewhere, you can specify one or more alternate locations by defining the SPSS_EXTENSIONS_PATH environment variable. When present, the paths specified in SPSS_EXTENSIONS_PATH take precedence over the default location. Extension bundles will be installed to the first writable location. For multiple locations, separate each with a semicolon on Windows and a colon on Linux. The specified locations must exist on the target machine. After setting SPSS_EXTENSIONS_PATH , you will need to restart PASW Statistics for the changes to take effect.

If the extension bundle contains a custom dialog and you don't have write permission to the PASW Statistics installation directory (for Windows and Linux) then you will also need to set the SPSS_CDIALOGS_PATH environment variable. The rules for SPSS_CDIALOGS_PATH are the same as for SPSS_EXTENSIONS_PATH. If you don't know whether the extension bundles you are installing contain a custom dialog, and you don't have write access to the default location, then it is best to specify an alternate location in SPSS_CDIALOGS_PATH.

To create the SPSS_EXTENSIONS_PATH or SPSS_CDIALOGS_PATH environment variable on Windows, from the Control Panel:

Windows XP

Select System.

Select the Advanced tab and click Environment Variables.

In the User variables section, click New, enter the name of the environment variable--for instance, SPSS_EXTENSIONS_PATH --in the Variable name field and the desired path(s) in the Variable value field.

Windows Vista or Windows 7

Select User Accounts.

Select Change my environment variables.

Click New, enter the name of the environment variable--for instance, SPSS_EXTENSIONS_PATH --in the Variable name field and the desired path(s) in the Variable value field.

To view the current locations for extension bundles (the same locations as for extension commands) and custom dialogs, run the following command syntax: SHOW EXTPATHS.

Related Topics

Installing Extension Bundles
Required R Packages
Batch Installation of Extension Bundles


Required R Packages

The extension bundle installer attempts to download and install any R packages that are required by the extension bundle and not found on your machine. If you do not have internet access, you will need to obtain the necessary packages from someone who does. Packages can be downloaded from http://www.r-project.org/ and then installed from within R. For details, see the R Installation and Administration guide, distributed with R. If installation of the packages fails, you will be alerted with the list of required packages. You can also view the list from the Extension Bundle Details dialog box, once the bundle is installed. See the topic Viewing Installed Extension Bundles for more information.

Note: For UNIX (including Linux) users, packages are downloaded in source form and then compiled. This requires that you have the appropriate tools installed on your machine. See the R Installation and Administration guide for details. In particular, Debian users should install the r-base-dev package from apt-get install r-base-dev.

Permissions

By default, required R packages are installed to the library folder under the location where R is installed--for example, C:\Program Files\R\R-2.8.1\library on Windows. If you do not have write permission to this location or would like to store R packages--installed for extension bundles--elsewhere, you can specify one or more alternate locations by defining the PASW_RPACKAGES_PATH environment variable. When present, the paths specified in PASW_RPACKAGES_PATH take precedence over the default location. R packages will be installed to the first writable location. For multiple locations, separate each with a semicolon on Windows and a colon on Linux and Mac. The specified locations must exist on the target machine. After setting PASW_RPACKAGES_PATH, you will need to restart PASW Statistics for the changes to take effect. For information on how to set an environment variable on Windows, see Installation Locations for Extension Bundles.

Related Topics

Installing Extension Bundles
Installation Locations for Extension Bundles
Batch Installation of Extension Bundles


Batch Installation of Extension Bundles

You can install multiple extension bundles at once using the batch utility installextbundles.bat (installextbundles.sh for Mac and UNIX systems) located in the PASW Statistics installation directory. For Windows and Mac the utility is located at the root of the installation directory. For Linux, the utility is located in the bin subdirectory of the installation directory. The utility is designed to run from a command prompt and must be run from its installed location. The form of the command line is:

installextbundles [–statssrv] [–download no|yes ] –source <folder> | <filename>...

-statssrv. Specifies that you are running the utility on a PASW Statistics Server. You should also install the same extension bundles on client machines that connect to the server.

-download no|yes. Specifies whether the utility has permission to access the internet in order to download any R packages required by the specified extension bundles. The default is no. If you keep the default or do not have internet access then you will need to manually install any required R packages. See the topic Required R Packages for more information.

–source <folder> | <filename>... Specifies the extension bundles to install. You can specify the path to a folder containing extension bundles or you can specify a list of filenames of extension bundles. If you specify a folder, all extension bundles (files of type .spe) found in the folder will be installed. Separate multiple filenames with one or more spaces. Enclose paths with double quotes if they contain spaces.

Related Topics

Installing Extension Bundles
Installation Locations for Extension Bundles
Required R Packages


Viewing Installed Extension Bundles

extension bundles,extension bundles,extension bundles
viewing installed extension bundles,viewing installed extension bundles,viewing installed extension bundles

To view details for the extension bundles installed on your machine:

From the menus choose:

Utilities
Extension Bundles
View Installed Extension Bundles...

Click on the highlighted text in the Summary column for the desired extension bundle.

The Extension Bundle Details dialog box displays the information provided by the author of the extension bundle. In addition to required information, such as Summary, Description, and Version, the author may have included URL's to locations of relevance, such as the author's home page. An extension bundle may or may not include a Readme file.

Components. The Components group lists the custom dialog, if any, and the names of any extension commands included in the extension bundle. Extension commands included with the bundle can be run from the syntax editor in the same manner as built-in PASW Statistics commands. Help for an extension command may be available by running CommandName /HELP in the syntax editor. Help for a custom dialog is available if the dialog contains a Help button.

Note: Installing an extension bundle that contains a custom dialog requires a restart of PASW Statistics in order to see the entry for the dialog in the Components group.

Dependencies. The Dependencies group lists add-ons that are required to run the components included in the extension bundle.

• Python and R Plug-ins. The components for an extension bundle may require the Python Plug-in and/or the R Plug-in, both of which are freely available. See the topic How to Get Integration Plug-ins for more information.

• R Packages. Lists any R packages required by the extension bundle. During installation of the extension bundle, the installer attempts to download and install the necessary packages on your machine. If this process fails, you will be alerted and will need to manually install the packages. See the topic Required R Packages for more information.

• Python Modules. Lists any Python modules required by the extension bundle. Any such modules should be available from Developer Central at http://www.spss.com/devcentral. The modules should be copied to the extensions directory under the PASW Statistics installation directory. For Mac, the installation directory refers to the Contents directory in the PASW Statistics application bundle. If you have specified alternate locations for extension bundles with the SPSS_EXTENSIONS_PATH environment variable then copy the Python modules to one of those locations. See the topic Installation Locations for Extension Bundles for more information. Alternatively, you can copy the modules to a location on the Python search path, such as the Python site-packages directory.

Related Topics

Working with Extension Bundles
Creating Extension Bundles
Installing Extension Bundles


General Options

options,options,options
general,general,general
options,options,options
measurement system,measurement system,measurement system
variables,variables,variables
display order in dialog boxes,display order in dialog boxes,display order in dialog boxes
dialog boxes,dialog boxes,dialog boxes
variable display order,variable display order,variable display order
dialog boxes,dialog boxes,dialog boxes
variables,variables,variables
memory,memory,memory
Production Facility,Production Facility,Production Facility
using command syntax from journal file,using command syntax from journal file,using command syntax from journal file
Production Facility,Production Facility,Production Facility
dialog boxes,dialog boxes,dialog boxes
displaying variable names,displaying variable names,displaying variable names
dialog boxes,dialog boxes,dialog boxes
displaying variable labels,displaying variable labels,displaying variable labels
variable names,variable names,variable names
in dialog boxes,in dialog boxes,in dialog boxes
variable labels,variable labels,variable labels
in dialog boxes,in dialog boxes,in dialog boxes
dialog boxes,dialog boxes,dialog boxes
variable labels,variable labels,variable labels
variable names,variable names,variable names
scientific notation,scientific notation,scientific notation
suppressing in output,suppressing in output,suppressing in output
scientific notation,scientific notation,scientific notation
output,output,output
changing output language,changing output language,changing output language
language,language,language
changing output language,changing output language,changing output language
data files,data files,data files
multiple open data files,multiple open data files,multiple open data files
Data Editor,Data Editor,Data Editor
multiple open data files,multiple open data files,multiple open data files
multiple open data files,multiple open data files,multiple open data files
language,language,language
changing output language,changing output language,changing output language
changing user interface language,changing user interface language,changing user interface language

Variable Lists

These settings control the display of variables in dialog box lists. You can display variable names or variable labels. Names or labels can be displayed in alphabetical or file order or grouped by measurement level. (For more information on measurement level, see Variable Measurement Level.) Display order affects only source variable lists. Target variable lists always reflect the order in which variables were selected.

Roles

Some dialogs support the ability to pre-select variables for analysis based on defined roles. See the topic Roles for more information.

• Use predefined roles. By default, pre-select variables based on defined roles.

• Use custom assignments. By default, do not use roles to pre-select variables.

You can also switch between predefined roles and custom assignment within the dialogs that support this functionality. The setting here controls only the initial default behavior in effect for each dataset.

Windows

Look and feel. Controls the basic appearance of windows and dialog boxes. If you notice any display issues after changing the look and feel, try shutting down and restarting the application.

Open syntax window at startup. Syntax windows are text file windows used to enter, edit, and run commands. If you frequently work with command syntax, select this option to automatically open a syntax window at the beginning of each session. This is useful primarily for experienced users who prefer to work with command syntax instead of dialog boxes.

Open only one dataset at a time. Closes the currently open data source each time you open a different data source using the menus and dialog boxes. By default, every time you use the menus and dialog boxes to open a new data source, that data source opens in a new Data Editor window, and any other data sources open in other Data Editor windows remain open and available during the session until explicitly closed.

When you select this option, it takes effect immediately but does not close any datasets that were open at the time the setting was changed. This setting has no effect on data sources opened using command syntax, which relies on DATASET commands to control multiple datasets.See the topic Working with Multiple Data Sources for more information.

Character Encoding for Data Files and Syntax Files

This controls the default behavior for determining the encoding for reading and writing data files and syntax files. You can change this setting only when there are no open data sources, and the setting remains in effect for subsequent sessions until explicitly changed.

• Locale's writing system. Use the current locale setting to determine the encoding for reading and writing files. This is referred to as code page mode. For information on the current locale setting, see LOCALE Subcommand (SET command).

• Unicode (universal character set). Use Unicode encoding (UTF-8) for reading and writing files. This is referred to as Unicode mode.

There are a number of important implications regarding Unicode mode and Unicode files:

• PASW Statistics data files and syntax files saved in Unicode encoding should not be used in releases of PASW Statistics prior to 16.0. For syntax files, you can specify the encoding when you save the file. For data files, you should open the data file in code page mode and then resave it if you want to read the file with earlier versions.

• When code page data files are read in Unicode mode, the defined width of all string variables is tripled. To automatically set the width of each string variable to the longest observed value for that variable, select Minimize string widths based on observed values in the Open Data dialog box.

Output

No scientific notation for small numbers in tables. Suppresses the display of scientific notation for small decimal values in output. Very small decimal values will be displayed as 0 (or 0.000).

Measurement System. The measurement system used (points, inches, or centimeters) for specifying attributes such as pivot table cell margins, cell widths, and space between tables for printing.

Language. Controls the language used in the output. Does not apply to simple text output. The list of available languages depends on the currently installed language files. (Note: This does not affect the user interface language.) Depending on the language, you may also need to use Unicode character encoding for characters to render to properly.

Note: Custom scripts that rely on language-specific text strings in the output may not run correctly when you change the output language. See the topic Script Options for more information.

Notification. Controls the manner in which the program notifies you that it has finished running a procedure and that the results are available in the Viewer.

User Interface

This controls the language used in menus, dialogs, and other user interface features. (Note: This does not affect the output language.)

Related Topics

Setting General Options
Viewer Options
Data Options
Currency Options
Output Label Options
Chart Options
Pivot Table Options
File Locations Options
Script Options
Syntax Editor Options
Multiple Imputations Options
Variable Names and Variable Labels in Dialog Box Lists
Working with Command Syntax
Multiple Execute Commands
SET


Setting General Options

From the menus choose:

Edit
Options...

Click the General tab.

Select the settings that you want.

Click OK or Apply.


Viewer Options

options,options,options
Viewer,Viewer,Viewer
Viewer,Viewer,Viewer
display options,display options,display options
options,options,options
Viewer,Viewer,Viewer
alignment,alignment,alignment
output,output,output
output,output,output
alignment,alignment,alignment
justification,justification,justification
output,output,output
output,output,output
centering,centering,centering
centering output,centering output,centering output
alignment,alignment,alignment
justification,justification,justification
output,output,output

Viewer output display options affect only new output produced after you change the settings. Output already displayed in the Viewer is not affected by changes in these settings.

Initial Output State. Controls which items are automatically displayed or hidden each time you run a procedure and how items are initially aligned. You can control the display of the following items: log, warnings, notes, titles, pivot tables, charts, tree diagrams, and text output. You can also turn the display of commands in the log on or off. You can copy command syntax from the log and save it in a syntax file.

Note: All output items are displayed left-aligned in the Viewer. Only the alignment of printed output is affected by the justification settings. Centered and right-aligned items are identified by a small symbol above and to the left of the item.

Title. Controls the font style, size, and color for new output titles.

Page Title. Controls the font style, size, and color for new page titles and page titles generated by TITLE and SUBTITLE command syntax or created by New Page Title on the Insert menu.

Text Output Font used for text output. Text output is designed for use with a monospaced (fixed-pitch) font. If you select a proportional font, tabular output will not align properly.

Related Topics

Setting Viewer Options
General Options
Data Options
Currency Options
Output Label Options
Chart Options
Pivot Table Options
File Locations Options
Script Options
Syntax Editor Options
Multiple Imputations Options
Working with Command Syntax
Copying Syntax from the Output Log


Setting Viewer Options

From the menus choose:

Edit
Options...

Click the Viewer tab.

Select the settings that you want.

Click OK or Apply.

Viewer output display options affect only new output produced after you change the settings. Output already displayed in the Viewer is not affected by changes in these settings.


Controlling the Initial Display State for New Output

hiding,hiding,hiding
controlling new output display,controlling new output display,controlling new output display
hiding,hiding,hiding

From the menus choose:

Edit
Options…

Click the Viewer tab in the Options dialog box.

In the Initial Output State group, select the icon for the type of item (for example, pivot table, title, notes, log) that you want to show or hide whenever new output is generated.

Select Shown or Hidden to specify the initial output state for that item.

Related Topics

Showing and Hiding Results
To Hide Tables and Charts
To Hide Procedure Results


Changing the Initial Alignment of New Results

alignment,alignment,alignment
default output alignment,default output alignment,default output alignment
default output alignment,default output alignment,default output alignment
changing,changing,changing
alignment,alignment,alignment
default output alignment,default output alignment,default output alignment

From the menus choose:

Edit
Options…

Click the Viewer tab and select the alignment (justification) in the Initial Output State group.


Data Options

options,options,options
data,data,data
data transformations,data transformations,data transformations
delaying execution,delaying execution,delaying execution
data transformations,data transformations,data transformations
options,options,options
options,options,options
two-digit years,two-digit years,two-digit years
date formats,date formats,date formats
two-digit years,two-digit years,two-digit years
years,years,years
two-digit values,two-digit values,two-digit values
options,options,options
date format variables,date format variables,date format variables
years,years,years
spelling,spelling,spelling
dictionary,dictionary,dictionary

Transformation and Merge Options. Each time the program executes a command, it reads the data file. Some data transformations (such as Compute and Recode) and file transformations (such as Add Variables and Add Cases) do not require a separate pass of the data, and execution of these commands can be delayed until the program reads the data to execute another command, such as a statistical or charting procedure.

• For large data files, where reading the data can take some time, you may want to select Calculate values before used to delay execution and save processing time. When this option is selected, the results of transformations you make using dialog boxes such as Compute Variable will not appear immediately in the Data Editor; new variables created by transformations will be displayed without any data values; and data values in the Data Editor cannot be changed while there are pending transformations. Any command that reads the data, such as a statistical or charting procedure, will execute the pending transformations and update the data displayed in the Data Editor. Alternatively, you can use Run Pending Transforms on the Transform menu.

• With the default setting of Calculate values immediately, when you paste command syntax from dialogs, an EXECUTE command is pasted after each transformation command. See the topic Multiple Execute Commands for more information.

Display Format for New Numeric Variables. Controls the default display width and number of decimal places for new numeric variables. There is no default display format for new string variables. If a value is too large for the specified display format, first decimal places are rounded and then values are converted to scientific notation. Display formats do not affect internal data values. For example, the value 123456.78 may be rounded to 123457 for display, but the original unrounded value is used in any calculations.

Set Century Range for 2-Digit Years. Defines the range of years for date-format variables entered and/or displayed with a two-digit year (for example, 10/28/86, 29-OCT-87). The automatic range setting is based on the current year, beginning 69 years prior to and ending 30 years after the current year (adding the current year makes a total range of 100 years). For a custom range, the ending year is automatically determined based on the value that you enter for the beginning year.

Random Number Generator. Two different random number generators are available:

• Version 12 Compatible. The random number generator used in version 12 and previous releases. If you need to reproduce randomized results generated in previous releases based on a specified seed value, use this random number generator.

• Mersenne Twister. A newer random number generator that is more reliable for simulation purposes. If reproducing randomized results from version 12 or earlier is not an issue, use this random number generator.

Reading External Data. For data read from external file formats and older PASW Statistics data files (prior to release 8.0), you can specify the minimum number of data values for a numeric variable used to classify the variable as scale or nominal. Variables with fewer than the specified number of unique values are classified as nominal.

Rounding and Truncation of Numeric Values. For the RND and TRUNC functions, this setting controls the default threshold for rounding up values that are very close to a rounding boundary. The setting is specified as a number of bits and is set to 6 at install time, which should be sufficient for most applications. Setting the number of bits to 0 produces the same results as in release 10. Setting the number of bits to 10 produces the same results as in releases 11 and 12.

• For the RND function, this setting specifies the number of least-significant bits by which the value to be rounded may fall short of the threshold for rounding up but still be rounded up. For example, when rounding a value between 1.0 and 2.0 to the nearest integer this setting specifies how much the value can fall short of 1.5 (the threshold for rounding up to 2.0) and still be rounded up to 2.0.

• For the TRUNC function, this setting specifies the number of least-significant bits by which the value to be truncated may fall short of the nearest rounding boundary and be rounded up before truncating. For example, when truncating a value between 1.0 and 2.0 to the nearest integer this setting specifies how much the value can fall short of 2.0 and be rounded up to 2.0.

Customize Variable View. Controls the default display and order of attributes in Variable View. See the topic Changing the Default Variable View for more information.

Change Dictionary. Controls the language version of the dictionary used for checking the spelling of items in Variable View. See the topic Spell Checking for more information.

Related Topics

Setting Data Options
General Options
Viewer Options
Currency Options
Output Label Options
Chart Options
Pivot Table Options
File Locations Options
Script Options
Syntax Editor Options
Multiple Imputations Options
Input versus Display Formats


Setting Data Options

From the menus choose:

Edit
Options...

Click the Data tab.

Select the settings that you want.

Click OK or Apply.


Changing the Default Variable View

options,options,options
Variable View,Variable View,Variable View
Variable View,Variable View,Variable View
customizing,customizing,customizing

You can use Customize Variable View to control which attributes are displayed by default in Variable View (for example, name, type, label) and the order in which they are displayed.

From the menus, choose:

Edit
Options

Click the Data tab.

Click Customize Variable View.

Select (check) the variable attributes you want to display.

Use the up and down arrow buttons to change the display order of the attributes.


Change Dictionary

This dialog controls the language version of the dictionary used for checking the spelling of items in Variable View.


Currency Options

options,options,options
currency,currency,currency
data types,data types,data types
custom currency,custom currency,custom currency
custom currency formats,custom currency formats,custom currency formats
currency formats,currency formats,currency formats
options,options,options
data types,data types,data types

You can create up to five custom currency display formats that can include special prefix and suffix characters and special treatment for negative values.

The five custom currency format names are CCA, CCB, CCC, CCD, and CCE. You cannot change the format names or add new ones. To modify a custom currency format, select the format name from the source list and make the changes that you want.

Prefixes, suffixes, and decimal indicators defined for custom currency formats are for display purposes only. You cannot enter values in the Data Editor using custom currency characters.

Related Topics

To Create Custom Currency Formats
General Options
Viewer Options
Data Options
Output Label Options
Chart Options
Pivot Table Options
File Locations Options
Script Options
Syntax Editor Options
Multiple Imputations Options


To Create Custom Currency Formats

From the menus choose:

Edit
Options...

Click the Currency tab.

Select one of the currency formats from the list (CCA, CCB, CCC, CCD, and CCE).

Enter the prefix, suffix, and decimal indicator values.

Click OK or Apply.

Related Topics

Variable Type


Output Label Options

variable labels,variable labels,variable labels
in outline pane,in outline pane,in outline pane
variable labels,variable labels,variable labels
in pivot tables,in pivot tables,in pivot tables
value labels,value labels,value labels
in outline pane,in outline pane,in outline pane
value labels,value labels,value labels
in pivot tables,in pivot tables,in pivot tables
options,options,options
output labels,output labels,output labels
options,options,options
variable labels,variable labels,variable labels
value labels,value labels,value labels
Viewer,Viewer,Viewer
displaying value labels,displaying value labels,displaying value labels
Viewer,Viewer,Viewer
displaying variable labels,displaying variable labels,displaying variable labels
Viewer,Viewer,Viewer
displaying variable names,displaying variable names,displaying variable names
Viewer,Viewer,Viewer
displaying data values,displaying data values,displaying data values
Viewer,Viewer,Viewer

Output label options control the display of variable and data value information in the outline and pivot tables. You can display variable names, defined variable labels and actual data values, defined value labels, or a combination.

Descriptive variable and value labels (Variable view in the Data Editor, Label and Values columns) often make it easier to interpret your results. However, long labels can be awkward in some tables.

Output label options affect only new output produced after you change the settings. Output already displayed in the Viewer is not affected by changes in these settings. These settings affect only pivot table output. Text output is not affected by these settings.

Related Topics

Setting Output Label Options
General Options
Viewer Options
Data Options
Currency Options
Chart Options
Pivot Table Options
File Locations Options
Script Options
Syntax Editor Options
Multiple Imputations Options


Setting Output Label Options

From the menus choose:

Edit
Options...

Click the Output Labels tab.

Select the settings that you want.

Click OK or Apply.

Viewer output display options affect only new output produced after you change the settings. Output already displayed in the Viewer is not affected by changes in these settings.

Show me


Chart Options

options,options,options
charts,charts,charts
chart options,chart options,chart options
charts,charts,charts
aspect ratio,aspect ratio,aspect ratio
aspect ratio,aspect ratio,aspect ratio
charts,charts,charts
templates,templates,templates
templates,templates,templates
in charts,in charts,in charts
templates,templates,templates
charts,charts,charts
options,options,options

Chart Template. New charts can use either the settings selected here or the settings from a chart template file. Click Browse to select a chart template file. To create a chart template file, create a chart with the attributes that you want and save it as a template (choose Save Chart Template from the File menu).

Chart Aspect Ratio. The width-to-height ratio of the outer frame of new charts. You can specify a width-to-height ratio from 0.1 to 10.0. Values less than 1 make charts that are taller than they are wide. Values greater than 1 make charts that are wider than they are tall. A value of 1 produces a square chart. Once a chart is created, its aspect ratio cannot be changed.

Current Settings. Available settings include:

• Font. Font used for all text in new charts.

• Style Cycle Preference. The initial assignment of colors and patterns for new charts. Cycle through colors only uses only colors to differentiate chart elements and does not use patterns. Cycle through patterns only uses only line styles, marker symbols, or fill patterns to differentiate chart elements and does not use color.

• Frame. Controls the display of inner and outer frames on new charts.

• Grid Lines. Controls the display of scale and category axis grid lines on new charts.

Style Cycles. Customizes the colors, line styles, marker symbols, and fill patterns for new charts. You can change the order of the colors and patterns that are used when a new chart is created.

Related Topics

Setting Chart Options
General Options
Viewer Options
Data Options
Currency Options
Output Label Options
Pivot Table Options
File Locations Options
Script Options
Syntax Editor Options
Multiple Imputations Options
Data Element Colors
Data Element Lines
Data Element Markers
Data Element Fills


Setting Chart Options

From the menus choose:

Edit
Options...

Click the Charts tab.

Select the settings that you want.

Click OK or Apply.


Data Element Colors

Specify the order in which colors should be used for the data elements (such as bars and markers) in your new chart. Colors are used whenever you select a choice that includes color in the Style Cycle Preference group in the main Chart Options dialog box.

For example, if you create a clustered bar chart with two groups and you select Cycle through colors, then patterns in the main Chart Options dialog box, the first two colors in the Grouped Charts list are used as the bar colors on the new chart.

To Change the Order in Which Colors Are Used

Select Simple Charts and then select a color that is used for charts without categories.

Select Grouped Charts to change the color cycle for charts with categories. To change a category's color, select a category and then select a color for that category from the palette.

Optionally, you can:

• Insert a new category above the selected category.

• Move a selected category.

• Remove a selected category.

• Reset the sequence to the default sequence.

• Edit a color by selecting its well and then clicking Edit.

Related Topics

Chart Options
Data Element Lines
Data Element Markers
Data Element Fills


Data Element Lines

Specify the order in which styles should be used for the line data elements in your new chart. Line styles are used whenever your chart includes line data elements and you select a choice that includes patterns in the Style Cycle Preference group in the main Chart Options dialog box.

For example, if you create a line chart with two groups and you select Cycle through patterns only in the main Chart Options dialog box, the first two styles in the Grouped Charts list are used as the line patterns on the new chart.

To Change the Order in Which Line Styles Are Used

Select Simple Charts and then select a line style that is used for line charts without categories.

Select Grouped Charts to change the pattern cycle for line charts with categories. To change a category's line style, select a category and then select a line style for that category from the palette.

Optionally, you can:

• Insert a new category above the selected category.

• Move a selected category.

• Remove a selected category.

• Reset the sequence to the default sequence.

Related Topics

Chart Options
Data Element Colors
Data Element Markers
Data Element Fills


Data Element Markers

Specify the order in which symbols should be used for the marker data elements in your new chart. Marker styles are used whenever your chart includes marker data elements and you select a choice that includes patterns in the Style Cycle Preference group in the main Chart Options dialog box.

For example, if you create a scatterplot chart with two groups and you select Cycle through patterns only in the main Chart Options dialog box, the first two symbols in the Grouped Charts list are used as the markers on the new chart.

To Change the Order in Which Marker Styles Are Used

Select Simple Charts and then select a marker symbol that is used for charts without categories.

Select Grouped Charts to change the pattern cycle for charts with categories. To change a category's marker symbol, select a category and then select a symbol for that category from the palette.

Optionally, you can:

• Insert a new category above the selected category.

• Move a selected category.

• Remove a selected category.

• Reset the sequence to the default sequence.

Related Topics

Chart Options
Data Element Colors
Data Element Lines
Data Element Fills


Data Element Fills

Specify the order in which fill styles should be used for the bar and area data elements in your new chart. Fill styles are used whenever your chart includes bar or area data elements, and you select a choice that includes patterns in the Style Cycle Preference group in the main Chart Options dialog box.

For example, if you create a clustered bar chart with two groups and you select Cycle through patterns only in the main Chart Options dialog box, the first two styles in the Grouped Charts list are used as the bar fill patterns on the new chart.

To Change the Order in Which Fill Styles Are Used

Select Simple Charts and then select a fill pattern that is used for charts without categories.

Select Grouped Charts to change the pattern cycle for charts with categories. To change a category's fill pattern, select a category and then select a fill pattern for that category from the palette.

Optionally, you can:

• Insert a new category above the selected category.

• Move a selected category.

• Remove a selected category.

• Reset the sequence to the default sequence.

Related Topics

Chart Options
Data Element Colors
Data Element Lines
Data Element Markers


Pivot Table Options

pivot tables,pivot tables,pivot tables
default look for new tables,default look for new tables,default look for new tables
options,options,options
pivot table look,pivot table look,pivot table look
pivot tables,pivot tables,pivot tables
options,options,options
pivot tables,pivot tables,pivot tables
default column width adjustment,default column width adjustment,default column width adjustment
column width,column width,column width
controlling default width,controlling default width,controlling default width
column width,column width,column width

Pivot Table options set the default TableLook used for new pivot table output. TableLooks can control a variety of pivot table attributes, including the display and width of grid lines; font style, size, and color; and background colors.

TableLook. Select a TableLook from the list of files and click OK or Apply. You can use one of the TableLooks provided with PASW Statistics, or you can create your own in the Pivot Table Editor (choose TableLooks from the Format menu).

• Browse. Allows you to select a TableLook from another directory.

• Set TableLook Directory. Allows you to change the default TableLook directory. Use Browse to navigate to the directory you want to use, select a TableLook in that directory, and then select Set TableLook Directory.

Note: TableLooks created in earlier versions of PASW Statistics cannot be used in version 16.0 or later.

Column Widths. Controls the automatic adjustment of column widths in pivot tables.

• Adjust for labels and data except for extremely large tables. For tables that don't exceed 10,000 cells, adjusts column width to whichever is larger—the column label or the largest data value. For tables with more than 10,000 cells, adjusts column width to the width of the column label.

• Adjust for labels only. Adjusts column width to the width of the column label. This produces more compact tables, but data values wider than the label may be truncated.

• Adjust for labels and data. Adjusts column width to whichever is larger: the column label or the largest data value. This produces wider tables, but it ensures that all values will be displayed.

Display Blocks of Rows. These settings control the display of large pivot tables in the Viewer. These settings have no effect on printing large pivot tables or exporting output to external formats.

• Display the table as blocks of rows. Tables are displayed in the Viewer in sections, and navigation controls allow you to view different sections of the table.

• Rows to display. Sets the number of rows to display in each section. The value must be an integer between 10 and 1000.

• Maximum cells. Sets the maximum number of cells to display in each section. The value must an integer between 1000 and 100000.

• Widow/orphan tolerance. Controls the maximum number of rows of the inner most row dimension of the table to split across displayed views of the table. For example, if there are six categories in each group of the inner most row dimension, specifying a value of six would prevent any group from splitting across displayed views. The value must be an integer and cannot be greater than the Rows to display value.

Several factors can affect the actual number of rows displayed, including:

• If the Maximum cells value is reached before the Rows to display value, then the table is split at that point. For example, if Rows to display is 1000 and Maximum cells is 10000, a table with 20 columns will be displayed in blocks of 500 rows.

• The Widow/orphan tolerance setting can cause fewer or more rows to be displayed than the value specified for Rows to display.

Default Editing Mode. Controls activation of pivot tables in the Viewer window or in a separate window. By default, double-clicking a pivot table activates all but very large tables in the Viewer window. You can choose to activate pivot tables in a separate window or select a size setting that will open smaller pivot tables in the Viewer window and larger pivot tables in a separate window.

Copying wide tables to the clipboard in rich text format. When pivot tables are pasted in Word/RTF format, tables that are too wide for the document width will either be wrapped, scaled down to fit the document width, or left unchanged.

Related Topics

Setting the TableLook for New Pivot Tables
Controlling Column Width for New Pivot Tables
General Options
Viewer Options
Data Options
Currency Options
Output Label Options
Chart Options
File Locations Options
Script Options
Syntax Editor Options
Multiple Imputations Options


Setting the TableLook for New Pivot Tables

From the menus choose:

Edit
Options...

Click the Pivot Tables tab.

Select the TableLook that you want.

Click OK or Apply.

Show me

Note: TableLooks created in earlier versions of PASW Statistics cannot be used in version 16.0 or later.

Related Topics

Pivot Table Options
Controlling Column Width for New Pivot Tables


Controlling Column Width for New Pivot Tables

column width,column width,column width
in new pivot tables,in new pivot tables,in new pivot tables
pivot tables,pivot tables,pivot tables
controlling default column width,controlling default column width,controlling default column width
column width,column width,column width
pivot tables,pivot tables,pivot tables

From the menus choose:

Edit
Options...

Click the Pivot Tables tab.

Select the option you want for Column Widths.

Click OK or Apply.

• Adjust for labels and data except for extremely large tables. For tables that don't exceed 10,000 cells, adjusts column width to whichever is larger—the column label or the largest data value. For tables with more than 10,000 cells, adjusts column width to the width of the column label.

• Adjust for labels only. Adjusts column width to the width of the column label. This produces more compact tables, but data values wider than the label may be truncated.

• Adjust for labels and data. Adjusts column width to whichever is larger: the column label or the largest data value. This produces wider tables, but it ensures that all values will be displayed.

Related Topics

Pivot Table Options
Setting the TableLook for New Pivot Tables


Creating a Custom Default TableLook

TableLooks,TableLooks,TableLooks
custom default look,custom default look,custom default look
TableLooks,TableLooks,TableLooks

Activate a pivot table (double-click anywhere in the table).

From the menus choose:

Format
TableLooks…

Select a TableLook from the list and click Edit Look.

Adjust the table properties for the attributes that you want.

Click Save Look or Save As to save the TableLook and click OK.

Deselect the pivot table.

From the menus choose:

Edit
Options…

Click the Pivot Tables tab.

Select the TableLook from the list and click OK.

Note: TableLooks created in earlier versions of PASW Statistics cannot be used in version 16.0 or later.


File Locations Options

options,options,options
temporary directory,temporary directory,temporary directory
temporary directory,temporary directory,temporary directory
setting location in local mode,setting location in local mode,setting location in local mode
options,options,options
temporary directory,temporary directory,temporary directory
temporary directory,temporary directory,temporary directory
SPSSTMPDIR environment variable,SPSSTMPDIR environment variable,SPSSTMPDIR environment variable
SPSSTMPDIR environment variable,SPSSTMPDIR environment variable,SPSSTMPDIR environment variable
environment variables,environment variables,environment variables
SPSSTMPDIR,SPSSTMPDIR,SPSSTMPDIR
environment variables,environment variables,environment variables
temporary directory,temporary directory,temporary directory
journal file,journal file,journal file
session journal,session journal,session journal
default file locations,default file locations,default file locations
file locations,file locations,file locations
controlling default file locations,controlling default file locations,controlling default file locations
opening files,opening files,opening files
controlling default file locations,controlling default file locations,controlling default file locations
saving files,saving files,saving files
controlling default file locations,controlling default file locations,controlling default file locations

Options on the File Locations tab control the default location that the application will use for opening and saving files at the start of each session, the location of the journal file, the location of the temporary folder, and the number of files that appear in the recently used file list.

Startup Folders for Open and Save Dialog Boxes

• Specified folder. The specified folder is used as the default location at the start of each session. You can specify different default locations for data and other (non-data) files.

• Last folder used. The last folder used to either open or save files in the previous session is used as the default at the start of the next session. This applies to both data and other (non-data) files.

These settings apply only to dialog boxes for opening and saving files—and the "last folder used" is determined by the last dialog box used to open or save a file. Files opened or saved via command syntax have no effect on—and are not affected by—these settings. These settings are only available in local analysis mode. In distributed analysis mode connected to a remote server (requires PASW Statistics Server), you cannot control the startup folder locations.

Session Journal

You can use the session journal to automatically record commands run in a session. This includes commands entered and run in syntax windows and commands generated by dialog box choices. You can edit the journal file and use the commands again in other sessions. You can turn journaling off and on, append or overwrite the journal file, and select the journal filename and location. You can copy command syntax from the journal file and save it in a syntax file.

Temporary Folder

This specifies the location of temporary files created during a session. In distributed mode (available with the server version), this does not affect the location of temporary data files. In distributed mode, the location of temporary data files is controlled by the environment variable SPSSTMPDIR, which can be set only on the computer running the server version of the software. If you need to change the location of the temporary directory, contact your system administrator.

Recently Used File List

This controls the number of recently used files that appear on the File menu.

To Change File Locations Options Collapse Hide details

To Change File Locations Options

From the menus, choose:

Edit
Options

Click the File Locations tab.

Related Topics

General Options
Viewer Options
Data Options
Currency Options
Output Label Options
Chart Options
Pivot Table Options
Script Options
Syntax Editor Options
Multiple Imputations Options


Script Options

options,options,options
scripts,scripts,scripts
options,options,options
scripts,scripts,scripts
default language,default language,default language
autoscripts,autoscripts,autoscripts

Use the Scripts tab to specify the default script language and any autoscripts you want to use. You can use scripts to automate many functions, including customizing pivot tables.

Note: Legacy Sax Basic users must manually convert any custom autoscripts. The autoscripts installed with pre-16.0 versions are available as a set of separate script files located in the Samples subdirectory of the directory where PASW Statistics is installed. By default, no output items are associated with autoscripts. You must manually associate all autoscripts with the desired output items, as described below. For information on converting legacy autoscripts, see Compatibility with Versions Prior to 16.0.

Default script language. The default script language determines the script editor that is launched when new scripts are created. It also specifies the default language whose executable will be used to run autoscripts. The available scripting languages depend on your platform. For Windows, the available scripting languages are Basic, which is installed with the Core system, and the Python programming language. For all other platforms, scripting is available with the Python programming language.

To enable scripting with the Python programming language, you must have Python and the PASW Statistics-Python Integration Plug-in installed. See the topic How to Get Integration Plug-ins for more information.

Enable Autoscripting. This check box allows you to enable or disable autoscripting. By default, autoscripting is enabled.

Base Autoscript. An optional script that is applied to all new Viewer objects before any other autoscripts are applied. Specify the script file to be used as the base autoscript as well as the language whose executable will be used to run the script.

To Apply Autoscripts to Output Items

In the Command Identifiers grid, select a command that generates output items to which autoscripts will be applied.

The Objects column, in the Objects and Scripts grid, displays a list of the objects associated with the selected command. The Script column displays any existing script for the selected command.

Specify a script for any of the items shown in the Objects column. Click on the corresponding Script cell. Enter the path to the script or click the ellipsis (...) button to browse for the script.

Specify the language whose executable will be used to run the script. Note: The selected language is not affected by changing the default script language.

Click Apply or OK.

To Remove Autoscript Associations

In the Objects and Scripts grid, click on the cell in the Script column corresponding to the script to dissociate.

Delete the path to the script and then click on any other cell in the Objects and Scripts grid.

Click Apply or OK.

To Set Script Options Collapse Hide details

To Set Script Options

From the menus, choose:

Edit
Options

Click the Scripts tab.

Select the desired settings.

Click Apply or OK.

Related Topics

General Options
Viewer Options
Data Options
Currency Options
Output Label Options
Chart Options
Pivot Table Options
File Locations Options
Syntax Editor Options
Multiple Imputations Options
Autoscripts


Syntax Editor Options

options,options,options
syntax editor,syntax editor,syntax editor
options,options,options
syntax editor,syntax editor,syntax editor
options,options,options
command syntax editor,command syntax editor,command syntax editor
options,options,options

Syntax Color Coding

You can turn color coding of commands, subcommands, keywords, keyword values, and comments off or on and you can specify the font style and color for each.

Error Color Coding

You can turn color coding of certain syntactical errors off or on and you can specify the font style and color used. Both the command name and the text (within the command) containing the error are color coded, and you can choose different styles for each. See the topic Color Coding for more information.

Auto-Complete Settings

You can turn automatic display of the auto-complete control off or on. The auto-complete control can always be displayed by pressing Ctrl+Spacebar. See the topic Auto-Completion for more information.

Gutter

These options specify the default behavior for showing or hiding line numbers and command spans within the Syntax Editor's gutter--the region to the left of the text pane that is reserved for line numbers, bookmarks, breakpoints, and command spans. Command spans are icons that provide visual indicators of the start and end of a command.

Panes

Display the navigation pane. This specifies the default for showing or hiding the navigation pane. The navigation pane contains a list of all recognized commands in the syntax window, displayed in the order in which they occur. Clicking on a command in the navigation pane positions the cursor at the start of the command.

Automatically open Error Tracking pane when errors are found. This specifies the default for showing or hiding the error tracking pane when run-time errors are found.

Optimize for right to left languages. Check this box for the best user experience when working with right to left languages.

To Set Syntax Editor Options Collapse Hide details

To Set Syntax Editor Options

From the menus, choose:

Edit
Options

Click the Syntax Editor tab.

Related Topics

General Options
Viewer Options
Data Options
Currency Options
Output Label Options
Chart Options
Pivot Table Options
File Locations Options
Script Options
Multiple Imputations Options


Multiple Imputations Options

Multiple Imputation,Multiple Imputation,Multiple Imputation
options,options,options
options,options,options
multiple imputation,multiple imputation,multiple imputation

This feature requires the Missing Values option.

The Multiple Imputations tab controls two kinds of preferences related to Multiple Imputations:

Appearance of Imputed Data. By default, cells containing imputed data will have a different background color than cells containing nonimputed data. The distinctive appearance of the imputed data should make it easy for you to scroll through a dataset and locate those cells. You can change the default cell background color, the font, and make the imputed data display in bold type.

Analysis Output. This group controls the type of Viewer output produced whenever a multiply imputed dataset is analyzed. By default, output will be produced for the original (pre-imputation) dataset and for each of the imputed datasets. In addition, for those procedures that support pooling of imputed data, final pooled results will be generated. When univariate pooling is performed, pooling diagnostics will also display. However, you can suppress any output you do not want to see.

To Set Multiple Imputation Options Collapse Hide details

To Set Multiple Imputation Options

From the menus, choose:

Edit
Options

Click the Multiple Imputation tab.

Related Topics

General Options
Viewer Options
Data Options
Currency Options
Output Label Options
Chart Options
Pivot Table Options
File Locations Options
Script Options
Syntax Editor Options
Multiple Imputation


Menu Editor

menus,menus,menus
customizing,customizing,customizing
scripts,scripts,scripts
adding to menus,adding to menus,adding to menus
command syntax,command syntax,command syntax
adding to menus,adding to menus,adding to menus
menus,menus,menus
scripts,scripts,scripts
command syntax,command syntax,command syntax
Data Editor,Data Editor,Data Editor
sending data to other applications,sending data to other applications,sending data to other applications
Excel files,Excel files,Excel files
adding menu item to send data to Excel,adding menu item to send data to Excel,adding menu item to send data to Excel
Lotus 1-2-3 files,Lotus 1-2-3 files,Lotus 1-2-3 files
adding menu item to send data to Lotus,adding menu item to send data to Lotus,adding menu item to send data to Lotus
Data Editor,Data Editor,Data Editor
Lotus 1-2-3 files,Lotus 1-2-3 files,Lotus 1-2-3 files
Excel files,Excel files,Excel files
exporting data,exporting data,exporting data
adding menu items to export data,adding menu items to export data,adding menu items to export data
exporting data,exporting data,exporting data

You can use the Menu Editor to customize your menus. With the Menu Editor you can:

• Add menu items that run customized scripts.

• Add menu items that run command syntax files.

• Add menu items that launch other applications and automatically send data to other applications.

You can send data to other applications in the following formats: PASW Statistics, Excel, Lotus 1-2-3, tab-delimited, and dBASE IV.

To Add Items to Menus Collapse Hide details

To Add Items to Menus

From the menus choose:

View
Menu Editor...

In the Menu Editor dialog box, double-click the menu (or click the plus sign icon) to which you want to add a new item.

Select the menu item above which you want the new item to appear.

Click Insert Item to insert a new menu item.

Select the file type for the new item (script file, command syntax file, or external application).

Click Browse to select a file to attach to the menu item.

You can also add entirely new menus and separators between menu items. Optionally, you can automatically send the contents of the Data Editor to another application when you select that application on the menu.

Related Topics

Show Toolbars


Show Toolbars

toolbars,toolbars,toolbars
showing and hiding,showing and hiding,showing and hiding
showing,showing,showing
toolbars,toolbars,toolbars
hiding,hiding,hiding
toolbars,toolbars,toolbars
toolbars,toolbars,toolbars
customizing,customizing,customizing
toolbars,toolbars,toolbars
creating,creating,creating
toolbars,toolbars,toolbars
hiding,hiding,hiding
showing,showing,showing

Use Show Toolbars to show or hide toolbars, customize toolbars, and create new toolbars. Toolbars can contain any of the available tools, including tools for all menu actions. They can also contain custom tools that launch other applications, run command syntax files, or run script files.

Related Topics

To Customize Toolbars
Menu Editor
Toolbar Properties
Edit Toolbar
Create New Tool


To Customize Toolbars

From the menus choose:

View
Toolbars
Customize

Select the toolbar you want to customize and click Edit, or click New to create a new toolbar.

For new toolbars, enter a name for the toolbar, select the windows in which you want the toolbar to appear, and click Edit.

Select an item in the Categories list to display available tools in that category.

Drag and drop the tools you want onto the toolbar displayed in the dialog box.

To remove a tool from the toolbar, drag it anywhere off the toolbar displayed in the dialog box.

To create a custom tool to open a file, to run a command syntax file, or to run a script:

Click New Tool in the Edit Toolbar dialog box.

Enter a descriptive label for the tool.

Select the action you want for the tool (open a file, run a command syntax file, or run a script).

Click Browse to select a file or application to associate with the tool.

New tools are displayed in the User-Defined category, which also contains user-defined menu items.

Related Topics

Show Toolbars


Toolbar Properties

toolbars,toolbars,toolbars
displaying in different windows,displaying in different windows,displaying in different windows
toolbars,toolbars,toolbars

Use Toolbar Properties to select the window types in which you want the selected toolbar to appear. This dialog box is also used for creating names for new toolbars.

To Set Toolbar Properties Collapse Hide details

To Set Toolbar Properties

From the menus choose:

View
Toolbars
Customize

For existing toolbars, click Edit, and then click Properties in the Edit Toolbar dialog box.

For new toolbars, click New Tool.

Select the window types in which you want the toolbar to appear. For new toolbars, also enter a toolbar name.

Related Topics

Show Toolbars
Edit Toolbar
Create New Tool


Edit Toolbar

toolbars,toolbars,toolbars
customizing,customizing,customizing
toolbars,toolbars,toolbars
creating,creating,creating
toolbars,toolbars,toolbars
syntax,syntax,syntax
running command syntax with toolbar buttons,running command syntax with toolbar buttons,running command syntax with toolbar buttons
syntax,syntax,syntax

Use the Edit Toolbar dialog box to customize existing toolbars and create new toolbars. Toolbars can contain any of the available tools, including tools for all menu actions. They can also contain custom tools that launch other applications, run command syntax files, or run script files.

To Change Toolbar Images Collapse Hide details

To Change Toolbar Images

Select the tool for which you want to change the image on the toolbar display.

Click Change Image.

Select the image file that you want to use for the tool. The following image formats are supported: BMP, PNG, GIF, JPG.

• Images should be square. Images that are not square are clipped to a square area.

• Images are automatically scaled to fit. For optimal display, use 16x16 pixel images for small toolbar images or 32x32 pixel images for large toolbar images.

Related Topics

To Customize Toolbars
Show Toolbars
Toolbar Properties
Create New Tool


Create New Tool

toolbars,toolbars,toolbars
creating new tools,creating new tools,creating new tools
scripts,scripts,scripts
running with toolbar buttons,running with toolbar buttons,running with toolbar buttons
command syntax,command syntax,command syntax
running with toolbar buttons,running with toolbar buttons,running with toolbar buttons
toolbars,toolbars,toolbars
scripts,scripts,scripts
command syntax,command syntax,command syntax

Use the Create New Tool dialog box to create custom tools to launch other applications, run command syntax files, and run script files.

Related Topics

To Customize Toolbars
Show Toolbars
Toolbar Properties
Edit Toolbar


Creating and Managing Custom Dialogs

Custom Dialog Builder,Custom Dialog Builder,Custom Dialog Builder

The Custom Dialog Builder allows you to create and manage custom dialogs for generating command syntax. Using the Custom Dialog Builder you can:

• Create your own version of a dialog for a built-in PASW Statistics procedure. For example, you can create a dialog for the Frequencies procedure that only allows the user to select the set of variables and then generates command syntax with pre-set options that standardize the output.

• Create a user interface that generates command syntax for an extension command. Extension commands are user-defined PASW Statistics commands that are implemented in either the Python programming language or R. See the topic Custom Dialogs for Extension Commands for more information.

• Open a file containing the specification for a custom dialog--perhaps created by another user--and add the dialog to your installation of PASW Statistics, optionally making your own modifications.

• Save the specification for a custom dialog so that other users can add it to their installations of PASW Statistics.

Show me

How to Start the Custom Dialog Builder Collapse Hide details

How to Start the Custom Dialog Builder

From the menus choose:

Utilities
Custom Dialogs
Custom Dialog Builder...

Related Topics

Custom Dialog Builder Layout
Building a Custom Dialog
Dialog Properties
Specifying the Menu Location for a Custom Dialog
Laying Out Controls on the Canvas
Building the Syntax Template
Previewing a Custom Dialog
Managing Custom Dialogs
Control Types
Custom Dialogs for Extension Commands
Creating Localized Versions of Custom Dialogs


What's New in Version 18?

List box control. The Custom Dialog Builder now has a list box control that supports single or multiple selection. See the topic Combo Box and List Box Controls for more information.

Dynamically populate list items. List items for combo box controls and the new list box control can be dynamically populated with values associated with the variables in a specified target list. See the topic Specifying List Items for Combo Boxes and List Boxes for more information.

Nest controls under radio buttons. Radio buttons can now contain a set of nested controls. See the topic Defining Radio Buttons for more information.

Required Add-Ons property. The new Required Add-Ons dialog property allows you to specify one or more add-ons--such as the Python or R Integration Plug-in--that are required in order to run the command syntax generated by the dialog. See the topic Dialog Properties for more information.


Custom Dialog Builder Layout

Canvas

The canvas is the area of the Custom Dialog Builder where you design the layout of your dialog.

Properties Pane

The properties pane is the area of the Custom Dialog Builder where you specify properties of the controls that make up the dialog as well as properties of the dialog itself, such as the menu location.

Tools Palette

The tools palette provides the set of controls that can be included in a custom dialog. You can show or hide the Tools Palette by choosing Tools Palette from the View menu.

Related Topics

Creating and Managing Custom Dialogs
Building a Custom Dialog
Dialog Properties
Specifying the Menu Location for a Custom Dialog
Laying Out Controls on the Canvas
Building the Syntax Template
Previewing a Custom Dialog
Managing Custom Dialogs
Control Types
Custom Dialogs for Extension Commands
Creating Localized Versions of Custom Dialogs


Building a Custom Dialog

The basic steps involved in building a custom dialog are:

Specify the properties of the dialog itself, such as the title that appears when the dialog is launched and the location of the new menu item for the dialog within the PASW Statistics menus. See the topic Dialog Properties for more information.

Specify the controls, such as source and target variable lists, that make up the dialog and any sub-dialogs. See the topic Control Types for more information.

Create the syntax template that specifies the command syntax to be generated by the dialog. See the topic Building the Syntax Template for more information.

Install the dialog to PASW Statistics and/or save the specification for the dialog to a custom dialog package (.spd) file. See the topic Managing Custom Dialogs for more information.

You can preview your dialog as you're building it. See the topic Previewing a Custom Dialog for more information.

Related Topics

Creating and Managing Custom Dialogs
Custom Dialog Builder Layout
Dialog Properties
Specifying the Menu Location for a Custom Dialog
Laying Out Controls on the Canvas
Building the Syntax Template
Previewing a Custom Dialog
Managing Custom Dialogs
Control Types
Custom Dialogs for Extension Commands
Creating Localized Versions of Custom Dialogs


Dialog Properties

Custom Dialog Builder,Custom Dialog Builder,Custom Dialog Builder
dialog properties,dialog properties,dialog properties
help file,help file,help file

To view and set Dialog Properties:

Click on the canvas in an area outside of any controls. With no controls on the canvas, Dialog Properties are always visible.

Dialog Name. The Dialog Name property is required and specifies a unique name to associate with the dialog. This is the name used to identify the dialog when installing or uninstalling it. To minimize the possibility of name conflicts, you may want to prefix the dialog name with an identifier for your organization, such as a URL.

Menu Location. Click the ellipsis (...) button to open the Menu Location dialog box, which allows you to specify the name and location of the menu item for the custom dialog. Adding a menu location for a new custom dialog or changing the menu location of an installed custom dialog requires a restart of PASW Statistics.

Title. The Title property specifies the text to be displayed in the title bar of the dialog box.

Help File. The Help File property is optional and specifies the path to a help file for the dialog. This is the file that will be launched when the user clicks the Help button on the dialog. Help files must be in HTML format. A copy of the specified help file is included with the specifications for the dialog when the dialog is installed or saved to a custom dialog package file. The Help button on the run-time dialog is hidden if there is no associated help file.

Any supporting files, such as image files and style sheets, must be stored along with the main help file once the custom dialog has been installed. By default, the specifications for an installed custom dialog are stored in the ext/lib/<Dialog Name> folder of the installation directory for Windows and Linux. For Mac, specifications are stored under the /Library/Application Support/SPSSInc/PASWStatistics/<version>/CustomDialogs/<Dialog Name> folder, where <version> is the two digit PASW Statistics version--for example, 18. Supporting files should be located at the root of the folder and not in sub-folders. They must be manually added to any custom dialog package files you create for the dialog.

If you have specified alternate locations for installed dialogs--using the SPSS_CDIALOGS_PATH environment variable--then store any supporting files under the <Dialog Name> folder at the appropriate alternate location. See the topic Managing Custom Dialogs for more information.

Note: When working with a dialog opened from a custom dialog package (.spd) file, the Help File property points to a temporary folder associated with the .spd file. Any modifications to the help file should be made to the copy in the temporary folder.

Web Deployment Properties. Allows you to associate a properties file with this dialog for use in building thin client applications that are deployed over the web.

Modeless. Specifies whether the dialog is modal or modeless. When a dialog is modal, it must be closed before the user can interact with the main application windows (Data, Output, and Syntax) or with other open dialogs. Modeless dialogs do not have that constraint. The default is modeless.

Syntax. The Syntax property specifies the syntax template, used to create the command syntax generated by the dialog at run-time. Click the ellipsis (...) button to open the Syntax Template. See the topic Building the Syntax Template for more information.

Required Add-Ons. Specifies one or more add-ons--such as the Python or R Integration Plug-in--that are required in order to run the command syntax generated by the dialog. For example, if the dialog generates command syntax for an extension command implemented in R, then check the box for the R Integration Plug-in. Users will be warned about required add-ons that are missing when they try to install or run the dialog.

Related Topics

Creating and Managing Custom Dialogs
Custom Dialog Builder Layout
Building a Custom Dialog
Specifying the Menu Location for a Custom Dialog
Laying Out Controls on the Canvas
Building the Syntax Template
Previewing a Custom Dialog
Managing Custom Dialogs
Control Types
Custom Dialogs for Extension Commands
Creating Localized Versions of Custom Dialogs


Specifying the Menu Location for a Custom Dialog

Custom Dialog Builder,Custom Dialog Builder,Custom Dialog Builder
menu location,menu location,menu location

The Menu Location dialog box allows you to specify the name and location of the menu item for a custom dialog. Adding a menu location for a new custom dialog or changing the menu location of an installed custom dialog requires a restart of PASW Statistics. Menu items for custom dialogs do not appear in the Menu Editor within PASW Statistics.

Double-click the menu (or click the plus sign icon) to which you want to add the item for the new dialog. You can also add items to the top-level menu labelled Custom (located between the Graphs and Utilities items), which is only available for menu items associated with custom dialogs.

If you want to create custom menus or sub-menus, use the Menu Editor. See the topic Menu Editor for more information. Note, however, that other users of your dialog will have to manually create the same menu or sub-menu from their Menu Editor; otherwise, the dialog will be added to their Custom menu.

Note: The Menu Location dialog box displays all menus, including those for all add-on modules. Be sure to add the menu item for your custom dialog to a menu that will be available to you or end users of your dialog.

Select the menu item above which you want the item for the new dialog to appear. Once the item is added you can use the Move Up and Move Down buttons to reposition it.

Enter a title for the menu item. Titles within a given menu or sub-menu must be unique.

Click Add.

Optionally, you can:

• Add a separator above or below the new menu item.

• Specify the path to an image that will appear next to the menu item for the custom dialog. The supported image types are gif and png. The image cannot be larger than 16 x 16 pixels.

How To Access the Menu Location Dialog Box Collapse Hide details

From the menus in the Custom Dialog Builder choose:

Edit
Menu Location

Related Topics

Creating and Managing Custom Dialogs
Custom Dialog Builder Layout
Building a Custom Dialog
Dialog Properties
Laying Out Controls on the Canvas
Building the Syntax Template
Previewing a Custom Dialog
Managing Custom Dialogs
Control Types
Custom Dialogs for Extension Commands
Creating Localized Versions of Custom Dialogs


Laying Out Controls on the Canvas

Custom Dialog Builder,Custom Dialog Builder,Custom Dialog Builder
layout rules,layout rules,layout rules

You add controls to a custom dialog by dragging them from the tools palette onto the canvas. To ensure consistency with built-in dialogs, the canvas is divided into three functional columns in which you can place controls.

Left Column. The left column is primarily intended for a source list control. All controls other than target lists and sub-dialog buttons can be placed in the left column.

Center Column. The center column can contain any control other than source lists and sub-dialog buttons.

Right Column. The right column can only contain sub-dialog buttons.

Although not shown on the canvas, each custom dialog contains OK, Paste, Cancel, and Help buttons positioned across the bottom of the dialog. The presence and locations of these buttons is automatic, however, the Help button is hidden if there is no help file associated with the dialog (as specified by the Help File property in Dialog Properties).

You can change the vertical order of the controls within a column by dragging them up or down, but the exact position of the controls will be determined automatically for you. At run-time, controls will resize in appropriate ways when the dialog itself is resized. Controls such as source and target lists automatically expand to fill the available space below them.

Related Topics

Creating and Managing Custom Dialogs
Custom Dialog Builder Layout
Building a Custom Dialog
Dialog Properties
Specifying the Menu Location for a Custom Dialog
Building the Syntax Template
Previewing a Custom Dialog
Managing Custom Dialogs
Control Types
Custom Dialogs for Extension Commands
Creating Localized Versions of Custom Dialogs


Building the Syntax Template

Custom Dialog Builder,Custom Dialog Builder,Custom Dialog Builder
syntax template,syntax template,syntax template

The syntax template specifies the command syntax that will be generated by the custom dialog. A single custom dialog can generate command syntax for any number of built-in PASW Statistics commands or extension commands.

The syntax template may consist of static text that is always generated and control identifiers that are replaced at run-time with the values of the associated custom dialog controls. For example, command names and subcommand specifications that don't depend on user input would be static text, whereas the set of variables specified in a target list would be represented with the control identifier for the target list control.

To Build the Syntax Template

From the menus in the Custom Dialog Builder choose:

Edit
Syntax Template

(Or click the ellipsis (...) button in the Syntax property field in Dialog Properties)

For static command syntax that does not depend on user-specified values, enter the syntax as you would in the Syntax Editor.

Add control identifiers of the form %%Identifier%% at the locations where you want to insert command syntax generated by controls, where Identifier is the value of the Identifier property for the control. You can select from a list of available control identifiers by pressing Ctrl+Spacebar. If you manually enter identifiers, retain any spaces, since all spaces in identifiers are significant.

At run-time, and for all controls other than check boxes and check box groups, each identifier is replaced with the current value of the Syntax property of the associated control. For check boxes and check box groups, the identifier is replaced by the current value of the Checked Syntax or Unchecked Syntax property of the associated control, depending on the current state of the control--checked or unchecked. See the topic Control Types for more information.

Note: The syntax generated at run-time automatically includes a command terminator (period) as the very last character if one is not present.

Example: Including Run-time Values in the Syntax Template Collapse Hide details

Example: Including Run-time Values in the Syntax Template

Consider a simplified version of the Frequencies dialog that only contains a source list control and a target list control, and generates command syntax of the following form:

FREQUENCIES VARIABLES=var1 var2...
  /FORMAT = NOTABLE
  /BARCHART.

The syntax template to generate this might look like:

FREQUENCIES VARIABLES=%%target_list%%
  /FORMAT = NOTABLE
  /BARCHART.

• %%target_list%% is the value of the Identifier property for the target list control. At run-time it will be replaced by the current value of the Syntax property of the control.

• Defining the Syntax property of the target list control to be %%ThisValue%% specifies that at run-time, the current value of the property will be the value of the control, which is the set of variables in the target list.

Example: Including Command Syntax from Container Controls Collapse Hide details

Example: Including Command Syntax from Container Controls

Building on the previous example, consider adding a Statistics sub-dialog that contains a single group of check boxes that allow a user to specify mean, standard deviation, minimum, and maximum. Assume the check boxes are contained in an item group control, as shown in the following figure.

An example of the generated command syntax would be:

FREQUENCIES VARIABLES=var1 var2...
  /FORMAT = NOTABLE
  /STATISTICS MEAN STDDEV
  /BARCHART.

The syntax template to generate this might look like:

FREQUENCIES VARIABLES=%%target_list%%
  /FORMAT = NOTABLE
  %%stats_group%%
  /BARCHART.

• %%target_list%% is the value of the Identifier property for the target list control and %%stats_group%% is the value of the Identifier property for the item group control.

The following table shows one way to specify the Syntax properties of the item group and the check boxes contained within it in order to generate the desired result. The Syntax property of the target list would be set to %%ThisValue%%, as described in the previous example.

Syntax property of item group | /STATISTICS %%ThisValue%%
Checked Syntax property of mean check box | MEAN
Checked Syntax property of stddev check box | STDDEV
Checked Syntax property of min check box | MINIMUM
Checked Syntax property of max check box | MAXIMUM

At run-time, %%stats_group%% will be replaced by the current value of the Syntax property for the item group control. Specifically, %%ThisValue%% will be replaced by a blank-separated list of the values of the Checked or Unchecked Syntax property of each check box, depending on its state--checked or unchecked. Since we only specified values for the Checked Syntax property, only checked boxes will contribute to %%ThisValue%%. For example, if the user checks the mean and standard deviation boxes, the run-time value of the Syntax property for the item group will be /STATISTICS MEAN STDDEV.

If no boxes are checked, then the Syntax property for the item group control will be empty, and the generated command syntax will not contain any reference to %%stats_group%%. This may or may not be desirable. For example, even with no boxes checked you may still want to generate the STATISTICS subcommand. This can be accomplished by referencing the identifiers for the check boxes directly in the syntax template, as in:

FREQUENCIES VARIABLES=%%target_list%%
  /FORMAT = NOTABLE
  /STATISTICS %%stats_mean%% %%stats_stddev%% %%stats_min%% %%stats_max%%
  /BARCHART.

Related Topics

Creating and Managing Custom Dialogs
Custom Dialog Builder Layout
Building a Custom Dialog
Dialog Properties
Specifying the Menu Location for a Custom Dialog
Laying Out Controls on the Canvas
Previewing a Custom Dialog
Managing Custom Dialogs
Control Types
Custom Dialogs for Extension Commands
Creating Localized Versions of Custom Dialogs


Previewing a Custom Dialog

Custom Dialog Builder,Custom Dialog Builder,Custom Dialog Builder
preview,preview,preview

You can preview the dialog that is currently open in the Custom Dialog Builder. The dialog appears and functions as it would when run from the menus within PASW Statistics.

• Source variable lists are populated with dummy variables that can be moved to target lists.

• The Paste button pastes command syntax into the designated syntax window.

• The OK button closes the preview.

• If a help file is specified, the Help button is enabled and will open the specified file. If no help file is specified, the help button is disabled when previewing, and hidden when the actual dialog is run.

To preview a custom dialog:

From the menus in the Custom Dialog Builder choose:

File
Preview Dialog

Related Topics

Creating and Managing Custom Dialogs
Custom Dialog Builder Layout
Building a Custom Dialog
Dialog Properties
Specifying the Menu Location for a Custom Dialog
Laying Out Controls on the Canvas
Building the Syntax Template
Managing Custom Dialogs
Control Types
Custom Dialogs for Extension Commands
Creating Localized Versions of Custom Dialogs


Managing Custom Dialogs

Custom Dialog Builder,Custom Dialog Builder,Custom Dialog Builder
installing dialogs,installing dialogs,installing dialogs
modifying installed dialogs,modifying installed dialogs,modifying installed dialogs
saving dialog specifications,saving dialog specifications,saving dialog specifications
opening dialog specification files,opening dialog specification files,opening dialog specification files
custom dialog package (spd) files,custom dialog package (spd) files,custom dialog package (spd) files

The Custom Dialog Builder allows you to manage custom dialogs created by you or by other users. You can install, uninstall, or modify installed dialogs; and you can save specifications for a custom dialog to an external file or open a file containing the specifications for a custom dialog in order to modify it. Custom dialogs must be installed before they can be used.

Installing a Custom Dialog Collapse Hide details

Installing a Custom Dialog

You can install the dialog that is currently open in the Custom Dialog Builder or you can install a dialog from a custom dialog package (.spd) file. Re-installing an existing dialog will replace the existing version.

To install the currently open dialog:

From the menus in the Custom Dialog Builder choose:

File
Install

To install from a custom dialog package file:

From the menus choose:

Utilities
Custom Dialogs
Install Custom Dialog...

To use a new custom dialog, you will need to restart PASW Statistics. Re-installing an existing dialog does not require a restart unless the menu location changes.

For Windows and Linux, and by default, installing a dialog requires write permission to the PASW Statistics installation directory. If you do not have write permissions to the required location or would like to store installed dialogs elsewhere, you can specify one or more alternate locations by defining the SPSS_CDIALOGS_PATH environment variable. When present, the paths specified in SPSS_CDIALOGS_PATH take precedence over the default location. Custom dialogs will be installed to the first writable location. Note that Mac users may also utilize the SPSS_CDIALOGS_PATH environment variable. For multiple locations, separate each with a semicolon on Windows and a colon on Linux and Mac. The specified locations must exist on the target machine. After setting SPSS_CDIALOGS_PATH , you will need to restart PASW Statistics for the changes to take effect.

To create the SPSS_CDIALOGS_PATH environment variable on Windows, from the Control Panel:

Windows XP

Select System.

Select the Advanced tab and click Environment Variables.

In the User variables section, click New, enter SPSS_CDIALOGS_PATH in the Variable name field and the desired path(s) in the Variable value field.

Windows Vista or Windows 7

Select User Accounts.

Select Change my environment variables.

Click New, enter SPSS_CDIALOGS_PATH in the Variable name field and the desired path(s) in the Variable value field.

To view the current locations for custom dialogs, run the following command syntax: SHOW EXTPATHS.

Opening an Installed Custom Dialog Collapse Hide details

Opening an Installed Custom Dialog

You can open a custom dialog that you have already installed, allowing you to modify it and/or save it externally so that it can be distributed to other users.

From the menus in the Custom Dialog Builder choose:

File
Open Installed

Note: If you are opening an installed dialog in order to modify it, choosing File > Install will re-install it, replacing the existing version.

Uninstalling a Custom Dialog Collapse Hide details

Uninstalling a Custom Dialog

From the menus in the Custom Dialog Builder choose:

File
Uninstall

The menu item for the custom dialog will be removed the next time you start PASW Statistics.

Saving to a Custom Dialog Package File Collapse Hide details

Saving to a Custom Dialog Package File

You can save the specifications for a custom dialog to an external file, allowing you to distribute the dialog to other users or save specifications for a dialog that is not yet installed. Specifications are saved to a custom dialog package (.spd) file.

From the menus in the Custom Dialog Builder choose:

File
Save

Opening a Custom Dialog Package File Collapse Hide details

Opening a Custom Dialog Package File

You can open a custom dialog package file containing the specifications for a custom dialog, allowing you to modify the dialog and re-save it or install it.

From the menus in the Custom Dialog Builder choose:

File
Open

Manually Copying an Installed Custom Dialog Collapse Hide details

Manually Copying an Installed Custom Dialog

By default, the specifications for an installed custom dialog are stored in the ext/lib/<Dialog Name> folder of the installation directory for Windows and Linux. For Mac, specifications are stored under the /Library/Application Support/SPSSInc/PASWStatistics/<version>/CustomDialogs/<Dialog Name> folder, where <version> is the two digit PASW Statistics version--for example, 18. You can copy this folder to the same relative location in another instance of PASW Statistics and it will be recognized as an installed dialog the next time that instance is launched.

• If you have specified alternate locations for installed dialogs--using the SPSS_CDIALOGS_PATH environment variable--then copy the <Dialog Name> folder from the appropriate alternate location.

• If alternate locations for installed dialogs have been defined for the instance of PASW Statistics you are copying to, then you can copy to any one of the specified locations and the dialog will be recognized as an installed dialog the next time that instance is launched.

Related Topics

Creating and Managing Custom Dialogs
Custom Dialog Builder Layout
Building a Custom Dialog
Dialog Properties
Specifying the Menu Location for a Custom Dialog
Laying Out Controls on the Canvas
Building the Syntax Template
Previewing a Custom Dialog
Control Types
Custom Dialogs for Extension Commands
Creating Localized Versions of Custom Dialogs


Control Types

The tools palette provides the controls that can be added to a custom dialog.

• Source List: A list of source variables from the active dataset. See the topic Source List for more information.

• Target List: A target for variables transferred from the source list. See the topic Target List for more information.

• Check Box: A single check box. See the topic Check Box for more information.

• Combo Box: A combo box for creating drop-down lists. See the topic Combo Box and List Box Controls for more information.

• List Box: A list box for creating single selection or multiple selection lists. See the topic Combo Box and List Box Controls for more information.

• Text control: A text box that accepts arbitrary text as input. See the topic Text Control for more information.

• Number control: A text box that is restricted to numeric values as input. See the topic Number Control for more information.

• Static Text control: A control for displaying static text. See the topic Static Text Control for more information.

• Item Group: A container for grouping a set of controls, such as a set of check boxes. See the topic Item Group for more information.

• Radio Group: A group of radio buttons. See the topic Radio Group for more information.

• Check Box Group: A container for a set of controls that are enabled or disabled as a group, by a single check box. See the topic Check Box Group for more information.

• File Browser: A control for browsing the file system to open or save a file. See the topic File Browser for more information.

• Sub-dialog Button: A button for launching a sub-dialog. See the topic Sub-dialog Button for more information.

Related Topics

Source List
Target List
Filtering Variable Lists
Check Box
Combo Box and List Box Controls
Specifying List Items for Combo Boxes and List Boxes
Text Control
Number Control
Static Text Control
Item Group
Radio Group
Defining Radio Buttons
Check Box Group
File Browser
File Type Filter
Sub-dialog Button
Dialog Properties for a Sub-dialog
Custom Dialog Builder Layout
Building a Custom Dialog
Dialog Properties
Specifying the Menu Location for a Custom Dialog
Laying Out Controls on the Canvas
Building the Syntax Template
Previewing a Custom Dialog
Managing Custom Dialogs
Custom Dialogs for Extension Commands
Creating Localized Versions of Custom Dialogs


Source List

Custom Dialog Builder,Custom Dialog Builder,Custom Dialog Builder
source list,source list,source list

The Source Variable List control displays the list of variables from the active dataset that are available to the end user of the dialog. You can display all variables from the active dataset (the default) or you can filter the list based on type and measurement level--for instance, numeric variables that have a measurement level of scale. Use of a Source List control implies the use of one or more Target List controls. The Source List control has the following properties:

Identifier. The unique identifier for the control.

Title. An optional title that appears above the control. For multi-line titles, use \n to specify line breaks.

ToolTip. Optional ToolTip text that appears when the user hovers over the control. The specified text only appears when hovering over the title area of the control. Hovering over one of the listed variables will display the variable name and label.

Mnemonic Key. An optional character in the title to use as a keyboard shortcut to the control. The character appears underlined in the title. The shortcut is activated by pressing Alt+[mnemonic key]. The Mnemonic Key property is not supported on Mac.

Variable Transfers. Specifies whether variables transferred from the source list to a target list remain in the source list (Copy Variables), or are removed from the source list (Move Variables).

Variable Filter. Allows you to filter the set of variables displayed in the control. You can filter on variable type and measurement level, and you can specify that multiple response sets are included in the variable list. Click the ellipsis (...) button to open the Filter dialog. You can also open the Filter dialog by double-clicking the Source List control on the canvas. See the topic Filtering Variable Lists for more information.

Note: The Source List control cannot be added to a sub-dialog.

Related Topics

Control Types
Target List
Filtering Variable Lists
Check Box
Combo Box and List Box Controls
Specifying List Items for Combo Boxes and List Boxes
Text Control
Number Control
Static Text Control
Item Group
Radio Group
Defining Radio Buttons
Check Box Group
File Browser
File Type Filter
Sub-dialog Button
Dialog Properties for a Sub-dialog


Target List

Custom Dialog Builder,Custom Dialog Builder,Custom Dialog Builder
target list,target list,target list

The Target List control provides a target for variables that are transferred from the source list. Use of the Target List control assumes the presence of a Source List control. You can specify that only a single variable can be transferred to the control or that multiple variables can be transferred to it, and you can constrain which types of variables can be transferred to the control--for instance, only numeric variables with a measurement level of nominal or ordinal. The Target List control has the following properties:

Identifier. The unique identifier for the control. This is the identifier to use when referencing the control in the syntax template.

Title. An optional title that appears above the control. For multi-line titles, use \n to specify line breaks.

ToolTip. Optional ToolTip text that appears when the user hovers over the control. The specified text only appears when hovering over the title area of the control. Hovering over one of the listed variables will display the variable name and label.

Target list type. Specifies whether multiple variables or only a single variable can be transferred to the control.

Mnemonic Key. An optional character in the title to use as a keyboard shortcut to the control. The character appears underlined in the title. The shortcut is activated by pressing Alt+[mnemonic key]. The Mnemonic Key property is not supported on Mac.

Required for execution. Specifies whether a value is required in this control in order for execution to proceed. If True is specified, the OK and Paste buttons will be disabled until a value is specified for this control. If False is specified, the absence of a value in this control has no effect on the state of the OK and Paste buttons. The default is True.

Variable Filter. Allows you to constrain the types of variables that can be transferred to the control. You can constrain by variable type and measurement level, and you can specify whether multiple response sets can be transferred to the control. Click the ellipsis (...) button to open the Filter dialog. You can also open the Filter dialog by double-clicking the Target List control on the canvas. See the topic Filtering Variable Lists for more information.

Syntax. Specifies command syntax that is generated by this control at run-time and can be inserted in the syntax template.

• You can specify any valid command syntax and you can use \n for line breaks.

• The value %%ThisValue%% specifies the run-time value of the control, which is the list of variables transferred to the control. This is the default.

Note: The Target List control cannot be added to a sub-dialog.

Related Topics

Control Types
Source List
Filtering Variable Lists
Check Box
Combo Box and List Box Controls
Specifying List Items for Combo Boxes and List Boxes
Text Control
Number Control
Static Text Control
Item Group
Radio Group
Defining Radio Buttons
Check Box Group
File Browser
File Type Filter
Sub-dialog Button
Dialog Properties for a Sub-dialog


Filtering Variable Lists

Custom Dialog Builder,Custom Dialog Builder,Custom Dialog Builder
filtering variable lists,filtering variable lists,filtering variable lists

The Filter dialog box, associated with source and target variable lists, allows you to filter the types of variables from the active dataset that can appear in the lists. You can also specify whether multiple response sets associated with the active dataset are included. Numeric variables include all numeric formats except date and time formats.

Related Topics

Control Types
Source List
Target List
Check Box
Combo Box and List Box Controls
Specifying List Items for Combo Boxes and List Boxes
Text Control
Number Control
Static Text Control
Item Group
Radio Group
Defining Radio Buttons
Check Box Group
File Browser
File Type Filter
Sub-dialog Button
Dialog Properties for a Sub-dialog


Check Box

Custom Dialog Builder,Custom Dialog Builder,Custom Dialog Builder
check box,check box,check box

The Check Box control is a simple check box that can generate different command syntax for the checked versus the unchecked state. The Check Box control has the following properties:

Identifier. The unique identifier for the control. This is the identifier to use when referencing the control in the syntax template.

Title. The label that is displayed with the check box. For multi-line titles, use \n to specify line breaks.

ToolTip. Optional ToolTip text that appears when the user hovers over the control.

Mnemonic Key. An optional character in the title to use as a keyboard shortcut to the control. The character appears underlined in the title. The shortcut is activated by pressing Alt+[mnemonic key]. The Mnemonic Key property is not supported on Mac.

Default Value. The default state of the check box--checked or unchecked.

Checked/Unchecked Syntax. Specifies the command syntax that is generated when the control is checked and when it is unchecked. To include the command syntax in the syntax template, use the value of the Identifier property. The generated syntax, whether from the Checked Syntax or Unchecked Syntax property, will be inserted at the specified position(s) of the identifier. For example, if the identifier is checkbox1, then at run-time, instances of %%checkbox1%% in the syntax template will be replaced by the value of the Checked Syntax property when the box is checked and the Unchecked Syntax property when the box is unchecked.

• You can specify any valid command syntax and you can use \n for line breaks.

Related Topics

Control Types
Source List
Target List
Filtering Variable Lists
Combo Box and List Box Controls
Specifying List Items for Combo Boxes and List Boxes
Text Control
Number Control
Static Text Control
Item Group
Radio Group
Defining Radio Buttons
Check Box Group
File Browser
File Type Filter
Sub-dialog Button
Dialog Properties for a Sub-dialog


Combo Box and List Box Controls

Custom Dialog Builder,Custom Dialog Builder,Custom Dialog Builder
combo box,combo box,combo box
list box,list box,list box

The Combo Box control allows you to create a drop-down list that can generate command syntax specific to the selected list item. It is limited to single selection. The List Box control allows you to display a list of items that support single or multiple selection and generate command syntax specific to the selected item(s). The Combo Box and List Box controls have the following properties:

Identifier. The unique identifier for the control. This is the identifier to use when referencing the control in the syntax template.

Title. An optional title that appears above the control. For multi-line titles, use \n to specify line breaks.

ToolTip. Optional ToolTip text that appears when the user hovers over the control.

List Items. Click the ellipsis (...) button to open the List Item Properties dialog box, which allows you to specify the list items of the control. You can also open the List Item Properties dialog by double-clicking the Combo Box or List Box control on the canvas.

Mnemonic Key. An optional character in the title to use as a keyboard shortcut to the control. The character appears underlined in the title. The shortcut is activated by pressing Alt+[mnemonic key]. The Mnemonic Key property is not supported on Mac.

List Box Type (List Box only). Specifies whether the list box supports single selection only or multiple selection. You can also specify that items are displayed as a list of check boxes.

Syntax. Specifies command syntax that is generated by this control at run-time and can be inserted in the syntax template.

• The value %%ThisValue%% specifies the run-time value of the control and is the default. If the list items are manually defined, the run-time value is the value of the Syntax property for the selected list item. If the list items are based on a target list control, the run-time value is the value of the selected list item. For multiple selection list box controls, the run-time value is a blank-separated list of the selected items. See the topic Specifying List Items for Combo Boxes and List Boxes for more information.

• You can specify any valid command syntax and you can use \n for line breaks.

Related Topics

Control Types
Source List
Target List
Filtering Variable Lists
Check Box
Specifying List Items for Combo Boxes and List Boxes
Text Control
Number Control
Static Text Control
Item Group
Radio Group
Defining Radio Buttons
Check Box Group
File Browser
File Type Filter
Sub-dialog Button
Dialog Properties for a Sub-dialog


Specifying List Items for Combo Boxes and List Boxes

Custom Dialog Builder,Custom Dialog Builder,Custom Dialog Builder
combo box list items,combo box list items,combo box list items
list box list items,list box list items,list box list items

The List Item Properties dialog box allows you to specify the list items of a combo box or list box control.

Manually defined values. Allows you to explicitly specify each of the list items.

• Identifier. A unique identifier for the list item.

• Name. The name that appears in the list for this item. The name is a required field.

• Default. For a combo box, specifies whether the list item is the default item displayed in the combo box. For a list box, specifies whether the list item is selected by default.

• Syntax. Specifies the command syntax that is generated when the list item is selected.

• You can specify any valid command syntax and you can use \n for line breaks.

Note: You can add a new list item in the blank line at the bottom of the existing list. Entering any of the properties other than the identifier will generate a unique identifier, which you can keep or modify. You can delete a list item by clicking on the Identifier cell for the item and pressing delete.

Values based on the contents of a target list control. Specifies that the list items are dynamically populated with values associated with the variables in a selected target list control. Select an existing target list control as the source of the list items, or enter the value of the Identifier property for a target list control into the text area of the Target List combo box. The latter approach allows you to enter the Identifier for a target list control that you plan to add later.

• Variable Names. Populate the list items with the names of the variables in the specified target list control.

• Value Labels. Populate the list items with the union of the value labels associated with the variables in the specified target list control. You can choose whether the command syntax generated by the associated combo box or list box control contains the selected value label or its associated value.

• Custom Attribute. Populate the list items with the union of the attribute values associated with variables in the target list control that contain the specified custom attribute.

• Syntax. Displays the Syntax property of the associated combo box or list box control, allowing you to make changes to the property. See the topic Combo Box and List Box Controls for more information.

Related Topics

Control Types
Source List
Target List
Filtering Variable Lists
Check Box
Combo Box and List Box Controls
Text Control
Number Control
Static Text Control
Item Group
Radio Group
Defining Radio Buttons
Check Box Group
File Browser
File Type Filter
Sub-dialog Button
Dialog Properties for a Sub-dialog


Text Control

Custom Dialog Builder,Custom Dialog Builder,Custom Dialog Builder
text control,text control,text control

The Text control is a simple text box that can accept arbitrary input, and has the following properties:

Identifier. The unique identifier for the control. This is the identifier to use when referencing the control in the syntax template.

Title. An optional title that appears above the control. For multi-line titles, use \n to specify line breaks.

ToolTip. Optional ToolTip text that appears when the user hovers over the control.

Mnemonic Key. An optional character in the title to use as a keyboard shortcut to the control. The character appears underlined in the title. The shortcut is activated by pressing Alt+[mnemonic key]. The Mnemonic Key property is not supported on Mac.

Text Content. Specifies whether the contents are arbitrary or whether the text box must contain a string that adheres to rules for PASW Statistics variable names. See the topic Variable Names for more information.

Default Value. The default contents of the text box.

Required for execution. Specifies whether a value is required in this control in order for execution to proceed. If True is specified, the OK and Paste buttons will be disabled until a value is specified for this control. If False is specified, the absence of a value in this control has no effect on the state of the OK and Paste buttons. The default is False.

Syntax. Specifies command syntax that is generated by this control at run-time and can be inserted in the syntax template.

• You can specify any valid command syntax and you can use \n for line breaks.

• The value %%ThisValue%% specifies the run-time value of the control, which is the content of the text box. This is the default.

• If the Syntax property includes %%ThisValue%% and the run-time value of the text box is empty, then the text box control does not generate any command syntax.

Related Topics

Control Types
Source List
Target List
Filtering Variable Lists
Check Box
Combo Box and List Box Controls
Specifying List Items for Combo Boxes and List Boxes
Number Control
Static Text Control
Item Group
Radio Group
Defining Radio Buttons
Check Box Group
File Browser
File Type Filter
Sub-dialog Button
Dialog Properties for a Sub-dialog


Number Control

Custom Dialog Builder,Custom Dialog Builder,Custom Dialog Builder
number control,number control,number control

The Number control is a text box for entering a numeric value, and has the following properties:

Identifier. The unique identifier for the control. This is the identifier to use when referencing the control in the syntax template.

Title. An optional title that appears above the control. For multi-line titles, use \n to specify line breaks.

ToolTip. Optional ToolTip text that appears when the user hovers over the control.

Mnemonic Key. An optional character in the title to use as a keyboard shortcut to the control. The character appears underlined in the title. The shortcut is activated by pressing Alt+[mnemonic key]. The Mnemonic Key property is not supported on Mac.

Numeric Type. Specifies any limitations on what can be entered. A value of Real specifies that there are no restrictions on the entered value, other than it be numeric. A value of Integer specifies that the value must be an integer.

Default Value. The default value, if any.

Minimum Value. The minimum allowed value, if any.

Maximum Value. The maximum allowed value, if any.

Required for execution. Specifies whether a value is required in this control in order for execution to proceed. If True is specified, the OK and Paste buttons will be disabled until a value is specified for this control. If False is specified, the absence of a value in this control has no effect on the state of the OK and Paste buttons. The default is False.

Syntax. Specifies command syntax that is generated by this control at run-time and can be inserted in the syntax template.

• You can specify any valid command syntax and you can use \n for line breaks.

• The value %%ThisValue%% specifies the run-time value of the control, which is the numeric value. This is the default.

• If the Syntax property includes %%ThisValue%% and the run-time value of the number control is empty, then the number control does not generate any command syntax.

Related Topics

Control Types
Source List
Target List
Filtering Variable Lists
Check Box
Combo Box and List Box Controls
Specifying List Items for Combo Boxes and List Boxes
Text Control
Static Text Control
Item Group
Radio Group
Defining Radio Buttons
Check Box Group
File Browser
File Type Filter
Sub-dialog Button
Dialog Properties for a Sub-dialog


Static Text Control

Custom Dialog Builder,Custom Dialog Builder,Custom Dialog Builder
static text control,static text control,static text control

The Static Text control allows you to add a block of text to your dialog, and has the following properties:

Identifier. The unique identifier for the control.

Title. The content of the text block. For multi-line content, use \n to specify line breaks.

Related Topics

Control Types
Source List
Target List
Filtering Variable Lists
Check Box
Combo Box and List Box Controls
Specifying List Items for Combo Boxes and List Boxes
Text Control
Number Control
Item Group
Radio Group
Defining Radio Buttons
Check Box Group
File Browser
File Type Filter
Sub-dialog Button
Dialog Properties for a Sub-dialog


Item Group

Custom Dialog Builder,Custom Dialog Builder,Custom Dialog Builder
item group control,item group control,item group control

The Item Group control is a container for other controls, allowing you to group and control the syntax generated from multiple controls. For example, you have a set of check boxes that specify optional settings for a subcommand, but only want to generate the syntax for the subcommand if at least one box is checked. This is accomplished by using an Item Group control as a container for the check box controls. The following types of controls can be contained in an Item Group: check box, combo box, text control, number control, static text, radio group, and file browser. The Item Group control has the following properties:

Identifier. The unique identifier for the control. This is the identifier to use when referencing the control in the syntax template.

Title. An optional title for the group. For multi-line titles, use \n to specify line breaks.

Required for execution. True specifies that the OK and Paste buttons will be disabled until at least one control in the group has a value. The default is False.

For example, the group consists of a set of check boxes. If Required for execution is set to True and all of the boxes are unchecked, then OK and Paste will be disabled.

Syntax. Specifies command syntax that is generated by this control at run-time and can be inserted in the syntax template.

• You can specify any valid command syntax and you can use \n for line breaks.

• You can include identifiers for any controls contained in the item group. At run-time the identifiers are replaced with the syntax generated by the controls.

• The value %%ThisValue%% generates a blank-separated list of the syntax generated by each control in the item group, in the order in which they appear in the group (top to bottom). This is the default. If the Syntax property includes %%ThisValue%% and no syntax is generated by any of the controls in the item group, then the item group as a whole does not generate any command syntax.

Related Topics

Control Types
Source List
Target List
Filtering Variable Lists
Check Box
Combo Box and List Box Controls
Specifying List Items for Combo Boxes and List Boxes
Text Control
Number Control
Static Text Control
Radio Group
Defining Radio Buttons
Check Box Group
File Browser
File Type Filter
Sub-dialog Button
Dialog Properties for a Sub-dialog


Radio Group

Custom Dialog Builder,Custom Dialog Builder,Custom Dialog Builder
radio group,radio group,radio group

The Radio Group control is a container for a set of radio buttons, each of which can contain a set of nested controls. The Radio Group control has the following properties:

Identifier. The unique identifier for the control.This is the identifier to use when referencing the control in the syntax template.

Title. An optional title for the group. If omitted, the group border is not displayed. For multi-line titles, use \n to specify line breaks.

ToolTip. Optional ToolTip text that appears when the user hovers over the control.

Radio Buttons. Click the ellipsis (...) button to open the Radio Group Properties dialog box, which allows you to specify the properties of the radio buttons as well as to add or remove buttons from the group. The ability to nest controls under a given radio button is a property of the radio button and is set in the Radio Group Properties dialog box. Note: You can also open the Radio Group Properties dialog by double-clicking the Radio Group control on the canvas.

Syntax. Specifies command syntax that is generated by this control at run-time and can be inserted in the syntax template.

• You can specify any valid command syntax and you can use \n for line breaks.

• The value %%ThisValue%% specifies the run-time value of the radio button group, which is the value of the Syntax property for the selected radio button. This is the default. If the Syntax property includes %%ThisValue%% and no syntax is generated by the selected radio button, then the radio button group does not generate any command syntax.

Related Topics

Control Types
Source List
Target List
Filtering Variable Lists
Check Box
Combo Box and List Box Controls
Specifying List Items for Combo Boxes and List Boxes
Text Control
Number Control
Static Text Control
Item Group
Defining Radio Buttons
Check Box Group
File Browser
File Type Filter
Sub-dialog Button
Dialog Properties for a Sub-dialog


Defining Radio Buttons

Custom Dialog Builder,Custom Dialog Builder,Custom Dialog Builder
radio group buttons,radio group buttons,radio group buttons

The Radio Button Group Properties dialog box allows you to specify a group of radio buttons.

Identifier. A unique identifier for the radio button.

Name. The name that appears next to the radio button. The name is a required field.

ToolTip. Optional ToolTip text that appears when the user hovers over the control.

Mnemonic Key. An optional character in the name to use as a mnemonic. The specified character must exist in the name.

Nested Group. Specifies whether other controls can be nested under this radio button. The default is false. When the nested group property is set to true, a rectangular drop zone is displayed, nested and indented, under the associated radio button. The following controls can be nested under a radio button: check box, text, static text, number, combo box, list box, and file browser.

Default. Specifies whether the radio button is the default selection.

Syntax. Specifies the command syntax that is generated when the radio button is selected.

• You can specify any valid command syntax and you can use \n for line breaks.

• For radio buttons containing nested controls, the value %%ThisValue%% generates a blank-separated list of the syntax generated by each nested control, in the order in which they appear under the radio button (top to bottom).

You can add a new radio button in the blank line at the bottom of the existing list. Entering any of the properties other than the identifier will generate a unique identifier, which you can keep or modify. You can delete a radio button by clicking on the Identifier cell for the button and pressing delete.

Related Topics

Control Types
Source List
Target List
Filtering Variable Lists
Check Box
Combo Box and List Box Controls
Specifying List Items for Combo Boxes and List Boxes
Text Control
Number Control
Static Text Control
Item Group
Radio Group
Check Box Group
File Browser
File Type Filter
Sub-dialog Button
Dialog Properties for a Sub-dialog


Check Box Group

Custom Dialog Builder,Custom Dialog Builder,Custom Dialog Builder
check box group,check box group,check box group

The Check Box Group control is a container for a set of controls that are enabled or disabled as a group, by a single check box. The following types of controls can be contained in a Check Box Group: check box, combo box, text control, number control, static text, radio group, and file browser. The Check Box Group control has the following properties:

Identifier. The unique identifier for the control. This is the identifier to use when referencing the control in the syntax template.

Title. An optional title for the group. If omitted, the group border is not displayed. For multi-line titles, use \n to specify line breaks.

Checkbox Title. An optional label that is displayed with the controlling check box. Supports \n to specify line breaks.

ToolTip. Optional ToolTip text that appears when the user hovers over the control.

Mnemonic Key. An optional character in the title to use as a keyboard shortcut to the control. The character appears underlined in the title. The shortcut is activated by pressing Alt+[mnemonic key]. The Mnemonic Key property is not supported on Mac.

Default Value. The default state of the controlling check box--checked or unchecked.

Checked/Unchecked Syntax. Specifies the command syntax that is generated when the control is checked and when it is unchecked. To include the command syntax in the syntax template, use the value of the Identifier property. The generated syntax, whether from the Checked Syntax or Unchecked Syntax property, will be inserted at the specified position(s) of the identifier. For example, if the identifier is checkboxgroup1, then at run-time, instances of %%checkboxgroup1%% in the syntax template will be replaced by the value of the Checked Syntax property when the box is checked and the Unchecked Syntax property when the box is unchecked.

• You can specify any valid command syntax and you can use \n for line breaks.

• You can include identifiers for any controls contained in the check box group. At run-time the identifiers are replaced with the syntax generated by the controls.

• The value %%ThisValue%% can be used in either the Checked Syntax or Unchecked Syntax property. It generates a blank-separated list of the syntax generated by each control in the check box group, in the order in which they appear in the group (top to bottom).

• By default, the Checked Syntax property has a value of %%ThisValue%% and the Unchecked Syntax property is blank.

Related Topics

Control Types
Source List
Target List
Filtering Variable Lists
Check Box
Combo Box and List Box Controls
Specifying List Items for Combo Boxes and List Boxes
Text Control
Number Control
Static Text Control
Item Group
Radio Group
Defining Radio Buttons
File Browser
File Type Filter
Sub-dialog Button
Dialog Properties for a Sub-dialog


File Browser

Custom Dialog Builder,Custom Dialog Builder,Custom Dialog Builder
file browser,file browser,file browser

The File Browser control consists of a text box for a file path and a browse button that opens a standard PASW Statistics dialog to open or save a file. The File Browser control has the following properties:

Identifier. The unique identifier for the control. This is the identifier to use when referencing the control in the syntax template.

Title. An optional title that appears above the control. For multi-line titles, use \n to specify line breaks.

ToolTip. Optional ToolTip text that appears when the user hovers over the control.

Mnemonic Key. An optional character in the title to use as a keyboard shortcut to the control. The character appears underlined in the title. The shortcut is activated by pressing Alt+[mnemonic key]. The Mnemonic Key property is not supported on Mac.

File System Operation. Specifies whether the dialog launched by the browse button is appropriate for opening files or for saving files. A value of Open indicates that the browse dialog validates the existence of the specified file. A value of Save indicates that the browse dialog does not validate the existence of the specified file.

Browser Type. Specifies whether the browse dialog is used to select a file (Locate File) or to select a folder (Locate Folder).

File Filter. Click the ellipsis (...) button to open the File Filter dialog box, which allows you to specify the available file types for the open or save dialog. By default, all file types are allowed. Note: You can also open the File Filter dialog by double-clicking the File Browser control on the canvas.

File System Type. In distributed analysis mode, this specifies whether the open or save dialog browses the file system on which PASW Statistics Server is running or the file system of your local computer. Select Server to browse the file system of the server or Client to browse the file system of your local computer. The property has no effect in local analysis mode.

Required for execution. Specifies whether a value is required in this control in order for execution to proceed. If True is specified, the OK and Paste buttons will be disabled until a value is specified for this control. If False is specified, the absence of a value in this control has no effect on the state of the OK and Paste buttons. The default is False.

Syntax. Specifies command syntax that is generated by this control at run-time and can be inserted in the syntax template.

• You can specify any valid command syntax and you can use \n for line breaks.

• The value %%ThisValue%% specifies the run-time value of the text box, which is the file path, specified manually or populated by the browse dialog. This is the default.

• If the Syntax property includes %%ThisValue%% and the run-time value of the text box is empty, then the file browser control does not generate any command syntax.

Related Topics

Control Types
Source List
Target List
Filtering Variable Lists
Check Box
Combo Box and List Box Controls
Specifying List Items for Combo Boxes and List Boxes
Text Control
Number Control
Static Text Control
Item Group
Radio Group
Defining Radio Buttons
Check Box Group
File Type Filter
Sub-dialog Button
Dialog Properties for a Sub-dialog


File Type Filter

Custom Dialog Builder,Custom Dialog Builder,Custom Dialog Builder
file type filter,file type filter,file type filter

The File Filter dialog box allows you to specify the file types displayed in the Files of type and Save as type drop-down lists for open and save dialogs accessed from a File System Browser control. By default, all file types are allowed.

To specify file types not explicitly listed in the dialog box:

Select Other.

Enter a name for the file type.

Enter a file type using the form *.suffix--for example, *.xls. You can specify multiple file types, each separated by a semicolon.

Related Topics

Control Types
Source List
Target List
Filtering Variable Lists
Check Box
Combo Box and List Box Controls
Specifying List Items for Combo Boxes and List Boxes
Text Control
Number Control
Static Text Control
Item Group
Radio Group
Defining Radio Buttons
Check Box Group
File Browser
Sub-dialog Button
Dialog Properties for a Sub-dialog


Sub-dialog Button

Custom Dialog Builder,Custom Dialog Builder,Custom Dialog Builder
sub-dialog button,sub-dialog button,sub-dialog button

The Sub-dialog Button control specifies a button for launching a sub-dialog and provides access to the Dialog Builder for the sub-dialog. The Sub-dialog Button has the following properties:

Identifier. The unique identifier for the control.

Title. The text that is displayed in the button.

ToolTip. Optional ToolTip text that appears when the user hovers over the control.

Sub-dialog. Click the ellipsis (...) button to open the Custom Dialog Builder for the sub-dialog. You can also open the builder by double-clicking on the Sub-dialog button.

Mnemonic Key. An optional character in the title to use as a keyboard shortcut to the control. The character appears underlined in the title. The shortcut is activated by pressing Alt+[mnemonic key]. The Mnemonic Key property is not supported on Mac.

Note: The Sub-dialog Button control cannot be added to a sub-dialog.

Related Topics

Control Types
Source List
Target List
Filtering Variable Lists
Check Box
Combo Box and List Box Controls
Specifying List Items for Combo Boxes and List Boxes
Text Control
Number Control
Static Text Control
Item Group
Radio Group
Defining Radio Buttons
Check Box Group
File Browser
File Type Filter
Dialog Properties for a Sub-dialog


Dialog Properties for a Sub-dialog

Custom Dialog Builder,Custom Dialog Builder,Custom Dialog Builder
sub-dialog properties,sub-dialog properties,sub-dialog properties

To view and set properties for a sub-dialog:

Open the sub-dialog by double-clicking on the button for the sub-dialog in the main dialog, or single-click the sub-dialog button and click the ellipsis (...) button for the Sub-dialog property.

In the sub-dialog, click on the canvas in an area outside of any controls. With no controls on the canvas, the properties for a sub-dialog are always visible.

Sub-dialog Name. The unique identifier for the sub-dialog. The Sub-dialog Name property is required.

Note: If you specify the Sub-dialog Name as an identifier in the Syntax Template--as in %%My Sub-dialog Name%%--it will be replaced at run-time with a blank-separated list of the syntax generated by each control in the sub-dialog, in the order in which they appear (top to bottom and left to right).

Title. Specifies the text to be displayed in the title bar of the sub-dialog box. The Title property is optional but recommended.

Help File. Specifies the path to an optional help file for the sub-dialog. This is the file that will be launched when the user clicks the Help button on the sub-dialog, and may be the same help file specified for the main dialog. Help files must be in HTML format. See the description of the Help File property for Dialog Properties for more information.

Syntax. Click the ellipsis (...) button to open the Syntax Template. See the topic Building the Syntax Template for more information.

Related Topics

Control Types
Source List
Target List
Filtering Variable Lists
Check Box
Combo Box and List Box Controls
Specifying List Items for Combo Boxes and List Boxes
Text Control
Number Control
Static Text Control
Item Group
Radio Group
Defining Radio Buttons
Check Box Group
File Browser
File Type Filter
Sub-dialog Button


Custom Dialogs for Extension Commands

Custom Dialog Builder,Custom Dialog Builder,Custom Dialog Builder
custom dialogs for extension commands,custom dialogs for extension commands,custom dialogs for extension commands
extension commands,extension commands,extension commands
custom dialogs,custom dialogs,custom dialogs

Extension commands are user-defined PASW Statistics commands that are implemented in either the Python programming language or R. Once deployed to an instance of PASW Statistics, an extension command is run in the same manner as any built-in PASW Statistics command.

You can use the Custom Dialog Builder to create dialogs for extension commands, and you can install custom dialogs for extension commands created by other users.

Creating Custom Dialogs for Extension Commands Collapse Hide details

Creating Custom Dialogs for Extension Commands

Whether an extension command was written by you or another user, you can create a custom dialog for it. The syntax template for the dialog should generate the command syntax for the extension command. If the custom dialog is only for your use, install the dialog. Assuming the extension command is already deployed on your system, you will be able to run the command from the installed dialog.

Show me

If you are creating a custom dialog for an extension command and wish to share it with other users, you should first save the specifications for the dialog to a custom dialog package (.spd) file. You'll then want to create an extension bundle containing the custom dialog package file, the XML file that specifies the syntax of the extension command, and the implementation code file(s) written in Python or R. The extension bundle is then what you share with other users. See the topic Working with Extension Bundles for more information.

Installing Extension Commands with Associated Custom Dialogs Collapse Hide details

Installing Extension Commands with Associated Custom Dialogs

An extension command with an associated custom dialog consists of three pieces: an XML file that specifies the syntax of the command; one or more code files (Python or R) that implement the command; and a custom dialog package file that contains the specifications for the custom dialog. If the extension command and its associated custom dialog are distributed in an extension bundle (.spe) file, then you can simply install the bundle from Utilities>Extension Bundles>Install Extension Bundle. Otherwise, you need to install the custom dialog and the extension command files separately as follows:

Custom Dialog Package File. Install the custom dialog package file from Utilities>Custom Dialogs>Install Custom Dialog.

XML Syntax Specification File and Implementation Code. For Windows and Linux, the XML file specifying the syntax of the extension command and the implementation code (Python or R) should be placed in the extensions directory under the PASW Statistics installation directory. For Mac, the XML and code files should be placed in the /Library/Application Support/SPSSInc/PASWStatistics/18/extensions directory.

• For Windows and Linux, If you do not have write permissions to the PASW Statistics installation directory or would like to store the XML file and the implementation code elsewhere, you can specify one or more alternate locations by defining the SPSS_EXTENSIONS_PATH environment variable. When present, the paths specified in SPSS_EXTENSIONS_PATH take precedence over the PASW Statistics installation directory. For multiple locations, separate each with a semicolon on Windows and a colon on Linux.

To create the SPSS_EXTENSIONS_PATH environment variable on Windows, follow the same general steps used to create the SPSS_CDIALOGS_PATH variable. See the section on Installing a Custom Dialog in Managing Custom Dialogs.

To view the current locations for custom dialogs, run the following command syntax: SHOW EXTPATHS.

• For an extension command implemented in Python, you can always store the associated Python module(s) to a location on the Python search path, such as the Python site-packages directory.

Related Topics

Creating and Managing Custom Dialogs
Custom Dialog Builder Layout
Building a Custom Dialog
Dialog Properties
Specifying the Menu Location for a Custom Dialog
Laying Out Controls on the Canvas
Building the Syntax Template
Previewing a Custom Dialog
Managing Custom Dialogs
Control Types
Creating Localized Versions of Custom Dialogs


Creating Localized Versions of Custom Dialogs

Custom Dialog Builder,Custom Dialog Builder,Custom Dialog Builder
localizing dialogs and help files,localizing dialogs and help files,localizing dialogs and help files

You can create localized versions of custom dialogs for any of the languages supported by PASW Statistics. You can localize any string that appears in a custom dialog and you can localize the optional help file.

To Localize Dialog Strings Collapse Hide details

To Localize Dialog Strings

Make a copy of the properties file associated with the dialog. The properties file contains all of the localizable strings associated with the dialog. By default, it is located in the ext/lib/<Dialog Name> folder of the PASW Statistics installation directory for Windows and Linux, and under the /Library/Application Support/SPSSInc/PASWStatistics/18/CustomDialogs/<Dialog Name> folder for Mac. The copy should reside in that same folder and not in a sub-folder.

If you have specified alternate locations for installed dialogs--using the SPSS_CDIALOGS_PATH environment variable--then the copy should reside in the <Dialog Name> folder at the appropriate alternate location. See the topic Managing Custom Dialogs for more information.

Rename the copy to <Dialog Name>_<language identifier>.properties, using the language identifiers in the table below. For example, if the dialog name is mydialog and you want to create a Japanese version of the dialog, then the localized properties file should be named mydialog_ja.properties. Localized properties files must be manually added to any custom dialog package files you create for the dialog. A custom dialog package file is simply a ZIP file that can be opened and modified with an application such as WinZip on Windows.

Open the new properties file with a text editor that supports UTF-8, such as Notepad on Windows, or the TextEdit application on Mac. Modify the values associated with any properties that need to be localized, but do not modify the names of the properties. Properties associated with a specific control are prefixed with the identifier for the control. For example, the ToolTip property for a control with the identifier options_button is options_button_tooltip_LABEL. Title properties are simply named <identifier>_LABEL, as in options_button_LABEL.

When the dialog is launched, PASW Statistics will search for a properties file whose language identifier matches the current language, as specified by the Language drop-down on the General tab in the Options dialog box. If no such properties file is found, the default file <Dialog Name>.properties will be used.

To Localize the Help File Collapse Hide details

To Localize the Help File

Make a copy of the help file associated with the dialog and localize the text for the desired language. The copy must reside in the same folder as the help file and not in a sub-folder. The help file should reside in the ext/lib/<Dialog Name> folder of the PASW Statistics installation directory for Windows and Linux, and under the /Library/Application Support/SPSSInc/PASWStatistics/18/CustomDialogs/<Dialog Name> folder for Mac.

If you have specified alternate locations for installed dialogs--using the SPSS_CDIALOGS_PATH environment variable--then the copy should reside in the <Dialog Name> folder at the appropriate alternate location. See the topic Managing Custom Dialogs for more information.

Rename the copy to <Help File>_<language identifier>, using the language identifiers in the table below. For example, if the help file is myhelp.htm and you want to create a German version of the file, then the localized help file should be named myhelp_de.htm. Localized help files must be manually added to any custom dialog package files you create for the dialog. A custom dialog package file is simply a ZIP file that can be opened and modified with an application such as WinZip on Windows.

If there are supplementary files such as image files that also need to be localized, you will need to manually modify the appropriate paths in the main help file to point to the localized versions, which should be stored along with the original versions.

When the dialog is launched, PASW Statistics will search for a help file whose language identifier matches the current language, as specified by the Language drop-down on the General tab in the Options dialog box. If no such help file is found, the help file specified for the dialog (the file specified in the Help File property of Dialog Properties) is used.

Language Identifiers Collapse Hide details

Language Identifiers

de | German
en | English
es | Spanish
fr | French
it | Italian
ja | Japanese
ko | Korean
pl | Polish
ru | Russian
zh_CN | Simplified Chinese
zh_TW | Traditional Chinese

Note: Text in custom dialogs and associated help files is not limited to the languages supported by PASW Statistics. You are free to write the dialog and help text in any language without creating language-specific properties and help files. All users of your dialog will then see the text in that language.

Related Topics

Creating and Managing Custom Dialogs
Custom Dialog Builder Layout
Building a Custom Dialog
Dialog Properties
Specifying the Menu Location for a Custom Dialog
Laying Out Controls on the Canvas
Building the Syntax Template
Previewing a Custom Dialog
Managing Custom Dialogs
Control Types
Custom Dialogs for Extension Commands


Production Jobs

Production jobs,Production jobs,Production jobs
Production jobs,Production jobs,Production jobs
output files,output files,output files
Production jobs,Production jobs,Production jobs
exporting charts,exporting charts,exporting charts
automated production,automated production,automated production
exporting charts,exporting charts,exporting charts
automated production,automated production,automated production
exporting charts,exporting charts,exporting charts
Production jobs,Production jobs,Production jobs
command syntax,command syntax,command syntax
Production jobs rules,Production jobs rules,Production jobs rules
Production jobs,Production jobs,Production jobs
syntax rules,syntax rules,syntax rules
syntax,syntax,syntax
Production jobs rules,Production jobs rules,Production jobs rules
command syntax,command syntax,command syntax
Production jobs,Production jobs,Production jobs
syntax,syntax,syntax

Production jobs provide the ability to run PASW Statistics in an automated fashion. The program runs unattended and terminates after executing the last command, so you can perform other tasks while it runs or schedule the production job to run automatically at scheduled times. Production jobs are useful if you often run the same set of time-consuming analyses, such as weekly reports.

Production jobs use command syntax files to tell PASW Statistics what to do. A command syntax file is a simple text file containing command syntax. You can use any text editor to create the file. You can also generate command syntax by pasting dialog box selections into a syntax window or by editing the journal file. See the topic Working with Command Syntax for more information.

To create a production job:

From the menus in any window choose:

Utilities
Production Job

Click New to create a new production job or Open to open an existing production job.

Note: Production Facility job files (.spp) created in releases prior to 16.0 will not run in release 16.0 or later. A conversion utility is available to convert Windows and Macintosh Production Facility job files to production jobs (.spj). See the topic Converting Production Facility Files for more information.

Select one or more command syntax files.

Select the output file name, location, and format.

Click Save or Save As to save the production job.

Syntax format. Controls the form of the syntax rules used for the job.

• Interactive. Each command must end with a period. Periods can appear anywhere within the command, and commands can continue on multiple lines, but a period as the last nonblank character on a line is interpreted as the end of the command. Continuation lines and new commands can start anywhere on a new line. These are the "interactive" rules in effect when you select and run commands in a syntax window.

• Batch. Each command must start at the beginning of a new line (no blank spaces before the start of the command), and continuation lines must be indented at least one space. If you want to indent new commands, you can use a plus sign, dash, or period as the first character at the start of the line and then indent the actual command. The period at the end of the command is optional. This setting is compatible with the syntax rules for command files included with the INCLUDE command.

Note: Do not use the Batch option if your syntax files contain GGRAPH command syntax that includes GPL statements. GPL statements will only run under interactive rules.

See the topic Running Commands for more information.

Error Processing. Controls the treatment of error conditions in the job.

• Continue processing after errors. Errors in the job do not automatically stop command processing. The commands in the production job files are treated as part of the normal command stream, and command processing continues in the normal fashion.

• Stop processing immediately. Command processing stops when the first error in a production job file is encountered. This is compatible with the behavior of command files included with the INCLUDE command.

Output. Controls the name, location, and format of the production job results. The following format options are available:

• Viewer file to disk (.spv). Results are saved in PASW Statistics Viewer format in the specified file location.

• Viewer file (.spv) to PES Repository. This requires the Adaptor for Enterprise Services option.

• Web Reports (.spw) to PES Repository. This requires the Adaptor for Enterprise Services option.

• Word/RTF (*.doc). Pivot tables are exported as Word tables with all formatting attributes intact--for example, cell borders, font styles, and background colors. Text output is exported as formatted RTF. Charts, tree diagrams, and model views are included in PNG format.

Note: Microsoft Word may not display extremely wide tables properly.

• Excel (*.xls). Pivot table rows, columns, and cells are exported as Excel rows, columns, and cells, with all formatting attributes intact--for example, cell borders, font styles, and background colors. Text output is exported with all font attributes intact. Each line in the text output is a row in the Excel file, with the entire contents of the line contained in a single cell. Charts, tree diagrams, and model views are included in PNG format.

• HTML (*.htm). Pivot tables are exported as HTML tables. Text output is exported as preformatted HTML. Charts, tree diagrams, and model views are embedded by reference, and you should export charts in a suitable format for inclusion in HTML documents (for example, PNG and JPEG).

• Portable Document Format (*.pdf). All output is exported as it appears in Print Preview, with all formatting attributes intact.

• PowerPoint file (*.ppt). Pivot tables are exported as Word tables and are embedded on separate slides in the PowerPoint file, with one slide for each pivot table. All formatting attributes of the pivot table are retained--for example, cell borders, font styles, and background colors. Charts, tree diagrams, and model views are exported in TIFF format. Text output is not included.

Export to PowerPoint is available only on Windows operating systems.

• Text (*.txt). Text output formats include plain text, UTF-8, and UTF-16. Pivot tables can be exported in tab-separated or space-separated format. All text output is exported in space-separated format. For charts, tree diagrams, and model views, a line is inserted in the text file for each graphic, indicating the image filename.

Print Viewer file on completion. Sends the final Viewer output file to the printer on completion of the production job.

Run Job. This runs the production job in a separate session. This is particularly useful for testing new production jobs before deploying them.

Production Jobs with OUTPUT Commands Collapse Hide details

Production Jobs with OUTPUT Commands

Production jobs honor OUTPUT commands, such as OUTPUT SAVE, OUTPUT ACTIVATE, and OUTPUT NEW. OUTPUT SAVE commands executed during the course of a production job will write the contents of the specified output documents to the specified locations. This is in addition to the output file created by the production job. When using OUTPUT NEW to create a new output document, it is recommended that you explicitly save it with the OUTPUT SAVE command.

A production job output file consists of the contents of the active output document as of the end of the job. For jobs containing OUTPUT commands, the output file may not contain all output created in the session. For example, suppose the production job consists of a number of procedures followed by an OUTPUT NEW command, followed by more procedures but no more OUTPUT commands. The OUTPUT NEW command defines a new active output document. At the end of the production job, it will contain output from only the procedures executed after the OUTPUT NEW command.

Related Topics

HTML Options (Production Jobs)
PowerPoint Options (Production Jobs)
PDF Options(Production Jobs)
Text Options(Production Jobs)
Runtime Values
User Prompts
Running Production Jobs from a Command Line
Converting Production Facility Files


HTML Options (Production Jobs)

Table Options. No table options are available for HTML format. All pivot tables are converted to HTML tables.

Image Options. The available image types are: EPS, JPEG, TIFF, PNG, and BMP. On Windows operating systems, EMF (enhanced metafile) format is also available. You can also scale the image size from 1% to 200%.

Related Topics

Production Jobs
PowerPoint Options (Production Jobs)
PDF Options(Production Jobs)
Text Options(Production Jobs)
Runtime Values
User Prompts
Running Production Jobs from a Command Line
Converting Production Facility Files


PowerPoint Options (Production Jobs)

Table Options. You can use the Viewer outline entries as slide titles. Each slide contains a single output item. The title is formed from the outline entry for the item in the outline pane of the Viewer.

Image Options. You can scale the image size from 1% to 200%. (All images are exported to PowerPoint in TIFF format.)

Note: PowerPoint format is only available on Windows operating systems and requires PowerPoint 97 or later.

Related Topics

Production Jobs
HTML Options (Production Jobs)
PDF Options(Production Jobs)
Text Options(Production Jobs)
Runtime Values
User Prompts
Running Production Jobs from a Command Line
Converting Production Facility Files


PDF Options(Production Jobs)

Embed bookmarks. This option includes bookmarks in the PDF document that correspond to the Viewer outline entries. Like the Viewer outline pane, bookmarks can make it much easier to navigate documents with a large number of output objects.

Embed fonts. Embedding fonts ensures that the PDF document will look the same on all computers. Otherwise, if some fonts used in the document are not available on the computer being used to view (or print) the PDF document, font substitution may yield suboptimal results.

Related Topics

Production Jobs
HTML Options (Production Jobs)
PowerPoint Options (Production Jobs)
Text Options(Production Jobs)
Runtime Values
User Prompts
Running Production Jobs from a Command Line
Converting Production Facility Files


Text Options(Production Jobs)

Table Options. Pivot tables can be exported in tab-separated or space-separated format. For space-separated format, you can also control:

• Column Width. Autofit does not wrap any column contents, and each column is as wide as the widest label or value in that column. Custom sets a maximum column width that is applied to all columns in the table, and values that exceed that width wrap onto the next line in that column.

• Row/Column Border Character. Controls the characters used to create row and column borders. To suppress display of row and column borders, enter blank spaces for the values.

Image Options. The available image types are: EPS, JPEG, TIFF, PNG, and BMP. On Windows operating systems, EMF (enhanced metafile) format is also available. You can also scale the image size from 1% to 200%.

Related Topics

Production Jobs
HTML Options (Production Jobs)
PowerPoint Options (Production Jobs)
PDF Options(Production Jobs)
Runtime Values
User Prompts
Running Production Jobs from a Command Line
Converting Production Facility Files


Runtime Values

Production jobs,Production jobs,Production jobs
substituting values in syntax files,substituting values in syntax files,substituting values in syntax files
Production jobs,Production jobs,Production jobs

Runtime values defined in a production job file and used in a command syntax file simplify tasks such as running the same analysis for different data files or running the same set of commands for different sets of variables. For example, you could define the runtime value @datafile to prompt you for a data filename each time you run a production job that uses the string @datafile in place of a filename in the command syntax file.

Symbol. The string in the command syntax file that triggers the production job to prompt the user for a value. The symbol name must begin with an @ sign and must conform to variable naming rules. See the topic Variable Names for more information.

Default Value. The value that the production job supplies by default if you don't enter a different value. This value is displayed when the production job prompts you for information. You can replace or modify the value at runtime. If you don't provide a default value, don't use the silent keyword when running the production job with command line switches, unless you also use the -symbol switch to specify runtime values. See the topic Running Production Jobs from a Command Line for more information.

User Prompt. The descriptive label that is displayed when the production job prompts you to enter information. For example, you could use the phrase "What data file do you want to use?" to identify a field that requires a data filename.

Quote Value. Encloses the default value or the value entered by the user in quotes. For example, file specifications should be enclosed in quotes.

Runtime symbols in a command syntax file

Related Topics

Production Jobs
HTML Options (Production Jobs)
PowerPoint Options (Production Jobs)
PDF Options(Production Jobs)
Text Options(Production Jobs)
User Prompts
Running Production Jobs from a Command Line
Converting Production Facility Files


User Prompts

Production jobs,Production jobs,Production jobs

A production job prompts you for values whenever you run a production job that contains defined runtime symbols. You can replace or modify the default values that are displayed. Those values are then substituted for the runtime symbols in all command syntax files associated with the production job.

Related Topics

Production Jobs
HTML Options (Production Jobs)
PowerPoint Options (Production Jobs)
PDF Options(Production Jobs)
Text Options(Production Jobs)
Runtime Values
Running Production Jobs from a Command Line
Converting Production Facility Files


Running Production Jobs from a Command Line

Production jobs,Production jobs,Production jobs
command line switches,command line switches,command line switches
Production jobs,Production jobs,Production jobs
scheduling production jobs,scheduling production jobs,scheduling production jobs
Production jobs,Production jobs,Production jobs
command line switches,command line switches,command line switches
Production jobs,Production jobs,Production jobs
command line switches,command line switches,command line switches
Production jobs,Production jobs,Production jobs
running multiple production jobs,running multiple production jobs,running multiple production jobs

Command line switches enable you to schedule production jobs to run automatically at certain times, using scheduling utilities available on your operating system. The basic form of the command line argument is:

paswstat filename.spj -production

Depending on how you invoke the production job, you may need to include directory paths for the paswstat executable file (located in the directory in which the application is installed) and/or the production job file.

You can run production jobs from a command line with the following switches:

-production [prompt|silent]. Start the application in production mode. The prompt and silent keywords specify whether to display the dialog box that prompts for runtime values if they are specified in the job. The prompt keyword is the default and shows the dialog box. The silent keyword suppresses the dialog box. If you use the silent keyword, you can define the runtime symbols with the -symbol switch. Otherwise, the default value is used. The -switchserver and -singleseat switches are ignored when using the -production switch.

-symbol <values>. List of symbol-value pairs used in the production job. Each symbol name starts with @. Values that contain spaces should be enclosed in quotes. Rules for including quotes or apostrophes in string literals may vary across operating systems, but enclosing a string that includes single quotes or apostrophes in double quotes usually works (for example, “'a quoted value'”).

To run production jobs on a remote server in distributed analysis mode, you also need to specify the server login information:

-server <inet:hostname:port>. The name or IP address and port number of the server. Windows only.

-user <name>. A valid user name. If a domain name is required, precede the user name with the domain name and a backslash (\). Windows only.

-password <password>. The user's password. Windows only.

For a complete list of command line switches, see Command Line Options.

Example

paswstat \production_jobs\prodjob1.spj -production silent -symbol @datafile /data/July_data.sav

• This example assumes that you are running the command line from the installation directory, so no path is required for the paswstat executable file.

• This example also assumes that the production job specifies that the value for @datafile should be quoted (Quote Value checkbox on the Runtime Values tab), so no quotes are necessary when specifying the data file on the command line. Otherwise, you would need to specify something like "'/data/July_data.sav'" to include quotes with the data file specification, since file specifications should be quoted in command syntax.

• The directory path for the location of the production job uses the Windows back slash convention. On Macintosh and Linux, use forward slashes. The forward slashes in the quoted data file specification will work on all operating systems since this quoted string is inserted into the command syntax file and forward slashes are acceptable in commands that include file specifications (for example, GET FILE, GET DATA, SAVE) on all operating systems.

• The silent keyword suppresses any user prompts in the production job, and the -symbol switch inserts the quoted data file name and location wherever the runtime symbol @datafile appears in the command syntax files included in the production job.

Related Topics

Production Jobs
HTML Options (Production Jobs)
PowerPoint Options (Production Jobs)
PDF Options(Production Jobs)
Text Options(Production Jobs)
Runtime Values
User Prompts
Converting Production Facility Files


Converting Production Facility Files

Production Facility,Production Facility,Production Facility
converting files to production jobs,converting files to production jobs,converting files to production jobs
Production jobs,Production jobs,Production jobs
converting Production Facility files,converting Production Facility files,converting Production Facility files
spp files,spp files,spp files
converting to spj files,converting to spj files,converting to spj files

Production Facility job files (.spp) created in releases prior to 16.0 will not run in release 16.0 or later. For Windows and Macintosh Production Facility job files created in earlier releases, you can use prodconvert, located in the installation directory, to convert those files to new production job files (.spj). Run prodconvert from a command window using the following specifications:

[installpath]\prodconvert [filepath]\filename.spp

where [installpath] is the location of the folder in which PASW Statistics is installed and [filepath] is the location of the folder where the original production job file. A new file with the same name but with the extension .spj is created in the same folder as the original file. (Note: If the path contains spaces, enclose each path and file specification in double quotes. On Macintosh operating systems, use forward slashes instead on back slashes.)

Limitations

• WMF and EMF chart formats are not supported. PNG format is used in place of these formats.

• The export options Output Document (No Charts), Charts Only, and Nothing are not supported. All output objects supported by the selected format are included.

• Remote server settings are ignored. To specify remote server settings for distributed analysis, you need to run the production job from a command line, using command line switches to specify the server settings. See the topic Running Production Jobs from a Command Line for more information.

• Publish to Web settings are ignored.

Related Topics

Production Jobs
HTML Options (Production Jobs)
PowerPoint Options (Production Jobs)
PDF Options(Production Jobs)
Text Options(Production Jobs)
Runtime Values
User Prompts
Running Production Jobs from a Command Line


Output Management System

OMS,OMS,OMS
Output Management System (OMS),Output Management System (OMS),Output Management System (OMS)
data files,data files,data files
saving output as PASW Statistics data files,saving output as PASW Statistics data files,saving output as PASW Statistics data files
XML,XML,XML
saving output as XML,saving output as XML,saving output as XML
exporting output,exporting output,exporting output
OMS,OMS,OMS

The Output Management System (OMS) provides the ability to automatically write selected categories of output to different output files in different formats. Formats include: Word, Excel, PDF, PASW Statistics data file format (.sav), Viewer file format (.spv), web report format (.spw), XML, HTML, and text. See the topic OMS Options for more information.

To Use the Output Management System Control Panel

From the menus choose:

Utilities
OMS Control Panel...

You can use the control panel to start and stop the routing of output to various destinations.

• Each OMS request remains active until explicitly ended or until the end of the session.

• A destination file that is specified on an OMS request is unavailable to other procedures and other applications until the OMS request is ended.

• While an OMS request is active, the specified destination files are stored in memory (RAM), so active OMS requests that write a large amount of output to external files may consume a large amount of memory.

• Multiple OMS requests are independent of each other. The same output can be routed to different locations in different formats, based on the specifications in different OMS requests.

• The order of the output objects in any particular destination is the order in which they were created, which is determined by the order and operation of the procedures that generate the output.

Adding New OMS Requests Collapse Hide details

To Add New OMS Requests

Select the output types (tables, charts, etc.) that you want to include. See the topic Output Object Types for more information.

Select the commands to include. If you want to include all output, select all items in the list. See the topic Command Identifiers and Table Subtypes for more information.

For commands that produce pivot table output, select the specific table types to include.

The list displays only the tables that are available in the selected commands; any table type that is available in one or more of the selected commands is displayed in the list. If no commands are selected, all table types are displayed. See the topic Command Identifiers and Table Subtypes for more information.

To select tables based on text labels instead of subtypes, click Labels. See the topic Labels for more information.

Click Options to specify the output format (for example, PASW Statistics data file, XML, or HTML). By default, Output XML format is used. See the topic OMS Options for more information.

Specify an output destination:

• File. All selected output is routed to a single file.

• Based on object names. Output is routed to multiple destination files based on object names. A separate file is created for each output object, with a filename based on either table subtype names or table labels. Enter the destination folder name.

• New dataset. For PASW Statistics data file format output, you can route the output to a dataset. The dataset is available for subsequent use in the same session but is not saved unless you explicitly save it as a file prior to the end of the session. This option is available only for PASW Statistics data file format output. Dataset names must conform to variable-naming rules. See the topic Variable Names for more information.

Optionally:

• Exclude the selected output from the Viewer. If you select Exclude from Viewer, the output types in the OMS request will not be displayed in the Viewer window. If multiple active OMS requests include the same output types, the display of those output types in the Viewer is determined by the most recent OMS request that contains those output types. See the topic Excluding Output Display from the Viewer for more information.

• Assign an ID string to the request. All requests are automatically assigned an ID value, and you can override the system default ID string with a descriptive ID, which can be useful if you have multiple active requests that you want to identify easily. ID values that you assign cannot start with a dollar sign ($).

Tips for selecting multiple items in a list Collapse Hide details

The following tips are for selecting multiple items in a list:

• Press Ctrl+A to select all items in a list.

• Use Shift+click to select multiple contiguous items.

• Use Ctrl+click to select multiple noncontiguous items.

Ending and Deleting OMS Requests Collapse Hide details

To End and Delete OMS Requests

Active and new OMS requests are displayed in the Requests list, with the most recent request at the top. You can change the widths of the information columns by clicking and dragging the borders, and you can scroll the list horizontally to see more information about a particular request.

An asterisk (*) after the word Active in the Status column indicates an OMS request that was created with command syntax that includes features that are not available in the Control Panel. See the topic OMS for more information.

To end a specific, active OMS request:

In the Requests list, click any cell in the row for the request.

Click End.

To end all active OMS requests:

Click End All.

To delete a new request (a request that has been added but is not yet active):

In the Requests list, click any cell in the row for the request.

Click Delete.

Note: Active OMS requests are not ended until you click OK.

Related Topics

Routing Output to PASW Statistics Data Files
OXML Table Structure
OMS Identifiers
Copying OMS Identifiers from the Viewer Outline
Using Output as Input with OMS
Output XML Schema
Output Object Types
Command Identifiers and Table Subtypes
Labels
OMS Options
Excluding Output Display from the Viewer
Transforming OXML with XSLT
OMS
OMSEND
OMSINFO
OMSLOG


Output Object Types

OMS,OMS,OMS
output object types,output object types,output object types
output object types,output object types,output object types
in OMS,in OMS,in OMS

There are different types of output objects:

Charts. This includes charts created with the Chart Builder, charting procedures, and charts created by statistical procedures (for example, a bar chart created by the Frequencies procedure).

Headings. Text objects that are labeled Title in the outline pane of the Viewer. Heading text objects are not included with Output XML format.

Logs. Log text objects. Log objects contain certain types of error and warning messages. Depending on your Options settings (Edit menu, Options, Viewer tab), log objects may also contain the command syntax that is executed during the session. Log objects are labeled Log in the outline pane of the Viewer.

Models. Output objects displayed in the Model Viewer. A single model object can contain multiple views of the model, including both tables and charts.

Tables. Output objects that are pivot tables in the Viewer (includes Notes tables). Tables are the only output objects that can be routed to PASW Statistics data file (.sav) format.

Texts. Text objects that aren't logs or headings (includes objects labeled Text Output in the outline pane of the Viewer).

Trees. Tree model diagrams that are produced by the Decision Tree option.

Warnings. Warning objects contain certain types of error and warning messages.

Output object types

Related Topics

Output Management System
Command Identifiers and Table Subtypes
Labels
OMS Options
Excluding Output Display from the Viewer
Routing Output to PASW Statistics Data Files
OXML Table Structure


Command Identifiers and Table Subtypes

OMS,OMS,OMS
command identifiers,command identifiers,command identifiers
table subtypes,table subtypes,table subtypes
command identifiers,command identifiers,command identifiers
subtypes,subtypes,subtypes
table subtypes,table subtypes,table subtypes

Command Identifiers

Command identifiers are available for all statistical and charting procedures and any other commands that produce blocks of output with their own identifiable heading in the outline pane of the Viewer. These identifiers are usually (but not always) the same or similar to the procedure names on the menus and dialog box titles, which are usually (but not always) similar to the underlying command names. For example, the command identifier for the Frequencies procedure is "Frequencies," and the underlying command name is also the same.

There are, however, some cases where the procedure name and the command identifier and/or the command name are not all that similar. For example, all of the procedures on the Nonparametric Tests submenu (from the Analyze menu) use the same underlying command, and the command identifier is the same as the underlying command name: Npar Tests.

Table Subtypes

Table subtypes are the different types of pivot tables that can be produced. Some subtypes are produced by only one command; other subtypes can be produced by multiple commands (although the tables may not look similar). Although table subtype names are generally descriptive, there can be many names to choose from (particularly if you have selected a large number of commands); also, two subtypes may have very similar names.

To Find Command Identifiers and Table Subtypes

When in doubt, you can find command identifiers and table subtype names in the Viewer window:

Run the procedure to generate some output in the Viewer.

Right-click the item in the outline pane of the Viewer.

Choose Copy OMS Command Identifier or Copy OMS Table Subtype.

Paste the copied command identifier or table subtype name into any text editor (such as a Syntax Editor window).

Related Topics

Output Management System
Output Object Types
Labels
OMS Options
Excluding Output Display from the Viewer
Routing Output to PASW Statistics Data Files
OXML Table Structure


Labels

table subtypes,table subtypes,table subtypes
vs. labels,vs. labels,vs. labels
subtypes,subtypes,subtypes
vs. labels,vs. labels,vs. labels
labels,labels,labels
vs. subtype names in OMS,vs. subtype names in OMS,vs. subtype names in OMS

As an alternative to table subtype names, (See the topic Command Identifiers and Table Subtypes for more information. ) you can select tables based on the text that is displayed in the outline pane of the Viewer. You can also select other object types based on their labels. Labels are useful for differentiating between multiple tables of the same type in which the outline text reflects some attribute of the particular output object, such as the variable names or labels. There are, however, a number of factors that can affect the label text:

• If split-file processing is on, split-file group identification may be appended to the label.

• Labels that include information about variables or values are affected by your current output label options settings (Edit menu, Options, Output Labels tab).

• Labels are affected by the current output language setting (Edit menu, Options, General tab).

To Specify Labels to Use to Identify Output Objects

From the menus choose:

Utilities
OMS Control Panel...

In the Output Management System Control Panel, select one or more output types and then select one or more commands.

Click Labels.

Enter the label exactly as it appears in the outline pane of the Viewer window. (You can also right-click the item in the outline, choose Copy OMS Label, and paste the copied label into the Label text field.)

Click Add.

Repeat the process for each label that you want to include.

Click Continue.

Wildcards

You can use an asterisk (*) as the last character of the label string as a wildcard character. All labels that begin with the specified string (except for the asterisk) will be selected. This process works only when the asterisk is the last character, because asterisks can appear as valid characters inside a label.

Related Topics

Output Management System
Output Object Types
Command Identifiers and Table Subtypes
OMS Options
Excluding Output Display from the Viewer
Routing Output to PASW Statistics Data Files
OXML Table Structure


OMS Options

OMS,OMS,OMS
XML,XML,XML
PASW Statistics data file format,PASW Statistics data file format,PASW Statistics data file format
SAV file format,SAV file format,SAV file format
text format,text format,text format
Word format,Word format,Word format
Excel format,Excel format,Excel format
PDF format,PDF format,PDF format
controlling table pivots,controlling table pivots,controlling table pivots
XML,XML,XML
routing output to XML,routing output to XML,routing output to XML
PASW Statistics data file format,PASW Statistics data file format,PASW Statistics data file format
routing output to a data file,routing output to a data file,routing output to a data file
SAV file format,SAV file format,SAV file format
routing output to PASW Statistics data file,routing output to PASW Statistics data file,routing output to PASW Statistics data file
exporting output,exporting output,exporting output
text format,text format,text format
Word format,Word format,Word format
Excel format,Excel format,Excel format
PDF format,PDF format,PDF format
text,text,text
exporting output as text,exporting output as text,exporting output as text
Word format,Word format,Word format
exporting output,exporting output,exporting output
Excel format,Excel format,Excel format
exporting output,exporting output,exporting output
PDF format,PDF format,PDF format
exporting output,exporting output,exporting output

You can use the OMS Options dialog box to:

• Specify the output format.

• Specify the image format (for HTML and Output XML output formats).

• Specify what table dimension elements should go into the row dimension.

• Include a variable that identifies the sequential table number that is the source for each case (for PASW Statistics data file format).

How to specify OMS options Collapse Hide details

To Specify OMS Options

From the menus choose:

Utilities
OMS Control Panel...

Click Options.

Format Collapse Hide details

Format

Excel. Excel 97-2003 format. Pivot table rows, columns, and cells are exported as Excel rows, columns, and cells, with all formatting attributes intact -- for example, cell borders, font styles, and background colors. Text output is exported with all font attributes intact. Each line in the text output is a row in the Excel file, with the entire contents of the line contained in a single cell. Charts, tree diagrams, and model views are included in PNG format.

HTML. Output objects that would be pivot tables in the Viewer are converted to simple HTML tables. No TableLook attributes (font characteristics, border styles, colors, etc.) are supported. Text output objects are tagged <PRE> in the HTML. Charts, tree diagrams, and model views are exported as separate files in the selected graphics format and are embedded by reference. Image file names use the HTML file name as the root name, followed by a sequential integer, starting with 0.

Output XML. XML that conforms to the spss-output schema. See the topic Output XML Schema for more information.

PDF. Output is exported as it would appear in Print Preview, with all formatting attributes intact. The PDF file includes bookmarks that correspond to the entries in the Viewer outline pane.

PASW Statistics Data File. This format is a binary file format. All output object types other than tables are excluded. Each column of a table becomes a variable in the data file. To use a data file that is created with OMS in the same session, you must end the active OMS request before you can open the data file. See the topic Routing Output to PASW Statistics Data Files for more information.

Text. Space-separated text. Output is written as text, with tabular output aligned with spaces for fixed-pitch fonts. Charts, tree diagrams, and model views are excluded.

Tabbed Text. Tab-delimited text. For output that is displayed as pivot tables in the Viewer, tabs delimit table column elements. Text block lines are written as is; no attempt is made to divide them with tabs at useful places. Charts, tree diagrams, and model views are excluded.

Viewer File. This is the same format used when you save the contents of a Viewer window.

Web Report File. This output file format is designed for use with Predictive Enterprise Services. It is essentially the same as the PASW Statistics Viewer format except that tree diagrams are saved as static images.

Word/RTF. Pivot tables are exported as Word tables with all formatting attributes intact--for example, cell borders, font styles, and background colors. Text output is exported as formatted RTF. Charts, tree diagrams, and model views are included in PNG format.

Graphics Collapse Hide details

Graphics Images

For HTML and Output XML formats, you can include charts, tree diagrams, and model views as image files. A separate image file is created for each chart and/or tree.

• For HTML document format, standard <IMG SRC='filename'> tags are included in the HTML document for each image file.

• For Output XML document format, the XML file contains a chart element with an ImageFile attribute of the general form <chart imageFile="filepath/filename"/> for each image file.

• Image files are saved in a separate subdirectory (folder). The subdirectory name is the name of the destination file, without any extension and with _files appended to the end. For example, if the destination file is julydata.htm, the images subdirectory will be named julydata_files.

Format. The available image formats are PNG, JPG, EMF, BMP, and VML.

• EMF (enhanced metafile) format is available only on Windows operating systems.

• VML image format is available only for HTML document format.

• VML image format does not create separate image files. The VML code that renders the image is embedded in the HTML.

• VML image format does not include tree diagrams.

Size. You can scale the image size from 10% to 200%.

Include Imagemaps. For HTML document format, this option creates image map ToolTips that display information for some chart elements, such as the value of the selected point on a line chart or bar on a bar chart.

Table Pivots Collapse Hide details

Table Pivots

For pivot table output, you can specify the dimension element(s) that should appear in the columns. All other dimension elements appear in the rows. For PASW Statistics data file format, table columns become variables, and rows become cases.

• If you specify multiple dimension elements for the columns, they are nested in the columns in the order in which they are listed. For PASW Statistics data file format, variable names are constructed by nested column elements. See the topic Variable Names in OMS-Generated Data Files for more information.

• If a table doesn't contain any of the listed dimension elements, all dimension elements for that table will appear in the rows.

• Table pivots that are specified here have no effect on tables that are displayed in the Viewer.

Each dimension of a table--row, column, layer--may contain zero or more elements. For example, a simple two-dimensional crosstabulation contains a single row dimension element and a single column dimension element, each of which contains one of the variables that are used in the table. You can use either positional arguments or dimension element "names" to specify the dimension elements that you want to put into the column dimension.

All dimensions in rows. Creates a single row for each table. For PASW Statistics format data files, this means each table is a single case, and all the table elements are variables.

List of positions. The general form of a positional argument is a letter indicating the default position of the element--C for column, R for row, or L for layer--followed by a positive integer indicating the default position within that dimension. For example, R1 would indicate the outermost row dimension element.

• To specify multiple elements from multiple dimensions, separate each dimension with a space—for example, R1 C2.

• The dimension letter followed by ALL indicates all elements in that dimension in their default order. For example, CALL is the same as the default behavior (using all column elements in their default order to create columns).

• CALL RALL LALL (or RALL CALL LALL, and so on) will put all dimension elements into the columns. For PASW Statistics data file format, this creates one row/case per table in the data file.

List of dimension names. As an alternative to positional arguments, you can use dimension element "names," which are the text labels that appear in the table. For example, a simple two-dimensional crosstabulation contains a single row dimension element and a single column dimension element, each with labels based on the variables in those dimensions, plus a single layer dimension element labeled Statistics (if English is the output language).

• Dimension element names may vary, based on the output language and/or settings that affect the display of variable names and/or labels in tables.

• Each dimension element name must be enclosed in single or double quotation marks. To specify multiple dimension element names, include a space between each quoted name.

The labels that are associated with the dimension elements may not always be obvious.

To See All Dimension Elements and Their Labels for a Pivot Table

Activate (double-click) the table in the Viewer.

From the menus choose:

View
Show All

and/or

If the pivoting trays aren't displayed, from the menus choose:

Pivot
Pivoting Trays

The element labels are dispalyed in the pivoting trays.

Related Topics

Output Management System
Output Object Types
Command Identifiers and Table Subtypes
Labels
Excluding Output Display from the Viewer
Routing Output to PASW Statistics Data Files
OXML Table Structure


Logging

You can record OMS activity in a log in XML or text format.

• The log tracks all new OMS requests for the session but does not include OMS requests that were already active before you requested a log.

• The current log file ends if you specify a new log file or if you deselect (uncheck) Log OMS activity.

How to specify OMS logging Collapse Hide details

To specify OMS logging:

From the menus choose:

Utilities
OMS Control Panel...

Click Logging.

Related Topics

OMSLOG


Excluding Output Display from the Viewer

OMS,OMS,OMS
excluding output from the Viewer,excluding output from the Viewer,excluding output from the Viewer
Viewer,Viewer,Viewer
excluding output types with OMS,excluding output types with OMS,excluding output types with OMS
excluding output from Viewer with OMS,excluding output from Viewer with OMS,excluding output from Viewer with OMS
hiding (excluding) output from the Viewer with OMS,hiding (excluding) output from the Viewer with OMS,hiding (excluding) output from the Viewer with OMS

The Exclude from Viewer check box in the Output Management System Control Panel affects all output that is selected in the OMS request by suppressing the display of that output in the Viewer window. This process is often useful for production jobs that generate a lot of output and when you don't need the results in the form of a Viewer document (.spv file). You can also use this functionality to suppress the display of particular output objects that you simply never want to see, without routing any other output to some external file and format.

To suppress the display of certain output objects without routing other output to an external file:

From the menus choose:

Utilities
OMS Control Panel...

Create an OMS request that identifies the unwanted output.

Select Exclude from Viewer.

For the output destination, select File--but leave the File field blank.

Click Add.

The selected output will be excluded from the Viewer while all other output will be displayed in the Viewer in the normal fashion.

Note: This setting has no effect on OMS output saved to external formats or files, including the Viewer SPV and SPW formats. It also has no effect on output saved to SPV format in a batch job executed with the Batch Facility (available with PASW Statistics Server).

Related Topics

Output Management System
Output Object Types
Command Identifiers and Table Subtypes
Labels
OMS Options
Routing Output to PASW Statistics Data Files
OXML Table Structure


Routing Output to PASW Statistics Data Files

PASW Statistics data file format,PASW Statistics data file format,PASW Statistics data file format
routing output to a data file,routing output to a data file,routing output to a data file
SAV file format,SAV file format,SAV file format
routing output to PASW Statistics data files,routing output to PASW Statistics data files,routing output to PASW Statistics data files
OMS,OMS,OMS
PASW Statistics data file format,PASW Statistics data file format,PASW Statistics data file format
SAV file format,SAV file format,SAV file format

A data file in PASW Statistics format consists of variables in the columns and cases in the rows, which is essentially the format in which pivot tables are converted to data files:

• Columns in the table are variables in the data file. Valid variable names are constructed from the column labels.

• Row labels in the table become variables with generic variable names (Var1, Var2, Var3, and so on) in the data file. The values of these variables are the row labels in the table.

• Three table-identifier variables are automatically included in the data file: Command_, Subtype_, and Label_. All three are string variables. The first two variables correspond to the command and subtype identifiers. See the topic Command Identifiers and Table Subtypes for more information. Label_ contains the table title text.

• Rows in the table become cases in the data file.

The following topics show a number of basic examples of PASW Statistics data files generated from pivot tables:

• Single Two-Dimensional Table

• Table with Layers

• Multiple Tables

• Controlling Column Elements to Control Variables in the Data File

Related Topics

Output Management System
Output Object Types
Command Identifiers and Table Subtypes
Labels
OMS Options
Excluding Output Display from the Viewer
OXML Table Structure
OMS Identifiers
Copying OMS Identifiers from the Viewer Outline
Using Output as Input with OMS
Output XML Schema
Example: Single Two-Dimensional Table
Example: Tables with Layers
Data Files Created from Multiple Tables
Controlling Column Elements to Control Variables in the Data File
Variable Names in OMS-Generated Data Files
Adding Group Percentile Values to a Data File
Bootstrapping with OMS


Example: Single Two-Dimensional Table

In the simplest case--a single two-dimensional table--the table columns become variables, and the rows become cases in the data file.

Single two-dimensional table

• The first three variables identify the source table by command, subtype, and label.

• The two elements that defined the rows in the table--values of the variable Gender and statistical measures—are assigned the generic variable names Var1 and Var2. These variables are both string variables.

• The column labels from the table are used to create valid variable names. In this case, those variable names are based on the variable labels of the three scale variables that are summarized in the table. If the variables didn't have defined variable labels, or you chose to display variable names instead of variable labels as the column labels in the table, the variable names in the new data file would be the same as in the source data file.

Related Topics

Routing Output to PASW Statistics Data Files
Example: Tables with Layers
Data Files Created from Multiple Tables
Controlling Column Elements to Control Variables in the Data File
Variable Names in OMS-Generated Data Files
Using Output as Input with OMS
Adding Group Percentile Values to a Data File
Bootstrapping with OMS


Example: Tables with Layers

In addition to rows and columns, a table can also contain a third dimension: the layer dimension.

Table with layers

• In the table, the variable labeled Minority Classification defines the layers. In the data file, two additional variables are created: one variable that identifies the layer element and one variable that identifies the categories of the layer element.

• As with the variables that are created from the row elements, the variables that are created from the layer elements are string variables with generic variable names (the prefix Var followed by a sequential number).

Related Topics

Routing Output to PASW Statistics Data Files
Example: Single Two-Dimensional Table
Data Files Created from Multiple Tables
Controlling Column Elements to Control Variables in the Data File
Variable Names in OMS-Generated Data Files
Using Output as Input with OMS
Adding Group Percentile Values to a Data File
Bootstrapping with OMS


Data Files Created from Multiple Tables

When multiple tables are routed to the same data file, each table is added to the data file in a fashion that is similar to merging data files by adding cases from one data file to another data file (Data menu, Merge Files, Add Cases).

• Each subsequent table will always add cases to the data file.

• If column labels in the tables differ, each table may also add variables to the data file, with missing values for cases from other tables that don't have an identically labeled column.

Example: Multiple Tables with the Same Column Labels

Multiple tables that contain the same column labels will typically produce the most immediately useful data files (data files that don't require additional manipulation). For example, two or more frequency tables from the Frequencies procedure will all have identical column labels.

Two tables with identical column labels

• The second table contributes additional cases (rows) to the data file but contributes no new variables because the column labels are exactly the same, so there are no large patches of missing data.

• Although the values for Command_ and Subtype_ are the same, the Label_ value identifies the source table for each group of cases because the two frequency tables have different titles.

Example: Multiple Tables with Different Column Labels

A new variable is created in the data file for each unique column label in the tables that are routed to the data file. This process results in blocks of missing values if the tables contain different column labels.

Two tables with different column labels

• The first table has columns labeled Beginning Salary and Current Salary, which are not present in the second table, resulting in missing values for those variables for cases from the second table.

• Conversely, the second table has columns labeled Education level and Months since Hire, which are not present in the first table, resulting in missing values for those variables for cases from the first table.

• Mismatched variables like the variables in this example can occur even with tables of the same subtype. In this example, both tables are the same subtype.

Example: Data Files Not Created from Multiple Tables

If any tables do not have the same number of row elements as the other tables, no data file will be created. The number of rows doesn't have to be the same; the number of row elements that become variables in the data file must be the same. For example, a two-variable crosstabulation and a three-variable crosstabulation contain different numbers of row elements, because the “layer” variable is actually nested within the row variable in the default three-variable crosstabulation display.

Tables with different numbers of row elements

Related Topics

Routing Output to PASW Statistics Data Files
Example: Single Two-Dimensional Table
Example: Tables with Layers
Controlling Column Elements to Control Variables in the Data File
Variable Names in OMS-Generated Data Files
Using Output as Input with OMS
Adding Group Percentile Values to a Data File
Bootstrapping with OMS


Controlling Column Elements to Control Variables in the Data File

OMS,OMS,OMS
controlling table pivots,controlling table pivots,controlling table pivots
pivoting,pivoting,pivoting
controlling with OMS for exported output,controlling with OMS for exported output,controlling with OMS for exported output

In the Options dialog box of the Output Management System Control Panel, you can specify which dimension elements should be in the columns and therefore will be used to create variables in the generated data file. This process is equivalent to pivoting the table in the Viewer.

For example, the Frequencies procedure produces a descriptive statistics table with statistics in the rows, while the Descriptives procedure produces a descriptive statistics table with statistics in the columns. To include both table types in the same data file in a meaningful fashion, you need to change the column dimension for one of the table types.

Because both table types use the element name "Statistics" for the statistics dimension, we can put the statistics from the Frequencies statistics table in the columns simply by specifying "Statistics" (in quotation marks) in the list of dimension names in the OMS Options dialog box.

OMS Options dialog box
Combining different table types in a data file by pivoting dimension elements

Some of the variables will have missing values, because the table structures still aren't exactly the same with statistics in the columns.

Related Topics

Routing Output to PASW Statistics Data Files
Example: Single Two-Dimensional Table
Example: Tables with Layers
Data Files Created from Multiple Tables
Variable Names in OMS-Generated Data Files
Using Output as Input with OMS
Adding Group Percentile Values to a Data File
Bootstrapping with OMS


Variable Names in OMS-Generated Data Files

variable names,variable names,variable names
generated by OMS,generated by OMS,generated by OMS
OMS,OMS,OMS
variable names in SAV files,variable names in SAV files,variable names in SAV files

OMS constructs valid, unique variable names from column labels:

• Row and layer elements are assigned generic variable names—the prefix Var followed by a sequential number.

• Characters that aren't allowed in variable names (spaces, parentheses, etc.) are removed. For example, “This (Column) Label” would become a variable named ThisColumnLabel.

• If the label begins with a character that is allowed in variable names but not allowed as the first character (for example, a number), “@” is inserted as a prefix. For example, “2nd” would become a variable named @2nd.

• Underscores or periods at the end of labels are removed from the resulting variable names. The underscores at the end of the automatically generated variables Command_, Subtype_, and Label_ are not removed.

• If more than one element is in the column dimension, variable names are constructed by combining category labels with underscores between category labels. Group labels are not included. For example, if VarB is nested under VarA in the columns, you would get variables like CatA1_CatB1, not VarA_CatA1_VarB_CatB1.

Variable names constructed from table elements

Related Topics

Routing Output to PASW Statistics Data Files
Example: Single Two-Dimensional Table
Example: Tables with Layers
Data Files Created from Multiple Tables
Controlling Column Elements to Control Variables in the Data File
Using Output as Input with OMS
Adding Group Percentile Values to a Data File
Bootstrapping with OMS


OXML Table Structure

OMS,OMS,OMS
XML,XML,XML
XML,XML,XML
table structure in OXML,table structure in OXML,table structure in OXML

Output XML (OXML) is XML that conforms to the spss-output schema. See the topic Output XML Schema for more information.

• OMS command and subtype identifiers are used as values of the command and subType attributes in OXML. An example is as follows:

<command text="Frequencies" command="Frequencies"...>
  <pivotTable text="Gender" label="Gender" subType="Frequencies"...>

• OMS command and subType attribute values are not affected by output language or display settings for variable names/labels or values/value labels.

• XML is case sensitive. A subType attribute value of "frequencies" is not the same as a subType attribute value of "Frequencies."

• All information that is displayed in a table is contained in attribute values in OXML. At the individual cell level, OXML consists of “empty” elements that contain attributes but no “content” other than the content that is contained in attribute values.

• Table structure in OXML is represented row by row; elements that represent columns are nested within the rows, and individual cells are nested within the column elements:

<pivotTable...>
 <dimension axis='row'...>
   <dimension axis='column'...>
     <category...>
       <cell text=’...' number='...' decimals='...'/>
     </category>
     <category...>
       <cell text='...' number='...' decimals='...'/>
     </category>
   </dimension>
 </dimension>
    ...
 </pivotTable>

The preceding example is a simplified representation of the structure that shows the descendant/ancestor relationships of these elements. However, the example does not necessarily show the parent/child relationships, because there are typically intervening nested element levels.

The following figure shows a simple frequency table and the complete output XML representation of that table.

Simple frequency table
Output XML for the simple frequency table
<?xml version="1.0" encoding="UTF-8" ?>
<outputTreeoutputTree xmlns="http://xml.spss.com/spss/oms"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://xml.spss.com/spss/oms
  http://xml.spss.com/spss/oms/spss-output-1.0.xsd">
 <command text="Frequencies" command="Frequencies"
  displayTableValues="label" displayOutlineValues="label"
  displayTableVariables="label" displayOutlineVariables="label">
  <pivotTable text="Gender" label="Gender" subType="Frequencies"
   varName="gender" variable="true">
   <dimension axis="row" text="Gender" label="Gender"
    varName="gender" variable="true">
    <group text="Valid">
     <group hide="true" text="Dummy">
      <category text="Female" label="Female" string="f"
       varName="gender">
       <dimension axis="column" text="Statistics">
        <category text="Frequency">
         <cell text="216" number="216"/>
        </category>
        <category text="Percent">
         <cell text="45.6" number="45.569620253165" decimals="1"/>
        </category>
        <category text="Valid Percent">
         <cell text="45.6" number="45.569620253165" decimals="1"/>
        </category>
        <category text="Cumulative Percent">
         <cell text="45.6" number="45.569620253165" decimals="1"/>
        </category>
       </dimension>
      </category>
      <category text="Male" label="Male" string="m" varName="gender">
       <dimension axis="column" text="Statistics">
        <category text="Frequency">
         <cell text="258" number="258"/>
        </category>
        <category text="Percent">
         <cell text="54.4" number="54.430379746835" decimals="1"/>
        </category>
        <category text="Valid Percent">
         <cell text="54.4" number="54.430379746835" decimals="1"/>
        </category>
        <category text="Cumulative Percent">
         <cell text="100.0" number="100" decimals="1"/>
        </category>
       </dimension>
      </category>
     </group>
     <category text="Total">
      <dimension axis="column" text="Statistics">
       <category text="Frequency">
        <cell text="474" number="474"/>
       </category>
       <category text="Percent">
        <cell text="100.0" number="100" decimals="1"/>
       </category>
       <category text="Valid Percent">
        <cell text="100.0" number="100" decimals="1"/>
       </category>
      </dimension>
     </category>
    </group>
   </dimension>
  </pivotTable>
 </command>
</outputTree>

As you may notice, a simple, small table produces a substantial amount of XML. That's partly because the XML contains some information that is not readily apparent in the original table, some information that might not even be available in the original table, and a certain amount of redundancy.

• The table contents as they are (or would be) displayed in a pivot table in the Viewer are contained in text attributes. An example is as follows:

<command text="Frequencies" command="Frequencies"...>

• Text attributes can be affected by both output language and settings that affect the display of variable names/labels and values/value labels. In this example, the text attribute value will differ, depending on the output language, whereas the command attribute value remains the same, regardless of output language.

• Wherever variables or values of variables are used in row or column labels, the XML will contain a text attribute and one or more additional attribute values. An example is as follows:

<dimension axis="row" text="Gender" label="Gender" varName="gender">
    ...<category text="Female" label="Female" string="f" varName="gender">

• For a numeric variable, there would be a number attribute instead of a string attribute. The label attribute is present only if the variable or values have defined labels.

• The <cell> elements that contain cell values for numbers will contain the text attribute and one or more additional attribute values. An example is as follows:

<cell text="45.6" number="45.569620253165" decimals="1"/>

The number attribute is the actual, unrounded numeric value, and the decimals attribute indicates the number of decimal positions that are displayed in the table.

• Because columns are nested within rows, the category element that identifies each column is repeated for each row. For example, because the statistics are displayed in the columns, the element <category text="Frequency"> appears three times in the XML: once for the male row, once for the female row, and once for the total row.

Related Topics

Output Management System
Output Object Types
Command Identifiers and Table Subtypes
Labels
OMS Options
Excluding Output Display from the Viewer
Routing Output to PASW Statistics Data Files
OMS Identifiers
Copying OMS Identifiers from the Viewer Outline
Using Output as Input with OMS
Output XML Schema
Transforming OXML with XSLT


OMS Identifiers

OMS,OMS,OMS
Output Management System (OMS),Output Management System (OMS),Output Management System (OMS)

The OMS Identifiers dialog box is designed to assist you in writing OMS command syntax. You can use this dialog box to paste selected command and subtype identifiers into a command syntax window. See the topic OMS for more information.

With the OMS command, you can use the IF subcommand to specify output from specific commands and/or table types that you want to route to various output destinations (including the Viewer), and you can use EXCEPTIF to exclude specific output. For example:

OMS
  /SELECT TABLES
  /IF COMMANDS=['Crosstabs' 'Descriptives']
      SUBTYPES=['Crosstabulation' 'Descriptive Statistics']
  /DESTINATION FORMAT=OXML OUTFILE='/temp/temp.xml'.

This command will select crosstabulation and descriptive statistics tables from subsequent CROSSTABS and DESCRIPTIVES commands and generate an XML file that contains the contents of those tables.

Command Identifiers. Most—but not all—command identifiers are the same as the command names. Like command names, they are not case sensitive. You specify command names with the COMMANDS keyword on the IF or EXCEPTIF subcommands.

Subtype Identifiers. Subtypes are the different types of pivot tables that can be produced. Some subtypes are produced by only one command; other subtypes can be produced by multiple commands (although tables with the same subtype names in different procedures may have different structures and contents). Both of the subtypes specified in the above example can be produced by multiple commands, but since we also specify the commands, output from any other commands that produce those subtypes will not be selected.

To Use the OMS Identifiers Dialog Box

From the menus choose:

Utilities
OMS Identifiers...

Select one or more command or subtype identifiers. (Use Ctrl+click to select multiple identifiers in each list.)

Click Paste Commands and/or Paste Subtypes.

• The list of available subtypes is based on the currently selected command(s). If multiple commands are selected, the list of available subtypes is the union of all subtypes that are available for any of the selected commands. If no commands are selected, all subtypes are listed.

• The identifiers are pasted into the designated command syntax window at the current cursor location. If there are no open command syntax windows, a new syntax window is automatically opened.

• Each command and/or subtype identifier is enclosed in quotation marks when pasted, because OMS command syntax requires these quotation marks.

• Identifier lists for the COMMANDS and SUBTYPES keywords must be enclosed in brackets, as in:

  /IF COMMANDS=['Crosstabs' 'Descriptives']
      SUBTYPES=['Crosstabulation' 'Descriptive Statistics']

Related Topics

Output Management System
Routing Output to PASW Statistics Data Files
OXML Table Structure
Copying OMS Identifiers from the Viewer Outline
Using Output as Input with OMS
Output XML Schema
OMS
Working with Command Syntax
Transforming OXML with XSLT


Copying OMS Identifiers from the Viewer Outline

OMS,OMS,OMS
using XSLT with OXML,using XSLT with OXML,using XSLT with OXML
OXML,OXML,OXML
XSLT,XSLT,XSLT
using with OXML,using with OXML,using with OXML
XML,XML,XML
OXML output from OMS,OXML output from OMS,OXML output from OMS

In addition to the OMS Identifiers dialog box, you can copy and paste OMS command and subtype identifiers from the Viewer outline pane.

In the outline pane, right-click the outline entry for the item.

Choose Copy OMS Command Identifier or Copy OMS Table Subtype.

This method differs from the OMS Identifiers dialog box method in one respect: The copied identifier is not automatically pasted into a command syntax window. The identifier is simply copied to the clipboard, and you can then paste it anywhere you want. Because command and subtype identifier values are identical to the corresponding command and subtype attribute values in Output XML format (OXML), you might find this copy/paste method useful if you write XSLT transformations.

Copying OMS Labels

Instead of identifiers, you can copy labels for use with the LABELS keyword. Labels can be used to differentiate between multiple graphs or multiple tables of the same type in which the outline text reflects some attribute of the particular output object, such as the variable names or labels. There are, however, a number of factors that can affect the label text:

• If split-file processing is on, split-file group identification may be appended to the label.

• Labels that include information about variables or values are affected by the settings for the display of variable names/labels and values/value labels in the outline pane (Edit menu, Options, Output Labels tab).

• Labels are affected by the current output language setting (Edit menu, Options, General tab).

To copy OMS labels

In the outline pane, right-click the outline entry for the item.

Choose Copy OMS Label.

As with command and subtype identifiers, the labels must be in quotation marks, and the entire list must be enclosed in square brackets, as in:

  /IF LABELS=['Employment Category' 'Education Level']

Related Topics

Transforming OXML with XSLT
"Pushing" Content from an XML File
"Pulling" Content from an XML File
Positional Arguments versus Localized Text Attributes
Layered Split-File Processing
Output Management System
Routing Output to PASW Statistics Data Files
OXML Table Structure
Using Output as Input with OMS
Output XML Schema


Scripting Facility

scripts,scripts,scripts
scripts,scripts,scripts
languages,languages,languages
running,running,running
creating,creating,creating
editing,editing,editing
default language,default language,default language

The scripting facility allows you to automate tasks, including:

• Opening and saving data files.

• Exporting charts as graphic files in a variety of formats.

• Customizing output in the Viewer.

Scripting Languages Collapse Hide details

Scripting Languages

The available scripting languages depend on your platform. For Windows, the available scripting languages are Basic, which is installed with the Core system, and the Python programming language. For all other platforms, scripting is available with the Python programming language.

To enable scripting with the Python programming language, you must have Python and the PASW Statistics-Python Integration Plug-in installed. See the topic How to Get Integration Plug-ins for more information.

Note: SPSS Inc. is not the owner or licensor of the Python software. Any user of Python must agree to the terms of the Python license agreement located on the Python Web site. SPSS Inc. does not make any statement about the quality of the Python program. SPSS Inc. fully disclaims all liability associated with your use of the Python program.

Default Script Language

The default script language determines the script editor that is launched when new scripts are created. It also specifies the default language whose executable will be used to run autoscripts. On Windows, the default script language is Basic. You can change the default language from the Scripts tab in the Options dialog. See the topic Script Options for more information.

Sample Scripts Collapse Hide details

Sample Scripts

A number of scripts are included with the software, in the Samples subdirectory of the directory where PASW Statistics is installed. You can use these scripts as they are or you can customize them to your needs.

To Create a New Script Collapse Hide details

To Create a New Script

From the menus choose:

File
New
Script

The editor associated with the default script language opens.

To Run a Script Collapse Hide details

To Run a Script

From the menus choose:

Utilities
Run Script...

Select the script you want.

Click Run.

Python scripts can be run in a number of ways, other than from Utilities>Run Script. See the topic Scripting with the Python Programming Language for more information.

To Edit a Script Collapse Hide details

To Edit a Script

From the menus choose:

File
Open
Script...

Select the script you want.

Click Open.

The script is opened in the editor associated with the language in which the script is written.

Related Topics

Autoscripts
Creating Autoscripts
Associating Existing Scripts with Viewer Objects
Scripting with the Python Programming Language
Scripting in Basic
Startup Scripts


Autoscripts

scripts,scripts,scripts
autoscripts,autoscripts,autoscripts
autoscripts,autoscripts,autoscripts

Autoscripts are scripts that run automatically when triggered by the creation of specific pieces of output from selected procedures. For example, you can use an autoscript to automatically remove the upper diagonal and highlight correlation coefficients below a certain significance whenever a Correlations table is produced by the Bivariate Correlations procedure.

Autoscripts can be specific to a given procedure and output type or apply to specific output types from different procedures. For example, you might have an autoscript that formats the ANOVA tables produced by One-Way ANOVA as well as ANOVA tables produced by other statistical procedures. On the other hand, Frequencies produces both a frequency table and a table of statistics, and you might choose to have a different autoscript for each.

Each output type for a given procedure can only be associated with a single autoscript. You can, however, create a base autoscript that is applied to all new Viewer items prior to the application of any autoscripts for specific output types. See the topic Script Options for more information.

The Scripts tab in the Options dialog box (accessed from the Edit menu) displays the autoscripts that have been configured on your system and allows you to set up new autoscripts or modify the settings for existing ones. Optionally, you can create and configure autoscripts for output items directly from the Viewer.

autoscripts,autoscripts,autoscripts
trigger events,trigger events,trigger events
trigger events,trigger events,trigger events
trigger events,trigger events,trigger events
autoscripts,autoscripts,autoscripts
Events that Trigger Autoscripts Collapse Hide details

Events that Trigger Autoscripts

The following events can trigger autoscripts:

• Creation of a pivot table

• Creation of a Notes object

• Creation of a Warnings object

You can also use a script to trigger an autoscript indirectly. For example, you could write a script that invokes the Correlations procedure, which in turn triggers an autoscript registered to the resulting Correlations table.

Related Topics

Script Options
Scripting Facility
Creating Autoscripts
Associating Existing Scripts with Viewer Objects
Scripting with the Python Programming Language
Scripting in Basic
Startup Scripts


Creating Autoscripts

autoscripts,autoscripts,autoscripts
creating,creating,creating

You can create an autoscript by starting with the output object that you want to serve as the trigger--for instance, a frequency table.

In the Viewer, select the object that will trigger the autoscript.

From the menus choose:

Utilities
Create/Edit AutoScript…

If the selected object does not have an associated autoscript, an Open dialog prompts you for the location and name of a new script.

Browse to the location where the new script will be stored, enter a file name and click Open. The editor for the default script language opens. You can change the default script language from the Scripts tab on the Options dialog. See the topic Script Options for more information.

Type the code.

For help with coding autoscripts in Python, see Getting Started with Autoscripts in Python. For help with converting custom Sax Basic autoscripts used in pre-16.0 versions, see Compatibility with Versions Prior to 16.0.

Note: By default, the executable associated with the default script language will be used to run the autoscript. You can change the executable from the Scripts tab in the Options dialog.

If the selected object is already associated with an autoscript, the script is opened in the script editor associated with the language in which the script is written.

Related Topics

Scripting Facility
Autoscripts
Associating Existing Scripts with Viewer Objects


Associating Existing Scripts with Viewer Objects

autoscripts,autoscripts,autoscripts
associating with viewer objects,associating with viewer objects,associating with viewer objects

You can use existing scripts as autoscripts by associating them with a selected object in the Viewer--for instance, a frequency table.

In the Viewer, select an object to associate with an autoscript (multiple Viewer objects can trigger the same autoscript, but each object can only be associated with a single autoscript).

From the menus choose:

Utilities
Associate AutoScript…

If the selected object does not have an associated autoscript, the Select Autoscript dialog opens.

Browse for the script you want and select it.

Click Apply.

If the selected object is already associated with an autoscript, you are prompted to verify that you want to change the association. Clicking OK opens the Select Autoscript dialog.

Optionally, you can configure an existing script as an autoscript from the Scripts tab in the Options dialog box. The autoscript can be applied to a selected set of output types or specified as the base autoscript that is applied to all new Viewer items. See the topic Script Options for more information.

Related Topics

Autoscripts
Creating Autoscripts
Scripting Facility


Scripting with the Python Programming Language

Python,Python,Python
scripts,scripts,scripts
scripts,scripts,scripts
Python,Python,Python

PASW Statistics provides two separate interfaces for programming with the Python language on Windows, Linux, and Mac OS. Use of these interfaces requires the PASW Statistics-Python Integration Plug-in, which is provided with your PASW Statistics product. See the topic How to Get Integration Plug-ins for more information. For help getting started with the Python programming language, see the Python tutorial, available at http://docs.python.org/tut/tut.html.

Python Scripts

Python scripts make use of the interface exposed by the Python SpssClient module. They operate on user interface and output objects and can also run command syntax. For instance, you would use a Python script to customize a pivot table.

• Python scripts are run from Utilities>Run Script, from the Python editor launched from PASW Statistics (accessed from File>Open>Script), or from an external Python process, such as a Python IDE or the Python interpreter.

• Python scripts can be run as autoscripts.

• Python scripts run on the machine where the PASW Statistics client is running.

Complete documentation of the PASW Statistics classes and methods available for Python scripts can be found in the Scripting Guide.

Python Programs

Python programs make use of the interface exposed by the Python spss module. They operate on the PASW Statistics processor and are used to control the flow of a command syntax job, read from and write to the active dataset, create new datasets, and create custom procedures that generate their own pivot table output.

• Python programs are run from command syntax within BEGIN PROGRAM-END PROGRAM blocks, or from an external Python process, such as a Python IDE or the Python interpreter.

• Python programs cannot be run as autoscripts.

• In distributed analysis mode (available with PASW Statistics Server), Python programs execute on the computer where PASW Statistics Server is running.

More information about Python programs, including complete documentation of the PASW Statistics functions and classes available for them, can be found in the documentation for the Python Integration Package.

Related Topics

Running Python Scripts and Python programs
Getting Started with Python Scripts
Getting Started with Autoscripts in Python
Script Editor for the Python Programming Language
Scripting Facility
Autoscripts
Scripting in Basic
Startup Scripts


Running Python Scripts and Python programs

Both Python scripts and Python programs can be run from within PASW Statistics or from an external Python process, such as a Python IDE or the Python interpreter.

Python Scripts Collapse Hide details

Python Scripts

Python Script Run from PASW Statistics. You can run a Python script from Utilities>Run Script or from the Python script editor which is launched when opening a Python file (.py) from File>Open>Script. Scripts run from the Python editor that is launched from PASW Statistics operate on the PASW Statistics client that launched the editor. This allows you to debug your Python code from a Python editor.

Python Script Run from an External Python Process. You can run a Python script from any external Python process, such as a Python IDE that is not launched from PASW Statistics, or the Python interpreter. The script will attempt to connect to an existing PASW Statistics client. If more than one client is found, a connection is made to the most recently launched one. If an existing client is not found, the Python script starts up a new instance of the PASW Statistics client. By default, the Data Editor and Viewer are invisible for the new client. You can choose to make them visible or work in invisible mode with datasets and output documents.

Python Programs Collapse Hide details

Python Programs

Python Program Run from Command Syntax. You can run a Python program by embedding Python code within a BEGIN PROGRAM-END PROGRAM block in command syntax. The command syntax can be run from the PASW Statistics client or from the PASW Statistics Batch Facility--a separate executable provided with PASW Statistics Server.

Python Program Run from an External Python Process. You can run a Python program from any external Python process, such as a Python IDE or the Python interpreter. In this mode, the Python program starts up a new instance of the PASW Statistics processor without an associated instance of the PASW Statistics client. You can use this mode to debug your Python programs using the Python IDE of your choice.

Invoking Python Scripts from Python Programs and Vice Versa Collapse Hide details

Invoking Python Scripts from Python Programs and Vice Versa

Python Script Run from Python Program. You can run a Python script from a Python program by importing the Python module containing the script and calling the function in the module that implements the script. You can also call Python script methods directly from within a Python program. See the topic Running Python Scripts from Python Programs for more information. These features are not available in distributed mode or when running a Python program from an external Python process. To programmatically invoke a Python script in distributed mode, use the SCRIPT command.

Python Autoscript Triggered from Python Program. A Python script specified as an autoscript will be triggered when a Python program executes the procedure containing the output item associated with the autoscript. For example, you associate an autoscript with the Descriptive Statistics table generated by the Descriptives procedure. You then run a Python program that executes the Descriptives procedure. The Python autoscript will be executed.

Python Program Run from Python Script. Python scripts can run command syntax, which means they can run command syntax containing Python programs.

Limitations and Warnings Collapse Hide details

Limitations and Warnings

• Running a Python program from the Python editor launched by PASW Statistics will start up a new instance of the PASW Statistics processor and will not interact with the instance of PASW Statistics that launched the editor.

• Python programs are not intended to be run from Utilities>Run Script.

• Python programs cannot be run as autoscripts.

• The interfaces exposed by the spss module cannot be used in a Python script.

Related Topics

Scripting with the Python Programming Language
Getting Started with Python Scripts
Getting Started with Autoscripts in Python
Script Editor for the Python Programming Language


Getting Started with Python Scripts

The basic structure of a Python script is:

import SpssClient
SpssClient.StartClient()
<Python language statements>
SpssClient.StopClient()

• The import SpssClient statement imports the Python module containing the PASW Statistics classes and methods available in the Python scripting interface.

• SpssClient.StartClient() provides a connection to the associated PASW Statistics client, enabling the script to retrieve information from the client and to perform operations on objects managed by the client, such as pivot tables. Whether the script connects to an existing client or starts up a new client depends on how the script was invoked. See the topic Running Python Scripts and Python programs for more information.

• SpssClient.StopClient() terminates the connection to the PASW Statistics client and should be called at the completion of each Python script.

Note: If you're running a Python script from an external Python process that starts up a new client, call SpssClient.Exit() before SpssClient.StopClient().

Example Collapse Hide details

Example

This script accesses the designated output document and sets each of the pivot tables as selected.

import SpssClient
SpssClient.StartClient()

OutputDoc = SpssClient.GetDesignatedOutputDoc()
OutputItems = OutputDoc.GetOutputItems()

for index in range(OutputItems.Size()):
   OutputItem = OutputItems.GetItemAt(index)
   if OutputItem.GetType() == SpssClient.OutputItemType.PIVOT:
        OutputItem.SetSelected(True)
SpssClient.StopClient()
Target for Standard output Collapse Hide details

Target for Standard output

The Python print statement writes output to Python's standard output. When you run a Python script from Utilities>Run Script, Python's standard output is directed to a log item in the PASW Statistics Viewer.

Related Topics

Scripting with the Python Programming Language
Running Python Scripts and Python programs
Getting Started with Autoscripts in Python
Script Editor for the Python Programming Language


Getting Started with Autoscripts in Python

autoscripts,autoscripts,autoscripts
Python,Python,Python
Python,Python,Python
autoscripts,autoscripts,autoscripts

Autoscripts typically require a reference to the object that triggered the script. They may also require a reference to the associated output document and possibly the index of the output item in the output document. These values are obtained from the SpssScriptContext object, as shown in this example of an autoscript that transposes the rows and columns of a pivot table.

import SpssClient
SpssClient.StartClient()

SpssScriptContext = SpssClient.GetScriptContext()
SpssOutputItem = SpssScriptContext.GetOutputItem()
SpssPivotTable = SpssOutputItem.GetSpecificType()
SpssPivotMgr = SpssPivotTable.PivotManager()
SpssPivotMgr.TransposeRowsWithColumns()

SpssClient.StopClient()

• SpssClient.GetScriptContext returns an SpssScriptContext object that provides values for use by the autoscript.

• The GetOutputItem method of the SpssScriptContext object returns the output item that triggered the current autoscript--in this example, the pivot table whose rows and columns are to be transposed.

Although not used in this example, the GetOutputDoc method of the SpssScriptContext object returns the associated output document, and the GetOutputItemIndex method returns the index (in the associated output document) of the output item that triggered the autoscript.

Detecting When a Script is Run as an Autoscript

Using the GetScriptContext method, you can detect when a script is being run as an autoscript. This allows you to code a script so that it functions in either context (autoscript or not). This trivial script illustrates the approach.

import SpssClient
SpssClient.StartClient()

SpssScriptContext = SpssClient.GetScriptContext()
if SpssScriptContext == None:
   print "I'm not an autoscript"
else:
   print "I'm an autoscript"

SpssClient.StopClient()

• When a script is not run as an autoscript, the GetScriptContext method will return a value of None.

• Given the if-else logic in this example, you would include your autoscript-specific code in the else clause. Any code that is not to be run in the context of an autoscript would be included in the if clause. Of course you can also include code that is to be run in either context.

Related Topics

Scripting with the Python Programming Language
Running Python Scripts and Python programs
Getting Started with Python Scripts
Script Editor for the Python Programming Language


Running Python Scripts from Python Programs

You can run Python scripts from Python programs and you can call Python script methods from within a Python program. This allows you to write Python programs that operate on user interface and output objects.

Note: This feature is only available when running a Python program from the PASW Statistics client--within a BEGIN PROGRAM-END PROGRAM block in command syntax or within an extension command. It is not available in distributed mode or when running a Python program from an external Python process. To programmatically invoke a Python script in distributed mode, use the SCRIPT command.

Example: Calling a Python Script from a Python Program

This example shows a Python program that creates a custom pivot table and calls a Python script to make the column labels of the table bold.

BEGIN PROGRAM.
import spss, MakeColsBold
spss.StartProcedure("Demo")
table = spss.BasePivotTable("Sample Table","OMS subtype")
table.SimplePivotTable(rowlabels = ["1","2"],
                       collabels = ["A","B"],
                       cells = ["1A","1B","2A","2B"])
spss.EndProcedure()
MakeColsBold.Run("Sample Table")
END PROGRAM.

• Python programs use the interface exposed by the Python spss module, so the first line of the program contains an import statement for that module. The Python script is assumed to be contained in a Python module named MakeColsBold, so the import statement also includes that module.

• The code from spss.StartProcedure to spss.EndProcedure creates a pivot table titled "Sample Table".

• MakeColsBold.Run("Sample Table") calls the Run function in the MakeColsBold module and passes the value "Sample Table" as the argument. The Run function implements the Python script to make the column labels of the specified table bold.

The content of the MakeColsBold module is as follows:

import SpssClient

def Run(tableName):
   SpssClient.StartClient()
   OutputDoc = SpssClient.GetDesignatedOutputDoc()
   OutputItems = OutputDoc.GetOutputItems()
   for index in range(OutputItems.Size()):
      OutputItem = OutputItems.GetItemAt(index)
      if OutputItem.GetType() == SpssClient.OutputItemType.PIVOT \
        and OutputItem.GetDescription() == tableName:
         PivotTable = OutputItem.GetSpecificType()
         ColumnLabels = PivotTable.ColumnLabelArray()
         for i in range(ColumnLabels.GetNumColumns()):
            ColumnLabels.SelectLabelAt(1,i)
         PivotTable.SetTextStyle(SpssClient.SpssTextStyleTypes.SpssTSBold)
   SpssClient.StopClient()

• The import SpssClient statement is needed to access the classes and methods available in the Python scripting interface.

• The module contains a single function named Run, which implements the script. It takes a single argument that specifies the name of the table to modify. There is nothing special about the name Run and the module is not limited to a single function. You can create a module that contains many functions, each of which implements a different script.

• The Run function calls SpssClient.StartClient() to provide a connection to the associated PASW Statistics client and SpssClient.StopClient() to terminate the connection at the completion of the script.

Example: Calling Python Scripting Methods Directly from a Python Program

This example shows a Python program that creates a custom pivot table and makes direct calls to Python scripting methods to make the title of the table italic.

BEGIN PROGRAM.
import spss, SpssClient
spss.StartProcedure("Demo")
table = spss.BasePivotTable("Sample Table","OMS subtype")
table.SimplePivotTable(cells = ["A","B","C","D"])
spss.EndProcedure()

SpssClient.StartClient()
OutputDoc = SpssClient.GetDesignatedOutputDoc()
OutputItems = OutputDoc.GetOutputItems()
OutputItem = OutputItems.GetItemAt(OutputItems.Size()-1)
PivotTable = OutputItem.GetSpecificType()
PivotTable.SelectTitle()
PivotTable.SetTextStyle(SpssClient.SpssTextStyleTypes.SpssTSItalic)
SpssClient.StopClient()
END PROGRAM.

• The import spss, SpssClient statement provides access to the classes and methods available for Python programs (spss) as well as those for Python scripts (SpssClient).

• The code from spss.StartProcedure to spss.EndProcedure is the Python program code that creates the pivot table.

• The code from SpssClient.StartClient() to SpssClient.StopClient() is the Python script code that makes the title italic.


Script Editor for the Python Programming Language

For the Python programming language, the default editor is IDLE, which is provided with Python. IDLE provides an integrated development environment (IDE) with a limited set of features. Many IDE's are available for the Python programming language. For instance, on Windows you may choose to use the freely available PythonWin IDE.

To change the script editor for the Python programming language:

Open the file clientscriptingcfg.ini, located in the directory where PASW Statistics is installed. Note: clientscriptingcfg.ini must be edited with a UTF-16 aware editor, such as SciTE on Windows or the TextEdit application on Mac.

Under the section labeled [Python], change the value of EDITOR_PATH to point to the executable for the desired editor.

In that same section, change the value of EDITOR_ARGS to handle any arguments that need to be passed to the editor. If no arguments are required, remove any existing values.

Related Topics

Scripting with the Python Programming Language
Running Python Scripts and Python programs
Getting Started with Python Scripts
Getting Started with Autoscripts in Python


Scripting in Basic

scripts,scripts,scripts
Basic,Basic,Basic

Scripting in Basic is available on Windows only and is installed with the Core system. Extensive online help for scripting in Basic is available from the PASW Statistics Basic Script Editor. The editor can be accessed from File>New>Script when the default script language (set from the Scripts tab on the Options dialog) is set to Basic (the system default on Windows). It is also accessed from File>Open>Script, by choosing Basic (wwd;sbs) in the Files of type list.

Related Topics

Compatibility with Versions Prior to 16.0
The scriptContext Object
Scripting Facility
Autoscripts
Scripting with the Python Programming Language
Startup Scripts


Compatibility with Versions Prior to 16.0

Obsolete Methods and Properties Collapse Hide details

Obsolete Methods and Properties

A number of automation methods and properties are obsolete for version 16.0 and above. In terms of general features, this includes all objects associated with interactive graphs, the Draft Document object, and methods and properties associated with maps. For additional information, see "Release Notes for Version 16.0" in the help system provided with the PASW Statistics Basic Script Editor. The PASW Statistics-specific help is accessed from Help>PASW Statistics Objects Help, in the script editor.

Global Procedures Collapse Hide details

Global Procedures

Prior to version 16.0, the scripting facility included a global procedures file. For version 16.0 and above the scripting facility does not use a global procedures file, although the pre-16.0 version of Global.sbs (renamed Global.wwd) is installed for backwards compatibility.

To migrate a pre-16.0 version of a script that called functions in the global procedures file, add the statement '#Uses "<install dir>\Samples\Global.wwd" to the declarations section of the script, where <install dir> is the directory where PASW Statistics is installed. '#Uses is a special comment recognized by the Basic script processor. If you're not sure if a script uses the global procedures file, you should add the '#Uses statement. You can also use '$Include: instead of '#Uses.

Legacy Autoscripts Collapse Hide details

Legacy Autoscripts

Prior to version 16.0, the scripting facility included a single autoscript file containing all autoscripts. For version 16.0 and above there is no single autoscript file. Each autoscript is now stored in a separate file and can be applied to one or more output items, in contrast to pre-16.0 versions where each autoscript was specific to a particular output item.

Some of the autoscripts installed with pre-16.0 versions are available as a set of separate script files located in the Samples subdirectory of the directory where PASW Statistics is installed. They are identified by a filename ending in Autoscript, with a file type of wwd. By default, they are not associated with any output items. The association is done from the Scripts tab of the Options dialog. See the topic Script Options for more information.

Any custom autoscripts used in pre-16.0 versions must be manually converted and associated with one or more output items, from the Scripts tab of the Options dialog. The conversion process involves the following steps:

Extract the subroutine specifying the autoscript from the legacy Autoscript.sbs file and save it as a new file with an extension of wwd or sbs. The name of the file is arbitrary.

Change the name of the subroutine to Main and remove the parameter specification, keeping track of which parameters are required by the script, such as a pivot table that triggers the autoscript.

Use the scriptContext object (always available) to get the values required by the autoscript, such as the output item that triggered the autoscript.

From the Scripts tab of the Options dialog, associate the script file with the desired output object.

To illustrate the converted code, consider the autoscript Descriptives_Table_DescriptiveStatistics_Create from the legacy Autoscript.sbs file.

Sub Descriptives_Table_DescriptiveStatistics_Create(objPivotTable As Object,objOutputDoc As Object,lngIndex As Long)
'Autoscript
'Trigger Event: DescriptiveStatistics Table Creation after running Descriptives procedure.

'Purpose: Swaps the Rows and Columns in the currently active pivot table.
'Assumptions: Selected Pivot Table is already activated.
'Effects: Swaps the Rows and Columns in the output
'Inputs: Pivot Table, OutputDoc, Item Index

    Dim objPivotManager As ISpssPivotMgr
    Set objPivotManager=objPivotTable.PivotManager
    objPivotManager.TransposeRowsWithColumns

End Sub

Following is the converted script:

Sub Main

'Purpose: Swaps the Rows and Columns in the currently active pivot table.
'Effects: Swaps the Rows and Columns in the output

    Dim objOutputItem As ISpssItem
    Dim objPivotTable as PivotTable
    Set objOutputItem = scriptContext.GetOutputItem()
    Set objPivotTable = objOutputItem.ActivateTable

    Dim objPivotManager As ISpssPivotMgr
    Set objPivotManager = objPivotTable.PivotManager
    objPivotManager.TransposeRowsWithColumns
    objOutputItem.Deactivate
End Sub

• Notice that nothing in the converted script indicates which object the script is to be applied to. The association between an output item and an autoscript is set from the Scripts tab of the Options dialog and maintained across sessions.

• scriptContext.GetOutputItem gets the output item (an ISpssItem object) that triggered the autoscript.

• The object returned by scriptContext.GetOutputItem is not activated. If your script requires an activated object, you'll need to activate it, as done in this example with the ActivateTable method. When you're finished with any table manipulations, call the Deactivate method.

For version 16.0, there is no distinction between scripts that are run as autoscripts and scripts that aren't run as autoscripts. Any script, appropriately coded, can be used in either context. See the topic The scriptContext Object for more information.

Note: To trigger a script from the application creation event, see Startup Scripts.

Script Editor Collapse Hide details

Script Editor

For version 16.0 and above the script editor for Basic no longer supports the following pre-16.0 features:

• The Script, Analyze, Graph, Utilities, and Add-Ons menus.

• The ability to paste command syntax into a script window.

The PASW Statistics Basic Script Editor is a standalone application that is launched from within PASW Statistics via File>New>Script, File>Open>Script, or Utilities>Create/Edit AutoScript (from a Viewer window). It allows you to run scripts against the instance of PASW Statistics from which it was launched. Once opened, the editor will remain open after exiting PASW Statistics, but scripts that use PASW Statistics objects will no longer run.

File Types Collapse Hide details

File Types

For version 16.0 and above, the scripting facility will continue to support running and editing scripts with a file type of sbs. By default, new Basic scripts created with the PASW Statistics Basic Script Editor have a file type of wwd.

Using External COM Clients Collapse Hide details

Using External COM Clients

For version 16.0 and above, the program identifier for instantiating PASW Statistics from an external COM client is SPSS.Application16. Application objects should be declared as spsswinLib.Application16. For example:

Dim objSpssApp As spsswinLib.Application16
Set objSpssApp=CreateObject("SPSS.Application16")

To connect to a running instance of the PASW Statistics client from an external COM client, use:

Dim objSpssApp As spsswinLib.Application16
Set objSpssApp=GetObject("","SPSS.Application16")

If more than one client is running, GetObject will connect to the most recently launched one.

Note: For post-16.0 versions, the identifier is still Application16.

Related Topics

Scripting in Basic
The scriptContext Object


The scriptContext Object

autoscripts,autoscripts,autoscripts
Basic,Basic,Basic

Detecting When a Script is Run as an Autoscript

Using the scriptContext object, you can detect when a script is being run as an autoscript. This allows you to code a script so that it functions in either context (autoscript or not). This trivial script illustrates the approach.

Sub Main
    If scriptContext Is Nothing Then
     MsgBox "I'm not an autoscript"
    Else
     MsgBox "I'm an autoscript"
    End If
End Sub

• When a script is not run as an autoscript, the scriptContext object will have a value of Nothing.

• Given the If-Else logic in this example, you would include your autoscript-specific code in the Else clause. Any code that is not to be run in the context of an autoscript would be included in the If clause. Of course you can also include code that is to be run in either context.

Getting Values Required by Autoscripts

The scriptContext object provides access to values required by an autoscript, such as the output item that triggered the current autoscript.

• The scriptContext.GetOutputItem method returns the output item (an ISpssItem object) that triggered the current autoscript.

• The scriptContext.GetOutputDoc method returns the output document (an ISpssOutputDoc object) associated with the current autoscript.

• The scriptContext.GetOutputItemIndex method returns the index, in the associated output document, of the output item that triggered the current autoscript.

Note: The object returned by scriptContext.GetOutputItem is not activated. If your script requires an activated object, you'll need to activate it--for instance, with the ActivateTable method. When you're finished with any manipulations, call the Deactivate method.

Related Topics

Scripting in Basic
Compatibility with Versions Prior to 16.0


Startup Scripts

scripts,scripts,scripts
startup scripts,startup scripts,startup scripts

You can create a script that runs at the start of each session and a separate script that runs each time you switch servers. For Windows you can have versions of these scripts in both Python and Basic. For all other platforms the scripts can only be in Python.

• The startup script must be named StartClient_.py for Python or StartClient_.wwd for Basic.

• The script that runs when switching servers must be named StartServer_.py for Python or StartServer_.wwd for Basic.

• The scripts must be located in the scripts directory of the installation directory--located at the root of the installation directory for Windows and Linux, and under the Contents directory in the application bundle for Mac.

• On Windows, if the scripts directory contains both a Python and a Basic version of StartClient_ or StartServer_ then both versions are executed. The order of execution is the Python version followed by the Basic version.

• If your system is configured to start up in distributed mode, then at the start of each session any StartClient_ scripts are run followed by any StartServer_ scripts. Note: The StartServer_ scripts also run each time you switch servers, but the StartClient_ scripts only run at the start of a session.

Related Topics

Scripting Facility
Autoscripts
Scripting with the Python Programming Language
Scripting in Basic


Using Output as Input with OMS

data files,data files,data files
saving output as PASW Statistics data files,saving output as PASW Statistics data files,saving output as PASW Statistics data files
Output Management System (OMS),Output Management System (OMS),Output Management System (OMS)
output,output,output
using as input with OMS,using as input with OMS,using as input with OMS

Using the OMS command, you can save pivot table output to PASW Statistics data files and then use that output as input in subsequent commands or sessions. This can be useful for many purposes. This section provides examples of two possible ways to use output as input:

• Generate a table of group summary statistics (percentiles) not available with the AGGREGATE command and then merge those values into the original data file.

• Draw repeated random samples with replacement from a data file, calculate regression coefficients for each sample, save the coefficient values in a data file, and then calculate confidence intervals for the coefficients (bootstrapping).

The command syntax files for these examples are installed with the product. See the topic Sample Files for more information.

Related Topics

Routing Output to PASW Statistics Data Files
Example: Single Two-Dimensional Table
Example: Tables with Layers
Data Files Created from Multiple Tables
Controlling Column Elements to Control Variables in the Data File
Variable Names in OMS-Generated Data Files
Adding Group Percentile Values to a Data File
Bootstrapping with OMS
Output Management System
OXML Table Structure
OMS Identifiers
Copying OMS Identifiers from the Viewer Outline
Output XML Schema


Adding Group Percentile Values to a Data File

Using the AGGREGATE command, you can compute various group summary statistics and then include those values in the active dataset as new variables. For example, you could compute mean, minimum, and maximum income by job category and then include those values in the dataset. Some summary statistics, however, are not available with the AGGREGATE command. This example uses OMS to write a table of group percentiles to a data file and then merges the data in that file with the original data file.

The command syntax used in this example is oms_percentiles.sps. See the topic Sample Files for more information.

GET
  FILE='Employee data.sav'.
PRESERVE.
SET TVARS NAMES TNUMBERS VALUES.
DATASET DECLARE freq_table.

***split file by job category to get group percentiles.
SORT CASES BY jobcat.
SPLIT FILE LAYERED BY jobcat.

OMS
  /SELECT TABLES
  /IF COMMANDS=['Frequencies'] SUBTYPES=['Statistics']
  /DESTINATION FORMAT=SAV
   OUTFILE='freq_table'
  /COLUMNS SEQUENCE=[L1 R2].

FREQUENCIES
  VARIABLES=salary
  /FORMAT=NOTABLE
  /PERCENTILES= 25 50 75.

OMSEND.

***restore previous  SET settings.
RESTORE.

MATCH FILES FILE=*
  /TABLE='freq_table'
  /rename (Var1=jobcat)
  /BY jobcat
 /DROP command_ TO salary_Missing.
EXECUTE.

• The PRESERVE command saves your current SET command specifications.

• SET TVARS NAMES TNUMBERS VALUES specifies that variable names and data values, not variable or value labels, should be displayed in tables. Using variable names instead of labels is not technically necessary in this example, but it makes the new variable names constructed from column labels somewhat easier to work with. Using data values instead of value labels, however, is required to make this example work properly because we will use the job category values in the two files to merge them together.

• SORT CASES and SPLIT FILE are used to divide the data into groups by job category (jobcat). The LAYERED keyword specifies that results for each split-file group should be displayed in the same table rather than in separate tables.

• The OMS command will select all statistics tables from subsequent FREQUENCIES commands and write the tables to a data file.

• The COLUMNS subcommand will put the first layer dimension element and the second row dimension element in the columns.

• The FREQUENCIES command produces a statistics table that contains the 25th, 50th, and 75th percentile values for salary. Since split-file processing is on, the table will contain separate percentile values for each job category.

Default and pivoted statistics tables

• In the statistics table, the variable salary is the only layer dimension element, so the L1 specification in the OMS COLUMNS subcommand will put salary in the column dimension.

• The table statistics are the second (inner) row dimension element in the table, so the R2 specification in the OMS COLUMNS subcommand will put the statistics in the column dimension, nested under the variable salary.

• The data values 1, 2, and 3 are used for the categories of the variable jobcat instead of the descriptive text value labels because of the previous SET command specifications.

• OMSEND ends all active OMS commands. Without this, we could not access the data file temp.sav in the subsequent MATCH FILES command because the file would still be open for writing.

Data file created from pivoted table

• The MATCH FILES command merges the contents of the dataset created from the statistics table with the original dataset. New variables from the data file created by OMS will be added to the original data file.

• FILE=* specifies the current active dataset, which is still the original data file.

• TABLE='freq_table' identifies the dataset created by OMS as a table lookup file. A table lookup file is a file in which data for each "case" can be applied to multiple cases in the other data file(s). In this example, the table lookup file contains only three cases—one for each job category.

• In the data file created by OMS, the variable that contains the job category values is named Var1, but in the original data file, the variable is named jobcat. RENAME (Var1=jobcat) compensates for this discrepancy in the variable names.

• BY jobcat merges the two files together by values of the variable jobcat. The three cases in the table lookup file will be merged with every case in the original data file with the same value for jobcat (also known as Var1 in the table lookup file).

• Since we don't want to include the three table identifier variables (automatically included in every data file created by OMS) or the two variables that contain information on valid and missing cases, we use the DROP subcommand to omit these from the merged data file.

The end result is three new variables containing the 25th, 50th, and 75th percentile salary values for each job category.

Percentiles added to original data file

Related Topics

Routing Output to PASW Statistics Data Files
Example: Single Two-Dimensional Table
Example: Tables with Layers
Data Files Created from Multiple Tables
Controlling Column Elements to Control Variables in the Data File
Variable Names in OMS-Generated Data Files
Using Output as Input with OMS
Bootstrapping with OMS


Bootstrapping with OMS

bootstrapping,bootstrapping,bootstrapping
with OMS,with OMS,with OMS
OMS,OMS,OMS
bootstrapping,bootstrapping,bootstrapping

Bootstrapping is a method for estimating population parameters by repeatedly resampling the same sample—computing some test statistic on each sample and then looking at the distribution of the test statistic over all the samples. Cases are selected randomly, with replacement, from the original sample to create each new sample. Typically, each new sample has the same number of cases as the original sample; however, some cases may be randomly selected multiple times and others not at all. In this example, we

• use a macro to draw repeated random samples with replacement;

• run the REGRESSION command on each sample;

• use the OMS command to save the regression coefficients tables to a data file;

• produce histograms of the coefficient distributions and a table of confidence intervals, using the data file created from the coefficient tables.

The command syntax file used in this example is oms_bootstrapping.sps. See the topic Sample Files for more information.

Next

Related Topics

Routing Output to PASW Statistics Data Files
Example: Single Two-Dimensional Table
Example: Tables with Layers
Data Files Created from Multiple Tables
Controlling Column Elements to Control Variables in the Data File
Variable Names in OMS-Generated Data Files
Using Output as Input with OMS
Adding Group Percentile Values to a Data File
OMS Commands to Create a Data File of Coefficients
Sampling with Replacement and Regression Macro
Ending the OMS Requests


OMS Commands to Create a Data File of Coefficients

Although the command syntax file oms_bootstrapping.sps may seem long and/or complicated, the OMS commands that create the data file of sample regression coefficients are really very short and simple:

PRESERVE.
SET TVARS NAMES.
DATASET DECLARE bootstrap_example.
OMS /DESTINATION VIEWER=NO /TAG='suppressall'.
OMS
  /SELECT TABLES
  /IF COMMANDS=['Regression'] SUBTYPES=['Coefficients']
  /DESTINATION FORMAT=SAV OUTFILE='bootstrap_example'
  /COLUMNS DIMNAMES=['Variables'  'Statistics']
  /TAG='reg_coeff'.

• The PRESERVE command saves your current SET command specifications, and SET TVARS NAMES specifies that variable names—not labels—should be displayed in tables. Since variable names in data files created by OMS are based on table column labels, using variable names instead of labels in tables tends to result in shorter, less cumbersome variable names.

• DATASET DECLARE defines a dataset name that will then be used in the REGRESSION command.

• The first OMS command prevents subsequent output from being displayed in the Viewer until an OMSEND is encountered. This is not technically necessary, but if you are drawing hundreds or thousands of samples, you probably don't want to see the output of the corresponding hundreds or thousands of REGRESSION commands.

• The second OMS command will select coefficients tables from subsequent REGRESSION commands.

• All of the selected tables will be saved in a dataset named bootstrap_example. This dataset will be available for the rest of the current session but will be deleted automatically at the end of the session unless explicitly saved. The contents of this dataset will be displayed in a separate Data Editor window.

• The COLUMNS subcommand specifies that both the 'Variables' and 'Statistics' dimension elements of each table should appear in the columns. Since a regression coefficients table is a simple two-dimensional table with 'Variables' in the rows and 'Statistics' in the columns, if both dimensions appear in the columns, then there will be only one row (case) in the generated data file for each table. This is equivalent to pivoting the table in the Viewer so that both 'Variables' and 'Statistics' are displayed in the column dimension.

Variables dimension element pivoted into column dimension

Variables dimension element pivoted into column dimension

Next

Related Topics

Bootstrapping with OMS
Sampling with Replacement and Regression Macro
Ending the OMS Requests


Sampling with Replacement and Regression Macro

The most complicated part of the OMS bootstrapping example has nothing to do with the OMS command. A macro routine is used to generate the samples and run the REGRESSION commands. Only the basic functionality of the macro is discussed here. For detailed information on macros, see DEFINE-!ENDDEFINE.

DEFINE regression_bootstrap (samples=!TOKENS(1)
                             /depvar=!TOKENS(1)
                             /indvars=!CMDEND)

COMPUTE dummyvar=1.
AGGREGATE
  /OUTFILE=* MODE=ADDVARIABLES
  /BREAK=dummyvar
  /filesize=N.
!DO !other=1 !TO !samples
SET SEED RANDOM.
WEIGHT OFF.
FILTER OFF.
DO IF $casenum=1.
- COMPUTE #samplesize=filesize.
- COMPUTE #filesize=filesize.
END IF.
DO IF (#samplesize>0 and #filesize>0).
- COMPUTE sampleWeight=rv.binom(#samplesize, 1/#filesize).
- COMPUTE #samplesize=#samplesize-sampleWeight.
- COMPUTE #filesize=#filesize-1.
ELSE.
- COMPUTE sampleWeight=0.
END IF.
WEIGHT BY sampleWeight.
FILTER BY sampleWeight.
REGRESSION
  /STATISTICS COEFF
  /DEPENDENT !depvar
  /METHOD=ENTER !indvars.
!DOEND
!ENDDEFINE.

GET FILE='/examples/data/Employee data.sav'.

regression_bootstrap
   samples=100
   depvar=salary
   indvars=salbegin jobtime.

• A macro named regression_bootstrap is defined. It is designed to work with arguments similar to PASW Statistics subcommands and keywords.

• Based on the user-specified number of samples, dependent variable, and independent variable, the macro will draw repeated random samples with replacement and run the REGRESSION command on each sample.

• The samples are generated by randomly selecting cases with replacement and assigning weight values based on how many times each case is selected. If a case has a value of 1 for sampleWeight, it will be treated like one case. If it has a value of 2, it will be treated like two cases, and so on. If a case has a value of 0 for sampleWeight, it will not be included in the analysis.

• The REGRESSION command is then run on each weighted sample.

• The macro is invoked by using the macro name like a command. In this example, we generate 100 samples from the employee data.sav file. You can substitute any file, number of samples, and/or analysis variables.

Next

Related Topics

Bootstrapping with OMS
OMS Commands to Create a Data File of Coefficients
Ending the OMS Requests


Ending the OMS Requests

Before you can use the generated dataset, you need to end the OMS request that created it, because the dataset remains open for writing until you end the OMS request. At that point, the basic job of creating the dataset of sample coefficients is complete, but we've added some histograms and a table that displays the 2.5th and 97.5th percentiles values of the bootstrapped coefficient values, which indicate the 95% confidence intervals of the coefficients.

OMSEND.
DATASET ACTIVATE bootstrap_example.
FREQUENCIES
  VARIABLES=salbegin_B salbegin_Beta jobtime_B jobtime_Beta
  /FORMAT NOTABLE
  /PERCENTILES= 2.5 97.5
  /HISTOGRAM  NORMAL.
RESTORE.

• OMSEND without any additional specifications ends all active OMS requests. In this example, there were two: one to suppress all Viewer output and one to save regression coefficients in a data file. If you don't end both OMS requests, either you won't be able to open the data file or you won't see any results of your subsequent analysis.

• The job ends with a RESTORE command that restores your previous SET specifications.

95% confidence interval (2.5th and 97.5th percentiles) and coefficient histograms

95% confidence interval (2.5th and 97.5th percentiles) and coefficient histograms

Related Topics

Bootstrapping with OMS
OMS Commands to Create a Data File of Coefficients
Sampling with Replacement and Regression Macro


Transforming OXML with XSLT

OMS,OMS,OMS
using XSLT with OXML,using XSLT with OXML,using XSLT with OXML
OXML,OXML,OXML
XSLT,XSLT,XSLT
using with OXML,using with OXML,using with OXML
XML,XML,XML
OXML output from OMS,OXML output from OMS,OXML output from OMS

Using the OMS command, you can route output to OXML, which is XML that conforms to the Output XML schema. This section provides a few basic examples of using XSLT to transform OXML.

• These examples assume some basic understanding of XML and XSLT. If you have not used XML or XSLT before, this is not the place to start. There are numerous books and Internet resources that can help you get started.

• All of the XSLT stylesheets presented here are installed with PASW Statistics in the Samples folder. See the topic Sample Files for more information.

• The Output XML schema is documented in Output Schema Specifications.

OMS Namespace

Output XML produced by OMS contains a namespace declaration:

xmlns="http://xml.spss.com/spss/oms"

In order for XSLT stylesheets to work properly with OXML, the XSLT stylesheets must contain a similar namespace declaration that also defines a prefix that is used to identify that namespace in the stylesheet. For example:

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  version="1.0" xmlns:oms="http://xml.spss.com/spss/oms">

This defines "oms" as the prefix that identifies the namespace; therefore, all of the XPath expressions that refer to OXML elements by name must use "oms:" as a prefix to the element name references. All of the examples presented here use the "oms:" prefix, but you could define and use a different prefix.

Related Topics

Copying OMS Identifiers from the Viewer Outline
"Pushing" Content from an XML File
"Pulling" Content from an XML File
Positional Arguments versus Localized Text Attributes
Layered Split-File Processing
OMS Identifiers


"Pushing" Content from an XML File

In the "push" approach, the structure and order of elements in the transformed results are usually defined by the source XML file. In the case of OXML, the structure of the XML mimics the nested tree structure of the Viewer outline, and we can construct a very simple XSLT transformation to reproduce the outline structure.

This example generates the outline in HTML, but it could just as easily generate a simple text file. The XSLT stylesheet is oms_simple_outline_example.xsl.

Viewer outline pane

Viewer Outline Pane

XSLT stylesheet oms_simple_outline_example.xsl

XSLT stylesheet oms_simple_outline_example.xsl
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
  xmlns:oms="http://xml.spss.com/spss/oms">

<xsl:template match="/">
 <HTML>
  <HEAD>
   <TITLE>Outline Pane</TITLE>
  </HEAD>
  <BODY>
  <br/>Output
   <xsl:apply-templates/>
  </BODY>
 </HTML>
</xsl:template>

<xsl:template match="oms:command|oms:heading">
 <xsl:call-template name="displayoutline"/>
  <xsl:apply-templates/>
</xsl:template>
<xsl:template match="oms:textBlock|oms:pageTitle|oms:pivotTable|oms:chartTitle">
 <xsl:call-template name="displayoutline"/>
</xsl:template>

<!--indent based on number of ancestors:
two spaces for each ancestor-->
<xsl:template name="displayoutline">
 <br/>
 <xsl:for-each select="ancestor::*">
  <xsl:text>&#160;&#160;</xsl:text>
 </xsl:for-each>
 <xsl:value-of select="@text"/>
 <xsl:if test="not(@text)">
  <!--no text attribute, must be page title-->
  <xsl:text>Page Title</xsl:text>
 </xsl:if>
</xsl:template>

</xsl:stylesheet>

• xmlns:oms="http://xml.spss.com/spss/oms" defines "oms" as the prefix that identifies the namespace, so all element names in XPath expressions need to include the prefix "oms:".

• The stylesheet consists mostly of two template elements that cover each type of element that can appear in the outline—command, heading, textBlock, pageTitle, pivotTable, and chartTitle.

• Both of those templates call another template that determines how far to indent the text attribute value for the element.

• The command and heading elements can have other outline items nested under them, so the template for those two elements also includes <xsl:apply-templates/> to apply the template for the other outline items.

• The template that determines the outline indentation simply counts the number of "ancestors" the element has, which indicates its nesting level, and then inserts two spaces (&#160; is a "nonbreaking" space in HTML) before the value of the text attribute value.

• <xsl:if test="not(@text)"> selects <pageTitle> elements because this is the only specified element that doesn't have a text attribute. This occurs wherever there is a TITLE command in the command file. In the Viewer, it inserts a page break for printed output and then inserts the specified page title on each subsequent printed page. In OXML, the <pageTitle> element has no attributes, so we use <xsl:text> to insert the text "Page Title" as it appears in the Viewer outline.

Viewer Outline "Titles"

You may notice that there are a number of "Title" entries in the Viewer outline that don't appear in the generated HTML. These should not be confused with page titles. There is no corresponding element in OXML because the actual "title" of each output block (the text object selected in the Viewer if you click the "Title" entry in the Viewer outline) is exactly the same as the text of the entry directly above the "Title" in the outline, which is contained in the text attribute of the corresponding command or heading element in OXML.

Related Topics

Copying OMS Identifiers from the Viewer Outline
Transforming OXML with XSLT
"Pulling" Content from an XML File
Positional Arguments versus Localized Text Attributes
Layered Split-File Processing


"Pulling" Content from an XML File

In the "pull" approach, the structure and order of elements in the source XML file may not be relevant for the transformed results. Instead, the source XML is treated like a data repository from which selected pieces of information are extracted, and the structure of the transformed results is defined by the XSLT stylesheet.

The "pull" approach typically uses <xsl:for-each> to select and extract information from the XML.

Related Topics

Copying OMS Identifiers from the Viewer Outline
Transforming OXML with XSLT
"Pushing" Content from an XML File
Positional Arguments versus Localized Text Attributes
Layered Split-File Processing
Simple xsl:for-each "Pull" Example
Advanced xsl:for-each "Pull" Example


Simple xsl:for-each "Pull" Example

This example uses <xsl:for-each> to "pull" selected information out of OXML output and create customized HTML tables.

Although you can easily generate HTML output using DESTINATION FORMAT=HTML on the OMS command, you have very little control over the HTML generated beyond the specific object types included in the HTML file. Using OXML, however, you can create customized tables. This example

• selects only frequency tables in the OXML file;

• displays only valid (nonmissing) values;

• displays only the Frequency and Valid Percent columns;

• replaces the default column labels with Count and Percent.

The XSLT stylesheet used in this example is oms_simple_frequency_tables.xsl.

Note: This stylesheet is not designed to work with frequency tables generated with layered split-file processing.

Frequencies pivot tables in Viewer

Frequencies pivot tables in Viewer

Customized HTML frequency tables

Customized HTML frequency tables

XSLT stylesheet: oms_simple_frequency_tables.xsl

XSLT stylesheet: oms_simple_frequency_tables.xsl
<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  version="1.0" xmlns:oms="http://xml.spss.com/spss/oms">
<!--enclose everything in a template, starting at the root node-->
<xsl:template match="/">
<HTML>
<HEAD>
<TITLE>Modified Frequency Tables</TITLE>
</HEAD>
<BODY>
<!--Find all Frequency Tables-->
<xsl:for-each select="//oms:pivotTable[@subType='Frequencies']">
<xsl:for-each select="oms:dimension[@axis='row']">
 <h3>
  <xsl:value-of select="@text"/>
 </h3>
</xsl:for-each>
<!--create the HTML table-->
<table border="1">
 <tbody align="char" char="." charoff="1">
 <tr>
  <!--
  table header row; you could extract headings from
  the XML but in this example we're using different header text
  -->
  <th>Category</th><th>Count</th><th>Percent</th>
 </tr>
 <!--find the columns of the pivot table-->
 <xsl:for-each select="descendant::oms:dimension[@axis='column']">
   <!--select only valid, skip missing-->
    <xsl:if test="ancestor::oms:group[@text='Valid']">
     <tr>
     <td>
       <xsl:choose>
        <xsl:when test="not((parent::*)[@text='Total'])">
         <xsl:value-of select="parent::*/@text"/>
        </xsl:when>
        <xsl:when test="((parent::*)[@text='Total'])">
         <b><xsl:value-of select="parent::*/@text"/></b>
        </xsl:when>
       </xsl:choose>
     </td>
     <td>
      <xsl:value-of select="oms:category[@text='Frequency']/oms:cell/@text"/>
     </td>
     <td>
      <xsl:value-of select="oms:category[@text='Valid Percent']/oms:cell/@text"/>
     </td>
    </tr>
  </xsl:if>
  </xsl:for-each>
 </tbody>
</table>
<!--Don't forget possible footnotes for split files-->
<xsl:if test="descendant::*/oms:note">
<p><xsl:value-of select="descendant::*/oms:note/@text"/></p>
</xsl:if>
</xsl:for-each>
</BODY>
</HTML>
</xsl:template>
</xsl:stylesheet>

• xmlns:oms="http://xml.spss.com/spss/oms" defines "oms" as the prefix that identifies the namespace, so all element names in XPath expressions need to include the prefix "oms:".

• The XSLT primarily consists of a series of nested <xsl:for-each> statements, each drilling down to a different element and attribute of the table.

• <xsl:for-each select="//oms:pivotTable[@subType='Frequencies']"> selects all tables of the subtype 'Frequencies'.

• <xsl:for-each select="oms:dimension[@axis='row']"> selects the row dimension of each table.

• <xsl:for-each select="descendant::oms:dimension[@axis='column']"> selects the column elements from each row. OXML represents tables row by row, so column elements are nested within row elements.

• <xsl:if test="ancestor::oms:group[@text='Valid']"> selects only the section of the table that contains valid, nonmissing values. If there are no missing values reported in the table, this will include the entire table. This is the first of several XSLT specifications in this example that rely on attribute values that differ for different output languages. If you don't need solutions that work for multiple output languages, this is often the simplest, most direct way to select certain elements. Many times, however, there are alternatives that don't rely on localized text strings. See the topic Advanced xsl:for-each "Pull" Example for more information.

• <xsl:when test="not((parent::*)[@text='Total'])"> selects column elements that aren't in the 'Total' row. Once again, this selection relies on localized text, and the only reason we make the distinction between total and nontotal rows in this example is to make the row label 'Total' bold.

• <xsl:value-of select="oms:category[@text='Frequency']/oms:cell/@text"/> gets the content of the cell in the 'Frequency' column of each row.

• <xsl:value-of select="oms:category[@text='Valid Percent']/oms:cell/@text"/> gets the content of the cell in the 'Valid Percent' column of each row. Both this and the previous code for obtaining the value from the 'Frequency' column rely on localized text.

XPath expressions for selected frequency table elements

XPath expressions for selected frequency table elements

Related Topics

"Pulling" Content from an XML File
Advanced xsl:for-each "Pull" Example


Advanced xsl:for-each "Pull" Example

This example builds on the basics described in the simple xsl:for-each example.

In addition to selecting and displaying only selected parts of each frequency table in HTML format, this example

• doesn't rely on any localized text;

• always shows both variable names and labels;

• always shows both values and value labels;

• rounds decimal values to integers.

The XSLT stylesheet used in this example is customized_frequency_tables.xsl.

Note: This stylesheet is not designed to work with frequency tables generated with layered split-file processing.

Frequencies pivot tables in Viewer

Frequencies pivot tables in Viewer

Customized HTML with values rounded to integers

Customized HTML with value rounded to integers

The simple example contained a single XSLT <template> element. This stylesheet contains multiple templates:

• A main template that selects the table elements from the OXML

• A template that defines the display of variable names and labels

• A template that defines the display of values and value labels

• A template that defines the display of cell values as rounded integers

The following sections explain the different templates used in the stylesheet.

Related Topics

"Pulling" Content from an XML File
Simple xsl:for-each "Pull" Example
Main Template for Advanced xsl:for-each Example
Controlling Variable and Value Label Display
Controlling Decimal Display


Main Template for Advanced xsl:for-each Example

Since this XSLT stylesheet produces tables with essentially the same structure as the simple <xsl:for-each> example, the main template is similar to the one used in the simple example.

Main template of customized_frequency_tables.xsl
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  version="1.0" xmlns:oms="http://xml.spss.com/spss/oms">

<!--enclose everything in a template, starting at the root node-->
<xsl:template match="/">
<HTML>
<HEAD>
<TITLE>Modified Frequency Tables</TITLE>
</HEAD>
<BODY>
<xsl:for-each select="//oms:pivotTable[@subType='Frequencies']">
<xsl:for-each select="oms:dimension[@axis='row']">
 <h3>
  <xsl:call-template name="showVarInfo"/>
 </h3>
</xsl:for-each>
<!--create the HTML table-->
<table border="1">
 <tbody align="char" char="." charoff="1">
 <tr>  <th>Category</th><th>Count</th><th>Percent</th>
 </tr>
 <xsl:for-each select="descendant::oms:dimension[@axis='column']">
   <xsl:if test="oms:category[3]">
    <tr>
     <td>
       <xsl:choose>
        <xsl:when test="parent::*/@varName">
         <xsl:call-template name="showValueInfo"/>
        </xsl:when>
        <xsl:when test="not(parent::*/@varName)">
          <b><xsl:value-of select="parent::*/@text"/></b>
        </xsl:when>
       </xsl:choose>
     </td>
     <td>
      <xsl:apply-templates select="oms:category[1]/oms:cell/@number"/>
     </td>
     <td>
      <xsl:apply-templates select="oms:category[3]/oms:cell/@number"/>
     </td>
    </tr>
  </xsl:if>
  </xsl:for-each>
 </tbody>
</table>
<xsl:if test="descendant::*/oms:note">
<p><xsl:value-of select="descendant::*/oms:note/@text"/></p>
</xsl:if>
</xsl:for-each>
</BODY>
</HTML>
</xsl:template>

This template is very similar to the one for the simple example. The main differences are:

• <xsl:call-template name="showVarInfo"/> calls another template to determine what to show for the table title instead of simply using the text attribute of the row dimension (oms:dimension[@axis='row']). See the topic Controlling Variable and Value Label Display for more information.

• <xsl:if test="oms:category[3]"> selects only the data in the 'Valid' section of the table instead of <xsl:if test="ancestor::oms:group[@text='Valid']">. The positional argument used in this example doesn't rely on localized text. It relies on the fact that the basic structure of a frequency table is always the same and the fact that OXML does not include elements for empty cells. Since the 'Missing' section of a frequency table contains values only in the first two columns, there are no oms:category[3] column elements in the 'Missing' section, so the test condition is not met for the 'Missing' rows. See the topic Positional Arguments versus Localized Text Attributes for more information.

• <xsl:when test="parent::*/@varName"> selects the nontotal rows instead of <xsl:when test="not((parent::*)[@text='Total'])">. Column elements in the nontotal rows in a frequency table contain a varName attribute that identifies the variable, whereas column elements in total rows do not. So this selects nontotal rows without relying on localized text.

• <xsl:call-template name="showValueInfo"/> calls another template to determine what to show for the row labels instead of <xsl:value-of select="parent::*/@text"/>. See the topic Controlling Variable and Value Label Display for more information.

• <xsl:apply-templates select="oms:category[1]/oms:cell/@number"/> selects the value in the 'Frequency' column instead of <xsl:value-of select="oms:category[@text='Frequency']/oms:cell/@text"/>. A positional argument is used instead of localized text (the 'Frequency' column is always the first column in a frequency table), and a template is applied to determine how to display the value in the cell. Percentage values are handled the same way, using oms:category[3] to select the values from the 'Valid Percent' column. See the topic Controlling Decimal Display for more information.

Related Topics

Advanced xsl:for-each "Pull" Example
Controlling Variable and Value Label Display
Controlling Decimal Display


Controlling Variable and Value Label Display

The display of variable names and/or labels and values and/or value labels in pivot tables is determined by the current settings for SET TVARS and SET TNUMBERS—the corresponding text attributes in the OXML also reflect those settings. The system default is to display labels when they exist and names or values when they don't. The settings can be changed to always show names or values and never show labels or always show both.

The XSLT templates showVarInfo and showValueInfo are designed to ignore those settings and always show both names or values and labels (if present).

showVarInfo and showValueInfo templates
<!--display both variable names and labels-->
<xsl:template name="showVarInfo">
 <p>
 <xsl:text>Variable Name: </xsl:text>
 <xsl:value-of select="@varName"/>
 </p>
 <xsl:if test="@label">
  <p>
   <xsl:text>Variable Label: </xsl:text>
   <xsl:value-of select="@label"/>
  </p>
 </xsl:if>
</xsl:template>

<!--display both values and value labels-->
<xsl:template name="showValueInfo">
 <xsl:choose>
 <!--Numeric vars have a number attribute,
  string vars have a string attribute -->
  <xsl:when test="parent::*/@number">
   <xsl:value-of select="parent::*/@number"/>
  </xsl:when>
  <xsl:when test="parent::*/@string">
   <xsl:value-of select="parent::*/@string"/>
  </xsl:when>
 </xsl:choose>
 <xsl:if test="parent::*/@label">
   <xsl:text>: </xsl:text>
   <xsl:value-of select="parent::*/@label"/>
 </xsl:if>
</xsl:template>

• <xsl:text>Variable Name: </xsl:text> and <xsl:value-of select="@varName"/> display the text "Variable Name:" followed by the variable name.

• <xsl:if test="@label"> checks to see if the variable has a defined label.

• If the variable has a defined label, <xsl:text>Variable Label: </xsl:text> and <xsl:value-of select="@label"/> display the text "Variable Label:" followed by the defined variable label.

• Values and value labels are handled in a similar fashion, except instead of a varName attribute, values will have either a number attribute or a string attribute.

Related Topics

Advanced xsl:for-each "Pull" Example
Main Template for Advanced xsl:for-each Example
Controlling Decimal Display


Controlling Decimal Display

The text attribute of a <cell> element in OXML displays numeric values with the default number of decimal positions for the particular type of cell value. For most table types, there is little or no control over the default number of decimals displayed in cell values in pivot tables, but OXML can provide some flexibility not available in default pivot table display.

In this example, the cell values are rounded to integers, but we could just as easily display five or six or more decimal positions because the number attribute may contain up to 15 significant digits.

Rounding cell values
<!--round decimal cell values to integers-->
<xsl:template match="@number">
 <xsl:value-of select="format-number(.,'#')"/>
</xsl:template>

• This template is invoked whenever <apply-templates select="..."/> contains a reference to a number attribute.

• <xsl:value-of select="format-number(.,'#')"/> specifies that the selected values should be rounded to integers with no decimal positions.

Related Topics

Advanced xsl:for-each "Pull" Example
Main Template for Advanced xsl:for-each Example
Controlling Variable and Value Label Display


Positional Arguments versus Localized Text Attributes

Whenever possible, it is always best to avoid XPath expressions that rely on localized text (text that differs for different output languages) or positional arguments. You will probably find, however, that this is not always possible.

Localized Text Attributes

Most table elements contain a text attribute that contains the information as it would appear in a pivot table in the current output language. For example, the column in a frequency table that contains counts is labeled Frequency in English but Frecuencia in Spanish. If you do not need XSLT that will work in multiple languages, XPath expressions that select elements based on text attributes (for example, @text='Frequency') will often provide a simple, reliable solution.

Positional Arguments

Instead of localized text attributes, for many table types you can use positional arguments that are not affected by output language. For example, in a frequency table the column that contains counts is always the first column, so a positional argument of category[1] at the appropriate level of the tree structure should always select information in the column that contains counts.

In some table types, however, the elements in the table and order of elements in the table can vary. For example, the order of statistics in the columns or rows of table subtype "Report" generated by the MEANS command is determined by the specified order of the statistics on the CELLS subcommand. In fact, two tables of this type may not even display the same statistics at all. So category[1] might select the category that contains mean values in one table, median values in another table, and nothing at all in another table.

Related Topics

Copying OMS Identifiers from the Viewer Outline
Transforming OXML with XSLT
"Pushing" Content from an XML File
"Pulling" Content from an XML File
Layered Split-File Processing


Layered Split-File Processing

Layered split-file processing can alter the basic structure of tables that you might otherwise assume have a fixed default structure. For example, a standard frequency table has only one row dimension (dimension axis="row"), but a frequency table of the same variable when layered split-file processing is in effect will have multiple row dimensions, and the total number of dimensions—and row label columns in the table—depends on the number of split-file variables and unique split-file values.

Standard and Layered Frequencies Tables

Standard and layered frequencies tables

Related Topics

Copying OMS Identifiers from the Viewer Outline
Transforming OXML with XSLT
"Pushing" Content from an XML File
"Pulling" Content from an XML File
Positional Arguments versus Localized Text Attributes


How Do I Make a Pivot Table Narrower?

There are a number of things you can do to make wide pivot tables narrower:

Click and drag individual column borders in an activated pivot table to make the columns narrower.

Modify the Table Properties to limit the maximum width of table columns, and save the properties in a TableLook.

Apply a compact TableLook (Format menu, TableLooks), such as Small Font or VGA.

If the table has more than one dimension in the columns, pivot some dimensions into the rows or layers.

Tell me more about controlling column width.

Tell me more about applying TableLooks.

Tell me more about pivoting tables.


How Do I Prevent Text Wrapping in Pivot Tables?

pivot tables,pivot tables,pivot tables
text wrapping,text wrapping,text wrapping
pivot tables,pivot tables,pivot tables

If you display variable labels and value labels in pivot tables, column widths are automatically adjusted to the longest word in the label. So, long labels that consist of many short words will create extensive text wrapping in pivot tables.

To reduce or eliminate text wrapping in pivot tables you have already produced:

Activate the pivot table (double-click anywhere in the table).

Click and drag the right border of the column to make it wider.

or

In the Table Properties General tab (Format menu, Table Properites), increase the minimum width for wrapped labels.

To reduce or prevent text wrapping in new pivot tables:

Use shorter descriptive labels.

Display variable names and data values instead of descriptive labels (Edit menu, Options, Output Labels tab).

Use a TableLook that specifies a wider minimum width for wrapped labels.

Tell me more about controlling label wrapping.

Tell me more about using TableLooks.

Tell me more about custom default TableLook.


How Do I Control Text Wrapping?

pivot tables,pivot tables,pivot tables
inserting line breaks,inserting line breaks,inserting line breaks
line breaks,line breaks,line breaks
inserting in pivot tables,inserting in pivot tables,inserting in pivot tables
pivot tables,pivot tables,pivot tables
line breaks,line breaks,line breaks

To control text wrapping in pivot tables:

Activate the pivot table (double-click anywhere in the table).

From the menus, choose:

Format
Table Properties

In the General tab, specify the minimum column width for wrapped labels.

To control text wrapping in individual table cells:

Double-click the cell you want to edit.

Position the cursor where you want to insert a line break.

Press Ctrl-Enter.

For defined variable labels, you can also automatically control text wrapping for labels in new tables:

Double-click the variable name in the Data Editor.

Click Labels.

Type \n in the variable label wherever you want a line break in the label.


Modifying Layer Labels

layers,layers,layers
modifying labels,modifying labels,modifying labels
layers,layers,layers

To modify the text or formatting of layer labels in a pivot table:

Double-click the table to activate it.

Pivot the layer item into the row or column dimension.

Modify the label as you would a row or column element.

Pivot the item back into the layer dimension.

Tell me more about pivoting a table.


How Do I Increase the Limit for the Number of Pivot Table Cells?

By default, the maximum number of cells that a new pivot table can contain is determined by the amount of available virtual memory in your computer. If you get a warning that a pivot table cannot be created because it exceeds the limit for the number of cells, you can increase the limit in several ways:

Close other running applications.

Delete items from the Viewer that you don't need (particularly charts).

Delete items from your hard disk that you don't need.

Use command syntax to increase the value of MXCELLS.

Tell me more about setting the value of MXCELLS.


Increasing the Value of MXCELLS

Open a syntax window.

Enter and run the following command:

SET MXCELLS=n

The value you enter for n should be a value higher than the current limit, as indicated in the warning message for a table that exceeds the limit.

Note: Use SET MXCELLS with caution and always set it back to the default after you create the table you need.

To set MXCELLS back to the default setting, enter and run the following command:

SET MXCELLS=AUTOMATIC


How Do I Print All Layers of a Pivot Table?

printing,printing,printing
pivot table layers,pivot table layers,pivot table layers
printing,printing,printing

To print all pivot table layers (instead of just the top layer), change the properties of the table:

Activate the pivot table (double-click anywhere in the table).

From the menus choose:

Format
Table Properties…

Click the Printing tab.

Select Print all layers.


How Do I Print Large Tables without Breaks?

printing,printing,printing
large tables without breaks,large tables without breaks,large tables without breaks
printing,printing,printing

The Viewer automatically breaks up pivot tables that are too wide or too long for the defined page size.

There are several ways to prevent breaks in printed pivot tables:

Apply a compact TableLook (Format menu, TableLooks), such as Small Font or VGA.

Rescale the table for printing to fit the defined page size (Format menu, Table Properties, Printing tab).

Make the page margins smaller or print wide tables in landscape orientation (File menu, Page Setup).

Tell me more about applying TableLooks.

Tell me more about table properties.


What Happened to the Draft Viewer?

draft viewer,draft viewer,draft viewer

The Draft Viewer is no longer supported. There are two alternatives for creating text output similar to the Draft Viewer:

• Export Output. The Export item on the File menu in the Viewer window provides text output options similar to the Draft Viewer, including tab- or space-separated table output, column width control, and row/column border characters. For more information, see Export Output: Text Options.

• Output Management System. You can use the Output Management System (OMS) to automatically route results to text files in tab- or space-separated format. See the topic OMS Options for more information.

Finding and Replacing Information in the Viewer

If you preferred the Draft Viewer because it provided search and replace capabilities not available in the Viewer, search and replace is now available in the Viewer, including the ability to search hidden rows and column and non-visible layers in multi-dimensional pivot tables. See the topic Finding and Replacing Information in the Viewer for more information.


Opening Old Viewer (.spo) Files

spo files,spo files,spo files
Viewer files,Viewer files,Viewer files
opening old (spo) files,opening old (spo) files,opening old (spo) files
output files,output files,output files
opening old (spo) files,opening old (spo) files,opening old (spo) files

Viewer files created in versions prior to release 16.0 cannot be opened in PASW Statistics 16.0 or later.

On Windows operating systems, you can install the Legacy Viewer. For more information, go to http://support.spss.com/ProductsExt/SPSS/Documentation/Statistics/LegacyViewer/readme.html.


What Happened to My TableLooks?

TableLooks,TableLooks,TableLooks

TableLooks created in earlier versions of PASW Statistics cannot be used in version 16.0 or later. See the topic TableLooks for more information.


What Happened to the Interactive Graphics Editor?

interactive graphics editor,interactive graphics editor,interactive graphics editor

The Interactive Graphics Editor is no longer supported. You can now use one tool (the Chart Editor) to edit all charts. See the topic Editing Charts for more information.


What Happened to My Production Facility Jobs?

Production Facility job files (.spp) created in releases prior to 16.0 will not run in release 16.0 or later. A conversion utility is available to convert Windows and Macintosh Production Facility job files to production jobs (.spj). See the topic Converting Production Facility Files for more information.


What Happened to My Autoscripts?

autoscripts,autoscripts,autoscripts

Custom autoscripts created in releases prior to 16.0 will need to be manually converted in order to run in release 16.0 or later. In addition, the autoscripts provided in releases prior to 16.0 are now available as a set of separate script files. See the topic Compatibility with Versions Prior to 16.0 for more information.


Why Is Text Not Rendered Correctly on Linux?

fonts,fonts,fonts
Linux,Linux,Linux
Asian fonts,Asian fonts,Asian fonts
Linux,Linux,Linux

If you are running Linux and Asian text is not rendered correctly, you need to create a fallback directory for your Asian fonts in the PASW Statistics installation directory.

Change to the _jvm/libs/fonts directory in the PASW Statistics installation directory.

Create a new directory called fallback.

Copy your Asian fonts to the fallback directory. You can also create symbolic links if you don't want to copy the fonts.

Restart PASW Statistics.


Database Access Administrator

Database Access Administrator,Database Access Administrator,Database Access Administrator

The Database Access Administrator facility is no longer supported.


Customizing Output Exported as HTML

htmlfram.txt,htmlfram.txt,htmlfram.txt

The facility for customizing output exported in HTML format using the text file htmlfram.txt is no longer supported. See the Output Management System for information on more flexible and powerful solutions for customizing HTML and other exported output formats.


What Happened to Interactive Charts?

interactive charts,interactive charts,interactive charts
charts,charts,charts
interactive,interactive,interactive

The user interface for interactive charts—previously available from the menus Graphs > Legacy Dialogs > Interactive—has been removed. Please use the Graphboard instead. See the topic Creating and Editing Graphboard Visualizations for more information. You can also create many charts with the Chart Builder. See the topic Building Charts for more information.


How to Get Integration Plug-ins

To get the R Integration Plug-in:

• Windows. Install the PASW Statistics R Essentials package, provided with your PASW Statistics product. It includes R version 2.8 and the R Integration Plug-in.

• Mac and Linux. The installer for the R Integration Plug-in is provided with your PASW Statistics product. If you're installing from the PASW Statistics product DVD, the installer is available from the Plug-ins folder on the DVD. You will first have to install R version 2.8 if it is not already installed. For Mac, the installer for R 2.8 is also provided with your PASW Statistics product, and available from the Plug-ins folder on the DVD. For Linux, you will need to obtain R 2.8 from http://www.r-project.org/. It is recommended to download and install R 2.8.1.

To get the Python Integration Plug-in:

• Windows. Install the PASW Statistics Python Essentials package, provided with your PASW Statistics product. It includes Python version 2.6 and the Python Integration Plug-in.

• Mac and Linux. The installer for the Python Integration Plug-in is provided with your PASW Statistics product. If you're installing from the PASW Statistics product DVD, the installer is available from the Plug-ins folder on the DVD. You will first have to install Python version 2.6 if it is not already installed. For Mac, the installer for Python 2.6 is also provided with your PASW Statistics product, and available from the Plug-ins folder on the DVD. For Linux, you will need to obtain Python 2.6 from http://www.python.org . It is recommended to download and install Python 2.6.2.


Sample Files

sample files,sample files,sample files
location,location,location

The sample files installed with the product can be found in the Samples subdirectory of the installation directory. There is a separate folder within the Samples subdirectory for each of the following languages: English, French, German, Italian, Japanese, Korean, Polish, Russian, Simplified Chinese, Spanish, and Traditional Chinese.

Not all sample files are available in all languages. If a sample file is not available in a language, that language folder contains an English version of the sample file.

Descriptions

Following are brief descriptions of the sample files used in various examples throughout the documentation.

• accidents.sav. This is a hypothetical data file that concerns an insurance company that is studying age and gender risk factors for automobile accidents in a given region. Each case corresponds to a cross-classification of age category and gender.

• adl.sav. This is a hypothetical data file that concerns efforts to determine the benefits of a proposed type of therapy for stroke patients. Physicians randomly assigned female stroke patients to one of two groups. The first received the standard physical therapy, and the second received an additional emotional therapy. Three months following the treatments, each patient's abilities to perform common activities of daily life were scored as ordinal variables.

• advert.sav. This is a hypothetical data file that concerns a retailer's efforts to examine the relationship between money spent on advertising and the resulting sales. To this end, they have collected past sales figures and the associated advertising costs..

• aflatoxin.sav. This is a hypothetical data file that concerns the testing of corn crops for aflatoxin, a poison whose concentration varies widely between and within crop yields. A grain processor has received 16 samples from each of 8 crop yields and measured the alfatoxin levels in parts per billion (PPB).

• aflatoxin20.sav. This data file contains the aflatoxin measurements from each of the 16 samples from yields 4 and 8 from the aflatoxin.sav data file.

• anorectic.sav. While working toward a standardized symptomatology of anorectic/bulimic behavior, researchers (Van der Ham, Meulman, Van Strien, and Van Engeland, 1997) made a study of 55 adolescents with known eating disorders. Each patient was seen four times over four years, for a total of 220 observations. At each observation, the patients were scored for each of 16 symptoms. Symptom scores are missing for patient 71 at time 2, patient 76 at time 2, and patient 47 at time 3, leaving 217 valid observations.

• autoaccidents.sav. This is a hypothetical data file that concerns the efforts of an insurance analyst to model the number of automobile accidents per driver while also accounting for driver age and gender. Each case represents a separate driver and records the driver's gender, age in years, and number of automobile accidents in the last five years.

• band.sav. This data file contains hypothetical weekly sales figures of music CDs for a band. Data for three possible predictor variables are also included.

• bankloan.sav. This is a hypothetical data file that concerns a bank's efforts to reduce the rate of loan defaults. The file contains financial and demographic information on 850 past and prospective customers. The first 700 cases are customers who were previously given loans. The last 150 cases are prospective customers that the bank needs to classify as good or bad credit risks.

• bankloan_binning.sav. This is a hypothetical data file containing financial and demographic information on 5,000 past customers.

• behavior.sav. In a classic example (Price and Bouffard, 1974), 52 students were asked to rate the combinations of 15 situations and 15 behaviors on a 10-point scale ranging from 0="extremely appropriate" to 9="extremely inappropriate." Averaged over individuals, the values are taken as dissimilarities.

• behavior_ini.sav. This data file contains an initial configuration for a two-dimensional solution for behavior.sav.

• brakes.sav. This is a hypothetical data file that concerns quality control at a factory that produces disc brakes for high-performance automobiles. The data file contains diameter measurements of 16 discs from each of 8 production machines. The target diameter for the brakes is 322 millimeters.

• breakfast.sav. In a classic study (Green and Rao, 1972), 21 Wharton School MBA students and their spouses were asked to rank 15 breakfast items in order of preference with 1="most preferred" to 15="least preferred." Their preferences were recorded under six different scenarios, from "Overall preference" to "Snack, with beverage only."

• breakfast-overall.sav. This data file contains the breakfast item preferences for the first scenario, "Overall preference," only.

• broadband_1.sav. This is a hypothetical data file containing the number of subscribers, by region, to a national broadband service. The data file contains monthly subscriber numbers for 85 regions over a four-year period.

• broadband_2.sav. This data file is identical to broadband_1.sav but contains data for three additional months.

• car_insurance_claims.sav. A dataset presented and analyzed elsewhere (McCullagh and Nelder, 1989) concerns damage claims for cars. The average claim amount can be modeled as having a gamma distribution, using an inverse link function to relate the mean of the dependent variable to a linear combination of the policyholder age, vehicle type, and vehicle age. The number of claims filed can be used as a scaling weight.

• car_sales.sav. This data file contains hypothetical sales estimates, list prices, and physical specifications for various makes and models of vehicles. The list prices and physical specifications were obtained alternately from edmunds.com and manufacturer sites.

• car_sales_uprepared.sav. This is a modified version of car_sales.sav that does not include any transformed versions of the fields.

• carpet.sav. In a popular example (Green and Wind, 1973), a company interested in marketing a new carpet cleaner wants to examine the influence of five factors on consumer preference—package design, brand name, price, a Good Housekeeping seal, and a money-back guarantee. There are three factor levels for package design, each one differing in the location of the applicator brush; three brand names (K2R, Glory, and Bissell); three price levels; and two levels (either no or yes) for each of the last two factors. Ten consumers rank 22 profiles defined by these factors. The variable Preference contains the rank of the average rankings for each profile. Low rankings correspond to high preference. This variable reflects an overall measure of preference for each profile.

• carpet_prefs.sav. This data file is based on the same example as described for carpet.sav, but it contains the actual rankings collected from each of the 10 consumers. The consumers were asked to rank the 22 product profiles from the most to the least preferred. The variables PREF1 through PREF22 contain the identifiers of the associated profiles, as defined in carpet_plan.sav.

• catalog.sav. This data file contains hypothetical monthly sales figures for three products sold by a catalog company. Data for five possible predictor variables are also included.

• catalog_seasfac.sav. This data file is the same as catalog.sav except for the addition of a set of seasonal factors calculated from the Seasonal Decomposition procedure along with the accompanying date variables.

• cellular.sav. This is a hypothetical data file that concerns a cellular phone company's efforts to reduce churn. Churn propensity scores are applied to accounts, ranging from 0 to 100. Accounts scoring 50 or above may be looking to change providers.

• ceramics.sav. This is a hypothetical data file that concerns a manufacturer's efforts to determine whether a new premium alloy has a greater heat resistance than a standard alloy. Each case represents a separate test of one of the alloys; the heat at which the bearing failed is recorded.

• cereal.sav. This is a hypothetical data file that concerns a poll of 880 people about their breakfast preferences, also noting their age, gender, marital status, and whether or not they have an active lifestyle (based on whether they exercise at least twice a week). Each case represents a separate respondent.

• clothing_defects.sav. This is a hypothetical data file that concerns the quality control process at a clothing factory. From each lot produced at the factory, the inspectors take a sample of clothes and count the number of clothes that are unacceptable.

• coffee.sav. This data file pertains to perceived images of six iced-coffee brands (Kennedy, Riquier, and Sharp, 1996) . For each of 23 iced-coffee image attributes, people selected all brands that were described by the attribute. The six brands are denoted AA, BB, CC, DD, EE, and FF to preserve confidentiality.

• contacts.sav. This is a hypothetical data file that concerns the contact lists for a group of corporate computer sales representatives. Each contact is categorized by the department of the company in which they work and their company ranks. Also recorded are the amount of the last sale made, the time since the last sale, and the size of the contact's company.

• creditpromo.sav. This is a hypothetical data file that concerns a department store's efforts to evaluate the effectiveness of a recent credit card promotion. To this end, 500 cardholders were randomly selected. Half received an ad promoting a reduced interest rate on purchases made over the next three months. Half received a standard seasonal ad.

• customer_dbase.sav. This is a hypothetical data file that concerns a company's efforts to use the information in its data warehouse to make special offers to customers who are most likely to reply. A subset of the customer base was selected at random and given the special offers, and their responses were recorded.

• customer_information.sav. A hypothetical data file containing customer mailing information, such as name and address.

• customers_model.sav. This file contains hypothetical data on individuals targeted by a marketing campaign. These data include demographic information, a summary of purchasing history, and whether or not each individual responded to the campaign. Each case represents a separate individual.

• customers_new.sav. This file contains hypothetical data on individuals who are potential candidates for a marketing campaign. These data include demographic information and a summary of purchasing history for each individual. Each case represents a separate individual.

• debate.sav. This is a hypothetical data file that concerns paired responses to a survey from attendees of a political debate before and after the debate. Each case corresponds to a separate respondent.

• debate_aggregate.sav. This is a hypothetical data file that aggregates the responses in debate.sav. Each case corresponds to a cross-classification of preference before and after the debate.

• demo.sav. This is a hypothetical data file that concerns a purchased customer database, for the purpose of mailing monthly offers. Whether or not the customer responded to the offer is recorded, along with various demographic information.

• demo_cs_1.sav. This is a hypothetical data file that concerns the first step of a company's efforts to compile a database of survey information. Each case corresponds to a different city, and the region, province, district, and city identification are recorded.

• demo_cs_2.sav. This is a hypothetical data file that concerns the second step of a company's efforts to compile a database of survey information. Each case corresponds to a different household unit from cities selected in the first step, and the region, province, district, city, subdivision, and unit identification are recorded. The sampling information from the first two stages of the design is also included.

• demo_cs.sav. This is a hypothetical data file that contains survey information collected using a complex sampling design. Each case corresponds to a different household unit, and various demographic and sampling information is recorded.

• dmdata.sav. This is a hypothetical data file that contains demographic and purchasing information for a direct marketing company.

• dietstudy.sav. This hypothetical data file contains the results of a study of the "Stillman diet" (Rickman, Mitchell, Dingman, and Dalen, 1974). Each case corresponds to a separate subject and records his or her pre- and post-diet weights in pounds and triglyceride levels in mg/100 ml.

• dischargedata.sav. This is a data file concerning Seasonal Patterns of Winnipeg Hospital Use, (Menec, Roos, Nowicki, MacWilliam, Finlayson, and Black, 1999) from the Manitoba Centre for Health Policy.

• dvdplayer.sav. This is a hypothetical data file that concerns the development of a new DVD player. Using a prototype, the marketing team has collected focus group data. Each case corresponds to a separate surveyed user and records some demographic information about them and their responses to questions about the prototype.

• flying.sav. This data file contains the flying mileages between 10 American cities.

• german_credit.sav. This data file is taken from the "German credit" dataset in the Repository of Machine Learning Databases (Blake and Merz, 1998) at the University of California, Irvine.

• grocery_1month.sav. This hypothetical data file is the grocery_coupons.sav data file with the weekly purchases "rolled-up" so that each case corresponds to a separate customer. Some of the variables that changed weekly disappear as a result, and the amount spent recorded is now the sum of the amounts spent during the four weeks of the study.

• grocery_coupons.sav. This is a hypothetical data file that contains survey data collected by a grocery store chain interested in the purchasing habits of their customers. Each customer is followed for four weeks, and each case corresponds to a separate customer-week and records information about where and how the customer shops, including how much was spent on groceries during that week.

• guttman.sav. Bell (Bell, 1961) presented a table to illustrate possible social groups. Guttman (Guttman, 1968) used a portion of this table, in which five variables describing such things as social interaction, feelings of belonging to a group, physical proximity of members, and formality of the relationship were crossed with seven theoretical social groups, including crowds (for example, people at a football game), audiences (for example, people at a theater or classroom lecture), public (for example, newspaper or television audiences), mobs (like a crowd but with much more intense interaction), primary groups (intimate), secondary groups (voluntary), and the modern community (loose confederation resulting from close physical proximity and a need for specialized services).

• healthplans.sav. This is a hypothetical data file that concerns an insurance group's efforts to evaluate four different health care plans for small employers. Twelve employers are recruited to rank the plans by how much they would prefer to offer them to their employees. Each case corresponds to a separate employer and records the reactions to each plan.

• health_funding.sav. This is a hypothetical data file that contains data on health care funding (amount per 100 population), disease rates (rate per 10,000 population), and visits to health care providers (rate per 10,000 population). Each case represents a different city.

• hivassay.sav. This is a hypothetical data file that concerns the efforts of a pharmaceutical lab to develop a rapid assay for detecting HIV infection. The results of the assay are eight deepening shades of red, with deeper shades indicating greater likelihood of infection. A laboratory trial was conducted on 2,000 blood samples, half of which were infected with HIV and half of which were clean.

• hourlywagedata.sav. This is a hypothetical data file that concerns the hourly wages of nurses from office and hospital positions and with varying levels of experience.

• insurance_claims.sav. This is a hypothetical data file that concerns an insurance company that wants to build a model for flagging suspicious, potentially fraudulent claims. Each case represents a separate claim.

• insure.sav. This is a hypothetical data file that concerns an insurance company that is studying the risk factors that indicate whether a client will have to make a claim on a 10-year term life insurance contract. Each case in the data file represents a pair of contracts, one of which recorded a claim and the other didn't, matched on age and gender.

• judges.sav. This is a hypothetical data file that concerns the scores given by trained judges (plus one enthusiast) to 300 gymnastics performances. Each row represents a separate performance; the judges viewed the same performances.

• kinship_dat.sav. Rosenberg and Kim (Rosenberg and Kim, 1975) set out to analyze 15 kinship terms (aunt, brother, cousin, daughter, father, granddaughter, grandfather, grandmother, grandson, mother, nephew, niece, sister, son, uncle). They asked four groups of college students (two female, two male) to sort these terms on the basis of similarities. Two groups (one female, one male) were asked to sort twice, with the second sorting based on a different criterion from the first sort. Thus, a total of six “sources” were obtained. Each source corresponds to a 15×15 proximity matrix, whose cells are equal to the number of people in a source minus the number of times the objects were partitioned together in that source.

• kinship_ini.sav. This data file contains an initial configuration for a three-dimensional solution for kinship_dat.sav.

• kinship_var.sav. This data file contains independent variables gender, gener(ation), and degree (of separation) that can be used to interpret the dimensions of a solution for kinship_dat.sav. Specifically, they can be used to restrict the space of the solution to a linear combination of these variables.

• mailresponse.sav. This is a hypothetical data file that concerns the efforts of a clothing manufacturer to determine whether using first class postage for direct mailings results in faster responses than bulk mail. Order-takers record how many weeks after the mailing each order is taken.

• marketvalues.sav. This data file concerns home sales in a new housing development in Algonquin, Ill., during the years from 1999–2000. These sales are a matter of public record.

• mutualfund.sav. This data file concerns stock market information for various tech stocks listed on the S&P 500. Each case corresponds to a separate company.

• nhis2000_subset.sav. The National Health Interview Survey (NHIS) is a large, population-based survey of the U.S. civilian population. Interviews are carried out face-to-face in a nationally representative sample of households. Demographic information and observations about health behaviors and status are obtained for members of each household. This data file contains a subset of information from the 2000 survey. National Center for Health Statistics. National Health Interview Survey, 2000. Public-use data file and documentation. ftp://ftp.cdc.gov/pub/Health_Statistics/NCHS/Datasets/NHIS/2000/. Accessed 2003.

• ozone.sav. The data include 330 observations on six meteorological variables for predicting ozone concentration from the remaining variables. Previous researchers (Breiman and Friedman, 1985), (Hastie and Tibshirani, 1990), among others found nonlinearities among these variables, which hinder standard regression approaches.

• pain_medication.sav. This hypothetical data file contains the results of a clinical trial for anti-inflammatory medication for treating chronic arthritic pain. Of particular interest is the time it takes for the drug to take effect and how it compares to an existing medication.

• patient_los.sav. This hypothetical data file contains the treatment records of patients who were admitted to the hospital for suspected myocardial infarction (MI, or "heart attack"). Each case corresponds to a separate patient and records many variables related to their hospital stay.

• patlos_sample.sav. This hypothetical data file contains the treatment records of a sample of patients who received thrombolytics during treatment for myocardial infarction (MI, or "heart attack"). Each case corresponds to a separate patient and records many variables related to their hospital stay.

• polishing.sav. This is the "Nambeware Polishing Times" data file from the Data and Story Library. It concerns the efforts of a metal tableware manufacturer (Nambe Mills, Santa Fe, N. M.) to plan its production schedule. Each case represents a different item in the product line. The diameter, polishing time, price, and product type are recorded for each item.

• poll_cs.sav. This is a hypothetical data file that concerns pollsters' efforts to determine the level of public support for a bill before the legislature. The cases correspond to registered voters. Each case records the county, township, and neighborhood in which the voter lives.

• poll_cs_sample.sav. This hypothetical data file contains a sample of the voters listed in poll_cs.sav. The sample was taken according to the design specified in the poll.csplan plan file, and this data file records the inclusion probabilities and sample weights. Note, however, that because the sampling plan makes use of a probability-proportional-to-size (PPS) method, there is also a file containing the joint selection probabilities (poll_jointprob.sav). The additional variables corresponding to voter demographics and their opinion on the proposed bill were collected and added the data file after the sample as taken.

• property_assess.sav. This is a hypothetical data file that concerns a county assessor's efforts to keep property value assessments up to date on limited resources. The cases correspond to properties sold in the county in the past year. Each case in the data file records the township in which the property lies, the assessor who last visited the property, the time since that assessment, the valuation made at that time, and the sale value of the property.

• property_assess_cs.sav. This is a hypothetical data file that concerns a state assessor's efforts to keep property value assessments up to date on limited resources. The cases correspond to properties in the state. Each case in the data file records the county, township, and neighborhood in which the property lies, the time since the last assessment, and the valuation made at that time.

• property_assess_cs_sample.sav. This hypothetical data file contains a sample of the properties listed in property_assess_cs.sav. The sample was taken according to the design specified in the property_assess.csplan plan file, and this data file records the inclusion probabilities and sample weights. The additional variable Current value was collected and added to the data file after the sample was taken.

• recidivism.sav. This is a hypothetical data file that concerns a government law enforcement agency's efforts to understand recidivism rates in their area of jurisdiction. Each case corresponds to a previous offender and records their demographic information, some details of their first crime, and then the time until their second arrest, if it occurred within two years of the first arrest.

• recidivism_cs_sample.sav. This is a hypothetical data file that concerns a government law enforcement agency's efforts to understand recidivism rates in their area of jurisdiction. Each case corresponds to a previous offender, released from their first arrest during the month of June, 2003, and records their demographic information, some details of their first crime, and the data of their second arrest, if it occurred by the end of June, 2006. Offenders were selected from sampled departments according to the sampling plan specified in recidivism_cs.csplan; because it makes use of a probability-proportional-to-size (PPS) method, there is also a file containing the joint selection probabilities (recidivism_cs_jointprob.sav).

• rfm_transactions.sav. A hypothetical data file containing purchase transaction data, including date of purchase, item(s) purchased, and monetary amount of each transaction.

• salesperformance.sav. This is a hypothetical data file that concerns the evaluation of two new sales training courses. Sixty employees, divided into three groups, all receive standard training. In addition, group 2 gets technical training; group 3, a hands-on tutorial. Each employee was tested at the end of the training course and their score recorded. Each case in the data file represents a separate trainee and records the group to which they were assigned and the score they received on the exam.

• satisf.sav. This is a hypothetical data file that concerns a satisfaction survey conducted by a retail company at 4 store locations. 582 customers were surveyed in all, and each case represents the responses from a single customer.

• screws.sav. This data file contains information on the characteristics of screws, bolts, nuts, and tacks (Hartigan, 1975).

• shampoo_ph.sav. This is a hypothetical data file that concerns the quality control at a factory for hair products. At regular time intervals, six separate output batches are measured and their pH recorded. The target range is 4.5–5.5.

• ships.sav. A dataset presented and analyzed elsewhere (McCullagh and Nelder, 1989) that concerns damage to cargo ships caused by waves. The incident counts can be modeled as occurring at a Poisson rate given the ship type, construction period, and service period. The aggregate months of service for each cell of the table formed by the cross-classification of factors provides values for the exposure to risk.

• site.sav. This is a hypothetical data file that concerns a company's efforts to choose new sites for their expanding business. They have hired two consultants to separately evaluate the sites, who, in addition to an extended report, summarized each site as a "good," "fair," or "poor" prospect.

• siteratings.sav. This is a hypothetical data file that concerns the beta testing of an e-commerce firm's new Web site. Each case represents a separate beta tester, who scored the usability of the site on a scale from 0–20.

• smokers.sav. This data file is abstracted from the 1998 National Household Survey of Drug Abuse and is a probability sample of American households. Thus, the first step in an analysis of this data file should be to weight the data to reflect population trends.

• smoking.sav. This is a hypothetical table introduced by Greenacre (Greenacre, 1984). The table of interest is formed by the crosstabulation of smoking behavior by job category. The variable Staff Group contains the job categories Sr Managers, Jr Managers, Sr Employees, Jr Employees, and Secretaries, plus the category National Average, which can be used as supplementary to an analysis. The variable Smoking contains the behaviors None, Light, Medium, and Heavy, plus the categories No Alcohol and Alcohol, which can be used as supplementary to an analysis.

• storebrand.sav. This is a hypothetical data file that concerns a grocery store manager's efforts to increase sales of the store brand detergent relative to other brands. She puts together an in-store promotion and talks with customers at check-out. Each case represents a separate customer.

• stores.sav. This data file contains hypothetical monthly market share data for two competing grocery stores. Each case represents the market share data for a given month.

• stroke_clean.sav. This hypothetical data file contains the state of a medical database after it has been cleaned using procedures in the Data Preparation option.

• stroke_invalid.sav. This hypothetical data file contains the initial state of a medical database and contains several data entry errors.

• stroke_survival. This hypothetical data file concerns survival times for patients exiting a rehabilitation program post-ischemic stroke face a number of challenges. Post-stroke, the occurrence of myocardial infarction, ischemic stroke, or hemorrhagic stroke is noted and the time of the event recorded. The sample is left-truncated because it only includes patients who survived through the end of the rehabilitation program administered post-stroke.

• stroke_valid.sav. This hypothetical data file contains the state of a medical database after the values have been checked using the Validate Data procedure. It still contains potentially anomalous cases.

• survey_sample.sav. This hypothetical data file contains survey data, including demographic data and various attitude measures.

• tastetest.sav. This is a hypothetical data file that concerns the effect of mulch color on the taste of crops. Strawberries grown in red, blue, and black mulch were rated by taste-testers on an ordinal scale of 1 to 5 (far below to far above average). Each case represents a separate taste-tester.

• telco.sav. This is a hypothetical data file that concerns a telecommunications company's efforts to reduce churn in their customer base. Each case corresponds to a separate customer and records various demographic and service usage information.

• telco_extra.sav. This data file is similar to the telco.sav data file, but the "tenure" and log-transformed customer spending variables have been removed and replaced by standardized log-transformed customer spending variables.

• telco_missing.sav. This data file is a subset of the telco.sav data file, but some of the demographic data values have been replaced with missing values.

• testmarket.sav. This hypothetical data file concerns a fast food chain's plans to add a new item to its menu. There are three possible campaigns for promoting the new product, so the new item is introduced at locations in several randomly selected markets. A different promotion is used at each location, and the weekly sales of the new item are recorded for the first four weeks. Each case corresponds to a separate location-week.

• testmarket_1month.sav. This hypothetical data file is the testmarket.sav data file with the weekly sales "rolled-up" so that each case corresponds to a separate location. Some of the variables that changed weekly disappear as a result, and the sales recorded is now the sum of the sales during the four weeks of the study.

• tree_car.sav. This is a hypothetical data file containing demographic and vehicle purchase price data.

• tree_credit.sav. This is a hypothetical data file containing demographic and bank loan history data.

• tree_missing_data.sav This is a hypothetical data file containing demographic and bank loan history data with a large number of missing values.

• tree_score_car.sav. This is a hypothetical data file containing demographic and vehicle purchase price data.

• tree_textdata.sav. A simple data file with only two variables intended primarily to show the default state of variables prior to assignment of measurement level and value labels.

• tv-survey.sav. This is a hypothetical data file that concerns a survey conducted by a TV studio that is considering whether to extend the run of a successful program. 906 respondents were asked whether they would watch the program under various conditions. Each row represents a separate respondent; each column is a separate condition.

• ulcer_recurrence.sav. This file contains partial information from a study designed to compare the efficacy of two therapies for preventing the recurrence of ulcers. It provides a good example of interval-censored data and has been presented and analyzed elsewhere (Collett, 2003).

• ulcer_recurrence_recoded.sav. This file reorganizes the information in ulcer_recurrence.sav to allow you model the event probability for each interval of the study rather than simply the end-of-study event probability. It has been presented and analyzed elsewhere (Collett, 2003).

• verd1985.sav. This data file concerns a survey (Verdegaal, 1985). The responses of 15 subjects to 8 variables were recorded. The variables of interest are divided into three sets. Set 1 includes age and marital, set 2 includes pet and news, and set 3 includes music and live. Pet is scaled as multiple nominal and age is scaled as ordinal; all of the other variables are scaled as single nominal.

• virus.sav. This is a hypothetical data file that concerns the efforts of an Internet service provider (ISP) to determine the effects of a virus on its networks. They have tracked the (approximate) percentage of infected e-mail traffic on its networks over time, from the moment of discovery until the threat was contained.

• waittimes.sav. This is a hypothetical data file that concerns customer waiting times for service at three different branches of a local bank. Each case corresponds to a separate customer and records the time spent waiting and the branch at which they were conducting their business.

• webusability.sav. This is a hypothetical data file that concerns usability testing of a new e-store. Each case corresponds to one of five usability testers and records whether or not the tester succeeded at each of six separate tasks.

• wheeze_steubenville.sav. This is a subset from a longitudinal study of the health effects of air pollution on children (Ware, Dockery, Spiro III, Speizer, and Ferris Jr., 1984). The data contain repeated binary measures of the wheezing status for children from Steubenville, Ohio, at ages 7, 8, 9 and 10 years, along with a fixed recording of whether or not the mother was a smoker during the first year of the study.

• workprog.sav. This is a hypothetical data file that concerns a government works program that tries to place disadvantaged people into better jobs. A sample of potential program participants were followed, some of whom were randomly selected for enrollment in the program, while others were not. Each case represents a separate program participant.


TABLES and IGRAPH Command Syntax Converter

TABLES,TABLES,TABLES
converting TABLES command syntax to CTABLES,converting TABLES command syntax to CTABLES,converting TABLES command syntax to CTABLES
CTABLES,CTABLES,CTABLES
converting TABLES command syntax to CTABLES,converting TABLES command syntax to CTABLES,converting TABLES command syntax to CTABLES
custom tables,custom tables,custom tables
converting TABLES command syntax to CTABLES,converting TABLES command syntax to CTABLES,converting TABLES command syntax to CTABLES
tables,tables,tables
converting TABLES command syntax to CTABLES,converting TABLES command syntax to CTABLES,converting TABLES command syntax to CTABLES
IGRAPH,IGRAPH,IGRAPH
converting IGRAPH to GGRAPH,converting IGRAPH to GGRAPH,converting IGRAPH to GGRAPH
GGRAPH,GGRAPH,GGRAPH
converting IGRAPH to GGRAPH,converting IGRAPH to GGRAPH,converting IGRAPH to GGRAPH
syntax converter,syntax converter,syntax converter

If you have command syntax files that contain TABLES syntax that you want to convert to CTABLES syntax and/or IGRAPH syntax that you want to convert to GGRAPH syntax, a simple utility program is provided to help you get started with the conversion process. There are, however, significant functionality differences between TABLES and CTABLES and between IGRAPH and GGRAPH. It is likely that you will find that the utility program cannot convert some of your TABLES and IGRAPH syntax jobs or may generate CTABLES and GGRAPH syntax that produces tables and graphs that do not closely resemble the originals produced by the TABLES and IGRAPH commands. For most tables, you can edit the converted syntax to produce a table closely resembling the original.

The utility program is designed to:

• Create a new syntax file from an existing syntax file. The original syntax file is not altered.

• Convert only TABLES and IGRAPH commands in the syntax file. Other commands in the file are not altered.

• Retain the original TABLES and IGRAPH syntax in commented form.

• Identify the beginning and end of each conversion block with comments.

• Identify TABLES and IGRAPH syntax commands that could not be converted.

• Convert command syntax files that follow either interactive or production mode syntax rules.

This utility cannot convert commands that contain errors. The following other limitations also apply.

TABLES Limitations

The utility program may convert TABLES commands incorrectly under some circumstances, including TABLES commands that contain:

• Parenthesized variable names with the initial letters "sta" or "lab" in the TABLES subcommand if the variable is parenthesized by itself—for example, var1 by (statvar) by (labvar). These will be interpreted as the (STATISTICS) and (LABELS) keywords.

• SORT subcommands that use the abbreviations A or D to indicate ascending or descending sort order. These will be interpreted as variable names.

The utility program cannot convert TABLES commands that contain:

• Syntax errors.

• OBSERVATION subcommands that refer to a range of variables using the TO keyword (for example, var01 TO var05).

• String literals broken into segments separated by plus signs (for example, TITLE "My" + "Title").

• Macro calls that, in the absence of macro expansion, would be invalid TABLES syntax. Since the converter does not expand the macro calls, it treats them as if they were simply part of the standard TABLES syntax.

The utility program will not convert TABLES commands contained in macros. All macros are unaffected by the conversion process.

IGRAPH Limitations

IGRAPH changed significantly in release 16. Because of these changes, some subcommands and keywords in IGRAPH syntax created before that release may not be honored. See IGRAPH for the complete revision history.

The conversion utility program may generate additional syntax that it stores in the INLINETEMPLATE keyword within the GGRAPH syntax. This keyword is created only by the conversion program. Its syntax is not intended to be user-editable.

Using the Conversion Utility Program

The conversion utility program, SyntaxConverter.exe, can be found in the installation directory. It is designed to run from a command prompt. The general form of the command is:

syntaxconverter.exe [path]/inputfilename.sps [path]/outputfilename.sps

You must run this command from the installation directory.

If any directory names contain spaces, enclose the entire path and filename in quotation marks, as in:

syntaxconverter.exe /myfiles/oldfile.sps "/new files/newfile.sps"

Interactive versus Production Mode Command Syntax Rules

The conversion utility program can convert command files that use interactive or production mode syntax rules.

Interactive. The interactive syntax rules are:

• Each command begins on a new line.

• Each command ends with a period (.).

Production mode. The Production Facility and commands in files accessed via the INCLUDE command in a different command file use production mode syntax rules:

• Each command must begin in the first column of a new line.

• Continuation lines must be indented at least one space.

• The period at the end of the command is optional.

If your command files use production mode syntax rules and don't contain periods at the end of each command, you need to include the command line switch -b (or /b) when you run SyntaxConverter.exe, as in:

syntaxconverter.exe -b /myfiles/oldfile.sps /myfiles/newfile.sps

SyntaxConverter Script (Windows Only)

On Windows, you can also run the syntax converter with the script SyntaxConverter.wwd, located in the Samples directory of the installation directory.

From the menus choose:

Utilities
Run Script...

Navigate to the Samples directory and select SyntaxConverter.wwd.

This will open a simple dialog box where you can specify the names and locations of the old and new command syntax files.


Accessibility

accessibility,accessibility,accessibility

This section provides an overview of alternative methods for accessing the functionality of the product. More specifically, the following topics are covered:

• Keyboard navigation of the software, including dialog boxes, the Data Editor, the output Viewer, and the Help system

• Special issues for visually impaired users

• Special issues for blind users

• Special considerations and workaround solutions

Where available, instructions on how to obtain alternative documentation are provided.

Related Topics

Keyboard Navigation
Accessibility for the Visually Impaired
Accessibility for Blind Users
Special Considerations
Alternative Documentation
Accessible Tree Map


Keyboard Navigation

accessibility,accessibility,accessibility
keyboard navigation,keyboard navigation,keyboard navigation
keyboard navigation,keyboard navigation,keyboard navigation

Much of the product's functionality is accessible via the keyboard. At its most basic level, you can press the Alt key (Windows/Linux) or Control+F2 (Mac) to activate window menus, and you can press the Tab key to navigate dialog box controls. However, there are special issues related to each of the product's main windows and helpful hints for navigating dialog boxes.

This section will cover the highlights of keyboard accessibility, from opening a data file to requesting an analysis through the dialog boxes to working with output. Additionally, more lists of keyboard shortcuts are provided for even more efficient navigation.

Related Topics

Accessibility
Accessibility for the Visually Impaired
Accessibility for Blind Users
Special Considerations
Alternative Documentation
Accessible Tree Map
Navigating the Data Editor
Navigating Dialog Boxes
Dialog Box Navigation Special Topic: Custom Tables
Dialog Box Navigation Special Topic: Chart Builder
Dialog Box Keyboard Shortcuts
Navigating the Output Viewer
Navigating Help/Tutorials
Miscellaneous Keyboard Shortcuts


Navigating the Data Editor

keyboard navigation,keyboard navigation,keyboard navigation
Data Editor,Data Editor,Data Editor
Data Editor,Data Editor,Data Editor
keyboard navigation,keyboard navigation,keyboard navigation

The first time you open a data file, the focus in the Data Editor is on the cell in the first column of the first row on the Data View tab.

Data view. Use the arrow keys to move around. You can simply type data values into cells of the Data Editor.

Variable view. Ctrl+T (Windows/Linux) or Command+T (Mac) switches you between the Data view and the Variable view. In the Variable view, press the spacebar to access the Variable Type, Value Labels, and Missing Values dialog boxes.

Saving changes. After making edits, use Ctrl+S (Windows/Linux) or Command+S (Mac) to save your changes.

Running procedures. Dialog boxes for running procedures are accessed from the menus. In many cases, the main menus are divided into submenus based on the type of procedure. After activating the window menus with Alt key (Windows/Linux) or Control+F2 (Mac), you can use the arrow keys to navigate the menus and submenus.

Related Topics

Keyboard Navigation
Navigating Dialog Boxes
Dialog Box Navigation Special Topic: Custom Tables
Dialog Box Navigation Special Topic: Chart Builder
Dialog Box Keyboard Shortcuts
Navigating the Output Viewer
Navigating Help/Tutorials
Miscellaneous Keyboard Shortcuts
Data Editor Keyboard Shortcuts
Data Editor


Data Editor Keyboard Shortcuts

accessibility,accessibility,accessibility
keyboard shortcuts,keyboard shortcuts,keyboard shortcuts
keyboard shortcuts,keyboard shortcuts,keyboard shortcuts
for the Data Editor,for the Data Editor,for the Data Editor
hot keys,hot keys,hot keys
for the Data Editor,for the Data Editor,for the Data Editor
File Commands
On Windows/Linux, press | On Mac, press | To
Ctrl+N | Command+N | Start a new file
Ctrl+O | Command+O | Open an existing file
Ctrl+S | Command+S | Save the active dataset to a file
Ctrl+P | Command+P | Print the active file
Ctrl+. | Command+. | Stops the processor
Browsing Commands
On Windows/Linux, press | On Mac, press | To
Tab; Right arrow | Tab; Right arrow | Next variable (right)
Shift+Tab; Left arrow | Shift+Tab; Left arrow | Previous variable (left)
Enter; Down arrow | Enter; Down arrow | Next case (down)
Up arrow | Up arrow | Previous case (up)
Ctrl+Left arrow | Control+Left arrow | First variable
Ctrl+Right arrow | Control+Right arrow | Last variable
Ctrl+Up arrow | Control+Up arrow | First case
Ctrl+Down arrow | Control+Down arrow | Last case
Ctrl+Home | Control+Home | First variable, first case
Ctrl+End | Control+End | Last variable, last case
Page Down/Page Up | Page Down/Page Up | Scroll down/up a page
Selection Commands
On Windows/Linux, press | On Mac, press | To
Shift+Spacebar | Shift+Spacebar | Select current case (row)
Ctrl+Spacebar | Control+Spacebar | Select current variable (column)
Shift+Left arrow | Shift+Left arrow | Select current cell and cell to left
Shift+Right arrow | Shift+Right arrow | Select current cell and cell to right
Shift+Up arrow | Shift+Up arrow | Select current cell and cell above
Shift+Down arrow | Shift+Down arrow | Select current cell and cell below
Editing Commands
On Windows/Linux, press | On Mac, press | To
Ctrl+C | Command+C | Copy selection
Ctrl+X | Command+X | Cut selection
Ctrl+V | Command+V | Paste selection
Delete | Delete | Delete selection
Ctrl+Z | Command+Z | Undo an action in a previously edited cell
Ctrl+Y | Command+Y | Redo an action in a previously edited cell
Ctrl+F | Command+F | Find data within a variable
In Edit mode:
Press | To
F2 | Edit contents of current cell (Enter Edit mode)
Enter | Finish editing cell contents (Exit Edit mode)
Right arrow or Left arrow | Next/previous character
Shift+Right arrow or Shift+Left arrow | Extend selection
Tab | Next cell (right); Exit Edit mode
Shift+Tab | Previous cell (left); Exit Edit mode
Home | Move to start of value
End | Move to end of value
Shift+Home | Select to start of value
Shift+End | Select to end of value
Esc | Restore cell contents
In Variable view:
On Windows/Linux, press | On Mac, press | To
Ctrl+T | Command+T | Switch between Data/Variable view
Spacebar | Spacebar | Activate Variable Type, Value Labels, and Missing Values dialog boxes, when in the Type, Values, and Missing columns, respectively
Alt+Down arrow | Alt+Down arrow | Activate drop-down lists for Align and Measure columns

Related Topics

Dialog Box Keyboard Shortcuts
Output Viewer Keyboard Shortcuts
Miscellaneous Keyboard Shortcuts
Navigating the Data Editor


Navigating Dialog Boxes

keyboard navigation,keyboard navigation,keyboard navigation
dialog boxes,dialog boxes,dialog boxes

The initial focus in a dialog box is generally placed on the control in the upper left area. Thus, for the majority of procedures, the initial focus in the main dialog box is placed in the source variable list. From there, you can access other controls in the dialog box by pressing the Tab key. Alternatively, you can use the dialog box keyboard shortcuts.

The main dialog box in most procedures can be divided into four parts:

• Source/target lists. This includes the source variable list, the move-it (or copy-it) buttons, and their corresponding target lists and controls. Pressing the Tab key, the flow of control passes from the source list to the first move-it button. Pressing the spacebar moves the selected variable in the source list to the target list. If moving a variable into a target list enables a related control, that control comes next in the tab order, before the next move-it button. Moreover, when there are several target lists and focus is on a move-it button, you can use the up and down arrow keys to move directly from one move-it button to another.

• Main dialog box controls. This section contains any controls that are not related to a specific target list. It includes any buttons that expand the dialog box. When the dialog box is expanded, the exposed controls are added to the end of the tab order of this section.

• Subdialog box buttons. The buttons that open subdialog boxes appear in the tab order from left to right or top to bottom.

• OK/Paste button group. If OK and Paste are enabled, they appear first in the tab order within this section. If they are not enabled, then Reset is first in the section.

The placement of a control in the tab order is determined by the section it belongs to, the type of control it is, and its placement in the dialog box. Note that some dialog boxes may not have all types of controls or the same number of controls.

See the topic Special Considerations: Text Wizard for more information.

Related Topics

Keyboard Navigation
Navigating the Data Editor
Dialog Box Navigation Special Topic: Custom Tables
Dialog Box Navigation Special Topic: Chart Builder
Dialog Box Keyboard Shortcuts
Navigating the Output Viewer
Navigating Help/Tutorials
Miscellaneous Keyboard Shortcuts


Dialog Box Navigation Special Topic: Custom Tables

Note: Custom Tables is part of the Custom Tables add-on option that is available only if you have purchased and installed the Custom Tables option.

The canvas in the Custom Tables dialog box requires some special consideration. As with other main dialog boxes, the initial focus is placed in the source variable list.

Switching tabs. Use the Tab key to move focus to the tabs, and then use the left and right arrow keys to switch tabs.

Moving about the canvas. The Tab key moves focus between the row, column, and layer areas. Use the arrow keys to move focus within an area. Alternatively, you can use Alt+W, Alt+O, and Alt+Y to move directly to the rows, columns, or layers, respectively.

Building tables. To add a variable to the canvas, select it in the source list, press Ctrl+C (Windows/Linux) or Command+C (Mac) to copy it, then navigate to an area, and press Ctrl+V (Windows/Linux) or Command+V (Mac) to paste the variable. To rearrange variables in the canvas, press Ctrl+X (Windows/Linux) or Command+X (Mac) to cut and Ctrl+V (Windows/Linux) or Command+V (Mac) to paste. In general, all table building and modification operations are available via the context menu, which is accessed on Windows and Linux by pressing Shift+F10 in the source list, canvas, or layers.

On the canvas pane, the context menu for the variable that has focus provides a Paste submenu with options to paste above/below for stacking or right/left for nesting.

Related Topics

Keyboard Navigation
Navigating the Data Editor
Navigating Dialog Boxes
Dialog Box Navigation Special Topic: Chart Builder
Dialog Box Keyboard Shortcuts
Navigating the Output Viewer
Navigating Help/Tutorials
Miscellaneous Keyboard Shortcuts


Dialog Box Navigation Special Topic: Chart Builder

The canvas in the Chart Builder dialog box requires some special consideration. As with other main dialog boxes, the initial focus is placed in the source variable list.

Moving about the canvas. When the canvas has focus, use the arrow keys to navigate to specific drop zones.

Building charts. To add a variable to the canvas, select it in the source list, press Ctrl+C (Windows/Linux) or Command+C (Mac) to copy it, then navigate to a drop zone, and press Ctrl+V (Windows/Linux) or Command+V (Mac) to paste the variable. In general, all chart building and modification operations are available via the context menu, which is accessed on Windows and Linux by pressing Shift+F10 in the canvas.

Related Topics

Keyboard Navigation
Navigating the Data Editor
Navigating Dialog Boxes
Dialog Box Navigation Special Topic: Custom Tables
Dialog Box Keyboard Shortcuts
Navigating the Output Viewer
Navigating Help/Tutorials
Miscellaneous Keyboard Shortcuts


Dialog Box Keyboard Shortcuts

accessibility,accessibility,accessibility
keyboard shortcuts,keyboard shortcuts,keyboard shortcuts
keyboard shortcuts,keyboard shortcuts,keyboard shortcuts
for dialog boxes,for dialog boxes,for dialog boxes
hot keys,hot keys,hot keys
for dialog boxes,for dialog boxes,for dialog boxes
Dialog Box Commands
On Windows/Linux, press | On Mac, press | To
Alt+[underlined letter] | N/A | Activate a control
Tab | Tab | Next control
Shift+Tab | Shift+Tab | Previous control
Spacebar | Spacebar | "Click" the active control
Esc | Esc | Cancel dialog box
Ctrl+A | Command+A | Select all items in list box
Ctrl+Up arrow | Control+Up arrow | Move list item down
Ctrl+Down arrow | Control+Down arrow | Move list item up

Arrow keys allow you to move within a "group" of controls, whether they are grouped check boxes, radio button selections, or drop-down selections.

Related Topics

Data Editor Keyboard Shortcuts
Output Viewer Keyboard Shortcuts
Miscellaneous Keyboard Shortcuts
Dialog Box Navigation Special Topic: Custom Tables
Dialog Box Navigation Special Topic: Chart Builder
Navigating Help/Tutorials


Navigating the Output Viewer

keyboard navigation,keyboard navigation,keyboard navigation
output Viewer,output Viewer,output Viewer

The initial focus in the Viewer is placed on the first object of the last procedure run. This is generally a title. From there you can use the arrow keys to scroll up and down the output tree; in general, navigating the tree is intended to be functionally similar to navigating Windows Explorer.

To activate a table or chart in the output viewer, use the Edit Content submenu on the Viewer's Edit menu. Close the object using its menus.

See the topic Special Considerations: Output Viewer for more information.

Related Topics

Keyboard Navigation
Navigating the Data Editor
Navigating Dialog Boxes
Dialog Box Navigation Special Topic: Custom Tables
Dialog Box Navigation Special Topic: Chart Builder
Dialog Box Keyboard Shortcuts
Navigating Help/Tutorials
Miscellaneous Keyboard Shortcuts
Output Viewer Keyboard Shortcuts
Viewer


Output Viewer Keyboard Shortcuts

accessibility,accessibility,accessibility
keyboard shortcuts,keyboard shortcuts,keyboard shortcuts
keyboard shortcuts,keyboard shortcuts,keyboard shortcuts
for the Viewer,for the Viewer,for the Viewer
hot keys,hot keys,hot keys
for the Viewer,for the Viewer,for the Viewer
File Commands
On Windows/Linux, press | On Mac, press | To
Ctrl+N | Command+N | Start a new file
Ctrl+O | Command+O | Open an existing file
Ctrl+S | Command+S | Save the active output to a file
Ctrl+P | Command+P | Print the active file
Browsing Commands
Press | To
Down arrow | Next object (down)
Up arrow | Previous object (up)
Right arrow | Display current selection if it's collapsed, or select first subfolder
Left arrow | Collapse current selection if it's expanded, or select parent folder
Home | First object
End | Last object
Page Down/Page Up | Scroll down/up a screen
F6 or Tab | Move between panes
Selection Commands
On Windows/Linux, press | On Mac, press | To
Ctrl+A | Command+N | Select all
Space | Space | Select the item with focus
Ctrl+Space | Control+Space | Add/remove item with focus to selection
Enter | Enter | Activates object with focus
Editing Commands
On Windows/Linux, press | On Mac, press | To
Ctrl+C | Command+C | Copy selection
Ctrl+X | Command+X | Cut selection
Ctrl+V | Command+V | Paste selection
Delete | Delete | Delete selection
Ctrl+Z | Command+Z | Undo an action

Related Topics

Data Editor Keyboard Shortcuts
Dialog Box Keyboard Shortcuts
Miscellaneous Keyboard Shortcuts
Navigating the Output Viewer


Navigating Help/Tutorials

keyboard navigation,keyboard navigation,keyboard navigation
Help/tutorials,Help/tutorials,Help/tutorials

Documentation comes in a variety of formats, including PDF, WinHelp, Microsoft HTML Help, and dynamic HTML. All electronic documentation components provided with the software are keyboard-accessible using the built-in keyboard navigation provided with Acrobat Reader, WinHelp, and Internet Explorer, and use a "logical" tabbing order.

See the topic Special Considerations: Documentation Components for more information.

Related Topics

Keyboard Navigation
Navigating the Data Editor
Navigating Dialog Boxes
Dialog Box Navigation Special Topic: Custom Tables
Dialog Box Navigation Special Topic: Chart Builder
Dialog Box Keyboard Shortcuts
Navigating the Output Viewer
Miscellaneous Keyboard Shortcuts


Miscellaneous Keyboard Shortcuts

accessibility,accessibility,accessibility
keyboard shortcuts,keyboard shortcuts,keyboard shortcuts
keyboard shortcuts,keyboard shortcuts,keyboard shortcuts
miscellaneous,miscellaneous,miscellaneous
hot keys,hot keys,hot keys
miscellaneous,miscellaneous,miscellaneous
Miscellaneous Commands
On Windows/Linux, press | On Mac, press | To
Ctrl+R | Command+R | Run selection as command
Ctrl+G | Control+G | Run Pending Transforms
Esc | Esc | Cancel dialog box

Related Topics

Keyboard Navigation
Navigating the Data Editor
Navigating Dialog Boxes
Dialog Box Navigation Special Topic: Custom Tables
Dialog Box Navigation Special Topic: Chart Builder
Dialog Box Keyboard Shortcuts
Navigating the Output Viewer
Navigating Help/Tutorials
Data Editor Keyboard Shortcuts
Output Viewer Keyboard Shortcuts


Accessibility for the Visually Impaired

accessibility,accessibility,accessibility
visually impaired users,visually impaired users,visually impaired users

You can specify a number of properties to enhance your ability to use the software.

Help Components Viewed in a Browser

The online Help, tutorial, and case studies honor browser override settings, such as font size, color, and background color.

To set display options in Internet Explorer, from the Tools menu choose Internet Options.

The General tab contains subdialog boxes for setting colors, fonts, and other accessibility options.

Help Components Viewed in Acrobat Reader

You have control over magnification in PDF files viewed in Acrobat Reader.

To set magnification in Acrobat Reader, from the View menu choose Zoom To.

The Zoom To dialog box allows you to set the magnification.

See the topic Special Considerations for more information.

Related Topics

Accessibility
Keyboard Navigation
Accessibility for Blind Users
Special Considerations
Alternative Documentation
Accessible Tree Map


Accessibility for Blind Users

accessibility,accessibility,accessibility
blind users,blind users,blind users
screen readers,screen readers,screen readers
JAWS,JAWS,JAWS

Support for blind users is predominately dependent on the use of a screen reader. PASW Statistics has been tested with JAWS for Windows.

Related Topics

Accessibility
Keyboard Navigation
Accessibility for the Visually Impaired
Special Considerations
Alternative Documentation
Accessible Tree Map
Assistive Technology Software


Assistive Technology Software

screen reader,screen reader,screen reader

PASW Statistics offers accessibility for all users, as well as specific support for users with visual and other functional impairments. This document describes how to enable assistive technology software with PASW Statistics.

Related Topics

Accessibility for Blind Users
Windows Software
Mac OS Software
Linux Software


Windows Software

JAWS,JAWS,JAWS
enabling,enabling,enabling
screen reader,screen reader,screen reader
Windows,Windows,Windows
Java Access Bridge,Java Access Bridge,Java Access Bridge

PASW Statistics has been tested with JAWS®. To enable JAWS and other assistive technology products to work with PASW Statistics, you need to:

Set the location of the Java Access Bridge.

Replace the Java accessibility.properties file.

For JAWS, copy the JAWS dictionary file from the DVD.

Setting the Location of the Java Access Bridge

From the Start menu, open the Control Panel.

Double-click the System icon.

In the System Properties dialog box, click the Advanced tab.

Click Environment Variables.

In the Environment Variables dialog box, scroll through the System Variables list and select the Path variable.

Click Edit.

At the beginning of the Variable Value text box, type the path to the PASW Statistics installation folder followed by \JRE\bin;. For example, if PASW Statistics is installed in C:\Program Files\SPSSInc\PASWStatistics18, type:

C:\Program Files\SPSSInc\PASWStatistics18\JRE\bin;

Click OK.

Replacing the Java accessibility.properties File

Go to the \JRE\lib folder in the PASW Statistics installation folder. For example, if PASW Statistics is installed in the folder C:\Program Files\SPSSInc\PASWStatistics18, go to C:\Program Files\SPSSInc\PASWStatistics18\JRE\lib.

Rename the accessibility.properties file or move it to a different folder.

Go to the Windows/Accessibility folder on the DVD and copy the accessibility.properties file.

Paste the file into the \JRE\lib folder in the PASW Statistics installation folder.

The Java Access Bridge will load the next time you launch PASW Statistics.

Copying the JAWS Dictionary File

We have created a new dictionary file for use with JAWS 8.0. It has not been tested with other versions of JAWS. Although you are not required to use the dictionary file, it contains the correct pronunciations of statistical terms that JAWS mispronounces. In addition, it removes “dashes” from a number of terms. For example, if you use the dictionary, “chi-square” is read as “chi square” rather than “chi dash square.”

Go to the Windows/Accessibility folder on the DVD and copy the .jdf file.

Paste the file into the folder that contains your JAWS script files.

Launch JAWS.

Launch PASW Statistics.

Open a data file.

From the menus choose:

Analyze
One-Sample T Test

If the dictionary file is being used, JAWS reads “One Sample T Test” instead of “One dash Sample T Test.”

Related Topics

Assistive Technology Software
Mac OS Software
Linux Software


Mac OS Software

screen reader,screen reader,screen reader
Mac OS,Mac OS,Mac OS

Mac OS includes VoiceOver, which is an accessibility interface that includes screen-reading capabilities. Java support is built into VoiceOver, so no special configuration is required. Refer to Mac Help for more information.

Related Topics

Assistive Technology Software
Windows Software
Linux Software


Linux Software

screen reader,screen reader,screen reader
Linux,Linux,Linux

Linux provides several screen-reading options. You must install and enable the Java Access Bridge before using the screen-reading software. Refer to your distribution's documentation for more information.

Related Topics

Assistive Technology Software
Windows Software
Mac OS Software


Special Considerations

There are several issues in the product and documentation that deserve special attention, as outlined below.

• While in PASW Statistics, do not try to start the JAWS Script Manager by using the Insert+O keystroke because it may cause a change in data in the cell that has focus. The letter O may be placed in the data cell instead of opening the Script Manager. Use the JAWS menu to open the Script Manager instead.

• Although we are working to make PASW Statistics accessible to all assistive technologies, PASW Statistics has been tested only with the JAWS screen reader software on Windows and VoiceOver on the Mac.

• Interactive graphics. The interactive graphics system (Graphs menu, Legacy Dialogs, Interactive) is not keyboard- or screen-reader accessible.

Additional tips for use are discussed at length in the following topics.

Related Topics

Accessibility
Keyboard Navigation
Accessibility for the Visually Impaired
Accessibility for Blind Users
Alternative Documentation
Accessible Tree Map
Special Considerations: Data Editor
Special Considerations: Text Wizard
Special Considerations: Database Wizard
Special Considerations: Output Viewer
Special Considerations: Documentation Components


Special Considerations: Data Editor

Variable information. To get information about the variables in the dataset, press Alt, U, R (Windows/Linux) or press Control+F2, U, Return, V, Return (Mac) to open the Variables information dialog box. This dialog box contains information about the variable name, the variable label, the type, the values defined as missing, the measurement level, and the value labels. There is a blank line between the measurement level and the beginning of the list of value labels, so press the down arrow key twice to begin hearing the value labels.

Related Topics

Special Considerations
Special Considerations: Text Wizard
Special Considerations: Database Wizard
Special Considerations: Output Viewer
Special Considerations: Documentation Components


Special Considerations: Text Wizard

Text file format. The Text Wizard uses a control that shows the format of the text file being imported. This control is not supported by JAWS. However, you can use your JAWS cursor to explore this control.

Related Topics

Special Considerations
Special Considerations: Data Editor
Special Considerations: Database Wizard
Special Considerations: Output Viewer
Special Considerations: Documentation Components


Special Considerations: Database Wizard

Database Wizard,Database Wizard,Database Wizard
keyboard navigation for selecting tables and fields,keyboard navigation for selecting tables and fields,keyboard navigation for selecting tables and fields
specifying relationships,specifying relationships,specifying relationships
accessibility,accessibility,accessibility
Database Wizard,Database Wizard,Database Wizard
selecting tables and fields in the Database Wizard,selecting tables and fields in the Database Wizard,selecting tables and fields in the Database Wizard
specifying relationships in the Database Wizard,specifying relationships in the Database Wizard,specifying relationships in the Database Wizard

Select Tables dialog box. To select tables and fields, use the arrow keys to navigate the expandable/collapsible list of tables and fields. To select an entire table, use the up and down arrow keys to navigate to that table and press Enter to select that table. To select individual fields from a table, use the up and down arrow keys to navigate to that table, then click the right arrow key to expand the view to display the fields in that table. Then use the up and down arrow keys and the Enter key to select individual fields.

Specify Relationships dialog box. You can add joins using only the keyboard. Use the Tab key to navigate to the first table. Then use the Up and Down arrow keys to select a specific field in the table. Repeat the process for the second table. Then use the Tab key to move to the Join Type drop-down list and use the Up and Down arrow keys to choose a join type. Finally, press Tab and then press the spacebar when the Join button is selected.

Related Topics

Special Considerations
Special Considerations: Data Editor
Special Considerations: Text Wizard
Special Considerations: Output Viewer
Special Considerations: Documentation Components


Special Considerations: Output Viewer

Output is not screen-reader accessible. However, you can export tables and text output to various formats, including Word, Excel, text, and HTML. To export output, select the objects you want to export and press Alt, F, T (Windows/Linux) or press Control+F2, F, Return, E, Return (Mac) to open the Export Output dialog box.

Related Topics

Special Considerations
Special Considerations: Data Editor
Special Considerations: Text Wizard
Special Considerations: Database Wizard
Special Considerations: Documentation Components


Special Considerations: Documentation Components

Tutorials and case studies. Tutorials and case studies use dynamic HTML, which is not handled well by current screen readers. Alternative versions accessible to blind users are available on request.

Related Topics

Special Considerations
Special Considerations: Data Editor
Special Considerations: Text Wizard
Special Considerations: Database Wizard
Special Considerations: Output Viewer


Alternative Documentation

accessibility,accessibility,accessibility
alternative documentation,alternative documentation,alternative documentation

Accessible, electronic PDF versions of the Brief Guide, tutorials, case studies, and enhanced versions of the PDF syntax reference material (tagged, structured PDF with text descriptions for all graphics) are available on request.

Send e-mail to support@spss.com or call 312-651-3410 to request alternative documentation.

Related Topics

Accessibility
Keyboard Navigation
Accessibility for the Visually Impaired
Accessibility for Blind Users
Special Considerations
Accessible Tree Map


Codebook

Codebook,Codebook,Codebook
multiple response sets,multiple response sets,multiple response sets
Codebook,Codebook,Codebook
dictionary,dictionary,dictionary
Codebook,Codebook,Codebook

This feature requires the Statistics Base option.

Codebook reports the dictionary information -- such as variable names, variable labels, value labels, missing values -- and summary statistics for all or specified variables and multiple response sets in the active dataset. For nominal and ordinal variables and multiple response sets, summary statistics include counts and percents. For scale variables, summary statistics include mean, standard deviation, and quartiles.

Note: Codebook ignores split file status. This includes split-file groups created for multiple imputation of missing values (available in the Missing Values add-on option). For more information on split-file processing, see Split File. For more information on multiple imputation of missing values, see Multiple Imputation.

To Obtain a Codebook Collapse Hide details

To Obtain a Codebook

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Reports
Codebook

Click the Variables tab.

Select one or more variables and/or multiple response sets.

Optionally, you can:

• Control the variable information that is displayed.

• Control the statistics that are displayed (or exclude all summary statistics).

• Control the order in which variables and multiple response sets are displayed.

• Change the measurement level for any variable in the source list in order to change the summary statistics displayed. See the topic Codebook Statistics Tab for more information.

This dialog pastes CODEBOOK command syntax.

Changing Measurement Level Collapse Hide details

Changing Measurement Level

You can temporarily change the measurement level for variables. (You cannot change the measurement level for multiple response sets. They are always treated as nominal.)

Right-click a variable in the source list.

Select a measurement level from the pop-up context menu.

This changes the measurement level temporarily. In practical terms, this is only useful for numeric variables. The measurement level for string variables is restricted to nominal or ordinal, which are both treated the same by the Codebook procedure.

To permanently change the measurement level for a variable, see Variable Measurement Level.

Related Topics

Codebook Output Tab
Codebook Statistics Tab
CODEBOOK


Codebook Output Tab

Codebook,Codebook,Codebook
output,output,output

The Output tab controls the variable information included for each variable and multiple response set, the order in which the variables and multiple response sets are displayed, and the contents of the optional file information table.

Variable Information Collapse Hide details

Variable Information

This controls the dictionary information displayed for each variable.

Position. An integer that represents the position of the variable in file order. This is not available for multiple response sets.

Label. The descriptive label associated with the variable or multiple response set.

Type. Fundamental data type. This is either Numeric, String, or Multiple Response Set.

Format. The display format for the variable, such as A4, F8.2, or DATE11. This is not available for multiple response sets.

Measurement level. The possible values are Nominal, Ordinal, Scale, and Unknown. The value displayed is the measurement level stored in the dictionary and is not affected by any temporary measurement level override specified by changing the measurement level in the source variable list on the Variables tab. This is not available for multiple response sets.

Note: The measurement level for numeric variables may be "unknown" prior to the first data pass when the measurement level has not been explicitly set, such as data read from an external source or newly created variables.See the topic Variable Measurement Level for more information.

Role. Some dialogs support the ability to pre-select variables for analysis based on defined roles. See the topic Roles for more information.

Value labels. Descriptive labels associated with specific data values. See the topic Value Labels for more information.

• If Count or Percent is selected on the Statistics tab, defined value labels are included in the output even if you don't select Value labels here.

• For multiple dichotomy sets, "value labels" are either the variable labels for the elementary variables in the set or the labels of counted values, depending on how the set is defined. See the topic Multiple Response Sets for more information.

Missing values. User-defined missing values. See the topic Missing Values for more information. If Count or Percent is selected on the Statistics tab, defined value labels are included in the output even if you don't select Missing values here. This is not available for multiple response sets.

Custom attributes. User-defined custom variable attributes. Output includes both the names and values for any custom variable attributes associated with each variable. See the topic Creating Custom Variable Attributes for more information. This is not available for multiple response sets.

Reserved attributes. Reserved system variable attributes. You can display system attributes, but you should not alter them. System attribute names start with a dollar sign ($) . Non-display attributes, with names that begin with either "@" or "$@", are not included. Output includes both the names and values for any system attributes associated with each variable. This is not available for multiple response sets.

File Information Collapse Hide details

File Information

The optional file information table can include any of the following file attributes:

File name. Name of the PASW Statistics data file. If the dataset has never been saved in PASW Statistics format, then there is no data file name. (If there is no file name displayed in the title bar of the Data Editor window, then the active dataset does not have a file name.)

Location. Directory (folder) location of the PASW Statistics data file. If the dataset has never been saved in PASW Statistics format, then there is no location.

Number of cases. Number of cases in the active dataset. This is the total number of cases, including any cases that may be excluded from summary statistics due to filter conditions.

Label. This is the file label (if any) defined by the FILE LABEL command.

Documents. Data file document text. See the topic Data File Comments for more information.

Weight status. If weighting is on, the name of the weight variable is displayed. See the topic Weight Cases for more information.

Custom attributes. User-defined custom data file attributes. Data file attributes defined with the DATAFILE ATTRIBUTE command.

Reserved attributes. Reserved system data file attributes. You can display system attributes, but you should not alter them. System attribute names start with a dollar sign ($) . Non-display attributes, with names that begin with either "@" or "$@", are not included. Output includes both the names and values for any system data file attributes.

Variable Display Order Collapse Hide details

Variable Display Order

The following alternatives are available for controlling the order in which variables and multiple response sets are displayed.

Alphabetical. Alphabetic order by variable name.

File. The order in which variables appear in the dataset (the order in which they are displayed in the Data Editor). In ascending order, multiple response sets are displayed last, after all selected variables.

Measurement level. Sort by measurement level. This creates four sorting groups: nominal, ordinal, scale, and unknown. Multiple response sets are treated as nominal.

Note: The measurement level for numeric variables may be "unknown" prior to the first data pass when the measurement level has not been explicitly set, such as data read from an external source or newly created variables.

Variable list. The order in which variables and multiple response sets appear in the selected variables list on the Variables tab.

Custom attribute name. The list of sort order options also includes the names of any user-defined custom variable attributes. In ascending order, variables that don't have the attribute sort to the top, followed by variables that have the attribute but no defined value for the attribute, followed by variables with defined values for the attribute in alphabetic order of the values.

Maximum Number of Categories Collapse Hide details

Maximum Number of Categories

If the output includes value labels, counts, or percents for each unique value, you can suppress this information from the table if the number of values exceeds the specified value. By default, this information is suppressed if the number of unique values for the variable exceeds 200.

To Select Codebook Output Options Collapse Hide details

To Select Codebook Output Options

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Reports
Codebook

Click the Output tab.

Related Topics

Codebook
Codebook Statistics Tab


Codebook Statistics Tab

Codebook,Codebook,Codebook
statistics,statistics,statistics

The Statistics tab allows you to control the summary statistics that are included in the output, or suppress the display of summary statistics entirely.

Counts and Percents Collapse Hide details

Counts and Percents

For nominal and ordinal variables, multiple response sets, and labeled values or scale variables, the available statistics are:

Count. The count or number of cases having each value (or range of values) of a variable.

Percent. The percentage of cases having a particular value.

Central Tendency and Dispersion Collapse Hide details

Central Tendency and Dispersion

For scale variables, the available statistics are:

Mean. A measure of central tendency. The arithmetic average, the sum divided by the number of cases.

Standard Deviation. A measure of dispersion around the mean. In a normal distribution, 68% of cases fall within one standard deviation of the mean and 95% of cases fall within two standard deviations. For example, if the mean age is 45, with a standard deviation of 10, 95% of the cases would be between 25 and 65 in a normal distribution.

Quartiles. Displays values corresponding to the 25th, 50th, and 75th percentiles.

Note: You can temporarily change the measurement level associated with a variable (and thereby change the summary statistics displayed for that variable) in the source variable list on the Variables tab.

To Select Codebook Statistics Collapse Hide details

To Select Codebook Statistics

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Reports
Codebook

Click the Statistics tab.

Related Topics

Codebook
Codebook Output Tab


Frequencies

Frequencies,Frequencies,Frequencies
frequency tables,frequency tables,frequency tables
in Frequencies,in Frequencies,in Frequencies

This feature requires the Statistics Base option.

The Frequencies procedure provides statistics and graphical displays that are useful for describing many types of variables. The Frequencies procedure is a good place to start looking at your data.

For a frequency report and bar chart, you can arrange the distinct values in ascending or descending order, or you can order the categories by their frequencies. The frequencies report can be suppressed when a variable has many distinct values. You can label charts with frequencies (the default) or percentages.

Example. What is the distribution of a company's customers by industry type? From the output, you might learn that 37.5% of your customers are in government agencies, 24.9% are in corporations, 28.1% are in academic institutions, and 9.4% are in the healthcare industry. For continuous, quantitative data, such as sales revenue, you might learn that the average product sale is $3,576, with a standard deviation of $1,078.

Statistics and plots. Frequency counts, percentages, cumulative percentages, mean, median, mode, sum, standard deviation, variance, range, minimum and maximum values, standard error of the mean, skewness and kurtosis (both with standard errors), quartiles, user-specified percentiles, bar charts, pie charts, and histograms.

Show me

Frequencies Data Considerations Collapse Hide details

Data. Use numeric codes or strings to code categorical variables (nominal or ordinal level measurements).

Assumptions. The tabulations and percentages provide a useful description for data from any distribution, especially for variables with ordered or unordered categories. Most of the optional summary statistics, such as the mean and standard deviation, are based on normal theory and are appropriate for quantitative variables with symmetric distributions. Robust statistics, such as the median, quartiles, and percentiles, are appropriate for quantitative variables that may or may not meet the assumption of normality.

To Obtain Frequency Tables Collapse Hide details

To Obtain Frequency Tables

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Descriptive Statistics
Frequencies...

Select one or more categorical or quantitative variables.

Optionally, you can:

• Click Statistics for descriptive statistics for quantitative variables.

• Click Charts for bar charts, pie charts, and histograms.

• Click Format for the order in which results are displayed.

This procedure pastes FREQUENCIES command syntax.

See FREQUENCIES Algorithms for computational details for this procedure.

Related Topics

Frequencies: Related Procedures
Frequencies Statistics
Frequencies Charts
Frequencies Format
FREQUENCIES


Frequencies Statistics

mean,mean,mean
in Frequencies,in Frequencies,in Frequencies
standard deviation,standard deviation,standard deviation
in Frequencies,in Frequencies,in Frequencies
minimum,minimum,minimum
in Frequencies,in Frequencies,in Frequencies
maximum,maximum,maximum
in Frequencies,in Frequencies,in Frequencies
sum,sum,sum
in Frequencies,in Frequencies,in Frequencies
variance,variance,variance
in Frequencies,in Frequencies,in Frequencies
range,range,range
in Frequencies,in Frequencies,in Frequencies
standard error,standard error,standard error
in Frequencies,in Frequencies,in Frequencies
kurtosis,kurtosis,kurtosis
in Frequencies,in Frequencies,in Frequencies
skewness,skewness,skewness
in Frequencies,in Frequencies,in Frequencies
Frequencies,Frequencies,Frequencies
statistics,statistics,statistics
measures of dispersion,measures of dispersion,measures of dispersion
in Frequencies,in Frequencies,in Frequencies
measures of central tendency,measures of central tendency,measures of central tendency
in Frequencies,in Frequencies,in Frequencies
measures of distribution,measures of distribution,measures of distribution
in Frequencies,in Frequencies,in Frequencies
median,median,median
in Frequencies,in Frequencies,in Frequencies
mode,mode,mode
in Frequencies,in Frequencies,in Frequencies
percentiles,percentiles,percentiles
in Frequencies,in Frequencies,in Frequencies
quartiles,quartiles,quartiles
in Frequencies,in Frequencies,in Frequencies
descriptive statistics,descriptive statistics,descriptive statistics
in Frequencies,in Frequencies,in Frequencies

Percentile Values. Values of a quantitative variable that divide the ordered data into groups so that a certain percentage is above and another percentage is below. Quartiles (the 25th, 50th, and 75th percentiles) divide the observations into four groups of equal size. If you want an equal number of groups other than four, select Cut points for n equal groups. You can also specify individual percentiles (for example, the 95th percentile, the value below which 95% of the observations fall).

Central Tendency. Statistics that describe the location of the distribution include the mean, median, mode, and sum of all the values.

Expand Show details Collapse Hide details

• Mean. A measure of central tendency. The arithmetic average, the sum divided by the number of cases.

• Median. The value above and below which half of the cases fall, the 50th percentile. If there is an even number of cases, the median is the average of the two middle cases when they are sorted in ascending or descending order. The median is a measure of central tendency not sensitive to outlying values (unlike the mean, which can be affected by a few extremely high or low values).

• Mode. The most frequently occurring value. If several values share the greatest frequency of occurrence, each of them is a mode. The Frequencies procedure reports only the smallest of such multiple modes.

• Sum. The sum or total of the values, across all cases with nonmissing values.

Dispersion. Statistics that measure the amount of variation or spread in the data include the standard deviation, variance, range, minimum, maximum, and standard error of the mean.

Expand Show details Collapse Hide details

• Std. deviation. A measure of dispersion around the mean. In a normal distribution, 68% of cases fall within one standard deviation of the mean and 95% of cases fall within two standard deviations. For example, if the mean age is 45, with a standard deviation of 10, 95% of the cases would be between 25 and 65 in a normal distribution.

• Variance. A measure of dispersion around the mean, equal to the sum of squared deviations from the mean divided by one less than the number of cases. The variance is measured in units that are the square of those of the variable itself.

• Range. The difference between the largest and smallest values of a numeric variable, the maximum minus the minimum.

• Minimum. The smallest value of a numeric variable.

• Maximum. The largest value of a numeric variable.

• S. E. mean. A measure of how much the value of the mean may vary from sample to sample taken from the same distribution. It can be used to roughly compare the observed mean to a hypothesized value (that is, you can conclude the two values are different if the ratio of the difference to the standard error is less than -2 or greater than +2).

Distribution. Skewness and kurtosis are statistics that describe the shape and symmetry of the distribution. These statistics are displayed with their standard errors.

Expand Show details Collapse Hide details

• Skewness. A measure of the asymmetry of a distribution. The normal distribution is symmetric and has a skewness value of 0. A distribution with a significant positive skewness has a long right tail. A distribution with a significant negative skewness has a long left tail. As a guideline, a skewness value more than twice its standard error is taken to indicate a departure from symmetry.

• Kurtosis. A measure of the extent to which observations cluster around a central point. For a normal distribution, the value of the kurtosis statistic is zero. Positive kurtosis indicates that, relative to a normal distribution, the observations are more clustered about the center of the distribution and have thinner tails until the extreme values of the distribution, at which point the tails of the leptokurtic distribution are thicker relative to a normal distribution. Negative kurtosis indicates that, relative to a normal distribution, the observations cluster less and have thicker tails until the extreme values of the distribution, at which point the tails of the platykurtic distribution are thinner relative to a normal distribution.

Values are group midpoints. If the values in your data are midpoints of groups (for example, ages of all people in their thirties are coded as 35), select this option to estimate the median and percentiles for the original, ungrouped data.

Obtaining Statistics for Frequencies Collapse Hide details

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Descriptive Statistics
Frequencies...

In the Frequencies dialog box, click Statistics.

Select the statistics you want.

Related Topics

Frequencies: Related Procedures
Frequencies
Frequencies Charts
Frequencies Format


Frequencies Charts

Frequencies,Frequencies,Frequencies
charts,charts,charts
bar charts,bar charts,bar charts
in Frequencies,in Frequencies,in Frequencies
pie charts,pie charts,pie charts
in Frequencies,in Frequencies,in Frequencies
histograms,histograms,histograms
in Frequencies,in Frequencies,in Frequencies

Chart Type. A pie chart displays the contribution of parts to a whole. Each slice of a pie chart corresponds to a group that is defined by a single grouping variable. A bar chart displays the count for each distinct value or category as a separate bar, allowing you to compare categories visually. A histogram also has bars, but they are plotted along an equal interval scale. The height of each bar is the count of values of a quantitative variable falling within the interval. A histogram shows the shape, center, and spread of the distribution. A normal curve superimposed on a histogram helps you judge whether the data are normally distributed.

Chart Values. For bar charts, the scale axis can be labeled by frequency counts or percentages.

Obtaining Charts for Frequencies Collapse Hide details

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Descriptive Statistics
Frequencies...

In the Frequencies dialog box, click Charts.

Related Topics

Frequencies: Related Procedures
Frequencies
Frequencies Statistics
Frequencies Format


Frequencies Format

Frequencies,Frequencies,Frequencies
formats,formats,formats
Frequencies,Frequencies,Frequencies
display order,display order,display order
Frequencies,Frequencies,Frequencies
suppressing tables,suppressing tables,suppressing tables

Order by. The frequency table can be arranged according to the actual values in the data or according to the count (frequency of occurrence) of those values, and the table can be arranged in either ascending or descending order. However, if you request a histogram or percentiles, Frequencies assumes that the variable is quantitative and displays its values in ascending order.

Multiple Variables. If you produce statistics tables for multiple variables, you can either display all variables in a single table (Compare variables) or display a separate statistics table for each variable (Organize output by variables).

Suppress tables with more than n categories. This option prevents the display of tables with more than the specified number of values.

Specifying Formats for Frequencies Collapse Hide details

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Descriptive Statistics
Frequencies...

In the Frequencies dialog box, click Format.

Related Topics

Frequencies: Related Procedures
Frequencies
Frequencies Statistics
Frequencies Charts


Descriptives

Descriptives,Descriptives,Descriptives
z scores,z scores,z scores
saving as variables,saving as variables,saving as variables
Descriptives,Descriptives,Descriptives
saving z scores,saving z scores,saving z scores
standardized values,standardized values,standardized values
in Descriptives,in Descriptives,in Descriptives
z scores,z scores,z scores
in Descriptives,in Descriptives,in Descriptives
descriptive statistics,descriptive statistics,descriptive statistics
in Descriptives,in Descriptives,in Descriptives

This feature requires the Statistics Base option.

The Descriptives procedure displays univariate summary statistics for several variables in a single table and calculates standardized values (z scores). Variables can be ordered by the size of their means (in ascending or descending order), alphabetically, or by the order in which you select the variables (the default).

When z scores are saved, they are added to the data in the Data Editor and are available for charts, data listings, and analyses. When variables are recorded in different units (for example, gross domestic product per capita and percentage literate), a z-score transformation places variables on a common scale for easier visual comparison.

Example. If each case in your data contains the daily sales totals for each member of the sales staff (for example, one entry for Bob, one entry for Kim, and one entry for Brian) collected each day for several months, the Descriptives procedure can compute the average daily sales for each staff member and can order the results from highest average sales to lowest average sales.

Statistics. Sample size, mean, minimum, maximum, standard deviation, variance, range, sum, standard error of the mean, and kurtosis and skewness with their standard errors.

Show me

Descriptives Data Considerations Collapse Hide details

Data. Use numeric variables after you have screened them graphically for recording errors, outliers, and distributional anomalies. The Descriptives procedure is very efficient for large files (thousands of cases).

Assumptions. Most of the available statistics (including z scores) are based on normal theory and are appropriate for quantitative variables (interval- or ratio-level measurements) with symmetric distributions. Avoid variables with unordered categories or skewed distributions. The distribution of z scores has the same shape as that of the original data; therefore, calculating z scores is not a remedy for problem data.

To Obtain Descriptive Statistics Collapse Hide details

To Obtain Descriptive Statistics

From the menus choose:

This feature requires the Statistics Base option.

Analyze
Descriptive Statistics
Descriptives...

Select one or more variables.

Optionally, you can:

• Select Save standardized values as variables to save z scores as new variables.

• Click Options for optional statistics and display order.

This procedure pastes DESCRIPTIVES command syntax.

See DESCRIPTIVES Algorithms for computational details for this procedure.

Related Topics

DESCRIPTIVES
Descriptives: Related Procedures
Descriptives Options


Descriptives Options

mean,mean,mean
in Descriptives,in Descriptives,in Descriptives
standard deviation,standard deviation,standard deviation
in Descriptives,in Descriptives,in Descriptives
sum,sum,sum
in Descriptives,in Descriptives,in Descriptives
variance,variance,variance
in Descriptives,in Descriptives,in Descriptives
range,range,range
in Descriptives,in Descriptives,in Descriptives
minimum,minimum,minimum
in Descriptives,in Descriptives,in Descriptives
maximum,maximum,maximum
in Descriptives,in Descriptives,in Descriptives
standard error,standard error,standard error
in Descriptives,in Descriptives,in Descriptives
kurtosis,kurtosis,kurtosis
in Descriptives,in Descriptives,in Descriptives
skewness,skewness,skewness
in Descriptives,in Descriptives,in Descriptives
Descriptives,Descriptives,Descriptives
statistics,statistics,statistics
Descriptives,Descriptives,Descriptives
display order,display order,display order
measures of dispersion,measures of dispersion,measures of dispersion
in Descriptives,in Descriptives,in Descriptives
measures of distribution,measures of distribution,measures of distribution
in Descriptives,in Descriptives,in Descriptives

Mean and Sum. The mean, or arithmetic average, is displayed by default.

Dispersion. Statistics that measure the spread or variation in the data include the standard deviation, variance, range, minimum, maximum, and standard error of the mean.

Expand Show details Collapse Hide details

• Std. deviation. A measure of dispersion around the mean. In a normal distribution, 68% of cases fall within one standard deviation of the mean and 95% of cases fall within two standard deviations. For example, if the mean age is 45, with a standard deviation of 10, 95% of the cases would be between 25 and 65 in a normal distribution.

• Variance. A measure of dispersion around the mean, equal to the sum of squared deviations from the mean divided by one less than the number of cases. The variance is measured in units that are the square of those of the variable itself.

• Range. The difference between the largest and smallest values of a numeric variable, the maximum minus the minimum.

• Minimum. The smallest value of a numeric variable.

• Maximum. The largest value of a numeric variable.

• S.E. mean. A measure of how much the value of the mean may vary from sample to sample taken from the same distribution. It can be used to roughly compare the observed mean to a hypothesized value (that is, you can conclude the two values are different if the ratio of the difference to the standard error is less than -2 or greater than +2).

Distribution. Kurtosis and skewness are statistics that characterize the shape and symmetry of the distribution. These statistics are displayed with their standard errors.

Expand Show details Collapse Hide details

• Kurtosis. A measure of the extent to which observations cluster around a central point. For a normal distribution, the value of the kurtosis statistic is zero. Positive kurtosis indicates that, relative to a normal distribution, the observations are more clustered about the center of the distribution and have thinner tails until the extreme values of the distribution, at which point the tails of the leptokurtic distribution are thicker relative to a normal distribution. Negative kurtosis indicates that, relative to a normal distribution, the observations cluster less and have thicker tails until the extreme values of the distribution, at which point the tails of the platykurtic distribution are thinner relative to a normal distribution.

• Skewness. A measure of the asymmetry of a distribution. The normal distribution is symmetric and has a skewness value of 0. A distribution with a significant positive skewness has a long right tail. A distribution with a significant negative skewness has a long left tail. As a guideline, a skewness value more than twice its standard error is taken to indicate a departure from symmetry.

Display Order. By default, the variables are displayed in the order in which you selected them. Optionally, you can display variables alphabetically, by ascending means, or by descending means.

Specifying Options for Descriptives Collapse Hide details

From the menus choose:

This feature requires the Statistics Base option.

Analyze
Descriptive Statistics
Descriptives...

In the Descriptives dialog box, click Options.

Select one or more statistics.

Related Topics

Descriptives: Related Procedures
Descriptives


DESCRIPTIVES Command Additional Features

Descriptives,Descriptives,Descriptives
command additional features,command additional features,command additional features

The command syntax language also allows you to:

• Save standardized scores (z scores) for some but not all variables (with the VARIABLES subcommand).

• Specify names for new variables that contain standardized scores (with the VARIABLES subcommand).

• Exclude from the analysis cases with missing values for any variable (with the MISSING subcommand).

• Sort the variables in the display by the value of any statistic, not just the mean (with the SORT subcommand).

Related Topics

DESCRIPTIVES


Explore

Explore,Explore,Explore

This feature requires the Statistics Base option.

The Explore procedure produces summary statistics and graphical displays, either for all of your cases or separately for groups of cases. There are many reasons for using the Explore procedure--data screening, outlier identification, description, assumption checking, and characterizing differences among subpopulations (groups of cases). Data screening may show that you have unusual values, extreme values, gaps in the data, or other peculiarities. Exploring the data can help to determine whether the statistical techniques that you are considering for data analysis are appropriate. The exploration may indicate that you need to transform the data if the technique requires a normal distribution. Or you may decide that you need nonparametric tests.

Example. Look at the distribution of maze-learning times for rats under four different reinforcement schedules. For each of the four groups, you can see if the distribution of times is approximately normal and whether the four variances are equal. You can also identify the cases with the five largest and five smallest times. The boxplots and stem-and-leaf plots graphically summarize the distribution of learning times for each of the groups.

Statistics and plots. Mean, median, 5% trimmed mean, standard error, variance, standard deviation, minimum, maximum, range, interquartile range, skewness and kurtosis and their standard errors, confidence interval for the mean (and specified confidence level), percentiles, Huber's M-estimator, Andrews' wave estimator, Hampel's redescending M-estimator, Tukey's biweight estimator, the five largest and five smallest values, the Kolmogorov-Smirnov statistic with a Lilliefors significance level for testing normality, and the Shapiro-Wilk statistic. Boxplots, stem-and-leaf plots, histograms, normality plots, and spread-versus-level plots with Levene tests and transformations.

Show me

Explore Data Considerations Collapse Hide details

Data. The Explore procedure can be used for quantitative variables (interval- or ratio-level measurements). A factor variable (used to break the data into groups of cases) should have a reasonable number of distinct values (categories). These values may be short string or numeric. The case label variable, used to label outliers in boxplots, can be short string, long string (first 15 bytes), or numeric.

Assumptions. The distribution of your data does not have to be symmetric or normal.

To Explore Your Data Collapse Hide details

To Explore Your Data

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Descriptive Statistics
Explore...

Select one or more dependent variables.

Optionally, you can:

• Select one or more factor variables, whose values will define groups of cases.

• Select an identification variable to label cases.

• Click Statistics for robust estimators, outliers, percentiles, and frequency tables.

• Click Plots for histograms, normal probability plots and tests, and spread-versus-level plots with Levene's statistics.

• Click Options for the treatment of missing values.

This procedure pastes EXAMINE command syntax.

See EXAMINE Algorithms for computational details for this procedure.

Related Topics

Explore: Related Procedures
Explore Statistics
Explore Plots
Explore Power Transformations
Explore Options
EXAMINE


Explore Statistics

Explore,Explore,Explore
statistics,statistics,statistics
extreme values,extreme values,extreme values
in Explore,in Explore,in Explore
frequency tables,frequency tables,frequency tables
in Explore,in Explore,in Explore
confidence intervals,confidence intervals,confidence intervals
in Explore,in Explore,in Explore
kurtosis,kurtosis,kurtosis
in Explore,in Explore,in Explore
maximum,maximum,maximum
in Explore,in Explore,in Explore
mean,mean,mean
in Explore,in Explore,in Explore
median,median,median
in Explore,in Explore,in Explore
minimum,minimum,minimum
in Explore,in Explore,in Explore
outliers,outliers,outliers
in Explore,in Explore,in Explore
percentiles,percentiles,percentiles
in Explore,in Explore,in Explore
skewness,skewness,skewness
in Explore,in Explore,in Explore
standard deviation,standard deviation,standard deviation
in Explore,in Explore,in Explore
standard error,standard error,standard error
in Explore,in Explore,in Explore
trimmed mean,trimmed mean,trimmed mean
in Explore,in Explore,in Explore
variance,variance,variance
in Explore,in Explore,in Explore
measures of central tendency,measures of central tendency,measures of central tendency
in Explore,in Explore,in Explore
measures of dispersion,measures of dispersion,measures of dispersion
in Explore,in Explore,in Explore
M-estimators,M-estimators,M-estimators
in Explore,in Explore,in Explore
Huber's M-estimator,Huber's M-estimator,Huber's M-estimator
in Explore,in Explore,in Explore
Hampel's redescending M-estimator,Hampel's redescending M-estimator,Hampel's redescending M-estimator
in Explore,in Explore,in Explore
Andrews' wave estimator,Andrews' wave estimator,Andrews' wave estimator
in Explore,in Explore,in Explore
Tukey's biweight estimator,Tukey's biweight estimator,Tukey's biweight estimator
in Explore,in Explore,in Explore
descriptive statistics,descriptive statistics,descriptive statistics
in Explore,in Explore,in Explore

Descriptives. These measures of central tendency and dispersion are displayed by default. Measures of central tendency indicate the location of the distribution; they include the mean, median, and 5% trimmed mean. Measures of dispersion show the dissimilarity of the values; these include standard error, variance, standard deviation, minimum, maximum, range, and interquartile range. The descriptive statistics also include measures of the shape of the distribution; skewness and kurtosis are displayed with their standard errors. The 95% level confidence interval for the mean is also displayed; you can specify a different confidence level.

M-estimators. Robust alternatives to the sample mean and median for estimating the location. The estimators calculated differ in the weights they apply to cases. Huber's M-estimator, Andrews' wave estimator, Hampel's redescending M-estimator, and Tukey's biweight estimator are displayed.

Outliers. Displays the five largest and five smallest values with case labels.

Percentiles. Displays the values for the 5th, 10th, 25th, 50th, 75th, 90th, and 95th percentiles.

Specifying Statistics for Explore Collapse Hide details

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Descriptive Statistics
Explore...

In the Explore dialog box, select Both or Statistics in the Display group to enable the Statistics button.

Click Statistics and select one or more statistics.

Related Topics

Explore: Related Procedures
Explore
Explore Plots
Explore Power Transformations
Explore Options


Explore Plots

Explore,Explore,Explore
plots,plots,plots
boxplots,boxplots,boxplots
comparing factor levels,comparing factor levels,comparing factor levels
boxplots,boxplots,boxplots
comparing variables,comparing variables,comparing variables
boxplots,boxplots,boxplots
in Explore,in Explore,in Explore
histograms,histograms,histograms
in Explore,in Explore,in Explore
detrended normal plots,detrended normal plots,detrended normal plots
in Explore,in Explore,in Explore
Levene test,Levene test,Levene test
in Explore,in Explore,in Explore
Lilliefors test,Lilliefors test,Lilliefors test
in Explore,in Explore,in Explore
normal probability plots,normal probability plots,normal probability plots
in Explore,in Explore,in Explore
normality tests,normality tests,normality tests
in Explore,in Explore,in Explore
Shapiro-Wilk's test,Shapiro-Wilk's test,Shapiro-Wilk's test
in Explore,in Explore,in Explore
spread-versus-level plots,spread-versus-level plots,spread-versus-level plots
in Explore,in Explore,in Explore
stem-and-leaf plots,stem-and-leaf plots,stem-and-leaf plots
in Explore,in Explore,in Explore

Boxplots. These alternatives control the display of boxplots when you have more than one dependent variable. Factor levels together generates a separate display for each dependent variable. Within a display, boxplots are shown for each of the groups defined by a factor variable. Dependents together generates a separate display for each group defined by a factor variable. Within a display, boxplots are shown side by side for each dependent variable. This display is particularly useful when the different variables represent a single characteristic measured at different times.

Descriptive. The Descriptive group allows you to choose stem-and-leaf plots and histograms.

Normality plots with tests. Displays normal probability and detrended normal probability plots. The Kolmogorov-Smirnov statistic, with a Lilliefors significance level for testing normality, is displayed. If non-integer weights are specified, the Shapiro-Wilk statistic is calculated when the weighted sample size lies between 3 and 50. For no weights or integer weights, the statistic is calculated when the weighted sample size lies between 3 and 5,000.

Spread vs. Level with Levene Test. Controls data transformation for spread-versus-level plots. For all spread-versus-level plots, the slope of the regression line and Levene's robust tests for homogeneity of variance are displayed. If you select a transformation, Levene's tests are based on the transformed data. If no factor variable is selected, spread-versus-level plots are not produced. Power estimation produces a plot of the natural logs of the interquartile ranges against the natural logs of the medians for all cells, as well as an estimate of the power transformation for achieving equal variances in the cells. A spread-versus-level plot helps to determine the power for a transformation to stabilize (make more equal) variances across groups. Transformed allows you to select one of the power alternatives, perhaps following the recommendation from power estimation, and produces plots of transformed data. The interquartile range and median of the transformed data are plotted. Untransformed produces plots of the raw data. This is equivalent to a transformation with a power of 1.

Specifying Plots for Explore Collapse Hide details

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Descriptive Statistics
Explore...

In the Explore dialog box, select Both or Plots in the Display group to enable the Plots button.

Click Plots and select at least one plot.

Related Topics

Explore: Related Procedures
Explore
Explore Statistics
Explore Power Transformations
Explore Options


Explore Power Transformations

Explore,Explore,Explore
power transformations,power transformations,power transformations

These are the power transformations for spread-versus-level plots. To transform data, you must select a power for the transformation. You can choose one of the following alternatives:

• Natural log. Natural log transformation. This is the default.

• 1/square root. For each data value, the reciprocal of the square root is calculated.

• Reciprocal. The reciprocal of each data value is calculated.

• Square root. The square root of each data value is calculated.

• Square. Each data value is squared.

• Cube. Each data value is cubed.

Related Topics

Explore: Related Procedures
Explore
Explore Statistics
Explore Plots
Explore Options


Explore Options

Explore,Explore,Explore
options,options,options
Explore,Explore,Explore
missing values,missing values,missing values
missing values,missing values,missing values
in Explore,in Explore,in Explore

Missing Values. Controls the treatment of missing values.

• Exclude cases listwise. Cases with missing values for any dependent or factor variable are excluded from all analyses. This is the default.

• Exclude cases pairwise. Cases with no missing values for variables in a group (cell) are included in the analysis of that group. The case may have missing values for variables used in other groups.

• Report values. Missing values for factor variables are treated as a separate category. All output is produced for this additional category. Frequency tables include categories for missing values. Missing values for a factor variable are included but labeled as missing.

Specifying Options for Explore Collapse Hide details

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Descriptive Statistics
Explore...

In the Explore dialog box, click Options.

Related Topics

Explore: Related Procedures
Explore
Explore Statistics
Explore Plots
Explore Power Transformations


EXAMINE Command Additional Features

Explore,Explore,Explore
command additional features,command additional features,command additional features

The Explore procedure uses EXAMINE command syntax. The command syntax language also allows you to:

• Request total output and plots in addition to output and plots for groups defined by the factor variables (with the TOTAL subcommand).

• Specify a common scale for a group of boxplots (with the SCALE subcommand).

• Specify interactions of the factor variables (with the VARIABLES subcommand).

• Specify percentiles other than the defaults (with the PERCENTILES subcommand).

• Calculate percentiles according to any of five methods (with the PERCENTILES subcommand).

• Specify any power transformation for spread-versus-level plots (with the PLOT subcommand).

• Specify the number of extreme values to be displayed (with the STATISTICS subcommand).

• Specify parameters for the M-estimators, robust estimators of location (with the MESTIMATORS subcommand).

Related Topics

EXAMINE


Crosstabs

Crosstabs,Crosstabs,Crosstabs
Crosstabs,Crosstabs,Crosstabs
suppressing tables,suppressing tables,suppressing tables
crosstabulation,crosstabulation,crosstabulation
in Crosstabs,in Crosstabs,in Crosstabs
contingency tables,contingency tables,contingency tables

This feature requires the Statistics Base option.

The Crosstabs procedure forms two-way and multiway tables and provides a variety of tests and measures of association for two-way tables. The structure of the table and whether categories are ordered determine what test or measure to use.

Crosstabs' statistics and measures of association are computed for two-way tables only. If you specify a row, a column, and a layer factor (control variable), the Crosstabs procedure forms one panel of associated statistics and measures for each value of the layer factor (or a combination of values for two or more control variables). For example, if gender is a layer factor for a table of married (yes, no) against life (is life exciting, routine, or dull), the results for a two-way table for the females are computed separately from those for the males and printed as panels following one another.

Example. Are customers from small companies more likely to be profitable in sales of services (for example, training and consulting) than those from larger companies? From a crosstabulation, you might learn that the majority of small companies (fewer than 500 employees) yield high service profits, while the majority of large companies (more than 2,500 employees) yield low service profits.

Statistics and measures of association. Pearson chi-square, likelihood-ratio chi-square, linear-by-linear association test, Fisher's exact test, Yates' corrected chi-square, Pearson's r, Spearman's rho, contingency coefficient, phi, Cramér's V, symmetric and asymmetric lambdas, Goodman and Kruskal's tau, uncertainty coefficient, gamma, Somers' d, Kendall's tau-b, Kendall's tau-c, eta coefficient, Cohen's kappa, relative risk estimate, odds ratio, McNemar test, and Cochran's and Mantel-Haenszel statistics.

Show me

Crosstabs Data Considerations Collapse Hide details

Data. To define the categories of each table variable, use values of a numeric or string (eight or fewer bytes) variable. For example, for gender, you could code the data as 1 and 2 or as male and female.

Assumptions. Some statistics and measures assume ordered categories (ordinal data) or quantitative values (interval or ratio data), as discussed in the section on statistics. Others are valid when the table variables have unordered categories (nominal data). For the chi-square-based statistics (phi, Cramér's V, and contingency coefficient), the data should be a random sample from a multinomial distribution.

Note: Ordinal variables can be either numeric codes that represent categories (for example, 1 = low, 2 = medium, 3 = high) or string values. However, the alphabetic order of string values is assumed to reflect the true order of the categories. For example, for a string variable with the values of low, medium, high, the order of the categories is interpreted as high, low, medium--which is not the correct order. In general, it is more reliable to use numeric codes to represent ordinal data.

To Obtain Crosstabulations Collapse Hide details

To Obtain Crosstabulations

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Descriptive Statistics
Crosstabs...

Select one or more row variables and one or more column variables.

Optionally, you can:

• Select one or more control variables.

• Click Statistics for tests and measures of association for two-way tables or subtables.

• Click Cells for observed and expected values, percentages, and residuals.

• Click Format for controlling the order of categories.

This procedure pastes CROSSTABS command syntax.

See CROSSTABS Algorithms for computational details for this procedure.

Related Topics

Crosstabs: Related Procedures
Crosstabs Layers
Crosstabs Clustered Bar Charts
Crosstabs Statistics
Crosstabs Cell Display
Crosstabs Table Format
CROSSTABS


Crosstabs Layers

Crosstabs,Crosstabs,Crosstabs
layers,layers,layers
Crosstabs,Crosstabs,Crosstabs
control variables,control variables,control variables
control variables,control variables,control variables
in Crosstabs,in Crosstabs,in Crosstabs
layers,layers,layers
in Crosstabs,in Crosstabs,in Crosstabs

If you select one or more layer variables, a separate crosstabulation is produced for each category of each layer variable (control variable). For example, if you have one row variable, one column variable, and one layer variable with two categories, you get a two-way table for each category of the layer variable. To make another layer of control variables, click Next. Subtables are produced for each combination of categories for each first-layer variable, each second-layer variable, and so on. If statistics and measures of association are requested, they apply to two-way subtables only.

Related Topics

Crosstabs: Related Procedures
Crosstabs
Crosstabs Clustered Bar Charts
Crosstabs Statistics
Crosstabs Cell Display
Crosstabs Table Format


Crosstabs Clustered Bar Charts

Crosstabs,Crosstabs,Crosstabs
clustered bar charts,clustered bar charts,clustered bar charts

Display clustered bar charts. A clustered bar chart helps summarize your data for groups of cases. There is one cluster of bars for each value of the variable you specified under Rows. The variable that defines the bars within each cluster is the variable you specified under Columns. There is one set of differently colored or patterned bars for each value of this variable. If you specify more than one variable under Columns or Rows, a clustered bar chart is produced for each combination of two variables.

Related Topics

Crosstabs: Related Procedures
Crosstabs
Crosstabs Layers
Crosstabs Statistics
Crosstabs Cell Display
Crosstabs Table Format


Crosstabs Statistics

Crosstabs,Crosstabs,Crosstabs
statistics,statistics,statistics
chi-square,chi-square,chi-square
in Crosstabs,in Crosstabs,in Crosstabs
chi-square,chi-square,chi-square
Fisher's exact test,Fisher's exact test,Fisher's exact test
chi-square,chi-square,chi-square
likelihood-ratio,likelihood-ratio,likelihood-ratio
chi-square,chi-square,chi-square
linear-by-linear association,linear-by-linear association,linear-by-linear association
chi-square,chi-square,chi-square
Pearson,Pearson,Pearson
chi-square,chi-square,chi-square
Yates' correction for continuity,Yates' correction for continuity,Yates' correction for continuity
chi-square,chi-square,chi-square
for independence,for independence,for independence
tests for independence,tests for independence,tests for independence
chi-square,chi-square,chi-square
Cohen's kappa,Cohen's kappa,Cohen's kappa
in Crosstabs,in Crosstabs,in Crosstabs
kappa,kappa,kappa
in Crosstabs,in Crosstabs,in Crosstabs
Cramér's V,Cramér's V,Cramér's V
in Crosstabs,in Crosstabs,in Crosstabs
rho,rho,rho
in Crosstabs,in Crosstabs,in Crosstabs
Pearson correlation,Pearson correlation,Pearson correlation
in Crosstabs,in Crosstabs,in Crosstabs
correlations,correlations,correlations
in Crosstabs,in Crosstabs,in Crosstabs
linear-by-linear association,linear-by-linear association,linear-by-linear association
in Crosstabs,in Crosstabs,in Crosstabs
Pearson chi-square,Pearson chi-square,Pearson chi-square
in Crosstabs,in Crosstabs,in Crosstabs
Fisher's exact test,Fisher's exact test,Fisher's exact test
in Crosstabs,in Crosstabs,in Crosstabs
Yates' correction for continuity,Yates' correction for continuity,Yates' correction for continuity
in Crosstabs,in Crosstabs,in Crosstabs
r correlation coefficient,r correlation coefficient,r correlation coefficient
in Crosstabs,in Crosstabs,in Crosstabs
likelihood-ratio chi-square,likelihood-ratio chi-square,likelihood-ratio chi-square
in Crosstabs,in Crosstabs,in Crosstabs
Spearman correlation coefficient,Spearman correlation coefficient,Spearman correlation coefficient
in Crosstabs,in Crosstabs,in Crosstabs
contingency coefficient,contingency coefficient,contingency coefficient
in Crosstabs,in Crosstabs,in Crosstabs
phi,phi,phi
in Crosstabs,in Crosstabs,in Crosstabs
V,V,V
in Crosstabs,in Crosstabs,in Crosstabs
lambda,lambda,lambda
in Crosstabs,in Crosstabs,in Crosstabs
Kruskal's tau,Kruskal's tau,Kruskal's tau
in Crosstabs,in Crosstabs,in Crosstabs
Somers' d,Somers' d,Somers' d
in Crosstabs,in Crosstabs,in Crosstabs
d,d,d
in Crosstabs,in Crosstabs,in Crosstabs
gamma,gamma,gamma
in Crosstabs,in Crosstabs,in Crosstabs
Kendall's tau-b,Kendall's tau-b,Kendall's tau-b
in Crosstabs,in Crosstabs,in Crosstabs
tau-b,tau-b,tau-b
in Crosstabs,in Crosstabs,in Crosstabs
Kendall's tau-c,Kendall's tau-c,Kendall's tau-c
in Crosstabs,in Crosstabs,in Crosstabs
tau-c,tau-c,tau-c
in Crosstabs,in Crosstabs,in Crosstabs
Kendall's tau-c,Kendall's tau-c,Kendall's tau-c
Goodman and Kruskal's gamma,Goodman and Kruskal's gamma,Goodman and Kruskal's gamma
in Crosstabs,in Crosstabs,in Crosstabs
Goodman and Kruskal's lambda,Goodman and Kruskal's lambda,Goodman and Kruskal's lambda
in Crosstabs,in Crosstabs,in Crosstabs
eta,eta,eta
in Crosstabs,in Crosstabs,in Crosstabs
relative risk,relative risk,relative risk
in Crosstabs,in Crosstabs,in Crosstabs
Goodman and Kruskal's tau,Goodman and Kruskal's tau,Goodman and Kruskal's tau
in Crosstabs,in Crosstabs,in Crosstabs
risk,risk,risk
in Crosstabs,in Crosstabs,in Crosstabs
uncertainty coefficient,uncertainty coefficient,uncertainty coefficient
in Crosstabs,in Crosstabs,in Crosstabs
McNemar test,McNemar test,McNemar test
in Crosstabs,in Crosstabs,in Crosstabs
Cochran's statistic,Cochran's statistic,Cochran's statistic
in Crosstabs,in Crosstabs,in Crosstabs
Mantel-Haenszel statistic,Mantel-Haenszel statistic,Mantel-Haenszel statistic
in Crosstabs,in Crosstabs,in Crosstabs

Chi-square. For tables with two rows and two columns, select Chi-square to calculate the Pearson chi-square, the likelihood-ratio chi-square, Fisher's exact test, and Yates' corrected chi-square (continuity correction). For 2 × 2 tables, Fisher's exact test is computed when a table that does not result from missing rows or columns in a larger table has a cell with an expected frequency of less than 5. Yates' corrected chi-square is computed for all other 2 × 2 tables. For tables with any number of rows and columns, select Chi-square to calculate the Pearson chi-square and the likelihood-ratio chi-square. When both table variables are quantitative, Chi-square yields the linear-by-linear association test.

Correlations. For tables in which both rows and columns contain ordered values, Correlations yields Spearman's correlation coefficient, rho (numeric data only). Spearman's rho is a measure of association between rank orders. When both table variables (factors) are quantitative, Correlations yields the Pearson correlation coefficient, r, a measure of linear association between the variables.

Nominal. For nominal data (no intrinsic order, such as Catholic, Protestant, and Jewish), you can select Contingency coefficient, Phi (coefficient) and Cramér's V, Lambda (symmetric and asymmetric lambdas and Goodman and Kruskal's tau), and Uncertainty coefficient.

Expand Show details Collapse Hide details

• Contingency coefficient. A measure of association based on chi-square. The value ranges between 0 and 1, with 0 indicating no association between the row and column variables and values close to 1 indicating a high degree of association between the variables. The maximum value possible depends on the number of rows and columns in a table.

• Phi and Cramer's V. Phi is a chi-square-based measure of association that involves dividing the chi-square statistic by the sample size and taking the square root of the result. Cramer's V is a measure of association based on chi-square.

• Lambda. A measure of association that reflects the proportional reduction in error when values of the independent variable are used to predict values of the dependent variable. A value of 1 means that the independent variable perfectly predicts the dependent variable. A value of 0 means that the independent variable is no help in predicting the dependent variable.

• Uncertainty coefficient. A measure of association that indicates the proportional reduction in error when values of one variable are used to predict values of the other variable. For example, a value of 0.83 indicates that knowledge of one variable reduces error in predicting values of the other variable by 83%. The program calculates both symmetric and asymmetric versions of the uncertainty coefficient.

Ordinal. For tables in which both rows and columns contain ordered values, select Gamma (zero-order for 2-way tables and conditional for 3-way to 10-way tables), Kendall's tau-b, and Kendall's tau-c. For predicting column categories from row categories, select Somers' d.

Expand Show details Collapse Hide details

• Gamma. A symmetric measure of association between two ordinal variables that ranges between -1 and 1. Values close to an absolute value of 1 indicate a strong relationship between the two variables. Values close to 0 indicate little or no relationship. For 2-way tables, zero-order gammas are displayed. For 3-way to n-way tables, conditional gammas are displayed.

• Somers' d. A measure of association between two ordinal variables that ranges from -1 to 1. Values close to an absolute value of 1 indicate a strong relationship between the two variables, and values close to 0 indicate little or no relationship between the variables. Somers' d is an asymmetric extension of gamma that differs only in the inclusion of the number of pairs not tied on the independent variable. A symmetric version of this statistic is also calculated.

• Kendall's tau-b. A nonparametric measure of correlation for ordinal or ranked variables that take ties into account. The sign of the coefficient indicates the direction of the relationship, and its absolute value indicates the strength, with larger absolute values indicating stronger relationships. Possible values range from -1 to 1, but a value of -1 or +1 can be obtained only from square tables.

• Kendall's tau-c. A nonparametric measure of association for ordinal variables that ignores ties. The sign of the coefficient indicates the direction of the relationship, and its absolute value indicates the strength, with larger absolute values indicating stronger relationships. Possible values range from -1 to 1, but a value of -1 or +1 can be obtained only from square tables.

Nominal by Interval. When one variable is categorical and the other is quantitative, select Eta. The categorical variable must be coded numerically.

Expand Show details Collapse Hide details

• Eta. A measure of association that ranges from 0 to 1, with 0 indicating no association between the row and column variables and values close to 1 indicating a high degree of association. Eta is appropriate for a dependent variable measured on an interval scale (for example, income) and an independent variable with a limited number of categories (for example, gender). Two eta values are computed: one treats the row variable as the interval variable, and the other treats the column variable as the interval variable.

Kappa. Cohen's kappa measures the agreement between the evaluations of two raters when both are rating the same object. A value of 1 indicates perfect agreement. A value of 0 indicates that agreement is no better than chance. Kappa is available only for tables in which both variables use the same category values and both variables have the same number of categories.

Risk. For 2 x 2 tables, a measure of the strength of the association between the presence of a factor and the occurrence of an event. If the confidence interval for the statistic includes a value of 1, you cannot assume that the factor is associated with the event. The odds ratio can be used as an estimate or relative risk when the occurrence of the factor is rare.

McNemar. A nonparametric test for two related dichotomous variables. Tests for changes in responses using the chi-square distribution. Useful for detecting changes in responses due to experimental intervention in "before-and-after" designs. For larger square tables, the McNemar-Bowker test of symmetry is reported.

Cochran's and Mantel-Haenszel statistics. Cochran's and Mantel-Haenszel statistics can be used to test for independence between a dichotomous factor variable and a dichotomous response variable, conditional upon covariate patterns defined by one or more layer (control) variables. Note that while other statistics are computed layer by layer, the Cochran's and Mantel-Haenszel statistics are computed once for all layers.

Specifying Statistics for Crosstabs Collapse Hide details

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Descriptive Statistics
Crosstabs...

In the Crosstabs dialog box, click Statistics.

Related Topics

Crosstabs: Related Procedures
Crosstabs
Crosstabs Layers
Crosstabs Clustered Bar Charts
Crosstabs Cell Display
Crosstabs Table Format


Crosstabs Cell Display

Crosstabs,Crosstabs,Crosstabs
cell display,cell display,cell display
column percentages,column percentages,column percentages
in Crosstabs,in Crosstabs,in Crosstabs
expected count,expected count,expected count
in Crosstabs,in Crosstabs,in Crosstabs
total percentages,total percentages,total percentages
in Crosstabs,in Crosstabs,in Crosstabs
observed count,observed count,observed count
in Crosstabs,in Crosstabs,in Crosstabs
residuals,residuals,residuals
in Crosstabs,in Crosstabs,in Crosstabs
row percentages,row percentages,row percentages
in Crosstabs,in Crosstabs,in Crosstabs
percentages,percentages,percentages
in Crosstabs,in Crosstabs,in Crosstabs

To help you uncover patterns in the data that contribute to a significant chi-square test, the Crosstabs procedure displays expected frequencies and three types of residuals (deviates) that measure the difference between observed and expected frequencies. Each cell of the table can contain any combination of counts, percentages, and residuals selected.

Counts. The number of cases actually observed and the number of cases expected if the row and column variables are independent of each other.

Percentages. The percentages can add up across the rows or down the columns. The percentages of the total number of cases represented in the table (one layer) are also available.

Residuals. Raw unstandardized residuals give the difference between the observed and expected values. Standardized and adjusted standardized residuals are also available.

Expand Show details Collapse Hide details

• Unstandardized. The difference between an observed value and the expected value. The expected value is the number of cases you would expect in the cell if there were no relationship between the two variables. A positive residual indicates that there are more cases in the cell than there would be if the row and column variables were independent.

• Standardized. The residual divided by an estimate of its standard deviation. Standardized residuals, which are also known as Pearson residuals, have a mean of 0 and a standard deviation of 1.

• Adjusted standardized. The residual for a cell (observed minus expected value) divided by an estimate of its standard error. The resulting standardized residual is expressed in standard deviation units above or below the mean.

Noninteger Weights. Cell counts are normally integer values, since they represent the number of cases in each cell. But if the data file is currently weighted by a weight variable with fractional values (for example, 1.25), cell counts can also be fractional values. You can truncate or round either before or after calculating the cell counts or use fractional cell counts for both table display and statistical calculations.

Expand Show details Collapse Hide details

• Round cell counts. Case weights are used as is but the accumulated weights in the cells are rounded before computing any statistics.

• Truncate cell counts. Case weights are used as is but the accumulated weights in the cells are truncated before computing any statistics.

• Round case weights. Case weights are rounded before use.

• Truncate case weights. Case weights are truncated before use.

• No adjustments. Case weights are used as is and fractional cell counts are used. However, when Exact Statistics (available only with the Exact Tests option) are requested, the accumulated weights in the cells are either truncated or rounded before computing the Exact test statistics.

Specifying Cell Display for Crosstabs Collapse Hide details

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Descriptive Statistics
Crosstabs...

In the Crosstabs dialog box, click Cells.

Select one or more items to continue.

Related Topics

Crosstabs: Related Procedures
Crosstabs
Crosstabs Layers
Crosstabs Clustered Bar Charts
Crosstabs Statistics
Crosstabs Table Format


Crosstabs Table Format

Crosstabs,Crosstabs,Crosstabs
formats,formats,formats

You can arrange rows in ascending or descending order of the values of the row variable.

Specifying Formats for Crosstabs Collapse Hide details

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Descriptive Statistics
Crosstabs...

In the Crosstabs dialog box, click Formats.

Related Topics

Crosstabs: Related Procedures
Crosstabs
Crosstabs Layers
Crosstabs Clustered Bar Charts
Crosstabs Statistics
Crosstabs Cell Display


Summarize

listing cases,listing cases,listing cases
Summarize,Summarize,Summarize

This feature requires the Statistics Base option.

The Summarize procedure calculates subgroup statistics for variables within categories of one or more grouping variables. All levels of the grouping variable are crosstabulated. You can choose the order in which the statistics are displayed. Summary statistics for each variable across all categories are also displayed. Data values in each category can be listed or suppressed. With large datasets, you can choose to list only the first n cases.

Example. What is the average product sales amount by region and customer industry? You might discover that the average sales amount is slightly higher in the western region than in other regions, with corporate customers in the western region yielding the highest average sales amount.

Statistics. Sum, number of cases, mean, median, grouped median, standard error of the mean, minimum, maximum, range, variable value of the first category of the grouping variable, variable value of the last category of the grouping variable, standard deviation, variance, kurtosis, standard error of kurtosis, skewness, standard error of skewness, percentage of total sum, percentage of total N, percentage of sum in, percentage of N in, geometric mean, and harmonic mean.

Show me

Summarize Data Considerations Collapse Hide details

Data. Grouping variables are categorical variables whose values can be numeric or string. The number of categories should be reasonably small. The other variables should be able to be ranked.

Assumptions. Some of the optional subgroup statistics, such as the mean and standard deviation, are based on normal theory and are appropriate for quantitative variables with symmetric distributions. Robust statistics, such as the median and the range, are appropriate for quantitative variables that may or may not meet the assumption of normality.

To Obtain Case Summaries Collapse Hide details

To Obtain Case Summaries

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Reports
Case Summaries...

Select one or more variables.

Optionally, you can:

• Select one or more grouping variables to divide your data into subgroups.

• Click Options to change the output title, add a caption below the output, or exclude cases with missing values.

• Click Statistics for optional statistics.

• Select Display cases to list the cases in each subgroup. By default, the system lists only the first 100 cases in your file. You can raise or lower the value for Limit cases to first n or deselect that item to list all cases.

Related Topics

Summarize: Related Procedures
Summarize Options
Summarize Statistics
SUMMARIZE


Summarize Options

Summarize,Summarize,Summarize
options,options,options

Summarize allows you to change the title of your output or add a caption that will appear below the output table. You can control line wrapping in titles and captions by typing \n wherever you want to insert a line break in the text.

You can also choose to display or suppress subheadings for totals and to include or exclude cases with missing values for any of the variables used in any of the analyses. Often it is desirable to denote missing cases in output with a period or an asterisk. Enter a character, phrase, or code that you would like to have appear when a value is missing; otherwise, no special treatment is applied to missing cases in the output.

Specifying Options for Summarize Collapse Hide details

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Reports
Case Summaries...

In the Summarize Cases dialog box, click Options.

Related Topics

Summarize: Related Procedures
Summarize
Summarize Statistics


Summarize Statistics

Summarize,Summarize,Summarize
statistics,statistics,statistics
sum,sum,sum
in Summarize,in Summarize,in Summarize
mean,mean,mean
in Summarize,in Summarize,in Summarize
median,median,median
in Summarize,in Summarize,in Summarize
grouped median,grouped median,grouped median
in Summarize,in Summarize,in Summarize
minimum,minimum,minimum
in Summarize,in Summarize,in Summarize
maximum,maximum,maximum
in Summarize,in Summarize,in Summarize
first,first,first
in Summarize,in Summarize,in Summarize
last,last,last
in Summarize,in Summarize,in Summarize
standard deviation,standard deviation,standard deviation
in Summarize,in Summarize,in Summarize
harmonic mean,harmonic mean,harmonic mean
in Summarize,in Summarize,in Summarize
kurtosis,kurtosis,kurtosis
in Summarize,in Summarize,in Summarize
skewness,skewness,skewness
in Summarize,in Summarize,in Summarize
standard error of the mean,standard error of the mean,standard error of the mean
in Summarize,in Summarize,in Summarize
geometric mean,geometric mean,geometric mean
in Summarize,in Summarize,in Summarize
range,range,range
in Summarize,in Summarize,in Summarize
number of cases,number of cases,number of cases
in Summarize,in Summarize,in Summarize
variance,variance,variance
in Summarize,in Summarize,in Summarize
standard error of kurtosis,standard error of kurtosis,standard error of kurtosis
in Summarize,in Summarize,in Summarize
standard error of skewness,standard error of skewness,standard error of skewness
in Summarize,in Summarize,in Summarize
descriptive statistics,descriptive statistics,descriptive statistics
in Summarize,in Summarize,in Summarize

You can choose one or more of the following subgroup statistics for the variables within each category of each grouping variable: sum, number of cases, mean, median, grouped median, standard error of the mean, minimum, maximum, range, variable value of the first category of the grouping variable, variable value of the last category of the grouping variable, standard deviation, variance, kurtosis, standard error of kurtosis, skewness, standard error of skewness, percentage of total sum, percentage of total N, percentage of sum in, percentage of N in, geometric mean, harmonic mean. The order in which the statistics appear in the Cell Statistics list is the order in which they will be displayed in the output. Summary statistics are also displayed for each variable across all categories.

Expand Show details Collapse Hide details

First. Displays the first data value encountered in the data file.

Geometric Mean. The nth root of the product of the data values, where n represents the number of cases.

Grouped Median. Median that is calculated for data that is coded into groups. For example, with age data, if each value in the 30s is coded 35, each value in the 40s is coded 45, and so on, the grouped median is the median calculated from the coded data.

Harmonic Mean. Used to estimate an average group size when the sample sizes in the groups are not equal. The harmonic mean is the total number of samples divided by the sum of the reciprocals of the sample sizes.

Kurtosis. A measure of the extent to which observations cluster around a central point. For a normal distribution, the value of the kurtosis statistic is zero. Positive kurtosis indicates that, relative to a normal distribution, the observations are more clustered about the center of the distribution and have thinner tails until the extreme values of the distribution, at which point the tails of the leptokurtic distribution are thicker relative to a normal distribution. Negative kurtosis indicates that, relative to a normal distribution, the observations cluster less and have thicker tails until the extreme values of the distribution, at which point the tails of the platykurtic distribution are thinner relative to a normal distribution.

Last. Displays the last data value encountered in the data file.

Maximum. The largest value of a numeric variable.

Mean. A measure of central tendency. The arithmetic average, the sum divided by the number of cases.

Median. The value above and below which half of the cases fall, the 50th percentile. If there is an even number of cases, the median is the average of the two middle cases when they are sorted in ascending or descending order. The median is a measure of central tendency not sensitive to outlying values (unlike the mean, which can be affected by a few extremely high or low values).

Minimum. The smallest value of a numeric variable.

N. The number of cases (observations or records).

Percent of Total N. Percentage of the total number of cases in each category.

Percent of Total Sum. Percentage of the total sum in each category.

Range. The difference between the largest and smallest values of a numeric variable, the maximum minus the minimum.

Skewness. A measure of the asymmetry of a distribution. The normal distribution is symmetric and has a skewness value of 0. A distribution with a significant positive skewness has a long right tail. A distribution with a significant negative skewness has a long left tail. As a guideline, a skewness value more than twice its standard error is taken to indicate a departure from symmetry.

Standard Deviation. A measure of dispersion around the mean. In a normal distribution, 68% of cases fall within one standard deviation of the mean and 95% of cases fall within two standard deviations. For example, if the mean age is 45, with a standard deviation of 10, 95% of the cases would be between 25 and 65 in a normal distribution.

Standard Error of Kurtosis. The ratio of kurtosis to its standard error can be used as a test of normality (that is, you can reject normality if the ratio is less than -2 or greater than +2). A large positive value for kurtosis indicates that the tails of the distribution are longer than those of a normal distribution; a negative value for kurtosis indicates shorter tails (becoming like those of a box-shaped uniform distribution).

Standard Error of Mean. A measure of how much the value of the mean may vary from sample to sample taken from the same distribution. It can be used to roughly compare the observed mean to a hypothesized value (that is, you can conclude the two values are different if the ratio of the difference to the standard error is less than -2 or greater than +2).

Standard Error of Skewness. The ratio of skewness to its standard error can be used as a test of normality (that is, you can reject normality if the ratio is less than -2 or greater than +2). A large positive value for skewness indicates a long right tail; an extreme negative value indicates a long left tail.

Sum. The sum or total of the values, across all cases with nonmissing values.

Variance. A measure of dispersion around the mean, equal to the sum of squared deviations from the mean divided by one less than the number of cases. The variance is measured in units that are the square of those of the variable itself.

Specifying Statistics for Summarize Collapse Hide details

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Reports
Case Summaries...

In the Summarize Cases dialog box, click Statistics.

Related Topics

Summarize: Related Procedures
Summarize
Summarize Options


Means

group means,group means,group means
subgroup means,subgroup means,subgroup means
mean,mean,mean
subgroup,subgroup,subgroup
Means,Means,Means

This feature requires the Statistics Base option.

The Means procedure calculates subgroup means and related univariate statistics for dependent variables within categories of one or more independent variables. Optionally, you can obtain a one-way analysis of variance, eta, and tests for linearity.

Example. Measure the average amount of fat absorbed by three different types of cooking oil, and perform a one-way analysis of variance to see whether the means differ.

Statistics. Sum, number of cases, mean, median, grouped median, standard error of the mean, minimum, maximum, range, variable value of the first category of the grouping variable, variable value of the last category of the grouping variable, standard deviation, variance, kurtosis, standard error of kurtosis, skewness, standard error of skewness, percentage of total sum, percentage of total N, percentage of sum in, percentage of N in, geometric mean, and harmonic mean. Options include analysis of variance, eta, eta squared, and tests for linearity R and R2.

Show me

Means Data Considerations Collapse Hide details

Data. The dependent variables are quantitative, and the independent variables are categorical. The values of categorical variables can be numeric or string.

Assumptions. Some of the optional subgroup statistics, such as the mean and standard deviation, are based on normal theory and are appropriate for quantitative variables with symmetric distributions. Robust statistics, such as the median, are appropriate for quantitative variables that may or may not meet the assumption of normality. Analysis of variance is robust to departures from normality, but the data in each cell should be symmetric. Analysis of variance also assumes that the groups come from populations with equal variances. To test this assumption, use Levene's homogeneity-of-variance test, available in the One-Way ANOVA procedure.

To Obtain Subgroup Means Collapse Hide details

To Obtain Subgroup Means

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Compare Means
Means...

Select one or more dependent variables.

Use one of the following methods to select categorical independent variables:

• Select one or more independent variables. Separate results are displayed for each independent variable.

• Select one or more layers of independent variables. Each layer further subdivides the sample. If you have one independent variable in Layer 1 and one independent variable in Layer 2, the results are displayed in one crossed table, as opposed to separate tables for each independent variable.

Optionally, click Options for optional statistics, an analysis of variance table, eta, eta squared, R, and R2.

This procedure pastes MEANS command syntax.

See MEANS Algorithms for computational details for this procedure.

Related Topics

Means: Related Procedures
Means Options
MEANS


Means Options

Means,Means,Means
options,options,options
Means,Means,Means
statistics,statistics,statistics
sum,sum,sum
in Means,in Means,in Means
mean,mean,mean
in Means,in Means,in Means
median,median,median
in Means,in Means,in Means
grouped median,grouped median,grouped median
in Means,in Means,in Means
minimum,minimum,minimum
in Means,in Means,in Means
maximum,maximum,maximum
in Means,in Means,in Means
first,first,first
in Means,in Means,in Means
last,last,last
in Means,in Means,in Means
standard deviation,standard deviation,standard deviation
in Means,in Means,in Means
harmonic mean,harmonic mean,harmonic mean
in Means,in Means,in Means
kurtosis,kurtosis,kurtosis
in Means,in Means,in Means
skewness,skewness,skewness
in Means,in Means,in Means
standard error of the mean,standard error of the mean,standard error of the mean
in Means,in Means,in Means
geometric mean,geometric mean,geometric mean
in Means,in Means,in Means
range,range,range
in Means,in Means,in Means
number of cases,number of cases,number of cases
in Means,in Means,in Means
variance,variance,variance
in Means,in Means,in Means
standard error of kurtosis,standard error of kurtosis,standard error of kurtosis
in Means,in Means,in Means
standard error of skewness,standard error of skewness,standard error of skewness
in Means,in Means,in Means
eta,eta,eta
in Means,in Means,in Means
eta-squared,eta-squared,eta-squared
in Means,in Means,in Means
R statistic,R statistic,R statistic
in Means,in Means,in Means
R2,R2,R2
in Means,in Means,in Means
ANOVA,ANOVA,ANOVA
in Means,in Means,in Means
tests for linearity,tests for linearity,tests for linearity
in Means,in Means,in Means
analysis of variance,analysis of variance,analysis of variance
in Means,in Means,in Means

You can choose one or more of the following subgroup statistics for the variables within each category of each grouping variable: sum, number of cases, mean, median, grouped median, standard error of the mean, minimum, maximum, range, variable value of the first category of the grouping variable, variable value of the last category of the grouping variable, standard deviation, variance, kurtosis, standard error of kurtosis, skewness, standard error of skewness, percentage of total sum, percentage of total N, percentage of sum in, percentage of N in, geometric mean, and harmonic mean. You can change the order in which the subgroup statistics appear. The order in which the statistics appear in the Cell Statistics list is the order in which they are displayed in the output. Summary statistics are also displayed for each variable across all categories.

Expand Show details Collapse Hide details

First. Displays the first data value encountered in the data file.

Geometric Mean. The nth root of the product of the data values, where n represents the number of cases.

Grouped Median. Median that is calculated for data that is coded into groups. For example, with age data, if each value in the 30s is coded 35, each value in the 40s is coded 45, and so on, the grouped median is the median calculated from the coded data.

Harmonic Mean. Used to estimate an average group size when the sample sizes in the groups are not equal. The harmonic mean is the total number of samples divided by the sum of the reciprocals of the sample sizes.

Kurtosis. A measure of the extent to which observations cluster around a central point. For a normal distribution, the value of the kurtosis statistic is zero. Positive kurtosis indicates that, relative to a normal distribution, the observations are more clustered about the center of the distribution and have thinner tails until the extreme values of the distribution, at which point the tails of the leptokurtic distribution are thicker relative to a normal distribution. Negative kurtosis indicates that, relative to a normal distribution, the observations cluster less and have thicker tails until the extreme values of the distribution, at which point the tails of the platykurtic distribution are thinner relative to a normal distribution.

Last. Displays the last data value encountered in the data file.

Maximum. The largest value of a numeric variable.

Mean. A measure of central tendency. The arithmetic average, the sum divided by the number of cases.

Median. The value above and below which half of the cases fall, the 50th percentile. If there is an even number of cases, the median is the average of the two middle cases when they are sorted in ascending or descending order. The median is a measure of central tendency not sensitive to outlying values (unlike the mean, which can be affected by a few extremely high or low values).

Minimum. The smallest value of a numeric variable.

N. The number of cases (observations or records).

Percent of total N. Percentage of the total number of cases in each category.

Percent of total sum. Percentage of the total sum in each category.

Range. The difference between the largest and smallest values of a numeric variable, the maximum minus the minimum.

Skewness. A measure of the asymmetry of a distribution. The normal distribution is symmetric and has a skewness value of 0. A distribution with a significant positive skewness has a long right tail. A distribution with a significant negative skewness has a long left tail. As a guideline, a skewness value more than twice its standard error is taken to indicate a departure from symmetry.

Standard Deviation. A measure of dispersion around the mean. In a normal distribution, 68% of cases fall within one standard deviation of the mean and 95% of cases fall within two standard deviations. For example, if the mean age is 45, with a standard deviation of 10, 95% of the cases would be between 25 and 65 in a normal distribution.

Standard Error of Kurtosis. The ratio of kurtosis to its standard error can be used as a test of normality (that is, you can reject normality if the ratio is less than -2 or greater than +2). A large positive value for kurtosis indicates that the tails of the distribution are longer than those of a normal distribution; a negative value for kurtosis indicates shorter tails (becoming like those of a box-shaped uniform distribution).

Standard Error of Mean. A measure of how much the value of the mean may vary from sample to sample taken from the same distribution. It can be used to roughly compare the observed mean to a hypothesized value (that is, you can conclude the two values are different if the ratio of the difference to the standard error is less than -2 or greater than +2).

Standard Error of Skewness. The ratio of skewness to its standard error can be used as a test of normality (that is, you can reject normality if the ratio is less than -2 or greater than +2). A large positive value for skewness indicates a long right tail; an extreme negative value indicates a long left tail.

Sum. The sum or total of the values, across all cases with nonmissing values.

Variance. A measure of dispersion around the mean, equal to the sum of squared deviations from the mean divided by one less than the number of cases. The variance is measured in units that are the square of those of the variable itself.

Statistics for First Layer

Anova table and eta. Displays a one-way analysis-of-variance table and calculates eta and eta-squared (measures of association) for each independent variable in the first layer.

Test for linearity. Calculates the sum of squares, degrees of freedom, and mean square associated with linear and nonlinear components, as well as the F ratio, R and R-squared. Linearity is not calculated if the independent variable is a short string.

Specifying Options for Means Collapse Hide details

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Compare Means
Means...

In the Means dialog box, select Options.

Related Topics

Means: Related Procedures
Means


OLAP Cubes

OLAP Cubes,OLAP Cubes,OLAP Cubes
group means,group means,group means
subgroup means,subgroup means,subgroup means
mean,mean,mean
subgroup,subgroup,subgroup

This feature requires the Statistics Base option.

The OLAP (Online Analytical Processing) Cubes procedure calculates totals, means, and other univariate statistics for continuous summary variables within categories of one or more categorical grouping variables. A separate layer in the table is created for each category of each grouping variable.

Example. Total and average sales for different regions and product lines within regions.

Statistics. Sum, number of cases, mean, median, grouped median, standard error of the mean, minimum, maximum, range, variable value of the first category of the grouping variable, variable value of the last category of the grouping variable, standard deviation, variance, kurtosis, standard error of kurtosis, skewness, standard error of skewness, percentage of total cases, percentage of total sum, percentage of total cases within grouping variables, percentage of total sum within grouping variables, geometric mean, and harmonic mean.

Show me

OLAP Cubes Data Considerations Collapse Hide details

Data. The summary variables are quantitative (continuous variables measured on an interval or ratio scale), and the grouping variables are categorical. The values of categorical variables can be numeric or string.

Assumptions. Some of the optional subgroup statistics, such as the mean and standard deviation, are based on normal theory and are appropriate for quantitative variables with symmetric distributions. Robust statistics, such as the median and range, are appropriate for quantitative variables that may or may not meet the assumption of normality.

To Obtain OLAP Cubes Collapse Hide details

To Obtain OLAP Cubes

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Reports
OLAP Cubes...

Select one or more continuous summary variables.

Select one or more categorical grouping variables.

Optionally:

• Select different summary statistics (click Statistics). You must select one or more grouping variables before you can select summary statistics.

• Calculate differences between pairs of variables and pairs of groups that are defined by a grouping variable (click Differences).

• Create custom table titles (click Title).

Related Topics

OLAP Cubes: Related Procedures
OLAP Cubes Statistics
OLAP Cubes Differences
OLAP Cubes Title
OLAP CUBES


OLAP Cubes Statistics

OLAP Cubes,OLAP Cubes,OLAP Cubes
statistics,statistics,statistics
sum,sum,sum
in OLAP Cubes,in OLAP Cubes,in OLAP Cubes
mean,mean,mean
in OLAP Cubes,in OLAP Cubes,in OLAP Cubes
median,median,median
in OLAP Cubes,in OLAP Cubes,in OLAP Cubes
grouped median,grouped median,grouped median
in OLAP Cubes,in OLAP Cubes,in OLAP Cubes
minimum,minimum,minimum
in OLAP Cubes,in OLAP Cubes,in OLAP Cubes
maximum,maximum,maximum
in OLAP Cubes,in OLAP Cubes,in OLAP Cubes
first,first,first
in OLAP Cubes,in OLAP Cubes,in OLAP Cubes
last,last,last
in OLAP Cubes,in OLAP Cubes,in OLAP Cubes
standard deviation,standard deviation,standard deviation
in OLAP Cubes,in OLAP Cubes,in OLAP Cubes
kurtosis,kurtosis,kurtosis
in OLAP Cubes,in OLAP Cubes,in OLAP Cubes
skewness,skewness,skewness
in OLAP Cubes,in OLAP Cubes,in OLAP Cubes
standard error of the mean,standard error of the mean,standard error of the mean
in OLAP Cubes,in OLAP Cubes,in OLAP Cubes
range,range,range
in OLAP Cubes,in OLAP Cubes,in OLAP Cubes
number of cases,number of cases,number of cases
in OLAP Cubes,in OLAP Cubes,in OLAP Cubes
variance,variance,variance
in OLAP Cubes,in OLAP Cubes,in OLAP Cubes
standard error of kurtosis,standard error of kurtosis,standard error of kurtosis
in OLAP Cubes,in OLAP Cubes,in OLAP Cubes
standard error of skewness,standard error of skewness,standard error of skewness
in OLAP Cubes,in OLAP Cubes,in OLAP Cubes
geometric mean,geometric mean,geometric mean
in OLAP Cubes,in OLAP Cubes,in OLAP Cubes
harmonic mean,harmonic mean,harmonic mean
in OLAP Cubes,in OLAP Cubes,in OLAP Cubes

You can choose one or more of the following subgroup statistics for the summary variables within each category of each grouping variable: sum, number of cases, mean, median, grouped median, standard error of the mean, minimum, maximum, range, variable value of the first category of the grouping variable, variable value of the last category of the grouping variable, standard deviation, variance, kurtosis, standard error of kurtosis, skewness, standard error of skewness, percentage of total cases, percentage of total sum, percentage of total cases within grouping variables, percentage of total sum within grouping variables, geometric mean, and harmonic mean.

You can change the order in which the subgroup statistics appear. The order in which the statistics appear in the Cell Statistics list is the order in which they are displayed in the output. Summary statistics are also displayed for each variable across all categories.

Expand Show details Collapse Hide details

First. Displays the first data value encountered in the data file.

Geometric Mean. The nth root of the product of the data values, where n represents the number of cases.

Grouped Median. Median that is calculated for data that is coded into groups. For example, with age data, if each value in the 30s is coded 35, each value in the 40s is coded 45, and so on, the grouped median is the median calculated from the coded data.

Harmonic Mean. Used to estimate an average group size when the sample sizes in the groups are not equal. The harmonic mean is the total number of samples divided by the sum of the reciprocals of the sample sizes.

Kurtosis. A measure of the extent to which observations cluster around a central point. For a normal distribution, the value of the kurtosis statistic is zero. Positive kurtosis indicates that, relative to a normal distribution, the observations are more clustered about the center of the distribution and have thinner tails until the extreme values of the distribution, at which point the tails of the leptokurtic distribution are thicker relative to a normal distribution. Negative kurtosis indicates that, relative to a normal distribution, the observations cluster less and have thicker tails until the extreme values of the distribution, at which point the tails of the platykurtic distribution are thinner relative to a normal distribution.

Last. Displays the last data value encountered in the data file.

Maximum. The largest value of a numeric variable.

Mean. A measure of central tendency. The arithmetic average, the sum divided by the number of cases.

Median. The value above and below which half of the cases fall, the 50th percentile. If there is an even number of cases, the median is the average of the two middle cases when they are sorted in ascending or descending order. The median is a measure of central tendency not sensitive to outlying values (unlike the mean, which can be affected by a few extremely high or low values).

Minimum. The smallest value of a numeric variable.

N. The number of cases (observations or records).

Percent of N in. Percentage of the number of cases for the specified grouping variable within categories of other grouping variables. If you only have one grouping variable, this value is identical to percentage of total number of cases.

Percent of Sum in. Percentage of the sum for the specified grouping variable within categories of other grouping variables. If you only have one grouping variable, this value is identical to percentage of total sum.

Percent of Total N. Percentage of the total number of cases in each category.

Percent of Total Sum. Percentage of the total sum in each category.

Range. The difference between the largest and smallest values of a numeric variable, the maximum minus the minimum.

Skewness. A measure of the asymmetry of a distribution. The normal distribution is symmetric and has a skewness value of 0. A distribution with a significant positive skewness has a long right tail. A distribution with a significant negative skewness has a long left tail. As a guideline, a skewness value more than twice its standard error is taken to indicate a departure from symmetry.

Standard Deviation. A measure of dispersion around the mean. In a normal distribution, 68% of cases fall within one standard deviation of the mean and 95% of cases fall within two standard deviations. For example, if the mean age is 45, with a standard deviation of 10, 95% of the cases would be between 25 and 65 in a normal distribution.

Standard Error of Kurtosis. The ratio of kurtosis to its standard error can be used as a test of normality (that is, you can reject normality if the ratio is less than -2 or greater than +2). A large positive value for kurtosis indicates that the tails of the distribution are longer than those of a normal distribution; a negative value for kurtosis indicates shorter tails (becoming like those of a box-shaped uniform distribution).

Standard Error of Mean. A measure of how much the value of the mean may vary from sample to sample taken from the same distribution. It can be used to roughly compare the observed mean to a hypothesized value (that is, you can conclude the two values are different if the ratio of the difference to the standard error is less than -2 or greater than +2).

Standard Error of Skewness. The ratio of skewness to its standard error can be used as a test of normality (that is, you can reject normality if the ratio is less than -2 or greater than +2). A large positive value for skewness indicates a long right tail; an extreme negative value indicates a long left tail.

Sum. The sum or total of the values, across all cases with nonmissing values.

Variance. A measure of dispersion around the mean, equal to the sum of squared deviations from the mean divided by one less than the number of cases. The variance is measured in units that are the square of those of the variable itself.

Specifying Statistics for OLAP Cubes Collapse Hide details

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Reports
OLAP Cubes...

In the OLAP Cubes dialog box, click Statistics.

Related Topics

OLAP Cubes: Related Procedures
OLAP Cubes
OLAP Cubes Differences
OLAP Cubes Title


OLAP Cubes Differences

differences between groups,differences between groups,differences between groups
in OLAP Cubes,in OLAP Cubes,in OLAP Cubes
differences between variables,differences between variables,differences between variables
in OLAP Cubes,in OLAP Cubes,in OLAP Cubes
comparing groups,comparing groups,comparing groups
in OLAP Cubes,in OLAP Cubes,in OLAP Cubes
comparing variables,comparing variables,comparing variables
in OLAP Cubes,in OLAP Cubes,in OLAP Cubes

This dialog box allows you to calculate percentage and arithmetic differences between summary variables or between groups that are defined by a grouping variable. Differences are calculated for all measures that are selected in the OLAP Cubes Statistics dialog box.

Differences between Variables. Calculates differences between pairs of variables. Summary statistics values for the second variable (the Minus variable) in each pair are subtracted from summary statistics values for the first variable in the pair. For percentage differences, the value of the summary variable for the Minus variable is used as the denominator. You must select at least two summary variables in the main dialog box before you can specify differences between variables.

Differences between Groups of Cases. Calculates differences between pairs of groups defined by a grouping variable. Summary statistics values for the second category in each pair (the Minus category) are subtracted from summary statistics values for the first category in the pair. Percentage differences use the value of the summary statistic for the Minus category as the denominator. You must select one or more grouping variables in the main dialog box before you can specify differences between groups.

Specifying Differences for OLAP Cubes Collapse Hide details

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Reports
OLAP Cubes...

Select two or more summary variables or one or more grouping variables.

Click Differences.

Related Topics

OLAP Cubes: Related Procedures
OLAP Cubes
OLAP Cubes Statistics
OLAP Cubes Title


OLAP Cubes Title

titles,titles,titles
in OLAP Cubes,in OLAP Cubes,in OLAP Cubes
OLAP Cubes,OLAP Cubes,OLAP Cubes
titles,titles,titles

You can change the title of your output or add a caption that will appear below the output table. You can also control line wrapping of titles and captions by typing \n wherever you want to insert a line break in the text.

Specifying OLAP Cubes Titles Collapse Hide details

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Reports
OLAP Cubes...

In the OLAP Cubes dialog box, click Title.

To control line wrapping in titles and captions:

Insert \n in the text wherever you want to insert a line break.

Related Topics

OLAP Cubes: Related Procedures
OLAP Cubes
OLAP Cubes Statistics
OLAP Cubes Differences


Independent-Samples T Test

Independent-Samples T Test,Independent-Samples T Test,Independent-Samples T Test
t test,t test,t test
in Independent-Samples T Test,in Independent-Samples T Test,in Independent-Samples T Test
two-sample t test,two-sample t test,two-sample t test
in Independent-Samples T Test,in Independent-Samples T Test,in Independent-Samples T Test
Student's t test,Student's t test,Student's t test

The Independent-Samples T Test procedure compares means for two groups of cases. Ideally, for this test, the subjects should be randomly assigned to two groups, so that any difference in response is due to the treatment (or lack of treatment) and not to other factors. This is not the case if you compare average income for males and females. A person is not randomly assigned to be a male or female. In such situations, you should ensure that differences in other factors are not masking or enhancing a significant difference in means. Differences in average income may be influenced by factors such as education (and not by sex alone).

Example. Patients with high blood pressure are randomly assigned to a placebo group and a treatment group. The placebo subjects receive an inactive pill, and the treatment subjects receive a new drug that is expected to lower blood pressure. After the subjects are treated for two months, the two-sample t test is used to compare the average blood pressures for the placebo group and the treatment group. Each patient is measured once and belongs to one group.

Statistics. For each variable: sample size, mean, standard deviation, and standard error of the mean. For the difference in means: mean, standard error, and confidence interval (you can specify the confidence level). Tests: Levene's test for equality of variances and both pooled-variances and separate-variances t tests for equality of means.

Show me

Independent-Samples T Test Data Considerations Collapse Hide details

Data. The values of the quantitative variable of interest are in a single column in the data file. The procedure uses a grouping variable with two values to separate the cases into two groups. The grouping variable can be numeric (values such as 1 and 2 or 6.25 and 12.5) or short string (such as yes and no). As an alternative, you can use a quantitative variable, such as age, to split the cases into two groups by specifying a cutpoint (cutpoint 21 splits age into an under-21 group and a 21-and-over group).

Assumptions. For the equal-variance t test, the observations should be independent, random samples from normal distributions with the same population variance. For the unequal-variance t test, the observations should be independent, random samples from normal distributions. The two-sample t test is fairly robust to departures from normality. When checking distributions graphically, look to see that they are symmetric and have no outliers.

To Obtain an Independent-Samples T Test Collapse Hide details

To Obtain an Independent-Samples T Test

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Compare Means
Independent-Samples T Test...

Select one or more quantitative test variables. A separate t test is computed for each variable.

Select a single grouping variable, and then click Define Groups to specify two codes for the groups that you want to compare.

Optionally, click Options to control the treatment of missing data and the level of the confidence interval.

This procedure pastes T-TEST command syntax.

See T Test Algorithms for computational details for this procedure.

Related Topics

Independent-Samples T Test: Related Procedures
Independent-Samples T Test Define Groups
Independent-Samples T Test Options
T-TEST


Independent-Samples T Test Define Groups

Independent-Samples T Test,Independent-Samples T Test,Independent-Samples T Test
defining groups,defining groups,defining groups
Independent-Samples T Test,Independent-Samples T Test,Independent-Samples T Test
grouping variables,grouping variables,grouping variables
Independent-Samples T Test,Independent-Samples T Test,Independent-Samples T Test
string variables,string variables,string variables

For numeric grouping variables, define the two groups for the t test by specifying two values or a cutpoint:

• Use specified values. Enter a value for Group 1 and another value for Group 2. Cases with any other values are excluded from the analysis. Numbers need not be integers (for example, 6.25 and 12.5 are valid).

• Cutpoint. Enter a number that splits the values of the grouping variable into two sets. All cases with values that are less than the cutpoint form one group, and cases with values that are greater than or equal to the cutpoint form the other group.

For string grouping variables, enter a string for Group 1 and another value for Group 2, such as yes and no. Cases with other strings are excluded from the analysis.

Defining Groups for an Independent-Samples T Test Collapse Hide details

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Compare Means
Independent-Samples T Test...

Select a grouping variable and then click Define Groups.

Enter the values to define the groups.

Related Topics

Independent-Samples T Test: Related Procedures
Independent-Samples T Test
Independent-Samples T Test Options


Independent-Samples T Test Options

Independent-Samples T Test,Independent-Samples T Test,Independent-Samples T Test
options,options,options
Independent-Samples T Test,Independent-Samples T Test,Independent-Samples T Test
missing values,missing values,missing values
confidence intervals,confidence intervals,confidence intervals
in Independent-Samples T Test,in Independent-Samples T Test,in Independent-Samples T Test
Independent-Samples T Test,Independent-Samples T Test,Independent-Samples T Test
confidence intervals,confidence intervals,confidence intervals
missing values,missing values,missing values
in Independent-Samples T Test,in Independent-Samples T Test,in Independent-Samples T Test

Confidence Interval. By default, a 95% confidence interval for the difference in means is displayed. Enter a value between 1 and 99 to request a different confidence level.

Missing Values. When you test several variables, and data are missing for one or more variables, you can tell the procedure which cases to include (or exclude).

• Exclude cases analysis by analysis. Each t test uses all cases that have valid data for the tested variables. Sample sizes may vary from test to test.

• Exclude cases listwise. Each t test uses only cases that have valid data for all variables that are used in the requested t tests. The sample size is constant across tests.

Specifying Options for an Independent-Samples T Test Collapse Hide details

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Compare Means
Independent-Samples T Test...

In the Independent-Samples T Test dialog box, click Options.

Related Topics

Independent-Samples T Test: Related Procedures
Independent-Samples T Test
Independent-Samples T Test Define Groups


Paired-Samples T Test

Paired-Samples T Test,Paired-Samples T Test,Paired-Samples T Test
t test,t test,t test
in Paired-Samples T Test,in Paired-Samples T Test,in Paired-Samples T Test
dependent t test,dependent t test,dependent t test
in Paired-Samples T Test,in Paired-Samples T Test,in Paired-Samples T Test
Paired-Samples T Test,Paired-Samples T Test,Paired-Samples T Test
selecting paired variables,selecting paired variables,selecting paired variables
case-control study,case-control study,case-control study
Paired-Samples T Test,Paired-Samples T Test,Paired-Samples T Test
matched-pairs study,matched-pairs study,matched-pairs study
in Paired-Samples T Test,in Paired-Samples T Test,in Paired-Samples T Test

This feature requires the Statistics Base option.

The Paired-Samples T Test procedure compares the means of two variables for a single group. The procedure computes the differences between values of the two variables for each case and tests whether the average differs from 0.

Example. In a study on high blood pressure, all patients are measured at the beginning of the study, given a treatment, and measured again. Thus, each subject has two measures, often called before and after measures. An alternative design for which this test is used is a matched-pairs or case-control study, in which each record in the data file contains the response for the patient and also for his or her matched control subject. In a blood pressure study, patients and controls might be matched by age (a 75-year-old patient with a 75-year-old control group member).

Statistics. For each variable: mean, sample size, standard deviation, and standard error of the mean. For each pair of variables: correlation, average difference in means, t test, and confidence interval for mean difference (you can specify the confidence level). Standard deviation and standard error of the mean difference.

Show me

Paired-Samples T Test Data Considerations Collapse Hide details

Data. For each paired test, specify two quantitative variables (interval level of measurement or ratio level of measurement). For a matched-pairs or case-control study, the response for each test subject and its matched control subject must be in the same case in the data file.

Assumptions. Observations for each pair should be made under the same conditions. The mean differences should be normally distributed. Variances of each variable can be equal or unequal.

To Obtain a Paired-Samples T Test Collapse Hide details

To Obtain a Paired-Samples T Test

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Compare Means
Paired-Samples T Test...

Select one or more pairs of variables

Optionally, click Options to control the treatment of missing data and the level of the confidence interval.

This procedure pastes T-TEST command syntax.

See T Test Algorithms for computational details for this procedure.

Related Topics

Paired-Samples T Test: Related Procedures
Paired-Samples T Test Options
T-TEST


Paired-Samples T Test Options

Paired-Samples T Test,Paired-Samples T Test,Paired-Samples T Test
options,options,options
Paired-Samples T Test,Paired-Samples T Test,Paired-Samples T Test
missing values,missing values,missing values
confidence intervals,confidence intervals,confidence intervals
in Paired-Samples T Test,in Paired-Samples T Test,in Paired-Samples T Test
missing values,missing values,missing values
in Paired-Samples T Test,in Paired-Samples T Test,in Paired-Samples T Test

Confidence Interval. By default, a 95% confidence interval for the difference in means is displayed. Enter a value between 1 and 99 to request a different confidence level.

Missing Values. When you test several variables, and data are missing for one or more variables, you can tell the procedure which cases to include (or exclude):

• Exclude cases analysis by analysis. Each t test uses all cases that have valid data for the tested pair of variables. Sample sizes may vary from test to test.

• Exclude cases listwise. Each t test uses only cases that have valid data for all pairs of tested variables. The sample size is constant across tests.

Obtaining Options for a Paired-Samples T Test Collapse Hide details

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Compare Means
Paired-Samples T Test...

In the Paired-Samples T Test dialog box, click Options.

Related Topics

Paired-Samples T Test: Related Procedures
Paired-Samples T Test


One-Sample T Test

One-Sample T Test,One-Sample T Test,One-Sample T Test
t test,t test,t test
in One-Sample T Test,in One-Sample T Test,in One-Sample T Test

This feature requires the Statistics Base option.

The One-Sample T Test procedure tests whether the mean of a single variable differs from a specified constant.

Examples. A researcher might want to test whether the average IQ score for a group of students differs from 100. Or a cereal manufacturer can take a sample of boxes from the production line and check whether the mean weight of the samples differs from 1.3 pounds at the 95% confidence level.

Statistics. For each test variable: mean, standard deviation, and standard error of the mean. The average difference between each data value and the hypothesized test value, a t test that tests that this difference is 0, and a confidence interval for this difference (you can specify the confidence level).

Show me

One-Sample T Test Data Considerations Collapse Hide details

Data. To test the values of a quantitative variable against a hypothesized test value, choose a quantitative variable and enter a hypothesized test value.

Assumptions. This test assumes that the data are normally distributed; however, this test is fairly robust to departures from normality.

To Obtain a One-Sample T Test Collapse Hide details

To Obtain a One-Sample T Test

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Compare Means
One-Sample T Test...

Select one or more variables to be tested against the same hypothesized value.

Enter a numeric test value against which each sample mean is compared.

Optionally, click Options to control the treatment of missing data and the level of the confidence interval.

This procedure pastes T-TEST command syntax.

See T Test Algorithms for computational details for this procedure.

Related Topics

One-Sample T Test: Related Procedures
One-Sample T Test Options
T-TEST


One-Sample T Test Options

One-Sample T Test,One-Sample T Test,One-Sample T Test
options,options,options
One-Sample T Test,One-Sample T Test,One-Sample T Test
missing values,missing values,missing values
One-Sample T Test,One-Sample T Test,One-Sample T Test
confidence intervals,confidence intervals,confidence intervals
confidence intervals,confidence intervals,confidence intervals
in One-Sample T Test,in One-Sample T Test,in One-Sample T Test
missing values,missing values,missing values
in One-Sample T Test,in One-Sample T Test,in One-Sample T Test

Confidence Interval. By default, a 95% confidence interval for the difference between the mean and the hypothesized test value is displayed. Enter a value between 1 and 99 to request a different confidence level.

Missing Values. When you test several variables, and data are missing for one or more variables, you can tell the procedure which cases to include (or exclude).

• Exclude cases analysis by analysis. Each t test uses all cases that have valid data for the tested variable. Sample sizes may vary from test to test.

• Exclude cases listwise. Each t test uses only cases that have valid data for all variables that are used in any of the requested t tests. The sample size is constant across tests.

Specifying Options for a One-Sample T Test Collapse Hide details

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Compare Means
One-Sample T Test...

In the One-Sample T Test dialog box, click Options.

Related Topics

One-Sample T Test: Related Procedures
One-Sample T Test


T-TEST Command Additional Features

One-Sample T Test,One-Sample T Test,One-Sample T Test
command additional features,command additional features,command additional features

The command syntax language also allows you to:

• Produce both one-sample and independent-samples t tests by running a single command.

• Test a variable against each variable on a list in a paired t test (with the PAIRS subcommand).

Related Topics

T-TEST


One-Way ANOVA

One-Way ANOVA,One-Way ANOVA,One-Way ANOVA
One-Way ANOVA,One-Way ANOVA,One-Way ANOVA
factor variables,factor variables,factor variables
analysis of variance,analysis of variance,analysis of variance
in One-Way ANOVA,in One-Way ANOVA,in One-Way ANOVA
ANOVA,ANOVA,ANOVA
in One-Way ANOVA,in One-Way ANOVA,in One-Way ANOVA

This feature requires the Statistics Base option.

The One-Way ANOVA procedure produces a one-way analysis of variance for a quantitative dependent variable by a single factor (independent) variable. Analysis of variance is used to test the hypothesis that several means are equal. This technique is an extension of the two-sample t test.

In addition to determining that differences exist among the means, you may want to know which means differ. There are two types of tests for comparing means: a priori contrasts and post hoc tests. Contrasts are tests set up before running the experiment, and post hoc tests are run after the experiment has been conducted. You can also test for trends across categories.

Example. Doughnuts absorb fat in various amounts when they are cooked. An experiment is set up involving three types of fat: peanut oil, corn oil, and lard. Peanut oil and corn oil are unsaturated fats, and lard is a saturated fat. Along with determining whether the amount of fat absorbed depends on the type of fat used, you could set up an a priori contrast to determine whether the amount of fat absorption differs for saturated and unsaturated fats.

Statistics. For each group: number of cases, mean, standard deviation, standard error of the mean, minimum, maximum, and 95% confidence interval for the mean. Levene's test for homogeneity of variance, analysis-of-variance table and robust tests of the equality of means for each dependent variable, user-specified a priori contrasts, and post hoc range tests and multiple comparisons: Bonferroni, Sidak, Tukey's honestly significant difference, Hochberg's GT2, Gabriel, Dunnett, Ryan-Einot-Gabriel-Welsch F test (R-E-G-W F), Ryan-Einot-Gabriel-Welsch range test (R-E-G-W Q), Tamhane's T2, Dunnett's T3, Games-Howell, Dunnett's C, Duncan's multiple range test, Student-Newman-Keuls (S-N-K), Tukey's b, Waller-Duncan, Scheffé, and least-significant difference.

Show me

One-Way ANOVA Data Considerations Collapse Hide details

Data. Factor variable values should be integers, and the dependent variable should be quantitative (interval level of measurement).

Assumptions. Each group is an independent random sample from a normal population. Analysis of variance is robust to departures from normality, although the data should be symmetric. The groups should come from populations with equal variances. To test this assumption, use Levene's homogeneity-of-variance test.

To Obtain a One-Way Analysis of Variance Collapse Hide details

To Obtain a One-Way Analysis of Variance

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Compare Means
One-Way ANOVA...

Select one or more dependent variables.

Select a single independent factor variable.

This procedure pastes ONEWAY command syntax.

See ONEWAY Algorithms for computational details for this procedure.

Related Topics

One-Way ANOVA: Related Procedures
One-Way ANOVA Contrasts
One-Way ANOVA Post Hoc Tests
One-Way ANOVA Options
ONEWAY


One-Way ANOVA Contrasts

One-Way ANOVA,One-Way ANOVA,One-Way ANOVA
contrasts,contrasts,contrasts
contrasts,contrasts,contrasts
in One-Way ANOVA,in One-Way ANOVA,in One-Way ANOVA
One-Way ANOVA,One-Way ANOVA,One-Way ANOVA
polynomial contrasts,polynomial contrasts,polynomial contrasts
polynomial contrasts,polynomial contrasts,polynomial contrasts
in One-Way ANOVA,in One-Way ANOVA,in One-Way ANOVA

You can partition the between-groups sums of squares into trend components or specify a priori contrasts.

Polynomial. Partitions the between-groups sums of squares into trend components. You can test for a trend of the dependent variable across the ordered levels of the factor variable. For example, you could test for a linear trend (increasing or decreasing) in salary across the ordered levels of highest degree earned.

• Degree. You can choose a 1st, 2nd, 3rd, 4th, or 5th degree polynomial.

Coefficients. User-specified a priori contrasts to be tested by the t statistic. Enter a coefficient for each group (category) of the factor variable and click Add after each entry. Each new value is added to the bottom of the coefficient list. To specify additional sets of contrasts, click Next. Use Next and Previous to move between sets of contrasts.

The order of the coefficients is important because it corresponds to the ascending order of the category values of the factor variable. The first coefficient on the list corresponds to the lowest group value of the factor variable, and the last coefficient corresponds to the highest value. For example, if there are six categories of the factor variable, the coefficients –1, 0, 0, 0, 0.5, and 0.5 contrast the first group with the fifth and sixth groups. For most applications, the coefficients should sum to 0. Sets that do not sum to 0 can also be used, but a warning message is displayed.

Related Topics

One-Way ANOVA: Related Procedures
One-Way ANOVA
One-Way ANOVA Post Hoc Tests
One-Way ANOVA Options


One-Way ANOVA Post Hoc Tests

One-Way ANOVA,One-Way ANOVA,One-Way ANOVA
post hoc tests,post hoc tests,post hoc tests
post hoc multiple comparisons,post hoc multiple comparisons,post hoc multiple comparisons
least significant difference,least significant difference,least significant difference
in One-Way ANOVA,in One-Way ANOVA,in One-Way ANOVA
Bonferroni,Bonferroni,Bonferroni
in One-Way ANOVA,in One-Way ANOVA,in One-Way ANOVA
Duncan's multiple range test,Duncan's multiple range test,Duncan's multiple range test
in One-Way ANOVA,in One-Way ANOVA,in One-Way ANOVA
Student-Newman-Keuls,Student-Newman-Keuls,Student-Newman-Keuls
in One-Way ANOVA,in One-Way ANOVA,in One-Way ANOVA
multiple comparisons,multiple comparisons,multiple comparisons
in One-Way ANOVA,in One-Way ANOVA,in One-Way ANOVA
Tukey's honestly significant difference,Tukey's honestly significant difference,Tukey's honestly significant difference
in One-Way ANOVA,in One-Way ANOVA,in One-Way ANOVA
Tukey's b test,Tukey's b test,Tukey's b test
in One-Way ANOVA,in One-Way ANOVA,in One-Way ANOVA
Scheffé test,Scheffé test,Scheffé test
in One-Way ANOVA,in One-Way ANOVA,in One-Way ANOVA
Sidak's t test,Sidak's t test,Sidak's t test
in One-Way ANOVA,in One-Way ANOVA,in One-Way ANOVA
Hochberg's GT2,Hochberg's GT2,Hochberg's GT2
in One-Way ANOVA,in One-Way ANOVA,in One-Way ANOVA
Gabriel's pairwise comparisons test,Gabriel's pairwise comparisons test,Gabriel's pairwise comparisons test
in One-Way ANOVA,in One-Way ANOVA,in One-Way ANOVA
Dunnett's t test,Dunnett's t test,Dunnett's t test
in One-Way ANOVA,in One-Way ANOVA,in One-Way ANOVA
Tamhane's T2,Tamhane's T2,Tamhane's T2
in One-Way ANOVA,in One-Way ANOVA,in One-Way ANOVA
Dunnett's T3,Dunnett's T3,Dunnett's T3
in One-Way ANOVA,in One-Way ANOVA,in One-Way ANOVA
Dunnett's C,Dunnett's C,Dunnett's C
in One-Way ANOVA,in One-Way ANOVA,in One-Way ANOVA
R-E-G-W F,R-E-G-W F,R-E-G-W F
in One-Way ANOVA,in One-Way ANOVA,in One-Way ANOVA
Games and Howell's pairwise comparisons test,Games and Howell's pairwise comparisons test,Games and Howell's pairwise comparisons test
in One-Way ANOVA,in One-Way ANOVA,in One-Way ANOVA
R-E-G-W Q,R-E-G-W Q,R-E-G-W Q
in One-Way ANOVA,in One-Way ANOVA,in One-Way ANOVA
One-Way ANOVA,One-Way ANOVA,One-Way ANOVA
multiple comparisons,multiple comparisons,multiple comparisons
Ryan-Einot-Gabriel-Welsch multiple F,Ryan-Einot-Gabriel-Welsch multiple F,Ryan-Einot-Gabriel-Welsch multiple F
in One-Way ANOVA,in One-Way ANOVA,in One-Way ANOVA
Ryan-Einot-Gabriel-Welsch multiple range,Ryan-Einot-Gabriel-Welsch multiple range,Ryan-Einot-Gabriel-Welsch multiple range
in One-Way ANOVA,in One-Way ANOVA,in One-Way ANOVA
Waller-Duncan t test,Waller-Duncan t test,Waller-Duncan t test
in One-Way ANOVA,in One-Way ANOVA,in One-Way ANOVA

Once you have determined that differences exist among the means, post hoc range tests and pairwise multiple comparisons can determine which means differ. Range tests identify homogeneous subsets of means that are not different from each other. Pairwise multiple comparisons test the difference between each pair of means and yield a matrix where asterisks indicate significantly different group means at an alpha level of 0.05.

Equal Variances Assumed

Tukey's honestly significant difference test, Hochberg's GT2, Gabriel, and Scheffé are multiple comparison tests and range tests. Other available range tests are Tukey's b, S-N-K (Student-Newman-Keuls), Duncan, R-E-G-W F (Ryan-Einot-Gabriel-Welsch F test), R-E-G-W Q (Ryan-Einot-Gabriel-Welsch range test), and Waller-Duncan. Available multiple comparison tests are Bonferroni, Tukey's honestly significant difference test, Sidak, Gabriel, Hochberg, Dunnett, Scheffé, and LSD (least significant difference).

Expand Show details Collapse Hide details

• LSD. Uses t tests to perform all pairwise comparisons between group means. No adjustment is made to the error rate for multiple comparisons.

• Bonferroni. Uses t tests to perform pairwise comparisons between group means, but controls overall error rate by setting the error rate for each test to the experimentwise error rate divided by the total number of tests. Hence, the observed significance level is adjusted for the fact that multiple comparisons are being made.

• Sidak. Pairwise multiple comparison test based on a t statistic. Sidak adjusts the significance level for multiple comparisons and provides tighter bounds than Bonferroni.

• Scheffe. Performs simultaneous joint pairwise comparisons for all possible pairwise combinations of means. Uses the F sampling distribution. Can be used to examine all possible linear combinations of group means, not just pairwise comparisons.

• R-E-G-W F. Ryan-Einot-Gabriel-Welsch multiple stepdown procedure based on an F test.

• R-E-G-W Q. Ryan-Einot-Gabriel-Welsch multiple stepdown procedure based on the Studentized range.

• S-N-K. Makes all pairwise comparisons between means using the Studentized range distribution. With equal sample sizes, it also compares pairs of means within homogeneous subsets, using a stepwise procedure. Means are ordered from highest to lowest, and extreme differences are tested first.

• Tukey. Uses the Studentized range statistic to make all of the pairwise comparisons between groups. Sets the experimentwise error rate at the error rate for the collection for all pairwise comparisons.

• Tukey's b. Uses the Studentized range distribution to make pairwise comparisons between groups. The critical value is the average of the corresponding value for the Tukey's honestly significant difference test and the Student-Newman-Keuls.

• Duncan. Makes pairwise comparisons using a stepwise order of comparisons identical to the order used by the Student-Newman-Keuls test, but sets a protection level for the error rate for the collection of tests, rather than an error rate for individual tests. Uses the Studentized range statistic.

• Hochberg's GT2. Multiple comparison and range test that uses the Studentized maximum modulus. Similar to Tukey's honestly significant difference test.

• Gabriel. Pairwise comparison test that used the Studentized maximum modulus and is generally more powerful than Hochberg's GT2 when the cell sizes are unequal. Gabriel's test may become liberal when the cell sizes vary greatly.

• Waller-Duncan. Multiple comparison test based on a t statistic; uses a Bayesian approach.

• Dunnett. Pairwise multiple comparison t test that compares a set of treatments against a single control mean. The last category is the default control category. Alternatively, you can choose the first category. 2-sided tests that the mean at any level (except the control category) of the factor is not equal to that of the control category. < Control tests if the mean at any level of the factor is smaller than that of the control category. > Control tests if the mean at any level of the factor is greater than that of the control category.

Equal Variances Not Assumed

Multiple comparison tests that do not assume equal variances are Tamhane's T2, Dunnett's T3, Games-Howell, and Dunnett's C.

Expand Show details Collapse Hide details

• Tamhane's T2. Conservative pairwise comparisons test based on a t test. This test is appropriate when the variances are unequal.

• Dunnett's T3. Pairwise comparison test based on the Studentized maximum modulus. This test is appropriate when the variances are unequal.

• Games-Howell. Pairwise comparison test that is sometimes liberal. This test is appropriate when the variances are unequal.

• Dunnett's C. Pairwise comparison test based on the Studentized range. This test is appropriate when the variances are unequal.

Note: You may find it easier to interpret the output from post hoc tests if you deselect Hide empty rows and columns in the Table Properties dialog box (in an activated pivot table, choose Table Properties from the Format menu).

Obtaining Post Hoc Tests for One-Way ANOVA Collapse Hide details

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Compare Means
One-Way ANOVA...

In the One-Way ANOVA dialog box, click Post Hoc.

Note: You may find it easier to interpret the output from post hoc tests if you deselect Hide empty rows and columns in the Table Properties dialog box (in an activated pivot table, choose Table Properties from the Format menu).

Related Topics

One-Way ANOVA: Related Procedures
One-Way ANOVA
One-Way ANOVA Contrasts
One-Way ANOVA Options


One-Way ANOVA Options

One-Way ANOVA,One-Way ANOVA,One-Way ANOVA
options,options,options
One-Way ANOVA,One-Way ANOVA,One-Way ANOVA
missing values,missing values,missing values
One-Way ANOVA,One-Way ANOVA,One-Way ANOVA
statistics,statistics,statistics
homogeneity-of-variance tests,homogeneity-of-variance tests,homogeneity-of-variance tests
in One-Way ANOVA,in One-Way ANOVA,in One-Way ANOVA
confidence intervals,confidence intervals,confidence intervals
in One-Way ANOVA,in One-Way ANOVA,in One-Way ANOVA
Levene test,Levene test,Levene test
in One-Way ANOVA,in One-Way ANOVA,in One-Way ANOVA
missing values,missing values,missing values
in One-Way ANOVA,in One-Way ANOVA,in One-Way ANOVA
mean,mean,mean
in One-Way ANOVA,in One-Way ANOVA,in One-Way ANOVA
Welch statistic,Welch statistic,Welch statistic
in One-Way ANOVA,in One-Way ANOVA,in One-Way ANOVA
Brown-Forsythe statistic,Brown-Forsythe statistic,Brown-Forsythe statistic
in One-Way ANOVA,in One-Way ANOVA,in One-Way ANOVA

Statistics. Choose one or more of the following:

• Descriptive. Calculates the number of cases, mean, standard deviation, standard error of the mean, minimum, maximum, and 95% confidence intervals for each dependent variable for each group.

• Fixed and random effects. Displays the standard deviation, standard error, and 95% confidence interval for the fixed-effects model, and the standard error, 95% confidence interval, and estimate of between-components variance for the random-effects model.

• Homogeneity of variance test. Calculates the Levene statistic to test for the equality of group variances. This test is not dependent on the assumption of normality.

• Brown-Forsythe. Calculates the Brown-Forsythe statistic to test for the equality of group means. This statistic is preferable to the F statistic when the assumption of equal variances does not hold.

• Welch. Calculates the Welch statistic to test for the equality of group means. This statistic is preferable to the F statistic when the assumption of equal variances does not hold.

Means plot. Displays a chart that plots the subgroup means (the means for each group defined by values of the factor variable).

Missing Values. Controls the treatment of missing values.

• Exclude cases analysis by analysis. A case with a missing value for either the dependent or the factor variable for a given analysis is not used in that analysis. Also, a case outside the range specified for the factor variable is not used.

• Exclude cases listwise. Cases with missing values for the factor variable or for any dependent variable included on the dependent list in the main dialog box are excluded from all analyses. If you have not specified multiple dependent variables, this has no effect.

Specifying Options for One-Way ANOVA Collapse Hide details

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Compare Means
One-Way ANOVA...

In the One-Way ANOVA dialog box, click Options.

Related Topics

One-Way ANOVA: Related Procedures
One-Way ANOVA
One-Way ANOVA Contrasts
One-Way ANOVA Post Hoc Tests


ONEWAY Command Additional Features

One-Way ANOVA,One-Way ANOVA,One-Way ANOVA
command additional features,command additional features,command additional features

The command syntax language also allows you to:

• Obtain fixed- and random-effects statistics. Standard deviation, standard error of the mean, and 95% confidence intervals for the fixed-effects model. Standard error, 95% confidence intervals, and estimate of between-components variance for random-effects model (using STATISTICS=EFFECTS).

• Specify alpha levels for the least significance difference, Bonferroni, Duncan, and Scheffé multiple comparison tests (with the RANGES subcommand).

• Write a matrix of means, standard deviations, and frequencies, or read a matrix of means, frequencies, pooled variances, and degrees of freedom for the pooled variances. These matrices can be used in place of raw data to obtain a one-way analysis of variance (with the MATRIX subcommand).

Related Topics

ONEWAY


GLM Univariate Analysis

GLM Univariate,GLM Univariate,GLM Univariate
ANOVA,ANOVA,ANOVA
in GLM Univariate,in GLM Univariate,in GLM Univariate

This feature requires the Statistics Base option.

The GLM Univariate procedure provides regression analysis and analysis of variance for one dependent variable by one or more factors and/or variables. The factor variables divide the population into groups. Using this General Linear Model procedure, you can test null hypotheses about the effects of other variables on the means of various groupings of a single dependent variable. You can investigate interactions between factors as well as the effects of individual factors, some of which may be random. In addition, the effects of covariates and covariate interactions with factors can be included. For regression analysis, the independent (predictor) variables are specified as covariates.

Both balanced and unbalanced models can be tested. A design is balanced if each cell in the model contains the same number of cases. In addition to testing hypotheses, GLM Univariate produces estimates of parameters.

Commonly used a priori contrasts are available to perform hypothesis testing. Additionally, after an overall F test has shown significance, you can use post hoc tests to evaluate differences among specific means. Estimated marginal means give estimates of predicted mean values for the cells in the model, and profile plots (interaction plots) of these means allow you to easily visualize some of the relationships.

Residuals, predicted values, Cook's distance, and leverage values can be saved as new variables in your data file for checking assumptions.

WLS Weight allows you to specify a variable used to give observations different weights for a weighted least-squares (WLS) analysis, perhaps to compensate for a different precision of measurement.

Example. Data are gathered for individual runners in the Chicago marathon for several years. The time in which each runner finishes is the dependent variable. Other factors include weather (cold, pleasant, or hot), number of months of training, number of previous marathons, and gender. Age is considered a covariate. You might find that gender is a significant effect and that the interaction of gender with weather is significant.

Methods. Type I, Type II, Type III, and Type IV sums of squares can be used to evaluate different hypotheses. Type III is the default.

Statistics. Post hoc range tests and multiple comparisons: least significant difference, Bonferroni, Sidak, Scheffé, Ryan-Einot-Gabriel-Welsch multiple F, Ryan-Einot-Gabriel-Welsch multiple range, Student-Newman-Keuls, Tukey's honestly significant difference, Tukey's b, Duncan, Hochberg's GT2, Gabriel, Waller-Duncan t test, Dunnett (one-sided and two-sided), Tamhane's T2, Dunnett's T3, Games-Howell, and Dunnett's C. Descriptive statistics: observed means, standard deviations, and counts for all of the dependent variables in all cells. The Levene test for homogeneity of variance.

Plots. Spread-versus-level, residual, and profile (interaction).

Show me

GLM Univariate Data Considerations Collapse Hide details

Data. The dependent variable is quantitative. Factors are categorical. They can have numeric values or string values of up to eight characters. Covariates are quantitative variables that are related to the dependent variable.

Assumptions. The data are a random sample from a normal population; in the population, all cell variances are the same. Analysis of variance is robust to departures from normality, although the data should be symmetric. To check assumptions, you can use homogeneity of variances tests and spread-versus-level plots. You can also examine residuals and residual plots.

To Obtain GLM Univariate Tables Collapse Hide details

To Obtain GLM Univariate Tables

This feature requires the Statistics Base option.

From the menus choose:

Analyze
General Linear Model
Univariate...

Select a dependent variable.

Select variables for Fixed Factor(s), Random Factor(s), and Covariate(s), as appropriate for your data.

Optionally, you can use WLS Weight to specify a weight variable for weighted least-squares analysis. If the value of the weighting variable is zero, negative, or missing, the case is excluded from the analysis. A variable already used in the model cannot be used as a weighting variable.

This procedure pastes UNIANOVA command syntax.

See GLM Algorithms for computational details for this procedure.

Related Topics

GLM Univariate: Related Procedures
GLM Model
GLM Contrasts
GLM Profile Plots
GLM Post Hoc Comparisons
GLM Save
GLM Options
UNIANOVA


GLM Model

GLM,GLM,GLM
model,model,model
ANOVA,ANOVA,ANOVA
model,model,model
custom models,custom models,custom models
in GLM,in GLM,in GLM
full factorial models,full factorial models,full factorial models
in GLM,in GLM,in GLM
GLM,GLM,GLM
sum of squares,sum of squares,sum of squares
sum of squares,sum of squares,sum of squares
in GLM,in GLM,in GLM

Specify Model. A full factorial model contains all factor main effects, all covariate main effects, and all factor-by-factor interactions. It does not contain covariate interactions. Select Custom to specify only a subset of interactions or to specify factor-by-covariate interactions. You must indicate all of the terms to be included in the model.

Factors and Covariates. The factors and covariates are listed.

Model. The model depends on the nature of your data. After selecting Custom, you can select the main effects and interactions that are of interest in your analysis.

Sum of squares. The method of calculating the sums of squares. For balanced or unbalanced models with no missing cells, the Type III sum-of-squares method is most commonly used.

Include intercept in model. The intercept is usually included in the model. If you can assume that the data pass through the origin, you can exclude the intercept.

Specifying Models for GLM Collapse Hide details

From the menus choose:

Analyze
General Linear Model

Choose Univariate or Multivariate.

In the dialog box, click Model.

In the Model dialog box, select Custom.

Select one or more factors or covariates or a combination of factors and covariates.

Select a method for building the terms and click the move button.

Repeat until you have all of the terms that you want in the model. Do not use the same term more than once in the model.

Select a type of sums of squares and whether or not you want the intercept.

GLM Multivariate is available only if you have the Advanced Statistics option installed.

Related Topics

GLM Contrasts
GLM Profile Plots
GLM Post Hoc Comparisons
GLM Save
GLM Multivariate Analysis
GLM Multivariate Options
GLM Univariate: Related Procedures
GLM Options
Build Terms
Sum of Squares


Build Terms

build terms,build terms,build terms
interaction terms,interaction terms,interaction terms

For the selected factors and covariates:

Interaction. Creates the highest-level interaction term of all selected variables. This is the default.

Main effects. Creates a main-effects term for each variable selected.

All 2-way. Creates all possible two-way interactions of the selected variables.

All 3-way. Creates all possible three-way interactions of the selected variables.

All 4-way. Creates all possible four-way interactions of the selected variables.

All 5-way. Creates all possible five-way interactions of the selected variables.

Related Topics

Ordinal Regression Location Model
Ordinal Regression Scale Model
Sum of Squares


Sum of Squares

sum of squares,sum of squares,sum of squares
hierarchical decomposition,hierarchical decomposition,hierarchical decomposition

For the model, you can choose a type of sums of squares. Type III is the most commonly used and is the default.

Type I. This method is also known as the hierarchical decomposition of the sum-of-squares method. Each term is adjusted for only the term that precedes it in the model. Type I sums of squares are commonly used for:

• A balanced ANOVA model in which any main effects are specified before any first-order interaction effects, any first-order interaction effects are specified before any second-order interaction effects, and so on.

• A polynomial regression model in which any lower-order terms are specified before any higher-order terms.

• A purely nested model in which the first-specified effect is nested within the second-specified effect, the second-specified effect is nested within the third, and so on. (This form of nesting can be specified only by using syntax.)

Type II. This method calculates the sums of squares of an effect in the model adjusted for all other "appropriate" effects. An appropriate effect is one that corresponds to all effects that do not contain the effect being examined. The Type II sum-of-squares method is commonly used for:

• A balanced ANOVA model.

• Any model that has main factor effects only.

• Any regression model.

• A purely nested design. (This form of nesting can be specified by using syntax.)

Type III. The default. This method calculates the sums of squares of an effect in the design as the sums of squares adjusted for any other effects that do not contain it and orthogonal to any effects (if any) that contain it. The Type III sums of squares have one major advantage in that they are invariant with respect to the cell frequencies as long as the general form of estimability remains constant. Hence, this type of sums of squares is often considered useful for an unbalanced model with no missing cells. In a factorial design with no missing cells, this method is equivalent to the Yates' weighted-squares-of-means technique. The Type III sum-of-squares method is commonly used for:

• Any models listed in Type I and Type II.

• Any balanced or unbalanced model with no empty cells.

Type IV. This method is designed for a situation in which there are missing cells. For any effect F in the design, if F is not contained in any other effect, then Type IV = Type III = Type II. When F is contained in other effects, Type IV distributes the contrasts being made among the parameters in F to all higher-level effects equitably. The Type IV sum-of-squares method is commonly used for:

• Any models listed in Type I and Type II.

• Any balanced model or unbalanced model with empty cells.

Related Topics

Build Terms
GLM Repeated Measures Model


GLM Contrasts

GLM Univariate,GLM Univariate,GLM Univariate
contrasts,contrasts,contrasts
deviation contrasts,deviation contrasts,deviation contrasts
in GLM,in GLM,in GLM
simple contrasts,simple contrasts,simple contrasts
in GLM,in GLM,in GLM
contrasts,contrasts,contrasts
in GLM,in GLM,in GLM
difference contrasts,difference contrasts,difference contrasts
in GLM,in GLM,in GLM
reference category,reference category,reference category
in GLM,in GLM,in GLM
Helmert contrasts,Helmert contrasts,Helmert contrasts
in GLM,in GLM,in GLM
repeated contrasts,repeated contrasts,repeated contrasts
in GLM,in GLM,in GLM
polynomial contrasts,polynomial contrasts,polynomial contrasts
in GLM,in GLM,in GLM
confidence intervals,confidence intervals,confidence intervals
in GLM,in GLM,in GLM

Contrasts are used to test for differences among the levels of a factor. You can specify a contrast for each factor in the model (in a repeated measures model, for each between-subjects factor). Contrasts represent linear combinations of the parameters.

GLM Univariate

Hypothesis testing is based on the null hypothesis LB = 0, where L is the contrast coefficients matrix and B is the parameter vector. When a contrast is specified, an L matrix is created. The columns of the L matrix corresponding to the factor match the contrast. The remaining columns are adjusted so that the L matrix is estimable.

The output includes an F statistic for each set of contrasts. Also displayed for the contrast differences are Bonferroni-type simultaneous confidence intervals based on Student's t distribution.

GLM Multivariate

Hypothesis testing is based on the null hypothesis LBM = 0, where L is the contrast coefficients matrix, M is the identity matrix, which has dimension equal to the number of dependent variables, and B is the parameter vector. When a contrast is specified, an L matrix is created. The columns of the L matrix corresponding to the factor match the contrast. The remaining columns are adjusted so that the L matrix is estimable.

In addition to the univariate test using F statistics and the Bonferroni-type simultaneous confidence intervals based on Student's t distribution for the contrast differences across all dependent variables, the multivariate test using Pillai's trace, Wilks' lambda, Hotelling's trace, and Roy's largest root criteria are provided.

GLM Repeated Measures

Hypothesis testing is based on the null hypothesis LBM = 0, where L is the contrast coefficients matrix, B is the parameter vector, and M is the average matrix that corresponds to the average transformation for the dependent variable. You can display this transformation matrix by selecting Transformation matrix in the GLM Repeated Measures Options dialog box. For example, if there are four dependent variables, a within-subjects factor of four levels, and polynomial contrasts (the default) are used for within-subjects factors, the M matrix will be (0.5 0.5 0.5 0.5)'. When a contrast is specified, an L matrix is created. The columns of the L matrix corresponding to the between-subjects factor match the contrast. The remaining columns are adjusted so that the L matrix is estimable.

A contrast other than None must be selected for within-subjects factors.

GLM Multivariate and GLM Repeated Measures are available only if you have the Advanced Statistics option installed.

Available Contrasts

Available contrasts are deviation, simple, difference, Helmert, repeated, and polynomial. For deviation contrasts and simple contrasts, you can choose whether the reference category is the last or first category.

Specifying Contrasts for GLM Collapse Hide details

From the menus choose:

Analyze
General Linear Model

Choose Univariate, Multivariate, or Repeated Measures.

In the dialog box, click Contrasts.

Select the desired factors and contrast specifications.

GLM Multivariate and GLM Repeated Measures are available only if you have the Advanced Statistics option installed.

Related Topics

GLM Profile Plots
GLM Post Hoc Comparisons
GLM Repeated Measures
GLM Repeated Measures Define Factors
GLM Repeated Measures Model
GLM Repeated Measures Save
GLM Repeated Measures Options
GLM Model
GLM Save
GLM Multivariate Analysis
GLM Multivariate Options
GLM Univariate: Related Procedures
GLM Options


Contrast Types

GLM Univariate,GLM Univariate,GLM Univariate
contrasts,contrasts,contrasts
deviation contrasts,deviation contrasts,deviation contrasts
in GLM,in GLM,in GLM
simple contrasts,simple contrasts,simple contrasts
in GLM,in GLM,in GLM
contrasts,contrasts,contrasts
in GLM,in GLM,in GLM
difference contrasts,difference contrasts,difference contrasts
in GLM,in GLM,in GLM
reference category,reference category,reference category
in GLM,in GLM,in GLM
Helmert contrasts,Helmert contrasts,Helmert contrasts
in GLM,in GLM,in GLM
repeated contrasts,repeated contrasts,repeated contrasts
in GLM,in GLM,in GLM
polynomial contrasts,polynomial contrasts,polynomial contrasts
in GLM,in GLM,in GLM

Deviation. Compares the mean of each level (except a reference category) to the mean of all of the levels (grand mean). The levels of the factor can be in any order.

Simple. Compares the mean of each level to the mean of a specified level. This type of contrast is useful when there is a control group. You can choose the first or last category as the reference.

Difference. Compares the mean of each level (except the first) to the mean of previous levels. (Sometimes called reverse Helmert contrasts.)

Helmert. Compares the mean of each level of the factor (except the last) to the mean of subsequent levels.

Repeated. Compares the mean of each level (except the last) to the mean of the subsequent level.

Polynomial. Compares the linear effect, quadratic effect, cubic effect, and so on. The first degree of freedom contains the linear effect across all categories; the second degree of freedom, the quadratic effect; and so on. These contrasts are often used to estimate polynomial trends.


GLM Profile Plots

GLM,GLM,GLM
profile plots,profile plots,profile plots
profile plots,profile plots,profile plots
in GLM,in GLM,in GLM

Profile plots (interaction plots) are useful for comparing marginal means in your model. A profile plot is a line plot in which each point indicates the estimated marginal mean of a dependent variable (adjusted for any covariates) at one level of a factor. The levels of a second factor can be used to make separate lines. Each level in a third factor can be used to create a separate plot. All fixed and random factors, if any, are available for plots. For multivariate analyses, profile plots are created for each dependent variable. In a repeated measures analysis, both between-subjects factors and within-subjects factors can be used in profile plots. GLM Multivariate and GLM Repeated Measures are available only if you have the Advanced Statistics option installed.

A profile plot of one factor shows whether the estimated marginal means are increasing or decreasing across levels. For two or more factors, parallel lines indicate that there is no interaction between factors, which means that you can investigate the levels of only one factor. Nonparallel lines indicate an interaction.

After a plot is specified by selecting factors for the horizontal axis and, optionally, factors for separate lines and separate plots, the plot must be added to the Plots list.

Obtaining Profile Plots for GLM Collapse Hide details

From the menus choose:

Analyze
General Linear Model

Choose Univariate, Multivariate, or Repeated Measures.

In the dialog box, click Plots.

Select a factor for the horizontal axis.

Optionally, you can select factors for separate lines and separate plots.

Click Add to list the combination in the Plots list.

GLM Multivariate and GLM Repeated Measures are available only if you have the Advanced Statistics option installed.

Related Topics

GLM Contrasts
GLM Post Hoc Comparisons
GLM Repeated Measures
GLM Repeated Measures Define Factors
GLM Repeated Measures Model
GLM Repeated Measures Save
GLM Repeated Measures Options
GLM Model
GLM Save
GLM Multivariate Analysis
GLM Multivariate Options
GLM Univariate: Related Procedures
GLM Options


GLM Post Hoc Comparisons

GLM,GLM,GLM
post hoc tests,post hoc tests,post hoc tests
least significant difference,least significant difference,least significant difference
in GLM,in GLM,in GLM
Bonferroni,Bonferroni,Bonferroni
in GLM,in GLM,in GLM
Sidak's t test,Sidak's t test,Sidak's t test
in GLM,in GLM,in GLM
Scheffé test,Scheffé test,Scheffé test
in GLM,in GLM,in GLM
R-E-G-W Q,R-E-G-W Q,R-E-G-W Q
in GLM,in GLM,in GLM
R-E-G-W F,R-E-G-W F,R-E-G-W F
in GLM,in GLM,in GLM
Ryan-Einot-Gabriel-Welsch multiple F,Ryan-Einot-Gabriel-Welsch multiple F,Ryan-Einot-Gabriel-Welsch multiple F
in GLM,in GLM,in GLM
Student-Newman-Keuls,Student-Newman-Keuls,Student-Newman-Keuls
in GLM,in GLM,in GLM
Tukey's honestly significant difference,Tukey's honestly significant difference,Tukey's honestly significant difference
in GLM,in GLM,in GLM
Tukey's b test,Tukey's b test,Tukey's b test
in GLM,in GLM,in GLM
Duncan's multiple range test,Duncan's multiple range test,Duncan's multiple range test
in GLM,in GLM,in GLM
Hochberg's GT2,Hochberg's GT2,Hochberg's GT2
in GLM,in GLM,in GLM
Gabriel's pairwise comparisons test,Gabriel's pairwise comparisons test,Gabriel's pairwise comparisons test
in GLM,in GLM,in GLM
Waller-Duncan t test,Waller-Duncan t test,Waller-Duncan t test
in GLM,in GLM,in GLM
Ryan-Einot-Gabriel-Welsch multiple range,Ryan-Einot-Gabriel-Welsch multiple range,Ryan-Einot-Gabriel-Welsch multiple range
in GLM,in GLM,in GLM
Dunnett's t test,Dunnett's t test,Dunnett's t test
in GLM,in GLM,in GLM
Tamhane's T2,Tamhane's T2,Tamhane's T2
in GLM,in GLM,in GLM
Dunnett's T3,Dunnett's T3,Dunnett's T3
in GLM,in GLM,in GLM
Games and Howell's pairwise comparisons test,Games and Howell's pairwise comparisons test,Games and Howell's pairwise comparisons test
in GLM,in GLM,in GLM
Dunnett's C,Dunnett's C,Dunnett's C
in GLM,in GLM,in GLM
Fisher's LSD,Fisher's LSD,Fisher's LSD
in GLM,in GLM,in GLM
Newman-Keuls,Newman-Keuls,Newman-Keuls
in GLM,in GLM,in GLM

Post hoc multiple comparison tests. Once you have determined that differences exist among the means, post hoc range tests and pairwise multiple comparisons can determine which means differ. Comparisons are made on unadjusted values. These tests are used for fixed between-subjects factors only. In GLM Repeated Measures, these tests are not available if there are no between-subjects factors, and the post hoc multiple comparison tests are performed for the average across the levels of the within-subjects factors. For GLM Multivariate, the post hoc tests are performed for each dependent variable separately. GLM Multivariate and GLM Repeated Measures are available only if you have the Advanced Statistics option installed.

The Bonferroni and Tukey's honestly significant difference tests are commonly used multiple comparison tests. The Bonferroni test, based on Student's t statistic, adjusts the observed significance level for the fact that multiple comparisons are made. Sidak's t test also adjusts the significance level and provides tighter bounds than the Bonferroni test. Tukey's honestly significant difference test uses the Studentized range statistic to make all pairwise comparisons between groups and sets the experimentwise error rate to the error rate for the collection for all pairwise comparisons. When testing a large number of pairs of means, Tukey's honestly significant difference test is more powerful than the Bonferroni test. For a small number of pairs, Bonferroni is more powerful.

Hochberg's GT2 is similar to Tukey's honestly significant difference test, but the Studentized maximum modulus is used. Usually, Tukey's test is more powerful. Gabriel's pairwise comparisons test also uses the Studentized maximum modulus and is generally more powerful than Hochberg's GT2 when the cell sizes are unequal. Gabriel's test may become liberal when the cell sizes vary greatly.

Dunnett's pairwise multiple comparison t test compares a set of treatments against a single control mean. The last category is the default control category. Alternatively, you can choose the first category. You can also choose a two-sided or one-sided test. To test that the mean at any level (except the control category) of the factor is not equal to that of the control category, use a two-sided test. To test whether the mean at any level of the factor is smaller than that of the control category, select < Control. Likewise, to test whether the mean at any level of the factor is larger than that of the control category, select > Control.

Ryan, Einot, Gabriel, and Welsch (R-E-G-W) developed two multiple step-down range tests. Multiple step-down procedures first test whether all means are equal. If all means are not equal, subsets of means are tested for equality. R-E-G-W F is based on an F test and R-E-G-W Q is based on the Studentized range. These tests are more powerful than Duncan's multiple range test and Student-Newman-Keuls (which are also multiple step-down procedures), but they are not recommended for unequal cell sizes.

When the variances are unequal, use Tamhane's T2 (conservative pairwise comparisons test based on a t test), Dunnett's T3 (pairwise comparison test based on the Studentized maximum modulus), Games-Howell pairwise comparison test (sometimes liberal), or Dunnett's C (pairwise comparison test based on the Studentized range). Note that these tests are not valid and will not be produced if there are multiple factors in the model.

Duncan's multiple range test, Student-Newman-Keuls (S-N-K), and Tukey's b are range tests that rank group means and compute a range value. These tests are not used as frequently as the tests previously discussed.

The Waller-Duncan t test uses a Bayesian approach. This range test uses the harmonic mean of the sample size when the sample sizes are unequal.

The significance level of the Scheffé test is designed to allow all possible linear combinations of group means to be tested, not just pairwise comparisons available in this feature. The result is that the Scheffé test is often more conservative than other tests, which means that a larger difference between means is required for significance.

The least significant difference (LSD) pairwise multiple comparison test is equivalent to multiple individual t tests between all pairs of groups. The disadvantage of this test is that no attempt is made to adjust the observed significance level for multiple comparisons.

Tests displayed. Pairwise comparisons are provided for LSD, Sidak, Bonferroni, Games-Howell, Tamhane's T2 and T3, Dunnett's C, and Dunnett's T3. Homogeneous subsets for range tests are provided for S-N-K, Tukey's b, Duncan, R-E-G-W F, R-E-G-W Q, and Waller. Tukey's honestly significant difference test, Hochberg's GT2, Gabriel's test, and Scheffé's test are both multiple comparison tests and range tests.

Obtaining Post Hoc Tests for GLM Collapse Hide details

From the menus choose:

Analyze
General Linear Model

Choose Univariate, Multivariate, or Repeated Measures.

In the dialog box, click Post Hoc.

Select the factors to analyze and move them to the Post Hoc Tests For list.

Select the desired tests.

Post hoc tests are not available when covariates have been specified in the model.

GLM Multivariate and GLM Repeated Measures are available only if you have the Advanced Statistics option installed.

Related Topics

GLM Contrasts
GLM Profile Plots
GLM Repeated Measures
GLM Repeated Measures Define Factors
GLM Repeated Measures Model
GLM Repeated Measures Save
GLM Repeated Measures Options
GLM Model
GLM Save
GLM Multivariate Analysis
GLM Multivariate Options
GLM Univariate: Related Procedures
GLM Options


GLM Save

GLM,GLM,GLM
saving variables,saving variables,saving variables
GLM,GLM,GLM
saving matrices,saving matrices,saving matrices
unstandardized residuals,unstandardized residuals,unstandardized residuals
in GLM,in GLM,in GLM
standardized residuals,standardized residuals,standardized residuals
in GLM,in GLM,in GLM
deleted residuals,deleted residuals,deleted residuals
in GLM,in GLM,in GLM
standard error,standard error,standard error
in GLM,in GLM,in GLM
Cook's distance,Cook's distance,Cook's distance
in GLM,in GLM,in GLM
leverage values,leverage values,leverage values
in GLM,in GLM,in GLM
weighted predicted values,weighted predicted values,weighted predicted values
in GLM,in GLM,in GLM
covariance matrix,covariance matrix,covariance matrix
in GLM,in GLM,in GLM

You can save values predicted by the model, residuals, and related measures as new variables in the Data Editor. Many of these variables can be used for examining assumptions about the data. To save the values for use in another PASW Statistics session, you must save the current data file.

Predicted Values. The values that the model predicts for each case.

Expand Show details Collapse Hide details

• Unstandardized. The value the model predicts for the dependent variable.

• Weighted. Weighted unstandardized predicted values. Available only if a WLS variable was previously selected.

• Standard error. An estimate of the standard deviation of the average value of the dependent variable for cases that have the same values of the independent variables.

Diagnostics. Measures to identify cases with unusual combinations of values for the independent variables and cases that may have a large impact on the model.

Expand Show details Collapse Hide details

• Cook's distance. A measure of how much the residuals of all cases would change if a particular case were excluded from the calculation of the regression coefficients. A large Cook's D indicates that excluding a case from computation of the regression statistics changes the coefficients substantially.

• Leverage values. Uncentered leverage values. The relative influence of each observation on the model's fit.

Residuals. An unstandardized residual is the actual value of the dependent variable minus the value predicted by the model. Standardized, Studentized, and deleted residuals are also available. If a WLS variable was chosen, weighted unstandardized residuals are available.

Expand Show details Collapse Hide details

• Unstandardized. The difference between an observed value and the value predicted by the model.

• Weighted. Weighted unstandardized residuals. Available only if a WLS variable was previously selected.

• Standardized. The residual divided by an estimate of its standard deviation. Standardized residuals, which are also known as Pearson residuals, have a mean of 0 and a standard deviation of 1.

• Studentized. The residual divided by an estimate of its standard deviation that varies from case to case, depending on the distance of each case's values on the independent variables from the means of the independent variables.

• Deleted. The residual for a case when that case is excluded from the calculation of the regression coefficients. It is the difference between the value of the dependent variable and the adjusted predicted value.

Coefficient Statistics. Writes a variance-covariance matrix of the parameter estimates in the model to a new dataset in the current session or an external PASW Statistics data file. Also, for each dependent variable, there will be a row of parameter estimates, a row of significance values for the t statistics corresponding to the parameter estimates, and a row of residual degrees of freedom. For a multivariate model, there are similar rows for each dependent variable. You can use this matrix file in other procedures that read matrix files.

Saving New Variables or Parameters for GLM Collapse Hide details

From the menus choose:

Analyze
General Linear Model

Choose Univariate, Multivariate, or Repeated Measures.

In the dialog box, click Save.

Select the types of variables to be added to the Data Editor.

and/or

Specify a dataset name or external file to store the covariance matrix.

GLM Multivariate and GLM Repeated Measures are available only if you have the Advanced Statistics option installed.

Related Topics

GLM Model
GLM Contrasts
GLM Profile Plots
GLM Post Hoc Comparisons
GLM Multivariate Analysis
GLM Multivariate Options
GLM Univariate: Related Procedures
GLM Options


GLM Options

GLM Univariate,GLM Univariate,GLM Univariate
options,options,options
descriptive statistics,descriptive statistics,descriptive statistics
in GLM Univariate,in GLM Univariate,in GLM Univariate
observed means,observed means,observed means
in GLM Univariate,in GLM Univariate,in GLM Univariate
standard deviation,standard deviation,standard deviation
in GLM Univariate,in GLM Univariate,in GLM Univariate
estimated marginal means,estimated marginal means,estimated marginal means
in GLM Univariate,in GLM Univariate,in GLM Univariate
standard error,standard error,standard error
in GLM,in GLM,in GLM
t test,t test,t test
in GLM Univariate,in GLM Univariate,in GLM Univariate
parameter estimates,parameter estimates,parameter estimates
in GLM Univariate,in GLM Univariate,in GLM Univariate
homogeneity-of-variance tests,homogeneity-of-variance tests,homogeneity-of-variance tests
in GLM Univariate,in GLM Univariate,in GLM Univariate
confidence intervals,confidence intervals,confidence intervals
in GLM,in GLM,in GLM
power estimates,power estimates,power estimates
in GLM Univariate,in GLM Univariate,in GLM Univariate
GLM Univariate,GLM Univariate,GLM Univariate
diagnostics,diagnostics,diagnostics
GLM Univariate,GLM Univariate,GLM Univariate
display,display,display
GLM Univariate,GLM Univariate,GLM Univariate
estimated marginal means,estimated marginal means,estimated marginal means
eta-squared,eta-squared,eta-squared
in GLM Univariate,in GLM Univariate,in GLM Univariate
effect-size estimates,effect-size estimates,effect-size estimates
in GLM Univariate,in GLM Univariate,in GLM Univariate
Levene test,Levene test,Levene test
in GLM Univariate,in GLM Univariate,in GLM Univariate
spread-versus-level plots,spread-versus-level plots,spread-versus-level plots
in GLM Univariate,in GLM Univariate,in GLM Univariate
residual plots,residual plots,residual plots
in GLM Univariate,in GLM Univariate,in GLM Univariate

Optional statistics are available from this dialog box. Statistics are calculated using a fixed-effects model.

Estimated Marginal Means. Select the factors and interactions for which you want estimates of the population marginal means in the cells. These means are adjusted for the covariates, if any.

• Compare main effects. Provides uncorrected pairwise comparisons among estimated marginal means for any main effect in the model, for both between- and within-subjects factors. This item is available only if main effects are selected under the Display Means For list.

• Confidence interval adjustment. Select least significant difference (LSD), Bonferroni, or Sidak adjustment to the confidence intervals and significance. This item is available only if Compare main effects is selected.

Display. Select Descriptive statistics to produce observed means, standard deviations, and counts for all of the dependent variables in all cells. Estimates of effect size gives a partial eta-squared value for each effect and each parameter estimate. The eta-squared statistic describes the proportion of total variability attributable to a factor. Select Observed power to obtain the power of the test when the alternative hypothesis is set based on the observed value. Select Parameter estimates to produce the parameter estimates, standard errors, t tests, confidence intervals, and the observed power for each test. Select Contrast coefficient matrix to obtain the L matrix.

Homogeneity tests produces the Levene test of the homogeneity of variance for each dependent variable across all level combinations of the between-subjects factors, for between-subjects factors only. The spread-versus-level and residual plots options are useful for checking assumptions about the data. This item is disabled if there are no factors. Select Residual plot to produce an observed-by-predicted-by-standardized residual plot for each dependent variable. These plots are useful for investigating the assumption of equal variance. Select Lack of fit to check if the relationship between the dependent variable and the independent variables can be adequately described by the model. General estimable function allows you to construct custom hypothesis tests based on the general estimable function. Rows in any contrast coefficient matrix are linear combinations of the general estimable function.

Significance level. You might want to adjust the significance level used in post hoc tests and the confidence level used for constructing confidence intervals. The specified value is also used to calculate the observed power for the test. When you specify a significance level, the associated level of the confidence intervals is displayed in the dialog box.

Specifying Options for GLM Univariate Collapse Hide details

This feature requires the Statistics Base option.

From the menus choose:

Analyze
General Linear Model
Univariate...

In the GLM Univariate dialog box, click Options.

Select the desired statistics and diagnostics.

Related Topics

GLM Univariate: Related Procedures
GLM Univariate Analysis
GLM Model
GLM Contrasts
GLM Profile Plots
GLM Post Hoc Comparisons
GLM Save


UNIANOVA Command Additional Features

GLM Univariate,GLM Univariate,GLM Univariate

The command syntax language also allows you to:

• Specify nested effects in the design (using the DESIGN subcommand).

• Specify tests of effects versus a linear combination of effects or a value (using the TEST subcommand).

• Specify multiple contrasts (using the CONTRAST subcommand).

• Include user-missing values (using the MISSING subcommand).

• Specify EPS criteria (using the CRITERIA subcommand).

• Construct a custom L matrix, M matrix, or K matrix (using the LMATRIX, MMATRIX, and KMATRIX subcommands).

• For deviation or simple contrasts, specify an intermediate reference category (using the CONTRAST subcommand).

• Specify metrics for polynomial contrasts (using the CONTRAST subcommand).

• Specify error terms for post hoc comparisons (using the POSTHOC subcommand).

• Compute estimated marginal means for any factor or factor interaction among the factors in the factor list (using the EMMEANS subcommand).

• Specify names for temporary variables (using the SAVE subcommand).

• Construct a correlation matrix data file (using the OUTFILE subcommand).

• Construct a matrix data file that contains statistics from the between-subjects ANOVA table (using the OUTFILE subcommand).

• Save the design matrix to a new data file (using the OUTFILE subcommand).

Related Topics

RELIABILITY Command Additional Features
ALSCAL Command Additional Features
MIXED Command Additional Features
HILOGLINEAR Command Additional Features
CSGLM Command Additional Features
CSLOGISTIC Command Additional Features
MVA Command Additional Features
LOGISTIC REGRESSION Command Additional Features
NOMREG Command Additional Features
PROBIT Command Additional Features
NLR Command Additional Features
WLS Command Additional Features
2SLS Command Additional Features
SEASON Command Additional Features
SPECTRA Command Additional Features
UNIANOVA


Bivariate Correlations

Pearson correlation,Pearson correlation,Pearson correlation
in Bivariate Correlations,in Bivariate Correlations,in Bivariate Correlations
rank correlation coefficient,rank correlation coefficient,rank correlation coefficient
in Bivariate Correlations,in Bivariate Correlations,in Bivariate Correlations
Kendall's tau-b,Kendall's tau-b,Kendall's tau-b
in Bivariate Correlations,in Bivariate Correlations,in Bivariate Correlations
Spearman correlation coefficient,Spearman correlation coefficient,Spearman correlation coefficient
in Bivariate Correlations,in Bivariate Correlations,in Bivariate Correlations
Bivariate Correlations,Bivariate Correlations,Bivariate Correlations
correlation coefficients,correlation coefficients,correlation coefficients
Bivariate Correlations,Bivariate Correlations,Bivariate Correlations
significance level,significance level,significance level
r correlation coefficient,r correlation coefficient,r correlation coefficient
in Bivariate Correlations,in Bivariate Correlations,in Bivariate Correlations
rho,rho,rho
in Bivariate Correlations,in Bivariate Correlations,in Bivariate Correlations
correlations,correlations,correlations
in Bivariate Correlations,in Bivariate Correlations,in Bivariate Correlations

This feature requires the Statistics Base option.

The Bivariate Correlations procedure computes Pearson's correlation coefficient, Spearman's rho, and Kendall's tau-b with their significance levels. Correlations measure how variables or rank orders are related. Before calculating a correlation coefficient, screen your data for outliers (which can cause misleading results) and evidence of a linear relationship. Pearson's correlation coefficient is a measure of linear association. Two variables can be perfectly related, but if the relationship is not linear, Pearson's correlation coefficient is not an appropriate statistic for measuring their association.

Example. Is the number of games won by a basketball team correlated with the average number of points scored per game? A scatterplot indicates that there is a linear relationship. Analyzing data from the 1994–1995 NBA season yields that Pearson's correlation coefficient (0.581) is significant at the 0.01 level. You might suspect that the more games won per season, the fewer points the opponents scored. These variables are negatively correlated (–0.401), and the correlation is significant at the 0.05 level.

Statistics. For each variable: number of cases with nonmissing values, mean, and standard deviation. For each pair of variables: Pearson's correlation coefficient, Spearman's rho, Kendall's tau-b, cross-product of deviations, and covariance.

Show me

Bivariate Correlations Data Considerations Collapse Hide details

Data. Use symmetric quantitative variables for Pearson's correlation coefficient and quantitative variables or variables with ordered categories for Spearman's rho and Kendall's tau-b.

Assumptions. Pearson's correlation coefficient assumes that each pair of variables is bivariate normal.

To Obtain Bivariate Correlations Collapse Hide details

To Obtain Bivariate Correlations

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Correlate
Bivariate...

Select two or more numeric variables.

The following options are also available:

• Correlation Coefficients. For quantitative, normally distributed variables, choose the Pearson correlation coefficient. If your data are not normally distributed or have ordered categories, choose Kendall's tau-b or Spearman, which measure the association between rank orders. Correlation coefficients range in value from –1 (a perfect negative relationship) and +1 (a perfect positive relationship). A value of 0 indicates no linear relationship. When interpreting your results, be careful not to draw any cause-and-effect conclusions due to a significant correlation.

• Test of Significance. You can select two-tailed or one-tailed probabilities. If the direction of association is known in advance, select One-tailed. Otherwise, select Two-tailed.

• Flag significant correlations. Correlation coefficients significant at the 0.05 level are identified with a single asterisk, and those significant at the 0.01 level are identified with two asterisks.

This procedure pastes CORRELATIONS and NONPAR CORR command syntax.

See CORRELATIONS Algorithms and NONPAR CORR Algorithms for computational details for this procedure.

Related Topics

Bivariate Correlations Options
CORRELATIONS
NONPAR CORR


Bivariate Correlations Options

Bivariate Correlations,Bivariate Correlations,Bivariate Correlations
options,options,options
Bivariate Correlations,Bivariate Correlations,Bivariate Correlations
missing values,missing values,missing values
Bivariate Correlations,Bivariate Correlations,Bivariate Correlations
statistics,statistics,statistics
missing values,missing values,missing values
in Bivariate Correlations,in Bivariate Correlations,in Bivariate Correlations

Statistics. For Pearson correlations, you can choose one or both of the following:

• Means and standard deviations. Displayed for each variable. The number of cases with nonmissing values is also shown. Missing values are handled on a variable-by-variable basis regardless of your missing values setting.

• Cross-product deviations and covariances. Displayed for each pair of variables. The cross-product of deviations is equal to the sum of the products of mean-corrected variables. This is the numerator of the Pearson correlation coefficient. The covariance is an unstandardized measure of the relationship between two variables, equal to the cross-product deviation divided by N–1.

Missing Values. You can choose one of the following:

• Exclude cases pairwise. Cases with missing values for one or both of a pair of variables for a correlation coefficient are excluded from the analysis. Since each coefficient is based on all cases that have valid codes on that particular pair of variables, the maximum information available is used in every calculation. This can result in a set of coefficients based on a varying number of cases.

• Exclude cases listwise. Cases with missing values for any variable are excluded from all correlations.

Specifying Options for Bivariate Correlations Collapse Hide details

From the menus choose:

This feature requires the Statistics Base option.

Analyze
Correlate
Bivariate...

In the Bivariate Correlations dialog box, click Options.

Related Topics

Bivariate Correlations


CORRELATIONS and NONPAR CORR Command Additional Features

Bivariate Correlations,Bivariate Correlations,Bivariate Correlations
command additional features,command additional features,command additional features

The command syntax language also allows you to:

• Write a correlation matrix for Pearson correlations that can be used in place of raw data to obtain other analyses such as factor analysis (with the MATRIX subcommand).

• Obtain correlations of each variable on a list with each variable on a second list (using the keyword WITH on the VARIABLES subcommand).

Related Topics

CORRELATIONS
NONPAR CORR


Partial Correlations

Partial Correlations,Partial Correlations,Partial Correlations
correlations,correlations,correlations
in Partial Correlations,in Partial Correlations,in Partial Correlations

This feature requires the Statistics Base option.

The Partial Correlations procedure computes partial correlation coefficients that describe the linear relationship between two variables while controlling for the effects of one or more additional variables. Correlations are measures of linear association. Two variables can be perfectly related, but if the relationship is not linear, a correlation coefficient is not an appropriate statistic for measuring their association.

Example. Is there a relationship between healthcare funding and disease rates? Although you might expect any such relationship to be a negative one, a study reports a significant positive correlation: as healthcare funding increases, disease rates appear to increase. Controlling for the rate of visits to healthcare providers, however, virtually eliminates the observed positive correlation. Healthcare funding and disease rates only appear to be positively related because more people have access to healthcare when funding increases, which leads to more reported diseases by doctors and hospitals.

Statistics. For each variable: number of cases with nonmissing values, mean, and standard deviation. Partial and zero-order correlation matrices, with degrees of freedom and significance levels.

Show me

Partial Correlations Data Considerations Collapse Hide details

Data. Use symmetric, quantitative variables.

Assumptions. The Partial Correlations procedure assumes that each pair of variables is bivariate normal.

To Obtain Partial Correlations Collapse Hide details

To Obtain Partial Correlations

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Correlate
Partial...

Select two or more numeric variables for which partial correlations are to be computed.

Select one or more numeric control variables.

The following options are also available:

• Test of Significance. You can select two-tailed or one-tailed probabilities. If the direction of association is known in advance, select One-tailed. Otherwise, select Two-tailed.

• Display actual significance level. By default, the probability and degrees of freedom are shown for each correlation coefficient. If you deselect this item, coefficients significant at the 0.05 level are identified with a single asterisk, coefficients significant at the 0.01 level are identified with a double asterisk, and degrees of freedom are suppressed. This setting affects both partial and zero-order correlation matrices.

This procedure pastes PARTIAL CORR command syntax.

See PARTIAL CORR Algorithms for computational details for this procedure.

Related Topics

Partial Correlations: Related Procedures
Partial Correlations Options
PARTIAL CORR


Partial Correlations Options

Partial Correlations,Partial Correlations,Partial Correlations
options,options,options
Partial Correlations,Partial Correlations,Partial Correlations
missing values,missing values,missing values
Partial Correlations,Partial Correlations,Partial Correlations
statistics,statistics,statistics
Partial Correlations,Partial Correlations,Partial Correlations
zero-order correlations,zero-order correlations,zero-order correlations
missing values,missing values,missing values
in Partial Correlations,in Partial Correlations,in Partial Correlations
zero-order correlations,zero-order correlations,zero-order correlations
in Partial Correlations,in Partial Correlations,in Partial Correlations
correlations,correlations,correlations
zero-order,zero-order,zero-order

Statistics. You can choose one or both of the following:

• Means and standard deviations. Displayed for each variable. The number of cases with nonmissing values is also shown.

• Zero-order correlations. A matrix of simple correlations between all variables, including control variables, is displayed.

Missing Values. You can choose one of the following alternatives:

• Exclude cases listwise. Cases having missing values for any variable, including a control variable, are excluded from all computations.

• Exclude cases pairwise. For computation of the zero-order correlations on which the partial correlations are based, a case having missing values for both or one of a pair of variables is not used. Pairwise deletion uses as much of the data as possible. However, the number of cases may differ across coefficients. When pairwise deletion is in effect, the degrees of freedom for a particular partial coefficient are based on the smallest number of cases used in the calculation of any of the zero-order correlations.

Specifying Options for Partial Correlations Collapse Hide details

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Correlate
Partial...

In the Partial Correlations dialog box, click Options.

Related Topics

Partial Correlations: Related Procedures
Partial Correlations


PARTIAL CORR Command Additional Features

Partial Correlations,Partial Correlations,Partial Correlations
command additional features,command additional features,command additional features

The command syntax language also allows you to:

• Read a zero-order correlation matrix or write a partial correlation matrix (with the MATRIX subcommand).

• Obtain partial correlations between two lists of variables (using the keyword WITH on the VARIABLES subcommand).

• Obtain multiple analyses (with multiple VARIABLES subcommands).

• Specify order values to request (for example, both first- and second-order partial correlations) when you have two control variables (with the VARIABLES subcommand).

• Suppress redundant coefficients (with the FORMAT subcommand).

• Display a matrix of simple correlations when some coefficients cannot be computed (with the STATISTICS subcommand).

Related Topics

PARTIAL CORR


Distances

Distances,Distances,Distances
computing distances between variables,computing distances between variables,computing distances between variables
Distances,Distances,Distances
computing distances between cases,computing distances between cases,computing distances between cases
Distances,Distances,Distances
example,example,example
Distances,Distances,Distances
statistics,statistics,statistics
Distances,Distances,Distances

This procedure calculates any of a wide variety of statistics measuring either similarities or dissimilarities (distances), either between pairs of variables or between pairs of cases. These similarity or distance measures can then be used with other procedures, such as factor analysis, cluster analysis, or multidimensional scaling, to help analyze complex datasets.

Example. Is it possible to measure similarities between pairs of automobiles based on certain characteristics, such as engine size, MPG, and horsepower? By computing similarities between autos, you can gain a sense of which autos are similar to each other and which are different from each other. For a more formal analysis, you might consider applying a hierarchical cluster analysis or multidimensional scaling to the similarities to explore the underlying structure.

Statistics. Dissimilarity (distance) measures for interval data are Euclidean distance, squared Euclidean distance, Chebychev, block, Minkowski, or customized; for count data, chi-square or phi-square; for binary data, Euclidean distance, squared Euclidean distance, size difference, pattern difference, variance, shape, or Lance and Williams. Similarity measures for interval data are Pearson correlation or cosine; for binary data, Russel and Rao, simple matching, Jaccard, dice, Rogers and Tanimoto, Sokal and Sneath 1, Sokal and Sneath 2, Sokal and Sneath 3, Kulczynski 1, Kulczynski 2, Sokal and Sneath 4, Hamann, Lambda, Anderberg's D, Yule's Y, Yule's Q, Ochiai, Sokal and Sneath 5, phi 4-point correlation, or dispersion.

To Obtain Distance Matrices Collapse Hide details

To Obtain Distance Matrices

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Correlate
Distances...

Select at least one numeric variable to compute distances between cases, or select at least two numeric variables to compute distances between variables.

Select an alternative in the Compute Distances group to calculate proximities either between cases or between variables.

Related Topics

Distances Dissimilarity Measures
Distances Dissimilarity Measures for Interval Data
Distances Dissimilarity Measures for Count Data
Distances Dissimilarity Measures for Binary Data
Distances Similarity Measures
Distances Similarity Measures for Interval Data
Distances Similarity Measures for Binary Data
Distances Transform Values
PROXIMITIES


Distances Dissimilarity Measures

Distances,Distances,Distances
dissimilarity measures,dissimilarity measures,dissimilarity measures
Distances,Distances,Distances
transforming measures,transforming measures,transforming measures
Distances,Distances,Distances
transforming values,transforming values,transforming values
distance measures,distance measures,distance measures
in Distances,in Distances,in Distances
Euclidean distance,Euclidean distance,Euclidean distance
in Distances,in Distances,in Distances
Chebychev distance,Chebychev distance,Chebychev distance
in Distances,in Distances,in Distances
block distance,block distance,block distance
in Distances,in Distances,in Distances
Minkowski distance,Minkowski distance,Minkowski distance
in Distances,in Distances,in Distances
chi-square distance,chi-square distance,chi-square distance
in Distances,in Distances,in Distances
phi-square distance measure,phi-square distance measure,phi-square distance measure
in Distances,in Distances,in Distances
size difference measure,size difference measure,size difference measure
in Distances,in Distances,in Distances
pattern difference measure,pattern difference measure,pattern difference measure
in Distances,in Distances,in Distances
Lance and Williams dissimilarity measure,Lance and Williams dissimilarity measure,Lance and Williams dissimilarity measure
in Distances,in Distances,in Distances
squared Euclidean distance,squared Euclidean distance,squared Euclidean distance
in Distances,in Distances,in Distances
Lance and Williams dissimilarity measure,Lance and Williams dissimilarity measure,Lance and Williams dissimilarity measure

From the Measure group, select the alternative that corresponds to your type of data (interval, count, or binary); then, from the drop-down list, select one of the measures that corresponds to that type of data. Available measures, by data type, are:

• Interval data. Euclidean distance, squared Euclidean distance, Chebychev, block, Minkowski, or customized.

• Count data. Chi-square measure or phi-square measure.

• Binary data. Euclidean distance, squared Euclidean distance, size difference, pattern difference, variance, shape, or Lance and Williams. (Enter values for Present and Absent to specify which two values are meaningful; Distances will ignore all other values.)

The Transform Values group allows you to standardize data values for either cases or variables before computing proximities. These transformations are not applicable to binary data. Available standardization methods are z scores, range –1 to 1, range 0 to 1, maximum magnitude of 1, mean of 1, or standard deviation of 1.

The Transform Measures group allows you to transform the values generated by the distance measure. They are applied after the distance measure has been computed. Available options are absolute values, change sign, and rescale to 0–1 range.

Choosing a Dissimilarity Measure Collapse Hide details

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Correlate
Distances...

With Dissimilarities selected, click Measures.

From the Measure group, select the alternative that corresponds to your type of data.

From the drop-down list, select a measure that corresponds to that type of measure.

Related Topics

Distances
Distances Dissimilarity Measures for Interval Data
Distances Dissimilarity Measures for Count Data
Distances Dissimilarity Measures for Binary Data
Distances Similarity Measures
Distances Similarity Measures for Interval Data
Distances Similarity Measures for Binary Data
Distances Transform Values


Distances Dissimilarity Measures for Interval Data

Distances,Distances,Distances
measures for interval data,measures for interval data,measures for interval data
Distances,Distances,Distances
creating distance matrices,creating distance matrices,creating distance matrices
Euclidean distance,Euclidean distance,Euclidean distance
in Distances,in Distances,in Distances
squared Euclidean distance,squared Euclidean distance,squared Euclidean distance
in Distances,in Distances,in Distances
Chebychev distance,Chebychev distance,Chebychev distance
in Distances,in Distances,in Distances
block distance,block distance,block distance
in Distances,in Distances,in Distances
Minkowski distance,Minkowski distance,Minkowski distance
in Distances,in Distances,in Distances
customized distance measures,customized distance measures,customized distance measures
in Distances,in Distances,in Distances

The following dissimilarity measures are available for interval data:

• Euclidean distance. The square root of the sum of the squared differences between values for the items. This is the default for interval data.

• Squared Euclidean distance. The sum of the squared differences between the values for the items.

• Chebychev. The maximum absolute difference between the values for the items.

• Block. The sum of the absolute differences between the values of the item. Also known as Manhattan distance.

• Minkowski. The pth root of the sum of the absolute differences to the pth power between the values for the items.

• Customized. The rth root of the sum of the absolute differences to the pth power between the values for the items.

Related Topics

Distances
Distances Dissimilarity Measures
Distances Dissimilarity Measures for Count Data
Distances Dissimilarity Measures for Binary Data
Distances Similarity Measures
Distances Similarity Measures for Interval Data
Distances Similarity Measures for Binary Data
Distances Transform Values


Distances Dissimilarity Measures for Count Data

Distances,Distances,Distances
measures for count data,measures for count data,measures for count data
Distances,Distances,Distances
creating distance matrices,creating distance matrices,creating distance matrices
chi-square distance,chi-square distance,chi-square distance
in Distances,in Distances,in Distances
phi-square distance measure,phi-square distance measure,phi-square distance measure
in Distances,in Distances,in Distances

The following dissimilarity measures are available for count data:

• Chi-square measure. This measure is based on the chi-square test of equality for two sets of frequencies. This is the default for count data.

• Phi-square measure. This measure is equal to the chi-square measure normalized by the square root of the combined frequency.

Related Topics

Distances
Distances Dissimilarity Measures
Distances Dissimilarity Measures for Interval Data
Distances Dissimilarity Measures for Binary Data
Distances Similarity Measures
Distances Similarity Measures for Interval Data
Distances Similarity Measures for Binary Data
Distances Transform Values


Distances Dissimilarity Measures for Binary Data

Distances,Distances,Distances
measures for binary data,measures for binary data,measures for binary data
Distances,Distances,Distances
creating distance matrices,creating distance matrices,creating distance matrices
binary Euclidean distance,binary Euclidean distance,binary Euclidean distance
in Distances,in Distances,in Distances
binary squared Euclidean distance,binary squared Euclidean distance,binary squared Euclidean distance
in Distances,in Distances,in Distances
size difference measure,size difference measure,size difference measure
in Distances,in Distances,in Distances
pattern difference measure,pattern difference measure,pattern difference measure
in Distances,in Distances,in Distances
shape,shape,shape
in Distances,in Distances,in Distances
variance distance,variance distance,variance distance
in Distances,in Distances,in Distances
Lance and Williams dissimilarity measure,Lance and Williams dissimilarity measure,Lance and Williams dissimilarity measure
in Distances,in Distances,in Distances

The following dissimilarity measures are available for binary data:

• Euclidean distance. Computed from a fourfold table as SQRT(b+c), where b and c represent the diagonal cells corresponding to cases present on one item but absent on the other.

• Squared Euclidean distance. Computed as the number of discordant cases. Its minimum value is 0, and it has no upper limit.

• Size difference. An index of asymmetry. It ranges from 0 to 1.

• Pattern difference. Dissimilarity measure for binary data that ranges from 0 to 1. Computed from a fourfold table as bc/(n**2), where b and c represent the diagonal cells corresponding to cases present on one item but absent on the other and n is the total number of observations.

• Variance. Computed from a fourfold table as (b+c)/4n, where b and c represent the diagonal cells corresponding to cases present on one item but absent on the other and n is the total number of observations. It ranges from 0 to 1.

• Shape. This distance measure has a range of 0 to 1, and it penalizes asymmetry of mismatches.

• Lance and Williams. Computed from a fourfold table as (b+c)/(2a+b+c), where a represents the cell corresponding to cases present on both items, and b and c represent the diagonal cells corresponding to cases present on one item but absent on the other. This measure has a range of 0 to 1. (Also known as the Bray-Curtis nonmetric coefficient.)

You can optionally change the Present and Absent fields to specify the values that indicate that a characteristic is present or absent. The procedure will ignore all other values.

Related Topics

Distances
Distances Dissimilarity Measures
Distances Dissimilarity Measures for Interval Data
Distances Dissimilarity Measures for Count Data
Distances Similarity Measures
Distances Similarity Measures for Interval Data
Distances Similarity Measures for Binary Data
Distances Transform Values


Distances Similarity Measures

Distances,Distances,Distances
similarity measures,similarity measures,similarity measures
Distances,Distances,Distances
transforming values,transforming values,transforming values
Distances,Distances,Distances
transforming measures,transforming measures,transforming measures
similarity measures,similarity measures,similarity measures
in Distances,in Distances,in Distances

From the Measure group, select the alternative that corresponds to your type of data (interval or binary); then, from the drop-down list, select one of the measures that corresponds to that type of data. Available measures, by data type, are:

• Interval data. Pearson correlation or cosine.

• Binary data. Russell and Rao, simple matching, Jaccard, Dice, Rogers and Tanimoto, Sokal and Sneath 1, Sokal and Sneath 2, Sokal and Sneath 3, Kulczynski 1, Kulczynski 2, Sokal and Sneath 4, Hamann, Lambda, Anderberg's D, Yule's Y, Yule's Q, Ochiai, Sokal and Sneath 5, phi 4-point correlation, or dispersion. (Enter values for Present and Absent to specify which two values are meaningful; Distances will ignore all other values.)

The Transform Values group allows you to standardize data values for either cases or variables before computing proximities. These transformations are not applicable to binary data. Available standardization methods are z scores, range –1 to 1, range 0 to 1, maximum magnitude of 1, mean of 1, and standard deviation of 1.

The Transform Measures group allows you to transform the values generated by the distance measure. They are applied after the distance measure has been computed. Available options are absolute values, change sign, and rescale to 0–1 range.

Choosing a Similarity Measure Collapse Hide details

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Correlate
Distances...

With Similarities selected, click Measures.

From the Measure group, select the alternative that corresponds to your type of data.

From the drop-down list, select a measure that corresponds to that type of measure.

Related Topics

Distances
Distances Dissimilarity Measures
Distances Dissimilarity Measures for Interval Data
Distances Dissimilarity Measures for Count Data
Distances Dissimilarity Measures for Binary Data
Distances Similarity Measures for Interval Data
Distances Similarity Measures for Binary Data
Distances Transform Values


Distances Similarity Measures for Interval Data

Pearson correlation,Pearson correlation,Pearson correlation
in Distances,in Distances,in Distances
cosine,cosine,cosine
in Distances,in Distances,in Distances
squared Euclidean distance,squared Euclidean distance,squared Euclidean distance
in Distances,in Distances,in Distances
Chebychev distance,Chebychev distance,Chebychev distance
in Distances,in Distances,in Distances
block distance,block distance,block distance
in Distances,in Distances,in Distances
Minkowski distance,Minkowski distance,Minkowski distance
in Distances,in Distances,in Distances
customized distance measures,customized distance measures,customized distance measures
in Distances,in Distances,in Distances

The following similarity measures are available for interval data:

• Pearson correlation. The product-moment correlation between two vectors of values. This is the default similarity measure for interval data.

• Cosine. The cosine of the angle between two vectors of values.

Related Topics

Distances
Distances Dissimilarity Measures
Distances Dissimilarity Measures for Interval Data
Distances Dissimilarity Measures for Count Data
Distances Dissimilarity Measures for Binary Data
Distances Similarity Measures
Distances Similarity Measures for Binary Data
Distances Transform Values


Distances Similarity Measures for Binary Data

Russell and Rao measure,Russell and Rao measure,Russell and Rao measure
in Distances,in Distances,in Distances
Jaccard similarity ratio,Jaccard similarity ratio,Jaccard similarity ratio
in Distances,in Distances,in Distances
Dice measure,Dice measure,Dice measure
in Distances,in Distances,in Distances
Rogers and Tanimoto measure,Rogers and Tanimoto measure,Rogers and Tanimoto measure
in Distances,in Distances,in Distances
Sokal and Sneath measures,Sokal and Sneath measures,Sokal and Sneath measures
in Distances,in Distances,in Distances
Kulczynski measures,Kulczynski measures,Kulczynski measures
in Distances,in Distances,in Distances
Hamann measure,Hamann measure,Hamann measure
in Distances,in Distances,in Distances
Lambda,Lambda,Lambda
in Distances,in Distances,in Distances
Anderberg's D,Anderberg's D,Anderberg's D
in Distances,in Distances,in Distances
Yule's Y,Yule's Y,Yule's Y
in Distances,in Distances,in Distances
Yule's Q,Yule's Q,Yule's Q
in Distances,in Distances,in Distances
Ochiai measure,Ochiai measure,Ochiai measure
in Distances,in Distances,in Distances
phi,phi,phi
4-point correlation,4-point correlation,4-point correlation
dispersion measure,dispersion measure,dispersion measure
in Distances,in Distances,in Distances

The following similarity measures are available for binary data:

• Russel and Rao. This is a binary version of the inner (dot) product. Equal weight is given to matches and nonmatches. This is the default for binary similarity data.

• Simple matching. This is the ratio of matches to the total number of values. Equal weight is given to matches and nonmatches.

• Jaccard. This is an index in which joint absences are excluded from consideration. Equal weight is given to matches and nonmatches. Also known as the similarity ratio.

• Dice. This is an index in which joint absences are excluded from consideration, and matches are weighted double. Also known as the Czekanowski or Sorensen measure.

• Rogers and Tanimoto. This is an index in which double weight is given to nonmatches.

• Sokal and Sneath 1. This is an index in which double weight is given to matches.

• Sokal and Sneath 2. This is an index in which double weight is given to nonmatches, and joint absences are excluded from consideration.

• Sokal and Sneath 3. This is the ratio of matches to nonmatches. This index has a lower bound of 0 and is unbounded above. It is theoretically undefined when there are no nonmatches; however, Distances assigns an arbitrary value of 9999.999 when the value is undefined or is greater than this value.

• Kulczynski 1. This is the ratio of joint presences to all nonmatches. This index has a lower bound of 0 and is unbounded above. It is theoretically undefined when there are no nonmatches; however, Distances assigns an arbitrary value of 9999.999 when the value is undefined or is greater than this value.

• Kulczynski 2. This index is based on the conditional probability that the characteristic is present in one item, given that it is present in the other. The separate values for each item acting as predictor of the other are averaged to compute this value.

• Sokal and Sneath 4. This index is based on the conditional probability that the characteristic in one item matches the value in the other. The separate values for each item acting as predictor of the other are averaged to compute this value.

• Hamann. This index is the number of matches minus the number of nonmatches, divided by the total number of items. It ranges from -1 to 1.

• Lambda. This index is Goodman and Kruskal's lambda. Corresponds to the proportional reduction of error (PRE) using one item to predict the other (predicting in both directions). Values range from 0 to 1.

• Anderberg's D. Similar to lambda, this index corresponds to the actual reduction of error using one item to predict the other (predicting in both directions). Values range from 0 to 1.

• Yule's Y. This index is a function of the cross-ratio for a 2 x 2 table, and is independent of the marginal totals. It has a range of -1 to 1. Also known as the coefficient of colligation.

• Yule's Q. This index is a special case of Goodman and Kruskal's gamma. It is a function of the cross-ratio and is independent of the marginal totals. It has a range of -1 to 1.

• Ochiai. This index is the binary form of the cosine similarity measure. It has a range of 0 to 1.

• Sokal and Sneath 5. This index is the squared geometric mean of conditional probabilities of positive and negative matches. It is independent of item coding. It has a range of 0 to 1.

• Phi 4-point correlation. This index is a binary analogue of the Pearson correlation coefficient. It has a range of -1 to 1.

• Dispersion. This index has a range of -1 to 1.

You can optionally change the Present and Absent fields to specify the values that indicate that a characteristic is present or absent. The procedure will ignore all other values.

Related Topics

Distances
Distances Dissimilarity Measures
Distances Dissimilarity Measures for Interval Data
Distances Dissimilarity Measures for Count Data
Distances Dissimilarity Measures for Binary Data
Distances Similarity Measures
Distances Similarity Measures for Interval Data
Distances Transform Values


Distances Transform Values

Distances,Distances,Distances
transforming values,transforming values,transforming values
Distances,Distances,Distances
creating distance matrices,creating distance matrices,creating distance matrices
Distances,Distances,Distances
standardizing values,standardizing values,standardizing values

The following alternatives are available for transforming values:

• Z scores. Values are standardized to z scores, with a mean of 0 and a standard deviation of 1.

• Range -1 to 1. Each value for the item being standardized is divided by the range of the values.

• Range 0 to 1. The procedure subtracts the minimum value from each item being standardized and then divides by the range.

• Maximum magnitude of 1. The procedure divides each value for the item being standardized by the maximum of the values.

• Mean of 1. The procedure divides each value for the item being standardized by the mean of the values.

• Standard deviation of 1. The procedure divides each value for the variable or case being standardized by the standard deviation of the values.

Additionally, you can choose how standardization is done. Alternatives are By variable or By case.

Related Topics

Distances
Distances Dissimilarity Measures
Distances Dissimilarity Measures for Interval Data
Distances Dissimilarity Measures for Count Data
Distances Dissimilarity Measures for Binary Data
Distances Similarity Measures
Distances Similarity Measures for Interval Data
Distances Similarity Measures for Binary Data


PROXIMITIES Command Additional Features

Distances,Distances,Distances
command additional features,command additional features,command additional features

The Distances procedure uses PROXIMITIES command syntax. The command syntax language also allows you to:

• Specify any integer as the power for the Minkowski distance measure.

• Specify any integers as the power and root for a customized distance measure.

Related Topics

PROXIMITIES


Linear Regression

Linear Regression,Linear Regression,Linear Regression
Linear Regression,Linear Regression,Linear Regression
blocks,blocks,blocks
regression,regression,regression
Linear Regression,Linear Regression,Linear Regression
regression,regression,regression
multiple regression,multiple regression,multiple regression
multiple regression,multiple regression,multiple regression
in Linear Regression,in Linear Regression,in Linear Regression
weighted least squares,weighted least squares,weighted least squares
in Linear Regression,in Linear Regression,in Linear Regression
Linear Regression,Linear Regression,Linear Regression
weights,weights,weights

Linear Regression estimates the coefficients of the linear equation, involving one or more independent variables, that best predict the value of the dependent variable. For example, you can try to predict a salesperson's total yearly sales (the dependent variable) from independent variables such as age, education, and years of experience.

Example. Is the number of games won by a basketball team in a season related to the average number of points the team scores per game? A scatterplot indicates that these variables are linearly related. The number of games won and the average number of points scored by the opponent are also linearly related. These variables have a negative relationship. As the number of games won increases, the average number of points scored by the opponent decreases. With linear regression, you can model the relationship of these variables. A good model can be used to predict how many games teams will win.

Statistics. For each variable: number of valid cases, mean, and standard deviation. For each model: regression coefficients, correlation matrix, part and partial correlations, multiple R, R2, adjusted R2, change in R2, standard error of the estimate, analysis-of-variance table, predicted values, and residuals. Also, 95%-confidence intervals for each regression coefficient, variance-covariance matrix, variance inflation factor, tolerance, Durbin-Watson test, distance measures (Mahalanobis, Cook, and leverage values), DfBeta, DfFit, prediction intervals, and casewise diagnostics. Plots: scatterplots, partial plots, histograms, and normal probability plots.

Show me

Linear Regression Data Considerations Collapse Hide details

Data. The dependent and independent variables should be quantitative. Categorical variables, such as religion, major field of study, or region of residence, need to be recoded to binary (dummy) variables or other types of contrast variables.

Assumptions. For each value of the independent variable, the distribution of the dependent variable must be normal. The variance of the distribution of the dependent variable should be constant for all values of the independent variable. The relationship between the dependent variable and each independent variable should be linear, and all observations should be independent.

To Obtain a Linear Regression Analysis Collapse Hide details

To Obtain a Linear Regression Analysis

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Regression
Linear...

In the Linear Regression dialog box, select a numeric dependent variable.

Select one or more numeric independent variables.

Optionally, you can:

• Group independent variables into blocks and specify different entry methods for different subsets of variables.

• Choose a selection variable to limit the analysis to a subset of cases having a particular value(s) for this variable.

• Select a case identification variable for identifying points on plots.

• Select a numeric WLS Weight variable for a weighted least squares analysis.

WLS. Allows you to obtain a weighted least-squares model. Data points are weighted by the reciprocal of their variances. This means that observations with large variances have less impact on the analysis than observations associated with small variances. If the value of the weighting variable is zero, negative, or missing, the case is excluded from the analysis.

This procedure pastes REGRESSION command syntax.

See REGRESSION Algorithms for computational details for this procedure.

Related Topics

Linear Regression: Related Procedures
Linear Regression Variable Selection Methods
Linear Regression Set Rule
Linear Regression Plots
Linear Regression: Saving New Variables
Linear Regression Statistics
Linear Regression Options
REGRESSION


Linear Regression Variable Selection Methods

Linear Regression,Linear Regression,Linear Regression
variable selection methods,variable selection methods,variable selection methods
stepwise selection,stepwise selection,stepwise selection
in Linear Regression,in Linear Regression,in Linear Regression
backward elimination,backward elimination,backward elimination
in Linear Regression,in Linear Regression,in Linear Regression
forward selection,forward selection,forward selection
in Linear Regression,in Linear Regression,in Linear Regression

Method selection allows you to specify how independent variables are entered into the analysis. Using different methods, you can construct a variety of regression models from the same set of variables.

Expand Show details Collapse Hide details

• Enter (Regression). A procedure for variable selection in which all variables in a block are entered in a single step.

• Stepwise. At each step, the independent variable not in the equation that has the smallest probability of F is entered, if that probability is sufficiently small. Variables already in the regression equation are removed if their probability of F becomes sufficiently large. The method terminates when no more variables are eligible for inclusion or removal.

• Remove. A procedure for variable selection in which all variables in a block are removed in a single step.

• Backward Elimination. A variable selection procedure in which all variables are entered into the equation and then sequentially removed. The variable with the smallest partial correlation with the dependent variable is considered first for removal. If it meets the criterion for elimination, it is removed. After the first variable is removed, the variable remaining in the equation with the smallest partial correlation is considered next. The procedure stops when there are no variables in the equation that satisfy the removal criteria.

• Forward Selection. A stepwise variable selection procedure in which variables are sequentially entered into the model. The first variable considered for entry into the equation is the one with the largest positive or negative correlation with the dependent variable. This variable is entered into the equation only if it satisfies the criterion for entry. If the first variable is entered, the independent variable not in the equation that has the largest partial correlation is considered next. The procedure stops when there are no variables that meet the entry criterion.

The significance values in your output are based on fitting a single model. Therefore, the significance values are generally invalid when a stepwise method (stepwise, forward, or backward) is used.

All variables must pass the tolerance criterion to be entered in the equation, regardless of the entry method specified. The default tolerance level is 0.0001. Also, a variable is not entered if it would cause the tolerance of another variable already in the model to drop below the tolerance criterion.

All independent variables selected are added to a single regression model. However, you can specify different entry methods for different subsets of variables. For example, you can enter one block of variables into the regression model using stepwise selection and a second block using forward selection. To add a second block of variables to the regression model, click Next.

Related Topics

Linear Regression: Related Procedures
Linear Regression
Linear Regression Set Rule
Linear Regression Plots
Linear Regression: Saving New Variables
Linear Regression Statistics
Linear Regression Options


Linear Regression Set Rule

Linear Regression,Linear Regression,Linear Regression
selection variable,selection variable,selection variable
selection variable,selection variable,selection variable
in Linear Regression,in Linear Regression,in Linear Regression

Cases defined by the selection rule are included in the analysis. For example, if you select a variable, choose equals, and type 5 for the value, then only cases for which the selected variable has a value equal to 5 are included in the analysis. A string value is also permitted.

Setting the Value for the Selection Variable Collapse Hide details

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Regression
Linear...

In the Linear Regression dialog box, choose a selection variable and click Rule.

Define a selection rule for selecting a subset of cases for analysis. The name of the selected variable appears on the left.

Select a relation from the drop-down list. The available relations are equal to, not equal to, less than, less than or equal to, greater than, and greater than or equal to. For string variables, equal to is available.

Enter a value or string.

Related Topics

Linear Regression: Related Procedures
Linear Regression
Linear Regression Variable Selection Methods
Linear Regression Plots
Linear Regression: Saving New Variables
Linear Regression Statistics
Linear Regression Options


Linear Regression Plots

Linear Regression,Linear Regression,Linear Regression
plots,plots,plots
scatterplots,scatterplots,scatterplots
in Linear Regression,in Linear Regression,in Linear Regression
histograms,histograms,histograms
in Linear Regression,in Linear Regression,in Linear Regression
normal probability plots,normal probability plots,normal probability plots
in Linear Regression,in Linear Regression,in Linear Regression
partial plots,partial plots,partial plots
in Linear Regression,in Linear Regression,in Linear Regression
outliers,outliers,outliers
in Linear Regression,in Linear Regression,in Linear Regression
regression,regression,regression
plots,plots,plots

Plots can aid in the validation of the assumptions of normality, linearity, and equality of variances. Plots are also useful for detecting outliers, unusual observations, and influential cases. After saving them as new variables, predicted values, residuals, and other diagnostics are available in the Data Editor for constructing plots with the independent variables. The following plots are available:

Scatterplots. You can plot any two of the following: the dependent variable, standardized predicted values, standardized residuals, deleted residuals, adjusted predicted values, Studentized residuals, or Studentized deleted residuals. Plot the standardized residuals against the standardized predicted values to check for linearity and equality of variances.

Expand Show details Collapse Hide details

Source variable list. Lists the dependent variable (DEPENDNT) and the following predicted and residual variables: Standardized predicted values (*ZPRED), Standardized residuals (*ZRESID), Deleted residuals (*DRESID), Adjusted predicted values (*ADJPRED), Studentized residuals (*SRESID), Studentized deleted residuals (*SDRESID).

Produce all partial plots. Displays scatterplots of residuals of each independent variable and the residuals of the dependent variable when both variables are regressed separately on the rest of the independent variables. At least two independent variables must be in the equation for a partial plot to be produced.

Standardized Residual Plots. You can obtain histograms of standardized residuals and normal probability plots comparing the distribution of standardized residuals to a normal distribution.

If any plots are requested, summary statistics are displayed for standardized predicted values and standardized residuals (*ZPRED and *ZRESID).

Obtaining Plots with a Regression Collapse Hide details

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Regression
Linear...

In the Linear Regression dialog box, click Plots.

For scatterplots, select one variable for the vertical (y) axis and one variable for the horizontal (x) axis. To request additional scatterplots, click Next.

Related Topics

Linear Regression: Related Procedures
Linear Regression
Linear Regression Variable Selection Methods
Linear Regression Set Rule
Linear Regression: Saving New Variables
Linear Regression Statistics
Linear Regression Options


Linear Regression: Saving New Variables

Linear Regression,Linear Regression,Linear Regression
saving new variables,saving new variables,saving new variables
predicted values,predicted values,predicted values
saving in Linear Regression,saving in Linear Regression,saving in Linear Regression
Linear Regression,Linear Regression,Linear Regression
residuals,residuals,residuals
residuals,residuals,residuals
saving in Linear Regression,saving in Linear Regression,saving in Linear Regression
Studentized residuals,Studentized residuals,Studentized residuals
in Linear Regression,in Linear Regression,in Linear Regression
standardized residuals,standardized residuals,standardized residuals
in Linear Regression,in Linear Regression,in Linear Regression
deleted residuals,deleted residuals,deleted residuals
in Linear Regression,in Linear Regression,in Linear Regression
Cook's distance,Cook's distance,Cook's distance
in Linear Regression,in Linear Regression,in Linear Regression
Mahalanobis distance,Mahalanobis distance,Mahalanobis distance
in Linear Regression,in Linear Regression,in Linear Regression
leverage values,leverage values,leverage values
in Linear Regression,in Linear Regression,in Linear Regression
DfBeta,DfBeta,DfBeta
in Linear Regression,in Linear Regression,in Linear Regression
DfFit,DfFit,DfFit
in Linear Regression,in Linear Regression,in Linear Regression
covariance ratio,covariance ratio,covariance ratio
in Linear Regression,in Linear Regression,in Linear Regression
prediction intervals,prediction intervals,prediction intervals
saving in Linear Regression,saving in Linear Regression,saving in Linear Regression
confidence intervals,confidence intervals,confidence intervals
saving in Linear Regression,saving in Linear Regression,saving in Linear Regression
Linear Regression,Linear Regression,Linear Regression
exporting model information,exporting model information,exporting model information

You can save predicted values, residuals, and other statistics useful for diagnostics. Each selection adds one or more new variables to your active data file.

Predicted Values. Values that the regression model predicts for each case.

Expand Show details Collapse Hide details

• Unstandardized. The value the model predicts for the dependent variable.

• Standardized. A transformation of each predicted value into its standardized form. That is, the mean predicted value is subtracted from the predicted value, and the difference is divided by the standard deviation of the predicted values. Standardized predicted values have a mean of 0 and a standard deviation of 1.

• Adjusted. The predicted value for a case when that case is excluded from the calculation of the regression coefficients.

• S.E. of mean predictions. Standard errors of the predicted values. An estimate of the standard deviation of the average value of the dependent variable for cases that have the same values of the independent variables.

Distances. Measures to identify cases with unusual combinations of values for the independent variables and cases that may have a large impact on the regression model.

Expand Show details Collapse Hide details

• Mahalanobis. A measure of how much a case's values on the independent variables differ from the average of all cases. A large Mahalanobis distance identifies a case as having extreme values on one or more of the independent variables.

• Cook's. A measure of how much the residuals of all cases would change if a particular case were excluded from the calculation of the regression coefficients. A large Cook's D indicates that excluding a case from computation of the regression statistics changes the coefficients substantially.

• Leverage values. Measures the influence of a point on the fit of the regression. The centered leverage ranges from 0 (no influence on the fit) to (N-1)/N.

Prediction Intervals. The upper and lower bounds for both mean and individual prediction intervals.

Expand Show details Collapse Hide details

• Mean. Lower and upper bounds (two variables) for the prediction interval of the mean predicted response.

• Individual. Lower and upper bounds (two variables) for the prediction interval of the dependent variable for a single case.

• Confidence Interval. Enter a value between 1 and 99.99 to specify the confidence level for the two Prediction Intervals. Mean or Individual must be selected before entering this value. Typical confidence interval values are 90, 95, and 99.

Residuals. The actual value of the dependent variable minus the value predicted by the regression equation.

Expand Show details Collapse Hide details

• Unstandardized. The difference between an observed value and the value predicted by the model.

• Standardized. The residual divided by an estimate of its standard deviation. Standardized residuals, which are also known as Pearson residuals, have a mean of 0 and a standard deviation of 1.

• Studentized. The residual divided by an estimate of its standard deviation that varies from case to case, depending on the distance of each case's values on the independent variables from the means of the independent variables.

• Deleted. The residual for a case when that case is excluded from the calculation of the regression coefficients. It is the difference between the value of the dependent variable and the adjusted predicted value.

• Studentized deleted. The deleted residual for a case divided by its standard error. The difference between a Studentized deleted residual and its associated Studentized residual indicates how much difference eliminating a case makes on its own prediction.

Influence Statistics. The change in the regression coefficients (DfBeta[s]) and predicted values (DfFit) that results from the exclusion of a particular case. Standardized DfBetas and DfFit values are also available along with the covariance ratio.

Expand Show details Collapse Hide details

• DfBeta(s). The difference in beta value is the change in the regression coefficient that results from the exclusion of a particular case. A value is computed for each term in the model, including the constant.

• Standardized DfBeta. Standardized difference in beta value. The change in the regression coefficient that results from the exclusion of a particular case. You may want to examine cases with absolute values greater than 2 divided by the square root of N, where N is the number of cases. A value is computed for each term in the model, including the constant.

• DfFit. The difference in fit value is the change in the predicted value that results from the exclusion of a particular case.

• Standardized DfFit. Standardized difference in fit value. The change in the predicted value that results from the exclusion of a particular case. You may want to examine standardized values which in absolute value exceed 2 times the square root of p/N, where p is the number of parameters in the model and N is the number of cases.

• Covariance ratio. The ratio of the determinant of the covariance matrix with a particular case excluded from the calculation of the regression coefficients to the determinant of the covariance matrix with all cases included. If the ratio is close to 1, the case does not significantly alter the covariance matrix.

Coefficient Statistics. Saves regression coefficients to a dataset or a data file. Datasets are available for subsequent use in the same session but are not saved as files unless explicitly saved prior to the end of the session. Dataset names must conform to variable naming rules. See the topic Variable Names for more information.

Export model information to XML file. Parameter estimates and (optionally) their covariances are exported to the specified file in XML (PMML) format. SmartScore and PASW Statistics Server (a separate product) can use this model file to apply the model information to other data files for scoring purposes.

Saving New Variables in Linear Regression Collapse Hide details

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Regression
Linear...

In the Linear Regression dialog box, click Save.

Select the values or statistics you want.

Related Topics

Linear Regression: Related Procedures
Linear Regression
Linear Regression Variable Selection Methods
Linear Regression Set Rule
Linear Regression Plots
Linear Regression Statistics
Linear Regression Options


Linear Regression Statistics

covariance matrix,covariance matrix,covariance matrix
in Linear Regression,in Linear Regression,in Linear Regression
multiple R,multiple R,multiple R
in Linear Regression,in Linear Regression,in Linear Regression
R2,R2,R2
R2 change,R2 change,R2 change
Partial Correlations,Partial Correlations,Partial Correlations
in Linear Regression,in Linear Regression,in Linear Regression
tolerance,tolerance,tolerance
in Linear Regression,in Linear Regression,in Linear Regression
Linear Regression,Linear Regression,Linear Regression
statistics,statistics,statistics
variance inflation factor,variance inflation factor,variance inflation factor
in Linear Regression,in Linear Regression,in Linear Regression
beta coefficients,beta coefficients,beta coefficients
in Linear Regression,in Linear Regression,in Linear Regression
confidence intervals,confidence intervals,confidence intervals
in Linear Regression,in Linear Regression,in Linear Regression
R statistic,R statistic,R statistic
in Linear Regression,in Linear Regression,in Linear Regression
R2,R2,R2
in Linear Regression,in Linear Regression,in Linear Regression
casewise diagnostics,casewise diagnostics,casewise diagnostics
in Linear Regression,in Linear Regression,in Linear Regression
adjusted R2,adjusted R2,adjusted R2
in Linear Regression,in Linear Regression,in Linear Regression
analysis of variance,analysis of variance,analysis of variance
in Linear Regression,in Linear Regression,in Linear Regression
Durbin-Watson statistic,Durbin-Watson statistic,Durbin-Watson statistic
in Linear Regression,in Linear Regression,in Linear Regression
eigenvalues,eigenvalues,eigenvalues
in Linear Regression,in Linear Regression,in Linear Regression
collinearity diagnostics,collinearity diagnostics,collinearity diagnostics
in Linear Regression,in Linear Regression,in Linear Regression
regression coefficients,regression coefficients,regression coefficients
in Linear Regression,in Linear Regression,in Linear Regression

The following statistics are available:

Regression Coefficients. Estimates displays Regression coefficient B, standard error of B, standardized coefficient beta, t value for B, and two-tailed significance level of t. Confidence intervals displays confidence intervals with the specified level of confidence for each regression coefficient or a covariance matrix. Covariance matrix displays a variance-covariance matrix of regression coefficients with covariances off the diagonal and variances on the diagonal. A correlation matrix is also displayed.

Model fit. The variables entered and removed from the model are listed, and the following goodness-of-fit statistics are displayed: multiple R, R2 and adjusted R2, standard error of the estimate, and an analysis-of-variance table.

R squared change. The change in the R2 statistic that is produced by adding or deleting an independent variable. If the R2 change associated with a variable is large, that means that the variable is a good predictor of the dependent variable.

Descriptives. Provides the number of valid cases, the mean, and the standard deviation for each variable in the analysis. A correlation matrix with a one-tailed significance level and the number of cases for each correlation are also displayed.

Partial Correlation. The correlation that remains between two variables after removing the correlation that is due to their mutual association with the other variables. The correlation between the dependent variable and an independent variable when the linear effects of the other independent variables in the model have been removed from both.

Part Correlation. The correlation between the dependent variable and an independent variable when the linear effects of the other independent variables in the model have been removed from the independent variable. It is related to the change in R-squared when a variable is added to an equation. Sometimes called the semipartial correlation.

Collinearity diagnostics. Collinearity (or multicollinearity) is the undesirable situation when one independent variable is a linear function of other independent variables. Eigenvalues of the scaled and uncentered cross-products matrix, condition indices, and variance-decomposition proportions are displayed along with variance inflation factors (VIF) and tolerances for individual variables.

Residuals. Displays the Durbin-Watson test for serial correlation of the residuals and casewise diagnostics for the cases meeting the selection criterion (outliers above n standard deviations).

Requesting Statistics with a Regression Collapse Hide details

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Regression
Linear...

In the Linear Regression dialog box, click Statistics.

Select the statistics you want.

Related Topics

Linear Regression: Related Procedures
Linear Regression
Linear Regression Variable Selection Methods
Linear Regression Set Rule
Linear Regression Plots
Linear Regression: Saving New Variables
Linear Regression Options


Linear Regression Options

Linear Regression,Linear Regression,Linear Regression
variable selection methods,variable selection methods,variable selection methods
Linear Regression,Linear Regression,Linear Regression
missing values,missing values,missing values
missing values,missing values,missing values
in Linear Regression,in Linear Regression,in Linear Regression

The following options are available:

Stepping Method Criteria. These options apply when either the forward, backward, or stepwise variable selection method has been specified. Variables can be entered or removed from the model depending on either the significance (probability) of the F value or the F value itself.

Expand Show details Collapse Hide details

• Use Probability of F. A variable is entered into the model if the significance level of its F value is less than the Entry value and is removed if the significance level is greater than the Removal value. Entry must be less than Removal, and both values must be positive. To enter more variables into the model, increase the Entry value. To remove more variables from the model, lower the Removal value.

• Use F Value. A variable is entered into the model if its F value is greater than the Entry value and is removed if the F value is less than the Removal value. Entry must be greater than Removal, and both values must be positive. To enter more variables into the model, lower the Entry value. To remove more variables from the model, increase the Removal value.

Include constant in equation. By default, the regression model includes a constant term. Deselecting this option forces regression through the origin, which is rarely done. Some results of regression through the origin are not comparable to results of regression that do include a constant. For example, R2 cannot be interpreted in the usual way.

Missing Values. You can choose one of the following:

• Exclude cases listwise. Only cases with valid values for all variables are included in the analyses.

• Exclude cases pairwise. Cases with complete data for the pair of variables being correlated are used to compute the correlation coefficient on which the regression analysis is based. Degrees of freedom are based on the minimum pairwise N.

• Replace with mean. All cases are used for computations, with the mean of the variable substituted for missing observations.

Specifying Options for a Linear Regression Collapse Hide details

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Regression
Linear...

In the Linear Regression dialog box, click Options.

Select the options you want.

Related Topics

Linear Regression: Related Procedures
Linear Regression
Linear Regression Variable Selection Methods
Linear Regression Set Rule
Linear Regression Plots
Linear Regression: Saving New Variables
Linear Regression Statistics


REGRESSION Command Additional Features

Linear Regression,Linear Regression,Linear Regression
command additional features,command additional features,command additional features

The command syntax language also allows you to:

• Write a correlation matrix or read a matrix in place of raw data to obtain your regression analysis (with the MATRIX subcommand).

• Specify tolerance levels (with the CRITERIA subcommand).

• Obtain multiple models for the same or different dependent variables (with the METHOD and DEPENDENT subcommands).

• Obtain additional statistics (with the DESCRIPTIVES and STATISTICS subcommands).

Related Topics

REGRESSION


Ordinal Regression

PLUM,PLUM,PLUM
in Ordinal Regression,in Ordinal Regression,in Ordinal Regression
Ordinal Regression,Ordinal Regression,Ordinal Regression
Ordinal Regression,Ordinal Regression,Ordinal Regression
statistics,statistics,statistics

Ordinal Regression allows you to model the dependence of a polytomous ordinal response on a set of predictors, which can be factors or covariates. The design of Ordinal Regression is based on the methodology of McCullagh (1980, 1998), and the procedure is referred to as PLUM in the syntax.

Standard linear regression analysis involves minimizing the sum-of-squared differences between a response (dependent) variable and a weighted combination of predictor (independent) variables. The estimated coefficients reflect how changes in the predictors affect the response. The response is assumed to be numerical, in the sense that changes in the level of the response are equivalent throughout the range of the response. For example, the difference in height between a person who is 150 cm tall and a person who is 140 cm tall is 10 cm, which has the same meaning as the difference in height between a person who is 210 cm tall and a person who is 200 cm tall. These relationships do not necessarily hold for ordinal variables, in which the choice and number of response categories can be quite arbitrary.

Example. Ordinal Regression could be used to study patient reaction to drug dosage. The possible reactions may be classified as none, mild, moderate, or severe. The difference between a mild and moderate reaction is difficult or impossible to quantify and is based on perception. Moreover, the difference between a mild and moderate response may be greater or less than the difference between a moderate and severe response.

Statistics and plots. Observed and expected frequencies and cumulative frequencies, Pearson residuals for frequencies and cumulative frequencies, observed and expected probabilities, observed and expected cumulative probabilities of each response category by covariate pattern, asymptotic correlation and covariance matrices of parameter estimates, Pearson's chi-square and likelihood-ratio chi-square, goodness-of-fit statistics, iteration history, test of parallel lines assumption, parameter estimates, standard errors, confidence intervals, and Cox and Snell's, Nagelkerke's, and McFadden's R2 statistics.

Show me

Ordinal Regression Data Considerations Collapse Hide details

Data. The dependent variable is assumed to be ordinal and can be numeric or string. The ordering is determined by sorting the values of the dependent variable in ascending order. The lowest value defines the first category. Factor variables are assumed to be categorical. Covariate variables must be numeric. Note that using more than one continuous covariate can easily result in the creation of a very large cell probabilities table.

Assumptions. Only one response variable is allowed, and it must be specified. Also, for each distinct pattern of values across the independent variables, the responses are assumed to be independent multinomial variables.

Related procedures. Nominal logistic regression uses similar models for nominal dependent variables.

Obtaining an Ordinal Regression Collapse Hide details

Obtaining an Ordinal Regression

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Regression
Ordinal...

Select one dependent variable.

Click OK.

This procedure pastes PLUM command syntax.

See PLUM Algorithms for computational details for this procedure.

Related Topics

PLUM
Ordinal Regression Options
Ordinal Regression Output
Ordinal Regression Location Model
Ordinal Regression Scale Model


Ordinal Regression Options

Ordinal Regression,Ordinal Regression,Ordinal Regression
options,options,options
Ordinal Regression,Ordinal Regression,Ordinal Regression
link,link,link
link,link,link
in Ordinal Regression,in Ordinal Regression,in Ordinal Regression

The Options dialog box allows you to adjust parameters used in the iterative estimation algorithm, choose a level of confidence for your parameter estimates, and select a link function.

Iterations. You can customize the iterative algorithm.

• Maximum iterations. Specify a non-negative integer. If 0 is specified, the procedure returns the initial estimates.

• Maximum step-halving. Specify a positive integer.

• Log-likelihood convergence. The algorithm stops if the absolute or relative change in the log-likelihood is less than this value. The criterion is not used if 0 is specified.

• Parameter convergence. The algorithm stops if the absolute or relative change in each of the parameter estimates is less than this value. The criterion is not used if 0 is specified.

Confidence interval. Specify a value greater than or equal to 0 and less than 100.

Delta. The value added to zero cell frequencies. Specify a non-negative value less than 1.

Singularity tolerance. Used for checking for highly dependent predictors. Select a value from the list of options.

Link function. The link function is a transformation of the cumulative probabilities that allows estimation of the model. Five link functions are available, summarized in the following table.

Function | Form | Typical application
Logit | log( x / (1−x) ) | Evenly distributed categories
Complementary log-log | log(−log(1−x)) | Higher categories more probable
Negative log-log | −log(−log(x)) | Lower categories more probable
Probit | F−1(x) | Latent variable is normally distributed
Cauchit (inverse Cauchy) | tan(π(x−0.5)) | Latent variable has many extreme values
To Specify Ordinal Regression Options Collapse Hide details

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Regression
Ordinal...

In the Ordinal Regression dialog box, click Options.

Select the options that you want.

Related Topics

Ordinal Regression
Ordinal Regression Output
Ordinal Regression Location Model
Ordinal Regression Scale Model


Ordinal Regression Output

iteration history,iteration history,iteration history
in Ordinal Regression,in Ordinal Regression,in Ordinal Regression
goodness of fit,goodness of fit,goodness of fit
in Ordinal Regression,in Ordinal Regression,in Ordinal Regression
Cox and Snell R2,Cox and Snell R2,Cox and Snell R2
in Ordinal Regression,in Ordinal Regression,in Ordinal Regression
Nagelkerke R2,Nagelkerke R2,Nagelkerke R2
in Ordinal Regression,in Ordinal Regression,in Ordinal Regression
McFadden R2,McFadden R2,McFadden R2
in Ordinal Regression,in Ordinal Regression,in Ordinal Regression
Pearson chi-square,Pearson chi-square,Pearson chi-square
in Ordinal Regression,in Ordinal Regression,in Ordinal Regression
likelihood-ratio chi-square,likelihood-ratio chi-square,likelihood-ratio chi-square
in Ordinal Regression,in Ordinal Regression,in Ordinal Regression
parameter estimates,parameter estimates,parameter estimates
in Ordinal Regression,in Ordinal Regression,in Ordinal Regression
correlation matrix,correlation matrix,correlation matrix
in Ordinal Regression,in Ordinal Regression,in Ordinal Regression
covariance matrix,covariance matrix,covariance matrix
in Ordinal Regression,in Ordinal Regression,in Ordinal Regression
expected frequencies,expected frequencies,expected frequencies
in Ordinal Regression,in Ordinal Regression,in Ordinal Regression
observed frequencies,observed frequencies,observed frequencies
in Ordinal Regression,in Ordinal Regression,in Ordinal Regression
test of parallel lines,test of parallel lines,test of parallel lines
in Ordinal Regression,in Ordinal Regression,in Ordinal Regression
Pearson residuals,Pearson residuals,Pearson residuals
in Ordinal Regression,in Ordinal Regression,in Ordinal Regression
cumulative frequencies,cumulative frequencies,cumulative frequencies
in Ordinal Regression,in Ordinal Regression,in Ordinal Regression

The Output dialog box allows you to produce tables for display in the Viewer and save variables to the working file.

Display. Produces tables for:

• Print iteration history. The log-likelihood and parameter estimates are printed for the print iteration frequency specified. The first and last iterations are always printed.

• Goodness-of-fit statistics. The Pearson and likelihood-ratio chi-square statistics. They are computed based on the classification specified in the variable list.

• Summary statistics. Cox and Snell's, Nagelkerke's, and McFadden's R2 statistics.

• Parameter estimates. Parameter estimates, standard errors, and confidence intervals.

• Asymptotic correlation of parameter estimates. Matrix of parameter estimate correlations.

• Asymptotic covariance of parameter estimates. Matrix of parameter estimate covariances.

• Cell information. Observed and expected frequencies and cumulative frequencies, Pearson residuals for frequencies and cumulative frequencies, observed and expected probabilities, and observed and expected cumulative probabilities of each response category by covariate pattern. Note that for models with many covariate patterns (for example, models with continuous covariates), this option can generate a very large, unwieldy table.

• Test of parallel lines. Test of the hypothesis that the location parameters are equivalent across the levels of the dependent variable. This is available only for the location-only model.

Saved variables. Saves the following variables to the working file:

• Estimated response probabilities. Model-estimated probabilities of classifying a factor/covariate pattern into the response categories. There are as many probabilities as the number of response categories.

• Predicted category. The response category that has the maximum estimated probability for a factor/covariate pattern.

• Predicted category probability. Estimated probability of classifying a factor/covariate pattern into the predicted category. This probability is also the maximum of the estimated probabilities of the factor/covariate pattern.

• Actual category probability. Estimated probability of classifying a factor/covariate pattern into the actual category.

Print log-likelihood. Controls the display of the log-likelihood. Including multinomial constant gives you the full value of the likelihood. To compare your results across products that do not include the constant, you can choose to exclude it.

To Specify Ordinal Regression Output Collapse Hide details

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Regression
Ordinal...

In the Ordinal Regression dialog box, click Output.

Select the output that you want to display.

Related Topics

Ordinal Regression
Ordinal Regression Options
Ordinal Regression Location Model
Ordinal Regression Scale Model


Ordinal Regression Location Model

Ordinal Regression,Ordinal Regression,Ordinal Regression
location model,location model,location model
location model,location model,location model
in Ordinal Regression,in Ordinal Regression,in Ordinal Regression

The Location dialog box allows you to specify the location model for your analysis.

Specify model. A main-effects model contains the covariate and factor main effects but no interaction effects. You can create a custom model to specify subsets of factor interactions or covariate interactions.

Factors/covariates. The factors and covariates are listed.

Location model. The model depends on the main effects and interaction effects that you select.

To Specify an Ordinal Regression Location Model Collapse Hide details

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Regression
Ordinal...

In the Ordinal Regression dialog box, click Location.

Build the model that you want.

Related Topics

Build Terms
Ordinal Regression Scale Model
Ordinal Regression
Ordinal Regression Options
Ordinal Regression Output


Ordinal Regression Scale Model

Ordinal Regression,Ordinal Regression,Ordinal Regression
scale model,scale model,scale model
scale model,scale model,scale model
in Ordinal Regression,in Ordinal Regression,in Ordinal Regression

The Scale dialog box allows you to specify the scale model for your analysis.

Factors/covariates. The factors and covariates are listed.

Scale model. The model depends on the main and interaction effects that you select.

To Specify an Ordinal Regression Scale Model Collapse Hide details

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Regression
Ordinal...

In the Ordinal Regression dialog box, click Scale.

Build the scale model that you want.

This procedure pastes PLUM Algorithms command syntax.

See PLUM Algorithms for computational details for this procedure.

Related Topics

Build Terms
Ordinal Regression Location Model
Ordinal Regression
Ordinal Regression Options
Ordinal Regression Output


PLUM Command Additional Features

Ordinal Regression,Ordinal Regression,Ordinal Regression
command additional features,command additional features,command additional features

You can customize your Ordinal Regression if you paste your selections into a syntax window and edit the resulting PLUM command syntax. The command syntax language also allows you to:

• Create customized hypothesis tests by specifying null hypotheses as linear combinations of parameters.

Related Topics

PLUM


Curve Estimation

Curve Estimation,Curve Estimation,Curve Estimation
analysis of variance,analysis of variance,analysis of variance
analysis of variance,analysis of variance,analysis of variance
in Curve Estimation,in Curve Estimation,in Curve Estimation
charts,charts,charts
case labels,case labels,case labels
Curve Estimation,Curve Estimation,Curve Estimation
including constant,including constant,including constant
Curve Estimation,Curve Estimation,Curve Estimation

The Curve Estimation procedure produces curve estimation regression statistics and related plots for 11 different curve estimation regression models. A separate model is produced for each dependent variable. You can also save predicted values, residuals, and prediction intervals as new variables.

Example. An Internet service provider tracks the percentage of virus-infected e-mail traffic on its networks over time. A scatterplot reveals that the relationship is nonlinear. You might fit a quadratic or cubic model to the data and check the validity of assumptions and the goodness of fit of the model.

Statistics. For each model: regression coefficients, multiple R, R2, adjusted R2, standard error of the estimate, analysis-of-variance table, predicted values, residuals, and prediction intervals. Models: linear, logarithmic, inverse, quadratic, cubic, power, compound, S-curve, logistic, growth, and exponential.

Show me

Curve Estimation Data Considerations Collapse Hide details

Data. The dependent and independent variables should be quantitative. If you select Time from the active dataset as the independent variable (instead of selecting a variable), the Curve Estimation procedure generates a time variable where the length of time between cases is uniform. If Time is selected, the dependent variable should be a time-series measure. Time-series analysis requires a data file structure in which each case (row) represents a set of observations at a different time and the length of time between cases is uniform.

Assumptions. Screen your data graphically to determine how the independent and dependent variables are related (linearly, exponentially, etc.). The residuals of a good model should be randomly distributed and normal. If a linear model is used, the following assumptions should be met: For each value of the independent variable, the distribution of the dependent variable must be normal. The variance of the distribution of the dependent variable should be constant for all values of the independent variable. The relationship between the dependent variable and the independent variable should be linear, and all observations should be independent.

To Obtain a Curve Estimation Collapse Hide details

To Obtain a Curve Estimation

From the menus choose:

Analyze
Regression
Curve Estimation...

Select one or more dependent variables. A separate model is produced for each dependent variable.

Select an independent variable (either select a variable in the active dataset or select Time).

Optionally:

• Select a variable for labeling cases in scatterplots. For each point in the scatterplot, you can use the Point Selection tool to display the value of the Case Label variable.

• Click Save to save predicted values, residuals, and prediction intervals as new variables.

The following options are also available:

• Include constant in equation. Estimates a constant term in the regression equation. The constant is included by default.

• Plot models. Plots the values of the dependent variable and each selected model against the independent variable. A separate chart is produced for each dependent variable.

• Display ANOVA table. Displays a summary analysis-of-variance table for each selected model.

This procedure pastes CURVEFIT command syntax.

See CURVEFIT Algorithms for computational details for this procedure.

Related Topics

Curve Estimation: Related Procedures
Curve Estimation Models
Curve Estimation Save
CURVEFIT


Curve Estimation Models

linear model,linear model,linear model
in Curve Estimation,in Curve Estimation,in Curve Estimation
logarithmic model,logarithmic model,logarithmic model
in Curve Estimation,in Curve Estimation,in Curve Estimation
inverse model,inverse model,inverse model
in Curve Estimation,in Curve Estimation,in Curve Estimation
quadratic model,quadratic model,quadratic model
in Curve Estimation,in Curve Estimation,in Curve Estimation
cubic model,cubic model,cubic model
in Curve Estimation,in Curve Estimation,in Curve Estimation
logistic model,logistic model,logistic model
in Curve Estimation,in Curve Estimation,in Curve Estimation
power model,power model,power model
in Curve Estimation,in Curve Estimation,in Curve Estimation
compound model,compound model,compound model
in Curve Estimation,in Curve Estimation,in Curve Estimation
S model,S model,S model
in Curve Estimation,in Curve Estimation,in Curve Estimation
growth model,growth model,growth model
in Curve Estimation,in Curve Estimation,in Curve Estimation
exponential model,exponential model,exponential model
in Curve Estimation,in Curve Estimation,in Curve Estimation
Curve Estimation,Curve Estimation,Curve Estimation
models,models,models

You can choose one or more curve estimation regression models. To determine which model to use, plot your data. If your variables appear to be related linearly, use a simple linear regression model. When your variables are not linearly related, try transforming your data. When a transformation does not help, you may need a more complicated model. View a scatterplot of your data; if the plot resembles a mathematical function you recognize, fit your data to that type of model. For example, if your data resemble an exponential function, use an exponential model.

Expand Show details Collapse Hide details

Linear. Model whose equation is Y = b0 + (b1 * t). The series values are modeled as a linear function of time.

Logarithmic. Model whose equation is Y = b0 + (b1 * ln(t)).

Inverse. Model whose equation is Y = b0 + (b1 / t).

Quadratic. Model whose equation is Y = b0 + (b1 * t) + (b2 * t**2). The quadratic model can be used to model a series that "takes off" or a series that dampens.

Cubic. Model that is defined by the equation Y = b0 + (b1 * t) + (b2 * t**2) + (b3 * t**3).

Power. Model whose equation is Y = b0 * (t**b1) or ln(Y) = ln(b0) + (b1 * ln(t)).

Compound. Model whose equation is Y = b0 * (b1**t) or ln(Y) = ln(b0) + (ln(b1) * t).

S-curve. Model whose equation is Y = e**(b0 + (b1/t)) or ln(Y) = b0 + (b1/t).

Logistic. Model whose equation is Y = 1 / (1/u + (b0 * (b1**t))) or ln(1/y-1/u) = ln (b0) + (ln(b1) * t) where u is the upper boundary value. After selecting Logistic, specify the upper boundary value to use in the regression equation. The value must be a positive number that is greater than the largest dependent variable value.

Growth. Model whose equation is Y = e**(b0 + (b1 * t)) or ln(Y) = b0 + (b1 * t).

Exponential. Model whose equation is Y = b0 * (e**(b1 * t)) or ln(Y) = ln(b0) + (b1 * t).

Related Topics

Curve Estimation: Related Procedures
Curve Estimation
Curve Estimation Save


Curve Estimation Save

Curve Estimation,Curve Estimation,Curve Estimation
saving predicted values,saving predicted values,saving predicted values
Curve Estimation,Curve Estimation,Curve Estimation
saving prediction intervals,saving prediction intervals,saving prediction intervals
Curve Estimation,Curve Estimation,Curve Estimation
saving residuals,saving residuals,saving residuals
Curve Estimation,Curve Estimation,Curve Estimation
forecast,forecast,forecast
predicted values,predicted values,predicted values
saving in Curve Estimation,saving in Curve Estimation,saving in Curve Estimation
forecast,forecast,forecast
in Curve Estimation,in Curve Estimation,in Curve Estimation
time series analysis,time series analysis,time series analysis
forecast,forecast,forecast
time series analysis,time series analysis,time series analysis
predicting cases,predicting cases,predicting cases
residuals,residuals,residuals
saving in Curve Estimation,saving in Curve Estimation,saving in Curve Estimation
prediction intervals,prediction intervals,prediction intervals
saving in Curve Estimation,saving in Curve Estimation,saving in Curve Estimation

Save Variables. For each selected model, you can save predicted values, residuals (observed value of the dependent variable minus the model predicted value), and prediction intervals (upper and lower bounds). The new variable names and descriptive labels are displayed in a table in the output window.

Predict Cases. In the active dataset, if you select Time instead of a variable as the independent variable, you can specify a forecast period beyond the end of the time series. You can choose one of the following alternatives:

• Predict from estimation period through last case. Predicts values for all cases in the file, based on the cases in the estimation period. The estimation period, displayed at the bottom of the dialog box, is defined with the Range subdialog box of the Select Cases option on the Data menu. If no estimation period has been defined, all cases are used to predict values.

• Predict through. Predicts values through the specified date, time, or observation number, based on the cases in the estimation period. This feature can be used to forecast values beyond the last case in the time series. The currently defined date variables determine what text boxes are available for specifying the end of the prediction period. If there are no defined date variables, you can specify the ending observation (case) number.

Use the Define Dates option on the Data menu to create date variables.

Saving Predicted Values and Residuals Collapse Hide details

From the menus choose:

Analyze
Regression
Curve Estimation...

In the Curve Estimation dialog box, click Save.

Related Topics

Curve Estimation: Related Procedures
Curve Estimation
Curve Estimation Models


Partial Least Squares Regression

Partial Least Squares Regression,Partial Least Squares Regression,Partial Least Squares Regression

The Partial Least Squares Regression procedure estimates partial least squares (PLS, also known as "projection to latent structure") regression models. PLS is a predictive technique that is an alternative to ordinary least squares (OLS) regression, canonical correlation, or structural equation modeling, and it is particularly useful when predictor variables are highly correlated or when the number of predictors exceeds the number of cases.

PLS combines features of principal components analysis and multiple regression. It first extracts a set of latent factors that explain as much of the covariance as possible between the independent and dependent variables. Then a regression step predicts values of the dependent variables using the decomposition of the independent variables.

Availability. PLS is an extension command that requires the Python Extension Module to be installed on the system where you plan to run PLS. The PLS Extension Module must be installed separately, and the installer can be downloaded from http://www.spss.com/devcentral.

Note: The PLS Extension Module is dependent upon Python software. SPSS Inc. is not the owner or licensor of the Python software. Any user of Python must agree to the terms of the Python license agreement located on the Python Web site. SPSS Inc. is not making any statement about the quality of the Python program. SPSS Inc. fully disclaims all liability associated with your use of the Python program.

Tables. Proportion of variance explained (by latent factor), latent factor weights, latent factor loadings, independent variable importance in projection (VIP), and regression parameter estimates (by dependent variable) are all produced by default.

Charts. Variable importance in projection (VIP), factor scores, factor weights for the first three latent factors, and distance to the model are all produced from the Options tab.

Partial Least Squares Regression Data Considerations Collapse Hide details

Measurement level. The dependent and independent (predictor) variables can be scale, nominal, or ordinal. The procedure assumes that the appropriate measurement level has been assigned to all variables, although you can temporarily change the measurement level for a variable by right-clicking the variable in the source variable list and selecting a measurement level from the context menu. Categorical (nominal or ordinal) variables are treated equivalently by the procedure.

Categorical variable coding. The procedure temporarily recodes categorical dependent variables using one-of-c coding for the duration of the procedure. If there are c categories of a variable, then the variable is stored as c vectors, with the first category denoted (1,0,...,0), the next category (0,1,0,...,0), ..., and the final category (0,0,...,0,1). Categorical dependent variables are represented using dummy coding; that is, simply omit the indicator corresponding to the reference category.

Frequency weights. Weight values are rounded to the nearest whole number before use. Cases with missing weights or weights less than 0.5 are not used in the analyses.

Missing values. User- and system-missing values are treated as invalid.

Rescaling. All model variables are centered and standardized, including indicator variables representing categorical variables.

To Obtain Partial Least Squares Regression Collapse Hide details

To Obtain Partial Least Squares Regression

From the menus choose:

Analyze
Regression
Partial Least Squares...

Select at least one dependent variable.

Select at least one independent variable.

Optionally, you can:

• Specify a reference category for categorical (nominal or ordinal) dependent variables.

• Specify a variable to be used as a unique identifier for casewise output and saved datasets.

• Specify an upper limit on the number of latent factors to be extracted.

This procedure pastes PLS command syntax.

See PLS Algorithms for computational details for this procedure.

Related Topics

Model (Partial Least Squares Regression)
Options (Partial Least Squares Regression)
PLS


Model (Partial Least Squares Regression)

Partial Least Squares Regression,Partial Least Squares Regression,Partial Least Squares Regression
model,model,model

Specify Model Effects. A main-effects model contains all factor and covariate main effects. Select Custom to specify interactions. You must indicate all of the terms to be included in the model.

Factors and Covariates. The factors and covariates are listed.

Model. The model depends on the nature of your data. After selecting Custom, you can select the main effects and interactions that are of interest in your analysis.

Build Terms Collapse Hide details

Build Terms

For the selected factors and covariates:

Interaction. Creates the highest-level interaction term of all selected variables. This is the default.

Main effects. Creates a main-effects term for each variable selected.

All 2-way. Creates all possible two-way interactions of the selected variables.

All 3-way. Creates all possible three-way interactions of the selected variables.

All 4-way. Creates all possible four-way interactions of the selected variables.

All 5-way. Creates all possible five-way interactions of the selected variables.

Specifying Models for Partial Least Squares Regression Collapse Hide details

From the menus choose:

Analyze
Regression
Partial Least Squares...

In the Partial Least Squares Regression dialog box, click the Model tab.

Related Topics

Partial Least Squares Regression
Options (Partial Least Squares Regression)


Options (Partial Least Squares Regression)

Partial Least Squares Regression,Partial Least Squares Regression,Partial Least Squares Regression
export variables,export variables,export variables

The Options tab allows the user to save and plot model estimates for individual cases, latent factors, and predictors.

For each type of data, specify the name of a dataset. The dataset names must be unique. If you specify the name of an existing dataset, its contents are replaced; otherwise, a new dataset is created.

• Save estimates for individual cases. Saves the following casewise model estimates: predicted values, residuals, distance to latent factor model, and latent factor scores. It also plots latent factor scores.

• Save estimates for latent factors. Saves latent factor loadings and latent factor weights. It also plots latent factor weights.

• Save estimates for independent variables. Saves regression parameter estimates and variable importance to projection (VIP). It also plots VIP by latent factor.

How to Export Variables as PASW Statistics Data for Partial Least Squares Regression Collapse Hide details

From the menus choose:

Analyze
Regression
Partial Least Squares...

In the Partial Least Squares Regression dialog box, click the Options tab.

Related Topics

Partial Least Squares Regression
Model (Partial Least Squares Regression)


Nearest Neighbor Analysis

Nearest Neighbor Analysis,Nearest Neighbor Analysis,Nearest Neighbor Analysis

Nearest Neighbor Analysis is a method for classifying cases based on their similarity to other cases. In machine learning, it was developed as a way to recognize patterns of data without requiring an exact match to any stored patterns, or cases. Similar cases are near each other and dissimilar cases are distant from each other. Thus, the distance between two cases is a measure of their dissimilarity.

Cases that are near each other are said to be “neighbors.” When a new case (holdout) is presented, its distance from each of the cases in the model is computed. The classifications of the most similar cases – the nearest neighbors – are tallied and the new case is placed into the category that contains the greatest number of nearest neighbors.

You can specify the number of nearest neighbors to examine; this value is called k. The pictures show how a new case would be classified using two different values of k. When k = 5, the new case is placed in category 1 because a majority of the nearest neighbors belong to category 1. However, when k = 9, the new case is placed in category 0 because a majority of the nearest neighbors belong to category 0.

The effects of changing k on classification

Nearest neighbor analysis can also be used to compute values for a continuous target. In this situation, the average or median target value of the nearest neighbors is used to obtain the predicted value for the new case.

Nearest Neighbor Analysis Data Considerations Collapse Hide details

Target and Features. The target and features can be:

• Nominal. A variable can be treated as nominal when its values represent categories with no intrinsic ranking (for example, the department of the company in which an employee works). Examples of nominal variables include region, zip code, and religious affiliation.

• Ordinal. A variable can be treated as ordinal when its values represent categories with some intrinsic ranking (for example, levels of service satisfaction from highly dissatisfied to highly satisfied). Examples of ordinal variables include attitude scores representing degree of satisfaction or confidence and preference rating scores.

• Scale. A variable can be treated as scale (continuous) when its values represent ordered categories with a meaningful metric, so that distance comparisons between values are appropriate. Examples of scale variables include age in years and income in thousands of dollars.

Nominal and Ordinal variables are treated equivalently by Nearest Neighbor Analysis. The procedure assumes that the appropriate measurement level has been assigned to each variable; however, you can temporarily change the measurement level for a variable by right-clicking the variable in the source variable list and selecting a measurement level from the context menu. To permanently change the level of measurement for a variable, see Variable Measurement Level.

An icon next to each variable in the variable list identifies the measurement level and data type:

Measurement Level | Data Type
 | Numeric | String | Date | Time
Scale (Continuous) |  | n/a |  |
Ordinal |  |  |  |
Nominal |  |  |  |

Categorical variable coding. The procedure temporarily recodes categorical predictors and dependent variables using one-of-c coding for the duration of the procedure. If there are c categories of a variable, then the variable is stored as c vectors, with the first category denoted (1,0,...,0), the next category (0,1,0,...,0), ..., and the final category (0,0,...,0,1).

This coding scheme increases the dimensionality of the feature space. In particular, the total number of dimensions is the number of scale predictors plus the number of categories across all categorical predictors. As a result, this coding scheme can lead to slower training. If your nearest neighbors training is proceeding very slowly, you might try reducing the number of categories in your categorical predictors by combining similar categories or dropping cases that have extremely rare categories before running the procedure.

All one-of-c coding is based on the training data, even if a holdout sample is defined (see Partitions (Nearest Neighbor Analysis)). Thus, if the holdout sample contains cases with predictor categories that are not present in the training data, then those cases are not scored. If the holdout sample contains cases with dependent variable categories that are not present in the training data, then those cases are scored.

Rescaling. Scale features are normalized by default. All rescaling is performed based on the training data, even if a holdout sample is defined (see Partitions (Nearest Neighbor Analysis)). If you specify a variable to define partitions, it is important that the features have similar distributions across the training and holdout samples. Use, for example, the Explore procedure to examine the distributions across partitions.

Frequency weights. Frequency weights are ignored by this procedure.

Replicating results. The procedure uses random number generation during random assignment of partitions and cross-validation folds. If you want to replicate your results exactly, in addition to using the same procedure settings, set a seed for the Mersenne Twister (see Partitions (Nearest Neighbor Analysis)), or use variables to define partitions and cross-validation folds.

To Obtain a Nearest Neighbor Analysis Collapse Hide details

To Obtain a Nearest Neighbor Analysis

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Classify
Nearest Neighbor...

Specify one or more features, which can be thought of independent variables or predictors if there is a target.

Target (optional). If no target (dependent variable or response) is specified, then the procedure finds the k nearest neighbors only – no classification or prediction is done.

Normalize scale features. Normalized features have the same range of values, which can improve the performance of the estimation algorithm. Adjusted normalization, [2*(x−min)/(max−min)]−1, is used. Adjusted normalized values fall between −1 and 1.

Focal case identifier (optional). This allows you to mark cases of particular interest. For example, a researcher wants to determine whether the test scores from one school district – the focal case – are comparable to those from similar school districts. He uses nearest neighbor analysis to find the school districts that are most similar with respect to a given set of features. Then he compares the test scores from the focal school district to those from the nearest neighbors.

Focal cases could also be used in clinical studies to select control cases that are similar to clinical cases. Focal cases are displayed in the k nearest neighbors and distances table, feature space chart, peers chart, and quadrant map. Information on focal cases is saved to the files specified on the Output tab.

Cases with a positive value on the specified variable are treated as focal cases. It is invalid to specify a variable with no positive values.

Case label (optional). Cases are labeled using these values in the feature space chart, peers chart, and quadrant map.

This procedure pastes KNN command syntax.

See KNN Algorithms for computational details for this procedure.

Related Topics

Neighbors (Nearest Neighbor Analysis)
Features (Nearest Neighbor Analysis)
Partitions (Nearest Neighbor Analysis)
Save (Nearest Neighbor Analysis)
Output (Nearest Neighbor Analysis)
Options (Nearest Neighbor Analysis)
Model View (Nearest Neighbor Analysis)
KNN


Neighbors (Nearest Neighbor Analysis)

Nearest Neighbor Analysis,Nearest Neighbor Analysis,Nearest Neighbor Analysis
neighbors,neighbors,neighbors
Euclidean distance,Euclidean distance,Euclidean distance
in Nearest Neighbor Analysis,in Nearest Neighbor Analysis,in Nearest Neighbor Analysis
Manhattan distance,Manhattan distance,Manhattan distance
in Nearest Neighbor Analysis,in Nearest Neighbor Analysis,in Nearest Neighbor Analysis
city-block distance,city-block distance,city-block distance
in Nearest Neighbor Analysis,in Nearest Neighbor Analysis,in Nearest Neighbor Analysis
distance measures,distance measures,distance measures
in Nearest Neighbor Analysis,in Nearest Neighbor Analysis,in Nearest Neighbor Analysis

Number of Nearest Neighbors (k). Specify the number of nearest neighbors. Note that using a greater number of neighbors will not necessarily result in a more accurate model.

If a target is specified on the Variables tab, you can alternatively specify a range of values and allow the procedure to choose the "best" number of neighbors within that range. The method for determining the number of nearest neighbors depends upon whether feature selection is requested on the Features tab.

• If feature selection is in effect, then feature selection is performed for each value of k in the requested range, and the k, and accompanying feature set, with the lowest error rate (or the lowest sum-of-squares error if the target is scale) is selected.

• If feature selection is not in effect, then V-fold cross-validation is used to select the “best” number of neighbors. See the Partition tab for control over assignment of folds.

Distance Computation. This is the metric used to specify the distance metric used to measure the similarity of cases.

• Euclidean metric. The distance between two cases, x and y, is the square root of the sum, over all dimensions, of the squared differences between the values for the cases.

• City block metric. The distance between two cases is the sum, over all dimensions, of the absolute differences between the values for the cases. Also called Manhattan distance.

Optionally, if a target is specified on the Variables tab, you can choose to weight features by their normalized importance when computing distances. Feature importance for a predictor is calculated by the ratio of the error rate or sum-of-squares error of the model with the predictor removed from the model to the error rate or sum-of-squares error for the full model. Normalized importance is calculated by reweighting the feature importance values so that they sum to 1.

Predictions for Scale Target. If a scale target is specified on the Variables tab, this specifies whether the predicted value is computed based upon the mean or the median value of the nearest neighbors.

Related Topics

Nearest Neighbor Analysis
Features (Nearest Neighbor Analysis)
Partitions (Nearest Neighbor Analysis)
Save (Nearest Neighbor Analysis)
Output (Nearest Neighbor Analysis)
Options (Nearest Neighbor Analysis)
Model View (Nearest Neighbor Analysis)


Features (Nearest Neighbor Analysis)

Nearest Neighbor Analysis,Nearest Neighbor Analysis,Nearest Neighbor Analysis
feature selection,feature selection,feature selection
forward selection,forward selection,forward selection
in Nearest Neighbor Analysis,in Nearest Neighbor Analysis,in Nearest Neighbor Analysis

The Features tab allows you to request and specify options for feature selection when a target is specified on the Variables tab. By default, all features are considered for feature selection, but you can optionally select a subset of features to force into the model.

Stopping Criterion. At each step, the feature whose addition to the model results in the smallest error (computed as the error rate for a categorical target and sum of squares error for a scale target) is considered for inclusion in the model set. Forward selection continues until the specified condition is met.

• Specified Number of Features. The algorithm adds a fixed number of features in addition to those forced into the model. Specify a positive integer. Decreasing values of the number to select creates a more parsimonious model, at the risk of missing important features. Increasing values of the number to select will capture all the important features, at the risk of eventually adding features that actually increase the model error.

• Minimum Change in Absolute Error Ratio. The algorithm stops when the change in the absolute error ratio indicates that the model cannot be further improved by adding more features. Specify a positive number. Decreasing values of the minimum change will tend to include more features, at the risk of including features that don’t add much value to the model. Increasing the value of the minimum change will tend to exclude more features, at the risk of losing features that are important to the model. The “optimal” value of the minimum change will depend upon your data and application. See the Feature Selection Error Log in the output to help you assess which features are most important. See the topic Feature Selection Error Log (Nearest Neighbor Analysis) for more information.

Related Topics

Nearest Neighbor Analysis
Neighbors (Nearest Neighbor Analysis)
Partitions (Nearest Neighbor Analysis)
Save (Nearest Neighbor Analysis)
Output (Nearest Neighbor Analysis)
Options (Nearest Neighbor Analysis)
Model View (Nearest Neighbor Analysis)


Partitions (Nearest Neighbor Analysis)

Nearest Neighbor Analysis,Nearest Neighbor Analysis,Nearest Neighbor Analysis
partitions,partitions,partitions
training sample,training sample,training sample
in Nearest Neighbor Analysis,in Nearest Neighbor Analysis,in Nearest Neighbor Analysis
holdout sample,holdout sample,holdout sample
in Nearest Neighbor Analysis,in Nearest Neighbor Analysis,in Nearest Neighbor Analysis

The Partitions tab allows you to divide the dataset into training and holdout sets and, when applicable, assign cases into cross-validation folds

Training and Holdout Partitions. This group specifies the method of partitioning the active dataset into training and holdout samples. The training sample comprises the data records used to train the nearest neighbor model; some percentage of cases in the dataset must be assigned to the training sample in order to obtain a model. The holdout sample is an independent set of data records used to assess the final model; the error for the holdout sample gives an "honest" estimate of the predictive ability of the model because the holdout cases were not used to build the model.

• Randomly assign cases to partitions. Specify the percentage of cases to assign to the training sample. The rest are assigned to the holdout sample.

• Use variable to assign cases. Specify a numeric variable that assigns each case in the active dataset to the training or holdout sample. Cases with a positive value on the variable are assigned to the training sample, cases with a value of 0 or a negative value, to the holdout sample. Cases with a system-missing value are excluded from the analysis. Any user-missing values for the partition variable are always treated as valid.

Cross-Validation Folds.V-fold cross-validation is used to determine the "best" number of neighbors. It is not available in conjunction with feature selection for performance reasons.

Cross-validation divides the sample into a number of subsamples, or folds. Nearest neighbor models are then generated, excluding the data from each subsample in turn. The first model is based on all of the cases except those in the first sample fold, the second model is based on all of the cases except those in the second sample fold, and so on. For each model, the error is estimated by applying the model to the subsample excluded in generating it. The "best" number of nearest neighbors is the one which produces the lowest error across folds.

• Randomly assign cases to folds. Specify the number of folds that should be used for cross-validation. The procedure randomly assigns cases to folds, numbered from 1 to V, the number of folds.

• Use variable to assign cases. Specify a numeric variable that assigns each case in the active dataset to a fold. The variable must be numeric and take values from 1 to V. If any values in this range are missing, and on any splits if split files are in effect, this will cause an error. See the topic Split File for more information.

Set seed for Mersenne Twister. Setting a seed allows you to replicate analyses. Using this control is similar to setting the Mersenne Twister as the active generator and specifying a fixed starting point on the Random Number Generators dialog, with the important difference that setting the seed in this dialog will preserve the current state of the random number generator and restore that state after the analysis is complete. See the topic Random Number Generators for more information.

Related Topics

Nearest Neighbor Analysis
Neighbors (Nearest Neighbor Analysis)
Features (Nearest Neighbor Analysis)
Save (Nearest Neighbor Analysis)
Output (Nearest Neighbor Analysis)
Options (Nearest Neighbor Analysis)
Model View (Nearest Neighbor Analysis)


Save (Nearest Neighbor Analysis)

Nearest Neighbor Analysis,Nearest Neighbor Analysis,Nearest Neighbor Analysis
saving variables,saving variables,saving variables

Names of Saved Variables. Automatic name generation ensures that you keep all of your work. Custom names allow you to discard/replace results from previous runs without first deleting the saved variables in the Data Editor.

Variables to Save

• Predicted value or category. This saves the predicted value for a scale target or the predicted category for a categorical target.

• Predicted probability. This saves the predicted probabilities for a categorical target. A separate variable is saved for each of the first n categories, where n is specified in the Maximum categories to save for categorical target control.

• Training/Holdout partition variables. If cases are randomly assigned to the training and holdout samples on the Partitions tab, this saves the value of the partition (training or holdout) to which the case was assigned.

• Cross-validation fold variable. If cases are randomly assigned to cross-validation folds on the Partitions tab, this saves the value of the fold to which the case was assigned.

Related Topics

Nearest Neighbor Analysis
Neighbors (Nearest Neighbor Analysis)
Features (Nearest Neighbor Analysis)
Partitions (Nearest Neighbor Analysis)
Output (Nearest Neighbor Analysis)
Options (Nearest Neighbor Analysis)
Model View (Nearest Neighbor Analysis)


Output (Nearest Neighbor Analysis)

Nearest Neighbor Analysis,Nearest Neighbor Analysis,Nearest Neighbor Analysis
output,output,output

Viewer Output

• Case processing summary. Displays the case processing summary table, which summarizes the number of cases included and excluded in the analysis, in total and by training and holdout samples.

• Charts and tables. Displays model-related output, including tables and charts. Tables in the model view include k nearest neighbors and distances for focal cases, classification of categorical response variables, and an error summary. Graphical output in the model view includes a selection error log, feature importance chart, feature space chart, peers chart, and quadrant map. See the topic Model View (Nearest Neighbor Analysis) for more information.

Files

• Export model to XML. SmartScore and PASW Statistics Server (a separate product) can use this model file to apply the model information to other data files for scoring purposes. This option is not available if split files have been defined.

• Export distances between focal cases and k nearest neighbors. For each focal case, a separate variable is created for each of the focal case's k nearest neighbors (from the training sample) and the corresponding k nearest distances.

Related Topics

Nearest Neighbor Analysis
Neighbors (Nearest Neighbor Analysis)
Features (Nearest Neighbor Analysis)
Partitions (Nearest Neighbor Analysis)
Save (Nearest Neighbor Analysis)
Options (Nearest Neighbor Analysis)
Model View (Nearest Neighbor Analysis)


Options (Nearest Neighbor Analysis)

Nearest Neighbor Analysis,Nearest Neighbor Analysis,Nearest Neighbor Analysis
options,options,options
missing values,missing values,missing values
in Nearest Neighbor Analysis,in Nearest Neighbor Analysis,in Nearest Neighbor Analysis

User-Missing Values. Categorical variables must have valid values for a case to be included in the analysis. These controls allow you to decide whether user-missing values are treated as valid among categorical variables.

System-missing values and missing values for scale variables are always treated as invalid.

Related Topics

Nearest Neighbor Analysis
Neighbors (Nearest Neighbor Analysis)
Features (Nearest Neighbor Analysis)
Partitions (Nearest Neighbor Analysis)
Save (Nearest Neighbor Analysis)
Output (Nearest Neighbor Analysis)
Model View (Nearest Neighbor Analysis)


Model View (Nearest Neighbor Analysis)

Nearest Neighbor Analysis,Nearest Neighbor Analysis,Nearest Neighbor Analysis
model view,model view,model view
model view,model view,model view
in Nearest Neighbor Analysis,in Nearest Neighbor Analysis,in Nearest Neighbor Analysis

When you select Charts and tables in the Output tab, the procedure creates a Nearest Neighbor Model object in the Viewer. By activating (double-clicking) this object, you gain an interactive view of the model. The model view has a 2-panel window:

• The first panel displays an overview of the model called the main view.

• The second panel displays one of two types of views:

An auxiliary model view shows more information about the model, but is not focused on the model itself.

A linked view is a view that shows details about one feature of the model when the user drills down on part of the main view.

By default, the first panel shows the feature space and the second panel shows the variable importance chart. If the variable importance chart is not available; that is, when Weight features by importance was not selected on the Features tab, the first available view in the View dropdown is shown.

When a view has no available information, its item text in the View dropdown is disabled.

For general information on Model objects, see Models.

Related Topics

Nearest Neighbor Analysis
Neighbors (Nearest Neighbor Analysis)
Features (Nearest Neighbor Analysis)
Partitions (Nearest Neighbor Analysis)
Save (Nearest Neighbor Analysis)
Output (Nearest Neighbor Analysis)
Options (Nearest Neighbor Analysis)
Feature Space (Nearest Neighbor Analysis)
Adding and Removing Fields/Variables
Variable Importance (Nearest Neighbor Analysis)
Peers (Nearest Neighbor Analysis)
Nearest Neighbor Distances (Nearest Neighbor Analysis)
Quadrant Map (Nearest Neighbor Analysis)
Feature Selection Error Log (Nearest Neighbor Analysis)
k Selection Error Log (Nearest Neighbor Analysis)
k and Feature Selection Error Log (Nearest Neighbor Analysis)
Classification Table (Nearest Neighbor Analysis)
Error Summary (Nearest Neighbor Analysis)


Feature Space (Nearest Neighbor Analysis)

feature space chart,feature space chart,feature space chart
in Nearest Neighbor Analysis,in Nearest Neighbor Analysis,in Nearest Neighbor Analysis

The feature space chart is an interactive graph of the feature space (or a subspace, if there are more than 3 features). Each axis represents a feature in the model, and the location of points in the chart show the values of these features for cases in the training and holdout partitions.

Keys. In addition to the feature values, points in the plot convey other information.

• Shape indicates the partition to which a point belongs, either Training or Holdout.

• The color/shading of a point indicates the value of the target for that case; with distinct color values equal to the categories of a categorical target, and shades indicating the range of values of a continuous target. The indicated value for the training partition is the observed value; for the holdout partition, it is the predicted value. If no target is specified, this key is not shown.

• Heavier outlines indicate a case is focal. Focal cases are shown linked to their k nearest neighbors.

Controls and Interactivity. A number of controls in the chart allow you explore the Feature Space.

• You can choose which subset of features to show in the chart and change which features are represented on the dimensions.

• “Focal cases” are simply points selected in the Feature Space chart. If you specified a focal case variable, the points representing the focal cases will initially be selected. However, any point can temporarily become a focal case if you select it. The “usual” controls for point selection apply; clicking on a point selects that point and deselects all others; Control-clicking on a point adds it to the set of selected points. Linked views, such as the Peers Chart, will automatically update based upon the cases selected in the Feature Space.

• You can change the number of nearest neighbors (k) to display for focal cases.

• Hovering over a point in the chart displays a tooltip with the value of the case label, or case number if case labels are not defined, and the observed and predicted target values.

• A “Reset” button allows you to return the Feature Space to its original state.

Related Topics

Model View (Nearest Neighbor Analysis)
Adding and Removing Fields/Variables
Variable Importance (Nearest Neighbor Analysis)
Peers (Nearest Neighbor Analysis)
Nearest Neighbor Distances (Nearest Neighbor Analysis)
Quadrant Map (Nearest Neighbor Analysis)
Feature Selection Error Log (Nearest Neighbor Analysis)
k Selection Error Log (Nearest Neighbor Analysis)
k and Feature Selection Error Log (Nearest Neighbor Analysis)
Classification Table (Nearest Neighbor Analysis)
Error Summary (Nearest Neighbor Analysis)


Adding and Removing Fields/Variables

You can add new fields/variables to the feature space or remove the ones that are currently displayed.

Variables Palette

Variables Palette Collapse Hide details
Variables palette

The Variables palette must be displayed before you can add and remove variables. To display the Variables palette, the Model Viewer must be in Edit mode and a case must be selected in the feature space.

To put the Model Viewer in Edit mode, from the menus choose:

View
Edit Mode

Once in Edit Mode, click on any case in the feature space.

To display the Variables palette, from the menus choose:

View
Palettes
Variables

The Variables palette lists all of the variables in the feature space. The icon next to the variable name indicates the variable's measurement level.

To temporarily change a variable's measurement level, right click the variable in the variables palette and choose an option.

Variable Zones

Variables are added to "zones" in the feature space. To display the zones, start dragging a variable from the Variables palette or select Show zones.

Variable Zones Collapse Hide details
Variable zones

The feature space has zones for the x, y, and z axes.

Moving Variables into Zones

Here are some general rules for and tips for moving variables into zones:

• To move a variable into a zone, click and drag the variable from the Variables palette and drop it into the zone. If you choose Show zones, you can also right-click a zone and select a variable that you want to add to the zone.

• If you drag a variable from the Variables palette to a zone already occupied by another variable, the old variable is replaced with the new.

• If you drag a variable from one zone to a zone already occupied by another variable, the variables swap positions.

• Clicking the X in a zone removes the variable from that zone.

• If there are multiple graphic elements in the visualization, each graphic element can have its own associated variable zones. First select the desired graphic element.

Related Topics

Model View (Nearest Neighbor Analysis)
Feature Space (Nearest Neighbor Analysis)
Variable Importance (Nearest Neighbor Analysis)
Peers (Nearest Neighbor Analysis)
Nearest Neighbor Distances (Nearest Neighbor Analysis)
Quadrant Map (Nearest Neighbor Analysis)
Feature Selection Error Log (Nearest Neighbor Analysis)
k Selection Error Log (Nearest Neighbor Analysis)
k and Feature Selection Error Log (Nearest Neighbor Analysis)
Classification Table (Nearest Neighbor Analysis)
Error Summary (Nearest Neighbor Analysis)


Variable Importance (Nearest Neighbor Analysis)

variable importance,variable importance,variable importance
in Nearest Neighbor Analysis,in Nearest Neighbor Analysis,in Nearest Neighbor Analysis

Typically, you will want to focus your modeling efforts on the variables that matter most and consider dropping or ignoring those that matter least. The variable importance chart helps you do this by indicating the relative importance of each variable in estimating the model. Since the values are relative, the sum of the values for all variables on the display is 1.0. Variable importance does not relate to model accuracy. It just relates to the importance of each variable in making a prediction, not whether or not the prediction is accurate.

Related Topics

Model View (Nearest Neighbor Analysis)
Feature Space (Nearest Neighbor Analysis)
Adding and Removing Fields/Variables
Peers (Nearest Neighbor Analysis)
Nearest Neighbor Distances (Nearest Neighbor Analysis)
Quadrant Map (Nearest Neighbor Analysis)
Feature Selection Error Log (Nearest Neighbor Analysis)
k Selection Error Log (Nearest Neighbor Analysis)
k and Feature Selection Error Log (Nearest Neighbor Analysis)
Classification Table (Nearest Neighbor Analysis)
Error Summary (Nearest Neighbor Analysis)


Peers (Nearest Neighbor Analysis)

peers,peers,peers
in Nearest Neighbor Analysis,in Nearest Neighbor Analysis,in Nearest Neighbor Analysis

This chart displays the focal cases and their k nearest neighbors on each feature and on the target. It is available if a focal case is selected in the Feature Space.

Linking Behavior. The Peers chart is linked to the Feature Space in two ways.

• Cases selected (focal) in the Feature Space are displayed in the Peers chart, along with their k nearest neighbors.

• The value of k selected in the Feature Space is used in the Peers chart.

Related Topics

Model View (Nearest Neighbor Analysis)
Feature Space (Nearest Neighbor Analysis)
Adding and Removing Fields/Variables
Variable Importance (Nearest Neighbor Analysis)
Nearest Neighbor Distances (Nearest Neighbor Analysis)
Quadrant Map (Nearest Neighbor Analysis)
Feature Selection Error Log (Nearest Neighbor Analysis)
k Selection Error Log (Nearest Neighbor Analysis)
k and Feature Selection Error Log (Nearest Neighbor Analysis)
Classification Table (Nearest Neighbor Analysis)
Error Summary (Nearest Neighbor Analysis)


Nearest Neighbor Distances (Nearest Neighbor Analysis)

nearest neighbor distances,nearest neighbor distances,nearest neighbor distances
in Nearest Neighbor Analysis,in Nearest Neighbor Analysis,in Nearest Neighbor Analysis

This table displays the k nearest neighbors and distances for focal cases only. It is available if a focal case identifier is specified on the Variables tab, and only displays focal cases identified by this variable.

Each row of:

• The Focal Case column contains the value of the case labeling variable for the focal case; if case labels are not defined, this column contains the case number of the focal case.

• The ith column under the Nearest Neighbors group contains the value of the case labeling variable for the ith nearest neighbor of the focal case; if case labels are not defined, this column contains the case number of the ith nearest neighbor of the focal case.

• The ith column under the Nearest Distances group contains the distance of the ith nearest neighbor to the focal case

Related Topics

Model View (Nearest Neighbor Analysis)
Feature Space (Nearest Neighbor Analysis)
Adding and Removing Fields/Variables
Variable Importance (Nearest Neighbor Analysis)
Peers (Nearest Neighbor Analysis)
Quadrant Map (Nearest Neighbor Analysis)
Feature Selection Error Log (Nearest Neighbor Analysis)
k Selection Error Log (Nearest Neighbor Analysis)
k and Feature Selection Error Log (Nearest Neighbor Analysis)
Classification Table (Nearest Neighbor Analysis)
Error Summary (Nearest Neighbor Analysis)


Quadrant Map (Nearest Neighbor Analysis)

quadrant map,quadrant map,quadrant map
in Nearest Neighbor Analysis,in Nearest Neighbor Analysis,in Nearest Neighbor Analysis

This chart displays the focal cases and their k nearest neighbors on a scatterplot (or dotplot, depending upon the measurement level of the target) with the target on the y-axis and a scale feature on the x-axis, paneled by features. It is available if there is a target and if a focal case is selected in the Feature Space.

• Reference lines are drawn for continuous variables, at the variable means in the training partition.

Related Topics

Model View (Nearest Neighbor Analysis)
Feature Space (Nearest Neighbor Analysis)
Adding and Removing Fields/Variables
Variable Importance (Nearest Neighbor Analysis)
Peers (Nearest Neighbor Analysis)
Nearest Neighbor Distances (Nearest Neighbor Analysis)
Feature Selection Error Log (Nearest Neighbor Analysis)
k Selection Error Log (Nearest Neighbor Analysis)
k and Feature Selection Error Log (Nearest Neighbor Analysis)
Classification Table (Nearest Neighbor Analysis)
Error Summary (Nearest Neighbor Analysis)


Feature Selection Error Log (Nearest Neighbor Analysis)

feature selection,feature selection,feature selection
in Nearest Neighbor Analysis,in Nearest Neighbor Analysis,in Nearest Neighbor Analysis

Points on the chart display the error (either the error rate or sum-of-squares error, depending upon the measurement level of the target) on the y-axis for the model with the feature listed on the x-axis (plus all features to the left on the x-axis). This chart is available if there is a target and feature selection is in effect.

Related Topics

Model View (Nearest Neighbor Analysis)
Feature Space (Nearest Neighbor Analysis)
Adding and Removing Fields/Variables
Variable Importance (Nearest Neighbor Analysis)
Peers (Nearest Neighbor Analysis)
Nearest Neighbor Distances (Nearest Neighbor Analysis)
Quadrant Map (Nearest Neighbor Analysis)
k Selection Error Log (Nearest Neighbor Analysis)
k and Feature Selection Error Log (Nearest Neighbor Analysis)
Classification Table (Nearest Neighbor Analysis)
Error Summary (Nearest Neighbor Analysis)


k Selection Error Log (Nearest Neighbor Analysis)

k selection,k selection,k selection
in Nearest Neighbor Analysis,in Nearest Neighbor Analysis,in Nearest Neighbor Analysis

Points on the chart display the error (either the error rate or sum-of-squares error, depending upon the measurement level of the target) on the y-axis for the model with the number of nearest neighbors (k) on the x-axis. This chart is available if there is a target and k selection is in effect.

Related Topics

Model View (Nearest Neighbor Analysis)
Feature Space (Nearest Neighbor Analysis)
Adding and Removing Fields/Variables
Variable Importance (Nearest Neighbor Analysis)
Peers (Nearest Neighbor Analysis)
Nearest Neighbor Distances (Nearest Neighbor Analysis)
Quadrant Map (Nearest Neighbor Analysis)
Feature Selection Error Log (Nearest Neighbor Analysis)
k and Feature Selection Error Log (Nearest Neighbor Analysis)
Classification Table (Nearest Neighbor Analysis)
Error Summary (Nearest Neighbor Analysis)


k and Feature Selection Error Log (Nearest Neighbor Analysis)

k and feature selection,k and feature selection,k and feature selection
in Nearest Neighbor Analysis,in Nearest Neighbor Analysis,in Nearest Neighbor Analysis

These are feature selection charts (see Feature Selection Error Log (Nearest Neighbor Analysis)), paneled by k. This chart is available if there is a target and k and feature selection are both in effect.

Related Topics

Model View (Nearest Neighbor Analysis)
Feature Space (Nearest Neighbor Analysis)
Adding and Removing Fields/Variables
Variable Importance (Nearest Neighbor Analysis)
Peers (Nearest Neighbor Analysis)
Nearest Neighbor Distances (Nearest Neighbor Analysis)
Quadrant Map (Nearest Neighbor Analysis)
Feature Selection Error Log (Nearest Neighbor Analysis)
k Selection Error Log (Nearest Neighbor Analysis)
Classification Table (Nearest Neighbor Analysis)
Error Summary (Nearest Neighbor Analysis)


Classification Table (Nearest Neighbor Analysis)

classification table,classification table,classification table
in Nearest Neighbor Analysis,in Nearest Neighbor Analysis,in Nearest Neighbor Analysis

This table displays the cross-classification of observed versus predicted values of the target, by partition. It is available if there is a target and it is categorical.

• The (Missing) row in the Holdout partition contains holdout cases with missing values on the target. These cases contribute to the Holdout Sample: Overall Percent values but not to the Percent Correct values.

Related Topics

Model View (Nearest Neighbor Analysis)
Feature Space (Nearest Neighbor Analysis)
Adding and Removing Fields/Variables
Variable Importance (Nearest Neighbor Analysis)
Peers (Nearest Neighbor Analysis)
Nearest Neighbor Distances (Nearest Neighbor Analysis)
Quadrant Map (Nearest Neighbor Analysis)
Feature Selection Error Log (Nearest Neighbor Analysis)
k Selection Error Log (Nearest Neighbor Analysis)
k and Feature Selection Error Log (Nearest Neighbor Analysis)
Error Summary (Nearest Neighbor Analysis)


Error Summary (Nearest Neighbor Analysis)

error summary,error summary,error summary
in Nearest Neighbor Analysis,in Nearest Neighbor Analysis,in Nearest Neighbor Analysis

This table is available if there is a target variable. It displays the error associated with the model; sum-of-squares for a continuous target and the error rate (100% − overall percent correct) for a categorical target.

Related Topics

Model View (Nearest Neighbor Analysis)
Feature Space (Nearest Neighbor Analysis)
Adding and Removing Fields/Variables
Variable Importance (Nearest Neighbor Analysis)
Peers (Nearest Neighbor Analysis)
Nearest Neighbor Distances (Nearest Neighbor Analysis)
Quadrant Map (Nearest Neighbor Analysis)
Feature Selection Error Log (Nearest Neighbor Analysis)
k Selection Error Log (Nearest Neighbor Analysis)
k and Feature Selection Error Log (Nearest Neighbor Analysis)
Classification Table (Nearest Neighbor Analysis)


Discriminant Analysis

Discriminant Analysis,Discriminant Analysis,Discriminant Analysis
grouping variables,grouping variables,grouping variables
Discriminant Analysis,Discriminant Analysis,Discriminant Analysis
independent variables,independent variables,independent variables
Discriminant Analysis,Discriminant Analysis,Discriminant Analysis
stepwise methods,stepwise methods,stepwise methods
Discriminant Analysis,Discriminant Analysis,Discriminant Analysis
example,example,example
Discriminant Analysis,Discriminant Analysis,Discriminant Analysis
statistics,statistics,statistics
Discriminant Analysis,Discriminant Analysis,Discriminant Analysis

Discriminant analysis builds a predictive model for group membership. The model is composed of a discriminant function (or, for more than two groups, a set of discriminant functions) based on linear combinations of the predictor variables that provide the best discrimination between the groups. The functions are generated from a sample of cases for which group membership is known; the functions can then be applied to new cases that have measurements for the predictor variables but have unknown group membership.

Note: The grouping variable can have more than two values. The codes for the grouping variable must be integers, however, and you need to specify their minimum and maximum values. Cases with values outside of these bounds are excluded from the analysis.

Example. On average, people in temperate zone countries consume more calories per day than people in the tropics, and a greater proportion of the people in the temperate zones are city dwellers. A researcher wants to combine this information into a function to determine how well an individual can discriminate between the two groups of countries. The researcher thinks that population size and economic information may also be important. Discriminant analysis allows you to estimate coefficients of the linear discriminant function, which looks like the right side of a multiple linear regression equation. That is, using coefficients a, b, c, and d, the function is:

D = a * climate + b * urban + c * population + d * gross domestic product per capita

If these variables are useful for discriminating between the two climate zones, the values of D will differ for the temperate and tropic countries. If you use a stepwise variable selection method, you may find that you do not need to include all four variables in the function.

Statistics. For each variable: means, standard deviations, univariate ANOVA. For each analysis: Box's M, within-groups correlation matrix, within-groups covariance matrix, separate-groups covariance matrix, total covariance matrix. For each canonical discriminant function: eigenvalue, percentage of variance, canonical correlation, Wilks' lambda, chi-square. For each step: prior probabilities, Fisher's function coefficients, unstandardized function coefficients, Wilks' lambda for each canonical function.

Show me

Discriminant Analysis Data Considerations Collapse Hide details

Data. The grouping variable must have a limited number of distinct categories, coded as integers. Independent variables that are nominal must be recoded to dummy or contrast variables.

Assumptions. Cases should be independent. Predictor variables should have a multivariate normal distribution, and within-group variance-covariance matrices should be equal across groups. Group membership is assumed to be mutually exclusive (that is, no case belongs to more than one group) and collectively exhaustive (that is, all cases are members of a group). The procedure is most effective when group membership is a truly categorical variable; if group membership is based on values of a continuous variable (for example, high IQ versus low IQ), consider using linear regression to take advantage of the richer information that is offered by the continuous variable itself.

To Obtain a Discriminant Analysis Collapse Hide details

To Obtain a Discriminant Analysis

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Classify
Discriminant...

Select an integer-valued grouping variable and click Define Range to specify the categories of interest.

Select the independent, or predictor, variables. (If your grouping variable does not have integer values, Automatic Recode on the Transform menu will create a variable that does.)

Select the method for entering the independent variables.

• Enter independents together. Simultaneously enters all independent variables that satisfy tolerance criteria.

• Use stepwise method. Uses stepwise analysis to control variable entry and removal.

Optionally, select cases with a selection variable.

This procedure pastes DISCRIMINANT command syntax.

See DISCRIMINANT Algorithms for computational details for this procedure.

Related Topics

DISCRIMINANT
Discriminant Analysis: Related Procedures
Discriminant Analysis Define Range
Discriminant Analysis Select Cases
Discriminant Analysis Statistics
Discriminant Analysis Stepwise Method
Discriminant Analysis Classification
Discriminant Analysis Save


Discriminant Analysis Define Range

Discriminant Analysis,Discriminant Analysis,Discriminant Analysis
defining ranges,defining ranges,defining ranges

Specify the minimum and maximum value of the grouping variable for the analysis. Cases with values outside of this range are not used in the discriminant analysis but are classified into one of the existing groups based on the results of the analysis. The minimum and maximum values must be integers.

Defining a Range Collapse Hide details

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Classify
Discriminant...

Select a Grouping Variable and then click Define Range.

Related Topics

Discriminant Analysis: Related Procedures
Discriminant Analysis
Discriminant Analysis Select Cases
Discriminant Analysis Statistics
Discriminant Analysis Stepwise Method
Discriminant Analysis Classification
Discriminant Analysis Save


Discriminant Analysis Select Cases

Discriminant Analysis,Discriminant Analysis,Discriminant Analysis
selecting cases,selecting cases,selecting cases

To select cases for your analysis:

In the Discriminant Analysis dialog box, choose a selection variable.

Click Value to enter an integer as the selection value.

Only cases with the specified value for the selection variable are used to derive the discriminant functions. Statistics and classification results are generated for both selected and unselected cases. This process provides a mechanism for classifying new cases based on previously existing data or for partitioning your data into training and testing subsets to perform validation on the model generated.

Setting a Value Collapse Hide details

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Classify
Discriminant...

Click Select.

Choose a Selection Variable and then click Value.

Related Topics

Discriminant Analysis: Related Procedures
Discriminant Analysis
Discriminant Analysis Define Range
Discriminant Analysis Statistics
Discriminant Analysis Stepwise Method
Discriminant Analysis Classification
Discriminant Analysis Save


Discriminant Analysis Statistics

Discriminant Analysis,Discriminant Analysis,Discriminant Analysis
statistics,statistics,statistics
Discriminant Analysis,Discriminant Analysis,Discriminant Analysis
function coefficients,function coefficients,function coefficients
Discriminant Analysis,Discriminant Analysis,Discriminant Analysis
matrices,matrices,matrices
Discriminant Analysis,Discriminant Analysis,Discriminant Analysis
descriptive statistics,descriptive statistics,descriptive statistics
Box's M test,Box's M test,Box's M test
in Discriminant Analysis,in Discriminant Analysis,in Discriminant Analysis
correlation matrix,correlation matrix,correlation matrix
in Discriminant Analysis,in Discriminant Analysis,in Discriminant Analysis
covariance matrix,covariance matrix,covariance matrix
in Discriminant Analysis,in Discriminant Analysis,in Discriminant Analysis

Descriptives. Available options are means (including standard deviations), univariate ANOVAs, and Box's M test.

Expand Show details Collapse Hide details

• Means. Displays total and group means, as well as standard deviations for the independent variables.

• Univariate ANOVAs. Performs a one-way analysis-of-variance test for equality of group means for each independent variable.

• Box's M. A test for the equality of the group covariance matrices. For sufficiently large samples, a nonsignificant p value means there is insufficient evidence that the matrices differ. The test is sensitive to departures from multivariate normality.

Function Coefficients. Available options are Fisher's classification coefficients and unstandardized coefficients.

Expand Show details Collapse Hide details

• Fisher's. Displays Fisher's classification function coefficients that can be used directly for classification. A separate set of classification function coefficients is obtained for each group, and a case is assigned to the group for which it has the largest discriminant score (classification function value).

• Unstandardized. Displays the unstandardized discriminant function coefficients.

Matrices. Available matrices of coefficients for independent variables are within-groups correlation matrix, within-groups covariance matrix, separate-groups covariance matrix, and total covariance matrix.

Expand Show details Collapse Hide details

• Within-groups correlation. Displays a pooled within-groups correlation matrix that is obtained by averaging the separate covariance matrices for all groups before computing the correlations.

• Within-groups covariance. Displays a pooled within-groups covariance matrix, which may differ from the total covariance matrix. The matrix is obtained by averaging the separate covariance matrices for all groups.

• Separate-groups covariance. Displays separate covariance matrices for each group.

• Total covariance. Displays a covariance matrix from all cases as if they were from a single sample.

Choosing Statistics for a Discriminant Analysis Collapse Hide details

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Classify
Discriminant...

In the Discriminant Analysis dialog box, click Statistics.

Related Topics

Discriminant Analysis: Related Procedures
Discriminant Analysis
Discriminant Analysis Define Range
Discriminant Analysis Select Cases
Discriminant Analysis Stepwise Method
Discriminant Analysis Classification
Discriminant Analysis Save


Discriminant Analysis Stepwise Method

Discriminant Analysis,Discriminant Analysis,Discriminant Analysis
discriminant methods,discriminant methods,discriminant methods
Discriminant Analysis,Discriminant Analysis,Discriminant Analysis
Wilks' lambda,Wilks' lambda,Wilks' lambda
Discriminant Analysis,Discriminant Analysis,Discriminant Analysis
Mahalanobis distance,Mahalanobis distance,Mahalanobis distance
Discriminant Analysis,Discriminant Analysis,Discriminant Analysis
Rao's V,Rao's V,Rao's V
Discriminant Analysis,Discriminant Analysis,Discriminant Analysis
display options,display options,display options
Discriminant Analysis,Discriminant Analysis,Discriminant Analysis
criteria,criteria,criteria
Wilks' lambda,Wilks' lambda,Wilks' lambda
in Discriminant Analysis,in Discriminant Analysis,in Discriminant Analysis
Mahalanobis distance,Mahalanobis distance,Mahalanobis distance
in Discriminant Analysis,in Discriminant Analysis,in Discriminant Analysis
Rao's V,Rao's V,Rao's V
in Discriminant Analysis,in Discriminant Analysis,in Discriminant Analysis

Method. Select the statistic to be used for entering or removing new variables. Available alternatives are Wilks' lambda, unexplained variance, Mahalanobis distance, smallest F ratio, and Rao's V. With Rao's V, you can specify the minimum increase in V for a variable to enter.

Expand Show details Collapse Hide details

• Wilks' lambda. A variable selection method for stepwise discriminant analysis that chooses variables for entry into the equation on the basis of how much they lower Wilks' lambda. At each step, the variable that minimizes the overall Wilks' lambda is entered.

• Unexplained variance. At each step, the variable that minimizes the sum of the unexplained variation between groups is entered.

• Mahalanobis distance. A measure of how much a case's values on the independent variables differ from the average of all cases. A large Mahalanobis distance identifies a case as having extreme values on one or more of the independent variables.

• Smallest F ratio. A method of variable selection in stepwise analysis based on maximizing an F ratio computed from the Mahalanobis distance between groups.

• Rao's V. A measure of the differences between group means. Also called the Lawley-Hotelling trace. At each step, the variable that maximizes the increase in Rao's V is entered. After selecting this option, enter the minimum value a variable must have to enter the analysis.

Criteria. Available alternatives are Use F value and Use probability of F. Enter values for entering and removing variables.

Expand Show details Collapse Hide details

• Use F value. A variable is entered into the model if its F value is greater than the Entry value and is removed if the F value is less than the Removal value. Entry must be greater than Removal, and both values must be positive. To enter more variables into the model, lower the Entry value. To remove more variables from the model, increase the Removal value.

• Use probability of F. A variable is entered into the model if the significance level of its F value is less than the Entry value and is removed if the significance level is greater than the Removal value. Entry must be less than Removal, and both values must be positive. To enter more variables into the model, increase the Entry value. To remove more variables from the model, lower the Removal value.

Display. Summary of steps displays statistics for all variables after each step; F for pairwise distances displays a matrix of pairwise F ratios for each pair of groups.

Selecting Stepwise Method Options Collapse Hide details

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Classify
Discriminant...

Select Use stepwise method and then click Method.

Related Topics

Discriminant Analysis: Related Procedures
Discriminant Analysis
Discriminant Analysis Define Range
Discriminant Analysis Select Cases
Discriminant Analysis Statistics
Discriminant Analysis Classification
Discriminant Analysis Save


Discriminant Analysis Classification

Discriminant Analysis,Discriminant Analysis,Discriminant Analysis
prior probabilities,prior probabilities,prior probabilities
Discriminant Analysis,Discriminant Analysis,Discriminant Analysis
plots,plots,plots
Discriminant Analysis,Discriminant Analysis,Discriminant Analysis
display options,display options,display options
Discriminant Analysis,Discriminant Analysis,Discriminant Analysis
missing values,missing values,missing values
Discriminant Analysis,Discriminant Analysis,Discriminant Analysis
covariance matrix,covariance matrix,covariance matrix
covariance matrix,covariance matrix,covariance matrix
in Discriminant Analysis,in Discriminant Analysis,in Discriminant Analysis

Prior Probabilities. This option determines whether the classification coefficients are adjusted for a priori knowledge of group membership.

Expand Show details Collapse Hide details

• All groups equal. Equal prior probabilities are assumed for all groups; this has no effect on the coefficients.

• Compute from group sizes. The observed group sizes in your sample determine the prior probabilities of group membership. For example, if 50% of the observations included in the analysis fall into the first group, 25% in the second, and 25% in the third, the classification coefficients are adjusted to increase the likelihood of membership in the first group relative to the other two.

Display. Available display options are casewise results, summary table, and leave-one-out classification.

Expand Show details Collapse Hide details

• Casewise results. Codes for actual group, predicted group, posterior probabilities, and discriminant scores are displayed for each case.

• Summary table. The number of cases correctly and incorrectly assigned to each of the groups based on the discriminant analysis. Sometimes called the "Confusion Matrix."

• Leave-one-out classification. Each case in the analysis is classified by the functions derived from all cases other than that case. It is also known as the "U-method."

Replace missing values with mean. Select this option to substitute the mean of an independent variable for a missing value during the classification phase only.

Use Covariance Matrix. You can choose to classify cases using a within-groups covariance matrix or a separate-groups covariance matrix.

Expand Show details Collapse Hide details

• Within-groups. The pooled within-groups covariance matrix is used to classify cases.

• Separate-groups. Separate-groups covariance matrices are used for classification. Because classification is based on the discriminant functions (not based on the original variables), this option is not always equivalent to quadratic discrimination.

Plots. Available plot options are combined-groups, separate-groups, and territorial map.

Expand Show details Collapse Hide details

• Combined-groups. Creates an all-groups scatterplot of the first two discriminant function values. If there is only one function, a histogram is displayed instead.

• Separate-groups. Creates separate-group scatterplots of the first two discriminant function values. If there is only one function, histograms are displayed instead.

• Territorial map. A plot of the boundaries used to classify cases into groups based on function values. The numbers correspond to groups into which cases are classified. The mean for each group is indicated by an asterisk within its boundaries. The map is not displayed if there is only one discriminant function.

Choosing Classification Options Collapse Hide details

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Classify
Discriminant…

In the Discriminant Analysis dialog box, click Classify.

Related Topics

Discriminant Analysis: Related Procedures
Discriminant Analysis
Discriminant Analysis Define Range
Discriminant Analysis Select Cases
Discriminant Analysis Statistics
Discriminant Analysis Stepwise Method
Discriminant Analysis Save


Discriminant Analysis Save

Discriminant Analysis,Discriminant Analysis,Discriminant Analysis
saving classification variables,saving classification variables,saving classification variables
Discriminant Analysis,Discriminant Analysis,Discriminant Analysis
exporting model information,exporting model information,exporting model information

You can add new variables to your active data file. Available options are predicted group membership (a single variable), discriminant scores (one variable for each discriminant function in the solution), and probabilities of group membership given the discriminant scores (one variable for each group).

You can also export model information to the specified file in XML (PMML) format. SmartScore and PASW Statistics Server (a separate product) can use this model file to apply the model information to other data files for scoring purposes.

Specifying Save Options Collapse Hide details

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Classify
Discriminant...

In the Discriminant Analysis dialog box, click Save.

Related Topics

Discriminant Analysis: Related Procedures
Discriminant Analysis
Discriminant Analysis Define Range
Discriminant Analysis Select Cases
Discriminant Analysis Statistics
Discriminant Analysis Stepwise Method
Discriminant Analysis Classification


DISCRIMINANT Command Additional Features

Discriminant Analysis,Discriminant Analysis,Discriminant Analysis
command additional features,command additional features,command additional features

The command syntax language also allows you to:

• Perform multiple discriminant analyses (with one command) and control the order in which variables are entered (with the ANALYSIS subcommand).

• Specify prior probabilities for classification (with the PRIORS subcommand).

• Display rotated pattern and structure matrices (with the ROTATE subcommand).

• Limit the number of extracted discriminant functions (with the FUNCTIONS subcommand).

• Restrict classification to the cases that are selected (or unselected) for the analysis (with the SELECT subcommand).

• Read and analyze a correlation matrix (with the MATRIX subcommand).

• Write a correlation matrix for later analysis (with the MATRIX subcommand).

Related Topics

DISCRIMINANT


Factor Analysis

correlation matrix,correlation matrix,correlation matrix
in Factor Analysis,in Factor Analysis,in Factor Analysis
principal components analysis,principal components analysis,principal components analysis
Factor Analysis,Factor Analysis,Factor Analysis
Factor Analysis,Factor Analysis,Factor Analysis
overview,overview,overview
Factor Analysis,Factor Analysis,Factor Analysis
example,example,example
Factor Analysis,Factor Analysis,Factor Analysis
statistics,statistics,statistics
pattern matrix,pattern matrix,pattern matrix
in Factor Analysis,in Factor Analysis,in Factor Analysis
transformation matrix,transformation matrix,transformation matrix
in Factor Analysis,in Factor Analysis,in Factor Analysis

Factor analysis attempts to identify underlying variables, or factors, that explain the pattern of correlations within a set of observed variables. Factor analysis is often used in data reduction to identify a small number of factors that explain most of the variance that is observed in a much larger number of manifest variables. Factor analysis can also be used to generate hypotheses regarding causal mechanisms or to screen variables for subsequent analysis (for example, to identify collinearity prior to performing a linear regression analysis).

The factor analysis procedure offers a high degree of flexibility:

• Seven methods of factor extraction are available.

• Five methods of rotation are available, including direct oblimin and promax for nonorthogonal rotations.

• Three methods of computing factor scores are available, and scores can be saved as variables for further analysis.

Example. What underlying attitudes lead people to respond to the questions on a political survey as they do? Examining the correlations among the survey items reveals that there is significant overlap among various subgroups of items--questions about taxes tend to correlate with each other, questions about military issues correlate with each other, and so on. With factor analysis, you can investigate the number of underlying factors and, in many cases, identify what the factors represent conceptually. Additionally, you can compute factor scores for each respondent, which can then be used in subsequent analyses. For example, you might build a logistic regression model to predict voting behavior based on factor scores.

Statistics. For each variable: number of valid cases, mean, and standard deviation. For each factor analysis: correlation matrix of variables, including significance levels, determinant, and inverse; reproduced correlation matrix, including anti-image; initial solution (communalities, eigenvalues, and percentage of variance explained); Kaiser-Meyer-Olkin measure of sampling adequacy and Bartlett's test of sphericity; unrotated solution, including factor loadings, communalities, and eigenvalues; and rotated solution, including rotated pattern matrix and transformation matrix. For oblique rotations: rotated pattern and structure matrices; factor score coefficient matrix and factor covariance matrix. Plots: scree plot of eigenvalues and loading plot of first two or three factors.

Show me

Factor Analysis Data Considerations Collapse Hide details

Data. The variables should be quantitative at the interval or ratio level. Categorical data (such as religion or country of origin) are not suitable for factor analysis. Data for which Pearson correlation coefficients can sensibly be calculated should be suitable for factor analysis.

Assumptions. The data should have a bivariate normal distribution for each pair of variables, and observations should be independent. The factor analysis model specifies that variables are determined by common factors (the factors estimated by the model) and unique factors (which do not overlap between observed variables); the computed estimates are based on the assumption that all unique factors are uncorrelated with each other and with the common factors.

To Obtain a Factor Analysis Collapse Hide details

To Obtain a Factor Analysis

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Dimension Reduction
Factor...

Select the variables for the factor analysis.

This procedure pastes FACTOR command syntax.

See FACTOR Algorithms for computational details for this procedure.

Related Topics

Factor Analysis: Related Procedures
Factor Analysis Select Cases
Factor Analysis Descriptives
Factor Analysis Extraction
Factor Analysis Rotation
Factor Analysis Scores
Factor Analysis Options
FACTOR


Factor Analysis Select Cases

Factor Analysis,Factor Analysis,Factor Analysis
selecting cases,selecting cases,selecting cases

To select cases for your analysis:

Choose a selection variable.

Click Value to enter an integer as the selection value.

Only cases with that value for the selection variable are used in the factor analysis.

Setting a Value Collapse Hide details

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Dimension Reduction
Factor...

Click Select.

Choose a selection variable and then click Value.

Related Topics

Factor Analysis: Related Procedures
Factor Analysis
Factor Analysis Descriptives
Factor Analysis Extraction
Factor Analysis Rotation
Factor Analysis Scores
Factor Analysis Options


Factor Analysis Descriptives

Factor Analysis,Factor Analysis,Factor Analysis
descriptives,descriptives,descriptives
Factor Analysis,Factor Analysis,Factor Analysis
statistics,statistics,statistics
Bartlett's test of sphericity,Bartlett's test of sphericity,Bartlett's test of sphericity
in Factor Analysis,in Factor Analysis,in Factor Analysis
correlation matrix,correlation matrix,correlation matrix
in Factor Analysis,in Factor Analysis,in Factor Analysis
eigenvalues,eigenvalues,eigenvalues
in Factor Analysis,in Factor Analysis,in Factor Analysis

Statistics. Univariate descriptives includes the mean, standard deviation, and number of valid cases for each variable. Initial solution displays initial communalities, eigenvalues, and the percentage of variance explained.

Correlation Matrix. The available options are coefficients, significance levels, determinant, KMO and Bartlett's test of sphericity, inverse, reproduced, and anti-image.

Expand Show details Collapse Hide details

• KMO and Bartlett's Test of Sphericity. The Kaiser-Meyer-Olkin measure of sampling adequacy tests whether the partial correlations among variables are small. Bartlett's test of sphericity tests whether the correlation matrix is an identity matrix, which would indicate that the factor model is inappropriate.

• Reproduced. The estimated correlation matrix from the factor solution. Residuals (difference between estimated and observed correlations) are also displayed.

• Anti-image. The anti-image correlation matrix contains the negatives of the partial correlation coefficients, and the anti-image covariance matrix contains the negatives of the partial covariances. In a good factor model, most of the off-diagonal elements will be small. The measure of sampling adequacy for a variable is displayed on the diagonal of the anti-image correlation matrix.

To Specify Descriptive Statistics and Correlation Coefficients Collapse Hide details

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Dimension Reduction
Factor...

In the Factor Analysis dialog box, click Descriptives.

Related Topics

Factor Analysis: Related Procedures
Factor Analysis
Factor Analysis Select Cases
Factor Analysis Extraction
Factor Analysis Rotation
Factor Analysis Scores
Factor Analysis Options


Factor Analysis Extraction

Factor Analysis,Factor Analysis,Factor Analysis
extraction methods,extraction methods,extraction methods
Factor Analysis,Factor Analysis,Factor Analysis
convergence,convergence,convergence
eigenvalues,eigenvalues,eigenvalues
in Factor Analysis,in Factor Analysis,in Factor Analysis
convergence,convergence,convergence
in Factor Analysis,in Factor Analysis,in Factor Analysis
iterations,iterations,iterations
in Factor Analysis,in Factor Analysis,in Factor Analysis
principal components analysis,principal components analysis,principal components analysis
unweighted least squares,unweighted least squares,unweighted least squares
in Factor Analysis,in Factor Analysis,in Factor Analysis
generalized least squares,generalized least squares,generalized least squares
in Factor Analysis,in Factor Analysis,in Factor Analysis
maximum likelihood,maximum likelihood,maximum likelihood
in Factor Analysis,in Factor Analysis,in Factor Analysis
principal axis factoring,principal axis factoring,principal axis factoring
alpha factoring,alpha factoring,alpha factoring
image factoring,image factoring,image factoring

Method. Allows you to specify the method of factor extraction. Available methods are principal components, unweighted least squares, generalized least squares, maximum likelihood, principal axis factoring, alpha factoring, and image factoring.

Expand Show details Collapse Hide details

• Principal Components Analysis. A factor extraction method used to form uncorrelated linear combinations of the observed variables. The first component has maximum variance. Successive components explain progressively smaller portions of the variance and are all uncorrelated with each other. Principal components analysis is used to obtain the initial factor solution. It can be used when a correlation matrix is singular.

• Unweighted Least-Squares Method. A factor extraction method that minimizes the sum of the squared differences between the observed and reproduced correlation matrices (ignoring the diagonals).

• Generalized Least-Squares Method. A factor extraction method that minimizes the sum of the squared differences between the observed and reproduced correlation matrices. Correlations are weighted by the inverse of their uniqueness, so that variables with high uniqueness are given less weight than those with low uniqueness.

• Maximum-Likelihood Method. A factor extraction method that produces parameter estimates that are most likely to have produced the observed correlation matrix if the sample is from a multivariate normal distribution. The correlations are weighted by the inverse of the uniqueness of the variables, and an iterative algorithm is employed.

• Principal Axis Factoring. A method of extracting factors from the original correlation matrix, with squared multiple correlation coefficients placed in the diagonal as initial estimates of the communalities. These factor loadings are used to estimate new communalities that replace the old communality estimates in the diagonal. Iterations continue until the changes in the communalities from one iteration to the next satisfy the convergence criterion for extraction.

• Alpha. A factor extraction method that considers the variables in the analysis to be a sample from the universe of potential variables. This method maximizes the alpha reliability of the factors.

• Image Factoring. A factor extraction method developed by Guttman and based on image theory. The common part of the variable, called the partial image, is defined as its linear regression on remaining variables, rather than a function of hypothetical factors.

Analyze. Allows you to specify either a correlation matrix or a covariance matrix.

Expand Show details Collapse Hide details

• Correlation matrix. Useful if variables in your analysis are measured on different scales.

• Covariance matrix. Useful when you want to apply your factor analysis to multiple groups with different variances for each variable.

Extract. You can either retain all factors whose eigenvalues exceed a specified value, or you can retain a specific number of factors.

Display. Allows you to request the unrotated factor solution and a scree plot of the eigenvalues.

Expand Show details Collapse Hide details

• Unrotated Factor Solution. Displays unrotated factor loadings (factor pattern matrix), communalities, and eigenvalues for the factor solution.

• Scree plot. A plot of the variance that is associated with each factor. This plot is used to determine how many factors should be kept. Typically the plot shows a distinct break between the steep slope of the large factors and the gradual trailing of the rest (the scree).

Maximum Iterations for Convergence. Allows you to specify the maximum number of steps that the algorithm can take to estimate the solution.

To Specify Extraction Options Collapse Hide details

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Dimension Reduction
Factor...

In the Factor Analysis dialog box, click Extraction.

Related Topics

Factor Analysis: Related Procedures
Factor Analysis
Factor Analysis Select Cases
Factor Analysis Descriptives
Factor Analysis Rotation
Factor Analysis Scores
Factor Analysis Options


Factor Analysis Rotation

Factor Analysis,Factor Analysis,Factor Analysis
rotation methods,rotation methods,rotation methods
iterations,iterations,iterations
in Factor Analysis,in Factor Analysis,in Factor Analysis
convergence,convergence,convergence
in Factor Analysis,in Factor Analysis,in Factor Analysis
Factor Analysis,Factor Analysis,Factor Analysis
loading plots,loading plots,loading plots
loading plots,loading plots,loading plots
in Factor Analysis,in Factor Analysis,in Factor Analysis
varimax rotation,varimax rotation,varimax rotation
in Factor Analysis,in Factor Analysis,in Factor Analysis
equamax rotation,equamax rotation,equamax rotation
in Factor Analysis,in Factor Analysis,in Factor Analysis
quartimax rotation,quartimax rotation,quartimax rotation
in Factor Analysis,in Factor Analysis,in Factor Analysis
direct oblimin rotation,direct oblimin rotation,direct oblimin rotation
in Factor Analysis,in Factor Analysis,in Factor Analysis
Factor Analysis,Factor Analysis,Factor Analysis
convergence,convergence,convergence

Method. Allows you to select the method of factor rotation. Available methods are varimax, direct oblimin, quartimax, equamax, or promax.

Expand Show details Collapse Hide details

• Varimax Method. An orthogonal rotation method that minimizes the number of variables that have high loadings on each factor. This method simplifies the interpretation of the factors.

• Direct Oblimin Method. A method for oblique (nonorthogonal) rotation. When delta equals 0 (the default), solutions are most oblique. As delta becomes more negative, the factors become less oblique. To override the default delta of 0, enter a number less than or equal to 0.8.

• Quartimax Method. A rotation method that minimizes the number of factors needed to explain each variable. This method simplifies the interpretation of the observed variables.

• Equamax Method. A rotation method that is a combination of the varimax method, which simplifies the factors, and the quartimax method, which simplifies the variables. The number of variables that load highly on a factor and the number of factors needed to explain a variable are minimized.

• Promax Rotation. An oblique rotation, which allows factors to be correlated. This rotation can be calculated more quickly than a direct oblimin rotation, so it is useful for large datasets.

Display. Allows you to include output on the rotated solution, as well as loading plots for the first two or three factors.

Expand Show details Collapse Hide details

• Rotated Solution. A rotation method must be selected to obtain a rotated solution. For orthogonal rotations, the rotated pattern matrix and factor transformation matrix are displayed. For oblique rotations, the pattern, structure, and factor correlation matrices are displayed.

• Factor Loading Plot. Three-dimensional factor loading plot of the first three factors. For a two-factor solution, a two-dimensional plot is shown. The plot is not displayed if only one factor is extracted. Plots display rotated solutions if rotation is requested.

Maximum Iterations for Convergence. Allows you to specify the maximum number of steps that the algorithm can take to perform the rotation.

To Specify Rotation Options Collapse Hide details

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Dimension Reduction
Factor...

In the Factor Analysis dialog box, click Rotation.

Related Topics

Factor Analysis: Related Procedures
Factor Analysis
Factor Analysis Select Cases
Factor Analysis Descriptives
Factor Analysis Extraction
Factor Analysis Scores
Factor Analysis Options


Factor Analysis Scores

factor scores,factor scores,factor scores
Factor Analysis,Factor Analysis,Factor Analysis
factor scores,factor scores,factor scores
Bartlett factor scores,Bartlett factor scores,Bartlett factor scores
Anderson-Rubin factor scores,Anderson-Rubin factor scores,Anderson-Rubin factor scores

Save as variables. Creates one new variable for each factor in the final solution.

Method. The alternative methods for calculating factor scores are regression, Bartlett, and Anderson-Rubin.

Expand Show details Collapse Hide details

• Regression Method. A method for estimating factor score coefficients. The scores that are produced have a mean of 0 and a variance equal to the squared multiple correlation between the estimated factor scores and the true factor values. The scores may be correlated even when factors are orthogonal.

• Bartlett Scores. A method of estimating factor score coefficients. The scores that are produced have a mean of 0. The sum of squares of the unique factors over the range of variables is minimized.

• Anderson-Rubin Method. A method of estimating factor score coefficients; a modification of the Bartlett method which ensures orthogonality of the estimated factors. The scores that are produced have a mean of 0, have a standard deviation of 1, and are uncorrelated.

Display factor score coefficient matrix. Shows the coefficients by which variables are multiplied to obtain factor scores. Also shows the correlations between factor scores.

To Specify Factor Score Options Collapse Hide details

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Dimension Reduction
Factor...

In the Factor Analysis dialog box, click Scores.

Related Topics

Factor Analysis: Related Procedures
Factor Analysis
Factor Analysis Select Cases
Factor Analysis Descriptives
Factor Analysis Extraction
Factor Analysis Rotation
Factor Analysis Options


Factor Analysis Options

Factor Analysis,Factor Analysis,Factor Analysis
missing values,missing values,missing values
missing values,missing values,missing values
in Factor Analysis,in Factor Analysis,in Factor Analysis
Factor Analysis,Factor Analysis,Factor Analysis
coefficient display format,coefficient display format,coefficient display format

Missing Values. Allows you to specify how missing values are handled. The available choices are to exclude cases listwise, exclude cases pairwise, or replace with mean.

Coefficient Display Format. Allows you to control aspects of the output matrices. You sort coefficients by size and suppress coefficients with absolute values that are less than the specified value.

To Specify Factor Analysis Options Collapse Hide details

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Dimension Reduction
Factor...

In the Factor Analysis dialog box, click Options.

Related Topics

Factor Analysis: Related Procedures
Factor Analysis
Factor Analysis Select Cases
Factor Analysis Descriptives
Factor Analysis Extraction
Factor Analysis Rotation
Factor Analysis Scores


FACTOR Command Additional Features

Factor Analysis,Factor Analysis,Factor Analysis
command additional features,command additional features,command additional features

The command syntax language also allows you to:

• Specify convergence criteria for iteration during extraction and rotation.

• Specify individual rotated-factor plots.

• Specify how many factor scores to save.

• Specify diagonal values for the principal axis factoring method.

• Write correlation matrices or factor-loading matrices to disk for later analysis.

• Read and analyze correlation matrices or factor-loading matrices.

Related Topics

FACTOR


Choosing a Procedure for Clustering

clustering,clustering,clustering
choosing a procedure,choosing a procedure,choosing a procedure

Cluster analyses can be performed using the TwoStep, Hierarchical, or K-Means Cluster Analysis procedure. Each procedure employs a different algorithm for creating clusters, and each has options not available in the others.

TwoStep Cluster Analysis. For many applications, the TwoStep Cluster Analysis procedure will be the method of choice. It provides the following unique features:

• Automatic selection of the best number of clusters, in addition to measures for choosing between cluster models.

• Ability to create cluster models simultaneously based on categorical and continuous variables.

• Ability to save the cluster model to an external XML file and then read that file and update the cluster model using newer data.

Additionally, the TwoStep Cluster Analysis procedure can analyze large data files.

Hierarchical Cluster Analysis. The Hierarchical Cluster Analysis procedure is limited to smaller data files (hundreds of objects to be clustered) but has the following unique features:

• Ability to cluster cases or variables.

• Ability to compute a range of possible solutions and save cluster memberships for each of those solutions.

• Several methods for cluster formation, variable transformation, and measuring the dissimilarity between clusters.

As long as all the variables are of the same type, the Hierarchical Cluster Analysis procedure can analyze interval (continuous), count, or binary variables.

K-Means Cluster Analysis. The K-Means Cluster Analysis procedure is limited to continuous data and requires you to specify the number of clusters in advance, but it has the following unique features:

• Ability to save distances from cluster centers for each object.

• Ability to read initial cluster centers from and save final cluster centers to an external PASW Statistics file.

Additionally, the K-Means Cluster Analysis procedure can analyze large data files.

Related Topics

K-Means Cluster Analysis
TwoStep Cluster Analysis
Hierarchical Cluster Analysis


TwoStep Cluster Analysis

TwoStep Cluster Analysis,TwoStep Cluster Analysis,TwoStep Cluster Analysis

The TwoStep Cluster Analysis procedure is an exploratory tool designed to reveal natural groupings (or clusters) within a dataset that would otherwise not be apparent. The algorithm employed by this procedure has several desirable features that differentiate it from traditional clustering techniques:

• Handling of categorical and continuous variables. By assuming variables to be independent, a joint multinomial-normal distribution can be placed on categorical and continuous variables.

• Automatic selection of number of clusters. By comparing the values of a model-choice criterion across different clustering solutions, the procedure can automatically determine the optimal number of clusters.

• Scalability. By constructing a cluster features (CF) tree that summarizes the records, the TwoStep algorithm allows you to analyze large data files.

Show me

Example. Retail and consumer product companies regularly apply clustering techniques to data that describe their customers' buying habits, gender, age, income level, etc. These companies tailor their marketing and product development strategies to each consumer group to increase sales and build brand loyalty.

Distance Measure. This selection determines how the similarity between two clusters is computed.

• Log-likelihood. The likelihood measure places a probability distribution on the variables. Continuous variables are assumed to be normally distributed, while categorical variables are assumed to be multinomial. All variables are assumed to be independent.

• Euclidean. The Euclidean measure is the "straight line" distance between two clusters. It can be used only when all of the variables are continuous.

Number of Clusters. This selection allows you to specify how the number of clusters is to be determined.

• Determine automatically. The procedure will automatically determine the "best" number of clusters, using the criterion specified in the Clustering Criterion group. Optionally, enter a positive integer specifying the maximum number of clusters that the procedure should consider.

• Specify fixed. Allows you to fix the number of clusters in the solution. Enter a positive integer.

Count of Continuous Variables. This group provides a summary of the continuous variable standardization specifications made in the Options dialog box. See the topic TwoStep Cluster Analysis Options for more information.

Clustering Criterion. This selection determines how the automatic clustering algorithm determines the number of clusters. Either the Bayesian Information Criterion (BIC) or the Akaike Information Criterion (AIC) can be specified.

TwoStep Cluster Analysis Data Considerations Collapse Hide details

Data. This procedure works with both continuous and categorical variables. Cases represent objects to be clustered, and the variables represent attributes upon which the clustering is based.

Case Order. Note that the cluster features tree and the final solution may depend on the order of cases. To minimize order effects, randomly order the cases. You may want to obtain several different solutions with cases sorted in different random orders to verify the stability of a given solution. In situations where this is difficult due to extremely large file sizes, multiple runs with a sample of cases sorted in different random orders might be substituted.

Assumptions. The likelihood distance measure assumes that variables in the cluster model are independent. Further, each continuous variable is assumed to have a normal (Gaussian) distribution, and each categorical variable is assumed to have a multinomial distribution. Empirical internal testing indicates that the procedure is fairly robust to violations of both the assumption of independence and the distributional assumptions, but you should try to be aware of how well these assumptions are met.

Use the Bivariate Correlations procedure to test the independence of two continuous variables. Use the Crosstabs procedure to test the independence of two categorical variables. Use the Means procedure to test the independence between a continuous variable and categorical variable. Use the Explore procedure to test the normality of a continuous variable. Use the Chi-Square Test procedure to test whether a categorical variable has a specified multinomial distribution.

To Obtain a TwoStep Cluster Analysis Collapse Hide details

To Obtain a TwoStep Cluster Analysis

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Classify
TwoStep Cluster...

Select one or more categorical or continuous variables.

Optionally, you can:

• Adjust the criteria by which clusters are constructed.

• Select settings for noise handling, memory allocation, variable standardization, and cluster model input.

• Request model viewer output.

• Save model results to the working file or to an external XML file.

This procedure pastes TWOSTEP CLUSTER command syntax.

See TWOSTEP CLUSTER Algorithms for computational details for this procedure.

Related Topics

TwoStep Cluster Analysis Options
TwoStep Cluster Analysis Output
TWOSTEP CLUSTER


TwoStep Cluster Analysis Options

noise handling,noise handling,noise handling
in TwoStep Cluster Analysis,in TwoStep Cluster Analysis,in TwoStep Cluster Analysis
memory allocation,memory allocation,memory allocation
in TwoStep Cluster Analysis,in TwoStep Cluster Analysis,in TwoStep Cluster Analysis
standardization,standardization,standardization
in TwoStep Cluster Analysis,in TwoStep Cluster Analysis,in TwoStep Cluster Analysis
outliers,outliers,outliers
in TwoStep Cluster Analysis,in TwoStep Cluster Analysis,in TwoStep Cluster Analysis
TwoStep Cluster Analysis,TwoStep Cluster Analysis,TwoStep Cluster Analysis
options,options,options
initial threshold,initial threshold,initial threshold
in TwoStep Cluster Analysis,in TwoStep Cluster Analysis,in TwoStep Cluster Analysis
maximum branches,maximum branches,maximum branches
in TwoStep Cluster Analysis,in TwoStep Cluster Analysis,in TwoStep Cluster Analysis
tree depth,tree depth,tree depth
in TwoStep Cluster Analysis,in TwoStep Cluster Analysis,in TwoStep Cluster Analysis

Outlier Treatment. This group allows you to treat outliers specially during clustering if the cluster features (CF) tree fills. The CF tree is full if it cannot accept any more cases in a leaf node and no leaf node can be split.

• If you select noise handling and the CF tree fills, it will be regrown after placing cases in sparse leaves into a "noise" leaf. A leaf is considered sparse if it contains fewer than the specified percentage of cases of the maximum leaf size. After the tree is regrown, the outliers will be placed in the CF tree if possible. If not, the outliers are discarded.

• If you do not select noise handling and the CF tree fills, it will be regrown using a larger distance change threshold. After final clustering, values that cannot be assigned to a cluster are labeled outliers. The outlier cluster is given an identification number of –1 and is not included in the count of the number of clusters.

Memory Allocation. This group allows you to specify the maximum amount of memory in megabytes (MB) that the cluster algorithm should use. If the procedure exceeds this maximum, it will use the disk to store information that will not fit in memory. Specify a number greater than or equal to 4.

• Consult your system administrator for the largest value that you can specify on your system.

• The algorithm may fail to find the correct or desired number of clusters if this value is too low.

Variable standardization. The clustering algorithm works with standardized continuous variables. Any continuous variables that are not standardized should be left as variables in the To be Standardized list. To save some time and computational effort, you can select any continuous variables that you have already standardized as variables in the Assumed Standardized list.

Advanced Options

CF Tree Tuning Criteria. The following clustering algorithm settings apply specifically to the cluster features (CF) tree and should be changed with care:

• Initial Distance Change Threshold. This is the initial threshold used to grow the CF tree. If inserting a given case into a leaf of the CF tree would yield tightness less than the threshold, the leaf is not split. If the tightness exceeds the threshold, the leaf is split.

• Maximum Branches (per leaf node). The maximum number of child nodes that a leaf node can have.

• Maximum Tree Depth. The maximum number of levels that the CF tree can have.

• Maximum Number of Nodes Possible. This indicates the maximum number of CF tree nodes that could potentially be generated by the procedure, based on the function (bd+1 – 1) / (b – 1), where b is the maximum branches and d is the maximum tree depth. Be aware that an overly large CF tree can be a drain on system resources and can adversely affect the performance of the procedure. At a minimum, each node requires 16 bytes.

Cluster Model Update. This group allows you to import and update a cluster model generated in a prior analysis. The input file contains the CF tree in XML format. The model will then be updated with the data in the active file. You must select the variable names in the main dialog box in the same order in which they were specified in the prior analysis. The XML file remains unaltered, unless you specifically write the new model information to the same filename. See the topic TwoStep Cluster Analysis Output for more information.

If a cluster model update is specified, the options pertaining to generation of the CF tree that were specified for the original model are used. More specifically, the distance measure, noise handling, memory allocation, or CF tree tuning criteria settings for the saved model are used, and any settings for these options in the dialog boxes are ignored.

Note: When performing a cluster model update, the procedure assumes that none of the selected cases in the active dataset were used to create the original cluster model. The procedure also assumes that the cases used in the model update come from the same population as the cases used to create the original model; that is, the means and variances of continuous variables and levels of categorical variables are assumed to be the same across both sets of cases. If your "new" and "old" sets of cases come from heterogeneous populations, you should run the TwoStep Cluster Analysis procedure on the combined sets of cases for the best results.

To Set Options for TwoStep Cluster Analysis Collapse Hide details

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Classify
TwoStep Cluster...

In the TwoStep Cluster Analysis dialog box, click Options.

Change the settings as needed.

Related Topics

TwoStep Cluster Analysis
TwoStep Cluster Analysis Output


TwoStep Cluster Analysis Output

descriptive statistics,descriptive statistics,descriptive statistics
in TwoStep Cluster Analysis,in TwoStep Cluster Analysis,in TwoStep Cluster Analysis
cluster frequencies,cluster frequencies,cluster frequencies
in TwoStep Cluster Analysis,in TwoStep Cluster Analysis,in TwoStep Cluster Analysis
TwoStep Cluster Analysis,TwoStep Cluster Analysis,TwoStep Cluster Analysis
statistics,statistics,statistics
save to external file,save to external file,save to external file
save to working file,save to working file,save to working file

Model Viewer Output. This group provides options for displaying the clustering results.

• Charts and tables. Displays model-related output, including tables and charts. Tables in the model view include a model summary and cluster-by-features grid. Graphical output in the model view includes a cluster quality chart, cluster sizes, variable importance, cluster comparison grid, and cell information.

• Evaluation fields. This calculates cluster data for variables that were not used in cluster creation. Evaluation fields can be displayed along with the input features in the model viewer by selecting them in the Display subdialog. Fields with missing values are ignored.

Working Data File. This group allows you to save variables to the active dataset.

• Create cluster membership variable. This variable contains a cluster identification number for each case. The name of this variable is tsc_n, where n is a positive integer indicating the ordinal of the active dataset save operation completed by this procedure in a given session.

XML Files. The final cluster model and CF tree are two types of output files that can be exported in XML format.

• Export final model. The final cluster model is exported to the specified file in XML (PMML) format. SmartScore and PASW Statistics Server (a separate product) can use this model file to apply the model information to other data files for scoring purposes.

• Export CF tree. This option allows you to save the current state of the cluster tree and update it later using newer data. See TwoStep Cluster Analysis Options for more information on reading this file.

To Request Optional Output for TwoStep Cluster Analysis Collapse Hide details

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Classify
TwoStep Cluster...

In the TwoStep Cluster Analysis dialog box, click Output.

Select the desired output.

Related Topics

TwoStep Cluster Analysis
TwoStep Cluster Analysis Options


The Cluster Viewer

clustering,clustering,clustering
cluster viewer,cluster viewer,cluster viewer
about cluster models,about cluster models,about cluster models

Cluster models are typically used to find groups (or clusters) of similar records based on the variables examined, where the similarity between members of the same group is high and the similarity between members of different groups is low. The results can be used to identify associations that would otherwise not be apparent. For example, through cluster analysis of customer preferences, income level, and buying habits, it may be possible to identify the types of customers who are more likely to respond to a particular marketing campaign.

There are two approaches to interpreting the results in a cluster display:

• Examine clusters to determine characteristics unique to that cluster. Does one cluster contain all the high-income borrowers? Does this cluster contain more records than the others?

• Examine fields across clusters to determine how values are distributed among clusters. Does one's level of education determine membership in a cluster? Does a high credit score distinguish between membership in one cluster or another?

Using the main views and the various linked views in the Cluster Viewer, you can gain insight to help you answer these questions.

Who uses clustering? Collapse Hide details

Clustering techniques are useful in a wide variety of situations, including:

• Market Segmentation. Identify distinct groups among a customer base, allowing precise targeting of sales efforts.

• Product Bundling. Identify groups of products that tend to appeal to specific customer types.

• Formal Classification. Classify groups, such as plants or animals into formal taxonomies.

• Medical Diagnosis. Use biological patterns to uncover rules for identifying or diagnosing medical disorders.

To see information about the cluster model, activate (double-click) the Model Viewer object in the Viewer.

Related Topics

Cluster Viewer


Cluster Viewer

clustering,clustering,clustering
viewing clusters,viewing clusters,viewing clusters
cluster viewer,cluster viewer,cluster viewer
overview,overview,overview
clustering,clustering,clustering
overall display,overall display,overall display
visualization,visualization,visualization
clustering models,clustering models,clustering models
Expand Show details Collapse Hide details
Cluster Viewer with default display

The Cluster Viewer is made up of two panels, the main view on the left and the linked, or auxiliary, view on the right. There are two main views:

• Model Summary (the default). See the topic Model Summary View for more information.

• Clusters. See the topic Clusters View for more information.

There are four linked/auxiliary views:

• Cluster Sizes (the default). See the topic Cluster Sizes View for more information.

• Cluster Comparison. See the topic Cluster Comparison View for more information.

• Cell Distribution. See the topic Cell Distribution View for more information.

• Variable Importance. See the topic Cluster Variable Importance View for more information.

Related Topics

The Cluster Viewer
Model Summary View
Clusters View
Transpose Clusters and Features
Sort Features
Sort Clusters
Cell Contents
Cluster Sizes View
Cell Distribution View
Cluster Comparison View
Cluster Variable Importance View
Navigating the Cluster Viewer
Filtering Records


Model Summary View

cluster viewer,cluster viewer,cluster viewer
model summary,model summary,model summary
cluster viewer,cluster viewer,cluster viewer
summary view,summary view,summary view
Expand Show details Collapse Hide details
Model Summary view in the main panel

The Model Summary view shows a snapshot, or summary, of the cluster model, including a Silhouette measure of cluster cohesion and separation that is shaded to indicate poor, fair, or good results. This snapshot enables you to quickly check if the quality is poor, in which case you may decide to return to the modeling node to amend the cluster model settings to produce a better result.

The results of poor, fair, and good are based on the work of Kaufman and Rousseeuw (1990) regarding interpretation of cluster structures. In the Model Summary view, a good result equates to data that reflects Kaufman and Rousseeuw's rating as either reasonable or strong evidence of cluster structure, fair reflects their rating of weak evidence, and poor reflects their rating of no significant evidence.

The silhouette measure averages, over all records, (B−A) / max(A,B), where A is the record's distance to its cluster center and B is the record's distance to the nearest cluster center that it doesn't belong to. A silhouette coefficient of 1 would mean that all cases are located directly on their cluster centers. A value of −1 would mean all cases are located on the cluster centers of some other cluster. A value of 0 means, on average, cases are equidistant between their own cluster center and the nearest other cluster.

The summary includes a table that contains the following information:

• Algorithm. The clustering algorithm used, for example, "TwoStep".

• Input Features. The number of fields, also known as inputs or predictors.

• Clusters. The number of clusters in the solution.

Related Topics

Cluster Viewer
Clusters View
Transpose Clusters and Features
Sort Features
Sort Clusters
Cell Contents
Cluster Sizes View
Cell Distribution View
Cluster Comparison View
Cluster Variable Importance View
Navigating the Cluster Viewer
Filtering Records


Clusters View

cluster viewer,cluster viewer,cluster viewer
clusters view,clusters view,clusters view
cluster viewer,cluster viewer,cluster viewer
cluster centers view,cluster centers view,cluster centers view
Expand Show details Collapse Hide details
Cluster Centers view in the main panel

The Clusters view contains a cluster-by-features grid that includes cluster names, sizes, and profiles for each cluster.

The columns in the grid contain the following information:

• Cluster. The cluster numbers created by the algorithm.

• Label. Any labels applied to each cluster (this is blank by default). Double-click in the cell to enter a label that describes the cluster contents; for example, "Luxury car buyers".

• Description. Any description of the cluster contents (this is blank by default). Double-click in the cell to enter a description of the cluster; for example, "55+ years of age, professionals, earning over $100,000".

• Size. The size of each cluster as a percentage of the overall cluster sample. Each size cell within the grid displays a vertical bar that shows the size percentage within the cluster, a size percentage in numeric format, and the cluster case counts.

• Features. The individual inputs or predictors, sorted by overall importance by default. If any columns have equal sizes they are shown in ascending sort order of the cluster numbers.

Overall feature importance is indicated by the color of the cell background shading; the most important feature is darkest; the least important feature is unshaded. A guide above the table indicates the importance attached to each feature cell color.

When you hover your mouse over a cell, the full name/label of the feature and the importance value for the cell is displayed. Further information may be displayed, depending on the view and feature type. In the Cluster Centers view, this includes the cell statistic and the cell value; for example: “Mean: 4.32”. For categorical features the cell shows the name of the most frequent (modal) category and its percentage.

Within the Clusters view, you can select various ways to display the cluster information:

• Transpose clusters and features. See the topic Transpose Clusters and Features for more information.

• Sort features. See the topic Sort Features for more information.

• Sort clusters. See the topic Sort Clusters for more information.

• Select cell contents. See the topic Cell Contents for more information.

Related Topics

Cluster Viewer
Model Summary View
Transpose Clusters and Features
Sort Features
Sort Clusters
Cell Contents
Cluster Sizes View
Cell Distribution View
Cluster Comparison View
Cluster Variable Importance View
Navigating the Cluster Viewer
Filtering Records


Transpose Clusters and Features

cluster viewer,cluster viewer,cluster viewer
transpose clusters and features,transpose clusters and features,transpose clusters and features
cluster viewer,cluster viewer,cluster viewer
flip clusters and features,flip clusters and features,flip clusters and features

By default, clusters appear as columns and features appear as rows. To reverse this display, click the Transpose Clusters and Features button to the left of the Sort Features By buttons. For example you may want to do this when you have many clusters displayed, to reduce the amount of horizontal scrolling required to see the data.

Expand Show details Collapse Hide details
Transposed clusters in the main panel

Related Topics

Cluster Viewer
Model Summary View
Clusters View
Sort Features
Sort Clusters
Cell Contents
Cluster Sizes View
Cell Distribution View
Cluster Comparison View
Cluster Variable Importance View
Navigating the Cluster Viewer
Filtering Records


Sort Features

cluster viewer,cluster viewer,cluster viewer
sort features,sort features,sort features
cluster viewer,cluster viewer,cluster viewer
feature display sort,feature display sort,feature display sort

The Sort Features By buttons enable you to select how feature cells are displayed:

• Overall Importance. This is the default sort order. Features are sorted in descending order of overall importance, and sort order is the same across clusters. If any features have tied importance values, the tied features are listed in ascending sort order of the feature names.

• Within-Cluster Importance. Features are sorted with respect to their importance for each cluster. If any features have tied importance values, the tied features are listed in ascending sort order of the feature names. When this option is chosen the sort order usually varies across clusters.

• Name. Features are sorted by name in alphabetical order.

• Data order. Features are sorted by their order in the dataset.

Related Topics

Cluster Viewer
Model Summary View
Clusters View
Transpose Clusters and Features
Sort Clusters
Cell Contents
Cluster Sizes View
Cell Distribution View
Cluster Comparison View
Cluster Variable Importance View
Navigating the Cluster Viewer
Filtering Records


Sort Clusters

cluster viewer,cluster viewer,cluster viewer
sort clusters,sort clusters,sort clusters
cluster viewer,cluster viewer,cluster viewer
cluster display sort,cluster display sort,cluster display sort

By default clusters are sorted in descending order of size. The Sort Clusters By buttons enable you to sort them by name in alphabetical order, or, if you have created unique labels, in alphanumeric label order instead.

Features that have the same label are sorted by cluster name. If clusters are sorted by label and you edit the label of a cluster, the sort order is automatically updated.

Related Topics

Cluster Viewer
Model Summary View
Clusters View
Transpose Clusters and Features
Sort Features
Cell Contents
Cluster Sizes View
Cell Distribution View
Cluster Comparison View
Cluster Variable Importance View
Navigating the Cluster Viewer
Filtering Records


Cell Contents

cluster viewer,cluster viewer,cluster viewer
sort cell contents,sort cell contents,sort cell contents
cluster viewer,cluster viewer,cluster viewer
cell content display,cell content display,cell content display

The Cells buttons enable you to change the display of the cell contents for features and evaluation fields.

• Cluster Centers. By default, cells display feature names/labels and the central tendency for each cluster/feature combination. The mean is shown for continuous fields and the mode (most frequently occurring category) with category percentage for categorical fields.

• Absolute Distributions. Shows feature names/labels and absolute distributions of the features within each cluster. For categorical features, the display shows bar charts overlaid with categories ordered in ascending order of the data values. For continuous features, the display shows a smooth density plot which use the same endpoints and intervals for each cluster.

The solid red colored display shows the cluster distribution, whilst the paler display represents the overall data.

Expand Show details Collapse Hide details
Absolute Distribution of Cluster Features

• Relative Distributions. Shows feature names/labels and relative distributions in the cells. In general the displays are similar to those shown for absolute distributions, except that relative distributions are displayed instead.

The solid red colored display shows the cluster distribution, while the paler display represents the overall data.

Expand Show details Collapse Hide details
Relative Distribution of Cluster Features

cluster viewer,cluster viewer,cluster viewer
basic view,basic view,basic view

• Basic View. Where there are a lot of clusters, it can be difficult to see all the detail without scrolling. To reduce the amount of scrolling, select this view to change the display to a more compact version of the table.

Expand Show details Collapse Hide details
Basic view in the main panel

Related Topics

Cluster Viewer
Model Summary View
Clusters View
Transpose Clusters and Features
Sort Features
Sort Clusters
Cluster Sizes View
Cell Distribution View
Cluster Comparison View
Cluster Variable Importance View
Navigating the Cluster Viewer
Filtering Records


Cluster Sizes View

cluster viewer,cluster viewer,cluster viewer
cluster sizes view,cluster sizes view,cluster sizes view
cluster viewer,cluster viewer,cluster viewer
size of clusters,size of clusters,size of clusters
Expand Show details Collapse Hide details
Cluster Sizes view in the link panel

The Cluster Sizes view shows a pie chart that contains each cluster. The percentage size of each cluster is shown on each slice; hover the mouse over each slice to display the count in that slice.

Below the chart, a table lists the following size information:

• The size of the smallest cluster (both a count and percentage of the whole).

• The size of the largest cluster (both a count and percentage of the whole).

• The ratio of size of the largest cluster to the smallest cluster.

Related Topics

Cluster Viewer
Model Summary View
Clusters View
Transpose Clusters and Features
Sort Features
Sort Clusters
Cell Contents
Cell Distribution View
Cluster Comparison View
Cluster Variable Importance View
Navigating the Cluster Viewer
Filtering Records


Cell Distribution View

cluster viewer,cluster viewer,cluster viewer
cell distribution view,cell distribution view,cell distribution view
cluster viewer,cluster viewer,cluster viewer
distribution of cells,distribution of cells,distribution of cells
Expand Show details Collapse Hide details
Cell Distribution view in the link panel

The Cell Distribution view shows an expanded, more detailed, plot of the distribution of the data for any feature cell you select in the table in the Clusters main panel.

Related Topics

Cluster Viewer
Model Summary View
Clusters View
Transpose Clusters and Features
Sort Features
Sort Clusters
Cell Contents
Cluster Sizes View
Cluster Comparison View
Cluster Variable Importance View
Navigating the Cluster Viewer
Filtering Records


Cluster Comparison View

cluster viewer,cluster viewer,cluster viewer
cluster comparison view,cluster comparison view,cluster comparison view
cluster viewer,cluster viewer,cluster viewer
comparison of clusters,comparison of clusters,comparison of clusters
Expand Show details Collapse Hide details
Cluster Comparison view in the link panel

The Cluster Comparison view consists of a grid-style layout, with features in the rows and selected clusters in the columns. This view helps you to better understand the factors that make up the clusters; it also enables you to see differences between clusters not only as compared with the overall data, but with each other.

To select clusters for display, click on the top of the cluster column in the Clusters main panel. Use either Ctrl-click or Shift-click to select or deselect more than one cluster for comparison.

Clusters are shown in the order in which they were selected, while the order of fields is determined by the Sort Features By option. When you select Within-Cluster Importance, fields are always sorted by overall importance .

The background plots show the overall distributions of each features:

• Categorical features are shown as dot plots, where the size of the dot indicates the most frequent/modal category for each cluster (by feature).

• Continuous features are displayed as boxplots, which show overall medians and the interquartile ranges.

Overlaid on these background views are boxplots for selected clusters:

• For continuous features, square point markers and horizontal lines indicate the median and interquartile range for each cluster.

• Each cluster is represented by a different color, shown at the top of the view.

Related Topics

Cluster Viewer
Model Summary View
Clusters View
Transpose Clusters and Features
Sort Features
Sort Clusters
Cell Contents
Cluster Sizes View
Cell Distribution View
Cluster Variable Importance View
Navigating the Cluster Viewer
Filtering Records


Cluster Variable Importance View

cluster viewer,cluster viewer,cluster viewer
cluster variable importance view,cluster variable importance view,cluster variable importance view
cluster viewer,cluster viewer,cluster viewer
variable importance,variable importance,variable importance
Expand Show details Collapse Hide details
Cluster Variable Importance view in the link panel

The Variable Importance view shows the relative importance of each field in estimating the model.

Related Topics

Cluster Viewer
Model Summary View
Clusters View
Transpose Clusters and Features
Sort Features
Sort Clusters
Cell Contents
Cluster Sizes View
Cell Distribution View
Cluster Comparison View
Navigating the Cluster Viewer
Filtering Records


Navigating the Cluster Viewer

cluster viewer,cluster viewer,cluster viewer
using,using,using

The Cluster Viewer is an interactive display. You can:

• Select a field or cluster to view more details.

• Compare clusters to select items of interest.

• Alter the display.

• Transpose axes.

Using the Toolbars

You control the information shown in both the left and right panels by using the toolbar options. You can change the orientation of the display (top-down, left-to-right, or right-to-left) using the toolbar controls. In addition, you can also reset the viewer to the default settings, and open a dialog box to specify the contents of the Clusters view in the main panel.

Expand Show details Collapse Hide details
Toolbars for controlling the data shown on the Cluster Viewer

The Sort Features By, Sort Clusters By, Cells, and Display options are only available when you select the Clusters view in the main panel. See the topic Clusters View for more information.

See Transpose Clusters and Features
See Sort Features By
See Sort Clusters By
See Cells

Control Cluster View Display

To control what is shown in the Clusters view on the main panel, click the Display button; the Display dialog opens.

Expand Show details Collapse Hide details
Cluster Viewer - Display options

Features. Selected by default. To hide all input features, deselect the check box.

Evaluation Fields. Choose the evaluation fields (fields not used to create the cluster model, but sent to the model viewer to evaluate the clusters) to display; none are shown by default. Note: This check box is unavailable if no evaluation fields are available.

Cluster Descriptions. Selected by default. To hide all cluster description cells, deselect the check box.

Cluster Sizes. Selected by default. To hide all cluster size cells, deselect the check box.

Maximum Number of Categories. Specify the maximum number of categories to display in charts of categorical features; the default is 20.

Related Topics

Cluster Viewer
Model Summary View
Clusters View
Transpose Clusters and Features
Sort Features
Sort Clusters
Cell Contents
Cluster Sizes View
Cell Distribution View
Cluster Comparison View
Cluster Variable Importance View
Filtering Records


Filtering Records

cluster viewer,cluster viewer,cluster viewer
filtering records,filtering records,filtering records
Expand Show details Collapse Hide details
Cluster Viewer - Filter Cases

If you want to know more about the cases in a particular cluster or group of clusters, you can select a subset of records for further analysis based on the selected clusters.

Select the clusters in the Cluster view of the Cluster Viewer. To select multiple clusters, use Ctrl-click.

From the menus choose:

Generate
Filter Records...

Enter a filter variable name. Records from the selected clusters will receive a value of 1 for this field. All other records will receive a value of 0 and will be excluded from subsequent analyses until you change the filter status.

Click OK.

Related Topics

Cluster Viewer
Model Summary View
Clusters View
Transpose Clusters and Features
Sort Features
Sort Clusters
Cell Contents
Cluster Sizes View
Cell Distribution View
Cluster Comparison View
Cluster Variable Importance View
Navigating the Cluster Viewer


Hierarchical Cluster Analysis

Proximities,Proximities,Proximities
in Hierarchical Cluster Analysis,in Hierarchical Cluster Analysis,in Hierarchical Cluster Analysis
cluster analysis,cluster analysis,cluster analysis
Hierarchical Cluster Analysis,Hierarchical Cluster Analysis,Hierarchical Cluster Analysis
Hierarchical Cluster Analysis,Hierarchical Cluster Analysis,Hierarchical Cluster Analysis
Hierarchical Cluster Analysis,Hierarchical Cluster Analysis,Hierarchical Cluster Analysis
clustering cases,clustering cases,clustering cases
Hierarchical Cluster Analysis,Hierarchical Cluster Analysis,Hierarchical Cluster Analysis
clustering variables,clustering variables,clustering variables
Hierarchical Cluster Analysis,Hierarchical Cluster Analysis,Hierarchical Cluster Analysis
example,example,example
Hierarchical Cluster Analysis,Hierarchical Cluster Analysis,Hierarchical Cluster Analysis
statistics,statistics,statistics

This procedure attempts to identify relatively homogeneous groups of cases (or variables) based on selected characteristics, using an algorithm that starts with each case (or variable) in a separate cluster and combines clusters until only one is left. You can analyze raw variables, or you can choose from a variety of standardizing transformations. Distance or similarity measures are generated by the Proximities procedure. Statistics are displayed at each stage to help you select the best solution.

Example. Are there identifiable groups of television shows that attract similar audiences within each group? With hierarchical cluster analysis, you could cluster television shows (cases) into homogeneous groups based on viewer characteristics. This can be used to identify segments for marketing. Or you can cluster cities (cases) into homogeneous groups so that comparable cities can be selected to test various marketing strategies.

Statistics. Agglomeration schedule, distance (or similarity) matrix, and cluster membership for a single solution or a range of solutions. Plots: dendrograms and icicle plots.

Show me

Hierarchical Cluster Analysis Data Considerations Collapse Hide details

Data. The variables can be quantitative, binary, or count data. Scaling of variables is an important issue--differences in scaling may affect your cluster solution(s). If your variables have large differences in scaling (for example, one variable is measured in dollars and the other is measured in years), you should consider standardizing them (this can be done automatically by the Hierarchical Cluster Analysis procedure).

Case order. If tied distances or similarities exist in the input data or occur among updated clusters during joining, the resulting cluster solution may depend on the order of cases in the file. You may want to obtain several different solutions with cases sorted in different random orders to verify the stability of a given solution.

Assumptions. The distance or similarity measures used should be appropriate for the data analyzed (see the Proximities procedure for more information on choices of distance and similarity measures). Also, you should include all relevant variables in your analysis. Omission of influential variables can result in a misleading solution. Because hierarchical cluster analysis is an exploratory method, results should be treated as tentative until they are confirmed with an independent sample.

To Obtain a Hierarchical Cluster Analysis Collapse Hide details

To Obtain a Hierarchical Cluster Analysis

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Classify
Hierarchical Cluster...

If you are clustering cases, select at least one numeric variable. If you are clustering variables, select at least three numeric variables.

Optionally, you can select an identification variable to label cases.

This procedure pastes CLUSTER command syntax.

See CLUSTER Algorithms for computational details for this procedure.

Related Topics

Hierarchical Cluster Analysis: Related Procedures
Hierarchical Cluster Analysis Method
Hierarchical Cluster Analysis Measures for Interval Data
Hierarchical Cluster Analysis Measures for Count Data
Hierarchical Cluster Analysis Measures for Binary Data
Hierarchical Cluster Analysis Transform Values
Hierarchical Cluster Analysis Statistics
Hierarchical Cluster Analysis Plots
Hierarchical Cluster Analysis Save New Variables
CLUSTER


Hierarchical Cluster Analysis Method

Hierarchical Cluster Analysis,Hierarchical Cluster Analysis,Hierarchical Cluster Analysis
clustering methods,clustering methods,clustering methods
Hierarchical Cluster Analysis,Hierarchical Cluster Analysis,Hierarchical Cluster Analysis
distance measures,distance measures,distance measures
Hierarchical Cluster Analysis,Hierarchical Cluster Analysis,Hierarchical Cluster Analysis
transforming measures,transforming measures,transforming measures
Hierarchical Cluster Analysis,Hierarchical Cluster Analysis,Hierarchical Cluster Analysis
transforming values,transforming values,transforming values
Hierarchical Cluster Analysis,Hierarchical Cluster Analysis,Hierarchical Cluster Analysis
similarity measures,similarity measures,similarity measures
similarity measures,similarity measures,similarity measures
in Hierarchical Cluster Analysis,in Hierarchical Cluster Analysis,in Hierarchical Cluster Analysis
distance measures,distance measures,distance measures
in Hierarchical Cluster Analysis,in Hierarchical Cluster Analysis,in Hierarchical Cluster Analysis

Cluster Method. Available alternatives are between-groups linkage, within-groups linkage, nearest neighbor, furthest neighbor, centroid clustering, median clustering, and Ward's method.

Measure. Allows you to specify the distance or similarity measure to be used in clustering. Select the type of data and the appropriate distance or similarity measure:

• Interval. Available alternatives are Euclidean distance, squared Euclidean distance, cosine, Pearson correlation, Chebychev, block, Minkowski, and customized.

• Counts. Available alternatives are chi-square measure and phi-square measure.

• Binary. Available alternatives are Euclidean distance, squared Euclidean distance, size difference, pattern difference, variance, dispersion, shape, simple matching, phi 4-point correlation, lambda, Anderberg's D, dice, Hamann, Jaccard, Kulczynski 1, Kulczynski 2, Lance and Williams, Ochiai, Rogers and Tanimoto, Russel and Rao, Sokal and Sneath 1, Sokal and Sneath 2, Sokal and Sneath 3, Sokal and Sneath 4, Sokal and Sneath 5, Yule's Y, and Yule's Q.

Transform Values. Allows you to standardize data values for either cases or values before computing proximities (not available for binary data). Available standardization methods are z scores, range −1 to 1, range 0 to 1, maximum magnitude of 1, mean of 1, and standard deviation of 1.

Transform Measures. Allows you to transform the values generated by the distance measure. They are applied after the distance measure has been computed. Available alternatives are absolute values, change sign, and rescale to 0–1 range.

Specifying the Clustering Method Collapse Hide details

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Classify
Hierarchical Cluster...

In the Hierarchical Cluster Analysis dialog box, click Method.

Related Topics

Hierarchical Cluster Analysis: Related Procedures
Hierarchical Cluster Analysis
Hierarchical Cluster Analysis Measures for Interval Data
Hierarchical Cluster Analysis Measures for Count Data
Hierarchical Cluster Analysis Measures for Binary Data
Hierarchical Cluster Analysis Transform Values
Hierarchical Cluster Analysis Statistics
Hierarchical Cluster Analysis Plots
Hierarchical Cluster Analysis Save New Variables


Hierarchical Cluster Analysis Measures for Interval Data

Hierarchical Cluster Analysis,Hierarchical Cluster Analysis,Hierarchical Cluster Analysis
measures for interval data,measures for interval data,measures for interval data
Hierarchical Cluster Analysis,Hierarchical Cluster Analysis,Hierarchical Cluster Analysis
creating distance matrices,creating distance matrices,creating distance matrices
Euclidean distance,Euclidean distance,Euclidean distance
in Hierarchical Cluster Analysis,in Hierarchical Cluster Analysis,in Hierarchical Cluster Analysis
squared Euclidean distance,squared Euclidean distance,squared Euclidean distance
in Hierarchical Cluster Analysis,in Hierarchical Cluster Analysis,in Hierarchical Cluster Analysis
Chebychev distance,Chebychev distance,Chebychev distance
in Hierarchical Cluster Analysis,in Hierarchical Cluster Analysis,in Hierarchical Cluster Analysis
block distance,block distance,block distance
in Hierarchical Cluster Analysis,in Hierarchical Cluster Analysis,in Hierarchical Cluster Analysis
Minkowski distance,Minkowski distance,Minkowski distance
in Hierarchical Cluster Analysis,in Hierarchical Cluster Analysis,in Hierarchical Cluster Analysis
Pearson correlation,Pearson correlation,Pearson correlation
in Hierarchical Cluster Analysis,in Hierarchical Cluster Analysis,in Hierarchical Cluster Analysis
cosine,cosine,cosine
in Hierarchical Cluster Analysis,in Hierarchical Cluster Analysis,in Hierarchical Cluster Analysis
customized distance measures,customized distance measures,customized distance measures
in Hierarchical Cluster Analysis,in Hierarchical Cluster Analysis,in Hierarchical Cluster Analysis

The following dissimilarity measures are available for interval data:

• Euclidean distance. The square root of the sum of the squared differences between values for the items. This is the default for interval data.

• Squared Euclidean distance. The sum of the squared differences between the values for the items.

• Pearson correlation. The product-moment correlation between two vectors of values.

• Cosine. The cosine of the angle between two vectors of values.

• Chebychev. The maximum absolute difference between the values for the items.

• Block. The sum of the absolute differences between the values of the item. Also known as Manhattan distance.

• Minkowski. The pth root of the sum of the absolute differences to the pth power between the values for the items.

• Customized. The rth root of the sum of the absolute differences to the pth power between the values for the items.

Related Topics

Hierarchical Cluster Analysis: Related Procedures
Hierarchical Cluster Analysis
Hierarchical Cluster Analysis Method
Hierarchical Cluster Analysis Measures for Count Data
Hierarchical Cluster Analysis Measures for Binary Data
Hierarchical Cluster Analysis Transform Values
Hierarchical Cluster Analysis Statistics
Hierarchical Cluster Analysis Plots
Hierarchical Cluster Analysis Save New Variables


Hierarchical Cluster Analysis Measures for Count Data

Hierarchical Cluster Analysis,Hierarchical Cluster Analysis,Hierarchical Cluster Analysis
measures for count data,measures for count data,measures for count data
Hierarchical Cluster Analysis,Hierarchical Cluster Analysis,Hierarchical Cluster Analysis
creating distance matrices,creating distance matrices,creating distance matrices
chi-square distance,chi-square distance,chi-square distance
in Hierarchical Cluster Analysis,in Hierarchical Cluster Analysis,in Hierarchical Cluster Analysis
phi-square distance measure,phi-square distance measure,phi-square distance measure
in Hierarchical Cluster Analysis,in Hierarchical Cluster Analysis,in Hierarchical Cluster Analysis

The following dissimilarity measures are available for count data:

• Chi-square measure. This measure is based on the chi-square test of equality for two sets of frequencies. This is the default for count data.

• Phi-square measure. This measure is equal to the chi-square measure normalized by the square root of the combined frequency.

Related Topics

Hierarchical Cluster Analysis: Related Procedures
Hierarchical Cluster Analysis
Hierarchical Cluster Analysis Method
Hierarchical Cluster Analysis Measures for Interval Data
Hierarchical Cluster Analysis Measures for Binary Data
Hierarchical Cluster Analysis Transform Values
Hierarchical Cluster Analysis Statistics
Hierarchical Cluster Analysis Plots
Hierarchical Cluster Analysis Save New Variables


Hierarchical Cluster Analysis Measures for Binary Data

Hierarchical Cluster Analysis,Hierarchical Cluster Analysis,Hierarchical Cluster Analysis
measures for binary data,measures for binary data,measures for binary data
Hierarchical Cluster Analysis,Hierarchical Cluster Analysis,Hierarchical Cluster Analysis
creating distance matrices,creating distance matrices,creating distance matrices
binary Euclidean distance,binary Euclidean distance,binary Euclidean distance
in Hierarchical Cluster Analysis,in Hierarchical Cluster Analysis,in Hierarchical Cluster Analysis
binary squared Euclidean distance,binary squared Euclidean distance,binary squared Euclidean distance
in Hierarchical Cluster Analysis,in Hierarchical Cluster Analysis,in Hierarchical Cluster Analysis
size difference measure,size difference measure,size difference measure
in Hierarchical Cluster Analysis,in Hierarchical Cluster Analysis,in Hierarchical Cluster Analysis
pattern difference measure,pattern difference measure,pattern difference measure
in Hierarchical Cluster Analysis,in Hierarchical Cluster Analysis,in Hierarchical Cluster Analysis
variance distance,variance distance,variance distance
in Hierarchical Cluster Analysis,in Hierarchical Cluster Analysis,in Hierarchical Cluster Analysis
Lance and Williams dissimilarity measure,Lance and Williams dissimilarity measure,Lance and Williams dissimilarity measure
in Hierarchical Cluster Analysis,in Hierarchical Cluster Analysis,in Hierarchical Cluster Analysis
Russell and Rao measure,Russell and Rao measure,Russell and Rao measure
in Hierarchical Cluster Analysis,in Hierarchical Cluster Analysis,in Hierarchical Cluster Analysis
Jaccard similarity ratio,Jaccard similarity ratio,Jaccard similarity ratio
in Hierarchical Cluster Analysis,in Hierarchical Cluster Analysis,in Hierarchical Cluster Analysis
Dice measure,Dice measure,Dice measure
in Hierarchical Cluster Analysis,in Hierarchical Cluster Analysis,in Hierarchical Cluster Analysis
Sokal and Sneath measures,Sokal and Sneath measures,Sokal and Sneath measures
in Hierarchical Cluster Analysis,in Hierarchical Cluster Analysis,in Hierarchical Cluster Analysis
Rogers and Tanimoto measure,Rogers and Tanimoto measure,Rogers and Tanimoto measure
in Hierarchical Cluster Analysis,in Hierarchical Cluster Analysis,in Hierarchical Cluster Analysis
Kulczynski measures,Kulczynski measures,Kulczynski measures
in Hierarchical Cluster Analysis,in Hierarchical Cluster Analysis,in Hierarchical Cluster Analysis
Hamann measure,Hamann measure,Hamann measure
in Hierarchical Cluster Analysis,in Hierarchical Cluster Analysis,in Hierarchical Cluster Analysis
lambda,lambda,lambda
in Hierarchical Cluster Analysis,in Hierarchical Cluster Analysis,in Hierarchical Cluster Analysis
Anderberg's D,Anderberg's D,Anderberg's D
in Hierarchical Cluster Analysis,in Hierarchical Cluster Analysis,in Hierarchical Cluster Analysis
Yule's Y,Yule's Y,Yule's Y
in Hierarchical Cluster Analysis,in Hierarchical Cluster Analysis,in Hierarchical Cluster Analysis
Yule's Q,Yule's Q,Yule's Q
in Hierarchical Cluster Analysis,in Hierarchical Cluster Analysis,in Hierarchical Cluster Analysis
Ochiai measure,Ochiai measure,Ochiai measure
in Hierarchical Cluster Analysis,in Hierarchical Cluster Analysis,in Hierarchical Cluster Analysis
phi,phi,phi
4-point correlation,4-point correlation,4-point correlation
dispersion measure,dispersion measure,dispersion measure
in Hierarchical Cluster Analysis,in Hierarchical Cluster Analysis,in Hierarchical Cluster Analysis

The following dissimilarity measures are available for binary data:

• Euclidean distance. Computed from a fourfold table as SQRT(b+c), where b and c represent the diagonal cells corresponding to cases present on one item but absent on the other.

• Squared Euclidean distance. Computed as the number of discordant cases. Its minimum value is 0, and it has no upper limit.

• Size difference. An index of asymmetry. It ranges from 0 to 1.

• Pattern difference. Dissimilarity measure for binary data that ranges from 0 to 1. Computed from a fourfold table as bc/(n**2), where b and c represent the diagonal cells corresponding to cases present on one item but absent on the other, and n is the total number of observations.

• Variance. Computed from a fourfold table as (b+c)/4n, where b and c represent the diagonal cells corresponding to cases present on one item but absent on the other and n is the total number of observations. It ranges from 0 to 1.

• Dispersion. This similarity index has a range of −1 to 1.

• Shape. This distance measure has a range of 0 to 1, and it penalizes asymmetry of mismatches.

• Simple matching. This is the ratio of matches to the total number of values. Equal weight is given to matches and nonmatches.

• Phi 4-point correlation. This index is a binary analog of the Pearson correlation coefficient. It has a range of −1 to 1.

• Lambda. This index is Goodman and Kruskal's lambda. Corresponds to the proportional reduction of error (PRE) using one item to predict the other (predicting in both directions). Values range from 0 to 1.

• Anderberg's D. Similar to lambda, this index corresponds to the actual reduction of error using one item to predict the other (predicting in both directions). Values range from 0 to 1.

• Dice. This is an index in which joint absences are excluded from consideration, and matches are weighted double. Also known as the Czekanowski or Sorensen measure.

• Hamann. This index is the number of matches minus the number of nonmatches, divided by the total number of items. It ranges from −1 to 1.

• Jaccard. This is an index in which joint absences are excluded from consideration. Equal weight is given to matches and nonmatches. Also known as the similarity ratio.

• Kulczynski 1. This is the ratio of joint presences to all nonmatches. This index has a lower bound of 0 and is unbounded above. It is theoretically undefined when there are no nonmatches; however, the software assigns an arbitrary value of 9999.999 when the value is undefined or is greater than this value.

• Kulczynski 2. This index is based on the conditional probability that the characteristic is present in one item, given that it is present in the other. The separate values for each item acting as a predictor of the other are averaged to compute this value.

• Lance and Williams. Computed from a fourfold table as (b+c)/(2a+b+c), where a represents the cell corresponding to cases present on both items, and b and c represent the diagonal cells corresponding to cases present on one item but absent on the other. This measure has a range of 0 to 1. (Also known as the Bray-Curtis nonmetric coefficient.)

• Ochiai. This index is the binary form of the cosine similarity measure. It has a range of 0 to 1.

• Rogers and Tanimoto. This is an index in which double weight is given to nonmatches.

• Russel and Rao. This is a binary version of the inner (dot) product. Equal weight is given to matches and nonmatches. This is the default for binary similarity data.

• Sokal and Sneath 1. This is an index in which double weight is given to matches.

• Sokal and Sneath 2. This is an index in which double weight is given to nonmatches, and joint absences are excluded from consideration.

• Sokal and Sneath 3. This is the ratio of matches to nonmatches. This index has a lower bound of 0 and is unbounded above. It is theoretically undefined when there are no nonmatches; however, the software assigns an arbitrary value of 9999.999 when the value is undefined or is greater than this value.

• Sokal and Sneath 4. This index is based on the conditional probability that the characteristic in one item matches the value in the other. The separate values for each item acting as a predictor of the other are averaged to compute this value.

• Sokal and Sneath 5. This index is the squared geometric mean of conditional probabilities of positive and negative matches. It is independent of item coding. It has a range of 0 to 1.

• Yule's Y. This index is a function of the cross-ratio for a 2 x 2 table and is independent of the marginal totals. It has a range of −1 to 1. Also known as the coefficient of colligation.

• Yule's Q. This index is a special case of Goodman and Kruskal's gamma. It is a function of the cross-ratio and is independent of the marginal totals. It has a range of −1 to 1.

You may optionally change the Present and Absent fields to specify the values that indicate that a characteristic is present or absent. The procedure will ignore all other values.

Related Topics

Hierarchical Cluster Analysis: Related Procedures
Hierarchical Cluster Analysis
Hierarchical Cluster Analysis Method
Hierarchical Cluster Analysis Measures for Interval Data
Hierarchical Cluster Analysis Measures for Count Data
Hierarchical Cluster Analysis Transform Values
Hierarchical Cluster Analysis Statistics
Hierarchical Cluster Analysis Plots
Hierarchical Cluster Analysis Save New Variables


Hierarchical Cluster Analysis Transform Values

Hierarchical Cluster Analysis,Hierarchical Cluster Analysis,Hierarchical Cluster Analysis
transforming values,transforming values,transforming values
Hierarchical Cluster Analysis,Hierarchical Cluster Analysis,Hierarchical Cluster Analysis
creating distance matrices,creating distance matrices,creating distance matrices
Hierarchical Cluster Analysis,Hierarchical Cluster Analysis,Hierarchical Cluster Analysis
standardizing values,standardizing values,standardizing values

The following alternatives are available for transforming values:

• Z scores. Values are standardized to z scores, with a mean of 0 and a standard deviation of 1.

• Range −1 to 1. Each value for the item being standardized is divided by the range of the values.

• Range 0 to 1. The procedure subtracts the minimum value from each item being standardized and then divides by the range.

• Maximum magnitude of 1. The procedure divides each value for the item being standardized by the maximum of the values.

• Mean of 1. The procedure divides each value for the item being standardized by the mean of the values.

• Standard deviation of 1. The procedure divides each value for the variable or case being standardized by the standard deviation of the values.

Additionally, you can choose how standardization is done. Alternatives are By variable or By case.

Related Topics

Hierarchical Cluster Analysis: Related Procedures
Hierarchical Cluster Analysis
Hierarchical Cluster Analysis Method
Hierarchical Cluster Analysis Measures for Interval Data
Hierarchical Cluster Analysis Measures for Count Data
Hierarchical Cluster Analysis Measures for Binary Data
Hierarchical Cluster Analysis Statistics
Hierarchical Cluster Analysis Plots
Hierarchical Cluster Analysis Save New Variables


Hierarchical Cluster Analysis Statistics

Hierarchical Cluster Analysis,Hierarchical Cluster Analysis,Hierarchical Cluster Analysis
agglomeration schedules,agglomeration schedules,agglomeration schedules
Hierarchical Cluster Analysis,Hierarchical Cluster Analysis,Hierarchical Cluster Analysis
distance matrices,distance matrices,distance matrices
Hierarchical Cluster Analysis,Hierarchical Cluster Analysis,Hierarchical Cluster Analysis
cluster membership,cluster membership,cluster membership
Hierarchical Cluster Analysis,Hierarchical Cluster Analysis,Hierarchical Cluster Analysis
statistics,statistics,statistics

Agglomeration schedule. Displays the cases or clusters combined at each stage, the distances between the cases or clusters being combined, and the last cluster level at which a case (or variable) joined the cluster.

Proximity matrix. Gives the distances or similarities between items.

Cluster Membership. Displays the cluster to which each case is assigned at one or more stages in the combination of clusters. Available options are single solution and range of solutions.

Specifying Statistics Settings Collapse Hide details

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Classify
Hierarchical Cluster...

In the Hierarchical Cluster Analysis dialog box, click Statistics.

Related Topics

Hierarchical Cluster Analysis: Related Procedures
Hierarchical Cluster Analysis
Hierarchical Cluster Analysis Method
Hierarchical Cluster Analysis Measures for Interval Data
Hierarchical Cluster Analysis Measures for Count Data
Hierarchical Cluster Analysis Measures for Binary Data
Hierarchical Cluster Analysis Transform Values
Hierarchical Cluster Analysis Plots
Hierarchical Cluster Analysis Save New Variables


Hierarchical Cluster Analysis Plots

Hierarchical Cluster Analysis,Hierarchical Cluster Analysis,Hierarchical Cluster Analysis
dendrograms,dendrograms,dendrograms
Hierarchical Cluster Analysis,Hierarchical Cluster Analysis,Hierarchical Cluster Analysis
icicle plots,icicle plots,icicle plots
Hierarchical Cluster Analysis,Hierarchical Cluster Analysis,Hierarchical Cluster Analysis
plot orientation,plot orientation,plot orientation
dendrograms,dendrograms,dendrograms
in Hierarchical Cluster Analysis,in Hierarchical Cluster Analysis,in Hierarchical Cluster Analysis
icicle plots,icicle plots,icicle plots
in Hierarchical Cluster Analysis,in Hierarchical Cluster Analysis,in Hierarchical Cluster Analysis

Dendrogram. Displays a dendrogram. Dendrograms can be used to assess the cohesiveness of the clusters formed and can provide information about the appropriate number of clusters to keep.

Icicle. Displays an icicle plot, including all clusters or a specified range of clusters. Icicle plots display information about how cases are combined into clusters at each iteration of the analysis. Orientation allows you to select a vertical or horizontal plot.

Choosing Plot Settings Collapse Hide details

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Classify
Hierarchical Cluster...

In the Hierarchical Cluster Analysis dialog box, click Plots.

Related Topics

Hierarchical Cluster Analysis: Related Procedures
Hierarchical Cluster Analysis
Hierarchical Cluster Analysis Method
Hierarchical Cluster Analysis Measures for Interval Data
Hierarchical Cluster Analysis Measures for Count Data
Hierarchical Cluster Analysis Measures for Binary Data
Hierarchical Cluster Analysis Transform Values
Hierarchical Cluster Analysis Statistics
Hierarchical Cluster Analysis Save New Variables


Hierarchical Cluster Analysis Save New Variables

Hierarchical Cluster Analysis,Hierarchical Cluster Analysis,Hierarchical Cluster Analysis
saving new variables,saving new variables,saving new variables
Hierarchical Cluster Analysis,Hierarchical Cluster Analysis,Hierarchical Cluster Analysis
cluster membership,cluster membership,cluster membership

Cluster Membership. Allows you to save cluster memberships for a single solution or a range of solutions. Saved variables can then be used in subsequent analyses to explore other differences between groups.

Related Topics

Hierarchical Cluster Analysis: Related Procedures
Hierarchical Cluster Analysis
Hierarchical Cluster Analysis Method
Hierarchical Cluster Analysis Measures for Interval Data
Hierarchical Cluster Analysis Measures for Count Data
Hierarchical Cluster Analysis Measures for Binary Data
Hierarchical Cluster Analysis Transform Values
Hierarchical Cluster Analysis Statistics
Hierarchical Cluster Analysis Plots


Saving New Variables

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Classify
Hierarchical Cluster...

In the Hierarchical Cluster Analysis dialog box, click Save.


CLUSTER Command Syntax Additional Features

Hierarchical Cluster Analysis,Hierarchical Cluster Analysis,Hierarchical Cluster Analysis
command additional features,command additional features,command additional features

The Hierarchical Cluster procedure uses CLUSTER command syntax. The command syntax language also allows you to:

• Use several clustering methods in a single analysis.

• Read and analyze a proximity matrix.

• Write a proximity matrix to disk for later analysis.

• Specify any values for power and root in the customized (Power) distance measure.

• Specify names for saved variables.

Related Topics

CLUSTER


K-Means Cluster Analysis

cluster analysis,cluster analysis,cluster analysis
K-Means Cluster Analysis,K-Means Cluster Analysis,K-Means Cluster Analysis
K-Means Cluster Analysis,K-Means Cluster Analysis,K-Means Cluster Analysis
examples,examples,examples
K-Means Cluster Analysis,K-Means Cluster Analysis,K-Means Cluster Analysis
statistics,statistics,statistics
K-Means Cluster Analysis,K-Means Cluster Analysis,K-Means Cluster Analysis
methods,methods,methods
K-Means Cluster Analysis,K-Means Cluster Analysis,K-Means Cluster Analysis
overview,overview,overview

This procedure attempts to identify relatively homogeneous groups of cases based on selected characteristics, using an algorithm that can handle large numbers of cases. However, the algorithm requires you to specify the number of clusters. You can specify initial cluster centers if you know this information. You can select one of two methods for classifying cases, either updating cluster centers iteratively or classifying only. You can save cluster membership, distance information, and final cluster centers. Optionally, you can specify a variable whose values are used to label casewise output. You can also request analysis of variance F statistics. While these statistics are opportunistic (the procedure tries to form groups that do differ), the relative size of the statistics provides information about each variable's contribution to the separation of the groups.

Example. What are some identifiable groups of television shows that attract similar audiences within each group? With k-means cluster analysis, you could cluster television shows (cases) into k homogeneous groups based on viewer characteristics. This process can be used to identify segments for marketing. Or you can cluster cities (cases) into homogeneous groups so that comparable cities can be selected to test various marketing strategies.

Statistics. Complete solution: initial cluster centers, ANOVA table. Each case: cluster information, distance from cluster center.

Show me

K-Means Cluster Analysis Data Considerations Collapse Hide details

Data. Variables should be quantitative at the interval or ratio level. If your variables are binary or counts, use the Hierarchical Cluster Analysis procedure.

Case and initial cluster center order. The default algorithm for choosing initial cluster centers is not invariant to case ordering. The Use running means option in the Iterate dialog box makes the resulting solution potentially dependent on case order, regardless of how initial cluster centers are chosen. If you are using either of these methods, you may want to obtain several different solutions with cases sorted in different random orders to verify the stability of a given solution. Specifying initial cluster centers and not using the Use running means option will avoid issues related to case order. However, ordering of the initial cluster centers may affect the solution if there are tied distances from cases to cluster centers. To assess the stability of a given solution, you can compare results from analyses with different permutations of the initial center values.

Assumptions. Distances are computed using simple Euclidean distance. If you want to use another distance or similarity measure, use the Hierarchical Cluster Analysis procedure. Scaling of variables is an important consideration. If your variables are measured on different scales (for example, one variable is expressed in dollars and another variable is expressed in years), your results may be misleading. In such cases, you should consider standardizing your variables before you perform the k-means cluster analysis (this task can be done in the Descriptives procedure). The procedure assumes that you have selected the appropriate number of clusters and that you have included all relevant variables. If you have chosen an inappropriate number of clusters or omitted important variables, your results may be misleading.

To Obtain a K-Means Cluster Analysis Collapse Hide details

To Obtain a K-Means Cluster Analysis

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Classify
K-Means Cluster...

Select the variables to be used in the cluster analysis.

Specify the number of clusters. (The number of clusters must be at least 2 and must not be greater than the number of cases in the data file.)

Select either Iterate and classify or Classify only.

Optionally, select an identification variable to label cases.

This procedure pastes QUICK CLUSTER command syntax.

See QUICK CLUSTER Algorithms for computational details for this procedure.

Related Topics

K-Means Cluster Analysis: Related Procedures
K-Means Cluster Analysis Efficiency
K-Means Cluster Analysis Iterate
K-Means Cluster Analysis Save
K-Means Cluster Analysis Options
QUICK CLUSTER


K-Means Cluster Analysis Efficiency

K-Means Cluster Analysis,K-Means Cluster Analysis,K-Means Cluster Analysis
efficiency,efficiency,efficiency
cluster analysis,cluster analysis,cluster analysis
efficiency,efficiency,efficiency

The k-means cluster analysis command is efficient primarily because it does not compute the distances between all pairs of cases, as do many clustering algorithms, including the algorithm that is used by the hierarchical clustering command.

For maximum efficiency, take a sample of cases and select the Iterate and classify method to determine cluster centers. Select Write final as. Then restore the entire data file and select Classify only as the method and select Read initial from to classify the entire file using the centers that are estimated from the sample. You can write to and read from a file or a dataset. Datasets are available for subsequent use in the same session but are not saved as files unless explicitly saved prior to the end of the session. Dataset names must conform to variable-naming rules. See the topic Variable Names for more information.

Related Topics

K-Means Cluster Analysis: Related Procedures
K-Means Cluster Analysis
K-Means Cluster Analysis Iterate
K-Means Cluster Analysis Save
K-Means Cluster Analysis Options


K-Means Cluster Analysis Iterate

K-Means Cluster Analysis,K-Means Cluster Analysis,K-Means Cluster Analysis
iterations,iterations,iterations
K-Means Cluster Analysis,K-Means Cluster Analysis,K-Means Cluster Analysis
convergence criteria,convergence criteria,convergence criteria
convergence,convergence,convergence
in K-Means Cluster Analysis,in K-Means Cluster Analysis,in K-Means Cluster Analysis
iterations,iterations,iterations
in K-Means Cluster Analysis,in K-Means Cluster Analysis,in K-Means Cluster Analysis

Note: These options are available only if you select the Iterate and classify method from the K-Means Cluster Analysis dialog box.

Maximum Iterations. Limits the number of iterations in the k-means algorithm. Iteration stops after this many iterations even if the convergence criterion is not satisfied. This number must be between 1 and 999.

To reproduce the algorithm used by the Quick Cluster command prior to version 5.0, set Maximum Iterations to 1.

Convergence Criterion. Determines when iteration ceases. It represents a proportion of the minimum distance between initial cluster centers, so it must be greater than 0 but not greater than 1. If the criterion equals 0.02, for example, iteration ceases when a complete iteration does not move any of the cluster centers by a distance of more than 2% of the smallest distance between any initial cluster centers.

Use running means. Allows you to request that cluster centers be updated after each case is assigned. If you do not select this option, new cluster centers are calculated after all cases have been assigned.

Specifying Iteration Settings Collapse Hide details

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Classify
K-Means Cluster...

In the K-Means Cluster dialog box, click Iterate.

Related Topics

K-Means Cluster Analysis: Related Procedures
K-Means Cluster Analysis
K-Means Cluster Analysis Efficiency
K-Means Cluster Analysis Save
K-Means Cluster Analysis Options


K-Means Cluster Analysis Save

K-Means Cluster Analysis,K-Means Cluster Analysis,K-Means Cluster Analysis
cluster membership,cluster membership,cluster membership
K-Means Cluster Analysis,K-Means Cluster Analysis,K-Means Cluster Analysis
cluster distances,cluster distances,cluster distances
K-Means Cluster Analysis,K-Means Cluster Analysis,K-Means Cluster Analysis
saving cluster information,saving cluster information,saving cluster information

You can save information about the solution as new variables to be used in subsequent analyses:

Cluster membership. Creates a new variable indicating the final cluster membership of each case. Values of the new variable range from 1 to the number of clusters.

Distance from cluster center. Creates a new variable indicating the Euclidean distance between each case and its classification center.

Saving Cluster Information Collapse Hide details

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Classify
K-Means Cluster...

In the K-Means Cluster dialog box, click Save.

Related Topics

K-Means Cluster Analysis: Related Procedures
K-Means Cluster Analysis
K-Means Cluster Analysis Efficiency
K-Means Cluster Analysis Iterate
K-Means Cluster Analysis Options


K-Means Cluster Analysis Options

K-Means Cluster Analysis,K-Means Cluster Analysis,K-Means Cluster Analysis
statistics,statistics,statistics
K-Means Cluster Analysis,K-Means Cluster Analysis,K-Means Cluster Analysis
missing values,missing values,missing values

Statistics. You can select the following statistics: initial cluster centers, ANOVA table, and cluster information for each case.

Expand Show details Collapse Hide details

• Initial cluster centers. First estimate of the variable means for each of the clusters. By default, a number of well-spaced cases equal to the number of clusters is selected from the data. Initial cluster centers are used for a first round of classification and are then updated.

• ANOVA table. Displays an analysis-of-variance table which includes univariate F tests for each clustering variable. The F tests are only descriptive and the resulting probabilities should not be interpreted. The ANOVA table is not displayed if all cases are assigned to a single cluster.

• Cluster information for each case. Displays for each case the final cluster assignment and the Euclidean distance between the case and the cluster center used to classify the case. Also displays Euclidean distance between final cluster centers.

Missing Values. Available options are Exclude cases listwise or Exclude cases pairwise.

Expand Show details Collapse Hide details

• Exclude cases listwise. Excludes cases with missing values for any clustering variable from the analysis.

• Exclude cases pairwise. Assigns cases to clusters based on distances that are computed from all variables with nonmissing values.

Specifying Options Collapse Hide details

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Classify
K-Means Cluster...

In the K-Means Cluster dialog box, click Options.

Related Topics

K-Means Cluster Analysis: Related Procedures
K-Means Cluster Analysis
K-Means Cluster Analysis Efficiency
K-Means Cluster Analysis Iterate
K-Means Cluster Analysis Save


QUICK CLUSTER Command Additional Features

K-Means Cluster Analysis,K-Means Cluster Analysis,K-Means Cluster Analysis
command additional features,command additional features,command additional features

The K-Means Cluster procedure uses QUICK CLUSTER command syntax. The command syntax language also allows you to:

• Accept the first k cases as initial cluster centers, thereby avoiding the data pass that is normally used to estimate them.

• Specify initial cluster centers directly as a part of the command syntax.

• Specify names for saved variables.

Related Topics

QUICK CLUSTER


Nonparametric Tests

Nonparametric tests make minimal assumptions about the underlying distribution of the data. The tests that are available in these dialogs can be grouped into three broad categories based on how the data are organized:

• A one-sample test analyzes one field.

• A test for related samples compares two or more fields for the same set of cases.

• An independent-samples test analyzes one field that is grouped by categories of another field.

Related Topics

One-Sample Nonparametric Tests
Independent-Samples Nonparametric Tests
Related-Samples Nonparametric Tests
Model View (nonparametric tests)


One-Sample Nonparametric Tests

One-Sample Nonparametric Tests,One-Sample Nonparametric Tests,One-Sample Nonparametric Tests

One-sample nonparametric tests identify differences in single fields using one or more nonparametric tests. Nonparametric tests do not assume your data follow the normal distribution.

Expand Show details Collapse Hide details
One-Sample Nonparametric Tests Objective tab

What is your objective? The objectives allow you to quickly specify different but commonly used test settings.

• Automatically compare observed data to hypothesized. This objective applies the Binomial test to categorical fields with only two categories, the Chi-Square test to all other categorical fields, and the Kolmogorov-Smirnov test to continuous fields.

• Test sequence for randomness. This objective uses the Runs test to test the observed sequence of data values for randomness.

• Custom analysis. When you want to manually amend the test settings on the Settings tab, select this option. Note that this setting is automatically selected if you subsequently make changes to options on the Settings tab that are incompatible with the currently selected objective.

This procedure pastes NPTESTS command syntax.

See Nonparametric Tests Algorithms for computational details for this feature.

To Obtain One-Sample Nonparametric Tests

Related Topics

To Obtain One-Sample Nonparametric Tests
Fields Tab (One-Sample Nonparametric Tests)
Settings Tab (One-Sample Nonparametric Tests)
NPTESTS
Independent-Samples Nonparametric Tests
Related-Samples Nonparametric Tests
Model View (nonparametric tests)


To Obtain One-Sample Nonparametric Tests

From the menus choose:

Analyze
Nonparametric Tests
One Sample...

Click Run.

Optionally, you can:

• Specify an objective on the Objective tab.

• Specify field assignments on the Fields tab.

• Specify expert settings on the Settings tab.

Related Topics

One-Sample Nonparametric Tests
Fields Tab (One-Sample Nonparametric Tests)
Settings Tab (One-Sample Nonparametric Tests)


Fields Tab (One-Sample Nonparametric Tests)

One-Sample Nonparametric Tests,One-Sample Nonparametric Tests,One-Sample Nonparametric Tests
fields,fields,fields
Expand Show details Collapse Hide details
One-Sample Nonparametric Tests Fields tab

The Fields tab specifies which fields should be tested.

Use predefined roles. This option uses existing field information. All fields with a predefined role as Input, Target, or Both will be used as test fields. At least one test field is required. See the topic Roles for more information.

Use custom field assignments. This option allows you to override field roles. After selecting this option, specify the fields below:

• Test Fields. Select one or more fields.

To Obtain One-Sample Nonparametric Tests

Related Topics

One-Sample Nonparametric Tests
To Obtain One-Sample Nonparametric Tests
Settings Tab (One-Sample Nonparametric Tests)


Settings Tab (One-Sample Nonparametric Tests)

The Settings tab comprises several different groups of settings that you can modify to fine-tune how the algorithm processes your data. If you make any changes to the default settings that are incompatible with the currently selected objective, the Objective tab is automatically updated to select the Customize analysis option.

To Obtain One-Sample Nonparametric Tests

Related Topics

One-Sample Nonparametric Tests
To Obtain One-Sample Nonparametric Tests
Fields Tab (One-Sample Nonparametric Tests)
Choose Tests (One-Sample Nonparametric Tests)
Binomial Test Options (One-Sample Nonparametric Tests)
Chi-Square Test Options (One-Sample Nonparametric Tests)
Kolmogorov-Smirnov Options (One-Sample Nonparametric Tests)
Runs Test Options (One-Sample Nonparametric Tests)
Test Options (One-Sample Nonparametric Tests)
User-Missing Values (One-Sample Nonparametric Tests)


Choose Tests (One-Sample Nonparametric Tests)

binomial test,binomial test,binomial test
One-Sample Nonparametric Tests,One-Sample Nonparametric Tests,One-Sample Nonparametric Tests
chi-square test,chi-square test,chi-square test
One-Sample Nonparametric Tests,One-Sample Nonparametric Tests,One-Sample Nonparametric Tests
Kolmogorov-Smirnov test,Kolmogorov-Smirnov test,Kolmogorov-Smirnov test
One-Sample Nonparametric Tests,One-Sample Nonparametric Tests,One-Sample Nonparametric Tests
Wilcoxon signed-rank test,Wilcoxon signed-rank test,Wilcoxon signed-rank test
One-Sample Nonparametric Tests,One-Sample Nonparametric Tests,One-Sample Nonparametric Tests
runs test,runs test,runs test
One-Sample Nonparametric Tests,One-Sample Nonparametric Tests,One-Sample Nonparametric Tests
Expand Show details Collapse Hide details
One-Sample Nonparametric Tests Choose Tests Settings

These settings specify the tests to be performed on the fields specified on the Fields tab.

Automatically choose the tests based on the data. This setting applies the Binomial test to categorical fields with only two valid (non-missing) categories, the Chi-Square test to all other categorical fields, and the Kolmogorov-Smirnov test to continuous fields.

Customize tests. This setting allows you to choose specific tests to be performed.

• Compare observed binary probability to hypothesized (Binomial test). The Binomial test can be applied to all fields. This produces a one-sample test that tests whether the observed distribution of a flag field (a categorical field with only two categories) is the same as what is expected from a specified binomial distribution. In addition, you can request confidence intervals. See Binomial Test Options (One-Sample Nonparametric Tests) for details on the test settings.

• Compare observed probabilities to hypothesized (Chi-Square test). The Chi-Square test is applied to nominal and ordinal fields. This produces a one-sample test that computes a chi-square statistic based on the differences between the observed and expected frequencies of categories of a field. See Chi-Square Test Options (One-Sample Nonparametric Tests) for details on the test settings.

• Test observed distribution against hypothesized (Kolmogorov-Smirnov test). The Kolmogorov-Smirnov test is applied to continuous fields. This produces a one-sample test of whether the sample cumulative distribution function for a field is homogenous with a uniform, normal, Poisson, or exponential distribution. See Kolmogorov-Smirnov Options (One-Sample Nonparametric Tests) for details on the test settings.

• Compare median to hypothesized (Wilcoxon signed-rank test). The Wilcoxon signed-rank test is applied to continuous fields. This produces a one-sample test of median value of a field. Specify a number as the hypothesized median.

• Test sequence for randomness (Runs test). The Runs test is applied to all fields. This produces a one-sample test of whether the sequence of values of a dichotomized field is random. See Runs Test Options (One-Sample Nonparametric Tests) for details on the test settings.

To Obtain One-Sample Nonparametric Tests

Related Topics

Settings Tab (One-Sample Nonparametric Tests)
Binomial Test Options (One-Sample Nonparametric Tests)
Chi-Square Test Options (One-Sample Nonparametric Tests)
Kolmogorov-Smirnov Options (One-Sample Nonparametric Tests)
Runs Test Options (One-Sample Nonparametric Tests)
Test Options (One-Sample Nonparametric Tests)
User-Missing Values (One-Sample Nonparametric Tests)


Binomial Test Options (One-Sample Nonparametric Tests)

One-Sample Nonparametric Tests,One-Sample Nonparametric Tests,One-Sample Nonparametric Tests
binomial test,binomial test,binomial test
binomial test,binomial test,binomial test
One-Sample Nonparametric Tests,One-Sample Nonparametric Tests,One-Sample Nonparametric Tests
Clopper-Pearson intervals,Clopper-Pearson intervals,Clopper-Pearson intervals
One-Sample Nonparametric Tests,One-Sample Nonparametric Tests,One-Sample Nonparametric Tests
Jeffreys intervals,Jeffreys intervals,Jeffreys intervals
One-Sample Nonparametric Tests,One-Sample Nonparametric Tests,One-Sample Nonparametric Tests
likelihood ratio intervals,likelihood ratio intervals,likelihood ratio intervals
One-Sample Nonparametric Tests,One-Sample Nonparametric Tests,One-Sample Nonparametric Tests
Expand Show details Collapse Hide details
One-Sample Nonparametric Tests Binomial Test Options

The binomial test is intended for flag fields (categorical fields with only two categories), but is applied to all fields by using rules for defining "success".

Hypothesized proportion. This specifies the expected proportion of records defined as "successes", or p. Specify a value greater than 0 and less than 1. The default is 0.5.

Confidence Interval. The following methods for computing confidence intervals for binary data are available:

• Clopper-Pearson (exact). An exact interval based on the cumulative binomial distribution.

• Jeffreys. A Bayesian interval based on the posterior distribution of p using the Jeffreys prior.

• Likelihood ratio. An interval based on the likelihood function for p.

Define Success for Categorical Fields. This specifies how "success", the data value(s) tested against the hypothesized proportion, is defined for categorical fields.

• Use first category found in data performs the binomial test using the first value found in the sample to define "success". This option is only applicable to nominal or ordinal fields with only two values; all other categorical fields specified on the Fields tab where this option is used will not be tested. This is the default.

• Specify success values performs the binomial test using the specified list of values to define "success". Specify a list of string or numeric values. The values in the list do not need to be present in the sample.

Define Success for Continuous Fields. This specifies how "success", the data value(s) tested against the test value, is defined for continuous fields. Success is defined as values equal to or less than a cut point.

• Sample midpoint sets the cut point at the average of the minimum and maximum values.

• Custom cutpoint allows you to specify a value for the cut point.

To Obtain One-Sample Nonparametric Tests

Related Topics

Settings Tab (One-Sample Nonparametric Tests)
Choose Tests (One-Sample Nonparametric Tests)
Chi-Square Test Options (One-Sample Nonparametric Tests)
Kolmogorov-Smirnov Options (One-Sample Nonparametric Tests)
Runs Test Options (One-Sample Nonparametric Tests)
Test Options (One-Sample Nonparametric Tests)
User-Missing Values (One-Sample Nonparametric Tests)


Chi-Square Test Options (One-Sample Nonparametric Tests)

One-Sample Nonparametric Tests,One-Sample Nonparametric Tests,One-Sample Nonparametric Tests
chi-square test,chi-square test,chi-square test
chi-square test,chi-square test,chi-square test
One-Sample Nonparametric Tests,One-Sample Nonparametric Tests,One-Sample Nonparametric Tests
Expand Show details Collapse Hide details
One-Sample Nonparametric Tests Chi-Square Test Options

All categories have equal probability. This produces equal frequencies among all categories in the sample. This is the default.

Customize expected probability. This allows you to specify unequal frequencies for a specified list of categories. Specify a list of string or numeric values. The values in the list do not need to be present in the sample. In the Category column, specify category values. In the Relative Frequency column, specify a value greater than 0 for each category. Custom frequencies are treated as ratios so that, for example, specifying frequencies 1, 2, and 3 is equivalent to specifying frequencies 10, 20, and 30, and both specify that 1/6 of the records are expected to fall into the first category, 1/3 into the second, and 1/2 into the third. When custom expected probabilities are specified, the custom category values must include all the field values in the data; otherwise the test is not performed for that field.

To Obtain One-Sample Nonparametric Tests

Related Topics

Settings Tab (One-Sample Nonparametric Tests)
Choose Tests (One-Sample Nonparametric Tests)
Binomial Test Options (One-Sample Nonparametric Tests)
Kolmogorov-Smirnov Options (One-Sample Nonparametric Tests)
Runs Test Options (One-Sample Nonparametric Tests)
Test Options (One-Sample Nonparametric Tests)
User-Missing Values (One-Sample Nonparametric Tests)


Kolmogorov-Smirnov Options (One-Sample Nonparametric Tests)

One-Sample Nonparametric Tests,One-Sample Nonparametric Tests,One-Sample Nonparametric Tests
Kolmogorov-Smirnov test,Kolmogorov-Smirnov test,Kolmogorov-Smirnov test
Kolmogorov-Smirnov test,Kolmogorov-Smirnov test,Kolmogorov-Smirnov test
One-Sample Nonparametric Tests,One-Sample Nonparametric Tests,One-Sample Nonparametric Tests
Expand Show details Collapse Hide details
One-Sample Nonparametric Tests Kolmogorov-Smirnov Options

This dialog specifies which distributions should be tested and the parameters of the hypothesized distributions.

Normal. Use sample data uses the observed mean and standard deviation, Custom allows you to specify values.

Uniform. Use sample data uses the observed minimum and maximum, Custom allows you to specify values.

Exponential. Sample mean uses the observed mean, Custom allows you to specify values.

Poisson. Sample mean uses the observed mean, Custom allows you to specify values.

To Obtain One-Sample Nonparametric Tests

Related Topics

Settings Tab (One-Sample Nonparametric Tests)
Choose Tests (One-Sample Nonparametric Tests)
Binomial Test Options (One-Sample Nonparametric Tests)
Chi-Square Test Options (One-Sample Nonparametric Tests)
Runs Test Options (One-Sample Nonparametric Tests)
Test Options (One-Sample Nonparametric Tests)
User-Missing Values (One-Sample Nonparametric Tests)


Runs Test Options (One-Sample Nonparametric Tests)

One-Sample Nonparametric Tests,One-Sample Nonparametric Tests,One-Sample Nonparametric Tests
runs test,runs test,runs test
runs test,runs test,runs test
One-Sample Nonparametric Tests,One-Sample Nonparametric Tests,One-Sample Nonparametric Tests
Expand Show details Collapse Hide details
One-Sample Nonparametric Tests Runs Test Options

The runs test is intended for flag fields (categorical fields with only two categories), but can be applied to all fields by using rules for defining the groups.

Define Groups for Categorical Fields

• There are only 2 categories in the sample performs the runs test using the values found in the sample to define the groups. This option is only applicable to nominal or ordinal fields with only two values; all other categorical fields specified on the Fields tab where this option is used will not be tested.

• Recode data into 2 categories performs the runs test using the specified list of values to define one of the groups. All other values in the sample define the other group. The values in the list do not all need to be present in the sample, but at least one record must be in each group.

Define Cut Point for Continuous Fields. This specifies how groups are defined for continuous fields. The first group is defined as values equal to or less than a cut point.

• Sample median sets the cut point at the sample median.

• Sample mean sets the cut point at the sample mean.

• Custom allows you to specify a value for the cut point.

To Obtain One-Sample Nonparametric Tests

Related Topics

Settings Tab (One-Sample Nonparametric Tests)
Choose Tests (One-Sample Nonparametric Tests)
Binomial Test Options (One-Sample Nonparametric Tests)
Chi-Square Test Options (One-Sample Nonparametric Tests)
Kolmogorov-Smirnov Options (One-Sample Nonparametric Tests)
Test Options (One-Sample Nonparametric Tests)
User-Missing Values (One-Sample Nonparametric Tests)


Test Options (One-Sample Nonparametric Tests)

Expand Show details Collapse Hide details
One-Sample Nonparametric Tests Test Options Settings

Significance level. This specifies the significance level (alpha) for all tests. Specify a numeric value between 0 and 1. 0.05 is the default.

Confidence interval (%). This specifies the confidence level for all confidence intervals produced. Specify a numeric value between 0 and 100. 95 is the default.

Excluded Cases. This specifies how to determine the case basis for tests.

• Exclude cases listwise means that records with missing values for any field that is named on the Fields tab are excluded from all analyses.

• Exclude cases test by test means that records with missing values for a field that is used for a specific test are omitted from that test. When several tests are specified in the analysis, each test is evaluated separately.

To Obtain One-Sample Nonparametric Tests

Related Topics

Settings Tab (One-Sample Nonparametric Tests)
Choose Tests (One-Sample Nonparametric Tests)
Binomial Test Options (One-Sample Nonparametric Tests)
Chi-Square Test Options (One-Sample Nonparametric Tests)
Kolmogorov-Smirnov Options (One-Sample Nonparametric Tests)
Runs Test Options (One-Sample Nonparametric Tests)
User-Missing Values (One-Sample Nonparametric Tests)


User-Missing Values (One-Sample Nonparametric Tests)

Expand Show details Collapse Hide details
One-Sample Nonparametric Tests User-Missing Values Settings

User-Missing Values for Categorical Fields. Categorical fields must have valid values for a record to be included in the analysis. These controls allow you to decide whether user-missing values are treated as valid among categorical fields. System-missing values and missing values for continuous fields are always treated as invalid.

To Obtain One-Sample Nonparametric Tests

Related Topics

Settings Tab (One-Sample Nonparametric Tests)
Choose Tests (One-Sample Nonparametric Tests)
Binomial Test Options (One-Sample Nonparametric Tests)
Chi-Square Test Options (One-Sample Nonparametric Tests)
Kolmogorov-Smirnov Options (One-Sample Nonparametric Tests)
Runs Test Options (One-Sample Nonparametric Tests)
Test Options (One-Sample Nonparametric Tests)


Independent-Samples Nonparametric Tests

Independent-Samples Nonparametric Tests,Independent-Samples Nonparametric Tests,Independent-Samples Nonparametric Tests

Independent-samples nonparametric tests identify differences between two or more groups using one or more nonparametric tests. Nonparametric tests do not assume your data follow the normal distribution.

Expand Show details Collapse Hide details
Independent-Samples Nonparametric Tests Objective tab

What is your objective? The objectives allow you to quickly specify different but commonly used test settings.

• Automatically compare distributions across groups. This objective applies the Mann-Whitney U test to data with 2 groups, or the Kruskal-Wallis 1-way ANOVA to data with k groups.

• Compare medians across groups. This objective uses the Median test to compare the observed medians across groups.

• Custom analysis. When you want to manually amend the test settings on the Settings tab, select this option. Note that this setting is automatically selected if you subsequently make changes to options on the Settings tab that are incompatible with the currently selected objective.

This procedure pastes NPTESTS command syntax.

See Nonparametric Tests Algorithms for computational details for this feature.

To Obtain Independent-Samples Nonparametric Tests

Related Topics

To Obtain Independent-Samples Nonparametric Tests
Fields Tab (Independent-Samples Nonparametric Tests)
Settings Tab (Independent-Samples Nonparametric Tests)
NPTESTS
One-Sample Nonparametric Tests
Related-Samples Nonparametric Tests
Model View (nonparametric tests)


To Obtain Independent-Samples Nonparametric Tests

From the menus choose:

Analyze
Nonparametric Tests
Independent Samples...

Click Run.

Optionally, you can:

• Specify an objective on the Objective tab.

• Specify field assignments on the Fields tab.

• Specify expert settings on the Settings tab.

Related Topics

Independent-Samples Nonparametric Tests
Fields Tab (Independent-Samples Nonparametric Tests)
Settings Tab (Independent-Samples Nonparametric Tests)


Fields Tab (Independent-Samples Nonparametric Tests)

Independent-Samples Nonparametric Tests,Independent-Samples Nonparametric Tests,Independent-Samples Nonparametric Tests
Fields tab,Fields tab,Fields tab
Expand Show details Collapse Hide details
Independent-Samples Nonparametric Tests Fields tab

The Fields tab specifies which fields should be tested and the field used to define groups.

Use predefined roles. This option uses existing field information. All continuous fields with a predefined role as Target or Both will be used as test fields. If there is a single categorical field with a predefined role as Input, it will be used as a grouping field. Otherwise no grouping field is used by default and you must use custom field assignments. At least one test field and a grouping field is required. See the topic Roles for more information.

Use custom field assignments. This option allows you to override field roles. After selecting this option, specify the fields below:

• Test Fields. Select one or more continuous fields.

• Groups. Select a categorical field.

To Obtain Independent-Samples Nonparametric Tests

Related Topics

Independent-Samples Nonparametric Tests
To Obtain Independent-Samples Nonparametric Tests
Settings Tab (Independent-Samples Nonparametric Tests)


Settings Tab (Independent-Samples Nonparametric Tests)

The Settings tab comprises several different groups of settings that you can modify to fine tune how the algorithm processes your data. If you make any changes to the default settings that are incompatible with the currently selected objective, the Objective tab is automatically updated to select the Customize analysis option.

To Obtain Independent-Samples Nonparametric Tests

Related Topics

Independent-Samples Nonparametric Tests
To Obtain Independent-Samples Nonparametric Tests
Fields Tab (Independent-Samples Nonparametric Tests)
Choose Tests (Independent-Samples Nonparametric Tests)
Test Options (Independent-Samples Nonparametric Tests)
User-Missing Values (Independent-Samples Nonparametric Tests)


Choose Tests (Independent-Samples Nonparametric Tests)

Expand Show details Collapse Hide details
Independent-Samples Nonparametric Tests Choose Tests Settings

These settings specify the tests to be performed on the fields specified on the Fields tab.

Automatically choose the tests based on the data. This setting applies the Mann-Whitney U test to data with 2 groups, or the Kruskal-Wallis 1-way ANOVA to data with k groups.

Customize tests. This setting allows you to choose specific tests to be performed.

• Compare Distributions across Groups. These produce independent-samples tests of whether the samples are from the same population.

Mann-Whitney U (2 samples) uses the rank of each case to test whether the groups are drawn from the same population. The first value in ascending order of the grouping field defines the first group and the second defines the second group. If the grouping field has more than two values, this test is not produced.

Kolmogorov-Smirnov (2 samples) is sensitive to any difference in median, dispersion, skewness, and so forth, between the two distributions. If the grouping field has more than two values, this test is not produced.

Test sequence for randomness (Wald-Wolfowitz for 2 samples) produces a runs test with group membership as the criterion. If the grouping field has more than two values, this test is not produced.

Kruskal-Wallis 1-way ANOVA (k samples) is an extension of the Mann-Whitney U test and the nonparametric analog of one-way analysis of variance. You can optionally request multiple comparisons of the k samples, either all pairwise multiple comparisons or stepwise step-down comparisons.

Test for ordered alternatives (Jonckheere-Terpstra for k samples) is a more powerful alternative to Kruskal-Wallis when the k samples have a natural ordering. For example, the k populations might represent k increasing temperatures. The hypothesis that different temperatures produce the same response distribution is tested against the alternative that as the temperature increases, the magnitude of the response increases. Here, the alternative hypothesis is ordered; therefore, Jonckheere-Terpstra is the most appropriate test to use. Specify the order of the alternative hypotheses; Smallest to largest stipulates an alternative hypothesis that the location parameter of the first group is not equal to the second, which in turn is not equal to the third, and so on; Largest to smallest stipulates an alternative hypothesis that the location parameter of the last group is not equal to the second-to-last, which in turn is not equal to the third-to-last, and so on. You can optionally request multiple comparisons of the k samples, either All pairwise multiple comparisons or Stepwise step-down comparisons.

• Compare Ranges across Groups. This produces an independent-samples tests of whether the samples have the same range. Moses extreme reaction (2 samples) tests a control group versus a comparison group. The first value in ascending order of the grouping field defines the control group and the second defines the comparison group. If the grouping field has more than two values, this test is not produced.

• Compare Medians across Groups. This produces an independent-samples tests of whether the samples have the same median. Median test (k samples) can use either the pooled sample median (calculated across all records in the dataset) or a custom value as the hypothesized median. You can optionally request multiple comparisons of the k samples, either All pairwise multiple comparisons or Stepwise step-down comparisons.

• Estimate Confidence Intervals across Groups. Hodges-Lehman estimate (2 samples) produces an independent samples estimate and confidence interval for the difference in the medians of two groups. If the grouping field has more than two values, this test is not produced.

To Obtain Independent-Samples Nonparametric Tests

Related Topics

Settings Tab (Independent-Samples Nonparametric Tests)
Test Options (Independent-Samples Nonparametric Tests)
User-Missing Values (Independent-Samples Nonparametric Tests)


Test Options (Independent-Samples Nonparametric Tests)

Expand Show details Collapse Hide details
Independent-Samples Nonparametric Tests Test Options Settings

Significance level. This specifies the significance level (alpha) for all tests. Specify a numeric value between 0 and 1. 0.05 is the default.

Confidence interval (%). This specifies the confidence level for all confidence intervals produced. Specify a numeric value between 0 and 100. 95 is the default.

Excluded Cases. This specifies how to determine the case basis for tests. Exclude cases listwise means that records with missing values for any field that is named on any subcommand are excluded from all analyses. Exclude cases test by test means that records with missing values for a field that is used for a specific test are omitted from that test. When several tests are specified in the analysis, each test is evaluated separately.

To Obtain Independent-Samples Nonparametric Tests

Related Topics

Settings Tab (Independent-Samples Nonparametric Tests)
Choose Tests (Independent-Samples Nonparametric Tests)
User-Missing Values (Independent-Samples Nonparametric Tests)


User-Missing Values (Independent-Samples Nonparametric Tests)

Expand Show details Collapse Hide details
Independent-Samples Nonparametric Tests User-Missing Values Settings

User-Missing Values for Categorical Fields. Categorical fields must have valid values for a record to be included in the analysis. These controls allow you to decide whether user-missing values are treated as valid among categorical fields. System-missing values and missing values for continuous fields are always treated as invalid.

To Obtain Independent-Samples Nonparametric Tests

Related Topics

Settings Tab (Independent-Samples Nonparametric Tests)
Choose Tests (Independent-Samples Nonparametric Tests)
Test Options (Independent-Samples Nonparametric Tests)


Related-Samples Nonparametric Tests

Related-Samples Nonparametric Tests,Related-Samples Nonparametric Tests,Related-Samples Nonparametric Tests

Identifies differences between two or more related fields using one or more nonparametric tests. Nonparametric tests do not assume your data follow the normal distribution.

Data Considerations. Each record corresponds to a given subject for which two or more related measurements are stored in separate fields in the dataset. For example, a study concerning the effectiveness of a dieting plan can be analyzed using related-samples nonparametric tests if each subject's weight is measured at regular intervals and stored in fields like Pre-diet weight, Interim weight, and Post-diet weight. These fields are "related".

Expand Show details Collapse Hide details
Related-Samples Nonparametric Tests Objective tab

What is your objective? The objectives allow you to quickly specify different but commonly used test settings.

• Automatically compare observed data to hypothesized data. This objective applies McNemar's Test to categorical data when 2 fields are specified, Cochran's Q to categorical data when more than 2 fields are specified, the Wilcoxon Matched-Pair Signed-Rank test to continuous data when 2 fields are specified, and Friedman's 2-Way ANOVA by Ranks to continuous data when more than 2 fields are specified.

• Custom analysis. When you want to manually amend the test settings on the Settings tab, select this option. Note that this setting is automatically selected if you subsequently make changes to options on the Settings tab that are incompatible with the currently selected objective.

When fields of differing measurement level are specified, they are first separated by measurement level and then the appropriate test is applied to each group. For example, if you choose Automatically compare observed data to hypothesized data as your objective and specify 3 continuous fields and 2 nominal fields, then Friedman's test is applied to the continuous fields and McNemar's test is applied to the nominal fields.

This procedure pastes NPTESTS command syntax.

See Nonparametric Tests Algorithms for computational details for this feature.

To Obtain Related-Samples Nonparametric Tests

Related Topics

To Obtain Related-Samples Nonparametric Tests
Fields Tab (Related-Samples Nonparametric Tests)
Settings Tab (Related-Samples Nonparametric Tests)
NPTESTS
One-Sample Nonparametric Tests
Independent-Samples Nonparametric Tests
Model View (nonparametric tests)


To Obtain Related-Samples Nonparametric Tests

From the menus choose:

Analyze
Nonparametric Tests
Related Samples...

Click Run.

Optionally, you can:

• Specify an objective on the Objective tab.

• Specify field assignments on the Fields tab.

• Specify expert settings on the Settings tab.

Related Topics

Related-Samples Nonparametric Tests
Fields Tab (Related-Samples Nonparametric Tests)
Settings Tab (Related-Samples Nonparametric Tests)


Fields Tab (Related-Samples Nonparametric Tests)

Related-Samples Nonparametric Tests,Related-Samples Nonparametric Tests,Related-Samples Nonparametric Tests
fields,fields,fields
Expand Show details Collapse Hide details
Related-Samples Nonparametric Tests Fields tab

The Fields tab specifies which fields should be tested.

Use predefined roles. This option uses existing field information. All fields with a predefined role as Target or Both will be used as test fields. At least two test fields are required. See the topic Roles for more information.

Use custom field assignments. This option allows you to override field roles. After selecting this option, specify the fields below:

• Test Fields. Select two or more fields. Each field corresponds to a separate related sample.

To Obtain Related-Samples Nonparametric Tests

Related Topics

Related-Samples Nonparametric Tests
To Obtain Related-Samples Nonparametric Tests
Settings Tab (Related-Samples Nonparametric Tests)


Settings Tab (Related-Samples Nonparametric Tests)

The Settings tab comprises several different groups of settings that you can modify to fine tune how the procedure processes your data. If you make any changes to the default settings that are incompatible with the other objectives, the Objective tab is automatically updated to select the Customize analysis option.

To Obtain Related-Samples Nonparametric Tests

Related Topics

Related-Samples Nonparametric Tests
To Obtain Related-Samples Nonparametric Tests
Fields Tab (Related-Samples Nonparametric Tests)
Choose Tests (Related-Samples Nonparametric Tests)
McNemar's Test: Define Success (Related-Samples Nonparametric Tests)
Cochran's Q: Define Success (Related-Samples Nonparametric Tests)
Test Options (Related-Samples Nonparametric Tests)
User-Missing Values (Related-Samples Nonparametric Tests)


Choose Tests (Related-Samples Nonparametric Tests)

McNemar test,McNemar test,McNemar test
Related-Samples Nonparametric Tests,Related-Samples Nonparametric Tests,Related-Samples Nonparametric Tests
Cochran's Q test,Cochran's Q test,Cochran's Q test
Related-Samples Nonparametric Tests,Related-Samples Nonparametric Tests,Related-Samples Nonparametric Tests
marginal homogeneity test,marginal homogeneity test,marginal homogeneity test
Related-Samples Nonparametric Tests,Related-Samples Nonparametric Tests,Related-Samples Nonparametric Tests
sign test,sign test,sign test
Related-Samples Nonparametric Tests,Related-Samples Nonparametric Tests,Related-Samples Nonparametric Tests
Wilcoxon signed-rank test,Wilcoxon signed-rank test,Wilcoxon signed-rank test
Related-Samples Nonparametric Tests,Related-Samples Nonparametric Tests,Related-Samples Nonparametric Tests
Hodges-Lehman estimates,Hodges-Lehman estimates,Hodges-Lehman estimates
Related-Samples Nonparametric Tests,Related-Samples Nonparametric Tests,Related-Samples Nonparametric Tests
Kendall's coefficient of concordance (W),Kendall's coefficient of concordance (W),Kendall's coefficient of concordance (W)
Related-Samples Nonparametric Tests,Related-Samples Nonparametric Tests,Related-Samples Nonparametric Tests
Friedman test,Friedman test,Friedman test
Related-Samples Nonparametric Tests,Related-Samples Nonparametric Tests,Related-Samples Nonparametric Tests
Expand Show details Collapse Hide details
Related-Samples Nonparametric Tests Choose Tests Settings

These settings specify the tests to be performed on the fields specified on the Fields tab.

Automatically choose the tests based on the data. This setting applies McNemar's Test to categorical data when 2 fields are specified, Cochran's Q to categorical data when more than 2 fields are specified, the Wilcoxon Matched-Pair Signed-Rank test to continuous data when 2 fields are specified, and Friedman's 2-Way ANOVA by Ranks to continuous data when more than 2 fields are specified.

Customize tests. This setting allows you to choose specific tests to be performed.

• Test for Change in Binary Data. McNemar's test (2 samples) can be applied to categorical fields. This produces a related-samples test of whether combinations of values between two flag fields (categorical fields with only two values) are equally likely. If there are more than two fields specified on the Fields tab, this test is not performed. See McNemar's Test: Define Success (Related-Samples Nonparametric Tests) for details on the test settings. Cochran's Q (k samples) can be applied to categorical fields. This produces a related-samples test of whether combinations of values between k flag fields (categorical fields with only two values) are equally likely. You can optionally request multiple comparisons of the k samples, either all pairwise multiple comparisons or stepwise step-down comparisons. See Cochran's Q: Define Success (Related-Samples Nonparametric Tests) for details on the test settings.

• Test for Changes in Multinomial Data. Marginal homogeneity test (2 samples) produces a related samples test of whether combinations of values between two paired ordinal fields are equally likely. The marginal homogeneity test is typically used in repeated measures situations. This test is an extension of the McNemar test from binary response to multinomial response. If there are more than two fields specified on the Fields tab, this test is not performed.

• Compare Median Difference to Hypothesized. These tests each produce a related-samples test of whether the median difference between two continuous fields is different from 0. If there are more than two fields specified on the Fields tab, these tests are not performed.

• Estimate Confidence Interval. This produces a related samples estimate and confidence interval for the median difference between two paired continuous fields. If there are more than two fields specified on the Fields tab, this test is not performed.

• Quantify Associations. Kendall's coefficient of concordance (k samples) produces a measure of agreement among judges or raters, where each record is one judge's rating of several items (fields). You can optionally request multiple comparisons of the k samples, either All pairwise multiple comparisons or Stepwise step-down comparisons.

• Compare Distributions. Friedman's 2-way ANOVA by ranks (k samples) produces a related samples test of whether k related samples have been drawn from the same population. You can optionally request multiple comparisons of the k samples, either All pairwise multiple comparisons or Stepwise step-down comparisons.

To Obtain Related-Samples Nonparametric Tests

Related Topics

Settings Tab (Related-Samples Nonparametric Tests)
McNemar's Test: Define Success (Related-Samples Nonparametric Tests)
Cochran's Q: Define Success (Related-Samples Nonparametric Tests)
Test Options (Related-Samples Nonparametric Tests)
User-Missing Values (Related-Samples Nonparametric Tests)


McNemar's Test: Define Success (Related-Samples Nonparametric Tests)

Related-Samples Nonparametric Tests,Related-Samples Nonparametric Tests,Related-Samples Nonparametric Tests
McNemar test,McNemar test,McNemar test
McNemar test,McNemar test,McNemar test
Related-Samples Nonparametric Tests,Related-Samples Nonparametric Tests,Related-Samples Nonparametric Tests
Expand Show details Collapse Hide details
Related-Samples Nonparametric Tests McNemar's Test: Define Success Settings

McNemar's test is intended for flag fields (categorical fields with only two categories), but is applied to all categorical fields by using rules for defining "success".

Define Success for Categorical Fields. This specifies how "success" is defined for categorical fields.

• Use first category found in data performs the test using the first value found in the sample to define "success". This option is only applicable to nominal or ordinal fields with only two values; all other categorical fields specified on the Fields tab where this option is used will not be tested. This is the default.

• Specify success values performs the test using the specified list of values to define "success". Specify a list of string or numeric values. The values in the list do not need to be present in the sample.

To Obtain Related-Samples Nonparametric Tests

Related Topics

Settings Tab (Related-Samples Nonparametric Tests)
Choose Tests (Related-Samples Nonparametric Tests)
Cochran's Q: Define Success (Related-Samples Nonparametric Tests)
Test Options (Related-Samples Nonparametric Tests)
User-Missing Values (Related-Samples Nonparametric Tests)


Cochran's Q: Define Success (Related-Samples Nonparametric Tests)

Related-Samples Nonparametric Tests,Related-Samples Nonparametric Tests,Related-Samples Nonparametric Tests
Cochran's Q test,Cochran's Q test,Cochran's Q test
Cochran's Q test,Cochran's Q test,Cochran's Q test
Related-Samples Nonparametric Tests,Related-Samples Nonparametric Tests,Related-Samples Nonparametric Tests
Expand Show details Collapse Hide details
Related-Samples Nonparametric Tests Cochran's Q: Define Success

Cochran's Q test is intended for flag fields (categorical fields with only two categories), but is applied to all categorical fields by using rules for defining "success".

Define Success for Categorical Fields. This specifies how "success" is defined for categorical fields.

• Use first category found in data performs the test using the first value found in the sample to define "success". This option is only applicable to nominal or ordinal fields with only two values; all other categorical fields specified on the Fields tab where this option is used will not be tested. This is the default.

• Specify success values performs the test using the specified list of values to define "success". Specify a list of string or numeric values. The values in the list do not need to be present in the sample.

To Obtain Related-Samples Nonparametric Tests

Related Topics

Settings Tab (Related-Samples Nonparametric Tests)
Choose Tests (Related-Samples Nonparametric Tests)
McNemar's Test: Define Success (Related-Samples Nonparametric Tests)
Test Options (Related-Samples Nonparametric Tests)
User-Missing Values (Related-Samples Nonparametric Tests)


Test Options (Related-Samples Nonparametric Tests)

Expand Show details Collapse Hide details
Related-Samples Nonparametric Tests Test Options Settings

Significance level. This specifies the significance level (alpha) for all tests. Specify a numeric value between 0 and 1. 0.05 is the default.

Confidence interval (%). This specifies the confidence level for all confidence intervals produced. Specify a numeric value between 0 and 100. 95 is the default.

Excluded Cases. This specifies how to determine the case basis for tests.

• Exclude cases listwise means that records with missing values for any field that is named on any subcommand are excluded from all analyses.

• Exclude cases test by test means that records with missing values for a field that is used for a specific test are omitted from that test. When several tests are specified in the analysis, each test is evaluated separately.

To Obtain Related-Samples Nonparametric Tests

Related Topics

Settings Tab (Related-Samples Nonparametric Tests)
Choose Tests (Related-Samples Nonparametric Tests)
McNemar's Test: Define Success (Related-Samples Nonparametric Tests)
Cochran's Q: Define Success (Related-Samples Nonparametric Tests)
User-Missing Values (Related-Samples Nonparametric Tests)


User-Missing Values (Related-Samples Nonparametric Tests)

Expand Show details Collapse Hide details
Related-Samples Nonparametric Tests User-Missing Values Settings

User-Missing Values for Categorical Fields. Categorical fields must have valid values for a record to be included in the analysis. These controls allow you to decide whether user-missing values are treated as valid among categorical fields. System-missing values and missing values for continuous fields are always treated as invalid.

To Obtain Related-Samples Nonparametric Tests

Related Topics

Settings Tab (Related-Samples Nonparametric Tests)
Choose Tests (Related-Samples Nonparametric Tests)
McNemar's Test: Define Success (Related-Samples Nonparametric Tests)
Cochran's Q: Define Success (Related-Samples Nonparametric Tests)
Test Options (Related-Samples Nonparametric Tests)


Model View (nonparametric tests)

nonparametric tests,nonparametric tests,nonparametric tests
model view,model view,model view
model view,model view,model view
nonparametric tests,nonparametric tests,nonparametric tests

The procedure creates a Model Viewer object in the Viewer. By activating (double-clicking) this object, you gain an interactive view of the model. The model view has a 2-panel window, the main view on the left and the linked, or auxiliary, view on the right.

There are two main views:

• Hypothesis Summary. This is the default view.See the topic Hypothesis Summary (nonparametric tests) for more information.

• Confidence Interval Summary. See the topic Confidence Interval Summary (nonparametric tests) for more information.

There are seven linked/auxiliary views:

• One Sample Test. This is the default view if one-sample tests were requested. See the topic One Sample Test (nonparametric tests) for more information.

• Related Samples Test. This is the default view if related samples tests and no one-sample tests were requested. See the topic Related Samples Test (nonparametric tests) for more information.

• Independent Samples Test. This is the default view if no related samples tests or one-sample tests were requested. See the topic Independent Samples Test (nonparametric tests) for more information.

• Categorical Field Information. See the topic Categorical Field Information (nonparametric tests) for more information.

• Continuous Field Information. See the topic Continuous Field Information (nonparametric tests) for more information.

• Pairwise Comparisons. See the topic Pairwise Comparisons (nonparametric tests) for more information.

• Homogenous Subsets. See the topic Homogeneous Subsets (nonparametric tests) for more information.

For general information on Model objects, see Models.

Related Topics

Nonparametric Tests
One-Sample Nonparametric Tests
Independent-Samples Nonparametric Tests
Related-Samples Nonparametric Tests
Hypothesis Summary (nonparametric tests)
Confidence Interval Summary (nonparametric tests)
One Sample Test (nonparametric tests)
Related Samples Test (nonparametric tests)
Independent Samples Test (nonparametric tests)
Categorical Field Information (nonparametric tests)
Continuous Field Information (nonparametric tests)
Pairwise Comparisons (nonparametric tests)
Homogeneous Subsets (nonparametric tests)


Hypothesis Summary (nonparametric tests)

hypothesis summary,hypothesis summary,hypothesis summary
nonparametric tests,nonparametric tests,nonparametric tests
Expand Show details Collapse Hide details
Hypothesis Summary

The Model Summary view is a snapshot, at-a-glance summary of the nonparametric tests. It emphasizes null hypotheses and decisions, drawing attention to significant p-values.

• Each row corresponds to a separate test. Clicking on a row shows additional information about the test in the linked view.

• Clicking on any column header sorts the rows by values in that column.

• The Reset button allows you to return the Model Viewer to its original state.

• The Field Filter dropdown list allows you to display only the tests that involve the selected field. For example, when Beginning Salary is selected in the Field Filter dropdown, only two tests are displayed in the Hypothesis Summary.

Expand Show details Collapse Hide details
Hypothesis Summary; filtered by Beginning Salary

Related Topics

Model View (nonparametric tests)
Confidence Interval Summary (nonparametric tests)
One Sample Test (nonparametric tests)
Related Samples Test (nonparametric tests)
Independent Samples Test (nonparametric tests)
Categorical Field Information (nonparametric tests)
Continuous Field Information (nonparametric tests)
Pairwise Comparisons (nonparametric tests)
Homogeneous Subsets (nonparametric tests)


Confidence Interval Summary (nonparametric tests)

confidence interval summary,confidence interval summary,confidence interval summary
nonparametric tests,nonparametric tests,nonparametric tests
Expand Show details Collapse Hide details
Confidence Interval Summary

The Confidence Interval Summary shows any confidence intervals produced by the nonparametric tests.

• Each row corresponds to a separate confidence interval.

• Clicking on any column header sorts the rows by values in that column.

Related Topics

Model View (nonparametric tests)
Hypothesis Summary (nonparametric tests)
One Sample Test (nonparametric tests)
Related Samples Test (nonparametric tests)
Independent Samples Test (nonparametric tests)
Categorical Field Information (nonparametric tests)
Continuous Field Information (nonparametric tests)
Pairwise Comparisons (nonparametric tests)
Homogeneous Subsets (nonparametric tests)


One Sample Test (nonparametric tests)

confidence interval summary,confidence interval summary,confidence interval summary
nonparametric tests,nonparametric tests,nonparametric tests

The One Sample Test view shows details related to any requested one-sample nonparametric tests. The information shown depends upon the selected test.

• The Test dropdown allows you to select a given type of one-sample test.

• The Field(s) dropdown allows you to select a field that was tested using the selected test in the Test dropdown.

Binomial Test Binomial Test

Binomial Test

One Sample Test View, Binomial Test

The Binomial Test shows a stacked bar chart and a test table.

• The stacked bar chart displays the observed and hypothesized frequencies for the "success" and "failure" categories of the test field, with "failures" stacked on top of "successes". Hovering over a bar shows the category percentages in a tooltip. Visible differences in the bars indicate that the test field may not have the hypothesized binomial distribution.

• The table shows details of the test. See the topic Binomial Test (nonparametric tests algorithms) for more information.

Chi-Square Test Chi-Square Test

Chi-Square Test

One Sample Test View, Chi-Square Test

The Chi-Square Test view shows a clustered bar chart and a test table.

• The clustered bar chart displays the observed and hypothesized frequencies for each category of the test field. Hovering over a bar shows the observed and hypothesized frequencies and their difference (residual) in a tooltip. Visible differences in the observed versus hypothesized bars indicate that the test field may not have the hypothesized distribution.

• The table shows details of the test. See the topic Chi-Square Test (nonparametric tests algorithms) for more information.

Wilcoxon Signed Ranks Wilcoxon Signed Ranks

Wilcoxon Signed Ranks

One Sample Test View, Wilcoxon Signed Ranks Test

The Wilcoxon Signed Ranks Test view shows a histogram and a test table.

• The histogram includes vertical lines showing the observed and hypothetical medians.

• The table shows details of the test. See the topic Wilcoxon Signed-Rank Test , One-Sample (nonparametric tests algorithms) for more information.

Runs Test Runs Test

Runs Test

One Sample Test View, Runs Test

The Runs Test view shows a chart and a test table.

• The chart displays a normal distribution with the observed number of runs marked with a vertical line. Note that when the exact test is performed, the test is not based on the normal distribution.

• The table shows details of the test. See the topic Runs Test (nonparametric tests algorithms) for more information.

Kolmogorov-Smirnov Test Kolmogorov-Smirnov Test

Kolmogorov-Smirnov Test

One Sample Test View, Kolmogorov-Smirnov Test

The Kolmogorov-Smirnov Test view shows a histogram and a test table.

• The histogram includes an overlay of the probability density function for the hypothesized uniform, normal, Poisson, or exponential distribution. Note that the test is based on cumulative distributions, and the Most Extreme Differences reported in the table should be interpreted with respect to cumulative distributions.

• The table shows details of the test. See the topic Kolmogorov-Smirnov Test, One-Sample (nonparametric tests algorithms) for more information.

Related Topics

Model View (nonparametric tests)
Hypothesis Summary (nonparametric tests)
Confidence Interval Summary (nonparametric tests)
Related Samples Test (nonparametric tests)
Independent Samples Test (nonparametric tests)
Categorical Field Information (nonparametric tests)
Continuous Field Information (nonparametric tests)
Pairwise Comparisons (nonparametric tests)
Homogeneous Subsets (nonparametric tests)


Related Samples Test (nonparametric tests)

confidence interval summary,confidence interval summary,confidence interval summary
nonparametric tests,nonparametric tests,nonparametric tests

The One Sample Test view shows details related to any requested one-sample nonparametric tests. The information shown depends upon the selected test.

• The Test dropdown allows you to select a given type of one-sample test.

• The Field(s) dropdown allows you to select a field that was tested using the selected test in the Test dropdown.

McNemar Test McNemar Test

McNemar Test

Related Samples Test View, McNemar Test

The McNemar Test view shows a clustered bar chart and a test table.

• The clustered bar chart displays the observed and hypothesized frequencies for the off-diagonal cells of the 2×2 table defined by the test fields.

• The table shows details of the test. See the topic McNemar's Test (nonparametric tests algorithms) for more information.

Sign Test Sign Test

Sign Test

Related Samples Test View, Sign Test

The Sign Test view shows a stacked histogram and a test table.

• The stacked histogram displays the differences between the fields, using the sign of the difference as the stacking field.

• The table shows details of the test. See the topic Sign Test (nonparametric tests algorithms) for more information.

Wilcoxon Signed Ranks Test Wilcoxon Signed Ranks Test

Wilcoxon Signed Ranks Test

Related Samples Test View, Wilcoxon Signed Ranks Test

The Wilcoxon Signed Ranks Test view shows a stacked histogram and a test table.

• The stacked histogram displays the differences between the fields, using the sign of the difference as the stacking field.

• The table shows details of the test. See the topic Wilcoxon Signed-Rank Test, Matched Pairs (nonparametric tests algorithms) for more information.

Marginal Homogeneity Test Marginal Homogeneity Test

Marginal Homogeneity Test

Related Samples Test View, Marginal Homogeneity Test

The Marginal Homogeneity Test view shows a clustered bar chart and a test table.

• The clustered bar chart displays the observed frequencies for the off-diagonal cells of the table defined by the test fields.

• The table shows details of the test. See the topic Marginal Homogeneity (nonparametric tests algorithms) for more information.

Cochran's Q Test Cochran's Q Test

Cochran's Q Test

Related Samples Test View, Cochran's Q Test

The Cochran's Q Test view shows a stacked bar chart and a test table.

• The stacked bar chart displays the observed frequencies for the "success" and "failure" categories of the test fields, with "failures" stacked on top of "successes". Hovering over a bar shows the category percentages in a tooltip.

• The table shows details of the test. See the topic Cochran's Q Test (nonparametric tests algorithms) for more information.

Friedman's Two-Way Analysis of Variance by Ranks Friedman's Two-Way Analysis of Variance by Ranks

Friedman's Two-Way Analysis of Variance by Ranks

Related Samples Test View, Friedman's Two-Way Analysis of Variance by Ranks

The Friedman's Two-Way Analysis of Variance by Ranks view shows paneled histograms and a test table.

• The histograms display the observed distribution of ranks, paneled by the test fields.

• The table shows details of the test. See the topic Friedman's Test (nonparametric tests algorithms) for more information.

Kendall's Coefficient of Concordance Kendall's Coefficient of Concordance

Kendall's Coefficient of Concordance

Related Samples Test View, Kendall's Coefficient of Concordance

The Kendall's Coefficient of Concordance view shows paneled histograms and a test table.

• The histograms display the observed distribution of ranks, paneled by the test fields.

• The table shows details of the test. See the topic Kendall's Coefficient of Concordance (nonparametric tests algorithms) for more information.

Related Topics

Model View (nonparametric tests)
Hypothesis Summary (nonparametric tests)
Confidence Interval Summary (nonparametric tests)
One Sample Test (nonparametric tests)
Independent Samples Test (nonparametric tests)
Categorical Field Information (nonparametric tests)
Continuous Field Information (nonparametric tests)
Pairwise Comparisons (nonparametric tests)
Homogeneous Subsets (nonparametric tests)


Independent Samples Test (nonparametric tests)

independent samples test,independent samples test,independent samples test
nonparametric tests,nonparametric tests,nonparametric tests

The Independent Samples Test view shows details related to any requested independent samples nonparametric tests. The information shown depends upon the selected test.

• The Test dropdown allows you to select a given type of independent samples test.

• The Field(s) dropdown allows you to select a test and grouping field combination that was tested using the selected test in the Test dropdown.

Mann-Whitney Test Mann-Whitney Test

Mann-Whitney Test

Independent Samples Test View, Mann-Whitney Test

The Mann-Whitney Test view shows a population pyramid chart and a test table.

• The population pyramid chart displays back-to-back histograms by the categories of the grouping field, noting the number of records in each group and the mean rank of the group.

• The table shows details of the test. See the topic Mann-Whitney Test (nonparametric tests algorithms) for more information.

Kolmogorov-Smirnov Test Kolmogorov-Smirnov Test

Kolmogorov-Smirnov Test

Independent Samples Test View, Kolmogorov-Smirnov Test

The Kolmogorov-Smirnov Test view shows a population pyramid chart and a test table.

• The population pyramid chart displays back-to-back histograms by the categories of the grouping field, noting the number of records in each group. The observed cumulative distribution lines can be displayed or hidden by clicking the Cumulative button.

• The table shows details of the test. See the topic Kolmogorov-Smirnov Test, Independent Samples (nonparametric tests algorithms) for more information.

Wald-Wolfowitz Runs Test Wald-Wolfowitz Runs Test

Wald-Wolfowitz Runs Test

Independent Samples Test View, Wald-Wolfowitz Runs Test

The Wald-Wolfowitz Runs Test view shows a stacked bar chart and a test table.

• The population pyramid chart displays back-to-back histograms by the categories of the grouping field, noting the number of records in each group.

• The table shows details of the test. See the topic Wald-Wolfowitz Test (nonparametric tests algorithms) for more information.

Kruskal-Wallis Test Kruskal-Wallis Test

Kruskal-Wallis Test

Independent Samples Test View, Kruskal-Wallis Test

The Kruskal-Wallis Test view shows boxplots and a test table.

• Separate boxplots are displayed for each category of the grouping field. Hovering over a box shows the mean rank in a tooltip.

• The table shows details of the test. See the topic Kruskal-Wallis Test (nonparametric tests algorithms) for more information.

Jonckheere-Terpstra Test Jonckheere-Terpstra Test

Jonckheere-Terpstra Test

Independent Samples Test View, Jonckheere-Terpstra Test

The Jonckheere-Terpstra Test view shows box plots and a test table.

• Separate box plots are displayed for each category of the grouping field.

• The table shows details of the test. See the topic Jonckheere-Terpstra Test (nonparametric tests algorithms) for more information.

Moses Test of Extreme Reaction Moses Test of Extreme Reaction

Moses Test of Extreme Reaction

Independent Samples Test View, Moses Test of Extreme Reaction

The Moses Test of Extreme Reaction view shows boxplots and a test table.

• Separate boxplots are displayed for each category of the grouping field. The point labels can be displayed or hidden by clicking the Record ID button.

• The table shows details of the test. See the topic Moses Test of Extreme Reactions (nonparametric tests algorithms) for more information.

Median Test Median Test

Median Test

Independent Samples Test View, Median Test

The Median Test view shows box plots and a test table.

• Separate box plots are displayed for each category of the grouping field.

• The table shows details of the test. See the topic Median Test (nonparametric tests algorithms) for more information.

Related Topics

Model View (nonparametric tests)
Hypothesis Summary (nonparametric tests)
Confidence Interval Summary (nonparametric tests)
One Sample Test (nonparametric tests)
Related Samples Test (nonparametric tests)
Categorical Field Information (nonparametric tests)
Continuous Field Information (nonparametric tests)
Pairwise Comparisons (nonparametric tests)
Homogeneous Subsets (nonparametric tests)


Categorical Field Information (nonparametric tests)

categorical field information,categorical field information,categorical field information
nonparametric tests,nonparametric tests,nonparametric tests
Expand Show details Collapse Hide details
Categorical Field Information

The Categorical Field Information view displays a bar chart for the categorical field selected on the Field(s) dropdown. The list of available fields is restricted to the categorical fields used in the currently selected test in the Hypothesis Summary view.

• Hovering over a bar gives the category percentages in a tooltip.

Related Topics

Model View (nonparametric tests)
Hypothesis Summary (nonparametric tests)
Confidence Interval Summary (nonparametric tests)
One Sample Test (nonparametric tests)
Related Samples Test (nonparametric tests)
Independent Samples Test (nonparametric tests)
Continuous Field Information (nonparametric tests)
Pairwise Comparisons (nonparametric tests)
Homogeneous Subsets (nonparametric tests)


Continuous Field Information (nonparametric tests)

continuous field information,continuous field information,continuous field information
nonparametric tests,nonparametric tests,nonparametric tests
Expand Show details Collapse Hide details
Continuous Field Information

The Continuous Field Information view displays a histogram for the continuous field selected on the Field(s) dropdown. The list of available fields is restricted to the continuous fields used in the currently selected test in the Hypothesis Summary view.

Related Topics

Model View (nonparametric tests)
Hypothesis Summary (nonparametric tests)
Confidence Interval Summary (nonparametric tests)
One Sample Test (nonparametric tests)
Related Samples Test (nonparametric tests)
Independent Samples Test (nonparametric tests)
Categorical Field Information (nonparametric tests)
Pairwise Comparisons (nonparametric tests)
Homogeneous Subsets (nonparametric tests)


Pairwise Comparisons (nonparametric tests)

pairwise comparisons,pairwise comparisons,pairwise comparisons
nonparametric tests,nonparametric tests,nonparametric tests
Expand Show details Collapse Hide details
Pairwise Comparisons

The Pairwise Comparisons view shows a distance network chart and comparisons table produced by k-sample nonparametric tests when pairwise multiple comparisons are requested.

• The distance network chart is a graphical representation of the comparisons table in which the distances between nodes in the network correspond to differences between samples. Yellow lines correspond to statistically significant differences; black lines correspond to non-significant differences. Hovering over a line in the network displays a tooltip with the adjusted significance of the difference between the nodes connected by the line.

• The comparison table shows the numerical results of all pairwise comparisons. Each row corresponds to a separate pairwise comparison. Clicking on a column header sorts the rows by values in that column. See the topic Pairwise Multiple Comparisons (nonparametric tests algorithms) for more information.

Related Topics

Model View (nonparametric tests)
Hypothesis Summary (nonparametric tests)
Confidence Interval Summary (nonparametric tests)
One Sample Test (nonparametric tests)
Related Samples Test (nonparametric tests)
Independent Samples Test (nonparametric tests)
Categorical Field Information (nonparametric tests)
Continuous Field Information (nonparametric tests)
Homogeneous Subsets (nonparametric tests)


Homogeneous Subsets (nonparametric tests)

homogeneous subsets,homogeneous subsets,homogeneous subsets
nonparametric tests,nonparametric tests,nonparametric tests
Expand Show details Collapse Hide details
Homogenous Subsets

The Homogeneous Subsets view shows a comparisons table produced by k-sample nonparametric tests when stepwise stepdown multiple comparisons are requested.

• Each row in the Sample group corresponds to a separate related sample (represented in the data by separate fields). Samples that are not statistically significantly different are grouped into same-colored subsets; there is a separate column for each identified subset. When all samples are statistically significantly different, there is a separate subset for each sample. When none of the samples are statistically significantly different, there is a single subset.

• A test statistic, significance value, and adjusted significance value are computed for each subset containing more than one sample. See the topic Stepwise Stepdown Multiple Comparisons (nonparametric tests algorithms) for more information.

Related Topics

Model View (nonparametric tests)
Hypothesis Summary (nonparametric tests)
Confidence Interval Summary (nonparametric tests)
One Sample Test (nonparametric tests)
Related Samples Test (nonparametric tests)
Independent Samples Test (nonparametric tests)
Categorical Field Information (nonparametric tests)
Continuous Field Information (nonparametric tests)
Pairwise Comparisons (nonparametric tests)


NPTESTS Command Additional Features

The command syntax language also allows you to:

• Specify one-sample, independent-samples, and related-samples tests in a single run of the procedure.

Related Topics

NPTESTS


Legacy Dialogs (Nonparametric Tests)

There are a number of "legacy" dialogs that also perform nonparametric tests. These dialogs support the functionality provided by the Exact Tests option.

Chi-Square Test. Tabulates a variable into categories and computes a chi-square statistic based on the differences between observed and expected frequencies.

Binomial Test. Compares the observed frequency in each category of a dichotomous variable with expected frequencies from the binomial distribution.

Runs Test. Tests whether the order of occurrence of two values of a variable is random.

One-Sample Kolmogorov-Smirnov Test. Compares the observed cumulative distribution function for a variable with a specified theoretical distribution, which may be normal, uniform, exponential, or Poisson.

Two-Independent-Samples Tests. Compares two groups of cases on one variable. The Mann-Whitney U test, two-sample Kolmogorov-Smirnov test, Moses test of extreme reactions, and Wald-Wolfowitz runs test are available.

Two-Related-Samples Tests. Compares the distributions of two variables. The Wilcoxon signed-rank test, the sign test, and the McNemar test are available.

Tests for Several Independent Samples. Compares two or more groups of cases on one variable. The Kruskal-Wallis test, the Median test, and the Jonckheere-Terpstra test are available.

Tests for Several Related Samples. Compares the distributions of two or more variables. Friedman's test, Kendall's W, and Cochran's Q are available.

Quartiles and the mean, standard deviation, minimum, maximum, and number of nonmissing cases are available for all of the above tests.


Chi-Square Test

chi-square,chi-square,chi-square
one-sample test,one-sample test,one-sample test
nonparametric tests,nonparametric tests,nonparametric tests
chi-square,chi-square,chi-square
chi-square,chi-square,chi-square

The Chi-Square Test procedure tabulates a variable into categories and computes a chi-square statistic. This goodness-of-fit test compares the observed and expected frequencies in each category to test that all categories contain the same proportion of values or test that each category contains a user-specified proportion of values.

Examples. The chi-square test could be used to determine whether a bag of jelly beans contains equal proportions of blue, brown, green, orange, red, and yellow candies. You could also test to see whether a bag of jelly beans contains 5% blue, 30% brown, 10% green, 20% orange, 15% red, and 15% yellow candies.

Statistics. Mean, standard deviation, minimum, maximum, and quartiles. The number and the percentage of nonmissing and missing cases; the number of cases observed and expected for each category; residuals; and the chi-square statistic.

Show me

Chi-Square Test Data Considerations Collapse Hide details

Data. Use ordered or unordered numeric categorical variables (ordinal or nominal levels of measurement). To convert string variables to numeric variables, use the Automatic Recode procedure, which is available on the Transform menu.

Assumptions. Nonparametric tests do not require assumptions about the shape of the underlying distribution. The data are assumed to be a random sample. The expected frequencies for each category should be at least 1. No more than 20% of the categories should have expected frequencies of less than 5.

To Obtain a Chi-Square Test Collapse Hide details

To Obtain a Chi-Square Test

This feature requires the Statistics Base option.

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Nonparametric Tests
Legacy Dialogs
Chi-Square...

Select one or more test variables. Each variable produces a separate test.

Optionally, click Options for descriptive statistics, quartiles, and control of the treatment of missing data.

This procedure pastes NPAR TESTS command syntax.

See NPAR TESTS Algorithms for computational details for this procedure.

Related Topics

NPAR TESTS Command Additional Features (Chi-Square Test)
NPAR TESTS
Chi-Square Test: Related Procedures
Chi-Square Test Expected Range and Expected Values
Chi-Square Test Options


Chi-Square Test Expected Range and Expected Values

chi-square,chi-square,chi-square
expected range,expected range,expected range
chi-square,chi-square,chi-square
expected values,expected values,expected values

Expected Range. By default, each distinct value of the variable is defined as a category. To establish categories within a specific range, select Use specified range and enter integer values for lower and upper bounds. Categories are established for each integer value within the inclusive range, and cases with values outside of the bounds are excluded. For example, if you specify a value of 1 for Lower and a value of 4 for Upper, only the integer values of 1 through 4 are used for the chi-square test.

Expected Values. By default, all categories have equal expected values. Categories can have user-specified expected proportions. Select Values, enter a value that is greater than 0 for each category of the test variable, and then click Add. Each time you add a value, it appears at the bottom of the value list. The order of the values is important; it corresponds to the ascending order of the category values of the test variable. The first value of the list corresponds to the lowest group value of the test variable, and the last value corresponds to the highest value. Elements of the value list are summed, and then each value is divided by this sum to calculate the proportion of cases expected in the corresponding category. For example, a value list of 3, 4, 5, 4 specifies expected proportions of 3/16, 4/16, 5/16, and 4/16.

Related Topics

Chi-Square Test: Related Procedures
Chi-Square Test
Chi-Square Test Options


Chi-Square Test Options

chi-square,chi-square,chi-square
options,options,options
chi-square,chi-square,chi-square
missing values,missing values,missing values
chi-square,chi-square,chi-square
statistics,statistics,statistics
missing values,missing values,missing values
in Chi-Square Test,in Chi-Square Test,in Chi-Square Test

Statistics. You can choose one or both summary statistics.

• Descriptive. Displays the mean, standard deviation, minimum, maximum, and number of nonmissing cases.

• Quartiles. Displays values corresponding to the 25th, 50th, and 75th percentiles.

Missing Values. Controls the treatment of missing values.

• Exclude cases test-by-test. When several tests are specified, each test is evaluated separately for missing values.

• Exclude cases listwise. Cases with missing values for any variable are excluded from all analyses.

Specifying Options for Chi-Square Test Collapse Hide details

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Nonparametric Tests
Legacy Dialogs
Chi-Square...

In the Chi-Square Test dialog box, click Options.

Related Topics

Chi-Square Test: Related Procedures
Chi-Square Test
Chi-Square Test Expected Range and Expected Values


NPAR TESTS Command Additional Features (Chi-Square Test)

The command syntax language also allows you to:

• Specify different minimum and maximum values or expected frequencies for different variables (with the CHISQUARE subcommand).

• Test the same variable against different expected frequencies or use different ranges (with the EXPECTED subcommand).

Related Topics

Chi-Square Test
NPAR TESTS


Binomial Test

Binomial Test,Binomial Test,Binomial Test
dichotomies,dichotomies,dichotomies
Binomial Test,Binomial Test,Binomial Test

The Binomial Test procedure compares the observed frequencies of the two categories of a dichotomous variable to the frequencies that are expected under a binomial distribution with a specified probability parameter. By default, the probability parameter for both groups is 0.5. To change the probabilities, you can enter a test proportion for the first group. The probability for the second group will be 1 minus the specified probability for the first group.

Example. When you toss a dime, the probability of a head equals 1/2. Based on this hypothesis, a dime is tossed 40 times, and the outcomes are recorded (heads or tails). From the binomial test, you might find that 3/4 of the tosses were heads and that the observed significance level is small (0.0027). These results indicate that it is not likely that the probability of a head equals 1/2; the coin is probably biased.

Statistics. Mean, standard deviation, minimum, maximum, number of nonmissing cases, and quartiles.

Show me

Binomial Test Data Considerations Collapse Hide details

Data. The variables that are tested should be numeric and dichotomous. To convert string variables to numeric variables, use the Automatic Recode procedure, which is available on the Transform menu. A dichotomous variable is a variable that can take only two possible values: yes or no, true or false, 0 or 1, and so on. The first value encountered in the dataset defines the first group, and the other value defines the second group. If the variables are not dichotomous, you must specify a cut point. The cut point assigns cases with values that are less than or equal to the cut point to the first group and assigns the rest of the cases to the second group.

Assumptions. Nonparametric tests do not require assumptions about the shape of the underlying distribution. The data are assumed to be a random sample.

To Obtain a Binomial Test Collapse Hide details

To Obtain a Binomial Test

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Nonparametric Tests
Legacy Dialogs
Binomial...

Select one or more numeric test variables.

Optionally, click Options for descriptive statistics, quartiles, and control of the treatment of missing data.

This procedure pastes NPAR TESTS command syntax.

See NPAR TESTS Algorithms for computational details for this procedure.


Binomial Test Options

Binomial Test,Binomial Test,Binomial Test
options,options,options
Binomial Test,Binomial Test,Binomial Test
missing values,missing values,missing values
Binomial Test,Binomial Test,Binomial Test
statistics,statistics,statistics
missing values,missing values,missing values
in Binomial Test,in Binomial Test,in Binomial Test

Statistics. You can choose one or both summary statistics.

• Descriptive. Displays the mean, standard deviation, minimum, maximum, and number of nonmissing cases.

• Quartiles. Displays values corresponding to the 25th, 50th, and 75th percentiles.

Missing Values. Controls the treatment of missing values.

• Exclude cases test-by-test. When several tests are specified, each test is evaluated separately for missing values.

• Exclude cases listwise. Cases with missing values for any variable that is tested are excluded from all analyses.

Specifying Options for Binomial Test Collapse Hide details

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Nonparametric Tests
Legacy Dialogs
Binomial...

In the Binomial Test dialog box, click Options.


NPAR TESTS Command Additional Features (Binomial Test)

Binomial Test,Binomial Test,Binomial Test
command additional features,command additional features,command additional features

The command syntax language also allows you to:

• Select specific groups (and exclude other groups) when a variable has more than two categories (with the BINOMIAL subcommand).

• Specify different cut points or probabilities for different variables (with the BINOMIAL subcommand).

• Test the same variable against different cut points or probabilities (with the EXPECTED subcommand).


Runs Test

nonparametric tests,nonparametric tests,nonparametric tests
Runs Test,Runs Test,Runs Test
Runs Test,Runs Test,Runs Test
cut points,cut points,cut points

The Runs Test procedure tests whether the order of occurrence of two values of a variable is random. A run is a sequence of like observations. A sample with too many or too few runs suggests that the sample is not random.

Examples. Suppose that 20 people are polled to find out whether they would purchase a product. The assumed randomness of the sample would be seriously questioned if all 20 people were of the same gender. The runs test can be used to determine whether the sample was drawn at random.

Statistics. Mean, standard deviation, minimum, maximum, number of nonmissing cases, and quartiles.

Show me

Runs Test Data Considerations Collapse Hide details

Data. The variables must be numeric. To convert string variables to numeric variables, use the Automatic Recode procedure, which is available on the Transform menu.

Assumptions. Nonparametric tests do not require assumptions about the shape of the underlying distribution. Use samples from continuous probability distributions.

To Obtain a Runs Test Collapse Hide details

To Obtain a Runs Test

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Nonparametric Tests
Legacy Dialogs
Runs...

Select one or more numeric test variables.

Optionally, click Options for descriptive statistics, quartiles, and control of the treatment of missing data.

This procedure pastes NPAR TESTS command syntax.

See NPAR TESTS Algorithms for computational details for this procedure.


Runs Test Cut Point

Runs Test,Runs Test,Runs Test
cut points,cut points,cut points

Cut Point. Specifies a cut point to dichotomize the variables that you have chosen. You can use the observed mean, median, or mode, or you can use a specified value as a cut point. Cases with values that are less than the cut point are assigned to one group, and cases with values that are greater than or equal to the cut point are assigned to another group. One test is performed for each chosen cut point.


Runs Test Options

Runs Test,Runs Test,Runs Test
options,options,options
Runs Test,Runs Test,Runs Test
missing values,missing values,missing values
Runs Test,Runs Test,Runs Test
statistics,statistics,statistics
missing values,missing values,missing values
in Runs Test,in Runs Test,in Runs Test

Statistics. You can choose one or both summary statistics.

• Descriptive. Displays the mean, standard deviation, minimum, maximum, and number of nonmissing cases.

• Quartiles. Displays values corresponding to the 25th, 50th, and 75th percentiles.

Missing Values. Controls the treatment of missing values.

• Exclude cases test-by-test. When several tests are specified, each test is evaluated separately for missing values.

• Exclude cases listwise. Cases with missing values for any variable are excluded from all analyses.

Specifying Options for the Runs Test Collapse Hide details

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Nonparametric Tests
Legacy Dialogs
Runs...

In the Runs Test dialog box, click Options.


NPAR TESTS Command Additional Features (Runs Test)

Runs Test,Runs Test,Runs Test
command additional features,command additional features,command additional features

The command syntax language also allows you to:

• Specify different cut points for different variables (with the RUNS subcommand).

• Test the same variable against different custom cut points (with the RUNS subcommand).


One-Sample Kolmogorov-Smirnov Test

nonparametric tests,nonparametric tests,nonparametric tests
One-Sample Kolmogorov-Smirnov Test,One-Sample Kolmogorov-Smirnov Test,One-Sample Kolmogorov-Smirnov Test
One-Sample Kolmogorov-Smirnov Test,One-Sample Kolmogorov-Smirnov Test,One-Sample Kolmogorov-Smirnov Test
test distribution,test distribution,test distribution
One-Sample Kolmogorov-Smirnov Test,One-Sample Kolmogorov-Smirnov Test,One-Sample Kolmogorov-Smirnov Test
Kolmogorov-Smirnov Z,Kolmogorov-Smirnov Z,Kolmogorov-Smirnov Z
in One-Sample Kolmogorov-Smirnov Test,in One-Sample Kolmogorov-Smirnov Test,in One-Sample Kolmogorov-Smirnov Test

The One-Sample Kolmogorov-Smirnov Test procedure compares the observed cumulative distribution function for a variable with a specified theoretical distribution, which may be normal, uniform, Poisson, or exponential. The Kolmogorov-Smirnov Z is computed from the largest difference (in absolute value) between the observed and theoretical cumulative distribution functions. This goodness-of-fit test tests whether the observations could reasonably have come from the specified distribution.

Example. Many parametric tests require normally distributed variables. The one-sample Kolmogorov-Smirnov test can be used to test that a variable (for example, income) is normally distributed.

Statistics. Mean, standard deviation, minimum, maximum, number of nonmissing cases, and quartiles.

Show me

One-Sample Kolmogorov-Smirnov Test Data Considerations Collapse Hide details

Data. Use quantitative variables (interval or ratio level of measurement).

Assumptions. The Kolmogorov-Smirnov test assumes that the parameters of the test distribution are specified in advance. This procedure estimates the parameters from the sample. The sample mean and sample standard deviation are the parameters for a normal distribution, the sample minimum and maximum values define the range of the uniform distribution, the sample mean is the parameter for the Poisson distribution, and the sample mean is the parameter for the exponential distribution. The power of the test to detect departures from the hypothesized distribution may be seriously diminished. For testing against a normal distribution with estimated parameters, consider the adjusted K-S Lilliefors test (available in the Explore procedure).

To Obtain a One-Sample Kolmogorov-Smirnov Test Collapse Hide details

To Obtain a One-Sample Kolmogorov-Smirnov Test

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Nonparametric Tests
Legacy Dialogs
1-Sample K-S...

Select one or more numeric test variables. Each variable produces a separate test.

Optionally, click Options for descriptive statistics, quartiles, and control of the treatment of missing data.

This procedure pastes NPAR TESTS command syntax.

See NPAR TESTS Algorithms for computational details for this procedure.


One-Sample Kolmogorov-Smirnov Test Options

One-Sample Kolmogorov-Smirnov Test,One-Sample Kolmogorov-Smirnov Test,One-Sample Kolmogorov-Smirnov Test
options,options,options
One-Sample Kolmogorov-Smirnov Test,One-Sample Kolmogorov-Smirnov Test,One-Sample Kolmogorov-Smirnov Test
missing values,missing values,missing values
One-Sample Kolmogorov-Smirnov Test,One-Sample Kolmogorov-Smirnov Test,One-Sample Kolmogorov-Smirnov Test
statistics,statistics,statistics
missing values,missing values,missing values
in One-Sample Kolmogorov-Smirnov Test,in One-Sample Kolmogorov-Smirnov Test,in One-Sample Kolmogorov-Smirnov Test

Statistics. You can choose one or both summary statistics.

• Descriptive. Displays the mean, standard deviation, minimum, maximum, and number of nonmissing cases.

• Quartiles. Displays values corresponding to the 25th, 50th, and 75th percentiles.

Missing Values. Controls the treatment of missing values.

• Exclude cases test-by-test. When several tests are specified, each test is evaluated separately for missing values.

• Exclude cases listwise. Cases with missing values for any variable are excluded from all analyses.

Specifying Options for the One-Sample Kolmogorov-Smirnov Test Collapse Hide details

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Nonparametric Tests
Legacy Dialogs
1-Sample K-S...

In the One-Sample Kolmogorov-Smirnov Test dialog box, click Options.


NPAR TESTS Command Additional Features (One-Sample Kolmogorov-Smirnov Test)

One-Sample Kolmogorov-Smirnov Test,One-Sample Kolmogorov-Smirnov Test,One-Sample Kolmogorov-Smirnov Test
command additional features,command additional features,command additional features

The command syntax language also allows you to specify the parameters of the test distribution (with the K-S subcommand).


Two-Independent-Samples Tests

nonparametric tests,nonparametric tests,nonparametric tests
Two-Independent-Samples Tests,Two-Independent-Samples Tests,Two-Independent-Samples Tests
Two-Independent-Samples Tests,Two-Independent-Samples Tests,Two-Independent-Samples Tests

The Two-Independent-Samples Tests procedure compares two groups of cases on one variable.

Example. New dental braces have been developed that are intended to be more comfortable, to look better, and to provide more rapid progress in realigning teeth. To find out whether the new braces have to be worn as long as the old braces, 10 children are randomly chosen to wear the old braces, and another 10 children are chosen to wear the new braces. From the Mann-Whitney U test, you might find that, on average, children with the new braces did not have to wear the braces as long as children with the old braces.

Statistics. Mean, standard deviation, minimum, maximum, number of nonmissing cases, and quartiles. Tests: Mann-Whitney U, Moses extreme reactions, Kolmogorov-Smirnov Z, Wald-Wolfowitz runs.

Show me

Two-Independent-Samples Tests Data Considerations Collapse Hide details

Data. Use numeric variables that can be ordered.

Assumptions. Use independent, random samples. The Mann-Whitney U test tests equality of two distributions. In order to use it to test for differences in location between two distributions, one must assume that the distributions have the same shape.

To Obtain Two-Independent-Samples Tests Collapse Hide details

To Obtain Two-Independent-Samples Tests

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Nonparametric Tests
Legacy Dialogs
2 Independent Samples...

Select one or more numeric variables.

Select a grouping variable and click Define Groups to split the file into two groups or samples.

This procedure pastes NPAR TESTS command syntax.

See NPAR TESTS Algorithms for computational details for this procedure.


Two-Independent-Samples Test Types

Two-Independent-Samples Tests,Two-Independent-Samples Tests,Two-Independent-Samples Tests
test types,test types,test types
Mann-Whitney U,Mann-Whitney U,Mann-Whitney U
in Two-Independent-Samples Tests,in Two-Independent-Samples Tests,in Two-Independent-Samples Tests
Moses extreme reaction test,Moses extreme reaction test,Moses extreme reaction test
in Two-Independent-Samples Tests,in Two-Independent-Samples Tests,in Two-Independent-Samples Tests
Kolmogorov-Smirnov Z,Kolmogorov-Smirnov Z,Kolmogorov-Smirnov Z
in Two-Independent-Samples Tests,in Two-Independent-Samples Tests,in Two-Independent-Samples Tests
Wald-Wolfowitz runs,Wald-Wolfowitz runs,Wald-Wolfowitz runs
in Two-Independent-Samples Tests,in Two-Independent-Samples Tests,in Two-Independent-Samples Tests

Test Type. Four tests are available to test whether two independent samples (groups) come from the same population.

The Mann-Whitney U test is the most popular of the two-independent-samples tests. It is equivalent to the Wilcoxon rank sum test and the Kruskal-Wallis test for two groups. Mann-Whitney tests that two sampled populations are equivalent in location. The observations from both groups are combined and ranked, with the average rank assigned in the case of ties. The number of ties should be small relative to the total number of observations. If the populations are identical in location, the ranks should be randomly mixed between the two samples. The test calculates the number of times that a score from group 1 precedes a score from group 2 and the number of times that a score from group 2 precedes a score from group 1. The Mann-Whitney U statistic is the smaller of these two numbers. The Wilcoxon rank sum W statistic is also displayed. W is the sum of the ranks for the group with the smaller mean rank, unless the groups have the same mean rank, in which case it is the rank sum from the group that is named last in the Two-Independent-Samples Define Groups dialog box. See the topic Mann-Whitney U Test (nonparametric tests algorithms) for more information.

The Kolmogorov-Smirnov Z test and the Wald-Wolfowitz runs test are more general tests that detect differences in both the locations and shapes of the distributions. The Kolmogorov-Smirnov test is based on the maximum absolute difference between the observed cumulative distribution functions for both samples. When this difference is significantly large, the two distributions are considered different. The Wald-Wolfowitz runs test combines and ranks the observations from both groups. If the two samples are from the same population, the two groups should be randomly scattered throughout the ranking. See the topic Kolmogorov-Smirnov Two-Sample Test (nonparametric tests algorithms) for more information.

The Moses extreme reactions test assumes that the experimental variable will affect some subjects in one direction and other subjects in the opposite direction. The test tests for extreme responses compared to a control group. This test focuses on the span of the control group and is a measure of how much extreme values in the experimental group influence the span when combined with the control group. The control group is defined by the group 1 value in the Two-Independent-Samples Define Groups dialog box. Observations from both groups are combined and ranked. The span of the control group is computed as the difference between the ranks of the largest and smallest values in the control group plus 1. Because chance outliers can easily distort the range of the span, 5% of the control cases are trimmed automatically from each end. See the topic Moses Test of Extreme Reaction (nonparametric tests algorithms) for more information.


Two-Independent-Samples Tests Define Groups

Two-Independent-Samples Tests,Two-Independent-Samples Tests,Two-Independent-Samples Tests
defining groups,defining groups,defining groups
Two-Independent-Samples Tests,Two-Independent-Samples Tests,Two-Independent-Samples Tests
grouping variables,grouping variables,grouping variables

To split the file into two groups or samples, enter an integer value for Group 1 and another value for Group 2. Cases with other values are excluded from the analysis.

Defining Groups for Two-Independent-Samples Tests Collapse Hide details

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Nonparametric Test
Legacy Dialogs
2 Independent Samples...

Select a grouping variable and then click Define Groups.

Enter the values for Group 1 and Group 2 to define the groups.


Two-Independent-Samples Tests Options

Two-Independent-Samples Tests,Two-Independent-Samples Tests,Two-Independent-Samples Tests
options,options,options
Two-Independent-Samples Tests,Two-Independent-Samples Tests,Two-Independent-Samples Tests
missing values,missing values,missing values
Two-Independent-Samples Tests,Two-Independent-Samples Tests,Two-Independent-Samples Tests
statistics,statistics,statistics
missing values,missing values,missing values
in Two-Independent-Samples Tests,in Two-Independent-Samples Tests,in Two-Independent-Samples Tests

Statistics. You can choose one or both summary statistics.

• Descriptive. Displays the mean, standard deviation, minimum, maximum, and the number of nonmissing cases.

• Quartiles. Displays values corresponding to the 25th, 50th, and 75th percentiles.

Missing Values. Controls the treatment of missing values.

• Exclude cases test-by-test. When several tests are specified, each test is evaluated separately for missing values.

• Exclude cases listwise. Cases with missing values for any variable are excluded from all analyses.

Specifying Options for Two-Independent-Samples Tests Collapse Hide details

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Nonparametric
Legacy Dialogs
2 Independent Samples...

In the Two-Independent-Samples Tests dialog box, click Options.


NPAR TESTS Command Additional Features (Two-Independent-Samples Tests)

Two-Independent-Samples Tests,Two-Independent-Samples Tests,Two-Independent-Samples Tests
command additional features,command additional features,command additional features

The command syntax language also allows you to specify the number of cases to be trimmed for the Moses test (with the MOSES subcommand).


Two-Related-Samples Tests

nonparametric tests,nonparametric tests,nonparametric tests
Two-Related-Samples Tests,Two-Related-Samples Tests,Two-Related-Samples Tests
Two-Related-Samples Tests,Two-Related-Samples Tests,Two-Related-Samples Tests
related samples,related samples,related samples
McNemar test,McNemar test,McNemar test
in Two-Related-Samples Tests,in Two-Related-Samples Tests,in Two-Related-Samples Tests
sign test,sign test,sign test
in Two-Related-Samples Tests,in Two-Related-Samples Tests,in Two-Related-Samples Tests
Wilcoxon signed-rank test,Wilcoxon signed-rank test,Wilcoxon signed-rank test
in Two-Related-Samples Tests,in Two-Related-Samples Tests,in Two-Related-Samples Tests
marginal homogeneity test,marginal homogeneity test,marginal homogeneity test
in Two-Related-Samples Tests,in Two-Related-Samples Tests,in Two-Related-Samples Tests

The Two-Related-Samples Tests procedure compares the distributions of two variables.

Example. In general, do families receive the asking price when they sell their homes? By applying the Wilcoxon signed-rank test to data for 10 homes, you might learn that seven families receive less than the asking price, one family receives more than the asking price, and two families receive the asking price.

Statistics. Mean, standard deviation, minimum, maximum, number of nonmissing cases, and quartiles. Tests: Wilcoxon signed-rank, sign, McNemar. If the Exact Tests option is installed (available only on Windows operating systems), the marginal homogeneity test is also available.

Show me

Two-Related-Samples Tests Data Considerations Collapse Hide details

Data. Use numeric variables that can be ordered.

Assumptions. Although no particular distributions are assumed for the two variables, the population distribution of the paired differences is assumed to be symmetric.

To Obtain Two-Related-Samples Tests Collapse Hide details

To Obtain Two-Related-Samples Tests

From the menus choose:

Analyze
Nonparametric Tests
Legacy Dialogs
2 Related Samples...

Select one or more pairs of variables.

This procedure pastes NPAR TESTS command syntax.

See NPAR TESTS Algorithms for computational details for this procedure.


Two-Related-Samples Test Types

Two-Related-Samples Tests,Two-Related-Samples Tests,Two-Related-Samples Tests
test types,test types,test types

The tests in this section compare the distributions of two related variables. The appropriate test to use depends on the type of data.

If your data are continuous, use the sign test or the Wilcoxon signed-rank test. The sign test computes the differences between the two variables for all cases and classifies the differences as positive, negative, or tied. If the two variables are similarly distributed, the number of positive and negative differences will not differ significantly. The Wilcoxon signed-rank test considers information about both the sign of the differences and the magnitude of the differences between pairs. Because the Wilcoxon signed-rank test incorporates more information about the data, it is more powerful than the sign test.

If your data are binary, use the McNemar test. This test is typically used in a repeated measures situation, in which each subject's response is elicited twice, once before and once after a specified event occurs. The McNemar test determines whether the initial response rate (before the event) equals the final response rate (after the event). This test is useful for detecting changes in responses due to experimental intervention in before-and-after designs.

If your data are categorical, use the marginal homogeneity test. This test is an extension of the McNemar test from binary response to multinomial response. It tests for changes in response (using the chi-square distribution) and is useful for detecting response changes due to experimental intervention in before-and-after designs. The marginal homogeneity test is available only if you have installed Exact Tests.


Two-Related-Samples Tests Options

Two-Related-Samples Tests,Two-Related-Samples Tests,Two-Related-Samples Tests
options,options,options
Two-Related-Samples Tests,Two-Related-Samples Tests,Two-Related-Samples Tests
missing values,missing values,missing values
Two-Related-Samples Tests,Two-Related-Samples Tests,Two-Related-Samples Tests
statistics,statistics,statistics
missing values,missing values,missing values
in Two-Related-Samples Tests,in Two-Related-Samples Tests,in Two-Related-Samples Tests

Statistics. You can choose one or both summary statistics.

• Descriptive. Displays the mean, standard deviation, minimum, maximum, and the number of nonmissing cases.

• Quartiles. Displays values corresponding to the 25th, 50th, and 75th percentiles.

Missing Values. Controls the treatment of missing values.

• Exclude cases test-by-test. When several tests are specified, each test is evaluated separately for missing values.

• Exclude cases listwise. Cases with missing values for any variable are excluded from all analyses.

Specifying Options for Two-Related-Samples Tests Collapse Hide details

From the menus choose:

Analyze
Nonparametric Tests
Legacy Dialogs
2 Related Samples...

In the Two-Related-Samples Tests dialog box, click Options.


NPAR TESTS Command Additional Features (Two Related Samples)

Two-Related-Samples Tests,Two-Related-Samples Tests,Two-Related-Samples Tests
command additional features,command additional features,command additional features

The command syntax language also allows you to test a variable with each variable on a list.


Tests for Several Independent Samples

nonparametric tests,nonparametric tests,nonparametric tests
Tests for Several Independent Samples,Tests for Several Independent Samples,Tests for Several Independent Samples
Tests for Several Independent Samples,Tests for Several Independent Samples,Tests for Several Independent Samples
Kruskal-Wallis H,Kruskal-Wallis H,Kruskal-Wallis H
in Two-Independent-Samples Tests,in Two-Independent-Samples Tests,in Two-Independent-Samples Tests
median test,median test,median test
in Two-Independent-Samples Tests,in Two-Independent-Samples Tests,in Two-Independent-Samples Tests

The Tests for Several Independent Samples procedure compares two or more groups of cases on one variable.

Example. Do three brands of 100-watt lightbulbs differ in the average time that the bulbs will burn? From the Kruskal-Wallis one-way analysis of variance, you might learn that the three brands do differ in average lifetime.

Statistics. Mean, standard deviation, minimum, maximum, number of nonmissing cases, and quartiles. Tests: Kruskal-Wallis H, median.

Show me

Tests for Several Independent Samples Data Considerations Collapse Hide details

Data. Use numeric variables that can be ordered.

Assumptions. Use independent, random samples. The Kruskal-Wallis H test requires that the tested samples be similar in shape.

To Obtain Tests for Several Independent Samples Collapse Hide details

To Obtain Tests for Several Independent Samples

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Nonparametric Tests
Legacy Dialogs
K Independent Samples...

Select one or more numeric variables.

Select a grouping variable and click Define Range to specify minimum and maximum integer values for the grouping variable.

This procedure pastes NPAR TESTS command syntax.

See NPAR TESTS Algorithms for computational details for this procedure.


Tests for Several Independent Samples Test Types

Tests for Several Independent Samples,Tests for Several Independent Samples,Tests for Several Independent Samples
test types,test types,test types

Three tests are available to determine if several independent samples come from the same population. The Kruskal-Wallis H test, the median test, and the Jonckheere-Terpstra test all test whether several independent samples are from the same population.

The Kruskal-Wallis H test, an extension of the Mann-Whitney U test, is the nonparametric analog of one-way analysis of variance and detects differences in distribution location. The median test, which is a more general test (but not as powerful), detects distributional differences in location and shape. The Kruskal-Wallis H test and the median test assume that there is no a priori ordering of the k populations from which the samples are drawn.

When there is a natural a priori ordering (ascending or descending) of the k populations, the Jonckheere-Terpstra test is more powerful. For example, the k populations might represent k increasing temperatures. The hypothesis that different temperatures produce the same response distribution is tested against the alternative that as the temperature increases, the magnitude of the response increases. Here, the alternative hypothesis is ordered; therefore, Jonckheere-Terpstra is the most appropriate test to use. The Jonckheere-Terpstra test is available only if you have installed the Exact Tests add-on module.


Tests for Several Independent Samples Define Range

Tests for Several Independent Samples,Tests for Several Independent Samples,Tests for Several Independent Samples
defining range,defining range,defining range
Tests for Several Independent Samples,Tests for Several Independent Samples,Tests for Several Independent Samples
grouping variables,grouping variables,grouping variables

To define the range, enter integer values for Minimum and Maximum that correspond to the lowest and highest categories of the grouping variable. Cases with values outside of the bounds are excluded. For example, if you specify a minimum value of 1 and a maximum value of 3, only the integer values of 1 through 3 are used. The minimum value must be less than the maximum value, and both values must be specified.

Defining Range for Tests for Several Independent Samples Collapse Hide details

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Nonparametric Tests
Legacy Dialogs
K Independent Samples...

Select a grouping variable and then select Define Groups.

Enter integer values for minimum and maximum that correspond to the lowest and highest categories of the grouping variable.


Tests for Several Independent Samples Options

Tests for Several Independent Samples,Tests for Several Independent Samples,Tests for Several Independent Samples
options,options,options
Tests for Several Independent Samples,Tests for Several Independent Samples,Tests for Several Independent Samples
missing values,missing values,missing values
Tests for Several Independent Samples,Tests for Several Independent Samples,Tests for Several Independent Samples
statistics,statistics,statistics
missing values,missing values,missing values
in Tests for Several Independent Samples,in Tests for Several Independent Samples,in Tests for Several Independent Samples

Statistics. You can choose one or both summary statistics.

• Descriptive. Displays the mean, standard deviation, minimum, maximum, and the number of nonmissing cases.

• Quartiles. Displays values corresponding to the 25th, 50th, and 75th percentiles.

Missing Values. Controls the treatment of missing values.

• Exclude cases test-by-test. When several tests are specified, each test is evaluated separately for missing values.

• Exclude cases listwise. Cases with missing values for any variable are excluded from all analyses.

Specifying Options for Tests for Several Independent Samples Collapse Hide details

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Nonparametric Tests
Legacy Dialogs
K Independent Samples...

In the Tests for Several Independent Samples dialog box, select Options.


NPAR TESTS Command Additional Features (K Independent Samples)

Tests for Several Independent Samples,Tests for Several Independent Samples,Tests for Several Independent Samples
command additional features,command additional features,command additional features

The command syntax language also allows you to specify a value other than the observed median for the median test (with the MEDIAN subcommand).


Tests for Several Related Samples

nonparametric tests,nonparametric tests,nonparametric tests
Tests for Several Related Samples,Tests for Several Related Samples,Tests for Several Related Samples
Tests for Several Related Samples,Tests for Several Related Samples,Tests for Several Related Samples
related samples,related samples,related samples

The Tests for Several Related Samples procedure compares the distributions of two or more variables.

Example. Does the public associate different amounts of prestige with a doctor, a lawyer, a police officer, and a teacher? Ten people are asked to rank these four occupations in order of prestige. Friedman's test indicates that the public does associate different amounts of prestige with these four professions.

Statistics. Mean, standard deviation, minimum, maximum, number of nonmissing cases, and quartiles. Tests: Friedman, Kendall's W, and Cochran's Q.

Show me

Tests for Several Related Samples Data Considerations Collapse Hide details

Data. Use numeric variables that can be ordered.

Assumptions. Nonparametric tests do not require assumptions about the shape of the underlying distribution. Use dependent, random samples.

To Obtain Tests for Several Related Samples Collapse Hide details

To Obtain Tests for Several Related Samples

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Nonparametric Tests
Legacy Dialogs
K Related Samples...

Select two or more numeric test variables.

This procedure pastes NPAR TESTS command syntax.

See NPAR TESTS Algorithms for computational details for this procedure.


Tests for Several Related Samples Test Types

Tests for Several Related Samples,Tests for Several Related Samples,Tests for Several Related Samples
test types,test types,test types
Cochran's Q,Cochran's Q,Cochran's Q
in Tests for Several Related Samples,in Tests for Several Related Samples,in Tests for Several Related Samples
Friedman test,Friedman test,Friedman test
in Tests for Several Related Samples,in Tests for Several Related Samples,in Tests for Several Related Samples
Kendall's W,Kendall's W,Kendall's W
in Tests for Several Related Samples,in Tests for Several Related Samples,in Tests for Several Related Samples

Three tests are available to compare the distributions of several related variables.

The Friedman test is the nonparametric equivalent of a one-sample repeated measures design or a two-way analysis of variance with one observation per cell. Friedman tests the null hypothesis that k related variables come from the same population. For each case, the k variables are ranked from 1 to k. The test statistic is based on these ranks.

Kendall's W is a normalization of the Friedman statistic. Kendall's W is interpretable as the coefficient of concordance, which is a measure of agreement among raters. Each case is a judge or rater, and each variable is an item or person being judged. For each variable, the sum of ranks is computed. Kendall's W ranges between 0 (no agreement) and 1 (complete agreement).

Cochran's Q is identical to the Friedman test but is applicable when all responses are binary. This test is an extension of the McNemar test to the k-sample situation. Cochran's Q tests the hypothesis that several related dichotomous variables have the same mean. The variables are measured on the same individual or on matched individuals.


Tests for Several Related Samples Statistics

Tests for Several Related Samples,Tests for Several Related Samples,Tests for Several Related Samples
statistics,statistics,statistics

You can choose statistics.

• Descriptive. Displays the mean, standard deviation, minimum, maximum, and the number of nonmissing cases.

• Quartiles. Displays values corresponding to the 25th, 50th, and 75th percentiles.

Specifying Options for Tests for Several Related Samples Collapse Hide details

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Nonparametric Tests
Legacy Dialogs
K Related Samples...

In the Tests for Several Related Samples dialog box, click Statistics.


Multiple Response Define Sets

Define Multiple Response Sets,Define Multiple Response Sets,Define Multiple Response Sets
categories,categories,categories
Define Multiple Response Sets,Define Multiple Response Sets,Define Multiple Response Sets
dichotomies,dichotomies,dichotomies
Define Multiple Response Sets,Define Multiple Response Sets,Define Multiple Response Sets
Define Multiple Response Sets,Define Multiple Response Sets,Define Multiple Response Sets
set labels,set labels,set labels
Define Multiple Response Sets,Define Multiple Response Sets,Define Multiple Response Sets
set names,set names,set names

The Define Multiple Response Sets procedure groups elementary variables into multiple dichotomy and multiple category sets, for which you can obtain frequency tables and crosstabulations. You can define up to 20 multiple response sets. Each set must have a unique name. To remove a set, highlight it on the list of multiple response sets and click Remove. To change a set, highlight it on the list, modify any set definition characteristics, and click Change.

You can code your elementary variables as dichotomies or categories. To use dichotomous variables, select Dichotomies to create a multiple dichotomy set. Enter an integer value for Counted value. Each variable having at least one occurrence of the counted value becomes a category of the multiple dichotomy set. Select Categories to create a multiple category set having the same range of values as the component variables. Enter integer values for the minimum and maximum values of the range for categories of the multiple category set. The procedure totals each distinct integer value in the inclusive range across all component variables. Empty categories are not tabulated.

Each multiple response set must be assigned a unique name of up to seven characters. The procedure prefixes a dollar sign ($) to the name you assign. You cannot use the following reserved names: casenum, sysmis, jdate, date, time, length, and width. The name of the multiple response set exists only for use in multiple response procedures. You cannot refer to multiple response set names in other procedures. Optionally, you can enter a descriptive variable label for the multiple response set. The label can be up to 40 characters long.

Show me

To Define Multiple Response Sets Collapse Hide details

To Define Multiple Response Sets

From the menus choose:

Analyze
Multiple Response
Define Variable Sets...

Select two or more variables.

If your variables are coded as dichotomies, indicate which value you want to have counted. If your variables are coded as categories, define the range of the categories.

Enter a unique name for each multiple response set.

Click Add to add the multiple response set to the list of defined sets.

Related Topics

Multiple Response Frequencies
Multiple Response Crosstabs
MULT RESPONSE


Multiple Response Frequencies

Multiple Response Frequencies,Multiple Response Frequencies,Multiple Response Frequencies
missing values,missing values,missing values
in Multiple Response Frequencies,in Multiple Response Frequencies,in Multiple Response Frequencies
multiple response analysis,multiple response analysis,multiple response analysis
frequency tables,frequency tables,frequency tables
multiple response analysis,multiple response analysis,multiple response analysis
Multiple Response Frequencies,Multiple Response Frequencies,Multiple Response Frequencies
Multiple Response Frequencies,Multiple Response Frequencies,Multiple Response Frequencies
missing values,missing values,missing values

The Multiple Response Frequencies procedure produces frequency tables for multiple response sets. You must first define one or more multiple response sets (see "Multiple Response Define Sets").

For multiple dichotomy sets, category names shown in the output come from variable labels defined for elementary variables in the group. If the variable labels are not defined, variable names are used as labels. For multiple category sets, category labels come from the value labels of the first variable in the group. If categories missing for the first variable are present for other variables in the group, define a value label for the missing categories.

Missing Values. Cases with missing values are excluded on a table-by-table basis. Alternatively, you can choose one or both of the following:

• Exclude cases listwise within dichotomies. Excludes cases with missing values for any variable from the tabulation of the multiple dichotomy set. This applies only to multiple response sets defined as dichotomy sets. By default, a case is considered missing for a multiple dichotomy set if none of its component variables contains the counted value. Cases with missing values for some (but not all variables) are included in the tabulations of the group if at least one variable contains the counted value.

• Exclude cases listwise within categories. Excludes cases with missing values for any variable from tabulation of the multiple category set. This applies only to multiple response sets defined as category sets. By default, a case is considered missing for a multiple category set only if none of its components has valid values within the defined range.

Example. Each variable created from a survey question is an elementary variable. To analyze a multiple response item, you must combine the variables into one of two types of multiple response sets: a multiple dichotomy set or a multiple category set. For example, if an airline survey asked which of three airlines (American, United, TWA) you have flown in the last six months and you used dichotomous variables and defined a multiple dichotomy set, each of the three variables in the set would become a category of the group variable. The counts and percentages for the three airlines are displayed in one frequency table. If you discover that no respondent mentioned more than two airlines, you could create two variables, each having three codes, one for each airline. If you define a multiple category set, the values are tabulated by adding the same codes in the elementary variables together. The resulting set of values is the same as those for each of the elementary variables. For example, 30 responses for United are the sum of the five United responses for airline 1 and the 25 United responses for airline 2. The counts and percentages for the three airlines are displayed in one frequency table.

Statistics. Frequency tables displaying counts, percentages of responses, percentages of cases, number of valid cases, and number of missing cases.

Show me

Multiple Response Frequencies Data Considerations Collapse Hide details

Data. Use multiple response sets.

Assumptions. The counts and percentages provide a useful description for data from any distribution.

Related procedures. The Multiple Response Define Sets procedure allows you to define multiple response sets.

To Obtain Multiple Response Frequencies Collapse Hide details

To Obtain Multiple Response Frequencies

From the menus choose:

Analyze
Multiple Response
Frequencies...

Select one or more multiple response sets.

Related Topics

Multiple Response Define Sets
Multiple Response Crosstabs
MULT RESPONSE


Multiple Response Crosstabs

Multiple Response Crosstabs,Multiple Response Crosstabs,Multiple Response Crosstabs
crosstabulation,crosstabulation,crosstabulation
multiple response,multiple response,multiple response
multiple response analysis,multiple response analysis,multiple response analysis
crosstabulation,crosstabulation,crosstabulation
multiple response analysis,multiple response analysis,multiple response analysis
Multiple Response Crosstabs,Multiple Response Crosstabs,Multiple Response Crosstabs

The Multiple Response Crosstabs procedure crosstabulates defined multiple response sets, elementary variables, or a combination. You can also obtain cell percentages based on cases or responses, modify the handling of missing values, or get paired crosstabulations. You must first define one or more multiple response sets (see "To Define Multiple Response Sets").

For multiple dichotomy sets, category names shown in the output come from variable labels defined for elementary variables in the group. If the variable labels are not defined, variable names are used as labels. For multiple category sets, category labels come from the value labels of the first variable in the group. If categories missing for the first variable are present for other variables in the group, define a value label for the missing categories. The procedure displays category labels for columns on three lines, with up to eight characters per line. To avoid splitting words, you can reverse row and column items or redefine labels.

Example. Both multiple dichotomy and multiple category sets can be crosstabulated with other variables in this procedure. An airline passenger survey asks passengers for the following information: Circle all of the following airlines you have flown at least once in the last six months (American, United, TWA). Which is more important in selecting a flight--schedule or service? Select only one. After entering the data as dichotomies or multiple categories and combining them into a set, you can crosstabulate the airline choices with the question involving service or schedule.

Statistics. Crosstabulation with cell, row, column, and total counts, and cell, row, column, and total percentages. The cell percentages can be based on cases or responses.

Show me

Multiple Response Crosstabs Data Considerations Collapse Hide details

Data. Use multiple response sets or numeric categorical variables.

Assumptions. The counts and percentages provide a useful description of data from any distribution.

Related procedures. The Multiple Response Define Sets procedure allows you to define multiple response sets.

To Obtain Multiple Response Crosstabs Collapse Hide details

To Obtain Multiple Response Crosstabs

From the menus choose:

Analyze
Multiple Response
Crosstabs...

Select one or more numeric variables or multiple response sets for each dimension of the crosstabulation.

Define the range of each elementary variable.

Optionally, you can obtain a two-way crosstabulation for each category of a control variable or multiple response set. Select one or more items for the Layer(s) list.

Related Topics

Multiple Response Define Sets
Multiple Response Frequencies
Multiple Response Crosstabs Define Ranges
Multiple Response Crosstabs Options
MULT RESPONSE


Multiple Response Crosstabs Define Ranges

Multiple Response Crosstabs,Multiple Response Crosstabs,Multiple Response Crosstabs
defining value ranges,defining value ranges,defining value ranges

Value ranges must be defined for any elementary variable in the crosstabulation. Enter the integer minimum and maximum category values that you want to tabulate. Categories outside the range are excluded from analysis. Values within the inclusive range are assumed to be integers (non-integers are truncated).

Defining Ranges in Multiple Response Crosstabs Collapse Hide details

From the menus choose:

Analyze
Multiple Response
Crosstabs...

Select a variable and click Define Ranges.

Enter integer values for minimum and maximum that correspond to the lowest and highest categories of the variable.

Repeat this process for each variable.

Related Topics

Multiple Response Crosstabs
Multiple Response Crosstabs Options


Multiple Response Crosstabs Options

Multiple Response Crosstabs,Multiple Response Crosstabs,Multiple Response Crosstabs
cell percentages,cell percentages,cell percentages
missing values,missing values,missing values
in Multiple Response Crosstabs,in Multiple Response Crosstabs,in Multiple Response Crosstabs
Multiple Response Crosstabs,Multiple Response Crosstabs,Multiple Response Crosstabs
matching variables across response sets,matching variables across response sets,matching variables across response sets
Multiple Response Crosstabs,Multiple Response Crosstabs,Multiple Response Crosstabs
percentages based on responses,percentages based on responses,percentages based on responses
Multiple Response Crosstabs,Multiple Response Crosstabs,Multiple Response Crosstabs
missing values,missing values,missing values
Multiple Response Crosstabs,Multiple Response Crosstabs,Multiple Response Crosstabs
percentages based on cases,percentages based on cases,percentages based on cases

Cell Percentages. Cell counts are always displayed. You can choose to display row percentages, column percentages, and two-way table (total) percentages.

Percentages Based on. You can base cell percentages on cases (or respondents). This is not available if you select matching of variables across multiple category sets. You can also base cell percentages on responses. For multiple dichotomy sets, the number of responses is equal to the number of counted values across cases. For multiple category sets, the number of responses is the number of values in the defined range.

Missing Values. You can choose one or both of the following:

• Exclude cases listwise within dichotomies. Excludes cases with missing values for any variable from the tabulation of the multiple dichotomy set. This applies only to multiple response sets defined as dichotomy sets. By default, a case is considered missing for a multiple dichotomy set if none of its component variables contains the counted value. Cases with missing values for some, but not all, variables are included in the tabulations of the group if at least one variable contains the counted value.

• Exclude cases listwise within categories. Excludes cases with missing values for any variable from tabulation of the multiple category set. This applies only to multiple response sets defined as category sets. By default, a case is considered missing for a multiple category set only if none of its components has valid values within the defined range.

By default, when crosstabulating two multiple category sets, the procedure tabulates each variable in the first group with each variable in the second group and sums the counts for each cell; therefore, some responses can appear more than once in a table. You can choose the following option:

Match variables across response sets. Pairs the first variable in the first group with the first variable in the second group, and so on. If you select this option, the procedure bases cell percentages on responses rather than respondents. Pairing is not available for multiple dichotomy sets or elementary variables.

Specifying Options for Multiple Response Crosstabs Collapse Hide details

From the menus choose:

Analyze
Multiple Response
Crosstabs...

In the Multiple Response Crosstabs dialog box, click Options.

Related Topics

Multiple Response Crosstabs
Multiple Response Crosstabs Define Ranges


MULT RESPONSE Command Additional Features

Multiple Response,Multiple Response,Multiple Response
command additional features,command additional features,command additional features

The command syntax language also allows you to:

• Obtain crosstabulation tables with up to five dimensions (with the BY subcommand).

• Change output formatting options, including suppression of value labels (with the FORMAT subcommand).

Related Topics

MULT RESPONSE


Report Summaries in Rows

reports,reports,reports
row summary reports,row summary reports,row summary reports
Report Summaries in Rows,Report Summaries in Rows,Report Summaries in Rows
Report Summaries in Rows,Report Summaries in Rows,Report Summaries in Rows
data columns,data columns,data columns
Report Summaries in Rows,Report Summaries in Rows,Report Summaries in Rows
break columns,break columns,break columns
Report Summaries in Rows,Report Summaries in Rows,Report Summaries in Rows
sorting sequences,sorting sequences,sorting sequences

Report Summaries in Rows produces reports in which different summary statistics are laid out in rows. Case listings are also available, with or without summary statistics.

Example. A company with a chain of retail stores keeps records of employee information, including salary, job tenure, and the store and division in which each employee works. You could generate a report that provides individual employee information (listing) broken down by store and division (break variables), with summary statistics (for example, mean salary) for each store, division, and division within each store.

Data Columns. Lists the report variables for which you want case listings or summary statistics and controls the display format of data columns.

Break Columns. Lists optional break variables that divide the report into groups and controls the summary statistics and display formats of break columns. For multiple break variables, there will be a separate group for each category of each break variable within categories of the preceding break variable in the list. Break variables should be discrete categorical variables that divide cases into a limited number of meaningful categories. Individual values of each break variable appear, sorted, in a separate column to the left of all data columns.

Report. Controls overall report characteristics, including overall summary statistics, display of missing values, page numbering, and titles.

Display cases. Displays the actual values (or value labels) of the data-column variables for every case. This produces a listing report, which can be much longer than a summary report.

Preview. Displays only the first page of the report. This option is useful for previewing the format of your report without processing the whole report.

Data are already sorted. For reports with break variables, the data file must be sorted by break variable values before generating the report. If your data file is already sorted by values of the break variables, you can save processing time by selecting this option. This option is particularly useful after running a preview report.

Related Topics

To Obtain a Summary Report: Summaries in Rows
REPORT
Report Summaries in Columns
Report Data Column/Break Format
Report Summary Lines for/Final Summary Lines
Report Break Options
Report Options
Report Layout
Report Titles


To Obtain a Summary Report: Summaries in Rows

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Reports
Report Summaries in Rows...

Select one or more variables for Data Columns. One column in the report is generated for each variable selected.

For reports sorted and displayed by subgroups, select one or more variables for Break Columns.

For reports with summary statistics for subgroups defined by break variables, select the break variable in the Break Column Variables list and click Summary in the Break Columns group to specify the summary measure(s).

For reports with overall summary statistics, click Summary to specify the summary measure(s).

Related Topics

Report Summaries in Rows
Report Data Column/Break Format
Report Summary Lines for/Final Summary Lines
Report Break Options
Report Options
Report Layout
Report Titles


Report Data Column/Break Format

Report Summaries in Rows,Report Summaries in Rows,Report Summaries in Rows
column format,column format,column format
Report Summaries in Columns,Report Summaries in Columns,Report Summaries in Columns
column format,column format,column format
formatting,formatting,formatting
columns in reports,columns in reports,columns in reports

The Format dialog boxes control column titles, column width, text alignment, and the display of data values or value labels. Data Column Format controls the format of data columns on the right side of the report page. Break Format controls the format of break columns on the left side.

Column Title. For the selected variable, controls the column title. Long titles are automatically wrapped within the column. Use the Enter key to manually insert line breaks where you want titles to wrap.

Value Position within Column. For the selected variable, controls the alignment of data values or value labels within the column. Alignment of values or labels does not affect alignment of column headings. You can either indent the column contents by a specified number of characters or center the contents.

Column Content. For the selected variable, controls the display of either data values or defined value labels. Data values are always displayed for any values that do not have defined value labels. (Not available for data columns in column summary reports.)

Related Topics

Specifying Data Column/Break Column Format
Report Summaries in Columns
To Obtain a Summary Report: Summaries in Columns
Data Columns Summary Function
Data Columns Summary for Total Column
Report Summaries in Columns Break Options
Report Summaries in Columns Options
To Obtain a Summary Report: Summaries in Rows
Report Summary Lines for/Final Summary Lines
Report Break Options
Report Options
Report Layout
Report Titles


Specifying Data Column/Break Column Format

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Reports
Report Summaries in Rows...

or

Analyze
Reports
Report Summaries in Columns...

Select a variable for either Data Columns or Break Columns and then click Format.


Report Summary Lines for/Final Summary Lines

mean,mean,mean
in Report Summaries in Rows,in Report Summaries in Rows,in Report Summaries in Rows
standard deviation,standard deviation,standard deviation
in Report Summaries in Rows,in Report Summaries in Rows,in Report Summaries in Rows
variance,variance,variance
in Report Summaries in Rows,in Report Summaries in Rows,in Report Summaries in Rows
kurtosis,kurtosis,kurtosis
in Report Summaries in Rows,in Report Summaries in Rows,in Report Summaries in Rows
skewness,skewness,skewness
in Report Summaries in Rows,in Report Summaries in Rows,in Report Summaries in Rows

The two Summary Lines dialog boxes control the display of summary statistics for break groups and for the entire report. Summary Lines controls subgroup statistics for each category defined by the break variable(s). Final Summary Lines controls overall statistics, displayed at the end of the report.

Available summary statistics are sum, mean, minimum, maximum, number of cases, percentage of cases above or below a specified value, percentage of cases within a specified range of values, standard deviation, kurtosis, variance, and skewness.

Related Topics

Specifying Summary Statistics
Report Summaries in Rows
To Obtain a Summary Report: Summaries in Rows
Report Data Column/Break Format
Report Break Options
Report Options
Report Layout
Report Titles


Specifying Summary Statistics

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Reports
Report Summaries in Rows...

In either the Break Columns or Report group, click Summary.


Report Break Options

Report Summaries in Rows,Report Summaries in Rows,Report Summaries in Rows
page control,page control,page control
Report Summaries in Rows,Report Summaries in Rows,Report Summaries in Rows
break spacing,break spacing,break spacing

Break Options controls spacing and pagination of break category information.

Page Control. Controls spacing and pagination for categories of the selected break variable. You can specify a number of blank lines between break categories or start each break category on a new page.

Blank Lines before Summaries. Controls the number of blank lines between break category labels or data and summary statistics. This is particularly useful for combined reports that include both individual case listings and summary statistics for break categories; in these reports, you can insert space between the case listings and the summary statistics.

Related Topics

Specifying Break Options
Report Summaries in Rows
To Obtain a Summary Report: Summaries in Rows
Report Data Column/Break Format
Report Summary Lines for/Final Summary Lines
Report Options
Report Layout
Report Titles


Specifying Break Options

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Reports
Report Summaries in Rows...

Select a variable for Break Columns and then click Options.


Report Options

Report Summaries in Rows,Report Summaries in Rows,Report Summaries in Rows
missing values,missing values,missing values
Report Summaries in Rows,Report Summaries in Rows,Report Summaries in Rows
page numbering,page numbering,page numbering
page numbering,page numbering,page numbering
in row summary reports,in row summary reports,in row summary reports
page control,page control,page control
in row summary reports,in row summary reports,in row summary reports
missing values,missing values,missing values
in Report Summaries in Rows,in Report Summaries in Rows,in Report Summaries in Rows

Report Options controls the treatment and display of missing values and report page numbering.

Exclude cases with missing values listwise. Eliminates (from the report) any case with missing values for any of the report variables.

Missing Values Appear as. Allows you to specify the symbol that represents missing values in the data file. The symbol can be only one character and is used to represent both system-missing and user-missing values.

Number Pages from. Allows you to specify a page number for the first page of the report.

Related Topics

Specifying Report Options
Report Summaries in Rows
To Obtain a Summary Report: Summaries in Rows
Report Data Column/Break Format
Report Summary Lines for/Final Summary Lines
Report Break Options
Report Layout
Report Titles


Specifying Report Options

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Reports
Report Summaries in Rows...

In the Report group, click Options.


Report Layout

Report Summaries in Rows,Report Summaries in Rows,Report Summaries in Rows
page layout,page layout,page layout
Report Summaries in Columns,Report Summaries in Columns,Report Summaries in Columns
page layout,page layout,page layout

Report Layout controls the width and length of each report page, placement of the report on the page, and the insertion of blank lines and labels.

Page Layout. Controls the page margins expressed in lines (top and bottom) and characters (left and right) and reports alignment within the margins.

Page Titles and Footers. Controls the number of lines that separate page titles and footers from the body of the report.

Break Columns. Controls the display of break columns. If multiple break variables are specified, they can be in separate columns or in the first column. Placing all break variables in the first column produces a narrower report.

Column Titles. Controls the display of column titles, including title underlining, space between titles and the body of the report, and vertical alignment of column titles.

Data Column Rows and Break Labels. Controls the placement of data column information (data values and/or summary statistics) in relation to the break labels at the start of each break category. The first row of data column information can start either on the same line as the break category label or on a specified number of lines after the break category label. (Not available for column summary reports.)

Related Topics

Specifying Layout Options
Report Summaries in Rows
To Obtain a Summary Report: Summaries in Rows
Report Data Column/Break Format
Report Summary Lines for/Final Summary Lines
Report Break Options
Report Options
Report Titles


Specifying Layout Options

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Reports
Report Summaries in Rows...

In the Report group, click Layout.


Report Titles

Report Summaries in Rows,Report Summaries in Rows,Report Summaries in Rows
variables in titles,variables in titles,variables in titles
Report Summaries in Rows,Report Summaries in Rows,Report Summaries in Rows
titles,titles,titles
Report Summaries in Rows,Report Summaries in Rows,Report Summaries in Rows
footers,footers,footers

Report Titles controls the content and placement of report titles and footers. You can specify up to 10 lines of page titles and up to 10 lines of page footers, with left-justified, centered, and right-justified components on each line.

If you insert variables into titles or footers, the current value label or value of the variable is displayed in the title or footer. In titles, the value label corresponding to the value of the variable at the beginning of the page is displayed. In footers, the value label corresponding to the value of the variable at the end of the page is displayed. If there is no value label, the actual value is displayed.

Special Variables. The special variables DATE and PAGE allow you to insert the current date or the page number into any line of a report header or footer. If your data file contains variables named DATE or PAGE, you cannot use these variables in report titles or footers.

Related Topics

Specifying Title Options
Report Summaries in Rows
To Obtain a Summary Report: Summaries in Rows
Report Data Column/Break Format
Report Summary Lines for/Final Summary Lines
Report Break Options
Report Options
Report Layout


Specifying Title Options

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Reports
Report Summaries in Rows...

or

Analyze
Reports
Report Summaries in Columns...

In the Report group, click Titles.


Report Summaries in Columns

Report Summaries in Columns,Report Summaries in Columns,Report Summaries in Columns
column summary reports,column summary reports,column summary reports
reports,reports,reports
column summary reports,column summary reports,column summary reports

Report Summaries in Columns produces summary reports in which different summary statistics appear in separate columns.

Example. A company with a chain of retail stores keeps records of employee information, including salary, job tenure, and the division in which each employee works. You could generate a report that provides summary salary statistics (for example, mean, minimum, and maximum) for each division.

Data Columns. Lists the report variables for which you want summary statistics and controls the display format and summary statistics displayed for each variable.

Break Columns. Lists optional break variables that divide the report into groups and controls the display formats of break columns. For multiple break variables, there will be a separate group for each category of each break variable within categories of the preceding break variable in the list. Break variables should be discrete categorical variables that divide cases into a limited number of meaningful categories.

Report. Controls overall report characteristics, including display of missing values, page numbering, and titles.

Preview. Displays only the first page of the report. This option is useful for previewing the format of your report without processing the whole report.

Data are already sorted. For reports with break variables, the data file must be sorted by break variable values before generating the report. If your data file is already sorted by values of the break variables, you can save processing time by selecting this option. This option is particularly useful after running a preview report.

Related Topics

To Obtain a Summary Report: Summaries in Columns
REPORT
Report Summaries in Rows
Report Data Column/Break Format
Data Columns Summary Function
Data Columns Summary for Total Column
Report Summaries in Columns Break Options
Report Summaries in Columns Options


To Obtain a Summary Report: Summaries in Columns

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Reports
Report Summaries in Columns...

Select one or more variables for Data Columns. One column in the report is generated for each variable selected.

To change the summary measure for a variable, select the variable in the Data Column Variables list and click Summary.

To obtain more than one summary measure for a variable, select the variable in the source list and move it into the Data Column Variables list multiple times, one for each summary measure you want.

To display a column containing the sum, mean, ratio, or other function of existing columns, click Insert Total. This places a variable called total into the Data Columns list.

For reports sorted and displayed by subgroups, select one or more variables for Break Columns.

Related Topics

Report Data Column/Break Format
Report Summaries in Columns
Data Columns Summary Function
Data Columns Summary for Total Column
Report Summaries in Columns Break Options
Report Summaries in Columns Options


Data Columns Summary Function

mean,mean,mean
in Report Summaries in Columns,in Report Summaries in Columns,in Report Summaries in Columns
standard deviation,standard deviation,standard deviation
in Report Summaries in Columns,in Report Summaries in Columns,in Report Summaries in Columns
variance,variance,variance
in Report Summaries in Columns,in Report Summaries in Columns,in Report Summaries in Columns
kurtosis,kurtosis,kurtosis
in Report Summaries in Columns,in Report Summaries in Columns,in Report Summaries in Columns
skewness,skewness,skewness
in Report Summaries in Columns,in Report Summaries in Columns,in Report Summaries in Columns

Summary Lines controls the summary statistic displayed for the selected data column variable.

Available summary statistics are sum, mean, minimum, maximum, number of cases, percentage of cases above or below a specified value, percentage of cases within a specified range of values, standard deviation, variance, kurtosis, and skewness.

Related Topics

Specifying Summary Statistics
Report Data Column/Break Format
Report Summaries in Columns
To Obtain a Summary Report: Summaries in Columns
Data Columns Summary for Total Column
Report Summaries in Columns Break Options
Report Summaries in Columns Options


Specifying Summary Statistics

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Reports
Report Summaries in Columns...

Select a variable for Data Columns and then click Summary.

To obtain more than one summary measure for a variable, select the variable in the source list and move it into the Data Columns list multiple times, one for each summary measure you want.


Data Columns Summary for Total Column

Report Summaries in Columns,Report Summaries in Columns,Report Summaries in Columns
total columns,total columns,total columns
reports,reports,reports
total columns,total columns,total columns
reports,reports,reports
composite totals,composite totals,composite totals
total column,total column,total column
in reports,in reports,in reports
mean,mean,mean
of multiple report columns,of multiple report columns,of multiple report columns
minimum,minimum,minimum
comparing report columns,comparing report columns,comparing report columns
maximum,maximum,maximum
comparing report columns,comparing report columns,comparing report columns
reports,reports,reports
comparing columns,comparing columns,comparing columns
reports,reports,reports
multiplying column values,multiplying column values,multiplying column values
reports,reports,reports
dividing column values,dividing column values,dividing column values
multiplication,multiplication,multiplication
multiplying across report columns,multiplying across report columns,multiplying across report columns
division,division,division
dividing across report columns,dividing across report columns,dividing across report columns

Summary Column controls the total summary statistics that summarize two or more data columns.

Available total summary statistics are sum of columns, mean of columns, minimum, maximum, difference between values in two columns, quotient of values in one column divided by values in another column, and product of columns values multiplied together.

Sum of columns. The total column is the sum of the columns in the Summary Column list.

Mean of columns. The total column is the average of the columns in the Summary Column list.

Minimum of columns. The total column is the minimum of the columns in the Summary Column list.

Maximum of columns. The total column is the maximum of the columns in the Summary Column list.

1st column – 2nd column. The total column is the difference of the columns in the Summary Column list. The Summary Column list must contain exactly two columns.

1st column / 2nd column. The total column is the quotient of the columns in the Summary Column list. The Summary Column list must contain exactly two columns.

% 1st column / 2nd column. The total column is the first column's percentage of the second column in the Summary Column list. The Summary Column list must contain exactly two columns.

Product of columns. The total column is the product of the columns in the Summary Column list.

Related Topics

Specifying Summaries for Total Columns
Report Data Column/Break Format
Report Summaries in Columns
To Obtain a Summary Report: Summaries in Columns
Data Columns Summary Function
Report Summaries in Columns Break Options
Report Summaries in Columns Options


Specifying Summaries for Total Columns

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Reports
Report Summaries in Columns...

In the Data Columns group, click Insert Total to insert a pseudo variable total into the Data Columns list.

With the total pseudo variable selected, click Summary.

Select two or more variables from the Data Columns list and move them to the Summary Column list.

Select a summary measure from the Summary function list.


Report Summaries in Columns Break Options

Report Summaries in Columns,Report Summaries in Columns,Report Summaries in Columns
subtotals,subtotals,subtotals
Report Summaries in Columns,Report Summaries in Columns,Report Summaries in Columns
page control,page control,page control
subtotals,subtotals,subtotals
in column summary reports,in column summary reports,in column summary reports
page control,page control,page control
in column summary reports,in column summary reports,in column summary reports

Break Options controls subtotal display, spacing, and pagination for break categories.

Subtotal. Controls the display subtotals for break categories.

Page Control. Controls spacing and pagination for categories of the selected break variable. You can specify a number of blank lines between break categories or start each break category on a new page.

Blank Lines before Subtotal. Controls the number of blank lines between break category data and subtotals.

Related Topics

Specifying Break Options
Report Data Column/Break Format
Report Summaries in Columns
To Obtain a Summary Report: Summaries in Columns
Data Columns Summary Function
Data Columns Summary for Total Column
Report Summaries in Columns Options


Specifying Break Options

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Reports
Report Summaries in Columns...

Select a variable for Break Columns and then click Options.


Report Summaries in Columns Options

Report Summaries in Columns,Report Summaries in Columns,Report Summaries in Columns
grand total,grand total,grand total
Report Summaries in Columns,Report Summaries in Columns,Report Summaries in Columns
missing values,missing values,missing values
Report Summaries in Columns,Report Summaries in Columns,Report Summaries in Columns
page numbering,page numbering,page numbering
grand totals,grand totals,grand totals
in column summary reports,in column summary reports,in column summary reports
page numbering,page numbering,page numbering
in column summary reports,in column summary reports,in column summary reports
missing values,missing values,missing values
in column summary reports,in column summary reports,in column summary reports

Options controls the display of grand totals, the display of missing values, and pagination in column summary reports.

Grand Total. Displays and labels a grand total for each column; displayed at the bottom of the column.

Missing values. You can exclude missing values from the report or select a single character to indicate missing values in the report.

Related Topics

Specifying Report Options
Report Data Column/Break Format
Report Summaries in Columns
To Obtain a Summary Report: Summaries in Columns
Data Columns Summary Function
Data Columns Summary for Total Column
Report Summaries in Columns Break Options


Specifying Report Options

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Reports
Report Summaries in Columns...

In the Report group, click Options.


REPORT Command Additional Features

Report Summaries in Rows,Report Summaries in Rows,Report Summaries in Rows
command additional features,command additional features,command additional features
Report Summaries in Columns,Report Summaries in Columns,Report Summaries in Columns
command additional features,command additional features,command additional features

The command syntax language also allows you to:

• Display different summary functions in the columns of a single summary line.

• Insert summary lines into data columns for variables other than the data column variable or for various combinations (composite functions) of summary functions.

• Use Median, Mode, Frequency, and Percent as summary functions.

• Control more precisely the display format of summary statistics.

• Insert blank lines at various points in reports.

• Insert blank lines after every nth case in listing reports.

Because of the complexity of the REPORT syntax, you may find it useful, when building a new report with syntax, to approximate the report generated from the dialog boxes, copy and paste the corresponding syntax, and refine that syntax to yield the exact report that you want.

Related Topics

REPORT


Reliability Analysis

Reliability Analysis,Reliability Analysis,Reliability Analysis
example,example,example
Reliability Analysis,Reliability Analysis,Reliability Analysis
statistics,statistics,statistics
scale,scale,scale
in Reliability Analysis,in Reliability Analysis,in Reliability Analysis
Reliability Analysis,Reliability Analysis,Reliability Analysis
alpha coefficient,alpha coefficient,alpha coefficient
in Reliability Analysis,in Reliability Analysis,in Reliability Analysis
split-half reliability,split-half reliability,split-half reliability
in Reliability Analysis,in Reliability Analysis,in Reliability Analysis
Hotelling's T2,Hotelling's T2,Hotelling's T2
in Reliability Analysis,in Reliability Analysis,in Reliability Analysis
Cronbach's alpha,Cronbach's alpha,Cronbach's alpha
in Reliability Analysis,in Reliability Analysis,in Reliability Analysis
Tukey's test of additivity,Tukey's test of additivity,Tukey's test of additivity
in Reliability Analysis,in Reliability Analysis,in Reliability Analysis
Guttman model,Guttman model,Guttman model
in Reliability Analysis,in Reliability Analysis,in Reliability Analysis
parallel model,parallel model,parallel model
in Reliability Analysis,in Reliability Analysis,in Reliability Analysis
strictly parallel model,strictly parallel model,strictly parallel model
in Reliability Analysis,in Reliability Analysis,in Reliability Analysis

Reliability analysis allows you to study the properties of measurement scales and the items that compose the scales. The Reliability Analysis procedure calculates a number of commonly used measures of scale reliability and also provides information about the relationships between individual items in the scale. Intraclass correlation coefficients can be used to compute inter-rater reliability estimates.

Example. Does my questionnaire measure customer satisfaction in a useful way? Using reliability analysis, you can determine the extent to which the items in your questionnaire are related to each other, you can get an overall index of the repeatability or internal consistency of the scale as a whole, and you can identify problem items that should be excluded from the scale.

Statistics. Descriptives for each variable and for the scale, summary statistics across items, inter-item correlations and covariances, reliability estimates, ANOVA table, intraclass correlation coefficients, Hotelling's T2, and Tukey's test of additivity.

Models. The following models of reliability are available:

• Alpha (Cronbach). This model is a model of internal consistency, based on the average inter-item correlation.

• Split-half. This model splits the scale into two parts and examines the correlation between the parts.

• Guttman. This model computes Guttman's lower bounds for true reliability.

• Parallel. This model assumes that all items have equal variances and equal error variances across replications.

• Strict parallel. This model makes the assumptions of the Parallel model and also assumes equal means across items.

Show me

Reliability Analysis Data Considerations Collapse Hide details

Data. Data can be dichotomous, ordinal, or interval, but the data should be coded numerically.

Assumptions. Observations should be independent, and errors should be uncorrelated between items. Each pair of items should have a bivariate normal distribution. Scales should be additive, so that each item is linearly related to the total score.

Related procedures. If you want to explore the dimensionality of your scale items (to see whether more than one construct is needed to account for the pattern of item scores), use factor analysis or multidimensional scaling. To identify homogeneous groups of variables, use hierarchical cluster analysis to cluster variables.

To Obtain a Reliability Analysis Collapse Hide details

To Obtain a Reliability Analysis

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Scale
Reliability Analysis...

Select two or more variables as potential components of an additive scale.

Choose a model from the Model drop-down list.

This procedure pastes RELIABILITY command syntax.

See RELIABILITY Algorithms for computational details for this procedure.

Related Topics

Reliability Analysis Statistics
RELIABILITY


Reliability Analysis Statistics

Reliability Analysis,Reliability Analysis,Reliability Analysis
descriptives,descriptives,descriptives
Reliability Analysis,Reliability Analysis,Reliability Analysis
statistics,statistics,statistics
Reliability Analysis,Reliability Analysis,Reliability Analysis
inter-item correlations and covariances,inter-item correlations and covariances,inter-item correlations and covariances
Reliability Analysis,Reliability Analysis,Reliability Analysis
ANOVA table,ANOVA table,ANOVA table
Reliability Analysis,Reliability Analysis,Reliability Analysis
Hotelling's T2,Hotelling's T2,Hotelling's T2
Reliability Analysis,Reliability Analysis,Reliability Analysis
Tukey's test of additivity,Tukey's test of additivity,Tukey's test of additivity
Hotelling's T2,Hotelling's T2,Hotelling's T2
in Reliability Analysis,in Reliability Analysis,in Reliability Analysis
Tukey's test of additivity,Tukey's test of additivity,Tukey's test of additivity
in Reliability Analysis,in Reliability Analysis,in Reliability Analysis
alpha coefficient,alpha coefficient,alpha coefficient
in Reliability Analysis,in Reliability Analysis,in Reliability Analysis
split-half reliability,split-half reliability,split-half reliability
in Reliability Analysis,in Reliability Analysis,in Reliability Analysis
Spearman-Brown reliability,Spearman-Brown reliability,Spearman-Brown reliability
in Reliability Analysis,in Reliability Analysis,in Reliability Analysis
parallel model,parallel model,parallel model
in Reliability Analysis,in Reliability Analysis,in Reliability Analysis
strictly parallel model,strictly parallel model,strictly parallel model
in Reliability Analysis,in Reliability Analysis,in Reliability Analysis
Guttman model,Guttman model,Guttman model
in Reliability Analysis,in Reliability Analysis,in Reliability Analysis
Cronbach's alpha,Cronbach's alpha,Cronbach's alpha
in Reliability Analysis,in Reliability Analysis,in Reliability Analysis
Kuder-Richardson 20 (KR20),Kuder-Richardson 20 (KR20),Kuder-Richardson 20 (KR20)
in Reliability Analysis,in Reliability Analysis,in Reliability Analysis
KR20,KR20,KR20
in Reliability Analysis,in Reliability Analysis,in Reliability Analysis
Reliability Analysis,Reliability Analysis,Reliability Analysis
Kuder-Richardson 20,Kuder-Richardson 20,Kuder-Richardson 20
Reliability Analysis,Reliability Analysis,Reliability Analysis
intraclass correlation coefficient,intraclass correlation coefficient,intraclass correlation coefficient
intraclass correlation coefficient (ICC),intraclass correlation coefficient (ICC),intraclass correlation coefficient (ICC)
in Reliability Analysis,in Reliability Analysis,in Reliability Analysis
ICC. See intraclass correlation coefficient,ICC. See intraclass correlation coefficient,ICC. See intraclass correlation coefficient

You can select various statistics that describe your scale and items. Statistics that are reported by default include the number of cases, the number of items, and reliability estimates as follows:

• Alpha models. Coefficient alpha; for dichotomous data, this is equivalent to the Kuder-Richardson 20 (KR20) coefficient.

• Split-half models. Correlation between forms, Guttman split-half reliability, Spearman-Brown reliability (equal and unequal length), and coefficient alpha for each half.

• Guttman models. Reliability coefficients lambda 1 through lambda 6.

• Parallel and Strict parallel models. Test for goodness of fit of model; estimates of error variance, common variance, and true variance; estimated common inter-item correlation; estimated reliability; and unbiased estimate of reliability.

Descriptives for. Produces descriptive statistics for scales or items across cases.

Expand Show details Collapse Hide details

• Item. Produces descriptive statistics for items across cases.

• Scale. Produces descriptive statistics for scales.

• Scale if item deleted. Displays summary statistics comparing each item to the scale that is composed of the other items. Statistics include scale mean and variance if the item were to be deleted from the scale, correlation between the item and the scale that is composed of other items, and Cronbach's alpha if the item were to be deleted from the scale.

Summaries. Provides descriptive statistics of item distributions across all items in the scale.

Expand Show details Collapse Hide details

• Means. Summary statistics for item means. The smallest, largest, and average item means, the range and variance of item means, and the ratio of the largest to the smallest item means are displayed.

• Variances. Summary statistics for item variances. The smallest, largest, and average item variances, the range and variance of item variances, and the ratio of the largest to the smallest item variances are displayed.

• Covariances. Summary statistics for inter-item covariances. The smallest, largest, and average inter-item covariances, the range and variance of inter-item covariances, and the ratio of the largest to the smallest inter-item covariances are displayed.

• Correlations. Summary statistics for inter-item correlations. The smallest, largest, and average inter-item correlations, the range and variance of inter-item correlations, and the ratio of the largest to the smallest inter-item correlations are displayed.

Inter-Item. Produces matrices of correlations or covariances between items.

ANOVA Table. Produces tests of equal means.

Expand Show details Collapse Hide details

• F test. Displays a repeated measures analysis-of-variance table.

• Friedman chi-square. Displays Friedman's chi-square and Kendall's coefficient of concordance. This option is appropriate for data that are in the form of ranks. The chi-square test replaces the usual F test in the ANOVA table.

• Cochran chi-square. Displays Cochran's Q. This option is appropriate for data that are dichotomous. The Q statistic replaces the usual F statistic in the ANOVA table.

Hotelling's T-square. Produces a multivariate test of the null hypothesis that all items on the scale have the same mean.

Tukey's test of additivity. Produces a test of the assumption that there is no multiplicative interaction among the items.

Intraclass correlation coefficient. Produces measures of consistency or agreement of values within cases.

• Model. Select the model for calculating the intraclass correlation coefficient. Available models are Two-Way Mixed, Two-Way Random, and One-Way Random. Select Two-Way Mixed when people effects are random and the item effects are fixed, select Two-Way Random when people effects and the item effects are random, or select One-Way Random when people effects are random.

• Type. Select the type of index. Available types are Consistency and Absolute Agreement.

• Confidence interval. Specify the level for the confidence interval. The default is 95%.

• Test value. Specify the hypothesized value of the coefficient for the hypothesis test. This value is the value to which the observed value is compared. The default value is 0.

Specifying Statistics Settings Collapse Hide details

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Scale
Reliability Analysis…

In the Reliability Analysis dialog box, click Statistics.

Related Topics

Reliability Analysis


RELIABILITY Command Additional Features

Reliability Analysis,Reliability Analysis,Reliability Analysis
command additional features,command additional features,command additional features

The command syntax language also allows you to:

• Read and analyze a correlation matrix.

• Write a correlation matrix for later analysis.

• Specify splits other than equal halves for the split-half method.

Related Topics

UNIANOVA Command Additional Features
ALSCAL Command Additional Features
MIXED Command Additional Features
HILOGLINEAR Command Additional Features
CSGLM Command Additional Features
CSLOGISTIC Command Additional Features
MVA Command Additional Features
LOGISTIC REGRESSION Command Additional Features
NOMREG Command Additional Features
PROBIT Command Additional Features
NLR Command Additional Features
WLS Command Additional Features
2SLS Command Additional Features
SEASON Command Additional Features
SPECTRA Command Additional Features
RELIABILITY


Multidimensional Scaling

scale,scale,scale
in Multidimensional Scaling,in Multidimensional Scaling,in Multidimensional Scaling
Multidimensional Scaling,Multidimensional Scaling,Multidimensional Scaling
example,example,example
Multidimensional Scaling,Multidimensional Scaling,Multidimensional Scaling
statistics,statistics,statistics
S-stress,S-stress,S-stress
in Multidimensional Scaling,in Multidimensional Scaling,in Multidimensional Scaling
Multidimensional Scaling,Multidimensional Scaling,Multidimensional Scaling
stress,stress,stress
in Multidimensional Scaling,in Multidimensional Scaling,in Multidimensional Scaling

Multidimensional scaling attempts to find the structure in a set of distance measures between objects or cases. This task is accomplished by assigning observations to specific locations in a conceptual space (usually two- or three-dimensional) such that the distances between points in the space match the given dissimilarities as closely as possible. In many cases, the dimensions of this conceptual space can be interpreted and used to further understand your data.

If you have objectively measured variables, you can use multidimensional scaling as a data reduction technique (the Multidimensional Scaling procedure will compute distances from multivariate data for you, if necessary). Multidimensional scaling can also be applied to subjective ratings of dissimilarity between objects or concepts. Additionally, the Multidimensional Scaling procedure can handle dissimilarity data from multiple sources, as you might have with multiple raters or questionnaire respondents.

Example. How do people perceive relationships between different cars? If you have data from respondents indicating similarity ratings between different makes and models of cars, multidimensional scaling can be used to identify dimensions that describe consumers' perceptions. You might find, for example, that the price and size of a vehicle define a two-dimensional space, which accounts for the similarities that are reported by your respondents.

Statistics. For each model: data matrix, optimally scaled data matrix, S-stress (Young's), stress (Kruskal's), RSQ, stimulus coordinates, average stress and RSQ for each stimulus (RMDS models). For individual difference (INDSCAL) models: subject weights and weirdness index for each subject. For each matrix in replicated multidimensional scaling models: stress and RSQ for each stimulus. Plots: stimulus coordinates (two- or three-dimensional), scatterplot of disparities versus distances.

Multidimensional Scaling Data Considerations Collapse Hide details

Data. If your data are dissimilarity data, all dissimilarities should be quantitative and should be measured in the same metric. If your data are multivariate data, variables can be quantitative, binary, or count data. Scaling of variables is an important issue--differences in scaling may affect your solution. If your variables have large differences in scaling (for example, one variable is measured in dollars and the other variable is measured in years), consider standardizing them (this process can be done automatically by the Multidimensional Scaling procedure).

Assumptions. The Multidimensional Scaling procedure is relatively free of distributional assumptions. Be sure to select the appropriate measurement level (ordinal, interval, or ratio) in the Multidimensional Scaling Options dialog box so that the results are computed correctly.

Related procedures. If your goal is data reduction, an alternative method to consider is factor analysis, particularly if your variables are quantitative. If you want to identify groups of similar cases, consider supplementing your multidimensional scaling analysis with a hierarchical or k-means cluster analysis.

To Obtain a Multidimensional Scaling Analysis Collapse Hide details

To Obtain a Multidimensional Scaling Analysis

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Scale
Multidimensional Scaling...

Select at least four numeric variables for analysis.

In the Distances group, select either Data are distances or Create distances from data.

If you select Create distances from data, you can also select a grouping variable for individual matrices. The grouping variable can be numeric or string.

Optionally, you can also:

• Specify the shape of the distance matrix when data are distances.

• Specify the distance measure to use when creating distances from data.

This procedure pastes ALSCAL command syntax.

See ALSCAL Algorithms for computational details for this procedure.

Related Topics

Multidimensional Scaling Shape of Data
Multidimensional Scaling Create Measure
Multidimensional Scaling Dissimilarity Measures for Interval Data
Multidimensional Scaling Dissimilarity Measures for Count Data
Multidimensional Scaling Dissimilarity Measures for Binary Data
Multidimensional Scaling Transform Values
Multidimensional Scaling Model
Multidimensional Scaling Options
ALSCAL


Multidimensional Scaling Shape of Data

Multidimensional Scaling,Multidimensional Scaling,Multidimensional Scaling
defining data shape,defining data shape,defining data shape

If your active dataset represents distances among a set of objects or represents distances between two sets of objects, specify the shape of your data matrix in order to get the correct results.

Note: You cannot select Square symmetric if the Model dialog box specifies row conditionality.

Related Topics

Multidimensional Scaling
Multidimensional Scaling Create Measure
Multidimensional Scaling Dissimilarity Measures for Interval Data
Multidimensional Scaling Dissimilarity Measures for Count Data
Multidimensional Scaling Dissimilarity Measures for Binary Data
Multidimensional Scaling Transform Values
Multidimensional Scaling Model
Multidimensional Scaling Options


Specifying Data Shape

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Scale
Multidimensional Scaling...

With Data are distances selected in the Distances group, click Shape.


Multidimensional Scaling Create Measure

Multidimensional Scaling,Multidimensional Scaling,Multidimensional Scaling
distance measures,distance measures,distance measures
Multidimensional Scaling,Multidimensional Scaling,Multidimensional Scaling
transforming values,transforming values,transforming values
Multidimensional Scaling,Multidimensional Scaling,Multidimensional Scaling
creating distance matrices,creating distance matrices,creating distance matrices

Multidimensional scaling uses dissimilarity data to create a scaling solution. If your data are multivariate data (values of measured variables), you must create dissimilarity data in order to compute a multidimensional scaling solution. You can specify the details of creating dissimilarity measures from your data.

Measure. Allows you to specify the dissimilarity measure for your analysis. Select one alternative from the Measure group corresponding to your type of data, and then choose one of the measures from the drop-down list corresponding to that type of measure. Available alternatives are:

• Interval. Euclidean distance, Squared Euclidean distance, Chebychev, Block, Minkowski, or Customized.

• Counts. Chi-square measure or Phi-square measure.

• Binary. Euclidean distance, Squared Euclidean distance, Size difference, Pattern difference, Variance, or Lance and Williams.

Create Distance Matrix. Allows you to choose the unit of analysis. Alternatives are Between variables or Between cases.

Transform Values. In certain cases, such as when variables are measured on very different scales, you may want to standardize values before computing proximities (not applicable to binary data). Choose a standardization method from the Standardize drop-down list. If no standardization is required, choose None.

Related Topics

Multidimensional Scaling
Multidimensional Scaling Shape of Data
Multidimensional Scaling Dissimilarity Measures for Interval Data
Multidimensional Scaling Dissimilarity Measures for Count Data
Multidimensional Scaling Dissimilarity Measures for Binary Data
Multidimensional Scaling Transform Values
Multidimensional Scaling Model
Multidimensional Scaling Options


Multidimensional Scaling Dissimilarity Measures for Interval Data

Multidimensional Scaling,Multidimensional Scaling,Multidimensional Scaling
measures for interval data,measures for interval data,measures for interval data
Multidimensional Scaling,Multidimensional Scaling,Multidimensional Scaling
creating distance matrices,creating distance matrices,creating distance matrices
Euclidean distance,Euclidean distance,Euclidean distance
in Multidimensional Scaling,in Multidimensional Scaling,in Multidimensional Scaling
squared Euclidean distance,squared Euclidean distance,squared Euclidean distance
in Multidimensional Scaling,in Multidimensional Scaling,in Multidimensional Scaling
Chebychev distance,Chebychev distance,Chebychev distance
in Multidimensional Scaling,in Multidimensional Scaling,in Multidimensional Scaling
block distance,block distance,block distance
in Multidimensional Scaling,in Multidimensional Scaling,in Multidimensional Scaling
Minkowski distance,Minkowski distance,Minkowski distance
in Multidimensional Scaling,in Multidimensional Scaling,in Multidimensional Scaling
customized distance measures,customized distance measures,customized distance measures
in Multidimensional Scaling,in Multidimensional Scaling,in Multidimensional Scaling

The following dissimilarity measures are available for interval data:

• Euclidean distance. The square root of the sum of the squared differences between values for the items. This is the default for interval data.

• Squared Euclidean distance. The sum of the squared differences between the values for the items.

• Chebychev. The maximum absolute difference between the values for the items.

• Block. The sum of the absolute differences between the values of the item. Also known as Manhattan distance.

• Minkowski. The pth root of the sum of the absolute differences to the pth power between the values for the items.

• Customized. The rth root of the sum of the absolute differences to the pth power between the values for the items.

Related Topics

Multidimensional Scaling
Multidimensional Scaling Shape of Data
Multidimensional Scaling Create Measure
Multidimensional Scaling Dissimilarity Measures for Count Data
Multidimensional Scaling Dissimilarity Measures for Binary Data
Multidimensional Scaling Transform Values
Multidimensional Scaling Model
Multidimensional Scaling Options


Multidimensional Scaling Dissimilarity Measures for Count Data

Multidimensional Scaling,Multidimensional Scaling,Multidimensional Scaling
measures for count data,measures for count data,measures for count data
Multidimensional Scaling,Multidimensional Scaling,Multidimensional Scaling
creating distance matrices,creating distance matrices,creating distance matrices
chi-square distance,chi-square distance,chi-square distance
in Multidimensional Scaling,in Multidimensional Scaling,in Multidimensional Scaling
phi-square distance measure,phi-square distance measure,phi-square distance measure
in Multidimensional Scaling,in Multidimensional Scaling,in Multidimensional Scaling

The following dissimilarity measures are available for count data:

• Chi-square measure. Based on the chi-square test of equality for two sets of frequencies. This is the default for count data.

• Phi-square measure. This measure is equal to the chi-square measure normalized by the square root of the combined frequency.

Related Topics

Multidimensional Scaling
Multidimensional Scaling Shape of Data
Multidimensional Scaling Create Measure
Multidimensional Scaling Dissimilarity Measures for Interval Data
Multidimensional Scaling Dissimilarity Measures for Binary Data
Multidimensional Scaling Transform Values
Multidimensional Scaling Model
Multidimensional Scaling Options


Multidimensional Scaling Dissimilarity Measures for Binary Data

Multidimensional Scaling,Multidimensional Scaling,Multidimensional Scaling
measures for binary data,measures for binary data,measures for binary data
Multidimensional Scaling,Multidimensional Scaling,Multidimensional Scaling
creating distance matrices,creating distance matrices,creating distance matrices
binary Euclidean distance,binary Euclidean distance,binary Euclidean distance
in Multidimensional Scaling,in Multidimensional Scaling,in Multidimensional Scaling
binary squared Euclidean distance,binary squared Euclidean distance,binary squared Euclidean distance
in Multidimensional Scaling,in Multidimensional Scaling,in Multidimensional Scaling
size difference measure,size difference measure,size difference measure
in Multidimensional Scaling,in Multidimensional Scaling,in Multidimensional Scaling
pattern difference measure,pattern difference measure,pattern difference measure
in Multidimensional Scaling,in Multidimensional Scaling,in Multidimensional Scaling
variance distance,variance distance,variance distance
in Multidimensional Scaling,in Multidimensional Scaling,in Multidimensional Scaling
Lance and Williams dissimilarity measure,Lance and Williams dissimilarity measure,Lance and Williams dissimilarity measure
in Multidimensional Scaling,in Multidimensional Scaling,in Multidimensional Scaling

The following dissimilarity measures are available for binary data:

• Euclidean distance. Computed from a fourfold table as SQRT(b+c), where b and c represent the diagonal cells corresponding to cases present on one item but absent on the other.

• Squared Euclidean distance. Computed as the number of discordant cases. Its minimum value is 0, and it has no upper limit.

• Size difference. An index of asymmetry. It ranges from 0 to 1.

• Pattern difference. Dissimilarity measure for binary data that ranges from 0 to 1. Computed from a fourfold table as bc/(n**2), where b and c represent the diagonal cells corresponding to cases present on one item but absent on the other and n is the total number of observations.

• Variance. Computed from a fourfold table as (b+c)/4n, where b and c represent the diagonal cells corresponding to cases present on one item but absent on the other and n is the total number of observations. It ranges from 0 to 1.

• Lance and Williams. Computed from a fourfold table as (b+c)/(2a+b+c), where a represents the cell corresponding to cases present on both items, and b and c represent the diagonal cells corresponding to cases present on one item but absent on the other. This measure has a range of 0 to 1. (Also known as the Bray-Curtis nonmetric coefficient.)

You may optionally change the Present and Absent fields to specify the values that indicate that a characteristic is present or absent. The procedure will ignore all other values.

Related Topics

Multidimensional Scaling
Multidimensional Scaling Shape of Data
Multidimensional Scaling Create Measure
Multidimensional Scaling Dissimilarity Measures for Interval Data
Multidimensional Scaling Dissimilarity Measures for Count Data
Multidimensional Scaling Transform Values
Multidimensional Scaling Model
Multidimensional Scaling Options


Multidimensional Scaling Transform Values

Multidimensional Scaling,Multidimensional Scaling,Multidimensional Scaling
transforming values,transforming values,transforming values
Multidimensional Scaling,Multidimensional Scaling,Multidimensional Scaling
creating distance matrices,creating distance matrices,creating distance matrices
Multidimensional Scaling,Multidimensional Scaling,Multidimensional Scaling
standardizing values,standardizing values,standardizing values

The following alternatives are available for transforming values:

• Z scores. Values are standardized to Z scores, with a mean of 0 and a standard deviation of 1.

• Range −1 to 1. Each value for the item being standardized is divided by the range of the values.

• Range 0 to 1. The procedure subtracts the minimum value from each item being standardized and then divides by the range.

• Maximum magnitude of 1. The procedure divides each value for the item being standardized by the maximum of the values.

• Mean of 1. The procedure divides each value for the item being standardized by the mean of the values.

• Standard deviation of 1. The procedure divides each value for the variable or case being standardized by the standard deviation of the values.

Additionally, you can choose how standardization is done. Alternatives are By variable or By case.

Related Topics

Multidimensional Scaling
Multidimensional Scaling Shape of Data
Multidimensional Scaling Create Measure
Multidimensional Scaling Dissimilarity Measures for Interval Data
Multidimensional Scaling Dissimilarity Measures for Count Data
Multidimensional Scaling Dissimilarity Measures for Binary Data
Multidimensional Scaling Model
Multidimensional Scaling Options


Selecting a Measure

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Scale
Multidimensional Scaling…

With Create distances from data selected in the Distances group, click Measure.

Select a data type (Interval, Count, or Binary).

Select a dissimilarity measure from the appropriate drop-down list.


Multidimensional Scaling Model

Multidimensional Scaling,Multidimensional Scaling,Multidimensional Scaling
levels of measurement,levels of measurement,levels of measurement
Multidimensional Scaling,Multidimensional Scaling,Multidimensional Scaling
conditionality,conditionality,conditionality
Multidimensional Scaling,Multidimensional Scaling,Multidimensional Scaling
dimensions,dimensions,dimensions
Multidimensional Scaling,Multidimensional Scaling,Multidimensional Scaling
scaling models,scaling models,scaling models

Correct estimation of a multidimensional scaling model depends on aspects of the data and the model itself.

Level of Measurement. Allows you to specify the level of your data. Alternatives are Ordinal, Interval, or Ratio. If your variables are ordinal, selecting Untie tied observations requests that the variables be treated as continuous variables, so that ties (equal values for different cases) are resolved optimally.

Conditionality. Allows you to specify which comparisons are meaningful. Alternatives are Matrix, Row, or Unconditional.

Dimensions. Allows you to specify the dimensionality of the scaling solution(s). One solution is calculated for each number in the range. Specify integers between 1 and 6; a minimum of 1 is allowed only if you select Euclidean distance as the scaling model. For a single solution, specify the same number for minimum and maximum.

Scaling Model. Allows you to specify the assumptions by which the scaling is performed. Available alternatives are Euclidean distance or Individual differences Euclidean distance (also known as INDSCAL). For the Individual differences Euclidean distance model, you can select Allow negative subject weights, if appropriate for your data.

Related Topics

Multidimensional Scaling
Multidimensional Scaling Shape of Data
Multidimensional Scaling Create Measure
Multidimensional Scaling Dissimilarity Measures for Interval Data
Multidimensional Scaling Dissimilarity Measures for Count Data
Multidimensional Scaling Dissimilarity Measures for Binary Data
Multidimensional Scaling Transform Values
Multidimensional Scaling Options


Choosing Model Settings

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Scale
Multidimensional Scaling…

In the Multidimensional Scaling dialog box, click Model.


Multidimensional Scaling Options

Multidimensional Scaling,Multidimensional Scaling,Multidimensional Scaling
display options,display options,display options
Multidimensional Scaling,Multidimensional Scaling,Multidimensional Scaling
criteria,criteria,criteria

You can specify options for your multidimensional scaling analysis.

Display. Allows you to select various types of output. Available options are Group plots, Individual subject plots, Data matrix, and Model and options summary.

Criteria. Allows you to determine when iteration should stop. To change the defaults, enter values for S-stress convergence, Minimum s-stress value, and Maximum iterations.

Treat distances less than n as missing. Distances that are less than this value are excluded from the analysis.

Specifying Multidimensional Scaling Options Collapse Hide details

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Scale
Multidimensional Scaling…

In the Multidimensional Scaling dialog box, click Options.

Related Topics

Multidimensional Scaling
Multidimensional Scaling Shape of Data
Multidimensional Scaling Create Measure
Multidimensional Scaling Dissimilarity Measures for Interval Data
Multidimensional Scaling Dissimilarity Measures for Count Data
Multidimensional Scaling Dissimilarity Measures for Binary Data
Multidimensional Scaling Transform Values
Multidimensional Scaling Model


ALSCAL Command Additional Features

Multidimensional Scaling,Multidimensional Scaling,Multidimensional Scaling
command additional features,command additional features,command additional features

The command syntax language also allows you to:

• Use three additional model types, known as ASCAL, AINDS, and GEMSCAL in the literature about multidimensional scaling.

• Carry out polynomial transformations on interval and ratio data.

• Analyze similarities (rather than distances) with ordinal data.

• Analyze nominal data.

• Save various coordinate and weight matrices into files and read them back in for analysis.

• Constrain multidimensional unfolding.

Related Topics

UNIANOVA Command Additional Features
RELIABILITY Command Additional Features
MIXED Command Additional Features
HILOGLINEAR Command Additional Features
CSGLM Command Additional Features
CSLOGISTIC Command Additional Features
MVA Command Additional Features
LOGISTIC REGRESSION Command Additional Features
NOMREG Command Additional Features
PROBIT Command Additional Features
NLR Command Additional Features
WLS Command Additional Features
2SLS Command Additional Features
SEASON Command Additional Features
SPECTRA Command Additional Features
ALSCAL


Ratio Statistics

Ratio Statistics,Ratio Statistics,Ratio Statistics

This feature requires the Statistics Base option.

The Ratio Statistics procedure provides a comprehensive list of summary statistics for describing the ratio between two scale variables.

You can sort the output by values of a grouping variable in ascending or descending order. The ratio statistics report can be suppressed in the output, and the results can be saved to an external file.

Example. Is there good uniformity in the ratio between the appraisal price and sale price of homes in each of five counties? From the output, you might learn that the distribution of ratios varies considerably from county to county.

Statistics. Median, mean, weighted mean, confidence intervals, coefficient of dispersion (COD), median-centered coefficient of variation, mean-centered coefficient of variation, price-related differential (PRD), standard deviation, average absolute deviation (AAD), range, minimum and maximum values, and the concentration index computed for a user-specified range or percentage within the median ratio.

Show me

Ratio Statistics Data Considerations Collapse Hide details

Data. Use numeric codes or strings to code grouping variables (nominal or ordinal level measurements).

Assumptions. The variables that define the numerator and denominator of the ratio should be scale variables that take positive values.

To Obtain Ratio Statistics Collapse Hide details

To Obtain Ratio Statistics

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Descriptive Statistics
Ratio...

Select a numerator variable.

Select a denominator variable.

Optionally:

• Select a grouping variable and specify the ordering of the groups in the results.

• Choose whether to display the results in the Viewer.

• Choose whether to save the results to an external file for later use, and specify the name of the file to which the results are saved.

This procedure pastes RATIO STATISTICS command syntax.

See RATIO STATISTICS Algorithms for computational details for this procedure.

Related Topics

Ratio Statistics
RATIO STATISTICS


Ratio Statistics

mean,mean,mean
in Ratio Statistics,in Ratio Statistics,in Ratio Statistics
standard deviation,standard deviation,standard deviation
in Ratio Statistics,in Ratio Statistics,in Ratio Statistics
minimum,minimum,minimum
in Ratio Statistics,in Ratio Statistics,in Ratio Statistics
maximum,maximum,maximum
in Ratio Statistics,in Ratio Statistics,in Ratio Statistics
median,median,median
in Ratio Statistics,in Ratio Statistics,in Ratio Statistics
weighted mean,weighted mean,weighted mean
in Ratio Statistics,in Ratio Statistics,in Ratio Statistics
range,range,range
in Ratio Statistics,in Ratio Statistics,in Ratio Statistics
coefficient of dispersion (COD),coefficient of dispersion (COD),coefficient of dispersion (COD)
in Ratio Statistics,in Ratio Statistics,in Ratio Statistics
coefficient of variation (COV),coefficient of variation (COV),coefficient of variation (COV)
in Ratio Statistics,in Ratio Statistics,in Ratio Statistics
price-related differential (PRD),price-related differential (PRD),price-related differential (PRD)
in Ratio Statistics,in Ratio Statistics,in Ratio Statistics
Ratio Statistics,Ratio Statistics,Ratio Statistics
statistics,statistics,statistics
measures of dispersion,measures of dispersion,measures of dispersion
in Ratio Statistics,in Ratio Statistics,in Ratio Statistics
measures of central tendency,measures of central tendency,measures of central tendency
in Ratio Statistics,in Ratio Statistics,in Ratio Statistics
average absolute deviation (AAD),average absolute deviation (AAD),average absolute deviation (AAD)
in Ratio Statistics,in Ratio Statistics,in Ratio Statistics
concentration index,concentration index,concentration index
in Ratio Statistics,in Ratio Statistics,in Ratio Statistics
descriptive statistics,descriptive statistics,descriptive statistics
in Ratio Statistics,in Ratio Statistics,in Ratio Statistics

Central Tendency. Measures of central tendency are statistics that describe the distribution of ratios.

• Median. The value such that the number of ratios that are less than this value and the number of ratios that are greater than this value are the same.

• Mean. The result of summing the ratios and dividing the result by the total number of ratios.

• Weighted Mean. The result of dividing the mean of the numerator by the mean of the denominator. Weighted mean is also the mean of the ratios weighted by the denominator.

• Confidence Intervals. Displays confidence intervals for the mean, the median, and the weighted mean (if requested). Specify a value that is greater than or equal to 0 and less than 100 as the confidence level.

Dispersion. These statistics measure the amount of variation, or spread, in the observed values.

• AAD. The average absolute deviation is the result of summing the absolute deviations of the ratios about the median and dividing the result by the total number of ratios.

• COD. The coefficient of dispersion is the result of expressing the average absolute deviation as a percentage of the median.

• PRD. The price-related differential, also known as the index of regressivity, is the result of dividing the mean by the weighted mean.

• Median Centered COV. The median-centered coefficient of variation is the result of expressing the root mean squares of deviation from the median as a percentage of the median.

• Mean Centered COV. The mean-centered coefficient of variation is the result of expressing the standard deviation as a percentage of the mean.

• Standard deviation. The standard deviation is the result of summing the squared deviations of the ratios about the mean, dividing the result by the total number of ratios minus one, and taking the positive square root.

• Range. The range is the result of subtracting the minimum ratio from the maximum ratio.

• Minimum. The minimum is the smallest ratio.

• Maximum. The maximum is the largest ratio.

Concentration Index. The coefficient of concentration measures the percentage of ratios that fall within an interval. It can be computed in two different ways:

• Ratios Between. Here the interval is defined explicitly by specifying the low and high values of the interval. Enter values for the low proportion and high proportion, and click Add to obtain an interval.

• Ratios Within. Here the interval is defined implicitly by specifying the percentage of the median. Enter a value between 0 and 100, and click Add. The lower end of the interval is equal to (1 – 0.01 × value) × median, and the upper end is equal to (1 + 0.01 × value) × median.

Obtaining Statistics for Ratio Statistics Collapse Hide details

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Descriptive Statistics
Ratio Statistics...

In the Ratio Statistics dialog box, click Statistics.

Select the statistics you want.

Related Topics

Ratio Statistics


ROC Curves

ROC Curve,ROC Curve,ROC Curve
charts,charts,charts
in ROC Curve,in ROC Curve,in ROC Curve
classification,classification,classification
in ROC Curve,in ROC Curve,in ROC Curve

This procedure is a useful way to evaluate the performance of classification schemes in which there is one variable with two categories by which subjects are classified.

Example. It is in a bank's interest to correctly classify customers into those customers who will and will not default on their loans, so special methods are developed for making these decisions. ROC curves can be used to evaluate how well these methods perform.

Statistics. Area under the ROC curve with confidence interval and coordinate points of the ROC curve. Plots: ROC curve.

Methods. The estimate of the area under the ROC curve can be computed either nonparametrically or parametrically using a binegative exponential model.

Show me

ROC Curve Data Considerations Collapse Hide details

Data. Test variables are quantitative. Test variables are often composed of probabilities from discriminant analysis or logistic regression or composed of scores on an arbitrary scale indicating a rater's "strength of conviction" that a subject falls into one category or another category. The state variable can be of any type and indicates the true category to which a subject belongs. The value of the state variable indicates which category should be considered positive.

Assumptions. It is assumed that increasing numbers on the rater scale represent the increasing belief that the subject belongs to one category, while decreasing numbers on the scale represent the increasing belief that the subject belongs to the other category. The user must choose which direction is positive. It is also assumed that the true category to which each subject belongs is known.

To Obtain an ROC Curve Collapse Hide details

To Obtain an ROC Curve

This feature requires the Statistics Base option.

From the menus choose:

Analyze
ROC Curve...

Select one or more test probability variables.

Select one state variable.

Identify the positive value for the state variable.

This procedure pastes ROC command syntax.

See ROC Algorithms for computational details for this procedure.

Related Topics

ROC Curve Options
ROC


ROC Curve Options

ROC Curve,ROC Curve,ROC Curve
statistics and plots,statistics and plots,statistics and plots
missing values,missing values,missing values
in ROC Curve,in ROC Curve,in ROC Curve
confidence intervals,confidence intervals,confidence intervals
in ROC Curve,in ROC Curve,in ROC Curve
standard error,standard error,standard error
in ROC Curve,in ROC Curve,in ROC Curve

You can specify the following options for your ROC analysis:

Classification. Allows you to specify whether the cutoff value should be included or excluded when making a positive classification. This setting currently has no effect on the output.

Test Direction. Allows you to specify the direction of the scale in relation to the positive category.

Parameters for Standard Error of Area. Allows you to specify the method of estimating the standard error of the area under the curve. Available methods are nonparametric and binegative exponential. Also allows you to set the level for the confidence interval. The available range is 50.1% to 99.9%.

Missing Values. Allows you to specify how missing values are handled.

Defining Options Collapse Hide details

This feature requires the Statistics Base option.

From the menus choose:

Analyze
ROC Curve…

In the ROC Curve dialog box, click Options.

Define options.

Related Topics

ROC Curves


Exact Tests

Exact Tests,Exact Tests,Exact Tests

Exact Tests provides two additional methods for calculating significance levels for the statistics available through the Crosstabs and Nonparametric Tests procedures. These methods, the exact and Monte Carlo methods, provide a means for obtaining accurate results when your data fail to meet any of the underlying assumptions necessary for reliable results using the standard asymptotic method. Available only if you have purchased the Exact Tests Options, which is only available on Windows operating systems.

Example. Asymptotic results obtained from small datasets or sparse or unbalanced tables can be misleading. Exact tests enable you to obtain an accurate significance level without relying on assumptions that might not be met by your data. For example, results of an entrance exam for 20 fire fighters in a small township show that all five white applicants received a pass result, whereas the results for Black, Asian and Hispanic applicants are mixed. A Pearson chi-square testing the null hypothesis that results are independent of race produces an asymptotic significance level of 0.07. This result leads to the conclusion that exam results are independent of the race of the examinee. However, because the data contain only 20 cases and the cells have expected frequencies of less than 5, this result is not trustworthy. The exact significance of the Pearson chi-square is 0.04, which leads to the opposite conclusion. Based on the exact significance, you would conclude that exam results and race of the examinee are related. This demonstrates the importance of obtaining exact results when the assumptions of the asymptotic method cannot be met. The exact significance is always reliable, regardless of the size, distribution, sparseness, or balance of the data.

Statistics. Asymptotic significance. Monte Carlo approximation with confidence level, or exact significance.

Expand Show details Collapse Hide details

• Asymptotic. The significance level based on the asymptotic distribution of a test statistic. Typically, a value of less than 0.05 is considered significant. The asymptotic significance is based on the assumption that the data set is large. If the data set is small or poorly distributed, this may not be a good indication of significance.

• Monte Carlo Estimate. An unbiased estimate of the exact significance level, calculated by repeatedly sampling from a reference set of tables with the same dimensions and row and column margins as the observed table. The Monte Carlo method allows you to estimate exact significance without relying on the assumptions required for the asymptotic method. This method is most useful when the data set is too large to compute exact significance, but the data do not meet the assumptions of the asymptotic method.

• Exact. The probability of the observed outcome or an outcome more extreme is calculated exactly. Typically, a significance level less than 0.05 is considered significant, indicating that there is some relationship between the row and column variables.

Related Topics

Obtaining Exact Tests
Exact Tests Data Considerations


Exact Tests Data Considerations

Exact Tests,Exact Tests,Exact Tests
assumptions,assumptions,assumptions
Exact Tests,Exact Tests,Exact Tests

Data. Calculating exact results can be computationally intensive, time-consuming, and can sometimes exceed the memory limits of your machine. In general, exact tests can be performed quickly with sample sizes of less than 30.

Assumptions. The asymptotic method assumes that the dataset is reasonably large, and that tables are densely populated and well balanced. If the dataset is small, or tables are sparse or unbalanced, the assumptions necessary for the asymptotic method have not been met, and you should use either the exact or the Monte Carlo method.

Related procedures. To set the random number seed so that you can duplicate results using the Monte Carlo approximation, use Random Number Seed on the Transform menu.

Related Topics

Exact Tests
Obtaining Exact Tests


Obtaining Exact Tests

Exact Tests,Exact Tests,Exact Tests

From the menus choose:

Analyze
Descriptive Statistics
Crosstabs...

or

Analyze
Nonparametric Tests
any Nonparametric Test...

In the dialog box, select Exact.

Select a method for calculating significance.

• If you have selected the Monte Carlo method, enter a value for the confidence level, and specify the number of samples used in approximating the Monte Carlo approximation. If you want to duplicate your results, you should set the random number seed every time you use the Monte Carlo method. Monte Carlo results can be obtained more quickly than exact results.

• If you have selected the Exact method, enter the maximum time limit for calculating each test. If a test exceeds a set time limit of 30 minutes, it is recommended that you use the Monte Carlo method. If you find that you have insufficient memory to obtain exact results, you should first close any other applications that are currently running in order to make more memory available. You can also enlarge the size of your swap file. If you still cannot obtain exact results, use the Monte Carlo method.

Related Topics

Exact Tests
Exact Tests Data Considerations


Introduction to Advanced Statistics

The Advanced Statistics option provides procedures that offer more advanced modeling options than are available through the Statistics Base option.

• GLM Multivariate extends the general linear model provided by GLM Univariate to allow multiple dependent variables. A further extension, GLM Repeated Measures, allows repeated measurements of multiple dependent variables.

• Variance Components Analysis is a specific tool for decomposing the variability in a dependent variable into fixed and random components.

• Linear Mixed Models expands the general linear model so that the data are permitted to exhibit correlated and nonconstant variability. The mixed linear model, therefore, provides the flexibility of modeling not only the means of the data but the variances and covariances as well.

• Generalized Linear Models (GZLM) relaxes the assumption of normality for the error term and requires only that the dependent variable be linearly related to the predictors through a transformation, or link function. Generalized Estimating Equations (GEE) extends GZLM to allow repeated measurements.

• General Loglinear Analysis allows you to fit models for cross-classified count data, and Model Selection Loglinear Analysis can help you to choose between models.

• Logit Loglinear Analysis allows you to fit loglinear models for analyzing the relationship between a categorical dependent and one or more categorical predictors.

• Survival analysis is available through Life Tables for examining the distribution of time-to-event variables, possibly by levels of a factor variable; Kaplan-Meier Survival Analysis for examining the distribution of time-to-event variables, possibly by levels of a factor variable or producing separate analyses by levels of a stratification variable; and Cox Regression for modeling the time to a specified event, based upon the values of given covariates.


GLM Multivariate Analysis

ANOVA,ANOVA,ANOVA
in GLM Multivariate,in GLM Multivariate,in GLM Multivariate
multivariate GLM,multivariate GLM,multivariate GLM
multivariate ANOVA,multivariate ANOVA,multivariate ANOVA
multivariate regression,multivariate regression,multivariate regression
analysis of covariance,analysis of covariance,analysis of covariance
in GLM Multivariate,in GLM Multivariate,in GLM Multivariate
GLM Multivariate,GLM Multivariate,GLM Multivariate
covariates,covariates,covariates
GLM Multivariate,GLM Multivariate,GLM Multivariate
dependent variable,dependent variable,dependent variable
GLM Multivariate,GLM Multivariate,GLM Multivariate
factors,factors,factors
GLM Multivariate,GLM Multivariate,GLM Multivariate

The GLM Multivariate procedure provides regression analysis and analysis of variance for multiple dependent variables by one or more factor variables or covariates. The factor variables divide the population into groups. Using this general linear model procedure, you can test null hypotheses about the effects of factor variables on the means of various groupings of a joint distribution of dependent variables. You can investigate interactions between factors as well as the effects of individual factors. In addition, the effects of covariates and covariate interactions with factors can be included. For regression analysis, the independent (predictor) variables are specified as covariates.

Both balanced and unbalanced models can be tested. A design is balanced if each cell in the model contains the same number of cases. In a multivariate model, the sums of squares due to the effects in the model and error sums of squares are in matrix form rather than the scalar form found in univariate analysis. These matrices are called SSCP (sums-of-squares and cross-products) matrices. If more than one dependent variable is specified, the multivariate analysis of variance using Pillai's trace, Wilks' lambda, Hotelling's trace, and Roy's largest root criterion with approximate F statistic are provided as well as the univariate analysis of variance for each dependent variable. In addition to testing hypotheses, GLM Multivariate produces estimates of parameters.

Commonly used a priori contrasts are available to perform hypothesis testing. Additionally, after an overall F test has shown significance, you can use post hoc tests to evaluate differences among specific means. Estimated marginal means give estimates of predicted mean values for the cells in the model, and profile plots (interaction plots) of these means allow you to visualize some of the relationships easily. The post hoc multiple comparison tests are performed for each dependent variable separately.

Residuals, predicted values, Cook's distance, and leverage values can be saved as new variables in your data file for checking assumptions. Also available are a residual SSCP matrix, which is a square matrix of sums of squares and cross-products of residuals, a residual covariance matrix, which is the residual SSCP matrix divided by the degrees of freedom of the residuals, and the residual correlation matrix, which is the standardized form of the residual covariance matrix.

WLS Weight allows you to specify a variable used to give observations different weights for a weighted least-squares (WLS) analysis, perhaps to compensate for different precision of measurement.

Example. A manufacturer of plastics measures three properties of plastic film: tear resistance, gloss, and opacity. Two rates of extrusion and two different amounts of additive are tried, and the three properties are measured under each combination of extrusion rate and additive amount. The manufacturer finds that the extrusion rate and the amount of additive individually produce significant results but that the interaction of the two factors is not significant.

Methods. Type I, Type II, Type III, and Type IV sums of squares can be used to evaluate different hypotheses. Type III is the default.

Statistics. Post hoc range tests and multiple comparisons: least significant difference, Bonferroni, Sidak, Scheffé, Ryan-Einot-Gabriel-Welsch multiple F, Ryan-Einot-Gabriel-Welsch multiple range, Student-Newman-Keuls, Tukey's honestly significant difference, Tukey's b, Duncan, Hochberg's GT2, Gabriel, Waller Duncan t test, Dunnett (one-sided and two-sided), Tamhane's T2, Dunnett's T3, Games-Howell, and Dunnett's C. Descriptive statistics: observed means, standard deviations, and counts for all of the dependent variables in all cells; the Levene test for homogeneity of variance; Box's M test of the homogeneity of the covariance matrices of the dependent variables; and Bartlett's test of sphericity.

Plots. Spread-versus-level, residual, and profile (interaction).

Show me

GLM Multivariate Data Considerations Collapse Hide details

Data. The dependent variables should be quantitative. Factors are categorical and can have numeric values or string values. Covariates are quantitative variables that are related to the dependent variable.

Assumptions. For dependent variables, the data are a random sample of vectors from a multivariate normal population; in the population, the variance-covariance matrices for all cells are the same. Analysis of variance is robust to departures from normality, although the data should be symmetric. To check assumptions, you can use homogeneity of variances tests (including Box's M) and spread-versus-level plots. You can also examine residuals and residual plots.

Related procedures. Use the Explore procedure to examine the data before doing an analysis of variance. For a single dependent variable, use GLM Univariate. If you measured the same dependent variables on several occasions for each subject, use GLM Repeated Measures.

Obtaining GLM Multivariate Tables Collapse Hide details

Obtaining GLM Multivariate Tables

This feature requires the Advanced Statistics option.

From the menus choose:

Analyze
General Linear Model
Multivariate...

Select at least two dependent variables.

Optionally, you can specify Fixed Factor(s), Covariate(s), and WLS Weight.

This procedure pastes GLM: Multivariate command syntax.

See GLM Algorithms for computational details for this procedure.

Related Topics

GLM: Multivariate
GLM Model
GLM Contrasts
GLM Profile Plots
GLM Post Hoc Comparisons
GLM Save
GLM Multivariate Options


GLM Multivariate Options

GLM Multivariate,GLM Multivariate,GLM Multivariate
options,options,options
descriptive statistics,descriptive statistics,descriptive statistics
in GLM Multivariate,in GLM Multivariate,in GLM Multivariate
observed means,observed means,observed means
in GLM Multivariate,in GLM Multivariate,in GLM Multivariate
standard deviation,standard deviation,standard deviation
in GLM Multivariate,in GLM Multivariate,in GLM Multivariate
estimated marginal means,estimated marginal means,estimated marginal means
in GLM Multivariate,in GLM Multivariate,in GLM Multivariate
standard error,standard error,standard error
in GLM Multivariate,in GLM Multivariate,in GLM Multivariate
t test,t test,t test
in GLM Multivariate,in GLM Multivariate,in GLM Multivariate
parameter estimates,parameter estimates,parameter estimates
in GLM Multivariate,in GLM Multivariate,in GLM Multivariate
homogeneity-of-variance tests,homogeneity-of-variance tests,homogeneity-of-variance tests
in GLM Multivariate,in GLM Multivariate,in GLM Multivariate
confidence intervals,confidence intervals,confidence intervals
in GLM Multivariate,in GLM Multivariate,in GLM Multivariate
power estimates,power estimates,power estimates
in GLM Multivariate,in GLM Multivariate,in GLM Multivariate
GLM Multivariate,GLM Multivariate,GLM Multivariate
diagnostics,diagnostics,diagnostics
GLM Multivariate,GLM Multivariate,GLM Multivariate
display,display,display
GLM Multivariate,GLM Multivariate,GLM Multivariate
estimated marginal means,estimated marginal means,estimated marginal means
eta-squared,eta-squared,eta-squared
in GLM Multivariate,in GLM Multivariate,in GLM Multivariate
effect-size estimates,effect-size estimates,effect-size estimates
in GLM Multivariate,in GLM Multivariate,in GLM Multivariate
Levene test,Levene test,Levene test
in GLM Multivariate,in GLM Multivariate,in GLM Multivariate
spread-versus-level plots,spread-versus-level plots,spread-versus-level plots
in GLM Multivariate,in GLM Multivariate,in GLM Multivariate
residual plots,residual plots,residual plots
in GLM Multivariate,in GLM Multivariate,in GLM Multivariate
confidence intervals,confidence intervals,confidence intervals
in GLM Multivariate,in GLM Multivariate,in GLM Multivariate
SSCP,SSCP,SSCP
in GLM Multivariate,in GLM Multivariate,in GLM Multivariate
residual SSCP,residual SSCP,residual SSCP
in GLM Multivariate,in GLM Multivariate,in GLM Multivariate
Bartlett's test of sphericity,Bartlett's test of sphericity,Bartlett's test of sphericity
in GLM Multivariate,in GLM Multivariate,in GLM Multivariate
sums of squares,sums of squares,sums of squares
hypothesis and error matrices,hypothesis and error matrices,hypothesis and error matrices
cross-products,cross-products,cross-products
hypothesis and error matrices,hypothesis and error matrices,hypothesis and error matrices
Box's M test,Box's M test,Box's M test
in GLM Multivariate,in GLM Multivariate,in GLM Multivariate

Optional statistics are available from this dialog box. Statistics are calculated using a fixed-effects model.

Estimated Marginal Means. Select the factors and interactions for which you want estimates of the population marginal means in the cells. These means are adjusted for the covariates, if any. Interactions are available only if you have specified a custom model.

• Compare main effects. Provides uncorrected pairwise comparisons among estimated marginal means for any main effect in the model, for both between- and within-subjects factors. This item is available only if main effects are selected under the Display Means For list.

• Confidence interval adjustment. Select least significant difference (LSD), Bonferroni, or Sidak adjustment to the confidence intervals and significance. This item is available only if Compare main effects is selected.

Display. Select Descriptive statistics to produce observed means, standard deviations, and counts for all of the dependent variables in all cells. Estimates of effect size gives a partial eta-squared value for each effect and each parameter estimate. The eta-squared statistic describes the proportion of total variability attributable to a factor. Select Observed power to obtain the power of the test when the alternative hypothesis is set based on the observed value. Select Parameter estimates to produce the parameter estimates, standard errors, t tests, confidence intervals, and the observed power for each test. You can display the hypothesis and error SSCP matrices and the Residual SSCP matrix plus Bartlett's test of sphericity of the residual covariance matrix.

Homogeneity tests produces the Levene test of the homogeneity of variance for each dependent variable across all level combinations of the between-subjects factors, for between-subjects factors only. Also, homogeneity tests include Box's M test of the homogeneity of the covariance matrices of the dependent variables across all level combinations of the between-subjects factors. The spread-versus-level and residual plots options are useful for checking assumptions about the data. This item is disabled if there are no factors. Select Residual plots to produce an observed-by-predicted-by-standardized residuals plot for each dependent variable. These plots are useful for investigating the assumption of equal variance. Select Lack of fit test to check if the relationship between the dependent variable and the independent variables can be adequately described by the model. General estimable function allows you to construct custom hypothesis tests based on the general estimable function. Rows in any contrast coefficient matrix are linear combinations of the general estimable function.

Significance level. You might want to adjust the significance level used in post hoc tests and the confidence level used for constructing confidence intervals. The specified value is also used to calculate the observed power for the test. When you specify a significance level, the associated level of the confidence intervals is displayed in the dialog box.

Specifying Options for GLM Multivariate Collapse Hide details

This feature requires the Advanced Statistics option.

From the menus choose:

Analyze
General Linear Model
Multivariate...

In the Multivariate dialog box, click Options.

You can select estimated marginal means for specific factors and interactions as well as other useful statistics.

Related Topics

GLM Model
GLM Contrasts
GLM Profile Plots
GLM Post Hoc Comparisons
GLM Save
GLM Multivariate Analysis


GLM Command Additional Features

GLM Multivariate,GLM Multivariate,GLM Multivariate

These features may apply to univariate, multivariate, or repeated measures analysis. The command syntax language also allows you to:

• Specify nested effects in the design (using the DESIGN subcommand).

• Specify tests of effects versus a linear combination of effects or a value (using the TEST subcommand).

• Specify multiple contrasts (using the CONTRAST subcommand).

• Include user-missing values (using the MISSING subcommand).

• Specify EPS criteria (using the CRITERIA subcommand).

• Construct a custom L matrix, M matrix, or K matrix (using the LMATRIX, MMATRIX, or KMATRIX subcommands).

• For deviation or simple contrasts, specify an intermediate reference category (using the CONTRAST subcommand).

• Specify metrics for polynomial contrasts (using the CONTRAST subcommand).

• Specify error terms for post hoc comparisons (using the POSTHOC subcommand).

• Compute estimated marginal means for any factor or factor interaction among the factors in the factor list (using the EMMEANS subcommand).

• Specify names for temporary variables (using the SAVE subcommand).

• Construct a correlation matrix data file (using the OUTFILE subcommand).

• Construct a matrix data file that contains statistics from the between-subjects ANOVA table (using the OUTFILE subcommand).

• Save the design matrix to a new data file (using the OUTFILE subcommand).

Related Topics

GLM: Multivariate


GLM Repeated Measures

GLM Repeated Measures,GLM Repeated Measures,GLM Repeated Measures
ANOVA,ANOVA,ANOVA
in GLM Repeated Measures,in GLM Repeated Measures,in GLM Repeated Measures

The GLM Repeated Measures procedure provides analysis of variance when the same measurement is made several times on each subject or case. If between-subjects factors are specified, they divide the population into groups. Using this general linear model procedure, you can test null hypotheses about the effects of both the between-subjects factors and the within-subjects factors. You can investigate interactions between factors as well as the effects of individual factors. In addition, the effects of constant covariates and covariate interactions with the between-subjects factors can be included.

In a doubly multivariate repeated measures design, the dependent variables represent measurements of more than one variable for the different levels of the within-subjects factors. For example, you could have measured both pulse and respiration at three different times on each subject.

The GLM Repeated Measures procedure provides both univariate and multivariate analyses for the repeated measures data. Both balanced and unbalanced models can be tested. A design is balanced if each cell in the model contains the same number of cases. In a multivariate model, the sums of squares due to the effects in the model and error sums of squares are in matrix form rather than the scalar form found in univariate analysis. These matrices are called SSCP (sums-of-squares and cross-products) matrices. In addition to testing hypotheses, GLM Repeated Measures produces estimates of parameters.

Commonly used a priori contrasts are available to perform hypothesis testing on between-subjects factors. Additionally, after an overall F test has shown significance, you can use post hoc tests to evaluate differences among specific means. Estimated marginal means give estimates of predicted mean values for the cells in the model, and profile plots (interaction plots) of these means allow you to visualize some of the relationships easily.

Residuals, predicted values, Cook's distance, and leverage values can be saved as new variables in your data file for checking assumptions. Also available are a residual SSCP matrix, which is a square matrix of sums of squares and cross-products of residuals, a residual covariance matrix, which is the residual SSCP matrix divided by the degrees of freedom of the residuals, and the residual correlation matrix, which is the standardized form of the residual covariance matrix.

WLS Weight allows you to specify a variable used to give observations different weights for a weighted least-squares (WLS) analysis, perhaps to compensate for different precision of measurement.

Example. Twelve students are assigned to a high- or low-anxiety group based on their scores on an anxiety-rating test. The anxiety rating is called a between-subjects factor because it divides the subjects into groups. The students are each given four trials on a learning task, and the number of errors for each trial is recorded. The errors for each trial are recorded in separate variables, and a within-subjects factor (trial) is defined with four levels for the four trials. The trial effect is found to be significant, while the trial-by-anxiety interaction is not significant.

Methods. Type I, Type II, Type III, and Type IV sums of squares can be used to evaluate different hypotheses. Type III is the default.

Statistics. Post hoc range tests and multiple comparisons (for between-subjects factors): least significant difference, Bonferroni, Sidak, Scheffé, Ryan-Einot-Gabriel-Welsch multiple F, Ryan-Einot-Gabriel-Welsch multiple range, Student-Newman-Keuls, Tukey's honestly significant difference, Tukey's b, Duncan, Hochberg's GT2, Gabriel, Waller Duncan t test, Dunnett (one-sided and two-sided), Tamhane's T2, Dunnett's T3, Games-Howell, and Dunnett's C. Descriptive statistics: observed means, standard deviations, and counts for all of the dependent variables in all cells; the Levene test for homogeneity of variance; Box's M; and Mauchly's test of sphericity.

Plots. Spread-versus-level, residual, and profile (interaction).

Show me

GLM Repeated Measures Data Considerations Collapse Hide details

Data. The dependent variables should be quantitative. Between-subjects factors divide the sample into discrete subgroups, such as male and female. These factors are categorical and can have numeric values or string values. Within-subjects factors are defined in the Repeated Measures Define Factor(s) dialog box. Covariates are quantitative variables that are related to the dependent variable. For a repeated measures analysis, these should remain constant at each level of a within-subjects variable.

The data file should contain a set of variables for each group of measurements on the subjects. The set has one variable for each repetition of the measurement within the group. A within-subjects factor is defined for the group with the number of levels equal to the number of repetitions. For example, measurements of weight could be taken on different days. If measurements of the same property were taken on five days, the within-subjects factor could be specified as day with five levels.

For multiple within-subjects factors, the number of measurements for each subject is equal to the product of the number of levels of each factor. For example, if measurements were taken at three different times each day for four days, the total number of measurements is 12 for each subject. The within-subjects factors could be specified as day(4) and time(3).

Assumptions. A repeated measures analysis can be approached in two ways, univariate and multivariate.

The univariate approach (also known as the split-plot or mixed-model approach) considers the dependent variables as responses to the levels of within-subjects factors. The measurements on a subject should be a sample from a multivariate normal distribution, and the variance-covariance matrices are the same across the cells formed by the between-subjects effects. Certain assumptions are made on the variance-covariance matrix of the dependent variables. The validity of the F statistic used in the univariate approach can be assured if the variance-covariance matrix is circular in form (Huynh and Mandeville, 1979).

To test this assumption, Mauchly's test of sphericity can be used, which performs a test of sphericity on the variance-covariance matrix of an orthonormalized transformed dependent variable. Mauchly's test is automatically displayed for a repeated measures analysis. For small sample sizes, this test is not very powerful. For large sample sizes, the test may be significant even when the impact of the departure on the results is small. If the significance of the test is large, the hypothesis of sphericity can be assumed. However, if the significance is small and the sphericity assumption appears to be violated, an adjustment to the numerator and denominator degrees of freedom can be made in order to validate the univariate F statistic. Three estimates of this adjustment, which is called epsilon, are available in the GLM Repeated Measures procedure. Both the numerator and denominator degrees of freedom must be multiplied by epsilon, and the significance of the F ratio must be evaluated with the new degrees of freedom.

The multivariate approach considers the measurements on a subject to be a sample from a multivariate normal distribution, and the variance-covariance matrices are the same across the cells formed by the between-subjects effects. To test whether the variance-covariance matrices across the cells are the same, Box's M test can be used.

Related procedures. Use the Explore procedure to examine the data before doing an analysis of variance. If there are not repeated measurements on each subject, use GLM Univariate or GLM Multivariate. If there are only two measurements for each subject (for example, pre-test and post-test) and there are no between-subjects factors, you can use the Paired-Samples T Test procedure.

Obtaining GLM Repeated Measures Collapse Hide details

Obtaining GLM Repeated Measures

This feature requires the Advanced Statistics option.

From the menus choose:

Analyze
General Linear Model
Repeated Measures...

Type a within-subject factor name and its number of levels.

Click Add.

Repeat these steps for each within-subjects factor.

To define measure factors for a doubly multivariate repeated measures design:

Type the measure name.

Click Add.

After defining all of your factors and measures:

Click Define.

Select a dependent variable that corresponds to each combination of within-subjects factors (and optionally, measures) on the list.

To change positions of the variables, use the up and down arrows.

To make changes to the within-subjects factors, you can reopen the Repeated Measures Define Factor(s) dialog box without closing the main dialog box. Optionally, you can specify between-subjects factor(s) and covariates.

This procedure pastes GLM: Repeated Measures command syntax.

See GLM Algorithms for computational details for this procedure.

Related Topics

GLM: Repeated Measures
GLM Contrasts
GLM Profile Plots
GLM Post Hoc Comparisons
GLM Repeated Measures Define Factors
GLM Repeated Measures Model
GLM Repeated Measures Save
GLM Repeated Measures Options


GLM Repeated Measures Define Factors

GLM Repeated Measures,GLM Repeated Measures,GLM Repeated Measures
define factors,define factors,define factors
factors,factors,factors
in GLM Repeated Measures,in GLM Repeated Measures,in GLM Repeated Measures

GLM Repeated Measures analyzes groups of related dependent variables that represent different measurements of the same attribute. This dialog box lets you define one or more within-subjects factors for use in GLM Repeated Measures. Note that the order in which you specify within-subjects factors is important. Each factor constitutes a level within the previous factor.

To use Repeated Measures, you must set up your data correctly. You must define within-subjects factors in this dialog box. Notice that these factors are not existing variables in your data but rather factors that you define here.

Example. In a weight-loss study, suppose the weights of several people are measured each week for five weeks. In the data file, each person is a subject or case. The weights for the weeks are recorded in the variables weight1, weight2, and so on. The gender of each person is recorded in another variable. The weights, measured for each subject repeatedly, can be grouped by defining a within-subjects factor. The factor could be called week, defined to have five levels. In the main dialog box, the variables weight1, ..., weight5 are used to assign the five levels of week. The variable in the data file that groups males and females (gender) can be specified as a between-subjects factor to study the differences between males and females.

Measures. If subjects were tested on more than one measure at each time, define the measures. For example, the pulse and respiration rate could be measured on each subject every day for a week. These measures do not exist as variables in the data file but are defined here. A model with more than one measure is sometimes called a doubly multivariate repeated measures model.

Related Topics

GLM Contrasts
GLM Profile Plots
GLM Post Hoc Comparisons
GLM Repeated Measures
GLM Repeated Measures Model
GLM Repeated Measures Save
GLM Repeated Measures Options
GLM: Repeated Measures


GLM Repeated Measures Model

GLM Repeated Measures,GLM Repeated Measures,GLM Repeated Measures
model,model,model
custom models,custom models,custom models
in GLM Repeated Measures,in GLM Repeated Measures,in GLM Repeated Measures
full factorial models,full factorial models,full factorial models
in GLM Repeated Measures,in GLM Repeated Measures,in GLM Repeated Measures

Specify Model. A full factorial model contains all factor main effects, all covariate main effects, and all factor-by-factor interactions. It does not contain covariate interactions. Select Custom to specify only a subset of interactions or to specify factor-by-covariate interactions. You must indicate all of the terms to be included in the model.

Between-Subjects. The between-subjects factors and covariates are listed.

Model. The model depends on the nature of your data. After selecting Custom, you can select the within-subjects effects and interactions and the between-subjects effects and interactions that are of interest in your analysis.

Sum of squares. The method of calculating the sums of squares for the between-subjects model. For balanced or unbalanced between-subjects models with no missing cells, the Type III sum-of-squares method is the most commonly used.

Obtaining Models for GLM Repeated Measures Collapse Hide details

This feature requires the Advanced Statistics option.

From the menus choose:

Analyze
General Linear Model
Repeated Measures...

Define your factors.

In the Repeated Measures dialog box, click Model.

In the Repeated Measures Model dialog box, select Custom.

Select one or more within-subjects factors.

Select a method for building the terms and then move the within-subjects factors.

Repeat these steps for within-subjects factors and between-subjects factors and covariates until you have the model you want. The interaction of each between-subjects term with each within-subjects term is automatically included in the model. That is, if W is a within-subjects factor in the model and B is a between-subjects factor in the model, W*B will be in the model.

Optionally, you can change the type of sum of squares.

Do not use the same term more than once in the model.

Related Topics

Build Terms
Sum of Squares
GLM Contrasts
GLM Profile Plots
GLM Post Hoc Comparisons
GLM Repeated Measures
GLM Repeated Measures Define Factors
GLM Repeated Measures Save
GLM Repeated Measures Options


GLM Repeated Measures Save

GLM Repeated Measures,GLM Repeated Measures,GLM Repeated Measures
saving variables,saving variables,saving variables
unstandardized residuals,unstandardized residuals,unstandardized residuals
in GLM Repeated Measures,in GLM Repeated Measures,in GLM Repeated Measures
standardized residuals,standardized residuals,standardized residuals
in GLM Repeated Measures,in GLM Repeated Measures,in GLM Repeated Measures
deleted residuals,deleted residuals,deleted residuals
in GLM Repeated Measures,in GLM Repeated Measures,in GLM Repeated Measures
standard error,standard error,standard error
in GLM Repeated Measures,in GLM Repeated Measures,in GLM Repeated Measures
Cook's distance,Cook's distance,Cook's distance
in GLM Repeated Measures,in GLM Repeated Measures,in GLM Repeated Measures
leverage values,leverage values,leverage values
in GLM Repeated Measures,in GLM Repeated Measures,in GLM Repeated Measures
weighted predicted values,weighted predicted values,weighted predicted values
in GLM Repeated Measures,in GLM Repeated Measures,in GLM Repeated Measures

You can save values predicted by the model, residuals, and related measures as new variables in the Data Editor. Many of these variables can be used for examining assumptions about the data. To save the values for use in another PASW Statistics session, you must save the current data file.

Predicted Values. The values that the model predicts for each case.

• Unstandardized. The value the model predicts for the dependent variable.

• Standard error. An estimate of the standard deviation of the average value of the dependent variable for cases that have the same values of the independent variables.

Diagnostics. Measures to identify cases with unusual combinations of values for the independent variables and cases that may have a large impact on the model. Available are Cook's distance and uncentered leverage values.

Expand Show details Collapse Hide details

• Cook's distance. A measure of how much the residuals of all cases would change if a particular case were excluded from the calculation of the regression coefficients. A large Cook's D indicates that excluding a case from computation of the regression statistics changes the coefficients substantially.

• Leverage values. Uncentered leverage values. The relative influence of each observation on the model's fit.

Residuals. An unstandardized residual is the actual value of the dependent variable minus the value predicted by the model. Standardized, Studentized, and deleted residuals are also available.

Expand Show details Collapse Hide details

• Unstandardized. The difference between an observed value and the value predicted by the model.

• Standardized. The residual divided by an estimate of its standard deviation. Standardized residuals, which are also known as Pearson residuals, have a mean of 0 and a standard deviation of 1.

• Studentized. The residual divided by an estimate of its standard deviation that varies from case to case, depending on the distance of each case's values on the independent variables from the means of the independent variables.

• Deleted. The residual for a case when that case is excluded from the calculation of the regression coefficients. It is the difference between the value of the dependent variable and the adjusted predicted value.

Coefficient Statistics. Saves a variance-covariance matrix of the parameter estimates to a dataset or a data file. Also, for each dependent variable, there will be a row of parameter estimates, a row of significance values for the t statistics corresponding to the parameter estimates, and a row of residual degrees of freedom. For a multivariate model, there are similar rows for each dependent variable. You can use this matrix data in other procedures that read matrix files. Datasets are available for subsequent use in the same session but are not saved as files unless explicitly saved prior to the end of the session. Dataset names must conform to variable naming rules. See the topic Variable Names for more information.

Saving New Variables in GLM Repeated Measures Collapse Hide details

This feature requires the Advanced Statistics option.

From the menus choose:

Analyze
General Linear Model
Repeated Measures...

Define your factors.

In the Repeated Measures dialog box, click Save.

Related Topics

GLM Contrasts
GLM Profile Plots
GLM Post Hoc Comparisons
GLM Repeated Measures
GLM Repeated Measures Define Factors
GLM Repeated Measures Model
GLM Repeated Measures Options


GLM Repeated Measures Options

GLM Repeated Measures,GLM Repeated Measures,GLM Repeated Measures
options,options,options
descriptive statistics,descriptive statistics,descriptive statistics
in GLM Repeated Measures,in GLM Repeated Measures,in GLM Repeated Measures
observed means,observed means,observed means
in GLM Repeated Measures,in GLM Repeated Measures,in GLM Repeated Measures
standard deviation,standard deviation,standard deviation
in GLM Repeated Measures,in GLM Repeated Measures,in GLM Repeated Measures
estimated marginal means,estimated marginal means,estimated marginal means
in GLM Repeated Measures,in GLM Repeated Measures,in GLM Repeated Measures
standard error,standard error,standard error
in GLM Repeated Measures,in GLM Repeated Measures,in GLM Repeated Measures
t test,t test,t test
in GLM Repeated Measures,in GLM Repeated Measures,in GLM Repeated Measures
parameter estimates,parameter estimates,parameter estimates
in GLM Repeated Measures,in GLM Repeated Measures,in GLM Repeated Measures
homogeneity-of-variance tests,homogeneity-of-variance tests,homogeneity-of-variance tests
in GLM Repeated Measures,in GLM Repeated Measures,in GLM Repeated Measures
confidence intervals,confidence intervals,confidence intervals
in GLM Repeated Measures,in GLM Repeated Measures,in GLM Repeated Measures
power estimates,power estimates,power estimates
in GLM Repeated Measures,in GLM Repeated Measures,in GLM Repeated Measures
GLM Repeated Measures,GLM Repeated Measures,GLM Repeated Measures
diagnostics,diagnostics,diagnostics
GLM Repeated Measures,GLM Repeated Measures,GLM Repeated Measures
display,display,display
GLM Repeated Measures,GLM Repeated Measures,GLM Repeated Measures
estimated marginal means,estimated marginal means,estimated marginal means
eta-squared,eta-squared,eta-squared
in GLM Repeated Measures,in GLM Repeated Measures,in GLM Repeated Measures
effect-size estimates,effect-size estimates,effect-size estimates
in GLM Repeated Measures,in GLM Repeated Measures,in GLM Repeated Measures
Levene test,Levene test,Levene test
in GLM Repeated Measures,in GLM Repeated Measures,in GLM Repeated Measures
spread-versus-level plots,spread-versus-level plots,spread-versus-level plots
in GLM Repeated Measures,in GLM Repeated Measures,in GLM Repeated Measures
Mauchly's test of sphericity,Mauchly's test of sphericity,Mauchly's test of sphericity
in GLM Repeated Measures,in GLM Repeated Measures,in GLM Repeated Measures
residual plots,residual plots,residual plots
in GLM Repeated Measures,in GLM Repeated Measures,in GLM Repeated Measures
confidence intervals,confidence intervals,confidence intervals
in GLM Repeated Measures,in GLM Repeated Measures,in GLM Repeated Measures
SSCP,SSCP,SSCP
in GLM Repeated Measures,in GLM Repeated Measures,in GLM Repeated Measures
residual SSCP,residual SSCP,residual SSCP
in GLM Repeated Measures,in GLM Repeated Measures,in GLM Repeated Measures

Optional statistics are available from this dialog box. Statistics are calculated using a fixed-effects model.

Estimated Marginal Means. Select the factors and interactions for which you want estimates of the population marginal means in the cells. These means are adjusted for the covariates, if any. Both within-subjects and between-subjects factors can be selected.

• Compare main effects. Provides uncorrected pairwise comparisons among estimated marginal means for any main effect in the model, for both between- and within-subjects factors. This item is available only if main effects are selected under the Display Means For list.

• Confidence interval adjustment. Select least significant difference (LSD), Bonferroni, or Sidak adjustment to the confidence intervals and significance. This item is available only if Compare main effects is selected.

Display. Select Descriptive statistics to produce observed means, standard deviations, and counts for all of the dependent variables in all cells. Estimates of effect size gives a partial eta-squared value for each effect and each parameter estimate. The eta-squared statistic describes the proportion of total variability attributable to a factor. Select Observed power to obtain the power of the test when the alternative hypothesis is set based on the observed value. Select Parameter estimates to produce the parameter estimates, standard errors, t tests, confidence intervals, and the observed power for each test. You can display the hypothesis and error SSCP matrices and the Residual SSCP matrix plus Bartlett's test of sphericity of the residual covariance matrix.

Homogeneity tests produces the Levene test of the homogeneity of variance for each dependent variable across all level combinations of the between-subjects factors, for between-subjects factors only. Also, homogeneity tests include Box's M test of the homogeneity of the covariance matrices of the dependent variables across all level combinations of the between-subjects factors. The spread-versus-level and residual plots options are useful for checking assumptions about the data. This item is disabled if there are no factors. Select Residual plots to produce an observed-by-predicted-by-standardized residuals plot for each dependent variable. These plots are useful for investigating the assumption of equal variance. Select Lack of fit test to check if the relationship between the dependent variable and the independent variables can be adequately described by the model. General estimable function allows you to construct custom hypothesis tests based on the general estimable function. Rows in any contrast coefficient matrix are linear combinations of the general estimable function.

Significance level. You might want to adjust the significance level used in post hoc tests and the confidence level used for constructing confidence intervals. The specified value is also used to calculate the observed power for the test. When you specify a significance level, the associated level of the confidence intervals is displayed in the dialog box.

Specifying Options for GLM Repeated Measures Collapse Hide details

This feature requires the Advanced Statistics option.

From the menus choose:

Analyze
General Linear Model
Repeated Measures...

Define your factors.

In the Repeated Measures dialog box, click Options.

You can request estimated marginal means for specific factors and interactions as well as other useful statistics.

Related Topics

GLM Contrasts
GLM Profile Plots
GLM Post Hoc Comparisons
GLM Repeated Measures
GLM Repeated Measures Define Factors
GLM Repeated Measures Model
GLM Repeated Measures Save


GLM Command Additional Features

GLM Repeated Measures,GLM Repeated Measures,GLM Repeated Measures
command additional features,command additional features,command additional features

These features may apply to univariate, multivariate, or repeated measures analysis. The command syntax language also allows you to:

• Specify nested effects in the design (using the DESIGN subcommand).

• Specify tests of effects versus a linear combination of effects or a value (using the TEST subcommand).

• Specify multiple contrasts (using the CONTRAST subcommand).

• Include user-missing values (using the MISSING subcommand).

• Specify EPS criteria (using the CRITERIA subcommand).

• Construct a custom L matrix, M matrix, or K matrix (using the LMATRIX, MMATRIX, and KMATRIX subcommands).

• For deviation or simple contrasts, specify an intermediate reference category (using the CONTRAST subcommand).

• Specify metrics for polynomial contrasts (using the CONTRAST subcommand).

• Specify error terms for post hoc comparisons (using the POSTHOC subcommand).

• Compute estimated marginal means for any factor or factor interaction among the factors in the factor list (using the EMMEANS subcommand).

• Specify names for temporary variables (using the SAVE subcommand).

• Construct a correlation matrix data file (using the OUTFILE subcommand).

• Construct a matrix data file that contains statistics from the between-subjects ANOVA table (using the OUTFILE subcommand).

• Save the design matrix to a new data file (using the OUTFILE subcommand).

Related Topics

GLM: Repeated Measures


Variance Components Analysis

Variance Components,Variance Components,Variance Components

The Variance Components procedure, for mixed-effects models, estimates the contribution of each random effect to the variance of the dependent variable. This procedure is particularly interesting for analysis of mixed models such as split plot, univariate repeated measures, and random block designs. By calculating variance components, you can determine where to focus attention in order to reduce the variance.

Four different methods are available for estimating the variance components: minimum norm quadratic unbiased estimator (MINQUE), analysis of variance (ANOVA), maximum likelihood (ML), and restricted maximum likelihood (REML). Various specifications are available for the different methods.

Default output for all methods includes variance component estimates. If the ML method or the REML method is used, an asymptotic covariance matrix table is also displayed. Other available output includes an ANOVA table and expected mean squares for the ANOVA method and an iteration history for the ML and REML methods. The Variance Components procedure is fully compatible with the GLM Univariate procedure.

WLS Weight allows you to specify a variable used to give observations different weights for a weighted analysis, perhaps to compensate for variations in precision of measurement.

Example. At an agriculture school, weight gains for pigs in six different litters are measured after one month. The litter variable is a random factor with six levels. (The six litters studied are a random sample from a large population of pig litters.) The investigator finds out that the variance in weight gain is attributable to the difference in litters much more than to the difference in pigs within a litter.

Show me

Variance Components Data Considerations Collapse Hide details

Data. The dependent variable is quantitative. Factors are categorical. They can have numeric values or string values of up to eight bytes. At least one of the factors must be random. That is, the levels of the factor must be a random sample of possible levels. Covariates are quantitative variables that are related to the dependent variable.

Assumptions. All methods assume that model parameters of a random effect have zero means and finite constant variances and are mutually uncorrelated. Model parameters from different random effects are also uncorrelated.

The residual term also has a zero mean and finite constant variance. It is uncorrelated with model parameters of any random effect. Residual terms from different observations are assumed to be uncorrelated.

Based on these assumptions, observations from the same level of a random factor are correlated. This fact distinguishes a variance component model from a general linear model.

ANOVA and MINQUE do not require normality assumptions. They are both robust to moderate departures from the normality assumption.

ML and REML require the model parameter and the residual term to be normally distributed.

Related procedures. Use the Explore procedure to examine the data before doing variance components analysis. For hypothesis testing, use GLM Univariate, GLM Multivariate, and GLM Repeated Measures.

Obtaining Variance Components Tables Collapse Hide details

Obtaining Variance Components Tables

This feature requires the Advanced Statistics option.

From the menus choose:

Analyze
General Linear Model
Variance Components...

Select a dependent variable.

Select variables for Fixed Factor(s), Random Factor(s), and Covariate(s), as appropriate for your data. For specifying a weight variable, use WLS Weight.

This procedure pastes VARCOMP command syntax.

See VARCOMP Algorithms for computational details for this procedure.

Related Topics

VARCOMP
Variance Components Model
Variance Components Options
Sum of Squares (Variance Components)
Variance Components Save to New File


Variance Components Model

Variance Components,Variance Components,Variance Components
model,model,model
custom models,custom models,custom models
in Variance Components,in Variance Components,in Variance Components
full factorial models,full factorial models,full factorial models
in Variance Components,in Variance Components,in Variance Components

Specify Model. A full factorial model contains all factor main effects, all covariate main effects, and all factor-by-factor interactions. It does not contain covariate interactions. Select Custom to specify only a subset of interactions or to specify factor-by-covariate interactions. You must indicate all of the terms to be included in the model.

Factors & Covariates. The factors and covariates are listed.

Model. The model depends on the nature of your data. After selecting Custom, you can select the main effects and interactions that are of interest in your analysis. The model must contain a random factor.

Include intercept in model. Usually the intercept is included in the model. If you can assume that the data pass through the origin, you can exclude the intercept.

Specifying Models for Variance Components Collapse Hide details

This feature requires the Advanced Statistics option.

From the menus choose:

Analyze
General Linear Model
Variance Components...

In the dialog box, click Model.

In the Model dialog box, select Custom.

Select one or more factors or covariates, or a combination of factors and covariates.

Select a method for building the terms.

Repeat these steps until you have all of the terms you want in the model. At least one random factor must be included in the model. Do not use the same term more than once in the model.

You can deselect the intercept.

Related Topics

Variance Components Analysis
Variance Components Options
Sum of Squares (Variance Components)
Variance Components Save to New File
Build Terms


Variance Components Options

Variance Components,Variance Components,Variance Components
options,options,options
MINQUE,MINQUE,MINQUE
in Variance Components,in Variance Components,in Variance Components
analysis of variance,analysis of variance,analysis of variance
in Variance Components,in Variance Components,in Variance Components
maximum likelihood estimation,maximum likelihood estimation,maximum likelihood estimation
in Variance Components,in Variance Components,in Variance Components
restricted maximum likelihood estimation,restricted maximum likelihood estimation,restricted maximum likelihood estimation
in Variance Components,in Variance Components,in Variance Components
random-effect priors,random-effect priors,random-effect priors
in Variance Components,in Variance Components,in Variance Components

Method. You can choose one of four methods to estimate the variance components.

• MINQUE (minimum norm quadratic unbiased estimator) produces estimates that are invariant with respect to the fixed effects. If the data are normally distributed and the estimates are correct, this method produces the least variance among all unbiased estimators. You can choose a method for random-effect prior weights.

• ANOVA (analysis of variance) computes unbiased estimates using either the Type I or Type III sums of squares for each effect. The ANOVA method sometimes produces negative variance estimates, which can indicate an incorrect model, an inappropriate estimation method, or a need for more data.

• Maximum likelihood (ML) produces estimates that would be most consistent with the data actually observed, using iterations. These estimates can be biased. This method is asymptotically normal. ML and REML estimates are invariant under translation. This method does not take into account the degrees of freedom used to estimate the fixed effects.

• Restricted maximum likelihood (REML) estimates reduce the ANOVA estimates for many (if not all) cases of balanced data. Because this method is adjusted for the fixed effects, it should have smaller standard errors than the ML method. This method takes into account the degrees of freedom used to estimate the fixed effects.

Random Effect Priors. Uniform implies that all random effects and the residual term have an equal impact on the observations. The Zero scheme is equivalent to assuming zero random-effect variances. Available only for the MINQUE method.

Sum of Squares. Type I sums of squares are used for the hierarchical model, which is often used in variance component literature. If you choose Type III, the default in GLM, the variance estimates can be used in GLM Univariate for hypothesis testing with Type III sums of squares. Available only for the ANOVA method.

Criteria. You can specify the convergence criterion and the maximum number of iterations. Available only for the ML or REML methods.

Display. For the ANOVA method, you can choose to display sums of squares and expected mean squares. If you selected Maximum likelihood or Restricted maximum likelihood, you can display a history of the iterations.

Specifying Options for Variance Components Collapse Hide details

This feature requires the Advanced Statistics option.

From the menus choose:

Analyze
General Linear Model
Variance Components...

In the Variance Components dialog box, click Options.

Select the desired method and specifications.

Related Topics

Variance Components Analysis
Variance Components Model
Sum of Squares (Variance Components)
Variance Components Save to New File


Sum of Squares (Variance Components)

sums of squares,sums of squares,sums of squares
in Variance Components,in Variance Components,in Variance Components
hierarchical decomposition,hierarchical decomposition,hierarchical decomposition
in Variance Components,in Variance Components,in Variance Components

For the model, you can choose a type of sum of squares. Type III is the most commonly used and is the default.

Type I. This method is also known as the hierarchical decomposition of the sum-of-squares method. Each term is adjusted for only the term that precedes it in the model. The Type I sum-of-squares method is commonly used for:

• A balanced ANOVA model in which any main effects are specified before any first-order interaction effects, any first-order interaction effects are specified before any second-order interaction effects, and so on.

• A polynomial regression model in which any lower-order terms are specified before any higher-order terms.

• A purely nested model in which the first-specified effect is nested within the second-specified effect, the second-specified effect is nested within the third, and so on. (This form of nesting can be specified only by using syntax.)

Type III. The default. This method calculates the sums of squares of an effect in the design as the sums of squares adjusted for any other effects that do not contain it and orthogonal to any effects (if any) that contain it. The Type III sums of squares have one major advantage in that they are invariant with respect to the cell frequencies as long as the general form of estimability remains constant. Therefore, this type is often considered useful for an unbalanced model with no missing cells. In a factorial design with no missing cells, this method is equivalent to the Yates' weighted-squares-of-means technique. The Type III sum-of-squares method is commonly used for:

• Any models listed in Type I.

• Any balanced or unbalanced models with no empty cells.

Related Topics

Variance Components Analysis
Variance Components Model
Variance Components Options
Variance Components Save to New File


Variance Components Save to New File

Variance Components,Variance Components,Variance Components
saving results,saving results,saving results

You can save some results of this procedure to a new PASW Statistics data file.

Variance component estimates. Saves estimates of the variance components and estimate labels to a data file or dataset. These can be used in calculating more statistics or in further analysis in the GLM procedures. For example, you can use them to calculate confidence intervals or test hypotheses.

Component covariation. Saves a variance-covariance matrix or a correlation matrix to a data file or dataset. Available only if Maximum likelihood or Restricted maximum likelihood has been specified.

Destination for created values. Allows you to specify a dataset name or external filename for the file containing the variance component estimates and/or the matrix. Datasets are available for subsequent use in the same session but are not saved as files unless explicitly saved prior to the end of the session. Dataset names must conform to variable naming rules. See the topic Variable Names for more information.

You can use the MATRIX command to extract the data you need from the data file and then compute confidence intervals or perform tests.

Saving Files from Variance Components Collapse Hide details

This feature requires the Advanced Statistics option.

From the menus choose:

Analyze
General Linear Model
Variance Components...

In the Variance Components dialog box, click Save.

Select the file you want to save, and then specify a name for the new file.

Related Topics

Variance Components Analysis
Variance Components Model
Variance Components Options
Sum of Squares (Variance Components)


VARCOMP Command Additional Features

Variance Components,Variance Components,Variance Components
command additional features,command additional features,command additional features

The command syntax language also allows you to:

• Specify nested effects in the design (using the DESIGN subcommand).

• Include user-missing values (using the MISSING subcommand).

• Specify EPS criteria (using the CRITERIA subcommand).

Related Topics

VARCOMP


Linear Mixed Models

mixed models,mixed models,mixed models
linear,linear,linear
Linear Mixed Models,Linear Mixed Models,Linear Mixed Models

The Linear Mixed Models procedure expands the general linear model so that the data are permitted to exhibit correlated and nonconstant variability. The mixed linear model, therefore, provides the flexibility of modeling not only the means of the data but their variances and covariances as well.

The Linear Mixed Models procedure is also a flexible tool for fitting other models that can be formulated as mixed linear models. Such models include multilevel models, hierarchical linear models, and random coefficient models.

Example. A grocery store chain is interested in the effects of various coupons on customer spending. Taking a random sample of their regular customers, they follow the spending of each customer for 10 weeks. In each week, a different coupon is mailed to the customers. Linear Mixed Models is used to estimate the effect of different coupons on spending while adjusting for correlation due to repeated observations on each subject over the 10 weeks.

Methods. Maximum likelihood (ML) and restricted maximum likelihood (REML) estimation.

Statistics. Descriptive statistics: sample sizes, means, and standard deviations of the dependent variable and covariates for each distinct level combination of the factors. Factor-level information: sorted values of the levels of each factor and their frequencies. Also, parameter estimates and confidence intervals for fixed effects and Wald tests and confidence intervals for parameters of covariance matrices. Type I and Type III sums of squares can be used to evaluate different hypotheses. Type III is the default.

Show me

Linear Mixed Models Data Considerations Collapse Hide details

Data. The dependent variable should be quantitative. Factors should be categorical and can have numeric values or string values. Covariates and the weight variable should be quantitative. Subjects and repeated variables may be of any type.

Assumptions. The dependent variable is assumed to be linearly related to the fixed factors, random factors, and covariates. The fixed effects model the mean of the dependent variable. The random effects model the covariance structure of the dependent variable. Multiple random effects are considered independent of each other, and separate covariance matrices will be computed for each; however, model terms specified on the same random effect can be correlated. The repeated measures model the covariance structure of the residuals. The dependent variable is also assumed to come from a normal distribution.

Related procedures. Use the Explore procedure to examine the data before running an analysis. If you do not suspect there to be correlated or nonconstant variability, you can use the GLM Univariate or GLM Repeated Measures procedure. You can alternatively use the Variance Components Analysis procedure if the random effects have a variance components covariance structure and there are no repeated measures.

Obtaining a Linear Mixed Models Analysis Collapse Hide details

Obtaining a Linear Mixed Models Analysis

This feature requires the Advanced Statistics option.

From the menus choose:

Analyze
Mixed Models
Linear...

Optionally, select one or more subject variables.

Optionally, select one or more repeated variables.

Optionally, select a residual covariance structure.

Click Continue.

Select a dependent variable.

Select at least one factor or covariate.

Click Fixed or Random and specify at least a fixed-effects or random-effects model.

Optionally, select a weighting variable.

This procedure pastes MIXED command syntax.

See MIXED Algorithms for computational details for this procedure.

Related Topics

MIXED
Linear Mixed Models Select Subjects/Repeated Variables
Linear Mixed Models Fixed Effects
Sum of Squares
Linear Mixed Models Random Effects
Linear Mixed Models Estimation
Linear Mixed Models Statistics
Linear Mixed Models EM Means
Linear Mixed Models Save


Linear Mixed Models Select Subjects/Repeated Variables

repeated measures variables,repeated measures variables,repeated measures variables
in Linear Mixed Models,in Linear Mixed Models,in Linear Mixed Models
subjects variables,subjects variables,subjects variables
in Linear Mixed Models,in Linear Mixed Models,in Linear Mixed Models

This feature requires the Advanced Statistics option.

This dialog box allows you to select variables that define subjects and repeated observations and to choose a covariance structure for the residuals.

Subjects. A subject is an observational unit that can be considered independent of other subjects. For example, the blood pressure readings from a patient in a medical study can be considered independent of the readings from other patients. Defining subjects becomes particularly important when there are repeated measurements per subject and you want to model the correlation between these observations. For example, you might expect that blood pressure readings from a single patient during consecutive visits to the doctor are correlated.

Subjects can also be defined by the factor-level combination of multiple variables; for example, you can specify Gender and Age category as subject variables to model the belief that males over the age of 65 are similar to each other but independent of males under 65 and females.

All of the variables specified in the Subjects list are used to define subjects for the residual covariance structure. You can use some or all of the variables to define subjects for the random-effects covariance structure.

Repeated. The variables specified in this list are used to identify repeated observations. For example, a single variable Week might identify the 10 weeks of observations in a medical study, or Month and Day might be used together to identify daily observations over the course of a year.

Repeated Covariance type. This specifies the covariance structure for the residuals. The available structures are as follows:

• Ante-Dependence: First Order

• AR(1)

• AR(1): Heterogeneous

• ARMA(1,1)

• Compound Symmetry

• Compound Symmetry: Correlation Metric

• Compound Symmetry: Heterogeneous

• Diagonal

• Factor Analytic: First Order

• Factor Analytic: First Order, Heterogeneous

• Huynh-Feldt

• Scaled Identity

• Toeplitz

• Toeplitz: Heterogeneous

• Unstructured

• Unstructured: Correlations

See the topic Covariance Structures for more information.

Related Topics

Linear Mixed Models
Linear Mixed Models Fixed Effects
Sum of Squares
Linear Mixed Models Random Effects
Linear Mixed Models Estimation
Linear Mixed Models Statistics
Linear Mixed Models EM Means
Linear Mixed Models Save
Covariance Structures
MIXED


Linear Mixed Models Fixed Effects

Linear Mixed Models,Linear Mixed Models,Linear Mixed Models
fixed effects,fixed effects,fixed effects
fixed effects,fixed effects,fixed effects
in Linear Mixed Models,in Linear Mixed Models,in Linear Mixed Models

This feature requires the Advanced Statistics option.

Fixed Effects. There is no default model, so you must explicitly specify the fixed effects. Alternatively, you can build nested or non-nested terms.

Include Intercept. The intercept is usually included in the model. If you can assume the data pass through the origin, you can exclude the intercept.

Sum of Squares. The method of calculating the sums of squares. For models with no missing cells, the Type III method is most commonly used.

Specifying Non-Nested Build Terms for Linear Mixed Models Collapse Hide details

From the menus choose:

Analyze
Mixed Models
Linear...

Optionally, select subjects and repeated variables, and then click Continue.

In the Linear Mixed Models dialog box, click Fixed or Random.

Select Build terms.

Select one or more factors or covariates or a combination of factors and covariates.

Select a method for building the terms and click Add.

Repeat the process until you have all of the terms that you want in the model.

Select a type of sum of squares and whether or not you want the intercept.

Specifying Nested Build Terms for Linear Mixed Models Collapse Hide details

From the menus choose:

Analyze
Mixed Models
Linear...

Optionally, select subjects and repeated variables, and then click Continue.

In the Linear Mixed Models dialog box, click Fixed or Random.

Select Build nested terms.

Select a factor or covariate that is nested within another factor and click the move button.

Click Within.

Select the factor within which the previous factor or covariate is nested and click the move button.

Click Add.

Optionally, you can include interaction effects or add multiple levels of nesting to the nested term.

Related Topics

Build Non-Nested Terms
Build Nested Terms
Linear Mixed Models Random Effects
Linear Mixed Models
Linear Mixed Models Select Subjects/Repeated Variables
Sum of Squares
Linear Mixed Models Estimation
Linear Mixed Models Statistics
Linear Mixed Models EM Means
Linear Mixed Models Save


Build Non-Nested Terms

Linear Mixed Models,Linear Mixed Models,Linear Mixed Models
build terms,build terms,build terms
Linear Mixed Models,Linear Mixed Models,Linear Mixed Models
interaction terms,interaction terms,interaction terms
interaction terms,interaction terms,interaction terms
in Linear Mixed Models,in Linear Mixed Models,in Linear Mixed Models

For the selected factors and covariates:

Factorial. Creates all possible interactions and main effects of the selected variables. This is the default.

Interaction. Creates the highest-level interaction term of all selected variables.

Main Effects. Creates a main-effects term for each variable selected.

All 2-Way. Creates all possible two-way interactions of the selected variables.

All 3-Way. Creates all possible three-way interactions of the selected variables.

All 4-Way. Creates all possible four-way interactions of the selected variables.

All 5-Way. Creates all possible five-way interactions of the selected variables.

Related Topics

Linear Mixed Models Fixed Effects
Build Nested Terms
Linear Mixed Models Random Effects


Build Nested Terms

Linear Mixed Models,Linear Mixed Models,Linear Mixed Models
build terms,build terms,build terms
nested terms,nested terms,nested terms
in Linear Mixed Models,in Linear Mixed Models,in Linear Mixed Models

You can build nested terms for your model in this procedure. Nested terms are useful for modeling the effect of a factor or covariate whose values do not interact with the levels of another factor. For example, a grocery store chain may follow the spending of their customers at several store locations. Since each customer frequents only one of those locations, the Customer effect can be said to be nested within the Store location effect.

Additionally, you can include interaction effects or add multiple levels of nesting to the nested term.

Limitations. Nested terms have the following restrictions:

• All factors within an interaction must be unique. Thus, if A is a factor, then specifying A*A is invalid.

• All factors within a nested effect must be unique. Thus, if A is a factor, then specifying A(A) is invalid.

• No effect can be nested within a covariate. Thus, if A is a factor and X is a covariate, then specifying A(X) is invalid.

Related Topics

Linear Mixed Models Fixed Effects
Build Non-Nested Terms
Linear Mixed Models Random Effects


Sum of Squares

sums of squares,sums of squares,sums of squares
in Linear Mixed Models,in Linear Mixed Models,in Linear Mixed Models

For the model, you can choose a type of sums of squares. Type III is the most commonly used and is the default.

Type I. This method is also known as the hierarchical decomposition of the sum-of-squares method. Each term is adjusted only for the term that precedes it in the model. Type I sums of squares are commonly used for:

• A balanced ANOVA model in which any main effects are specified before any first-order interaction effects, any first-order interaction effects are specified before any second-order interaction effects, and so on.

• A polynomial regression model in which any lower-order terms are specified before any higher-order terms.

• A purely nested model in which the first-specified effect is nested within the second-specified effect, the second-specified effect is nested within the third, and so on. (This form of nesting can be specified only by using syntax.)

Type III. The default. This method calculates the sums of squares of an effect in the design as the sums of squares adjusted for any other effects that do not contain it and orthogonal to any effects (if any) that contain it. The Type III sums of squares have one major advantage in that they are invariant with respect to the cell frequencies as long as the general form of estimability remains constant. Hence, this type of sums of squares is often considered useful for an unbalanced model with no missing cells. In a factorial design with no missing cells, this method is equivalent to the Yates' weighted-squares-of-means technique. The Type III sum-of-squares method is commonly used for:

• Any models listed in Type I.

• Any balanced or unbalanced models with no empty cells.

Related Topics

Linear Mixed Models
Linear Mixed Models Select Subjects/Repeated Variables
Linear Mixed Models Fixed Effects
Linear Mixed Models Random Effects
Linear Mixed Models Estimation
Linear Mixed Models Statistics
Linear Mixed Models EM Means
Linear Mixed Models Save


Linear Mixed Models Random Effects

Linear Mixed Models,Linear Mixed Models,Linear Mixed Models
random effects,random effects,random effects
random effects,random effects,random effects
in Linear Mixed Models,in Linear Mixed Models,in Linear Mixed Models

This feature requires the Advanced Statistics option.

Covariance type. This allows you to specify the covariance structure for the random-effects model. A separate covariance matrix is estimated for each random effect. The available structures are as follows:

• Ante-Dependence: First Order

• AR(1)

• AR(1): Heterogeneous

• ARMA(1,1)

• Compound Symmetry

• Compound Symmetry: Correlation Metric

• Compound Symmetry: Heterogeneous

• Diagonal

• Factor Analytic: First Order

• Factor Analytic: First Order, Heterogeneous

• Huynh-Feldt

• Scaled Identity

• Toeplitz

• Toeplitz: Heterogeneous

• Unstructured

• Unstructured: Correlation Metric

• Variance Components

See the topic Covariance Structures for more information.

Random Effects. There is no default model, so you must explicitly specify the random effects. Alternatively, you can build nested or non-nested terms. You can also choose to include an intercept term in the random-effects model.

You can specify multiple random-effects models. After building the first model, click Next to build the next model. Click Previous to scroll back through existing models. Each random-effect model is assumed to be independent of every other random-effect model; that is, separate covariance matrices will be computed for each. Terms specified in the same random-effect model can be correlated.

Subject Groupings. The variables listed are those that you selected as subject variables in the Select Subjects/Repeated Variables dialog box. Choose some or all of these in order to define the subjects for the random-effects model.

Related Topics

Linear Mixed Models
Linear Mixed Models Select Subjects/Repeated Variables
Linear Mixed Models Fixed Effects
Sum of Squares
Linear Mixed Models Estimation
Linear Mixed Models Statistics
Linear Mixed Models EM Means
Linear Mixed Models Save
Build Non-Nested Terms
Build Nested Terms


Linear Mixed Models Estimation

Linear Mixed Models,Linear Mixed Models,Linear Mixed Models
estimation criteria,estimation criteria,estimation criteria
step-halving,step-halving,step-halving
in Linear Mixed Models,in Linear Mixed Models,in Linear Mixed Models
iteration history,iteration history,iteration history
in Linear Mixed Models,in Linear Mixed Models,in Linear Mixed Models
log-likelihood convergence,log-likelihood convergence,log-likelihood convergence
in Linear Mixed Models,in Linear Mixed Models,in Linear Mixed Models
parameter convergence,parameter convergence,parameter convergence
in Linear Mixed Models,in Linear Mixed Models,in Linear Mixed Models
scoring,scoring,scoring
in Linear Mixed Models,in Linear Mixed Models,in Linear Mixed Models
Fisher scoring,Fisher scoring,Fisher scoring
in Linear Mixed Models,in Linear Mixed Models,in Linear Mixed Models
singularity tolerance,singularity tolerance,singularity tolerance
in Linear Mixed Models,in Linear Mixed Models,in Linear Mixed Models

Method. Select the maximum likelihood or restricted maximum likelihood estimation.

Iterations:

• Maximum iterations. Specify a non-negative integer.

• Maximum step-halvings. At each iteration, the step size is reduced by a factor of 0.5 until the log-likelihood increases or maximum step-halving is reached. Specify a positive integer.

• Print iteration history for every n step(s). Displays a table containing the log-likelihood function value and parameter estimates at every n iteration beginning with the 0th iteration (the initial estimates). If you choose to print the iteration history, the last iteration is always printed regardless of the value of n.

Log-likelihood Convergence. Convergence is assumed if the absolute change or relative change in the log-likelihood function is less than the value specified, which must be non-negative. The criterion is not used if the value specified equals 0.

Parameter Convergence. Convergence is assumed if the maximum absolute change or maximum relative change in the parameter estimates is less than the value specified, which must be non-negative. The criterion is not used if the value specified equals 0.

Hessian Convergence. For the Absolute specification, convergence is assumed if a statistic based on the Hessian is less than the value specified. For the Relative specification, convergence is assumed if the statistic is less than the product of the value specified and the absolute value of the log-likelihood. The criterion is not used if the value specified equals 0.

Maximum scoring steps. Requests to use the Fisher scoring algorithm up to iteration number n. Specify a positive integer.

Singularity tolerance. This is the value used as tolerance in checking singularity. Specify a positive value.

Specifying Estimation Criteria for Linear Mixed Models Collapse Hide details

This feature requires the Advanced Statistics option.

From the menus choose:

Analyze
Mixed Models
Linear...

Optionally, select subjects and repeated variables, and then click Continue.

In the Linear Mixed Models dialog box, click Estimation.

Select the estimation criteria that you want.

Related Topics

Linear Mixed Models
Linear Mixed Models Select Subjects/Repeated Variables
Linear Mixed Models Fixed Effects
Sum of Squares
Linear Mixed Models Random Effects
Linear Mixed Models Statistics
Linear Mixed Models EM Means
Linear Mixed Models Save


Linear Mixed Models Statistics

Linear Mixed Models,Linear Mixed Models,Linear Mixed Models
model,model,model
descriptive statistics,descriptive statistics,descriptive statistics
in Linear Mixed Models,in Linear Mixed Models,in Linear Mixed Models
factor-level information,factor-level information,factor-level information
in Linear Mixed Models,in Linear Mixed Models,in Linear Mixed Models
parameter estimates,parameter estimates,parameter estimates
in Linear Mixed Models,in Linear Mixed Models,in Linear Mixed Models
covariance parameters test,covariance parameters test,covariance parameters test
in Linear Mixed Models,in Linear Mixed Models,in Linear Mixed Models
correlation matrix,correlation matrix,correlation matrix
in Linear Mixed Models,in Linear Mixed Models,in Linear Mixed Models
covariance matrix,covariance matrix,covariance matrix
in Linear Mixed Models,in Linear Mixed Models,in Linear Mixed Models
residual covariance matrix,residual covariance matrix,residual covariance matrix
in Linear Mixed Models,in Linear Mixed Models,in Linear Mixed Models
parameter covariance matrix,parameter covariance matrix,parameter covariance matrix
in Linear Mixed Models,in Linear Mixed Models,in Linear Mixed Models
random-effect covariance matrix,random-effect covariance matrix,random-effect covariance matrix
in Linear Mixed Models,in Linear Mixed Models,in Linear Mixed Models
confidence intervals,confidence intervals,confidence intervals
in Linear Mixed Models,in Linear Mixed Models,in Linear Mixed Models

Summary Statistics. Produces tables for:

• Descriptive statistics. Displays the sample sizes, means, and standard deviations of the dependent variable and covariates (if specified). These statistics are displayed for each distinct level combination of the factors.

• Case Processing Summary. Displays the sorted values of the factors, the repeated measure variables, the repeated measure subjects, and the random-effects subjects and their frequencies.

Model Statistics. Produces tables for:

• Parameter estimates. Displays the fixed-effects and random-effects parameter estimates and their approximate standard errors.

• Tests for covariance parameters. Displays the asymptotic standard errors and Wald tests for the covariance parameters.

• Correlations of parameter estimates. Displays the asymptotic correlation matrix of the fixed-effects parameter estimates.

• Covariances of parameter estimates. Displays the asymptotic covariance matrix of the fixed-effects parameter estimates.

• Covariances of random effects. Displays the estimated covariance matrix of random effects. This option is available only when at least one random effect is specified. If a subject variable is specified for a random effect, then the common block is displayed.

• Covariances of residuals. Displays the estimated residual covariance matrix. This option is available only when a repeated variable has been specified. If a subject variable is specified, the common block is displayed.

• Contrast coefficient matrix. This option displays the estimable functions used for testing the fixed effects and the custom hypotheses.

Confidence interval. This value is used whenever a confidence interval is constructed. Specify a value greater than or equal to 0 and less than 100. The default value is 95.

Obtaining Statistics for Linear Mixed Models Collapse Hide details

This feature requires the Advanced Statistics option.

From the menus choose:

Analyze
Mixed Models
Linear...

Optionally, select subjects and repeated variables, and then click Continue.

In the Linear Mixed Models dialog box, click Statistics.

Select one or more statistics.

Optionally, you can change the level of confidence.

Related Topics

Linear Mixed Models
Linear Mixed Models Select Subjects/Repeated Variables
Linear Mixed Models Fixed Effects
Sum of Squares
Linear Mixed Models Random Effects
Linear Mixed Models Estimation
Linear Mixed Models EM Means
Linear Mixed Models Save


Linear Mixed Models EM Means

Linear Mixed Models,Linear Mixed Models,Linear Mixed Models
estimated marginal means,estimated marginal means,estimated marginal means
estimated marginal means,estimated marginal means,estimated marginal means
in Linear Mixed Models,in Linear Mixed Models,in Linear Mixed Models

Estimated Marginal Means of Fitted Models. This group allows you to request model-predicted estimated marginal means of the dependent variable in the cells and their standard errors for the specified factors. Moreover, you can request that factor levels of main effects be compared.

• Factor(s) and Factor Interactions. This list contains factors and factor interactions that have been specified in the Fixed dialog box, plus an OVERALL term. Model terms built from covariates are excluded from this list.

• Display Means for. The procedure will compute the estimated marginal means for factors and factor interactions selected to this list. If OVERALL is selected, the estimated marginal means of the dependent variable are displayed, collapsing over all factors. Note that any selected factors or factor interactions remain selected unless an associated variable has been removed from the Factors list in the main dialog box.

• Compare Main Effects. This option allows you to request pairwise comparisons of levels of selected main effects. The Confidence Interval Adjustment allows you to apply an adjustment to the confidence intervals and significance values to account for multiple comparisons. The available methods are LSD (no adjustment), Bonferroni, and Sidak. Finally, for each factor, you can select a reference category to which comparisons are made. If no reference category is selected, all pairwise comparisons will be constructed. The options for the reference category are first, last, or custom (in which case, you enter the value of the reference category).

Obtaining Estimated Marginal Means for Linear Mixed Models Collapse Hide details

This feature requires the Advanced Statistics option.

From the menus choose:

Analyze
Mixed Models
Linear...

Optionally, select subjects and repeated variables, and then click Continue.

In the Linear Mixed Models dialog box, click EM Means.

Specify the estimated marginal means that you want.

Related Topics

Linear Mixed Models
Linear Mixed Models Select Subjects/Repeated Variables
Linear Mixed Models Fixed Effects
Sum of Squares
Linear Mixed Models Random Effects
Linear Mixed Models Estimation
Linear Mixed Models Statistics
Linear Mixed Models Save


Linear Mixed Models Save

Linear Mixed Models,Linear Mixed Models,Linear Mixed Models
save variables,save variables,save variables
fixed predicted values,fixed predicted values,fixed predicted values
in Linear Mixed Models,in Linear Mixed Models,in Linear Mixed Models
predicted values,predicted values,predicted values
in Linear Mixed Models,in Linear Mixed Models,in Linear Mixed Models
residuals,residuals,residuals
in Linear Mixed Models,in Linear Mixed Models,in Linear Mixed Models

This dialog box allows you to save various model results to the working file.

Fixed Predicted Values. Saves variables related to the regression means without the effects.

• Predicted values. The regression means without the random effects.

• Standard errors. The standard errors of the estimates.

• Degrees of freedom. The degrees of freedom associated with the estimates.

Predicted Values & Residuals. Saves variables related to the model fitted value.

• Predicted values. The model fitted value.

• Standard errors. The standard errors of the estimates.

• Degrees of freedom. The degrees of freedom associated with the estimates.

• Residuals. The data value minus the predicted value.

Saving Results for Linear Mixed Models Collapse Hide details

This feature requires the Advanced Statistics option.

From the menus choose:

Analyze
Mixed Models
Linear...

Optionally, select subjects and repeated variables, and then click Continue.

In the Linear Mixed Models dialog box, click Save.

Select the values to save.

Related Topics

Linear Mixed Models
Linear Mixed Models Select Subjects/Repeated Variables
Linear Mixed Models Fixed Effects
Sum of Squares
Linear Mixed Models Random Effects
Linear Mixed Models Estimation
Linear Mixed Models Statistics
Linear Mixed Models EM Means


MIXED Command Additional Features

Linear Mixed Models,Linear Mixed Models,Linear Mixed Models
command additional features,command additional features,command additional features

The command syntax language also allows you to:

• Specify tests of effects versus a linear combination of effects or a value (using the TEST subcommand).

• Include user-missing values (using the MISSING subcommand).

• Compute estimated marginal means for specified values of covariates (using the WITH keyword of the EMMEANS subcommand).

• Compare simple main effects of interactions (using the EMMEANS subcommand).

Related Topics

UNIANOVA Command Additional Features
RELIABILITY Command Additional Features
ALSCAL Command Additional Features
HILOGLINEAR Command Additional Features
CSGLM Command Additional Features
CSLOGISTIC Command Additional Features
MVA Command Additional Features
LOGISTIC REGRESSION Command Additional Features
NOMREG Command Additional Features
PROBIT Command Additional Features
NLR Command Additional Features
WLS Command Additional Features
2SLS Command Additional Features
SEASON Command Additional Features
SPECTRA Command Additional Features
MIXED


Generalized Linear Models

Generalized Linear Models,Generalized Linear Models,Generalized Linear Models
Generalized Linear Models,Generalized Linear Models,Generalized Linear Models
model types,model types,model types
Generalized Linear Models,Generalized Linear Models,Generalized Linear Models
distribution,distribution,distribution
Generalized Linear Models,Generalized Linear Models,Generalized Linear Models
link function,link function,link function

The generalized linear model expands the general linear model so that the dependent variable is linearly related to the factors and covariates via a specified link function. Moreover, the model allows for the dependent variable to have a non-normal distribution. It covers widely used statistical models, such as linear regression for normally distributed responses, logistic models for binary data, loglinear models for count data, complementary log-log models for interval-censored survival data, plus many other statistical models through its very general model formulation.

Examples. A shipping company can use generalized linear models to fit a Poisson regression to damage counts for several types of ships constructed in different time periods, and the resulting model can help determine which ship types are most prone to damage. Show me

A car insurance company can use generalized linear models to fit a gamma regression to damage claims for cars, and the resulting model can help determine the factors that contribute the most to claim size. Show me

Medical researchers can use generalized linear models to fit a complementary log-log regression to interval-censored survival data to predict the time to recurrence for a medical condition. Show me

Generalized Linear Models Data Considerations Collapse Hide details

Data. The response can be scale, counts, binary, or events-in-trials. Factors are assumed to be categorical. The covariates, scale weight, and offset are assumed to be scale.

Assumptions. Cases are assumed to be independent observations.

To Obtain a Generalized Linear Model Collapse Hide details

To Obtain a Generalized Linear Model

This feature requires the Advanced Statistics option.

From the menus choose:

Analyze
Generalized Linear Models
Generalized Linear Models...

Specify a distribution and link function (see below for details on the various options).

On the Response tab, select a dependent variable.

On the Predictors tab, select factors and covariates for use in predicting the dependent variable.

On the Model tab, specify model effects using the selected factors and covariates.

The Type of Model tab allows you to specify the distribution and link function for your model, providing short cuts for several common models that are categorized by response type.

Model Types Collapse Hide details

Model Types

Scale Response.

• Linear. Specifies Normal as the distribution and Identity as the link function.

• Gamma with log link. Specifies Gamma as the distribution and Log as the link function.

Ordinal Response.

• Ordinal logistic. Specifies Multinomial (ordinal) as the distribution and Cumulative logit as the link function.

• Ordinal probit. Specifies Multinomial (ordinal) as the distribution and Cumulative probit as the link function.

Counts.

• Poisson loglinear. Specifies Poisson as the distribution and Log as the link function.

• Negative binomial with log link. Specifies Negative binomial (with a value of 1 for the ancillary parameter) as the distribution and Log as the link function. To have the procedure estimate the value of the ancillary parameter, specify a custom model with Negative binomial distribution and select Estimate value in the Parameter group.

Binary Response or Events/Trials Data.

• Binary logistic. Specifies Binomial as the distribution and Logit as the link function.

• Binary probit. Specifies Binomial as the distribution and Probit as the link function.

• Interval censored survival. Specifies Binomial as the distribution and Complementary log-log as the link function.

Mixture.

• Tweedie with log link. Specifies Tweedie as the distribution and Log as the link function.

• Tweedie with identity link. Specifies Tweedie as the distribution and Identity as the link function.

Custom. Specify your own combination of distribution and link function.

Distribution Collapse Hide details

Distribution

This selection specifies the distribution of the dependent variable. The ability to specify a non-normal distribution and non-identity link function is the essential improvement of the generalized linear model over the general linear model. There are many possible distribution-link function combinations, and several may be appropriate for any given dataset, so your choice can be guided by a priori theoretical considerations or which combination seems to fit best.

• Binomial. This distribution is appropriate only for variables that represent a binary response or number of events.

• Gamma. This distribution is appropriate for variables with positive scale values that are skewed toward larger positive values. If a data value is less than or equal to 0 or is missing, then the corresponding case is not used in the analysis.

• Inverse Gaussian. This distribution is appropriate for variables with positive scale values that are skewed toward larger positive values. If a data value is less than or equal to 0 or is missing, then the corresponding case is not used in the analysis.

• Negative binomial. This distribution can be thought of as the number of trials required to observe k successes and is appropriate for variables with non-negative integer values. If a data value is non-integer, less than 0, or missing, then the corresponding case is not used in the analysis. The value of the negative binomial distribution's ancillary parameter can be any number greater than or equal to 0; you can set it to a fixed value or allow it to be estimated by the procedure. When the ancillary parameter is set to 0, using this distribution is equivalent to using the Poisson distribution.

• Normal. This is appropriate for scale variables whose values take a symmetric, bell-shaped distribution about a central (mean) value. The dependent variable must be numeric.

• Poisson. This distribution can be thought of as the number of occurrences of an event of interest in a fixed period of time and is appropriate for variables with non-negative integer values. If a data value is non-integer, less than 0, or missing, then the corresponding case is not used in the analysis.

• Tweedie. This distribution is appropriate for variables that can be represented by Poisson mixtures of gamma distributions; the distribution is "mixed" in the sense that it combines properties of continuous (takes non-negative real values) and discrete distributions (positive probability mass at a single value, 0). The dependent variable must be numeric, with data values greater than or equal to zero. If a data value is less than zero or missing, then the corresponding case is not used in the analysis. The fixed value of the Tweedie distribution's parameter can be any number greater than one and less than two.

• Multinomial. This distribution is appropriate for variables that represent an ordinal response. The dependent variable can be numeric or string, and it must have at least two distinct valid data values.

Link Functions Collapse Hide details

Link Functions

The link function is a transformation of the dependent variable that allows estimation of the model. The following functions are available:

• Identity. f(x)=x. The dependent variable is not transformed. This link can be used with any distribution.

• Complementary log-log. f(x)=log(−log(1−x)). This is appropriate only with the binomial distribution.

• Cumulative Cauchit. f(x) = tan(π (x – 0.5)), applied to the cumulative probability of each category of the response. This is appropriate only with the multinomial distribution.

• Cumulative complementary log-log. f(x)=ln(−ln(1−x)), applied to the cumulative probability of each category of the response. This is appropriate only with the multinomial distribution.

• Cumulative logit. f(x)=ln(x / (1−x)), applied to the cumulative probability of each category of the response. This is appropriate only with the multinomial distribution.

• Cumulative negative log-log. f(x)=−ln(−ln(x)), applied to the cumulative probability of each category of the response. This is appropriate only with the multinomial distribution.

• Cumulative probit. f(x)=Φ−1(x), applied to the cumulative probability of each category of the response, where Φ−1 is the inverse standard normal cumulative distribution function. This is appropriate only with the multinomial distribution.

• Log. f(x)=log(x). This link can be used with any distribution.

• Log complement. f(x)=log(1−x). This is appropriate only with the binomial distribution.

• Logit. f(x)=log(x / (1−x)). This is appropriate only with the binomial distribution.

• Negative binomial. f(x)=log(x / (x+k−1)), where k is the ancillary parameter of the negative binomial distribution. This is appropriate only with the negative binomial distribution.

• Negative log-log. f(x)=−log(−log(x)). This is appropriate only with the binomial distribution.

• Odds power. f(x)=[(x/(1−x))α−1]/α, if α ≠ 0. f(x)=log(x), if α=0. α is the required number specification and must be a real number. This is appropriate only with the binomial distribution.

• Probit. f(x)=Φ−1(x), where Φ−1 is the inverse standard normal cumulative distribution function. This is appropriate only with the binomial distribution.

• Power. f(x)=xα, if α ≠ 0. f(x)=log(x), if α=0. α is the required number specification and must be a real number. This link can be used with any distribution.

This procedure pastes GENLIN command syntax.

See GENLIN Algorithms for computational details for this procedure.

Related Topics

Generalized Linear Models Response
Generalized Linear Models Predictors
Generalized Linear Models Model
Generalized Linear Models Estimation
Generalized Linear Models Statistics
Generalized Linear Models EM Means
Generalized Linear Models Save
Generalized Linear Models Export
GENLIN Command Additional Features
GENLIN


Generalized Linear Models Response

Generalized Linear Models,Generalized Linear Models,Generalized Linear Models
response,response,response

In many cases, you can simply specify a dependent variable; however, variables that take only two values and responses that record events in trials require extra attention.

• Binary response. When the dependent variable takes only two values, you can specify the reference category for parameter estimation. A binary response variable can be string or numeric.

• Number of events occurring in a set of trials. When the response is a number of events occurring in a set of trials, the dependent variable contains the number of events and you can select an additional variable containing the number of trials. Alternatively, if the number of trials is the same across all subjects, then trials may be specified using a fixed value. The number of trials should be greater than or equal to the number of events for each case. Events should be non-negative integers, and trials should be positive integers.

For ordinal multinomial models, you can specify the category order of the response: ascending, descending, or data (data order means that the first value encountered in the data defines the first category, the last value encountered defines the last category).

Scale Weight. The scale parameter is an estimated model parameter related to the variance of the response. The scale weights are "known" values that can vary from observation to observation. If the scale weight variable is specified, the scale parameter, which is related to the variance of the response, is divided by it for each observation. Cases with scale weight values that are less than or equal to 0 or are missing are not used in the analysis.

How To Select Predictors for Generalized Linear Models Collapse Hide details

This feature requires the Advanced Statistics option.

From the menus choose:

Analyze
Generalized Linear Models
Generalized Linear Models...

In the Generalized Linear Models dialog box, click Predictors.

Related Topics

Generalized Linear Models
Generalized Linear Models Predictors
Generalized Linear Models Model
Generalized Linear Models Estimation
Generalized Linear Models Statistics
Generalized Linear Models EM Means
Generalized Linear Models Save
Generalized Linear Models Export
GENLIN Command Additional Features


Generalized Linear Models Predictors

Generalized Linear Models,Generalized Linear Models,Generalized Linear Models
predictors,predictors,predictors

The Predictors tab allows you to specify the factors and covariates used to build model effects and to specify an optional offset.

Factors. Factors are categorical predictors; they can be numeric or string.

Covariates. Covariates are scale predictors; they must be numeric.

Note: When the response is binomial with binary format, the procedure computes deviance and chi-square goodness-of-fit statistics by subpopulations that are based on the cross-classification of observed values of the selected factors and covariates. You should keep the same set of predictors across multiple runs of the procedure to ensure a consistent number of subpopulations.

Offset. The offset term is a "structural" predictor. Its coefficient is not estimated by the model but is assumed to have the value 1; thus, the values of the offset are simply added to the linear predictor of the dependent variable. This is especially useful in Poisson regression models, where each case may have different levels of exposure to the event of interest. For example, when modeling accident rates for individual drivers, there is an important difference between a driver who has been at fault in one accident in three years of experience and a driver who has been at fault in one accident in 25 years! The number of accidents can be modeled as a Poisson response if the experience of the driver is included as an offset term.

How To Select Predictors for Generalized Linear Models Collapse Hide details

This feature requires the Advanced Statistics option.

From the menus choose:

Analyze
Generalized Linear Models
Generalized Linear Models...

In the Generalized Linear Models dialog box, click Predictors.

Related Topics

Generalized Linear Models
Generalized Linear Models Response
Generalized Linear Models Model
Generalized Linear Models Estimation
Generalized Linear Models Statistics
Generalized Linear Models EM Means
Generalized Linear Models Save
Generalized Linear Models Export
GENLIN Command Additional Features


Generalized Linear Models Model

nested terms,nested terms,nested terms
in Generalized Linear Models,in Generalized Linear Models,in Generalized Linear Models
Generalized Linear Models,Generalized Linear Models,Generalized Linear Models
model specification,model specification,model specification

Specify Model Effects. The default model is intercept-only, so you must explicitly specify other model effects. Alternatively, you can build nested or non-nested terms.

Non-Nested Terms

For the selected factors and covariates:

Main effects. Creates a main-effects term for each variable selected.

Interaction. Creates the highest-level interaction term for all selected variables.

Factorial. Creates all possible interactions and main effects of the selected variables.

All 2-way. Creates all possible two-way interactions of the selected variables.

All 3-way. Creates all possible three-way interactions of the selected variables.

All 4-way. Creates all possible four-way interactions of the selected variables.

All 5-way. Creates all possible five-way interactions of the selected variables.

Specifying Non-Nested Terms Collapse Hide details

This feature requires the Advanced Statistics option.

From the menus choose:

Analyze
Generalized Linear Models
Generalized Linear Models...

In the Predictors tab, select factors and covariates and click Model.

Select one or more factors or covariates or a combination of factors and covariates.

Select a method for building the terms from the Type drop-down list and add them to the model.

Repeat the process until you have all of the terms that you want in the model.

Nested Terms

You can build nested terms for your model in this procedure. Nested terms are useful for modeling the effect of a factor or covariate whose values do not interact with the levels of another factor. For example, a grocery store chain may follow the spending habits of its customers at several store locations. Since each customer frequents only one of these locations, the Customer effect can be said to be nested within the Store location effect.

Additionally, you can include interaction effects, such as polynomial terms involving the same covariate, or add multiple levels of nesting to the nested term.

Limitations. Nested terms have the following restrictions:

• All factors within an interaction must be unique. Thus, if A is a factor, then specifying A*A is invalid.

• All factors within a nested effect must be unique. Thus, if A is a factor, then specifying A(A) is invalid.

• No effect can be nested within a covariate. Thus, if A is a factor and X is a covariate, then specifying A(X) is invalid.

Specifying Nested Terms Collapse Hide details

From the menus choose:

Analyze
Generalized Linear Models
Generalized Linear Models...

On the Predictors tab, select factors and covariates and click Model.

Select a factor or covariate that is nested within another factor, and then click the move button.

Click Nesting.

Select the factor within which the previous factor or covariate is nested, and then click the move button.

Click Add to Model.

Optionally, you can include interaction effects or add multiple levels of nesting to the nested term.

Intercept. The intercept is usually included in the model. If you can assume the data pass through the origin, you can exclude the intercept.

Models with the multinomial ordinal distribution do not have a single intercept term; instead there are threshold parameters that define transition points between adjacent categories. The thresholds are always included in the model.

Related Topics

Generalized Linear Models
Generalized Linear Models Response
Generalized Linear Models Predictors
Generalized Linear Models Estimation
Generalized Linear Models Statistics
Generalized Linear Models EM Means
Generalized Linear Models Save
Generalized Linear Models Export
GENLIN Command Additional Features


Generalized Linear Models Estimation

Generalized Linear Models,Generalized Linear Models,Generalized Linear Models
estimation criteria,estimation criteria,estimation criteria
parameter convergence,parameter convergence,parameter convergence
in Generalized Linear Models,in Generalized Linear Models,in Generalized Linear Models
Hessian convergence,Hessian convergence,Hessian convergence
in Generalized Linear Models,in Generalized Linear Models,in Generalized Linear Models
log-likelihood convergence,log-likelihood convergence,log-likelihood convergence
in Generalized Linear Models,in Generalized Linear Models,in Generalized Linear Models
separation,separation,separation
in Generalized Linear Models,in Generalized Linear Models,in Generalized Linear Models
iterations,iterations,iterations
in Generalized Linear Models,in Generalized Linear Models,in Generalized Linear Models
covariance matrix,covariance matrix,covariance matrix
in Generalized Linear Models,in Generalized Linear Models,in Generalized Linear Models
scale parameter,scale parameter,scale parameter
in Generalized Linear Models,in Generalized Linear Models,in Generalized Linear Models
step-halving,step-halving,step-halving
in Generalized Linear Models,in Generalized Linear Models,in Generalized Linear Models

Parameter Estimation. The controls in this group allow you to specify estimation methods and to provide initial values for the parameter estimates.

• Method. You can select a parameter estimation method. Choose between Newton-Raphson, Fisher scoring, or a hybrid method in which Fisher scoring iterations are performed before switching to the Newton-Raphson method. If convergence is achieved during the Fisher scoring phase of the hybrid method before the maximum number of Fisher iterations is reached, the algorithm continues with the Newton-Raphson method.

• Scale parameter method. You can select the scale parameter estimation method. Maximum-likelihood jointly estimates the scale parameter with the model effects; note that this option is not valid if the response has a negative binomial, Poisson, binomial, or multinomial distribution. The deviance and Pearson chi-square options estimate the scale parameter from the value of those statistics. Alternatively, you can specify a fixed value for the scale parameter.

• Initial values. The procedure will automatically compute initial values for parameters. Alternatively, you can specify initial values for the parameter estimates.

• Covariance matrix. The model-based estimator is the negative of the generalized inverse of the Hessian matrix. The robust (also called the Huber/White/sandwich) estimator is a "corrected" model-based estimator that provides a consistent estimate of the covariance, even when the specification of the variance and link functions is incorrect.

Iterations.

• Maximum iterations. The maximum number of iterations the algorithm will execute. Specify a non-negative integer.

• Maximum step-halving. At each iteration, the step size is reduced by a factor of 0.5 until the log-likelihood increases or maximum step-halving is reached. Specify a positive integer.

• Check for separation of data points. When selected, the algorithm performs tests to ensure that the parameter estimates have unique values. Separation occurs when the procedure can produce a model that correctly classifies every case. This option is available for multinomial responses and binomial responses with binary format.

Convergence Criteria.

• Parameter convergence. When selected, the algorithm stops after an iteration in which the absolute or relative change in the parameter estimates is less than the value specified, which must be positive.

• Log-likelihood convergence. When selected, the algorithm stops after an iteration in which the absolute or relative change in the log-likelihood function is less than the value specified, which must be positive.

• Hessian convergence. For the Absolute specification, convergence is assumed if a statistic based on the Hessian convergence is less than the positive value specified. For the Relative specification, convergence is assumed if the statistic is less than the product of the positive value specified and the absolute value of the log-likelihood.

Singularity tolerance. Singular (or non-invertible) matrices have linearly dependent columns, which can cause serious problems for the estimation algorithm. Even near-singular matrices can lead to poor results, so the procedure will treat a matrix whose determinant is less than the tolerance as singular. Specify a positive value.

How To Specify Estimation Settings for Generalized Linear Models Collapse Hide details

This feature requires the Advanced Statistics option.

From the menus choose:

Analyze
Generalized Linear Models
Generalized Linear Models...

In the Generalized Linear Models dialog box, click Estimation.

Related Topics

Generalized Linear Models
Generalized Linear Models Response
Generalized Linear Models Predictors
Generalized Linear Models Model
Generalized Linear Models Statistics
Generalized Linear Models EM Means
Generalized Linear Models Save
Generalized Linear Models Export
GENLIN Command Additional Features


Generalized Linear Models Statistics

Generalized Linear Models,Generalized Linear Models,Generalized Linear Models
statistics,statistics,statistics

Model Effects.

• Analysis type. Specify the type of analysis to produce. Type I analysis is generally appropriate when you have a priori reasons for ordering predictors in the model, while Type III is more generally applicable. Wald or likelihood-ratio statistics are computed based upon the selection in the Chi-Square Statistics group.

• Confidence intervals. Specify a confidence level greater than 50 and less than 100. Wald intervals are based on the assumption that parameters have an asymptotic normal distribution; profile likelihood intervals are more accurate but can be computationally expensive. The tolerance level for profile likelihood intervals is the criteria used to stop the iterative algorithm used to compute the intervals.

• Log-likelihood function. This controls the display format of the log-likelihood function. The full function includes an additional term that is constant with respect to the parameter estimates; it has no effect on parameter estimation and is left out of the display in some software products.

case processing summary,case processing summary,case processing summary
in Generalized Linear Models,in Generalized Linear Models,in Generalized Linear Models
descriptive statistics,descriptive statistics,descriptive statistics
in Generalized Linear Models,in Generalized Linear Models,in Generalized Linear Models
model information,model information,model information
in Generalized Linear Models,in Generalized Linear Models,in Generalized Linear Models
goodness of fit,goodness of fit,goodness of fit
in Generalized Linear Models,in Generalized Linear Models,in Generalized Linear Models
parameter estimates,parameter estimates,parameter estimates
in Generalized Linear Models,in Generalized Linear Models,in Generalized Linear Models
covariance matrix,covariance matrix,covariance matrix
in Generalized Linear Models,in Generalized Linear Models,in Generalized Linear Models
correlation matrix,correlation matrix,correlation matrix
in Generalized Linear Models,in Generalized Linear Models,in Generalized Linear Models
contrast coefficients matrix,contrast coefficients matrix,contrast coefficients matrix
in Generalized Linear Models,in Generalized Linear Models,in Generalized Linear Models
L matrix,L matrix,L matrix
in Generalized Linear Models,in Generalized Linear Models,in Generalized Linear Models
general estimable function,general estimable function,general estimable function
in Generalized Linear Models,in Generalized Linear Models,in Generalized Linear Models
iteration history,iteration history,iteration history
in Generalized Linear Models,in Generalized Linear Models,in Generalized Linear Models

Print. The following output is available:

• Case processing summary. Displays the number and percentage of cases included and excluded from the analysis and the Correlated Data Summary table.

• Descriptive statistics. Displays descriptive statistics and summary information about the dependent variable, covariates, and factors.

• Model information. Displays the dataset name, dependent variable or events and trials variables, offset variable, scale weight variable, probability distribution, and link function.

• Goodness of fit statistics. Displays deviance and scaled deviance, Pearson chi-square and scaled Pearson chi-square, log-likelihood, Akaike's information criterion (AIC), finite sample corrected AIC (AICC), Bayesian information criterion (BIC), and consistent AIC (CAIC).

• Model summary statistics. Displays model fit tests, including likelihood-ratio statistics for the model fit omnibus test and statistics for the Type I or III contrasts for each effect.

• Parameter estimates. Displays parameter estimates and corresponding test statistics and confidence intervals. You can optionally display exponentiated parameter estimates in addition to the raw parameter estimates.

• Covariance matrix for parameter estimates. Displays the estimated parameter covariance matrix.

• Correlation matrix for parameter estimates. Displays the estimated parameter correlation matrix.

• Contrast coefficient (L) matrices. Displays contrast coefficients for the default effects and for the estimated marginal means, if requested on the EM Means tab.

• General estimable functions. Displays the matrices for generating the contrast coefficient (L) matrices.

• Iteration history. Displays the iteration history for the parameter estimates and log-likelihood and prints the last evaluation of the gradient vector and the Hessian matrix. The iteration history table displays parameter estimates for every nth iterations beginning with the 0th iteration (the initial estimates), where n is the value of the print interval. If the iteration history is requested, then the last iteration is always displayed regardless of n.

Lagrange multiplier test,Lagrange multiplier test,Lagrange multiplier test
in Generalized Linear Models,in Generalized Linear Models,in Generalized Linear Models

• Lagrange multiplier test. Displays Lagrange multiplier test statistics for assessing the validity of a scale parameter that is computed using the deviance or Pearson chi-square, or set at a fixed number, for the normal, gamma, inverse Gaussian, and Tweedie distributions. For the negative binomial distribution, this tests the fixed ancillary parameter.

How To Specify Statistics for Generalized Linear Models Collapse Hide details

This feature requires the Advanced Statistics option.

From the menus choose:

Analyze
Generalized Linear Models
Generalized Linear Models...

In the Generalized Linear Models dialog box, click Statistics.

Related Topics

Generalized Linear Models
Generalized Linear Models Response
Generalized Linear Models Predictors
Generalized Linear Models Model
Generalized Linear Models Estimation
Generalized Linear Models EM Means
Generalized Linear Models Save
Generalized Linear Models Export
GENLIN Command Additional Features


Generalized Linear Models EM Means

Generalized Linear Models,Generalized Linear Models,Generalized Linear Models
estimated marginal means,estimated marginal means,estimated marginal means
estimated marginal means,estimated marginal means,estimated marginal means
in Generalized Linear Models,in Generalized Linear Models,in Generalized Linear Models

This tab allows you to display the estimated marginal means for levels of factors and factor interactions. You can also request that the overall estimated mean be displayed. Estimated marginal means are not available for ordinal multinomial models.

Factors and Interactions. This list contains factors specified on the Predictors tab and factor interactions specified on the Model tab. Covariates are excluded from this list. Terms can be selected directly from this list or combined into an interaction term using the By * button.

Display Means For. Estimated means are computed for the selected factors and factor interactions. The contrast determines how hypothesis tests are set up to compare the estimated means. The simple contrast requires a reference category or factor level against which the others are compared.

• Pairwise. Pairwise comparisons are computed for all-level combinations of the specified or implied factors. This is the only available contrast for factor interactions.

• Simple. Compares the mean of each level to the mean of a specified level. This type of contrast is useful when there is a control group.

• Deviation. Each level of the factor is compared to the grand mean. Deviation contrasts are not orthogonal.

• Difference. Compares the mean of each level (except the first) to the mean of previous levels. They are sometimes called reverse Helmert contrasts.

• Helmert. Compares the mean of each level of the factor (except the last) to the mean of subsequent levels.

• Repeated. Compares the mean of each level (except the last) to the mean of the subsequent level.

• Polynomial. Compares the linear effect, quadratic effect, cubic effect, and so on. The first degree of freedom contains the linear effect across all categories; the second degree of freedom, the quadratic effect; and so on. These contrasts are often used to estimate polynomial trends.

Scale. Estimated marginal means can be computed for the response, based on the original scale of the dependent variable, or for the linear predictor, based on the dependent variable as transformed by the link function.

Adjustment for Multiple Comparisons. When performing hypothesis tests with multiple contrasts, the overall significance level can be adjusted from the significance levels for the included contrasts. This group allows you to choose the adjustment method.

• Least significant difference. This method does not control the overall probability of rejecting the hypotheses that some linear contrasts are different from the null hypothesis values.

• Bonferroni. This method adjusts the observed significance level for the fact that multiple contrasts are being tested.

• Sequential Bonferroni. This is a sequentially step-down rejective Bonferroni procedure that is much less conservative in terms of rejecting individual hypotheses but maintains the same overall significance level.

• Sidak. This method provides tighter bounds than the Bonferroni approach.

• Sequential Sidak. This is a sequentially step-down rejective Sidak procedure that is much less conservative in terms of rejecting individual hypotheses but maintains the same overall significance level.

How To Specify EM Means for Generalized Linear Models Collapse Hide details

This feature requires the Advanced Statistics option.

From the menus choose:

Analyze
Generalized Linear Models
Generalized Linear Models...

In the Generalized Linear Models dialog box, click EM Means.

Related Topics

Generalized Linear Models
Generalized Linear Models Response
Generalized Linear Models Predictors
Generalized Linear Models Model
Generalized Linear Models Estimation
Generalized Linear Models Statistics
Generalized Linear Models Save
Generalized Linear Models Export
GENLIN Command Additional Features


Generalized Linear Models Save

Generalized Linear Models,Generalized Linear Models,Generalized Linear Models
save variables to active dataset,save variables to active dataset,save variables to active dataset

Checked items are saved with the specified name; you can choose to overwrite existing variables with the same name as the new variables or avoid name conflicts by appendix suffixes to make the new variable names unique. See the topic Variable Names for more information.

• Predicted value of mean of response. Saves model-predicted values for each case in the original response metric. When the response distribution is binomial and the dependent variable is binary, the procedure saves predicted probabilities. When the response distribution is multinomial, the item label becomes Cumulative predicted probability, and the procedure saves the cumulative predicted probability for each category of the response, except the last, up to the number of specified categories to save.

• Lower bound of confidence interval for mean of response. Saves the lower bound of the confidence interval for the mean of the response. When the response distribution is multinomial, the item label becomes Lower bound of confidence interval for cumulative predicted probability, and the procedure saves the lower bound for each category of the response, except the last, up to the number of specified categories to save.

• Upper bound of confidence interval for mean of response. Saves the upper bound of the confidence interval for the mean of the response. When the response distribution is multinomial, the item label becomes Upper bound of confidence interval for cumulative predicted probability, and the procedure saves the upper bound for each category of the response, except the last, up to the number of specified categories to save.

• Predicted category. For models with binomial distribution and binary dependent variable, or multinomial distribution, this saves the predicted response category for each case. This option is not available for other response distributions.

• Predicted value of linear predictor. Saves model-predicted values for each case in the metric of the linear predictor (transformed response via the specified link function). When the response distribution is multinomial, the procedure saves the predicted value for each category of the response, except the last, up to the number of specified categories to save.

• Estimated standard error of predicted value of linear predictor. When the response distribution is multinomial, the procedure saves the estimated standard error for each category of the response, except the last, up to the number of specified categories to save.

The following items are not available when the response distribution is multinomial.

Cook's distance,Cook's distance,Cook's distance
in Generalized Linear Models,in Generalized Linear Models,in Generalized Linear Models

• Cook's distance. A measure of how much the residuals of all cases would change if a particular case were excluded from the calculation of the regression coefficients. A large Cook's D indicates that excluding a case from computation of the regression statistics changes the coefficients substantially.

leverage values,leverage values,leverage values
in Generalized Linear Models,in Generalized Linear Models,in Generalized Linear Models

• Leverage value. Measures the influence of a point on the fit of the regression. The centered leverage ranges from 0 (no influence on the fit) to (N-1)/N.

residuals,residuals,residuals
in Generalized Linear Models,in Generalized Linear Models,in Generalized Linear Models

• Raw residual. The difference between an observed value and the value predicted by the model.

Pearson residuals,Pearson residuals,Pearson residuals
in Generalized Linear Models,in Generalized Linear Models,in Generalized Linear Models

• Pearson residual. The square root of the contribution of a case to the Pearson chi-square statistic, with the sign of the raw residual.

• Standardized Pearson residual. The Pearson residual multiplied by the square root of the inverse of the product of the scale parameter and 1−leverage for the case.

deviance residuals,deviance residuals,deviance residuals
in Generalized Linear Models,in Generalized Linear Models,in Generalized Linear Models

• Deviance residual. The square root of the contribution of a case to the Deviance statistic, with the sign of the raw residual.

• Standardized deviance residual. The Deviance residual multiplied by the square root of the inverse of the product of the scale parameter and 1−leverage for the case.

likelihood residuals,likelihood residuals,likelihood residuals
in Generalized Linear Models,in Generalized Linear Models,in Generalized Linear Models

• Likelihood residual. The square root of a weighted average (based on the leverage of the case) of the squares of the standardized Pearson and standardized Deviance residuals, with the sign of the raw residual.

How To Save Variables to the Active Dataset for Generalized Linear Models Collapse Hide details

This feature requires the Advanced Statistics option.

From the menus choose:

Analyze
Generalized Linear Models
Generalized Linear Models...

In the Generalized Linear Models dialog box, click Save.

Related Topics

Generalized Linear Models
Generalized Linear Models Response
Generalized Linear Models Predictors
Generalized Linear Models Model
Generalized Linear Models Estimation
Generalized Linear Models Statistics
Generalized Linear Models EM Means
Generalized Linear Models Export
GENLIN Command Additional Features


Generalized Linear Models Export

Generalized Linear Models,Generalized Linear Models,Generalized Linear Models
model export,model export,model export

Export model as data. Writes a dataset in PASW Statistics format containing the parameter correlation or covariance matrix with parameter estimates, standard errors, significance values, and degrees of freedom. The order of variables in the matrix file is as follows.

• Split variables. If used, any variables defining splits.

• RowType_. Takes values (and value labels) COV (covariances), CORR (correlations), EST (parameter estimates), SE (standard errors), SIG (significance levels), and DF (sampling design degrees of freedom). There is a separate case with row type COV (or CORR) for each model parameter, plus a separate case for each of the other row types.

• VarName_. Takes values P1, P2, ..., corresponding to an ordered list of all estimated model parameters (except the scale or negative binomial parameters), for row types COV or CORR, with value labels corresponding to the parameter strings shown in the Parameter estimates table. The cells are blank for other row types.

• P1, P2, ... These variables correspond to an ordered list of all model parameters (including the scale and negative binomial parameters, as appropriate), with variable labels corresponding to the parameter strings shown in the Parameter estimates table, and take values according to the row type.

For redundant parameters, all covariances are set to zero, correlations are set to the system-missing value; all parameter estimates are set at zero; and all standard errors, significance levels, and residual degrees of freedom are set to the system-missing value.

For the scale parameter, covariances, correlations, significance level and degrees of freedom are set to the system-missing value. If the scale parameter is estimated via maximum likelihood, the standard error is given; otherwise it is set to the system-missing value.

For the negative binomial parameter, covariances, correlations, significance level and degrees of freedom are set to the system-missing value. If the negative binomial parameter is estimated via maximum likelihood, the standard error is given; otherwise it is set to the system-missing value.

If there are splits, then the list of parameters must be accumulated across all splits. In a given split, some parameters may be irrelevant; this is not the same as redundant. For irrelevant parameters, all covariances or correlations, parameter estimates, standard errors, significance levels, and degrees of freedom are set to the system-missing value.

You can use this matrix file as the initial values for further model estimation; note that this file is not immediately usable for further analyses in other procedures that read a matrix file unless those procedures accept all the row types exported here. Even then, you should take care that all parameters in this matrix file have the same meaning for the procedure reading the file.

Export model as XML. Saves the parameter estimates and the parameter covariance matrix, if selected, in XML (PMML) format. SmartScore and PASW Statistics Server (a separate product) can use this model file to apply the model information to other data files for scoring purposes.

How To Save Model Output for Generalized Linear Models Collapse Hide details

This feature requires the Advanced Statistics option.

From the menus choose:

Analyze
Generalized Linear Models
Generalized Linear Models...

In the Generalized Linear Models dialog box, click Export.

Related Topics

Generalized Linear Models
Generalized Linear Models Response
Generalized Linear Models Predictors
Generalized Linear Models Model
Generalized Linear Models Estimation
Generalized Linear Models Statistics
Generalized Linear Models EM Means
Generalized Linear Models Save
GENLIN Command Additional Features


GENLIN Command Additional Features

The command syntax language also allows you to:

• Specify initial values for parameter estimates as a list of numbers (using the CRITERIA subcommand).

• Fix covariates at values other than their means when computing estimated marginal means (using the EMMEANS subcommand).

• Specify custom polynomial contrasts for estimated marginal means (using the EMMEANS subcommand).

• Specify a subset of the factors for which estimated marginal means are displayed to be compared using the specified contrast type (using the TABLES and COMPARE keywords of the EMMEANS subcommand).

Related Topics

Generalized Linear Models
Generalized Linear Models Response
Generalized Linear Models Predictors
Generalized Linear Models Model
Generalized Linear Models Estimation
Generalized Linear Models Statistics
Generalized Linear Models EM Means
Generalized Linear Models Save
Generalized Linear Models Export
GENLIN


Generalized Estimating Equations

Generalized Estimating Equations,Generalized Estimating Equations,Generalized Estimating Equations

The Generalized Estimating Equations procedure extends the generalized linear model to allow for analysis of repeated measurements or other correlated observations, such as clustered data.

Example. Public health officials can use generalized estimating equations to fit a repeated measures logistic regression to study effects of air pollution on children. Show me

Generalized Estimating Equations Data Considerations Collapse Hide details

Data. The response can be scale, counts, binary, or events-in-trials. Factors are assumed to be categorical. The covariates, scale weight, and offset are assumed to be scale. Variables used to define subjects or within-subject repeated measurements cannot be used to define the response but can serve other roles in the model.

Assumptions. Cases are assumed to be dependent within subjects and independent between subjects. The correlation matrix that represents the within-subject dependencies is estimated as part of the model.

Obtaining Generalized Estimating Equations Collapse Hide details

Obtaining Generalized Estimating Equations

This feature requires the Advanced Statistics option.

From the menus choose:

Analyze
Generalized Linear Models
Generalized Estimating Equations...

Select one or more subject variables (see below for further options).

The combination of values of the specified variables should uniquely define subjects within the dataset. For example, a single Patient ID variable should be sufficient to define subjects in a single hospital, but the combination of Hospital ID and Patient ID may be necessary if patient identification numbers are not unique across hospitals. In a repeated measures setting, multiple observations are recorded for each subject, so each subject may occupy multiple cases in the dataset.

On the Type of Model tab, specify a distribution and link function.

On the Response tab, select a dependent variable.

On the Predictors tab, select factors and covariates for use in predicting the dependent variable.

On the Model tab, specify model effects using the selected factors and covariates.

Optionally, on the Repeated tab you can specify:

Within-subject variables. The combination of values of the within-subject variables defines the ordering of measurements within subjects; thus, the combination of within-subject and subject variables uniquely defines each measurement. For example, the combination of Period, Hospital ID, and Patient ID defines, for each case, a particular office visit for a particular patient within a particular hospital.

If the dataset is already sorted so that each subject's repeated measurements occur in a contiguous block of cases and in the proper order, it is not strictly necessary to specify a within-subjects variable, and you can deselect Sort cases by subject and within-subject variables and save the processing time required to perform the (temporary) sort. Generally, it's a good idea to make use of within-subject variables to ensure proper ordering of measurements.

Subject and within-subject variables cannot be used to define the response, but they can perform other functions in the model. For example, Hospital ID could be used as a factor in the model.

Covariance Matrix. The model-based estimator is the negative of the generalized inverse of the Hessian matrix. The robust estimator (also called the Huber/White/sandwich estimator) is a "corrected" model-based estimator that provides a consistent estimate of the covariance, even when the working correlation matrix is misspecified. This specification applies to the parameters in the linear model part of the generalized estimating equations, while the specification on the Estimation tab applies only to the initial generalized linear model.

Working Correlation Matrix. This correlation matrix represents the within-subject dependencies. Its size is determined by the number of measurements and thus the combination of values of within-subject variables. You can specify one of the following structures:

• Independent. Repeated measurements are uncorrelated.

• AR(1). Repeated measurements have a first-order autoregressive relationship. The correlation between any two elements is equal to r for adjacent elements, r2 for elements that are separated by a third, and so on. r is constrained so that –1<r<1.

• Exchangeable. This structure has homogenous correlations between elements. It is also known as a compound symmetry structure.

• M-dependent. Consecutive measurements have a common correlation coefficient, pairs of measurements separated by a third have a common correlation coefficient, and so on, through pairs of measurements separated by m−1 other measurements. Measurements with greater separation are assumed to be uncorrelated. When choosing this structure, specify a value of m less than the order of the working correlation matrix.

• Unstructured. This is a completely general correlation matrix.

By default, the procedure will adjust the correlation estimates by the number of nonredundant parameters. Removing this adjustment may be desirable if you want the estimates to be invariant to subject-level replication changes in the data.

• Maximum iterations. The maximum number of iterations the generalized estimating equations algorithm will execute. Specify a non-negative integer. This specification applies to the parameters in the linear model part of the generalized estimating equations, while the specification on the Estimation tab applies only to the initial generalized linear model.

• Update matrix. Elements in the working correlation matrix are estimated based on the parameter estimates, which are updated in each iteration of the algorithm. If the working correlation matrix is not updated at all, the initial working correlation matrix is used throughout the estimation process. If the matrix is updated, you can specify the iteration interval at which to update working correlation matrix elements. Specifying a value greater than 1 may reduce processing time.

Convergence criteria. These specifications apply to the parameters in the linear model part of the generalized estimating equations, while the specification on the Estimation tab applies only to the initial generalized linear model.

• Parameter convergence. When selected, the algorithm stops after an iteration in which the absolute or relative change in the parameter estimates is less than the value specified, which must be positive.

• Hessian convergence. Convergence is assumed if a statistic based on the Hessian is less than the value specified, which must be positive.

This procedure pastes GENLIN command syntax.

See GENLIN Algorithms for computational details for this procedure.

Related Topics

Generalized Estimating Equations Type of Model
Generalized Estimating Equations Response
Generalized Estimating Equations Predictors
Generalized Estimating Equations Model
Generalized Estimating Equations Estimation
Generalized Estimating Equations Statistics
Generalized Estimating Equations EM Means
Generalized Estimating Equations Save
Generalized Estimating Equations Export
GENLIN Command Additional Features
GENLIN


Generalized Estimating Equations Type of Model

Generalized Estimating Equations,Generalized Estimating Equations,Generalized Estimating Equations
type of model,type of model,type of model

The Type of Model tab allows you to specify the distribution and link function for your model, providing shortcuts for several common models that are categorized by response type.

Model Types Collapse Hide details

Model Types

Scale Response.

• Linear. Specifies Normal as the distribution and Identity as the link function.

• Gamma with log link. Specifies Gamma as the distribution and Log as the link function.

Ordinal Response.

• Ordinal logistic. Specifies Multinomial (ordinal) as the distribution and Cumulative logit as the link function.

• Ordinal probit. Specifies Multinomial (ordinal) as the distribution and Cumulative probit as the link function.

Counts.

• Poisson loglinear. Specifies Poisson as the distribution and Log as the link function.

• Negative binomial with log link. Specifies Negative binomial (with a value of 1 for the ancillary parameter) as the distribution and Log as the link function. To have the procedure estimate the value of the ancillary parameter, specify a custom model with Negative binomial distribution and select Estimate value in the Parameter group.

Binary Response or Events/Trials Data.

• Binary logistic. Specifies Binomial as the distribution and Logit as the link function.

• Binary probit. Specifies Binomial as the distribution and Probit as the link function.

• Interval censored survival. Specifies Binomial as the distribution and Complementary log-log as the link function.

Mixture.

• Tweedie with log link. Specifies Tweedie as the distribution and Log as the link function.

• Tweedie with identity link. Specifies Tweedie as the distribution and Identity as the link function.

Custom. Specify your own combination of distribution and link function.

Distribution Collapse Hide details

Distribution

This selection specifies the distribution of the dependent variable. The ability to specify a non-normal distribution and non-identity link function is the essential improvement of the generalized linear model over the general linear model. There are many possible distribution-link function combinations, and several may be appropriate for any given dataset, so your choice can be guided by a priori theoretical considerations or which combination seems to fit best.

• Binomial. This distribution is appropriate only for variables that represent a binary response or number of events.

• Gamma. This distribution is appropriate for variables with positive scale values that are skewed toward larger positive values. If a data value is less than or equal to 0 or is missing, then the corresponding case is not used in the analysis.

• Inverse Gaussian. This distribution is appropriate for variables with positive scale values that are skewed toward larger positive values. If a data value is less than or equal to 0 or is missing, then the corresponding case is not used in the analysis.

• Negative binomial. This distribution can be thought of as the number of trials required to observe k successes and is appropriate for variables with non-negative integer values. If a data value is non-integer, less than 0, or missing, then the corresponding case is not used in the analysis. The value of the negative binomial distribution's ancillary parameter can be any number greater than or equal to 0; you can set it to a fixed value or allow it to be estimated by the procedure. When the ancillary parameter is set to 0, using this distribution is equivalent to using the Poisson distribution.

• Normal. This is appropriate for scale variables whose values take a symmetric, bell-shaped distribution about a central (mean) value. The dependent variable must be numeric.

• Poisson. This distribution can be thought of as the number of occurrences of an event of interest in a fixed period of time and is appropriate for variables with non-negative integer values. If a data value is non-integer, less than 0, or missing, then the corresponding case is not used in the analysis.

• Tweedie. This distribution is appropriate for variables that can be represented by Poisson mixtures of gamma distributions; the distribution is "mixed" in the sense that it combines properties of continuous (takes non-negative real values) and discrete distributions (positive probability mass at a single value, 0). The dependent variable must be numeric, with data values greater than or equal to zero. If a data value is less than zero or missing, then the corresponding case is not used in the analysis. The fixed value of the Tweedie distribution's parameter can be any number greater than one and less than two.

• Multinomial. This distribution is appropriate for variables that represent an ordinal response. The dependent variable can be numeric or string, and it must have at least two distinct valid data values.

Link Function Collapse Hide details

Link Function

The link function is a transformation of the dependent variable that allows estimation of the model. The following functions are available:

• Identity. f(x)=x. The dependent variable is not transformed. This link can be used with any distribution.

• Complementary log-log. f(x)=log(−log(1−x)). This is appropriate only with the binomial distribution.

• Cumulative Cauchit. f(x) = tan(π (x – 0.5)), applied to the cumulative probability of each category of the response. This is appropriate only with the multinomial distribution.

• Cumulative complementary log-log. f(x)=ln(−ln(1−x)), applied to the cumulative probability of each category of the response. This is appropriate only with the multinomial distribution.

• Cumulative logit. f(x)=ln(x / (1−x)), applied to the cumulative probability of each category of the response. This is appropriate only with the multinomial distribution.

• Cumulative negative log-log. f(x)=−ln(−ln(x)), applied to the cumulative probability of each category of the response. This is appropriate only with the multinomial distribution.

• Cumulative probit. f(x)=Φ−1(x), applied to the cumulative probability of each category of the response, where Φ−1 is the inverse standard normal cumulative distribution function. This is appropriate only with the multinomial distribution.

• Log. f(x)=log(x). This link can be used with any distribution.

• Log complement. f(x)=log(1−x). This is appropriate only with the binomial distribution.

• Logit. f(x)=log(x / (1−x)). This is appropriate only with the binomial distribution.

• Negative binomial. f(x)=log(x / (x+k−1)), where k is the ancillary parameter of the negative binomial distribution. This is appropriate only with the negative binomial distribution.

• Negative log-log. f(x)=−log(−log(x)). This is appropriate only with the binomial distribution.

• Odds power. f(x)=[(x/(1−x))α−1]/α, if α ≠ 0. f(x)=log(x), if α=0. α is the required number specification and must be a real number. This is appropriate only with the binomial distribution.

• Probit. f(x)=Φ−1(x), where Φ−1 is the inverse standard normal cumulative distribution function. This is appropriate only with the binomial distribution.

• Power. f(x)=xα, if α ≠ 0. f(x)=log(x), if α=0. α is the required number specification and must be a real number. This link can be used with any distribution.

How To Specify a Model Type for Generalized Estimating Equations Collapse Hide details

This feature requires the Advanced Statistics option.

From the menus choose:

Analyze
Generalized Linear Models
Generalized Estimating Equations...

In the Generalized Estimating Equations dialog box, click Type of Model.

Related Topics

Generalized Estimating Equations
Generalized Estimating Equations Response
Generalized Estimating Equations Predictors
Generalized Estimating Equations Model
Generalized Estimating Equations Estimation
Generalized Estimating Equations Statistics
Generalized Estimating Equations EM Means
Generalized Estimating Equations Save
Generalized Estimating Equations Export
GENLIN Command Additional Features


Generalized Estimating Equations Response

Generalized Estimating Equations,Generalized Estimating Equations,Generalized Estimating Equations
response,response,response

In many cases, you can simply specify a dependent variable; however, variables that take only two values and responses that record events in trials require extra attention.

• Binary response. When the dependent variable takes only two values, you can specify the reference category for parameter estimation. A binary response variable can be string or numeric.

• Number of events occurring in a set of trials. When the response is a number of events occurring in a set of trials, the dependent variable contains the number of events and you can select an additional variable containing the number of trials. Alternatively, if the number of trials is the same across all subjects, then trials may be specified using a fixed value. The number of trials should be greater than or equal to the number of events for each case. Events should be non-negative integers, and trials should be positive integers.

For ordinal multinomial models, you can specify the category order of the response: ascending, descending, or data (data order means that the first value encountered in the data defines the first category, the last value encountered defines the last category).

Scale Weight. The scale parameter is an estimated model parameter related to the variance of the response. The scale weights are "known" values that can vary from observation to observation. If the scale weight variable is specified, the scale parameter, which is related to the variance of the response, is divided by it for each observation. Cases with scale weight values that are less than or equal to 0 or are missing are not used in the analysis.

How To Specify a Response for Generalized Estimating Equations Collapse Hide details

This feature requires the Advanced Statistics option.

From the menus choose:

Analyze
Generalized Linear Models
Generalized Estimating Equations...

In the Generalized Estimating Equations dialog box, click Response.

Related Topics

Generalized Estimating Equations
Generalized Estimating Equations Type of Model
Generalized Estimating Equations Predictors
Generalized Estimating Equations Model
Generalized Estimating Equations Estimation
Generalized Estimating Equations Statistics
Generalized Estimating Equations EM Means
Generalized Estimating Equations Save
Generalized Estimating Equations Export
GENLIN Command Additional Features


Generalized Estimating Equations Predictors

Generalized Estimating Equations,Generalized Estimating Equations,Generalized Estimating Equations
predictors,predictors,predictors

The Predictors tab allows you to specify the factors and covariates used to build model effects and to specify an optional offset.

Factors. Factors are categorical predictors; they can be numeric or string.

Covariates. Covariates are scale predictors; they must be numeric.

Note: When the response is binomial with binary format, the procedure computes deviance and chi-square goodness-of-fit statistics by subpopulations that are based on the cross-classification of observed values of the selected factors and covariates. You should keep the same set of predictors across multiple runs of the procedure to ensure a consistent number of subpopulations.

Offset. The offset term is a "structural" predictor. Its coefficient is not estimated by the model but is assumed to have the value 1; thus, the values of the offset are simply added to the linear predictor of the dependent variable. This is especially useful in Poisson regression models, where each case may have different levels of exposure to the event of interest. For example, when modeling accident rates for individual drivers, there is an important difference between a driver who has been at fault in one accident in three years of experience and a driver who has been at fault in one accident in 25 years! The number of accidents can be modeled as a Poisson response if the experience of the driver is included as an offset term.

How To Select Predictors for Generalized Estimating Equations Collapse Hide details

This feature requires the Advanced Statistics option.

From the menus choose:

Analyze
Generalized Linear Models
Generalized Estimating Equations...

In the Generalized Estimating Equations dialog box, click Predictors.

Related Topics

Generalized Estimating Equations
Generalized Estimating Equations Type of Model
Generalized Estimating Equations Response
Generalized Estimating Equations Model
Generalized Estimating Equations Estimation
Generalized Estimating Equations Statistics
Generalized Estimating Equations EM Means
Generalized Estimating Equations Save
Generalized Estimating Equations Export
GENLIN Command Additional Features


Generalized Estimating Equations Model

Generalized Estimating Equations,Generalized Estimating Equations,Generalized Estimating Equations
model specification,model specification,model specification
nested terms,nested terms,nested terms
in Generalized Estimating Equations,in Generalized Estimating Equations,in Generalized Estimating Equations

Specify Model Effects. The default model is intercept-only, so you must explicitly specify other model effects. Alternatively, you can build nested or non-nested terms.

Non-Nested Terms

For the selected factors and covariates:

Main effects. Creates a main-effects term for each variable selected.

Interaction. Creates the highest-level interaction term for all selected variables.

Factorial. Creates all possible interactions and main effects of the selected variables.

All 2-way. Creates all possible two-way interactions of the selected variables.

All 3-way. Creates all possible three-way interactions of the selected variables.

All 4-way. Creates all possible four-way interactions of the selected variables.

All 5-way. Creates all possible five-way interactions of the selected variables.

Specifying Non-Nested Terms Collapse Hide details

This feature requires the Advanced Statistics option.

From the menus choose:

Analyze
Generalized Linear Models
Generalized Estimating Equations...

In the Predictors tab, select factors and covariates and click Model.

Select one or more factors or covariates or a combination of factors and covariates.

Select a method for building the terms from the Type drop-down list and add them to the model.

Repeat the process until you have all of the terms that you want in the model.

Nested Terms

You can build nested terms for your model in this procedure. Nested terms are useful for modeling the effect of a factor or covariate whose values do not interact with the levels of another factor. For example, a grocery store chain may follow the spending habits of its customers at several store locations. Since each customer frequents only one of these locations, the Customer effect can be said to be nested within the Store location effect.

Additionally, you can include interaction effects or add multiple levels of nesting to the nested term.

Limitations. Nested terms have the following restrictions:

• All factors within an interaction must be unique. Thus, if A is a factor, then specifying A*A is invalid.

• All factors within a nested effect must be unique. Thus, if A is a factor, then specifying A(A) is invalid.

• No effect can be nested within a covariate. Thus, if A is a factor and X is a covariate, then specifying A(X) is invalid.

Specifying Nested Terms Collapse Hide details

From the menus choose:

Analyze
Generalized Linear Models
Generalized Estimating Equations...

In the Predictors tab, select factors and covariates and click Model.

Select a factor or covariate that is nested within another factor, and then click the move button.

Click Nesting.

Select the factor within which the previous factor or covariate is nested, and then click the move button.

Click Add to Model.

Optionally, you can include interaction effects or add multiple levels of nesting to the nested term.

Intercept. The intercept is usually included in the model. If you can assume the data pass through the origin, you can exclude the intercept.

Models with the multinomial ordinal distribution do not have a single intercept term; instead there are threshold parameters that define transition points between adjacent categories. The thresholds are always included in the model.

Related Topics

Generalized Estimating Equations
Generalized Estimating Equations Type of Model
Generalized Estimating Equations Response
Generalized Estimating Equations Predictors
Generalized Estimating Equations Estimation
Generalized Estimating Equations Statistics
Generalized Estimating Equations EM Means
Generalized Estimating Equations Save
Generalized Estimating Equations Export
GENLIN Command Additional Features


Generalized Estimating Equations Estimation

Generalized Estimating Equations,Generalized Estimating Equations,Generalized Estimating Equations
estimation criteria,estimation criteria,estimation criteria
parameter convergence,parameter convergence,parameter convergence
in Generalized Estimating Equations,in Generalized Estimating Equations,in Generalized Estimating Equations
Hessian convergence,Hessian convergence,Hessian convergence
in Generalized Estimating Equations,in Generalized Estimating Equations,in Generalized Estimating Equations
log-likelihood convergence,log-likelihood convergence,log-likelihood convergence
in Generalized Estimating Equations,in Generalized Estimating Equations,in Generalized Estimating Equations
separation,separation,separation
in Generalized Estimating Equations,in Generalized Estimating Equations,in Generalized Estimating Equations
iterations,iterations,iterations
in Generalized Estimating Equations,in Generalized Estimating Equations,in Generalized Estimating Equations
covariance matrix,covariance matrix,covariance matrix
in Generalized Estimating Equations,in Generalized Estimating Equations,in Generalized Estimating Equations
scale parameter,scale parameter,scale parameter
in Generalized Estimating Equations,in Generalized Estimating Equations,in Generalized Estimating Equations
step-halving,step-halving,step-halving
in Generalized Estimating Equations,in Generalized Estimating Equations,in Generalized Estimating Equations

Parameter Estimation. The controls in this group allow you to specify estimation methods and to provide initial values for the parameter estimates.

• Method. You can select a parameter estimation method; choose between Newton-Raphson, Fisher scoring, or a hybrid method in which Fisher scoring iterations are performed before switching to the Newton-Raphson method. If convergence is achieved during the Fisher scoring phase of the hybrid method before the maximum number of Fisher iterations is reached, the algorithm continues with the Newton-Raphson method.

• Scale Parameter Method. You can select the scale parameter estimation method.

Maximum-likelihood jointly estimates the scale parameter with the model effects; note that this option is not valid if the response has a negative binomial, Poisson, or binomial distribution. Since the concept of likelihood does not enter into generalized estimating equations, this specification applies only to the initial generalized linear model; this scale parameter estimate is then passed to the generalized estimating equations, which update the scale parameter by the Pearson chi-square divided by its degrees of freedom.

The deviance and Pearson chi-square options estimate the scale parameter from the value of those statistics in the initial generalized linear model; this scale parameter estimate is then passed to the generalized estimating equations, which treat it as fixed.

Alternatively, specify a fixed value for the scale parameter. It will be treated as fixed in estimating the initial generalized linear model and the generalized estimating equations.

• Initial values. The procedure will automatically compute initial values for parameters. Alternatively, you can specify initial values for the parameter estimates.

The iterations and convergence criteria specified on this tab are applicable only to the initial generalized linear model. For estimation criteria used in fitting the generalized estimating equations, see the Repeated tab.

Iterations.

• Maximum iterations. The maximum number of iterations the algorithm will execute. Specify a non-negative integer.

• Maximum step-halving. At each iteration, the step size is reduced by a factor of 0.5 until the log-likelihood increases or maximum step-halving is reached. Specify a positive integer.

• Check for separation of data points. When selected, the algorithm performs tests to ensure that the parameter estimates have unique values. Separation occurs when the procedure can produce a model that correctly classifies every case. This option is available for multinomial responses and binomial responses with binary format.

Convergence Criteria.

• Parameter convergence. When selected, the algorithm stops after an iteration in which the absolute or relative change in the parameter estimates is less than the value specified, which must be positive.

• Log-likelihood convergence. When selected, the algorithm stops after an iteration in which the absolute or relative change in the log-likelihood function is less than the value specified, which must be positive.

• Hessian convergence. For the Absolute specification, convergence is assumed if a statistic based on the Hessian convergence is less than the positive value specified. For the Relative specification, convergence is assumed if the statistic is less than the product of the positive value specified and the absolute value of the log-likelihood.

Singularity tolerance. Singular (or non-invertible) matrices have linearly dependent columns, which can cause serious problems for the estimation algorithm. Even near-singular matrices can lead to poor results, so the procedure will treat a matrix whose determinant is less than the tolerance as singular. Specify a positive value.

How To Specify Estimation Settings for Generalized Estimating Equations Collapse Hide details

This feature requires the Advanced Statistics option.

From the menus choose:

Analyze
Generalized Linear Models
Generalized Estimating Equations...

In the Generalized Estimating Equations dialog box, click Estimation.

Related Topics

Generalized Estimating Equations
Generalized Estimating Equations Type of Model
Generalized Estimating Equations Response
Generalized Estimating Equations Predictors
Generalized Estimating Equations Model
Generalized Estimating Equations Statistics
Generalized Estimating Equations EM Means
Generalized Estimating Equations Save
Generalized Estimating Equations Export
GENLIN Command Additional Features


Generalized Estimating Equations Statistics

Generalized Estimating Equations,Generalized Estimating Equations,Generalized Estimating Equations
statistics,statistics,statistics

Model Effects.

• Analysis type. Specify the type of analysis to produce for testing model effects. Type I analysis is generally appropriate when you have a priori reasons for ordering predictors in the model, while Type III is more generally applicable. Wald or generalized score statistics are computed based upon the selection in the Chi-Square Statistics group.

• Confidence intervals. Specify a confidence level greater than 50 and less than 100. Wald intervals are always produced regardless of the type of chi-square statistics selected, and are based on the assumption that parameters have an asymptotic normal distribution.

• Log quasi-likelihood function. This controls the display format of the log quasi-likelihood function. The full function includes an additional term that is constant with respect to the parameter estimates; it has no effect on parameter estimation and is left out of the display in some software products.

case processing summary,case processing summary,case processing summary
in Generalized Estimating Equations,in Generalized Estimating Equations,in Generalized Estimating Equations
descriptive statistics,descriptive statistics,descriptive statistics
in Generalized Estimating Equations,in Generalized Estimating Equations,in Generalized Estimating Equations
model information,model information,model information
in Generalized Estimating Equations,in Generalized Estimating Equations,in Generalized Estimating Equations
goodness of fit,goodness of fit,goodness of fit
in Generalized Estimating Equations,in Generalized Estimating Equations,in Generalized Estimating Equations
parameter estimates,parameter estimates,parameter estimates
in Generalized Estimating Equations,in Generalized Estimating Equations,in Generalized Estimating Equations
covariance matrix,covariance matrix,covariance matrix
in Generalized Estimating Equations,in Generalized Estimating Equations,in Generalized Estimating Equations
correlation matrix,correlation matrix,correlation matrix
in Generalized Estimating Equations,in Generalized Estimating Equations,in Generalized Estimating Equations
contrast coefficients matrix,contrast coefficients matrix,contrast coefficients matrix
in Generalized Estimating Equations,in Generalized Estimating Equations,in Generalized Estimating Equations
L matrix,L matrix,L matrix
in Generalized Estimating Equations,in Generalized Estimating Equations,in Generalized Estimating Equations
general estimable function,general estimable function,general estimable function
in Generalized Estimating Equations,in Generalized Estimating Equations,in Generalized Estimating Equations
iteration history,iteration history,iteration history
in Generalized Estimating Equations,in Generalized Estimating Equations,in Generalized Estimating Equations

Print. The following output is available.

• Case processing summary. Displays the number and percentage of cases included and excluded from the analysis and the Correlated Data Summary table.

• Descriptive statistics. Displays descriptive statistics and summary information about the dependent variable, covariates, and factors.

• Model information. Displays the dataset name, dependent variable or events and trials variables, offset variable, scale weight variable, probability distribution, and link function.

• Goodness of fit statistics. Displays two extensions of Akaike's Information Criterion for model selection: Quasi-likelihood under the independence model criterion (QIC) for choosing the best correlation structure and another QIC measure for choosing the best subset of predictors.

• Model summary statistics. Displays model fit tests, including likelihood-ratio statistics for the model fit omnibus test and statistics for the Type I or III contrasts for each effect.

• Parameter estimates. Displays parameter estimates and corresponding test statistics and confidence intervals. You can optionally display exponentiated parameter estimates in addition to the raw parameter estimates.

• Covariance matrix for parameter estimates. Displays the estimated parameter covariance matrix.

• Correlation matrix for parameter estimates. Displays the estimated parameter correlation matrix.

• Contrast coefficient (L) matrices. Displays contrast coefficients for the default effects and for the estimated marginal means, if requested on the EM Means tab.

• General estimable functions. Displays the matrices for generating the contrast coefficient (L) matrices.

• Iteration history. Displays the iteration history for the parameter estimates and log-likelihood and prints the last evaluation of the gradient vector and the Hessian matrix. The iteration history table displays parameter estimates for every nth iterations beginning with the 0th iteration (the initial estimates), where n is the value of the print interval. If the iteration history is requested, then the last iteration is always displayed regardless of n.

• Working correlation matrix. Displays the values of the matrix representing the within-subject dependencies. Its structure depends upon the specifications in the Repeated tab.

How To Specify Statistics for Generalized Estimating Equations Collapse Hide details

This feature requires the Advanced Statistics option.

From the menus choose:

Analyze
Generalized Linear Models
Generalized Estimating Equations...

In the Generalized Estimating Equations dialog box, click Statistics.

Related Topics

Generalized Estimating Equations
Generalized Estimating Equations Type of Model
Generalized Estimating Equations Response
Generalized Estimating Equations Predictors
Generalized Estimating Equations Model
Generalized Estimating Equations Estimation
Generalized Estimating Equations EM Means
Generalized Estimating Equations Save
Generalized Estimating Equations Export
GENLIN Command Additional Features


Generalized Estimating Equations EM Means

Generalized Estimating Equations,Generalized Estimating Equations,Generalized Estimating Equations
estimated marginal means,estimated marginal means,estimated marginal means
estimated marginal means,estimated marginal means,estimated marginal means
in Generalized Estimating Equations,in Generalized Estimating Equations,in Generalized Estimating Equations

This tab allows you to display the estimated marginal means for levels of factors and factor interactions. You can also request that the overall estimated mean be displayed. Estimated marginal means are not available for ordinal multinomial models.

Factors and Interactions. This list contains factors specified on the Predictors tab and factor interactions specified on the Model tab. Covariates are excluded from this list. Terms can be selected directly from this list or combined into an interaction term using the By * button.

Display Means For. Estimated means are computed for the selected factors and factor interactions. The contrast determines how hypothesis tests are set up to compare the estimated means. The simple contrast requires a reference category or factor level against which the others are compared.

• Pairwise. Pairwise comparisons are computed for all-level combinations of the specified or implied factors. This is the only available contrast for factor interactions.

• Simple. Compares the mean of each level to the mean of a specified level. This type of contrast is useful when there is a control group.

• Deviation. Each level of the factor is compared to the grand mean. Deviation contrasts are not orthogonal.

• Difference. Compares the mean of each level (except the first) to the mean of previous levels. They are sometimes called reverse Helmert contrasts.

• Helmert. Compares the mean of each level of the factor (except the last) to the mean of subsequent levels.

• Repeated. Compares the mean of each level (except the last) to the mean of the subsequent level.

• Polynomial. Compares the linear effect, quadratic effect, cubic effect, and so on. The first degree of freedom contains the linear effect across all categories; the second degree of freedom, the quadratic effect; and so on. These contrasts are often used to estimate polynomial trends.

Scale. Estimated marginal means can be computed for the response, based on the original scale of the dependent variable, or for the linear predictor, based on the dependent variable as transformed by the link function.

Adjustment for Multiple Comparisons. When performing hypothesis tests with multiple contrasts, the overall significance level can be adjusted from the significance levels for the included contrasts. This group allows you to choose the adjustment method.

• Least significant difference. This method does not control the overall probability of rejecting the hypotheses that some linear contrasts are different from the null hypothesis values.

• Bonferroni. This method adjusts the observed significance level for the fact that multiple contrasts are being tested.

• Sequential Bonferroni. This is a sequentially step-down rejective Bonferroni procedure that is much less conservative in terms of rejecting individual hypotheses but maintains the same overall significance level.

• Sidak. This method provides tighter bounds than the Bonferroni approach.

• Sequential Sidak. This is a sequentially step-down rejective Sidak procedure that is much less conservative in terms of rejecting individual hypotheses but maintains the same overall significance level.

How To Specify EM Means for Generalized Estimating Equations Collapse Hide details

This feature requires the Advanced Statistics option.

From the menus choose:

Analyze
Generalized Linear Models
Generalized Estimating Equations...

In the Generalized Estimating Equations dialog box, click EM Means.

Related Topics

Generalized Estimating Equations
Generalized Estimating Equations Type of Model
Generalized Estimating Equations Response
Generalized Estimating Equations Predictors
Generalized Estimating Equations Model
Generalized Estimating Equations Estimation
Generalized Estimating Equations Statistics
Generalized Estimating Equations Save
Generalized Estimating Equations Export
GENLIN Command Additional Features


Generalized Estimating Equations Save

Generalized Estimating Equations,Generalized Estimating Equations,Generalized Estimating Equations
save variables to active dataset,save variables to active dataset,save variables to active dataset

Checked items are saved with the specified name; you can choose to overwrite existing variables with the same name as the new variables or avoid name conflicts by appendix suffixes to make the new variable names unique. See the topic Variable Names for more information.

• Predicted value of mean of response. Saves model-predicted values for each case in the original response metric. When the response distribution is binomial and the dependent variable is binary, the procedure saves predicted probabilities. When the response distribution is multinomial, the item label becomes Cumulative predicted probability, and the procedure saves the cumulative predicted probability for each category of the response, except the last, up to the number of specified categories to save.

• Lower bound of confidence interval for mean of response. Saves the lower bound of the confidence interval for the mean of the response. When the response distribution is multinomial, the item label becomes Lower bound of confidence interval for cumulative predicted probability, and the procedure saves the lower bound for each category of the response, except the last, up to the number of specified categories to save.

• Upper bound of confidence interval for mean of response. Saves the upper bound of the confidence interval for the mean of the response. When the response distribution is multinomial, the item label becomes Upper bound of confidence interval for cumulative predicted probability, and the procedure saves the upper bound for each category of the response, except the last, up to the number of specified categories to save.

• Predicted category. For models with binomial distribution and binary dependent variable, or multinomial distribution, this saves the predicted response category for each case. This option is not available for other response distributions.

• Predicted value of linear predictor. Saves model-predicted values for each case in the metric of the linear predictor (transformed response via the specified link function). When the response distribution is multinomial, the procedure saves the predicted value for each category of the response, except the last, up to the number of specified categories to save.

• Estimated standard error of predicted value of linear predictor. When the response distribution is multinomial, the procedure saves the estimated standard error for each category of the response, except the last, up to the number of specified categories to save.

The following items are not available when the response distribution is multinomial.

residuals,residuals,residuals
in Generalized Estimating Equations,in Generalized Estimating Equations,in Generalized Estimating Equations

• Raw residual. The difference between an observed value and the value predicted by the model.

Pearson residuals,Pearson residuals,Pearson residuals
in Generalized Estimating Equations,in Generalized Estimating Equations,in Generalized Estimating Equations

• Pearson residual. The square root of the contribution of a case to the Pearson chi-square statistic, with the sign of the raw residual.

How To Save Variables to the Active Dataset for Generalized Estimating Equations Collapse Hide details

This feature requires the Advanced Statistics option.

From the menus choose:

Analyze
Generalized Linear Models
Generalized Estimating Equations...

In the Generalized Estimating Equations dialog box, click Save.

Related Topics

Generalized Estimating Equations
Generalized Estimating Equations Type of Model
Generalized Estimating Equations Response
Generalized Estimating Equations Predictors
Generalized Estimating Equations Model
Generalized Estimating Equations Estimation
Generalized Estimating Equations Statistics
Generalized Estimating Equations EM Means
Generalized Estimating Equations Export
GENLIN Command Additional Features


Generalized Estimating Equations Export

Generalized Estimating Equations,Generalized Estimating Equations,Generalized Estimating Equations
model export,model export,model export

Export model as data. Writes a dataset in PASW Statistics format containing the parameter correlation or covariance matrix with parameter estimates, standard errors, significance values, and degrees of freedom. The order of variables in the matrix file is as follows.

• Split variables. If used, any variables defining splits.

• RowType_. Takes values (and value labels) COV (covariances), CORR (correlations), EST (parameter estimates), SE (standard errors), SIG (significance levels), and DF (sampling design degrees of freedom). There is a separate case with row type COV (or CORR) for each model parameter, plus a separate case for each of the other row types.

• VarName_. Takes values P1, P2, ..., corresponding to an ordered list of all estimated model parameters (except the scale or negative binomial parameters), for row types COV or CORR, with value labels corresponding to the parameter strings shown in the Parameter estimates table. The cells are blank for other row types.

• P1, P2, ... These variables correspond to an ordered list of all model parameters (including the scale and negative binomial parameters, as appropriate), with variable labels corresponding to the parameter strings shown in the Parameter estimates table, and take values according to the row type.

For redundant parameters, all covariances are set to zero, correlations are set to the system-missing value; all parameter estimates are set at zero; and all standard errors, significance levels, and residual degrees of freedom are set to the system-missing value.

For the scale parameter, covariances, correlations, significance level and degrees of freedom are set to the system-missing value. If the scale parameter is estimated via maximum likelihood, the standard error is given; otherwise it is set to the system-missing value.

For the negative binomial parameter, covariances, correlations, significance level and degrees of freedom are set to the system-missing value. If the negative binomial parameter is estimated via maximum likelihood, the standard error is given; otherwise it is set to the system-missing value.

If there are splits, then the list of parameters must be accumulated across all splits. In a given split, some parameters may be irrelevant; this is not the same as redundant. For irrelevant parameters, all covariances or correlations, parameter estimates, standard errors, significance levels, and degrees of freedom are set to the system-missing value.

You can use this matrix file as the initial values for further model estimation; note that this file is not immediately usable for further analyses in other procedures that read a matrix file unless those procedures accept all the row types exported here. Even then, you should take care that all parameters in this matrix file have the same meaning for the procedure reading the file.

Export model as XML. Saves the parameter estimates and the parameter covariance matrix, if selected, in XML (PMML) format. SmartScore and PASW Statistics Server (a separate product) can use this model file to apply the model information to other data files for scoring purposes.

How To Save Model Output for Generalized Estimating Equations Collapse Hide details

This feature requires the Advanced Statistics option.

From the menus choose:

Analyze
Generalized Linear Models
Generalized Estimating Equations...

In the Generalized Estimating Equations dialog box, click Export.

Related Topics

Generalized Estimating Equations
Generalized Estimating Equations Type of Model
Generalized Estimating Equations Response
Generalized Estimating Equations Predictors
Generalized Estimating Equations Model
Generalized Estimating Equations Estimation
Generalized Estimating Equations Statistics
Generalized Estimating Equations EM Means
Generalized Estimating Equations Save
GENLIN Command Additional Features


GENLIN Command Additional Features

The command syntax language also allows you to:

• Specify initial values for parameter estimates as a list of numbers (using the CRITERIA subcommand).

• Specify a fixed working correlation matrix (using the REPEATED subcommand).

• Fix covariates at values other than their means when computing estimated marginal means (using the EMMEANS subcommand).

• Specify custom polynomial contrasts for estimated marginal means (using the EMMEANS subcommand).

• Specify a subset of the factors for which estimated marginal means are displayed to be compared using the specified contrast type (using the TABLES and COMPARE keywords of the EMMEANS subcommand).

Related Topics

Generalized Estimating Equations
Generalized Estimating Equations Type of Model
Generalized Estimating Equations Response
Generalized Estimating Equations Predictors
Generalized Estimating Equations Model
Generalized Estimating Equations Estimation
Generalized Estimating Equations Statistics
Generalized Estimating Equations EM Means
Generalized Estimating Equations Save
Generalized Estimating Equations Export
GENLIN


Generalized Linear Models Reference Category

Generalized Linear Models,Generalized Linear Models,Generalized Linear Models
reference category for binary response,reference category for binary response,reference category for binary response
reference category,reference category,reference category
in Generalized Linear Models,in Generalized Linear Models,in Generalized Linear Models

For binary response, you can choose the reference category for the dependent variable. This can affect certain output, such as parameter estimates and saved values, but it should not change the model fit. For example, if your binary response takes values 0 and 1:

• By default, the procedure makes the last (highest-valued) category, or 1, the reference category. In this situation, model-saved probabilities estimate the chance that a given case takes the value 0, and parameter estimates should be interpreted as relating to the likelihood of category 0.

• If you specify the first (lowest-valued) category, or 0, as the reference category, then model-saved probabilities estimate the chance that a given case takes the value 1.

• If you specify the custom category and your variable has defined labels, you can set the reference category by choosing a value from the list. This can be convenient when, in the middle of specifying a model, you don't remember exactly how a particular variable was coded.

How To Specify a Reference Category for Generalized Linear Models Collapse Hide details

From the menus choose:

Analyze
Generalized Linear Models
Generalized Linear Models...

...or Generalized Estimating Equations.

In the Response tab, select a dependent variable and select Variable represents binary response or number of events.

Select Binary response and click Reference Category.

Related Topics

Generalized Linear Models Response
Generalized Estimating Equations Response


Generalized Linear Models Options

Generalized Linear Models,Generalized Linear Models,Generalized Linear Models
options for categorical factors,options for categorical factors,options for categorical factors

These options are applied to all factors specified on the Predictors tab.

User-Missing Values. Factors must have valid values for a case to be included in the analysis. These controls allow you to decide whether user-missing values are treated as valid among factor variables.

Category Order. This is relevant for determining a factor's last level, which may be associated with a redundant parameter in the estimation algorithm. Changing the category order can change the values of factor-level effects, since these parameter estimates are calculated relative to the “last” level. Factors can be sorted in ascending order from lowest to highest value, in descending order from highest to lowest value, or in "data order." This means that the first value encountered in the data defines the first category, and the last unique value encountered defines the last category.

How To Specify Options for Factors in Generalized Linear Models Collapse Hide details

From the menus choose:

Analyze
Generalized Linear Models
Generalized Linear Models...

...or Generalized Estimation Equations

Click the Predictors tab.

In the Predictors tab, click Options.

Related Topics

Generalized Linear Models Predictors
Generalized Estimating Equations Predictors


Generalized Linear Models Initial Values

Generalized Linear Models,Generalized Linear Models,Generalized Linear Models
initial values,initial values,initial values

If initial values are specified, they must be supplied for all parameters (including redundant parameters) in the model. In the dataset, the ordering of variables from left to right must be: RowType_, VarName_, P1, P2, …, where RowType_ and VarName_ are string variables and P1, P2, … are numeric variables corresponding to an ordered list of the parameters.

• Initial values are supplied on a record with value EST for variable RowType_; the actual initial values are given under variables P1, P2, …. The procedure ignores all records for which RowType_ has a value other than EST as well as any records beyond the first occurrence of RowType_ equal to EST.

• The intercept, if included in the model, or threshold parameters, if the response has a multinomial distribution, must be the first initial values listed.

• The scale parameter and, if the response has a negative binomial distribution, the negative binomial parameter, must be the last initial values specified.

• If Split File is in effect, then the variables must begin with the split-file variable or variables in the order specified when creating the Split File, followed by RowType_, VarName_, P1, P2, … as above. Splits must occur in the specified dataset in the same order as in the original dataset. See the topic Split File for more information.

Note: The variable names P1, P2, … are not required; the procedure will accept any valid variable names for the parameters because the mapping of variables to parameters is based on variable position, not variable name. Any variables beyond the last parameter are ignored.

The file structure for the initial values is the same as that used when exporting the model as data; thus, you can use the final values from one run of the procedure as input in a subsequent run.

How To Specify Initial Values for Parameters in Generalized Linear Models Collapse Hide details

From the menus choose:

Analyze
Generalized Linear Models
Generalized Linear Models...

...or Generalized Estimating Equations.

In the Generalized Linear Models dialog box, click Estimation.

In the Estimation tab, click Initial Values.

Related Topics

Generalized Linear Models Estimation
Generalized Estimating Equations Estimation


Model Selection Loglinear Analysis

Model Selection Loglinear Analysis,Model Selection Loglinear Analysis,Model Selection Loglinear Analysis
hierarchical loglinear models,hierarchical loglinear models,hierarchical loglinear models
loglinear analysis,loglinear analysis,loglinear analysis
crosstabulation,crosstabulation,crosstabulation
in Model Selection Loglinear Analysis,in Model Selection Loglinear Analysis,in Model Selection Loglinear Analysis
backward elimination,backward elimination,backward elimination
in Model Selection Loglinear Analysis,in Model Selection Loglinear Analysis,in Model Selection Loglinear Analysis

The Model Selection Loglinear Analysis procedure analyzes multiway crosstabulations (contingency tables). It fits hierarchical loglinear models to multidimensional crosstabulations using an iterative proportional-fitting algorithm. This procedure helps you find out which categorical variables are associated. To build models, forced entry and backward elimination methods are available. For saturated models, you can request parameter estimates and tests of partial association. A saturated model adds 0.5 to all cells.

Example. In a study of user preference for one of two laundry detergents, researchers counted people in each group, combining various categories of water softness (soft, medium, or hard), previous use of one of the brands, and washing temperature (cold or hot). They found how temperature is related to water softness and also to brand preference.

Statistics. Frequencies, residuals, parameter estimates, standard errors, confidence intervals, and tests of partial association. For custom models, plots of residuals and normal probability plots.

Show me

Model Selection Loglinear Analysis Data Considerations Collapse Hide details

Data. Factor variables are categorical. All variables to be analyzed must be numeric. Categorical string variables can be recoded to numeric variables before starting the model selection analysis.

Avoid specifying many variables with many levels. Such specifications can lead to a situation where many cells have small numbers of observations, and the chi-square values may not be useful.

Related procedures. The Model Selection procedure can help identify the terms needed in the model. Then you can continue to evaluate the model using General Loglinear Analysis or Logit Loglinear Analysis. You can use Autorecode to recode string variables. If a numeric variable has empty categories, use Recode to create consecutive integer values.

Obtaining a Model Selection Loglinear Analysis Collapse Hide details

Obtaining a Model Selection Loglinear Analysis

This feature requires the Advanced Statistics option.

From the menus choose:

Analyze
Loglinear
Model Selection...

Select two or more numeric categorical factors.

Select one or more factor variables in the Factor(s) list, and click Define Range.

Define the range of values for each factor variable.

Select an option in the Model Building group.

Optionally, you can select a cell weight variable to specify structural zeros.

This procedure pastes HILOGLINEAR command syntax.

See HILOGLINEAR Algorithms for computational details for this procedure.

Related Topics

HILOGLINEAR
Loglinear Analysis Define Range
Loglinear Analysis Model
Model Selection Loglinear Analysis Options


Loglinear Analysis Define Range

Model Selection Loglinear Analysis,Model Selection Loglinear Analysis,Model Selection Loglinear Analysis
defining factor ranges,defining factor ranges,defining factor ranges

You must indicate the range of categories for each factor variable. Values for Minimum and Maximum correspond to the lowest and highest categories of the factor variable. Both values must be integers, and the minimum value must be less than the maximum value. Cases with values outside of the bounds are excluded. For example, if you specify a minimum value of 1 and a maximum value of 3, only the values 1, 2, and 3 are used. Repeat this process for each factor variable.

Defining Ranges in Model Selection Loglinear Analysis Collapse Hide details

This feature requires the Advanced Statistics option.

From the menus choose:

Analyze
Loglinear
Model Selection...

Select a factor variable and then click Define Range.

Enter values for Minimum and Maximum that correspond to the lowest and highest categories of the factor variable.

Repeat this process for each factor variable.

Related Topics

Model Selection Loglinear Analysis
Loglinear Analysis Model
Model Selection Loglinear Analysis Options


Loglinear Analysis Model

Model Selection Loglinear Analysis,Model Selection Loglinear Analysis,Model Selection Loglinear Analysis
models,models,models
custom models,custom models,custom models
in Model Selection Loglinear Analysis,in Model Selection Loglinear Analysis,in Model Selection Loglinear Analysis
saturated models,saturated models,saturated models
in Model Selection Loglinear Analysis,in Model Selection Loglinear Analysis,in Model Selection Loglinear Analysis
generating class,generating class,generating class
in Model Selection Loglinear Analysis,in Model Selection Loglinear Analysis,in Model Selection Loglinear Analysis

Specify Model. A saturated model contains all factor main effects and all factor-by-factor interactions. Select Custom to specify a generating class for an unsaturated model.

Generating Class. A generating class is a list of the highest-order terms in which factors appear. A hierarchical model contains the terms that define the generating class and all lower-order relatives. Suppose you select variables A, B, and C in the Factors list and then select Interaction from the Build Terms drop-down list. The resulting model will contain the specified 3-way interaction A*B*C, the 2-way interactions A*B, A*C, and B*C, and main effects for A, B, and C. Do not specify the lower-order relatives in the generating class.

Specifying Models for Model Selection Loglinear Analysis Collapse Hide details

From the menus choose:

Analyze
Loglinear
Model Selection...

Select one or more factors.

Click Model.

In the Model dialog box, select Custom.

Select a method for building terms.

Repeat these steps until you have all of the highest-order terms you want in the generating class.

Do not specify lower-order relatives of terms already included in the generating class.

Related Topics

Build Terms
Model Selection Loglinear Analysis
Loglinear Analysis Define Range
Model Selection Loglinear Analysis Options


Model Selection Loglinear Analysis Options

Model Selection Loglinear Analysis,Model Selection Loglinear Analysis,Model Selection Loglinear Analysis
options,options,options
frequencies,frequencies,frequencies
in Model Selection Loglinear Analysis,in Model Selection Loglinear Analysis,in Model Selection Loglinear Analysis
residuals,residuals,residuals
in Model Selection Loglinear Analysis,in Model Selection Loglinear Analysis,in Model Selection Loglinear Analysis
iterations,iterations,iterations
in Model Selection Loglinear Analysis,in Model Selection Loglinear Analysis,in Model Selection Loglinear Analysis
normal probability plots,normal probability plots,normal probability plots
in Model Selection Loglinear Analysis,in Model Selection Loglinear Analysis,in Model Selection Loglinear Analysis
parameter estimates,parameter estimates,parameter estimates
in Model Selection Loglinear Analysis,in Model Selection Loglinear Analysis,in Model Selection Loglinear Analysis

Display. You can choose Frequencies, Residuals, or both. In a saturated model, the observed and expected frequencies are equal, and the residuals are equal to 0.

Plot. For custom models, you can choose one or both types of plots, Residuals and Normal Probability. These will help determine how well a model fits the data.

Display for Saturated Model. For a saturated model, you can choose Parameter estimates. The parameter estimates may help determine which terms can be dropped from the model. An association table, which lists tests of partial association, is also available. This option is computationally expensive for tables with many factors.

Model Criteria. An iterative proportional-fitting algorithm is used to obtain parameter estimates. You can override one or more of the estimation criteria by specifying Maximum iterations, Convergence, or Delta (a value added to all cell frequencies for saturated models).

Specifying Options for Model Selection Loglinear Analysis Collapse Hide details

This feature requires the Advanced Statistics option.

From the menus choose:

Analyze
Loglinear
Model Selection...

In the Model Selection Loglinear Analysis dialog box, click Options.

Select the desired options.

Related Topics

Model Selection Loglinear Analysis
Loglinear Analysis Define Range
Loglinear Analysis Model


HILOGLINEAR Command Additional Features

Model Selection Loglinear Analysis,Model Selection Loglinear Analysis,Model Selection Loglinear Analysis
command additional features,command additional features,command additional features

The command syntax language also allows you to:

• Specify cell weights in matrix form (using the CWEIGHT subcommand).

• Generate analyses of several models with a single command (using the DESIGN subcommand).

Related Topics

UNIANOVA Command Additional Features
RELIABILITY Command Additional Features
ALSCAL Command Additional Features
MIXED Command Additional Features
CSGLM Command Additional Features
CSLOGISTIC Command Additional Features
MVA Command Additional Features
LOGISTIC REGRESSION Command Additional Features
NOMREG Command Additional Features
PROBIT Command Additional Features
NLR Command Additional Features
WLS Command Additional Features
2SLS Command Additional Features
SEASON Command Additional Features
SPECTRA Command Additional Features
HILOGLINEAR


General Loglinear Analysis

loglinear analysis,loglinear analysis,loglinear analysis
General Loglinear Analysis,General Loglinear Analysis,General Loglinear Analysis
Poisson regression,Poisson regression,Poisson regression
in General Loglinear Analysis,in General Loglinear Analysis,in General Loglinear Analysis
General Loglinear Analysis,General Loglinear Analysis,General Loglinear Analysis
cell covariates,cell covariates,cell covariates
General Loglinear Analysis,General Loglinear Analysis,General Loglinear Analysis
contrasts,contrasts,contrasts
General Loglinear Analysis,General Loglinear Analysis,General Loglinear Analysis
cell structures,cell structures,cell structures
General Loglinear Analysis,General Loglinear Analysis,General Loglinear Analysis
factors,factors,factors
General Loglinear Analysis,General Loglinear Analysis,General Loglinear Analysis
distribution of cell counts,distribution of cell counts,distribution of cell counts
contrasts,contrasts,contrasts
in General Loglinear Analysis,in General Loglinear Analysis,in General Loglinear Analysis
GLOR,GLOR,GLOR
in General Loglinear Analysis,in General Loglinear Analysis,in General Loglinear Analysis
contingency tables,contingency tables,contingency tables
in General Loglinear Analysis,in General Loglinear Analysis,in General Loglinear Analysis
Newton-Raphson method,Newton-Raphson method,Newton-Raphson method
in General Loglinear Analysis,in General Loglinear Analysis,in General Loglinear Analysis
parameter estimates,parameter estimates,parameter estimates
in General Loglinear Analysis,in General Loglinear Analysis,in General Loglinear Analysis
Wald statistic,Wald statistic,Wald statistic
in General Loglinear Analysis,in General Loglinear Analysis,in General Loglinear Analysis
odds ratio,odds ratio,odds ratio
in General Loglinear Analysis,in General Loglinear Analysis,in General Loglinear Analysis
generalized log-odds ratio,generalized log-odds ratio,generalized log-odds ratio
in General Loglinear Analysis,in General Loglinear Analysis,in General Loglinear Analysis

The General Loglinear Analysis procedure analyzes the frequency counts of observations falling into each cross-classification category in a crosstabulation or a contingency table. Each cross-classification in the table constitutes a cell, and each categorical variable is called a factor. The dependent variable is the number of cases (frequency) in a cell of the crosstabulation, and the explanatory variables are factors and covariates. This procedure estimates maximum likelihood parameters of hierarchical and nonhierarchical loglinear models using the Newton-Raphson method. Either a Poisson or a multinomial distribution can be analyzed.

You can select up to 10 factors to define the cells of a table. A cell structure variable allows you to define structural zeros for incomplete tables, include an offset term in the model, fit a log-rate model, or implement the method of adjustment of marginal tables. Contrast variables allow computation of generalized log-odds ratios (GLOR).

Model information and goodness-of-fit statistics are automatically displayed. You can also display a variety of statistics and plots or save residuals and predicted values in the active dataset.

Example. Data from a report of automobile accidents in Florida are used to determine the relationship between wearing a seat belt and whether an injury was fatal or nonfatal. The odds ratio indicates significant evidence of a relationship.

Statistics. Observed and expected frequencies; raw, adjusted, and deviance residuals; design matrix; parameter estimates; odds ratio; log-odds ratio; GLOR; Wald statistic; and confidence intervals. Plots: adjusted residuals, deviance residuals, and normal probability.

Show me

General Loglinear Analysis Data Considerations Collapse Hide details

Data. Factors are categorical, and cell covariates are continuous. When a covariate is in the model, the mean covariate value for cases in a cell is applied to that cell. Contrast variables are continuous. They are used to compute generalized log-odds ratios. The values of the contrast variable are the coefficients for the linear combination of the logs of the expected cell counts.

A cell structure variable assigns weights. For example, if some of the cells are structural zeros, the cell structure variable has a value of either 0 or 1. Do not use a cell structure variable to weight aggregated data. Instead, choose Weight Cases from the Data menu.

Assumptions. Two distributions are available in General Loglinear Analysis: Poisson and multinomial.

Under the Poisson distribution assumption:

• The total sample size is not fixed before the study, or the analysis is not conditional on the total sample size.

• The event of an observation being in a cell is statistically independent of the cell counts of other cells.

Under the multinomial distribution assumption:

• The total sample size is fixed, or the analysis is conditional on the total sample size.

• The cell counts are not statistically independent.

Related procedures. Use the Crosstabs procedure to examine the crosstabulations. Use the Logit Loglinear procedure when it is natural to regard one or more categorical variables as the response variables and the others as the explanatory variables.

Obtaining a General Loglinear Analysis Collapse Hide details

Obtaining a General Loglinear Analysis

This feature requires the Advanced Statistics option.

From the menus choose:

Analyze
Loglinear
General...

In the General Loglinear Analysis dialog box, select up to 10 factor variables.

Optionally, you can:

• Select cell covariates.

• Select a cell structure variable to define structural zeros or include an offset term.

• Select a contrast variable.

This procedure pastes GENLOG command syntax.

See GENLOG Poisson Loglinear Model Algorithms and GENLOG Multinomial Loglinear and Logit Models Algorithms for computational details for this procedure.

Related Topics

GENLOG
General Loglinear Analysis Model
General Loglinear Analysis Options
General Loglinear Analysis Save


General Loglinear Analysis Model

General Loglinear Analysis,General Loglinear Analysis,General Loglinear Analysis
model specification,model specification,model specification

Specify Model. A saturated model contains all main effects and interactions involving factor variables. It does not contain covariate terms. Select Custom to specify only a subset of interactions or to specify factor-by-covariate interactions.

Factors & Covariates. The factors and covariates are listed.

Terms in Model. The model depends on the nature of your data. After selecting Custom, you can select the main effects and interactions that are of interest in your analysis. You must indicate all of the terms to be included in the model.

Specifying Models for General Loglinear Analysis Collapse Hide details

This feature requires the Advanced Statistics option.

From the menus choose:

Analyze
Loglinear
General...

In the General Loglinear Analysis dialog box, click Model.

In the Model dialog box, select Custom.

Select one or more factors or covariates or a combination of factors and covariates.

Select a method for building terms and click the move button.

Repeat until you have all of the terms you want in the model. Do not use the same term more than once in the model.

Related Topics

Build Terms
General Loglinear Analysis
General Loglinear Analysis Options
General Loglinear Analysis Save


General Loglinear Analysis Options

General Loglinear Analysis,General Loglinear Analysis,General Loglinear Analysis
display options,display options,display options
General Loglinear Analysis,General Loglinear Analysis,General Loglinear Analysis
plots,plots,plots
General Loglinear Analysis,General Loglinear Analysis,General Loglinear Analysis
criteria,criteria,criteria
General Loglinear Analysis,General Loglinear Analysis,General Loglinear Analysis
confidence intervals,confidence intervals,confidence intervals
plots,plots,plots
in General Loglinear Analysis,in General Loglinear Analysis,in General Loglinear Analysis
confidence intervals,confidence intervals,confidence intervals
in General Loglinear Analysis,in General Loglinear Analysis,in General Loglinear Analysis

The General Loglinear Analysis procedure displays model information and goodness-of-fit statistics. In addition, you can choose one or more of the following:

Display. Several statistics are available for display--observed and expected cell frequencies; raw, adjusted, and deviance residuals; a design matrix of the model; and parameter estimates for the model.

Plot. Plots, available for custom models only, include two scatterplot matrices (adjusted residuals or deviance residuals against observed and expected cell counts). You can also display normal probability and detrended normal plots of adjusted residuals or deviance residuals.

Confidence Interval. The confidence interval for parameter estimates can be adjusted.

Criteria. The Newton-Raphson method is used to obtain maximum likelihood parameter estimates. You can enter new values for the maximum number of iterations, the convergence criterion, and delta (a constant added to all cells for initial approximations). Delta remains in the cells for saturated models.

Specifying Options for General Loglinear Analysis Collapse Hide details

This feature requires the Advanced Statistics option.

From the menus choose:

Analyze
Loglinear
General...

In the General Loglinear Analysis or Logit Loglinear Analysis dialog box, click Options.

Related Topics

General Loglinear Analysis
General Loglinear Analysis Model
General Loglinear Analysis Save


General Loglinear Analysis Save

General Loglinear Analysis,General Loglinear Analysis,General Loglinear Analysis
residuals,residuals,residuals
General Loglinear Analysis,General Loglinear Analysis,General Loglinear Analysis
saving variables,saving variables,saving variables
General Loglinear Analysis,General Loglinear Analysis,General Loglinear Analysis
saving predicted values,saving predicted values,saving predicted values
residuals,residuals,residuals
in General Loglinear Analysis,in General Loglinear Analysis,in General Loglinear Analysis
predicted values,predicted values,predicted values
in General Loglinear Analysis,in General Loglinear Analysis,in General Loglinear Analysis

Select the values you want to save as new variables in the active dataset. The suffix n in the new variable names increments to make a unique name for each saved variable.

The saved values refer to the aggregated data (cells in the contingency table), even if the data are recorded in individual observations in the Data Editor. If you save residuals or predicted values for unaggregated data, the saved value for a cell in the contingency table is entered in the Data Editor for each case in that cell. To make sense of the saved values, you should aggregate the data to obtain the cell counts.

Four types of residuals can be saved: raw, standardized, adjusted, and deviance. The predicted values can also be saved.

Expand Show details Collapse Hide details

• Residuals. Also called the simple or raw residual, it is the difference between the observed cell count and its expected count.

• Standardized residuals. The residual divided by an estimate of its standard error. Standardized residuals are also known as Pearson residuals.

• Adjusted residuals. The standardized residual divided by its estimated standard error. Since the adjusted residuals are asymptotically standard normal when the selected model is correct, they are preferred over the standardized residuals for checking for normality.

• Deviance residuals. The signed square root of an individual contribution to the likelihood-ratio chi-square statistic (G squared), where the sign is the sign of the residual (observed count minus expected count). Deviance residuals have an asymptotic standard normal distribution.

Saving New Variables Collapse Hide details

This feature requires the Advanced Statistics option.

From the menus choose:

Analyze
Loglinear
General...

In the General Loglinear Analysis dialog box, click Save.

Related Topics

General Loglinear Analysis
General Loglinear Analysis Model
General Loglinear Analysis Options


GENLOG Command Additional Features

General Loglinear Analysis,General Loglinear Analysis,General Loglinear Analysis
command additional features,command additional features,command additional features

The command syntax language also allows you to:

• Calculate linear combinations of observed cell frequencies and expected cell frequencies and print residuals, standardized residuals, and adjusted residuals of that combination (using the GERESID subcommand).

• Change the default threshold value for redundancy checking (using the CRITERIA subcommand).

• Display the standardized residuals (using the PRINT subcommand).

Related Topics

GENLOG


Logit Loglinear Analysis

Logit Loglinear Analysis,Logit Loglinear Analysis,Logit Loglinear Analysis
cell covariates,cell covariates,cell covariates
Logit Loglinear Analysis,Logit Loglinear Analysis,Logit Loglinear Analysis
contrasts,contrasts,contrasts
Logit Loglinear Analysis,Logit Loglinear Analysis,Logit Loglinear Analysis
cell structures,cell structures,cell structures
Logit Loglinear Analysis,Logit Loglinear Analysis,Logit Loglinear Analysis
loglinear analysis,loglinear analysis,loglinear analysis
Logit Loglinear Analysis,Logit Loglinear Analysis,Logit Loglinear Analysis
Logit Loglinear Analysis,Logit Loglinear Analysis,Logit Loglinear Analysis
factors,factors,factors
Logit Loglinear Analysis,Logit Loglinear Analysis,Logit Loglinear Analysis
distribution of cell counts,distribution of cell counts,distribution of cell counts
contrasts,contrasts,contrasts
in Logit Loglinear Analysis,in Logit Loglinear Analysis,in Logit Loglinear Analysis
multinomial logit models,multinomial logit models,multinomial logit models
Newton-Raphson method,Newton-Raphson method,Newton-Raphson method
in Logit Loglinear Analysis,in Logit Loglinear Analysis,in Logit Loglinear Analysis
parameter estimates,parameter estimates,parameter estimates
in Logit Loglinear Analysis,in Logit Loglinear Analysis,in Logit Loglinear Analysis
Wald statistic,Wald statistic,Wald statistic
in Logit Loglinear Analysis,in Logit Loglinear Analysis,in Logit Loglinear Analysis

The Logit Loglinear Analysis procedure analyzes the relationship between dependent (or response) variables and independent (or explanatory) variables. The dependent variables are always categorical, while the independent variables can be categorical (factors). Other independent variables, cell covariates, can be continuous, but they are not applied on a case-by-case basis. The weighted covariate mean for a cell is applied to that cell. The logarithm of the odds of the dependent variables is expressed as a linear combination of parameters. A multinomial distribution is automatically assumed; these models are sometimes called multinomial logit models. This procedure estimates parameters of logit loglinear models using the Newton-Raphson algorithm.

You can select from 1 to 10 dependent and factor variables combined. A cell structure variable allows you to define structural zeros for incomplete tables, include an offset term in the model, fit a log-rate model, or implement the method of adjustment of marginal tables. Contrast variables allow computation of generalized log-odds ratios (GLOR). The values of the contrast variable are the coefficients for the linear combination of the logs of the expected cell counts.

Model information and goodness-of-fit statistics are automatically displayed. You can also display a variety of statistics and plots or save residuals and predicted values in the active dataset.

Example. A study in Florida included 219 alligators. How does the alligators' food type vary with their size and the four lakes in which they live? The study found that the odds of a smaller alligator preferring reptiles to fish is 0.70 times lower than for larger alligators; also, the odds of selecting primarily reptiles instead of fish were highest in lake 3.

Statistics. Observed and expected frequencies; raw, adjusted, and deviance residuals; design matrix; parameter estimates; generalized log-odds ratio; Wald statistic; and confidence intervals. Plots: adjusted residuals, deviance residuals, and normal probability plots.

Show me

Logit Loglinear Analysis Data Considerations Collapse Hide details

Data. The dependent variables are categorical. Factors are categorical. Cell covariates can be continuous, but when a covariate is in the model, the mean covariate value for cases in a cell is applied to that cell. Contrast variables are continuous. They are used to compute generalized log-odds ratios (GLOR). The values of the contrast variable are the coefficients for the linear combination of the logs of the expected cell counts.

A cell structure variable assigns weights. For example, if some of the cells are structural zeros, the cell structure variable has a value of either 0 or 1. Do not use a cell structure variable to weight aggregate data. Instead, use Weight Cases on the Data menu.

Assumptions. The counts within each combination of categories of explanatory variables are assumed to have a multinomial distribution. Under the multinomial distribution assumption:

• The total sample size is fixed, or the analysis is conditional on the total sample size.

• The cell counts are not statistically independent.

Related procedures. Use the Crosstabs procedure to display the contingency tables. Use the General Loglinear Analysis procedure when you want to analyze the relationship between an observed count and a set of explanatory variables.

Obtaining a Logit Loglinear Analysis Collapse Hide details

Obtaining a Logit Loglinear Analysis

This feature requires the Advanced Statistics option.

From the menus choose:

Analyze
Loglinear
Logit...

In the Logit Loglinear Analysis dialog box, select one or more dependent variables.

Select one or more factor variables.

The total number of dependent and factor variables must be less than or equal to 10.

Optionally, you can:

• Select cell covariates.

• Select a cell structure variable to define structural zeros or include an offset term.

• Select one or more contrast variables.

This procedure pastes GENLOG command syntax.

See GENLOG Multinomial Loglinear and Logit Models Algorithms for computational details for this procedure.

Related Topics

GENLOG
Logit Loglinear Analysis Model
Logit Loglinear Analysis Options
Logit Loglinear Analysis Save


Logit Loglinear Analysis Model

Logit Loglinear Analysis,Logit Loglinear Analysis,Logit Loglinear Analysis
model specification,model specification,model specification

Specify Model. A saturated model contains all main effects and interactions involving factor variables. It does not contain covariate terms. Select Custom to specify only a subset of interactions or to specify factor-by-covariate interactions.

Factors & Covariates. The factors and covariates are listed.

Terms in Model. The model depends on the nature of your data. After selecting Custom, you can select the main effects and interactions that are of interest in your analysis. You must indicate all of the terms to be included in the model.

Terms are added to the design by taking all possible combinations of the dependent terms and matching each combination with each term in the model list. If Include constant for dependent is selected, there is also a unit term (1) added to the model list.

For example, suppose variables D1 and D2 are the dependent variables. A dependent terms list is created by the Logit Loglinear Analysis procedure (D1, D2, D1*D2). If the Terms in Model list contains M1 and M2 and a constant is included, the model list contains 1, M1, and M2. The resultant design includes combinations of each model term with each dependent term:

D1, D2, D1*D2

M1*D1, M1*D2, M1*D1*D2

M2*D1, M2*D2, M2*D1*D2

Include constant for dependent. Includes a constant for the dependent variable in a custom model.

Specifying Models for Logit Loglinear Analysis Collapse Hide details

This feature requires the Advanced Statistics option.

From the menus choose:

Analyze
Loglinear
Logit...

In the Logit Loglinear Analysis dialog box, click Model.

In the Logit Loglinear Analysis Model dialog box, select Custom.

Select one or more factors or covariates or a combination of factors and covariates.

Select a method for building terms and click the move button.

Repeat until you have all the terms you want in the model. Do not use the same term more than once in the model.

Related Topics

Build Terms
Logit Loglinear Analysis
Logit Loglinear Analysis Options
Logit Loglinear Analysis Save


Logit Loglinear Analysis Options

plots,plots,plots
in Logit Loglinear Analysis,in Logit Loglinear Analysis,in Logit Loglinear Analysis
confidence intervals,confidence intervals,confidence intervals
in Logit Loglinear Analysis,in Logit Loglinear Analysis,in Logit Loglinear Analysis
Logit Loglinear Analysis,Logit Loglinear Analysis,Logit Loglinear Analysis
display options,display options,display options
Logit Loglinear Analysis,Logit Loglinear Analysis,Logit Loglinear Analysis
plots,plots,plots
Logit Loglinear Analysis,Logit Loglinear Analysis,Logit Loglinear Analysis
criteria,criteria,criteria
Logit Loglinear Analysis,Logit Loglinear Analysis,Logit Loglinear Analysis
confidence intervals,confidence intervals,confidence intervals

The Logit Loglinear Analysis procedure displays model information and goodness-of-fit statistics. In addition, you can choose one or more of the following options:

Display. Several statistics are available for display: observed and expected cell frequencies; raw, adjusted, and deviance residuals; a design matrix of the model; and parameter estimates for the model.

Plot. Plots available for custom models include two scatterplot matrices (adjusted residuals or deviance residuals against observed and expected cell counts). You can also display normal probability and detrended normal plots of adjusted residuals or deviance residuals.

Confidence Interval. The confidence interval for parameter estimates can be adjusted.

Criteria. The Newton-Raphson method is used to obtain maximum likelihood parameter estimates. You can enter new values for the maximum number of iterations, the convergence criterion, and delta (a constant added to all cells for initial approximations). Delta remains in the cells for saturated models.

Specifying Options for Logit Loglinear Analysis Collapse Hide details

This feature requires the Advanced Statistics option.

From the menus choose:

Analyze
Loglinear
Logit...

In the Logit Loglinear Analysis dialog box, click Options.

Related Topics

Logit Loglinear Analysis
Logit Loglinear Analysis Model
Logit Loglinear Analysis Save


Logit Loglinear Analysis Save

Logit Loglinear Analysis,Logit Loglinear Analysis,Logit Loglinear Analysis
residuals,residuals,residuals
Logit Loglinear Analysis,Logit Loglinear Analysis,Logit Loglinear Analysis
saving variables,saving variables,saving variables
Logit Loglinear Analysis,Logit Loglinear Analysis,Logit Loglinear Analysis
predicted values,predicted values,predicted values
residuals,residuals,residuals
in Logit Loglinear Analysis,in Logit Loglinear Analysis,in Logit Loglinear Analysis
predicted values,predicted values,predicted values
in Logit Loglinear Analysis,in Logit Loglinear Analysis,in Logit Loglinear Analysis

Select the values you want to save as new variables in the active dataset. The suffix n in the new variable names increments to make a unique name for each saved variable.

The saved values refer to the aggregated data (to cells in the contingency table), even if the data are recorded in individual observations in the Data Editor. If you save residuals or predicted values for unaggregated data, the saved value for a cell in the contingency table is entered in the Data Editor for each case in that cell. To make sense of the saved values, you should aggregate the data to obtain the cell counts.

Four types of residuals can be saved: raw, standardized, adjusted, and deviance. The predicted values can also be saved.

Expand Show details Collapse Hide details

• Residuals. Also called the simple or raw residual, it is the difference between the observed cell count and its expected count.

• Standardized residuals. The residual divided by an estimate of its standard error. Standardized residuals are also known as Pearson residuals.

• Adjusted residuals. The standardized residual divided by its estimated standard error. Since the adjusted residuals are asymptotically standard normal when the selected model is correct, they are preferred over the standardized residuals for checking for normality.

• Deviance residuals. The signed square root of an individual contribution to the likelihood-ratio chi-square statistic (G squared), where the sign is the sign of the residual (observed count minus expected count). Deviance residuals have an asymptotic standard normal distribution.

Saving New Variables Collapse Hide details

This feature requires the Advanced Statistics option.

From the menus choose:

Analyze
Loglinear
Logit...

In the Logit Loglinear Analysis dialog box, click Save.

Related Topics

Logit Loglinear Analysis
Logit Loglinear Analysis Model
Logit Loglinear Analysis Options


GENLOG Command Additional Features

The command syntax language also allows you to:

• Calculate linear combinations of observed cell frequencies and expected cell frequencies, and print residuals, standardized residuals, and adjusted residuals of that combination (using the GERESID subcommand).

• Change the default threshold value for redundancy checking (using the CRITERIA subcommand).

• Display the standardized residuals (using the PRINT subcommand).

Related Topics

GENLOG


Life Tables

survival analysis,survival analysis,survival analysis
in Life Tables,in Life Tables,in Life Tables
censored cases,censored cases,censored cases
in Life Tables,in Life Tables,in Life Tables
Life Tables,Life Tables,Life Tables
example,example,example
Life Tables,Life Tables,Life Tables
statistics,statistics,statistics
Life Tables,Life Tables,Life Tables
survival function,survival function,survival function
Life Tables,Life Tables,Life Tables
hazard rate,hazard rate,hazard rate
Life Tables,Life Tables,Life Tables
survival function,survival function,survival function
in Life Tables,in Life Tables,in Life Tables
hazard rate,hazard rate,hazard rate
in Life Tables,in Life Tables,in Life Tables

There are many situations in which you would want to examine the distribution of times between two events, such as length of employment (time between being hired and leaving the company). However, this kind of data usually includes some cases for which the second event isn't recorded (for example, people still working for the company at the end of the study). This can happen for several reasons: for some cases, the event simply doesn't occur before the end of the study; for other cases, we lose track of their status sometime before the end of the study; still other cases may be unable to continue for reasons unrelated to the study (such as an employee becoming ill and taking a leave of absence). Collectively, such cases are known as censored cases, and they make this kind of study inappropriate for traditional techniques such as t tests or linear regression.

A statistical technique useful for this type of data is called a follow-up life table. The basic idea of the life table is to subdivide the period of observation into smaller time intervals. For each interval, all people who have been observed at least that long are used to calculate the probability of a terminal event occurring in that interval. The probabilities estimated from each of the intervals are then used to estimate the overall probability of the event occurring at different time points.

Example. Is a new nicotine patch therapy better than traditional patch therapy in helping people to quit smoking? You could conduct a study using two groups of smokers, one of which received the traditional therapy and the other of which received the experimental therapy. Constructing life tables from the data would allow you to compare overall abstinence rates between the two groups to determine if the experimental treatment is an improvement over the traditional therapy. You can also plot the survival or hazard functions and compare them visually for more detailed information.

Statistics. Number entering, number leaving, number exposed to risk, number of terminal events, proportion terminating, proportion surviving, cumulative proportion surviving (and standard error), probability density (and standard error), and hazard rate (and standard error) for each time interval for each group; median survival time for each group; and Wilcoxon (Gehan) test for comparing survival distributions between groups. Plots: function plots for survival, log survival, density, hazard rate, and one minus survival.

Show me

Life Tables Data Considerations Collapse Hide details

Data. Your time variable should be quantitative. Your status variable should be dichotomous or categorical, coded as integers, with events being coded as a single value or a range of consecutive values. Factor variables should be categorical, coded as integers.

Assumptions. Probabilities for the event of interest should depend only on time after the initial event--they are assumed to be stable with respect to absolute time. That is, cases that enter the study at different times (for example, patients who begin treatment at different times) should behave similarly. There should also be no systematic differences between censored and uncensored cases. If, for example, many of the censored cases are patients with more serious conditions, your results may be biased.

Related procedures. The Life Tables procedure uses an actuarial approach to this kind of analysis (known generally as Survival Analysis). The Kaplan-Meier Survival Analysis procedure uses a slightly different method of calculating life tables that does not rely on partitioning the observation period into smaller time intervals. This method is recommended if you have a small number of observations, such that there would be only a small number of observations in each survival time interval. If you have variables that you suspect are related to survival time or variables that you want to control for (covariates), use the Cox Regression procedure. If your covariates can have different values at different points in time for the same case, use Cox Regression with Time-Dependent Covariates.

Creating Life Tables Collapse Hide details

Creating Life Tables

This feature requires the Advanced Statistics option.

From the menus choose:

Analyze
Survival
Life Tables...

Select one numeric survival variable.

Specify the time intervals to be examined.

Select a status variable to define cases for which the terminal event has occurred.

Click Define Event to specify the value of the status variable that indicates that an event occurred.

Optionally, you can select a first-order factor variable. Actuarial tables for the survival variable are generated for each category of the factor variable.

You can also select a second-order by factor variable. Actuarial tables for the survival variable are generated for every combination of the first- and second-order factor variables.

This procedure pastes SURVIVAL command syntax.

See SURVIVAL Algorithms for computational details for this procedure.

Related Topics

SURVIVAL
Life Tables Define Events for Status Variables
Life Tables Define Range
Life Tables Options


Life Tables Define Events for Status Variables

Life Tables,Life Tables,Life Tables
survival status variables,survival status variables,survival status variables

Occurrences of the selected value or values for the status variable indicate that the terminal event has occurred for those cases. All other cases are considered to be censored. Enter either a single value or a range of values that identifies the event of interest.

Defining Events for Status Variable Collapse Hide details

This feature requires the Advanced Statistics option.

From the menus choose:

Analyze
Survival
Life Tables…

In the Life Tables dialog box, select a status variable and then click Define Event.

Select either Single value or Range of values and enter value(s).

Related Topics

Life Tables
Life Tables Define Range
Life Tables Options


Life Tables Define Range

Life Tables,Life Tables,Life Tables
factor variables,factor variables,factor variables

Cases with values for the factor variable in the range you specify will be included in the analysis, and separate tables (and plots, if requested) will be generated for each unique value in the range.

Defining a Range for a Control Variable Collapse Hide details

This feature requires the Advanced Statistics option.

From the menus choose:

Analyze
Survival
Life Tables…

In the Life Tables dialog box, select a variable for Factor or By Factor and then click Define Range.

Enter values for Minimum and Maximum.

Related Topics

Life Tables
Life Tables Define Events for Status Variables
Life Tables Options


Life Tables Options

Wilcoxon test,Wilcoxon test,Wilcoxon test
in Life Tables,in Life Tables,in Life Tables
Gehan test,Gehan test,Gehan test
in Life Tables,in Life Tables,in Life Tables
Life Tables,Life Tables,Life Tables
plots,plots,plots
Life Tables,Life Tables,Life Tables
comparing factor levels,comparing factor levels,comparing factor levels
Life Tables,Life Tables,Life Tables
suppressing table display,suppressing table display,suppressing table display
Life Tables,Life Tables,Life Tables
Wilcoxon (Gehan) test,Wilcoxon (Gehan) test,Wilcoxon (Gehan) test

You can control various aspects of your Life Tables analysis.

Life table(s). To suppress the display of life tables in the output, deselect Life table(s).

Plot. Allows you to request plots of the survival functions. If you have defined factor variable(s), plots are generated for each subgroup defined by the factor variable(s). Available plots are survival, log survival, hazard, density, and one minus survival.

Expand Show details Collapse Hide details

• Survival. Displays the cumulative survival function on a linear scale.

• Log survival. Displays the cumulative survival function on a logarithmic scale.

• Hazard. Displays the cumulative hazard function on a linear scale.

• Density. Displays the density function.

• One minus survival. Plots one-minus the survival function on a linear scale.

Compare Levels of First Factor. If you have a first-order control variable, you can select one of the alternatives in this group to perform the Wilcoxon (Gehan) test, which compares the survival of subgroups. Tests are performed on the first-order factor. If you have defined a second-order factor, tests are performed for each level of the second-order variable.

Selecting Life Tables Options Collapse Hide details

This feature requires the Advanced Statistics option.

From the menus choose:

Analyze
Survival
Life Tables…

In the Life Tables dialog box, click Options.

Related Topics

Life Tables
Life Tables Define Events for Status Variables
Life Tables Define Range


SURVIVAL Command Additional Features

Life Tables,Life Tables,Life Tables
command additional features,command additional features,command additional features

The command syntax language also allows you to:

• Specify more than one dependent variable.

• Specify unequally spaced intervals.

• Specify more than one status variable.

• Specify comparisons that do not include all the factor and all the control variables.

• Calculate approximate, rather than exact, comparisons.

Related Topics

SURVIVAL


Kaplan-Meier Survival Analysis

survival analysis,survival analysis,survival analysis
in Kaplan-Meier,in Kaplan-Meier,in Kaplan-Meier
censored cases,censored cases,censored cases
in Kaplan-Meier,in Kaplan-Meier,in Kaplan-Meier
Kaplan-Meier,Kaplan-Meier,Kaplan-Meier
example,example,example
Kaplan-Meier,Kaplan-Meier,Kaplan-Meier
statistics,statistics,statistics
Kaplan-Meier,Kaplan-Meier,Kaplan-Meier

There are many situations in which you would want to examine the distribution of times between two events, such as length of employment (time between being hired and leaving the company). However, this kind of data usually includes some censored cases. Censored cases are cases for which the second event isn't recorded (for example, people still working for the company at the end of the study). The Kaplan-Meier procedure is a method of estimating time-to-event models in the presence of censored cases. The Kaplan-Meier model is based on estimating conditional probabilities at each time point when an event occurs and taking the product limit of those probabilities to estimate the survival rate at each point in time.

Example. Does a new treatment for AIDS have any therapeutic benefit in extending life? You could conduct a study using two groups of AIDS patients, one receiving traditional therapy and the other receiving the experimental treatment. Constructing a Kaplan-Meier model from the data would allow you to compare overall survival rates between the two groups to determine whether the experimental treatment is an improvement over the traditional therapy. You can also plot the survival or hazard functions and compare them visually for more detailed information.

Statistics. Survival table, including time, status, cumulative survival and standard error, cumulative events, and number remaining; and mean and median survival time, with standard error and 95% confidence interval. Plots: survival, hazard, log survival, and one minus survival.

Show me

The Kaplan-Meier procedure is available only if you have installed the Advanced Analyze option.

Kaplan-Meier Data Considerations Collapse Hide details

Data. The time variable should be continuous, the status variable can be categorical or continuous, and the factor and strata variables should be categorical.

Assumptions. Probabilities for the event of interest should depend only on time after the initial event--they are assumed to be stable with respect to absolute time. That is, cases that enter the study at different times (for example, patients who begin treatment at different times) should behave similarly. There should also be no systematic differences between censored and uncensored cases. If, for example, many of the censored cases are patients with more serious conditions, your results may be biased.

Related procedures. The Kaplan-Meier procedure uses a method of calculating life tables that estimates the survival or hazard function at the time of each event. The Life Tables procedure uses an actuarial approach to survival analysis that relies on partitioning the observation period into smaller time intervals and may be useful for dealing with large samples. If you have variables that you suspect are related to survival time or variables that you want to control for (covariates), use the Cox Regression procedure. If your covariates can have different values at different points in time for the same case, use Cox Regression with Time-Dependent Covariates.

Obtaining a Kaplan-Meier Survival Analysis Collapse Hide details

Obtaining a Kaplan-Meier Survival Analysis

This feature requires the Advanced Statistics option.

From the menus choose:

Analyze
Survival
Kaplan-Meier...

Select a time variable.

Select a status variable to identify cases for which the terminal event has occurred. This variable can be numeric or short string. Then click Define Event.

Optionally, you can select a factor variable to examine group differences. You can also select a strata variable, which will produce separate analyses for each level (stratum) of the variable.

This procedure pastes KM command syntax.

See KM Algorithms for computational details for this procedure.

Related Topics

KM
Kaplan-Meier Define Event for Status Variable
Kaplan-Meier Compare Factor Levels
Kaplan-Meier Save New Variables
Kaplan-Meier Options


Kaplan-Meier Define Event for Status Variable

Kaplan-Meier,Kaplan-Meier,Kaplan-Meier
defining events,defining events,defining events
Kaplan-Meier,Kaplan-Meier,Kaplan-Meier
survival status variables,survival status variables,survival status variables

Enter the value or values indicating that the terminal event has occurred. You can enter a single value, a range of values, or a list of values. The Range of Values option is available only if your status variable is numeric.

Defining an Event for a Status Variable Collapse Hide details

This feature requires the Advanced Statistics option.

From the menus choose:

Analyze
Survival
Kaplan-Meier…

In the dialog box, select a status variable and then click Define Event.

Related Topics

Kaplan-Meier Survival Analysis
Kaplan-Meier Compare Factor Levels
Kaplan-Meier Save New Variables
Kaplan-Meier Options


Kaplan-Meier Compare Factor Levels

Kaplan-Meier,Kaplan-Meier,Kaplan-Meier
comparing factor levels,comparing factor levels,comparing factor levels
Kaplan-Meier,Kaplan-Meier,Kaplan-Meier
linear trend for factor levels,linear trend for factor levels,linear trend for factor levels
log rank test,log rank test,log rank test
in Kaplan-Meier,in Kaplan-Meier,in Kaplan-Meier
Breslow test,Breslow test,Breslow test
in Kaplan-Meier,in Kaplan-Meier,in Kaplan-Meier
Tarone-Ware test,Tarone-Ware test,Tarone-Ware test
in Kaplan-Meier,in Kaplan-Meier,in Kaplan-Meier

You can request statistics to test the equality of the survival distributions for the different levels of the factor. Available statistics are log rank, Breslow, and Tarone-Ware. Select one of the alternatives to specify the comparisons to be made: pooled over strata, for each stratum, pairwise over strata, or pairwise for each stratum.

Expand Show details Collapse Hide details

• Log rank. A test for comparing the equality of survival distributions. All time points are weighted equally in this test.

• Breslow. A test for comparing the equality of survival distributions. Time points are weighted by the number of cases at risk at each time point.

• Tarone-Ware. A test for comparing the equality of survival distributions. Time points are weighted by the square root of the number of cases at risk at each time point.

• Pooled over strata. Compares all factor levels in a single test to test the equality of survival curves.

• Pairwise over strata. Compares each distinct pair of factor levels. Pairwise trend tests are not available.

• For each stratum. Performs a separate test of equality of all factor levels for each stratum. If you do not have a stratification variable, the tests are not performed.

• Pairwise for each stratum. Compares each distinct pair of factor levels for each stratum. Pairwise trend tests are not available. If you do not have a stratification variable, the tests are not performed.

Linear trend for factor levels. Allows you to test for a linear trend across levels of the factor. This option is available only for overall (rather than pairwise) comparisons of factor levels.

Comparing Factor Levels Collapse Hide details

This feature requires the Advanced Statistics option.

From the menus choose:

Analyze
Survival
Kaplan-Meier…

In the Kaplan-Meier dialog box, select a factor variable and then click Compare Factor.

Related Topics

Kaplan-Meier Survival Analysis
Kaplan-Meier Define Event for Status Variable
Kaplan-Meier Save New Variables
Kaplan-Meier Options


Kaplan-Meier Save New Variables

Kaplan-Meier,Kaplan-Meier,Kaplan-Meier
saving new variables,saving new variables,saving new variables

You can save information from your Kaplan-Meier table as new variables, which can then be used in subsequent analyses to test hypotheses or check assumptions. You can save survival, standard error of survival, hazard, and cumulative events as new variables.

Expand Show details Collapse Hide details

• Survival. Cumulative survival probability estimate. The default variable name is the prefix sur_ with a sequential number appended to it. For example, if sur_1 already exists, Kaplan-Meier assigns the variable name sur_2.

• Standard error of survival. Standard error of the cumulative survival estimate. The default variable name is the prefix se_ with a sequential number appended to it. For example, if se_1 already exists, Kaplan-Meier assigns the variable name se_2.

• Hazard. Cumulative hazard function estimate. The default variable name is the prefix haz_ with a sequential number appended to it. For example, if haz_1 already exists, Kaplan-Meier assigns the variable name haz_2.

• Cumulative events. Cumulative frequency of events when cases are sorted by their survival times and status codes. The default variable name is the prefix cum_ with a sequential number appended to it. For example, if cum_1 already exists, Kaplan-Meier assigns the variable name cum_2.

Saving New Variables Collapse Hide details

This feature requires the Advanced Statistics option.

From the menus choose:

Analyze
Survival
Kaplan-Meier…

In the Kaplan-Meier dialog box, click Save.

Related Topics

Kaplan-Meier Survival Analysis
Kaplan-Meier Define Event for Status Variable
Kaplan-Meier Compare Factor Levels
Kaplan-Meier Options


Kaplan-Meier Options

Kaplan-Meier,Kaplan-Meier,Kaplan-Meier
plots,plots,plots
Kaplan-Meier,Kaplan-Meier,Kaplan-Meier
statistics,statistics,statistics
Kaplan-Meier,Kaplan-Meier,Kaplan-Meier
quartiles,quartiles,quartiles
Kaplan-Meier,Kaplan-Meier,Kaplan-Meier
mean and median survival time,mean and median survival time,mean and median survival time
Kaplan-Meier,Kaplan-Meier,Kaplan-Meier
survival tables,survival tables,survival tables

You can request various output types from Kaplan-Meier analysis.

Statistics. You can select statistics displayed for the survival functions computed, including survival table(s), mean and median survival, and quartiles. If you have included factor variables, separate statistics are generated for each group.

Plots. Plots allow you to examine the survival, one-minus-survival, hazard, and log-survival functions visually. If you have included factor variables, functions are plotted for each group.

Expand Show details Collapse Hide details

• Survival. Displays the cumulative survival function on a linear scale.

• One minus survival. Plots one-minus the survival function on a linear scale.

• Hazard. Displays the cumulative hazard function on a linear scale.

• Log survival. Displays the cumulative survival function on a logarithmic scale.

Specifying Options Collapse Hide details

This feature requires the Advanced Statistics option.

From the menus choose:

Analyze
Survival
Kaplan-Meier…

In the Kaplan-Meier dialog box, click Options.

Related Topics

Kaplan-Meier Survival Analysis
Kaplan-Meier Define Event for Status Variable
Kaplan-Meier Compare Factor Levels
Kaplan-Meier Save New Variables


KM Command Additional Features

Kaplan-Meier,Kaplan-Meier,Kaplan-Meier
command additional features,command additional features,command additional features

The command syntax language also allows you to:

• Obtain frequency tables that consider cases lost to follow-up as a separate category from censored cases.

• Specify unequal spacing for the test for linear trend.

• Obtain percentiles other than quartiles for the survival time variable.

Related Topics

KM


Cox Regression Analysis

survival analysis,survival analysis,survival analysis
in Cox Regression,in Cox Regression,in Cox Regression
Cox Regression,Cox Regression,Cox Regression
example,example,example
Cox Regression,Cox Regression,Cox Regression
statistics,statistics,statistics
Cox Regression,Cox Regression,Cox Regression
covariates,covariates,covariates
Cox Regression,Cox Regression,Cox Regression
censored cases,censored cases,censored cases
in Cox Regression,in Cox Regression,in Cox Regression
proportional hazards model,proportional hazards model,proportional hazards model
in Cox Regression,in Cox Regression,in Cox Regression

Cox Regression builds a predictive model for time-to-event data. The model produces a survival function that predicts the probability that the event of interest has occurred at a given time t for given values of the predictor variables. The shape of the survival function and the regression coefficients for the predictors are estimated from observed subjects; the model can then be applied to new cases that have measurements for the predictor variables. Note that information from censored subjects, that is, those that do not experience the event of interest during the time of observation, contributes usefully to the estimation of the model.

Example. Do men and women have different risks of developing lung cancer based on cigarette smoking? By constructing a Cox Regression model, with cigarette usage (cigarettes smoked per day) and gender entered as covariates, you can test hypotheses regarding the effects of gender and cigarette usage on time-to-onset for lung cancer.

Statistics. For each model: –2LL, the likelihood-ratio statistic, and the overall chi-square. For variables in the model: parameter estimates, standard errors, and Wald statistics. For variables not in the model: score statistics and residual chi-square.

Show me

Cox Regression Data Considerations Collapse Hide details

Data. Your time variable should be quantitative, but your status variable can be categorical or continuous. Independent variables (covariates) can be continuous or categorical; if categorical, they should be dummy- or indicator-coded (there is an option in the procedure to recode categorical variables automatically). Strata variables should be categorical, coded as integers or short strings.

Assumptions. Observations should be independent, and the hazard ratio should be constant across time; that is, the proportionality of hazards from one case to another should not vary over time. The latter assumption is known as the proportional hazards assumption.

Related procedures. If the proportional hazards assumption does not hold (see above), you may need to use the Cox with Time-Dependent Covariates procedure. If you have no covariates, or if you have only one categorical covariate, you can use the Life Tables or Kaplan-Meier procedure to examine survival or hazard functions for your sample(s). If you have no censored data in your sample (that is, every case experienced the terminal event), you can use the Linear Regression procedure to model the relationship between predictors and time-to-event.

Obtaining a Cox Regression Analysis Collapse Hide details

Obtaining a Cox Regression Analysis

This feature requires the Advanced Statistics option.

From the menus choose:

Analyze
Survival
Cox Regression...

Select a time variable. Cases whose time values are negative are not analyzed.

Select a status variable, and then click Define Event.

Select one or more covariates. To include interaction terms, select all of the variables involved in the interaction and then click >a*b>.

Optionally, you can compute separate models for different groups by defining a strata variable.

This procedure pastes COXREG command syntax.

See COXREG Algorithms for computational details for this procedure.

Related Topics

COXREG
Cox Regression Define Categorical Variables
Cox Regression Plots
Cox Regression Save New Variables
Cox Regression Options
Cox Regression Define Event for Status Variable


Cox Regression Define Categorical Variables

covariates,covariates,covariates
in Cox Regression,in Cox Regression,in Cox Regression
contrasts,contrasts,contrasts
in Cox Regression,in Cox Regression,in Cox Regression
Cox Regression,Cox Regression,Cox Regression
contrasts,contrasts,contrasts
Cox Regression,Cox Regression,Cox Regression
categorical covariates,categorical covariates,categorical covariates
string covariates,string covariates,string covariates
in Cox Regression,in Cox Regression,in Cox Regression
Cox Regression,Cox Regression,Cox Regression
string covariates,string covariates,string covariates

You can specify details of how the Cox Regression procedure will handle categorical variables.

Covariates. Lists all of the covariates specified in the main dialog box, either by themselves or as part of an interaction, in any layer. If some of these are string variables or are categorical, you can use them only as categorical covariates.

Categorical Covariates. Lists variables identified as categorical. Each variable includes a notation in parentheses indicating the contrast coding to be used. String variables (denoted by the symbol < following their names) are already present in the Categorical Covariates list. Select any other categorical covariates from the Covariates list and move them into the Categorical Covariates list.

Change Contrast. Allows you to change the contrast method. Available contrast methods are:

• Indicator. Contrasts indicate the presence or absence of category membership. The reference category is represented in the contrast matrix as a row of zeros.

• Simple. Each category of the predictor variable except the reference category is compared to the reference category.

• Difference. Each category of the predictor variable except the first category is compared to the average effect of previous categories. Also known as reverse Helmert contrasts.

• Helmert. Each category of the predictor variable except the last category is compared to the average effect of subsequent categories.

• Repeated. Each category of the predictor variable except the first category is compared to the category that precedes it.

• Polynomial. Orthogonal polynomial contrasts. Categories are assumed to be equally spaced. Polynomial contrasts are available for numeric variables only.

• Deviation. Each category of the predictor variable except the reference category is compared to the overall effect.

If you select Deviation, Simple, or Indicator, select either First or Last as the reference category. Note that the method is not actually changed until you click Change.

String covariates must be categorical covariates. To remove a string variable from the Categorical Covariates list, you must remove all terms containing the variable from the Covariates list in the main dialog box.

Defining Categorical Variables Collapse Hide details

This feature requires the Advanced Statistics option.

From the menus choose:

Analyze
Survival
Cox Regression…

In the Cox Regression dialog box, select at least one variable in the Covariates list and then click Categorical.

In the Categorical Covariates list, select the covariate(s) whose contrast method you want to change. You can change multiple covariates simultaneously.

Select a contrast method from the Contrast drop-down list.

Click Change.

Related Topics

Cox Regression Analysis
Cox Regression Plots
Cox Regression Save New Variables
Cox Regression Options
Cox Regression Define Event for Status Variable


Cox Regression Plots

Cox Regression,Cox Regression,Cox Regression
plots,plots,plots

Plots can help you to evaluate your estimated model and interpret the results. You can plot the survival, hazard, log-minus-log, and one-minus-survival functions.

Expand Show details Collapse Hide details

• Survival. Displays the cumulative survival function on a linear scale.

• Hazard. Displays the cumulative hazard function on a linear scale.

• Log minus log. The cumulative survival estimate after the ln(-ln) transformation is applied to the estimate.

• One minus survival. Plots one-minus the survival function on a linear scale.

Because these functions depend on values of the covariates, you must use constant values for the covariates to plot the functions versus time. The default is to use the mean of each covariate as a constant value, but you can enter your own values for the plot using the Change Value control group.

You can plot a separate line for each value of a categorical covariate by moving that covariate into the Separate Lines For text box. This option is available only for categorical covariates, which are denoted by (Cat) after their names in the Covariate Values Plotted At list.

Obtaining a Cox Regression Plot Collapse Hide details

This feature requires the Advanced Statistics option.

From the menus choose:

Analyze
Survival
Cox Regression…

or

Analyze
Survival
Cox w/ Time-Dep Cov…

In the Cox Regression dialog box, click Plots.

Related Topics

Cox Regression Analysis
Cox Regression Define Categorical Variables
Cox Regression Save New Variables
Cox Regression Options
Cox Regression Define Event for Status Variable


Cox Regression Save New Variables

Cox Regression,Cox Regression,Cox Regression
saving new variables,saving new variables,saving new variables
Cox Regression,Cox Regression,Cox Regression
survival function,survival function,survival function
Cox Regression,Cox Regression,Cox Regression
hazard function,hazard function,hazard function
Cox Regression,Cox Regression,Cox Regression
partial residuals,partial residuals,partial residuals
Cox Regression,Cox Regression,Cox Regression
DfBeta(s),DfBeta(s),DfBeta(s)

You can save various results of your analysis as new variables. These variables can then be used in subsequent analyses to test hypotheses or to check assumptions.

Save Model Variables. Allows you to save the survival function and its standard error, log-minus-log estimates, hazard function, partial residuals, DfBeta(s) for the regression, and the linear predictor X*Beta as new variables.

Expand Show details Collapse Hide details

• Survival function. The value of the cumulative survival function for a given time. It equals the probability of survival to that time period.

• Log minus log survival function. The cumulative survival estimate after the ln(-ln) transformation is applied to the estimate.

• Hazard function. Saves the cumulative hazard function estimate (also called the Cox-Snell residual).

• Partial residuals. You can plot partial residuals against survival time to test the proportional hazards assumption. One variable is saved for each covariate in the final model. Parital residuals are available only for models containing at least one covariate.

• DfBeta(s). Estimated change in a coefficient if a case is removed. One variable is saved for each covariate in the final model. DfBetas are only available for models containing at least one covariate.

Expand Show details Collapse Hide details

• X*Beta. Linear predictor score. The sum of the product of mean-centered covariate values and their corresponding parameter estimates for each case.

If you are running Cox with a time-dependent covariate, DfBeta(s) and the linear predictor variable X*Beta are the only variables you can save.

Export Model Information to XML File. Parameter estimates are exported to the specified file in XML format. SmartScore and PASW Statistics Server (a separate product) can use this model file to apply the model information to other data files for scoring purposes.

Saving New Variables Collapse Hide details

This feature requires the Advanced Statistics option.

From the menus choose:

Analyze
Survival
Cox Regression…

or

Analyze
Survival
Cox w/ Time-Dep Cov…

In the Cox Regression dialog box, click Save.

Related Topics

Cox Regression Analysis
Cox Regression Define Categorical Variables
Cox Regression Plots
Cox Regression Options
Cox Regression Define Event for Status Variable


Cox Regression Options

Cox Regression,Cox Regression,Cox Regression
statistics,statistics,statistics
Cox Regression,Cox Regression,Cox Regression
iterations,iterations,iterations
Cox Regression,Cox Regression,Cox Regression
baseline functions,baseline functions,baseline functions
Cox Regression,Cox Regression,Cox Regression
stepwise entry and removal,stepwise entry and removal,stepwise entry and removal

You can control various aspects of your analysis and output.

Model Statistics. You can obtain statistics for your model parameters, including confidence intervals for exp(B) and correlation of estimates. You can request these statistics either at each step or at the last step only.

Probability for Stepwise. If you have selected a stepwise method, you can specify the probability for either entry or removal from the model. A variable is entered if the significance level of its F-to-enter is less than the Entry value, and a variable is removed if the significance level is greater than the Removal value. The Entry value must be less than the Removal value.

Maximum Iterations. Allows you to specify the maximum iterations for the model, which controls how long the procedure will search for a solution.

Display baseline function. Allows you to display the baseline hazard function and cumulative survival at the mean of the covariates. This display is not available if you have specified time-dependent covariates.

Specifying Cox Regression Options Collapse Hide details

This feature requires the Advanced Statistics option.

From the menus choose:

Analyze
Survival
Cox Regression…

or

Analyze
Survival
Cox w/ Time-Dep Cov…

In the Cox Regression dialog box, click Options.

Related Topics

Cox Regression Analysis
Cox Regression Define Categorical Variables
Cox Regression Plots
Cox Regression Save New Variables
Cox Regression Define Event for Status Variable


Cox Regression Define Event for Status Variable

Cox Regression,Cox Regression,Cox Regression
define event,define event,define event
Cox Regression,Cox Regression,Cox Regression
survival status variable,survival status variable,survival status variable

Enter the value or values indicating that the terminal event has occurred. You can enter a single value, a range of values, or a list of values. The Range of Values option is available only if your status variable is numeric.

Defining an Event for Status Variable Collapse Hide details

This feature requires the Advanced Statistics option.

From the menus choose:

Analyze
Survival
Cox Regression…

or

Analyze
Survival
Cox w/ Time-Dep Cov…

In the Cox Regression dialog box, select a status variable, and then click Define Event.

Related Topics

Cox Regression Analysis
Cox Regression Define Categorical Variables
Cox Regression Plots
Cox Regression Save New Variables
Cox Regression Options


COXREG Command Additional Features

Cox Regression,Cox Regression,Cox Regression
command additional features,command additional features,command additional features

The command syntax language also allows you to:

• Obtain frequency tables that consider cases lost to follow-up as a separate category from censored cases.

• Select a reference category, other than first or last, for the deviation, simple, and indicator contrast methods.

• Specify unequal spacing of categories for the polynomial contrast method.

• Specify additional iteration criteria.

• Control the treatment of missing values.

• Specify the names for saved variables.

• Write output to an external PASW Statistics data file.

• Hold data for each split-file group in an external scratch file during processing. This can help conserve memory resources when running analyses with large datasets. This is not available with time-dependent covariates.

Related Topics

COXREG


Computing Time-Dependent Covariates

survival analysis,survival analysis,survival analysis
Time-Dependent Cox Regression,Time-Dependent Cox Regression,Time-Dependent Cox Regression
Cox Regression,Cox Regression,Cox Regression
time-dependent covariates,time-dependent covariates,time-dependent covariates
segmented time-dependent covariates,segmented time-dependent covariates,segmented time-dependent covariates
in Cox Regression,in Cox Regression,in Cox Regression

There are certain situations in which you would want to compute a Cox Regression model but the proportional hazards assumption does not hold. That is, hazard ratios change across time; the values of one (or more) of your covariates are different at different time points. In such cases, you need to use an extended Cox Regression model, which allows you to specify time-dependent covariates.

In order to analyze such a model, you must first define your time-dependent covariate. (Multiple time-dependent covariates can be specified using command syntax.) To facilitate this, a system variable representing time is available. This variable is called T_. You can use this variable to define time-dependent covariates in two general ways:

• If you want to test the proportional hazards assumption with respect to a particular covariate or estimate an extended Cox regression model that allows nonproportional hazards, you can do so by defining your time-dependent covariate as a function of the time variable T_ and the covariate in question. A common example would be the simple product of the time variable and the covariate, but more complex functions can be specified as well. Testing the significance of the coefficient of the time-dependent covariate will tell you whether the proportional hazards assumption is reasonable.

• Some variables may have different values at different time periods but aren't systematically related to time. In such cases, you need to define a segmented time-dependent covariate, which can be done using logical expressions. Logical expressions take the value 1 if true and 0 if false. Using a series of logical expressions, you can create your time-dependent covariate from a set of measurements. For example, if you have blood pressure measured once a week for the four weeks of your study (identified as BP1 to BP4), you can define your time-dependent covariate as (T_ < 1) * BP1 + (T_ >= 1 & T_ < 2) * BP2 + (T_ >= 2 & T_ < 3) * BP3 + (T_ >= 3 & T_ < 4) * BP4. Notice that exactly one of the terms in parentheses will be equal to 1 for any given case and the rest will all equal 0. In other words, this function means that if time is less than one week, use BP1; if it is more than one week but less than two weeks, use BP2, and so on.

In the Compute Time-Dependent Covariate dialog box, you can use the function-building controls to build the expression for the time-dependent covariate, or you can enter it directly in the Expression for T_COV_ text area. Note that string constants must be enclosed in quotation marks or apostrophes, and numeric constants must be typed in American format, with the dot as the decimal delimiter. The resulting variable is called T_COV_ and should be included as a covariate in your Cox Regression model.

Related Topics

Computing a Time-Dependent Covariate
Cox Regression Analysis
COXREG
Nonlinear Regression


Computing a Time-Dependent Covariate

This feature requires the Advanced Statistics option.

From the menus choose:

Analyze
Survival
Cox w/ Time-Dep Cov...

Enter an expression for the time-dependent covariate.

Click Model to proceed with your Cox Regression.

Note: Be sure to include the new variable T_COV_ as a covariate in your Cox Regression model.

Related Topics

Computing Time-Dependent Covariates


Cox Regression with Time-Dependent Covariates Additional Features

Cox Regression,Cox Regression,Cox Regression
time-dependent covariates,time-dependent covariates,time-dependent covariates

The command syntax language also allows you to specify multiple time-dependent covariates. Other command syntax features are available for Cox Regression with or without time-dependent covariates.

Related Topics

COXREG


Categorical Variable Coding Schemes

In many procedures, you can request automatic replacement of a categorical independent variable with a set of contrast variables, which will then be entered or removed from an equation as a block. You can specify how the set of contrast variables is to be coded, usually on the CONTRAST subcommand. This appendix explains and illustrates how different contrast types requested on CONTRAST actually work.

Related Topics

Deviation
Simple
Helmert
Difference
Polynomial
Repeated
Special
Indicator


Deviation

Deviation from the grand mean. In matrix terms, these contrasts have the form:

mean | ( 1/k | 1/k | ... | 1/k | 1/k )
df(1) | ( 1–1/k | –1/k | ... | –1/k | –1/k )
df(2) | ( –1/k | 1–1/k | ... | –1/k | –1/k )
. |  | . |  |  |
. |  | . |  |  |
df(k–1) | ( –1/k | –1/k | ... | 1–1/k | –1/k )

where k is the number of categories for the independent variable and the last category is omitted by default. For example, the deviation contrasts for an independent variable with three categories are as follows:

( 1/3 | 1/3 | 1/3 )
( 2/3 | –1/3 | –1/3 )
( –1/3 | 2/3 | –1/3 )

To omit a category other than the last, specify the number of the omitted category in parentheses after the DEVIATION keyword. For example, the following subcommand obtains the deviations for the first and third categories and omits the second:

/CONTRAST(FACTOR)=DEVIATION(2)

Suppose that factor has three categories. The resulting contrast matrix will be

( 1/3 | 1/3 | 1/3 )
( 2/3 | –1/3 | –1/3 )
( –1/3 | –1/3 | 2/3 )

Related Topics

Categorical Variable Coding Schemes
Simple
Helmert
Difference
Polynomial
Repeated
Special
Indicator


Simple

Simple contrasts. Compares each level of a factor to the last. The general matrix form is

mean | ( 1/k | 1/k | ... | 1/k | 1/k )
df(1) | ( 1 | 0 | ... | 0 | –1 )
df(2) | ( 0 | 1 | ... | 0 | –1 )
. |  | . |  |  |
. |  | . |  |  |
df(k–1) | ( 0 | 0 | ... | 1 | –1 )

where k is the number of categories for the independent variable. For example, the simple contrasts for an independent variable with four categories are as follows:

( 1/4 | 1/4 | 1/4 | 1/4 )
( 1 | 0 | 0 | –1 )
( 0 | 1 | 0 | –1 )
( 0 | 0 | 1 | –1 )

To use another category instead of the last as a reference category, specify in parentheses after the SIMPLE keyword the sequence number of the reference category, which is not necessarily the value associated with that category. For example, the following CONTRAST subcommand obtains a contrast matrix that omits the second category:

/CONTRAST(FACTOR) = SIMPLE(2)

Suppose that factor has four categories. The resulting contrast matrix will be

( 1/4 | 1/4 | 1/4 | 1/4 )
( 1 | –1 | 0 | 0 )
( 0 | –1 | 1 | 0 )
( 0 | –1 | 0 | 1 )

Related Topics

Categorical Variable Coding Schemes
Deviation
Helmert
Difference
Polynomial
Repeated
Special
Indicator


Helmert

Helmert contrasts. Compares categories of an independent variable with the mean of the subsequent categories. The general matrix form is

mean | ( 1/k | 1/k | ... | 1/k | 1/k )
df(1) | ( 1 | –1/(k–1) | ... | –1/(k–1) | –1/(k–1) )
df(2) | ( 0 | 1 | ... | –1/(k–2) | –1/(k–2) )
. |  | . |  |  |
. |  | . |  |  |
df(k–2) | ( 0 | 0 | 1 | –1/2 | –1/2
df(k–1) | ( 0 | 0 | ... | 1 | –1 )

where k is the number of categories of the independent variable. For example, an independent variable with four categories has a Helmert contrast matrix of the following form:

( 1/4 | 1/4 | 1/4 | 1/4 )
( 1 | –1/3 | –1/3 | –1/3 )
( 0 | 1 | –1/2 | –1/2 )
( 0 | 0 | 1 | –1 )

Related Topics

Categorical Variable Coding Schemes
Deviation
Simple
Difference
Polynomial
Repeated
Special
Indicator


Difference

Difference or reverse Helmert contrasts. Compares categories of an independent variable with the mean of the previous categories of the variable. The general matrix form is

mean | ( 1/k | 1/k | 1/k | ... | 1/k )
df(1) | ( –1 | 1 | 0 | ... | 0 )
df(2) | ( –1/2 | –1/2 | 1 | ... | 0 )
. |  | . |  |  |
. |  | . |  |  |
df(k–1) | ( –1/(k–1) | –1/(k–1) | –1/(k–1) | ... | 1 )

where k is the number of categories for the independent variable. For example, the difference contrasts for an independent variable with four categories are as follows:

( 1/4 | 1/4 | 1/4 | 1/4 )
( –1 | 1 | 0 | 0 )
( –1/2 | –1/2 | 1 | 0 )
( –1/3 | –1/3 | –1/3 | 1 )

Related Topics

Categorical Variable Coding Schemes
Deviation
Simple
Helmert
Polynomial
Repeated
Special
Indicator


Polynomial

Orthogonal polynomial contrasts. The first degree of freedom contains the linear effect across all categories; the second degree of freedom, the quadratic effect; the third degree of freedom, the cubic; and so on, for the higher-order effects.

You can specify the spacing between levels of the treatment measured by the given categorical variable. Equal spacing, which is the default if you omit the metric, can be specified as consecutive integers from 1 to k, where k is the number of categories. If the variable drug has three categories, the subcommand

/CONTRAST(DRUG)=POLYNOMIAL

is the same as

/CONTRAST(DRUG)=POLYNOMIAL(1,2,3)

Equal spacing is not always necessary, however. For example, suppose that drug represents different dosages of a drug given to three groups. If the dosage administered to the second group is twice that given to the first group and the dosage administered to the third group is three times that given to the first group, the treatment categories are equally spaced, and an appropriate metric for this situation consists of consecutive integers:

/CONTRAST(DRUG)=POLYNOMIAL(1,2,3)

If, however, the dosage administered to the second group is four times that given to the first group, and the dosage administered to the third group is seven times that given to the first group, an appropriate metric is

/CONTRAST(DRUG)=POLYNOMIAL(1,4,7)

In either case, the result of the contrast specification is that the first degree of freedom for drug contains the linear effect of the dosage levels and the second degree of freedom contains the quadratic effect.

Polynomial contrasts are especially useful in tests of trends and for investigating the nature of response surfaces. You can also use polynomial contrasts to perform nonlinear curve fitting, such as curvilinear regression.

Related Topics

Categorical Variable Coding Schemes
Deviation
Simple
Helmert
Difference
Repeated
Special
Indicator


Repeated

Compares adjacent levels of an independent variable. The general matrix form is

mean | ( 1/k | 1/k | 1/k | ... | 1/k | 1/k )
df(1) | ( 1 | –1 | 0 | ... | 0 | 0 )
df(2) | ( 0 | 1 | –1 | ... | 0 | 0 )
. |  | . |  |  |  |
. |  | . |  |  |  |
df(k–1) | ( 0 | 0 | 0 | ... | 1 | –1 )

where k is the number of categories for the independent variable. For example, the repeated contrasts for an independent variable with four categories are as follows:

( 1/4 | 1/4 | 1/4 | 1/4 )
( 1 | –1 | 0 | 0 )
( 0 | 1 | –1 | 0 )
( 0 | 0 | 1 | –1 )

These contrasts are useful in profile analysis and wherever difference scores are needed.

Related Topics

Categorical Variable Coding Schemes
Deviation
Simple
Helmert
Difference
Polynomial
Special
Indicator


Special

A user-defined contrast. Allows entry of special contrasts in the form of square matrices with as many rows and columns as there are categories of the given independent variable. For MANOVA and LOGLINEAR, the first row entered is always the mean, or constant, effect and represents the set of weights indicating how to average other independent variables, if any, over the given variable. Generally, this contrast is a vector of ones.

The remaining rows of the matrix contain the special contrasts indicating the desired comparisons between categories of the variable. Usually, orthogonal contrasts are the most useful. Orthogonal contrasts are statistically independent and are nonredundant. Contrasts are orthogonal if:

• For each row, contrast coefficients sum to 0.

• The products of corresponding coefficients for all pairs of disjoint rows also sum to 0.

For example, suppose that treatment has four levels and that you want to compare the various levels of treatment with each other. An appropriate special contrast is

( 1 | 1 | 1 | 1 ) | weights for mean calculation
( 3 | –1 | –1 | –1 ) | compare 1st with 2nd through 4th
( 0 | 2 | –1 | –1 ) | compare 2nd with 3rd and 4th
( 0 | 0 | 1 | –1 ) | compare 3rd with 4th

which you specify by means of the following CONTRAST subcommand for MANOVA, LOGISTIC REGRESSION, and COXREG:

/CONTRAST(TREATMNT)=SPECIAL( 1  1  1  1
                             3 -1 -1 -1
                             0  2 -1 -1
                             0  0  1 -1 )

For LOGLINEAR, you need to specify:

/CONTRAST(TREATMNT)=BASIS SPECIAL( 1  1  1  1
                                   3 -1 -1 -1
                                   0  2 -1 -1
                                   0  0  1 -1 )

Each row except the means row sums to 0. Products of each pair of disjoint rows sum to 0 as well:

Rows 2 and 3: | (3)(0) + (–1)(2) + (–1)(–1) + (–1)(–1) = 0
Rows 2 and 4: | (3)(0) + (–1)(0) + (–1)(1) + (–1)(–1) = 0
Rows 3 and 4: | (0)(0) + (2)(0) + (–1)(1) + (–1)(–1) = 0

The special contrasts need not be orthogonal. However, they must not be linear combinations of each other. If they are, the procedure reports the linear dependency and ceases processing. Helmert, difference, and polynomial contrasts are all orthogonal contrasts.

Related Topics

Categorical Variable Coding Schemes
Deviation
Simple
Helmert
Difference
Polynomial
Repeated
Indicator


Indicator

Indicator variable coding. Also known as dummy coding, this is not available in LOGLINEAR or MANOVA. The number of new variables coded is k–1. Cases in the reference category are coded 0 for all k–1 variables. A case in the ith category is coded 0 for all indicator variables except the ith, which is coded 1.

Related Topics

Categorical Variable Coding Schemes
Deviation
Simple
Helmert
Difference
Polynomial
Repeated
Special


Covariance Structures

Linear Mixed Models,Linear Mixed Models,Linear Mixed Models
covariance structure,covariance structure,covariance structure
Linear Mixed Models,Linear Mixed Models,Linear Mixed Models
covariance structures,covariance structures,covariance structures
in Linear Mixed Models,in Linear Mixed Models,in Linear Mixed Models
covariance structures,covariance structures,covariance structures

This section provides additional information on covariance structures.

Ante-Dependence: First-Order. This covariance structure has heterogenous variances and heterogenous correlations between adjacent elements. The correlation between two nonadjacent elements is the product of the correlations between the elements that lie between the elements of interest.

[
σ21 | σ2σ1ρ1 | σ3σ1ρ1ρ2 | σ4σ1ρ1ρ2ρ3
σ2σ1ρ1 | σ22 | σ3σ2ρ2 | σ4σ2ρ2ρ3
σ3σ1ρ1ρ2 | σ3σ2ρ2 | σ23 | σ4σ3ρ3
σ4σ1ρ1ρ2ρ3 | σ4σ2ρ2ρ3 | σ4σ3ρ3 | σ24
]

AR(1). This is a first-order autoregressive structure with homogenous variances. The correlation between any two elements is equal to rho for adjacent elements, r2 for elements that are separated by a third, and so on. r is constrained so that –1<r<1.

σ2[
1 | ρ | ρ2 | ρ3
ρ | 1 | ρ | ρ2
ρ2 | ρ | 1 | ρ
ρ3 | ρ2 | ρ | 1
]

AR(1): Heterogenous. This is a first-order autoregressive structure with heterogenous variances. The correlation between any two elements is equal to r for adjacent elements, r2 for two elements separated by a third, and so on. r is constrained to lie between –1 and 1.

[
σ21 | σ2σ1ρ | σ3σ1ρ2 | σ4σ1ρ3
σ2σ1ρ | σ22 | σ3σ2ρ | σ4σ2ρ2
σ3σ1ρ2 | σ3σ2ρ | σ23 | σ4σ3ρ
σ4σ1ρ3 | σ4σ2ρ2 | σ4σ3ρ | σ24
]

ARMA(1,1). This is a first-order autoregressive moving average structure. It has homogenous variances. The correlation between two elements is equal to f*r for adjacent elements, f*(r2) for elements separated by a third, and so on. r and f are the autoregressive and moving average parameters, respectively, and their values are constrained to lie between –1 and 1, inclusive.

σ2[
1 | φρ | φρ2 | φρ3
φρ | 1 | φρ | φρ2
φρ2 | φρ | 1 | φρ
φρ3 | φρ2 | φρ | 1
]

Compound Symmetry. This structure has constant variance and constant covariance.

[
σ2+σ21 | σ1 | σ1 | σ1
σ1 | σ2+σ21 | σ1 | σ1
σ1 | σ1 | σ2+σ21 | σ1
σ1 | σ1 | σ1 | σ2+σ21
]

Compound Symmetry: Correlation Metric. This covariance structure has homogenous variances and homogenous correlations between elements.

σ2[
1 | ρ | ρ | ρ
ρ | 1 | ρ | ρ
ρ | ρ | 1 | ρ
ρ | ρ | ρ | 1
]

Compound Symmetry: Heterogenous. This covariance structure has heterogenous variances and constant correlation between elements.

[
σ21 | σ2σ1ρ | σ3σ1ρ | σ4σ1ρ
σ2σ1ρ | σ22 | σ3σ2ρ | σ4σ2ρ
σ3σ1ρ | σ3σ2ρ | σ23 | σ4σ3ρ
σ4σ1ρ | σ4σ2ρ | σ4σ3ρ | σ24
]

Diagonal. This covariance structure has heterogenous variances and zero correlation between elements.

[
σ21 | 0 | 0 | 0
0 | σ22 | 0 | 0
0 | 0 | σ23 | 0
0 | 0 | 0 | σ24
]

Factor Analytic: First-Order. This covariance structure has heterogenous variances that are composed of a term that is heterogenous across elements and a term that is homogenous across elements. The covariance between any two elements is the square root of the product of their heterogenous variance terms.

[
λ21+d | λ2λ1 | λ3λ1 | λ4λ1
λ2λ1 | λ22+d | λ3λ2 | λ4λ2
λ3λ1 | λ3λ2 | λ23+d | λ4λ3
λ4λ1 | λ4λ2 | λ4λ3 | λ24+d
]

Factor Analytic: First-Order, Heterogenous. This covariance structure has heterogenous variances that are composed of two terms that are heterogenous across elements. The covariance between any two elements is the square root of the product of the first of their heterogenous variance terms.

[
λ21+d1 | λ2λ1 | λ3λ1 | λ4λ1
λ2λ1 | λ22+d2 | λ3λ2 | λ4λ2
λ3λ1 | λ3λ2 | λ23+d3 | λ4λ3
λ4λ1 | λ4λ2 | λ4λ3 | λ24+d4
]

Huynh-Feldt. This is a "circular" matrix in which the covariance between any two elements is equal to the average of their variances minus a constant. Neither the variances nor the covariances are constant.

[
σ21 | σ21+σ222−λ | σ21+σ232−λ | σ21+σ242−λ
σ21+σ222−λ | σ22 | σ22+σ232−λ | σ22+σ242−λ
σ21+σ232−λ | σ22+σ232−λ | σ23 | σ23+σ242−λ
σ21+σ242−λ | σ22+σ242−λ | σ23+σ242−λ | σ24
]

Scaled Identity. This structure has constant variance. There is assumed to be no correlation between any elements.

σ2[
1 | 0 | 0 | 0
0 | 1 | 0 | 0
0 | 0 | 1 | 0
0 | 0 | 0 | 1
]

Toeplitz. This covariance structure has homogenous variances and heterogenous correlations between elements. The correlation between adjacent elements is homogenous across pairs of adjacent elements. The correlation between elements separated by a third is again homogenous, and so on.

σ2[
1 | ρ1 | ρ2 | ρ3
ρ1 | 1 | ρ1 | ρ2
ρ2 | ρ1 | 1 | ρ1
ρ3 | ρ2 | ρ1 | 1
]

Toeplitz: Heterogenous. This covariance structure has heterogenous variances and heterogenous correlations between elements. The correlation between adjacent elements is homogenous across pairs of adjacent elements. The correlation between elements separated by a third is again homogenous, and so on.

[
σ21 | σ2σ1ρ1 | σ3σ1ρ2 | σ4σ1ρ3
σ2σ1ρ1 | σ22 | σ3σ2ρ1 | σ4σ2ρ2
σ3σ1ρ2 | σ3σ2ρ1 | σ23 | σ4σ3ρ1
σ4σ1ρ3 | σ4σ2ρ2 | σ4σ3ρ1 | σ24
]

Unstructured. This is a completely general covariance matrix.

[
σ21 | σ21 | σ31 | σ41
σ21 | σ22 | σ32 | σ42
σ31 | σ32 | σ23 | σ43
σ41 | σ42 | σ43 | σ24
]

Unstructured: Correlation Metric. This covariance structure has heterogenous variances and heterogenous correlations.

[
σ21 | σ2σ1ρ21 | σ3σ1ρ31 | σ4σ1ρ41
σ2σ1ρ21 | σ22 | σ3σ2ρ32 | σ4σ2ρ42
σ3σ1ρ31 | σ3σ2ρ32 | σ23 | σ4σ3ρ43
σ4σ1ρ41 | σ4σ2ρ42 | σ4σ3ρ43 | σ24
]

Variance Components. This structure assigns a scaled identity (ID) structure to each of the specified random effects.

Related Topics

Linear Mixed Models


Introduction to Bootstrapping

When collecting data, you are often interested in the properties of the population from which you took the sample. You make inferences about these population parameters with estimates computed from the sample. For example, if the Employee data.sav dataset that is included with the product is a random sample from a larger population of employees, then the sample mean of $34,419.57 for Current salary is an estimate of the mean current salary for the population of employees. Moreover, this estimate has a standard error of $784.311 for a sample of size 474, and so a 95% confidence interval for the mean current salary in the population of employees is $32,878.40 to $35,960.73. But how reliable are these estimators? For certain "known" populations and well-behaved parameters, we know quite a bit about the properties of the sample estimates, and can be confident in these results. Bootstrapping seeks to uncover more information about the properties of estimators for "unknown" populations and ill-behaved parameters.

Making parametric inferences about the population mean

How Bootstrapping Works

At its simplest, for a dataset with a sample size of N, you take B "bootstrap" samples of size N with replacement from the original dataset and compute the estimator for each of these B bootstrap samples. These B bootstrap estimates are a sample of size B from which you can make inferences about the estimator. For example, if you take 1,000 bootstrap samples from the Employee data.sav dataset, then the bootstrap estimated standard error of $776.91 for the sample mean for Current salary is an alternative to the estimate of $784.311.

Additionally, bootstrapping provides a standard error and confidence interval for the median, for which parametric estimates are unavailable.

Making bootstrap inferences about the sample mean

Support for Bootstrapping in the Product

Bootstrapping is incorporated as a subdialog in procedures that support bootstrapping. See Procedures That Support Bootstrapping for information on which procedures support bootstrapping.

When bootstrapping is requested in the dialogs, a new and separate BOOTSTRAP command is pasted in addition to the usual syntax generated by the dialog. The BOOTSTRAP command creates the bootstrap samples according to your specifications. Internally, the product treats these bootstrap samples like splits, even though they are not explicitly shown in the Data Editor. This means that, internally, there are effectively B*N cases, so the case counter in the status bar will count from 1 to B*N when processing the data during bootstrapping. The Output Management System (OMS) is used to collect the results of running the analysis on each "bootstrap split". These results are pooled, and the pooled bootstrap results displayed in the Viewer with the rest of the usual output generated by the procedure. In certain cases, you may see a reference to "bootstrap split 0"; this is the original dataset.


Bootstrapping

bootstrapping,bootstrapping,bootstrapping

Bootstrapping is a method for deriving robust estimates of standard errors and confidence intervals for estimates such as the mean, median, proportion, odds ratio, correlation coefficient or regression coefficient. It may also be used for constructing hypothesis tests. Bootstrapping is most useful as an alternative to parametric estimates when the assumptions of those methods are in doubt (as in the case of regression models with heteroscedastic residuals fit to small samples), or where parametric inference is impossible or requires very complicated formulas for the calculation of standard errors (as in the case of computing confidence intervals for the median, quartiles, and other percentiles).

Examples. A telecommunications firm loses about 27% of its customers to churn each month. In order to properly focus churn reduction efforts, management wants to know if this percentage varies across predefined customer groups. Using bootstrapping, you can determine whether a single rate of churn adequately describes the four major customer types. Show me

In a review of employee records, management is interested in the previous work experience of employees. Work experience is right skewed, which makes the mean a less desirable estimate of the "typical" previous work experience among employees than the median. However, parametric confidence intervals are not available for the median in the product. Show me

Management is also interested in determining what factors are associated with employee salary increases by fitting a linear model to the difference between current and starting salaries. When bootstrapping a linear model, you can use special resampling methods (residual and wild bootstrap) to obtain more accurate results. Show me

Many procedures support bootstrap sampling and pooling of results from analysis of bootstrap samples. Controls for specifying bootstrap analyses are integrated directly as a common subdialog in procedures that support bootstrapping. Settings on the bootstrap dialog persist across procedures so that if you run a Frequencies analysis with bootstrapping through the dialogs, bootstrapping will be turned on by default for other procedures that support it.

To Obtain a Bootstrap Analysis Collapse Hide details

To Obtain a Bootstrap Analysis

From the menus choose a procedure that supports bootstrapping and click Bootstrap.

Select Perform bootstrapping.

Optionally, you can control the following options:

Number of samples. For the percentile and BCa intervals produced, it is recommended to use at least 1000 bootstrap samples. Specify a positive integer.

Set seed for Mersenne Twister. Setting a seed allows you to replicate analyses. Using this control is similar to setting the Mersenne Twister as the active generator and specifying a fixed starting point on the Random Number Generators dialog, with the important difference that setting the seed in this dialog will preserve the current state of the random number generator and restore that state after the analysis is complete. See the topic Random Number Generators for more information.

Confidence Intervals. Specify a confidence level greater than 50 and less than 100. Percentile intervals simply use the ordered bootstrap values corresponding to the desired confidence interval percentiles. For example, a 95% percentile confidence interval uses the 2.5th and 97.5th percentiles of the bootstrap values as the lower and upper bounds of the interval (interpolating the bootstrap values if necessary). Bias corrected and accelerated (BCa) intervals are adjusted intervals that are more accurate at the cost of requiring more time to compute. See Bootstrap Estimates (bootstrapping algorithms) for computational details.

Sampling. The Simple method is case resampling with replacement from the original dataset. The Stratified method is case resampling with replacement from the original dataset, within the strata defined by the cross-classification of strata variables. Stratified bootstrap sampling can be useful when units within strata are relatively homogeneous while units across strata are very different.

Performing bootstrapping pastes BOOTSTRAP command syntax.

See Bootstrapping Algorithms for computational details.

Related Topics

Procedures That Support Bootstrapping
BOOTSTRAP Command Additional Features
BOOTSTRAP


Procedures That Support Bootstrapping

bootstrapping,bootstrapping,bootstrapping
supported procedures,supported procedures,supported procedures

The following procedures support bootstrapping.

Note:

• Bootstrapping does not work with multiply imputed datasets. If there is an Imputation_ variable in the dataset, the Bootstrap dialog is disabled.

• Bootstrapping uses listwise deletion to determine the case basis; that is, cases with missing values on any of the analysis variables are deleted from the analysis, so when bootstrapping is in effect, listwise deletion is in effect even if the analysis procedure specifies another form of missing value handling.

Statistics Base Option

Frequencies

• The Statistics table supports bootstrap estimates for the mean, standard deviation, variance, median, skewness, kurtosis, and percentiles.

• The Frequencies table supports bootstrap estimates for percent.

Descriptives

• The Descriptive Statistics table supports bootstrap estimates for the mean, standard deviation, variance, skewness, and kurtosis.

Explore

• The Descriptives table supports bootstrap estimates for the mean, 5% Trimmed Mean, standard deviation, variance, median, skewness, kurtosis, and interquartile range.

• The M-Estimators table supports bootstrap estimates for Huber's M-Estimator, Tukey's Biweight, Hampel's M-Estimator, and Andrew's Wave.

• The Percentiles table supports bootstrap estimates for percentiles.

Crosstabs

• The Directional Measures table supports bootstrap estimates for Lambda, Goodman and Kruskal Tau, Uncertainty Coefficient, and Somers' d.

• The Symmetric Measures table supports bootstrap estimates for Phi, Cramer's V, Contingency Coefficient, Kendall's tau-b, Kendall's tau-c, Gamma, Spearman Correlation, and Pearson's R.

• The Risk Estimate table supports bootstrap estimates for the odds ratio.

• The Mantel-Haenszel Common Odds Ratio table supports bootstrap estimates and significance tests for ln(Estimate).

Means

• The Report table supports bootstrap estimates for the mean, median, grouped median, standard deviation, variance, kurtosis, skewness, harmonic mean, and geometric mean.

One-Sample T Test

• The Statistics table supports bootstrap estimates for the mean and standard deviation.

• The Test table supports bootstrap estimates and significance tests for the mean difference.

Independent-Samples T Test

• The Group Statistics table supports bootstrap estimates for the mean and standard deviation.

• The Test table supports bootstrap estimates and significance tests for the mean difference.

Paired-Samples T Test

• The Statistics table supports bootstrap estimates for the mean and standard deviation.

• The Correlations table supports bootstrap estimates for correlations.

• The Test table supports bootstrap estimates for the mean.

One-Way ANOVA

• The Descriptive Statistics table supports bootstrap estimates for the mean and standard deviation.

• The Multiple Comparisons table supports bootstrap estimates for the mean difference.

• The Contrast Tests table supports bootstrap estimates and significance tests for value of contrast.

GLM Univariate

• The Descriptive Statistics table supports bootstrap estimates for the Mean and standard deviation.

• The Parameter Estimates table supports bootstrap estimates and significance tests for the coefficient, B.

• The Contrast Results table supports bootstrap estimates and significance tests for the difference.

• The Estimated Marginal Means: Estimates table supports bootstrap estimates for the mean.

• The Estimated Marginal Means: Pairwise Comparisons table supports bootstrap estimates for the mean difference.

• The Post Hoc Tests: Multiple Comparisons table supports bootstrap estimates for the Mean Difference.

Bivariate Correlations

• The Descriptive Statistics table supports bootstrap estimates for the mean and standard deviation.

• The Correlations table supports bootstrap estimates for correlations.

Note: If nonparametric correlations (Kendall's tau-b or Spearman) are requested in addition to Pearson correlations, the dialog pastes CORRELATIONS and NONPAR CORR commands with a separate BOOTSTRAP command for each. The same bootstrap samples will be used to compute all correlations.

Partial Correlations

• The Descriptive Statistics table supports bootstrap estimates for the mean and standard deviation.

• The Correlations table supports bootstrap estimates for correlations.

Linear Regression

• The Descriptive Statistics table supports bootstrap estimates for the mean and standard deviation.

• The Correlations table supports bootstrap estimates for correlations.

• The Model Summary table supports bootstrap estimates for Durbin-Watson.

• The Coefficients table supports bootstrap estimates and significance tests for the coefficient, B.

• The Correlation Coefficients table supports bootstrap estimates for correlations.

• The Residuals Statistics table supports bootstrap estimates for the mean and standard deviation.

Ordinal Regression

• The Parameter Estimates table supports bootstrap estimates and significance tests for the coefficient, B.

Discriminant Analysis

• The Standardized Canonical Discriminant Function Coefficients table supports bootstrap estimates for standardized coefficients.

• The Canonical Discriminant Function Coefficients table supports bootstrap estimates for unstandardized coefficients.

• The Classification Function Coefficients table supports bootstrap estimates for coefficients.

Advanced Statistics Option

GLM Multivariate

• The Parameter Estimates table supports bootstrap estimates and significance tests for the coefficient, B.

Linear Mixed Models

• The Estimates of Fixed Effects table supports bootstrap estimates and significance tests for the estimate.

• The Estimates of Covariance Parameters table supports bootstrap estimates and significance tests for the estimate.

Generalized Linear Models

• The Parameter Estimates table supports bootstrap estimates and significance tests for the coefficient, B.

Cox Regression

• The Variables in the Equation table supports bootstrap estimates and significance tests for the coefficient, B.

Regression Option

Binary Logistic Regression

• The Variables in the Equation table supports bootstrap estimates and significance tests for the coefficient, B.

Multinomial Logistic Regression

• The Parameter Estimates table supports bootstrap estimates and significance tests for the coefficient, B.

See Bootstrapping Algorithms for computational details for pooled results.

Related Topics

Bootstrapping
BOOTSTRAP Command Additional Features


BOOTSTRAP Command Additional Features

The command syntax language also allows you to:

• Perform residual and wild bootstrap sampling (SAMPLING subcommand)

Related Topics

Bootstrapping
Procedures That Support Bootstrapping
BOOTSTRAP


Introduction to Optimal Scaling Procedures for Categorical Data

Categories procedures use optimal scaling to analyze data that are difficult or impossible for standard statistical procedures to analyze. This chapter describes what each procedure does, the situations in which each procedure is most appropriate, the relationships between the procedures, and the relationships of these procedures to their standard statistical counterparts.

Note: These procedures and their implementation in PASW Statistics were developed by the Data Theory Scaling System Group (DTSS), consisting of members of the departments of Education and Psychology, Faculty of Social and Behavioral Sciences, Leiden University.


What Is Optimal Scaling?

The idea behind optimal scaling is to assign numerical quantifications to the categories of each variable, thus allowing standard procedures to be used to obtain a solution on the quantified variables.

The optimal scale values are assigned to categories of each variable based on the optimizing criterion of the procedure in use. Unlike the original labels of the nominal or ordinal variables in the analysis, these scale values have metric properties.

In most Categories procedures, the optimal quantification for each scaled variable is obtained through an iterative method called alternating least squares in which, after the current quantifications are used to find a solution, the quantifications are updated using that solution. The updated quantifications are then used to find a new solution, which is used to update the quantifications, and so on, until some criterion is reached that signals the process to stop.


Why Use Optimal Scaling?

Categorical data are often found in marketing research, survey research, and research in the social and behavioral sciences. In fact, many researchers deal almost exclusively with categorical data.

While adaptations of most standard models exist specifically to analyze categorical data, they often do not perform well for datasets that feature:

• Too few observations

• Too many variables

• Too many values per variable

By quantifying categories, optimal scaling techniques avoid problems in these situations. Moreover, they are useful even when specialized techniques are appropriate.

Rather than interpreting parameter estimates, the interpretation of optimal scaling output is often based on graphical displays. Optimal scaling techniques offer excellent exploratory analyses, which complement other PASW Statistics models well. By narrowing the focus of your investigation, visualizing your data through optimal scaling can form the basis of an analysis that centers on interpretation of model parameters.


Optimal Scaling Level and Measurement Level

This can be a very confusing concept when you first use Categories procedures. When specifying the level, you specify not the level at which variables are measured but the level at which they are scaled. The idea is that the variables to be quantified may have nonlinear relations regardless of how they are measured.

For Categories purposes, there are three basic levels of measurement:

• The nominal level implies that a variable's values represent unordered categories. Examples of variables that might be nominal are region, zip code area, religious affiliation, and multiple choice categories.

• The ordinal level implies that a variable's values represent ordered categories. Examples include attitude scales representing degree of satisfaction or confidence and preference rating scores.

• The numerical level implies that a variable's values represent ordered categories with a meaningful metric so that distance comparisons between categories are appropriate. Examples include age in years and income in thousands of dollars.

For example, suppose that the variables region, job, and age are coded as shown in the following table.

Coding scheme for region, job, and age
Region |  | Job |  | Age
1 | North | 1 | intern | 20 | twenty years old
2 | South | 2 | sales rep | 22 | twenty-two years old
3 | East | 3 | manager | 25 | twenty-five years old
4 | West |  |  | 27 | twenty-seven years old

The values shown represent the categories of each variable. Region would be a nominal variable. There are four categories of region, with no intrinsic ordering. Values 1 through 4 simply represent the four categories; the coding scheme is completely arbitrary. Job, on the other hand, could be assumed to be an ordinal variable. The original categories form a progression from intern to manager. Larger codes represent a job higher on the corporate ladder. However, only the order information is known--nothing can be said about the distance between adjacent categories. In contrast, age could be assumed to be a numerical variable. In the case of age, the distances between the values are intrinsically meaningful. The distance between 20 and 22 is the same as the distance between 25 and 27, while the distance between 22 and 25 is greater than either of these.


Selecting the Optimal Scaling Level

It is important to understand that there are no intrinsic properties of a variable that automatically predefine what optimal scaling level you should specify for it. You can explore your data in any way that makes sense and makes interpretation easier. By analyzing a numerical-level variable at the ordinal level, for example, the use of a nonlinear transformation may allow a solution in fewer dimensions.

The following two examples illustrate how the "obvious" level of measurement might not be the best optimal scaling level. Suppose that a variable sorts objects into age groups. Although age can be scaled as a numerical variable, it may be true that for people younger than 25 safety has a positive relation with age, whereas for people older than 60 safety has a negative relation with age. In this case, it might be better to treat age as a nominal variable.

As another example, a variable that sorts persons by political preference appears to be essentially nominal. However, if you order the parties from political left to political right, you might want the quantification of parties to respect this order by using an ordinal level of analysis.

Even though there are no predefined properties of a variable that make it exclusively one level or another, there are some general guidelines to help the novice user. With single-nominal quantification, you don't usually know the order of the categories but you want the analysis to impose one. If the order of the categories is known, you should try ordinal quantification. If the categories are unorderable, you might try multiple-nominal quantification.


Transformation Plots

The different levels at which each variable can be scaled impose different restrictions on the quantifications. Transformation plots illustrate the relationship between the quantifications and the original categories resulting from the selected optimal scaling level. For example, a linear transformation plot results when a variable is treated as numerical. Variables treated as ordinal result in a nondecreasing transformation plot. Transformation plots for variables treated nominally that are U-shaped (or the inverse) display a quadratic relationship. Nominal variables could also yield transformation plots without apparent trends by changing the order of the categories completely. The following figure displays a sample transformation plot.

Transformation plots are particularly suited to determining how well the selected optimal scaling level performs. If several categories receive similar quantifications, collapsing these categories into one category may be warranted. Alternatively, if a variable treated as nominal receives quantifications that display an increasing trend, an ordinal transformation may result in a similar fit. If that trend is linear, numerical treatment may be appropriate. However, if collapsing categories or changing scaling levels is warranted, the analysis will not change significantly.

Transformation plot of price (numerical)


Category Codes

Some care should be taken when coding categorical variables because some coding schemes may yield unwanted output or incomplete analyses. Possible coding schemes for job are displayed in the following table.

Alternative coding schemes for job
 | Scheme
Category | A | B | C | D
intern | 1 | 1 | 5 | 1
sales rep | 2 | 2 | 6 | 5
manager | 3 | 7 | 7 | 3

Some Categories procedures require that the range of every variable used be defined. Any value outside this range is treated as a missing value. The minimum category value is always 1. The maximum category value is supplied by the user. This value is not the number of categories for a variable—it is the largest category value. For example, in the table, scheme A has a maximum category value of 3 and scheme B has a maximum category value of 7, yet both schemes code the same three categories.

The variable range determines which categories will be omitted from the analysis. Any categories with codes outside the defined range are omitted from the analysis. This is a simple method for omitting categories but can result in unwanted analyses. An incorrectly defined maximum category can omit valid categories from the analysis. For example, for scheme B, defining the maximum category value to be 3 indicates that job has categories coded from 1 to 3; the manager category is treated as missing. Because no category has actually been coded 3, the third category in the analysis contains no cases. If you wanted to omit all manager categories, this analysis would be appropriate. However, if managers are to be included, the maximum category must be defined as 7, and missing values must be coded with values above 7 or below 1.

For variables treated as nominal or ordinal, the range of the categories does not affect the results. For nominal variables, only the label and not the value associated with that label is important. For ordinal variables, the order of the categories is preserved in the quantifications; the category values themselves are not important. All coding schemes resulting in the same category ordering will have identical results. For example, the first three schemes in the table are functionally equivalent if job is analyzed at an ordinal level. The order of the categories is identical in these schemes. Scheme D, on the other hand, inverts the second and third categories and will yield different results than the other schemes.

Although many coding schemes for a variable are functionally equivalent, schemes with small differences between codes are preferred because the codes have an impact on the amount of output produced by a procedure. All categories coded with values between 1 and the user-defined maximum are valid. If any of these categories are empty, the corresponding quantifications will be either system-missing or 0, depending on the procedure. Although neither of these assignments affect the analyses, output is produced for these categories. Thus, for scheme B, job has four categories that receive system-missing values. For scheme C, there are also four categories receiving system-missing indicators. In contrast, for scheme A there are no system-missing quantifications. Using consecutive integers as codes for variables treated as nominal or ordinal results in much less output without affecting the results.

Coding schemes for variables treated as numerical are more restricted than the ordinal case. For these variables, the differences between consecutive categories are important. The following table displays three coding schemes for age.

Alternative coding schemes for age
 | Scheme
Category | A | B | C
20 | 20 | 1 | 1
22 | 22 | 3 | 2
25 | 25 | 6 | 3
27 | 27 | 8 | 4

Any recoding of numerical variables must preserve the differences between the categories. Using the original values is one method for ensuring preservation of differences. However, this can result in many categories having system-missing indicators. For example, scheme A employs the original observed values. For all Categories procedures except for Correspondence Analysis, the maximum category value is 27 and the minimum category value is set to 1. The first 19 categories are empty and receive system-missing indicators. The output can quickly become rather cumbersome if the maximum category is much greater than 1 and there are many empty categories between 1 and the maximum.

To reduce the amount of output, recoding can be done. However, in the numerical case, the Automatic Recode facility should not be used. Coding to consecutive integers results in differences of 1 between all consecutive categories, and, as a result, all quantifications will be equally spaced. The metric characteristics deemed important when treating a variable as numerical are destroyed by recoding to consecutive integers. For example, scheme C in the table corresponds to automatically recoding age. The difference between categories 22 and 25 has changed from three to one, and the quantifications will reflect the latter difference.

An alternative recoding scheme that preserves the differences between categories is to subtract the smallest category value from every category and add 1 to each difference. Scheme B results from this transformation. The smallest category value, 20, has been subtracted from each category, and 1 was added to each result. The transformed codes have a minimum of 1, and all differences are identical to the original data. The maximum category value is now 8, and the zero quantifications before the first nonzero quantification are all eliminated. Yet, the nonzero quantifications corresponding to each category resulting from scheme B are identical to the quantifications from scheme A.


Which Procedure Is Best for Your Application?

The techniques embodied in four of these procedures (Correspondence Analysis, Multiple Correspondence Analysis, Categorical Principal Components Analysis, and Nonlinear Canonical Correlation Analysis) fall into the general area of multivariate data analysis known as dimension reduction. That is, relationships between variables are represented in a few dimensions—say two or three—as often as possible. This enables you to describe structures or patterns in the relationships that would be too difficult to fathom in their original richness and complexity. In market research applications, these techniques can be a form of perceptual mapping. A major advantage of these procedures is that they accommodate data with different levels of optimal scaling.

Categorical Regression describes the relationship between a categorical response variable and a combination of categorical predictor variables. The influence of each predictor variable on the response variable is described by the corresponding regression weight. As in the other procedures, data can be analyzed with different levels of optimal scaling.

Multidimensional Scaling and Multidimensional Unfolding describe relationships between objects in a low-dimensional space, using the proximities between the objects.

Following are brief guidelines for each of the procedures:

• Use Categorical Regression to predict the values of a categorical dependent variable from a combination of categorical independent variables.

• Use Categorical Principal Components Analysis to account for patterns of variation in a single set of variables of mixed optimal scaling levels.

• Use Nonlinear Canonical Correlation Analysis to assess the extent to which two or more sets of variables of mixed optimal scaling levels are correlated.

• Use Correspondence Analysis to analyze two-way contingency tables or data that can be expressed as a two-way table, such as brand preference or sociometric choice data.

• Use Multiple Correspondence Analysis to analyze a categorical multivariate data matrix when you are willing to make no stronger assumption that all variables are analyzed at the nominal level.

• Use Multidimensional Scaling to analyze proximity data to find a least-squares representation of a single set of objects in a low-dimensional space.

• Use Multidimensional Unfolding to analyze proximity data to find a least-squares representation of two sets of objects in a low-dimensional space.


Categorical Regression

The use of Categorical Regression is most appropriate when the goal of your analysis is to predict a dependent (response) variable from a set of independent (predictor) variables. As with all optimal scaling procedures, scale values are assigned to each category of every variable such that these values are optimal with respect to the regression. The solution of a categorical regression maximizes the squared correlation between the transformed response and the weighted combination of transformed predictors.

Relation to other Categories procedures. Categorical regression with optimal scaling is comparable to optimal scaling canonical correlation analysis with two sets, one of which contains only the dependent variable. In the latter technique, similarity of sets is derived by comparing each set to an unknown variable that lies somewhere between all of the sets. In categorical regression, similarity of the transformed response and the linear combination of transformed predictors is assessed directly.

Relation to standard techniques. In standard linear regression, categorical variables can either be recoded as indicator variables or be treated in the same fashion as interval level variables. In the first approach, the model contains a separate intercept and slope for each combination of the levels of the categorical variables. This results in a large number of parameters to interpret. In the second approach, only one parameter is estimated for each variable. However, the arbitrary nature of the category codings makes generalizations impossible.

If some of the variables are not continuous, alternative analyses are available. If the response is continuous and the predictors are categorical, analysis of variance is often employed. If the response is categorical and the predictors are continuous, logistic regression or discriminant analysis may be appropriate. If the response and the predictors are both categorical, loglinear models are often used.

Regression with optimal scaling offers three scaling levels for each variable. Combinations of these levels can account for a wide range of nonlinear relationships for which any single "standard" method is ill-suited. Consequently, optimal scaling offers greater flexibility than the standard approaches with minimal added complexity.

In addition, nonlinear transformations of the predictors usually reduce the dependencies among the predictors. If you compare the eigenvalues of the correlation matrix for the predictors with the eigenvalues of the correlation matrix for the optimally scaled predictors, the latter set will usually be less variable than the former. In other words, in categorical regression, optimal scaling makes the larger eigenvalues of the predictor correlation matrix smaller and the smaller eigenvalues larger.


Categorical Principal Components Analysis

The use of Categorical Principal Components Analysis is most appropriate when you want to account for patterns of variation in a single set of variables of mixed optimal scaling levels. This technique attempts to reduce the dimensionality of a set of variables while accounting for as much of the variation as possible. Scale values are assigned to each category of every variable so that these values are optimal with respect to the principal components solution. Objects in the analysis receive component scores based on the quantified data. Plots of the component scores reveal patterns among the objects in the analysis and can reveal unusual objects in the data. The solution of a categorical principal components analysis maximizes the correlations of the object scores with each of the quantified variables for the number of components (dimensions) specified.

An important application of categorical principal components is to examine preference data, in which respondents rank or rate a number of items with respect to preference. In the usual PASW Statistics data configuration, rows are individuals, columns are measurements for the items, and the scores across rows are preference scores (on a 0 to 10 scale, for example), making the data row-conditional. For preference data, you may want to treat the individuals as variables. Using the Transpose procedure, you can transpose the data. The raters become the variables, and all variables are declared ordinal. There is no objection to using more variables than objects in CATPCA.

Relation to other Categories procedures. If all variables are declared multiple nominal, categorical principal components analysis produces an analysis equivalent to a multiple correspondence analysis run on the same variables. Thus, categorical principal components analysis can be seen as a type of multiple correspondence analysis in which some of the variables are declared ordinal or numerical.

Relation to standard techniques. If all variables are scaled on the numerical level, categorical principal components analysis is equivalent to standard principal components analysis.

More generally, categorical principal components analysis is an alternative to computing the correlations between non-numerical scales and analyzing them using a standard principal components or factor-analysis approach. Naive use of the usual Pearson correlation coefficient as a measure of association for ordinal data can lead to nontrivial bias in estimation of the correlations.


Nonlinear Canonical Correlation Analysis

Nonlinear Canonical Correlation Analysis is a very general procedure with many different applications. The goal of nonlinear canonical correlation analysis is to analyze the relationships between two or more sets of variables instead of between the variables themselves, as in principal components analysis. For example, you may have two sets of variables, where one set of variables might be demographic background items on a set of respondents and a second set might be responses to a set of attitude items. The scaling levels in the analysis can be any mix of nominal, ordinal, and numerical. Optimal scaling canonical correlation analysis determines the similarity among the sets by simultaneously comparing the canonical variables from each set to a compromise set of scores assigned to the objects.

Relation to other Categories procedures. If there are two or more sets of variables with only one variable per set, optimal scaling canonical correlation analysis is equivalent to optimal scaling principal components analysis. If all variables in a one-variable-per-set analysis are multiple nominal, optimal scaling canonical correlation analysis is equivalent to multiple correspondence analysis. If there are two sets of variables, one of which contains only one variable, optimal scaling canonical correlation analysis is equivalent to categorical regression with optimal scaling.

Relation to standard techniques. Standard canonical correlation analysis is a statistical technique that finds a linear combination of one set of variables and a linear combination of a second set of variables that are maximally correlated. Given this set of linear combinations, canonical correlation analysis can find subsequent independent sets of linear combinations, referred to as canonical variables, up to a maximum number equal to the number of variables in the smaller set.

If there are two sets of variables in the analysis and all variables are defined to be numerical, optimal scaling canonical correlation analysis is equivalent to a standard canonical correlation analysis. Although PASW Statistics does not have a canonical correlation analysis procedure, many of the relevant statistics can be obtained from multivariate analysis of variance.

Optimal scaling canonical correlation analysis has various other applications. If you have two sets of variables and one of the sets contains a nominal variable declared as single nominal, optimal scaling canonical correlation analysis results can be interpreted in a similar fashion to regression analysis. If you consider the variable to be multiple nominal, the optimal scaling analysis is an alternative to discriminant analysis. Grouping the variables in more than two sets provides a variety of ways to analyze your data.


Correspondence Analysis

The goal of correspondence analysis is to make biplots for correspondence tables. In a correspondence table, the row and column variables are assumed to represent unordered categories; therefore, the nominal optimal scaling level is always used. Both variables are inspected for their nominal information only. That is, the only consideration is the fact that some objects are in the same category while others are not. Nothing is assumed about the distance or order between categories of the same variable.

One specific use of correspondence analysis is the analysis of two-way contingency tables. If a table has r active rows and c active columns, the number of dimensions in the correspondence analysis solution is the minimum of r minus 1 or c minus 1, whichever is less. In other words, you could perfectly represent the row categories or the column categories of a contingency table in a space of dimensions. Practically speaking, however, you would like to represent the row and column categories of a two-way table in a low-dimensional space, say two dimensions, for the reason that two-dimensional plots are more easily comprehensible than multidimensional spatial representations.

When fewer than the maximum number of possible dimensions is used, the statistics produced in the analysis describe how well the row and column categories are represented in the low-dimensional representation. Provided that the quality of representation of the two-dimensional solution is good, you can examine plots of the row points and the column points to learn which categories of the row variable are similar, which categories of the column variable are similar, and which row and column categories are similar to each other.

Relation to other Categories procedures. Simple correspondence analysis is limited to two-way tables. If there are more than two variables of interest, you can combine variables to create interaction variables. For example, for the variables region, job, and age, you can combine region and job to create a new variable rejob with the 12 categories shown in the following table. This new variable forms a two-way table with age (12 rows, 4 columns), which can be analyzed in correspondence analysis.

Combinations of region and job
Category code | Category definition | Category code | Category definition
1 | North, intern | 7 | East, intern
2 | North, sales rep | 8 | East, sales rep
3 | North, manager | 9 | East, manager
4 | South, intern | 10 | West, intern
5 | South, sales rep | 11 | West, sales rep
6 | South, manager | 12 | West, manager

One shortcoming of this approach is that any pair of variables can be combined. We can combine job and age, yielding another 12-category variable. Or we can combine region and age, which results in a new 16-category variable. Each of these interaction variables forms a two-way table with the remaining variable. Correspondence analyses of these three tables will not yield identical results, yet each is a valid approach. Furthermore, if there are four or more variables, two-way tables comparing an interaction variable with another interaction variable can be constructed. The number of possible tables to analyze can get quite large, even for a few variables. You can select one of these tables to analyze, or you can analyze all of them. Alternatively, the Multiple Correspondence Analysis procedure can be used to examine all of the variables simultaneously without the need to construct interaction variables.

Relation to standard techniques. The Crosstabs procedure can also be used to analyze contingency tables, with independence as a common focus in the analyses. However, even in small tables, detecting the cause of departures from independence may be difficult. The utility of correspondence analysis lies in displaying such patterns for two-way tables of any size. If there is an association between the row and column variables--that is, if the chi-square value is significant--correspondence analysis may help reveal the nature of the relationship.


Multiple Correspondence Analysis

Multiple Correspondence Analysis tries to produce a solution in which objects within the same category are plotted close together and objects in different categories are plotted far apart. Each object is as close as possible to the category points of categories that apply to the object. In this way, the categories divide the objects into homogeneous subgroups. Variables are considered homogeneous when they classify objects in the same categories into the same subgroups.

For a one-dimensional solution, multiple correspondence analysis assigns optimal scale values (category quantifications) to each category of each variable in such a way that overall, on average, the categories have maximum spread. For a two-dimensional solution, multiple correspondence analysis finds a second set of quantifications of the categories of each variable unrelated to the first set, attempting again to maximize spread, and so on. Because categories of a variable receive as many scorings as there are dimensions, the variables in the analysis are assumed to be multiple nominal in optimal scaling level.

Multiple correspondence analysis also assigns scores to the objects in the analysis in such a way that the category quantifications are the averages, or centroids, of the object scores of objects in that category.

Relation to other Categories procedures. Multiple correspondence analysis is also known as homogeneity analysis or dual scaling. It gives comparable, but not identical, results to correspondence analysis when there are only two variables. Correspondence analysis produces unique output summarizing the fit and quality of representation of the solution, including stability information. Thus, correspondence analysis is usually preferable to multiple correspondence analysis in the two-variable case. Another difference between the two procedures is that the input to multiple correspondence analysis is a data matrix, where the rows are objects and the columns are variables, while the input to correspondence analysis can be the same data matrix, a general proximity matrix, or a joint contingency table, which is an aggregated matrix in which both the rows and columns represent categories of variables. Multiple correspondence analysis can also be thought of as principal components analysis of data scaled at the multiple nominal level.

Relation to standard techniques. Multiple correspondence analysis can be thought of as the analysis of a multiway contingency table. Multiway contingency tables can also be analyzed with the Crosstabs procedure, but Crosstabs gives separate summary statistics for each category of each control variable. With multiple correspondence analysis, it is often possible to summarize the relationship between all of the variables with a single two-dimensional plot. An advanced use of multiple correspondence analysis is to replace the original category values with the optimal scale values from the first dimension and perform a secondary multivariate analysis. Since multiple correspondence analysis replaces category labels with numerical scale values, many different procedures that require numerical data can be applied after the multiple correspondence analysis. For example, the Factor Analysis procedure produces a first principal component that is equivalent to the first dimension of multiple correspondence analysis. The component scores in the first dimension are equal to the object scores, and the squared component loadings are equal to the discrimination measures. The second multiple correspondence analysis dimension, however, is not equal to the second dimension of factor analysis.


Multidimensional Scaling

The use of Multidimensional Scaling is most appropriate when the goal of your analysis is to find the structure in a set of distance measures between a single set of objects or cases. This is accomplished by assigning observations to specific locations in a conceptual low-dimensional space so that the distances between points in the space match the given (dis)similarities as closely as possible. The result is a least-squares representation of the objects in that low-dimensional space, which, in many cases, will help you further understand your data.

Relation to other Categories procedures. When you have multivariate data from which you create distances and which you then analyze with multidimensional scaling, the results are similar to analyzing the data using categorical principal components analysis with object principal normalization. This kind of PCA is also known as principal coordinates analysis.

Relation to standard techniques. The Categories Multidimensional Scaling procedure (PROXSCAL) offers several improvements upon the scaling procedure available in the Statistics Base option (ALSCAL). PROXSCAL offers an accelerated algorithm for certain models and allows you to put restrictions on the common space. Moreover, PROXSCAL attempts to minimize normalized raw stress rather than S-stress (also referred to as strain). The normalized raw stress is generally preferred because it is a measure based on the distances, while the S-stress is based on the squared distances.


Multidimensional Unfolding

The use of Multidimensional Unfolding is most appropriate when the goal of your analysis is to find the structure in a set of distance measures between two sets of objects (referred to as the row and column objects). This is accomplished by assigning observations to specific locations in a conceptual low-dimensional space so that the distances between points in the space match the given (dis)similarities as closely as possible. The result is a least-squares representation of the row and column objects in that low-dimensional space, which, in many cases, will help you further understand your data.

Relation to other Categories procedures. If your data consist of distances between a single set of objects (a square, symmetrical matrix), use Multidimensional Scaling.

Relation to standard techniques. The Categories Multidimensional Unfolding procedure (PREFSCAL) offers several improvements upon the unfolding functionality available in the Statistics Base option (through ALSCAL). PREFSCAL allows you to put restrictions on the common space; moreover, PREFSCAL attempts to minimize a penalized stress measure that helps it to avoid degenerate solutions (to which older algorithms are prone).


Aspect Ratio in Optimal Scaling Charts

Aspect ratio in optimal scaling plots is isotropic. In a two-dimensional plot, the distance representing one unit in dimension 1 is equal to the distance representing one unit in dimension 2. If you change the range of a dimension in a two-dimensional plot, the system changes the size of the other dimension to keep the physical distances equal. Isotropic aspect ratio cannot be overridden for the optimal scaling procedures.


Categorical Regression (CATREG)

Categorical Regression,Categorical Regression,Categorical Regression
Categorical Regression,Categorical Regression,Categorical Regression
statistics,statistics,statistics
Categorical Regression,Categorical Regression,Categorical Regression
plots,plots,plots

Categorical regression quantifies categorical data by assigning numerical values to the categories, resulting in an optimal linear regression equation for the transformed variables. Categorical regression is also known by the acronym CATREG, for categorical regression.

Standard linear regression analysis involves minimizing the sum of squared differences between a response (dependent) variable and a weighted combination of predictor (independent) variables. Variables are typically quantitative, with (nominal) categorical data recoded to binary or contrast variables. As a result, categorical variables serve to separate groups of cases, and the technique estimates separate sets of parameters for each group. The estimated coefficients reflect how changes in the predictors affect the response. Prediction of the response is possible for any combination of predictor values.

An alternative approach involves regressing the response on the categorical predictor values themselves. Consequently, one coefficient is estimated for each variable. However, for categorical variables, the category values are arbitrary. Coding the categories in different ways yield different coefficients, making comparisons across analyses of the same variables difficult.

CATREG extends the standard approach by simultaneously scaling nominal, ordinal, and numerical variables. The procedure quantifies categorical variables so that the quantifications reflect characteristics of the original categories. The procedure treats quantified categorical variables in the same way as numerical variables. Using nonlinear transformations allow variables to be analyzed at a variety of levels to find the best-fitting model.

Example. Categorical regression could be used to describe how job satisfaction depends on job category, geographic region, and amount of travel. You might find that high levels of satisfaction correspond to managers and low travel. The resulting regression equation could be used to predict job satisfaction for any combination of the three independent variables.

Statistics and plots. Frequencies, regression coefficients, ANOVA table, iteration history, category quantifications, correlations between untransformed predictors, correlations between transformed predictors, residual plots, and transformation plots.

Show me

Categorical Regression Data Considerations Collapse Hide details

Data. CATREG operates on category indicator variables. The category indicators should be positive integers. You can use the Discretization dialog box to convert fractional-value variables and string variables into positive integers.

Assumptions. Only one response variable is allowed, but the maximum number of predictor variables is 200. The data must contain at least three valid cases, and the number of valid cases must exceed the number of predictor variables plus one.

Related procedures. CATREG is equivalent to categorical canonical correlation analysis with optimal scaling (OVERALS) with two sets, one of which contains only one variable. Scaling all variables at the numerical level corresponds to standard multiple regression analysis.

To Obtain a Categorical Regression Collapse Hide details

To Obtain a Categorical Regression

This feature requires the Categories option.

From the menus choose:

Analyze
Regression
Optimal Scaling (CATREG)...

Expand Show details Collapse Hide details
Categorical Regression dialog box

Select the dependent variable and independent variable(s).

Click OK.

Optionally, change the scaling level for each variable.

This procedure pastes CATREG command syntax.

See CATREG Algorithms for computational details for this procedure.

Related Topics

CATREG
Optimal Scaling by Alternating Least Squares
Categorical Principal Components Analysis (CATPCA)
Nonlinear Canonical Correlation Analysis (OVERALS)
Correspondence Analysis
Multiple Correspondence Analysis
Multidimensional Scaling (PROXSCAL)
Multidimensional Unfolding (PREFSCAL)
Define Scale in Categorical Regression
Categorical Regression Discretization
Categorical Regression Missing Values
Categorical Regression Options
Categorical Regression Regularization
Categorical Regression Output
Categorical Regression Save
Categorical Regression Transformation Plots


Define Scale in Categorical Regression

Categorical Regression,Categorical Regression,Categorical Regression
optimal scaling level,optimal scaling level,optimal scaling level

You can set the optimal scaling level for the dependent and independent variables. By default, they are scaled as second-degree monotonic splines (ordinal) with two interior knots. Additionally, you can set the weight for analysis variables.

Expand Show details Collapse Hide details
Define Scale dialog box

Optimal Scaling Level. You can also select the scaling level for quantifying each variable.

• Spline Ordinal. The order of the categories of the observed variable is preserved in the optimally scaled variable. Category points will be on a straight line (vector) through the origin. The resulting transformation is a smooth monotonic piecewise polynomial of the chosen degree. The pieces are specified by the user-specified number and procedure-determined placement of the interior knots.

• Spline Nominal. The only information in the observed variable that is preserved in the optimally scaled variable is the grouping of objects in categories. The order of the categories of the observed variable is not preserved. Category points will be on a straight line (vector) through the origin. The resulting transformation is a smooth, possibly nonmonotonic, piecewise polynomial of the chosen degree. The pieces are specified by the user-specified number and procedure-determined placement of the interior knots.

• Ordinal. The order of the categories of the observed variable is preserved in the optimally scaled variable. Category points will be on a straight line (vector) through the origin. The resulting transformation fits better than the spline ordinal transformation but is less smooth.

• Nominal. The only information in the observed variable that is preserved in the optimally scaled variable is the grouping of objects in categories. The order of the categories of the observed variable is not preserved. Category points will be on a straight line (vector) through the origin. The resulting transformation fits better than the spline nominal transformation but is less smooth.

• Numeric. Categories are treated as ordered and equally spaced (interval level). The order of the categories and the equal distances between category numbers of the observed variable are preserved in the optimally scaled variable. Category points will be on a straight line (vector) through the origin. When all variables are at the numeric level, the analysis is analogous to standard principal components analysis.

To Define the Scale in CATREG Collapse Hide details

Select one or more variables on the variables list in the Categorical Regression dialog box.

Click Define Scale.

Select the optimal scaling level to be used in the analysis.

Click Continue.

Related Topics

Categorical Regression (CATREG)
Categorical Regression Discretization
Categorical Regression Missing Values
Categorical Regression Options
Categorical Regression Regularization
Categorical Regression Output
Categorical Regression Save
Categorical Regression Transformation Plots


Categorical Regression Discretization

discretization,discretization,discretization
in Categorical Regression,in Categorical Regression,in Categorical Regression

The Discretization dialog box allows you to select a method of recoding your variables. Fractional-value variables are grouped into seven categories (or into the number of distinct values of the variable if this number is less than seven) with an approximately normal distribution unless otherwise specified. String variables are always converted into positive integers by assigning category indicators according to ascending alphanumeric order. Discretization for string variables applies to these integers. Other variables are left alone by default. The discretized variables are then used in the analysis.

Expand Show details Collapse Hide details
Discretization dialog box

Method. Choose between grouping, ranking, and multiplying.

• Grouping. Recode into a specified number of categories or recode by interval.

• Ranking. The variable is discretized by ranking the cases.

• Multiplying. The current values of the variable are standardized, multiplied by 10, rounded, and have a constant added so that the lowest discretized value is 1.

Grouping. The following options are available when discretizing variables by grouping:

• Number of categories. Specify a number of categories and whether the values of the variable should follow an approximately normal or uniform distribution across those categories.

• Equal intervals. Variables are recoded into categories defined by these equally sized intervals. You must specify the length of the intervals.

To Specify CATREG Discretization Collapse Hide details

This feature requires the Categories option.

From the menus choose:

Analyze
Regression
Optimal Scaling (CATREG)...

In the Categorical Regression dialog box, click Discretization.

Select the variable(s) that you want to discretize and choose the method(s).

Click Change.

Repeat until all variables have the method that you desire.

Click Continue.

Related Topics

Categorical Regression (CATREG)
Define Scale in Categorical Regression
Categorical Regression Missing Values
Categorical Regression Options
Categorical Regression Regularization
Categorical Regression Output
Categorical Regression Save
Categorical Regression Transformation Plots


Categorical Regression Missing Values

missing values,missing values,missing values
in Categorical Regression,in Categorical Regression,in Categorical Regression

The Missing Values dialog box allows you to choose the strategy for handling missing values in analysis variables and supplementary variables.

Expand Show details Collapse Hide details
Missing Values dialog box

Strategy. Choose to exclude objects with missing values (listwise deletion) or impute missing values (active treatment).

• Exclude objects with missing values on this variable. Objects with missing values on the selected variable are excluded from the analysis. This strategy is not available for supplementary variables.

• Impute missing values. Objects with missing values on the selected variable have those values imputed. You can choose the method of imputation. Select Mode to replace missing values with the most frequent category. When there are multiple modes, the one with the smallest category indicator is used. Select Extra category to replace missing values with the same quantification of an extra category. This implies that objects with a missing value on this variable are considered to belong to the same (extra) category.

To Specify CATREG Missing Values Collapse Hide details

This feature requires the Categories option.

From the menus choose:

Analyze
Regression
Optimal Scaling (CATREG)...

In the Categorical Regression dialog box, click Missing.

Select the variable(s) for which you want to change the method of handling missing values and choose the method(s).

Click Change.

Repeat until all variables have the method that you desire.

Click Continue.

Related Topics

Categorical Regression (CATREG)
Define Scale in Categorical Regression
Categorical Regression Discretization
Categorical Regression Options
Categorical Regression Regularization
Categorical Regression Output
Categorical Regression Save
Categorical Regression Transformation Plots


Categorical Regression Options

initial configuration,initial configuration,initial configuration
in Categorical Regression,in Categorical Regression,in Categorical Regression
supplementary objects,supplementary objects,supplementary objects
in Categorical Regression,in Categorical Regression,in Categorical Regression

The Options dialog box allows you to select the initial configuration style, specify iteration and convergence criteria, select supplementary objects, and set the labeling of plots.

Expand Show details Collapse Hide details
Options dialog box

Supplementary Objects. This allows you to specify the objects that you want to treat as supplementary. Simply type the number of a supplementary object (or specify a range of cases) and click Add. You cannot weight supplementary objects (specified weights are ignored).

Initial Configuration. If no variables are treated as nominal, select the Numerical configuration. If at least one variable is treated as nominal, select the Random configuration.

Alternatively, if at least one variable has an ordinal or spline ordinal scaling level, the usual model-fitting algorithm can result in a suboptimal solution. Choosing Multiple systematic starts with all possible sign patterns to test will always find the optimal solution, but the necessary processing time rapidly increases as the number of ordinal and spline ordinal variables in the dataset increase. You can reduce the number of test patterns by specifying a percentage of loss of variance threshold, where the higher the threshold, the more sign patterns will be excluded. With this option, obtaining the optimal solution is not garantueed, but the chance of obtaining a suboptimal solution is diminished. Also, if the optimal solution is not found, the chance that the suboptimal solution is very different from the optimal solution is diminished. When multiple systematic starts are requested, the signs of the regression coefficients for each start are written to an external PASW Statistics data file or dataset in the current session. See the topic Categorical Regression Save for more information.

The results of a previous run with multiple systematic starts allows you to Use fixed signs for the regression coefficients. The signs (indicated by 1 and −1) need to be in a row of the specified dataset or file. The integer-valued starting number is the case number of the row in this file that contains the signs to be used.

Criteria. You can specify the maximum number of iterations that the regression may go through in its computations. You can also select a convergence criterion value. The regression stops iterating if the difference in total fit between the last two iterations is less than the convergence value or if the maximum number of iterations is reached.

Label Plots By. Allows you to specify whether variables and value labels or variable names and values will be used in the plots. You can also specify a maximum length for labels.

To Specify CATREG Options Collapse Hide details

This feature requires the Categories option.

From the menus choose:

Analyze
Regression
Optimal Scaling (CATREG)...

In the Categorical Regression dialog box, click Options.

Related Topics

Categorical Regression (CATREG)
Define Scale in Categorical Regression
Categorical Regression Discretization
Categorical Regression Missing Values
Categorical Regression Regularization
Categorical Regression Output
Categorical Regression Save
Categorical Regression Transformation Plots


Categorical Regression Regularization

Categorical Regression,Categorical Regression,Categorical Regression
regularization,regularization,regularization
ridge regression,ridge regression,ridge regression
in Categorical Regression,in Categorical Regression,in Categorical Regression
lasso,lasso,lasso
in Categorical Regression,in Categorical Regression,in Categorical Regression
elastic net,elastic net,elastic net
in Categorical Regression,in Categorical Regression,in Categorical Regression
Expand Show details Collapse Hide details
Regularization dialog box

Method. Regularization methods can improve the predictive error of the model by reducing the variability in the estimates of regression coefficient by shrinking the estimates toward 0. The Lasso and Elastic Net will shrink some coefficient estimates to exactly 0, thus providing a form of variable selection. When a regularization method is requested, the regularized model and coefficients for each penalty coefficient value are written to an external PASW Statistics data file or dataset in the current session. See the topic Categorical Regression Save for more information.

• Ridge regression. Ridge regression shrinks coefficients by introducing a penalty term equal to the sum of squared coefficients times a penalty coefficient. This coefficient can range from 0 (no penalty) to 1; the procedure will search for the "best" value of the penalty if you specify a range and increment.

• Lasso. The Lasso's penalty term is based on the sum of absolute coefficients, and the specification of a penalty coefficient is similar to that of Ridge regression; however, the Lasso is more computationally intensive.

• Elastic net. The Elastic Net simply combines the Lasso and Ridge regression penalties, and will search over the grid of values specified to find the "best" Lasso and Ridge regression penalty coefficients. For a given pair of Lasso and Ridge regression penalties, the Elastic Net is not much more computationally expensive than the Lasso.

Display regularization plots. These are plots of the regression coefficients versus the regularization penalty. When searching a range of values for the "best" penalty coefficient, it provides a view of how the regression coefficients change over that range.

Elastic Net Plots. For the Elastic Net method, separate regularization plots are produced by values of the Ridge regression penalty. All possible plots uses every value in the range determined by the minimum and maximum Ridge regression penalty values specified. For some Ridge penalties allows you to specify a subset of the values in the range determined by the minimum and maximum. Simply type the number of a penalty value (or specify a range of values) and click Add.

To Specify CATREG Regularization Collapse Hide details

This feature requires the Categories option.

From the menus choose:

Analyze
Regression
Optimal Scaling (CATREG)...

In the Categorical Regression dialog box, click Regularization.

Select the regularization options that you want.

Click Continue.

Related Topics

Categorical Regression (CATREG)
Define Scale in Categorical Regression
Categorical Regression Discretization
Categorical Regression Missing Values
Categorical Regression Options
Categorical Regression Output
Categorical Regression Save
Categorical Regression Transformation Plots


Categorical Regression Output

multiple R,multiple R,multiple R
in Categorical Regression,in Categorical Regression,in Categorical Regression
ANOVA,ANOVA,ANOVA
in Categorical Regression,in Categorical Regression,in Categorical Regression
regression coefficients,regression coefficients,regression coefficients
in Categorical Regression,in Categorical Regression,in Categorical Regression
category quantifications,category quantifications,category quantifications
in Categorical Regression,in Categorical Regression,in Categorical Regression
descriptive statistics,descriptive statistics,descriptive statistics
in Categorical Regression,in Categorical Regression,in Categorical Regression

The Output dialog box allows you to select the statistics to display in the output.

Expand Show details Collapse Hide details
Output dialog box

Tables. Produces tables for:

• Multiple R. Includes R2, adjusted R2, and adjusted R2 taking the optimal scaling into account.

• ANOVA. This option includes regression and residual sums of squares, mean squares, and F. Two ANOVA tables are displayed: one with degrees of freedom for the regression equal to the number of predictor variables and one with degrees of freedom for the regression taking the optimal scaling into account.

• Coefficients. This option gives three tables: a Coefficients table that includes betas, standard error of the betas, t values, and significance; a Coefficients-Optimal Scaling table with the standard error of the betas taking the optimal scaling degrees of freedom into account; and a table with the zero-order, part, and partial correlation, Pratt's relative importance measure for the transformed predictors, and the tolerance before and after transformation.

• Iteration history. For each iteration, including the starting values for the algorithm, the multiple R and regression error are shown. The increase in multiple R is listed starting from the first iteration.

• Correlations of original variables. A matrix showing the correlations between the untransformed variables is displayed.

• Correlations of transformed variables. A matrix showing the correlations between the transformed variables is displayed.

• Regularized models and coefficients. Displays penalty values, R-square, and the regression coefficients for each regularized model. If a resampling method is specified or if supplementary objects (test cases) are specified, it also displays the prediction error or test MSE.

Resampling. Resampling methods give you an estimate of the prediction error of the model.

• Crossvalidation. Crossvalidation divides the sample into a number of subsamples, or folds. Categorical regression models are then generated, excluding the data from each subsample in turn. The first model is based on all of the cases except those in the first sample fold, the second model is based on all of the cases except those in the second sample fold, and so on. For each model, the prediction error is estimated by applying the model to the subsample excluded in generating it.

• .632 Bootstrap. With the bootstrap, observations are drawn randomly from the data with replacement, repeating this process a number of times to obtain a number bootstrap samples. A model is fit for each bootstrap sample, and the prediction error for each model is estimated by this fitted model is then applied to the cases not in the bootstrap sample.

Category Quantifications. Tables showing the transformed values of the selected variables are displayed.

Descriptive Statistics. Tables showing the frequencies, missing values, and modes of the selected variables are displayed.

To Specify CATREG Output Collapse Hide details

This feature requires the Categories option.

From the menus choose:

Analyze
Regression
Optimal Scaling (CATREG)...

In the Categorical Regression dialog box, click Output.

Select the output that you want.

Click Continue.

Related Topics

Categorical Regression (CATREG)
Define Scale in Categorical Regression
Categorical Regression Discretization
Categorical Regression Missing Values
Categorical Regression Options
Categorical Regression Regularization
Categorical Regression Save
Categorical Regression Transformation Plots


Categorical Regression Save

Categorical Regression,Categorical Regression,Categorical Regression
save,save,save

The Save dialog box allows you to save predicted values, residuals, and transformed values to the active dataset and/or save discretized data, transformed values, regularized models and coefficients, and signs of regression coefficients to an external PASW Statistics data file or dataset in the current session.

• Datasets are available during the current session but are not available in subsequent sessions unless you explicitly save them as data files. Dataset names must adhere to variable naming rules. See the topic Variable Names for more information.

• Filenames or dataset names must be different for each type of data saved.

Expand Show details Collapse Hide details
Save dialog box

Regularized models and coefficients are saved whenever a regularization method is selected on the Regularization dialog. By default, the procedure creates a new dataset with a unique name, but you can of course specify a name of your own choosing or write to an external file.

Signs of regression coefficients are saved whenever multiple systematic starts are used as the initial configuration on the Options dialog. By default, the procedure creates a new dataset with a unique name, but you can of course specify a name of your own choosing or write to an external file.

To Save Results in Categorical Regression Collapse Hide details

This feature requires the Categories option.

From the menus choose:

Analyze
Regression
Optimal Scaling (CATREG)...

In the Categorical Regression dialog box, click Save.

Select the results you want to save.

Click Continue.

Related Topics

Categorical Regression (CATREG)
Define Scale in Categorical Regression
Categorical Regression Discretization
Categorical Regression Missing Values
Categorical Regression Options
Categorical Regression Regularization
Categorical Regression Output
Categorical Regression Transformation Plots


Categorical Regression Transformation Plots

plots,plots,plots
in Categorical Regression,in Categorical Regression,in Categorical Regression

The Plots dialog box allows you to specify the variables that will produce transformation and residual plots.

Expand Show details Collapse Hide details
Plots dialog box

Transformation Plots. For each of these variables, the category quantifications are plotted against the original category values. Empty categories appear on the horizontal axis but do not affect the computations. These categories are identified by breaks in the line connecting the quantifications.

Residual Plots. For each of these variables, residuals (computed for the dependent variable predicted from all predictor variables except the predictor variable in question) are plotted against category indicators and the optimal category quantifications multiplied with beta against category indicators.

To Obtain Plots in CATREG Collapse Hide details

Select the dependent and independent variables in the Categorical Regression dialog box.

Click Plot.

Select the variables for which transformation or residuals plots will be produced.

Click Continue.

Related Topics

Categorical Regression (CATREG)
Define Scale in Categorical Regression
Categorical Regression Discretization
Categorical Regression Missing Values
Categorical Regression Options
Categorical Regression Regularization
Categorical Regression Output
Categorical Regression Save


CATREG Command Additional Features

Categorical Regression,Categorical Regression,Categorical Regression
command additional features,command additional features,command additional features

You can customize your categorical regression if you paste your selections into a syntax window and edit the resulting CATREG command syntax. The command syntax language also allows you to:

• Specify rootnames for the transformed variables when saving them to the active dataset (with the SAVE subcommand).

Related Topics

CATREG


Optimal Scaling by Alternating Least Squares

Optimal Scaling by Alternating Least Squares,Optimal Scaling by Alternating Least Squares,Optimal Scaling by Alternating Least Squares

The combination of measurement level and number of sets that you choose in this dialog box determines which of the Optimal Scaling by Alternating Least Squares procedures you perform.

Measurement Level. You can specify the optimal scaling level for variables used in the analysis.

• All variables multiple nominal. All variables in the analysis have category quantifications that can be different for each dimension.

• Some variable(s) not multiple nominal. One or more variables in the analysis are scaled at a level other than multiple nominal. Other possible scaling levels are single nominal, ordinal, and discrete numeric.

Number of Sets of Variables. You can specify how many groups of variables are to be compared with other groups of variables.

• One set. The data contain one group of variables.

• Multiple sets. The data contain more than one group of variables. If this option is selected, Nonlinear Canonical Correlation is chosen.

Selected Analysis. The combination of choices for Measurement Level and Number of Sets of Variables yield either multiple correspondence analysis, categorical principal components analysis, or nonlinear canonical correlation analysis. The settings for each procedure are:

• Multiple Correspondence Analysis. Select All variables multiple nominal and One set.

• Categorical Principal Components Analysis. Select Some variable(s) not multiple nominal and One Set.

• Nonlinear Canonical Correlation Analysis. Select Multiple Sets.

Related Topics

Categorical Regression (CATREG)
Categorical Principal Components Analysis (CATPCA)
Nonlinear Canonical Correlation Analysis (OVERALS)
Correspondence Analysis
Multiple Correspondence Analysis
Multidimensional Scaling (PROXSCAL)
Multidimensional Unfolding (PREFSCAL)


Categorical Principal Components Analysis (CATPCA)

Categorical Principal Components Analysis,Categorical Principal Components Analysis,Categorical Principal Components Analysis

This procedure simultaneously quantifies categorical variables while reducing the dimensionality of the data. Categorical principal components analysis is also known by the acronym CATPCA, for categorical principal components analysis.

The goal of principal components analysis is to reduce an original set of variables into a smaller set of uncorrelated components that represent most of the information found in the original variables. The technique is most useful when a large number of variables prohibits effective interpretation of the relationships between objects (subjects and units). By reducing the dimensionality, you interpret a few components rather than a large number of variables.

Standard principal components analysis assumes linear relationships between numeric variables. On the other hand, the optimal-scaling approach allows variables to be scaled at different levels. Categorical variables are optimally quantified in the specified dimensionality. As a result, nonlinear relationships between variables can be modeled.

Example. Categorical principal components analysis could be used to graphically display the relationship between job category, job division, region, amount of travel (high, medium, and low), and job satisfaction. You might find that two dimensions account for a large amount of variance. The first dimension might separate job category from region, whereas the second dimension might separate job division from amount of travel. You also might find that high job satisfaction is related to a medium amount of travel.

Statistics and plots. Frequencies, missing values, optimal scaling level, mode, variance accounted for by centroid coordinates, vector coordinates, total per variable and per dimension, component loadings for vector-quantified variables, category quantifications and coordinates, iteration history, correlations of the transformed variables and eigenvalues of the correlation matrix, correlations of the original variables and eigenvalues of the correlation matrix, object scores, category plots, joint category plots, transformation plots, residual plots, projected centroid plots, object plots, biplots, triplots, and component loadings plots.

Show me

Categorical Principal Components Analysis Data Considerations Collapse Hide details

Data. String variable values are always converted into positive integers by ascending alphanumeric order. User-defined missing values, system-missing values, and values less than 1 are considered missing; you can recode or add a constant to variables with values less than 1 to make them nonmissing.

Assumptions. The data must contain at least three valid cases. The analysis is based on positive integer data. The discretization option will automatically categorize a fractional-valued variable by grouping its values into categories with a close to "normal" distribution and will automatically convert values of string variables into positive integers. You can specify other discretization schemes.

Related procedures. Scaling all variables at the numeric level corresponds to standard principal components analysis. Alternate plotting features are available by using the transformed variables in a standard linear principal components analysis. If all variables have multiple nominal scaling levels, categorical principal components analysis is identical to multiple correspondence analysis. If sets of variables are of interest, categorical (nonlinear) canonical correlation analysis should be used.

To Obtain a Categorical Principal Components Analysis Collapse Hide details

To Obtain a Categorical Principal Components Analysis

This feature requires the Categories option.

From the menus choose:

Analyze
Dimension Reduction
Optimal Scaling...

Expand Show details Collapse Hide details
Optimal Scaling dialog box

Select Some variable(s) not multiple nominal.

Select One set.

Click Define.

Expand Show details Collapse Hide details
Categorical Principal Components dialog box

Select at least two analysis variables and specify the number of dimensions in the solution.

Click OK.

You may optionally specify supplementary variables, which are fitted into the solution found, or labeling variables for the plots.

This procedure pastes CATPCA command syntax.

See CATPCA Algorithms for computational details for this procedure.

Related Topics

CATPCA
Categorical Regression (CATREG)
Optimal Scaling by Alternating Least Squares
Nonlinear Canonical Correlation Analysis (OVERALS)
Correspondence Analysis
Multiple Correspondence Analysis
Multidimensional Scaling (PROXSCAL)
Multidimensional Unfolding (PREFSCAL)
Define Scale and Weight in CATPCA
Categorical Principal Components Analysis Discretization
Categorical Principal Components Analysis Missing Values
Categorical Principal Components Analysis Options
Categorical Principal Components Analysis Output
Categorical Principal Components Analysis Save
Categorical Principal Components Analysis Object Plots
Categorical Principal Components Analysis Category Plots
Categorical Principal Components Analysis Loading Plots


Define Scale and Weight in CATPCA

Categorical Principal Components Analysis,Categorical Principal Components Analysis,Categorical Principal Components Analysis
optimal scaling level,optimal scaling level,optimal scaling level
optimal scaling level,optimal scaling level,optimal scaling level
in Categorical Principal Components Analysis,in Categorical Principal Components Analysis,in Categorical Principal Components Analysis
variable weight,variable weight,variable weight
in Categorical Principal Components Analysis,in Categorical Principal Components Analysis,in Categorical Principal Components Analysis

You can set the optimal scaling level for analysis variables and supplementary variables. By default, they are scaled as second-degree monotonic splines (ordinal) with two interior knots. Additionally, you can set the weight for analysis variables.

Expand Show details Collapse Hide details
Define Scale and Weight dialog box

Variable weight. You can choose to define a weight for each variable. The value specified must be a positive integer. The default value is 1.

Optimal Scaling Level. You can also select the scaling level to be used to quantify each variable.

• Spline ordinal. The order of the categories of the observed variable is preserved in the optimally scaled variable. Category points will be on a straight line (vector) through the origin. The resulting transformation is a smooth monotonic piecewise polynomial of the chosen degree. The pieces are specified by the user-specified number and procedure-determined placement of the interior knots.

• Spline nominal. The only information in the observed variable that is preserved in the optimally scaled variable is the grouping of objects in categories. The order of the categories of the observed variable is not preserved. Category points will be on a straight line (vector) through the origin. The resulting transformation is a smooth, possibly nonmonotonic, piecewise polynomial of the chosen degree. The pieces are specified by the user-specified number and procedure-determined placement of the interior knots.

• Multiple nominal. The only information in the observed variable that is preserved in the optimally scaled variable is the grouping of objects in categories. The order of the categories of the observed variable is not preserved. Category points will be in the centroid of the objects in the particular categories. Multiple indicates that different sets of quantifications are obtained for each dimension.

• Ordinal. The order of the categories of the observed variable is preserved in the optimally scaled variable. Category points will be on a straight line (vector) through the origin. The resulting transformation fits better than the spline ordinal transformation but is less smooth.

• Nominal. The only information in the observed variable that is preserved in the optimally scaled variable is the grouping of objects in categories. The order of the categories of the observed variable is not preserved. Category points will be on a straight line (vector) through the origin. The resulting transformation fits better than the spline nominal transformation but is less smooth.

• Numeric. Categories are treated as ordered and equally spaced (interval level). The order of the categories and the equal distances between category numbers of the observed variable are preserved in the optimally scaled variable. Category points will be on a straight line (vector) through the origin. When all variables are at the numeric level, the analysis is analogous to standard principal components analysis.

To Define an Optimal Scaling Scale and Weight in CATPCA Collapse Hide details

Select a variable in the Analysis Variables list in the Categorical Principal Components dialog box.

Click Define Scale and Weight.

Enter the weight value for the variable.

Select the optimal scaling level to be used in the analysis. If you choose a spline transformation, you must also specify the degree of the polynomial and the number of interior knots.

Click Continue.

You can alternatively define the scaling level for supplementary variables by selecting them from the list and clicking Define Scale.

Related Topics

Categorical Principal Components Analysis (CATPCA)
Categorical Principal Components Analysis Discretization
Categorical Principal Components Analysis Missing Values
Categorical Principal Components Analysis Options
Categorical Principal Components Analysis Output
Categorical Principal Components Analysis Save
Categorical Principal Components Analysis Object Plots
Categorical Principal Components Analysis Category Plots
Categorical Principal Components Analysis Loading Plots


Categorical Principal Components Analysis Discretization

discretization,discretization,discretization
in Categorical Principal Components Analysis,in Categorical Principal Components Analysis,in Categorical Principal Components Analysis

The Discretization dialog box allows you to select a method of recoding your variables. Fractional-valued variables are grouped into seven categories (or into the number of distinct values of the variable if this number is less than seven) with an approximately normal distribution, unless specified otherwise. String variables are always converted into positive integers by assigning category indicators according to ascending alphanumeric order. Discretization for string variables applies to these integers. Other variables are left alone by default. The discretized variables are then used in the analysis.

Expand Show details Collapse Hide details
Discretization dialog box

Method. Choose between grouping, ranking, and multiplying.

• Grouping. Recode into a specified number of categories or recode by interval.

• Ranking. The variable is discretized by ranking the cases.

• Multiplying. The current values of the variable are standardized, multiplied by 10, rounded, and have a constant added such that the lowest discretized value is 1.

Grouping. The following options are available when you are discretizing variables by grouping:

• Number of categories. Specify a number of categories and whether the values of the variable should follow an approximately normal or uniform distribution across those categories.

• Equal intervals. Variables are recoded into categories defined by these equally sized intervals. You must specify the length of the intervals.

To Specify CATPCA Discretization Collapse Hide details

This feature requires the Categories option.

From the menus choose:

Analyze
Dimension Reduction
Optimal Scaling...

In the Categorical Principal Components dialog box, click Discretization.

Select the variable(s) that you want to discretize and choose the method(s).

Related Topics

Categorical Principal Components Analysis (CATPCA)
Define Scale and Weight in CATPCA
Categorical Principal Components Analysis Missing Values
Categorical Principal Components Analysis Options
Categorical Principal Components Analysis Output
Categorical Principal Components Analysis Save
Categorical Principal Components Analysis Object Plots
Categorical Principal Components Analysis Category Plots
Categorical Principal Components Analysis Loading Plots


Categorical Principal Components Analysis Missing Values

missing values,missing values,missing values
in Categorical Principal Components Analysis,in Categorical Principal Components Analysis,in Categorical Principal Components Analysis

The Missing Values dialog box allows you to choose the strategy for handling missing values in analysis variables and supplementary variables.

Expand Show details Collapse Hide details
Missing Values dialog box

Strategy. Choose to exclude missing values (passive treatment), impute missing values (active treatment), or exclude objects with missing values (listwise deletion).

• Exclude missing values; for correlations impute after quantification. Objects with missing values on the selected variable do not contribute to the analysis for this variable. If all variables are given passive treatment, then objects with missing values on all variables are treated as supplementary. If correlations are specified in the Output dialog box, then (after analysis) missing values are imputed with the most frequent category, or mode, of the variable for the correlations of the original variables. For the correlations of the optimally scaled variables, you can choose the method of imputation. Select Mode to replace missing values with the mode of the optimally scaled variable. Select Extra category to replace missing values with the quantification of an extra category. This implies that objects with a missing value on this variable are considered to belong to the same (extra) category.

• Impute missing values. Objects with missing values on the selected variable have those values imputed. You can choose the method of imputation. Select Mode to replace missing values with the most frequent category. When there are multiple modes, the one with the smallest category indicator is used. Select Extra category to replace missing values with the same quantification of an extra category. This implies that objects with a missing value on this variable are considered to belong to the same (extra) category.

• Exclude objects with missing values on this variable. Objects with missing values on the selected variable are excluded from the analysis. This strategy is not available for supplementary variables.

To Specify CATPCA Missing Values Collapse Hide details

This feature requires the Categories option.

From the menus choose:

Analyze
Dimension Reduction
Optimal Scaling...

In the Categorical Principal Components dialog box, click Missing.

Related Topics

Categorical Principal Components Analysis (CATPCA)
Define Scale and Weight in CATPCA
Categorical Principal Components Analysis Discretization
Categorical Principal Components Analysis Options
Categorical Principal Components Analysis Output
Categorical Principal Components Analysis Save
Categorical Principal Components Analysis Object Plots
Categorical Principal Components Analysis Category Plots
Categorical Principal Components Analysis Loading Plots


Categorical Principal Components Analysis Options

Categorical Principal Components Analysis,Categorical Principal Components Analysis,Categorical Principal Components Analysis

The Options dialog box allows you to select the initial configuration, specify iteration and convergence criteria, select a normalization method, choose the method for labeling plots, and specify supplementary objects.

Expand Show details Collapse Hide details
Options dialog box

Supplementary Objects. Specify the case number of the object, or the first and last case numbers of a range of objects, that you want to make supplementary and then click Add. Continue until you have specified all of your supplementary objects. If an object is specified as supplementary, then case weights are ignored for that object.

Normalization Method. You can specify one of five options for normalizing the object scores and the variables. Only one normalization method can be used in a given analysis.

• Variable Principal. This option optimizes the association between variables. The coordinates of the variables in the object space are the component loadings (correlations with principal components, such as dimensions and object scores). This is useful when you are primarily interested in the correlation between the variables.

• Object Principal. This option optimizes distances between objects. This is useful when you are primarily interested in differences or similarities between the objects.

• Symmetrical. Use this normalization option if you are primarily interested in the relation between objects and variables.

• Independent. Use this normalization option if you want to examine distances between objects and correlations between variables separately.

• Custom. You can specify any real value in the closed interval [–1, 1]. A value of 1 is equal to the Object Principal method, a value of 0 is equal to the Symmetrical method, and a value of –1 is equal to the Variable Principal method. By specifying a value greater than –1 and less than 1, you can spread the eigenvalue over both objects and variables. This method is useful for making a tailor-made biplot or triplot.

Criteria. You can specify the maximum number of iterations the procedure can go through in its computations. You can also select a convergence criterion value. The algorithm stops iterating if the difference in total fit between the last two iterations is less than the convergence value or if the maximum number of iterations is reached.

Label Plots By. Allows you to specify whether variables and value labels or variable names and values will be used in the plots. You can also specify a maximum length for labels.

Plot Dimensions. Allows you to control the dimensions displayed in the output.

• Display all dimensions in the solution. All dimensions in the solution are displayed in a scatterplot matrix.

• Restrict the number of dimensions. The displayed dimensions are restricted to plotted pairs. If you restrict the dimensions, you must select the lowest and highest dimensions to be plotted. The lowest dimension can range from 1 to the number of dimensions in the solution minus 1 and is plotted against higher dimensions. The highest dimension value can range from 2 to the number of dimensions in the solution and indicates the highest dimension to be used in plotting the dimension pairs. This specification applies to all requested multidimensional plots.

Configuration. You can read data from a file containing the coordinates of a configuration. The first variable in the file should contain the coordinates for the first dimension, the second variable should contain the coordinates for the second dimension, and so on.

• Initial. The configuration in the file specified will be used as the starting point of the analysis.

• Fixed. The configuration in the file specified will be used to fit in the variables. The variables that are fitted in must be selected as analysis variables, but because the configuration is fixed, they are treated as supplementary variables (so they do not need to be selected as supplementary variables).

To Specify CATPCA Options Collapse Hide details

This feature requires the Categories option.

From the menus choose:

Analyze
Dimension Reduction
Optimal Scaling...

In the Categorical Principal Components dialog box, click Options.

Related Topics

Categorical Principal Components Analysis (CATPCA)
Define Scale and Weight in CATPCA
Categorical Principal Components Analysis Discretization
Categorical Principal Components Analysis Missing Values
Categorical Principal Components Analysis Output
Categorical Principal Components Analysis Save
Categorical Principal Components Analysis Object Plots
Categorical Principal Components Analysis Category Plots
Categorical Principal Components Analysis Loading Plots


Categorical Principal Components Analysis Output

object scores,object scores,object scores
in Categorical Principal Components Analysis,in Categorical Principal Components Analysis,in Categorical Principal Components Analysis
component loadings,component loadings,component loadings
in Categorical Principal Components Analysis,in Categorical Principal Components Analysis,in Categorical Principal Components Analysis
iteration history,iteration history,iteration history
in Categorical Principal Components Analysis,in Categorical Principal Components Analysis,in Categorical Principal Components Analysis
correlation matrix,correlation matrix,correlation matrix
in Categorical Principal Components Analysis,in Categorical Principal Components Analysis,in Categorical Principal Components Analysis
variance accounted for,variance accounted for,variance accounted for
in Categorical Principal Components Analysis,in Categorical Principal Components Analysis,in Categorical Principal Components Analysis
category quantifications,category quantifications,category quantifications
in Categorical Principal Components Analysis,in Categorical Principal Components Analysis,in Categorical Principal Components Analysis

The Output dialog box allows you to produce tables for object scores, component loadings, iteration history, correlations of original and transformed variables, the variance accounted for per variable and per dimension, category quantifications for selected variables, and descriptive statistics for selected variables.

Expand Show details Collapse Hide details
Output dialog box

Object scores. Displays the object scores and has the following options:

• Include Categories Of. Displays the category indicators of the analysis variables selected.

• Label Object Scores By. From the list of variables specified as labeling variables, you can select one to label the objects.

Component loadings. Displays the component loadings for all variables that were not given multiple nominal scaling levels.

Iteration history. For each iteration, the variance accounted for, loss, and increase in variance accounted for are shown.

Correlations of original variables. Shows the correlation matrix of the original variables and the eigenvalues of that matrix.

Correlations of transformed variables. Shows the correlation matrix of the transformed (optimally scaled) variables and the eigenvalues of that matrix.

Variance accounted for. Displays the amount of variance accounted for by centroid coordinates, vector coordinates, and total (centroid and vector coordinates combined) per variable and per dimension.

Category Quantifications. Gives the category quantifications and coordinates for each dimension of the variable(s) selected.

Descriptive Statistics. Displays frequencies, number of missing values, and mode of the variable(s) selected.

To Specify CATPCA Output Collapse Hide details

This feature requires the Categories option.

From the menus choose:

Analyze
Dimension Reduction
Optimal Scaling...

In the Categorical Principal Components dialog box, click Output.

Related Topics

Categorical Principal Components Analysis (CATPCA)
Define Scale and Weight in CATPCA
Categorical Principal Components Analysis Discretization
Categorical Principal Components Analysis Missing Values
Categorical Principal Components Analysis Options
Categorical Principal Components Analysis Save
Categorical Principal Components Analysis Object Plots
Categorical Principal Components Analysis Category Plots
Categorical Principal Components Analysis Loading Plots


Categorical Principal Components Analysis Save

Categorical Principal Components Analysis,Categorical Principal Components Analysis,Categorical Principal Components Analysis
save variables,save variables,save variables

The Save dialog box allows you to save discretized data, object scores, transformed values, and approximations to an external PASW Statistics data file or dataset in the current session. You can also save transformed values, object scores, and approximations to the active dataset.

• Datasets are available during the current session but are not available in subsequent sessions unless you explicitly save them as data files. Dataset names must adhere to variable naming rules. See the topic Variable Names for more information.

• Filenames or dataset names must be different for each type of data saved.

• If you save object scores or transformed values to the active dataset, you can specify the number of multiple nominal dimensions.

Expand Show details Collapse Hide details
Save dialog box
To Save New Variables or New Data in CATPCA Collapse Hide details

This feature requires the Categories option.

From the menus choose:

Analyze
Dimension Reduction
Optimal Scaling...

In the Categorical Principal Components dialog box, click Save.

Related Topics

Categorical Principal Components Analysis (CATPCA)
Define Scale and Weight in CATPCA
Categorical Principal Components Analysis Discretization
Categorical Principal Components Analysis Missing Values
Categorical Principal Components Analysis Options
Categorical Principal Components Analysis Output
Categorical Principal Components Analysis Object Plots
Categorical Principal Components Analysis Category Plots
Categorical Principal Components Analysis Loading Plots


Categorical Principal Components Analysis Object Plots

object points plots,object points plots,object points plots
in Categorical Principal Components Analysis,in Categorical Principal Components Analysis,in Categorical Principal Components Analysis
biplots,biplots,biplots
in Categorical Principal Components Analysis,in Categorical Principal Components Analysis,in Categorical Principal Components Analysis
triplots,triplots,triplots
in Categorical Principal Components Analysis,in Categorical Principal Components Analysis,in Categorical Principal Components Analysis

The Object and Variable Plots dialog box allows you to specify the types of plots desired and the variables for which plots will be produced.

Expand Show details Collapse Hide details
Object and Variable Plots dialog box

Object points. A plot of the object points is displayed.

Objects and variables (biplot). The object points are plotted with your choice of the variable coordinates--component loadings or variable centroids.

Objects, loadings, and centroids (triplot). The object points are plotted with the centroids of multiple nominal-scaling-level variables and the component loadings of other variables.

Biplot and Triplot Variables. You can choose to use all variables for the biplots and triplots or select a subset.

Label Objects. You can choose to have objects labeled with the categories of selected variables (you may choose category indicator values or value labels in the Options dialog box) or with their case numbers. One plot is produced per variable if Variable is selected.

To Obtain Object Plots in CATPCA Collapse Hide details

Select the dependent and independent variables in the Categorical Principal Components dialog box.

In the Plots group, click Object.

Select the types of plots and variables for which plots will be produced and variables to label the objects in the plot.

Click Continue.

Related Topics

Categorical Principal Components Analysis (CATPCA)
Define Scale and Weight in CATPCA
Categorical Principal Components Analysis Discretization
Categorical Principal Components Analysis Missing Values
Categorical Principal Components Analysis Options
Categorical Principal Components Analysis Output
Categorical Principal Components Analysis Save
Categorical Principal Components Analysis Category Plots
Categorical Principal Components Analysis Loading Plots


Categorical Principal Components Analysis Category Plots

category plots,category plots,category plots
in Categorical Principal Components Analysis,in Categorical Principal Components Analysis,in Categorical Principal Components Analysis
joint category plots,joint category plots,joint category plots
in Categorical Principal Components Analysis,in Categorical Principal Components Analysis,in Categorical Principal Components Analysis
transformation plots,transformation plots,transformation plots
in Categorical Principal Components Analysis,in Categorical Principal Components Analysis,in Categorical Principal Components Analysis
projected centroids plots,projected centroids plots,projected centroids plots
in Categorical Principal Components Analysis,in Categorical Principal Components Analysis,in Categorical Principal Components Analysis

The Category Plots dialog box allows you to specify the types of plots desired and the variables for which plots will be produced.

Expand Show details Collapse Hide details
Category Plots dialog box

Category Plots. For each variable selected, a plot of the centroid and vector coordinates is plotted. For variables with multiple nominal scaling levels, categories are in the centroids of the objects in the particular categories. For all other scaling levels, categories are on a vector through the origin.

Joint Category Plots. This is a single plot of the centroid and vector coordinates of each selected variable.

Transformation Plots. Displays a plot of the optimal category quantifications versus the category indicators. You can specify the number of dimensions desired for variables with multiple nominal scaling levels; one plot will be generated for each dimension. You can also choose to display residual plots for each variable selected.

Project Centroids Of. You may choose a variable and project its centroids onto selected variables. Variables with multiple nominal scaling levels cannot be selected to project on. When this plot is requested, a table with the coordinates of the projected centroids is also displayed.

To Obtain Category Plots in CATPCA Collapse Hide details

Select the dependent and independent variables in the Categorical Principal Components dialog box.

In the Plots group, click Category.

Select the types of plots and variables for which plots will be produced.

Click Continue.

Related Topics

Categorical Principal Components Analysis (CATPCA)
Define Scale and Weight in CATPCA
Categorical Principal Components Analysis Discretization
Categorical Principal Components Analysis Missing Values
Categorical Principal Components Analysis Options
Categorical Principal Components Analysis Output
Categorical Principal Components Analysis Save
Categorical Principal Components Analysis Object Plots
Categorical Principal Components Analysis Loading Plots


Categorical Principal Components Analysis Loading Plots

component loadings plots,component loadings plots,component loadings plots
in Categorical Principal Components Analysis,in Categorical Principal Components Analysis,in Categorical Principal Components Analysis

The Loading Plots dialog box allows you to specify the variables that will be included in the plot, and whether or not to include centroids in the plot.

Expand Show details Collapse Hide details
Loading Plots dialog box

Display component loadings. If selected, a plot of the component loadings is displayed.

Loading Variables. You can choose to use all variables for the component loadings plot or select a subset.

Include centroids. Variables with multiple nominal scaling levels do not have component loadings, but you may choose to include the centroids of those variables in the plot. You can choose to use all multiple nominal variables or select a subset.

To Obtain Loading Plots in CATPCA Collapse Hide details

Select the dependent and independent variables in the Categorical Principal Components dialog box.

In the Plots group, click Object.

Select the types of plots and variables for which plots will be produced and variables to label the objects in the plot.

Click Continue.

Related Topics

Categorical Principal Components Analysis (CATPCA)
Define Scale and Weight in CATPCA
Categorical Principal Components Analysis Discretization
Categorical Principal Components Analysis Missing Values
Categorical Principal Components Analysis Options
Categorical Principal Components Analysis Output
Categorical Principal Components Analysis Save
Categorical Principal Components Analysis Object Plots
Categorical Principal Components Analysis Category Plots


CATPCA Command Additional Features

Categorical Principal Components Analysis,Categorical Principal Components Analysis,Categorical Principal Components Analysis
command additional features,command additional features,command additional features

You can customize your categorical principal components analysis if you paste your selections into a syntax window and edit the resulting CATPCA command syntax. The command syntax language also allows you to:

• Specify rootnames for the transformed variables, object scores, and approximations when saving them to the active dataset (with the SAVE subcommand).

• Specify a maximum length for labels for each plot separately (with the PLOT subcommand).

• Specify a separate variable list for residual plots (with the PLOT subcommand).

Related Topics

CATPCA


Nonlinear Canonical Correlation Analysis (OVERALS)

Nonlinear Canonical Correlation Analysis,Nonlinear Canonical Correlation Analysis,Nonlinear Canonical Correlation Analysis
Nonlinear Canonical Correlation Analysis,Nonlinear Canonical Correlation Analysis,Nonlinear Canonical Correlation Analysis
statistics,statistics,statistics
Nonlinear Canonical Correlation Analysis,Nonlinear Canonical Correlation Analysis,Nonlinear Canonical Correlation Analysis
plots,plots,plots

Nonlinear canonical correlation analysis corresponds to categorical canonical correlation analysis with optimal scaling. The purpose of this procedure is to determine how similar sets of categorical variables are to one another. Nonlinear canonical correlation analysis is also known by the acronym OVERALS.

Standard canonical correlation analysis is an extension of multiple regression, where the second set does not contain a single response variable but instead contain multiple response variables. The goal is to explain as much as possible of the variance in the relationships among two sets of numerical variables in a low dimensional space. Initially, the variables in each set are linearly combined such that the linear combinations have a maximal correlation. Given these combinations, subsequent linear combinations are determined that are uncorrelated with the previous combinations and that have the largest correlation possible.

The optimal scaling approach expands the standard analysis in three crucial ways. First, OVERALS allows more than two sets of variables. Second, variables can be scaled as either nominal, ordinal, or numerical. As a result, nonlinear relationships between variables can be analyzed. Finally, instead of maximizing correlations between the variable sets, the sets are compared to an unknown compromise set that is defined by the object scores.

Example. Categorical canonical correlation analysis with optimal scaling could be used to graphically display the relationship between one set of variables containing job category and years of education and another set of variables containing region of residence and gender. You might find that years of education and region of residence discriminate better than the remaining variables. You might also find that years of education discriminates best on the first dimension.

Statistics and plots. Frequencies, centroids, iteration history, object scores, category quantifications, weights, component loadings, single and multiple fit, object scores plots, category coordinates plots, component loadings plots, category centroids plots, transformation plots.

Show me

Nonlinear Canonical Correlation Analysis Data Considerations Collapse Hide details

Data. Use integers to code categorical variables (nominal or ordinal scaling level). To minimize output, use consecutive integers beginning with 1 to code each variable. Variables that are scaled at the numerical level should not be recoded to consecutive integers. To minimize output, for each variable that is scaled at the numerical level, subtract the smallest observed value from every value and add 1. Fractional values are truncated after the decimal.

Assumptions. Variables can be classified into two or more sets. Variables in the analysis are scaled as multiple nominal, single nominal, ordinal, or numerical. The maximum number of dimensions that are used in the procedure depends on the optimal scaling level of the variables. If all variables are specified as ordinal, single nominal, or numerical, the maximum number of dimensions is the lesser of the following two values: the number of observations minus 1 or the total number of variables. However, if only two sets of variables are defined, the maximum number of dimensions is the number of variables in the smaller set. If some variables are multiple nominal, the maximum number of dimensions is the total number of multiple nominal categories plus the number of nonmultiple nominal variables minus the number of multiple nominal variables. For example, if the analysis involves five variables, one of which is multiple nominal with four categories, the maximum number of dimensions is (4 + 4 – 1), or 7. If you specify a number that is greater than the maximum, the maximum value is used.

Related procedures. If each set contains one variable, nonlinear canonical correlation analysis is equivalent to principal components analysis with optimal scaling. If each of these variables is multiple nominal, the analysis corresponds to multiple correspondence analysis. If two sets of variables are involved, and one of the sets contains only one variable, the analysis is identical to categorical regression with optimal scaling.

To Obtain a Nonlinear Canonical Correlation Analysis Collapse Hide details

To Obtain a Nonlinear Canonical Correlation Analysis

This feature requires the Categories option.

From the menus choose:

Analyze
Dimension Reduction
Optimal Scaling...

Expand Show details Collapse Hide details
Optimal Scaling dialog box

Select either All variables multiple nominal or Some variable(s) not multiple nominal.

Select Multiple sets.

Click Define.

Expand Show details Collapse Hide details
Nonlinear Canonical Correlation Analysis (OVERALS) dialog box

Define at least two sets of variables. Select the variable(s) that you want to include in the first set. To move to the next set, click Next, and select the variables that you want to include in the second set. You can add additional sets as desired. Click Previous to return to the previously defined variable set.

Define the value range and measurement scale (optimal scaling level) for each selected variable.

Click OK.

Optionally:

• Select one or more variables to provide point labels for object scores plots. Each variable produces a separate plot, with the points labeled by the values of that variable. You must define a range for each of these plot label variables. When you are using the dialog box, a single variable cannot be used both in the analysis and as a labeling variable. If labeling the object scores plot with a variable that is used in the analysis is desired, use the Compute facility (available from the Transform menu) to create a copy of that variable. Use the new variable to label the plot. Alternatively, command syntax can be used.

• Specify the number of dimensions that you want in the solution. In general, choose as few dimensions as needed to explain most of the variation. If the analysis involves more than two dimensions, three-dimensional plots of the first three dimensions are produced. Other dimensions can be displayed by editing the chart.

This procedure pastes OVERALS command syntax.

See OVERALS Algorithms for computational details for this procedure.

Related Topics

OVERALS
Categorical Regression (CATREG)
Optimal Scaling by Alternating Least Squares
Categorical Principal Components Analysis (CATPCA)
Correspondence Analysis
Multiple Correspondence Analysis
Multidimensional Scaling (PROXSCAL)
Multidimensional Unfolding (PREFSCAL)
Define Range and Scale
Define Range
Nonlinear Canonical Correlation Analysis Options


Define Range and Scale

Nonlinear Canonical Correlation Analysis,Nonlinear Canonical Correlation Analysis,Nonlinear Canonical Correlation Analysis
Expand Show details Collapse Hide details
Define Range and Scale dialog box

You must define a range for each variable. The maximum value that is specified must be an integer. Fractional data values are truncated in the analysis. A category value that is outside of the specified range is ignored in the analysis. To minimize output, use the Automatic Recode facility (available from the Transform menu) to create consecutive categories beginning with 1 for variables that are treated as nominal or ordinal. Recoding to consecutive integers is not recommended for variables that are scaled at the numerical level. To minimize output for variables that are treated as numerical, for each variable, subtract the minimum value from every value and add 1.

You must also select the scaling to be used to quantify each variable.

• Ordinal. The order of the categories of the observed variable is preserved in the quantified variable.

• Single nominal. In the quantified variable, objects in the same category receive the same score.

• Multiple nominal. The quantifications can be different for each dimension.

• Discrete numeric. Categories are treated as ordered and equally spaced. The differences between category numbers and the order of the categories of the observed variable are preserved in the quantified variable.

Related Topics

Nonlinear Canonical Correlation Analysis (OVERALS)
Define Range
Nonlinear Canonical Correlation Analysis Options


Define Range

Nonlinear Canonical Correlation Analysis,Nonlinear Canonical Correlation Analysis,Nonlinear Canonical Correlation Analysis
Expand Show details Collapse Hide details
Define Range dialog box

You must define a range for each variable. The maximum value that is specified must be an integer. Fractional data values are truncated in the analysis. A category value that is outside of the specified range is ignored in the analysis. To minimize output, use the Automatic Recode facility (available from the Transform menu) to create consecutive categories beginning with 1.

You must also define a range for each variable that is used to label the object scores plots. However, labels for categories with data values that are outside of the defined range for the variable do appear on the plots.

To Define an Optimal Scaling Range Collapse Hide details

Select one or more variables in the Variables list.

Click Define Range.

Enter the maximum value for the variable. A minimum value of 1 is displayed. This minimum value cannot be changed.

Click Continue.

Related Topics

Nonlinear Canonical Correlation Analysis (OVERALS)
Define Range and Scale
Nonlinear Canonical Correlation Analysis Options


Nonlinear Canonical Correlation Analysis Options

plots,plots,plots
in Nonlinear Canonical Correlation Analysis,in Nonlinear Canonical Correlation Analysis,in Nonlinear Canonical Correlation Analysis
centroids,centroids,centroids
in Nonlinear Canonical Correlation Analysis,in Nonlinear Canonical Correlation Analysis,in Nonlinear Canonical Correlation Analysis
weights,weights,weights
in Nonlinear Canonical Correlation Analysis,in Nonlinear Canonical Correlation Analysis,in Nonlinear Canonical Correlation Analysis
component loadings,component loadings,component loadings
in Nonlinear Canonical Correlation Analysis,in Nonlinear Canonical Correlation Analysis,in Nonlinear Canonical Correlation Analysis
category quantifications,category quantifications,category quantifications
in Nonlinear Canonical Correlation Analysis,in Nonlinear Canonical Correlation Analysis,in Nonlinear Canonical Correlation Analysis
object scores,object scores,object scores
in Nonlinear Canonical Correlation Analysis,in Nonlinear Canonical Correlation Analysis,in Nonlinear Canonical Correlation Analysis
fit,fit,fit
in Nonlinear Canonical Correlation Analysis,in Nonlinear Canonical Correlation Analysis,in Nonlinear Canonical Correlation Analysis
initial configuration,initial configuration,initial configuration
in Nonlinear Canonical Correlation Analysis,in Nonlinear Canonical Correlation Analysis,in Nonlinear Canonical Correlation Analysis

The Options dialog box allows you to select optional statistics and plots, save object scores as new variables in the active dataset, specify iteration and convergence criteria, and specify an initial configuration for the analysis.

Expand Show details Collapse Hide details
Options dialog box

Display. Available statistics include marginal frequencies (counts), centroids, iteration history, weights and component loadings, category quantifications, object scores, and single and multiple fit statistics.

Expand Show details Collapse Hide details

• Centroids. Category quantifications, and the projected and the actual averages of the object scores for the objects (cases) included in each set for those belonging to the same category of the variable.

• Weights and component loadings. The regression coefficients in each dimension for every quantified variable in a set, where the object scores are regressed on the quantified variables, and the projection of the quantified variable in the object space. Provides an indication of the contribution each variable makes to the dimension within each set.

• Single and multiple fit. Measures of goodness of fit of the single- and multiple-category coordinates/category quantifications with respect to the objects.

• Category quantifications. Optimal scale values assigned to the categories of a variable.

• Object scores. Optimal score assigned to an object (case) in a particular dimension.

Plot. You can produce plots of category coordinates, object scores, component loadings, category centroids, and transformations.

Save object scores. You can save the object scores as new variables in the active dataset. Object scores are saved for the number of dimensions that are specified in the main dialog box.

Use random initial configuration. A random initial configuration should be used if some or all of the variables are single nominal. If this option is not selected, a nested initial configuration is used.

Criteria. You can specify the maximum number of iterations that the nonlinear canonical correlation analysis can go through in its computations. You can also select a convergence criterion value. The analysis stops iterating if the difference in total fit between the last two iterations is less than the convergence value or if the maximum number of iterations is reached.

To Specify OVERALS Options Collapse Hide details

This feature requires the Categories option.

From the menus choose:

Analyze
Dimension Reduction
Optimal Scaling...

In the Nonlinear Canonical Correlation Analysis (OVERALS) dialog box, click Options.

Related Topics

Nonlinear Canonical Correlation Analysis (OVERALS)
Define Range and Scale
Define Range


OVERALS Command Additional Features

Nonlinear Canonical Correlation Analysis,Nonlinear Canonical Correlation Analysis,Nonlinear Canonical Correlation Analysis
command additional features,command additional features,command additional features

You can customize your nonlinear canonical correlation analysis if you paste your selections into a syntax window and edit the resulting OVERALS command syntax. The command syntax language also allows you to:

• Specify the dimension pairs to be plotted, rather than plotting all extracted dimensions (using theNDIM keyword on the PLOT subcommand).

• Specify the number of value label characters that are used to label points on the plots (with thePLOT subcommand).

• Designate more than five variables as labeling variables for object scores plots (with thePLOT subcommand).

• Select variables that are used in the analysis as labeling variables for the object scores plots (with the PLOT subcommand).

• Select variables to provide point labels for the quantification score plot (with the PLOT subcommand).

• Specify the number of cases to be included in the analysis if you do not want to use all cases in the active dataset (with the NOBSERVATIONS subcommand).

• Specify rootnames for variables created by saving object scores (with the SAVE subcommand).

• Specify the number of dimensions to be saved, rather than saving all extracted dimensions (with the SAVE subcommand).

• Write category quantifications to a matrix file (using the MATRIX subcommand).

• Produce low-resolution plots that may be easier to read than the usual high-resolution plots (using the SET command).

• Produce centroid and transformation plots for specified variables only (with the PLOT subcommand).

Related Topics

OVERALS


Correspondence Analysis

Correspondence Analysis,Correspondence Analysis,Correspondence Analysis
Correspondence Analysis,Correspondence Analysis,Correspondence Analysis
statistics,statistics,statistics
Correspondence Analysis,Correspondence Analysis,Correspondence Analysis
plots,plots,plots

One of the goals of correspondence analysis is to describe the relationships between two nominal variables in a correspondence table in a low-dimensional space, while simultaneously describing the relationships between the categories for each variable. For each variable, the distances between category points in a plot reflect the relationships between the categories with similar categories plotted close to each other. Projecting points for one variable on the vector from the origin to a category point for the other variable describe the relationship between the variables.

An analysis of contingency tables often includes examining row and column profiles and testing for independence via the chi-square statistic. However, the number of profiles can be quite large, and the chi-square test does not reveal the dependence structure. The Crosstabs procedure offers several measures of association and tests of association but cannot graphically represent any relationships between the variables.

Factor analysis is a standard technique for describing relationships between variables in a low-dimensional space. However, factor analysis requires interval data, and the number of observations should be five times the number of variables. Correspondence analysis, on the other hand, assumes nominal variables and can describe the relationships between categories of each variable, as well as the relationship between the variables. In addition, correspondence analysis can be used to analyze any table of positive correspondence measures.

Example. Correspondence analysis could be used to graphically display the relationship between staff category and smoking habits. You might find that with regard to smoking, junior managers differ from secretaries, but secretaries do not differ from senior managers. You might also find that heavy smoking is associated with junior managers, whereas light smoking is associated with secretaries.

Statistics and plots. Correspondence measures, row and column profiles, singular values, row and column scores, inertia, mass, row and column score confidence statistics, singular value confidence statistics, transformation plots, row point plots, column point plots, and biplots.

Show me

Correspondence Analysis Data Considerations Collapse Hide details

Data. Categorical variables to be analyzed are scaled nominally. For aggregated data or for a correspondence measure other than frequencies, use a weighting variable with positive similarity values. Alternatively, for table data, use syntax to read the table.

Assumptions. The maximum number of dimensions used in the procedure depends on the number of active rows and column categories and the number of equality constraints. If no equality constraints are used and all categories are active, the maximum dimensionality is one fewer than the number of categories for the variable with the fewest categories. For example, if one variable has five categories and the other has four, the maximum number of dimensions is three. Supplementary categories are not active. For example, if one variable has five categories, two of which are supplementary, and the other variable has four categories, the maximum number of dimensions is two. Treat all sets of categories that are constrained to be equal as one category. For example, if a variable has five categories, three of which are constrained to be equal, that variable should be treated as having three categories when determining the maximum dimensionality. Two of the categories are unconstrained, and the third category corresponds to the three constrained categories. If you specify a number of dimensions greater than the maximum, the maximum value is used.

Related procedures. If more than two variables are involved, use multiple correspondence analysis. If the variables should be scaled ordinally, use categorical principal components analysis.

To Obtain a Correspondence Analysis Collapse Hide details

To Obtain a Correspondence Analysis

This feature requires the Categories option.

From the menus choose:

Analyze
Dimension Reduction
Correspondence Analysis...

Expand Show details Collapse Hide details
Correspondence Analysis dialog box

Select a row variable.

Select a column variable.

Define the ranges for the variables.

Click OK.

This procedure pastes CORRESPONDENCE command syntax.

See CORRESPONDENCE Algorithms for computational details for this procedure.

Related Topics

CORRESPONDENCE
Categorical Regression (CATREG)
Optimal Scaling by Alternating Least Squares
Categorical Principal Components Analysis (CATPCA)
Nonlinear Canonical Correlation Analysis (OVERALS)
Multiple Correspondence Analysis
Multidimensional Scaling (PROXSCAL)
Multidimensional Unfolding (PREFSCAL)
Define Row Range in Correspondence Analysis
Define Column Range in Correspondence Analysis
Correspondence Analysis Model
Correspondence Analysis Statistics
Correspondence Analysis Plots


Define Row Range in Correspondence Analysis

Correspondence Analysis,Correspondence Analysis,Correspondence Analysis

You must define a range for the row variable. The minimum and maximum values specified must be integers. Fractional data values are truncated in the analysis. A category value that is outside of the specified range is ignored in the analysis.

Expand Show details Collapse Hide details
Define Row Range dialog box

All categories are initially unconstrained and active. You can constrain row categories to equal other row categories, or you can define a row category as supplementary.

• Categories must be equal. Categories must have equal scores. Use equality constraints if the obtained order for the categories is undesirable or counterintuitive. The maximum number of row categories that can be constrained to be equal is the total number of active row categories minus 1. To impose different equality constraints on sets of categories, use syntax. For example, use syntax to constrain categories 1 and 2 to be equal and categories 3 and 4 to be equal.

• Category is supplemental. Supplementary categories do not influence the analysis but are represented in the space defined by the active categories. Supplementary categories play no role in defining the dimensions. The maximum number of supplementary row categories is the total number of row categories minus 2.

To Define a Row Range in Correspondence Analysis Collapse Hide details

Select the row variable in the Correspondence Analysis dialog box.

Click Define Range.

Enter the minimum and maximum values for the row variable.

Click Update.

Click Continue.

Optionally, you can specify equality constraints on the row variable categories and define categories to be supplementary. For each category to be constrained or supplementary, select the category from the list of categories generated by Update and choose Category is supplemental or Categories must be equal. For equality constraints, at least two categories must be designated as equal.

Related Topics

Correspondence Analysis
Define Column Range in Correspondence Analysis
Correspondence Analysis Model
Correspondence Analysis Statistics
Correspondence Analysis Plots


Define Column Range in Correspondence Analysis

Correspondence Analysis,Correspondence Analysis,Correspondence Analysis

You must define a range for the column variable. The minimum and maximum values specified must be integers. Fractional data values are truncated in the analysis. A category value that is outside of the specified range is ignored in the analysis.

Expand Show details Collapse Hide details
Define Column Range dialog box

All categories are initially unconstrained and active. You can constrain column categories to equal other column categories, or you can define a column category as supplementary.

• Categories must be equal. Categories must have equal scores. Use equality constraints if the obtained order for the categories is undesirable or counterintuitive. The maximum number of column categories that can be constrained to be equal is the total number of active column categories minus 1. To impose different equality constraints on sets of categories, use syntax. For example, use syntax to constrain categories 1 and 2 to be equal and categories 3 and 4 to be equal.

• Category is supplemental. Supplementary categories do not influence the analysis but are represented in the space defined by the active categories. Supplementary categories play no role in defining the dimensions. The maximum number of supplementary column categories is the total number of column categories minus 2.

To Define a Column Range in Correspondence Analysis Collapse Hide details

Select the column variable in the Correspondence Analysis dialog box.

Click Define Range.

Enter the minimum and maximum values for the column variable.

Click Update.

Click Continue.

Optionally, you can specify equality constraints on the column variable categories and define categories to be supplementary. For each category to be constrained or supplementary, select the category from the list of categories generated by Update and choose Category is supplemental or Categories must be equal. For equality constraints, at least two categories must be designated as equal.

Related Topics

Correspondence Analysis
Define Row Range in Correspondence Analysis
Correspondence Analysis Model
Correspondence Analysis Statistics
Correspondence Analysis Plots


Correspondence Analysis Model

Correspondence Analysis,Correspondence Analysis,Correspondence Analysis
distance measures,distance measures,distance measures
in Correspondence Analysis,in Correspondence Analysis,in Correspondence Analysis
standardization,standardization,standardization
in Correspondence Analysis,in Correspondence Analysis,in Correspondence Analysis
normalization,normalization,normalization
in Correspondence Analysis,in Correspondence Analysis,in Correspondence Analysis
dimensions,dimensions,dimensions
in Correspondence Analysis,in Correspondence Analysis,in Correspondence Analysis

The Model dialog box allows you to specify the number of dimensions, the distance measure, the standardization method, and the normalization method.

Expand Show details Collapse Hide details
Model dialog box

Dimensions in solution. Specify the number of dimensions. In general, choose as few dimensions as needed to explain most of the variation. The maximum number of dimensions depends on the number of active categories used in the analysis and on the equality constraints. The maximum number of dimensions is the smaller of:

• The number of active row categories minus the number of row categories constrained to be equal, plus the number of constrained row category sets.

• The number of active column categories minus the number of column categories constrained to be equal, plus the number of constrained column category sets.

Distance Measure. You can select the measure of distance among the rows and columns of the correspondence table. Choose one of the following alternatives:

• Chi-square. Use a weighted profile distance, where the weight is the mass of the rows or columns. This measure is required for standard correspondence analysis.

• Euclidean. Use the square root of the sum of squared differences between pairs of rows and pairs of columns.

Standardization Method. Choose one of the following alternatives:

• Row and column means are removed. Both the rows and columns are centered. This method is required for standard correspondence analysis.

• Row means are removed. Only the rows are centered.

• Column means are removed. Only the columns are centered.

• Row totals are equalized and means are removed. Before centering the rows, the row margins are equalized.

• Column totals are equalized and means are removed. Before centering the columns, the column margins are equalized.

Normalization Method. Choose one of the following alternatives:

• Symmetrical. For each dimension, the row scores are the weighted average of the column scores divided by the matching singular value, and the column scores are the weighted average of row scores divided by the matching singular value. Use this method if you want to examine the differences or similarities between the categories of the two variables.

• Principal. The distances between row points and column points are approximations of the distances in the correspondence table according to the selected distance measure. Use this method if you want to examine differences between categories of either or both variables instead of differences between the two variables.

• Row principal. The distances between row points are approximations of the distances in the correspondence table according to the selected distance measure. The row scores are the weighted average of the column scores. Use this method if you want to examine differences or similarities between categories of the row variable.

• Column principal. The distances between column points are approximations of the distances in the correspondence table according to the selected distance measure. The column scores are the weighted average of the row scores. Use this method if you want to examine differences or similarities between categories of the column variable.

• Custom. You must specify a value between –1 and 1. A value of –1 corresponds to column principal. A value of 1 corresponds to row principal. A value of 0 corresponds to symmetrical. All other values spread the inertia over both the row and column scores to varying degrees. This method is useful for making tailor-made biplots.

To Specify the Model in Correspondence Analysis Collapse Hide details

This feature requires the Categories option.

From the menus choose:

Analyze
Dimension Reduction
Correspondence Analysis...

In the Correspondence Analysis dialog box, click Model.

Related Topics

Correspondence Analysis
Define Row Range in Correspondence Analysis
Define Column Range in Correspondence Analysis
Correspondence Analysis Statistics
Correspondence Analysis Plots


Correspondence Analysis Statistics

Correspondence Analysis,Correspondence Analysis,Correspondence Analysis
confidence statistics,confidence statistics,confidence statistics
in Correspondence Analysis,in Correspondence Analysis,in Correspondence Analysis
inertia,inertia,inertia
in Correspondence Analysis,in Correspondence Analysis,in Correspondence Analysis

The Statistics dialog box allows you to specify the numerical output produced.

Expand Show details Collapse Hide details
Statistics dialog box

Correspondence table. A crosstabulation of the input variables with row and column marginal totals.

Overview of row points. For each row category, the scores, mass, inertia, contribution to the inertia of the dimension, and the contribution of the dimension to the inertia of the point.

Overview of column points. For each column category, the scores, mass, inertia, contribution to the inertia of the dimension, and the contribution of the dimension to the inertia of the point.

Row profiles. For each row category, the distribution across the categories of the column variable.

Column profiles. For each column category, the distribution across the categories of the row variable.

Permutations of the correspondence table. The correspondence table reorganized such that the rows and columns are in increasing order according to the scores on the first dimension. Optionally, you can specify the maximum dimension number for which permuted tables will be produced. A permuted table for each dimension from 1 to the number specified is produced.

Confidence Statistics for Row points. Includes standard deviation and correlations for all nonsupplementary row points.

Confidence Statistics for Column points. Includes standard deviation and correlations for all nonsupplementary column points.

To Select Statistics in Correspondence Analysis Collapse Hide details

This feature requires the Categories option.

From the menus choose:

Analyze
Dimension Reduction
Correspondence Analysis...

In the Correspondence Analysis dialog box, click Statistics.

Related Topics

Correspondence Analysis
Define Row Range in Correspondence Analysis
Define Column Range in Correspondence Analysis
Correspondence Analysis Model
Correspondence Analysis Plots


Correspondence Analysis Plots

Correspondence Analysis,Correspondence Analysis,Correspondence Analysis
biplots,biplots,biplots
in Correspondence Analysis,in Correspondence Analysis,in Correspondence Analysis
plots,plots,plots
in Correspondence Analysis,in Correspondence Analysis,in Correspondence Analysis

The Plots dialog box allows you to specify which plots are produced.

Expand Show details Collapse Hide details
Plots dialog box

Scatterplots. Produces a matrix of all pairwise plots of the dimensions. Available scatterplots include:

• Biplot. Produces a matrix of joint plots of the row and column points. If principal normalization is selected, the biplot is not available.

• Row points. Produces a matrix of plots of the row points.

• Column points. Produces a matrix of plots of the column points.

Optionally, you can specify how many value label characters to use when labeling the points. This value must be a non-negative integer less than or equal to 20.

Line Plots. Produces a plot for every dimension of the selected variable. Available line plots include:

• Transformed row categories. Produces a plot of the original row category values against their corresponding row scores.

• Transformed column categories. Produces a plot of the original column category values against their corresponding column scores.

Optionally, you can specify how many value label characters to use when labeling the category axis. This value must be a non-negative integer less than or equal to 20.

Plot Dimensions. Allows you to control the dimensions displayed in the output.

• Display all dimensions in the solution. All dimensions in the solution are displayed in a scatterplot matrix.

• Restrict the number of dimensions. The displayed dimensions are restricted to plotted pairs. If you restrict the dimensions, you must select the lowest and highest dimensions to be plotted. The lowest dimension can range from 1 to the number of dimensions in the solution minus 1, and is plotted against higher dimensions. The highest dimension value can range from 2 to the number of dimensions in the solution, and indicates the highest dimension to be used in plotting the dimension pairs. This specification applies to all requested multidimensional plots.

To Create Plots in Correspondence Analysis Collapse Hide details

This feature requires the Categories option.

From the menus choose:

Analyze
Dimension Reduction
Correspondence Analysis...

In the Correspondence Analysis dialog box, click Plots.

Related Topics

Correspondence Analysis
Define Row Range in Correspondence Analysis
Define Column Range in Correspondence Analysis
Correspondence Analysis Model
Correspondence Analysis Statistics


CORRESPONDENCE Command Additional Features

Correspondence Analysis,Correspondence Analysis,Correspondence Analysis
command additional features,command additional features,command additional features

You can customize your correspondence analysis if you paste your selections into a syntax window and edit the resulting CORRESPONDENCE command syntax. The command syntax language also allows you to:

• Specify table data as input instead of using casewise data (using the TABLE = ALL subcommand).

• Specify the number of value-label characters used to label points for each type of scatterplot matrix or biplot matrix (with the PLOT subcommand).

• Specify the number of value-label characters used to label points for each type of line plot (with the PLOT subcommand).

• Write a matrix of row and column scores to a matrix data file (with the OUTFILE subcommand).

• Write a matrix of confidence statistics (variances and covariances) for the singular values and the scores to a matrix data file (with the OUTFILE subcommand).

• Specify multiple sets of categories to be equal (with the EQUAL subcommand).

Related Topics

CORRESPONDENCE


Multiple Correspondence Analysis

Multiple Correspondence Analysis,Multiple Correspondence Analysis,Multiple Correspondence Analysis

Multiple Correspondence Analysis quantifies nominal (categorical) data by assigning numerical values to the cases (objects) and categories so that objects within the same category are close together and objects in different categories are far apart. Each object is as close as possible to the category points of categories that apply to the object. In this way, the categories divide the objects into homogeneous subgroups. Variables are considered homogeneous when they classify objects in the same categories into the same subgroups.

Example. Multiple Correspondence Analysis could be used to graphically display the relationship between job category, minority classification, and gender. You might find that minority classification and gender discriminate between people but that job category does not. You might also find that the Latino and African-American categories are similar to each other.

Statistics and plots. Object scores, discrimination measures, iteration history, correlations of original and transformed variables, category quantifications, descriptive statistics, object points plots, biplots, category plots, joint category plots, transformation plots, and discrimination measures plots.

Show me

Multiple Correspondence Analysis Data Considerations Collapse Hide details

Data. String variable values are always converted into positive integers by ascending alphanumeric order. User-defined missing values, system-missing values, and values less than 1 are considered missing; you can recode or add a constant to variables with values less than 1 to make them nonmissing.

Assumptions. All variables have the multiple nominal scaling level. The data must contain at least three valid cases. The analysis is based on positive integer data. The discretization option will automatically categorize a fractional-valued variable by grouping its values into categories with a close-to-normal distribution and will automatically convert values of string variables into positive integers. You can specify other discretization schemes.

Related procedures. For two variables, Multiple Correspondence Analysis is analogous to Correspondence Analysis. If you believe that variables possess ordinal or numerical properties, Categorical Principal Components Analysis should be used. If sets of variables are of interest, Nonlinear Canonical Correlation Analysis should be used.

To Obtain a Multiple Correspondence Analysis Collapse Hide details

To Obtain a Multiple Correspondence Analysis

This feature requires the Categories option.

From the menus choose:

Analyze
Dimension Reduction
Optimal Scaling...

Expand Show details Collapse Hide details
Optimal Scaling dialog box

Select All variables multiple nominal.

Select One set.

Click Define.

Expand Show details Collapse Hide details
Multiple Correspondence Analysis dialog box

Select at least two analysis variables and specify the number of dimensions in the solution.

Click OK.

You may optionally specify supplementary variables, which are fitted into the solution found, or labeling variables for the plots.

This procedure pastes MULTIPLE CORRESPONDENCE command syntax.

See MULTIPLE CORRESPONDENCE Algorithms for computational details for this procedure.

Related Topics

MULTIPLE CORRESPONDENCE
Categorical Regression (CATREG)
Optimal Scaling by Alternating Least Squares
Categorical Principal Components Analysis (CATPCA)
Nonlinear Canonical Correlation Analysis (OVERALS)
Correspondence Analysis
Multidimensional Scaling (PROXSCAL)
Multidimensional Unfolding (PREFSCAL)
Define Variable Weight in Multiple Correspondence Analysis
Multiple Correspondence Analysis Discretization
Multiple Correspondence Analysis Missing Values
Multiple Correspondence Analysis Options
Multiple Correspondence Analysis Output
Multiple Correspondence Analysis Save
Multiple Correspondence Analysis Object Plots
Multiple Correspondence Analysis Variable Plots


Define Variable Weight in Multiple Correspondence Analysis

Multiple Correspondence Analysis,Multiple Correspondence Analysis,Multiple Correspondence Analysis
optimal scaling level,optimal scaling level,optimal scaling level
optimal scaling level,optimal scaling level,optimal scaling level
in Multiple Correspondence Analysis,in Multiple Correspondence Analysis,in Multiple Correspondence Analysis
variable weight,variable weight,variable weight
in Multiple Correspondence Analysis,in Multiple Correspondence Analysis,in Multiple Correspondence Analysis

You can set the weight for analysis variables.

Expand Show details Collapse Hide details
Define Variable Weight dialog box

Variable weight. You can choose to define a weight for each variable. The value specified must be a positive integer. The default value is 1.

To Define a Weight in Multiple Correspondence Analysis Collapse Hide details

Select a variable in the Analysis Variables list in the Multiple Correspondence Analysis dialog box.

Click Define Variable Weight.

Enter the weight value for the variable.

Click Continue.

You cannot define weights for supplementary variables.

Related Topics

Multiple Correspondence Analysis
Multiple Correspondence Analysis Discretization
Multiple Correspondence Analysis Missing Values
Multiple Correspondence Analysis Options
Multiple Correspondence Analysis Output
Multiple Correspondence Analysis Save
Multiple Correspondence Analysis Object Plots
Multiple Correspondence Analysis Variable Plots


Multiple Correspondence Analysis Discretization

discretization,discretization,discretization
in Multiple Correspondence Analysis,in Multiple Correspondence Analysis,in Multiple Correspondence Analysis

The Discretization dialog box allows you to select a method of recoding your variables. Fractional-valued variables are grouped into seven categories (or into the number of distinct values of the variable if this number is less than seven) with an approximately normal distribution unless otherwise specified. String variables are always converted into positive integers by assigning category indicators according to ascending alphanumeric order. Discretization for string variables applies to these integers. Other variables are left alone by default. The discretized variables are then used in the analysis.

Expand Show details Collapse Hide details
Discretization dialog box

Method. Choose between grouping, ranking, and multiplying.

• Grouping. Recode into a specified number of categories or recode by interval.

• Ranking. The variable is discretized by ranking the cases.

• Multiplying. The current values of the variable are standardized, multiplied by 10, rounded, and have a constant added so that the lowest discretized value is 1.

Grouping. The following options are available when discretizing variables by grouping:

• Number of categories. Specify a number of categories and whether the values of the variable should follow an approximately normal or uniform distribution across those categories.

• Equal intervals. Variables are recoded into categories defined by these equally sized intervals. You must specify the length of the intervals.

To Specify Multiple Correspondence Analysis Discretization Collapse Hide details

This feature requires the Categories option.

From the menus choose:

Analyze
Dimension Reduction
Optimal Scaling...

In the Multiple Correspondence Analysis dialog box, click Discretization.

Select the variable(s) that you want to discretize and choose the method(s).

Related Topics

Multiple Correspondence Analysis
Define Variable Weight in Multiple Correspondence Analysis
Multiple Correspondence Analysis Missing Values
Multiple Correspondence Analysis Options
Multiple Correspondence Analysis Output
Multiple Correspondence Analysis Save
Multiple Correspondence Analysis Object Plots
Multiple Correspondence Analysis Variable Plots


Multiple Correspondence Analysis Missing Values

missing values,missing values,missing values
in Multiple Correspondence Analysis,in Multiple Correspondence Analysis,in Multiple Correspondence Analysis

The Missing Values dialog box allows you to choose the strategy for handling missing values in analysis variables and supplementary variables.

Expand Show details Collapse Hide details
Missing Values dialog box

Missing Value Strategy. Choose to exclude missing values (passive treatment), impute missing values (active treatment), or exclude objects with missing values (listwise deletion).

• Exclude missing values; for correlations impute after quantification. Objects with missing values on the selected variable do not contribute to the analysis for this variable. If all variables are given passive treatment, then objects with missing values on all variables are treated as supplementary. If correlations are specified in the Output dialog box, then (after analysis) missing values are imputed with the most frequent category, or mode, of the variable for the correlations of the original variables. For the correlations of the optimally scaled variables, you can choose the method of imputation. Select Mode to replace missing values with the mode of the optimally scaled variable. Select Extra category to replace missing values with the quantification of an extra category. This implies that objects with a missing value on this variable are considered to belong to the same (extra) category.

• Impute missing values. Objects with missing values on the selected variable have those values imputed. You can choose the method of imputation. Select Mode to replace missing values with the most frequent category. When there are multiple modes, the one with the smallest category indicator is used. Select Extra category to replace missing values with the same quantification of an extra category. This implies that objects with a missing value on this variable are considered to belong to the same (extra) category.

• Exclude objects with missing values on this variable. Objects with missing values on the selected variable are excluded from the analysis. This strategy is not available for supplementary variables.

To Specify Multiple Correspondence Analysis Missing Values Collapse Hide details

This feature requires the Categories option.

From the menus choose:

Analyze
Dimension Reduction
Optimal Scaling...

In the Multiple Correspondence Analysis dialog box, click Missing.

Related Topics

Multiple Correspondence Analysis
Define Variable Weight in Multiple Correspondence Analysis
Multiple Correspondence Analysis Discretization
Multiple Correspondence Analysis Options
Multiple Correspondence Analysis Output
Multiple Correspondence Analysis Save
Multiple Correspondence Analysis Object Plots
Multiple Correspondence Analysis Variable Plots


Multiple Correspondence Analysis Options

Multiple Correspondence Analysis,Multiple Correspondence Analysis,Multiple Correspondence Analysis

The Options dialog box allows you to select the initial configuration, specify iteration and convergence criteria, select a normalization method, choose the method for labeling plots, and specify supplementary objects.

Expand Show details Collapse Hide details
Options dialog box

Supplementary Objects. Specify the case number of the object (or the first and last case numbers of a range of objects) that you want to make supplementary, and then click Add. Continue until you have specified all of your supplementary objects. If an object is specified as supplementary, then case weights are ignored for that object.

Normalization Method. You can specify one of five options for normalizing the object scores and the variables. Only one normalization method can be used in a given analysis.

• Variable Principal. This option optimizes the association between variables. The coordinates of the variables in the object space are the component loadings (correlations with principal components, such as dimensions and object scores). This is useful when you are interested primarily in the correlation between the variables.

• Object Principal. This option optimizes distances between objects. This is useful when you are interested primarily in differences or similarities between the objects.

• Symmetrical. Use this normalization option if you are interested primarily in the relation between objects and variables.

• Independent. Use this normalization option if you want to examine distances between objects and correlations between variables separately.

• Custom. You can specify any real value in the closed interval [–1, 1]. A value of 1 is equal to the Object Principal method, a value of 0 is equal to the Symmetrical method, and a value of –1 is equal to the Variable Principal method. By specifying a value greater than –1 and less than 1, you can spread the eigenvalue over both objects and variables. This method is useful for making a tailor-made biplot or triplot.

Criteria. You can specify the maximum number of iterations the procedure can go through in its computations. You can also select a convergence criterion value. The algorithm stops iterating if the difference in total fit between the last two iterations is less than the convergence value or if the maximum number of iterations is reached.

Label Plots By. Allows you to specify whether variables and value labels or variable names and values will be used in the plots. You can also specify a maximum length for labels.

Plot Dimensions. Allows you to control the dimensions displayed in the output.

• Display all dimensions in the solution. All dimensions in the solution are displayed in a scatterplot matrix.

• Restrict the number of dimensions. The displayed dimensions are restricted to plotted pairs. If you restrict the dimensions, you must select the lowest and highest dimensions to be plotted. The lowest dimension can range from 1 to the number of dimensions in the solution minus 1 and is plotted against higher dimensions. The highest dimension value can range from 2 to the number of dimensions in the solution and indicates the highest dimension to be used in plotting the dimension pairs. This specification applies to all requested multidimensional plots.

Configuration. You can read data from a file containing the coordinates of a configuration. The first variable in the file should contain the coordinates for the first dimension, the second variable should contain the coordinates for the second dimension, and so on.

• Initial. The configuration in the file specified will be used as the starting point of the analysis.

• Fixed. The configuration in the file specified will be used to fit in the variables. The variables that are fitted in must be selected as analysis variables, but, because the configuration is fixed, they are treated as supplementary variables (so they do not need to be selected as supplementary variables).

To Specify Multiple Correspondence Analysis Options Collapse Hide details

This feature requires the Categories option.

From the menus choose:

Analyze
Dimension Reduction
Optimal Scaling...

In the Multiple Correspondence Analysis dialog box, click Options.

Related Topics

Multiple Correspondence Analysis
Define Variable Weight in Multiple Correspondence Analysis
Multiple Correspondence Analysis Discretization
Multiple Correspondence Analysis Missing Values
Multiple Correspondence Analysis Output
Multiple Correspondence Analysis Save
Multiple Correspondence Analysis Object Plots
Multiple Correspondence Analysis Variable Plots


Multiple Correspondence Analysis Output

object scores,object scores,object scores
in Multiple Correspondence Analysis,in Multiple Correspondence Analysis,in Multiple Correspondence Analysis
iteration history,iteration history,iteration history
in Multiple Correspondence Analysis,in Multiple Correspondence Analysis,in Multiple Correspondence Analysis
correlation matrix,correlation matrix,correlation matrix
in Multiple Correspondence Analysis,in Multiple Correspondence Analysis,in Multiple Correspondence Analysis
discrimination measures,discrimination measures,discrimination measures
in Multiple Correspondence Analysis,in Multiple Correspondence Analysis,in Multiple Correspondence Analysis
category quantifications,category quantifications,category quantifications
in Multiple Correspondence Analysis,in Multiple Correspondence Analysis,in Multiple Correspondence Analysis

The Output dialog box allows you to produce tables for object scores, discrimination measures, iteration history, correlations of original and transformed variables, category quantifications for selected variables, and descriptive statistics for selected variables.

Expand Show details Collapse Hide details
Output dialog box

Object scores. Displays the object scores, including mass, inertia, and contributions, and has the following options:

• Include Categories Of. Displays the category indicators of the analysis variables selected.

• Label Object Scores By. From the list of variables specified as labeling variables, you can select one to label the objects.

Discrimination measures. Displays the discrimination measures per variable and per dimension.

Iteration history. For each iteration, the variance accounted for, loss, and increase in variance accounted for are shown.

Correlations of original variables. Shows the correlation matrix of the original variables and the eigenvalues of that matrix.

Correlations of transformed variables. Shows the correlation matrix of the transformed (optimally scaled) variables and the eigenvalues of that matrix.

Category Quantifications and Contributions. Gives the category quantifications (coordinates), including mass, inertia, and contributions, for each dimension of the variable(s) selected.

Note: the coordinates and contributions (including the mass and inertia) are displayed in separate layers of the pivot table output, with the coordinates shown by default. To display the contributions, activate (double-click) on the table and select Contributions from the Layer dropdown list.

Descriptive Statistics. Displays frequencies, number of missing values, and mode of the variable(s) selected.

To Specify Multiple Correspondence Output Collapse Hide details

This feature requires the Categories option.

From the menus choose:

Analyze
Dimension Reduction
Optimal Scaling...

In the Multiple Correspondence Analysis dialog box, click Output.

Related Topics

Multiple Correspondence Analysis
Define Variable Weight in Multiple Correspondence Analysis
Multiple Correspondence Analysis Discretization
Multiple Correspondence Analysis Missing Values
Multiple Correspondence Analysis Options
Multiple Correspondence Analysis Save
Multiple Correspondence Analysis Object Plots
Multiple Correspondence Analysis Variable Plots


Multiple Correspondence Analysis Save

Multiple Correspondence Analysis,Multiple Correspondence Analysis,Multiple Correspondence Analysis
save variables,save variables,save variables

The Save dialog box allows you to save discretized data, object scores, and transformed values to an external PASW Statistics data file or dataset in the current session. You can also save transformed values and object scores to the active dataset.

• Datasets are available during the current session but are not available in subsequent sessions unless you explicitly save them as data files. Dataset names must adhere to variable naming rules. See the topic Variable Names for more information.

• Filenames or dataset names must be different for each type of data saved.

• If you save object scores or transformed values to the active dataset, you can specify the number of multiple nominal dimensions.

Expand Show details Collapse Hide details
Save dialog box
To Save New Variables or New Data in Multiple Correspondence Analysis Collapse Hide details

This feature requires the Categories option.

From the menus choose:

Analyze
Dimension Reduction
Optimal Scaling...

In the Multiple Correspondence Analysis dialog box, click Save.

Related Topics

Multiple Correspondence Analysis
Define Variable Weight in Multiple Correspondence Analysis
Multiple Correspondence Analysis Discretization
Multiple Correspondence Analysis Missing Values
Multiple Correspondence Analysis Options
Multiple Correspondence Analysis Output
Multiple Correspondence Analysis Object Plots
Multiple Correspondence Analysis Variable Plots


Multiple Correspondence Analysis Object Plots

object points plots,object points plots,object points plots
in Multiple Correspondence Analysis,in Multiple Correspondence Analysis,in Multiple Correspondence Analysis
biplots,biplots,biplots
in Multiple Correspondence Analysis,in Multiple Correspondence Analysis,in Multiple Correspondence Analysis

The Object Plots dialog box allows you to specify the types of plots desired and the variables to be plotted

Expand Show details Collapse Hide details
Object Plots dialog box

Object points. A plot of the object points is displayed.

Objects and centroids (biplot). The object points are plotted with the variable centroids.

Biplot Variables. You can choose to use all variables for the biplots or select a subset.

Label Objects. You can choose to have objects labeled with the categories of selected variables (you may choose category indicator values or value labels in the Options dialog box) or with their case numbers. One plot is produced per variable if Variable is selected.

To Obtain Object Plots in Multiple Correspondence Analysis Collapse Hide details

Select the dependent and independent variables in the Multiple Correspondence Analysis dialog box.

In the Plots group, click Object.

Select the types of plots and variables for which plots will be produced and variables to label the objects in the plot.

Click Continue.

Related Topics

Multiple Correspondence Analysis
Define Variable Weight in Multiple Correspondence Analysis
Multiple Correspondence Analysis Discretization
Multiple Correspondence Analysis Missing Values
Multiple Correspondence Analysis Options
Multiple Correspondence Analysis Output
Multiple Correspondence Analysis Save
Multiple Correspondence Analysis Variable Plots


Multiple Correspondence Analysis Variable Plots

category plots,category plots,category plots
in Multiple Correspondence Analysis,in Multiple Correspondence Analysis,in Multiple Correspondence Analysis
joint category plots,joint category plots,joint category plots
in Multiple Correspondence Analysis,in Multiple Correspondence Analysis,in Multiple Correspondence Analysis
transformation plots,transformation plots,transformation plots
in Multiple Correspondence Analysis,in Multiple Correspondence Analysis,in Multiple Correspondence Analysis
discrimination measures plots,discrimination measures plots,discrimination measures plots
in Multiple Correspondence Analysis,in Multiple Correspondence Analysis,in Multiple Correspondence Analysis

The Variable Plots dialog box allows you to specify the types of plots desired and the variables to be plotted.

Expand Show details Collapse Hide details
Variable Plots dialog box

Category Plots. For each variable selected, a plot of the centroid coordinates is plotted. Categories are in the centroids of the objects in the particular categories.

Joint Category Plots. This is a single plot of the centroid coordinates of each selected variable.

Transformation Plots. Displays a plot of the optimal category quantifications versus the category indicators. You can specify the number of dimensions desired; one plot will be generated for each dimension. You can also choose to display residual plots for each variable selected.

Discrimination Measures. Produces a single plot of the discrimination measures for the selected variables.

To Obtain Category Plots in Multiple Correspondence Analysis Collapse Hide details

Select the variables in the Multiple Correspondence Analysis dialog box.

In the Plots group, click Category.

Select the types of plots and variables for which plots will be produced.

Click Continue.

Related Topics

Multiple Correspondence Analysis
Define Variable Weight in Multiple Correspondence Analysis
Multiple Correspondence Analysis Discretization
Multiple Correspondence Analysis Missing Values
Multiple Correspondence Analysis Options
Multiple Correspondence Analysis Output
Multiple Correspondence Analysis Save
Multiple Correspondence Analysis Object Plots


MULTIPLE CORRESPONDENCE Command Additional Features

Multiple Correspondence Analysis,Multiple Correspondence Analysis,Multiple Correspondence Analysis
command additional features,command additional features,command additional features

You can customize your Multiple Correspondence Analysis if you paste your selections into a syntax window and edit the resulting MULTIPLE CORRESPONDENCE command syntax. The command syntax language also allows you to:

• Specify rootnames for the transformed variables, object scores, and approximations when saving them to the active dataset (with the SAVE subcommand).

• Specify a maximum length for labels for each plot separately (with the PLOT subcommand).

• Specify a separate variable list for residual plots (with the PLOT subcommand).

Related Topics

MULTIPLE CORRESPONDENCE


Multidimensional Scaling (PROXSCAL)

Multidimensional Scaling,Multidimensional Scaling,Multidimensional Scaling
Multidimensional Scaling,Multidimensional Scaling,Multidimensional Scaling
statistics,statistics,statistics
Multidimensional Scaling,Multidimensional Scaling,Multidimensional Scaling
plots,plots,plots

Multidimensional scaling attempts to find the structure in a set of proximity measures between objects. This process is accomplished by assigning observations to specific locations in a conceptual low-dimensional space such that the distances between points in the space match the given (dis)similarities as closely as possible. The result is a least-squares representation of the objects in that low-dimensional space, which, in many cases, will help you to further understand your data.

Example. Multidimensional scaling can be very useful in determining perceptual relationships. For example, when considering your product image, you can conduct a survey to obtain a dataset that describes the perceived similarity (or proximity) of your product to those of your competitors. Using these proximities and independent variables (such as price), you can try to determine which variables are important to how people view these products, and you can adjust your image accordingly.

Statistics and plots. Iteration history, stress measures, stress decomposition, coordinates of the common space, object distances within the final configuration, individual space weights, individual spaces, transformed proximities, transformed independent variables, stress plots, common space scatterplots, individual space weight scatterplots, individual spaces scatterplots, transformation plots, Shepard residual plots, and independent variables transformation plots.

Show me

Multidimensional Scaling Data Considerations Collapse Hide details

Data. Data can be supplied in the form of proximity matrices or variables that are converted into proximity matrices. The matrices can be formatted in columns or across columns. The proximities can be treated on the ratio, interval, ordinal, or spline scaling levels.

Assumptions. At least three variables must be specified. The number of dimensions cannot exceed the number of objects minus one. Dimensionality reduction is omitted if combined with multiple random starts. If only one source is specified, all models are equivalent to the identity model; therefore, the analysis defaults to the identity model.

Related procedures. Scaling all variables at the numerical level corresponds to standard multidimensional scaling analysis.

To Obtain a Multidimensional Scaling Collapse Hide details

To Obtain a Multidimensional Scaling

This feature requires the Categories option.

From the menus choose:

Analyze
Scale
Multidimensional Scaling (PROXSCAL)...

This opens the Data Format dialog box.

Expand Show details Collapse Hide details
Data Format dialog box

Specify the format of your data:

Data Format. Specify whether your data consist of proximity measures or you want to create proximities from the data.

Number of Sources. If your data are proximities, specify whether you have a single source or multiple sources of proximity measures.

One Source. If there is one source of proximities, specify whether your dataset is formatted with the proximities in a matrix across the columns or in a single column with two separate variables to identify the row and column of each proximity.

Expand Show details Collapse Hide details

• The proximities are in a matrix across columns. The proximity matrix is spread across a number of columns equal to the number of objects. This leads to the Proximities in Matrices across Columns dialog box.

• The proximities are in a single column. The proximity matrix is collapsed into a single column, or variable. Two additional variables, identifying the row and column for each cell, are necessary. This leads to the Proximities in One Column dialog box.

Multiple Sources. If there are multiple sources of proximities, specify whether the dataset is formatted with the proximities in stacked matrices across columns, in multiple columns with one source per column, or in a single column.

Expand Show details Collapse Hide details

• The proximities are in stacked matrices across columns. The proximity matrices are spread across a number of columns equal to the number of objects and are stacked above one another across a number of rows equal to the number of objects times the number of sources. This leads to the Proximities in Matrices across Columns dialog box.

• The proximities are in columns, one source per column. The proximity matrices are collapsed into multiple columns, or variables. Two additional variables, identifying the row and column for each cell, are necessary. This leads to the Proximities in Columns dialog box.

• The proximites are stacked in a single column. The proximity matrices are collapsed into a single column, or variable. Three additional variables, identifying the row, column, and source for each cell, are necessary. This leads to the Proximities in One Column dialog box.

Click Define.

This procedure pastes PROXSCAL command syntax.

See PROXSCAL Algorithms for computational details for this procedure.

Related Topics

PROXSCAL
Categorical Regression (CATREG)
Optimal Scaling by Alternating Least Squares
Categorical Principal Components Analysis (CATPCA)
Nonlinear Canonical Correlation Analysis (OVERALS)
Correspondence Analysis
Multiple Correspondence Analysis
Multidimensional Unfolding (PREFSCAL)
Proximities in Matrices across Columns
Proximities in Columns
Proximities in One Column
Create Proximities from Data
Create Measure from Data
Define a Multidimensional Scaling Model
Multidimensional Scaling Restrictions
Multidimensional Scaling Options
Multidimensional Scaling Plots, Version 1
Multidimensional Scaling Plots, Version 2
Multidimensional Scaling Output


Proximities in Matrices across Columns

Multidimensional Scaling,Multidimensional Scaling,Multidimensional Scaling

If you select the proximities in matrices data model for either one source or multiple sources in the Data Format dialog box, the main dialog box will appear as follows:

Expand Show details Collapse Hide details
Proximities in Matrices across Columns dialog box

Select three or more proximities variables. (Be sure that the order of the variables in the list matches the order of the columns of the proximities.)

Optionally, select a number of weights variables equal to the number of proximities variables. (Be sure that the order of the weights matches the order of the proximities that they weight.)

Optionally, if there are multiple sources, select a sources variable. (The number of cases in each proximities variable should equal the number of proximities variables times the number of sources.)

Additionally, you can define a model for the multidimensional scaling, place restrictions on the common space, set convergence criteria, specify the initial configuration to be used, and choose plots and output.

Related Topics

Proximities in Columns
Proximities in One Column
Create Proximities from Data
Create Measure from Data
Define a Multidimensional Scaling Model
Multidimensional Scaling Restrictions
Multidimensional Scaling Options
Multidimensional Scaling Plots, Version 1
Multidimensional Scaling Plots, Version 2
Multidimensional Scaling Output


Proximities in Columns

Multidimensional Scaling,Multidimensional Scaling,Multidimensional Scaling

If you select the multiple columns model for multiple sources in the Data Format dialog box, the main dialog box will appear as follows:

Expand Show details Collapse Hide details
Proximities in Columns dialog box

Select two or more proximities variables. (Each variable is assumed to be a matrix of proximities from a separate source.)

Select a rows variable to define the row locations for the proximities in each proximities variable.

Select a columns variable to define the column locations for the proximities in each proximities variable. (Cells of the proximity matrix that are not given a row/column designation are treated as missing.)

Optionally, select a number of weights variables equal to the number of proximities variables.

Additionally, you can define a model for the multidimensional scaling, place restrictions on the common space, set convergence criteria, specify the initial configuration to be used, and choose plots and output.

Related Topics

Proximities in Matrices across Columns
Proximities in One Column
Create Proximities from Data
Create Measure from Data
Define a Multidimensional Scaling Model
Multidimensional Scaling Restrictions
Multidimensional Scaling Options
Multidimensional Scaling Plots, Version 1
Multidimensional Scaling Plots, Version 2
Multidimensional Scaling Output


Proximities in One Column

Multidimensional Scaling,Multidimensional Scaling,Multidimensional Scaling

If you select the one column model for either one source or multiple sources in the Data Format dialog box, the main dialog box will appear as follows:

Expand Show details Collapse Hide details
Proximities in One Column dialog box

Select a proximities variable. (t is assumed to be one or more matrices of proximities.)

Select a rows variable to define the row locations for the proximities in the proximities variable.

Select a columns variable to define the column locations for the proximities in the proximities variable.

If there are multiple sources, select a sources variable. (For each source, cells of the proximity matrix that are not given a row/column designation are treated as missing.)

Optionally, select a weights variable.

Additionally, you can define a model for the multidimensional scaling, place restrictions on the common space, set convergence criteria, specify the initial configuration to be used, and choose plots and output.

Related Topics

Proximities in Matrices across Columns
Proximities in Columns
Create Proximities from Data
Create Measure from Data
Define a Multidimensional Scaling Model
Multidimensional Scaling Restrictions
Multidimensional Scaling Options
Multidimensional Scaling Plots, Version 1
Multidimensional Scaling Plots, Version 2
Multidimensional Scaling Output


Create Proximities from Data

Multidimensional Scaling,Multidimensional Scaling,Multidimensional Scaling

If you choose to create proximities from the data in the Data Format dialog box, the main dialog box will appear as follows:

Expand Show details Collapse Hide details
Create Proximities from Data dialog box

If you create distances between variables (see the Create Measure from Data dialog box), select at least three variables. These variables will be used to create the proximity matrix (or matrices, if there are multiple sources). If you create distances between cases, only one variable is needed.

If there are multiple sources, select a sources variable.

Optionally, choose a measure for creating proximities.

Additionally, you can define a model for the multidimensional scaling, place restrictions on the common space, set convergence criteria, specify the initial configuration to be used, and choose plots and output.

Related Topics

Proximities in Matrices across Columns
Proximities in Columns
Proximities in One Column
Create Measure from Data
Define a Multidimensional Scaling Model
Multidimensional Scaling Restrictions
Multidimensional Scaling Options
Multidimensional Scaling Plots, Version 1
Multidimensional Scaling Plots, Version 2
Multidimensional Scaling Output


Create Measure from Data

Multidimensional Scaling,Multidimensional Scaling,Multidimensional Scaling
Expand Show details Collapse Hide details
Create Measure from Data dialog box

Multidimensional scaling uses dissimilarity data to create a scaling solution. If your data are multivariate data (values of measured variables), you must create dissimilarity data in order to compute a multidimensional scaling solution. You can specify the details of creating dissimilarity measures from your data.

Measure. Allows you to specify the dissimilarity measure for your analysis. Select one alternative from the Measure group corresponding to your type of data, and then select one of the measures from the drop-down list corresponding to that type of measure. Available alternatives are:

• Interval. Euclidean distance, Squared Euclidean distance, Chebychev, Block, Minkowski, or Customized.

• Counts. Chi-square measure or Phi-square measure.

• Binary. Euclidean distance, Squared Euclidean distance, Size difference, Pattern difference, Variance, or Lance and Williams.

Create Distance Matrix. Allows you to choose the unit of analysis. Alternatives are Between variables or Between cases.

Transform Values. In certain cases, such as when variables are measured on very different scales, you want to standardize values before computing proximities (not applicable to binary data). Select a standardization method from the Standardize drop-down list (if no standardization is required, select None).

Selecting a Measure Collapse Hide details

This feature requires the Categories option.

From the menus choose:

Analyze
Scale
Multidimensional Scaling (PROXSCAL)…

Choose to create proximities from the data in the Data Format dialog box and click Define.

In the Create Proximities from Data dialog box, click Measure.

Select a data type (Interval, Counts, or Binary).

Select a dissimilarity measure from the appropriate drop-down list.

Related Topics

Multidimensional Scaling Dissimilarity Measures for Interval Data
Multidimensional Scaling Dissimilarity Measures for Count Data
Multidimensional Scaling Dissimilarity Measures for Binary Data
Multidimensional Scaling Transform Values
Proximities in Matrices across Columns
Proximities in Columns
Proximities in One Column
Create Proximities from Data
Define a Multidimensional Scaling Model
Multidimensional Scaling Restrictions
Multidimensional Scaling Options
Multidimensional Scaling Plots, Version 1
Multidimensional Scaling Plots, Version 2
Multidimensional Scaling Output


Multidimensional Scaling Dissimilarity Measures for Interval Data

Multidimensional Scaling,Multidimensional Scaling,Multidimensional Scaling
measures for interval data,measures for interval data,measures for interval data
Multidimensional Scaling,Multidimensional Scaling,Multidimensional Scaling
creating distance matrices,creating distance matrices,creating distance matrices
Euclidean distance,Euclidean distance,Euclidean distance
in Multidimensional Scaling,in Multidimensional Scaling,in Multidimensional Scaling
squared Euclidean distance,squared Euclidean distance,squared Euclidean distance
in Multidimensional Scaling,in Multidimensional Scaling,in Multidimensional Scaling
Chebychev distance,Chebychev distance,Chebychev distance
in Multidimensional Scaling,in Multidimensional Scaling,in Multidimensional Scaling
block distance,block distance,block distance
in Multidimensional Scaling,in Multidimensional Scaling,in Multidimensional Scaling
Minkowski distance,Minkowski distance,Minkowski distance
in Multidimensional Scaling,in Multidimensional Scaling,in Multidimensional Scaling
customized distance measures,customized distance measures,customized distance measures
in Multidimensional Scaling,in Multidimensional Scaling,in Multidimensional Scaling

The following dissimilarity measures are available for interval data:

Euclidean distance. The square root of the sum of the squared differences between values for the items. This is the default for interval data.

Squared Euclidean distance. The sum of the squared differences between the values for the items.

Chebychev. The maximum absolute difference between the values for the items.

Block. The sum of the absolute differences between the values of the item. Also known as Manhattan distance.

Minkowski. The pth root of the sum of the absolute differences to the pth power between the values for the items.

Customized. The rth root of the sum of the absolute differences to the pth power between the values for the items.

Related Topics

Create Measure from Data
Multidimensional Scaling Dissimilarity Measures for Count Data
Multidimensional Scaling Dissimilarity Measures for Binary Data
Multidimensional Scaling Transform Values


Multidimensional Scaling Dissimilarity Measures for Count Data

Multidimensional Scaling,Multidimensional Scaling,Multidimensional Scaling
measures for count data,measures for count data,measures for count data
Multidimensional Scaling,Multidimensional Scaling,Multidimensional Scaling
creating distance matrices,creating distance matrices,creating distance matrices
chi-square distance,chi-square distance,chi-square distance
in Multidimensional Scaling,in Multidimensional Scaling,in Multidimensional Scaling
phi-square distance measure,phi-square distance measure,phi-square distance measure
in Multidimensional Scaling,in Multidimensional Scaling,in Multidimensional Scaling

The following dissimilarity measures are available for count data:

Chi-square measure. Based on the chi-square test of equality for two sets of frequencies. This is the default for count data.

Phi-square measure. This measure is equal to the chi-square measure normalized by the square root of the combined frequency.

Related Topics

Create Measure from Data
Multidimensional Scaling Dissimilarity Measures for Interval Data
Multidimensional Scaling Dissimilarity Measures for Binary Data
Multidimensional Scaling Transform Values


Multidimensional Scaling Dissimilarity Measures for Binary Data

Multidimensional Scaling,Multidimensional Scaling,Multidimensional Scaling
measures for binary data,measures for binary data,measures for binary data
Multidimensional Scaling,Multidimensional Scaling,Multidimensional Scaling
creating distance matrices,creating distance matrices,creating distance matrices
binary Euclidean distance,binary Euclidean distance,binary Euclidean distance
in Multidimensional Scaling,in Multidimensional Scaling,in Multidimensional Scaling
binary squared Euclidean distance,binary squared Euclidean distance,binary squared Euclidean distance
in Multidimensional Scaling,in Multidimensional Scaling,in Multidimensional Scaling
size difference measure,size difference measure,size difference measure
in Multidimensional Scaling,in Multidimensional Scaling,in Multidimensional Scaling
pattern difference measure,pattern difference measure,pattern difference measure
in Multidimensional Scaling,in Multidimensional Scaling,in Multidimensional Scaling
variance distance,variance distance,variance distance
in Multidimensional Scaling,in Multidimensional Scaling,in Multidimensional Scaling
Lance and Williams dissimilarity measure,Lance and Williams dissimilarity measure,Lance and Williams dissimilarity measure
in Multidimensional Scaling,in Multidimensional Scaling,in Multidimensional Scaling

The following dissimilarity measures are available for binary data:

Euclidean distance. Computed from a fourfold table as SQRT(b+c), where b and c represent the diagonal cells corresponding to cases present on one item but absent on the other.

Squared Euclidean distance. Computed as the number of discordant cases. Its minimum value is 0, and it has no upper limit.

Size difference. An index of asymmetry. It ranges from 0 to 1.

Pattern difference. Dissimilarity measure for binary data that ranges from 0 to 1. Computed from a fourfold table as bc/(n**2), where b and c represent the diagonal cells corresponding to cases present on one item but absent on the other and n is the total number of observations.

Variance. Computed from a fourfold table as (b+c)/4n, where b and c represent the diagonal cells corresponding to cases present on one item but absent on the other and n is the total number of observations. It ranges from 0 to 1.

Lance and Williams. Computed from a fourfold table as (b+c)/(2a+b+c), where a represents the cell corresponding to cases present on both items, and b and c represent the diagonal cells corresponding to cases present on one item but absent on the other. This measure has a range of 0 to 1. (Also known as the Bray-Curtis nonmetric coefficient.)

You can optionally change the Present and Absent fields to specify the values that indicate that a characteristic is present or absent. The procedure will ignore all other values.

Related Topics

Create Measure from Data
Multidimensional Scaling Dissimilarity Measures for Interval Data
Multidimensional Scaling Dissimilarity Measures for Count Data
Multidimensional Scaling Transform Values


Multidimensional Scaling Transform Values

Multidimensional Scaling,Multidimensional Scaling,Multidimensional Scaling
transforming values,transforming values,transforming values
Multidimensional Scaling,Multidimensional Scaling,Multidimensional Scaling
creating distance matrices,creating distance matrices,creating distance matrices
Multidimensional Scaling,Multidimensional Scaling,Multidimensional Scaling
standardizing values,standardizing values,standardizing values

The following alternatives are available for transforming values:

Z scores. Values are standardized to Z scores, with a mean of 0 and a standard deviation of 1.

Range -1 to 1. Each value for the item being standardized is divided by the range of the values.

Range 0 to 1. The procedure subtracts the minimum value from each item being standardized and then divides by the range.

Maximum magnitude of 1. The procedure divides each value for the item being standardized by the maximum of the values.

Mean of 1. The procedure divides each value for the item being standardized by the mean of the values.

Standard deviation of 1. The procedure divides each value for the variable or case being standardized by the standard deviation of the values.

Additionally, you can choose how standardization is done. Alternatives are By variable or By case.

Related Topics

Create Measure from Data
Multidimensional Scaling Dissimilarity Measures for Interval Data
Multidimensional Scaling Dissimilarity Measures for Count Data
Multidimensional Scaling Dissimilarity Measures for Binary Data


Define a Multidimensional Scaling Model

Multidimensional Scaling,Multidimensional Scaling,Multidimensional Scaling
model,model,model

The Model dialog box allows you to specify a scaling model, its minimum and maximum number of dimensions, the structure of the proximity matrix, the transformation to use on the proximities, and whether proximities are transformed within each source separately or unconditionally on the source.

Expand Show details Collapse Hide details
Model dialog box

Scaling Model. Choose from the following alternatives:

• Identity. All sources have the same configuration.

• Weighted Euclidean. This model is an individual differences model. Each source has an individual space in which every dimension of the common space is weighted differentially.

• Generalized Euclidean. This model is an individual differences model. Each source has an individual space that is equal to a rotation of the common space, followed by a differential weighting of the dimensions.

• Reduced rank. This model is a generalized Euclidean model for which you can specify the rank of the individual space. You must specify a rank that is greater than or equal to 1 and less than the maximum number of dimensions.

Shape. Specify whether the proximities should be taken from the lower-triangular part or the upper-triangular part of the proximity matrix. You can specify that the full matrix be used, in which case the weighted sum of the upper-triangular part and the lower-triangular part will be analyzed. In any case, the complete matrix should be specified, including the diagonal, though only the specified parts will be used.

Proximities. Specify whether your proximity matrix contains measures of similarity or dissimilarity.

Proximity Transformations. Choose from the following alternatives:

• Ratio. The transformed proximities are proportional to the original proximities. This is allowed only for positively valued proximities.

• Interval. The transformed proximities are proportional to the original proximities, plus an intercept term. The intercept assures all transformed proximities to be positive.

• Ordinal. The transformed proximities have the same order as the original proximities. You specify whether tied proximities should be kept tied or allowed to become untied.

• Spline. The transformed proximities are a smooth nondecreasing piecewise polynomial transformation of the original proximities. You specify the degree of the polynomial and the number of interior knots.

Apply Transformations. Specify whether only proximities within each source are compared with each other or whether the comparisons are unconditional on the source.

Dimensions. By default, a solution is computed in two dimensions (Minimum = 2, Maximum = 2). You choose an integer minimum and maximum from 1 to the number of objects minus 1 (as long as the minimum is less than or equal to the maximum). The procedure computes a solution in the maximum dimensions and then reduces the dimensionality in steps until the lowest is reached.

To Define a Multidimensional Scaling Model Collapse Hide details

This feature requires the Categories option.

From the menus choose:

Analyze
Scale
Multidimensional Scaling (PROXSCAL)...

Make the appropriate selections in the Data Format dialog box and click Define.

In the Multidimensional Scaling dialog box, click Model.

Related Topics

Multidimensional Scaling (PROXSCAL)
Proximities in Matrices across Columns
Proximities in Columns
Proximities in One Column
Create Proximities from Data
Create Measure from Data
Multidimensional Scaling Restrictions
Multidimensional Scaling Options
Multidimensional Scaling Plots, Version 1
Multidimensional Scaling Plots, Version 2
Multidimensional Scaling Output


Multidimensional Scaling Restrictions

Multidimensional Scaling,Multidimensional Scaling,Multidimensional Scaling
restrictions,restrictions,restrictions
restrictions,restrictions,restrictions
in Multidimensional Scaling,in Multidimensional Scaling,in Multidimensional Scaling

The Restrictions dialog box allows you to place restrictions on the common space.

Expand Show details Collapse Hide details
Restrictions dialog box

Restrictions on Common Space. Specify the type of restriction desired.

• No restrictions. No restrictions are placed on the common space.

• Some coordinates fixed. The first variable selected contains the coordinates of the objects on the first dimension, the second variable corresponds to coordinates on the second dimension, and so on. A missing value indicates that a coordinate on a dimension is free. The number of variables selected must equal the maximum number of dimensions requested.

• Linear combination of independent variables. The common space is restricted to be a linear combination of the variables selected.

Restriction Variables. Select the variables that define the restrictions on the common space. If you specified a linear combination, you specify an interval, nominal, ordinal, or spline transformation for the restriction variables. In either case, the number of cases for each variable must equal the number of objects.

To Specify Multidimensional Scaling Restrictions Collapse Hide details

This feature requires the Categories option.

From the menus choose:

Analyze
Scale
Multidimensional Scaling (PROXSCAL)...

Make the appropriate selections in the Data Format dialog box and click Define.

In the Multidimensional Scaling dialog box, click Restrictions.

Related Topics

Multidimensional Scaling (PROXSCAL)
Proximities in Matrices across Columns
Proximities in Columns
Proximities in One Column
Create Proximities from Data
Create Measure from Data
Define a Multidimensional Scaling Model
Multidimensional Scaling Options
Multidimensional Scaling Plots, Version 1
Multidimensional Scaling Plots, Version 2
Multidimensional Scaling Output


Multidimensional Scaling Options

Multidimensional Scaling,Multidimensional Scaling,Multidimensional Scaling
options,options,options
initial configuration,initial configuration,initial configuration
in Multidimensional Scaling,in Multidimensional Scaling,in Multidimensional Scaling
relaxed updates,relaxed updates,relaxed updates
in Multidimensional Scaling,in Multidimensional Scaling,in Multidimensional Scaling
iteration criteria,iteration criteria,iteration criteria
in Multidimensional Scaling,in Multidimensional Scaling,in Multidimensional Scaling

The Options dialog box allows you to select the initial configuration style, specify iteration and convergence criteria, and select standard or relaxed updates.

Expand Show details Collapse Hide details
Options dialog box

Initial Configuration. Choose one of the following alternatives:

• Simplex. Objects are placed at the same distance from each other in the maximum dimension. One iteration is taken to improve this high-dimensional configuration, followed by a dimension reduction operation to obtain an initial configuration that has the maximum number of dimensions that you specified in the Model dialog box.

• Torgerson. A classical scaling solution is used as the initial configuration.

• Single random start. A configuration is chosen at random.

• Multiple random starts. Several configurations are chosen at random, and the configuration with the lowest normalized raw stress is used as the initial configuration.

• Custom. You select variables that contain the coordinates of your own initial configuration. The number of variables selected should equal the maximum number of dimensions specified, with the first variable corresponding to coordinates on dimension 1, the second variable corresponding to coordinates on dimension 2, and so on. The number of cases in each variable should equal the number of objects.

Iteration Criteria. Specify the iteration criteria values.

• Stress convergence. The algorithm will stop iterating when the difference in consecutive normalized raw stress values is less than the number that is specified here, which must lie between 0.0 and 1.0.

• Minimum stress. The algorithm will stop when the normalized raw stress falls below the number that is specified here, which must lie between 0.0 and 1.0.

• Maximum iterations. The algorithm will perform the number of specified iterations, unless one of the above criteria is satisfied first.

• Use relaxed updates. Relaxed updates will speed up the algorithm; these updates cannot be used with models other than the identity model or used with restrictions.

To Specify Multidimensional Scaling Options Collapse Hide details

This feature requires the Categories option.

From the menus choose:

Analyze
Scale
Multidimensional Scaling (PROXSCAL)...

Make the appropriate selections in the Data Format dialog box and click Define.

In the Multidimensional Scaling dialog box, click Options.

Related Topics

Multidimensional Scaling (PROXSCAL)
Proximities in Matrices across Columns
Proximities in Columns
Proximities in One Column
Create Proximities from Data
Create Measure from Data
Define a Multidimensional Scaling Model
Multidimensional Scaling Restrictions
Multidimensional Scaling Plots, Version 1
Multidimensional Scaling Plots, Version 2
Multidimensional Scaling Output


Multidimensional Scaling Plots, Version 1

Multidimensional Scaling,Multidimensional Scaling,Multidimensional Scaling
plots,plots,plots
plots,plots,plots
in Multidimensional Scaling,in Multidimensional Scaling,in Multidimensional Scaling
stress plots,stress plots,stress plots
in Multidimensional Scaling,in Multidimensional Scaling,in Multidimensional Scaling
common space plots,common space plots,common space plots
in Multidimensional Scaling,in Multidimensional Scaling,in Multidimensional Scaling
individual spaces plots,individual spaces plots,individual spaces plots
in Multidimensional Scaling,in Multidimensional Scaling,in Multidimensional Scaling
individual space weights plots,individual space weights plots,individual space weights plots
in Multidimensional Scaling,in Multidimensional Scaling,in Multidimensional Scaling
transformation plots,transformation plots,transformation plots
in Multidimensional Scaling,in Multidimensional Scaling,in Multidimensional Scaling
correlations plots,correlations plots,correlations plots
in Multidimensional Scaling,in Multidimensional Scaling,in Multidimensional Scaling

The Plots dialog box allows you to specify which plots will be produced. If you have the Proximities in Columns data format, the following Plots dialog box is displayed. For Individual space weights, Original vs. transformed proximities, and Transformed proximities vs. distances plots, you specify the sources for which the plots should be produced. The list of available sources is the list of proximities variables in the main dialog box.

Expand Show details Collapse Hide details
Plots dialog box, version 1

Stress. A plot is produced of normalized raw stress versus dimensions. This plot is produced only if the maximum number of dimensions is larger than the minimum number of dimensions.

Common space. A scatterplot matrix of coordinates of the common space is displayed.

Individual spaces. For each source, the coordinates of the individual spaces are displayed in scatterplot matrices. This is possible only if one of the individual differences models is specified in the Model dialog box.

Individual space weights. A scatterplot is produced of the individual space weights. This is possible only if one of the individual differences models is specified in the Model dialog box. For the weighted Euclidean model, the weights are printed in plots, with one dimension on each axis. For the generalized Euclidean model, one plot is produced per dimension, indicating both rotation and weighting of that dimension. The reduced rank model produces the same plot as the generalized Euclidean model but reduces the number of dimensions for the individual spaces.

Original vs. transformed proximities. Plots are produced of the original proximities versus the transformed proximities.

Transformed proximities vs. distances. The transformed proximities versus the distances are plotted.

Transformed independent variables. Transformation plots are produced for the independent variables.

Variable and dimension correlations. A plot of correlations between the independent variables and the dimensions of the common space is displayed.

To Obtain Plots in Multidimensional Scaling Collapse Hide details

This feature requires the Categories option.

From the menus choose:

Analyze
Scale
Multidimensional Scaling (PROXSCAL)...

Make the appropriate selections in the Data Format dialog box and click Define.

In the Multidimensional Scaling dialog box, click Plots.

Related Topics

Multidimensional Scaling (PROXSCAL)
Proximities in Matrices across Columns
Proximities in Columns
Proximities in One Column
Create Proximities from Data
Create Measure from Data
Define a Multidimensional Scaling Model
Multidimensional Scaling Restrictions
Multidimensional Scaling Options
Multidimensional Scaling Plots, Version 2
Multidimensional Scaling Output


Multidimensional Scaling Plots, Version 2

Multidimensional Scaling,Multidimensional Scaling,Multidimensional Scaling
plots,plots,plots
plots,plots,plots
in Multidimensional Scaling,in Multidimensional Scaling,in Multidimensional Scaling

The Plots dialog box allows you to specify which plots will be produced. If your data format is anything other than Proximities in Columns, the following Plots dialog box is displayed. For Individual space weights, Original vs. transformed proximities, and Transformed proximities vs. distances plots, you specify the sources for which the plots should be produced. The source numbers entered must be values of the sources variable that is specified in the main dialog box and must range from 1 to the number of sources.

Expand Show details Collapse Hide details
Plots dialog box, version 2
To Obtain Plots in Multidimensional Scaling Collapse Hide details

This feature requires the Categories option.

From the menus choose:

Analyze
Scale
Multidimensional Scaling (PROXSCAL)...

Make the appropriate selections in the Data Format dialog box and click Define.

In the Multidimensional Scaling dialog box, click Plots.

Related Topics

Multidimensional Scaling (PROXSCAL)
Proximities in Matrices across Columns
Proximities in Columns
Proximities in One Column
Create Proximities from Data
Create Measure from Data
Define a Multidimensional Scaling Model
Multidimensional Scaling Restrictions
Multidimensional Scaling Options
Multidimensional Scaling Plots, Version 1
Multidimensional Scaling Output


Multidimensional Scaling Output

Multidimensional Scaling,Multidimensional Scaling,Multidimensional Scaling
output,output,output
stress measures,stress measures,stress measures
in Multidimensional Scaling,in Multidimensional Scaling,in Multidimensional Scaling
common space coordinates,common space coordinates,common space coordinates
in Multidimensional Scaling,in Multidimensional Scaling,in Multidimensional Scaling
distances,distances,distances
in Multidimensional Scaling,in Multidimensional Scaling,in Multidimensional Scaling
individual space weights,individual space weights,individual space weights
in Multidimensional Scaling,in Multidimensional Scaling,in Multidimensional Scaling
transformed proximities,transformed proximities,transformed proximities
in Multidimensional Scaling,in Multidimensional Scaling,in Multidimensional Scaling
iteration history,iteration history,iteration history
in Multidimensional Scaling,in Multidimensional Scaling,in Multidimensional Scaling
transformed independent variables,transformed independent variables,transformed independent variables
in Multidimensional Scaling,in Multidimensional Scaling,in Multidimensional Scaling
correlations,correlations,correlations
in Multidimensional Scaling,in Multidimensional Scaling,in Multidimensional Scaling

The Output dialog box allows you to control the amount of displayed output and save some of it to separate files.

Expand Show details Collapse Hide details
Output dialog box

Display. Select one or more of the following items for display:

• Common space coordinates. Displays the coordinates of the common space.

• Individual space coordinates. The coordinates of the individual spaces are displayed only if the model is not the identity model.

• Individual space weights. Displays the individual space weights only if one of the individual differences models is specified. Depending on the model, the space weights are decomposed in rotation weights and dimension weights, which are also displayed.

• Distances. Displays the distances between the objects in the configuration.

• Transformed proximities. Displays the transformed proximities between the objects in the configuration.

• Input data. Includes the original proximities and, if present, the data weights, the initial configuration, and the fixed coordinates of the independent variables.

• Stress for random starts. Displays the random number seed and normalized raw stress value of each random start.

• Iteration history. Displays the history of iterations of the main algorithm.

• Multiple stress measures. Displays different stress values. The table contains values for normalized raw stress, Stress-I, Stress-II, S-Stress, Dispersion Accounted For (DAF), and Tucker's Coefficient of Congruence.

• Stress decomposition. Displays an objects and sources decomposition of final normalized raw stress, including the average per object and the average per source.

• Transformed independent variables. If a linear combination restriction was selected, the transformed independent variables and the corresponding regression weights are displayed.

• Variable and dimension correlations. If a linear combination restriction was selected, the correlations between the independent variables and the dimensions of the common space are displayed.

Save to New File. You can save the common space coordinates, individual space weights, distances, transformed proximities, and transformed independent variables to separate PASW Statistics data files.

To Obtain Output in Multidimensional Scaling Collapse Hide details

This feature requires the Categories option.

From the menus choose:

Analyze
Scale
Multidimensional Scaling (PROXSCAL)...

Make the appropriate selections in the Data Format dialog box and click Define.

In the Multidimensional Scaling dialog box, click Output.

Related Topics

Multidimensional Scaling (PROXSCAL)
Proximities in Matrices across Columns
Proximities in Columns
Proximities in One Column
Create Proximities from Data
Create Measure from Data
Define a Multidimensional Scaling Model
Multidimensional Scaling Restrictions
Multidimensional Scaling Options
Multidimensional Scaling Plots, Version 1
Multidimensional Scaling Plots, Version 2


PROXSCAL Command Additional Features

Multidimensional Scaling,Multidimensional Scaling,Multidimensional Scaling
command additional features,command additional features,command additional features

You can customize your multidimensional scaling of proximities analysis if you paste your selections into a syntax window and edit the resulting PROXSCAL command syntax. The command syntax language also allows you to:

• Specify separate variable lists for transformations and residuals plots (with the PLOT subcommand).

• Specify separate source lists for individual space weights, transformations, and residuals plots (with the PLOT subcommand).

• Specify a subset of the independent variables transformation plots to be displayed (with the PLOT subcommand).

Related Topics

PROXSCAL


Multidimensional Unfolding (PREFSCAL)

Multidimensional Unfolding,Multidimensional Unfolding,Multidimensional Unfolding
PREFSCAL,PREFSCAL,PREFSCAL
Multidimensional Unfolding,Multidimensional Unfolding,Multidimensional Unfolding
statistics,statistics,statistics
Multidimensional Unfolding,Multidimensional Unfolding,Multidimensional Unfolding
plots,plots,plots

The Multidimensional Unfolding procedure attempts to find a common quantitative scale that allows you to visually examine the relationships between two sets of objects.

Examples. You have asked 21 individuals to rank 15 breakfast items in order of preference, 1 to 15. Using Multidimensional Unfolding, you can determine that the individuals discriminate between breakfast items in two primary ways: between soft and hard breads, and between fattening and non-fattening items.

Alternatively, you have asked a group of drivers to rate 26 models of cars on 10 attributes on a 6-point scale ranging from 1="not true at all" to 6="very true." Averaged over individuals, the values are taken as similarities. Using Multidimensional Unfolding, you find clusterings of similar models and the attributes with which they are most closely associated.

Statistics and plots. The Multidimensional Unfolding procedure can produce an iteration history, stress measures, stress decomposition, coordinates of the common space, object distances within the final configuration, individual space weights, individual spaces, transformed proximities, stress plots, common space scatterplots, individual space weight scatterplots, individual spaces scatterplots, transformation plots, and Shepard residual plots.

Show me

Multidimensional Unfolding Data Considerations Collapse Hide details

Data. Data are supplied in the form of rectangular proximity matrices. Each column is considered a separate column object. Each row of a proximity matrix is considered a separate row object. When there are multiple sources of proximities, the matrices are stacked.

Assumptions. At least two variables must be specified. The number of dimensions in the solution may not exceed the number of objects minus one. If only one source is specified, all models are equivalent to the identity model; therefore, the analysis defaults to the identity model.

To Obtain a Multidimensional Unfolding Collapse Hide details

To Obtain a Multidimensional Unfolding

This feature requires the Categories option.

From the menus choose:

Analyze
Scale
Multidimensional Unfolding (PREFSCAL)...

Expand Show details Collapse Hide details
Multidimensional Unfolding main dialog box

Select two or more variables that identify the columns in the rectangular proximity matrix. Each variable represents a separate column object.

Optionally, select a number of weights variables equal to the number of column object variables. The order of the weights variables should match the order of the column objects they weight.

Optionally, select a rows variable. The values (or value labels) of this variable are used to label row objects in the output.

If there are multiple sources, optionally select a sources variable. The number of cases in the data file should equal the number of row objects times the number of sources.

Additionally, you can define a model for the multidimensional unfolding, place restrictions on the common space, set convergence criteria, specify the initial configuration to be used, and choose plots and output.

This procedure pastes PREFSCAL command syntax.

Related Topics

PREFSCAL
Categorical Regression (CATREG)
Optimal Scaling by Alternating Least Squares
Categorical Principal Components Analysis (CATPCA)
Nonlinear Canonical Correlation Analysis (OVERALS)
Correspondence Analysis
Multiple Correspondence Analysis
Multidimensional Scaling (PROXSCAL)
Define a Multidimensional Unfolding Model
Multidimensional Unfolding Restrictions
Multidimensional Unfolding Options
Multidimensional Unfolding Plots
Multidimensional Unfolding Output


Define a Multidimensional Unfolding Model

Multidimensional Unfolding,Multidimensional Unfolding,Multidimensional Unfolding
model,model,model
identity model,identity model,identity model
in Multidimensional Unfolding,in Multidimensional Unfolding,in Multidimensional Unfolding
weighted Euclidean model,weighted Euclidean model,weighted Euclidean model
in Multidimensional Unfolding,in Multidimensional Unfolding,in Multidimensional Unfolding
generalized Euclidean model,generalized Euclidean model,generalized Euclidean model
in Multidimensional Unfolding,in Multidimensional Unfolding,in Multidimensional Unfolding
proximity transformations,proximity transformations,proximity transformations
in Multidimensional Unfolding,in Multidimensional Unfolding,in Multidimensional Unfolding
scaling model,scaling model,scaling model
in Multidimensional Unfolding,in Multidimensional Unfolding,in Multidimensional Unfolding

The Model dialog box allows you to specify a scaling model, its minimum and maximum number of dimensions, the structure of the proximity matrix, the transformation to use on the proximities, and whether proximities are transformed conditonal upon the row, conditional upon the source, or unconditionally on the source.

Expand Show details Collapse Hide details
Model dialog box

Scaling Model. Choose from the following alternatives:

• Identity. All sources have the same configuration.

• Weighted Euclidean. This model is an individual differences model. Each source has an individual space in which every dimension of the common space is weighted differentially.

• Generalized Euclidean. This model is an individual differences model. Each source has an individual space that is equal to a rotation of the common space, followed by a differential weighting of the dimensions.

Proximities. Specify whether your proximity matrix contains measures of similarity or dissimilarity.

Dimensions. By default, a solution is computed in two dimensions (Minimum = 2, Maximum = 2). You can choose an integer minimum and maximum from 1 to the number of objects minus 1 as long as the minimum is less than or equal to the maximum. The procedure computes a solution in the maximum dimensionality and then reduces the dimensionality in steps until the lowest is reached.

Proximity Transformations. Choose from the following alternatives:

• None. The proximities are not transformed. You can optionally select Include intercept, in which case the proximities can be shifted by a constant term.

• Linear. The transformed proximities are proportional to the original proximities; that is, the transformation function estimates a slope and the intercept is fixed at 0. This is also called a ratio transformation. You can optionally select Include intercept, in which case the proximities can also be shifted by a constant term. This is also called an interval transformation.

• Spline. The transformed proximities are a smooth nondecreasing piecewise polynomial transformation of the original proximities. You can specify the degree of the polynomial and the number of interior knots. You can optionally select Include intercept, in which case the proximities can also be shifted by a constant term.

• Smooth. The transformed proximities have the same order as the original proximities, including a restriction that takes the differences between subsequent values into account. The result is a "smooth ordinal" transformation. You can specify whether tied proximities should be kept tied or allowed to become untied.

• Ordinal. The transformed proximities have the same order as the original proximities. You can specify whether tied proximities should be kept tied or allowed to become untied.

Apply Transformations. Specify whether only proximities within each row are compared with each other, or only proximities within each source are compared with each other, or the comparisons are unconditional on the row or source; that is, whether the transformations are performed per row, per source, or over all proximities at once.

To Define a Multidimensional Unfolding Model Collapse Hide details

This feature requires the Categories option.

From the menus choose:

Analyze
Scale
Multidimensional Unfolding (PREFSCAL)...

In the Multidimensional Unfolding dialog box, click Model.

Related Topics

Multidimensional Unfolding (PREFSCAL)
Multidimensional Unfolding Restrictions
Multidimensional Unfolding Options
Multidimensional Unfolding Plots
Multidimensional Unfolding Output


Multidimensional Unfolding Restrictions

Multidimensional Unfolding,Multidimensional Unfolding,Multidimensional Unfolding
restrictions on common space,restrictions on common space,restrictions on common space
restrictions on common space,restrictions on common space,restrictions on common space
in Multidimensional Unfolding,in Multidimensional Unfolding,in Multidimensional Unfolding

The Restrictions dialog box allows you to place restrictions on the common space.

Expand Show details Collapse Hide details
Restrictions dialog box

Restrictions on Common Space. You can choose to fix the coordinates of row and/or column objects in the common space.

Row/Column Restriction Variables. Choose the file containing the restrictions and select the variables that define the restrictions on the common space. The first variable selected contains the coordinates of the objects on the first dimension, the second variable corresponds to coordinates on the second dimension, and so on. A missing value indicates that a coordinate on a dimension is free. The number of variables selected must equal the maximum number of dimensions requested. The number of cases for each variable must equal the number of objects.

To Specify Multidimensional Unfolding Restrictions Collapse Hide details

This feature requires the Categories option.

From the menus choose:

Analyze
Scale
Multidimensional Unfolding (PREFSCAL)...

In the Multidimensional Unfolding dialog box, click Restrictions.

Related Topics

Multidimensional Unfolding (PREFSCAL)
Define a Multidimensional Unfolding Model
Multidimensional Unfolding Options
Multidimensional Unfolding Plots
Multidimensional Unfolding Output


Multidimensional Unfolding Options

Multidimensional Unfolding,Multidimensional Unfolding,Multidimensional Unfolding
options,options,options
initial configuration,initial configuration,initial configuration
in Multidimensional Unfolding,in Multidimensional Unfolding,in Multidimensional Unfolding
penalty term,penalty term,penalty term
in Multidimensional Unfolding,in Multidimensional Unfolding,in Multidimensional Unfolding
iteration criteria,iteration criteria,iteration criteria
in Multidimensional Unfolding,in Multidimensional Unfolding,in Multidimensional Unfolding

The Options dialog box allows you to select the initial configuration style, specify iteration and convergence criteria, and set the penalty term for stress.

Expand Show details Collapse Hide details
Options dialog box

Initial Configuration. Choose one of the following alternatives:

• Classical. The rectangular proximity matrix is used to supplement the intra-blocks (values between rows and between columns) of the complete symmetrical MDS matrix. Once the complete matrix is formed, a classical scaling solution is used as the initial configuration. The intra-blocks can be filled via imputation using the triangle inequality or Spearman distances.

• Ross-Cliff. The Ross-Cliff start uses the results of a singular value decomposition on the double centered and squared proximity matrix as the initial values for the row and column objects.

• Correspondence. The correspondence start uses the results of a correspondence analysis on the reversed data (similarities instead of dissimilarities), with symmetric normalization of row and column scores.

• Centroids. The procedure starts by positioning the row objects in the configuration using an eigenvalue decomposition. Then the column objects are positioned at the centroid of the specified choices. For the number of choices, specify a positive integer between 1 and the number of proximities variables.

• Multiple random starts. Solutions are computed for several initial configurations chosen at random, and the one with the lowest penalized stress is shown as the best solution.

• Custom. You can select variables that contain the coordinates of your own initial configuration. The number of variables selected should equal the maximum number of dimensions specified, with the first variable corresponding to coordinates on dimension 1, the second variable corresponding to coordinates on dimension 2, and so on. The number of cases in each variable should equal the combined number of row and column objects. The row and column coordinates should be stacked, with the column coordinates following the row coordinates.

Iteration Criteria. Specify the iteration criteria values.

• Stress convergence. The algorithm will stop iterating when the relative difference in consecutive penalized stress values is less than the number specified here, which must be non-negative.

• Minimum stress. The algorithm will stop when the penalized stress falls below the number specified here, which must be non-negative.

• Maximum iterations. The algorithm will perform the number of iterations specified here unless one of the above criteria is satisfied first.

Penalty Term. The algorithm attempts to minimize penalized stress, a goodness-of-fit measure equal to the product of Kruskal's Stress-I and a penalty term based on the coefficient of variation of the transformed proximities. These controls allow you to set the strength and range of the penalty term.

• Strength. The smaller the value of the strength parameter, the stronger the penalty. Specify a value between 0.0 and 1.0.

• Range. This parameter sets the moment at which the penalty becomes active. If set to 0.0, the penalty is inactive. Increasing the value causes the algorithm to search for a solution with greater variation among the transformed proximities. Specify a non-negative value.

To Specify Multidimensional Unfolding Options Collapse Hide details

This feature requires the Categories option.

From the menus choose:

Analyze
Scale
Multidimensional Unfolding (PREFSCAL)...

In the Multidimensional Unfolding dialog box, click Options.

Related Topics

Multidimensional Unfolding (PREFSCAL)
Define a Multidimensional Unfolding Model
Multidimensional Unfolding Restrictions
Multidimensional Unfolding Plots
Multidimensional Unfolding Output


Multidimensional Unfolding Plots

Multidimensional Unfolding,Multidimensional Unfolding,Multidimensional Unfolding
plots,plots,plots
multiple starts plots,multiple starts plots,multiple starts plots
in Multidimensional Unfolding,in Multidimensional Unfolding,in Multidimensional Unfolding
initial common space plots,initial common space plots,initial common space plots
in Multidimensional Unfolding,in Multidimensional Unfolding,in Multidimensional Unfolding
stress plots,stress plots,stress plots
in Multidimensional Unfolding,in Multidimensional Unfolding,in Multidimensional Unfolding
common space plots,common space plots,common space plots
in Multidimensional Unfolding,in Multidimensional Unfolding,in Multidimensional Unfolding
final common space plots,final common space plots,final common space plots
in Multidimensional Unfolding,in Multidimensional Unfolding,in Multidimensional Unfolding
individual spaces plots,individual spaces plots,individual spaces plots
in Multidimensional Unfolding,in Multidimensional Unfolding,in Multidimensional Unfolding
individual space weights plots,individual space weights plots,individual space weights plots
in Multidimensional Unfolding,in Multidimensional Unfolding,in Multidimensional Unfolding
space weights plots,space weights plots,space weights plots
in Multidimensional Unfolding,in Multidimensional Unfolding,in Multidimensional Unfolding
transformation plots,transformation plots,transformation plots
in Multidimensional Unfolding,in Multidimensional Unfolding,in Multidimensional Unfolding
residuals plots,residuals plots,residuals plots
in Multidimensional Unfolding,in Multidimensional Unfolding,in Multidimensional Unfolding
Shepard plots,Shepard plots,Shepard plots
in Multidimensional Unfolding,in Multidimensional Unfolding,in Multidimensional Unfolding
scatterplot of fit,scatterplot of fit,scatterplot of fit
in Multidimensional Unfolding,in Multidimensional Unfolding,in Multidimensional Unfolding

The Plots dialog box allows you to specify which plots will be produced.

Expand Show details Collapse Hide details
Plots dialog box

Plots. The following plots are available:

• Multiple starts. Displays a stacked histogram of penalized stress displaying both stress and penalty.

• Initial common space. Displays a scatterplot matrix of the coordinates of the initial common space.

• Stress per dimension. Produces a lineplot of penalized stress versus dimensionality. This plot is produced only if the maximum number of dimensions is larger than the minimum number of dimensions.

• Final common space. A scatterplot matrix of coordinates of the common space is displayed.

• Space weights. A scatterplot is produced of the individual space weights. This is possible only if one of the individual differences models is specified in the Model dialog box. For the weighted Euclidean model, the weights for all sources are displayed in a plot, with one dimension on each axis. For the generalized Euclidean model, one plot is produced per dimension, indicating both rotation and weighting of that dimension for each source.

• Individual spaces. A scatterplot matrix of coordinates of the individual space of each source is displayed. This is possible only if one of the individual differences models is specified in the Model dialog box.

• Transformation plots. A scatterplot is produced of the original proximities versus the transformed proximities. Depending on how transformations are applied, a separate color is assigned to each row or source. An unconditional transformation produces a single color.

• Shepard plots. The original proximities versus both transformed proximities and distances. The distances are indicated by points, and the transformed proximities are indicated by a line. Depending on how transformations are applied, a separate line is produced for each row or source. An unconditional transformation produces one line.

• Scatterplot of fit. A scatterplot of the transformed proximities versus the distances is displayed. A separate color is assigned to each source if multiple sources are specified.

• Residuals plots. A scatterplot of the transformed proximities versus the residuals (transformed proximities minus distances) is displayed. A separate color is assigned to each source if multiple sources are specified.

Row Object Styles. These give you further control of the display of row objects in plots. The values of the optional colors variable are used to cycle through all colors. The values of the optional markers variable are used to cycle through all possible markers.

Source Plots. For Individual spaces, Scatterplot of fit, and Residuals plots—and if transformations are applied by source, for Transformation plots and Shepard plots—you can specify the sources for which the plots should be produced. The source numbers entered must be values of the sources variable specified in the main dialog box and range from 1 to the number of sources.

Row Plots. If transformations are applied by row, for Transformation plots and Shepard plots, you can specify the row for which the plots should be produced. The row numbers entered must range from 1 to the number of rows.

To Obtain Plots in Multidimensional Unfolding Collapse Hide details

This feature requires the Categories option.

From the menus choose:

Analyze
Scale
Multidimensional Unfolding (PREFSCAL)...

In the Multidimensional Unfolding dialog box, click Plots.

Related Topics

Multidimensional Unfolding (PREFSCAL)
Define a Multidimensional Unfolding Model
Multidimensional Unfolding Restrictions
Multidimensional Unfolding Options
Multidimensional Unfolding Output


Multidimensional Unfolding Output

Multidimensional Unfolding,Multidimensional Unfolding,Multidimensional Unfolding
output,output,output
stress measures,stress measures,stress measures
in Multidimensional Unfolding,in Multidimensional Unfolding,in Multidimensional Unfolding
common space coordinates,common space coordinates,common space coordinates
in Multidimensional Unfolding,in Multidimensional Unfolding,in Multidimensional Unfolding
distances,distances,distances
in Multidimensional Unfolding,in Multidimensional Unfolding,in Multidimensional Unfolding
individual space coordinates,individual space coordinates,individual space coordinates
in Multidimensional Unfolding,in Multidimensional Unfolding,in Multidimensional Unfolding
individual space weights,individual space weights,individual space weights
in Multidimensional Unfolding,in Multidimensional Unfolding,in Multidimensional Unfolding
transformed proximities,transformed proximities,transformed proximities
in Multidimensional Unfolding,in Multidimensional Unfolding,in Multidimensional Unfolding
iteration history,iteration history,iteration history
in Multidimensional Unfolding,in Multidimensional Unfolding,in Multidimensional Unfolding

The Output dialog box allows you to control the amount of displayed output and save some of it to separate files.

Expand Show details Collapse Hide details
Output dialog box

Display. Select one or more of the following for display:

• Input data. Includes the original proximities and, if present, the data weights, the initial configuration, and the fixed coordinates.

• Multiple starts. Displays the random number seed and penalized stress value of each random start.

• Initial data. Displays the coordinates of the initial common space.

• Iteration history. Displays the history of iterations of the main algorithm.

• Fit measures. Displays different measures. The table contains several goodness-of-fit, badness-of-fit, correlation, variation, and nondegeneracy measures.

• Stress decomposition. Displays an objects, rows, and sources decomposition of penalized stress, including row, column, and source means and standard deviations.

• Transformed proximities. Displays the transformed proximities.

• Final common space. Displays the coordinates of the common space.

• Space weights. Displays the individual space weights. This option is available only if one of the individual differences models is specified. Depending on the model, the space weights are decomposed in rotation weights and dimension weights, which are also displayed.

• Individual spaces. The coordinates of the individual spaces are displayed. This option is available only if one of the individual differences models is specified.

• Fitted distances. Displays the distances between the objects in the configuration.

Save to New File. You can save the common space coordinates, individual space weights, distances, and transformed proximities to separate PASW Statistics data files.

To Obtain Output in Multidimensional Scaling Collapse Hide details

This feature requires the Categories option.

From the menus choose:

Analyze
Scale
Multidimensional Unfolding (PREFSCAL)...

In the Multidimensional Unfolding dialog box, click Output.

Related Topics

Multidimensional Unfolding (PREFSCAL)
Define a Multidimensional Unfolding Model
Multidimensional Unfolding Restrictions
Multidimensional Unfolding Options
Multidimensional Unfolding Plots


PREFSCAL Command Additional Features

Multidimensional Unfolding,Multidimensional Unfolding,Multidimensional Unfolding
command additional features,command additional features,command additional features

You can customize your Multidimensional Unfolding of proximities analysis if you paste your selections into a syntax window and edit the resulting PREFSCAL command syntax. The command syntax language also allows you to:

• Specify multiple source lists for Individual spaces, Scatterplots of fit, and Residuals plots—and in the case of matrix conditional transformations, for Transformation plots and Shepard plots—when multiple sources are available (with the PLOT subcommand).

• Specify multiple row lists for Transformation plots and Shepard plots in the case of row conditional transformations (with the PLOT subcommand).

• Specify a number of rows instead of a row ID variable (with the INPUT subcommand).

• Specify a number of sources instead of a source ID variable (with the INPUT subcommand).

Related Topics

PREFSCAL


Introduction to Complex Samples Procedures

An inherent assumption of analytical procedures in traditional software packages is that the observations in a data file represent a simple random sample from the population of interest. This assumption is untenable for an increasing number of companies and researchers who find it both cost-effective and convenient to obtain samples in a more structured way.

The Complex Samples option allows you to select a sample according to a complex design and incorporate the design specifications into the data analysis, thus ensuring that your results are valid.

Related Topics

Properties of Complex Samples
Usage of Complex Samples Procedures
Plan Files
Further Readings


Properties of Complex Samples

A complex sample can differ from a simple random sample in many ways. In a simple random sample, individual sampling units are selected at random with equal probability and without replacement (WOR) directly from the entire population. By contrast, a given complex sample can have some or all of the following features:

Stratification. Stratified sampling involves selecting samples independently within non-overlapping subgroups of the population, or strata. For example, strata may be socioeconomic groups, job categories, age groups, or ethnic groups. With stratification, you can ensure adequate sample sizes for subgroups of interest, improve the precision of overall estimates, and use different sampling methods from stratum to stratum.

Clustering. Cluster sampling involves the selection of groups of sampling units, or clusters. For example, clusters may be schools, hospitals, or geographical areas, and sampling units may be students, patients, or citizens. Clustering is common in multistage designs and area (geographic) samples.

Multiple stages. In multistage sampling, you select a first-stage sample based on clusters. Then you create a second-stage sample by drawing subsamples from the selected clusters. If the second-stage sample is based on subclusters, you can then add a third stage to the sample. For example, in the first stage of a survey, a sample of cities could be drawn. Then, from the selected cities, households could be sampled. Finally, from the selected households, individuals could be polled. The Sampling and Analysis Preparation wizards allow you to specify three stages in a design.

Nonrandom sampling. When selection at random is difficult to obtain, units can be sampled systematically (at a fixed interval) or sequentially.

Unequal selection probabilities. When sampling clusters that contain unequal numbers of units, you can use probability-proportional-to-size (PPS) sampling to make a cluster's selection probability equal to the proportion of units it contains. PPS sampling can also use more general weighting schemes to select units.

Unrestricted sampling. Unrestricted sampling selects units with replacement (WR). Thus, an individual unit can be selected for the sample more than once.

Sampling weights. Sampling weights are automatically computed while drawing a complex sample and ideally correspond to the "frequency" that each sampling unit represents in the target population. Therefore, the sum of the weights over the sample should estimate the population size. Complex Samples analysis procedures require sampling weights in order to properly analyze a complex sample. Note that these weights should be used entirely within the Complex Samples option and should not be used with other analytical procedures via the Weight Cases procedure, which treats weights as case replications.

Related Topics

Introduction to Complex Samples Procedures
Usage of Complex Samples Procedures
Plan Files
Further Readings


Usage of Complex Samples Procedures

Your usage of Complex Samples procedures depends on your particular needs. The primary types of users are those who:

• Plan and carry out surveys according to complex designs, possibly analyzing the sample later. The primary tool for surveyors is the Sampling Wizard.

• Analyze sample data files previously obtained according to complex designs. Before using the Complex Samples analysis procedures, you may need to use the Analysis Preparation Wizard.

Regardless of which type of user you are, you need to supply design information to Complex Samples procedures. This information is stored in a plan file for easy reuse.

Related Topics

Introduction to Complex Samples Procedures
Properties of Complex Samples
Plan Files
Further Readings


Plan Files

plan file,plan file,plan file

A plan file contains complex sample specifications. There are two types of plan files:

Sampling plan. The specifications given in the Sampling Wizard define a sample design that is used to draw a complex sample. The sampling plan file contains those specifications. The sampling plan file also contains a default analysis plan that uses estimation methods suitable for the specified sample design.

Analysis plan. This plan file contains information needed by Complex Samples analysis procedures to properly compute variance estimates for a complex sample. The plan includes the sample structure, estimation methods for each stage, and references to required variables, such as sample weights. The Analysis Preparation Wizard allows you to create and edit analysis plans.

There are several advantages to saving your specifications in a plan file, including:

• A surveyor can specify the first stage of a multistage sampling plan and draw first-stage units now, collect information on sampling units for the second stage, and then modify the sampling plan to include the second stage.

• An analyst who doesn't have access to the sampling plan file can specify an analysis plan and refer to that plan from each Complex Samples analysis procedure.

• A designer of large-scale public use samples can publish the sampling plan file, which simplifies the instructions for analysts and avoids the need for each analyst to specify his or her own analysis plans.

Related Topics

Introduction to Complex Samples Procedures
Properties of Complex Samples
Usage of Complex Samples Procedures
Further Readings
Complex Samples Plan


Further Readings

For more information on sampling techniques, see the following texts:

Cochran, W. G. 1977. Sampling Techniques, 3rd ed. New York: John Wiley and Sons.

Kish, L. 1965. Survey Sampling. New York: John Wiley and Sons.

Kish, L. 1987. Statistical Design for Research. New York: John Wiley and Sons.

Murthy, M. N. 1967. Sampling Theory and Methods. Calcutta, India: Statistical Publishing Society.

Särndal, C., B. Swensson, and J. Wretman. 1992. Model Assisted Survey Sampling. New York: Springer-Verlag.

Related Topics

Introduction to Complex Samples Procedures
Properties of Complex Samples
Usage of Complex Samples Procedures
Plan Files


Sampling from a Complex Design

sampling,sampling,sampling
complex design,complex design,complex design
complex sampling,complex sampling,complex sampling
sample plan,sample plan,sample plan
sample plan,sample plan,sample plan

The Sampling Wizard guides you through the steps for creating, modifying, or executing a sampling plan file. Before using the Wizard, you should have a well-defined target population, a list of sampling units, and an appropriate sample design in mind.

Show me

Related Topics

Creating a New Sample Plan
Sampling Wizard: Design Variables
Tree Controls for Navigating the Sampling Wizard
Sampling Wizard: Sampling Method
Sampling Wizard: Sample Size
Sampling Wizard: Output Variables
Sampling Wizard: Plan Summary
Sampling Wizard: Draw Sample Selection Options
Sampling Wizard: Draw Sample Output Files
Sampling Wizard: Finish
Modifying an Existing Sample Plan
Sampling Wizard: Plan Summary
Running an Existing Sample Plan
CSPLAN and CSSELECT Commands Additional Features
CSPLAN
CSSELECT


Creating a New Sample Plan

This feature requires the Complex Samples option.

From the menus choose:

Analyze
Complex Samples
Select a Sample...

Select Design a sample and choose a plan filename to save the sample plan.

Click Next to continue through the Wizard.

Optionally, in the Design Variables step, you can define strata, clusters, and input sample weights. After you define these, click Next.

Optionally, in the Sampling Method step, you can choose a method for selecting items.

If you select PPS Brewer or PPS Murthy, you can click Finish to draw the sample. Otherwise, click Next and then:

In the Sample Size step, specify the number or proportion of units to sample.

You can now click Finish to draw the sample.

Optionally, in further steps you can:

• Choose output variables to save.

• Add a second or third stage to the design.

• Set various selection options, including which stages to draw samples from, the random number seed, and whether to treat user-missing values as valid values of design variables.

• Choose where to save output data.

• Paste your selections as command syntax.

Related Topics

Sampling from a Complex Design
Sampling Wizard: Design Variables
Tree Controls for Navigating the Sampling Wizard
Sampling Wizard: Sampling Method
Sampling Wizard: Sample Size
Sampling Wizard: Output Variables
Sampling Wizard: Plan Summary
Sampling Wizard: Draw Sample Selection Options
Sampling Wizard: Draw Sample Output Files
Sampling Wizard: Finish
Modifying an Existing Sample Plan
Sampling Wizard: Plan Summary
Running an Existing Sample Plan
CSPLAN and CSSELECT Commands Additional Features


Sampling Wizard: Design Variables

stratification,stratification,stratification
in Sampling Wizard,in Sampling Wizard,in Sampling Wizard
clusters,clusters,clusters
in Sampling Wizard,in Sampling Wizard,in Sampling Wizard
input sample weights,input sample weights,input sample weights
in Sampling Wizard,in Sampling Wizard,in Sampling Wizard

This step allows you to select stratification and clustering variables and to define input sample weights. You can also specify a label for the stage.

Stratify By. The cross-classification of stratification variables defines distinct subpopulations, or strata. Separate samples are obtained for each stratum. To improve the precision of your estimates, units within strata should be as homogeneous as possible for the characteristics of interest.

Clusters. Cluster variables define groups of observational units, or clusters. Clusters are useful when directly sampling observational units from the population is expensive or impossible; instead, you can sample clusters from the population and then sample observational units from the selected clusters. However, the use of clusters can introduce correlations among sampling units, resulting in a loss of precision. To minimize this effect, units within clusters should be as heterogeneous as possible for the characteristics of interest. You must define at least one cluster variable in order to plan a multistage design. Clusters are also necessary in the use of several different sampling methods. See the topic Sampling Wizard: Sampling Method for more information.

Input Sample Weight. If the current sample design is part of a larger sample design, you may have sample weights from a previous stage of the larger design. You can specify a numeric variable containing these weights in the first stage of the current design. Sample weights are computed automatically for subsequent stages of the current design.

Stage Label. You can specify an optional string label for each stage. This is used in the output to help identify stagewise information.

Note: The source variable list has the same content across steps of the Wizard. In other words, variables removed from the source list in a particular step are removed from the list in all steps. Variables returned to the source list appear in the list in all steps.

Related Topics

Sampling from a Complex Design
Creating a New Sample Plan
Tree Controls for Navigating the Sampling Wizard
Sampling Wizard: Sampling Method
Sampling Wizard: Sample Size
Sampling Wizard: Output Variables
Sampling Wizard: Plan Summary
Sampling Wizard: Draw Sample Selection Options
Sampling Wizard: Draw Sample Output Files
Sampling Wizard: Finish
Modifying an Existing Sample Plan
Sampling Wizard: Plan Summary
Running an Existing Sample Plan
CSPLAN and CSSELECT Commands Additional Features


Tree Controls for Navigating the Sampling Wizard

On the left side of each step in the Sampling Wizard is an outline of all the steps. You can navigate the Wizard by clicking on the name of an enabled step in the outline. Steps are enabled as long as all previous steps are valid—that is, if each previous step has been given the minimum required specifications for that step. See the Help for individual steps for more information on why a given step may be invalid.

Related Topics

Sampling from a Complex Design
Creating a New Sample Plan
Sampling Wizard: Design Variables
Sampling Wizard: Sampling Method
Sampling Wizard: Sample Size
Sampling Wizard: Output Variables
Sampling Wizard: Plan Summary
Sampling Wizard: Draw Sample Selection Options
Sampling Wizard: Draw Sample Output Files
Sampling Wizard: Finish
Modifying an Existing Sample Plan
Sampling Wizard: Plan Summary
Running an Existing Sample Plan
CSPLAN and CSSELECT Commands Additional Features


Sampling Wizard: Sampling Method

sampling method,sampling method,sampling method
in Sampling Wizard,in Sampling Wizard,in Sampling Wizard
simple random sampling,simple random sampling,simple random sampling
in Sampling Wizard,in Sampling Wizard,in Sampling Wizard
systematic sampling,systematic sampling,systematic sampling
in Sampling Wizard,in Sampling Wizard,in Sampling Wizard
sequential sampling,sequential sampling,sequential sampling
in Sampling Wizard,in Sampling Wizard,in Sampling Wizard
PPS sampling,PPS sampling,PPS sampling
in Sampling Wizard,in Sampling Wizard,in Sampling Wizard
Brewer's sampling method,Brewer's sampling method,Brewer's sampling method
in Sampling Wizard,in Sampling Wizard,in Sampling Wizard
Murthy's sampling method,Murthy's sampling method,Murthy's sampling method
in Sampling Wizard,in Sampling Wizard,in Sampling Wizard
Sampford's sampling method,Sampford's sampling method,Sampford's sampling method
in Sampling Wizard,in Sampling Wizard,in Sampling Wizard
measure of size,measure of size,measure of size
in Sampling Wizard,in Sampling Wizard,in Sampling Wizard

This step allows you to specify how to select cases from the active dataset.

Method. Controls in this group are used to choose a selection method. Some sampling types allow you to choose whether to sample with replacement (WR) or without replacement (WOR). See the type descriptions for more information. Note that some probability-proportional-to-size (PPS) types are available only when clusters have been defined and that all PPS types are available only in the first stage of a design. Moreover, WR methods are available only in the last stage of a design.

• Simple Random Sampling. Units are selected with equal probability. They can be selected with or without replacement.

• Simple Systematic. Units are selected at a fixed interval throughout the sampling frame (or strata, if they have been specified) and extracted without replacement. A randomly selected unit within the first interval is chosen as the starting point.

• Simple Sequential. Units are selected sequentially with equal probability and without replacement.

• PPS. This is a first-stage method that selects units at random with probability proportional to size. Any units can be selected with replacement; only clusters can be sampled without replacement.

• PPS Systematic. This is a first-stage method that systematically selects units with probability proportional to size. They are selected without replacement.

• PPS Sequential. This is a first-stage method that sequentially selects units with probability proportional to cluster size and without replacement.

• PPS Brewer. This is a first-stage method that selects two clusters from each stratum with probability proportional to cluster size and without replacement. A cluster variable must be specified to use this method.

• PPS Murthy. This is a first-stage method that selects two clusters from each stratum with probability proportional to cluster size and without replacement. A cluster variable must be specified to use this method.

• PPS Sampford. This is a first-stage method that selects more than two clusters from each stratum with probability proportional to cluster size and without replacement. It is an extension of Brewer's method. A cluster variable must be specified to use this method.

• Use WR estimation for analysis. By default, an estimation method is specified in the plan file that is consistent with the selected sampling method. This allows you to use with-replacement estimation even if the sampling method implies WOR estimation. This option is available only in stage 1.

Measure of Size (MOS). If a PPS method is selected, you must specify a measure of size that defines the size of each unit. These sizes can be explicitly defined in a variable or they can be computed from the data. Optionally, you can set lower and upper bounds on the MOS, overriding any values found in the MOS variable or computed from the data. These options are available only in stage 1.

Related Topics

Sampling from a Complex Design
Creating a New Sample Plan
Sampling Wizard: Design Variables
Tree Controls for Navigating the Sampling Wizard
Sampling Wizard: Sample Size
Sampling Wizard: Output Variables
Sampling Wizard: Plan Summary
Sampling Wizard: Draw Sample Selection Options
Sampling Wizard: Draw Sample Output Files
Sampling Wizard: Finish
Modifying an Existing Sample Plan
Sampling Wizard: Plan Summary
Running an Existing Sample Plan
CSPLAN and CSSELECT Commands Additional Features


Sampling Wizard: Sample Size

sample size,sample size,sample size
in Sampling Wizard,in Sampling Wizard,in Sampling Wizard

This step allows you to specify the number or proportion of units to sample within the current stage. The sample size can be fixed or it can vary across strata. For the purpose of specifying sample size, clusters chosen in previous stages can be used to define strata.

Units. You can specify an exact sample size or a proportion of units to sample.

• Value. A single value is applied to all strata. If Counts is selected as the unit metric, you should enter a positive integer. If Proportions is selected, you should enter a non-negative value. Unless sampling with replacement, proportion values should also be no greater than 1.

• Unequal values for strata. Allows you to enter size values on a per-stratum basis via the Define Unequal Sizes dialog box.

• Read values from variable. Allows you to select a numeric variable that contains size values for strata.

If Proportions is selected, you have the option to set lower and upper bounds on the number of units sampled.

Related Topics

Sampling from a Complex Design
Creating a New Sample Plan
Sampling Wizard: Design Variables
Tree Controls for Navigating the Sampling Wizard
Sampling Wizard: Sampling Method
Sampling Wizard: Output Variables
Sampling Wizard: Plan Summary
Sampling Wizard: Draw Sample Selection Options
Sampling Wizard: Draw Sample Output Files
Sampling Wizard: Finish
Modifying an Existing Sample Plan
Sampling Wizard: Plan Summary
Running an Existing Sample Plan
CSPLAN and CSSELECT Commands Additional Features


Sampling Wizard: Output Variables

population size,population size,population size
in Sampling Wizard,in Sampling Wizard,in Sampling Wizard
sample proportion,sample proportion,sample proportion
in Sampling Wizard,in Sampling Wizard,in Sampling Wizard
sample size,sample size,sample size
in Sampling Wizard,in Sampling Wizard,in Sampling Wizard
sample weights,sample weights,sample weights
in Sampling Wizard,in Sampling Wizard,in Sampling Wizard
inclusion probabilities,inclusion probabilities,inclusion probabilities
in Sampling Wizard,in Sampling Wizard,in Sampling Wizard

This step allows you to choose variables to save when the sample is drawn.

Population size. The estimated number of units in the population for a given stage. The rootname for the saved variable is PopulationSize_.

Sample proportion. The sampling rate at a given stage. The rootname for the saved variable is SamplingRate_.

Sample size. The number of units drawn at a given stage. The rootname for the saved variable is SampleSize_.

Sample weight. The inverse of the inclusion probabilities. The rootname for the saved variable is SampleWeight_.

Some stagewise variables are generated automatically. These include:

Inclusion probabilities. The proportion of units drawn at a given stage. The rootname for the saved variable is InclusionProbability_.

Cumulative weight. The cumulative sample weight over stages previous to and including the current one. The rootname for the saved variable is SampleWeightCumulative_.

Index. Identifies units selected multiple times within a given stage. The rootname for the saved variable is Index_.

Note: Saved variable rootnames include an integer suffix that reflects the stage number—for example, PopulationSize_1_ for the saved population size for stage 1.

Related Topics

Sampling from a Complex Design
Creating a New Sample Plan
Sampling Wizard: Design Variables
Tree Controls for Navigating the Sampling Wizard
Sampling Wizard: Sampling Method
Sampling Wizard: Sample Size
Sampling Wizard: Plan Summary
Sampling Wizard: Draw Sample Selection Options
Sampling Wizard: Draw Sample Output Files
Sampling Wizard: Finish
Modifying an Existing Sample Plan
Sampling Wizard: Plan Summary
Running an Existing Sample Plan
CSPLAN and CSSELECT Commands Additional Features


Sampling Wizard: Plan Summary

This is the last step within each stage, providing a summary of the sample design specifications through the current stage. From here, you can either proceed to the next stage (creating it, if necessary) or set options for drawing the sample.

Related Topics

Sampling from a Complex Design
Creating a New Sample Plan
Sampling Wizard: Design Variables
Tree Controls for Navigating the Sampling Wizard
Sampling Wizard: Sampling Method
Sampling Wizard: Sample Size
Sampling Wizard: Output Variables
Sampling Wizard: Draw Sample Selection Options
Sampling Wizard: Draw Sample Output Files
Sampling Wizard: Finish
Modifying an Existing Sample Plan
Sampling Wizard: Plan Summary
Running an Existing Sample Plan
CSPLAN and CSSELECT Commands Additional Features


Sampling Wizard: Draw Sample Selection Options

This step allows you to choose whether to draw a sample. You can also control other sampling options, such as the random seed and missing-value handling.

Draw sample. In addition to choosing whether to draw a sample, you can also choose to execute part of the sampling design. Stages must be drawn in order—that is, stage 2 cannot be drawn unless stage 1 is also drawn. When editing or executing a plan, you cannot resample locked stages.

Seed. This allows you to choose a seed value for random number generation.

Include user-missing values. This determines whether user-missing values are valid. If so, user-missing values are treated as a separate category.

Data already sorted. If your sample frame is presorted by the values of the stratification variables, this option allows you to speed the selection process.

Related Topics

Sampling from a Complex Design
Creating a New Sample Plan
Sampling Wizard: Design Variables
Tree Controls for Navigating the Sampling Wizard
Sampling Wizard: Sampling Method
Sampling Wizard: Sample Size
Sampling Wizard: Output Variables
Sampling Wizard: Plan Summary
Sampling Wizard: Draw Sample Output Files
Sampling Wizard: Finish
Modifying an Existing Sample Plan
Sampling Wizard: Plan Summary
Running an Existing Sample Plan
CSPLAN and CSSELECT Commands Additional Features


Sampling Wizard: Draw Sample Output Files

This step allows you to choose where to direct sampled cases, weight variables, joint probabilities, and case selection rules.

Sample data. These options let you determine where sample output is written. It can be added to the active dataset, written to a new dataset, or saved to an external PASW Statistics data file. Datasets are available during the current session but are not available in subsequent sessions unless you explicitly save them as data files. Dataset names must adhere to variable naming rules. See the topic Variable Names for more information. If an external file or new dataset is specified, the sampling output variables and variables in the active dataset for the selected cases are written.

Joint probabilities. These options let you determine where joint probabilities are written. They are saved to an external PASW Statistics data file. Joint probabilities are produced if the PPS WOR, PPS Brewer, PPS Sampford, or PPS Murthy method is selected and WR estimation is not specified.

Case selection rules. If you are constructing your sample one stage at a time, you may want to save the case selection rules to a text file. They are useful for constructing the subframe for subsequent stages.

Related Topics

Sampling from a Complex Design
Creating a New Sample Plan
Sampling Wizard: Design Variables
Tree Controls for Navigating the Sampling Wizard
Sampling Wizard: Sampling Method
Sampling Wizard: Sample Size
Sampling Wizard: Output Variables
Sampling Wizard: Plan Summary
Sampling Wizard: Draw Sample Selection Options
Sampling Wizard: Finish
Modifying an Existing Sample Plan
Sampling Wizard: Plan Summary
Running an Existing Sample Plan
CSPLAN and CSSELECT Commands Additional Features


Sampling Wizard: Finish

This is the final step. You can save the plan file and draw the sample now or paste your selections into a syntax window.

When making changes to stages in the existing plan file, you can save the edited plan to a new file or overwrite the existing file. When adding stages without making changes to existing stages, the Wizard automatically overwrites the existing plan file. If you want to save the plan to a new file, select Paste the syntax generated by the Wizard into a syntax window and change the filename in the syntax commands.

Related Topics

Sampling from a Complex Design
Creating a New Sample Plan
Sampling Wizard: Design Variables
Tree Controls for Navigating the Sampling Wizard
Sampling Wizard: Sampling Method
Sampling Wizard: Sample Size
Sampling Wizard: Output Variables
Sampling Wizard: Plan Summary
Sampling Wizard: Draw Sample Selection Options
Sampling Wizard: Draw Sample Output Files
Modifying an Existing Sample Plan
Sampling Wizard: Plan Summary
Running an Existing Sample Plan
CSPLAN and CSSELECT Commands Additional Features


Modifying an Existing Sample Plan

This feature requires the Complex Samples option.

From the menus choose:

Analyze
Complex Samples
Select a Sample...

Select Edit a sample design and choose a plan file to edit.

Click Next to continue through the Wizard.

Review the sampling plan in the Plan Summary step, and then click Next.

Subsequent steps are largely the same as for a new design. See the Help for individual steps for more information.

Navigate to the Finish step, and specify a new name for the edited plan file or choose to overwrite the existing plan file.

Optionally, you can:

• Specify stages that have already been sampled.

• Remove stages from the plan.

Related Topics

Sampling from a Complex Design
Creating a New Sample Plan
Sampling Wizard: Design Variables
Tree Controls for Navigating the Sampling Wizard
Sampling Wizard: Sampling Method
Sampling Wizard: Sample Size
Sampling Wizard: Output Variables
Sampling Wizard: Plan Summary
Sampling Wizard: Draw Sample Selection Options
Sampling Wizard: Draw Sample Output Files
Sampling Wizard: Finish
Sampling Wizard: Plan Summary
Running an Existing Sample Plan
CSPLAN and CSSELECT Commands Additional Features


Sampling Wizard: Plan Summary

This step allows you to review the sampling plan and indicate stages that have already been sampled. If editing a plan, you can also remove stages from the plan.

Previously sampled stages. If an extended sampling frame is not available, you will have to execute a multistage sampling design one stage at a time. Select which stages have already been sampled from the drop-down list. Any stages that have been executed are locked; they are not available in the Draw Sample Selection Options step, and they cannot be altered when editing a plan.

Remove stages. You can remove stages 2 and 3 from a multistage design.

Related Topics

Sampling from a Complex Design
Creating a New Sample Plan
Sampling Wizard: Design Variables
Tree Controls for Navigating the Sampling Wizard
Sampling Wizard: Sampling Method
Sampling Wizard: Sample Size
Sampling Wizard: Output Variables
Sampling Wizard: Plan Summary
Sampling Wizard: Draw Sample Selection Options
Sampling Wizard: Draw Sample Output Files
Sampling Wizard: Finish
Modifying an Existing Sample Plan
Running an Existing Sample Plan
CSPLAN and CSSELECT Commands Additional Features


Running an Existing Sample Plan

This feature requires the Complex Samples option.

From the menus choose:

Analyze
Complex Samples
Select a Sample...

Select Draw a sample and choose a plan file to run.

Click Next to continue through the Wizard.

Review the sampling plan in the Plan Summary step, and then click Next.

The individual steps containing stage information are skipped when executing a sample plan. You can now go on to the Finish step at any time.

Optionally, you can specify stages that have already been sampled.

Related Topics

Sampling from a Complex Design
Creating a New Sample Plan
Sampling Wizard: Design Variables
Tree Controls for Navigating the Sampling Wizard
Sampling Wizard: Sampling Method
Sampling Wizard: Sample Size
Sampling Wizard: Output Variables
Sampling Wizard: Plan Summary
Sampling Wizard: Draw Sample Selection Options
Sampling Wizard: Draw Sample Output Files
Sampling Wizard: Finish
Modifying an Existing Sample Plan
Sampling Wizard: Plan Summary
CSPLAN and CSSELECT Commands Additional Features


CSPLAN and CSSELECT Commands Additional Features

The command syntax language also allows you to:

• Specify custom names for output variables.

• Control the output in the Viewer. For example, you can suppress the stagewise summary of the plan that is displayed if a sample is designed or modified, suppress the summary of the distribution of sampled cases by strata that is shown if the sample design is executed, and request a case processing summary.

• Choose a subset of variables in the active dataset to write to an external sample file or to a different dataset.

See the Command Syntax Reference for complete syntax information.

Related Topics

Sampling from a Complex Design
Creating a New Sample Plan
Sampling Wizard: Design Variables
Tree Controls for Navigating the Sampling Wizard
Sampling Wizard: Sampling Method
Sampling Wizard: Sample Size
Sampling Wizard: Output Variables
Sampling Wizard: Plan Summary
Sampling Wizard: Draw Sample Selection Options
Sampling Wizard: Draw Sample Output Files
Sampling Wizard: Finish
Modifying an Existing Sample Plan
Sampling Wizard: Plan Summary
Running an Existing Sample Plan
CSPLAN
CSSELECT


Preparing a Complex Sample for Analysis

analysis plan,analysis plan,analysis plan
complex sampling,complex sampling,complex sampling
analysis plan,analysis plan,analysis plan

The Analysis Preparation Wizard guides you through the steps for creating or modifying an analysis plan for use with the various Complex Samples analysis procedures. Before using the Wizard, you should have a sample drawn according to a complex design.

Creating a new plan is most useful when you do not have access to the sampling plan file used to draw the sample (recall that the sampling plan contains a default analysis plan). If you do have access to the sampling plan file used to draw the sample, you can use the default analysis plan contained in the sampling plan file or override the default analysis specifications and save your changes to a new file.

Show me

Related Topics

Creating a New Analysis Plan
Analysis Preparation Wizard: Design Variables
Tree Controls for Navigating the Analysis Wizard
Analysis Preparation Wizard: Estimation Method
Analysis Preparation Wizard: Size
Analysis Preparation Wizard: Plan Summary
Analysis Preparation Wizard: Finish
Modifying an Existing Analysis Plan
Analysis Preparation Wizard: Plan Summary
CSPLAN


Creating a New Analysis Plan

This feature requires the Complex Samples option.

From the menus choose:

Analyze
Complex Samples
Prepare for Analysis...

Select Create a plan file, and choose a plan filename to which you will save the analysis plan.

Click Next to continue through the Wizard.

Specify the variable containing sample weights in the Design Variables step, optionally defining strata and clusters.

You can now click Finish to save the plan.

Optionally, in further steps you can:

• Select the method for estimating standard errors in the Estimation Method step.

• Specify the number of units sampled or the inclusion probability per unit in the Size step.

• Add a second or third stage to the design.

• Paste your selections as command syntax.

Related Topics

Preparing a Complex Sample for Analysis
Analysis Preparation Wizard: Design Variables
Tree Controls for Navigating the Analysis Wizard
Analysis Preparation Wizard: Estimation Method
Analysis Preparation Wizard: Size
Analysis Preparation Wizard: Plan Summary
Analysis Preparation Wizard: Finish
Modifying an Existing Analysis Plan
Analysis Preparation Wizard: Plan Summary


Analysis Preparation Wizard: Design Variables

stratification,stratification,stratification
in Analysis Preparation Wizard,in Analysis Preparation Wizard,in Analysis Preparation Wizard
clusters,clusters,clusters
in Analysis Preparation Wizard,in Analysis Preparation Wizard,in Analysis Preparation Wizard
sample weights,sample weights,sample weights
in Analysis Preparation Wizard,in Analysis Preparation Wizard,in Analysis Preparation Wizard

This step allows you to identify the stratification and clustering variables and define sample weights. You can also provide a label for the stage.

Strata. The cross-classification of stratification variables defines distinct subpopulations, or strata. Your total sample represents the combination of independent samples from each stratum.

Clusters. Cluster variables define groups of observational units, or clusters. Samples drawn in multiple stages select clusters in the earlier stages and then subsample units from the selected clusters. When analyzing a data file obtained by sampling clusters with replacement, you should include the duplication index as a cluster variable.

Sample Weight. You must provide sample weights in the first stage. Sample weights are computed automatically for subsequent stages of the current design.

Stage Label. You can specify an optional string label for each stage. This is used in the output to help identify stagewise information.

Note: The source variable list has the same contents across steps of the Wizard. In other words, variables removed from the source list in a particular step are removed from the list in all steps. Variables returned to the source list show up in all steps.

Related Topics

Preparing a Complex Sample for Analysis
Creating a New Analysis Plan
Tree Controls for Navigating the Analysis Wizard
Analysis Preparation Wizard: Estimation Method
Analysis Preparation Wizard: Size
Analysis Preparation Wizard: Plan Summary
Analysis Preparation Wizard: Finish
Modifying an Existing Analysis Plan
Analysis Preparation Wizard: Plan Summary


Tree Controls for Navigating the Analysis Wizard

At the left side of each step of the Analysis Wizard is an outline of all the steps. You can navigate the Wizard by clicking on the name of an enabled step in the outline. Steps are enabled as long as all previous steps are valid—that is, as long as each previous step has been given the minimum required specifications for that step. For more information on why a given step may be invalid, see the Help for individual steps.

Related Topics

Preparing a Complex Sample for Analysis
Creating a New Analysis Plan
Analysis Preparation Wizard: Design Variables
Analysis Preparation Wizard: Estimation Method
Analysis Preparation Wizard: Size
Analysis Preparation Wizard: Plan Summary
Analysis Preparation Wizard: Finish
Modifying an Existing Analysis Plan
Analysis Preparation Wizard: Plan Summary


Analysis Preparation Wizard: Estimation Method

sampling estimation,sampling estimation,sampling estimation
in Analysis Preparation Wizard,in Analysis Preparation Wizard,in Analysis Preparation Wizard

This step allows you to specify an estimation method for the stage.

WR (sampling with replacement). WR estimation does not include a correction for sampling from a finite population (FPC) when estimating the variance under the complex sampling design. You can choose to include or exclude the FPC when estimating the variance under simple random sampling (SRS).

Choosing not to include the FPC for SRS variance estimation is recommended when the analysis weights have been scaled so that they do not add up to the population size. The SRS variance estimate is used in computing statistics like the design effect. WR estimation can be specified only in the final stage of a design; the Wizard will not allow you to add another stage if you select WR estimation.

Equal WOR (equal probability sampling without replacement). Equal WOR estimation includes the finite population correction and assumes that units are sampled with equal probability. Equal WOR can be specified in any stage of a design.

Unequal WOR (unequal probability sampling without replacement). In addition to using the finite population correction, Unequal WOR accounts for sampling units (usually clusters) selected with unequal probability. This estimation method is available only in the first stage.

Related Topics

Preparing a Complex Sample for Analysis
Creating a New Analysis Plan
Analysis Preparation Wizard: Design Variables
Tree Controls for Navigating the Analysis Wizard
Analysis Preparation Wizard: Size
Analysis Preparation Wizard: Plan Summary
Analysis Preparation Wizard: Finish
Modifying an Existing Analysis Plan
Analysis Preparation Wizard: Plan Summary


Analysis Preparation Wizard: Size

This step is used to specify inclusion probabilities or population sizes for the current stage. Sizes can be fixed or can vary across strata. For the purpose of specifying sizes, clusters specified in previous stages can be used to define strata. Note that this step is necessary only when Equal WOR is chosen as the Estimation Method.

Units. You can specify exact population sizes or the probabilities with which units were sampled.

• Value. A single value is applied to all strata. If Population Sizes is selected as the unit metric, you should enter a non-negative integer. If Inclusion Probabilities is selected, you should enter a value between 0 and 1, inclusive.

• Unequal values for strata. Allows you to enter size values on a per-stratum basis via the Define Unequal Sizes dialog box.

• Read values from variable. Allows you to select a numeric variable that contains size values for strata.

Related Topics

Preparing a Complex Sample for Analysis
Creating a New Analysis Plan
Analysis Preparation Wizard: Design Variables
Tree Controls for Navigating the Analysis Wizard
Analysis Preparation Wizard: Estimation Method
Analysis Preparation Wizard: Plan Summary
Analysis Preparation Wizard: Finish
Modifying an Existing Analysis Plan
Analysis Preparation Wizard: Plan Summary


Analysis Preparation Wizard: Plan Summary

This is the last step within each stage, providing a summary of the analysis design specifications through the current stage. From here, you can either proceed to the next stage (creating it if necessary) or save the analysis specifications.

If you cannot add another stage, it is likely because:

• No cluster variable was specified in the Design Variables step.

• You selected WR estimation in the Estimation Method step.

• This is the third stage of the analysis, and the Wizard supports a maximum of three stages.

Related Topics

Preparing a Complex Sample for Analysis
Creating a New Analysis Plan
Analysis Preparation Wizard: Design Variables
Tree Controls for Navigating the Analysis Wizard
Analysis Preparation Wizard: Estimation Method
Analysis Preparation Wizard: Size
Analysis Preparation Wizard: Finish
Modifying an Existing Analysis Plan
Analysis Preparation Wizard: Plan Summary


Analysis Preparation Wizard: Finish

This is the final step. You can save the plan file now or paste your selections to a syntax window.

When making changes to stages in the existing plan file, you can save the edited plan to a new file or overwrite the existing file. When adding stages without making changes to existing stages, the Wizard automatically overwrites the existing plan file. If you want to save the plan to a new file, choose to Paste the syntax generated by the Wizard into a syntax window and change the filename in the syntax commands.

Related Topics

Preparing a Complex Sample for Analysis
Creating a New Analysis Plan
Analysis Preparation Wizard: Design Variables
Tree Controls for Navigating the Analysis Wizard
Analysis Preparation Wizard: Estimation Method
Analysis Preparation Wizard: Size
Analysis Preparation Wizard: Plan Summary
Modifying an Existing Analysis Plan
Analysis Preparation Wizard: Plan Summary


Modifying an Existing Analysis Plan

This feature requires the Complex Samples option.

From the menus choose:

Analyze
Complex Samples
Prepare for Analysis...

Select Edit a plan file, and choose a plan filename to which you will save the analysis plan.

Click Next to continue through the Wizard.

Review the analysis plan in the Plan Summary step, and then click Next.

Subsequent steps are largely the same as for a new design. For more information, see the Help for individual steps.

Navigate to the Finish step, and specify a new name for the edited plan file, or choose to overwrite the existing plan file.

Optionally, you can remove stages from the plan.

Related Topics

Preparing a Complex Sample for Analysis
Creating a New Analysis Plan
Analysis Preparation Wizard: Design Variables
Tree Controls for Navigating the Analysis Wizard
Analysis Preparation Wizard: Estimation Method
Analysis Preparation Wizard: Size
Analysis Preparation Wizard: Plan Summary
Analysis Preparation Wizard: Finish
Analysis Preparation Wizard: Plan Summary


Analysis Preparation Wizard: Plan Summary

This step allows you to review the analysis plan and remove stages from the plan.

Remove Stages. You can remove stages 2 and 3 from a multistage design. Since a plan must have at least one stage, you can edit but not remove stage 1 from the design.

Related Topics

Preparing a Complex Sample for Analysis
Creating a New Analysis Plan
Analysis Preparation Wizard: Design Variables
Tree Controls for Navigating the Analysis Wizard
Analysis Preparation Wizard: Estimation Method
Analysis Preparation Wizard: Size
Analysis Preparation Wizard: Plan Summary
Analysis Preparation Wizard: Finish
Modifying an Existing Analysis Plan


Define Unequal Sizes

The Define Unequal Sizes dialog box allows you to enter sizes on a per-stratum basis.

Size Specifications grid. The grid displays the cross-classifications of up to five strata or cluster variables—one stratum/cluster combination per row. Eligible grid variables include all stratification variables from the current and previous stages and all cluster variables from previous stages. Variables can be reordered within the grid or moved to the Exclude list. Enter sizes in the rightmost column. Click Labels or Values to toggle the display of value labels and data values for stratification and cluster variables in the grid cells. Cells that contain unlabeled values always show values. Click Refresh Strata to repopulate the grid with each combination of labeled data values for variables in the grid.

Exclude. To specify sizes for a subset of stratum/cluster combinations, move one or more variables to the Exclude list. These variables are not used to define sample sizes.

Related Topics

Sampling Wizard: Sample Size
Analysis Preparation Wizard: Size


Complex Samples Plan

Complex Samples analysis procedures require analysis specifications from an analysis or sample plan file in order to provide valid results.

Plan. Specify the path of an analysis or sample plan file.

Joint Probabilities. In order to use Unequal WOR estimation for clusters drawn using a PPS WOR method, you need to specify a separate file or an open dataset containing the joint probabilities. This file or dataset is created by the Sampling Wizard during sampling.

Related Topics

Plan Files
Complex Samples Frequencies
Complex Samples Descriptives
Complex Samples Crosstabs
Complex Samples Ratios


Complex Samples Frequencies

Complex Samples Frequencies,Complex Samples Frequencies,Complex Samples Frequencies

The Complex Samples Frequencies procedure produces frequency tables for selected variables and displays univariate statistics. Optionally, you can request statistics by subgroups, defined by one or more categorical variables.

Example. Using the Complex Samples Frequencies procedure, you can obtain univariate tabular statistics for vitamin usage among U.S. citizens, based on the results of the National Health Interview Survey (NHIS) and with an appropriate analysis plan for this public-use data.

Statistics. The procedure produces estimates of cell population sizes and table percentages, plus standard errors, confidence intervals, coefficients of variation, design effects, square roots of design effects, cumulative values, and unweighted counts for each estimate. Additionally, chi-square and likelihood-ratio statistics are computed for the test of equal cell proportions.

Show me

Complex Samples Frequencies Data Considerations Collapse Hide details

Data. Variables for which frequency tables are produced should be categorical. Subpopulation variables can be string or numeric but should be categorical.

Assumptions. The cases in the data file represent a sample from a complex design that should be analyzed according to the specifications in the file selected in the Complex Samples Plan dialog box.

Obtaining Complex Samples Frequencies Collapse Hide details

Obtaining Complex Samples Frequencies

This feature requires the Complex Samples option.

From the menus choose:

Analyze
Complex Samples
Frequencies...

Select a plan file. Optionally, select a custom joint probabilities file.

Click Continue.

Select at least one frequency variable.

Optionally, you can specify variables to define subpopulations. Statistics are computed separately for each subpopulation.

This procedure pastes CSTABULATE command syntax.

See CSTABULATE Algorithms for computational details for this procedure.

Related Topics

Complex Samples Frequencies Statistics
Complex Samples Plan
Complex Samples Descriptives
Complex Samples Crosstabs
Complex Samples Ratios
CSTABULATE


Complex Samples Frequencies Statistics

Complex Samples Frequencies,Complex Samples Frequencies,Complex Samples Frequencies
statistics,statistics,statistics
population size,population size,population size
in Complex Samples Frequencies,in Complex Samples Frequencies,in Complex Samples Frequencies
table percentages,table percentages,table percentages
in Complex Samples Frequencies,in Complex Samples Frequencies,in Complex Samples Frequencies
standard error,standard error,standard error
in Complex Samples Frequencies,in Complex Samples Frequencies,in Complex Samples Frequencies
confidence intervals,confidence intervals,confidence intervals
in Complex Samples Frequencies,in Complex Samples Frequencies,in Complex Samples Frequencies
coefficient of variation (COV),coefficient of variation (COV),coefficient of variation (COV)
in Complex Samples Frequencies,in Complex Samples Frequencies,in Complex Samples Frequencies
unweighted count,unweighted count,unweighted count
in Complex Samples Frequencies,in Complex Samples Frequencies,in Complex Samples Frequencies
design effect,design effect,design effect
in Complex Samples Frequencies,in Complex Samples Frequencies,in Complex Samples Frequencies
square root of design effect,square root of design effect,square root of design effect
in Complex Samples Frequencies,in Complex Samples Frequencies,in Complex Samples Frequencies
cumulative values,cumulative values,cumulative values
in Complex Samples Frequencies,in Complex Samples Frequencies,in Complex Samples Frequencies

Cells. This group allows you to request estimates of the cell population sizes and table percentages.

Statistics. This group produces statistics associated with the population size or table percentage.

• Standard error. The standard error of the estimate.

• Confidence interval. A confidence interval for the estimate, using the specified level.

• Coefficient of variation. The ratio of the standard error of the estimate to the estimate.

• Unweighted count. The number of units used to compute the estimate.

• Design effect. The ratio of the variance of the estimate to the variance obtained by assuming that the sample is a simple random sample. This is a measure of the effect of specifying a complex design, where values further from 1 indicate greater effects.

• Square root of design effect. This is a measure of the effect of specifying a complex design, where values further from 1 indicate greater effects.

• Cumulative values. The cumulative estimate through each value of the variable.

Test of equal cell proportions. This produces chi-square and likelihood-ratio tests of the hypothesis that the categories of a variable have equal frequencies. Separate tests are performed for each variable.

Obtaining Statistics for Complex Samples Frequencies Collapse Hide details

This feature requires the Complex Samples option.

From the menus choose:

Analyze
Complex Samples
Frequencies...

Select a plan file. Optionally, select a custom joint probabilities file.

Click Continue.

In the Complex Samples Frequencies dialog box, select Statistics.

Select the statistics you want.

Related Topics

Complex Samples Frequencies


Complex Samples Descriptives

Complex Samples Descriptives,Complex Samples Descriptives,Complex Samples Descriptives

The Complex Samples Descriptives procedure displays univariate summary statistics for several variables. Optionally, you can request statistics by subgroups, defined by one or more categorical variables.

Example. Using the Complex Samples Descriptives procedure, you can obtain univariate descriptive statistics for the activity levels of U.S. citizens, based on the results of the National Health Interview Survey (NHIS) and with an appropriate analysis plan for this public-use data.

Statistics. The procedure produces means and sums, plus t tests, standard errors, confidence intervals, coefficients of variation, unweighted counts, population sizes, design effects, and square roots of design effects for each estimate.

Show me

Complex Samples Descriptives Data Considerations Collapse Hide details

Data. Measures should be scale variables. Subpopulation variables can be string or numeric but should be categorical.

Assumptions. The cases in the data file represent a sample from a complex design that should be analyzed according to the specifications in the file selected in the Complex Samples Plan dialog box.

Obtaining Complex Samples Descriptives Collapse Hide details

Obtaining Complex Samples Descriptives

This feature requires the Complex Samples option.

From the menus choose:

Analyze
Complex Samples
Descriptives...

Select a plan file. Optionally, select a custom joint probabilities file.

Click Continue.

Select at least one measure variable.

Optionally, you can specify variables to define subpopulations. Statistics are computed separately for each subpopulation.

This procedure pastes CSDESCRIPTIVES command syntax.

See CSDESCRIPTIVES Algorithms for computational details for this procedure.

Related Topics

Complex Samples Descriptives Statistics
Complex Samples Descriptives Missing Values
Complex Samples Plan
Complex Samples Frequencies
Complex Samples Crosstabs
Complex Samples Ratios
CSDESCRIPTIVES


Complex Samples Descriptives Statistics

Complex Samples Descriptives,Complex Samples Descriptives,Complex Samples Descriptives
statistics,statistics,statistics
mean,mean,mean
in Complex Samples Descriptives,in Complex Samples Descriptives,in Complex Samples Descriptives
sum,sum,sum
in Complex Samples Descriptives,in Complex Samples Descriptives,in Complex Samples Descriptives
standard error,standard error,standard error
in Complex Samples Descriptives,in Complex Samples Descriptives,in Complex Samples Descriptives
confidence intervals,confidence intervals,confidence intervals
in Complex Samples Descriptives,in Complex Samples Descriptives,in Complex Samples Descriptives
coefficient of variation (COV),coefficient of variation (COV),coefficient of variation (COV)
in Complex Samples Descriptives,in Complex Samples Descriptives,in Complex Samples Descriptives
unweighted count,unweighted count,unweighted count
in Complex Samples Descriptives,in Complex Samples Descriptives,in Complex Samples Descriptives
population size,population size,population size
in Complex Samples Descriptives,in Complex Samples Descriptives,in Complex Samples Descriptives
design effect,design effect,design effect
in Complex Samples Descriptives,in Complex Samples Descriptives,in Complex Samples Descriptives
square root of design effect,square root of design effect,square root of design effect
in Complex Samples Descriptives,in Complex Samples Descriptives,in Complex Samples Descriptives

Summaries. This group allows you to request estimates of the means and sums of the measure variables. Additionally, you can request t tests of the estimates against a specified value.

Statistics. This group produces statistics associated with the mean or sum.

• Standard error. The standard error of the estimate.

• Confidence interval. A confidence interval for the estimate, using the specified level.

• Coefficient of variation. The ratio of the standard error of the estimate to the estimate.

• Unweighted count. The number of units used to compute the estimate.

• Population size. The estimated number of units in the population.

• Design effect. The ratio of the variance of the estimate to the variance obtained by assuming that the sample is a simple random sample. This is a measure of the effect of specifying a complex design, where values further from 1 indicate greater effects.

• Square root of design effect. This is a measure of the effect of specifying a complex design, where values further from 1 indicate greater effects.

Obtaining Statistics for Complex Samples Descriptives Collapse Hide details

This feature requires the Complex Samples option.

From the menus choose:

Analyze
Complex Samples
Descriptives...

Select a plan file. Optionally, select a custom joint probabilities file.

Click Continue.

In the Complex Samples Descriptives dialog box, click Statistics.

Select the statistics you want.

Related Topics

Complex Samples Descriptives
Complex Samples Descriptives Missing Values


Complex Samples Descriptives Missing Values

Complex Samples Descriptives,Complex Samples Descriptives,Complex Samples Descriptives
missing values,missing values,missing values
missing values,missing values,missing values
in Complex Samples Descriptives,in Complex Samples Descriptives,in Complex Samples Descriptives

Statistics for Measure Variables. This group determines which cases are used in the analysis.

• Use all available data. Missing values are determined on a variable-by-variable basis, thus the cases used to compute statistics may vary across measure variables.

• Ensure consistent case base. Missing values are determined across all variables, thus the cases used to compute statistics are consistent.

Categorical Design Variables. This group determines whether user-missing values are valid or invalid.

Specifying Missing Values Settings for Complex Samples Descriptives Collapse Hide details

This feature requires the Complex Samples option.

From the menus choose:

Analyze
Complex Samples
Descriptives...

Select a plan file. Optionally, select a custom joint probabilities file.

Click Continue.

In the Complex Samples Descriptives dialog box, click Missing Values.

Select the missing values settings you want.

Related Topics

Complex Samples Descriptives
Complex Samples Descriptives Statistics


Complex Samples Crosstabs

Complex Samples Crosstabs,Complex Samples Crosstabs,Complex Samples Crosstabs

The Complex Samples Crosstabs procedure produces crosstabulation tables for pairs of selected variables and displays two-way statistics. Optionally, you can request statistics by subgroups, defined by one or more categorical variables.

Example. Using the Complex Samples Crosstabs procedure, you can obtain cross-classification statistics for smoking frequency by vitamin usage of U.S. citizens, based on the results of the National Health Interview Survey (NHIS) and with an appropriate analysis plan for this public-use data.

Statistics. The procedure produces estimates of cell population sizes and row, column, and table percentages, plus standard errors, confidence intervals, coefficients of variation, expected values, design effects, square roots of design effects, residuals, adjusted residuals, and unweighted counts for each estimate. The odds ratio, relative risk, and risk difference are computed for 2-by-2 tables. Additionally, Pearson and likelihood-ratio statistics are computed for the test of independence of the row and column variables.

Show me

Complex Samples Crosstabs Data Considerations Collapse Hide details

Data. Row and column variables should be categorical. Subpopulation variables can be string or numeric but should be categorical.

Assumptions. The cases in the data file represent a sample from a complex design that should be analyzed according to the specifications in the file selected in the Complex Samples Plan dialog box.

Obtaining Complex Samples Crosstabs Collapse Hide details

Obtaining Complex Samples Crosstabs

This feature requires the Complex Samples option.

From the menus choose:

Analyze
Complex Samples
Crosstabs...

Select a plan file. Optionally, select a custom joint probabilities file.

Click Continue.

Select at least one row variable and one column variable.

Optionally, you can specify variables to define subpopulations. Statistics are computed separately for each subpopulation.

This procedure pastes CSTABULATE command syntax.

See CSTABULATE Algorithms for computational details for this procedure.

Related Topics

Complex Samples Crosstabs Statistics
Complex Samples Plan
Complex Samples Frequencies
Complex Samples Descriptives
Complex Samples Ratios
CSTABULATE


Complex Samples Crosstabs Statistics

Complex Samples Crosstabs,Complex Samples Crosstabs,Complex Samples Crosstabs
statistics,statistics,statistics
population size,population size,population size
in Complex Samples Crosstabs,in Complex Samples Crosstabs,in Complex Samples Crosstabs
row percentages,row percentages,row percentages
in Complex Samples Crosstabs,in Complex Samples Crosstabs,in Complex Samples Crosstabs
column percentages,column percentages,column percentages
in Complex Samples Crosstabs,in Complex Samples Crosstabs,in Complex Samples Crosstabs
table percentages,table percentages,table percentages
in Complex Samples Crosstabs,in Complex Samples Crosstabs,in Complex Samples Crosstabs
standard error,standard error,standard error
in Complex Samples Crosstabs,in Complex Samples Crosstabs,in Complex Samples Crosstabs
confidence intervals,confidence intervals,confidence intervals
in Complex Samples Crosstabs,in Complex Samples Crosstabs,in Complex Samples Crosstabs
coefficient of variation (COV),coefficient of variation (COV),coefficient of variation (COV)
in Complex Samples Crosstabs,in Complex Samples Crosstabs,in Complex Samples Crosstabs
expected values,expected values,expected values
in Complex Samples Crosstabs,in Complex Samples Crosstabs,in Complex Samples Crosstabs
unweighted count,unweighted count,unweighted count
in Complex Samples Crosstabs,in Complex Samples Crosstabs,in Complex Samples Crosstabs
design effect,design effect,design effect
in Complex Samples Crosstabs,in Complex Samples Crosstabs,in Complex Samples Crosstabs
square root of design effect,square root of design effect,square root of design effect
in Complex Samples Crosstabs,in Complex Samples Crosstabs,in Complex Samples Crosstabs
residuals,residuals,residuals
in Complex Samples Crosstabs,in Complex Samples Crosstabs,in Complex Samples Crosstabs
adjusted residuals,adjusted residuals,adjusted residuals
in Complex Samples Crosstabs,in Complex Samples Crosstabs,in Complex Samples Crosstabs
odds ratios,odds ratios,odds ratios
in Complex Samples Crosstabs,in Complex Samples Crosstabs,in Complex Samples Crosstabs
relative risk,relative risk,relative risk
in Complex Samples Crosstabs,in Complex Samples Crosstabs,in Complex Samples Crosstabs
risk difference,risk difference,risk difference
in Complex Samples Crosstabs,in Complex Samples Crosstabs,in Complex Samples Crosstabs

Cells. This group allows you to request estimates of the cell population size and row, column, and table percentages.

Statistics. This group produces statistics associated with the population size and row, column, and table percentages.

• Standard error. The standard error of the estimate.

• Confidence interval. A confidence interval for the estimate, using the specified level.

• Coefficient of variation. The ratio of the standard error of the estimate to the estimate.

• Expected values. The expected value of the estimate, under the hypothesis of independence of the row and column variable.

• Unweighted count. The number of units used to compute the estimate.

• Design effect. The ratio of the variance of the estimate to the variance obtained by assuming that the sample is a simple random sample. This is a measure of the effect of specifying a complex design, where values further from 1 indicate greater effects.

• Square root of design effect. This is a measure of the effect of specifying a complex design, where values further from 1 indicate greater effects.

• Residuals. The expected value is the number of cases that you would expect in the cell if there were no relationship between the two variables. A positive residual indicates that there are more cases in the cell than there would be if the row and column variables were independent.

• Adjusted residuals. The residual for a cell (observed minus expected value) divided by an estimate of its standard error. The resulting standardized residual is expressed in standard deviation units above or below the mean.

Summaries for 2-by-2 Tables. This group produces statistics for tables in which the row and column variable each have two categories. Each is a measure of the strength of the association between the presence of a factor and the occurrence of an event.

• Odds ratio. The odds ratio can be used as an estimate of relative risk when the occurrence of the factor is rare.

• Relative risk. The ratio of the risk of an event in the presence of the factor to the risk of the event in the absence of the factor.

• Risk difference. The difference between the risk of an event in the presence of the factor and the risk of the event in the absence of the factor.

Test of independence of rows and columns. This produces chi-square and likelihood-ratio tests of the hypothesis that a row and column variable are independent. Separate tests are performed for each pair of variables.

Obtaining Statistics for Complex Samples Crosstabs Collapse Hide details

This feature requires the Complex Samples option.

From the menus choose:

Analyze
Complex Samples
Crosstabs...

Select a plan file. Optionally, select a custom joint probabilities file.

Click Continue.

In the Complex Samples Crosstabs dialog box, select Statistics.

Select the statistics that you want.

Related Topics

Complex Samples Crosstabs


Complex Samples Ratios

Complex Samples Ratios,Complex Samples Ratios,Complex Samples Ratios

The Complex Samples Ratios procedure displays univariate summary statistics for ratios of variables. Optionally, you can request statistics by subgroups, defined by one or more categorical variables.

Example. Using the Complex Samples Ratios procedure, you can obtain descriptive statistics for the ratio of current property value to last assessed value, based on the results of a statewide survey carried out according to a complex design and with an appropriate analysis plan for the data.

Statistics. The procedure produces ratio estimates, t tests, standard errors, confidence intervals, coefficients of variation, unweighted counts, population sizes, design effects, and square roots of design effects.

Show me

Complex Samples Ratios Data Considerations Collapse Hide details

Data. Numerators and denominators should be positive-valued scale variables. Subpopulation variables can be string or numeric but should be categorical.

Assumptions. The cases in the data file represent a sample from a complex design that should be analyzed according to the specifications in the file selected in the Complex Samples Plan dialog box.

Obtaining Complex Samples Ratios Collapse Hide details

Obtaining Complex Samples Ratios

This feature requires the Complex Samples option.

From the menus choose:

Analyze
Complex Samples
Ratios...

Select a plan file. Optionally, select a custom joint probabilities file.

Click Continue.

Select at least one numerator variable and denominator variable.

Optionally, you can specify variables to define subgroups for which statistics are produced.

This procedure pastes CSDESCRIPTIVES command syntax.

See CSDESCRIPTIVES Algorithms for computational details for this procedure.

Related Topics

CSDESCRIPTIVES
Complex Samples Ratios Statistics
Complex Samples Ratios Missing Values
Complex Samples Plan
Complex Samples Frequencies
Complex Samples Descriptives
Complex Samples Crosstabs


Complex Samples Ratios Statistics

Complex Samples Ratios,Complex Samples Ratios,Complex Samples Ratios
statistics,statistics,statistics
standard error,standard error,standard error
in Complex Samples Ratios,in Complex Samples Ratios,in Complex Samples Ratios
confidence intervals,confidence intervals,confidence intervals
in Complex Samples Ratios,in Complex Samples Ratios,in Complex Samples Ratios
coefficient of variation (COV),coefficient of variation (COV),coefficient of variation (COV)
in Complex Samples Ratios,in Complex Samples Ratios,in Complex Samples Ratios
unweighted count,unweighted count,unweighted count
in Complex Samples Ratios,in Complex Samples Ratios,in Complex Samples Ratios
population size,population size,population size
in Complex Samples Ratios,in Complex Samples Ratios,in Complex Samples Ratios
design effect,design effect,design effect
in Complex Samples Ratios,in Complex Samples Ratios,in Complex Samples Ratios
square root of design effect,square root of design effect,square root of design effect
in Complex Samples Ratios,in Complex Samples Ratios,in Complex Samples Ratios

Statistics. This group produces statistics associated with the ratio estimate.

• Standard error. The standard error of the estimate.

• Confidence interval. A confidence interval for the estimate, using the specified level.

• Coefficient of variation. The ratio of the standard error of the estimate to the estimate.

• Unweighted count. The number of units used to compute the estimate.

• Population size. The estimated number of units in the population.

• Design effect. The ratio of the variance of the estimate to the variance obtained by assuming that the sample is a simple random sample. This is a measure of the effect of specifying a complex design, where values further from 1 indicate greater effects.

• Square root of design effect. This is a measure of the effect of specifying a complex design, where values further from 1 indicate greater effects.

T test. You can request t tests of the estimates against a specified value.

Obtaining Statistics for Complex Samples Ratios Collapse Hide details

This feature requires the Complex Samples option.

From the menus choose:

Analyze
Complex Samples
Ratios...

Select a plan file. Optionally, select a custom joint probabilities file.

Click Continue.

In the Complex Samples Ratios dialog box, click Statistics.

Select the statistics that you want.

Related Topics

Complex Samples Ratios
Complex Samples Ratios Missing Values


Complex Samples Ratios Missing Values

Complex Samples Ratios,Complex Samples Ratios,Complex Samples Ratios
missing values,missing values,missing values
missing values,missing values,missing values
in Complex Samples Ratios,in Complex Samples Ratios,in Complex Samples Ratios

Ratios. This group determines which cases are used in the analysis.

• Use all available data. Missing values are determined on a ratio-by-ratio basis. Thus, the cases used to compute statistics may vary across numerator-denominator pairs.

• Ensure consistent case base. Missing values are determined across all variables. Thus, the cases used to compute statistics are consistent.

Categorical Design Variables. This group determines whether user-missing values are valid or invalid.

Specifying Missing Values Settings for Complex Samples Ratios Collapse Hide details

This feature requires the Complex Samples option.

From the menus choose:

Analyze
Complex Samples
Ratios...

Select a plan file. Optionally, select a custom joint probabilities file.

Click Continue.

In the Complex Samples Ratios dialog box, click Missing Values.

Select the missing values settings that you want.

Related Topics

Complex Samples Ratios
Complex Samples Ratios Statistics


Complex Samples General Linear Model

Complex Samples General Linear Model,Complex Samples General Linear Model,Complex Samples General Linear Model

The Complex Samples General Linear Model (CSGLM) procedure performs linear regression analysis, as well as analysis of variance and covariance, for samples drawn by complex sampling methods. Optionally, you can request analyses for a subpopulation.

Example. A grocery store chain surveyed a set of customers concerning their purchasing habits, according to a complex design. Given the survey results and how much each customer spent in the previous month, the store wants to see if the frequency with which customers shop is related to the amount they spend in a month, controlling for the gender of the customer and incorporating the sampling design.

Statistics. The procedure produces estimates, standard errors, confidence intervals, t tests, design effects, and square roots of design effects for model parameters, as well as the correlations and covariances between parameter estimates. Measures of model fit and descriptive statistics for the dependent and independent variables are also available. Additionally, you can request estimated marginal means for levels of model factors and factor interactions.

Show me

Complex Samples General Linear Model Data Considerations Collapse Hide details

Data. The dependent variable is quantitative. Factors are categorical. Covariates are quantitative variables that are related to the dependent variable. Subpopulation variables can be string or numeric but should be categorical.

Assumptions. The cases in the data file represent a sample from a complex design that should be analyzed according to the specifications in the file selected in the Complex Samples Plan dialog box.

Obtaining a Complex Samples General Linear Model Collapse Hide details

Obtaining a Complex Samples General Linear Model

This feature requires the Complex Samples option.

From the menus choose:

Analyze
Complex Samples
General Linear Model...

Select a plan file. Optionally, select a custom joint probabilities file.

Click Continue.

Select a dependent variable.

Optionally, you can:

• Select variables for factors and covariates, as appropriate for your data.

• Specify a variable to define a subpopulation. The analysis is performed only for the selected category of the subpopulation variable.

This procedure pastes CSGLM command syntax.

See CSGLM Algorithms for computational details for this procedure.

Related Topics

CSGLM
Complex Samples General Linear Model Statistics
Complex Samples General Linear Model Estimated Means
Complex Samples General Linear Model Save
Complex Samples General Linear Model Options
Complex Samples Model
Complex Samples Hypothesis Tests


Complex Samples General Linear Model Statistics

Complex Samples General Linear Model,Complex Samples General Linear Model,Complex Samples General Linear Model
statistics,statistics,statistics
parameter estimates,parameter estimates,parameter estimates
in Complex Samples General Linear Model,in Complex Samples General Linear Model,in Complex Samples General Linear Model
standard error,standard error,standard error
in Complex Samples General Linear Model,in Complex Samples General Linear Model,in Complex Samples General Linear Model
confidence intervals,confidence intervals,confidence intervals
in Complex Samples General Linear Model,in Complex Samples General Linear Model,in Complex Samples General Linear Model
t test,t test,t test
in Complex Samples General Linear Model,in Complex Samples General Linear Model,in Complex Samples General Linear Model
covariances of parameter estimates,covariances of parameter estimates,covariances of parameter estimates
in Complex Samples General Linear Model,in Complex Samples General Linear Model,in Complex Samples General Linear Model
design effect,design effect,design effect
in Complex Samples General Linear Model,in Complex Samples General Linear Model,in Complex Samples General Linear Model
R2 statistic,R2 statistic,R2 statistic
in Complex Samples General Linear Model,in Complex Samples General Linear Model,in Complex Samples General Linear Model
correlations of parameter estimates,correlations of parameter estimates,correlations of parameter estimates
in Complex Samples General Linear Model,in Complex Samples General Linear Model,in Complex Samples General Linear Model
square root of design effect,square root of design effect,square root of design effect
in Complex Samples General Linear Model,in Complex Samples General Linear Model,in Complex Samples General Linear Model

Model Parameters. This group allows you to control the display of statistics related to the model parameters.

• Estimate. Displays estimates of the coefficients.

• Standard error. Displays the standard error for each coefficient estimate.

• Confidence interval. Displays a confidence interval for each coefficient estimate. The confidence level for the interval is set in the Options dialog box.

• T test. Displays a t test of each coefficient estimate. The null hypothesis for each test is that the value of the coefficient is 0.

• Covariances of parameter estimates. Displays an estimate of the covariance matrix for the model coefficients.

• Correlations of parameter estimates. Displays an estimate of the correlation matrix for the model coefficients.

• Design effect. The ratio of the variance of the estimate to the variance obtained by assuming that the sample is a simple random sample. This is a measure of the effect of specifying a complex design, where values further from 1 indicate greater effects.

• Square root of design effect. This is a measure of the effect of specifying a complex design, where values further from 1 indicate greater effects.

Model fit. Displays R2 and root mean squared error statistics.

Population means of dependent variable and covariates. Displays summary information about the dependent variable, covariates, and factors.

Sample design information. Displays summary information about the sample, including the unweighted count and the population size.

To Obtain Statistics for Complex Samples General Linear Model Collapse Hide details

This feature requires the Complex Samples option.

From the menus choose:

Analyze
Complex Samples
General Linear Model...

Select a plan file. Optionally, select a custom joint probabilities file.

Click Continue.

In the Complex Samples General Linear Model dialog box, click Statistics.

Select the statistics that you want to display.

Related Topics

Complex Samples General Linear Model
Complex Samples General Linear Model Estimated Means
Complex Samples General Linear Model Save
Complex Samples General Linear Model Options


Complex Samples General Linear Model Estimated Means

Complex Samples General Linear Model,Complex Samples General Linear Model,Complex Samples General Linear Model
estimated means,estimated means,estimated means
estimated marginal means,estimated marginal means,estimated marginal means
in Complex Samples General Linear Model,in Complex Samples General Linear Model,in Complex Samples General Linear Model
contrasts,contrasts,contrasts
in Complex Samples General Linear Model,in Complex Samples General Linear Model,in Complex Samples General Linear Model
simple contrasts,simple contrasts,simple contrasts
in Complex Samples General Linear Model,in Complex Samples General Linear Model,in Complex Samples General Linear Model
deviation contrasts,deviation contrasts,deviation contrasts
in Complex Samples General Linear Model,in Complex Samples General Linear Model,in Complex Samples General Linear Model
difference contrasts,difference contrasts,difference contrasts
in Complex Samples General Linear Model,in Complex Samples General Linear Model,in Complex Samples General Linear Model
Helmert contrasts,Helmert contrasts,Helmert contrasts
in Complex Samples General Linear Model,in Complex Samples General Linear Model,in Complex Samples General Linear Model
repeated contrasts,repeated contrasts,repeated contrasts
in Complex Samples General Linear Model,in Complex Samples General Linear Model,in Complex Samples General Linear Model
polynomial contrasts,polynomial contrasts,polynomial contrasts
in Complex Samples General Linear Model,in Complex Samples General Linear Model,in Complex Samples General Linear Model
reference category,reference category,reference category
in Complex Samples General Linear Model,in Complex Samples General Linear Model,in Complex Samples General Linear Model

The Estimated Means dialog box allows you to display the model-estimated marginal means for levels of factors and factor interactions specified in the Model subdialog box. You can also request that the overall population mean be displayed.

Term. Estimated means are computed for the selected factors and factor interactions.

Contrast. The contrast determines how hypothesis tests are set up to compare the estimated means.

• Simple. Compares the mean of each level to the mean of a specified level. This type of contrast is useful when there is a control group.

• Deviation. Compares the mean of each level (except a reference category) to the mean of all of the levels (grand mean). The levels of the factor can be in any order.

• Difference. Compares the mean of each level (except the first) to the mean of previous levels. They are sometimes called reverse Helmert contrasts.

• Helmert. Compares the mean of each level of the factor (except the last) to the mean of subsequent levels.

• Repeated. Compares the mean of each level (except the last) to the mean of the subsequent level.

• Polynomial. Compares the linear effect, quadratic effect, cubic effect, and so on. The first degree of freedom contains the linear effect across all categories; the second degree of freedom, the quadratic effect; and so on. These contrasts are often used to estimate polynomial trends.

Reference Category. The simple and deviation contrasts require a reference category or factor level against which the others are compared.

To Obtain Estimated Means for Complex Samples General Linear Model Collapse Hide details

This feature requires the Complex Samples option.

From the menus choose:

Analyze
Complex Samples
General Linear Model...

Select a plan file. Optionally, select a custom joint probabilities file.

Click Continue.

In the Complex Samples General Linear Model dialog box, click Estimated Means.

Select terms whose levels you want to compare, the desired contrasts for performing the hypothesis tests, and any necessary reference categories.

Related Topics

Complex Samples General Linear Model
Complex Samples General Linear Model Statistics
Complex Samples General Linear Model Save
Complex Samples General Linear Model Options


Complex Samples General Linear Model Save

Complex Samples General Linear Model,Complex Samples General Linear Model,Complex Samples General Linear Model
save variables,save variables,save variables
predicted values,predicted values,predicted values
in Complex Samples General Linear Model,in Complex Samples General Linear Model,in Complex Samples General Linear Model
residuals,residuals,residuals
in Complex Samples General Linear Model,in Complex Samples General Linear Model,in Complex Samples General Linear Model

Save Variables. This group allows you to save the model predicted values and residuals as new variables in the working file.

Export model as PASW Statistics data. Writes a dataset in PASW Statistics format containing the parameter correlation or covariance matrix with parameter estimates, standard errors, significance values, and degrees of freedom. The order of variables in the matrix file is as follows.

• rowtype_. Takes values (and value labels), COV (Covariances), CORR (Correlations), EST (Parameter estimates), SE (Standard errors), SIG (Significance levels), and DF (Sampling design degrees of freedom). There is a separate case with row type COV (or CORR) for each model parameter, plus a separate case for each of the other row types.

• varname_. Takes values P1, P2, ..., corresponding to an ordered list of all model parameters, for row types COV or CORR, with value labels corresponding to the parameter strings shown in the parameter estimates table. The cells are blank for other row types.

• P1, P2, ... These variables correspond to an ordered list of all model parameters, with variable labels corresponding to the parameter strings shown in the parameter estimates table, and take values according to the row type. For redundant parameters, all covariances are set to zero; correlations are set to the system-missing value; all parameter estimates are set at zero; and all standard errors, significance levels, and residual degrees of freedom are set to the system-missing value.

Note: This file is not immediately usable for further analyses in other procedures that read a matrix file unless those procedures accept all the row types exported here.

Export Model as XML. Saves the parameter estimates and the parameter covariance matrix, if selected, in XML (PMML) format. SmartScore and PASW Statistics Server (a separate product) can use this model file to apply the model information to other data files for scoring purposes.

To Save Variables in Complex Samples General Linear Model Collapse Hide details

This feature requires the Complex Samples option.

From the menus choose:

Analyze
Complex Samples
General Linear Model...

Select a plan file. Optionally, select a custom joint probabilities file.

Click Continue.

In the Complex Samples General Linear Model dialog box, click Save.

Select the variables that you want to save.

Related Topics

Complex Samples General Linear Model
Complex Samples General Linear Model Statistics
Complex Samples General Linear Model Estimated Means
Complex Samples General Linear Model Options


Complex Samples General Linear Model Options

Complex Samples General Linear Model,Complex Samples General Linear Model,Complex Samples General Linear Model
options,options,options
missing values,missing values,missing values
in Complex Samples General Linear Model,in Complex Samples General Linear Model,in Complex Samples General Linear Model
confidence intervals,confidence intervals,confidence intervals
in Complex Samples General Linear Model,in Complex Samples General Linear Model,in Complex Samples General Linear Model

User-Missing Values. All design variables, as well as the dependent variable and any covariates, must have valid data. Cases with invalid data for any of these variables are deleted from the analysis. These controls allow you to decide whether user-missing values are treated as valid among the strata, cluster, subpopulation, and factor variables.

Confidence Interval. This is the confidence interval level for coefficient estimates and estimated marginal means. Specify a value greater than or equal to 50 and less than 100.

To Specify Options for Complex Samples General Linear Model Collapse Hide details

This feature requires the Complex Samples option.

From the menus choose:

Analyze
Complex Samples
General Linear Model...

Select a plan file. Optionally, select a custom joint probabilities file.

Click Continue.

In the Complex Samples General Linear Model dialog box, click Options.

Select the desired options.

Related Topics

Complex Samples General Linear Model
Complex Samples General Linear Model Statistics
Complex Samples General Linear Model Estimated Means
Complex Samples General Linear Model Save


CSGLM Command Additional Features

Complex Samples General Linear Model,Complex Samples General Linear Model,Complex Samples General Linear Model
command additional features,command additional features,command additional features

The command syntax language also allows you to:

• Specify custom tests of effects versus a linear combination of effects or a value (using the CUSTOM subcommand).

• Fix covariates at values other than their means when computing estimated marginal means (using the EMMEANS subcommand).

• Specify a metric for polynomial contrasts (using the EMMEANS subcommand).

• Specify a tolerance value for checking singularity (using the CRITERIA subcommand).

• Create user-specified names for saved variables (using the SAVE subcommand).

• Produce a general estimable function table (using the PRINT subcommand).

Related Topics

UNIANOVA Command Additional Features
RELIABILITY Command Additional Features
ALSCAL Command Additional Features
MIXED Command Additional Features
HILOGLINEAR Command Additional Features
CSLOGISTIC Command Additional Features
MVA Command Additional Features
LOGISTIC REGRESSION Command Additional Features
NOMREG Command Additional Features
PROBIT Command Additional Features
NLR Command Additional Features
WLS Command Additional Features
2SLS Command Additional Features
SEASON Command Additional Features
SPECTRA Command Additional Features
CSGLM


Complex Samples Logistic Regression

Complex Samples Logistic Regression,Complex Samples Logistic Regression,Complex Samples Logistic Regression

The Complex Samples Logistic Regression procedure performs logistic regression analysis on a binary or multinomial dependent variable for samples drawn by complex sampling methods. Optionally, you can request analyses for a subpopulation.

Example. A loan officer has collected past records of customers given loans at several different branches, according to a complex design. While incorporating the sample design, the officer wants to see if the probability with which a customer defaults is related to age, employment history, and amount of credit debt.

Statistics. The procedure produces estimates, exponentiated estimates, standard errors, confidence intervals, t tests, design effects, and square roots of design effects for model parameters, as well as the correlations and covariances between parameter estimates. Pseudo R2 statistics, classification tables, and descriptive statistics for the dependent and independent variables are also available.

Show me

Complex Samples Logistic Regression Data Considerations Collapse Hide details

Data. The dependent variable is categorical. Factors are categorical. Covariates are quantitative variables that are related to the dependent variable. Subpopulation variables can be string or numeric but should be categorical.

Assumptions. The cases in the data file represent a sample from a complex design that should be analyzed according to the specifications in the file selected in the Complex Samples Plan dialog box.

Obtaining Complex Samples Logistic Regression Collapse Hide details

Obtaining Complex Samples Logistic Regression

This feature requires the Complex Samples option.

From the menus choose:

Analyze
Complex Samples
Logistic Regression...

Select a plan file. Optionally, select a custom joint probabilities file.

Click Continue.

Select a dependent variable.

Optionally, you can:

• Select variables for factors and covariates, as appropriate for your data.

• Specify a variable to define a subpopulation. The analysis is performed only for the selected category of the subpopulation variable.

This procedure pastes CSLOGISTIC command syntax.

See CSLOGISTIC Algorithms for computational details for this procedure.

Related Topics

CSLOGISTIC
Complex Samples Logistic Regression Reference Category
Complex Samples Logistic Regression Statistics
Complex Samples Logistic Regression Odds Ratios
Complex Samples Logistic Regression Save
Complex Samples Logistic Regression Options
Complex Samples Model
Complex Samples Hypothesis Tests


Complex Samples Logistic Regression Reference Category

Complex Samples Logistic Regression,Complex Samples Logistic Regression,Complex Samples Logistic Regression
reference category,reference category,reference category
reference category,reference category,reference category
in Complex Samples Logistic Regression,in Complex Samples Logistic Regression,in Complex Samples Logistic Regression

By default, the Complex Samples Logistic Regression procedure makes the highest-valued category the reference category. This dialog box allows you to specify the highest value, the lowest value, or a custom category as the reference category.

To Specify a Reference Category for Complex Samples Logistic Regression Collapse Hide details

This feature requires the Complex Samples option.

From the menus choose:

Analyze
Complex Samples
Logistic Regression...

Select a plan file. Optionally, select a custom joint probabilities file.

Click Continue.

In the Complex Samples Logistic Regression dialog box, select a dependent variable and click Reference Category.

Specify which level of the dependent variable should be considered the reference category.

Related Topics

Complex Samples Logistic Regression
Complex Samples Logistic Regression Statistics
Complex Samples Logistic Regression Odds Ratios
Complex Samples Logistic Regression Save
Complex Samples Logistic Regression Options


Complex Samples Logistic Regression Statistics

Complex Samples Logistic Regression,Complex Samples Logistic Regression,Complex Samples Logistic Regression
statistics,statistics,statistics
parameter estimates,parameter estimates,parameter estimates
in Complex Samples Logistic Regression,in Complex Samples Logistic Regression,in Complex Samples Logistic Regression
standard error,standard error,standard error
in Complex Samples Logistic Regression,in Complex Samples Logistic Regression,in Complex Samples Logistic Regression
confidence intervals,confidence intervals,confidence intervals
in Complex Samples Logistic Regression,in Complex Samples Logistic Regression,in Complex Samples Logistic Regression
t test,t test,t test
in Complex Samples Logistic Regression,in Complex Samples Logistic Regression,in Complex Samples Logistic Regression
covariances of parameter estimates,covariances of parameter estimates,covariances of parameter estimates
in Complex Samples Logistic Regression,in Complex Samples Logistic Regression,in Complex Samples Logistic Regression
design effect,design effect,design effect
in Complex Samples Logistic Regression,in Complex Samples Logistic Regression,in Complex Samples Logistic Regression
pseudo R2 statistics,pseudo R2 statistics,pseudo R2 statistics
in Complex Samples Logistic Regression,in Complex Samples Logistic Regression,in Complex Samples Logistic Regression
classification tables,classification tables,classification tables
in Complex Samples Logistic Regression,in Complex Samples Logistic Regression,in Complex Samples Logistic Regression
correlations of parameter estimates,correlations of parameter estimates,correlations of parameter estimates
in Complex Samples Logistic Regression,in Complex Samples Logistic Regression,in Complex Samples Logistic Regression
square root of design effect,square root of design effect,square root of design effect
in Complex Samples Logistic Regression,in Complex Samples Logistic Regression,in Complex Samples Logistic Regression

Model Fit. Controls the display of statistics that measure the overall model performance.

• Pseudo R-square. The R2 statistic from linear regression does not have an exact counterpart among logistic regression models. There are, instead, multiple measures that attempt to mimic the properties of the R2 statistic.

• Classification table. Displays the tabulated cross-classifications of the observed category by the model-predicted category on the dependent variable.

Parameters. This group allows you to control the display of statistics related to the model parameters.

• Estimate. Displays estimates of the coefficients.

• Exponentiated estimate. Displays the base of the natural logarithm raised to the power of the estimates of the coefficients. While the estimate has nice properties for statistical testing, the exponentiated estimate, or exp(B), is easier to interpret.

• Standard error. Displays the standard error for each coefficient estimate.

• Confidence interval. Displays a confidence interval for each coefficient estimate. The confidence level for the interval is set in the Options dialog box.

• T test. Displays a t test of each coefficient estimate. The null hypothesis for each test is that the value of the coefficient is 0.

• Covariances of parameter estimates. Displays an estimate of the covariance matrix for the model coefficients.

• Correlations of parameter estimates. Displays an estimate of the correlation matrix for the model coefficients.

• Design effect. The ratio of the variance of the estimate to the variance obtained by assuming that the sample is a simple random sample. This is a measure of the effect of specifying a complex design, where values further from 1 indicate greater effects.

• Square root of design effect. This is a measure of the effect of specifying a complex design, where values further from 1 indicate greater effects.

Summary statistics for model variables. Displays summary information about the dependent variable, covariates, and factors.

Sample design information. Displays summary information about the sample, including the unweighted count and the population size.

To Obtain Statistics for Complex Samples Logistic Regression Collapse Hide details

This feature requires the Complex Samples option.

From the menus choose:

Analyze
Complex Samples
Logistic Regression...

Select a plan file. Optionally, select a custom joint probabilities file.

Click Continue.

In the Complex Samples Logistic Regression dialog box, click Statistics.

Select the statistics that you want to display.

Related Topics

Complex Samples Logistic Regression
Complex Samples Logistic Regression Reference Category
Complex Samples Logistic Regression Odds Ratios
Complex Samples Logistic Regression Save
Complex Samples Logistic Regression Options


Complex Samples Logistic Regression Odds Ratios

Complex Samples Logistic Regression,Complex Samples Logistic Regression,Complex Samples Logistic Regression
odds ratios,odds ratios,odds ratios
odds ratios,odds ratios,odds ratios
in Complex Samples Logistic Regression,in Complex Samples Logistic Regression,in Complex Samples Logistic Regression

The Odds Ratios dialog box allows you to display the model-estimated odds ratios for specified factors and covariates. A separate set of odds ratios is computed for each category of the dependent variable except the reference category.

Factors. For each selected factor, displays the ratio of the odds at each category of the factor to the odds at the specified reference category.

Covariates. For each selected covariate, displays the ratio of the odds at the covariate's mean value plus the specified units of change to the odds at the mean.

When computing odds ratios for a factor or covariate, the procedure fixes all other factors at their highest levels and all other covariates at their means. If a factor or covariate interacts with other predictors in the model, then the odds ratios depend not only on the change in the specified variable but also on the values of the variables with which it interacts. If a specified covariate interacts with itself in the model (for example, age*age), then the odds ratios depend on both the change in the covariate and the value of the covariate.

To Obtain Odds Ratios for Complex Samples Logistic Regression Collapse Hide details

This feature requires the Complex Samples option.

From the menus choose:

Analyze
Complex Samples
Logistic Regression...

Select a plan file. Optionally, select a custom joint probabilities file.

Click Continue.

In the Complex Samples Logistic Regression dialog box, select at least one factor or covariate and click Odds Ratios.

Choose the factors and covariates for which you want to produce odds ratios.

Optionally, you can set the reference category for factors and specify the units of change for covariates.

Related Topics

Complex Samples Logistic Regression
Complex Samples Logistic Regression Reference Category
Complex Samples Logistic Regression Statistics
Complex Samples Logistic Regression Save
Complex Samples Logistic Regression Options


Complex Samples Logistic Regression Save

Complex Samples Logistic Regression,Complex Samples Logistic Regression,Complex Samples Logistic Regression
save variables,save variables,save variables
predicted categories,predicted categories,predicted categories
in Complex Samples Logistic Regression,in Complex Samples Logistic Regression,in Complex Samples Logistic Regression
predicted probability,predicted probability,predicted probability
in Complex Samples Logistic Regression,in Complex Samples Logistic Regression,in Complex Samples Logistic Regression

Save Variables. This group allows you to save the model-predicted category and predicted probabilities as new variables in the active dataset.

Export model as PASW Statistics data. Writes a dataset in PASW Statistics format containing the parameter correlation or covariance matrix with parameter estimates, standard errors, significance values, and degrees of freedom. The order of variables in the matrix file is as follows.

• rowtype_. Takes values (and value labels), COV (Covariances), CORR (Correlations), EST (Parameter estimates), SE (Standard errors), SIG (Significance levels), and DF (Sampling design degrees of freedom). There is a separate case with row type COV (or CORR) for each model parameter, plus a separate case for each of the other row types.

• varname_. Takes values P1, P2, ..., corresponding to an ordered list of all model parameters, for row types COV or CORR, with value labels corresponding to the parameter strings shown in the parameter estimates table. The cells are blank for other row types.

• P1, P2, ... These variables correspond to an ordered list of all model parameters, with variable labels corresponding to the parameter strings shown in the parameter estimates table, and take values according to the row type. For redundant parameters, all covariances are set to zero; correlations are set to the system-missing value; all parameter estimates are set at zero; and all standard errors, significance levels, and residual degrees of freedom are set to the system-missing value.

Note: This file is not immediately usable for further analyses in other procedures that read a matrix file unless those procedures accept all the row types exported here.

Export Model as XML. Saves the parameter estimates and the parameter covariance matrix, if selected, in XML (PMML) format. SmartScore and PASW Statistics Server (a separate product) can use this model file to apply the model information to other data files for scoring purposes.

To Save Variables in Complex Samples Logistic Regression Collapse Hide details

This feature requires the Complex Samples option.

From the menus choose:

Analyze
Complex Samples
Logistic Regression...

Select a plan file. Optionally, select a custom joint probabilities file.

Click Continue.

In the Complex Samples Logistic Regression dialog box, click Save.

Select the variables that you want to save.

Related Topics

Complex Samples Logistic Regression
Complex Samples Logistic Regression Reference Category
Complex Samples Logistic Regression Statistics
Complex Samples Logistic Regression Odds Ratios
Complex Samples Logistic Regression Options


Complex Samples Logistic Regression Options

Complex Samples Logistic Regression,Complex Samples Logistic Regression,Complex Samples Logistic Regression
options,options,options
iterations,iterations,iterations
in Complex Samples Logistic Regression,in Complex Samples Logistic Regression,in Complex Samples Logistic Regression
step-halving,step-halving,step-halving
in Complex Samples Logistic Regression,in Complex Samples Logistic Regression,in Complex Samples Logistic Regression
parameter convergence,parameter convergence,parameter convergence
in Complex Samples Logistic Regression,in Complex Samples Logistic Regression,in Complex Samples Logistic Regression
likelihood convergence,likelihood convergence,likelihood convergence
in Complex Samples Logistic Regression,in Complex Samples Logistic Regression,in Complex Samples Logistic Regression
separation,separation,separation
in Complex Samples Logistic Regression,in Complex Samples Logistic Regression,in Complex Samples Logistic Regression
iteration history,iteration history,iteration history
in Complex Samples Logistic Regression,in Complex Samples Logistic Regression,in Complex Samples Logistic Regression
missing values,missing values,missing values
in Complex Samples Logistic Regression,in Complex Samples Logistic Regression,in Complex Samples Logistic Regression
confidence level,confidence level,confidence level
in Complex Samples Logistic Regression,in Complex Samples Logistic Regression,in Complex Samples Logistic Regression

Estimation. This group gives you control of various criteria used in the model estimation.

• Maximum Iterations. The maximum number of iterations the algorithm will execute. Specify a non-negative integer.

• Maximum Step-Halving. At each iteration, the step size is reduced by a factor of 0.5 until the log-likelihood increases or maximum step-halving is reached. Specify a positive integer.

• Limit iterations based on change in parameter estimates. When selected, the algorithm stops after an iteration in which the absolute or relative change in the parameter estimates is less than the value specified, which must be non-negative.

• Limit iterations based on change in log-likelihood. When selected, the algorithm stops after an iteration in which the absolute or relative change in the log-likelihood function is less than the value specified, which must be non-negative.

• Check for complete separation of data points. When selected, the algorithm performs tests to ensure that the parameter estimates have unique values. Separation occurs when the procedure can produce a model that correctly classifies every case.

• Display iteration history. Displays parameter estimates and statistics at every n iterations beginning with the 0th iteration (the initial estimates). If you choose to print the iteration history, the last iteration is always printed regardless of the value of n.

User-Missing Values. All design variables, as well as the dependent variable and any covariates, must have valid data. Cases with invalid data for any of these variables are deleted from the analysis. These controls allow you to decide whether user-missing values are treated as valid among the strata, cluster, subpopulation, and factor variables.

Confidence Interval. This is the confidence interval level for coefficient estimates, exponentiated coefficient estimates, and odds ratios. Specify a value greater than or equal to 50 and less than 100.

How To Specify Options for Complex Samples Logistic Regression Collapse Hide details

This feature requires the Complex Samples option.

From the menus choose:

Analyze
Complex Samples
Logistic Regression...

Select a plan file. Optionally, select a custom joint probabilities file.

Click Continue.

In the Complex Samples Logistic Regression dialog box, click Options.

Select the desired options.

Related Topics

Complex Samples Logistic Regression
Complex Samples Logistic Regression Reference Category
Complex Samples Logistic Regression Statistics
Complex Samples Logistic Regression Odds Ratios
Complex Samples Logistic Regression Save


CSLOGISTIC Command Additional Features

Complex Samples Logistic Regression,Complex Samples Logistic Regression,Complex Samples Logistic Regression
command additional features,command additional features,command additional features

The command syntax language also allows you to:

• Specify custom tests of effects versus a linear combination of effects or a value (using the CUSTOM subcommand).

• Fix values of other model variables when computing odds ratios for factors and covariates (using the ODDSRATIOS subcommand).

• Specify a tolerance value for checking singularity (using the CRITERIA subcommand).

• Create user-specified names for saved variables (using the SAVE subcommand).

• Produce a general estimable function table (using the PRINT subcommand).

Related Topics

UNIANOVA Command Additional Features
RELIABILITY Command Additional Features
ALSCAL Command Additional Features
MIXED Command Additional Features
HILOGLINEAR Command Additional Features
CSGLM Command Additional Features
MVA Command Additional Features
LOGISTIC REGRESSION Command Additional Features
NOMREG Command Additional Features
PROBIT Command Additional Features
NLR Command Additional Features
WLS Command Additional Features
2SLS Command Additional Features
SEASON Command Additional Features
SPECTRA Command Additional Features
CSLOGISTIC


Complex Samples Ordinal Regression

Complex Samples Ordinal Regression,Complex Samples Ordinal Regression,Complex Samples Ordinal Regression

The Complex Samples Ordinal Regression procedure performs regression analysis on a binary or ordinal dependent variable for samples drawn by complex sampling methods. Optionally, you can request analyses for a subpopulation.

Example. Representatives considering a bill before the legislature are interested in whether there is public support for the bill and how support for the bill is related to voter demographics. Pollsters design and conduct interviews according to a complex sampling design. Using Complex Samples Ordinal Regression, you can fit a model for the level of support for the bill based upon voter demographics.

Show me

Complex Samples Ordinal Regression Data Considerations Collapse Hide details

Data. The dependent variable is ordinal. Factors are categorical. Covariates are quantitative variables that are related to the dependent variable. Subpopulation variables can be string or numeric but should be categorical.

Assumptions. The cases in the data file represent a sample from a complex design that should be analyzed according to the specifications in the file selected in the Complex Samples Plan dialog box.

Obtaining Complex Samples Ordinal Regression Collapse Hide details

Obtaining Complex Samples Ordinal Regression

This feature requires the Complex Samples option.

From the menus choose:

Analyze
Complex Samples
Ordinal Regression...

Select a plan file. Optionally, select a custom joint probabilities file.

Click Continue.

Expand Show details Collapse Hide details
Ordinal Regression dialog box

Select a dependent variable.

Optionally, you can:

• Select variables for factors and covariates, as appropriate for your data.

• Specify a variable to define a subpopulation. The analysis is performed only for the selected category of the subpopulation variable, although variances are still properly estimated based on the entire dataset.

• Select a link function.

Link function. The link function is a transformation of the cumulative probabilities that allows estimation of the model. Five link functions are available, summarized in the following table.

Function | Form | Typical application
Logit | log( x / (1−x) ) | Evenly distributed categories
Complementary log-log | log(−log(1−x)) | Higher categories more probable
Negative log-log | −log(−log(x)) | Lower categories more probable
Probit | F−1(x) | Latent variable is normally distributed
Cauchit (inverse Cauchy) | tan(π(x−0.5)) | Latent variable has many extreme values

This procedure pastes CSORDINAL command syntax.

See CSORDINAL Algorithms for computational details for this procedure.

Related Topics

Complex Samples Ordinal Regression Response Probabilities
Complex Samples Ordinal Regression Model
Complex Samples Ordinal Regression Statistics
Complex Samples Ordinal Regression Odds Ratios
Complex Samples Ordinal Regression Save
Complex Samples Ordinal Regression Options
CSORDINAL Command Additional Features
CSORDINAL
Complex Samples Hypothesis Tests


Complex Samples Ordinal Regression Response Probabilities

Complex Samples Ordinal Regression,Complex Samples Ordinal Regression,Complex Samples Ordinal Regression
response probabilities,response probabilities,response probabilities
response probabilities,response probabilities,response probabilities
in Complex Samples Ordinal Regression,in Complex Samples Ordinal Regression,in Complex Samples Ordinal Regression
Expand Show details Collapse Hide details
Ordinal Regression Response Probabilities dialog box

The Response Probabilities dialog box allows you to specify whether the cumulative probability of a response (that is, the probability of belonging up to and including a particular category of the dependent variable) increases with increasing or decreasing values of the dependent variable.

How To Specify the Order of Response Probabilities for Complex Samples Ordinal Regression Collapse Hide details

This feature requires the Complex Samples option.

From the menus choose:

Analyze
Complex Samples
Ordinal Regression...

Select a plan file. Optionally, select a custom joint probabilities file.

Click Continue.

In the Complex Samples Ordinal Regression dialog box, select a dependent variable and click Response Probabilities.

Specify whether cumulative response probabilities increase with increasing or decreasing values of the dependent variable.

Related Topics

Complex Samples Ordinal Regression
Complex Samples Ordinal Regression Model
Complex Samples Ordinal Regression Statistics
Complex Samples Ordinal Regression Odds Ratios
Complex Samples Ordinal Regression Save
Complex Samples Ordinal Regression Options
CSORDINAL Command Additional Features


Complex Samples Ordinal Regression Model

Complex Samples Ordinal Regression,Complex Samples Ordinal Regression,Complex Samples Ordinal Regression
model,model,model
Expand Show details Collapse Hide details
Ordinal Regression Model dialog box

Specify Model Effects. By default, the procedure builds a main-effects model using the factors and covariates specified in the main dialog box. Alternatively, you can build a custom model that includes interaction effects and nested terms.

Non-Nested Terms

For the selected factors and covariates:

Interaction. Creates the highest-level interaction term for all selected variables.

Main effects. Creates a main-effects term for each variable selected.

All 2-way. Creates all possible two-way interactions of the selected variables.

All 3-way. Creates all possible three-way interactions of the selected variables.

All 4-way. Creates all possible four-way interactions of the selected variables.

All 5-way. Creates all possible five-way interactions of the selected variables.

Specifying Non-Nested Build Terms Collapse Hide details

From the menus choose:

Analyze
Complex Samples
General Linear Model...

... or Logistic Regression or Ordinal Regression.

Select a plan file. Optionally, select a custom joint probabilities file.

Click Continue.

In the main dialog box, select factors and covariates and click Model.

Select Custom.

Select one or more factors or covariates or a combination of factors and covariates.

Select a method for building the terms from the Type drop-down list and add them to the model.

Repeat the process until you have all of the terms that you want in the model.

Nested Terms

You can build nested terms for your model in this procedure. Nested terms are useful for modeling the effect of a factor or covariate whose values do not interact with the levels of another factor. For example, a grocery store chain may follow the spending habits of its customers at several store locations. Since each customer frequents only one of these locations, the Customer effect can be said to be nested within the Store location effect.

Additionally, you can include interaction effects, such as polynomial terms involving the same covariate, or add multiple levels of nesting to the nested term.

Limitations. Nested terms have the following restrictions:

• All factors within an interaction must be unique. Thus, if A is a factor, then specifying A*A is invalid.

• All factors within a nested effect must be unique. Thus, if A is a factor, then specifying A(A) is invalid.

• No effect can be nested within a covariate. Thus, if A is a factor and X is a covariate, then specifying A(X) is invalid.

Specifying Nested Build Terms Collapse Hide details

From the menus choose:

Analyze
Complex Samples
General Linear Model...

... or Logistic Regression or Ordinal Regression.

Select a plan file. Optionally, select a custom joint probabilities file.

Click Continue.

In the main dialog box, select factors and covariates and click Model.

Select Custom.

Select a factor or covariate that is nested within another factor, and then click the move button.

Click Nesting.

Select the factor within which the previous factor or covariate is nested, and then click the move button.

Click Add to Model.

Optionally, you can include interaction effects or add multiple levels of nesting to the nested term.

Related Topics

Complex Samples Ordinal Regression
Complex Samples Ordinal Regression Response Probabilities
Complex Samples Ordinal Regression Statistics
Complex Samples Ordinal Regression Odds Ratios
Complex Samples Ordinal Regression Save
Complex Samples Ordinal Regression Options
CSORDINAL Command Additional Features


Complex Samples Ordinal Regression Statistics

Complex Samples Ordinal Regression,Complex Samples Ordinal Regression,Complex Samples Ordinal Regression
statistics,statistics,statistics
parameter estimates,parameter estimates,parameter estimates
in Complex Samples Ordinal Regression,in Complex Samples Ordinal Regression,in Complex Samples Ordinal Regression
standard error,standard error,standard error
in Complex Samples Ordinal Regression,in Complex Samples Ordinal Regression,in Complex Samples Ordinal Regression
confidence intervals,confidence intervals,confidence intervals
in Complex Samples Ordinal Regression,in Complex Samples Ordinal Regression,in Complex Samples Ordinal Regression
t test,t test,t test
in Complex Samples Ordinal Regression,in Complex Samples Ordinal Regression,in Complex Samples Ordinal Regression
covariances of parameter estimates,covariances of parameter estimates,covariances of parameter estimates
in Complex Samples Ordinal Regression,in Complex Samples Ordinal Regression,in Complex Samples Ordinal Regression
design effect,design effect,design effect
in Complex Samples Ordinal Regression,in Complex Samples Ordinal Regression,in Complex Samples Ordinal Regression
pseudo R2 statistics,pseudo R2 statistics,pseudo R2 statistics
in Complex Samples Ordinal Regression,in Complex Samples Ordinal Regression,in Complex Samples Ordinal Regression
classification tables,classification tables,classification tables
in Complex Samples Ordinal Regression,in Complex Samples Ordinal Regression,in Complex Samples Ordinal Regression
correlations of parameter estimates,correlations of parameter estimates,correlations of parameter estimates
in Complex Samples Ordinal Regression,in Complex Samples Ordinal Regression,in Complex Samples Ordinal Regression
square root of design effect,square root of design effect,square root of design effect
in Complex Samples Ordinal Regression,in Complex Samples Ordinal Regression,in Complex Samples Ordinal Regression
test of parallel lines,test of parallel lines,test of parallel lines
in Complex Samples Ordinal Regression,in Complex Samples Ordinal Regression,in Complex Samples Ordinal Regression
Expand Show details Collapse Hide details
Ordinal Regression Statistics dialog box

Model Fit. Controls the display of statistics that measure the overall model performance.

• Pseudo R-square. The R2 statistic from linear regression does not have an exact counterpart among ordinal regression models. There are, instead, multiple measures that attempt to mimic the properties of the R2 statistic.

• Classification table. Displays the tabulated cross-classifications of the observed category by the model-predicted category on the dependent variable.

Parameters. This group allows you to control the display of statistics related to the model parameters.

• Estimate. Displays estimates of the coefficients.

• Exponentiated estimate. Displays the base of the natural logarithm raised to the power of the estimates of the coefficients. While the estimate has nice properties for statistical testing, the exponentiated estimate, or exp(B), is easier to interpret.

• Standard error. Displays the standard error for each coefficient estimate.

• Confidence interval. Displays a confidence interval for each coefficient estimate. The confidence level for the interval is set in the Options dialog box.

• T test. Displays a t test of each coefficient estimate. The null hypothesis for each test is that the value of the coefficient is 0.

• Covariances of parameter estimates. Displays an estimate of the covariance matrix for the model coefficients.

• Correlations of parameter estimates. Displays an estimate of the correlation matrix for the model coefficients.

• Design effect. The ratio of the variance of the estimate to the variance obtained by assuming that the sample is a simple random sample. This is a measure of the effect of specifying a complex design, where values further from 1 indicate greater effects.

• Square root of design effect. This is a measure, expressed in units comparable to those of the standard error, of the effect of specifying a complex design, where values further from 1 indicate greater effects.

Parallel Lines. This group allows you to request statistics associated with a model with nonparallel lines where a separate regression line is fitted for each response category (except the last).

• Wald test. Produces a test of the null hypothesis that regression parameters are equal for all cumulative responses. The model with nonparallel lines is estimated and the Wald test of equal parameters is applied.

• Parameter estimates. Displays estimates of the coefficients and standard errors for the model with nonparallel lines.

• Covariances of parameter estimates. Displays an estimate of the covariance matrix for the coefficients of the model with nonparallel lines.

Summary statistics for model variables. Displays summary information about the dependent variable, covariates, and factors.

Sample design information. Displays summary information about the sample, including the unweighted count and the population size.

To Obtain Statistics for Complex Samples Ordinal Regression Collapse Hide details

This feature requires the Complex Samples option.

From the menus choose:

Analyze
Complex Samples
Ordinal Regression...

Select a plan file. Optionally, select a custom joint probabilities file.

Click Continue.

In the Complex Samples Ordinal Regression dialog box, click Statistics.

Select the statistics that you want to display.

Related Topics

Complex Samples Ordinal Regression
Complex Samples Ordinal Regression Response Probabilities
Complex Samples Ordinal Regression Model
Complex Samples Ordinal Regression Odds Ratios
Complex Samples Ordinal Regression Save
Complex Samples Ordinal Regression Options
CSORDINAL Command Additional Features


Complex Samples Ordinal Regression Odds Ratios

Complex Samples Ordinal Regression,Complex Samples Ordinal Regression,Complex Samples Ordinal Regression
odds ratios,odds ratios,odds ratios
odds ratios,odds ratios,odds ratios
in Complex Samples Ordinal Regression,in Complex Samples Ordinal Regression,in Complex Samples Ordinal Regression
Expand Show details Collapse Hide details
Ordinal Regression Odds Ratios dialog box

The Odds Ratios dialog box allows you to display the model-estimated cumulative odds ratios for specified factors and covariates. This feature is only available for models using the Logit link function. A single cumulative odds ratio is computed for all categories of the dependent variable except the last; the proportional odds model postulates that they are all equal.

Factors. For each selected factor, displays the ratio of the cumulative odds at each category of the factor to the odds at the specified reference category.

Covariates. For each selected covariate, displays the ratio of the cumulative odds at the covariate's mean value plus the specified units of change to the odds at the mean.

When computing odds ratios for a factor or covariate, the procedure fixes all other factors at their highest levels and all other covariates at their means. If a factor or covariate interacts with other predictors in the model, then the odds ratios depend not only on the change in the specified variable but also on the values of the variables with which it interacts. If a specified covariate interacts with itself in the model (for example, age*age), then the odds ratios depend on both the change in the covariate and the value of the covariate.

To Obtain Odds Ratios for Complex Samples Ordinal Regression Collapse Hide details

This feature requires the Complex Samples option.

From the menus choose:

Analyze
Complex Samples
Ordinal Regression...

Select a plan file. Optionally, select a custom joint probabilities file.

Click Continue.

In the Complex Samples Ordinal Regression dialog box, select at least one factor or covariate and click Odds Ratios.

Choose the factors and covariates for which you want to produce odds ratios.

Optionally, you can set the reference category for factors and specify the units of change for covariates.

Related Topics

Complex Samples Ordinal Regression
Complex Samples Ordinal Regression Response Probabilities
Complex Samples Ordinal Regression Model
Complex Samples Ordinal Regression Statistics
Complex Samples Ordinal Regression Save
Complex Samples Ordinal Regression Options
CSORDINAL Command Additional Features


Complex Samples Ordinal Regression Save

Complex Samples Ordinal Regression,Complex Samples Ordinal Regression,Complex Samples Ordinal Regression
save variables,save variables,save variables
predicted categories,predicted categories,predicted categories
in Complex Samples Ordinal Regression,in Complex Samples Ordinal Regression,in Complex Samples Ordinal Regression
cumulative probabilities,cumulative probabilities,cumulative probabilities
in Complex Samples Ordinal Regression,in Complex Samples Ordinal Regression,in Complex Samples Ordinal Regression
predicted probability,predicted probability,predicted probability
in Complex Samples Ordinal Regression,in Complex Samples Ordinal Regression,in Complex Samples Ordinal Regression
Expand Show details Collapse Hide details
Ordinal Regression Save dialog box

Save Variables. This group allows you to save the model-predicted category, probability of predicted category, probability of observed category, cumulative probabilities, and predicted probabilities as new variables in the active dataset.

Export model as PASW Statistics data. Writes a dataset in PASW Statistics format containing the parameter correlation or covariance matrix with parameter estimates, standard errors, significance values, and degrees of freedom. The order of variables in the matrix file is as follows.

• rowtype_. Takes values (and value labels), COV (Covariances), CORR (Correlations), EST (Parameter estimates), SE (Standard errors), SIG (Significance levels), and DF (Sampling design degrees of freedom). There is a separate case with row type COV (or CORR) for each model parameter, plus a separate case for each of the other row types.

• varname_. Takes values P1, P2, ..., corresponding to an ordered list of all model parameters, for row types COV or CORR, with value labels corresponding to the parameter strings shown in the parameter estimates table. The cells are blank for other row types.

• P1, P2, ... These variables correspond to an ordered list of all model parameters, with variable labels corresponding to the parameter strings shown in the parameter estimates table, and take values according to the row type. For redundant parameters, all covariances are set to zero; correlations are set to the system-missing value; all parameter estimates are set at zero; and all standard errors, significance levels, and residual degrees of freedom are set to the system-missing value.

Note: This file is not immediately usable for further analyses in other procedures that read a matrix file unless those procedures accept all the row types exported here.

Export model as XML. Saves the parameter estimates and the parameter covariance matrix, if selected, in XML (PMML) format. SmartScore and PASW Statistics Server (a separate product) can use this model file to apply the model information to other data files for scoring purposes.

To Save Variables in Complex Samples Ordinal Regression Collapse Hide details

This feature requires the Complex Samples option.

From the menus choose:

Analyze
Complex Samples
Ordinal Regression...

Select a plan file. Optionally, select a custom joint probabilities file.

Click Continue.

In the Complex Samples Ordinal Regression dialog box, click Save.

Select the variables that you want to save.

Related Topics

Complex Samples Ordinal Regression
Complex Samples Ordinal Regression Response Probabilities
Complex Samples Ordinal Regression Model
Complex Samples Ordinal Regression Statistics
Complex Samples Ordinal Regression Odds Ratios
Complex Samples Ordinal Regression Options
CSORDINAL Command Additional Features


Complex Samples Ordinal Regression Options

Complex Samples Ordinal Regression,Complex Samples Ordinal Regression,Complex Samples Ordinal Regression
options,options,options
Newton-Raphson method,Newton-Raphson method,Newton-Raphson method
in Complex Samples Ordinal Regression,in Complex Samples Ordinal Regression,in Complex Samples Ordinal Regression
Fisher scoring,Fisher scoring,Fisher scoring
in Complex Samples Ordinal Regression,in Complex Samples Ordinal Regression,in Complex Samples Ordinal Regression
iterations,iterations,iterations
in Complex Samples Ordinal Regression,in Complex Samples Ordinal Regression,in Complex Samples Ordinal Regression
step-halving,step-halving,step-halving
in Complex Samples Ordinal Regression,in Complex Samples Ordinal Regression,in Complex Samples Ordinal Regression
parameter convergence,parameter convergence,parameter convergence
in Complex Samples Ordinal Regression,in Complex Samples Ordinal Regression,in Complex Samples Ordinal Regression
likelihood convergence,likelihood convergence,likelihood convergence
in Complex Samples Ordinal Regression,in Complex Samples Ordinal Regression,in Complex Samples Ordinal Regression
separation,separation,separation
in Complex Samples Ordinal Regression,in Complex Samples Ordinal Regression,in Complex Samples Ordinal Regression
iteration history,iteration history,iteration history
in Complex Samples Ordinal Regression,in Complex Samples Ordinal Regression,in Complex Samples Ordinal Regression
missing values,missing values,missing values
in Complex Samples Ordinal Regression,in Complex Samples Ordinal Regression,in Complex Samples Ordinal Regression
confidence level,confidence level,confidence level
in Complex Samples Ordinal Regression,in Complex Samples Ordinal Regression,in Complex Samples Ordinal Regression
Expand Show details Collapse Hide details
Ordinal Regression Options dialog box

Estimation Method. You can select a parameter estimation method; choose between Newton-Raphson, Fisher scoring, or a hybrid method in which Fisher scoring iterations are performed before switching to the Newton-Raphson method. If convergence is achieved during the Fisher scoring phase of the hybrid method before the maximum number of Fisher iterations is reached, the algorithm continues with the Newton-Raphson method.

Estimation. This group gives you control of various criteria used in the model estimation.

• Maximum Iterations. The maximum number of iterations the algorithm will execute. Specify a non-negative integer.

• Maximum Step-Halving. At each iteration, the step size is reduced by a factor of 0.5 until the log-likelihood increases or maximum step-halving is reached. Specify a positive integer.

• Limit iterations based on change in parameter estimates. When selected, the algorithm stops after an iteration in which the absolute or relative change in the parameter estimates is less than the value specified, which must be non-negative.

• Limit iterations based on change in log-likelihood. When selected, the algorithm stops after an iteration in which the absolute or relative change in the log-likelihood function is less than the value specified, which must be non-negative.

• Check for complete separation of data points. When selected, the algorithm performs tests to ensure that the parameter estimates have unique values. Separation occurs when the procedure can produce a model that correctly classifies every case.

• Display iteration history. Displays parameter estimates and statistics at every n iterations beginning with the 0th iteration (the initial estimates). If you choose to print the iteration history, the last iteration is always printed regardless of the value of n.

User-Missing Values. Scale design variables, as well as the dependent variable and any covariates, should have valid data. Cases with invalid data for any of these variables are deleted from the analysis. These controls allow you to decide whether user-missing values are treated as valid among the strata, cluster, subpopulation, and factor variables.

Confidence Interval. This is the confidence interval level for coefficient estimates, exponentiated coefficient estimates, and odds ratios. Specify a value greater than or equal to 50 and less than 100.

How To Specify Options for Complex Samples Ordinal Regression Collapse Hide details

This feature requires the Complex Samples option.

From the menus choose:

Analyze
Complex Samples
Ordinal Regression...

Select a plan file. Optionally select a custom joint probabilities file.

Click Continue.

In the Complex Samples Ordinal Regression dialog box, click Options.

Select the desired options.

Related Topics

Complex Samples Ordinal Regression
Complex Samples Ordinal Regression Response Probabilities
Complex Samples Ordinal Regression Model
Complex Samples Ordinal Regression Statistics
Complex Samples Ordinal Regression Odds Ratios
Complex Samples Ordinal Regression Save
CSORDINAL Command Additional Features


MULTIPLE IMPUTATION Command Additional Features

The command syntax language also allows you to:

• Specify a subset of variables for which descriptive statistics are shown (IMPUTATIONSUMMARIES subcommand).

• Specify both an analysis of missing patterns and imputation in a single run of the procedure.

• Specify the maximum number of model parameters allowed when imputing any variable (MAXMODELPARAM keyword).

Related Topics

Multiple Imputation
Analyze Patterns (Multiple Imputation)
Impute Missing Data Values (Multiple Imputation)
Method (Multiple Imputation)
Constraints (Multiple Imputation)
Output (Multiple Imputation)
Working with Multiple Imputation Data
Analyzing Multiple Imputation Data
MULTIPLE IMPUTATION


Complex Samples Cox Regression

Complex Samples Cox Regression,Complex Samples Cox Regression,Complex Samples Cox Regression
date and time variables,date and time variables,date and time variables
Complex Samples Cox Regression,Complex Samples Cox Regression,Complex Samples Cox Regression
Kaplan-Meier analysis,Kaplan-Meier analysis,Kaplan-Meier analysis

The Complex Samples Cox Regression procedure performs survival analysis for samples drawn by complex sampling methods. Optionally, you can request analyses for a subpopulation.

Examples. A government law enforcement agency is concerned about recidivism rates in their area of jurisdiction. One of the measures of recidivism is the time until second arrest for offenders. The agency would like to model time to rearrest using Cox Regression but are worried the proportional hazards assumption is invalid across age categories. Show me

Medical researchers are investigating survival times for patients exiting a rehabilitation program post-ischemic stroke. There is the potential for multiple cases per subject, since patient histories change as the occurrence of significant nondeath events are noted and the times of these events recorded. The sample is also left-truncated in the sense that the observed survival times are "inflated" by the length of rehabilitation, because while the onset of risk starts at the time of the ischemic stroke, only patients who survive past the rehabilitation program are in the sample. Show me

Complex Samples Cox Regression Data Considerations Collapse Hide details

Survival Time. The procedure applies Cox regression to analysis of survival times—that is, the length of time before the occurrence of an event. There are two ways to specify the survival time, depending upon the start time of the interval:

• Time=0. Commonly, you will have complete information on the start of the interval for each subject and will simply have a variable containing end times (or create a single variable with end times from Date & Time variables; see below).

• Varies by subject. This is appropriate when you have left-truncation, also called delayed entry; for example, if you are analyzing survival times for patients exiting a rehabilitation program post-stroke, you might consider that their onset of risk starts at the time of the stroke. However, if your sample only includes patients who have survived the rehabilitation program, then your sample is left-truncated in the sense that the observed survival times are "inflated" by the length of rehabilitation. You can account for this by specifying the time at which they exited rehabilitation as the time of entry into the study.

Date & Time Variables. Date & Time variables cannot be used to directly define the start and end of the interval; if you have Date & Time variables, you should use them to create variables containing survival times. If there is no left-truncation, simply create a variable containing end times based upon the difference between the date of entry into the study and the observation date. If there is left-truncation, create a variable containing start times, based upon the difference between the date of the start of the study and the date of entry, and a variable containing end times, based upon the difference between the date of the start of the study and the date of observation. See the topic Date and Time Wizard for more information.

Event Status. You need a variable that records whether the subject experienced the event of interest within the interval. Subjects for whom the event has not occurred are right-censored.

Subject Identifier. You can easily incorporate piecewise-constant, time-dependent predictors by splitting the observations for a single subject across multiple cases. For example, if you are analyzing survival times for patients post-stroke, variables representing their medical history should be useful as predictors. Over time, they may experience major medical events that alter their medical history. The following table shows how to structure such a dataset: Patient ID is the subject identifier, End time defines the observed intervals, Status records major medical events, and Prior history of heart attack and Prior history of hemorrhaging are piecewise-constant, time-dependent predictors.

Patient ID | End time | Status | Prior history of heart attack | Prior history of hemorrhaging
1 | 5 | Heart Attack | No | No
1 | 7 | Hemorrhaging | Yes | No
1 | 8 | Died | Yes | Yes
2 | 24 | Died | No | No
3 | 8 | Heart Attack | No | No
3 | 15 | Died | Yes | No

Assumptions. The cases in the data file represent a sample from a complex design that should be analyzed according to the specifications in the file selected in the Complex Samples Plan dialog box.

Typically, Cox regression models assume proportional hazards—that is, the ratio of hazards from one case to another should not vary over time. If this assumption does not hold, you may need to add time-dependent predictors to the model.

Kaplan-Meier Analysis. If you do not select any predictors (or do not enter any selected predictors into the model) and choose the product limit method for computing the baseline survival curve on the Options tab, the procedure performs a Kaplan-Meier type of survival analysis.

To Obtain Complex Samples Cox Regression Collapse Hide details

To Obtain Complex Samples Cox Regression

This feature requires the Complex Samples option.

From the menus choose:

Analyze
Complex Samples
Cox Regression...

Select a plan file. Optionally, select a custom joint probabilities file.

Click Continue.

Specify the survival time by selecting the entry and exit times from the study.

Select an event status variable.

Click Define Event and define at least one event value.

Optionally, you can select a subject identifier.

This procedure pastes CSCOXREG command syntax.

See CSCOXREG Algorithms for computational details for this procedure.

Related Topics

Define Event (Complex Samples Cox Regression)
Predictors (Complex Samples Cox Regression)
Define Time-Dependent Predictor (Complex Samples Cox Regression)
Subgroups (Complex Samples Cox Regression)
Model (Complex Samples Cox Regression)
Statistics (Complex Samples Cox Regression)
Plots (Complex Samples Cox Regression)
Hypothesis Tests (Complex Samples Cox Regression)
Save (Complex Samples Cox Regression)
Export (Complex Samples Cox Regression)
Options (Complex Samples Cox Regression)
CSCOXREG Command Additional Features
CSCOXREG


Define Event (Complex Samples Cox Regression)

Complex Samples Cox Regression,Complex Samples Cox Regression,Complex Samples Cox Regression
define event,define event,define event

Specify the values that indicate a terminal event has occurred.

• Individual value(s). Specify one or more values by entering them into the grid or selecting them from a list of values with defined value labels.

• Range of values. Specify a range of values by entering the minimum and maximum values or selecting values from a list with defined value labels.

How To Define Events Collapse Hide details

This feature requires the Complex Samples option.

From the menus choose:

Analyze
Complex Samples
Cox Regression...

Select a plan file. Optionally, select a custom joint probabilities file and then click Continue.

On the Complex Samples Cox Regression Time and Event tab, select a status variable and click Define Event.

Related Topics

Complex Samples Cox Regression
Predictors (Complex Samples Cox Regression)
Define Time-Dependent Predictor (Complex Samples Cox Regression)
Subgroups (Complex Samples Cox Regression)
Model (Complex Samples Cox Regression)
Statistics (Complex Samples Cox Regression)
Plots (Complex Samples Cox Regression)
Hypothesis Tests (Complex Samples Cox Regression)
Save (Complex Samples Cox Regression)
Export (Complex Samples Cox Regression)
Options (Complex Samples Cox Regression)
CSCOXREG Command Additional Features


Predictors (Complex Samples Cox Regression)

Complex Samples Cox Regression,Complex Samples Cox Regression,Complex Samples Cox Regression
predictors,predictors,predictors

The Predictors tab allows you to specify the factors and covariates used to build model effects.

Factors. Factors are categorical predictors; they can be numeric or string.

Covariates. Covariates are scale predictors; they must be numeric.

Time-Dependent Predictors. There are certain situations in which the proportional hazards assumption does not hold. That is, hazard ratios change across time; the values of one (or more) of your predictors are different at different time points. In such cases, you need to specify time-dependent predictors. See the topic Define Time-Dependent Predictor (Complex Samples Cox Regression) for more information. Time-dependent predictors can be selected as factors or covariates.

How To Specify Predictors Collapse Hide details

This feature requires the Complex Samples option.

From the menus choose:

Analyze
Complex Samples
Cox Regression...

Select a plan file. Optionally, select a custom joint probabilities file and then click Continue.

In the Complex Samples Cox Regression dialog box, click the Predictors tab.

Related Topics

Complex Samples Cox Regression
Define Event (Complex Samples Cox Regression)
Define Time-Dependent Predictor (Complex Samples Cox Regression)
Subgroups (Complex Samples Cox Regression)
Model (Complex Samples Cox Regression)
Statistics (Complex Samples Cox Regression)
Plots (Complex Samples Cox Regression)
Hypothesis Tests (Complex Samples Cox Regression)
Save (Complex Samples Cox Regression)
Export (Complex Samples Cox Regression)
Options (Complex Samples Cox Regression)
CSCOXREG Command Additional Features


Define Time-Dependent Predictor (Complex Samples Cox Regression)

Complex Samples Cox Regression,Complex Samples Cox Regression,Complex Samples Cox Regression
time-dependent predictor,time-dependent predictor,time-dependent predictor
time-dependent predictor,time-dependent predictor,time-dependent predictor
in Complex Samples Cox Regression,in Complex Samples Cox Regression,in Complex Samples Cox Regression

The Define Time-Dependent Predictor dialog box allows you to create a predictor that is dependent upon the built-in time variable, T_. You can use this variable to define time-dependent covariates in two general ways:

• If you want to estimate an extended Cox regression model that allows nonproportional hazards, you can do so by defining your time-dependent predictor as a function of the time variable T_ and the covariate in question. A common example would be the simple product of the time variable and the predictor, but more complex functions can be specified as well.

• Some variables may have different values at different time periods but aren't systematically related to time. In such cases, you need to define a segmented time-dependent predictor, which can be done using logical expressions. Logical expressions take the value 1 if true and 0 if false. Using a series of logical expressions, you can create your time-dependent predictor from a set of measurements. For example, if you have blood pressure measured once a week for the four weeks of your study (identified as BP1 to BP4), you can define your time-dependent predictor as (T_ < 1) * BP1 + (T_ >= 1 & T_ < 2) * BP2 + (T_ >= 2 & T_ < 3) * BP3 + (T_ >= 3 & T_ < 4) * BP4. Notice that exactly one of the terms in parentheses will be equal to 1 for any given case and the rest will all equal 0. In other words, this function means that if time is less than one week, use BP1; if it is more than one week but less than two weeks, use BP2; and so on.

Note: If your segmented, time-dependent predictor is constant within segments, as in the blood pressure example given above, it may be easier for you to specify the piecewise-constant, time-dependent predictor by splitting subjects across multiple cases. See the discussion on Subject Identifiers in Complex Samples Cox Regression for more information.

In the Define Time-Dependent Predictor dialog box, you can use the function-building controls to build the expression for the time-dependent covariate, or you can enter it directly in the Numeric Expression text area. Note that string constants must be enclosed in quotation marks or apostrophes, and numeric constants must be typed in American format, with the dot as the decimal delimiter. The resulting variable is given the name you specify and should be included as a factor or covariate on the Predictors tab.

How To Define Time-Dependent Predictors Collapse Hide details

This feature requires the Complex Samples option.

From the menus choose:

Analyze
Complex Samples
Cox Regression...

Select a plan file. Optionally, select a custom joint probabilities file and then click Continue.

In the Complex Samples Cox Regression dialog box, click the Predictors tab and then click New.

Name the time-dependent predictor.

Create the expression defining the time-dependent predictor.

Related Topics

Complex Samples Cox Regression
Define Event (Complex Samples Cox Regression)
Predictors (Complex Samples Cox Regression)
Subgroups (Complex Samples Cox Regression)
Model (Complex Samples Cox Regression)
Statistics (Complex Samples Cox Regression)
Plots (Complex Samples Cox Regression)
Hypothesis Tests (Complex Samples Cox Regression)
Save (Complex Samples Cox Regression)
Export (Complex Samples Cox Regression)
Options (Complex Samples Cox Regression)
CSCOXREG Command Additional Features


Subgroups (Complex Samples Cox Regression)

Complex Samples Cox Regression,Complex Samples Cox Regression,Complex Samples Cox Regression
subgroups,subgroups,subgroups
baseline strata,baseline strata,baseline strata
in Complex Samples Cox Regression,in Complex Samples Cox Regression,in Complex Samples Cox Regression
subpopulation,subpopulation,subpopulation
in Complex Samples Cox Regression,in Complex Samples Cox Regression,in Complex Samples Cox Regression

Baseline Strata. A separate baseline hazard and survival function is computed for each value of this variable, while a single set of model coefficients is estimated across strata.

Subpopulation Variable. Specify a variable to define a subpopulation. The analysis is performed only for the selected category of the subpopulation variable.

How To Define Subgroups Collapse Hide details

This feature requires the Complex Samples option.

From the menus choose:

Analyze
Complex Samples
Cox Regression...

Select a plan file. Optionally, select a custom joint probabilities file and then click Continue.

In the Complex Samples Cox Regression dialog box, click the Subgroups tab.

Related Topics

Complex Samples Cox Regression
Define Event (Complex Samples Cox Regression)
Predictors (Complex Samples Cox Regression)
Define Time-Dependent Predictor (Complex Samples Cox Regression)
Model (Complex Samples Cox Regression)
Statistics (Complex Samples Cox Regression)
Plots (Complex Samples Cox Regression)
Hypothesis Tests (Complex Samples Cox Regression)
Save (Complex Samples Cox Regression)
Export (Complex Samples Cox Regression)
Options (Complex Samples Cox Regression)
CSCOXREG Command Additional Features


Model (Complex Samples Cox Regression)

Complex Samples Cox Regression,Complex Samples Cox Regression,Complex Samples Cox Regression
model,model,model

Specify Model Effects. By default, the procedure builds a main-effects model using the factors and covariates specified in the main dialog box. Alternatively, you can build a custom model that includes interaction effects and nested terms.

Non-Nested Terms

For the selected factors and covariates:

Interaction. Creates the highest-level interaction term for all selected variables.

Main effects. Creates a main-effects term for each variable selected.

All 2-way. Creates all possible two-way interactions of the selected variables.

All 3-way. Creates all possible three-way interactions of the selected variables.

All 4-way. Creates all possible four-way interactions of the selected variables.

All 5-way. Creates all possible five-way interactions of the selected variables.

Specifying Non-Nested Build Terms Collapse Hide details

This feature requires the Complex Samples option.

From the menus choose:

Analyze
Complex Samples
Cox Regression...

Select a plan file. Optionally, select a custom joint probabilities file and then click Continue.

In the main dialog box, select factors and covariates and click Model.

Select Custom.

Select one or more factors or covariates or a combination of factors and covariates.

Select a method for building the terms from the Type drop-down list and add them to the model.

Repeat the process until you have all of the terms that you want in the model.

Nested Terms

You can build nested terms for your model in this procedure. Nested terms are useful for modeling the effect of a factor or covariate whose values do not interact with the levels of another factor. For example, a grocery store chain may follow the spending habits of its customers at several store locations. Since each customer frequents only one of these locations, the Customer effect can be said to be nested within the Store location effect.

Additionally, you can include interaction effects, such as polynomial terms involving the same covariate, or add multiple levels of nesting to the nested term.

Limitations. Nested terms have the following restrictions:

• All factors within an interaction must be unique. Thus, if A is a factor, then specifying A*A is invalid.

• All factors within a nested effect must be unique. Thus, if A is a factor, then specifying A(A) is invalid.

• No effect can be nested within a covariate. Thus, if A is a factor and X is a covariate, then specifying A(X) is invalid.

Specifying Nested Build Terms Collapse Hide details

From the menus choose:

Analyze
Complex Samples
General Linear Model...

Select a plan file. Optionally, select a custom joint probabilities file and then click Continue.

In the main dialog box, select factors and covariates and click Model.

Select Custom.

Select a factor or covariate that is nested within another factor and then click the move button.

Click Nesting.

Select the factor within which the previous factor or covariate is nested and then click the move button.

Click Add to Model.

Optionally, you can include interaction effects or add multiple levels of nesting to the nested term.

Related Topics

Complex Samples Cox Regression
Define Event (Complex Samples Cox Regression)
Predictors (Complex Samples Cox Regression)
Define Time-Dependent Predictor (Complex Samples Cox Regression)
Subgroups (Complex Samples Cox Regression)
Statistics (Complex Samples Cox Regression)
Plots (Complex Samples Cox Regression)
Hypothesis Tests (Complex Samples Cox Regression)
Save (Complex Samples Cox Regression)
Export (Complex Samples Cox Regression)
Options (Complex Samples Cox Regression)
CSCOXREG Command Additional Features


Statistics (Complex Samples Cox Regression)

Complex Samples Cox Regression,Complex Samples Cox Regression,Complex Samples Cox Regression
statistics,statistics,statistics
sample design information,sample design information,sample design information
in Complex Samples Cox Regression,in Complex Samples Cox Regression,in Complex Samples Cox Regression
parameter estimates,parameter estimates,parameter estimates
in Complex Samples Cox Regression,in Complex Samples Cox Regression,in Complex Samples Cox Regression
test of proportional hazards,test of proportional hazards,test of proportional hazards
in Complex Samples Cox Regression,in Complex Samples Cox Regression,in Complex Samples Cox Regression
design effect,design effect,design effect
in Complex Samples Cox Regression,in Complex Samples Cox Regression,in Complex Samples Cox Regression
square root of design effect,square root of design effect,square root of design effect
in Complex Samples Cox Regression,in Complex Samples Cox Regression,in Complex Samples Cox Regression

Sample design information. Displays summary information about the sample, including the unweighted count and the population size.

Event and censoring summary. Displays summary information about the number and percentage of censored cases.

Risk set at event times. Displays number of events and number at risk for each event time in each baseline stratum.

Parameters. This group allows you to control the display of statistics related to the model parameters.

• Estimate. Displays estimates of the coefficients.

• Exponentiated estimate. Displays the base of the natural logarithm raised to the power of the estimates of the coefficients. While the estimate has nice properties for statistical testing, the exponentiated estimate, or exp(B), is easier to interpret.

• Standard error. Displays the standard error for each coefficient estimate.

• Confidence interval. Displays a confidence interval for each coefficient estimate. The confidence level for the interval is set in the Options dialog box.

• t-test. Displays a t test of each coefficient estimate. The null hypothesis for each test is that the value of the coefficient is 0.

• Covariances of parameter estimates. Displays an estimate of the covariance matrix for the model coefficients.

• Correlations of parameter estimates. Displays an estimate of the correlation matrix for the model coefficients.

• Design effect. The ratio of the variance of the estimate to the variance obtained by assuming that the sample is a simple random sample. This is a measure of the effect of specifying a complex design, where values further from 1 indicate greater effects.

• Square root of design effect. This is a measure of the effect of specifying a complex design, where values further from 1 indicate greater effects.

Model Assumptions. This group allows you to produce a test of the proportional hazards assumption. The test compares the fitted model to an alternative model that includes time-dependent predictors x*_TF for each predictor x, where _TF is the specified time function.

• Time Function. Specifies the form of _TF for the alternative model. For the identity function, _TF=T_. For the log function, _TF=log(T_). For Kaplan-Meier, _TF=1−SKM(T_), where SKM(.) is the Kaplan-Meier estimate of the survival function. For rank, _TF is the rank-order of T_ among the observed end times.

• Parameter estimates for alternative model. Displays the estimate, standard error, and confidence interval for each parameter in the alternative model.

• Covariance matrix for alternative model. Displays the matrix of estimated covariances between parameters in the alternative model.

Baseline survival and cumulative hazard functions. Displays the baseline survival function and baseline cumulative hazards function along with their standard errors.

Note: If time-dependent predictors defined on the Predictors tab are included in the model, this option is not available.

How To Display Statistics Collapse Hide details

This feature requires the Complex Samples option.

From the menus choose:

Analyze
Complex Samples
Cox Regression...

Select a plan file. Optionally, select a custom joint probabilities file and then click Continue.

In the Complex Samples Cox Regression dialog box, click the Statistics tab.

Related Topics

Complex Samples Cox Regression
Define Event (Complex Samples Cox Regression)
Predictors (Complex Samples Cox Regression)
Define Time-Dependent Predictor (Complex Samples Cox Regression)
Subgroups (Complex Samples Cox Regression)
Model (Complex Samples Cox Regression)
Plots (Complex Samples Cox Regression)
Hypothesis Tests (Complex Samples Cox Regression)
Save (Complex Samples Cox Regression)
Export (Complex Samples Cox Regression)
Options (Complex Samples Cox Regression)
CSCOXREG Command Additional Features


Plots (Complex Samples Cox Regression)

Complex Samples Cox Regression,Complex Samples Cox Regression,Complex Samples Cox Regression
plots,plots,plots

The Plots tab allows you to request plots of the hazard function, survival function, log-minus-log of the survival function, and one minus the survival function. You can also choose to plot confidence intervals along the specified functions; the confidence level is set on the Options tab.

Predictor patterns. You can specify a pattern of predictor values to be used for the requested plots and the exported survival file on the Export tab. Note that these options are not available if time-dependent predictors defined on the Predictors tab are included in the model.

• Plot Factors at. By default, each factor is evaluated at its highest level. Enter or select a different level if desired. Alternatively, you can choose to plot separate lines for each level of a single factor by selecting the check box for that factor.

• Plot Covariates at. Each covariate is evaluated at its mean. Enter or select a different value if desired.

How To Obtain Plots Collapse Hide details

This feature requires the Complex Samples option.

From the menus choose:

Analyze
Complex Samples
Cox Regression...

Select a plan file. Optionally, select a custom joint probabilities file and then click Continue.

Click the Plots tab.

Related Topics

Complex Samples Cox Regression
Define Event (Complex Samples Cox Regression)
Predictors (Complex Samples Cox Regression)
Define Time-Dependent Predictor (Complex Samples Cox Regression)
Subgroups (Complex Samples Cox Regression)
Model (Complex Samples Cox Regression)
Statistics (Complex Samples Cox Regression)
Hypothesis Tests (Complex Samples Cox Regression)
Save (Complex Samples Cox Regression)
Export (Complex Samples Cox Regression)
Options (Complex Samples Cox Regression)
CSCOXREG Command Additional Features


Hypothesis Tests (Complex Samples Cox Regression)

Complex Samples Cox Regression,Complex Samples Cox Regression,Complex Samples Cox Regression
hypothesis tests,hypothesis tests,hypothesis tests
degrees of freedom,degrees of freedom,degrees of freedom
in Complex Samples Cox Regression,in Complex Samples Cox Regression,in Complex Samples Cox Regression
adjusted chi-square,adjusted chi-square,adjusted chi-square
in Complex Samples Cox Regression,in Complex Samples Cox Regression,in Complex Samples Cox Regression
chi-square,chi-square,chi-square
in Complex Samples Cox Regression,in Complex Samples Cox Regression,in Complex Samples Cox Regression
adjusted F statistic,adjusted F statistic,adjusted F statistic
in Complex Samples Cox Regression,in Complex Samples Cox Regression,in Complex Samples Cox Regression
F statistic,F statistic,F statistic
in Complex Samples Cox Regression,in Complex Samples Cox Regression,in Complex Samples Cox Regression
least significant difference,least significant difference,least significant difference
in Complex Samples Cox Regression,in Complex Samples Cox Regression,in Complex Samples Cox Regression
sequential Bonferroni correction,sequential Bonferroni correction,sequential Bonferroni correction
in Complex Samples Cox Regression,in Complex Samples Cox Regression,in Complex Samples Cox Regression
sequential Sidak correction,sequential Sidak correction,sequential Sidak correction
in Complex Samples Cox Regression,in Complex Samples Cox Regression,in Complex Samples Cox Regression
Sidak correction,Sidak correction,Sidak correction
in Complex Samples Cox Regression,in Complex Samples Cox Regression,in Complex Samples Cox Regression
Bonferroni,Bonferroni,Bonferroni
in Complex Samples Cox Regression,in Complex Samples Cox Regression,in Complex Samples Cox Regression

Test Statistic. This group allows you to select the type of statistic used for testing hypotheses. You can choose between F, adjusted F, chi-square, and adjusted chi-square.

Sampling Degrees of Freedom. This group gives you control over the sampling design degrees of freedom used to compute p values for all test statistics. If based on the sampling design, the value is the difference between the number of primary sampling units and the number of strata in the first stage of sampling. Alternatively, you can set a custom degrees of freedom by specifying a positive integer.

Adjustment for Multiple Comparisons. When performing hypothesis tests with multiple contrasts, the overall significance level can be adjusted from the significance levels for the included contrasts. This group allows you to choose the adjustment method.

• Least significant difference. This method does not control the overall probability of rejecting the hypotheses that some linear contrasts are different from the null hypothesis values.

• Sequential Sidak. This is a sequentially step-down rejective Sidak procedure that is much less conservative in terms of rejecting individual hypotheses but maintains the same overall significance level.

• Sequential Bonferroni. This is a sequentially step-down rejective Bonferroni procedure that is much less conservative in terms of rejecting individual hypotheses but maintains the same overall significance level.

• Sidak. This method provides tighter bounds than the Bonferroni approach.

• Bonferroni. This method adjusts the observed significance level for the fact that multiple contrasts are being tested.

To Select Settings for Hypothesis Tests Collapse Hide details

This feature requires the Complex Samples option.

From the menus choose:

Analyze
Complex Samples
Cox Regression...

Select a plan file. Optionally, select a custom joint probabilities file and then click Continue.

Click the Hypothesis Tests tab.

Related Topics

Complex Samples Cox Regression
Define Event (Complex Samples Cox Regression)
Predictors (Complex Samples Cox Regression)
Define Time-Dependent Predictor (Complex Samples Cox Regression)
Subgroups (Complex Samples Cox Regression)
Model (Complex Samples Cox Regression)
Statistics (Complex Samples Cox Regression)
Plots (Complex Samples Cox Regression)
Save (Complex Samples Cox Regression)
Export (Complex Samples Cox Regression)
Options (Complex Samples Cox Regression)
CSCOXREG Command Additional Features


Save (Complex Samples Cox Regression)

Complex Samples Cox Regression,Complex Samples Cox Regression,Complex Samples Cox Regression
save variables,save variables,save variables
Schoenfeld's partial residuals,Schoenfeld's partial residuals,Schoenfeld's partial residuals
in Complex Samples Cox Regression,in Complex Samples Cox Regression,in Complex Samples Cox Regression
martingale residuals,martingale residuals,martingale residuals
in Complex Samples Cox Regression,in Complex Samples Cox Regression,in Complex Samples Cox Regression
deviance residuals,deviance residuals,deviance residuals
in Complex Samples Cox Regression,in Complex Samples Cox Regression,in Complex Samples Cox Regression
Cox-Snell residuals,Cox-Snell residuals,Cox-Snell residuals
in Complex Samples Cox Regression,in Complex Samples Cox Regression,in Complex Samples Cox Regression
score residuals,score residuals,score residuals
in Complex Samples Cox Regression,in Complex Samples Cox Regression,in Complex Samples Cox Regression
aggregated residuals,aggregated residuals,aggregated residuals
in Complex Samples Cox Regression,in Complex Samples Cox Regression,in Complex Samples Cox Regression

Save Variables. This group allows you to save model-related variables to the active dataset for further use in diagnostics and reporting of results. Note that none of these are available when time-dependent predictors are included in the model.

• Survival function. Saves the probability of survival (the value of the survival function) at the observed time and predictor values for each case.

• Lower bound of confidence interval for survival function. Saves the lower bound of the confidence interval for the survival function at the observed time and predictor values for each case.

• Upper bound of confidence interval for survival function. Saves the upper bound of the confidence interval for the survival function at the observed time and predictor values for each case.

• Cumulative hazard function. Saves the cumulative hazard, or −ln(survival), at the observed time and predictor values for each case.

• Lower bound of confidence interval for cumulative hazard function. Saves the lower bound of the confidence interval for the cumulative hazard function at the observed time and predictor values for each case.

• Upper bound of confidence interval for cumulative hazard function. Saves the upper bound of the confidence interval for the cumulative hazard function at the observed time and predictor values for each case.

• Predicted value of linear predictor. Saves the linear combination of reference value corrected predictors times regression coefficients. The linear predictor is the ratio of the hazard function to the baseline hazard. Under the proportional hazards model, this value is constant across time. For details on the computation and use of the reference value, see Predictor Transformations (complex samples cox regression algorithms).

• Schoenfeld residual. For each uncensored case and each nonredundant parameter in the model, the Schoenfeld residual is the difference between the observed value of the predictor associated with the model parameter and the expected value of the predictor for cases in the risk set at the observed event time. Schoenfeld residuals can be used to help assess the proportional hazards assumption; for example, for a predictor x, plots of the Schoenfeld residuals for the time-dependent predictor x*ln(T_) versus time should show a horizontal line at 0 if proportional hazards holds. A separate variable is saved for each nonredundant parameter in the model. Schoenfeld residuals are only computed for uncensored cases.

• Martingale residual. For each case, the martingale residual is the difference between the observed censoring (0 if censored, 1 if not) and the expectation of an event during the observation time.

• Deviance residual. Deviance residuals are martingale residuals "adjusted" to appear more symmetrical about 0. Plots of deviance residuals against predictors should reveal no patterns.

• Cox-Snell residual. For each case, the Cox-Snell residual is the expectation of an event during the observation time, or the observed censoring minus the martingale residual.

• Score residual. For each case and each nonredundant parameter in the model, the score residual is the contribution of the case to the first derivative of the pseudo-likelihood. A separate variable is saved for each nonredundant parameter in the model.

• DFBeta residual. For each case and each nonredundant parameter in the model, the DFBeta residual approximates the change in the value of the parameter estimate when the case is removed from the model. Cases with relatively large DFBeta residuals may be exerting undue influence on the analysis. A separate variable is saved for each nonredundant parameter in the model.

• Aggregated residuals. When multiple cases represent a single subject, the aggregated residual for a subject is simply the sum of the corresponding case residuals over all cases belonging to the same subject. For Schoenfeld’s residual, the aggregated version is the same as that of the non-aggregated version because Schoenfeld’s residual is only defined for uncensored cases. These residuals are only available when a subject identifier is specified on the Time and Event tab.

Names of Saved Variables. Automatic name generation ensures that you keep all your work. Custom names allow you to discard/replace results from previous runs without first deleting the saved variables in the Data Editor.

How To Save Variables Collapse Hide details

This feature requires the Complex Samples option.

From the menus choose:

Analyze
Complex Samples
Cox Regression...

Select a plan file. Optionally, select a custom joint probabilities file and then click Continue.

Click the Save tab.

Related Topics

Complex Samples Cox Regression
Define Event (Complex Samples Cox Regression)
Predictors (Complex Samples Cox Regression)
Define Time-Dependent Predictor (Complex Samples Cox Regression)
Subgroups (Complex Samples Cox Regression)
Model (Complex Samples Cox Regression)
Statistics (Complex Samples Cox Regression)
Plots (Complex Samples Cox Regression)
Hypothesis Tests (Complex Samples Cox Regression)
Export (Complex Samples Cox Regression)
Options (Complex Samples Cox Regression)
CSCOXREG Command Additional Features


Export (Complex Samples Cox Regression)

Complex Samples Cox Regression,Complex Samples Cox Regression,Complex Samples Cox Regression
model export,model export,model export

Export model as PASW Statistics data. Writes a dataset in PASW Statistics format containing the parameter correlation or covariance matrix with parameter estimates, standard errors, significance values, and degrees of freedom. The order of variables in the matrix file is as follows.

• rowtype_. Takes values (and value labels), COV (Covariances), CORR (Correlations), EST (Parameter estimates), SE (Standard errors), SIG (Significance levels), and DF (Sampling design degrees of freedom). There is a separate case with row type COV (or CORR) for each model parameter, plus a separate case for each of the other row types.

• varname_. Takes values P1, P2, ..., corresponding to an ordered list of all model parameters, for row types COV or CORR, with value labels corresponding to the parameter strings shown in the parameter estimates table. The cells are blank for other row types.

• P1, P2, ... These variables correspond to an ordered list of all model parameters, with variable labels corresponding to the parameter strings shown in the parameter estimates table, and take values according to the row type. For redundant parameters, all covariances are set to zero; correlations are set to the system-missing value; all parameter estimates are set at zero; and all standard errors, significance levels, and residual degrees of freedom are set to the system-missing value.

Note: This file is not immediately usable for further analyses in other procedures that read a matrix file unless those procedures accept all the row types exported here.

Export survival function as PASW Statistics data. Writes a dataset in PASW Statistics format containing the survival function; standard error of the survival function; upper and lower bounds of the confidence interval of the survival function; and the cumulative hazards function for each failure or event time, evaluated at the baseline and at the predictor patterns specified on the Plot tab. The order of variables in the matrix file is as follows.

• Baseline strata variable. Separate survival tables are produced for each value of the strata variable.

• Survival time variable. The event time; a separate case is created for each unique event time.

• Sur_0, LCL_Sur_0, UCL_Sur_0. Baseline survival function and the upper and lower bounds of its confidence interval.

• Sur_R, LCL_Sur_R, UCL_Sur_R. Survival function evaluated at the "reference" pattern (see the pattern values table in the output) and the upper and lower bounds of its confidence interval.

• Sur_#.#, LCL_Sur_#.#, UCL_Sur_#.#, … Survival function evaluated at each of the predictor patterns specified on the Plots tab and the upper and lower bounds of their confidence intervals. See the pattern values table in the output to match patterns with the number #.#.

• Haz_0, LCL_Haz_0, UCL_Haz_0. Baseline cumulative hazard function and the upper and lower bounds of its confidence interval.

• Haz_R, LCL_Haz_R, UCL_Haz_R. Cumulative hazard function evaluated at the "reference" pattern (see the pattern values table in the output) and the upper and lower bounds of its confidence interval.

• Haz_#.#, LCL_Haz_#.#, UCL_Haz_#.#, … Cumulative hazard function evaluated at each of the predictor patterns specified on the Plots tab and the upper and lower bounds of their confidence intervals. See the pattern values table in the output to match patterns with the number #.#.

Export model as XML. Saves all information needed to predict the survival function, including parameter estimates and the baseline survival function, in XML (PMML) format. SmartScore and PASW Statistics Server (a separate product) can use this model file to apply the model information to other data files for scoring purposes.

How To Export Model Information Collapse Hide details

This feature requires the Complex Samples option.

From the menus choose:

Analyze
Complex Samples
Cox Regression...

Select a plan file. Optionally, select a custom joint probabilities file and then click Continue.

Click the Export tab.

Related Topics

Complex Samples Cox Regression
Define Event (Complex Samples Cox Regression)
Predictors (Complex Samples Cox Regression)
Define Time-Dependent Predictor (Complex Samples Cox Regression)
Subgroups (Complex Samples Cox Regression)
Model (Complex Samples Cox Regression)
Statistics (Complex Samples Cox Regression)
Plots (Complex Samples Cox Regression)
Hypothesis Tests (Complex Samples Cox Regression)
Save (Complex Samples Cox Regression)
Options (Complex Samples Cox Regression)
CSCOXREG Command Additional Features


Options (Complex Samples Cox Regression)

Complex Samples Cox Regression,Complex Samples Cox Regression,Complex Samples Cox Regression
options,options,options
Efron estimation method,Efron estimation method,Efron estimation method
in Complex Samples Cox Regression,in Complex Samples Cox Regression,in Complex Samples Cox Regression
Breslow estimation method,Breslow estimation method,Breslow estimation method
in Complex Samples Cox Regression,in Complex Samples Cox Regression,in Complex Samples Cox Regression

Estimation. These controls specify criteria for estimation of regression coefficients.

• Maximum Iterations. The maximum number of iterations the algorithm will execute. Specify a non-negative integer.

• Maximum Step-Halving. At each iteration, the step size is reduced by a factor of 0.5 until the log-likelihood increases or maximum step-halving is reached. Specify a positive integer.

• Limit iterations based on change in parameter estimates. When selected, the algorithm stops after an iteration in which the absolute or relative change in the parameter estimates is less than the value specified, which must be positive.

• Limit iterations based on change in log-likelihood. When selected, the algorithm stops after an iteration in which the absolute or relative change in the log-likelihood function is less than the value specified, which must be positive.

• Display iteration history. Displays the iteration history for the parameter estimates and pseudo log-likelihood and prints the last evaluation of the change in parameter estimates and pseudo log-likelihood. The iteration history table prints every n iterations beginning with the 0th iteration (the initial estimates), where n is the value of the increment. If the iteration history is requested, then the last iteration is always displayed regardless of n.

• Tie breaking method for parameter estimation. When there are tied observed failure times, one of these methods is used to break the ties. The Efron method is more computationally expensive.

Survival Functions. These controls specify criteria for computations involving the survival function.

• Method for estimating baseline survival functions. The Breslow (or Nelson-Aalan or empirical) method estimates the baseline cumulative hazard by a nondecreasing step function with steps at the observed failure times, then computes the baseline survival by the relation survival=exp(−cumulative hazard). The Efron method is more computationally expensive and reduces to the Breslow method when there are no ties. The product limit method estimates the baseline survival by a non-increasing right continuous function; when there are no predictors in the model, this method reduces to Kaplan-Meier estimation.

• Confidence intervals of survival functions. The confidence interval can be calculated in three ways: in original units, via a log transformation, or a log-minus-log transformation. Only the log-minus-log transformation guarantees that the bounds of the confidence interval will lie between 0 and 1, but the log transformation generally seems to perform "best."

User Missing Values. All variables must have valid values for a case to be included in the analysis. These controls allow you to decide whether user-missing values are treated as valid among categorical models (including factors, event, strata, and subpopulation variables) and sampling design variables.

Confidence interval(%). This is the confidence interval level used for coefficient estimates, exponentiated coefficient estimates, survival function estimates, and cumulative hazard function estimates. Specify a value greater than or equal to 0, and less than 100.

How To Specify Options Collapse Hide details

This feature requires the Complex Samples option.

From the menus choose:

Analyze
Complex Samples
Cox Regression...

Select a plan file. Optionally, select a custom joint probabilities file and then click Continue.

Click the Options tab.

Related Topics

Complex Samples Cox Regression
Define Event (Complex Samples Cox Regression)
Predictors (Complex Samples Cox Regression)
Define Time-Dependent Predictor (Complex Samples Cox Regression)
Subgroups (Complex Samples Cox Regression)
Model (Complex Samples Cox Regression)
Statistics (Complex Samples Cox Regression)
Plots (Complex Samples Cox Regression)
Hypothesis Tests (Complex Samples Cox Regression)
Save (Complex Samples Cox Regression)
Export (Complex Samples Cox Regression)
CSCOXREG Command Additional Features


CSCOXREG Command Additional Features

The command language also allows you to:

• Perform custom hypothesis tests (using the CUSTOM subcommand and /PRINT LMATRIX).

• Tolerance specification (using /CRITERIA SINGULAR).

• General estimable function table (using /PRINT GEF).

• Multiple predictor patterns (using multiple PATTERN subcommands).

• Maximum number of saved variables when a rootname is specified (using the SAVE subcommand). The dialog honors the CSCOXREG default of 25 variables.

Related Topics

Complex Samples Cox Regression
Define Event (Complex Samples Cox Regression)
Predictors (Complex Samples Cox Regression)
Define Time-Dependent Predictor (Complex Samples Cox Regression)
Subgroups (Complex Samples Cox Regression)
Model (Complex Samples Cox Regression)
Statistics (Complex Samples Cox Regression)
Plots (Complex Samples Cox Regression)
Hypothesis Tests (Complex Samples Cox Regression)
Save (Complex Samples Cox Regression)
Export (Complex Samples Cox Regression)
Options (Complex Samples Cox Regression)
CSCOXREG


Complex Samples Missing Values

Complex Samples,Complex Samples,Complex Samples
missing values,missing values,missing values
missing values,missing values,missing values
in Complex Samples,in Complex Samples,in Complex Samples

Tables. This group determines which cases are used in the analysis.

• Use all available data. Missing values are determined on a table-by-table basis. Thus, the cases used to compute statistics may vary across frequency or crosstabulation tables.

• Use consistent case base. Missing values are determined across all variables. Thus, the cases used to compute statistics are consistent across tables.

Categorical Design Variables. This group determines whether user-missing values are valid or invalid.

To Specify Missing Values Settings for Complex Samples Procedures Collapse Hide details

This feature requires the Complex Samples option.

From the menus choose:

Analyze
Complex Samples
Frequencies...

...or Crosstabs.

Select a plan file. Optionally, select a custom joint probabilities file.

Click Continue.

In the Complex Samples dialog box, select Missing Values.

Select the missing values settings that you want.

Related Topics

Complex Samples Frequencies
Complex Samples Crosstabs


Complex Samples Options

Complex Samples,Complex Samples,Complex Samples
options,options,options

Subpopulation Display. You can choose to have subpopulations displayed in the same table or in separate tables.

Specifying options for Complex Samples analysis procedures Collapse Hide details

This feature requires the Complex Samples option.

From the menus choose:

Analyze
Complex Samples
Frequencies...

...or another analysis procedure.

Select a plan file. Optionally, select a custom joint probabilities file.

Click Continue.

In the Complex Samples dialog box, select at least one subpopulation variable and click Options.

Select the options that you want.

Related Topics

Complex Samples Frequencies
Complex Samples Crosstabs
Complex Samples Descriptives


Complex Samples Hypothesis Tests

Complex Samples,Complex Samples,Complex Samples
hypothesis tests,hypothesis tests,hypothesis tests
degrees of freedom,degrees of freedom,degrees of freedom
in Complex Samples,in Complex Samples,in Complex Samples
adjusted chi-square,adjusted chi-square,adjusted chi-square
in Complex Samples,in Complex Samples,in Complex Samples
chi-square,chi-square,chi-square
in Complex Samples,in Complex Samples,in Complex Samples
adjusted F statistic,adjusted F statistic,adjusted F statistic
in Complex Samples,in Complex Samples,in Complex Samples
F statistic,F statistic,F statistic
in Complex Samples,in Complex Samples,in Complex Samples
least significant difference,least significant difference,least significant difference
in Complex Samples,in Complex Samples,in Complex Samples
sequential Bonferroni correction,sequential Bonferroni correction,sequential Bonferroni correction
in Complex Samples,in Complex Samples,in Complex Samples
sequential Sidak correction,sequential Sidak correction,sequential Sidak correction
in Complex Samples,in Complex Samples,in Complex Samples
Sidak correction,Sidak correction,Sidak correction
in Complex Samples,in Complex Samples,in Complex Samples
Bonferroni,Bonferroni,Bonferroni
in Complex Samples,in Complex Samples,in Complex Samples

Test Statistic. This group allows you to select the type of statistic used for testing hypotheses. You can choose between F, adjusted F, chi-square, and adjusted chi-square.

Sampling Degrees of Freedom. This group gives you control over the sampling design degrees of freedom used to compute p values for all test statistics. If based on the sampling design, the value is the difference between the number of primary sampling units and the number of strata in the first stage of sampling. Alternatively, you can set a custom degrees of freedom by specifying a positive integer.

Adjustment for Multiple Comparisons. When performing hypothesis tests with multiple contrasts, the overall significance level can be adjusted from the significance levels for the included contrasts. This group allows you to choose the adjustment method.

• Least significant difference. This method does not control the overall probability of rejecting the hypotheses that some linear contrasts are different from the null hypothesis values.

• Sequential Sidak. This is a sequentially step-down rejective Sidak procedure that is much less conservative in terms of rejecting individual hypotheses but maintains the same overall significance level.

• Sequential Bonferroni. This is a sequentially step-down rejective Bonferroni procedure that is much less conservative in terms of rejecting individual hypotheses but maintains the same overall significance level.

• Sidak. This method provides tighter bounds than the Bonferroni approach.

• Bonferroni. This method adjusts the observed significance level for the fact that multiple contrasts are being tested.

To Select Settings for Hypothesis Tests in Complex Samples Analysis Procedures Collapse Hide details

This feature requires the Complex Samples option.

From the menus choose:

Analyze
Complex Samples
General Linear Model...

... or Logistic Regression or Ordinal Regression.

Select a plan file. Optionally, select a custom joint probabilities file.

Click Continue.

In the main dialog box, click Hypothesis Tests.

Make your desired selections.

Related Topics

Complex Samples Logistic Regression
Complex Samples General Linear Model
Complex Samples Ordinal Regression


Complex Samples Model

Complex Samples,Complex Samples,Complex Samples
model,model,model

Specify Model Effects. By default, the procedure builds a main-effects model using the factors and covariates specified in the main dialog box. Alternatively, you can build a custom model that includes interaction effects and nested terms.

Non-Nested Terms

For the selected factors and covariates:

Interaction. Creates the highest-level interaction term for all selected variables.

Main effects. Creates a main-effects term for each variable selected.

All 2-way. Creates all possible two-way interactions of the selected variables.

All 3-way. Creates all possible three-way interactions of the selected variables.

All 4-way. Creates all possible four-way interactions of the selected variables.

All 5-way. Creates all possible five-way interactions of the selected variables.

Specifying Non-Nested Build Terms Collapse Hide details

From the menus choose:

Analyze
Complex Samples
General Linear Model...

... or Logistic Regression or Ordinal Regression.

Select a plan file. Optionally, select a custom joint probabilities file.

Click Continue.

In the main dialog box, select factors and covariates and click Model.

Select Custom.

Select one or more factors or covariates or a combination of factors and covariates.

Select a method for building the terms from the Type drop-down list and add them to the model.

Repeat the process until you have all of the terms that you want in the model.

Nested Terms

You can build nested terms for your model in this procedure. Nested terms are useful for modeling the effect of a factor or covariate whose values do not interact with the levels of another factor. For example, a grocery store chain may follow the spending habits of its customers at several store locations. Since each customer frequents only one of these locations, the Customer effect can be said to be nested within the Store location effect.

Additionally, you can include interaction effects, such as polynomial terms involving the same covariate, or add multiple levels of nesting to the nested term.

Limitations. Nested terms have the following restrictions:

• All factors within an interaction must be unique. Thus, if A is a factor, then specifying A*A is invalid.

• All factors within a nested effect must be unique. Thus, if A is a factor, then specifying A(A) is invalid.

• No effect can be nested within a covariate. Thus, if A is a factor and X is a covariate, then specifying A(X) is invalid.

Specifying Nested Build Terms Collapse Hide details

From the menus choose:

Analyze
Complex Samples
General Linear Model...

... or Logistic Regression or Ordinal Regression.

Select a plan file. Optionally, select a custom joint probabilities file.

Click Continue.

In the main dialog box, select factors and covariates and click Model.

Select Custom.

Select a factor or covariate that is nested within another factor, and then click the move button.

Click Nesting.

Select the factor within which the previous factor or covariate is nested, and then click the move button.

Click Add to Model.

Optionally, you can include interaction effects or add multiple levels of nesting to the nested term.

Intercept. The intercept is usually included in the model. If you can assume the data pass through the origin, you can exclude the intercept. Even if you include the intercept in the model, you can choose to suppress statistics related to it.

Related Topics

Complex Samples Logistic Regression
Complex Samples General Linear Model


Generating an Orthogonal Design

Generate Orthogonal Design,Generate Orthogonal Design,Generate Orthogonal Design
orthogonal designs,orthogonal designs,orthogonal designs
generating,generating,generating
Conjoint analysis,Conjoint analysis,Conjoint analysis
generating an orthogonal design,generating an orthogonal design,generating an orthogonal design

Generate Orthogonal Design generates a data file containing an orthogonal main-effects design that permits the statistical testing of several factors without testing every combination of factor levels. This design can be displayed with the Display Design procedure, and the data file can be used by other procedures, such as Conjoint.

Example. A low-fare airline startup is interested in determining the relative importance to potential customers of the various factors that comprise its product offering. Price is clearly a primary factor, but how important are other factors, such as seat size, number of layovers, and whether or not a beverage/snack service is included? A survey asking respondents to rank product profiles representing all possible factor combinations is unreasonable given the large number of profiles. The Generate Orthogonal Design procedure creates a reduced set of product profiles that is small enough to include in a survey but large enough to assess the relative importance of each factor.

card_ variable,card_ variable,card_ variable
in Generate Orthogonal Design,in Generate Orthogonal Design,in Generate Orthogonal Design
status_ variable,status_ variable,status_ variable
in Generate Orthogonal Design,in Generate Orthogonal Design,in Generate Orthogonal Design
data files,data files,data files
in Generate Orthogonal Design,in Generate Orthogonal Design,in Generate Orthogonal Design
Generate Orthogonal Design,Generate Orthogonal Design,Generate Orthogonal Design
data files,data files,data files
Generate Orthogonal Design,Generate Orthogonal Design,Generate Orthogonal Design
random number seed,random number seed,random number seed
random number seed,random number seed,random number seed
in Generate Orthogonal Design,in Generate Orthogonal Design,in Generate Orthogonal Design

Show me

To Generate an Orthogonal Design Collapse Hide details

To Generate an Orthogonal Design

This feature requires the Conjoint option.

From the menus choose:

Data
Orthogonal Design
Generate...

Expand Show details Collapse Hide details
Generate Orthogonal Design dialog box

Define at least one factor. Enter a name in the Factor Name text box. Factor names can be any valid variable name, except status_ or card_. You can also assign an optional factor label.

Click Add to add the factor name and an optional label. To delete a factor, select it in the list and click Remove. To modify a factor name or label, select it in the list, modify the name or label, and click Change.

Define values for each factor by selecting the factor and clicking Define Values.

Data File. Allows you to control the destination of the orthogonal design. You can save the design to a new dataset in the current session or to an external data file.

• Create a new dataset. Creates a new dataset in the current session containing the factors and cases generated by the plan.

• Create new data file. Creates an external data file containing the factors and cases generated by the plan. By default, this data file is named ortho.sav, and it is saved to the current directory. Click File to specify a different name and destination for the file.

Reset random number seed to. Resets the random number seed to the specified value. The seed can be any integer value from 0 through 2,000,000,000. Within a session, a different seed is used each time you generate a set of random numbers, producing different results. If you want to duplicate the same random numbers, you should set the seed value before you generate your first design and reset the seed to the same value each subsequent time you generate the design.

Optionally, you can:

• Click Options to specify the minimum number of cases in the orthogonal design and to select holdout cases.

Related Topics

Displaying a Design
Running a Conjoint Analysis
Defining Values for an Orthogonal Design
Orthogonal Design Options
ORTHOPLAN Command Additional Features
ORTHOPLAN


Defining Values for an Orthogonal Design

Generate Orthogonal Design,Generate Orthogonal Design,Generate Orthogonal Design
defining factor names, labels, and values,defining factor names, labels, and values,defining factor names, labels, and values
Expand Show details Collapse Hide details
Generate Design Define Values dialog box

You must assign values to each level of the selected factor or factors. The factor name will be displayed after Values and Labels for.

Enter each value of the factor. You can elect to give the values descriptive labels. If you do not assign labels to the values, labels that correspond to the values are automatically assigned (that is, a value of 1 is assigned a label of 1, a value of 3 is assigned a label of 3, and so on).

Auto-Fill. Allows you to automatically fill the Value boxes with consecutive values beginning with 1. Enter the maximum value and click Fill to fill in the values.

How To Define Values for an Orthogonal Design Collapse Hide details

This feature requires the Conjoint option.

From the menus choose:

Data
Orthogonal Design
Generate...

Select a factor in the Generate Orthogonal Design dialog box and click Define Values.

Related Topics

Generating an Orthogonal Design
Orthogonal Design Options
ORTHOPLAN Command Additional Features


Orthogonal Design Options

Generate Orthogonal Design,Generate Orthogonal Design,Generate Orthogonal Design
holdout cases,holdout cases,holdout cases
minimum cases,minimum cases,minimum cases
holdout cases,holdout cases,holdout cases
in Generate Orthogonal Design,in Generate Orthogonal Design,in Generate Orthogonal Design
orthogonal designs,orthogonal designs,orthogonal designs
minimum cases,minimum cases,minimum cases
holdout cases,holdout cases,holdout cases
Expand Show details Collapse Hide details
Generate Orthogonal Design Options dialog box

Minimum number of cases to generate. Specifies a minimum number of cases for the plan. Select a positive integer less than or equal to the total number of cases that can be formed from all possible combinations of the factor levels. If you do not explicitly specify the minimum number of cases to generate, the minimum number of cases necessary for the orthogonal plan is generated. If the Orthoplan procedure cannot generate at least the number of profiles requested for the minimum, it will generate the largest number it can that fits the specified factors and levels. Note that the design does not necessarily include exactly the number of specified cases but rather the smallest possible number of cases in the orthogonal design using this value as a minimum.

Holdout Cases. You can define holdout cases that are rated by subjects but are not included in the conjoint analysis.

• Number of holdout cases. Creates holdout cases in addition to the regular plan cases. Holdout cases are judged by the subjects but are not used when the Conjoint procedure estimates utilities. You can specify any positive integer less than or equal to the total number of cases that can be formed from all possible combinations of factor levels. Holdout cases are generated from another random plan, not the main-effects experimental plan. The holdout cases do not duplicate the experimental profiles or each other. By default, no holdout cases are produced.

• Randomly mix with other cases. Randomly mixes holdout cases with the experimental cases. When this option is deselected, holdout cases appear separately, following the experimental cases.

How To Set Options for an Orthogonal Design Collapse Hide details

This feature requires the Conjoint option.

From the menus choose:

Data
Orthogonal Design
Generate...

In the Generate Orthogonal Design dialog, click Options.

Related Topics

Generating an Orthogonal Design
Defining Values for an Orthogonal Design
ORTHOPLAN Command Additional Features


ORTHOPLAN Command Additional Features

Generate Orthogonal Design,Generate Orthogonal Design,Generate Orthogonal Design
simulation cases,simulation cases,simulation cases
simulation cases,simulation cases,simulation cases
in Generate Orthogonal Design,in Generate Orthogonal Design,in Generate Orthogonal Design

The command syntax language also allows you to:

• Append the orthogonal design to the active dataset rather than creating a new one.

• Specify simulation cases before generating the orthogonal design rather than after the design has been created.

Related Topics

Generating an Orthogonal Design
Defining Values for an Orthogonal Design
Orthogonal Design Options
ORTHOPLAN


Displaying a Design

orthogonal designs,orthogonal designs,orthogonal designs
displaying,displaying,displaying
Conjoint analysis,Conjoint analysis,Conjoint analysis
displaying a design,displaying a design,displaying a design
Display Design,Display Design,Display Design
Display Design,Display Design,Display Design
listing format,listing format,listing format
single-profile format,single-profile format,single-profile format
listing format,listing format,listing format
in Display Design,in Display Design,in Display Design
single-profile format,single-profile format,single-profile format
in Display Design,in Display Design,in Display Design

The Display Design procedure allows you to print an experimental design. You can print the design in either a rough-draft listing format or as profiles that you can present to subjects in a conjoint study. This procedure can display designs created with the Generate Orthogonal Design procedure or any designs displayed in an active dataset.

Show me

To Display an Orthogonal Design Collapse Hide details

To Display an Orthogonal Design

This feature requires the Conjoint option.

From the menus choose:

Data
Orthogonal Design
Display...

Expand Show details Collapse Hide details
Display Design dialog box

Move one or more factors into the Factors list.

Select a format for displaying the profiles in the output.

Format. You can choose one or more of the following format options:

• Listing for experimenter. Displays the design in a draft format that differentiates holdout profiles from experimental profiles and lists simulation profiles separately following the experimental and holdout profiles.

• Profiles for subjects. Produces profiles that can be presented to subjects. This format does not differentiate holdout profiles and does not produce simulation profiles.

Optionally, you can:

• Click Titles to define headers and footers for the profiles.

Related Topics

Generating an Orthogonal Design
Running a Conjoint Analysis
PLANCARDS
Display Design Titles
PLANCARDS Command Additional Features


Display Design Titles

Display Design,Display Design,Display Design
titles,titles,titles
titles,titles,titles
in Display Design,in Display Design,in Display Design
Display Design,Display Design,Display Design
footers,footers,footers
footers,footers,footers
in Display Design,in Display Design,in Display Design
)CARD,)CARD,)CARD
in Display Design,in Display Design,in Display Design
Display Design,Display Design,Display Design
)CARD,)CARD,)CARD
Expand Show details Collapse Hide details
Display Design Titles dialog box

Profile Title. Enter a profile title up to 80 characters long. Titles appear at the top of the output if you have selected Listing for experimenter and at the top of each new profile if you have selected Profiles for subjects in the main dialog box. For Profiles for subjects, if the special character sequence )CARD is specified anywhere in the title, the procedure will replace it with the sequential profile number. This character sequence is not translated for Listing for experimenter.

Profile Footer. Enter a profile footer up to 80 characters long. Footers appear at the bottom of the output if you have selected Listing for experimenter and at the bottom of each profile if you have selected Profiles for subjects in the main dialog box. For Profiles for subjects, if the special character sequence )CARD is specified anywhere in the footer, the procedure will replace it with the sequential profile number. This character sequence is not translated for Listing for experimenter.

How To Display Orthogonal Design Titles Collapse Hide details

This feature requires the Conjoint option.

From the menus choose:

Data
Orthogonal Design
Display...

In the Display Design dialog, click Titles.

Related Topics

Displaying a Design
PLANCARDS Command Additional Features


PLANCARDS Command Additional Features

Display Design,Display Design,Display Design
saving profiles,saving profiles,saving profiles

The command syntax language also allows you to:

• Write profiles for subjects to an external file (using the OUTFILE subcommand).

Related Topics

PLANCARDS
Displaying a Design
Display Design Titles


Running a Conjoint Analysis

Conjoint analysis,Conjoint analysis,Conjoint analysis
running the analysis,running the analysis,running the analysis

A graphical user interface is not yet available for the Conjoint procedure. To obtain a conjoint analysis, you must enter command syntax for a CONJOINT command into a syntax window and then run it.

• For an example of command syntax for a CONJOINT command in the context of a complete conjoint analysis--including generating and displaying an orthogonal design--see the tutorial Using Conjoint Analysis to Model Carpet-Cleaner Preference.

• For complete command syntax information see CONJOINT

To Run a Command from a Syntax Window Collapse Hide details

To Run a Command from a Syntax Window

From the menus choose:

File
New
Syntax...

This opens a syntax window.

Enter the command syntax for the CONJOINT command.

Highlight the command in the syntax window, and click the Run button (the right-pointing triangle) on the Syntax Editor toolbar.

Related Topics

Generating an Orthogonal Design
Displaying a Design
CONJOINT
Requirements for a Conjoint Analysis
Optional Subcommands for a Conjoint Analysis


Requirements for a Conjoint Analysis

The Conjoint procedure requires two files—a data file and a plan file—and the specification of how data were recorded (for example, each data point is a preference score from 1 to 100). The plan file consists of the set of product profiles to be rated by the subjects and should be generated using the Generate Orthogonal Design procedure. The data file contains the preference scores or rankings of those profiles collected from the subjects. The plan and data files are specified with the PLAN and DATA subcommands, respectively. The method of data recording is specified with the SEQUENCE, RANK, or SCORE subcommands. The following command syntax shows a minimal specification:

CONJOINT PLAN='CPLAN.SAV' /DATA='RUGRANKS.SAV'
 /SEQUENCE=PREF1 TO PREF22.

Related Topics

Running a Conjoint Analysis
Optional Subcommands for a Conjoint Analysis
Specifying the Plan File and the Data File
Specifying How Data Were Recorded


Specifying the Plan File and the Data File

The CONJOINT command provides a number of options for specifying the plan file and the data file.

• You can explicitly specify the filenames for the two files. For example:

CONJOINT PLAN='CPLAN.SAV' /DATA='RUGRANKS.SAV'

• If only a plan file or data file is specified, the CONJOINT command reads the specified file and uses the active dataset as the other. For example, if you specify a data file but omit a plan file (you cannot omit both), the active dataset is used as the plan, as shown in the following example:

CONJOINT DATA='RUGRANKS.SAV'

• You can use the asterisk (*) in place of a filename to indicate the active dataset, as shown in the following example:

CONJOINT PLAN='CPLAN.SAV' /DATA=*

The active dataset is used as the preference data. Note that you cannot use the asterisk (*) for both the plan file and the data file.

Related Topics

Requirements for a Conjoint Analysis
Specifying How Data Were Recorded


Specifying How Data Were Recorded

You must specify the way in which preference data were recorded. Data can be recorded in one of three ways: sequentially, as rankings, or as preference scores. These three methods are indicated by the SEQUENCE, RANK, and SCORE subcommands. You must specify one, and only one, of these subcommands as part of a CONJOINT command.

SEQUENCE Subcommand

The SEQUENCE subcommand indicates that data were recorded sequentially so that each data point in the data file is a profile number, starting with the most preferred profile and ending with the least preferred profile. This is how data are recorded if the subject is asked to order the profiles from the most to the least preferred. The researcher records which profile number was first, which profile number was second, and so on.

CONJOINT PLAN=* /DATA='RUGRANKS.SAV'
 /SEQUENCE=PREF1 TO PREF22.

• The variable PREF1 contains the profile number for the most preferred profile out of 22 profiles in the orthogonal plan. The variable PREF22 contains the profile number for the least preferred profile in the plan.

RANK Subcommand

The RANK subcommand indicates that each data point is a ranking, starting with the ranking of profile 1, then the ranking of profile 2, and so on. This is how the data are recorded if the subject is asked to assign a rank to each profile, ranging from 1 to n, where n is the number of profiles. A lower rank implies greater preference.

CONJOINT PLAN=* /DATA='RUGRANKS.SAV'
 /RANK=RANK1 TO RANK22.

• The variable RANK1 contains the ranking of profile 1, out of a total of 22 profiles in the orthogonal plan. The variable RANK22 contains the ranking of profile 22.

SCORE Subcommand

The SCORE subcommand indicates that each data point is a preference score assigned to the profiles, starting with the score of profile 1, then the score of profile 2, and so on. This type of data might be generated, for example, by asking subjects to assign a number from 1 to 100 to show how much they liked the profile. A higher score implies greater preference.

CONJOINT PLAN=* /DATA='RUGRANKS.SAV'
 /SCORE=SCORE1 TO SCORE22.

• The variable SCORE1 contains the score for profile 1, and SCORE22 contains the score for profile 22.

Related Topics

Requirements for a Conjoint Analysis
Specifying the Plan File and the Data File


Optional Subcommands for a Conjoint Analysis

The CONJOINT command offers a number of optional subcommands that provide additional control and functionality beyond what is required.

SUBJECT Subcommand

The SUBJECT subcommand allows you to specify a variable from the data file to be used as an identifier for the subjects. If you do not specify a subject variable, the CONJOINT command assumes that all of the cases in the data file come from one subject. The following example specifies that the variable ID, from the file rugranks.sav, is to be used as a subject identifier.

CONJOINT PLAN=* /DATA='RUGRANKS.SAV'
 /SCORE=SCORE1 TO SCORE22 /SUBJECT=ID.

FACTORS Subcommand

The FACTORS subcommand allows you to specify the model describing the expected relationship between factors and the rankings or scores. If you do not specify a model for a factor, CONJOINT assumes a discrete model. You can specify one of four models:

DISCRETE. The DISCRETE model indicates that the factor levels are categorical and that no assumption is made about the relationship between the factor and the scores or ranks. This is the default.

LINEAR. The LINEAR model indicates an expected linear relationship between the factor and the scores or ranks. You can specify the expected direction of the linear relationship with the keywords MORE and LESS. MORE indicates that higher levels of a factor are expected to be preferred, while LESS indicates that lower levels of a factor are expected to be preferred. Specifying MORE or LESS will not affect estimates of utilities. They are used simply to identify subjects whose estimates do not match the expected direction.

IDEAL. The IDEAL model indicates an expected quadratic relationship between the scores or ranks and the factor. It is assumed that there is an ideal level for the factor, and distance from this ideal point (in either direction) is associated with decreasing preference. Factors described with this model should have at least three levels.

ANTIIDEAL. The ANTIIDEAL model indicates an expected quadratic relationship between the scores or ranks and the factor. It is assumed that there is a worst level for the factor, and distance from this point (in either direction) is associated with increasing preference. Factors described with this model should have at least three levels.

The following command syntax provides an example using the FACTORS subcommand:

CONJOINT PLAN=* /DATA='RUGRANKS.SAV'
 /RANK=RANK1 TO RANK22  /SUBJECT=ID
 /FACTORS=PACKAGE BRAND (DISCRETE) PRICE (LINEAR LESS)
          SEAL (LINEAR MORE) MONEY (LINEAR MORE).

• Note that both package and brand are modeled as discrete.

PRINT Subcommand

simulation cases,simulation cases,simulation cases
in Conjoint analysis,in Conjoint analysis,in Conjoint analysis
Conjoint analysis,Conjoint analysis,Conjoint analysis
simulation cases,simulation cases,simulation cases

The PRINT subcommand allows you to control the content of the tabular output. For example, if you have a large number of subjects, you can choose to limit the output to summary results only, omitting detailed output for each subject, as shown in the following example:

CONJOINT PLAN=* /DATA='RUGRANKS.SAV'
 /RANK=RANK1 TO RANK22 /SUBJECT=ID
 /PRINT=SUMMARYONLY.

You can also choose whether the output includes analysis of the experimental data, results for any simulation cases included in the plan file, both, or none. Simulation cases are not rated by the subjects but represent product profiles of interest to you. The Conjoint procedure uses the analysis of the experimental data to make predictions about the relative preference for each of the simulation profiles. In the following example, detailed output for each subject is suppressed, and the output is limited to results of the simulations:

CONJOINT PLAN=* /DATA='RUGRANKS.SAV'
 /RANK=RANK1 TO RANK22 /SUBJECT=ID
 /PRINT=SIMULATION SUMMARYONLY.

PLOT Subcommand

The PLOT subcommand controls whether plots are included in the output. Like tabular output (PRINT subcommand), you can control whether the output is limited to summary results or includes results for each subject. By default, no plots are produced. In the following example, output includes all available plots:

CONJOINT PLAN=* /DATA='RUGRANKS.SAV'
 /RANK=RANK1 TO RANK22 /SUBJECT=ID
 /PLOT=ALL.

UTILITY Subcommand

The UTILITY subcommand writes a data file in PASW Statistics format containing detailed information for each subject. It includes the utilities for DISCRETE factors, the slope and quadratic functions for LINEAR, IDEAL, and ANTIIDEAL factors, the regression constant, and the estimated preference scores. These values can then be used in further analyses or for making additional plots with other procedures. The following example creates a utility file named rugutil.sav:

CONJOINT PLAN=* /DATA='RUGRANKS.SAV'
 /RANK=RANK1 TO RANK22 /SUBJECT=ID
 /UTILITY='RUGUTIL.SAV'.

Related Topics

Running a Conjoint Analysis
Requirements for a Conjoint Analysis


Introduction to Missing Values

Cases with missing values pose an important challenge, because typical modeling procedures simply discard these cases from the analysis. When there are few missing values (very roughly, less than 5% of the total number of cases) and those values can be considered to be missing at random; that is, whether a value is missing does not depend upon other values, then the typical method of listwise deletion is relatively "safe". The Missing Values option can help you to determine whether listwise deletion is sufficient, and provides methods for handling missing values when it is not.

Missing Value Analysis versus Multiple Imputation procedures

The Missing Values option provides two sets of procedures for handling missing values:

• The Multiple Imputation procedures provide analysis of patterns of missing data, geared toward eventual multiple imputation of missing values. That is, multiple versions of the dataset are produced, each containing its own set of imputed values. When statistical analyses are performed, the parameter estimates for all of the imputed datasets are pooled, providing estimates that are generally more accurate than they would be with only one imputation.

• Missing Value Analysis provides a slightly different set of descriptive tools for analyzing missing data (most particularly Little's MCAR test), and includes a variety of single imputation methods. Note that multiple imputation is generally considered to be superior to single imputation.

Missing Values Tasks

You can get started with analysis of missing values by following these basic steps:

Examine missingness. Use Missing Value Analysis and Analyze Patterns to explore patterns of missing values in your data and determine whether multiple imputation is necessary.

Impute missing values. Use Impute Missing Data Values to multiply impute missing values.

Analyze "complete" data. Use any procedure that supports multiple imputation data. See Analyzing Multiple Imputation Data for information on analyzing multiple imputation datasets and a list of procedures which support these data.


Usage of Data Preparation Procedures

Your usage of Data Preparation procedures depends on your particular needs. A typical route, after loading your data, is:

• Metadata preparation. Review the variables in your data file and determine their valid values, labels, and measurement levels. Identify combinations of variable values that are impossible but commonly miscoded. Define validation rules based on this information. This can be a time-consuming task, but it is well worth the effort if you need to validate data files with similar attributes on a regular basis.

• Data validation. Run basic checks and checks against defined validation rules to identify invalid cases, variables, and data values. When invalid data are found, investigate and correct the cause. This may require another step through metadata preparation.

• Model preparation. Use automated data preparation to obtain transformations of the original fields that will improve model building. Identify potential statistical outliers that can cause problems for many predictive models. Some outliers are the result of invalid variable values that have not been identified. This may require another step through metadata preparation.

Once your data file is "clean," you are ready to build models from other add-on modules.

Related Topics

Introduction to Data Preparation
Validation Rules


Validation Rules

validation rules,validation rules,validation rules

A rule is used to determine whether a case is valid. There are two types of validation rules:

• Single-variable rules. Single-variable rules consist of a fixed set of checks that apply to a single variable, such as checks for out-of-range values. For single-variable rules, valid values can be expressed as a range of values or a list of acceptable values.

• Cross-variable rules. Cross-variable rules are user-defined rules that can be applied to a single variable or a combination of variables. Cross-variable rules are defined by a logical expression that flags invalid values.

Validation rules are saved to the data dictionary of your data file. This allows you to specify a rule once and then reuse it.

Related Topics

Introduction to Data Preparation
Usage of Data Preparation Procedures


Load Predefined Validation Rules

You can quickly obtain a set of ready-to-use validation rules by loading predefined rules from an external data file included in the installation.

To Load Predefined Validation Rules Collapse Hide details

To Load Predefined Validation Rules

This feature requires the Data Preparation option.

From the menus choose:

Data
Validation
Load Predefined Rules...

Expand Show details Collapse Hide details
Load Predefined Validation Rules

Note that this process deletes any existing single-variable rules in the active dataset.

Alternatively, you can use the Copy Data Properties Wizard to load rules from any data file.

Related Topics

Define Validation Rules
Define Single-Variable Rules
Define Cross-Variable Rules


Define Validation Rules

Define Validation Rules,Define Validation Rules,Define Validation Rules

The Define Validation Rules dialog box allows you to create and view single-variable and cross-variable validation rules.

To Create and View Validation Rules Collapse Hide details

To Create and View Validation Rules

This feature requires the Data Preparation option.

From the menus choose:

Data
Validation
Define Rules...

The dialog box is populated with single-variable and cross-variable validation rules read from the data dictionary. When there are no rules, a new placeholder rule that you can modify to suit your purposes is created automatically.

Select individual rules on the Single-Variable Rules and Cross-Variable Rules tabs to view and modify their properties.

Related Topics

Single-Variable Validation Rules
Cross-Variable Validation Rules
Load Predefined Validation Rules
Define Single-Variable Rules
Define Cross-Variable Rules


Define Single-Variable Rules

Define Validation Rules,Define Validation Rules,Define Validation Rules
single-variable rules,single-variable rules,single-variable rules
single-variable validation rules,single-variable validation rules,single-variable validation rules
in Define Validation Rules,in Define Validation Rules,in Define Validation Rules
Expand Show details Collapse Hide details
Define Validation Rules dialog box, Single-Variable Rules tab

The Single-Variable Rules tab allows you to create, view, and modify single-variable validation rules.

Rules. The list shows single-variable validation rules by name and the type of variable to which the rule can be applied. When the dialog box is opened, it shows rules defined in the data dictionary or, if no rules are currently defined, a placeholder rule called "Single-Variable Rule 1." The following buttons appear below the Rules list:

• New. Adds a new entry to the bottom of the Rules list. The rule is selected and assigned the name "SingleVarRule n," where n is an integer so that the new rule's name is unique among single-variable and cross-variable rules.

• Duplicate. Adds a copy of the selected rule to the bottom of the Rules list. The rule name is adjusted so that it is unique among single-variable and cross-variable rules. For example, if you duplicate "SingleVarRule 1," the name of the first duplicate rule would be "Copy of SingleVarRule 1," the second would be "Copy (2) of SingleVarRule 1," and so on.

• Delete. Deletes the selected rule.

Rule Definition. These controls allow you to view and set properties for a selected rule.

• Name. The name of the rule must be unique among single-variable and cross-variable rules.

• Type. This is the type of variable to which the rule can be applied. Select from Numeric, String, and Date.

• Format. This allows you to select the date format for rules that can be applied to date variables.

• Valid Values. You can specify the valid values either as a range or a list of values.

Range Definition Collapse Hide details

Range definition controls allow you to specify a valid range. Values outside the range are flagged as invalid.

Expand Show details Collapse Hide details
Single-Variable Rules: Range Definition

To specify a range, enter the minimum or maximum values, or both. The check box controls allow you to flag unlabeled and non-integer values within the range.

List Definition Collapse Hide details

List definition controls allow you to define a list of valid values. Values not included in the list are flagged as invalid.

Expand Show details Collapse Hide details
Single-Variable Rules: List Definition

Enter list values in the grid. The check box determines whether case matters when string data values are checked against the list of acceptable values.

• Allow user-missing values. Controls whether user-missing values are flagged as invalid.

• Allow system-missing values. Controls whether system-missing values are flagged as invalid. This does not apply to string rule types.

• Allow blank values. Controls whether blank (that is, completely empty) string values are flagged as invalid. This does not apply to nonstring rule types.

Related Topics

Load Predefined Validation Rules
Define Validation Rules
Define Cross-Variable Rules


Define Cross-Variable Rules

Define Validation Rules,Define Validation Rules,Define Validation Rules
cross-variable rules,cross-variable rules,cross-variable rules
cross-variable validation rules,cross-variable validation rules,cross-variable validation rules
in Define Validation Rules,in Define Validation Rules,in Define Validation Rules
Expand Show details Collapse Hide details
Define Validation Rules dialog box, Cross-Variable Rules tab

The Cross-Variable Rules tab allows you to create, view, and modify cross-variable validation rules.

Rules. The list shows cross-variable validation rules by name. When the dialog box is opened, it shows a placeholder rule called "CrossVarRule 1." The following buttons appear below the Rules list:

• New. Adds a new entry to the bottom of the Rules list. The rule is selected and assigned the name "CrossVarRule n," where n is an integer so that the new rule's name is unique among single-variable and cross-variable rules.

• Duplicate. Adds a copy of the selected rule to the bottom of the Rules list. The rule name is adjusted so that it is unique among single-variable and cross-variable rules. For example, if you duplicate "CrossVarRule 1," the name of the first duplicate rule would be "Copy of CrossVarRule 1," the second would be "Copy (2) of CrossVarRule 1," and so on.

• Delete. Deletes the selected rule.

Rule Definition. These controls allow you to view and set properties for a selected rule.

• Name. The name of the rule must be unique among single-variable and cross-variable rules.

• Logical Expression. This is, in essence, the rule definition. You should code the expression so that invalid cases evaluate to 1.

Building Expressions Collapse Hide details

Building Expressions

To build an expression, either paste components into the Expression field or type directly in the Expression field.

• You can paste functions or commonly used system variables by selecting a group from the Function group list and double-clicking the function or variable in the Functions and Special Variables list (or select the function or variable and click Insert). Fill in any parameters indicated by question marks (applies only to functions). The function group labeled All provides a list of all available functions and system variables. A brief description of the currently selected function or variable is displayed in a reserved area in the dialog box.

• String constants must be enclosed in quotation marks or apostrophes.

• If values contain decimals, a period (.) must be used as the decimal indicator.

Related Topics

Load Predefined Validation Rules
Define Validation Rules
Define Single-Variable Rules


Validate Data

Validate Data,Validate Data,Validate Data
data validation,data validation,data validation
in Validate Data,in Validate Data,in Validate Data

The Validate Data dialog box allows you to identify suspicious and invalid cases, variables, and data values in the active dataset.

Example. A data analyst must provide a monthly customer satisfaction report to her client. The data she receives every month needs to be quality checked for incomplete customer IDs, variable values that are out of range, and combinations of variable values that are commonly entered in error. The Validate Data dialog box allows the analyst to specify the variables that uniquely identify customers, define single-variable rules for the valid variable ranges, and define cross-variable rules to catch impossible combinations. The procedure returns a report of the problem cases and variables. Moreover, the data has the same data elements each month, so the analyst is able to apply the rules to the new data file next month.

Statistics. The procedure produces lists of variables, cases, and data values that fail various checks, counts of violations of single-variable and cross-variable rules, and simple descriptive summaries of analysis variables.

Weights. The procedure ignores the weight variable specification and instead treats it as any other analysis variable.

Show me

To Validate Data Collapse Hide details

To Validate Data

This feature requires the Data Preparation option.

From the menus choose:

Data
Validation
Validate Data...

Expand Show details Collapse Hide details
Validate Data dialog box, Variables tab

Select one or more analysis variables for validation by basic variable checks or by single-variable validation rules.

Alternatively, you can:

Click the Cross-Variable Rules tab and apply one or more cross-variable rules.

Optionally, you can:

• Select one or more case identification variables to check for duplicate or incomplete IDs. Case ID variables are also used to label casewise output. If two or more case ID variables are specified, the combination of their values is treated as a case identifier.

Related Topics

Validate Data Basic Checks
Validate Data Single-Variable Rules
Validate Data Cross-Variable Rules
Validate Data Output
Validate Data Save


Validate Data Basic Checks

Validate Data,Validate Data,Validate Data
basic checks,basic checks,basic checks
Expand Show details Collapse Hide details
Validate Data dialog box, Basic Checks tab

The Basic Checks tab allows you to select basic checks for analysis variables, case identifiers, and whole cases.

Analysis Variables. If you selected any analysis variables on the Variables tab, you can select any of the following checks of their validity. The check box allows you to turn the checks on or off.

• Maximum percentage of missing values. Reports analysis variables with a percentage of missing values greater than the specified value. The specified value must be a positive number less than or equal to 100.

• Maximum percentage of cases in a single category. If any analysis variables are categorical, this option reports categorical analysis variables with a percentage of cases representing a single nonmissing category greater than the specified value. The specified value must be a positive number less than or equal to 100. The percentage is based on cases with nonmissing values of the variable.

• Maximum percentage of categories with count of 1. If any analysis variables are categorical, this option reports categorical analysis variables in which the percentage of the variable’s categories containing only one case is greater than the specified value. The specified value must be a positive number less than or equal to 100.

• Minimum coefficient of variation. If any analysis variables are scale, this option reports scale analysis variables in which the absolute value of the coefficient of variation is less than the specified value. This option applies only to variables in which the mean is nonzero. The specified value must be a non-negative number. Specifying 0 turns off the coefficient-of-variation check.

• Minimum standard deviation. If any analysis variables are scale, this option reports scale analysis variables whose standard deviation is less than the specified value. The specified value must be a non-negative number. Specifying 0 turns off the standard deviation check.

Case Identifiers. If you selected any case identifier variables on the Variables tab, you can select any of the following checks of their validity.

• Flag incomplete IDs. This option reports cases with incomplete case identifiers. For a particular case, an identifier is considered incomplete if the value of any ID variable is blank or missing.

• Flag duplicate IDs. This option reports cases with duplicate case identifiers. Incomplete identifiers are excluded from the set of possible duplicates.

Flag empty cases. This option reports cases in which all variables are empty or blank. For the purpose of identifying empty cases, you can choose to use all variables in the file (except any ID variables) or only analysis variables defined on the Variables tab.

How to Specify Basic Checks Collapse Hide details

This feature requires the Data Preparation option.

From the menus choose:

Data
Validation
Validate Data...

In the Validate Data dialog box, click the Basic Checks tab.

Related Topics

Validate Data
Validate Data Single-Variable Rules
Validate Data Cross-Variable Rules
Validate Data Output
Validate Data Save


Validate Data Single-Variable Rules

Validate Data,Validate Data,Validate Data
single-variable rules,single-variable rules,single-variable rules
single-variable validation rules,single-variable validation rules,single-variable validation rules
in Validate Data,in Validate Data,in Validate Data
Expand Show details Collapse Hide details
Validate Data dialog box, Single-Variable Rules tab

The Single-Variable Rules tab displays available single-variable validation rules and allows you to apply them to analysis variables. To define additional single-variable rules, click Define Rules. See the topic Define Single-Variable Rules for more information.

Analysis Variables. The list shows analysis variables, summarizes their distributions, and shows the number of rules applied to each variable. Note that user- and system-missing values are not included in the summaries. The Display drop-down list controls which variables are shown; you can choose from All variables, Numeric variables, String variables, and Date variables.

Rules. To apply rules to analysis variables, select one or more variables and check all rules that you want to apply in the Rules list. The Rules list shows only rules that are appropriate for the selected analysis variables. For example, if numeric analysis variables are selected, only numeric rules are shown; if a string variable is selected, only string rules are shown. If no analysis variables are selected or they have mixed data types, no rules are shown.

Variable Distributions. The distribution summaries shown in the Analysis Variables list can be based on all cases or on a scan of the first n cases, as specified in the Cases text box. Clicking Rescan updates the distribution summaries.

How to Apply Single-Variable Rules Collapse Hide details

This feature requires the Data Preparation option.

From the menus choose:

Data
Validation
Validate Data...

In the Validate Data dialog box, click the Single-Variable Rules tab.

Related Topics

Validate Data
Validate Data Basic Checks
Validate Data Cross-Variable Rules
Validate Data Output
Validate Data Save


Validate Data Cross-Variable Rules

Validate Data,Validate Data,Validate Data
cross-variable rules,cross-variable rules,cross-variable rules
cross-variable validation rules,cross-variable validation rules,cross-variable validation rules
in Validate Data,in Validate Data,in Validate Data
Expand Show details Collapse Hide details
Validate Data dialog box, Cross-Variable Rules tab

The Cross-Variable Rules tab displays available cross-variable rules and allows you to apply them to your data. To define additional cross-variable rules, click Define Rules. See the topic Define Cross-Variable Rules for more information.

How to Apply Cross-Variable Rules Collapse Hide details

From the menus choose:

This feature requires the Data Preparation option.

Data
Validation
Validate Data...

In the Validate Data dialog box, click the Cross-Variable Rules tab.

Related Topics

Validate Data
Validate Data Basic Checks
Validate Data Single-Variable Rules
Validate Data Output
Validate Data Save


Validate Data Output

Validate Data,Validate Data,Validate Data
output,output,output
Expand Show details Collapse Hide details
Validate Data dialog box, Output tab

Casewise Report. If you have applied any single-variable or cross-variable validation rules, you can request a report that lists validation rule violations for individual cases.

• Minimum Number of Violations. This option specifies the minimum number of rule violations required for a case to be included in the report. Specify a positive integer.

• Maximum Number of Cases. This option specifies the maximum number of cases included in the case report. Specify a positive integer less than or equal to 1000.

Single-Variable Validation Rules. If you have applied any single-variable validation rules, you can choose how to display the results or whether to display them at all.

• Summarize violations by analysis variable. For each analysis variable, this option shows all single-variable validation rules that were violated and the number of values that violated each rule. It also reports the total number of single-variable rule violations for each variable.

• Summarize violations by rule. For each single-variable validation rule, this option reports variables that violated the rule and the number of invalid values per variable. It also reports the total number of values that violated each rule across variables.

Display descriptive statistics. This option allows you to request descriptive statistics for analysis variables. A frequency table is generated for each categorical variable. A table of summary statistics including the mean, standard deviation, minimum, and maximum is generated for the scale variables.

Move cases with validation rule violations. This option moves cases with single-variable or cross-variable rule violations to the top of the active dataset for easy perusal.

How to Obtain Output Collapse Hide details

This feature requires the Data Preparation option.

From the menus choose:

Data
Validation
Validate Data...

In the Validate Data dialog box, click the Output tab.

Related Topics

Validate Data
Validate Data Basic Checks
Validate Data Single-Variable Rules
Validate Data Cross-Variable Rules
Validate Data Save


Validate Data Save

Validate Data,Validate Data,Validate Data
save variables,save variables,save variables
empty cases,empty cases,empty cases
in Validate Data,in Validate Data,in Validate Data
duplicate case identifiers,duplicate case identifiers,duplicate case identifiers
in Validate Data,in Validate Data,in Validate Data
incomplete case identifiers,incomplete case identifiers,incomplete case identifiers
in Validate Data,in Validate Data,in Validate Data
violations of validation rules,violations of validation rules,violations of validation rules
in Validate Data,in Validate Data,in Validate Data
validation rule violations,validation rule violations,validation rule violations
in Validate Data,in Validate Data,in Validate Data
Expand Show details Collapse Hide details
Validate Data dialog box, Save tab

The Save tab allows you to save variables that record rule violations to the active dataset.

Summary Variables. These are individual variables that can be saved. Check a box to save the variable. Default names for the variables are provided; you can edit them.

• Empty case indicator. Empty cases are assigned the value 1. All other cases are coded 0. Values of the variable reflect the scope specified on the Basic Checks tab.

• Duplicate ID Group. Cases that have the same case identifier (other than cases with incomplete identifiers) are assigned the same group number. Cases with unique or incomplete identifiers are coded 0.

• Incomplete ID indicator. Cases with empty or incomplete case identifiers are assigned the value 1. All other cases are coded 0.

• Validation rule violations. This is the casewise total count of single-variable and cross-variable validation rule violations.

Replace existing summary variables. Variables saved to the data file must have unique names or replace variables with the same name.

Save indicator variables. This option allows you to save a complete record of validation rule violations. Each variable corresponds to an application of a validation rule and has a value of 1 if the case violates the rule and a value of 0 if it does not.

How to Save Variables Collapse Hide details

This feature requires the Data Preparation option.

From the menus choose:

Data
Validation
Validate Data...

In the Validate Data dialog box, click the Save tab.

Related Topics

Validate Data
Validate Data Basic Checks
Validate Data Single-Variable Rules
Validate Data Cross-Variable Rules
Validate Data Output


Automated Data Preparation

automated data preparation,automated data preparation,automated data preparation
objectives,objectives,objectives
Interactive Data Preparation,Interactive Data Preparation,Interactive Data Preparation
Automatic Data Preparation,Automatic Data Preparation,Automatic Data Preparation

Preparing data for analysis is one of the most important steps in any project—and traditionally, one of the most time consuming. Automated Data Preparation (ADP) handles the task for you, analyzing your data and identifying fixes, screening out fields that are problematic or not likely to be useful, deriving new attributes when appropriate, and improving performance through intelligent screening techniques. You can use the algorithm in fully automatic fashion, allowing it to choose and apply fixes, or you can use it in interactive fashion, previewing the changes before they are made and accept or reject them as desired.

Using ADP enables you to make your data ready for model building quickly and easily, without needing prior knowledge of the statistical concepts involved. Models will tend to build and score more quickly; in addition, using ADP improves the robustness of automated modeling processes.

Note: when ADP prepares a field for analysis, it creates a new field containing the adjustments or transformations, rather than replacing the existing values and properties of the old field. The old field is not used in further analysis; its role is set to None.

Example. An insurance company with limited resources to investigate homeowner's insurance claims wants to build a model for flagging suspicious, potentially fraudulent claims. Before building the model, they will ready the data for modeling using automated data preparation. Since they want to be able to review the proposed transformations before the transformations are applied, they will use automated data preparation in interactive mode. See the topic Using Automated Data Preparation Interactively for more information.

An automotive industry group keeps track of the sales for a variety of personal motor vehicles. In an effort to be able to identify over- and underperforming models, they want to establish a relationship between vehicle sales and vehicle characteristics. They will use automated data preparation to prepare the data for analysis, and build models using the data "before" and "after" preparation to see how the results differ. See the topic Using Automated Data Preparation Automatically for more information.

Expand Show details Collapse Hide details
Automated Data Preparation Objective tab

What is your objective? Automated data preparation recommends data preparation steps that will affect the speed with which other algorithms can build models and improve the predictive power of those models. This can include transforming, constructing and selecting features. The target can also be transformed. You can specify the model-building priorities that the data preparation process should concentrate on.

• Balance speed and accuracy. This option prepares the data to give equal priority to both the speed with which data are processed by model-building algorithms and the accuracy of the predictions.

• Optimize for speed. This option prepares the data to give priority to the speed with which data are processed by model-building algorithms. When you are working with very large datasets, or are looking for a quick answer, select this option.

• Optimize for accuracy. This option prepares the data to give priority to the accuracy of predictions produced by model-building algorithms.

• Custom analysis. When you want to manually change the algorithm on the Settings tab, select this option. Note that this setting is automatically selected if you subsequently make changes to options on the Settings tab that are incompatible with one of the other objectives.

This procedure pastes ADP command syntax.

See Automated Data Preparation Algorithms for computational details for this feature.

To Obtain Interactive Data Preparation

To Obtain Automatic Data Preparation

Related Topics

To Obtain Automatic Data Preparation
To Obtain Interactive Data Preparation
Fields Tab (automated data preparation)
Settings Tab (automated data preparation)
Analysis Tab (automated data preparation)
Backtransform Scores
ADP


To Obtain Automatic Data Preparation

From the menus choose:

Transform
Prepare Data for Modeling
Automatic...

Click Run.

Optionally, you can:

• Specify an objective on the Objective tab.

• Specify field assignments on the Fields tab.

• Specify expert settings on the Settings tab.

Related Topics

Automated Data Preparation
To Obtain Interactive Data Preparation
Fields Tab (automated data preparation)
Settings Tab (automated data preparation)
Analysis Tab (automated data preparation)
Backtransform Scores


To Obtain Interactive Data Preparation

From the menus choose:

Transform
Prepare Data for Modeling
Interactive...

Click Analyze in the toolbar at the top of the dialog.

Click on the Analysis tab and review the suggested data preparation steps.

If satisfied, click Run. Otherwise, click Clear Analysis, change any settings as desired, and click Analyze.

Optionally, you can:

• Specify an objective on the Objective tab.

• Specify field assignments on the Fields tab.

• Specify expert settings on the Settings tab.

• Save the suggested data preparation steps to an XML file by clicking Save XML.

Related Topics

Automated Data Preparation
To Obtain Automatic Data Preparation
Fields Tab (automated data preparation)
Settings Tab (automated data preparation)
Analysis Tab (automated data preparation)
Backtransform Scores


Fields Tab (automated data preparation)

automated data preparation,automated data preparation,automated data preparation
fields,fields,fields
Expand Show details Collapse Hide details
Automated Data Preparation Fields tab

The Fields tab specifies which fields should be prepared for further analysis.

Use predefined roles. This option uses existing field information. If there is a single field with a role as a Target, it will be used as the target; otherwise there will be no target. All fields with a predefined role as an Input will be used as inputs. At least one input field is required. See the topic Roles for more information.

Use custom field assignments. When you override field roles by moving fields from their default lists, the dialog automatically switches to this option. When making custom field assignments, specify the following fields:

• Target (optional). If you plan to build models that require a target, select the target field. This is similar to setting the field role to Target.

• Inputs. Select one or more input fields. This is similar to setting the field role to Input.

To Obtain Interactive Data Preparation

To Obtain Automatic Data Preparation

Related Topics

Automated Data Preparation
To Obtain Automatic Data Preparation
To Obtain Interactive Data Preparation
Settings Tab (automated data preparation)
Analysis Tab (automated data preparation)
Backtransform Scores


Settings Tab (automated data preparation)

The Settings tab comprises several different groups of settings that you can modify to fine-tune how the algorithm processes your data. If you make any changes to the default settings that are incompatible with the other objectives, the Objective tab is automatically updated to select the Customize analysis option.

To Obtain Interactive Data Preparation

To Obtain Automatic Data Preparation

Related Topics

Automated Data Preparation
To Obtain Automatic Data Preparation
To Obtain Interactive Data Preparation
Fields Tab (automated data preparation)
Analysis Tab (automated data preparation)
Backtransform Scores
Prepare Dates & Times (automated data preparation)
Exclude Fields (automated data preparation)
Adjust Measurement (automated data preparation)
Improve Data Quality (automated data preparation)
Rescale Fields (automated data preparation)
Transform Fields (automated data preparation)
Select and Construct (automated data preparation)
Name Fields (automated data preparation)
Applying and Saving Transformations (automated data preparation)


Prepare Dates & Times (automated data preparation)

automated data preparation,automated data preparation,automated data preparation
prepare dates and times,prepare dates and times,prepare dates and times
cyclical time elements,cyclical time elements,cyclical time elements
automated data preparation,automated data preparation,automated data preparation
compute durations,compute durations,compute durations
automated data preparation,automated data preparation,automated data preparation
duration computation,duration computation,duration computation
automated data preparation,automated data preparation,automated data preparation
Expand Show details Collapse Hide details
Automated Data Preparation Prepare Dates & Times Settings

Many modeling algorithms are unable to directly handle date and time details; these settings enable you to derive new duration data that can be used as model inputs from dates and times in your existing data. The fields containing dates and times must be predefined with date or time storage types. The original date and time fields will not be recommended as model inputs following automated data preparation.

Prepare dates and times for modeling. Deselecting this option disables all other Prepare Dates & Times controls while maintaining the selections.

Compute elapsed time until reference date. This produces the number of years/months/days since a reference date for each variable containing dates.

• Reference Date. Specify the date from which the duration will be calculated with regard to the date information in the input data. Selecting Today’s date means that the current system date is always used when ADP is executed. To use a specific date, select Fixed date and enter the required date.

• Units for Date Duration. Specify whether ADP should automatically decide on the date duration unit, or select from Fixed units of Years, Months, or Days.

Compute elapsed time until reference time. This produces the number of hours/minutes/seconds since a reference time for each variable containing times.

• Reference Time. Specify the time from which the duration will be calculated with regard to the time information in the input data. Selecting Current time means that the current system time is always used when ADP is executed. To use a specific time, select Fixed time and enter the required details.

• Units for Time Duration. Specify whether ADP should automatically decide on the time duration unit, or select from Fixed units of Hours, Minutes, or Seconds.

Extract Cyclical Time Elements. Use these settings to split a single date or time field into one or more fields. For example if you select all three date checkboxes, the input date field "1954-05-23" is split into three fields: 1954, 5, and 23, each using the suffix defined on the Field Names panel, and the original date field is ignored.

• Extract from dates. For any date inputs, specify if you want to extract years, months, days, or any combination.

• Extract from times. For any time inputs, specify if you want to extract hours, minutes, seconds, or any combination.

To Obtain Interactive Data Preparation

To Obtain Automatic Data Preparation

Related Topics

Settings Tab (automated data preparation)
Exclude Fields (automated data preparation)
Adjust Measurement (automated data preparation)
Improve Data Quality (automated data preparation)
Rescale Fields (automated data preparation)
Transform Fields (automated data preparation)
Select and Construct (automated data preparation)
Name Fields (automated data preparation)
Applying and Saving Transformations (automated data preparation)


Exclude Fields (automated data preparation)

automated data preparation,automated data preparation,automated data preparation
exclude fields,exclude fields,exclude fields
Expand Show details Collapse Hide details
Automated Data Preparation Exclude Fields Settings

Poor quality data can affect the accuracy of your predictions; therefore, you can specify the acceptable quality level for input features. All fields that are constant or have 100% missing values are automatically excluded.

Exclude low quality input fields. Deselecting this option disables all other Exclude Fields controls while maintaining the selections.

Exclude fields with too many missing values. Fields with more than the specified percentage of missing values are removed from further analysis. Specify a value greater than or equal to 0, which is equivalent to deselecting this option, and less than or equal to 100, though fields with all missing values are automatically excluded. The default is 50.

Exclude nominal fields with too many unique categories. Nominal fields with more than the specified number of categories are removed from further analysis. Specify a positive integer. The default is 100. This is useful for automatically removing fields containing record-unique information from modeling, like ID, address, or name.

Exclude categorical fields with too many values in a single category. Ordinal and nominal fields with a category that contains more than the specified percentage of the records are removed from further analysis. Specify a value greater than or equal to 0, equivalent to deselecting this option, and less than or equal to 100, though constant fields are automatically excluded. The default is 95.

To Obtain Interactive Data Preparation

To Obtain Automatic Data Preparation

Related Topics

Settings Tab (automated data preparation)
Prepare Dates & Times (automated data preparation)
Adjust Measurement (automated data preparation)
Improve Data Quality (automated data preparation)
Rescale Fields (automated data preparation)
Transform Fields (automated data preparation)
Select and Construct (automated data preparation)
Name Fields (automated data preparation)
Applying and Saving Transformations (automated data preparation)


Adjust Measurement (automated data preparation)

automated data preparation,automated data preparation,automated data preparation
adjust measurement level,adjust measurement level,adjust measurement level
Expand Show details Collapse Hide details
Automated Data Preparation Adjust Measurement Settings

Adjust measurement level. Deselecting this option disables all other Adjust Measurement controls while maintaining the selections.

Measurement Level. Specify whether the measurement level of continuous fields with "too few" values can be adjusted to ordinal, and ordinal fields with "too many" values can be adjusted to continuous.

• Maximum number of values for ordinal fields. Ordinal fields with more than the specified number of categories are recast as continuous fields. Specify a positive integer. The default is 10. This value must be greater than or equal to the minimum number of values for continuous fields.

• Minimum number of values for continuous fields. Continuous fields with less than the specified number of unique values are recast as ordinal fields. Specify a positive integer. The default is 5. This value must be less than or equal to the maximum number of values for ordinal fields.

To Obtain Interactive Data Preparation

To Obtain Automatic Data Preparation

Related Topics

Settings Tab (automated data preparation)
Prepare Dates & Times (automated data preparation)
Exclude Fields (automated data preparation)
Improve Data Quality (automated data preparation)
Rescale Fields (automated data preparation)
Transform Fields (automated data preparation)
Select and Construct (automated data preparation)
Name Fields (automated data preparation)
Applying and Saving Transformations (automated data preparation)


Improve Data Quality (automated data preparation)

automated data preparation,automated data preparation,automated data preparation
improve data quality,improve data quality,improve data quality
Expand Show details Collapse Hide details
Automated Data Preparation Improve Data Quality Settings

Prepare fields to improve data quality. Deselecting this option disables all other Improve Data Quality controls while maintaining the selections.

Outlier Handling. Specify whether to replace outliers for the inputs and target; if so, specify an outlier cutoff criterion, measured in standard deviations, and a method for replacing outliers. Outliers can be replaced by either trimming (setting to the cutoff value), or by setting them as missing values. Any outliers set to missing values follow the missing value handling settings selected below.

Replace Missing Values. Specify whether to replace missing values of continuous, nominal, or ordinal fields.

Reorder Nominal Fields. Select this to recode the values of nominal (set) fields from smallest (least frequently occurring) to largest (most frequently occurring) category. The new field values start with 0 as the least frequent category. Note that the new field will be numeric even if the original field is a string. For example, if a nominal field's data values are "A", "A", "A", "B", "C", "C", then automated data preparation would recode "B" into 0, "C" into 1, and "A" into 2.

To Obtain Interactive Data Preparation

To Obtain Automatic Data Preparation

Related Topics

Settings Tab (automated data preparation)
Prepare Dates & Times (automated data preparation)
Exclude Fields (automated data preparation)
Adjust Measurement (automated data preparation)
Rescale Fields (automated data preparation)
Transform Fields (automated data preparation)
Select and Construct (automated data preparation)
Name Fields (automated data preparation)
Applying and Saving Transformations (automated data preparation)


Rescale Fields (automated data preparation)

automated data preparation,automated data preparation,automated data preparation
rescale fields,rescale fields,rescale fields
analysis weight,analysis weight,analysis weight
in automated data preparation,in automated data preparation,in automated data preparation
Box-Cox transformation,Box-Cox transformation,Box-Cox transformation
in automated data preparation,in automated data preparation,in automated data preparation
Expand Show details Collapse Hide details
Automated Data Preparation Rescale Fields Settings

Rescale fields. Deselecting this option disables all other Rescale Fields controls while maintaining the selections.

Analysis Weight. This variable contains analysis (regression or sampling) weights. Analysis weights are used to account for differences in variance across levels of the target field. Select a continuous field.

Continuous Input Fields. This will normalize continuous input fields using a z-score transformation or min/max transformation. Rescaling inputs is especially useful when you select Perform feature construction on the Select and Construct settings.

• Z-score transformation. Using the observed mean and standard deviation as population parameter estimates, the fields are standardized and then the z scores are mapped to the corresponding values of a normal distribution with the specified Final mean and Final standard deviation. Specify a number for Final mean and a positive number for Final standard deviation. The defaults are 0 and 1, respectively, corresponding to standardized rescaling.

• Min/max transformation. Using the observed minimum and maximum as population parameter estimates, the fields are mapped to the corresponding values of a uniform distribution with the specified Minimum and Maximum. Specify numbers with Maximum greater than Minimum.

automated data preparation,automated data preparation,automated data preparation
normalize continuous target,normalize continuous target,normalize continuous target
normalize continuous target,normalize continuous target,normalize continuous target

Continuous Target. This transforms a continuous target using the Box-Cox transformation into a field that has an approximately normal distribution with the specified Final mean and Final standard deviation. Specify a number for Final mean and a positive number for Final standard deviation. The defaults are 0 and 1, respectively.

Note: If a target has been transformed by ADP, subsequent models built using the transformed target score the transformed units. In order to interpret and use the results, you must convert the predicted value back to the original scale. See the topic Backtransform Scores for more information.

To Obtain Interactive Data Preparation

To Obtain Automatic Data Preparation

Related Topics

Settings Tab (automated data preparation)
Prepare Dates & Times (automated data preparation)
Exclude Fields (automated data preparation)
Adjust Measurement (automated data preparation)
Improve Data Quality (automated data preparation)
Transform Fields (automated data preparation)
Select and Construct (automated data preparation)
Name Fields (automated data preparation)
Applying and Saving Transformations (automated data preparation)


Transform Fields (automated data preparation)

automated data preparation,automated data preparation,automated data preparation
transform fields,transform fields,transform fields
Expand Show details Collapse Hide details
Automated Data Preparation Transform Fields Settings

To improve the predictive power of your data, you can transform the input fields.

Transform field for modeling. Deselecting this option disables all other Transform Fields controls while maintaining the selections.

Categorical Input Fields

• Merge sparse categories to maximize association with target. Select this to make a more parsimonious model by reducing the number of fields to be processed in association with the target. Similar categories are identified based upon the relationship between the input and the target. Categories that are not significantly different (that is, having a p-value greater than the value specified) are merged. Specify a value greater than 0 and less than or equal to 1. If all categories are merged into one, the original and derived versions of the field are excluded from further analysis because they have no value as a predictor.

• When there is no target, merge sparse categories based on counts. If the dataset has no target, you can choose to merge sparse categories of ordinal and nominal fields. The equal frequency method is used to merge categories with less than the specified minimum percentage of the total number of records. Specify a value greater than or equal to 0 and less than or equal to 100. The default is 10. Merging stops when there are not categories with less than the specified minimum percent of cases, or when there are only two categories left.

Continuous Input Fields. If the dataset includes a categorical target, you can bin continuous inputs with strong associations to improve processing performance. Bins are created based upon the properties of "homogeneous subsets", which are identified by the Scheffe method using the specified p-value as the alpha for the critical value for determining homogeneous subsets. Specify a value greater than 0 and less than or equal to 1. The default is 0.05. If the binning operation results in a single bin for a particular field, the original and binned versions of the field are excluded because they have no value as a predictor.

Note: Binning in ADP differs from optimal binning. Optimal binning uses entropy information to convert a continuous field to a categorical field; this needs to sort data and store it all in memory. ADP uses homogeneous subsets to bin a continuous field, which means that ADP binning does not need to sort data and does not store all data in memory. The use of the homogeneous subset method to bin a continuous field means that the number of categories after binning is always less than or equal to the number of categories in the target.

To Obtain Interactive Data Preparation

To Obtain Automatic Data Preparation

Related Topics

Settings Tab (automated data preparation)
Prepare Dates & Times (automated data preparation)
Exclude Fields (automated data preparation)
Adjust Measurement (automated data preparation)
Improve Data Quality (automated data preparation)
Rescale Fields (automated data preparation)
Select and Construct (automated data preparation)
Name Fields (automated data preparation)
Applying and Saving Transformations (automated data preparation)


Select and Construct (automated data preparation)

automated data preparation,automated data preparation,automated data preparation
feature construction,feature construction,feature construction
feature selection,feature selection,feature selection
feature selection,feature selection,feature selection
in automated data preparation,in automated data preparation,in automated data preparation
feature construction,feature construction,feature construction
in automated data preparation,in automated data preparation,in automated data preparation
Expand Show details Collapse Hide details
Automated Data Preparation Select and Construct Settings

To improve the predictive power of your data, you can construct new fields based on the existing fields.

Perform feature selection. A continuous input is removed from the analysis if the p-value for its correlation with the target is greater than the specified p-value.

Perform feature construction. Select this option to derive new features from a combination of several existing features. The old features are not used in further analysis. This option only applies to continuous input features where the target is continuous, or where there is no target.

To Obtain Interactive Data Preparation

To Obtain Automatic Data Preparation

Related Topics

Settings Tab (automated data preparation)
Prepare Dates & Times (automated data preparation)
Exclude Fields (automated data preparation)
Adjust Measurement (automated data preparation)
Improve Data Quality (automated data preparation)
Rescale Fields (automated data preparation)
Transform Fields (automated data preparation)
Name Fields (automated data preparation)
Applying and Saving Transformations (automated data preparation)


Name Fields (automated data preparation)

automated data preparation,automated data preparation,automated data preparation
name fields,name fields,name fields
Expand Show details Collapse Hide details
Automated Data Preparation Name Fields Settings

To easily identify new and transformed features, ADP creates and applies basic new names, prefixes, or suffixes. You can amend these names to be more relevant to your own needs and data.

Transformed and Constructed Fields. Specify the name extensions to be applied to transformed target and input fields.

In addition, specify the prefix name to be applied to any features that are constructed via the Select and Construct settings. The new name is created by attaching a numeric suffix to this prefix root name. The format of the number depends on how many new features are derived, for example:

• 1-9 constructed features will be named: feature1 to feature9.

• 10-99 constructed features will be named: feature01 to feature99.

• 100-999 constructed features will be named: feature001 to feature999, and so on.

This ensures that the constructed features will sort in a sensible order no matter how many there are.

Computed Durations. Specify the name extensions to be applied to durations computed from both dates and times.

Extracted Cyclical Time Elements. Specify the name extensions to be applied to cyclical elements extracted from both dates and times.

To Obtain Interactive Data Preparation

To Obtain Automatic Data Preparation

Related Topics

Settings Tab (automated data preparation)
Prepare Dates & Times (automated data preparation)
Exclude Fields (automated data preparation)
Adjust Measurement (automated data preparation)
Improve Data Quality (automated data preparation)
Rescale Fields (automated data preparation)
Transform Fields (automated data preparation)
Select and Construct (automated data preparation)
Applying and Saving Transformations (automated data preparation)


Applying and Saving Transformations (automated data preparation)

automated data preparation,automated data preparation,automated data preparation
apply transformations,apply transformations,apply transformations

Depending upon whether you are using the Interactive or Automatic Data Preparation dialogs, the settings for applying and saving transformations are slightly different.

Interactive Data Preparation Apply Transformations Settings

Expand Show details Collapse Hide details
Interactive Data Preparation Apply Transformations Settings

Transformed Data. These settings specify where to save the transformed data.

• Add new fields to the active dataset. Any fields created by automated data preparation are added as new fields to the active dataset. Update roles for analyzed fields will set the role to None for any fields that are excluded from further analysis by automated data preparation.

• Create a new dataset or file containing the transformed data. Fields recommended by automated data preparation are added to a new dataset or file. Include unanalyzed fields adds fields in the original dataset that were not specified on the Fields tab to the new dataset. This is useful for transferring fields containing information not used in modeling, like ID or address, or name, into the new dataset.

Automatic Data Preparation Apply and Save Settings

Expand Show details Collapse Hide details
Automatic Data Preparation Apply and Save Settings

The Transformed Data group is the same as in Interactive Data Preparation. In Automatic Data preparation, the following additional options are available:

Apply transformations. In the Automatic Data Preparation dialogs, deselecting this option disables all other Apply and Save controls while maintaining the selections.

Save transformations as syntax. This saves the recommended transformations as command syntax to an external file. The Interactive Data Preparation dialog does not have this control because it will paste the transformations as command syntax to the syntax window if you click Paste.

Save transformations as XML. This saves the recommended transformations as XML to an external file, which can be merged with model PMML using TMS MERGE or applied to another dataset using TMS IMPORT. The Interactive Data Preparation dialog does not have this control because it will save the transformations as XML if you click Save XML in the toolbar at the top of the dialog.

To Obtain Interactive Data Preparation

To Obtain Automatic Data Preparation

Related Topics

Settings Tab (automated data preparation)
Prepare Dates & Times (automated data preparation)
Exclude Fields (automated data preparation)
Adjust Measurement (automated data preparation)
Improve Data Quality (automated data preparation)
Rescale Fields (automated data preparation)
Transform Fields (automated data preparation)
Select and Construct (automated data preparation)
Name Fields (automated data preparation)


Analysis Tab (automated data preparation)

automated data preparation,automated data preparation,automated data preparation
model view,model view,model view
model view,model view,model view
in automated data preparation,in automated data preparation,in automated data preparation

Note: The Analysis tab is used in the Interactive Data Preparation dialog to allow you to review the recommended transformations. The Automatic Data Preparation dialog does not include this step.

When you are satisfied with the ADP settings, including any changes made on the Objective, Fields, and Settings tabs, click Analyze Data; the algorithm applies the settings to the data inputs and displays the results on the Analysis tab.

The Analysis tab contains both tabular and graphical output that summarizes the processing of your data and displays recommendations as to how the data may be modified or improved for scoring. You can then review and either accept or reject those recommendations.

Expand Show details Collapse Hide details
Automated Data Preparation Analysis Tab

The Analysis tab is made up of two panels, the main view on the left and the linked, or auxiliary, view on the right. There are three main views:

• Field Processing Summary (the default). See the topic Field Processing Summary (automated data preparation) for more information.

• Fields. See the topic Fields (automated data preparation) for more information.

• Action Summary. See the topic Action Summary (automated data preparation) for more information.

There are four linked/auxiliary views:

• Predictive Power (the default). See the topic Predictive Power (automated data preparation) for more information.

• Fields Table. See the topic Fields Table (automated data preparation) for more information.

• Field Details. See the topic Field Details (automated data preparation) for more information.

• Action Details. See the topic Action Details (automated data preparation) for more information.

automated data preparation,automated data preparation,automated data preparation
links between views,links between views,links between views

Links between views

Within the main view, underlined text in the tables controls the display in the linked view. Clicking on the text allows you to get details on a particular field, set of fields, or processing step. The link that you last selected is shown in a darker color; this helps you identify the connection between the contents of the two view panels.

automated data preparation,automated data preparation,automated data preparation
reset views,reset views,reset views

Resetting the views

To redisplay the original Analysis recommendations and abandon any changes you have made to the Analysis views, click Reset at the bottom of the main view panel.

Related Topics

Automated Data Preparation
To Obtain Automatic Data Preparation
To Obtain Interactive Data Preparation
Fields Tab (automated data preparation)
Settings Tab (automated data preparation)
Backtransform Scores
Field Processing Summary (automated data preparation)
Fields (automated data preparation)
Action Summary (automated data preparation)
Predictive Power (automated data preparation)
Fields Table (automated data preparation)
Field Details (automated data preparation)
Action Details (automated data preparation)


Field Processing Summary (automated data preparation)

automated data preparation,automated data preparation,automated data preparation
field processing summary,field processing summary,field processing summary
Expand Show details Collapse Hide details
Field Processing Summary

The Field Processing Summary table gives a snapshot of the projected overall impact of processing, including changes to the state of the features and the number of features constructed.

Note that no model is actually built, so there isn't a measure or graph of the change in overall predictive power before and after data preparation; instead, you can display graphs of the predictive power of individual recommended predictors.

The table displays the following information:

• The number of target fields.

• The number of original input fields.

• The fields recommended for use in analysis and modeling. This includes the total number of fields recommended; the number of original, untransformed, fields; the number of transformed fields (excluding intermediate versions of any field, fields derived from date/time fields, and constructed fields); the number of fields derived from date/time fields; and the number of constructed fields.

• The number of input fields not recommended for use in any form, whether in their original form, as a derived field, or as input to a constructed feature.

Where any of the Fields information is underlined, click to display more details in a linked view. Details of the Target, Input features, and Input features not used are shown in the Fields Table linked view. See the topic Fields Table (automated data preparation) for more information. Features recommended for use in analysis are displayed in the Predictive Power linked view. See the topic Predictive Power (automated data preparation) for more information.

Related Topics

Analysis Tab (automated data preparation)
Fields (automated data preparation)
Action Summary (automated data preparation)
Predictive Power (automated data preparation)
Fields Table (automated data preparation)
Field Details (automated data preparation)
Action Details (automated data preparation)


Fields (automated data preparation)

automated data preparation,automated data preparation,automated data preparation
field analysis,field analysis,field analysis
Expand Show details Collapse Hide details
Fields

The Fields main view displays the processed fields and whether ADP recommends using them in downstream models. You can override the recommendation for any field; for example, to exclude constructed features or include features that ADP recommends excluding. If a field has been transformed, you can decide whether to accept the suggested transformation or use the original version.

The Fields view consists of two tables, one for the target and one for features that were either processed or created.

Target table

The Target table is only shown if a target is defined in the data.

The table contains two columns:

• Name. This is the name or label of the target field; the original name is always used, even if the field has been transformed.

• Type. This displays the icon representing the measurement level; hover the mouse over the icon to display a label (continuous, ordered set, set, and so on) that describes the data.

If the target has been transformed the Type column reflects the final transformed version. Note: you cannot turn off transformations for the target.

Features table

The Features table is always shown. Each row of the table represents a field. By default the rows are sorted in descending order of predictive power.

For ordinary features, the original name is always used as the row name. Both original and derived versions of date/time fields appear in the table (in separate rows); the table also includes constructed features.

Note that transformed versions of fields shown in the table always represent the final versions.

The table contains the following columns:

• Version to Use. This displays a drop-down list that controls whether a field will be used downstream and whether to use the suggested transformations. By default, the drop-down list reflects the recommendations.

For ordinary features that have been transformed the drop-down list has three choices: Transformed, Original, and Do not use.

For untransformed ordinary features the choices are: Original and Do not use.

For derived date/time fields and constructed features the choices are: Transformed and Do not use.

For original date fields the drop-down list is disabled and set to Do not use.

Note: For features with both original and transformed versions, changing between Original and Transformed versions automatically updates the Type and Predictive Power settings for those features.

• Name. Each field's name is a link. Click on a name to display more information about the field in the linked view. See the topic Field Details (automated data preparation) for more information.

• Type. This displays the icon representing the data type; hover the mouse over the icon to display a label (continuous, ordered set, set, and so on) that describes the data.

• Predictive Power. Predictive power is displayed only for fields that ADP recommends. This column is not displayed if there is no target defined. Predictive power ranges from 0 to 1, with larger values indicating "better" predictors. In general, predictive power is useful for comparing predictors within an ADP analysis, but predictive power values should not be compared across analyses.

By default only recommended fields are shown in the Features table. To display the remaining fields, select the Include nonrecommended fields in table box above the table; these fields are then displayed at the bottom of the table.

Related Topics

Analysis Tab (automated data preparation)
Field Processing Summary (automated data preparation)
Action Summary (automated data preparation)
Predictive Power (automated data preparation)
Fields Table (automated data preparation)
Field Details (automated data preparation)
Action Details (automated data preparation)


Action Summary (automated data preparation)

automated data preparation,automated data preparation,automated data preparation
action summary,action summary,action summary
Expand Show details Collapse Hide details
Action Summary

For each action taken by automated data preparation, input features are transformed and/or filtered out; fields that survive one action are used in the next. The fields that survive through to the last step are then recommended for use in modeling, whilst inputs to transformed and constructed features are filtered out.

The Action Summary is a simple table that lists the processing actions taken by ADP. Where any Description is underlined, click to display more details in a linked view about the actions taken. See the topic Action Details (automated data preparation) for more information.

Note: Only the original and final transformed versions of each field are shown, not any intermediate versions that were used during analysis.

Related Topics

Analysis Tab (automated data preparation)
Field Processing Summary (automated data preparation)
Fields (automated data preparation)
Predictive Power (automated data preparation)
Fields Table (automated data preparation)
Field Details (automated data preparation)
Action Details (automated data preparation)


Predictive Power (automated data preparation)

automated data preparation,automated data preparation,automated data preparation
predictive power,predictive power,predictive power
Expand Show details Collapse Hide details
Predictive Power

Displayed by default when the analysis is first run, or when you select Features recommended for use in analysis in the Field Processing Summary main view, the chart displays the predictive power of recommended features. Fields are sorted by predictive power, with the field with the highest value appearing at the top.

For transformed versions of ordinary features, the field name reflects your choice of suffix in the Field Names panel of the Settings tab; for example: _transformed.

Type icons are displayed after the individual field names.

The predictive power of each recommended feature, or predictor, is computed from either a linear regression or naïve Bayes model, depending upon whether the target is continuous or categorical.

Related Topics

Analysis Tab (automated data preparation)
Field Processing Summary (automated data preparation)
Fields (automated data preparation)
Action Summary (automated data preparation)
Fields Table (automated data preparation)
Field Details (automated data preparation)
Action Details (automated data preparation)


Fields Table (automated data preparation)

automated data preparation,automated data preparation,automated data preparation
fields table,fields table,fields table
Expand Show details Collapse Hide details
Fields Table

Displayed when you click Target, Input features, or Input features not used in the Field Processing Summary main view, the Fields Table view displays a simple table listing the relevant features.

The table contains two columns:

• Name. The feature, or field, name.

For targets, the original name or label is used, even if the target has been transformed.

For transformed versions of ordinary features, the name reflects your choice of suffix in the Field Names panel of the Settings tab; for example: _transformed.

For fields derived from dates and times the name of the final transformed version is used; for example: bdate_years.

For constructed features, the name of the constructed feature is used; for example: Feature1.

• Type. This displays the icon representing the data type.

For the Target, the Type always reflects the transformed version (if the target has been transformed); for example, changed from ordinal (ordered set) to continuous (range, scale), or vice versa.

Related Topics

Analysis Tab (automated data preparation)
Field Processing Summary (automated data preparation)
Fields (automated data preparation)
Action Summary (automated data preparation)
Predictive Power (automated data preparation)
Field Details (automated data preparation)
Action Details (automated data preparation)


Field Details (automated data preparation)

automated data preparation,automated data preparation,automated data preparation
field details,field details,field details
Expand Show details Collapse Hide details
Field Details

Displayed when you click any Name in the Fields main view, the Field Details view contains distribution, missing values, and predictive power charts (if applicable) for the selected field. In addition, the processing history for the field and the name of the transformed field are also shown (if applicable)

For each chart set, two versions are shown side by side to compare the field with and without transformations applied; if a transformed version of the field does not exist, a chart is shown for the original version only. For derived date or time fields and constructed features the charts are only shown for the new feature.

Note: If a field is excluded due to having too many categories only the processing history is shown.

Distribution Chart

Continuous field distribution is shown as a histogram, with a normal curve overlaid, and a vertical reference line for the mean value; categorical fields are displayed as a bar chart.

Histograms are labeled to show standard deviation and skewness; however, skewness is not displayed if the number of values is 2 or fewer or the variance of the original field is less than 10-20.

Hover the mouse over the chart to display either the mean for histograms, or the count and percentage of the total number of records for categories in bar charts.

Missing Value Chart

Pie charts compare the percentage of missing values with and without transformations applied; the chart labels show the percentage.

If ADP carried out missing value handling, the post-transformation pie chart also includes the replacement value as a label -- that is, the value used in place of missing values.

Hover the mouse over the chart to display the missing value count and percentage of the total number of records.

Predictive Power Chart

For recommended fields, bar charts display the predictive power before and after transformation. If the target has been transformed, the calculated predictive power is in respect to the transformed target.

Note: Predictive power charts are not shown if no target is defined, or if the target is clicked in the main view panel.

Hover the mouse over the chart to display the predictive power value.

Processing History Table

The table shows how the transformed version of a field was derived. Actions taken by ADP are listed in the order in which they were carried out; however, for certain steps multiple actions may have been carried out for a particular field.

Note: This table is not shown for fields that have not been transformed.

The information in the table is broken down into three columns:

• Step. The name of the step. For example, Continuous Features. See the topic Action Details (automated data preparation) for more information.

• Actions Taken. The list of processing carried out. For example, Transform to standard units.

• Function. Only shown only for constructed features, this displays the linear combination of input fields, for example, .06*age + 1.21*height.

Related Topics

Analysis Tab (automated data preparation)
Field Processing Summary (automated data preparation)
Fields (automated data preparation)
Action Summary (automated data preparation)
Predictive Power (automated data preparation)
Fields Table (automated data preparation)
Action Details (automated data preparation)


Action Details (automated data preparation)

automated data preparation,automated data preparation,automated data preparation
action details,action details,action details
Expand Show details Collapse Hide details
ADP Analysis - Action Details

Displayed when you select any underlined Description in the Action Summary main view, the Action Details linked view displays both action-specific and common information for each processing step that was carried out; the action-specific details are displayed first.

For each action, the description is used as the title at the top of the linked view. The action-specific details are displayed below the title, and may include details of the number of derived features, fields recast, target transformations, categories merged or reordered, and features constructed or excluded.

As each action is processed, the number of features used in the processing may change, for example as features are excluded or merged.

Note: If an action was turned off, or no target was specified, an error message is displayed in place of the action details when the step is clicked in the Action Summary main view.

There are nine possible actions; however, not all are necessarily active for every analysis.

Text Fields Table

The table displays the number of:

• Features excluded from analysis.

Date and Time Features Table

The table displays the number of:

• Durations derived from date and time features.

• Date and time elements.

• Derived date and time features, in total.

The reference date or time is displayed as a footnote if any date durations were calculated.

Feature Screening Table

The table displays the number of the following features excluded from processing:

• Constants.

• Features with too many missing values.

• Features with too many cases in a single category.

• Nominal fields (sets) with too many categories.

• Features screened out, in total.

Check Type Table

The table displays the numbers of fields recast, broken down into the following:

• Ordinal fields (ordered sets) recast as continuous fields.

• Continuous fields recast as ordinal fields (ordered sets).

• Total number recast.

If no fields (target or features) were continuous or ordinal (ordered sets), this is shown as a footnote.

Outliers Table

The table displays counts of how any outliers were handled.

• Either the number of continuous fields for which outliers were found and trimmed, or the number of continuous fields for which outliers were found and set to missing, depending on your settings in the Prepare Inputs & Target panel on the Settings tab.

• The number of continuous fields excluded because they were constant, after outlier handling.

One footnote shows the outlier cutoff value; while another footnote is shown if no input fields (target or features) were continuous.

Missing Values Table

The table displays the numbers of fields that had missing values replaced, broken down into:

• Target. This row is not shown if no target is specified.

• Features. This is further broken down into the number of nominal (set), ordinal (ordered set), and continuous.

• The total number of missing values replaced.

Target Table

The table displays whether the target was transformed, shown as:

• Box-Cox transformation to normality. This is further broken down into columns that show the specified criteria (mean and standard deviation) and Lambda.

• Target categories reordered to improve stability.

Categorical Features Table

The table displays the number of categorical features:

• Whose categories were reordered to improve stability.

• Whose categories were merged to maximize association with the target.

• Whose categories were merged to handle sparse categories.

• Excluded due to low association with the target.

• Excluded because they were constant after merging.

A footnote is shown if there were no categorical input fields.

Continuous Features Table

There are two tables. The first displays one of the following number of transformations:

• Feature values transformed to standard units. In addition, this shows the number of features transformed, the specified mean, and the standard deviation.

• Feature values mapped to a common range. In addition, this shows the number of features transformed using a min-max transformation, as well as the specified minimum and maximum values.

• Feature values binned and the number of features binned.

The second table displays the feature construction details, shown as the number of features:

• Constructed.

• Excluded due to a low association with the target.

• Excluded because they were constant after binning.

• Excluded because they were constant after construction.

A footnote is shown if no continuous features were input.

Related Topics

Analysis Tab (automated data preparation)
Field Processing Summary (automated data preparation)
Fields (automated data preparation)
Action Summary (automated data preparation)
Predictive Power (automated data preparation)
Fields Table (automated data preparation)
Field Details (automated data preparation)


Backtransform Scores

automated data preparation,automated data preparation,automated data preparation
backtransforming scores,backtransforming scores,backtransforming scores

If a target has been transformed by ADP, subsequent models built using the transformed target score the transformed units. In order to interpret and use the results, you must convert the predicted value back to the original scale.

Expand Show details Collapse Hide details
Backtransform Scores

To backtransform scores, from the menus choose:

Transform
Prepare Data for Modeling
Backtransform Scores...

Select a field to backtransform. This field should contain model-predicted values of the transformed target.

Specify a suffix for the new field. This new field will contain model-predicted values in the original scale of the untransformed target.

Specify the location of the XML file containing the ADP transformations. This should be a file saved from the Interactive or Automatic Data Preparation dialogs. See the topic Applying and Saving Transformations (automated data preparation) for more information.

Related Topics

Automated Data Preparation
To Obtain Automatic Data Preparation
To Obtain Interactive Data Preparation
Fields Tab (automated data preparation)
Settings Tab (automated data preparation)
Analysis Tab (automated data preparation)


Identify Unusual Cases

Identify Unusual Cases,Identify Unusual Cases,Identify Unusual Cases

The Anomaly Detection procedure searches for unusual cases based on deviations from the norms of their cluster groups. The procedure is designed to quickly detect unusual cases for data-auditing purposes in the exploratory data analysis step, prior to any inferential data analysis. This algorithm is designed for generic anomaly detection; that is, the definition of an anomalous case is not specific to any particular application, such as detection of unusual payment patterns in the healthcare industry or detection of money laundering in the finance industry, in which the definition of an anomaly can be well-defined.

Example. A data analyst hired to build predictive models for stroke treatment outcomes is concerned about data quality because such models can be sensitive to unusual observations. Some of these outlying observations represent truly unique cases and are thus unsuitable for prediction, while other observations are caused by data entry errors in which the values are technically "correct" and thus cannot be caught by data validation procedures. The Identify Unusual Cases procedure finds and reports these outliers so that the analyst can decide how to handle them.

Statistics. The procedure produces peer groups, peer group norms for continuous and categorical variables, anomaly indices based on deviations from peer group norms, and variable impact values for variables that most contribute to a case being considered unusual.

Show me

Data Considerations Collapse Hide details

Data Considerations

Data. This procedure works with both continuous and categorical variables. Each row represents a distinct observation, and each column represents a distinct variable upon which the peer groups are based. A case identification variable can be available in the data file for marking output, but it will not be used in the analysis. Missing values are allowed. The weight variable, if specified, is ignored.

The detection model can be applied to a new test data file. The elements of the test data must be the same as the elements of the training data. And, depending on the algorithm settings, the missing value handling that is used to create the model may be applied to the test data file prior to scoring.

Case order. Note that the solution may depend on the order of cases. To minimize order effects, randomly order the cases. To verify the stability of a given solution, you may want to obtain several different solutions with cases sorted in different random orders. In situations with extremely large file sizes, multiple runs can be performed with a sample of cases sorted in different random orders.

Assumptions. The algorithm assumes that all variables are nonconstant and independent and that no case has missing values for any of the input variables. Each continuous variable is assumed to have a normal (Gaussian) distribution, and each categorical variable is assumed to have a multinomial distribution. Empirical internal testing indicates that the procedure is fairly robust to violations of both the assumption of independence and the distributional assumptions, but be aware of how well these assumptions are met.

Use the Bivariate Correlations procedure to test the independence of two continuous variables. Use the Crosstabs procedure to test the independence of two categorical variables. Use the Means procedure to test the independence between a continuous variable and categorical variable. Use the Explore procedure to test the normality of a continuous variable. Use the Chi-Square Test procedure to test whether a categorical variable has a specified multinomial distribution.

To Identify Unusual Cases Collapse Hide details

To Identify Unusual Cases

This feature requires the Data Preparation option.

From the menus choose:

Data
Identify Unusual Cases...

Expand Show details Collapse Hide details
Identify Unusual Cases dialog box, Variables tab

Select at least one analysis variable.

Optionally, choose a case identifier variable to use in labeling output.

This procedure pastes DETECTANOMALY command syntax.

See DETECTANOMALY Algorithms for computational details for this procedure.

Related Topics

DETECTANOMALY
Identify Unusual Cases Output
Identify Unusual Cases Save
Identify Unusual Cases Missing Values
Identify Unusual Cases Options
DETECTANOMALY Command Additional Features


Identify Unusual Cases Output

Identify Unusual Cases,Identify Unusual Cases,Identify Unusual Cases
output,output,output
peer groups,peer groups,peer groups
in Identify Unusual Cases,in Identify Unusual Cases,in Identify Unusual Cases
anomaly indices,anomaly indices,anomaly indices
in Identify Unusual Cases,in Identify Unusual Cases,in Identify Unusual Cases
reasons,reasons,reasons
in Identify Unusual Cases,in Identify Unusual Cases,in Identify Unusual Cases
Expand Show details Collapse Hide details
Identify Unusual Cases dialog box, Output tab

List of unusual cases and reasons why they are considered unusual. This option produces three tables:

• The anomaly case index list displays cases that are identified as unusual and displays their corresponding anomaly index values.

• The anomaly case peer ID list displays unusual cases and information concerning their corresponding peer groups.

• The anomaly reason list displays the case number, the reason variable, the variable impact value, the value of the variable, and the norm of the variable for each reason.

All tables are sorted by anomaly index in descending order. Moreover, the IDs of the cases are displayed if the case identifier variable is specified on the Variables tab.

Summaries. The controls in this group produce distribution summaries.

• Peer group norms. This option displays the continuous variable norms table (if any continuous variable is used in the analysis) and the categorical variable norms table (if any categorical variable is used in the analysis). The continuous variable norms table displays the mean and standard deviation of each continuous variable for each peer group. The categorical variable norms table displays the mode (most popular category), frequency, and frequency percentage of each categorical variable for each peer group. The mean of a continuous variable and the mode of a categorical variable are used as the norm values in the analysis.

• Anomaly indices. The anomaly index summary displays descriptive statistics for the anomaly index of the cases that are identified as the most unusual.

• Reason occurrence by analysis variable. For each reason, the table displays the frequency and frequency percentage of each variable's occurrence as a reason. The table also reports the descriptive statistics of the impact of each variable. If the maximum number of reasons is set to 0 on the Options tab, this option is not available.

• Cases processed. The case processing summary displays the counts and count percentages for all cases in the active dataset, the cases included and excluded in the analysis, and the cases in each peer group.

How To Obtain Tabular Output Collapse Hide details

This feature requires the Data Preparation option.

From the menus choose:

Data
Identify Unusual Cases...

In the Identify Unusual Cases dialog box, click the Output tab.

Related Topics

Identify Unusual Cases
Identify Unusual Cases Save
Identify Unusual Cases Missing Values
Identify Unusual Cases Options
DETECTANOMALY Command Additional Features


Identify Unusual Cases Save

Identify Unusual Cases,Identify Unusual Cases,Identify Unusual Cases
save variables,save variables,save variables
Identify Unusual Cases,Identify Unusual Cases,Identify Unusual Cases
export model file,export model file,export model file
anomaly indices,anomaly indices,anomaly indices
in Identify Unusual Cases,in Identify Unusual Cases,in Identify Unusual Cases
peer groups,peer groups,peer groups
in Identify Unusual Cases,in Identify Unusual Cases,in Identify Unusual Cases
reasons,reasons,reasons
in Identify Unusual Cases,in Identify Unusual Cases,in Identify Unusual Cases
Expand Show details Collapse Hide details
Identify Unusual Cases dialog box, Save tab

Save Variables. Controls in this group allow you to save model variables to the active dataset. You can also choose to replace existing variables whose names conflict with the variables to be saved.

• Anomaly index. Saves the value of the anomaly index for each case to a variable with the specified name.

• Peer groups. Saves the peer group ID, case count, and size as a percentage for each case to variables with the specified rootname. For example, if the rootname Peer is specified, the variables Peerid, PeerSize, and PeerPctSize are generated. Peerid is the peer group ID of the case, PeerSize is the group's size, and PeerPctSize is the group's size as a percentage.

• Reasons. Saves sets of reasoning variables with the specified rootname. A set of reasoning variables consists of the name of the variable as the reason, its variable impact measure, its own value, and the norm value. The number of sets depends on the number of reasons requested on the Options tab. For example, if the rootname Reason is specified, the variables ReasonVar_k, ReasonMeasure_k, ReasonValue_k, and ReasonNorm_k are generated, where k is the kth reason. This option is not available if the number of reasons is set to 0.

Export Model File. Allows you to save the model in XML format.

How To Save Variables and Model Collapse Hide details

This feature requires the Data Preparation option.

From the menus choose:

Data
Identify Unusual Cases...

In the Identify Unusual Cases dialog box, click the Save tab.

Related Topics

Identify Unusual Cases
Identify Unusual Cases Output
Identify Unusual Cases Missing Values
Identify Unusual Cases Options
DETECTANOMALY Command Additional Features


Identify Unusual Cases Missing Values

Identify Unusual Cases,Identify Unusual Cases,Identify Unusual Cases
missing values,missing values,missing values
missing values,missing values,missing values
in Identify Unusual Cases,in Identify Unusual Cases,in Identify Unusual Cases
Expand Show details Collapse Hide details
Identify Unusual Cases dialog box, Missing Values tab

The Missing Values tab is used to control handling of user-missing and system-missing values.

• Exclude missing values from analysis. Cases with missing values are excluded from the analysis.

• Include missing values in analysis. Missing values of continuous variables are substituted with their corresponding grand means, and missing categories of categorical variables are grouped and treated as a valid category. The processed variables are then used in the analysis. Optionally, you can request the creation of an additional variable that represents the proportion of missing variables in each case and use that variable in the analysis.

How To Set Missing Value Handling Collapse Hide details

This feature requires the Data Preparation option.

From the menus choose:

Data
Identify Unusual Cases...

In the Identify Unusual Cases dialog box, click the Missing Values tab.

Related Topics

Identify Unusual Cases
Identify Unusual Cases Output
Identify Unusual Cases Save
Identify Unusual Cases Options
DETECTANOMALY Command Additional Features


Identify Unusual Cases Options

Identify Unusual Cases,Identify Unusual Cases,Identify Unusual Cases
options,options,options
Expand Show details Collapse Hide details
Identify Unusual Cases dialog box, Options tab

Criteria for Identifying Unusual Cases. These selections determine how many cases are included in the anomaly list.

• Percentage of cases with highest anomaly index values. Specify a positive number that is less than or equal to 100.

• Fixed number of cases with highest anomaly index values. Specify a positive integer that is less than or equal to the total number of cases in the active dataset that are used in the analysis.

• Identify only cases whose anomaly index value meets or exceeds a minimum value. Specify a non-negative number. A case is considered anomalous if its anomaly index value is larger than or equal to the specified cutoff point. This option is used together with the Percentage of cases and Fixed number of cases options. For example, if you specify a fixed number of 50 cases and a cutoff value of 2, the anomaly list will consist of, at most, 50 cases, each with an anomaly index value that is larger than or equal to 2.

Number of Peer Groups. The procedure will search for the best number of peer groups between the specified minimum and maximum values. The values must be positive integers, and the minimum must not exceed the maximum. When the specified values are equal, the procedure assumes a fixed number of peer groups.

Note: Depending on the amount of variation in your data, there may be situations in which the number of peer groups that the data can support is less than the number specified as the minimum. In such a situation, the procedure may produce a smaller number of peer groups.

Maximum Number of Reasons. A reason consists of the variable impact measure, the variable name for this reason, the value of the variable, and the value of the corresponding peer group. Specify a non-negative integer; if this value equals or exceeds the number of processed variables that are used in the analysis, all variables are shown.

How To Specify Model Options Collapse Hide details

This feature requires the Data Preparation option.

From the menus choose:

Data
Identify Unusual Cases...

In the Identify Unusual Cases dialog box, click the Options tab.

Related Topics

Identify Unusual Cases
Identify Unusual Cases Output
Identify Unusual Cases Save
Identify Unusual Cases Missing Values
DETECTANOMALY Command Additional Features


DETECTANOMALY Command Additional Features

The command syntax language also allows you to:

• Omit a few variables in the active dataset from analysis without explicitly specifying all of the analysis variables (using the EXCEPT subcommand).

• Specify an adjustment to balance the influence of continuous and categorical variables (using the MLWEIGHT keyword on the CRITERIA subcommand).

Related Topics

Identify Unusual Cases
Identify Unusual Cases Output
Identify Unusual Cases Save
Identify Unusual Cases Missing Values
Identify Unusual Cases Options
DETECTANOMALY


Optimal Binning

Optimal Binning,Optimal Binning,Optimal Binning
supervised binning,supervised binning,supervised binning
in Optimal Binning,in Optimal Binning,in Optimal Binning
unsupervised binning,unsupervised binning,unsupervised binning
versus supervised binning,versus supervised binning,versus supervised binning
supervised binning,supervised binning,supervised binning
versus unsupervised binning,versus unsupervised binning,versus unsupervised binning
MDLP,MDLP,MDLP
in Optimal Binning,in Optimal Binning,in Optimal Binning

The Optimal Binning procedure discretizes one or more scale variables (referred to henceforth as binning input variables) by distributing the values of each variable into bins. Bin formation is optimal with respect to a categorical guide variable that "supervises" the binning process. Bins can then be used instead of the original data values for further analysis.

Examples. Reducing the number of distinct values a variable takes has a number of uses, including:

• Data requirements of other procedures. Discretized variables can be treated as categorical for use in procedures that require categorical variables. For example, the Crosstabs procedure requires that all variables be categorical.

• Data privacy. Reporting binned values instead of actual values can help safeguard the privacy of your data sources. The Optimal Binning procedure can guide the choice of bins.

• Speed performance. Some procedures are more efficient when working with a reduced number of distinct values. For example, the speed of Multinomial Logistic Regression can be improved using discretized variables.

• Uncovering complete or quasi-complete separation of data.

Optimal versus Visual Binning. The Visual Binning dialog boxes offer several automatic methods for creating bins without the use of a guide variable. These "unsupervised" rules are useful for producing descriptive statistics, such as frequency tables, but Optimal Binning is superior when your end goal is to produce a predictive model.

Output. The procedure produces tables of cutpoints for the bins and descriptive statistics for each binning input variable. Additionally, you can save new variables to the active dataset containing the binned values of the binning input variables and save the binning rules as command syntax for use in discretizing new data.

Show me

Optimal Binning Data Considerations Collapse Hide details

Data. This procedure expects the binning input variables to be scale, numeric variables. The guide variable should be categorical and can be string or numeric.

To Obtain Optimal Binning Collapse Hide details

To Obtain Optimal Binning

This feature requires the Data Preparation option.

From the menus choose:

Transform
Optimal Binning...

Expand Show details Collapse Hide details
Optimal Binning dialog box, Variables tab

Select one or more binning input variables.

Select a guide variable.

Variables containing the binned data values are not generated by default. Use the Save tab to save these variables.

This procedure pastes OPTIMAL BINNING command syntax.

See OPTIMAL BINNING Algorithms for computational details for this procedure.

Related Topics

Visual Binning
Recode into Same Variables
Recode into Different Variables
Optimal Binning Output
Optimal Binning Save
Optimal Binning Missing Values
Optimal Binning Options
OPTIMAL BINNING Command Additional Features


Optimal Binning Output

Optimal Binning,Optimal Binning,Optimal Binning
output,output,output
endpoints for bins,endpoints for bins,endpoints for bins
in Optimal Binning,in Optimal Binning,in Optimal Binning
Expand Show details Collapse Hide details
Optimal Binning dialog box, Output tab

The Output tab controls the display of the results.

• Endpoints for bins. Displays the set of endpoints for each binning input variable.

• Descriptive statistics for variables that are binned. For each binning input variable, this option displays the number of cases with valid values, the number of cases with missing values, the number of distinct valid values, and the minimum and maximum values. For the guide variable, this option displays the class distribution for each related binning input variable.

• Model entropy for variables that are binned. For each binning input variable, this option displays a measure of the predictive accuracy of the variable with respect to the guide variable.

How To Obtain Output for Optimal Binning Collapse Hide details

This feature requires the Data Preparation option.

From the menus choose:

Transform
Optimal Binning...

In the Optimal Binning dialog box, click Output.

Related Topics

Optimal Binning
Optimal Binning Save
Optimal Binning Missing Values
Optimal Binning Options
OPTIMAL BINNING Command Additional Features


Optimal Binning Save

Optimal Binning,Optimal Binning,Optimal Binning
save,save,save
binning rules,binning rules,binning rules
in Optimal Binning,in Optimal Binning,in Optimal Binning
Expand Show details Collapse Hide details
Optimal Binning dialog box, Save tab

Save Variables to Active Dataset. Variables containing the binned data values can be used in place of the original variables in further analysis.

Save Binning Rules as Syntax. Generates command syntax that can be used to bin other datasets. The recoding rules are based on the cutpoints determined by the binning algorithm.

How To Save Binned Variables and Binning Rules Collapse Hide details

This feature requires the Data Preparation option.

From the menus choose:

Transform
Optimal Binning...

In the Optimal Binning dialog box, click Save.

Related Topics

Optimal Binning
Optimal Binning Output
Optimal Binning Missing Values
Optimal Binning Options
OPTIMAL BINNING Command Additional Features


Optimal Binning Missing Values

Optimal Binning,Optimal Binning,Optimal Binning
missing values,missing values,missing values
Expand Show details Collapse Hide details
Optimal Binning dialog box, Missing Values tab

The Missing Values tab specifies whether missing values are handled using listwise or pairwise deletion. User-missing values are always treated as invalid. When recoding the original variable values into a new variable, user-missing values are converted to system-missing.

• Pairwise. This option operates on each guide and binning input variable pair. The procedure will make use of all cases with nonmissing values on the guide and binning input variable.

• Listwise This option operates across all variables specified on the Variables tab. If any variable is missing for a case, the entire case is excluded.

How To Specify Missing Values for Optimal Binning Collapse Hide details

This feature requires the Data Preparation option.

From the menus choose:

Transform
Optimal Binning...

In the Optimal Binning dialog box, click Missing Values.

Related Topics

Optimal Binning
Optimal Binning Output
Optimal Binning Save
Optimal Binning Options
OPTIMAL BINNING Command Additional Features


Optimal Binning Options

Optimal Binning,Optimal Binning,Optimal Binning
options,options,options
pre-binning,pre-binning,pre-binning
in Optimal Binning,in Optimal Binning,in Optimal Binning
Expand Show details Collapse Hide details
Optimal Binning dialog box, Options tab

Preprocessing. "Pre-binning" binning input variables with many distinct values can improve processing time without a great sacrifice in the quality of the final bins. The maximum number of bins gives an upper bound on the number of bins created. Thus, if you specify 1000 as the maximum but a binning input variable has less than 1000 distinct values, the number of preprocessed bins created for the binning input variable will equal the number of distinct values in the binning input variable.

Sparsely Populated Bins. Occasionally, the procedure may produce bins with very few cases. The following strategy deletes these pseudo cutpoints:

For a given variable, suppose that the algorithm found nfinal cutpoints and thus nfinal+1 bins. For bins i = 2, ..., nfinal (the second lowest-valued bin through the second highest-valued bin), compute

sizeof(bi)min(sizeof(bi−1),sizeof(bi+1))

where sizeof(b) is the number of cases in the bin.

When this value is less than the specified merging threshold, bi is considered sparsely populated and is merged with bi−1 or bi+1, whichever has the lower class information entropy. See the topic Class Information Entropy (optimal binning algorithms) for more information.

The procedure makes a single pass through the bins.

Bin Endpoints. This option specifies how the lower limit of an interval is defined. Since the procedure automatically determines the values of the cutpoints, this is largely a matter of preference.

First (Lowest) / Last (Highest) Bin. These options specify how the minimum and maximum cutpoints for each binning input variable are defined. Generally, the procedure assumes that the binning input variables can take any value on the real number line, but if you have some theoretical or practical reason for limiting the range, you can bound it by the lowest / highest values.

How To Specify Options for Optimal Binning Collapse Hide details

This feature requires the Data Preparation option.

From the menus choose:

Transform
Optimal Binning...

In the Optimal Binning dialog box, click Options.

Related Topics

Optimal Binning
Optimal Binning Output
Optimal Binning Save
Optimal Binning Missing Values
OPTIMAL BINNING Command Additional Features


OPTIMAL BINNING Command Additional Features

The command syntax language also allows you to:

• Perform unsupervised binning via the equal frequencies method (using the CRITERIA subcommand).

Related Topics

Optimal Binning
Optimal Binning Output
Optimal Binning Save
Optimal Binning Missing Values
Optimal Binning Options
OPTIMAL BINNING


Creating Decision Trees

trees,trees,trees
decision trees,decision trees,decision trees
forcing first variable into model,forcing first variable into model,forcing first variable into model
measurement level,measurement level,measurement level
CHAID method,CHAID method,CHAID method
Exhaustive CHAID method,Exhaustive CHAID method,Exhaustive CHAID method
QUEST method,QUEST method,QUEST method
CRT method,CRT method,CRT method
decision trees,decision trees,decision trees
CHAID,CHAID,CHAID
CRT,CRT,CRT
QUEST,QUEST,QUEST
measurement level,measurement level,measurement level
decision trees,decision trees,decision trees
weighting cases,weighting cases,weighting cases
fractional weights in decision trees,fractional weights in decision trees,fractional weights in decision trees

The Decision Tree procedure creates a tree-based classification model. It classifies cases into groups or predicts values of a dependent (target) variable based on values of independent (predictor) variables. The procedure provides validation tools for exploratory and confirmatory classification analysis.

Expand Show details Collapse Hide details

The procedure can be used for:

Segmentation. Identify persons who are likely to be members of a particular group.

Stratification. Assign cases into one of several categories, such as high-, medium-, and low-risk groups.

Prediction. Create rules and use them to predict future events, such as the likelihood that someone will default on a loan or the potential resale value of a vehicle or home.

Data reduction and variable screening. Select a useful subset of predictors from a large set of variables for use in building a formal parametric model.

Interaction identification. Identify relationships that pertain only to specific subgroups and specify these in a formal parametric model.

Category merging and discretizing continuous variables. Recode group predictor categories and continuous variables with minimal loss of information.

Example. A bank wants to categorize credit applicants according to whether or not they represent a reasonable credit risk. Based on various factors, including the known credit ratings of past customers, you can build a model to predict if future customers are likely to default on their loans.

A tree-based analysis provides some attractive features:

• It allows you to identify homogeneous groups with high or low risk.

• It makes it easy to construct rules for making predictions about individual cases.

Data Considerations Collapse Hide details

Data Considerations

Data. The dependent and independent variables can be:

• Nominal. A variable can be treated as nominal when its values represent categories with no intrinsic ranking (for example, the department of the company in which an employee works). Examples of nominal variables include region, zip code, and religious affiliation.

• Ordinal. A variable can be treated as ordinal when its values represent categories with some intrinsic ranking (for example, levels of service satisfaction from highly dissatisfied to highly satisfied). Examples of ordinal variables include attitude scores representing degree of satisfaction or confidence and preference rating scores.

• Scale. A variable can be treated as scale (continuous) when its values represent ordered categories with a meaningful metric, so that distance comparisons between values are appropriate. Examples of scale variables include age in years and income in thousands of dollars.

Frequency weights If weighting is in effect, fractional weights are rounded to the closest integer; so, cases with a weight value of less than 0.5 are assigned a weight of 0 and are therefore excluded from the analysis.

Assumptions. This procedure assumes that the appropriate measurement level has been assigned to all analysis variables, and some features assume that all values of the dependent variable included in the analysis have defined value labels.

• Measurement level. Measurement level affects the tree computations; so, all variables should be assigned the appropriate measurement level. By default, numeric variables are assumed to be scale and string variables are assumed to be nominal, which may not accurately reflect the true measurement level. An icon next to each variable in the variable list identifies the variable type.

Scale
Nominal
Ordinal

You can temporarily change the measurement level for a variable by right-clicking the variable in the source variable list and selecting a measurement level from the context menu.

• Value labels. The dialog box interface for this procedure assumes that either all nonmissing values of a categorical (nominal, ordinal) dependent variable have defined value labels or none of them do. Some features are not available unless at least two nonmissing values of the categorical dependent variable have value labels. If at least two nonmissing values have defined value labels, any cases with other values that do not have value labels will be excluded from the analysis.

Show me

You can use Define Variable Properties to assist you in the process of defining both measurement level and value labels.

To Obtain Decision Trees Collapse Hide details

To Obtain Decision Trees

This feature requires the Decision Trees option.

From the menus choose:

Analyze
Classify
Tree...

Select a dependent variable.

Select one or more independent variables.

Select a growing method.

Optionally, you can:

• Change the measurement level for any variable in the source list.

• Force the first variable in the independent variables list into the model as the first split variable.

• Select an influence variable that defines how much influence a case has on the tree-growing process. Cases with lower influence values have less influence; cases with higher values have more. Influence variable values must be positive.

• Validate the tree.

• Customize the tree-growing criteria.

• Save terminal node numbers, predicted values, and predicted probabilities as variables.

• Save the model in XML (PMML) format.

Show me

Changing Measurement Level Collapse Hide details

Changing Measurement Level

Right-click the variable in the source list.

Select a measurement level from the pop-up context menu.

This changes the measurement level temporarily for use in the Decision Tree procedure.

To permanently change the level of measurement for a variable, see Variable Measurement Level.

Growing Methods Collapse Hide details

Growing Methods

The available growing methods are:

CHAID. Chi-squared Automatic Interaction Detection. At each step, CHAID chooses the independent (predictor) variable that has the strongest interaction with the dependent variable. Categories of each predictor are merged if they are not significantly different with respect to the dependent variable.

Exhaustive CHAID. A modification of CHAID that examines all possible splits for each predictor.

CRT. Classification and Regression Trees. CRT splits the data into segments that are as homogeneous as possible with respect to the dependent variable. A terminal node in which all cases have the same value for the dependent variable is a homogeneous, "pure" node.

QUEST. Quick, Unbiased, Efficient Statistical Tree. A method that is fast and avoids other methods' bias in favor of predictors with many categories. QUEST can be specified only if the dependent variable is nominal.

There are benefits and limitations with each method, including:

 | CHAID* | CRT | QUEST
Chi-square-based** | X |  |
Surrogate independent (predictor) variables |  | X | X
Tree pruning |  | X | X
Multiway node splitting | X |  |
Binary node splitting |  | X | X
Influence variables | X | X |
Prior probabilities |  | X | X
Misclassification costs | X | X | X
Fast calculation | X |  | X

*Includes Exhaustive CHAID.

**QUEST also uses a chi-square measure for nominal independent variables.

Related Topics

Selecting Categories
Validation
Tree-Growing Criteria
Options
Saving Model Information
Output
TREE


Selecting Categories

For categorical (nominal, ordinal) dependent variables, you can:

• Control which categories are included in the analysis.

• Identify the target categories of interest.

Including/Excluding Categories

You can limit the analysis to specific categories of the dependent variable.

• Cases with values of the dependent variable in the Exclude list are not included in the analysis.

• For nominal dependent variables, you can also include user-missing categories in the analysis. (By default, user-missing categories are displayed in the Exclude list.)

Target Categories

Selected (checked) categories are treated as the categories of primary interest in the analysis. For example, if you are primarily interested in identifying those individuals most likely to default on a loan, you might select the "bad" credit-rating category as the target category.

• There is no default target category. If no category is selected, some classification rule options and gains-related output are not available.

• If multiple categories are selected, separate gains tables and charts are produced for each target category.

• Designating one or more categories as target categories has no effect on the tree model, risk estimate, or misclassification results.

Categories and Value Labels

This dialog box requires defined value labels for the dependent variable. It is not available unless at least two values of the categorical dependent variable have defined value labels. See the topic To Specify Value Labels for more information.

To Include/Exclude Categories and Select Target Categories Collapse Hide details

To Include/Exclude Categories and Select Target Categories

This feature requires the Decision Trees option.

From the menus choose:

Analyze
Classify
Tree...

In the main Decision Tree dialog box, select a categorical (nominal, ordinal) dependent variable with two or more defined value labels.

Click Categories.

Related Topics

Creating Decision Trees
Validation
Tree-Growing Criteria
Options
Saving Model Information
Output


Validation

trees,trees,trees
crossvalidation,crossvalidation,crossvalidation
split-sample validation,split-sample validation,split-sample validation
validation,validation,validation
trees,trees,trees
crossvalidation,crossvalidation,crossvalidation
trees,trees,trees
split-sample validation,split-sample validation,split-sample validation
trees,trees,trees
random number seed,random number seed,random number seed
decision tree validation,decision tree validation,decision tree validation

Validation allows you to assess how well your tree structure generalizes to a larger population. Two validation methods are available: crossvalidation and split-sample validation.

Crossvalidation

Crossvalidation divides the sample into a number of subsamples, or folds. Tree models are then generated, excluding the data from each subsample in turn. The first tree is based on all of the cases except those in the first sample fold, the second tree is based on all of the cases except those in the second sample fold, and so on. For each tree, misclassification risk is estimated by applying the tree to the subsample excluded in generating it.

• You can specify a maximum of 25 sample folds. The higher the value, the fewer the number of cases excluded for each tree model.

• Crossvalidation produces a single, final tree model. The crossvalidated risk estimate for the final tree is calculated as the average of the risks for all of the trees.

Split-Sample Validation

With split-sample validation, the model is generated using a training sample and tested on a hold-out sample.

• You can specify a training sample size, expressed as a percentage of the total sample size, or a variable that splits the sample into training and testing samples.

• If you use a variable to define training and testing samples, cases with a value of 1 for the variable are assigned to the training sample, and all other cases are assigned to the testing sample. The variable cannot be the dependent variable, weight variable, influence variable, or a forced independent variable.

• You can display results for both the training and testing samples or just the testing sample.

• Split-sample validation should be used with caution on small data files (data files with a small number of cases). Small training sample sizes may yield poor models, since there may not be enough cases in some categories to adequately grow the tree.

To Validate a Decision Tree Collapse Hide details

To Validate a Decision Tree

This feature requires the Decision Trees option.

From the menus choose:

Analyze
Classify
Tree...

Click Validation.

Select Crossvalidation or Split-sample validation.

Note: Both validation methods randomly assign cases to sample groups. If you want to be able to reproduce the exact same results in a subsequent analysis, you should set the random number seed (Transform menu, Random Number Generators) before running the analysis for the first time and then reset the seed to that value for the subsequent analysis. See the topic Random Number Generators for more information.

Related Topics

Creating Decision Trees
Selecting Categories
Tree-Growing Criteria
Options
Saving Model Information
Output


Tree-Growing Criteria

The available growing criteria may depend on the growing method, level of measurement of the dependent variable, or a combination of the two.

Related Topics

Creating Decision Trees
Selecting Categories
Validation
Options
Saving Model Information
Output
Growth Limits
CHAID Criteria
Scale Intervals for CHAID Analysis
CRT Criteria
QUEST Criteria
Pruning Trees
Surrogates


Growth Limits

trees,trees,trees
limiting number of levels,limiting number of levels,limiting number of levels
controlling node size,controlling node size,controlling node size

The Growth Limits tab allows you to limit the number of levels in the tree and control the minimum number of cases for parent and child nodes.

Maximum Tree Depth. Controls the maximum number of levels of growth beneath the root node. The Automatic setting limits the tree to three levels beneath the root node for the CHAID and Exhaustive CHAID methods and five levels for the CRT and QUEST methods.

Minimum Number of Cases. Controls the minimum numbers of cases for nodes. Nodes that do not satisfy these criteria will not be split.

• Increasing the minimum values tends to produce trees with fewer nodes.

• Decreasing the minimum values produces trees with more nodes.

For data files with a small number of cases, the default values of 100 cases for parent nodes and 50 cases for child nodes may sometimes result in trees with no nodes below the root node; in this case, lowering the minimum values may produce more useful results.

To Specify Growth Limits Collapse Hide details

To Specify Growth Limits

This feature requires the Decision Trees option.

From the menus choose:

Analyze
Classify
Tree...

Click Criteria.

Click the Growth Limits tab.

Related Topics

Tree-Growing Criteria
CHAID Criteria
Scale Intervals for CHAID Analysis
CRT Criteria
QUEST Criteria
Pruning Trees
Surrogates


CHAID Criteria

trees,trees,trees
CHAID growing criteria,CHAID growing criteria,CHAID growing criteria
CHAID,CHAID,CHAID
splitting and merging criteria,splitting and merging criteria,splitting and merging criteria
maximum iterations,maximum iterations,maximum iterations
Bonferroni adjustment,Bonferroni adjustment,Bonferroni adjustment
resplitting merged categories,resplitting merged categories,resplitting merged categories

For the CHAID and Exhaustive CHAID methods, you can control:

Significance Level. You can control the significance value for splitting nodes and merging categories. For both criteria, the default significance level is 0.05.

• For splitting nodes, the value must be greater than 0 and less than 1. Lower values tend to produce trees with fewer nodes.

• For merging categories, the value must be greater than 0 and less than or equal to 1. To prevent merging of categories, specify a value of 1. For a scale independent variable, this means that the number of categories for the variable in the final tree is the specified number of intervals (the default is 10). See the topic Scale Intervals for CHAID Analysis for more information.

Chi-Square Statistic. For ordinal dependent variables, chi-square for determining node splitting and category merging is calculated using the likelihood-ratio method. For nominal dependent variables, you can select the method:

• Pearson. This method provides faster calculations but should be used with caution on small samples. This is the default method.

• Likelihood ratio. This method is more robust that Pearson but takes longer to calculate. For small samples, this is the preferred method.

Model Estimation. For nominal and ordinal dependent variables, you can specify:

• Maximum number of iterations. The default is 100. If the tree stops growing because the maximum number of iterations has been reached, you may want to increase the maximum or change one or more of the other criteria that control tree growth.

• Minimum change in expected cell frequencies. The value must be greater than 0 and less than 1. The default is 0.05. Lower values tend to produce trees with fewer nodes.

Adjust significance values using Bonferroni method. For multiple comparisons, significance values for merging and splitting criteria are adjusted using the Bonferroni method. This is the default.

Allow resplitting of merged categories within a node. Unless you explicitly prevent category merging, the procedure will attempt to merge independent (predictor) variable categories together to produce the simplest tree that describes the model. This option allows the procedure to resplit merged categories if that provides a better solution.

To Specify CHAID Criteria Collapse Hide details

This feature requires the Decision Trees option.

From the menus choose:

Analyze
Classify
Tree...

For the growing method, select CHAID or Exhaustive CHAID.

Click Criteria.

Click the CHAID tab.

Related Topics

Tree-Growing Criteria
Growth Limits
Scale Intervals for CHAID Analysis
CRT Criteria
QUEST Criteria
Pruning Trees
Surrogates


Scale Intervals for CHAID Analysis

trees,trees,trees
intervals for scale independent variables,intervals for scale independent variables,intervals for scale independent variables
CHAID,CHAID,CHAID
intervals for scale independent variables,intervals for scale independent variables,intervals for scale independent variables

In CHAID analysis, scale independent (predictor) variables are always banded into discrete groups (for example, 0–10, 11–20, 21–30, etc.) prior to analysis. You can control the initial/maximum number of groups (although the procedure may merge contiguous groups after the initial split):

• Fixed number. All scale independent variables are initially banded into the same number of groups. The default is 10.

• Custom. Each scale independent variable is initially banded into the number of groups specified for that variable.

To Specify Intervals for Scale Independent Variables Collapse Hide details

To Specify Intervals for Scale Independent Variables

This feature requires the Decision Trees option.

From the menus choose:

Analyze
Classify
Tree...

In the main Decision Tree dialog box, select one or more scale independent variables.

For the growing method, select CHAID or Exhaustive CHAID.

Click Criteria.

Click the Intervals tab.

In CRT and QUEST analysis, all splits are binary and scale and ordinal independent variables are handled the same way; so, you cannot specify a number of intervals for scale independent variables.

Related Topics

Tree-Growing Criteria
Growth Limits
CHAID Criteria
CRT Criteria
QUEST Criteria
Pruning Trees
Surrogates


CRT Criteria

trees,trees,trees
CRT method,CRT method,CRT method
CRT,CRT,CRT
impurity measures,impurity measures,impurity measures
impurity,impurity,impurity
CRT trees,CRT trees,CRT trees
Gini,Gini,Gini
twoing,twoing,twoing
ordered twoing,ordered twoing,ordered twoing

The CRT growing method attempts to maximize within-node homogeneity. The extent to which a node does not represent a homogenous subset of cases is an indication of impurity. For example, a terminal node in which all cases have the same value for the dependent variable is a homogenous node that requires no further splitting because it is "pure."

You can select the method used to measure impurity and the minimum decrease in impurity required to split nodes.

Impurity Measure. For scale dependent variables, the least-squared deviation (LSD) measure of impurity is used. It is computed as the within-node variance, adjusted for any frequency weights or influence values.

For categorical (nominal, ordinal) dependent variables, you can select the impurity measure:

• Gini. Splits are found that maximize the homogeneity of child nodes with respect to the value of the dependent variable. Gini is based on squared probabilities of membership for each category of the dependent variable. It reaches its minimum (zero) when all cases in a node fall into a single category. This is the default measure.

• Twoing. Categories of the dependent variable are grouped into two subclasses. Splits are found that best separate the two groups.

• Ordered twoing. Similar to twoing except that only adjacent categories can be grouped. This measure is available only for ordinal dependent variables.

Minimum change in improvement. This is the minimum decrease in impurity required to split a node. The default is 0.0001. Higher values tend to produce trees with fewer nodes.

To Specify CRT Criteria Collapse Hide details

This feature requires the Decision Trees option.

From the menus choose:

Analyze
Classify
Tree...

For the growing method, select CRT.

Click Criteria.

Click the CRT tab.

Related Topics

Tree-Growing Criteria
Growth Limits
CHAID Criteria
Scale Intervals for CHAID Analysis
QUEST Criteria
Pruning Trees
Surrogates


QUEST Criteria

decision trees,decision trees,decision trees
QUEST method,QUEST method,QUEST method
QUEST,QUEST,QUEST
significance level for splitting nodes,significance level for splitting nodes,significance level for splitting nodes

For the QUEST method, you can specify the significance level for splitting nodes. An independent variable cannot be used to split nodes unless the significance level is less than or equal to the specified value. The value must be greater than 0 and less than 1. The default is 0.05. Smaller values will tend to exclude more independent variables from the final model.

To Specify QUEST Criteria Collapse Hide details

To Specify QUEST Criteria

This feature requires the Decision Trees option.

From the menus choose:

Analyze
Classify
Tree...

In the main Decision Tree dialog box, select a nominal dependent variable.

For the growing method, select QUEST.

Click Criteria.

Click the QUEST tab.

Related Topics

Tree-Growing Criteria
Growth Limits
CHAID Criteria
Scale Intervals for CHAID Analysis
CRT Criteria
Pruning Trees
Surrogates


Pruning Trees

trees,trees,trees
pruning,pruning,pruning
pruning decision trees,pruning decision trees,pruning decision trees
vs. hiding nodes,vs. hiding nodes,vs. hiding nodes
hiding nodes,hiding nodes,hiding nodes
vs. pruning,vs. pruning,vs. pruning
CRT,CRT,CRT
pruning,pruning,pruning
QUEST,QUEST,QUEST
pruning,pruning,pruning

With the CRT and QUEST methods, you can avoid overfitting the model by pruning the tree: the tree is grown until stopping criteria are met, and then it is trimmed automatically to the smallest subtree based on the specified maximum difference in risk. The risk value is expressed in standard errors. The default is 1. The value must be non-negative. To obtain the subtree with the minimum risk, specify 0.

To Prune a Tree Collapse Hide details

This feature requires the Decision Trees option.

From the menus choose:

Analyze
Classify
Tree...

In the main Decision Tree dialog box, for the growing method, select CRT or QUEST.

Click Criteria.

Click the Pruning tab.

Pruning versus Hiding Nodes

When you create a pruned tree, any nodes pruned from the tree are not available in the final tree. You can interactively hide and show selected child nodes in the final tree, but you cannot show nodes that were pruned in the tree creation process. See the topic Tree Editor for more information.

Related Topics

Tree-Growing Criteria
Growth Limits
CHAID Criteria
Scale Intervals for CHAID Analysis
CRT Criteria
QUEST Criteria
Surrogates


Surrogates

CRT and QUEST can use surrogates for independent (predictor) variables. For cases in which the value for that variable is missing, other independent variables having high associations with the original variable are used for classification. These alternative predictors are called surrogates. You can specify the maximum number of surrogates to use in the model.

• By default, the maximum number of surrogates is one less than the number of independent variables. In other words, for each independent variable, all other independent variables may be used as surrogates.

• If you don't want the model to use surrogates, specify 0 for the number of surrogates.

To Specify Surrogates Collapse Hide details

This feature requires the Decision Trees option.

From the menus choose:

Analyze
Classify
Tree...

In the main Decision Tree dialog box, for the growing method, select CRT or QUEST.

Click Criteria.

Click the Surrogates tab.

Related Topics

Tree-Growing Criteria
Growth Limits
CHAID Criteria
Scale Intervals for CHAID Analysis
CRT Criteria
QUEST Criteria
Pruning Trees


Options

Available options may depend on the growing method, the level of measurement of the dependent variable, and/or the existence of defined value labels for values of the dependent variable.

Related Topics

Creating Decision Trees
Selecting Categories
Validation
Tree-Growing Criteria
Saving Model Information
Output
Misclassification Costs
Profits
Prior Probabilities
Scores
Missing Values


Misclassification Costs

trees,trees,trees
misclassification costs,misclassification costs,misclassification costs
misclassification,misclassification,misclassification
costs,costs,costs
costs,costs,costs
misclassification,misclassification,misclassification

For categorical (nominal, ordinal) dependent variables, misclassification costs allow you to include information about the relative penalty associated with incorrect classification. For example:

• The cost of denying credit to a creditworthy customer is likely to be different from the cost of extending credit to a customer who then defaults on the loan.

• The cost of misclassifying an individual with a high risk of heart disease as low risk is probably much higher than the cost of misclassifying a low-risk individual as high-risk.

• The cost of sending a mass mailing to someone who isn't likely to respond is probably fairly low, while the cost of not sending the mailing to someone who is likely to respond is relatively higher (in terms of lost revenue).

Misclassification Costs and Value Labels

This dialog box is not available unless at least two values of the categorical dependent variable have defined value labels. See the topic To Specify Value Labels for more information.

To Specify Misclassification Costs Collapse Hide details

To Specify Misclassification Costs

This feature requires the Decision Trees option.

From the menus choose:

Analyze
Classify
Tree...

In the main Decision Tree dialog box, select a categorical (nominal, ordinal) dependent variable with two or more defined value labels.

Click Options.

Click the Misclassification Costs tab.

Click Custom.

Enter one or more misclassification costs in the grid. Values must be non-negative. (Correct classifications, represented on the diagonal, are always 0.)

Fill Matrix. In many instances, you may want costs to be symmetric—that is, the cost of misclassifying A as B is the same as the cost of misclassifying B as A. The following controls can make it easier to specify a symmetric cost matrix:

• Duplicate Lower Triangle. Copies values in the lower triangle of the matrix (below the diagonal) into the corresponding upper-triangular cells.

• Duplicate Upper Triangle. Copies values in the upper triangle of the matrix (above the diagonal) into the corresponding lower-triangular cells.

• Use Average Cell Values. For each cell in each half of the matrix, the two values (upper- and lower-triangular) are averaged and the average replaces both values. For example, if the cost of misclassifying A as B is 1 and the cost of misclassifying B as A is 3, then this control replaces both of those values with the average (1+3)/2 = 2.

Related Topics

Options
Profits
Prior Probabilities
Scores
Missing Values


Profits

trees,trees,trees
profits,profits,profits
profits,profits,profits
trees,trees,trees

For categorical dependent variables, you can assign revenue and expense values to levels of the dependent variable.

• Profit is computed as revenue minus expense.

• Profit values affect average profit and ROI (return on investment) values in gains tables. They do not affect the basic tree model structure.

• Revenue and expense values must be numeric and must be specified for all categories of the dependent variable displayed in the grid.

Profits and Value Labels

This dialog box requires defined value labels for the dependent variable. It is not available unless at least two values of the categorical dependent variable have defined value labels. See the topic To Specify Value Labels for more information.

To Specify Profits Collapse Hide details

To Specify Profits

This feature requires the Decision Trees option.

From the menus choose:

Analyze
Classify
Tree...

In the main Decision Tree dialog box, select a categorical (nominal, ordinal) dependent variable with two or more defined value labels.

Click Options.

Click the Profits tab.

Click Custom.

Enter revenue and expense values for all dependent variable categories listed in the grid.

Related Topics

Options
Misclassification Costs
Prior Probabilities
Scores
Missing Values


Prior Probabilities

trees,trees,trees
prior probability,prior probability,prior probability
profits,profits,profits
prior probability,prior probability,prior probability

For CRT and QUEST trees with categorical dependent variables, you can specify prior probabilities of group membership. Prior probabilities are estimates of the overall relative frequency for each category of the dependent variable prior to knowing anything about the values of the independent (predictor) variables. Using prior probabilities helps to correct any tree growth caused by data in the sample that is not representative of the entire population.

Obtain from training sample (empirical priors). Use this setting if the distribution of dependent variable values in the data file is representative of the population distribution. If you are using split-sample validation, the distribution of cases in the training sample is used.

Note: Since cases are randomly assigned to the training sample in split-sample validation, you won't know the actual distribution of cases in the training sample in advance. See the topic Validation for more information.

Equal across categories. Use this setting if categories of the dependent variable are represented equally in the population. For example, if there are four categories, approximately 25% of the cases are in each category.

Custom. Enter a non-negative value for each category of the dependent variable listed in the grid. The values can be proportions, percentages, frequency counts, or any other values that represent the distribution of values across categories.

Adjust priors using misclassification costs. If you define custom misclassification costs, you can adjust prior probabilities based on those costs. See the topic Misclassification Costs for more information.

Profits and Value Labels

This dialog box requires defined value labels for the dependent variable. It is not available unless at least two values of the categorical dependent variable have defined value labels. See the topic To Specify Value Labels for more information.

To Specify Prior Probabilities Collapse Hide details

To Specify Prior Probabilities

This feature requires the Decision Trees option.

From the menus choose:

Analyze
Classify
Tree...

In the main Decision Tree dialog box, select a categorical (nominal, ordinal) dependent variable with two or more defined value labels.

For the growing method, select CRT or QUEST.

Click Options.

Click the Prior Probabilities tab.

Related Topics

Options
Misclassification Costs
Profits
Scores
Missing Values


Scores

trees,trees,trees
scores,scores,scores
scores,scores,scores
trees,trees,trees

For CHAID and Exhaustive CHAID with an ordinal dependent variable, you can assign custom scores to each category of the dependent variable. Scores define the order of and distance between categories of the dependent variable. You can use scores to increase or decrease the relative distance between ordinal values or to change the order of the values.

• Use ordinal rank for each category. The lowest category of the dependent variable is assigned a score of 1, the next highest category is assigned a score of 2, and so on. This is the default.

• Custom. Enter a numeric score value for each category of the dependent variable listed in the grid.

Example

Value Label | Original Value | Score
Unskilled | 1 | 1
Skilled manual | 2 | 4
Clerical | 3 | 4.5
Professional | 4 | 7
Management | 5 | 6

• The scores increase the relative distance between Unskilled and Skilled manual and decrease the relative distance between Skilled manual and Clerical.

• The scores reverse the order of Management and Professional.

Scores and Value Labels

This dialog box requires defined value labels for the dependent variable. It is not available unless at least two values of the categorical dependent variable have defined value labels. See the topic To Specify Value Labels for more information.

To Specify Scores Collapse Hide details

To Specify Scores

This feature requires the Decision Trees option.

From the menus choose:

Analyze
Classify
Tree...

In the main Decision Tree dialog box, select an ordinal dependent variable with two or more defined value labels.

For the growing method, select CHAID or Exhaustive CHAID.

Click Options.

Click the Scores tab.

Related Topics

Options
Misclassification Costs
Profits
Prior Probabilities
Missing Values


Missing Values

trees,trees,trees
missing values,missing values,missing values
missing values,missing values,missing values
trees,trees,trees

The Missing Values tab controls the handling of nominal, user-missing, independent (predictor) variable values.

• Handling of ordinal and scale user-missing independent variable values varies between growing methods.

• Handling of nominal dependent variables is specified in the Categories dialog box. See the topic Selecting Categories for more information.

• For ordinal and scale dependent variables, cases with system-missing or user-missing dependent variable values are always excluded.

Treat as missing values. User-missing values are treated like system-missing values. The handling of system-missing values varies between growing methods.

Treat as valid values. User-missing values of nominal independent variables are treated as ordinary values in tree growing and classification.

Method-Dependent Rules Collapse Hide details

Method-Dependent Rules

If some, but not all, independent variable values are system- or user-missing:

• For CHAID and Exhaustive CHAID, system- and user-missing independent variable values are included in the analysis as a single, combined category. For scale and ordinal independent variables, the algorithms first generate categories using valid values and then decide whether to merge the missing category with its most similar (valid) category or keep it as a separate category.

• For CRT and QUEST, cases with missing independent variable values are excluded from the tree-growing process but are classified using surrogates if surrogates are included in the method. If nominal user-missing values are treated as missing, they are also handled in this manner. See the topic Surrogates for more information.

To Specify Nominal, Independent User-Missing Treatment Collapse Hide details

To Specify Nominal, Independent User-Missing Treatment

This feature requires the Decision Trees option.

From the menus choose:

Analyze
Classify
Tree...

In the main Decision Tree dialog box, select at least one nominal independent variable.

Click Options.

Click the Missing Values tab.

Related Topics

Options
Misclassification Costs
Profits
Prior Probabilities
Scores


Saving Model Information

trees,trees,trees
saving model variables,saving model variables,saving model variables
node number,node number,node number
saving as variable from decision trees,saving as variable from decision trees,saving as variable from decision trees
predicted values,predicted values,predicted values
saving as variable from decision trees,saving as variable from decision trees,saving as variable from decision trees
predicted probability,predicted probability,predicted probability
saving as variable from decision trees,saving as variable from decision trees,saving as variable from decision trees

You can save information from the model as variables in the working data file, and you can also save the entire model in XML (PMML) format to an external file.

Saved Variables

Terminal node number. The terminal node to which each case is assigned. The value is the tree node number.

Predicted value. The class (group) or value for the dependent variable predicted by the model.

Predicted probabilities. The probability associated with the model’s prediction. One variable is saved for each category of the dependent variable. Not available for scale dependent variables.

Sample assignment (training/testing). For split-sample validation, this variable indicates whether a case was used in the training or testing sample. The value is 1 for the training sample and 0 for the testing sample. Not available unless you have selected split-sample validation. See the topic Validation for more information.

Export Tree Model as XML

You can save the entire tree model in XML (PMML) format. SmartScore and PASW Statistics Server (a separate product) can use this model file to apply the model information to other data files for scoring purposes.

Training sample. Writes the model to the specified file. For split-sample validated trees, this is the model for the training sample.

Test sample. Writes the model for the test sample to the specified file. Not available unless you have selected split-sample validation.

To Save Model Information Collapse Hide details

This feature requires the Decision Trees option.

From the menus choose:

Analyze
Classify
Tree...

Click Save.

Related Topics

Creating Decision Trees
Selecting Categories
Validation
Tree-Growing Criteria
Options
Output


Output

Available output options depend on the growing method, the measurement level of the dependent variable, and other settings.

Related Topics

Creating Decision Trees
Selecting Categories
Validation
Tree-Growing Criteria
Options
Saving Model Information
Tree Display
Statistics
Charts
Selection and Scoring Rules


Tree Display

trees,trees,trees
controlling tree display,controlling tree display,controlling tree display
showing and hiding branch statistics,showing and hiding branch statistics,showing and hiding branch statistics
tree contents in a table,tree contents in a table,tree contents in a table
tree orientation,tree orientation,tree orientation

You can control the initial appearance of the tree or completely suppress the tree display.

Tree. By default, the tree diagram is included in the output displayed in the Viewer. Deselect (uncheck) this option to exclude the tree diagram from the output.

Display. These options control the initial appearance of the tree diagram in the Viewer. All of these attributes can also be modified by editing the generated tree.

• Orientation. The tree can be displayed top down with the root node at the top, left to right, or right to left.

• Node contents. Nodes can display tables, charts, or both. For categorical dependent variables, tables display frequency counts and percentages, and the charts are bar charts. For scale dependent variables, tables display means, standard deviations, number of cases, and predicted values, and the charts are histograms.

• Scale. By default, large trees are automatically scaled down in an attempt to fit the tree on the page. You can specify a custom scale percentage of up to 200%.

• Independent variable statistics. For CHAID and Exhaustive CHAID, statistics include F value (for scale dependent variables) or chi-square value (for categorical dependent variables) as well as significance value and degrees of freedom. For CRT, the improvement value is shown. For QUEST, F, significance value, and degrees of freedom are shown for scale and ordinal independent variables; for nominal independent variables, chi-square, significance value, and degrees of freedom are shown.

• Node definitions. Node definitions display the value(s) of the independent variable used at each node split.

Tree in table format. Summary information for each node in the tree, including parent node number, independent variable statistics, independent variable value(s) for the node, mean and standard deviation for scale dependent variables, or counts and percentages for categorical dependent variables.

Expand Show details Collapse Hide details
Tree in table format
To Control the Initial Tree Display Collapse Hide details

This feature requires the Decision Trees option.

From the menus choose:

Analyze
Classify
Tree...

Click Output.

Click the Tree tab.

Related Topics

Output
Statistics
Charts
Selection and Scoring Rules


Statistics

trees,trees,trees
risk estimates,risk estimates,risk estimates
misclassification table,misclassification table,misclassification table
terminal node statistics,terminal node statistics,terminal node statistics
index values,index values,index values
predictor importance,predictor importance,predictor importance
risk estimates,risk estimates,risk estimates
trees,trees,trees
misclassification,misclassification,misclassification
trees,trees,trees
profits,profits,profits
trees,trees,trees
index values,index values,index values
trees,trees,trees

Available statistics tables depend on the measurement level of the dependent variable, the growing method, and other settings.

Model

Summary. The summary includes the method used, the variables included in the model, and the variables specified but not included in the model.

Expand Show details Collapse Hide details
Model summary table

Risk. Risk estimate and its standard error. A measure of the tree's predictive accuracy.

• For categorical dependent variables, the risk estimate is the proportion of cases incorrectly classified after adjustment for prior probabilities and misclassification costs.

• For scale dependent variables, the risk estimate is within-node variance.

Classification table. For categorical (nominal, ordinal) dependent variables, this table shows the number of cases classified correctly and incorrectly for each category of the dependent variable. Not available for scale dependent variables.

Expand Show details Collapse Hide details
Risk and classification tables

Cost, prior probability, score, and profit values. For categorical dependent variables, this table shows the cost, prior probability, score, and profit values used in the analysis. Not available for scale dependent variables.

Independent Variables

Importance to model. For the CRT growing method, ranks each independent (predictor) variable according to its importance to the model. Not available for QUEST or CHAID methods.

Surrogates by split. For the CRT and QUEST growing methods, if the model includes surrogates, lists surrogates for each split in the tree. Not available for CHAID methods. See the topic Surrogates for more information.

Node Performance

Summary. For scale dependent variables, the table includes the node number, the number of cases, and the mean value of the dependent variable. For categorical dependent variables with defined profits, the table includes the node number, the number of cases, the average profit, and the ROI (return on investment) values. Not available for categorical dependent variables without defined profits. See the topic Profits for more information.

Expand Show details Collapse Hide details
Gain summary tables for nodes and percentiles

By target category. For categorical dependent variables with defined target categories, the table includes the percentage gain, the response percentage, and the index percentage (lift) by node or percentile group. A separate table is produced for each target category. Not available for scale dependent variables or categorical dependent variables without defined target categories. See the topic Selecting Categories for more information.

Expand Show details Collapse Hide details
Target category gains for nodes and percentiles

Rows. The node performance tables can display results by terminal nodes, percentiles, or both. If you select both, two tables are produced for each target category. Percentile tables display cumulative values for each percentile, based on sort order.

Percentile increment. For percentile tables, you can select the percentile increment: 1, 2, 5, 10, 20, or 25.

Display cumulative statistics. For terminal node tables, displays additional columns in each table with cumulative results.

To Select Statistics Output Collapse Hide details

This feature requires the Decision Trees option.

From the menus choose:

Analyze
Classify
Tree...

Click Output.

Click the Statistics tab.

Related Topics

Output
Tree Display
Charts
Selection and Scoring Rules


Charts

trees,trees,trees
charts,charts,charts

Available charts depend on the measurement level of the dependent variable, the growing method, and other settings.

Independent variable importance to model. Bar chart of model importance by independent variable (predictor). Available only with the CRT growing method.

Node Performance

Gain. Gain is the percentage of total cases in the target category in each node, computed as: (node target n / total target n) x 100. The gains chart is a line chart of cumulative percentile gains, computed as: (cumulative percentile target n / total target n) x 100. A separate line chart is produced for each target category. Available only for categorical dependent variables with defined target categories. See the topic Selecting Categories for more information.

Expand Show details Collapse Hide details

The gains chart plots the same values that you would see in the Gain Percent column in the gains for percentiles table, which also reports cumulative values.

Gains for percentiles table and gains chart

Index. Index is the ratio of the node response percentage for the target category compared to the overall target category response percentage for the entire sample. The index chart is a line chart of cumulative percentile index values. Available only for categorical dependent variables. Cumulative percentile index is computed as: (cumulative percentile response percent / total response percent) x 100. A separate chart is produced for each target category, and target categories must be defined.

Expand Show details Collapse Hide details

The index chart plots the same values that you would see in the Index column in the gains for percentiles table.

Gains for percentiles table and index chart

Response. The percentage of cases in the node in the specified target category. The response chart is a line chart of cumulative percentile response, computed as: (cumulative percentile target n / cumulative percentile total n) x 100. Available only for categorical dependent variables with defined target categories.

Expand Show details Collapse Hide details

The response chart plots the same values that you would see in the Response column in the gains for percentiles table.

Gains for percentiles table and response chart

Mean. Line chart of cumulative percentile mean values for the dependent variable. Available only for scale dependent variables.

Average profit. Line chart of cumulative average profit. Available only for categorical dependent variables with defined profits. See the topic Profits for more information.

Expand Show details Collapse Hide details

The average profit chart plots the same values that you would see in the Profit column in the gain summary for percentiles table.

Gain summary for percentiles table and average profit chart

Return on investment (ROI). Line chart of cumulative ROI (return on investment). ROI is computed as the ratio of profits to expenses. Available only for categorical dependent variables with defined profits.

Expand Show details Collapse Hide details

The ROI chart plots the same values that you would see in the ROI column in the gain summary for percentiles table.

Gain summary for percentiles table and ROI chart

Percentile increment. For all percentile charts, this setting controls the percentile increments displayed on the chart: 1, 2, 5, 10, 20, or 25.

To Select Chart Output Collapse Hide details

This feature requires the Decision Trees option.

From the menus choose:

Analyze
Classify
Tree...

Click Output.

Click the Plots tab.

Related Topics

Output
Tree Display
Statistics
Selection and Scoring Rules


Selection and Scoring Rules

trees,trees,trees
generating rules,generating rules,generating rules
syntax,syntax,syntax
creating selection and scoring syntax for decision trees,creating selection and scoring syntax for decision trees,creating selection and scoring syntax for decision trees
command syntax,command syntax,command syntax
creating selection and scoring syntax for decision trees,creating selection and scoring syntax for decision trees,creating selection and scoring syntax for decision trees
SQL,SQL,SQL
creating SQL syntax for selection and scoring,creating SQL syntax for selection and scoring,creating SQL syntax for selection and scoring
rules,rules,rules
creating selection and scoring syntax for decision trees,creating selection and scoring syntax for decision trees,creating selection and scoring syntax for decision trees

The Rules tab provides the ability to generate selection or classification/prediction rules in the form of command syntax, SQL, or simple (plain English) text. You can display these rules in the Viewer and/or save the rules to an external file.

Syntax. Controls the form of the selection rules in both output displayed in the Viewer and selection rules saved to an external file.

• PASW Statistics. Command syntax language. Rules are expressed as a set of commands that define a filter condition that can be used to select subsets of cases or as COMPUTE statements that can be used to score cases.

• SQL. Standard SQL rules are generated to select or extract records from a database or assign values to those records. The generated SQL rules do not include any table names or other data source information.

• Simple text. Plain English pseudo-code. Rules are expressed as a set of logical "if...then" statements that describe the model's classifications or predictions for each node. Rules in this form can use defined variable and value labels or variable names and data values.

Type. For PASW Statistics and SQL rules, controls the type of rules generated: selection or scoring rules.

• Assign values to cases. The rules can be used to assign the model’s predictions to cases that meet node membership criteria. A separate rule is generated for each node that meets the node membership criteria.

• Select cases. The rules can be used to select cases that meet node membership criteria. For PASW Statistics and SQL rules, a single rule is generated to select all cases that meet the selection criteria.

Include surrogates in PASW Statistics and SQL rules. For CRT and QUEST, you can include surrogate predictors from the model in the rules. Rules that include surrogates can be quite complex. In general, if you just want to derive conceptual information about your tree, exclude surrogates. If some cases have incomplete independent variable (predictor) data and you want rules that mimic your tree, include surrogates. See the topic Surrogates for more information.

Nodes. Controls the scope of the generated rules. A separate rule is generated for each node included in the scope.

• All terminal nodes. Generates rules for each terminal node.

• Best terminal nodes. Generates rules for the top n terminal nodes based on index values. If the number exceeds the number of terminal nodes in the tree, rules are generated for all terminal nodes. (See note below.)

• Best terminal nodes up to a specified percentage of cases. Generates rules for terminal nodes for the top n percentage of cases based on index values. (See note below.)

• Terminal nodes whose index value meets or exceeds a cutoff value. Generates rules for all terminal nodes with an index value greater than or equal to the specified value. An index value greater than 100 means that the percentage of cases in the target category in that node exceeds the percentage in the root node. (See note below.)

• All nodes. Generates rules for all nodes.

Note 1: Node selection based on index values is available only for categorical dependent variables with defined target categories. If you have specified multiple target categories, a separate set of rules is generated for each target category.

Note 2: For PASW Statistics and SQL rules for selecting cases (not rules for assigning values), All nodes and All terminal nodes will effectively generate a rule that selects all cases used in the analysis.

Export rules to a file. Saves the rules in an external text file.

You can also generate and save selection or scoring rules interactively, based on selected nodes in the final tree model. See the topic Case Selection and Scoring Rules for more information.

Note: If you apply rules in the form of command syntax to another data file, that data file must contain variables with the same names as the independent variables included in the final model, measured in the same metric, with the same user-defined missing values (if any).

To Specify Selection or Scoring Rules Collapse Hide details

This feature requires the Decision Trees option.

From the menus choose:

Analyze
Classify
Tree...

Click Output.

Click the Rules tab.

Related Topics

Output
Tree Display
Statistics
Charts


Tree Editor

trees,trees,trees
editing,editing,editing
hiding branches and nodes,hiding branches and nodes,hiding branches and nodes
selecting multiple nodes,selecting multiple nodes,selecting multiple nodes
hiding tree branches,hiding tree branches,hiding tree branches
collapsing tree branches,collapsing tree branches,collapsing tree branches
nodes,nodes,nodes
selecting multiple tree nodes,selecting multiple tree nodes,selecting multiple tree nodes
selecting multiple tree nodes,selecting multiple tree nodes,selecting multiple tree nodes

With the Tree Editor, you can:

• Hide and show selected tree branches.

• Control display of node content, statistics displayed at node splits, and other information.

• Change node, background, border, chart, and font colors.

• Change font style and size.

• Change tree alignment.

• Select subsets of cases for further analysis based on selected nodes.

• Create and save rules for selecting or scoring cases based on selected nodes.

To edit a tree model: Collapse Hide details

To edit a tree model:

Double-click the tree model in the Viewer window.

or

From the Edit menu or the right-click context menu choose:

Edit Content
In Separate Window

Hiding and Showing Nodes Collapse Hide details

Hiding and Showing Nodes

To hide (collapse) all the child nodes in a branch beneath a parent node:

Click the minus sign (–) in the small box below the lower right corner of the parent node.

All nodes beneath the parent node on that branch will be hidden.

To show (expand) the child nodes in a branch beneath a parent node:

Click the plus sign (+) in the small box below the lower right corner of the parent node.

Note: Hiding the child nodes on a branch is not the same as pruning a tree. If you want a pruned tree, you must request pruning before you create the tree, and pruned branches are not included in the final tree. See the topic Pruning Trees for more information.

Selecting Multiple Nodes Collapse Hide details

Selecting Multiple Nodes

You can select cases, generate scoring and selections rules, and perform other actions based on the currently selected node(s). To select multiple nodes:

Click a node you want to select.

Ctrl-click the other nodes you want to select.

You can multiple-select sibling nodes and/or parent nodes in one branch and child nodes in another branch. You cannot, however, use multiple selection on a parent node and a child/descendant of the same node branch.

Related Topics

Working with Large Trees
Controlling Information Displayed in the Tree
Changing Tree Colors and Text Fonts
Case Selection and Scoring Rules


Working with Large Trees

trees,trees,trees
working with large trees,working with large trees,working with large trees

Tree models may sometimes contain so many nodes and branches that it is difficult or impossible to view the entire tree at full size. There are a number of features that you may find useful when working with large trees:

• Tree map. You can use the tree map, a much smaller, simplified version of the tree, to navigate the tree and select nodes. See the topic Tree Map for more information.

• Scaling. You can zoom out and zoom in by changing the scale percentage for the tree display. See the topic Scaling the Tree Display for more information.

• Node and branch display. You can make a tree more compact by displaying only tables or only charts in the nodes and/or suppressing the display of node labels or independent variable information. See the topic Controlling Information Displayed in the Tree for more information.

Related Topics

Tree Editor
Controlling Information Displayed in the Tree
Changing Tree Colors and Text Fonts
Case Selection and Scoring Rules
Tree Map
Scaling the Tree Display
Node Summary Window


Tree Map

trees,trees,trees
tree map,tree map,tree map

The tree map provides a compact, simplified view of the tree that you can use to navigate the tree and select nodes.

To use the tree map window:

Open the Tree Editor (double-click the tree in the Viewer window).

From the Tree Editor menus choose:

View
Tree Map

• The currently selected node is highlighted in both the Tree Model Editor and the tree map window.

• The portion of the tree that is currently in the Tree Model Editor view area is indicated with a red rectangle in the tree map. Right-click and drag the rectangle to change the section of the tree displayed in the view area.

• If you select a node in the tree map that isn't currently in the Tree Editor view area, the view shifts to include the selected node.

• Multiple node selection works the same in the tree map as in the Tree Editor: Ctrl-click to select multiple nodes. You cannot use multiple selection on a parent node and a child/descendant of the same node branch.

Related Topics

Working with Large Trees
Scaling the Tree Display
Node Summary Window


Scaling the Tree Display

trees,trees,trees
scaling tree display,scaling tree display,scaling tree display

By default, trees are automatically scaled to fit in the Viewer window, which can result in some trees that are initially very difficult to read. You can select a preset scale setting or enter your own custom scale value of between 5% and 200%.

To change the scale of the tree:

Open the Tree Editor (double-click the tree in the Viewer window).

Select a scale percentage from the drop-down list on the toolbar, or enter a custom percentage value.

or

From the Tree Editor menus choose:

View
Scale...

You can also specify a scale value before you create the tree model. See the topic Output for more information.

Related Topics

Working with Large Trees
Tree Map
Node Summary Window


Node Summary Window

The node summary window provides a larger view of the selected nodes. You can also use the summary window to view, apply, or save selection or scoring rules based on the selected nodes.

• Use the View menu in the node summary window to switch between views of a summary table, chart, or rules.

• Use the Rules menu in the node summary window to select the type of rules you want to see. See the topic Case Selection and Scoring Rules for more information.

• All views in the node summary window reflect a combined summary for all selected nodes.

To use the node summary window: Collapse Hide details

To use the node summary window:

Select the nodes in the Tree Editor. To select multiple nodes, use Ctrl-click. (For more information on selecting multiple nodes, see Tree Model Editor.)

From the menus choose:

View
Summary

Related Topics

Working with Large Trees
Tree Map
Scaling the Tree Display
Case Selection and Scoring Rules
Filtering Cases
Saving Selection and Scoring Rules


Controlling Information Displayed in the Tree

trees,trees,trees
controlling tree display,controlling tree display,controlling tree display

The Options menu in the Tree Editor allows you to control the display of node contents, independent variable (predictor) names and statistics, node definitions, and other settings. Many of these settings can be also be controlled from the toolbar.

Setting | Options Menu Selection
Highlight predicted category (categorical dependent variable) | Highlight Predicted
Tables and/or charts in node | Node Contents
Significance test values and p values | Independent Variable Statistics
Independent (predictor) variable names | Independent Variables
Independent (predictor) value(s) for nodes | Node Definitions
Alignment (top-down, left-right, right-left) | Orientation
Chart legend | Legend
Tree elements

Related Topics

Tree Editor
Working with Large Trees
Changing Tree Colors and Text Fonts
Case Selection and Scoring Rules


Changing Tree Colors and Text Fonts

trees,trees,trees
colors,colors,colors
fonts,fonts,fonts
text attributes,text attributes,text attributes
node chart colors,node chart colors,node chart colors

You can change the following colors in the tree:

• Node border, background, and text color

• Branch color and branch text color

• Tree background color

• Predicted category highlight color (categorical dependent variables)

• Node chart colors

You can also change the type font, style, and size for all text in the tree.

Note: You cannot change color or font attributes for individual nodes or branches. Color changes apply to all elements of the same type, and font changes (other than color) apply to all chart elements.

To change colors and text font attributes:

Open the Tree Editor (double-click the tree in the Viewer window).

Use the toolbar to change font attributes for the entire tree or colors for different tree elements. (ToolTips describe each control on the toolbar when you put the mouse cursor on the control.)

or

Double-click anywhere in the Tree Editor to open the Properties window, or from the menus choose:

View
Properties

For border, branch, node background, predicted category, and tree background, click the Color tab.

For font colors and attributes, click the Text tab.

For node chart colors, click the Node Charts tab.

Related Topics

Tree Editor
Working with Large Trees
Controlling Information Displayed in the Tree
Case Selection and Scoring Rules
Properties window, Color tab
Properties window, Text tab
Properties window, Node Charts tab


Properties window, Color tab

To change the colors for tree node borders, branches (lines), predicted category highlight, node background, and tree background:

Open the Tree Editor (double-click the tree in the Viewer window).

Double-click anywhere in the Tree Editor to open the Properties window.

Click the Color tab.

Select the element and then select the color.

Note: You cannot change colors for individual nodes or branches. Color changes apply to all elements of the same type.

Related Topics

Changing Tree Colors and Text Fonts
Properties window, Text tab
Properties window, Node Charts tab


Properties window, Text tab

To change the font colors and attributes in a tree:

Open the Tree Editor (double-click the tree in the Viewer window).

Double-click anywhere in the Tree Editor to open the Properties window.

Click the Text tab.

For color changes, select the element and then select the color.

For text font, size, and style, select the attribute settings from the drop-down lists.

Note: You cannot change color or font attributes for individual nodes or branches. Color changes apply to all elements of the same type, and font changes (other than color) apply to all chart elements.

Related Topics

Changing Tree Colors and Text Fonts
Properties window, Color tab
Properties window, Node Charts tab


Properties window, Node Charts tab

To change the colors for tree node charts:

Open the Tree Editor (double-click the tree in the Viewer window).

Double-click anywhere in the Tree Editor to open the Properties window.

Click the Node Charts tab.

For categorical dependent variables, select a category and then select a color for that category.

For scale dependent variables, just select a single color for the entire histogram.

Note: You cannot change colors for individual nodes or branches. Color changes apply to all elements of the same type.

Related Topics

Changing Tree Colors and Text Fonts
Properties window, Color tab
Properties window, Text tab


Case Selection and Scoring Rules

trees,trees,trees
generating rules,generating rules,generating rules
syntax,syntax,syntax
creating selection and scoring syntax for decision trees,creating selection and scoring syntax for decision trees,creating selection and scoring syntax for decision trees
command syntax,command syntax,command syntax
creating selection and scoring syntax for decision trees,creating selection and scoring syntax for decision trees,creating selection and scoring syntax for decision trees
SQL,SQL,SQL
creating SQL syntax for selection and scoring,creating SQL syntax for selection and scoring,creating SQL syntax for selection and scoring
rules,rules,rules
creating selection and scoring syntax for decision trees,creating selection and scoring syntax for decision trees,creating selection and scoring syntax for decision trees

You can use the Tree Editor to:

• Select subsets of cases based on the selected node(s). See the topic Filtering Cases for more information.

• Generate case selection rules or scoring rules in PASW Statistics command syntax or SQL format. See the topic Saving Selection and Scoring Rules for more information.

You can also automatically save rules based on various criteria when you run the Decision Tree procedure to create the tree model. See the topic Selection and Scoring Rules for more information.

Related Topics

Tree Editor
Working with Large Trees
Controlling Information Displayed in the Tree
Changing Tree Colors and Text Fonts
Node Summary Window
Filtering Cases
Saving Selection and Scoring Rules


Filtering Cases

If you want to know more about the cases in a particular node or group of nodes, you can select a subset of cases for further analysis based on the selected nodes.

Select the nodes in the Tree Editor. To select multiple nodes, use Ctrl-click. (For more information on selecting multiple nodes, see Tree Model Editor.)

From the menus choose:

Rules
Filter Cases...

Enter a filter variable name. Cases from the selected nodes will receive a value of 1 for this variable. All other cases will receive a value of 0 and will be excluded from subsequent analysis until you change the filter status.

Click OK.

Related Topics

Node Summary Window
Case Selection and Scoring Rules
Saving Selection and Scoring Rules


Saving Selection and Scoring Rules

You can save case selection or scoring rules in an external file and then apply those rules to a different data source. The rules are based on the selected nodes in the Tree Editor.

Syntax. Controls the form of the selection rules in both output displayed in the Viewer and selection rules saved to an external file.

• PASW Statistics. Command syntax language. Rules are expressed as a set of commands that define a filter condition that can be used to select subsets of cases or as COMPUTE statements that can be used to score cases.

• SQL. Standard SQL rules are generated to select/extract records from a database or assign values to those records. The generated SQL rules do not include any table names or other data source information.

Type. You can create selection or scoring rules.

• Select cases. The rules can be used to select cases that meet node membership criteria. For PASW Statistics and SQL rules, a single rule is generated to select all cases that meet the selection criteria.

• Assign values to cases. The rules can be used to assign the model’s predictions to cases that meet node membership criteria. A separate rule is generated for each node that meets the node membership criteria.

Include surrogates. For CRT and QUEST, you can include surrogate predictors from the model in the rules. Rules that include surrogates can be quite complex. In general, if you just want to derive conceptual information about your tree, exclude surrogates. If some cases have incomplete independent variable (predictor) data and you want rules that mimic your tree, include surrogates. See the topic Surrogates for more information.

To save case selection or scoring rules: Collapse Hide details

To save case selection or scoring rules:

Select the nodes in the Tree Editor. To select multiple nodes, use Ctrl-click. (For more information on selecting multiple nodes, see Tree Model Editor.)

From the menus choose:

Rules
Export...

Select the type of rules you want and enter a filename.

Note: If you apply rules in the form of command syntax to another data file, that data file must contain variables with the same names as the independent variables included in the final model, measured in the same metric, with the same user-defined missing values (if any).

Related Topics

Node Summary Window
Case Selection and Scoring Rules
Filtering Cases


Accessible Tree Map

accessibility,accessibility,accessibility
trees,trees,trees

For visually impaired users, there is an accessible tree map that works with the JAWS screen reader to read the contents of each tree node. To use the accessible tree map:

Select the tree diagram in the outline pane of the Viewer window. (You can use the arrow keys to navigate the outline pane.)

Press the Enter key to open the tree diagram in the Tree Editor.

Press Alt-V to open the View menu, and then press A to open the Accessible Tree Map window.

Use the arrow keys to navigator through the different branches of the tree or use the tab key to go through all nodes in sequential order.

Related Topics

Accessibility
Keyboard Navigation
Accessibility for the Visually Impaired
Accessibility for Blind Users
Special Considerations
Alternative Documentation


Direct Marketing

The Direct Marketing option provides a set of tools designed to improve the results of direct marketing campaigns by identifying demographic, purchasing, and other characteristics that define various groups of consumers and targeting specific groups to maximize positive response rates.

RFM Analysis. This technique identifies existing customers who are most likely to respond to a new offer. See the topic RFM Analysis for more information.

Cluster Analysis. This is an exploratory tool designed to reveal natural groupings (or clusters) within your data. For example, it can identify different groups of customers based on various demographic and purchasing characteristics. See the topic Cluster Analysis for more information.

Prospect Profiles. This technique uses results from a previous or test campaign to create descriptive profiles. You can use the profiles to target specific groups of contacts in future campaigns. See the topic Prospect Profiles for more information.

Postal Code Response Rates. This technique uses results from a previous campaign to calculate postal code response rates. Those rates can be used to target specific postal codes in future campaigns. See the topic Postal Code Response Rates for more information.

Propensity to Purchase. This technique uses results from a test mailing or previous campaign to generate propensity scores. The scores indicate which contacts are most likely to respond. See the topic Propensity to Purchase for more information.

Control Package Test. This technique compares marketing campaigns to see if there is a significant difference in effectiveness for different packages or offers. See the topic Control Package Test for more information.


RFM Analysis

RFM,RFM,RFM

RFM analysis is a technique used to identify existing customers who are most likely to respond to a new offer. This technique is commonly used in direct marketing. RFM analysis is based on the following simple theory:

• The most important factor in identifying customers who are likely to respond to a new offer is recency. Customers who purchased more recently are more likely to purchase again than are customers who purchased further in the past.

• The second most important factor is frequency. Customers who have made more purchases in the past are more likely to respond than are those who have made fewer purchases.

• The third most important factor is total amount spent, which is referred to as monetary. Customers who have spent more (in total for all purchases) in the past are more likely to respond than those who have spent less.

How RFM Analysis Works

• Customers are assigned a recency score based on date of most recent purchase or time interval since most recent purchase. This score is based on a simple ranking of recency values into a small number of categories. For example, if you use five categories, the customers with the most recent purchase dates receive a recency ranking of 5, and those with purchase dates furthest in the past receive a recency ranking of 1.

• In a similar fashion, customers are then assigned a frequency ranking, with higher values representing a higher frequency of purchases. For example, in a five category ranking scheme, customers who purchase most often receive a frequency ranking of 5.

• Finally, customers are ranked by monetary value, with the highest monetary values receiving the highest ranking. Continuing the five-category example, customers who have spent the most would receive a monetary ranking of 5.

The result is four scores for each customer: recency, frequency, monetary, and combined RFM score, which is simply the three individual scores concatenated into a single value. The "best" customers (those most likely to respond to an offer) are those with the highest combined RFM scores. For example, in a five-category ranking, there is a total of 125 possible combined RFM scores, and the highest combined RFM score is 555.

Data Considerations

• If data rows represent transactions (each row represents a single transaction, and there may be multiple transactions for each customer), use RFM from Transactions. See the topic RFM Scores from Transaction Data for more information.

• If data rows represent customers with summary information for all transactions (with columns that contain values for total amount spent, total number of transactions, and most recent transaction date), use RFM from Customer Data. See the topic RFM Scores from Customer Data for more information.

Transaction vs. customer data

Related Topics

RFM Scores from Transaction Data
RFM Scores from Customer Data
RFM Binning
Saving RFM Scores from Transaction Data
Saving RFM Scores from Customer Data
RFM Output


RFM Scores from Transaction Data

RFM,RFM,RFM
transaction data,transaction data,transaction data

RFM (Recency, Frequency, Monetary) analysis is a technique used to identify existing customers who are most likely to respond to a new offer. This technique is commonly used in direct marketing. See the topic RFM Analysis for more information.

Data Considerations Collapse Hide details

Data Considerations

In a transaction data file, each row represents a separate transaction, rather than a separate customer, and there can be multiple transaction rows for each customer. If data rows represent customers with summary information for all transactions (with columns that contain values for total amount spent, total number of transactions, and most recent transaction date), see RFM Scores from Customer Data.

The dataset must contain variables that contain the following information:

• A variable or combination of variables that identify each case (customer).

• A variable with the date of each transaction.

• A variable with the monetary value of each transaction.

RFM transaction data
Creating RFM Scores from Transaction Data Collapse Hide details

Creating RFM Scores from Transaction Data

This feature is available in the Direct Marketing option.

From the menus choose:

Direct Marketing
Choose Technique

Select Help identify my best contacts (RFM Analysis) and click Continue.

Select Transaction data and click Continue.

Select the variable that contains transaction dates.

Select the variable that contains the monetary amount for each transaction.

Select the method for summarizing transaction amounts for each customer: Total (sum of all transactions), mean, median, or maximum (highest transaction amount).

Select the variable or combination of variables that uniquely identifies each customer. For example, cases could be identified by a unique ID code or a combination of last name and first name.

Related Topics

RFM Analysis
RFM Scores from Customer Data
RFM Binning
Saving RFM Scores from Transaction Data
Saving RFM Scores from Customer Data
RFM Output


RFM Scores from Customer Data

RFM,RFM,RFM
customer data,customer data,customer data

RFM (Recency, Frequency, Monetary) analysis is a technique used to identify existing customers who are most likely to respond to a new offer. This technique is commonly used in direct marketing. See the topic RFM Analysis for more information.

Data Considerations Collapse Hide details

Data Considerations

In a customer data file, each row represents a customer, and there is only one row (case) for each customer. If data rows represent transactions, see RFM Scores from Transaction Data.

The dataset must contain variables that contain the following information:

• Most recent purchase date or a time interval since the most recent purchase date. This will be used to compute recency scores.

• Total number of purchases. This will be used to compute frequency scores.

• Summary monetary value for all purchases. This will be used to compute monetary scores. Typically, this is the sum (total) of all purchases, but it could be the mean (average), maximum (largest amount), or other summary measure.

RFM customer data

If you want to write RFM scores to a new dataset, the active dataset must also contain a variable or combination of variables that identify each case (customer).

Creating RFM Scores from Customer Data Collapse Hide details

Creating RFM Scores from Customer Data

This feature is available in the Direct Marketing option.

From the menus choose:

Direct Marketing
Choose Technique

Select Help identify my best contacts (RFM Analysis) and click Continue.

Select Customer data and click Continue.

Select the variable that contains the most recent transaction date or a number that represents a time interval since the most recent transaction.

Select the variable that contains the total number of transactions for each customer.

Select the variable that contains the summary monetary amount for each customer.

If you want to write RFM scores to a new dataset, select the variable or combination of variables that uniquely identifies each customer. For example, cases could be identified by a unique ID code or a combination of last name and first name.

Related Topics

RFM Analysis
RFM Scores from Transaction Data
RFM Binning
Saving RFM Scores from Transaction Data
Saving RFM Scores from Customer Data
RFM Output


RFM Binning

RFM,RFM,RFM
binning,binning,binning

The process of grouping a large number of numeric values into a small number of categories is sometimes referred to as binning. In RFM analysis, the bins are the ranked categories. You can use the Binning tab to modify the method used to assign recency, frequency, and monetary values to those bins.

Binning Method Collapse Hide details

Binning Method

Nested. In nested binning, a simple rank is assigned to recency values. Within each recency rank, customers are then assigned a frequency rank, and within each frequency rank, customer are assigned a monetary rank. This tends to provide a more even distribution of combined RFM scores, but it has the disadvantage of making frequency and monetary rank scores more difficult to interpret. For example, a frequency rank of 5 for a customer with a recency rank of 5 may not mean the same thing as a frequency rank of 5 for a customer with a recency rank of 4, since the frequency rank is dependent on the recency rank.

Independent. Simple ranks are assigned to recency, frequency, and monetary values. The three ranks are assigned independently. The interpretation of each of the three RFM components is therefore unambiguous; a frequency score of 5 for one customer means the same as a frequency score of 5 for another customer, regardless of their recency scores. For smaller samples, this has the disadvantage of resulting in a less even distribution of combined RFM scores.

Number of Bins Collapse Hide details

Number of Bins

The number of categories (bins) to use for each component to create RFM scores. The total number of possible combined RFM scores is the product of the three values. For example, 5 recency bins, 4 frequency bins, and 3 monetary bins would create a total of 60 possible combined RFM scores, ranging from 111 to 543.

• The default is 5 for each component, which will create 125 possible combined RFM scores, ranging from 111 to 555.

• The maximum number of bins allowed for each score component is nine.

Ties Collapse Hide details

Ties

A "tie" is simply two or more equal recency, frequency, or monetary values. Ideally, you want to have approximately the same number of customers in each bin, but a large number of tied values can affect the bin distribution. There are two alternatives for handling ties:

• Assign ties to the same bin. This method always assigns tied values to the same bin, regardless of how this affects the bin distribution. This provides a consistent binning method: If two customers have the same recency value, then they will always be assigned the same recency score. In an extreme example, however, you might have 1,000 customers, with 500 of them making their most recent purchase on the same date. In a 5-bin ranking, 50% of the customers would therefore receive a recency score of 5, instead of the desired 20%.

Note that with the nested binning method "consistency" is somewhat more complicated for frequency and monetary scores, since frequency scores are assigned within recency score bins, and monetary scores are assigned within frequency score bins. So two customers with the same frequency value may not have the same frequency score if they don't also have the same recency score, regardless of how tied values are handled.

• Randomly assign ties. This ensures an even bin distribution by assigning a very small random variance factor to ties prior to ranking; so for the purpose of assigning values to the ranked bins, there are no tied values. This process has no effect on the original values. It is only used to disambiguate ties. While this produces an even bin distribution (approximately the same number of customers in each bin), it can result in completely different score results for customers who appear to have similar or identical recency, frequency, and/or monetary values -- particularly if the total number of customers is relatively small and/or the number of ties is relatively high.

Assign Ties to Same Bin vs. Randomly Assign Ties
ID | Most Recent Purchase (Recency) | Recency Ranking
 |  | Assign Ties to Same Bin | Randomly Assign Ties
1 | 10/29/2006 | 5 | 5
2 | 10/28/2006 | 4 | 4
3 | 10/28/2006 | 4 | 4
4 | 10/28/2006 | 4 | 5
5 | 10/28/2006 | 4 | 3
6 | 9/21/2006 | 3 | 3
7 | 9/21/2006 | 3 | 2
8 | 8/13/2006 | 2 | 2
9 | 8/13/2006 | 2 | 1
10 | 6/20/2006 | 1 | 1

• In this example, assigning ties to the same bin results in an uneven bin distribution: 5 (10%), 4 (40%), 3 (20%), 2 (20%), 1 (10%).

• Randomly assigning ties results in 20% in each bin, but to achieve this result the four cases with a date value of 10/28/2006 are assigned to 3 different bins, and the 2 cases with a date value of 8/13/2006 are also assigned to different bins.

Note that the manner in which ties are assigned to different bins is entirely random (within the constraints of the end result being an equal number of cases in each bin). If you computed a second set of scores using the same method, the ranking for any particular case with a tied value could change. For example, the recency rankings of 5 and 3 for cases 4 and 5 respectively might be switched the second time.

Related Topics

RFM Analysis
RFM Scores from Transaction Data
RFM Scores from Customer Data
Saving RFM Scores from Transaction Data
Saving RFM Scores from Customer Data
RFM Output


Saving RFM Scores from Transaction Data

RFM,RFM,RFM

RFM from Transaction Data always creates a new aggregated dataset with one row for each customer. Use the Save tab to specify what scores and other variables you want to save and where you want to save them.

Variables Collapse Hide details

Variables

The ID variables that uniquely identify each customer are automatically saved in the new dataset. The following additional variables can be saved in the new dataset:

• Date of most recent transaction for each customer.

• Number of transactions. The total number of transaction rows for each customer.

• Amount. The summary amount for each customer based on the summary method you select on the Variables tab.

• Recency score. The score assigned to each customer based on most recent transaction date. Higher scores indicate more recent transaction dates.

• Frequency score. The score assigned to each customer based on total number of transactions. Higher scores indicate more transactions.

• Monetary score. The score assigned to each customer based on the selected monetary summary measure. Higher scores indicate a higher value for the monetary summary measure.

• RFM score. The three individual scores combined into a single value: (recency x 100) + (frequency x 10) + monetary.

By default all available variables are included in the new dataset; so deselect (uncheck) the ones you don't want to include. Optionally, you can specify your own variable names. Variable names must conform to standard variable naming rules. See the topic Variable Names for more information.

Location Collapse Hide details

Location

RFM from Transaction Data always creates a new aggregated dataset with one row for each customer. You can create a new dataset in the current session or save the RFM score data in an external data file. Dataset names must conform to standard variable naming rules. (This restriction does not apply to external data file names.)

Related Topics

RFM Analysis
RFM Scores from Transaction Data
RFM Scores from Customer Data
RFM Binning
Saving RFM Scores from Customer Data
RFM Output


Saving RFM Scores from Customer Data

RFM,RFM,RFM

This feature is available in the RFM option.

For customer data, you can add the RFM score variables to the active dataset or create a new dataset that contains the selected scores variables. Use the Save Tab to specify what score variables you want to save and where you want to save them.

Names of Saved Variables Collapse Hide details

Names of Saved Variables

• Automatically generate unique names. When adding score variables to the active dataset, this ensures that new variable names are unique. This is particularly useful if you want to add multiple different sets of RFM scores (based on different criteria) to the active dataset.

• Custom names. This allows you to assign your own variable names to the score variables. Variable names must conform to standard variable naming rules. See the topic Variable Names for more information.

Variables Collapse Hide details

Variables

Select (check) the score variables that you want to save:

• Recency score. The score assigned to each customer based on the value of the Transaction Date or Interval variable selected on the Variables tab. Higher scores are assigned to more recent dates or lower interval values.

• Frequency score. The score assigned to each customer based on the Number of Transactions variable selected on the Variables tab. Higher scores are assigned to higher values.

• Monetary score. The score assigned to each customer based on the Amount variable selected on the Variables tab. Higher scores are assigned to higher values.

• RFM score. The three individual scores combined into a single value: (recency*100)+(frequency*10)+monetary.

Location Collapse Hide details

Location

For customer data, there are three alternatives for where you can save new RFM scores:

• Active dataset. Selected RFM score variables are added to active dataset.

• New Dataset. Selected RFM score variables and the ID variables that uniquely identify each customer (case) will be written to a new dataset in the current session. Dataset names must conform to standard variable naming rules. See the topic Variable Names for more information. This option is only available if you select one or more Customer Identifier variables on the Variables tab.

• File. Selected RFM scores and the ID variables that uniquely identify each customer (case) will be saved in an external data file. This option is only available if you select one or more Customer Identifier variables on the Variables tab.

Related Topics

RFM Analysis
RFM Scores from Transaction Data
RFM Scores from Customer Data
RFM Binning
Saving RFM Scores from Transaction Data
RFM Output


RFM Output

RFM,RFM,RFM

This feature is available in the RFM option.

Binned Data

Charts and tables for binned data are based on the calculated recency, frequency, and monetary scores.

Heat map of mean monetary value by recency and frequency. The heat map of mean monetary distribution shows the average monetary value for categories defined by recency and frequency scores. Darker areas indicate a higher average monetary value.

Chart of bin counts. The chart of bin counts displays the bin distribution for the selected binning method. Each bar represents the number of cases that will be assigned each combined RFM score.

• Although you typically want a fairly even distribution, with all (or most) bars of roughly the same height, a certain amount of variance should be expected when using the default binning method that assigns tied values to the same bin.

• Extreme fluctuations in bin distribution and/or many empty bins may indicate that you should try another binning method (fewer bins and/or random assignment of ties) or reconsider the suitability of RFM analysis.

Table of bin counts. The same information that is in the chart of bin counts, except expressed in the form of a table, with bin counts in each cell.

Unbinned Data

Chart and tables for unbinned data are based on the original variables used to create recency, frequency, and monetary scores.

Histograms. The histograms show the relative distribution of values for the three variables used to calculate recency, frequency, and monetary scores. It is not unusual for these histograms to indicate somewhat skewed distributions rather than a normal or symmetrical distribution.

The horizontal axis of each histogram is always ordered from low values on the left to high values on the right. With recency, however, the interpretation of the chart depends on the type of recency measure: date or time interval. For dates, the bars on the left represent values further in the past (a less recent date has a lower value than a more recent date). For time intervals, the bars on the left represent more recent values (the smaller the time interval, the more recent the transaction).

Scatterplots of pairs of variables. These scatterplots show the relationships between the three variables used to calculate recency, frequency, and monetary scores.

It's common for the scatterplot of frequency and monetary values to show a positive correlation, since the monetary value represents the total amount for all transactions, and a larger number of transactions is likely to result in a larger total amount. It's also common to see noticeable linear groupings of points on the frequency scale, since frequency often represents a relatively small range of discrete values. For example, if the total number of transactions doesn't exceed 15, then there are only 15 possible frequency values (unless you count fractional transactions), whereas there could by hundreds of possible recency values and thousands of monetary values.

The interpretation of the recency axis depends on the type of recency measure: date or time interval. For dates, points closer to the origin represent dates further in the past. For time intervals, points closer to the origin represent more recent values.

Related Topics

RFM Analysis
RFM Scores from Transaction Data
RFM Scores from Customer Data
RFM Binning
Saving RFM Scores from Transaction Data
Saving RFM Scores from Customer Data


Cluster Analysis

cluster analysis,cluster analysis,cluster analysis
cluster analysis,cluster analysis,cluster analysis
Direct Marketing option,Direct Marketing option,Direct Marketing option
cluster,cluster,cluster
cluster analysis (Direct Marketing option),cluster analysis (Direct Marketing option),cluster analysis (Direct Marketing option)

This feature is available in the Direct Marketing option.

Cluster Analysis is an exploratory tool designed to reveal natural groupings (or clusters) within your data. For example, it can identify different groups of customers based on various demographic and purchasing characteristics.

Example. Retail and consumer product companies regularly apply clustering techniques to data that describe their customers' buying habits, gender, age, income level, etc. These companies tailor their marketing and product development strategies to each consumer group to increase sales and build brand loyalty.

Show me

Cluster Analysis Data Considerations Collapse Hide details

Cluster Analysis Data Considerations

Data. This procedure works with both continuous and categorical fields. Each record (row) represent a customer to be clustered, and the fields (variables) represent attributes upon which the clustering is based.

Record order. Note that the results may depend on the order of records. To minimize order effects, you may want to consider randomly ordering the records. You may want to run the analysis several times, with records sorted in different random orders to verify the stability of a given solution.

Measurement level. Correct measurement level assignment is important because it affects the computation of the results.

• Nominal. A variable can be treated as nominal when its values represent categories with no intrinsic ranking (for example, the department of the company in which an employee works). Examples of nominal variables include region, zip code, and religious affiliation.

• Ordinal. A variable can be treated as ordinal when its values represent categories with some intrinsic ranking (for example, levels of service satisfaction from highly dissatisfied to highly satisfied). Examples of ordinal variables include attitude scores representing degree of satisfaction or confidence and preference rating scores.

• Continuous. A variable can be treated as scale (continuous) when its values represent ordered categories with a meaningful metric, so that distance comparisons between values are appropriate. Examples of scale variables include age in years and income in thousands of dollars.

An icon next to each field indicates the current measurement level.

Measurement Level | Data Type
 | Numeric | String | Date | Time
Scale (Continuous) |  | n/a |  |
Ordinal |  |  |  |
Nominal |  |  |  |

You can change the measurement level in Variable View of the Data Editor (for more information, see Specifying Measurement Level) or you can use the Define Variable Properties dialog to suggest an appropriate measurement level for each field (for more information, see, Assigning the Measurement Level).

To Obtain Cluster Analysis Collapse Hide details

To Obtain Cluster Analysis

This feature is available in the Direct Marketing option.

From the menus choose:

Direct Marketing
Choose Technique

Select Segment my contacts into clusters.

Expand Show details Collapse Hide details
Cluster Analysis Fields tab

Select the categorical (nominal, ordinal) and continuous (scale) fields that you want to use to create segments. (See the Data section above for information on measurement level.)

Click Run to run the procedure.

Related Topics

Settings (Cluster Analysis)


Settings (Cluster Analysis)

Expand Show details Collapse Hide details
Cluster Analysis Settings tab

The Settings tab allows you to show or suppress display of charts and tables that describe the segments, save a new field in the dataset that identifies the segment (cluster) for each record in the dataset, and specify how many segments to include in the cluster solution.

Display charts and tables. Displays tables and charts that describe the segments.

Segment Membership. Saves a new field (variable) that identifies the segment to which each record belongs.

• Field names must conform to PASW Statistics naming rules. See the topic Variable Names for more information.

• The segment membership field name cannot duplicate a field name that already exists in the dataset. If you run this procedure more than once on the same dataset, you will need to specify a different name each time.

• Number of Segments. Controls how the number of segments is determined.

• Determine automatically. The procedure will automatically determine the "best" number of segments, up to the specified maximum.

Specify fixed. The procedure will produce the specified number of segments.

Related Topics

Cluster Analysis


Prospect Profiles

prospect profiles(Direct Marketing option),prospect profiles(Direct Marketing option),prospect profiles(Direct Marketing option)

This feature is available in the Direct Marketing option.

This technique uses results from a previous or test campaign to create descriptive profiles. You can use the profiles to target specific groups of contacts in future campaigns. The Response field indicates who responded to the previous or test campaign. The Profiles list contains the characteristics that you want to use to create the profile.

Example. Based on the results of a test mailing, the direct marketing division of a company wants to generate profiles of the types of customers most likely to respond to an offer, based on demographic information.

Show me

Output Collapse Hide details

Output

Output includes a table that provides a description of each profile group and displays response rates (percentage of positive responses) and cumulative response rates and a chart of cumulative response rates. If you include a target minimum response rate, the table will be color-coded to show which profiles meet the minimum cumulative response rate, and the chart will include a reference line at the specified minimum response rate value.

Response rate table and chart
Prospect Profiles Data Considerations Collapse Hide details

Prospect Profiles Data Considerations

Response Field. The response field must be nominal or ordinal. It can be string or numeric. If this field contains a value that indicates number or amount of purchases, you will need to create a new field in which a single value represents all positive responses. See the topic Creating a Categorical Response Field for more information.

Positive response value. The positive response value identifies customers who responded positively (for example, made a purchase). All other non-missing response values are assumed to indicate a negative response. If there are any defined value labels for the response field, those labels are displayed in the drop-down list. See the topic Value Labels for more information.

Create Profiles with. These fields can be nominal, ordinal, or continuous (scale). They can be string or numeric.

Measurement level. Correct measurement level assignment is important because it affects the computation of the results.

• Nominal. A variable can be treated as nominal when its values represent categories with no intrinsic ranking (for example, the department of the company in which an employee works). Examples of nominal variables include region, zip code, and religious affiliation.

• Ordinal. A variable can be treated as ordinal when its values represent categories with some intrinsic ranking (for example, levels of service satisfaction from highly dissatisfied to highly satisfied). Examples of ordinal variables include attitude scores representing degree of satisfaction or confidence and preference rating scores.

• Continuous. A variable can be treated as scale (continuous) when its values represent ordered categories with a meaningful metric, so that distance comparisons between values are appropriate. Examples of scale variables include age in years and income in thousands of dollars.

An icon next to each field indicates the current measurement level.

Measurement Level | Data Type
 | Numeric | String | Date | Time
Scale (Continuous) |  | n/a |  |
Ordinal |  |  |  |
Nominal |  |  |  |

You can change the measurement level in Variable View of the Data Editor (for more information, see Specifying Measurement Level) or you can use the Define Variable Properties dialog to suggest an appropriate measurement level for each field (for more information, see, Assigning the Measurement Level).

To Obtain Prospect Profiles Collapse Hide details

To Obtain Prospect Profiles

This feature is available in the Direct Marketing option.

From the menus choose:

Direct Marketing
Choose Technique

Select Generate profiles of my contacts who responded to an offer.

Expand Show details Collapse Hide details
Prospect Profiles Fields tab

Select the field that identifies which contacts responded to the offer. This field must be nominal or ordinal.

Enter the value that indicates a positive response. If any values have defined value labels, you can select the value label from the drop-down list, and the corresponding value will be displayed. See the topic Value Labels for more information.

Select the fields you want to use to create the profiles.

Click Run to run the procedure.

See the Data Considerations section above for more information on the response field and measurement level.

Related Topics

Settings (Prospect Profiles)
Creating a Categorical Response Field


Settings (Prospect Profiles)

Expand Show details Collapse Hide details
Prospect Profiles Settings tab

The Settings tab allows you to control the minimum profile group size and include a minimum response rate threshold in the output.

Minimum profile group size. Each profile represents the shared characteristics of a group of contacts in the dataset (for example, females under 40 who live in the west). By default, the smallest profile group size is 100. Smaller group sizes may reveal more groups, but larger group sizes may provide more reliable results. The value must be a positive integer.

Include minimum response rate threshold information in results. Results include a table that displays response rates (percentage of positive responses) and cumulative response rates and a chart of cumulative response rates. If you enter a target minimum response rate, the table will be color-coded to show which profiles meet the minimum cumulative response rate, and the chart will include a reference line at the specified minimum response rate value. See the topic Prospect Profiles for more information. The value must be greater than 0 and less than 100.

Related Topics

Prospect Profiles
Creating a Categorical Response Field


Creating a Categorical Response Field

The response field should be categorical, with one value representing all positive responses. Any other non-missing value is assumed to be a negative response. If the response field represents a continuous (scale) value, such as number of purchases or monetary amount of purchases, you need to create a new field that assigns a single positive response value to all non-zero response values.

• If negative responses are recorded as 0 (not blank, which is treated as missing), this can be computed with the following formula:

NewName=OldName>0

where NewName is the name of the new field and OldName is the name of the original field. This is a logical expression that assigns a value of 1 to all non-missing values greater than 0, and 0 to all non-missing values less than or equal to 0.

• If no value is recorded for negative responses, then these values are treated as missing, and the formula is a little more complicated:

NewName=NOT(MISSING(OldName))

In this logical expression, all non-missing response values are assigned a value of 1 and all missing response values are assigned a value of 0.

• If you cannot distinguish between negative (0) response values and missing values, then an accurate response value cannot be computed. If there are relatively few truly missing values, this may not have a significant effect on the computed response rates. If, however, there are many missing values -- such as when response information is recorded for only a small test sample of the total dataset -- then the computed response rates will be meaningless, since they will be significantly lower than the true response rates.

To Create a Categorical Response Field Collapse Hide details

To Create a Categorical Response Field

From the menus choose:

Transform
Compute Variable

For Target Variable, enter the new field (variable) name.

If negative responses are recorded as 0, for the Numeric Expression enter OldName>0, where OldName is the original field name.

If negative responses are recorded as missing (blank), for the Numeric Expression enter NOT(MISSING(OldName)), where OldName is the original field name.

Related Topics

Prospect Profiles
Settings (Prospect Profiles)


Postal Code Response Rates

postal code response rates,postal code response rates,postal code response rates
zip code response rates,zip code response rates,zip code response rates

This feature is available in the Direct Marketing option.

This technique uses results from a previous campaign to calculate postal code response rates. Those rates can be used to target specific postal codes in future campaigns. The Response field indicates who responded to the previous campaign. The Postal Code field identifies the field that contains the postal codes.

Example. Based on the results of a previous mailing, the direct marketing division of a company generates response rates by postal codes. Based on various criteria, such as a minimum acceptable response rate and/or maximum number of contacts to include in the mailing, they can then target specific postal codes.

Show me

Output Collapse Hide details

Output

Output from this procedure includes a new dataset that contains response rates by postal code, and a table and chart that summarize the results by decile rank (top 10%, top 20%, etc.). The table can be color-coded based on a user-specified minimum cumulative response rate or maximum number of contacts.

Dataset with response rates by postal code
Summary table and chart

The new dataset contains the following fields:

• Postal code. If postal code groups are based on only a portion of the complete value, then this is the value of that portion of the postal code. The header row label for this column in the Excel file is the name of the postal code field in the original dataset.

• ResponseRate. The percentage of positive responses in each postal code.

• Responses. The number of positive responses in each postal code.

• Contacts. The total number of contacts in each postal code that contain a non-missing value for the response field.

• Index. The "weighted" response based on the formula N x P x (1-P), where N is the number of contacts, and P is the response rate expressed as a proportion.

• Rank. Decile rank (top 10%, top 20% , etc.) of the cumulative postal code response rates in descending order.

Postal Code Response Rates Data Considerations Collapse Hide details

Postal Code Response Rates Data Considerations

Response Field. The response field can be string or numeric. If this field contains a value that indicates number or monetary value of purchases, you will need to create a new field in which a single value represents all positive responses. See the topic Creating a Categorical Response Field for more information.

Positive response value. The positive response value identifies customers who responded positively (for example, made a purchase). All other non-missing response values are assumed to indicate a negative response. If there are any defined value labels for the response field, those labels are displayed in the drop-down list. See the topic Value Labels for more information.

Postal Code Field. The postal code field can be string or numeric.

To Obtain Postal Code Response Rates Collapse Hide details

To Obtain Postal Code Response Rates

This feature is available in the Direct Marketing option.

From the menus choose:

Direct Marketing
Choose Technique

Select Identify top responding postal codes.

Expand Show details Collapse Hide details
Postal Code Response Rates Fields tab

Select the field that identifies which contacts responded to the offer.

Enter the value that indicates a positive response. If any values have defined value labels, you can select the value label from the drop-down list, and the corresponding value will be displayed. See the topic Value Labels for more information.

Select the field that contains the postal code.

Click Run to run the procedure.

Optionally, you can also:

• Generate response rates based on the first n characters or digits of the postal code instead of the complete value

• Automatically save the results to an Excel file

• Control output display options

Related Topics

Settings (Postal Code Response Rates)
Creating a Categorical Response Field


Settings (Postal Code Response Rates)

Expand Show details Collapse Hide details
Postal Code Response Rates Settings tab
Group Postal Codes Based On Collapse Hide details

Group Postal Codes Based On

This determines how records are grouped to calculate response rates. By default, the entire postal code is used, and all records with the same postal code are grouped together to calculate the group response rate. Alternatively, you can group records based on only a portion of the complete postal code, consisting of the first n digits or characters. For example, you might want to group records based on only the first 5 characters of a 10-character postal code or the first three digits of a 5-digit postal code. The output dataset will contain one record for each postal code group. If you enter a value, it must be a positive integer.

Numeric Postal Code Format Collapse Hide details

Numeric Postal Code Format

If the postal code field is numeric and you want to group postal codes based on the first n digits instead of the entire value, you need to specify the number of digits in the original value. The number of digits is the maximum possible number of digits in the postal code. For example, if the postal code field contains a mix of 5-digit and 9-digit zip codes, you should specify 9 as the number of digits.

Note: Depending on the display format, some 5-digit zip codes may appear to contain only 4 digits, but there is an implied leading zero.

Output Collapse Hide details

Output

In addition to the new dataset that contains response rates by postal code, you can display a table and chart that summarize the results by decile rank (top 10%, top 20%, etc.). The table displays response rates, cumulative response rates, number of records, and cumulative number of records in each decile. The chart displays cumulative response rates and cumulative number of records in each decile.

Minimum Acceptable Response Rate. If you enter a target minimum response rate or break-even formula, the table will be color-coded to show which deciles meet the minimum cumulative response rate, and the chart will include a reference line at the specified minimum response rate value. See the topic Postal Code Response Rates for more information.

• Target response rate. Response rate expressed as a percerntage (percentage of positive responses in each postal code group). The value must be greater than 0 and less than 100.

• Calculate break-even rate from formula. Calculate minimum cumulative response rate based on the formula: (Cost of mailing a package/Net revenue per response) x 100. Both values must be positive numbers. The result should be a value greater than 0 and less than 100. For example, if the cost of mailing a package is $0.75 and the net revenue per response is $56, then the minimum response rate is: (0.75/56) x 100 = 1.34%.

Maximum Number of Contacts. If you specify a maximum number of contacts, the table will be color-coded to show which deciles do not exceed the cumulative maximum number of contacts (records) and the chart will include a reference line at that value.

• Percentage of contacts. Maximum expressed as percentage. For example, you might want to know the deciles with the highest response rates that contain no more than 50% of all the contacts. The value must be greater than 0 and less than 100.

• Number of contacts. Maximum expressed as a number of contacts. For example, if you don't intend to mail out more than 10,000 packages, you could set the value at 10000. The value must be a positive integer (with no grouping symbols).

If you specify both a minimum acceptable response rate and a maximum number of contacts, the color-coding of the table will be based on whichever condition is met first.

Export to Excel Collapse Hide details

Export to Excel

This procedure automatically creates a new dataset that contains response rates by postal code. Each record (row) in the dataset represents a postal code. You can automatically save the same information in an Excel file. This file is saved in Excel 97-2003 format. The file contains:

• Postal code. If postal code groups are based on only a portion of the complete value, then this is the value of that portion of the postal code. The header row label for this column in the Excel file is the name of the postal code field in the original dataset.

• ResponseRate. The percentage of positive responses in each postal code.

• Responses. The number of positive responses in each postal code.

• Contacts. The total number of contacts in each postal code that contain a non-missing value for the response field.

• Index. The "weighted" response based on the formula N x P x (1-P), where N is the number of contacts, and P is the response rate expressed as a proportion.

• Rank. Decile rank (top 10%, top 20% , etc.) of the cumulative postal code response rates in descending order.

Related Topics

Postal Code Response Rates
Creating a Categorical Response Field


Creating a Categorical Response Field

The response field should be categorical, with one value representing all positive responses. Any other non-missing value is assumed to be a negative response. If the response field represents a continuous (scale) value, such as number of purchases or monetary amount of purchases, you need to create a new field that assigns a single positive response value to all non-zero response values.

• If negative responses are recorded as 0 (not blank, which is treated as missing), this can be computed with the following formula:

NewName=OldName>0

where NewName is the name of the new field and OldName is the name of the original field. This is a logical expression that assigns a value of 1 to all non-missing values greater than 0, and 0 to all non-missing values less than or equal to 0.

• If no value is recorded for negative responses, then these values are treated as missing, and the formula is a little more complicated:

NewName=NOT(MISSING(OldName))

In this logical expression, all non-missing response values are assigned a value of 1 and all missing response values are assigned a value of 0.

• If you cannot distinguish between negative (0) response values and missing values, then an accurate response value cannot be computed. If there are relatively few truly missing values, this may not have a significant effect on the computed response rates. If, however, there are many missing values -- such as when response information is recorded for only a small test sample of the total dataset -- then the computed response rates will be meaningless, since they will be significantly lower than the true response rates.

To Create a Categorical Response Field Collapse Hide details

To Create a Categorical Response Field

From the menus choose:

Transform
Compute Variable

For Target Variable, enter the new field (variable) name.

If negative responses are recorded as 0, for the Numeric Expression enter OldName>0, where OldName is the original field name.

If negative responses are recorded as missing (blank), for the Numeric Expression enter NOT(MISSING(OldName)), where OldName is the original field name.

Related Topics

Postal Code Response Rates
Settings (Postal Code Response Rates)


Propensity to Purchase

propensity to purchase,propensity to purchase,propensity to purchase
logistic regression (Direct Maketing),logistic regression (Direct Maketing),logistic regression (Direct Maketing)

Propensity to Purchase uses results from a test mailing or previous campaign to generate scores. The scores indicate which contacts are most likely to respond. The Response field indicates who replied to the test mailing or previous campaign. The Propensity fields are the characteristics that you want to use to predict the probability that contacts with similar characteristics will respond.

This technique uses binary logistic regression to generate the propensity scores.

Example. The direct marketing division of a company uses results from a test mailing to assign propensity scores to the rest of their contact database, using various demographic characteristics to identify contacts most likely to respond and make a purchase.

Show me
Output Collapse Hide details

Output

This procedure automatically creates a new field in the dataset that contain propensity scores. Optional diagnostic output includes an overall model quality chart and a classification table that compares predicted responses to actual responses. You can also create a new dataset or an Excel file that contains only contacts that meet certain criteria, such as a minimum propensity score.

Overall model quality chart
Propensity to Purchase Data Considerations Collapse Hide details

Propensity to Purchase Data Considerations

Response Field. The response field can be string or numeric. If this field contains a value that indicates number or monetary value of purchases, you will need to create a new field in which a single value represents all positive responses. See the topic Creating a Categorical Response Field for more information.

Positive response value. The positive response value identifies customers who responded positively (for example, made a purchase). All other non-missing response values are assumed to indicate a negative response. If there are any defined value labels for the response field, those labels are displayed in the drop-down list. See the topic Value Labels for more information.

Note: The procedure assigns scores to all records in the data file, regardless of whether they were included in the mailing or not. A "negative response" means that the contact was included in the mailing but did not respond positively (for example, did not make a purchase). The data should make a distinction between contacts included in the mailing that did not respond and contacts that did not respond because they were not included in the mailing. See the topic Creating a Categorical Response Field for more information.

Predict Propensity with. The fields used to predict propensity can be string or numeric, and they can be nominal, ordinal, or continuous (scale) -- but it is important to assign the proper measurement level to all predictor fields.

Measurement level. Correct measurement level assignment is important because it affects the computation of the results.

• Nominal. A variable can be treated as nominal when its values represent categories with no intrinsic ranking (for example, the department of the company in which an employee works). Examples of nominal variables include region, zip code, and religious affiliation.

• Ordinal. A variable can be treated as ordinal when its values represent categories with some intrinsic ranking (for example, levels of service satisfaction from highly dissatisfied to highly satisfied). Examples of ordinal variables include attitude scores representing degree of satisfaction or confidence and preference rating scores.

• Continuous. A variable can be treated as scale (continuous) when its values represent ordered categories with a meaningful metric, so that distance comparisons between values are appropriate. Examples of scale variables include age in years and income in thousands of dollars.

An icon next to each field indicates the current measurement level.

Measurement Level | Data Type
 | Numeric | String | Date | Time
Scale (Continuous) |  | n/a |  |
Ordinal |  |  |  |
Nominal |  |  |  |

You can change the measurement level in Variable View of the Data Editor (for more information, see Specifying Measurement Level) or you can use the Define Variable Properties dialog to suggest an appropriate measurement level for each field (for more information, see, Assigning the Measurement Level).

To Obtain Propensity to Purchase Scores Collapse Hide details

To Obtain Propensity to Purchase Scores

This feature is available in the Direct Marketing option.

From the menus choose:

Direct Marketing
Choose Technique

Select Select contacts most likely to purchase.

Expand Show details Collapse Hide details
Propensity to Purchase Fields tab

Select the field that identifies which contacts responded to the offer.

Enter the value that indicates a positive response. If any values have defined value labels, you can select the value label from the drop-down list, and the corresponding value will be displayed. See the topic Value Labels for more information.

Select the fields you want to use to predict propensity.

Click Run to run the procedure.

See the Data Considerations section above for more information on the response field and measurement level.

Optionally, you can do a bunch of other stuff.

Related Topics

Creating a Categorical Response Field


Settings (Propensity to Purchase)

Expand Show details Collapse Hide details
Propensity to Purchase, Settings tab
Model Validation Collapse Hide details

Model Validation

Model validation creates training and testing groups for diagnostic purposes. If you select the classification table in the Diagnostic Output section, the table will be divided into training (selected) and testing (unselected) sections for comparison purposes. Do not select model validation unless you also select the classification table. The scores are based on the model generated from the training sample, which will always contain fewer records than the total number of available records. For example, the default training sample size is 50%, and a model built on only half the available records may not be as reliable as a model built on all available records.

• Training sample partition size (%). Specify the percentage of records to assign to the training sample. The rest of the records with non-missing values for the response field are assigned to the testing sample. The value must be greater than 0 and less than 100.

• Set seed to replicate results. Since records are randomly assigned to the training and testing samples, each time you run the procedure you may get different results, unless you always specify the same starting random number seed value.

Diagnostic Output Collapse Hide details

Diagnostic Output

Overall model quality. Displays a bar chart of overall model quality, expressed as a value between 0 and 1. A good model should have a value greater than 0.5.

Goodness of fit. Displays a table that provides information on how well the model fits the data. The significance value should be above 0.05 for a good fit.

Classification table. Displays a table that compares predicted positive and negative responses to actual positive and negative responses. The overall accuracy rate can provide some indication of how well the model works, but you may be more interested in the percentage of correct predicted positive responses.

• Minimum probability. Assigns records with a score value greater than the specified value to the predicted positive response category in the classification table. The scores generated by the procedure represent the probability that the contact will respond positively (for example, make a purchase). As a general rule, you should specify a value close to your minimum target response rate, expressed as a proportion. For example, if you are interested in a response rate of at least 5%, specify 0.05. The value must be greater than 0 and less than 1.

Name and Label for Recoded Response Field Collapse Hide details

Name and Label for Recoded Response Field

This procedure automatically recodes the response field into a new field in which 1 represents positive responses and 0 represents negative responses, and the analysis is performed on the recoded field. You can override the default name and label and provide your own. Names must conform to PASW Statistics naming rules. See the topic Variable Names for more information.


Save

Expand Show details Collapse Hide details
Propensity to Purchase, Save tab
Save Scores Collapse Hide details

Save Scores

A new field containing propensity scores is automatically saved to the original dataset. Scores represent the probability of a positive response, expressed as a proportion.

• Field names must conform to PASW Statistics naming rules. See the topic Variable Names for more information.

• The field name cannot duplicate a field name that already exists in the dataset. If you run this procedure more than once on the same dataset, you will need to specify a different name each time.

Save Data As Collapse Hide details

Save Data As

Create a new PASW Statistics dataset. Creates a new dataset in the current session. This dataset includes all the fields in the original dataset, including the new propensity score field. This is primarily useful if you are creating a subset of contacts based on settings in the Data to Include and/or Filter to Apply options; otherwise it is simply an exact copy of the original dataset. If you specify Data to Include and/or Filter to Apply options, the dataset will contain only the records (contacts) that meet the specified criteria.

Save an Excel file. Saves all the fields in the original dataset, including the new propensity score field, in Excel 97-2003 format. If you specify Data to Include and/or Filter to Apply options, the Excel file will contain only the records (contacts) that meet the specified criteria.

Data to Include When Saving Collapse Hide details

Data to Include When Saving

Blanket campaign. If scores are based on responses from the entire data file (for example, a previous campaign), you can select all contacts, just the positive ("Yes") responders, or just the negative ("No") responders.

Test campaign. If scores are based on a sample of the entire data file (for example, a test mailing), you can select contacts not included in the test campaign, all contacts, just positive ("Yes") responders, or just negative ("No") responders.

Note: The procedure assigns scores to all records in the data file, regardless of whether they were included in the mailing or not. A "negative response" means that the contact was included in the mailing but did not respond positively (for example, did not make a purchase). The data should make a distinction between contacts included in the mailing that did not respond and contacts that did not respond because they were not included in the mailing. See the topic Creating a Categorical Response Field for more information.

Filter to Apply When Saving Collapse Hide details

Filter to Apply When Saving

Filtering applies additional selection criteria, beyond any selection criteria you may have selected in the Data to Include When Saving group.

None. No selection filtering is applied.

Score >= average response rate. Include only contacts with propensity scores equal to or greater than the overall average response rate. For example, if the overall response rate is 1.5%, only contacts with propensity score of 0.015 or higher will be included.

Score >= value. Include only contacts with propensity scores equal to or greater than the specified value. Propensity scores are predicted probabilities of a positive response, expressed as a proportion. The value must be greater than 0 and less than 1.

Include top. Include only the top n or top n% of contacts with the highest propensity scores. If you select Count, the value must be a positive integer. If you select Percent, the value must be greater than 0 and less than 100.

Exclude bottom. Exclude the bottom n or bottom n% of contacts with the lowest propensity scores. If you select Count, the value must be a positive integer. If you select Percent, the value must be greater than 0 and less than 100.


Creating a Categorical Response Field

The response field should be categorical, with one value representing all positive responses. Any other non-missing value is assumed to be a negative response. If the response field represents a continuous (scale) value, such as number of purchases or monetary amount of purchases, you need to create a new field that assigns a single positive response value to all non-zero response values.

• If negative responses are recorded as 0 (not blank, which is treated as missing), this can be computed with the following formula:

NewName=OldName>0

where NewName is the name of the new field and OldName is the name of the original field. This is a logical expression that assigns a value of 1 to all non-missing values greater than 0, and 0 to all non-missing values less than or equal to 0.

• If no value is recorded for negative responses, then these values are treated as missing, and the formula is a little more complicated:

NewName=NOT(MISSING(OldName))

In this logical expression, all non-missing response values are assigned a value of 1 and all missing response values are assigned a value of 0.

• If you cannot distinguish between negative (0) response values and missing values, then an accurate response value cannot be computed. If there are relatively few truly missing values, this may not have a significant effect on the computed response rates. If, however, there are many missing values -- such as when response information is recorded for only a small test sample of the total dataset -- then the computed response rates will be meaningless, since they will be significantly lower than the true response rates.

To Create a Categorical Response Field Collapse Hide details

To Create a Categorical Response Field

From the menus choose:

Transform
Compute Variable

For Target Variable, enter the new field (variable) name.

If negative responses are recorded as 0, for the Numeric Expression enter OldName>0, where OldName is the original field name.

If negative responses are recorded as missing (blank), for the Numeric Expression enter NOT(MISSING(OldName)), where OldName is the original field name.

Related Topics

Propensity to Purchase


Control Package Test

control package test,control package test,control package test

This feature is available in the Direct Marketing option.

This technique compares marketing campaigns to see if there is a significant difference in effectiveness for different packages or offers. Campaign effectiveness is measured by responses. The Campaign Field identifies different campaigns, for example Offer A and Offer B. The Response Field indicates if a contact responded to the campaign. Select Purchase Amount when the response is recorded as a purchase amount, for example “99.99”. Select Reply when the response simply indicates if the contact responded positively or not, for example "Yes" or "No".

Example. The direct marketing division of a company wants to see if a new package design will generate more positive responses than the existing package. So they send out a test mailing to determine if the new package generates a significantly higher positive response rate. The test mailing consists of a control group that receives the existing package and a test group that receives the new package design. The results for the two groups are then compared to see if there is a significant difference.

Show me

Output Collapse Hide details

Output

Output includes a table that displays counts and percentages of positive and negative responses for each group defined by the Campaign Field and a table that identifies which groups differ significantly from each other.

Control Package Test output
Control Package Test Data Considerations and Assumptions Collapse Hide details

Control Package Test Data Considerations and Assumptions

Campaign Field. The Campaign Field should be categorical (nominal or ordinal).

Effectiveness Response Field. If you select Purchase amount for the Effectiveness Field, the field must be numeric, and the level of measurement should be continuous (scale).

If you cannot distinguish between negative (for purchase amount, a value of 0) response values and missing values, then an accurate response rate cannot be computed. If there are relatively few truly missing values, this may not have a significant effect on the computed response rates. If, however, there are many missing values -- such as when response information is recorded for only a small test sample of the total dataset -- then the computed response rates will be meaningless, since they will be significantly lower than the true response rates.

Assumptions. This procedure assumes that contacts have been randomly assigned to each campaign group. In other words, no particular demographic, purchase history, or other characteristics affect group assignment, and all contacts have an equal probability of being assigned to any group.

To Obtain a Control Package Test Collapse Hide details

To Obtain a Control Package Test

This feature is available in the Direct Marketing option.

From the menus choose:

Direct Marketing
Choose Technique

Select Compare effectiveness of campaigns.

Expand Show details Collapse Hide details
Control Package Test dialog

Select the field that identifies which campaign group each contact belongs to (for example, offer A, offer B, etc.) This field must be nominal or ordinal.

Select the field that indicates response effectiveness.

If the response field is a purchase amount, the field must be numeric.

If the response field simply indicates if the contact responded positively or not (for example "Yes" or "No"), select Reply and enter the value that represents a positive response. If any values have defined value labels, you can select the value label from the drop-down list, and the corresponding value will be displayed. See the topic Value Labels for more information.

A new field is automatically created, in which 1 represents positive responses and 0 represents negative responses, and the analysis is performed on the new field. You can override the default name and label and provide your own. Names must conform to PASW Statistics naming rules. See the topic Variable Names for more information.

Click Run to run the procedure.


Missing Value Analysis

Missing Value Analysis,Missing Value Analysis,Missing Value Analysis
incomplete data,incomplete data,incomplete data
see Missing Value Analysis,see Missing Value Analysis,see Missing Value Analysis
listwise deletion,listwise deletion,listwise deletion
in Missing Value Analysis,in Missing Value Analysis,in Missing Value Analysis
pairwise deletion,pairwise deletion,pairwise deletion
in Missing Value Analysis,in Missing Value Analysis,in Missing Value Analysis
Little's MCAR test,Little's MCAR test,Little's MCAR test
in Missing Value Analysis,in Missing Value Analysis,in Missing Value Analysis
MCAR test,MCAR test,MCAR test
in Missing Value Analysis,in Missing Value Analysis,in Missing Value Analysis

The Missing Value Analysis procedure performs three primary functions:

• Describes the pattern of missing data. Where are the missing values located? How extensive are they? Do pairs of variables tend to have values missing in multiple cases? Are data values extreme? Are values missing randomly?

• Estimates means, standard deviations, covariances, and correlations for different missing value methods: listwise, pairwise, regression, or EM (expectation-maximization). The pairwise method also displays counts of pairwise complete cases.

• Fills in (imputes) missing values with estimated values using regression or EM methods; however, multiple imputation is generally considered to provide more accurate results.

Missing value analysis helps address several concerns caused by incomplete data. If cases with missing values are systematically different from cases without missing values, the results can be misleading. Also, missing data may reduce the precision of calculated statistics because there is less information than originally planned. Another concern is that the assumptions behind many statistical procedures are based on complete cases, and missing values can complicate the theory required.

Example. In evaluating a treatment for leukemia, several variables are measured. However, not all measurements are available for every patient. The patterns of missing data are displayed, tabulated, and found to be random. An EM analysis is used to estimate the means, correlations, and covariances. It is also used to determine that the data are missing completely at random. Missing values are then replaced by imputed values and saved into a new data file for further analysis.

Statistics. Univariate statistics, including number of nonmissing values, mean, standard deviation, number of missing values, and number of extreme values. Estimated means, covariance matrix, and correlation matrix, using listwise, pairwise, EM, or regression methods. Little's MCAR test with EM results. Summary of means by various methods. For groups defined by missing versus nonmissing values: t tests. For all variables: missing value patterns displayed cases-by-variables.

Data Considerations Collapse Hide details

Data Considerations

Data. Data can be categorical or quantitative (scale or continuous). However, you can estimate statistics and impute missing data only for the quantitative variables. For each variable, missing values that are not coded as system-missing must be defined as user-missing. For example, if a questionnaire item has the response Don't know coded as 5 and you want to treat it as missing, the item should have 5 coded as a user-missing value. See the topic Missing Values for more information.

Assumptions. Listwise, pairwise, and regression estimation depend on the assumption that the pattern of missing values does not depend on the data values. (This condition is known as missing completely at random, or MCAR.) Therefore, all methods (including the EM method) for estimation give consistent and unbiased estimates of the correlations and covariances when the data are MCAR. Violation of the MCAR assumption can lead to biased estimates produced by the listwise, pairwise, and regression methods. If the data are not MCAR, you need to use EM estimation.

EM estimation depends on the assumption that the pattern of missing data is related to the observed data only. (This condition is called missing at random, or MAR.) This assumption allows estimates to be adjusted using available information. For example, in a study of education and income, the subjects with low education may have more missing income values. In this case, the data are MAR, not MCAR. In other words, for MAR, the probability that income is recorded depends on the subject's level of education. The probability may vary by education but not by income within that level of education. If the probability that income is recorded also varies by the value of income within each level of education (for example, people with high incomes don't report them), then the data are neither MCAR nor MAR. This is not an uncommon situation, and, if it applies, none of the methods is appropriate.

Related procedures. Many procedures allow you to use listwise or pairwise estimation. Linear Regression and Factor Analysis allow replacement of missing values by the mean values. In the Forecasting add-on module, several methods are available to replace missing values in time series.

To Obtain Missing Value Analysis Collapse Hide details

To Obtain Missing Value Analysis

This feature requires the Missing Values option.

From the menus choose:

Analyze
Missing Value Analysis...

Select at least one quantitative (scale) variable for estimating statistics and optionally imputing missing values.

Optionally, you can:

• Select categorical variables (numeric or string) and enter a limit on the number of categories (Maximum Categories).

• Click Patterns to tabulate patterns of missing data. See the topic Displaying Patterns of Missing Values for more information.

• Click Descriptives to display descriptive statistics of missing values. See the topic Displaying Descriptive Statistics for Missing Values for more information.

• Select a method for estimating statistics (means, covariances, and correlations) and possibly imputing missing values. See the topic Estimating Statistics and Imputing Missing Values for more information.

• If you select EM or Regression, click Variables to specify a subset to be used for the estimation. See the topic Predicted and Predictor Variables for more information.

• Select a case label variable. This variable is used to label cases in patterns tables that display individual cases.

Show me

Related Topics

MVA Command Additional Features
Displaying Patterns of Missing Values
Displaying Descriptive Statistics for Missing Values
EM Estimation Options
Regression Estimation Options
Predicted and Predictor Variables
MVA


Displaying Patterns of Missing Values

Missing Value Analysis,Missing Value Analysis,Missing Value Analysis
patterns,patterns,patterns
sorting cases,sorting cases,sorting cases
in Missing Value Analysis,in Missing Value Analysis,in Missing Value Analysis
tabulating cases,tabulating cases,tabulating cases
in Missing Value Analysis,in Missing Value Analysis,in Missing Value Analysis

You can choose to display various tables showing the patterns and extent of missing data. These tables can help you identify:

• Where missing values are located

• Whether pairs of variables tend to have missing values in individual cases

• Whether data values are extreme

Display

Three types of tables are available for displaying patterns of missing data.

Tabulated cases. The missing value patterns in the analysis variables are tabulated, with frequencies shown for each pattern. Use Sort variables by missing value pattern to specify whether counts and variables are sorted by similarity of patterns. Use Omit patterns with less than n % of cases to eliminate patterns that occur infrequently.

Cases with missing values. Each case with a missing or extreme value is tabulated for each analysis variable. Use Sort variables by missing value pattern to specify whether counts and variables are sorted by similarity of patterns.

All cases. Each case is tabulated, and missing and extreme values are indicated for each variable. Cases are listed in the order they appear in the data file, unless a variable is specified in Sort by.

In the tables that display individual cases, the following symbols are used:

+ | Extremely high value
- | Extremely low value
S | System-missing value
A | First type of user-missing value
B | Second type of user-missing value
C | Third type of user-missing value

Variables

You can display additional information for the variables that are included in the analysis. The variables that you add to Additional Information for are displayed individually in the missing patterns table. For quantitative (scale) variables, the mean is displayed; for categorical variables, the number of cases having the pattern in each category is displayed.

• Sort by. Cases are listed according to the ascending or descending order of the values of the specified variable. Available only for All cases.

To Display Missing Value Patterns Collapse Hide details

To Display Missing Value Patterns

This feature requires the Missing Values option.

From the menus choose:

Analyze
Missing Value Analysis...

In the main Missing Value Analysis dialog box, select the variable(s) for which you want to display missing value patterns.

Click Patterns.

Select the pattern table(s) that you want to display.

Related Topics

EM Estimation Options
Regression Estimation Options
Predicted and Predictor Variables
MVA Command Additional Features
Missing Value Analysis
Displaying Descriptive Statistics for Missing Values


Displaying Descriptive Statistics for Missing Values

Missing Value Analysis,Missing Value Analysis,Missing Value Analysis
descriptive statistics,descriptive statistics,descriptive statistics
mean,mean,mean
in Missing Value Analysis,in Missing Value Analysis,in Missing Value Analysis
standard deviation,standard deviation,standard deviation
in Missing Value Analysis,in Missing Value Analysis,in Missing Value Analysis
extreme value counts,extreme value counts,extreme value counts
in Missing Value Analysis,in Missing Value Analysis,in Missing Value Analysis
missing values,missing values,missing values
univariate statistics,univariate statistics,univariate statistics
mismatch,mismatch,mismatch
in Missing Value Analysis,in Missing Value Analysis,in Missing Value Analysis
t test,t test,t test
in Missing Value Analysis,in Missing Value Analysis,in Missing Value Analysis
indicator variables,indicator variables,indicator variables
in Missing Value Analysis,in Missing Value Analysis,in Missing Value Analysis
missing indicator variables,missing indicator variables,missing indicator variables
in Missing Value Analysis,in Missing Value Analysis,in Missing Value Analysis
frequency tables,frequency tables,frequency tables
in Missing Value Analysis,in Missing Value Analysis,in Missing Value Analysis
tabulating categories,tabulating categories,tabulating categories
in Missing Value Analysis,in Missing Value Analysis,in Missing Value Analysis

Univariate Statistics

Univariate statistics can help you identify the general extent of missing data. For each variable, the following are displayed:

• Number of nonmissing values

• Number and percentage of missing values

For quantitative (scale) variables, the following are also displayed:

• Mean

• Standard deviation

• Number of extremely high and low values

Indicator Variable Statistics

For each variable, an indicator variable is created. This categorical variable indicates whether the variable is present or missing for an individual case. The indicator variables are used to create the mismatch, t test, and frequency tables.

Percent mismatch. For each pair of variables, displays the percentage of cases in which one variable has a missing value and the other variable has a nonmissing value. Each diagonal element in the table contains the percentage of missing values for a single variable.

t tests with groups formed by indicator variables. The means of two groups are compared for each quantitative variable, using Student's t statistic. The groups specify whether a variable is present or missing. The t statistic, degrees of freedom, counts of missing and nonmissing values, and means of the two groups are displayed. You can also display any two-tailed probabilities associated with the t statistic. If your analysis results in more than one test, do not use these probabilities for significance testing. The probabilities are appropriate only when a single test is calculated.

Crosstabulations of categorical and indicator variables. A table is displayed for each categorical variable. For each category, the table shows the frequency and percentage of nonmissing values for the other variables. The percentages of each type of missing value are also displayed.

Omit variables missing less than n % of cases. To reduce table size, you can omit statistics that are computed for only a small number of cases.

To Display Descriptive Statistics Collapse Hide details

To Display Descriptive Statistics

This feature requires the Missing Values option.

From the menus choose:

Analyze
Missing Value Analysis...

In the main Missing Value Analysis dialog box, select the variable(s) for which you want to display missing value descriptive statistics.

Click Descriptives.

Choose the descriptive statistics that you want to display.

Related Topics

Missing Value Analysis
Displaying Patterns of Missing Values
EM Estimation Options
Regression Estimation Options
Predicted and Predictor Variables


Estimating Statistics and Imputing Missing Values

Missing Value Analysis,Missing Value Analysis,Missing Value Analysis
estimating statistics,estimating statistics,estimating statistics
imputing missing values,imputing missing values,imputing missing values
methods,methods,methods

You can choose to estimate means, standard deviations, covariances, and correlations using listwise (complete cases only), pairwise, EM (expectation-maximization), and/or regression methods. You can also choose to impute the missing values (estimate replacement values). Note that Multiple Imputation is generally considered to be superior to single imputation for solving the problem of missing values. Little's MCAR test is still useful for determining whether imputation is necessary.

Listwise Method

This method uses only complete cases. If any of the analysis variables have missing values, the case is omitted from the computations.

Pairwise Method

This method looks at pairs of analysis variables and uses a case only if it has nonmissing values for both of the variables. Frequencies, means, and standard deviations are computed separately for each pair. Because other missing values in the case are ignored, correlations and covariances for two variables do not depend on values missing in any other variables.

EM Method

This method assumes a distribution for the partially missing data and bases inferences on the likelihood under that distribution. Each iteration consists of an E step and an M step. The E step finds the conditional expectation of the "missing" data, given the observed values and current estimates of the parameters. These expectations are then substituted for the "missing" data. In the M step, maximum likelihood estimates of the parameters are computed as though the missing data had been filled in. "Missing" is enclosed in quotation marks because the missing values are not being directly filled in. Instead, functions of them are used in the log-likelihood.

Missing Value Analysis,Missing Value Analysis,Missing Value Analysis
MCAR test,MCAR test,MCAR test
Little's MCAR test,Little's MCAR test,Little's MCAR test

Roderick J. A. Little's chi-square statistic for testing whether values are missing completely at random (MCAR) is printed as a footnote to the EM matrices. For this test, the null hypothesis is that the data are missing completely at random, and the p value is significant at the 0.05 level. If the value is less than 0.05, the data are not missing completely at random. The data may be missing at random (MAR) or not missing at random (NMAR). You cannot assume one or the other and need to analyze the data to determine how the data are missing.

Regression Method

This method computes multiple linear regression estimates and has options for augmenting the estimates with random components. To each predicted value, the procedure can add a residual from a randomly selected complete case, a random normal deviate, or a random deviate (scaled by the square root of the residual mean square) from the t distribution.


EM Estimation Options

Missing Value Analysis,Missing Value Analysis,Missing Value Analysis
EM,EM,EM
EM,EM,EM
in Missing Value Analysis,in Missing Value Analysis,in Missing Value Analysis
correlations,correlations,correlations
in Missing Value Analysis,in Missing Value Analysis,in Missing Value Analysis
covariance,covariance,covariance
in Missing Value Analysis,in Missing Value Analysis,in Missing Value Analysis
mean,mean,mean
in Missing Value Analysis,in Missing Value Analysis,in Missing Value Analysis

Using an iterative process, the EM method estimates the means, the covariance matrix, and the correlation of quantitative (scale) variables with missing values.

Distribution. EM makes inferences based on the likelihood under the specified distribution. By default, a normal distribution is assumed. If you know that the tails of the distribution are longer than those of a normal distribution, you can request that the procedure constructs the likelihood function from a Student's t distribution with n degrees of freedom. The mixed normal distribution also provides a distribution with longer tails. Specify the ratio of the standard deviations of the mixed normal distribution and the mixture proportion of the two distributions. The mixed normal distribution assumes that only the standard deviations of the distributions differ. The means must be the same.

Maximum iterations. Sets the maximum number of iterations to estimate the true covariance. The procedure stops when this number of iterations is reached, even if the estimates have not converged.

Save completed data. You can save a dataset with the imputed values in place of the missing values. Be aware, though, that covariance-based statistics using the imputed values will underestimate their respective parameter values. The degree of underestimation is proportional to the number of cases that are jointly unobserved.

To Specify EM Options Collapse Hide details

To Specify EM Options

This feature requires the Missing Values option.

From the menus choose:

Analyze
Missing Value Analysis...

In the main Missing Value Analysis dialog box, select the variable(s) for which you want to estimate missing values using the EM method.

Select EM in the Estimation group.

To specify predicted and predictor variables, click Variables. See the topic Predicted and Predictor Variables for more information.

Click EM.

Select the desired EM options.

Related Topics

Missing Value Analysis
Displaying Patterns of Missing Values
Displaying Descriptive Statistics for Missing Values
Regression Estimation Options
Predicted and Predictor Variables
MVA Command Additional Features


Regression Estimation Options

Missing Value Analysis,Missing Value Analysis,Missing Value Analysis
regression,regression,regression
residuals,residuals,residuals
in Missing Value Analysis,in Missing Value Analysis,in Missing Value Analysis
normal variates,normal variates,normal variates
in Missing Value Analysis,in Missing Value Analysis,in Missing Value Analysis
Student's t test,Student's t test,Student's t test
in Missing Value Analysis,in Missing Value Analysis,in Missing Value Analysis
regression,regression,regression
in Missing Value Analysis,in Missing Value Analysis,in Missing Value Analysis
correlations,correlations,correlations
in Missing Value Analysis,in Missing Value Analysis,in Missing Value Analysis
covariance,covariance,covariance
in Missing Value Analysis,in Missing Value Analysis,in Missing Value Analysis
mean,mean,mean
in Missing Value Analysis,in Missing Value Analysis,in Missing Value Analysis

The regression method estimates missing values using multiple linear regression. The means, the covariance matrix, and the correlation matrix of the predicted variables are displayed.

Estimation Adjustment. The regression method can add a random component to regression estimates. You can select residuals, normal variates, Student's t variates, or no adjustment.

Expand Show details Collapse Hide details

• Residuals. Error terms are chosen randomly from the observed residuals of complete cases to be added to the regression estimates.

• Normal Variates. Error terms are randomly drawn from a distribution with the expected value 0 and the standard deviation equal to the square root of the mean squared error term of the regression.

• Student's t Variates. Error terms are randomly drawn from a t distribution with the specified degrees of freedom, and scaled by the root mean squared error (RMSE).

Maximum number of predictors. Sets a maximum limit on the number of predictor (independent) variables used in the estimation process.

Save completed data. Writes a dataset in the current session or an external PASW Statistics data file, with missing values replaced by values estimated by the regression method.

To Specify Regression Options Collapse Hide details

To Specify Regression Options

This feature requires the Missing Values option.

From the menus choose:

Analyze
Missing Value Analysis...

In the main Missing Value Analysis dialog box, select the variable(s) for which you want to estimate missing values using the regression method.

Select Regression in the Estimation group.

To specify predicted and predictor variables, click Variables. See the topic Predicted and Predictor Variables for more information.

Click Regression.

Select the desired regression options.

Related Topics

Missing Value Analysis
Displaying Patterns of Missing Values
Displaying Descriptive Statistics for Missing Values
EM Estimation Options
Predicted and Predictor Variables
MVA Command Additional Features


Predicted and Predictor Variables

Missing Value Analysis,Missing Value Analysis,Missing Value Analysis
expectation-maximization,expectation-maximization,expectation-maximization

By default, all quantitative variables are used for EM and regression estimation. If needed, you can choose specific variables as predicted and predictor variables in the estimation(s). A given variable can be in both lists, but there are situations in which you might want to restrict the use of a variable. For example, some analysts are uncomfortable estimating values of outcome variables. You may also want to use different variables for different estimations and run the procedure multiple times. For example, if you have a set of items that are nurses' ratings and another set that are doctors' ratings, you may want to make one run using the nurses' item to estimate missing nurses' items and another run for estimates of the doctors' items.

Another consideration arises when using the regression method. In multiple regression, the use of a large subset of independent variables can produce poorer predicted values than a smaller subset. Therefore, a variable must achieve an F-to-enter limit of 4.0 to be used. This limit can be changed with syntax.

To Specify Predicted and Predictor Variables Collapse Hide details

To Specify Predicted and Predictor Variables

This feature requires the Missing Values option.

From the menus choose:

Analyze
Missing Value Analysis...

In the main Missing Value Analysis dialog box, select the variable(s) for which you want to estimate missing values using the regression method.

Select EM or Regression in the Estimation group.

Click Variables.

If you want to use specific rather than all variables as predicted and predictor variables, select Select variables and move variables to the appropriate list(s).

Related Topics

Missing Value Analysis
Displaying Patterns of Missing Values
Displaying Descriptive Statistics for Missing Values
EM Estimation Options
Regression Estimation Options
MVA Command Additional Features


MVA Command Additional Features

Missing Value Analysis,Missing Value Analysis,Missing Value Analysis
command additional features,command additional features,command additional features

The command syntax language also allows you to:

• Specify separate descriptive variables for missing value patterns, data patterns, and tabulated patterns using the DESCRIBE keyword on the MPATTERN, DPATTERN, or TPATTERN subcommands.

• Specify more than one sort variable for the data patterns table, using the DPATTERN subcommand.

• Specify more than one sort variable for data patterns, using the DPATTERN subcommand.

• Specify tolerance and convergence, using the EM subcommand.

• Specify tolerance and F-to-enter, using the REGRESSION subcommand.

• Specify different variable lists for EM and Regression, using the EM and REGRESSION subcommands.

• Specify different percentages for suppressing cases displayed, for each of TTESTS, TABULATE, and MISMATCH.

Related Topics

UNIANOVA Command Additional Features
RELIABILITY Command Additional Features
ALSCAL Command Additional Features
MIXED Command Additional Features
HILOGLINEAR Command Additional Features
CSGLM Command Additional Features
CSLOGISTIC Command Additional Features
LOGISTIC REGRESSION Command Additional Features
NOMREG Command Additional Features
PROBIT Command Additional Features
NLR Command Additional Features
WLS Command Additional Features
2SLS Command Additional Features
SEASON Command Additional Features
SPECTRA Command Additional Features
Displaying Patterns of Missing Values
EM Estimation Options
Regression Estimation Options
Predicted and Predictor Variables
Missing Value Analysis
MVA


Multiple Imputation

multiple imputation,multiple imputation,multiple imputation

The purpose of multiple imputation is to generate possible values for missing values, thus creating several "complete" sets of data. Analytic procedures that work with multiple imputation datasets produce output for each "complete" dataset, plus pooled output that estimates what the results would have been if the original dataset had no missing values. These pooled results are generally more accurate than those provided by single imputation methods.

Multiple Imputation Data Considerations Collapse Hide details

Analysis variables. The analysis variables can be:

• Nominal. A variable can be treated as nominal when its values represent categories with no intrinsic ranking (for example, the department of the company in which an employee works). Examples of nominal variables include region, zip code, and religious affiliation.

• Ordinal. A variable can be treated as ordinal when its values represent categories with some intrinsic ranking (for example, levels of service satisfaction from highly dissatisfied to highly satisfied). Examples of ordinal variables include attitude scores representing degree of satisfaction or confidence and preference rating scores.

• Scale. A variable can be treated as scale (continuous) when its values represent ordered categories with a meaningful metric, so that distance comparisons between values are appropriate. Examples of scale variables include age in years and income in thousands of dollars.

The procedure assumes that the appropriate measurement level has been assigned to all variables; however, you can temporarily change the measurement level for a variable by right-clicking the variable in the source variable list and selecting a measurement level from the context menu. To permanently change the level of measurement for a variable, see Variable Measurement Level.

An icon next to each variable in the variable list identifies the measurement level and data type:

Measurement Level | Data Type
 | Numeric | String | Date | Time
Scale (Continuous) |  | n/a |  |
Ordinal |  |  |  |
Nominal |  |  |  |

Frequency weights. Frequency (replication) weights are honored by this procedure. Cases with negative or zero replication weight value are ignored. Noninteger weights are rounded to the nearest integer.

Analysis Weight. Analysis (regression or sampling) weights are incorporated in summaries of missing values and in fitting imputation models. Cases with a negative or zero analysis weight are excluded.

Complex Samples. The Multiple Imputation procedure does not explicitly handle strata, clusters, or other complex sampling structures, though it can accept final sampling weights in the form of the analysis weight variable. Also note that Complex Sampling procedures currently do not automatically analyze multiply imputed datasets. For a full list of procedures that support pooling, see Analyzing Multiple Imputation Data.

Missing Values. Both user- and system-missing values are treated as invalid values; that is, both types of missing values are replaced when values are imputed and both are treated as invalid values of variables used as predictors in imputation models. User- and system-missing values are also treated as missing in analyses of missing values.

Replicating results (Impute Missing Data Values). If you want to replicate your imputation results exactly, use the same initialization value for the random number generator, the same data order, and the same variable order, in addition to using the same procedure settings.

• Random number generation. The procedure uses random number generation during calculation of imputed values. To reproduce the same randomized results in the future, use the same initialization value for the random number generator before each run of the Impute Missing Data Values procedure. See the topic Random Number Generators for more information.

• Case order. Values are imputed in case order.

• Variable order. The fully conditional specification (FCS) imputation method imputes values in the order specified in the Analysis Variables list.

There are two dialogs dedicated to multiple imputation.

• Analyze Patterns provides descriptive measures of the patterns of missing values in the data, and can be useful as an exploratory step before imputation.

• Impute Missing Data Values is used to generate multiple imputations. The complete datasets can be analyzed with procedures that support multiple imputation datasets. See Analyzing Multiple Imputation Data for information on analyzing multiple imputation datasets and a list of procedures that support these data.

These dialogs paste MULTIPLE IMPUTATION command syntax.

See Multiple Imputation Algorithms for computational details of the multiple imputation methods.

See Multiple Imputation: Pooling Algorithms for computational details for pooled results.

Related Topics

Analyze Patterns (Multiple Imputation)
Impute Missing Data Values (Multiple Imputation)
Method (Multiple Imputation)
Constraints (Multiple Imputation)
Output (Multiple Imputation)
MULTIPLE IMPUTATION Command Additional Features
Working with Multiple Imputation Data
Analyzing Multiple Imputation Data
MULTIPLE IMPUTATION


Analyze Patterns (Multiple Imputation)

Analyze Patterns,Analyze Patterns,Analyze Patterns
multiple imputation,multiple imputation,multiple imputation
analyze patterns,analyze patterns,analyze patterns

Analyze Patterns provides descriptive measures of the patterns of missing values in the data, and can be useful as an exploratory step before imputation. This is a Multiple Imputation procedure.

Example. A telecommunications provider wants to better understand service usage patterns in its customer database. They have complete data for services used by their customers, but the demographic information collected by the company has a number of missing values. Analyzing the patterns of missing values can help determine next steps for imputation. Show me

To Analyze Patterns of Missing Data Collapse Hide details

To Analyze Patterns of Missing Data

From the menus choose:

Analyze
Multiple Imputation
Analyze Patterns...

Select at least two analysis variables. The procedure analyzes patterns of missing data for these variables.

Optional Settings

Analysis Weight. This variable contains analysis (regression or sampling) weights. The procedure incorporates analysis weights in summaries of missing values. Cases with a negative or zero analysis weight are excluded.

Output. The following optional output is available:

• Summary of missing values. This displays a paneled pie chart that shows the number and percent of analysis variables, cases, or individual data values that have one or more missing values.

• Patterns of missing values. This displays tabulated patterns of missing values. Each pattern corresponds to a group of cases with the same pattern of incomplete and complete data on analysis variables. You can use this output to determine whether the monotone imputation method can be used for your data, or if not, how closely your data approximate a monotone pattern. The procedure orders analysis variables to reveal or approximate a monotonic pattern. If no nonmonotone pattern exists after reordering you can conclude that the data have a monotonic pattern when analysis variables are ordered as such.

• Variables with the highest frequency of missing values. This displays a table of analysis variables sorted by percent of missing values in decreasing order. The table includes descriptive statistics (mean and standard deviation) for scale variables.

You can control the maximum number of variables to display and minimum percentage missing for a variable to be included in the display. The set of variables that meet both criteria are displayed. For example, setting the maximum number of variables to 50 and the minimum percentage missing to 25 requests that the table display up to 50 variables that have at least 25% missing values. If there are 60 analysis variables but only 15 have 25% or more missing values, the output includes only 15 variables.

This procedure pastes MULTIPLE IMPUTATION command syntax.

Related Topics

Multiple Imputation
Impute Missing Data Values (Multiple Imputation)
Method (Multiple Imputation)
Constraints (Multiple Imputation)
Output (Multiple Imputation)
MULTIPLE IMPUTATION Command Additional Features
Working with Multiple Imputation Data
Analyzing Multiple Imputation Data


Impute Missing Data Values (Multiple Imputation)

Impute Missing Data Values,Impute Missing Data Values,Impute Missing Data Values
multiple imputation,multiple imputation,multiple imputation
impute missing data values,impute missing data values,impute missing data values

Impute Missing Data Values is used to generate multiple imputations. The complete datasets can be analyzed with procedures that support multiple imputation datasets. See Analyzing Multiple Imputation Data for information on analyzing multiple imputation datasets and a list of procedures that support these data.This is a Multiple Imputation procedure.

Example. A telecommunications provider wants to better understand service usage patterns in its customer database. They have complete data for services used by their customers, but the demographic information collected by the company has a number of missing values. Moreover, these values are not missing completely at random, so multiple imputation will be used to complete the dataset. Show me

To Impute Missing Data Values Collapse Hide details

To Impute Missing Data Values

From the menus choose:

Analyze
Multiple Imputation
Impute Missing Data Values...

Select at least two variables in the imputation model. The procedure imputes multiple values for missing data for these variables.

Specify the number of imputations to compute. By default, this value is 5.

Specify a dataset or PASW Statistics-format data file to which imputed data should be written.

The output dataset consists of the original case data with missing data plus a set of cases with imputed values for each imputation. For example, if the original dataset has 100 cases and you have five imputations, the output dataset will have 600 cases. All variables in the input dataset are included in the output dataset. Dictionary properties (names, labels, etc.) of existing variables are copied to the new dataset. The file also contains a new variable, Imputation_, a numeric variable that indicates the imputation (0 for original data, or 1..n for cases having imputed values).

The procedure automatically defines the Imputation_ variable as a split variable (see Split File) when the output dataset is created. If splits are in effect when the procedure executes, the output dataset includes one set of imputations for each combination of values of split variables.

Optional Settings

Analysis Weight. This variable contains analysis (regression or sampling) weights. The procedure incorporates analysis weights in regression and classification models used to impute missing values. Analysis weights are also used in summaries of imputed values; for example, mean, standard deviation, and standard error. Cases with a negative or zero analysis weight are excluded.

This procedure pastes MULTIPLE IMPUTATION command syntax.

See Multiple Imputation Algorithms for computational details of multiple imputation.

Related Topics

Multiple Imputation
Analyze Patterns (Multiple Imputation)
Method (Multiple Imputation)
Constraints (Multiple Imputation)
Output (Multiple Imputation)
MULTIPLE IMPUTATION Command Additional Features
Working with Multiple Imputation Data
Analyzing Multiple Imputation Data


Method (Multiple Imputation)

Impute Missing Data Values,Impute Missing Data Values,Impute Missing Data Values
imputation method,imputation method,imputation method
monotone imputation,monotone imputation,monotone imputation
in Multiple Imputation,in Multiple Imputation,in Multiple Imputation
fully conditional specification,fully conditional specification,fully conditional specification
in Multiple Imputation,in Multiple Imputation,in Multiple Imputation

The Method tab specifies how missing values will be imputed, including the types of models used. Categorical predictors are indicator (dummy) coded.

Imputation Method. The Automatic method scans the data and uses the monotone method if the data show a monotone pattern of missing values; otherwise, fully conditional specification is used. If you are certain of which method you want to use, you can specify it as a Custom method.

• Fully conditional specification. This is an iterative Markov chain Monte Carlo (MCMC) method that can be used when the pattern of missing data is arbitrary (monotone or nonmonotone).

For each iteration and for each variable in the order specified in the variable list, the fully conditional specification (FCS) method fits a univariate (single dependent variable) model using all other available variables in the model as predictors, then imputes missing values for the variable being fit. The method continues until the maximum number of iterations is reached, and the imputed values at the maximum iteration are saved to the imputed dataset. For further details, see Fully Conditional Specification (FCS) (multiple imputation algorithms)

Maximum iterations. This specifies the number of iterations, or "steps", taken by the Markov chain used by the FCS method. If the FCS method was chosen automatically, it uses the default number of 10 iterations. When you explicitly choose FCS, you can specify a custom number of iterations. You may need to increase the number of iterations if the Markov chain hasn't converged. On the Output tab, you can save FCS iteration history data and plot it to assess convergence.

• Monotone. This is a noniterative method that can be used only when the data have a monotone pattern of missing values. A monotone pattern exists when you can order the variables such that, if a variable has a nonmissing value, all preceding variables also have nonmissing values. When specifying this as a Custom method, be sure to specify the variables in the list in an order that shows a monotone pattern.

For each variable in the monotone order, the monotone method fits a univariate (single dependent variable) model using all preceding variables in the model as predictors, then imputes missing values for the variable being fit. These imputed values are saved to the imputed dataset. For further details, see Monotone Method (multiple imputation algorithms)

Include two-way interactions. When the imputation method is chosen automatically, the imputation model for each variable includes a constant term and main effects for predictor variables. When choosing a specific method, you can optionally include all possible two-way interactions among categorical predictor variables.

Model type for scale variables. When the imputation method is chosen automatically, linear regression is used as the univariate model for scale variables. When choosing a specific method, you can alternatively choose predictive mean matching (PMM) as the model for scale variables. PMM is a variant of linear regression that matches imputed values computed by the regression model to the closest observed value.

Logistic regression is always used as the univariate model for categorical variables. Regardless of the model type, categorical predictors are handled using indicator (dummy) coding.

Singularity tolerance. Singular (or non-invertible) matrices have linearly dependent columns, which can cause serious problems for the estimation algorithm. Even near-singular matrices can lead to poor results, so the procedure will treat a matrix whose determinant is less than the tolerance as singular. Specify a positive value.

How To Specify an Imputation Method Collapse Hide details

This feature requires the Missing Values option.

From the menus choose:

Analyze
Multiple Imputation
Impute Missing Data Values...

In the Impute Missing Data Values dialog box, click the Method tab.

Related Topics

Multiple Imputation
Analyze Patterns (Multiple Imputation)
Impute Missing Data Values (Multiple Imputation)
Constraints (Multiple Imputation)
Output (Multiple Imputation)
MULTIPLE IMPUTATION Command Additional Features
Working with Multiple Imputation Data
Analyzing Multiple Imputation Data


Constraints (Multiple Imputation)

Impute Missing Data Values,Impute Missing Data Values,Impute Missing Data Values
constraints,constraints,constraints

The Constraints tab allows you to restrict the role of a variable during imputation and restrict the range of imputed values of a scale variable so that they are plausible. In addition, you can restrict the analysis to variables with less than a maximum percentage of missing values.

Scan of Data for Variable Summary. Clicking Scan Data causes the list to show analysis variables and the observed percent missing, minimum, and maximum for each. The summaries can be based on all cases or limited to a scan of the first n cases, as specified in the Cases text box. Clicking Rescan Data updates the distribution summaries.

Define Constraints

• Role. This allows you to customize the set of variables to be imputed and/or treated as predictors. Typically, each analysis variable is considered as both a dependent and predictor in the imputation model. The Role can be used to turn off imputation for variables that you want to Use as predictor only or to exclude variables from being used as predictors (Impute only) and thereby make the prediction model more compact. This is the only constraint that may be specified for categorical variables, or for variables that are used as predictors only.

• Min and Max. These columns allow you to specify minimum and maximum allowable imputed values for scale variables. If an imputed value falls outside this range, the procedure draws another value until it finds one within the range or the maximum number of draws is reached (see Maximum draws below). These columns are only available if Linear Regression is selected as the scale variable model type on the Method tab.

• Rounding. Some variables may be used as scale, but have values that are naturally further restricted; for instance, the number of people in a household must be integer, and the amount spent during a visit to the grocery store cannot have fractional cents. This column allows you to specify the smallest denomination to accept. For example, to obtain integer values you would specify 1 as the rounding denomination; to obtain values rounded to the nearest cent, you would specify 0.01. In general, values are rounded to the nearest integer multiple of the rounding denomination. The following table shows how different rounding values act upon an imputed value of 6.64823 (before rounding).

Rounding Denomination | Value to which 6.64832 is rounded
10 | 10
1 | 7
0.25 | 6.75
0.1 | 6.6
0.01 | 6.65

Exclude variables with large amounts of missing data. Typically, analysis variables are imputed and used as predictors without regard to how many missing values they have, provided they have sufficient data to estimate an imputation model. You can choose to exclude variables that have a high percentage of missing values. For example, if you specify 50 as the Maximum percentage missing, analysis variables that have more than 50% missing values are not imputed, nor are they used as predictors in imputation models.

Maximum draws. If minimum or maximum values are specified for imputed values of scale variables (see Min and Max above), the procedure attempts to draw values for a case until it finds a set of values that are within the specified ranges. If a set of values is not obtained within the specified number of draws per case, the procedure draws another set of model parameters and repeats the case-drawing process. An error occurs if a set of values within the ranges is not obtained within the specified number of case and parameter draws.

Note that increasing these values can increase the processing time. If the procedure is taking a long time, or is unable to find suitable draws, check the minimum and maximum values specified to ensure they are appropriate.

How To Specify Constraints for Multiple Imputation Collapse Hide details

This feature requires the Missing Values option.

From the menus choose:

Analyze
Multiple Imputation
Impute Missing Data Values...

In the Impute Missing Data Values dialog box, click the Constraints tab.

Related Topics

Multiple Imputation
Analyze Patterns (Multiple Imputation)
Impute Missing Data Values (Multiple Imputation)
Method (Multiple Imputation)
Output (Multiple Imputation)
MULTIPLE IMPUTATION Command Additional Features
Working with Multiple Imputation Data
Analyzing Multiple Imputation Data


Output (Multiple Imputation)

Impute Missing Data Values,Impute Missing Data Values,Impute Missing Data Values
output,output,output
iteration history,iteration history,iteration history
in Multiple Imputation,in Multiple Imputation,in Multiple Imputation

Display. Controls display of output. An overall imputation summary is always displayed, which includes tables relating the imputation specifications, iterations (for fully conditional specification method), dependent variables imputed, dependent variables excluded from imputation, and imputation sequence. If specified, constaints for analysis variables are also shown.

• Imputation model. This displays the imputation model for dependent variables and predictors, and includes univariate model type, model effects, and number of values imputed.

• Descriptive statistics. This displays descriptive statistics for dependent variables for which values are imputed. For scale variables the descriptive statistics include mean, count, standard deviation, min, and max for the original input data (prior to imputation), imputed values (by imputation), and complete data (original and imputed values together—by imputation). For categorical variables the descriptive statistics include count and percent by category for the original input data (prior to imputation), imputed values (by imputation), and complete data (original and imputed values together—by imputation).

Iteration History. When the fully conditional specification imputation method is used, you can request a dataset that contains iteration history data for FCS imputation. The dataset contains means and standard deviations by iteration and imputation for each scale dependent varable for which values are imputed. You can plot the data to help assess model convergence. Show me

How To Select Output for Multiple Imputation Collapse Hide details

This feature requires the Missing Values option.

From the menus choose:

Analyze
Multiple Imputation
Impute Missing Data Values...

In the Impute Missing Data Values dialog box, click the Output tab.

Related Topics

Multiple Imputation
Analyze Patterns (Multiple Imputation)
Impute Missing Data Values (Multiple Imputation)
Method (Multiple Imputation)
Constraints (Multiple Imputation)
MULTIPLE IMPUTATION Command Additional Features
Working with Multiple Imputation Data
Analyzing Multiple Imputation Data


Working with Multiple Imputation Data

Multiple Imputation,Multiple Imputation,Multiple Imputation

When a multiple imputation (MI) dataset is created, a variable called Imputation_, with variable label Imputation Number, is added, and the dataset is sorted by it in ascending order. Cases from the original dataset has a value of 0. Cases for imputed values are numbered 1 through M, where M is the number of imputations.

When you open a dataset, the presence of Imputation_ identifies the dataset as a possible MI dataset.

Activating a Multiple Imputation Dataset for Analysis Collapse Hide details

Activating a Multiple Imputation Dataset for Analysis

The dataset must be split using the Compare groups option, with Imputation_ as a grouping variable, in order to be treated as an MI dataset in analyses. See the topic Split File for more information. You can also define splits on other variables.

From the menus choose:

Data
Split File...

Select Compare groups.

Select Imputation Number [Imputation_] as a variable to group cases on.

Alternatively, when you turn markings on (see below), the the file is split on Imputation Number [Imputation_].

Distinguishing Imputed Values from Observed Values Collapse Hide details

Distinguishing Imputed Values from Observed Values

You can distinguish imputed values from observed values by cell background color, the font, and bold type (for imputed values). When you create a new dataset in the current session with Impute Missing Values, markings are turned on by default. When you open a saved data file that includes imputations, markings are turned off.

To turn markings on, from the Data Editor menus choose:

View
Mark Imputed Data...

Alternatively, you can turn on markings by clicking the imputation marking button at the right edge of the edit bar in Data View of the Data Editor.

Moving Between Imputations Collapse Hide details

Moving Between Imputations

From the menus choose:

Edit
Go to Imputation...

Select the imputation (or Original data) from the drop-down list.

Alternatively, you can select the imputation from the drop-down list in the edit bar in Data View of the Data Editor.

Data Editor with imputation markings ON

Relative case position is preserved when selecting imputations. For example, if there are 1000 cases in the original dataset, case 1034, the 34th case in the first imputation, displays at the top of the grid. If you select imputation 2 in the dropdown, case 2034, the 34th case in imputation 2, would display at the top of the grid. If you select Original data in the dropdown, case 34 would display at the top of the grid. Column position is also preserved when navigating between imputations, so that it is easy to compare values between imputations.

Transforming and Editing Imputed Values Collapse Hide details

Transforming and Editing Imputed Values

Sometimes you will need to perform transformations on imputed data. For example, you may want to take the log of all values of a salary variable and save the result in a new variable. A value computed using imputed data will be treated as imputed if it differs from the value computed using the original data.

If you edit an imputed value in a cell of the Data Editor, that cell is still treated as imputed. It is not recommended to edit imputed values in this way.

Related Topics

Multiple Imputation
Analyze Patterns (Multiple Imputation)
Impute Missing Data Values (Multiple Imputation)
Method (Multiple Imputation)
Constraints (Multiple Imputation)
Output (Multiple Imputation)
MULTIPLE IMPUTATION Command Additional Features
Analyzing Multiple Imputation Data


Analyzing Multiple Imputation Data

Multiple Imputation,Multiple Imputation,Multiple Imputation

Many procedures support pooling of results from analysis of multiply imputed datasets. When imputation markings are turned on, a special icon is displayed next to procedures that support pooling. On the Descriptive Statistics submenu of the Analyze menu, for example, Frequencies, Descriptives, Explore, and Crosstabs all support pooling, while Ratio, P-P Plots, and Q-Q Plots do not.

Expand Show details Collapse Hide details
Analyze menu with imputation markings ON

Both tabular output and model PMML can be pooled. There is no new procedure for requesting pooled output; instead, a new tab on the Options dialog gives you global control over multiple imputation output. See the topic Multiple Imputations Options for more information.

• Pooling of Tabular Output. By default, when you run a supported procedure on a multiple imputation (MI) dataset, results are automatically produced for each imputation, the original (unimputed) data, and pooled (final) results that take into account variation across imputations. The statistics that are pooled vary by procedure.

• Pooling of PMML. You can also obtain pooled PMML from supported procedures that export PMML. Pooled PMML is requested in the same way as, and is saved instead of, non-pooled PMML.

Unsupported procedures produce neither pooled output nor pooled PMML files.

Levels of Pooling Collapse Hide details

Levels of Pooling

Output is pooled using one of two levels:

• Naïve combination. Only the pooled parameter is available.

• Univariate combination. The pooled parameter, its standard error, test statistic and effective degrees of freedom, p-value, confidence interval, and pooling diagnostics (fraction of missing information, relative efficiency, relative increase in variance) are shown when available.

Coefficients (regression and correlation), means (and mean differences), and counts are typically pooled. When the standard error of the statistic is available, then univariate pooling is used; otherwise naïve pooling is used.

Procedures That Support Pooling Collapse Hide details

Procedures That Support Pooling

The following procedures support MI datasets, at the levels of pooling specified for each piece of output.

Frequencies

• The Statistics table supports Means at Univariate pooling (if S.E. mean is also requested) and Valid N and Missing N at Naïve pooling.

• The Frequencies table supports Frequency at Naïve pooling.

Descriptives

• The Descriptive Statistics table supports Means at Univariate pooling (if S.E. mean is also requested) and N at Naïve pooling.

Crosstabs

• The Crosstabulation table supports Count at Naïve pooling.

Means

• The Report table supports Mean at Univariate pooling (if S.E. mean is also requested) and N at Naïve pooling.

One-Sample T Test

• The Statistics table supports Mean at Univariate pooling and N at Naïve pooling.

• The Test table supports Mean Difference at Naïve pooling.

Independent-Samples T Test

• The Group Statistics table supports Means at Univariate pooling and N at Naïve pooling.

• The Test table supports Mean Difference at Univariate pooling.

Paired-Samples T Test

• The Statistics table supports Means at Univariate pooling and N at Naïve pooling.

• The Correlations table supports Correlations and N at Naïve pooling.

• The Test table supports Mean at Univariate pooling.

One-Way ANOVA

• The Descriptive Statistics table supports Mean at Univariate pooling and N at Naïve pooling.

• The Contrast Tests table supports Value of Contrast at Univariate pooling.

GLM Univariate, GLM Multivariate, and GLM Repeated

• The Between-Subjects Factors table supports N at Naïve pooling.

• The Descriptive Statistics table supports Mean and N at Naïve pooling.

• The Parameter Estimates table supports the coefficient, B, at Univariate pooling.

• The Estimated Marginal Means: Estimates table supports Mean at Univariate pooling.

• The Estimated Marginal Means: Pairwise Comparisons table supports Mean Difference at Univariate pooling.

Linear Mixed Models

• The Descriptive Statistics table supports Mean and N at Naïve pooling.

• The Estimates of Fixed Effects table supports Estimate at Univariate pooling.

• The Estimates of Covariance Parameters table supports Estimate at Univariate pooling.

• The Estimated Marginal Means: Estimates table supports Mean at Univariate pooling.

• The Estimated Marginal Means: Pairwise Comparisons table supports Mean Difference at Univariate pooling.

Generalized Linear Models and Generalized Estimating Equations. These procedures support pooled PMML.

• The Categorical Variable Information table supports N and Percents at Naïve pooling.

• The Continuous Variable Information table supports N and Mean at Naïve pooling.

• The Parameter Estimates table supports the coefficient, B, at Univariate pooling.

• The Estimated Marginal Means: Estimation Coefficients table supports Mean at Naïve pooling.

• The Estimated Marginal Means: Estimates table supports Mean at Univariate pooling.

• The Estimated Marginal Means: Pairwise Comparisons table supports Mean Difference at Univariate pooling.

Bivariate Correlations

• The Descriptive Statistics table supports Mean and N at Naïve pooling.

• The Correlations table supports Correlations and N at Naïve pooling.

Partial Correlations

• The Descriptive Statistics table supports Mean and N at Naïve pooling.

• The Correlations table supports Correlations at Naïve pooling.

Linear Regression. This procedure supports pooled PMML.

• The Descriptive Statistics table supports Mean and N at Naïve pooling.

• The Correlations table supports Correlations and N at Naïve pooling.

• The Coefficients table supports B at Univariate pooling and Correlations at Naïve pooling.

• The Correlation Coefficients table supports Correlations at Naïve pooling.

• The Residuals Statistics table supports Mean and N at Naïve pooling.

Binary Logistic Regression. This procedure supports pooled PMML.

• The Variables in the Equation table supports B at Univariate pooling.

Multinomial Logistic Regression. This procedure supports pooled PMML.

• The Parameter Estimates table supports the coefficient, B, at Univariate pooling.

Ordinal Regression

• The Parameter Estimates table supports the coefficient, B, at Univariate pooling.

Discriminant Analysis. This procedure supports pooled model XML.

• The Group Statistics table supports Mean and Valid N at Naïve pooling.

• The Pooled Within-Groups Matrices table supports Correlations at Naïve pooling.

• The Canonical Discriminant Function Coefficients table supports Unstandardized Coefficients at Naïve pooling.

• The Functions at Group Centroids table supports Unstandardized Coefficients at Naïve pooling.

• The Classification Function Coefficients table supports Coefficients at Naïve pooling.

Chi-Square Test

• The Descriptives table supports Mean and N at Naïve pooling.

• The Frequencies table supports Observed N at Naïve pooling.

Binomial Test

• The Descriptives table supports Means and N at Naïve pooling.

• The Test table supports N, Observed Proportion, and Test Proportion at Naïve pooling.

Runs Test

• The Descriptives table supports Means and N at Naïve pooling.

One-Sample Kolmogorov-Smirnov Test

• The Descriptives table supports Means and N at Naïve pooling.

Two-Independent-Samples Tests

• The Ranks table supports Mean Rank and N at Naïve pooling.

• The Frequencies table supports N at Naïve pooling.

Tests for Several Independent Samples

• The Ranks table supports Mean Rank and N at Naïve pooling.

• The Frequencies table supports Counts at Naïve pooling.

Two-Related-Samples Tests

• The Ranks table supports Mean Rank and N at Naïve pooling.

• The Frequencies table supports N at Naïve pooling.

Tests for Several Related Samples

• The Ranks table supports Mean Rank at Naïve pooling.

Cox Regression. This procedure supports pooled PMML.

• The Variables in the Equation table supports B at Univariate pooling.

• The Covariate Means table supports Mean at Naïve pooling.

See Multiple Imputation: Pooling Algorithms for computational details for pooled results.

Related Topics

Multiple Imputation
Analyze Patterns (Multiple Imputation)
Impute Missing Data Values (Multiple Imputation)
Method (Multiple Imputation)
Constraints (Multiple Imputation)
Output (Multiple Imputation)
MULTIPLE IMPUTATION Command Additional Features
Working with Multiple Imputation Data


Introduction to Neural Networks

Neural networks are the preferred tool for many predictive data mining applications because of their power, flexibility, and ease of use. Predictive neural networks are particularly useful in applications where the underlying process is complex, such as:

• Forecasting consumer demand to streamline production and delivery costs.

• Predicting the probability of response to direct mail marketing to determine which households on a mailing list should be sent an offer.

• Scoring an applicant to determine the risk of extending credit to the applicant.

• Detecting fraudulent transactions in an insurance claims database.

Neural networks used in predictive applications, such as the multilayer perceptron (MLP) and radial basis function (RBF) networks, are supervised in the sense that the model-predicted results can be compared against known values of the target variables. The Neural Networks option allows you to fit MLP and RBF networks and save the resulting models for scoring.


What Is a Neural Network?

neural networks,neural networks,neural networks
definition,definition,definition

The term neural network applies to a loosely related family of models, characterized by a large parameter space and flexible structure, descending from studies of brain functioning. As the family grew, most of the new models were designed for nonbiological applications, though much of the associated terminology reflects its origin.

Specific definitions of neural networks are as varied as the fields in which they are used. While no single definition properly covers the entire family of models, for now, consider the following description (Haykin, 1998):

A neural network is a massively parallel distributed processor that has a natural propensity for storing experiential knowledge and making it available for use. It resembles the brain in two respects:

• Knowledge is acquired by the network through a learning process.

• Interneuron connection strengths known as synaptic weights are used to store the knowledge.

For a discussion of why this definition is perhaps too restrictive, see (Ripley, 1996).

In order to differentiate neural networks from traditional statistical methods using this definition, what is not said is just as significant as the actual text of the definition. For example, the traditional linear regression model can acquire knowledge through the least-squares method and store that knowledge in the regression coefficients. In this sense, it is a neural network. In fact, you can argue that linear regression is a special case of certain neural networks. However, linear regression has a rigid model structure and set of assumptions that are imposed before learning from the data.

By contrast, the definition above makes minimal demands on model structure and assumptions. Thus, a neural network can approximate a wide range of statistical models without requiring that you hypothesize in advance certain relationships between the dependent and independent variables. Instead, the form of the relationships is determined during the learning process. If a linear relationship between the dependent and independent variables is appropriate, the results of the neural network should closely approximate those of the linear regression model. If a nonlinear relationship is more appropriate, the neural network will automatically approximate the "correct" model structure.

The trade-off for this flexibility is that the synaptic weights of a neural network are not easily interpretable. Thus, if you are trying to explain an underlying process that produces the relationships between the dependent and independent variables, it would be better to use a more traditional statistical model. However, if model interpretability is not important, you can often obtain good model results more quickly using a neural network.


Neural Network Structure

neural networks,neural networks,neural networks
architecture,architecture,architecture
architecture,architecture,architecture
neural networks,neural networks,neural networks

Although neural networks impose minimal demands on model structure and assumptions, it is useful to understand the general network architecture. The multilayer perceptron (MLP) or radial basis function (RBF) network is a function of predictors (also called inputs or independent variables) that minimize the prediction error of target variables (also called outputs).

Consider the bankloan.sav dataset that ships with the product, in which you want to be able to identify possible defaulters among a pool of loan applicants. An MLP or RBF network applied to this problem is a function of the measurements that minimize the error in predicting default. The following figure is useful for relating the form of this function.

Feedforward architecture with one hidden layer

This structure is known as a feedforward architecture because the connections in the network flow forward from the input layer to the output layer without any feedback loops. In this figure:

• The input layer contains the predictors.

• The hidden layer contains unobservable nodes, or units. The value of each hidden unit is some function of the predictors; the exact form of the function depends in part upon the network type and in part upon user-controllable specifications.

• The output layer contains the responses. Since the history of default is a categorical variable with two categories, it is recoded as two indicator variables. Each output unit is some function of the hidden units. Again, the exact form of the function depends in part on the network type and in part on user-controllable specifications.

The MLP network allows a second hidden layer; in that case, each unit of the second hidden layer is a function of the units in the first hidden layer, and each response is a function of the units in the second hidden layer.


Multilayer Perceptron

Multilayer Perceptron,Multilayer Perceptron,Multilayer Perceptron

The Multilayer Perceptron (MLP) procedure produces a predictive model for one or more dependent (target) variables based on the values of the predictor variables.

Examples. Following are two scenarios using the MLP procedure:

A loan officer at a bank needs to be able to identify characteristics that are indicative of people who are likely to default on loans and use those characteristics to identify good and bad credit risks. Using a sample of past customers, she can train a multilayer perceptron, validate the analysis using a holdout sample of past customers, and then use the network to classify prospective customers as good or bad credit risks. Show me

A hospital system is interested in tracking costs and lengths of stay for patients admitted for treatment of myocardial infarction (MI, or "heart attack"). Obtaining accurate estimates of these measures allows the administration to properly manage the available bed space as patients are treated. Using the treatment records of a sample of patients who received treatment for MI, the administrator can train a network to predict both cost and length of stay. Show me

Data Considerations Collapse Hide details

Dependent variables. The dependent variables can be:

• Nominal. A variable can be treated as nominal when its values represent categories with no intrinsic ranking (for example, the department of the company in which an employee works). Examples of nominal variables include region, zip code, and religious affiliation.

• Ordinal. A variable can be treated as ordinal when its values represent categories with some intrinsic ranking (for example, levels of service satisfaction from highly dissatisfied to highly satisfied). Examples of ordinal variables include attitude scores representing degree of satisfaction or confidence and preference rating scores.

• Scale. A variable can be treated as scale (continuous) when its values represent ordered categories with a meaningful metric, so that distance comparisons between values are appropriate. Examples of scale variables include age in years and income in thousands of dollars.

The procedure assumes that the appropriate measurement level has been assigned to all dependent variables; however, you can temporarily change the measurement level for a variable by right-clicking the variable in the source variable list and selecting a measurement level from the context menu. To permanently change the level of measurement for a variable, see Variable Measurement Level.

An icon next to each variable in the variable list identifies the measurement level and data type:

Measurement Level | Data Type
 | Numeric | String | Date | Time
Scale (Continuous) |  | n/a |  |
Ordinal |  |  |  |
Nominal |  |  |  |

Predictor variables. Predictors can be specified as factors (categorical) or covariates (scale).

Categorical variable coding. The procedure temporarily recodes categorical predictors and dependent variables using one-of-c coding for the duration of the procedure. If there are c categories of a variable, then the variable is stored as c vectors, with the first category denoted (1,0,...,0), the next category (0,1,0,...,0), ..., and the final category (0,0,...,0,1).

This coding scheme increases the number of synaptic weights and can result in slower training; however, more "compact" coding methods usually lead to poorly fit neural networks. If your network training is proceeding very slowly, try reducing the number of categories in your categorical predictors by combining similar categories or dropping cases that have extremely rare categories. For more information on recoding variables, see Recode into Same Variables or Recode into Different Variables.

All one-of-c coding is based on the training data, even if a testing or holdout sample is defined (see Partitions (Multilayer Perceptron)). Thus, if the testing or holdout samples contain cases with predictor categories that are not present in the training data, then those cases are not used by the procedure or in scoring. If the testing or holdout samples contain cases with dependent variable categories that are not present in the training data, then those cases are not used by the procedure, but they may be scored.

Rescaling. Scale-dependent variables and covariates are rescaled by default to improve network training. All rescaling is performed based on the training data, even if a testing or holdout sample is defined (see Partitions (Multilayer Perceptron)). That is, depending on the type of rescaling, the mean, standard deviation, minimum value, or maximum value of a covariate or dependent variable is computed using only the training data. If you specify a variable to define partitions, it is important that these covariates or dependent variables have similar distributions across the training, testing, and holdout samples. Use, for example, the Explore procedure to examine the distributions across partitions.

Frequency weights. Frequency weights are ignored by this procedure.

Replicating results. If you want to replicate your results exactly, use the same initialization value for the random number generator, the same data order, and the same variable order, in addition to using the same procedure settings. More details on this issue follow:

• Random number generation. The procedure uses random number generation during random assignment of partitions, random subsampling for initialization of synaptic weights, random subsampling for automatic architecture selection, and the simulated annealing algorithm used in weight initialization and automatic architecture selection. To reproduce the same randomized results in the future, use the same initialization value for the random number generator before each run of the Multilayer Perceptron procedure. See the topic Random Number Generators for more information.

• Case order. The Online and Mini-batch training methods (see Training (Multilayer Perceptron)) are explicitly dependent upon case order; however, even Batch training is dependent upon case order because initialization of synaptic weights involves subsampling from the dataset.

To minimize order effects, randomly order the cases. To verify the stability of a given solution, you may want to obtain several different solutions with cases sorted in different random orders. In situations with extremely large file sizes, multiple runs can be performed with a sample of cases sorted in different random orders.

• Variable order. Results may be influenced by the order of variables in the factor and covariate lists due to the different pattern of initial values assigned when the variable order is changed. As with case order effects, you might try different variable orders (simply drag and drop within the factor and covariate lists) to assess the stability of a given solution.

Creating a Multilayer Perceptron Network Collapse Hide details

Creating a Multilayer Perceptron Network

This feature requires the Neural Networks option.

From the menus choose:

Analyze
Neural Networks
Multilayer Perceptron...

Select at least one dependent variable.

Select at least one factor or covariate.

Optionally, on the Variables tab you can change the method for rescaling covariates. The choices are:

• Standardized. Subtract the mean and divide by the standard deviation, (x−mean)/s.

• Normalized. Subtract the minimum and divide by the range, (x−min)/(max−min). Normalized values fall between 0 and 1.

• Adjusted Normalized. Adjusted version of subtracting the minimum and dividing by the range, [2*(x−min)/(max−min)]−1. Adjusted normalized values fall between −1 and 1.

• None. No rescaling of covariates.

This procedure pastes MLP command syntax.

See MLP Algorithms for computational details for this procedure.

Related Topics

Partitions (Multilayer Perceptron)
Architecture (Multilayer Perceptron)
Training (Multilayer Perceptron)
Output (Multilayer Perceptron)
Save (Multilayer Perceptron)
Export (Multilayer Perceptron)
Options (Multilayer Perceptron)
MLP


Partitions (Multilayer Perceptron)

Multilayer Perceptron,Multilayer Perceptron,Multilayer Perceptron
partitions,partitions,partitions
training sample,training sample,training sample
in Multilayer Perceptron,in Multilayer Perceptron,in Multilayer Perceptron
testing sample,testing sample,testing sample
in Multilayer Perceptron,in Multilayer Perceptron,in Multilayer Perceptron
holdout sample,holdout sample,holdout sample
in Multilayer Perceptron,in Multilayer Perceptron,in Multilayer Perceptron

Partition Dataset. This group specifies the method of partitioning the active dataset into training, testing, and holdout samples. The training sample comprises the data records used to train the neural network; some percentage of cases in the dataset must be assigned to the training sample in order to obtain a model. The testing sample is an independent set of data records used to track errors during training in order to prevent overtraining. It is highly recommended that you create a training sample, and network training will generally be most efficient if the testing sample is smaller than the training sample. The holdout sample is another independent set of data records used to assess the final neural network; the error for the holdout sample gives an "honest" estimate of the predictive ability of the model because the holdout cases were not used to build the model.

• Randomly assign cases based on relative number of cases. Specify the relative number (ratio) of cases randomly assigned to each sample (training, testing, and holdout). The % column reports the percentage of cases that will be assigned to each sample based on the relative numbers you have specified.

For example, specifying 7, 3, 0 as the relative numbers for training, testing, and holdout samples corresponds to 70%, 30%, and 0%. Specifying 2, 1, 1 as the relative numbers corresponds to 50%, 25%, and 25%; 1, 1, 1 corresponds to dividing the dataset into equal thirds among training, testing, and holdout.

• Use partitioning variable to assign cases. Specify a numeric variable that assigns each case in the active dataset to the training, testing, or holdout sample. Cases with a positive value on the variable are assigned to the training sample, cases with a value of 0, to the testing sample, and cases with a negative value, to the holdout sample. Cases with a system-missing value are excluded from the analysis. Any user-missing values for the partition variable are always treated as valid.

Note: Using a partitioning variable will not guarantee identical results in successive runs of the procedure. See "Replicating results" in the main Multilayer Perceptron topic.

How To Set Partitions for Multilayer Perceptron Collapse Hide details

This feature requires the Neural Networks option.

From the menus choose:

Analyze
Neural Networks
Multilayer Perceptron...

In the Multilayer Perceptron dialog box, click the Partitions tab.

Related Topics

Multilayer Perceptron
Architecture (Multilayer Perceptron)
Training (Multilayer Perceptron)
Output (Multilayer Perceptron)
Save (Multilayer Perceptron)
Export (Multilayer Perceptron)
Options (Multilayer Perceptron)


Architecture (Multilayer Perceptron)

Multilayer Perceptron,Multilayer Perceptron,Multilayer Perceptron
network architecture,network architecture,network architecture
network architecture,network architecture,network architecture
in Multilayer Perceptron,in Multilayer Perceptron,in Multilayer Perceptron
output layer,output layer,output layer
in Multilayer Perceptron,in Multilayer Perceptron,in Multilayer Perceptron
activation function,activation function,activation function
in Multilayer Perceptron,in Multilayer Perceptron,in Multilayer Perceptron
hidden layer,hidden layer,hidden layer
in Multilayer Perceptron,in Multilayer Perceptron,in Multilayer Perceptron

The Architecture tab is used to specify the structure of the network. The procedure can select the "best" architecture automatically, or you can specify a custom architecture.

Automatic architecture selection builds a network with one hidden layer. Specify the minimum and maximum number of units allowed in the hidden layer, and the automatic architecture selection computes the "best" number of units in the hidden layer. Automatic architecture selection uses the default activation functions for the hidden and output layers.

Custom architecture selection gives you expert control over the hidden and output layers and can be most useful when you know in advance what architecture you want or when you need to tweak the results of the Automatic architecture selection.

Hidden Layers

The hidden layer contains unobservable network nodes (units). Each hidden unit is a function of the weighted sum of the inputs. The function is the activation function, and the values of the weights are determined by the estimation algorithm. If the network contains a second hidden layer, each hidden unit in the second layer is a function of the weighted sum of the units in the first hidden layer. The same activation function is used in both layers.

Number of Hidden Layers. A multilayer perceptron can have one or two hidden layers.

Activation Function. The activation function "links" the weighted sums of units in a layer to the values of units in the succeeding layer.

• Hyperbolic tangent. This function has the form: γ(c) = tanh(c) = (ec−e−c)/(ec+e−c). It takes real-valued arguments and transforms them to the range (–1, 1). When automatic architecture selection is used, this is the activation function for all units in the hidden layers.

• Sigmoid. This function has the form: γ(c) = 1/(1+e−c). It takes real-valued arguments and transforms them to the range (0, 1).

Number of Units. The number of units in each hidden layer can be specified explicitly or determined automatically by the estimation algorithm.

Output Layer

The output layer contains the target (dependent) variables.

Activation Function. The activation function "links" the weighted sums of units in a layer to the values of units in the succeeding layer.

• Identity. This function has the form: γ(c) = c. It takes real-valued arguments and returns them unchanged. When automatic architecture selection is used, this is the activation function for units in the output layer if there are any scale-dependent variables.

• Softmax. This function has the form: γ(ck) = exp(ck)/Σjexp(cj). It takes a vector of real-valued arguments and transforms it to a vector whose elements fall in the range (0, 1) and sum to 1. Softmax is available only if all dependent variables are categorical. When automatic architecture selection is used, this is the activation function for units in the output layer if all dependent variables are categorical.

• Hyperbolic tangent. This function has the form: γ(c) = tanh(c) = (ec−e−c)/(ec+e−c). It takes real-valued arguments and transforms them to the range (–1, 1).

• Sigmoid. This function has the form: γ(c) = 1/(1+e−c). It takes real-valued arguments and transforms them to the range (0, 1).

Rescaling of Scale Dependent Variables. These controls are available only if at least one scale-dependent variable has been selected.

• Standardized. Subtract the mean and divide by the standard deviation, (x−mean)/s.

• Normalized. Subtract the minimum and divide by the range, (x−min)/(max−min). Normalized values fall between 0 and 1. This is the required rescaling method for scale-dependent variables if the output layer uses the sigmoid activation function. The correction option specifies a small number ε that is applied as a correction to the rescaling formula; this correction ensures that all rescaled dependent variable values will be within the range of the activation function. In particular, the values 0 and 1, which occur in the uncorrected formula when x takes its minimum and maximum value, define the limits of the range of the sigmoid function but are not within that range. The corrected formula is [x−(min−ε)]/[(max+ε)−(min−ε)]. Specify a number greater than or equal to 0.

• Adjusted Normalized. Adjusted version of subtracting the minimum and dividing by the range, [2*(x−min)/(max−min)]−1. Adjusted normalized values fall between −1 and 1. This is the required rescaling method for scale-dependent variables if the output layer uses the hyperbolic tangent activation function. The correction option specifies a small number ε that is applied as a correction to the rescaling formula; this correction ensures that all rescaled dependent variable values will be within the range of the activation function. In particular, the values −1 and 1, which occur in the uncorrected formula when x takes its minimum and maximum value, define the limits of the range of the hyperbolic tangent function but are not within that range. The corrected formula is {2*[(x−(min−ε))/((max+ε)−(min−ε))]}−1. Specify a number greater than or equal to 0.

• None. No rescaling of scale-dependent variables.

How To Specify Architecture for a Multilayer Perceptron Collapse Hide details

This feature requires the Neural Networks option.

From the menus choose:

Analyze
Neural Networks
Multilayer Perceptron...

In the Multilayer Perceptron dialog box, click the Architecture tab.

Related Topics

Multilayer Perceptron
Partitions (Multilayer Perceptron)
Training (Multilayer Perceptron)
Output (Multilayer Perceptron)
Save (Multilayer Perceptron)
Export (Multilayer Perceptron)
Options (Multilayer Perceptron)


Training (Multilayer Perceptron)

Multilayer Perceptron,Multilayer Perceptron,Multilayer Perceptron
training,training,training
network training,network training,network training
in Multilayer Perceptron,in Multilayer Perceptron,in Multilayer Perceptron
batch training,batch training,batch training
in Multilayer Perceptron,in Multilayer Perceptron,in Multilayer Perceptron
online training,online training,online training
in Multilayer Perceptron,in Multilayer Perceptron,in Multilayer Perceptron
mini-batch training,mini-batch training,mini-batch training
in Multilayer Perceptron,in Multilayer Perceptron,in Multilayer Perceptron

The Training tab is used to specify how the network should be trained. The type of training and the optimization algorithm determine which training options are available.

Type of Training. The training type determines how the network processes the records. Select one of the following training types:

• Batch. Updates the synaptic weights only after passing all training data records; that is, batch training uses information from all records in the training dataset. Batch training is often preferred because it directly minimizes the total error; however, batch training may need to update the weights many times until one of the stopping rules is met and hence may need many data passes. It is most useful for "smaller" datasets.

• Online. Updates the synaptic weights after every single training data record; that is, online training uses information from one record at a time. Online training continuously gets a record and updates the weights until one of the stopping rules is met. If all the records are used once and none of the stopping rules is met, then the process continues by recycling the data records. Online training is superior to batch for "larger" datasets with associated predictors; that is, if there are many records and many inputs, and their values are not independent of each other, then online training can more quickly obtain a reasonable answer than batch training.

• Mini-batch. Divides the training data records into groups of approximately equal size, then updates the synaptic weights after passing one group; that is, mini-batch training uses information from a group of records. Then the process recycles the data group if necessary. Mini-batch training offers a compromise between batch and online training, and it may be best for "medium-size" datasets. The procedure can automatically determine the number of training records per mini-batch, or you can specify an integer greater than 1 and less than or equal to the maximum number of cases to store in memory. You can set the maximum number of cases to store in memory on the Options tab.

Optimization Algorithm. This is the method used to estimate the synaptic weights.

• Scaled conjugate gradient. The assumptions that justify the use of conjugate gradient methods apply only to batch training types, so this method is not available for online or mini-batch training. For algorithmic details, see Scaled Conjugate Gradient (multilayer perceptron algorithms).

• Gradient descent. This method must be used with online or mini-batch training; it can also be used with batch training. For algorithmic details, see Gradient Descent (multilayer perceptron algorithms).

Training Options. The training options allow you to fine-tune the optimization algorithm. You generally will not need to change these settings unless the network runs into problems with estimation.

Training options for the scaled conjugate gradient algorithm include:

• Initial Lambda. The initial value of the lambda parameter for the scaled conjugate gradient algorithm. Specify a number greater than 0 and less than 0.000001.

• Initial Sigma. The initial value of the sigma parameter for the scaled conjugate gradient algorithm. Specify a number greater than 0 and less than 0.0001.

• Interval Center and Interval Offset. The interval center (a0) and interval offset (a) define the interval [a0−a, a0+a], in which weight vectors are randomly generated when simulated annealing is used. Simulated annealing is used to break out of a local minimum, with the goal of finding the global minimum, during application of the optimization algorithm. This approach is used in weight initialization and automatic architecture selection. For algorithmic details, see Alternated Simulated Annealing and Training (multilayer perceptron algorithms). Specify a number for the interval center and a number greater than 0 for the interval offset.

Training options for the gradient descent algorithm include:

• Initial Learning Rate. The initial value of the learning rate for the gradient descent algorithm. A higher learning rate means that the network will train faster, possibly at the cost of becoming unstable. Specify a number greater than 0.

• Lower Boundary of Learning Rate. The lower boundary on the learning rate for the gradient descent algorithm. This setting applies only to online and mini-batch training. Specify a number greater than 0 and less than the initial learning rate.

• Momentum. The initial momentum parameter for the gradient descent algorithm. The momentum term helps to prevent instabilities caused by a too-high learning rate. Specify a number greater than 0.

• Learning rate reduction, in Epochs. The number of epochs (p), or data passes of the training sample, required to reduce the initial learning rate to the lower boundary of the learning rate when gradient descent is used with online or mini-batch training. This gives you control of the learning rate decay factor β = (1/pK)*ln(η0/ηlow), where η0 is the initial learning rate, ηlow is the lower bound on the learning rate, and K is the total number of mini-batches (or the number of training records for online training) in the training dataset. Specify an integer greater than 0.

How To Set Training Criteria for Multilayer Perceptron Collapse Hide details

This feature requires the Neural Networks option.

From the menus choose:

Analyze
Neural Networks
Multilayer Perceptron...

In the Multilayer Perceptron dialog box, click the Training tab.

Related Topics

Multilayer Perceptron
Partitions (Multilayer Perceptron)
Architecture (Multilayer Perceptron)
Output (Multilayer Perceptron)
Save (Multilayer Perceptron)
Export (Multilayer Perceptron)
Options (Multilayer Perceptron)


Output (Multilayer Perceptron)

Multilayer Perceptron,Multilayer Perceptron,Multilayer Perceptron
output,output,output
network diagram,network diagram,network diagram
in Multilayer Perceptron,in Multilayer Perceptron,in Multilayer Perceptron
ROC curve,ROC curve,ROC curve
in Multilayer Perceptron,in Multilayer Perceptron,in Multilayer Perceptron
gains chart,gains chart,gains chart
in Multilayer Perceptron,in Multilayer Perceptron,in Multilayer Perceptron
lift chart,lift chart,lift chart
in Multilayer Perceptron,in Multilayer Perceptron,in Multilayer Perceptron

Network Structure. Displays summary information about the neural network.

• Description. Displays information about the neural network, including the dependent variables, number of input and output units, number of hidden layers and units, and activation functions.

• Diagram. Displays the network diagram as a non-editable chart. Note that as the number of covariates and factor levels increases, the diagram becomes more difficult to interpret.

• Synaptic weights. Displays the coefficient estimates that show the relationship between the units in a given layer to the units in the following layer. The synaptic weights are based on the training sample even if the active dataset is partitioned into training, testing, and holdout data. Note that the number of synaptic weights can become rather large and that these weights are generally not used for interpreting network results.

Network Performance. Displays results used to determine whether the model is "good". Note: Charts in this group are based on the combined training and testing samples or only on the training sample if there is no testing sample.

• Model summary. Displays a summary of the neural network results by partition and overall, including the error, the relative error or percentage of incorrect predictions, the stopping rule used to stop training, and the training time.

The error is the sum-of-squares error when the identity, sigmoid, or hyperbolic tangent activation function is applied to the output layer. It is the cross-entropy error when the softmax activation function is applied to the output layer.

Relative errors or percentages of incorrect predictions are displayed depending on the dependent variable measurement levels. If any dependent variable has scale measurement level, then the average overall relative error (relative to the mean model) is displayed. If all dependent variables are categorical, then the average percentage of incorrect predictions is displayed. Relative errors or percentages of incorrect predictions are also displayed for individual dependent variables.

• Classification results. Displays a classification table for each categorical dependent variable by partition and overall. Each table gives the number of cases classified correctly and incorrectly for each dependent variable category. The percentage of the total cases that were correctly classified is also reported.

• ROC curve. Displays an ROC (Receiver Operating Characteristic) curve for each categorical dependent variable. It also displays a table giving the area under each curve. For a given dependent variable, the ROC chart displays one curve for each category. If the dependent variable has two categories, then each curve treats the category at issue as the positive state versus the other category. If the dependent variable has more than two categories, then each curve treats the category at issue as the positive state versus the aggregate of all other categories.

• Cumulative gains chart. Displays a cumulative gains chart for each categorical dependent variable. The display of one curve for each dependent variable category is the same as for ROC curves.

• Lift chart. Displays a lift chart for each categorical dependent variable. The display of one curve for each dependent variable category is the same as for ROC curves.

• Predicted by observed chart. Displays a predicted-by-observed-value chart for each dependent variable. For categorical dependent variables, clustered boxplots of predicted pseudo-probabilities are displayed for each response category, with the observed response category as the cluster variable. For scale-dependent variables, a scatterplot is displayed.

• Residual by predicted chart. Displays a residual-by-predicted-value chart for each scale-dependent variable. There should be no visible patterns between residuals and predicted values. This chart is produced only for scale-dependent variables.

Case processing summary. Displays the case processing summary table, which summarizes the number of cases included and excluded in the analysis, in total and by training, testing, and holdout samples.

Independent variable importance analysis. Performs a sensitivity analysis, which computes the importance of each predictor in determining the neural network. The analysis is based on the combined training and testing samples or only on the training sample if there is no testing sample. This creates a table and a chart displaying importance and normalized importance for each predictor. Note that sensitivity analysis is computationally expensive and time-consuming if there are large numbers of predictors or cases.

How To Select Output for Multilayer Perceptron Collapse Hide details

This feature requires the Neural Networks option.

From the menus choose:

Analyze
Neural Networks
Multilayer Perceptron...

In the Multilayer Perceptron dialog box, click the Output tab.

Related Topics

Multilayer Perceptron
Partitions (Multilayer Perceptron)
Architecture (Multilayer Perceptron)
Training (Multilayer Perceptron)
Save (Multilayer Perceptron)
Export (Multilayer Perceptron)
Options (Multilayer Perceptron)


Save (Multilayer Perceptron)

Multilayer Perceptron,Multilayer Perceptron,Multilayer Perceptron
save variables to active dataset,save variables to active dataset,save variables to active dataset

The Save tab is used to save predictions as variables in the dataset.

• Save predicted value or category for each dependent variable. This saves the predicted value for scale-dependent variables and the predicted category for categorical dependent variables.

• Save predicted pseudo-probability or category for each dependent variable. This saves the predicted pseudo-probabilities for categorical dependent variables. A separate variable is saved for each of the first n categories, where n is specified in the Categories to Save column.

Names of Saved Variables. Automatic name generation ensures that you keep all of your work. Custom names allow you to discard/replace results from previous runs without first deleting the saved variables in the Data Editor.

Probabilities and Pseudo-Probabilities

Categorical dependent variables with softmax activation and cross-entropy error will have a predicted value for each category, where each predicted value is the probability that the case belongs to the category.

Categorical dependent variables with sum-of-squares error will have a predicted value for each category, but the predicted values cannot be interpreted as probabilities. The procedure saves these predicted pseudo-probabilities even if any are less than 0 or greater than 1, or the sum for a given dependent variable is not 1.

The ROC, cumulative gains, and lift charts (see Output (Multilayer Perceptron)) are created based on pseudo-probabilities. In the event that any of the pseudo-probabilities are less than 0 or greater than 1, or the sum for a given variable is not 1, they are first rescaled to be between 0 and 1 and to sum to 1. Pseudo-probabilities are rescaled by dividing by their sum. For example, if a case has predicted pseudo-probabilities of 0.50, 0.60, and 0.40 for a three-category dependent variable, then each pseudo-probability is divided by the sum 1.50 to get 0.33, 0.40, and 0.27.

If any of the pseudo-probabilities are negative, then the absolute value of the lowest is added to all pseudo-probabilities before the above rescaling. For example, if the pseudo-probabilities are -0.30, 0.50, and 1.30, then first add 0.30 to each value to get 0.00, 0.80, and 1.60. Next, divide each new value by the sum 2.40 to get 0.00, 0.33, and 0.67.

How To Save Variables to the Active Dataset Collapse Hide details

This feature requires the Neural Networks option.

From the menus choose:

Analyze
Neural Networks
Multilayer Perceptron...

In the Multilayer Perceptron dialog box, click the Save tab.

Related Topics

Multilayer Perceptron
Partitions (Multilayer Perceptron)
Architecture (Multilayer Perceptron)
Training (Multilayer Perceptron)
Output (Multilayer Perceptron)
Export (Multilayer Perceptron)
Options (Multilayer Perceptron)


Export (Multilayer Perceptron)

Multilayer Perceptron,Multilayer Perceptron,Multilayer Perceptron
model export,model export,model export

The Export tab is used to save the synaptic weight estimates for each dependent variable to an XML (PMML) file. SmartScore and PASW Statistics Server (a separate product) can use this model file to apply the model information to other data files for scoring purposes. This option is not available if split files have been defined.

How To Export Synaptic Weights Collapse Hide details

This feature requires the Neural Networks option.

From the menus choose:

Analyze
Neural Networks
Multilayer Perceptron...

In the Multilayer Perceptron dialog box, click the Export tab.

Related Topics

Multilayer Perceptron
Partitions (Multilayer Perceptron)
Architecture (Multilayer Perceptron)
Training (Multilayer Perceptron)
Output (Multilayer Perceptron)
Save (Multilayer Perceptron)
Options (Multilayer Perceptron)


Options (Multilayer Perceptron)

Multilayer Perceptron,Multilayer Perceptron,Multilayer Perceptron
options,options,options
missing values,missing values,missing values
in Multilayer Perceptron,in Multilayer Perceptron,in Multilayer Perceptron
stopping rules,stopping rules,stopping rules
in Multilayer Perceptron,in Multilayer Perceptron,in Multilayer Perceptron

User-Missing Values. Factors must have valid values for a case to be included in the analysis. These controls allow you to decide whether user-missing values are treated as valid among factors and categorical dependent variables.

Stopping Rules. These are the rules that determine when to stop training the neural network. Training proceeds through at least one data pass. Training can then be stopped according to the following criteria, which are checked in the listed order. In the stopping rule definitions that follow, a step corresponds to a data pass for the online and mini-batch methods and an iteration for the batch method.

• Maximum steps without a decrease in error. The number of steps to allow before checking for a decrease in error. If there is no decrease in error after the specified number of steps, then training stops. Specify an integer greater than 0. You can also specify which data sample is used to compute the error. Choose automatically uses the testing sample if it exists and uses the training sample otherwise. Note that batch training guarantees a decrease in the training sample error after each data pass; thus, this option applies only to batch training if a testing sample exists. Both training and test data checks the error for each of these samples; this option applies only if a testing sample exits.

Note: After each complete data pass, online and mini-batch training require an extra data pass in order to compute the training error. This extra data pass can slow training considerably, so it is generally recommended that you supply a testing sample and select Choose automatically in any case.

• Maximum training time. Choose whether to specify a maximum number of minutes for the algorithm to run. Specify a number greater than 0.

• Maximum Training Epochs. The maximum number of epochs (data passes) allowed. If the maximum number of epochs is exceeded, then training stops. Specify an integer greater than 0.

• Minimum relative change in training error. Training stops if the relative change in the training error compared to the previous step is less than the criterion value. Specify a number greater than 0. For online and mini-batch training, this criterion is ignored if only testing data is used to compute the error.

• Minimum relative change in training error ratio. Training stops if the ratio of the training error to the error of the null model is less than the criterion value. The null model predicts the average value for all dependent variables. Specify a number greater than 0. For online and mini-batch training, this criterion is ignored if only testing data is used to compute the error.

Maximum cases to store in memory. This controls the following settings within the multilayer perceptron algorithms. Specify an integer greater than 1.

• In automatic architecture selection, the size of the sample used to determine the network archicteture is min(1000,memsize), where memsize is the maximum number of cases to store in memory.

• In mini-batch training with automatic computation of the number of mini-batches, the number of mini-batches is min(max(M/10,2),memsize), where M is the number of cases in the training sample.

How To Set Options for Multilayer Perceptron Collapse Hide details

This feature requires the Neural Networks option.

From the menus choose:

Analyze
Neural Networks
Multilayer Perceptron...

In the Multilayer Perceptron dialog box, click the Options tab.

Related Topics

Multilayer Perceptron
Partitions (Multilayer Perceptron)
Architecture (Multilayer Perceptron)
Training (Multilayer Perceptron)
Output (Multilayer Perceptron)
Save (Multilayer Perceptron)
Export (Multilayer Perceptron)


Radial Basis Function

Radial Basis Function,Radial Basis Function,Radial Basis Function

The Radial Basis Function (RBF) procedure produces a predictive model for one or more dependent (target) variables based on values of predictor variables.

Example. A telecommunications provider has segmented its customer base by service usage patterns, categorizing the customers into four groups. An RBF network using demographic data to predict group membership allows the company to customize offers for individual prospective customers. Show me

Data Considerations Collapse Hide details

Dependent variables. The dependent variables can be:

• Nominal. A variable can be treated as nominal when its values represent categories with no intrinsic ranking (for example, the department of the company in which an employee works). Examples of nominal variables include region, zip code, and religious affiliation.

• Ordinal. A variable can be treated as ordinal when its values represent categories with some intrinsic ranking (for example, levels of service satisfaction from highly dissatisfied to highly satisfied). Examples of ordinal variables include attitude scores representing degree of satisfaction or confidence and preference rating scores.

• Scale. A variable can be treated as scale (continuous) when its values represent ordered categories with a meaningful metric, so that distance comparisons between values are appropriate. Examples of scale variables include age in years and income in thousands of dollars.

The procedure assumes that the appropriate measurement level has been assigned to all dependent variables, although you can temporarily change the measurement level for a variable by right-clicking the variable in the source variable list and selecting a measurement level from the context menu. To permanently change the level of measurement for a variable, see Variable Measurement Level.

An icon next to each variable in the variable list identifies the measurement level and data type:

Measurement Level | Data Type
 | Numeric | String | Date | Time
Scale (Continuous) |  | n/a |  |
Ordinal |  |  |  |
Nominal |  |  |  |

Predictor variables. Predictors can be specified as factors (categorical) or covariates (scale).

Categorical variable coding. The procedure temporarily recodes categorical predictors and dependent variables using one-of-c coding for the duration of the procedure. If there are c categories of a variable, then the variable is stored as c vectors, with the first category denoted (1,0,...,0), the next category (0,1,0,...,0), ..., and the final category (0,0,...,0,1).

This coding scheme increases the number of synaptic weights and can result in slower training, but more "compact" coding methods usually lead to poorly fit neural networks. If your network training is proceeding very slowly, try reducing the number of categories in your categorical predictors by combining similar categories or dropping cases that have extremely rare categories. For more information on recoding variables, see Recode into Same Variables or Recode into Different Variables.

All one-of-c coding is based on the training data, even if a testing or holdout sample is defined (see Partitions (Radial Basis Function)). Thus, if the testing or holdout samples contain cases with predictor categories that are not present in the training data, then those cases are not used by the procedure or in scoring. If the testing or holdout samples contain cases with dependent variable categories that are not present in the training data, then those cases are not used by the procedure but they may be scored.

Rescaling. Scale dependent variables and covariates are rescaled by default to improve network training. All rescaling is performed based on the training data, even if a testing or holdout sample is defined (see Partitions (Radial Basis Function)). That is, depending on the type of rescaling, the mean, standard deviation, minimum value, or maximum value of a covariate or dependent variable are computed using only the training data. If you specify a variable to define partitions, it is important that these covariates or dependent variables have similar distributions across the training, testing, and holdout samples. Use, for example, the Explore procedure to examine the distributions across partitions.

Frequency weights. Frequency weights are ignored by this procedure.

Replicating results. If you want to exactly replicate your results, use the same initialization value for the random number generator and the same data order, in addition to using the same procedure settings. More details on this issue follow:

• Random number generation. The procedure uses random number generation during random assignment of partitions. To reproduce the same randomized results in the future, use the same initialization value for the random number generator before each run of the Radial Basis Function procedure. See the topic Random Number Generators for more information.

• Case order. Results are also dependent on data order because the two-step cluster algorithm is used to determine the radial basis functions. See the topic TwoStep Cluster Analysis for more information.

To minimize order effects, randomly order the cases. To verify the stability of a given solution, you may want to obtain several different solutions with cases sorted in different random orders. In situations with extremely large file sizes, multiple runs can be performed with a sample of cases sorted in different random orders.

Creating a Radial Basis Function Network Collapse Hide details

Creating a Radial Basis Function Network

This feature requires the Neural Networks option.

From the menus choose:

Analyze
Neural Networks
Radial Basis Function...

Select at least one dependent variable.

Select at least one factor or covariate.

Optionally, on the Variables tab you can change the method for rescaling covariates. The choices are:

• Standardized. Subtract the mean and divide by the standard deviation, (x−mean)/s.

• Normalized. Subtract the minimum and divide by the range, (x−min)/(max−min). Normalized values fall between 0 and 1.

• Adjusted Normalized. Adjusted version of subtracting the minimum and dividing by the range, [2*(x−min)/(max−min)]−1. Adjusted normalized values fall between −1 and 1.

• None. No rescaling of covariates.

This procedure pastes RBF command syntax.

See RBF Algorithms for computational details for this procedure.

Related Topics

Partitions (Radial Basis Function)
Architecture (Radial Basis Function)
Output (Radial Basis Function)
Save (Radial Basis Function)
Export (Radial Basis Function)
Options (Radial Basis Function)
RBF


Partitions (Radial Basis Function)

Radial Basis Function,Radial Basis Function,Radial Basis Function
partitions,partitions,partitions
training sample,training sample,training sample
in Radial Basis Function,in Radial Basis Function,in Radial Basis Function
testing sample,testing sample,testing sample
in Radial Basis Function,in Radial Basis Function,in Radial Basis Function
holdout sample,holdout sample,holdout sample
in Radial Basis Function,in Radial Basis Function,in Radial Basis Function

Partition Dataset. This group specifies the method of partitioning the active dataset into training, testing, and holdout samples. The training sample comprises the data records used to train the neural network; some percentage of cases in the dataset must be assigned to the training sample in order to obtain a model. The testing sample is an independent set of data records used to track errors during training in order to prevent overtraining. It is highly recommended that you create a training sample, and network training will generally be most efficient if the testing sample is smaller than the training sample. The holdout sample is another independent set of data records used to assess the final neural network; the error for the holdout sample gives an "honest" estimate of the predictive ability of the model because the holdout cases were not used to build the model.

• Randomly assign cases based on relative number of cases. Specify the relative number (ratio) of cases randomly assigned to each sample (training, testing, and holdout). The % column reports the percentage of cases that will be assigned to each sample based on the relative numbers you have specified.

For example, specifying 7, 3, 0 as the relative numbers for training, testing, and holdout samples corresponds to 70%, 30%, and 0%. Specifying 2, 1, 1 as the relative numbers corresponds to 50%, 25%, and 25%; 1, 1, 1 corresponds to dividing the dataset into equal thirds among training, testing, and holdout.

• Use partitioning variable to assign cases. Specify a numeric variable that assigns each case in the active dataset to the training, testing, or holdout sample. Cases with a positive value on the variable are assigned to the training sample, cases with a value of 0, to the testing sample, and cases with a negative value, to the holdout sample. Cases with a system-missing value are excluded from the analysis. Any user-missing values for the partition variable are always treated as valid.

How to Set Partitions for Radial Basis Function Collapse Hide details

This feature requires the Neural Networks option.

From the menus choose:

Analyze
Neural Networks
Radial Basis Function...

In the Radial Basis Function dialog box, click the Partitions tab.

Related Topics

Radial Basis Function
Architecture (Radial Basis Function)
Output (Radial Basis Function)
Save (Radial Basis Function)
Export (Radial Basis Function)
Options (Radial Basis Function)


Architecture (Radial Basis Function)

Radial Basis Function,Radial Basis Function,Radial Basis Function
network architecture,network architecture,network architecture
network architecture,network architecture,network architecture
in Radial Basis Function,in Radial Basis Function,in Radial Basis Function
output layer,output layer,output layer
in Radial Basis Function,in Radial Basis Function,in Radial Basis Function
activation function,activation function,activation function
in Radial Basis Function,in Radial Basis Function,in Radial Basis Function
hidden layer,hidden layer,hidden layer
in Radial Basis Function,in Radial Basis Function,in Radial Basis Function

The Architecture tab is used to specify the structure of the network. The procedure creates a neural network with one hidden "radial basis function" layer; in general, it will not be necessary to change these settings.

Number of Units in Hidden Layer. There are three ways of choosing the number of hidden units.

1. Find the best number of units within an automatically computed range. The procedure automatically computes the minimum and maximum values of the range and finds the best number of hidden units within the range.

If a testing sample is defined, then the procedure uses the testing data criterion: The best number of hidden units is the one that yields the smallest error in the testing data. If a testing sample is not defined, then the procedure uses the Bayesian information criterion (BIC): The best number of hidden units is the one that yields the smallest BIC based on the training data.

2. Find the best number of units within a specified range. You can provide your own range, and the procedure will find the “best” number of hidden units within that range. As before, the best number of hidden units from the range is determined using the testing data criterion or the BIC.

3. Use a specified number of units. You can override the use of a range and specify a particular number of units directly.

Activation Function for Hidden Layer. The activation function for the hidden layer is the radial basis function, which "links" the units in a layer to the values of units in the succeeding layer. For the output layer, the activation function is the identity function; thus, the output units are simply weighted sums of the hidden units.

• Normalized radial basis function. Uses the softmax activation function so the activations of all hidden units are normalized to sum to 1.

• Ordinary radial basis function. Uses the exponential activation function so the activation of the hidden unit is a Gaussian “bump” as a function of the inputs.

Overlap Among Hidden Units. The overlapping factor is a multiplier applied to the width of the radial basis functions. The automatically computed value of the overlapping factor is 1+0.1d, where d is the number of input units (the sum of the number of categories across all factors and the number of covariates).

How to Specify Architecture for Radial Basis Function Collapse Hide details

This feature requires the Neural Networks option.

From the menus choose:

Analyze
Neural Networks
Radial Basis Function...

In the Radial Basis Function dialog box, click the Architecture tab.

Related Topics

Radial Basis Function
Partitions (Radial Basis Function)
Output (Radial Basis Function)
Save (Radial Basis Function)
Export (Radial Basis Function)
Options (Radial Basis Function)


Output (Radial Basis Function)

Radial Basis Function,Radial Basis Function,Radial Basis Function
output,output,output
network diagram,network diagram,network diagram
in Radial Basis Function,in Radial Basis Function,in Radial Basis Function
ROC curve,ROC curve,ROC curve
in Radial Basis Function,in Radial Basis Function,in Radial Basis Function
gains chart,gains chart,gains chart
in Radial Basis Function,in Radial Basis Function,in Radial Basis Function
lift chart,lift chart,lift chart
in Radial Basis Function,in Radial Basis Function,in Radial Basis Function

Network Structure. Displays summary information about the neural network.

• Description. Displays information about the neural network, including the dependent variables, number of input and output units, number of hidden layers and units, and activation functions.

• Diagram. Displays the network diagram as a non-editable chart. Note that as the number of covariates and factor levels increases, the diagram becomes more difficult to interpret.

• Synaptic weights. Displays the coefficient estimates that show the relationship between the units in a given layer to the units in the following layer. The synaptic weights are based on the training sample even if the active dataset is partitioned into training, testing, and holdout data. Note that the number of synaptic weights can become rather large, and these weights are generally not used for interpreting network results.

Network Performance. Displays results used to determine whether the model is "good." Note: Charts in this group are based on the combined training and testing samples or only the training sample if there is no testing sample.

• Model summary. Displays a summary of the neural network results by partition and overall, including the error, the relative error or percentage of incorrect predictions, and the training time.

The error is the sum-of-squares error. In addition, relative errors or percentages of incorrect predictions are displayed, depending on the dependent variable measurement levels. If any dependent variable has scale measurement level, then the average overall relative error (relative to the mean model) is displayed. If all dependent variables are categorical, then the average percentage of incorrect predictions is displayed. Relative errors or percentages of incorrect predictions are also displayed for individual dependent variables.

• Classification results. Displays a classification table for each categorical dependent variable. Each table gives the number of cases classified correctly and incorrectly for each dependent variable category. The percentage of the total cases that were correctly classified is also reported.

• ROC curve. Displays an ROC (Receiver Operating Characteristic) curve for each categorical dependent variable. It also displays a table giving the area under each curve. For a given dependent variable, the ROC chart displays one curve for each category. If the dependent variable has two categories, then each curve treats the category at issue as the positive state versus the other category. If the dependent variable has more than two categories, then each curve treats the category at issue as the positive state versus the aggregate of all other categories.

• Cumulative gains chart. Displays a cumulative gains chart for each categorical dependent variable. The display of one curve for each dependent variable category is the same as for ROC curves.

• Lift chart. Displays a lift chart for each categorical dependent variable. The display of one curve for each dependent variable category is the same as for ROC curves.

• Predicted by observed chart. Displays a predicted-by-observed-value chart for each dependent variable. For categorical dependent variables, clustered boxplots of predicted pseudo-probabilities are displayed for each response category, with the observed response category as the cluster variable. For scale dependent variables, a scatterplot is displayed.

• Residual by predicted chart. Displays a residual-by-predicted-value chart for each scale dependent variable. There should be no visible patterns between residuals and predicted values. This chart is produced only for scale dependent variables.

Case processing summary. Displays the case processing summary table, which summarizes the number of cases included and excluded in the analysis, in total and by training, testing, and holdout samples.

Independent variable importance analysis. Performs a sensitivity analysis, which computes the importance of each predictor in determining the neural network. The analysis is based on the combined training and testing samples or only the training sample if there is no testing sample. This creates a table and a chart displaying importance and normalized importance for each predictor. Note that sensitivity analysis is computationally expensive and time-consuming if there is a large number of predictors or cases.

How to Select Output for Radial Basis Function Collapse Hide details

This feature requires the Neural Networks option.

From the menus choose:

Analyze
Neural Networks
Radial Basis Function...

In the Radial Basis Function dialog box, click the Output tab.

Related Topics

Radial Basis Function
Partitions (Radial Basis Function)
Architecture (Radial Basis Function)
Save (Radial Basis Function)
Export (Radial Basis Function)
Options (Radial Basis Function)


Save (Radial Basis Function)

Radial Basis Function,Radial Basis Function,Radial Basis Function
save variables to active dataset,save variables to active dataset,save variables to active dataset

The Save tab is used to save predictions as variables in the dataset.

• Save predicted value or category for each dependent variable. This saves the predicted value for scale dependent variables and the predicted category for categorical dependent variables.

• Save predicted pseudo-probability for each dependent variable. This saves the predicted pseudo-probabilities for categorical dependent variables. A separate variable is saved for each of the first n categories, where n is specified in the Categories to Save column.

Names of Saved Variables. Automatic name generation ensures that you keep all of your work. Custom names allow you to discard or replace results from previous runs without first deleting the saved variables in the Data Editor.

Probabilities and Pseudo-Probabilities

Predicted pseudo-probabilities cannot be interpreted as probabilities because the Radial Basis Function procedure uses the sum-of-squares error and identity activation function for the output layer. The procedure saves these predicted pseudo-probabilities even if any are less than 0 or greater than 1 or the sum for a given dependent variable is not 1.

The ROC, cumulative gains, and lift charts (see Output (Radial Basis Function)) are created based on pseudo-probabilities. In the event that any of the pseudo-probabilities are less than 0 or greater than 1 or the sum for a given variable is not 1, they are first rescaled to be between 0 and 1 and to sum to 1. Pseudo-probabilities are rescaled by dividing by their sum. For example, if a case has predicted pseudo-probabilities of 0.50, 0.60, and 0.40 for a three-category dependent variable, then each pseudo-probability is divided by the sum 1.50 to get 0.33, 0.40, and 0.27.

If any of the pseudo-probabilities are negative, then the absolute value of the lowest is added to all pseudo-probabilities before the above rescaling. For example, if the pseudo-probabilities are –0.30, .50, and 1.30, then first add 0.30 to each value to get 0.00, 0.80, and 1.60. Next, divide each new value by the sum 2.40 to get 0.00, 0.33, and 0.67.

How to Save Variables to the Active Dataset Collapse Hide details

This feature requires the Neural Networks option.

From the menus choose:

Analyze
Neural Networks
Radial Basis Function...

In the Radial Basis Function dialog box, click the Save tab.

Related Topics

Radial Basis Function
Partitions (Radial Basis Function)
Architecture (Radial Basis Function)
Output (Radial Basis Function)
Export (Radial Basis Function)
Options (Radial Basis Function)


Export (Radial Basis Function)

Radial Basis Function,Radial Basis Function,Radial Basis Function
model export,model export,model export

The Export tab is used to save the synaptic weight estimates for each dependent variable to an XML (PMML) file. SmartScore and PASW Statistics Server (a separate product) can use this model file to apply the model information to other data files for scoring purposes. This option is not available if split files have been defined.

How to Export Synaptic Weights Collapse Hide details

This feature requires the Neural Networks option.

From the menus choose:

Analyze
Neural Networks
Radial Basis Function...

In the Radial Basis Function dialog box, click the Export tab.

Related Topics

Radial Basis Function
Partitions (Radial Basis Function)
Architecture (Radial Basis Function)
Output (Radial Basis Function)
Save (Radial Basis Function)
Options (Radial Basis Function)


Options (Radial Basis Function)

Radial Basis Function,Radial Basis Function,Radial Basis Function
options,options,options

User-Missing Values. Factors must have valid values for a case to be included in the analysis. These controls allow you to decide whether user-missing values are treated as valid among factors and categorical dependent variables.

How to Specify Options Collapse Hide details

This feature requires the Neural Networks option.

From the menus choose:

Analyze
Neural Networks
Radial Basis Function...

In the Radial Basis Function dialog box, click the Options tab.

Related Topics

Radial Basis Function
Partitions (Radial Basis Function)
Architecture (Radial Basis Function)
Output (Radial Basis Function)
Save (Radial Basis Function)
Export (Radial Basis Function)


Choosing a Procedure for Binary Logistic Regression

Logistic Regression,Logistic Regression,Logistic Regression
binary,binary,binary
binary logistic regression,binary logistic regression,binary logistic regression

Binary logistic regression models can be fitted using either the Logistic Regression procedure or the Multinomial Logistic Regression procedure. Each procedure has options not available in the other. An important theoretical distinction is that the Logistic Regression procedure produces all predictions, residuals, influence statistics, and goodness-of-fit tests using data at the individual case level, regardless of how the data are entered and whether or not the number of covariate patterns is smaller than the total number of cases, while the Multinomial Logistic Regression procedure internally aggregates cases to form subpopulations with identical covariate patterns for the predictors, producing predictions, residuals, and goodness-of-fit tests based on these subpopulations. If all predictors are categorical or any continuous predictors take on only a limited number of values—so that there are several cases at each distinct covariate pattern—the subpopulation approach can produce valid goodness-of-fit tests and informative residuals, while the individual case level approach cannot.

Logistic Regression provides the following unique features:

• Hosmer-Lemeshow test of goodness of fit for the model

• Stepwise analyses

• Contrasts to define model parameterization

• Alternative cut points for classification

• Classification plots

• Model fitted on one set of cases to a held-out set of cases

• Saves predictions, residuals, and influence statistics

Multinomial Logistic Regression provides the following unique features:

• Pearson and deviance chi-square tests for goodness of fit of the model

• Specification of subpopulations for grouping of data for goodness-of-fit tests

• Listing of counts, predicted counts, and residuals by subpopulations

• Correction of variance estimates for over-dispersion

• Covariance matrix of the parameter estimates

• Tests of linear combinations of parameters

• Explicit specification of nested models

• Fit 1-1 matched conditional logistic regression models using differenced variables

Related Topics

Multinomial Logistic Regression
Multinomial Logistic Regression
Multinomial Logistic Regression Reference Category
Multinomial Logistic Regression Statistics
Multinomial Logistic Regression Criteria
Multinomial Logistic Regression Options
Multinomial Logistic Regression Save
Logistic Regression
Logistic Regression Set Rule
Logistic Regression Variable Selection Methods
Logistic Regression Define Categorical Variables
Logistic Regression Save New Variables
Logistic Regression Options


Logistic Regression

Logistic Regression,Logistic Regression,Logistic Regression
example,example,example
Logistic Regression,Logistic Regression,Logistic Regression
coefficients,coefficients,coefficients
Logistic Regression,Logistic Regression,Logistic Regression
statistics,statistics,statistics
Logistic Regression,Logistic Regression,Logistic Regression

Logistic regression is useful for situations in which you want to be able to predict the presence or absence of a characteristic or outcome based on values of a set of predictor variables. It is similar to a linear regression model but is suited to models where the dependent variable is dichotomous. Logistic regression coefficients can be used to estimate odds ratios for each of the independent variables in the model. Logistic regression is applicable to a broader range of research situations than discriminant analysis.

Example. What lifestyle characteristics are risk factors for coronary heart disease (CHD)? Given a sample of patients measured on smoking status, diet, exercise, alcohol use, and CHD status, you could build a model using the four lifestyle variables to predict the presence or absence of CHD in a sample of patients. The model can then be used to derive estimates of the odds ratios for each factor to tell you, for example, how much more likely smokers are to develop CHD than nonsmokers.

Statistics. For each analysis: total cases, selected cases, valid cases. For each categorical variable: parameter coding. For each step: variable(s) entered or removed, iteration history, –2 log-likelihood, goodness of fit, Hosmer-Lemeshow goodness-of-fit statistic, model chi-square, improvement chi-square, classification table, correlations between variables, observed groups and predicted probabilities chart, residual chi-square. For each variable in the equation: coefficient (B), standard error of B, Wald statistic, estimated odds ratio (exp(B)), confidence interval for exp(B), log-likelihood if term removed from model. For each variable not in the equation: score statistic. For each case: observed group, predicted probability, predicted group, residual, standardized residual.

Methods. You can estimate models using block entry of variables or any of the following stepwise methods: forward conditional, forward LR, forward Wald, backward conditional, backward LR, or backward Wald.

Show me

Logistic Regression Data Considerations Collapse Hide details

Data. The dependent variable should be dichotomous. Independent variables can be interval level or categorical; if categorical, they should be dummy or indicator coded (there is an option in the procedure to recode categorical variables automatically).

Assumptions. Logistic regression does not rely on distributional assumptions in the same sense that discriminant analysis does. However, your solution may be more stable if your predictors have a multivariate normal distribution. Additionally, as with other forms of regression, multicollinearity among the predictors can lead to biased estimates and inflated standard errors. The procedure is most effective when group membership is a truly categorical variable; if group membership is based on values of a continuous variable (for example, "high IQ" versus "low IQ"), you should consider using linear regression to take advantage of the richer information offered by the continuous variable itself.

Related procedures. Use the Scatterplot procedure to screen your data for multicollinearity. If assumptions of multivariate normality and equal variance-covariance matrices are met, you may be able to get a quicker solution using the Discriminant Analysis procedure. If all of your predictor variables are categorical, you can also use the Loglinear procedure. If your dependent variable is continuous, use the Linear Regression procedure. You can use the ROC Curve procedure to plot probabilities saved with the Logistic Regression procedure.

Obtaining a Logistic Regression Analysis Collapse Hide details

Obtaining a Logistic Regression Analysis

This feature requires the Regression option.

From the menus choose:

Analyze
Regression
Binary Logistic...

Select one dichotomous dependent variable. This variable may be numeric or string.

Select one or more covariates. To include interaction terms, select all of the variables involved in the interaction and then select >a*b>.

To enter variables in groups (blocks), select the covariates for a block, and click Next to specify a new block. Repeat until all blocks have been specified.

Optionally, you can select cases for analysis. Choose a selection variable, and click Rule.

This procedure pastes LOGISTIC REGRESSION command syntax.

See LOGISTIC REGRESSION Algorithms for computational details for this procedure.

Related Topics

LOGISTIC REGRESSION
Choosing a Procedure for Binary Logistic Regression
Logistic Regression Set Rule
Logistic Regression Variable Selection Methods
Logistic Regression Define Categorical Variables
Logistic Regression Save New Variables
Logistic Regression Options


Logistic Regression Set Rule

Logistic Regression,Logistic Regression,Logistic Regression
set rule,set rule,set rule
Logistic Regression,Logistic Regression,Logistic Regression
define selection rule,define selection rule,define selection rule

Cases defined by the selection rule are included in model estimation. For example, if you selected a variable and equals and specified a value of 5, then only the cases for which the selected variable has a value equal to 5 are included in estimating the model.

Statistics and classification results are generated for both selected and unselected cases. This provides a mechanism for classifying new cases based on previously existing data, or for partitioning your data into training and testing subsets, to perform validation on the model generated.

Defining Selection Rules Collapse Hide details

This feature requires the Regression option.

From the menus choose:

Analyze
Regression
Binary Logistic…

In the Logistic Regression dialog box, click Select.

Choose a selection variable and then click Rule.

Define a selection rule for selecting a subset of cases for analysis. The name of the selected variable appears on the left.

Select a relation. The available relations are equals, not equal to, less than, less than or equal to, greater than, and greater than or equal to.

Enter a value.

Related Topics

Choosing a Procedure for Binary Logistic Regression
Logistic Regression
Logistic Regression Variable Selection Methods
Logistic Regression Define Categorical Variables
Logistic Regression Save New Variables
Logistic Regression Options


Logistic Regression Variable Selection Methods

Logistic Regression,Logistic Regression,Logistic Regression
variable selection methods,variable selection methods,variable selection methods
stepwise selection,stepwise selection,stepwise selection
in Logistic Regression,in Logistic Regression,in Logistic Regression
backward elimination,backward elimination,backward elimination
in Logistic Regression,in Logistic Regression,in Logistic Regression
forward selection,forward selection,forward selection
in Logistic Regression,in Logistic Regression,in Logistic Regression

Method selection allows you to specify how independent variables are entered into the analysis. Using different methods, you can construct a variety of regression models from the same set of variables.

Expand Show details Collapse Hide details

• Enter. A procedure for variable selection in which all variables in a block are entered in a single step.

• Forward Selection (Conditional). Stepwise selection method with entry testing based on the significance of the score statistic, and removal testing based on the probability of a likelihood-ratio statistic based on conditional parameter estimates.

• Forward Selection (Likelihood Ratio). Stepwise selection method with entry testing based on the significance of the score statistic, and removal testing based on the probability of a likelihood-ratio statistic based on the maximum partial likelihood estimates.

• Forward Selection (Wald). Stepwise selection method with entry testing based on the significance of the score statistic, and removal testing based on the probability of the Wald statistic.

• Backward Elimination (Conditional). Backward stepwise selection. Removal testing is based on the probability of the likelihood-ratio statistic based on conditional parameter estimates.

• Backward Elimination (Likelihood Ratio). Backward stepwise selection. Removal testing is based on the probability of the likelihood-ratio statistic based on the maximum partial likelihood estimates.

• Backward Elimination (Wald). Backward stepwise selection. Removal testing is based on the probability of the Wald statistic.

The significance values in your output are based on fitting a single model. Therefore, the significance values are generally invalid when a stepwise method is used.

All independent variables selected are added to a single regression model. However, you can specify different entry methods for different subsets of variables. For example, you can enter one block of variables into the regression model using stepwise selection and a second block using forward selection. To add a second block of variables to the regression model, click Next.

Related Topics

Choosing a Procedure for Binary Logistic Regression
Logistic Regression
Logistic Regression Set Rule
Logistic Regression Define Categorical Variables
Logistic Regression Save New Variables
Logistic Regression Options


Logistic Regression Define Categorical Variables

covariates,covariates,covariates
in Logistic Regression,in Logistic Regression,in Logistic Regression
contrasts,contrasts,contrasts
in Logistic Regression,in Logistic Regression,in Logistic Regression
Logistic Regression,Logistic Regression,Logistic Regression
contrasts,contrasts,contrasts
Logistic Regression,Logistic Regression,Logistic Regression
categorical covariates,categorical covariates,categorical covariates
categorical covariates,categorical covariates,categorical covariates
string covariates,string covariates,string covariates
in Logistic Regression,in Logistic Regression,in Logistic Regression
Logistic Regression,Logistic Regression,Logistic Regression
string covariates,string covariates,string covariates

You can specify details of how the Logistic Regression procedure will handle categorical variables:

Covariates. Contains a list of all of the covariates specified in the main dialog box, either by themselves or as part of an interaction, in any layer. If some of these are string variables or are categorical, you can use them only as categorical covariates.

Categorical Covariates. Lists variables identified as categorical. Each variable includes a notation in parentheses indicating the contrast coding to be used. String variables (denoted by the symbol < following their names) are already present in the Categorical Covariates list. Select any other categorical covariates from the Covariates list and move them into the Categorical Covariates list.

Change Contrast. Allows you to change the contrast method. Available contrast methods are:

• Indicator. Contrasts indicate the presence or absence of category membership. The reference category is represented in the contrast matrix as a row of zeros.

• Simple. Each category of the predictor variable (except the reference category) is compared to the reference category.

• Difference. Each category of the predictor variable except the first category is compared to the average effect of previous categories. Also known as reverse Helmert contrasts.

• Helmert. Each category of the predictor variable except the last category is compared to the average effect of subsequent categories.

• Repeated. Each category of the predictor variable except the first category is compared to the category that precedes it.

• Polynomial. Orthogonal polynomial contrasts. Categories are assumed to be equally spaced. Polynomial contrasts are available for numeric variables only.

• Deviation. Each category of the predictor variable except the reference category is compared to the overall effect.

If you select Deviation, Simple, or Indicator, select either First or Last as the reference category. Note that the method is not actually changed until you click Change.

String covariates must be categorical covariates. To remove a string variable from the Categorical Covariates list, you must remove all terms containing the variable from the Covariates list in the main dialog box.

Defining Categorical Variables Collapse Hide details

This feature requires the Regression option.

From the menus choose:

Analyze
Regression
Binary Logistic…

In the Logistic Regression dialog box, select at least one variable in the Covariates list and then click Categorical.

In the Categorical Covariates list, select the covariate(s) whose contrast method you wish to change. You can change multiple covariates simultaneously.

Select a contrast method from the Method drop-down list.

Click Change.

Related Topics

Choosing a Procedure for Binary Logistic Regression
Logistic Regression
Logistic Regression Set Rule
Logistic Regression Variable Selection Methods
Logistic Regression Save New Variables
Logistic Regression Options


Logistic Regression Save New Variables

Logistic Regression,Logistic Regression,Logistic Regression
predicted values,predicted values,predicted values
Logistic Regression,Logistic Regression,Logistic Regression
influence measures,influence measures,influence measures
Logistic Regression,Logistic Regression,Logistic Regression
residuals,residuals,residuals
Logistic Regression,Logistic Regression,Logistic Regression
saving new variables,saving new variables,saving new variables
Cook's D,Cook's D,Cook's D
in Logistic Regression,in Logistic Regression,in Logistic Regression
leverage values,leverage values,leverage values
in Logistic Regression,in Logistic Regression,in Logistic Regression
DfBeta,DfBeta,DfBeta
in Logistic Regression,in Logistic Regression,in Logistic Regression

You can save results of the logistic regression as new variables in the active dataset:

Predicted Values. Saves values predicted by the model. Available options are Probabilities and Group membership.

Expand Show details Collapse Hide details

• Probabilities. For each case, saves the predicted probability of occurrence of the event. A table in the output displays name and contents of any new variables.

• Predicted Group Membership. The group with the largest posterior probability, based on discriminant scores. The group the model predicts the case belongs to.

Influence. Saves values from statistics that measure the influence of cases on predicted values. Available options are Cook's, Leverage values, and DfBeta(s).

Expand Show details Collapse Hide details

• Cook's. The logistic regression analog of Cook's influence statistic. A measure of how much the residuals of all cases would change if a particular case were excluded from the calculation of the regression coefficients.

• Leverage Value. The relative influence of each observation on the model's fit.

• DfBeta(s). The difference in beta value is the change in the regression coefficient that results from the exclusion of a particular case. A value is computed for each term in the model, including the constant.

Residuals. Saves residuals. Available options are Unstandardized, Logit, Studentized, Standardized, and Deviance.

Expand Show details Collapse Hide details

• Unstandardized Residuals. The difference between an observed value and the value predicted by the model.

• Logit Residual. The residual for the case if it is predicted in the logit scale. The logit residual is the residual divided by the predicted probability times 1 minus the predicted probability.

• Studentized Residual. The change in the model deviance if a case is excluded.

• Standardized Residuals. The residual divided by an estimate of its standard deviation. Standardized residuals, which are also known as Pearson residuals, have a mean of 0 and a standard deviation of 1.

• Deviance. Residuals based on the model deviance.

Export model information to XML file. Parameter estimates and (optionally) their covariances are exported to the specified file in XML (PMML) format. SmartScore and PASW Statistics Server (a separate product) can use this model file to apply the model information to other data files for scoring purposes.

Saving New Variables Collapse Hide details

This feature requires the Regression option.

From the menus choose:

Analyze
Regression
Binary Logistic…

In the Logistic Regression dialog box, click Save.

Related Topics

Choosing a Procedure for Binary Logistic Regression
Logistic Regression
Logistic Regression Set Rule
Logistic Regression Variable Selection Methods
Logistic Regression Define Categorical Variables
Logistic Regression Options


Logistic Regression Options

Logistic Regression,Logistic Regression,Logistic Regression
statistics and plots,statistics and plots,statistics and plots
Logistic Regression,Logistic Regression,Logistic Regression
display options,display options,display options
Logistic Regression,Logistic Regression,Logistic Regression
probability for stepwise,probability for stepwise,probability for stepwise
Logistic Regression,Logistic Regression,Logistic Regression
iterations,iterations,iterations
Logistic Regression,Logistic Regression,Logistic Regression
constant term,constant term,constant term
iterations,iterations,iterations
in Logistic Regression,in Logistic Regression,in Logistic Regression
constant term,constant term,constant term
in Linear Regression,in Linear Regression,in Linear Regression
Logistic Regression,Logistic Regression,Logistic Regression
Hosmer-Lemeshow goodness-of-fit statistic,Hosmer-Lemeshow goodness-of-fit statistic,Hosmer-Lemeshow goodness-of-fit statistic
Logistic Regression,Logistic Regression,Logistic Regression
classification cutoff,classification cutoff,classification cutoff
Hosmer-Lemeshow goodness-of-fit statistic,Hosmer-Lemeshow goodness-of-fit statistic,Hosmer-Lemeshow goodness-of-fit statistic
in Logistic Regression,in Logistic Regression,in Logistic Regression

You can specify options for your logistic regression analysis:

Statistics and Plots. Allows you to request statistics and plots. Available options are Classification plots, Hosmer-Lemeshow goodness-of-fit, Casewise listing of residuals, Correlations of estimates, Iteration history, and CI for exp(B). Select one of the alternatives in the Display group to display statistics and plots either At each step or, only for the final model, At last step.

Expand Show details Collapse Hide details

• Hosmer-Lemeshow goodness-of-fit statistic. This goodness-of-fit statistic is more robust than the traditional goodness-of-fit statistic used in logistic regression, particularly for models with continuous covariates and studies with small sample sizes. It is based on grouping cases into deciles of risk and comparing the observed probability with the expected probability within each decile.

Probability for Stepwise. Allows you to control the criteria by which variables are entered into and removed from the equation. You can specify criteria for Entry or Removal of variables.

Expand Show details Collapse Hide details

• Probability for Stepwise. A variable is entered into the model if the probability of its score statistic is less than the Entry value and is removed if the probability is greater than the Removal value. To override the default settings, enter positive values for Entry and Removal. Entry must be less than Removal.

Classification cutoff. Allows you to determine the cut point for classifying cases. Cases with predicted values that exceed the classification cutoff are classified as positive, while those with predicted values smaller than the cutoff are classified as negative. To change the default, enter a value between 0.01 and 0.99.

Maximum Iterations. Allows you to change the maximum number of times that the model iterates before terminating.

Include constant in model. Allows you to indicate whether the model should include a constant term. If disabled, the constant term will equal 0.

Specifying Logistic Regression Options Collapse Hide details

This feature requires the Regression option.

From the menus choose:

Analyze
Regression
Binary Logistic…

In the Logistic Regression dialog box, click Options.

Related Topics

Choosing a Procedure for Binary Logistic Regression
Logistic Regression
Logistic Regression Set Rule
Logistic Regression Variable Selection Methods
Logistic Regression Define Categorical Variables
Logistic Regression Save New Variables


LOGISTIC REGRESSION Command Additional Features

Logistic Regression,Logistic Regression,Logistic Regression
command additional features,command additional features,command additional features

The command syntax language also allows you to:

• Identify casewise output by the values or variable labels of a variable.

• Control the spacing of iteration reports. Rather than printing parameter estimates after every iteration, you can request parameter estimates after every nth iteration.

• Change the criteria for terminating iteration and checking for redundancy.

• Specify a variable list for casewise listings.

• Conserve memory by holding the data for each split file group in an external scratch file during processing.

Related Topics

UNIANOVA Command Additional Features
RELIABILITY Command Additional Features
ALSCAL Command Additional Features
MIXED Command Additional Features
HILOGLINEAR Command Additional Features
CSGLM Command Additional Features
CSLOGISTIC Command Additional Features
MVA Command Additional Features
NOMREG Command Additional Features
PROBIT Command Additional Features
NLR Command Additional Features
WLS Command Additional Features
2SLS Command Additional Features
SEASON Command Additional Features
SPECTRA Command Additional Features
LOGISTIC REGRESSION


Multinomial Logistic Regression

Multinomial Logistic Regression,Multinomial Logistic Regression,Multinomial Logistic Regression
classification,classification,classification
in Multinomial Logistic Regression,in Multinomial Logistic Regression,in Multinomial Logistic Regression

Multinomial Logistic Regression is useful for situations in which you want to be able to classify subjects based on values of a set of predictor variables. This type of regression is similar to logistic regression, but it is more general because the dependent variable is not restricted to two categories.

Example. In order to market films more effectively, movie studios want to predict what type of film a moviegoer is likely to see. By performing a Multinomial Logistic Regression, the studio can determine the strength of influence a person's age, gender, and dating status has upon the type of film they prefer. The studio can then slant the advertising campaign of a particular movie toward a group of people likely to go see it.

Statistics. Iteration history, parameter coefficients, asymptotic covariance and correlation matrices, likelihood-ratio tests for model and partial effects, –2 log-likelihood. Pearson and deviance chi-square goodness of fit. Cox and Snell, Nagelkerke, and McFadden R2. Classification: observed versus predicted frequencies by response category. Crosstabulation: observed and predicted frequencies (with residuals) and proportions by covariate pattern and response category.

Methods. A multinomial logit model is fit for the full factorial model or a user-specified model. Parameter estimation is performed through an iterative maximum-likelihood algorithm.

Show me

Multinomial Logistic Regression Data Considerations Collapse Hide details

Data. The dependent variable should be categorical. Independent variables can be factors or covariates. In general, factors should be categorical variables and covariates should be continuous variables.

Assumptions. It is assumed that the odds ratio of any two categories are independent of all other response categories. For example, if a new product is introduced to a market, this assumption states that the market shares of all other products are affected proportionally equally. Also, given a covariate pattern, the responses are assumed to be independent multinomial variables.

Obtaining a Multinomial Logistic Regression Collapse Hide details

Obtaining a Multinomial Logistic Regression

This feature requires the Regression option.

From the menus choose:

Analyze
Regression
Multinomial Logistic...

Select one dependent variable.

Factors are optional and can be either numeric or categorical.

Covariates are optional but must be numeric if specified.

This procedure pastes NOMREG command syntax.

See NOMREG Algorithms for computational details for this procedure.

Related Topics

NOMREG
Choosing a Procedure for Binary Logistic Regression
Multinomial Logistic Regression
Multinomial Logistic Regression Reference Category
Multinomial Logistic Regression Statistics
Multinomial Logistic Regression Criteria
Multinomial Logistic Regression Options
Multinomial Logistic Regression Save


Multinomial Logistic Regression

Multinomial Logistic Regression,Multinomial Logistic Regression,Multinomial Logistic Regression
models,models,models
custom models,custom models,custom models
in Multinomial Logistic Regression,in Multinomial Logistic Regression,in Multinomial Logistic Regression
stepwise selection,stepwise selection,stepwise selection
in Multinomial Logistic Regression,in Multinomial Logistic Regression,in Multinomial Logistic Regression
full factorial models,full factorial models,full factorial models
in Multinomial Logistic Regression,in Multinomial Logistic Regression,in Multinomial Logistic Regression
main-effects models,main-effects models,main-effects models
in Multinomial Logistic Regression,in Multinomial Logistic Regression,in Multinomial Logistic Regression
intercept,intercept,intercept
include or exclude,include or exclude,include or exclude

By default, the Multinomial Logistic Regression procedure produces a model with the factor and covariate main effects, but you can specify a custom model or request stepwise model selection with this dialog box.

Specify Model. A main-effects model contains the covariate and factor main effects but no interaction effects. A full factorial model contains all main effects and all factor-by-factor interactions. It does not contain covariate interactions. You can create a custom model to specify subsets of factor interactions or covariate interactions, or request stepwise selection of model terms.

Factors & Covariates. The factors and covariates are listed.

Forced Entry Terms. Terms added to the forced entry list are always included in the model.

Stepwise Terms. Terms added to the stepwise list are included in the model according to one of the following user-selected Stepwise Methods:

• Forward entry. This method begins with no stepwise terms in the model. At each step, the most significant term is added to the model until none of the stepwise terms left out of the model would have a statistically significant contribution if added to the model.

• Backward elimination. This method begins by entering all terms specified on the stepwise list into the model. At each step, the least significant stepwise term is removed from the model until all of the remaining stepwise terms have a statistically significant contribution to the model.

• Forward stepwise. This method begins with the model that would be selected by the forward entry method. From there, the algorithm alternates between backward elimination on the stepwise terms in the model and forward entry on the terms left out of the model. This continues until no terms meet the entry or removal criteria.

• Backward stepwise. This method begins with the model that would be selected by the backward elimination method. From there, the algorithm alternates between forward entry on the terms left out of the model and backward elimination on the stepwise terms in the model. This continues until no terms meet the entry or removal criteria.

Include intercept in model. Allows you to include or exclude an intercept term for the model.

How to Define Models Collapse Hide details

This feature requires the Regression option.

From the menus choose:

Analyze
Regression
Multinomial Logistic Regression...

In the Multinomial Logistic Regression dialog box, click Model.

Define the model.

Related Topics

Choosing a Procedure for Binary Logistic Regression
Multinomial Logistic Regression
Multinomial Logistic Regression Reference Category
Multinomial Logistic Regression Statistics
Multinomial Logistic Regression Criteria
Multinomial Logistic Regression Options
Multinomial Logistic Regression Save


Multinomial Logistic Regression Reference Category

Multinomial Logistic Regression,Multinomial Logistic Regression,Multinomial Logistic Regression
reference category,reference category,reference category
reference category,reference category,reference category
in Multinomial Logistic Regression,in Multinomial Logistic Regression,in Multinomial Logistic Regression

By default, the Multinomial Logistic Regression procedure makes the last category the reference category. This dialog box gives you control of the reference category and the way in which categories are ordered.

Reference Category. Specify the first, last, or a custom category.

Category Order. In ascending order, the lowest value defines the first category and the highest value defines the last. In descending order, the highest value defines the first category and the lowest value defines the last.

How to Set the Reference Category Collapse Hide details

This feature requires the Regression option.

From the menus choose:

Analyze
Regression
Multinomial Logistic Regression...

Select a dependent variable in the Multinomial Logistic Regression dialog box, then click Reference Category.

Select the reference category and category order.

Related Topics

Choosing a Procedure for Binary Logistic Regression
Multinomial Logistic Regression
Multinomial Logistic Regression
Multinomial Logistic Regression Statistics
Multinomial Logistic Regression Criteria
Multinomial Logistic Regression Options
Multinomial Logistic Regression Save


Multinomial Logistic Regression Statistics

Multinomial Logistic Regression,Multinomial Logistic Regression,Multinomial Logistic Regression
statistics,statistics,statistics
Multinomial Logistic Regression,Multinomial Logistic Regression,Multinomial Logistic Regression
log-likelihood,log-likelihood,log-likelihood
in Multinomial Logistic Regression,in Multinomial Logistic Regression,in Multinomial Logistic Regression
Cox and Snell R-square,Cox and Snell R-square,Cox and Snell R-square
in Multinomial Logistic Regression,in Multinomial Logistic Regression,in Multinomial Logistic Regression
Nagelkerke R-square,Nagelkerke R-square,Nagelkerke R-square
in Multinomial Logistic Regression,in Multinomial Logistic Regression,in Multinomial Logistic Regression
McFadden R-square,McFadden R-square,McFadden R-square
in Multinomial Logistic Regression,in Multinomial Logistic Regression,in Multinomial Logistic Regression
parameter estimates,parameter estimates,parameter estimates
in Multinomial Logistic Regression,in Multinomial Logistic Regression,in Multinomial Logistic Regression
confidence intervals,confidence intervals,confidence intervals
in Multinomial Logistic Regression,in Multinomial Logistic Regression,in Multinomial Logistic Regression
correlation matrix,correlation matrix,correlation matrix
in Multinomial Logistic Regression,in Multinomial Logistic Regression,in Multinomial Logistic Regression
covariance matrix,covariance matrix,covariance matrix
in Multinomial Logistic Regression,in Multinomial Logistic Regression,in Multinomial Logistic Regression
cell probabilities tables,cell probabilities tables,cell probabilities tables
in Multinomial Logistic Regression,in Multinomial Logistic Regression,in Multinomial Logistic Regression
classification tables,classification tables,classification tables
in Multinomial Logistic Regression,in Multinomial Logistic Regression,in Multinomial Logistic Regression
likelihood ratio,likelihood ratio,likelihood ratio
goodness of fit,goodness of fit,goodness of fit
Pearson chi-square,Pearson chi-square,Pearson chi-square
goodness of fit,goodness of fit,goodness of fit
goodness of fit,goodness of fit,goodness of fit
in Multinomial Logistic Regression,in Multinomial Logistic Regression,in Multinomial Logistic Regression

You can specify the following statistics for your Multinomial Logistic Regression:

Case processing summary. This table contains information about the specified categorical variables.

Model. Statistics for the overall model.

• Pseudo R-square. Prints the Cox and Snell, Nagelkerke, and McFadden R2 statistics.

• Step summary. This table summarizes the effects entered or removed at each step in a stepwise method. It is not produced unless a stepwise model is specified in the Model dialog box.

• Model fitting information. This table compares the fitted and intercept-only or null models.

• Information criteria. This table prints Akaike’s information criterion (AIC) and Schwarz’s Bayesian information criterion (BIC).

• Cell probabilities. Prints a table of the observed and expected frequencies (with residual) and proportions by covariate pattern and response category.

• Classification table. Prints a table of the observed versus predicted responses.

• Goodness of fit chi-square statistics. Prints Pearson and likelihood-ratio chi-square statistics. Statistics are computed for the covariate patterns determined by all factors and covariates or by a user-defined subset of the factors and covariates.

• Monotinicity measures. Displays a table with information on the number of concordant pairs, discordant pairs, and tied pairs. The Somers' D, Goodman and Kruskal's Gamma, Kendall's tau-a, and Concordance Index C are also displayed in this table.

Parameters. Statistics related to the model parameters.

• Estimates. Prints estimates of the model parameters, with a user-specified level of confidence.

• Likelihood ratio test. Prints likelihood-ratio tests for the model partial effects. The test for the overall model is printed automatically.

• Asymptotic correlations. Prints matrix of parameter estimate correlations.

• Asymptotic covariances. Prints matrix of parameter estimate covariances.

Define Subpopulations. Allows you to select a subset of the factors and covariates in order to define the covariate patterns used by cell probabilities and the goodness-of-fit tests.

How to Select Statistics Collapse Hide details

This feature requires the Regression option.

From the menus choose:

Analyze
Regression
Multinomial Logistic Regression...

In the Multinomial Logistic Regression dialog box, click Statistics.

Select the statistics you want.

Related Topics

Choosing a Procedure for Binary Logistic Regression
Multinomial Logistic Regression
Multinomial Logistic Regression
Multinomial Logistic Regression Reference Category
Multinomial Logistic Regression Criteria
Multinomial Logistic Regression Options
Multinomial Logistic Regression Save


Multinomial Logistic Regression Criteria

Multinomial Logistic Regression,Multinomial Logistic Regression,Multinomial Logistic Regression
criteria,criteria,criteria
iterations,iterations,iterations
in Multinomial Logistic Regression,in Multinomial Logistic Regression,in Multinomial Logistic Regression
step-halving,step-halving,step-halving
in Multinomial Logistic Regression,in Multinomial Logistic Regression,in Multinomial Logistic Regression
convergence criterion,convergence criterion,convergence criterion
in Multinomial Logistic Regression,in Multinomial Logistic Regression,in Multinomial Logistic Regression
iteration history,iteration history,iteration history
in Multinomial Logistic Regression,in Multinomial Logistic Regression,in Multinomial Logistic Regression
delta,delta,delta
as correction for cells with zero observations,as correction for cells with zero observations,as correction for cells with zero observations
cells with zero observations,cells with zero observations,cells with zero observations
in Multinomial Logistic Regression,in Multinomial Logistic Regression,in Multinomial Logistic Regression
singularity,singularity,singularity
in Multinomial Logistic Regression,in Multinomial Logistic Regression,in Multinomial Logistic Regression
separation,separation,separation
in Multinomial Logistic Regression,in Multinomial Logistic Regression,in Multinomial Logistic Regression

You can specify the following criteria for your Multinomial Logistic Regression:

Iterations. Allows you to specify the maximum number of times you want to cycle through the algorithm, the maximum number of steps in the step-halving, the convergence tolerances for changes in the log-likelihood and parameters, how often the progress of the iterative algorithm is printed, and at what iteration the procedure should begin checking for complete or quasi-complete separation of the data.

Expand Show details Collapse Hide details

• Log-likelihood convergence. Convergence is assumed if the absolute change in the log-likelihood function is less than the specified value. The criterion is not used if the value is 0. Specify a non-negative value.

• Parameter convergence. Convergence is assumed if the absolute change in the parameter estimates is less than this value. The criterion is not used if the value is 0.

Delta. Allows you to specify a non-negative value less than 1. This value is added to each empty cell of the crosstabulation of response category by covariate pattern. This helps to stabilize the algorithm and prevent bias in the estimates.

Singularity tolerance. Allows you to specify the tolerance used in checking for singularities.

Defining Criteria Collapse Hide details

From the menus choose:

This feature requires the Regression option.

From the menus choose:

Analyze
Regression
Multinomial Logistic Regression...

In the Multinomial Logistic Regression dialog box, click Criteria.

Define the criteria.

Related Topics

Choosing a Procedure for Binary Logistic Regression
Multinomial Logistic Regression
Multinomial Logistic Regression
Multinomial Logistic Regression Reference Category
Multinomial Logistic Regression Statistics
Multinomial Logistic Regression Options
Multinomial Logistic Regression Save


Multinomial Logistic Regression Options

dispersion scaling value,dispersion scaling value,dispersion scaling value
in Multinomial Logistic Regression,in Multinomial Logistic Regression,in Multinomial Logistic Regression
deviance function,deviance function,deviance function
for estimating dispersion scaling value,for estimating dispersion scaling value,for estimating dispersion scaling value
likelihood ratio,likelihood ratio,likelihood ratio
for estimating dispersion scaling value,for estimating dispersion scaling value,for estimating dispersion scaling value
Pearson chi-square,Pearson chi-square,Pearson chi-square
for estimating dispersion scaling value,for estimating dispersion scaling value,for estimating dispersion scaling value

You can specify the following options for your Multinomial Logistic Regression:

Dispersion Scale. Allows you to specify the dispersion scaling value that will be used to correct the estimate of the parameter covariance matrix. Deviance estimates the scaling value using the deviance function (likelihood-ratio chi-square) statistic. Pearson estimates the scaling value using the Pearson chi-square statistic. You can also specify your own scaling value. It must be a positive numeric value.

Stepwise Options. These options give you control of the statistical criteria when stepwise methods are used to build a model. They are ignored unless a stepwise model is specified in the Model dialog box.

• Entry Probability. This is the probability of the likelihood-ratio statistic for variable entry. The larger the specified probability, the easier it is for a variable to enter the model. This criterion is ignored unless the forward entry, forward stepwise, or backward stepwise method is selected.

• Entry test. This is the method for entering terms in stepwise methods. Choose between the likelihood-ratio test and score test. This criterion is ignored unless the forward entry, forward stepwise, or backward stepwise method is selected.

• Removal Probability. This is the probability of the likelihood-ratio statistic for variable removal. The larger the specified probability, the easier it is for a variable to remain in the model. This criterion is ignored unless the backward elimination, forward stepwise, or backward stepwise method is selected.

• Removal Test. This is the method for removing terms in stepwise methods. Choose between the likelihood-ratio test and Wald test. This criterion is ignored unless the backward elimination, forward stepwise, or backward stepwise method is selected.

• Minimum Stepped Effects in Model. When using the backward elimination or backward stepwise methods, this specifies the minimum number of terms to include in the model. The intercept is not counted as a model term.

• Maximum Stepped Effects in Model. When using the forward entry or forward stepwise methods, this specifies the maximum number of terms to include in the model. The intercept is not counted as a model term.

• Hierarchically constrain entry and removal of terms. This option allows you to choose whether to place restrictions on the inclusion of model terms. Hierarchy requires that for any term to be included, all lower order terms that are a part of the term to be included must be in the model first. For example, if the hierarchy requirement is in effect, the factors Marital status and Gender must both be in the model before the Marital status*Gender interaction can be added. The three radio button options determine the role of covariates in determining hierarchy.

How to Define Options Collapse Hide details

This feature requires the Regression option.

From the menus choose:

Analyze
Regression
Multinomial Logistic Regression...

In the Multinomial Logistic Regression dialog box, click Options.

Specify the options you want.

Related Topics

Choosing a Procedure for Binary Logistic Regression
Multinomial Logistic Regression
Multinomial Logistic Regression
Multinomial Logistic Regression Reference Category
Multinomial Logistic Regression Statistics
Multinomial Logistic Regression Criteria
Multinomial Logistic Regression Save


Multinomial Logistic Regression Save

Multinomial Logistic Regression,Multinomial Logistic Regression,Multinomial Logistic Regression
save,save,save
Multinomial Logistic Regression,Multinomial Logistic Regression,Multinomial Logistic Regression
exporting model information,exporting model information,exporting model information

The Save dialog box allows you to save variables to the working file and export model information to an external file.

Saved variables:

• Estimated response probabilities. These are the estimated probabilities of classifying a factor/covariate pattern into the response categories. There are as many estimated probabilities as there are categories of the response variable; up to 25 will be saved.

• Predicted category. This is the response category with the largest expected probability for a factor/covariate pattern.

• Predicted category probabilities. This is the maximum of the estimated response probabilities.

• Actual category probability. This is the estimated probability of classifying a factor/covariate pattern into the observed category.

Export model information to XML file. Parameter estimates and (optionally) their covariances are exported to the specified file in XML (PMML) format. SmartScore and PASW Statistics Server (a separate product) can use this model file to apply the model information to other data files for scoring purposes.

How to Save Models Collapse Hide details

This feature requires the Regression option.

From the menus choose:

Analyze
Regression
Multinomial Logistic Regression...

In the Multinomial Logistic Regression dialog box, click Save.

Select the variables to be saved and/or name the file to which the model information should be saved.

Optionally, you can choose not to save the parameter covariance matrix.

Related Topics

Choosing a Procedure for Binary Logistic Regression
Multinomial Logistic Regression
Multinomial Logistic Regression
Multinomial Logistic Regression Reference Category
Multinomial Logistic Regression Statistics
Multinomial Logistic Regression Criteria
Multinomial Logistic Regression Options


NOMREG Command Additional Features

Multinomial Logistic Regression,Multinomial Logistic Regression,Multinomial Logistic Regression
command additional features,command additional features,command additional features

The command syntax language also allows you to:

• Specify the reference category of the dependent variable.

• Include cases with user-missing values.

• Customize hypothesis tests by specifying null hypotheses as linear combinations of parameters.

Related Topics

UNIANOVA Command Additional Features
RELIABILITY Command Additional Features
ALSCAL Command Additional Features
MIXED Command Additional Features
HILOGLINEAR Command Additional Features
CSGLM Command Additional Features
CSLOGISTIC Command Additional Features
MVA Command Additional Features
LOGISTIC REGRESSION Command Additional Features
PROBIT Command Additional Features
NLR Command Additional Features
WLS Command Additional Features
2SLS Command Additional Features
SEASON Command Additional Features
SPECTRA Command Additional Features
NOMREG


Probit Analysis

Probit Analysis,Probit Analysis,Probit Analysis
example,example,example
Probit Analysis,Probit Analysis,Probit Analysis
statistics,statistics,statistics

This procedure measures the relationship between the strength of a stimulus and the proportion of cases exhibiting a certain response to the stimulus. It is useful for situations where you have a dichotomous output that is thought to be influenced or caused by levels of some independent variable(s) and is particularly well suited to experimental data. This procedure will allow you to estimate the strength of a stimulus required to induce a certain proportion of responses, such as the median effective dose.

Example. How effective is a new pesticide at killing ants, and what is an appropriate concentration to use? You might perform an experiment in which you expose samples of ants to different concentrations of the pesticide and then record the number of ants killed and the number of ants exposed. Applying probit analysis to these data, you can determine the strength of the relationship between concentration and killing, and you can determine what the appropriate concentration of pesticide would be if you wanted to be sure to kill, say, 95% of exposed ants.

Statistics. Regression coefficients and standard errors, intercept and standard error, Pearson goodness-of-fit chi-square, observed and expected frequencies, and confidence intervals for effective levels of independent variable(s). Plots: transformed response plots.

Show me

Probit Analysis Data Considerations Collapse Hide details

Data. For each value of the independent variable (or each combination of values for multiple independent variables), your response variable should be a count of the number of cases with those values that show the response of interest, and the total observed variable should be a count of the total number of cases with those values for the independent variable. The factor variable should be categorical, coded as integers.

Assumptions. Observations should be independent. If you have a large number of values for the independent variables relative to the number of observations, as you might in an observational study, the chi-square and goodness-of-fit statistics may not be valid.

Related procedures. Probit analysis is closely related to logistic regression; in fact, if you choose the logit transformation, this procedure will essentially compute a logistic regression. In general, probit analysis is appropriate for designed experiments, whereas logistic regression is more appropriate for observational studies. The differences in output reflect these different emphases. The probit analysis procedure reports estimates of effective values for various rates of response (including median effective dose), while the logistic regression procedure reports estimates of odds ratios for independent variables.

Obtaining a Probit Analysis Collapse Hide details

Obtaining a Probit Analysis

This feature requires the Regression option.

From the menus choose:

Analyze
Regression
Probit...

Select a response frequency variable. This variable indicates the number of cases exhibiting a response to the test stimulus. The values of this variable cannot be negative.

Select a total observed variable. This variable indicates the number of cases to which the stimulus was applied. The values of this variable cannot be negative and cannot be less than the values of the response frequency variable for each case.

Optionally, you can select a Factor variable. If you do, click Define Range to define the groups.

Select one or more covariate(s). This variable contains the level of the stimulus applied to each observation. If you want to transform the covariate, select a transformation from the Transform drop-down list. If no transformation is applied and there is a control group, then the control group is included in the analysis.

Select either the Probit or Logit model.

Expand Show details Collapse Hide details

• Probit Model. Applies the probit transformation (the inverse of the cumulative standard normal distribution function) to the response proportions.

• Logit Model. Applies the logit (log odds) transformation to the response proportions.

This procedure pastes PROBIT command syntax.

See PROBIT Algorithms for computational details for this procedure.

Related Topics

PROBIT
Probit Analysis Define Range
Probit Analysis Options


Probit Analysis Define Range

Probit Analysis,Probit Analysis,Probit Analysis
define range,define range,define range

This allows you to specify the levels of the factor variable that will be analyzed. The factor levels must be coded as consecutive integers, and all levels in the range that you specify will be analyzed.

Defining a Range in Probit Analysis Collapse Hide details

This feature requires the Regression option.

From the menus choose:

Analyze
Regression
Probit…

In the Probit Analysis dialog box, select a Factor variable and select Define Range.

Enter values for Minimum and Maximum.

Related Topics

Probit Analysis
Probit Analysis Options


Probit Analysis Options

Probit Analysis,Probit Analysis,Probit Analysis
natural response rate,natural response rate,natural response rate
Probit Analysis,Probit Analysis,Probit Analysis
statistics,statistics,statistics
Probit Analysis,Probit Analysis,Probit Analysis
criteria,criteria,criteria
Probit Analysis,Probit Analysis,Probit Analysis
relative median potency,relative median potency,relative median potency
Probit Analysis,Probit Analysis,Probit Analysis
parallelism test,parallelism test,parallelism test
Probit Analysis,Probit Analysis,Probit Analysis
fiducial confidence intervals,fiducial confidence intervals,fiducial confidence intervals
Probit Analysis,Probit Analysis,Probit Analysis
iterations,iterations,iterations
relative median potency,relative median potency,relative median potency
in Probit Analysis,in Probit Analysis,in Probit Analysis
parallelism test,parallelism test,parallelism test
in Probit Analysis,in Probit Analysis,in Probit Analysis
fiducial confidence intervals,fiducial confidence intervals,fiducial confidence intervals
in Probit Analysis,in Probit Analysis,in Probit Analysis
iterations,iterations,iterations
in Probit Analysis,in Probit Analysis,in Probit Analysis

You can specify options for your probit analysis:

Statistics. Allows you to request the following optional statistics: Frequencies, Relative median potency, Parallelism test, and Fiducial confidence intervals.

Expand Show details Collapse Hide details

• Relative Median Potency. Displays the ratio of median potencies for each pair of factor levels. Also shows 95% confidence limits for each relative median potency. Relative median potencies are not available if you do not have a factor variable or if you have more than one covariate.

• Parallelism Test. A test of the hypothesis that all factor levels have a common slope.

• Fiducial Confidence Intervals. Confidence intervals for the dosage of agent required to produce a certain probability of response.

Fiducial confidence intervals and Relative median potency are unavailable if you have selected more than one covariate. Relative median potency and Parallelism test are available only if you have selected a factor variable.

Natural Response Rate. Allows you to indicate a natural response rate even in the absence of the stimulus. Available alternatives are None, Calculate from data, or Value.

Expand Show details Collapse Hide details

• Calculate from Data. Estimate the natural response rate from the sample data. Your data should contain a case representing the control level, for which the value of the covariate(s) is 0. Probit estimates the natural response rate using the proportion of responses for the control level as an initial value.

• Value. Sets the natural response rate in the model (select this item when you know the natural response rate in advance). Enter the natural response proportion (the proportion must be less than 1). For example, if the response occurs 10% of the time when the stimulus is 0, enter 0.10.

Criteria. Allows you to control parameters of the iterative parameter-estimation algorithm. You can override the defaults for Maximum iterations, Step limit, and Optimality tolerance.

Specifying Probit Analysis Options Collapse Hide details

This feature requires the Regression option.

From the menus choose:

Analyze
Regression
Probit…

In the Probit Analysis dialog box, select Options.

Related Topics

Probit Analysis
Probit Analysis Define Range


PROBIT Command Additional Features

Probit Analysis,Probit Analysis,Probit Analysis
command additional features,command additional features,command additional features

The command syntax language also allows you to:

• Request an analysis on both the probit and logit models.

• Control the treatment of missing values.

• Transform the covariates by bases other than base 10 or natural log.

Related Topics

UNIANOVA Command Additional Features
RELIABILITY Command Additional Features
ALSCAL Command Additional Features
MIXED Command Additional Features
HILOGLINEAR Command Additional Features
CSGLM Command Additional Features
CSLOGISTIC Command Additional Features
MVA Command Additional Features
LOGISTIC REGRESSION Command Additional Features
NOMREG Command Additional Features
NLR Command Additional Features
WLS Command Additional Features
2SLS Command Additional Features
SEASON Command Additional Features
SPECTRA Command Additional Features
PROBIT


Nonlinear Regression

Nonlinear Regression,Nonlinear Regression,Nonlinear Regression
example,example,example
Nonlinear Regression,Nonlinear Regression,Nonlinear Regression
statistics,statistics,statistics
Nonlinear Regression,Nonlinear Regression,Nonlinear Regression

Nonlinear regression is a method of finding a nonlinear model of the relationship between the dependent variable and a set of independent variables. Unlike traditional linear regression, which is restricted to estimating linear models, nonlinear regression can estimate models with arbitrary relationships between independent and dependent variables. This is accomplished using iterative estimation algorithms. Note that this procedure is not necessary for simple polynomial models of the form Y = A + BX**2. By defining W = X**2, we get a simple linear model, Y = A + BW, which can be estimated using traditional methods such as the Linear Regression procedure.

Example. Can population be predicted based on time? A scatterplot shows that there seems to be a strong relationship between population and time, but the relationship is nonlinear, so it requires the special estimation methods of the Nonlinear Regression procedure. By setting up an appropriate equation, such as a logistic population growth model, we can get a good estimate of the model, allowing us to make predictions about population for times that were not actually measured.

Statistics. For each iteration: parameter estimates and residual sum of squares. For each model: sum of squares for regression, residual, uncorrected total and corrected total, parameter estimates, asymptotic standard errors, and asymptotic correlation matrix of parameter estimates.

Show me

Nonlinear Regression Data Considerations Collapse Hide details

Data. The dependent and independent variables should be quantitative. Categorical variables, such as religion, major, or region of residence, need to be recoded to binary (dummy) variables or other types of contrast variables.

Assumptions. Results are valid only if you have specified a function that accurately describes the relationship between dependent and independent variables. Additionally, the choice of good starting values is very important. Even if you've specified the correct functional form of the model, if you use poor starting values, your model may fail to converge or you may get a locally optimal solution rather than one that is globally optimal.

Related procedures. Many models that appear nonlinear at first can be transformed to a linear model, which can be analyzed using the Linear Regression procedure. If you are uncertain what the proper model should be, the Curve Estimation procedure can help to identify useful functional relations in your data.

Obtaining a Nonlinear Regression Analysis Collapse Hide details

Obtaining a Nonlinear Regression Analysis

This feature requires the Regression option.

From the menus choose:

Analyze
Regression
Nonlinear...

Select one numeric dependent variable from the list of variables in your active dataset.

To build a model expression, enter the expression in the Model field or paste components (variables, parameters, functions) into the field.

Identify parameters in your model by clicking Parameters.

A segmented model (one that takes different forms in different parts of its domain) must be specified by using conditional logic within the single model statement.

This procedure pastes NLR command syntax.

See NLR Algorithms and CNLR Algorithms for computational details for this procedure.

Related Topics

NLR
Computing Time-Dependent Covariates
Conditional Logic (Nonlinear Regression)
Nonlinear Regression Parameters
Nonlinear Regression Common Models
Nonlinear Regression Loss Function
Nonlinear Regression Parameter Constraints
Nonlinear Regression Save New Variables
Nonlinear Regression Options
Interpreting Nonlinear Regression Results


Conditional Logic (Nonlinear Regression)

Nonlinear Regression,Nonlinear Regression,Nonlinear Regression
conditional logic,conditional logic,conditional logic
Nonlinear Regression,Nonlinear Regression,Nonlinear Regression
segmented model,segmented model,segmented model

You can specify a segmented model using conditional logic. To use conditional logic within a model expression or a loss function, you form the sum of a series of terms, one for each condition. Each term consists of a logical expression (in parentheses) multiplied by the expression that should result when that logical expression is true.

For example, consider a segmented model that equals 0 for X<=0, X for 0<X<1, and 1 for X>=1. The expression for this is:

(X<=0)*0 + (X>0 & X<1)*X + (X>=1)*1.

The logical expressions in parentheses all evaluate to 1 (true) or 0 (false). Therefore:

If X<=0, the above reduces to 1*0 + 0*X + 0*1 = 0.

If 0<X<1, it reduces to 0*0 + 1*X + 0*1 = X.

If X>=1, it reduces to 0*0 + 0*X + 1*1 = 1.

More complicated examples can be easily built by substituting different logical expressions and outcome expressions. Remember that double inequalities, such as 0<X<1, must be written as compound expressions, such as (X>0 & X<1).

String variables can be used within logical expressions:

(city='New York')*costliv + (city='Des Moines')*0.59*costliv

This yields one expression (the value of the variable costliv) for New Yorkers and another (59% of that value) for Des Moines residents. String constants must be enclosed in quotation marks or apostrophes, as shown here.

Related Topics

Nonlinear Regression
Nonlinear Regression Parameters
Nonlinear Regression Common Models
Nonlinear Regression Loss Function
Nonlinear Regression Parameter Constraints
Nonlinear Regression Save New Variables
Nonlinear Regression Options
Interpreting Nonlinear Regression Results


Nonlinear Regression Parameters

Nonlinear Regression,Nonlinear Regression,Nonlinear Regression
parameters,parameters,parameters
Nonlinear Regression,Nonlinear Regression,Nonlinear Regression
starting values,starting values,starting values

Parameters are the parts of your model that the Nonlinear Regression procedure estimates. Parameters can be additive constants, multiplicative coefficients, exponents, or values used in evaluating functions. All parameters that you have defined will appear (with their initial values) on the Parameters list in the main dialog box.

Name. You must specify a name for each parameter. This name must be a valid variable name and must be the name used in the model expression in the main dialog box.

Starting Value. Allows you to specify a starting value for the parameter, preferably as close as possible to the expected final solution. Poor starting values can result in failure to converge or in convergence on a solution that is local (rather than global) or is physically impossible.

Use starting values from previous analysis. If you have already run a nonlinear regression from this dialog box, you can select this option to obtain the initial values of parameters from their values in the previous run. This permits you to continue searching when the algorithm is converging slowly. (The initial starting values will still appear on the Parameters list in the main dialog box.)

Note: This selection persists in this dialog box for the rest of your session. If you change the model, be sure to deselect it.

Specifying Nonlinear Regression Parameters Collapse Hide details

This feature requires the Regression option.

From the menus choose:

Analyze
Regression
Nonlinear…

In the Nonlinear Regression dialog box, click Parameters.

Enter a name for the parameter. This name must be a valid variable name and must be the name used in the model expression in the main dialog box.

Enter a starting value for the parameter, preferably as close as possible to the expected final solution. Poor initial values can result in failure to converge or in convergence on a solution that is local (rather than global) or is physically impossible.

After specifying a name and starting value, click Add to add the parameter to the Parameters list.

Related Topics

Nonlinear Regression
Conditional Logic (Nonlinear Regression)
Nonlinear Regression Common Models
Nonlinear Regression Loss Function
Nonlinear Regression Parameter Constraints
Nonlinear Regression Save New Variables
Nonlinear Regression Options
Interpreting Nonlinear Regression Results


Nonlinear Regression Common Models

nonlinear models,nonlinear models,nonlinear models
in Nonlinear Regression,in Nonlinear Regression,in Nonlinear Regression
Nonlinear Regression,Nonlinear Regression,Nonlinear Regression
common nonlinear models,common nonlinear models,common nonlinear models
asymptotic regression,asymptotic regression,asymptotic regression
in Nonlinear Regression,in Nonlinear Regression,in Nonlinear Regression
density model,density model,density model
in Nonlinear Regression,in Nonlinear Regression,in Nonlinear Regression
Gauss model,Gauss model,Gauss model
in Nonlinear Regression,in Nonlinear Regression,in Nonlinear Regression
Gompertz model,Gompertz model,Gompertz model
in Nonlinear Regression,in Nonlinear Regression,in Nonlinear Regression
Johnson-Schumacher model,Johnson-Schumacher model,Johnson-Schumacher model
in Nonlinear Regression,in Nonlinear Regression,in Nonlinear Regression
log-modified model,log-modified model,log-modified model
in Nonlinear Regression,in Nonlinear Regression,in Nonlinear Regression
Metcherlich law of diminishing returns,Metcherlich law of diminishing returns,Metcherlich law of diminishing returns
in Nonlinear Regression,in Nonlinear Regression,in Nonlinear Regression
Michaelis Menten model,Michaelis Menten model,Michaelis Menten model
in Nonlinear Regression,in Nonlinear Regression,in Nonlinear Regression
Morgan-Mercer-Florin model,Morgan-Mercer-Florin model,Morgan-Mercer-Florin model
in Nonlinear Regression,in Nonlinear Regression,in Nonlinear Regression
Peal-Reed model,Peal-Reed model,Peal-Reed model
in Nonlinear Regression,in Nonlinear Regression,in Nonlinear Regression
ratio of cubics model,ratio of cubics model,ratio of cubics model
in Nonlinear Regression,in Nonlinear Regression,in Nonlinear Regression
ratio of quadratics model,ratio of quadratics model,ratio of quadratics model
in Nonlinear Regression,in Nonlinear Regression,in Nonlinear Regression
Richards model,Richards model,Richards model
in Nonlinear Regression,in Nonlinear Regression,in Nonlinear Regression
Verhulst model,Verhulst model,Verhulst model
in Nonlinear Regression,in Nonlinear Regression,in Nonlinear Regression
Von Bertalanffy model,Von Bertalanffy model,Von Bertalanffy model
in Nonlinear Regression,in Nonlinear Regression,in Nonlinear Regression
Weibull model,Weibull model,Weibull model
in Nonlinear Regression,in Nonlinear Regression,in Nonlinear Regression
yield density model,yield density model,yield density model
in Nonlinear Regression,in Nonlinear Regression,in Nonlinear Regression

The table below provides example model syntax for many published nonlinear regression models. A model selected at random is not likely to fit your data well. Appropriate starting values for the parameters are necessary, and some models require constraints in order to converge.

Example model syntax
Name | Model expression
Asymptotic Regression | b1 + b2 * exp(b3 * x)
Asymptotic Regression | b1 – (b2 * (b3 ** x))
Density | (b1 + b2 * x) ** (–1 / b3)
Gauss | b1 * (1 – b3 * exp(–b2 * x ** 2))
Gompertz | b1 * exp(–b2 * exp(–b3 * x))
Johnson-Schumacher | b1 * exp(–b2 / (x + b3))
Log-Modified | (b1 + b3 * x) ** b2
Log-Logistic | b1 – ln(1 + b2 * exp(–b3 * x))
Metcherlich Law of Diminishing Returns | b1 + b2 * exp(–b3 * x)
Michaelis Menten | b1 * x / (x + b2)
Morgan-Mercer-Florin | (b1 * b2 + b3 * x ** b4) / (b2 + x ** b4)
Peal-Reed | b1 / (1+ b2 * exp(–(b3 * x + b4 * x **2 + b5 * x ** 3)))
Ratio of Cubics | (b1 + b2 * x + b3 * x ** 2 + b4 * x ** 3) / (b5 * x ** 3)
Ratio of Quadratics | (b1 + b2 * x + b3 * x ** 2) / (b4 * x ** 2)
Richards | b1 / ((1 + b3 * exp(–b2 * x)) ** (1 / b4))
Verhulst | b1 / (1 + b3 * exp(–b2 * x))
Von Bertalanffy | (b1 ** (1 – b4) – b2 * exp(–b3 * x)) ** (1 / (1 – b4))
Weibull | b1 – b2 * exp(–b3 * x ** b4)
Yield Density | (b1 + b2 * x + b3 * x ** 2) ** (–1)

Related Topics

Nonlinear Regression
Conditional Logic (Nonlinear Regression)
Nonlinear Regression Parameters
Nonlinear Regression Loss Function
Nonlinear Regression Parameter Constraints
Nonlinear Regression Save New Variables
Nonlinear Regression Options
Interpreting Nonlinear Regression Results


Nonlinear Regression Loss Function

Nonlinear Regression,Nonlinear Regression,Nonlinear Regression
loss function,loss function,loss function

The loss function in nonlinear regression is the function that is minimized by the algorithm. Select either Sum of squared residuals to minimize the sum of the squared residuals or User-defined loss function to minimize a different function.

If you select User-defined loss function, you must define the loss function whose sum (across all cases) should be minimized by the choice of parameter values.

• Most loss functions involve the special variable RESID_, which represents the residual. (The default Sum of squared residuals loss function could be entered explicitly as RESID_**2.) If you need to use the predicted value in your loss function, it is equal to the dependent variable minus the residual.

• It is possible to specify a conditional loss function using conditional logic.

You can either type an expression in the User-defined loss function field or paste components of the expression into the field. String constants must be enclosed in quotation marks or apostrophes, and numeric constants must be typed in American format, with the dot as a decimal delimiter.

Defining a Loss Function Collapse Hide details

This feature requires the Regression option.

From the menus choose:

Analyze
Regression
Nonlinear…

In the Nonlinear Regression dialog box, select one or more parameters and click Loss.

You can either type an expression in the User-defined loss function field or paste components of the expression into the field.

Related Topics

Nonlinear Regression
Conditional Logic (Nonlinear Regression)
Nonlinear Regression Parameters
Nonlinear Regression Common Models
Nonlinear Regression Parameter Constraints
Nonlinear Regression Save New Variables
Nonlinear Regression Options
Interpreting Nonlinear Regression Results


Nonlinear Regression Parameter Constraints

Nonlinear Regression,Nonlinear Regression,Nonlinear Regression
parameter constraints,parameter constraints,parameter constraints
parameter constraints,parameter constraints,parameter constraints
in Nonlinear Regression,in Nonlinear Regression,in Nonlinear Regression
constrained regression,constrained regression,constrained regression
in Nonlinear Regression,in Nonlinear Regression,in Nonlinear Regression

A constraint is a restriction on the allowable values for a parameter during the iterative search for a solution. Linear expressions are evaluated before a step is taken, so you can use linear constraints to prevent steps that might result in overflows. Nonlinear expressions are evaluated after a step is taken.

Each equation or inequality requires the following elements:

• An expression involving at least one parameter in the model. Type the expression or use the keypad, which allows you to paste numbers, operators, or parentheses into the expression. You can either type in the required parameter(s) along with the rest of the expression or paste from the Parameters list at the left. You cannot use ordinary variables in a constraint.

• One of the three logical operators <=, =, or >=.

• A numeric constant, to which the expression is compared using the logical operator. Type the constant. Numeric constants must be typed in American format, with the dot as a decimal delimiter.

Specifying Nonlinear Regression Parameter Constraints Collapse Hide details

This feature requires the Regression option.

From the menus choose:

Analyze
Regression
Nonlinear…

In the Nonlinear Regression dialog box, click Constraints.

For each constraint, define the following elements:

• An expression involving at least one parameter in the model. Type the expression or use the keypad, which allows you to paste numbers, operators, or parentheses into the expression. You can either type in the required parameter(s) along with the rest of the expression or paste from the Parameters list at the left. You cannot use ordinary variables in a constraint.

• One of the three logical operators <=, =, or >=.

• A numeric constant, to which the expression is compared using the logical operator. Type the constant. Numeric constants must be typed in American format, with the dot as a decimal delimiter.

After defining each constraint, click Add to add it to the constraint list.

Related Topics

Nonlinear Regression
Conditional Logic (Nonlinear Regression)
Nonlinear Regression Parameters
Nonlinear Regression Common Models
Nonlinear Regression Loss Function
Nonlinear Regression Save New Variables
Nonlinear Regression Options
Interpreting Nonlinear Regression Results


Nonlinear Regression Save New Variables

Nonlinear Regression,Nonlinear Regression,Nonlinear Regression
predicted values,predicted values,predicted values
Nonlinear Regression,Nonlinear Regression,Nonlinear Regression
residuals,residuals,residuals
Nonlinear Regression,Nonlinear Regression,Nonlinear Regression
derivatives,derivatives,derivatives
Nonlinear Regression,Nonlinear Regression,Nonlinear Regression
save new variables,save new variables,save new variables

You can save a number of new variables to your active data file. Available options are Residuals, Predicted values, Derivatives, and Loss function values. These variables can be used in subsequent analyses to test the fit of the model or to identify problem cases.

Expand Show details Collapse Hide details

• Residuals. Saves residuals with the variable name resid.

• Predicted Values. Saves predicted values with the variable name pred_.

• Derivatives. One derivative is saved for each model parameter. Derivative names are created by prefixing 'd.' to the first six characters of parameter names.

• Loss Function Values. This option is available if you specify your own loss function. The variable name loss_ is assigned to the values of the loss function.

Saving New Variables Collapse Hide details

This feature requires the Regression option.

From the menus choose:

Analyze
Regression
Nonlinear…

In the Nonlinear Regression dialog box, click Save.

Related Topics

Nonlinear Regression
Conditional Logic (Nonlinear Regression)
Nonlinear Regression Parameters
Nonlinear Regression Common Models
Nonlinear Regression Loss Function
Nonlinear Regression Parameter Constraints
Nonlinear Regression Options
Interpreting Nonlinear Regression Results


Nonlinear Regression Options

Nonlinear Regression,Nonlinear Regression,Nonlinear Regression
sequential quadratic programming,sequential quadratic programming,sequential quadratic programming
Nonlinear Regression,Nonlinear Regression,Nonlinear Regression
Levenberg-Marquardt algorithm,Levenberg-Marquardt algorithm,Levenberg-Marquardt algorithm
Nonlinear Regression,Nonlinear Regression,Nonlinear Regression
estimation methods,estimation methods,estimation methods
Nonlinear Regression,Nonlinear Regression,Nonlinear Regression
bootstrap estimates,bootstrap estimates,bootstrap estimates

Options allow you to control various aspects of your nonlinear regression analysis:

Bootstrap Estimates. A method of estimating the standard error of a statistic using repeated samples from the original data set. This is done by sampling (with replacement) to get many samples of the same size as the original data set. The nonlinear equation is estimated for each of these samples. The standard error of each parameter estimate is then calculated as the standard deviation of the bootstrapped estimates. Parameter values from the original data are used as starting values for each bootstrap sample. This requires the sequential quadratic programming algorithm.

Estimation Method. Allows you to select an estimation method, if possible. (Certain choices in this or other dialog boxes require the sequential quadratic programming algorithm.) Available alternatives include Sequential quadratic programming and Levenberg-Marquardt.

Expand Show details Collapse Hide details

• Sequential Quadratic Programming. This method is available for constrained and unconstrained models. Sequential quadratic programming is used automatically if you specify a constrained model, a user-defined loss function, or bootstrapping. You can enter new values for Maximum iterations and Step limit, and you can change the selection in the drop-down lists for Optimality tolerance, Function precision, and Infinite step size.

• Levenberg-Marquardt. This is the default algorithm for unconstrained models. The Levenberg-Marquardt method is not available if you specify a constrained model, a user-defined loss function, or bootstrapping. You can enter new values for Maximum iterations, and you can change the selection in the drop-down lists for Sum-of-squares convergence and Parameter convergence.

Specifying Nonlinear Regression Options Collapse Hide details

This feature requires the Regression option.

From the menus choose:

Analyze
Regression
Nonlinear…

In the Nonlinear Regression dialog box, click Options.

Related Topics

Nonlinear Regression
Conditional Logic (Nonlinear Regression)
Nonlinear Regression Parameters
Nonlinear Regression Common Models
Nonlinear Regression Loss Function
Nonlinear Regression Parameter Constraints
Nonlinear Regression Save New Variables
Interpreting Nonlinear Regression Results


Interpreting Nonlinear Regression Results

Nonlinear Regression,Nonlinear Regression,Nonlinear Regression
interpretation of results,interpretation of results,interpretation of results

Nonlinear regression problems often present computational difficulties:

• The choice of initial values for the parameters influences convergence. Try to choose initial values that are reasonable and, if possible, close to the expected final solution.

• Sometimes one algorithm performs better than the other on a particular problem. In the Options dialog box, select the other algorithm if it is available. (If you specify a loss function or certain types of constraints, you cannot use the Levenberg-Marquardt algorithm.)

• When iteration stops only because the maximum number of iterations has occurred, the "final" model is probably not a good solution. Select Use starting values from previous analysis in the Parameters dialog box to continue the iteration or, better yet, choose different initial values.

• Models that require exponentiation of or by large data values can cause overflows or underflows (numbers too large or too small for the computer to represent). Sometimes you can avoid these by suitable choice of initial values or by imposing constraints on the parameters.

Related Topics

Nonlinear Regression
Conditional Logic (Nonlinear Regression)
Nonlinear Regression Parameters
Nonlinear Regression Common Models
Nonlinear Regression Loss Function
Nonlinear Regression Parameter Constraints
Nonlinear Regression Save New Variables
Nonlinear Regression Options


NLR Command Additional Features

Nonlinear Regression,Nonlinear Regression,Nonlinear Regression
command additional features,command additional features,command additional features

The command syntax language also allows you to:

• Name a file from which to read initial values for parameter estimates.

• Specify more than one model statement and loss function. This makes it easier to specify a segmented model.

• Supply your own derivatives rather than use those calculated by the program.

• Specify the number of bootstrap samples to generate.

• Specify additional iteration criteria, including setting a critical value for derivative checking and defining a convergence criterion for the correlation between the residuals and the derivatives.

Additional criteria for the CNLR (constrained nonlinear regression) command allow you to:

• Specify the maximum number of minor iterations allowed within each major iteration.

• Set a critical value for derivative checking.

• Set a step limit.

• Specify a crash tolerance to determine if initial values are within their specified bounds.

Related Topics

UNIANOVA Command Additional Features
RELIABILITY Command Additional Features
ALSCAL Command Additional Features
MIXED Command Additional Features
HILOGLINEAR Command Additional Features
CSGLM Command Additional Features
CSLOGISTIC Command Additional Features
MVA Command Additional Features
LOGISTIC REGRESSION Command Additional Features
NOMREG Command Additional Features
PROBIT Command Additional Features
WLS Command Additional Features
2SLS Command Additional Features
SEASON Command Additional Features
SPECTRA Command Additional Features
NLR


Weight Estimation

Linear Regression,Linear Regression,Linear Regression
weight estimation,weight estimation,weight estimation
Weight Estimation,Weight Estimation,Weight Estimation
example,example,example
Weight Estimation,Weight Estimation,Weight Estimation
statistics,statistics,statistics
Weight Estimation,Weight Estimation,Weight Estimation
log-likelihood,log-likelihood,log-likelihood
log-likelihood,log-likelihood,log-likelihood
in Weight Estimation,in Weight Estimation,in Weight Estimation
Weight Estimation,Weight Estimation,Weight Estimation

Standard linear regression models assume that variance is constant within the population under study. When this is not the case--for example, when cases that are high on some attribute show more variability than cases that are low on that attribute--linear regression using ordinary least squares (OLS) no longer provides optimal model estimates. If the differences in variability can be predicted from another variable, the Weight Estimation procedure can compute the coefficients of a linear regression model using weighted least squares (WLS), such that the more precise observations (that is, those with less variability) are given greater weight in determining the regression coefficients. The Weight Estimation procedure tests a range of weight transformations and indicates which will give the best fit to the data.

Example. What are the effects of inflation and unemployment on changes in stock prices? Because stocks with higher share values often show more variability than those with low share values, ordinary least squares will not produce optimal estimates. Weight estimation allows you to account for the effect of share price on the variability of price changes in calculating the linear model.

Statistics. Log-likelihood values for each power of the weight source variable tested, multiple R, R-squared, adjusted R-squared, ANOVA table for WLS model, unstandardized and standardized parameter estimates, and log-likelihood for the WLS model.

Show me

Weight Estimation Data Considerations Collapse Hide details

Data. The dependent and independent variables should be quantitative. Categorical variables, such as religion, major, or region of residence, need to be recoded to binary (dummy) variables or other types of contrast variables. The weight variable should be quantitative and should be related to the variability in the dependent variable.

Assumptions. For each value of the independent variable, the distribution of the dependent variable must be normal. The relationship between the dependent variable and each independent variable should be linear, and all observations should be independent. The variance of the dependent variable can vary across levels of the independent variable(s), but the differences must be predictable based on the weight variable.

Related procedures. The Explore procedure can be used to screen your data. Explore provides tests for normality and homogeneity of variance, as well as graphical displays. If your dependent variable seems to have equal variance across levels of independent variables, you can use the Linear Regression procedure. If your data appear to violate an assumption (such as normality), try transforming them. If your data are not related linearly and a transformation does not help, use an alternate model in the Curve Estimation procedure. If your dependent variable is dichotomous--for example, whether a particular sale is completed or whether an item is defective--use the Logistic Regression procedure. If your dependent variable is censored--for example, survival time after surgery--use Life Tables, Kaplan-Meier, or Cox Regression, available in the Advanced Statistics option. If your data are not independent--for example, if you observe the same person under several conditions--use the Repeated Measures procedure, available in the Advanced Statistics option.

Obtaining a Weight Estimation Analysis Collapse Hide details

Obtaining a Weight Estimation Analysis

This feature requires the Regression option.

From the menus choose:

Analyze
Regression
Weight Estimation...

Select one dependent variable.

Select one or more independent variables.

Select the variable that is the source of heteroscedasticity as the weight variable.

Expand Show details Collapse Hide details

• Weight Variable. The data are weighted by the reciprocal of this variable raised to a power. The regression equation is calculated for each of a specified range of power values and indicates the power that maximizes the log-likelihood function.

• Power Range. This is used in conjunction with the weight variable to compute weights. Several regression equations will be fit, one for each value in the power range. The values entered in the Power range test box and the through text box must be between -6.5 and 7.5, inclusive. The power values range from the low to high value, in increments determined by the value specified. The total number of values in the power range is limited to 150.

This procedure pastes WLS command syntax.

See WLS Algorithms for computational details for this procedure.

Related Topics

WLS
Weight Estimation Options
WLS Command Additional Features


Weight Estimation Options

Weight Estimation,Weight Estimation,Weight Estimation
save best weights as new variable,save best weights as new variable,save best weights as new variable
Weight Estimation,Weight Estimation,Weight Estimation
display ANOVA and estimates,display ANOVA and estimates,display ANOVA and estimates
Weight Estimation,Weight Estimation,Weight Estimation
iteration history,iteration history,iteration history

You can specify options for your weight estimation analysis:

Save best weight as new variable. Adds the weight variable to the active file. This variable is called WGT_n, where n is a number chosen to give the variable a unique name.

Display ANOVA and Estimates. Allows you to control how statistics are displayed in the output. Available alternatives are For best power and For each power value.

Specifying Options Collapse Hide details

This feature requires the Regression option.

From the menus choose:

Analyze
Regression
Weight Estimation…

In the Weight Estimation dialog box, select Options.

Related Topics

Weight Estimation
WLS Command Additional Features


WLS Command Additional Features

Weight Estimation,Weight Estimation,Weight Estimation
command additional features,command additional features,command additional features

The command syntax language also allows you to:

• Provide a single value for the power.

• Specify a list of power values, or mix a range of values with a list of values for the power.

Related Topics

UNIANOVA Command Additional Features
RELIABILITY Command Additional Features
ALSCAL Command Additional Features
MIXED Command Additional Features
HILOGLINEAR Command Additional Features
CSGLM Command Additional Features
CSLOGISTIC Command Additional Features
MVA Command Additional Features
LOGISTIC REGRESSION Command Additional Features
NOMREG Command Additional Features
PROBIT Command Additional Features
NLR Command Additional Features
2SLS Command Additional Features
SEASON Command Additional Features
SPECTRA Command Additional Features
Weight Estimation
Weight Estimation Options
WLS


Two-Stage Least-Squares Regression

Two-Stage Least-Squares Regression,Two-Stage Least-Squares Regression,Two-Stage Least-Squares Regression
instrumental variables,instrumental variables,instrumental variables
Two-Stage Least-Squares Regression,Two-Stage Least-Squares Regression,Two-Stage Least-Squares Regression
example,example,example
Two-Stage Least-Squares Regression,Two-Stage Least-Squares Regression,Two-Stage Least-Squares Regression
statistics,statistics,statistics
Two-Stage Least-Squares Regression,Two-Stage Least-Squares Regression,Two-Stage Least-Squares Regression
Linear Regression,Linear Regression,Linear Regression
Two-Stage Least-Squares Regression,Two-Stage Least-Squares Regression,Two-Stage Least-Squares Regression

Standard linear regression models assume that errors in the dependent variable are uncorrelated with the independent variable(s). When this is not the case (for example, when relationships between variables are bidirectional), linear regression using ordinary least squares (OLS) no longer provides optimal model estimates. Two-stage least-squares regression uses instrumental variables that are uncorrelated with the error terms to compute estimated values of the problematic predictor(s) (the first stage), and then uses those computed values to estimate a linear regression model of the dependent variable (the second stage). Since the computed values are based on variables that are uncorrelated with the errors, the results of the two-stage model are optimal.

Example. Is the demand for a commodity related to its price and consumers' incomes? The difficulty in this model is that price and demand have a reciprocal effect on each other. That is, price can influence demand and demand can also influence price. A two-stage least-squares regression model might use consumers' incomes and lagged price to calculate a proxy for price that is uncorrelated with the measurement errors in demand. This proxy is substituted for price itself in the originally specified model, which is then estimated.

Statistics. For each model: standardized and unstandardized regression coefficients, multiple R, R2, adjusted R2, standard error of the estimate, analysis-of-variance table, predicted values, and residuals. Also, 95% confidence intervals for each regression coefficient, and correlation and covariance matrices of parameter estimates.

Show me

Two-Stage Least-Squares Regression Data Considerations Collapse Hide details

Data. The dependent and independent variables should be quantitative. Categorical variables, such as religion, major, or region of residence, need to be recoded to binary (dummy) variables or other types of contrast variables. Endogenous explanatory variables should be quantitative (not categorical).

Assumptions. For each value of the independent variable, the distribution of the dependent variable must be normal. The variance of the distribution of the dependent variable should be constant for all values of the independent variable. The relationship between the dependent variable and each independent variable should be linear.

Related procedures. If you believe that none of your predictor variables is correlated with the errors in your dependent variable, you can use the Linear Regression procedure. If your data appear to violate one of the assumptions (such as normality or constant variance), try transforming them. If your data are not related linearly and a transformation does not help, use an alternate model in the Curve Estimation procedure. If your dependent variable is dichotomous, such as whether a particular sale is completed or not, use the Logistic Regression procedure. If your data are not independent--for example, if you observe the same person under several conditions--use the Repeated Measures procedure, available in the Advanced Models option.

Obtaining a Two-Stage Least-Squares Regression Analysis Collapse Hide details

Obtaining a Two-Stage Least-Squares Regression Analysis

This feature requires the Regression option.

From the menus choose:

Analyze
Regression
2-Stage Least Squares...

Select one dependent variable.

Select one or more explanatory (predictor) variables.

Select one or more instrumental variables.

Expand Show details Collapse Hide details

• Instrumental. These are the variables used to compute the predicted values for the endogenous variables in the first stage of two-stage least squares analysis. The same variables may appear in both the Explanatory and Instrumental list boxes. The number of instrumental variables must be at least as many as the number of explanatory variables. If all explanatory and instrumental variables listed are the same, the results are the same as results from the Linear Regression procedure.

Explanatory variables not specified as instrumental are considered endogenous. Normally, all of the exogenous variables in the Explanatory list are also specified as instrumental variables.

This procedure pastes 2SLS command syntax.

See 2SLS Algorithms for computational details for this procedure.

Related Topics

2SLS
Two-Stage Least-Squares Regression Options


Two-Stage Least-Squares Regression Options

Two-Stage Least-Squares Regression,Two-Stage Least-Squares Regression,Two-Stage Least-Squares Regression
saving new variables,saving new variables,saving new variables
Two-Stage Least-Squares Regression,Two-Stage Least-Squares Regression,Two-Stage Least-Squares Regression
covariance of parameters,covariance of parameters,covariance of parameters

You can select the following options for your analysis:

Save New Variables. Allows you to add new variables to your active file. Available options are Predicted and Residuals.

Display covariance of parameters. Allows you to print the covariance matrix of the parameter estimates.

Specifying Options Collapse Hide details

This feature requires the Regression option.

From the menus choose:

Analyze
Regression
2-Stage Least Squares…

In the 2-Stage Least Squares dialog box, select Options.

Related Topics

Two-Stage Least-Squares Regression


2SLS Command Additional Features

Two-Stage Least-Squares Regression,Two-Stage Least-Squares Regression,Two-Stage Least-Squares Regression
command additional features,command additional features,command additional features

The command syntax language also allows you to estimate multiple equations simultaneously.

Related Topics

UNIANOVA Command Additional Features
RELIABILITY Command Additional Features
ALSCAL Command Additional Features
MIXED Command Additional Features
HILOGLINEAR Command Additional Features
CSGLM Command Additional Features
CSLOGISTIC Command Additional Features
MVA Command Additional Features
LOGISTIC REGRESSION Command Additional Features
NOMREG Command Additional Features
PROBIT Command Additional Features
NLR Command Additional Features
WLS Command Additional Features
SEASON Command Additional Features
SPECTRA Command Additional Features
2SLS


Introduction to the Statistics Adapter

PASW Collaboration and Deployment Services,PASW Collaboration and Deployment Services,PASW Collaboration and Deployment Services
Statistics Adapter,Statistics Adapter,Statistics Adapter

The Statistics Adapter allows you to manage the life cycle of objects in the context of enterprise applications, tools, and solutions. PASW Statistics supports publishing and sharing of objects through a central repository, where they can be shared among users, shared with other applications, and tracked using versioning.

Example. A group of managers in an organization must run standardized quarterly reports, using command syntax that is maintained by an analyst. Each quarter the managers contact the analyst for the latest copy of the command syntax. With the Statistics Adapter the analyst can store the standardized command syntax in a repository and modify it as needed. The managers can then retrieve the latest version of the command syntax directly from the repository.

This feature requires the Statistics Adapter option. You must also have access to a repository, which is supplied with PASW Collaboration and Deployment Services.

Related Topics

Connecting to a Repository
Storing an Object to a Repository
Retrieving an Object from a Repository
Publish to Web
Accessing Dialog Boxes to Store or Retrieve Repository Objects
File Specifications for Repository Objects


Connecting to a Repository

logging in to a repository,logging in to a repository,logging in to a repository
connecting to a repository,connecting to a repository,connecting to a repository
repository,repository,repository
login,login,login

The Repository Server dialog box allows you to connect to, and log in to, a repository. This allows you to store objects to, and retrieve objects from, a repository. Any existing repository connection terminates when the new one is established.

This feature requires the Statistics Adapter option.

Connection settings are specific to each site or installation. For specific repository and port information, contact your local system administrator.

Repository. Enter the name or IP address of a repository, or select one from a list of those recently used. You can connect to only one repository at a time.

Port. Port used to host the connection, typically 8080 by default.

Set Credentials. Specifies whether the user will provide the login credentials (user ID and password). Use this option to login with different credentials from those used to login to the current machine. If unchecked, single sign-on will be used. Single sign-on allows users to connect to a repository without explicitly providing a user ID and password. The necessary authentication is performed with the user's existing credentials on the current machine--obtained, for example, from Windows Active Directory.

Ensure secure connection. Specifies whether a secure SSL (Secure Sockets Layer) connection should be used. SSL is a commonly used protocol for managing the security of message transmission on the Internet. For information about configuring SSL, refer to Configuring SSL for PASW Collaboration and Deployment Services.

To Connect to a Repository Collapse Hide details

To Connect to a Repository

From the menus choose:

File
Repository
Connect...

Specify a repository and port.

Related Topics

Configuring SSL for PASW Collaboration and Deployment Services
Introduction to the Statistics Adapter
Storing an Object to a Repository
Retrieving an Object from a Repository
Publish to Web
Accessing Dialog Boxes to Store or Retrieve Repository Objects
File Specifications for Repository Objects
Setting Credentials


Setting Credentials

The Repository Credentials dialog box allows you to specify the user ID and password for logging in to a repository. This is only necessary if you want to login with different credentials from those used to login to the current machine, or if your repository is not configured to use a single sign-on provider (contact your local system administrator for details).

User ID and password. Specify a valid user ID and password for logging in. In many cases, this may be the same password you use to log in to the local network. If necessary, contact your local system administrator for more information. When you paste command syntax from the Repository Credentials dialog, the password in the pasted syntax is encrypted.

Provider. Select the security provider against which to validate the user/password combination.

Remember repository and user ID. Saves configuration information (repository, port) and user ID.

Related Topics

Connecting to a Repository
Configuring SSL for PASW Collaboration and Deployment Services
Storing an Object to a Repository


Configuring SSL for PASW Collaboration and Deployment Services

PASW Collaboration and Deployment Services,PASW Collaboration and Deployment Services,PASW Collaboration and Deployment Services
SSL,SSL,SSL
SSL,SSL,SSL
PASW Collaboration and Deployment Services,PASW Collaboration and Deployment Services,PASW Collaboration and Deployment Services

If you are using SSL to communicate with PASW Collaboration and Deployment Services, you may need to complete the following steps. These steps are required only if the PASW Collaboration and Deployment Services server is using a self-signed certificate. If the server is using a certificate from a certificate authority, these steps are not required.

Obtain the self-signed certificate for the server. Contact your PASW Collaboration and Deployment Services administrator if you don't know how to obtain this file.

Open a command prompt and change directories to the following location, where <product install dir> is the directory in which you installed the product:

<product install dir>/jre/bin

Enter the following command:

keytool -import -alias <alias name> -file <path to cert> -keystore <path to key store>

Where <alias name> is an arbitrary alias for the certificate, <path to cert> is the full path to the certificate, and <path to key store> is the full path to the Java keystore, which may be <product install dir>/lib/security/jssecacerts or <product install dir>/lib/security/cacerts.

When prompted, enter the keystore password, which is changeit by default.

When prompted about trusting the certificate, enter yes.

Related Topics

Connecting to a Repository
Setting Credentials
Storing an Object to a Repository


Storing an Object to a Repository

repository,repository,repository
storing objects,storing objects,storing objects
syntax,syntax,syntax
storing to a repository,storing to a repository,storing to a repository
output,output,output
storing to a repository,storing to a repository,storing to a repository
model file,model file,model file
storing XML model files to a repository,storing XML model files to a repository,storing XML model files to a repository
XML,XML,XML
storing to a repository,storing to a repository,storing to a repository
data files,data files,data files
storing PASW Statistics data files to a repository,storing PASW Statistics data files to a repository,storing PASW Statistics data files to a repository
chart templates,chart templates,chart templates
storing to a repository,storing to a repository,storing to a repository
plan file,plan file,plan file
storing to a repository,storing to a repository,storing to a repository
scripts,scripts,scripts
storing to a repository,storing to a repository,storing to a repository

Access to the dialog for storing to a repository is available from most Save As dialogs as well as from the Repository submenu on the File menu. See the topic Accessing Dialog Boxes to Store or Retrieve Repository Objects for more information.

This feature requires the Statistics Adapter option.

From the Repository Store dialog box:

On the Location tab, select the folder where you want to store the object. (To create a new folder, click the icon in the upper right corner.) If you're storing a new object, you must have permission to write to the folder.

Enter a filename. The file will be stored with the name as it appears in the File name field—extensions, such as .sps and .spv, are neither added nor removed.

Click Store when done.

Note: Storing to a repository is completely independent from saving to the file system using Save As.

Optionally, you can:

• Specify general information to store with the object, such as the author, a version label, and keywords to associate with the object.

• Associate the file with one or more topics in the repository. Topics have a hierarchical structure and allow you to organize file by subject matter.

• Specify security settings for the object.

Note: When you add a version to an object, all previous versions will still be available.

Related Topics

Introduction to the Statistics Adapter
Connecting to a Repository
Retrieving an Object from a Repository
Publish to Web
Accessing Dialog Boxes to Store or Retrieve Repository Objects
File Specifications for Repository Objects
Specifying General Information
Associating Objects with Topics
Specifying Security Settings
Setting Credentials
Configuring SSL for PASW Collaboration and Deployment Services


Specifying General Information

The Information tab allows you to specify information that describes an object and is stored with the object in the repository.

Author. Author of the object. If omitted, the user's login name is used.

Version Label. A version label, or set of labels, is used to easily identify a version, for example, "production" or "development". Specify one or more items from the available list, if desired. You can add a new label by clicking Add. Two versions of an object cannot have any of the same labels. If you specify a label associated with a previous version, it will be removed from the previous version and associated with the one you're storing.

Description. Description of the object. The specified value replaces any existing description for the object.

Keywords. One or more keywords to aid in searching. Multiple keywords should be separated by semicolons. Blank spaces at the beginning and end of each keyword are ignored, but blank spaces within keywords are honored. The specified keywords replace any existing ones for the object.

Expiration. This setting provides a mechanism to make sure dated information is not displayed after a certain date. Expired documents are not deleted but are automatically removed to a special category where they can be accessed only by the site administrator, who can delete, archive, or republish them. The specified date is the last day that the document is active.

Related Topics

Storing an Object to a Repository
Associating Objects with Topics
Specifying Security Settings


Associating Objects with Topics

The Topics tab allows you to associate the current object with existing topics in the current repository. Topics have a hierarchical structure and allow you to organize files by subject matter.

To associate the current object with a topic:

Click Add.

Select a topic from the tree displayed in the Add Topic dialog box.

Click OK in the Add Topic dialog box.

The specified topics replace any existing ones for the object.

Related Topics

Storing an Object to a Repository
Specifying General Information
Specifying Security Settings


Specifying Security Settings

The Security tab allows you to specify security settings for the current object.

To add access for a group or individual:

Click Add.

Enter the name of a user or group in the Find text box and click Search. To display all users and groups, click Search without specifying anything in the Find text box.

Select a user or group from the search results and click OK in the Select User or Group dialog box.

To modify permissions:

Select a user or group and click Modify.

Select the desired permissions and click OK in the Security Modify Permissions dialog box.

Related Topics

Storing an Object to a Repository
Specifying General Information
Associating Objects with Topics


Retrieving an Object from a Repository

repository,repository,repository
retrieving objects,retrieving objects,retrieving objects
syntax,syntax,syntax
retrieving from a repository,retrieving from a repository,retrieving from a repository
output,output,output
retrieving from a repository,retrieving from a repository,retrieving from a repository
model file,model file,model file
retrieving XML model files from a repository,retrieving XML model files from a repository,retrieving XML model files from a repository
XML,XML,XML
retrieving from a repository,retrieving from a repository,retrieving from a repository
data files,data files,data files
retrieving PASW Statistics data files from a repository,retrieving PASW Statistics data files from a repository,retrieving PASW Statistics data files from a repository
chart templates,chart templates,chart templates
retrieving from a repository,retrieving from a repository,retrieving from a repository
plan file,plan file,plan file
retrieving from a repository,retrieving from a repository,retrieving from a repository
scripts,scripts,scripts
retrieving from a repository,retrieving from a repository,retrieving from a repository

Access to the dialog box for retrieving repository objects is available from most Open file dialog boxes as well as from the Repository submenu on the File menu. See the topic Accessing Dialog Boxes to Store or Retrieve Repository Objects for more information.

This feature requires the Statistics Adapter option.

On the Folders tab, browse folders as needed to select the object you want to retrieve. Object names are displayed exactly as stored--extensions, such as .sps and .spv, are neither added nor removed from the stored name. By default, the latest version will be retrieved. Optionally, click Version to select a version other than the latest. Double-clicking an object retrieves the latest version.

Click Retrieve when done.

Note: Once an object has been retrieved, you can modify it and store an updated version to the repositorysimply by selecting File>Save or clicking the Save icon on the toolbar. You may also choose to modify the object and save it to the file system, using Save As, without storing it to the repository. Storing to a repository and saving to the file system are completely independent operations.

Open as locked. Specifies whether the object is locked when retrieved. Locking an object prevents other users from modifying it while you are working with it. Other users can retrieve locked objects but they cannot store them. The lock is released when the object is closed (for instance, closing a dataset containing a retrieved data file) or when the current session ends.

Description. Displays the description, if any, for the currently selected object.

Keywords. Displays any keywords associated with the currently selected object.

Version. Unique version identifier, generated based on the time when the version was stored. If the version has a set of labels, they are displayed instead of a time stamp.

Related Topics

Introduction to the Statistics Adapter
Connecting to a Repository
Storing an Object to a Repository
Publish to Web
Accessing Dialog Boxes to Store or Retrieve Repository Objects
File Specifications for Repository Objects
Selecting a Version of a Repository Object
Searching for Repository Objects


Selecting a Version of a Repository Object

The Select Version dialog box provides detailed information for all versions of an object, allowing you to choose the one you want.

Select a version by clicking on the appropriate row. To sort the list by version, label, size, date, or owner, double-click on the header for the appropriate column. Double-clicking a row selects the associated version and returns you to the Retrieve dialog box.

Click Continue when done to return to the Retrieve dialog box.

Related Topics

Retrieving an Object from a Repository
Searching for Repository Objects


Searching for Repository Objects

You can search for objects by name, type, version, date range, or other criteria such as keywords, or data dictionary information (for PASW Statistics data files) such as variable names or value labels.

From the Repository Retrieve dialog box:

Click the Search tab.

Select the type of search (Search all fields or Restrict search) and specify search terms, such as the name of the object or the author.

Specify whether to restrict the search to objects that match all search terms (Must contain ALL of the terms), or whether results will include objects matching any of the specified terms (Contains ANY of the terms).

Click Search.

Select one or more of the search results in the right pane and click Retrieve.

Note: If the Retrieve dialog was accessed from a statistical procedure (rather than a File Open dialog), only a single result can be selected.

Optionally, you can:

• Click Paste to paste the command syntax required to open the files(s).

Specifying Search Criteria Collapse Hide details

Specifying Search Criteria

Search all fields. Searches the repository for objects that match some or all of the specified terms, depending on which of Contains ANY of the terms or Must contain ALL of the terms is selected. All fields such as Author, Label, and Keywords are included in the search (see Restrict search below for a listing of fields). For command syntax (.sps) files, the search includes the content of the files. For PASW Statistics data files, the search includes variable names, variable labels, value labels, and names and values of custom variable attributes. Specifying an asterisk (*) will return all objects.

Restrict search. Used to limit the search to a specified set of fields; for instance, Author and Title. The results of the search include objects that match some or all of the specified fields, depending on which of Contains ANY of the terms or Must contain ALL of the terms is selected.

• Object Types. Used to restrict the set of file types included in a search. Check the file types to be included in the search.

• Title. Used to search by name.

• Label. Used to search by version label. The Label drop-down list includes all version labels in the repository. The label LATEST is always available and refers to the most recent version of an object. Multiple labels may be selected.

• Dates. Used to restrict the search to repository objects last modified within a specified date range. The three range choices are: On or Before, On or After, and Between. Selecting Between enables a second date field, and the resulting search includes the start and end dates of the range.

• Author. Used to search by the login name of the author.

• Keywords. Used to search by one or more of the keywords specified when an object was stored to the repository. You can specify multiple search terms, although each term is treated separately (see Notes section). For multi-word keywords, a match occurs if at least one of the words is specified as a search term (in the Keywords text box). For example, specifying "churn", "analysis", or "churn analysis", will match objects with the keyword "churn analysis".

• Indexed Content. Used to search the dictionary of PASW Statistics data (.sav) files. The search includes variable names, variable labels, value labels, and names and values of custom variable attributes. You can specify multiple search terms, although each term is treated separately (see Notes section).

• Description. Used to search by the description provided when an object was stored to the repository. You can specify multiple search terms, although each term is treated separately (see Notes section).

Contains ANY of the terms. Specifies that the search returns objects that match any of the specified terms. For example, selecting Restrict search and specifying Author = "Fred" and Keywords = "credit" searches for objects with either "Fred" as the author or "credit" as one of the keywords.

Must contain ALL of the terms. Specifies that the search only returns objects that match all of the specified terms. For example, selecting Restrict search and specifying Title = "credit_risk_analysis" and Label = "production" returns objects named "credit_risk_analysis" that have a label of "production".

Notes Collapse Hide details

Notes

• All searches are case-insensitive.

• Matching of an exact phrase is not supported. Each specified search term is treated separately. For example, specifying "churn testbed" in the Search all fields text box and with Must contain ALL of the terms selected, returns objects that match both "churn" and "testbed", irrespective of whether the matches occur in the same field.

• In addition to the specified search terms, the search will match objects that contain the roots of those terms. For example, the search term 'fishing' will match 'fish', 'fisher', and 'fished', in addition to 'fishing'. This functionality is only provided for English.

Terms Not Included in a Search Collapse Hide details

Terms Not Included in a Search

Stopwords are excluded from searches. The words in the following list are not indexed. As a result, the system ignores them when searching for items. Currently, you cannot modify the terms in this list.

Stopwords: Terms not included in a search
a | all | am | an
and | any | are | as
at | be | but | by
can | could | did | do
does | etc | for | from
goes | got | had | has
have | he | her | him
his | how | if | in
is | it | let | me
more | much | must | my
nor | not | now | of
off | on | or | our
own | see | set | shall
she | should | so | some
than | that | the | them
then | there | these | this
those | though | to | too
us | was | way | we
what | when | where | which
who | why | will | would
yes | yet | you |

Related Topics

Retrieving an Object from a Repository
Selecting a Version of a Repository Object


Publish to Web

publishing output,publishing output,publishing output
Web,Web,Web
publishing output to,publishing output to,publishing output to
exporting output,exporting output,exporting output
publishing to Web,publishing to Web,publishing to Web
saving output,saving output,saving output
publishing to Web,publishing to Web,publishing to Web
saving output,saving output,saving output
exporting output,exporting output,exporting output
Web,Web,Web
exporting charts,exporting charts,exporting charts
publishing to Web,publishing to Web,publishing to Web
saving charts,saving charts,saving charts
publishing to Web,publishing to Web,publishing to Web
exporting charts,exporting charts,exporting charts
saving charts,saving charts,saving charts
HTML,HTML,HTML
publishing output to Web,publishing output to Web,publishing output to Web
HTML,HTML,HTML
output,output,output
publishing to Web,publishing to Web,publishing to Web
pivot tables,pivot tables,pivot tables
publishing to Web,publishing to Web,publishing to Web
pivot tables,pivot tables,pivot tables
output,output,output

Publish to Web exports output in PASW Statistics Web Reports format for publishing to a repository. Tables and reports published to a repository can be viewed and manipulated over the Web, in real time, using a standard browser.

• Pivot tables are published as XML which is rendered as a table when accessed over the Web.

• Charts are published as XML which is rendered as an image when accessed over the Web.

• Trees are published as PNG graphic files.

• Text output is published as preformatted HTML. (By default, most Web browsers use a fixed-pitch font for preformatted text.)

Content to Publish. You can export all objects in the Viewer, all visible objects, or only selected objects.

Publish Pivot Tables As

• Interactive. Tables are dynamic objects that can be manipulated over the Web to obtain different views of the data. For example, a table containing sales data broken down by region and industry could be pivoted to transpose or nest the data in rows and columns, or "sliced" into layers so values for only one region or industry are visible at a time. Rather than simply view the static results of an analysis, Web users are empowered to manipulate the data and draw their own conclusions.

• Static. Tables are static and cannot be manipulated after publishing.

Note: Support for viewing PASW Statistics Web Reports over the Web requires release 3.5 or higher of PASW Collaboration and Deployment Services.

Related Topics

Introduction to the Statistics Adapter
Connecting to a Repository
Storing an Object to a Repository
Retrieving an Object from a Repository
Accessing Dialog Boxes to Store or Retrieve Repository Objects
File Specifications for Repository Objects
To Publish Output to the Web
Tips for Publishing Output to the Web
Export Output
HTML Options
Word/RTF Options
Excel Options
Saving Output


To Publish Output to the Web

This feature requires the Statistics Adapter option.

Make the Viewer the active window (click anywhere in the window).

From the menus choose:

File
Repository
Publish to Web…

If there is no current connection to a repository, the Repository Server dialog box opens. Once a connection has been established, you can proceed with publishing.

Specify whether you want to publish all objects, visible objects, or selected objects only.

Specify whether pivot tables are published as interactive or static tables.

Click OK to launch the Repository Store dialog box to specify the target location for the published document and document-specific information, such as security settings and any topics to associate with the document. See the topic Storing an Object to a Repository for more information.

Related Topics

Publish to Web
Tips for Publishing Output to the Web


Tips for Publishing Output to the Web

publishing output,publishing output,publishing output
Web,Web,Web
publishing output to,publishing output to,publishing output to
exporting output,exporting output,exporting output
publishing to Web,publishing to Web,publishing to Web
saving output,saving output,saving output
publishing to Web,publishing to Web,publishing to Web
saving output,saving output,saving output
exporting output,exporting output,exporting output
Web,Web,Web
HTML,HTML,HTML
publishing output to Web,publishing output to Web,publishing output to Web
HTML,HTML,HTML
output,output,output
publishing to Web,publishing to Web,publishing to Web
pivot tables,pivot tables,pivot tables
publishing to Web,publishing to Web,publishing to Web
pivot tables,pivot tables,pivot tables
output,output,output

When publishing output to the Web, be aware of the following guidelines:

• Web-ready content. Reports intended for paper delivery may not be suitable for the Web. For example, long documents with multiple tables are difficult to view because they require users to scroll the window; they also slow performance. For best results, avoid publishing documents with more than 10 tables, and follow general Web publishing guidelines.

• Large tables. Publishing large tables (with tens of thousands of cells) generally takes some time, and may slow performance for other users during the time that the document is being published. Once published, viewing of large tables should be relatively faster.

• Formatting. For best results, you may want to format your results for publication. For example, you may want to edit headings in the outline, and hide or delete titles and other elements to avoid cluttering the published report.

Related Topics

Publish to Web
To Publish Output to the Web


Accessing Dialog Boxes to Store or Retrieve Repository Objects

repository,repository,repository
accessing store and retrieve dialog boxes,accessing store and retrieve dialog boxes,accessing store and retrieve dialog boxes

Access from Open or Save As Dialogs

• Access to the dialog boxes used for storing to, and retrieving from, a repository is available from most Open and Save As dialog boxes. These include the dialog boxes accessed from File>Save As and File>Open, as well as those accessed from procedure dialog boxes and used to store or retrieve, for example, XML model files or plan files for complex samples analyses.

This feature requires the Statistics Adapter option.

For example, to store the contents of the currently selected Viewer window to a repository, from the Viewer window choose:

File
Save As...

In the Save As dialog box, select Store File To Repository—a choice that is available in each dialog box that supports storing to a repository. This opens a Repository Store dialog box. See the topic Storing an Object to a Repository for more information.

Or, for example, to retrieve a command syntax file from a repository, from the menus choose:

File
Open
Syntax...

In the Open dialog box, select Retrieve File From Repository—a choice that is available in each dialog box that supports retrieval from a repository. This opens a Repository Retrieve dialog box. See the topic Retrieving an Object from a Repository for more information.

If there is no current connection to a repository, the Repository Server dialog box opens, allowing you to establish a connection.

Access from the File Menu

The Repository submenu enables you to store or retrieve data, output, and syntax files, as well as providing the ability to store or retrieve generic files to or from a repository.

This feature requires the Statistics Adapter option.

Store from PASW Statistics. Store the contents of the currently selected window (Data Editor, Viewer, or Syntax Editor) to a repository.

Publish to Web. Store the contents of the currently selected Viewer window to a repository so that the content can be viewed and manipulated over the Web, in real time, using a standard browser. Note: Support for viewing PASW Statistics Web Reports over the Web requires release 3.5 or higher of PASW Collaboration and Deployment Services.

Add a File. Store a file from the local file system to a repository. This choice is intended for file types that are not saved through Save As dialogs within the product--for example, script files (e.g. files of type .sbs, .wwd, or .py).

Retrieve to PASW Statistics. Retrieve a file from a repository and open it within PASW Statistics. This option is only available for PASW Statistics data files, output files, and syntax files.

Download a File. Retrieve a file from a repository and store it to the local file system. This choice is intended for file types that are not accessed through Open dialogs within the product--for example, script files (e.g. files of type .sbs, .wwd or .py).

If there is no current connection to a repository, the Repository Server dialog box opens after selecting one of the above choices. Once a connection has been established, you can proceed with the desired action.

Notes

• When saving PASW Statistics data files to a repository, choices made on the Save Data As Variables dialog box (accessed from Variables on the Save Data As dialog box) will be honored when saving to the repository.

• Saving a dataset to a repository from the Save Data As dialog always saves the data in PASW Statistics data file format, regardless of the selected format.

Related Topics

Introduction to the Statistics Adapter
Connecting to a Repository
Storing an Object to a Repository
Retrieving an Object from a Repository
Publish to Web
File Specifications for Repository Objects


Building Tables

tables,tables,tables
Custom Tables,Custom Tables,Custom Tables
Custom Tables,Custom Tables,Custom Tables
categorical variables,categorical variables,categorical variables
scale variables,scale variables,scale variables
multiple response sets,multiple response sets,multiple response sets
changing measurement level,changing measurement level,changing measurement level
value labels for categorical variables,value labels for categorical variables,value labels for categorical variables
measurement level,measurement level,measurement level
changing in custom tables,changing in custom tables,changing in custom tables

You select the variables and summary measures that will appear in your tables on the Table tab in the table builder.

Variable list. The variables in the data file are displayed in the top left pane of the window. Custom Tables distinguishes between two different measurement levels for variables and handles them differently depending on the measurement level:

Categorical. Data with a limited number of distinct values or categories (for example, gender or religion). Categorical variables can be string (alphanumeric) or numeric variables that use numeric codes to represent categories (for example, 0 = male and 1 = female). Also referred to as qualitative data. Categorical variables can be either nominal or ordinal:

• Nominal. A variable can be treated as nominal when its values represent categories with no intrinsic ranking (for example, the department of the company in which an employee works). Examples of nominal variables include region, zip code, and religious affiliation.

• Ordinal. A variable can be treated as ordinal when its values represent categories with some intrinsic ranking (for example, levels of service satisfaction from highly dissatisfied to highly satisfied). Examples of ordinal variables include attitude scores representing degree of satisfaction or confidence and preference rating scores.

Scale. Data measured on an interval or ratio scale, where the data values indicate both the order of values and the distance between values. For example, a salary of $72,195 is higher than a salary of $52,398, and the distance between the two values is $19,797. Also referred to as quantitative or continuous data.

Categorical variables define categories (row, columns, and layers) in the table, and the default summary statistic is the count (number of cases in each category). For example, a default table of a categorical gender variable would simply display the number of males and the number of females.

Scale variables are typically summarized within categories of categorical variables, and the default summary statistic is the mean. For example, a default table of income within gender categories would display the mean income for males and the mean income for females.

You can also summarize scale variables by themselves, without using a categorical variable to define groups. This is primarily useful for stacking summaries of multiple scale variables. See the topic Stacking Variables for more information.

Multiple Response Sets

Custom Tables also supports a special kind of "variable" called a multiple response set. Multiple response sets are not really variables in the normal sense. You cannot see them in the Data Editor, and other procedures do not recognize them. Multiple response sets use multiple variables to record responses to questions where the respondent can give more than one answer. Multiple response sets are treated like categorical variables, and most of the things you can do with categorical variables, you can also do with multiple response sets. See the topic Multiple Response Sets for more information.

An icon next to each variable in the variable list identifies the variable type.

Measurement Level | Data Type
 | Numeric | String | Date | Time
Scale (Continuous) |  | n/a |  |
Ordinal |  |  |  |
Nominal |  |  |  |
Multiple response set, multiple categories
Multiple response set, multiple dichotomies

You can change the measurement level of a variable in the table builder by right-clicking the variable in the variable list and selecting Categorical or Scale from the pop-up context menu. You can permanently change a variable's measurement level in the Variable View of the Data Editor. Variables defined as nominal or ordinal are treated as categorical by Custom Tables. See the topic Variable Measurement Level for more information.

Categories. When you select a categorical variable in the variable list, the defined categories for the variable are displayed in the Categories list. These categories will also be displayed on the canvas pane when you use the variable in a table. If the variable has no defined categories, the Categories list and the canvas pane will display two placeholder categories: Category 1 and Category 2.

The defined categories displayed in the table builder are based on value labels, descriptive labels assigned to different data values (for example, numeric values of 0 and 1, with value labels of male and female). You can define value labels in Variable View of the Data Editor or with Define Variable Properties on the Data menu in the Data Editor window.

Canvas pane. You build a table by dragging and dropping variables onto the rows and columns of the canvas pane. The canvas pane displays a preview of the table that will be created. The canvas pane does not show actual data values in the cells, but it should provide a fairly accurate view of the layout of the final table. For categorical variables, the actual table may contain more categories than the preview if the data file contains unique values for which no value labels have been defined.

• Normal view displays all of the rows and columns that will be included in the table, including rows and/or columns for summary statistics and categories of categorical variables.

• Compact view shows only the variables that will be in the table, without a preview of the rows and columns that the table will contain.

Basic Rules and Limitations for Building a Table

• For categorical variables, summary statistics are based on the innermost variable in the statistics source dimension.

• The default statistics source dimension (row or column) for categorical variables is based on the order in which you drag and drop variables into the canvas pane. For example, if you drag a variable to the rows tray first, the row dimension is the default statistics source dimension.

• Scale variables can be summarized only within categories of the innermost variable in either the row or column dimension. (You can position the scale variable at any level of the table, but it is summarized at the innermost level.)

• Scale variables cannot be summarized within other scale variables. You can stack summaries of multiple scale variables or summarize scale variables within categories of categorical variables. You cannot nest one scale variable within another or put one scale variable in the row dimension and another scale variable in the column dimension.

• If any variable in the active dataset contains more than 12,000 defined value labels, you cannot use the table builder to create tables. See the topic Define Variable Sets for more information. If you don't need to include variables that exceed this limitation in your tables, you can define and apply variable sets that exclude those variables. If you need to include any variables with more than 12,000 defined values labels, you can use CTABLES command syntax to generate the tables. See the topic CTABLES for more information.

The Table tab in the table builder provides a great deal of control over the layout and contents of your tables, including:

• Stacking

• Nesting

• Layers

• Summary statistics

• Category order

• Totals and subtotals

Related Topics

To Build a Table
Nesting Variables
Custom Tables: Options Tab
Custom Tables: Titles Tab
Custom Tables: Test Statistics Tab
Stacking Variables
Layers
Showing and Hiding Variable Names and/or Labels
Summary Statistics
Categories and Totals
Computed Categories
Tables of Variables with Shared Categories (Comperimeter Tables)
Customizing the Table Builder
CTABLES


To Build a Table

Custom Tables,Custom Tables,Custom Tables
how to build a table,how to build a table,how to build a table

This feature requires the Custom Tables option.

From the menus, choose:

Analyze
Tables
Custom Tables...

Drag and drop one or more variables to the row and/or column areas of the canvas pane.

Click OK to create the table.

To delete a variable from the canvas pane in the table builder:

Select (click) the variable on the canvas pane.

Drag the variable anywhere outside the canvas pane, or press the Delete key.

To change the measurement level of a variable:

Right-click the variable in the variable list (you can do this only in the variable list, not on the canvas).

Select Categorical or Scale from the pop-up context menu.

Related Topics

Building Tables
Nesting Variables
Custom Tables: Options Tab
Custom Tables: Titles Tab
Custom Tables: Test Statistics Tab
Stacking Variables
Layers
Showing and Hiding Variable Names and/or Labels
Summary Statistics
Categories and Totals
Computed Categories
Tables of Variables with Shared Categories (Comperimeter Tables)
Customizing the Table Builder


Stacking Variables

Stacking can be thought of as taking separate tables and pasting them together into the same display. For example, you could display information on Gender and Age category in separate sections of the same table.

To Stack Variables

In the variable list, select all of the variables you want to stack, then drag and drop them together into the rows or columns of the canvas pane.

or

Drag and drop variables separately, dropping each variable either above or below existing variables in the rows or to the right or left of existing variables in the columns.

Stacked variables

See the topic Stacking Categorical Variables for more information.

Related Topics

Building Tables
To Build a Table
Nesting Variables
Layers
Showing and Hiding Variable Names and/or Labels
Summary Statistics
Categories and Totals
Computed Categories
Tables of Variables with Shared Categories (Comperimeter Tables)
Customizing the Table Builder


Nesting Variables

Nesting, like crosstabulation, can show the relationship between two categorical variables, except that one variable is nested within the other in the same dimension. For example, you could nest Gender within Age category in the row dimension, showing the number of males and females in each age category.

You can also nest a scale variable within a categorical variable. For example, you could nest Income within Gender, showing separate mean (or median or other summary measure) income values for males and females.

To Nest Variables

Drag and drop a categorical variable into the row or column area of the canvas pane.

Drag and drop a categorical or scale variable to the left or right of the categorical row variable or above or below the categorical column variable.

Nested categorical variables
Scale variable nested within a categorical variable

Note: Technically, the preceding table is an example of a categorical variable nested within a scale variable, but the resulting information conveyed in the table is essentially the same as nesting the scale variable within the categorical variable, without redundant labels for the scale variable. (Try it the other way around, and you will understand.)

See the topic Nesting Categorical Variables for more information.

Related Topics

Building Tables
To Build a Table
Custom Tables: Options Tab
Custom Tables: Titles Tab
Custom Tables: Test Statistics Tab
Stacking Variables
Layers
Showing and Hiding Variable Names and/or Labels
Summary Statistics
Categories and Totals
Computed Categories
Tables of Variables with Shared Categories (Comperimeter Tables)
Customizing the Table Builder


Layers

You can use layers to add a dimension of depth to your tables, creating three-dimensional "cubes." Layers are similar to nesting or stacking; the primary difference is that only one layer category is visible at a time. For example, using Age category as the row variable and Gender as a layer variable produces a table in which information for males and females is displayed in different layers of the table.

To Create Layers

Click Layers on the Table tab in the table builder to display the Layers list.

Drag and drop the scale or categorical variable(s) that will define the layers into the Layers list.

Layered variables

You cannot mix scale and categorical variables in the Layers list. All variables must be of the same type. Multiple response sets are treated as categorical for the Layers list. Scale variables in the layers are always stacked.

If you have multiple categorical layer variables, layers can be stacked or nested.

• Show each category as a layer is equivalent to stacking. A separate layer will be displayed for each category of each layer variable. The total number of layers is simply the sum of the number of categories for each layer variable. For example, if you have three layer variables, each with three categories, the table will have nine layers.

• Show each combination of categories as a layer is equivalent to nesting or crosstabulating layers. The total number of layers is the product of the number of categories for each layer variable. For example, if you have three variables, each with three categories, the table will have 27 layers.

Related Topics

Building Tables
To Build a Table
Stacking Variables
Nesting Variables
Showing and Hiding Variable Names and/or Labels
Summary Statistics
Categories and Totals
Computed Categories
Tables of Variables with Shared Categories (Comperimeter Tables)
Customizing the Table Builder


Showing and Hiding Variable Names and/or Labels

Custom Tables,Custom Tables,Custom Tables
showing and hiding variable names and labels,showing and hiding variable names and labels,showing and hiding variable names and labels
variable labels,variable labels,variable labels
suppressing display in custom tables,suppressing display in custom tables,suppressing display in custom tables

The following options are available for the display of variable names and labels:

• Show only variable labels. For any variables without defined variable labels, the variable name is displayed. This is the default setting.

• Show only variable names.

• Show both variable labels and variable names.

• Don't show variable names or variable labels. Although the column/row that contains the variable label or name will still be displayed in the table preview on the canvas pane, this column/row will not be displayed in the actual table.

To show or hide variable labels or variable names:

Right-click the variable in the table preview on the canvas pane.

Select Show Variable Label or Show Variable Name from the pop-up context menu to toggle the display of labels or names on or off. A check mark next to the selection indicates that it will be displayed.

Related Topics

Building Tables
To Build a Table
Stacking Variables
Nesting Variables
Layers
Summary Statistics
Categories and Totals
Computed Categories
Tables of Variables with Shared Categories (Comperimeter Tables)
Customizing the Table Builder


Summary Statistics

Custom Tables,Custom Tables,Custom Tables
display formats,display formats,display formats
controlling number of decimals displayed,controlling number of decimals displayed,controlling number of decimals displayed
decimal places,decimal places,decimal places
controlling number of decimals displayed in custom tables,controlling number of decimals displayed in custom tables,controlling number of decimals displayed in custom tables

This feature requires the Custom Tables option.

The Summary Statistics dialog box allows you to:

• Add and remove summary statistics from a table.

• Change the labels for the statistics.

• Change the order of the statistics.

• Change the format of the statistics, including the number of decimal positions.

The summary statistics (and other options) available here depend on the measurement level of the summary statistics source variable, as displayed at the top of the dialog box. The source of summary statistics (the variable on which the summary statistics are based) is determined by:

• Measurement level. If a table (or a table section in a stacked table) contains a scale variable, summary statistics are based on the scale variable.

• Variable selection order. The default statistics source dimension (row or column) for categorical variables is based on the order in which you drag and drop variables onto the canvas pane. For example, if you drag a variable to the rows area first, the row dimension is the default statistics source dimension.

• Nesting. For categorical variables, summary statistics are based on the innermost variable in the statistics source dimension.

A stacked table may have multiple summary statistics source variables (both scale and categorical), but each table section has only one summary statistics source.

To Change the Summary Statistics Source Dimension

Select the dimension (rows, columns, or layers) from the Source drop-down list in the Summary Statistics group of the Table tab.

To Control the Summary Statistics Displayed in a Table

Select (click) the summary statistics source variable on the canvas pane of the Table tab.

In the Define group of the Table tab, click Summary Statistics.

or

Right-click the summary statistics source variable on the canvas pane and select Summary Statistics from the pop-up context menu.

Select the summary statistics you want to include in the table. You can use the arrow to move selected statistics from the Statistics list to the Display list, or you can drag and drop selected statistics from the Statistics list into the Display list.

Click the up or down arrows to change the display position of the currently selected summary statistic.

Select a display format from the Format drop-down list for the selected summary statistic.

Enter the number of decimals to display in the Decimals cell for the selected summary statistic.

Click Apply to Selection to include the selected summary statistics for the currently selected variables on the canvas pane.

Click Apply to All to include the selected summary statistics for all stacked variables of the same type on the canvas pane.

Note: Apply to All differs from Apply to Selection only for stacked variables of the same type already on the canvas pane. In both cases, the selected summary statistics are automatically included for any additional stacked variables of the same type that you add to the table.

For information on available summary statistics, see:

Summary Statistics for Categorical Variables

Summary Statistics for Scale Variables and Categorical Custom Totals

Related Topics

Building Tables
To Build a Table
Stacking Variables
Nesting Variables
Layers
Showing and Hiding Variable Names and/or Labels
Categories and Totals
Computed Categories
Tables of Variables with Shared Categories (Comperimeter Tables)
Customizing the Table Builder
Summary Statistics for Categorical Variables
Percentage Base
Summary Statistics for Multiple Response Sets
Summary Statistics for Scale Variables and Categorical Custom Totals
Custom Total Summary Statistics for Categorical Variables
Summary Statistics Display Formats


Summary Statistics for Categorical Variables

Custom Tables,Custom Tables,Custom Tables
summary statistics,summary statistics,summary statistics
percentages,percentages,percentages
percentages,percentages,percentages
in custom tables,in custom tables,in custom tables

The basic statistics available for categorical variables are counts and percentages. You can also specify custom summary statistics for totals and subtotals. These custom summary statistics include measures of central tendency (such as mean and median) and dispersion (such as standard deviation) that may be suitable for some ordinal categorical variables. See the topic Custom Total Summary Statistics for Categorical Variables for more information.

Count. Number of cases in each cell of the table or number of responses for multiple response sets.

Unweighted Count. Unweighted number of cases in each cell of the table. This only differs from count if weighting is in effect.

Column percentages. Percentages within each column. The percentages in each column of a subtable (for simple percentages) sum to 100%. Column percentages are typically useful only if you have a categorical row variable.

Row percentages. Percentages within each row. The percentages in each row of a subtable (for simple percentages) sum to 100%. Row percentages are typically useful only if you have a categorical column variable.

Layer Row and Layer Column percentages. Row or column percentages (for simple percentages) sum to 100% across all subtables in a nested table. If the table contains layers, row or column percentages sum to 100% across all nested subtables in each layer.

Layer percentages. Percentages within each layer. For simple percentages, cell percentages within the currently visible layer sum to 100%. If you do not have any layer variables, this is equivalent to table percentages.

Table percentages. Percentages for each cell are based on the entire table. All cell percentages are based on the same total number of cases and sum to 100% (for simple percentages) over the entire table.

Subtable percentages. Percentages in each cell are based on the subtable. All cell percentages in the subtable are based the same total number of cases and sum to 100% within the subtable. In nested tables, the variable that precedes the innermost nesting level defines subtables. For example, in a table of Marital status within Gender within Age category, Gender defines subtables.

Percentages are affected by the base (denominator) used to calculate them, and there are a number of options for determining the base. See the topic Percentage Base for more information.

Multiple response sets can have percentages based on cases, responses, or counts. See the topic Summary Statistics for Multiple Response Sets for more information.

Stacked Tables

For percentage calculations, each table section defined by a stacking variable is treated as a separate table. Layer Row, Layer Column, and Table percentages sum to 100% (for simple percentages) within each stacked table section. The percentage base for different percentage calculations is based on the cases in each stacked table section.

Related Topics

Summary Statistics
Percentage Base
Summary Statistics for Multiple Response Sets
Summary Statistics for Scale Variables and Categorical Custom Totals
Custom Total Summary Statistics for Categorical Variables
Summary Statistics Display Formats


Percentage Base

Custom Tables,Custom Tables,Custom Tables
summary statistics,summary statistics,summary statistics
percentages,percentages,percentages
percentages,percentages,percentages
in custom tables,in custom tables,in custom tables

Percentages can be calculated in three different ways, determined by the treatment of missing values in the computational base:

Simple percentage. Percentages are based on the number of cases used in the table and always sum to 100%. If a category is excluded from the table, cases in that category are excluded from the base. Cases with system-missing values are always excluded from the base. Cases with user-missing values are excluded if user-missing categories are excluded from the table (the default) or included if user-missing categories are included in the table. Any percentage that does not have Valid N or Total N in its name is a simple percentage.

Total N percentage. Cases with system-missing and user-missing values are added to the Simple percentage base. Percentages may sum to less than 100%.

Valid N percentage. Cases with user-missing values are removed from the Simple percentage base even if user-missing categories are included in the table.

Note: Cases in manually excluded categories other than user-missing categories are always excluded from the base.

Multiple response sets can have percentages based on responses or counts. See the topic Summary Statistics for Multiple Response Sets for more information.

Related Topics

Summary Statistics
Summary Statistics for Categorical Variables
Summary Statistics for Multiple Response Sets
Summary Statistics for Scale Variables and Categorical Custom Totals
Custom Total Summary Statistics for Categorical Variables
Summary Statistics Display Formats


Summary Statistics for Multiple Response Sets

multiple response sets,multiple response sets,multiple response sets
percentages,percentages,percentages
Custom Tables,Custom Tables,Custom Tables
percentages for multiple response sets,percentages for multiple response sets,percentages for multiple response sets
percentages,percentages,percentages
multiple response sets,multiple response sets,multiple response sets

The following additional summary statistics are available for multiple response sets.

Col/Row/Layer Responses %. Percentage based on responses.

Col/Row/Layer Responses % (Base: Count). Responses are the numerator and total count is the denominator.

Col/Row/Layer Count % (Base: Responses). Count is the numerator and total responses are the denominator.

Layer Col/Row Responses %. Percentage across subtables. Percentage based on responses.

Layer Col/Row Responses % (Base: Count). Percentages across subtables. Responses are the numerator and total count is the denominator.

Layer Col/RowResponses % (Base: Responses). Percentages across subtables. Count is the numerator and total responses is the denominator.

Responses. Count of responses.

Subtable/Table Responses %. Percentage based on responses.

Subtable/Table Responses % (Base: Count). Responses are the numerator and total count is the denominator.

Subtable/Table Count % (Base: Responses). Count is the numerator and total responses are the denominator.

Related Topics

Summary Statistics
Summary Statistics for Categorical Variables
Percentage Base
Summary Statistics for Scale Variables and Categorical Custom Totals
Custom Total Summary Statistics for Categorical Variables
Summary Statistics Display Formats


Summary Statistics for Scale Variables and Categorical Custom Totals

Custom Tables,Custom Tables,Custom Tables
summary statistics,summary statistics,summary statistics
mean,mean,mean
Custom Tables,Custom Tables,Custom Tables
median,median,median
Custom Tables,Custom Tables,Custom Tables
mode,mode,mode
Custom Tables,Custom Tables,Custom Tables
standard deviation,standard deviation,standard deviation
Custom Tables,Custom Tables,Custom Tables
variance,variance,variance
Custom Tables,Custom Tables,Custom Tables
sum,sum,sum
Custom Tables,Custom Tables,Custom Tables
range,range,range
Custom Tables,Custom Tables,Custom Tables
minimum,minimum,minimum
Custom Tables,Custom Tables,Custom Tables
maximum,maximum,maximum
Custom Tables,Custom Tables,Custom Tables
valid N,valid N,valid N
Custom Tables,Custom Tables,Custom Tables

In addition to the counts and percentages available for categorical variables, the following summary statistics are available for scale variables and as custom total and subtotal summaries for categorical variables. These summary statistics are not available for multiple response sets or string (alphanumeric) variables.

Mean. Arithmetic average; the sum divided by the number of cases.

Median. Value above and below which half of the cases fall; the 50th percentile.

Mode. Most frequent value. If there is a tie, the smallest value is shown.

Minimum. Smallest (lowest) value.

Maximum. Largest (highest) value.

Missing. Count of missing values (both user- and system-missing).

Percentile. You can include the 5th, 25th, 75th, 95th, and/or 99th percentiles.

Range. Difference between maximum and minimum values.

Standard error of the mean. A measure of how much the value of the mean may vary from sample to sample taken from the same distribution. It can be used to roughly compare the observed mean to a hypothesized value (that is, you can conclude that the two values are different if the ratio of the difference to the standard error is less than –2 or greater than +2).

Standard deviation. A measure of dispersion around the mean. In a normal distribution, 68% of the cases fall within one standard deviation of the mean and 95% of the cases fall within two standard deviations. For example, if the mean age is 45, with a standard deviation of 10, 95% of the cases would be between 25 and 65 in a normal distribution (the square root of the variance).

Sum. Sum of the values.

Sum percentage. Percentages based on sums. Available for rows and columns (within subtables), entire rows and columns (across subtables), layers, subtables, and entire tables.

Total N. Count of non-missing, user-missing, and system-missing values. Does not include cases in manually excluded categories other than user-missing categories.

Valid N. Count of non-missing values. Does not include cases in manually excluded categories other than user-missing categories.

Variance. A measure of dispersion around the mean, equal to the sum of squared deviations from the mean divided by one less than the number of cases. The variance is measured in units that are the square of those of the variable itself (the square of the standard deviation).

For categorical variables, the table must include totals or subtotals to display custom summary statistics. See the topic Custom Total Summary Statistics for Categorical Variables for more information.

Stacked Tables

Each table section defined by a stacking variable is treated as a separate table, and summary statistics are calculated accordingly.

Related Topics

Summary Statistics
Summary Statistics for Categorical Variables
Percentage Base
Summary Statistics for Multiple Response Sets
Custom Total Summary Statistics for Categorical Variables
Summary Statistics Display Formats


Custom Total Summary Statistics for Categorical Variables

Custom Tables,Custom Tables,Custom Tables
custom totals,custom totals,custom totals
changing summary statistics dimension,changing summary statistics dimension,changing summary statistics dimension
mean-frequency tables,mean-frequency tables,mean-frequency tables
mean-frequency tables,mean-frequency tables,mean-frequency tables

For tables of categorical variables that contain totals or subtotals, you can have different summary statistics than the summaries displayed for each category. For example, you could display counts and column percentages for an ordinal categorical row variable and display the median for the "total" statistic.

To create a table for a categorical variable with a custom total summary statistic:

From the menus, choose:

Analyze
Tables
Custom Tables...

The table builder will open.

Drag and drop a categorical variable into the Rows or Columns area of the canvas.

Right-click on the variable on the canvas and select Categories and Totals from the pop-up context menu.

Click (check) the Total check box, and then click Apply.

Right-click the variable again on the canvas and select Summary Statistics from the pop-up context menu.

Click (check) Custom Summary Statistics for Totals and Subtotals, and then select the custom summary statistics you want.

By default, all summary statistics, including custom summaries, are displayed in the opposite dimension from the dimension containing the categorical variable. For example, if you have a categorical row variable, summary statistics define columns in the table, as in:

Default position of summary statistics

To display summary statistics in the same dimension as the categorical variable:

On the Table tab in the table builder, in the Summary Statistics group, select the dimension from the Position drop-down list.

For example, if the categorical variable is displayed in the rows, select Rows from the drop-down list.

Categorical variable and summary statistics in the same dimension

Related Topics

Summary Statistics
Summary Statistics for Categorical Variables
Percentage Base
Summary Statistics for Multiple Response Sets
Summary Statistics for Scale Variables and Categorical Custom Totals
Summary Statistics Display Formats


Summary Statistics Display Formats

Custom Tables,Custom Tables,Custom Tables
summary statistics display formats,summary statistics display formats,summary statistics display formats
display formats,display formats,display formats
summary statistics in custom tables,summary statistics in custom tables,summary statistics in custom tables

The following display format options are available:

nnnn. Simple numeric.

nnnn%. Percentage sign appended to end of value.

Auto. Defined variable display format, including number of decimals. See the topic To Display or Define Variable Attributes for more information.

N=nnnn. Displays N= before the value. This can be useful for counts, valid N, and total N in tables where the summary statistics labels are not displayed.

(nnnn). All values enclosed in parentheses.

(nnnn)(neg. value). Only negative values enclosed in parentheses.

(nnnn%). All values enclosed in parentheses and a percentage sign appended to end of values.

n,nnn.n. Comma format. Comma used as grouping separator and period used as decimal indicator regardless of locale settings.

n.nnn,n. Dot format. Period used as grouping separator and comma used as decimal indicator regardless of locale settings.

$n,nnn.n. Dollar format. Dollar sign displayed in front of value; comma used as grouping separator and period used as decimal indicator regardless of locale settings.

CCA, CCB, CCC, CCD, CCE. Custom currency formats. The current defined format for each custom currency is displayed in the list. These formats are defined on the Currency tab in the Options dialog box (Edit menu, Options).

General Rules and Limitations

• With the exception of Auto, the number of decimals is determined by the Decimals column setting.

• With the exception of the comma, dollar, and dot formats, the decimal indicator used is the one defined for the current locale in your Windows Regional Options control panel.

• Although comma/dollar and dot will display either a comma or period respectively as the grouping separator, there is no display format available at creation time to display a grouping separator based on the current locale settings (defined in the Windows Regional Options control panel).

Related Topics

Summary Statistics
Summary Statistics for Categorical Variables
Percentage Base
Summary Statistics for Multiple Response Sets
Summary Statistics for Scale Variables and Categorical Custom Totals
Custom Total Summary Statistics for Categorical Variables


Categories and Totals

Custom Tables,Custom Tables,Custom Tables
totals,totals,totals
subtotals,subtotals,subtotals
excluding categories,excluding categories,excluding categories
reordering categories,reordering categories,reordering categories
computed categories,computed categories,computed categories
totals,totals,totals
Custom Tables,Custom Tables,Custom Tables
subtotals,subtotals,subtotals
Custom Tables,Custom Tables,Custom Tables
excluding categories,excluding categories,excluding categories
Custom Tables,Custom Tables,Custom Tables
deleting categories,deleting categories,deleting categories
Custom Tables,Custom Tables,Custom Tables
reordering categories,reordering categories,reordering categories
Custom Tables,Custom Tables,Custom Tables

The Categories and Totals dialog box allows you to:

• Reorder and exclude categories.

• Insert subtotals and totals.

• Insert computed categories.

• Include or exclude empty categories.

• Include or exclude categories defined as containing missing values.

• Include or exclude categories that do not have defined value labels.

• This dialog box is available only for categorical variables and multiple response sets. It is not available for scale variables.

• For multiple selected variables with different categories, you cannot insert subtotals, insert computed categories, exclude categories, or manually reorder categories. This occurs only if you select multiple variables in the canvas preview and access this dialog box for all selected variables simultaneously. You can still perform these actions for each variable separately.

• For variables with no defined value labels, you can only sort categories and insert totals.

To Access the Categories and Totals Dialog Box

This feature requires the Custom Tables option.

Open the table builder (Analyze menu, Tables, Custom Tables).

Drag and drop a categorical variable or multiple response set onto the canvas pane.

Right-click the variable on the canvas pane, and select Categories and Totals from the pop-up context menu.

or

Select (click) the variable on the canvas pane, and then click Categories and Totals in the Define group on the Table tab.

You can also select multiple categorical variables in the same dimension on the canvas pane:

Ctrl-click each variable on the canvas pane.

or

Click outside the table preview on the canvas pane, and then click and drag to select the area that includes the variables you want to select.

or

Right-click any variable in a dimension and select Select All [dimension] Variables to select all of the variables in that dimension.

To Reorder Categories

To manually reorder categories:

Select (click) a category in the list.

Click the up or down arrow to move the category up or down in the list.

or

Click in the Value(s) column for the category, and drag and drop it in a different position.

To Exclude Categories

Select (click) a category in the list.

Click the arrow next to the Exclude list.

or

Click in the Value(s) column for the category and drag and drop it anywhere outside the list.

If you exclude any categories, any categories without defined value labels will also be excluded.

To Sort Categories

You can sort categories by data value, value label, cell count, or summary statistic in ascending or descending order.

In the Sort Categories group, click the By drop-down list and select the sort criterion you want to use: value, label, count, or summary statistic (such as mean, median, or mode). The available summary statistics for sorting depends on the summary statistics you have selected to display in the table.

Click the Order drop-down list to select the sort order (ascending or descending).

Sorting categories is not available if you have excluded any categories.

Subtotals

Select (click) the category in the list that is the last category in the range of categories that you want to include in the subtotal.

Click Add Subtotal....

In the Define Subtotal dialog box, modify the subtotal label text if desired.

To show only a subtotal and suppress the display of the categories that define the subtotal, select Hide subtotaled categories from the table.

Click Continue to add the subtotal.

Totals

Click the Total check box. You can also modify the total label text.

If the selected variable is nested within another variable, totals will be inserted for each subtable.

Display Position for Totals and Subtotals

Totals and subtotals can be displayed above or below the categories included in each total.

• If Below is selected in the Totals and Subtotals Appear group, totals appear above each subtable, and all categories above and including the selected category (but below any preceding subtotals) are included in each subtotal.

• If Above is selected in the Totals and Subtotals Appear group, totals appear below each subtable, and all categories below and including the selected category (but above any preceding subtotals) are included in each subtotal.

Important: You should select the display position for subtotals before defining any subtotals. Changing the display position affects all subtotals (not just the currently selected subtotal), and it also changes the categories included in the subtotals.

Computed Categories

You can display categories computed from summary statistics, totals, subtotals, and/or constants. See the topic Computed Categories for more information.

Custom Total and Subtotal Summary Statistics

You can display statistics other than "totals" in the Totals and Subtotals areas of the table using the Summary Statistics dialog box. See the topic Summary Statistics for Categorical Variables for more information.

Note: If you select multiple custom total statistics that are also in the body of the table and you hide the statistics labels, then the totals are resorted into the same order as in the body of the table—and since the labels aren't displayed, you may not know what each total statistic actually represents. In general, selecting multiple statistics and hiding the statistics labels is probably not a good idea.

Totals, Subtotals, and Excluded Categories

Cases from excluded categories are not included in the calculation of totals.

Missing Values, Empty Categories, and Values without Value Labels

Missing values. This controls the display of user-missing values, or values defined as containing missing values (for example, a code of 99 to represent "not applicable" for pregnancy in males). By default, user-missing values are excluded. Select (check) this option to include user-missing categories in tables. Although the variable may contain more than one missing value category, the table preview on the canvas will display only one generic missing value category. All defined user-missing categories will be included in the table. System-missing values(empty cells for numeric variables in the Data Editor) are always excluded.

Empty categories. Empty categories are categories with defined value labels but no cases in that category for a particular table or subtable. By default, empty categories are included in tables. Deselect (uncheck) this option to exclude missing categories from the table.

Other values found when data are scanned. By default, category values in the data file that do not have defined value labels are automatically included in tables. Deselect (uncheck) this option to exclude values without defined value labels from the table. If you exclude any categories with defined value labels, categories without defined value labels are also excluded.

Related Topics

Building Tables
To Build a Table
Stacking Variables
Nesting Variables
Layers
Showing and Hiding Variable Names and/or Labels
Summary Statistics
Computed Categories
Tables of Variables with Shared Categories (Comperimeter Tables)
Customizing the Table Builder


Computed Categories

post-computed categories,post-computed categories,post-computed categories
Custom Tables,Custom Tables,Custom Tables
computed categories,computed categories,computed categories
Custom Tables,Custom Tables,Custom Tables
Custom Tables,Custom Tables,Custom Tables
computed categories,computed categories,computed categories
post-computed categories,post-computed categories,post-computed categories

In addition to displaying the aggregated results of summary statistics, a table can display one or more categories computed from these aggregated results, from constant values, from subtotals and totals, or a combination of them. The results are known as computed categories or postcomputes. A computed category acts like a category in a single variable with the following similarities and differences:

• A computed category is positioned like the other categories.

• A computed category operates on the same statistics as the other categories.

• Computed categories do not affect subtotals, totals, or significance tests.

• By default, the values of computed categories use the same formatting for summary statistics as the other categories. You can override the format when defining the computed category.

Because computed categories can be used to total aggregated results, they can be similar to subtotals. However, computed categories have the following advantages over subtotals:

• Computed categories can be calculated from the results of other subtotals.

• Computed categories can overlap with each other, operating on the same (or some of the same) categories.

• Computed categories do not have to include values from all other categories above or below the computed category. That is, computed categories are not exhaustive.

• Computed categories can include values from categories that are not adjacent.

Unlike totals and subtotals, computed categories are calculated from the aggregated data rather than the original data. Therefore, the values of computed categories may not match the results of totals and subtotals. Also, because you have the option to hide source categories when defining the computed category, it may be difficult to interpret subtotals in the resulting table. If you use computed categories, it is recommended that you specify custom labels for subtotals.

To Define a Computed Category

Computed categories are added from the Categories and Totals dialog box. For information about accessing that dialog box, see the topic Categories and Totals.

In the Categories and Totals dialog box, click Add Category...

In Label for Computed Category, specify a label for the computed category. You can drag categories from the Categories list to include labels for those categories.

Build an expression by selecting categories and/or totals and subtotals and using operators to define the computed categories. You can also type constant values (e.g., 500) to include in the expression.

To show only a computed category and suppress the display of the categories that define the computed category, select Hide categories used in expression from table.

Click the Display Formats tab to change the display format and number of decimal places for the computed category. See the topic Display Formats for Computed Categories for more information.

Click Continue to add the computed category.

Related Topics

Display Formats for Computed Categories
To Build a Table
Stacking Variables
Nesting Variables
Layers
Showing and Hiding Variable Names and/or Labels
Summary Statistics
Categories and Totals
Tables of Variables with Shared Categories (Comperimeter Tables)
Customizing the Table Builder


Display Formats for Computed Categories

computed categories,computed categories,computed categories
display formats,display formats,display formats

By default, a computed category uses the same display format and number of decimal places as the other categories in the variable. You can override these on the Display Formats tab in the Computed Category dialog box. The Display Formats tab lists the current summary statistics on which the computed category operates in addition to the display formats and number of decimal places for those statistics.

For each summary statistic, you can:

Select a display format from the Format drop-down list for the summary statistic. For a full list of display formats, see the topic Summary Statistics Display Formats.

Enter the number of decimals to display in the Decimals cell for the selected summary statistic.

Related Topics

Computed Categories


Tables of Variables with Shared Categories (Comperimeter Tables)

comperimeter tables,comperimeter tables,comperimeter tables
Custom Tables,Custom Tables,Custom Tables
tables of variables with shared categories,tables of variables with shared categories,tables of variables with shared categories
comperimeter tables,comperimeter tables,comperimeter tables
table of frequencies,table of frequencies,table of frequencies
table of frequencies,table of frequencies,table of frequencies
Custom Tables,Custom Tables,Custom Tables

Surveys often contain many questions with a common set of possible responses. You can use stacking to display these related variables in the same table, and you can display the shared response categories in the columns of the table.

To Create a Table for Multiple Variables with Shared Categories

Open the Table tab of the table builder (Analyze menu, Tables, Custom Tables).

Drag and drop the categorical variables from the variable list into the Rows area of the canvas. The variables should be stacked. See the topic Stacking Variables for more information.

From the Category Position drop-down list, select Row labels in columns.

Stacked variables with shared response categories in columns

See the topic Tables for Variables with Shared Categories for more information.

Related Topics

Building Tables
To Build a Table
Stacking Variables
Nesting Variables
Layers
Showing and Hiding Variable Names and/or Labels
Summary Statistics
Categories and Totals
Computed Categories
Customizing the Table Builder


Customizing the Table Builder

Unlike standard dialog boxes, you can change the size of the table builder in the same way that you can change the size of any standard window:

Click and drag the top, bottom, either side, or any corner of the table builder to decrease or increase its size.

On the Table tab, you can also change the size of the variable list, the Categories list, and the canvas pane.

Click and drag the horizontal bar between the variable list and the Categories list to make the lists longer or shorter. Moving it down makes the variable list longer and the Categories list shorter. Moving it up does the reverse.

Click and drag the vertical bar between the variable list and Categories list from the canvas pane to make the lists wider or narrower. The canvas automatically resizes to fit the remaining space.

Related Topics

Building Tables
To Build a Table
Stacking Variables
Nesting Variables
Layers
Showing and Hiding Variable Names and/or Labels
Summary Statistics
Categories and Totals
Computed Categories
Tables of Variables with Shared Categories (Comperimeter Tables)


Custom Tables: Options Tab

Custom Tables,Custom Tables,Custom Tables
empty cells,empty cells,empty cells
missing values exclusion for scale summaries,missing values exclusion for scale summaries,missing values exclusion for scale summaries
column width,column width,column width
multiple category sets,multiple category sets,multiple category sets
multiple response sets,multiple response sets,multiple response sets
duplicate responses in multiple category sets,duplicate responses in multiple category sets,duplicate responses in multiple category sets
empty cells,empty cells,empty cells
displayed value in custom tables,displayed value in custom tables,displayed value in custom tables
column width,column width,column width
controlling in custom tables,controlling in custom tables,controlling in custom tables

This feature requires the Custom Tables option.

The Options tab allows you to:

• Specify what is displayed in empty cells and cells for which statistics cannot be computed.

• Control how missing values are handled in the computation of scale variable statistics.

• Set minimum and/or maximum data column widths.

• Control the treatment of duplicate responses in multiple category sets.

To access the Options tab of the Custom Tables dialog box:

From the menus, choose:

Analyze
Tables
Custom Tables...

Click the Options tab.

Data Cell Appearance. Controls what is displayed in empty cells and cells for which statistics cannot be computed.

• Empty cells. For table cells that contain no cases (cell count of 0), you can select one of three display options: zero, blank, or a text value that you specify. The text value can be up to 255 characters long.

• Statistics that cannot be computed. Text displayed if a statistic cannot be computed (for example, the mean for a category with no cases). The text value can be up to 255 characters long. The default value is a period (.).

Width for Data Columns. Controls minimum and maximum column width for data columns. This setting does not affect columns widths for row labels.

• TableLook settings. Uses the data column width specification from the current default TableLook. You can create your own custom default TableLook to use when new tables are created, and you can control both row label column and data column widths with a TableLook.

• Custom. Overrides the default TableLook settings for data column width. Specify the minimum and maximum data column widths for the table and the measurement unit: points, inches, or centimeters.

Missing Values for Scale Variables. For tables with two or more scale variables, controls the handling of missing data for scale variable statistics.

• Maximize use of available data (variable-by-variable deletion). All cases with valid values for each scale variable are included in summary statistics for that scale variable.

• Use consistent case base across scale variables (listwise deletion). Cases with missing values for any scale variables in the table are excluded from the summary statistics for all scale variables in the table.

Count duplicate responses for multiple category sets. A duplicate response is the same response for two or more variables in the multiple category set. By default, duplicate responses are not counted, but this may be a perfectly valid condition that you do want to include in the count (such as a multiple category set representing the manufacturer of the last three cars purchased by a survey respondent).

Related Topics

Building Tables
To Build a Table
Nesting Variables
Custom Tables: Titles Tab
Custom Tables: Test Statistics Tab


Custom Tables: Titles Tab

Custom Tables,Custom Tables,Custom Tables
titles,titles,titles
captions,captions,captions
corner labels,corner labels,corner labels
titles,titles,titles
Custom Tables,Custom Tables,Custom Tables
captions,captions,captions
Custom Tables,Custom Tables,Custom Tables
corner labels,corner labels,corner labels
Custom Tables,Custom Tables,Custom Tables
date,date,date
including current date in custom tables,including current date in custom tables,including current date in custom tables
time,time,time
including current time in custom tables,including current time in custom tables,including current time in custom tables

This feature requires the Custom Tables option.

The Titles tab controls the display of titles, captions, and corner labels.

To access the Titles tab of the Custom Tables dialog box:

From the menus, choose:

Analyze
Tables
Custom Tables...

Click the Titles tab.

Title. Text that is displayed above the table.

Caption. Text that is displayed below the table and above any footnotes.

Corner. Text that is displayed in the upper left corner of the table. Corner text is displayed only if the table contains row variables and if the pivot table row dimension label property is set to Nested. This is not the default TableLook setting.

See the topic TableLooks for more information.

You can include the following automatically generated values in the table title, caption, or corner label:

Date. Current year, month, and day displayed in a format based on your current Windows Regional Options settings.

Time. Current hour, minute, and second displayed in a format based on your current Windows Regional Options settings.

Table Expression. Variables used in the table and how they are used in the table. If a variable has a defined variable label, the label is displayed. In the generated table, the following symbols indicate how variables are used in the table:

• + indicates stacked variables.

• > indicates nesting.

• BY indicates crosstabulation or layers.

Related Topics

Building Tables
To Build a Table
Nesting Variables
Custom Tables: Options Tab
Custom Tables: Test Statistics Tab


Custom Tables: Test Statistics Tab

Custom Tables,Custom Tables,Custom Tables
test statistics,test statistics,test statistics
test statistics,test statistics,test statistics
Custom Tables,Custom Tables,Custom Tables
significance tests,significance tests,significance tests
Custom Tables,Custom Tables,Custom Tables

This feature requires the Custom Tables option.

The Test Statistics tab allows you to request various significance tests for your custom tables, including:

• Chi-square tests of independence.

• Tests of the equality of column means.

• Tests of the equality of column proportions.

• Significance tests for multiple response sets and subtotals.

These tests are not available for tables in which category labels are moved out of their default table dimension.

To access the Test Statistics tab of the Custom Tables dialog box:

From the menus, choose:

Analyze
Tables
Custom Tables...

Click the Test Statistics tab.

Compare column means (t-tests). This option produces pairwise tests of the equality of column means for tables in which at least one category variable exists in the columns and at least one scale variable exists in the rows. You can select whether the p values of the tests are adjusted using the Bonferroni method. You can also specify the alpha level of the test, which should be a value greater than 0 and less than 1. Finally, while the variance for the means test is always based on just the categories compared for multiple response tests, for ordinary categorical variables it can be estimated from just the categories compared or all categories.

Compare column proportions (z-tests). This option produces pairwise tests of the equality of column proportions for tables in which at least one category variable exists in both the columns and rows. You can select whether the p values of the tests are adjusted using the Bonferroni method. You can also specify the alpha level of the test, which should be a value greater than 0 and less than 1.

Identify Significant Differences. If you select Compare column means or Compare column proportions, you can choose how to indicate significant differences.

• In a separate table. Significance tests results are displayed in a separate table. If two values are significantly different, the cell corresponding to the larger value displays a key identifying the column of the smaller value. Following is an example.

Comparisons of column proportions in a separate table

• In the main table using APA-style subscripts. The main table itself identifies significant differences with APA-style formatting using subscript letters. If two values are significantly different, those values display different subscript letters. These subscripts are not footnotes. When this option is in effect, the defined footnote style in the current TableLook is overridden and footnotes are displayed as superscript numbers. Following is an example.

Comparisons of column proportions using APA-style subscripts

For the full example that demonstrates how to create and interpret these tables, see Comparing Column Proportions.

Tests of independence (chi-square). This option produces a chi-square test of independence for tables in which at least one category variable exists in both the rows and columns. You can also specify the alpha level of the test, which should be a value greater than 0 and less than 1.

Use subtotals in place of subtotaled categories. If selected, then each subtotal replaces its categories for significance testing. Otherwise, only subtotals for which the subtotaled categories are hidden replace their categories for testing.

Include multiple response variables. If selected, tests are performed using categories of multiple response sets. Otherwise multiple response sets are ignored when performing tests.

Related Topics

Building Tables
To Build a Table
Nesting Variables
Custom Tables: Options Tab
Custom Tables: Titles Tab


Simple Tables for Categorical Variables

Most tables you want to create will probably include at least one categorical variable. A categorical variable is one with a limited number of distinct values or categories (for example, gender or religion). Categorical variables can be either nominal or ordinal.

• Nominal. A variable can be treated as nominal when its values represent categories with no intrinsic ranking (for example, the department of the company in which an employee works). Examples of nominal variables include region, zip code, and religious affiliation.

• Ordinal. A variable can be treated as ordinal when its values represent categories with some intrinsic ranking (for example, levels of service satisfaction from highly dissatisfied to highly satisfied). Examples of ordinal variables include attitude scores representing degree of satisfaction or confidence and preference rating scores.

An icon next to each variable in the variable list identifies the variable type.

Measurement Level | Data Type
 | Numeric | String | Date | Time
Scale (Continuous) |  | n/a |  |
Ordinal |  |  |  |
Nominal |  |  |  |

Custom Tables is optimized for use with categorical variables that have defined value labels. See the topic Building Tables for more information.

Sample Data File

The examples in this section use the data file survey_sample.sav. See the topic Sample Files for more information.

All examples provided here display variable labels in dialog boxes, sorted in alphabetical order. Variable list display properties are set on the General tab in the Options dialog box (Edit menu, Options).

Related Topics

A Single Categorical Variable
Percentages
Totals
Crosstabulation
Percentages in Crosstabulations
Marginal Totals
Sorting and Excluding Categories


A Single Categorical Variable

Custom Tables,Custom Tables,Custom Tables
simple tables for categorical variables,simple tables for categorical variables,simple tables for categorical variables
hiding statistics labels,hiding statistics labels,hiding statistics labels
hiding statistics labels in custom tables,hiding statistics labels in custom tables,hiding statistics labels in custom tables

This example uses the data file survey_sample.sav. See the topic Sample Files for more information.

Although a table of a single categorical variable may be one of the simplest tables you can create, it may often be all you want or need.

From the menus, choose:

Analyze
Tables
Custom Tables...

In the table builder, drag and drop Age category from the variable list to the Rows area on the canvas pane.

A preview of the table is displayed on the canvas pane. The preview doesn't display actual data values; it displays only placeholders where data will be displayed.

Expand Show details Collapse Hide details
Single categorical variable in rows in table builder canvas preview

Click OK to create the table.

The table is displayed in the Viewer window.

Single categorical variable in rows

In this simple table, the column heading Count isn't really necessary, and you can create the table without this column heading.

Open the table builder again (Analyze menu, Tables, Custom Tables).

In the Summary Statistics group, select (click) Hide for Position.

Click OK to create the table.

Single categorical variable without summary statistics column label

Related Topics

Simple Tables for Categorical Variables
Percentages
Totals
Crosstabulation
Percentages in Crosstabulations
Marginal Totals
Sorting and Excluding Categories


Percentages

percentages,percentages,percentages
in custom tables,in custom tables,in custom tables
Custom Tables,Custom Tables,Custom Tables
percentages,percentages,percentages
row vs. column percentages,row vs. column percentages,row vs. column percentages
changing labels for summary statistics,changing labels for summary statistics,changing labels for summary statistics

In addition to counts, you can also display percentages. For a simple table of a single categorical variable, if the variable is displayed in rows, you probably want to look at column percentages. Conversely, for a variable displayed in columns, you probably want to look at row percentages.

Open the table builder again (Analyze menu, Tables, Custom Tables).

In the Summary Statistics group, deselect (uncheck) Hide for Position. Since this table will have two columns, you want to display the column labels so you know what each column represents.

Right-click Age category on the canvas pane and select Summary Statistics from the pop-up context menu.

Expand Show details Collapse Hide details
Right-click context menu on canvas pane

In the Summary Statistics dialog box, select Column N % in the Statistics list and click the arrow to add it to the Display list.

In the Label cell in the Display list, delete the default label and type Percent.

Expand Show details Collapse Hide details
Summary Statistics Categorical Variables dialog box

Click Apply to Selection and then click OK in the table builder to create the table.

Counts and column percentages

Related Topics

Simple Tables for Categorical Variables
A Single Categorical Variable
Totals
Crosstabulation
Percentages in Crosstabulations
Marginal Totals
Sorting and Excluding Categories


Totals

Custom Tables,Custom Tables,Custom Tables
totals,totals,totals
totals,totals,totals
Custom Tables,Custom Tables,Custom Tables

Totals are not automatically included in custom tables, but it's easy to add totals to a table.

Open the table builder again (Analyze menu, Tables, Custom Tables).

Right-click Age category on the canvas pane and select Categories and Totals from the pop-up context menu.

Select (click) Total in the Categories and Totals dialog box.

Expand Show details Collapse Hide details
Categories and Totals dialog box

Click Apply and then click OK in the table builder to create the table.

Counts, column percentages, and totals

See the topic Totals and Subtotals for Categorical Variables for more information.

Related Topics

Simple Tables for Categorical Variables
A Single Categorical Variable
Percentages
Crosstabulation
Percentages in Crosstabulations
Marginal Totals
Sorting and Excluding Categories


Crosstabulation

Custom Tables,Custom Tables,Custom Tables
crosstabulation,crosstabulation,crosstabulation
crosstabulation,crosstabulation,crosstabulation
Custom Tables,Custom Tables,Custom Tables

Crosstabulation is a basic technique for examining the relationship between two categorical variables. For example, using Age category as a row variable and Gender as a column variable, you can create a two-dimensional crosstabulation that shows the number of males and females in each age category.

Open the table builder (Analyze menu, Tables, Custom Tables).

Click Reset to delete any previous selections in the table builder.

In the table builder, drag and drop Age category from the variable list to the Rows area on the canvas pane.

Drag and drop Gender from the variable list to the Columns area on the canvas pane. (You may have to scroll down through the variable list to find this variable.)

Expand Show details Collapse Hide details
Crosstabulation in table builder canvas preview

Click OK to create the table.

Crosstabulation of Age category and Gender

Related Topics

Simple Tables for Categorical Variables
A Single Categorical Variable
Percentages
Totals
Percentages in Crosstabulations
Marginal Totals
Sorting and Excluding Categories


Percentages in Crosstabulations

Custom Tables,Custom Tables,Custom Tables
percentages,percentages,percentages
statistics source dimension,statistics source dimension,statistics source dimension
percentages,percentages,percentages
in custom tables,in custom tables,in custom tables

In a two-dimensional crosstabulation, both row and column percentages may provide useful information.

Open the table builder again (Analyze menu, Tables, Custom Tables).

Right-click Gender on the canvas pane.

You may notice that Summary Statistics is disabled in the pop-up context menu. This is because you can select summary statistics only for the innermost variable in the statistics source dimension. The default statistics source dimension (row or column) for categorical variables is based on the order in which you drag and drop variables onto the canvas pane. In this example, we dragged Age category to the rows dimension first--and since there aren't any other variables in the rows dimension, Age category is the statistics source variable. You can change the statistics source dimension, but in this example, you don't need to do that. See the topic Summary Statistics for more information.

Right-click Age category on the canvas pane and select Summary Statistics from the pop-up context menu.

In the Summary Statistics dialog box, select Column N % in the Statistics list and click the arrow to add it to the Display list.

Select Row N % in the Statistics list and click the arrow to add it to the Display list.

Click Apply to Selection and then click OK in the table builder to create the table.

Crosstabulation with row and column percentages

Related Topics

Simple Tables for Categorical Variables
A Single Categorical Variable
Percentages
Totals
Crosstabulation
Marginal Totals
Sorting and Excluding Categories


Controlling Display Format

display formats,display formats,display formats
controlling number of decimals displayed,controlling number of decimals displayed,controlling number of decimals displayed
decimal places,decimal places,decimal places
controlling number of decimals displayed in custom tables,controlling number of decimals displayed in custom tables,controlling number of decimals displayed in custom tables

You can control the display format, including the number of decimals displayed in summary statistics. For example, by default, percentages are displayed with one decimal and a percent sign. But what if you want the cell values to show two decimals and no percent sign?

Open the table builder (Analyze menu, Tables, Custom Tables).

Right-click Age category on the canvas pane and select Summary Statistics from the pop-up context menu.

For the two selected percentage summary statistics (Column N % and Row N %), select nnnn.n from the Format drop-down list and type 2 in the Decimals cell for both of them.

Expand Show details Collapse Hide details
Summary Statistics dialog box

Click OK to create the table.

Formatted cell display for row and column percentages


Marginal Totals

totals,totals,totals
marginal totals for custom tables,marginal totals for custom tables,marginal totals for custom tables
Custom Tables,Custom Tables,Custom Tables
marginal totals,marginal totals,marginal totals

It's fairly common in crosstabulations to display marginal totals--totals for each row and column. Since these aren't included in Custom Tables by default, you need to explicitly add them to your tables.

Open the table builder (Analyze menu, Tables, Custom Tables).

Click Reset to delete any previous selections in the table builder.

In the table builder, drag and drop Age category from the variable list to the Rows area on the canvas pane.

Drag and drop Gender from the variable list to the Columns area on the canvas pane. (You may have to scroll down through the variable list to find this variable.)

Right-click Age category on the canvas pane and select Categories and Totals from the pop-up context menu.

Select (click) Total in the Categories and Totals dialog box and then click Apply.

Right-click Gender on the canvas pane and select Categories and Totals from the pop-up context menu.

Select (click) Total in the Categories and Totals dialog box and then click Apply.

In the Summary Statistics group, select (click) Hide for Position. (Since you're displaying only counts, you don't need to identify the "statistic" displayed in the data cells of the table.)

Click OK to create the table.

Crosstabulation with marginal totals

Related Topics

Simple Tables for Categorical Variables
A Single Categorical Variable
Percentages
Totals
Crosstabulation
Percentages in Crosstabulations
Sorting and Excluding Categories


Sorting and Excluding Categories

sorting categories,sorting categories,sorting categories
Custom Tables,Custom Tables,Custom Tables
excluding categories,excluding categories,excluding categories
Custom Tables,Custom Tables,Custom Tables
omitting categories,omitting categories,omitting categories
Custom Tables,Custom Tables,Custom Tables
deleting categories,deleting categories,deleting categories
Custom Tables,Custom Tables,Custom Tables
Custom Tables,Custom Tables,Custom Tables
sorting categories,sorting categories,sorting categories
excluding categories,excluding categories,excluding categories
totals in tables with excluded categories,totals in tables with excluded categories,totals in tables with excluded categories

This example uses the data file survey_sample.sav. See the topic Sample Files for more information.

By default, categories are displayed in the ascending order of the data values that the category value labels represent. For example, although value labels of Less than 25, 25 to 34, 35 to 44, ..., etc., are displayed for age categories, the actual underlying data values are 1, 2, 3, ..., etc., and it is those underlying data values that control the default display order of the categories.

You can easily change the order of the categories and also exclude categories that you don't want to be displayed in the table.

Sorting Categories

You can manually rearrange categories or sort categories in ascending or descending order of:

• Data values.

• Value labels.

• Cell counts.

• Summary statistics. The available summary statistics for sorting depends on the summary statistics you have selected to display in the table.

Open the table builder (Analyze menu, Tables, Custom Tables).

If Age category isn't already displayed in the Rows area on the canvas pane, drag and drop it there.

Right-click Age category on the canvas pane and select Categories and Totals from the pop-up context menu.

Both data values and the associated value labels are displayed in the current sort order, which in this case is still ascending order of data values.

Expand Show details Collapse Hide details
Default category order, ascending by data values

In the Sort Categories group, select Descending from the Order drop-down list.

The sort order is now reversed.

Select Labels from the By drop-down list.

The categories are now sorted in descending alphabetical order of the value labels.

Expand Show details Collapse Hide details
Descending alphabetical sort order

Notice that the category labeled Less than 25 is at the top of the list. In alphabetical sorting, letters come after numbers. Since this is the only label that starts with a letter and since the list is sorted in descending (reverse) order, this category sorts to the top of the list.

If you want a particular category to appear at a different location in the list, you can easily move it.

Click the category labeled Less than 25 in the Label list.

Click the down arrow to the right of the list. The category moves down one row in the list.

Keep clicking the down arrow until the category is at the bottom of the list.

Expand Show details Collapse Hide details
Manually arranged categories

Excluding Categories

If there are some categories that you don't want to appear in the table, you can exclude them.

Click the category labeled Less than 25 in the Label list.

Click the arrow key to the left of the Exclude list.

Click the category labeled 65 or older in the Label list.

Click the arrow key to the left of the Exclude list again.

The two categories are moved from the Display list to the Exclude list. If you change your mind, you can easily move them back to the Display list.

Expand Show details Collapse Hide details
Manually excluded categories

Click Apply and then click OK in the table builder to create the table.

Table sorted by descending value label, some categories excluded

Notice that the totals are lower than they were before the two categories were excluded. This is because totals are based on the categories included in the table. Any excluded categories are excluded from the total calculation. See the topic Totals and Subtotals for Categorical Variables for more information.

Related Topics

Simple Tables for Categorical Variables
A Single Categorical Variable
Percentages
Totals
Crosstabulation
Percentages in Crosstabulations
Marginal Totals


Stacking, Nesting, and Layers with Categorical Variables

Stacking, nesting, and layers are all methods for displaying multiple variables in the same table. This section focuses on using these techniques with categorical variables, although they can also be used with scale variables.

Sample Data File

The examples in this section use the data file survey_sample.sav. See the topic Sample Files for more information.

All examples provided here display variable labels in dialog boxes, sorted in alphabetical order. Variable list display properties are set on the General tab in the Options dialog box (Edit menu, Options).

Related Topics

Stacking Categorical Variables
Nesting Categorical Variables
Layers


Stacking Categorical Variables

Custom Tables,Custom Tables,Custom Tables
stacking variables,stacking variables,stacking variables
stacking variables,stacking variables,stacking variables
Custom Tables,Custom Tables,Custom Tables

This example uses the data file survey_sample.sav. See the topic Sample Files for more information.

Stacking can be thought of as taking separate tables and pasting them together into the same display. For example, you could display information on Gender and Age category in separate sections of the same table.

From the menus, choose:

Analyze
Tables
Custom Tables...

In the table builder, drag and drop Gender from the variable list to the Rows area on the canvas pane.

Drag and drop Age category from the variable list to the Rows area below Gender.

The two variable are now stacked in the row dimension.

Expand Show details Collapse Hide details
Stacked categorical variables displayed on the canvas pane

Click OK to create the table.

Table of categorical variables stacked in rows

You can also stack variables in columns in a similar fashion.

Related Topics

Stacking, Nesting, and Layers with Categorical Variables
Nesting Categorical Variables
Layers
Stacking with Crosstabulation


Stacking with Crosstabulation

Custom Tables,Custom Tables,Custom Tables
stacking variables,stacking variables,stacking variables
stacking variables,stacking variables,stacking variables
Custom Tables,Custom Tables,Custom Tables

A stacked table can include other variables in other dimensions. For example, you could crosstabulate two variables stacked in the rows with a third variable displayed in the column dimension.

Open the table builder again (Analyze menu, Tables, Custom Tables).

If Age category and Gender aren't already stacked in the rows, follow the directions above for stacking them.

Drag and drop Get news from internet from the variable list to the Columns area on the canvas pane.

Click OK to create the table.

Two stacked row variables crosstabulated with a column variable

Note: There are several variables with labels that start with Get news from ..., so it may be difficult to distinguish between them in the variable list (since the labels may be too wide to be displayed completely in the variable list). There are two ways to see the entire variable label:

• Position the mouse pointer on a variable in the list to display the entire label in a pop-up ToolTip.

• Click and drag the vertical bar that separates the variable and Categories lists from the canvas pane to make the lists wider.

Expand Show details Collapse Hide details
Variable list widened to display more complete variable labels

Related Topics

Stacking Categorical Variables


Nesting Categorical Variables

Custom Tables,Custom Tables,Custom Tables
nesting variables,nesting variables,nesting variables
nesting variables,nesting variables,nesting variables
Custom Tables,Custom Tables,Custom Tables

This example uses the data file survey_sample.sav. See the topic Sample Files for more information.

Nesting, like crosstabulation, can show the relationship between two categorical variables, except that one variable is nested within the other in the same dimension. For example, you could nest Gender within Age category in the row dimension, showing the number of males and females in each age category.

Open the table builder (Analyze menu, Tables, Custom Tables).

Click Reset to delete any previous selections in the table builder.

In the table builder, drag and drop Age category from the variable list to the Rows area on the canvas pane.

Drag and drop Gender from the variable list to the right of Age category in the Rows area.

The preview on the canvas pane now shows that the nested table will contain a single column of counts, with each cell containing the number of males or females in each age category.

Expand Show details Collapse Hide details
Gender nested within Age category

You may notice that the variable label Gender is displayed repeatedly, once for each age category. You can minimize this kind of repetition by placing the variable with the fewest categories at the outermost level of the nesting.

Click the variable label Gender on the canvas pane.

Drag and drop the variable as far to the left in the Rows area as you can.

Now instead of Gender being repeated six times, Age category is repeated twice. This is a less-cluttered table that will produce essentially the same results.

Expand Show details Collapse Hide details
Age category nested within Gender in table builder preview

Click OK to create the table.

Table of Age category nested within Gender

Related Topics

Stacking, Nesting, and Layers with Categorical Variables
Stacking Categorical Variables
Layers
Suppressing Variable Labels
Nested Crosstabulation
Swapping Rows and Columns


Suppressing Variable Labels

Another solution to redundant variable labels in nested tables is simply to suppress the display of variable names or labels. Since the value labels for both Gender and Age category are probably sufficiently descriptive without the variable labels, we can eliminate the labels for both variables.

Open the table builder (Analyze menu, Tables, Custom Tables).

Right-click Age category on the canvas pane and deselect (uncheck) Show Variable Label on the pop-up context menu.

Do the same for Gender.

Expand Show details Collapse Hide details
Suppressing variable labels via the context menu in the table builder

The variable labels are still displayed in the table preview, but they won't be included in the table.

Click OK to create the table.

Nested table without variable labels

If you want the variable labels included with the table somewhere--without displaying them multiple times in the body of the table--you can include them in the table title or corner label.

Open the table builder (Analyze menu, Tables, Custom Tables).

Click the Titles tab.

Click anywhere in the Title text box.

Click Table Expression. The text &[Table Expression] is displayed in the Title text box. This will generate a table title that includes the variable labels for the variables used in the table.

Click OK to create the table.

Variable labels in table title

The greater than sign (>) in the title indicates that Age category is nested within Gender.

Related Topics

Nesting Categorical Variables
Nested Crosstabulation
Swapping Rows and Columns


Nested Crosstabulation

Custom Tables,Custom Tables,Custom Tables
nesting variables,nesting variables,nesting variables
nesting variables,nesting variables,nesting variables
Custom Tables,Custom Tables,Custom Tables
Custom Tables,Custom Tables,Custom Tables
compact view,compact view,compact view

A nested table can contain other variables in other dimensions. For example, you could nest Age category within Gender in the rows and crosstabulate the nested rows with a third variable in the column dimension.

Open the table builder (Analyze menu, Tables, Custom Tables).

If Age category isn't already nested within Gender in the rows, follow the directions above for nesting them.

Drag and drop Get news from internet from the variable list to the Columns area on the canvas pane.

You may notice that the table is too large to display completely on the canvas pane. You can scroll up/down or right/left on the canvas pane to see more of the table preview, or you can:

• Click Compact in the table builder to see a compact view. This displays only the variable labels, without any information on categories or summary statistics included in the table.

• Increase the size of the table builder by clicking and dragging any of the sides or corners of the table builder.

Expand Show details Collapse Hide details
Compact view on the canvas pane

Click OK to create the table.

Nested crosstabulation

Related Topics

Nesting Categorical Variables
Suppressing Variable Labels
Swapping Rows and Columns


Swapping Rows and Columns

Custom Tables,Custom Tables,Custom Tables
swapping row and column variables,swapping row and column variables,swapping row and column variables

What do you do if you spend a lot of time setting up a complex table and then decide it's absolutely perfect--except that you want to switch the orientation, putting all of the row variables in the columns and vice versa? For example, you've created a nested crosstabulation with Age category and Gender nested in the rows, but now you want these two demographic variables nested in the columns instead.

Open the table builder (Analyze menu, Tables, Custom Tables).

Right-click anywhere on the canvas pane and select Swap Row and Column Variables from the pop-up context menu.

Expand Show details Collapse Hide details
Swapping row and column variables

The row and column variables have now been switched.

Before creating the table, let's make a few modifications to make the display less cluttered.

Select Hide to suppress the display of the summary statistics column label.

Right-click Gender on the canvas pane and deselect (uncheck) Show Variable Label.

Now click OK to create the table.

Crosstabulation with demographic variables nested in columns

Related Topics

Nesting Categorical Variables
Suppressing Variable Labels
Nested Crosstabulation


Layers

Custom Tables,Custom Tables,Custom Tables
layer variables,layer variables,layer variables
layer variables,layer variables,layer variables
Custom Tables,Custom Tables,Custom Tables

This example uses the data file survey_sample.sav. See the topic Sample Files for more information.

You can use layers to add a dimension of depth to your tables, creating three-dimensional "cubes." Layers are, in fact, quite similar to nesting or stacking; the primary difference is that only one layer category is visible at a time. For example, using Age category as the row variable and Gender as a layer variable produces a table in which information for males and females is displayed in different layers of the table.

Open the table builder (Analyze menu, Tables, Custom Tables).

Click Reset to delete any previous selections in the table builder.

In the table builder, drag and drop Age category from the variable list to the Rows area on the canvas pane.

Click Layers at the top of the table builder to display the Layers list.

Drag and drop Gender from the variable list to the Layers list.

Expand Show details Collapse Hide details
Age category in rows, Gender in layers

At this point, you might notice that adding a layer variable has no visible effect on the preview displayed on the canvas pane. Layer variables do not affect the preview on the canvas pane unless the layer variable is the statistics source variable and you change the summary statistics.

Click OK to create the table.

Simple layered table

At first glance, this table doesn't look any different than a simple table of a single categorical variable. The only difference is the presence of the label Gender Male at the top of the table.

Double-click the table in the Viewer window to activate it.

You can now see that the label Gender Male is actually a choice in a drop-down list.

Click the down arrow on the drop-down list to display the whole list of layers.

List of layers in activated pivot table

In this table, there is only one other choice in the list.

Select Gender Female from the drop-down list.

Simple layered table with different layer displayed

Related Topics

Stacking, Nesting, and Layers with Categorical Variables
Stacking Categorical Variables
Nesting Categorical Variables
Two Stacked Categorical Layer Variables
Two Nested Categorical Layer Variables
Printing Layered Tables


Two Stacked Categorical Layer Variables

Custom Tables,Custom Tables,Custom Tables
layer variables,layer variables,layer variables
layer variables,layer variables,layer variables
Custom Tables,Custom Tables,Custom Tables
stacking layer variables,stacking layer variables,stacking layer variables
stacking variables,stacking variables,stacking variables
stacking layer variables,stacking layer variables,stacking layer variables

If you have more than one categorical variable in the layers, you can either stack or nest the layer variables. By default, layer variables are stacked. (Note: If you have any scale layer variables, layer variables can only be stacked.)

Open the table builder (Analyze menu, Tables, Custom Tables).

If you don't already have Age category in the rows and Gender in the layers, follow the directions above for creating a layered table.

Drag and drop Highest degree from the variable list to the Layer list below Gender.

Expand Show details Collapse Hide details
Stacked layer variables in table builder

The two radio buttons below the Layer list in the Layer Output group are now activated. The default selection is Show each category as a layer. This is equivalent to stacking.

Click OK to create the table.

Double-click the table in the Viewer window to activate it.

Click the down arrow on the drop-down list to display the whole list of layers.

List of stacked layers in activated pivot table

There are seven layers in the table: two layers for the two Gender categories and five layers for the five Highest degree categories. For stacked layers, the total number of layers is the sum of the number of categories for the layer variables (including any total or subtotal categories you have requested for the layer variables).

Related Topics

Layers
Two Nested Categorical Layer Variables
Printing Layered Tables


Two Nested Categorical Layer Variables

Custom Tables,Custom Tables,Custom Tables
layer variables,layer variables,layer variables
nesting layer variables,nesting layer variables,nesting layer variables
layer variables,layer variables,layer variables
Custom Tables,Custom Tables,Custom Tables
nesting layer variables,nesting layer variables,nesting layer variables

Nesting categorical layer variables creates a separate layer for each combination of layer variable categories.

Open the table builder (Analyze menu, Tables, Custom Tables).

If you haven't done so already, follow the directions above for creating a table of stacked layers.

In the Layer Output group, select Show each combination of categories as a layer. This is equivalent to nesting.

Click OK to create the table.

Double-click the table in the Viewer window to activate it.

Click the down arrow on the drop-down list to display the whole list of layers.

List of nested layers in activated pivot table

There are 10 layers in the table (you have to scroll through the list to see all of them), one for each combination of Gender and Highest degree. For nested layers, the total number of layers is the product of the number of categories for each layer variable (in this example, 5 x 2 = 10).

Related Topics

Layers
Two Stacked Categorical Layer Variables
Printing Layered Tables


Printing Layered Tables

Custom Tables,Custom Tables,Custom Tables
printing layered tables,printing layered tables,printing layered tables
layer variables,layer variables,layer variables
printing layered tables,printing layered tables,printing layered tables
printing tables with layers,printing tables with layers,printing tables with layers

By default, only the currently visible layer is printed. To print all layers of a table:

Double-click the table in the Viewer window to activate it.

From the Viewer window menus, choose:

Format
Table Properties...

Click the Printing tab.

Select Print all layers.

You can also save this setting as part of a TableLook, including the default TableLook.

Related Topics

Layers
Two Stacked Categorical Layer Variables
Two Nested Categorical Layer Variables


Totals and Subtotals for Categorical Variables

Custom Tables,Custom Tables,Custom Tables
totals,totals,totals
subtotals,subtotals,subtotals
totals,totals,totals
Custom Tables,Custom Tables,Custom Tables
subtotals,subtotals,subtotals
Custom Tables,Custom Tables,Custom Tables

You can include both totals and subtotals in custom tables. Totals and subtotals can be applied to categorical variables at any nesting level in any dimension--row, column, or layer.

Sample Data File

The examples in this section use the data file survey_sample.sav. See the topic Sample Files for more information.

All examples provided here display variable labels in dialog boxes, sorted in alphabetical order. Variable list display properties are set on the General tab in the Options dialog box (Edit menu, Options).

Related Topics

Simple Total for a Single Variable
What You See Is What Gets Totaled
Display Position of Totals
Totals for Nested Tables
Layer Variable Totals
Subtotals


Simple Total for a Single Variable

This example uses the data file survey_sample.sav. See the topic Sample Files for more information.

From the menus, choose:

Analyze
Tables
Custom Tables...

In the table builder, drag and drop Age category from the variable list to the Rows area on the canvas pane.

Right-click Age category on the canvas pane and choose Summary Statistics from the pop-up context menu.

In the Summary Statistics dialog box, select Column N % in the Statistics list and click the arrow to add it to the Display list.

In the Label cell in the Display list, delete the default label and type Percent.

Click Apply to Selection.

Right-click Age category on the canvas pane and choose Categories and Totals from the pop-up context menu.

Select (click) Total in the Categories and Totals dialog box.

Expand Show details Collapse Hide details
Categories and Totals dialog box

Click Applyand then click OK in the table builder to create the table.

Simple total for a single categorical variable

Related Topics

Totals and Subtotals for Categorical Variables
What You See Is What Gets Totaled
Display Position of Totals
Totals for Nested Tables
Layer Variable Totals
Subtotals


What You See Is What Gets Totaled

totals,totals,totals
excluded categories,excluded categories,excluded categories

Totals are based on categories displayed in the table. If you choose to exclude some categories from a table, cases from those categories are not included in total calculations.

Open the table builder (Analyze menu, Tables, Custom Tables).

Right-click Age category on the canvas pane and choose Categories and Totals from the pop-up context menu.

Click the category labeled Less than 25 in the Label list.

Click the arrow key to the left of the Exclude list.

Click the category labeled 65 or older in the Label list.

Click the arrow key to the left of the Exclude list again.

The two categories are moved from the Display list to the Exclude list.

Expand Show details Collapse Hide details
Manually excluded categories

Click Apply and then click OK in the table builder to create the table.

Total in table with excluded categories

The total count in this table is only 2,107, compared to 2,828 when all of the categories are included. Only the categories that are used in the table are included in the total. (The percentage total is still 100% because all of the percentages are based on the total number of cases used in the table, not the total number of cases in the data file.)

Related Topics

Totals and Subtotals for Categorical Variables
Simple Total for a Single Variable
Display Position of Totals
Totals for Nested Tables
Layer Variable Totals
Subtotals


Display Position of Totals

totals,totals,totals
display position,display position,display position

By default, totals are displayed below the categories being totaled. You can change the display position of totals to show them above the categories being totaled.

Open the table builder (Analyze menu, Tables, Custom Tables).

Right-click Age category on the canvas pane and choose Categories and Totals from the pop-up context menu.

In the Totals and Subgroups Appear group, select Above categories to which they apply.

Click Apply and then click OK in the table builder to create the table.

Total displayed above totaled categories

Related Topics

Totals and Subtotals for Categorical Variables
Simple Total for a Single Variable
What You See Is What Gets Totaled
Totals for Nested Tables
Layer Variable Totals
Subtotals


Totals for Nested Tables

totals,totals,totals
nested tables,nested tables,nested tables
group totals,group totals,group totals
group totals,group totals,group totals
subgroup totals,subgroup totals,subgroup totals

Since totals can be applied to categorical variables at any level of the nesting, you can create tables that contain group totals at multiple nesting levels.

Group Totals

Totals for categorical variables nested within other categorical variables represent group totals.

Open the table builder (Analyze menu, Tables, Custom Tables).

Drag and drop Gender to the left of Age category on the canvas pane.

Right-click Age category on the canvas pane and choose Categories and Totals from the pop-up context menu.

Before creating the table, let's move the totals back below the totaled categories.

In the Totals and Subgroups Appear group, select Below categories to which they apply.

Click Apply to save the setting and return to the table builder.

Expand Show details Collapse Hide details
Age category nested within Gender in the table builder

Click OK to create the table.

Age category totals within Gender categories

The table now displays two group totals: one for males and one for females.

Grand Totals

Totals applied to nested variables are always group totals, not grand totals. If you want totals for the entire table, you can apply totals to the variable at the outermost nesting level.

Open the table builder again (Analyze menu, Tables, Custom Tables).

Right-click Gender on the canvas pane and choose Categories and Totals from the pop-up context menu.

Select (click) Total in the Categories and Totals dialog box.

Click Apply and then click OK in the table builder to create the table.

Grand totals for a nested table

Notice that the grand total is only 2,107, not 2,828. Two age categories are still excluded from the table, so the cases in those categories are excluded from all totals.

Related Topics

Totals and Subtotals for Categorical Variables
Simple Total for a Single Variable
What You See Is What Gets Totaled
Display Position of Totals
Layer Variable Totals
Subtotals


Layer Variable Totals

totals,totals,totals
layers,layers,layers

Totals for layer variables are displayed as separate layers in the table.

Open the table builder (Analyze menu, Tables, Custom Tables).

Click Layers in the table builder to display the Layers list.

Drag and drop Gender from the row area on the canvas pane to the Layers list.

Expand Show details Collapse Hide details
Layer variable in table builder

Note: Since you already specified totals for Gender, you don't need to do so now. Moving the variable between dimensions does not affect any of the settings for that variable.

Click OK to create the table.

Double-click the table in the Viewer to activate it.

Click the down arrow in the Layer drop-down list to display a list of all the layers in the table.

There are three layers in the table: Gender Male, Gender Female, and Gender Total.

Total layer in Layer list in activated pivot table

Display Position of Layer Totals

For layer variable totals, the display position (above or below) for totals determines the layer position for the totals. For example, if you specify Above categories to which they apply for a layer variable total, the total layer is the first layer displayed.

Related Topics

Totals and Subtotals for Categorical Variables
Simple Total for a Single Variable
What You See Is What Gets Totaled
Display Position of Totals
Totals for Nested Tables
Subtotals


Subtotals

subtotals,subtotals,subtotals

This example uses the data file survey_sample.sav. See the topic Sample Files for more information.

You can include subtotals for subsets of categories of a variable. For example, you could include subtotals for age categories that represent all of the respondents in the sample survey under and over age 45.

Open the table builder (Analyze menu, Tables, Custom Tables).

Click Reset to clear any previous settings in the table builder.

In the table builder, drag and drop Age category from the variable list to the Rows area on the canvas pane.

Right-click Age category on the canvas pane and choose Categories and Totals from the pop-up context menu.

Select 3.00 in the Value(s) list.

Click Add Subtotal to display the Define Subtotal dialog box.

In the Label text field, type Subtotal < 45.

Then click Continue.

This inserts a row containing the subtotal for the first three age categories.

Select 6.00 in the Value(s) list.

Click Add Subtotal to display the Define Subtotal dialog box.

In the Label text field, type Subtotal 45+.

Then click Continue.

Expand Show details Collapse Hide details
Defining subtotals

Important note: You should select the display position for totals and subtotals (Above categories to which they apply or Below categories to which they apply) before defining any subtotals. Changing the display position affects all subtotals (not just the currently selected subtotal), and it also changes the categories included in the subtotals.

Click Apply and then click OK in the table builder to create the table.

Subtotals for Age category

Related Topics

Totals and Subtotals for Categorical Variables
Simple Total for a Single Variable
What You See Is What Gets Totaled
Display Position of Totals
Totals for Nested Tables
Layer Variable Totals
What You See Is What Gets Subtotaled
Hiding Subtotaled Categories
Layer Variable Subtotals


What You See Is What Gets Subtotaled

Just like totals, subtotals are based on the categories included in the table.

Open the table builder (Analyze menu, Tables, Custom Tables).

Right-click Age category on the canvas pane and choose Categories and Totals from the pop-up context menu.

Note: The value (not the label) displayed for the first subtotal is 1.00...3.00, indicating that the subtotal includes all of the values in the list between 1 and 3.

Select 1.00 in the Value(s) list (or click the label Less than 25).

Click the arrow key to the left of the Exclude list.

Expand Show details Collapse Hide details
Subtotals when categories are excluded

The first age category is now excluded, and the value displayed for the first subtotal changes to 2.00...3.00, indicating the fact that the excluded category will not be included in the subtotal because subtotals are based on the categories included in the table. Excluding a category automatically excludes it from any subtotals, so you cannot, for example, display only subtotals without the categories on which the subtotals are based.

Related Topics

Subtotals
Hiding Subtotaled Categories
Layer Variable Subtotals


Hiding Subtotaled Categories

Custom Tables,Custom Tables,Custom Tables
hiding subtotaled categories,hiding subtotaled categories,hiding subtotaled categories
collapsing categories,collapsing categories,collapsing categories
subtotals,subtotals,subtotals
hiding subtotaled categories,hiding subtotaled categories,hiding subtotaled categories
collapsing categories,collapsing categories,collapsing categories
Custom Tables,Custom Tables,Custom Tables

You can suppress the display of the categories that define a subtotal and display only the subtotal, effectively "collapsing" categories without affecting the underlying data.

Open the table builder (Analyze menu, Tables, Custom Tables).

Click Reset to clear any previous settings in the table builder.

In the table builder, drag and drop Age category from the variable list to the Rows area on the canvas pane.

Right-click Age category on the canvas pane and choose Categories and Totals from the pop-up context menu.

Select 3.00 in the Value(s) list.

Click Add Subtotal to display the Define Subtotal dialog box.

In the Label text field, type Less than 45.

Select (check) Hide subtotaled categories from the table.

Then click Continue.

This inserts a row containing the subtotal for the first three age categories.

Select 6.00 in the Value(s) list.

Click Add Subtotal to display the Define Subtotal dialog box.

In the Label text field, type 45 or older.

Select (check) Hide subtotaled categories.

Then click Continue.

To include a total with the subtotals, select (check) Total in the Show group.

Expand Show details Collapse Hide details
Hiding subtotaled categories

Click Apply.

The canvas reflects the fact that subtotals will be displayed but the categories that define the subtotals will be excluded.

Expand Show details Collapse Hide details
Canvas displaying subtotals without subtotaled categories

Click OK to produce the table.

Table displaying only subtotals and totals

Related Topics

Subtotals
What You See Is What Gets Subtotaled
Layer Variable Subtotals


Layer Variable Subtotals

Just like totals, subtotals for layer variables are displayed as separate layers in the table. Essentially, the subtotals are treated as categories. Each category is a separate layer in the table, and the display order of the layer categories is determined by the category order specified in the Categories and Totals dialog box, including the display position of the subtotal categories.

Related Topics

Subtotals
What You See Is What Gets Subtotaled
Hiding Subtotaled Categories


Computed Categories for Categorical Variables

Custom Tables,Custom Tables,Custom Tables
computed categories,computed categories,computed categories
post-computed categories,post-computed categories,post-computed categories
computed categories,computed categories,computed categories
Custom Tables,Custom Tables,Custom Tables
post-computed categories,post-computed categories,post-computed categories
Custom Tables,Custom Tables,Custom Tables

You can include computed categories in custom tables. These are new categories that are calculated from categories of the same variable at any nesting level in any dimension--row, column, or layer. For example, you could include a computed category that shows the difference between two categories.

Sample Data File

The examples in this section use the data file survey_sample.sav. See the topic Sample Files for more information.

Related Topics

Simple Computed Category
Hiding Categories in a Computed Category
Referencing Subtotals in a Computed Category
Using Computed Categories to Display Nonexhaustive Subtotals


Simple Computed Category

This example uses the data file survey_sample.sav. See the topic Sample Files for more information.

From the menus, choose:

Analyze
Tables
Custom Tables...

Expand Show details Collapse Hide details
Define Computed Category dialog box

In the table builder, drag and drop Age category from the variable list to the Rows area on the canvas pane.

Right-click Age category on the canvas pane and choose Categories and Totals from the pop-up context menu.

Select 3.00 in the Value(s) list.

Click Add Category to display the Define Compute Category dialog box.

In the Label for Computed Category text field, type Less than 45.

Select Less than 25 (1.00) in the Categories list and click the arrow button to copy it to the Expression for Computed Category text box. [1] is displayed in the expression.

Click the plus (+) operator button in the dialog box (or press the + key on the keyboard).

Select 25 to 34 (2.00) in the Categories list and click the arrow button to copy it to the Expression for Computed Category text box.

Click the plus (+) operator button in the dialog box (or press the + key on the keyboard).

Select 35 to 44 (3.00) in the Categories list and click the arrow button to copy it to the Expression for Computed Category text box.

Then click Continue.

This inserts a row containing the subtotal for the first three age categories.

Select 5.00 in the Value(s) list.

Click Add Subtotal to display the Define Subtotal dialog box.

In the Label text field, type Less than 65.

Then click Continue.

This inserts a row containing the subtotal for the first the first five categories.

Expand Show details Collapse Hide details
Categories and Totals dialog box

Click Apply and then click OK in the table builder to create the table.

Computed category with subtotal

The table includes a computed category (Less than 45) and a subtotal (Less than 65). The subtotal includes categories also included in the computed category. You could not create the same table with subtotals alone, because subtotals cannot share the same categories.

Related Topics

Computed Categories for Categorical Variables
Hiding Categories in a Computed Category
Referencing Subtotals in a Computed Category
Using Computed Categories to Display Nonexhaustive Subtotals


Hiding Categories in a Computed Category

computed categories,computed categories,computed categories
hiding categories in expression,hiding categories in expression,hiding categories in expression

As with subtotals, you can suppress the display of the categories that are used in a computed category's expression and display only the computed category itself. The following example builds on the previous one.

This example uses the data file survey_sample.sav. See the topic Sample Files for more information.

From the menus, choose:

Analyze
Tables
Custom Tables...

Right-click Age category on the canvas pane and choose Categories and Totals from the pop-up context menu.

Select the Less than 45 computed category in the Value(s) list.

Click Edit to display the Define Compute Category dialog box.

Select Hide categories used in expression from table.

Then click Continue.

Select the Less than 65 subtotal in the Value(s) list.

Click Edit to display the Define Subtotal dialog box.

Select Hide subtotaled categories from the table.

Then click Continue.

Expand Show details Collapse Hide details
Categories and Totals dialog box showing hidden categories

Click Apply and then click OK in the table builder to create the table.

Computed category with subtotal and hidden categories

Like the previous example, the table includes a computed category and a subtotal. But in this case the categories in each are hidden so that only these totals are shown.

Related Topics

Computed Categories for Categorical Variables
Simple Computed Category
Referencing Subtotals in a Computed Category
Using Computed Categories to Display Nonexhaustive Subtotals


Referencing Subtotals in a Computed Category

computed categories,computed categories,computed categories
from subtotals,from subtotals,from subtotals

You can include subtotals in a computed category's expression.

This example uses the data file survey_sample.sav. See the topic Sample Files for more information.

From the menus, choose:

Analyze
Tables
Custom Tables...

Click Reset to clear any previous settings in the table builder.

In the table builder, drag and drop Labor force status from the variable list into the Rows area of the canvas pane.

Drag and drop Marital status from the variable list into the Columns area.

Right-click Labor force status on the canvas pane and choose Categories and Totals from the pop-up context menu.

Select 2 in the Value(s) list.

Click Add Subtotal to display the Define Subtotal dialog box.

In the Label text field, type Working.

Select Hide subtotaled categories from the table.

Then click Continue.

This inserts a row containing the subtotal for the first two working status categories.

Select 8 in the Value(s) list.

Click Add Subtotal to display the Define Subtotal dialog box.

In the Label text field, type Not Working.

Select Hide subtotaled categories.

Then click Continue.

This inserts a row containing the subtotal for the other working status categories.

Expand Show details Collapse Hide details
Categories and Totals dialog box

Select the Not Working subtotal in the Value(s) list.

Click Add Category to display the Define Compute Category dialog box.

In the Label for Computed Category text field, type Working / Not Working.

Select Working (Working #1) in the Totals and Subtotals list and click the arrow button to copy it to the Expression for Computed Category text box.

Click the division (/) operator button in the dialog box (or press the / key on the keyboard).

Select Not Working (Not Working #2) in the Totals and Subtotals list and click the arrow button to copy it to the Expression for Computed Category text box.

Expand Show details Collapse Hide details
Define Computed Category dialog box

By default, the computed category uses the same format as the variable's statistic, which is Count in this case. Because we want to show decimal places resulting from the division in the computed category's expression and the default format for Count does not include decimal places, we need to change the format.

Click the Display Formats tab.

Change the Decimals setting for Count to 2.

Expand Show details Collapse Hide details
Display Formats tab in Define Computed Category dialog box

Then click Continue.

Click Apply and then click OK in the table builder to create the table.

Computed category showing ratio of subtotals

The table includes two subtotals and a computed category. The computed category shows the ratio of the subtotals so that you can easily compare the groups represented by each subtotal. There's a much lower ratio of working to not working widowed respondents compared to the other groups. Also, there is a slightly lower ratio of married respondents, perhaps resulting from spouses who leave the workforce to stay home with a child.

Related Topics

Computed Categories for Categorical Variables
Simple Computed Category
Hiding Categories in a Computed Category
Using Computed Categories to Display Nonexhaustive Subtotals


Using Computed Categories to Display Nonexhaustive Subtotals

Subtotals are exhaustive. That is, all subtotals in a table include all values above or below their positions in the table. Computed categories, on the other hand, are not exhaustive and allow you to sum a mix of categories in a table.

This example uses the data file survey_sample.sav. See the topic Sample Files for more information.

From the menus, choose:

Analyze
Tables
Custom Tables...

Click Reset to clear any previous settings in the table builder.

In the table builder, drag and drop Think of self as liberal or conservative from the variable list into the Rows area of the canvas pane.

Right-click Think of self as liberal or conservative on the canvas pane and choose Categories and Totals from the pop-up context menu.

Select 3 in the Value(s) list.

Click Add Category to display the Define Computed Category dialog box.

In the Label for Computed Category text field, type Liberal Subtotal. Note that there are four spaces before the text. These spaces are used for indentation in the resulting table.

Select Extremely liberal (1) in the Categories list and click the arrow button to copy it to the Expression for Computed Category text box.

Click the plus (+) operator button in the dialog box (or press the + key on the keyboard).

Select Liberal (2) in the Categories list and click the arrow button to copy it to the Expression for Computed Category text box.

Click the plus (+) operator button in the dialog box (or press the + key on the keyboard).

Select Slightly liberal (3) in the Categories list and click the arrow button to copy it to the Expression for Computed Category text box.

Click Continue.

This inserts a row containing the subtotal for the liberal categories.

Expand Show details Collapse Hide details
Categories and Totals dialog box

Select 7 in the Value(s) list.

Click Add Category to display the Define Computed Category dialog box.

In the Label for Computed Category text field, type Conservative Subtotal. Note that there are four spaces before the text. These spaces are used for indentation in the resulting table.

Select Slight conservative (5) in the Categories list and click the arrow button to copy it to the Expression for Computed Category text box.

Click the plus (+) operator button in the dialog box (or press the + key on the keyboard).

Select Conservative (6) in the Categories list and click the arrow button to copy it to the Expression for Computed Category text box.

Click the plus (+) operator button in the dialog box (or press the + key on the keyboard).

Select Extremely conservative (7) in the Categories list and click the arrow button to copy it to the Expression for Computed Category text box.

Click Continue.

This inserts a row containing the subtotal for the conservative categories.

Expand Show details Collapse Hide details
Categories and Totals dialog box

Click Apply and then click OK in the table builder to create the table.

Computed categories displaying nonexhaustive subtotals

The table includes two computed categories that do not include all the categories displayed in the table. The Moderate category is not included in either computed category. You cannot create the same table with subtotals because subtotals are exhaustive.

Related Topics

Computed Categories for Categorical Variables
Simple Computed Category
Hiding Categories in a Computed Category
Referencing Subtotals in a Computed Category


Tables for Variables with Shared Categories

comperimeter tables,comperimeter tables,comperimeter tables
Custom Tables,Custom Tables,Custom Tables
tables of variables with shared categories,tables of variables with shared categories,tables of variables with shared categories
comperimeter tables,comperimeter tables,comperimeter tables
table of frequencies,table of frequencies,table of frequencies
table of frequencies,table of frequencies,table of frequencies
Custom Tables,Custom Tables,Custom Tables

Surveys often contain many questions with a common set of possible responses. For example, our sample survey contains a number of variables concerning confidence in various public and private institutions and services, all with the same set of response categories: 1 = A great deal, 2 = Only some, and 3 = Hardly any. You can use stacking to display these related variables in the same table--and you can display the shared response categories in the columns of the table. These features are also available if you use computed categories, with the provision that any computed category's label and expression are the same in all variables.

Table of variables with shared categories

Note: In the previous version of Custom Tables, this was known as a "table of frequencies."

Sample Data File

The examples in this section use the data file survey_sample.sav. See the topic Sample Files for more information.

All examples provided here display variable labels in dialog boxes, sorted in alphabetical order. Variable list display properties are set on the General tab in the Options dialog box (Edit menu, Options).

Related Topics

Table of Counts
Table of Percentages
Totals and Category Control
Nesting in Tables with Shared Categories


Table of Counts

This example uses the data file survey_sample.sav. See the topic Sample Files for more information.

From the menus, choose:

Analyze
Tables
Custom Tables...

In the variable list in the table builder, click Confidence in banks... and then Shift-click Confidence in television to select all of the "confidence" variables. (Note: This assumes that variable labels are displayed in alphabetical order, not file order, in the variable list.)

Drag and drop the six confidence variables to the Rows area on the canvas pane.

Expand Show details Collapse Hide details
Confidence variables stacked in rows

This stacks the variables in the row dimension. By default, the category labels for each variable are also displayed in the rows, resulting in a very long, narrow table (6 variables x 3 categories = 18 rows)--but since all six variables share the same defined category labels (value labels), you can put the category labels in the column dimension.

From the Category Position drop-down list, select Row Labels in Columns.

Now the table has only six rows, one for each of the stacked variables, and the defined categories become columns in the table.

Before creating the table, select (click) Hide for Position in the Summary Statistics group, since the summary statistic label Count isn't really necessary.

Expand Show details Collapse Hide details
Category labels in columns

Click OK to create the table.

Table of stacked row variables with shared category labels in columns

Instead of displaying the variables in the rows and categories in the columns, you could create a table with the variables stacked in the columns and the categories displayed in the rows. This might be a better choice if there were more categories than variables, whereas in our example there are more variables than categories.

Related Topics

Tables for Variables with Shared Categories
Table of Percentages
Totals and Category Control
Nesting in Tables with Shared Categories


Table of Percentages

For a table with variables stacked in rows and categories displayed in columns, the most meaningful (or at least easiest to understand) percentage to display is row percentages. (For a table with variables stacked in the columns and categories displayed in the rows, you would probably want column percentages.)

Open the table builder again (Analyze menu, Tables, Custom Tables).

Right-click any one of the confidence variables in the table preview on the canvas pane and choose Summary Statistics from the pop-up context menu.

Select Row N % in the Statistics list and click the arrow button to move it to the Display list.

Click any cell in the Count row in the Display list and click the arrow button to move it back to the Statistics list, removing it from the Display list.

Expand Show details Collapse Hide details
Row percentages selected

Click Apply to All to apply the summary statistic change to all of the stacked variables in the table.

Expand Show details Collapse Hide details
Row percentages in table preview on canvas pane

Note: If your table preview doesn't look like this figure, you probably clicked Apply to Selection instead of Apply to All, which applies the new summary statistic only to the selected variable. In this example, that would result in two columns for each category: one with count placeholders displayed for all of the other variables and one with a row percentage placeholder displayed for the selected variable. This is exactly the table that would be produced but not the one that we want in this example.

Click OK to create the table.

Table of row percentages for variables stacked in rows, categories displayed in columns

Note: You can include any number of summary statistics in a table of variables with shared categories. Our examples show only one at a time to keep them simple.

Related Topics

Tables for Variables with Shared Categories
Table of Counts
Totals and Category Control
Nesting in Tables with Shared Categories


Totals and Category Control

You can create tables with categories in the opposite dimension from the variables only if all of the variables in the table have the same categories, displayed in the same order. This includes totals, subtotals, and any other category adjustments you make. This means that any modifications you make in the Categories and Totals dialog box must be made for all variables in the table that share the categories.

Open the table builder again (Analyze menu, Tables, Custom Tables).

Right-click the first confidence variable in the table preview on the canvas pane and choose Categories and Totals from the pop-up context menu.

Select (check) Total in the Categories and Totals dialog box and then click Apply.

Expand Show details Collapse Hide details
Probably not the results you want

The first thing you'll probably notice is that the category labels have moved from the columns back to the rows. You may also notice that the Category Position control is now disabled. This is because the variables no longer share the exact same set of "categories." One of the variables now has a total category.

Right-click any one of the confidence variables on the canvas pane and select Select All Row Variables from the pop-up context menu--or Ctrl-click each stacked variable on the canvas pane until they are all selected (you may have to scroll down the pane or expand the table builder window).

Click Categories and Totals in the Define group.

If Total isn't already selected (checked) in the Categories and Totals dialog box, select it now and then click Apply.

The Category Position drop-down list should be enabled again, since now all of the variables have the additional total category, so select Row Labels in Columns.

Expand Show details Collapse Hide details
Categories and totals in columns

Click OK to create the table.

Table of row percentages for variables stacked in rows, categories and totals displayed in columns

Related Topics

Tables for Variables with Shared Categories
Table of Counts
Table of Percentages
Nesting in Tables with Shared Categories


Nesting in Tables with Shared Categories

In nested tables, the stacked variables with the shared categories must be at the innermost nesting level of their dimension if you want to display the category labels in the opposite dimension.

Open the table builder again (Analyze menu, Tables, Custom Tables).

Drag and drop Gender from the variable list to the left side of the Rows area.

Expand Show details Collapse Hide details
Nested variables with shared categories

The stacked variables with shared categories are now nested within gender categories in the table preview.

Now drag and drop Gender to the right of one of the stacked confidence variables in the table preview.

Expand Show details Collapse Hide details
Another example of results you probably do not want

Once again, the category labels have reverted to the row dimension, and the Category Position control is disabled. You now have one stacked variable that also has Gender nested within it, while the other stacked variables contain no nested variables. You could add Gender as a nested variable to each of the stacked variables, but then moving row labels to columns would result in the category labels for Gender being displayed in the columns, not the category labels for the stacked variables with the shared categories. This is because Gender would now be the innermost nested variable, and changing the category position always applies to the innermost nested variable.

Related Topics

Tables for Variables with Shared Categories
Table of Counts
Table of Percentages
Totals and Category Control


Summary Statistics

summary statistics,summary statistics,summary statistics
statistics,statistics,statistics
summary statistics,summary statistics,summary statistics

Summary statistics include everything from simple counts for categorical variables to measures of dispersion, such as the standard error of the mean for scale variables. It does not include significance tests available on the Test Statistics tab in the Custom Tables dialog box. See the topic Test Statistics for more information.

Summary statistics for categorical variables and multiple response sets include counts and a wide variety of percentage calculations, including:

• Row percentages

• Column percentages

• Subtable percentages

• Table percentages

• Valid N percentages

In addition to the summary statistics available for categorical variables, summary statistics for scale variables and custom total summaries for categorical variables include:

• Mean

• Median

• Percentiles

• Sum

• Standard deviation

• Range

• Minimum and maximum values

Additional summary statistics are available for multiple response sets. A complete list of summary statistics is also available. See the topic Summary Statistics for more information.

Sample Data File

The examples in this section use the data file survey_sample.sav. See the topic Sample Files for more information.

All examples provided here display variable labels in dialog boxes, sorted in alphabetical order. Variable list display properties are set on the General tab in the Options dialog box (Edit menu, Options).

Related Topics

Summary Statistics Source Variable
Stacked Variables
Custom Total Summary Statistics for Categorical Variables


Summary Statistics Source Variable

summary statistics,summary statistics,summary statistics
source variable,source variable,source variable
source dimension,source dimension,source dimension

Available summary statistics depend on the measurement level of the summary statistics source variable. The source of summary statistics (the variable on which the summary statistics are based) is determined by:

• Measurement level. If a table (or a table section in a stacked table) contains a scale variable, summary statistics are based on the scale variable.

• Variable selection order. The default statistics source dimension (row or column) for categorical variables is based on the order in which you drag and drop variables onto the canvas pane. For example, if you drag a variable to the rows area first, the row dimension is the default statistics source dimension.

• Nesting. For categorical variables, summary statistics are based on the innermost variable in the statistics source dimension.

A stacked table may have multiple summary statistics source variables (both scale and categorical), but each table section has only one summary statistics source.

Related Topics

Summary Statistics
Stacked Variables
Custom Total Summary Statistics for Categorical Variables
Summary Statistics Source for Categorical Variables
Summary Statistics Source for Scale Variables


Summary Statistics Source for Categorical Variables

This example uses the data file survey_sample.sav. See the topic Sample Files for more information.

From the menus, choose:

Analyze
Tables
Custom Tables...

In the table builder, drag and drop Age category from the variable list into the Rows area of the canvas pane.

Right-click on Age category on the canvas pane and select Summary Statistics from the pop-up context menu. (Since this is the only variable in the table, it is the statistics source variable.)

In the Summary Statistics dialog box, select Column N % in the Statistics list and click the arrow to add it to the Display list.

Expand Show details Collapse Hide details
Summary Statistics dialog box for categorical variables

Click Apply to Selection.

In the table builder, drag and drop Get news from internet to the right of Age category on the canvas pane.

Expand Show details Collapse Hide details
Nested categorical variables

Right-click on Age category on the canvas pane again. The Summary Statistics item on the context menu is now disabled because Age category is not the innermost nested variable in the statistics source dimension.

Right-click on Get news from internet on the canvas pane. The Summary Statistics item is enabled because it is now the summary statistics source variable, since it is the innermost nested variable in the statistics source dimension. (Since the table has only one dimension—rows—it is the statistics source dimension.)

Drag and drop Get news from internet from the Rows area on the canvas pane into the Columns area.

Expand Show details Collapse Hide details
Crosstabulated categorical variables

Right-click on Get news from internet on the canvas pane again. The Summary Statistics item on the pop-up context menu is now disabled because the variable is no longer in the statistics source dimension.

Age category is once again the statistics source variable because the default statistics source dimension for categorical variables is the first dimension where you put variables when creating the table. In this example, the first thing we did was put variables in the row dimension. Thus, the row dimension is the default statistics source dimension; and since Age category is now the only variable in that dimension, it is the statistics source variable.

Related Topics

Summary Statistics Source Variable
Summary Statistics Source for Scale Variables


Summary Statistics Source for Scale Variables

Drag and drop the scale variable Hours per day watching TV to the left of Age category in the Rows area of the canvas pane.

Expand Show details Collapse Hide details
Crosstabulation with scale summary statistics variable

The first thing you may notice is that the Count and Column N % summaries have been replaced with Mean--and if you right-click on Hours per day watching TV on the canvas pane, you'll see that it is now the summary statistics source variable. For a table with a scale variable, the scale variable is always the statistics source variable regardless of its nesting level or dimension, and the default summary statistic for scale variables is the mean.

Drag and drop Hours per day watching TV from the Rows area into the Columns area above Get news from internet.

Right-click on Hours per day watching TV and select Summary Statistics from the pop-up context menu. (It's still the statistics source variable even when you move it to a different dimension.)

In the Summary Statistics dialog box, click the Format cell for the mean in the Display list and select nnnn from the Format drop-down list. (You may have to scroll up the list to find this choice.)

In the Decimals cell, type 2.

Expand Show details Collapse Hide details
Summary Statistics dialog box for scale variables

Click Apply to Selection.

Expand Show details Collapse Hide details
Scale summary statistic with two decimals

The table preview on the canvas pane now shows that the mean values will be displayed with two decimals.

Click OK to create the table.

Scale variable summarized within crosstabulated categorical variables

Related Topics

Summary Statistics Source Variable
Summary Statistics Source for Categorical Variables


Stacked Variables

summary statistics,summary statistics,summary statistics
stacked tables,stacked tables,stacked tables
statistics,statistics,statistics
stacked tables,stacked tables,stacked tables
stacking variables,stacking variables,stacking variables
multiple summary statistics source variables,multiple summary statistics source variables,multiple summary statistics source variables

This example uses the data file survey_sample.sav. See the topic Sample Files for more information.

Since a stacked table can contain multiple statistics source variables and you can specify different summary statistics for each of those statistics source variables, there are a few special considerations for specifying summary statistics in stacked tables.

Open the table builder (Analyze menu, Tables, Custom Tables).

Click Reset to clear any previous settings in the table builder.

Click Get news from internet in the variable list and then shift-click Get news from television in the variable list to select all of the "news" variables. (Note: This assumes that variable labels are displayed in alphabetical order, not file order, in the variable list.)

Drag and drop the five news variables into the Rows area of the canvas pane.

Expand Show details Collapse Hide details
News variables stacked in rows

The five news variables are stacked in the row dimension.

Click Get news from internet on the canvas pane so that only that variable is selected.

Now right-click Get news from internet and select Summary Statistics from the pop-up context menu.

In the Summary Statistics dialog box, select Column N % from the Statistics list and click the arrow to add it to the Display list. (You can use the arrow to move selected statistics from the Statistics list into the Display list, or you can drag and drop selected statistics from the Statistics list into the Display list.)

Then click Apply to Selection.

Expand Show details Collapse Hide details
Additional statistic applied to one variable in a stacked table

A column is added for column percentages--but the table preview on the canvas pane indicates that column percentages will be displayed for only one variable. This is because in a stacked table there are multiple statistics source variables, and each one can have different summary statistics. In this example, however, we want to display the same summary statistics for all variables.

Right-click Get news from newspapers on the canvas pane and select Summary Statistics from the pop-up context menu.

In the Summary Statistics dialog box, select Column N % from the Statistics list and click the arrow to add it to the Display list.

Then click Apply to All.

Expand Show details Collapse Hide details
Additional statistic applied to all variables in a stacked table

Now the table preview indicates that column percentages will be displayed for all of the stacked variables.

Related Topics

Summary Statistics
Summary Statistics Source Variable
Custom Total Summary Statistics for Categorical Variables


Custom Total Summary Statistics for Categorical Variables

summary statistics,summary statistics,summary statistics
custom total summary statistics,custom total summary statistics,custom total summary statistics
statistics,statistics,statistics
custom total summary statistics,custom total summary statistics,custom total summary statistics
custom total summary statistics,custom total summary statistics,custom total summary statistics
mean-frequency tables,mean-frequency tables,mean-frequency tables

This example uses the data file survey_sample.sav. See the topic Sample Files for more information.

For categorical statistics source variables, you can include custom total summary statistics that are different from the statistics displayed for the categories of the variable. For example, for an ordinal variable, you could display percentages for each category and the mean or median for the custom total summary statistic.

Open the table builder (Analyze menu, Tables, Custom Tables).

Click Reset to clear any previous settings in the table builder.

Click Confidence in press in the variable list, and then Ctrl-click Confidence in TV to select both variables.

Drag and drop the two variables into the Rows area of the canvas pane. This stacks the two variables in the row dimension.

Right-click either variable on the canvas pane and select Select All Row Variables from the pop-up context menu. (They may both already be selected, but we want to make sure.)

Right-click the variable again and select Categories and Totals from the pop-up context menu.

In the Categories and Totals dialog box, click (check) Total, and then click Apply.

The table preview on the canvas pane now displays a total row for both variables. In order to display custom total summary statistics, totals and/or subtotals must be specified for the table.

Right-click either variable on the canvas pane and select Summary Statistics from the pop-up context menu.

In the Summary Statistics dialog box, click Count in the Display list and click the arrow to move it to the Statistics list, removing it from the Display list.

Click Column N % in the Statistics list and click the arrow key to move it to the Display list.

Click (check) Custom Summary Statistics for Totals and Subtotals.

Click Count in the custom summary Display list and click the arrow to move it to the custom summary Statistics list, removing it from the Display list.

Click Mean in the custom summary Statistics list and click the arrow to move it to the custom summary Display list.

Click the Format cell for the mean in the Display list and select nnnn from the drop-down list of formats. (You may have to scroll up the list to find this choice.)

In the Decimals cell, type 2.

Expand Show details Collapse Hide details
Selecting custom summary statistics for totals

Click Apply to All to apply these settings to both variables in the table.

Expand Show details Collapse Hide details
Custom total summary statistics for row variables displayed in columns

A new column has been added for the custom total summary statistic, which may not be what you want, since the preview on the canvas pane clearly indicates that this will result in a table with many empty cells.

In the table builder, in the Summary Statistics group, select Rows from the Position drop-down list.

Expand Show details Collapse Hide details
Summary statistics for row variables displayed in rows

This moves all the summary statistics to the row dimension, displaying all summary statistics in a single column in the table.

Click OK to create the table.

Categorical variables with custom total summary statistics

Related Topics

Summary Statistics
Summary Statistics Source Variable
Stacked Variables
Displaying Category Values


Displaying Category Values

values,values,values
displaying category labels and values,displaying category labels and values,displaying category labels and values
displaying category values,displaying category values,displaying category values
values and value labels,values and value labels,values and value labels

There's only one small problem with the preceding table--it may be hard to interpret the mean value without knowing the underlying category values on which it is based. Is a mean of 2.34 somewhere between A great deal and Only some--or is it somewhere between Only some and Hardly any?

Although we can't address this problem directly in Custom Tables, we can address it in a more general way.

From the menus, choose:

Edit
Options...

In the Options dialog box, click the Output Labels tab.

In the Pivot Table Labeling group, select Values and Labels from the Variable values in labels shown as drop-down list.

Expand Show details Collapse Hide details
Output labeling options

Click OK to save this setting.

Open the table builder (Analyze menu, Tables, Custom Tables) and click OK to create the table again.

Values and labels displayed for variable categories

The category values make it clear that a mean of 2.34 is somewhere between Only some and Hardly any. Displaying the category values in the table makes it much easier to interpret the value of custom total summary statistics, such as the mean.

This display setting is a global setting that affects all pivot table output from all procedures and persists across sessions until you change it. To change the setting back to display only value labels:

From the menus, choose:

Edit
Options...

In the Options dialog box, click the Output Labels tab.

In the Pivot Table Labeling group, select Labels from the Variable values in labels shown as drop-down list.

Click OK to save this setting.

Related Topics

Custom Total Summary Statistics for Categorical Variables


Summarizing Scale Variables

A wide range of summary statistics are available for scale variables. In addition to the counts and percentages available for categorical variables, summary statistics for scale variables also include:

• Mean

• Median

• Percentiles

• Sum

• Standard deviation

• Range

• Minimum and maximum values

See the topic Summary Statistics for Scale Variables and Categorical Custom Totals for more information.

Sample Data File

The examples in this section use the data file survey_sample.sav. See the topic Sample Files for more information.

All examples provided here display variable labels in dialog boxes, sorted in alphabetical order. Variable list display properties are specified on the General tab in the Options dialog box (Edit menu, Options).

Related Topics

Stacked Scale Variables
Multiple Summary Statistics
Count, Valid N, and Missing Values
Different Summaries for Different Variables
Group Summaries in Categories
Multiple Grouping Variables
Nesting Categorical Variables within Scale Variables


Stacked Scale Variables

stacking variables,stacking variables,stacking variables
scale variables,scale variables,scale variables
scale variables,scale variables,scale variables
stacking,stacking,stacking
summary statistics,summary statistics,summary statistics
mean,mean,mean

This example uses the data file survey_sample.sav. See the topic Sample Files for more information.

You can summarize multiple scale variables in the same table by stacking them in the table.

From the menus, choose:

Analyze
Tables
Custom Tables...

In the table builder, click Age of respondent in the variable list, Ctrl-click Highest year of school completed, and Ctrl-click Hours per day watching TV to select all three variables.

Drag and drop the three selected variables to the Rows area of the canvas pane.

Expand Show details Collapse Hide details
Stacked scale variables in table builder

The three variables are stacked in the row dimension. Since all three variables are scale variables, no categories are displayed, and the default summary statistic is the mean.

Click OK to create the table.

Table of mean values of stacked scale variables

Related Topics

Summarizing Scale Variables
Multiple Summary Statistics
Count, Valid N, and Missing Values
Different Summaries for Different Variables
Group Summaries in Categories
Multiple Grouping Variables
Nesting Categorical Variables within Scale Variables


Multiple Summary Statistics

median,median,median
scale variables,scale variables,scale variables
multiple summary statistics,multiple summary statistics,multiple summary statistics

By default, the mean is displayed for scale variables; however, you can choose other summary statistics for scale variables, and you can display more than one summary statistic.

Open the table builder (Analyze menu, Tables, Custom Tables).

Right-click any one of the three scale variables in the table preview on the canvas pane and select Summary Statistics from the pop-up context menu.

In the Summary Statistics dialog box, select Median in the Statistics list and click the arrow to add it to the Display list. (You can use the arrow to move selected statistics from the Statistics list to the Display list, or you can drag and drop selected statistics from the Statistics list into the Display list.)

Click the Format cell for the median in the Display list and select nnnn from the drop-down list of formats.

In the Decimals cell, type 1.

Make the same changes for the mean in the Display list.

Expand Show details Collapse Hide details
Mean and median selected in Summary Statistics dialog box

Click Apply to All to apply these changes to all three scale variables.

Click OK in the table builder to create the table.

Mean and median displayed in table of stacked scale variables

Related Topics

Summarizing Scale Variables
Stacked Scale Variables
Count, Valid N, and Missing Values
Different Summaries for Different Variables
Group Summaries in Categories
Multiple Grouping Variables
Nesting Categorical Variables within Scale Variables


Count, Valid N, and Missing Values

count,count,count
vs. valid N,vs. valid N,vs. valid N
missing values,missing values,missing values
valid N,valid N,valid N

It is often useful to display the number of cases used to compute summary statistics, such as the mean, and you might assume (not unreasonably) that the summary statistic Count would provide that information. However, this will not give you an accurate case base if there are any missing values. To obtain an accurate case base, use Valid N.

Open the table builder (Analyze menu, Tables, Custom Tables).

Right-click any one of the three scale variables in the table preview on the canvas pane and select Summary Statistics from the pop-up context menu.

In the Summary Statistics dialog box, select Count in the Statistics list and click the arrow to add it to the Display list.

Then select Valid N in the Statistics list and click the arrow to add it to the Display list.

Click Apply to All to apply these changes to all three scale variables.

Click OK in the table builder to create the table.

Count versus Valid N

For all three variables, Count is the same: 2,832. Not coincidentally, this is the total number of cases in the data file. Since the scale variables aren't nested within any categorical variables, Count simply represents the total number of cases in the data file.

Valid N, on the other hand, is different for each variable and differs quite a lot from Count for Hours per day watching TV. This is because there is a large number of missing values for this variable--that is, cases with no value recorded for this variable or values defined as representing missing data (such as a code of 99 to represent Not Applicable for pregnancy in males).

Open the table builder (Analyze menu, Tables, Custom Tables).

Right-click any one of the three scale variables in the table preview on the canvas pane and select Summary Statistics from the pop-up context menu.

In the Summary Statistics dialog box, select Valid N in the Display list and click the arrow key to move it back to the Statistics list, removing it from the Display list.

Select Count in the Display list and click the arrow key to move it back to the Statistics list, removing it from the Display list.

Select Missing in the Statistics list and click the arrow key to add it to the Display list.

Click Apply to All to apply these changes to all three scale variables.

Click OK in the table builder to create the table.

Number of missing values displayed in table of scale summary statistics

The table now displays the number of missing values for each scale variable. This makes it quite apparent that Hours per day watching TV has a large number of missing values, whereas the other two variables have very few. This may be a factor to consider before putting a great deal of faith in the summary values for that variable.

Related Topics

Summarizing Scale Variables
Stacked Scale Variables
Multiple Summary Statistics
Different Summaries for Different Variables
Group Summaries in Categories
Multiple Grouping Variables
Nesting Categorical Variables within Scale Variables


Different Summaries for Different Variables

stacking variables,stacking variables,stacking variables
different summary statistics for different variables,different summary statistics for different variables,different summary statistics for different variables
different summary statistics for different variables,different summary statistics for different variables,different summary statistics for different variables
stacked tables,stacked tables,stacked tables
summary statistics,summary statistics,summary statistics
different summaries for different variables in stacked tables,different summaries for different variables in stacked tables,different summaries for different variables in stacked tables

In addition to displaying multiple summary statistics, you can display different summary statistics for different scale variables in a stacked table. For example, the previous table revealed that only one of the three variables has a large number of missing values; so you might want to show the number of missing values for only that one variable.

Open the table builder (Analyze menu, Tables, Custom Tables).

Click Age of respondent in the table preview on the canvas pane, and then Ctrl-click Highest year of school completed to select both variables.

Right-click either of the two selected variables and select Summary Statistics from the pop-up context menu.

In the Summary Statistics dialog box, select Missing in the Display list and click the arrow key to move it back to the Statistics list, removing it from the Display list.

Click Apply to Selection to apply the change to only the two selected variables.

Expand Show details Collapse Hide details
Table preview for different summary statistics for different variables

The placeholders in the data cells of the table indicate that the number of missing values will be displayed only for Hours per day watching TV.

Click OK to create the table.

Table of different summary statistics for different variables

Although this table provides the information that we want, the layout may make it difficult to interpret the table. Somebody reading the table might think that the blank cells in the Missing column indicate zero missing values for those variables.

Open the table builder (Analyze menu, Tables, Custom Tables).

In the Summary Statistics group in the table builder, select Rows from the Position drop-down list.

Expand Show details Collapse Hide details
Moving summary statistics from the column dimension to the row dimension

Click OK to create the table.

Summary statistics and variables both displayed in the row dimension

Now it's clear that the table reports the number of missing values for only one variable.

Related Topics

Summarizing Scale Variables
Stacked Scale Variables
Multiple Summary Statistics
Count, Valid N, and Missing Values
Group Summaries in Categories
Multiple Grouping Variables
Nesting Categorical Variables within Scale Variables


Group Summaries in Categories

scale variables,scale variables,scale variables
grouped summaries,grouped summaries,grouped summaries
grouped summaries,grouped summaries,grouped summaries
scale variables,scale variables,scale variables

You can use categorical variables as grouping variables to display scale variable summaries within groups defined by the categories of the categorical variable.

Open the table builder (Analyze menu, Tables, Custom Tables).

Drag and drop Gender from the variable list into the Columns area of the canvas pane.

If you right-click Gender in the table preview on the canvas pane, you will see that Summary Statistics is disabled on the pop-up context menu. This is because in a table with scale variables, the scale variables are always the statistics source variables.

Click OK to create the table.

Grouped scale summaries using a categorical column variable

This table makes it easy to compare the averages (mean and median) for males and females, and it clearly shows that there isn't much difference between them--which may not be terribly interesting but might be useful information.

Related Topics

Summarizing Scale Variables
Stacked Scale Variables
Multiple Summary Statistics
Count, Valid N, and Missing Values
Different Summaries for Different Variables
Multiple Grouping Variables
Nesting Categorical Variables within Scale Variables


Multiple Grouping Variables

scale variables,scale variables,scale variables
summaries grouped by row and column categorical variables,summaries grouped by row and column categorical variables,summaries grouped by row and column categorical variables

You can subdivide the groups further by nesting and/or using both row and column categorical grouping variables.

Open the table builder (Analyze menu, Tables, Custom Tables).

Drag and drop Get news from internet from the variable list to the far left side of the Rows area of the canvas pane. Make sure to position it so that all three scale variables are nested within it, not just one of them.

Expand Show details Collapse Hide details
Correct: All three scale variables nested within the categorical variable
Expand Show details Collapse Hide details
Wrong: Only one scale variable nested within the categorical variable

Although there may be times when you want something like the second example above, it's not what we want in this case.

Click OK to create the table.

Scale summaries grouped by categorical row and column variables

Related Topics

Summarizing Scale Variables
Stacked Scale Variables
Multiple Summary Statistics
Count, Valid N, and Missing Values
Different Summaries for Different Variables
Group Summaries in Categories
Nesting Categorical Variables within Scale Variables


Nesting Categorical Variables within Scale Variables

scale variables,scale variables,scale variables
nesting,nesting,nesting
nesting variables,nesting variables,nesting variables
scale variables,scale variables,scale variables
summary statistics source variable,summary statistics source variable,summary statistics source variable
scale variables,scale variables,scale variables

Although the above table may provide the information you want, it may not provide it in the easiest format to interpret. For example, you can compare the average age of men who use the Internet to get news and those who don't--but it would be easier to do if the values were next to each other rather than separated. Swapping the positions of the two row variables and nesting the categorical grouping variable within the three scale variables might improve the table. With scale variables, nesting level has no effect on the statistics source variable. The scale variable is always the statistics source variable regardless of nesting level.

Open the table builder (Analyze menu, Tables, Custom Tables).

Click Age of respondent in the table preview on the canvas pane, Ctrl-click Highest year of school completed, and Ctrl-click Hours per day watching TV to select all three scale variables.

Drag and drop the three scale variables onto the far left side of the Rows area, nesting the categorical variable Get news from internet within each of the three scale variables.

Click OK to create the table.

Categorical row variable nested within stacked scale variables

The choice of nesting order depends on the relationships or comparisons that you want to emphasize in the table. Changing the nesting order of the scale variables doesn't change the summary statistics values; it changes only their relative positions in the table.

Related Topics

Summarizing Scale Variables
Stacked Scale Variables
Multiple Summary Statistics
Count, Valid N, and Missing Values
Different Summaries for Different Variables
Group Summaries in Categories
Multiple Grouping Variables


Test Statistics

Custom Tables,Custom Tables,Custom Tables
test statistics,test statistics,test statistics
test statistics,test statistics,test statistics
Custom Tables,Custom Tables,Custom Tables

Three different tests of significance are available for studying the relationship between row and column variables. This chapter discusses the output of each of these tests, with special attention to the effects of nesting and stacking. See the topic Stacking, Nesting, and Layers with Categorical Variables for more information.

Sample Data File

The examples in this chapter use the data file survey_sample.sav. See the topic Sample Files for more information.

Related Topics

Tests of Independence (Chi-Square)
Comparing Column Means
Comparing Column Proportions
A Note on Weights and Multiple Response Sets


Tests of Independence (Chi-Square)

chi-square,chi-square,chi-square
Custom Tables,Custom Tables,Custom Tables

This example uses the data file survey_sample.sav. See the topic Sample Files for more information.

The chi-square test of independence is used to determine whether there is a relationship between two categorical variables. For example, you may want to determine whether Labor force status is related to Marital status.

From the menus, choose:

Analyze
Tables
Custom Tables...

In the table builder, drag and drop Labor force status from the variable list into the Rows area of the canvas pane.

Drag and drop Marital status from the variable list into the Columns area.

Expand Show details Collapse Hide details
Variables displayed on canvas pane

Select Rows as the position for the summary statistics.

Select Labor force status and click Summary Statistics in the Define group.

Expand Show details Collapse Hide details
Summary Statistics dialog box

Select Column N % in the Statistics list and add it to the Display list.

Click Apply to Selection.

In the Custom Tables dialog box, click the Test Statistics tab.

Expand Show details Collapse Hide details
Test Statistics tab with the Tests of independence (chi-square) selected

Select Tests of independence (Chi-square).

Click OK to create the table and obtain the chi-square test.

Labor force status by Marital status

This table is a crosstabulation of Labor force status by Marital status, with counts and column proportions shown as the summary statistics. Column proportions are computed so that they sum to 100% down each column. If these two variables are unrelated, then in each row the proportions should be similar across columns. There appear to be differences in the proportions, but you can check the chi-square test to be sure.

Pearson's chi-square test

The test of independence hypothesizes that Labor force status and Marital status are unrelated--that is, that the column proportions are the same across columns, and any observed discrepancies are due to chance variation. The chi-square statistic measures the overall discrepancy between the observed cell counts and the counts you would expect if the column proportions were the same across columns. A larger chi-square statistic indicates a greater discrepancy between the observed and expected cell counts--greater evidence that the column proportions are not equal, that the hypothesis of independence is incorrect, and, therefore, that Labor force status and Marital status are related.

The computed chi-square statistic has a value of 729.242. In order to determine whether this is enough evidence to reject the hypothesis of independence, the significance value of the statistic is computed. The significance value is the probability that a random variate drawn from a chi-square distribution with 28 degrees of freedom is greater than 729.242. Since this value is less than the alpha level specified on the Test Statistics tab, you can reject the hypothesis of independence at the 0.05 level. Thus, Labor force status and Marital status are in fact related.

Related Topics

Test Statistics
Comparing Column Means
Comparing Column Proportions
A Note on Weights and Multiple Response Sets
Effects of Nesting and Stacking on Tests of Independence


Effects of Nesting and Stacking on Tests of Independence

The rule for tests of independence is as follows: a separate test is performed for each innermost subtable. To see how nesting affects the tests, consider the previous example, but with Marital status nested within levels of Gender.

Open the table builder again (Analyze menu, Tables, Custom Tables).

Drag and drop Gender from the variable list into the Columns area of the canvas pane above Marital status.

Click OK to create the table.

Pearson's chi-square test

With Marital status nested within levels of Gender, two tests are performed--one for each level of Gender. The significance value for each test indicates that you can reject the hypothesis of independence between Marital status and Labor force status for both males and females. However, the table notes that more than 20% of each table's cells have expected counts of less than 5, and the minimum expected cell count is less than 1. These notes indicate that the assumptions of the chi-square test may not be met by these tables, so the results of the tests are suspect.

Note: The footnotes may be cut off from view by the cell boundaries. You can make them visible by changing the alignment of these cells in the Cell Properties dialog box.

To see how stacking affects the tests:

Open the table builder again (Analyze menu, Tables, Custom Tables).

Drag and drop Highest degree from the variable list into the Rows area below Labor force status.

Click OK to create the table.

Pearson's chi-square test

With Highest degree stacked with Labor force status, four tests are performed--a test of the independence of Marital status and Labor force status, and a test of Marital status and Highest degree for each level of Gender. The test results for Marital status and Labor force status are the same as before. The test results for Marital status and Highest degree indicate these variables are not independent.

Related Topics

Tests of Independence (Chi-Square)


Comparing Column Means

column means statistics,column means statistics,column means statistics
custom tables,custom tables,custom tables

This example uses the data file survey_sample.sav. See the topic Sample Files for more information.

The column means tests are used to determine whether there is a relationship between a categorical variable in the Columns and a continuous variable in the Rows. Moreover, you can use the test results to determine the relative ordering of categories of the categorical variable in terms of the mean value of the continuous variable. For example, you may want to determine whether Hours per day watching TV is related to Get news from newspapers.

From the menus, choose:

Analyze
Tables
Custom Tables...

Click Reset to restore the default settings to all tabs.

In the table builder, drag and drop Hours per day watching TV from the variable list into the Rows area of the canvas pane.

Drag and drop Get news from newspapers from the variable list into the Columns area.

Expand Show details Collapse Hide details
Variables displayed on canvas pane

Select Hours per day watching TV and click Summary Statistics in the Define group.

Expand Show details Collapse Hide details
Summary Statistics dialog box

Select nnnn as the format.

Select 2 as the number of decimals to display. Notice that this causes the format to now read nnnn.nn.

Click Apply to Selection.

In the Custom Tables dialog box, click the Test Statistics tab.

Expand Show details Collapse Hide details
Test Statistics tab with Compare column means (t tests) selected

Select Compare column means (t-tests).

Click OK to create the table and obtain the column means tests.

Get news from newspapers by Hours per day watching TV

This table shows the mean Hours per day watching TV for people who do and do not get their news from newspapers. The observed difference in these means suggests that people who do not get their news from newspapers spend approximately 0.18 more hours watching TV than people who do get their news from newspapers. To see whether this difference is due to chance variation, check the column means tests.

Comparisons of column means

The column means test table assigns a letter key to each category of the column variable. For Get news from newspapers, the category No is assigned the letter A, and Yes is assigned the letter B. For each pair of columns, the column means are compared using a t test. Since there are only two columns, only one test is performed. For each significant pair, the key of the category with the smaller mean is placed under the category with larger mean. Since no keys are reported in the cells of the table, this means that the column means are not statistically different.

Significance Results in APA-style Notation

If you do not want the significance results in a separate table, you can choose to display them in the main table. Significance results are identified using an APA-style notation with subscript letters. Complete the previous steps for comparing column means, but make the following change on the Test Statistics tab:

In the Identify Significant Differences area, select In the main table using APA-style subscripts.

Expand Show details Collapse Hide details
Test Statistics tab with Compare column means (t tests) and In the main table using subscripts selected

Click OK to create the table and obtain the column means tests using APA-style notation.

Comparisons of column means using APA-style notation

The column means test table assigns a subscript letter to the categories of the column variable. For each pair of columns, the column means are compared using a t test. If a pair of values is significantly different, the values have different subscript letters assigned to them. Since there are only two columns, only one test is performed. Because the column means in this example share the same subscript letter, the column means are not statistically different.

Related Topics

Test Statistics
Tests of Independence (Chi-Square)
Comparing Column Proportions
A Note on Weights and Multiple Response Sets
Effects of Nesting and Stacking on Column Means Tests


Effects of Nesting and Stacking on Column Means Tests

The rule for column means tests is as follows: a separate set of pairwise tests is performed for each innermost subtable. To see how nesting affects the tests, consider the previous example, but with Hours per day watching TV nested within levels of Labor force status.

Open the table builder again (Analyze menu, Tables, Custom Tables).

Drag and drop Labor force status from the variable list into the Rows area of the canvas pane.

Click OK to create the table.

Comparisons of column means

With Hours per day watching TV nested within levels of Labor force status, seven sets of column means tests are performed: one for each level of Labor force status. The same letter keys are assigned to the categories of Get news from newspapers. For respondents working full time, the B key appears in the A column. This means that for full-time employees, the mean value of Hours per day watching TV is lower for people who get their news from newspapers. No other keys appear in the columns, so you can conclude that there are no other statistically significant differences in the column means.

Bonferroni adjustments. When multiple tests are performed, the Bonferroni adjustment is applied to column means tests to ensure that the alpha level (or false positive rate) specified on the Test Statistics tab applies to each set of tests. Thus, in this table, no Bonferroni adjustments were applied because although seven sets of tests are performed, within each set only one pair of columns is compared.

To see how stacking affects the tests:

Open the table builder again (Analyze menu, Tables, Custom Tables).

Drag and drop Get news from internet from the variable list into the Columns area to the left of Get news from newspapers.

Click OK to create the table.

Comparisons of column means

With Get news from internet stacked with Get news from newspapers, 14 sets of column means tests are performed--one for each level of Labor force status for Get news from internet and Get news from newspapers. Again, no Bonferroni adjustments are applied because within each set, only one pair of columns is compared. The tests for Get news from newspapers are the same as before. For Get news from internet, the category No is assigned the letter A and Yes is assigned the letter B. The B key is reported in the A column for each set of column means tests except for those respondents temporarily not working. This means that the mean value of Hours per day watching TV is lower for people who get their news from the Internet than for people who do not get their news from newspapers. No keys are reported for the Temporarily not working set; thus, the column means are not statistically different for these respondents.

Related Topics

Comparing Column Means


Comparing Column Proportions

column proportions statistics,column proportions statistics,column proportions statistics
custom tables,custom tables,custom tables

This example uses the data file survey_sample.sav. See the topic Sample Files for more information.

The column proportions tests are used to determine the relative ordering of categories of the Columns categorical variable in terms of the category proportions of the Rows categorical variable. For example, after using a chi-square test to find that Labor force status and Marital status are not independent, you may want to see which rows and columns are responsible for this relationship.

From the menus, choose:

Analyze
Tables
Custom Tables...

Click Reset to restore the default settings to all tabs.

In the table builder, drag and drop Labor force status from the variable list into the Rows area of the canvas pane.

Drag and drop Marital status from the variable list into the Columns area.

Expand Show details Collapse Hide details
Variables displayed on canvas pane

Select Labor force status and click Summary Statistics in the Define group.

Expand Show details Collapse Hide details
Summary Statistics dialog box

Select Column N % in the Statistics list and add it to the Display list.

Deselect Count from the Display list.

Click Apply to Selection.

In the Custom Tables dialog box, click the Test Statistics tab.

Expand Show details Collapse Hide details
Test Statistics tab with Compare column proportions (z tests) selected

Select Compare column proportions (z-tests).

Click OK to create the table and obtain the column proportions tests.

Labor force status by Marital status

This table is a crosstabulation of Labor force status by Marital status, with column proportions shown as the summary statistic.

Comparisons of column proportions

The column proportions test table assigns a letter key to each category of the column variables. For Marital status, the category Married is assigned the letter A, Widowed is assigned the letter B, and so on, through the category Never married, which is assigned the letter E. For each pair of columns, the column proportions are compared using a z test. Seven sets of column proportions tests are performed, one for each level of Labor force status. Since there are five levels of Marital status, (5*4)/2 = 10 pairs of columns are compared in each set of tests, and Bonferroni adjustments are used to adjust the significance values. For each significant pair, the key of the smaller category is placed under the category with the larger proportion.

For the set of tests associated with Working full time, the B key appears in each of the other columns. Also, the A key appears in the C column. No other keys are reported in other columns. Thus, you can conclude that the proportion of divorced persons who are working full time is greater than the proportion of married persons working full time, which in turn is greater than the proportion of widowers working full time. The proportions of people who are separated or never married and working full time cannot be differentiated from people who are divorced or married and working full time, but these proportions are greater than the proportion of widowers working full time.

For the tests associated with Working part time or School, the A, B, and C keys appear in the E column. No other keys are reported in other columns. Thus, the proportions of people who have never been married and are in school or are working part time are greater than the proportions of married, widowed, or divorced people who are in school or working part time.

For the tests associated with Temporarily not working or with Other labor status, no other keys are reported in any columns. Thus, there is no discernible difference in the proportions of married, widowed, divorced, separated, or never-married people who are temporarily not working or are in an otherwise uncategorized employment situation.

The tests associated with Retired show that the proportion of widowers who are retired is greater than the proportions of all other marital categories who are retired. Moreover, the proportions of married or divorced people who are retired is greater than the proportion of never-married persons who are retired.

There are greater proportions of people married, widowed, or separated and keeping house than proportions of people divorced or never married and keeping house.

The proportion of people who have never been married and are Unemployed, laid off is higher than the proportions of people who are married or widowed and unemployed. Also, note that the Separated column is marked with a ".", which indicates that the observed proportion of separated people in the Unemployed, laid off row is either 0 or 1, and therefore no comparisons can be made using that column for unemployed respondents.

Significance Results in APA-style Notation

If you do not want the significance results in a separate table, you can choose to display them in the main table. Significance results are identified using an APA-style notation with subscript letters. Complete the previous steps for comparing column proportions, but make the following change on the Test Statistics tab:

In the Identify Significant Differences area, select In the main table using APA-style subscripts.

Expand Show details Collapse Hide details
Test Statistics tab with Compare column proportions (z tests) and In the main table using subscripts selected

Click OK to create the table and obtain the column means tests using APA-style notation.

Comparisons of column proportions using APA-style notation

The column proportions test table assigns a subscript letter to the categories of the column variable. For each pair of columns, the column proportions are compared using a z test. If a pair of values is significantly different, the values have different subscript letters assigned to them.

For the set of tests associated with Working full time, the Widowed category has a subscript letter not used in the other columns. Also, the Married category and Divorced category share the same subscript letters, as do the Separated and Never Married categories. Considering these subscript letters and the actual proportions shown in the table, you can make the same analysis as demonstrated in the previous example with separate tables. Thus, you can conclude that the proportion of divorced persons who are working full time is greater than the proportion of married persons working full time, which in turn is greater than the proportion of widowers working full time. The proportions of people who are separated or never married and working full time cannot be differentiated from people who are divorced or married and working full time, but these proportions are greater than the proportion of widowers working full time. The rest of the analysis from the previous example applies.

Related Topics

Test Statistics
Tests of Independence (Chi-Square)
Comparing Column Means
A Note on Weights and Multiple Response Sets
Effects of Nesting and Stacking on Column Proportions Tests


Effects of Nesting and Stacking on Column Proportions Tests

The rule for column proportions tests is as follows: a separate set of pairwise tests is performed for each innermost subtable. To see how nesting affects the tests, consider the previous example, but with Labor force status nested within levels of Gender.

Open the table builder again (Analyze menu, Tables, Custom Tables).

Drag and drop Gender from the variable list into the Rows area of the canvas pane.

Click OK to create the table.

Comparisons of column proportions

With Labor force status nested within levels of Gender, 14 sets of column proportions tests are performed--one for each level of Labor force status for each level of Gender. The same letter keys are assigned to the categories of Marital status.

There are a couple of things to note about the table results:

• With more tests, there are more columns with zero column proportion. They are most common among separated respondents and widowed males.

• The column differences previously seen among respondents keeping house seems to be entirely due to females.

To see how stacking affects the tests:

Open the table builder again (Analyze menu, Tables, Custom Tables).

Drag and drop Highest degree from the variable list into the Rows area below Gender.

Click OK to create the table.

Comparisons of column proportions

With Highest degree stacked with Gender, 19 sets of column means tests are performed--the 14 previously discussed plus one for each level of Highest degree. The same letter keys are assigned to the categories of Marital status.

There are a few things to note about the table results:

• The test results for the 14 previously run sets of tests are the same.

• People who have less than a high school degree are more common among widowers than among married, divorced, or never-married respondents.

• People with some post-high school education tend to be more common among those people who are married, divorced, and never married than among widowers.

Related Topics

Comparing Column Proportions


A Note on Weights and Multiple Response Sets

multiple response sets,multiple response sets,multiple response sets
significance testing,significance testing,significance testing
Custom Tables,Custom Tables,Custom Tables
significance testing and multiple response,significance testing and multiple response,significance testing and multiple response

Case weights are always based on counts, not responses, even when one of the variables is a multiple response variable.

Related Topics

Test Statistics
Tests of Independence (Chi-Square)
Comparing Column Means
Comparing Column Proportions


Multiple Response Sets

Custom Tables,Custom Tables,Custom Tables
multiple response sets,multiple response sets,multiple response sets
multiple response sets,multiple response sets,multiple response sets

Custom Tables and the Chart Builder support a special kind of "variable" called a multiple response set. Multiple response sets aren't really "variables" in the normal sense. You can't see them in the Data Editor, and other procedures don't recognize them. Multiple response sets use multiple variables to record responses to questions where the respondent can give more than one answer. Multiple response sets are treated like categorical variables, and most of the things you can do with categorical variables, you can also do with multiple response sets.

Multiple response sets are constructed from multiple variables in the data file. A multiple response set is a special construct within a data file. You can define and save multiple response sets in PASW Statistics data files, but you cannot import or export multiple response sets from/to other file formats. You can copy multiple response sets from other PASW Statistics data files using Copy Data Properties, which is accessed from the Data menu in the Data Editor window. See the topic Copying Data Properties for more information.

For more information on multiple response sets, see Defining Multiple Response Sets

Related Topics

Multiple Response Sets
Defining Multiple Response Sets
MRSETS


Missing Values

missing values,missing values,missing values
user-missing values,user-missing values,user-missing values
system-missing values,system-missing values,system-missing values

Many data files contain a certain amount of missing data. A wide variety of factors can result in missing data. For example, survey respondents may not answer every question, certain variables may not be applicable to some cases, and coding errors may result in some values being thrown out.

There are two kinds of missing values in PASW Statistics:

• User-missing. Values defined as containing missing data. Value labels can be assigned to these values to identify why the data are missing (such as a code of 99 and a value label of Not Applicable for pregnancy in males).

• System-missing. If no value is present for a numeric variable, it is assigned the system-missing value. This is indicated by a period in the Data View of the Data Editor.

There are a number of facilities that can help to compensate for the effects of missing data and even analyze patterns in missing data. This section, however, has a much simpler goal: to describe how Custom Tables handles missing data and how missing data affect the computation of summary statistics.

Sample Data File

The examples in this section use the data file missing_values.sav. See the topic Sample Files for more information. This is a very simple, completely artificial data file, with only one variable and ten cases, designed to illustrate basic concepts about missing values.

Related Topics

Tables without Missing Values
Including Missing Values in Tables


Tables without Missing Values

This example uses the data file survey_sample.sav. See the topic Sample Files for more information.

By default, user-missing categories are not displayed in custom tables (and system-missing values are never displayed).

From the menus, choose:

Analyze
Tables
Custom Tables...

In the table builder, drag and drop Variable with missing values (the only variable in the file) from the variable list into the Rows area of the canvas pane.

Right-click the variable on the canvas pane and select Categories and Totals from the pop-up context menu.

Click (check) Total in the Categories and Totals dialog box, and then click Apply.

Right-click Variable with missing values in the table preview on the canvas pane again and select Summary Statistics from the pop-up context menu.

In the Summary Statistics dialog box, select Column N % in the Statistics list and click the arrow to add it to the Display list.

Click Apply to Selection.

Expand Show details Collapse Hide details
Table preview without missing values

You may notice a slight discrepancy between the categories displayed in the table preview on the canvas pane and the categories displayed in the Categories list (below the variable list on the left side of the table builder). The Categories list contains a category labeled Missing Values that isn't included in the table preview because missing value categories are excluded by default. Since "values" is plural in the label, this indicates that the variable has two or more user-missing categories.

Click OK to create the table.

Table without missing values

Everything in this table is perfectly fine. The category values add up to the totals, and the percentages accurately reflect the values you'd get using the total count as the percentage base (for example, 3/7= 0.429, or 42.9%). The total count, however, is not the total number of cases in the data file; it's the total number of cases with non-missing values, or cases that don't have user-missing or system-missing values for that variable.

Related Topics

Missing Values
Including Missing Values in Tables


Including Missing Values in Tables

missing values,missing values,missing values
including in custom tables,including in custom tables,including in custom tables
effect on percentage calculations,effect on percentage calculations,effect on percentage calculations
percentages,percentages,percentages
missing values,missing values,missing values
valid N,valid N,valid N
total N,total N,total N

Open the table builder (Analyze menu, Tables, Custom Tables).

Right-click Variable with missing values in the table preview on the canvas pane and select Categories and Totals from the pop-up context menu.

Click (check) Missing Values in the Categories and Totals dialog box, and then click Apply.

Expand Show details Collapse Hide details
Table preview with missing values category displayed

Now the table preview includes a Missing Values category. Although the table preview displays only one category for missing values, all user-missing categories will be displayed in the table.

Right-click Variable with missing values in the table preview on the canvas pane again and select Summary Statistics from the pop-up context menu.

In the Summary Statistics dialog box, click (check) Custom Summary Statistics for Totals and Subtotals.

Select Valid N in the custom summary Statistics list and click the arrow to add it to the Display list.

Do the same for Total N.

Click Apply to Selection, and then click OK in the table builder to create the table.

Table with missing values

The two defined user-missing categories--Don't know and Not applicable--are now displayed in the table, and the total count is now 9 instead of 7, reflecting the addition of the two cases with user-missing values (one in each user-missing category). The column percentages are also different now, because they are based on the number of non-missing and user-missing values. Only system-missing values are not included in the percentage calculation.

Valid N shows the total number of non-missing cases (7), and Total N shows the total number of cases, including both user-missing and system-missing. The total number of cases is 10, one more than the count of non-missing and user-missing values displayed as the total in the Count column. This is because there's one case with a system-missing value.

Open the table builder (Analyze menu, Tables, Custom Tables).

Right-click Variable with missing values in the table preview on the canvas pane and select Summary Statistics from the pop-up context menu.

Select Column Valid N % in the top Statistics list (not the custom summaries for totals and subtotals) and click the arrow to add it to the Display list.

Do the same for Column Total N %.

You can also add them both to the list of custom summary statistics for totals and subtotals.

Click Apply to Selection, and then click OK to create the table.

Table with missing values and valid and total percentages

• Column N % is the percentage in each category based on the number of non-missing and user-missing values (since user-missing values have been explicitly included in the table).

• Column Valid N % is the percentage in each category based on only the valid, non-missing cases. These values are the same as the column percentages were in the original table that did not include user-missing values.

• Column Total N % is the percentage in each category based on all cases, including both user-missing and system-missing. If you add up the individual category percentages in this category, you'll see that they add up to only 90%, because one case out of the total of 10 cases (10%) has the system-missing value. Although this case is included in the base for the percentage calculations, no category is provided in the table for cases with system-missing values.

Related Topics

Missing Values
Tables without Missing Values


Formatting and Customizing Tables

Custom Tables provides the ability to control a number of table-formatting properties as part of the table-building process, including:

• Display format and labels for summary statistics

• Minimum and maximum data column width

• Text or value displayed in empty cells

These settings persist within the table builder interface (until you change them, reset the table builder settings, or open a different data file), enabling you to create multiple tables with the same formatting properties without manually editing the tables after creating them. You can also save these formatting settings, along with all of the other table parameters, using the Paste button in the table builder interface to paste command syntax into a syntax window, which you can then save as a file.

You can also change many formatting properties of tables after they have been created, using all of the formatting capabilities available in the Viewer for pivot tables. This chapter, however, focuses on controlling table formatting properties before the table is created. For more information on pivot tables, use the Index tab in the Help system and type pivot tables as the keyword.

Sample Data File

The examples in this chapter use the data file survey_sample.sav. See the topic Sample Files for more information.

All examples provided here display variable labels in dialog boxes, sorted in alphabetical order. Variable list display properties are set on the General tab in the Options dialog box (Edit menu, Options).

Related Topics

Summary Statistics Display Format
Display Labels for Summary Statistics
Column Width
Display Value for Empty Cells
Display Value for Missing Statistics


Summary Statistics Display Format

decimal places,decimal places,decimal places
controlling number of decimals displayed in custom tables,controlling number of decimals displayed in custom tables,controlling number of decimals displayed in custom tables
summary statistics,summary statistics,summary statistics
display format,display format,display format
display formats,display formats,display formats
summary statistics in custom tables,summary statistics in custom tables,summary statistics in custom tables

This example uses the data file survey_sample.sav. See the topic Sample Files for more information.

Custom Tables attempts to apply relatively intelligent default formats to summary statistics, but there will probably be times when you want to override these defaults.

From the menus, choose:

Analyze
Tables
Custom Tables...

In the table builder, drag and drop Age category from the variable list into the Rows area on the canvas pane.

Drag and drop Confidence in television below Age category in the Rows area, stacking the two variables in the row dimension.

Right-click Age category in the table preview on the canvas pane and select Select All Row Variables from the pop-up context menu.

Right-click Age category again and select Categories and Totals from the pop-up context menu.

In the Categories and Totals dialog box, select (check) Total and then click Apply.

Right-click either variable in the table preview on the canvas pane and select Summary Statistics from the pop-up context menu.

Select Column N % in the Statistics list and click the arrow key to add it to the Display list.

Select (check) Custom Summary Statistics for Totals and Subtotals.

In the Statistics list for custom summary statistics, select Column N % and click the arrow to add it to the Display list.

Do the same for Mean.

Then click Apply to All.

Expand Show details Collapse Hide details
Default display formats in table preview

The placeholder values in the table preview reflect the default format for each summary statistic.

• For counts, the default display format is nnnn--integer values with no decimal places.

• For percentages, the default display format is nnnn.n%--numbers with a single decimal place and a percentage sign after the value.

• For the mean, the default display format is different for the two variables.

For summary statistics that aren't some form of count (including Valid N and Total N) or percentage, the default display format is the display format defined for the variable in the Data Editor. If you look at the variables in Variable View in the Data Editor, you will see that Age category (variable agecat) is defined as having two decimal positions, while Confidence in television (variable contv) is defined as having zero decimal positions.

Expand Show details Collapse Hide details
Variable View in the Data Editor

This is one of those cases where the default format probably isn't the format you want, since it would probably be better if both mean values displayed the same number of decimals.

Right-click either variable in the table preview on the canvas pane and select Summary Statistics from the pop-up context menu.

Expand Show details Collapse Hide details
Summary Statistics dialog box

For the mean, the Format cell in the Display list indicates that the format is Auto, which means that the defined display format for the variable will be used, and the Decimals cell is disabled. In order to specify the number of decimals, you first need to select a different format.

In the custom summary statistics Display list, click the Format cell for the mean, and select nnnn from the drop-down list of formats.

In the Decimals cell, enter a value of 1.

Then click Apply to All to apply this setting to both variables.

Expand Show details Collapse Hide details
Table preview with user-specified summary statistics display formats

Now the table preview indicates that both mean values will be displayed with one decimal position. (You could go ahead and create this table now--but you might find the "mean" value for Age category a little difficult to interpret, since the actual numeric codes for this variable range only from 1 to 6.)

Related Topics

Formatting and Customizing Tables
Display Labels for Summary Statistics
Column Width
Display Value for Empty Cells
Display Value for Missing Statistics


Display Labels for Summary Statistics

summary statistics,summary statistics,summary statistics
changing label text,changing label text,changing label text
labels,labels,labels
changing label text for summary statistics,changing label text for summary statistics,changing label text for summary statistics

This example uses the data file survey_sample.sav. See the topic Sample Files for more information.

In addition to the display formats for summary statistics, you can also control the descriptive labels for each summary statistic.

Open the table builder (Analyze menu, Tables, Custom Tables).

Click Reset to clear any previous settings in the table builder.

In the table builder, drag and drop Age category from the variable list into the Rows area on the canvas pane.

Drag and drop How get paid last week from the variable list into the Columns area on the canvas pane.

Right-click Age category in the table preview on the canvas pane and select Summary Statistics from the pop-up context menu.

Select Column N % in the Statistics list and click the arrow key to add it to the Display list.

Double-click anywhere in the word Column in the Label cell in the Display list to edit the contents of the cell. Delete the word Column from the label, changing the label to simply %.

Edit the Label cell for Count in the same way, changing the label to simply N.

While we're here, let's change the format of the Column N % statistic to remove the unnecessary percentage sign (since the column label indicates that the column contains percentages).

Click the Format cell for Column N % and select nnnn.n from the drop-down list of formats.

Expand Show details Collapse Hide details
Summary Statistics dialog box with modified labels and formats

Then click Apply to Selection.

Expand Show details Collapse Hide details
Table preview with modified summary statistics labels

The table preview displays the modified display format and the modified labels.

Click OK to create the table.

Table with modified summary statistics labels

Related Topics

Formatting and Customizing Tables
Summary Statistics Display Format
Column Width
Display Value for Empty Cells
Display Value for Missing Statistics


Column Width

column width,column width,column width
controlling in custom tables,controlling in custom tables,controlling in custom tables

You may have noticed that the table in the above example is rather wide. One solution to this problem would be to simply swap the row and column variables. Another solution is to make the columns narrower, since they seem to be much wider than necessary. (In fact, the reason we shortened the summary statistics labels was so that we could make the columns narrower.)

Open the table builder (Analyze menu, Tables, Custom Tables).

Click the Options tab.

In the Width for Data Columns group, select Custom.

For the Maximum, type 36. (Make sure that the Units setting is Points.)

Expand Show details Collapse Hide details
Custom Tables dialog box, Options tab

Click OK to create the table.

Table with reduced column widths

Now the table is much more compact.

Related Topics

Formatting and Customizing Tables
Summary Statistics Display Format
Display Labels for Summary Statistics
Display Value for Empty Cells
Display Value for Missing Statistics


Display Value for Empty Cells

empty cells,empty cells,empty cells
displayed value in custom tables,displayed value in custom tables,displayed value in custom tables

By default, a 0 is displayed in empty cells (cells that contain no cases). You can instead display nothing in these cells (leave them blank) or specify a text string to display in empty cells.

Open the table builder (Analyze menu, Tables, Custom Tables).

Click the Options tab.

In the Data Cell Appearance group, for Empty Cells select Text and type None.

Click OK to create the table.

Table with "None" displayed in empty cells

Now the four empty cells in the table display the text None instead of a value of 0.

Related Topics

Formatting and Customizing Tables
Summary Statistics Display Format
Display Labels for Summary Statistics
Column Width
Display Value for Missing Statistics


Display Value for Missing Statistics

If a statistic cannot be computed, the default display value is a period (.), which is the symbol used to indicate the system-missing value. This is different from an "empty" cell, and therefore the display value for missing statistics is controlled separately from the display value for cells that contain no cases.

Open the table builder (Analyze menu, Tables, Custom Tables).

Drag and drop Hours per day watching TV from the variable list to the top of the Columns area on the canvas, above How get paid last week.

Since Hours per day watching TV is a scale variable, it automatically becomes the statistics source variable and the summary statistic changes to the mean.

Right-click Hours per day watching TV in the table preview in the canvas pane and select Summary Statistics from the pop-up context menu.

Select Valid N in the Statistics list and click the arrow key to add it to the Display list.

Expand Show details Collapse Hide details
Summary Statistics dialog box for scale variables

Click Apply to Selection.

Click the Options tab.

In the text field for Statistics that Cannot be Computed, type NA.

Expand Show details Collapse Hide details
Changing the display value for statistics that cannot be computed

Click OK to create the table.

Table with "NA" displayed for missing statistics

The text NA is displayed for the mean in three cells in the table. In each case, the corresponding Valid N value explains why: There are no cases with which to compute the mean.

You may, however, notice what appears to be a slight discrepancy—one of those three Valid N values is displayed as a 0, rather than the label None that is supposed to be displayed in cells with no cases. This is because although there are no valid cases to use to compute the mean, the category isn't really empty. If you go back to the original table with just the two categorical variables, you will see that there are, in fact, three cases in this crosstabulated category. There are no valid cases, however, because all three have missing values for the scale variable Hours per day watching TV.

Related Topics

Formatting and Customizing Tables
Summary Statistics Display Format
Display Labels for Summary Statistics
Column Width
Display Value for Empty Cells


Introduction to Time Series

A time series is a set of observations obtained by measuring a single variable regularly over a period of time. In a series of inventory data, for example, the observations might represent daily inventory levels for several months. A series showing the market share of a product might consist of weekly market share taken over a few years. A series of total sales figures might consist of one observation per month for many years. What each of these examples has in common is that some variable was observed at regular, known intervals over a certain length of time. Thus, the form of the data for a typical time series is a single sequence or list of observations representing measurements taken at regular intervals.

Daily inventory time series
Time | Week | Day | Inventory level
t1 | 1 | Monday | 160
t2 | 1 | Tuesday | 135
t3 | 1 | Wednesday | 129
t4 | 1 | Thursday | 122
t5 | 1 | Friday | 108
t6 | 2 | Monday | 150
 |  | ... |
t60 | 12 | Friday | 120

One of the most important reasons for doing time series analysis is to try to forecast future values of the series. A model of the series that explained the past values may also predict whether and how much the next few values will increase or decrease. The ability to make such predictions successfully is obviously important to any business or scientific field.


Time Series Data

When you define time series data for use with the Forecasting add-on module, each series corresponds to a separate variable. For example, to define a time series in the Data Editor, click the Variable View tab and enter a variable name in any blank row. Each observation in a time series corresponds to a case (a row in the Data Editor).

If you open a spreadsheet containing time series data, each series should be arranged in a column in the spreadsheet. If you already have a spreadsheet with time series arranged in rows, you can open it anyway and use Transpose on the Data menu to flip the rows into columns.

Related Topics

Transpose


Data Transformations

A number of data transformation procedures provided in the Core system are useful in time series analysis.

• The Define Dates procedure (on the Data menu) generates date variables used to establish periodicity and to distinguish between historical, validation, and forecasting periods. Forecasting is designed to work with the variables created by the Define Dates procedure.

• The Create Time Series procedure (on the Transform menu) creates new time series variables as functions of existing time series variables. It includes functions that use neighboring observations for smoothing, averaging, and differencing.

• The Replace Missing Values procedure (on the Transform menu) replaces system- and user-missing values with estimates based on one of several methods. Missing data at the beginning or end of a series pose no particular problem; they simply shorten the useful length of the series. Gaps in the middle of a series (embedded missing data) can be a much more serious problem.

Related Topics

Create Time Series
Define Dates
Replace Missing Values


Estimation and Validation Periods

historical period,historical period,historical period
validation period,validation period,validation period
estimation period,estimation period,estimation period
holdout cases,holdout cases,holdout cases

It is often useful to divide your time series into an estimation, or historical, period and a validation period. You develop a model on the basis of the observations in the estimation (historical) period and then test it to see how well it works in the validation period. By forcing the model to make predictions for points you already know (the points in the validation period), you get an idea of how well the model does at forecasting.

The cases in the validation period are typically referred to as holdout cases because they are held-back from the model-building process. The estimation period consists of the currently selected cases in the active dataset. Any remaining cases following the last selected case can be used as holdouts. Once you're satisfied that the model does an adequate job of forecasting, you can redefine the estimation period to include the holdout cases, and then build your final model.


Building Models and Producing Forecasts

The Forecasting add-on module provides two procedures for accomplishing the tasks of creating models and producing forecasts.

• The Time Series Modeler procedure creates models for time series, and produces forecasts. It includes an Expert Modeler that automatically determines the best model for each of your time series. For experienced analysts who desire a greater degree of control, it also provides tools for custom model building.

• The Apply Time Series Models procedure applies existing time series models--created by the Time Series Modeler--to the active dataset. This allows you to obtain forecasts for series for which new or revised data are available, without rebuilding your models. If there's reason to think that a model has changed, it can be rebuilt using the Time Series Modeler.


Time Series Modeler

Time Series Modeler,Time Series Modeler,Time Series Modeler

The Time Series Modeler procedure estimates exponential smoothing, univariate Autoregressive Integrated Moving Average (ARIMA), and multivariate ARIMA (or transfer function models) models for time series, and produces forecasts. The procedure includes an Expert Modeler that automatically identifies and estimates the best-fitting ARIMA or exponential smoothing model for one or more dependent variable series, thus eliminating the need to identify an appropriate model through trial and error. Alternatively, you can specify a custom ARIMA or exponential smoothing model.

Example. You are a product manager responsible for forecasting next month's unit sales and revenue for each of 100 separate products, and have little or no experience in modeling time series. Your historical unit sales data for all 100 products is stored in a single Excel spreadsheet. After opening your spreadsheet in PASW Statistics, you use the Expert Modeler and request forecasts one month into the future. The Expert Modeler finds the best model of unit sales for each of your products, and uses those models to produce the forecasts. Since the Expert Modeler can handle multiple input series, you only have to run the procedure once to obtain forecasts for all of your products. Choosing to save the forecasts to the active dataset, you can easily export the results back to Excel.

Statistics. Goodness-of-fit measures: stationary R-square, R-square (R2), root mean square error (RMSE), mean absolute error (MAE), mean absolute percentage error (MAPE), maximum absolute error (MaxAE), maximum absolute percentage error (MaxAPE), normalized Bayesian information criterion (BIC). Residuals: autocorrelation function, partial autocorrelation function, Ljung-Box Q. For ARIMA models: ARIMA orders for dependent variables, transfer function orders for independent variables, and outlier estimates. Also, smoothing parameter estimates for exponential smoothing models.

Plots. Summary plots across all models: histograms of stationary R-square, R-square (R2), root mean square error (RMSE), mean absolute error (MAE), mean absolute percentage error (MAPE), maximum absolute error (MaxAE), maximum absolute percentage error (MaxAPE), normalized Bayesian information criterion (BIC); box plots of residual autocorrelations and partial autocorrelations. Results for individual models: forecast values, fit values, observed values, upper and lower confidence limits, residual autocorrelations and partial autocorrelations.

Show me

Time Series Modeler Data Considerations Collapse Hide details

Time Series Modeler Data Considerations

Data. The dependent variable and any independent variables should be numeric.

Assumptions. The dependent variable and any independent variables are treated as time series, meaning that each case represents a time point, with successive cases separated by a constant time interval.

• Stationarity. For custom ARIMA models, the time series to be modeled should be stationary. The most effective way to transform a nonstationary series into a stationary one is through a difference transformation--available from the Create Time Series dialog box.

• Forecasts. For producing forecasts using models with independent (predictor) variables, the active dataset should contain values of these variables for all cases in the forecast period. Additionally, independent variables should not contain any missing values in the estimation period.

Defining Dates Collapse Hide details

Defining Dates

Although not required, it's recommended to use the Define Dates dialog box to specify the date associated with the first case and the time interval between successive cases. This is done prior to using the Time Series Modeler and results in a set of variables that label the date associated with each case. It also sets an assumed periodicity of the data--for example, a periodicity of 12 if the time interval between successive cases is one month. This periodicity is required if you're interested in creating seasonal models. If you're not interested in seasonal models and don't require date labels on your output, you can skip the Define Dates dialog box. The label associated with each case is then simply the case number.

To Use the Time Series Modeler Collapse Hide details

To Use the Time Series Modeler

This feature requires the Forecasting option.

From the menus choose:

Analyze
Forecasting
Create Models...

Expand Show details Collapse Hide details
Time Series Modeler, Variables tab

On the Variables tab, select one or more dependent variables to be modeled.

From the Method drop-down box, select a modeling method. For automatic modeling, leave the default method of Expert Modeler. This will invoke the Expert Modeler to determine the best-fitting model for each of the dependent variables.

To produce forecasts:

Click the Options tab.

Specify the forecast period. This will produce a chart that includes forecasts and observed values.

Optionally, you can:

• Select one or more independent variables. Independent variables are treated much like predictor variables in regression analysis but are optional. They can be included in ARIMA models but not exponential smoothing models. If you specify Expert Modeler as the modeling method and include independent variables, only ARIMA models will be considered.

• Click Criteria to specify modeling details.

• Save predictions, confidence intervals, and noise residuals.

• Save the estimated models in XML format. Saved models can be applied to new or revised data to obtain updated forecasts without rebuilding models. This is accomplished with the Apply Time Series Models procedure.

• Obtain summary statistics across all estimated models.

• Specify transfer functions for independent variables in custom ARIMA models.

• Enable automatic detection of outliers.

• Model specific time points as outliers for custom ARIMA models.

Time Series Modeler,Time Series Modeler,Time Series Modeler
Expert Modeler,Expert Modeler,Expert Modeler
ARIMA,ARIMA,ARIMA
exponential smoothing,exponential smoothing,exponential smoothing
models,models,models
Expert Modeler,Expert Modeler,Expert Modeler
ARIMA,ARIMA,ARIMA
exponential smoothing,exponential smoothing,exponential smoothing
Expert Modeler,Expert Modeler,Expert Modeler
ARIMA models,ARIMA models,ARIMA models
exponential smoothing models,exponential smoothing models,exponential smoothing models
Modeling Methods Collapse Hide details

Modeling Methods

The available modeling methods are:

Expert Modeler. The Expert Modeler automatically finds the best-fitting model for each dependent series. If independent (predictor) variables are specified, the Expert Modeler selects, for inclusion in ARIMA models, those that have a statistically significant relationship with the dependent series. Model variables are transformed where appropriate using differencing and/or a square root or natural log transformation. By default, the Expert Modeler considers both exponential smoothing and ARIMA models. You can, however, limit the Expert Modeler to only search for ARIMA models or to only search for exponential smoothing models. You can also specify automatic detection of outliers.

Exponential Smoothing. Use this option to specify a custom exponential smoothing model. You can choose from a variety of exponential smoothing models that differ in their treatment of trend and seasonality.

ARIMA. Use this option to specify a custom ARIMA model. This involves explicitly specifying autoregressive and moving average orders, as well as the degree of differencing. You can include independent (predictor) variables and define transfer functions for any or all of them. You can also specify automatic detection of outliers or specify an explicit set of outliers.

estimation period,estimation period,estimation period
in Time Series Modeler,in Time Series Modeler,in Time Series Modeler
forecast period,forecast period,forecast period
in Time Series Modeler,in Time Series Modeler,in Time Series Modeler
Time Series Modeler,Time Series Modeler,Time Series Modeler
estimation period,estimation period,estimation period
forecast period,forecast period,forecast period
Estimation and Forecast Periods Collapse Hide details

Estimation and Forecast Periods

Estimation Period. The estimation period defines the set of cases used to determine the model. By default, the estimation period includes all cases in the active dataset. To set the estimation period, select Based on time or case range in the Select Cases dialog box. Depending on available data, the estimation period used by the procedure may vary by dependent variable and thus differ from the displayed value. For a given dependent variable, the true estimation period is the period left after eliminating any contiguous missing values of the variable occurring at the beginning or end of the specified estimation period.

Forecast Period. The forecast period begins at the first case after the estimation period, and by default goes through to the last case in the active dataset. You can set the end of the forecast period from the Options tab.

This procedure pastes TSMODEL command syntax.

See TSMODEL Algorithms for computational details for this procedure.

Related Topics

Specifying Options for the Expert Modeler
Custom Exponential Smoothing Models
Custom ARIMA Models
Output
Saving Model Predictions and Model Specifications
Options
Apply Time Series Models
Define Dates
Create Time Series
TSMODEL
TSAPPLY


Specifying Options for the Expert Modeler

The Expert Modeler provides options for constraining the set of candidate models, specifying the handling of outliers, and including event variables.

Related Topics

Time Series Modeler
Custom Exponential Smoothing Models
Custom ARIMA Models
Output
Saving Model Predictions and Model Specifications
Options
Model Selection and Event Specification
Handling Outliers with the Expert Modeler


Model Selection and Event Specification

Time Series Modeler,Time Series Modeler,Time Series Modeler
events,events,events
periodicity,periodicity,periodicity
periodicity,periodicity,periodicity
in Time Series Modeler,in Time Series Modeler,in Time Series Modeler
events,events,events
in Time Series Modeler,in Time Series Modeler,in Time Series Modeler
Expert Modeler,Expert Modeler,Expert Modeler
limiting the model space,limiting the model space,limiting the model space
Expand Show details Collapse Hide details
Expert Modeler Criteria dialog box, Model tab

The Model tab allows you to specify the types of models considered by the Expert Modeler and to specify event variables.

Model Type. The following options are available:

• All models. The Expert Modeler considers both ARIMA and exponential smoothing models.

• Exponential smoothing models only. The Expert Modeler only considers exponential smoothing models.

• ARIMA models only. The Expert Modeler only considers ARIMA models.

Expert Modeler considers seasonal models. This option is only enabled if a periodicity has been defined for the active dataset. When this option is selected (checked), the Expert Modeler considers both seasonal and nonseasonal models. If this option is not selected, the Expert Modeler only considers nonseasonal models.

Current Periodicity. Indicates the periodicity (if any) currently defined for the active dataset. The current periodicity is given as an integer--for example, 12 for annual periodicity, with each case representing a month. The value None is displayed if no periodicity has been set. Seasonal models require a periodicity. You can set the periodicity from the Define Dates dialog box.

events,events,events

Events. Select any independent variables that are to be treated as event variables. For event variables, cases with a value of 1 indicate times at which the dependent series are expected to be affected by the event. Values other than 1 indicate no effect.

To Specify Options for the Expert Modeler Collapse Hide details

This feature requires the Forecasting option.

From the menus choose:

Analyze
Forecasting
Create Model...

On the Variables tab, select Expert Modeler for Method.

Click Criteria....

Select the model type and optionally select any independent variables that are to be treated as event variables.

Optionally, click the Outliers tab and specify the handling of outliers.

Related Topics

Specifying Options for the Expert Modeler
Handling Outliers with the Expert Modeler


Handling Outliers with the Expert Modeler

Time Series Modeler,Time Series Modeler,Time Series Modeler
outliers,outliers,outliers
Expert Modeler,Expert Modeler,Expert Modeler
outliers,outliers,outliers
outliers,outliers,outliers
Expert Modeler,Expert Modeler,Expert Modeler
additive outlier,additive outlier,additive outlier
in Time Series Modeler,in Time Series Modeler,in Time Series Modeler
level shift outlier,level shift outlier,level shift outlier
in Time Series Modeler,in Time Series Modeler,in Time Series Modeler
innovational outlier,innovational outlier,innovational outlier
in Time Series Modeler,in Time Series Modeler,in Time Series Modeler
transient outlier,transient outlier,transient outlier
in Time Series Modeler,in Time Series Modeler,in Time Series Modeler
seasonal additive outlier,seasonal additive outlier,seasonal additive outlier
in Time Series Modeler,in Time Series Modeler,in Time Series Modeler
local trend outlier,local trend outlier,local trend outlier
in Time Series Modeler,in Time Series Modeler,in Time Series Modeler
additive patch outlier,additive patch outlier,additive patch outlier
in Time Series Modeler,in Time Series Modeler,in Time Series Modeler
Expand Show details Collapse Hide details
Expert Modeler Criteria dialog box, Outliers tab

The Outliers tab allows you to choose automatic detection of outliers as well as the type of outliers to detect.

Detect outliers automatically. By default, automatic detection of outliers is not performed. Select (check) this option to perform automatic detection of outliers, then select one or more of the following outlier types:

• Additive

• Level shift

• Innovational

• Transient

• Seasonal additive

• Local trend

• Additive patch

To Specify Handling of Outliers for the Expert Modeler Collapse Hide details

This feature requires the Forecasting option.

From the menus choose:

Analyze
Forecasting
Create Model...

On the Variables tab, select Expert Modeler for Method.

Click Criteria....

Click the Outliers tab.

Related Topics

Specifying Options for the Expert Modeler
Model Selection and Event Specification


Custom Exponential Smoothing Models

Time Series Modeler,Time Series Modeler,Time Series Modeler
exponential smoothing,exponential smoothing,exponential smoothing
series transformation,series transformation,series transformation
periodicity,periodicity,periodicity
models,models,models
exponential smoothing,exponential smoothing,exponential smoothing
natural log transformation,natural log transformation,natural log transformation
in Time Series Modeler,in Time Series Modeler,in Time Series Modeler
log transformation,log transformation,log transformation
in Time Series Modeler,in Time Series Modeler,in Time Series Modeler
square root transformation,square root transformation,square root transformation
in Time Series Modeler,in Time Series Modeler,in Time Series Modeler
periodicity,periodicity,periodicity
in Time Series Modeler,in Time Series Modeler,in Time Series Modeler
exponential smoothing models,exponential smoothing models,exponential smoothing models
simple exponential smoothing model,simple exponential smoothing model,simple exponential smoothing model
Holt's exponential smoothing model,Holt's exponential smoothing model,Holt's exponential smoothing model
Brown's exponential smoothing model,Brown's exponential smoothing model,Brown's exponential smoothing model
damped exponential smoothing model,damped exponential smoothing model,damped exponential smoothing model
simple seasonal exponential smoothing model,simple seasonal exponential smoothing model,simple seasonal exponential smoothing model
Winters' exponential smoothing model,Winters' exponential smoothing model,Winters' exponential smoothing model
additive,additive,additive
multiplicative,multiplicative,multiplicative
Expand Show details Collapse Hide details
Exponential Smoothing Criteria dialog box

Model Type. Exponential smoothing models (Gardner, 1985) are classified as either seasonal or nonseasonal. Seasonal models are only available if a periodicity has been defined for the active dataset (see "Current Periodicity" below).

• Simple. This model is appropriate for series in which there is no trend or seasonality. Its only smoothing parameter is level. Simple exponential smoothing is most similar to an ARIMA model with zero orders of autoregression, one order of differencing, one order of moving average, and no constant.

• Holt's linear trend. This model is appropriate for series in which there is a linear trend and no seasonality. Its smoothing parameters are level and trend, which are not constrained by each other's values. Holt's model is more general than Brown's model but may take longer to compute for large series. Holt's exponential smoothing is most similar to an ARIMA model with zero orders of autoregression, two orders of differencing, and two orders of moving average.

• Brown's linear trend. This model is appropriate for series in which there is a linear trend and no seasonality. Its smoothing parameters are level and trend, which are assumed to be equal. Brown's model is therefore a special case of Holt's model. Brown's exponential smoothing is most similar to an ARIMA model with zero orders of autoregression, two orders of differencing, and two orders of moving average, with the coefficient for the second order of moving average equal to the square of one-half of the coefficient for the first order.

• Damped trend. This model is appropriate for series with a linear trend that is dying out and with no seasonality. Its smoothing parameters are level, trend, and damping trend. Damped exponential smoothing is most similar to an ARIMA model with 1 order of autoregression, 1 order of differencing, and 2 orders of moving average.

• Simple seasonal. This model is appropriate for series with no trend and a seasonal effect that is constant over time. Its smoothing parameters are level and season. Simple seasonal exponential smoothing is most similar to an ARIMA model with zero orders of autoregression, one order of differencing, one order of seasonal differencing, and orders 1, p, and p + 1 of moving average, where p is the number of periods in a seasonal interval (for monthly data, p = 12).

• Winters' additive. This model is appropriate for series with a linear trend and a seasonal effect that does not depend on the level of the series. Its smoothing parameters are level, trend, and season. Winters' additive exponential smoothing is most similar to an ARIMA model with zero orders of autoregression, one order of differencing, one order of seasonal differencing, and p + 1 orders of moving average, where p is the number of periods in a seasonal interval (for monthly data, p = 12).

• Winters' multiplicative. This model is appropriate for series with a linear trend and a seasonal effect that depends on the level of the series. Its smoothing parameters are level, trend, and season. Winters' multiplicative exponential smoothing is not similar to any ARIMA model.

Current Periodicity. Indicates the periodicity (if any) currently defined for the active dataset. The current periodicity is given as an integer--for example, 12 for annual periodicity, with each case representing a month. The value None is displayed if no periodicity has been set. Seasonal models require a periodicity. You can set the periodicity from the Define Dates dialog box.

Dependent Variable Transformation. You can specify a transformation performed on each dependent variable before it is modeled.

• None. No transformation is performed.

• Square root. Square root transformation.

• Natural log. Natural log transformation.

To Specify a Custom Exponential Smoothing Model Collapse Hide details

This feature requires the Forecasting option.

From the menus choose:

Analyze
Forecasting
Create Model...

On the Variables tab, select Exponential Smoothing for Method.

Click Criteria....

Select the type of exponential smoothing model, and optionally select a dependent variable transformation.

Related Topics

Time Series Modeler
Specifying Options for the Expert Modeler
Custom ARIMA Models
Output
Saving Model Predictions and Model Specifications
Options


Custom ARIMA Models

The Time Series Modeler allows you to build custom nonseasonal or seasonal ARIMA (Autoregressive Integrated Moving Average) models--also known as Box-Jenkins (Box, Jenkins, and Reinsel, 1994) models--with or without a fixed set of predictor variables. You can define transfer functions for any or all of the predictor variables, and specify automatic detection of outliers, or specify an explicit set of outliers.

• All independent (predictor) variables specified on the Variables tab are explicitly included in the model. This is in contrast to using the Expert Modeler where independent variables are only included if they have a statistically significant relationship with the dependent variable.

Related Topics

Time Series Modeler
Specifying Options for the Expert Modeler
Custom Exponential Smoothing Models
Output
Saving Model Predictions and Model Specifications
Options
Model Specification for Custom ARIMA Models
Transfer Functions in Custom ARIMA Models
Outliers in Custom ARIMA Models


Model Specification for Custom ARIMA Models

Time Series Modeler,Time Series Modeler,Time Series Modeler
ARIMA,ARIMA,ARIMA
series transformation,series transformation,series transformation
periodicity,periodicity,periodicity
periodicity,periodicity,periodicity
in Time Series Modeler,in Time Series Modeler,in Time Series Modeler
natural log transformation,natural log transformation,natural log transformation
in Time Series Modeler,in Time Series Modeler,in Time Series Modeler
log transformation,log transformation,log transformation
in Time Series Modeler,in Time Series Modeler,in Time Series Modeler
square root transformation,square root transformation,square root transformation
in Time Series Modeler,in Time Series Modeler,in Time Series Modeler
Expand Show details Collapse Hide details
ARIMA Criteria dialog box, Model tab
difference transformation,difference transformation,difference transformation
ARIMA models,ARIMA models,ARIMA models
seasonal difference transformation,seasonal difference transformation,seasonal difference transformation
ARIMA models,ARIMA models,ARIMA models
models,models,models
ARIMA,ARIMA,ARIMA
ARIMA models,ARIMA models,ARIMA models
autoregressive orders,autoregressive orders,autoregressive orders
differencing orders,differencing orders,differencing orders
moving average orders,moving average orders,moving average orders
seasonal orders,seasonal orders,seasonal orders
constant,constant,constant
autoregression,autoregression,autoregression
ARIMA models,ARIMA models,ARIMA models
integration,integration,integration
ARIMA models,ARIMA models,ARIMA models
moving average,moving average,moving average
ARIMA models,ARIMA models,ARIMA models
seasonal orders,seasonal orders,seasonal orders
ARIMA models,ARIMA models,ARIMA models

The Model tab allows you to specify the structure of a custom ARIMA model.

ARIMA Orders. Enter values for the various ARIMA components of your model into the corresponding cells of the Structure grid. All values must be non-negative integers. For autoregressive and moving average components, the value represents the maximum order. All positive lower orders will be included in the model. For example, if you specify 2, the model includes orders 2 and 1. Cells in the Seasonal column are only enabled if a periodicity has been defined for the active dataset (see "Current Periodicity" below).

• Autoregressive (p). The number of autoregressive orders in the model. Autoregressive orders specify which previous values from the series are used to predict current values. For example, an autoregressive order of 2 specifies that the value of the series two time periods in the past be used to predict the current value.

• Difference (d). Specifies the order of differencing applied to the series before estimating models. Differencing is necessary when trends are present (series with trends are typically nonstationary and ARIMA modeling assumes stationarity) and is used to remove their effect. The order of differencing corresponds to the degree of series trend--first-order differencing accounts for linear trends, second-order differencing accounts for quadratic trends, and so on.

• Moving Average (q). The number of moving average orders in the model. Moving average orders specify how deviations from the series mean for previous values are used to predict current values. For example, moving-average orders of 1 and 2 specify that deviations from the mean value of the series from each of the last two time periods be considered when predicting current values of the series.

Seasonal Orders. Seasonal autoregressive, moving average, and differencing components play the same roles as their nonseasonal counterparts. For seasonal orders, however, current series values are affected by previous series values separated by one or more seasonal periods. For example, for monthly data (seasonal period of 12), a seasonal order of 1 means that the current series value is affected by the series value 12 periods prior to the current one. A seasonal order of 1, for monthly data, is then the same as specifying a nonseasonal order of 12.

Current Periodicity. Indicates the periodicity (if any) currently defined for the active dataset. The current periodicity is given as an integer--for example, 12 for annual periodicity, with each case representing a month. The value None is displayed if no periodicity has been set. Seasonal models require a periodicity. You can set the periodicity from the Define Dates dialog box.

Dependent Variable Transformation. You can specify a transformation performed on each dependent variable before it is modeled.

• None. No transformation is performed.

• Square root. Square root transformation.

• Natural log. Natural log transformation.

Include constant in model. Inclusion of a constant is standard unless you are sure that the overall mean series value is 0. Excluding the constant is recommended when differencing is applied.

To Specify a Custom ARIMA Model Collapse Hide details

This feature requires the Forecasting option.

From the menus choose:

Analyze
Forecasting
Create Models...

On the Variables tab, select ARIMA for Method.

Click Criteria....

Related Topics

Custom ARIMA Models
Transfer Functions in Custom ARIMA Models
Outliers in Custom ARIMA Models


Transfer Functions in Custom ARIMA Models

Time Series Modeler,Time Series Modeler,Time Series Modeler
transfer functions,transfer functions,transfer functions
series transformation,series transformation,series transformation
periodicity,periodicity,periodicity
ARIMA models,ARIMA models,ARIMA models
transfer functions,transfer functions,transfer functions
transfer functions,transfer functions,transfer functions
transfer functions,transfer functions,transfer functions
numerator orders,numerator orders,numerator orders
denominator orders,denominator orders,denominator orders
difference orders,difference orders,difference orders
delay,delay,delay
seasonal orders,seasonal orders,seasonal orders
periodicity,periodicity,periodicity
in Time Series Modeler,in Time Series Modeler,in Time Series Modeler
natural log transformation,natural log transformation,natural log transformation
in Time Series Modeler,in Time Series Modeler,in Time Series Modeler
log transformation,log transformation,log transformation
in Time Series Modeler,in Time Series Modeler,in Time Series Modeler
square root transformation,square root transformation,square root transformation
in Time Series Modeler,in Time Series Modeler,in Time Series Modeler
Expand Show details Collapse Hide details
ARIMA Criteria dialog box, Transfer Function tab

The Transfer Function tab (only present if independent variables are specified) allows you to define transfer functions for any or all of the independent variables specified on the Variables tab. Transfer functions allow you to specify the manner in which past values of independent (predictor) variables are used to forecast future values of the dependent series.

Transfer Function Orders. Enter values for the various components of the transfer function into the corresponding cells of the Structure grid. All values must be non-negative integers. For numerator and denominator components, the value represents the maximum order. All positive lower orders will be included in the model. In addition, order 0 is always included for numerator components. For example, if you specify 2 for numerator, the model includes orders 2, 1, and 0. If you specify 3 for denominator, the model includes orders 3, 2, and 1. Cells in the Seasonal column are only enabled if a periodicity has been defined for the active dataset (see "Current Periodicity" below).

• Numerator. The numerator order of the transfer function. Specifies which previous values from the selected independent (predictor) series are used to predict current values of the dependent series. For example, a numerator order of 1 specifies that the value of an independent series one time period in the past--as well as the current value of the independent series--is used to predict the current value of each dependent series.

• Denominator. The denominator order of the transfer function. Specifies how deviations from the series mean, for previous values of the selected independent (predictor) series, are used to predict current values of the dependent series. For example, a denominator order of 1 specifies that deviations from the mean value of an independent series one time period in the past be considered when predicting the current value of each dependent series.

• Difference. Specifies the order of differencing applied to the selected independent (predictor) series before estimating models. Differencing is necessary when trends are present and is used to remove their effect.

Seasonal Orders. Seasonal numerator, denominator, and differencing components play the same roles as their nonseasonal counterparts. For seasonal orders, however, current series values are affected by previous series values separated by one or more seasonal periods. For example, for monthly data (seasonal period of 12), a seasonal order of 1 means that the current series value is affected by the series value 12 periods prior to the current one. A seasonal order of 1, for monthly data, is then the same as specifying a nonseasonal order of 12.

Current Periodicity. Indicates the periodicity (if any) currently defined for the active dataset. The current periodicity is given as an integer--for example, 12 for annual periodicity, with each case representing a month. The value None is displayed if no periodicity has been set. Seasonal models require a periodicity. You can set the periodicity from the Define Dates dialog box.

Delay. Setting a delay causes the independent variable's influence to be delayed by the number of intervals specified. For example, if the delay is set to 5, the value of the independent variable at time t doesn't affect forecasts until five periods have elapsed (t + 5).

Transformation. Specification of a transfer function, for a set of independent variables, also includes an optional transformation to be performed on those variables.

• None. No transformation is performed.

• Square root. Square root transformation.

• Natural log. Natural log transformation.

To Define Transfer Functions Collapse Hide details

This feature requires the Forecasting option.

From the menus choose:

Analyze
Forecasting
Create Models...

On the Variables tab, select ARIMA for Method.

Click Criteria....

Click the Transfer Function tab.

Select one or more independent variables and define the transfer function for the selected variable(s).

Optionally, select another set of variables and define a different transfer function for that set, and repeat for as many different transfer functions as are needed.

• You can update the transfer function for any set of variables by selecting that set of variables and entering the changes.

• Any existing transfer function for a variable is displayed when that variable is selected.

Related Topics

Custom ARIMA Models
Model Specification for Custom ARIMA Models
Outliers in Custom ARIMA Models


Outliers in Custom ARIMA Models

Time Series Modeler,Time Series Modeler,Time Series Modeler
outliers,outliers,outliers
ARIMA models,ARIMA models,ARIMA models
outliers,outliers,outliers
outliers,outliers,outliers
ARIMA models,ARIMA models,ARIMA models
additive outlier,additive outlier,additive outlier
in Time Series Modeler,in Time Series Modeler,in Time Series Modeler
level shift outlier,level shift outlier,level shift outlier
in Time Series Modeler,in Time Series Modeler,in Time Series Modeler
innovational outlier,innovational outlier,innovational outlier
in Time Series Modeler,in Time Series Modeler,in Time Series Modeler
transient outlier,transient outlier,transient outlier
in Time Series Modeler,in Time Series Modeler,in Time Series Modeler
seasonal additive outlier,seasonal additive outlier,seasonal additive outlier
in Time Series Modeler,in Time Series Modeler,in Time Series Modeler
local trend outlier,local trend outlier,local trend outlier
in Time Series Modeler,in Time Series Modeler,in Time Series Modeler
additive patch outlier,additive patch outlier,additive patch outlier
in Time Series Modeler,in Time Series Modeler,in Time Series Modeler
Expand Show details Collapse Hide details
ARIMA Criteria dialog box, Outliers tab

The Outliers tab provides the following choices for the handling of outliers (Pena, Tiao, and Tsay, 2001): detect them automatically, specify particular points as outliers, or do not detect or model them.

Do not detect outliers or model them. By default, outliers are neither detected nor modeled. Select this option to disable any detection or modeling of outliers.

Detect outliers automatically. Select this option to perform automatic detection of outliers, and select one or more of the following outlier types:

• Additive

• Level shift

• Innovational

• Transient

• Seasonal additive

• Local trend

• Additive patch

Model specific time points as outliers. Select this option to specify particular time points as outliers. Use a separate row of the Outlier Definition grid for each outlier. Enter values for all of the cells in a given row.

• Type. The outlier type. The supported types are: additive (default), level shift, innovational, transient, seasonal additive, and local trend.

Note 1: If no date specification has been defined for the active dataset, the Outlier Definition grid shows the single column Observation. To specify an outlier, enter the row number (as displayed in the Data Editor) of the relevant case.

Note 2: The Cycle column (if present) in the Outlier Definition grid refers to the value of the CYCLE_ variable in the active dataset.

To Enable Automatic Detection of Outliers or to Specify Explicit Outliers Collapse Hide details

This feature requires the Forecasting option.

From the menus choose:

Analyze
Forecasting
Create Models...

On the Variables tab, select ARIMA for Method.

Click Criteria....

Click the Outliers tab.

Related Topics

Custom ARIMA Models
Model Specification for Custom ARIMA Models
Transfer Functions in Custom ARIMA Models


Output

Available output includes results for individual models as well as results calculated across all models. Results for individual models can be limited to a set of best- or poorest-fitting models based on user-specified criteria.

Related Topics

Time Series Modeler
Specifying Options for the Expert Modeler
Custom Exponential Smoothing Models
Custom ARIMA Models
Saving Model Predictions and Model Specifications
Options
Statistics and Forecast Tables
Plots
Limiting Output to the Best- or Poorest-Fitting Models


Statistics and Forecast Tables

R2,R2,R2
in Time Series Modeler,in Time Series Modeler,in Time Series Modeler
stationary R2,stationary R2,stationary R2
in Time Series Modeler,in Time Series Modeler,in Time Series Modeler
root mean square error,root mean square error,root mean square error
in Time Series Modeler,in Time Series Modeler,in Time Series Modeler
RMSE,RMSE,RMSE
in Time Series Modeler,in Time Series Modeler,in Time Series Modeler
mean absolute percentage error,mean absolute percentage error,mean absolute percentage error
in Time Series Modeler,in Time Series Modeler,in Time Series Modeler
MAPE,MAPE,MAPE
in Time Series Modeler,in Time Series Modeler,in Time Series Modeler
mean absolute error,mean absolute error,mean absolute error
in Time Series Modeler,in Time Series Modeler,in Time Series Modeler
MAE,MAE,MAE
in Time Series Modeler,in Time Series Modeler,in Time Series Modeler
maximum absolute percentage error,maximum absolute percentage error,maximum absolute percentage error
in Time Series Modeler,in Time Series Modeler,in Time Series Modeler
MaxAPE,MaxAPE,MaxAPE
in Time Series Modeler,in Time Series Modeler,in Time Series Modeler
maximum absolute error,maximum absolute error,maximum absolute error
in Time Series Modeler,in Time Series Modeler,in Time Series Modeler
MaxAE,MaxAE,MaxAE
in Time Series Modeler,in Time Series Modeler,in Time Series Modeler
normalized BIC (Bayesian information criterion),normalized BIC (Bayesian information criterion),normalized BIC (Bayesian information criterion)
in Time Series Modeler,in Time Series Modeler,in Time Series Modeler
autocorrelation function,autocorrelation function,autocorrelation function
in Time Series Modeler,in Time Series Modeler,in Time Series Modeler
partial autocorrelation function,partial autocorrelation function,partial autocorrelation function
in Time Series Modeler,in Time Series Modeler,in Time Series Modeler
ACF,ACF,ACF
in Time Series Modeler,in Time Series Modeler,in Time Series Modeler
PACF,PACF,PACF
in Time Series Modeler,in Time Series Modeler,in Time Series Modeler
residuals,residuals,residuals
in Time Series Modeler,in Time Series Modeler,in Time Series Modeler
Box-Ljung statistic,Box-Ljung statistic,Box-Ljung statistic
in Time Series Modeler,in Time Series Modeler,in Time Series Modeler
goodness of fit,goodness of fit,goodness of fit
in Time Series Modeler,in Time Series Modeler,in Time Series Modeler
forecasts,forecasts,forecasts
in Time Series Modeler,in Time Series Modeler,in Time Series Modeler
Time Series Modeler,Time Series Modeler,Time Series Modeler
Box-Ljung statistic,Box-Ljung statistic,Box-Ljung statistic
forecasts,forecasts,forecasts
model parameters,model parameters,model parameters
goodness-of-fit statistics,goodness-of-fit statistics,goodness-of-fit statistics
residual autocorrelation function,residual autocorrelation function,residual autocorrelation function
residual partial autocorrelation function,residual partial autocorrelation function,residual partial autocorrelation function
statistics across all models,statistics across all models,statistics across all models
model parameters,model parameters,model parameters
in Time Series Modeler,in Time Series Modeler,in Time Series Modeler
Expand Show details Collapse Hide details
Time Series Modeler, Statistics tab

The Statistics tab provides options for displaying tables of the modeling results.

Display fit measures, Ljung-Box statistic, and number of outliers by model. Select (check) this option to display a table containing selected fit measures, Ljung-Box value, and the number of outliers for each estimated model.

Fit Measures. You can select one or more of the following for inclusion in the table containing fit measures for each estimated model:

• Stationary R-square

• R-square

• Root mean square error

• Mean absolute percentage error

• Mean absolute error

• Maximum absolute percentage error

• Maximum absolute error

• Normalized BIC

Statistics for Comparing Models. This group of options controls display of tables containing statistics calculated across all estimated models. Each option generates a separate table. You can select one or more of the following options:

• Goodness of fit. Table of summary statistics and percentiles for stationary R-square, R-square, root mean square error, mean absolute percentage error, mean absolute error, maximum absolute percentage error, maximum absolute error, and normalized Bayesian Information Criterion.

• Residual autocorrelation function (ACF). Table of summary statistics and percentiles for autocorrelations of the residuals across all estimated models.

• Residual partial autocorrelation function (PACF). Table of summary statistics and percentiles for partial autocorrelations of the residuals across all estimated models.

Statistics for Individual Models. This group of options controls display of tables containing detailed information for each estimated model. Each option generates a separate table. You can select one or more of the following options:

• Parameter estimates. Displays a table of parameter estimates for each estimated model. Separate tables are displayed for exponential smoothing and ARIMA models. If outliers exist, parameter estimates for them are also displayed in a separate table.

• Residual autocorrelation function (ACF). Displays a table of residual autocorrelations by lag for each estimated model. The table includes the confidence intervals for the autocorrelations.

• Residual partial autocorrelation function (PACF). Displays a table of residual partial autocorrelations by lag for each estimated model. The table includes the confidence intervals for the partial autocorrelations.

Display forecasts. Displays a table of model forecasts and confidence intervals for each estimated model. The forecast period is set from the Options tab.

To Select Output Tables Collapse Hide details

This feature requires the Forecasting option.

From the menus choose:

Analyze
Forecasting
Create Models...

Click the Statistics tab.

Related Topics

Output
Plots
Limiting Output to the Best- or Poorest-Fitting Models


Plots

R2,R2,R2
in Time Series Modeler,in Time Series Modeler,in Time Series Modeler
stationary R2,stationary R2,stationary R2
in Time Series Modeler,in Time Series Modeler,in Time Series Modeler
root mean square error,root mean square error,root mean square error
in Time Series Modeler,in Time Series Modeler,in Time Series Modeler
RMSE,RMSE,RMSE
in Time Series Modeler,in Time Series Modeler,in Time Series Modeler
mean absolute percentage error,mean absolute percentage error,mean absolute percentage error
in Time Series Modeler,in Time Series Modeler,in Time Series Modeler
MAPE,MAPE,MAPE
in Time Series Modeler,in Time Series Modeler,in Time Series Modeler
mean absolute error,mean absolute error,mean absolute error
in Time Series Modeler,in Time Series Modeler,in Time Series Modeler
MAE,MAE,MAE
in Time Series Modeler,in Time Series Modeler,in Time Series Modeler
maximum absolute percentage error,maximum absolute percentage error,maximum absolute percentage error
in Time Series Modeler,in Time Series Modeler,in Time Series Modeler
MaxAPE,MaxAPE,MaxAPE
in Time Series Modeler,in Time Series Modeler,in Time Series Modeler
maximum absolute error,maximum absolute error,maximum absolute error
in Time Series Modeler,in Time Series Modeler,in Time Series Modeler
MaxAE,MaxAE,MaxAE
in Time Series Modeler,in Time Series Modeler,in Time Series Modeler
normalized BIC (Bayesian information criterion),normalized BIC (Bayesian information criterion),normalized BIC (Bayesian information criterion)
in Time Series Modeler,in Time Series Modeler,in Time Series Modeler
goodness of fit,goodness of fit,goodness of fit
in Time Series Modeler,in Time Series Modeler,in Time Series Modeler
autocorrelation function,autocorrelation function,autocorrelation function
in Time Series Modeler,in Time Series Modeler,in Time Series Modeler
partial autocorrelation function,partial autocorrelation function,partial autocorrelation function
in Time Series Modeler,in Time Series Modeler,in Time Series Modeler
ACF,ACF,ACF
in Time Series Modeler,in Time Series Modeler,in Time Series Modeler
PACF,PACF,PACF
in Time Series Modeler,in Time Series Modeler,in Time Series Modeler
residuals,residuals,residuals
in Time Series Modeler,in Time Series Modeler,in Time Series Modeler
forecasts,forecasts,forecasts
in Time Series Modeler,in Time Series Modeler,in Time Series Modeler
fit values,fit values,fit values
in Time Series Modeler,in Time Series Modeler,in Time Series Modeler
historical data,historical data,historical data
in Time Series Modeler,in Time Series Modeler,in Time Series Modeler
confidence intervals,confidence intervals,confidence intervals
in Time Series Modeler,in Time Series Modeler,in Time Series Modeler
Time Series Modeler,Time Series Modeler,Time Series Modeler
forecasts,forecasts,forecasts
goodness-of-fit statistics,goodness-of-fit statistics,goodness-of-fit statistics
fit values,fit values,fit values
confidence intervals,confidence intervals,confidence intervals
residual autocorrelation function,residual autocorrelation function,residual autocorrelation function
residual partial autocorrelation function,residual partial autocorrelation function,residual partial autocorrelation function
statistics across all models,statistics across all models,statistics across all models
Expand Show details Collapse Hide details
Time Series Modeler, Plots tab

The Plots tab provides options for displaying plots of the modeling results.

Plots for Comparing Models

This group of options controls display of plots containing statistics calculated across all estimated models. Each option generates a separate plot. You can select one or more of the following options:

• Stationary R-square

• R-square

• Root mean square error

• Mean absolute percentage error

• Mean absolute error

• Maximum absolute percentage error

• Maximum absolute error

• Normalized BIC

• Residual autocorrelation function (ACF)

• Residual partial autocorrelation function (PACF)

Plots for Individual Models

Series. Select (check) this option to obtain plots of the predicted values for each estimated model. You can select one or more of the following for inclusion in the plot:

• Observed values. The observed values of the dependent series.

• Forecasts. The model predicted values for the forecast period.

• Fit values. The model predicted values for the estimation period.

• Confidence intervals for forecasts. The confidence intervals for the forecast period.

• Confidence intervals for fit values. The confidence intervals for the estimation period.

Residual autocorrelation function (ACF). Displays a plot of residual autocorrelations for each estimated model.

Residual partial autocorrelation function (PACF). Displays a plot of residual partial autocorrelations for each estimated model.

To Select Plots Collapse Hide details

This feature requires the Forecasting option.

From the menus choose:

Analyze
Forecasting
Create Models...

Click the Plots tab.

Related Topics

Output
Statistics and Forecast Tables
Limiting Output to the Best- or Poorest-Fitting Models


Limiting Output to the Best- or Poorest-Fitting Models

Time Series Modeler,Time Series Modeler,Time Series Modeler
best- and poorest-fitting models,best- and poorest-fitting models,best- and poorest-fitting models
Expand Show details Collapse Hide details
Time Series Modeler, Output Filter tab

The Output Filter tab provides options for restricting both tabular and chart output to a subset of the estimated models. You can choose to limit output to the best-fitting and/or the poorest-fitting models according to fit criteria you provide. By default, all estimated models are included in the output.

Best-fitting models. Select (check) this option to include the best-fitting models in the output. Select a goodness-of-fit measure and specify the number of models to include. Selecting this option does not preclude also selecting the poorest-fitting models. In that case, the output will consist of the poorest-fitting models as well as the best-fitting ones.

• Fixed number of models. Specifies that results are displayed for the n best-fitting models. If the number exceeds the number of estimated models, all models are displayed.

• Percentage of total number of models. Specifies that results are displayed for models with goodness-of-fit values in the top n percent across all estimated models.

Poorest-fitting models. Select (check) this option to include the poorest-fitting models in the output. Select a goodness-of-fit measure and specify the number of models to include. Selecting this option does not preclude also selecting the best-fitting models. In that case, the output will consist of the best-fitting models as well as the poorest-fitting ones.

• Fixed number of models. Specifies that results are displayed for the n poorest-fitting models. If the number exceeds the number of estimated models, all models are displayed.

• Percentage of total number of models. Specifies that results are displayed for models with goodness-of-fit values in the bottom n percent across all estimated models.

Goodness of Fit Measure. Select the goodness-of-fit measure to use for filtering models. The default is stationary R square.

To Filter the Output Collapse Hide details

This feature requires the Forecasting option.

From the menus choose:

Analyze
Forecasting
Create Models...

Click the Output Filter tab.

Related Topics

Output
Statistics and Forecast Tables
Plots


Saving Model Predictions and Model Specifications

save,save,save
model predictions,model predictions,model predictions
model specifications in XML,model specifications in XML,model specifications in XML
new variable names,new variable names,new variable names
Time Series Modeler,Time Series Modeler,Time Series Modeler
saving predictions,saving predictions,saving predictions
saving model specifications in XML,saving model specifications in XML,saving model specifications in XML
new variable names,new variable names,new variable names
XML,XML,XML
saving time series models in XML,saving time series models in XML,saving time series models in XML
variable names,variable names,variable names
in Time Series Modeler,in Time Series Modeler,in Time Series Modeler
Expand Show details Collapse Hide details
Time Series Modeler, Save tab

The Save tab allows you to save model predictions as new variables in the active dataset and save model specifications to an external file in XML format.

Save Variables. You can save model predictions, confidence intervals, and residuals as new variables in the active dataset. Each dependent series gives rise to its own set of new variables, and each new variable contains values for both the estimation and forecast periods. New cases are added if the forecast period extends beyond the length of the dependent variable series. Choose to save new variables by selecting the associated Save check box for each. By default, no new variables are saved.

• Predicted Values. The model predicted values.

• Lower Confidence Limits. Lower confidence limits for the predicted values.

• Upper Confidence Limits. Upper confidence limits for the predicted values.

• Noise Residuals. The model residuals. When transformations of the dependent variable are performed (for example, natural log), these are the residuals for the transformed series.

• Variable Name Prefix. Specify prefixes to be used for new variable names, or leave the default prefixes. Variable names consist of the prefix, the name of the associated dependent variable, and a model identifier. The variable name is extended if necessary to avoid variable naming conflicts. The prefix must conform to the rules for valid variable names.

Export Model File. Model specifications for all estimated models are exported to the specified file in XML format. Saved models can be used to obtain updated forecasts, based on more current data, using the Apply Time Series Models procedure.

To Save Variables or Export a Model File Collapse Hide details

This feature requires the Forecasting option.

From the menus choose:

Analyze
Forecasting
Create Model...

Click the Save tab.

Related Topics

Time Series Modeler
Specifying Options for the Expert Modeler
Custom Exponential Smoothing Models
Custom ARIMA Models
Output
Options


Options

Time Series Modeler,Time Series Modeler,Time Series Modeler
forecast period,forecast period,forecast period
confidence intervals,confidence intervals,confidence intervals
missing values,missing values,missing values
model names,model names,model names
forecast period,forecast period,forecast period
in Time Series Modeler,in Time Series Modeler,in Time Series Modeler
confidence intervals,confidence intervals,confidence intervals
in Time Series Modeler,in Time Series Modeler,in Time Series Modeler
missing values,missing values,missing values
in Time Series Modeler,in Time Series Modeler,in Time Series Modeler
model names,model names,model names
in Time Series Modeler,in Time Series Modeler,in Time Series Modeler
Expand Show details Collapse Hide details
Time Series Modeler, Options tab

The Options tab allows you to set the forecast period, specify the handling of missing values, set the confidence interval width, specify a custom prefix for model identifiers, and set the number of lags shown for autocorrelations.

Forecast Period. The forecast period always begins with the first case after the end of the estimation period (the set of cases used to determine the model) and goes through either the last case in the active dataset or a user-specified date. By default, the end of the estimation period is the last case in the active dataset, but it can be changed from the Select Cases dialog box by selecting Based on time or case range.

• First case after end of estimation period through last case in active dataset. Select this option when the end of the estimation period is prior to the last case in the active dataset, and you want forecasts through the last case. This option is typically used to produce forecasts for a holdout period, allowing comparison of the model predictions with a subset of the actual values.

• First case after end of estimation period through a specified date. Select this option to explicitly specify the end of the forecast period. This option is typically used to produce forecasts beyond the end of the actual series. Enter values for all of the cells in the Date grid.

If no date specification has been defined for the active dataset, the Date grid shows the single column Observation. To specify the end of the forecast period, enter the row number (as displayed in the Data Editor) of the relevant case.

The Cycle column (if present) in the Date grid refers to the value of the CYCLE_ variable in the active dataset.

User-Missing Values. These options control the handling of user-missing values.

• Treat as invalid. User-missing values are treated like system-missing values.

• Treat as valid. User-missing values are treated as valid data.

Missing Value Policy. The following rules apply to the treatment of missing values (includes system-missing values and user-missing values treated as invalid) during the modeling procedure:

• Cases with missing values of a dependent variable that occur within the estimation period are included in the model. The specific handling of the missing value depends on the estimation method.

• A warning is issued if an independent variable has missing values within the estimation period. For the Expert Modeler, models involving the independent variable are estimated without the variable. For custom ARIMA, models involving the independent variable are not estimated.

• If any independent variable has missing values within the forecast period, the procedure issues a warning and forecasts as far as it can.

Confidence Interval Width (%). Confidence intervals are computed for the model predictions and residual autocorrelations. You can specify any positive value less than 100. By default, a 95% confidence interval is used.

Prefix for Model Identifiers in Output. Each dependent variable specified on the Variables tab gives rise to a separate estimated model. Models are distinguished with unique names consisting of a customizable prefix along with an integer suffix. You can enter a prefix or leave the default of Model.

Maximum Number of Lags Shown in ACF and PACF Output. You can set the maximum number of lags shown in tables and plots of autocorrelations and partial autocorrelations.

To Set Options, Including the Forecast Period, Missing Values, and Confidence Intervals Collapse Hide details

This feature requires the Forecasting option.

From the menus choose:

Analyze
Forecasting
Create Models...

Click the Options tab.

Related Topics

Time Series Modeler
Specifying Options for the Expert Modeler
Custom Exponential Smoothing Models
Custom ARIMA Models
Output
Saving Model Predictions and Model Specifications


TSMODEL Command Additional Features

You can customize your time series modeling if you paste your selections into a syntax window and edit the resulting TSMODEL command syntax. The command syntax language allows you to:

• Specify the seasonal period of the data (with the SEASONLENGTH keyword on the AUXILIARY subcommand). This overrides the current periodicity (if any) for the active dataset.

• Specify nonconsecutive lags for custom ARIMA and transfer function components (with the ARIMA and TRANSFERFUNCTION subcommands). For example, you can specify a custom ARIMA model with autoregressive lags of orders 1, 3, and 6; or a transfer function with numerator lags of orders 2, 5, and 8.

• Provide more than one set of modeling specifications (for example, modeling method, ARIMA orders, independent variables, and so on) for a single run of the Time Series Modeler procedure (with the MODEL subcommand).

Related Topics

TSMODEL
Time Series Modeler


Apply Time Series Models

Apply Time Series Models,Apply Time Series Models,Apply Time Series Models

The Apply Time Series Models procedure loads existing time series models from an external file and applies them to the active dataset. You can use this procedure to obtain forecasts for series for which new or revised data are available, without rebuilding your models.Models are generated using the Time Series Modeler procedure.

Example. You are an inventory manager with a major retailer, and responsible for each of 5,000 products. You've used the Expert Modeler to create models that forecast sales for each product three months into the future. Your data warehouse is refreshed each month with actual sales data which you'd like to use to produce monthly updated forecasts. The Apply Time Series Models procedure allows you to accomplish this using the original models, and simply reestimating model parameters to account for the new data.

Statistics. Goodness-of-fit measures: stationary R-square, R-square (R2), root mean square error (RMSE), mean absolute error (MAE), mean absolute percentage error (MAPE), maximum absolute error (MaxAE), maximum absolute percentage error (MaxAPE), normalized Bayesian information criterion (BIC). Residuals: autocorrelation function, partial autocorrelation function, Ljung-Box Q.

Plots. Summary plots across all models: histograms of stationary R-square, R-square (R2), root mean square error (RMSE), mean absolute error (MAE), mean absolute percentage error (MAPE), maximum absolute error (MaxAE), maximum absolute percentage error (MaxAPE), normalized Bayesian information criterion (BIC); box plots of residual autocorrelations and partial autocorrelations. Results for individual models: forecast values, fit values, observed values, upper and lower confidence limits, residual autocorrelations and partial autocorrelations.

Show me

Apply Time Series Models Data Considerations Collapse Hide details

Apply Time Series Models Data Considerations

Data. Variables (dependent and independent) to which models will be applied should be numeric.

Assumptions. Models are applied to variables in the active dataset with the same names as the variables specified in the model. All such variables are treated as time series, meaning that each case represents a time point, with successive cases separated by a constant time interval.

• Forecasts. For producing forecasts using models with independent (predictor) variables, the active dataset should contain values of these variables for all cases in the forecast period. If model parameters are reestimated, then independent variables should not contain any missing values in the estimation period.

Defining Dates Collapse Hide details

Defining Dates

The Apply Time Series Models procedure requires that the periodicity, if any, of the active dataset matches the periodicity of the models to be applied. If you're simply forecasting using the same dataset (perhaps with new or revised data) as that used to the build the model, then this condition will be satisfied. If no periodicity exists for the active dataset, you will be given the opportunity to navigate to the Define Dates dialog box to create one. If, however, the models were created without specifying a periodicity, then the active dataset should also be without one.

To Apply Models Collapse Hide details

To Apply Models

This feature requires the Forecasting option.

From the menus choose:

Analyze
Forecasting
Apply Models...

Expand Show details Collapse Hide details
Apply Time Series Models, Models tab

Enter the file specification for a model file or click Browse and select a model file (model files are created with the Time Series Modeler procedure).

Optionally, you can:

• Reestimate model parameters using the data in the active dataset. Forecasts are created using the reestimated parameters.

• Save predictions, confidence intervals, and noise residuals.

• Save reestimated models in XML format.

estimation period,estimation period,estimation period
in Apply Time Series Models,in Apply Time Series Models,in Apply Time Series Models
forecast period,forecast period,forecast period
in Apply Time Series Models,in Apply Time Series Models,in Apply Time Series Models
reestimate model parameters,reestimate model parameters,reestimate model parameters
in Apply Time Series Models,in Apply Time Series Models,in Apply Time Series Models
Apply Time Series Models,Apply Time Series Models,Apply Time Series Models
estimation period,estimation period,estimation period
forecast period,forecast period,forecast period
reestimate model parameters,reestimate model parameters,reestimate model parameters
Model Parameters and Goodness of Fit Measures Collapse Hide details

Model Parameters and Goodness of Fit Measures

Load from model file. Forecasts are produced using the model parameters from the model file without reestimating those parameters. displayed in output and used to filter models (best- or worst-fitting) are taken from the model file and reflect the data used when each model was developed (or last updated). With this option, forecasts do not take into account historical data--for either dependent or independent variables--in the active dataset. You must choose Reestimate from data if you want historical data to impact the forecasts. In addition, forecasts do not take into account values of the dependent series in the forecast period--but they do take into account values of independent variables in the forecast period. If you have more current values of the dependent series and want them to be included in the forecasts, you need to reestimate, adjusting the estimation period to include these values.

Reestimate from data. Model parameters are reestimated using the data in the active dataset. Reestimation of model parameters has no effect on model structure. For example, an ARIMA(1,0,1) model will remain so, but the autoregressive and moving-average parameters will be reestimated. Reestimation does not result in the detection of new outliers. Outliers, if any, are always taken from the model file.

• Estimation Period. The estimation period defines the set of cases used to reestimate the model parameters. By default, the estimation period includes all cases in the active dataset. To set the estimation period, select Based on time or case range in the Select Cases dialog box. Depending on available data, the estimation period used by the procedure may vary by model and thus differ from the displayed value. For a given model, the true estimation period is the period left after eliminating any contiguous missing values, from the model's dependent variable, occurring at the beginning or end of the specified estimation period.

Forecast Period Collapse Hide details

Forecast Period

The forecast period for each model always begins with the first case after the end of the estimation period and goes through either the last case in the active dataset or a user-specified date. If parameters are not reestimated (this is the default), then the estimation period for each model is the set of cases used when the model was developed (or last updated).

• First case after end of estimation period through last case in active dataset. Select this option when the end of the estimation period is prior to the last case in the active dataset, and you want forecasts through the last case.

• First case after end of estimation period through a specified date. Select this option to explicitly specify the end of the forecast period. Enter values for all of the cells in the Date grid.

If no date specification has been defined for the active dataset, the Date grid shows the single column Observation. To specify the end of the forecast period, enter the row number (as displayed in the Data Editor) of the relevant case.

The Cycle column (if present) in the Date grid refers to the value of the CYCLE_ variable in the active dataset.

Related Topics

Output
Saving Model Predictions and Model Specifications
Options
Time Series Modeler
Define Dates
Create Time Series
TSAPPLY
TSMODEL


Output

Available output includes results for individual models as well as results across all models. Results for individual models can be limited to a set of best- or poorest-fitting models based on user-specified criteria.

Related Topics

Apply Time Series Models
Saving Model Predictions and Model Specifications
Options
Statistics and Forecast Tables
Plots
Limiting Output to the Best- or Poorest-Fitting Models


Statistics and Forecast Tables

R2,R2,R2
in Apply Time Series Models,in Apply Time Series Models,in Apply Time Series Models
stationary R2,stationary R2,stationary R2
in Apply Time Series Models,in Apply Time Series Models,in Apply Time Series Models
root mean square error,root mean square error,root mean square error
in Apply Time Series Models,in Apply Time Series Models,in Apply Time Series Models
RMSE,RMSE,RMSE
in Apply Time Series Models,in Apply Time Series Models,in Apply Time Series Models
mean absolute percentage error,mean absolute percentage error,mean absolute percentage error
in Apply Time Series Models,in Apply Time Series Models,in Apply Time Series Models
MAPE,MAPE,MAPE
in Apply Time Series Models,in Apply Time Series Models,in Apply Time Series Models
mean absolute error,mean absolute error,mean absolute error
in Apply Time Series Models,in Apply Time Series Models,in Apply Time Series Models
MAE,MAE,MAE
in Apply Time Series Models,in Apply Time Series Models,in Apply Time Series Models
maximum absolute percentage error,maximum absolute percentage error,maximum absolute percentage error
in Apply Time Series Models,in Apply Time Series Models,in Apply Time Series Models
MaxAPE,MaxAPE,MaxAPE
in Apply Time Series Models,in Apply Time Series Models,in Apply Time Series Models
maximum absolute error,maximum absolute error,maximum absolute error
in Apply Time Series Models,in Apply Time Series Models,in Apply Time Series Models
MaxAE,MaxAE,MaxAE
in Apply Time Series Models,in Apply Time Series Models,in Apply Time Series Models
normalized BIC (Bayesian information criterion),normalized BIC (Bayesian information criterion),normalized BIC (Bayesian information criterion)
in Apply Time Series Models,in Apply Time Series Models,in Apply Time Series Models
autocorrelation function,autocorrelation function,autocorrelation function
in Apply Time Series Models,in Apply Time Series Models,in Apply Time Series Models
partial autocorrelation function,partial autocorrelation function,partial autocorrelation function
in Apply Time Series Models,in Apply Time Series Models,in Apply Time Series Models
ACF,ACF,ACF
in Apply Time Series Models,in Apply Time Series Models,in Apply Time Series Models
PACF,PACF,PACF
in Apply Time Series Models,in Apply Time Series Models,in Apply Time Series Models
residuals,residuals,residuals
in Apply Time Series Models,in Apply Time Series Models,in Apply Time Series Models
Box-Ljung statistic,Box-Ljung statistic,Box-Ljung statistic
in Apply Time Series Models,in Apply Time Series Models,in Apply Time Series Models
goodness of fit,goodness of fit,goodness of fit
in Apply Time Series Models,in Apply Time Series Models,in Apply Time Series Models
forecasts,forecasts,forecasts
in Apply Time Series Models,in Apply Time Series Models,in Apply Time Series Models
Apply Time Series Models,Apply Time Series Models,Apply Time Series Models
Box-Ljung statistic,Box-Ljung statistic,Box-Ljung statistic
forecasts,forecasts,forecasts
model parameters,model parameters,model parameters
goodness-of-fit statistics,goodness-of-fit statistics,goodness-of-fit statistics
residual autocorrelation function,residual autocorrelation function,residual autocorrelation function
residual partial autocorrelation function,residual partial autocorrelation function,residual partial autocorrelation function
statistics across all models,statistics across all models,statistics across all models
model parameters,model parameters,model parameters
in Apply Time Series Models,in Apply Time Series Models,in Apply Time Series Models
Expand Show details Collapse Hide details
Apply Time Series Models, Statistics tab

The Statistics tab provides options for displaying tables of model fit statistics, model parameters, autocorrelation functions, and forecasts. Unless model parameters are reestimated (Reestimate from data on the Models tab), displayed values of fit measures, Ljung-Box values, and model parameters are those from the model file and reflect the data used when each model was developed (or last updated). Outlier information is always taken from the model file.

Display fit measures, Ljung-Box statistic, and number of outliers by model. Select (check) this option to display a table containing selected fit measures, Ljung-Box value, and the number of outliers for each model.

Fit Measures. You can select one or more of the following for inclusion in the table containing fit measures for each model:

• Stationary R-square

• R-square

• Root mean square error

• Mean absolute percentage error

• Mean absolute error

• Maximum absolute percentage error

• Maximum absolute error

• Normalized BIC

Statistics for Comparing Models. This group of options controls the display of tables containing statistics across all models. Each option generates a separate table. You can select one or more of the following options:

• Goodness of fit. Table of summary statistics and percentiles for stationary R-square, R-square, root mean square error, mean absolute percentage error, mean absolute error, maximum absolute percentage error, maximum absolute error, and normalized Bayesian Information Criterion.

• Residual autocorrelation function (ACF). Table of summary statistics and percentiles for autocorrelations of the residuals across all estimated models. This table is only available if model parameters are reestimated (Reestimate from data on the Models tab).

• Residual partial autocorrelation function (PACF). Table of summary statistics and percentiles for partial autocorrelations of the residuals across all estimated models. This table is only available if model parameters are reestimated (Reestimate from data on the Models tab).

Statistics for Individual Models. This group of options controls display of tables containing detailed information for each model. Each option generates a separate table. You can select one or more of the following options:

• Parameter estimates. Displays a table of parameter estimates for each model. Separate tables are displayed for exponential smoothing and ARIMA models. If outliers exist, parameter estimates for them are also displayed in a separate table.

• Residual autocorrelation function (ACF). Displays a table of residual autocorrelations by lag for each estimated model. The table includes the confidence intervals for the autocorrelations. This table is only available if model parameters are reestimated (Reestimate from data on the Models tab).

• Residual partial autocorrelation function (PACF). Displays a table of residual partial autocorrelations by lag for each estimated model. The table includes the confidence intervals for the partial autocorrelations. This table is only available if model parameters are reestimated (Reestimate from data on the Models tab).

Display forecasts. Displays a table of model forecasts and confidence intervals for each model.

To Select Output Tables Collapse Hide details

This feature requires the Forecasting option.

From the menus choose:

Analyze
Forecasting
Apply Models...

Click the Statistics tab.

Related Topics

Output
Plots
Limiting Output to the Best- or Poorest-Fitting Models


Plots

R2,R2,R2
in Apply Time Series Models,in Apply Time Series Models,in Apply Time Series Models
stationary R2,stationary R2,stationary R2
in Apply Time Series Models,in Apply Time Series Models,in Apply Time Series Models
root mean square error,root mean square error,root mean square error
in Apply Time Series Models,in Apply Time Series Models,in Apply Time Series Models
RMSE,RMSE,RMSE
in Apply Time Series Models,in Apply Time Series Models,in Apply Time Series Models
mean absolute percentage error,mean absolute percentage error,mean absolute percentage error
in Apply Time Series Models,in Apply Time Series Models,in Apply Time Series Models
MAPE,MAPE,MAPE
in Apply Time Series Models,in Apply Time Series Models,in Apply Time Series Models
mean absolute error,mean absolute error,mean absolute error
in Apply Time Series Models,in Apply Time Series Models,in Apply Time Series Models
MAE,MAE,MAE
in Apply Time Series Models,in Apply Time Series Models,in Apply Time Series Models
maximum absolute percentage error,maximum absolute percentage error,maximum absolute percentage error
in Apply Time Series Models,in Apply Time Series Models,in Apply Time Series Models
MaxAPE,MaxAPE,MaxAPE
in Apply Time Series Models,in Apply Time Series Models,in Apply Time Series Models
maximum absolute error,maximum absolute error,maximum absolute error
in Apply Time Series Models,in Apply Time Series Models,in Apply Time Series Models
MaxAE,MaxAE,MaxAE
in Apply Time Series Models,in Apply Time Series Models,in Apply Time Series Models
normalized BIC (Bayesian information criterion),normalized BIC (Bayesian information criterion),normalized BIC (Bayesian information criterion)
in Apply Time Series Models,in Apply Time Series Models,in Apply Time Series Models
goodness of fit,goodness of fit,goodness of fit
in Apply Time Series Models,in Apply Time Series Models,in Apply Time Series Models
autocorrelation function,autocorrelation function,autocorrelation function
in Apply Time Series Models,in Apply Time Series Models,in Apply Time Series Models
partial autocorrelation function,partial autocorrelation function,partial autocorrelation function
in Apply Time Series Models,in Apply Time Series Models,in Apply Time Series Models
ACF,ACF,ACF
in Apply Time Series Models,in Apply Time Series Models,in Apply Time Series Models
PACF,PACF,PACF
in Apply Time Series Models,in Apply Time Series Models,in Apply Time Series Models
residuals,residuals,residuals
in Apply Time Series Models,in Apply Time Series Models,in Apply Time Series Models
forecasts,forecasts,forecasts
in Apply Time Series Models,in Apply Time Series Models,in Apply Time Series Models
fit values,fit values,fit values
in Apply Time Series Models,in Apply Time Series Models,in Apply Time Series Models
historical data,historical data,historical data
in Apply Time Series Models,in Apply Time Series Models,in Apply Time Series Models
confidence intervals,confidence intervals,confidence intervals
in Apply Time Series Models,in Apply Time Series Models,in Apply Time Series Models
Apply Time Series Models,Apply Time Series Models,Apply Time Series Models
forecasts,forecasts,forecasts
goodness-of-fit statistics,goodness-of-fit statistics,goodness-of-fit statistics
fit values,fit values,fit values
confidence intervals,confidence intervals,confidence intervals
residual autocorrelation function,residual autocorrelation function,residual autocorrelation function
residual partial autocorrelation function,residual partial autocorrelation function,residual partial autocorrelation function
statistics across all models,statistics across all models,statistics across all models
Expand Show details Collapse Hide details
Apply Time Series Models, Plots tab

The Plots tab provides options for displaying plots of model fit statistics, autocorrelation functions, and series values (including forecasts).

Plots for Comparing Models

This group of options controls the display of plots containing statistics across all models. Unless model parameters are reestimated (Reestimate from data on the Models tab), displayed values are those from the model file and reflect the data used when each model was developed (or last updated). In addition, autocorrelation plots are only available if model parameters are reestimated. Each option generates a separate plot. You can select one or more of the following options:

• Stationary R-square

• R-square

• Root mean square error

• Mean absolute percentage error

• Mean absolute error

• Maximum absolute percentage error

• Maximum absolute error

• Normalized BIC

• Residual autocorrelation function (ACF)

• Residual partial autocorrelation function (PACF)

Plots for Individual Models

Series. Select (check) this option to obtain plots of the predicted values for each model. Observed values, fit values, confidence intervals for fit values, and autocorrelations are only available if model parameters are reestimated (Reestimate from data on the Models tab). You can select one or more of the following for inclusion in the plot:

• Observed values. The observed values of the dependent series.

• Forecasts. The model predicted values for the forecast period.

• Fit values. The model predicted values for the estimation period.

• Confidence intervals for forecasts. The confidence intervals for the forecast period.

• Confidence intervals for fit values. The confidence intervals for the estimation period.

Residual autocorrelation function (ACF). Displays a plot of residual autocorrelations for each estimated model.

Residual partial autocorrelation function (PACF). Displays a plot of residual partial autocorrelations for each estimated model.

To Select Plots Collapse Hide details

This feature requires the Forecasting option.

From the menus choose:

Analyze
Forecasting
Apply Models...

Click the Plots tab.

Related Topics

Output
Statistics and Forecast Tables
Limiting Output to the Best- or Poorest-Fitting Models


Limiting Output to the Best- or Poorest-Fitting Models

Apply Time Series Models,Apply Time Series Models,Apply Time Series Models
best- and poorest-fitting models,best- and poorest-fitting models,best- and poorest-fitting models
Expand Show details Collapse Hide details
Apply Time Series Models, Output Filter tab

The Output Filter tab provides options for restricting both tabular and chart output to a subset of models. You can choose to limit output to the best-fitting and/or the poorest-fitting models according to fit criteria you provide. By default, all models are included in the output. Unless model parameters are reestimated (Reestimate from data on the Models tab), values of fit measures used for filtering models are those from the model file and reflect the data used when each model was developed (or last updated).

Best-fitting models. Select (check) this option to include the best-fitting models in the output. Select a goodness-of-fit measure and specify the number of models to include. Selecting this option does not preclude also selecting the poorest-fitting models. In that case, the output will consist of the poorest-fitting models as well as the best-fitting ones.

• Fixed number of models. Specifies that results are displayed for the n best-fitting models. If the number exceeds the total number of models, all models are displayed.

• Percentage of total number of models. Specifies that results are displayed for models with goodness-of-fit values in the top n percent across all models.

Poorest-fitting models. Select (check) this option to include the poorest-fitting models in the output. Select a goodness-of-fit measure and specify the number of models to include. Selecting this option does not preclude also selecting the best-fitting models. In that case, the output will consist of the best-fitting models as well as the poorest-fitting ones.

• Fixed number of models. Specifies that results are displayed for the n poorest-fitting models. If the number exceeds the total number of models, all models are displayed.

• Percentage of total number of models. Specifies that results are displayed for models with goodness-of-fit values in the bottom n percent across all models.

Goodness of Fit Measure. Select the goodness-of-fit measure to use for filtering models. The default is stationary R-square.

To Filter the Output Collapse Hide details

This feature requires the Forecasting option.

From the menus choose:

Analyze
Forecasting
Apply Models...

Click the Output Filter tab.

Related Topics

Output
Statistics and Forecast Tables
Plots


Saving Model Predictions and Model Specifications

save,save,save
model predictions,model predictions,model predictions
reestimated models in XML,reestimated models in XML,reestimated models in XML
new variable names,new variable names,new variable names
Apply Time Series Models,Apply Time Series Models,Apply Time Series Models
saving predictions,saving predictions,saving predictions
saving reestimated models in XML,saving reestimated models in XML,saving reestimated models in XML
new variable names,new variable names,new variable names
XML,XML,XML
saving reestimated models in XML,saving reestimated models in XML,saving reestimated models in XML
variable names,variable names,variable names
in Apply Time Series Models,in Apply Time Series Models,in Apply Time Series Models
Expand Show details Collapse Hide details
Apply Time Series Models, Save tab

The Save tab allows you to save model predictions as new variables in the active dataset and save model specifications to an external file in XML format.

Save Variables. You can save model predictions, confidence intervals, and residuals as new variables in the active dataset. Each model gives rise to its own set of new variables. New cases are added if the forecast period extends beyond the length of the dependent variable series associated with the model. Unless model parameters are reestimated (Reestimate from data on the Models tab), predicted values and confidence limits are only created for the forecast period. Choose to save new variables by selecting the associated Save check box for each. By default, no new variables are saved.

• Predicted Values. The model predicted values.

• Lower Confidence Limits. Lower confidence limits for the predicted values.

• Upper Confidence Limits. Upper confidence limits for the predicted values.

• Noise Residuals. The model residuals. When transformations of the dependent variable are performed (for example, natural log), these are the residuals for the transformed series. This choice is only available if model parameters are reestimated (Reestimate from data on the Models tab).

• Variable Name Prefix. Specify prefixes to be used for new variable names or leave the default prefixes. Variable names consist of the prefix, the name of the associated dependent variable, and a model identifier. The variable name is extended if necessary to avoid variable naming conflicts. The prefix must conform to the rules for valid variable names.

Export Model File Containing Reestimated Parameters. Model specifications, containing reestimated parameters and fit statistics, are exported to the specified file in XML format. This option is only available if model parameters are reestimated (Reestimate from data on the Models tab).

To Save Variables or Export a Model File Collapse Hide details

This feature requires the Forecasting option.

From the menus choose:

Analyze
Forecasting
Apply Models...

Click the Save tab.

Related Topics

Apply Time Series Models
Output
Options


Options

Apply Time Series Models,Apply Time Series Models,Apply Time Series Models
confidence intervals,confidence intervals,confidence intervals
missing values,missing values,missing values
confidence intervals,confidence intervals,confidence intervals
in Apply Time Series Models,in Apply Time Series Models,in Apply Time Series Models
missing values,missing values,missing values
in Apply Time Series Models,in Apply Time Series Models,in Apply Time Series Models
Expand Show details Collapse Hide details
Apply Time Series Models, Options tab

The Options tab allows you to specify the handling of missing values, set the confidence interval width, and set the number of lags shown for autocorrelations.

User-Missing Values. These options control the handling of user-missing values.

• Treat as invalid. User-missing values are treated like system-missing values.

• Treat as valid. User-missing values are treated as valid data.

Missing Value Policy. The following rules apply to the treatment of missing values (includes system-missing values and user-missing values treated as invalid):

• Cases with missing values of a dependent variable that occur within the estimation period are included in the model. The specific handling of the missing value depends on the estimation method.

• For ARIMA models, a warning is issued if a predictor has any missing values within the estimation period. Any models involving the predictor are not reestimated.

• If any independent variable has missing values within the forecast period, the procedure issues a warning and forecasts as far as it can.

Confidence Interval Width (%). Confidence intervals are computed for the model predictions and residual autocorrelations. You can specify any positive value less than 100. By default, a 95% confidence interval is used.

Maximum Number of Lags Shown in ACF and PACF Output. You can set the maximum number of lags shown in tables and plots of autocorrelations and partial autocorrelations. This option is only available if model parameters are reestimated (Reestimate from data on the Models tab).

To Set Options Collapse Hide details

This feature requires the Forecasting option.

From the menus choose:

Analyze
Forecasting
Apply Models...

Click the Options tab.

Related Topics

Apply Time Series Models
Output
Saving Model Predictions and Model Specifications


TSAPPLY Command Additional Features

Additional features are available if you paste your selections into a syntax window and edit the resulting TSAPPLY command syntax. The command syntax language allows you to:

• Specify that only a subset of the models in a model file are to be applied to the active dataset (with the DROP and KEEP keywords on the MODEL subcommand).

• Apply models from two or more model files to your data (with the MODEL subcommand). For example, one model file might contain models for series that represent unit sales, and another might contain models for series that represent revenue.

Related Topics

TSAPPLY
Apply Time Series Models


Seasonal Decomposition

Seasonal Decomposition,Seasonal Decomposition,Seasonal Decomposition

The Seasonal Decomposition procedure decomposes a series into a seasonal component, a combined trend and cycle component, and an "error" component. The procedure is an implementation of the Census Method I, otherwise known as the ratio-to-moving-average method.

Example. A scientist is interested in analyzing monthly measurements of the ozone level at a particular weather station. The goal is to determine if there is any trend in the data. In order to uncover any real trend, the scientist first needs to account for the variation in readings due to seasonal effects. The Seasonal Decomposition procedure can be used to remove any systematic seasonal variations. The trend analysis is then performed on a seasonally adjusted series.

Statistics. The set of seasonal factors.

Show me

Seasonal Decomposition,Seasonal Decomposition,Seasonal Decomposition
assumptions,assumptions,assumptions
Seasonal Decomposition Data Considerations Collapse Hide details

Data. The variables should be numeric.

Assumptions. The variables should not contain any embedded missing data. At least one periodic date component must be defined. For instructions on handling missing data, see the topic on replacing missing values. To define a periodic date component, see the topic on defining dates.

Seasonal Decomposition,Seasonal Decomposition,Seasonal Decomposition
models,models,models
Seasonal Decomposition,Seasonal Decomposition,Seasonal Decomposition
computing moving averages,computing moving averages,computing moving averages
Estimating Seasonal Factors Collapse Hide details

Estimating Seasonal Factors

This feature requires the Forecasting option.

From the menus choose:

Analyze
Forecasting
Seasonal Decomposition...

Select one or more variables from the available list and move them into the Variable(s) list. Note that the list includes only numeric variables.

Model Type. The Seasonal Decomposition procedure offers two different approaches for modeling the seasonal factors: multiplicative or additive.

• Multiplicative. The seasonal component is a factor by which the seasonally adjusted series is multiplied to yield the original series. In effect, seasonal components that are proportional to the overall level of the series. Observations without seasonal variation have a seasonal component of 1.

• Additive. The seasonal adjustments are added to the seasonally adjusted series to obtain the observed values. This adjustment attempts to remove the seasonal effect from a series in order to look at other characteristics of interest that may be "masked" by the seasonal component. In effect, seasonal components that do not depend on the overall level of the series. Observations without seasonal variation have a seasonal component of 0.

Moving Average Weight. The Moving Average Weight options allow you to specify how to treat the series when computing moving averages. These options are available only if the periodicity of the series is even. If the periodicity is odd, all points are weighted equally.

• All points equal. Moving averages are calculated with a span equal to the periodicity and with all points weighted equally. This method is always used if the periodicity is odd.

• Endpoints weighted by .5. Moving averages for series with even periodicity are calculated with a span equal to the periodicity plus 1 and with the endpoints of the span weighted by 0.5.

Optionally, you can:

• Click Save to specify how new variables should be saved.

This procedure pastes SEASON command syntax.

See SEASON Algorithms for computational details for this procedure.

Related Topics

Time Series Data Transformations
Define Dates
Create Time Series
Select Cases: Range
Spectral Plots
Replace Missing Values
SEASON Command Additional Features
Seasonal Decomposition Save
SEASON


Seasonal Decomposition Save

Seasonal Decomposition,Seasonal Decomposition,Seasonal Decomposition
Seasonal Decomposition,Seasonal Decomposition,Seasonal Decomposition
create variables,create variables,create variables
Seasonal Decomposition,Seasonal Decomposition,Seasonal Decomposition
saving new variables,saving new variables,saving new variables
How to Save Seasonal Decomposition Results Collapse Hide details

This feature requires the Forecasting option.

From the menus choose:

Analyze
Forecasting
Seasonal Decomposition...

In the Seasonal Decomposition dialog box, click Save.

Create Variables. Allows you to choose how to treat new variables.

• Add to file. The new series created by Seasonal Decomposition are saved as regular variables in your active dataset. Variable names are formed from a three-letter prefix, an underscore, and a number.

• Replace existing. The new series created by Seasonal Decomposition are saved as temporary variables in your active dataset. At the same time, any existing temporary variables created by the Forecasting procedures are dropped. Variable names are formed from a three-letter prefix, a pound sign (#), and a number.

• Do not create. The new series are not added to the active dataset.

New Variable Names

The Seasonal Decomposition procedure creates four new variables (series), with the following three-letter prefixes, for each series specified:

SAF. Seasonal adjustment factors. These values indicate the effect of each period on the level of the series.

SAS. Seasonally adjusted series. These are the values obtained after removing the seasonal variation of a series.

STC. Smoothed trend-cycle components. These values show the trend and cyclical behavior present in the series.

ERR. Residual or "error" values. The values that remain after the seasonal, trend, and cycle components have been removed from the series.

Related Topics

Seasonal Decomposition


SEASON Command Additional Features

Seasonal Decomposition,Seasonal Decomposition,Seasonal Decomposition

The command syntax language also allows you to:

• Specify any periodicity within the SEASON command rather than select one of the alternatives offered by the Define Dates procedure.

Related Topics

UNIANOVA Command Additional Features
RELIABILITY Command Additional Features
ALSCAL Command Additional Features
MIXED Command Additional Features
HILOGLINEAR Command Additional Features
CSGLM Command Additional Features
CSLOGISTIC Command Additional Features
MVA Command Additional Features
LOGISTIC REGRESSION Command Additional Features
NOMREG Command Additional Features
PROBIT Command Additional Features
NLR Command Additional Features
WLS Command Additional Features
2SLS Command Additional Features
SPECTRA Command Additional Features
Seasonal Decomposition
SEASON


Spectral Plots

Spectral Plots,Spectral Plots,Spectral Plots
harmonic analysis,harmonic analysis,harmonic analysis

The Spectral Plots procedure is used to identify periodic behavior in time series. Instead of analyzing the variation from one time point to the next, it analyzes the variation of the series as a whole into periodic components of different frequencies. Smooth series have stronger periodic components at low frequencies; random variation ("white noise") spreads the component strength over all frequencies.

Series that include missing data cannot be analyzed with this procedure.

Example. The rate at which new houses are constructed is an important barometer of the state of the economy. Data for housing starts typically exhibit a strong seasonal component. But are there longer cycles present in the data that analysts need to be aware of when evaluating current figures?

Statistics. Sine and cosine transforms, periodogram value, and spectral density estimate for each frequency or period component. When bivariate analysis is selected: real and imaginary parts of cross-periodogram, cospectral density, quadrature spectrum, gain, squared coherency, and phase spectrum for each frequency or period component.

Plots. For univariate and bivariate analyses: periodogram and spectral density. For bivariate analyses: squared coherency, quadrature spectrum, cross amplitude, cospectral density, phase spectrum, and gain.

Spectral Plots,Spectral Plots,Spectral Plots
assumptions,assumptions,assumptions

Show me

Spectral Plots Data Considerations Collapse Hide details

Data. The variables should be numeric.

Assumptions. The variables should not contain any embedded missing data. The time series to be analyzed should be stationary and any non-zero mean should be subtracted out from the series. For instructions on handling missing data, see the topic on replacing missing values. The most effective way to transform a nonstationary series into a stationary one is through a difference transformation. To learn how to perform a difference transformation, see the topic on creating time series.

• Stationary. A condition that must be met by the time series to which you fit an ARIMA model. Pure MA series will be stationary; however, AR and ARMA series might not be. A stationary series has a constant mean and a constant variance over time.

Spectral Plots,Spectral Plots,Spectral Plots
spectral windows,spectral windows,spectral windows
Obtaining a Spectral Analysis Collapse Hide details

Obtaining a Spectral Analysis

This feature requires the Forecasting option.

From the menus choose:

Analysis
Time Series
Spectral Analysis...

Select one or more variables from the available list and move them to the Variable(s) list. Note that the list includes only numeric variables.

Select one of the Spectral Window options to choose how to smooth the periodogram in order to obtain a spectral density estimate. Available smoothing options are Tukey-Hamming, Tukey, Parzen, Bartlett, Daniell (Unit), and None.

• Tukey-Hamming. The weights are Wk = .54Dp(2 pi fk) + .23Dp (2 pi fk + pi/p) + .23Dp (2 pi fk - pi/p), for k = 0, ..., p, where p is the integer part of half the span and Dp is the Dirichlet kernel of order p.

• Tukey. The weights are Wk = 0.5Dp(2 pi fk) + 0.25Dp (2 pi fk + pi/p) + 0.25Dp(2 pi fk - pi/p), for k = 0, ..., p, where p is the integer part of half the span and Dp is the Dirichlet kernel of order p.

• Parzen. The weights are Wk = 1/p(2 + cos(2 pi fk)) (F[p/2] (2 pi fk))**2, for k= 0, ... p, where p is the integer part of half the span and F[p/2] is the Fejer kernel of order p/2.

• Bartlett. The shape of a spectral window for which the weights of the upper half of the window are computed as Wk = Fp (2*pi*fk), for k = 0, ... p, where p is the integer part of half the span and Fp is the Fejer kernel of order p. The lower half is symmetric with the upper half.

• Daniell (Unit). The shape of a spectral window for which the weights are all equal to 1.

• None. No smoothing. If this option is chosen, the spectral density estimate is the same as the periodogram.

Spectral Plots,Spectral Plots,Spectral Plots
bivariate spectral analysis,bivariate spectral analysis,bivariate spectral analysis

Span. The range of consecutive values across which the smoothing is carried out. Generally, an odd integer is used. Larger spans smooth the spectral density plot more than smaller spans.

Spectral Plots,Spectral Plots,Spectral Plots
centering transformation,centering transformation,centering transformation

Center variables. Adjusts the series to have a mean of 0 before calculating the spectrum and to remove the large term that may be associated with the series mean.

Bivariate analysis—first variable with each. If you have selected two or more variables, you can select this option to request bivariate spectral analyses.

• The first variable in the Variable(s) list is treated as the independent variable, and all remaining variables are treated as dependent variables.

• Each series after the first is analyzed with the first series independently of other series named. Univariate analyses of each series are also performed.

Plot. Periodogram and spectral density are available for both univariate and bivariate analyses. All other choices are available only for bivariate analyses.

Expand Show details Collapse Hide details

• Periodogram. Unsmoothed plot of spectral amplitude (plotted on a logarithmic scale) against either frequency or period. Low-frequency variation characterizes a smooth series. Variation spread evenly across all frequencies indicates "white noise."

• Squared coherency. The product of the gains of the two series.

• Quadrature spectrum. The imaginary part of the cross-periodogram, which is a measure of the correlation of the out-of-phase frequency components of two time series. The components are out of phase by pi/2 radians.

• Cross amplitude. The square root of the sum of the squared cospectral density and the squared quadrature spectrum.

• Spectral density. A periodogram that has been smoothed to remove irregular variation.

• Cospectral density. The real part of the cross-periodogram, which is a measure of the correlation of the in-phase frequency components of two time series.

• Phase spectrum. A measure of the extent to which each frequency component of one series leads or lags the other.

• Gain. The quotient of dividing the cross amplitude by the spectral density for one of the series. Each of the two series has its own gain value.

By frequency. All plots are produced by frequency, ranging from frequency 0 (the constant or mean term) to frequency 0.5 (the term for a cycle of two observations).

By period. All plots are produced by period, ranging from 2 (the term for a cycle of two observations) to a period equal to the number of observations (the constant or mean term). Period is displayed on a logarithmic scale.

This procedure pastes SPECTRA command syntax.

See SPECTRA Algorithms for computational details for this procedure.

Related Topics

Time Series Data Transformations
Define Dates
Create Time Series
Select Cases: Range
Seasonal Decomposition
Replace Missing Values
Sequence Charts
Autocorrelations
Cross-Correlations
SPECTRA Command Additional Features
SPECTRA


SPECTRA Command Additional Features

Spectral Plots,Spectral Plots,Spectral Plots

The command syntax language also allows you to:

• Save computed spectral analysis variables to the active dataset for later use.

• Specify custom weights for the spectral window.

• Produce plots by both frequency and period.

• Print a complete listing of each value shown in the plot.

Related Topics

UNIANOVA Command Additional Features
RELIABILITY Command Additional Features
ALSCAL Command Additional Features
MIXED Command Additional Features
HILOGLINEAR Command Additional Features
CSGLM Command Additional Features
CSLOGISTIC Command Additional Features
MVA Command Additional Features
LOGISTIC REGRESSION Command Additional Features
NOMREG Command Additional Features
PROBIT Command Additional Features
NLR Command Additional Features
WLS Command Additional Features
2SLS Command Additional Features
SEASON Command Additional Features
Spectral Plots
SPECTRA


Introduction: A Guide to Command Syntax

command syntax,command syntax,command syntax
index of all commands,index of all commands,index of all commands
syntax,syntax,syntax
index of all commands,index of all commands,index of all commands

The Command Syntax Reference is arranged alphabetically by command name to provide quick access to detailed information about each command in the syntax command language. This introduction groups commands into broad functional areas. Some commands are listed more than once because they perform multiple functions, and some older commands that have deprecated in favor of newer and better alternatives (but are still supported) are not included here. Changes to the command syntax language (since version 12.0), including modifications to existing commands and addition of new commands, are provided in the section Release History.

Core System

The Core system contains the core functionality plus a number of charting procedures. There are also numerous add-on modules that contain specialized functionality.

Getting Data Collapse Hide details

Getting Data

You can read in a variety of data formats, including data files saved in PASW Statistics format, SAS datasets, database tables from many database sources, Excel and other spreadsheets, and text data files with both simple and complex structures.

Command | Description |
PASW Statistics Data Files
Get | Reads PASW Statistics data files. | Go
Import | Reads portable data files created with the Export command. | Go
Add Files | Combines multiple data files by adding cases. | Go
Match Files | Combines multiple data files by adding variables. | Go
Update | Replaces values in a master file with updated values. | Go
Data Files Created by Other Applications
Get Translate | Reads spreadsheet and dBASE files. | Go
Get Data | Reads Excel files, text data files, and database tables. | Go
Database Tables
Get Data | Reads Excel files, text data files, and database tables. | Go
Get Capture | Reads database tables. | Go
SAS and Stata Data Files
Get SAS | Reads SAS dataset and SAS transport files. | Go
Get Stata | Reads Stata data files. | Go
Text Data Files
Get Data | Reads Excel files, text data files, and database tables. | Go
Data List | Reads text data files. | Go
Begin Data-End Data | Used with Data List to read inline text data. | Go
Complex (nested, mixed, grouped, etc.) Text Data Files
File Type | Defines mixed, nested, and grouped data structures. | Go
Record Type | Used with File Type to read complex text data files. | Go
Input Program | Generates case data and/or reads complex data files. | Go
End Case | Used with Input Program to define cases. | Go
End File | Used with Input Program to indicate end of file. | Go
Repeating Data | Used with Input Program to read input cases whose records contain repeating groups of data. | Go
Reread | Used with Input Program to reread a record. | Go
Keyed Data List | Reads data from nonsequential files: • Direct-access files, which provide direct access by a record number. • Keyed files, which provide access by a record key. | Go
Point | Used with Keyed Data to establish the location at which sequential access begins (or resumes) in a keyed file. | Go
Working with Multiple Data Sources
Dataset Name | Provides the ability to have multiple data sources open at the same time. | Go
Dataset Activate | Makes the named dataset the active dataset. | Go
Saving and Exporting Data Collapse Hide details

Saving and Exporting Data

You can save data in numerous formats, including PASW Statistics data file, Excel spreadsheet, database table, delimited text, and fixed-format text.

Command | Description |
Saving Data in PASW Statistics Format
Save | Saves the active dataset in PASW Statistics format. | Go
Xsave | Saves data in PASW Statistics format without requiring a separate data pass. | Go
Export | Saves data in portable format. | Go
Save Data Collection | Saves a data file in PASW Statistics format and a metadata file in PASW Data Collection MDD format for use in PASW Data Collection applications. | Go
Saving Data as Text
Write | Saves data as fixed-format text. | Go
Save Translate | Saves data as tab-delimited text and comma-delimted (CSV) text. | Go
Saving Data in Spreadsheet Format
Save Translate | Saves data in Excel and other spreadsheet formats and dBASE format. | Go
Writing Data Back to a Database Table
Save Translate | Replaces or appends to existing database tables or creates new database tables. | Go
Data Definition Collapse Hide details

Data Definition

PASW Statistics data files can contain more than simply data values. The dictionary can contain a variety of metadata attributes, including measurement level, display format, descriptive variable and value labels, and special codes for missing values.

Command | Description |
Apply Dictionary | Applies variable and file-based dictionary information from an external PASW Statistics data file. | Go
Datafile Attribute | Creates user-defined attributes that can be saved with the data file. | Go
Variable Attribute | Creates user-defined variable attributes that can be saved with variables in the data file. | Go
Variable Labels | Assigns descriptive labels to variables. | Go
Value Labels | Assigns descriptive labels to data values. | Go
Add Value Labels | Assigns descriptive labels to data values. | Go
Variable Level | Specifies the level of measurement (nominal, ordinal, or scale). | Go
Missing Values | Specifies values to be treated as missing. | Go
Rename | Changes variable names. | Go
Formats | Changes variable print and write formats. | Go
Print Formats | Changes variable print formats. | Go
Write Formats | Changes variable write formats. | Go
Variable Alignment | Specifies the alignment of data values in the Data Editor. | Go
Variable Width | Specifies the column width for display of variables in the Data Editor. | Go
Mrsets | Defines and saves multiple response set information. | Go
Data Transformations Collapse Hide details

Data Transformations

You can perform data transformations ranging from simple tasks, such as collapsing categories for analysis, to more advanced tasks, such as creating new variables based on complex equations and conditional statements.

Command | Description |
Autorecode | Recodes the values of string and numeric variables to consecutive integers. | Go
Compute | Creates new numeric variables or modifies the values of existing string or numeric variables. | Go
Count | Counts occurrences of the same value across a list of variables. | Go
Create | Produces new series as a function of existing series. | Go
Date | Generates date identification variables. | Go
Leave | Suppresses reinitialization and retains the current value of the specified variable or variables when the program reads the next case. | Go
Numeric | Declares new numeric variables that can be referred to before they are assigned values. | Go
Rank | Produces new variables containing ranks, normal scores, and Savage and related scores for numeric variables. | Go
Recode | Changes, rearranges, or consolidates the values of an existing variable. | Go
RMV | Replaces missing values with estimates computed by one of several methods. | Go
Shift Values | Creates new variables that contain the values of existing variables from preceding or subsequent cases. | Go
String | Declares new string variables. | Go
Temporary | Signals the beginning of temporary transformations that are in effect only for the next procedure. | Go
TMS Begin | Indicates the beginning of a block of transformations to be exported to a file in PMML format (with PASW Statistics extensions). | Go
TMS End | Marks the end of a block of transformations to be exported as PMML. | Go
TMS Import | Converts a PMML file containing ADP tranformations into command syntax. | Go
TMS Merge | Merges a PMML file containing exported transformations with a PMML model file. | Go
File Information Collapse Hide details

File Information

You can add descriptive information to a data file and display file and data attributes for the active dataset or any selected PASW Statistics data file.

Command | Description |
Add Documents | Creates a block of text of any length in the active dataset. | Go
Display | Displays information from the dictionary of the active dataset. | Go
Document | Creates a block of text of any length in the active dataset. | Go
Drop Documents | Deletes all text added with Document or Add Documents. | Go
Sysfile Info | Displays complete dictionary information for all variables in a PASW Statistics data file. | Go
File Transformations Collapse Hide details

File Transformations

Data files are not always organized in the ideal form for your specific needs. You may want to combine data files, sort the data in a different order, select a subset of cases, or change the unit of analysis by grouping cases together. A wide range of file transformation capabilities is available.

Command | Description |
Delete Variables | Deletes variables from the data file. | Go
Sort Cases | Reorders the sequence of cases based on the values of one or more variables. | Go
Weight | Case replication weights based on the value of a specified variable. | Go
Select Subsets of Cases
Filter | Excludes cases from analysis without deleting them from the file. | Go
N of Cases | Deletes all but the first n cases in the data file. | Go
Sample | Selects a random sample of cases from the data file, deleting unselected cases. | Go
Select If | Selects cases based on logical conditions, deleting unselected cases. | Go
Split File | Splits the data into separate analysis groups based on values of one or more split variables. | Go
Use | Designates a range of observations for time series procedures. | Go
Change File Structure
Aggregate | Aggregates groups of cases or creates new variables containing aggregated values. | Go
Casestovars | Restructures complex data that has multiple rows for a case. | Go
Varstocases | Restructures complex data structures in which information about a variable is stored in more than one column. | Go
Flip | Transposes rows (cases) and columns (variables). | Go
Merge Data Files
Add Files | Combines multiple PASW Statistics data files or open datasets by adding cases. | Go
Match Files | Combines multiple PASW Statistics data files or open datasets by adding variables. | Go
Update | Replaces values in a master file with updated values. | Go
Programming Structures Collapse Hide details

Programming Structures

As with other programming languages, the command syntax contains standard programming structures that can be used to do many things. These include the ability to perform actions only if some condition is true (if/then/else processing), repeat actions, create an array of elements, and use loop structures.

Command | Description |
Break | Used with Loop and Do If-Else If to control looping that cannot be fully controlled with conditional clauses. | Go
Do If-Else If | Conditionally executes one or more transformations based on logical expressions. | Go
Do Repeat | Repeats the same transformations on a specified set of variables. | Go
If | Conditionally executes a single transformation based on logical conditions. | Go
Loop | Performs repeated transformations specified by the commands within the loop until they reach a specified cutoff. | Go
Vector | Associates a vector name with a set of variables or defines a vector of new variables. | Go
Programming Utilities Collapse Hide details

Programming Utilities

Command | Description |
Define | Defines a program macro. | Go
Echo | Displays a specified text string as text output. | Go
Execute | Forces the data to be read and executes the transformations that precede it in the command sequence. | Go
Host | Executes external commands at the operating system level. | Go
Include | Includes commands from the specified file. | Go
Insert | Includes commands from the specified file. | Go
Script | Runs the specified script file. | Go
General Utilities Collapse Hide details

General Utilities

Command | Description |
Cache | Creates a copy of the data in temporary disk space for faster processing. | Go
Clear Transformations | Discards all data transformation commands that have accumulated since the last procedure. | Go
Erase | Deletes the specified file. | Go
File Handle | Assigns a unique file handle to the specified file. | Go
New File | Creates a blank, new active dataset. | Go
Permissions | Changes the read/write permissions for the specified file. | Go
Preserve | Stores current Set command specifications that can later be restored by the Restore command. | Go
Print | Prints the values of the specified variables as text output. | Go
Print Eject | Displays specified information at the top of a new page of the output. | Go
Print Space | Displays blank lines in the output. | Go
Restore | Restores Set specifications that were stored by Preserve. | Go
Set | Customizes program default settings. | Go
Show | Displays current settings, many of which are set by the Set command. | Go
Subtitle | Inserts a subtitle on each page of output. | Go
Title | Inserts a title on each page of output. | Go
Matrix Operations Collapse Hide details

Matrix Operations

Command | Description |
Matrix | Using matrix programs, you can write your own statistical routines in the compact language of matrix algebra. | Go
Matrix Data | Reads raw matrix materials and converts them to a matrix data file that can be read by procedures that handle matrix materials. | Go
Mconvert | Converts covariance matrix materials to correlation matrix materials or vice versa. | Go
Output Management System Collapse Hide details

Output Management System

The Output Management System (OMS) provides the ability to automatically write selected categories of output to different output files in different formats, including PASW Statistics data file format, HTML, XML, and text.

Command | Description |
OMS | Controls the routing and format of output. Output can be routed to external files in XML, HTML, text, and SAV (PASW Statistics data file) formats. | Go
OMSEnd | Ends active OMS commands. | Go
OMSInfo | Displays a table of all active OMS commands. | Go
OMSLog | Creates a log of OMS activity. | Go
Output Documents Collapse Hide details

Output Documents

These commands control Viewer windows and files.

Command | Description |
Output Activate | Controls the routing of output to Viewer output documents. | Go
Output Close | Closes the specified Viewer document. | Go
Output Display | Displays a table of all open Viewer documents. | Go
Output Export | Exports output to external files in various formats (e.g., Word, Excel, PDF, HTML, text). | Go
Output Name | Assigns a name to the active Viewer document. The name is used to refer to the output document in subsequent Output commands. | Go
Output New | Creates a new Viewer output document, which becomes the active output document. | Go
Output Open | Opens a Viewer document, which becomes the active output document. You can use this command to append output to an existing output document. | Go
Output Save | Saves the contents of an open output document to a file. | Go
Charts Collapse Hide details

Charts

Command | Description |
Caseplot | Casewise plots of sequence and time series variables. | Go
GGraph | Bar charts, pie charts, line charts, scatterplots, custom charts. | Go
Pplot | Probability plots of sequence and time series variables. | Go
Spchart | Control charts, including X-Bar, r, s, individuals, moving range, and u. | Go
Time Series Collapse Hide details

Time Series

The Core system provides some basic time series functionality, including a number of time series chart types. Extensive time series analysis features are provided in the Forecasting option. See the topic Add-On Modules for more information.

Command | Description |
ACF | Displays and plots the sample autocorrelation function of one or more time series. | Go
CCF | Displays and plots the cross-correlation functions of two or more time series. | Go
Curvefit | Fits selected curves to a line plot. | Go
PACF | Displays and plots the sample partial autocorrelation function of one or more time series. | Go
Tsplot | Plot of one or more time series or sequence variables. | Go
Fit | Displays a variety of descriptive statistics computed from the residual series for evaluating the goodness of fit of models. | Go
Predict | Specifies the observations that mark the beginning and end of the forecast period. | Go
Tset | Sets global parameters to be used by procedures that analyze time series and sequence variables. | Go
Tshow | Displays a list of all of the current specifications on the Tset, Use, Predict, and Date commands. | Go
Verify | Produces a report on the status of the most current Date, Use, and Predict specifications. | Go

Related Topics

Add-On Modules


Add-On Modules

Add-on modules are not included with the Core system. The commands available to you will depend on your software license.

Statistics Base Collapse Hide details

Statistics Base

Command | Description |
ALSCAL | Multidimensional scaling (MDS) and multidimensional unfolding (MDU) using an alternating least-squares algorithm. | Go
Cluster | Hierarchical clusters of items based on distance measures of dissimilarity or similarity. The items being clustered are usually cases, although variables can also be clustered. | Go
Codebook | Reports the dictionary information -- such as variable names, variable labels, value labels, missing values -- and summary statistics for all or specified variables and multiple response sets in the active dataset. | Go
Correlations | Pearson correlations with significance levels, univariate statistics, covariances, and cross-product deviations. | Go
Crosstabs | Crosstabulations (contingency tables) and measures of association. | Go
Descriptives | Univariate statistics, including the mean, standard deviation, and range. | Go
Discriminant | Classifies cases into one of several mutually exclusive groups based on their values for a set of predictor variables. | Go
Examine | Descriptive statistics, stem-and-leaf plots, histograms, boxplots, normal plots, robust estimates of location, and tests of normality. | Go
Factor | Identifies underlying variables, or factors, that explain the pattern of correlations within a set of observed variables. | Go
Frequencies | Tables of counts and percentages and univariate statistics, including the mean, median, and mode. | Go
Graph | Bar charts, pie charts, line charts, histograms, scatterplots, etc. | Go
Igraph | Bar charts, pie charts, line charts, histograms, scatterplots, etc. | Go
KNN | Classifies and predicts cases based upon the values "nearest neighboring" cases. | Go
List | Individual case listing. | Go
Means | Group means and related univariate statistics for dependent variables within categories of one or more independent variables. | Go
Mult Response | Frequency tables and crosstabulations for multiple-response data. | Go
Nonparametric | Collection of one-sample, independent samples, and related samples nonparametric tests. | Go
Nonpar Corr | Rank-order correlation coefficients: Spearman’s rho and Kendall’s tau-b, with significance levels. | Go
Npar Tests | Collection of one-sample, independent samples, and related samples nonparametric tests. | Go
OLAP Cubes | Summary statistics for scale variables within categories defined by one or more categorical grouping variables. | Go
Oneway | One-way analysis of variance. | Go
Partial Corr | Partial correlation coefficients between two variables, adjusting for the effects of one or more additional variables. | Go
Plum | Analyzes the relationship between a polytomous ordinal dependent variable and a set of predictors. | Go
Proximities | Measures of similarity, dissimilarity, or distance between pairs of cases or pairs of variables. | Go
Quick Cluster | When the desired number of clusters is known, this procedure groups cases efficiently into clusters. | Go
Ratio Statistics | Descriptive statistics for the ratio between two variables. | Go
Regression | Multiple regression equations and associated statistics and plots. | Go
Reliability | Estimates reliability statistics for the components of multiple-item additive scales. | Go
Report | Individual case listing and group summary statistics. | Go
ROC | Receiver operating characteristic (ROC) curve and an estimate of the area under the curve. | Go
Summarize | Individual case listing and group summary statistics. | Go
TTest | One sample, independent samples, and paired samples t tests. | Go
Twostep Cluster | Groups observations into clusters based on a nearness criterion. The procedure uses a hierarchical agglomerative clustering procedure in which individual cases are successively combined to form clusters whose centers are far apart. | Go
Unianova | Regression analysis and analysis of variance for one dependent variable by one or more factors and/or variables. | Go
Xgraph | Creates 3-D bar charts, population pyramids, and dot plots. | Go
Advanced Statistics Collapse Hide details

Advanced Statistics

Command | Description |
GLM | General Linear Model. A general procedure for analysis of variance and covariance, as well as regression. | Go
Genlin | Generalized Linear Model. Genlin allows you to fit a broad spectrum of “generalized” models in which the distribution of the error term need not be normal and the relationship between the dependent variable and predictors need only be linear through a specified transformation. | Go
Varcomp | Estimates variance components for mixed models. | Go
Mixed | The mixed linear model expands the general linear model used in the GLM procedure in that the data are permitted to exhibit correlation and non-constant variability. | Go
Genlog | A general procedure for model fitting, hypothesis testing, and parameter estimation for any model that has categorical variables as its major components. | Go
Hiloglinear | Fits hierarchical loglinear models to multidimensional contingency tables using an iterative proportional-fitting algorithm. | Go
Survival | Actuarial life tables, plots, and related statistics. | Go
Coxreg | Cox proportional hazards regression for analysis of survival times. | Go
KM | Kaplan-Meier (product-limit) technique to describe and analyze the length of time to the occurrence of an event. | Go
Regression Collapse Hide details

Regression

Command | Description |
Logistic Regression | Regresses a dichotomous dependent variable on a set of independent variables. | Go
Nomreg | Fits a multinomial logit model to a polytomous nominal dependent variable. | Go
NLR, CNLR | Nonlinear regression is used to estimate parameter values and regression statistics for models that are not linear in their parameters. | Go
WLS | Weighted Least Squares. Estimates regression models with different weights for different cases. | Go
2SLS | Two-stage least-squares regression. | Go
Custom Tables Collapse Hide details

Custom Tables

Command | Description |
Ctables | Produces tables in one, two, or three dimensions and provides a great deal of flexibility for organizing and displaying the contents. | Go
Decision Trees Collapse Hide details

Decision Trees

Command | Description |
Tree | Tree-based classification models. | Go
Categories Collapse Hide details

Categories

Command | Description |
Catreg | Categorical regression with optimal scaling using alternating least squares. | Go
CatPCA | Principal components analysis. | Go
Overals | Nonlinear canonical correlation analysis on two or more sets of variables. | Go
Correspondence | Displays the relationships between rows and columns of a two-way table graphically by a scatterplot matrix. | Go
Multiple Correspondence | Quantifies nominal (categorical) data by assigning numerical values to the cases (objects) and categories, such that objects within the same category are close together and objects in different categories are far apart. | Go
Proxscal | Multidimensional scaling of proximity data to find a least-squares representation of the objects in a low-dimensional space. | Go
Complex Samples Collapse Hide details

Complex Samples

Command | Description |
CSPlan | Creates a complex sample design or analysis specification. | Go
CSSelect | Selects complex, probability-based samples from a population. | Go
CSDescriptives | Estimates means, sums, and ratios, and computes their standard errors, design effects, confidence intervals, and hypothesis tests. | Go
CSTabulate | Frequency tables and crosstabulations, and associated standard errors, design effects, confidence intervals, and hypothesis tests. | Go
CSGLM | Linear regression analysis, and analysis of variance and covariance. | Go
CSLogistic | Logistic regression analysis on a binary or multinomial dependent variable using the generalized link function. | Go
CSOrdinal | Fits a cumulative odds model to an ordinal dependent variable for data that have been collected according to a complex sampling design. | Go
Neural Networks Collapse Hide details

Neural Networks

Command | Description |
MLP | Fits flexible predictive model for one or more target variables, which can be categorical or scale, based upon the values of factors and covariates. | Go
RBF | Fits flexible predictive model for one or more target variables, which can be categorical or scale, based upon the values of factors and covariates. Generally trains faster than MLP at the slight cost of some model flexibility. | Go
Forecasting Collapse Hide details

Forecasting

Command | Description |
Season | Estimates multiplicative or additive seasonal factors. | Go
Spectra | Periodogram and spectral density function estimates for one or more series. | Go
Tsapply | Loads existing time series models from an external file and applies them to data. | Go
Tsmodel | Estimates exponential smoothing, univariate Autoregressive Integrated Moving Average (ARIMA), and multivariate ARIMA (or transfer function models) models for time series, and produces forecasts. | Go
Conjoint Collapse Hide details

Conjoint

Command | Description |
Conjoint | Analyzes score or rank data from full-concept conjoint studies. | Go
Orthoplan | Orthogonal main-effects plan for a full-concept conjoint analysis. | Go
Plancards | Full-concept profiles, or cards, from a plan file for conjoint analysis. | Go
Bootstrapping Collapse Hide details

Bootstrapping

Command | Description |
Bootstrap | Bootstrapping is an alternative to parametric estimates when the assumptions of those methods are in doubt, or where parametric inference is impossible or requires very complicated formulas for the calculation of standard errors. | Go
Missing Values Collapse Hide details

Missing Values

Command | Description |
Multiple Imputation | Performs multiple imputations of missing values. Many other procedures can analyze a multiply-imputed dataset to produce pooled results which are more accurate than the singly-imputed datasets produced by MVA. | Go
MVA | Missing Value Analysis. Describes missing value patterns and estimates (imputes) missing values. | Go
Data Preparation Collapse Hide details

Data Preparation

Command | Description |
Adp | Automatically prepares data for modeling. | Go
Detectanomaly | Searches for unusual cases based on deviations from the norms of their cluster groups. | Go
Validatedata | Identifies suspicious and invalid cases, variables, and data values in the active dataset. | Go
Optimal Binning | Discretizes scale “binning input” variables to produce categories that are “optimal” with respect to the relationship of each binning input variable with a specified categorical guide variable. | Go
Statistics Adapter Collapse Hide details

Statistics Adapter

Command | Description |
Repository Attributes | Sets attributes for an object in a repository. | Go
Repository Connect | Establishes a connection to a repository and logs in the user. | Go
Repository Copy | Copies an arbitrary file from the local file system to a repository or copies a file from a repositoryto the local file system. | Go

Related Topics

Introduction: A Guide to Command Syntax


Release History

command syntax,command syntax,command syntax
release history,release history,release history
syntax,syntax,syntax
release history,release history,release history

This section details changes to the command syntax language occurring after release 12.0. Information is organized alphabetically by command and changes for a given command are grouped by release. For commands introduced after 12.0, the introductory release is noted. Additions of new functions (used for instance with COMPUTE) and changes to existing functions are detailed under the heading Functions, located at the end of this section.

ADP

Release 18

• Command introduced.

AGGREGATE

Release 13.0

• MODE keyword introduced.

• OVERWRITE keyword introduced.

Release 17.0

• AGGREGATE runs without a break variable.

ALTER TYPE

Release 16.0

• Command introduced.

APPLY DICTIONARY

Release 14.0

• ATTRIBUTES keyword introduced on FILEINFO and VARINFO subcommands.

Release 18

• ROLE keyword introduced on VARINFO subcommands.

AUTORECODE

Release 13.0

• BLANK subcommand introduced.

• GROUP subcommand introduced.

• APPLY TEMPLATE and SAVE TEMPLATE subcommands introduced.

BEGIN GPL

Release 14.0

• Command introduced.

BEGIN PROGRAM

Release 14.0

• Command introduced.

BOOTSTRAP

Release 18

• Command introduced.

CASEPLOT

Release 14.0

• For plots with one variable, new option to specify a value with the REFERENCE keyword on the FORMAT subcommand.

CATPCA

Release 13.0

• NDIM keyword introduced on PLOT subcommand.

• The maximum label length on the PLOT subcommand is increased to 64 for variable names, 255 for variable labels, and 60 for value labels (previous value was 20).

CATREG

Release 13.0

• The maximum category label length on the PLOT subcommand is increased to 60 (previous value was 20).

Release 17.0

• MULTISTART and FIXSIGNS keywords added to INITIAL subcommand.

• REGULARIZATION subcommand added.

• RESAMPLE subcommand added.

• REGU keyword added to PRINT subcommand.

• REGU keyword added to PLOT subcommand.

• SUPPLEMENTARY categories not occuring in data used to create the model are now interpolated.

CD

Release 13.0

• Command introduced.

CODEBOOK

Release 17.0

• Command introduced.

Release 18

• ROLE keyword added to VARINFO subcommand.

CORRESPONDENCE

Release 13.0

• For the NDIM keyword on the PLOT subcommand, the default is changed to all dimensions.

• The maximum label length on the PLOT subcommand is increased to 60 (previous value was 20).

CSGLM

Release 13.0

• Command introduced.

CSLOGISTIC

Release 13.0

• Command introduced.

Release 17.0

• Added support for SET THREADS.

CSORDINAL

Release 15.0

• Command introduced.

Release 17.0

• Added support for SET THREADS.

CTABLES

Release 13.0

• HSUBTOTAL keyword introduced on the CATEGORIES subcommand.

Release 14.0

• INCLUDEMRSETS keyword introduced on the SIGTEST and COMPARETEST subcommands.

• CATEGORIES keyword introduced on the SIGTEST and COMPARETEST subcommands.

• MEANSVARIANCE keyword introduced on the COMPARETEST subcommand.

Release 18.0

• MERGE keyword introduced on the COMPARETEST subcommand.

• PCOMPUTE and PPROPERTIES subcommands introduced.

DATA LIST

Release 16.0

• ENCODING subcommand added for Unicode support.

DATAFILE ATTRIBUTE

Release 14.0

• Command introduced.

DATASET ACTIVATE

Release 14.0

• Command introduced.

DATASET CLOSE

Release 14.0

• Command introduced.

DATASET COPY

Release 14.0

• Command introduced.

DATASET DECLARE

Release 14.0

• Command introduced.

DATASET DISPLAY

Release 14.0

• Command introduced.

DATASET NAME

Release 14.0

• Command introduced.

DEFINE-!ENDDEFINE

Release 14.0

• For syntax processed in interactive mode, modifications to the macro facility may affect macro calls occurring at the end of a command. See the topic Overview (DEFINE-!ENDDEFINE command) for more information.

DETECTANOMALY

Release 14.0

• Command introduced.

DISPLAY

Release 14.0

• ATTRIBUTES keyword introduced.

Release 15.0

• @ATTRIBUTES keyword introduced.

DO REPEAT-END REPEAT

Release 14.0

• ALL keyword introduced.

EXTENSION

Release 16.0

• Command introduced.

FILE HANDLE

Release 13.0

• The NAME subcommand is modified to accept a path and/or file.

Release 16.0

• ENCODING subcommand added for Unicode support.

FILE TYPE

Release 16.0

• ENCODING subcommand added for Unicode support.

GENLIN

Release 15.0

• Command introduced.

Release 16.0

• Added multinomial and tweedie distributions; added MLE estimation option for ancillary parameter of negative binomial distribution (MODEL subcommand, DISTRIBUTION keyword). Notes related to the addition of the new distributions added throughout.

• Added cumulative Cauchit, cumulative complementary log-log, cumulative logit, cumulative negative log-log, and cumulative probit link functions (MODEL subcommand, LINK keyword).

• Added likelihood-ratio chi-square statistics as an alternative to Wald statistics (CRITERIA subcommand, ANALYSISTYPE keyword).

• Added profile likelihood confidence intervals as an alternative to Wald confidence intervals (CRITERIA subcommand, CITYPE keyword).

• Added option to specify initial value for ancillary parameter of negative binomial distribution (CRITERIA subcommand, INITIAL keyword).

• Changed default display of the likelihood function for GEEs to show the full value instead of the kernel (CRITERIA subcommand, LIKELIHOOD keyword).

GET CAPTURE

Release 15.0

• UNENCRYPTED subcommand introduced.

GET DATA

Release 13.0

• ASSUMEDSTRWIDTH subcommand introduced for TYPE=ODBC.

Release 14.0

• ASSUMEDSTRWIDTH subcommand extended to TYPE=XLS.

• TYPE=OLEDB introduced.

Release 15.0

• ASSUMEDSTRWIDTH subcommand extended to TYPE=OLEDB.

Release 16.0

• TYPE=XLSX and TYPE=XLSM introduced.

Release 17.0

• ENCRYPTED subcommand introduced.

GET STATA

Release 14.0

• Command introduced.

GGRAPH

Release 14.0

• Command introduced.

Release 15.0

• RENAME syntax qualifier deprecated.

• COUNTCI, MEDIANCI, MEANCI, MEANSD, and MEANSE functions introduced.

Release 17.0

• Added SOURCE=VIZTEMPLATE to support visualization templates.

• Added VIZSTYLESHEET keyword to support visualization stylesheets.

GLM

Release 17.0

• POSTHOC subcommand: T2, T3, GH, and C keywords are not valid when multiple factors in the model.

• PLOT subcommand: new WITH keyword allows you to fix covariate values for profile plots.

GRAPH

Release 13.0

• PANEL subcommand introduced.

• INTERVAL subcommand introduced.

HOST

Release 13.0

• Command introduced.

INCLUDE

Release 16.0

• ENCODING keyword added for Unicode support.

INSERT

Release 13.0

• Command introduced.

Release 16.0

• ENCODING keyword added for Unicode support.

KEYED DATA LIST

Release 16.0

• ENCODING subcommand added for Unicode support.

KNN

Release 17.0

• Command introduced.

LOGISTIC REGRESSION

Release 13.0

• OUTFILE subcommand introduced.

Release 14.0

• Modification to the method of recoding string variables. See the topic Overview (LOGISTIC REGRESSION command) for more information.

MISSING VALUES

Release 16.0

• Limitation preventing assignment of missing values to strings with a defined width greater than eight bytes removed.

MLP

Release 16.0

• Command introduced.

MODEL CLOSE

Release 13.0

• Command introduced.

MODEL HANDLE

Release 13.0

• Command introduced.

MODEL LIST

Release 13.0

• Command introduced.

MRSETS

Release 14.0

• LABELSOURCE keyword introduced on MDGROUP subcommand.

• CATEGORYLABELS keyword introduced on MDGROUP subcommand.

MULTIPLE CORRESPONDENCE

Release 13.0

• Command introduced.

MULTIPLE IMPUTATION

Release 17.0

• Command introduced.

NAIVEBAYES

Release 14.0

• Command introduced.

NOMREG

Release 13.0

• ENTRYMETHOD keyword introduced on STEPWISE subcommand.

• REMOVALMETHOD keyword introduced on STEPWISE subcommand.

• IC keyword introduced on PRINT subcommand.

Release 15.0

• ASSOCIATION keyword introduced on PRINT subcommand.

Release 17.0

• Added support for SET THREADS and SET MCACHE.

NONPARAMETRIC

Release 18

• Command introduced.

NPAR TESTS

Release 17.0

• Increased limits on number of variables allowed in the analysis.

OMS

Release 13.0

• TREES keyword introduced on SELECT subcommand.

• IMAGES, IMAGEROOT, CHARTSIZE, and IMAGEFORMAT keywords introduced on DESTINATION subcommand.

Release 14.0

• XMLWORKSPACE keyword introduced on DESTINATION subcommand.

Release 16.0

• IMAGEFORMAT=VML introduced for FORMAT=HTML on DESTINATION subcommand.

• IMAGEMAP keyword introduced for FORMAT=HTML on DESTINATION subcommand.

• FORMAT=SPV introduced for saving output in Viewer format.

• CHARTFORMAT keyword introduced.

• TREEFORMAT keyword introduced.

• TABLES keyword introduced.

• FORMAT=SVWSOXML is no longer supported.

Release 17.0

• MODELS keyword introduced on SELECT subcommand.

• FORMAT=DOC, XLS, PDF, and SPW introduced.

• MODELFORMAT keyword introduced.

OPTIMAL BINNING

Release 15.0

• Command introduced.

OUTPUT ACTIVATE

Release 15.0

• Command introduced.

OUTPUT CLOSE

Release 15.0

• Command introduced.

OUTPUT DISPLAY

Release 15.0

• Command introduced.

OUTPUT EXPORT

Release 17.0

• Command introduced.

OUTPUT NAME

Release 15.0

• Command introduced.

OUTPUT NEW

Release 15.0

• Command introduced.

Release 16.0

• TYPE keyword is obsolete and is ignored.

OUTPUT OPEN

Release 15.0

• Command introduced.

Release 17.0

• LOCK keyword introduced.

OUTPUT SAVE

Release 15.0

• Command introduced.

Release 16.0

• TYPE keyword introduced.

Release 17.0

• LOCK keyword introduced.

PER ATTRIBUTES

Release 16.0

• Command introduced as PER ATTRIBUTES.

Release 17.0

• VERSIONLABEL keyword extended to support multiple labels.

Release 18.0

• PER ATTRIBUTES deprecated. Command name changed to REPOSITORY ATTRIBUTES.

PER CONNECT

Release 15.0

• Command introduced as PER CONNECT.

Release 17.0

• DOMAIN keyword deprecated on the LOGIN subcommand.

• PROVIDER keyword introduced on the LOGIN subcommand.

Release 18.0

• PER CONNECT deprecated. Command name changed to REPOSITORY CONNECT.

PER COPY

Release 16.0

• Command introduced as PER COPY.

Release 18.0

• PER COPY deprecated. Command name changed to REPOSITORY COPY.

PLANCARDS

Release 14.0

• PAGINATE subcommand is obsolete and no longer supported.

PLS

Release 16.0

• Command introduced.

POINT

Release 16.0

• ENCODING subcommand added for Unicode support.

PREFSCAL

Release 14.0

• Command introduced.

PRINT

Release 16.0

• ENCODING subcommand added for Unicode support.

PRINT EJECT

Release 16.0

• ENCODING subcommand added for Unicode support.

PRINT SPACE

Release 16.0

• ENCODING subcommand added for Unicode support.

RBF

Release 16.0

• Command introduced.

REGRESSION

Release 13.0

• PARAMETER keyword introduced on OUTFILE subcommand.

Release 16.0

• Added support for SET THREADS and SET MCACHE.

Release 17.0

• Added option to specify confidence level on CI keyword of STATISTICS subcommand.

RELIABILITY

Release 17.0

• Increased limits on numbers of variables allowed on the VARIABLES and SCALE lists.

REPEATING DATA

Release 16.0

• ENCODING subcommand added for Unicode support.

REPOSITORY ATTRIBUTES

Release 16.0

• Command introduced as PER ATTRIBUTES.

Release 17.0

• VERSIONLABEL keyword extended to support multiple labels.

Release 18.0

• PER ATTRIBUTES deprecated. Command name changed to REPOSITORY ATTRIBUTES.

REPOSITORY CONNECT

Release 15.0

• Command introduced as PER CONNECT.

Release 17.0

• DOMAIN keyword deprecated on the LOGIN subcommand.

• PROVIDER keyword introduced on the LOGIN subcommand.

Release 18.0

• PER CONNECT deprecated. Command name changed to REPOSITORY CONNECT.

REPOSITORY COPY

Release 16.0

• Command introduced as PER COPY.

Release 18.0

• PER COPY deprecated. Command name changed to REPOSITORY COPY.

RESPONSE RATE

Release 18.0

• Command introduced.

ROC

Release 18.0

• MODELQUALITY keyword introduced.

SAVE DATA COLLECTION

Release 15.0

• Command introduced as SAVE DIMENSIONS.

Release 18.0

• SAVE DIMENSIONS deprecated. Command name changed to SAVE DATA COLLECTION.

SAVE TRANSLATE

Release 14.0

• Value STATA added to list for TYPE subcommand.

• EDITION subcommand introduced for TYPE=STATA.

• SQL subcommand introduced.

• MISSING subcommand introduced.

• Field/column names specified on the RENAME subcommand can contain characters (for example, spaces, commas, slashes, plus signs) that are not allowed in PASW Statistics variable names.

• Continuation lines for connection strings on the CONNECT subcommand do not need to begin with a plus sign.

Release 15.0

• ENCRYPTED subcommand introduced.

• Value CSV added to list for TYPE subcommand.

• TEXTOPTIONS subcommand introduced for TYPE=CSV and TYPE=TAB.

Release 16.0

• VERSION=12 introduced for writing data in Excel 2007 XLSX format with TYPE=XLS.

Release 17.0

• UNENCRYPTED subcommand introduced.

Release 18.0

• VERSION=9 introduced for writing SAS 9+ files with TYPE=SAS.

SCRIPT

Release 16.0

• Scripts run from the SCRIPT command now run synchronously with the command syntax stream.

Release 17.0

• Ability to run Python scripts introduced.

SELECTPRED

Release 14.0

• Command introduced.

SET

Release 13.0

• RNG and MTINDEX subcommands introduced.

• Default for MXERRS subcommand increased to 100.

• SORT subcommand introduced.

• LOCALE subcommand introduced.

Release 14.0

• Default for WORKSPACE subcommand increased to 6148.

Release 15.0

• LABELS replaces VALUES as the default for the TNUMBERS subcommand.

• JOURNAL subcommand is obsolete and no longer supported.

• Value EXTERNAL added to list for SORT subcommand, replacing the value INTERNAL as the default. Value SS is deprecated.

Release 16.0

• MCACHE subcommand introduced.

• THREADS subcommand introduced.

• UNICODE subcommand introduced.

Release 16.0.1

• BOTHLARGE keyword introduced for the TFIT subcommand.

Release 17.0

• FUZZBITS subcommand introduced.

• MIOUTPUT subcommand introduced.

Release 18.0

• ROWSBREAK, CELLSBREAK, and TOLERANCE subcommands introduced for controlling display of large pivot tables.

• ZCOMPRESSION subcommand introduced.

• COMPRESSION subcommand is obsolete and ignored.

SHIFT VALUES

Release 17.0

• Command introduced.

SHOW

Release 13.0

• BLKSIZE and BUFNO subcommands are obsolete and no longer supported.

• HANDLES subcommand introduced.

• SORT subcommand introduced.

Release 15.0

• TMSRECORDING subcommand introduced.

Release 16.0

• UNICODE subcommand introduced.

• MCACHE subcommand introduced.

• THREADS subcommand introduced.

Release 17.0

• FUZZBITS subcommand introduced.

Release 18.0

• EXTPATHS subcommand introduced.

• ZCOMPRESSION subcommand introduced.

• COMPRESSION subcommand removed because it is obsolete.

SORT VARIABLES

Release 16.0.

• Command introduced.

Release 18.0.

• ROLE keyword introduced.

SPCHART

Release 15.0

• (XBARONLY) keyword introduced on XR and XS subcommands.

• RULES subcommand introduced.

• ID subcommand introduced.

TMS BEGIN

Release 15.0

• Command introduced.

Release 16.0

• Added support for new string functions CHAR.CONCAT, CHAR.LENGTH, and CHAR.SUBSTR within TMS blocks.

TMS END

Release 15.0

• Command introduced.

TMS IMPORT

Release 18

• Command introduced.

TMS MERGE

Release 15.0

• Command introduced.

TREE

Release 13.0

• Command introduced.

Release 18.0

• TARGETRESPONSE subcommand introduced.

TSAPPLY

Release 14.0

• Command introduced.

TSMODEL

Release 14.0

• Command introduced.

TSPLOT

Release 14.0

• For plots with one variable, REFERENCE keyword modified to allow specification of a value.

UNIANOVA

Release 17.0

• POSTHOC subcommand: T2, T3, GH, and C keywords are not valid when multiple factors in the model.

VALIDATEDATA

Release 14.0

• Command introduced.

VALUE LABELS

Release 14.0

• The maximum length of a value label is extended to 120 bytes (previous limit was 60 bytes).

Release 16.0

• Limitation preventing assignment of missing values to strings with a defined width greater than eight bytes removed.

VARIABLE ATTRIBUTE

Release 14.0

• Command introduced.

VARIABLE ROLE

Release 18.0

• Command introduced.

WRITE

Release 16.0

• ENCODING subcommand added for Unicode support.

XGRAPH

Release 13.0

• Command introduced.

Functions

Release 13.0

• APPLYMODEL and STRAPPLYMODEL functions introduced.

• DATEDIFF and DATESUM functions introduced.

Release 14.0

• REPLACE function introduced.

• VALUELABEL function introduced.

Release 16.0

• CHAR.INDEX function introduced.

• CHAR.LENGTH function introduced.

• CHAR.LPAD function introduced.

• CHAR.MBLEN function introduced.

• CHAR.RINDEX function introduced.

• CHAR.RPAD function introduced.

• CHAR.SUBSTR function introduced.

• NORMALIZE function introduced.

• NTRIM function introduced.

• STRUNC function introduced.

Release 17.0

• MEDIAN function introduced.

• mult and fuzzbits arguments introduced for the RND and TRUNC functions.

• NEIGHBOR and DISTANCE functions added to APPLYMODEL and STRAPPLYMODEL.


Universals

This part of the Command Syntax Reference discusses general topics pertinent to using command syntax. The topics are divided into five sections:

• Commands explains command syntax, including command specification, command order, and running commands in different modes. In this section, you will learn how to read syntax charts, which summarize command syntax in diagrams and provide an easy reference. Discussions of individual commands are found in an alphabetical reference in the next part of this manual.

• Files discusses different types of files used by the program. Terms frequently mentioned in this manual are defined. This section provides an overview of how files are handled.

• Variables and Variable Types and Formats contain important information about general rules and conventions regarding variables and variable definition.

• Transformations describes expressions that can be used in data transformation. Functions and operators are defined and illustrated. In this section, you will find a complete list of available functions and how to use them.


Commands

syntax,syntax,syntax

Commands are the instructions that you give the program to initiate an action. For the program to interpret your commands correctly, you must follow certain rules.

Syntax Diagrams

Each command described in this manual includes a syntax diagram that shows all of the subcommands, keywords, and specifications allowed for that command. By recognizing symbols and different type fonts, you can use the syntax diagram as a quick reference for any command.

• Lines of text in italics indicate limitation or operation mode of the command.

• Elements shown in upper case are keywords to identify commands, subcommands, functions, operators, and other specifications. In the sample syntax diagram below, T-TEST is the command and GROUPS is a subcommand.

• Elements in lower case describe specifications that you supply. For example, varlist indicates that you need to supply a list of variables.

• Elements in bold are defaults. There are two types of defaults. When the default is followed by **, as ANALYSIS** is in the sample syntax diagram below, the default (ANALYSIS) is in effect if the subcommand (MISSING) is not specified. If a default is not followed by **, it is in effect when the subcommand (or keyword) is specified by itself.

Syntax diagram

• Parentheses, apostrophes, and quotation marks are required where indicated.

• Unless otherwise noted, elements enclosed in square brackets ([ ]) are optional. For some commands, square brackets are part of the required syntax. The command description explains which specifications are required and which are optional.

• Braces ({ }) indicate a choice between elements. You can specify any one of the elements enclosed within the aligned braces.

• Ellipses indicate that you can repeat an element in the specification. The specification

T-TEST PAIRS=varlist [WITH varlist [(PAIRED)]] [/varlist ...]

means that you can specify multiple variable lists with optional WITH variables and the keyword PAIRED in parentheses.

• Most abbreviations are obvious; for example, varname stands for variable name and varlist stands for a variable list.

• The command terminator is not shown in the syntax diagram.

Command Specification

The following rules apply to all commands:

• Commands begin with a keyword that is the name of the command and often have additional specifications, such as subcommands and user specifications. Refer to the discussion of each command to see which subcommands and additional specifications are required.

• Commands and any command specifications can be entered in upper and lower case. Commands, subcommands, keywords, and variable names are translated to upper case before processing. All user specifications, including variable names, labels, and data values, preserve upper and lower case.

• Spaces can be added between specifications at any point where a single blank is allowed. In addition, lines can be broken at any point where a single blank is allowed. There are two exceptions: the END DATA command can have only one space between words, and string specifications on commands such as TITLE, SUBTITLE, VARIABLE LABELS, and VALUE LABELS can be broken across two lines only by specifying a plus sign (+) between string segments. See the topic String Values in Command Specifications for more information.

• Many command names and keywords can be abbreviated to the first three or more characters that can be resolved without ambiguity. For example, COMPUTE can be abbreviated to COMP but not COM because the latter does not adequately distinguish it from COMMENT. Some commands, however, require that all specifications be spelled out completely. This restriction is noted in the syntax chart for those commands.

Related Topics

Running Commands
Subcommands
Keywords
Values in Command Specifications
String Values in Command Specifications
Delimiters
Command Order


Running Commands

command syntax,command syntax,command syntax
syntax rules,syntax rules,syntax rules
batch vs. interactive,batch vs. interactive,batch vs. interactive
batch syntax rules,batch syntax rules,batch syntax rules
interactive syntax rules,interactive syntax rules,interactive syntax rules
production mode syntax rules,production mode syntax rules,production mode syntax rules

You can run commands in either batch (production) or interactive mode. In batch mode, commands are read and acted upon as a batch, so the system knows that a command is complete when it encounters a new command. In interactive mode, commands are processed immediately, and you must use a command terminator to indicate when a command is complete.

Interactive Mode

The following rules apply to command specifications in interactive mode:

• Each command must start on a new line. Commands can begin in any column of a command line and continue for as many lines as needed. The exception is the END DATA command, which must begin in the first column of the first line after the end of data.

• Each command should end with a period as a command terminator. It is best to omit the terminator on BEGIN DATA, however, so that inline data are treated as one continuous specification.

• The command terminator must be the last nonblank character in a command.

• In the absence of a period as the command terminator, a blank line is interpreted as a command terminator.

Note: For compatibility with other modes of command execution (including command files run with INSERT or INCLUDE commands in an interactive session), each line of command syntax should not exceed 256 bytes.

Batch (Production) Mode

The following rules apply to command specifications in batch mode:

• All commands in the command file must begin in column 1. You can use plus (+) or minus (–) signs in the first column if you want to indent the command specification to make the command file more readable.

• If multiple lines are used for a command, column 1 of each continuation line must be blank.

• Command terminators are optional.

• A line cannot exceed 256 bytes; any additional characters are truncated.

The following is a sample command file that will run in either interactive or batch mode:

GET FILE=/MYFILES/BANK.SAV’
  /KEEP ID TIME SEX JOBCAT SALBEG SALNOW
  /RENAME SALNOW = SAL90.

DO IF TIME LT 82.
+  COMPUTE RATE=0.05.
ELSE.
+  COMPUTE RATE=0.04.
END IF.

COMPUTE SALNOW=(1+RATE)*SAL90.

EXAMINE VARIABLES=SALNOW BY SEX.

Related Topics

Commands
Subcommands
Keywords
Values in Command Specifications
String Values in Command Specifications
Delimiters
Command Order


Subcommands

subcommand,subcommand,subcommand
syntax,syntax,syntax

Many commands include additional specifications called subcommands.

• Subcommands begin with a keyword that is the name of the subcommand. Most subcommands include additional specifications.

• Some subcommands are followed by an equals sign before additional specifications. The equals sign is usually optional but is required where ambiguity is possible in the specification. To avoid ambiguity, it is best to use the equals signs as shown in the syntax diagrams in this manual.

• Most subcommands can be named in any order. However, some commands require a specific subcommand order. The description of each command includes a section on subcommand order.

• Subcommands are separated from each other by a slash. To avoid ambiguity, it is best to use the slashes as shown in the syntax diagrams in this manual.

Related Topics

Commands
Running Commands
Keywords
Values in Command Specifications
String Values in Command Specifications
Delimiters
Command Order


Keywords

keywords,keywords,keywords
syntax,syntax,syntax

Keywords identify commands, subcommands, functions, operators, and other specifications.

• Keywords identifying logical operators (AND, OR, and NOT); relational operators (EQ, GE, GT, LE, LT, and NE); and ALL, BY, TO, and WITH are reserved words and cannot be used as variable names.

Related Topics

Commands
Running Commands
Subcommands
Values in Command Specifications
String Values in Command Specifications
Delimiters
Command Order


Values in Command Specifications

value,value,value
syntax,syntax,syntax

The following rules apply to values specified in commands:

• A single lowercase character in the syntax diagram, such as n, w, or d, indicates a user-specified value.

• The value can be an integer or a real number within a restricted range, as required by the specific command or subcommand. For exact restrictions, read the individual command description.

• A number specified as an argument to a subcommand can be entered with or without leading zeros.

Related Topics

Commands
Running Commands
Subcommands
Keywords
String Values in Command Specifications
Delimiters
Command Order


String Values in Command Specifications

• Each string specified in a command should be enclosed in single or double quotes.

• To specify a single quote or apostrophe within a quoted string, either enclose the entire string in double quotes or double the single quote/apostrophe. Both of the following specifications are valid:

'Client''s Satisfaction'

"Client's Satisfaction"

• To specify double quotes within a string, use single quotes to enclose the string:

'Categories Labeled "UNSTANDARD" in the Report'

• String specifications can be broken across command lines by specifying each string segment within quotes and using a plus (+) sign to join segments. For example,

'One, Two'

can be specified as

'One,'
+ ' Two'

The plus sign can be specified on either the first or the second line of the broken string. Any blanks separating the two segments must be enclosed within one or the other string segment.

• Multiple blank spaces within quoted strings are preserved and can be significant. For example, "This string" and "This string" are treated as different values.

Related Topics

Commands
Running Commands
Subcommands
Keywords
Values in Command Specifications
Delimiters
Command Order


Delimiters

delimiter,delimiter,delimiter
delimiter,delimiter,delimiter
comma,comma,comma
comma,comma,comma
delimiter,delimiter,delimiter
delimiter,delimiter,delimiter
blank,blank,blank
blank,blank,blank
delimiter,delimiter,delimiter

Delimiters are used to separate data values, keywords, arguments, and specifications.

• A blank is usually used to separate one specification from another, except when another delimiter serves the same purpose or when a comma is required.

• Commas are required to separate arguments to functions. Otherwise, blanks are generally valid substitutes for commas.

• Arithmetic operators (+, –, *, and /) serve as delimiters in expressions.

delimiter,delimiter,delimiter
special,special,special

• Blanks can be used before and after operators or equals signs to improve readability, but commas cannot.

• Special delimiters include parentheses, apostrophes, quotation marks, the slash, and the equals sign. Blanks before and after special delimiters are optional.

• The slash is used primarily to separate subcommands and lists of variables. Although slashes are sometimes optional, it is best to enter them as shown in the syntax diagrams.

• The equals sign is used between a keyword and its specifications, as in STATISTICS=MEAN, and to show equivalence, as in COMPUTE target variable=expression. Equals signs following keywords are frequently optional but are sometimes required. In general, you should follow the format of the syntax charts and examples and always include equals signs wherever they are shown.

Related Topics

Commands
Running Commands
Subcommands
Keywords
Values in Command Specifications
String Values in Command Specifications
Command Order


Command Order

order of commands,order of commands,order of commands
command order,command order,command order

Command order is more often than not a matter of common sense and follows this logical sequence: variable definition, data transformation, and statistical analysis. For example, you cannot label, transform, analyze, or use a variable in any way before it exists. The following general rules apply:

• Commands that define variables for a session (DATA LIST, GET, GET DATA, MATRIX DATA, etc.) must precede commands that assign labels or missing values to those variables; they must also precede transformation and procedure commands that use those variables.

• Transformation commands (IF, COUNT, COMPUTE, etc.) that are used to create and modify variables must precede commands that assign labels or missing values to those variables, and they must also precede the procedures that use those variables.

• Generally, the logical outcome of command processing determines command order. For example, a procedure that creates new variables in the active dataset must precede a procedure that uses those new variables.

In addition to observing the rules above, it is often important to distinguish between commands that cause the data to be read and those that do not, and between those that are stored pending execution with the next command that reads the data and those that take effect immediately without requiring that the data be read.

• Commands that cause the data to be read, as well as execute pending transformations, include all statistical procedures (e.g., CROSSTABS, FREQUENCIES, REGRESSION); some commands that save/write the contents of the active dataset (e.g., DATASET COPY, SAVE TRANSLATE, SAVE); AGGREGATE; AUTORECODE; EXECUTE; RANK; and SORT CASES.

• Commands that are stored, pending execution with the next command that reads the data, include transformation commands that modify or create new data values (e.g., COMPUTE, RECODE), commands that define conditional actions (e.g., DO IF, IF, SELECT IF), PRINT, WRITE, and XSAVE. For a comprehensive list of these commands, see Commands That Are Stored, Pending Execution.

• Commands that take effect immediately without reading the data or executing pending commands include transformations that alter dictionary information without affecting the data values (e.g., MISSING VALUES, VALUE LABELS) and commands that don't require an active dataset (e.g., DISPLAY, HOST, INSERT, OMS, SET). In addition to taking effect immediately, these commands are also processed unconditionally. For example, when included within a DO IF structure, these commands run regardless of whether or not the condition is ever met. For a comprehensive list of these commands, see Commands That Take Effect Immediately.

Example

DO IF expense = 0.
- COMPUTE profit=-99.
- MISSING VALUES expense (0).
ELSE.
- COMPUTE profit=income-expense.
END IF.
LIST VARIABLES=expense profit.

• COMPUTE precedes MISSING VALUES and is processed first; however, execution is delayed until the data are read.

• MISSING VALUES takes effect as soon as it is encountered, even if the condition is never met (i.e., even if there are no cases where expense=0).

• LIST causes the data to be read; thus, both COMPUTE and LIST are executed during the same data pass.

• Because MISSING VALUES is already in effect by this time, the first condition in the DO IF structure will never be met, because an expense value of 0 is considered missing and so the condition evaluates to missing when expense is 0.

Related Topics

Commands
Running Commands
Subcommands
Keywords
Values in Command Specifications
String Values in Command Specifications
Delimiters


Commands That Take Effect Immediately

These commands take effect immediately. They do not read the active dataset and do not execute pending transformations.

Commands That Modify the Dictionary

ADD DOCUMENT
ADD VALUE LABELS
APPLY DICTIONARY
DATAFILE ATTRIBUTE
DELETE VARIABLES
DOCUMENT
DROP DOCUMENTS
EXTENSION
FILE LABEL
FORMATS
MISSING VALUES
MRSETS
NUMERIC
OUTPUT EXPORT
PRINT FORMATS
RENAME VARIABLES
STRING
TMS IMPORT
TMS MERGE
VALUE LABELS
VARIABLE ALIGNMENT
VARIABLE ATTRIBUTE
VARIABLE LABELS
VARIABLE LEVEL
VARIABLE ROLE
VARIABLE WIDTH
WEIGHT
WRITE FORMATS

Other Commands That Take Effect Immediately

CD
CLEAR TIME PROGRAM
CLEAR TRANSFORMATIONS
CSPLAN
DATASET CLOSE
DATASET DECLARE
DATASET DISPLAY
DATASET NAME
DISPLAY
ECHO
ERASE
FILE HANDLE
FILTER
HOST
INCLUDE
INSERT
MODEL CLOSE
MODEL HANDLE
MODEL LIST
N OF CASES
NEW FILE
OMS
OMSEND
OMSINFO
OMSLOG
OUTPUT ACTIVATE
OUTPUT CLOSE
OUTPUT DISPLAY
OUTPUT NAME
OUTPUT NEW
OUTPUT OPEN
OUTPUT SAVE
PERMISSIONS
PRESERVE
READ MODEL
RESTORE
SAVE MODEL
SCRIPT
SET
SHOW
SPLIT FILE
SUBTITLE
SYSFILE INFO
TDISPLAY
TITLE
TSET
TSHOW
USE


Commands That Are Stored, Pending Execution

These commands are stored, pending execution with the next command that reads the data.

BOOTSTRAP
BREAK
CACHE
COMPUTE
COUNT
DO IF
DO REPEAT-END REPEAT
IF
LEAVE
LOOP-END LOOP
PRINT
PRINT EJECT
PRINT SPACE
RECODE
SAMPLE
SELECT IF
TEMPORARY
TIME PROGRAM
WRITE
XSAVE


Files

files,files,files

PASW Statistics reads, creates, and writes different types of files. This section provides an overview of these types and discusses concepts and rules that apply to all files.

Related Topics

Command File
Journal File
Data Files


Command File

command files,command files,command files

A command file is a text file that contains syntax commands. You can type commands in a syntax window in an interactive session, use the Paste button in dialog boxes to paste generated commands into a syntax window, and/or use any text editor to create a command file. You can also edit a journal file to produce a command file. See the topic Journal File for more information. The following is an example of a simple command file that contains both commands and inline data:

DATA LIST /ID 1-3 Gender 4 (A) Age 5-6 Opinion1 TO Opinion5 7-11.
BEGIN DATA
001F2621221
002M5611122
003F3422212
329M2121212
END DATA.
LIST.

• Case does not matter for commands but is significant for inline data. If you specified f for female and m for male in column 4 of the data line, the value of Gender would be f or m instead of F or M as it is now.

• Commands can be in upper or lower case. Uppercase characters are used for all commands throughout this manual only to distinguish them from other text.

Related Topics

Files
Journal File
Data Files


Journal File

PASW Statistics keeps a journal file to record all commands either run from a syntax window or generated from a dialog box during a session. You can retrieve this file with any text editor and review it to learn how the session went. You can also edit the file to build a new command file and use it in another run. An edited and tested journal file can be saved and used later for repeated tasks. The journal file also records any error or warning messages generated by commands. You can rerun these commands after making corrections and removing the messages.

The journal file is controlled by the File Locations tab of the Options dialog box, available from the Edit menu. You can turn journaling off and on, append or overwrite the journal file, and select the journal filename and location. By default, commands from subsequent sessions are appended to the journal.

The following example is a journal file for a short session with a warning message.

Records from a journal file
DATA LIST /ID 1-3 Gender 4 (A) Age 5-6 Opinion1 TO Opinion5 7-11.
BEGIN DATA
001F2621221
002M5611122
003F3422212
004F45112L2
>Warning # 1102
>An invalid numeric field has been found.  The result has been set to the
>system-missing value.
END DATA.
LIST.
journal file,journal file,journal file
input data,input data,input data
file,file,file

• The warning message, marked by the > symbol, tells you that an invalid numeric field has been found. Checking the last data line, you will notice that column 10 is L, which is probably a typographic error. You can correct the typo (for example, by changing the L to 1), delete the warning message, and submit the file again.

Related Topics

Files
Command File
Data Files


Data Files

A wide variety of data file formats can be read and written, including raw data files created by a data entry device or a text editor, formatted data files produced by a data management program, data files generated by other software packages, and PASW Statistics data files.

Related Topics

Files
Command File
Journal File
Raw Data Files
Data Files Created by Other Applications
PASW Statistics Data Files


Raw Data Files

Raw data files contain only data, either generated by a programming language or entered with a data entry device or a text editor. Raw data arranged in almost any format can be read, including raw matrix materials and nonprintable codes. User-entered data can be embedded within a command file as inline data (BEGIN DATA-END DATA) or saved as an external file. Nonprintable machine codes are usually stored in an external file.

Commands that read raw data files include:

• GET DATA

• DATA LIST

• MATRIX DATA

Complex and hierarchical raw data files can be read using commands such as:

• INPUT PROGRAM

• FILE TYPE

• REREAD

• REPEATING DATA

Related Topics

Data Files
Data Files Created by Other Applications
PASW Statistics Data Files


Data Files Created by Other Applications

You can read files from a variety of other software applications, including:

• Excel spreadsheets (GET DATA command).

• Database tables (GET DATA command).

• PASW Data Collection data sources (GET DATA command).

• Delimited (including tab-delimited and CSV) and fixed-format text data files (DATA LIST, GET DATA).

• dBase and Lotus files (GET TRANSLATE command).

• SAS datasets (GET SAS command).

• Stata data files (GET STATA command).

Related Topics

Data Files
Raw Data Files
PASW Statistics Data Files


PASW Statistics Data Files

PASW Statistics data files are files specifically formatted for use by PASW Statistics, containing both data and the metadata (dictionary) that define the data.

• To save the active dataset in PASW Statistics format, use SAVE or XSAVE. On most operating systems, the default extension of a saved PASW Statistics data file is .sav. PASW Statistics data files can also be matrix files created with the MATRIX=OUT subcommand on procedures that write matrices.

• To open PASW Statistics data files, use GET.

PASW Statistics Data File Structure

The basic structure of PASW Statistics data files is similar to a database table:

• Rows (records) are cases. Each row represents a case or an observation. For example, each individual respondent to a questionnaire is a case.

• Columns (fields) are variables. Each column represents a variable or characteristic that is being measured. For example, each item on a questionnaire is a variable.

PASW Statistics data files also contain metadata that describes and defines the data contained in the file. This descriptive information is called the dictionary. The information contained in the dictionary includes:

• Variable names and descriptive variable labels (VARIABLE LABELS command).

• Descriptive values labels (VALUE LABELS command).

• Missing values definitions (MISSING VALUES command).

• Print and write formats (FORMATS command).

Use DISPLAY DICTIONARY to display the dictionary for the active dataset. See the topic DISPLAY for more information. You can also use SYSFILE INFO to display dictionary information for any PASW Statistics data file.

Long Variable Names

In some instances, data files with variable names longer than eight bytes require special consideration:

• If you save a data file in portable format (see EXPORT ), variable names that exceed eight bytes are converted to unique eight-character names. For example, mylongrootname1, mylongrootname2, and mylongrootname3 would be converted to mylongro, mylong_2, and mylong_3, respectively.

• When using data files with variable names longer than eight bytes in version 10.x or 11.x, unique, eight-byte versions of variable names are used; however, the original variable names are preserved for use in release 12.0 or later. In releases prior to 10.0, the original long variable names are lost if you save the data file.

• Matrix data files (commonly created with the MATRIX OUT subcommand, available in some procedures) in which the VARNAME_ variable is longer than an eight-byte string cannot be read by releases prior to 12.0.

Related Topics

Data Files
Raw Data Files
Data Files Created by Other Applications


Variables

The columns in PASW Statistics data files are variables. Variables are similar to fields in a database table.

• Variable names can be defined with numerous commands, including DATA LIST, GET DATA, NUMERIC, STRING, VECTOR, COMPUTE, and RECODE. They can be changed with the RENAME VARIABLES command.

• Optional variable attributes can include descriptive variable labels (VARIABLE LABELS command), value labels (VALUE LABELS command), and missing value definitions (MISSING VALUES command).

The following sections provide information on variable naming rules, syntax for referring to inclusive lists of variables (keywords ALL and TO), scratch (temporary) variables, and system variables.

Related Topics

Variable Names
Mixed Case Variable Names
Long Variable Names
Keyword TO
Keyword ALL
Scratch Variables
System Variables


Variable Names

variable names,variable names,variable names
rules,rules,rules

Variable names are stored in the dictionary of the data file. Observe the following rules when establishing variable names or referring to variables by their names on commands:

• Each variable name must be unique; duplication is not allowed.

• Variable names can be up to 64 bytes long, and the first character must be a letter or one of the characters @, #, or $. Subsequent characters can be any combination of letters, numbers, nonpunctuation characters, and a period (.). In code page mode, sixty-four bytes typically means 64 characters in single-byte languages (for example, English, French, German, Spanish, Italian, Hebrew, Russian, Greek, Arabic, and Thai) and 32 characters in double-byte languages (for example, Japanese, Chinese, and Korean). Many string characters that only take one byte in code page mode take two or more bytes in Unicode mode. For example, é is one byte in code page format but is two bytes in Unicode format; so résumé is six bytes in a code page file and eight bytes in Unicode mode. For information on Unicode mode, see SET command, UNICODE subcommand.

Note: Letters include any nonpunctuation characters used in writing ordinary words in the languages supported in the platform's character set.

• Variable names cannot contain spaces.

• A # character in the first position of a variable name defines a scratch variable. You can only create scratch variables with command syntax. You cannot specify a # as the first character of a variable in dialog boxes that create new variables. See the topic Scratch Variables for more information.

• A $ sign in the first position indicates that the variable is a system variable. See the topic System Variables for more information. The $ sign is not allowed as the initial character of a user-defined variable.

• The period, the underscore, and the characters $, #, and @ can be used within variable names. For example, A._$@#1 is a valid variable name.

• Variable names ending with a period should be avoided, since the period may be interpreted as a command terminator. You can only create variables that end with a period in command syntax. You cannot create variables that end with a period in dialog boxes that create new variables.

• Variable names ending in underscores should be avoided, since such names may conflict with names of variables automatically created by commands and procedures.

• Reserved keywords cannot be used as variable names. Reserved keywords are ALL, AND, BY, EQ, GE, GT, LE, LT, NE, NOT, OR, TO, and WITH.

• Variable names can be defined with any mixture of uppercase and lowercase characters, and case is preserved for display purposes.

• When long variable names need to wrap onto multiple lines in output, lines are broken at underscores, periods, and points where content changes from lower case to upper case.

Related Topics

Variables
Mixed Case Variable Names
Long Variable Names
Keyword TO
Keyword ALL
Scratch Variables
System Variables


Mixed Case Variable Names

variable names,variable names,variable names
preserving case,preserving case,preserving case

Variable names can be defined with any mixture of upper- and lowercase characters, and case is preserved for display purposes.

• Variable names are stored and displayed exactly as specified on commands that read data or create new variables. For example, compute NewVar = 1 creates a new variable that will be displayed as NewVar in the Data Editor and in output from any procedures that display variable names.

• Commands that refer to existing variable names are
not case sensitive. For example, FREQUENCIES
VARIABLES = newvar, FREQUENCIES
VARIABLES = NEWVAR, and FREQUENCIES
VARIABLES = NewVar are all functionally equivalent.

• In languages such as Japanese, where some characters exist in both narrow and wide forms, these characters are considered different and are displayed using the form in which they were entered.

• When long variable names need to wrap onto multiple lines in output, attempts are made to break lines at underscores, periods, and changes from lower to upper case.

You can use the RENAME VARIABLES command to change the case of any characters in a variable name.

Example

RENAME VARIABLES (newvariable = NewVariable).

• For the existing variable name specification, case is ignored. Any combination of upper and lower case will work.

• For the new variable name, case will be preserved as entered for display purposes.

For more information, see the RENAME VARIABLES command.

Related Topics

Variables
Variable Names
Long Variable Names
Keyword TO
Keyword ALL
Scratch Variables
System Variables


Long Variable Names

variable names,variable names,variable names
special considerations for long variable names,special considerations for long variable names,special considerations for long variable names
variable names,variable names,variable names
in matrix data files,in matrix data files,in matrix data files
matrix data files,matrix data files,matrix data files
variable names,variable names,variable names
variable names,variable names,variable names
converting long names in earlier versions,converting long names in earlier versions,converting long names in earlier versions

In some instances, data files with variable names longer than eight bytes require special consideration:

• If you save a data file in portable format (see EXPORT ), variable names that exceed eight bytes are converted to unique eight-character names. For example, mylongrootname1, mylongrootname2, and mylongrootname3 would be converted to mylongro, mylong_2, and mylong_3, respectively.

• When using data files with variable names longer than eight bytes in version 10.x or 11.x, unique, eight-byte versions of variable names are used; however, the original variable names are preserved for use in release 12.0 or later. In releases prior to 10.0, the original long variable names are lost if you save the data file.

• Matrix data files (commonly created with the MATRIX OUT subcommand, available in some procedures) in which the VARNAME_ variable is longer than an eight-byte string cannot be read by releases prior to 12.0.

Related Topics

Variables
Variable Names
Mixed Case Variable Names
Keyword TO
Keyword ALL
Scratch Variables
System Variables


Keyword TO

TO (keyword),TO (keyword),TO (keyword)
variable lists,variable lists,variable lists
ranges using TO keyword,ranges using TO keyword,ranges using TO keyword

You can establish names for a set of variables or refer to any number of consecutive variables by specifying the beginning and the ending variables joined by the keyword TO.

To establish names for a set of variables with the keyword TO, use a character prefix with a numeric suffix.

• The prefix can be any valid name. Both the beginning and ending variables must use the same prefix.

• The numeric suffix can be any integer, but the first number must be smaller than the second. For example, ITEM1 TO ITEM5 establishes five variables named ITEM1, ITEM2, ITEM3, ITEM4, and ITEM5.

• Leading zeros used in numeric suffixes are included in the variable name. For example, V001 TO V100 establishes 100 variables--V001, V002, V003, ..., V100. V1 TO V100 establishes 100 variables--V1, V2, V3, ..., V100.

The keyword TO can also be used on procedures and other commands to refer to consecutive variables on the active dataset. For example, AVAR TO VARB refers to the variables AVAR and all subsequent variables up to and including VARB.

• In most cases, the TO specification uses the variable order on the active dataset. Use the DISPLAY command to see the order of variables on the active dataset.

• On some subcommands, the order in which variables are named on a previous subcommand, usually the VARIABLES subcommand, is used to determine which variables are consecutive and therefore are implied by the TO specification. This is noted in the description of individual commands.

Related Topics

Variables
Variable Names
Mixed Case Variable Names
Long Variable Names
Keyword ALL
Scratch Variables
System Variables


Keyword ALL

ALL (keyword),ALL (keyword),ALL (keyword)
in variable lists,in variable lists,in variable lists

The keyword ALL can be used in many commands to specify all of the variables in the active dataset. For example,

FREQUENCIES /VARIABLES = ALL.

or

OLAP CUBES income by ALL.

In the second example, a separate table will be created for every variable in the data file, including a table of income by income.

Related Topics

Variables
Variable Names
Mixed Case Variable Names
Long Variable Names
Keyword TO
Scratch Variables
System Variables


Scratch Variables

scratch variables,scratch variables,scratch variables
defined,defined,defined
variables,variables,variables
scratch,scratch,scratch
temporary variables,temporary variables,temporary variables

You can use scratch variables to facilitate operations in transformation blocks and input programs.

• To create a scratch variable, specify a variable name that begins with the # character—for example, #ID. Scratch variables can be either numeric or string.

• Scratch variables are initialized to 0 for numeric variables or blank for string variables.

• Scratch variables cannot be used in procedures and cannot be saved in a data file (but they can be written to an external text file with PRINT or WRITE).

• Scratch variables cannot be assigned missing values, variable labels, or value labels.

• Scratch variables can be created between procedures but are always discarded as the next procedure begins.

• Scratch variables are discarded once a TEMPORARY command is specified.

• The keyword TO cannot refer to scratch variables and permanent variables at the same time.

• Scratch variables cannot be specified on a WEIGHT command.

• Scratch variable cannot be specified on the LEAVE command.

• Scratch variables are not reinitialized when a new case is read. Their values are always carried across cases. (So using a scratch variable can be essentially equivalent to using the LEAVE command.)

Because scratch variables are discarded, they are often useful as loop index variables and as other variables that do not need to be retained at the end of a transformation block. See the topic Indexing Clause (LOOP-END LOOP command) for more information. Because scratch variables are not reinitialized for each case, they are also useful in loops that span cases in an input program. See the topic Creating Data (LOOP-END LOOP command) for more information.

Example

DATA LIST LIST (",") /Name (A15).
BEGIN DATA
Nick Lowe
Dave Edmunds
END DATA.
STRING LastName (A15).
COMPUTE #index=INDEX(Name, " ").
COMPUTE LastName=SUBSTR(Name, #index+1).
LIST.
Listing of case values
Name            LastName

Nick Lowe       Lowe
Dave Edmunds    Edmunds

• #index is a scratch variable that is set to the numeric position of the first occurrence of a blank space in Name.

• The scratch variable is then used in the second COMPUTE command to determine the starting position of LastName within Name.

• The default LIST command will list the values of all variables for all cases. It does not include #index because LIST is a procedure that reads the data, and all scratch variables are discarded at that point.

In this example, you could have obtained the same end result without the scratch variable, using:

COMPUTE LastName=SUBSTR(Name, INDEX(Name, " ")+1).

The use of a scratch variable here simply makes the code easier to read.

Example: Scratch variable initialization

DATA LIST FREE /Var1.
BEGIN DATA
2 2 2
END DATA.
COMPUTE Var2=Var1+Var2.
COMPUTE Var3=0.
COMPUTE Var3=Var1+Var3.
COMPUTE #ScratchVar=Var1+#ScratchVar.
COMPUTE Var4=#ScratchVar.
LIST.
Listing of case values
    Var1     Var2     Var3     Var4

    2.00      .       2.00     2.00
    2.00      .       2.00     4.00
    2.00      .       2.00     6.00

• The new variable Var2 is reinitialized to system-missing for each case, therefore Var1+Var2 always results in system-missing.

• The new variable Var3 is reset to 0 for each case (COMPUTE Var3=0), therefore Var1+Var3 is always equivalent to Var1+0.

• #ScratchVar is initialized to 0 for the first case and is not reinitialized for subsequent cases; so Var1+#ScratchVar is equivalent to Var1+0 for the first case, Var1+2 for the second case, and Var1+4 for the third case.

• Var4 is set to the value of #ScratchVar in this example so that the value can be displayed in the case listing.

In this example, the commands:

COMPUTE #ScratchVar=Var1+#ScratchVar.
COMPUTE Var4=#ScratchVar.

are equivalent to:

COMPUTE Var4=Var1+Var4.
LEAVE Var4.

Related Topics

Variables
Variable Names
Mixed Case Variable Names
Long Variable Names
Keyword TO
Keyword ALL
System Variables


System Variables

system variables,system variables,system variables
case number,case number,case number
date and time,date and time,date and time
missing values,missing values,missing values
$CASENUM,$CASENUM,$CASENUM
system variable,system variable,system variable
case number,case number,case number
system variable $CASENUM,system variable $CASENUM,system variable $CASENUM
row number,row number,row number
system variable $CASENUM,system variable $CASENUM,system variable $CASENUM
date,date,date
system variable $TIME,system variable $TIME,system variable $TIME
current date and time,current date and time,current date and time
system variable $TIME,system variable $TIME,system variable $TIME
$TIME,$TIME,$TIME
system variable,system variable,system variable
$DATE,$DATE,$DATE
system variable,system variable,system variable
missing values,missing values,missing values
system variable $SYSMIS,system variable $SYSMIS,system variable $SYSMIS
$SYSMIS,$SYSMIS,$SYSMIS
system variable,system variable,system variable
$DATE,$DATE,$DATE
system variable,system variable,system variable
$JDATE,$JDATE,$JDATE
system variable,system variable,system variable
$DATE11,$DATE11,$DATE11
system variable,system variable,system variable

System variables are special variables created during a working session to keep system-required information, such as the number of cases read by the system, the system-missing value, and the current date. System variables can be used in data transformations.

• The names of system variables begin with a dollar sign ($).

• You cannot modify a system variable or alter its print or write format. Except for these restrictions, you can use system variables anywhere that a normal variable is used in the transformation language.

• System variables are not available for procedures.

$CASENUM | Current case sequence number. For each case, $CASENUM is the number of cases read up to and including that case. The format is F8.0. The value of $CASENUM is not necessarily the row number in a Data Editor window (available in windowed environments), and the value changes if the file is sorted or new cases are inserted before the end of the file.
$SYSMIS | System-missing value. The system-missing value displays as a period (.) or whatever is used as the decimal point.
$JDATE | Current date in number of days from October 14, 1582 (day 1 of the Gregorian calendar). The format is F6.0.
$DATE | Current date in international date format with two-digit year. The format is A9 in the form dd-mmm-yy.
$DATE11 | Current date in international date format with four-digit year. The format is A11 in the form dd-mmm-yyyy.
$TIME | Current date and time. $TIME represents the number of seconds from midnight, October 14, 1582, to the date and time when the transformation command is executed. The format is F20. You can display this as a date in a number of different date formats. You can also use it in date and time functions.
$LENGTH | The current page length. The format is F11.0. For more information, see SET.
$WIDTH | The current page width. The format is F3.0. For more information, see SET.

Related Topics

Variables
Variable Names
Mixed Case Variable Names
Long Variable Names
Keyword TO
Keyword ALL
Scratch Variables


Variable Types and Formats

formats,formats,formats

There are two basic variable types:

• String. Also referred to alphanumeric. String values are stored as codes listed in the PASW Statistics character set. See the topic IMPORT/EXPORT Character Sets for more information.

• Numeric. Numeric values are stored internally as double-precision floating-point numbers.

Variable formats determine how raw data is read into storage and how values are displayed and written. For example, all dates and times are stored internally as numeric values, but you can use date and time format specifications to both read and display date and time values in standard date and time formats. The following sections provide details on how formats are specified and how those formats affect how data are read, displayed, and written.

Related Topics

Input and Output Formats
String Variable Formats
A Format (Standard Characters)
AHEX Format (Hexadecimal Characters)
Numeric Variable Formats
F, N, and E Formats
COMMA, DOT, DOLLAR, and PCT Formats
Binary and Hexadecimal Formats
Date and Time Formats
Input Data Specification
FORTRAN-like Input Format Specifications


Input and Output Formats

Values are read according to their input format and displayed according to their output format. The input and output formats differ in several ways.

• The input format is either specified or implied on the DATA LIST, GET DATA, or other data definition commands. It is in effect only when cases are built in an active dataset.

• Output formats are automatically generated from input formats, with output formats expanded to include punctuation characters, such as decimal indicators, grouping symbols, and dollar signs. For example, an input format of DOLLAR7.2 will generate an output format of DOLLAR10.2 to accommodate the dollar sign, grouping symbol (comma), and decimal indicator (period).

• The formats (specified or default) on NUMERIC, STRING, COMPUTE, or other commands that create new variables are output formats. You must specify adequate widths to accommodate all punctuation characters.

• The output format is in effect during the entire working session (unless explicitly changed) and is saved in the dictionary of PASW Statistics data files.

• Output formats for numeric variables can be changed with FORMATS, PRINT FORMATS, and WRITE FORMATS.

Related Topics

Variable Types and Formats
String Variable Formats
A Format (Standard Characters)
AHEX Format (Hexadecimal Characters)
Numeric Variable Formats
F, N, and E Formats
COMMA, DOT, DOLLAR, and PCT Formats
Binary and Hexadecimal Formats
Date and Time Formats
Input Data Specification
FORTRAN-like Input Format Specifications


String Variable Formats

variable formats,variable formats,variable formats
string,string,string
formats,formats,formats
string variables,string variables,string variables
string width,string width,string width
string length,string length,string length
string variables,string variables,string variables
format,format,format
maximum width,maximum width,maximum width
maximum length,maximum length,maximum length

• The values of string variables can contain numbers, letters, and special characters and can be up to 32,767 bytes.

• System-missing values cannot be generated for string variables, since any character is a legal string value.

• When a transformation command that creates or modifies a string variable yields a missing or undefined result, a null string is assigned. The variable displays as blanks and is not treated as missing.

• String formats are used to read and write string variables. The input values can be alphanumeric characters (A format) or the hexadecimal representation of alphanumeric characters (AHEX format).

• For fixed-format raw data, the width can be explicitly specified on commands such as DATA LIST and GET DATA or implied if column-style specifications are used. For freefield data, the default width is 1; if the input string may be longer, w must be explicitly specified. Input strings shorter than the specified width are right-padded with blanks.

• The output format for a string variable is always A. The width is determined by the input format or the format assigned on the STRING command.Once defined, the width of a string variable can only be changed with the ALTER TYPE command.

Related Topics

Variable Types and Formats
Input and Output Formats
A Format (Standard Characters)
AHEX Format (Hexadecimal Characters)
Numeric Variable Formats
F, N, and E Formats
COMMA, DOT, DOLLAR, and PCT Formats
Binary and Hexadecimal Formats
Date and Time Formats
Input Data Specification
FORTRAN-like Input Format Specifications


A Format (Standard Characters)

The A format is used to read standard characters. Characters can include letters, numbers, punctuation marks, blanks, and most other characters on your keyboard. Numbers entered as values for string variables cannot be used in calculations unless you convert them to numeric format with the NUMBER function. See the topic String/Numeric Conversion Functions for more information.

Fixed data:

With fixed-format input data, any punctuation—including leading, trailing, and embedded blanks—within the column specifications is included in the string value. For example, a string value of

Mr. Ed

(with one embedded blank) is distinguished from a value of

Mr.  Ed

(with two embedded blanks). It is also distinguished from a string value of

MR. ED

(all upper case), and all three are treated as separate values. These can be important considerations for any procedures, transformations, or data selection commands involving string variables. Consider the following example:

DATA LIST FIXED /ALPHAVAR 1-10 (A).
BEGIN DATA
Mr. Ed
Mr. Ed
MR. ED
Mr.  Ed
 Mr. Ed
END DATA.
AUTORECODE ALPHAVAR /INTO NUMVAR.
LIST.

AUTORECODE recodes the values into consecutive integers. The following figure shows the recoded values.

Different string values illustrated
ALPHAVAR   NUMVAR

Mr. Ed        4
Mr. Ed        4
MR. ED        2
Mr.  Ed       3
 Mr. Ed       1

Related Topics

Variable Types and Formats
Input and Output Formats
String Variable Formats
AHEX Format (Hexadecimal Characters)
Numeric Variable Formats
F, N, and E Formats
COMMA, DOT, DOLLAR, and PCT Formats
Binary and Hexadecimal Formats
Date and Time Formats
Input Data Specification
FORTRAN-like Input Format Specifications


AHEX Format (Hexadecimal Characters)

hexadecimal format,hexadecimal format,hexadecimal format
AHEX format,AHEX format,AHEX format

The AHEX format is used to read the hexadecimal representation of standard characters. Each set of two hexadecimal characters represents one standard character. For codes used on different operating systems, see IMPORT/EXPORT Character Sets.

• The w specification refers to columns of the hexadecimal representation and must be an even number. Leading, trailing, and embedded blanks are not allowed, and only valid hexadecimal characters can be used in input values.

• For some operating systems (e.g., IBM CMS), letters in hexadecimal values must be upper case.

• The default output format for variables read with the AHEX input format is the A format. The default width is half the specified input width. For example, an input format of AHEX14 generates an output format of A7.

• Used as an output format, the AHEX format displays the printable characters in the hexadecimal characters specific to your system. The following commands run on a UNIX system--where A=41 (decimal 65), a=61 (decimal 97), and so on--produce the output shown below:

DATA LIST FIXED
   /A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z 1-26 (A).
FORMATS ALL (AHEX2).
BEGIN DATA
ABCDEFGHIJKLMNOPQRSTUVWXYZ
abcdefghijklmnopqrstuvwxyz
END DATA.
LIST.
Display of hexadecimal representation of the character set with AHEX format
A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z

41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F 50 51 52 53 54 55 56 57 58 59 5A
61 62 63 64 65 66 67 68 69 6A 6B 6C 6D 6E 6F 70 71 72 73 74 75 76 77 78 79 7A

Related Topics

Variable Types and Formats
Input and Output Formats
String Variable Formats
A Format (Standard Characters)
Numeric Variable Formats
F, N, and E Formats
COMMA, DOT, DOLLAR, and PCT Formats
Binary and Hexadecimal Formats
Date and Time Formats
Input Data Specification
FORTRAN-like Input Format Specifications


Numeric Variable Formats

variable formats,variable formats,variable formats
numeric,numeric,numeric
formats,formats,formats
numeric variables,numeric variables,numeric variables

• By default, if no format is explicitly specified, commands that read raw data--such as DATA LIST and GET DATA--assume that variables are numeric with an F format type. The default width depends on whether the data are in fixed or freefield format. For a discussion of fixed data and freefield data, see DATA LIST.

• Numeric variables created by COMPUTE, COUNT, or other commands that create numeric variables are assigned a format type of F8.2(or the default numeric format defined on SET FORMAT).

• If a data value exceeds its width specification, an attempt is made to display some value nevertheless. First, the decimals are rounded, then punctuation characters are taken out, then scientific notation is tried, and if there is still not enough space, an ellipsis (...) is displayed, indicating that a value is present but cannot be displayed in the assigned width.

• The output format does not affect the value stored in the file. A numeric value is always stored in double precision.

• For all numeric formats, the maximum width is 40.

• For numeric formats where decimals are allowed, the maximum number of decimals is 16.

• For default numeric (F) format and scientific notation (E) format, the decimal indicator of the input data from text data sources (read by commands such as DATA LIST and GET DATA) must match the PASW Statistics locale decimal indicator (period or comma). Use SET DECIMAL to set the decimal indicator. Use SHOW DECIMAL to display the current decimal indicator.

Related Topics

Variable Types and Formats
Input and Output Formats
String Variable Formats
A Format (Standard Characters)
AHEX Format (Hexadecimal Characters)
F, N, and E Formats
COMMA, DOT, DOLLAR, and PCT Formats
Binary and Hexadecimal Formats
Date and Time Formats
Input Data Specification
FORTRAN-like Input Format Specifications


F, N, and E Formats

leading zeros,leading zeros,leading zeros
restricted numeric (N) format,restricted numeric (N) format,restricted numeric (N) format
restricted numeric (N) format,restricted numeric (N) format,restricted numeric (N) format
scientific notation,scientific notation,scientific notation
F (standard numeric) format,F (standard numeric) format,F (standard numeric) format
E (scientific notation) format,E (scientific notation) format,E (scientific notation) format

The following table lists the formats most commonly used to read in and write out numeric data. Format names are followed by total width (w) and an optional number of decimal positions (d). For example, a format of F5.2 represents a numeric value with a total width of 5, including two decimal positions and a decimal indicator.

Common numeric formats
Format type | Description | Sample format | Sample input | Output for fixed input |  | Output for freefield input
 |  |  |  | Format | Value | Format | Value
Fw.d | Standard numeric | F5.0 | 1234 | F5.0 | 1234 | F5.0 | 1234
 |  |  | 1.234 |  | 1* |  | 1*
 |  | F5.2 | 1234 | F6.2 | 1234.0 | F6.2 | 1234.0
 |  |  | 1.234 |  | 1.23* |  | 1.23*
Nw.d | Restricted numeric | N5.0 | 00123 | F5.0 | 123 | F5.0 | 123
 |  |  | 123 |  | . † |  | 123
 |  | N5.2 | 12345 | F6.2 | 12345 | F6.2 | 12345
 |  |  | 12.34 |  | . † |  | . †
Ew.d | Scientific notation | E8.0 | 1234E3 | E10.3 | 1.234E+06 | E10.3 | 1.234E+06‡
 |  |  | 1234 |  | 1.234E+03 |  | 1.234E+03

* Only the display is truncated. The value is stored in full precision.

† System-missing value.

‡ Scientific notation is accepted in input data with F, COMMA, DOLLAR, DOT, and PCT formats. The same rules apply as specified below.

For fixed data:

• With the N format, only unsigned integers are allowed as input values. Values not padded with leading zeros to the specified width or those containing decimal points are assigned the system-missing value. This input format is useful for reading and checking values that should be integers containing leading zeros.

• The E format reads all forms of scientific notation. If the sign is omitted, + is assumed. If the sign (+ or –) is specified before the exponent, the E or D can be omitted. A single space is permitted after the E or D and/or after the sign. If both the sign and the letter E or D are omitted, implied decimal places are assumed. For example, 1.234E3, 1.234+3, 1.234E+3, 1.234D3, 1.234D+3, 1.234E 3, and 1234 are all legitimate values. Only the last value can imply decimal places.

• E format input values can be up to 40 characters wide and include up to 15 decimal positions.

• The default output width (w) for the E format is either the specified input width or the number of specified decimal positions plus 7 (d+7), whichever is greater. The minimum width is 10 and the minimum decimal places are 3.

• The DATA LIST command can read fixed-format numeric data with implied decimal positions. See the topic Implied Decimal Positions (DATA LIST command) for more information.

For freefield data:

• F format w and d specifications do not affect how data are read. They only determine the output formats (expanded, if necessary). 1234 is always read as 1234 in freefield data, but a specified F5.2 format will be expanded to F6.2 and the value will be displayed as 1234.0 (the last decimal place is rounded because of lack of space).

• When the N format is used for freefield data, input values with embedded decimal indicators are assigned the system-missing value, but integer input values without leading zeroes are treated as valid. For example, with an input format of N5.0, a value of 123 is treated the same as a value of 00123, but a value of 12.34 is assigned the system-missing value.

• The E format for freefield data follows the same rules as for fixed data except that no blank space is permitted in the value. Thus, 1.234E3 and 1.234+3 are allowed, but the value 1.234 3 will cause mistakes when the data are read.

• The default output E format and the width and decimal place limitations are the same as with fixed data.

N (Restricted Numeric) Output Format

N format input values are assigned an F output format. To display, print, and write N format values with leading zeroes, use the FORMATS command to specify N as the output format. See the topic FORMATS for more information.

Related Topics

Variable Types and Formats
Input and Output Formats
String Variable Formats
A Format (Standard Characters)
AHEX Format (Hexadecimal Characters)
Numeric Variable Formats
COMMA, DOT, DOLLAR, and PCT Formats
Binary and Hexadecimal Formats
Date and Time Formats
Input Data Specification
FORTRAN-like Input Format Specifications


COMMA, DOT, DOLLAR, and PCT Formats

DOLLAR format,DOLLAR format,DOLLAR format
PCT format,PCT format,PCT format
COMMA format,COMMA format,COMMA format
DOT format,DOT format,DOT format
decimal indicator,decimal indicator,decimal indicator

The numeric formats listed below read and write data with embedded punctuation characters and symbols, such as commas, dots, and dollar and percent signs. The input data may or may not contain such characters. The data values read in are stored as numbers but displayed using the appropriate formats.

• DOLLAR. Numeric values with a leading dollar sign, a comma used as the grouping separator, and a period used as the decimal indicator. For example, $1,234.56.

• COMMA. Numeric values with a comma used as the grouping separator and a period used as decimal indicator. For example, 1,234.56.

• DOT. Numeric values with a period used as the grouping separator and a comma used as the decimal indicator. For example, 1.234,56.

• PCT. Numeric values with a trailing percent sign. For example, 123.45%.

The input data values may or may not contain the punctuation characters allowed by the specified format, but the data values may not contain characters not allowed by the format. For example, with a DOLLAR input format, input values of 1234.56, 1,234.56, and $1,234.56 are all valid and stored internally as the same value--but with a COMMA input format, the input value with a leading dollar sign would be assigned the system-missing value.

Example Collapse Hide details
DATA LIST LIST (" ") /dollarVar (DOLLAR9.2) commaVar (COMMA9.2)
  dotVar (DOT9.2) pctVar (PCT9.2).
BEGIN DATA
1234 1234 1234 1234
$1,234.00 1,234.00 1.234,00 1234.00%
END DATA.
LIST.
Output illustrating DOLLAR, COMMA, DOT, and PCT formats
    dollarVar     commaVar       dotVar      pctVar

    $1,234.00     1,234.00     1.234,00    1234.00%
    $1,234.00     1,234.00     1.234,00    1234.00%

Other formats that use punctuation characters and symbols are date and time formats and custom currency formats. For more information on date and time formats, see Date and Time Formats. Custom currency formats are output formats only, and are defined with the SET command.

Related Topics

Variable Types and Formats
Input and Output Formats
String Variable Formats
A Format (Standard Characters)
AHEX Format (Hexadecimal Characters)
Numeric Variable Formats
F, N, and E Formats
Binary and Hexadecimal Formats
Date and Time Formats
Input Data Specification
FORTRAN-like Input Format Specifications


Binary and Hexadecimal Formats

binary format,binary format,binary format
hexadecimal format,hexadecimal format,hexadecimal format

Data can be read and written in formats used by a number of programming languages such as PL/I, COBOL, FORTRAN, and Assembler. The data can be binary, hexadecimal, or zoned decimal. Formats described in this section can be used both as input formats and output formats, but with fixed data only.

The default output format for all formats described in this section is an equivalent F format, allowing the maximum number of columns for values with symbols and punctuation. To change the default, use FORMATS or WRITE FORMATS.

IBw.d (integer binary):

The IB format reads fields that contain fixed-point binary (integer) data. The data might be generated by COBOL using COMPUTATIONAL data items, by FORTRAN using INTEGER*2 or INTEGER*4, or by Assembler using fullword and halfword items. The general format is a signed binary number that is 16 or 32 bits in length.

The general syntax for the IB format is IBw.d, where w is the field width in bytes (omitted for column-style specifications) and d is the number of digits to the right of the decimal point. Since the width is expressed in bytes and the number of decimal positions is expressed in digits, d can be greater than w. For example, both of the following commands are valid:

DATA LIST FIXED /VAR1 (IB4.8).

DATA LIST FIXED /VAR1 1-4 (IB,8).

Widths of 2 and 4 represent standard 16-bit and 32-bit integers, respectively. Fields read with the IB format are treated as signed. For example, the one-byte binary value 11111111 would be read as –1.

PIBw.d (positive integer binary):

The PIB format is essentially the same as IB except that negative numbers are not allowed. This restriction allows one additional bit of magnitude. The same one-byte value 11111111 would be read as 255.

PIBHEXw (hexadecimal of PIB):

The PIBHEX format reads hexadecimal numbers as unsigned integers and writes positive integers as hexadecimal numbers. The general syntax for the PIBHEX format is PIBHEXw, where w indicates the total number of hexadecimal characters. The w specification must be an even number with a maximum of 16.

For input data, each hexadecimal number must consist of the exact number of characters. No signs, decimal points, or leading and trailing blanks are allowed. For some operating systems (such as IBM CMS), hexadecimal characters must be upper case. The following example illustrates the kind of data that the PIBHEX format can read:

DATA LIST FIXED
 /VAR1 1-4 (PIBHEX) VAR2 6-9 (PIBHEX) VAR3 11-14 (PIBHEX).
BEGIN DATA
0001 0002 0003
0004 0005 0006
0007 0008 0009
000A 000B 000C
000D 000E 000F
00F0 0B2C FFFF
END DATA.
LIST.

The values for VAR1, VAR2, and VAR3 are listed in the figure below. The PIBHEX format can also be used to write decimal values as hexadecimal numbers, which may be useful for programmers.

Output displaying values read in PIBHEX format
 VAR1   VAR2   VAR3

     1      2      3
     4      5      6
     7      8      9
    10     11     12
    13     14     15
   240   2860  65535

Zw.d (zoned decimal):

The Z format reads data values that contain zoned decimal data. Such numbers may be generated by COBOL systems using DISPLAY data items, by PL/I systems using PICTURE data items, or by Assembler using zoned decimal data items.

In zoned decimal format, one digit is represented by one byte, generally hexadecimal F1 representing 1, F2 representing 2, and so on. The last byte, however, combines the sign for the number with the last digit. In the last byte, hexadecimal A, F, or C assigns +, and B, D, or E assigns –. For example, hexadecimal D1 represents 1 for the last digit and assigns the minus sign (–) to the number.

The general syntax of the Z format is Zw.d, where w is the total number of bytes (which is the same as columns) and d is the number of decimals. For input data, values can appear anywhere within the column specifications. Both leading and trailing blanks are allowed. Decimals can be implied by the input format specification or explicitly coded in the data. Explicitly coded decimals override the input format specifications.

The following example illustrates how the Z format reads zoned decimals in their printed forms on IBM mainframe and PC systems. The printed form for the sign zone (A to I for +1 to +9, and so on) may vary from system to system.

DATA LIST FIXED /VAR1 1-5 (Z) VAR2 7-11 (Z,2) VAR3 13-17 (Z)
 VAR4 19-23 (Z,2) VAR5 25-29 (Z) VAR6 31-35 (Z,2).
BEGIN DATA
1234A 1234A 1234B 1234B 1234C 1234C
1234D 1234D 1234E 1234E 1234F 1234F
1234G 1234G 1234H 1234H 1234I 1234I
1234J 1234J 1234K 1234K 1234L 1234L
1234M 1234M 1234N 1234N 1234O 1234O
1234P 1234P 1234Q 1234Q 1234R 1234R
1234{ 1234{ 1234} 1234} 1.23M 1.23M
END DATA.
LIST.

The values for VAR1 to VAR6 are listed in the following figure.

Output displaying values read in Z format
VAR1    VAR2   VAR3    VAR4   VAR5    VAR6

 12341  123.41  12342  123.42  12343  123.43
 12344  123.44  12345  123.45  12346  123.46
 12347  123.47  12348  123.48  12349  123.49
-12341 -123.41 -12342 -123.42 -12343 -123.43
-12344 -123.44 -12345 -123.45 -12346 -123.46
-12347 -123.47 -12348 -123.48 -12349 -123.49
 12340  123.40 -12340 -123.40     -1   -1.23

The default output format for the Z format is the equivalent F format, as shown in the figure. The default output width is based on the input width specification plus one column for the sign and one column for the implied decimal point (if specified). For example, an input format of Z4.0 generates an output format of F5.0, and an input format of Z4.2 generates an output format of F6.2.

Pw.d (packed decimal):

The P format is used to read fields with packed decimal numbers. Such numbers are generated by COBOL using COMPUTATIONAL–3 data items and by Assembler using packed decimal data items. The general format of a packed decimal field is two four-bit digits in each byte of the field except the last. The last byte contains a single digit in its four leftmost bits and a four-bit sign in its rightmost bits. If the last four bits are 1111 (hexadecimal F), the value is positive; if they are 1101 (hexadecimal D), the value is negative. One byte under the P format can represent numbers from –9 to 9.

The general syntax of the P format is Pw.d, where w is the number of bytes (not digits) and d is the number of digits to the right of the implied decimal point. The number of digits in a field is (2*w–1).

PKw.d (unsigned packed decimal):

The PK format is essentially the same as P except that there is no sign. That is, even the rightmost byte contains two digits, and negative data cannot be represented. One byte under the PK format can represent numbers from 0 to 99. The number of digits in a field is 2*w.

RBw (real binary):

The RB format is used to read data values that contain internal format floating-point numbers. Such numbers are generated by COBOL using COMPUTATIONAL–1 or COMPUTATIONAL–2 data items, by PL/I using FLOATING DECIMAL data items, by FORTRAN using REAL or REAL*8 data items, or by Assembler using floating-point data items.

The general syntax of the RB format is RBw, where w is the total number of bytes. The width specification must be an even number between 2 and 8. Normally, a width specification of 8 is used to read double-precision values, and a width of 4 is used to read single-precision values.

RBHEXw (hexadecimal of RB):

The RBHEX format interprets a series of hexadecimal characters as a number that represents a floating-point number. This representation is system-specific. If the field width is less than twice the width of a floating-point number, the value is right-padded with binary zeros. For some operating systems (for example, IBM CMS), letters in hexadecimal values must be upper case.

The general syntax of the RBHEX format is RBHEXw, where w indicates the total number of columns. The width must be an even number. The values are real (floating-point) numbers. Leading and trailing blanks are not allowed. Any data values shorter than the specified input width must be padded with leading zeros.

Related Topics

Variable Types and Formats
Input and Output Formats
String Variable Formats
A Format (Standard Characters)
AHEX Format (Hexadecimal Characters)
Numeric Variable Formats
F, N, and E Formats
COMMA, DOT, DOLLAR, and PCT Formats
Date and Time Formats
Input Data Specification
FORTRAN-like Input Format Specifications


Date and Time Formats

date format variables,date format variables,date format variables
time formats,time formats,time formats
DTIME format,DTIME format,DTIME format
TIME format,TIME format,TIME format
DATETIME format,DATETIME format,DATETIME format
DATE format,DATE format,DATE format
ADATE format,ADATE format,ADATE format
SDATE format,SDATE format,SDATE format
MOYR format,MOYR format,MOYR format
WKYR format,WKYR format,WKYR format
WKDAY format,WKDAY format,WKDAY format
MONTH format,MONTH format,MONTH format
JDATE format,JDATE format,JDATE format

Date and time formats are both input and output formats. Like numeric formats, each input format generates a default output format, automatically expanded (if necessary) to accommodate display width. Internally, all date and time format values are stored as a number of seconds: date formats (e.g., DATE, ADATE, SDATE, DATETIME) are stored as the number of seconds since October 14, 1582; time formats (TIME, DTIME) are stored as a number of seconds that represents a time interval (e.g., 10:00:00 is stored internally as 36000, which is 60 seconds x 60 minutes x 10 hours).

• All date and time formats have a minimum input width, and some have a different minimum output. Wherever the input minimum width is less than the output minimum, the width is expanded automatically when displaying or printing values. However, when you specify output formats, you must allow enough space for displaying the date and time in the format you choose.

• Input data shorter than the specified width are correctly evaluated as long as all the necessary elements are present. For example, with the TIME format, 1:2, 01 2, and 01:02 are all correctly evaluated even though the minimum width is 5. However, if only one element (hours or minutes) is present, you must use a time function to aggregate or convert the data. See the topic Date and Time Functions for more information.

• If a date or time value cannot be completely displayed in the specified width, values are truncated in the output. For example, an input time value of 1:20:59 (1 hour, 20 minutes, 59 seconds) displayed with a width of 5 will generate an output value of 01:20, not 01:21. The truncation of output does not affect the numeric value stored in the working file.

The following table shows all available date and time formats, where w indicates the total number of columns and d (if present) indicates the number of decimal places for fractional seconds. The example shows the output format with the minimum width and default decimal positions (if applicable). The format allowed in the input data is much less restrictive. See the topic Input Data Specification for more information.

Date and time formats
Format type | Description | Min w |  | Max w | Max d | General form | Example
 |  | In | Out |  |  |  |
DATEw | International date | 9 | 9 | 40 |  | dd-mmm-yy | 28-OCT-90
 |  | 10 | 11 |  |  | dd-mmm-yyyy | 28-OCT-1990
ADATEw | American date | 8 | 8 | 40 |  | mm/dd/yy | 10/28/90
 |  | 10 | 10 |  |  | mm/dd/yyyy | 10/28/1990
EDATEw | European date | 8 | 8 | 40 |  | dd.mm.yy | 28.10.90
 |  | 10 | 10 |  |  | dd.mm.yyyy | 28.10.1990
JDATEw | Julian date | 5 | 5 | 40 |  | yyddd | 90301
 |  | 7 | 7 |  |  | yyyyddd | 1990301
SDATEw | Sortable date* | 8 | 8 | 40 |  | yy/mm/dd | 90/10/28
 |  | 10 | 10 |  |  | yyyy/mm/dd | 1990/10/28
QYRw | Quarter and year | 4 | 6 | 40 |  | q Q yy | 4 Q 90
 |  | 6 | 8 |  |  | q Q yyyy | 4 Q 1990
MOYRw | Month and year | 6 | 6 | 40 |  | mmm yy | OCT 90
 |  | 8 | 8 |  |  | mmm yyyy | OCT 1990
WKYRw | Week and year | 6 | 8 | 40 |  | ww WK yy | 43 WK 90
 |  | 8 | 10 |  |  | ww WK yyyy | 43 WK 1990
WKDAYw | Day of the week | 2 | 2 | 40 |  | (name of the day) | SU
MONTHw | Month | 3 | 3 | 40 |  | (name of the month) | JAN
TIMEw | Time | 5 | 5 | 40 |  | hh:mm | 01:02
TIMEw.d |  | 10 | 10 | 40 | 16 | hh:mm:ss.s | 01:02:34.75
DTIMEw | Days and time | 1 | 1 | 40 |  | dd hh:mm | 20 08:03
DTIMEw.d |  | 13 | 13 | 40 | 16 | dd hh:mm:ss.s | 20 08:03:00
DATETIMEw | Date and time | 17 | 17 | 40 |  | dd-mmm-yyyy hh:mm | 20-JUN-1990 08:03
DATETIMEw.d |  | 22 | 22 | 40 | 16 | dd-mmm-yyyy hh:mm:ss.s | 20-JUN-1990 08:03:00

* All date and time formats produce sortable data. SDATE, a date format used in a number of Asian countries, can be sorted in its character form and is used as a sortable format by many programmers.

Related Topics

Variable Types and Formats
Input and Output Formats
String Variable Formats
A Format (Standard Characters)
AHEX Format (Hexadecimal Characters)
Numeric Variable Formats
F, N, and E Formats
COMMA, DOT, DOLLAR, and PCT Formats
Binary and Hexadecimal Formats
Input Data Specification
FORTRAN-like Input Format Specifications


Input Data Specification

date format variables,date format variables,date format variables
input specifications,input specifications,input specifications
time formats,time formats,time formats
input specifications,input specifications,input specifications
DATE format,DATE format,DATE format
ADATE format,ADATE format,ADATE format
JDATE format,JDATE format,JDATE format
TIME format,TIME format,TIME format
DTIME format,DTIME format,DTIME format
MONTH format,MONTH format,MONTH format
DATETIME format,DATETIME format,DATETIME format
WKDAY format,WKDAY format,WKDAY format
MOYR format,MOYR format,MOYR format
QYR format,QYR format,QYR format
WKYR format,WKYR format,WKYR format
variable formats,variable formats,variable formats
date and time formats,date and time formats,date and time formats
Julian date,Julian date,Julian date
weekday,weekday,weekday
month of year,month of year,month of year
quarter of year,quarter of year,quarter of year

The following general rules apply to date and time input formats:

• The century value for two-digit years is defined by the SET EPOCH value. By default, the century range begins 69 years prior to the current year and ends 30 years after the current year. Whether all four digits or only two digits are displayed in output depends on the width specification on the format.

• Dashes, periods, commas, slashes, or blanks can be used as delimiters in the input values. For example, with the DATE format, the following input forms are all acceptable:

28-OCT-90 28/10/1990 28.OCT.90 28 October, 1990

The displayed values, however, will be the same: 28-OCT-90 or 28-OCT-1990, depending on whether the specified width allows 11 characters in output.

• The JDATE format does not allow internal delimiters and requires leading zeros for day values of less than 100 and two-digit-year values of less than 10. For example, for January 1, 1990, the following two specifications are acceptable:

90001 1990001

However, neither of the following is acceptable:

90 1 90/1

• Months can be represented in digits, Roman numerals, or three-character abbreviations, and they can be fully spelled out. For example, all of the following specifications are acceptable for October:

10 X OCT October

• The quarter in QYR format is expressed as 1, 2, 3, or 4. It must be separated from the year by the letter Q. Blanks can be used as additional delimiters. For example, for the fourth quarter of 1990, all of the following specifications are acceptable:

4Q90 4Q1990 4 Q 90 4 Q 1990

On some operating systems, such as IBM CMS, Q must be upper case. The displayed output is 4 Q 90 or 4 Q 1990, depending on whether the width specified allows all four digits of the year.

• The week in the WKYR format is expressed as a number from 1 to 53. Week 1 begins on January 1, week 2 on January 8, and so on. The value may be different from the number of the calendar week. The week and year must be separated by the string WK. Blanks can be used as additional delimiters. For example, for the 43rd week of 1990, all of the following specifications are acceptable:

43WK90 43WK1990 43 WK 90 43 WK 1990

On some operating systems, such as IBM CMS, WK must be upper case. The displayed output is 43 WK 90 or 43 WK 1990, depending on whether the specified width allows enough space for all four digits of the year.

• In time specifications, colons can be used as delimiters between hours, minutes, and seconds. Hours and minutes are required, but seconds are optional. A period is required to separate seconds from fractional seconds. Hours can be of unlimited magnitude, but the maximum value for minutes is 59 and for seconds 59.999. . . .

• Data values can contain a sign (+ or –) in TIME and DTIME formats to represent time intervals before or after a point in time.

Example: DATE, ADATE, and JDATE Collapse Hide details

Example: DATE, ADATE, and JDATE

DATA LIST FIXED
 /VAR1 1-17 (DATE) VAR2 21-37 (ADATE) VAR3 41-47 (JDATE).
BEGIN DATA
28-10-90            10/28/90            90301
28.OCT.1990         X 28 1990           1990301
28 October, 2001    Oct.  28, 2001      2001301
END DATA.
LIST.

• Internally, all date format variables are stored as the number of seconds from 0 hours, 0 minutes, and 0 seconds of Oct. 14, 1582.

The LIST output from these commands is shown in the following figure.

Output illustrating DATE, ADATE, and JDATE formats
       VAR1             VAR2           VAR3

28-OCT-1990       10/28/1990        1990301
28-OCT-1990       10/28/1990        1990301
28-OCT-2001       10/28/2001        2001301
Example: QYR, MOYR, and WKYR Collapse Hide details

Example: QYR, MOYR, and WKYR

DATA LIST FIXED /VAR1 1-10 (QYR) VAR2 12-25 (MOYR) VAR3 28-37 (WKYR).
BEGIN DATA
4Q90       10/90           43WK90
4 Q 90     Oct-1990        43 WK 1990
4 Q 2001   October, 2001   43 WK 2001
END DATA.
LIST.

• Internally, the value of a QYR variable is stored as midnight of the first day of the first month of the specified quarter, the value of a MOYR variable is stored as midnight of the first day of the specified month, and the value of a WKYR format variable is stored as midnight of the first day of the specified week. Thus, 4Q90 and 10/90 are both equivalent to October 1, 1990, and 43WK90 is equivalent to October 22, 1990.

The LIST output from these commands is shown in the following figure.

Output illustrating QYR, MOYR, and WKYR formats
    VAR1       VAR2             VAR3

4 Q 1990   OCT 1990       43 WK 1990
4 Q 1990   OCT 1990       43 WK 1990
4 Q 2001   OCT 2001       43 WK 2001
Example: TIME Collapse Hide details

Example: TIME

DATA LIST FIXED
 /VAR1 1-11 (TIME,2) VAR2 13-21 (TIME) VAR3 23-28 (TIME).
BEGIN DATA
1:2:34.75   1:2:34.75 1:2:34
END DATA.
LIST.

• TIME reads and writes time of the day or a time interval.

• Internally, the TIME values are stored as the number of seconds from midnight of the day or of the time interval.

The LIST output from these commands is shown in the following figure.

Output illustrating TIME format
       VAR1      VAR2   VAR3

 1:02:34.75   1:02:34   1:02
Example: WKDAY and MONTH Collapse Hide details

Example: WKDAY and MONTH

DATA LIST FIXED
 /VAR1 1-9 (WKDAY) VAR2 10-18 (WKDAY)
  VAR3 20-29 (MONTH) VAR4 30-32 (MONTH) VAR5 35-37 (MONTH).
BEGIN DATA
Sunday   Sunday    January   1    Jan
Monday   Monday    February  2    Feb
Tues     Tues      March     3    Mar
Wed      Wed       April     4    Apr
Th       Th        Oct       10   Oct
Fr       Fr        Nov       11   Nov
Sa       Sa        Dec       12   Dec
END DATA.
FORMATS VAR2 VAR5 (F2).
LIST.

• WKDAY reads and writes the day of the week; MONTH reads and writes the month of the year.

• Values for WKDAY are entered as strings but stored as numbers. They can be used in arithmetic operations but not in string functions.

• Values for MONTH can be entered either as strings or as numbers but are stored as numbers. They can be used in arithmetic operations but not in string functions.

• To display the values as numbers, assign an F format to the variable, as was done for VAR2 and VAR5 in the above example.

The LIST output from these commands is shown in the following figure.

Output illustrating WKDAY and MONTH formats
     VAR1 VAR2       VAR3 VAR4 VAR5

SUNDAY      1  JANUARY     JAN   1
MONDAY      2  FEBRUARY    FEB   2
TUESDAY     3  MARCH       MAR   3
WEDNESDAY   4  APRIL       APR   4
THURSDAY    5  OCTOBER     OCT  10
FRIDAY      6  NOVEMBER    NOV  11
SATURDAY    7  DECEMBER    DEC  12
Example: DTIME and DATETIME Collapse Hide details

Example: DTIME and DATETIME

DATA LIST FIXED /VAR1 1-14 (DTIME) VAR2 18-42 (DATETIME).
BEGIN DATA
20 8:3           20-6-90 8:3
20:8:03:46       20/JUN/1990 8:03:46
20 08 03 46.75   20 June, 2001 08 03 46.75
END DATA.
LIST.

• DTIME and DATETIME read and write time intervals.

• The decimal point explicitly coded in the input data for fractional seconds.

• The DTIME format allows a – or + sign in the data value to indicate a time interval before or after a point in time.

• Internally, values for a DTIME variable are stored as the number of seconds of the time interval, while those for a DATETIME variable are stored as the number of seconds from 0 hours, 0 minutes, and 0 seconds of Oct. 14, 1582.

The LIST output from these commands is shown in the following figure.

Output illustrating DTIME and DATETIME formats
          VAR1                      VAR2

   20 08:03:00      20-JUN-1990 08:03:00
   20 08:03:46      20-JUN-1990 08:03:46
   20 08:03:46      20-JUN-2001 08:03:46

Related Topics

Variable Types and Formats
Input and Output Formats
String Variable Formats
A Format (Standard Characters)
AHEX Format (Hexadecimal Characters)
Numeric Variable Formats
F, N, and E Formats
COMMA, DOT, DOLLAR, and PCT Formats
Binary and Hexadecimal Formats
Date and Time Formats
FORTRAN-like Input Format Specifications


FORTRAN-like Input Format Specifications

You can use FORTRAN-like input format specifications to define formats for a set of variables, as in the following example:

DATA LIST FILE=HUBDATA RECORDS=3
      /MOHIRED, YRHIRED, DEPT1 TO DEPT4 (T12, 2F2.0, 4(1X,F1.0)).

• The specification T12 in parentheses tabs to the 12th column. The first variable (MOHIRED) will be read beginning from column 12.

• The specification 2F2.0 assigns the format F2.0 to two adjacent variables (MOHIRED and YRHIRED).

• The next four variables (DEPT1 to DEPT4) are each assigned the format F1.0. The 4 in 4(1X,F1.0) distributes the same format to four consecutive variables. 1X skips one column before each variable. (The column-skipping specification placed within the parentheses is distributed to each variable.)

Related Topics

Variable Types and Formats
Input and Output Formats
String Variable Formats
A Format (Standard Characters)
AHEX Format (Hexadecimal Characters)
Numeric Variable Formats
F, N, and E Formats
COMMA, DOT, DOLLAR, and PCT Formats
Binary and Hexadecimal Formats
Date and Time Formats
Input Data Specification


Transformation Expressions

Transformation expressions are used in commands such as COMPUTE, IF, DO IF, LOOP IF, and SELECT IF.

Release History

Release 13.0

• APPLYMODEL and STRAPPLYMODEL functions introduced.

• DATEDIFF and DATESUM functions introduced.

Release 14.0

• REPLACE function introduced.

• VALUELABEL function introduced.

Release 16.0

• CHAR.INDEX function introduced.

• CHAR.LENGTH function introduced.

• CHAR.LPAD function introduced.

• CHAR.MBLEN function introduced.

• CHAR.RINDEX function introduced.

• CHAR.RPAD function introduced.

• CHAR.SUBSTR function introduced.

• NORMALIZE function introduced.

• NTRIM function introduced.

• STRUNC function introduced.

• CUMHAZARD value introduced in APPLYMODEL and STRAPPLYMODEL functions.

Release 17.0

• mult and fuzzbits arguments introduced for the RND and TRUNC functions.

Related Topics

Numeric Expressions
String Expressions
Logical Expressions
Scoring Expressions (PASW Statistics Server)
Missing Values


Numeric Expressions

numeric expressions,numeric expressions,numeric expressions

Numeric expressions can be used with the COMPUTE and IF commands and as part of a logical expression for commands such as IF, DO IF, LOOP IF, and SELECT IF. Arithmetic expressions can also appear in the index portion of a LOOP command, on the REPEATING DATA command, and on the PRINT SPACES command.

Related Topics

Transformation Expressions
String Expressions
Logical Expressions
Scoring Expressions (PASW Statistics Server)
Missing Values
Arithmetic Operations
Numeric Constants
Complex Numeric Arguments
Domain Errors
Numeric Functions
Arithmetic Functions
Statistical Functions
Random Variable and Distribution Functions
String/Numeric Conversion Functions
Missing Values in Numeric Expressions


Arithmetic Operations

arithmetic operators,arithmetic operators,arithmetic operators
exponents,exponents,exponents

The following arithmetic operators are available:

+ | Addition
– | Subtraction
* | Multiplication
/ | Division
** | Exponentiation

• No two operators can appear consecutively.

• Arithmetic operators cannot be implied. For example, (VAR1)(VAR2) is not a legal specification; you must specify VAR1*VAR2.

• Arithmetic operators and parentheses serve as delimiters. To improve readability, blanks (not commas) can be inserted before and after an operator.

order of operations,order of operations,order of operations
numeric expressions,numeric expressions,numeric expressions

• To form complex expressions, you can use variables, constants, and functions with arithmetic operators.

• The order of execution is as follows: functions; exponentiation; multiplication, division, and unary –; and addition and subtraction.

• Operators at the same level are executed from left to right.

• To override the order of operation, use parentheses. Execution begins with the innermost set of parentheses and progresses out.

Related Topics

Numeric Expressions
Numeric Constants
Complex Numeric Arguments
Domain Errors
Numeric Functions
Arithmetic Functions
Statistical Functions
Random Variable and Distribution Functions
String/Numeric Conversion Functions
Missing Values in Numeric Expressions


Numeric Constants

constants,constants,constants

• Constants used in numeric expressions or as arguments to functions can be integer or noninteger, depending on the application or function.

• You can specify as many digits in a constant as needed as long as you understand the precision restrictions of your computer.

• Numeric constants can be signed (+ or –) but cannot contain any other special characters, such as the comma or dollar sign.

• Numeric constants can be expressed with scientific notation. Thus, the exponent for a constant in scientific notation is limited to two digits. The range of values allowed for exponents in scientific notation is from –99 to +99.

Related Topics

Numeric Expressions
Arithmetic Operations
Complex Numeric Arguments
Domain Errors
Numeric Functions
Arithmetic Functions
Statistical Functions
Random Variable and Distribution Functions
String/Numeric Conversion Functions
Missing Values in Numeric Expressions


Complex Numeric Arguments

arguments,arguments,arguments
complex,complex,complex

• Except where explicitly restricted, complex expressions can be formed by nesting functions and arithmetic operators as arguments to functions.

• The order of execution for complex numeric arguments is as follows: functions; exponentiation; multiplication, division, and unary –; and addition and subtraction.

• To control the order of execution in complex numeric arguments, use parentheses.

Related Topics

Numeric Expressions
Arithmetic Operations
Numeric Constants
Domain Errors
Numeric Functions
Arithmetic Functions
Statistical Functions
Random Variable and Distribution Functions
String/Numeric Conversion Functions
Missing Values in Numeric Expressions


Arithmetic Operations with Date and Time Variables

Most date and time variables are stored internally as the number of seconds from a particular date or as a time interval and therefore can be used in arithmetic operations. Many operations involving dates and time can be accomplished with the extensive collection of date and time functions.

• A date is a floating-point number representing the number of seconds from midnight, October 14, 1582. Dates, which represent a particular point in time, are stored as the number of seconds to that date. For example, October 28, 2007, is stored as 13,412,908,800.

• A date includes the time of day, which is the time interval past midnight. When time of day is not given, it is taken as 00:00 and the date is an even multiple of 86,400 (the number of seconds in a day).

• A time interval is a floating-point number representing the number of seconds in a time period, for example, an hour, minute, or day. For example, the value representing 5.5 days is 475,200; the value representing the time interval 14:08:17 is 50,897.

• QYR, MOYR, and WKYR variables are stored as midnight of the first day of the respective quarter, month, and week of the year. Therefore, 1 Q 90, 1/90, and 1 WK 90 are all equivalents of January 1, 1990, 0:0:00.

• WKDAY variables are stored as 1 to 7 and MONTH variables as 1 to 12.

You can perform virtually any arithmetic operation with both date format and time format variables. Of course, not all of these operations are particularly useful. You can calculate the number of days between two dates by subtracting one date from the other—but adding two dates does not produce a very meaningful result.

By default, any new numeric variables that you compute are displayed in F format. In the case of calculations involving time and date variables, this means that the default output is expressed as a number of seconds. Use the FORMATS (or PRINT FORMATS) command to specify an appropriate format for the computed variable.

Example

DATA LIST FREE /Date1 Date2 (2ADATE10).
BEGIN DATA
6/20/2006 10/28/2006
END DATA.
COMPUTE DateDiff1=(Date2-Date1)/60/60/24.
COMPUTE DateDiff2=DATEDIFF(Date2,Date1, "days").
COMPUTE FutureDate1=Date2+(10*60*60*24).
COMPUTE FutureDate2=DATESUM(Date2, 10, "days").
FORMATS FutureDate1 FutureDate2 (ADATE10).

• The first two COMPUTE commands both calculate the number of days between two dates. In the first one, Date2-Date1 yields the number of seconds between the two dates, which is then converted to the number of days by dividing by number of seconds in a minute, number of minutes in an hour, and number of hours in a day. In the second one, the DATEDIFF function is used to obtain the equivalent result, but instead of an arithmetic formula to produce a result expressed in days, it simply includes the argument "days".

• The second pair of COMPUTE commands both calculate a date 10 days from Date2. In the first one, 10 days needs to be converted to the number of seconds in ten days before it can be added to Date2. In the second one, the "days" argument in the DATESUM function handles that conversion.

• The FORMATS command is used to display the results of the second two COMPUTE commands as dates, since the default format is F, which would display the results as the number of seconds since October 14, 1582.

For more information on date and time functions, see Date and Time Functions.

Conditional Statements and Case Selection Based on Dates

To specify a date as a value in a conditional statement, use one of the data aggregation functions to express the date value. For example,

***this works***.
SELECT IF datevar >= date.mdy(3,1,2006).
***the following do not work***.
SELECT IF datevar >= 3/1/2006. /*this will select dates >= 0.0015.
SELECT IF datevar >= "3/1/2006" /*this will generate an error.

See the topic Aggregation Functions for more information.

Related Topics

Date and Time Functions
Aggregation Functions
Date and Time Conversion Functions
YRMODA Function
Extraction Functions
Date Differences
Date Increments


Domain Errors

domain errors,domain errors,domain errors
defined,defined,defined
domain errors,domain errors,domain errors
numeric expressions,numeric expressions,numeric expressions

Domain errors occur when numeric expressions are mathematically undefined or cannot be represented numerically on the computer for reasons other than missing data. Two common examples are division by 0 and the square root of a negative number. When there is a domain error, a warning is issued, and the system-missing value is assigned to the expression. For example, the command COMPUTE TESTVAR = TRUNC(SQRT(X/Y) * .5) returns system-missing if X/Y is negative or if Y is 0.

The following are domain errors in numeric expressions:

** | A negative number to a noninteger power.
/ | A divisor of 0.
MOD | A divisor of 0.
SQRT | A negative argument.
EXP | An argument that produces a result too large to be represented on the computer.
LG10 | A negative or 0 argument.
LN | A negative or 0 argument.
ARSIN | An argument whose absolute value exceeds 1.
NORMAL | A negative or 0 argument.
PROBIT | A negative or 0 argument, or an argument 1 or greater.

Related Topics

Numeric Expressions
Arithmetic Operations
Numeric Constants
Complex Numeric Arguments
Numeric Functions
Arithmetic Functions
Statistical Functions
Random Variable and Distribution Functions
String/Numeric Conversion Functions
Missing Values in Numeric Expressions


Numeric Functions

functions,functions,functions
numeric variables,numeric variables,numeric variables
arguments,arguments,arguments
defined,defined,defined

Numeric functions can be used in any numeric expression on IF, SELECT IF, DO IF, ELSE IF, LOOP IF, END LOOP IF, and COMPUTE commands. Numeric functions always return numbers (or the system-missing value whenever the result is indeterminate). The expression to be transformed by a function is called the argument. Most functions have a variable or a list of variables as arguments.

• In numeric functions with two or more arguments, each argument must be separated by a comma. Blanks alone cannot be used to separate variable names, expressions, or constants in transformation expressions.

• Arguments should be enclosed in parentheses, as in TRUNC(INCOME), where the TRUNC function returns the integer portion of the variable INCOME.

• Multiple arguments should be separated by commas, as in MEAN(Q1,Q2,Q3), where the MEAN function returns the mean of variables Q1, Q2, and Q3.

Example Collapse Hide details

Example

COMPUTE Square_Root = SQRT(var4).
COMPUTE Remainder = MOD(var4, 3).
COMPUTE Average = MEAN.3(var1, var2, var3, var4).
COMPUTE Trunc_Mean = TRUNC(MEAN(var1 TO var4)).

• SQRT(var4) returns the square root of the value of var4 for each case.

• MOD(var4, 3) returns the remainder (modulus) from dividing the value of var4 by 3.

• MEAN.3(var1, var2, var3, var4) returns the mean of the four specified variables, provided that at least three of them have nonmissing values. The divisor for the calculation of the mean is the number of nonmissing values.

• TRUNC(MEAN(var1 TO var4)) computes the mean of the values for the inclusive range of variables and then truncates the result. Since no minimum number of nonmissing values is specified for the function, a mean will be calculated (and truncated) as long as at least one of the variables has a nonmissing value for that case.

Related Topics

Numeric Expressions
Arithmetic Operations
Numeric Constants
Complex Numeric Arguments
Domain Errors
Arithmetic Functions
Statistical Functions
Random Variable and Distribution Functions
String/Numeric Conversion Functions
Missing Values in Numeric Expressions


Arithmetic Functions

functions,functions,functions
arithmetic,arithmetic,arithmetic
arithmetic functions,arithmetic functions,arithmetic functions

• All arithmetic functions except MOD, RND and TRUNC have single arguments; MOD has two while RND and TRUNC have from one to three. Multiple arguments must be separated by a comma.

• Arguments can be numeric expressions, as in RND(A**2/B).

square root function,square root function,square root function
arcsine function,arcsine function,arcsine function
gamma distribution function,gamma distribution function,gamma distribution function
arctangent function,arctangent function,arctangent function
ABS (function),ABS (function),ABS (function)
ARSIN (function),ARSIN (function),ARSIN (function)
ARTAN (function),ARTAN (function),ARTAN (function)
COS (function),COS (function),COS (function)
EXP (function),EXP (function),EXP (function)
LN (function),LN (function),LN (function)
LNGAMMA (function),LNGAMMA (function),LNGAMMA (function)
LG10 (function),LG10 (function),LG10 (function)
MOD (function),MOD (function),MOD (function)
RND (function),RND (function),RND (function)
SIN (function),SIN (function),SIN (function)
SQRT (function),SQRT (function),SQRT (function)
TRUNC (function),TRUNC (function),TRUNC (function)
MAX (numeric function),MAX (numeric function),MAX (numeric function)
MIN (numeric function),MIN (numeric function),MIN (numeric function)

ABS. ABS(numexpr). Numeric. Returns the absolute value of numexpr, which must be numeric.

RND. RND(numexpr[,mult,fuzzbits]). Numeric. With a single argument, returns the integer nearest to that argument. Numbers ending in .5 exactly are rounded away from 0. For example, RND(-4.5) rounds to -5. The optional second argument, mult, specifies that the result is an integer multiple of this value—for example, RND(-4.57,0.1) = -4.6. The value must be numeric but cannot be 0. The default is 1.

The optional third argument, fuzzbits, is the number of least-significant bits by which the internal representation of numexpr (expressed as a 64-bit floating point binary) may fall short of the threshold for rounding up (e.g., 0.5 when rounding to an integer) but still be rounded up. For example, the sum 9.62 - 5.82 - 9.21 + 6.91 has an internal representation of 1.499999999999998 (on an Intel processor). With fuzzbits set to 0 and mult set to 1, this expression will round to 1.0, although the exact sum is 1.50 which would round to 2.0. Allowing the rounding threshold to have a small fuzziness compensates for the minute differences between calculations with floating point numbers and exact results. In this case, adding a fuzziness of 4 bits is sufficient to produce the expected result of 2.0.

If the argument fuzzbits is omitted, the value specified by SET FUZZBITS is used. The installed setting of FUZZBITS is 6, which should be sufficient for most applications. Setting fuzzbits to 0 produces the same results as in release 10. Setting fuzzbits to 10 produces the same results as in releases 11 and 12.

To produce the same results as in release 13, use the following expression in place of the RND function:

TRUNC(numexpr,1,0) + ((.5+TRUNC(numexpr,1,0)-numexpr)<max(1e-13,min(.5,numexpr*1e-13)))

To produce the same results as in releases 14, 15, and 16 use:

RND(numexpr,1,12.5-ln(max(1e-50,abs(numexpr)))/ln(2))

TRUNC. TRUNC(numexpr[,mult,fuzzbits]). Numeric. Returns the value of numexpr truncated toward 0. The optional second argument, mult, specifies that the result is an integer multiple of this value—for example, TRUNC(4.579,0.1) = 4.5. The value must be numeric but cannot be 0. The default is 1.

The optional third argument, fuzzbits, is the number of least-significant bits by which the internal representation of numexpr (expressed as a 64-bit floating point binary) may fall short of the nearest rounding boundary and be rounded up before truncating. For example, the sum 9.62 - 5.82 - 9.21 + 6.91 has an internal representation of 1.499999999999998 (on an Intel processor). With fuzzbits set to 0 and mult set to 0.1, this expression will truncate to 1.4, although the exact sum is 1.50 which would truncate to 1.5. Adding a small fuzziness to the nearest rounding boundary (in this case, 1.5) compensates for the minute differences between calculations with floating point numbers and exact results. In this case, adding a fuzziness of 5 bits is sufficient to produce the expected result of 1.5.

If the argument fuzzbits is omitted, the value specified by SET FUZZBITS is used. The installed setting of FUZZBITS is 6, which should be sufficient for most applications. Setting fuzzbits to 0 produces the same results as in release 10. Setting fuzzbits to 10 produces the same results as in releases 11 and 12.

To produce the same results as in release 13 use:

TRUNC(numexpr,1,0)+(TRUNC(numexpr,1,0)+1-numexpr <= 1e-13)

To produce the same results as in releases 14, 15, and 16 use:

TRUNC(numexpr,1,12.5-ln(max(1e-50,abs(numexpr)))/ln(2))

MOD. MOD(numexpr,modulus). Numeric. Returns the remainder when numexpr is divided by modulus. Both arguments must be numeric, and modulus must not be 0.

SQRT. SQRT(numexpr). Numeric. Returns the positive square root of numexpr, which must be numeric and not negative.

EXP. EXP(numexpr). Numeric. Returns e raised to the power numexpr, where e is the base of the natural logarithms and numexpr is numeric. Large values of numexpr may produce results that exceed the capacity of the machine.

LG10. LG10(numexpr). Numeric. Returns the base-10 logarithm of numexpr, which must be numeric and greater than 0.

LN. LN(numexpr). Numeric. Returns the base-e logarithm of numexpr, which must be numeric and greater than 0.

LNGAMMA. LNGAMMA(numexpr). Numeric. Returns the logarithm of the complete Gamma function of numexpr, which must be numeric and greater than 0.

ARSIN. ARSIN(numexpr). Numeric. Returns the inverse sine (arcsine), in radians, of numexpr, which must evaluate to a numeric value between -1 and +1.

ARTAN. ARTAN(numexpr). Numeric. Returns the inverse tangent (arctangent), in radians, of numexpr, which must be numeric.

SIN. SIN(radians). Numeric. Returns the sine of radians, which must be a numeric value, measured in radians.

COS. COS(radians). Numeric. Returns the cosine of radians, which must be a numeric value, measured in radians.

Related Topics

Numeric Expressions
Arithmetic Operations
Numeric Constants
Complex Numeric Arguments
Domain Errors
Numeric Functions
Statistical Functions
Random Variable and Distribution Functions
String/Numeric Conversion Functions
Missing Values in Numeric Expressions


Statistical Functions

functions,functions,functions
statistical,statistical,statistical
standard deviation function,standard deviation function,standard deviation function
coefficient of variation (COV),coefficient of variation (COV),coefficient of variation (COV)
SUM (function),SUM (function),SUM (function)
MEAN (function),MEAN (function),MEAN (function)
SD (function),SD (function),SD (function)
VARIANCE (function),VARIANCE (function),VARIANCE (function)
CFVAR (function),CFVAR (function),CFVAR (function)
MIN (function),MIN (function),MIN (function)
MAX (function),MAX (function),MAX (function)
missing values,missing values,missing values
statistical functions,statistical functions,statistical functions
statistical functions,statistical functions,statistical functions
MEDIAN (function),MEDIAN (function),MEDIAN (function)

• Each argument to a statistical function (expression, variable name, or constant) must be separated by a comma.

• The .n suffix can be used with all statistical functions to specify the number of valid arguments. For example, MEAN.2(A,B,C,D) returns the mean of the valid values for variables A, B, C, and D only if at least two of the variables have valid values. The default for n is 2 for SD, VARIANCE, and CFVAR and 1 for other statistical functions. If the number specified exceeds the number of arguments in the function, the result is system-missing.

• The keyword TO can be used to refer to a set of variables in the argument list.

SUM. SUM(numexpr,numexpr[,..]). Numeric. Returns the sum of its arguments that have valid, nonmissing values. This function requires two or more arguments, which must be numeric. You can specify a minimum number of valid arguments for this function to be evaluated.

MEAN. MEAN(numexpr,numexpr[,..]). Numeric. Returns the arithmetic mean of its arguments that have valid, nonmissing values. This function requires two or more arguments, which must be numeric. You can specify a minimum number of valid arguments for this function to be evaluated.

MEDIAN. MEDIAN(numexpr,numexpr[,..]). Numeric. Returns the median (50th percentile) of its arguments that have valid, nonmissing values. This function requires two or more arguments, which must be numeric. You can specify a minimum number of valid arguments for this function to be evaluated.

SD. SD(numexpr,numexpr[,..]). Numeric. Returns the standard deviation of its arguments that have valid, nonmissing values. This function requires two or more arguments, which must be numeric. You can specify a minimum number of valid arguments for this function to be evaluated.

VARIANCE. VARIANCE(numexpr,numexpr[,..]). Numeric. Returns the variance of its arguments that have valid values. This function requires two or more arguments, which must be numeric. You can specify a minimum number of valid arguments for this function to be evaluated.

CFVAR. CFVAR(numexpr,numexpr[,...]). Numeric. Returns the coefficient of variation (the standard deviation divided by the mean) of its arguments that have valid values. This function requires two or more arguments, which must be numeric. You can specify a minimum number of valid arguments for this function to be evaluated.

MIN. MIN(value,value[,..]). Numeric or string. Returns the minimum value of its arguments that have valid, nonmissing values. This function requires two or more arguments. For numeric values, you can specify a minimum number of valid arguments for this function to be evaluated.

MAX. MAX(value,value[,..]). Numeric or string. Returns the maximum value of its arguments that have valid values. This function requires two or more arguments. For numeric values, you can specify a minimum number of valid arguments for this function to be evaluated.

Example Collapse Hide details

Example

COMPUTE maxsum=MAX.2(SUM(var1 TO var3), SUM(var4 TO var6)).

• MAX.2 will return the maximum of the two sums provided that both sums are nonmissing.

• The .2 refers to the number of nonmissing arguments for the MAX function, which has only two arguments because each SUM function is considered a single argument.

• The new variable maxsum will be nonmissing if at least one variable specified for each SUM function is nonmissing.

Related Topics

Numeric Expressions
Arithmetic Operations
Numeric Constants
Complex Numeric Arguments
Domain Errors
Numeric Functions
Arithmetic Functions
Random Variable and Distribution Functions
String/Numeric Conversion Functions
Missing Values in Numeric Expressions


Random Variable and Distribution Functions

Random variable and distribution function keywords are all of the form prefix.suffix, where the prefix specifies the function to be applied to the distribution and the suffix specifies the distribution.

functions,functions,functions
distribution,distribution,distribution
random variable,random variable,random variable
distribution functions,distribution functions,distribution functions
cumulative distribution functions,cumulative distribution functions,cumulative distribution functions
inverse distribution functions,inverse distribution functions,inverse distribution functions
probability density functions,probability density functions,probability density functions
random number functions,random number functions,random number functions
noncentral cumulative distribution functions,noncentral cumulative distribution functions,noncentral cumulative distribution functions
noncentral probability density functions,noncentral probability density functions,noncentral probability density functions
tail probability functions,tail probability functions,tail probability functions
CDF functions,CDF functions,CDF functions
PDF functions,PDF functions,PDF functions
IDF functions,IDF functions,IDF functions
NCDF functions,NCDF functions,NCDF functions
NPDF functions,NPDF functions,NPDF functions
RV functions,RV functions,RV functions

• Random variable and distribution functions take both constants and variables for arguments.

• A function argument, if required, must come first and is denoted by x (quantile, which must fall in the range of values for the distribution) for cumulative distribution and probability density functions and p (probability) for inverse distribution functions.

• All random variable and distribution functions must specify distribution parameters as noted in their definitions.

• All arguments are real numbers.

• Restrictions to distribution parameters apply to all functions for that distribution. Restrictions for the function parameter x apply to that particular distribution function. The program issues a warning and returns system-missing when it encounters an out-of-range value for an argument.

The following are possible prefixes:

CDF | Cumulative distribution function. A cumulative distribution function CDF.d_spec(x,a,...) returns a probability p that a variate with the specified distribution (d_spec) falls below x for continuous functions and at or below x for discrete functions.
IDF | Inverse distribution function. Inverse distribution functions are not available for discrete distributions. An inverse distribution function IDF.d_spec(p,a,...) returns a value x such that CDF.d_spec(x,a,...)=p with the specified distribution (d_spec).
PDF | Probability density function. A probability density function PDF.d_spec(x,a,...) returns the density of the specified distribution (d_spec) at x for continuous functions and the probability that a random variable with the specified distribution equals x for discrete functions.
RV | Random number generation function. A random number generation function RV.d_spec(a,...) generates an independent observation with the specified distribution (d_spec).
NCDF | Noncentral cumulative distribution function. A noncentral distribution function NCDF.d_spec(x,a,b,...) returns a probability p that a variate with the specified noncentral distribution falls below x. It is available only for beta, chi-square, F, and Student’s t.
NPDF | Noncentral probability density function. A noncentral probability density function NCDF.d_spec(x,a,...) returns the density of the specified distribution (d_spec) at x. It is available only for beta, chi-square, F, and Student’s t.
SIG | Tail probability function. A tail probability function SIG.d_spec(x,a,...) returns a probability p that a variate with the specified distribution (d_spec) is larger than x. The tail probability function is equal to 1 minus the cumulative distribution function.

The following are suffixes for continuous distributions:

distribution functions,distribution functions,distribution functions
beta,beta,beta
beta distribution function,beta distribution function,beta distribution function
bivariate normal distribution function,bivariate normal distribution function,bivariate normal distribution function
distribution functions,distribution functions,distribution functions
bivariate normal,bivariate normal,bivariate normal
Cauchy distribution function,Cauchy distribution function,Cauchy distribution function
distribution functions,distribution functions,distribution functions
Cauchy,Cauchy,Cauchy
distribution functions,distribution functions,distribution functions
chi-square,chi-square,chi-square
chi-square distribution function,chi-square distribution function,chi-square distribution function
distribution functions,distribution functions,distribution functions
exponential,exponential,exponential
exponential distribution function,exponential distribution function,exponential distribution function
distribution functions,distribution functions,distribution functions
F,F,F
F distribution function,F distribution function,F distribution function
distribution functions,distribution functions,distribution functions
gamma,gamma,gamma
gamma distribution function,gamma distribution function,gamma distribution function
distribution functions,distribution functions,distribution functions
half-normal,half-normal,half-normal
half-normal distribution function,half-normal distribution function,half-normal distribution function
distribution functions,distribution functions,distribution functions
inverse Gaussian,inverse Gaussian,inverse Gaussian
inverse Gaussian distribution function,inverse Gaussian distribution function,inverse Gaussian distribution function
distribution functions,distribution functions,distribution functions
Laplace,Laplace,Laplace
Laplace distribution function,Laplace distribution function,Laplace distribution function
distribution functions,distribution functions,distribution functions
logistic,logistic,logistic
logistic distribution function,logistic distribution function,logistic distribution function
distribution functions,distribution functions,distribution functions
lognormal,lognormal,lognormal
lognormal distribution function,lognormal distribution function,lognormal distribution function
distribution functions,distribution functions,distribution functions
normal,normal,normal
normal distribution function,normal distribution function,normal distribution function
distribution functions,distribution functions,distribution functions
Pareto,Pareto,Pareto
Pareto distribution function,Pareto distribution function,Pareto distribution function
distribution functions,distribution functions,distribution functions
Studentized maximum modulus,Studentized maximum modulus,Studentized maximum modulus
Studentized maximum modulus distribution function,Studentized maximum modulus distribution function,Studentized maximum modulus distribution function
distribution functions,distribution functions,distribution functions
Studentized range,Studentized range,Studentized range
Studentized range distribution function,Studentized range distribution function,Studentized range distribution function
distribution functions,distribution functions,distribution functions
t,t,t
t distribution function,t distribution function,t distribution function
distribution functions,distribution functions,distribution functions
uniform,uniform,uniform
uniform distribution function,uniform distribution function,uniform distribution function
distribution functions,distribution functions,distribution functions
Weibull,Weibull,Weibull
Weibull distribution function,Weibull distribution function,Weibull distribution function
BETA | Beta distribution. The beta distribution takes values in the range 0<x<1 and has two shape parameters, α and β. Both α and β must be positive, and they have the property that the mean of the distribution is α/(α+β).

Common uses. The beta distribution is used in Bayesian analyses as a conjugate to the binomial distribution.

Functions. The CDF, IDF, PDF, NCDF, NPDF, and RV functions are available.

The beta distribution has PDF, CDF, and IDF

f(x;α,β)=1 B (α,β)xα−1(1−x)β−1

F(x;α,β)= IB (x;α,β)

F−1(p;α,β)= IB −1(p;α,β)

where B (a,b)=∫10xa−1(1−x)b−1dx is the beta function and IB (x;a,b)=∫x01 B (a,b)ta−1(1dt is the incomplete beta function.

Relationship to other distributions.

• When α=β=1, the beta(α,β) distribution is equivalent to the uniform(0,1) distribution.

• The beta(α,β) distribution is the distribution of X/(X+Y) where X and Y are variables that have chi-square distributions with degrees of freedom parameters 2α and 2β, respectively.
Noncentral beta distribution. The noncentral beta distribution is a generalization of the beta distribution that takes values in the range 0<x<1 and has an extra noncentrality parameter, λ, which must be greater than or equal to 0.

Functions.

The noncentral beta distribution has PDF, CDF, and IDF

f(x;α,β,λ)=∞Σj=01j!(λ2)j e−λ/2 xα+j−1(1−x)β−1 B (α+j;β)

F(x;α,β,λ)=∞Σj=01j!(λ2)j e−λ/2 IB (x;α=j,β)

where B (a,b)=∫10xa−1(1−x)b−1dx is the beta function and IB (x;a,b)=∫x01 B (a,b)ta−1(1dt is the incomplete beta function.

Relationship to other distributions.

• When λ equals 0, this distribution reduces to the beta distribution.

• The noncentral beta(α,β,λ) distribution is the distribution of X/(X+Y) where X is a variable that has a noncentral chi-square(2α,λ) distribution, and Y is a variable that has a central chi-square(2β) distribution.
BVNOR | Bivariate normal distribution. The bivariate normal distribution takes real values and has one correlation parameter, ρ, which must be between –1 and 1, inclusive.

Functions. The CDF and PDF functions are available and require two quantiles, x1 and x2.

The bivariate normal distribution has PDF

f(x1,x2;ρ)=12π(1−ρ2)1/2exp(−12(1−ρ2)(x21−2ρx1x2+x22))

The CDF does not have a closed form and is computed by approximation.See the topic Bivariate Normal (Distribution and Special Functions algorithms) for more information.

Relationship to other distributions.

• Two variables with a bivariate normal(ρ) distribution with correlation ρ have marginal normal distributions with a mean of 0 and a standard deviation of 1.
CAUCHY | Cauchy distribution. The Cauchy distribution takes real values and has a location parameter, θ, and a scale parameter, ς; ς must be positive. The Cauchy distribution is symmetric about the location parameter, but has such slowly decaying tails that the distribution does not have a computable mean.

Functions. The CDF, IDF, PDF, and RV functions are available.

The Cauchy distribution has PDF, CDF, and IDF

f(x;θ,ς)=1πς(1+(x−θς)2)−1

F(x;θ,ς)=12+1πtan−1(x−θς)

F−1(p;θ,ς)=θ+ςtan(π(p−1/2))

Relationship to other distributions.

• A "standardized" Cauchy variate, (x−θ)/ς, has a t distribution with 1 degree of freedom.
CHISQ | Chi-square distribution. The chi-square(ν) distribution takes values in the range x>=0 and has one degrees of freedom parameter, ν; it must be positive and has the property that the mean of the distribution is ν.

Functions. The CDF, IDF, PDF, RV, NCDF, NPDF, and SIG functions are available.

The chi-square distribution has PDF, CDF, and IDF

f(x;ν)=12ν/2Γ(ν/2)x(ν/2)−1e−x/2

F(x;ν)= IG (x2;ν2)

F−1(p;ν)=2IG−1(p;ν2)

where Γ(a)=∫∞0xa−1e−xdx is the gamma function and IG (x;a)=∫x01Γ(a)ta−1e−tdt is the incomplete gamma function.

Relationship to other distributions.

• The chi-square(ν) distribution is the distribution of the sum of squares of ν independent normal(0,1) random variates.

• The chi-square(ν) distribution is equivalent to the gamma(ν/2, 1/2) distribution.
Noncentral chi-square distribution. The noncentral chi-square distribution is a generalization of the chi-square distribution that takes values in the range x>=0 and has an extra noncentrality parameter, λ, which must be greater than or equal to 0.

Functions.

The noncentral chi-square distribution has PDF and CDF

f(x;ν,λ)=∞Σj=01j!(λ2)j e−λ/2 xν/2+j−1e−x/22ν/2+jΓ(ν/2+j)

F(x;ν,λ)=∞Σj=01j!(λ2)j e−λ/2 IG (x2;ν2+j)

where Γ(a)=∫∞0xa−1e−xdx is the gamma function and IG (x;a)=∫x01Γ(a)ta−1e−tdt is the incomplete gamma function.

Relationship to other distributions.

• When λ equals 0, this distribution reduces to the chi-square distribution.

• The noncentral chi-square(ν,λ) distribution is the distribution of the sum of squares of ν independent normal(μi,1) random variates. Then λ=Σμ2i.

EXP | Exponential distribution. The exponential distribution takes values in the range x>=0 and has one scale parameter, β, which must be greater than 0 and has the property that the mean of the distribution is 1/β.

Common uses. In life testing, the scale parameter a represents the rate of decay.

Functions. The CDF, IDF, PDF, and RV functions are available.

The exponential distribution has PDF, CDF, and IDF

f(x;β)=βe−βx

F(x;β)=1−e−βx

F−1(p;β)=−1βln(1−p)

Relationship to other distributions.

• The exponential(β) distribution is equivalent to the gamma(1,β) distribution.
F | F distribution. The F distribution takes values in the range x>=0 and has two degrees of freedom parameters, ν1 and ν2, which are the "numerator" and "denominator" degrees of freedom, respectively. Both ν1 and ν2 must be positive.

Common uses. The F distribution is commonly used to test hypotheses under the Gaussian assumption.

Functions. The CDF, IDF, IDF, RV, NCDF, NPDF, and SIG functions are available.

The F distribution has PDF, CDF, and IDF

f(x;ν1,ν2)=1 B (ν1/2,ν2/2)(ν1ν2)ν1/2x(ν1/2)−1(1+ν1ν2x)−(ν1+ν2)/2

F(x;ν1,ν2)= IB (ν1xν2+ν1x;ν12,ν22)

F−1(p;ν1,ν2)=ν2ν1(IB−1(p;ν1/2,ν2/2)1−IB−1(p;ν1/2,ν2/2))

where B (a,b)=∫10xa−1(1−x)b−1dx is the beta function and IB (x;a,b)=∫x01 B (a,b)ta−1(1dt is the incomplete beta function.

Relationship to other distributions.

• The F(ν1,ν2) distribution is the distribution of (X/ν1)/(Y/ν2), where X and Y are independent chi-square random variates with ν1 and ν2 degrees of freedom, respectively.
Noncentral F distribution. The noncentral F distribution is a generalization of the F distribution that takes values in the range x>=0 and has an extra noncentrality parameter, λ, which must be greater than or equal to 0.

Functions.

The noncentral F distribution has PDF and CDF

f(x;ν1,b,λ)=∞Σj=01j!(λ2)j e−λ/2 (ν1/b)ν1/2+j B (ν1 /2+ j , b /2 ) xν1/2+j−1(1+ν1bx)−((ν1+b)/2+j)

F(x;ν1,b,λ)=∞Σj=01j!(λ2)j e−λ/2 IB (ν1xb+ν1x;ν12+j,b2)

where B (a,b)=∫10xa−1(1−x)b−1dx is the beta function and IB (x;a,b)=∫x01 B (a,b)ta−1(1dt is the incomplete beta function.

Relationship to other distributions.

• When λ equals 0, this distribution reduces to the F distribution.

• The noncentral F distribution is the distribution of (X/ν1)/(Y/ν2), where X and Y are independent variates with noncentral chi-square(ν1, λ) and central chi-square(ν2) distributions, respectively.
GAMMA | Gamma distribution. The gamma distribution takes values in the range x>=0 and has one shape parameter, α, and one scale parameter, β. Both parameters must be positive and have the property that the mean of the distribution is α/β.

Common uses. The gamma distribution is commonly used in queuing theory, inventory control, and precipitation processes.

Functions. The CDF, IDF, PDF, and RV functions are available.

The gamma distribution has PDF, CDF, and IDF

f(x;α,β)=βαΓ(α)xα−1e−βx

F(x;α,β)= IG (βx; α)

F−1(p;α,β)=1β IG −1(p; α)

where Γ(a)=∫∞0xa−1e−xdx is the gamma function and IG (x;a)=∫x01Γ(a)ta−1e−tdt is the incomplete gamma function.

Relationship to other distributions.

• When α=1, the gamma(α,β) distribution reduces to the exponential(β) distribution.

• When β=1/2, the gamma(α,β) distribution reduces to the chi-square(2α) distribution.

• When α is an integer, the gamma distribution is also known as the Erlang distribution.
HALFNRM | Half-normal distribution. The half-normal distribution takes values in the range x>=μ and has one location parameter, μ, and one scale parameter, σ. Parameter σ must be positive.

Functions. The CDF, IDF, PDF, and RV functions are available.

The half-normal distribution has PDF, CDF, and IDF

f(x;μ,σ)=φ(x−μσ)/σ

F(x;μ,σ)=2Φ(x−μσ)−1

F−1(p;μ,σ)=μ+σΦ−1(1+p2)

Relationship to other distributions.

• If X has a normal(μ,σ) distribution, then |X−μ| has a half-normal(μ,σ) distribution.
IGAUSS | Inverse Gaussian distribution. The inverse Gaussian, or Wald, distribution takes values in the range x>0 and has two parameters, μ and λ, both of which must be positive. The distribution has mean μ.

Common uses. The inverse Gaussian distribution is commonly used to test hypotheses for model parameter estimates.

Functions. The CDF, IDF, PDF, and RV functions are available.

The inverse Gaussian distribution has PDF and CDF

f(x;μ,λ)=(λ2πx3)1/2 exp (−λ(x−μ)22μ2x)

F(x;μ,λ)=Φ(
√ λx
(−1+xμ))+e(2λ/μ)Φ(−
√ λx
(1+xμ))

The IDF is computed by approximation. See the topic Inverse Gaussian (Distribution and Special Functions algorithms) for more information.

LAPLACE | Laplace or double exponential distribution. The Laplace distribution takes real values and has one location parameter, μ, and one scale parameter, β. Parameter β must be positive. The distribution is symmetric about μ and has exponentially decaying tails.

Functions. The CDF, IDF, PDF, and RV functions are available.

The Laplace distribution has PDF, CDF, and IDF

f(x;μ,β)=12b e−|x−μ|/β

F(x;μ,β)={
12e(x−μ)/β | x≤μ
1−12e(μ−x)/β | x>μ

F−1(p;μ,β)={
μ+βln(2p) | 0≤p≤12
μ−βln(2(1−p)) | 12<p≤1

LOGISTIC | Logistic distribution. The logistic distribution takes real values and has one location parameter, μ, and one scale parameter, ς. Parameter ς must be positive. The distribution is symmetric about μ and has longer tails than the normal distribution.

Common uses. The logistic distribution is used to model growth curves.

Functions. The CDF, IDF, PDF, and RV functions are available.

The logistic distribution has PDF, CDF, and IDF

f(x;μ,ς)=1ςe−(x−μ)/ς(1+e−(x−μ)/ς)−2

F(x;μ,ς)=11+e−(x−μ)/ς

F−1(p;μ,ς)=μ+ςln(p1−p)

LNORMAL | Lognormal distribution. The lognormal distribution takes values in the range x>=0 and has two parameters, η and σ, both of which must be positive.

Common uses. Lognormal is used in the distribution of particle sizes in aggregates, flood flows, concentrations of air contaminants, and failure time.

Functions. The CDF, IDF, PDF, and RV functions are available.

The lognormal distribution has PDF, CDF, and IDF

f(x;η,σ)=1xσ
√ 2π
e−(ln(x/η))2/(2σ2)

F(x;η,σ)=Φ(1σln(xη))

F−1(p;η,σ)=ηeσΦ−1(p)

Relationship to other distributions.

• If X has a lognormal(η,σ) distribution, then ln(X) has a normal(ln(η),σ) distribution.
NORMAL | Normal distribution. The normal, or Gaussian, distribution takes real values and has one location parameter, μ, and one scale parameter, σ. Parameter σ must be positive. The distribution has mean μ and standard deviation σ.

Functions. The CDF, IDF, PDF, and RV functions are available.

The normal distribution has PDF, CDF, and IDF

f(x;μ,σ)=1σ
√ 2π
e−(x−μ)2/(2σ2)

F(x;μ,σ)=Φ(x−μσ)

F−1(p;μ,σ)=μ+σΦ−1(p)

Relationship to other distributions.

• If X has a normal(μ,σ) distribution, then exp(X) has a normal(exp(μ),σ) distribution.
Three functions in releases earlier than 6.0 are special cases of the normal distribution functions: CDFNORM(arg)=CDF.NORMAL(x,0,1), where arg is x; PROBIT(arg)=IDF.NORMAL(p,0,1), where arg is p; and NORMAL(arg)=RV.NORMAL(0,σ), where arg is σ.
PARETO | Pareto distribution. The Pareto distribution takes values in the range xmin<x and has a threshold parameter, xmin, and a shape parameter, α. Both parameters must be positive.

Common uses. Pareto is commonly used in economics as a model for a density function with a slowly decaying tail.

Functions. The CDF, IDF, PDF, and RV functions are available.

The Pareto distribution has PDF, CDF, and IDF

f(x;x min ,α)=αx min (x min x)α+1

F(x;x min ,α)=1−(x min x)α

F−1(p;x min ,α)=x min (1−p)−1/α

SMOD | Studentized maximum modulus distribution. The Studentized maximum modulus distribution takes values in the range x>0 and has a number of comparisons parameter, k*, and degrees of freedom parameter, ν, both of which must be greater than or equal to 1.

Common uses. The Studentized maximum modulus is commonly used in post hoc multiple comparisons for GLM and ANOVA.

Functions. The CDF and IDF functions are available, and are computed by approximation. See the topic Studentized Maximum Modulus (Distribution and Special Functions algorithms) for more information.

SRANGE | Studentized range distribution. The Studentized range distribution takes values in the range x>0 and has a number of samples parameter, k, and degrees of freedom parameter, ν, both of which must be greater than or equal to 1.

Common uses. The Studentized range is commonly used in post hoc multiple comparisons for GLM and ANOVA.

Functions. The CDF and IDF functions are available, and are computed by approximation. See the topic Studentized Range (Distribution and Special Functions algorithms) for more information.

T | Student t distribution. The Student t distribution takes real values and has one degrees of freedom parameter, ν, which must be positive. The Student t distribution is symmetric about 0.

Common uses. The major uses of the Student t distribution are to test hypotheses and construct confidence intervals for means of data.

Functions. The CDF, IDF, PDF, RV, NCDF, and NPDF functions are available.

The t distribution has PDF, CDF, and IDF

f(x;ν)=1
√ ν
B ( ν/2,1/2 )(1+x2ν)−(ν+1)/2

F(x;ν)={
12 IB (νν + x2; ν2, 12) | x ≤ 0
1- 1 2 IB (νν + x2; ν2, 12) | x>0

F−1(p;ν)={
−
√ ν(1/( IB −1(2p; ν2, 12))−1)
0≤p≤12
√ ν(1/( IB −1(2(1−p); ν2, 12))−1)
12<p≤1

where B (a,b)=∫10xa−1(1−x)b−1dx is the beta function and IB (x;a,b)=∫x01 B (a,b)ta−1(1dt is the incomplete beta function.

Relationship to other distributions.

• The t(ν) distribution is the distribution of X/Y, where X is a normal(0,1) variate and Y is a chi-square(ν) variate divided by ν.

• The square of a t(ν) variate has an F(1,ν) distribution.

• The t(ν) distribution approaches the normal(0,1) distribution as ν approaches infinity.

Noncentral t distribution. The noncentral t distribution is a generalization of the t distribution that takes real values and has an extra noncentrality parameter, λ, which must be greater than or equal to 0. When λ equals 0, this distribution reduces to the t distribution.

Functions.

The noncentral t distribution has PDF and CDF

f(x;ν,λ)=∞Σj=01j!(λ
√ 2
)j e−λ2/2 Γ((ν+j+1)/2)Γ(ν/2)Γ(1/2) xjν(j+1)/2 (1+x2ν)−(ν+j+1)/2

F(x;ν,λ)={
12∞Σj=01j!(−λ
√ 2
)j e−λ2/2 Γ((j+1)/2)Γ(1/2) IB (νν+x2; ν2, j+12) 		x≤0
1−12∞Σj=01j!(λ
√ 2
)j e−λ2/2 Γ((j+1)/2)Γ(1/2) IB (νν+x2;a2,j+12) 		x>0

where B (a,b)=∫10xa−1(1−x)b−1dx is the beta function and IB (x;a,b)=∫x01 B (a,b)ta−1(1dt is the incomplete beta function.

Relationship to other distributions.

• The noncentral t(ν,λ) distribution is the distribution of X/Y, where X is a normal(λ,1) variate and Y is a central chi-square(ν) variate divided by ν.

UNIFORM | Uniform distribution. The uniform distribution takes values in the range a<x<b and has a minimum value parameter, a, and a maximum value parameter, b.

Functions. The CDF, IDF, PDF, and RV functions are available.

The uniform distribution has PDF, CDF, and IDF

f(x;a,b)=1b−a

F(x;a,b)=x−ab−a

F−1(p;a,b)=a+(b−a)p

The uniform random number function in releases earlier than 6.0 is a special case: UNIFORM(arg)=RV.UNIFORM(0,b), where arg is parameter b. Among other uses, the uniform distribution commonly models the round-off error.
WEIBULL | Weibull distribution. The Weibull distribution takes values in the range x>=0 and has one scale parameter, β, and one shape parameter, α, both of which must be positive.

Common uses. The Weibull distribution is commonly used in survival analysis.

Functions. The CDF, IDF, PDF, and RV functions are available.

The Weibull distribution has PDF, CDF, and IDF

f(x;β,α)=αβ(xβ)α−1e−(x/β)α

F(x;β,α)=1−e−(x/β)α

F−1(p;β,α)=β(−ln(1−p))1/α

Relationship to other distributions.

• A Weibull(β,1) distribution is equivalent to an exponential(β) distribution.

The following are suffixes for discrete distributions:

distribution functions,distribution functions,distribution functions
Bernoulli,Bernoulli,Bernoulli
Bernoulli distribution function,Bernoulli distribution function,Bernoulli distribution function
distribution functions,distribution functions,distribution functions
binomial,binomial,binomial
binomial distribution function,binomial distribution function,binomial distribution function
distribution functions,distribution functions,distribution functions
geometric,geometric,geometric
geometric distribution function,geometric distribution function,geometric distribution function
distribution functions,distribution functions,distribution functions
hypergeometric,hypergeometric,hypergeometric
hypergeometric distribution function,hypergeometric distribution function,hypergeometric distribution function
distribution functions,distribution functions,distribution functions
negative binomial,negative binomial,negative binomial
negative binomial distribution function,negative binomial distribution function,negative binomial distribution function
distribution functions,distribution functions,distribution functions
Poisson,Poisson,Poisson
Poisson distribution function,Poisson distribution function,Poisson distribution function
BERNOULLI | Bernoulli distribution. The Bernoulli distribution takes values 0 or 1 and has one success probability parameter, θ, which must be between 0 and 1, inclusive.

Functions. The CDF, PDF, and RV functions are available.

The Bernoulli distribution has PDF and CDF

f(x;θ)=θx(1−θ)1−x

F(x;θ)={
1−θ | x=0
1 | x=1

Relationship to other distributions.

• The Bernoulli distribution is a special case of the binomial distribution and is used in simple success-failure experiments.
BINOM | Binomial distribution. The binomial distribution takes integer values 0<=x<=n, representing the number of successes in n trials, and has one number of trials parameter, n, and one success probability parameter, θ. Parameter n must be a positive integer and parameter θ must be between 0 and 1, inclusive.

Common uses. The binomial distribution is used in independently replicated success-failure experiments.

Functions. The CDF, PDF, and RV functions are available.

The binomial distribution has PDF and CDF

f(x;n,θ)=(
n
x
)θx(1−θ)n−x

F(x;n,θ)={
1− IB (θ;x+1,n−x) | x=0,1,...,n−1
1 | x=n

where IB (x;a,b)=∫x01 B (a,b)ta−1(1dt is the incomplete beta function.
GEOM | Geometric distribution. The geometric distribution takes integer values x>=1, representing the number of trials needed (including the last trial) before a success is observed, and has one success probability parameter, θ, which must be between 0 and 1, inclusive.

Functions. The CDF, PDF, and RV functions are available.

The geometric distribution has PDF and CDF

f(x;θ)=θ(1−θ)x−1

F(x;θ)=1−(1−θ)x

Relationship to other distributions.

• The geometric(θ) distribution is equivalent to the negative binomial (1,θ) distribution.
HYPER | Hypergeometric distribution. The hypergeometric distribution takes integer values in the range max(0, Np+n−N)<=x<=min(Np,n), and has three parameters, N, n, and Np, where N is the total number of objects in an urn model, n is the number of objects randomly drawn without replacement from the urn, Np is the number of objects with a given characteristic, and x is the number of objects with the given characteristic observed out of the withdrawn objects. All three parameters are positive integers, and both n and Np must be less than or equal to N.

Functions. The CDF, PDF, and RV functions are available.

The hypergeometric distribution has PDF and CDF

f(x;N,n,Np)=(
Np
x
)(
N−Np
n−x
)(
N
n
)

F(x;N,n,Np)=xΣk=max(0,n+Np−N) Prob (X = k)

NEGBIN | Negative binomial distribution. The negative binomial distribution takes integer values in the range x>=r, where x is the number of trials needed (including the last trial) before r successes are observed, and has one threshold parameter, r, and one success probability parameter, θ. Parameter r must be a positive integer and parameter θ must be greater than 0 and less than or equal to 1.

Functions. The CDF, PDF, and RV functions are available.

The negative binomial distribution has PDF and CDF

f(x;r,θ)=(
x−1
r−1
) θr(1−θ)x−r

F(x;r,θ)= IB (θ;r,x−r+1)

where IB (x;a,b)=∫x01 B (a,b)ta−1(1dt is the incomplete beta function.

Relationship to other distributions.

• The negative binomial(1,θ) distribution is equivalent to the geometric(θ) distribution.
POISSON | Poisson distribution. The Poisson distribution takes integer values in the range x>=0 and has one rate or mean parameter, λ. Parameter λ must be positive.

Common uses. The Poisson distribution is used in modeling the distribution of counts, such as traffic counts and insect counts.

Functions. The CDF, PDF, and RV functions are available.

The Poisson distribution has PDF and CDF

f(x;λ)=λxx! e−λ

F(x;λ)=1− IG (λ ; x + 1)

where IG (x;a)=∫x01Γ(a)ta−1e−tdt is the incomplete gamma function.

Related Topics

Numeric Expressions
Arithmetic Operations
Numeric Constants
Complex Numeric Arguments
Domain Errors
Numeric Functions
Arithmetic Functions
Statistical Functions
String/Numeric Conversion Functions
Missing Values in Numeric Expressions
Probability Density Functions
Tail Probability Functions
Cumulative Distribution Functions
Inverse Distribution Functions
Random Variable Functions


Probability Density Functions

probability density functions,probability density functions,probability density functions
functions,functions,functions
probability density,probability density,probability density
distribution functions,distribution functions,distribution functions
probability density,probability density,probability density
PDF.BERNOULLI (function),PDF.BERNOULLI (function),PDF.BERNOULLI (function)
PDF.BETA (function),PDF.BETA (function),PDF.BETA (function)
PDF.BINOM (function),PDF.BINOM (function),PDF.BINOM (function)
PDF.BVNOR (function),PDF.BVNOR (function),PDF.BVNOR (function)
PDF.CAUCHY (function),PDF.CAUCHY (function),PDF.CAUCHY (function)
PDF.CHISQ (function),PDF.CHISQ (function),PDF.CHISQ (function)
PDF.EXP (function),PDF.EXP (function),PDF.EXP (function)
PDF.F (function),PDF.F (function),PDF.F (function)
PDF.GAMMA (function),PDF.GAMMA (function),PDF.GAMMA (function)
PDF.GEOM (function),PDF.GEOM (function),PDF.GEOM (function)
PDF.HALFNRM (function),PDF.HALFNRM (function),PDF.HALFNRM (function)
PDF.HYPER (function),PDF.HYPER (function),PDF.HYPER (function)
PDF.IGAUSS (function),PDF.IGAUSS (function),PDF.IGAUSS (function)
PDF.LAPLACE (function),PDF.LAPLACE (function),PDF.LAPLACE (function)
PDF.LOGISTIC (function),PDF.LOGISTIC (function),PDF.LOGISTIC (function)
PDF.LNORMAL (function),PDF.LNORMAL (function),PDF.LNORMAL (function)
PDF.NEGBIN (function),PDF.NEGBIN (function),PDF.NEGBIN (function)
PDF.NORMAL (function),PDF.NORMAL (function),PDF.NORMAL (function)
PDF.PARETO (function),PDF.PARETO (function),PDF.PARETO (function)
PDF.POISSON (function),PDF.POISSON (function),PDF.POISSON (function)
PDF.T (function),PDF.T (function),PDF.T (function)
PDF.UNIFORM (function),PDF.UNIFORM (function),PDF.UNIFORM (function)
PDF.WEIBULL (function),PDF.WEIBULL (function),PDF.WEIBULL (function)
NPDF.BETA (function),NPDF.BETA (function),NPDF.BETA (function)
NPDF.CHISQ (function),NPDF.CHISQ (function),NPDF.CHISQ (function)
NPDF.F (function),NPDF.F (function),NPDF.F (function)
NPDF.T (function),NPDF.T (function),NPDF.T (function)

The following functions give the value of the density function with the specified distribution at the value quant, the first argument. Subsequent arguments are the parameters of the distribution. Note the period in each function name.

PDF.BERNOULLI. PDF.BERNOULLI(quant, prob). Numeric. Returns the probability that a value from the Bernoulli distribution, with the given probability parameter, will be equal to quant.

PDF.BETA. PDF.BETA(quant, shape1, shape2). Numeric. Returns the probability density of the beta distribution, with the given shape parameters, at quant.

PDF.BINOM. PDF.BINOM(quant, n, prob). Numeric. Returns the probability that the number of successes in n trials, with probability prob of success in each, will be equal to quant. When n is 1, this is the same as PDF.BERNOULLI.

PDF.BVNOR. PDF.BVNOR(quant1, quant2, corr). Numeric. Returns the probability density of the standard bivariate normal distribution, with the given correlation parameter, at quant1, quant2.

PDF.CAUCHY. PDF.CAUCHY(quant, loc, scale). Numeric. Returns the probability density of the Cauchy distribution, with the given location and scale parameters, at quant.

PDF.CHISQ. PDF.CHISQ(quant, df). Numeric. Returns the probability density of the chi-square distribution, with df degrees of freedom, at quant.

PDF.EXP. PDF.EXP(quant, shape). Numeric. Returns the probability density of the exponential distribution, with the given shape parameter, at quant.

PDF.F. PDF.F(quant, df1, df2). Numeric. Returns the probability density of the F distribution, with degrees of freedom df1 and df2, at quant.

PDF.GAMMA. PDF.GAMMA(quant, shape, scale). Numeric. Returns the probability density of the gamma distribution, with the given shape and scale parameters, at quant.

PDF.GEOM. PDF.GEOM(quant, prob). Numeric. Returns the probability that the number of trials to obtain a success, when the probability of success is given by prob, will be equal to quant.

PDF.HALFNRM. PDF.HALFNRM(quant, mean, stddev). Numeric. Returns the probability density of the half normal distribution, with specified mean and standard deviation, at quant.

PDF.HYPER. PDF.HYPER(quant, total, sample, hits). Numeric. Returns the probability that the number of objects with a specified characteristic, when sample objects are randomly selected from a universe of size total in which hits have the specified characteristic, will be equal to quant.

PDF.IGAUSS. PDF.IGAUSS(quant, loc, scale). Numeric. Returns the probability density of the inverse Gaussian distribution, with the given location and scale parameters, at quant.

PDF.LAPLACE. PDF.LAPLACE(quant, mean, scale). Numeric. Returns the probability density of the Laplace distribution, with the specified mean and scale parameters, at quant.

PDF.LOGISTIC. PDF.LOGISTIC(quant, mean, scale). Numeric. Returns the probability density of the logistic distribution, with the specified mean and scale parameters, at quant.

PDF.LNORMAL. PDF.LNORMAL(quant, a, b). Numeric. Returns the probability density of the log-normal distribution, with the specified parameters, at quant.

PDF.NEGBIN. PDF.NEGBIN(quant, thresh, prob). Numeric. Returns the probability that the number of trials to obtain a success, when the threshold parameter is thresh and the probability of success is given by prob, will be equal to quant.

PDF.NORMAL. PDF.NORMAL(quant, mean, stddev). Numeric. Returns the probability density of the normal distribution, with specified mean and standard deviation, at quant.

PDF.PARETO. PDF.PARETO(quant, threshold, shape). Numeric. Returns the probability density of the Pareto distribution, with the specified threshold and shape parameters, at quant.

PDF.POISSON. PDF.POISSON(quant, mean). Numeric. Returns the probability that a value from the Poisson distribution, with the specified mean or rate parameter, will be equal to quant.

PDF.T. PDF.T(quant, df). Numeric. Returns the probability density of Student's t distribution, with the specified degrees of freedom df, at quant.

PDF.UNIFORM. PDF.UNIFORM(quant, min, max). Numeric. Returns the probability density of the uniform distribution, with the specified minimum and maximum, at quant.

PDF.WEIBULL. PDF.WEIBULL(quant, a, b). Numeric. Returns the probability density of the Weibull distribution, with the specified parameters, at quant.

NPDF.BETA. NPDF.BETA(quant, shape1, shape2, nc). Numeric. Returns the probability density of the noncentral beta distribution, with the given shape and noncentrality parameters, at quant.

NPDF.CHISQ. NPDF.CHISQ(quant, df, nc). Numeric. Returns the probability density of the noncentral chi-square distribution, with df degrees of freedom and the specified noncentrality parameter, at quant.

NPDF.F. NPDF.F(quant, df1, df2, nc). Numeric. Returns the probability density of the noncentral F distribution, with degrees of freedom df1 and df2 and noncentrality nc, at quant.

NPDF.T. NPDF.T(quant, df, nc). Numeric. Returns the probability density of the noncentral Student's t distribution, with the specified degrees of freedom df and noncentrality nc, at quant.

Related Topics

Random Variable and Distribution Functions
Tail Probability Functions
Cumulative Distribution Functions
Inverse Distribution Functions
Random Variable Functions


Tail Probability Functions

tail probability functions,tail probability functions,tail probability functions
functions,functions,functions
tail probability,tail probability,tail probability
distribution functions,distribution functions,distribution functions
tail probability,tail probability,tail probability
SIG.CHISQ (function),SIG.CHISQ (function),SIG.CHISQ (function)
SIG.F (function),SIG.F (function),SIG.F (function)

The following functions give the probability that a random variable with the specified distribution will be greater than quant, the first argument. Subsequent arguments are the parameters of the distribution. Note the period in each function name.

SIG.CHISQ. SIG.CHISQ(quant, df). Numeric. Returns the cumulative probability that a value from the chi-square distribution, with df degrees of freedom, will be greater than quant

SIG.F. These significance values should not be used to test hypotheses about the F values in this table. Cluster analysis specifically attempts to maximize between-group variance, and the significance values reported here do not reflect this.

Related Topics

Random Variable and Distribution Functions
Probability Density Functions
Cumulative Distribution Functions
Inverse Distribution Functions
Random Variable Functions


Cumulative Distribution Functions

cumulative distribution functions,cumulative distribution functions,cumulative distribution functions
functions,functions,functions
cumulative distribution,cumulative distribution,cumulative distribution
distribution functions,distribution functions,distribution functions
cumulative,cumulative,cumulative
CDF.BERNOULLI (function),CDF.BERNOULLI (function),CDF.BERNOULLI (function)
CDF.BETA (function),CDF.BETA (function),CDF.BETA (function)
CDF.BINOM (function),CDF.BINOM (function),CDF.BINOM (function)
CDF.BVNOR (function),CDF.BVNOR (function),CDF.BVNOR (function)
CDF.CAUCHY (function),CDF.CAUCHY (function),CDF.CAUCHY (function)
CDF.CHISQ (function),CDF.CHISQ (function),CDF.CHISQ (function)
CDF.EXP (function),CDF.EXP (function),CDF.EXP (function)
CDF.F (function),CDF.F (function),CDF.F (function)
CDF.GAMMA (function),CDF.GAMMA (function),CDF.GAMMA (function)
CDF.GEOM (function),CDF.GEOM (function),CDF.GEOM (function)
CDF.HALFNRM (function),CDF.HALFNRM (function),CDF.HALFNRM (function)
CDF.HYPER (function),CDF.HYPER (function),CDF.HYPER (function)
CDF.IGAUSS (function),CDF.IGAUSS (function),CDF.IGAUSS (function)
CDF.LAPLACE (function),CDF.LAPLACE (function),CDF.LAPLACE (function)
CDF.LOGISTIC (function),CDF.LOGISTIC (function),CDF.LOGISTIC (function)
CDF.LNORMAL (function),CDF.LNORMAL (function),CDF.LNORMAL (function)
CDF.NEGBIN (function),CDF.NEGBIN (function),CDF.NEGBIN (function)
CDFNORM (function),CDFNORM (function),CDFNORM (function)
CDF.NORMAL (function),CDF.NORMAL (function),CDF.NORMAL (function)
CDF.PARETO (function),CDF.PARETO (function),CDF.PARETO (function)
CDF.POISSON (function),CDF.POISSON (function),CDF.POISSON (function)
CDF.SMOD (function),CDF.SMOD (function),CDF.SMOD (function)
CDF.SRANGE (function),CDF.SRANGE (function),CDF.SRANGE (function)
CDF.T (function),CDF.T (function),CDF.T (function)
CDF.UNIFORM (function),CDF.UNIFORM (function),CDF.UNIFORM (function)
CDF.WEIBULL (function),CDF.WEIBULL (function),CDF.WEIBULL (function)
NCDF.BETA (function),NCDF.BETA (function),NCDF.BETA (function)
NCDF.CHISQ (function),NCDF.CHISQ (function),NCDF.CHISQ (function)
NCDF.F (function),NCDF.F (function),NCDF.F (function)
NCDF.T (function),NCDF.T (function),NCDF.T (function)

The following functions give the probability that a random variable with the specified distribution will be less than quant, the first argument. Subsequent arguments are the parameters of the distribution. Note the period in each function name.

CDF.BERNOULLI. CDF.BERNOULLI(quant, prob). Numeric. Returns the cumulative probability that a value from the Bernoulli distribution, with the given probability parameter, will be less than or equal to quant.

CDF.BETA. CDF.BETA(quant, shape1, shape2). Numeric. Returns the cumulative probability that a value from the Beta distribution, with the given shape parameters, will be less than quant.

CDF.BINOM. CDF.BINOM(quant, n, prob). Numeric. Returns the cumulative probability that the number of successes in n trials, with probability prob of success in each, will be less than or equal to quant. When n is 1, this is the same as CDF.BERNOULLI.

CDF.BVNOR. CDF.BVNOR(quant1, quant2, corr). Numeric. Returns the cumulative probability that a value from the standard bivariate normal distribution, with the given correlation parameter, will be less than quant1 and quant2.

CDF.CAUCHY. CDF.CAUCHY(quant, loc, scale). Numeric. Returns the cumulative probability that a value from the Cauchy distribution, with the given location and scale parameters, will be less than quant.

CDF.CHISQ. CDF.CHISQ(quant, df). Numeric. Returns the cumulative probability that a value from the chi-square distribution, with df degrees of freedom, will be less than quant.

CDF.EXP. CDF.EXP(quant, scale). Numeric. Returns the cumulative probability that a value from the exponential distribution, with the given scale parameter, will be less than quant.

CDF.F. CDF.F(quant, df1, df2). Numeric. Returns the cumulative probability that a value from the F distribution, with degrees of freedom df1 and df2, will be less than quant.

CDF.GAMMA. CDF.GAMMA(quant, shape, scale). Numeric. Returns the cumulative probability that a value from the Gamma distribution, with the given shape and scale parameters, will be less than quant.

CDF.GEOM. CDF.GEOM(quant, prob). Numeric. Returns the cumulative probability that the number of trials to obtain a success, when the probability of success is given by prob, will be less than or equal to quant.

CDF.HALFNRM. CDF.HALFNRM(quant, mean, stddev). Numeric. Returns the cumulative probability that a value from the half normal distribution, with specified mean and standard deviation, will be less than quant.

CDF.HYPER. CDF.HYPER(quant, total, sample, hits). Numeric. Returns the cumulative probability that the number of objects with a specified characteristic, when sample objects are randomly selected from a universe of size total in which hits have the specified characteristic, will be less than or equal to quant.

CDF.IGAUSS. CDF.IGAUSS(quant, loc, scale). Numeric. Returns the cumulative probability that a value from the inverse Gaussian distribution, with the given location and scale parameters, will be less than quant.

CDF.LAPLACE. CDF.LAPLACE(quant, mean, scale). Numeric. Returns the cumulative probability that a value from the Laplace distribution, with the specified mean and scale parameters, will be less than quant.

CDF.LOGISTIC. CDF.LOGISTIC(quant, mean, scale). Numeric. Returns the cumulative probability that a value from the logistic distribution, with the specified mean and scale parameters, will be less than quant.

CDF.LNORMAL. CDF.LNORMAL(quant, a, b). Numeric. Returns the cumulative probability that a value from the log-normal distribution, with the specified parameters, will be less than quant.

CDF.NEGBIN. CDF.NEGBIN(quant, thresh, prob). Numeric. Returns the cumulative probability that the number of trials to obtain a success, when the threshold parameter is thresh and the probability of success is given by prob, will be less than or equal to quant.

CDFNORM. CDFNORM(zvalue). Numeric. Returns the probability that a random variable with mean 0 and standard deviation 1 would be less than zvalue, which must be numeric.

CDF.NORMAL. CDF.NORMAL(quant, mean, stddev). Numeric. Returns the cumulative probability that a value from the normal distribution, with specified mean and standard deviation, will be less than quant.

CDF.PARETO. CDF.PARETO(quant, threshold, shape). Numeric. Returns the cumulative probability that a value from the Pareto distribution, with the specified threshold and shape parameters, will be less than quant.

CDF.POISSON. CDF.POISSON(quant, mean). Numeric. Returns the cumulative probability that a value from the Poisson distribution, with the specified mean or rate parameter, will be less than or equal to quant.

CDF.SMOD. CDF.SMOD(quant, a, b). Numeric. Returns the cumulative probability that a value from the Studentized maximum modulus, with the specified parameters, will be less than quant.

CDF.SRANGE. CDF.SRANGE(quant, a, b). Numeric. Returns the cumulative probability that a value from the Studentized range statistic, with the specified parameters, will be less than quant.

CDF.T. CDF.T(quant, df). Numeric. Returns the cumulative probability that a value from Student's t distribution, with the specified degrees of freedom df, will be less than quant.

CDF.UNIFORM. CDF.UNIFORM(quant, min, max). Numeric. Returns the cumulative probability that a value from the uniform distribution, with the specified minimum and maximum, will be less than quant.

CDF.WEIBULL. CDF.WEIBULL(quant, a, b). Numeric. Returns the cumulative probability that a value from the Weibull distribution, with the specified parameters, will be less than quant.

NCDF.BETA. NCDF.BETA(quant, shape1, shape2, nc). Numeric. Returns the cumulative probability that a value from the noncentral Beta distribution, with the given shape and noncentrality parameters, will be less than quant.

NCDF.CHISQ. NCDF.CHISQ(quant, df, nc). Numeric. Returns the cumulative probability that a value from the noncentral chi-square distribution, with df degrees of freedom and the specified noncentrality parameter, will be less than quant.

NCDF.F. NCDF.F(quant, df1, df2, nc). Numeric. Returns the cumulative probability that a value from the noncentral F distribution, with degrees of freedom df1 and df2, and noncentrality nc, will be less than quant.

NCDF.T. NCDF.T(quant, df, nc). Numeric. Returns the cumulative probability that a value from the noncentral Student's t distribution, with the specified degrees of freedom df and noncentrality nc, will be less than quant.

Related Topics

Random Variable and Distribution Functions
Probability Density Functions
Tail Probability Functions
Inverse Distribution Functions
Random Variable Functions


Inverse Distribution Functions

inverse distribution functions,inverse distribution functions,inverse distribution functions
functions,functions,functions
inverse distribution,inverse distribution,inverse distribution
distribution functions,distribution functions,distribution functions
inverse,inverse,inverse
IDF.BETA (function),IDF.BETA (function),IDF.BETA (function)
IDF.CAUCHY (function),IDF.CAUCHY (function),IDF.CAUCHY (function)
IDF.CHISQ (function),IDF.CHISQ (function),IDF.CHISQ (function)
IDF.EXP (function),IDF.EXP (function),IDF.EXP (function)
IDF.F (function),IDF.F (function),IDF.F (function)
IDF.GAMMA (function),IDF.GAMMA (function),IDF.GAMMA (function)
IDF.HALFNRM (function),IDF.HALFNRM (function),IDF.HALFNRM (function)
IDF.IGAUSS (function),IDF.IGAUSS (function),IDF.IGAUSS (function)
IDF.LAPLACE (function),IDF.LAPLACE (function),IDF.LAPLACE (function)
IDF.LOGISTIC (function),IDF.LOGISTIC (function),IDF.LOGISTIC (function)
IDF.LNORMAL (function),IDF.LNORMAL (function),IDF.LNORMAL (function)
IDF.NORMAL (function),IDF.NORMAL (function),IDF.NORMAL (function)
IDF.PARETO (function),IDF.PARETO (function),IDF.PARETO (function)
IDF.SMOD (function),IDF.SMOD (function),IDF.SMOD (function)
IDF.SRANGE (function),IDF.SRANGE (function),IDF.SRANGE (function)
IDF.T (function),IDF.T (function),IDF.T (function)
IDF.UNIFORM (function),IDF.UNIFORM (function),IDF.UNIFORM (function)
IDF.WEIBULL (function),IDF.WEIBULL (function),IDF.WEIBULL (function)
PROBIT (function),PROBIT (function),PROBIT (function)

The following functions give the value in a specified distribution having a cumulative probability equal to prob, the first argument. Subsequent arguments are the parameters of the distribution. Note the period in each function name.

IDF.BETA. IDF.BETA(prob, shape1, shape2). Numeric. Returns the value from the Beta distribution, with the given shape parameters, for which the cumulative probability is prob.

IDF.CAUCHY. IDF.CAUCHY(prob, loc, scale). Numeric. Returns the value from the Cauchy distribution, with the given location and scale parameters, for which the cumulative probability is prob.

IDF.CHISQ. IDF.CHISQ(prob, df). Numeric. Returns the value from the chi-square distribution, with the specified degrees of freedom df, for which the cumulative probability is prob. For example, the chi-square value that is significant at the 0.05 level with 3 degrees of freedom is IDF.CHISQ(0.95,3).

IDF.EXP. IDF.EXP(p, scale). Numeric. Returns the value of an exponentially decaying variable, with rate of decay scale, for which the cumulative probability is p.

IDF.F. IDF.F(prob, df1, df2). Numeric. Returns the value from the F distribution, with the specified degrees of freedom, for which the cumulative probability is prob. For example, the F value that is significant at the 0.05 level with 3 and 100 degrees of freedom is IDF.F(0.95,3,100).

IDF.GAMMA. IDF.GAMMA(prob, shape, scale). Numeric. Returns the value from the Gamma distribution, with the specified shape and scale parameters, for which the cumulative probability is prob.

IDF.HALFNRM. IDF.HALFNRM(prob, mean, stddev). Numeric. Returns the value from the half normal distribution, with the specified mean and standard deviation, for which the cumulative probability is prob.

IDF.IGAUSS. IDF.IGAUSS(prob, loc, scale). Numeric. Returns the value from the inverse Gaussian distribution, with the given location and scale parameters, for which the cumulative probability is prob.

IDF.LAPLACE. IDF.LAPLACE(prob, mean, scale). Numeric. Returns the value from the Laplace distribution, with the specified mean and scale parameters, for which the cumulative probability is prob.

IDF.LOGISTIC. IDF.LOGISTIC(prob, mean, scale). Numeric. Returns the value from the logistic distribution, with specified mean and scale parameters, for which the cumulative probability is prob.

IDF.LNORMAL. IDF.LNORMAL(prob, a, b). Numeric. Returns the value from the log-normal distribution, with specified parameters, for which the cumulative probability is prob.

IDF.NORMAL. IDF.NORMAL(prob, mean, stddev). Numeric. Returns the value from the normal distribution, with specified mean and standard deviation, for which the cumulative probability is prob.

IDF.PARETO. IDF.PARETO(prob, threshold, shape). Numeric. Returns the value from the Pareto distribution, with specified threshold and scale parameters, for which the cumulative probability is prob.

IDF.SMOD. IDF.SMOD(prob, a, b). Numeric. Returns the value from the Studentized maximum modulus, with the specified parameters, for which the cumulative probability is prob.

IDF.SRANGE. IDF.SRANGE(prob, a, b). Numeric. Returns the value from the Studentized range statistic, with the specified parameters, for which the cumulative probability is prob.

IDF.T. IDF.T(prob, df). Numeric. Returns the value from Student's t distribution, with specified degrees of freedom df, for which the cumulative probability is prob.

IDF.UNIFORM. IDF.UNIFORM(prob, min, max). Numeric. Returns the value from the uniform distribution between min and max for which the cumulative probability is prob.

IDF.WEIBULL. IDF.WEIBULL(prob, a, b). Numeric. Returns the value from the Weibull distribution, with specified parameters, for which the cumulative probability is prob.

PROBIT. PROBIT(prob). Numeric. Returns the value in a standard normal distribution having a cumulative probability equal to prob. The argument prob is a probability greater than 0 and less than 1.

Related Topics

Random Variable and Distribution Functions
Probability Density Functions
Tail Probability Functions
Cumulative Distribution Functions
Random Variable Functions


Random Variable Functions

random variable functions,random variable functions,random variable functions
functions,functions,functions
random variable,random variable,random variable
distribution functions,distribution functions,distribution functions
random variable,random variable,random variable
NORMAL (function),NORMAL (function),NORMAL (function)
RV.BERNOULLI (function),RV.BERNOULLI (function),RV.BERNOULLI (function)
RV.BETA (function),RV.BETA (function),RV.BETA (function)
RV.BINOM (function),RV.BINOM (function),RV.BINOM (function)
RV.CAUCHY (function),RV.CAUCHY (function),RV.CAUCHY (function)
RV.CHISQ (function),RV.CHISQ (function),RV.CHISQ (function)
RV.EXP (function),RV.EXP (function),RV.EXP (function)
RV.F (function),RV.F (function),RV.F (function)
RV.GAMMA (function),RV.GAMMA (function),RV.GAMMA (function)
RV.GEOM (function),RV.GEOM (function),RV.GEOM (function)
RV.HALFNRM (function),RV.HALFNRM (function),RV.HALFNRM (function)
RV.HYPER (function),RV.HYPER (function),RV.HYPER (function)
RV.IGAUSS (function),RV.IGAUSS (function),RV.IGAUSS (function)
RV.LAPLACE (function),RV.LAPLACE (function),RV.LAPLACE (function)
RV.LOGISTIC (function),RV.LOGISTIC (function),RV.LOGISTIC (function)
RV.LNORMAL (function),RV.LNORMAL (function),RV.LNORMAL (function)
RV.NEGBIN (function),RV.NEGBIN (function),RV.NEGBIN (function)
RV.NORMAL (function),RV.NORMAL (function),RV.NORMAL (function)
RV.PARETO (function),RV.PARETO (function),RV.PARETO (function)
RV.POISSON (function),RV.POISSON (function),RV.POISSON (function)
RV.T (function),RV.T (function),RV.T (function)
RV.UNIFORM (function),RV.UNIFORM (function),RV.UNIFORM (function)
WEIBULL (function),WEIBULL (function),WEIBULL (function)
UNIFORM (function),UNIFORM (function),UNIFORM (function)

The following functions give a random variate from a specified distribution. The arguments are the parameters of the distribution. You can repeat the sequence of pseudorandom numbers by setting a seed in the Preferences dialog box before each sequence. Note the period in each function name.

NORMAL. NORMAL(stddev). Numeric. Returns a normally distributed pseudorandom number from a distribution with mean 0 and standard deviation stddev, which must be a positive number. You can repeat the sequence of pseudorandom numbers by setting a seed in the Random Number Seed dialog box before each sequence.

RV.BERNOULLI. RV.BERNOULLI(prob). Numeric. Returns a random value from a Bernoulli distribution with the specified probability parameter prob.

RV.BETA. RV.BETA(shape1, shape2). Numeric. Returns a random value from a Beta distribution with specified shape parameters.

RV.BINOM. RV.BINOM(n, prob). Numeric. Returns a random value from a binomial distribution with specified number of trials and probability parameter.

RV.CAUCHY. RV.CAUCHY(loc, scale). Numeric. Returns a random value from a Cauchy distribution with specified location and scale parameters.

RV.CHISQ. RV.CHISQ(df). Numeric. Returns a random value from a chi-square distribution with specified degrees of freedom df.

RV.EXP. RV.EXP(scale). Numeric. Returns a random value from an exponential distribution with specified scale parameter.

RV.F. RV.F(df1, df2). Numeric. Returns a random value from an F distribution with specified degrees of freedom, df1 and df2.

RV.GAMMA. RV.GAMMA(shape, scale). Numeric. Returns a random value from a Gamma distribution with specified shape and scale parameters.

RV.GEOM. RV.GEOM(prob). Numeric. Returns a random value from a geometric distribution with specified probability parameter.

RV.HALFNRM. RV.HALFNRM(mean, stddev). Numeric. Returns a random value from a half normal distribution with the specified mean and standard deviation.

RV.HYPER. RV.HYPER(total, sample, hits). Numeric. Returns a random value from a hypergeometric distribution with specified parameters.

RV.IGAUSS. RV.IGAUSS(loc, scale). Numeric. Returns a random value from an inverse Gaussian distribution with the specified location and scale parameters.

RV.LAPLACE. RV.LAPLACE(mean, scale). Numeric. Returns a random value from a Laplace distribution with specified mean and scale parameters.

RV.LOGISTIC. RV.LOGISTIC(mean, scale). Numeric. Returns a random value from a logistic distribution with specified mean and scale parameters.

RV.LNORMAL. RV.LNORMAL(a, b). Numeric. Returns a random value from a log-normal distribution with specified parameters.

RV.NEGBIN. RV.NEGBIN(threshold, prob). Numeric. Returns a random value from a negative binomial distribution with specified threshold and probability parameters.

RV.NORMAL. RV.NORMAL(mean, stddev). Numeric. Returns a random value from a normal distribution with specified mean and standard deviation.

RV.PARETO. RV.PARETO(threshold, shape). Numeric. Returns a random value from a Pareto distribution with specified threshold and shape parameters.

RV.POISSON. RV.POISSON(mean). Numeric. Returns a random value from a Poisson distribution with specified mean/rate parameter.

RV.T. RV.T(df). Numeric. Returns a random value from a Student's t distribution with specified degrees of freedom df.

RV.UNIFORM. RV.UNIFORM(min, max). Numeric. Returns a random value from a uniform distribution with specified minimum and maximum. See also the UNIFORM function.

WEIBULL. RV.WEIBULL(a, b). Numeric. Returns a random value from a Weibull distribution with specified parameters.

UNIFORM. UNIFORM(max). Numeric. Returns a uniformly distributed pseudorandom number between 0 and the argument max, which must be numeric (but can be negative). You can repeat the sequence of pseudorandom numbers by setting the same Random Number Seed (available in the Transform menu) before each sequence.

Related Topics

Random Variable and Distribution Functions
Probability Density Functions
Tail Probability Functions
Cumulative Distribution Functions
Inverse Distribution Functions


Date and Time Functions

date and time functions,date and time functions,date and time functions

Date and time functions provide aggregation, conversion, and extraction routines for dates and time intervals. Each function transforms an expression consisting of one or more arguments. Arguments can be complex expressions, variable names, or constants. Date and time expressions and variables are legitimate arguments.

Related Topics

Arithmetic Operations with Date and Time Variables
Aggregation Functions
Date and Time Conversion Functions
YRMODA Function
Extraction Functions
Date Differences
Date Increments


Aggregation Functions

DATE.DMY (function),DATE.DMY (function),DATE.DMY (function)
DATE.MDY (function),DATE.MDY (function),DATE.MDY (function)
DATE.YRDAY (function),DATE.YRDAY (function),DATE.YRDAY (function)
DATE.QYR (function),DATE.QYR (function),DATE.QYR (function)
DATE.MOYR (function),DATE.MOYR (function),DATE.MOYR (function)
DATE.WKYR (function),DATE.WKYR (function),DATE.WKYR (function)
TIME.HMS (function),TIME.HMS (function),TIME.HMS (function)
TIME.DAYS (function),TIME.DAYS (function),TIME.DAYS (function)
date and time functions,date and time functions,date and time functions
aggregation functions,aggregation functions,aggregation functions
functions,functions,functions
date and time,date and time,date and time

Aggregation functions generate date and time intervals from values that were not read by date and time input formats.

• All aggregation functions begin with DATE or TIME, depending on whether a date or a time interval is requested. This is followed by a subfunction that corresponds to the type of values found in the data.

• The subfunctions are separated from the function by a period (.) and are followed by an argument list specified in parentheses.

• The arguments to the DATE and TIME functions must be separated by commas and must resolve to integer values.

• Functions that contain a day argument--for example, DATE.DMY(d,m,y)--check the validity of the argument. The value for day must be an integer between 1 and 31. If an invalid value is encountered, a warning is displayed and the value is set to system-missing. However, if the day value is invalid for a particular month—for example, 31 in September, April, June, and November or 29 through 31 for February in nonleap years—the resulting date is placed in the next month. For example DATE.DMY(31, 9, 2006) returns the date value for October 1, 2006.

DATE.DMY. DATE.DMY(day,month,year). Numeric. Returns a date value corresponding to the indicated day, month, and year. The arguments must resolve to integers, with day between 1 and 31, month between 1 and 13, and year a four-digit integer greater than 1582. To display the result as a date, assign a date format to the result variable.

DATE.MDY. DATE.MDY(month,day,year). Numeric. Returns a date value corresponding to the indicated month, day, and year. The arguments must resolve to integers, with day between 1 and 31, month between 1 and 13, and year a four-digit integer greater than 1582. To display the result as a date, assign a date format to the result variable.

DATE.MOYR. DATE.MOYR(month,year). Numeric. Returns a date value corresponding to the indicated month and year. The arguments must resolve to integers, with month between 1 and 13, and year a four-digit integer greater than 1582. To display the result as a date, assign a date format to the result variable.

DATE.QYR. DATE.QYR(quarter,year). Numeric. Returns a date value corresponding to the indicated quarter and year. The arguments must resolve to integers, with quarter between 1 and 4, and year a four-digit integer greater than 1582. To display the result as a date, assign a date format to the result variable.

DATE.WKYR. DATE.WKYR(weeknum,year). Numeric. Returns a date value corresponding to the indicated weeknum and year. The arguments must resolve to integers, with weeknum between 1 and 52, and year a four-digit integer greater than 1582. To display the result as a date, assign a date format to the result variable.

DATE.YRDAY. DATE.YRDAY(year,daynum). Numeric. Returns a date value corresponding to the indicated year and daynum. The arguments must resolve to integers, with daynum between 1 and 366 and with year being a four-digit integer greater than 1582. To display the result as a date, assign a date format to the result variable.

TIME.DAYS. TIME.DAYS(days). Numeric. Returns a time interval corresponding to the indicated number of days. The argument must be numeric. To display the result as a time, assign a time format to the result variable.

TIME.HMS. TIME.HMS(hours[,minutes,seconds]). Numeric. Returns a time interval corresponding to the indicated number of hours, minutes, and seconds. The minutes and seconds arguments are optional. Minutes and seconds must resolve to numbers less than 60 if any higher-order argument is non-zero. All arguments except the last non-zero argument must resolve to integers. For example TIME.HMS(25.5) and TIME.HMS(0,90,25.5) are valid, while TIME.HMS(25.5,30) and TIME.HMS(25,90) are invalid. All arguments must resolve to either all positive or all negative values. To display the result as a time, assign a time format to the result variable.

Example

DATA LIST FREE
  /Year Month Day Hour Minute Second Days.
BEGIN DATA
2006 10 28 23 54 30 1.5
END DATA.
COMPUTE Date1=DATE.DMY(Day, Month, Year).
COMPUTE Date2=DATE.MDY(Month, Day, Year).
COMPUTE MonthYear=DATE.MOYR(Month, Year).
COMPUTE Time=TIME.HMS(Hour, Minute, Second).
COMPUTE Duration=TIME.DAYS(Days).
LIST VARIABLES=Date1 to Duration.
FORMATS
  Date1 (DATE11) Date2 (ADATE10) MonthYear (MOYR8)
  Time (TIME8) Duration (Time8).
LIST VARIABLES=Date1 to Duration.

***LIST Results Before Applying Formats***
       Date1        Date2    MonthYear     Time Duration
 13381372800  13381372800  13379040000    86070   129600

***LIST Results After Applying Formats***
      Date1      Date2 MonthYear     Time Duration
28-OCT-2006 10/28/2006  OCT 2006 23:54:30 36:00:00

• Since dates and times are stored internally as a number of seconds, prior to applying the appropriate date or time formats, all the computed values are displayed as numbers that indicate the respective number of seconds.

• The internal values for Date1 and Date2 are exactly the same. The only difference between DATE.DMY and DATE.MDY is the order of the arguments.

Related Topics

Arithmetic Operations with Date and Time Variables
Date and Time Functions
Date and Time Conversion Functions
YRMODA Function
Extraction Functions
Date Differences
Date Increments


Date and Time Conversion Functions

CTIME.DAYS (function),CTIME.DAYS (function),CTIME.DAYS (function)
CTIME.HOURS (function),CTIME.HOURS (function),CTIME.HOURS (function)
CTIME.MINUTES (function),CTIME.MINUTES (function),CTIME.MINUTES (function)
date and time functions,date and time functions,date and time functions
conversion functions,conversion functions,conversion functions
functions,functions,functions
date and time,date and time,date and time

The conversion functions convert time intervals from one unit of time to another. Time intervals are stored as the number of seconds in the interval; the conversion functions provide a means for calculating more appropriate units, for example, converting seconds to days.

Each conversion function consists of the CTIME function followed by a period (.), the target time unit, and an argument. The argument can consist of expressions, variable names, or constants. The argument must already be a time interval. See the topic Aggregation Functions for more information. Time conversions produce noninteger results with a default format of F8.2.

Since time and dates are stored internally as seconds, a function that converts to seconds is not necessary.

CTIME.DAYS. CTIME.DAYS(timevalue). Numeric. Returns the number of days, including fractional days, in timevalue, which is a number of seconds, a time expression, or a time format variable.

CTIME.HOURS. CTIME.HOURS(timevalue). Numeric. Returns the number of hours, including fractional hours, in timevalue, which is a number of seconds, a time expression, or a time format variable.

CTIME.MINUTES. CTIME.MINUTES(timevalue). Numeric. Returns the number of minutes, including fractional minutes, in timevalue, which is a number of seconds, a time expression, or a time format variable.

CTIME.SECONDS. CTIME.SECONDS(timevalue). Numeric. Returns the number of seconds, including fractional seconds, in timevalue, which is a number, a time expression, or a time format variable.

Example

DATA LIST FREE (",")
  /StartDate (ADATE12) EndDate (ADATE12)
  StartDateTime(DATETIME20) EndDateTime(DATETIME20)
  StartTime (TIME10) EndTime (TIME10).
BEGIN DATA
3/01/2003, 4/10/2003
01-MAR-2003 12:00, 02-MAR-2003 12:00
09:30, 10:15
END DATA.
COMPUTE days = CTIME.DAYS(EndDate-StartDate).
COMPUTE hours = CTIME.HOURS(EndDateTime-StartDateTime).
COMPUTE minutes = CTIME.MINUTES(EndTime-StartTime).

• CTIME.DAYS calculates the difference between EndDate and StartDate in days—in this example, 40 days.

• CTIME.HOURS calculates the difference between EndDateTime and StartDateTime in hours—in this example, 24 hours.

• CTIME.MINUTES calculates the difference between EndTime and StartTime in minutes—in this example, 45 minutes.

Related Topics

Arithmetic Operations with Date and Time Variables
Date and Time Functions
Aggregation Functions
YRMODA Function
Extraction Functions
Date Differences
Date Increments


YRMODA Function

YRMODA (function),YRMODA (function),YRMODA (function)
functions,functions,functions
date and time,date and time,date and time
YRMODA(arg list) Convert year, month, and day to a day number. The number returned is the number of days since October 14, 1582 (day 0 of the Gregorian calendar).

• Arguments for YRMODA can be variables, constants, or any other type of numeric expression but must yield integers.

• Year, month, and day must be specified in that order.

• The first argument can be any year between 0 and 99, or between 1582 to 47516.

• If the first argument yields a number between 00 and 99, 1900 through 1999 is assumed.

• The month can range from 1 through 13. Month 13 with day 0 yields the last day of the year. For example, YRMODA(1990,13,0) produces the day number for December 31, 1990. Month 13 with any other day yields the day of the first month of the coming year--for example, YRMODA(1990,13,1) produces the day number for January 1, 1991.

• The day can range from 0 through 31. Day 0 is the last day of the previous month regardless of whether it is 28, 29, 30, or 31. For example, YRMODA(1990,3,0) yields 148791.00, the day number for February 28, 1990.

• The function returns the system-missing value if any of the three arguments is missing or if the arguments do not form a valid date after October 14, 1582.

• Since YRMODA yields the number of days instead of seconds, you can not display it in date format unless you convert it to the number of seconds.

Related Topics

Arithmetic Operations with Date and Time Variables
Date and Time Functions
Aggregation Functions
Date and Time Conversion Functions
Extraction Functions
Date Differences
Date Increments


Extraction Functions

functions,functions,functions
date and time,date and time,date and time
XDATE.MDAY (function),XDATE.MDAY (function),XDATE.MDAY (function)
XDATE.MONTH (function),XDATE.MONTH (function),XDATE.MONTH (function)
XDATE.YEAR (function),XDATE.YEAR (function),XDATE.YEAR (function)
XDATE.HOUR (function),XDATE.HOUR (function),XDATE.HOUR (function)
XDATE.MINUTE (function),XDATE.MINUTE (function),XDATE.MINUTE (function)
XDATE.SECOND (function),XDATE.SECOND (function),XDATE.SECOND (function)
XDATE.WKDAY (function),XDATE.WKDAY (function),XDATE.WKDAY (function)
XDATE.JDAY (function),XDATE.JDAY (function),XDATE.JDAY (function)
XDATE.QUARTER (function),XDATE.QUARTER (function),XDATE.QUARTER (function)
XDATE.WEEK (function),XDATE.WEEK (function),XDATE.WEEK (function)
XDATE.TDAY (function),XDATE.TDAY (function),XDATE.TDAY (function)
date and time functions,date and time functions,date and time functions
extraction functions,extraction functions,extraction functions
XDATE.TIME (function),XDATE.TIME (function),XDATE.TIME (function)
XDATE.DATE (function),XDATE.DATE (function),XDATE.DATE (function)

The extraction functions extract subfields from dates or time intervals, targeting the day or a time from a date value. This permits you to classify events by day of the week, season, shift, and so forth.

Each extraction function begins with XDATE, followed by a period, the subfunction name (what you want to extract), and an argument.

XDATE.DATE. XDATE.DATE(datevalue). Numeric. Returns the date portion from a numeric value that represents a date. The argument can be a number, a date format variable, or an expression that resolves to a date. To display the result as a date, apply a date format to the variable.

XDATE.HOUR. XDATE.HOUR(datetime). Numeric. Returns the hour (an integer between 0 and 23) from a value that represents a time or a datetime. The argument can be a number, a time or datetime variable or an expression that resolves to a time or datetime value.

XDATE.JDAY. XDATE.JDAY(datevalue). Numeric. Returns the day of the year (an integer between 1 and 366) from a numeric value that represents a date. The argument can be a number, a date format variable, or an expression that resolves to a date.

XDATE.MDAY. XDATE.MDAY(datevalue). Numeric. Returns the day of the month (an integer between 1 and 31) from a numeric value that represents a date. The argument can be a number, a date format variable, or an expression that resolves to a date.

XDATE.MINUTE. XDATE.MINUTE(datetime). Numeric. Returns the minute (an integer between 0 and 59) from a value that represents a time or a datetime. The argument can be a number, a time or datetime variable, or an expression that resolves to a time or datetime value.

XDATE.MONTH. XDATE.MONTH(datevalue). Numeric. Returns the month (an integer between 1 and 12) from a numeric value that represents a date. The argument can be a number, a date format variable, or an expression that resolves to a date.

XDATE.QUARTER. XDATE.QUARTER(datevalue). Numeric. Returns the quarter of the year (an integer between 1 and 4) from a numeric value that represents a date. The argument can be a number, a date format variable, or an expression that resolves to a date.

XDATE.SECOND. XDATE.SECOND(datetime). Numeric. Returns the second (a number between 0 and 60) from a value that represents a time or a datetime. The argument can be a number, a time or datetime variable or an expression that resolves to a time or datetime value.

XDATE.TDAY. XDATE.TDAY(timevalue). Numeric. Returns the number of whole days (as an integer) from a numeric value that represents a time interval. The argument can be a number, a time format variable, or an expression that resolves to a time interval.

XDATE.TIME. XDATE.TIME(datetime). Numeric. Returns the time portion from a value that represents a time or a datetime. The argument can be a number, a time or datetime variable or an expression that resolves to a time or datetime value. To display the result as a time, apply a time format to the variable.

XDATE.WEEK. XDATE.WEEK(datevalue). Numeric. Returns the week number (an integer between 1 and 53) from a numeric value that represents a date. The argument can be a number, a date format variable, or an expression that resolves to a date.

XDATE.WKDAY. XDATE.WKDAY(datevalue). Numeric. Returns the day-of-week number (an integer between 1, Sunday, and 7, Saturday) from a numeric value that represents a date. The argument can be a number, a date format variable, or an expression that resolves to a date.

XDATE.YEAR. XDATE.YEAR(datevalue). Numeric. Returns the year (as a four-digit integer) from a numeric value that represents a date. The argument can be a number, a date format variable, or an expression that resolves to a date.

Example

DATA LIST FREE (",")
  /StartDateTime (datetime25).
BEGIN DATA
29-OCT-2003 11:23:02
1 January 1998 1:45:01
21/6/2000 2:55:13
END DATA.
COMPUTE dateonly=XDATE.DATE(StartDateTime).
FORMATS dateonly(ADATE10).
COMPUTE hour=XDATE.HOUR(StartDateTime).
COMPUTE DayofWeek=XDATE.WKDAY(StartDateTime).
COMPUTE WeekofYear=XDATE.WEEK(StartDateTime).
COMPUTE quarter=XDATE.QUARTER(StartDateTime).

• The date portion extracted with XDATE.DATE returns a date expressed in seconds; so, FORMATS is used to display the date in a readable date format.

• Day of the week is an integer between 1 (Sunday) and 7 (Saturday).

• Week of the year is an integer between 1 and 53 (January 1–7 = 1).

Related Topics

Arithmetic Operations with Date and Time Variables
Date and Time Functions
Aggregation Functions
Date and Time Conversion Functions
YRMODA Function
Date Differences
Date Increments


Date Differences

date and time functions,date and time functions,date and time functions
difference between dates,difference between dates,difference between dates
DATEDIFF function,DATEDIFF function,DATEDIFF function
functions,functions,functions
date and time,date and time,date and time

The DATEDIFF function calculates the difference between two date values and returns an integer (with any fraction component truncated) in the specified date/time units. The general form of the expression is

DATEDIFF(datetime2, datetime1, “unit”).

where datetime2 and datetime1 are both date or time format variables (or numeric values that represent valid date/time values), and “unit” is one of the following string literal values, enclosed in quotes:

• Years

• Quarters

• Months

• Weeks

• Days

• Hours

• Minutes

• Seconds

Example

DATA LIST FREE /date1 date2 (2ADATE10).
BEGIN DATA
1/1/2004 2/1/2005
1/1/2004 2/15/2005
1/30/2004 1/29/2005
END DATA.
COMPUTE years=DATEDIFF(date2, date1, "years").

• The result will be the integer portion of the number of years between the two dates, with any fractional component truncated.

• One "year" is defined as the same month and day, one year before or after the second date argument.

• For the first two cases, the result is 1, since in both cases the number of years is greater than or equal to 1 and less than 2.

• For the third case, the result is 0, since the difference is one day short of a year based on the definition of year.

Example

DATA LIST FREE /date1 date2 (2ADATE10).
BEGIN DATA
1/1/2004 2/1/2004
1/1/2004 2/15/2004
1/30/2004 2/1/2004
END DATA.
COMPUTE months=DATEDIFF(date2, date1, "months").

• The result will be the integer portion of the number of months between the two dates, with any fractional component truncated.

• One "month" is defined as the same day of the month, one calendar month before or after the second date argument.

• For the first two cases, the result will be 1, since both February 1 and February 15, 2004, are greater than or equal to one month and less than two months after January 1, 2004.

• For the third case, the result will be 0. By definition, any date in February 2004 will be less than one month after January 30, 2004, resulting in a value of 0.

Related Topics

Arithmetic Operations with Date and Time Variables
Date and Time Functions
Aggregation Functions
Date and Time Conversion Functions
YRMODA Function
Extraction Functions
Date Increments


Date Increments

date and time functions,date and time functions,date and time functions
incrementing dates,incrementing dates,incrementing dates
DATESUM functions,DATESUM functions,DATESUM functions
functions,functions,functions
date and time,date and time,date and time

The DATESUM function calculates a date or time value a specified number of units from a given date or time value. The general form of the function is:

DATESUM(datevar, value, "unit", "method").

• datevar is a date/time format variable (or a numeric value that represents a valid date/time value).

• value is a positive or negative number. For variable-length units (years, quarters, months), fractional values are truncated to integers.

• "unit" is one of the following string literal values enclosed in quotes: years, quarters, months, weeks, days, hours, minutes, seconds.

• "method" is an optional specification for variable-length units (years, quarters, months) enclosed in quotes. The method can be "rollover" or "closest". The rollover method advances excess days into the next month. The closest method uses the closest legitimate date within the month. This is the default.

Example

DATA LIST FREE /datevar1 (ADATE10).
BEGIN DATA
2/28/2004
2/29/2004
END DATA.
COMPUTE rollover_year=DATESUM(datevar1, 1, "years", "rollover").
COMPUTE closest_year=DATESUM(datevar1, 1, "years", "closest").
COMPUTE fraction_year=DATESUM(datevar1, 1.5, "years").
FORMATS rollover_year closest_year fraction_year (ADATE10).
SUMMARIZE
 /TABLES=datevar1 rollover_year closest_year fraction_year
 /FORMAT=VALIDLIST NOCASENUM
 /CELLS=NONE.
Results of rollover and closest year calculations

• The rollover and closest methods yield the same result when incrementing February 28, 2004, by one year: February 28, 2005.

• Using the rollover method, incrementing February 29, 2004, by one year returns a value of March 1, 2005. Since there is no February 29, 2005, the excess day is rolled over to the next month.

• Using the closest method, incrementing February 29, 2004, by one year returns a value of February 28, 2005, which is the closest day in the same month of the following year.

• The results for fraction_year are exactly the same as for closest_year because the closest method is used by default, and the value parameter of 1.5 is truncated to 1 for variable-length units.

• All three COMPUTE commands create new variables that display values in the default F format, which for a date value is a large integer. The FORMATS command specifies the ADATE format for the new variables.

Example

DATA LIST FREE /datevar1 (ADATE10).
BEGIN DATA
01/31/2003
01/31/2004
03/31/2004
05/31/2004
END DATA.
COMPUTE rollover_month=DATESUM(datevar1, 1, "months", "rollover").
COMPUTE closest_month=DATESUM(datevar1, 1, "months", "closest").
COMPUTE previous_month_rollover =
  DATESUM(datevar1, -1, "months", "rollover").
COMPUTE previous_month_closest =
  DATESUM(datevar1, -1, "months", "closest").
FORMATS rollover_month closest_month
  previous_month_rollover previous_month_closest (ADATE10).
SUMMARIZE
  /TABLES=datevar1 rollover_month closest_month
   previous_month_rollover previous_month_closest
  /FORMAT=VALIDLIST NOCASENUM
  /CELLS=NONE.
Results of month calculations

• Using the rollover method, incrementing by one month from January 31 yields a date in March, since February has a maximum of 29 days; and incrementing one month from March 31 and May 31 yields May 1 and July 1, respectively, since April and June each have only 30 days.

• Using the closest method, incrementing by one month from the last day of any month will always yield the closest valid date within the next month. For example, in a nonleap year, one month after January 31 is February 28, and one month after February 28 is March 28.

• Using the rollover method, decrementing by one month (by specifying a negative value parameter) from the last day of a month may sometimes yield unexpected results, since the excess days are rolled back to the original month. For example, one month prior to March 31 yields March 3 for nonleap years and March 2 for leap years.

• Using the closest method, decrementing by one month from the last day of the month will always yield the closest valid date within the previous month. For example, one month prior to April 30, is March 30 (not March 31), and one month prior to March 31 is February 28 in nonleap years and February 29 in leap years.

Related Topics

Arithmetic Operations with Date and Time Variables
Date and Time Functions
Aggregation Functions
Date and Time Conversion Functions
YRMODA Function
Extraction Functions
Date Differences


String Expressions

string expressions,string expressions,string expressions
defined,defined,defined

Expressions involving string variables can be used on COMPUTE and IF commands and in logical expressions on commands such as IF, DO IF, LOOP IF, and SELECT IF.

target variables,target variables,target variables
in COMPUTE command,in COMPUTE command,in COMPUTE command

• A string expression can be a constant enclosed in quotes (for example, ‘IL’), a string function, or a string variable. See the topic String Functions for more information.

• An expression must return a string if the target variable is a string.

logical expressions,logical expressions,logical expressions
string variables,string variables,string variables
string variables,string variables,string variables
in logical expressions,in logical expressions,in logical expressions

• The string returned by a string expression does not have to be the same length as the target variable; no warning messages are issued if the lengths are not the same. If the target variable produced by a COMPUTE command is shorter, the result is right-trimmed. If the target variable is longer, the result is right-padded.

Related Topics

Transformation Expressions
Numeric Expressions
Logical Expressions
Scoring Expressions (PASW Statistics Server)
Missing Values
String Functions
String/Numeric Conversion Functions
Missing Values in String Expressions


String Functions

string functions,string functions,string functions
functions,functions,functions
string variables,string variables,string variables
CONCAT (function),CONCAT (function),CONCAT (function)
LOWER (function),LOWER (function),LOWER (function)
LPAD (function),LPAD (function),LPAD (function)
LTRIM (function),LTRIM (function),LTRIM (function)
RPAD (function),RPAD (function),RPAD (function)
RTRIM (function),RTRIM (function),RTRIM (function)
SUBSTR (function),SUBSTR (function),SUBSTR (function)
UPCASE (function),UPCASE (function),UPCASE (function)
REPLACE (function),REPLACE (function),REPLACE (function)
INDEX (function),INDEX (function),INDEX (function)
LENGTH (function),LENGTH (function),LENGTH (function)
MIN (function),MIN (function),MIN (function)
MAX (function),MAX (function),MAX (function)
RINDEX (function),RINDEX (function),RINDEX (function)
search functions,search functions,search functions
find and replace functions,find and replace functions,find and replace functions
CHAR.INDEX (function),CHAR.INDEX (function),CHAR.INDEX (function)
CHAR.LENGTH (function),CHAR.LENGTH (function),CHAR.LENGTH (function)
CHAR.LPAD (function),CHAR.LPAD (function),CHAR.LPAD (function)
CHAR.MBLEN (function),CHAR.MBLEN (function),CHAR.MBLEN (function)
CHAR.RINDEX (function),CHAR.RINDEX (function),CHAR.RINDEX (function)
CHAR.RPAD (function),CHAR.RPAD (function),CHAR.RPAD (function)
CHAR.SUBSTR (function),CHAR.SUBSTR (function),CHAR.SUBSTR (function)
NORMALIZE (function),NORMALIZE (function),NORMALIZE (function)
STRUNC (function),STRUNC (function),STRUNC (function)
NTRIM (function),NTRIM (function),NTRIM (function)

• The target variable for each string function must be a string and must have already been declared (see STRING).

• Multiple arguments in a list must be separated by commas.

• When two strings are compared, the case in which they are entered is significant. The LOWER and UPCASE functions are useful for making comparisons of strings regardless of case.

• String functions that include a byte position or count argument or return a byte position or count may return different results in Unicode mode than in code page mode. For example, é is one byte in code page mode but is two bytes in Unicode mode; so résumé is six bytes in code page mode and eight bytes in Unicode mode.

• In Unicode mode, trailing blanks are always removed from the values of string variables in string functions unless explicitly preserved with the NTRIM function.

• In code page mode, trailing blanks are always preserved in the values of string variables unless explicitly removed with the RTRIM function.

For more information on Unicode mode, see UNICODE Subcommand.

CHAR.INDEX. CHAR.INDEX(haystack, needle[, divisor]). Numeric. Returns a number indicating the character position of the first occurrence of needle in haystack. The optional third argument, divisor, is a number of characters used to divide needle into separate strings. Each substring is used for searching and the function returns the first occurrence of any of the substrings. For example, CHAR.INDEX(var1, 'abcd') will return the value of the starting position of the complete string "abcd" in the string variable var1; CHAR.INDEX(var1, 'abcd', 1) will return the value of the position of the first occurrence of any of the values in the string; and CHAR.INDEX(var1, 'abcd', 2) will return the value of the first occurrence of either "ab" or "cd". Divisor must be a positive integer and must divide evenly into the length of needle. Returns 0 if needle does not occur within haystack.

CHAR.LENGTH. CHAR.LENGTH(strexpr). Numeric. Returns the length of strexpr in characters, with any trailing blanks removed.

CHAR.LPAD. CHAR.LPAD(strexpr1,length[,strexpr2]). String. Left-pads strexpr1 to make its length the value specified by length using as many complete copies as will fit of strexpr2 as the padding string. The value of length represents the number of characters and must be a positive integer. If the optional argument strexpr2 is omitted, the value is padded with blank spaces.

CHAR.MBLEN. CHAR.MBLEN(strexpr,pos). Numeric. Returns the number of bytes in the character at character position pos of strexpr.

CHAR.RINDEX. CHAR.RINDEX(haystack,needle[,divisor]). Numeric. Returns an integer that indicates the starting character position of the last occurrence of the string needle in the string haystack. The optional third argument, divisor, is the number of characters used to divide needle into separate strings. For example, CHAR.RINDEX(var1, 'abcd') will return the starting position of the last occurrence of the entire string "abcd" in the variable var1; CHAR.RINDEX(var1, 'abcd', 1) will return the value of the position of the last occurrence of any of the values in the string; and CHAR.RINDEX(var1, 'abcd', 2) will return the value of the starting position of the last occurrence of either "ab" or "cd". Divisor must be a positive integer and must divide evenly into the length of needle. If needle is not found, the value 0 is returned.

CHAR.RPAD. CHAR.RPAD(strexpr1,length[,strexpr2]). String. Right-pads strexpr1 with strexpr2 to extend it to the length given by length using as many complete copies as will fit of strexpr2 as the padding string. The value of length represents the number of characters and must be a positive integer. The optional third argument strexpr2 is a quoted string or an expression that resolves to a string. If strepxr2 is omitted, the value is padded with blanks.

CHAR.SUBSTR. CHAR.SUBSTR(strexpr,pos[,length]). String. Returns the substring beginning at character position pos of strexpr. The optional third argument represents the number of characters in the substring. If the optional argument length is omitted, returns the substring beginning at character position pos of strexpr and running to the end of strexpr. For example CHAR.SUBSTR('abcd', 2) returns 'bcd' and CHAR.SUBSTR('abcd', 2, 2) returns 'bc'. (Note: Use the SUBSTR function instead of CHAR.SUBSTR if you want to use the function on the left side of an equals sign to replace a substring.)

CONCAT. CONCAT(strexpr,strexpr[,..]). String. Returns a string that is the concatenation of all its arguments, which must evaluate to strings. This function requires two or more arguments. In code page mode, if strexpr is a string variable, use RTRIM if you only want the actual string value without the right-padding to the defined variable width. For example, CONCAT(RTRIM(stringvar1), RTRIM(stringvar2)).

LENGTH. LENGTH(strexpr). Numeric. Returns the length of strexpr in bytes, which must be a string expression. For string variables, in Unicode mode this is the number of bytes in each value, excluding trailing blanks, but in code page mode this is the defined variable length, including trailing blanks. To get the length (in bytes) without trailing blanks in code page mode, use LENGTH(RTRIM(strexpr)).

LOWER. LOWER(strexpr). String. Returns strexpr with uppercase letters changed to lowercase and other characters unchanged. The argument can be a string variable or a value. For example, LOWER(name1) returns charles if the value of name1 is Charles.

LTRIM. LTRIM(strexpr[,char]). String. Returns strexpr with any leading instances of char removed. If char is not specified, leading blanks are removed. Char must resolve to a single character.

MAX. MAX(value,value[,..]). Numeric or string. Returns the maximum value of its arguments that have valid values. This function requires two or more arguments. For numeric values, you can specify a minimum number of valid arguments for this function to be evaluated.

MIN. MIN(value,value[,..]). Numeric or string. Returns the minimum value of its arguments that have valid, nonmissing values. This function requires two or more arguments. For numeric values, you can specify a minimum number of valid arguments for this function to be evaluated.

MBLEN.BYTE. MBLEN.BYTE(strexpr,pos). Numeric. Returns the number of bytes in the character at byte position pos of strexpr.

NORMALIZE. NORMALIZE(strexp). String. Returns the normalized version of strexp. In Unicode mode, it returns Unicode NFC. In code page mode, it has no effect and returns strexp unmodified. The length of the result may be different from the length of the input.

NTRIM. NTRIM(varname). Returns the value of varname, without removing trailing blanks. The value of varname must be a variable name; it cannot be an expression.

REPLACE. REPLACE(a1, a2, a3[, a4]). String. In a1, instances of a2 are replaced with a3. The optional argument a4 specifies the number of occurrences to replace; if a4 is omitted, all occurrences are replaced. Arguments a1, a2, and a3 must resolve to string values (literal strings enclosed in quotes or string variables), and the optional argument a4 must resolve to a non-negative integer. For example, REPLACE("abcabc", "a", "x") returns a value of "xbcxbc" and REPLACE("abcabc", "a", "x", 1) returns a value of "xbcabc".

RTRIM. RTRIM(strexpr[,char]). String. Trims trailing instances of char within strexpr. The optional second argument char is a single quoted character or an expression that yields a single character. If char is omitted, trailing blanks are trimmed.

STRUNC. STRUNC(strexp, length). String. Returns strexp truncated to length (in bytes) and then trimmed of any trailing blanks. Truncation removes any fragment of a character that would be truncated.

UPCASE. UPCASE(strexpr). String. Returns strexpr with lowercase letters changed to uppercase and other characters unchanged.

Deprecated String Functions Collapse Hide details

Deprecated String Functions

The following functions provide functionality similar to the newer CHAR functions, but they operate at the byte level rather than the character level. For example, the INDEX function returns the byte position of needle within haystack, whereas CHAR.INDEX returns the character position. These functions are supported primarily for compatibility with previous releases.

INDEX. INDEX(haystack,needle[,divisor]). Numeric. Returns a number that indicates the byte position of the first occurrence of needle in haystack. The optional third argument, divisor, is a number of bytes used to divide needle into separate strings. Each substring is used for searching and the function returns the first occurrence of any of the substrings. Divisor must be a positive integer and must divide evenly into the length of needle. Returns 0 if needle does not occur within haystack.

LPAD. LPAD(strexpr1,length[,strexpr2]). String. Left-pads strexpr1 to make its length the value specified by length using as many complete copies as will fit of strexpr2 as the padding string. The value of length represents the number of bytes and must be a positive integer. If the optional argument strexpr2 is omitted, the value is padded with blank spaces.

RINDEX. RINDEX(haystack,needle[,divisor]). Numeric. Returns an integer that indicates the starting byte position of the last occurrence of the string needle in the string haystack. The optional third argument, divisor, is the number of bytes used to divide needle into separate strings. Divisor must be a positive integer and must divide evenly into the length of needle. If needle is not found, the value 0 is returned.

RPAD. RPAD(strexpr1,length[,strexpr2]). String. Right-pads strexpr1 with strexpr2 to extend it to the length given by length using as many complete copies as will fit of strexpr2 as the padding string. The value of length represents the number of bytes and must be a positive integer. The optional third argument strexpr2 is a quoted string or an expression that resolves to a string. If strepxr2 is omitted, the value is padded with blanks.

SUBSTR. SUBSTR(strexpr,pos[,length]). String. Returns the substring beginning at byte position pos of strexpr. The optional third argument represents the number of bytes in the substring. If the optional argument length is omitted, returns the substring beginning at byte position pos of strexpr and running to the end of strexpr. When used on the left side of an equals sign, the substring is replaced by the string specified on the right side of the equals sign. The rest of the original string remains intact. For example, SUBSTR(ALPHA6,3,1)='*' changes the third character of all values for ALPHA6 to *. If the replacement string is longer or shorter than the substring, the replacement is truncated or padded with blanks on the right to an equal length.

Example Collapse Hide details

Example

STRING stringVar1 stringVar2 stringVar3 (A22).
COMPUTE stringVar1='  Does this'.
COMPUTE stringVar2='ting work?'.
COMPUTE stringVar3=
  CONCAT(RTRIM(LTRIM(stringVar1)), " ",
  REPLACE(stringVar2, "ting", "thing")).

• The CONCAT function concatenates the values of stringVar1 and stringVar2, inserting a space as a literal string (" ") between them.

• The RTRIM function strips off trailing blanks from stringVar1. In code page mode, this is necessary to eliminate excessive space between the two concatenated string values because in code page mode all string variable values are automatically right-padded to the defined width of the string variables. In Unicode mode, this has no effect because trailing blanks are automatically removed from string variable values in Unicode mode.

• The LTRIM function removes the leading spaces from the beginning of the value of stringVar1.

• The REPLACE function replaces the misspelled "ting" with "thing" in stringVar2.

The final result is a string value of "Does this thing work?"

Example Collapse Hide details

Example

This example extracts the numeric components from a string telephone number into three numeric variables.

DATA LIST FREE (",") /telephone (A16).
BEGIN DATA
111-222-3333
222 - 333 - 4444
333-444-5555
444 - 555-6666
555-666-0707
END DATA.
STRING #telstr(A16).
COMPUTE #telstr = telephone.
VECTOR tel(3,f4).
LOOP #i = 1 to 2.
- COMPUTE #dash = CHAR.INDEX(#telstr,"-").
- COMPUTE tel(#i) = NUMBER(CHAR.SUBSTR(#telstr,1,#dash-1),f10).
- COMPUTE #telstr = CHAR.SUBSTR(#telstr,#dash+1).
END LOOP.
COMPUTE tel(3) = NUMBER(#telstr,f10).
EXECUTE.
FORMATS tel1 tel2 (N3) tel3 (N4).

• A temporary (scratch) string variable, #telstr, is declared and set to the value of the original string telephone number.

• The VECTOR command creates three numeric variables--tel1, tel2, and tel3--and creates a vector containing those variables.

• The LOOP structure iterates twice to produce the values for tel1 and tel2.

• COMPUTE #dash = CHAR.INDEX(#telstr,"-") creates another temporary variable, #dash, that contains the position of the first dash in the string value.

• On the first iteration, COMPUTE tel(#i) = NUMBER(CHAR.SUBSTR(#telstr,1,#dash-1),f10) extracts everything prior to the first dash, converts it to a number, and sets tel1 to that value.

• COMPUTE #telstr = CHAR.SUBSTR(#telstr,#dash+1) then sets #telstr to the remaining portion of the string value after the first dash.

• On the second iteration, COMPUTE #dash... sets #dash to the position of the “first” dash in the modified value of #telstr. Since the area code and the original first dash have been removed from #telstr, this is the position of the dash between the exchange and the number.

• COMPUTE tel(#)... sets tel2 to the numeric value of everything up to the “first” dash in the modified version of #telstr, which is everything after the first dash and before the second dash in the original string value.

• COMPUTE #telstr... then sets #telstr to the remaining segment of the string value--everything after the “first” dash in the modified value, which is everything after the second dash in the original value.

• After the two loop iterations are complete, COMPUTE tel(3) = NUMBER(#telstr,f10) sets tel3 to the numeric value of the final segment of the original string value.

Related Topics

String Expressions
String/Numeric Conversion Functions
Missing Values in String Expressions


String/Numeric Conversion Functions

NUMBER (function),NUMBER (function),NUMBER (function)
STRING (function),STRING (function),STRING (function)
conversion functions,conversion functions,conversion functions
strings,strings,strings
converting to numbers,converting to numbers,converting to numbers
numbers,numbers,numbers
converting to strings,converting to strings,converting to strings

NUMBER. NUMBER(strexpr,format). Numeric. Returns the value of the string expression strexpr as a number. The second argument, format, is the numeric format used to read strexpr. For example, NUMBER(stringDate,DATE11) converts strings containing dates of the general format dd-mmm-yyyy to a numeric number of seconds that represent that date. (To display the value as a date, use the FORMATS or PRINT FORMATS command.) If the string cannot be read using the format, this function returns system-missing.

STRING. STRING(numexpr,format). String. Returns the string that results when numexpr is converted to a string according to format. STRING(-1.5,F5.2) returns the string value '-1.50'. The second argument format must be a format for writing a numeric value.

Example Collapse Hide details

Example

DATA LIST FREE /tel1 tel2 tel3.
BEGIN DATA
123 456 0708
END DATA.
STRING telephone (A12).
COMPUTE telephone=
  CONCAT(STRING(tel1,N3), "-", STRING(tel2, N3), "-", STRING(tel3, N4)).

• A new string variable, telephone, is declared to contain the computed string value.

• The three numeric variables are converted to strings and concatenated with dashes between the values.

• The numeric values are converted using N format to preserve any leading zeros.

Related Topics

String Expressions
String Functions
Missing Values in String Expressions
Numeric Expressions
Arithmetic Operations
Numeric Constants
Complex Numeric Arguments
Domain Errors
Numeric Functions
Arithmetic Functions
Statistical Functions
Random Variable and Distribution Functions
Missing Values in Numeric Expressions


LAG Function

LAG (function),LAG (function),LAG (function)

LAG. LAG(variable[, n]). Numeric or string. The value of variable in the previous case or n cases before. The optional second argument, n, must be a positive integer; the default is 1. For example, prev4=LAG(gnp,4) returns the value of gnp for the fourth case before the current one. The first four cases have system-missing values for prev4.

• The result is of the same type (numeric or string) as the variable specified as the first argument.

• The first n cases for string variables are set to blanks. For example, if PREV2=LAG (LNAME,2) is specified, blanks will be assigned to the first two cases for PREV2.

• When LAG is used with commands that select cases (for example, SELECT IF and SAMPLE), LAG counts cases after case selection, even if specified before these commands. See the topic Command Order for more information.

Note: In a series of transformation commands without any intervening EXECUTE commands or other commands that read the data, lag functions are calculated after all other transformations, regardless of command order. For example,

COMPUTE lagvar=LAG(var1).
COMPUTE var1=var1*2.

and

COMPUTE lagvar=LAG(var1).
EXECUTE.
COMPUTE var1=var1*2.

yield very different results for the value of lagvar, since the former uses the transformed value of var1 while the latter uses the original value.


VALUELABEL Function

VALUELABEL (function),VALUELABEL (function),VALUELABEL (function)
value labels,value labels,value labels
using as values for computed variables,using as values for computed variables,using as values for computed variables
VALUELABEL function,VALUELABEL function,VALUELABEL function

VALUELABEL. VALUELABEL(varname). String. Returns the value label for the value of variable or an empty string if there is no label for the value. The value of varname must be a variable name; it cannot be an expression.

Example

STRING labelvar (A120).
COMPUTE labelvar=VALUELABEL(var1).
DO REPEAT varlist=var2, var3, var4
         /newvars=labelvar2, labelvar3, labelvar4.
- STRING newvars(A120).
- COMPUTE newvars=VALUELABEL(varlist).
END REPEAT.

Related Topics

VALUE LABELS


Logical Expressions

logical expressions,logical expressions,logical expressions
logical expressions,logical expressions,logical expressions
defined,defined,defined
logical variables,logical variables,logical variables
defined,defined,defined

Logical expressions can appear on the IF, SELECT IF, DO IF, ELSE IF, LOOP IF, and END LOOP IF commands. A logical expression is evaluated as true or false, or as missing if it is indeterminate. A logical expression returns 1 if the expression is true, 0 if it is false, or system-missing if it is missing. Thus, logical expressions can be any expressions that yield this three-value logic.

• The simplest logical expression is a logical variable. A logical variable is any numeric variable that has the values 1, 0, or system-missing. Logical variables cannot be strings.

• Logical expressions can be simple logical variables or relations, or they can be complex logical tests involving variables, constants, functions, relational operators, logical operators, and parentheses to control the order of evaluation.

• On an IF command, a logical expression that is true causes the assignment expression to be executed. A logical expression that returns missing has the same effect as one that is false--that is, the assignment expression is not executed and the value of the target variable is not altered.

logical expressions,logical expressions,logical expressions
in SELECT IF,in SELECT IF,in SELECT IF

• On a DO IF command, a logical expression that is true causes the execution of the commands immediately following the DO IF, up to the next ELSE IF, ELSE, or END IF. If it is false, the next ELSE IF or ELSE command is evaluated. If the logical expression returns missing for each of these, the entire structure is skipped.

logical expressions,logical expressions,logical expressions
in LOOP,in LOOP,in LOOP
logical expressions,logical expressions,logical expressions
in END LOOP,in END LOOP,in END LOOP
missing values,missing values,missing values
logical expressions,logical expressions,logical expressions

• On a SELECT IF command, a logical expression that is true causes the case to be selected. A logical expression that returns missing has the same effect as one that is false--that is, the case is not selected.

• On a LOOP IF command, a logical expression that is true causes looping to begin (or continue). A logical expression that returns missing has the same effect as one that is false--that is, the structure is skipped.

• On an END LOOP IF command, a logical expression that is false returns control to the LOOP command for that structure, and looping continues. If it is true, looping stops and the structure is terminated. A logical expression that returns a missing value has the same effect as one that is true--that is, the structure is terminated.

Example Collapse Hide details

Example

DATA LIST FREE (",") /a.
BEGIN DATA
1, , 1 , ,
END DATA.
COMPUTE b=a.
* The following does NOT work since the second condition
  is never evaluated.
DO IF a=1.
COMPUTE a1=1.
ELSE IF MISSING(a).
COMPUTE a1=2.
END IF.
* On the other hand the following works.
DO IF MISSING(b).
COMPUTE b1=2.
ELSE IF b=1.
COMPUTE b1=1.
END IF.

• The first DO IF will never yield a value of 2 for a1 because if a is missing, then DO IF a=1 evaluates as missing and control passes immediately to END IF. So a1 will either be 1 or missing.

• In the second DO IF, however, we take care of the missing condition first; so if the value of b is missing, DO IF MISSING(b) evaluates as true and b1 is set to 2; otherwise, b1 is set to 1.

Related Topics

Transformation Expressions
Numeric Expressions
String Expressions
Scoring Expressions (PASW Statistics Server)
Missing Values
String Variables in Logical Expressions
Relational Operators
NOT Logical Operator
AND and OR Logical Operators
Order of Evaluation
Logical Functions
Missing Values in Logical Expressions


String Variables in Logical Expressions

missing values,missing values,missing values
string variables in logical expressions,string variables in logical expressions,string variables in logical expressions

String variables, like numeric variables, can be tested in logical expressions.

• String variables must be declared before they can be used in a string expression.

• String variables cannot be compared to numeric variables.

• If strings of different lengths are compared, the shorter string is right-padded with blanks to equal the length of the longer string.

• The magnitude of strings can be compared using LT, GT, and so on, but the outcome depends on the sorting sequence of the computer. Use with caution.

• User-missing string values are treated the same as nonmissing string values when evaluating string variables in logical expressions. In other words, all string variable values are treated as valid, nonmissing values in logical expressions.

Related Topics

Logical Expressions
Relational Operators
NOT Logical Operator
AND and OR Logical Operators
Order of Evaluation
Logical Functions
Missing Values in Logical Expressions


Relational Operators

relational operators,relational operators,relational operators
defined,defined,defined
relational operators,relational operators,relational operators

A relation is a logical expression that compares two values using a relational operator. In the command

IF (X EQ 0) Y=1

the variable X and 0 are expressions that yield the values to be compared by the EQ relational operator. The following are the relational operators:

Symbol | Definition
EQ or = | Equal to
NE or ~= or ¬ = or <> | Not equal to
LT or < | Less than
LE or <= | Less than or equal to
GT or > | Greater than
GE or >= | Greater than or equal to

• The expressions in a relation can be variables, constants, or more complicated arithmetic expressions.

• Blanks (not commas) must be used to separate the relational operator from the expressions. To make the command more readable, use extra blanks or parentheses.

• For string values, “less than” and “greater than” results can vary by locale even for the same set of characters, since the national collating sequence is used. Language order, not ASCII order, determines where certain characters fall in the sequence.

Related Topics

Logical Expressions
String Variables in Logical Expressions
NOT Logical Operator
AND and OR Logical Operators
Order of Evaluation
Logical Functions
Missing Values in Logical Expressions


NOT Logical Operator

The NOT logical operator reverses the true/false outcome of the expression that immediately follows.

• The NOT operator affects only the expression that immediately follows, unless a more complex logical expression is enclosed in parentheses.

logical operators,logical operators,logical operators

• You can substitute ~ or ¬ for NOT as a logical operator.

• NOT can be used to check whether a numeric variable has the value 0, 1, or any other value. For example, all scratch variables are initialized to 0. Therefore, NOT (#ID) returns false or missing when #ID has been assigned a value other than 0.

Related Topics

Logical Expressions
String Variables in Logical Expressions
Relational Operators
AND and OR Logical Operators
Order of Evaluation
Logical Functions
Missing Values in Logical Expressions


AND and OR Logical Operators

logical operators,logical operators,logical operators
logical operators,logical operators,logical operators
defined,defined,defined

Two or more relations can be logically joined using the logical operators AND and OR. Logical operators combine relations according to the following rules:

• The ampersand (&) symbol is a valid substitute for the logical operator AND. The vertical bar ( | ) is a valid substitute for the logical operator OR.

• Only one logical operator can be used to combine two relations. However, multiple relations can be combined into a complex logical expression.

• Regardless of the number of relations and logical operators used to build a logical expression, the result is either true, false, or indeterminate because of missing values.

• Operators or expressions cannot be implied. For example, X EQ 1 OR 2 is illegal; you must specify X EQ 1 OR X EQ 2.

• The ANY and RANGE functions can be used to simplify complex expressions.

AND | Both relations must be true for the complex expression to be true.
OR | If either relation is true, the complex expression is true.

The following table lists the outcomes for AND and OR combinations.

Logical outcomes
Expression | Outcome | Expression | Outcome
true AND true | = true | true OR true | = true
true AND false | = false | true OR false | = true
false AND false | = false | false OR false | = false
true AND missing | = missing | true OR missing | = true*
missing AND missing | = missing | missing OR missing | = missing
false AND missing | = false* | false OR missing | = missing

* Expressions where the outcome can be evaluated with incomplete information. See the topic Missing Values in Logical Expressions for more information.

Example Collapse Hide details

Example

DATA LIST FREE /var1 var2 var3.
BEGIN DATA
1 1 1
1 2 1
1 2 3
4 2 4
END DATA.
SELECT IF var1 = 4 OR ((var2 > var1) AND (var1 <> var3)).

• Any case that meets the first condition--var1 = 4--will be selected, which in this example is only the last case.

• Any case that meets the second condition will also be selected. In this example, only the third case meets this condition, which contains two criteria: var2 is greater than var1 and var1 is not equal to var3.

Related Topics

Logical Expressions
String Variables in Logical Expressions
Relational Operators
NOT Logical Operator
Order of Evaluation
Logical Functions
Missing Values in Logical Expressions


Order of Evaluation

logical expressions,logical expressions,logical expressions
order of evaluation,order of evaluation,order of evaluation

• When arithmetic operators and functions are used in a logical expression, the order of operations is functions and arithmetic operations first, then relational operators, and then logical operators.

• When more than one logical operator is used, NOT is evaluated first, then AND, and then OR.

• To change the order of evaluation, use parentheses.

Related Topics

Logical Expressions
String Variables in Logical Expressions
Relational Operators
NOT Logical Operator
AND and OR Logical Operators
Logical Functions
Missing Values in Logical Expressions


Logical Functions

RANGE (function),RANGE (function),RANGE (function)
ANY (function),ANY (function),ANY (function)

• Each argument to a logical function (expression, variable name, or constant) must be separated by a comma.

logical functions,logical functions,logical functions

• The target variable for a logical function must be numeric.

• The functions RANGE and ANY can be useful shortcuts to more complicated specifications on the IF, DO IF, and other conditional commands. For example, for non-missing values, the command

SELECT IF ANY(REGION,"NW","NE","SE").

is equivalent to

SELECT IF (REGION EQ "NW" OR REGION EQ "NE" OR REGION EQ "SE").

RANGE. RANGE(test,lo,hi[,lo,hi,..]). Logical. Returns 1 or true if test is within any of the inclusive range(s) defined by the pairs lo, hi. Arguments must be all numeric or all strings of the same length, and each of the lo, hi pairs must be ordered with lo <= hi. Note: For string values, results can vary by locale even for the same set of characters, since the national collating sequence is used. Language order, not ASCII order, determines where certain characters fall in the sequence.

ANY. ANY(test,value[,value,...]). Logical. Returns 1 or true if the value of test matches any of the subsequent values; returns 0 or false otherwise. This function requires two or more arguments. For example, ANY(var1, 1, 3, 5) returns 1 if the value of var1 is 1, 3, or 5 and 0 for other values. ANY can also be used to scan a list of variables or expressions for a value. For example, ANY(1, var1, var2, var3) returns 1 if any of the three specified variables has a value of 1 and 0 if all three variables have values other than 1.

See Treatment of Missing Values in Arguments for information on how missing values are handled by the ANY and RANGE functions.

Related Topics

Logical Expressions
String Variables in Logical Expressions
Relational Operators
NOT Logical Operator
AND and OR Logical Operators
Order of Evaluation
Missing Values in Logical Expressions


Scoring Expressions (PASW Statistics Server)

ApplyModel (function),ApplyModel (function),ApplyModel (function)
StrApplyModel (function),StrApplyModel (function),StrApplyModel (function)

Scoring functions are available only if you have access to PASW Statistics Server.

Scoring expressions apply model XML from an external file to the active dataset and generate predicted values, predicted probabilities, and other values based on that model.

• Scoring expressions must be preceded by a MODEL HANDLE command that identifies the external XML model file and optionally does variable mapping.

• Scoring expressions require two arguments: the first identifies the model, and the second identifies the scoring function. An optional third argument allows users to obtain the probability (for each case) associated with a selected category, in the case of a categorical target variable. It is also used in nearest neighbor models to specify a particular neighbor.

• Procedures that can generate model XML include REGRESSION, DISCRIMINANT, and TWOSTEP CLUSTER, plus some procedures available in some add-on options. See the MODEL HANDLE command for more information.

• Prior to applying scoring functions to a set of data, a data validation analysis is performed. The analysis includes checking that data are of the correct type as well as checking that the data values are in the set of allowed values defined in the model. For example, for categorical variables, a value that is neither a valid category nor defined as user-missing would be treated as an invalid value. Values that are found to be invalid are treated as system-missing.

The following scoring expressions are available:

ApplyModel. ApplyModel(handle, "function", value). Numeric. Applies a particular scoring function to the input case data using the model specified by handle and where "function" is one of the following string literal values enclosed in quotes: predict, stddev, probability, confidence, nodeid, cumhazard, neighbor, distance. The model handle is the name associated with the external XML file, as defined on the MODEL HANDLE command. The optional third argument applies when the function is "probability", "neighbor", or "distance". For "probability", it specifies a category for which the probability is calculated. For "neighbor" and "distance", it specifies a particular neighbor (as an integer) for nearest neighbor models. ApplyModel returns system-missing if a value can not be computed. String values must be enclosed in quotes. For example, ApplyModel(name1, ‘probability’, ‘reject’), where name1 is the model’s handle name and ‘reject’ is a valid category for a target variable that is a string.

StrApplyModel. StrApplyModel(handle, "function", value). String. Applies a particular scoring function to the input case data using the model specified by handle and where "function" is one of the following string literal values enclosed in quotes: predict, stddev, probability, confidence, nodeid, cumhazard, neighbor, distance. The model handle is the name associated with the external XML file, as defined on the MODEL HANDLE command. The optional third argument applies when the function is "probability", "neighbor", or "distance". For "probability", it specifies a category for which the probability is calculated. For "neighbor" and "distance", it specifies a particular neighbor (as an integer) for nearest neighbor models. StrApplyModel returns a blank string if a value cannot be computed.

The following scoring functions are available:

PREDICT | Returns the predicted value of the target variable.
STDDEV | Standard deviation.
PROBABILITY | Probability associated with a particular category of a target variable. Applies only to categorical variables. In the absence of the optional third parameter, category, this is the probability that the predicted category is the correct one for the target variable. If a particular category is specified, then this is the probability that the specified category is the correct one for the target variable.
CONFIDENCE | A probability measure associated with the predicted value of a categorical target variable. Applies only to categorical variables.
NODEID | The terminal node number. Applies only to tree models.
CUMHAZARD | Cumulative hazard value. Applies only to Cox regression models.
NEIGHBOR | The ID of the kth nearest neighbor. Applies only to nearest neighbor models. In the absence of the optional third parameter, k, this is the ID of the nearest neighbor. The ID is the value of the case labels variable, if supplied, and otherwise the case number.
DISTANCE | The distance to the kth nearest neighbor. Applies only to nearest neighbor models. In the absence of the optional third parameter, k, this is the distance to the nearest neighbor. Depending on the model, either Euclidean or City Block distance will be used.

The following table lists the set of scoring functions available for each type of model that supports scoring. The function type denoted as PROBABILITY (category) refers to specification of a particular category (the optional third parameter) for the PROBABILITY function.

Supported functions by model type
Model type | Supported functions
Tree (categorical target) | PREDICT, PROBABILITY, PROBABILITY (category), CONFIDENCE, NODEID
Tree (scale target) | PREDICT, NODEID
Boosted Tree (C5.0) | PREDICT, CONFIDENCE
Linear Regression | PREDICT, STDDEV
Binary Logistic Regression | PREDICT, PROBABILITY, PROBABILITY (category), CONFIDENCE
Conditional Logistic Regression | PREDICT
Multinomial Logistic Regression | PREDICT, PROBABILITY, PROBABILITY (category), CONFIDENCE
General Linear Model | PREDICT, STDDEV
Discriminant | PREDICT, PROBABILITY
TwoStep Cluster | PREDICT
K-Means Cluster | PREDICT, CONFIDENCE
Kohonen | PREDICT
Neural Net (categorical target) | PREDICT, PROBABILITY, PROBABILITY (category), CONFIDENCE
Neural Net (scale target) | PREDICT
Naive Bayes | PREDICT, PROBABILITY, PROBABILITY (category), CONFIDENCE
Anomaly Detection | PREDICT
Ruleset | PREDICT, CONFIDENCE
Generalized Linear Model (categorical target) | PREDICT, PROBABILITY, PROBABILITY (category), CONFIDENCE
Generalized Linear Model (scale target) | PREDICT, STDDEV
Ordinal Multinomial Regression | PREDICT, PROBABILITY, PROBABILITY (category), CONFIDENCE
Cox Regression | PREDICT, CUMHAZARD
Nearest Neighbor (scale target) | PREDICT, NEIGHBOR, DISTANCE
Nearest Neighbor (categorical target) | PREDICT, PROBABILITY, NEIGHBOR, DISTANCE

• For the Binary Logistic Regression, Multinomial Logistic Regression, and Naive Bayes models, the value returned by the CONFIDENCE function is identical to that returned by the PROBABILITY function.

• For the K-Means model, the value returned by the CONFIDENCE function is the least distance.

• For tree and ruleset models, the confidence can be interpreted as an adjusted probability of the predicted category and is always less than the value given by PROBABILITY. For these models, the confidence value is more reliable than the value given by PROBABILITY.

• For neural network models, the confidence provides a measure of whether the predicted category is much more likely than the second-best predicted category.

• For Ordinal Multinomial Regression and Generalized Linear Model, the PROBABILITY function is supported when the target variable is binary.

• For nearest neighbor models without a target variable, the available functions are NEIGHBOR and DISTANCE.

Related Topics

Transformation Expressions
Numeric Expressions
String Expressions
Logical Expressions
Missing Values


Missing Values

Functions and simple arithmetic expressions treat missing values in different ways. In the expression

(var1+var2+var3)/3

the result is missing if a case has a missing value for any of the three variables.

In the expression

MEAN(var1, var2, var3)

the result is missing only if the case has missing values for all three variables.

For statistical functions, you can specify the minimum number of arguments that must have nonmissing values. To do so, type a period and the minimum number after the function name, as in:

MEAN.2(var1, var2, var3)

The following sections contain more information on the treatment of missing values in functions and transformation expressions, including special missing value functions.

• Treatment of Missing Values in Arguments

• Missing Values in Numeric Expressions

• Missing Values in String Expressions

• Missing Values in Logical Expressions

• Missing Value Functions

Related Topics

Transformation Expressions
Numeric Expressions
String Expressions
Logical Expressions
Scoring Expressions (PASW Statistics Server)
MISSING VALUES
Treatment of Missing Values in Arguments
Missing Values in Numeric Expressions
Missing Values in String Expressions
Missing Values in Logical Expressions
Missing Value Functions


Treatment of Missing Values in Arguments

transformation expressions,transformation expressions,transformation expressions
missing values,missing values,missing values
missing values,missing values,missing values
in transformation expressions,in transformation expressions,in transformation expressions

If the logic of an expression is indeterminate because of missing values, the expression returns a missing value and the command is not executed. The following table summarizes how missing values are handled in arguments to various functions.

Missing values in arguments
Function Returns system-missing if

MOD (x1,x2)

x1 is missing, or x2 is missing and x1 is not 0.

MAX.n (x1,x2,...xk)

MEAN.n (x1,x2,...xk)

MIN.n (x1,x2,...x1)

SUM.n (x1,x2,...xk)

Fewer than n arguments are valid; the default n is 1.

CFVAR.n (x1,x2,...xk)

SD.n (x1,x2,...xk)

VARIANCE.n (x1,x2,...xk)

Fewer than n arguments are valid; the default n is 2.

LPAD(x1,x2,x3)

LTRIM(x1,x2)

RTRIM(x1,x2)

RPAD(x1,x2,x3)

x1 or x2 is illegal or missing.

SUBSTR(x1,x2,x3)

x2 or x3 is illegal or missing.

NUMBER(x,format)

STRING(x,format)

The conversion is invalid.

INDEX(x1,x2,x3)

RINDEX(x1,x2,x3)

x3 is invalid or missing.

LAG (x,n)

x is missing n cases previously (and always for the first n cases); the default n is 1.

ANY (x,x1,x2,...xk)

For numeric values, if x is missing or all the remaining arguments are missing, the result is system-missing. For string values, user-missing value are treated as valid values, and the result is never missing.

RANGE (x,x1,x2,...xk1,xk2)

For numeric values, the result is system-missing if:

• x is missing, or

• all the ranges defined by the remaining arguments are missing, or

• any range has a starting value that is higher than the ending value.

A numeric range is missing if either of the arguments that define the range is missing. This includes ranges for which one of the arguments is equal to the value of the first argument in the expression. For example: RANGE(x, x1, x2) is missing if any of the arguments is missing, even if x1 or x2 is equal to x.

For string values, user-missing values are treated as valid values, and the result is only missing if any range has a starting value that is higher than the ending value.

VALUE (x)

x is system-missing.

MISSING (x)

NMISS (x1,x2,...xk)

NVALID (x1,x2,...xk)

SYSMIS (x)

Never.

• Any function that is not listed in this table returns the system-missing value when the argument is missing.

• The system-missing value is a displayed as a period (.) for numeric variables.

• String variables do not have system-missing values. An invalid string expression nested within a complex transformation yields a null string, which is passed to the next level of operation and treated as missing. However, an invalid string expression that is not nested is displayed as a blank string and is not treated as missing.

Related Topics

Missing Values
Missing Values in Numeric Expressions
Missing Values in String Expressions
Missing Values in Logical Expressions
Missing Value Functions


Missing Values in Numeric Expressions

numeric expressions,numeric expressions,numeric expressions
missing values,missing values,missing values
missing values,missing values,missing values
in numeric expressions,in numeric expressions,in numeric expressions

• Most numeric expressions receive the system-missing value when any one of the values in the expression is missing.

• Some arithmetic operations involving 0 can be evaluated even when the variables have missing values. These operations are:

Expression | Result
0 * missing | 0
0 / missing | 0
MOD(0,missing) | 0

• The .n suffix can be used with the statistical functions SUM, MEAN, MIN, MAX, SD, VARIANCE, and CFVAR to specify the number of valid arguments that you consider acceptable. The default of n is 2 for SD, VARIANCE, and CFVAR, and 1 for other statistical functions. For example,

COMPUTE FACTOR = SUM.2(SCORE1 TO SCORE3).

computes the variable FACTOR only if a case has valid information for at least two scores. FACTOR is assigned the system-missing value if a case has valid values for fewer than two scores. If the number specified exceeds the number of arguments in the function, the result is system-missing.

Related Topics

Numeric Expressions
Arithmetic Operations
Numeric Constants
Complex Numeric Arguments
Domain Errors
Numeric Functions
Arithmetic Functions
Statistical Functions
Random Variable and Distribution Functions
String/Numeric Conversion Functions
Treatment of Missing Values in Arguments
Missing Values in String Expressions
Missing Values in Logical Expressions
Missing Value Functions


Missing Values in String Expressions

padding strings,padding strings,padding strings
indexing strings,indexing strings,indexing strings
substrings,substrings,substrings
missing values,missing values,missing values
string expressions,string expressions,string expressions

• If the numeric argument (which can be an expression) for the functions LPAD and RPAD is illegal or missing, the result is a null string. If the padding or trimming is the only operation, the string is then padded to its entire length with blanks. If the operation is nested, the null string is passed to the next nested level.

• If a numeric argument to SUBSTR is illegal or missing, the result is a null string. If SUBSTR is the only operation, the string is blank. If the operation is nested, the null string is passed to the next nested level.

• If a numeric argument to INDEX or RINDEX is illegal or missing, the result is system-missing.

Related Topics

String Expressions
String Functions
String/Numeric Conversion Functions
Treatment of Missing Values in Arguments
Missing Values in Numeric Expressions
Missing Values in Logical Expressions
Missing Value Functions


Missing Values in Logical Expressions

logical expressions,logical expressions,logical expressions
missing values,missing values,missing values
missing values,missing values,missing values
in logical expressions,in logical expressions,in logical expressions

In a simple relation, the logic is indeterminate if the expression on either side of the relational operator is missing. When two or more relations are joined by logical operators AND and OR, a missing value is always returned if all of the relations in the expression are missing. However, if any one of the relations can be determined, PASW Statistics tries to return true or false according to the logical outcomes. See the topic AND and OR Logical Operators for more information.

• When two relations are joined with the AND operator, the logical expression can never be true if one of the relations is indeterminate. The expression can, however, be false.

• When two relations are joined with the OR operator, the logical expression can never be false if one relation returns missing. The expression, however, can be true.

Related Topics

Logical Expressions
String Variables in Logical Expressions
Relational Operators
NOT Logical Operator
AND and OR Logical Operators
Order of Evaluation
Logical Functions
Treatment of Missing Values in Arguments
Missing Values in Numeric Expressions
Missing Values in String Expressions
Missing Value Functions


Missing Value Functions

• Each argument to a missing-value function (expression, variable name, or constant) must be separated by a comma.

missing values,missing values,missing values
functions,functions,functions
missing values,missing values,missing values
VALUE function,VALUE function,VALUE function
VALUE (function),VALUE (function),VALUE (function)
SYSMIS (function),SYSMIS (function),SYSMIS (function)
NMISS (function),NMISS (function),NMISS (function)
NVALID (function),NVALID (function),NVALID (function)
MISSING (function),MISSING (function),MISSING (function)
functions,functions,functions
missing values,missing values,missing values

• With the exception of the MISSING function, only numeric values can be used as arguments in missing-value functions.

• The keyword TO can be used to refer to a set of variables in the argument list for functions NMISS and NVALID.

• The functions MISSING and SYSMIS are logical functions and can be useful shortcuts to more complicated specifications on the IF, DO IF, and other conditional commands.

missing values,missing values,missing values
SYSMIS function,SYSMIS function,SYSMIS function
missing values,missing values,missing values
NMISS function,NMISS function,NMISS function

VALUE. VALUE(variable). Numeric or string. Returns the value of variable, ignoring user missing-value definitions for variable, which must be a variable name or a vector reference to a variable name.

MISSING. MISSING(variable). Logical. Returns 1 or true if variable has a system- or user-missing value. The argument should be a variable name in the active dataset.

SYSMIS. SYSMIS(numvar). Logical. Returns 1 or true if the value of numvar is system-missing. The argument numvar must be the name of a numeric variable in the active dataset.

NMISS. NMISS(variable[,..]). Numeric. Returns a count of the arguments that have system- and user-missing values. This function requires one or more arguments, which should be variable names in the active dataset.

NVALID. NVALID(variable[,..]). Numeric. Returns a count of the arguments that have valid, nonmissing values. This function requires one or more arguments, which should be variable names in the active dataset.

Related Topics

Missing Values
Treatment of Missing Values in Arguments
Missing Values in Numeric Expressions
Missing Values in String Expressions
Missing Values in Logical Expressions


2SLS

Two-Stage Least-Squares Regression,Two-Stage Least-Squares Regression,Two-Stage Least-Squares Regression
command syntax,command syntax,command syntax
2SLS (command),2SLS (command),2SLS (command)
2SLS (command),2SLS (command),2SLS (command)
syntax chart,syntax chart,syntax chart

2SLS is available in the Regression option.

2SLS [EQUATION=]dependent variable WITH predictor variable

 [/[EQUATION=]dependent variable...]

  /INSTRUMENTS=varlist

 [/ENDOGENOUS=varlist]

 [/{CONSTANT**}
   {NOCONSTANT}

 [/PRINT=COV]

 [/SAVE = [PRED] [RESID]]

 [/APPLY[='model name']]

**Default if the subcommand or keyword is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See 2SLS Algorithms for computational details for this procedure.

Syntax for the 2SLS command can be generated from the Two-Stage Least-Squares Regression dialog.

Example

2SLS VAR01 WITH VAR02 VAR03
  /INSTRUMENTS VAR03 LAGVAR01.

Related Topics

Overview (2SLS command)
Examples (2SLS command)
EQUATION Subcommand (2SLS command)
INSTRUMENTS Subcommand (2SLS command)
ENDOGENOUS Subcommand (2SLS command)
CONSTANT and NOCONSTANT Subcommands (2SLS command)
SAVE Subcommand (2SLS command)
PRINT Subcommand (2SLS command)
APPLY Subcommand (2SLS command)
MODEL NAME
READ MODEL
SAVE MODEL
TDISPLAY


Overview (2SLS command)

2SLS performs two-stage least-squares regression to produce consistent estimates of parameters when one or more predictor variables might be correlated with the disturbance. This situation typically occurs when your model consists of a system of simultaneous equations wherein endogenous variables are specified as predictors in one or more of the equations. The two-stage least-squares technique uses instrumental variables to produce regressors that are not contemporaneously correlated with the disturbance. Parameters of a single equation or a set of simultaneous equations can be estimated.

Options Collapse Hide details

Options

New Variables. You can change NEWVAR settings on the TSET command prior to 2SLS to evaluate the regression statistics without saving the values of predicted and residual variables, or you can save the new values to replace the values that were saved earlier, or you can save the new values without erasing values that were saved earlier (see the TSET command). You can also use the SAVE subcommand on 2SLS to override the NONE or the default CURRENT settings on NEWVAR.

Covariance Matrix. You can obtain the covariance matrix of the parameter estimates in addition to all of the other output by specifying PRINT=DETAILED on the TSET command prior to 2SLS. You can also use the PRINT subcommand to obtain the covariance matrix, regardless of the setting on PRINT.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is at least one EQUATION subcommand and one INSTRUMENTS subcommand.

• For each specified equation, 2SLS estimates and displays the regression analysis-of-variance table, regression standard error, mean of the residuals, parameter estimates, standard errors of the parameter estimates, standardized parameter estimates, t statistic significance tests and probability levels for the parameter estimates, tolerance of the variables, and correlation matrix of the parameter estimates.

• If the setting on NEWVAR is either ALL or the default CURRENT, two new variables containing the predicted and residual values are automatically created for each equation. The variables are labeled and added to the active dataset.

Subcommand Order Collapse Hide details

Subcommand Order

• Subcommands can be specified in any order.

Syntax Rules Collapse Hide details

Syntax Rules

• The INSTRUMENTS subcommand must specify at least as many variables as are specified after WITH on the longest EQUATION subcommand.

• If a subcommand is specified more than once, the effect is cumulative (except for the APPLY subcommand, which executes only the last occurrence).

Operations Collapse Hide details

Operations

• 2SLS cannot produce forecasts beyond the length of any regressor series.

• 2SLS honors the WEIGHT command.

• 2SLS uses listwise deletion of missing data. Whenever a variable is missing a value for a particular observation, that observation will not be used in any of the computations.

Related Topics

2SLS
Examples (2SLS command)
EQUATION Subcommand (2SLS command)
INSTRUMENTS Subcommand (2SLS command)
ENDOGENOUS Subcommand (2SLS command)
CONSTANT and NOCONSTANT Subcommands (2SLS command)
SAVE Subcommand (2SLS command)
PRINT Subcommand (2SLS command)
APPLY Subcommand (2SLS command)


Examples (2SLS command)

* 2-Stage Least Squares.
TSET NEWVAR=NONE .
2SLS buyoff  WITH buycd buybk offer_type1 offer_type2
  /INSTRUMENTS offer_type1 offer_type2 lndisccd lndiscbk buycd_1 buybk_1
  /CONSTANT .

• The procedure fits a model for buyoff using buycd, buyck, offer_type1, and offer_type2 as explanatory variables.

• The INSTRUMENTS subcommand specifies that offer_type1, offer_type2, lndisccd, lndiscbk, buycd_1, and buybk_1 are used as instrument variables to predict buycd and buybk.

• All other options are set to their default values.

For discussion of output from this syntax and to place the example in context, see Using Two-Stage Least-Squares Regression to Model Cross-Sales.

Related Topics

2SLS
Overview (2SLS command)
EQUATION Subcommand (2SLS command)
INSTRUMENTS Subcommand (2SLS command)
ENDOGENOUS Subcommand (2SLS command)
CONSTANT and NOCONSTANT Subcommands (2SLS command)
SAVE Subcommand (2SLS command)
PRINT Subcommand (2SLS command)
APPLY Subcommand (2SLS command)


EQUATION Subcommand (2SLS command)

EQUATION (subcommand),EQUATION (subcommand),EQUATION (subcommand)
2SLS command,2SLS command,2SLS command
2SLS (command),2SLS (command),2SLS (command)
EQUATION subcommand,EQUATION subcommand,EQUATION subcommand

EQUATION specifies the structural equations for the model and is required. The actual keyword EQUATION is optional.

• An equation specifies a single dependent variable, followed by keyword WITH and one or more predictor variables.

• You can specify more than one equation. Multiple equations are separated by slashes.

Example

2SLS EQUATION=Y1 WITH X1 X2
  /INSTRUMENTS=X1 LAGX2 X3.

• In this example, Y1 is the dependent variable, and X1 and X2 are the predictors. The instruments that are used to predict the X2 values are X1, LAGX2, and X3.

Related Topics

2SLS
Overview (2SLS command)
Examples (2SLS command)
INSTRUMENTS Subcommand (2SLS command)
ENDOGENOUS Subcommand (2SLS command)
CONSTANT and NOCONSTANT Subcommands (2SLS command)
SAVE Subcommand (2SLS command)
PRINT Subcommand (2SLS command)
APPLY Subcommand (2SLS command)


INSTRUMENTS Subcommand (2SLS command)

2SLS (command),2SLS (command),2SLS (command)
INSTRUMENTS subcommand,INSTRUMENTS subcommand,INSTRUMENTS subcommand
INSTRUMENTS (subcommand),INSTRUMENTS (subcommand),INSTRUMENTS (subcommand)
2SLS command,2SLS command,2SLS command
2SLS (command),2SLS (command),2SLS (command)
instrumental variables,instrumental variables,instrumental variables
instrumental variables,instrumental variables,instrumental variables
2SLS command,2SLS command,2SLS command

INSTRUMENTS specifies the instrumental variables. These variables are used to compute predicted values for the endogenous variables in the first stage of 2SLS.

• At least one INSTRUMENTS subcommand must be specified.

• If more than one INSTRUMENTS subcommand is specified, the effect is cumulative. All variables that are named on INSTRUMENTS subcommands are used as instruments to predict all the endogenous variables.

• Any variable in the active dataset can be named as an instrument.

• Instrumental variables can be specified on the EQUATION subcommand, but this specification is not required.

• The INSTRUMENTS subcommand must name at least as many variables as are specified after WITH on the longest EQUATION subcommand.

• If all the predictor variables are listed as the only INSTRUMENTS, the results are the same as results from ordinary least-squares regression.

Example

2SLS DEMAND WITH PRICE, INCOME
  /PRICE WITH DEMAND, RAINFALL, LAGPRICE
  /INSTRUMENTS=INCOME, RAINFALL, LAGPRICE.

• The endogenous variables are PRICE and DEMAND.

• The instruments to be used to compute predicted values for the endogenous variables are INCOME, RAINFALL, and LAGPRICE.

Related Topics

2SLS
Overview (2SLS command)
Examples (2SLS command)
EQUATION Subcommand (2SLS command)
ENDOGENOUS Subcommand (2SLS command)
CONSTANT and NOCONSTANT Subcommands (2SLS command)
SAVE Subcommand (2SLS command)
PRINT Subcommand (2SLS command)
APPLY Subcommand (2SLS command)


ENDOGENOUS Subcommand (2SLS command)

2SLS (command),2SLS (command),2SLS (command)
ENDOGENOUS subcommand,ENDOGENOUS subcommand,ENDOGENOUS subcommand
ENDOGENOUS (subcommand),ENDOGENOUS (subcommand),ENDOGENOUS (subcommand)
2SLS command,2SLS command,2SLS command
endogenous variables,endogenous variables,endogenous variables
2SLS command,2SLS command,2SLS command
2SLS (command),2SLS (command),2SLS (command)
endogenous variables,endogenous variables,endogenous variables

All variables that are not specified on the INSTRUMENTS subcommand are used as endogenous variables by 2SLS. The ENDOGENOUS subcommand simply allows you to document what these variables are.

• Computations are not affected by specifications on the ENDOGENOUS subcommand.

Example

2SLS Y1 WITH X1 X2 X3
  /INSTRUMENTS=X2 X4 LAGY1
  /ENDOGENOUS=Y1 X1 X3.

• In this example, the ENDOGENOUS subcommand is specified to document the endogenous variables.

Related Topics

2SLS
Overview (2SLS command)
Examples (2SLS command)
EQUATION Subcommand (2SLS command)
INSTRUMENTS Subcommand (2SLS command)
CONSTANT and NOCONSTANT Subcommands (2SLS command)
SAVE Subcommand (2SLS command)
PRINT Subcommand (2SLS command)
APPLY Subcommand (2SLS command)


CONSTANT and NOCONSTANT Subcommands (2SLS command)

2SLS (command),2SLS (command),2SLS (command)
NOCONSTANT subcommand,NOCONSTANT subcommand,NOCONSTANT subcommand
NOCONSTANT subcommand,NOCONSTANT subcommand,NOCONSTANT subcommand
2SLS command,2SLS command,2SLS command
2SLS (command),2SLS (command),2SLS (command)
CONSTANT subcommand,CONSTANT subcommand,CONSTANT subcommand
CONSTANT (subcommand),CONSTANT (subcommand),CONSTANT (subcommand)
2SLS command,2SLS command,2SLS command
2SLS (command),2SLS (command),2SLS (command)
including constant,including constant,including constant

Specify CONSTANT or NOCONSTANT to indicate whether a constant term should be estimated in the regression equation. The specification of either subcommand overrides the CONSTANT setting on the TSET command for the current procedure.

• CONSTANT is the default and specifies that the constant term is used as an instrument.

• NOCONSTANT eliminates the constant term.

Related Topics

2SLS
Overview (2SLS command)
Examples (2SLS command)
EQUATION Subcommand (2SLS command)
INSTRUMENTS Subcommand (2SLS command)
ENDOGENOUS Subcommand (2SLS command)
SAVE Subcommand (2SLS command)
PRINT Subcommand (2SLS command)
APPLY Subcommand (2SLS command)


SAVE Subcommand (2SLS command)

2SLS (command),2SLS (command),2SLS (command)
SAVE subcommand,SAVE subcommand,SAVE subcommand
SAVE (subcommand),SAVE (subcommand),SAVE (subcommand)
2SLS command,2SLS command,2SLS command

SAVE saves the values of predicted and residual variables that are generated during the current session to the end of the active dataset. The default names FIT_n and ERR_n will be generated, where n increments each time variables are saved for an equation. SAVE overrides the NONE or the default CURRENT setting on NEWVAR for the current procedure.

predicted values,predicted values,predicted values
saving in 2SLS command,saving in 2SLS command,saving in 2SLS command
2SLS (command),2SLS (command),2SLS (command)
saving predicted values,saving predicted values,saving predicted values
2SLS (command),2SLS (command),2SLS (command)
saving residuals,saving residuals,saving residuals
residuals,residuals,residuals
saving in 2SLS command,saving in 2SLS command,saving in 2SLS command
PRED | Save the predicted value. The new variable is named FIT_n, where n increments each time a predicted or residual variable is saved for an equation.
RESSID | Save the residual value. The new variable is named ERR_n, where n increments each time a predicted or residual variable is saved for an equation.

Related Topics

2SLS
Overview (2SLS command)
Examples (2SLS command)
EQUATION Subcommand (2SLS command)
INSTRUMENTS Subcommand (2SLS command)
ENDOGENOUS Subcommand (2SLS command)
CONSTANT and NOCONSTANT Subcommands (2SLS command)
PRINT Subcommand (2SLS command)
APPLY Subcommand (2SLS command)


PRINT Subcommand (2SLS command)

2SLS (command),2SLS (command),2SLS (command)
PRINT subcommand,PRINT subcommand,PRINT subcommand
PRINT (subcommand),PRINT (subcommand),PRINT (subcommand)
2SLS command,2SLS command,2SLS command
covariance matrix,covariance matrix,covariance matrix
2SLS command,2SLS command,2SLS command
2SLS (command),2SLS (command),2SLS (command)
covariance matrix,covariance matrix,covariance matrix

PRINT can be used to produce an additional covariance matrix for each equation. The only specification on this subcommand is keyword COV. The PRINT subcommand overrides the PRINT setting on the TSET command for the current procedure.

Related Topics

2SLS
Overview (2SLS command)
Examples (2SLS command)
EQUATION Subcommand (2SLS command)
INSTRUMENTS Subcommand (2SLS command)
ENDOGENOUS Subcommand (2SLS command)
CONSTANT and NOCONSTANT Subcommands (2SLS command)
SAVE Subcommand (2SLS command)
APPLY Subcommand (2SLS command)


APPLY Subcommand (2SLS command)

2SLS (command),2SLS (command),2SLS (command)
APPLY subcommand,APPLY subcommand,APPLY subcommand
APPLY (subcommand),APPLY (subcommand),APPLY (subcommand)
2SLS command,2SLS command,2SLS command
2SLS (command),2SLS (command),2SLS (command)
using a previous model,using a previous model,using a previous model

APPLY allows you to use a previously defined 2SLS model without having to repeat the specifications.

• The only specification on APPLY is the name of a previous model. If a model name is not specified, the model that was specified on the previous 2SLS command is used.

• To change the series that are used with the model, enter new series names before or after the APPLY subcommand.

• To change one or more model specifications, specify the subcommands of only those portions that you want to change after the APPLY subcommand.

• If no series are specified on the command, the series that were originally specified with the model that is being reapplied are used.

Example

2SLS Y1 WITH X1 X2 / X1 WITH Y1 X2
  /INSTRUMENTS=X2 X3.
2SLS APPLY
  /INSTRUMENTS=X2 X3 LAGX1.

• In this example, the first command requests 2SLS using X2 and X3 as instruments.

• The second command specifies the same equations but changes the instruments to X2, X3, and LAGX1.

Related Topics

2SLS
Overview (2SLS command)
Examples (2SLS command)
EQUATION Subcommand (2SLS command)
INSTRUMENTS Subcommand (2SLS command)
ENDOGENOUS Subcommand (2SLS command)
CONSTANT and NOCONSTANT Subcommands (2SLS command)
SAVE Subcommand (2SLS command)
PRINT Subcommand (2SLS command)


ACF

ACF (command),ACF (command),ACF (command)
ACF (command),ACF (command),ACF (command)
syntax chart,syntax chart,syntax chart
autocorrelation,autocorrelation,autocorrelation
command syntax,command syntax,command syntax
partial autocorrelations,partial autocorrelations,partial autocorrelations

ACF is available in the Statistics Base option.

ACF VARIABLES= series names

 [/DIFF={1}]
        {n}

 [/SDIFF={1}]
         {n}

 [/PERIOD=n]

 [/{NOLOG**}]
   {LN     }

 [/SEASONAL]

 [/MXAUTO={16**}]
          {n   }

 [/SERROR={IND**}]
          {MA   }

 [/PACF]

 [/APPLY [='model name']]

**Default if the subcommand is omitted and there is no corresponding specification on the TSET command.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See ACF/PACF Algorithms for computational details for this procedure.

Syntax for the ACF command can be generated from the Autocorrelations dialog.

Example

ACF TICKETS.

Related Topics

Overview (ACF command)
Example (ACF command)
VARIABLES Subcommand (ACF command)
DIFF Subcommand (ACF command)
SDIFF Subcommand (ACF command)
PERIOD Subcommand (ACF command)
LN and NOLOG Subcommands (ACF command)
SEASONAL Subcommand (ACF command)
MXAUTO Subcommand (ACF command)
SERROR Subcommand (ACF command)
PACF Subcommand (ACF command)
APPLY Subcommand (ACF command)
References (ACF command)
MODEL NAME
READ MODEL
SAVE MODEL
TDISPLAY


Overview (ACF command)

Box-Ljung statistic,Box-Ljung statistic,Box-Ljung statistic
ACF command,ACF command,ACF command

ACF displays and plots the sample autocorrelation function of one or more time series. You can also display and plot the autocorrelations of transformed series by requesting natural log and differencing transformations within the procedure.

Options Collapse Hide details

Options

Modifying the Series. You can request a natural log transformation of the series using the LN subcommand and seasonal and nonseasonal differencing to any degree using the SDIFF and DIFF subcommands. With seasonal differencing, you can specify the periodicity on the PERIOD subcommand.

Statistical Output. With the MXAUTO subcommand, you can specify the number of lags for which you want autocorrelations to be displayed and plotted, overriding the maximum specified on TSET. You can also display and plot values at periodic lags only using the SEASONAL subcommand. In addition to autocorrelations, you can display and plot partial autocorrelations using the PACF subcommand.

Method of Calculating Standard Errors. You can specify one of two methods of calculating the standard errors for the autocorrelations on the SERROR subcommand.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is one or more series names.

• For each series specified, ACF automatically displays the autocorrelation value, standard error, Box-Ljung statistic, and probability for each lag.

• ACF plots the autocorrelations and marks the bounds of two standard errors on the plot. By default, ACF displays and plots autocorrelations for up to 16 lags or the number of lags specified on TSET.

• If a method has not been specified on TSET, the default method of calculating the standard error (IND) assumes that the process is white noise.

Subcommand Order Collapse Hide details

Subcommand Order

• Subcommands can be specified in any order.

Syntax Rules Collapse Hide details

Syntax Rules

• VARIABLES can be specified only once.

• Other subcommands can be specified more than once, but only the last specification of each one is executed.

Operations Collapse Hide details

Operations

• Subcommand specifications apply to all series named on the ACF command.

• If the LN subcommand is specified, any differencing requested on that ACF command is done on the log-transformed series.

• Confidence limits are displayed in the plot, marking the bounds of two standard errors at each lag.

Limitations Collapse Hide details

Limitations

• A maximum of one VARIABLES subcommand. There is no limit on the number of series named on the list.

Related Topics

ACF
Example (ACF command)
VARIABLES Subcommand (ACF command)
DIFF Subcommand (ACF command)
SDIFF Subcommand (ACF command)
PERIOD Subcommand (ACF command)
LN and NOLOG Subcommands (ACF command)
SEASONAL Subcommand (ACF command)
MXAUTO Subcommand (ACF command)
SERROR Subcommand (ACF command)
PACF Subcommand (ACF command)
APPLY Subcommand (ACF command)
References (ACF command)


Example (ACF command)

ACF VARIABLES = TICKETS
  /LN
  /DIFF=1
  /SDIFF=1
  /PER=12
  /MXAUTO=50.

• This example produces a plot of the autocorrelation function for the series TICKETS after a natural log transformation, differencing, and seasonal differencing have been applied. Along with the plot, the autocorrelation value, standard error, Box-Ljung statistic, and probability are displayed for each lag.

• LN transforms the data using the natural logarithm (base e) of the series.

• DIFF differences the series once.

• SDIFF and PERIOD apply one degree of seasonal differencing with a period of 12.

• MXAUTO specifies that the maximum number of lags for which output is to be produced is 50.

Related Topics

ACF
Overview (ACF command)
VARIABLES Subcommand (ACF command)
DIFF Subcommand (ACF command)
SDIFF Subcommand (ACF command)
PERIOD Subcommand (ACF command)
LN and NOLOG Subcommands (ACF command)
SEASONAL Subcommand (ACF command)
MXAUTO Subcommand (ACF command)
SERROR Subcommand (ACF command)
PACF Subcommand (ACF command)
APPLY Subcommand (ACF command)
References (ACF command)


VARIABLES Subcommand (ACF command)

ACF (command),ACF (command),ACF (command)
VARIABLES subcommand,VARIABLES subcommand,VARIABLES subcommand
VARIABLES (subcommand),VARIABLES (subcommand),VARIABLES (subcommand)
ACF command,ACF command,ACF command

VARIABLES specifies the series names and is the only required subcommand.

Related Topics

ACF
Overview (ACF command)
Example (ACF command)
DIFF Subcommand (ACF command)
SDIFF Subcommand (ACF command)
PERIOD Subcommand (ACF command)
LN and NOLOG Subcommands (ACF command)
SEASONAL Subcommand (ACF command)
MXAUTO Subcommand (ACF command)
SERROR Subcommand (ACF command)
PACF Subcommand (ACF command)
APPLY Subcommand (ACF command)
References (ACF command)


DIFF Subcommand (ACF command)

ACF (command),ACF (command),ACF (command)
DIFF subcommand,DIFF subcommand,DIFF subcommand
DIFF (subcommand),DIFF (subcommand),DIFF (subcommand)
ACF command,ACF command,ACF command
ACF (command),ACF (command),ACF (command)
transforming values,transforming values,transforming values
difference transformation,difference transformation,difference transformation
ACF command,ACF command,ACF command

DIFF specifies the degree of differencing used to convert a nonstationary series to a stationary one with a constant mean and variance before the autocorrelations are computed.

• You can specify 0 or any positive integer on DIFF.

• If DIFF is specified without a value, the default is 1.

• The number of values used in the calculations decreases by 1 for each degree−1 of differencing.

Example

ACF VARIABLES = SALES
  /DIFF=1.

• In this example, the series SALES will be differenced once before the autocorrelations are computed and plotted.

Related Topics

ACF
Overview (ACF command)
Example (ACF command)
VARIABLES Subcommand (ACF command)
SDIFF Subcommand (ACF command)
PERIOD Subcommand (ACF command)
LN and NOLOG Subcommands (ACF command)
SEASONAL Subcommand (ACF command)
MXAUTO Subcommand (ACF command)
SERROR Subcommand (ACF command)
PACF Subcommand (ACF command)
APPLY Subcommand (ACF command)
References (ACF command)


SDIFF Subcommand (ACF command)

ACF (command),ACF (command),ACF (command)
SDIFF subcommand,SDIFF subcommand,SDIFF subcommand
SDIFF (subcommand),SDIFF (subcommand),SDIFF (subcommand)
ACF command,ACF command,ACF command
seasonal difference transformation,seasonal difference transformation,seasonal difference transformation
ACF command,ACF command,ACF command

If the series exhibits a seasonal or periodic pattern, you can use the SDIFF subcommand to seasonally difference the series before obtaining autocorrelations.

• The specification on SDIFF indicates the degree of seasonal differencing and can be 0 or any positive integer.

• If SDIFF is specified without a value, the degree of seasonal differencing defaults to 1.

• The number of seasons used in the calculations decreases by 1 for each degree of seasonal differencing.

• The length of the period used by SDIFF is specified on the PERIOD subcommand. If the PERIOD subcommand is not specified, the periodicity established on the TSET or DATE command is used (see the PERIOD subcommand).

Related Topics

ACF
Overview (ACF command)
Example (ACF command)
VARIABLES Subcommand (ACF command)
DIFF Subcommand (ACF command)
PERIOD Subcommand (ACF command)
LN and NOLOG Subcommands (ACF command)
SEASONAL Subcommand (ACF command)
MXAUTO Subcommand (ACF command)
SERROR Subcommand (ACF command)
PACF Subcommand (ACF command)
APPLY Subcommand (ACF command)
References (ACF command)


PERIOD Subcommand (ACF command)

ACF (command),ACF (command),ACF (command)
PERIOD subcommand,PERIOD subcommand,PERIOD subcommand
PERIOD (subcommand),PERIOD (subcommand),PERIOD (subcommand)
ACF command,ACF command,ACF command
periodicity,periodicity,periodicity
ACF command,ACF command,ACF command
ACF (command),ACF (command),ACF (command)
specifying periodicity,specifying periodicity,specifying periodicity

PERIOD indicates the length of the period to be used by the SDIFF or SEASONAL subcommands.

• The specification on PERIOD indicates how many observations are in one period or season and can be any positive integer greater than 1.

• The PERIOD subcommand is ignored if it is used without the SDIFF or SEASONAL subcommands.

• If PERIOD is not specified, the periodicity established on TSET PERIOD is in effect. If TSET PERIOD is not specified, the periodicity established on the DATE command is used. If periodicity was not established anywhere, the SDIFF and SEASONAL subcommands will not be executed.

Example

ACF VARIABLES = SALES
  /SDIFF=1M
  /PERIOD=12.

• This command applies one degree of seasonal differencing with a periodicity (season) of 12 to the series SALES before autocorrelations are computed.

Related Topics

ACF
Overview (ACF command)
Example (ACF command)
VARIABLES Subcommand (ACF command)
DIFF Subcommand (ACF command)
SDIFF Subcommand (ACF command)
LN and NOLOG Subcommands (ACF command)
SEASONAL Subcommand (ACF command)
MXAUTO Subcommand (ACF command)
SERROR Subcommand (ACF command)
PACF Subcommand (ACF command)
APPLY Subcommand (ACF command)
References (ACF command)


LN and NOLOG Subcommands (ACF command)

ACF (command),ACF (command),ACF (command)
LN/NOLOG subcommands,LN/NOLOG subcommands,LN/NOLOG subcommands
LN (subcommand),LN (subcommand),LN (subcommand)
ACF command,ACF command,ACF command
NOLOG (subcommand),NOLOG (subcommand),NOLOG (subcommand)
ACF command,ACF command,ACF command
natural log transformation,natural log transformation,natural log transformation
ACF command,ACF command,ACF command

LN transforms the data using the natural logarithm (base e) of the series and is used to remove varying amplitude over time. NOLOG indicates that the data should not be log transformed. NOLOG is the default.

• If you specify LN on an ACF command, any differencing requested on that command will be done on the log-transformed series.

• There are no additional specifications on LN or NOLOG.

• Only the last LN or NOLOG subcommand on an ACF command is executed.

• If a natural log transformation is requested when there are values in the series that are less than or equal to zero, the ACF will not be produced for that series because nonpositive values cannot be log transformed.

• NOLOG is generally used with an APPLY subcommand to turn off a previous LN specification.

Example

ACF VARIABLES = SALES
  /LN.

• This command transforms the series SALES using the natural log transformation and then computes and plots autocorrelations.

Related Topics

ACF
Overview (ACF command)
Example (ACF command)
VARIABLES Subcommand (ACF command)
DIFF Subcommand (ACF command)
SDIFF Subcommand (ACF command)
PERIOD Subcommand (ACF command)
SEASONAL Subcommand (ACF command)
MXAUTO Subcommand (ACF command)
SERROR Subcommand (ACF command)
PACF Subcommand (ACF command)
APPLY Subcommand (ACF command)
References (ACF command)


SEASONAL Subcommand (ACF command)

ACF (command),ACF (command),ACF (command)
SEASONAL subcommand,SEASONAL subcommand,SEASONAL subcommand
SEASONAL (subcommand),SEASONAL (subcommand),SEASONAL (subcommand)
ACF command,ACF command,ACF command
ACF (command),ACF (command),ACF (command)
periodic lags,periodic lags,periodic lags

Use the SEASONAL subcommand to focus attention on the seasonal component by displaying and plotting autocorrelations at periodic lags only.

• There are no additional specifications on SEASONAL.

• If SEASONAL is specified, values are displayed and plotted at the periodic lags indicated on the PERIOD subcommand. If PERIOD is not specified, the periodicity established on the TSET or DATE command is used (see the PERIOD subcommand).

• If SEASONAL is not specified, autocorrelations for all lags up to the maximum are displayed and plotted.

Example

ACF VARIABLES = SALES
  /SEASONAL
  /PERIOD=12.

• In this example, autocorrelations are displayed only at every 12th lag.

Related Topics

ACF
Overview (ACF command)
Example (ACF command)
VARIABLES Subcommand (ACF command)
DIFF Subcommand (ACF command)
SDIFF Subcommand (ACF command)
PERIOD Subcommand (ACF command)
LN and NOLOG Subcommands (ACF command)
MXAUTO Subcommand (ACF command)
SERROR Subcommand (ACF command)
PACF Subcommand (ACF command)
APPLY Subcommand (ACF command)
References (ACF command)


MXAUTO Subcommand (ACF command)

ACF (command),ACF (command),ACF (command)
MXAUTO subcommand,MXAUTO subcommand,MXAUTO subcommand
MXAUTO (subcommand),MXAUTO (subcommand),MXAUTO (subcommand)
ACF command,ACF command,ACF command

MXAUTO specifies the maximum number of lags for a series.

• The specification on MXAUTO must be a positive integer.

• If MXAUTO is not specified, the default number of lags is the value set on TSET MXAUTO. If TSET MXAUTO is not specified, the default is 16.

• The value on MXAUTO overrides the value set on TSET MXAUTO.

Example

ACF VARIABLES = SALES
  /MXAUTO=14.

• This command sets the maximum number of autocorrelations to be displayed for the series SALES to 14.

Related Topics

ACF
Overview (ACF command)
Example (ACF command)
VARIABLES Subcommand (ACF command)
DIFF Subcommand (ACF command)
SDIFF Subcommand (ACF command)
PERIOD Subcommand (ACF command)
LN and NOLOG Subcommands (ACF command)
SEASONAL Subcommand (ACF command)
SERROR Subcommand (ACF command)
PACF Subcommand (ACF command)
APPLY Subcommand (ACF command)
References (ACF command)


SERROR Subcommand (ACF command)

ACF (command),ACF (command),ACF (command)
SERROR subcommand,SERROR subcommand,SERROR subcommand
SERROR (subcommand),SERROR (subcommand),SERROR (subcommand)
ACF command,ACF command,ACF command
ACF (command),ACF (command),ACF (command)
standard error method,standard error method,standard error method

SERROR specifies the method of calculating the standard errors for the autocorrelations.

• You must specify either the keyword IND or MA on SERROR.

• The method specified on SERROR overrides the method specified on the TSET ACFSE command.

• If SERROR is not specified, the method indicated on TSET ACFSE is used. If TSET ACFSE is not specified, the default is IND.

independence model,independence model,independence model
ACF command,ACF command,ACF command
Bartlett's approximation,Bartlett's approximation,Bartlett's approximation
ACF command,ACF command,ACF command
IND | Independence model. The method of calculating the standard errors assumes that the underlying process is white noise.
MA | MA model. The method of calculating the standard errors is based on Bartlett’s approximation. With this method, appropriate where the true MA order of the process is k–1, standard errors grow at increased lags (Pankratz, 1983).

Example

ACF VARIABLES = SALES
  /SERROR=MA.

• In this example, the standard errors of the autocorrelations are computed using the MA method.

Related Topics

ACF
Overview (ACF command)
Example (ACF command)
VARIABLES Subcommand (ACF command)
DIFF Subcommand (ACF command)
SDIFF Subcommand (ACF command)
PERIOD Subcommand (ACF command)
LN and NOLOG Subcommands (ACF command)
SEASONAL Subcommand (ACF command)
MXAUTO Subcommand (ACF command)
PACF Subcommand (ACF command)
APPLY Subcommand (ACF command)
References (ACF command)


PACF Subcommand (ACF command)

ACF (command),ACF (command),ACF (command)
PACF subcommand,PACF subcommand,PACF subcommand
PACF (subcommand),PACF (subcommand),PACF (subcommand)
ACF command,ACF command,ACF command
ACF (command),ACF (command),ACF (command)
partial autocorrelation,partial autocorrelation,partial autocorrelation

Use the PACF subcommand to display and plot sample partial autocorrelations as well as autocorrelations for each series named on the ACF command.

• There are no additional specifications on PACF.

• PACF also displays the standard errors of the partial autocorrelations and indicates the bounds of two standard errors on the plot.

• With the exception of SERROR, all other subcommands specified on that ACF command apply to both the partial autocorrelations and the autocorrelations.

Example

ACF VARIABLES = SALES
  /DIFFERENCE=1
  /PACF.

• This command requests both autocorrelations and partial autocorrelations for the series SALES after it has been differenced once.

Related Topics

ACF
Overview (ACF command)
Example (ACF command)
VARIABLES Subcommand (ACF command)
DIFF Subcommand (ACF command)
SDIFF Subcommand (ACF command)
PERIOD Subcommand (ACF command)
LN and NOLOG Subcommands (ACF command)
SEASONAL Subcommand (ACF command)
MXAUTO Subcommand (ACF command)
SERROR Subcommand (ACF command)
APPLY Subcommand (ACF command)
References (ACF command)


APPLY Subcommand (ACF command)

ACF (command),ACF (command),ACF (command)
APPLY subcommand,APPLY subcommand,APPLY subcommand
APPLY (subcommand),APPLY (subcommand),APPLY (subcommand)
ACF command,ACF command,ACF command
ACF (command),ACF (command),ACF (command)
using a previously defined model,using a previously defined model,using a previously defined model

APPLY allows you to use a previously defined ACF model without having to repeat the specifications.

• The only specification on APPLY is the name of a previous model in quotation marks. If a model name is not specified, the model specified on the previous ACF command is used.

• To change one or more model specifications, specify the subcommands of only those portions you want to change after the APPLY subcommand.

• If no series are specified on the ACF command, the series that were originally specified with the model being reapplied are used.

• To change the series used with the model, enter new series names before or after the APPLY subcommand.

Example

ACF VARIABLES = TICKETS
  /LN
  /DIFF=1
  /SDIFF=1
  /PERIOD=12
  /MXAUTO=50.
ACF VARIABLES = ROUNDTRP
  /APPLY.
ACF APPLY
  /NOLOG.
ACF APPLY 'MOD_2'
  /PERIOD=6.

• The first command requests a maximum of 50 autocorrelations for the series TICKETS after a natural log transformation, differencing, and one degree of seasonal differencing with a periodicity of 12 have been applied. This model is assigned the default name MOD_1.

• The second command displays and plots the autocorrelation function for the series ROUNDTRP using the same model that was used for the series TICKETS. This model is assigned the name MOD_2.

• The third command requests another autocorrelation function of the series ROUNDTRP using the same model but without the natural log transformation. Note that when APPLY is the first specification after the ACF command, the slash (/) before it is not necessary. This model is assigned the name MOD_3.

• The fourth command reapplies MOD_2, autocorrelations for the series ROUNDTRP with the natural log and differencing specifications, but this time with a periodicity of 6. This model is assigned the name MOD_4. It differs from MOD_2 only in the periodicity.

Related Topics

ACF
Overview (ACF command)
Example (ACF command)
VARIABLES Subcommand (ACF command)
DIFF Subcommand (ACF command)
SDIFF Subcommand (ACF command)
PERIOD Subcommand (ACF command)
LN and NOLOG Subcommands (ACF command)
SEASONAL Subcommand (ACF command)
MXAUTO Subcommand (ACF command)
SERROR Subcommand (ACF command)
PACF Subcommand (ACF command)
References (ACF command)


References (ACF command)

Box, G. E. P., and G. M. Jenkins. 1976. Time series analysis: Forecasting and control, Rev. ed. San Francisco: Holden-Day.

Pankratz, A. 1983. Forecasting with univariate Box-Jenkins models: Concepts and cases. New York: John Wiley and Sons.

Related Topics

ACF
Overview (ACF command)
Example (ACF command)
VARIABLES Subcommand (ACF command)
DIFF Subcommand (ACF command)
SDIFF Subcommand (ACF command)
PERIOD Subcommand (ACF command)
LN and NOLOG Subcommands (ACF command)
SEASONAL Subcommand (ACF command)
MXAUTO Subcommand (ACF command)
SERROR Subcommand (ACF command)
PACF Subcommand (ACF command)
APPLY Subcommand (ACF command)


ADD DOCUMENT

ADD DOCUMENT (command),ADD DOCUMENT (command),ADD DOCUMENT (command)
ADD DOCUMENT (command),ADD DOCUMENT (command),ADD DOCUMENT (command)
syntax chart,syntax chart,syntax chart
ADD DOCUMENT
  ’text’
  ’text’.

This command takes effect immediately. It does not read the active dataset or execute pending transformations. See the topic Command Order for more information.

Syntax for the ADD DOCUMENT command can be generated from the Data File Comments dialog.

Example

ADD DOCUMENT
  "This data file is a 10% random sample from the"
  "master data file. It’s seed value is 13254689.".

Related Topics

Overview (ADD DOCUMENT command)
DOCUMENT
DROP DOCUMENTS


Overview (ADD DOCUMENT command)

ADD DOCUMENT saves a block of text of any length in the active dataset. The result is equivalent to the DOCUMENT command. The documentation can be displayed with the DISPLAY DOCUMENT command.

When GET retrieves a data file, or APPLY DICTIONARY is used to apply documents from another data file, or ADD FILES, MATCH FILES, or UPDATE is used to combine data files, all documents from each specified file are copied into the working file. DROP DOCUMENTS can be used to drop those documents from the working file.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is ADD DOCUMENT followed by one or more optional lines of quoted text. The text is stored in the file dictionary when the data file is saved in PASW Statistics format.

Syntax Rules Collapse Hide details

Syntax Rules

• Each line must be enclosed in single or double quotation marks, following the standard rules for quoted strings.

• Each line can be up to 80 bytes long (typically 80 characters in single-byte languages), including the command name but not including the quotation marks used to enclose the text. If any line exceeds 80 bytes, an error will result and the command will not be executed.

• The text can be entered on as many lines as needed.

• Multiple ADD DOCUMENT commands can be specified for the same data file.

Operations Collapse Hide details

Operations

• The text from each ADD DOCUMENT command is appended to the end of the list of documentation, followed by the date in parentheses.

• An ADD DOCUMENT command with no quoted text string appends a date in parentheses to the documentation.

• DISPLAY DOCUMENTS will display all documentation for the data file specified on the ADD DOCUMENT and/or DOCUMENT commands. Documentation is displayed exactly as entered; each line of the ADD DOCUMENT command is displayed as a separate line, and there is no line wrapping.

• DROP DOCUMENTS deletes all documentation created by both ADD DOCUMENT and DOCUMENT.

Example

If the command name and the quoted text string are specified on the same line, the command name counts toward the 80-byte line limit, so it’s a good idea to put the command name on a separate line, as in:

ADD DOCUMENT
  "This is some text that describes this file.".

Example

To insert blank lines between blocks of text, enter a null string, as in:

ADD DOCUMENT
  "This is some text that describes this file."
  ""
  "This is some more text preceded by a blank line.".

Related Topics

ADD DOCUMENT


ADD FILES

ADD FILES (command),ADD FILES (command),ADD FILES (command)
ADD FILES (command),ADD FILES (command),ADD FILES (command)
syntax chart,syntax chart,syntax chart
ADD FILES FILE={'savfile'|'dataset'}
               {*                  }

 [/RENAME=(old varnames=new varnames)...]

 [/IN=varname]

 /FILE=... [/RENAME=...] [/IN=...]

 [/BY varlist]

 [/MAP]

 [/KEEP={ALL**  }] [/DROP=varlist]
        {varlist}

 [/FIRST=varname]  [/LAST=varname]

**Default if the subcommand is omitted.

Syntax for the ADD FILES command can be generated from the Add Cases dialog.

Example

ADD FILES FILE="/data/school1.sav" /FILE="/data/school2.sav".

Related Topics

Overview (ADD FILES command)
Examples (ADD FILES command)
FILE Subcommand (ADD FILES command)
RENAME Subcommand (ADD FILES command)
BY Subcommand (ADD FILES command)
DROP and KEEP Subcommands (ADD FILES command)
IN Subcommand (ADD FILES command)
FIRST and LAST Subcommands (ADD FILES command)
MAP Subcommand (ADD FILES command)
Adding Cases from Different Data Sources (ADD FILES command)
MATCH FILES


Overview (ADD FILES command)

ADD FILES (command),ADD FILES (command),ADD FILES (command)

ADD FILES combines cases from 2 up to 50 open data sets or external PASW Statistics data files by concatenating or interleaving cases. When cases are concatenated, all cases from one file are added to the end of all cases from another file. When cases are interleaved, cases in the resulting file are ordered according to the values of one or more key variables.

The files specified on ADD FILES can be external PASW Statistics data files and/or currently open datasets. The combined file becomes the new active dataset.

In general, ADD FILES is used to combine files containing the same variables but different cases. To combine files containing the same cases but different variables, use MATCH FILES. To update existing PASW Statistics data files, use UPDATE.

Options Collapse Hide details

Options

Variable Selection. You can specify which variables from each input file are included in the new active dataset using the DROP and KEEP subcommands.

Variable Names. You can rename variables in each input file before combining the files using the RENAME subcommand. This permits you to combine variables that are the same but whose names differ in different input files or to separate variables that are different but have the same name.

Variable Flag. You can create a variable that indicates whether a case came from a particular input file using IN. When interleaving cases, you can use the FIRST or LAST subcommands to create a variable that flags the first or last case of a group of cases with the same value for the key variable.

Variable Map. You can request a map showing all variables in the new active dataset, their order, and the input files from which they came using the MAP subcommand.

Basic Specification Collapse Hide details

Basic Specification

• The basic specification is two or more FILE subcommands, each of which specifies a file to be combined. If cases are to be interleaved, the BY subcommand specifying the key variables is also required.

• All variables from all input files are included in the new active dataset unless DROP or KEEP is specified.

Subcommand Order Collapse Hide details

Subcommand Order

• RENAME and IN must immediately follow the FILE subcommand to which they apply.

• BY, FIRST, and LAST must follow all FILE subcommands and their associated RENAME and IN subcommands.

Syntax Rules Collapse Hide details

Syntax Rules

• RENAME can be repeated after each FILE subcommand. RENAME applies only to variables in the file named on the FILE subcommand immediately preceding it.

• BY can be specified only once. However, multiple key variables can be specified on BY. When BY is used, all files must be sorted in ascending order by the key variables (see SORT CASES).

• FIRST and LAST can be used only when files are interleaved (when BY is used).

• MAP can be repeated as often as desired.

Operations Collapse Hide details

Operations

• ADD FILES reads all input files named on FILE and builds a new active dataset that replaces any active dataset created earlier in the session. ADD FILES is executed when the data are read by one of the procedure commands or the EXECUTE, SAVE, or SORT CASES commands.

• The resulting file contains complete dictionary information from the input files, including variable names, labels, print and write formats, and missing-value indicators. It also contains the documents from each input file. See DROP DOCUMENTS for information on deleting documents.

• For each variable, dictionary information is taken from the first file containing value labels, missing values, or a variable label for the common variable. If the first file has no such information, ADD FILES checks the second file, and so on, seeking dictionary information.

• Variables are copied in order from the first file specified, then from the second file specified, and so on. Variables that are not contained in all files receive the system-missing value for cases that do not have values for those variables.

• If the same variable name exists in more than one file but the format type (numeric or string) does not match, the command is not executed.

• If a numeric variable has the same name but different formats (for example, F8.0 and F8.2) in different input files, the format of the variable in the first-named file is used.

• If a string variable has the same name but different formats (for example, A24 and A16) in different input files, the command is not executed.

• If the active dataset is named as an input file, any N and SAMPLE commands that have been specified are applied to the active dataset before the files are combined.

• If only one of the files is weighted, the program turns weighting off when combining cases from the two files. To weight the cases, use the WEIGHT command again.

Limitations Collapse Hide details

Limitations

• A maximum of 50 files can be combined on one ADD FILES command.

• The TEMPORARY command cannot be in effect if the active dataset is used as an input file.

Related Topics

ADD FILES
Examples (ADD FILES command)
FILE Subcommand (ADD FILES command)
RENAME Subcommand (ADD FILES command)
BY Subcommand (ADD FILES command)
DROP and KEEP Subcommands (ADD FILES command)
IN Subcommand (ADD FILES command)
FIRST and LAST Subcommands (ADD FILES command)
MAP Subcommand (ADD FILES command)
Adding Cases from Different Data Sources (ADD FILES command)


Examples (ADD FILES command)

SORT CASES (command),SORT CASES (command),SORT CASES (command)
with ADD FILES command,with ADD FILES command,with ADD FILES command
ADD FILES (command),ADD FILES (command),ADD FILES (command)
with SORT CASES command,with SORT CASES command,with SORT CASES command
ADD FILES FILE="/data/school1.sav"
         /FILE="/data/school2.sav".

• ADD FILES concatenates cases from the PASW Statistics data files school1.sav and school2.sav. All cases from school1.sav precede all cases from school2.sav in the resulting file.

SORT CASES BY LOCATN DEPT.
ADD FILES  FILE="/data/source.sav" /FILE=* /BY LOCATN DEPT
 /KEEP AVGHOUR AVGRAISE LOCATN DEPT SEX HOURLY RAISE /MAP.
SAVE OUTFILE="/data/prsnnl.sav".

• SORT CASES sorts cases in the active dataset in ascending order of their values for LOCATN and DEPT.

• ADD FILES combines two files: the external PASW Statistics data file source.sav and the sorted active dataset. The file source.sav must also be sorted by LOCATN and DEPT.

• BY indicates that the keys for interleaving cases are LOCATN and DEPT, the same variables used on SORT CASES.

• KEEP specifies the variables to be retained in the resulting file.

• MAP produces a list of variables in the resulting file and the two input files.

• SAVE saves the resulting file as a new PASW Statistics data file named prsnnl.sav.

Related Topics

ADD FILES
Overview (ADD FILES command)
FILE Subcommand (ADD FILES command)
RENAME Subcommand (ADD FILES command)
BY Subcommand (ADD FILES command)
DROP and KEEP Subcommands (ADD FILES command)
IN Subcommand (ADD FILES command)
FIRST and LAST Subcommands (ADD FILES command)
MAP Subcommand (ADD FILES command)
Adding Cases from Different Data Sources (ADD FILES command)


FILE Subcommand (ADD FILES command)

FILE (subcommand),FILE (subcommand),FILE (subcommand)
ADD FILES command,ADD FILES command,ADD FILES command
ADD FILES (command),ADD FILES (command),ADD FILES (command)
FILE subcommand,FILE subcommand,FILE subcommand

FILE identifies the files to be combined. A separate FILE subcommand must be used for each input file.

• An asterisk may be specified on FILE to indicate the active dataset.

• Dataset names instead of file names can be used to refer to currently open datasets.

• The order in which files are named determines the order of cases in the resulting file.

Example

GET DATA /TYPE=XLS  /FILE='/temp/excelfile1.xls'.
DATASET NAME exceldata1.
GET DATA /TYPE=XLS  /FILE='/temp/excelfile2.xls'.
ADD FILES FILE='exceldata1'
         /FILE=*
         /FILE='/temp/mydata.sav'.

Related Topics

ADD FILES
Overview (ADD FILES command)
Examples (ADD FILES command)
RENAME Subcommand (ADD FILES command)
BY Subcommand (ADD FILES command)
DROP and KEEP Subcommands (ADD FILES command)
IN Subcommand (ADD FILES command)
FIRST and LAST Subcommands (ADD FILES command)
MAP Subcommand (ADD FILES command)
Adding Cases from Different Data Sources (ADD FILES command)


RENAME Subcommand (ADD FILES command)

ADD FILES (command),ADD FILES (command),ADD FILES (command)
RENAME subcommand,RENAME subcommand,RENAME subcommand
RENAME (subcommand),RENAME (subcommand),RENAME (subcommand)
ADD FILES command,ADD FILES command,ADD FILES command

RENAME renames variables in input files before they are processed by ADD FILES. RENAME follows the FILE subcommand that specifies the file containing the variables to be renamed.

• RENAME applies only to the FILE subcommand immediately preceding it. To rename variables from more than one input file, enter a RENAME subcommand after each FILE subcommand that specifies a file with variables to be renamed.

• Specifications for RENAME consist of a left parenthesis, a list of old variable names, an equals sign, a list of new variable names, and a right parenthesis. The two variable lists must name or imply the same number of variables. If only one variable is renamed, the parentheses are optional.

• More than one such specification can be entered on a single RENAME subcommand, each enclosed in parentheses.

• The TO keyword can be used to refer to consecutive variables in the file and to generate new variable names.

• RENAME takes effect immediately. KEEP and DROP subcommands entered prior to RENAME must use the old names, while those entered after RENAME must use the new names.

• All specifications within a single set of parentheses take effect simultaneously. For example, the specification RENAME (A,B = B,A) swaps the names of the two variables.

• Variables cannot be renamed to scratch variables.

• Input data files are not changed on disk; only the copy of the file being combined is affected.

Example

ADD FILES FILE="/data/clients.sav" /RENAME=(TEL_NO, ID_NO = PHONE, ID)
 /FILE="/data/master.sav" /BY ID.

• ADD FILES adds new client cases from the file clients.sav to existing client cases in the file master.sav.

• Two variables on clients.sav are renamed prior to the match. TEL_NO is renamed PHONE to match the name used for phone numbers in the master file. ID_NO is renamed ID so that it will have the same name as the identification variable in the master file and can be used on the BY subcommand.

• The BY subcommand orders the resulting file according to client ID number.

Related Topics

ADD FILES
Overview (ADD FILES command)
Examples (ADD FILES command)
FILE Subcommand (ADD FILES command)
BY Subcommand (ADD FILES command)
DROP and KEEP Subcommands (ADD FILES command)
IN Subcommand (ADD FILES command)
FIRST and LAST Subcommands (ADD FILES command)
MAP Subcommand (ADD FILES command)
Adding Cases from Different Data Sources (ADD FILES command)


BY Subcommand (ADD FILES command)

ADD FILES (command),ADD FILES (command),ADD FILES (command)
BY subcommand,BY subcommand,BY subcommand
BY (subcommand),BY (subcommand),BY (subcommand)
ADD FILES command,ADD FILES command,ADD FILES command
ADD FILES (command),ADD FILES (command),ADD FILES (command)
key variables,key variables,key variables
key variables,key variables,key variables
ADD FILES (command),ADD FILES (command),ADD FILES (command)

BY specifies one or more key variables that determine the order of cases in the resulting file. When BY is specified, cases from the input files are interleaved according to their values for the key variables.

• BY must follow the FILE subcommands and any associated RENAME and IN subcommands.

• The key variables specified on BY must be present and have the same names in all input files.

• Key variables can be string or numeric.

• All input files must be sorted in ascending order of the key variables. If necessary, use SORT CASES before ADD FILES.

• Cases in the resulting file are ordered by the values of the key variables. All cases from the first file with the first value for the key variable are first, followed by all cases from the second file with the same value, followed by all cases from the third file with the same value, and so forth. These cases are followed by all cases from the first file with the next value for the key variable, and so on.

• Cases with system-missing values are first in the resulting file. User-missing values are interleaved with other values.

Related Topics

ADD FILES
Overview (ADD FILES command)
Examples (ADD FILES command)
FILE Subcommand (ADD FILES command)
RENAME Subcommand (ADD FILES command)
DROP and KEEP Subcommands (ADD FILES command)
IN Subcommand (ADD FILES command)
FIRST and LAST Subcommands (ADD FILES command)
MAP Subcommand (ADD FILES command)
Adding Cases from Different Data Sources (ADD FILES command)


DROP and KEEP Subcommands (ADD FILES command)

ADD FILES (command),ADD FILES (command),ADD FILES (command)
KEEP subcommand,KEEP subcommand,KEEP subcommand
KEEP (subcommand),KEEP (subcommand),KEEP (subcommand)
ADD FILES command,ADD FILES command,ADD FILES command
ADD FILES (command),ADD FILES (command),ADD FILES (command)
DROP subcommand,DROP subcommand,DROP subcommand
DROP (subcommand),DROP (subcommand),DROP (subcommand)
ADD FILES command,ADD FILES command,ADD FILES command

DROP and KEEP are used to include only a subset of variables in the resulting file. DROP specifies a set of variables to exclude and KEEP specifies a set of variables to retain.

• DROP and KEEP do not affect the input files on disk.

• DROP and KEEP must follow all FILE and RENAME subcommands.

• DROP and KEEP must specify one or more variables. If RENAME is used to rename variables, specify the new names on DROP and KEEP.

• DROP and KEEP take effect immediately. If a variable specified on DROP or KEEP does not exist in the input files, was dropped by a previous DROP subcommand, or was not retained by a previous KEEP subcommand, the program displays an error message and does not execute the ADD FILES command.

• DROP cannot be used with variables created by the IN, FIRST, or LAST subcommands.

• KEEP can be used to change the order of variables in the resulting file. With KEEP, variables are kept in the order in which they are listed on the subcommand. If a variable is named more than once on KEEP, only the first mention of the variable is in effect; all subsequent references to that variable name are ignored.

• The keyword ALL can be specified on KEEP. ALL must be the last specification on KEEP, and it refers to all variables not previously named on that subcommand. It is useful when you want to arrange the first few variables in a specific order.

Example

ADD FILES FILE="/data/particle.sav" /RENAME=(PARTIC=pollute1)
 /FILE="/data/gas.sav" /RENAME=(OZONE TO SULFUR=pollut2 TO pollute4)
 /KEEP=pollute1 pollute2 pollute3 pollute4.

• The renamed variables are retained in the resulting file. KEEP is specified after all the FILE and RENAME subcommands, and it refers to the variables by their new names.

Related Topics

ADD FILES
Overview (ADD FILES command)
Examples (ADD FILES command)
FILE Subcommand (ADD FILES command)
RENAME Subcommand (ADD FILES command)
BY Subcommand (ADD FILES command)
IN Subcommand (ADD FILES command)
FIRST and LAST Subcommands (ADD FILES command)
MAP Subcommand (ADD FILES command)
Adding Cases from Different Data Sources (ADD FILES command)


IN Subcommand (ADD FILES command)

IN (subcommand),IN (subcommand),IN (subcommand)
ADD FILES command,ADD FILES command,ADD FILES command
ADD FILES (command),ADD FILES (command),ADD FILES (command)
IN subcommand,IN subcommand,IN subcommand
case source variable,case source variable,case source variable

IN creates a new variable in the resulting file that indicates whether a case came from the input file named on the preceding FILE subcommand. IN applies only to the file specified on the immediately preceding FILE subcommand.

• IN has only one specification, the name of the flag variable.

• The variable created by IN has the value 1 for every case that came from the associated input file and the value 0 for every case that came from a different input file.

• Variables created by IN are automatically attached to the end of the resulting file and cannot be dropped. If FIRST or LAST are used, the variable created by IN precedes the variables created by FIRST or LAST.

Example

ADD FILES  FILE="/data/week10.sav" /FILE="/data/week11.sav"
  /IN=INWEEK11 /BY=EMPID.

• IN creates the variable INWEEK11, which has the value 1 for all cases in the resulting file that came from the input file week11.sav and the value 0 for those cases that were not in the file week11.sav.

Example

ADD FILES  FILE="/data/week10.sav" /FILE="/data/week11.sav"
  /IN=INWEEK11 /BY=EMPID.
IF  (NOT INWEEK11) SALARY1=0.

• The variable created by IN is used to screen partially missing cases for subsequent analyses.

• Since IN variables have either the value 1 or 0, they can be used as logical expressions, where 1 = true and 0 = false. The IF command sets the variable SALARY1 equal to 0 for all cases that came from the file INWEEK11.

Related Topics

ADD FILES
Overview (ADD FILES command)
Examples (ADD FILES command)
FILE Subcommand (ADD FILES command)
RENAME Subcommand (ADD FILES command)
BY Subcommand (ADD FILES command)
DROP and KEEP Subcommands (ADD FILES command)
FIRST and LAST Subcommands (ADD FILES command)
MAP Subcommand (ADD FILES command)
Adding Cases from Different Data Sources (ADD FILES command)


FIRST and LAST Subcommands (ADD FILES command)

FIRST (subcommand),FIRST (subcommand),FIRST (subcommand)
ADD FILES command,ADD FILES command,ADD FILES command
LAST (subcommand),LAST (subcommand),LAST (subcommand)
ADD FILES command,ADD FILES command,ADD FILES command
ADD FILES (command),ADD FILES (command),ADD FILES (command)
FIRST subcommand,FIRST subcommand,FIRST subcommand
ADD FILES (command),ADD FILES (command),ADD FILES (command)
LAST subcommand,LAST subcommand,LAST subcommand

FIRST and LAST create logical variables that flag the first or last case of a group of cases with the same value on the BY variables. FIRST and LAST must follow all FILE subcommands and their associated RENAME and IN subcommands.

• FIRST and LAST have only one specification, the name of the flag variable.

• FIRST creates a variable with the value 1 for the first case of each group and the value 0 for all other cases.

• LAST creates a variable with the value 1 for the last case of each group and the value 0 for all other cases.

• Variables created by FIRST and LAST are automatically attached to the end of the resulting file and cannot be dropped.

Example

ADD FILES  FILE="/data/school1.sav" /FILE="/data/school2.sav"
 /BY=GRADE /FIRST=HISCORE.

• The variable HISCORE contains the value 1 for the first case in each grade in the resulting file and the value 0 for all other cases.

Related Topics

ADD FILES
Overview (ADD FILES command)
Examples (ADD FILES command)
FILE Subcommand (ADD FILES command)
RENAME Subcommand (ADD FILES command)
BY Subcommand (ADD FILES command)
DROP and KEEP Subcommands (ADD FILES command)
IN Subcommand (ADD FILES command)
MAP Subcommand (ADD FILES command)
Adding Cases from Different Data Sources (ADD FILES command)


MAP Subcommand (ADD FILES command)

ADD FILES (command),ADD FILES (command),ADD FILES (command)
MAP subcommand,MAP subcommand,MAP subcommand
MAP (subcommand),MAP (subcommand),MAP (subcommand)
ADD FILES command,ADD FILES command,ADD FILES command

MAP produces a list of the variables included in the new active dataset and the file or files from which they came. Variables are listed in the order in which they exist in the resulting file. MAP has no specifications and must follow after all FILE and RENAME subcommands.

• Multiple MAP subcommands can be used. Each MAP subcommand shows the current status of the active dataset and reflects only the subcommands that precede the MAP subcommand.

• To obtain a map of the active dataset in its final state, specify MAP last.

• If a variable is renamed, its original and new names are listed. Variables created by IN, FIRST, and LAST are not included in the map, since they are automatically attached to the end of the file and cannot be dropped.

Related Topics

ADD FILES
Overview (ADD FILES command)
Examples (ADD FILES command)
FILE Subcommand (ADD FILES command)
RENAME Subcommand (ADD FILES command)
BY Subcommand (ADD FILES command)
DROP and KEEP Subcommands (ADD FILES command)
IN Subcommand (ADD FILES command)
FIRST and LAST Subcommands (ADD FILES command)
Adding Cases from Different Data Sources (ADD FILES command)


Adding Cases from Different Data Sources (ADD FILES command)

ADD FILES (command),ADD FILES (command),ADD FILES (command)
adding cases from different data sources,adding cases from different data sources,adding cases from different data sources
merging data files,merging data files,merging data files
raw data files,raw data files,raw data files

You can add cases from any data source that PASW Statistics can read by defining dataset names for each data source that you read (DATASET NAME command) and then using ADD FILES to add the cases from each file. The following example merges the contents of three text data files, but it could just as easily merge the contents of a text data file, and Excel spreadsheet, and a database table.

Example

DATA LIST FILE="/data/gasdata1.txt"
  /1 OZONE 10-12 CO 20-22 SULFUR 30-32.
DATASET NAME gasdata1.
DATA LIST FILE="/data/gasdata2.txt"
  /1 OZONE 10-12 CO 20-22 SULFUR 30-32.
DATASET NAME gasdata2.
DATA LIST FILE="/data/gasdata3.txt"
  /1 OZONE 10-12 CO 20-22 SULFUR 30-32.
DATASET NAME gasdata3.
ADD FILES FILE='gasdata1'
  /FILE='gasdata2'
  /FILE='gasdata3'.
SAVE OUTFILE='/data/combined_data.sav'.

Related Topics

ADD FILES
Overview (ADD FILES command)
Examples (ADD FILES command)
FILE Subcommand (ADD FILES command)
RENAME Subcommand (ADD FILES command)
BY Subcommand (ADD FILES command)
DROP and KEEP Subcommands (ADD FILES command)
IN Subcommand (ADD FILES command)
FIRST and LAST Subcommands (ADD FILES command)
MAP Subcommand (ADD FILES command)


ADD VALUE LABELS

ADD VALUE LABELS (command),ADD VALUE LABELS (command),ADD VALUE LABELS (command)
ADD VALUE LABELS (command),ADD VALUE LABELS (command),ADD VALUE LABELS (command)
syntax chart,syntax chart,syntax chart
ADD VALUE LABELS varlist value 'label' value 'label'...[/varlist...]

This command takes effect immediately. It does not read the active dataset or execute pending transformations. See the topic Command Order for more information.

Example

ADD VALUE LABELS JOBGRADE 'P' 'Parttime Employee'
                          'C' 'Customer Support'.

Related Topics

Overview (ADD VALUE LABELS command)
Examples (ADD VALUE LABELS command)
Value Labels for String Variables (ADD VALUE LABELS command)
VALUE LABELS


Overview (ADD VALUE LABELS command)

ADD VALUE LABELS (command),ADD VALUE LABELS (command),ADD VALUE LABELS (command)

ADD VALUE LABELS adds or alters value labels without affecting other value labels already defined for that variable. In contrast, VALUE LABELS adds or alters value labels but deletes all existing value labels for that variable when it does so.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is a variable name and individual values with associated labels.

Syntax Rules Collapse Hide details

Syntax Rules

• Labels can be assigned to values of any previously defined variable. It is not necessary to enter value labels for all of a variable’s values.

• Each value label must be enclosed in single or double quotes.

• To specify a single quote or apostrophe within a quoted string, either enclose the entire string in double quotes or double the single quote/apostrophe.

• Value labels can contain any characters, including blanks.

• The same labels can be assigned to the same values of different variables by specifying a list of variable names. For string variables, the variables on the list must have the same defined width (for example, A8).

• Multiple sets of variable names and value labels can be specified on one ADD VALUE LABELS command as long as each set is separated from the previous one by a slash.

• To continue a label from one command line to the next, specify a plus sign (+) before the continuation of the label and enclose each segment of the label, including the blank between them, in single or double quotes.

Operations Collapse Hide details

Operations

• Unlike most transformations, ADD VALUE LABELS takes effect as soon as it is encountered in the command sequence. Thus, special attention should be paid to its position among commands.

• The added value labels are stored in the active dataset dictionary.

• ADD VALUE LABELS can be used for variables that have no previously assigned value labels.

• Adding labels to some values does not affect labels previously assigned to other values.

Limitations Collapse Hide details

Limitations

• Value labels cannot exceed 120 bytes.

Related Topics

ADD VALUE LABELS
Examples (ADD VALUE LABELS command)
Value Labels for String Variables (ADD VALUE LABELS command)


Examples (ADD VALUE LABELS command)

Adding Value Labels

ADD VALUE LABELS V1 TO V3 1 'Officials & Managers'
                          6 'Service Workers'
                /V4 'N' 'New Employee'.

• Labels are assigned to the values 1 and 6 of the variables between and including V1 and V3 in the active dataset.

• Following the required slash, a label for the value N for the variable V4 is specified. N is a string value and must be enclosed in single or double quotes.

• If labels already exist for these values, they are changed in the dictionary. If labels do not exist for these values, new labels are added to the dictionary.

• Existing labels for other values for these variables are not affected.

Specifying a Label on Multiple Lines

ADD VALUE LABELS OFFICE88 1 "EMPLOYEE'S OFFICE ASSIGNMENT PRIOR"
   + " TO 1988".

• The label for the value 1 for OFFICE88 is specified on two command lines. The plus sign concatenates the two string segments, and a blank is included at the beginning of the second string in order to maintain correct spacing in the label.

Related Topics

ADD VALUE LABELS
Overview (ADD VALUE LABELS command)
Value Labels for String Variables (ADD VALUE LABELS command)


Value Labels for String Variables (ADD VALUE LABELS command)

string variables,string variables,string variables
value labels,value labels,value labels
ADD VALUE LABELS (command),ADD VALUE LABELS (command),ADD VALUE LABELS (command)
string variables,string variables,string variables
value labels,value labels,value labels
string variables,string variables,string variables

• For string variables, the values and the labels must be enclosed in single or double quotes.

• If a specified value is longer than the defined width of the variable, the program displays a warning and truncates the value. The added label will be associated with the truncated value.

• If a specified value is shorter than the defined width of the variable, the program adds blanks to right-pad the value without warning. The added label will be associated with the padded value.

• If a single set of labels is to be assigned to a list of string variables, the variables must have the same defined width (for example, A8).

Example

ADD VALUE LABELS  STATE 'TEX' 'TEXAS' 'TEN' 'TENNESSEE'
                        'MIN' 'MINNESOTA'.

• ADD VALUE LABELS assigns labels to three values of the variable STATE. Each value and each label is specified in quotes.

• Assuming that the variable STATE is defined as three characters wide, the labels TEXAS, TENNESSEE, and MINNESOTA will be appropriately associated with the values TEX, TEN, and MIN. However, if STATE was defined as two characters wide, the program would truncate the specified values to two characters and would not be able to associate the labels correctly. Both TEX and TEN would be truncated to TE and would first be assigned the label TEXAS, which would then be changed to TENNESSEE by the second specification.

Example

ADD VALUE LABELS STATE REGION "U" "UNKNOWN".

• The label UNKNOWN is assigned to the value U for both STATE and REGION.

• STATE and REGION must have the same defined width. If they do not, a separate specification must be made for each, as in the following:

ADD VALUE LABELS STATE "U" "UNKNOWN" / REGION "U" "UNKNOWN".

Related Topics

ADD VALUE LABELS
Overview (ADD VALUE LABELS command)
Examples (ADD VALUE LABELS command)


ADP

ADP (command),ADP (command),ADP (command)
ADP (command),ADP (command),ADP (command)
syntax chart,syntax chart,syntax chart
Automated Data Preparation,Automated Data Preparation,Automated Data Preparation
command syntax,command syntax,command syntax

ADP is available in the Data Preparation option.

ADP
  /FIELDS [TARGET=targetField]
          INPUT=predictorFieldlist
          [ANALYSISWEIGHT=analysisweightField]
  [/PREPDATETIME
          [DATEDURATION={YES**(REFERENCE={CURRENT**    }
                                         {YMD(datespec)}
                               UNIT={AUTO**                       })}]
                                    {YEARS[(SUFFIX={'_years'  })] }
                                                   {suffixname}
                                    {MONTHS[(SUFFIX={'_months  })]}
                                                    {suffixname}
                                    {DAYS[(SUFFIX={'_days'   })]  }
                                                  {suffixname}
                        {NO                                         }
          [TIMEDURATION={YES**(REFERENCE={CURRENT**    }
                                         {HMS(timespec)}
                               UNIT={AUTO**                        })}]
                                    {HOURS[(SUFFIX={'_hours'  })]  }
                                                   {suffixname}
                                    {MINUTES[(SUFFIX={'_minutes'})]}
                                                     {suffixname}
                                    {SECONDS[(SUFFIX={'_seconds'})]}
                                                     {suffixname}
                        {NO                                          }
          [EXTRACTYEAR={YES[(SUFFIX={'_year'   })]}]
                                    {suffixname}
                       {NO**                      }
          [EXTRACTMONTH={YES[(SUFFIX={'_month'  })]}]
                                     {suffixname}
                        {NO**                      }
          [EXTRACTDAY={YES(SUFFIX={'_day'    })}]
                                  {suffixname}
                       {NO**                   }
          [EXTRACTHOUR={YES(SUFFIX={'_hour'   })}]
                                   {suffixname}
                       {NO**                    }
          [EXTRACTMINUTE={YES(SUFFIX={'_minute' })}]
                                     {suffixname}
                       {NO**                      }
          [EXTRACTSECOND={YES(SUFFIX={'_second' })}]
                                     {suffixname}
                         {NO**                    }
  [/SCREENING [PCTMISSING={YES**(MAXPCT={50**})}]
                                        {value}
                          {NO                   }
              [UNIQUECAT={YES**(MAXCAT={100**   })}]
                                       {integer}
                         {NO                     }
              [SINGLECAT={YES(MAXPCT={95** })}]
                                     {value}
                         {NO**               }
  [/ADJUSTLEVEL [INPUT={YES**}] [TARGET={YES**}]]
                       {NO   }          {NO   }
            [MAXVALORDINAL={10**   }]
                           {integer}
            [MINVALCONTINUOUS={5**    }]
                              {integer}
  [/OUTLIERHANDLING [INPUT={YES**}] [TARGET={YES**}]]
                           {NO   }          {NO   }
                    [CUTOFF=SD({3**  })]
                               {value}
                    [REPLACEWITH={CUTOFFVALUE**}]
                                 {MISSING      }
  [/REPLACEMISSING [INPUT={YES**[(EXCLUDE([CONTINUOUS] [NOMINAL] [ORDINAL]))]}]
                          {NO                                                }
                   [TARGET={YES[(EXCLUDE([CONTINUOUS] [NOMINAL] [ORDINAL]))]}]
                           {NO**                                            }
  [/REORDERNOMINAL [INPUT={YES }] [TARGET={YES }]
                          {NO**}          {NO**}
  [/RESCALE [INPUT={ZSCORE**([MEAN={0**  }] [SD={1**  }])}]
                                   {value}      {value}
                   {MINMAX([MIN={0**  }] [MAX={100**}])}
                                    {value}       {value}
                   {NONE                               }
            [TARGET={BOXCOX**([MEAN={0**  }] [SD={1**  }])}]
                                    {value}      {value}
                    {NONE                               }
  [/TRANSFORM [MERGESUPERVISED={YES**(PVALUE={0.05**})}]
                                             {value }
                               {NO                    }
              [MERGEUNSUPERVISED={YES{([ORDINAL] [NOMINAL] [MINPCT={10** })}]
                                                                   {value}
                                 {NO**                                     }
              [BINNING={SUPERVISED**(PVALUE={0.05**})}]
                                            {value }
                       {NONE                         }
              [SELECTION={YES**(PVALUE={0.05**})}]
                         {NO                    }
              [CONSTRUCTION={YES }(ROOT={feature })]
                                        {rootname}
                            {NO**}
  [/CRITERIA [SUFFIX(TARGET={'_transformed'} INPUT={'_transformed'})]
                            {suffixname    }        {suffixname    }
  /OUTFILE PREPXML='filespec'

** Default if the subcommand or keyword is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

Release History Collapse Hide details

Release History

Release 18

• Command introduced.

Example

ADP
  /FIELDS TARGET=targetVar
          INPUT=var1 var2 var3
  /OUTFILE PREPXML='file.xml'.

Related Topics

Overview (ADP command)
Examples (ADP command)
FIELDS Subcommand (ADP command)
PREPDATETIME Subcommand (ADP command)
SCREENING Subcommand (ADP command)
ADJUSTLEVEL Subcommand (ADP command)
OUTLIERHANDLING Subcommand (ADP command)
REPLACEMISSING Subcommand (ADP command)
REORDERNOMINAL Subcommand (ADP command)
RESCALE Subcommand (ADP command)
TRANSFORM Subcommand (ADP command)
CRITERIA Subcommand (ADP command)
OUTFILE Subcommand (ADP command)


Overview (ADP command)

Automated Data Preparation helps to prepare data for analysis by automating tedious and repetitive data preparation tasks that would otherwise be done manually. The operations it performs improve analysis speed, predictive power, and robustness. A key capability of the component is feature space construction—the discovery of useful sets of predictors from the data through transformation and combination of existing fields. Feature selection offers the ability to narrow the attribute space by screening out irrelevant fields, but Automated Data Preparation pairs selection and construction capabilities in order to automatically remove irrelevant fields that slow down or confuse algorithms and create new fields that boost predictive power.

Note that supported operations are performed without knowing what algorithms will be run on the data in further analyses—it is not a generalized data cleaner, nor does it have an understanding of business rules. Basic cleaning and integrity checks can be done using the PASW Statistics Data Validation procedure.

Options Collapse Hide details

Options

Date and Time Handling. The year, month, and day can be extracted from fields containing dates, and new fields containing the durations since a reference date computed. Likewise, the hour, minute, and second can be extracted from fields containing times, and new fields containing the time since a reference time computed.

Screening. Fields with too many missing values, and categorical fields with too many unique values, or too many values concentrated in a single value, can be screened and excluded from further analysis.

Rescaling. Continuous inputs can optionally be rescaled using a z score or min-max transformation. A continuous target can optionally be rescaled using a Box-Cox transformation.

Transformations. The procedure can suggest transformations used to merge similar categories of categorical inputs, bin values of continuous inputs, and construct and select new input fields from continuous inputs using principal components analysis.

Other Target and Input Handling. The procedure can apply rules for handling outliers, replace missing values, recode the categories of nominal fields, and adjust the measurement level of continuous and ordinal fields.

Output. The procedure creates an XML file containing suggested operations. This can be applied directly using SmartScore or transformed into command syntax using TMS IMPORT.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is the ADP command with a FIELDS subcommand specifying the inputs and optionally a target, and an OUTFILE subcommand specifying where the transformation rules should be saved.

Syntax Rules Collapse Hide details

Syntax Rules

• The VARIABLES and OUTFILE subcommands are required; all other subcommands are optional.

• Subcommands may be specified in any order.

• Only a single instance of each subcommand is allowed.

• An error occurs if a keyword is specified more than once within a subcommand.

• Parentheses, equals signs, and slashes shown in the syntax chart are required.

• The command name, subcommand names, and keywords must be spelled in full.

• Empty subcommands are not allowed.

Limitations Collapse Hide details

Limitations

• SPLIT FILE is ignored by this command.

Related Topics

ADP
Examples (ADP command)
FIELDS Subcommand (ADP command)
PREPDATETIME Subcommand (ADP command)
SCREENING Subcommand (ADP command)
ADJUSTLEVEL Subcommand (ADP command)
OUTLIERHANDLING Subcommand (ADP command)
REPLACEMISSING Subcommand (ADP command)
REORDERNOMINAL Subcommand (ADP command)
RESCALE Subcommand (ADP command)
TRANSFORM Subcommand (ADP command)
CRITERIA Subcommand (ADP command)
OUTFILE Subcommand (ADP command)


Examples (ADP command)

Basic Specification

ADP
  /FIELDS TARGET=targetField
          INPUT=field1 field2 field3
  /OUTFILE PREPXML='file.xml'.

• ADP processes the target and input fields using the default settings.

• OUTFILE saves an XML file containing suggested operations. This can be applied directly using SmartScore or transformed into command syntax using TMS IMPORT.

Using ADP with TMS IMPORT

*Automatic Data Preparation.
ADP
  /FIELDS TARGET=sales INPUT=resale type price engine_s horsepow wheelbas width length
    curb_wgt fuel_cap mpg
  /PREPDATETIME DATEDURATION=YES(REFERENCE=YMD('2009-06-04') UNIT=AUTO)
    TIMEDURATION=YES(REFERENCE=HMS('08:43:35') UNIT=AUTO) EXTRACTYEAR=YES(SUFFIX='_year')
    EXTRACTMONTH=YES(SUFFIX='_month') EXTRACTDAY=YES(SUFFIX='_day')
    EXTRACTHOUR=YES(SUFFIX='_hour') EXTRACTMINUTE=YES(SUFFIX='_minute')
    EXTRACTSECOND=YES(SUFFIX='_second')
   /SCREENING PCTMISSING=YES(MAXPCT=50) UNIQUECAT=YES(MAXCAT=100) SINGLECAT=NO
  /ADJUSTLEVEL INPUT=YES TARGET=YES MAXVALORDINAL=10 MINVALCONTINUOUS=5
  /OUTLIERHANDLING INPUT=YES TARGET=NO CUTOFF=SD(3) REPLACEWITH=CUTOFFVALUE
  /REPLACEMISSING INPUT=YES TARGET=NO
  /REORDERNOMINAL INPUT=YES TARGET=NO
  /RESCALE INPUT=ZSCORE(MEAN=0 SD=1) TARGET=BOXCOX(MEAN=0 SD=1)
  /TRANSFORM MERGESUPERVISED=NO MERGEUNSUPERVISED=NO BINNING=NONE SELECTION=NO
    CONSTRUCTION=NO
  /CRITERIA SUFFIX(TARGET='_transformed' INPUT='_transformed')
  /OUTFILE PREPXML='/workingDirectory/car_sales_transformations.xml'.
TMS IMPORT
  /INFILE TRANSFORMATIONS='/workingDirectory/car_sales_transformations.xml'
    MODE=FORWARD (ROLES=UPDATE)
  /SAVE TRANSFORMED=YES.
EXECUTE.

• The ADP command prepares the target field sales and the input fields resale through mpg.

• The PREPDATETIME subcommand is specified, but not used because none of the fields are date or time fields.

• The ADJUSTLEVEL subcommand recasts ordinal fields with more than 10 values as continuous and continuous fields with fewer than 5 values as ordinal.

• The OUTLIERHANDLING subcommand replaces values of continuous inputs (not the target) that are more than 3 standard deviations from the mean with the value that is 3 standard deviations from the mean.

• The REPLACEMISSING subcommand replaces values of inputs (not the target) that are missing.

• The REORDERNOMINAL subcommand recodes the values of nominal inputs from least frequently occurring to most frequently occurring.

• The RESCALE subcommand standardizes continuous inputs to have mean 0 and standard deviation 1 using a z-score transformation, and standardizes the continuous target to have mean 0 and standard deviation 1 using a Box-Cox transformation.

• The TRANSFORM subcommand turns off all default operations specified by this subcommand.

• The CRITERIA subcommand specifies the default suffixes for transformations of the target and inputs.

• The OUTFILE subcommand specifies that the transformations should be saved to /workingDirectory/car_sales_transformations.xml, where /workingDirectory is the path to where you want to save car_sales_transformations.xml.

• The TMS IMPORT command reads the transformations in car_sales_transformations.xml and applies them to the active dataset, updating the roles of existing fields that are transformed.

• The EXECUTE command causes the transformations to be processed. When using this as part of a longer stream of syntax, you may be able to remove the EXECUTE command to save some processing time.

For discussion of output from this syntax and to place the example in context, see Using Automated Data Preparation Automatically.

Related Topics

ADP
Overview (ADP command)
FIELDS Subcommand (ADP command)
PREPDATETIME Subcommand (ADP command)
SCREENING Subcommand (ADP command)
ADJUSTLEVEL Subcommand (ADP command)
OUTLIERHANDLING Subcommand (ADP command)
REPLACEMISSING Subcommand (ADP command)
REORDERNOMINAL Subcommand (ADP command)
RESCALE Subcommand (ADP command)
TRANSFORM Subcommand (ADP command)
CRITERIA Subcommand (ADP command)
OUTFILE Subcommand (ADP command)


FIELDS Subcommand (ADP command)

ADP (command),ADP (command),ADP (command)
FIELDS subcommand,FIELDS subcommand,FIELDS subcommand
FIELDS (subcommand),FIELDS (subcommand),FIELDS (subcommand)
ADP command,ADP command,ADP command

The FIELDS subcommand is used to specify the target, inputs, and optional weights.

• The FIELDS subcommand and the INPUT keyword are required.

TARGET (keyword),TARGET (keyword),TARGET (keyword)
ADP command,ADP command,ADP command
TARGET Keyword Collapse Hide details

TARGET Keyword

Specify a single field that will be used as a target in further analyses. The target field is processed based upon its defined measurement level; nominal, ordinal, or continuous. Use the VARIABLE LEVEL command to change a target field's measurement level.

INPUT (keyword),INPUT (keyword),INPUT (keyword)
ADP command,ADP command,ADP command
INPUT Keyword Collapse Hide details

INPUT Keyword

Specify one or more fields that will be used as inputs in further analsyses. Input fields are processed based upon their defined measurement level; nominal, ordinal, or continuous. Use the VARIABLE LEVEL command to change an input field's measurement level.

ANALYSISWEIGHT (keyword),ANALYSISWEIGHT (keyword),ANALYSISWEIGHT (keyword)
ADP command,ADP command,ADP command
ANALYSISWEIGHT Keyword Collapse Hide details

ANALYSISWEIGHT Keyword

Specify a variable containing analysis (regression) weights. The procedure incorporates analysis weights where appropriate in operations used to prepare the data.

The analysis weight variable must be numeric. Cases with a negative or zero analysis weight are ignored.

Related Topics

ADP
Overview (ADP command)
Examples (ADP command)
PREPDATETIME Subcommand (ADP command)
SCREENING Subcommand (ADP command)
ADJUSTLEVEL Subcommand (ADP command)
OUTLIERHANDLING Subcommand (ADP command)
REPLACEMISSING Subcommand (ADP command)
REORDERNOMINAL Subcommand (ADP command)
RESCALE Subcommand (ADP command)
TRANSFORM Subcommand (ADP command)
CRITERIA Subcommand (ADP command)
OUTFILE Subcommand (ADP command)


PREPDATETIME Subcommand (ADP command)

ADP (command),ADP (command),ADP (command)
PREPDATETIME subcommand,PREPDATETIME subcommand,PREPDATETIME subcommand
PREPDATETIME (subcommand),PREPDATETIME (subcommand),PREPDATETIME (subcommand)
ADP command,ADP command,ADP command

The PREPDATETIME subcommand specifies handling of date and time fields.

• If PREPDATETIME is not specified, by default the procedure computes date and time durations since the current date and time.

• The original date and time fields will not be recommended as model inputs following automated data preparation.

DATEDURATION (keyword),DATEDURATION (keyword),DATEDURATION (keyword)
ADP command,ADP command,ADP command
REFERENCE (keyword),REFERENCE (keyword),REFERENCE (keyword)
ADP command,ADP command,ADP command
UNIT (keyword),UNIT (keyword),UNIT (keyword)
ADP command,ADP command,ADP command
SUFFIX (keyword),SUFFIX (keyword),SUFFIX (keyword)
ADP command,ADP command,ADP command
DATEDURATION Keyword Collapse Hide details

DATEDURATION Keyword

The DATEDURATION keyword computes the number of years/months/days since a reference date for each variable containing dates.

REFERENCE=CURRENT | YMD('datespec')
Reference date. Specify CURRENT to use the current date as the reference date. Use YMD to specify a custom reference date with the year, month, and day, in that order, in parentheses using a valid date format in quotes. The default is CURRENT.
UNIT=AUTO | YEARS | MONTHS | DAYS
Date units for computed durations. Specify the units for the computed durations. AUTO determines the units based on the following rules. The default is AUTO.

• If the minimum number of elapsed days is less than 31, then the duration is returned in days.

• If the minimum number of elapsed days is less than 366 but greater than or equal to 31, then the duration is returned in months. The number of months between two dates is calculated based on average number of days in a month (30.4375): months = days / 30.4375.

• If the minimum number of elapsed days greater than or equal to 366, then the duration is returned in years. The number of years between two dates is calculated based on average number of days in a year (365.25): years = days / 365.25.
Explicitly specifying YEARS, MONTHS, or DAYS returns the duration in years, months, or days, respectively. Optionally, in parentheses, specify SUFFIX= with a suffix in quotes. The default suffix depends upon the unit; YEARS, MONTHS, and DAYS have defaults _years, _months, and _days, respectively.
TIMEDURATION (keyword),TIMEDURATION (keyword),TIMEDURATION (keyword)
ADP command,ADP command,ADP command
REFERENCE (keyword),REFERENCE (keyword),REFERENCE (keyword)
ADP command,ADP command,ADP command
UNIT (keyword),UNIT (keyword),UNIT (keyword)
ADP command,ADP command,ADP command
SUFFIX (keyword),SUFFIX (keyword),SUFFIX (keyword)
ADP command,ADP command,ADP command
TIMEDURATION Keyword Collapse Hide details

TIMEDURATION Keyword

The TIMEDURATION keyword computes the number of hours/minutes/seconds since a reference time for each variable containing times.

REFERENCE=CURRENT | HMS('timespec')
Reference date. Specify CURRENT to use the current time as the reference time or use HMS and the hour, minute, and second, in that order, in parentheses using a valid time format in quotes. The default is CURRENT.
UNIT = AUTO | HOURS | MINUTES | SECONDS
Date units for computed durations. Specify the units for the computed durations. AUTO determines the units based on the following rules. The default is AUTO.

• If the minimum number of elapsed seconds is less than 60, then the duration is returned in seconds.

• If the minimum number of elapsed seconds is larger than or equal to 60 but less than 3600, then the duration is returned in minutes.

• If the minimum number of elapsed seconds is larger than or equal to 3600, then the duration is returned in hours.
Explicitly specifying HOURS, MINUTES, or SECONDS returns the duration in hours, minutes, or seconds, respectively. Optionally, in parentheses, specify SUFFIX= with a suffix in quotes. The default suffix depends upon the unit; HOURS, MINUTES, and SECONDS have defaults _hours, _minutes, and _seconds, respectively.
EXTRACTYEAR (keyword),EXTRACTYEAR (keyword),EXTRACTYEAR (keyword)
ADP command,ADP command,ADP command
EXTRACTYEAR Keyword Collapse Hide details

EXTRACTYEAR Keyword

The EXTRACTYEAR keyword extracts the year element from a date variable.

Optionally specify the SUFFIX keyword in parentheses with a suffix in quotes. The default suffix is _year.

EXTRACTMONTH (keyword),EXTRACTMONTH (keyword),EXTRACTMONTH (keyword)
ADP command,ADP command,ADP command
EXTRACTMONTH Keyword Collapse Hide details

EXTRACTMONTH Keyword

The EXTRACTMONTH keyword extracts the month element from a date variable.

Optionally specify the SUFFIX keyword in parentheses with a suffix in quotes. The default suffix is _month.

EXTRACTDAY (keyword),EXTRACTDAY (keyword),EXTRACTDAY (keyword)
ADP command,ADP command,ADP command
EXTRACTDAY Keyword Collapse Hide details

EXTRACTDAY Keyword

The EXTRACTDAY keyword extracts the day element from a date variable.

Optionally specify the SUFFIX keyword in parentheses with a suffix in quotes. The default suffix is _day.

EXTRACTHOUR (keyword),EXTRACTHOUR (keyword),EXTRACTHOUR (keyword)
ADP command,ADP command,ADP command
EXTRACTHOUR Keyword Collapse Hide details

EXTRACTHOUR Keyword

The EXTRACTHOUR keyword extracts the hour element from a time variable.

Optionally specify the SUFFIX keyword in parentheses with a suffix in quotes. The default suffix is _hour.

EXTRACTMINUTE (keyword),EXTRACTMINUTE (keyword),EXTRACTMINUTE (keyword)
ADP command,ADP command,ADP command
EXTRACTMINUTE Keyword Collapse Hide details

EXTRACTMINUTE Keyword

The EXTRACTMINUTE keyword extracts the minute element from a time variable.

Optionally specify the SUFFIX keyword in parentheses with a suffix in quotes. The default suffix is _minute.

EXTRACTSECOND (keyword),EXTRACTSECOND (keyword),EXTRACTSECOND (keyword)
ADP command,ADP command,ADP command
EXTRACTSECOND Keyword Collapse Hide details

EXTRACTSECOND Keyword

The EXTRACTSECOND keyword extracts the second element from a time variable.

Optionally specify the SUFFIX keyword in parentheses with a suffix in quotes. The default suffix is _second.

Related Topics

ADP
Overview (ADP command)
Examples (ADP command)
FIELDS Subcommand (ADP command)
SCREENING Subcommand (ADP command)
ADJUSTLEVEL Subcommand (ADP command)
OUTLIERHANDLING Subcommand (ADP command)
REPLACEMISSING Subcommand (ADP command)
REORDERNOMINAL Subcommand (ADP command)
RESCALE Subcommand (ADP command)
TRANSFORM Subcommand (ADP command)
CRITERIA Subcommand (ADP command)
OUTFILE Subcommand (ADP command)


SCREENING Subcommand (ADP command)

ADP (command),ADP (command),ADP (command)
SCREENING subcommand,SCREENING subcommand,SCREENING subcommand
SCREENING (subcommand),SCREENING (subcommand),SCREENING (subcommand)
ADP command,ADP command,ADP command

The SCREENING subcommand specifies settings for excluding unsuitable fields.

PCTMISSING (keyword),PCTMISSING (keyword),PCTMISSING (keyword)
ADP command,ADP command,ADP command
UNIQUECAT (keyword),UNIQUECAT (keyword),UNIQUECAT (keyword)
ADP command,ADP command,ADP command
SINGLECAT (keyword),SINGLECAT (keyword),SINGLECAT (keyword)
ADP command,ADP command,ADP command
PCTMISSING=YES(MAXPCT=value) | NO
 | Screen out fields with too many missing values. Fields with more than MAXPCT missing values are removed from further analysis. Specify a value greater than or equal to 0, which is equivalent to deselecting this option, and less than or equal to 100, though fields with all missing values are automatically excluded. The default is 50.
UNIQUECAT=YES(MAXCAT=integer) | NO
 | Screen out nominal fields with too many unique categories. Nominal fields with more than MAXCAT categories are removed from further analysis. Specify a positive integer. The default is 100.
SINGLECAT=YES(MAXPCT=value) | NO
 | Screen out categorical fields that are nearly constant. Ordinal and nominal fields with a category that contains more than MAXPCT of the records are removed from further analysis. Specify a value greater than or equal to 0, equivalent to deselecting this option, and less than or equal to 100, though constant fields are automatically excluded. The default is 95.

Related Topics

ADP
Overview (ADP command)
Examples (ADP command)
FIELDS Subcommand (ADP command)
PREPDATETIME Subcommand (ADP command)
ADJUSTLEVEL Subcommand (ADP command)
OUTLIERHANDLING Subcommand (ADP command)
REPLACEMISSING Subcommand (ADP command)
REORDERNOMINAL Subcommand (ADP command)
RESCALE Subcommand (ADP command)
TRANSFORM Subcommand (ADP command)
CRITERIA Subcommand (ADP command)
OUTFILE Subcommand (ADP command)


ADJUSTLEVEL Subcommand (ADP command)

ADP (command),ADP (command),ADP (command)
ADJUSTLEVEL subcommand,ADJUSTLEVEL subcommand,ADJUSTLEVEL subcommand
ADJUSTLEVEL (subcommand),ADJUSTLEVEL (subcommand),ADJUSTLEVEL (subcommand)
ADP command,ADP command,ADP command

The ADJUSTLEVEL subcommand recasts ordinal fields with too many categories as continuous and continuous fields with too few unique values as ordinal. By default, the measurement levels of ordinal fields with more than 10 categories and continuous fields with fewer than 5 unique values are adjusted.

INPUT (keyword),INPUT (keyword),INPUT (keyword)
ADP command,ADP command,ADP command
TARGET (keyword),TARGET (keyword),TARGET (keyword)
ADP command,ADP command,ADP command
MAXVALORDINAL (keyword),MAXVALORDINAL (keyword),MAXVALORDINAL (keyword)
ADP command,ADP command,ADP command
MINVALCONTINUOUS (keyword),MINVALCONTINUOUS (keyword),MINVALCONTINUOUS (keyword)
ADP command,ADP command,ADP command
INPUT=YES | NO
 | Check inputs and adjust measurement level if necessary. By default, inputs are checked.
TARGET=YES | NO
 | Check target and adjust measurment level if necessary. By default, the target is checked.
MAXVALORDINAL=integer
 | Maximum number of categories allowed for ordinal fields. Ordinal fields with more than MAXVALORDINAL categories are recast as continuous fields. Specify a positive integer. The default is 10. The value of MAXVALORDINAL must be greater than or equal to MINVALCONTINUOUS.
MINVALCONTINUOUS= integer
 | Minimum number of unique values allowed for continuous fields. Continuous fields with less than MINVALCONTINUOUS unique values are recast as ordinal fields. Specify a positive integer. The default is 5. The value of MINVALCONTINUOUS must be less than or equal to MAXVALORDINAL.

Related Topics

ADP
Overview (ADP command)
Examples (ADP command)
FIELDS Subcommand (ADP command)
PREPDATETIME Subcommand (ADP command)
SCREENING Subcommand (ADP command)
OUTLIERHANDLING Subcommand (ADP command)
REPLACEMISSING Subcommand (ADP command)
REORDERNOMINAL Subcommand (ADP command)
RESCALE Subcommand (ADP command)
TRANSFORM Subcommand (ADP command)
CRITERIA Subcommand (ADP command)
OUTFILE Subcommand (ADP command)


OUTLIERHANDLING Subcommand (ADP command)

ADP (command),ADP (command),ADP (command)
OUTLIERHANDLING subcommand,OUTLIERHANDLING subcommand,OUTLIERHANDLING subcommand
OUTLIERHANDLING (subcommand),OUTLIERHANDLING (subcommand),OUTLIERHANDLING (subcommand)
ADP command,ADP command,ADP command

The OUTLIERHANDLING subcommand checks fields for outliers and replaces the outlying values with less extreme values or missing values.

INPUT (keyword),INPUT (keyword),INPUT (keyword)
ADP command,ADP command,ADP command
TARGET (keyword),TARGET (keyword),TARGET (keyword)
ADP command,ADP command,ADP command
CUTOFF (keyword),CUTOFF (keyword),CUTOFF (keyword)
ADP command,ADP command,ADP command
REPLACEWITH (keyword),REPLACEWITH (keyword),REPLACEWITH (keyword)
ADP command,ADP command,ADP command
INPUT=YES | NO
 | Check inputs for outliers. By default, inputs are checked.
TARGET=YES | NO
 | Check target for outliers. By default, the target is checked.
CUTOFF=SD(value)
 | Cutoff for determining outliers. If a value is more than SD "robust" standard deviations from the mean value for a field, then it is considered an outlier. Specify a positive number. The default is 3 standard deviations.
REPLACEWITH=CUTOFFVALUE | MISSING
 | Value to replace outliers with. CUTOFFVALUE replaces outliers with the cutoff for determining outliers. MISSING replaces outliers with the system-missing value. These missing values can be further handled by the REPLACEMISSING subcommand. The default is CUTOFFVALUE.

Related Topics

ADP
Overview (ADP command)
Examples (ADP command)
FIELDS Subcommand (ADP command)
PREPDATETIME Subcommand (ADP command)
SCREENING Subcommand (ADP command)
ADJUSTLEVEL Subcommand (ADP command)
REPLACEMISSING Subcommand (ADP command)
REORDERNOMINAL Subcommand (ADP command)
RESCALE Subcommand (ADP command)
TRANSFORM Subcommand (ADP command)
CRITERIA Subcommand (ADP command)
OUTFILE Subcommand (ADP command)


REPLACEMISSING Subcommand (ADP command)

ADP (command),ADP (command),ADP (command)
REPLACEMISSING subcommand,REPLACEMISSING subcommand,REPLACEMISSING subcommand
REPLACEMISSING (subcommand),REPLACEMISSING (subcommand),REPLACEMISSING (subcommand)
ADP command,ADP command,ADP command

The REPLACEMISSING subcommand replaces missing values in continuous, ordinal, and nominal fields with the mean, median, or mode, respectively.

INPUT (keyword),INPUT (keyword),INPUT (keyword)
ADP command,ADP command,ADP command
TARGET (keyword),TARGET (keyword),TARGET (keyword)
ADP command,ADP command,ADP command
INPUT=YES | NO
 | Replace missing values in input fields. By default, missing values are replaced in inputs. Optionally specify the keyword EXCLUDE and a list in parentheses of the field measurement levels to determine which input fields should be checked; for example:
 | INPUT=YES
 | causes the procedure to replace missing values in all input fields, while
 | INPUT=YES(EXCLUDE(CONTINUOUS NOMINAL))
 | causes the procedure to replace missing values in fields with the ordinal measurement level.
TARGET= NO | YES
 | Replace missing values in the target. By default, missing values are not replaced in the target. When replacing missing values in the target, optionally specify the keyword EXCLUDE as described for the INPUT keyword above.

Related Topics

ADP
Overview (ADP command)
Examples (ADP command)
FIELDS Subcommand (ADP command)
PREPDATETIME Subcommand (ADP command)
SCREENING Subcommand (ADP command)
ADJUSTLEVEL Subcommand (ADP command)
OUTLIERHANDLING Subcommand (ADP command)
REORDERNOMINAL Subcommand (ADP command)
RESCALE Subcommand (ADP command)
TRANSFORM Subcommand (ADP command)
CRITERIA Subcommand (ADP command)
OUTFILE Subcommand (ADP command)


REORDERNOMINAL Subcommand (ADP command)

ADP (command),ADP (command),ADP (command)
REORDERNOMINAL subcommand,REORDERNOMINAL subcommand,REORDERNOMINAL subcommand
REORDERNOMINAL (subcommand),REORDERNOMINAL (subcommand),REORDERNOMINAL (subcommand)
ADP command,ADP command,ADP command

The REORDERNOMINAL subcommand recodes the values of nominal fields from least frequently occurring to most frequently occurring. The new field values start with 0 as the least frequent category. Note that the new field will be numeric even if the original field is a string. For example, if a nominal field's data values are "A", "A", "A", "B", "C", "C", then automated data preparation would recode "B" into 0, "C" into 1, and "A" into 2.

INPUT (keyword),INPUT (keyword),INPUT (keyword)
ADP command,ADP command,ADP command
TARGET (keyword),TARGET (keyword),TARGET (keyword)
ADP command,ADP command,ADP command
INPUT=NO | YES
 | Reorder values of inputs. By default, values of nominal inputs are not reordered. This specification is ignored if there are no nominal inputs.
TARGET=NO | YES
 | Reorder values of the target. By default, values of a nominal target are not reordered. This specification is ignored if the target is not nominal.

Related Topics

ADP
Overview (ADP command)
Examples (ADP command)
FIELDS Subcommand (ADP command)
PREPDATETIME Subcommand (ADP command)
SCREENING Subcommand (ADP command)
ADJUSTLEVEL Subcommand (ADP command)
OUTLIERHANDLING Subcommand (ADP command)
REPLACEMISSING Subcommand (ADP command)
RESCALE Subcommand (ADP command)
TRANSFORM Subcommand (ADP command)
CRITERIA Subcommand (ADP command)
OUTFILE Subcommand (ADP command)


RESCALE Subcommand (ADP command)

ADP (command),ADP (command),ADP (command)
RESCALE subcommand,RESCALE subcommand,RESCALE subcommand
RESCALE (subcommand),RESCALE (subcommand),RESCALE (subcommand)
ADP command,ADP command,ADP command

The RESCALE subcommand is used to rescale continuous fields. Different methods are available for inputs and the target.

INPUT (keyword),INPUT (keyword),INPUT (keyword)
ADP command,ADP command,ADP command
ZSCORE (keyword),ZSCORE (keyword),ZSCORE (keyword)
ADP command,ADP command,ADP command
MINMAX (keyword),MINMAX (keyword),MINMAX (keyword)
ADP command,ADP command,ADP command
NONE (keyword),NONE (keyword),NONE (keyword)
ADP command,ADP command,ADP command
INPUT Keyword Collapse Hide details

INPUT Keyword

The INPUT keyword specifies the method for rescaling continuous input fields.

• Z score rescaling is performed by default with a mean of 0 and standard deviation of 1.

• If there are no continuous inputs, INPUT is ignored.

ZSCORE(MEAN=value SD=value)
 | Z score transformation. Using the observed mean and standard deviation as population parameter estimates, the fields are standardized and then the z scores are mapped to the corresponding values of a normal distribution with the specified MEAN and SD. Specify a number for MEAN and a positive number for SD. The defaults are 0 and 1, respectively, corresponding to standardized rescaling.
MINMAX(MIN=value MAX=value)
 | Min-Max transformation. Using the observed minimum and maximum as population parameter estimates, the fields are mapped to the corresponding values of a uniform distribution with the specified MIN and MAX. Specify numbers with MAX greater than MIN.
NONE
 | Do not rescale inputs.
TARGET (keyword),TARGET (keyword),TARGET (keyword)
ADP command,ADP command,ADP command
BOXCOX (keyword),BOXCOX (keyword),BOXCOX (keyword)
ADP command,ADP command,ADP command
NONE (keyword),NONE (keyword),NONE (keyword)
ADP command,ADP command,ADP command
TARGET Keyword Collapse Hide details

TARGET Keyword

The TARGET keyword specifies the method for rescaling a continuous target.

• Box-Cox rescaling is performed by default with a target mean of 0 and target standard deviation of 1.

• If there is no target, or it is not continuous, TARGET is ignored.

BOXCOX(MEAN=value SD=value)
 | Box-Cox transformation. This transforms a continuous target using the Box-Cox transformation into a field that has an approximately normal distribution with the specified MEAN and SD. Specify a number for MEAN and a positive number for SD. The defaults are 0 and 1, respectively.
NONE
 | Do not rescale target.

Related Topics

ADP
Overview (ADP command)
Examples (ADP command)
FIELDS Subcommand (ADP command)
PREPDATETIME Subcommand (ADP command)
SCREENING Subcommand (ADP command)
ADJUSTLEVEL Subcommand (ADP command)
OUTLIERHANDLING Subcommand (ADP command)
REPLACEMISSING Subcommand (ADP command)
REORDERNOMINAL Subcommand (ADP command)
TRANSFORM Subcommand (ADP command)
CRITERIA Subcommand (ADP command)
OUTFILE Subcommand (ADP command)


TRANSFORM Subcommand (ADP command)

ADP (command),ADP (command),ADP (command)
TRANSFORM subcommand,TRANSFORM subcommand,TRANSFORM subcommand
TRANSFORM (subcommand),TRANSFORM (subcommand),TRANSFORM (subcommand)
ADP command,ADP command,ADP command

The TRANSFORM subcommand is used to merge similar categories of categorical inputs, bin values of continuous inputs, and construct and select new input fields from continuous inputs using principal components analysis.

MERGESUPERVISED (keyword),MERGESUPERVISED (keyword),MERGESUPERVISED (keyword)
ADP command,ADP command,ADP command
MERGEUNSUPERVISED (keyword),MERGEUNSUPERVISED (keyword),MERGEUNSUPERVISED (keyword)
ADP command,ADP command,ADP command
PVALUE (keyword),PVALUE (keyword),PVALUE (keyword)
ADP command,ADP command,ADP command
MINPCT (keyword),MINPCT (keyword),MINPCT (keyword)
ADP command,ADP command,ADP command
MERGESUPERVISED Keyword Collapse Hide details

MERGESUPERVISED Keyword

The MERGESUPERVISED keyword specifies how to merge similar categories of a nominal or ordinal input in the presence of a target.

• If there are no categorical inputs, MERGESUPERVISED is ignored.

• If there is no target specified on the FIELDS subcommand, MERGESUPERVISED is ignored.

YES(PVALUE=value)
 | Supervised merge. Similar categories are identified based upon the relationship between the input and the target. Categories that are not significantly different; that is, having a p-value greater than the value of PVALUE, are merged. Specify a value greater than 0 and less than or equal to 1. The default is 0.05. YES is the default.
NO
 | Do not merge categories.
MERGEUNSUPERVISED Keyword Collapse Hide details

MERGEUNSUPERVISED Keyword

The MERGEUNSUPERVISED keyword specifies how to merge similar categories of a nominal or ordinal input when there is no target.

• If there are no categorical inputs, MERGEUNSUPERVISED is ignored.

• If there is a target specified on the FIELDS subcommand, MERGEUNSUPERVISED is ignored.

YES(ORDINAL NOMINAL MINPCT=value)
 | Unsupervised merge. The equal frequency method is used to merge categories with less than MINPCT of the total number of records. Specify a value greater than or equal to 0 and less than or equal to 100. The default is 10 if MINPCT is not specified. If YES is specified without ORDINAL or NOMINAL, then no merging is performed.
NO
 | Do not merge categories. NO is the default.
BINNING (keyword),BINNING (keyword),BINNING (keyword)
ADP command,ADP command,ADP command
SUPERVISED (keyword),SUPERVISED (keyword),SUPERVISED (keyword)
ADP command,ADP command,ADP command
NONE (keyword),NONE (keyword),NONE (keyword)
ADP command,ADP command,ADP command
BINNING Keyword Collapse Hide details

BINNING Keyword

The BINNING keyword specifies how to discretize continuous inputs in the presence of a categorical target.

SUPERVISED(PVALUE=value)
 | Supervised binning. Bins are created based upon the properties of "homogeneous subsets", which are identified by the Scheffe method using PVALUE as the alpha for the critical value for determining homogeneous subsets. SUPERVISED is the default. Specify a value greater than 0 and less than or equal to 1. The default is 0.05.
 | If there is no target specified on the FIELDS subcommand, or the target is not categorical, or there are no continuous inputs, then SUPERVISED is ignored.
NONE
 | Do not bin values of continuous inputs.
SELECTION (keyword),SELECTION (keyword),SELECTION (keyword)
ADP command,ADP command,ADP command
SELECTION Keyword Collapse Hide details

SELECTION Keyword

The SELECTION keyword specifies how to perform feature selection for continuous inputs in the presence of a continuous target.

YES(PVALUE=value)
 | Perform feature selection. A continuous input is removed from the analysis if the p-value for its correlation with the target is greater than PVALUE. YES is the default.
 | If there is no target specified on the FIELDS subcommand, or the target is not continuous, or there are no continuous inputs, then YES is ignored.
NO
 | Do not perform feature selection.
CONSTRUCTION (keyword),CONSTRUCTION (keyword),CONSTRUCTION (keyword)
ADP command,ADP command,ADP command
CONSTRUCTION Keyword Collapse Hide details

CONSTRUCTION Keyword

The CONSTRUCTION keyword specifies how to perform feature construction for continuous inputs in the presence of a continuous target.

YES(ROOT=rootname)
 | Perform feature construction. New predictors are constructed from groups of "similar" predictors using principal component analysis. Optionally specify the rootname for constructed predictors using ROOT in parentheses. Specify a rootname (no quotes). The default is feature.
 | If there is no target specified on the FIELDS subcommand, or the target is not continuous, or there are no continuous inputs, then YES is ignored.
NO
 | Do not perform feature construction.NO is the default.

Related Topics

ADP
Overview (ADP command)
Examples (ADP command)
FIELDS Subcommand (ADP command)
PREPDATETIME Subcommand (ADP command)
SCREENING Subcommand (ADP command)
ADJUSTLEVEL Subcommand (ADP command)
OUTLIERHANDLING Subcommand (ADP command)
REPLACEMISSING Subcommand (ADP command)
REORDERNOMINAL Subcommand (ADP command)
RESCALE Subcommand (ADP command)
CRITERIA Subcommand (ADP command)
OUTFILE Subcommand (ADP command)


CRITERIA Subcommand (ADP command)

ADP (command),ADP (command),ADP (command)
CRITERIA subcommand,CRITERIA subcommand,CRITERIA subcommand
CRITERIA (subcommand),CRITERIA (subcommand),CRITERIA (subcommand)
ADP command,ADP command,ADP command

The CRITERIA subcommand is used to specify the suffixes applied to transformed target and inputs.

SUFFIX (keyword),SUFFIX (keyword),SUFFIX (keyword)
ADP command,ADP command,ADP command
TARGET (keyword),TARGET (keyword),TARGET (keyword)
ADP command,ADP command,ADP command
INPUT (keyword),INPUT (keyword),INPUT (keyword)
ADP command,ADP command,ADP command
SUFFIX Keyword Collapse Hide details

SUFFIX Keyword

The SUFFIX keyword specifies the suffixes applied to transformed target and inputs.

TARGET=suffixname
 | Suffix for transformed target. Specify a suffix in quotes. The default is _transformed.
 | If there is no target specified on the FIELDS subcommand, TARGET is ignored.
INPUT=suffixname
 | Suffix for transformed inputs. Specify a suffix in quotes. The default is _transformed.

Related Topics

ADP
Overview (ADP command)
Examples (ADP command)
FIELDS Subcommand (ADP command)
PREPDATETIME Subcommand (ADP command)
SCREENING Subcommand (ADP command)
ADJUSTLEVEL Subcommand (ADP command)
OUTLIERHANDLING Subcommand (ADP command)
REPLACEMISSING Subcommand (ADP command)
REORDERNOMINAL Subcommand (ADP command)
RESCALE Subcommand (ADP command)
TRANSFORM Subcommand (ADP command)
OUTFILE Subcommand (ADP command)


OUTFILE Subcommand (ADP command)

ADP (command),ADP (command),ADP (command)
OUTFILE subcommand,OUTFILE subcommand,OUTFILE subcommand
OUTFILE (subcommand),OUTFILE (subcommand),OUTFILE (subcommand)
ADP command,ADP command,ADP command

The OUTFILE subcommand saves an XML-format file containing the rules for preparing the data.

• The OUTFILE subcommand is required.

• File names must be specified in full. ADP does not supply extensions.

PREPXML (keyword),PREPXML (keyword),PREPXML (keyword)
ADP command,ADP command,ADP command
PREPXML='filespec'
Save rules for preparing data to an XML file. The rules are saved in an XML format to the specified file. This file can be merged with model PMML using TMS MERGE or transformed into command syntax using TMS IMPORT

Related Topics

ADP
Overview (ADP command)
Examples (ADP command)
FIELDS Subcommand (ADP command)
PREPDATETIME Subcommand (ADP command)
SCREENING Subcommand (ADP command)
ADJUSTLEVEL Subcommand (ADP command)
OUTLIERHANDLING Subcommand (ADP command)
REPLACEMISSING Subcommand (ADP command)
REORDERNOMINAL Subcommand (ADP command)
RESCALE Subcommand (ADP command)
TRANSFORM Subcommand (ADP command)
CRITERIA Subcommand (ADP command)


AGGREGATE

AGGREGATE (command),AGGREGATE (command),AGGREGATE (command)
AGGREGATE (command),AGGREGATE (command),AGGREGATE (command)
syntax chart,syntax chart,syntax chart
release history,release history,release history
AGGREGATE [OUTFILE={'savfile'|'dataset'}]
                   {*     } [MODE={REPLACE     }] [OVERWRITE={NO }]
                                  {ADDVARIABLES}             {YES}

 [/MISSING=COLUMNWISE] [/DOCUMENT]

 [/PRESORTED] [/BREAK=[varlist[({A})]][varlist...]]
                                {D}

 /aggvar['label'] aggvar['label']...=function(arguments)

 [/aggvar ...]

Available functions:

SUM | Sum | MEAN | Mean
SD | Standard deviation | MAX | Maximum
MIN | Minimum | PGT | % of cases greater than value
PLT | % of cases less than value | PIN | % of cases between values
POUT | % of cases not in range | FGT | Fraction greater than value
FLT | Fraction less than value | FIN | Fraction between values
FOUT | Fraction not in range | N | Weighted number of cases
NU | Unweighted number of cases | NMISS | Weighted number of missing cases
NUMISS | Unweighted number of missing cases | FIRST | First nonmissing value
LAST | Last nonmissing value | MEDIAN | Median

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

Syntax for the AGGREGATE command can be generated from the Aggregate Data dialog.

Release History Collapse Hide details

Release History

Release 13.0

• MODE keyword introduced.

• OVERWRITE keyword introduced.

Release 17.0

• AGGREGATE runs without a break variable.

Example

AGGREGATE
  /OUTFILE='/temp/temp.sav'
  /BREAK=gender
  /age_mean=MEAN(age).

Related Topics

Overview (AGGREGATE command)
Example (AGGREGATE command)
OUTFILE Subcommand (AGGREGATE command)
BREAK Subcommand (AGGREGATE command)
DOCUMENT Subcommand (AGGREGATE command)
PRESORTED Subcommand (AGGREGATE command)
Aggregate Functions (AGGREGATE command)
MISSING Subcommand (AGGREGATE command)


Overview (AGGREGATE command)

AGGREGATE (command),AGGREGATE (command),AGGREGATE (command)
with SPLIT FILE command,with SPLIT FILE command,with SPLIT FILE command
SPLIT FILE (command),SPLIT FILE (command),SPLIT FILE (command)
with AGGREGATE command,with AGGREGATE command,with AGGREGATE command
aggregating data,aggregating data,aggregating data
break variables,break variables,break variables

AGGREGATE aggregates groups of cases in the active dataset into single cases and creates a new aggregated file or creates new variables in the active dataset that contain aggregated data. The values of one or more variables in the active dataset define the case groups. These variables are called break variables. A set of cases with identical values for each break variable is called a break group. If no break variables are specified, then the entire dataset is a single break group. Aggregate functions are applied to source variables in the active dataset to create new aggregated variables that have one value for each break group.

Options Collapse Hide details

Options

Data. You can create new variables in the active dataset that contain aggregated data, replace the active dataset with aggregated results, or create a new data file that contains the aggregated results.

Documentary Text. You can copy documentary text from the original file into the aggregated file using the DOCUMENT subcommand. By default, documentary text is dropped.

Aggregated Variables. You can create aggregated variables using any of 19 aggregate functions. The functions SUM, MEAN, and SD can aggregate only numeric variables. All other functions can use both numeric and string variables.

Labels and Formats. You can specify variable labels for the aggregated variables. Variables created with the functions MAX, MIN, FIRST, and LAST assume the formats and value labels of their source variables. All other variables assume the default formats described under Aggregate Functions.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is at least one aggregate function and source variable. The aggregate function creates a new aggregated variable in the active dataset.

Subcommand Order Collapse Hide details

Subcommand Order

• If specified, OUTFILE must be specified first.

• If specified, DOCUMENT and PRESORTED must precede BREAK. No other subcommand can be specified between these two subcommands.

• MISSING, if specified, must immediately follow OUTFILE.

• The aggregate functions must be specified last.

Operations Collapse Hide details

Operations

• When replacing the active dataset or creating a new data file, the aggregated file contains the break variables plus the variables created by the aggregate functions.

• AGGREGATE excludes cases with missing values from all aggregate calculations except those involving the functions N, NU, NMISS, and NUMISS.

• Unless otherwise specified, AGGREGATE sorts cases in the aggregated file in ascending order of the values of the grouping variables.

• PRESORTED uses a faster, less memory-intensive algorithm that assumes the data are already sorted into the desired groups.

• AGGREGATE ignores split-file processing. To achieve the same effect, name the variable or variables used to split the file as break variables before any other break variables. AGGREGATE produces one file, but the aggregated cases will then be in the same order as the split files.

Related Topics

AGGREGATE
Example (AGGREGATE command)
OUTFILE Subcommand (AGGREGATE command)
BREAK Subcommand (AGGREGATE command)
DOCUMENT Subcommand (AGGREGATE command)
PRESORTED Subcommand (AGGREGATE command)
Aggregate Functions (AGGREGATE command)
MISSING Subcommand (AGGREGATE command)


Example (AGGREGATE command)

AGGREGATE
  /OUTFILE='/temp/temp.sav'
  /BREAK=gender marital
  /age_mean=MEAN(age)
  /age_median=MEDIAN(age)
  /income_median=MEDIAN(income).

• AGGREGATE creates a new PASW Statistics data file, temp.sav, that contains two break variables (gender and marital) and all of the new aggregate variables.

• BREAK specifies gender and marital as the break variables. In the aggregated file, cases are sorted in ascending order of gender and in ascending order of marital within gender. The active dataset remains unsorted.

• Three aggregated variables are created: age_mean contains the mean age for each group defined by the two break variables; age_median contains the median age; and income_median contains the median income.

Related Topics

AGGREGATE
Overview (AGGREGATE command)
OUTFILE Subcommand (AGGREGATE command)
BREAK Subcommand (AGGREGATE command)
DOCUMENT Subcommand (AGGREGATE command)
PRESORTED Subcommand (AGGREGATE command)
Aggregate Functions (AGGREGATE command)
MISSING Subcommand (AGGREGATE command)


OUTFILE Subcommand (AGGREGATE command)

OUTFILE (subcommand),OUTFILE (subcommand),OUTFILE (subcommand)
AGGREGATE command,AGGREGATE command,AGGREGATE command
AGGREGATE (command),AGGREGATE (command),AGGREGATE (command)
OUTFILE subcommand,OUTFILE subcommand,OUTFILE subcommand
saving files,saving files,saving files
aggregated data files,aggregated data files,aggregated data files
aggregating data,aggregating data,aggregating data
saving files,saving files,saving files

OUTFILE specifies the handling of the aggregated results. It must be the first subcommand on the AGGREGATE command.

• OUTFILE=’file specification’ saves the aggregated data to a new file, leaving the active dataset unaffected. The file contains the new aggregated variables and the break variables that define the aggregated cases.

• A defined dataset name can be used for the file specification, saving the aggregated data to a dataset in the current session. The dataset must be defined before being used in the AGGREGATE command. See the topic DATASET DECLARE for more information.

• OUTFILE=* with no additional keywords on the OUTFILE subcommand will replace the active dataset with the aggregated results.

• OUTFILE=* MODE=ADDVARIABLES appends the new variables with the aggregated data to the active dataset (instead of replacing the active dataset with the aggregated data).

• OUTFILE=* MODE=ADDVARIABLES OVERWRITE=YES overwrites variables in the active dataset if those variable names are the same as the aggregate variable names specified on the AGGREGATE command.

• MODE and OVERWRITE can be used only with OUTFILE=*; they are invalid with OUTFILE=’file specification’.

• Omission of the OUTFILE subcommand is equivalent to OUTFILE=* MODE=ADDVARIABLES.

Example Collapse Hide details

Example

AGGREGATE
  /BREAK=region
  /sales_mean = MEAN(var1)
  /sales_median = MEDIAN(var1)
  /sales_sum = SUM(var1).

• The aggregated variables are appended to the end of each case in the active data file. No existing cases or variables are deleted.

• For each case, the new aggregated variable values represent the mean, median, and total (sum) sales values for its region.

Related Topics

AGGREGATE
Overview (AGGREGATE command)
Example (AGGREGATE command)
BREAK Subcommand (AGGREGATE command)
DOCUMENT Subcommand (AGGREGATE command)
PRESORTED Subcommand (AGGREGATE command)
Aggregate Functions (AGGREGATE command)
MISSING Subcommand (AGGREGATE command)
Creating a New Aggregated Data File versus Appending Aggregated Variables (AGGREGATE command)


Creating a New Aggregated Data File versus Appending Aggregated Variables (AGGREGATE command)

When you create a new aggregated data file with OUTFILE=’file specification’ or OUTFILE=* MODE=REPLACE, the new file contains:

• The break variables from the original data file and the new aggregate variables defined by the aggregate functions. Original variables other than the break variables are not retained.

• One case for each group defined by the break variables. If there is one break variable with two values, the new data file will contain only two cases.

When you append aggregate variables to the active dataset with OUTFILE=* MODE=ADDVARIABLES, the modified data file contains:

• All of the original variables plus all of the new variables defined by the aggregate functions, with the aggregate variables appended to the end of each case.

• The same number of cases as the original data file. The data file itself is not aggregated. Each case with the same value(s) of the break variable(s) receives the same values for the new aggregate variables. For example, if gender is the only break variable, all males would receive the same value for a new aggregate variable that represents the average age.

Example

DATA LIST FREE /age (F2) gender (F2).
BEGIN DATA
25 1
35 1
20 2
30 2
60 2
END DATA.
*create new file with aggregated results.
AGGREGATE
  /OUTFILE='/temp/temp.sav'
  /BREAK=gender
  /age_mean=MEAN(age)
  /groupSize=N.
*append aggregated variables to active dataset.
AGGREGATE
  /OUTFILE=* MODE=ADDVARIABLES
  /BREAK=gender
  /age_mean=MEAN(age)
  /groupSize=N.
New aggregated data file
Aggregate variables appended to active dataset

Related Topics

OUTFILE Subcommand (AGGREGATE command)


BREAK Subcommand (AGGREGATE command)

AGGREGATE (command),AGGREGATE (command),AGGREGATE (command)
BREAK subcommand,BREAK subcommand,BREAK subcommand
BREAK (subcommand),BREAK (subcommand),BREAK (subcommand)
AGGREGATE command,AGGREGATE command,AGGREGATE command
aggregating data,aggregating data,aggregating data
break variables,break variables,break variables

BREAK lists the optional grouping variables, also called break variables. Each unique combination of values of the break variables defines one break group.

• The variables named on BREAK can be any combination of variables in the active dataset.

• Unless PRESORTED is specified, aggregated variables are appended to the active dataset (OUTFILE=* MODE=ADDVARIABLES), AGGREGATE sorts cases after aggregating. By default, cases are sorted in ascending order of the values of the break variables. AGGREGATE sorts first on the first break variable, then on the second break variable within the groups created by the first, and so on.

• Sort order can be controlled by specifying an A (for ascending) or D (for descending) in parentheses after any break variables.

• The designations A and D apply to all preceding undesignated variables.

• The subcommand PRESORTED overrides all sorting specifications, and no sorting is performed with OUTFILE=* MODE=ADDVARIABLES.

Example Collapse Hide details
AGGREGATE
  /BREAK=region
  /sales_mean = MEAN(var1)
  /sales_median = MEDIAN(var1)
  /sales_sum = SUM(var1).

For each case, the new aggregated variable values represent the mean, median, and total (sum) sales values for its region.

Example with no BREAK variable Collapse Hide details
AGGREGATE
  /sales_mean = MEAN(var1)
  /sales_median = MEDIAN(var1)
  /sales_sum = SUM(var1).

For each case, the new aggregated variable values represent the mean, median, and total (sum) sales values for the entire dataset.

Related Topics

AGGREGATE
Overview (AGGREGATE command)
Example (AGGREGATE command)
OUTFILE Subcommand (AGGREGATE command)
DOCUMENT Subcommand (AGGREGATE command)
PRESORTED Subcommand (AGGREGATE command)
Aggregate Functions (AGGREGATE command)
MISSING Subcommand (AGGREGATE command)


DOCUMENT Subcommand (AGGREGATE command)

AGGREGATE (command),AGGREGATE (command),AGGREGATE (command)
DOCUMENT subcommand,DOCUMENT subcommand,DOCUMENT subcommand
DOCUMENT (subcommand),DOCUMENT (subcommand),DOCUMENT (subcommand)
AGGREGATE command,AGGREGATE command,AGGREGATE command
documents,documents,documents
retaining in aggregated files,retaining in aggregated files,retaining in aggregated files

DOCUMENT copies documentation from the original file into the aggregated file.

• DOCUMENT must appear after OUTFILE but before BREAK.

• By default, documents from the original data file are not retained with the aggregated data file when creating a new aggregated data file with either OUTFILE=’file specification’ or OUTFILE=* MODE=REPLACE. The DOCUMENT subcommand retains the original data file documents.

• Appending variables with OUTFILE=* MODE=ADDVARIABLES has no effect on data file documents, and the DOCUMENT subcommand is ignored. If the data file previously had documents, they are retained.

Related Topics

AGGREGATE
Overview (AGGREGATE command)
Example (AGGREGATE command)
OUTFILE Subcommand (AGGREGATE command)
BREAK Subcommand (AGGREGATE command)
PRESORTED Subcommand (AGGREGATE command)
Aggregate Functions (AGGREGATE command)
MISSING Subcommand (AGGREGATE command)


PRESORTED Subcommand (AGGREGATE command)

AGGREGATE (command),AGGREGATE (command),AGGREGATE (command)
PRESORTED subcommand,PRESORTED subcommand,PRESORTED subcommand
PRESORTED (subcommand),PRESORTED (subcommand),PRESORTED (subcommand)
AGGREGATE command,AGGREGATE command,AGGREGATE command

If the data are already sorted into the desired groups, you can reduce run time and memory requirements by using the PRESORTED subcommand.

• If specified, PRESORTED must precede BREAK. The only specification is the keyword PRESORTED. PRESORTED has no additional specifications.

• When PRESORTED is specified, the program forms an aggregate case out of each group of adjacent cases with the same values for the break variables. Unless the cases are sorted by the break variables, the results will be quite different from what would be produced if PRESORTED were not specified.

• When PRESORTED is specified, if AGGREGATE is appending new variables to the active dataset rather than writing a new file or replacing the active dataset, the cases must be sorted in ascending order by the BREAK variables.

Example

AGGREGATE OUTFILE=’/temp/temp.sav’
 /PRESORTED
 /BREAK=gender marital
 /mean_age=MEAN(age).

Related Topics

AGGREGATE
Overview (AGGREGATE command)
Example (AGGREGATE command)
OUTFILE Subcommand (AGGREGATE command)
BREAK Subcommand (AGGREGATE command)
DOCUMENT Subcommand (AGGREGATE command)
Aggregate Functions (AGGREGATE command)
MISSING Subcommand (AGGREGATE command)


Aggregate Functions (AGGREGATE command)

aggregating data,aggregating data,aggregating data
variable names,variable names,variable names
AGGREGATE (command),AGGREGATE (command),AGGREGATE (command)
variable definitions,variable definitions,variable definitions

An aggregated variable is created by applying an aggregate function to a variable in the active dataset. The variable in the active dataset is called the source variable, and the new aggregated variable is the target variable.

• The aggregate functions must be specified last on AGGREGATE.

• The simplest specification is a target variable list, followed by an equals sign, a function name, and a list of source variables.

• The number of target variables named must match the number of source variables.

• When several aggregate variables are defined at once, the first-named target variable is based on the first-named source variable, the second-named target is based on the second-named source, and so on.

• Only the functions MAX, MIN, FIRST, and LAST copy complete dictionary information from the source variable. For all other functions, new variables do not have labels and are assigned default dictionary print and write formats. The default format for a variable depends on the function used to create it (see the list of available functions below).

aggregating data,aggregating data,aggregating data
variable labels,variable labels,variable labels

• You can provide a variable label for a new variable by specifying the label in single or double quotes immediately following the new variable name. Value labels cannot be assigned in AGGREGATE.

• To change formats or add value labels to an active dataset created by AGGREGATE, use the PRINT FORMATS, WRITE FORMATS, FORMATS, or VALUE LABELS command. If the aggregate file is written to disk, first retrieve the file using GET, specify the new labels and formats, and resave the file.

AGGREGATE (command),AGGREGATE (command),AGGREGATE (command)
functions,functions,functions
aggregating data,aggregating data,aggregating data
aggregate functions,aggregate functions,aggregate functions
SUM (function),SUM (function),SUM (function)
AGGREGATE command,AGGREGATE command,AGGREGATE command

The following is a list of available functions:

MEAN (function),MEAN (function),MEAN (function)
AGGREGATE command,AGGREGATE command,AGGREGATE command
SD (function),SD (function),SD (function)
AGGREGATE command,AGGREGATE command,AGGREGATE command
MEDIAN (function),MEDIAN (function),MEDIAN (function)
AGGREGATE command,AGGREGATE command,AGGREGATE command
MAX (function),MAX (function),MAX (function)
AGGREGATE command,AGGREGATE command,AGGREGATE command
MIN (function),MIN (function),MIN (function)
AGGREGATE command,AGGREGATE command,AGGREGATE command
PGT (function),PGT (function),PGT (function)
AGGREGATE command,AGGREGATE command,AGGREGATE command
PLT (function),PLT (function),PLT (function)
AGGREGATE command,AGGREGATE command,AGGREGATE command
PIN (function),PIN (function),PIN (function)
AGGREGATE command,AGGREGATE command,AGGREGATE command
POUT (function),POUT (function),POUT (function)
AGGREGATE command,AGGREGATE command,AGGREGATE command
FGT (function),FGT (function),FGT (function)
AGGREGATE command,AGGREGATE command,AGGREGATE command
FLT (function),FLT (function),FLT (function)
AGGREGATE command,AGGREGATE command,AGGREGATE command
FIN (function),FIN (function),FIN (function)
AGGREGATE command,AGGREGATE command,AGGREGATE command
FOUT (function),FOUT (function),FOUT (function)
AGGREGATE command,AGGREGATE command,AGGREGATE command
N (function),N (function),N (function)
AGGREGATE command,AGGREGATE command,AGGREGATE command
NU (function),NU (function),NU (function)
AGGREGATE command,AGGREGATE command,AGGREGATE command
NMISS (function),NMISS (function),NMISS (function)
AGGREGATE command,AGGREGATE command,AGGREGATE command
NUMISS (function),NUMISS (function),NUMISS (function)
AGGREGATE command,AGGREGATE command,AGGREGATE command
FIRST (function),FIRST (function),FIRST (function)
AGGREGATE command,AGGREGATE command,AGGREGATE command
LAST (function),LAST (function),LAST (function)
AGGREGATE command,AGGREGATE command,AGGREGATE command
aggregating data,aggregating data,aggregating data
aggregate variables,aggregate variables,aggregate variables
SUM(varlist) | Sum across cases. Default formats are F8.2.
MEAN(varlist) | Mean across cases. Default formats are F8.2.
MEDIAN(varlist) | Median across cases. Default formats are F8.2.
SD(varlist) | Standard deviation across cases. Default formats are F8.2.
MAX(varlist) | Maximum value across cases. Complete dictionary information is copied from the source variables to the target variables.
MIN(varlist) | Minimum value across cases. Complete dictionary information is copied from the source variables to the target variables.
PGT(varlist,value) | Percentage of cases greater than the specified value. Default formats are F5.1.
PLT(varlist,value) | Percentage of cases less than the specified value. Default formats are F5.1.
PIN(varlist,value1,value2) | Percentage of cases between value1 and value2, inclusive. Default formats are F5.1.
POUT(varlist,value1,value2) | Percentage of cases not between value1 and value2. Cases where the source variable equals value1 or value2 are not counted. Default formats are F5.1.
FGT(varlist,value) | Fraction of cases greater than the specified value. Default formats are F5.3.
FLT(varlist,value) | Fraction of cases less than the specified value. Default formats are F5.3.
FIN(varlist,value1,value2) | Fraction of cases between value1 and value2, inclusive. Default formats are F5.3.
FOUT(varlist,value1,value2) | Fraction of cases not between value1 and value2. Cases where the source variable equals value1 or value2 are not counted. Default formats are F5.3.
N(varlist) | Weighted number of cases in break group. Default formats are F7.0 for unweighted files and F8.2 for weighted files.
NU(varlist) | Unweighted number of cases in break group. Default formats are F7.0.
NMISS(varlist) | Weighted number of missing cases. Default formats are F7.0 for unweighted files and F8.2 for weighted files.
NUMISS(varlist) | Unweighted number of missing cases. Default formats are F7.0.
FIRST(varlist) | First nonmissing observed value in break group. Complete dictionary information is copied from the source variables to the target variables.
LAST(varlist) | Last nonmissing observed value in break group. Complete dictionary information is copied from the source variables to the target variables.

• The functions SUM, MEAN, and SD can be applied only to numeric source variables. All other functions can use short and long string variables as well as numeric ones.

• The N and NU functions do not require arguments. Without arguments, they return the number of weighted and unweighted valid cases in a break group. If you supply a variable list, they return the number of weighted and unweighted valid cases for the variables specified.

• For several functions, the argument includes values as well as a source variable designation. Either blanks or commas can be used to separate the components of an argument list.

• For PIN, POUT, FIN, and FOUT, the first value should be less than or equal to the second. If the first is greater, AGGREGATE automatically reverses them and prints a warning message. If the two values are equal, PIN and FIN calculate the percentages and fractions of values equal to the argument. POUT and FOUT calculate the percentages and fractions of values not equal to the argument.

• String values specified in an argument should be enclosed in quotes.

Using the MEAN Function

AGGREGATE OUTFILE=’AGGEMP.SAV’ /BREAK=LOCATN
 /AVGSAL 'Average Salary' AVGRAISE = MEAN(SALARY RAISE).

• AGGREGATE defines two aggregate variables, AVGSAL and AVGRAISE.

• AVGSAL is the mean of SALARY for each break group, and AVGRAISE is the mean of RAISE.

• The label Average Salary is assigned to AVGSAL.

Using the PLT Function

AGGREGATE OUTFILE=* /BREAK=DEPT
 /LOWVAC,LOWSICK = PLT (VACDAY SICKDAY,10).

• AGGREGATE creates two aggregated variables: LOWVAC and LOWSICK. LOWVAC is the percentage of cases with values less than 10 for VACDAY, and LOWSICK is the percentage of cases with values less than 10 for SICKDAY.

Using the FIN Function

AGGREGATE OUTFILE=’GROUPS.SAV’ /BREAK=OCCGROUP
 /COLLEGE = FIN(EDUC,13,16).

• AGGREGATE creates the variable COLLEGE, which is the fraction of cases with 13 to 16 years of education (variable EDUC).

Using the PIN Function

AGGREGATE OUTFILE=* /BREAK=CLASS
 /LOCAL = PIN(STATE,'IL','IO').

• AGGREGATE creates the variable LOCAL, which is the percentage of cases in each break group whose two-letter state code represents Illinois, Indiana, or Iowa. (The abbreviation for Indiana, IN, is between IL and IO in an alphabetical sort sequence.)

Related Topics

AGGREGATE
Overview (AGGREGATE command)
Example (AGGREGATE command)
OUTFILE Subcommand (AGGREGATE command)
BREAK Subcommand (AGGREGATE command)
DOCUMENT Subcommand (AGGREGATE command)
PRESORTED Subcommand (AGGREGATE command)
MISSING Subcommand (AGGREGATE command)


MISSING Subcommand (AGGREGATE command)

AGGREGATE (command),AGGREGATE (command),AGGREGATE (command)
MISSING subcommand,MISSING subcommand,MISSING subcommand
MISSING (subcommand),MISSING (subcommand),MISSING (subcommand)
AGGREGATE command,AGGREGATE command,AGGREGATE command
missing values,missing values,missing values
and aggregated data,and aggregated data,and aggregated data
COLUMNWISE (keyword),COLUMNWISE (keyword),COLUMNWISE (keyword)
AGGREGATE command,AGGREGATE command,AGGREGATE command

By default, AGGREGATE uses all nonmissing values of the source variable to calculate aggregated variables. An aggregated variable will have a missing value only if the source variable is missing for every case in the break group. You can alter the default missing-value treatment by using the MISSING subcommand. You can also specify the inclusion of user-missing values on any function.

• MISSING must immediately follow OUTFILE.

• COLUMNWISE is the only specification available for MISSING.

• If COLUMNWISE is specified, the value of an aggregated variable is missing for a break group if the source variable is missing for any case in the group.

• COLUMNWISE does not affect the calculation of the N, NU, NMISS, or NUMISS functions.

• COLUMNWISE does not apply to break variables. If a break variable has a missing value, cases in that group are processed and the break variable is saved in the file with the missing value. Use SELECT IF if you want to eliminate cases with missing values for the break variables.

Related Topics

AGGREGATE
Overview (AGGREGATE command)
Example (AGGREGATE command)
OUTFILE Subcommand (AGGREGATE command)
BREAK Subcommand (AGGREGATE command)
DOCUMENT Subcommand (AGGREGATE command)
PRESORTED Subcommand (AGGREGATE command)
Aggregate Functions (AGGREGATE command)
Including Missing Values (AGGREGATE command)
Comparing Missing-Value Treatments (AGGREGATE command)


Including Missing Values (AGGREGATE command)

You can force a function to include user-missing values in its calculations by specifying a period after the function name.

• AGGREGATE ignores periods used with the functions N, NU, NMISS, and NUMISS if these functions have no arguments.

• User-missing values are treated as valid when these four functions are followed by a period and have a variable as an argument. NMISS.(AGE) treats user-missing values as valid and thus gives the number of cases for which AGE has the system-missing value only.

The effect of specifying a period with N, NU, NMISS, and NUMISS is illustrated by the following:

N = N. = N(AGE) + NMISS(AGE) = N.(AGE) + NMISS.(AGE)

NU = NU. = NU(AGE) + NUMISS(AGE) = NU.(AGE) + NUMISS.(AGE)

• The function N (the same as N. with no argument) yields a value for each break group that equals the number of cases with valid values (N(AGE)) plus the number of cases with user- or system-missing values (NMISS(AGE)).

• This in turn equals the number of cases with either valid or user-missing values (N.(AGE)) plus the number with system-missing values (NMISS.(AGE)).

• The same identities hold for the NU, NMISS, and NUMISS functions.

Default Treatment of Missing Values

AGGREGATE OUTFILE=’AGGEMP.SAV’ /MISSING=COLUMNWISE /BREAK=LOCATN
 /AVGSAL = MEAN(SALARY).

• AVGSAL is missing for an aggregated case if SALARY is missing for any case in the break group.

Including User-Missing Values

AGGREGATE OUTFILE=* /BREAK=DEPT
 /LOVAC = PLT.(VACDAY,10).

• LOVAC is the percentage of cases within each break group with values less than 10 for VACDAY, even if some of those values are defined as user missing.

Aggregated Values that Retain Missing-Value Status

AGGREGATE OUTFILE=’CLASS.SAV’ /BREAK=GRADE
  /FIRSTAGE = FIRST.(AGE).

• The first value of AGE in each break group is assigned to the variable FIRSTAGE.

• If the first value of AGE in a break group is user missing, that value will be assigned to FIRSTAGE. However, the value will retain its missing-value status, since variables created with FIRST take dictionary information from their source variables.

Related Topics

MISSING Subcommand (AGGREGATE command)
Comparing Missing-Value Treatments (AGGREGATE command)


Comparing Missing-Value Treatments (AGGREGATE command)

COLUMNWISE (keyword),COLUMNWISE (keyword),COLUMNWISE (keyword)
AGGREGATE command,AGGREGATE command,AGGREGATE command

The table below demonstrates the effects of specifying the MISSING subcommand and a period after the function name. Each entry in the table is the number of cases used to compute the specified function for the variable EDUC, which has 10 nonmissing cases, 5 user-missing cases, and 2 system-missing cases for the group. Note that columnwise treatment produces the same results as the default for every function except the MEAN function.

Default versus columnwise missing-value treatments
Function | Default | Columnwise
N | 17 | 17
N. | 17 | 17
N(EDUC) | 10 | 10
N.(EDUC) | 15 | 15
MEAN(EDUC) | 10 | 0
MEAN.(EDUC) | 15 | 0
NMISS(EDUC) | 7 | 7
NMISS.(EDUC) | 2 | 2

Related Topics

MISSING Subcommand (AGGREGATE command)
Including Missing Values (AGGREGATE command)


AIM

AIM (command),AIM (command),AIM (command)
AIM (command),AIM (command),AIM (command)
syntax chart,syntax chart,syntax chart

AIM is available in the Statistics Base option.

AIM grouping-var

  [/CATEGORICAL varlist]

  [/CONTINUOUS varlist]

  [/CRITERIA [ADJUST = {BONFERRONI**}] [CI = {95** }]
                       {NONE        }        {value}

             [HIDENOTSIG = {NO**}]] [SHOWREFLINE = {NO   }] ]
                           {YES }                  {YES**}

  [/MISSING {EXCLUDE**} ]
            {INCLUDE  }

  [/PLOT [CATEGORY] [CLUSTER [(TYPE = {BAR*})]] [ERRORBAR]
                                      {PIE }

         [IMPORTANCE [([X = {GROUP*  }] [Y = {TEST* }])]] ]
                            {VARIABLE}       {PVALUE}

* Default if the keyword is omitted.

** Default if the subcommand or keyword is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See AIM Algorithms for computational details for this procedure.

Syntax for the AIM command can be generated from the TwoStep Cluster Analysis dialog.

Example

AIM TSC_1
  /CATEGORICAL type
  /CONTINUOUS price engine_s horsepow wheelbas width length
              curb_wgt fuel_cap mpg
  /PLOT CLUSTER.

Related Topics

Overview (AIM command)
Grouping Variable (AIM command)
CATEGORICAL Subcommand (AIM command)
CONTINUOUS Subcommand (AIM command)
CRITERIA Subcommand (AIM command)
MISSING Subcommand (AIM command)
PLOT Subcommand (AIM command)


Overview (AIM command)

AIM provides graphical output to show the relative importance of categorical and scale variables to the formation of clusters of cases as indicated by the grouping variable.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is a grouping variable, a CATEGORICAL or CONTINUOUS subcommand, and a PLOT subcommand.

Subcommand Order Collapse Hide details

Subcommand Order

• The grouping variable must be specified first.

• Subcommands can be specified in any order.

Syntax Rules Collapse Hide details

Syntax Rules

• All subcommands should be specified only once. If a subcommand is repeated, only the last specification will be used.

Limitations Collapse Hide details

Limitations

The WEIGHT variable, if specified, is ignored by this procedure.

Related Topics

AIM
Grouping Variable (AIM command)
CATEGORICAL Subcommand (AIM command)
CONTINUOUS Subcommand (AIM command)
CRITERIA Subcommand (AIM command)
MISSING Subcommand (AIM command)
PLOT Subcommand (AIM command)


Grouping Variable (AIM command)

AIM (command),AIM (command),AIM (command)
grouping variable,grouping variable,grouping variable

• The grouping variable must be the first specification after the procedure name.

• The grouping variable can be of any type (numeric or string).

Example

AIM clu_id
  /CONTINUOUS age work salary.

• This is a typical example where CLU_ID is the cluster membership saved from a clustering procedure (say TwoStep Cluster) where AGE, WORK, and SALARY are the variables used to find the clusters.

Related Topics

AIM
Overview (AIM command)
CATEGORICAL Subcommand (AIM command)
CONTINUOUS Subcommand (AIM command)
CRITERIA Subcommand (AIM command)
MISSING Subcommand (AIM command)
PLOT Subcommand (AIM command)


CATEGORICAL Subcommand (AIM command)

AIM (command),AIM (command),AIM (command)
CATEGORICAL subcommand,CATEGORICAL subcommand,CATEGORICAL subcommand
CATEGORICAL (subcommand),CATEGORICAL (subcommand),CATEGORICAL (subcommand)
AIM command,AIM command,AIM command

Variables that are specified in this subcommand are treated as categorical variables, regardless of their defined measurement level.

• There is no restriction on the types of variables that can be specified on this subcommand.

• The grouping variable cannot be specified on this subcommand.

Related Topics

AIM
Overview (AIM command)
Grouping Variable (AIM command)
CONTINUOUS Subcommand (AIM command)
CRITERIA Subcommand (AIM command)
MISSING Subcommand (AIM command)
PLOT Subcommand (AIM command)


CONTINUOUS Subcommand (AIM command)

AIM (command),AIM (command),AIM (command)
CONTINUOUS subcommand,CONTINUOUS subcommand,CONTINUOUS subcommand
CONTINUOUS (subcommand),CONTINUOUS (subcommand),CONTINUOUS (subcommand)
AIM command,AIM command,AIM command

Variables that are specified in this subcommand are treated as scale variables, regardless of their defined measurement level.

• Variables specified on this subcommand must be numeric.

• The grouping variable cannot be specified on this subcommand.

Related Topics

AIM
Overview (AIM command)
Grouping Variable (AIM command)
CATEGORICAL Subcommand (AIM command)
CRITERIA Subcommand (AIM command)
MISSING Subcommand (AIM command)
PLOT Subcommand (AIM command)


CRITERIA Subcommand (AIM command)

AIM (command),AIM (command),AIM (command)
CRITERIA subcommand,CRITERIA subcommand,CRITERIA subcommand
CRITERIA (subcommand),CRITERIA (subcommand),CRITERIA (subcommand)
AIM command,AIM command,AIM command

The CRITERIA subcommand offers the following options in producing graphs.

ADJUST (keyword),ADJUST (keyword),ADJUST (keyword)
AIM command,AIM command,AIM command
BONFERRONI (keyword),BONFERRONI (keyword),BONFERRONI (keyword)
AIM command,AIM command,AIM command
NONE (keyword),NONE (keyword),NONE (keyword)
AIM command,AIM command,AIM command
CI (keyword),CI (keyword),CI (keyword)
AIM command,AIM command,AIM command
HIDENOTSIG (keyword),HIDENOTSIG (keyword),HIDENOTSIG (keyword)
AIM command,AIM command,AIM command
YES (keyword),YES (keyword),YES (keyword)
AIM command,AIM command,AIM command
NO (keyword),NO (keyword),NO (keyword)
AIM command,AIM command,AIM command
SHOWREFLINE (keyword),SHOWREFLINE (keyword),SHOWREFLINE (keyword)
AIM command,AIM command,AIM command
ADJUST = BONFERRONI | NONE
 | Adjust the confidence level for simultaneous confidence intervals or the tolerance level for simultaneous tests. BONFERRONI uses Bonferroni adjustments. This is the default. NONE specifies that no adjustments should be applied.
CI = number | Confidence Interval. This option controls the confidence level. Specify a value greater than 0 and less than 100. The default value is 95.
HIDENOTSIG = NO | YES
 | Hide groups or variables that are determined to be not significant. YES specifies that all confidence intervals and all test results should be shown. This is the default. NO specifies that only the significant confidence intervals and test results should be shown.
SHOWREFLINE = NO | YES
 | Display reference lines that are the critical values or the tolerance levels in tests. YES specifies that the appropriate reference lines should be shown. This is the default. NO specifies that reference lines should not be shown.

Related Topics

AIM
Overview (AIM command)
Grouping Variable (AIM command)
CATEGORICAL Subcommand (AIM command)
CONTINUOUS Subcommand (AIM command)
MISSING Subcommand (AIM command)
PLOT Subcommand (AIM command)


MISSING Subcommand (AIM command)

AIM (command),AIM (command),AIM (command)
MISSING subcommand,MISSING subcommand,MISSING subcommand
MISSING (subcommand),MISSING (subcommand),MISSING (subcommand)
AIM command,AIM command,AIM command

The MISSING subcommand specifies the way to handle cases with user-missing values.

• A case is never used if it contains system-missing values in the grouping variable, categorical variable list, or the continuous variable list.

• If this subcommand is not specified, the default is EXCLUDE.

EXCLUDE (keyword),EXCLUDE (keyword),EXCLUDE (keyword)
AIM command,AIM command,AIM command
INCLUDE (keyword),INCLUDE (keyword),INCLUDE (keyword)
AIM command,AIM command,AIM command
EXCLUDE | Exclude both user-missing and system-missing values. This is the default.
INCLUDE | User-missing values are treated as valid. Only system-missing values are not included in the analysis.

Related Topics

AIM
Overview (AIM command)
Grouping Variable (AIM command)
CATEGORICAL Subcommand (AIM command)
CONTINUOUS Subcommand (AIM command)
CRITERIA Subcommand (AIM command)
PLOT Subcommand (AIM command)


PLOT Subcommand (AIM command)

AIM (command),AIM (command),AIM (command)
PLOT subcommand,PLOT subcommand,PLOT subcommand
PLOT (subcommand),PLOT (subcommand),PLOT (subcommand)
AIM command,AIM command,AIM command

The PLOT subcommand specifies which graphs to produce.

CATEGORY (keyword),CATEGORY (keyword),CATEGORY (keyword)
AIM command,AIM command,AIM command
CLUSTER (keyword),CLUSTER (keyword),CLUSTER (keyword)
AIM command,AIM command,AIM command
BAR (keyword),BAR (keyword),BAR (keyword)
AIM command,AIM command,AIM command
PIE (keyword),PIE (keyword),PIE (keyword)
AIM command,AIM command,AIM command
ERRORBAR (keyword),ERRORBAR (keyword),ERRORBAR (keyword)
AIM command,AIM command,AIM command
IMPORTANCE (keyword),IMPORTANCE (keyword),IMPORTANCE (keyword)
AIM command,AIM command,AIM command
GROUP (keyword),GROUP (keyword),GROUP (keyword)
AIM command,AIM command,AIM command
VARIABLE (keyword),VARIABLE (keyword),VARIABLE (keyword)
AIM command,AIM command,AIM command
TEST (keyword),TEST (keyword),TEST (keyword)
AIM command,AIM command,AIM command
PVALUE (keyword),PVALUE (keyword),PVALUE (keyword)
AIM command,AIM command,AIM command
CATEGORY | Within Cluster Percentages. This option displays a clustered bar chart for each categorical variable. The bars represent percentages of categories in each cluster. The cluster marginal count is used as the base for the percentages.
CLUSTER (TYPE=BAR | PIE)
 | Cluster frequency charts. Displays a bar or pie chart, depending upon the option selected, representing the frequency of each level of the grouping variable.
ERRORBAR | Error Bar. This option displays an error bar by group ID for each continuous variable.
IMPORTANCE (X=GROUP | VARIABLE Y=TEST | PVALUE)
 | Attribute Importance. This option displays a bar chart that shows the relative importance of the attributes/variables. The specified options further control the display.
 | X = GROUP causes values of the grouping variable to be displayed on the x axis. A separate chart is produced for each variable. X = VARIABLE causes variable names to be displayed on the x axis. A separate chart is produced for each value of the grouping variable.
 | Y = TEST causes test statistics to be displayed on the y axis. Student’s t statistics are displayed for scale variables, and chi-square statistics are displayed for categorical variables. Y = PVALUE causes p-value-related measures to be displayed on the y axis. Specifically, −log10(pvalue) is shown so that in both cases larger values indicate "more significant" results.

Example: Importance Charts by Group

AIM clu_id
  /CONTINUOUS age work salary
  /CATEGORICAL minority
  /PLOT CATEGORY CLUSTER (TYPE = PIE) IMPORTANCE (X=GROUP Y=TEST).

• A frequency pie chart is requested.

• Student’s t statistics are plotted against the group ID for each scale variable, and chi-square statistics are plotted against the group ID for each categorical variable.

Example: Importance Charts by Variable

AIM clu_id
  /CONTINUOUS age work salary
  /CATEGORICAL minority
  /CRITERIA HIDENOTSIG=YES CI=95 ADJUST=NONE
  /PLOT CATEGORY CLUSTER (TYPE = BAR)
             IMPORTANCE (X = VARIABLE, Y = PVALUE).

• A frequency bar chart is requested.

• –log10(pvalue) values are plotted against variables, both scale and categorical, for each level of the grouping variable.

• In addition, bars are not shown if their p values exceed 0.05.

Related Topics

AIM
Overview (AIM command)
Grouping Variable (AIM command)
CATEGORICAL Subcommand (AIM command)
CONTINUOUS Subcommand (AIM command)
CRITERIA Subcommand (AIM command)
MISSING Subcommand (AIM command)


ALTER TYPE

ALTER TYPE (command),ALTER TYPE (command),ALTER TYPE (command)
syntax chart,syntax chart,syntax chart
ALTER TYPE varlist([input format = ] {output format    }) [varlist...]
                                     {AMIN [+ [n[%]]   }
                                     {AHEXMIN [+ [n[%]]}
  [/PRINT {[ALTEREDTYPES*] [ALTEREDVALUES]}]
          {NONE                          }

* Default if subcommand omitted.

Release History Collapse Hide details

Release History

Release 16.0

• Command introduced.

Example

ALTER TYPE StringDate1 to StringDate4 (Date11).
ALTER TYPE ALL (A=AMIN).

Related Topics

Overview (ALTER TYPE command)
PRINT Subcommand (ALTER TYPE command)


Overview (ALTER TYPE command)

ALTER TYPE (command),ALTER TYPE (command),ALTER TYPE (command)

ALTER TYPE can be used to change the fundamental type (string or numeric) or format of variables, including changing the defined width of string variables.

Options Collapse Hide details

Options

• You can use the TO keyword to specify a list of variables or the ALL keyword to specify all variables in the active dataset.

• The optional input format specification restricts the type modification to only variables in the list that match the input format. If the input format doesn't include a width specification, all variables that match the basic format are included. An input format specification without a width specification includes all variables that match the basic format, regardless of defined width.

• AMIN or AHEXMIN can be used as the output format specification to change the defined width of a string variable to the minimum width necessary to display all observed values of that variable without truncation.

• AMIN + n or AHEXMIN + n sets the width of string variables to the minimum necessary width plus n bytes.

• AMIN + n% or AHEXMIN + n% sets the width of string variables to the minimum necessary width plus n percent of that width. The result is rounded to an integer.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is the name of a variable in the active dataset followed by an output format specification enclosed in parentheses, as in:

ALTER TYPE StringVar (A4).
Syntax Rules Collapse Hide details

Syntax Rules

• All variables specified or implied in the variable list(s) must exist in the active dataset.

• Each variable list must be followed by a format specification enclosed in parentheses.

• Format specifications must be valid PASW Statistics formats. For information on valid format specifications, see Variable Types and Formats.

• If specified, the optional input format must be followed by an equals sign and then the output format.

• If a variable is included in more than one variable list on the same ALTER TYPE command, only the format specification associated with the last instance of the variable name will be applied. (If you want to "chain" multiple modifications for the same variable, use multiple ALTER TYPE commands.)

Operations Collapse Hide details

Operations

• If the command does not include any AMIN or AHEXMIN format specifications and does not include ALTEREDVALUES on the PRINT subcommand, the command takes effect immediately. It does not read the active dataset or execute pending transformations.

• If the command includes one or more AMIN or AHEXMIN format specifications or includes ALTEREDVALUES on the PRINT subcommand, the command reads the active dataset and causes execution of any pending transformations.

• Converting a numeric variable to string will result in truncated values if the numeric value cannot be represented in the specified string width.

• Converting a string variable to numeric will result in a system-missing value if the string contains characters that would be invalid for the specified numeric format.

Examples Collapse Hide details

Examples

DATA LIST FREE
  /Numvar1 (F2) Numvar2 (F1)
  StringVar1 (A20) StringVar2 (A30)
  StringDate1 (A11) StringDate2 (A10) StringDate3 (A10).
BEGIN DATA
1 23 a234 b2345 28-Oct-2007 10/28/2007 10/29/2008
END DATA.
ALTER TYPE Numvar1 (F5.2) Numvar2 (F3).
ALTER TYPE
   StringDate1 to StringDate3 (A11 = DATE11).
ALTER TYPE
   StringDate1 to StringDate3 (A10 = ADATE10).
ALTER TYPE ALL (A=AMIN).

• The first ALTER TYPE command changes the formats of Numvar1 and Numvar2 from F2 and F1 to F5.2 and F3.

• The next ALTER TYPE command converts all string variables between StringDate1 and StringDate3 (in file order) with a defined string width of 11 to the numeric date format DATE11 (dd-mmm-yyyy). The only variable that meets these criteria is StringDate1; so that is the only variable converted.

• The third ALTER TYPE command converts all string variables between StringDate1 and StringDate3 with a defined string width of 10 to the numeric date format ADATE11 (mm/dd/yyyy). In this example, this conversion is applied to StringDate2 and StringDate3.

• The last ALTER TYPE command changes the defined width of all remaining string variables to the minimum width necessary for each variable to avoid truncation of any values. In this example, StringVar1 changes from A20 to A4 and StringVar2 changes from A30 to A5. This command reads the data and executes any pending transformation commands.

Related Topics

ALTER TYPE
PRINT Subcommand (ALTER TYPE command)


PRINT Subcommand (ALTER TYPE command)

ALTER TYPE (command),ALTER TYPE (command),ALTER TYPE (command)
PRINT subcommand,PRINT subcommand,PRINT subcommand
PRINT (subcommand),PRINT (subcommand),PRINT (subcommand)
ALTER TYPE command,ALTER TYPE command,ALTER TYPE command

The optional PRINT subcommand controls the display of information about the variables modified by the ALTER TYPE command. The following options are available:

ALTEREDTYPES. Display a list of variables for which the formats were changed and the old and new formats. This is the default.

ALTEREDVALUES. Display a report of values that were changed if the fundamental type (string or numeric) was changed or the defined string width was changed. This report is limited to the first 25 values that were changed for each variable.

NONE. Don't display any summary information. This is an alternative to ALTEREDTYPES and/or ALTEREDVALUES and cannot be used in combination with them.

Related Topics

ALTER TYPE
Overview (ALTER TYPE command)


ALSCAL

Multidimensional Scaling,Multidimensional Scaling,Multidimensional Scaling
command syntax,command syntax,command syntax
ALSCAL (command),ALSCAL (command),ALSCAL (command)
ALSCAL (command),ALSCAL (command),ALSCAL (command)
syntax chart,syntax chart,syntax chart

ALSCAL is available in the Statistics Base option.

ALSCAL  VARIABLES=varlist

 [/FILE='savfile'|'dataset']
              [CONFIG  [({INITIAL})]]  [ROWCONF [({INITIAL})]]
                         {FIXED  }                {FIXED  }

               [COLCONF [({INITIAL})]]  [SUBJWGHT[({INITIAL})]]
                          {FIXED  }                {FIXED  }

               [STIMWGHT[({INITIAL})]]
                          {FIXED  }

 [/INPUT=ROWS ({ALL**})]
               { n   }

 [/SHAPE={SYMMETRIC**}]
         {ASYMMETRIC }
         {RECTANGULAR}

 [/LEVEL={ORDINAL**  [([UNTIE] [SIMILAR])]}]
         {INTERVAL[({1})]                 }
         {          {n}                   }
         {RATIO[({1})]                    }
         {       {n}                      }
         {NOMINAL                         }

 [/CONDITION={MATRIX**     }]
             {ROW          }
             {UNCONDITIONAL}

 [/{MODEL }={EUCLID**}]
   {METHOD} {INDSCAL }
            {ASCAL   }
            {AINDS   }
            {GEMSCAL }

 [/CRITERIA=[NEGATIVE] [CUTOFF({0**})] [CONVERGE({.001})]
                               { n }             { n  }

         [ITER({30})] [STRESSMIN({.005})] [NOULB]
               {n }              { n  }

         [DIMENS({2**      })] [DIRECTIONS(n)]
                 {min[,max]}

         [CONSTRAIN]  [TIESTORE(n)]]

 [/PRINT=[DATA] [HEADER]]    [/PLOT=[DEFAULT] [ALL]]

 [/OUTFILE='savfile'|'dataset']

 [/MATRIX=IN({'savfile'|'dataset'})]
             {*                  }

**Default if the subcommand or keyword is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See ALSCAL Algorithms for computational details for this procedure.

Syntax for the ALSCAL command can be generated from the Multidimensional Scaling dialog.

Example

ALSCAL VARIABLES=ATLANTA TO TAMPA.

ALSCAL was originally designed and programmed by Forrest W. Young, Yoshio Takane, and Rostyslaw J. Lewyckyj of the Psychometric Laboratory, University of North Carolina.

Related Topics

Overview (ALSCAL command)
Example (ALSCAL command)
VARIABLES Subcommand (ALSCAL command)
INPUT Subcommand (ALSCAL command)
SHAPE Subcommand (ALSCAL command)
LEVEL Subcommand (ALSCAL command)
CONDITION Subcommand (ALSCAL command)
FILE Subcommand (ALSCAL command)
MODEL Subcommand (ALSCAL command)
CRITERIA Subcommand (ALSCAL command)
PRINT Subcommand (ALSCAL command)
PLOT Subcommand (ALSCAL command)
OUTFILE Subcommand (ALSCAL command)
MATRIX Subcommand (ALSCAL command)
Specification of Analyses (ALSCAL command)
References (ALSCAL command)


Overview (ALSCAL command)

ALSCAL uses an alternating least-squares algorithm to perform multidimensional scaling (MDS) and multidimensional unfolding (MDU). You can select one of the five models to obtain stimulus coordinates and/or weights in multidimensional space.

Options Collapse Hide details

Options

Data Input. You can read inline data matrices, including all types of two- or three-way data, such as a single matrix or a matrix for each of several subjects, using the INPUT subcommand. You can read square (symmetrical or asymmetrical) or rectangular matrices of proximities with the SHAPE subcommand and proximity matrices created by PROXIMITIES and CLUSTER with the MATRIX subcommand. You can also read a file of coordinates and/or weights to provide initial or fixed values for the scaling process with the FILE subcommand.

Methodological Assumptions. You can specify data as matrix-conditional, row-conditional, or unconditional on the CONDITION subcommand. You can treat data as nonmetric (nominal or ordinal) or as metric (interval or ratio) using the LEVEL subcommand. You can also use LEVEL to identify ordinal-level proximity data as measures of similarity or dissimilarity, and you can specify tied observations as untied (continuous) or leave them tied (discrete).

Model Selection. You can specify the most commonly used multidimensional scaling models by selecting the correct combination of ALSCAL subcommands, keywords, and criteria. In addition to the default Euclidean distance model, the MODEL subcommand offers the individual differences (weighted) Euclidean distance model (INDSCAL), the asymmetric Euclidean distance model (ASCAL), the asymmetric individual differences Euclidean distance model (AINDS), and the generalized Euclidean metric individual differences model (GEMSCAL).

Output. You can produce output that includes raw and scaled input data, missing-value patterns, normalized data with means, squared data with additive constants, each subject’s scalar product and individual weight space, plots of linear or nonlinear fit, and plots of the data transformations using the PRINT and PLOT subcommands.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is VARIABLES followed by a variable list. By default, ALSCAL produces a two-dimensional nonmetric Euclidean multidimensional scaling solution. Input is assumed to be one or more square symmetric matrices with data elements that are dissimilarities at the ordinal level of measurement. Ties are not untied, and conditionality is by subject. Values less than 0 are treated as missing. The default output includes the improvement in Young’s S-stress for successive iterations, two measures of fit for each input matrix (Kruskal’s stress and the squared correlation, RSQ), and the derived configurations for each of the dimensions.

Subcommand Order Collapse Hide details

Subcommand Order

Subcommands can be named in any order.

Operations Collapse Hide details

Operations

• ALSCAL calculates the number of input matrices by dividing the total number of observations in the dataset by the number of rows in each matrix. All matrices must contain the same number of rows. This number is determined by the settings on SHAPE and INPUT (if used). For square matrix data, the number of rows in the matrix equals the number of variables. For rectangular matrix data, it equals the number of rows specified or implied. For additional information, see the INPUT and SHAPE subcommands below.

• ALSCAL ignores user-missing specifications in all variables in the configuration/weights file. See the topic FILE Subcommand (ALSCAL command) for more information. The system-missing value is converted to 0.

• With split-file data, ALSCAL reads initial or fixed configurations from the configuration/weights file for each split-file group. See the topic FILE Subcommand (ALSCAL command) for more information. If there is only one initial configuration in the file, ALSCAL rereads these initial or fixed values for successive split-file groups.

• By default, ALSCAL estimates upper and lower bounds on missing values in the active dataset in order to compute the initial configuration. To prevent this, specify CRITERIA=NOULB. Missing values are always ignored during the iterative process.

ALSCAL (command),ALSCAL (command),ALSCAL (command)
limitations,limitations,limitations
Limitations Collapse Hide details

Limitations

• A maximum of 100 variables on the VARIABLES subcommand.

• A maximum of six dimensions can be scaled.

• ALSCAL does not recognize data weights created by the WEIGHT command.

• ALSCAL analyses can include no more than 32,767 values in each of the input matrices. Large analyses may require significant computing time.

Related Topics

ALSCAL
Example (ALSCAL command)
VARIABLES Subcommand (ALSCAL command)
INPUT Subcommand (ALSCAL command)
SHAPE Subcommand (ALSCAL command)
LEVEL Subcommand (ALSCAL command)
CONDITION Subcommand (ALSCAL command)
FILE Subcommand (ALSCAL command)
MODEL Subcommand (ALSCAL command)
CRITERIA Subcommand (ALSCAL command)
PRINT Subcommand (ALSCAL command)
PLOT Subcommand (ALSCAL command)
OUTFILE Subcommand (ALSCAL command)
MATRIX Subcommand (ALSCAL command)
Specification of Analyses (ALSCAL command)
References (ALSCAL command)


Example (ALSCAL command)

* Air distances among U.S. cities.
* Data are from Johnson and Wichern (1982), page 563.
DATA LIST
 /ATLANTA BOSTON CINCNATI COLUMBUS DALLAS INDNPLIS
   LITTROCK LOSANGEL MEMPHIS STLOUIS SPOKANE TAMPA 1-60.
BEGIN DATA
   0
1068    0
 461  867    0
 549  769  107    0
 805 1819  943 1050    0
 508  941  108  172  882    0
 505 1494  618  725  325  562    0
2197 3052 2186 2245 1403 2080 1701    0
 366 1355  502  586  464  436  137 1831    0
 558 1178  338  409  645  234  353 1848  294    0
2467 2747 2067 2131 1891 1959 1988 1227 2042 1820    0
 467 1379  928  985 1077  975  912 2480  779 1016 2821   0
END DATA.

ALSCAL VARIABLES=ATLANTA TO TAMPA
 /PLOT.

• By default, ALSCAL assumes a symmetric matrix of dissimilarities for ordinal-level variables. Only values below the diagonal are used. The upper triangle can be left blank. The 12 cities form the rows and columns of the matrix.

• The result is a classical MDS analysis that reproduces a map of the United States when the output is rotated to a north-south by east-west orientation.

Related Topics

ALSCAL
Overview (ALSCAL command)
VARIABLES Subcommand (ALSCAL command)
INPUT Subcommand (ALSCAL command)
SHAPE Subcommand (ALSCAL command)
LEVEL Subcommand (ALSCAL command)
CONDITION Subcommand (ALSCAL command)
FILE Subcommand (ALSCAL command)
MODEL Subcommand (ALSCAL command)
CRITERIA Subcommand (ALSCAL command)
PRINT Subcommand (ALSCAL command)
PLOT Subcommand (ALSCAL command)
OUTFILE Subcommand (ALSCAL command)
MATRIX Subcommand (ALSCAL command)
Specification of Analyses (ALSCAL command)
References (ALSCAL command)


VARIABLES Subcommand (ALSCAL command)

VARIABLES (subcommand),VARIABLES (subcommand),VARIABLES (subcommand)
ALSCAL command,ALSCAL command,ALSCAL command
ALSCAL (command),ALSCAL (command),ALSCAL (command)
VARIABLES subcommand,VARIABLES subcommand,VARIABLES subcommand
distance matrix,distance matrix,distance matrix
ALSCAL command,ALSCAL command,ALSCAL command

VARIABLES identifies the columns in the proximity matrix or matrices that ALSCAL reads.

• VARIABLES is required and can name only numeric variables.

• Each matrix must have at least four rows and four columns.

Related Topics

ALSCAL
Overview (ALSCAL command)
Example (ALSCAL command)
INPUT Subcommand (ALSCAL command)
SHAPE Subcommand (ALSCAL command)
LEVEL Subcommand (ALSCAL command)
CONDITION Subcommand (ALSCAL command)
FILE Subcommand (ALSCAL command)
MODEL Subcommand (ALSCAL command)
CRITERIA Subcommand (ALSCAL command)
PRINT Subcommand (ALSCAL command)
PLOT Subcommand (ALSCAL command)
OUTFILE Subcommand (ALSCAL command)
MATRIX Subcommand (ALSCAL command)
Specification of Analyses (ALSCAL command)
References (ALSCAL command)


INPUT Subcommand (ALSCAL command)

INPUT (subcommand),INPUT (subcommand),INPUT (subcommand)
ALSCAL command,ALSCAL command,ALSCAL command
ALSCAL (command),ALSCAL (command),ALSCAL (command)
INPUT subcommand,INPUT subcommand,INPUT subcommand
ALSCAL (command),ALSCAL (command),ALSCAL (command)
specifying input rows,specifying input rows,specifying input rows

ALSCAL reads data row by row, with each case in the active dataset representing a single row in the data matrix. (VARIABLES specifies the columns.) Use INPUT when reading rectangular data matrices to specify how many rows are in each matrix.

ROWS (keyword),ROWS (keyword),ROWS (keyword)
ALSCAL command,ALSCAL command,ALSCAL command

• The specification on INPUT is ROWS. If INPUT is not specified or is specified without ROWS, the default is ROWS(ALL). ALSCAL assumes that each case in the active dataset represents one row of a single input matrix and that the result is a square matrix.

• You can specify the number of rows (n) in each matrix in parentheses after the keyword ROWS. The number of matrices equals the number of observations divided by the number specified.

• The number specified on ROWS must be at least 4 and must divide evenly into the total number of rows in the data.

• With split-file data, n refers to the number of cases in each split-file group. All split-file groups must have the same number of rows.

Example

ALSCAL VARIABLES=V1 to V7 /INPUT=ROWS(8).

• INPUT indicates that there are eight rows per matrix, with each case in the active dataset representing one row.

• The total number of cases must be divisible by 8.

Related Topics

ALSCAL
Overview (ALSCAL command)
Example (ALSCAL command)
VARIABLES Subcommand (ALSCAL command)
SHAPE Subcommand (ALSCAL command)
LEVEL Subcommand (ALSCAL command)
CONDITION Subcommand (ALSCAL command)
FILE Subcommand (ALSCAL command)
MODEL Subcommand (ALSCAL command)
CRITERIA Subcommand (ALSCAL command)
PRINT Subcommand (ALSCAL command)
PLOT Subcommand (ALSCAL command)
OUTFILE Subcommand (ALSCAL command)
MATRIX Subcommand (ALSCAL command)
Specification of Analyses (ALSCAL command)
References (ALSCAL command)


SHAPE Subcommand (ALSCAL command)

SHAPE (subcommand),SHAPE (subcommand),SHAPE (subcommand)
ALSCAL command,ALSCAL command,ALSCAL command
ALSCAL (command),ALSCAL (command),ALSCAL (command)
SHAPE subcommand,SHAPE subcommand,SHAPE subcommand
ALSCAL (command),ALSCAL (command),ALSCAL (command)
defining data shape,defining data shape,defining data shape

Use SHAPE to specify the structure of the input data matrix or matrices.

• You can specify one of the three keywords listed below.

• Both SYMMETRIC and ASYMMETRIC refer to square matrix data.

symmetric matrix,symmetric matrix,symmetric matrix
ALSCAL command,ALSCAL command,ALSCAL command
SYMMETRIC (keyword),SYMMETRIC (keyword),SYMMETRIC (keyword)
ALSCAL command,ALSCAL command,ALSCAL command
asymmetric matrix,asymmetric matrix,asymmetric matrix
ALSCAL command,ALSCAL command,ALSCAL command
ASYMMETRIC (keyword),ASYMMETRIC (keyword),ASYMMETRIC (keyword)
ALSCAL command,ALSCAL command,ALSCAL command
rectangular matrix,rectangular matrix,rectangular matrix
ALSCAL command,ALSCAL command,ALSCAL command
RECTANGULAR (keyword),RECTANGULAR (keyword),RECTANGULAR (keyword)
ALSCAL command,ALSCAL command,ALSCAL command
SYMMETRIC | Symmetric data matrix or matrices. For a symmetric matrix, ALSCAL looks only at the values below the diagonal. Values on and above the diagonal can be omitted. This is the default.
ASYMMETRIC | Asymmetric data matrix or matrices. The corresponding values in the upper and lower triangles are not all equal. The diagonal is ignored.
RECTANGULAR | Rectangular data matrix or matrices. The rows and columns represent different sets of items.

Example

ALSCAL VAR=V1 TO V8 /SHAPE=RECTANGULAR.

• ALSCAL performs a classical MDU analysis, treating the rows and columns as separate sets of items.

Related Topics

ALSCAL
Overview (ALSCAL command)
Example (ALSCAL command)
VARIABLES Subcommand (ALSCAL command)
INPUT Subcommand (ALSCAL command)
LEVEL Subcommand (ALSCAL command)
CONDITION Subcommand (ALSCAL command)
FILE Subcommand (ALSCAL command)
MODEL Subcommand (ALSCAL command)
CRITERIA Subcommand (ALSCAL command)
PRINT Subcommand (ALSCAL command)
PLOT Subcommand (ALSCAL command)
OUTFILE Subcommand (ALSCAL command)
MATRIX Subcommand (ALSCAL command)
Specification of Analyses (ALSCAL command)
References (ALSCAL command)


LEVEL Subcommand (ALSCAL command)

LEVEL (subcommand),LEVEL (subcommand),LEVEL (subcommand)
ALSCAL command,ALSCAL command,ALSCAL command
ALSCAL (command),ALSCAL (command),ALSCAL (command)
LEVEL subcommand,LEVEL subcommand,LEVEL subcommand
ALSCAL (command),ALSCAL (command),ALSCAL (command)
level of measurement,level of measurement,level of measurement

LEVEL identifies the level of measurement for the values in the data matrix or matrices. You can specify one of the keywords defined below.

ordinal,ordinal,ordinal
ALSCAL command,ALSCAL command,ALSCAL command
ORDINAL (keyword),ORDINAL (keyword),ORDINAL (keyword)
ALSCAL command,ALSCAL command,ALSCAL command
interval data,interval data,interval data
ALSCAL command,ALSCAL command,ALSCAL command
INTERVAL (keyword),INTERVAL (keyword),INTERVAL (keyword)
ALSCAL command,ALSCAL command,ALSCAL command
ratio data,ratio data,ratio data
ALSCAL command,ALSCAL command,ALSCAL command
RATIO (keyword),RATIO (keyword),RATIO (keyword)
ALSCAL command,ALSCAL command,ALSCAL command
nominal,nominal,nominal
ALSCAL command,ALSCAL command,ALSCAL command
NOMINAL (keyword),NOMINAL (keyword),NOMINAL (keyword)
ALSCAL command,ALSCAL command,ALSCAL command
ORDINAL | Ordinal-level data. This specification is the default. It treats the data as ordinal, using Kruskal’s least-squares monotonic transformation (Kruskal, 1964). The analysis is nonmetric. By default, the data are treated as discrete dissimilarities. Ties in the data remain tied throughout the analysis. To change the default, specify UNTIE and/or SIMILAR in parentheses. UNTIE treats the data as continuous and resolves ties in an optimal fashion; SIMILAR treats the data as similarities. UNTIE and SIMILAR cannot be used with the other levels of measurement.
INTERVAL(n) | Interval-level data. This specification produces a metric analysis of the data using classical regression techniques. You can specify any integer from 1 to 4 in parentheses for the degree of polynomial transformation to be fit to the data. The default is 1.
RATIO(n) | Ratio-level data. This specification produces a metric analysis. You can specify an integer from 1 to 4 in parentheses for the degree of polynomial transformation. The default is 1.
NOMINAL | Nominal-level data. This specification treats the data as nominal by using a least-squares categorical transformation (Takane, Young, and de Leeuw, 1977). This option produces a nonmetric analysis of nominal data. It is useful when there are few observed categories, when there are many observations in each category, and when the order of the categories is not known.

Example

ALSCAL VAR=ATLANTA TO TAMPA /LEVEL=INTERVAL(2).

• This example identifies the distances between U.S. cities as interval-level data. The 2 in parentheses indicates a polynomial transformation with linear and quadratic terms.

Related Topics

ALSCAL
Overview (ALSCAL command)
Example (ALSCAL command)
VARIABLES Subcommand (ALSCAL command)
INPUT Subcommand (ALSCAL command)
SHAPE Subcommand (ALSCAL command)
CONDITION Subcommand (ALSCAL command)
FILE Subcommand (ALSCAL command)
MODEL Subcommand (ALSCAL command)
CRITERIA Subcommand (ALSCAL command)
PRINT Subcommand (ALSCAL command)
PLOT Subcommand (ALSCAL command)
OUTFILE Subcommand (ALSCAL command)
MATRIX Subcommand (ALSCAL command)
Specification of Analyses (ALSCAL command)
References (ALSCAL command)


CONDITION Subcommand (ALSCAL command)

CONDITION (subcommand),CONDITION (subcommand),CONDITION (subcommand)
ALSCAL command,ALSCAL command,ALSCAL command
ALSCAL (command),ALSCAL (command),ALSCAL (command)
CONDITION subcommand,CONDITION subcommand,CONDITION subcommand
ALSCAL (command),ALSCAL (command),ALSCAL (command)
conditionality,conditionality,conditionality

CONDITION specifies which numbers in a dataset are comparable.

conditionality,conditionality,conditionality
matrix,matrix,matrix
MATRIX (keyword),MATRIX (keyword),MATRIX (keyword)
ALSCAL command,ALSCAL command,ALSCAL command
conditionality,conditionality,conditionality
row,row,row
ROW (keyword),ROW (keyword),ROW (keyword)
ALSCAL command,ALSCAL command,ALSCAL command
conditionality,conditionality,conditionality
unconditional data,unconditional data,unconditional data
UNCONDITIONAL (keyword),UNCONDITIONAL (keyword),UNCONDITIONAL (keyword)
ALSCAL command,ALSCAL command,ALSCAL command
MATRIX | Only numbers within each matrix are comparable. If each matrix represents a different subject, this specification makes comparisons conditional by subject. This is the default.
ROW | Only numbers within the same row are comparable. This specification is appropriate only for asymmetric or rectangular data. They cannot be used when ASCAL or AINDS is specified on MODEL.
UNCONDITIONAL | All numbers are comparable. Comparisons can be made among any values in the input matrix or matrices.

Example

ALSCAL VAR=V1 TO V8 /SHAPE=RECTANGULAR /CONDITION=ROW.

• ALSCAL performs a Euclidean MDU analysis conditional on comparisons within rows.

Related Topics

ALSCAL
Overview (ALSCAL command)
Example (ALSCAL command)
VARIABLES Subcommand (ALSCAL command)
INPUT Subcommand (ALSCAL command)
SHAPE Subcommand (ALSCAL command)
LEVEL Subcommand (ALSCAL command)
FILE Subcommand (ALSCAL command)
MODEL Subcommand (ALSCAL command)
CRITERIA Subcommand (ALSCAL command)
PRINT Subcommand (ALSCAL command)
PLOT Subcommand (ALSCAL command)
OUTFILE Subcommand (ALSCAL command)
MATRIX Subcommand (ALSCAL command)
Specification of Analyses (ALSCAL command)
References (ALSCAL command)


FILE Subcommand (ALSCAL command)

FILE (subcommand),FILE (subcommand),FILE (subcommand)
ALSCAL command,ALSCAL command,ALSCAL command
ALSCAL (command),ALSCAL (command),ALSCAL (command)
FILE subcommand,FILE subcommand,FILE subcommand
ALSCAL (command),ALSCAL (command),ALSCAL (command)
input files,input files,input files

ALSCAL can read proximity data from the active dataset or, with the MATRIX subcommand, from a matrix data file created by PROXIMITIES or CLUSTER. The FILE subcommand reads a file containing additional data--an initial or fixed configuration for the coordinates of the stimuli and/or weights for the matrices being scaled. This file can be created with the OUTFILE subcommand on ALSCAL or with an input program (created with the INPUT PROGRAM command).

• The minimum specification is the file that contains the configurations and/or weights.

• FILE can include additional specifications that define the structure of the configuration/weights file.

• The variables in the configuration/weights file that correspond to successive ALSCAL dimensions must have the names DIM1, DIM2, ..., DIMr, where r is the maximum number of ALSCAL dimensions. The file must also contain the short string variable TYPE_ to identify the types of values in all rows.

• Values for the variable TYPE_ can be CONFIG, ROWCONF, COLCONF, SUBJWGHT, and STIMWGHT, in that order. Each value can be truncated to the first three letters. Stimulus coordinate values are specified as CONFIG; row stimulus coordinates, as ROWCONF; column stimulus coordinates, as COLCONF; and subject and stimulus weights, as SUBJWGHT and STIMWGHT, respectively. ALSCAL accepts CONFIG and ROWCONF interchangeably.

• ALSCAL skips unneeded types as long as they appear in the file in their proper order. Generalized weights (GEM) and flattened subject weights (FLA) cannot be initialized or fixed and will always be skipped. (These weights can be generated by ALSCAL but cannot be used as input.)

The following list summarizes the optional specifications that can be used on FILE to define the structure of the configuration/weights file:

• Each specification can be further identified with the option INITIAL or FIXED in parentheses.

• INITIAL is the default. INITIAL indicates that the external configuration or weights are to be used as initial coordinates and are to be modified during each iteration.

• FIXED forces ALSCAL to use the externally defined structure without modification to calculate the best values for all unfixed portions of the structure.

stimulus configuration coordinates,stimulus configuration coordinates,stimulus configuration coordinates
ALSCAL command,ALSCAL command,ALSCAL command
CONFIG (keyword),CONFIG (keyword),CONFIG (keyword)
ALSCAL command,ALSCAL command,ALSCAL command
ROWCONF (keyword),ROWCONF (keyword),ROWCONF (keyword)
ALSCAL command,ALSCAL command,ALSCAL command
COLCONF (keyword),COLCONF (keyword),COLCONF (keyword)
ALSCAL command,ALSCAL command,ALSCAL command
SUBJWGHT (keyword),SUBJWGHT (keyword),SUBJWGHT (keyword)
ALSCAL command,ALSCAL command,ALSCAL command
subject weights,subject weights,subject weights
ALSCAL command,ALSCAL command,ALSCAL command
STIMWGHT (keyword),STIMWGHT (keyword),STIMWGHT (keyword)
ALSCAL command,ALSCAL command,ALSCAL command
stimulus weights,stimulus weights,stimulus weights
ALSCAL command,ALSCAL command,ALSCAL command
CONFIG | Read stimulus configuration. The configuration/weights file contains initial stimulus coordinates. Input of this type is appropriate when SHAPE=SYMMETRIC or SHAPE= ASYMMETRIC, or when the number of variables in a matrix equals the number of variables on the ALSCAL command. The value of the TYPE_ variable must be either CON or ROW for all stimulus coordinates for the configuration.
ROWCONF | Read row stimulus configuration. The configuration/weights file contains initial row stimulus coordinates. This specification is appropriate if SHAPE= RECTANGULAR and if the number of ROWCONF rows in the matrix equals the number of rows specified on the INPUT subcommand (or, if INPUT is omitted, the number of cases in the active dataset). The value of TYPE_ must be either ROW or CON for the set of coordinates for each row.
COLCONF | Read column stimulus configuration. The configuration/weights file contains initial column stimulus coordinates. This kind of file can be used only if SHAPE= RECTANGULAR and if the number of COLCONF rows in the matrix equals the number of variables on the ALSCAL command. The value of TYPE_ must be COL for the set of coordinates for each column.
SUBJWGHT | Read subject (matrix) weights. The configuration/weights file contains subject weights. The number of observations in a subject-weights matrix must equal the number of matrices in the proximity file. Subject weights can be used only if the model is INDSCAL, AINDS, or GEMSCAL. The value of TYPE_ for each set of weights must be SUB.
STIMWGHT | Read stimulus weights. The configuration/weights file contains stimulus weights. The number of observations in the configuration/weights file must equal the number of matrices in the proximity file. Stimulus weights can be used only if the model is AINDS or ASCAL. The value of TYPE_ for each set of weights must be STI.

If the optional specifications for the configuration/weights file are not specified on FILE, ALSCAL sequentially reads the TYPE_ values appropriate to the model and shape according to the defaults in the table below.

Example

ALSCAL VAR=V1 TO V8 /FILE=ONE CON(FIXED) STI(INITIAL).

• ALSCAL reads the configuration/weights file ONE.

• The stimulus coordinates are read as fixed values, and the stimulus weights are read as initial values.

Default specifications for the FILE subcommand
Shape | Model | Default specifications
SYMMETRIC | EUCLID | CONFIG (or ROWCONF)
 | INDSCAL | CONFIG (or ROWCONF) SUBJWGHT
 | GEMSCAL | CONFIG (or ROWCONF) SUBJWGHT
ASYMMETRIC | EUCLID | CONFIG (or ROWCONF)
 | INDSCAL | CONFIG (or ROWCONF) SUBJWGHT
 | GEMSCAL | CONFIG (or ROWCONF) SUBJWGHT
 | ASCAL | CONFIG (or ROWCONF) STIMWGHT
 | AINDS | CONFIG (or ROWCONF) SUBJWGHT STIMWGHT
RECTANGULAR | EUCLID | ROWCONF (or CONFIG) COLCONF
 | INDSCAL | ROWCONF (or CONFIG) COLCONF SUBJWGHT
 | GEMSCAL | ROWCONF (or CONFIG) COLCONF SUBJWGHT

Related Topics

ALSCAL
Overview (ALSCAL command)
Example (ALSCAL command)
VARIABLES Subcommand (ALSCAL command)
INPUT Subcommand (ALSCAL command)
SHAPE Subcommand (ALSCAL command)
LEVEL Subcommand (ALSCAL command)
CONDITION Subcommand (ALSCAL command)
MODEL Subcommand (ALSCAL command)
CRITERIA Subcommand (ALSCAL command)
PRINT Subcommand (ALSCAL command)
PLOT Subcommand (ALSCAL command)
OUTFILE Subcommand (ALSCAL command)
MATRIX Subcommand (ALSCAL command)
Specification of Analyses (ALSCAL command)
References (ALSCAL command)


MODEL Subcommand (ALSCAL command)

MODEL (subcommand),MODEL (subcommand),MODEL (subcommand)
ALSCAL command,ALSCAL command,ALSCAL command
ALSCAL (command),ALSCAL (command),ALSCAL (command)
MODEL subcommand,MODEL subcommand,MODEL subcommand
METHOD (subcommand),METHOD (subcommand),METHOD (subcommand)
ALSCAL command,ALSCAL command,ALSCAL command
ALSCAL (command),ALSCAL (command),ALSCAL (command)
METHOD subcommand,METHOD subcommand,METHOD subcommand
ALSCAL (command),ALSCAL (command),ALSCAL (command)
models,models,models

MODEL (alias METHOD) defines the scaling model for the analysis. The only specification is MODEL (or METHOD) and any one of the five scaling and unfolding model types. EUCLID is the default.

Euclidean model,Euclidean model,Euclidean model
ALSCAL command,ALSCAL command,ALSCAL command
EUCLID (keyword),EUCLID (keyword),EUCLID (keyword)
ALSCAL command,ALSCAL command,ALSCAL command
weighted multidimensional scaling,weighted multidimensional scaling,weighted multidimensional scaling
ALSCAL command,ALSCAL command,ALSCAL command
INDSCAL (keyword),INDSCAL (keyword),INDSCAL (keyword)
ALSCAL command,ALSCAL command,ALSCAL command
asymmetric Euclidean distance model,asymmetric Euclidean distance model,asymmetric Euclidean distance model
ALSCAL command,ALSCAL command,ALSCAL command
ASCAL (keyword),ASCAL (keyword),ASCAL (keyword)
ALSCAL command,ALSCAL command,ALSCAL command
asymmetric individual differences Euclidean distance model,asymmetric individual differences Euclidean distance model,asymmetric individual differences Euclidean distance model
ALSCAL command,ALSCAL command,ALSCAL command
AINDS (keyword),AINDS (keyword),AINDS (keyword)
ALSCAL command,ALSCAL command,ALSCAL command
generalized multidimensional scaling,generalized multidimensional scaling,generalized multidimensional scaling
ALSCAL command,ALSCAL command,ALSCAL command
GEMSCAL (keyword),GEMSCAL (keyword),GEMSCAL (keyword)
ALSCAL command,ALSCAL command,ALSCAL command
EUCLID | Euclidean distance model. This model can be used with any type of proximity matrix and is the default.
INDSCAL | Individual differences (weighted) Euclidean distance model. ALSCAL scales the data using the weighted individual differences Euclidean distance model (Carroll and Chang, 1970). This type of analysis can be specified only if the analysis involves more than one data matrix and more than one dimension is specified on CRITERIA.
ASCAL | Asymmetric Euclidean distance model. This model (Young, 1975) can be used only if SHAPE=ASYMMETRIC and more than one dimension is requested on CRITERIA.
AINDS | Asymmetric individual differences Euclidean distance model. This option combines Young’s asymmetric Euclidean model (Young, 1975) with the individual differences model (Carroll and Chang, 1970). This model can be used only when SHAPE=ASYMMETRIC, the analysis involves more than one data matrix, and more than one dimension is specified on CRITERIA.
GEMSCAL | Generalized Euclidean metric individual differences model. The number of directions for this model is set with the DIRECTIONS option on CRITERIA. The number of directions specified can be equal to but cannot exceed the group space dimensionality. By default, the number of directions equals the number of dimensions in the solution.

Example

ALSCAL VARIABLES = V1 TO V6
 /SHAPE = ASYMMETRIC
 /CONDITION = ROW
 /MODEL = GEMSCAL
 /CRITERIA = DIM(4) DIRECTIONS(4).

• In this example, the number of directions in the GEMSCAL model is set to 4.

Related Topics

ALSCAL
Overview (ALSCAL command)
Example (ALSCAL command)
VARIABLES Subcommand (ALSCAL command)
INPUT Subcommand (ALSCAL command)
SHAPE Subcommand (ALSCAL command)
LEVEL Subcommand (ALSCAL command)
CONDITION Subcommand (ALSCAL command)
FILE Subcommand (ALSCAL command)
CRITERIA Subcommand (ALSCAL command)
PRINT Subcommand (ALSCAL command)
PLOT Subcommand (ALSCAL command)
OUTFILE Subcommand (ALSCAL command)
MATRIX Subcommand (ALSCAL command)
Specification of Analyses (ALSCAL command)
References (ALSCAL command)


CRITERIA Subcommand (ALSCAL command)

CRITERIA (subcommand),CRITERIA (subcommand),CRITERIA (subcommand)
ALSCAL command,ALSCAL command,ALSCAL command
ALSCAL (command),ALSCAL (command),ALSCAL (command)
CRITERIA subcommand,CRITERIA subcommand,CRITERIA subcommand
ALSCAL (command),ALSCAL (command),ALSCAL (command)
analysis criteria,analysis criteria,analysis criteria

Use CRITERIA to control features of the scaling model and to set convergence criteria for the solution. You can specify one or more of the following:

convergence criterion,convergence criterion,convergence criterion
ALSCAL command,ALSCAL command,ALSCAL command
ALSCAL (command),ALSCAL (command),ALSCAL (command)
convergence,convergence,convergence
CONVERGE (keyword),CONVERGE (keyword),CONVERGE (keyword)
ALSCAL command,ALSCAL command,ALSCAL command
ALSCAL (command),ALSCAL (command),ALSCAL (command)
iterations,iterations,iterations
ITER (keyword),ITER (keyword),ITER (keyword)
ALSCAL command,ALSCAL command,ALSCAL command
S-stress,S-stress,S-stress
ALSCAL command,ALSCAL command,ALSCAL command
STRESSMIN (keyword),STRESSMIN (keyword),STRESSMIN (keyword)
ALSCAL command,ALSCAL command,ALSCAL command
subject weights,subject weights,subject weights
ALSCAL command,ALSCAL command,ALSCAL command
NEGATIVE (keyword),NEGATIVE (keyword),NEGATIVE (keyword)
ALSCAL command,ALSCAL command,ALSCAL command
ALSCAL (command),ALSCAL (command),ALSCAL (command)
missing values,missing values,missing values
CUTOFF (keyword),CUTOFF (keyword),CUTOFF (keyword)
ALSCAL command,ALSCAL command,ALSCAL command
NOULB (keyword),NOULB (keyword),NOULB (keyword)
ALSCAL command,ALSCAL command,ALSCAL command
ALSCAL (command),ALSCAL (command),ALSCAL (command)
dimensionality of solution,dimensionality of solution,dimensionality of solution
DIMENS (keyword),DIMENS (keyword),DIMENS (keyword)
ALSCAL command,ALSCAL command,ALSCAL command
principal directions,principal directions,principal directions
ALSCAL command,ALSCAL command,ALSCAL command
DIRECTIONS (keyword),DIRECTIONS (keyword),DIRECTIONS (keyword)
ALSCAL command,ALSCAL command,ALSCAL command
TIESTORE (keyword),TIESTORE (keyword),TIESTORE (keyword)
ALSCAL command,ALSCAL command,ALSCAL command
CONSTRAIN (keyword),CONSTRAIN (keyword),CONSTRAIN (keyword)
ALSCAL command,ALSCAL command,ALSCAL command
CONVERGE(n) | Stop iterations if the change in S-stress is less than n. S-stress is a goodness-of-fit index. By default, n=0.001. To increase the precision of a solution, specify a smaller value, for example, 0.0001. To obtain a less precise solution (perhaps to reduce computing time), specify a larger value, for example, 0.05. Negative values are not allowed. If n=0, the algorithm will iterate 30 times unless a value is specified with the ITER option.
ITER(n) | Set the maximum number of iterations to n. The default value is 30. A higher value will give a more precise solution but will take longer to compute.
STRESSMIN(n) | Set the minimum stress value to n. By default, ALSCAL stops iterating when the value of S-stress is 0.005 or less. STRESSMIN can be assigned any value from 0 to 1.
NEGATIVE | Allow negative weights in individual differences models. By default, ALSCAL does not permit the weights to be negative. Weighted models include INDSCAL, ASCAL, AINDS, and GEMSCAL. The NEGATIVE option is ignored if the model is EUCLID.
CUTOFF(n) | Set the cutoff value for treating distances as missing to n. By default, ALSCAL treats all negative similarities (or dissimilarities) as missing and 0 and positive similarities as nonmissing (n=0). Changing the CUTOFF value causes ALSCAL to treat similarities greater than or equal to that value as nonmissing. User- and system-missing values are considered missing regardless of the CUTOFF specification.
NOULB | Do not estimate upper and lower bounds on missing values. By default, ALSCAL estimates the upper and lower bounds on missing values in order to compute the initial configuration. This specification has no effect during the iterative process, when missing values are ignored.
DIMENS(min[,max]) | Set the minimum and maximum number of dimensions in the scaling solution. By default, ALSCAL calculates a solution with two dimensions. To obtain solutions for more than two dimensions, specify the minimum and the maximum number of dimensions in parentheses after DIMENS. The minimum and maximum can be integers between 2 and 6. A single value represents both the minimum and the maximum. For example, DIMENS(3) is equivalent to DIMENS(3,3). The minimum number of dimensions can be set to 1 only if MODEL=EUCLID.
DIRECTIONS(n) | Set the number of principal directions in the generalized Euclidean model to n. This option has no effect for models other than GEMSCAL. The number of principal directions can be any positive integer between 1 and the number of dimensions specified on the DIMENS option. By default, the number of directions equals the number of dimensions.
TIESTORE(n) | Set the amount of storage needed for ties to n. This option estimates the amount of storage needed to deal with ties in ordinal data. By default, the amount of storage is set to 1000 or the number of cells in a matrix, whichever is smaller. Should this be insufficient, ALSCAL terminates and displays a message that more space is needed.
CONSTRAIN | Constrain multidimensional unfolding solution. This option can be used to keep the initial constraints throughout the analysis.

Related Topics

ALSCAL
Overview (ALSCAL command)
Example (ALSCAL command)
VARIABLES Subcommand (ALSCAL command)
INPUT Subcommand (ALSCAL command)
SHAPE Subcommand (ALSCAL command)
LEVEL Subcommand (ALSCAL command)
CONDITION Subcommand (ALSCAL command)
FILE Subcommand (ALSCAL command)
MODEL Subcommand (ALSCAL command)
PRINT Subcommand (ALSCAL command)
PLOT Subcommand (ALSCAL command)
OUTFILE Subcommand (ALSCAL command)
MATRIX Subcommand (ALSCAL command)
Specification of Analyses (ALSCAL command)
References (ALSCAL command)


PRINT Subcommand (ALSCAL command)

PRINT (subcommand),PRINT (subcommand),PRINT (subcommand)
ALSCAL command,ALSCAL command,ALSCAL command
ALSCAL (command),ALSCAL (command),ALSCAL (command)
PRINT subcommand,PRINT subcommand,PRINT subcommand
ALSCAL (command),ALSCAL (command),ALSCAL (command)
analysis summary,analysis summary,analysis summary
ALSCAL (command),ALSCAL (command),ALSCAL (command)
displaying input data,displaying input data,displaying input data

PRINT requests output not available by default. You can specify the following:

DATA (keyword),DATA (keyword),DATA (keyword)
ALSCAL command,ALSCAL command,ALSCAL command
HEADER (keyword),HEADER (keyword),HEADER (keyword)
ALSCAL command,ALSCAL command,ALSCAL command
DATA | Display input data. The display includes both the initial data and the scaled data for each subject according to the structure specified on SHAPE.
HEADER | Display a header page. The header includes the model, output, algorithmic, and data options in effect for the analysis.

• Data options listed by PRINT=HEADER include the number of rows and columns, number of matrices, measurement level, shape of the data matrix, type of data (similarity or dissimilarity), whether ties are tied or untied, conditionality, and data cutoff value.

• Model options listed by PRINT=HEADER are the type of model specified (EUCLID, INDSCAL, ASCAL, AINDS, or GEMSCAL), minimum and maximum dimensionality, and whether or not negative weights are permitted.

• Output options listed by PRINT=HEADER indicate whether the output includes the header page and input data, whether ALSCAL plotted configurations and transformations, whether an output dataset was created, and whether initial stimulus coordinates, initial column stimulus coordinates, initial subject weights, and initial stimulus weights were computed.

• Algorithmic options listed by PRINT=HEADER include the maximum number of iterations permitted, the convergence criterion, the maximum S-stress value, whether or not missing data are estimated by upper and lower bounds, and the amount of storage allotted for ties in ordinal data.

Example

ALSCAL VAR=ATLANTA TO TAMPA /PRINT=DATA.

• In addition to scaled data, ALSCAL will display initial data.

Related Topics

ALSCAL
Overview (ALSCAL command)
Example (ALSCAL command)
VARIABLES Subcommand (ALSCAL command)
INPUT Subcommand (ALSCAL command)
SHAPE Subcommand (ALSCAL command)
LEVEL Subcommand (ALSCAL command)
CONDITION Subcommand (ALSCAL command)
FILE Subcommand (ALSCAL command)
MODEL Subcommand (ALSCAL command)
CRITERIA Subcommand (ALSCAL command)
PLOT Subcommand (ALSCAL command)
OUTFILE Subcommand (ALSCAL command)
MATRIX Subcommand (ALSCAL command)
Specification of Analyses (ALSCAL command)
References (ALSCAL command)


PLOT Subcommand (ALSCAL command)

PLOT (subcommand),PLOT (subcommand),PLOT (subcommand)
ALSCAL command,ALSCAL command,ALSCAL command
ALSCAL (command),ALSCAL (command),ALSCAL (command)
PLOT subcommand,PLOT subcommand,PLOT subcommand
ALSCAL (command),ALSCAL (command),ALSCAL (command)
plots,plots,plots

PLOT controls the display of plots. The minimum specification is simply PLOT to produce the defaults.

subject weights,subject weights,subject weights
ALSCAL command,ALSCAL command,ALSCAL command
matrix weights,matrix weights,matrix weights
ALSCAL command,ALSCAL command,ALSCAL command
stimulus configuration coordinates,stimulus configuration coordinates,stimulus configuration coordinates
ALSCAL command,ALSCAL command,ALSCAL command
ALL (keyword),ALL (keyword),ALL (keyword)
ALSCAL command,ALSCAL command,ALSCAL command
DEFAULT | Default plots. Default plots include plots of stimulus coordinates, matrix weights (if the model is INDSCAL, AINDS, or GEMSCAL), and stimulus weights (if the model is AINDS or ASCAL). The default also includes a scatterplot of the linear fit between the data and the model and, for certain types of data, scatterplots of the nonlinear fit and the data transformation.
ALL | Transformation plots in addition to the default plots. A separate plot is produced for each subject if CONDITION=MATRIX and a separate plot for each row if CONDITION=ROW. For interval and ratio data, PLOT=ALL has the same effect as PLOT=DEFAULT. This option can generate voluminous output, particularly when CONDITION=ROW.

Example

ALSCAL VAR=V1 TO V8 /INPUT=ROWS(8) /PLOT=ALL.

• This command produces all of the default plots. It also produces a separate plot for each subject’s data transformation and a plot of V1 through V8 in a two-dimensional space for each subject.

Related Topics

ALSCAL
Overview (ALSCAL command)
Example (ALSCAL command)
VARIABLES Subcommand (ALSCAL command)
INPUT Subcommand (ALSCAL command)
SHAPE Subcommand (ALSCAL command)
LEVEL Subcommand (ALSCAL command)
CONDITION Subcommand (ALSCAL command)
FILE Subcommand (ALSCAL command)
MODEL Subcommand (ALSCAL command)
CRITERIA Subcommand (ALSCAL command)
PRINT Subcommand (ALSCAL command)
OUTFILE Subcommand (ALSCAL command)
MATRIX Subcommand (ALSCAL command)
Specification of Analyses (ALSCAL command)
References (ALSCAL command)


OUTFILE Subcommand (ALSCAL command)

ALSCAL (command),ALSCAL (command),ALSCAL (command)
OUTFILE subcommand,OUTFILE subcommand,OUTFILE subcommand
OUTFILE (subcommand),OUTFILE (subcommand),OUTFILE (subcommand)
ALSCAL command,ALSCAL command,ALSCAL command
ALSCAL (command),ALSCAL (command),ALSCAL (command)
matrix output,matrix output,matrix output
ALSCAL (command),ALSCAL (command),ALSCAL (command)
output files,output files,output files

OUTFILE saves coordinate and weight matrices to a data file in PASW Statistics format. The only specification is a name for the output file.

• The output data file has an alphanumeric (short string) variable named TYPE_ that identifies the kind of values in each row, a numeric variable named DIMENS that specifies the number of dimensions, a numeric variable named MATNUM that indicates the subject (matrix) to which each set of coordinates corresponds, and variables named DIM1, DIM2, ..., DIMn that correspond to the n dimensions in the model.

• The values of any split-file variables are also included in the output file.

• The file created by OUTFILE can be used by subsequent ALSCAL commands as initial data.

The following are the types of configurations and weights that can be included in the output file:

stimulus configuration coordinates,stimulus configuration coordinates,stimulus configuration coordinates
ALSCAL command,ALSCAL command,ALSCAL command
CONFIG (keyword),CONFIG (keyword),CONFIG (keyword)
ALSCAL command,ALSCAL command,ALSCAL command
ROWCONF (keyword),ROWCONF (keyword),ROWCONF (keyword)
ALSCAL command,ALSCAL command,ALSCAL command
COLCONF (keyword),COLCONF (keyword),COLCONF (keyword)
ALSCAL command,ALSCAL command,ALSCAL command
subject weights,subject weights,subject weights
ALSCAL command,ALSCAL command,ALSCAL command
SUBJWGHT (keyword),SUBJWGHT (keyword),SUBJWGHT (keyword)
ALSCAL command,ALSCAL command,ALSCAL command
flattened weights,flattened weights,flattened weights
ALSCAL command,ALSCAL command,ALSCAL command
FLATWGHT (keyword),FLATWGHT (keyword),FLATWGHT (keyword)
ALSCAL command,ALSCAL command,ALSCAL command
generalized weights,generalized weights,generalized weights
ALSCAL command,ALSCAL command,ALSCAL command
GEMWGHT (keyword),GEMWGHT (keyword),GEMWGHT (keyword)
ALSCAL command,ALSCAL command,ALSCAL command
stimulus weights,stimulus weights,stimulus weights
ALSCAL command,ALSCAL command,ALSCAL command
STIMWGHT (keyword),STIMWGHT (keyword),STIMWGHT (keyword)
ALSCAL command,ALSCAL command,ALSCAL command
CONFIG | Stimulus configuration coordinates.
ROWCONF | Row stimulus configuration coordinates.
COLCONF | Column stimulus configuration coordinates.
SUBJWGHT | Subject (matrix) weights.
FLATWGHT | Flattened subject (matrix) weights.
GEMWGHT | Generalized weights.
STIMWGHT | Stimulus weights.

Only the first three characters of each identifier are written to the variable TYPE_ in the file. For example, CONFIG becomes CON. The structure of the file is determined by the SHAPE and MODEL subcommands, as shown in the following table.

Types of configurations and/or weights in output files
Shape | Model | TYPE_
SYMMETRIC | EUCLID | CON
 | INDSCAL | CON SUB FLA
 | GEMSCAL | CON SUB FLA GEM
ASYMMETRIC | EUCLID | CON
 | INDSCAL | CON SUB FLA
 | GEMSCAL | CON SUB FLA GEM
 | ASCAL | CON STI
 | AINDS | CON SUB FLA STI
RECTANGULAR | EUCLID | ROW COL
 | INDSCAL | ROW COL SUB FLA
 | GEMSCAL | ROW COL SUB FLA GEM

Example

ALSCAL VAR=ATLANTA TO TAMPA /OUTFILE=ONE.

• OUTFILE creates the configuration/weights file ONE from the example of air distances between cities.

Related Topics

ALSCAL
Overview (ALSCAL command)
Example (ALSCAL command)
VARIABLES Subcommand (ALSCAL command)
INPUT Subcommand (ALSCAL command)
SHAPE Subcommand (ALSCAL command)
LEVEL Subcommand (ALSCAL command)
CONDITION Subcommand (ALSCAL command)
FILE Subcommand (ALSCAL command)
MODEL Subcommand (ALSCAL command)
CRITERIA Subcommand (ALSCAL command)
PRINT Subcommand (ALSCAL command)
PLOT Subcommand (ALSCAL command)
MATRIX Subcommand (ALSCAL command)
Specification of Analyses (ALSCAL command)
References (ALSCAL command)


MATRIX Subcommand (ALSCAL command)

ALSCAL (command),ALSCAL (command),ALSCAL (command)
MATRIX subcommand,MATRIX subcommand,MATRIX subcommand
MATRIX (subcommand),MATRIX (subcommand),MATRIX (subcommand)
ALSCAL command,ALSCAL command,ALSCAL command
ALSCAL (command),ALSCAL (command),ALSCAL (command)
matrix output,matrix output,matrix output
ALSCAL (command),ALSCAL (command),ALSCAL (command)
matrix input,matrix input,matrix input
matrix input,matrix input,matrix input
ALSCAL command,ALSCAL command,ALSCAL command
ALSCAL (command),ALSCAL (command),ALSCAL (command)
matrix input,matrix input,matrix input

MATRIX reads matrix data files. It can read a matrix written by either PROXIMITIES or CLUSTER.

• Generally, data read by ALSCAL are already in matrix form. If the matrix materials are in the active dataset, you do not need to use MATRIX to read them. Simply use the VARIABLES subcommand to indicate the variables (or columns) to be used. However, if the matrix materials are not in the active dataset, MATRIX must be used to specify the matrix data file that contains the matrix.

• The proximity matrices that ALSCAL reads have ROWTYPE_ values of PROX. No additional statistics should be included with these matrix materials.

• ALSCAL ignores unrecognized ROWTYPE_ values in the matrix file. In addition, it ignores variables present in the matrix file that are not specified on the VARIABLES subcommand in ALSCAL. The order of rows and columns in the matrix is unimportant.

• Since ALSCAL does not support case labeling, it ignores values for the ID variable (if present) in a CLUSTER or PROXIMITIES matrix.

• If split-file processing was in effect when the matrix was written, the same split file must be in effect when ALSCAL reads that matrix.

IN (keyword),IN (keyword),IN (keyword)
ALSCAL command,ALSCAL command,ALSCAL command

• The specification on MATRIX is the keyword IN and the matrix file in parentheses.

• MATRIX=IN cannot be used unless a active dataset has already been defined. To read an existing matrix data file at the beginning of a session, first use GET to retrieve the matrix file and then specify IN(*) on MATRIX.

IN (filename) Read a matrix data file. If the matrix data file is the active dataset, specify an asterisk in parentheses (*). If the matrix data file is another file, specify the filename in parentheses. A matrix file read from an external file does not replace the active dataset.

Example

PROXIMITIES V1 TO V8 /ID=NAMEVAR /MATRIX=OUT(*).
ALSCAL VAR=CASE1 TO CASE10 /MATRIX=IN(*).

• PROXIMITIES uses V1 through V8 in the active dataset to generate a matrix file of Euclidean distances between each pair of cases based on the eight variables. The number of rows and columns in the resulting matrix equals the number of cases. MATRIX=OUT then replaces the active dataset with this new matrix data file.

• MATRIX=IN on ALSCAL reads the matrix data file, which is the new active dataset. In this instance, MATRIX is optional because the matrix materials are in the active dataset.

• If there were 10 cases in the original active dataset, ALSCAL performs a multidimensional scaling analysis in two dimensions on CASE1 through CASE10.

Example

GET FILE PROXMTX.
ALSCAL VAR=CASE1 TO CASE10 /MATRIX=IN(*).

• GET retrieves the matrix data file PROXMTX.

• MATRIX=IN specifies an asterisk because the active dataset is the matrix. MATRIX is optional, however, since the matrix materials are in the active dataset.

Example

GET FILE PRSNNL.
FREQUENCIES VARIABLE=AGE.
ALSCAL VAR=CASE1 TO CASE10 /MATRIX=IN(PROXMTX).

• This example performs a frequencies analysis on the file PRSNNL and then uses a different file containing matrix data for ALSCAL. The file is an existing matrix data file.

• MATRIX=IN is required because the matrix data file, PROXMTX, is not the active dataset. PROXMTX does not replace PRSNNL as the active dataset.

Related Topics

ALSCAL
Overview (ALSCAL command)
Example (ALSCAL command)
VARIABLES Subcommand (ALSCAL command)
INPUT Subcommand (ALSCAL command)
SHAPE Subcommand (ALSCAL command)
LEVEL Subcommand (ALSCAL command)
CONDITION Subcommand (ALSCAL command)
FILE Subcommand (ALSCAL command)
MODEL Subcommand (ALSCAL command)
CRITERIA Subcommand (ALSCAL command)
PRINT Subcommand (ALSCAL command)
PLOT Subcommand (ALSCAL command)
OUTFILE Subcommand (ALSCAL command)
Specification of Analyses (ALSCAL command)
References (ALSCAL command)


Specification of Analyses (ALSCAL command)

ALSCAL (command),ALSCAL (command),ALSCAL (command)
analysis specification,analysis specification,analysis specification
ALSCAL (command),ALSCAL (command),ALSCAL (command)
analysis specification,analysis specification,analysis specification

The following tables summarize the analyses that can be performed for the major types of proximity matrices that you can use with ALSCAL, list the specifications needed to produce these analyses for nonmetric models, and list the specifications for metric models. You can include additional specifications to control the precision of your analysis with CRITERIA.

Models for types of matrix input
Matrix mode | Matrix form | Model class | Single matrix | Replications of single matrix | Two or more individual matrices
Object by object | Symmetric | Multidimensional scaling | CMDS Classical multidimensional scaling | RMDS Replicated multidimensional scaling | WMDS(INDSCAL) Weighted multidimensional scaling
 | Asymmetric single process | Multidimensional scaling | CMDS(row conditional) Classical row conditional multidimensional scaling | RMDS(row conditional) Replicated row conditional multi dimensional scaling | WMDS(row conditional) Weighted row conditional multidimensional scaling
 | Asymmetric multiple process | Internal asymmetric multidimensional scaling | CAMDS Classical asymmetric multidimensional scaling | RAMDS Replicated asymmetric multidimensional scaling | WAMDS Weighted asymmetric multidimensional scaling
 |  | External asymmetric multidimensional scaling | CAMDS(external) Classical external asymmetric multidimensional scaling | RAMDS(external) Replicated external asymmetric multidimensional scaling | WAMDS(external) Weighted external asymmetric multidimensional scaling
Object by attribute | Rectangular | Internal unfolding | CMDU Classical internal multidimensional unfolding | RMDU Replicated internal multidimensional unfolding | WMDU Weighted internal multidimensional unfolding
 |  | External unfolding | CMDU(external) Classical external multidimensional unfolding | RMDU(external) Replicated external multidimensional unfolding | WMDU(external) Weighted external multidimensional unfolding
ALSCAL (command),ALSCAL (command),ALSCAL (command)
models,models,models
ALSCAL specifications for nonmetric models
Matrix mode Matrix form Model class Single matrix Replications of single matrix Two or more individual matrices
Object by object Symmetric Multidimensional scaling
ALSCAL VAR= varlist.
ALSCAL VAR= varlist.
ALSCAL VAR= varlist
/MODEL=INDSCAL.
Asymmetric single process Multidimensional scaling
ALSCAL VAR= varlist
/SHAPE=ASYMMETRIC
/CONDITION=ROW.
ALSCAL VAR= varlist
/SHAPE=ASYMMETRIC
/CONDITION=ROW.
ALSCAL VAR= varlist
/SHAPE=ASYMMETRIC
/CONDITION=ROW
/MODEL=INDSCAL.
Asymmetric multiple process Internal asymmetric multidimensional scaling
ALSCAL VAR= varlist
/SHAPE=ASYMMETRIC
/MODEL=ASCAL.
ALSCAL VAR= varlist
/SHAPE=ASYMMETRIC
/MODEL=ASCAL.
ALSCAL VAR= varlist
/SHAPE=ASYMMETRIC
/MODEL=AINDS.
External asymmetric multidimensional scaling
ALSCAL VAR= varlist
/SHAPE=ASYMMETRIC
/MODEL=ASCAL
/FILE=file
      COLCONF(FIX).
ALSCAL VAR= varlist
/SHAPE=ASYMMETRIC
/MODEL=ASCAL
/FILE=file
      COLCONF(FIX).
ALSCAL VAR= varlist
/SHAPE=ASYMMETRIC
/MODEL=AINDS
/FILE=file
      COLCONF(FIX).
Object by attribute Rectangular Internal unfolding
ALSCAL VAR= varlist
/SHAPE=REC
/INP=ROWS
/CONDITION=ROW.
ALSCAL VAR= varlist
/SHAPE=REC
/INP=ROWS
/CONDITION(ROW).
ALSCAL VAR= varlist
/SHAPE=REC
/INP=ROWS
/CONDITION=ROW
/MODEL=INDSCAL.
External unfolding
ALSCAL VAR= varlist
/SHAPE=REC
/INP=ROWS
/CONDITION=ROW
/FILE=file
      ROWCONF(FIX).
ALSCAL VAR= varlist
/SHAPE=REC
/INP=ROWS
/CONDITION=ROW
/FILE=file
      ROWCONF(FIX).
ALSCAL VAR= varlist
/SHAPE=REC
/INP=ROWS
/CONDITION=ROW
/FILE=file
      ROWCONF(FIX)
/MODEL=INDSCAL.
ALSCAL specifications for metric models
Matrix mode Matrix form Model class Single matrix Replications of single matrix Two or more individual matrices
Object by object Symmetric Multidimensional scaling
ALSCAL VAR= varlist
/LEVEL=INT.
ALSCAL VAR= varlist
/LEVEL=INT.
ALSCAL VAR= varlist
/LEVEL=INT
/MODEL=INDSCAL.
Asymmetric single process Multidimensional scaling
ALSCAL VAR= varlist
/SHAPE=ASYMMETRIC
/CONDITION=ROW
/LEVEL=INT.
ALSCAL VAR= varlist
/SHAPE=ASYMMETRIC
/CONDITION=ROW
/LEVEL=INT.
ALSCAL VAR= varlist
/SHAPE=ASYMMETRIC
/CONDITION=ROW
/LEVEL=INT
/MODEL=INDSCAL.
Asymmetric multiple process Internal asymmetric multidimensional scaling
ALSCAL VAR= varlist
/SHAPE=ASYMMETRIC
/LEVEL=INT
/MODEL=ASCAL.
ALSCAL VAR= varlist
/SHAPE=ASYMMETRIC
/LEVEL=INT
/MODEL=ASCAL.
ALSCAL VAR= varlist
/SHAPE=ASYMMETRIC
/LEVEL=INT
/MODEL=AINDS.
External asymmetric multidimensional scaling
ALSCAL VAR= varlist
/SHAPE=ASYMMETRIC
/LEVEL=INT
/MODEL=ASCAL
/FILE=file
      COLCONF(FIX).
ALSCAL VAR= varlist
/SHAPE=ASYMMETRIC
/LEVEL=INT
/MODEL=ASCAL
/FILE=file
      COLCONF(FIX).
ALSCAL VAR= varlist
/SHAPE=ASYMMETRIC
/LEVEL=INT
/MODEL=AINDS
/FILE=file
      COLCONF(FIX).
Object by attribute Rectangular Internal unfolding
ALSCAL VAR= varlist
/SHAPE=REC
/INP=ROWS
/CONDITION=ROW
/LEVEL=INT.
ALSCAL VAR= varlist
/SHAPE=REC
/INP=ROWS
/CONDITION=ROW
/LEVEL=INT.
ALSCAL VAR= varlist
/SHAPE=REC
/INP=ROWS
/CONDITION=ROW
/LEVEL=INT
/MODEL=INDSCAL.
External unfolding
ALSCAL VAR= varlist
/SHAPE=REC
/INP=ROWS
/CONDITION=ROW
/LEVEL=INT
/FILE=file
      ROWCONF(FIX).
ALSCAL VAR= varlist
/SHAPE=REC
/INP=ROWS
/CONDITION=ROW
/LEVEL=INT
/FILE=file
      ROWCONF(FIX).
ALSCAL VAR= varlist
/SHAPE=REC
/INP=ROWS
/CONDITION=ROW
/LEVEL=INT
/FILE=file
      ROWCONF(FIX)
/MODEL=INDSCAL.

Related Topics

ALSCAL
Overview (ALSCAL command)
Example (ALSCAL command)
VARIABLES Subcommand (ALSCAL command)
INPUT Subcommand (ALSCAL command)
SHAPE Subcommand (ALSCAL command)
LEVEL Subcommand (ALSCAL command)
CONDITION Subcommand (ALSCAL command)
FILE Subcommand (ALSCAL command)
MODEL Subcommand (ALSCAL command)
CRITERIA Subcommand (ALSCAL command)
PRINT Subcommand (ALSCAL command)
PLOT Subcommand (ALSCAL command)
OUTFILE Subcommand (ALSCAL command)
MATRIX Subcommand (ALSCAL command)
References (ALSCAL command)


References (ALSCAL command)

Carroll, J. D., and J. J. Chang. 1970. Analysis of individual differences in multidimensional scaling via an n-way generalization of “Eckart-Young” decomposition. Psychometrika, 35, 238-319.

Johnson, R., and D. W. Wichern. 1982. Applied multivariate statistical analysis. Englewood Cliffs, N.J.: Prentice-Hall.

Kruskal, J. B. 1964. Multidimensional scaling by optimizing goodness of fit to a nonmetric hypothesis. Psychometrika, 29, 1-28.

Kruskal, J. B. 1964. Nonmetric multidimensional scaling: A numerical method. Psychometrika, 29, 115-129.

Takane, Y., F. W. Young, and J. de Leeuw. 1977. Nonmetric individual differences multidimensional scaling: An alternating least squares method with optimal scaling features. Psychometrika, 42, 7-67.

Young, F. W. 1975. An asymmetric Euclidean model for multiprocess asymmetric data. In: Proceedings of U.S.–Japan Seminar on Multidimensional Scaling. San Diego: .

Related Topics

ALSCAL
Overview (ALSCAL command)
Example (ALSCAL command)
VARIABLES Subcommand (ALSCAL command)
INPUT Subcommand (ALSCAL command)
SHAPE Subcommand (ALSCAL command)
LEVEL Subcommand (ALSCAL command)
CONDITION Subcommand (ALSCAL command)
FILE Subcommand (ALSCAL command)
MODEL Subcommand (ALSCAL command)
CRITERIA Subcommand (ALSCAL command)
PRINT Subcommand (ALSCAL command)
PLOT Subcommand (ALSCAL command)
OUTFILE Subcommand (ALSCAL command)
MATRIX Subcommand (ALSCAL command)
Specification of Analyses (ALSCAL command)


ANACOR

ANACOR (command),ANACOR (command),ANACOR (command)
ANACOR (command),ANACOR (command),ANACOR (command)
syntax chart,syntax chart,syntax chart

ANACOR is available in the Categories option.

ANACOR  TABLE={row var (min, max) BY column var (min, max)}
              {ALL (# of rows, # of columns)              }

[/DIMENSION={2**  }]
            {value}

[/NORMALIZATION={CANONICAL**}]
                {PRINCIPAL  }
                {RPRINCIPAL }
                {CPRINCIPAL }
                {value      }

[/VARIANCES=[SINGULAR] [ROWS] [COLUMNS]]

[/PRINT=[TABLE**] [PROFILES] [SCORES**] [CONTRIBUTIONS**]
        [DEFAULT] [PERMUTATION] [NONE]]

[/PLOT=[NDIM=({1, 2**      })]
              {value, value}
              {ALL, MAX    }
       [ROWS**[(n)]][COLUMNS**[(n)]][DEFAULT[(n)]]
       [TRROWS] [TRCOLUMNS] [JOINT[(n)]] [NONE]]

[/MATRIX OUT=[SCORE({*                  })] [VARIANCE({*                  })]]
                    {'savfile'|'dataset'}             {'savfile'|'dataset'}

**Default if the subcommand or keyword is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See ANACOR Algorithms for computational details for this procedure.

Example

ANACOR TABLE=MENTAL(1,4) BY SES(1,6).

Related Topics

Overview (ANACOR command)
Example (ANACOR command)
TABLE Subcommand (ANACOR command)
DIMENSION Subcommand (ANACOR command)
NORMALIZATION Subcommand (ANACOR command)
VARIANCES Subcommand (ANACOR command)
PRINT Subcommand (ANACOR command)
PLOT Subcommand (ANACOR command)
MATRIX Subcommand (ANACOR command)
Analyzing Aggregated Data (ANACOR command)


Overview (ANACOR command)

ANACOR performs correspondence analysis, which is an isotropic graphical representation of the relationships between the rows and columns of a two-way table.

Options Collapse Hide details

Options

Number of Dimensions. You can specify how many dimensions ANACOR should compute.

Method of Normalization. You can specify one of five different methods for normalizing the row and column scores.

Computation of Variances and Correlations. You can request computation of variances and correlations for singular values, row scores, or column scores.

Data Input. You can analyze the usual individual casewise data or aggregated data from table cells.

Display Output. You can control which statistics are displayed and plotted. You can also control how many value-label characters are used on the plots.

Writing Matrices. You can write matrix data files containing row and column scores and variances for use in further analyses.

Basic Specification Collapse Hide details

Basic Specification

• The basic specification is ANACOR and the TABLE subcommand. By default, ANACOR computes a two-dimensional solution, displays the TABLE, SCORES, and CONTRIBUTIONS statistics, and plots the row scores and column scores of the first two dimensions.

Subcommand Order Collapse Hide details

Subcommand Order

• Subcommands can appear in any order.

Operations Collapse Hide details

Operations

• If a subcommand is specified more than once, only the last occurrence is executed.

Limitations Collapse Hide details

Limitations

• If the data within table cells contains negative values. ANACOR treats those values as 0.

Related Topics

ANACOR
Example (ANACOR command)
TABLE Subcommand (ANACOR command)
DIMENSION Subcommand (ANACOR command)
NORMALIZATION Subcommand (ANACOR command)
VARIANCES Subcommand (ANACOR command)
PRINT Subcommand (ANACOR command)
PLOT Subcommand (ANACOR command)
MATRIX Subcommand (ANACOR command)
Analyzing Aggregated Data (ANACOR command)


Example (ANACOR command)

ANACOR TABLE=MENTAL(1,4) BY SES(1,6)
 /PRINT=SCORES CONTRIBUTIONS
 /PLOT=ROWS COLUMNS.

• Two variables, MENTAL and SES, are specified on the TABLE subcommand. MENTAL has values ranging from 1 to 4, and SES has values ranging from 1 to 6.

• The row and column scores and the contribution of each row and column to the inertia of each dimension are displayed.

• Two plots are produced. The first one plots the first two dimensions of row scores, and the second one plots the first two dimensions of column scores.

Related Topics

ANACOR
Overview (ANACOR command)
TABLE Subcommand (ANACOR command)
DIMENSION Subcommand (ANACOR command)
NORMALIZATION Subcommand (ANACOR command)
VARIANCES Subcommand (ANACOR command)
PRINT Subcommand (ANACOR command)
PLOT Subcommand (ANACOR command)
MATRIX Subcommand (ANACOR command)
Analyzing Aggregated Data (ANACOR command)


TABLE Subcommand (ANACOR command)

TABLE (subcommand),TABLE (subcommand),TABLE (subcommand)
ANACOR command,ANACOR command,ANACOR command
ANACOR (command),ANACOR (command),ANACOR (command)
TABLE subcommand,TABLE subcommand,TABLE subcommand

TABLE specifies the row and column variables, along with their value ranges for individual casewise data. For table data, TABLE specifies the keyword ALL and the number of rows and columns.

• The TABLE subcommand is required.

Related Topics

ANACOR
Overview (ANACOR command)
Example (ANACOR command)
DIMENSION Subcommand (ANACOR command)
NORMALIZATION Subcommand (ANACOR command)
VARIANCES Subcommand (ANACOR command)
PRINT Subcommand (ANACOR command)
PLOT Subcommand (ANACOR command)
MATRIX Subcommand (ANACOR command)
Analyzing Aggregated Data (ANACOR command)
Casewise Data (ANACOR command)
Table Data (ANACOR command)


Casewise Data (ANACOR command)

TABLE (subcommand),TABLE (subcommand),TABLE (subcommand)
casewise data,casewise data,casewise data

• Each variable is followed by a value range in parentheses. The value range consists of the variable’s minimum value, a comma, and the variable’s maximum value.

• Values outside of the specified range are not included in the analysis.

• Values do not have to be sequential. Empty categories receive scores of 0 and do not affect the rest of the computations.

Example

DATA LIST FREE/VAR1 VAR2.
BEGIN DATA
3 1
6 1
3 1
4 2
4 2
6 3
6 3
6 3
3 2
4 2
6 3
END DATA.
ANACOR TABLE=VAR1(3,6) BY VAR2(1,3).

• DATA LIST defines two variables, VAR1 and VAR2.

• VAR1 has three levels, coded 3, 4, and 6, while VAR2 also has three levels, coded 1, 2, and 3.

TABLE (subcommand),TABLE (subcommand),TABLE (subcommand)
casewise data,casewise data,casewise data

• Because a range of (3,6) is specified for VAR1, ANACOR defines four categories, coded 3, 4, 5, and 6. The empty category, 5, for which there is no data, receives zeros for all statistics but does not affect the analysis.

Related Topics

TABLE Subcommand (ANACOR command)
Table Data (ANACOR command)


Table Data (ANACOR command)

TABLE (subcommand),TABLE (subcommand),TABLE (subcommand)
table data,table data,table data
ALL (keyword),ALL (keyword),ALL (keyword)
ANACOR command,ANACOR command,ANACOR command

• The cells of a table can be read and analyzed directly by using the keyword ALL after TABLE.

• The columns of the input table must be specified as variables on the DATA LIST command. Only columns are defined, not rows.

• ALL is followed by the number of rows in the table, a comma, and the number of columns in the table, all enclosed in parentheses.

• If you want to analyze only a subset of the table, the specified number of rows and columns can be smaller than the actual number of rows and columns.

• The variables (columns of the table) are treated as the column categories, and the cases (rows of the table) are treated as the row categories.

• Rows cannot be labeled when you specify TABLE=ALL. If labels in your output are important, use the WEIGHT command method to enter your data (see Analyzing Aggregated Data (ANACOR command)).

Example

DATA LIST /COL01 TO COL07 1-21.
BEGIN DATA
 50 19 26  8 18  6  2
 16 40 34 18 31  8  3
 12 35 65 66123 23 21
 11 20 58110223 64 32
 14 36114185714258189
  0  6 19 40179143 71
END DATA.
ANACOR TABLE=ALL(6,7).

• DATA LIST defines the seven columns of the table as the variables.

TABLE (subcommand),TABLE (subcommand),TABLE (subcommand)
table data,table data,table data
ALL (keyword),ALL (keyword),ALL (keyword)
ANACOR command,ANACOR command,ANACOR command
TABLE (subcommand),TABLE (subcommand),TABLE (subcommand)
ANACOR command,ANACOR command,ANACOR command
ANACOR (command),ANACOR (command),ANACOR (command)
TABLE subcommand,TABLE subcommand,TABLE subcommand

• The TABLE=ALL specification indicates that the data are the cells of a table. The (6,7) specification indicates that there are six rows and seven columns.

Related Topics

TABLE Subcommand (ANACOR command)
Casewise Data (ANACOR command)


DIMENSION Subcommand (ANACOR command)

DIMENSION (subcommand),DIMENSION (subcommand),DIMENSION (subcommand)
ANACOR command,ANACOR command,ANACOR command
ANACOR (command),ANACOR (command),ANACOR (command)
DIMENSION subcommand,DIMENSION subcommand,DIMENSION subcommand

DIMENSION specifies the number of dimensions you want ANACOR to compute.

• If you do not specify the DIMENSION subcommand, ANACOR computes two dimensions.

• DIMENSION is followed by an integer indicating the number of dimensions.

• In general, you should choose as few dimensions as needed to explain most of the variation. The minimum number of dimensions that can be specified is 1. The maximum number of dimensions that can be specified is equal to the number of levels of the variable with the least number of levels, minus 1. For example, in a table where one variable has five levels and the other has four levels, the maximum number of dimensions that can be specified is (4 – 1), or 3. Empty categories (categories with no data, all zeros, or all missing data) are not counted toward the number of levels of a variable.

DIMENSION (subcommand),DIMENSION (subcommand),DIMENSION (subcommand)
ANACOR command,ANACOR command,ANACOR command
ANACOR (command),ANACOR (command),ANACOR (command)
DIMENSION subcommand,DIMENSION subcommand,DIMENSION subcommand

• If more than the maximum allowed number of dimensions is specified, ANACOR reduces the number of dimensions to the maximum.

Related Topics

ANACOR
Overview (ANACOR command)
Example (ANACOR command)
TABLE Subcommand (ANACOR command)
NORMALIZATION Subcommand (ANACOR command)
VARIANCES Subcommand (ANACOR command)
PRINT Subcommand (ANACOR command)
PLOT Subcommand (ANACOR command)
MATRIX Subcommand (ANACOR command)
Analyzing Aggregated Data (ANACOR command)


NORMALIZATION Subcommand (ANACOR command)

NORMALIZATION (subcommand),NORMALIZATION (subcommand),NORMALIZATION (subcommand)
ANACOR command,ANACOR command,ANACOR command
ANACOR (command),ANACOR (command),ANACOR (command)
NORMALIZATION subcommand,NORMALIZATION subcommand,NORMALIZATION subcommand

The NORMALIZATION subcommand specifies one of five methods for normalizing the row and column scores. Only the scores and variances are affected; contributions and profiles are not changed.

The following keywords are available:

CANONICAL (keyword),CANONICAL (keyword),CANONICAL (keyword)
ANACOR command,ANACOR command,ANACOR command
PRINCIPAL (keyword),PRINCIPAL (keyword),PRINCIPAL (keyword)
ANACOR command,ANACOR command,ANACOR command
RPRINCIPAL (keyword),RPRINCIPAL (keyword),RPRINCIPAL (keyword)
ANACOR command,ANACOR command,ANACOR command
CPRINCIPAL (keyword),CPRINCIPAL (keyword),CPRINCIPAL (keyword)
ANACOR command,ANACOR command,ANACOR command
CANONICAL | For each dimension, rows are the weighted average of columns divided by the matching singular value, and columns are the weighted average of rows divided by the matching singular value. This is the default if the NORMALIZATION subcommand is not specified. DEFAULT is an alias for CANONICAL. Use this normalization method if you are primarily interested in differences or similarities between variables.
PRINCIPAL | Distances between row points and column points are approximations of chi-square distances. The distances represent the distance between the row or column and its corresponding average row or column profile. Use this normalization method if you want to examine both differences between categories of the row variable and differences between categories of the column variable (but not differences between variables).
RPRINCIPAL | Distances between row points are approximations of chi-square distances. This method maximizes distances between row points. This is useful when you are primarily interested in differences or similarities between categories of the row variable.
CPRINCIPAL | Distances between column points are approximations of chi-square distances. This method maximizes distances between column points. This is useful when you are primarily interested in differences or similarities between categories of the column variable.

The fifth method has no keyword. Instead, any value in the range –2 to +2 is specified after NORMALIZATION. A value of 1 is equal to the RPRINCIPAL method, a value of 0 is equal to CANONICAL, and a value of –1 is equal to the CPRINCIPAL method. The inertia is spread over both row and column scores. This method is useful for interpreting joint plots.

Related Topics

ANACOR
Overview (ANACOR command)
Example (ANACOR command)
TABLE Subcommand (ANACOR command)
DIMENSION Subcommand (ANACOR command)
VARIANCES Subcommand (ANACOR command)
PRINT Subcommand (ANACOR command)
PLOT Subcommand (ANACOR command)
MATRIX Subcommand (ANACOR command)
Analyzing Aggregated Data (ANACOR command)


VARIANCES Subcommand (ANACOR command)

VARIANCES (subcommand),VARIANCES (subcommand),VARIANCES (subcommand)
ANACOR command,ANACOR command,ANACOR command
ANACOR (command),ANACOR (command),ANACOR (command)
VARIANCES subcommand,VARIANCES subcommand,VARIANCES subcommand

Use VARIANCES to display variances and correlations for the singular values, the row scores, and/or the column scores. If VARIANCES is not specified, variances and correlations are not included in the output.

The following keywords are available:

SINGULAR (keyword),SINGULAR (keyword),SINGULAR (keyword)
ANACOR command,ANACOR command,ANACOR command
ROWS (keyword),ROWS (keyword),ROWS (keyword)
ANACOR command,ANACOR command,ANACOR command
COLUMNS (keyword),COLUMNS (keyword),COLUMNS (keyword)
ANACOR command,ANACOR command,ANACOR command
SINGULAR | Variances and correlations of the singular values.
ROWS | Variances and correlations of the row scores.
COLUMNS | Variances and correlations of the column scores.

Related Topics

ANACOR
Overview (ANACOR command)
Example (ANACOR command)
TABLE Subcommand (ANACOR command)
DIMENSION Subcommand (ANACOR command)
NORMALIZATION Subcommand (ANACOR command)
PRINT Subcommand (ANACOR command)
PLOT Subcommand (ANACOR command)
MATRIX Subcommand (ANACOR command)
Analyzing Aggregated Data (ANACOR command)


PRINT Subcommand (ANACOR command)

PRINT (subcommand),PRINT (subcommand),PRINT (subcommand)
ANACOR command,ANACOR command,ANACOR command
ANACOR (command),ANACOR (command),ANACOR (command)
PRINT subcommand,PRINT subcommand,PRINT subcommand

Use PRINT to control which correspondence statistics are displayed. If PRINT is not specified, displayed statistics include the numbers of rows and columns, all nontrivial singular values, proportions of inertia, and the cumulative proportion of inertia that is accounted for.

The following keywords are available:

TABLE (keyword),TABLE (keyword),TABLE (keyword)
ANACOR command,ANACOR command,ANACOR command
PROFILES (keyword),PROFILES (keyword),PROFILES (keyword)
ANACOR command,ANACOR command,ANACOR command
SCORES (keyword),SCORES (keyword),SCORES (keyword)
ANACOR command,ANACOR command,ANACOR command
CONTRIBUTIONS (keyword),CONTRIBUTIONS (keyword),CONTRIBUTIONS (keyword)
ANACOR command,ANACOR command,ANACOR command
PERMUTATION (keyword),PERMUTATION (keyword),PERMUTATION (keyword)
ANACOR command,ANACOR command,ANACOR command
NONE (keyword),NONE (keyword),NONE (keyword)
ANACOR command,ANACOR command,ANACOR command
DEFAULT (keyword),DEFAULT (keyword),DEFAULT (keyword)
ANACOR command,ANACOR command,ANACOR command
TABLE | A crosstabulation of the input variables showing row and column marginals.
PROFILES | The row and column profiles. PRINT=PROFILES is analogous to the CELLS=ROW COLUMN subcommand in CROSSTABS.
SCORES | The marginal proportions and scores of each row and column.
CONTRIBUTIONS | The contribution of each row and column to the inertia of each dimension, and the proportion of distance to the origin that is accounted for in each dimension.
PERMUTATION | The original table permuted according to the scores of the rows and columns for each dimension.
NONE | No output other than the singular values.
DEFAULT | TABLE, SCORES, and CONTRIBUTIONS. These statistics are displayed if you omit the PRINT subcommand.

Related Topics

ANACOR
Overview (ANACOR command)
Example (ANACOR command)
TABLE Subcommand (ANACOR command)
DIMENSION Subcommand (ANACOR command)
NORMALIZATION Subcommand (ANACOR command)
VARIANCES Subcommand (ANACOR command)
PLOT Subcommand (ANACOR command)
MATRIX Subcommand (ANACOR command)
Analyzing Aggregated Data (ANACOR command)


PLOT Subcommand (ANACOR command)

PLOT (subcommand),PLOT (subcommand),PLOT (subcommand)
ANACOR command,ANACOR command,ANACOR command
ANACOR (command),ANACOR (command),ANACOR (command)
PLOT subcommand,PLOT subcommand,PLOT subcommand

Use PLOT to produce plots of the row scores, column scores, and row and column scores, as well as to produce plots of transformations of the row scores and transformations of the column scores. If PLOT is not specified, plots are produced for the row scores in the first two dimensions and the column scores in the first two dimensions.

The following keywords are available:

TRROWS (keyword),TRROWS (keyword),TRROWS (keyword)
ANACOR command,ANACOR command,ANACOR command
TRCOLUMNS (keyword),TRCOLUMNS (keyword),TRCOLUMNS (keyword)
ANACOR command,ANACOR command,ANACOR command
ROWS (keyword),ROWS (keyword),ROWS (keyword)
ANACOR command,ANACOR command,ANACOR command
COLUMNS (keyword),COLUMNS (keyword),COLUMNS (keyword)
ANACOR command,ANACOR command,ANACOR command
JOINT (keyword),JOINT (keyword),JOINT (keyword)
ANACOR command,ANACOR command,ANACOR command
PLOT (subcommand),PLOT (subcommand),PLOT (subcommand)
with NORMALIZATION subcommand,with NORMALIZATION subcommand,with NORMALIZATION subcommand
NORMALIZATION (subcommand),NORMALIZATION (subcommand),NORMALIZATION (subcommand)
with PLOT subcommand,with PLOT subcommand,with PLOT subcommand
NONE (keyword),NONE (keyword),NONE (keyword)
ANACOR command,ANACOR command,ANACOR command
DEFAULT (keyword),DEFAULT (keyword),DEFAULT (keyword)
ANACOR command,ANACOR command,ANACOR command
value labels,value labels,value labels
ANACOR command,ANACOR command,ANACOR command
ANACOR (command),ANACOR (command),ANACOR (command)
value labels,value labels,value labels
TRROWS | Plot of transformations of the row category values into row scores.
TRCOLUMNS | Plot of transformations of the column category values into column scores.
ROWS | Plot of row scores.
COLUMNS | Plot of column scores.
JOINT | A combined plot of the row and column scores. This plot is not available when NORMALIZATION=PRINCIPAL.
NONE | No plots.
DEFAULT | ROWS and COLUMNS.

• The keywords ROWS, COLUMNS, JOINT, and DEFAULT can be followed by an integer value in parentheses to indicate how many characters of the value label are to be used on the plot. The value can range from 1 to 20; the default is 3. Spaces between words count as characters.

• TRROWS and TRCOLUMNS plots use the full value labels up to 20 characters.

• If a label is missing for any value, the actual values are used for all values of that variable.

• Value labels should be unique.

• The first letter of a label on a plot marks the place of the actual coordinate. Be careful that multiple-word labels are not interpreted as multiple points on a plot.

In addition to the plot keywords, the following keyword can be specified:

NDIM (keyword),NDIM (keyword),NDIM (keyword)
ANACOR command,ANACOR command,ANACOR command
NDIM Dimension pairs to be plotted. NDIM is followed by a pair of values in parentheses. If NDIM is not specified, plots are produced for dimension 1 by dimension 2.

• The first value indicates the dimension that is plotted against all higher dimensions. This value can be any integer from 1 to the number of dimensions minus 1.

ALL (keyword),ALL (keyword),ALL (keyword)
ANACOR command,ANACOR command,ANACOR command

• The second value indicates the highest dimension to be used in plotting the dimension pairs. This value can be any integer from 2 to the number of dimensions.

MAX (keyword),MAX (keyword),MAX (keyword)
ANACOR command,ANACOR command,ANACOR command

• Keyword ALL can be used instead of the first value to indicate that all dimensions are paired with higher dimensions.

• Keyword MAX can be used instead of the second value to indicate that plots should be produced up to, and including, the highest dimension fit by the procedure.

Example

ANACOR TABLE=MENTAL(1,4) BY SES(1,6)
 /PLOT NDIM(1,3) JOINT(5).

• The NDIM(1,3) specification indicates that plots should be produced for two dimension pairs—dimension 1 versus dimension 2 and dimension 1 versus dimension 3.

• JOINT requests combined plots of row and column scores. The (5) specification indicates that the first five characters of the value labels are to be used on the plots.

Example

ANACOR TABLE=MENTAL(1,4) BY SES(1,6)
 /PLOT NDIM(ALL,3) JOINT(5).

• This plot is the same as above except for the ALL specification following NDIM, which indicates that all possible pairs up to the second value should be plotted. Therefore, JOINT plots will be produced for dimension 1 versus dimension 2, dimension 2 versus dimension 3, and dimension 1 versus dimension 3.

Related Topics

ANACOR
Overview (ANACOR command)
Example (ANACOR command)
TABLE Subcommand (ANACOR command)
DIMENSION Subcommand (ANACOR command)
NORMALIZATION Subcommand (ANACOR command)
VARIANCES Subcommand (ANACOR command)
PRINT Subcommand (ANACOR command)
MATRIX Subcommand (ANACOR command)
Analyzing Aggregated Data (ANACOR command)


MATRIX Subcommand (ANACOR command)

MATRIX (subcommand),MATRIX (subcommand),MATRIX (subcommand)
ANACOR command,ANACOR command,ANACOR command
ANACOR (command),ANACOR (command),ANACOR (command)
MATRIX subcommand,MATRIX subcommand,MATRIX subcommand

Use MATRIX to write row and column scores and variances to matrix data files.

OUT (keyword),OUT (keyword),OUT (keyword)
ANACOR command,ANACOR command,ANACOR command

MATRIX is followed by keyword OUT, an equals sign, and one or both of the following keywords:

SCORE (keyword),SCORE (keyword),SCORE (keyword)
ANACOR command,ANACOR command,ANACOR command
SCORE ('file'|'dataset') | Write row and column scores to a matrix data file.
VARIANCE ('file'|'dataset') | Write variances to a matrix data file.

• You can specify the file with either an asterisk (*), to replace the active dataset , a quoted file specification or a previously declared dataset name (DATASET DECLARE command), enclosed in parentheses.

• If you specify both SCORE and VARIANCE on the same MATRIX subcommand, you must specify two different files.

The variables in the SCORE matrix data file and their values are:

ROWTYPE_ variable,ROWTYPE_ variable,ROWTYPE_ variable
ANACOR command,ANACOR command,ANACOR command
LEVEL variable,LEVEL variable,LEVEL variable
ANACOR command,ANACOR command,ANACOR command
VARNAME_ variable,VARNAME_ variable,VARNAME_ variable
ANACOR command,ANACOR command,ANACOR command
DIM variable,DIM variable,DIM variable
ANACOR command,ANACOR command,ANACOR command
ROWTYPE_ | String variable containing the value ROW for all rows and COLUMN for all columns.
LEVEL | String variable containing the values (or value labels, if present) of each original variable.
VARNAME_ | String variable containing the original variable names.
DIM1...DIMn | Numeric variables containing the row and column scores for each dimension. Each variable is labeled DIMn, where n represents the dimension number.

The variables in the VARIANCE matrix data file and their values are:

SCORE variable,SCORE variable,SCORE variable
ANACOR command,ANACOR command,ANACOR command
ROWTYPE_ | String variable containing the value COV for all cases in the file.
SCORE | String variable containing the values SINGULAR, ROW, and COLUMN.
LEVEL | String variable containing the system-missing value for SINGULAR and the sequential row or column number for ROW and COLUMN.
VARNAME_ | String variable containing the dimension number.
DIM1...DIMn | Numeric variables containing the covariances for each dimension. Each variable is labeled DIMn, where n represents the dimension number.

Related Topics

ANACOR
Overview (ANACOR command)
Example (ANACOR command)
TABLE Subcommand (ANACOR command)
DIMENSION Subcommand (ANACOR command)
NORMALIZATION Subcommand (ANACOR command)
VARIANCES Subcommand (ANACOR command)
PRINT Subcommand (ANACOR command)
PLOT Subcommand (ANACOR command)
Analyzing Aggregated Data (ANACOR command)


Analyzing Aggregated Data (ANACOR command)

ANACOR (command),ANACOR (command),ANACOR (command)
aggregate data,aggregate data,aggregate data
aggregate data,aggregate data,aggregate data
ANACOR command,ANACOR command,ANACOR command
WEIGHT (command),WEIGHT (command),WEIGHT (command)
with ANACOR command,with ANACOR command,with ANACOR command
ANACOR (command),ANACOR (command),ANACOR (command)
with WEIGHT command,with WEIGHT command,with WEIGHT command

To analyze aggregated data, such as data from a crosstabulation where cell counts are available but the original raw data are not, you can use the TABLE=ALL option or the WEIGHT command before ANACOR.

Example

To analyze a 3×3 table, such as the table that is shown below, you could use these commands:

DATA LIST FREE/ BIRTHORD ANXIETY COUNT.
BEGIN DATA
1 1 48
1 2 27
1 3 22
2 1 33
2 2 20
2 3 39
3 1 29
3 2 42
3 3 47
END DATA.
WEIGHT BY COUNT.
ANACOR TABLE=BIRTHORD (1,3) BY ANXIETY (1,3).

• The WEIGHT command weights each case by the value of COUNT, as if there are 48 subjects with BIRTHORD=1 and ANXIETY=1, 27 subjects with BIRTHORD=1 and ANXIETY=2, and so on.

• ANACOR can then be used to analyze the data.

• If any table cell value equals 0, the WEIGHT command issues a warning, but the ANACOR analysis is done correctly.

• The table cell values (the WEIGHT values) cannot be negative. WEIGHT changes system-missing values and negative values to 0.

• For large aggregated tables, you can use the TABLE=ALL option or the transformation language to enter the table “as is.”

3 x 3 table
 |  | Anxiety
 |  | High | Med | Low
Birth order | First | 48 | 27 | 22
 | Second | 33 | 20 | 39
 | Other | 29 | 42 | 47

Related Topics

ANACOR
Overview (ANACOR command)
Example (ANACOR command)
TABLE Subcommand (ANACOR command)
DIMENSION Subcommand (ANACOR command)
NORMALIZATION Subcommand (ANACOR command)
VARIANCES Subcommand (ANACOR command)
PRINT Subcommand (ANACOR command)
PLOT Subcommand (ANACOR command)
MATRIX Subcommand (ANACOR command)


ANOVA

ANOVA (command),ANOVA (command),ANOVA (command)

ANOVA is available in the Statistics Base option.

ANOVA VARIABLES= varlist BY varlist(min,max)...varlist(min,max)
 [WITH varlist] [/VARIABLES=...]

 [/COVARIATES={FIRST**}]
              {WITH   }
              {AFTER  }

 [/MAXORDERS={ALL** }]
             {n     }
             {NONE  }

 [/METHOD={UNIQUE**    }]
          {EXPERIMENTAL}
          {HIERARCHICAL}

 [/STATISTICS=[MCA] [REG†] [MEAN] [ALL] [NONE]]

 [/MISSING={EXCLUDE**}]
           {INCLUDE  }

**Default if the subcommand is omitted.

†REG (table of regression coefficients) is displayed only if the design is relevant.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See ANOVA Algorithms for computational details for this procedure.

Example

ANOVA VARIABLES=PRESTIGE BY REGION(1,9) SEX,RACE(1,2)
 /MAXORDERS=2
 /STATISTICS=MEAN.

Related Topics

Overview (ANOVA command)
Examples (ANOVA command)
VARIABLES Subcommand (ANOVA command)
COVARIATES Subcommand (ANOVA command)
MAXORDERS Subcommand (ANOVA command)
METHOD Subcommand (ANOVA command)
Summary of Analysis Methods (ANOVA command)
STATISTICS Subcommand (ANOVA command)
MISSING Subcommand (ANOVA command)
References (ANOVA command)


Overview (ANOVA command)

ANOVA performs analysis of variance for factorial designs. The default is the full factorial model if there are five or fewer factors. Analysis of variance tests the hypothesis that the group means of the dependent variable are equal. The dependent variable is interval-level, and one or more categorical variables define the groups. These categorical variables are termed factors. ANOVA also allows you to include continuous explanatory variables, termed covariates. Other procedures that perform analysis of variance are ONEWAY, SUMMARIZE, and GLM. To perform a comparison of two means, use TTEST.

Options Collapse Hide details

Options

Specifying Covariates. You can introduce covariates into the model using the WITH keyword on the VARIABLES subcommand.

Order of Entry of Covariates. By default, covariates are processed before main effects for factors. You can process covariates with or after main effects for factors using the COVARIATES subcommand.

Suppressing Interaction Effects. You can suppress the effects of various orders of interaction using the MAXORDERS subcommand.

Methods for Decomposing Sums of Squares. By default, the regression approach (keyword UNIQUE) is used. You can request the classic experimental or hierarchical approach using the METHOD subcommand.

Statistical Display. Using the STATISTICS subcommand, you can request means and counts for each dependent variable for groups defined by each factor and each combination of factors up to the fifth level. You also can request unstandardized regression coefficients for covariates and multiple classification analysis (MCA) results, which include the MCA table, the Factor Summary table, and the Model Goodness of Fit table. The MCA table shows treatment effects as deviations from the grand mean and includes a listing of unadjusted category effects for each factor, category effects adjusted for other factors, and category effects adjusted for all factors and covariates. The Factor Summary table displays eta and beta values. The Goodness of Fit table shows R and R2 for each model.

Basic Specification Collapse Hide details

Basic Specification

• The basic specification is a single VARIABLES subcommand with an analysis list. The minimum analysis list specifies a list of dependent variables, the keyword BY, a list of factor variables, and the minimum and maximum integer values of the factors in parentheses.

• By default, the model includes all interaction terms up to five-way interactions. The sums of squares are decomposed using the regression approach, in which all effects are assessed simultaneously, with each effect adjusted for all other effects in the model. A case that has a missing value for any variable in an analysis list is omitted from the analysis.

Subcommand Order Collapse Hide details

Subcommand Order

• The subcommands can be named in any order.

Operations Collapse Hide details

Operations

A separate analysis of variance is performed for each dependent variable in an analysis list, using the same factors and covariates.

ANOVA (command),ANOVA (command),ANOVA (command)
limitations,limitations,limitations
Limitations Collapse Hide details

Limitations

• A maximum of 5 analysis lists.

• A maximum of 5 dependent variables per analysis list.

• A maximum of 10 factor variables per analysis list.

• A maximum of 10 covariates per analysis list.

• A maximum of 5 interaction levels.

• A maximum of 25 value labels per variable displayed in the MCA table.

• The combined number of categories for all factors in an analysis list plus the number of covariates must be less than the sample size.

Related Topics

ANOVA
Examples (ANOVA command)
VARIABLES Subcommand (ANOVA command)
COVARIATES Subcommand (ANOVA command)
MAXORDERS Subcommand (ANOVA command)
METHOD Subcommand (ANOVA command)
Summary of Analysis Methods (ANOVA command)
STATISTICS Subcommand (ANOVA command)
MISSING Subcommand (ANOVA command)
References (ANOVA command)


Examples (ANOVA command)

ANOVA VARIABLES=PRESTIGE BY REGION(1,9) SEX, RACE(1,2)
 /MAXORDERS=2
 /STATISTICS=MEAN.

• VARIABLES specifies a three-way analysis of variance—PRESTIGE by REGION, SEX, and RACE.

• The variables SEX and RACE each have two categories, with values 1 and 2 included in the analysis. REGION has nine categories, valued 1 through 9.

• MAXORDERS examines interaction effects up to and including the second order. All three-way interaction terms are pooled into the error sum of squares.

• STATISTICS requests a table of means of PRESTIGE within the combined categories of REGION, SEX, and RACE.

Example: Specifying Multiple Analyses

ANOVA VARIABLES=PRESTIGE BY REGION(1,9) SEX,RACE(1,2)
  /RINCOME BY SEX,RACE(1,2).

• ANOVA specifies a three-way analysis of variance of PRESTIGE by REGION, SEX, and RACE, and a two-way analysis of variance of RINCOME by SEX and RACE.

Related Topics

ANOVA
Overview (ANOVA command)
VARIABLES Subcommand (ANOVA command)
COVARIATES Subcommand (ANOVA command)
MAXORDERS Subcommand (ANOVA command)
METHOD Subcommand (ANOVA command)
Summary of Analysis Methods (ANOVA command)
STATISTICS Subcommand (ANOVA command)
MISSING Subcommand (ANOVA command)
References (ANOVA command)


VARIABLES Subcommand (ANOVA command)

ANOVA (command),ANOVA (command),ANOVA (command)
VARIABLES subcommand,VARIABLES subcommand,VARIABLES subcommand
VARIABLES (subcommand),VARIABLES (subcommand),VARIABLES (subcommand)
ANOVA command,ANOVA command,ANOVA command

VARIABLES specifies the analysis list.

• More than one design can be specified on the same ANOVA command by separating the analysis lists with a slash.

BY (keyword),BY (keyword),BY (keyword)
ANOVA command,ANOVA command,ANOVA command

• Variables named before the keyword BY are dependent variables. Value ranges are not specified for dependent variables.

ANOVA (command),ANOVA (command),ANOVA (command)
factor variables,factor variables,factor variables

• Variables named after BY are factor (independent) variables.

ANOVA (command),ANOVA (command),ANOVA (command)
defining factor ranges,defining factor ranges,defining factor ranges

• Every factor variable must have a value range indicating its minimum and maximum values. The values must be separated by a space or a comma and enclosed in parentheses.

• Factor variables must have integer values. Non-integer values for factors are truncated.

• Cases with values outside the range specified for a factor are excluded from the analysis.

• If two or more factors have the same value range, you can specify the value range once following the last factor to which it applies. You can specify a single range that encompasses the ranges of all factors on the list. For example, if you have two factors, one with values 1 and 2 and the other with values 1 through 4, you can specify the range for both as 1,4. However, this may reduce performance and cause memory problems if the specified range is larger than some of the actual ranges.

ANOVA (command),ANOVA (command),ANOVA (command)
covariates,covariates,covariates

• Variables named after the keyword WITH are covariates.

• Each analysis list can include only one BY and one WITH keyword.

Related Topics

ANOVA
Overview (ANOVA command)
Examples (ANOVA command)
COVARIATES Subcommand (ANOVA command)
MAXORDERS Subcommand (ANOVA command)
METHOD Subcommand (ANOVA command)
Summary of Analysis Methods (ANOVA command)
STATISTICS Subcommand (ANOVA command)
MISSING Subcommand (ANOVA command)
References (ANOVA command)


COVARIATES Subcommand (ANOVA command)

COVARIATES (subcommand),COVARIATES (subcommand),COVARIATES (subcommand)
ANOVA command,ANOVA command,ANOVA command
ANOVA (command),ANOVA (command),ANOVA (command)
COVARIATES subcommand,COVARIATES subcommand,COVARIATES subcommand

COVARIATES specifies the order for assessing blocks of covariates and factor main effects.

• The order of entry is irrelevant when METHOD=UNIQUE.

FIRST (keyword),FIRST (keyword),FIRST (keyword)
ANOVA command,ANOVA command,ANOVA command
WITH (keyword),WITH (keyword),WITH (keyword)
ANOVA command,ANOVA command,ANOVA command
AFTER (keyword),AFTER (keyword),AFTER (keyword)
ANOVA command,ANOVA command,ANOVA command
FIRST | Process covariates before factor main effects. This is the default.
WITH | Process covariates concurrently with factor main effects.
AFTER | Process covariates after factor main effects.

Related Topics

ANOVA
Overview (ANOVA command)
Examples (ANOVA command)
VARIABLES Subcommand (ANOVA command)
MAXORDERS Subcommand (ANOVA command)
METHOD Subcommand (ANOVA command)
Summary of Analysis Methods (ANOVA command)
STATISTICS Subcommand (ANOVA command)
MISSING Subcommand (ANOVA command)
References (ANOVA command)


MAXORDERS Subcommand (ANOVA command)

ANOVA (command),ANOVA (command),ANOVA (command)
interaction effects,interaction effects,interaction effects
ANOVA (command),ANOVA (command),ANOVA (command)
MAXORDERS subcommand,MAXORDERS subcommand,MAXORDERS subcommand
MAXORDERS (subcommand),MAXORDERS (subcommand),MAXORDERS (subcommand)
ANOVA command,ANOVA command,ANOVA command
ANOVA (command),ANOVA (command),ANOVA (command)
interaction effects,interaction effects,interaction effects
interaction effects,interaction effects,interaction effects
ANOVA command,ANOVA command,ANOVA command
ALL (keyword),ALL (keyword),ALL (keyword)
ANOVA command,ANOVA command,ANOVA command

MAXORDERS suppresses the effects of various orders of interaction.

NONE (keyword),NONE (keyword),NONE (keyword)
ANOVA command,ANOVA command,ANOVA command
ALL | Examine all interaction effects up to and including the fifth order. This is the default.
n | Examine all interaction effects up to and including the nth order. For example, MAXORDERS=3 examines all interaction effects up to and including the third order. All higher-order interaction sums of squares are pooled into the error term.
NONE | Delete all interaction terms from the model. All interaction sums of squares are pooled into the error sum of squares. Only main and covariate effects appear in the ANOVA table.

Related Topics

ANOVA
Overview (ANOVA command)
Examples (ANOVA command)
VARIABLES Subcommand (ANOVA command)
COVARIATES Subcommand (ANOVA command)
METHOD Subcommand (ANOVA command)
Summary of Analysis Methods (ANOVA command)
STATISTICS Subcommand (ANOVA command)
MISSING Subcommand (ANOVA command)
References (ANOVA command)


METHOD Subcommand (ANOVA command)

ANOVA (command),ANOVA (command),ANOVA (command)
sums of squares,sums of squares,sums of squares
ANOVA (command),ANOVA (command),ANOVA (command)
METHOD subcommand,METHOD subcommand,METHOD subcommand
METHOD (subcommand),METHOD (subcommand),METHOD (subcommand)
ANOVA command,ANOVA command,ANOVA command
EXPERIMENTAL (keyword),EXPERIMENTAL (keyword),EXPERIMENTAL (keyword)
ANOVA command,ANOVA command,ANOVA command

METHOD controls the method for decomposing sums of squares.

UNIQUE (keyword),UNIQUE (keyword),UNIQUE (keyword)
ANOVA command,ANOVA command,ANOVA command
HIERARCHICAL (keyword),HIERARCHICAL (keyword),HIERARCHICAL (keyword)
ANOVA command,ANOVA command,ANOVA command
UNIQUE | Regression approach. UNIQUE overrides any keywords on the COVARIATES subcommand. All effects are assessed simultaneously for their partial contribution. The MCA and MEAN specifications on the STATISTICS subcommand are not available with the regression approach. This is the default if METHOD is omitted.
EXPERIMENTAL | Classic experimental approach. Covariates, main effects, and ascending orders of interaction are assessed separately in that order.
HIERARCHICAL | Hierarchical approach.

Related Topics

ANOVA
Overview (ANOVA command)
Examples (ANOVA command)
VARIABLES Subcommand (ANOVA command)
COVARIATES Subcommand (ANOVA command)
MAXORDERS Subcommand (ANOVA command)
Summary of Analysis Methods (ANOVA command)
STATISTICS Subcommand (ANOVA command)
MISSING Subcommand (ANOVA command)
References (ANOVA command)
Regression Approach (ANOVA command)
Classic Experimental Approach (ANOVA command)
Hierarchical Approach (ANOVA command)
Example (ANOVA command)


Regression Approach (ANOVA command)

All effects are assessed simultaneously, with each effect adjusted for all other effects in the model. This is the default when the METHOD subcommand is omitted. Since MCA tables cannot be produced when the regression approach is used, specifying MCA or ALL on STATISTICS with the default method triggers a warning.

Some restrictions apply to the use of the regression approach:

• The lowest specified categories of all the independent variables must have a marginal frequency of at least 1, since the lowest specified category is used as the reference category. If this rule is violated, no ANOVA table is produced and a message identifying the first offending variable is displayed.

• Given an n-way crosstabulation of the independent variables, there must be no empty cells defined by the lowest specified category of any of the independent variables. If this restriction is violated, one or more levels of interaction effects are suppressed and a warning message is issued. However, this constraint does not apply to categories defined for an independent variable but not occurring in the data. For example, given two independent variables, each with categories of 1, 2, and 4, the (1,1), (1,2), (1,4), (2,1), and (4,1) cells must not be empty. The (1,3) and (3,1) cells will be empty but the restriction on empty cells will not be violated. The (2,2), (2,4), (4,2), and (4,4) cells may be empty, although the degrees of freedom will be reduced accordingly.

To comply with these restrictions, specify precisely the lowest non-empty category of each independent variable. Specifying a value range of (0,9) for a variable that actually has values of 1 through 9 results in an error, and no ANOVA table is produced.

Related Topics

METHOD Subcommand (ANOVA command)
Classic Experimental Approach (ANOVA command)
Hierarchical Approach (ANOVA command)
Example (ANOVA command)


Classic Experimental Approach (ANOVA command)

Each type of effect is assessed separately in the following order (unless WITH or AFTER is specified on the COVARIATES subcommand):

• Effects of covariates

• Main effects of factors

• Two-way interaction effects

• Three-way interaction effects

• Four-way interaction effects

• Five-way interaction effects

The effects within each type are adjusted for all other effects of that type and also for the effects of all prior types. (See Table: Terms adjusted for under each option.)

Related Topics

METHOD Subcommand (ANOVA command)
Regression Approach (ANOVA command)
Hierarchical Approach (ANOVA command)
Example (ANOVA command)


Hierarchical Approach (ANOVA command)

The hierarchical approach differs from the classic experimental approach only in the way it handles covariate and factor main effects. In the hierarchical approach, factor main effects and covariate effects are assessed hierarchically—factor main effects are adjusted only for the factor main effects already assessed, and covariate effects are adjusted only for the covariates already assessed. (See Table: Terms adjusted for under each option.) The order in which factors are listed on the ANOVA command determines the order in which they are assessed.

Related Topics

METHOD Subcommand (ANOVA command)
Regression Approach (ANOVA command)
Classic Experimental Approach (ANOVA command)
Example (ANOVA command)


Example (ANOVA command)

The following analysis list specifies three factor variables named A, B, and C:

ANOVA VARIABLES=Y BY A,B,C(0,3).

The following table summarizes the three methods for decomposing sums of squares for this example.

• With the default regression approach, each factor or interaction is assessed with all other factors and interactions held constant.

• With the classic experimental approach, each main effect is assessed with the two other main effects held constant, and two-way interactions are assessed with all main effects and other two-way interactions held constant. The three-way interaction is assessed with all main effects and two-way interactions held constant.

• With the hierarchical approach, the factor main effects A, B, and C are assessed with all prior main effects held constant. The order in which the factors and covariates are listed on the ANOVA command determines the order in which they are assessed in the hierarchical analysis. The interaction effects are assessed the same way as in the experimental approach.

Terms adjusted for under each option
Effect | Regression (UNIQUE) | Experimental | Hierarchical
A | All others | B,C | None
B | All others | A,C | A
C | All others | A,B | A,B
AB | All others | A,B,C,AC,BC | A,B,C,AC,BC
AC | All others | A,B,C,AB,BC | A,B,C,AB,BC
BC | All others | A,B,C,AB,AC | A,B,C,AB,AC
ABC | All others | A,B,C,AB,AC,BC | A,B,C,AB,AC,BC

Related Topics

METHOD Subcommand (ANOVA command)
Regression Approach (ANOVA command)
Classic Experimental Approach (ANOVA command)
Hierarchical Approach (ANOVA command)


Summary of Analysis Methods (ANOVA command)

The following table describes the results obtained with various combinations of methods for controlling the entry of covariates and decomposing the sums of squares.

Combinations of COVARIATES and METHOD subcommands
Method | Assessments between types of effects | Assessments within the same type of effect
METHOD=UNIQUE | Covariates, Factors, and Interactions simultaneously | Covariates: adjust for factors, interactions, and all other covariates Factors: adjust for covariates, interactions, and all other factors Interactions: adjust for covariates, factors, and all other interactions
METHOD=EXPERIMENTAL | Covariates then Factors then Interactions | Covariates: adjust for all other covariates Factors: adjust for covariates and all other factors Interactions: adjust for covariates, factors, and all other interactions of the same and lower orders
METHOD=HIERARCHICAL | Covariates then Factors then Interactions | Covariates: adjust for covariates that are preceding in the list Factors: adjust for covariates and factors preceding in the list Interactions: adjust for covariates, factors, and all other interactions of the same and lower orders
COVARIATES=WITH and METHOD=EXPERIMENTAL | Factors and Covariates concurrently then Interactions | Covariates: adjust for factors and all other covariates Factors: adjust for covariates and all other factors Interactions: adjust for covariates, factors, and all other interactions of the same and lower orders
COVARIATES=WITH and METHOD=HIERARCHICAL | Factors and Covariates concurrently then Interactions | Factors: adjust only for preceding factors Covariates: adjust for factors and preceding covariates Interactions: adjust for covariates, factors, and all other interactions of the same and lower orders
COVARIATES=AFTER and METHOD=EXPERIMENTAL | Factors then Covariates then Interactions | Factors: adjust for all other factors Covariates: adjust for factors and all other covariates Interactions: adjust for covariates, factors, and all other interactions of the same and lower orders
COVARIATES=AFTER and METHOD=HIERARCHICAL | Factors then Covariates then Interactions | Factors: adjust only for preceding factors Covariates: adjust factors and preceding covariates Interactions: adjust for covariates, factors, and all other interactions of the same and lower orders

Related Topics

ANOVA
Overview (ANOVA command)
Examples (ANOVA command)
VARIABLES Subcommand (ANOVA command)
COVARIATES Subcommand (ANOVA command)
MAXORDERS Subcommand (ANOVA command)
METHOD Subcommand (ANOVA command)
STATISTICS Subcommand (ANOVA command)
MISSING Subcommand (ANOVA command)
References (ANOVA command)


STATISTICS Subcommand (ANOVA command)

ANOVA (command),ANOVA (command),ANOVA (command)
STATISTICS subcommand,STATISTICS subcommand,STATISTICS subcommand

STATISTICS requests additional statistics. STATISTICS can be specified by itself or with one or more keywords.

• If you specify STATISTICS without keywords, ANOVA calculates MEAN and REG (each defined below).

• If you specify a keyword or keywords on the STATISTICS subcommand, ANOVA calculates only the additional statistics you request.

MEAN (keyword),MEAN (keyword),MEAN (keyword)
ANOVA command,ANOVA command,ANOVA command
REG (keyword),REG (keyword),REG (keyword)
ANOVA command,ANOVA command,ANOVA command
MCA (keyword),MCA (keyword),MCA (keyword)
ANOVA command,ANOVA command,ANOVA command
ALL (keyword),ALL (keyword),ALL (keyword)
ANOVA command,ANOVA command,ANOVA command
NONE (keyword),NONE (keyword),NONE (keyword)
ANOVA command,ANOVA command,ANOVA command
MEAN | Means and counts table. This statistic is not available when METHOD is omitted or when METHOD=UNIQUE. See “Cell Means” below.
REG | Unstandardized regression coefficients. Displays unstandardized regression coefficients for the covariates. See the topic Regression Coefficients for the Covariates (ANOVA command) for more information.
MCA | Multiple classification analysis. The MCA, the Factor Summary, and the Goodness of Fit tables are not produced when METHOD is omitted or when METHOD=UNIQUE. See the topic Multiple Classification Analysis (ANOVA command) for more information.
ALL | Means and counts table, unstandardized regression coefficients, and multiple classification analysis.
NONE | No additional statistics. ANOVA calculates only the statistics needed for analysis of variance. This is the default if the STATISTICS subcommand is omitted.

Related Topics

ANOVA
Overview (ANOVA command)
Examples (ANOVA command)
VARIABLES Subcommand (ANOVA command)
COVARIATES Subcommand (ANOVA command)
MAXORDERS Subcommand (ANOVA command)
METHOD Subcommand (ANOVA command)
Summary of Analysis Methods (ANOVA command)
MISSING Subcommand (ANOVA command)
References (ANOVA command)
Cell Means (ANOVA command)
Regression Coefficients for the Covariates (ANOVA command)
Multiple Classification Analysis (ANOVA command)


Cell Means (ANOVA command)

ANOVA (command),ANOVA (command),ANOVA (command)
cell means,cell means,cell means

STATISTICS=MEAN displays the Cell Means table.

• This statistic is not available with METHOD=UNIQUE.

• The Cell Means table shows the means and counts of each dependent variable for each cell defined by the factors and combinations of factors. Dependent variables and factors appear in their order on the VARIABLES subcommand.

• If MAXORDERS is used to suppress higher-order interactions, cell means corresponding to suppressed interaction terms are not displayed.

• The means displayed are the observed means in each cell, and they are produced only for dependent variables, not for covariates.

Related Topics

STATISTICS Subcommand (ANOVA command)
Regression Coefficients for the Covariates (ANOVA command)
Multiple Classification Analysis (ANOVA command)


Regression Coefficients for the Covariates (ANOVA command)

ANOVA (command),ANOVA (command),ANOVA (command)
covariates,covariates,covariates

STATISTICS=REG requests the unstandardized regression coefficients for the covariates.

• The regression coefficients are computed at the point where the covariates are entered into the equation. Thus, their values depend on the type of design specified by the COVARIATES or METHOD subcommand.

• The coefficients are displayed in the ANOVA table.

Related Topics

STATISTICS Subcommand (ANOVA command)
Cell Means (ANOVA command)
Multiple Classification Analysis (ANOVA command)


Multiple Classification Analysis (ANOVA command)

MCA,MCA,MCA
ANOVA (command),ANOVA (command),ANOVA (command)
multiple classification analysis,multiple classification analysis,multiple classification analysis
multiple classification analysis,multiple classification analysis,multiple classification analysis
ANOVA command,ANOVA command,ANOVA command

STATISTICS=MCA displays the MCA, the Factor Summary, and the Model Goodness of Fit tables.

• The MCA table presents counts, predicted means, and deviations of predicted means from the grand mean for each level of each factor. The predicted and deviation means each appear in up to three forms: unadjusted, adjusted for other factors, and adjusted for other factors and covariates.

• The Factor Summary table displays the correlation ratio (eta) with the unadjusted deviations (the square of eta indicates the proportion of variance explained by all categories of the factor), a partial beta equivalent to the standardized partial regression coefficient that would be obtained by assigning the unadjusted deviations to each factor category and regressing the dependent variable on the resulting variables, and the parallel partial betas from a regression that includes covariates in addition to the factors.

• The Model Goodness of Fit table shows R and R2 for each model.

• The tables cannot be produced if METHOD is omitted or if METHOD=UNIQUE. When produced, the MCA table does not display the values adjusted for factors if COVARIATES is omitted, if COVARIATES=FIRST, or if COVARIATES=WITH and METHOD=EXPERIMENTAL. A full MCA table is produced only if METHOD=HIERARCHICAL or if METHOD=EXPERIMENTAL and COVARIATES=AFTER.

Related Topics

STATISTICS Subcommand (ANOVA command)
Cell Means (ANOVA command)
Regression Coefficients for the Covariates (ANOVA command)


MISSING Subcommand (ANOVA command)

MISSING (subcommand),MISSING (subcommand),MISSING (subcommand)
ANOVA command,ANOVA command,ANOVA command
ANOVA (command),ANOVA (command),ANOVA (command)
MISSING subcommand,MISSING subcommand,MISSING subcommand
EXCLUDE (keyword),EXCLUDE (keyword),EXCLUDE (keyword)
ANOVA command,ANOVA command,ANOVA command

By default, a case that has a missing value for any variable named in the analysis list is deleted for all analyses specified by that list. Use MISSING to include cases with user-missing data.

INCLUDE (keyword),INCLUDE (keyword),INCLUDE (keyword)
ANOVA command,ANOVA command,ANOVA command
EXCLUDE | Exclude cases with missing data. This is the default.
INCLUDE | Include cases with user-defined missing data.

Related Topics

ANOVA
Overview (ANOVA command)
Examples (ANOVA command)
VARIABLES Subcommand (ANOVA command)
COVARIATES Subcommand (ANOVA command)
MAXORDERS Subcommand (ANOVA command)
METHOD Subcommand (ANOVA command)
Summary of Analysis Methods (ANOVA command)
STATISTICS Subcommand (ANOVA command)
References (ANOVA command)


References (ANOVA command)

Andrews, F., J. Morgan, J. Sonquist, and L. Klein. 1973. Multiple classification analysis, 2nd ed. Ann Arbor: University of Michigan.

Related Topics

ANOVA
Overview (ANOVA command)
Examples (ANOVA command)
VARIABLES Subcommand (ANOVA command)
COVARIATES Subcommand (ANOVA command)
MAXORDERS Subcommand (ANOVA command)
METHOD Subcommand (ANOVA command)
Summary of Analysis Methods (ANOVA command)
STATISTICS Subcommand (ANOVA command)
MISSING Subcommand (ANOVA command)


APPLY DICTIONARY

APPLY DICTIONARY (command),APPLY DICTIONARY (command),APPLY DICTIONARY (command)
APPLY DICTIONARY (command),APPLY DICTIONARY (command),APPLY DICTIONARY (command)
syntax chart,syntax chart,syntax chart
release history,release history,release history
data dictionary,data dictionary,data dictionary
applying from another file,applying from another file,applying from another file
defining variables,defining variables,defining variables
copying variable attributes from another file,copying variable attributes from another file,copying variable attributes from another file
APPLY DICTIONARY FROM [{'savfile'|'dataset'}]
                       {*                  }

 [/SOURCE VARIABLES = varlist]

 [/TARGET VARIABLES = varlist]

 [/NEWVARS]

 [/FILEINFO [ATTRIBUTES = [{REPLACE}]]
                           {MERGE  }

            [DOCUMENTS = [{REPLACE}]]  ]
                          {MERGE  }

            [FILELABEL]
            [MRSETS = [{REPLACE}]]
                       {MERGE  }

            [VARSETS = [{REPLACE}]]
                        {MERGE  }

            [WEIGHT**]

            [ALL]

    [/VARINFO [ALIGNMENT**]  ]

           [ATTRIBUTES = [{REPLACE}]]
                          {MERGE  }
           [FORMATS**]

           [LEVEL**]

           [MISSING**]

           [ROLE**]

           [VALLABELS = [{REPLACE**}]]
                         {MERGE   }

           [VARLABEL**]

           [WIDTH**]

           [ALL]

**Default if the subcommand is not specified.

This command takes effect immediately. It does not read the active dataset or execute pending transformations. See the topic Command Order for more information.

Syntax for the APPLY DICTIONARY command can be generated from the Copy Data Properties Wizard.

Release History Collapse Hide details

Release History

Release 14.0

• ATTRIBUTES keyword introduced on FILEINFO and VARINFO subcommands.

Release 18

• ROLE keyword introduced on VARINFO subcommands.

Example

APPLY DICTIONARY FROM = 'lastmonth.sav'.

Related Topics

Overview (APPLY DICTIONARY command)
FROM Subcommand (APPLY DICTIONARY command)
NEWVARS Subcommand (APPLY DICTIONARY command)
SOURCE and TARGET Subcommands (APPLY DICTIONARY command)
FILEINFO Subcommand (APPLY DICTIONARY command)
VARINFO Subcommand (APPLY DICTIONARY command)


Overview (APPLY DICTIONARY command)

APPLY DICTIONARY can apply variable and file-based dictionary information from an external PASW Statistics data file or open dataset to the current active dataset. Variable-based dictionary information in the current active dataset can be applied to other variables in the current active dataset.

• The applied variable information includes variable and value labels, missing-value flags, alignments, variable print and write formats, measurement levels, and widths.

• The applied file information includes variable and multiple response sets, documents, file label, and weight.

• APPLY DICTIONARY can apply information selectively to variables and can apply selective file-based dictionary information.

• Individual variable attributes can be applied to individual and multiple variables of the same type (strings of the same character length or numeric).

• APPLY DICTIONARY can add new variables but cannot remove variables, change data, or change a variable’s name or type.

• Undefined (empty) attributes in the source dataset do not overwrite defined attributes in the active dataset.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is the FROM subcommand and the name of an external PASW Statistics data file or open dataset. The file specification should be enclosed in quotation marks.

Subcommand Order Collapse Hide details

Subcommand Order

The subcommands can be specified in any order.

Syntax Rules Collapse Hide details

Syntax Rules

• The file containing the dictionary information to be applied (the source file) must be an external PASW Statistics data file or a currently open dataset.

• The file to which the dictionary information is applied (the target file) must be the active dataset. You cannot specify another file.

• If a subcommand is issued more than once, APPLY DICTIONARY will ignore all but the last instance of the subcommand.

• Equals signs displayed in the syntax chart and in the examples presented here are required elements; they are not optional.

Matching Variable Type Collapse Hide details

Matching Variable Type

APPLY DICTIONARY considers two variables to have a matching variable type if:

• Both variables are numeric. This includes all numeric, currency, and date formats.

• Both variables are string (alphanumeric).

Related Topics

APPLY DICTIONARY
FROM Subcommand (APPLY DICTIONARY command)
NEWVARS Subcommand (APPLY DICTIONARY command)
SOURCE and TARGET Subcommands (APPLY DICTIONARY command)
FILEINFO Subcommand (APPLY DICTIONARY command)
VARINFO Subcommand (APPLY DICTIONARY command)


FROM Subcommand (APPLY DICTIONARY command)

APPLY DICTIONARY (command),APPLY DICTIONARY (command),APPLY DICTIONARY (command)
FROM subcommand,FROM subcommand,FROM subcommand
FROM (subcommand),FROM (subcommand),FROM (subcommand)
APPLY DICTIONARY command,APPLY DICTIONARY command,APPLY DICTIONARY command

FROM specifies an external PASW Statistics data file or an open dataset as the source file whose dictionary information is to be applied to the active dataset.

• FROM is required.

• Only one PASW Statistics data file or open dataset (including the active dataset) can be specified on FROM.

• The file specification should be enclosed in quotation marks.

• The active dataset can be specified in the FROM subcommand by using an asterisk (*) as the value. File-based dictionary information (FILEINFO subcommand) is ignored when the active dataset is used as the source file.

Example

APPLY DICTIONARY FROM "lastmonth.sav".

• This will apply variable information from lastmonth.sav to matching variables in the active dataset.

• The default variable information applied from the source file includes variable labels, value labels, missing values, level of measurement, alignment, column width (for Data Editor display), and print and write formats.

• If weighting is on in the source dataset and a matching weight variable exists in the active (target) dataset, weighting by that variable is turned on in the active dataset. No other file information (documents, file label, multiple response sets) from the source file is applied to the active dataset.

Related Topics

APPLY DICTIONARY
Overview (APPLY DICTIONARY command)
NEWVARS Subcommand (APPLY DICTIONARY command)
SOURCE and TARGET Subcommands (APPLY DICTIONARY command)
FILEINFO Subcommand (APPLY DICTIONARY command)
VARINFO Subcommand (APPLY DICTIONARY command)


NEWVARS Subcommand (APPLY DICTIONARY command)

variables,variables,variables
creating new variables with variable definition attributes of existing variables,creating new variables with variable definition attributes of existing variables,creating new variables with variable definition attributes of existing variables
defining variables,defining variables,defining variables
creating new variables with variable definition attributes of existing variables,creating new variables with variable definition attributes of existing variables,creating new variables with variable definition attributes of existing variables
APPLY DICTIONARY (command),APPLY DICTIONARY (command),APPLY DICTIONARY (command)
NEWVARS subcommand,NEWVARS subcommand,NEWVARS subcommand
NEWVARS (subcommand),NEWVARS (subcommand),NEWVARS (subcommand)
APPLY DICTIONARY command,APPLY DICTIONARY command,APPLY DICTIONARY command

NEWVARS is required to create new variables in the active (target) dataset.

Example

APPLY DICTIONARY FROM “lastmonth.sav”
  /NEWVARS.

• For a new, blank active dataset, all variables with all of their variable definition attributes are copied from the source dataset, creating a new dataset with an identical set of variables (but no data values).

• For an active dataset that contains any variables, variable definition attributes from the source dataset are applied to the matching variables in the active (target) dataset. If the source dataset contains any variables that are not present in the active dataset (determined by variable name), these variables are created in the active dataset.

Related Topics

APPLY DICTIONARY
Overview (APPLY DICTIONARY command)
FROM Subcommand (APPLY DICTIONARY command)
SOURCE and TARGET Subcommands (APPLY DICTIONARY command)
FILEINFO Subcommand (APPLY DICTIONARY command)
VARINFO Subcommand (APPLY DICTIONARY command)


SOURCE and TARGET Subcommands (APPLY DICTIONARY command)

APPLY DICTIONARY (command),APPLY DICTIONARY (command),APPLY DICTIONARY (command)
SOURCE subcommand,SOURCE subcommand,SOURCE subcommand
SOURCE (subcommand),SOURCE (subcommand),SOURCE (subcommand)
APPLY DICTIONARY command,APPLY DICTIONARY command,APPLY DICTIONARY command
APPLY DICTIONARY (command),APPLY DICTIONARY (command),APPLY DICTIONARY (command)
TARGET subcommand,TARGET subcommand,TARGET subcommand
TARGET (subcommand),TARGET (subcommand),TARGET (subcommand)
APPLY DICTIONARY command,APPLY DICTIONARY command,APPLY DICTIONARY command

The SOURCE subcommand is used to specify variables in the source file from which to apply variable definition attributes. The TARGET subcommand is used to specify variables in the active dataset to which to apply variable definition attributes.

• All variables specified in the SOURCE subcommand must exist in the source file.

• If the TARGET subcommand is specified without the SOURCE subcommand, all variables specified must exist in the source file.

• If the NEWVARS subcommand is specified, variables that are specified in the SOURCE subcommand that exist in the source file but not in the target file will be created in the target file as new variables using the variable definition attributes (variable and value labels, missing values, etc.) from the source variable.

• For variables with matching name and type, variable definition attributes from the source variable are applied to the matching target variable.

• If both SOURCE and TARGET are specified, the SOURCE subcommand can specify only one variable. Variable definition attributes from that single variable in the SOURCE subcommand are applied to all variables of the matching type. When applying the attributes of one variable to many variables, all variables specified in the SOURCE and TARGET subcommands must be of the same type.

• For variables with matching names but different types, only variable labels are applied to the target variables.

Variable mapping for SOURCE and TARGET subcommands
SOURCE subcommand | TARGET subcommand | Variable mapping
none | none | Variable definition attributes from the source dataset are applied to matching variables in the active (target) dataset. New variables may be created if the NEWVARS subcommand is specified.
many | none | Variable definition attributes for the specified variables are copied from the source dataset to the matching variables in the active (target) dataset. All specified variables must exist in the source dataset. New variables may be created if the NEWVARS subcommand is specified.
none | many | Variable definition attributes for the specified variables are copied from the source dataset to the matching variables in the active (target) dataset. All specified variables must exist in the source dataset. New variables may be created if the NEWVARS subcommand is specified.
one | many | Variable definition attributes for the specified variable in the source dataset are applied to all specified variables in the active (target) dataset that have a matching type. New variables may be created if the NEWVARS subcommand is specified.
many | many | Invalid. Command not executed.

Example

APPLY DICTIONARY from *
  /SOURCE VARIABLES = var1
  /TARGET VARIABLES = var2 var3 var4
  /NEWVARS.

• Variable definition attributes for var1 in the active dataset are copied to var2, var3, and var4 in the same dataset if they have a matching type.

• Any variables specified in the TARGET subcommand that do not already exist are created, using the variable definition attributes of the variable specified in the SOURCE subcommand.

Example

APPLY DICTIONARY from “lastmonth.sav”
  /SOURCE VARIABLES = var1, var2, var3.

• Variable definition attributes from the specified variables in the source dataset are applied to the matching variables in the active dataset.

• For variables with matching names but different types, only variable labels from the source variable are copied to the target variable.

• In the absence of a NEWVARS subcommand, no new variables will be created.

Related Topics

APPLY DICTIONARY
Overview (APPLY DICTIONARY command)
FROM Subcommand (APPLY DICTIONARY command)
NEWVARS Subcommand (APPLY DICTIONARY command)
FILEINFO Subcommand (APPLY DICTIONARY command)
VARINFO Subcommand (APPLY DICTIONARY command)


FILEINFO Subcommand (APPLY DICTIONARY command)

file information,file information,file information
copying file information from another data file,copying file information from another data file,copying file information from another data file
APPLY DICTIONARY (command),APPLY DICTIONARY (command),APPLY DICTIONARY (command)
FILEINFO subcommand,FILEINFO subcommand,FILEINFO subcommand
FILEINFO (subcommand),FILEINFO (subcommand),FILEINFO (subcommand)
APPLY DICTIONARY command,APPLY DICTIONARY command,APPLY DICTIONARY command

FILEINFO applies global file definition attributes from the source dataset to the active (target) dataset.

• File definition attributes in the active dataset that are undefined in the source dataset are not affected.

• This subcommand is ignored if the source dataset is the active dataset.

• This subcommand is ignored if no keywords are specified.

• For keywords that contain an associated value, the equals sign between the keyword and the value is required—for example, DOCUMENTS = MERGE.

documents,documents,documents
copying documents from another data file,copying documents from another data file,copying documents from another data file
DOCUMENTS (keyword),DOCUMENTS (keyword),DOCUMENTS (keyword)
APPLY DICTIONARY command,APPLY DICTIONARY command,APPLY DICTIONARY command
file label,file label,file label
copying file label from another data file,copying file label from another data file,copying file label from another data file
FILELABEL (keyword),FILELABEL (keyword),FILELABEL (keyword)
APPLY DICTIONARY command,APPLY DICTIONARY command,APPLY DICTIONARY command
multiple response sets,multiple response sets,multiple response sets
copying sets from another data file,copying sets from another data file,copying sets from another data file
MRSETS (keyword),MRSETS (keyword),MRSETS (keyword)
APPLY DICTIONARY command,APPLY DICTIONARY command,APPLY DICTIONARY command
variable sets,variable sets,variable sets
copying sets from another data file,copying sets from another data file,copying sets from another data file
WEIGHT (keyword),WEIGHT (keyword),WEIGHT (keyword)
APPLY DICTIONARY command,APPLY DICTIONARY command,APPLY DICTIONARY command
ATTRIBUTES (keyword),ATTRIBUTES (keyword),ATTRIBUTES (keyword)
APPLY DICTIONARY command,APPLY DICTIONARY command,APPLY DICTIONARY command
ATTRIBUTES | Applies file attributes defined by the DATAFILE ATTRIBUTE command. You can REPLACE or MERGE file attributes.
DOCUMENTS | Applies documents (defined with the DOCUMENTS command) from the source dataset to the active (target) dataset. You can REPLACE or MERGE documents.
 | DOCUMENTS = REPLACE replaces any documents in the active dataset, deleting preexisting documents in the file. This is the default if DOCUMENTS is specified without a value.
 | DOCUMENTS = MERGE merges documents from the source and active datasets. Unique documents in the source file that don’t exist in the active dataset are added to the active dataset. All documents are then sorted by date.
FILELABEL | Replaces the file label (defined with the FILE LABEL command).
MRSETS | Applies multiple response set definitions from the source dataset to the active dataset. Multiple response sets that contain no variables in the active dataset (including variables added by the same APPLY DICTIONARY command) are ignored. You can REPLACE or MERGE multiple response sets.
 | MRSETS = REPLACE deletes any existing multiple response sets in the active dataset, replacing them with multiple response sets from the source dataset.
 | MRSETS = MERGE adds multiple response sets from the source dataset to the collection of multiple response sets in the active dataset. If a set with the same name exists in both files, the existing set in the active dataset is unchanged.
VARSETS | Applies variable set definitions from the source dataset to the active dataset. Variable sets are used to control the list of variables that are displayed in dialog boxes. Variable sets are defined by selecting Define Variable Sets from the Utilities menu. Sets in the source data file that don't contain any variables in the active dataset are ignored unless those variables are created by the same APPLY DICTIONARY command. You can REPLACE or MERGE variable sets.
 | VARSETS = REPLACE deletes any existing variable sets in the active dataset, replacing them with variable sets from the source dataset.
 | VARSETS = MERGE adds variable sets from the source dataset to the collection of variable sets in the active dataset. If a set with the same name exists in both files, the existing set in the active dataset is unchanged.
WEIGHT | Weights cases by the variable specified in the source file if there’s a matching variable in the target file. This is the default if the subcommand is omitted.
ALL | Applies all file information from the source dataset to the active dataset. Documents, multiple response sets, and variable sets are merged, not replaced. File definition attributes in the active dataset that are undefined in the source data file are not affected.

Example

APPLY DICTIONARY FROM “lastmonth.sav”
  /FILEINFO DOCUMENTS = REPLACE MRSETS = MERGE.

• Documents in the source dataset replace documents in the active dataset unless there are no defined documents in the source dataset.

• Multiple response sets from the source dataset are added to the collection of defined multiple response sets in the active dataset. Sets in the source dataset that contain variables that don’t exist in the active dataset are ignored. If the same set name exists in both datasets, the set in the active dataset remains unchanged.

Related Topics

APPLY DICTIONARY
Overview (APPLY DICTIONARY command)
FROM Subcommand (APPLY DICTIONARY command)
NEWVARS Subcommand (APPLY DICTIONARY command)
SOURCE and TARGET Subcommands (APPLY DICTIONARY command)
VARINFO Subcommand (APPLY DICTIONARY command)


VARINFO Subcommand (APPLY DICTIONARY command)

defining variables,defining variables,defining variables
copying variable definition attributes from other variables in current or external data file,copying variable definition attributes from other variables in current or external data file,copying variable definition attributes from other variables in current or external data file
copying variable definition attributes from other variables in current or external data file,copying variable definition attributes from other variables in current or external data file,copying variable definition attributes from other variables in current or external data file

VARINFO applies variable definition attributes from the source dataset to the matching variables in the active dataset. With the exception of VALLABELS, all keywords replace the variable definition attributes in the active dataset with the attributes from the matching variables in the source dataset.

ALIGNMENT (keyword),ALIGNMENT (keyword),ALIGNMENT (keyword)
APPLY DICTIONARY command,APPLY DICTIONARY command,APPLY DICTIONARY command
FORMATS (keyword),FORMATS (keyword),FORMATS (keyword)
APPLY DICTIONARY command,APPLY DICTIONARY command,APPLY DICTIONARY command
LEVEL (keyword),LEVEL (keyword),LEVEL (keyword)
APPLY DICTIONARY command,APPLY DICTIONARY command,APPLY DICTIONARY command
level of measurement,level of measurement,level of measurement
copying from other variables in current or external data file,copying from other variables in current or external data file,copying from other variables in current or external data file
measurement level,measurement level,measurement level
copying from other variables in current or external data file,copying from other variables in current or external data file,copying from other variables in current or external data file
MISSING (keyword),MISSING (keyword),MISSING (keyword)
APPLY DICTIONARY command,APPLY DICTIONARY command,APPLY DICTIONARY command
missing values,missing values,missing values
copying from other variables in current or external data file,copying from other variables in current or external data file,copying from other variables in current or external data file
VALLABELS (keyword),VALLABELS (keyword),VALLABELS (keyword)
APPLY DICTIONARY command,APPLY DICTIONARY command,APPLY DICTIONARY command
value labels,value labels,value labels
copying from other variables in current or external data file,copying from other variables in current or external data file,copying from other variables in current or external data file
ATTRIBUTES (keyword),ATTRIBUTES (keyword),ATTRIBUTES (keyword)
APPLY DICTIONARY command,APPLY DICTIONARY command,APPLY DICTIONARY command
ALIGNMENT | Applies variable alignment for Data Editor display. This setting affects alignment (left, right, center) only in the Data View display of the Data Editor.
ATTRIBUTES | Applies file attributes defined by the VARIABLE ATTRIBUTE command. You can REPLACE or MERGE variable attributes.
FORMATS | Applies variable print and write formats. This is the same variable definition attribute that can be defined with the FORMATS command. This setting is primarily applicable only to numeric variables. For string variables, this affects only the formats if the source or target variable is AHEX format and the other is A format.
LEVEL | Applies variable measurement level (nominal, ordinal, scale). This is the same variable definition attribute that can be defined with the VARIABLE LEVEL command.
MISSING | Applies variable missing value definitions. Any existing defined missing values in the matching variables in the active dataset are deleted. This is the same variable definition attribute that can be defined with the MISSING VALUES command. Missing values definitions are not applied to string variables if the source variable contains missing values of a longer width than the defined width of the target variable.
MISSING | Applies variable missing value definitions. Any existing defined missing values in the matching variables in the active dataset are deleted. This is the same variable definition attribute that can be defined with the MISSING VALUES command. Missing values definitions are not applied to string variables if the source variable contains missing values of a longer width than the defined width of the target variable.
MISSING | Applies variable missing value definitions. Any existing defined missing values in the matching variables in the active dataset are deleted. This is the same variable definition attribute that can be defined with the MISSING VALUES command. Missing values definitions are not applied to string variables if the source variable contains missing values of a longer width than the defined width of the target variable.
MISSING | Applies variable missing value definitions. Any existing defined missing values in the matching variables in the active dataset are deleted. This is the same variable definition attribute that can be defined with the MISSING VALUES command. Missing values definitions are not applied to string variables if the source variable contains missing values of a longer width than the defined width of the target variable.
ROLE | Applies role assignments. See the topic Overview (VARIABLE ROLE command) for more information.
VALLABELS | Applies value label definitions. Value labels are not applied to string variables if the source variable contains defined value labels for values longer than the defined width of the target variable. You can REPLACE or MERGE value labels.
 | VALLABELS = REPLACE replaces any defined value labels from variable in the active dataset with the value labels from the matching variable in the source dataset.
 | VALLABELS = MERGE merges defined value labels for matching variables. If the same value has a defined value label in both the source and active datasets, the value label in the active dataset is unchanged.
WIDTH | Display column width in the Data Editor. This affects only column width in Data View in the Data Editor. It has no affect on the defined width of the variable.

Example

APPLY DICTIONARY from “lastmonth.sav”
  /VARINFO LEVEL MISSING VALLABELS = MERGE.

• The level of measurement and defined missing values from the source dataset are applied to the matching variables in the active (target) dataset. Any existing missing values definitions for those variables in the active dataset are deleted.

• Value labels for matching variables in the two datasets are merged. If the same value has a defined value label in both the source and active datasets, the value label in the active dataset is unchanged.

Related Topics

APPLY DICTIONARY
Overview (APPLY DICTIONARY command)
FROM Subcommand (APPLY DICTIONARY command)
NEWVARS Subcommand (APPLY DICTIONARY command)
SOURCE and TARGET Subcommands (APPLY DICTIONARY command)
FILEINFO Subcommand (APPLY DICTIONARY command)


AREG

AREG (command),AREG (command),AREG (command)
AREG (command),AREG (command),AREG (command)
syntax chart,syntax chart,syntax chart
Autoregression,Autoregression,Autoregression
command syntax,command syntax,command syntax

AREG requires a special license that is not available to all users.

AREG [VARIABLES=] dependent series name WITH independent series names

 [/METHOD={PW**}]
          {CO  }
          {ML  }

 [/{CONSTANT† }]
   {NOCONSTANT}

 [/RHO={0**  }]
       {value}

 [/MXITER={10**}]
          {n   }

 [/APPLY [='model name'] [{SPECIFICATIONS}]]
                          {INITIAL       }
                          {FIT           }

**Default if the subcommand is omitted.

†Default if the subcommand or keyword is omitted and there is no corresponding specification on the TSET command.

Method definitions:

PW | Prais-Winsten (GLS) estimation
CO | Cochrane-Orcutt estimation
ML | Exact maximum-likelihood estimation

See AREG Algorithms for computational details for this procedure.

Example

AREG VARY WITH VARX.

Related Topics

Overview (AREG command)
VARIABLES Subcommand (AREG command)
METHOD Subcommand (AREG command)
CONSTANT and NOCONSTANT Subcommands (AREG command)
RHO Subcommand (AREG command)
MXITER Subcommand (AREG command)
APPLY Subcommand (AREG command)
References (AREG command)
ARIMA
EXSMOOTH
FIT
SEASON
SPECTRA
TSET
TSHOW
MODEL NAME
READ MODEL
SAVE MODEL
TDISPLAY


Overview (AREG command)

AREG estimates a regression model with AR(1) (first-order autoregressive) errors. (Models whose errors follow a general ARIMA process can be estimated using the ARIMA procedure.) AREG provides a choice among three estimation techniques.

For the Prais-Winsten and Cochrane-Orcutt estimation methods (keywords PW and CO), you can obtain the rho values and statistics at each iteration, and regression statistics for the ordinary least-square and final Prais-Winsten or Cochrane-Orcutt estimates. For the maximum-likelihood method (keyword ML), you can obtain the adjusted sum of squares and Marquardt constant at each iteration and, for the final parameter estimates, regression statistics, correlation and covariance matrices, Akaike’s information criterion (AIC) (Akaike, 1974), and Schwartz’s Bayesian criterion (SBC) (Schwartz, 1978).

Options Collapse Hide details

Options

Estimation Technique. You can select one of three available estimation techniques (Prais-Winsten, Cochrane-Orcutt, or exact maximum-likelihood) on the METHOD subcommand. You can request regression through the origin or inclusion of a constant in the model by specifying NOCONSTANT or CONSTANT to override the setting on the TSET command.

Rho Value. You can specify the value to be used as the initial rho value (estimate of the first autoregressive parameter) on the RHO subcommand.

Iterations. You can specify the maximum number of iterations the procedure is allowed to cycle through in calculating estimates on the MXITER subcommand.

Statistical Output. To display estimates and statistics at each iteration in addition to the default output, specify TSET PRINT=DETAILED before AREG. To display only the final parameter estimates, use TSET PRINT=BRIEF (see TSET for more information).

New Variables. To evaluate the regression summary table without creating new variables, specify TSET NEWVAR=NONE prior to AREG. This can result in faster processing time. To add new variables without erasing the values of previous Forecasting-generated variables, specify TSET NEWVAR=ALL. This saves all new variables generated during the session to the active dataset and may require extra processing time.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is one dependent series name, the keyword WITH, and one or more independent series names.

• By default, procedure AREG estimates a regression model using the Prais-Winsten (GLS) technique. The number of iterations is determined by the convergence value set on TSET CNVERGE (default of 0.001), up to the default maximum number of 10 iterations. A 95% confidence interval is used unless it is changed by a TSET CIN command prior to the AREG procedure.

• Unless the default on TSET NEWVAR is changed prior to AREG, five variables are automatically created, labeled, and added to the active dataset: fitted values (FIT#1), residuals (ERR#1), lower confidence limits (LCL#1), upper confidence limits (UCL#1), and standard errors of prediction (SEP#1).

Subcommand Order Collapse Hide details

Subcommand Order

• VARIABLES must be specified first.

• The remaining subcommands can be specified in any order.

Syntax Rules Collapse Hide details

Syntax Rules

• VARIABLES can be specified only once.

• Other subcommands can be specified more than once, but only the last specification of each one is executed.

Operations Collapse Hide details

Operations

• AREG cannot forecast beyond the end of the regressor (independent) series (see PREDICT for more information).

• Method ML allows missing data anywhere in the series. Missing values at the beginning and end are skipped and the analysis proceeds with the first nonmissing case using Melard’s algorithm. If imbedded missing values are found, they are noted and the Kalman filter is used for estimation.

• Methods PW and CO allow missing values at the beginning or end of the series but not within the series. Missing values at the beginning or end of the series are skipped. If imbedded missing values are found, a warning is issued suggesting the ML method be used instead and the analysis terminates. (See RMV for information on replacing missing values.)

• Series with missing cases may require extra processing time.

Limitations Collapse Hide details

Limitations

• Maximum 1 VARIABLES subcommand.

• Maximum 1 dependent series in the series list. There is no limit on the number of independent series.

Related Topics

AREG
VARIABLES Subcommand (AREG command)
METHOD Subcommand (AREG command)
CONSTANT and NOCONSTANT Subcommands (AREG command)
RHO Subcommand (AREG command)
MXITER Subcommand (AREG command)
APPLY Subcommand (AREG command)
References (AREG command)


VARIABLES Subcommand (AREG command)

AREG (command),AREG (command),AREG (command)
VARIABLES subcommand,VARIABLES subcommand,VARIABLES subcommand
VARIABLES (subcommand),VARIABLES (subcommand),VARIABLES (subcommand)
AREG command,AREG command,AREG command

VARIABLES specifies the series list and is the only required subcommand. The actual keyword VARIABLES can be omitted.

AREG (command),AREG (command),AREG (command)
VARIABLES subcommand,VARIABLES subcommand,VARIABLES subcommand
VARIABLES (subcommand),VARIABLES (subcommand),VARIABLES (subcommand)
AREG command,AREG command,AREG command

• The dependent series is specified first, followed by the keyword WITH and one or more independent series.

Related Topics

AREG
Overview (AREG command)
METHOD Subcommand (AREG command)
CONSTANT and NOCONSTANT Subcommands (AREG command)
RHO Subcommand (AREG command)
MXITER Subcommand (AREG command)
APPLY Subcommand (AREG command)
References (AREG command)


METHOD Subcommand (AREG command)

AREG (command),AREG (command),AREG (command)
METHOD subcommand,METHOD subcommand,METHOD subcommand
METHOD (subcommand),METHOD (subcommand),METHOD (subcommand)
AREG command,AREG command,AREG command

METHOD specifies the estimation technique. Three different estimation techniques are available.

• If METHOD is not specified, the Prais-Winsten method is used.

• Only one method can be specified on the METHOD subcommand.

The available methods are:

PW (keyword),PW (keyword),PW (keyword)
AREG command,AREG command,AREG command
AREG (command),AREG (command),AREG (command)
Prais-Winsten method,Prais-Winsten method,Prais-Winsten method
Prais-Winsten method,Prais-Winsten method,Prais-Winsten method
AREG command,AREG command,AREG command
PW (keyword),PW (keyword),PW (keyword)
AREG command,AREG command,AREG command
Cochrane-Orcutt method,Cochrane-Orcutt method,Cochrane-Orcutt method
AREG command,AREG command,AREG command
AREG (command),AREG (command),AREG (command)
Cochrane-Orcutt method,Cochrane-Orcutt method,Cochrane-Orcutt method
CO (keyword),CO (keyword),CO (keyword)
AREG command,AREG command,AREG command
maximum likelihood estimation,maximum likelihood estimation,maximum likelihood estimation
AREG command,AREG command,AREG command
AREG (command),AREG (command),AREG (command)
maximum likelihood estimation,maximum likelihood estimation,maximum likelihood estimation
ML (keyword),ML (keyword),ML (keyword)
AREG command,AREG command,AREG command
PW | Prais-Winsten method. This generalized least-squares approach is the default (Johnston, 1984).
CO | Cochrane-Orcutt method.(Johnston, 1984)
ML | Exact maximum-likelihood method. This method can be used when one of the independent variables is the lagged dependent variable. It can also handle missing data anywhere in the series (Kohn and Ansley, 1986).

Example

AREG VARY WITH VARX
  /METHOD=CO.
AREG (command),AREG (command),AREG (command)
METHOD subcommand,METHOD subcommand,METHOD subcommand
METHOD (subcommand),METHOD (subcommand),METHOD (subcommand)
AREG command,AREG command,AREG command

In this example, the Cochrane-Orcutt method is used to estimate the regression model.

Related Topics

AREG
Overview (AREG command)
VARIABLES Subcommand (AREG command)
CONSTANT and NOCONSTANT Subcommands (AREG command)
RHO Subcommand (AREG command)
MXITER Subcommand (AREG command)
APPLY Subcommand (AREG command)
References (AREG command)


CONSTANT and NOCONSTANT Subcommands (AREG command)

AREG (command),AREG (command),AREG (command)
including constant,including constant,including constant
AREG (command),AREG (command),AREG (command)
NOCONSTANT subcommand,NOCONSTANT subcommand,NOCONSTANT subcommand
AREG (command),AREG (command),AREG (command)
CONSTANT subcommand,CONSTANT subcommand,CONSTANT subcommand
NOCONSTANT (subcommand),NOCONSTANT (subcommand),NOCONSTANT (subcommand)
AREG command,AREG command,AREG command
CONSTANT (subcommand),CONSTANT (subcommand),CONSTANT (subcommand)
AREG command,AREG command,AREG command

CONSTANT and NOCONSTANT indicate whether a constant term should be estimated in the regression equation. The specification overrides the corresponding setting on the TSET command.

• CONSTANT indicates that a constant should be estimated. It is the default unless changed by TSET NOCONSTANT prior to the current procedure.

• NOCONSTANT eliminates the constant term from the model.

Related Topics

AREG
Overview (AREG command)
VARIABLES Subcommand (AREG command)
METHOD Subcommand (AREG command)
RHO Subcommand (AREG command)
MXITER Subcommand (AREG command)
APPLY Subcommand (AREG command)
References (AREG command)


RHO Subcommand (AREG command)

AREG (command),AREG (command),AREG (command)
RHO subcommand,RHO subcommand,RHO subcommand
RHO (subcommand),RHO (subcommand),RHO (subcommand)
AREG command,AREG command,AREG command
AREG (command),AREG (command),AREG (command)
rho value,rho value,rho value
rho value,rho value,rho value
AREG command,AREG command,AREG command

RHO specifies the initial value of rho, an estimate of the first autoregressive parameter.

• If RHO is not specified, the initial rho value defaults to 0 (equivalent to ordinary least squares).

• The value specified on RHO can be any value greater than −1 and less than 1.

• Only one rho value can be specified per AREG command.

Example

AREG VAR01 WITH VAR02 VAR03
  /METHOD=CO
  /RHO=0.5.
AREG (command),AREG (command),AREG (command)
RHO subcommand,RHO subcommand,RHO subcommand
RHO (subcommand),RHO (subcommand),RHO (subcommand)
AREG command,AREG command,AREG command

• In this example, the Cochrane-Orcutt (CO) estimation method with an initial rho value of 0.5 is used.

Related Topics

AREG
Overview (AREG command)
VARIABLES Subcommand (AREG command)
METHOD Subcommand (AREG command)
CONSTANT and NOCONSTANT Subcommands (AREG command)
MXITER Subcommand (AREG command)
APPLY Subcommand (AREG command)
References (AREG command)


MXITER Subcommand (AREG command)

AREG (command),AREG (command),AREG (command)
MXITER subcommand,MXITER subcommand,MXITER subcommand
MXITER (subcommand),MXITER (subcommand),MXITER (subcommand)
AREG command,AREG command,AREG command
iterations,iterations,iterations
AREG command,AREG command,AREG command
AREG (command),AREG (command),AREG (command)
maximum iterations,maximum iterations,maximum iterations

MXITER specifies the maximum number of iterations of the estimation process.

• If MXITER is not specified, the maximum number of iterations defaults to 10.

• The specification on MXITER can be any positive integer.

• Iteration stops either when the convergence criterion is met or when the maximum is reached, whichever occurs first. The convergence criterion is set on the TSET CNVERGE command. The default is 0.001.

Example

AREG VARY WITH VARX
  /MXITER=5.

• In this example, AREG generates Prais-Winsten estimates and associated statistics with a maximum of 5 iterations.

Related Topics

AREG
Overview (AREG command)
VARIABLES Subcommand (AREG command)
METHOD Subcommand (AREG command)
CONSTANT and NOCONSTANT Subcommands (AREG command)
RHO Subcommand (AREG command)
APPLY Subcommand (AREG command)
References (AREG command)


APPLY Subcommand (AREG command)

AREG (command),AREG (command),AREG (command)
APPLY subcommand,APPLY subcommand,APPLY subcommand
APPLY (subcommand),APPLY (subcommand),APPLY (subcommand)
AREG command,AREG command,AREG command
AREG (command),AREG (command),AREG (command)
using a previously defined model,using a previously defined model,using a previously defined model

APPLY allows you to use a previously defined AREG model without having to repeat the specifications.

• The specifications on APPLY can include the name of a previous model in quotes and one of three keywords. All of these specifications are optional.

• If a model name is not specified, the model specified on the previous AREG command is used.

• To change one or more specifications of the model, specify the subcommands of only those portions you want to change after the APPLY subcommand.

• If no series are specified on the AREG command, the series that were originally specified with the model being reapplied are used.

• To change the series used with the model, enter new series names before or after the APPLY subcommand. If a series name is specified before APPLY, the slash before the subcommand is required.

FIT (keyword),FIT (keyword),FIT (keyword)
APPLY subcommand,APPLY subcommand,APPLY subcommand
APPLY (subcommand),APPLY (subcommand),APPLY (subcommand)
FIT keyword,FIT keyword,FIT keyword

• APPLY with the keyword FIT sets MXITER to 0. If you apply a model that used FIT and want to obtain estimates, you will need to respecify MXITER.

The keywords available for APPLY with AREG are:

SPECIFICATIONS (keyword),SPECIFICATIONS (keyword),SPECIFICATIONS (keyword)
APPLY subcommand,APPLY subcommand,APPLY subcommand
APPLY (subcommand),APPLY (subcommand),APPLY (subcommand)
SPECIFICATIONS keyword,SPECIFICATIONS keyword,SPECIFICATIONS keyword
SPECIFICATIONS (keyword),SPECIFICATIONS (keyword),SPECIFICATIONS (keyword)
APPLY subcommand,APPLY subcommand,APPLY subcommand
APPLY (subcommand),APPLY (subcommand),APPLY (subcommand)
SPECIFICATIONS keyword,SPECIFICATIONS keyword,SPECIFICATIONS keyword
INITIAL (keyword),INITIAL (keyword),INITIAL (keyword)
APPLY subcommand,APPLY subcommand,APPLY subcommand
APPLY (subcommand),APPLY (subcommand),APPLY (subcommand)
INITIAL keyword,INITIAL keyword,INITIAL keyword
APPLY (subcommand),APPLY (subcommand),APPLY (subcommand)
FIT keyword,FIT keyword,FIT keyword
FIT (keyword),FIT (keyword),FIT (keyword)
APPLY subcommand,APPLY subcommand,APPLY subcommand
SPECIFICATIONS | Use only the specifications from the original model. AREG should create the initial values. This is the default.
INITIAL | Use the original model’s final estimates as initial values for estimation.
FIT | No estimation. Estimates from the original model should be applied directly.

Example

AREG VARY WITH VARX
  /METHOD=CO
  /RHO=0.25
  /MXITER=15.
AREG VARY WITH VARX
  /METHOD=ML.
AREG VARY WITH VAR01
  /APPLY.
AREG VARY WITH VAR01
  /APPLY='MOD_1'
  /MXITER=10.
AREG VARY WITH VAR02
  /APPLY FIT.

• The first command estimates a regression model for VARY and VARX using the Cochrane-Orcutt method, an initial rho value of 0.25, and a maximum of 15 iterations. This model is assigned the name MOD_1.

• The second command estimates a regression model for VARY and VARX using the ML method. This model is assigned the name MOD_2.

• The third command displays the regression statistics for the series VARY and VAR01 using the same method, ML, as in the second command. This model is assigned the name MOD_3.

• The fourth command applies the same method and rho value as in the first command but changes the maximum number of iterations to 10. This new model is named MOD_4.

• The last command applies the last model, MOD_4, using the series VARY and VAR02. The FIT specification means the final estimates of MOD_4 should be applied directly to the new series with no new estimation.

Related Topics

AREG
Overview (AREG command)
VARIABLES Subcommand (AREG command)
METHOD Subcommand (AREG command)
CONSTANT and NOCONSTANT Subcommands (AREG command)
RHO Subcommand (AREG command)
MXITER Subcommand (AREG command)
References (AREG command)


References (AREG command)

Akaike, H. 1974. A new look at the statistical model identification. IEEE Transaction on Automatic Control, AC–19, 716-723.

Harvey, A. C. 1981. The econometric analysis of time series. Oxford: Philip Allan.

Johnston, J. 1984. Econometric methods. New York: McGraw-Hill.

Kohn, R., and C. Ansley. 1986. Estimation, prediction, and interpolation for ARIMA models with missing data. Journal of the American Statistical Association, 81, 751-761.

Schwartz, G. 1978. Estimating the dimensions of a model. Annals of Statistics, 6, 461-464.

Related Topics

AREG
Overview (AREG command)
VARIABLES Subcommand (AREG command)
METHOD Subcommand (AREG command)
CONSTANT and NOCONSTANT Subcommands (AREG command)
RHO Subcommand (AREG command)
MXITER Subcommand (AREG command)
APPLY Subcommand (AREG command)


ARIMA

ARIMA (command),ARIMA (command),ARIMA (command)
ARIMA (command),ARIMA (command),ARIMA (command)
syntax chart,syntax chart,syntax chart

ARIMA requires a special license that is not available to all users.

ARIMA [VARIABLES=] dependent series name [WITH independent series names]

 [/MODEL =[(p,d,q)[(sp,sd,sq)[period]]]

          [{CONSTANT† }] [{NOLOG†     }]]
           {NOCONSTANT}   {LG10 or LOG}
                          {LN         }

 [/P={value       }]  [/D=value]  [/Q={value       }]
     {(value list)}                   {(value list)}

 [/SP={value       }]  [/SD=value]  [/SQ={value       }]
      {(value list)}                     {(value list)}

 [/AR=value list] [/MA=value list]

 [/SAR=value list] [/SMA=value list]

 [/REG=value list] [/CON=value]

 [/MXITER={10** }] [/MXLAMB={1.0E9**}]
          {value}           {value  }

 [/SSQPCT={0.001**}] [/PAREPS={0.001†}]
          {value  }           {value }

 [/CINPCT={95†  }]
          {value}

 [/APPLY [='model name'] [{SPECIFICATIONS}]]
                          {INITIAL       }
                          {FIT           }

 [/FORECAST=[{EXACT   }]]
             {CLS     }
             {AUTOINIT}

**Default if the subcommand is omitted.

†Default if the subcommand or keyword is omitted and there is no corresponding specification on the TSET command.

See ARIMA Algorithms for computational details for this procedure.

Example

ARIMA SALES
  /MODEL=(0,1,1)(0,1,1).

Related Topics

Overview (ARIMA command)
VARIABLES Subcommand (ARIMA command)
MODEL Subcommand (ARIMA command)
Parameter-Order Subcommands (ARIMA command)
Initial Value Subcommands (ARIMA command)
Termination Criteria Subcommands (ARIMA command)
CINPCT Subcommand (ARIMA command)
APPLY Subcommand (ARIMA command)
FORECAST Subcommand (ARIMA command)
References (ARIMA command)
AREG
EXSMOOTH
FIT
SEASON
SPECTRA
TSET
TSHOW
MODEL NAME
READ MODEL
SAVE MODEL
TDISPLAY


Overview (ARIMA command)

ARIMA estimates nonseasonal and seasonal univariate ARIMA models with or without fixed regressor variables. The procedure uses a subroutine library written by Craig Ansley that produces maximum-likelihood estimates and can process time series with missing observations.

Options Collapse Hide details

Options

Model Specification. The traditional ARIMA (p,d,q)(sp,sd,sq) model incorporates nonseasonal and seasonal parameters multiplicatively and can be specified on the MODEL subcommand. You can also specify ARIMA models and constrained ARIMA models by using the separate parameter-order subcommands P, D, Q, SP, SD, and SQ.

Parameter Specification. If you specify the model in the traditional (p,d,q) (sp,sd,sq) format on the MODEL subcommand, you can additionally specify the period length, whether a constant should be included in the model (using the keyword CONSTANT or NOCONSTANT), and whether the series should first be log transformed (using the keyword NOLOG, LG10, or LN). You can fit single or nonsequential parameters by using the separate parameter-order subcommands to specify the exact lags. You can also specify initial values for any of the parameters using the AR, MA, SAR, SMA, REG, and CON subcommands.

Iterations. You can specify termination criteria using the MXITER, MXLAMB, SSQPCT, and PAREPS subcommands.

Confidence Intervals. You can control the size of the confidence interval using the CINPCT subcommand.

Statistical Output. To display only the final parameter statistics, specify TSET PRINT=BRIEF before ARIMA. To include parameter estimates at each iteration in addition to the default output, specify TSET PRINT=DETAILED.

New Variables. To evaluate model statistics without creating new variables, specify TSET NEWVAR=NONE prior to ARIMA. This could result in faster processing time. To add new variables without erasing the values of Forecasting-generated variables, specify TSET NEWVAR=ALL. This saves all new variables generated during the current session to the active dataset and may require extra processing time.

Forecasting. When used with the PREDICT command, an ARIMA model with no regressor variables can produce forecasts and confidence limits beyond the end of the series (see PREDICT for more information).

Basic Specification Collapse Hide details

Basic Specification

The basic specification is the dependent series name. To estimate an ARIMA model, the MODEL subcommand and/or separate parameter-order subcommands (or the APPLY subcommand) must also be specified. Otherwise, only the constant will be estimated.

• ARIMA estimates the parameter values of a model using the parameter specifications on the MODEL subcommand and/or the separate parameter-order subcommands P, D, Q, SP, SD, and SQ.

• A 95% confidence interval is used unless it is changed by a TSET CIN command prior to the ARIMA procedure.

• Unless the default on TSET NEWVAR is changed prior to ARIMA, five variables are automatically created, labeled, and added to the active dataset: fitted values (FIT#1), residuals (ERR#1), lower confidence limits (LCL#1), upper confidence limits (UCL#1), and standard errors of prediction (SEP#1).

• By default, ARIMA will iterate up to a maximum of 10 unless one of three termination criteria is met: the change in all parameters is less than the TSET CNVERGE value (the default value is 0.001); the sum-of-squares percentage change is less than 0.001%; or the Marquardt constant exceeds 109 (1.0E9).

• At each iteration, the Marquardt constant and adjusted sum of squares are displayed. For the final estimates, the displayed results include the parameter estimates, standard errors, t ratios, estimate of residual variance, standard error of the estimate, log likelihood, Akaike’s information criterion (AIC) (Akaike, 1974), Schwartz’s Bayesian criterion (SBC) (Schwartz, 1978), and covariance and correlation matrices.

Subcommand Order Collapse Hide details

Subcommand Order

• Subcommands can be specified in any order.

Syntax Rules Collapse Hide details

Syntax Rules

• VARIABLES can be specified only once.

• Other subcommands can be specified more than once, but only the last specification of each one is executed.

• The CONSTANT, NOCONSTANT, NOLOG, LN, and LOG specifications are optional keywords on the MODEL subcommand and are not independent subcommands.

Operations Collapse Hide details

Operations

• If differencing is specified in models with regressors, both the dependent series and the regressors are differenced. To difference only the dependent series, use the DIFF or SDIFF function on CREATE to create a new series (see CREATE for more information).

• When ARIMA is used with the PREDICT command to forecast values beyond the end of the series, the original series and residual variable are assigned the system-missing value after the last case in the original series.

• The USE and PREDICT ranges cannot be exactly the same; at least one case from the USE period must precede the PREDICT period. (See USE and PREDICT for more information.)

• If a LOG or LN transformation is specified, the residual (error) series is reported in the logged metric; it is not transformed back to the original metric. This is so the proper diagnostic checks can be done on the residuals. However, the predicted (forecast) values are transformed back to the original metric. Thus, the observed value minus the predicted value will not equal the residual value. A new residual variable in the original metric can be computed by subtracting the predicted value from the observed value.

• Specifications on the P, D, Q, SP, SD, and SQ subcommands override specifications on the MODEL subcommand.

• For ARIMA models with a fixed regressor, the number of forecasts and confidence intervals produced cannot exceed the number of observations for the regressor (independent) variable. Regressor series cannot be extended.

• Models of series with imbedded missing observations can take longer to estimate.

Limitations Collapse Hide details

Limitations

• Maximum 1 VARIABLES subcommand.

• Maximum 1 dependent series. There is no limit on the number of independent series.

• Maximum 1 model specification.

Related Topics

ARIMA
VARIABLES Subcommand (ARIMA command)
MODEL Subcommand (ARIMA command)
Parameter-Order Subcommands (ARIMA command)
Initial Value Subcommands (ARIMA command)
Termination Criteria Subcommands (ARIMA command)
CINPCT Subcommand (ARIMA command)
APPLY Subcommand (ARIMA command)
FORECAST Subcommand (ARIMA command)
References (ARIMA command)


VARIABLES Subcommand (ARIMA command)

ARIMA (command),ARIMA (command),ARIMA (command)
VARIABLES subcommand,VARIABLES subcommand,VARIABLES subcommand
VARIABLES (subcommand),VARIABLES (subcommand),VARIABLES (subcommand)
ARIMA command,ARIMA command,ARIMA command

VARIABLES specifies the dependent series and regressors, if any, and is the only required subcommand. The actual keyword VARIABLES can be omitted.

ARIMA (command),ARIMA (command),ARIMA (command)
VARIABLES subcommand,VARIABLES subcommand,VARIABLES subcommand
VARIABLES (subcommand),VARIABLES (subcommand),VARIABLES (subcommand)
ARIMA command,ARIMA command,ARIMA command

• The dependent series is specified first, followed by the keyword WITH and the regressors (independent series).

Related Topics

ARIMA
Overview (ARIMA command)
MODEL Subcommand (ARIMA command)
Parameter-Order Subcommands (ARIMA command)
Initial Value Subcommands (ARIMA command)
Termination Criteria Subcommands (ARIMA command)
CINPCT Subcommand (ARIMA command)
APPLY Subcommand (ARIMA command)
FORECAST Subcommand (ARIMA command)
References (ARIMA command)


MODEL Subcommand (ARIMA command)

ARIMA (command),ARIMA (command),ARIMA (command)
MODEL subcommand,MODEL subcommand,MODEL subcommand
MODEL (subcommand),MODEL (subcommand),MODEL (subcommand)
ARIMA command,ARIMA command,ARIMA command
ARIMA (command),ARIMA (command),ARIMA (command)
specifying periodicity,specifying periodicity,specifying periodicity
periodicity,periodicity,periodicity
ARIMA command,ARIMA command,ARIMA command
log transformation (base 10),log transformation (base 10),log transformation (base 10)
ARIMA command,ARIMA command,ARIMA command
natural log transformation,natural log transformation,natural log transformation
ARIMA command,ARIMA command,ARIMA command
ARIMA (command),ARIMA (command),ARIMA (command)
difference transformation,difference transformation,difference transformation
difference transformation,difference transformation,difference transformation
ARIMA command,ARIMA command,ARIMA command
seasonal difference transformation,seasonal difference transformation,seasonal difference transformation
ARIMA command,ARIMA command,ARIMA command
ARIMA (command),ARIMA (command),ARIMA (command)
seasonal difference transformation,seasonal difference transformation,seasonal difference transformation
ARIMA (command),ARIMA (command),ARIMA (command)
log transformation (base 10),log transformation (base 10),log transformation (base 10)
ARIMA (command),ARIMA (command),ARIMA (command)
natural log transformation,natural log transformation,natural log transformation

MODEL specifies the ARIMA model, period length, whether a constant term should be included in the model, and whether the series should be log transformed.

• The model parameters are listed using the traditional ARIMA (p,d,q) (sp,sd,sq) syntax.

• Nonseasonal parameters are specified with the appropriate p, d, and q values separated by commas and enclosed in parentheses.

• The value p is a positive integer indicating the order of nonseasonal autoregressive parameters, d is a positive integer indicating the degree of nonseasonal differencing, and q is a positive integer indicating the nonseasonal moving-average order.

• Seasonal parameters are specified after the nonseasonal parameters with the appropriate sp, sd, and sq values. They are also separated by commas and enclosed in parentheses.

• The value sp is a positive integer indicating the order of seasonal autoregressive parameters, sd is a positive integer indicating the degree of seasonal differencing, and sq is a positive integer indicating the seasonal moving-average order.

• After the seasonal model parameters, a positive integer can be specified to indicate the length of a seasonal period.

• If the period length is not specified, the periodicity established on TSET PERIOD is in effect. If TSET PERIOD is not specified, the periodicity established on the DATE command is used. If periodicity was not established anywhere and a seasonal model is specified, the ARIMA procedure is not executed.

The following optional keywords can be specified on MODEL:

CONSTANT (keyword),CONSTANT (keyword),CONSTANT (keyword)
ARIMA command,ARIMA command,ARIMA command
NOCONSTANT (keyword),NOCONSTANT (keyword),NOCONSTANT (keyword)
ARIMA command,ARIMA command,ARIMA command
NOLOG (keyword),NOLOG (keyword),NOLOG (keyword)
ARIMA command,ARIMA command,ARIMA command
LG10 (keyword),LG10 (keyword),LG10 (keyword)
ARIMA command,ARIMA command,ARIMA command
LN (keyword),LN (keyword),LN (keyword)
ARIMA command,ARIMA command,ARIMA command
CONSTANT | Include a constant in the model. This is the default unless the default setting on the TSET command is changed prior to the ARIMA procedure.
NOCONSTANT | Do not include a constant.
NOLOG | Do not log transform the series. This is the default.
LG10 | Log transform the series before estimation using the base 10 logarithm. The keyword LOG is an alias for LG10.
LN | Log transform the series before estimation using the natural logarithm (base e).

• Keywords can be specified anywhere on the MODEL subcommand.

• CONSTANT and NOCONSTANT are mutually exclusive. If both are specified, only the last one is executed.

• LG10 (LOG), LN, and NOLOG are mutually exclusive. If more than one is specified, only the last one is executed.

NOLOG (keyword),NOLOG (keyword),NOLOG (keyword)
ARIMA command,ARIMA command,ARIMA command
LN (keyword),LN (keyword),LN (keyword)
ARIMA command,ARIMA command,ARIMA command
LG10 (keyword),LG10 (keyword),LG10 (keyword)
ARIMA command,ARIMA command,ARIMA command
NOCONSTANT (keyword),NOCONSTANT (keyword),NOCONSTANT (keyword)
ARIMA command,ARIMA command,ARIMA command
CONSTANT (keyword),CONSTANT (keyword),CONSTANT (keyword)
ARIMA command,ARIMA command,ARIMA command

• CONSTANT and NOLOG are generally used as part of an APPLY subcommand to turn off previous NOCONSTANT, LG10, or LN specifications

Example

ARIMA SALES WITH INTERVEN
  /MODEL=(1,1,1)(1,1,1) 12 NOCONSTANT LN.

• This example specifies a model with a first-order nonseasonal autoregressive parameter, one degree of nonseasonal differencing, a first-order nonseasonal moving average, a first-order seasonal autoregressive parameter, one degree of seasonal differencing, and a first-order seasonal moving average.

• The 12 indicates that the length of the period for SALES is 12.

• The keywords NOCONSTANT and LN indicate that a constant is not included in the model and that the series is log transformed using the natural logarithm before estimation.

Related Topics

ARIMA
Overview (ARIMA command)
VARIABLES Subcommand (ARIMA command)
Parameter-Order Subcommands (ARIMA command)
Initial Value Subcommands (ARIMA command)
Termination Criteria Subcommands (ARIMA command)
CINPCT Subcommand (ARIMA command)
APPLY Subcommand (ARIMA command)
FORECAST Subcommand (ARIMA command)
References (ARIMA command)


Parameter-Order Subcommands (ARIMA command)

ARIMA (command),ARIMA (command),ARIMA (command)
parameter-order subcommands,parameter-order subcommands,parameter-order subcommands
parameter-order subcommands,parameter-order subcommands,parameter-order subcommands
ARIMA command,ARIMA command,ARIMA command
ARIMA (command),ARIMA (command),ARIMA (command)
model parameters,model parameters,model parameters
ARIMA (command),ARIMA (command),ARIMA (command)
P subcommand,P subcommand,P subcommand
P (subcommand),P (subcommand),P (subcommand)
ARIMA command,ARIMA command,ARIMA command
ARIMA (command),ARIMA (command),ARIMA (command)
D subcommand,D subcommand,D subcommand
D (subcommand),D (subcommand),D (subcommand)
ARIMA command,ARIMA command,ARIMA command
ARIMA (command),ARIMA (command),ARIMA (command)
difference transformation,difference transformation,difference transformation
difference transformation,difference transformation,difference transformation
ARIMA command,ARIMA command,ARIMA command
ARIMA (command),ARIMA (command),ARIMA (command)
Q subcommand,Q subcommand,Q subcommand
Q (subcommand),Q (subcommand),Q (subcommand)
ARIMA command,ARIMA command,ARIMA command
ARIMA (command),ARIMA (command),ARIMA (command)
single or nonsequential parameters,single or nonsequential parameters,single or nonsequential parameters
ARIMA (command),ARIMA (command),ARIMA (command)
SP subcommand,SP subcommand,SP subcommand
SP (subcommand),SP (subcommand),SP (subcommand)
ARIMA command,ARIMA command,ARIMA command
SD (subcommand),SD (subcommand),SD (subcommand)
ARIMA command,ARIMA command,ARIMA command
ARIMA (command),ARIMA (command),ARIMA (command)
SD subcommand,SD subcommand,SD subcommand
ARIMA (command),ARIMA (command),ARIMA (command)
SQ subcommand,SQ subcommand,SQ subcommand
SQ (subcommand),SQ (subcommand),SQ (subcommand)
ARIMA command,ARIMA command,ARIMA command
seasonal difference transformation,seasonal difference transformation,seasonal difference transformation
ARIMA command,ARIMA command,ARIMA command
ARIMA (command),ARIMA (command),ARIMA (command)
seasonal difference transformation,seasonal difference transformation,seasonal difference transformation

P, D, Q, SP, SD, and SQ can be used as additions or alternatives to the MODEL subcommand to specify particular lags in the model and degrees of differencing for fitting single or nonsequential parameters. These subcommands are also useful for specifying a constrained model. The subcommands represent the following parameters:

P | Autoregressive order.
D | Order of differencing.
Q | Moving-average order.
SP | Seasonal autoregressive order.
SD | Order of seasonal differencing.
SQ | Seasonal moving-average order.

• The specification on P, Q, SP, or SQ indicates which lags are to be fit and can be a single positive integer or a list of values in parentheses.

• A single value n denotes lags 1 through n.

• A single value in parentheses, for example (n), indicates that only lag n should be fit.

• A list of values in parentheses (i, j, k) denotes lags i, j, and k only.

• You can specify as many values in parentheses as you want.

• D and SD indicate the degrees of differencing and can be specified only as single values, not value lists.

• Specifications on P, D, Q, SP, SD, and SQ override specifications for the corresponding parameters on the MODEL subcommand.

Example

ARIMA SALES
  /P=2
  /D=1.
ARIMA INCOME
  /MODEL=LOG NOCONSTANT
  /P=(2).
ARIMA VAR01
  /MODEL=(1,1,4)(1,1,4)
  /Q=(2,4)
  /SQ=(2,4).
ARIMA VAR02
  /MODEL=(1,1,0)(1,1,0)
  /Q=(2,4)
  /SQ=(2,4).

• The first command fits a model with autoregressive parameters at lags 1 and 2 (P=2) and one degree of differencing (D=1) for the series SALES. This command is equivalent to:

ARIMA SALES
  /MODEL=(2,1,0).

• In the second command, the series INCOME is log transformed and no constant term is estimated. There is one autoregressive parameter at lag 2, as indicated by P=(2).

• The third command specifies a model with one autoregressive parameter, one degree of differencing, moving-average parameters at lags 2 and 4, one seasonal autoregressive parameter, one degree of seasonal differencing, and seasonal moving-average parameters at lags 2 and 4. The 4’s in the MODEL subcommand for moving average and seasonal moving average are ignored because of the Q and SQ subcommands.

• The last command specifies the same model as the previous command. Even though the MODEL command specifies no nonseasonal or seasonal moving-average parameters, these parameters are estimated at lags 2 and 4 because of the Q and SQ specifications.

Related Topics

ARIMA
Overview (ARIMA command)
VARIABLES Subcommand (ARIMA command)
MODEL Subcommand (ARIMA command)
Initial Value Subcommands (ARIMA command)
Termination Criteria Subcommands (ARIMA command)
CINPCT Subcommand (ARIMA command)
APPLY Subcommand (ARIMA command)
FORECAST Subcommand (ARIMA command)
References (ARIMA command)


Initial Value Subcommands (ARIMA command)

ARIMA (command),ARIMA (command),ARIMA (command)
initial parameter values,initial parameter values,initial parameter values
initial parameter values,initial parameter values,initial parameter values
ARIMA command,ARIMA command,ARIMA command
AR (subcommand),AR (subcommand),AR (subcommand)
ARIMA command,ARIMA command,ARIMA command
ARIMA (command),ARIMA (command),ARIMA (command)
CON subcommand,CON subcommand,CON subcommand
CON (subcommand),CON (subcommand),CON (subcommand)
ARIMA command,ARIMA command,ARIMA command
ARIMA (command),ARIMA (command),ARIMA (command)
REG subcommand,REG subcommand,REG subcommand
ARIMA (command),ARIMA (command),ARIMA (command)
SMA subcommand,SMA subcommand,SMA subcommand
ARIMA (command),ARIMA (command),ARIMA (command)
SAR subcommand,SAR subcommand,SAR subcommand
ARIMA (command),ARIMA (command),ARIMA (command)
MA subcommand,MA subcommand,MA subcommand
REG (subcommand),REG (subcommand),REG (subcommand)
ARIMA command,ARIMA command,ARIMA command
SMA (subcommand),SMA (subcommand),SMA (subcommand)
ARIMA command,ARIMA command,ARIMA command
SAR (subcommand),SAR (subcommand),SAR (subcommand)
ARIMA command,ARIMA command,ARIMA command
MA (subcommand),MA (subcommand),MA (subcommand)
ARIMA command,ARIMA command,ARIMA command
ARIMA (command),ARIMA (command),ARIMA (command)
AR subcommand,AR subcommand,AR subcommand

AR, MA, SAR, SMA, REG, and CON specify initial values for parameters. These subcommands refer to the following parameters:

AR | Autoregressive parameter values.
MA | Moving-average parameter values.
SAR | Seasonal autoregressive parameter values.
SMA | Seasonal moving-average parameter values.
REG | Fixed regressor parameter values.
CON | Constant value.

• Each subcommand specifies a value or value list indicating the initial values to be used in estimating the parameters.

• CON can be specified only as a single value, not a value list.

• Values are matched to parameters in sequential order. That is, the first value is used as the initial value for the first parameter of that type, the second value is used as the initial value for the second parameter of that type, and so on.

• Specify only the subcommands for which you can supply a complete list of initial values (one for every lag to be fit for that parameter type).

• If you specify an inappropriate initial value for AR, MA, SAR, or SMA, ARIMA will reset the value and issue a message.

• If MXITER=0, these subcommands specify final parameter values to use for forecasting.

Example

ARIMA VARY
  /MODEL (1,0,2)
  /AR=0.5
  /MA=0.8, -0.3.
ARIMA VARY
  /MODEL (1,0,2)
  /AR=0.5.

• The first command specifies initial estimation values for the autoregressive term and for the two moving-average terms.

• The second command specifies the initial estimation value for the autoregressive term only. The moving-average initial values are estimated by ARIMA.

Related Topics

ARIMA
Overview (ARIMA command)
VARIABLES Subcommand (ARIMA command)
MODEL Subcommand (ARIMA command)
Parameter-Order Subcommands (ARIMA command)
Termination Criteria Subcommands (ARIMA command)
CINPCT Subcommand (ARIMA command)
APPLY Subcommand (ARIMA command)
FORECAST Subcommand (ARIMA command)
References (ARIMA command)


Termination Criteria Subcommands (ARIMA command)

ARIMA (command),ARIMA (command),ARIMA (command)
termination criteria,termination criteria,termination criteria
termination criteria,termination criteria,termination criteria
ARIMA command,ARIMA command,ARIMA command
ARIMA (command),ARIMA (command),ARIMA (command)
iterations,iterations,iterations
iterations,iterations,iterations
ARIMA command,ARIMA command,ARIMA command

ARIMA will continue to iterate until one of four termination criteria is met. The values of these criteria can be changed using any of the following subcommands followed by the new value:

ARIMA (command),ARIMA (command),ARIMA (command)
MXITER subcommand,MXITER subcommand,MXITER subcommand
MXITER (subcommand),MXITER (subcommand),MXITER (subcommand)
ARIMA command,ARIMA command,ARIMA command
ARIMA (command),ARIMA (command),ARIMA (command)
MXITER subcommand,MXITER subcommand,MXITER subcommand
MXITER (subcommand),MXITER (subcommand),MXITER (subcommand)
ARIMA command,ARIMA command,ARIMA command
PAREPS (subcommand),PAREPS (subcommand),PAREPS (subcommand)
ARIMA command,ARIMA command,ARIMA command
ARIMA (command),ARIMA (command),ARIMA (command)
PAREPS subcommand,PAREPS subcommand,PAREPS subcommand
ARIMA (command),ARIMA (command),ARIMA (command)
SSQPCT subcommand,SSQPCT subcommand,SSQPCT subcommand
SSQPCT (subcommand),SSQPCT (subcommand),SSQPCT (subcommand)
ARIMA command,ARIMA command,ARIMA command
ARIMA (command),ARIMA (command),ARIMA (command)
SSQPCT subcommand,SSQPCT subcommand,SSQPCT subcommand
SSQPCT (subcommand),SSQPCT (subcommand),SSQPCT (subcommand)
ARIMA command,ARIMA command,ARIMA command
ARIMA (command),ARIMA (command),ARIMA (command)
MXLAMB subcommand,MXLAMB subcommand,MXLAMB subcommand
MXLAMB (subcommand),MXLAMB (subcommand),MXLAMB (subcommand)
ARIMA command,ARIMA command,ARIMA command
ARIMA (command),ARIMA (command),ARIMA (command)
MXLAMB subcommand,MXLAMB subcommand,MXLAMB subcommand
MXLAMB (subcommand),MXLAMB (subcommand),MXLAMB (subcommand)
ARIMA command,ARIMA command,ARIMA command
ARIMA (command),ARIMA (command),ARIMA (command)
PAREPS subcommand,PAREPS subcommand,PAREPS subcommand
PAREPS (subcommand),PAREPS (subcommand),PAREPS (subcommand)
ARIMA command,ARIMA command,ARIMA command
MXITER | Maximum number of iterations. The value specified can be any integer equal to or greater than 0. If MXITER equals 0, initial parameter values become final estimates to be used in forecasting. The default value is 10.
PAREPS | Parameter change tolerance. The value specified can be any real number greater than 0. A change in all of the parameters by less than this amount causes termination. The default is the value set on TSET CNVERGE. If TSET CNVERGE is not specified, the default is 0.001. A value specified on PAREPS overrides the value set on TSET CNVERGE.
SSQPCT | Sum of squares percentage. The value specified can be a real number greater than 0 and less than or equal to 100. A relative change in the adjusted sum of squares by less than this amount causes termination. The default value is 0.001%.
MXLAMB | Maximum lambda. The value specified can be any integer. If the Marquardt constant exceeds this value, estimation is terminated. The default value is 1,000,000,000 (109).

Related Topics

ARIMA
Overview (ARIMA command)
VARIABLES Subcommand (ARIMA command)
MODEL Subcommand (ARIMA command)
Parameter-Order Subcommands (ARIMA command)
Initial Value Subcommands (ARIMA command)
CINPCT Subcommand (ARIMA command)
APPLY Subcommand (ARIMA command)
FORECAST Subcommand (ARIMA command)
References (ARIMA command)


CINPCT Subcommand (ARIMA command)

ARIMA (command),ARIMA (command),ARIMA (command)
CINPCT subcommand,CINPCT subcommand,CINPCT subcommand
CINPCT (subcommand),CINPCT (subcommand),CINPCT (subcommand)
ARIMA command,ARIMA command,ARIMA command
confidence intervals,confidence intervals,confidence intervals
ARIMA command,ARIMA command,ARIMA command

CINPCT controls the size of the confidence interval.

• The specification on CINPCT can be any real number greater than 0 and less than 100.

• The default is the value specified on TSET CIN. If TSET CIN is not specified, the default is 95.

ARIMA (command),ARIMA (command),ARIMA (command)
CINPCT subcommand,CINPCT subcommand,CINPCT subcommand
CINPCT (subcommand),CINPCT (subcommand),CINPCT (subcommand)
ARIMA command,ARIMA command,ARIMA command
confidence intervals,confidence intervals,confidence intervals
ARIMA command,ARIMA command,ARIMA command
ARIMA (command),ARIMA (command),ARIMA (command)
confidence intervals,confidence intervals,confidence intervals

• CINPCT overrides the value set on the TSET CIN command.

Related Topics

ARIMA
Overview (ARIMA command)
VARIABLES Subcommand (ARIMA command)
MODEL Subcommand (ARIMA command)
Parameter-Order Subcommands (ARIMA command)
Initial Value Subcommands (ARIMA command)
Termination Criteria Subcommands (ARIMA command)
APPLY Subcommand (ARIMA command)
FORECAST Subcommand (ARIMA command)
References (ARIMA command)


APPLY Subcommand (ARIMA command)

ARIMA (command),ARIMA (command),ARIMA (command)
APPLY subcommand,APPLY subcommand,APPLY subcommand
APPLY (subcommand),APPLY (subcommand),APPLY (subcommand)
ARIMA command,ARIMA command,ARIMA command
ARIMA (command),ARIMA (command),ARIMA (command)
using a previously defined model,using a previously defined model,using a previously defined model

APPLY allows you to use a previously defined ARIMA model without having to repeat the specifications.

• The specifications on APPLY can include the name of a previous model in quotes and one of three keywords. All of these specifications are optional.

• If a model name is not specified, the model specified on the previous ARIMA command is used.

• To change one or more of the specifications of the model, specify the subcommands of only those portions you want to change after the subcommand APPLY.

• If no series are specified on the ARIMA command, the series that were originally specified with the model being reapplied are used.

• To change the series used with the model, enter new series names before or after the APPLY subcommand. If a series name is specified before APPLY, the slash before the subcommand is required.

• APPLY with the keyword FIT sets MXITER to 0. If you apply a model that used FIT and want to obtain estimates, you will need to respecify MXITER.

The keywords available for APPLY with ARIMA are:

APPLY (subcommand),APPLY (subcommand),APPLY (subcommand)
SPECIFICATIONS keyword,SPECIFICATIONS keyword,SPECIFICATIONS keyword
SPECIFICATIONS (keyword),SPECIFICATIONS (keyword),SPECIFICATIONS (keyword)
ARIMA command,ARIMA command,ARIMA command
SPECIFICATIONS (keyword),SPECIFICATIONS (keyword),SPECIFICATIONS (keyword)
ARIMA command,ARIMA command,ARIMA command
APPLY (subcommand),APPLY (subcommand),APPLY (subcommand)
SPECIFICATIONS keyword,SPECIFICATIONS keyword,SPECIFICATIONS keyword
INITIAL (keyword),INITIAL (keyword),INITIAL (keyword)
ARIMA command,ARIMA command,ARIMA command
APPLY (subcommand),APPLY (subcommand),APPLY (subcommand)
INITIAL keyword,INITIAL keyword,INITIAL keyword
APPLY (subcommand),APPLY (subcommand),APPLY (subcommand)
INITIAL keyword,INITIAL keyword,INITIAL keyword
INITIAL (keyword),INITIAL (keyword),INITIAL (keyword)
ARIMA command,ARIMA command,ARIMA command
FIT (keyword),FIT (keyword),FIT (keyword)
ARIMA command,ARIMA command,ARIMA command
APPLY (subcommand),APPLY (subcommand),APPLY (subcommand)
FIT keyword,FIT keyword,FIT keyword
FIT (keyword),FIT (keyword),FIT (keyword)
ARIMA command,ARIMA command,ARIMA command
APPLY (subcommand),APPLY (subcommand),APPLY (subcommand)
FIT keyword,FIT keyword,FIT keyword
SPECIFICATIONS | Use only the specifications from the original model. ARIMA should create the initial values. This is the default.
INITIAL | Use the original model’s final estimates as initial values for estimation.
FIT | No estimation. Estimates from the original model should be applied directly.

Example

ARIMA VAR1
  /MODEL=(0,1,1)(0,1,1) 12 LOG NOCONSTANT.
ARIMA APPLY
  /MODEL=CONSTANT.
ARIMA VAR2
  /APPLY INITIAL.
ARIMA VAR2
  /APPLY FIT.

• The first command specifies a model with one degree of differencing, one moving-average term, one degree of seasonal differencing, and one seasonal moving-average term. The length of the period is 12. A base 10 log of the series is taken before estimation and no constant is estimated. This model is assigned the name MOD_1.

• The second command applies the same model to the same series, but this time estimates a constant term. Everything else stays the same. This model is assigned the name MOD_2.

• The third command uses the same model as the previous command (MOD_2) but applies it to series VAR2. Keyword INITIAL specifies that the final estimates of MOD_2 are to be used as the initial values for estimation.

APPLY (subcommand),APPLY (subcommand),APPLY (subcommand)
ARIMA command,ARIMA command,ARIMA command
ARIMA (command),ARIMA (command),ARIMA (command)
APPLY subcommand,APPLY subcommand,APPLY subcommand

• The last command uses the same model but this time specifies no estimation. Instead, the values from the previous model are applied directly.

Related Topics

ARIMA
Overview (ARIMA command)
VARIABLES Subcommand (ARIMA command)
MODEL Subcommand (ARIMA command)
Parameter-Order Subcommands (ARIMA command)
Initial Value Subcommands (ARIMA command)
Termination Criteria Subcommands (ARIMA command)
CINPCT Subcommand (ARIMA command)
FORECAST Subcommand (ARIMA command)
References (ARIMA command)


FORECAST Subcommand (ARIMA command)

ARIMA (command),ARIMA (command),ARIMA (command)
FORECAST subcommand,FORECAST subcommand,FORECAST subcommand
FORECAST (subcommand),FORECAST (subcommand),FORECAST (subcommand)
ARIMA command,ARIMA command,ARIMA command

The FORECAST subcommand specifies the forecasting method to use. Available methods are:

EXACT (keyword),EXACT (keyword),EXACT (keyword)
ARIMA command,ARIMA command,ARIMA command
CLS (keyword),CLS (keyword),CLS (keyword)
ARIMA command,ARIMA command,ARIMA command
AUTOINIT (keyword),AUTOINIT (keyword),AUTOINIT (keyword)
ARIMA command,ARIMA command,ARIMA command
EXACT | Unconditional least squares. The forecasts are unconditional least squares forecasts. They are also called finite memory forecasts. This is the default.
CLS | Conditional least squares using model constraint for initialization. The forecasts are computed by assuming that the unobserved past errors are zero and the unobserved past values of the response series are equal to the mean.
AUTOINIT | Conditional least squares using the beginning series values for initialization. The beginning series values are used to initialize the recursive conditional least squares forecasting algorithm.

Related Topics

ARIMA
Overview (ARIMA command)
VARIABLES Subcommand (ARIMA command)
MODEL Subcommand (ARIMA command)
Parameter-Order Subcommands (ARIMA command)
Initial Value Subcommands (ARIMA command)
Termination Criteria Subcommands (ARIMA command)
CINPCT Subcommand (ARIMA command)
APPLY Subcommand (ARIMA command)
References (ARIMA command)


References (ARIMA command)

Akaike, H. 1974. A new look at the statistical model identification. IEEE Transaction on Automatic Control, AC–19, 716-723.

Box, G. E. P., and G. C. Tiao. 1975. Intervention analysis with applications to economic and environmental problems. Journal of the American Statistical Association, 70:3, 70-79.

Cryer, J. D. 1986. Time series analysis. Boston, Mass.: Duxbury Press.

Harvey, A. C. 1981. The econometric analysis of time series. Oxford: Philip Allan.

Harvey, A. C. 1981. Time series models. Oxford: Phillip Allan.

Kohn, R., and C. Ansley. 1985. Efficient estimation and prediction in time series regression models. Biometrika, 72:3, 694-697.

Kohn, R., and C. Ansley. 1986. Estimation, prediction, and interpolation for ARIMA models with missing data. Journal of the American Statistical Association, 81, 751-761.

McCleary, R., and R. A. Hay. 1980. Applied time series analysis for the social sciences. Beverly Hills, Calif.: Sage Publications.

Melard, G. 1984. A fast algorithm for the exact likelihood of autoregressive-moving average models. Applied Statistics, 33:1, 104-119.

Schwartz, G. 1978. Estimating the dimensions of a model. Annals of Statistics, 6, 461-464.

Related Topics

ARIMA
Overview (ARIMA command)
VARIABLES Subcommand (ARIMA command)
MODEL Subcommand (ARIMA command)
Parameter-Order Subcommands (ARIMA command)
Initial Value Subcommands (ARIMA command)
Termination Criteria Subcommands (ARIMA command)
CINPCT Subcommand (ARIMA command)
APPLY Subcommand (ARIMA command)
FORECAST Subcommand (ARIMA command)


AUTORECODE

AUTORECODE (command),AUTORECODE (command),AUTORECODE (command)
AUTORECODE (command),AUTORECODE (command),AUTORECODE (command)
syntax chart,syntax chart,syntax chart
release history,release history,release history
AUTORECODE VARIABLES=varlist

 /INTO new varlist

 [/BLANK={VALID**}
         {MISSING}

 [/GROUP]

 [/APPLY TEMPLATE=’filespec’]

 [/SAVE TEMPLATE=’filespec’]

 [/DESCENDING]

 [/PRINT]

**Default if the subcommand omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

Syntax for the AUTORECODE command can be generated from the Automatic Recode dialog.

Release History Collapse Hide details

Release History

Release 13.0

• BLANK subcommand introduced.

• GROUP subcommand introduced.

• APPLY TEMPLATE and SAVE TEMPLATE subcommands introduced.

Example

AUTORECODE VARIABLES=Company /INTO Rcompany.

Related Topics

Overview (AUTORECODE command)
Example (AUTORECODE command)
VARIABLES Subcommand (AUTORECODE command)
INTO Subcommand (AUTORECODE command)
BLANK Subcommand (AUTORECODE command)
GROUP Subcommand (AUTORECODE command)
SAVE TEMPLATE Subcommand (AUTORECODE command)
APPLY TEMPLATE Subcommand (AUTORECODE command)
Interaction between APPLY TEMPLATE and SAVE TEMPLATE (AUTORECODE command)
PRINT Subcommand (AUTORECODE command)
DESCENDING Subcommand (AUTORECODE command)


Overview (AUTORECODE command)

AUTORECODE (command),AUTORECODE (command),AUTORECODE (command)
missing values,missing values,missing values

AUTORECODE recodes the values of string and numeric variables to consecutive integers and puts the recoded values into a new variable called a target variable. The value labels or values of the original variable are used as value labels for the target variable. AUTORECODE is useful for creating numeric independent (grouping) variables from string variables for procedures such as ONEWAY and DISCRIMINANT. AUTORECODE can also recode the values of factor variables to consecutive integers, which may be required by some procedures and which reduces the amount of workspace needed by some statistical procedures.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is VARIABLES and INTO. VARIABLES specifies the variables to be recoded. INTO provides names for the target variables that store the new values. VARIABLES and INTO must name or imply the same number of variables.

Subcommand Order Collapse Hide details

Subcommand Order

• VARIABLES must be specified first.

• INTO must immediately follow VARIABLES.

• All other subcommands can be specified in any order.

Syntax Rules Collapse Hide details

Syntax Rules

• A variable cannot be recoded into itself. More generally, target variable names cannot duplicate any variable names already in the working file.

• If the GROUP or APPLY TEMPLATE subcommand is specified, all variables on the VARIABLES subcommand must be the same type (numeric or string).

• If APPLY TEMPLATE is specified, all variables on the VARIABLES subcommand must be the same type (numeric or string) as the type defined in the template.

• File specifications on the APPLY TEMPLATE and SAVE TEMPLATE subcommands follow the normal conventions for file specifications. Enclosing file specifications in quotation marks is recommended.

Operations Collapse Hide details

Operations

• The values of each variable to be recoded are sorted and then assigned numeric values. By default, the values are assigned in ascending order: 1 is assigned to the lowest nonmissing value of the original variable; 2, to the second-lowest nonmissing value; and so on, for each value of the original variable.

• Values of the original variables are unchanged.

• Missing values are recoded into values higher than any nonmissing values, with their order preserved. For example, if the original variable has 10 nonmissing values, the first missing value is recoded as 11 and retains its user-missing status. System-missing values remain system-missing. (See the GROUP, APPLY TEMPLATE, and SAVE TEMPLATE subcommands for additional rules for user-missing values.)

• AUTORECODE does not sort the cases in the working file. As a result, the consecutive numbers assigned to the target variables may not be in order in the file.

• Target variables are assigned the same variable labels as the original source variables. To change the variable labels, use the VARIABLE LABELS command after AUTORECODE.

• Value labels are automatically generated for each value of the target variables. If the original value had a label, that label is used for the corresponding new value. If the original value did not have a label, the old value itself is used as the value label for the new value. The defined print format of the old value is used to create the new value label.

• AUTORECODE ignores SPLIT FILE specifications. However, any SELECT IF specifications are in effect for AUTORECODE.

Related Topics

AUTORECODE
Example (AUTORECODE command)
VARIABLES Subcommand (AUTORECODE command)
INTO Subcommand (AUTORECODE command)
BLANK Subcommand (AUTORECODE command)
GROUP Subcommand (AUTORECODE command)
SAVE TEMPLATE Subcommand (AUTORECODE command)
APPLY TEMPLATE Subcommand (AUTORECODE command)
Interaction between APPLY TEMPLATE and SAVE TEMPLATE (AUTORECODE command)
PRINT Subcommand (AUTORECODE command)
DESCENDING Subcommand (AUTORECODE command)


Example (AUTORECODE command)

AUTORECODE (command),AUTORECODE (command),AUTORECODE (command)
with TABLES command,with TABLES command,with TABLES command
DATA LIST / COMPANY 1-21 (A) SALES 24-28.
BEGIN DATA
CATFOOD JOY            10000
OLD FASHIONED CATFOOD  11200
 . . .
PRIME CATFOOD          10900
CHOICE CATFOOD         14600
END DATA.

AUTORECODE VARIABLES=COMPANY /INTO=RCOMPANY /PRINT.

TABLES TABLE = SALES BY RCOMPANY
  /TTITLE='CATFOOD SALES BY COMPANY'.

• AUTORECODE recodes COMPANY into a numeric variable RCOMPANY. Values of RCOMPANY are consecutive integers beginning with 1 and ending with the number of different values entered for COMPANY. The values of COMPANY are used as value labels for RCOMPANY’s numeric values. The PRINT subcommand displays a table of the original and recoded values.

Related Topics

AUTORECODE
Overview (AUTORECODE command)
VARIABLES Subcommand (AUTORECODE command)
INTO Subcommand (AUTORECODE command)
BLANK Subcommand (AUTORECODE command)
GROUP Subcommand (AUTORECODE command)
SAVE TEMPLATE Subcommand (AUTORECODE command)
APPLY TEMPLATE Subcommand (AUTORECODE command)
Interaction between APPLY TEMPLATE and SAVE TEMPLATE (AUTORECODE command)
PRINT Subcommand (AUTORECODE command)
DESCENDING Subcommand (AUTORECODE command)


VARIABLES Subcommand (AUTORECODE command)

AUTORECODE (command),AUTORECODE (command),AUTORECODE (command)
VARIABLES subcommand,VARIABLES subcommand,VARIABLES subcommand
VARIABLES (subcommand),VARIABLES (subcommand),VARIABLES (subcommand)
AUTORECODE command,AUTORECODE command,AUTORECODE command

VARIABLES specifies the variables to be recoded. VARIABLES is required and must be specified first. The actual keyword VARIABLES is optional.

• Values from the specified variables are recoded and stored in the target variables listed on INTO. Values of the original variables are unchanged.

Related Topics

AUTORECODE
Overview (AUTORECODE command)
Example (AUTORECODE command)
INTO Subcommand (AUTORECODE command)
BLANK Subcommand (AUTORECODE command)
GROUP Subcommand (AUTORECODE command)
SAVE TEMPLATE Subcommand (AUTORECODE command)
APPLY TEMPLATE Subcommand (AUTORECODE command)
Interaction between APPLY TEMPLATE and SAVE TEMPLATE (AUTORECODE command)
PRINT Subcommand (AUTORECODE command)
DESCENDING Subcommand (AUTORECODE command)


INTO Subcommand (AUTORECODE command)

AUTORECODE (command),AUTORECODE (command),AUTORECODE (command)
INTO subcommand,INTO subcommand,INTO subcommand
INTO (subcommand),INTO (subcommand),INTO (subcommand)
AUTORECODE command,AUTORECODE command,AUTORECODE command

INTO provides names for the target variables that store the new values. INTO is required and must immediately follow VARIABLES.

• The number of target variables named or implied on INTO must equal the number of source variables listed on VARIABLES.

Example

AUTORECODE VARIABLES=V1 V2 V3 /INTO=NEWV1 TO NEWV3 /PRINT.

• AUTORECODE stores the recoded values of V1, V2, and V3 into target variables named NEWV1, NEWV2, and NEWV3.

Related Topics

AUTORECODE
Overview (AUTORECODE command)
Example (AUTORECODE command)
VARIABLES Subcommand (AUTORECODE command)
BLANK Subcommand (AUTORECODE command)
GROUP Subcommand (AUTORECODE command)
SAVE TEMPLATE Subcommand (AUTORECODE command)
APPLY TEMPLATE Subcommand (AUTORECODE command)
Interaction between APPLY TEMPLATE and SAVE TEMPLATE (AUTORECODE command)
PRINT Subcommand (AUTORECODE command)
DESCENDING Subcommand (AUTORECODE command)


BLANK Subcommand (AUTORECODE command)

missing values,missing values,missing values
autorecoding blank strings to user-missing,autorecoding blank strings to user-missing,autorecoding blank strings to user-missing
string variables,string variables,string variables
autorecoding blank strings to user-missing,autorecoding blank strings to user-missing,autorecoding blank strings to user-missing
blank strings,blank strings,blank strings
autorecoding to user-missing,autorecoding to user-missing,autorecoding to user-missing
empty strings,empty strings,empty strings
autorecoding to user-missing,autorecoding to user-missing,autorecoding to user-missing
AUTORECODE (command),AUTORECODE (command),AUTORECODE (command)
BLANK subcommand,BLANK subcommand,BLANK subcommand
BLANK (subcommand),BLANK (subcommand),BLANK (subcommand)
AUTORECODE command,AUTORECODE command,AUTORECODE command

The BLANK subcommand specifies how to autorecode blank string values.

• BLANK is followed by an equals sign (=) and the keyword VALID or MISSING.

• The BLANK subcommand applies only to string variables (both short and long strings). System-missing numeric values remain system-missing in the new, autorecoded variable(s).

• The BLANK subcommand has no effect if there are no string variables specified on the VARIABLES subcommand.

VALID | Blank string values are treated as valid, nonmissing values and are autorecoded into nonmissing values. This is the default.
MISSING | Blank string values are autorecoded into a user-missing value higher than the highest nonmissing value.
Example Collapse Hide details

Example

DATA LIST /stringVar (A1).
BEGIN DATA
a
b

c
d
END DATA.
AUTORECODE
  VARIABLES=stringVar  /INTO NumericVar
  /BLANK=MISSING.

• The values a, b, c, and d are autorecoded into the numeric values 1 through 4.

• The blank value is autorecoded to 5, and 5 is defined as user-missing.

Related Topics

AUTORECODE
Overview (AUTORECODE command)
Example (AUTORECODE command)
VARIABLES Subcommand (AUTORECODE command)
INTO Subcommand (AUTORECODE command)
GROUP Subcommand (AUTORECODE command)
SAVE TEMPLATE Subcommand (AUTORECODE command)
APPLY TEMPLATE Subcommand (AUTORECODE command)
Interaction between APPLY TEMPLATE and SAVE TEMPLATE (AUTORECODE command)
PRINT Subcommand (AUTORECODE command)
DESCENDING Subcommand (AUTORECODE command)


GROUP Subcommand (AUTORECODE command)

AUTORECODE (command),AUTORECODE (command),AUTORECODE (command)
GROUP subcommand,GROUP subcommand,GROUP subcommand
GROUP (subcommand),GROUP (subcommand),GROUP (subcommand)
AUTORECODE command,AUTORECODE command,AUTORECODE command

The subcommand GROUP allows you to specify that a single autorecoding scheme should be generated for all the specified variables, yielding consistent coding for all of the variables.

• The GROUP subcommand has no additional keywords or specifications. By default, variables are not grouped for autorecoding.

• All variables must be the same type (numeric or string).

• All observed values for all specified variables are used to create a sorted order of values to recode into sequential integers.

• String variables can be of any length and can be of unequal length.

• User-missing values for the target variables are based on the first variable in the original variable list with defined user-missing values. All other values from other original variables, except for system-missing, are treated as valid.

• If only one variable is specified on the VARIABLES subcommand, the GROUP subcommand is ignored.

• If GROUP and APPLY TEMPLATE are used on the same AUTORECODE command, value mappings from the template are applied first. All remaining values are recoded into values higher than the last value in the template, with user-missing values (based on the first variable in the list with defined user-missing values) recoded into values higher than the last valid value. See the APPLY TEMPLATE subcommand for more information.

Example Collapse Hide details

Example

DATA LIST FREE /var1 (a1) var2 (a1).
BEGIN DATA
a d
b e
c f
END DATA.
MISSING VALUES var1 ("c") var2 ("f").
AUTORECODE VARIABLES=var1 var2
  /INTO newvar1 newvar2
  /GROUP.

• A single autorecoding scheme is created and applied to both new variables.

• The user-missing value "c" from var1 is autorecoded into a user-missing value.

• The user-missing value "f" from var2 is autorecoded into a valid value.

Original and recoded values
Original value | Autorecoded value
a | 1
b | 2
c | 6 (user-missing)
d | 3
e | 4
f | 5

Related Topics

AUTORECODE
Overview (AUTORECODE command)
Example (AUTORECODE command)
VARIABLES Subcommand (AUTORECODE command)
INTO Subcommand (AUTORECODE command)
BLANK Subcommand (AUTORECODE command)
SAVE TEMPLATE Subcommand (AUTORECODE command)
APPLY TEMPLATE Subcommand (AUTORECODE command)
Interaction between APPLY TEMPLATE and SAVE TEMPLATE (AUTORECODE command)
PRINT Subcommand (AUTORECODE command)
DESCENDING Subcommand (AUTORECODE command)


SAVE TEMPLATE Subcommand (AUTORECODE command)

AUTORECODE (command),AUTORECODE (command),AUTORECODE (command)
SAVE TEMPLATE subcommand,SAVE TEMPLATE subcommand,SAVE TEMPLATE subcommand
SAVE TEMPLATE (subcommand),SAVE TEMPLATE (subcommand),SAVE TEMPLATE (subcommand)
AUTORECODE command,AUTORECODE command,AUTORECODE command

The SAVE TEMPLATE subcommand allows you to save the autorecode scheme used by the current AUTORECODE command to an external template file, which you can then use when autorecoding other variables using the APPLY TEMPLATE subcommand.

• SAVE TEMPLATE is followed by an equals sign (=) and a quoted file specification. The default file extension for autorecode templates is .sat.

• The template contains information that maps the original nonmissing values to the recoded values.

• Only information for nonmissing values is saved in the template. User-missing value information is not retained.

• If more than one variable is specified on the VARIABLES subcommand, the first variable specified is used for the template, unless GROUP or APPLY TEMPLATE is also specified, in which case a common autorecoding scheme for all variables is saved in the template.

Example Collapse Hide details

Example

DATA LIST FREE /var1 (a1) var2 (a1).
BEGIN DATA
a d
b e
c f
END DATA.
MISSING VALUES var1 ("c") var2 ("f").
AUTORECODE VARIABLES=var1 var2
  /INTO newvar1 newvar2
  /SAVE TEMPLATE='/temp/var1_template.sat'.

• The saved template contains an autorecode scheme that maps the string values of "a" and "b" from var1 to the numeric values 1 and 2, respectively.

• The template contains no information for the value of "c" for var1 because it is defined as user-missing.

• The template contains no information for values associated with var2 because the GROUP subcommand was not specified.

Related Topics

AUTORECODE
Overview (AUTORECODE command)
Example (AUTORECODE command)
VARIABLES Subcommand (AUTORECODE command)
INTO Subcommand (AUTORECODE command)
BLANK Subcommand (AUTORECODE command)
GROUP Subcommand (AUTORECODE command)
APPLY TEMPLATE Subcommand (AUTORECODE command)
Interaction between APPLY TEMPLATE and SAVE TEMPLATE (AUTORECODE command)
PRINT Subcommand (AUTORECODE command)
DESCENDING Subcommand (AUTORECODE command)
Template File Format (AUTORECODE command)


Template File Format (AUTORECODE command)

An autorecode template file is actually a data file in PASW Statistics format that contains two variables: Source_ contains the original, unrecoded valid values, and Target_ contains the corresponding recoded values. Together these two variables provide a mapping of original and recoded values.

You can therefore, theoretically, build your own custom template files, or simply include the two mapping variables in an existing data file--but this type of use has not been tested.

Related Topics

SAVE TEMPLATE Subcommand (AUTORECODE command)


APPLY TEMPLATE Subcommand (AUTORECODE command)

AUTORECODE (command),AUTORECODE (command),AUTORECODE (command)
APPLY TEMPLATE subcommand,APPLY TEMPLATE subcommand,APPLY TEMPLATE subcommand
APPLY TEMPLATE (subcommand),APPLY TEMPLATE (subcommand),APPLY TEMPLATE (subcommand)
AUTORECODE command,AUTORECODE command,AUTORECODE command

The APPLY TEMPLATE subcommand allows you to apply a previously saved autorecode template to the variables in the current AUTORECODE command, appending any additional values found in the variables to the end of the scheme, preserving the relationship between the original and autorecode values stored in the saved scheme.

• APPLY TEMPLATE is followed by an equals sign (=) and a quoted file specification.

• All variables on the VARIABLES subcommand must be the same type (numeric or string), and that type must match the type defined in the template.

• Templates do not contain any information on user-missing values. User-missing values for the target variables are based on the first variable in the original variable list with defined user-missing values. All other values from other original variables, except for system-missing, are treated as valid.

• Value mappings from the template are applied first. All remaining values are recoded into values higher than the last value in the template, with user-missing values (based on the first variable in the list with defined user-missing values) recoded into values higher than the last valid value.

• If multiple variables are specified on the VARIABLES subcommand, APPLY TEMPLATE generates a grouped recoding scheme, with or without an explicit GROUP subcommand.

Example Collapse Hide details

Example

DATA LIST FREE /var1 (a1).
BEGIN DATA
a b d
END DATA.
AUTORECODE VARIABLES=var1
  /INTO newvar1
  /SAVE TEMPLATE='/temp/var1_template.sat'.
DATA LIST FREE /var2 (a1).
BEGIN DATA
a b c
END DATA.
AUTORECODE VARIABLES=var2
  /INTO newvar2
  /APPLY TEMPLATE='/temp/var1_template.sat'.

• The template file var1_template.sat maps the string values a, b, and d to the numeric values 1, 2, and 3, respectively.

• When the template is applied to the variable var2 with the string values a, b, and c, the autorecoded values for newvar2 are 1, 2, and 4, respectively. The string value "c" is autorecoded to 4 because the template maps 3 to the string value "d".

• The data dictionary contains defined value labels for all four values--the three from the template and the one new value read from the file.

Defined value labels for newvar2
Value | Label
1 | a
2 | b
3 | d
4 | c

Related Topics

AUTORECODE
Overview (AUTORECODE command)
Example (AUTORECODE command)
VARIABLES Subcommand (AUTORECODE command)
INTO Subcommand (AUTORECODE command)
BLANK Subcommand (AUTORECODE command)
GROUP Subcommand (AUTORECODE command)
SAVE TEMPLATE Subcommand (AUTORECODE command)
Interaction between APPLY TEMPLATE and SAVE TEMPLATE (AUTORECODE command)
PRINT Subcommand (AUTORECODE command)
DESCENDING Subcommand (AUTORECODE command)


Interaction between APPLY TEMPLATE and SAVE TEMPLATE (AUTORECODE command)

• If APPLY TEMPLATE and SAVE TEMPLATE are both used in the same AUTORECODE command, APPLY TEMPLATE is always processed first, regardless of subcommand order, and the autorecode scheme saved by SAVE TEMPLATE is the union of the original template plus any appended value definitions.

• APPLY TEMPLATE and SAVE TEMPLATE can specify the same file, resulting in the template being updated to include any newly appended value definitions.

Example

AUTORECODE VARIABLES=products
 /INTO productCodes
 /APPLY TEMPLATE='/mydir/product_codes.sat'
 /SAVE TEMPLATE='/mydir/product_codes.sat.

• The autorecode scheme in the template file is applied for autorecoding products into productCodes.

• Any data values for products not defined in the template are autorecoded into values higher than the highest value in the original template.

• Any user-missing values for products are autorecoded into values higher than the highest nonmissing autorecoded value.

• The template saved is the autorecode scheme used to autorecode product--the original autorecode scheme plus any additional values in product that were appended to the scheme.

Related Topics

AUTORECODE
Overview (AUTORECODE command)
Example (AUTORECODE command)
VARIABLES Subcommand (AUTORECODE command)
INTO Subcommand (AUTORECODE command)
BLANK Subcommand (AUTORECODE command)
GROUP Subcommand (AUTORECODE command)
SAVE TEMPLATE Subcommand (AUTORECODE command)
APPLY TEMPLATE Subcommand (AUTORECODE command)
PRINT Subcommand (AUTORECODE command)
DESCENDING Subcommand (AUTORECODE command)


PRINT Subcommand (AUTORECODE command)

AUTORECODE (command),AUTORECODE (command),AUTORECODE (command)
PRINT subcommand,PRINT subcommand,PRINT subcommand
PRINT (subcommand),PRINT (subcommand),PRINT (subcommand)
AUTORECODE command,AUTORECODE command,AUTORECODE command

PRINT displays a correspondence table of the original values of the source variables and the new values of the target variables. The new value labels are also displayed.

• The only specification is the keyword PRINT. There are no additional specifications.

Related Topics

AUTORECODE
Overview (AUTORECODE command)
Example (AUTORECODE command)
VARIABLES Subcommand (AUTORECODE command)
INTO Subcommand (AUTORECODE command)
BLANK Subcommand (AUTORECODE command)
GROUP Subcommand (AUTORECODE command)
SAVE TEMPLATE Subcommand (AUTORECODE command)
APPLY TEMPLATE Subcommand (AUTORECODE command)
Interaction between APPLY TEMPLATE and SAVE TEMPLATE (AUTORECODE command)
DESCENDING Subcommand (AUTORECODE command)


DESCENDING Subcommand (AUTORECODE command)

AUTORECODE (command),AUTORECODE (command),AUTORECODE (command)
DESCENDING subcommand,DESCENDING subcommand,DESCENDING subcommand
DESCENDING (subcommand),DESCENDING (subcommand),DESCENDING (subcommand)
AUTORECODE command,AUTORECODE command,AUTORECODE command

By default, values for the source variable are recoded in ascending order (from lowest to highest). DESCENDING assigns the values to new variables in descending order (from highest to lowest). The largest value is assigned 1, the second-largest, 2, and so on.

• The only specification is the keyword DESCENDING. There are no additional specifications.

Related Topics

AUTORECODE
Overview (AUTORECODE command)
Example (AUTORECODE command)
VARIABLES Subcommand (AUTORECODE command)
INTO Subcommand (AUTORECODE command)
BLANK Subcommand (AUTORECODE command)
GROUP Subcommand (AUTORECODE command)
SAVE TEMPLATE Subcommand (AUTORECODE command)
APPLY TEMPLATE Subcommand (AUTORECODE command)
Interaction between APPLY TEMPLATE and SAVE TEMPLATE (AUTORECODE command)
PRINT Subcommand (AUTORECODE command)


BEGIN DATA-END DATA

BEGIN DATA (command),BEGIN DATA (command),BEGIN DATA (command)
BEGIN DATA (command),BEGIN DATA (command),BEGIN DATA (command)
syntax chart,syntax chart,syntax chart
BEGIN DATA
data records
END DATA

Example

BEGIN DATA
1  3424  274 ABU DHABI 2
2 39932   86 AMSTERDAM 4
3  8889  232 ATHENS
4  3424  294 BOGOTA    3
END DATA.

Related Topics

Overview (BEGIN DATA-END DATA command)
Examples (BEGIN DATA-END DATA command)


Overview (BEGIN DATA-END DATA command)

BEGIN DATA (command),BEGIN DATA (command),BEGIN DATA (command)
with INCLUDE command,with INCLUDE command,with INCLUDE command

BEGIN DATA and END DATA are used when data are entered within the command sequence (inline data). BEGIN DATA and END DATA are also used for inline matrix data. BEGIN DATA signals the beginning of data lines and END DATA signals the end of data lines.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is BEGIN DATA, the data lines, and END DATA. BEGIN DATA must be specified by itself on the line that immediately precedes the first data line. END DATA is specified by itself on the line that immediately follows the last data line.

Syntax Rules Collapse Hide details

Syntax Rules

• BEGIN DATA, the data, and END DATA must precede the first procedure.

• The command terminator after BEGIN DATA is optional. It is best to leave it out so that the program will treat inline data as one continuous specification.

• END DATA must always begin in column 1. It must be spelled out in full and can have only one space between the words END and DATA. Procedures and additional transformations can follow the END DATA command.

• Data lines must not have a command terminator. For inline data formats, see DATA LIST.

• Inline data records are limited to a maximum of 80 columns. (On some systems, the maximum may be fewer than 80 columns.) If data records exceed 80 columns, they must be stored in an external file that is specified on the FILE subcommand of the DATA LIST (or similar) command.

Operations Collapse Hide details

Operations

• When the program encounters BEGIN DATA, it begins to read and process data on the next input line. All preceding transformation commands are processed as the working file is built.

• The program continues to evaluate input lines as data until it encounters END DATA, at which point it begins evaluating input lines as commands.

• No other commands are recognized between BEGIN DATA and END DATA.

• The INCLUDE command can specify a file that contains BEGIN DATA, data lines, and END DATA . The data in such a file are treated as inline data. Thus, the FILE subcommand should be omitted from the DATA LIST (or similar) command.

• When running the program from prompts, the prompt DATA> appears immediately after BEGIN DATA is specified. After END DATA is specified, the command line prompt returns.

Related Topics

BEGIN DATA-END DATA
Examples (BEGIN DATA-END DATA command)


Examples (BEGIN DATA-END DATA command)

DATA LIST /XVAR 1 YVAR ZVAR 3-12 CVAR 14-22(A) JVAR 24.
BEGIN DATA
1  3424  274 ABU DHABI 2
2 39932   86 AMSTERDAM 4
3  8889  232 ATHENS
4  3424  294 BOGOTA    3
5 11323  332 HONG KONG 3
6   323  232 MANILA    1
7  3234  899 CHICAGO   4
8 78998 2344 VIENNA    3
9  8870  983 ZURICH    5
END DATA.
MEANS XVAR BY JVAR.

• DATA LIST defines the names and column locations of the variables. The FILE subcommand is omitted because the data are inline.

• There are nine cases in the inline data. Each line of data completes a case.

• END DATA signals the end of data lines. It begins in column 1 and has only a single space between END and DATA.

Related Topics

BEGIN DATA-END DATA
Overview (BEGIN DATA-END DATA command)


BEGIN GPL-END GPL

BEGIN GPL-END GPL (command),BEGIN GPL-END GPL (command),BEGIN GPL-END GPL (command)
BEGIN GPL-END GPL (command),BEGIN GPL-END GPL (command),BEGIN GPL-END GPL (command)
syntax chart,syntax chart,syntax chart
release history,release history,release history
BEGIN GPL
  gpl specification
END GPL
Release History Collapse Hide details

Release History

Release 14.0

• Command introduced.

Example

GGRAPH
  /GRAPHDATASET NAME="graphdataset" VARIABLES=jobcat COUNT()
  /GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
  SOURCE: s=userSource(id("graphdataset"))
  DATA: jobcat=col(source(s), name("jobcat"), unit.category())
  DATA: count=col(source(s), name("COUNT"))
  GUIDE: axis(dim(1), label("Employment Category"))
  GUIDE: axis(dim(2), label("Count"))
  ELEMENT: interval(position(jobcat*count))
END GPL.
If you are looking for more details about GPL, see the GPL documentation .

Related Topics

Overview (BEGIN GPL-END GPL command)


Overview (BEGIN GPL-END GPL command)

BEGIN GPL and END GPL are used when Graphics Production Language (GPL) code is entered within the command sequence (inline graph specification). BEGIN GPL and END GPL must follow a GGRAPH command, without any blank lines between BEGIN GPL and the command terminator line for GGRAPH. Only comments are allowed between BEGIN GPL and the command terminator line for GGRAPH. BEGIN GPL must be at the start of the line on which it appears, with no preceding spaces. BEGIN GPL signals the beginning of GPL code, and END GPL signals the end of GPL code.

For more information about GGRAPH, see GGRAPH. See the GPL documentation for more details about GPL. The examples in the GPL documentation may look different compared to the syntax pasted from the Chart Builder. The main difference is when aggregation occurs. See Working with the GPL (GGRAPH command) for information about the differences. See GPL Examples (GGRAPH command) for examples with GPL that is similar to the pasted syntax.

Syntax Rules Collapse Hide details

Syntax Rules

• Within a GPL block, only GPL statements are allowed.

• Strings in GPL are enclosed in quotation marks. You cannot use single quotes (apostrophes).

• With the PASW Statistics Batch Facility (available only with PASW Statistics Server), use the -i switch when submitting command files that contain GPL blocks.

Scope and Limitations Collapse Hide details

Scope and Limitations

• GPL blocks cannot be nested within GPL blocks.

• GPL blocks cannot be contained within DEFINE-!ENDDEFINE macro definitions.

• GPL blocks can be contained in command syntax files run via the INSERT command, with the default SYNTAX=INTERACTIVE setting.

• GPL blocks cannot be contained within command syntax files run via the INCLUDE command.

Related Topics

BEGIN GPL-END GPL


BEGIN PROGRAM-END PROGRAM

BEGIN PROGRAM(command),BEGIN PROGRAM(command),BEGIN PROGRAM(command)
BEGIN PROGRAM(command),BEGIN PROGRAM(command),BEGIN PROGRAM(command)
syntax chart,syntax chart,syntax chart
release history,release history,release history

BEGIN PROGRAM-END PROGRAM is available in the Programmability Extension. It is not available in Statistical Services for SQL Server 2005.

BEGIN PROGRAM [programming language name].
programming language-specific statements
END PROGRAM.
Release History Collapse Hide details

Release History

Release 14.0

• Command introduced.

Related Topics

Overview (BEGIN PROGRAM command)


Overview (BEGIN PROGRAM command)

BEGIN PROGRAM-END PROGRAM provides the ability to integrate the capabilities of external programming languages with PASW Statistics. One of the major benefits of these program blocks is the ability to add jobwise flow control to the command stream. Outside of program blocks, PASW Statistics can execute casewise conditional actions, based on criteria that evaluate each case, but jobwise flow control, such as running different procedures for different variables based on data type or level of measurement or determining which procedure to run next based on the results of the last procedure is much more difficult. Program blocks make jobwise flow control much easier to accomplish. With program blocks, you can control the commands that are run based on many criteria, including:

• Dictionary information (e.g., data type, measurement level, variable names)

• Data conditions

• Output values

• Error codes (that indicate if a command ran successfully or not)

You can also read data from the active dataset to perform additional computations, update the active dataset with results, create new datasets, and create custom pivot table output.

Jobwise Flow Control
Operations Collapse Hide details

Operations

• BEGIN PROGRAM signals the beginning of a set of code instructions controlled by an external programming language.

• After BEGIN PROGRAM is executed, other commands do not execute until END PROGRAM is encountered.

Syntax Rules Collapse Hide details

Syntax Rules

• Within a program block, only statements recognized by the specified programming language are allowed.

• Command syntax generated within a program block must follow interactive syntax rules. See the topic Running Commands for more information.

• Within a program block, each line should not exceed 251 bytes (although syntax generated by those lines can be longer).

• With the PASW Statistics Batch Facility (available only with PASW Statistics Server), use the -i switch when submitting command files that contain program blocks. All command syntax (not just the program blocks) in the file must adhere to interactive syntax rules.

Within a program block, the programming language is in control, and the syntax rules for that programming language apply. Command syntax generated from within program blocks must always follow interactive syntax rules. For most practical purposes this means command strings you build in a programming block must contain a period (.) at the end of each command.

Scope and Limitations Collapse Hide details

Scope and Limitations

• Programmatic variables created in a program block cannot be used outside of program blocks.

• Program blocks cannot be contained within DEFINE-!ENDDEFINE macro definitions.

• Program blocks can be contained in command syntax files run via the INSERT command, with the default SYNTAX=INTERACTIVE setting.

• Program blocks cannot be contained within command syntax files run via the INCLUDE command.

Using External Programming Languages Collapse Hide details

Using External Programming Languages

Use of the Programmability Extension requires an Integration Plug-in for an external language. Integration Plug-ins are available for the Python and R programming languages. See the topic How to Get Integration Plug-ins for more information. Documentation for the Plug-ins is available from the topics Python Integration Plug-in and R Integration Plug-in in the Help system. It is also available in PDF from Help>Programmability once the Plug-ins are installed.

Related Topics

BEGIN PROGRAM-END PROGRAM


BOOTSTRAP

BOOTSTRAP (command),BOOTSTRAP (command),BOOTSTRAP (command)
BOOTSTRAP (command),BOOTSTRAP (command),BOOTSTRAP (command)
syntax chart,syntax chart,syntax chart

BOOTSTRAP is available in the Bootstrapping option.

BOOTSTRAP
  [/SAMPLING METHOD={SIMPLE**                     }]
                    {STRATIFIED(STRATA=varlist)   }
                    {RESIDUAL({RESIDUALS=varlist})}
                              {PREDICTED=varlist})
                    {WILD({RESIDUALS=varlist})    }
                          {PREDICTED=varlist})
  [/VARIABLES [TARGET=varlist] [INPUT=varlist]]
  [/CRITERIA [CILEVEL={95** } [CITYPE={PERCENTILE**}]]
                      {value}         {BCA         }
             [NSAMPLES={1000**}]
                       {int   }
  [/MISSING [USERMISSING={EXCLUDE**}]]
                         {INCLUDE  }.

** Default if the subcommand or keyword is omitted.

This command does not read the active dataset. It is stored, pending execution with the next command that reads the dataset. See the topic Command Order for more information.

See Bootstrapping Algorithms for computational details for this procedure.

Syntax for the BOOTSTRAP command can be generated from the Bootstrapping dialog.

Release History Collapse Hide details

Release History

Release 18

• Command introduced.

Example

BOOTSTRAP.

Related Topics

Overview (BOOTSTRAP command)
Examples (BOOTSTRAP command)
SAMPLING Subcommand (BOOTSTRAP command)
VARIABLES Subcommand (BOOTSTRAP command)
CRITERIA Subcommand (BOOTSTRAP command)
MISSING Subcommand (BOOTSTRAP command)


Overview (BOOTSTRAP command)

Bootstrapping is a method for deriving robust estimates of standard errors and confidence intervals for estimates such as the mean, median, proportion, odds ratio, correlation coefficient or regression coefficient. It may also be used for constructing hypothesis tests. Bootstrapping is most useful as an alternative to parametric estimates when the assumptions of those methods are in doubt (as in the case of regression models with heteroscedastic residuals fit to small samples), or where parametric inference is impossible or requires very complicated formulas for the calculation of standard errors (as in the case of computing confidence intervals for the median, quartiles, and other percentiles).

The BOOTSTRAP command signals the beginning of temporary bootstrap samples that are in effect only for the next procedure. See Procedures That Support Bootstrapping for a list of procedures that support bootstrapping.

Options Collapse Hide details

Options

Resampling method. Simple, stratified, and residuals bootstrap resampling are supported. You can also specify the number of bootstrap samples to take.

Pooling method. Choose between percentile and BCa methods for computing confidence intervals. You can also specify the confidence level.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is the BOOTSTRAP command.

By default, BOOTSTRAP draws 1000 samples using simple bootstrap resampling. When the procedure following BOOTSTRAP is run, the pooling algorithm produces 95% confidence intervals using the percentile method. Since no variables have been specified, no records are excluded from resampling.

Syntax Rules Collapse Hide details

Syntax Rules

• All subcommands are optional.

• Subcommands may be specified in any order.

• Only a single instance of each subcommand is allowed.

• An error occurs if a keyword is specified more than once within a subcommand.

• Parentheses, equals signs, and slashes shown in the syntax chart are required.

• The command name, subcommand names, and keywords must be spelled in full.

• Empty subcommands are not allowed.

• Any split variable defined on the SPLIT FILE command may not be used on the BOOTSTRAP command.

Limitations Collapse Hide details

Limitations

• BOOTSTRAP does not work with multiply imputed datasets. If there is an Imputation_ variable in the dataset, running BOOTSTRAP will cause an error.

• BOOTSTRAP should not be used in conjunction with the N OF CASES command.

Related Topics

BOOTSTRAP
Examples (BOOTSTRAP command)
SAMPLING Subcommand (BOOTSTRAP command)
VARIABLES Subcommand (BOOTSTRAP command)
CRITERIA Subcommand (BOOTSTRAP command)
MISSING Subcommand (BOOTSTRAP command)
CORRELATIONS
MEANS
CROSSTABS
EXAMINE
DESCRIPTIVES
FREQUENCIES
PARTIAL CORR
ONEWAY
REGRESSION
UNIANOVA
NOMREG


Examples (BOOTSTRAP command)

Simple Resampling; Maintaining a Consistent Case Basis

BOOTSTRAP.
DESCRIPTIVES VARIABLES=var1 var2 var3
  /MISSING=VARIABLE.

• The BOOTSTRAP command requests 1000 bootstrap samples.

• No variables are specified on the BOOTSTRAP command, so no records are deleted from the resampling. This allows the DESCRIPTIVES procedure to use variablewise deletion of missing values on the full set of records; however, the case basis will be inconsistent across bootstrap resamples, and inferences made from the results would be questionable.

BOOTSTRAP
  /VARIABLES ANALYSIS(INPUT=var1 var2 var3).
DESCRIPTIVES VARIABLES=var1 var2 var3
  /STATISTICS MEAN STDDEV MIN MAX
  /MISSING=VARIABLE.

• This is the same as the previous analysis, but variables var1, var2, and var3 are used to determine the case basis for resampling. Records with missing values on any of these variables are deleted from the analysis.

• The DESCRIPTIVES procedure following BOOTSTRAP is run on the bootstrap samples.

• The STATISTICS subcommand produces the mean, standard deviation, minimum, and maximum for variables var1, var2, and var3 on the original data. Additionally, pooled statistics are produced for the mean and standard deviation.

• Even though the MISSING subcommand specifies variablewise deletion of missing values, the listwise deletion performed by BOOTSTRAP is what determines the case basis. In effect, the MISSING specification on DESCRIPTIVES is irrelevant here.

Simple Resampling; Replicating Results

PRESERVE.
SET RNG=MT MTINDEX=592004.
SHOW RNG.
BOOTSTRAP
  /SAMPLING METHOD=SIMPLE
  /VARIABLES TARGET=prevexp
  /CRITERIA CILEVEL=95 CITYPE=BCA  NSAMPLES=1000
  /MISSING USERMISSING=EXCLUDE.
EXAMINE VARIABLES=prevexp
  /PLOT NONE
  /STATISTICS DESCRIPTIVES
  /CINTERVAL 95
  /MISSING LISTWISE
  /NOTOTAL.
RESTORE.

• The PRESERVE and RESTORE commands "remember" the current state of the random number generator and restore the system to that state after bootstrapping is over.

• The SET command sets the random number generator to the Mersenne Twister and the index to 592004, so that the bootstrapping results can be replicated exactly. The SHOW command displays the index in the output for reference.

• The BOOTSTRAP command requests 1000 bootstrap samples using simple resampling.

• The VARIABLES subcommand specifies that the variable prevexp is used to determine the case basis for resampling. Records with missing values on this variable are deleted from the analysis.

• The CRITERIA subcommand, in addition to requesting the number of bootstrap samples, requests bias-corrected and accelerated bootstrap confidence intervals instead of the default percentile intervals.

• The EXAMINE procedure following BOOTSTRAP is run on each of the bootstrap samples.

• The PLOT subcommand turns off plot output.

• All other options are set to their default values.

For discussion of output from this syntax and to place the example in context, see Using Bootstrapping to Obtain Confidence Intervals for Medians.

Stratified Resampling

BOOTSTRAP
  /VARIABLES SAMPLING(STRATA=strataVar)
             ANALYSIS(INPUTS=var1).
DESCRIPTIVES var1.

• The BOOTSTRAP command requests 1000 bootstrap samples stratified by strataVar.

• Variables var1 and strataVar are used to determine the case basis for resampling. Records with missing values on these variables are deleted from the analysis.

• The DESCRIPTIVES procedure following BOOTSTRAP is run on the bootstrap samples, and produces the mean, standard deviation, minimum, and maximum for the variable var1 on the original data. Additionally, pooled statistics are produced for the mean and standard deviation.

Residual Resampling

COMPUTE diff=salary-salbegin.
EXECUTE.

UNIANOVA diff BY gender jobcat minority WITH jobtime prevexp
  /METHOD=SSTYPE(3)
  /INTERCEPT=INCLUDE
  /SAVE=RESID
  /CRITERIA=ALPHA(0.05)
  /DESIGN=gender jobcat minority jobtime prevexp.

• The COMPUTE command creates the variable containing the change in salary.

• The UNIANOVA command fits a model for diff using gender, jobcat, and minority as factors and jobtime and prevexp as covariates.

• Unstandardized residuals are saved to a new variable in the dataset named RES_1 by default.

• All other options are set to their default values.

PRESERVE.
SET RNG=MT MTINDEX=9191972.
SHOW RNG.
BOOTSTRAP
  /SAMPLING METHOD=WILD(RESIDUALS=RES_1)
  /VARIABLES TARGET=diff INPUT=gender jobcat minority jobtime prevexp
  /CRITERIA CILEVEL=95 CITYPE=PERCENTILE  NSAMPLES=1000
  /MISSING USERMISSING=EXCLUDE.
UNIANOVA diff BY gender jobcat minority WITH jobtime prevexp
  /METHOD=SSTYPE(3)
  /INTERCEPT=INCLUDE
  /PRINT=PARAMETER
  /CRITERIA=ALPHA(.05)
  /DESIGN=gender jobcat minority jobtime prevexp.
RESTORE.

• The PRESERVE and RESTORE commands "remember" the current state of the random number generator and restore the system to that state after bootstrapping is over.

• The SET command sets the random number generator to the Mersenne Twister and the index to 9191972, so that the bootstrapping results can be replicated exactly. The SHOW command displays the index in the output for reference.

• The BOOTSTRAP command requests 1000 bootstrap samples using wild sampling and RES_1 as the variable containing the residuals.

• The VARIABLES subcommand specifies that the diff is the target variable in the linear model; it and the variables gender, jobcat, minority, jobtime, and prevexp are used to determine the case basis for resampling. Records with missing values on these variables are deleted from the analysis.

• The CRITERIA subcommand, in addition to requesting the number of bootstrap samples, requests bias-corrected and accelerated bootstrap confidence intervals instead of the default percentile intervals.

• The UNIANOVA procedure following BOOTSTRAP is run on each of the bootstrap samples and produces parameter estimates for the original data. Additionally, pooled statistics are produced for the model coefficients.

For discussion of output from this syntax and to place the example in context, see Using Bootstrapping to Choose Better Predictors.

Related Topics

BOOTSTRAP
Overview (BOOTSTRAP command)
SAMPLING Subcommand (BOOTSTRAP command)
VARIABLES Subcommand (BOOTSTRAP command)
CRITERIA Subcommand (BOOTSTRAP command)
MISSING Subcommand (BOOTSTRAP command)


SAMPLING Subcommand (BOOTSTRAP command)

BOOTSTRAP (command),BOOTSTRAP (command),BOOTSTRAP (command)
SAMPLING subcommand,SAMPLING subcommand,SAMPLING subcommand
SAMPLING (subcommand),SAMPLING (subcommand),SAMPLING (subcommand)
BOOTSTRAP command,BOOTSTRAP command,BOOTSTRAP command

The SAMPLING subcommand is used to specify the sampling method and any associated variables.

• If SAMPLING is not specified, the procedure performs simple bootstrap resampling..

STRATA (keyword),STRATA (keyword),STRATA (keyword)
BOOTSTRAP command,BOOTSTRAP command,BOOTSTRAP command
RESIDUAL (keyword),RESIDUAL (keyword),RESIDUAL (keyword)
BOOTSTRAP command,BOOTSTRAP command,BOOTSTRAP command
PREDICTED (keyword),PREDICTED (keyword),PREDICTED (keyword)
BOOTSTRAP command,BOOTSTRAP command,BOOTSTRAP command
SIMPLE
 | Simple resampling. This is the default.
STRATIFIED(STRATA = varlist)
 | Stratified resampling. Specify one or more variables that define strata within the dataset.
RESIDUAL(RESIDUALS=varlist | PREDICTED=varlist)
 | Residual resampling. Specify one or more variables containing residuals from fitting a model to the data. The model that produced the residuals should ideally be the same model that follows BOOTSTRAP.
 | Specify PREDICTED as an alternative to RESIDUALS when the model residuals are not immediately available but the predicted values are; in this case, you should see a performance improvement by specifying PREDICTED rather than computing the residuals and specifying RESIDUALS. Specify one or more variables containing predicted values from fitting a model to the data.
 | If RESIDUAL is specified, the TARGET keyword is required and the variables specified on RESIDUAL should be the residuals (or predicted values) for, and match the order of, the variables specified on TARGET.
WILD(RESIDUALS=varlist | PREDICTED=varlist)
 | Wild bootstrap resampling. Specify one or more variables containing residuals from fitting a model to the data. The model that produced the residuals should ideally be the same model that follows BOOTSTRAP.
 | Specify PREDICTED as an alternative to RESIDUALS when the model residuals are not immediately available but the predicted values are; in this case, you should see a performance improvement by specifying PREDICTED rather than computing the residuals and specifying RESIDUALS. Specify one or more variables containing predicted values from fitting a model to the data.
 | If WILD is specified, the TARGET keyword is required and the variables specified on WILD should be the residuals (or predicted values) for, and match the order of, the variables specified on TARGET.

Related Topics

BOOTSTRAP
Overview (BOOTSTRAP command)
Examples (BOOTSTRAP command)
VARIABLES Subcommand (BOOTSTRAP command)
CRITERIA Subcommand (BOOTSTRAP command)
MISSING Subcommand (BOOTSTRAP command)


VARIABLES Subcommand (BOOTSTRAP command)

BOOTSTRAP (command),BOOTSTRAP (command),BOOTSTRAP (command)
VARIABLES subcommand,VARIABLES subcommand,VARIABLES subcommand
VARIABLES (subcommand),VARIABLES (subcommand),VARIABLES (subcommand)
BOOTSTRAP command,BOOTSTRAP command,BOOTSTRAP command

The VARIABLES subcommand is used to specify the target and inputs.

• If VARIABLES is not specified, the procedure performs bootstrap resampling on all the records in the dataset. TARGET is required when performing residual resampling, but these specifications are otherwise technically optional. However, these variables are used to determine the case basis for bootstrap resampling, so it is important to specify these variables when there are missing values in the data.

• Variables are processed based upon their defined measurement level; nominal, ordinal, or continuous (scale). Use the VARIABLE LEVEL command to change an input variable's measurement level.

TARGET (keyword),TARGET (keyword),TARGET (keyword)
BOOTSTRAP command,BOOTSTRAP command,BOOTSTRAP command
INPUT (keyword),INPUT (keyword),INPUT (keyword)
BOOTSTRAP command,BOOTSTRAP command,BOOTSTRAP command
TARGET=varlist
 | Target variables. Specify one or more variables that will be used as targets (responses, dependent variables) in the procedure following BOOTSTRAP.
INPUT=varlist
 | Input variables. Specify one or more variables that will be used as inputs (factors, covariates) in the procedure following BOOTSTRAP.

Related Topics

BOOTSTRAP
Overview (BOOTSTRAP command)
Examples (BOOTSTRAP command)
SAMPLING Subcommand (BOOTSTRAP command)
CRITERIA Subcommand (BOOTSTRAP command)
MISSING Subcommand (BOOTSTRAP command)


CRITERIA Subcommand (BOOTSTRAP command)

BOOTSTRAP (command),BOOTSTRAP (command),BOOTSTRAP (command)
CRITERIA subcommand,CRITERIA subcommand,CRITERIA subcommand
CRITERIA (subcommand),CRITERIA (subcommand),CRITERIA (subcommand)
BOOTSTRAP command,BOOTSTRAP command,BOOTSTRAP command

The CRITERIA subcommand controls pooling options and the number of bootstrap samples to take.

CILEVEL (keyword),CILEVEL (keyword),CILEVEL (keyword)
BOOTSTRAP command,BOOTSTRAP command,BOOTSTRAP command
CITYPE (keyword),CITYPE (keyword),CITYPE (keyword)
BOOTSTRAP command,BOOTSTRAP command,BOOTSTRAP command
NSAMPLES (keyword),NSAMPLES (keyword),NSAMPLES (keyword)
BOOTSTRAP command,BOOTSTRAP command,BOOTSTRAP command
CILEVEL = number
 | Confidence interval level. Specify a number greater than or equal to 0, and less than 100. The default value is 95. Note that bootstrapping can only support intervals up to confidence level 100*(1−2/(NSAMPLES+1)).
CITYPE = PERCENTILE | BCA
 | Confidence interval type. Specify PERCENTILE for percentile intervals or BCA for BCa intervals. The default value is PERCENTILE.
NSAMPLES = integer
 | Number of bootstrap samples. Specify a positive integer. The default value is 1000.

Related Topics

BOOTSTRAP
Overview (BOOTSTRAP command)
Examples (BOOTSTRAP command)
SAMPLING Subcommand (BOOTSTRAP command)
VARIABLES Subcommand (BOOTSTRAP command)
MISSING Subcommand (BOOTSTRAP command)


MISSING Subcommand (BOOTSTRAP command)

BOOTSTRAP (command),BOOTSTRAP (command),BOOTSTRAP (command)
MISSING subcommand,MISSING subcommand,MISSING subcommand
MISSING (subcommand),MISSING (subcommand),MISSING (subcommand)
BOOTSTRAP command,BOOTSTRAP command,BOOTSTRAP command

The MISSING subcommand is used to control whether user-missing values for categorical variables are treated as valid values. By default, user-missing values for categorical variables are treated as invalid. The setting used here should be the same as that used on the procedure following the BOOTSTRAP command.

• Cases with invalid values are deleted listwise.

• The MISSING subcommand defines categorical variables as variables with measurement level set at Ordinal or Nominal in the data dictionary. Use the VARIABLE LEVEL command to change a variable's measurement level.

• User-missing values for continuous variables are always treated as invalid.

• System-missing values for any variables are always treated as invalid.

USERMISSING (keyword),USERMISSING (keyword),USERMISSING (keyword)
BOOTSTRAP command,BOOTSTRAP command,BOOTSTRAP command
USERMISSING=EXCLUDE
 | User-missing values for categorical variables are treated as invalid. This is the default.
USERMISSING=INCLUDE
 | User-missing values for categorical variables are treated as valid values.

Related Topics

BOOTSTRAP
Overview (BOOTSTRAP command)
Examples (BOOTSTRAP command)
SAMPLING Subcommand (BOOTSTRAP command)
VARIABLES Subcommand (BOOTSTRAP command)
CRITERIA Subcommand (BOOTSTRAP command)


BREAK

BREAK (command),BREAK (command),BREAK (command)
syntax chart,syntax chart,syntax chart
BREAK

This command does not read the active dataset. It is stored, pending execution with the next command that reads the dataset. See the topic Command Order for more information.

Related Topics

Overview (BREAK command)
Examples (BREAK command)


Overview (BREAK command)

BREAK (command),BREAK (command),BREAK (command)
with LOOP command,with LOOP command,with LOOP command
BREAK (command),BREAK (command),BREAK (command)
with DO IF command,with DO IF command,with DO IF command

BREAK controls looping that cannot be fully controlled with IF clauses. Generally, BREAK is used within a DO IF—END IF structure. The expression on the DO IF command specifies the condition in which BREAK is executed.

Basic Specification Collapse Hide details

Basic Specification

• The only specification is the keyword BREAK. There are no additional specifications.

• BREAK must be specified within a loop structure. Otherwise, an error results.

Operations Collapse Hide details

Operations

• A BREAK command inside a loop structure but not inside a DO IF—END IF structure terminates the first iteration of the loop for all cases, since no conditions for BREAK are specified.

• A BREAK command within an inner loop terminates only iterations in that structure, not in any outer loop structures.

Related Topics

BREAK
Examples (BREAK command)


Examples (BREAK command)

VECTOR         #X(10).
LOOP           #I = 1 TO #NREC.
+  DATA LIST      NOTABLE/ #X1 TO #X10 1-20.
+  LOOP           #J = 1 TO 10.
+     DO IF          SYSMIS(#X(#J)).
+        BREAK.
+     END IF.
+     COMPUTE        X = #X(#J).
+     END CASE.
+  END LOOP.
END LOOP.

• The inner loop terminates when there is a system-missing value for any of the variables #X1 to #X10.

• The outer loop continues until all records are read.

Related Topics

BREAK
Overview (BREAK command)


CACHE

CACHE (command),CACHE (command),CACHE (command)
syntax chart,syntax chart,syntax chart
CACHE (command),CACHE (command),CACHE (command)
CACHE.

This command does not read the active dataset. It is stored, pending execution with the next command that reads the dataset. See the topic Command Order for more information.

Although the virtual active file can vastly reduce the amount of temporary disk space required, the absence of a temporary copy of the “active” file means that the original data source has to be reread for each procedure. For data tables read from a database source, this means that the SQL query that reads the information from the database must be reexecuted for any command or procedure that needs to read the data. Since virtually all statistical analysis procedures and charting procedures need to read the data, the SQL query is reexecuted for each procedure that you run, which can result in a significant increase in processing time if you run a large number of procedures.

If you have sufficient disk space on the computer performing the analysis (either your local computer or a remote server), you can eliminate multiple SQL queries and improve processing time by creating a data cache of the active file with the CACHE command. The CACHE command copies all of the data to a temporary disk file the next time the data are passed to run a procedure. If you want the cache written immediately, use the EXECUTE command after the CACHE command.

• The only specification is the command name CACHE.

• A cache file will not be written during a procedure that uses temporary variables.

• A cache file will not be written if the data are already in a temporary disk file and that file has not been modified since it was written.

The CACHE command can be executed from the Cache Data item on the File menu.

Example

CACHE.
TEMPORARY.
RECODE alcohol(0 thru .04 = ’sober’) (.04 thru .08 = ’tipsy’)
  (else = ’drunk’) into state.
FREQUENCIES var=state.
GRAPH...

No cache file will be written during the FREQUENCIES procedure. It will be written during the GRAPH procedure.


CASEPLOT

CASEPLOT (command),CASEPLOT (command),CASEPLOT (command)
CASEPLOT (command),CASEPLOT (command),CASEPLOT (command)
syntax chart,syntax chart,syntax chart
release history,release history,release history

CASEPLOT is available in the Statistics Base option.

CASEPLOT VARIABLES=varlist

 [/DIFF={1}]
        {n}

 [/SDIFF={1}]
         {n}

 [/PERIOD=n]

 [/{NOLOG**}]
   {LN     }

 [/ID=varname]

 [/MARK={varname           }]
        {date specification}

 [/SPLIT {UNIFORM**}]
         {SCALE    }

 [/APPLY [='model name']]

For plots with one variable:

 [/FORMAT=[{NOFILL**}]  [{NOREFERENCE**     }]]
           {LEFT    }    {REFERENCE[(value)]}

For plots with multiple variables:

 [/FORMAT={NOJOIN**}]
          {JOIN    }
          {HILO    }

**Default if the subcommand is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

Syntax for the CASEPLOT command can be generated from the Sequence Charts dialog when Time on horizontal axis is deselected in the Sequence Charts: Format dialog.

Release History Collapse Hide details

Release History

Release 14.0

• For plots with one variable, new option to specify a value with the REFERENCE keyword on the FORMAT subcommand.

Example

CASEPLOT VARIABLES = TICKETS
  /LN
  /DIFF
  /SDIFF
  /PERIOD=12
  /FORMAT=REFERENCE
  /MARK=Y 55 M 6.

Related Topics

Overview (CASEPLOT command)
Examples (CASEPLOT command)
VARIABLES Subcommand (CASEPLOT command)
DIFF Subcommand (CASEPLOT command)
SDIFF Subcommand (CASEPLOT command)
PERIOD Subcommand (CASEPLOT command)
LN and NOLOG Subcommands (CASEPLOT command)
ID Subcommand (CASEPLOT command)
FORMAT Subcommand (CASEPLOT command)
MARK Subcommand (CASEPLOT command)
SPLIT Subcommand (CASEPLOT command)
APPLY Subcommand (CASEPLOT command)
MODEL NAME
READ MODEL
SAVE MODEL
TDISPLAY


Overview (CASEPLOT command)

CASEPLOT produces a plot of one or more time series or sequence variables. You can request natural log and differencing transformations to produce plots of transformed variables. Several plot formats are available.

Options Collapse Hide details

Options

Modifying the Variables. You can request a natural log transformation of the variable using the LN subcommand and seasonal and nonseasonal differencing to any degree using the SDIFF and DIFF subcommands. With seasonal differencing, you can also specify the periodicity on the PERIOD subcommand.

Plot Format. With the FORMAT subcommand, you can fill in the area on one side of the plotted values on plots with one variable. You can also plot a reference line indicating the variable mean. For plots with two or more variables, you can specify whether you want to join the values for each case with a horizontal line. With the ID subcommand, you can label the vertical axis with the values of a specified variable. You can mark the onset of an intervention variable on the plot with the MARK subcommand.

Split-File Processing. You can control how to plot data that have been divided into subgroups by a SPLIT FILE command using the SPLIT subcommand.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is one or more variable names.

• If the DATE command has been specified, the vertical axis is labeled with the DATE_ variable at periodic intervals. Otherwise, sequence numbers are used. The horizontal axis is labeled with the value scale determined by the plotted variables.

CASEPLOT with DATE variable
Subcommand Order Collapse Hide details

Subcommand Order

• Subcommands can be specified in any order.

Syntax Rules Collapse Hide details

Syntax Rules

• VARIABLES can be specified only once.

• Other subcommands can be specified more than once, but only the last specification of each one is executed.

Operations Collapse Hide details

Operations

• Subcommand specifications apply to all variables named on the CASEPLOT command.

• If the LN subcommand is specified, any differencing requested on that CASEPLOT command is done on the log-transformed variables.

• Split-file information is displayed as part of the subtitle, and transformation information is displayed as part of the footnote.

Limitations Collapse Hide details

Limitations

• A maximum of one VARIABLES subcommand. There is no limit on the number of variables named on the list.

Related Topics

CASEPLOT
Examples (CASEPLOT command)
VARIABLES Subcommand (CASEPLOT command)
DIFF Subcommand (CASEPLOT command)
SDIFF Subcommand (CASEPLOT command)
PERIOD Subcommand (CASEPLOT command)
LN and NOLOG Subcommands (CASEPLOT command)
ID Subcommand (CASEPLOT command)
FORMAT Subcommand (CASEPLOT command)
MARK Subcommand (CASEPLOT command)
SPLIT Subcommand (CASEPLOT command)
APPLY Subcommand (CASEPLOT command)


Examples (CASEPLOT command)

CASEPLOT VARIABLES = TICKETS
  /LN
  /DIFF
  /SDIFF
  /PERIOD=12
  /FORMAT=REFERENCE
  /MARK=Y 55 M 6.

• This example produces a plot of TICKETS after a natural log transformation, differencing, and seasonal differencing have been applied.

• LN transforms the data using the natural logarithm (base e) of the variable.

• DIFF differences the variable once.

• SDIFF and PERIOD apply one degree of seasonal differencing with a periodicity of 12.

• FORMAT=REFERENCE adds a reference line at the variable mean.

• MARK provides a marker on the plot at June, 1955. The marker is displayed as a horizontal reference line.

Related Topics

CASEPLOT
Overview (CASEPLOT command)
VARIABLES Subcommand (CASEPLOT command)
DIFF Subcommand (CASEPLOT command)
SDIFF Subcommand (CASEPLOT command)
PERIOD Subcommand (CASEPLOT command)
LN and NOLOG Subcommands (CASEPLOT command)
ID Subcommand (CASEPLOT command)
FORMAT Subcommand (CASEPLOT command)
MARK Subcommand (CASEPLOT command)
SPLIT Subcommand (CASEPLOT command)
APPLY Subcommand (CASEPLOT command)


VARIABLES Subcommand (CASEPLOT command)

VARIABLES specifies the names of the variables to be plotted and is the only required subcommand.

Related Topics

CASEPLOT
Overview (CASEPLOT command)
Examples (CASEPLOT command)
DIFF Subcommand (CASEPLOT command)
SDIFF Subcommand (CASEPLOT command)
PERIOD Subcommand (CASEPLOT command)
LN and NOLOG Subcommands (CASEPLOT command)
ID Subcommand (CASEPLOT command)
FORMAT Subcommand (CASEPLOT command)
MARK Subcommand (CASEPLOT command)
SPLIT Subcommand (CASEPLOT command)
APPLY Subcommand (CASEPLOT command)


DIFF Subcommand (CASEPLOT command)

sequence charts,sequence charts,sequence charts
transforming values,transforming values,transforming values
difference transformation,difference transformation,difference transformation
in sequence charts,in sequence charts,in sequence charts

DIFF specifies the degree of differencing used to convert a nonstationary variable to a stationary one with a constant mean and variance before plotting.

• You can specify any positive integer on DIFF.

• If DIFF is specified without a value, the default is 1.

• The number of values displayed decreases by 1 for each degree of differencing.

Example

CASEPLOT VARIABLES = TICKETS
  /DIFF=2.

• In this example, TICKETS is differenced twice before plotting.

Related Topics

CASEPLOT
Overview (CASEPLOT command)
Examples (CASEPLOT command)
VARIABLES Subcommand (CASEPLOT command)
SDIFF Subcommand (CASEPLOT command)
PERIOD Subcommand (CASEPLOT command)
LN and NOLOG Subcommands (CASEPLOT command)
ID Subcommand (CASEPLOT command)
FORMAT Subcommand (CASEPLOT command)
MARK Subcommand (CASEPLOT command)
SPLIT Subcommand (CASEPLOT command)
APPLY Subcommand (CASEPLOT command)


SDIFF Subcommand (CASEPLOT command)

seasonal difference transformation,seasonal difference transformation,seasonal difference transformation
in sequence charts,in sequence charts,in sequence charts

If the variable exhibits a seasonal or periodic pattern, you can use the SDIFF subcommand to seasonally difference a variable before plotting.

• The specification on SDIFF indicates the degree of seasonal differencing and can be any positive integer.

• If SDIFF is specified without a value, the degree of seasonal differencing defaults to 1.

• The number of seasons displayed decreases by 1 for each degree of seasonal differencing.

• The length of the period used by SDIFF is specified on the PERIOD subcommand. If the PERIOD subcommand is not specified, the periodicity established on the TSET or DATE command is used (see the PERIOD subcommand below).

Related Topics

CASEPLOT
Overview (CASEPLOT command)
Examples (CASEPLOT command)
VARIABLES Subcommand (CASEPLOT command)
DIFF Subcommand (CASEPLOT command)
PERIOD Subcommand (CASEPLOT command)
LN and NOLOG Subcommands (CASEPLOT command)
ID Subcommand (CASEPLOT command)
FORMAT Subcommand (CASEPLOT command)
MARK Subcommand (CASEPLOT command)
SPLIT Subcommand (CASEPLOT command)
APPLY Subcommand (CASEPLOT command)


PERIOD Subcommand (CASEPLOT command)

periodicity,periodicity,periodicity
in sequence charts,in sequence charts,in sequence charts
sequence charts,sequence charts,sequence charts
specifying periodicity,specifying periodicity,specifying periodicity

PERIOD indicates the length of the period to be used by the SDIFF subcommand.

• The specification on PERIOD indicates how many observations are in one period or season and can be any positive integer.

• PERIOD is ignored if it is used without the SDIFF subcommand.

• If PERIOD is not specified, the periodicity established on TSET PERIOD is in effect. If TSET PERIOD is not specified either, the periodicity established on the DATE command is used. If periodicity is not established anywhere, the SDIFF subcommand will not be executed.

Example

CASEPLOT VARIABLES = TICKETS
  /SDIFF=1
  /PERIOD=12.

• This command applies one degree of seasonal differencing with 12 observations per season to TICKETS before plotting.

Related Topics

CASEPLOT
Overview (CASEPLOT command)
Examples (CASEPLOT command)
VARIABLES Subcommand (CASEPLOT command)
DIFF Subcommand (CASEPLOT command)
SDIFF Subcommand (CASEPLOT command)
LN and NOLOG Subcommands (CASEPLOT command)
ID Subcommand (CASEPLOT command)
FORMAT Subcommand (CASEPLOT command)
MARK Subcommand (CASEPLOT command)
SPLIT Subcommand (CASEPLOT command)
APPLY Subcommand (CASEPLOT command)


LN and NOLOG Subcommands (CASEPLOT command)

natural log transformation,natural log transformation,natural log transformation
in sequence charts,in sequence charts,in sequence charts

LN transforms the data using the natural logarithm (base e) of the variable and is used to remove varying amplitude over time. NOLOG indicates that the data should not be log transformed. NOLOG is the default.

• If you specify LN on CASEPLOT, any differencing requested on that command will be done on the log-transformed variable.

• There are no additional specifications on LN or NOLOG.

• Only the last LN or NOLOG subcommand on a CASEPLOT command is executed.

• If a natural log transformation is requested, any value less than or equal to zero is set to system-missing.

• NOLOG is generally used with an APPLY subcommand to turn off a previous LN specification.

Example

CASEPLOT VARIABLES = TICKETS
  /LN.

• In this example, TICKETS is transformed using the natural logarithm before plotting.

Related Topics

CASEPLOT
Overview (CASEPLOT command)
Examples (CASEPLOT command)
VARIABLES Subcommand (CASEPLOT command)
DIFF Subcommand (CASEPLOT command)
SDIFF Subcommand (CASEPLOT command)
PERIOD Subcommand (CASEPLOT command)
ID Subcommand (CASEPLOT command)
FORMAT Subcommand (CASEPLOT command)
MARK Subcommand (CASEPLOT command)
SPLIT Subcommand (CASEPLOT command)
APPLY Subcommand (CASEPLOT command)


ID Subcommand (CASEPLOT command)

ID names a variable whose values will be used as the left-axis labels.

• The only specification on ID is a variable name. If you have a variable named ID in your active dataset, the equals sign after the subcommand is required.

• ID overrides the specification on TSET ID.

• If ID or TSET ID is not specified, the left vertical axis is labeled with the DATE_ variable created by the DATE command. If the DATE_ variable has not been created, the observation or sequence number is used as the label.

Example

CASEPLOT VARIABLES = VARA
  /ID=VARB.

• In this example, the values of the variable VARB will be used to label the left axis of the plot of VARA.

Related Topics

CASEPLOT
Overview (CASEPLOT command)
Examples (CASEPLOT command)
VARIABLES Subcommand (CASEPLOT command)
DIFF Subcommand (CASEPLOT command)
SDIFF Subcommand (CASEPLOT command)
PERIOD Subcommand (CASEPLOT command)
LN and NOLOG Subcommands (CASEPLOT command)
FORMAT Subcommand (CASEPLOT command)
MARK Subcommand (CASEPLOT command)
SPLIT Subcommand (CASEPLOT command)
APPLY Subcommand (CASEPLOT command)


FORMAT Subcommand (CASEPLOT command)

FORMAT controls the plot format.

• The specification on FORMAT is one of the keywords listed below.

• The keywords NOFILL, LEFT, NOREFERENCE, and REFERENCE apply to plots with one variable. NOFILL and LEFT are alternatives and indicate how the plot is filled. NOREFERENCE and REFERENCE are alternatives and specify whether a reference line is displayed. One keyword from each set can be specified. NOFILL and NOREFERENCE are the defaults.

• The keywords JOIN, NOJOIN, and HILO apply to plots with multiple variables and are alternatives. NOJOIN is the default. Only one keyword can be specified on a FORMAT subcommand for plots with two variables.

The following formats are available for plots of one variable:

sequence charts,sequence charts,sequence charts
line charts,line charts,line charts
line charts,line charts,line charts
sequence,sequence,sequence
sequence charts,sequence charts,sequence charts
area charts,area charts,area charts
area charts,area charts,area charts
sequence,sequence,sequence
NOFILL | Plot only the values for the variable with no fill. NOFILL produces a plot with no fill to the left or right of the plotted values. This is the default format when one variable is specified.
LEFT | Plot the values for the variable and fill in the area to the left. If the plotted variable has missing or negative values, the keyword LEFT is ignored and the default NOFILL is used instead.
FORMAT=LEFT
reference lines,reference lines,reference lines
in sequence charts,in sequence charts,in sequence charts
sequence charts,sequence charts,sequence charts
scale axis reference line,scale axis reference line,scale axis reference line
NOREFERENCE | Do not plot a reference line. This is the default when one variable is specified.
REFERENCE(value) | Plot a reference line at the specified value or at the variable mean if no value is specified. A fill chart is displayed as an area chart with a reference line and a non-fill chart is displayed as a line chart with a reference line.
FORMAT=REFERENCE

The following formats are available for plots of multiple variables:

sequence charts,sequence charts,sequence charts
multiple variables,multiple variables,multiple variables
sequence charts,sequence charts,sequence charts
connecting cases between variables,connecting cases between variables,connecting cases between variables
sequence charts,sequence charts,sequence charts
plotting highest and lowest values,plotting highest and lowest values,plotting highest and lowest values
NOJOIN | Plot the values of each variable named. Different colors or line patterns are used for multiple variables. Multiple occurrences of the same value for a single observation are plotted using a dollar sign ($). This is the default format for plots of multiple variables.
JOIN | Plot the values of each variable and join the values for each case. Values are plotted as described for NOJOIN, and the values for each case are joined together by a line.
HILO | Plot the highest and lowest values across variables for each case and join the two values together. The high and low values are plotted as a pair of vertical bars and are joined with a dashed line. HILO is ignored if more than three variables are specified, and the default NOJOIN is used instead.

Related Topics

CASEPLOT
Overview (CASEPLOT command)
Examples (CASEPLOT command)
VARIABLES Subcommand (CASEPLOT command)
DIFF Subcommand (CASEPLOT command)
SDIFF Subcommand (CASEPLOT command)
PERIOD Subcommand (CASEPLOT command)
LN and NOLOG Subcommands (CASEPLOT command)
ID Subcommand (CASEPLOT command)
MARK Subcommand (CASEPLOT command)
SPLIT Subcommand (CASEPLOT command)
APPLY Subcommand (CASEPLOT command)


MARK Subcommand (CASEPLOT command)

sequence charts,sequence charts,sequence charts
time axis reference lines,time axis reference lines,time axis reference lines

Use MARK to indicate the onset of an intervention variable.

• The onset date is indicated by a horizontal reference line.

• The specification on MARK can be either a variable name or an onset date if the DATE_ variable exists.

• If a variable is named, the reference line indicates where the values of that variable change.

• A date specification follows the same format as the DATE command—that is, a keyword followed by a value. For example, the specification for June, 1955, is Y 1955 M 6 (or Y 55 M 6 if only the last two digits of the year are used on DATE).

MARK Y=1990

Related Topics

CASEPLOT
Overview (CASEPLOT command)
Examples (CASEPLOT command)
VARIABLES Subcommand (CASEPLOT command)
DIFF Subcommand (CASEPLOT command)
SDIFF Subcommand (CASEPLOT command)
PERIOD Subcommand (CASEPLOT command)
LN and NOLOG Subcommands (CASEPLOT command)
ID Subcommand (CASEPLOT command)
FORMAT Subcommand (CASEPLOT command)
SPLIT Subcommand (CASEPLOT command)
APPLY Subcommand (CASEPLOT command)


SPLIT Subcommand (CASEPLOT command)

sequence charts,sequence charts,sequence charts
split-file scaling,split-file scaling,split-file scaling

SPLIT specifies how to plot data that have been divided into subgroups by a SPLIT FILE command. The specification on SPLIT is either SCALE or UNIFORM.

• If FORMAT=REFERENCE is specified when SPLIT=SCALE, the reference line is placed at the mean of the subgroup. If FORMAT=REFERENCE is specified when SPLIT=UNIFORM, the reference line is placed at the overall mean.

UNIFORM | Uniform scale. The horizontal axis is scaled according to the values of the entire dataset. This is the default if SPLIT is not specified.
SCALE | Individual scale. The horizontal axis is scaled according to the values of each individual subgroup.

Example

SPLIT FILE BY REGION.
CASEPLOT VARIABLES = TICKETS / SPLIT=SCALE.

• This example produces one plot for each REGION subgroup.

• The horizontal axis for each plot is scaled according to the values of TICKETS for each particular region.

Related Topics

CASEPLOT
Overview (CASEPLOT command)
Examples (CASEPLOT command)
VARIABLES Subcommand (CASEPLOT command)
DIFF Subcommand (CASEPLOT command)
SDIFF Subcommand (CASEPLOT command)
PERIOD Subcommand (CASEPLOT command)
LN and NOLOG Subcommands (CASEPLOT command)
ID Subcommand (CASEPLOT command)
FORMAT Subcommand (CASEPLOT command)
MARK Subcommand (CASEPLOT command)
APPLY Subcommand (CASEPLOT command)


APPLY Subcommand (CASEPLOT command)

sequence charts,sequence charts,sequence charts
using previously defined specifications,using previously defined specifications,using previously defined specifications

APPLY allows you to produce a caseplot using previously defined specifications without having to repeat the CASEPLOT subcommands.

• The only specification on APPLY is the name of a previous model in quotes. If a model name is not specified, the specifications from the previous CASEPLOT command are used.

• If no variables are specified, the variables that were specified for the original plot are used.

• To change one or more plot specifications, specify the subcommands of only those portions you want to change after the APPLY subcommand.

• To plot different variables, enter new variable names before or after the APPLY subcommand.

Example

CASEPLOT VARIABLES = TICKETS
  /LN
  /DIFF=1
  /SDIFF=1
  /PER=12.
CASEPLOT VARIABLES = ROUNDTRP
  /APPLY.
CASEPLOT APPLY
  /NOLOG.

• The first command produces a plot of TICKETS after a natural log transformation, differencing, and seasonal differencing.

• The second command plots ROUNDTRP using the same transformations specified for TICKETS.

• The third command produces a plot of ROUNDTRP but this time without any natural log transformation. The variable is still differenced once and seasonally differenced with a periodicity of 12.

Related Topics

CASEPLOT
Overview (CASEPLOT command)
Examples (CASEPLOT command)
VARIABLES Subcommand (CASEPLOT command)
DIFF Subcommand (CASEPLOT command)
SDIFF Subcommand (CASEPLOT command)
PERIOD Subcommand (CASEPLOT command)
LN and NOLOG Subcommands (CASEPLOT command)
ID Subcommand (CASEPLOT command)
FORMAT Subcommand (CASEPLOT command)
MARK Subcommand (CASEPLOT command)
SPLIT Subcommand (CASEPLOT command)


CASESTOVARS

CASESTOVARS (command),CASESTOVARS (command),CASESTOVARS (command)
CASESTOVARS (command),CASESTOVARS (command),CASESTOVARS (command)
syntax chart,syntax chart,syntax chart
CASESTOVARS

[/ID = varlist]

[/FIXED = varlist]

[/AUTOFIX = {YES**}]
            {NO   }

[/VIND [ROOT = rootname]]

[/COUNT = new variable ["label"]]

[/RENAME varname=rootname varname=rootname ...]

[/SEPARATOR = {"."     }]
              {“string”}]

[/INDEX = varlist]

[/GROUPBY = {VARIABLE**}]
            {INDEX     }]

[/DROP = varlist]

**Default if the subcommand is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

Syntax for the CASESTOVARS command can be generated from the Restructure Data Wizard by selecting Restructure selected cases into variables.

Example

CASESTOVARS /ID idvar /INDEX var1.

Related Topics

Overview (CASESTOVARS command)
Examples (CASESTOVARS command)
ID Subcommand (CASESTOVARS command)
INDEX Subcommand (CASESTOVARS command)
VIND Subcommand (CASESTOVARS command)
COUNT Subcommand (CASESTOVARS command)
FIXED Subcommand (CASESTOVARS command)
AUTOFIX Subcommand (CASESTOVARS command)
RENAME Subcommand (CASESTOVARS command)
SEPARATOR Subcommand (CASESTOVARS command)
GROUPBY Subcommand (CASESTOVARS command)
DROP Subcommand (CASESTOVARS command)
VARSTOCASES


Overview (CASESTOVARS command)

CASESTOVARS (command),CASESTOVARS (command),CASESTOVARS (command)
limitations,limitations,limitations

A variable contains information that you want to analyze, such as a measurement or a test score. A case is an observation, such as an individual or an institution.

In a simple data file, each variable is a single column in your data, and each case is a single row in your data. So, if you were recording the score on a test for all students in a class, the scores would appear in only one column and there would be only one row for each student.

Complex data files store data in more than one column or row. For example, in a complex data file, information about a case could be stored in more than one row. So, if you were recording monthly test scores for all students in a class, there would be multiple rows for each student—one for each month.

CASESTOVARS restructures complex data that has multiple rows for a case. You can use it to restructure data in which repeated measurements of a single case were recorded in multiple rows (row groups) into a new data file in which each case appears as separate variables (variable groups) in a single row. It replaces the active dataset.

Options Collapse Hide details

Options

Automatic Classification of Fixed Variables. The values of fixed variables do not vary within a row group. You can use the AUTOFIX subcommand to let the procedure determine which variables are fixed and which variables are to become variable groups in the new data file.

Naming New Variables. You can use the RENAME, SEPARATOR, and INDEX subcommands to control the names for the new variables.

Ordering New Variables. You can use the GROUPBY subcommand to specify how to order the new variables in the new data file.

Creating Indicator Variables. You can use the VIND subcommand to create indicator variables. An indicator variable indicates the presence or absence of a value for a case. An indicator variable has the value of 1 if the case has a value; otherwise, it is 0.

Creating a Count Variable. You can use the COUNT subcommand to create a count variable that contains the number of rows in the original data that were used to create a row in the new data file.

Variable Selection. You can use the DROP subcommand to specify which variables from the original data file are dropped from the new data file.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is simply the command keyword.

• If split-file processing is in effect, the basic specification creates a row in the new data file for each combination of values of the SPLIT FILE variables. If split-file processing is not in effect, the basic specification results in a new data file with one row.

• Because the basic specification can create quite a few new columns in the new data file, the use of an ID subcommand to identify groups of cases is recommended.

Subcommand Order Collapse Hide details

Subcommand Order

Subcommands can be specified in any order.

Syntax Rules Collapse Hide details

Syntax Rules

Each subcommand can be specified only once.

Operations Collapse Hide details

Operations

• Original row order. CASESTOVARS assumes that the original data are sorted by SPLIT and ID variables.

• Identifying row groups in the original file. A row group consists of rows in the original data that share the same values of variables listed on the ID subcommand. Row groups are consolidated into a single row in the new data file. Each time a new combination of ID values is encountered, a new row is created.

• Split-file processing and row groups. If split-file processing is in effect, the split variables are automatically used to identify row groups (they are treated as though they appeared first on the ID subcommand). Split-file processing remains in effect in the new data file unless a variable that is used to split the file is named on the DROP subcommand.

• New variable groups. A variable group is a group of related columns in the new data file that is created from a variable in the original data. Each variable group contains a variable for each index value or combination of index values encountered.

• Candidate variables. A variable in the original data is a candidate to become a variable group in the new data file if it is not used on the SPLIT command or the ID, FIXED, or DROP subcommands and its values vary within the row group. Variables named on the SPLIT, ID, and FIXED subcommands are assumed to not vary within the row group and are simply copied into the new data file.

• New variable names. The names of the variables in a new group are constructed by the procedure. It uses the rootname specified on the RENAME subcommand and the string named on the SEPARATOR subcommand.

• New variable formats. With the exception of names and labels, the dictionary information for all of the new variables in a group (for example, value labels and format) is taken from the variable in the original data.

• New variable order. New variables are created in the order specified by the GROUPBY subcommand.

• Weighted files. The WEIGHT command does not affect the results of CASESTOVARS. If the original data are weighted, the new data file will be weighted unless the variable that is used as the weight is dropped from the new data file.

• Selected cases. The FILTER and USE commands do not affect the results of CASESTOVARS. It processes all cases.

Limitations Collapse Hide details

Limitations

The TEMPORARY command cannot be in effect when CASESTOVARS is executed.

Related Topics

CASESTOVARS
Examples (CASESTOVARS command)
ID Subcommand (CASESTOVARS command)
INDEX Subcommand (CASESTOVARS command)
VIND Subcommand (CASESTOVARS command)
COUNT Subcommand (CASESTOVARS command)
FIXED Subcommand (CASESTOVARS command)
AUTOFIX Subcommand (CASESTOVARS command)
RENAME Subcommand (CASESTOVARS command)
SEPARATOR Subcommand (CASESTOVARS command)
GROUPBY Subcommand (CASESTOVARS command)
DROP Subcommand (CASESTOVARS command)


Examples (CASESTOVARS command)

SORT CASES (command),SORT CASES (command),SORT CASES (command)
with ADD FILES command,with ADD FILES command,with ADD FILES command
CASESTOVARS (command),CASESTOVARS (command),CASESTOVARS (command)
with SORT CASES command,with SORT CASES command,with SORT CASES command

The following is the LIST output for a data file in which repeated measurements for the same case are stored on separate rows in a single variable.

insure     caseid    month      bps      bpd

BCBS            1        1      160      100
BCBS            2        1      120       70
BCBS            2        2      130       86
Prucare         1        1      160       94
Prucare         1        2      200      105
Prucare         1        3      180      105
Pruecare        2        1      135       90

The commands:

SPLIT FILE BY insure.
CASESTOVARS
    /ID=caseid
    /INDEX=month.

create a new variable group for bps and a new group for bpd. The LIST output for the new active dataset is as follows:

• The row groups in the original data are identified by insure and caseid.

• There are four row groups—one for each combination of the values in insure and caseid.

• The command creates four rows in the new data file, one for each row group.

• The candidate variables from the original file are bps and bpd. They vary within the row group, so they will become variable groups in the new data file.

• The command creates two new variable groups—one for bps and one for bpd.

• Each variable group contains three new variables—one for each unique value of the index variable month.

Related Topics

CASESTOVARS
Overview (CASESTOVARS command)
ID Subcommand (CASESTOVARS command)
INDEX Subcommand (CASESTOVARS command)
VIND Subcommand (CASESTOVARS command)
COUNT Subcommand (CASESTOVARS command)
FIXED Subcommand (CASESTOVARS command)
AUTOFIX Subcommand (CASESTOVARS command)
RENAME Subcommand (CASESTOVARS command)
SEPARATOR Subcommand (CASESTOVARS command)
GROUPBY Subcommand (CASESTOVARS command)
DROP Subcommand (CASESTOVARS command)


ID Subcommand (CASESTOVARS command)

ID (subcommand),ID (subcommand),ID (subcommand)
CASESTOVARS command,CASESTOVARS command,CASESTOVARS command
CASESTOVARS (command),CASESTOVARS (command),CASESTOVARS (command)
ID subcommand,ID subcommand,ID subcommand

The ID subcommand specifies variables that identify the rows from the original data that should be grouped together in the new data file.

• If the ID subcommand is omitted, only SPLIT FILE variables (if any) will be used to group rows in the original data and to identify rows in the new data file.

• CASESTOVARS expects the data to be sorted by SPLIT FILE variables and then by ID variables. If split-file processing is in effect, the original data should be sorted on the split variables in the order given on the SPLIT FILE command and then on the ID variables in the order in which they appear in the ID subcommand.

• A variable may appear on both the SPLIT FILE command and the ID subcommand.

• Variables listed on the SPLIT FILE command and on the ID subcommand are copied into the new data file with their original values and dictionary information unless they are dropped with the DROP subcommand.

• Variables listed on the ID subcommand may not appear on the FIXED or INDEX subcommands.

• Rows in the original data for which any ID variable has the system-missing value or is blank are not included in the new data file, and a warning message is displayed.

• ID variables are not candidates to become a variable group in the new data file.

Related Topics

CASESTOVARS
Overview (CASESTOVARS command)
Examples (CASESTOVARS command)
INDEX Subcommand (CASESTOVARS command)
VIND Subcommand (CASESTOVARS command)
COUNT Subcommand (CASESTOVARS command)
FIXED Subcommand (CASESTOVARS command)
AUTOFIX Subcommand (CASESTOVARS command)
RENAME Subcommand (CASESTOVARS command)
SEPARATOR Subcommand (CASESTOVARS command)
GROUPBY Subcommand (CASESTOVARS command)
DROP Subcommand (CASESTOVARS command)


INDEX Subcommand (CASESTOVARS command)

INDEX (subcommand),INDEX (subcommand),INDEX (subcommand)
CASESTOVARS command,CASESTOVARS command,CASESTOVARS command
CASESTOVARS (command),CASESTOVARS (command),CASESTOVARS (command)
INDEX subcommand,INDEX subcommand,INDEX subcommand

In the original data, a variable appears in a single column. In the new data file, that variable will appear in multiple new columns. The INDEX subcommand names the variables in the original data that should be used to create the new columns. INDEX variables are also used to name the new columns.

Optionally, with the GROUPBY subcommand, INDEX variables can be used to determine the order of the new columns, and, with the VIND subcommand, INDEX variables can be used to create indicator variables.

• String variables can be used as index variables. They cannot contain blank values for rows in the original data that qualify for inclusion in the new data file.

• Numeric variables can be used as index variables. They must contain only non-negative integer values and cannot have system-missing or blank values.

• Within each row group in the original file, each row must have a different combination of values of the index variables.

• If the INDEX subcommand is not used, the index starts with 1 within each row group and increments each time a new value is encountered in the original variable.

• Variables listed on the INDEX subcommand may not appear on the ID, FIXED, or DROP subcommands.

• Index variables are not are not candidates to become a variable group in the new data file.

Related Topics

CASESTOVARS
Overview (CASESTOVARS command)
Examples (CASESTOVARS command)
ID Subcommand (CASESTOVARS command)
VIND Subcommand (CASESTOVARS command)
COUNT Subcommand (CASESTOVARS command)
FIXED Subcommand (CASESTOVARS command)
AUTOFIX Subcommand (CASESTOVARS command)
RENAME Subcommand (CASESTOVARS command)
SEPARATOR Subcommand (CASESTOVARS command)
GROUPBY Subcommand (CASESTOVARS command)
DROP Subcommand (CASESTOVARS command)


VIND Subcommand (CASESTOVARS command)

VIND (subcommand),VIND (subcommand),VIND (subcommand)
CASESTOVARS command,CASESTOVARS command,CASESTOVARS command
CASESTOVARS (command),CASESTOVARS (command),CASESTOVARS (command)
VIND subcommand,VIND subcommand,VIND subcommand

The VIND subcommand creates indicator variables in the new data file. An indicator variable indicates the presence or absence of a value for a case. An indicator variable has the value of 1 if the case has a value; otherwise, it is 0.

• One new indicator variable is created for each unique value of the variables specified on the INDEX subcommand.

• If the INDEX subcommand is not used, an indicator variable is created each time a new value is encountered within a row group.

• An optional rootname can be specified after the ROOT keyword on the subcommand. The default rootname is ind.

• The format for the new indicator variables is F1.0.

Example

If the original variables are:

insure     caseid     month     bps     bpd

and the data are as shown in the first example, the commands:

SPLIT FILE BY insure.
CASESTOVARS
    /ID=caseid
    /INDEX=month
    /VIND
    /DROP=caseid bpd.

create a new file with the following data:

• The command created three new indicator variables—one for each unique value of the index variable month.

Related Topics

CASESTOVARS
Overview (CASESTOVARS command)
Examples (CASESTOVARS command)
ID Subcommand (CASESTOVARS command)
INDEX Subcommand (CASESTOVARS command)
COUNT Subcommand (CASESTOVARS command)
FIXED Subcommand (CASESTOVARS command)
AUTOFIX Subcommand (CASESTOVARS command)
RENAME Subcommand (CASESTOVARS command)
SEPARATOR Subcommand (CASESTOVARS command)
GROUPBY Subcommand (CASESTOVARS command)
DROP Subcommand (CASESTOVARS command)


COUNT Subcommand (CASESTOVARS command)

COUNT (subcommand),COUNT (subcommand),COUNT (subcommand)
CASESTOVARS command,CASESTOVARS command,CASESTOVARS command
CASESTOVARS (command),CASESTOVARS (command),CASESTOVARS (command)
COUNT subcommand,COUNT subcommand,COUNT subcommand

CASESTOVARS consolidates row groups in the original data into a single row in the new data file. The COUNT subcommand creates a new variable that contains the number of rows in the original data that were used to generate the row in the new data file.

• One new variable is named on the COUNT subcommand. It must have a unique name.

• The label for the new variable is optional and, if specified, must be delimited by single or double quotes.

• The format of the new count variable is F4.0.

Example

If the original data are as shown in the first example, the commands:

SPLIT FILE BY insure.
CASESTOVARS
    /ID=caseid
    /COUNT=countvar
    /DROP=insure month bpd.

create a new file with the following data:

• The command created a count variable, countvar, which contains the number of rows in the original data that were used to generate the current row.

Related Topics

CASESTOVARS
Overview (CASESTOVARS command)
Examples (CASESTOVARS command)
ID Subcommand (CASESTOVARS command)
INDEX Subcommand (CASESTOVARS command)
VIND Subcommand (CASESTOVARS command)
FIXED Subcommand (CASESTOVARS command)
AUTOFIX Subcommand (CASESTOVARS command)
RENAME Subcommand (CASESTOVARS command)
SEPARATOR Subcommand (CASESTOVARS command)
GROUPBY Subcommand (CASESTOVARS command)
DROP Subcommand (CASESTOVARS command)


FIXED Subcommand (CASESTOVARS command)

FIXED (subcommand),FIXED (subcommand),FIXED (subcommand)
CASESTOVARS command,CASESTOVARS command,CASESTOVARS command
CASESTOVARS (command),CASESTOVARS (command),CASESTOVARS (command)
FIXED subcommand,FIXED subcommand,FIXED subcommand

The FIXED subcommand names the variables that should be copied from the original data to the new data file.

• CASESTOVARS assumes that variables named on the FIXED subcommand do not vary within row groups in the original data. If they vary, a warning message is generated and the command is executed.

• Fixed variables appear as a single column in the new data file. Their values are simply copied to the new file.

• The AUTOFIX subcommand can automatically determine which variables in the original data are fixed. By default, the AUTOFIX subcommand overrides the FIXED subcommand.

Related Topics

CASESTOVARS
Overview (CASESTOVARS command)
Examples (CASESTOVARS command)
ID Subcommand (CASESTOVARS command)
INDEX Subcommand (CASESTOVARS command)
VIND Subcommand (CASESTOVARS command)
COUNT Subcommand (CASESTOVARS command)
AUTOFIX Subcommand (CASESTOVARS command)
RENAME Subcommand (CASESTOVARS command)
SEPARATOR Subcommand (CASESTOVARS command)
GROUPBY Subcommand (CASESTOVARS command)
DROP Subcommand (CASESTOVARS command)


AUTOFIX Subcommand (CASESTOVARS command)

AUTOFIX (subcommand),AUTOFIX (subcommand),AUTOFIX (subcommand)
CASESTOVARS command,CASESTOVARS command,CASESTOVARS command
CASESTOVARS (command),CASESTOVARS (command),CASESTOVARS (command)
AUTOFIX subcommand,AUTOFIX subcommand,AUTOFIX subcommand

The AUTOFIX subcommand evaluates candidate variables and classifies them as either fixed or as the source of a variable group.

• A candidate variable is a variable in the original data that does not appear on the SPLIT command or on the ID, INDEX, and DROP subcommands.

• An original variable that does not vary within any row group is classified as a fixed variable and is copied into a single variable in the new data file.

• An original variable that does vary within the row group is classified as the source of a variable group. It becomes a variable group in the new data file.

YES (keyword),YES (keyword),YES (keyword)
CASESTOVARS command,CASESTOVARS command,CASESTOVARS command
NO (keyword),NO (keyword),NO (keyword)
CASESTOVARS command,CASESTOVARS command,CASESTOVARS command
YES | Evaluate and automatically classify all candidate variables. The procedure automatically evaluates and classifies all candidate variables. This is the default. If there is a FIXED subcommand, the procedure displays a warning message for each misclassified variable and automatically corrects the error. Otherwise, no warning messages are displayed. This option overrides the FIXED subcommand.
NO | Evaluate all candidate variables and issue warnings. The procedure evaluates all candidate variables and determines if they are fixed. If a variable is listed on the FIXED subcommand but it is not actually fixed (that is, it varies within the row group), a warning message is displayed and the command is not executed. If a variable is not listed on the FIXED subcommand but it is actually fixed (that is, it does not vary within the row group), a warning message is displayed and the command is executed. The variable is classified as the source of a variable group and becomes a variable group in the new data file.

Related Topics

CASESTOVARS
Overview (CASESTOVARS command)
Examples (CASESTOVARS command)
ID Subcommand (CASESTOVARS command)
INDEX Subcommand (CASESTOVARS command)
VIND Subcommand (CASESTOVARS command)
COUNT Subcommand (CASESTOVARS command)
FIXED Subcommand (CASESTOVARS command)
RENAME Subcommand (CASESTOVARS command)
SEPARATOR Subcommand (CASESTOVARS command)
GROUPBY Subcommand (CASESTOVARS command)
DROP Subcommand (CASESTOVARS command)


RENAME Subcommand (CASESTOVARS command)

RENAME (subcommand),RENAME (subcommand),RENAME (subcommand)
CASESTOVARS command,CASESTOVARS command,CASESTOVARS command
CASESTOVARS (command),CASESTOVARS (command),CASESTOVARS (command)
RENAME subcommand,RENAME subcommand,RENAME subcommand

CASESTOVARS creates variable groups with new variables. The first part of the new variable name is either derived from the name of the original variable or is the rootname specified on the RENAME subcommand.

• The specification is the original variable name followed by a rootname.

• The named variable cannot be a SPLIT FILE variable and cannot appear on the ID, FIXED, INDEX, or DROP subcommands.

• A variable can be renamed only once.

• Only one RENAME subcommand can be used, but it can contain multiple specifications.

Related Topics

CASESTOVARS
Overview (CASESTOVARS command)
Examples (CASESTOVARS command)
ID Subcommand (CASESTOVARS command)
INDEX Subcommand (CASESTOVARS command)
VIND Subcommand (CASESTOVARS command)
COUNT Subcommand (CASESTOVARS command)
FIXED Subcommand (CASESTOVARS command)
AUTOFIX Subcommand (CASESTOVARS command)
SEPARATOR Subcommand (CASESTOVARS command)
GROUPBY Subcommand (CASESTOVARS command)
DROP Subcommand (CASESTOVARS command)


SEPARATOR Subcommand (CASESTOVARS command)

SEPARATOR (subcommand),SEPARATOR (subcommand),SEPARATOR (subcommand)
CASESTOVARS command,CASESTOVARS command,CASESTOVARS command
CASESTOVARS (command),CASESTOVARS (command),CASESTOVARS (command)
SEPARATOR subcommand,SEPARATOR subcommand,SEPARATOR subcommand

CASESTOVARS creates variable groups that contain new variables. There are two parts to the name of a new variable—a rootname and an index. The parts are separated by a string. The separator string is specified on the SEPARATOR subcommand.

• If a separator is not specified, the default is a period.

• A separator can contain multiple characters.

• The separator must be delimited by single or double quotes.

• You can suppress the separator by specifying /SEPARATOR="".

Related Topics

CASESTOVARS
Overview (CASESTOVARS command)
Examples (CASESTOVARS command)
ID Subcommand (CASESTOVARS command)
INDEX Subcommand (CASESTOVARS command)
VIND Subcommand (CASESTOVARS command)
COUNT Subcommand (CASESTOVARS command)
FIXED Subcommand (CASESTOVARS command)
AUTOFIX Subcommand (CASESTOVARS command)
RENAME Subcommand (CASESTOVARS command)
GROUPBY Subcommand (CASESTOVARS command)
DROP Subcommand (CASESTOVARS command)


GROUPBY Subcommand (CASESTOVARS command)

GROUPBY (subcommand),GROUPBY (subcommand),GROUPBY (subcommand)
CASESTOVARS command,CASESTOVARS command,CASESTOVARS command
CASESTOVARS (command),CASESTOVARS (command),CASESTOVARS (command)
GROUPBY subcommand,GROUPBY subcommand,GROUPBY subcommand

The GROUPBY subcommand controls the order of the new variables in the new data file.

VARIABLE (keyword),VARIABLE (keyword),VARIABLE (keyword)
CASESTOVARS command,CASESTOVARS command,CASESTOVARS command
INDEX (keyword),INDEX (keyword),INDEX (keyword)
CASESTOVARS command,CASESTOVARS command,CASESTOVARS command
VARIABLE | Group new variables by original variable. The procedure groups all variables created from an original variable together. This is the default.
INDEX | Group new variables by index variable. The procedure groups variables according to the index variables.

Example

If the original variables are:

insure     caseid     month     bps     bpd

and the data are as shown in the first example, the commands:

SPLIT FILE BY insure.
CASESTOVARS
    /ID=caseid
    /INDEX=month
    /GROUPBY=VARIABLE.

create a new data file with the following variable order:

• Variables are grouped by variable group—bps and bpd.

Example

Using the same original data, the commands:

SPLIT FILE BY insure.
CASESTOVARS
    /ID=insure caseid
    /INDEX=month
    /GROUPBY=INDEX.

create a new data file with the following variable order:

• Variables are grouped by values of the index variable month—1, 2, and 3.

Related Topics

CASESTOVARS
Overview (CASESTOVARS command)
Examples (CASESTOVARS command)
ID Subcommand (CASESTOVARS command)
INDEX Subcommand (CASESTOVARS command)
VIND Subcommand (CASESTOVARS command)
COUNT Subcommand (CASESTOVARS command)
FIXED Subcommand (CASESTOVARS command)
AUTOFIX Subcommand (CASESTOVARS command)
RENAME Subcommand (CASESTOVARS command)
SEPARATOR Subcommand (CASESTOVARS command)
DROP Subcommand (CASESTOVARS command)


DROP Subcommand (CASESTOVARS command)

DROP (subcommand),DROP (subcommand),DROP (subcommand)
CASESTOVARS command,CASESTOVARS command,CASESTOVARS command
CASESTOVARS (command),CASESTOVARS (command),CASESTOVARS (command)
DROP subcommand,DROP subcommand,DROP subcommand

The DROP subcommand specifies the subset of variables to exclude from the new data file.

• You can drop variables that appear on the ID list.

• Variables listed on the DROP subcommand may not appear on the FIXED or INDEX subcommand.

• Dropped variables are not candidates to become a variable group in the new data file.

Cases to Variables procedure,Cases to Variables procedure,Cases to Variables procedure

• You cannot drop all variables. The new data file is required to have at least one variable.

Related Topics

CASESTOVARS
Overview (CASESTOVARS command)
Examples (CASESTOVARS command)
ID Subcommand (CASESTOVARS command)
INDEX Subcommand (CASESTOVARS command)
VIND Subcommand (CASESTOVARS command)
COUNT Subcommand (CASESTOVARS command)
FIXED Subcommand (CASESTOVARS command)
AUTOFIX Subcommand (CASESTOVARS command)
RENAME Subcommand (CASESTOVARS command)
SEPARATOR Subcommand (CASESTOVARS command)
GROUPBY Subcommand (CASESTOVARS command)


CATPCA

CATPCA (command),CATPCA (command),CATPCA (command)
CATPCA (command),CATPCA (command),CATPCA (command)
syntax chart,syntax chart,syntax chart
release history,release history,release history
Categorical Principal Components Analysis,Categorical Principal Components Analysis,Categorical Principal Components Analysis
command syntax,command syntax,command syntax

CATPCA is available in the Categories option.

CATPCA VARIABLES = varlist

 /ANALYSIS = varlist
      [[(WEIGHT={1**}] [LEVEL={SPORD**}] [DEGREE={2}] [INKNOT={2}]]
                {n  }                            {n}          {n}
                              {SPNOM  }  [DEGREE={2}] [INKNOT={2}]
                                                 {n}          {n}
                              {ORDI   }
                              {NOMI   }
                              {MNOM   }
                              {NUME   }

 [/DISCRETIZATION = [varlist[([{GROUPING   }] [{NCAT={7}  }] [DISTR={NORMAL }])]]]
                                                     {n}            {UNIFORM}
                               {EQINTV={n} }
                               {RANKING    }
                               {MULTIPLYING}

 [/MISSING = [varlist [([{PASSIVE**}] [{MODEIMPU}])]]]
                                       {EXTRACAT}
                         {ACTIVE   }   {MODEIMPU}
                                       {EXTRACAT}
                                       {LISTWISE}

 [/SUPPLEMENTARY = [OBJECT(varlist)] [VARIABLE(varlist)]]

 [/CONFIGURATION = [{INITIAL}] (file)]
                    {FIXED  }

 [/DIMENSION = {2**}]
               {n  }

 [/NORMALIZATION = {VPRINCIPAL**}]
                   {OPRINCIPAL  }
                   {SYMMETRICAL }
                   {INDEPENDENT }
                   {n           }

 [/MAXITER = {100**}]
             {n    }

 [/CRITITER = {.00001**}]
              {value   }

 [/PRINT = [DESCRIP**[(varlist)]] [VAF] [LOADING**][QUANT[(varlist)]][HISTORY]
           [CORR**] [OCORR] [OBJECT[([(varname)]varlist)]] [NONE]]

 [/PLOT = [OBJECT**[(varlist)][(n)]]
          [LOADING**[(varlist [(CENTR[(varlist)])])][(n)]]
          [CATEGORY (varlist)[(n)]]
          [JOINTCAT[({varlist})][(n)]]
          [TRANS[(varlist[({1})])[(n)]]
                           {n}
          [BIPLOT[({LOADING}[(varlist)])[(varlist)]] [(n)]]
                   {CENTR  }
          [TRIPLOT[(varlist[(varlist)])][(n)]]
          [RESID(varlist[({1})])[(n)]]
                          {n}
          [PROJCENTR(varname, varlist)[(n)]] [NONE]]
          [NDIM(value,value)]

 [/SAVE = [TRDATA[({TRA     }[(n)])]] [OBJECT[({OBSCO   }[(n)])]] ]
                   {rootname}                  {rootname}
          [APPROX[({APP     })]]
                   {rootname}

 [/OUTFILE = [TRDATA[('savfile'|'dataset')]] [DISCRDATA[('savfile'|'dataset')]]
             [OBJECT[('savfile'|'dataset')]] [APPROX[('savfile'|'dataset')]]].

** Default if the subcommand is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See CATPCA Algorithms for computational details for this procedure.

Syntax for the CATPCA command can be generated from the Categorical Principal Components Analysis (CATPCA) dialog.

Release History Collapse Hide details

Release History

Release 13.0

• NDIM keyword introduced on PLOT subcommand.

• The maximum label length on the PLOT subcommand is increased to 64 for variable names, 255 for variable labels, and 60 for value labels (previous value was 20).

Related Topics

Overview (CATPCA command)
Example (CATPCA command)
VARIABLES Subcommand (CATPCA command)
ANALYSIS Subcommand (CATPCA command)
Level Keyword (CATPCA command)
SPORD and SPNOM Keywords (CATPCA command)
DISCRETIZATION Subcommand (CATPCA command)
GROUPING Keyword (CATPCA command)
NCAT Keyword (CATPCA command)
MISSING Subcommand (CATPCA command)
PASSIVE Keyword (CATPCA command)
ACTIVE Keyword (CATPCA command)
SUPPLEMENTARY Subcommand (CATPCA command)
CONFIGURATION Subcommand (CATPCA command)
DIMENSION Subcommand (CATPCA command)
NORMALIZATION Subcommand (CATPCA command)
MAXITER Subcommand (CATPCA command)
CRITITER Subcommand (CATPCA command)
PRINT Subcommand (CATPCA command)
PLOT Subcommand (CATPCA command)
BIPLOT Keyword (CATPCA command)
SAVE Subcommand (CATPCA command)
OUTFILE Subcommand (CATPCA command)


Overview (CATPCA command)

CATPCA performs principal components analysis on a set of variables. The variables can be given mixed optimal scaling levels, and the relationships among observed variables are not assumed to be linear.

In CATPCA, dimensions correspond to components (that is, an analysis with two dimensions results in two components), and object scores correspond to component scores.

CATPCA (command),CATPCA (command),CATPCA (command)
options,options,options
Options Collapse Hide details

Options

Optimal Scaling Level. You can specify the optimal scaling level at which you want to analyze each variable (levels include spline ordinal, spline nominal, ordinal, nominal, multiple nominal, or numerical).

Discretization. You can use the DISCRETIZATION subcommand to discretize fractional-value variables or to recode categorical variables.

Missing Data. You can use the MISSING subcommand to specify the treatment of missing data on a per-variable basis.

Supplementary Objects and Variables. You can specify objects and variables that you want to treat as supplementary to the analysis and then fit them into the solution.

Read Configuration. CATPCA can read a configuration from a file through the CONFIGURATION subcommand. This information can be used as the starting point for your analysis or as a fixed solution in which to fit variables.

Number of Dimensions. You can specify how many dimensions (components) CATPCA should compute.

Normalization. You can specify one of five different options for normalizing the objects and variables.

Algorithm Tuning. You can use the MAXITER and CRITITER subcommands to control the values of algorithm-tuning parameters.

Optional Output. You can request optional output through the PRINT subcommand.

Optional Plots. You can request a plot of object points, transformation plots per variable, and plots of category points per variable or a joint plot of category points for specified variables. Other plot options include residuals plots, a biplot, a triplot, component loadings plot, and a plot of projected centroids.

Writing Discretized Data, Transformed Data, Object (Component) Scores, and Approximations. You can write the discretized data, transformed data, object scores, and approximations to external files for use in further analyses.

Saving Transformed Data, Object (Component) Scores, and Approximations. You can save the transformed variables, object scores, and approximations to the working data file.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is the CATPCA command with the VARIABLES and ANALYSIS subcommands.

CATPCA (command),CATPCA (command),CATPCA (command)
syntax rules,syntax rules,syntax rules
Syntax Rules Collapse Hide details

Syntax Rules

• The VARIABLES and ANALYSIS subcommands must always appear.

• All subcommands can be specified in any order.

• Variables that are specified in the ANALYSIS subcommand must be found in the VARIABLES subcommand.

• Variables that are specified in the SUPPLEMENTARY subcommand must be found in the ANALYSIS subcommand.

Operations Collapse Hide details

Operations

• If a subcommand is repeated, it causes a syntax error, and the procedure terminates.

CATPCA (command),CATPCA (command),CATPCA (command)
limitations,limitations,limitations
Limitations Collapse Hide details

Limitations

• CATPCA operates on category indicator variables. The category indicators should be positive integers. You can use the DISCRETIZATION subcommand to convert fractional-value variables and string variables into positive integers.

• In addition to system-missing values and user-defined missing values, category indicator values that are less than 1 are treated by CATPCA as missing. If one of the values of a categorical variable has been coded 0 or a negative value and you want to treat it as a valid category, use the COMPUTE command to add a constant to the values of that variable such that the lowest value will be 1. You can also use the RANKING option of the DISCRETIZATION subcommand for this purpose, except for variables that you want to treat as numeric, because the characteristic of equal intervals in the data will not be maintained.

• There must be at least three valid cases.

• Split-file has no implications for CATPCA.

Related Topics

CATPCA
Example (CATPCA command)
VARIABLES Subcommand (CATPCA command)
ANALYSIS Subcommand (CATPCA command)
Level Keyword (CATPCA command)
SPORD and SPNOM Keywords (CATPCA command)
DISCRETIZATION Subcommand (CATPCA command)
GROUPING Keyword (CATPCA command)
NCAT Keyword (CATPCA command)
MISSING Subcommand (CATPCA command)
PASSIVE Keyword (CATPCA command)
ACTIVE Keyword (CATPCA command)
SUPPLEMENTARY Subcommand (CATPCA command)
CONFIGURATION Subcommand (CATPCA command)
DIMENSION Subcommand (CATPCA command)
NORMALIZATION Subcommand (CATPCA command)
MAXITER Subcommand (CATPCA command)
CRITITER Subcommand (CATPCA command)
PRINT Subcommand (CATPCA command)
PLOT Subcommand (CATPCA command)
BIPLOT Keyword (CATPCA command)
SAVE Subcommand (CATPCA command)
OUTFILE Subcommand (CATPCA command)


Example (CATPCA command)

CATPCA VARIABLES = TEST1 TEST2 TEST3 TO TEST6 TEST7 TEST8
  /ANALYSIS = TEST1 TO TEST2(WEIGHT=2 LEVEL=ORDI)
              TEST3 TO TEST5(LEVEL=SPORD INKNOT=3)
              TEST6 TEST7(LEVEL=SPORD DEGREE=3)
              TEST8(LEVEL=NUME)
  /DISCRETIZATION = TEST1(GROUPING NCAT=5 DISTR=UNIFORM)
              TEST6(GROUPING) TEST8(MULTIPLYING)
  /MISSING = TEST5(ACTIVE) TEST6(ACTIVE EXTRACAT) TEST8(LISTWISE)
  /SUPPLEMENTARY = OBJECT(1 3) VARIABLE(TEST1)
  /CONFIGURATION = ('iniconf.sav')
  /DIMENSION = 2
  /NORMALIZATION = VPRINCIPAL
  /MAXITER = 150
  /CRITITER = .000001
  /PRINT =  DESCRIP LOADING CORR QUANT(TEST1 TO TEST3) OBJECT
  /PLOT = TRANS(TEST2 TO TEST5) OBJECT(TEST2 TEST3)
  /SAVE = TRDATA OBJECT
  /OUTFILE = TRDATA('/data/trans.sav') OBJECT('/data/obs.sav').

• VARIABLES defines variables. The keyword TO refers to the order of the variables in the working data file.

• The ANALYSIS subcommand defines variables that are used in the analysis. TEST1 and TEST2 have a weight of 2. For the other variables, WEIGHT is not specified; thus, they have the default weight value of 1. The optimal scaling level for TEST1 and TEST2 is ordinal. The optimal scaling level for TEST3 to TEST7 is spline ordinal. The optimal scaling level for TEST8 is numerical. The keyword TO refers to the order of the variables in the VARIABLES subcommand. The splines for TEST3 to TEST5 have degree 2 (default because unspecified) and 3 interior knots. The splines for TEST6 and TEST7 have degree 3 and 2 interior knots (default because unspecified).

• DISCRETIZATION specifies that TEST6 and TEST8, which are fractional-value variables, are discretized: TEST6 by recoding into 7 categories with a normal distribution (default because unspecified) and TEST8 by “multiplying.” TEST1, which is a categorical variable, is recoded into 5 categories with a close-to-uniform distribution.

• MISSING specifies that objects with missing values on TEST5 and TEST6 are included in the analysis; missing values on TEST5 are replaced with the mode (default if not specified), and missing values on TEST6 are treated as an extra category. Objects with a missing value on TEST8 are excluded from the analysis. For all other variables, the default is in effect; that is, missing values (not objects) are excluded from the analysis.

• CONFIGURATION specifies iniconf.sav as the file containing the coordinates of a configuration that is to be used as the initial configuration (default because unspecified).

• DIMENSION specifies 2 as the number of dimensions; that is, 2 components are computed. This setting is the default, so this subcommand could be omitted here.

• The NORMALIZATION subcommand specifies optimization of the association between variables. This setting is the default, so this subcommand could be omitted here.

• MAXITER specifies 150 as the maximum number of iterations (instead of the default value of 100).

• CRITITER sets the convergence criterion to a value that is smaller than the default value.

• PRINT specifies descriptives, component loadings and correlations (all default), quantifications for TEST1 to TEST3, and the object (component) scores.

• PLOT requests transformation plots for the variables TEST2 to TEST5, an object points plot labeled with the categories of TEST2, and an object points plot labeled with the categories of TEST3.

• The SAVE subcommand adds the transformed variables and the component scores to the working data file.

• The OUTFILE subcommand writes the transformed data to a data file called trans.sav and writes the component scores to a data file called obs.sav, both in the directory /data.

Related Topics

CATPCA
Overview (CATPCA command)
VARIABLES Subcommand (CATPCA command)
ANALYSIS Subcommand (CATPCA command)
Level Keyword (CATPCA command)
SPORD and SPNOM Keywords (CATPCA command)
DISCRETIZATION Subcommand (CATPCA command)
GROUPING Keyword (CATPCA command)
NCAT Keyword (CATPCA command)
MISSING Subcommand (CATPCA command)
PASSIVE Keyword (CATPCA command)
ACTIVE Keyword (CATPCA command)
SUPPLEMENTARY Subcommand (CATPCA command)
CONFIGURATION Subcommand (CATPCA command)
DIMENSION Subcommand (CATPCA command)
NORMALIZATION Subcommand (CATPCA command)
MAXITER Subcommand (CATPCA command)
CRITITER Subcommand (CATPCA command)
PRINT Subcommand (CATPCA command)
PLOT Subcommand (CATPCA command)
BIPLOT Keyword (CATPCA command)
SAVE Subcommand (CATPCA command)
OUTFILE Subcommand (CATPCA command)


VARIABLES Subcommand (CATPCA command)

VARIABLES (subcommand),VARIABLES (subcommand),VARIABLES (subcommand)
CATPCA command,CATPCA command,CATPCA command
CATPCA (command),CATPCA (command),CATPCA (command)
VARIABLES subcommand,VARIABLES subcommand,VARIABLES subcommand

VARIABLES specifies the variables that may be analyzed in the current CATPCA procedure.

• The VARIABLES subcommand is required.

• At least two variables must be specified, except when the CONFIGURATION subcommand is used with the FIXED keyword.

• The keyword TO on the VARIABLES subcommand refers to the order of variables in the working data file. This behavior of TO is different from the behavior in the variable list in the ANALYSIS subcommand.

Related Topics

CATPCA
Overview (CATPCA command)
Example (CATPCA command)
ANALYSIS Subcommand (CATPCA command)
Level Keyword (CATPCA command)
SPORD and SPNOM Keywords (CATPCA command)
DISCRETIZATION Subcommand (CATPCA command)
GROUPING Keyword (CATPCA command)
NCAT Keyword (CATPCA command)
MISSING Subcommand (CATPCA command)
PASSIVE Keyword (CATPCA command)
ACTIVE Keyword (CATPCA command)
SUPPLEMENTARY Subcommand (CATPCA command)
CONFIGURATION Subcommand (CATPCA command)
DIMENSION Subcommand (CATPCA command)
NORMALIZATION Subcommand (CATPCA command)
MAXITER Subcommand (CATPCA command)
CRITITER Subcommand (CATPCA command)
PRINT Subcommand (CATPCA command)
PLOT Subcommand (CATPCA command)
BIPLOT Keyword (CATPCA command)
SAVE Subcommand (CATPCA command)
OUTFILE Subcommand (CATPCA command)


ANALYSIS Subcommand (CATPCA command)

ANALYSIS (subcommand),ANALYSIS (subcommand),ANALYSIS (subcommand)
CATPCA command,CATPCA command,CATPCA command
CATPCA (command),CATPCA (command),CATPCA (command)
ANALYSIS subcommand,ANALYSIS subcommand,ANALYSIS subcommand

ANALYSIS specifies the variables to be used in the computations, the optimal scaling level, and the variable weight for each variable or variable list. ANALYSIS also specifies supplementary variables and their optimal scaling level. No weight can be specified for supplementary variables.

• At least two variables must be specified, except when the CONFIGURATION subcommand is used with the FIXED keyword.

• All variables on ANALYSIS must be specified on the VARIABLES subcommand.

• The ANALYSIS subcommand is required.

• The keyword TO in the variable list honors the order of variables in the VARIABLES subcommand.

• Optimal scaling levels and variable weights are indicated by the keywords LEVEL and WEIGHT in parentheses following the variable or variable list.

WEIGHT (keyword),WEIGHT (keyword),WEIGHT (keyword)
CATPCA command,CATPCA command,CATPCA command
variable weight,variable weight,variable weight
CATPCA command,CATPCA command,CATPCA command
LEVEL (keyword),LEVEL (keyword),LEVEL (keyword)
CATPCA command,CATPCA command,CATPCA command
optimal scaling level,optimal scaling level,optimal scaling level
CATPCA command,CATPCA command,CATPCA command
WEIGHT | Specifies the variable weight with a positive integer. The default value is 1. If WEIGHT is specified for supplementary variables, it is ignored, and a syntax warning is issued.
LEVEL | Specifies the optimal scaling level.

Related Topics

CATPCA
Overview (CATPCA command)
Example (CATPCA command)
VARIABLES Subcommand (CATPCA command)
Level Keyword (CATPCA command)
SPORD and SPNOM Keywords (CATPCA command)
DISCRETIZATION Subcommand (CATPCA command)
GROUPING Keyword (CATPCA command)
NCAT Keyword (CATPCA command)
MISSING Subcommand (CATPCA command)
PASSIVE Keyword (CATPCA command)
ACTIVE Keyword (CATPCA command)
SUPPLEMENTARY Subcommand (CATPCA command)
CONFIGURATION Subcommand (CATPCA command)
DIMENSION Subcommand (CATPCA command)
NORMALIZATION Subcommand (CATPCA command)
MAXITER Subcommand (CATPCA command)
CRITITER Subcommand (CATPCA command)
PRINT Subcommand (CATPCA command)
PLOT Subcommand (CATPCA command)
BIPLOT Keyword (CATPCA command)
SAVE Subcommand (CATPCA command)
OUTFILE Subcommand (CATPCA command)


Level Keyword (CATPCA command)

SPORD (keyword),SPORD (keyword),SPORD (keyword)
CATPCA command,CATPCA command,CATPCA command
SPNOM (keyword),SPNOM (keyword),SPNOM (keyword)
CATPCA command,CATPCA command,CATPCA command
MNOM (keyword),MNOM (keyword),MNOM (keyword)
CATPCA command,CATPCA command,CATPCA command
ORDI (keyword),ORDI (keyword),ORDI (keyword)
CATPCA command,CATPCA command,CATPCA command
NOMI (keyword),NOMI (keyword),NOMI (keyword)
CATPCA command,CATPCA command,CATPCA command
NUME (keyword),NUME (keyword),NUME (keyword)
CATPCA command,CATPCA command,CATPCA command

The following keywords are used to indicate the optimal scaling level:

SPORD | Spline ordinal (monotonic). This setting is the default. The order of the categories of the observed variable is preserved in the optimally scaled variable. Category points will lie on a straight line (vector) through the origin. The resulting transformation is a smooth monotonic piecewise polynomial of the chosen degree. The pieces are specified by the user-specified number and procedure-determined placement of the interior knots.
SPNOM | Spline nominal (nonmonotonic). The only information in the observed variable that is preserved in the optimally scaled variable is the grouping of objects in categories. The order of the categories of the observed variable is not preserved. Category points will lie on a straight line (vector) through the origin. The resulting transformation is a smooth, possibly nonmonotonic, piecewise polynomial of the chosen degree. The pieces are specified by the user-specified number and procedure-determined placement of the interior knots.
MNOM | Multiple nominal. The only information in the observed variable that is preserved in the optimally scaled variable is the grouping of objects in categories. The order of the categories of the observed variable is not preserved. Category points will be in the centroid of the objects in the particular categories. Multiple indicates that different sets of quantifications are obtained for each dimension.
ORDI | Ordinal. The order of the categories on the observed variable is preserved in the optimally scaled variable. Category points will lie on a straight line (vector) through the origin. The resulting transformation fits better than SPORD transformation but is less smooth.
NOMI | Nominal. The only information in the observed variable that is preserved in the optimally scaled variable is the grouping of objects in categories. The order of the categories of the observed variable is not preserved. Category points will lie on a straight line (vector) through the origin. The resulting transformation fits better than SPNOM transformation but is less smooth.
NUME | Numerical. Categories are treated as equally spaced (interval level). The order of the categories and the equal distances between category numbers of the observed variables are preserved in the optimally scaled variable. Category points will lie on a straight line (vector) through the origin. When all variables are scaled at the numerical level, the CATPCA analysis is analogous to standard principal components analysis.

Related Topics

CATPCA
Overview (CATPCA command)
Example (CATPCA command)
VARIABLES Subcommand (CATPCA command)
ANALYSIS Subcommand (CATPCA command)
SPORD and SPNOM Keywords (CATPCA command)
DISCRETIZATION Subcommand (CATPCA command)
GROUPING Keyword (CATPCA command)
NCAT Keyword (CATPCA command)
MISSING Subcommand (CATPCA command)
PASSIVE Keyword (CATPCA command)
ACTIVE Keyword (CATPCA command)
SUPPLEMENTARY Subcommand (CATPCA command)
CONFIGURATION Subcommand (CATPCA command)
DIMENSION Subcommand (CATPCA command)
NORMALIZATION Subcommand (CATPCA command)
MAXITER Subcommand (CATPCA command)
CRITITER Subcommand (CATPCA command)
PRINT Subcommand (CATPCA command)
PLOT Subcommand (CATPCA command)
BIPLOT Keyword (CATPCA command)
SAVE Subcommand (CATPCA command)
OUTFILE Subcommand (CATPCA command)


SPORD and SPNOM Keywords (CATPCA command)

The following keywords are used with SPORD and SPNOM:

DEGREE (keyword),DEGREE (keyword),DEGREE (keyword)
CATPCA command,CATPCA command,CATPCA command
INKNOT (keyword),INKNOT (keyword),INKNOT (keyword)
CATPCA command,CATPCA command,CATPCA command
DEGREE | The degree of the polynomial. It can be any positive integer. The default degree is 2.
INKNOT | The number of interior knots. The minimum is 0, and the maximum is the number of categories of the variable minus 2. If the specified value is too large, the procedure adjusts the number of interior knots to the maximum. The default number of interior knots is 2.

Related Topics

CATPCA
Overview (CATPCA command)
Example (CATPCA command)
VARIABLES Subcommand (CATPCA command)
ANALYSIS Subcommand (CATPCA command)
Level Keyword (CATPCA command)
DISCRETIZATION Subcommand (CATPCA command)
GROUPING Keyword (CATPCA command)
NCAT Keyword (CATPCA command)
MISSING Subcommand (CATPCA command)
PASSIVE Keyword (CATPCA command)
ACTIVE Keyword (CATPCA command)
SUPPLEMENTARY Subcommand (CATPCA command)
CONFIGURATION Subcommand (CATPCA command)
DIMENSION Subcommand (CATPCA command)
NORMALIZATION Subcommand (CATPCA command)
MAXITER Subcommand (CATPCA command)
CRITITER Subcommand (CATPCA command)
PRINT Subcommand (CATPCA command)
PLOT Subcommand (CATPCA command)
BIPLOT Keyword (CATPCA command)
SAVE Subcommand (CATPCA command)
OUTFILE Subcommand (CATPCA command)


DISCRETIZATION Subcommand (CATPCA command)

DISCRETIZATION (subcommand),DISCRETIZATION (subcommand),DISCRETIZATION (subcommand)
CATPCA command,CATPCA command,CATPCA command
CATPCA (command),CATPCA (command),CATPCA (command)
DISCRETIZATION subcommand,DISCRETIZATION subcommand,DISCRETIZATION subcommand

DISCRETIZATION specifies fractional-value variables that you want to discretize. Also, you can use DISCRETIZATION for ranking or for two ways of recoding categorical variables.

• A string variable’s values are always converted into positive integers, according to the internal numeric representations. DISCRETIZATION for string variables applies to these integers.

• When the DISCRETIZATION subcommand is omitted or used without a variable list, fractional-value variables are converted into positive integers by grouping them into seven categories with a distribution of close to “normal.”

• When no specification is given for variables in a variable list following DISCRETIZATION, these variables are grouped into seven categories with a distribution of close to “normal.”

• In CATPCA, values that are less than 1 are considered to be missing (see MISSING subcommand). However, when discretizing a variable, values that are less than 1 are considered to be valid and are thus included in the discretization process.

GROUPING (keyword),GROUPING (keyword),GROUPING (keyword)
CATPCA command,CATPCA command,CATPCA command
RANKING (keyword),RANKING (keyword),RANKING (keyword)
CATPCA command,CATPCA command,CATPCA command
MULTIPLYING (keyword),MULTIPLYING (keyword),MULTIPLYING (keyword)
CATPCA command,CATPCA command,CATPCA command
GROUPING | Recode into the specified number of categories or recode intervals of equal size into categories.
RANKING | Rank cases. Rank 1 is assigned to the case with the smallest value on the variable.
MULTIPLYING | Multiply the standardized values of a fractional-value variable by 10, round, and add a value such that the lowest value is 1.

Related Topics

CATPCA
Overview (CATPCA command)
Example (CATPCA command)
VARIABLES Subcommand (CATPCA command)
ANALYSIS Subcommand (CATPCA command)
Level Keyword (CATPCA command)
SPORD and SPNOM Keywords (CATPCA command)
GROUPING Keyword (CATPCA command)
NCAT Keyword (CATPCA command)
MISSING Subcommand (CATPCA command)
PASSIVE Keyword (CATPCA command)
ACTIVE Keyword (CATPCA command)
SUPPLEMENTARY Subcommand (CATPCA command)
CONFIGURATION Subcommand (CATPCA command)
DIMENSION Subcommand (CATPCA command)
NORMALIZATION Subcommand (CATPCA command)
MAXITER Subcommand (CATPCA command)
CRITITER Subcommand (CATPCA command)
PRINT Subcommand (CATPCA command)
PLOT Subcommand (CATPCA command)
BIPLOT Keyword (CATPCA command)
SAVE Subcommand (CATPCA command)
OUTFILE Subcommand (CATPCA command)


GROUPING Keyword (CATPCA command)

NCAT (keyword),NCAT (keyword),NCAT (keyword)
CATPCA command,CATPCA command,CATPCA command
NCAT (keyword),NCAT (keyword),NCAT (keyword)
with GROUPING keyword,with GROUPING keyword,with GROUPING keyword
EQINTV (keyword),EQINTV (keyword),EQINTV (keyword)
CATPCA command,CATPCA command,CATPCA command
EQINTV (keyword),EQINTV (keyword),EQINTV (keyword)
with GROUPING keyword,with GROUPING keyword,with GROUPING keyword

GROUPING has the following keywords:

NCAT | Number of categories. When NCAT is not specified, the number of categories is set to 7.
EQINTV | Recode intervals of equal size. The size of the intervals must be specified (no default). The resulting number of categories depends on the interval size.

Related Topics

CATPCA
Overview (CATPCA command)
Example (CATPCA command)
VARIABLES Subcommand (CATPCA command)
ANALYSIS Subcommand (CATPCA command)
Level Keyword (CATPCA command)
SPORD and SPNOM Keywords (CATPCA command)
DISCRETIZATION Subcommand (CATPCA command)
NCAT Keyword (CATPCA command)
MISSING Subcommand (CATPCA command)
PASSIVE Keyword (CATPCA command)
ACTIVE Keyword (CATPCA command)
SUPPLEMENTARY Subcommand (CATPCA command)
CONFIGURATION Subcommand (CATPCA command)
DIMENSION Subcommand (CATPCA command)
NORMALIZATION Subcommand (CATPCA command)
MAXITER Subcommand (CATPCA command)
CRITITER Subcommand (CATPCA command)
PRINT Subcommand (CATPCA command)
PLOT Subcommand (CATPCA command)
BIPLOT Keyword (CATPCA command)
SAVE Subcommand (CATPCA command)
OUTFILE Subcommand (CATPCA command)


NCAT Keyword (CATPCA command)

DISTR (keyword),DISTR (keyword),DISTR (keyword)
CATPCA command,CATPCA command,CATPCA command
NORMAL (keyword),NORMAL (keyword),NORMAL (keyword)
CATPCA command,CATPCA command,CATPCA command
NORMAL (keyword),NORMAL (keyword),NORMAL (keyword)
with DISTR keyword,with DISTR keyword,with DISTR keyword
UNIFORM (keyword),UNIFORM (keyword),UNIFORM (keyword)
CATPCA command,CATPCA command,CATPCA command
UNIFORM (keyword),UNIFORM (keyword),UNIFORM (keyword)
with DISTR keyword,with DISTR keyword,with DISTR keyword

NCAT has the keyword DISTR, which has the following keywords:

NORMAL | Normal distribution. This setting is the default when DISTR is not specified.
UNIFORM | Uniform distribution.

Related Topics

CATPCA
Overview (CATPCA command)
Example (CATPCA command)
VARIABLES Subcommand (CATPCA command)
ANALYSIS Subcommand (CATPCA command)
Level Keyword (CATPCA command)
SPORD and SPNOM Keywords (CATPCA command)
DISCRETIZATION Subcommand (CATPCA command)
GROUPING Keyword (CATPCA command)
MISSING Subcommand (CATPCA command)
PASSIVE Keyword (CATPCA command)
ACTIVE Keyword (CATPCA command)
SUPPLEMENTARY Subcommand (CATPCA command)
CONFIGURATION Subcommand (CATPCA command)
DIMENSION Subcommand (CATPCA command)
NORMALIZATION Subcommand (CATPCA command)
MAXITER Subcommand (CATPCA command)
CRITITER Subcommand (CATPCA command)
PRINT Subcommand (CATPCA command)
PLOT Subcommand (CATPCA command)
BIPLOT Keyword (CATPCA command)
SAVE Subcommand (CATPCA command)
OUTFILE Subcommand (CATPCA command)


MISSING Subcommand (CATPCA command)

MISSING (subcommand),MISSING (subcommand),MISSING (subcommand)
CATPCA command,CATPCA command,CATPCA command
CATPCA (command),CATPCA (command),CATPCA (command)
MISSING subcommand,MISSING subcommand,MISSING subcommand
missing values,missing values,missing values
CATPCA command,CATPCA command,CATPCA command

In CATPCA, we consider a system-missing value, user-defined missing values, and values that are less than 1 as missing values. The MISSING subcommand allows you to indicate how to handle missing values for each variable.

PASSIVE (keyword),PASSIVE (keyword),PASSIVE (keyword)
CATPCA command,CATPCA command,CATPCA command
ACTIVE (keyword),ACTIVE (keyword),ACTIVE (keyword)
CATPCA command,CATPCA command,CATPCA command
LISTWISE (keyword),LISTWISE (keyword),LISTWISE (keyword)
CATPCA command,CATPCA command,CATPCA command
PASSIVE | Exclude missing values on a variable from analysis. This setting is the default when MISSING is not specified. Passive treatment of missing values means that in optimizing the quantification of a variable, only objects with nonmissing values on the variable are involved and that only the nonmissing values of variables contribute to the solution. Thus, when PASSIVE is specified, missing values do not affect the analysis. Further, if all variables are given passive treatment of missing values, objects with missing values on every variable are treated as supplementary.
ACTIVE | Impute missing values. You can choose to use mode imputation. You can also consider objects with missing values on a variable as belonging to the same category and impute missing values with an extra category indicator.
LISTWISE | Exclude cases with missing values on a variable. The cases that are used in the analysis are cases without missing values on the specified variables. Also, any variable that is not included in the subcommand receives this specification.

• The ALL keyword may be used to indicate all variables. If ALL is used, it must be the only variable specification.

• A mode or extracat imputation is done before listwise deletion.

Related Topics

CATPCA
Overview (CATPCA command)
Example (CATPCA command)
VARIABLES Subcommand (CATPCA command)
ANALYSIS Subcommand (CATPCA command)
Level Keyword (CATPCA command)
SPORD and SPNOM Keywords (CATPCA command)
DISCRETIZATION Subcommand (CATPCA command)
GROUPING Keyword (CATPCA command)
NCAT Keyword (CATPCA command)
PASSIVE Keyword (CATPCA command)
ACTIVE Keyword (CATPCA command)
SUPPLEMENTARY Subcommand (CATPCA command)
CONFIGURATION Subcommand (CATPCA command)
DIMENSION Subcommand (CATPCA command)
NORMALIZATION Subcommand (CATPCA command)
MAXITER Subcommand (CATPCA command)
CRITITER Subcommand (CATPCA command)
PRINT Subcommand (CATPCA command)
PLOT Subcommand (CATPCA command)
BIPLOT Keyword (CATPCA command)
SAVE Subcommand (CATPCA command)
OUTFILE Subcommand (CATPCA command)


PASSIVE Keyword (CATPCA command)

If correlations are requested on the PRINT subcommand, and passive treatment of missing values is specified for a variable, the missing values must be imputed. For the correlations of the quantified variables, you can specify the imputation with one of the following keywords:

MODEIMPU (keyword),MODEIMPU (keyword),MODEIMPU (keyword)
CATPCA command,CATPCA command,CATPCA command
MODEIMPU (keyword),MODEIMPU (keyword),MODEIMPU (keyword)
with PASSIVE keyword,with PASSIVE keyword,with PASSIVE keyword
EXTRACAT (keyword),EXTRACAT (keyword),EXTRACAT (keyword)
CATPCA command,CATPCA command,CATPCA command
EXTRACAT (keyword),EXTRACAT (keyword),EXTRACAT (keyword)
with PASSIVE keyword,with PASSIVE keyword,with PASSIVE keyword
MODEIMPU | Impute missing values on a variable with the mode of the quantified variable. MODEIMPU is the default.
EXTRACAT | Impute missing values on a variable with the quantification of an extra category. This treatment implies that objects with a missing value are considered to belong to the same (extra) category.

Note that with passive treatment of missing values, imputation applies only to correlations and is done afterward. Thus, the imputation has no effect on the quantification or the solution.

Related Topics

CATPCA
Overview (CATPCA command)
Example (CATPCA command)
VARIABLES Subcommand (CATPCA command)
ANALYSIS Subcommand (CATPCA command)
Level Keyword (CATPCA command)
SPORD and SPNOM Keywords (CATPCA command)
DISCRETIZATION Subcommand (CATPCA command)
GROUPING Keyword (CATPCA command)
NCAT Keyword (CATPCA command)
MISSING Subcommand (CATPCA command)
ACTIVE Keyword (CATPCA command)
SUPPLEMENTARY Subcommand (CATPCA command)
CONFIGURATION Subcommand (CATPCA command)
DIMENSION Subcommand (CATPCA command)
NORMALIZATION Subcommand (CATPCA command)
MAXITER Subcommand (CATPCA command)
CRITITER Subcommand (CATPCA command)
PRINT Subcommand (CATPCA command)
PLOT Subcommand (CATPCA command)
BIPLOT Keyword (CATPCA command)
SAVE Subcommand (CATPCA command)
OUTFILE Subcommand (CATPCA command)


ACTIVE Keyword (CATPCA command)

The ACTIVE keyword has the following keywords:

MODEIMPU (keyword),MODEIMPU (keyword),MODEIMPU (keyword)
CATPCA command,CATPCA command,CATPCA command
MODEIMPU (keyword),MODEIMPU (keyword),MODEIMPU (keyword)
with ACTIVE keyword,with ACTIVE keyword,with ACTIVE keyword
EXTRACAT (keyword),EXTRACAT (keyword),EXTRACAT (keyword)
CATPCA command,CATPCA command,CATPCA command
EXTRACAT (keyword),EXTRACAT (keyword),EXTRACAT (keyword)
with ACTIVE keyword,with ACTIVE keyword,with ACTIVE keyword
MODEIMPU | Impute missing values on a variable with the most frequent category (mode). When there are multiple modes, the smallest category indicator is used. MODEIMPU is the default.
EXTRACAT | Impute missing values on a variable with an extra category indicator. This implies that objects with a missing value are considered to belong to the same (extra) category.

Note that with active treatment of missing values, imputation is done before the analysis starts and thus will affect the quantification and the solution.

Related Topics

CATPCA
Overview (CATPCA command)
Example (CATPCA command)
VARIABLES Subcommand (CATPCA command)
ANALYSIS Subcommand (CATPCA command)
Level Keyword (CATPCA command)
SPORD and SPNOM Keywords (CATPCA command)
DISCRETIZATION Subcommand (CATPCA command)
GROUPING Keyword (CATPCA command)
NCAT Keyword (CATPCA command)
MISSING Subcommand (CATPCA command)
PASSIVE Keyword (CATPCA command)
SUPPLEMENTARY Subcommand (CATPCA command)
CONFIGURATION Subcommand (CATPCA command)
DIMENSION Subcommand (CATPCA command)
NORMALIZATION Subcommand (CATPCA command)
MAXITER Subcommand (CATPCA command)
CRITITER Subcommand (CATPCA command)
PRINT Subcommand (CATPCA command)
PLOT Subcommand (CATPCA command)
BIPLOT Keyword (CATPCA command)
SAVE Subcommand (CATPCA command)
OUTFILE Subcommand (CATPCA command)


SUPPLEMENTARY Subcommand (CATPCA command)

SUPPLEMENTARY (subcommand),SUPPLEMENTARY (subcommand),SUPPLEMENTARY (subcommand)
CATPCA command,CATPCA command,CATPCA command
CATPCA (command),CATPCA (command),CATPCA (command)
SUPPLEMENTARY subcommand,SUPPLEMENTARY subcommand,SUPPLEMENTARY subcommand

The SUPPLEMENTARY subcommand specifies the objects and/or variables that you want to treat as supplementary. Supplementary variables must be found in the ANALYSIS subcommand. You cannot weight supplementary objects and variables (specified weights are ignored). For supplementary variables, all options on the MISSING subcommand can be specified except LISTWISE.

OBJECT (keyword),OBJECT (keyword),OBJECT (keyword)
CATPCA command,CATPCA command,CATPCA command
VARIABLE (keyword),VARIABLE (keyword),VARIABLE (keyword)
CATPCA command,CATPCA command,CATPCA command
OBJECT | Objects that you want to treat as supplementary are indicated with an object number list in parentheses following OBJECT. The keyword TO is allowed. The OBJECT specification is not allowed when CONFIGURATION = FIXED.
VARIABLE | Variables that you want to treat as supplementary are indicated with a variable list in parentheses following VARIABLE. The keyword TO is allowed and honors the order of variables in the VARIABLES subcommand. The VARIABLE specification is ignored when CONFIGURATION = FIXED, because in that case all variables in the ANALYSIS subcommand are automatically treated as supplementary variables.

Related Topics

CATPCA
Overview (CATPCA command)
Example (CATPCA command)
VARIABLES Subcommand (CATPCA command)
ANALYSIS Subcommand (CATPCA command)
Level Keyword (CATPCA command)
SPORD and SPNOM Keywords (CATPCA command)
DISCRETIZATION Subcommand (CATPCA command)
GROUPING Keyword (CATPCA command)
NCAT Keyword (CATPCA command)
MISSING Subcommand (CATPCA command)
PASSIVE Keyword (CATPCA command)
ACTIVE Keyword (CATPCA command)
CONFIGURATION Subcommand (CATPCA command)
DIMENSION Subcommand (CATPCA command)
NORMALIZATION Subcommand (CATPCA command)
MAXITER Subcommand (CATPCA command)
CRITITER Subcommand (CATPCA command)
PRINT Subcommand (CATPCA command)
PLOT Subcommand (CATPCA command)
BIPLOT Keyword (CATPCA command)
SAVE Subcommand (CATPCA command)
OUTFILE Subcommand (CATPCA command)


CONFIGURATION Subcommand (CATPCA command)

CONFIGURATION (subcommand),CONFIGURATION (subcommand),CONFIGURATION (subcommand)
CATPCA command,CATPCA command,CATPCA command
CATPCA (command),CATPCA (command),CATPCA (command)
CONFIGURATION subcommand,CONFIGURATION subcommand,CONFIGURATION subcommand

The CONFIGURATION subcommand allows you to read data from a file containing the coordinates of a configuration. The first variable in this file should contain the coordinates for the first dimension, the second variable should contain the coordinates for the second dimension, and so forth.

INITIAL (keyword),INITIAL (keyword),INITIAL (keyword)
CATPCA command,CATPCA command,CATPCA command
FIXED (keyword),FIXED (keyword),FIXED (keyword)
CATPCA command,CATPCA command,CATPCA command
INITIAL(file) | Use the configuration in the external file as the starting point of the analysis.
FIXED(file) | Fit variables in the fixed configuration that is found in the external file. The variables to fit in should be specified on the ANALYSIS subcommand but will be treated as supplementary. The SUPPLEMENTARY subcommand and variable weights are ignored.

Related Topics

CATPCA
Overview (CATPCA command)
Example (CATPCA command)
VARIABLES Subcommand (CATPCA command)
ANALYSIS Subcommand (CATPCA command)
Level Keyword (CATPCA command)
SPORD and SPNOM Keywords (CATPCA command)
DISCRETIZATION Subcommand (CATPCA command)
GROUPING Keyword (CATPCA command)
NCAT Keyword (CATPCA command)
MISSING Subcommand (CATPCA command)
PASSIVE Keyword (CATPCA command)
ACTIVE Keyword (CATPCA command)
SUPPLEMENTARY Subcommand (CATPCA command)
DIMENSION Subcommand (CATPCA command)
NORMALIZATION Subcommand (CATPCA command)
MAXITER Subcommand (CATPCA command)
CRITITER Subcommand (CATPCA command)
PRINT Subcommand (CATPCA command)
PLOT Subcommand (CATPCA command)
BIPLOT Keyword (CATPCA command)
SAVE Subcommand (CATPCA command)
OUTFILE Subcommand (CATPCA command)


DIMENSION Subcommand (CATPCA command)

DIMENSION (subcommand),DIMENSION (subcommand),DIMENSION (subcommand)
CATPCA command,CATPCA command,CATPCA command
CATPCA (command),CATPCA (command),CATPCA (command)
DIMENSION subcommand,DIMENSION subcommand,DIMENSION subcommand

DIMENSION specifies the number of dimensions (components) that you want CATPCA to compute.

• The default number of dimensions is 2.

• DIMENSION is followed by an integer indicating the number of dimensions.

• If there are no variables specified as MNOM (multiple nominal), the maximum number of dimensions that you can specify is the smaller of the number of observations minus 1 and the total number of variables.

• If some or all of the variables are specified as MNOM (multiple nominal), the maximum number of dimensions is the smaller of a) the number of observations minus 1 and b) the total number of valid MNOM variable levels (categories) plus the number of SPORD, SPNOM, ORDI, NOMI, and NUME variables minus the number of MNOM variables (if the MNOM variables do not have missing values to be treated as passive). If there are MNOM variables with missing values to be treated as passive, the maximum number of dimensions is the smaller of a) the number of observations minus 1 and b) the total number of valid MNOM variable levels (categories) plus the number of SPORD, SPNOM, ORDI, NOMI, and NUME variables, minus the larger of c) 1 and d) the number of MNOM variables without missing values to be treated as passive.

• If the specified value is too large, CATPCA adjusts the number of dimensions to the maximum.

• The minimum number of dimensions is 1.

Related Topics

CATPCA
Overview (CATPCA command)
Example (CATPCA command)
VARIABLES Subcommand (CATPCA command)
ANALYSIS Subcommand (CATPCA command)
Level Keyword (CATPCA command)
SPORD and SPNOM Keywords (CATPCA command)
DISCRETIZATION Subcommand (CATPCA command)
GROUPING Keyword (CATPCA command)
NCAT Keyword (CATPCA command)
MISSING Subcommand (CATPCA command)
PASSIVE Keyword (CATPCA command)
ACTIVE Keyword (CATPCA command)
SUPPLEMENTARY Subcommand (CATPCA command)
CONFIGURATION Subcommand (CATPCA command)
NORMALIZATION Subcommand (CATPCA command)
MAXITER Subcommand (CATPCA command)
CRITITER Subcommand (CATPCA command)
PRINT Subcommand (CATPCA command)
PLOT Subcommand (CATPCA command)
BIPLOT Keyword (CATPCA command)
SAVE Subcommand (CATPCA command)
OUTFILE Subcommand (CATPCA command)


NORMALIZATION Subcommand (CATPCA command)

NORMALIZATION (subcommand),NORMALIZATION (subcommand),NORMALIZATION (subcommand)
CATPCA command,CATPCA command,CATPCA command
CATPCA (command),CATPCA (command),CATPCA (command)
NORMALIZATION subcommand,NORMALIZATION subcommand,NORMALIZATION subcommand

The NORMALIZATION subcommand specifies one of five options for normalizing the object scores and the variables. Only one normalization method can be used in a given analysis.

VPRINCIPAL (keyword),VPRINCIPAL (keyword),VPRINCIPAL (keyword)
CATPCA command,CATPCA command,CATPCA command
OPRINCIPAL (keyword),OPRINCIPAL (keyword),OPRINCIPAL (keyword)
CATPCA command,CATPCA command,CATPCA command
SYMMETRICAL (keyword),SYMMETRICAL (keyword),SYMMETRICAL (keyword)
CATPCA command,CATPCA command,CATPCA command
INDEPENDENT (keyword),INDEPENDENT (keyword),INDEPENDENT (keyword)
CATPCA command,CATPCA command,CATPCA command
VPRINCIPAL | This option optimizes the association between variables. With VPRINCIPAL, the coordinates of the variables in the object space are the component loadings (correlations with object scores) for SPORD, SPNOM, ORDI, NOMI, and NUME variables, and the centroids for MNOM variables. This setting is the default if the NORMALIZATION subcommand is not specified. This setting is useful when you are primarily interested in the correlations between the variables.
OPRINCIPAL | This option optimizes distances between objects. This setting is useful when you are primarily interested in differences or similarities between the objects.
SYMMETRICAL | Use this normalization option if you are primarily interested in the relation between objects and variables.
INDEPENDENT | Use this normalization option if you want to examine distances between objects and correlations between variables separately.

The fifth method allows the user to specify any real value in the closed interval [−1, 1]. A value of 1 is equal to the OPRINCIPAL method, a value of 0 is equal to the SYMMETRICAL method, and a value of −1 is equal to the VPRINCIPAL method. By specifying a value that is greater than −1 and less than 1, the user can spread the eigenvalue over both objects and variables. This method is useful for making a tailor-made biplot or triplot. If the user specifies a value outside of this interval, the procedure issues a syntax error message and terminates.

Related Topics

CATPCA
Overview (CATPCA command)
Example (CATPCA command)
VARIABLES Subcommand (CATPCA command)
ANALYSIS Subcommand (CATPCA command)
Level Keyword (CATPCA command)
SPORD and SPNOM Keywords (CATPCA command)
DISCRETIZATION Subcommand (CATPCA command)
GROUPING Keyword (CATPCA command)
NCAT Keyword (CATPCA command)
MISSING Subcommand (CATPCA command)
PASSIVE Keyword (CATPCA command)
ACTIVE Keyword (CATPCA command)
SUPPLEMENTARY Subcommand (CATPCA command)
CONFIGURATION Subcommand (CATPCA command)
DIMENSION Subcommand (CATPCA command)
MAXITER Subcommand (CATPCA command)
CRITITER Subcommand (CATPCA command)
PRINT Subcommand (CATPCA command)
PLOT Subcommand (CATPCA command)
BIPLOT Keyword (CATPCA command)
SAVE Subcommand (CATPCA command)
OUTFILE Subcommand (CATPCA command)


MAXITER Subcommand (CATPCA command)

MAXITER (subcommand),MAXITER (subcommand),MAXITER (subcommand)
CATPCA command,CATPCA command,CATPCA command
CATPCA (command),CATPCA (command),CATPCA (command)
MAXITER subcommand,MAXITER subcommand,MAXITER subcommand

MAXITER specifies the maximum number of iterations that the procedure can go through in its computations. If not all variables are specified as NUME and/or MNOM, the output starts from iteration 0, which is the last iteration of the initial phase, in which all variables except MNOM variables are treated as NUME.

• If MAXITER is not specified, the maximum number of iterations is 100.

• The specification on MAXITER is a positive integer indicating the maximum number of iterations. There is no uniquely predetermined (that is, hard-coded) maximum for the value that can be used.

Related Topics

CATPCA
Overview (CATPCA command)
Example (CATPCA command)
VARIABLES Subcommand (CATPCA command)
ANALYSIS Subcommand (CATPCA command)
Level Keyword (CATPCA command)
SPORD and SPNOM Keywords (CATPCA command)
DISCRETIZATION Subcommand (CATPCA command)
GROUPING Keyword (CATPCA command)
NCAT Keyword (CATPCA command)
MISSING Subcommand (CATPCA command)
PASSIVE Keyword (CATPCA command)
ACTIVE Keyword (CATPCA command)
SUPPLEMENTARY Subcommand (CATPCA command)
CONFIGURATION Subcommand (CATPCA command)
DIMENSION Subcommand (CATPCA command)
NORMALIZATION Subcommand (CATPCA command)
CRITITER Subcommand (CATPCA command)
PRINT Subcommand (CATPCA command)
PLOT Subcommand (CATPCA command)
BIPLOT Keyword (CATPCA command)
SAVE Subcommand (CATPCA command)
OUTFILE Subcommand (CATPCA command)


CRITITER Subcommand (CATPCA command)

CRITITER (subcommand),CRITITER (subcommand),CRITITER (subcommand)
CATPCA command,CATPCA command,CATPCA command
CATPCA (command),CATPCA (command),CATPCA (command)
CRITITER subcommand,CRITITER subcommand,CRITITER subcommand

CRITITER specifies a convergence criterion value. CATPCA stops iterating if the difference in fit between the last two iterations is less than the CRITITER value.

• If CRITITER is not specified, the convergence value is 0.00001.

• The specification on CRITITER is any positive value.

Related Topics

CATPCA
Overview (CATPCA command)
Example (CATPCA command)
VARIABLES Subcommand (CATPCA command)
ANALYSIS Subcommand (CATPCA command)
Level Keyword (CATPCA command)
SPORD and SPNOM Keywords (CATPCA command)
DISCRETIZATION Subcommand (CATPCA command)
GROUPING Keyword (CATPCA command)
NCAT Keyword (CATPCA command)
MISSING Subcommand (CATPCA command)
PASSIVE Keyword (CATPCA command)
ACTIVE Keyword (CATPCA command)
SUPPLEMENTARY Subcommand (CATPCA command)
CONFIGURATION Subcommand (CATPCA command)
DIMENSION Subcommand (CATPCA command)
NORMALIZATION Subcommand (CATPCA command)
MAXITER Subcommand (CATPCA command)
PRINT Subcommand (CATPCA command)
PLOT Subcommand (CATPCA command)
BIPLOT Keyword (CATPCA command)
SAVE Subcommand (CATPCA command)
OUTFILE Subcommand (CATPCA command)


PRINT Subcommand (CATPCA command)

PRINT (subcommand),PRINT (subcommand),PRINT (subcommand)
CATPCA command,CATPCA command,CATPCA command
CATPCA (command),CATPCA (command),CATPCA (command)
PRINT subcommand,PRINT subcommand,PRINT subcommand

The Model Summary (Cronbach's alpha and Variance Accounted For) and the HISTORY statistics (the variance accounted for, the loss, and the increase in variance accounted for) for the initial solution (if applicable) and last iteration are always displayed. That is, they cannot be controlled by the PRINT subcommand. The PRINT subcommand controls the display of additional optional output. The output of the procedure is based on the transformed variables. However, the keyword OCORR can be used to request the correlations of the original variables, as well.

The default keywords are DESCRIP, LOADING, and CORR. However, when some keywords are specified, the default is nullified and only what was specified comes into effect. If a keyword is duplicated or if a contradicting keyword is encountered, the last specified keyword silently becomes effective (in case of contradicting use of NONE, only the keywords following NONE are effective). An example is as follows:

/PRINT <=> /PRINT = DESCRIP LOADING CORR

/PRINT = VAF VAF <=> /PRINT = VAF

/PRINT = VAF NONE CORR <=> /PRINT = CORR

If a keyword that can be followed by a variable list is duplicated, a syntax error occurs, and the procedure will terminate.

The following keywords can be specified:

DESCRIP (keyword),DESCRIP (keyword),DESCRIP (keyword)
CATPCA command,CATPCA command,CATPCA command
VAF (keyword),VAF (keyword),VAF (keyword)
CATPCA command,CATPCA command,CATPCA command
variance accounted for,variance accounted for,variance accounted for
CATPCA command,CATPCA command,CATPCA command
LOADING (keyword),LOADING (keyword),LOADING (keyword)
CATPCA command,CATPCA command,CATPCA command
component loadings,component loadings,component loadings
CATPCA command,CATPCA command,CATPCA command
QUANT (keyword),QUANT (keyword),QUANT (keyword)
CATPCA command,CATPCA command,CATPCA command
category quantifications,category quantifications,category quantifications
CATPCA command,CATPCA command,CATPCA command
HISTORY (keyword),HISTORY (keyword),HISTORY (keyword)
CATPCA command,CATPCA command,CATPCA command
iteration history,iteration history,iteration history
CATPCA command,CATPCA command,CATPCA command
CORR (keyword),CORR (keyword),CORR (keyword)
CATPCA command,CATPCA command,CATPCA command
correlation matrix,correlation matrix,correlation matrix
CATPCA command,CATPCA command,CATPCA command
OCORR (keyword),OCORR (keyword),OCORR (keyword)
CATPCA command,CATPCA command,CATPCA command
correlation matrix,correlation matrix,correlation matrix
CATPCA command,CATPCA command,CATPCA command
OBJECT (keyword),OBJECT (keyword),OBJECT (keyword)
CATPCA command,CATPCA command,CATPCA command
object scores,object scores,object scores
CATPCA command,CATPCA command,CATPCA command
NONE (keyword),NONE (keyword),NONE (keyword)
CATPCA command,CATPCA command,CATPCA command
DESCRIP(varlist) | Descriptive statistics (frequencies, missing values, and mode). The variables in the varlist must be specified on the VARIABLES subcommand but need not appear on the ANALYSIS subcommand. If DESCRIP is not followed by a varlist, descriptives tables are displayed for all variables in the varlist on the ANALYSIS subcommand.
VAF | Variance accounted for (centroid coordinates, vector coordinates, and total) per variable and per dimension.
LOADING | Component loadings for variables with optimal scaling level that result in vector quantification (that is, SPORD, SPNOM, ORDI, NOMI, and NUME).
QUANT(varlist) | Category quantifications and category coordinates for each dimension. Any variable in the ANALYSIS subcommand may be specified in parentheses after QUANT. (For MNOM variables, the coordinates are the quantifications.) If QUANT is not followed by a variable list, quantification tables are displayed for all variables in the varlist on the ANALYSIS subcommand.
HISTORY | History of iterations. For each iteration (including 0, if applicable), the variance accounted for, the loss (variance not accounted for), and the increase in variance accounted for are shown.
CORR | Correlations of the transformed variables and the eigenvalues of this correlation matrix. If the analysis includes variables with optimal scaling level MNOM, ndim (the number of dimensions in the analysis) correlation matrices are computed; in the ith matrix, the quantifications of dimension i, i = 1, ... ndim, of MNOM variables are used to compute the correlations. For variables with missing values specified to be treated as PASSIVE on the MISSING subcommand, the missing values are imputed according to the specification on the PASSIVE keyword (if no specification is made, mode imputation is used).
OCORR | Correlations of the original variables and the eigenvalues of this correlation matrix. For variables with missing values specified to be treated as PASSIVE on the MISSING subcommand, the missing values are imputed with the variable mode.
OBJECT((varname)varlist) | Object scores (component scores). Following the keyword, a varlist can be given in parentheses to display variables (category indicators), along with object scores. If you want to use a variable to label the objects, this variable must occur in parentheses as the first variable in the varlist. If no labeling variable is specified, the objects are labeled with case numbers. The variables to display, along with the object scores and the variable to label the objects, must be specified on the VARIABLES subcommand but need not appear on the ANALYSIS subcommand. If no variable list is given, only the object scores are displayed.
NONE | No optional output is displayed. The only output that is shown is the model summary and the HISTORY statistics for the initial iteration (if applicable) and last iteration.

The keyword TO in a variable list can only be used with variables that are in the ANALYSIS subcommand, and TO applies only to the order of the variables in the ANALYSIS subcommand. For variables that are in the VARIABLES subcommand but not in the ANALYSIS subcommand, the keyword TO cannot be used. For example, if /VARIABLES = v1 TO v5 and /ANALYSIS = v2 v1 v4, then /PLOT OBJECT(v1 TO v4) will give two object plots (one plot labeled with v1 and one plot labeled with v4).

Related Topics

CATPCA
Overview (CATPCA command)
Example (CATPCA command)
VARIABLES Subcommand (CATPCA command)
ANALYSIS Subcommand (CATPCA command)
Level Keyword (CATPCA command)
SPORD and SPNOM Keywords (CATPCA command)
DISCRETIZATION Subcommand (CATPCA command)
GROUPING Keyword (CATPCA command)
NCAT Keyword (CATPCA command)
MISSING Subcommand (CATPCA command)
PASSIVE Keyword (CATPCA command)
ACTIVE Keyword (CATPCA command)
SUPPLEMENTARY Subcommand (CATPCA command)
CONFIGURATION Subcommand (CATPCA command)
DIMENSION Subcommand (CATPCA command)
NORMALIZATION Subcommand (CATPCA command)
MAXITER Subcommand (CATPCA command)
CRITITER Subcommand (CATPCA command)
PLOT Subcommand (CATPCA command)
BIPLOT Keyword (CATPCA command)
SAVE Subcommand (CATPCA command)
OUTFILE Subcommand (CATPCA command)


PLOT Subcommand (CATPCA command)

PLOT (subcommand),PLOT (subcommand),PLOT (subcommand)
CATPCA command,CATPCA command,CATPCA command
CATPCA (command),CATPCA (command),CATPCA (command)
PLOT subcommand,PLOT subcommand,PLOT subcommand

The PLOT subcommand controls the display of plots. The default keywords are OBJECT and LOADING. That is, the two keywords are in effect when the PLOT subcommand is omitted or when the PLOT subcommand is given without any keyword. If a keyword is duplicated (for example, /PLOT = RESID RESID), only the last keyword is effective. If the keyword NONE is used with other keywords (for example, /PLOT = RESID NONE LOADING), only the keywords following NONE are effective. When keywords contradict, the later keyword overwrites the earlier keywords.

• All the variables to be plotted must be specified on the ANALYSIS subcommand.

• If the variable list following the keywords CATEGORIES, TRANS, RESID, and PROJCENTR is empty, it will cause a syntax error, and the procedure will terminate.

• The variables in the variable list for labeling the object point following OBJECT, BIPLOT, and TRIPLOT must be specified on the VARIABLES subcommand but need not appear on the ANALYSIS subcommand. This flexibility means that variables that are not included in the analysis can still be used to label plots.

• The keyword TO in a variable list can only be used with variables that are in the ANALYSIS subcommand, and TO applies only to the order of the variables in the ANALYSIS subcommand. For variables that are in the VARIABLES subcommand but not in the ANALYSIS subcommand, the keyword TO cannot be used. For example, if /VARIABLES = v1 TO v5 and /ANALYSIS = v2 v1 v4, then /PLOT OBJECT(v1 TO v4) will give two object plots, one plot labeled with v1 and one plot labeled with v4.

• For multidimensional plots, all of the dimensions in the solution are produced in a matrix scatterplot if the number of dimensions in the solution is greater than 2 and the NDIM plot keyword is not specified; if the number of dimensions in the solution is 2, a scatterplot is produced.

The following keywords can be specified:

OBJECT (keyword),OBJECT (keyword),OBJECT (keyword)
CATPCA command,CATPCA command,CATPCA command
object points plots,object points plots,object points plots
CATPCA command,CATPCA command,CATPCA command
CATEGORY (keyword),CATEGORY (keyword),CATEGORY (keyword)
CATPCA command,CATPCA command,CATPCA command
category plots,category plots,category plots
CATPCA command,CATPCA command,CATPCA command
LOADING (keyword),LOADING (keyword),LOADING (keyword)
CATPCA command,CATPCA command,CATPCA command
component loadings plots,component loadings plots,component loadings plots
CATPCA command,CATPCA command,CATPCA command
TRANS (keyword),TRANS (keyword),TRANS (keyword)
CATPCA command,CATPCA command,CATPCA command
transformation plots,transformation plots,transformation plots
CATPCA command,CATPCA command,CATPCA command
RESID (keyword),RESID (keyword),RESID (keyword)
CATPCA command,CATPCA command,CATPCA command
residual plots,residual plots,residual plots
CATPCA command,CATPCA command,CATPCA command
BIPLOT (keyword),BIPLOT (keyword),BIPLOT (keyword)
CATPCA command,CATPCA command,CATPCA command
biplots,biplots,biplots
CATPCA command,CATPCA command,CATPCA command
TRIPLOT (keyword),TRIPLOT (keyword),TRIPLOT (keyword)
CATPCA command,CATPCA command,CATPCA command
triplots,triplots,triplots
CATPCA command,CATPCA command,CATPCA command
JOINTCAT(keyword),JOINTCAT(keyword),JOINTCAT(keyword)
CATPCA command,CATPCA command,CATPCA command
joint category plots,joint category plots,joint category plots
CATPCA command,CATPCA command,CATPCA command
PROJCENTR(keyword),PROJCENTR(keyword),PROJCENTR(keyword)
CATPCA command,CATPCA command,CATPCA command
projected centroids plots,projected centroids plots,projected centroids plots
CATPCA command,CATPCA command,CATPCA command
NONE (keyword),NONE (keyword),NONE (keyword)
CATPCA command,CATPCA command,CATPCA command
OBJECT(varlist)(n) | Plots of the object points. Following the keyword, a list of variables in parentheses can be given to indicate that plots of object points labeled with the categories of the variables should be produced (one plot for each variable). The variables to label the objects must be specified on the VARIABLES subcommand but need not appear on the ANALYSIS subcommand. If the variable list is omitted, a plot that is labeled with case numbers is produced.
CATEGORY(varlist)(n) | Plots of the category points. Both the centroid coordinates and the vector coordinates are plotted. A list of variables must be given in parentheses following the keyword. For variables with optimal scaling level MNOM, categories are in the centroids of the objects in the particular categories. For all other optimal scaling levels, categories are on a vector through the origin.
LOADING(varlist (CENTR(varlist)))(l) | Plot of the component loadings optionally with centroids. By default, all variables with an optimal scaling level that results in vector quantification (that is, SPORD, SPNOM, ORDI, NOMI, and NUME) are included in this plot. LOADING can be followed by a varlist to select the loadings to include in the plot. When "LOADING(" or the varlist following "LOADING(" is followed by the keyword CENTR in parentheses, centroids are included in the plot for all variables with optimal scaling level MNOM. CENTR can be followed by a varlist in parentheses to select MNOM variables whose centroids are to be included in the plot. When all variables have the MNOM scaling level, this plot cannot be produced.
TRANS(varlist(n))(n) | Transformation plots per variable (optimal category quantifications against category indicators). Following the keyword, a list of variables in parentheses must be given. MNOM variables in the varlist can be followed by a number of dimensions in parentheses to indicate that you want to display p transformation plots, one plot for each of the first p dimensions. If the number of dimensions is not specified, a plot for the first dimension is produced.
RESID(varlist(n))(n) | Plot of residuals per variable (approximation against optimal category quantifications). Following the keyword, a list of variables in parentheses must be given. MNOM variables in the varlist can be followed by a number of dimensions in parentheses to indicate that you want to display p residual plots, one plot for each of the first p dimensions. If the number of dimensions is not specified, a plot for the first dimension is produced.
BIPLOT(keyword(varlist)) (varlist)(n) | Plot of objects and variables. The coordinates for the variables can be chosen to be component loading or centroids, using the LOADING or CENTR keyword in parentheses following BIPLOT. When no keyword is given, component loadings are plotted. When NORMALIZATION = INDEPENDENT, this plot is incorrect and therefore not available. Following LOADING or CENTR, a list of variables in parentheses can be given to indicate the variables to be included in the plot. If the variable list is omitted, a plot including all variables is produced. Following BIPLOT, a list of variables in parentheses can be given to indicate that plots with objects that are labeled with the categories of the variables should be produced (one plot for each variable). The variables to label the objects must be specified on the VARIABLES subcommand but need not appear on the ANALYSIS subcommand. If the variable list is omitted, a plot with objects labeled with case numbers is produced.
TRIPLOT(varlist(varlist))(n) | A plot of object points, component loadings for variables with an optimal scaling level that results in vector quantification (that is, SPORD, SPNOM, ORDI, NOMI, and NUME), and centroids for variables with optimal scaling level MNOM. Following the keyword, a list of variables in parentheses can be given to indicate the variables to include in the plot. If the variable list is omitted, all variables are included. The varlist can contain a second varlist in parentheses to indicate that triplots with objects labeled with the categories of the variables in this variable list should be produced (one plot for each variable). The variables to label the objects must be specified on the VARIABLES subcommand but need not appear on the ANALYSIS subcommand. If this second variable list is omitted, a plot with objects labeled with case numbers is produced. When NORMALIZATION = INDEPENDENT, this plot is incorrect and therefore not available.
JOINTCAT(varlist)(n) | Joint plot of the category points for the variables in the varlist. If no varlist is given, the category points for all variables are displayed.
PROJCENTR(varname, varlist)(n) | Plot of the centroids of a variable projected on each of the variables in the varlist. You cannot project centroids of a variable on variables with MNOM optimal scaling level; thus, a variable that has MNOM optimal scaling level can be specified as the variable to be projected but not in the list of variables to be projected on. When this plot is requested, a table with the coordinates of the projected centroids is also displayed.
NONE | No plots.

• For all keywords except NONE, the user can specify an optional parameter l in parentheses after the variable list in order to control the global upper boundary of variable name/label and value label lengths in the plot. Note that this boundary is applied uniformly to all variables in the list. The label length parameter l can take any non-negative integer that is less than or equal to the applicable maximum length (64 for variable names, 255 for variable labels, and 60 for value labels). If l = 0, names/values instead of variable/value labels are displayed to indicate variables/categories. If l is not specified, CATPCA assumes that each variable name/label and value label is displayed at its full length. If l is an integer that is larger than the applicable maximum, we reset it to the applicable maximum but do not issue a warning. If a positive value of l is given but some or all variables/category values do not have labels, then, for those variables/values, the names/values themselves are used as the labels.

In addition to the plot keywords, the following keyword can be specified:

NDIM (keyword),NDIM (keyword),NDIM (keyword)
CATPCA command,CATPCA command,CATPCA command
NDIM(value,value) Dimension pairs to be plotted. NDIM is followed by a pair of values in parentheses. If NDIM is not specified or is specified without parameter values, a matrix scatterplot including all dimensions is produced.

• The first value (an integer that can range from 1 to the number of dimensions in the solution minus 1) indicates the dimension that is plotted against higher dimensions.

• The second value (an integer that can range from 2 to the number of dimensions in the solution) indicates the highest dimension to be used in plotting the dimension pairs.

• The NDIM specification applies to all requested multidimensional plots.

Related Topics

CATPCA
Overview (CATPCA command)
Example (CATPCA command)
VARIABLES Subcommand (CATPCA command)
ANALYSIS Subcommand (CATPCA command)
Level Keyword (CATPCA command)
SPORD and SPNOM Keywords (CATPCA command)
DISCRETIZATION Subcommand (CATPCA command)
GROUPING Keyword (CATPCA command)
NCAT Keyword (CATPCA command)
MISSING Subcommand (CATPCA command)
PASSIVE Keyword (CATPCA command)
ACTIVE Keyword (CATPCA command)
SUPPLEMENTARY Subcommand (CATPCA command)
CONFIGURATION Subcommand (CATPCA command)
DIMENSION Subcommand (CATPCA command)
NORMALIZATION Subcommand (CATPCA command)
MAXITER Subcommand (CATPCA command)
CRITITER Subcommand (CATPCA command)
PRINT Subcommand (CATPCA command)
BIPLOT Keyword (CATPCA command)
SAVE Subcommand (CATPCA command)
OUTFILE Subcommand (CATPCA command)


BIPLOT Keyword (CATPCA command)

LOADING (keyword),LOADING (keyword),LOADING (keyword)
CATPCA command,CATPCA command,CATPCA command
LOADING (keyword),LOADING (keyword),LOADING (keyword)
with BIPLOT keyword,with BIPLOT keyword,with BIPLOT keyword
CENTR (keyword),CENTR (keyword),CENTR (keyword)
CATPCA command,CATPCA command,CATPCA command
CENTR (keyword),CENTR (keyword),CENTR (keyword)
with BIPLOT keyword,with BIPLOT keyword,with BIPLOT keyword

BIPLOT takes the following keywords:

LOADING(varlist) | Object points and component loadings.
CENTR(varlist) | Object points and centroids.

Related Topics

CATPCA
Overview (CATPCA command)
Example (CATPCA command)
VARIABLES Subcommand (CATPCA command)
ANALYSIS Subcommand (CATPCA command)
Level Keyword (CATPCA command)
SPORD and SPNOM Keywords (CATPCA command)
DISCRETIZATION Subcommand (CATPCA command)
GROUPING Keyword (CATPCA command)
NCAT Keyword (CATPCA command)
MISSING Subcommand (CATPCA command)
PASSIVE Keyword (CATPCA command)
ACTIVE Keyword (CATPCA command)
SUPPLEMENTARY Subcommand (CATPCA command)
CONFIGURATION Subcommand (CATPCA command)
DIMENSION Subcommand (CATPCA command)
NORMALIZATION Subcommand (CATPCA command)
MAXITER Subcommand (CATPCA command)
CRITITER Subcommand (CATPCA command)
PRINT Subcommand (CATPCA command)
PLOT Subcommand (CATPCA command)
SAVE Subcommand (CATPCA command)
OUTFILE Subcommand (CATPCA command)


SAVE Subcommand (CATPCA command)

SAVE (subcommand),SAVE (subcommand),SAVE (subcommand)
CATPCA command,CATPCA command,CATPCA command
CATPCA (command),CATPCA (command),CATPCA (command)
SAVE subcommand,SAVE subcommand,SAVE subcommand

The SAVE subcommand is used to add the transformed variables (category indicators that are replaced with optimal quantifications), the object scores, and the approximation to the working data file. Excluded cases are represented by a dot (the system-missing symbol) on every saved variable.

TRDATA (keyword),TRDATA (keyword),TRDATA (keyword)
CATPCA command,CATPCA command,CATPCA command
OBJECT (keyword),OBJECT (keyword),OBJECT (keyword)
CATPCA command,CATPCA command,CATPCA command
APPROX (keyword),APPROX (keyword),APPROX (keyword)
CATPCA command,CATPCA command,CATPCA command
TRDATA | Transformed variables. Missing values that are specified to be treated as passive are represented by a dot.
OBJECT | Object (component) scores.
APPROX | Approximation for variables that do not have optimal scaling level MNOM. For variables with MNOM scaling level, the approximations in dimension s are the object scores in dimension s.

• Following TRDATA, a rootname and the number of dimensions to be saved for variables that are specified as MNOM can be specified in parentheses.

• For variables that are not specified as MNOM, CATPCA adds two numbers separated by the symbol _. For variables that are specified as MNOM, CATPCA adds three numbers. The first number uniquely identifies the source variable names, and the last number uniquely identifies the CATPCA procedures with the successfully executed SAVE subcommands. For variables that are specified as MNOM, the middle number corresponds to the dimension number (see the next bullet for more details). Only one rootname can be specified, and it can contain up to five characters for variables that are not specified as MNOM and three characters for variables that are specified as MNOM. If more than one rootname is specified, the first rootname is used. If a rootname contains more than five characters (MNOM variables), the first five characters are used at most. If a rootname contains more than three characters (MNOM variables), the first three characters are used at most.

• If a rootname is not specified for TRDATA, rootname TRA is used to automatically generate unique variable names. The formulas are ROOTNAMEk_n and ROOTNAMEk_m_n. In this formula, k increments from 1 to identify the source variable names by using the source variables’ position numbers in the ANALYSIS subcommand, m increments from 1 to identify the dimension number, and n increments from 1 to identify the CATPCA procedures with the successfully executed SAVE subcommands for a given data file in a continuous session. For example, with three variables specified on ANALYSIS, LEVEL = MNOM for the second variable, and with two dimensions to save, the first set of default names—if they do not exist in the data file—would be TRA1_1, TRA2_1_1, TRA2_2_1, and TRA3_1. The next set of default names—if they do not exist in the data file—would be TRA1_2, TRA2_1_2, TRA2_2_2, and TRA3_2. However, if, for example, TRA1_2 already exists in the data file, the default names should be attempted as TRA1_3, TRA2_1_3, TRA2_2_3, and TRA3_3. That is, the last number increments to the next available integer.

• Following OBJECT, a rootname and the number of dimensions can be specified in parentheses, to which CATPCA adds two numbers separated by the symbol _. The first number corresponds to the dimension number. The second number uniquely identifies the CATPCA procedures with the successfully executed SAVE subcommands (see the next bullet for more details). Only one rootname can be specified, and it can contain up to five characters. If more than one rootname is specified, the first rootname is used; if a rootname contains more than five characters, the first five characters are used at most.

• If a rootname is not specified for OBJECT, rootname OBSCO is used to automatically generate unique variable names. The formula is ROOTNAMEm_n. In this formula, m increments from 1 to identify the dimension number, and n increments from 1 to identify the CATPCA procedures with the successfully executed SAVE subcommands for a given data file in a continuous session. For example, if two dimensions are specified following OBJECT, the first set of default names—if they do not exist in the data file—would be OBSCO1_1 and OBSCO2_1. The next set of default names—if they do not exist in the data file—would be OBSCO1_2 and OBSCO2_2. However, if, for example, OBSCO2_2 already exists in the data file, the default names should be attempted as OBSCO1_3 and OBSCO2_3. That is, the second number increments to the next available integer.

• Following APPROX, a rootname can be specified in parentheses, to which CATPCA adds two numbers separated by the symbol _. The first number uniquely identifies the source variable names, and the last number uniquely identifies the CATPCA procedures with the successfully executed SAVE subcommands (see the next bullet for more details). Only one rootname can be specified, and it can contain up to five characters. If more than one rootname is specified, the first rootname is used; if a rootname contains more than five characters, the first five characters are used at most.

• If a rootname is not specified for APPROX, rootname APP is used to automatically generate unique variable names. The formula is ROOTNAMEk_n. In this formula, k increments from 1 to identify the source variable names by using the source variables’ position numbers in the ANALYSIS subcommand. Additionally, n increments from 1 to identify the CATPCA procedures with the successfully executed SAVE subcommands for a given data file in a continuous session. For example, with three variables specified on ANALYSIS and LEVEL = MNOM for the second variable, the first set of default names—if they do not exist in the data file—would be APP1_1, APP2_1, and APP3_1. The next set of default names—if they do not exist in the data file—would be APP1_2, APP2_2, and APP3_2. However, if, for example, APP1_2 already exists in the data file, the default names should be attempted as APP1_3, APP2_3, and APP3_3. That is, the last number increments to the next available integer.

• Variable labels are created automatically. (They are shown in the Notes table and can also be displayed in the Data Editor window.)

• If the number of dimensions is not specified, the SAVE subcommand saves all dimensions.

Related Topics

CATPCA
Overview (CATPCA command)
Example (CATPCA command)
VARIABLES Subcommand (CATPCA command)
ANALYSIS Subcommand (CATPCA command)
Level Keyword (CATPCA command)
SPORD and SPNOM Keywords (CATPCA command)
DISCRETIZATION Subcommand (CATPCA command)
GROUPING Keyword (CATPCA command)
NCAT Keyword (CATPCA command)
MISSING Subcommand (CATPCA command)
PASSIVE Keyword (CATPCA command)
ACTIVE Keyword (CATPCA command)
SUPPLEMENTARY Subcommand (CATPCA command)
CONFIGURATION Subcommand (CATPCA command)
DIMENSION Subcommand (CATPCA command)
NORMALIZATION Subcommand (CATPCA command)
MAXITER Subcommand (CATPCA command)
CRITITER Subcommand (CATPCA command)
PRINT Subcommand (CATPCA command)
PLOT Subcommand (CATPCA command)
BIPLOT Keyword (CATPCA command)
OUTFILE Subcommand (CATPCA command)


OUTFILE Subcommand (CATPCA command)

OUTFILE (subcommand),OUTFILE (subcommand),OUTFILE (subcommand)
CATPCA command,CATPCA command,CATPCA command
CATPCA (command),CATPCA (command),CATPCA (command)
OUTFILE subcommand,OUTFILE subcommand,OUTFILE subcommand

The OUTFILE subcommand is used to write the discretized data, transformed data (category indicators replaced with optimal quantifications), the object scores, and the approximation to a data file or previously declared data set. Excluded cases are represented by a dot (the system-missing symbol) on every saved variable.

DISCRDATA(keyword),DISCRDATA(keyword),DISCRDATA(keyword)
CATPCA command,CATPCA command,CATPCA command
TRDATA (keyword),TRDATA (keyword),TRDATA (keyword)
CATPCA command,CATPCA command,CATPCA command
OBJECT (keyword),OBJECT (keyword),OBJECT (keyword)
CATPCA command,CATPCA command,CATPCA command
APPROX (keyword),APPROX (keyword),APPROX (keyword)
CATPCA command,CATPCA command,CATPCA command
DISCRDATA('savfile'|'dataset') | Discretized data.
TRDATA('savfile'|'dataset') | Transformed variables. This setting is the default if the OUTFILE subcommand is specified with a filename and without a keyword. Missing values that are specified to be treated as passive are represented by a dot.
OBJECT('savfile'|'dataset') | Object (component) scores.
APPROX('savfile'|'dataset') | Approximation for variables that do not have optimal scaling level MNOM.

• Filenames should be enclosed in quotes and are stored in the working directory unless a path is included as part of the file specification. Data sets are available during the current session but are not available in subsequent sessions unless you explicitly save them as data files. The names should be different for each of the keywords.

CATPCA (command),CATPCA (command),CATPCA (command)

In principle, the active data set should not be replaced by this subcommand, and the asterisk (*) file specification is not supported. This strategy also prevents OUTFILE interference with the SAVE subcommand.

Related Topics

CATPCA
Overview (CATPCA command)
Example (CATPCA command)
VARIABLES Subcommand (CATPCA command)
ANALYSIS Subcommand (CATPCA command)
Level Keyword (CATPCA command)
SPORD and SPNOM Keywords (CATPCA command)
DISCRETIZATION Subcommand (CATPCA command)
GROUPING Keyword (CATPCA command)
NCAT Keyword (CATPCA command)
MISSING Subcommand (CATPCA command)
PASSIVE Keyword (CATPCA command)
ACTIVE Keyword (CATPCA command)
SUPPLEMENTARY Subcommand (CATPCA command)
CONFIGURATION Subcommand (CATPCA command)
DIMENSION Subcommand (CATPCA command)
NORMALIZATION Subcommand (CATPCA command)
MAXITER Subcommand (CATPCA command)
CRITITER Subcommand (CATPCA command)
PRINT Subcommand (CATPCA command)
PLOT Subcommand (CATPCA command)
BIPLOT Keyword (CATPCA command)
SAVE Subcommand (CATPCA command)


CATREG

Categorical Regression,Categorical Regression,Categorical Regression
command syntax,command syntax,command syntax
CATREG (command),CATREG (command),CATREG (command)
CATREG (command),CATREG (command),CATREG (command)
syntax chart,syntax chart,syntax chart
release history,release history,release history

CATREG is available in the Categories option.

CATREG VARIABLES = varlist

/ANALYSIS =
         depvar [([LEVEL={SPORD**}] [DEGREE={2}] [INKNOT={2}])]
                                       {n}          {n}
                         {SPNOM  }  [DEGREE={2}] [INKNOT={2}]
                                            {n}          {n}
                         {ORDI   }
                         {NOMI   }
                         {NUME   }
   WITH indvarlist [([LEVEL={SPORD**}] [DEGREE={2}] [INKNOT={2}])]
                                               {n}          {n}
                            {SPNOM  }  [DEGREE={2}] [INKNOT={2}]
                                               {n}          {n}
                            {ORDI   }
                            {NOMI   }
                            {NUME   }

[/DISCRETIZATION = [varlist [([{GROUPING   }] [{NCAT*={7}}] [DISTR={NORMAL }])]]]
                                                     {n}          {UNIFORM}
                              {EQINTV=n   }
                              {RANKING    }
                              {MULTIPLYING}

[/MISSING = [{varlist}({LISTWISE**})]]
             {ALL**  } {MODEIMPU  }
                                    {EXTRACAT  }

[/SUPPLEMENTARY = OBJECT(objlist)]

[/INITIAL = [{NUMERICAL**}]]
             {RANDOM     }
             {MULTISTART } ({50 }) ('savfile'|'dataset')
                            {n  }
                            {ALL}
             {FIXSIGNS   } (n) ('filename')

[/MAXITER = [{100**}]]
             {n    }

[/CRITITER = [{.00001**}]]
              {value   }

[/REGULARIZATION = [{NONE**}]]
                    {RIDGE }   [{(    0,   1.0,  0.02)}] ('filename')
                                {(value, value, value)  }
                    {LASSO }   [{(    0,   1.0,  0.02)}] ('filename')
                                {(value, value, value)  }
                    {ENET  }   [{(    0,   1.0,   0.1)(    0,   1.0,   .02)}] ('filename')
                                {(value, value, value)(value, value, value)}

[/RESAMPLE = [{NONE**   }]]
              {CROSSVAL }[({10})]
                           {n }
              {BOOTSTRAP}[({50})]
                           {n }

[/PRINT = [R**] [COEFF**] [DESCRIP**[(varlist)]] [HISTORY] [ANOVA**]
          [CORR] [OCORR] [QUANT[(varlist)]] [REGU] [NONE]]

[/PLOT = [TRANS(varlist)[(h)]] [RESID(varlist)[(h)]] [REGU({valuelist})]]
                                                           {ALL      }

[/SAVE = [TRDATA[({TRA     })]] [PRED[({PRE     })]] [RES[({RES        })]]]
                  {rootname}           {rootname}          {rootname}

[/OUTFILE = [TRDATA('savfile'|'dataset')] [DISCRDATA('savfile'|'dataset')]] .

** Default if the subcommand or keyword is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See CATREG Algorithms for computational details for this procedure.

Syntax for the CATREG command can be generated from the Categorical Regression (CATREG) dialog.

Release History Collapse Hide details

Release History

Release 13.0

• The maximum category label length on the PLOT subcommand is increased to 60 (previous value was 20).

Release 17.0

• MULTISTART and FIXSIGNS keywords added to INITIAL subcommand.

• REGULARIZATION subcommand added.

• RESAMPLE subcommand added.

• REGU keyword added to PRINT subcommand.

• REGU keyword added to PLOT subcommand.

• SUPPLEMENTARY categories not occuring in data used to create the model are now interpolated.

Related Topics

Overview (CATREG command)
Examples (CATREG command)
VARIABLES Subcommand (CATREG command)
ANALYSIS Subcommand (CATREG command)
LEVEL Keyword (CATREG command)
SPORD and SPNOM Keywords (CATREG command)
DISCRETIZATION Subcommand (CATREG command)
GROUPING Keyword (CATREG command)
DISTR Keyword (CATREG command)
MISSING Subcommand (CATREG command)
SUPPLEMENTARY Subcommand (CATREG command)
INITIAL Subcommand (CATREG command)
MAXITER Subcommand (CATREG command)
CRITITER Subcommand (CATREG command)
REGULARIZATION Subcommand (CATREG command)
RESAMPLE Subcommand (CATREG command)
PRINT Subcommand (CATREG command)
PLOT Subcommand (CATREG command)
SAVE Subcommand (CATREG command)
OUTFILE Subcommand (CATREG command)


Overview (CATREG command)

CATREG (categorical regression with optimal scaling using alternating least squares) quantifies categorical variables using optimal scaling, resulting in an optimal linear regression equation for the transformed variables. The variables can be given mixed optimal scaling levels, and no distributional assumptions about the variables are made.

Options Collapse Hide details

Options

Transformation Type. You can specify the transformation type (spline ordinal, spline nominal, ordinal, nominal, or numerical) at which you want to analyze each variable.

Discretization. You can use the DISCRETIZATION subcommand to discretize fractional-value variables or to recode categorical variables.

Initial Configuration. You can specify the kind of initial configuration through the INITIAL subcommand. Also, multiple systematic starts or fixed signs for the regression coefficients can be specified through this subcommand.

Tuning the Algorithm. You can control the values of algorithm-tuning parameters with the MAXITER and CRITITER subcommands.

Regularized regression. You can specifiy one of three methods for regularized regression: Ridge regression, the Lasso, or the Elastic Net.

Resampling. You can specify cross validation or the .632 bootstrap for estimation of prediction error.

Missing Data. You can specify the treatment of missing data with the MISSING subcommand.

Optional Output. You can request optional output through the PRINT subcommand.

Transformation Plot per Variable. You can request a plot per variable of its quantification against the category numbers.

Residual Plot per Variable. You can request an overlay plot per variable of the residuals and the weighted quantification against the category numbers.

Ridge, Lasso, or Elastic Net plot. You can request a plot of the regularized coefficients paths. For the Elastic Net, the plots for all values of the Ridge penalty can be requested, or plots for specified values of the Ridge penalty.

Writing External Data. You can write the transformed data (category numbers replaced with optimal quantifications) to an outfile for use in further analyses. You can also write the discretized data to an outfile.

Saving Variables. You can save the transformed variables, the predicted values, and/or the residuals in the working data file.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is the command CATREG with the VARIABLES and ANALYSIS subcommands.

Syntax Rules Collapse Hide details

Syntax Rules

• The VARIABLES and ANALYSIS subcommands must always appear, and the VARIABLES subcommand must be the first subcommand specified. The other subcommands, if specified, can be in any order.

• Variables specified in the ANALYSIS subcommand must be found in the VARIABLES subcommand.

• In the ANALYSIS subcommand, exactly one variable must be specified as a dependent variable and at least one variable must be specified as an independent variable after the keyword WITH.

• The word WITH is reserved as a keyword in the CATREG procedure. Thus, it may not be a variable name in CATREG. Also, the word TO is a reserved word.

Operations Collapse Hide details

Operations

• If a subcommand is specified more than once, the last one is executed but with a syntax warning. Note this is true also for the VARIABLES and ANALYSIS subcommands.

Limitations Collapse Hide details

Limitations

• If more than one dependent variable is specified in the ANALYSIS subcommand, CATREG is not executed.

• CATREG operates on category indicator variables. The category indicators should be positive integers. You can use the DISCRETIZATION subcommand to convert fractional-value variables and string variables into positive integers. If DISCRETIZATION is not specified, fractional-value variables are automatically converted into positive integers by grouping them into seven categories with a close to normal distribution and string variables are automatically converted into positive integers by ranking.

• In addition to system missing values and user defined missing values, CATREG treats category indicator values less than 1 as missing. If one of the values of a categorical variable has been coded 0 or some negative value and you want to treat it as a valid category, use the COMPUTE command to add a constant to the values of that variable such that the lowest value will be 1. You can also use the RANKING option of the DISCRETIZATION subcommand for this purpose, except for variables you want to treat as numerical, since the characteristic of equal intervals in the data will not be maintained.

• There must be at least three valid cases.

• The number of valid cases must be greater than the number of independent variables plus 1.

• The maximum number of independent variables is 200.

• Split-File has no implications for CATREG.

Related Topics

CATREG
Examples (CATREG command)
VARIABLES Subcommand (CATREG command)
ANALYSIS Subcommand (CATREG command)
LEVEL Keyword (CATREG command)
SPORD and SPNOM Keywords (CATREG command)
DISCRETIZATION Subcommand (CATREG command)
GROUPING Keyword (CATREG command)
DISTR Keyword (CATREG command)
MISSING Subcommand (CATREG command)
SUPPLEMENTARY Subcommand (CATREG command)
INITIAL Subcommand (CATREG command)
MAXITER Subcommand (CATREG command)
CRITITER Subcommand (CATREG command)
REGULARIZATION Subcommand (CATREG command)
RESAMPLE Subcommand (CATREG command)
PRINT Subcommand (CATREG command)
PLOT Subcommand (CATREG command)
SAVE Subcommand (CATREG command)
OUTFILE Subcommand (CATREG command)


Examples (CATREG command)

CATREG VARIABLES = TEST1 TEST3 TEST2 TEST4 TEST5 TEST6
   TEST7 TO TEST9 STATUS01 STATUS02
  /ANALYSIS TEST4 (LEVEL=NUME)
   WITH TEST1 TO TEST2 (LEVEL=SPORD DEGREE=1 INKNOT=3)
   TEST5 TEST7 (LEVEL=SPNOM) TEST8 (LEVEL=ORDI)
   STATUS01 STATUS02 (LEVEL=NOMI)
  /DISCRETIZATION = TEST1(GROUPING NCAT=5 DISTR=UNIFORM)
                    TEST5(GROUPING) TEST7(MULTIPLYING)
  /INITIAL = RANDOM
  /MAXITER = 100
  /CRITITER = .000001
 /RESAMPLE BOOTSTRAP (100)
  /MISSING = MODEIMPU
  /PRINT = R COEFF DESCRIP ANOVA QUANT(TEST1 TO TEST2 STATUS01 STATUS02)
  /PLOT = TRANS (TEST2 TO TEST7 TEST4)
  /SAVE
  /OUTFILE = '/data/qdata.sav'.

• VARIABLES defines variables. The keyword TO refers to the order of the variables in the working data file.

• The ANALYSIS subcommand defines variables used in the analysis. It is specified that TEST4 is the dependent variable, with optimal scaling level numerical and that the variables TEST1, TEST2, TEST3, TEST5, TEST7, TEST8, STATUS01, and STATUS02 are the independent variables to be used in the analysis. (The keyword TO refers to the order of the variables in the VARIABLES subcommand.) The optimal scaling level for TEST1, TEST2, and TEST3 is spline ordinal; for TEST5 and TEST7, spline nominal; for TEST8, ordinal; and for STATUS01 and STATUS02, nominal. The splines for TEST1 and TEST2 have degree 1 and three interior knots, and the splines for TEST5 and TEST7 have degree 2 and two interior knots (default because unspecified).

• DISCRETIZATION specifies that TEST5 and TEST7, which are fractional-value variables, are discretized: TEST5 by recoding into seven categories with a normal distribution (default because unspecified) and TEST7 by “multiplying.” TEST1, which is a categorical variable, is recoded into five categories with a close-to-uniform distribution.

• Because there are nominal variables, a random initial solution is requested by the INITIAL subcommand.

• MAXITER specifies the maximum number of iterations to be 100. This is the default, so this subcommand could be omitted here.

• CRITITER sets the convergence criterion to a value smaller than the default value.

• To include cases with missing values, the MISSING subcommand specifies that for each variable, missing values are replaced with the most frequent category (the mode).

• RESAMPLE specifies the .632 bootstrap for estimation of the prediction error using 100 bootstrap samples (in stead of the default of 50).

• PRINT specifies the correlations, the coefficients, the descriptive statistics for all variables, the ANOVA table, the category quantifications for variables TEST1, TEST2, TEST3, STATUS01, and STATUS02, and the transformed data list of all cases.

• PLOT is used to request quantification plots for the variables TEST2, TEST5, TEST7, and TEST4.

• The SAVE subcommand adds the transformed variables to the working data file. The names of these new variables are TRANS1_1, ..., TRANS9_1.

• The OUTFILE subcommand writes the transformed data to a data file called qdata.sav in the directory /data.

Example: Multiple Systematic Starts

CATREG
 ...
 /INITIAL MULTISTART(ALL)(‘c:\data\startsigns.sav’)
 /PRINT = R COEFF DESCRIP ANOVA QUANT(TEST1 TO TEST2 STATUS01 STATUS02)
 /PLOT = TRANS (TEST2 TO TEST7 TEST4)
 /SAVE TRDATA PRED RES
 /OUTFILE = TRDATA(‘c:\data\qdata.sav’) DISCRDATA(‘c:\data\discr.sav’)

• Because the ordinal and spline ordinal scaling levels are specified for some variables, there is chance of obtaining a suboptimal solution when applying the numerical or random initial solution. To ascertain obtaining the optimal solution, all multiple systematic starts are used. Using all systematic starts is feasible here because the number of variables with (spline) ordinal scaling is only 3; then the number of all starts is 2 to the power of 3 is 8. With a larger number of variables with (spline) ordinal scaling level, a reduced number of starts is recommended, which can be requested by specifying /INITIAL MULTISTART(value).

• The specifications at the PRINT, PLOT, SAVE, and OUTFILE subcommands will be applied to the optimal solution.

Example: Fixing Initial Signs for Regression Coefficients

CATREG
 ...
 /INITIAL FIXSIGNS (63) (‘c:\data\startsigns.sav’)

• The INITIAL subcommand specifies using a specific set of fixed signs for the regression coefficients. The signs are in the file startsigns.sav in the directory c:\data. This file was created by a previous run of CATREG with keyword MULTISTART at the INITIAL subcommand (see previous example). The signs of start number 63 are specified to be used.

Example: Elastic Net Regularization

CATREG
 ...
 /REGULARIZATION ENET (.5 2.5 .25) (.01 3.8 .05)(‘c:\data\regu_enet.sav’)
 /PRINT = REGU R COEFF DESCRIP ANOVA QUANT(TEST1 TO TEST2)
 /PLOT = REGU (.75 1.5) TRANS (TEST2 TO TEST7 TEST4)
 /SAVE TRDATA PRED RES
 /OUTFILE = TRDATA(‘c:\data\qdata.sav’) DISCRDATA(‘c:\data\discr.sav’).

• REGULARIZATION specifies application of Elastic Net regularization, with start value of the Lasso penalty 0.01, stop value 3.8, and increment 0.05, resulting in 76 regularized models, with Lasso penalty values 0.01,0 .06, ..., 3.76. To each of these 76 Lasso models 10 Ridge penalties are applied (0.5, 0.75, ..., 2.5), resulting in 76 × 10 = 760 Elastic Net models.

• PRINT specifies displaying a table with the penalty values, R-squared, and the regression coefficients for each regularized model. The contents of this table is written to a data file called regu_enet.sav in the directory c:\data.

• The PLOT subcommand requests two Elastic Net plots: a Lasso plot with a fixed Ridge penalty of 0.75 and a Lasso plot with a fixed Ridge penalty of 1.50. Any other keywords than REGU at the PLOT subcommand are ignored.

• Other specifications then REGU at the PRINT and PLOT subcommands, the SAVE subcommand and the TRDATA keyword at the OUTFILE subcommand are ignored.

Example: Elastic Net Regularization with Crossvalidation Resampling

CATREG
 ...
 /REGULARIZATION ENET (.5 2.5 .25)(.01 3.8 .05)(‘c:\data\regu_enet.sav’)
 /RESAMPLE CROSSVAL (5)
 /PRINT = REGU R COEFF DESCRIP ANOVA
 /PLOT = REGU (.75 1.5) TRANS (TEST2 TO TEST7 TEST4)
 /SAVE TRDATA PRED RES
 /OUTFILE = TRDATA(‘c:\data\qdata.sav’) DISCRDATA(‘c:\data\discr.sav’).

• REGULARIZATION is the same as in the previous example.

• The RESAMPLE subcommand specifies 5-fold cross-validation to estimate the prediction error for each of the 760 Elastic Net models.

• PRINT specifies displaying a table with the penalty values, R-squared, the regression coefficients, and the estimated prediction error for each regularized model. The contents of this table is written to a data file called regu_enet.sav in the directory c:\data.

• The specification at the PLOT subcommand result in the same plots as in the previous example.

• The other specifications at the PRINT and PLOT subcommands, and the SAVE and OUTFILE specifications will be applied to the model with lowest prediction error.

Example: Obtaining a Specific Elastic Net Model

CATREG
 ...
 /REGULARIZATION ENET (1.25 1.25 0)(.46 .46 0)
 /PRINT = R COEFF DESCRIP ANOVA QUANT(TEST1 TO TEST2 STATUS01 STATUS02)
 /PLOT = TRANS (TEST2 TO TEST7 TEST4)
 /SAVE TRDATA PRED RES
 /OUTFILE = TRDATA(‘c:\data\qdata.sav’) DISCRDATA(‘c:\data\discr.sav’).

• REGULARIZATION is specified here (stop value equal to start value, increment zero) to obtain output for a specific Elastic Net model: the model with penalty values 1.25 (Ridge) and .46 (Lasso).

Related Topics

CATREG
Overview (CATREG command)
VARIABLES Subcommand (CATREG command)
ANALYSIS Subcommand (CATREG command)
LEVEL Keyword (CATREG command)
SPORD and SPNOM Keywords (CATREG command)
DISCRETIZATION Subcommand (CATREG command)
GROUPING Keyword (CATREG command)
DISTR Keyword (CATREG command)
MISSING Subcommand (CATREG command)
SUPPLEMENTARY Subcommand (CATREG command)
INITIAL Subcommand (CATREG command)
MAXITER Subcommand (CATREG command)
CRITITER Subcommand (CATREG command)
REGULARIZATION Subcommand (CATREG command)
RESAMPLE Subcommand (CATREG command)
PRINT Subcommand (CATREG command)
PLOT Subcommand (CATREG command)
SAVE Subcommand (CATREG command)
OUTFILE Subcommand (CATREG command)


VARIABLES Subcommand (CATREG command)

VARIABLES (subcommand),VARIABLES (subcommand),VARIABLES (subcommand)
CATREG command,CATREG command,CATREG command
CATREG (command),CATREG (command),CATREG (command)
VARIABLES subcommand,VARIABLES subcommand,VARIABLES subcommand

VARIABLES specifies the variables that may be analyzed in the current CATREG procedure.

• The VARIABLES subcommand is required and precedes all other subcommands.

• The keyword TO on the VARIABLES subcommand refers to the order of variables in the working data file. (Note that this behavior of TO is different from that in the indvarlist on the ANALYSIS subcommand.)

Related Topics

CATREG
Overview (CATREG command)
Examples (CATREG command)
ANALYSIS Subcommand (CATREG command)
LEVEL Keyword (CATREG command)
SPORD and SPNOM Keywords (CATREG command)
DISCRETIZATION Subcommand (CATREG command)
GROUPING Keyword (CATREG command)
DISTR Keyword (CATREG command)
MISSING Subcommand (CATREG command)
SUPPLEMENTARY Subcommand (CATREG command)
INITIAL Subcommand (CATREG command)
MAXITER Subcommand (CATREG command)
CRITITER Subcommand (CATREG command)
REGULARIZATION Subcommand (CATREG command)
RESAMPLE Subcommand (CATREG command)
PRINT Subcommand (CATREG command)
PLOT Subcommand (CATREG command)
SAVE Subcommand (CATREG command)
OUTFILE Subcommand (CATREG command)


ANALYSIS Subcommand (CATREG command)

ANALYSIS (subcommand),ANALYSIS (subcommand),ANALYSIS (subcommand)
CATREG command,CATREG command,CATREG command
CATREG (command),CATREG (command),CATREG (command)
ANALYSIS subcommand,ANALYSIS subcommand,ANALYSIS subcommand

ANALYSIS specifies the dependent variable and the independent variables following the keyword WITH.

• All the variables on ANALYSIS must be specified on the VARIABLES subcommand.

• The ANALYSIS subcommand is required and follows the VARIABLES subcommand.

• The first variable list contains exactly one variable as the dependent variable, while the second variable list following WITH contains at least one variable as an independent variable. Each variable may have at most one keyword in parentheses indicating the transformation type of the variable.

• The keyword TO in the independent variable list honors the order of variables on the VARIABLES subcommand.

• Optimal scaling levels are indicated by the keyword LEVEL in parentheses following the variable or variable list.

LEVEL (keyword),LEVEL (keyword),LEVEL (keyword)
CATREG command,CATREG command,CATREG command
LEVEL Specifies the optimal scaling level.

Related Topics

CATREG
Overview (CATREG command)
Examples (CATREG command)
VARIABLES Subcommand (CATREG command)
LEVEL Keyword (CATREG command)
SPORD and SPNOM Keywords (CATREG command)
DISCRETIZATION Subcommand (CATREG command)
GROUPING Keyword (CATREG command)
DISTR Keyword (CATREG command)
MISSING Subcommand (CATREG command)
SUPPLEMENTARY Subcommand (CATREG command)
INITIAL Subcommand (CATREG command)
MAXITER Subcommand (CATREG command)
CRITITER Subcommand (CATREG command)
REGULARIZATION Subcommand (CATREG command)
RESAMPLE Subcommand (CATREG command)
PRINT Subcommand (CATREG command)
PLOT Subcommand (CATREG command)
SAVE Subcommand (CATREG command)
OUTFILE Subcommand (CATREG command)


LEVEL Keyword (CATREG command)

The following keywords are used to indicate the optimal scaling level:

SPORD (keyword),SPORD (keyword),SPORD (keyword)
CATREG command,CATREG command,CATREG command
SPNOM (keyword),SPNOM (keyword),SPNOM (keyword)
CATREG command,CATREG command,CATREG command
ORDI (keyword),ORDI (keyword),ORDI (keyword)
CATREG command,CATREG command,CATREG command
NOMI (keyword),NOMI (keyword),NOMI (keyword)
CATREG command,CATREG command,CATREG command
NUME (keyword),NUME (keyword),NUME (keyword)
CATREG command,CATREG command,CATREG command
SPORD | Spline ordinal (monotonic). This is the default for a variable listed without any optimal scaling level, for example, one without LEVEL in the parentheses after it or with LEVEL without a specification. Categories are treated as ordered. The order of the categories of the observed variable is preserved in the optimally scaled variable. Categories will be on a straight line through the origin. The resulting transformation is a smooth nondecreasing piecewise polynomial of the chosen degree. The pieces are specified by the number and the placement of the interior knots.
SPNOM | Spline nominal (non-monotonic). Categories are treated as unordered. Objects in the same category obtain the same quantification. Categories will be on a straight line through the origin. The resulting transformation is a smooth piecewise polynomial of the chosen degree. The pieces are specified by the number and the placement of the interior knots.
ORDI | Ordinal. Categories are treated as ordered. The order of the categories of the observed variable is preserved in the optimally scaled variable. Categories will be on a straight line through the origin. The resulting transformation fits better than SPORD transformation, but is less smooth.
NOMI | Nominal. Categories are treated as unordered. Objects in the same category obtain the same quantification. Categories will be on a straight line through the origin. The resulting transformation fits better than SPNOM transformation, but is less smooth.
NUME | Numerical. Categories are treated as equally spaced (interval level). The order of the categories and the differences between category numbers of the observed variables are preserved in the optimally scaled variable. Categories will be on a straight line through the origin. When all variables are scaled at the numerical level, the CATREG analysis is analogous to standard multiple regression analysis.

Related Topics

CATREG
Overview (CATREG command)
Examples (CATREG command)
VARIABLES Subcommand (CATREG command)
ANALYSIS Subcommand (CATREG command)
SPORD and SPNOM Keywords (CATREG command)
DISCRETIZATION Subcommand (CATREG command)
GROUPING Keyword (CATREG command)
DISTR Keyword (CATREG command)
MISSING Subcommand (CATREG command)
SUPPLEMENTARY Subcommand (CATREG command)
INITIAL Subcommand (CATREG command)
MAXITER Subcommand (CATREG command)
CRITITER Subcommand (CATREG command)
REGULARIZATION Subcommand (CATREG command)
RESAMPLE Subcommand (CATREG command)
PRINT Subcommand (CATREG command)
PLOT Subcommand (CATREG command)
SAVE Subcommand (CATREG command)
OUTFILE Subcommand (CATREG command)


SPORD and SPNOM Keywords (CATREG command)

The following keywords are used with SPORD and SPNOM :

DEGREE (keyword),DEGREE (keyword),DEGREE (keyword)
CATREG command,CATREG command,CATREG command
INKNOT (keyword),INKNOT (keyword),INKNOT (keyword)
CATREG command,CATREG command,CATREG command
DEGREE | The degree of the polynomial. If DEGREE is not specified the degree is assumed to be 2.
INKNOT | The number of the interior knots. If INKNOT is not specified the number of interior knots is assumed to be 2.

Related Topics

CATREG
Overview (CATREG command)
Examples (CATREG command)
VARIABLES Subcommand (CATREG command)
ANALYSIS Subcommand (CATREG command)
LEVEL Keyword (CATREG command)
DISCRETIZATION Subcommand (CATREG command)
GROUPING Keyword (CATREG command)
DISTR Keyword (CATREG command)
MISSING Subcommand (CATREG command)
SUPPLEMENTARY Subcommand (CATREG command)
INITIAL Subcommand (CATREG command)
MAXITER Subcommand (CATREG command)
CRITITER Subcommand (CATREG command)
REGULARIZATION Subcommand (CATREG command)
RESAMPLE Subcommand (CATREG command)
PRINT Subcommand (CATREG command)
PLOT Subcommand (CATREG command)
SAVE Subcommand (CATREG command)
OUTFILE Subcommand (CATREG command)


DISCRETIZATION Subcommand (CATREG command)

DISCRETIZATION (subcommand),DISCRETIZATION (subcommand),DISCRETIZATION (subcommand)
CATREG command,CATREG command,CATREG command
CATREG (command),CATREG (command),CATREG (command)
DISCRETIZATION subcommand,DISCRETIZATION subcommand,DISCRETIZATION subcommand

DISCRETIZATION specifies fractional-value variables that you want to discretize. Also, you can use DISCRETIZATION for ranking or for two ways of recoding categorical variables.

• A string variable's values are always converted into positive integers by assigning category indicators according to the ascending alphanumeric order. DISCRETIZATION for string variables applies to these integers.

• When the DISCRETIZATION subcommand is omitted, or when the DISCRETIZATION subcommand is used without a varlist, fractional-value variables are converted into positive integers by grouping them into seven categories (or into the number of distinct values of the variable if this number is less than 7) with a close to normal distribution.

• When no specification is given for variables in a varlist following DISCRETIZATION, these variables are grouped into seven categories with a close-to-normal distribution.

• In CATREG, a system-missing value, user-defined missing values, and values less than 1 are considered to be missing values (see next section). However, in discretizing a variable, values less than 1 are considered to be valid values, and are thus included in the discretization process. System-missing values and user-defined missing values are excluded.

GROUPING (keyword),GROUPING (keyword),GROUPING (keyword)
CATREG command,CATREG command,CATREG command
RANKING (keyword),RANKING (keyword),RANKING (keyword)
CATREG command,CATREG command,CATREG command
MULTIPLYING (keyword),MULTIPLYING (keyword),MULTIPLYING (keyword)
CATREG command,CATREG command,CATREG command
GROUPING | Recode into the specified number of categories.
RANKING | Rank cases. Rank 1 is assigned to the case with the smallest value on the variable.
MULTIPLYING | Multiplying the standardized values (z-scores) of a fractional-value variable by 10, rounding, and adding a value such that the lowest value is 1.

Related Topics

CATREG
Overview (CATREG command)
Examples (CATREG command)
VARIABLES Subcommand (CATREG command)
ANALYSIS Subcommand (CATREG command)
LEVEL Keyword (CATREG command)
SPORD and SPNOM Keywords (CATREG command)
GROUPING Keyword (CATREG command)
DISTR Keyword (CATREG command)
MISSING Subcommand (CATREG command)
SUPPLEMENTARY Subcommand (CATREG command)
INITIAL Subcommand (CATREG command)
MAXITER Subcommand (CATREG command)
CRITITER Subcommand (CATREG command)
REGULARIZATION Subcommand (CATREG command)
RESAMPLE Subcommand (CATREG command)
PRINT Subcommand (CATREG command)
PLOT Subcommand (CATREG command)
SAVE Subcommand (CATREG command)
OUTFILE Subcommand (CATREG command)


GROUPING Keyword (CATREG command)

NCAT (keyword),NCAT (keyword),NCAT (keyword)
CATREG command,CATREG command,CATREG command
EQINTV (keyword),EQINTV (keyword),EQINTV (keyword)
CATREG command,CATREG command,CATREG command
NCAT | Recode into ncat categories. When NCAT is not specified, the number of categories is set to 7 (or the number of distinct values of the variable if this number is less than 7). The valid range is from 2 to 36. You may either specify a number of categories or use the keyword DISTR.
EQINTV | Recode intervals of equal size into categories. The interval size must be specified (there is no default value). The resulting number of categories depends on the interval size.

Related Topics

CATREG
Overview (CATREG command)
Examples (CATREG command)
VARIABLES Subcommand (CATREG command)
ANALYSIS Subcommand (CATREG command)
LEVEL Keyword (CATREG command)
SPORD and SPNOM Keywords (CATREG command)
DISCRETIZATION Subcommand (CATREG command)
DISTR Keyword (CATREG command)
MISSING Subcommand (CATREG command)
SUPPLEMENTARY Subcommand (CATREG command)
INITIAL Subcommand (CATREG command)
MAXITER Subcommand (CATREG command)
CRITITER Subcommand (CATREG command)
REGULARIZATION Subcommand (CATREG command)
RESAMPLE Subcommand (CATREG command)
PRINT Subcommand (CATREG command)
PLOT Subcommand (CATREG command)
SAVE Subcommand (CATREG command)
OUTFILE Subcommand (CATREG command)


DISTR Keyword (CATREG command)

DISTR has the following keywords:

NORMAL (keyword),NORMAL (keyword),NORMAL (keyword)
CATREG command,CATREG command,CATREG command
UNIFORM (keyword),UNIFORM (keyword),UNIFORM (keyword)
CATREG command,CATREG command,CATREG command
NORMAL | Normal distribution. This is the default when DISTR is not specified.
UNIFORM | Uniform distribution.

Related Topics

CATREG
Overview (CATREG command)
Examples (CATREG command)
VARIABLES Subcommand (CATREG command)
ANALYSIS Subcommand (CATREG command)
LEVEL Keyword (CATREG command)
SPORD and SPNOM Keywords (CATREG command)
DISCRETIZATION Subcommand (CATREG command)
GROUPING Keyword (CATREG command)
MISSING Subcommand (CATREG command)
SUPPLEMENTARY Subcommand (CATREG command)
INITIAL Subcommand (CATREG command)
MAXITER Subcommand (CATREG command)
CRITITER Subcommand (CATREG command)
REGULARIZATION Subcommand (CATREG command)
RESAMPLE Subcommand (CATREG command)
PRINT Subcommand (CATREG command)
PLOT Subcommand (CATREG command)
SAVE Subcommand (CATREG command)
OUTFILE Subcommand (CATREG command)


MISSING Subcommand (CATREG command)

MISSING (subcommand),MISSING (subcommand),MISSING (subcommand)
CATREG command,CATREG command,CATREG command
CATREG (command),CATREG (command),CATREG (command)
MISSING subcommand,MISSING subcommand,MISSING subcommand

In CATREG, we consider a system missing value, user defined missing values, and values less than 1 as missing values. However, in discretizing a variable (see previous section), values less than 1 are considered as valid values. The MISSING subcommand allows you to indicate how to handle missing values for each variable.

LISTWISE (keyword),LISTWISE (keyword),LISTWISE (keyword)
CATREG command,CATREG command,CATREG command
MODEIMPU (keyword),MODEIMPU (keyword),MODEIMPU (keyword)
CATREG command,CATREG command,CATREG command
EXTRACAT (keyword),EXTRACAT (keyword),EXTRACAT (keyword)
CATREG command,CATREG command,CATREG command
LISTWISE | Exclude cases with missing values on the specified variable(s). The cases used in the analysis are cases without missing values on the variable(s) specified. This is the default applied to all variables, when the MISSING subcommand is omitted or is specified without variable names or keywords. Also, any variable that is not included in the subcommand gets this specification.
MODEIMPU | Impute missing value with mode. All cases are included and the imputations are treated as valid observations for a given variable. When there are multiple modes, the smallest mode is used.
EXTRACAT | Impute missing values on a variable with an extra category indicator. This implies that objects with a missing value are considered to belong to the same (extra) category. This category is treated as nominal, regardless of the optimal scaling level of the variable.

• The ALL keyword may be used to indicate all variables. If it is used, it must be the only variable specification.

• A mode or extra-category imputation is done before listwise deletion.

Related Topics

CATREG
Overview (CATREG command)
Examples (CATREG command)
VARIABLES Subcommand (CATREG command)
ANALYSIS Subcommand (CATREG command)
LEVEL Keyword (CATREG command)
SPORD and SPNOM Keywords (CATREG command)
DISCRETIZATION Subcommand (CATREG command)
GROUPING Keyword (CATREG command)
DISTR Keyword (CATREG command)
SUPPLEMENTARY Subcommand (CATREG command)
INITIAL Subcommand (CATREG command)
MAXITER Subcommand (CATREG command)
CRITITER Subcommand (CATREG command)
REGULARIZATION Subcommand (CATREG command)
RESAMPLE Subcommand (CATREG command)
PRINT Subcommand (CATREG command)
PLOT Subcommand (CATREG command)
SAVE Subcommand (CATREG command)
OUTFILE Subcommand (CATREG command)


SUPPLEMENTARY Subcommand (CATREG command)

SUPPLEMENTARY (subcommand),SUPPLEMENTARY (subcommand),SUPPLEMENTARY (subcommand)
CATREG command,CATREG command,CATREG command
CATREG (command),CATREG (command),CATREG (command)
SUPPLEMENTARY subcommand,SUPPLEMENTARY subcommand,SUPPLEMENTARY subcommand

The SUPPLEMENTARY subcommand specifies the objects that you want to treat as supplementary. You cannot weight supplementary objects (specified weights are ignored). This subcommand can be used to specify test cases.

OBJECT (keyword),OBJECT (keyword),OBJECT (keyword)
CATREG command,CATREG command,CATREG command
OBJECT Supplementary objects. Objects that you want to treat as supplementary are indicated with an object number list in parentheses following OBJECT. The keyword TO is allowed—for example, OBJECT(1 TO 1 3 5 TO 9).

• Supplementary object are exluced from the analysis. The quantifications resulting from the analysis for the active objects are applied to the categories of supplementary objects, and predicted and residual values for supplementary objects are provided.

• If a supplementary object has a category that does not occur in the active data, the following strategies are applied:

If the variable on which the non-occuring category occurs has a numeric or spline scaling level, and the non-occuring category lies within the range of categories in the active data, then interpolation is applied.

If the variable has numeric scaling level and the non-occuring category lies outside the range of categories in the active data, then extrapolation is applied.

Otherwise the case is excluded.

• Excluded cases are represented by a dot (the sysmis symbol) on every saved variable.

Related Topics

CATREG
Overview (CATREG command)
Examples (CATREG command)
VARIABLES Subcommand (CATREG command)
ANALYSIS Subcommand (CATREG command)
LEVEL Keyword (CATREG command)
SPORD and SPNOM Keywords (CATREG command)
DISCRETIZATION Subcommand (CATREG command)
GROUPING Keyword (CATREG command)
DISTR Keyword (CATREG command)
MISSING Subcommand (CATREG command)
INITIAL Subcommand (CATREG command)
MAXITER Subcommand (CATREG command)
CRITITER Subcommand (CATREG command)
REGULARIZATION Subcommand (CATREG command)
RESAMPLE Subcommand (CATREG command)
PRINT Subcommand (CATREG command)
PLOT Subcommand (CATREG command)
SAVE Subcommand (CATREG command)
OUTFILE Subcommand (CATREG command)


INITIAL Subcommand (CATREG command)

INITIAL (subcommand),INITIAL (subcommand),INITIAL (subcommand)
CATREG command,CATREG command,CATREG command
CATREG (command),CATREG (command),CATREG (command)
INITIAL subcommand,INITIAL subcommand,INITIAL subcommand

INITIAL specifies the method used to compute the initial value/configuration.

• The specification on INITIAL is keyword NUMERICAL, RANDOM, MULTISTART or FIXSIGNS. If INITIAL is not specified, NUMERICAL is the default.

NUMERICAL (keyword),NUMERICAL (keyword),NUMERICAL (keyword)
CATREG command,CATREG command,CATREG command
RANDOM (keyword),RANDOM (keyword),RANDOM (keyword)
CATREG command,CATREG command,CATREG command
FIXSIGNS (keyword),FIXSIGNS (keyword),FIXSIGNS (keyword)
CATREG command,CATREG command,CATREG command
MULTISTART (keyword),MULTISTART (keyword),MULTISTART (keyword)
CATREG command,CATREG command,CATREG command
NUMERICAL
Treat all variables as numerical. This is usually best to use when there are only numerical and/or ordinal variables.
RANDOM
Provide a random initial value. This should be used only when there is at least one nominal variable.
MULTISTART(integer|ALL)('savfile'|'dataset')
Multiple Systematic Starts. Multiple final solutions are computed and the best solution is selected. For each solution the same initial values are used, but with different signs for the regression coefficients of variables with ordinal or spline ordinal scaling level. This option is only applicable when there is at least one variable with ordinal or spline ordinal scaling level. With these scaling levels, the CATREG algorithm can result in a suboptimal solution. The optimal solution is always found when multiple systematic starts (using all possible sign patterns for the regression coefficients) are applied. You can specify ALL in parentheses following the keyword to ascertain obtaining the optimal solution. However, the number of all possible sign patterns for the regression coefficients is 2 to the power of q, where q is the number of variables with ordinal or spline ordinal scaling level. So, the number of all possible sign patterns rapidly increases with increasing q.
When q is large, a reduced number of multiple systematic starts can be requested by specifying a value in parentheses following the keyword. This option selects a reduced number of sign patterns by applying a hierarchical strategy combined with a percentage of loss criterion. The value to specify is the threshold for the percentage of loss of variance that a variable suffers due to ordinal restriction. Specify a non-negative value leass than or equal to 100. A variable for which this percentage is below the specified threshold, is not allowed to have a negative sign. So, specifying a threshold value excludes sign patterns in which variables with a loss of variance percentage below the specified threshold have a negative sign. Thus, the higher the threshold, the more sign patterns will be excluded. With this option, obtaining the optimal solution is not garantueed, but the chance of obtaining a suboptimal solution is diminished. Also, if with the reduced number of starts the optimal solution is not found, the chance that the suboptimal solution is much different from the optimal solution is diminished. Note that there is a trade-off between the chance of obtaining a suboptimal solution and the number of starts: a higher threshold results in more reduction of the number of starts, but a higher chance of obtaining a suboptimal solution.
When this keyword is used, a dataset name or filename in parentheses must be specified. The signs of the regression coefficients for each start will be written to this file.
To give an impression of computing time: when q is 15, and all variables have seven categories (in CATREG, CPU time depends upon the number of categories, not upon the number of cases), the number of all starts is 32768, which requires 4 minutes on a 2.2 Ghz computer. When q is 20, the number of all starts is 1048576, requiring 4.5 hours, and when q is 21, the number of all starts is 2097152, requiring 11.5 hours.
FIXSIGNS(integer startnumber)('savfile'|'dataset')
Use fixed signs for the regression coefficients. The signs (indicated by 1 and −1) need to be in (a row of) the specified dataset or file. The integer-valued startnumber to specify is the case number of the row in this file that contains the signs that are to be used. If in a previous run MULTISTART was specified, a file containing the signs for each start was created and can be used here.

Related Topics

CATREG
Overview (CATREG command)
Examples (CATREG command)
VARIABLES Subcommand (CATREG command)
ANALYSIS Subcommand (CATREG command)
LEVEL Keyword (CATREG command)
SPORD and SPNOM Keywords (CATREG command)
DISCRETIZATION Subcommand (CATREG command)
GROUPING Keyword (CATREG command)
DISTR Keyword (CATREG command)
MISSING Subcommand (CATREG command)
SUPPLEMENTARY Subcommand (CATREG command)
MAXITER Subcommand (CATREG command)
CRITITER Subcommand (CATREG command)
REGULARIZATION Subcommand (CATREG command)
RESAMPLE Subcommand (CATREG command)
PRINT Subcommand (CATREG command)
PLOT Subcommand (CATREG command)
SAVE Subcommand (CATREG command)
OUTFILE Subcommand (CATREG command)


MAXITER Subcommand (CATREG command)

MAXITER (subcommand),MAXITER (subcommand),MAXITER (subcommand)
CATREG command,CATREG command,CATREG command
CATREG (command),CATREG (command),CATREG (command)
MAXITER subcommand,MAXITER subcommand,MAXITER subcommand

MAXITER specifies the maximum number of iterations CATREG can go through in its computations. Note that the output starts from the iteration number 0, which is the initial value before any iteration, when INITIAL = NUMERICAL is in effect.

• If MAXITER is not specified, CATREG will iterate up to 100 times.

• The specification on MAXITER is a positive integer indicating the maximum number of iterations. There is no uniquely predetermined (hard coded) maximum for the value that can be used.

Related Topics

CATREG
Overview (CATREG command)
Examples (CATREG command)
VARIABLES Subcommand (CATREG command)
ANALYSIS Subcommand (CATREG command)
LEVEL Keyword (CATREG command)
SPORD and SPNOM Keywords (CATREG command)
DISCRETIZATION Subcommand (CATREG command)
GROUPING Keyword (CATREG command)
DISTR Keyword (CATREG command)
MISSING Subcommand (CATREG command)
SUPPLEMENTARY Subcommand (CATREG command)
INITIAL Subcommand (CATREG command)
CRITITER Subcommand (CATREG command)
REGULARIZATION Subcommand (CATREG command)
RESAMPLE Subcommand (CATREG command)
PRINT Subcommand (CATREG command)
PLOT Subcommand (CATREG command)
SAVE Subcommand (CATREG command)
OUTFILE Subcommand (CATREG command)


CRITITER Subcommand (CATREG command)

CRITITER (subcommand),CRITITER (subcommand),CRITITER (subcommand)
CATREG command,CATREG command,CATREG command
CATREG (command),CATREG (command),CATREG (command)
CRITITER subcommand,CRITITER subcommand,CRITITER subcommand

CRITITER specifies a convergence criterion value. CATREG stops iterating if the difference in fit between the last two iterations is less than the CRITITER value.

• If CRITITER is not specified, the convergence value is 0.00001.

• The specification on CRITITER is any value less than or equal to 0.1 and greater than or equal to 0.000001. (Values less than the lower bound might seriously affect performance. Therefore, they are not supported.)

Related Topics

CATREG
Overview (CATREG command)
Examples (CATREG command)
VARIABLES Subcommand (CATREG command)
ANALYSIS Subcommand (CATREG command)
LEVEL Keyword (CATREG command)
SPORD and SPNOM Keywords (CATREG command)
DISCRETIZATION Subcommand (CATREG command)
GROUPING Keyword (CATREG command)
DISTR Keyword (CATREG command)
MISSING Subcommand (CATREG command)
SUPPLEMENTARY Subcommand (CATREG command)
INITIAL Subcommand (CATREG command)
MAXITER Subcommand (CATREG command)
REGULARIZATION Subcommand (CATREG command)
RESAMPLE Subcommand (CATREG command)
PRINT Subcommand (CATREG command)
PLOT Subcommand (CATREG command)
SAVE Subcommand (CATREG command)
OUTFILE Subcommand (CATREG command)


REGULARIZATION Subcommand (CATREG command)

REGULARIZATION (subcommand),REGULARIZATION (subcommand),REGULARIZATION (subcommand)
CATREG command,CATREG command,CATREG command
CATREG (command),CATREG (command),CATREG (command)
REGULARIZATION subcommand,REGULARIZATION subcommand,REGULARIZATION subcommand

REGULARIZATION specifies the method for regularized regression.

The specification on REGULARIZATION is keyword NONE, RIDGE, LASSO or ENET. If REGULARIZATION is not specified, NONE is the default. Also, a dataset name or filename must be specified. The statistics and coefficients and, if applicable, the estimated prediction error, for all regularized models will be written to this file.

NONE (keyword),NONE (keyword),NONE (keyword)
CATREG command,CATREG command,CATREG command
RIDGE (keyword),RIDGE (keyword),RIDGE (keyword)
CATREG command,CATREG command,CATREG command
LASSO (keyword),LASSO (keyword),LASSO (keyword)
CATREG command,CATREG command,CATREG command
ENET (keyword),ENET (keyword),ENET (keyword)
CATREG command,CATREG command,CATREG command
NONE
 | No regularization.
RIDGE(start value, stop value, increment)('savfile'|'dataset')
 | Ridge Regression. A value list in parentheses following the keyword should be given. The first value specifies the start value of the penalty parameter, the second value the stop value, and the third value specifies the increment.
LASSO(start value, stop value, increment)('savfile'|'dataset')
 | LASSO (Least Absolute Shrinkage and Selection Operator). A value list in parentheses following the keyword should be given. The first value specifies the start value of the penalty parameter, the second value the stop value, and the third value specifies the increment.
ENET(start, stop , incr)(start, stop , incr)('savfile'|'dataset')
 | Elastic Net. Two value lists in parentheses following the keyword should be given. The first list specifies the start, stop, and increment values for the Ridge penalty, the second list specifies the start, stop, and increment values for the Lasso penalty.

• If a REGULARIZATION method is specified without specification of a resample method at the RESAMPLE subcommand or specification of test cases at the SUPPLEMENTARY subcommand, any other keywords than REGU at the PRINT and PLOT subcommands are ignored. Also, the SAVE subcommand, and the TRDATA keyword at the OUTFILE subcommand are ignored.

• If a a resample method is specified at the RESAMPLE subcommand, or if test cases are specified at the SUPPLEMENTARY subcommand, specified PRINT, PLOT, SAVE, and OUTFILE output will be given for the model with lowest prediction error or with lowest Test MSE.

• Output of an analysis with a specific value of the penalty parameter(s) is obtained by setting the start value(s) to specific penalty value(s), the stop value(s) equal to the start value(s) and the increment value(s) to 0.

Related Topics

CATREG
Overview (CATREG command)
Examples (CATREG command)
VARIABLES Subcommand (CATREG command)
ANALYSIS Subcommand (CATREG command)
LEVEL Keyword (CATREG command)
SPORD and SPNOM Keywords (CATREG command)
DISCRETIZATION Subcommand (CATREG command)
GROUPING Keyword (CATREG command)
DISTR Keyword (CATREG command)
MISSING Subcommand (CATREG command)
SUPPLEMENTARY Subcommand (CATREG command)
INITIAL Subcommand (CATREG command)
MAXITER Subcommand (CATREG command)
CRITITER Subcommand (CATREG command)
RESAMPLE Subcommand (CATREG command)
PRINT Subcommand (CATREG command)
PLOT Subcommand (CATREG command)
SAVE Subcommand (CATREG command)
OUTFILE Subcommand (CATREG command)


RESAMPLE Subcommand (CATREG command)

RESAMPLE (subcommand),RESAMPLE (subcommand),RESAMPLE (subcommand)
CATREG command,CATREG command,CATREG command
CATREG (command),CATREG (command),CATREG (command)
RESAMPLE subcommand,RESAMPLE subcommand,RESAMPLE subcommand

RESAMPLE specifies the resampling method used for estimation of the prediction error.

The specification on RESAMPLE is keyword NONE, CROSSVAL or BOOTSTRAP. If RESAMPLE is not specified, NONE is the default.

NONE (keyword),NONE (keyword),NONE (keyword)
CATREG command,CATREG command,CATREG command
CROSSVAL (keyword),CROSSVAL (keyword),CROSSVAL (keyword)
CATREG command,CATREG command,CATREG command
BOOTSTRAP (keyword),BOOTSTRAP (keyword),BOOTSTRAP (keyword)
CATREG command,CATREG command,CATREG command
NONE
 | No resampling.
CROSSVAL(integer)
 | Cross-validation. The keyword can be followed by a positive integer in parentheses specifying the number of folds. If this value is not specified, 10-fold cross-validation is used.
BOOTSTRAP(integer)
 | .632 Bootstap. The keyword can be followed by a positive integer in parentheses specifying the number of bootstrap samples. If this value is not specified, 50 bootstrap samples are used.

Related Topics

CATREG
Overview (CATREG command)
Examples (CATREG command)
VARIABLES Subcommand (CATREG command)
ANALYSIS Subcommand (CATREG command)
LEVEL Keyword (CATREG command)
SPORD and SPNOM Keywords (CATREG command)
DISCRETIZATION Subcommand (CATREG command)
GROUPING Keyword (CATREG command)
DISTR Keyword (CATREG command)
MISSING Subcommand (CATREG command)
SUPPLEMENTARY Subcommand (CATREG command)
INITIAL Subcommand (CATREG command)
MAXITER Subcommand (CATREG command)
CRITITER Subcommand (CATREG command)
REGULARIZATION Subcommand (CATREG command)
PRINT Subcommand (CATREG command)
PLOT Subcommand (CATREG command)
SAVE Subcommand (CATREG command)
OUTFILE Subcommand (CATREG command)


PRINT Subcommand (CATREG command)

PRINT (subcommand),PRINT (subcommand),PRINT (subcommand)
CATREG command,CATREG command,CATREG command
CATREG (command),CATREG (command),CATREG (command)
PRINT subcommand,PRINT subcommand,PRINT subcommand

The PRINT subcommand controls the display of output. The output of the CATREG procedure is always based on the transformed variables. However, the correlations of the original predictor variables can be requested as well by the keyword OCORR. The default keywords are R, COEFF, DESCRIP, and ANOVA. That is, the four keywords are in effect when the PRINT subcommand is omitted or when the PRINT subcommand is given without any keyword. If a keyword is duplicated or it encounters a contradicting keyword, such as /PRINT = R R NONE, then the last one silently becomes effective.

• The REGU keyword is only applicable if a REGULARIZATION method is specified.

R (keyword),R (keyword),R (keyword)
CATREG command,CATREG command,CATREG command
COEFF (keyword),COEFF (keyword),COEFF (keyword)
CATREG command,CATREG command,CATREG command
DESCRIP (keyword),DESCRIP (keyword),DESCRIP (keyword)
CATREG command,CATREG command,CATREG command
HISTORY (keyword),HISTORY (keyword),HISTORY (keyword)
CATREG command,CATREG command,CATREG command
ANOVA (keyword),ANOVA (keyword),ANOVA (keyword)
CATREG command,CATREG command,CATREG command
CORR (keyword),CORR (keyword),CORR (keyword)
CATREG command,CATREG command,CATREG command
OCORR (keyword),OCORR (keyword),OCORR (keyword)
CATREG command,CATREG command,CATREG command
QUANT (keyword),QUANT (keyword),QUANT (keyword)
CATREG command,CATREG command,CATREG command
REGU (keyword),REGU (keyword),REGU (keyword)
CATREG command,CATREG command,CATREG command
NONE (keyword),NONE (keyword),NONE (keyword)
CATREG command,CATREG command,CATREG command
R | Multiple R. Includes R2, adjusted R2, and adjusted R2 taking the optimal scaling into account.
COEFF | Standardized regression coefficients (beta). This option gives three tables: a Coefficients table that includes betas, standard error of the betas, t values, and significance; a Coefficients-Optimal Scaling table, with the standard error of the betas taking the optimal scaling degrees of freedom into account; and a table with the zero-order, part, and partial correlation, Pratt's relative importance measure for the transformed predictors, and the tolerance before and after transformation. If the tolerance for a transformed predictor is lower than the default tolerance value in the Regression procedure (0.0001) but higher than 10E–12, this is reported in an annotation. If the tolerance is lower than 10E–12, then the COEFF computation for this variable is not done and this is reported in an annotation. Note that the regression model includes the intercept coefficient but that its estimate does not exist because the coefficients are standardized.
DESCRIP(varlist) | Descriptive statistics (frequencies, missing values, and mode). The variables in the varlist must be specified on the VARIABLES subcommand but need not appear on the ANALYSIS subcommand. If DESCRIP is not followed by a varlist, Descriptives tables are displayed for all of the variables in the variable list on the ANALYSIS subcommand.
HISTORY | History of iterations. For each iteration, including the starting values for the algorithm, the multiple R and the regression error (square root of (1–multiple R2)) are shown. The increase in multiple R is listed from the first iteration.
ANOVA | Analysis-of-variance tables. This option includes regression and residual sums of squares, mean squares, and F. This options gives two ANOVA tables: one with degrees of freedom for the regression equal to the number of predictor variables and one with degrees of freedom for the regression taking the optimal scaling into account.
CORR | Correlations of the transformed predictors.
OCORR | Correlations of the original predictors.
QUANT(varlist) | Category quantifications. Any variable in the ANALYSIS subcommand may be specified in parentheses after QUANT. If QUANT is not followed by a varlist, Quantification tables are displayed for all variables in the variable list on the ANALYSIS subcommand.
REGU | Penalty values, R-squared, and the regression coefficients for each regularized model, and, if a RESAMPLE method is specified or if supplementary objects (tests cases) are specified, the prediction error or Test MSE.
NONE | No PRINT output is shown. This is to suppress the default PRINT output.

• The keyword TO in a variable list can be used only with variables that are in the ANALYSIS subcommand, and TO applies only to the order of the variables in the ANALYSIS subcommand. For variables that are in the VARIABLES subcommand but not in the ANALYSIS subcommand, the keyword TO cannot be used. For example, if /VARIABLES = v1 TO v5 and /ANALYSIS is v2 v1 v4, then /PRINT QUANT(v1 TO v4) will give two quantification plots, one for v1 and one for v4. (/PRINT QUANT(v1 TO v4 v2 v3 v5) will give quantification tables for v1, v2, v3, v4, and v5.)

Related Topics

CATREG
Overview (CATREG command)
Examples (CATREG command)
VARIABLES Subcommand (CATREG command)
ANALYSIS Subcommand (CATREG command)
LEVEL Keyword (CATREG command)
SPORD and SPNOM Keywords (CATREG command)
DISCRETIZATION Subcommand (CATREG command)
GROUPING Keyword (CATREG command)
DISTR Keyword (CATREG command)
MISSING Subcommand (CATREG command)
SUPPLEMENTARY Subcommand (CATREG command)
INITIAL Subcommand (CATREG command)
MAXITER Subcommand (CATREG command)
CRITITER Subcommand (CATREG command)
REGULARIZATION Subcommand (CATREG command)
RESAMPLE Subcommand (CATREG command)
PLOT Subcommand (CATREG command)
SAVE Subcommand (CATREG command)
OUTFILE Subcommand (CATREG command)


PLOT Subcommand (CATREG command)

PLOT (subcommand),PLOT (subcommand),PLOT (subcommand)
CATREG command,CATREG command,CATREG command
CATREG (command),CATREG (command),CATREG (command)
PLOT subcommand,PLOT subcommand,PLOT subcommand

The PLOT subcommand controls the display of plots.

• The REGU keyword is only applicable if a REGULARIZATION method is specified.

• In this subcommand, if no plot keyword is given, then no plot is created. Further, if the variable list following the plot keyword is empty, then no plot is created, either.

• All of the variables to be plotted must be specified in the ANALYSIS subcommand. Further, for the residual plots, the variables must be independent variables.

TRANS (keyword),TRANS (keyword),TRANS (keyword)
CATREG command,CATREG command,CATREG command
RESID (keyword),RESID (keyword),RESID (keyword)
CATREG command,CATREG command,CATREG command
REGU (keyword),REGU (keyword),REGU (keyword)
CATREG command,CATREG command,CATREG command
TRANS(varlist)(l) | Transformation plots (optimal category quantifications against category indicators). A list of variables must come from the ANALYSIS variable list and must be given in parentheses following the keyword. Further, the user can specify an optional parameter l in parentheses after the variable list in order to control the global upper boundary of category label lengths in the plot. Note that this boundary is applied uniformly to all transformation plots.
RESID(varlist)(l) | Residual plots (residuals when the dependent variable is predicted from all predictor variables in the analysis except the predictor variable in varlist, against category indicators, and the optimal category quantifications multiplied with beta against category indicators). A list of variables must come from the ANALYSIS variable list’s independent variables and must be given in parentheses following the keyword. Further, the user can specify an optional parameter l in parentheses after the variable list in order to control the global upper boundary of category label lengths in the plot. Note that this boundary is applied uniformly to all residual plots.
REGU(valuelist) | Ridge, Lasso, or Elastic Net plot(s), depending on the regularization method specified at the REGULARIZATION subcommand. A value or valuelist of Ridge penalties must be given in parentheses following the keyword if the regularization method is Elastic Net. The Elastic Net method results in multiple plots: a Lasso plot for each value of the Ridge penalty. To obtain all Elastic Net plots, the keyword ALL in stead of a valuelist can be used.

• The category label length parameter (l) can take any non-negative integer less than or equal to 60. If l = 0, values instead of value labels are displayed to indicate the categories on the x axis in the plot. If l is not specified, CATREG assumes that each value label at its full length is displayed as a plot’s category label. If l is an integer larger than 60, then we reset it to 60 but do not issue a warning.

• If a positive value of l is given but if some or all of the values do not have value labels, then for those values, the values themselves are used as the category labels.

• The keyword TO in a variable list can be used only with variables that are in the ANALYSIS subcommand, and TO applies only to the order of the variables in the ANALYSIS subcommand. For variables that are in the VARIABLES subcommand but not in the ANALYSIS subcommand, the keyword TO cannot be used. For example, if /VARIABLES = v1 TO v5 and /ANALYSIS is v2 v1 v4, then /PLOT TRANS(v1 TO v4) will give two transformation plots, one for v1 and for v4. (/PLOT TRANS(v1 TO v4 v2 v3 v5) will give transformation plots for v1, v2, v3, v4, and v5.)

Related Topics

CATREG
Overview (CATREG command)
Examples (CATREG command)
VARIABLES Subcommand (CATREG command)
ANALYSIS Subcommand (CATREG command)
LEVEL Keyword (CATREG command)
SPORD and SPNOM Keywords (CATREG command)
DISCRETIZATION Subcommand (CATREG command)
GROUPING Keyword (CATREG command)
DISTR Keyword (CATREG command)
MISSING Subcommand (CATREG command)
SUPPLEMENTARY Subcommand (CATREG command)
INITIAL Subcommand (CATREG command)
MAXITER Subcommand (CATREG command)
CRITITER Subcommand (CATREG command)
REGULARIZATION Subcommand (CATREG command)
RESAMPLE Subcommand (CATREG command)
PRINT Subcommand (CATREG command)
SAVE Subcommand (CATREG command)
OUTFILE Subcommand (CATREG command)


SAVE Subcommand (CATREG command)

VARIABLES (subcommand),VARIABLES (subcommand),VARIABLES (subcommand)
CATREG command,CATREG command,CATREG command
CATREG (command),CATREG (command),CATREG (command)
VARIABLES subcommand,VARIABLES subcommand,VARIABLES subcommand

The SAVE subcommand is used to add the transformed variables (category indicators replaced with optimal quantifications), the predicted values, and the residuals to the working data file.

TRDATA (keyword),TRDATA (keyword),TRDATA (keyword)
CATREG command,CATREG command,CATREG command
PRED (keyword),PRED (keyword),PRED (keyword)
CATREG command,CATREG command,CATREG command
RES (keyword),RES (keyword),RES (keyword)
CATREG command,CATREG command,CATREG command

Excluded cases are represented by a dot (the sysmis symbol) on every saved variable.

TRDATA | Transformed variables.
PRED | Predicted values.
RES | Residuals.

• A variable rootname can be specified with each of the keywords. Only one rootname can be specified with each keyword, and it can contain up to five characters (if more than one rootname is specified with a keyword, the first rootname is used; if a rootname contains more than five characters, the first five characters are used at most). If a rootname is not specified, the default rootnames (TRA, PRE, and RES) are used.

• CATREG adds two numbers separated by an underscore (_) to the rootname. The formula is ROOTNAMEk_n, where k increments from 1 to identify the source variable names by using the source variables' position numbers in the ANALYSIS subcommand (that is, the dependent variable has the position number 1, and the independent variables have the position numbers 2, 3, ..., etc., as they are listed), and n increments from 1 to identify the CATREG procedures with the successfully executed SAVE subcommands for a given data file in a continuous session. For example, with two predictor variables specified on ANALYSIS, the first set of default names for the transformed data, if they do not exist in the data file, would be TRA1_1 for the dependent variable, and TRA2_1, TRA3_1 for the predictor variables. The next set of default names, if they do not exist in the data file, would be TRA1_2, TRA2_2, TRA3_2. However, if, for example, TRA1_2 already exists in the data file, then the default names should be attempted as TRA1_3, TRA2_3, TRA3_3—that is, the last number increments to the next available integer.

• Variable labels are created automatically. (They are shown in the Procedure Information Table (the Notes table) and can also be displayed in the Data Editor window.)

Related Topics

CATREG
Overview (CATREG command)
Examples (CATREG command)
VARIABLES Subcommand (CATREG command)
ANALYSIS Subcommand (CATREG command)
LEVEL Keyword (CATREG command)
SPORD and SPNOM Keywords (CATREG command)
DISCRETIZATION Subcommand (CATREG command)
GROUPING Keyword (CATREG command)
DISTR Keyword (CATREG command)
MISSING Subcommand (CATREG command)
SUPPLEMENTARY Subcommand (CATREG command)
INITIAL Subcommand (CATREG command)
MAXITER Subcommand (CATREG command)
CRITITER Subcommand (CATREG command)
REGULARIZATION Subcommand (CATREG command)
RESAMPLE Subcommand (CATREG command)
PRINT Subcommand (CATREG command)
PLOT Subcommand (CATREG command)
OUTFILE Subcommand (CATREG command)


OUTFILE Subcommand (CATREG command)

OUTFILE (subcommand),OUTFILE (subcommand),OUTFILE (subcommand)
CATREG command,CATREG command,CATREG command
CATREG (command),CATREG (command),CATREG (command)
OUTFILE subcommand,OUTFILE subcommand,OUTFILE subcommand

The OUTFILE subcommand is used to write the discretized data and/or the transformed data (category indicators replaced with optimal quantifications) to a data file or previously declared data set name. Excluded cases are represented by a dot (the sysmis symbol) on every saved variable.

DISCRDATA (keyword),DISCRDATA (keyword),DISCRDATA (keyword)
CATREG command,CATREG command,CATREG command
TRDATA (keyword),TRDATA (keyword),TRDATA (keyword)
CATREG command,CATREG command,CATREG command
DISCRDATA('savfile'|'dataset') | Discretized data.
TRDATA('savfile'|'dataset') | Transformed variables.

• Filenames should be enclosed in quotes and are stored in the working directory unless a path is included as part of the file specification. Data sets are available during the current session but are not available in subsequent sessions unless you explicitly save them as data files.

• An active data set, in principle, should not be replaced by this subcommand, and the asterisk (*) file specification is not supported. This strategy also prevents the OUTFILE interference with the SAVE subcommand.

Related Topics

CATREG
Overview (CATREG command)
Examples (CATREG command)
VARIABLES Subcommand (CATREG command)
ANALYSIS Subcommand (CATREG command)
LEVEL Keyword (CATREG command)
SPORD and SPNOM Keywords (CATREG command)
DISCRETIZATION Subcommand (CATREG command)
GROUPING Keyword (CATREG command)
DISTR Keyword (CATREG command)
MISSING Subcommand (CATREG command)
SUPPLEMENTARY Subcommand (CATREG command)
INITIAL Subcommand (CATREG command)
MAXITER Subcommand (CATREG command)
CRITITER Subcommand (CATREG command)
REGULARIZATION Subcommand (CATREG command)
RESAMPLE Subcommand (CATREG command)
PRINT Subcommand (CATREG command)
PLOT Subcommand (CATREG command)
SAVE Subcommand (CATREG command)


CCF

CCF (command),CCF (command),CCF (command)
CCF (command),CCF (command),CCF (command)
syntax chart,syntax chart,syntax chart
cross-correlations,cross-correlations,cross-correlations
command syntax,command syntax,command syntax

CCF is available in the Statistics Base option.

CCF VARIABLES= series names [WITH series names]

 [/DIFF={1}]
        {n}

 [/SDIFF={1}]
         {n}

 [/PERIOD=n]

 [/{NOLOG**}]
   {LN     }

 [/SEASONAL]

 [/MXCROSS={7**}]
           {n  }

 [/APPLY[='model name']]

**Default if the subcommand is omitted and there is no corresponding specification on the TSET command.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See CCF Algorithm for computational details for this procedure.

Syntax for the CCF command can be generated from the Cross-Correlations dialog.

Example

CCF VARIABLES = VARX VARY.

Related Topics

Overview (CCF command)
Example (CCF command)
VARIABLES Subcommand (CCF command)
DIFF Subcommand (CCF command)
SDIFF Subcommand (CCF command)
PERIOD Subcommand (CCF command)
LN and NOLOG Subcommands (CCF command)
SEASONAL Subcommand (CCF command)
MXCROSS Subcommand (CCF command)
APPLY Subcommand (CCF command)
References (CCF command)
MODEL NAME
READ MODEL
SAVE MODEL
TDISPLAY


Overview (CCF command)

CCF displays and plots the cross-correlation functions of two or more time series. You can also display and plot the cross-correlations of transformed series by requesting natural log and differencing transformations within the procedure.

Options Collapse Hide details

Options

Modifying the Series. You can request a natural log transformation of the series using the LN subcommand and seasonal and nonseasonal differencing to any degree using the SDIFF and DIFF subcommands. With seasonal differencing, you can also specify the periodicity on the PERIOD subcommand.

Statistical Display. You can control which series are paired by using the keyword WITH. You can specify the range of lags for which you want values displayed and plotted with the MXCROSS subcommand, overriding the maximum specified on TSET. You can also display and plot values at periodic lags only using the SEASONAL subcommand.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is two or more series names. By default, CCF automatically displays the cross-correlation coefficient and standard error for the negative lags (second series leading), the positive lags (first series leading), and the 0 lag for all possible pair combinations in the series list. It also plots the cross-correlations and marks the bounds of two standard errors on the plot. By default, CCF displays and plots values up to 7 lags (lags −7 to +7), or the range specified on TSET.

Subcommand Order Collapse Hide details

Subcommand Order

• Subcommands can be specified in any order.

Syntax Rules Collapse Hide details

Syntax Rules

• The VARIABLES subcommand can be specified only once.

• Other subcommands can be specified more than once, but only the last specification of each one is executed.

Operations Collapse Hide details

Operations

• Subcommand specifications apply to all series named on the CCF command.

• If the LN subcommand is specified, any differencing requested on that CCF command is done on the log-transformed series.

• Confidence limits are displayed in the plot, marking the bounds of two standard errors at each lag.

Limitations Collapse Hide details

Limitations

• A maximum of 1 VARIABLES subcommand. There is no limit on the number of series named on the list.

Related Topics

CCF
Example (CCF command)
VARIABLES Subcommand (CCF command)
DIFF Subcommand (CCF command)
SDIFF Subcommand (CCF command)
PERIOD Subcommand (CCF command)
LN and NOLOG Subcommands (CCF command)
SEASONAL Subcommand (CCF command)
MXCROSS Subcommand (CCF command)
APPLY Subcommand (CCF command)
References (CCF command)


Example (CCF command)

CCF VARIABLES = VARX VARY
  /LN
  /DIFF=1
  /SDIFF=1
  /PERIOD=12
  /MXCROSS=25.

• This example produces a plot of the cross-correlation function for VARX and VARY after a natural log transformation, differencing, and seasonal differencing have been applied to both series. Along with the plot, the cross-correlation coefficients and standard errors are displayed for each lag.

• LN transforms the data using the natural logarithm (base e) of each series.

• DIFF differences each series once.

• SDIFF and PERIOD apply one degree of seasonal differencing with a periodicity of 12.

• MXCROSS specifies 25 for the maximum range of positive and negative lags for which output is to be produced (lags −25 to +25).

Related Topics

CCF
Overview (CCF command)
VARIABLES Subcommand (CCF command)
DIFF Subcommand (CCF command)
SDIFF Subcommand (CCF command)
PERIOD Subcommand (CCF command)
LN and NOLOG Subcommands (CCF command)
SEASONAL Subcommand (CCF command)
MXCROSS Subcommand (CCF command)
APPLY Subcommand (CCF command)
References (CCF command)


VARIABLES Subcommand (CCF command)

CCF (command),CCF (command),CCF (command)
VARIABLES subcommand,VARIABLES subcommand,VARIABLES subcommand
VARIABLES (subcommand),VARIABLES (subcommand),VARIABLES (subcommand)
CCF command,CCF command,CCF command

VARIABLES specifies the series to be plotted and is the only required subcommand.

• The minimum VARIABLES specification is a pair of series names.

• If you do not use the keyword WITH, each series is paired with every other series in the list.

• If you specify the keyword WITH, every series named before WITH is paired with every series named after WITH.

Example

CCF VARIABLES=VARA VARB WITH VARC VARD.

• This example displays and plots the cross-correlation functions for the following pairs of series: VARA with VARC, VARA with VARD, VARB with VARC, and VARB with VARD.

• VARA is not paired with VARB, and VARC is not paired with VARD.

Related Topics

CCF
Overview (CCF command)
Example (CCF command)
DIFF Subcommand (CCF command)
SDIFF Subcommand (CCF command)
PERIOD Subcommand (CCF command)
LN and NOLOG Subcommands (CCF command)
SEASONAL Subcommand (CCF command)
MXCROSS Subcommand (CCF command)
APPLY Subcommand (CCF command)
References (CCF command)


DIFF Subcommand (CCF command)

CCF (command),CCF (command),CCF (command)
DIFF subcommand,DIFF subcommand,DIFF subcommand
DIFF (subcommand),DIFF (subcommand),DIFF (subcommand)
CCF command,CCF command,CCF command
difference transformation,difference transformation,difference transformation
CCF command,CCF command,CCF command
CCF (command),CCF (command),CCF (command)
transforming values,transforming values,transforming values

DIFF specifies the degree of differencing used to convert a nonstationary series to a stationary one with a constant mean and variance before obtaining cross-correlations.

• You can specify 0 or any positive integer on DIFF.

• If DIFF is specified without a value, the default is 1.

• The number of values used in the calculations decreases by 1 for each degree of differencing.

Example

CCF VARIABLES = VARX VARY
  /DIFF=1.

• This command differences series VARX and VARY before calculating and plotting the cross-correlation function.

Related Topics

CCF
Overview (CCF command)
Example (CCF command)
VARIABLES Subcommand (CCF command)
SDIFF Subcommand (CCF command)
PERIOD Subcommand (CCF command)
LN and NOLOG Subcommands (CCF command)
SEASONAL Subcommand (CCF command)
MXCROSS Subcommand (CCF command)
APPLY Subcommand (CCF command)
References (CCF command)


SDIFF Subcommand (CCF command)

CCF (command),CCF (command),CCF (command)
SDIFF subcommand,SDIFF subcommand,SDIFF subcommand
SDIFF (subcommand),SDIFF (subcommand),SDIFF (subcommand)
CCF command,CCF command,CCF command
seasonal difference transformation,seasonal difference transformation,seasonal difference transformation
CCF command,CCF command,CCF command

If the series exhibits seasonal or periodic patterns, you can use SDIFF to seasonally difference the series before obtaining cross-correlations.

• The specification on SDIFF indicates the degree of seasonal differencing and can be 0 or any positive integer.

• If SDIFF is specified without a value, the degree of seasonal differencing defaults to 1.

• The number of seasons used in the calculations decreases by 1 for each degree of seasonal differencing.

• The length of the period used by SDIFF is specified on the PERIOD subcommand. If the PERIOD subcommand is not specified, the periodicity established on the TSET or DATE command is used (see the PERIOD subcommand).

Example

CCF VARIABLES = VAR01 WITH VAR02 VAR03
  /SDIFF=1.

• In this example, one degree of seasonal differencing using the periodicity established on the TSET or DATE command is applied to the three series.

• Two cross-correlation functions are then plotted, one for the pair VAR01 and VAR02, and one for the pair VAR01 and VAR03.

Related Topics

CCF
Overview (CCF command)
Example (CCF command)
VARIABLES Subcommand (CCF command)
DIFF Subcommand (CCF command)
PERIOD Subcommand (CCF command)
LN and NOLOG Subcommands (CCF command)
SEASONAL Subcommand (CCF command)
MXCROSS Subcommand (CCF command)
APPLY Subcommand (CCF command)
References (CCF command)


PERIOD Subcommand (CCF command)

CCF (command),CCF (command),CCF (command)
PERIOD subcommand,PERIOD subcommand,PERIOD subcommand
PERIOD (subcommand),PERIOD (subcommand),PERIOD (subcommand)
CCF command,CCF command,CCF command
periodicity,periodicity,periodicity
CCF command,CCF command,CCF command
CCF (command),CCF (command),CCF (command)
specifying periodicity,specifying periodicity,specifying periodicity

PERIOD indicates the length of the period to be used by the SDIFF or SEASONAL subcommands.

• The specification on PERIOD indicates how many observations are in one period or season and can be any positive integer greater than 1.

• PERIOD is ignored if it is used without the SDIFF or SEASONAL subcommands.

• If PERIOD is not specified, the periodicity established on TSET PERIOD is in effect. If TSET PERIOD is not specified, the periodicity established on the DATE command is used. If periodicity was not established anywhere, the SDIFF and SEASONAL subcommands will not be executed.

Example

CCF VARIABLES = VARX WITH VARY
  /SDIFF=1
  /PERIOD=6.

• This command applies one degree of seasonal differencing with a periodicity of 6 to both series and computes and plots the cross-correlation function.

Related Topics

CCF
Overview (CCF command)
Example (CCF command)
VARIABLES Subcommand (CCF command)
DIFF Subcommand (CCF command)
SDIFF Subcommand (CCF command)
LN and NOLOG Subcommands (CCF command)
SEASONAL Subcommand (CCF command)
MXCROSS Subcommand (CCF command)
APPLY Subcommand (CCF command)
References (CCF command)


LN and NOLOG Subcommands (CCF command)

CCF (command),CCF (command),CCF (command)
LN/NOLOG subcommands,LN/NOLOG subcommands,LN/NOLOG subcommands
LN (subcommand),LN (subcommand),LN (subcommand)
CCF command,CCF command,CCF command
NOLOG (subcommand),NOLOG (subcommand),NOLOG (subcommand)
CCF command,CCF command,CCF command
natural log transformation,natural log transformation,natural log transformation
CCF command,CCF command,CCF command

LN transforms the data using the natural logarithm (base e) of each series and is used to remove varying amplitude over time. NOLOG indicates that the data should not be log transformed. NOLOG is the default.

• There are no additional specifications on LN or NOLOG.

• Only the last LN or NOLOG subcommand on a CCF command is executed.

• LN and NOLOG apply to all series named on the CCF command.

• If a natural log transformation is requested and any values in either series in a pair are less than or equal to 0, the CCF for that pair will not be produced because nonpositive values cannot be log transformed.

• NOLOG is generally used with an APPLY subcommand to turn off a previous LN specification.

Example

CCF VARIABLES = VAR01 VAR02
  /LN.

• This command transforms the series VAR01 and VAR02 using the natural log before computing cross-correlations.

Related Topics

CCF
Overview (CCF command)
Example (CCF command)
VARIABLES Subcommand (CCF command)
DIFF Subcommand (CCF command)
SDIFF Subcommand (CCF command)
PERIOD Subcommand (CCF command)
SEASONAL Subcommand (CCF command)
MXCROSS Subcommand (CCF command)
APPLY Subcommand (CCF command)
References (CCF command)


SEASONAL Subcommand (CCF command)

CCF (command),CCF (command),CCF (command)
SEASONAL subcommand,SEASONAL subcommand,SEASONAL subcommand
SEASONAL (subcommand),SEASONAL (subcommand),SEASONAL (subcommand)
CCF command,CCF command,CCF command
CCF (command),CCF (command),CCF (command)
periodic lags,periodic lags,periodic lags

Use SEASONAL to focus attention on the seasonal component by displaying and plotting cross-correlations at periodic lags only.

• There are no additional specifications on SEASONAL.

• If SEASONAL is specified, values are displayed and plotted at the periodic lags indicated on the PERIOD subcommand. If no PERIOD subcommand is specified, the periodicity first defaults to the TSET PERIOD specification and then to the DATE command periodicity. If periodicity is not established anywhere, SEASONAL is ignored (see the PERIOD subcommand).

• If SEASONAL is not used, cross-correlations for all lags up to the maximum are displayed and plotted.

Example

CCF VARIABLES = VAR01 VAR02 VAR03
  /SEASONAL.

• This command plots and displays cross-correlations at periodic lags.

• By default, the periodicity established on TSET PERIOD (or the DATE command) is used. If no periodicity is established, cross-correlations for all lags are displayed and plotted.

Related Topics

CCF
Overview (CCF command)
Example (CCF command)
VARIABLES Subcommand (CCF command)
DIFF Subcommand (CCF command)
SDIFF Subcommand (CCF command)
PERIOD Subcommand (CCF command)
LN and NOLOG Subcommands (CCF command)
MXCROSS Subcommand (CCF command)
APPLY Subcommand (CCF command)
References (CCF command)


MXCROSS Subcommand (CCF command)

CCF (command),CCF (command),CCF (command)
MXCROSS subcommand,MXCROSS subcommand,MXCROSS subcommand
MXCROSS (subcommand),MXCROSS (subcommand),MXCROSS (subcommand)
CCF command,CCF command,CCF command

MXCROSS specifies the maximum range of lags for a series.

• The specification on MXCROSS must be a positive integer.

• If MXCROSS is not specified, the default range is the value set on TSET MXCROSS. If TSET MXCROSS is not specified, the default is 7 (lags -7 to +7).

• The value specified on the MXCROSS subcommand overrides the value set on TSET MXCROSS.

Example

CCF VARIABLES = VARX VARY
  /MXCROSS=5.

• The maximum number of cross-correlations can range from lag −5 to lag +5.

Related Topics

CCF
Overview (CCF command)
Example (CCF command)
VARIABLES Subcommand (CCF command)
DIFF Subcommand (CCF command)
SDIFF Subcommand (CCF command)
PERIOD Subcommand (CCF command)
LN and NOLOG Subcommands (CCF command)
SEASONAL Subcommand (CCF command)
APPLY Subcommand (CCF command)
References (CCF command)


APPLY Subcommand (CCF command)

CCF (command),CCF (command),CCF (command)
APPLY subcommand,APPLY subcommand,APPLY subcommand
APPLY (subcommand),APPLY (subcommand),APPLY (subcommand)
CCF command,CCF command,CCF command
CCF (command),CCF (command),CCF (command)
using a previously defined model,using a previously defined model,using a previously defined model

APPLY allows you to use a previously defined CCF model without having to repeat the specifications.

• The only specification on APPLY is the name of a previous model enclosed in single or double quotes. If a model name is not specified, the model specified on the previous CCF command is used.

• To change one or more model specifications, specify the subcommands of only those portions you want to change after the APPLY subcommand.

• If no series are specified on the command, the series that were originally specified with the model being applied are used.

• To change the series used with the model, enter new series names before or after the APPLY subcommand.

Example

CCF VARIABLES = VARX VARY
  /LN
  /DIFF=1
  /MXCROSS=25.
CCF VARIABLES = VARX VARY
  /LN
  /DIFF=1
  /SDIFF=1
  /PERIOD=12
  /MXCROSS=25.
CCF VARIABLES = VARX VAR01
  /APPLY.
CCF VARIABLES = VARX VAR01
  /APPLY='MOD_1'.

• The first command displays and plots the cross-correlation function for VARX and VARY after each series is log transformed and differenced. The maximum range is set to 25 lags. This model is assigned the name MOD_1 as soon as the command is executed.

• The second command displays and plots the cross-correlation function for VARX and VARY after each series is log transformed, differenced, and seasonally differenced with a periodicity of 12. The maximum range is again set to 25 lags. This model is assigned the name MOD_2.

• The third command requests the cross-correlation function for the series VARX and VAR01 using the same model and the same range of lags as used for MOD_2.

• The fourth command applies MOD_1 (from the first command) to the series VARX and VAR01.

Related Topics

CCF
Overview (CCF command)
Example (CCF command)
VARIABLES Subcommand (CCF command)
DIFF Subcommand (CCF command)
SDIFF Subcommand (CCF command)
PERIOD Subcommand (CCF command)
LN and NOLOG Subcommands (CCF command)
SEASONAL Subcommand (CCF command)
MXCROSS Subcommand (CCF command)
References (CCF command)


References (CCF command)

Box, G. E. P., and G. M. Jenkins. 1976. Time series analysis: Forecasting and control, Rev. ed. San Francisco: Holden-Day.

Related Topics

CCF
Overview (CCF command)
Example (CCF command)
VARIABLES Subcommand (CCF command)
DIFF Subcommand (CCF command)
SDIFF Subcommand (CCF command)
PERIOD Subcommand (CCF command)
LN and NOLOG Subcommands (CCF command)
SEASONAL Subcommand (CCF command)
MXCROSS Subcommand (CCF command)
APPLY Subcommand (CCF command)


CD

CD (command),CD (command),CD (command)
CD (command),CD (command),CD (command)
syntax chart,syntax chart,syntax chart
release history,release history,release history
directory location,directory location,directory location
changing the working directory,changing the working directory,changing the working directory
file paths,file paths,file paths
paths,paths,paths
in file specifications,in file specifications,in file specifications
CD 'directory specification'.

This command takes effect immediately. It does not read the active dataset or execute pending transformations. See the topic Command Order for more information.

Release History Collapse Hide details

Release History

Release 13.0

• Command introduced.

Example

CD '/main/sales/consumer_division/2004/data'.
GET FILE='julydata.sav'.
INSERT FILE='../commands/monthly_report.sps'.

Related Topics

Overview (CD command)
Examples (CD command)
Preserving and Restoring the Working Directory Setting (CD command)


Overview (CD command)

CD changes the working directory location, making it possible to use relative paths for subsequent file specifications in command syntax, including data files specified on commands such as GET and SAVE, command syntax files specified on commands such as INSERT and INCLUDE, and output files specified on commands such as OMS and WRITE.

Basic Specification Collapse Hide details

Basic Specification

The only specification is the command name followed by a quoted directory specification.

• The directory specification can contain a drive specification.

• The directory specification can be a previously defined file handle (see the FILE HANDLE command for more information).

• The directory specification can include paths defined in operating system environment variables.

Operations Collapse Hide details

Operations

The change in the working directory remains in effect until some other condition occurs that changes the working directory during the session, such as explicitly changing the working directory on another CD command or an INSERT command with a CD keyword that specifies a different directory.

• If the directory path is a relative path, it is relative to the current working directory.

• If the directory specification contains a filename, the filename portion is ignored.

• If the last (most-nested) subdirectory in the directory specification does not exist, then it is assumed to be a filename and is ignored.

• If any directory specification prior to the last directory (or file) is invalid, the command will fail, and an error message is issued.

Limitations Collapse Hide details

Limitations

The CD command has no effect on the relative directory location for SET command file specifications, including JOURNAL , CTEMPLATE, and TLOOK. File specifications on the SET command should include complete path information.

Related Topics

CD
Examples (CD command)
Preserving and Restoring the Working Directory Setting (CD command)


Examples (CD command)

Working with Absolute Paths

CD '/sales/data/july.sav'.
CD '/sales/data/july'.
CD '/sales/data/july'.

If /sales/data is a valid directory:

• The first CD command will ignore the filename july.sav and set the working directory to /sales/data.

• If the subdirectory july exists, the second CD command will change the working directory to /sales/data/july; otherwise, it will change the working directory to /sales/data.

• The third CD command will fail if the dqta subdirectory doesn't exist.

Working with Relative Paths

CD '/sales'.
CD 'data'.
CD 'july'.

If /sales is a valid directory:

• The first CD command will change the working directory to /sales.

• The relative path in the second CD command will change the working directory to /sales/data.

• The relative path in the third CD command will change the working directory to /sales/data/july.

Related Topics

CD
Overview (CD command)
Preserving and Restoring the Working Directory Setting (CD command)


Preserving and Restoring the Working Directory Setting (CD command)

The original working directory can be preserved with the PRESERVE command and later restored with the RESTORE command.

Example

CD '/sales/data'.
PRESERVE.
CD '/commands/examples'.
RESTORE.

• PRESERVE retains the working directory location set on the preceding CD command.

• The second CD command changes the working directory.

• RESTORE resets the working directory back to /sales/data.

Related Topics

CD
Overview (CD command)
Examples (CD command)


CLEAR TIME PROGRAM

CLEAR TIME PROGRAM (command),CLEAR TIME PROGRAM (command),CLEAR TIME PROGRAM (command)
syntax chart,syntax chart,syntax chart
CLEAR TIME PROGRAM.

This command takes effect immediately. It does not read the active dataset or execute pending transformations. See the topic Command Order for more information.

Related Topics

Overview (CLEAR TIME PROGRAM command)
Example (CLEAR TIME PROGRAM command)
TIME PROGRAM
COXREG
CSCOXREG


Overview (CLEAR TIME PROGRAM command)

CLEAR TIME PROGRAM deletes all time-dependent covariates created in the previous TIME PROGRAM command. It is primarily used in interactive mode to remove temporary variables associated with the time program so that you can redefine time-dependent covariates. It is not necessary to use this command if you have run a procedure that executes the TIME PROGRAM transformations, since all temporary variables created by TIME PROGRAM are automatically deleted.

Basic Specification Collapse Hide details

Basic Specification

The only specification is the command itself. CLEAR TIME PROGRAM has no additional specifications.

Related Topics

CLEAR TIME PROGRAM
Example (CLEAR TIME PROGRAM command)


Example (CLEAR TIME PROGRAM command)

TIME PROGRAM.
COMPUTE Z=AGE + T_.

CLEAR TIME PROGRAM.

TIME PROGRAM.
COMPUTE Z=AGE + T_ - 18.

COXREG SURVIVAL WITH Z
  /STATUS SURVSTA EVENT(1).

• The first TIME PROGRAM command defines the time-dependent covariate Z as the current age.

• The CLEAR TIME PROGRAM command deletes the time-dependent covariate Z.

• The second TIME PROGRAM command redefines the time-dependent covariate Z as the number of years since turning 18.. Z is then specified as a covariate in COXREG.

Related Topics

CLEAR TIME PROGRAM
Overview (CLEAR TIME PROGRAM command)


CLEAR TRANSFORMATIONS

data transformations,data transformations,data transformations
clearing,clearing,clearing
CLEAR TRANSFORMATIONS (command),CLEAR TRANSFORMATIONS (command),CLEAR TRANSFORMATIONS (command)
CLEAR TRANSFORMATIONS (command),CLEAR TRANSFORMATIONS (command),CLEAR TRANSFORMATIONS (command)
syntax chart,syntax chart,syntax chart
CLEAR TRANSFORMATIONS

This command takes effect immediately. It does not read the active dataset or execute pending transformations. See the topic Command Order for more information.

Related Topics

Overview (CLEAR TRANSFORMATIONS command)
Examples (CLEAR TRANSFORMATIONS command)


Overview (CLEAR TRANSFORMATIONS command)

CLEAR TRANSFORMATIONS discards previous data transformation commands.

Basic Specification Collapse Hide details

Basic Specification

The only specification is the command itself. CLEAR TRANSFORMATIONS has no additional specifications.

Operations Collapse Hide details

Operations

• CLEAR TRANSFORMATIONS discards all data transformation commands that have accumulated since the last procedure.

• CLEAR TRANSFORMATIONS has no effect if a command file is submitted to your operating system for execution. It generates a warning when a command file is present.

• Be sure to delete CLEAR TRANSFORMATIONS and any unwanted transformation commands from the journal file if you plan to submit the file to the operating system for batch mode execution. Otherwise, the unwanted transformations will cause problems.

Related Topics

CLEAR TRANSFORMATIONS
Examples (CLEAR TRANSFORMATIONS command)


Examples (CLEAR TRANSFORMATIONS command)

GET FILE="/data/query.sav".
FREQUENCIES=ITEM1 ITEM2 ITEM3.
RECODE ITEM1, ITEM2, ITEM3 (0=1) (1=0) (2=-1).
COMPUTE INDEXQ=(ITEM1 + ITEM2 + ITEM3)/3.
VARIABLE LABELS INDEXQ 'SUMMARY INDEX OF QUESTIONS'.
CLEAR TRANSFORMATIONS.
DISPLAY DICTIONARY.

• The GET and FREQUENCIES commands are executed.

• The RECODE, COMPUTE, and VARIABLE LABELS commands are transformations. They do not affect the data until the next procedure is executed.

• The CLEAR TRANSFORMATIONS command discards the RECODE, COMPUTE, and VARIABLE LABELS commands.

• The DISPLAY command displays the working file dictionary. Data values and labels are exactly as they were when the FREQUENCIES command was executed. The variable INDEXQ does not exist because CLEAR TRANSFORMATIONS discarded the COMPUTE command.

Related Topics

CLEAR TRANSFORMATIONS
Overview (CLEAR TRANSFORMATIONS command)


CLUSTER

Hierarchical Cluster Analysis,Hierarchical Cluster Analysis,Hierarchical Cluster Analysis
command syntax,command syntax,command syntax
CLUSTER (command),CLUSTER (command),CLUSTER (command)
CLUSTER (command),CLUSTER (command),CLUSTER (command)
syntax chart,syntax chart,syntax chart

CLUSTER is available in the Statistics Base option.

CLUSTER varlist [/MISSING=[EXCLUDE**] [INCLUDE]]

[/MEASURE=[{SEUCLID**         }]
           {EUCLID            }
           {COSINE            }
           {CORRELATION       }
           {BLOCK             }
           {CHEBYCHEV         }
           {POWER(p,r)        }
           {MINKOWSKI(p)      }
           {CHISQ             }
           {PH2               }
           {RR[(p[,np])]      }
           {SM[(p[,np])]      }
           {JACCARD[(p[,np])] }
           {DICE[(p[,np])]    }
           {SS1[(p[,np])]     }
           {RT[(p[,np])]      }
           {SS2[(p[,np])]     }
           {K1[(p[,np])]      }
           {SS3[(p[,np])]     }
           {K2[(p[,np])]      }
           {SS4[(p[,np])]     }
           {HAMANN[(p[,np])]  }
           {OCHIAI[(p[,np])]  }
           {SS5[(p[,np])]     }
           {PHI[(p[,np])]     }
           {LAMBDA[(p[,np])]  }
           {D[(p[,np])]       }
           {Y[(p[,np])]       }
           {Q[(p[,np])]       }
           {BEUCLID[(p[,np])] }
           {SIZE[(p[,np])]    }
           {PATTERN[(p[,np])] }
           {BSEUCLID[(p[,np])]}
           {BSHAPE[(p[,np])]  }
           {DISPER[(p[,np])]  }
           {VARIANCE[(p[,np])]}
           {BLWMN[(p[,np])]   }

[/METHOD={BAVERAGE**}[(rootname)] [...]]
         {WAVERAGE  }
         {SINGLE    }
         {COMPLETE  }
         {CENTROID  }
         {MEDIAN    }
         {WARD      }
         {DEFAULT** }

 [/SAVE=CLUSTER({level  })]  [/ID=varname]
                {min,max}

 [/PRINT=[CLUSTER({level  })] [DISTANCE] [SCHEDULE**] [NONE]]
                  {min,max}

 [/PLOT=[VICICLE**[(min[,max[,inc]])]] [DENDROGRAM] [NONE]]
        [HICICLE[(min[,max[,inc]])]]

 [/MATRIX=[IN({'savfile'|'dataset'})] [OUT({'savfile'|'dataset'})]]
              {*                  }        {*                  }

** Default if the subcommand or keyword is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See CLUSTER Algorithms for computational details for this procedure.

Syntax for the CLUSTER command can be generated from the Hierarchical Cluster Analysis dialog.

Example

CLUSTER V1 TO V4
 /PLOT=DENDROGRAM
 /PRINT=CLUSTER (2,4).

Related Topics

Overview (CLUSTER command)
Example (CLUSTER command)
Variable List (CLUSTER command)
MEASURE Subcommand (CLUSTER command)
METHOD Subcommand (CLUSTER command)
SAVE Subcommand (CLUSTER command)
ID Subcommand (CLUSTER command)
PRINT Subcommand (CLUSTER command)
PLOT Subcommand (CLUSTER command)
MISSING Subcommand (CLUSTER command)
MATRIX Subcommand (CLUSTER command)


Overview (CLUSTER command)

CLUSTER produces hierarchical clusters of items based on distance measures of dissimilarity or similarity. The items being clustered are usually cases from the active dataset, and the distance measures are computed from their values for one or more variables. You can also cluster variables if you read in a matrix measuring distances between variables. Cluster analysis is discussed in Anderberg (1973).

Options Collapse Hide details

Options

Cluster Measures and Methods. You can specify one of 37 similarity or distance measures on the MEASURE subcommand and any of the seven methods on the METHOD subcommand.

New Variables. You can save cluster membership for specified solutions as new variables in the active dataset using the SAVE subcommand.

Display and Plots. You can display cluster membership, the distance or similarity matrix used to cluster variables or cases, and the agglomeration schedule for the cluster solution with the PRINT subcommand. You can request either a horizontal or vertical icicle plot or a dendrogram of the cluster solution and control the cluster levels displayed in the icicle plot with the PLOT subcommand. You can also specify a variable to be used as a case identifier in the display on the ID subcommand.

Matrix Input and Output. You can write out the distance matrix and use it in subsequent CLUSTER, PROXIMITIES, or ALSCAL analyses or read in matrices produced by other CLUSTER or PROXIMITIES procedures using the MATRIX subcommand.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is a variable list. CLUSTER assumes that the items being clustered are cases and uses the squared Euclidean distances between cases on the variables in the analysis as the measure of distance.

Subcommand Order Collapse Hide details

Subcommand Order

• The variable list must be specified first.

• The remaining subcommands can be specified in any order.

Syntax Rules Collapse Hide details

Syntax Rules

• The variable list and subcommands can each be specified once.

• More than one clustering method can be specified on the METHOD subcommand.

Operations Collapse Hide details

Operations

The CLUSTER procedure involves four steps:

• First, CLUSTER obtains distance measures of similarities between or distances separating initial clusters (individual cases or individual variables if the input is a matrix measuring distances between variables).

• Second, it combines the two nearest clusters to form a new cluster.

• Third, it recomputes similarities or distances of existing clusters to the new cluster.

• It then returns to the second step until all items are combined in one cluster.

This process yields a hierarchy of cluster solutions, ranging from one overall cluster to as many clusters as there are items being clustered. Clusters at a higher level can contain several lower-level clusters. Within each level, the clusters are disjoint (each item belongs to only one cluster).

• CLUSTER identifies clusters in solutions by sequential integers (1, 2, 3, and so on).

CLUSTER (command),CLUSTER (command),CLUSTER (command)
limitations,limitations,limitations
Limitations Collapse Hide details

Limitations

• CLUSTER stores cases and a lower-triangular matrix of proximities in memory. Storage requirements increase rapidly with the number of cases. You should be able to cluster 100 cases using a small number of variables in an 80K workspace.

• CLUSTER does not honor weights.

Related Topics

CLUSTER
Example (CLUSTER command)
Variable List (CLUSTER command)
MEASURE Subcommand (CLUSTER command)
METHOD Subcommand (CLUSTER command)
SAVE Subcommand (CLUSTER command)
ID Subcommand (CLUSTER command)
PRINT Subcommand (CLUSTER command)
PLOT Subcommand (CLUSTER command)
MISSING Subcommand (CLUSTER command)
MATRIX Subcommand (CLUSTER command)


Example (CLUSTER command)

CLUSTER V1 TO V4
  /PLOT=DENDROGRAM
  /PRINT=CLUSTER (2 4).

• This example clusters cases based on their values for all variables between and including V1 and V4 in the active dataset.

• The analysis uses the default measure of distance (squared Euclidean) and the default clustering method (average linkage between groups).

• PLOT requests a dendrogram.

• PRINT displays a table of the cluster membership of each case for the two-, three-, and four-cluster solutions.

Used with the PROXIMITIES command to create distances

PROXIMITIES  price engine_s horsepow wheelbas width length
  curb_wgt fuel_cap mpg
  /MATRIX OUT  ('C:/TEMP/spssclus.tmp')
  /VIEW= CASE
  /MEASURE= SEUCLID
  /PRINT  NONE
  /ID= model
  /STANDARDIZE= VARIABLE Z .
CLUSTER
  /MATRIX IN  ('C:/TEMP/spssclus.tmp')
  /METHOD SINGLE
  /ID= model
  /PRINT SCHEDULE
  /PLOT DENDROGRAM.
ERASE FILE= 'C:/TEMP/spssclus.tmp'.

• The PROXIMITIES command creates distances suitable for cluster analysis using squared Euclidean distance as the measure and z score standardization of the variables, and saves them to a temporary data file using the MATRIX subcommand.

• The CLUSTER command reads the distances using the MATRIX subcommand.

• The METHOD subcommand specifies a single linkage analysis.

• The ID subcommand specifies that values of model should be used to identify cases in the output.

• The PRINT subcommand requests the agglomeration schedule.

• The PLOT subcommand requests a dendrogram.

• The ERASE command removes the temporary file.

For discussion of output from this syntax and to place the example in context, see Using HCA to Classify Automobiles .

Related Topics

CLUSTER
Overview (CLUSTER command)
Variable List (CLUSTER command)
MEASURE Subcommand (CLUSTER command)
METHOD Subcommand (CLUSTER command)
SAVE Subcommand (CLUSTER command)
ID Subcommand (CLUSTER command)
PRINT Subcommand (CLUSTER command)
PLOT Subcommand (CLUSTER command)
MISSING Subcommand (CLUSTER command)
MATRIX Subcommand (CLUSTER command)


Variable List (CLUSTER command)

CLUSTER (command),CLUSTER (command),CLUSTER (command)
variable list,variable list,variable list

The variable list identifies the variables used to compute similarities or distances between cases.

• The variable list is required except when matrix input is used. It must be specified before the optional subcommands.

• If matrix input is used, the variable list can be omitted. The names for the items in the matrix are used to compute similarities or distances.

• You can specify a variable list to override the names for the items in the matrix. This allows you to read in a subset of cases for analysis. Specifying a variable that does not exist in the matrix results in an error.

Related Topics

CLUSTER
Overview (CLUSTER command)
Example (CLUSTER command)
MEASURE Subcommand (CLUSTER command)
METHOD Subcommand (CLUSTER command)
SAVE Subcommand (CLUSTER command)
ID Subcommand (CLUSTER command)
PRINT Subcommand (CLUSTER command)
PLOT Subcommand (CLUSTER command)
MISSING Subcommand (CLUSTER command)
MATRIX Subcommand (CLUSTER command)


MEASURE Subcommand (CLUSTER command)

CLUSTER (command),CLUSTER (command),CLUSTER (command)
MEASURE subcommand,MEASURE subcommand,MEASURE subcommand
MEASURE (subcommand),MEASURE (subcommand),MEASURE (subcommand)
CLUSTER command,CLUSTER command,CLUSTER command
CLUSTER (command),CLUSTER (command),CLUSTER (command)
distance measures,distance measures,distance measures

MEASURE specifies the distance or similarity measure used to cluster cases.

• If the MEASURE subcommand is omitted or included without specifications, squared Euclidean distances are used.

• Only one measure can be specified.

Related Topics

CLUSTER
Overview (CLUSTER command)
Example (CLUSTER command)
Variable List (CLUSTER command)
METHOD Subcommand (CLUSTER command)
SAVE Subcommand (CLUSTER command)
ID Subcommand (CLUSTER command)
PRINT Subcommand (CLUSTER command)
PLOT Subcommand (CLUSTER command)
MISSING Subcommand (CLUSTER command)
MATRIX Subcommand (CLUSTER command)
Measures for Interval Data (CLUSTER command)
Measures for Frequency Count Data (CLUSTER command)
Measures for Binary Data (CLUSTER command)


Measures for Interval Data (CLUSTER command)

For interval data, use any one of the following keywords on MEASURE:

squared Euclidean distance,squared Euclidean distance,squared Euclidean distance
CLUSTER command,CLUSTER command,CLUSTER command
SEUCLID (keyword),SEUCLID (keyword),SEUCLID (keyword)
CLUSTER command,CLUSTER command,CLUSTER command
EUCLID (keyword),EUCLID (keyword),EUCLID (keyword)
CLUSTER command,CLUSTER command,CLUSTER command
Euclidean distance,Euclidean distance,Euclidean distance
CLUSTER command,CLUSTER command,CLUSTER command
CORRELATION (keyword),CORRELATION (keyword),CORRELATION (keyword)
CLUSTER command,CLUSTER command,CLUSTER command
Pearson correlation,Pearson correlation,Pearson correlation
CLUSTER command,CLUSTER command,CLUSTER command
COSINE (keyword),COSINE (keyword),COSINE (keyword)
CLUSTER command,CLUSTER command,CLUSTER command
cosine,cosine,cosine
CLUSTER command,CLUSTER command,CLUSTER command
CHEBYCHEV (keyword),CHEBYCHEV (keyword),CHEBYCHEV (keyword)
CLUSTER command,CLUSTER command,CLUSTER command
Chebychev distance,Chebychev distance,Chebychev distance
CLUSTER command,CLUSTER command,CLUSTER command
BLOCK (keyword),BLOCK (keyword),BLOCK (keyword)
CLUSTER command,CLUSTER command,CLUSTER command
city-block distance,city-block distance,city-block distance
CLUSTER command,CLUSTER command,CLUSTER command
MINKOWSKI (keyword),MINKOWSKI (keyword),MINKOWSKI (keyword)
CLUSTER command,CLUSTER command,CLUSTER command
Minkowski distance,Minkowski distance,Minkowski distance
CLUSTER command,CLUSTER command,CLUSTER command
POWER (keyword),POWER (keyword),POWER (keyword)
CLUSTER command,CLUSTER command,CLUSTER command
customized distance measures,customized distance measures,customized distance measures
CLUSTER command,CLUSTER command,CLUSTER command
SEUCLID Squared Euclidean distance. The distance between two items, x and y, is the sum of the squared differences between the values for the items. SEUCLID is the measure commonly used with centroid, median, and Ward’s methods of clustering. SEUCLID is the default and can also be requested with keyword DEFAULT.

SEUCLID(x,y)=Σi(xi−yi)2

EUCLID Euclidean distance. This is the default specification for MEASURE. The distance between two items, x and y, is the square root of the sum of the squared differences between the values for the items.

EUCLID(x,y)=
√ Σi(xi−yi)2

CORRELATION Correlation between vectors of values. This is a pattern similarity measure.

CORRELATION(x,y)=Σi(ZxiZyi)N−1

where Zxi is the z score (standardized) value of x for the ith case or variable, and N is the number of cases or variables.
COSINE Cosine of vectors of values. This is a pattern similarity measure.

COSINE(x,y)=Σi(xiyi)
√ (Σix2i)(Σiy2i)

CHEBYCHEV Chebychev distance metric. The distance between two items is the maximum absolute difference between the values for the items.

CHEBYCHEV(x,y)=maxi|xi−yi|

BLOCK City-block or Manhattan distance. The distance between two items is the sum of the absolute differences between the values for the items.

BLOCK(x,y)=Σi|xi−yi|

MINKOWSKI(p) Distance in an absolute Minkowski power metric. The distance between two items is the pth root of the sum of the absolute differences to the pth power between the values for the items. Appropriate selection of the integer parameter p yields Euclidean and many other distance metrics.

MINKOWSKI(x,y)=(Σi|xi−yi|p)1/p

POWER(p,r) Distance in an absolute power metric. The distance between two items is the rth root of the sum of the absolute differences to the pth power between the values for the items. Appropriate selection of the integer parameters p and r yields Euclidean, squared Euclidean, Minkowski, city-block, and many other distance metrics.

POWER(x,y)=(Σi|xi−yi|p)1/r

Related Topics

MEASURE Subcommand (CLUSTER command)
Measures for Frequency Count Data (CLUSTER command)
Measures for Binary Data (CLUSTER command)


Measures for Frequency Count Data (CLUSTER command)

CLUSTER (command),CLUSTER (command),CLUSTER (command)
measures for frequency-count data,measures for frequency-count data,measures for frequency-count data

For frequency count data, use any one of the following keywords on MEASURE:

chi-square,chi-square,chi-square
distance measure,distance measure,distance measure
CHISQ (keyword),CHISQ (keyword),CHISQ (keyword)
CLUSTER command,CLUSTER command,CLUSTER command
phi-square distance measure,phi-square distance measure,phi-square distance measure
CLUSTER command,CLUSTER command,CLUSTER command
PH2 (keyword),PH2 (keyword),PH2 (keyword)
CLUSTER command,CLUSTER command,CLUSTER command
CHISQ Based on the chi-square test of equality for two sets of frequencies. The magnitude of this dissimilarity measure depends on the total frequencies of the two cases or variables whose dissimilarity is computed. Expected values are from the model of independence of cases or variables x and y.

CHISQ(x,y)=
√ Σi(xi−E(xi))2E(xi)+Σi(yi−E(yi))2E(yi)

PH2 Phi-square between sets of frequencies. This is the CHISQ measure normalized by the square root of the combined frequency. Therefore, its value does not depend on the total frequencies of the two cases or variables whose dissimilarity is computed.

PH2(x,y)=
√ Σi(xi−E(xi))2E(xi)+Σi(yi−E(yi))2E(yi)N

Related Topics

MEASURE Subcommand (CLUSTER command)
Measures for Interval Data (CLUSTER command)
Measures for Binary Data (CLUSTER command)


Measures for Binary Data (CLUSTER command)

CLUSTER (command),CLUSTER (command),CLUSTER (command)
measures for binary data,measures for binary data,measures for binary data

Different binary measures emphasize different aspects of the relationship between sets of binary values. However, all the measures are specified in the same way. Each measure has two optional integer-valued parameters, p (present) and np (not present).

• If both parameters are specified, CLUSTER uses the value of the first as an indicator that a characteristic is present and the value of the second as an indicator that a characteristic is absent. CLUSTER skips all other values.

• If only the first parameter is specified, CLUSTER uses that value to indicate presence and all other values to indicate absence.

• If no parameters are specified, CLUSTER assumes that 1 indicates presence and 0 indicates absence.

Using the indicators for presence and absence within each item (case or variable), CLUSTER constructs a 2×2 contingency table for each pair of items in turn. It uses this table to compute a proximity measure for the pair.

 | Item 2 characteristics
 | Present | Absent
Item 1 characteristics |  |
Present | a | b
Absent | c | d

CLUSTER computes all binary measures from the values of a, b, c, and d. These values are tallied across variables (when the items are cases) or across cases (when the items are variables). For example, if the variables V, W, X, Y, Z have values 0, 1, 1, 0, 1 for case 1 and values 0, 1, 1, 0, 0 for case 2 (where 1 indicates presence and 0 indicates absence), the contingency table is as follows:

 | Case 2 characteristics
 | Present | Absent
Case 1 characteristics |  |
Present | 2 | 1
Absent | 0 | 2

The contingency table indicates that both cases are present for two variables (W and X), both cases are absent for two variables (V and Y), and case 1 is present and case 2 is absent for one variable (Z). There are no variables for which case 1 is absent and case 2 is present.

The available binary measures include matching coefficients, conditional probabilities, predictability measures, and others.

matching coefficients,matching coefficients,matching coefficients
CLUSTER command,CLUSTER command,CLUSTER command

Matching Coefficients. The table below shows a classification scheme for matching coefficients. In this scheme, matches are joint presences (value a in the contingency table) or joint absences (value d). Nonmatches are equal in number to value b plus value c. Matches and nonmatches may or may not be weighted equally. The three coefficients JACCARD, DICE, and SS2 are related monotonically, as are SM, SS1, and RT. All coefficients in the table are similarity measures, and all except two (K1 and SS3) range from 0 to 1. K1 and SS3 have a minimum value of 0 and no upper limit.

Binary matching coefficients in CLUSTER
 | Joint absences excluded from numerator | Joint absences included in numerator
All matches included in denominator
Equal weight for matches and nonmatches | RR | SM
Double weight for matches |  | SS1
Double weight for nonmatches |  | RT
Joint absences excluded from denominator
Equal weight for matches and nonmatches | JACCARD
Double weight for matches | DICE
Double weight for nonmatches | SS2
All matches excluded from denominator

Equal weight for matches and nonmatches

K1

SS3

Russell and Rao measure,Russell and Rao measure,Russell and Rao measure
CLUSTER command,CLUSTER command,CLUSTER command
RR (keyword),RR (keyword),RR (keyword)
CLUSTER command,CLUSTER command,CLUSTER command
simple matching measure,simple matching measure,simple matching measure
CLUSTER command,CLUSTER command,CLUSTER command
SM (keyword),SM (keyword),SM (keyword)
CLUSTER command,CLUSTER command,CLUSTER command
Jaccard similarity ratio,Jaccard similarity ratio,Jaccard similarity ratio
CLUSTER command,CLUSTER command,CLUSTER command
JACCARD (keyword),JACCARD (keyword),JACCARD (keyword)
CLUSTER command,CLUSTER command,CLUSTER command
Dice measure,Dice measure,Dice measure
CLUSTER command,CLUSTER command,CLUSTER command
DICE (keyword),DICE (keyword),DICE (keyword)
CLUSTER command,CLUSTER command,CLUSTER command
Sokal and Sneath measures,Sokal and Sneath measures,Sokal and Sneath measures
CLUSTER command,CLUSTER command,CLUSTER command
SS1 through SS5 (keywords),SS1 through SS5 (keywords),SS1 through SS5 (keywords)
CLUSTER command,CLUSTER command,CLUSTER command
Rogers and Tanimoto measure,Rogers and Tanimoto measure,Rogers and Tanimoto measure
CLUSTER command,CLUSTER command,CLUSTER command
RT (keyword),RT (keyword),RT (keyword)
CLUSTER command,CLUSTER command,CLUSTER command
Kulczynski measures,Kulczynski measures,Kulczynski measures
CLUSTER command,CLUSTER command,CLUSTER command
K1 (keyword),K1 (keyword),K1 (keyword)
CLUSTER command,CLUSTER command,CLUSTER command
RR[(p[,np])] | Russell and Rao similarity measure. This is the binary dot product. RR(x,y)=aa+b+c+d
SM[(p[,np])] | Simple matching similarity measure. This is the ratio of the number of matches to the total number of characteristics. SM(x,y)=a+da+b+c+d
JACCARD[(p[,np])] | Jaccard similarity measure. This is also known as the similarity ratio. JACCARD(x,y)=aa+b+c
DICE[(p[,np])] | Dice (or Czekanowski or Sorenson) similarity measure. DICE(x,y)=2a2a+b+c
SS1[(p[,np])] | Sokal and Sneath similarity measure 1. SS1(x,y)=2(a+d)2(a+d)+b+c+d
RT[(p[,np])] | Rogers and Tanimoto similarity measure. RT(x,y)=a+da+d+2(b+c)
SS2[(p[,np])] | Sokal and Sneath similarity measure 2. SS2(x,y)=aa+2(b+c)
K1[(p[,np])] | Kulczynski similarity measure 1. This measure has a minimum value of 0 and no upper limit. It is undefined when there are no nonmatches (b=0 and c=0). K1(x,y)=ab+c
SS3[(p[,np])] | Sokal and Sneath similarity measure 3. This measure has a minimum value of 0 and no upper limit. It is undefined when there are no nonmatches (b=0 and c=0). SS3(x,y)=a+db+c
conditional probability,conditional probability,conditional probability
CLUSTER command,CLUSTER command,CLUSTER command

Conditional Probabilities. The following binary measures yield values that can be interpreted in terms of conditional probability. All three are similarity measures.

K2 (keyword),K2 (keyword),K2 (keyword)
CLUSTER command,CLUSTER command,CLUSTER command
Hamann measure,Hamann measure,Hamann measure
CLUSTER command,CLUSTER command,CLUSTER command
HAMANN (keyword),HAMANN (keyword),HAMANN (keyword)
CLUSTER command,CLUSTER command,CLUSTER command
K2[(p[,np])] | Kulczynski similarity measure 2. This yields the average conditional probability that a characteristic is present in one item given that the characteristic is present in the other item. The measure is an average over both items acting as predictors. It has a range of 0 to 1. K2(x,y)=a/(a+b)+a/(a+c)2
SS4[(p[,np])] | Sokal and Sneath similarity measure 4. This yields the conditional probability that a characteristic of one item is in the same state (presence or absence) as the characteristic of the other item. The measure is an average over both items acting as predictors. It has a range of 0 to 1. SS4(x,y)=a/(a+b)+a/(a+c)+d/(b+d)+d/(c+d)4
HAMANN[(p[,np])] | Hamann similarity measure. This measure gives the probability that a characteristic has the same state in both items (present in both or absent from both) minus the probability that a characteristic has different states in the two items (present in one and absent from the other). HAMANN has a range of −1 to +1 and is monotonically related to SM, SS1, and RT. HAMANN(x,y)=(a+d)−(b+c)a+b+c+d
predictability measures,predictability measures,predictability measures
CLUSTER command,CLUSTER command,CLUSTER command

Predictability Measures. The following four binary measures assess the association between items as the predictability of one given the other. All four measures yield similarities.

lambda,lambda,lambda
Goodman and Kruskal's,Goodman and Kruskal's,Goodman and Kruskal's
LAMBDA (keyword),LAMBDA (keyword),LAMBDA (keyword)
CLUSTER command,CLUSTER command,CLUSTER command
Anderberg's D,Anderberg's D,Anderberg's D
CLUSTER command,CLUSTER command,CLUSTER command
D (keyword),D (keyword),D (keyword)
CLUSTER command,CLUSTER command,CLUSTER command
Yule's Y,Yule's Y,Yule's Y
CLUSTER command,CLUSTER command,CLUSTER command
Y (keyword),Y (keyword),Y (keyword)
CLUSTER command,CLUSTER command,CLUSTER command
Yule's Q,Yule's Q,Yule's Q
CLUSTER command,CLUSTER command,CLUSTER command
Q (keyword),Q (keyword),Q (keyword)
CLUSTER command,CLUSTER command,CLUSTER command
LAMBDA[(p[,np])] Goodman and Kruskal’s lambda (similarity). This coefficient assesses the predictability of the state of a characteristic on one item (present or absent) given the state on the other item. Specifically, LAMBDA measures the proportional reduction in error using one item to predict the other when the directions of prediction are of equal importance. LAMBDA has a range of 0 to 1.

LAMBDA(x,y)=t1−t22(a+b+c+d)−t2

where

t1 = max(a, b) + max(c,d) + max(a, c) + max(b,d)

t2 = max(a + c, b + d) + max(a + d, c + d).

D[(p[,np])] Anderberg’s D (similarity). This coefficient assesses the predictability of the state of a characteristic on one item (present or absent) given the state on the other. D measures the actual reduction in the error probability when one item is used to predict the other. The range of D is 0 to 1.

D(x,y)=t1−t22(a+b+c+d)

where

t1 = max(a, b) + max(c,d) + max(a, c) + max(b,d)

t2 = max(a + c, b + d) + max(a + d, c + d).

Y[(p[,np])]

Yule’s Y coefficient of colligation (similarity). This is a function of the cross-ratio for a 2×2 table. It has a range of −1 to +1. Y(x,y)=
√ ad
−
√ bc
√ ad
+
√ bc

Q[(p[,np])]

Yule’s Q (similarity). This is the 2×2version of Goodman and Kruskal’s ordinal measure gamma. Like Yule’s Y, Q is a function of the cross-ratio for a 2×2 table and has a range of −1 to +1.

Q(x,y)=ad−bcad+bc

Other Binary Measures. The remaining binary measures available in CLUSTER are either binary equivalents of association measures for continuous variables or measures of special properties of the relationship between items.

Ochiai measure,Ochiai measure,Ochiai measure
CLUSTER command,CLUSTER command,CLUSTER command
OCHIAI (keyword),OCHIAI (keyword),OCHIAI (keyword)
CLUSTER command,CLUSTER command,CLUSTER command
phi four-point correlation,phi four-point correlation,phi four-point correlation
CLUSTER command,CLUSTER command,CLUSTER command
PHI (keyword),PHI (keyword),PHI (keyword)
CLUSTER command,CLUSTER command,CLUSTER command
binary Euclidean distance,binary Euclidean distance,binary Euclidean distance
CLUSTER command,CLUSTER command,CLUSTER command
BEUCLID (keyword),BEUCLID (keyword),BEUCLID (keyword)
CLUSTER command,CLUSTER command,CLUSTER command
binary squared Euclidean distance,binary squared Euclidean distance,binary squared Euclidean distance
CLUSTER command,CLUSTER command,CLUSTER command
BSEUCLID (keyword),BSEUCLID (keyword),BSEUCLID (keyword)
CLUSTER command,CLUSTER command,CLUSTER command
size difference measure,size difference measure,size difference measure
CLUSTER command,CLUSTER command,CLUSTER command
SIZE (keyword),SIZE (keyword),SIZE (keyword)
CLUSTER command,CLUSTER command,CLUSTER command
pattern difference measure,pattern difference measure,pattern difference measure
CLUSTER command,CLUSTER command,CLUSTER command
PATTERN (keyword),PATTERN (keyword),PATTERN (keyword)
CLUSTER command,CLUSTER command,CLUSTER command
binary shape difference,binary shape difference,binary shape difference
CLUSTER command,CLUSTER command,CLUSTER command
BSHAPE (keyword),BSHAPE (keyword),BSHAPE (keyword)
CLUSTER command,CLUSTER command,CLUSTER command
dispersion,dispersion,dispersion
CLUSTER command,CLUSTER command,CLUSTER command
DISPER (keyword),DISPER (keyword),DISPER (keyword)
CLUSTER command,CLUSTER command,CLUSTER command
binary variance measure,binary variance measure,binary variance measure
CLUSTER command,CLUSTER command,CLUSTER command
VARIANCE (keyword),VARIANCE (keyword),VARIANCE (keyword)
CLUSTER command,CLUSTER command,CLUSTER command
Lance and Williams dissimilarity measure,Lance and Williams dissimilarity measure,Lance and Williams dissimilarity measure
CLUSTER command,CLUSTER command,CLUSTER command
BLWMN (keyword),BLWMN (keyword),BLWMN (keyword)
CLUSTER command,CLUSTER command,CLUSTER command
OCHIAI[(p[,np])] Ochiai similarity measure. This is the binary form of the cosine. It has a range of 0 to 1.

OCHIAI(x,y)=
√ aa+baa+c

SS5[(p[,np])] Sokal and Sneath similarity measure 5. The range is 0 to 1.

SS5(x,y)=ad
√ (a+b)(a+c)(b+d)(c+d)

PHI[(p[,np])] Fourfold point correlation (similarity). This is the binary form of the Pearson product-moment correlation coefficient.

PHI(x,y)=ad−bc
√ (a+b)(a+c)(b+d)(c+d)

BEUCLID[(p[,np])] Binary Euclidean distance. This is a distance measure. Its minimum value is 0, and it has no upper limit.

BEUCLID(x,y)=
√ b+c

BSEUCLID[(p[,np])] Binary squared Euclidean distance. This is a distance measure. Its minimum value is 0, and it has no upper limit.

BSEUCLID(x,y)=b+c

SIZE[(p[,np])] Size difference. This is a dissimilarity measure with a minimum value of 0 and no upper limit.

SIZE(x,y)=(b−c)2(a+b+c+d)2

PATTERN[(p[,np])] Pattern difference. This is a dissimilarity measure. The range is 0 to 1.

PATTERN(x,y)=bc(a+b+c+d)2

BSHAPE[(p[,np])] Binary shape difference. This dissimilarity measure has no upper or lower limit.

BSHAPE(x,y)=(a+b+c+d)(b+c)−(b−c)2(a+b+c+d)2

DISPER[(p[,np])] Dispersion similarity measure. The range is −1 to +1.

DISPER(x,y)=ad−bc(a+b+c+d)2

VARIANCE[(p[,np])] Variance dissimilarity measure. This measure has a minimum value of 0 and no upper limit.

VARIANCE(x,y)=b+c4(a+b+c+d)

BLWMN[(p[,np])] Binary Lance-and-Williams nonmetric dissimilarity measure. This measure is also known as the Bray-Curtis nonmetric coefficient. The range is 0 to 1.

BLWMN(x,y)=b+c2a+b+c

Related Topics

MEASURE Subcommand (CLUSTER command)
Measures for Interval Data (CLUSTER command)
Measures for Frequency Count Data (CLUSTER command)


METHOD Subcommand (CLUSTER command)

METHOD (subcommand),METHOD (subcommand),METHOD (subcommand)
CLUSTER command,CLUSTER command,CLUSTER command
Hierarchical Cluster Analysis,Hierarchical Cluster Analysis,Hierarchical Cluster Analysis
methods,methods,methods

METHOD specifies one or more clustering methods.

• If the METHOD subcommand is omitted or included without specifications, the method of average linkage between groups is used.

• Only one METHOD subcommand can be used, but more than one method can be specified on it.

• When the number of items is large, CENTROID and MEDIAN require significantly more CPU time than other methods.

BAVERAGE (keyword),BAVERAGE (keyword),BAVERAGE (keyword)
CLUSTER command,CLUSTER command,CLUSTER command
average linkage between groups,average linkage between groups,average linkage between groups
CLUSTER command,CLUSTER command,CLUSTER command
WAVERAGE (keyword),WAVERAGE (keyword),WAVERAGE (keyword)
CLUSTER command,CLUSTER command,CLUSTER command
average linkage within groups,average linkage within groups,average linkage within groups
CLUSTER command,CLUSTER command,CLUSTER command
SINGLE (keyword),SINGLE (keyword),SINGLE (keyword)
CLUSTER command,CLUSTER command,CLUSTER command
nearest neighbor method,nearest neighbor method,nearest neighbor method
CLUSTER command,CLUSTER command,CLUSTER command
COMPLETE (keyword),COMPLETE (keyword),COMPLETE (keyword)
CLUSTER command,CLUSTER command,CLUSTER command
furthest neighbor method,furthest neighbor method,furthest neighbor method
CLUSTER command,CLUSTER command,CLUSTER command
centroid method,centroid method,centroid method
CLUSTER command,CLUSTER command,CLUSTER command
CENTROID (keyword),CENTROID (keyword),CENTROID (keyword)
CLUSTER command,CLUSTER command,CLUSTER command
median method,median method,median method
CLUSTER command,CLUSTER command,CLUSTER command
MEDIAN (keyword),MEDIAN (keyword),MEDIAN (keyword)
CLUSTER command,CLUSTER command,CLUSTER command
Ward's method,Ward's method,Ward's method
CLUSTER command,CLUSTER command,CLUSTER command
WARD (keyword),WARD (keyword),WARD (keyword)
CLUSTER command,CLUSTER command,CLUSTER command
BAVERAGE | Average linkage between groups (UPGMA). BAVERAGE is the default and can also be requested with keyword DEFAULT.
WAVERAGE | Average linkage within groups.
SINGLE | Single linkage or nearest neighbor.
COMPLETE | Complete linkage or furthest neighbor.
CENTROID | Centroid clustering (UPGMC). Squared Euclidean distances are commonly used with this method.
MEDIAN | Median clustering (WPGMC). Squared Euclidean distances are commonly used with this method.
WARD | Ward’s method. Squared Euclidean distances are commonly used with this method.

Example

CLUSTER V1 V2 V3
 /METHOD=SINGLE COMPLETE WARDS.

• This example clusters cases based on their values for the variables V1, V2, and V3 and uses three clustering methods: single linkage, complete linkage, and Ward’s method.

Related Topics

CLUSTER
Overview (CLUSTER command)
Example (CLUSTER command)
Variable List (CLUSTER command)
MEASURE Subcommand (CLUSTER command)
SAVE Subcommand (CLUSTER command)
ID Subcommand (CLUSTER command)
PRINT Subcommand (CLUSTER command)
PLOT Subcommand (CLUSTER command)
MISSING Subcommand (CLUSTER command)
MATRIX Subcommand (CLUSTER command)


SAVE Subcommand (CLUSTER command)

CLUSTER (command),CLUSTER (command),CLUSTER (command)
SAVE subcommand,SAVE subcommand,SAVE subcommand
SAVE (subcommand),SAVE (subcommand),SAVE (subcommand)
CLUSTER command,CLUSTER command,CLUSTER command
CLUSTER (command),CLUSTER (command),CLUSTER (command)
saving cluster memberships,saving cluster memberships,saving cluster memberships

SAVE allows you to save cluster membership at specified solution levels as new variables in the active dataset.

• The specification on SAVE is the CLUSTER keyword, followed by either a single number indicating the level (number of clusters) of the cluster solution or a range separated by a comma indicating the minimum and maximum numbers of clusters when membership of more than one solution is to be saved. The number or range must be enclosed in parentheses and applies to all methods specified on METHOD.

• You can specify a rootname in parentheses after each method specification on the METHOD subcommand. CLUSTER forms new variable names by appending the number of the cluster solution to the rootname.

• If no rootname is specified, CLUSTER forms variable names using the formula CLUn_m, where m increments to create a unique rootname for the set of variables saved for one method and n is the number of the cluster solution.

• The names and descriptive labels of the new variables are displayed in the procedure information notes.

• You cannot use the SAVE subcommand if you are replacing the active dataset with matrix materials (See the topic Matrix Output (CLUSTER command) for more information. )

Example

CLUSTER A B C
 /METHOD=BAVERAGE SINGLE (SINMEM) WARD
 /SAVE=CLUSTERS(3,5).

• This command creates nine new variables: CLU5_1, CLU4_1, and CLU3_1 for BAVERAGE, SINMEM5, SINMEM4, and SINMEM3 for SINGLE, and CLU5_2, CLU4_2, and CLU3_2 for WARD. The variables contain the cluster membership for each case at the five-, four-, and three-cluster solutions using the three clustering methods. Ward’s method is the third specification on METHOD but uses the second set of default names, since it is the second method specified without a rootname.

• The order of the new variables in the active dataset is the same as listed above, since the solutions are obtained in the order from 5 to 3.

• New variables are listed in the procedure information notes.

Related Topics

CLUSTER
Overview (CLUSTER command)
Example (CLUSTER command)
Variable List (CLUSTER command)
MEASURE Subcommand (CLUSTER command)
METHOD Subcommand (CLUSTER command)
ID Subcommand (CLUSTER command)
PRINT Subcommand (CLUSTER command)
PLOT Subcommand (CLUSTER command)
MISSING Subcommand (CLUSTER command)
MATRIX Subcommand (CLUSTER command)


ID Subcommand (CLUSTER command)

CLUSTER (command),CLUSTER (command),CLUSTER (command)
ID subcommand,ID subcommand,ID subcommand
ID (subcommand),ID (subcommand),ID (subcommand)
CLUSTER command,CLUSTER command,CLUSTER command
CLUSTER (command),CLUSTER (command),CLUSTER (command)
labeling cases,labeling cases,labeling cases

ID names a string variable to be used as the case identifier in cluster membership tables, icicle plots, and dendrograms. If the ID subcommand is omitted, cases are identified by case numbers alone.

• When used with the MATRIX IN subcommand, the variable specified on the ID subcommand identifies the labeling variable in the matrix file.

Related Topics

CLUSTER
Overview (CLUSTER command)
Example (CLUSTER command)
Variable List (CLUSTER command)
MEASURE Subcommand (CLUSTER command)
METHOD Subcommand (CLUSTER command)
SAVE Subcommand (CLUSTER command)
PRINT Subcommand (CLUSTER command)
PLOT Subcommand (CLUSTER command)
MISSING Subcommand (CLUSTER command)
MATRIX Subcommand (CLUSTER command)


PRINT Subcommand (CLUSTER command)

CLUSTER (command),CLUSTER (command),CLUSTER (command)
PRINT subcommand,PRINT subcommand,PRINT subcommand
PRINT (subcommand),PRINT (subcommand),PRINT (subcommand)
CLUSTER command,CLUSTER command,CLUSTER command
CLUSTER (command),CLUSTER (command),CLUSTER (command)
statistics,statistics,statistics

PRINT controls the display of cluster output (except plots, which are controlled by the PLOT subcommand).

• If the PRINT subcommand is omitted or included without specifications, an agglomeration schedule is displayed. If any keywords are specified on PRINT, the agglomeration schedule is displayed only if explicitly requested.

• CLUSTER automatically displays summary information (the method and measure used, the number of cases) for each method named on the METHOD subcommand. This summary is displayed regardless of specifications on PRINT.

You can specify any or all of the following on the PRINT subcommand:

SCHEDULE (keyword),SCHEDULE (keyword),SCHEDULE (keyword)
CLUSTER command,CLUSTER command,CLUSTER command
agglomeration schedule,agglomeration schedule,agglomeration schedule
CLUSTER command,CLUSTER command,CLUSTER command
CLUSTER (keyword),CLUSTER (keyword),CLUSTER (keyword)
CLUSTER command,CLUSTER command,CLUSTER command
cluster membership,cluster membership,cluster membership
CLUSTER command,CLUSTER command,CLUSTER command
DISTANCE (keyword),DISTANCE (keyword),DISTANCE (keyword)
CLUSTER command,CLUSTER command,CLUSTER command
distance matrix,distance matrix,distance matrix
CLUSTER command,CLUSTER command,CLUSTER command
NONE (keyword),NONE (keyword),NONE (keyword)
CLUSTER command,CLUSTER command,CLUSTER command
SCHEDULE | Agglomeration schedule. The agglomeration schedule shows the order and distances at which items and clusters combine to form new clusters. It also shows the cluster level at which an item joins a cluster. SCHEDULE is the default and can also be requested with the keyword DEFAULT.
CLUSTER(min,max) | Cluster membership. For each item, the display includes the value of the case identifier (or the variable name if matrix input is used), the case sequence number, and a value (1, 2, 3, and so on) identifying the cluster to which that case belongs in a given cluster solution. Specify either a single integer value in parentheses indicating the level of a single solution or a minimum value and a maximum value indicating a range of solutions for which display is desired. If the number of clusters specified exceeds the number produced, the largest number of clusters is used (the number of items minus 1). If CLUSTER is specified more than once, the last specification is used.
DISTANCE | Proximities matrix. The proximities matrix table displays the distances or similarities between items computed by CLUSTER or obtained from an input matrix. DISTANCE produces a large volume of output and uses significant CPU time when the number of cases is large.
NONE | None of the above. NONE overrides any other keywords specified on PRINT.

Example

CLUSTER V1 V2 V3 /PRINT=CLUSTER(3,5).

• This example displays cluster membership for each case for the three-, four-, and five-cluster solutions.

Related Topics

CLUSTER
Overview (CLUSTER command)
Example (CLUSTER command)
Variable List (CLUSTER command)
MEASURE Subcommand (CLUSTER command)
METHOD Subcommand (CLUSTER command)
SAVE Subcommand (CLUSTER command)
ID Subcommand (CLUSTER command)
PLOT Subcommand (CLUSTER command)
MISSING Subcommand (CLUSTER command)
MATRIX Subcommand (CLUSTER command)


PLOT Subcommand (CLUSTER command)

CLUSTER (command),CLUSTER (command),CLUSTER (command)
PLOT subcommand,PLOT subcommand,PLOT subcommand
PLOT (subcommand),PLOT (subcommand),PLOT (subcommand)
CLUSTER command,CLUSTER command,CLUSTER command

PLOT controls the plots produced for each method specified on the METHOD subcommand. For icicle plots, PLOT allows you to control the cluster solution at which the plot begins and ends and the increment for displaying intermediate cluster solutions.

• If the PLOT subcommand is omitted or included without specifications, a vertical icicle plot is produced.

• If any keywords are specified on PLOT, only those plots requested are produced.

• The icicle plots are generated as pivot tables and the dendrogram is generated as text output.

• If there is not enough memory for a dendrogram or an icicle plot, the plot is skipped and a warning is issued.

• The size of an icicle plot can be controlled by specifying range values or an increment for VICICLE or HICICLE. Smaller plots require significantly less workspace and time.

icicle plots,icicle plots,icicle plots
CLUSTER command,CLUSTER command,CLUSTER command
VICICLE (keyword),VICICLE (keyword),VICICLE (keyword)
CLUSTER command,CLUSTER command,CLUSTER command
HICICLE (keyword),HICICLE (keyword),HICICLE (keyword)
CLUSTER command,CLUSTER command,CLUSTER command
dendrograms,dendrograms,dendrograms
CLUSTER command,CLUSTER command,CLUSTER command
DENDROGRAM (keyword),DENDROGRAM (keyword),DENDROGRAM (keyword)
CLUSTER command,CLUSTER command,CLUSTER command
NONE (keyword),NONE (keyword),NONE (keyword)
CLUSTER command,CLUSTER command,CLUSTER command
VICICLE(min,max,inc) | Vertical icicle plot. This is the default. The range specifications are optional. If used, they must be integer and must be enclosed in parentheses. The specification min is the cluster solution at which to start the display (the default is 1), and the specification max is the cluster solution at which to end the display (the default is the number of cases minus 1). If max is greater than the number of cases minus 1, the default is used. The increment to use between cluster solutions is inc (the default is 1). If max is specified, min must be specified, and if inc is specified, both min and max must be specified. If VICICLE is specified more than once, only the last range specification is used.
HICICLE(min,max,inc) | Horizontal icicle plot. The range specifications are the same as for VICICLE. If both VICICLE and HICICLE are specified, the last range specified is used for both. If a range is not specified on the last instance of VICICLE or HICICLE, the defaults are used even if a range is specified earlier.
DENDROGRAM | Tree diagram. The dendrogram is scaled by the joining distances of the clusters.
NONE | No plots.

Example

CLUSTER V1 V2 V3 /PLOT=VICICLE(1,20).

• This example produces a vertical icicle plot for the 1-cluster through the 20-cluster solution.

Example

CLUSTER V1 V2 V3 /PLOT=VICICLE(1,151,5).

• This example produces a vertical icicle plot for every fifth cluster solution starting with 1 and ending with 151 (1 cluster, 6 clusters, 11 clusters, and so on).

Related Topics

CLUSTER
Overview (CLUSTER command)
Example (CLUSTER command)
Variable List (CLUSTER command)
MEASURE Subcommand (CLUSTER command)
METHOD Subcommand (CLUSTER command)
SAVE Subcommand (CLUSTER command)
ID Subcommand (CLUSTER command)
PRINT Subcommand (CLUSTER command)
MISSING Subcommand (CLUSTER command)
MATRIX Subcommand (CLUSTER command)


MISSING Subcommand (CLUSTER command)

CLUSTER (command),CLUSTER (command),CLUSTER (command)
MISSING subcommand,MISSING subcommand,MISSING subcommand
MISSING (subcommand),MISSING (subcommand),MISSING (subcommand)
CLUSTER command,CLUSTER command,CLUSTER command
CLUSTER (command),CLUSTER (command),CLUSTER (command)
missing values,missing values,missing values

MISSING controls the treatment of cases with missing values. A case that has a missing value for any variable on the variable list is omitted from the analysis. By default, user-missing values are excluded from the analysis.

EXCLUDE (keyword),EXCLUDE (keyword),EXCLUDE (keyword)
CLUSTER command,CLUSTER command,CLUSTER command
INCLUDE (keyword),INCLUDE (keyword),INCLUDE (keyword)
CLUSTER command,CLUSTER command,CLUSTER command
EXCLUDE | Exclude cases with user-missing values. This is the default.
INCLUDE | Include cases with user-missing values. Only cases with system-missing values are excluded.

Related Topics

CLUSTER
Overview (CLUSTER command)
Example (CLUSTER command)
Variable List (CLUSTER command)
MEASURE Subcommand (CLUSTER command)
METHOD Subcommand (CLUSTER command)
SAVE Subcommand (CLUSTER command)
ID Subcommand (CLUSTER command)
PRINT Subcommand (CLUSTER command)
PLOT Subcommand (CLUSTER command)
MATRIX Subcommand (CLUSTER command)


MATRIX Subcommand (CLUSTER command)

CLUSTER (command),CLUSTER (command),CLUSTER (command)
MATRIX subcommand,MATRIX subcommand,MATRIX subcommand
MATRIX (subcommand),MATRIX (subcommand),MATRIX (subcommand)
CLUSTER command,CLUSTER command,CLUSTER command
matrix output,matrix output,matrix output
CLUSTER command,CLUSTER command,CLUSTER command
matrix input,matrix input,matrix input
CLUSTER command,CLUSTER command,CLUSTER command

MATRIX reads and writes PASW Statistics data files.

• Either IN or OUT and a matrix file in parentheses are required. When both IN and OUT are used on the same CLUSTER procedure, they can be specified on separate MATRIX subcommands or on the same subcommand.

• The input or output matrix information is displayed in the procedure information notes.

OUT (keyword),OUT (keyword),OUT (keyword)
CLUSTER command,CLUSTER command,CLUSTER command
IN (keyword),IN (keyword),IN (keyword)
CLUSTER command,CLUSTER command,CLUSTER command
OUT ('savfile'|'dataset') | Write a matrix data file. Specify either a quoted file specification, a previously declared dataset (DATASET DECLARE), or an asterisk in parentheses (*). If you specify an asterisk (*), the matrix data file replaces the active dataset.
IN ('savfile'|'dataset') | Read a matrix data file. Specify either a quoted file specification, a previously declared dataset (DATASET DECLARE), or an asterisk in parentheses (*). The asterisk specifies the active dataset. A matrix file read from an external file does not replace the active dataset.

When a matrix is produced using the MATRIX OUT subcommand, it corresponds to a unique dataset. All subsequent analyses performed on this matrix would match the corresponding analysis on the original data. However, if the data file is altered in any way, this would no longer be true.

For example, if the original file is edited or rearranged, it would in general no longer correspond to the initially produced matrix. You need to make sure that the data match the matrix whenever inferring the results from the matrix analysis. Specifically, when saving the cluster membership into an active dataset in the CLUSTER procedure, the proximity matrix in the MATRIX IN statement must match the current active dataset.

Related Topics

CLUSTER
Overview (CLUSTER command)
Example (CLUSTER command)
Variable List (CLUSTER command)
MEASURE Subcommand (CLUSTER command)
METHOD Subcommand (CLUSTER command)
SAVE Subcommand (CLUSTER command)
ID Subcommand (CLUSTER command)
PRINT Subcommand (CLUSTER command)
PLOT Subcommand (CLUSTER command)
MISSING Subcommand (CLUSTER command)
Matrix Output (CLUSTER command)
Matrix Input (CLUSTER command)
Format of the Matrix Data File (CLUSTER command)
Split Files (CLUSTER command)
Missing Values (CLUSTER command)
Example: Output to External File (CLUSTER command)
Example: Output Replacing Active Dataset (CLUSTER command)
Example: Input from Active Dataset (CLUSTER command)
Example: Input from External File (CLUSTER command)
Example: Input from Active Dataset (CLUSTER command)


Matrix Output (CLUSTER command)

• CLUSTER writes proximity-type matrices with ROWTYPE_ values of PROX. CLUSTER neither reads nor writes additional statistics with its matrix materials. See the topic Format of the Matrix Data File (CLUSTER command) for more information.

• The matrices produced by CLUSTER can be used by subsequent CLUSTER procedures or by the PROXIMITIES and ALSCAL procedures.

• Any documents contained in the active dataset are not transferred to the matrix file.

Related Topics

MATRIX Subcommand (CLUSTER command)
Matrix Input (CLUSTER command)
Format of the Matrix Data File (CLUSTER command)
Split Files (CLUSTER command)
Missing Values (CLUSTER command)
Example: Output to External File (CLUSTER command)
Example: Output Replacing Active Dataset (CLUSTER command)
Example: Input from Active Dataset (CLUSTER command)
Example: Input from External File (CLUSTER command)
Example: Input from Active Dataset (CLUSTER command)


Matrix Input (CLUSTER command)

• CLUSTER can read matrices written by a previous CLUSTER command or by PROXIMITIES, or created by MATRIX DATA. When the input matrix contains distances between variables, CLUSTER clusters all or a subset of the variables.

• Values for split-file variables should precede values for ROWTYPE_. CASENO_ and the labeling variable (if present) should come after ROWTYPE_ and before VARNAME_.

• If CASENO_ is of type string rather than numeric, it will be considered unavailable and a warning is issued.

• If CASENO_ appears on a variable list, a syntax error results.

• CLUSTER ignores unrecognized ROWTYPE_ values.

• When you are reading a matrix created with MATRIX DATA, you should supply a value label for PROX of either SIMILARITY or DISSIMILARITY so that the matrix is correctly identified. If you do not supply a label, CLUSTER assumes DISSIMILARITY. (See “Format of the Matrix Data File” below.)

• The program reads variable names, variable and value labels, and print and write formats from the dictionary of the matrix data file.

• MATRIX=IN cannot be specified unless an active dataset has already been defined. To read an existing matrix data file at the beginning of a session, use GET to retrieve the matrix file and then specify IN(*) on MATRIX.

• The variable list on CLUSTER can be omitted when a matrix data file is used as input. By default, all cases or variables in the matrix data file are used in the analysis. Specify a variable list when you want to read in a subset of items for analysis.

Related Topics

MATRIX Subcommand (CLUSTER command)
Matrix Output (CLUSTER command)
Format of the Matrix Data File (CLUSTER command)
Split Files (CLUSTER command)
Missing Values (CLUSTER command)
Example: Output to External File (CLUSTER command)
Example: Output Replacing Active Dataset (CLUSTER command)
Example: Input from Active Dataset (CLUSTER command)
Example: Input from External File (CLUSTER command)
Example: Input from Active Dataset (CLUSTER command)


Format of the Matrix Data File (CLUSTER command)

• The matrix data file can include three special variables created by the program: ROWTYPE_, ID, and VARNAME_.

• The variable ROWTYPE_ is a string variable with the value PROX (for proximity measure). PROX is assigned value labels containing the distance measure used to create the matrix and either SIMILARITY or DISSIMILARITY as an identifier. The variable VARNAME_ is a short string variable whose values are the names of the new variables. The variable CASENO_ is a numeric variable with values equal to the original case numbers.

• ID is included only when an identifying variable is not specified on the ID subcommand. ID is a short string and takes the value CASE m, where m is the actual number of each case. Note that m may not be consecutive if cases have been selected.

• If an identifying variable is specified on the ID subcommand, it takes the place of ID between ROWTYPE_ and VARNAME_. Up to 20 characters can be displayed for the identifying variable.

• VARNAME_ is a string variable that takes the values VAR1, VAR2, ..., VARn to correspond to the names of the distance variables in the matrix (VAR1, VAR2, ..., VARn, where n is the number of cases in the largest split file). The numeric suffix for the variable names is consecutive and may not be the same as the actual case number.

• The remaining variables in the matrix file are the distance variables used to form the matrix. The distance variables are assigned variable labels in the form of CASE m to identify the actual number of each case.

Related Topics

MATRIX Subcommand (CLUSTER command)
Matrix Output (CLUSTER command)
Matrix Input (CLUSTER command)
Split Files (CLUSTER command)
Missing Values (CLUSTER command)
Example: Output to External File (CLUSTER command)
Example: Output Replacing Active Dataset (CLUSTER command)
Example: Input from Active Dataset (CLUSTER command)
Example: Input from External File (CLUSTER command)
Example: Input from Active Dataset (CLUSTER command)


Split Files (CLUSTER command)

• When split-file processing is in effect, the first variables in the matrix data file are the split variables, followed by ROWTYPE_, the case-identifier variable or ID, VARNAME_, and the distance variables.

• A full set of matrix materials is written for each split-file group defined by the split variables.

• A split variable cannot have the same name as any other variable written to the matrix data file.

• If split-file processing is in effect when a matrix is written, the same split file must be in effect when that matrix is read by any procedure.

Related Topics

MATRIX Subcommand (CLUSTER command)
Matrix Output (CLUSTER command)
Matrix Input (CLUSTER command)
Format of the Matrix Data File (CLUSTER command)
Missing Values (CLUSTER command)
Example: Output to External File (CLUSTER command)
Example: Output Replacing Active Dataset (CLUSTER command)
Example: Input from Active Dataset (CLUSTER command)
Example: Input from External File (CLUSTER command)
Example: Input from Active Dataset (CLUSTER command)


Missing Values (CLUSTER command)

CLUSTER (command),CLUSTER (command),CLUSTER (command)
missing values,missing values,missing values

Missing-value treatment affects the values written to a matrix data file. When reading a matrix data file, be sure to specify a missing-value treatment on CLUSTER that is compatible with the treatment that was in effect when the matrix materials were generated.

Related Topics

MATRIX Subcommand (CLUSTER command)
Matrix Output (CLUSTER command)
Matrix Input (CLUSTER command)
Format of the Matrix Data File (CLUSTER command)
Split Files (CLUSTER command)
Example: Output to External File (CLUSTER command)
Example: Output Replacing Active Dataset (CLUSTER command)
Example: Input from Active Dataset (CLUSTER command)
Example: Input from External File (CLUSTER command)
Example: Input from Active Dataset (CLUSTER command)


Example: Output to External File (CLUSTER command)

DATA LIST FILE=ALMANAC1 RECORDS=3
  /1 CITY 6-18(A) POP80 53-60
  /2 CHURCHES 10-13 PARKS 14-17 PHONES 18-25 TVS 26-32
      RADIOST 33-35 TVST 36-38 TAXRATE 52-57(2).
N OF CASES 8.

CLUSTER CHURCHES TO TAXRATE
  /ID=CITY
  /MEASURE=EUCLID
  /MATRIX=OUT(CLUSMTX).

• CLUSTER reads raw data from file ALMANAC1 and writes one set of matrix materials to file CLUSMTX.

• The active dataset is still the ALMANAC1 file defined on DATA LIST. Subsequent commands are executed on ALMANAC1.

Related Topics

MATRIX Subcommand (CLUSTER command)
Matrix Output (CLUSTER command)
Matrix Input (CLUSTER command)
Format of the Matrix Data File (CLUSTER command)
Split Files (CLUSTER command)
Missing Values (CLUSTER command)
Example: Output Replacing Active Dataset (CLUSTER command)
Example: Input from Active Dataset (CLUSTER command)
Example: Input from External File (CLUSTER command)
Example: Input from Active Dataset (CLUSTER command)


Example: Output Replacing Active Dataset (CLUSTER command)

DATA LIST FILE=ALMANAC1 RECORDS=3
  /1 CITY 6-18(A) POP80 53-60
  /2 CHURCHES 10-13 PARKS 14-17 PHONES 18-25 TVS 26-32
      RADIOST 33-35 TVST 36-38 TAXRATE 52-57(2).
N OF CASES 8.

CLUSTER CHURCHES TO TAXRATE
  /ID=CITY
  /MEASURE=EUCLID
  /MATRIX=OUT(*).
LIST.

• CLUSTER writes the same matrix as in the previous example. However, the matrix data file replaces the active dataset. The LIST command is executed on the matrix file, not on ALMANAC1.

Related Topics

MATRIX Subcommand (CLUSTER command)
Matrix Output (CLUSTER command)
Matrix Input (CLUSTER command)
Format of the Matrix Data File (CLUSTER command)
Split Files (CLUSTER command)
Missing Values (CLUSTER command)
Example: Output to External File (CLUSTER command)
Example: Input from Active Dataset (CLUSTER command)
Example: Input from External File (CLUSTER command)
Example: Input from Active Dataset (CLUSTER command)


Example: Input from Active Dataset (CLUSTER command)

GET FILE=CLUSMTX.
CLUSTER
  /ID=CITY
  /MATRIX=IN(*).

• This example starts a new session and reads an existing matrix data file. GET retrieves the matrix data file CLUSMTX.

• MATRIX=IN specifies an asterisk because the matrix data file is the active dataset. If MATRIX=IN(CLUSMTX) is specified, the program issues an error message.

• If the GET command is omitted, the program issues an error message.

Related Topics

MATRIX Subcommand (CLUSTER command)
Matrix Output (CLUSTER command)
Matrix Input (CLUSTER command)
Format of the Matrix Data File (CLUSTER command)
Split Files (CLUSTER command)
Missing Values (CLUSTER command)
Example: Output to External File (CLUSTER command)
Example: Output Replacing Active Dataset (CLUSTER command)
Example: Input from External File (CLUSTER command)
Example: Input from Active Dataset (CLUSTER command)


Example: Input from External File (CLUSTER command)

GET FILE=PRSNNL.
FREQUENCIES VARIABLE=AGE.

CLUSTER
  /ID=CITY
  /MATRIX=IN(CLUSMTX).

• This example performs a frequencies analysis on the file PRSNNL and then uses a different file for CLUSTER. The file is an existing matrix data file.

• The variable list is omitted on the CLUSTER command. By default, all cases in the matrix file are used in the analysis.

• MATRIX=IN specifies the matrix data file CLUSMTX.

• CLUSMTX does not replace PRSNNL as the active dataset.

Related Topics

MATRIX Subcommand (CLUSTER command)
Matrix Output (CLUSTER command)
Matrix Input (CLUSTER command)
Format of the Matrix Data File (CLUSTER command)
Split Files (CLUSTER command)
Missing Values (CLUSTER command)
Example: Output to External File (CLUSTER command)
Example: Output Replacing Active Dataset (CLUSTER command)
Example: Input from Active Dataset (CLUSTER command)
Example: Input from Active Dataset (CLUSTER command)


Example: Input from Active Dataset (CLUSTER command)

GET FILE='data/crime.sav.
PROXIMITIES MURDER TO MOTOR
  /VIEW=VARIABLE
  /MEASURE=PH2
  /MATRIX=OUT(*).
CLUSTER
  /MATRIX=IN(*).

• PROXIMITIES uses the data from crime.sav, which is now the active dataset. The VIEW subcommand specifies computation of proximity values between variables. The MATRIX subcommand writes the matrix to the active dataset.

• MATRIX=IN(*) on the CLUSTER command reads the matrix materials from the active dataset. Since the matrix contains distances between variables, CLUSTER clusters variables based on distance measures in the input. The variable list is omitted on the CLUSTER command, so all variables are used in the analysis. The slash preceding the MATRIX subcommand is required because there is an implied variable list. Without the slash, CLUSTER would attempt to interpret MATRIX as a variable name rather than a subcommand name.

Related Topics

MATRIX Subcommand (CLUSTER command)
Matrix Output (CLUSTER command)
Matrix Input (CLUSTER command)
Format of the Matrix Data File (CLUSTER command)
Split Files (CLUSTER command)
Missing Values (CLUSTER command)
Example: Output to External File (CLUSTER command)
Example: Output Replacing Active Dataset (CLUSTER command)
Example: Input from Active Dataset (CLUSTER command)
Example: Input from External File (CLUSTER command)


CODEBOOK

CODEBOOK (command),CODEBOOK (command),CODEBOOK (command)
CODEBOOK (command),CODEBOOK (command),CODEBOOK (command)
syntax chart,syntax chart,syntax chart
dictionary,dictionary,dictionary
CODEBOOK command,CODEBOOK command,CODEBOOK command
multiple response sets,multiple response sets,multiple response sets
CODEBOOK command,CODEBOOK command,CODEBOOK command

CODEBOOK is available in the Statistics Base option.

Note: Square brackets used in the CODEBOOK syntax chart are required parts of the syntax and are not used to indicate optional elements. Equals signs (=) used in the syntax chart are required elements. All subcommands are optional.

CODEBOOK variable [level] variable [level] variable [level]...

  /VARINFO
    POSITION LABEL TYPE FORMAT MEASURE ROLE ATTRIBUTES VALUELABELS MISSING
    RESERVEDATTRIBUTES

  /FILEINFO NAME LOCATION CASECOUNT LABEL ATTRIBUTES DOCUMENTS WEIGHT
    RESERVEDATTRIBUTES

  /STATISTICS NONE COUNT PERCENT MEAN STDDEV QUARTILES

  /OPTIONS MAXCATS=200*
           VARORDER={FILE**         }
                    {ALPHA          }
                    {VARLIST†       }
                    {MEASURE        }
                    {ATTRIBUTE(name)}
               SORT={ASCENDING** }
                    {DESCENDING }

*Default if subcommand or keyword omitted.

**Default if subcommand omitted and there is no variable list.

†Default if subcommand omitted and the command includes a variable list.

• If the VARINFO subcommand is omitted, all variable information except RESERVEDATTRIBUTES is included.

• If the STATISTICS subcommand is omitted, all statistics are included.

Release History Collapse Hide details

Release History

Release 17.0

• Command introduced.

Release 18

• ROLE keyword added to VARINFO subcommand.

Example

CODEBOOK Age Income $MultCars.

Related Topics

Overview (CODEBOOK command)
Examples (CODEBOOK command)
Variable List (CODEBOOK command)
VARINFO Subcommand (CODEBOOK command)
FILEINFO Subcommand (CODEBOOK command)
STATISTICS Subcommand (CODEBOOK command)
OPTIONS Subcommand (CODEBOOK command)
Codebook


Overview (CODEBOOK command)

CODEBOOK reports the dictionary information -- such as variable names, variable labels, value labels, missing values -- and summary statistics for all or specified variables and multiple response sets in the active dataset. For nominal and ordinal variables and multiple response sets, summary statistics include counts and percents. For scale variables, summary statistics include mean, standard deviation, and quartiles.

Options Collapse Hide details

Options

Optionally, you can:

• Specify the variables and/or multiple response sets to include in the report.

• Choose the types of dictionary information to display.

• Suppress the display of summary statistics for any nominal and ordinal variables and multiple response set with more than a specified number of unique values.

• Override the defined measurement level for a variable, thereby changing the available summary statistics for the variable.

• Include a table of file information, such as file name and location and number of cases.

• Sort the variables in the report by variable name or label or other dictionary attributes such as type, format, or measurement level.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is the command name CODEBOOK with no additional specifications.

Subcommand Order Collapse Hide details

Subcommand Order

The command name is followed by the optional variable list, followed by the optional subcommands in any order.

Syntax Rules Collapse Hide details

Syntax Rules

• Variables and multiple response sets listed on the optional variable list must already exist in the active dataset.

• Each variable can only be specified or implied once.

• Multiple response set names must include the leading dollar sign ($).

• The keyword TO can be used to specify consecutive variables in file order. It cannot be used to specify a list of multiple response sets.

• Each subcommand can only be specified once.

• Equals signs and square brackets shown in examples are required syntax elements.

Operations Collapse Hide details

Operations

• By default, CODEBOOK reads the active dataset and causes the execution of any pending transformations.

• If /STATISTICS NONE is specified, CODEBOOK does not read the active dataset or execute pending transformations.

• SPLIT FILE status is ignored. This includes split-file groups created by the MULTIPLE IMPUTATION command (available in the Missing Values add-on option).

• FILTER status is honored for computing summary statistics.

Related Topics

CODEBOOK
Examples (CODEBOOK command)
Variable List (CODEBOOK command)
VARINFO Subcommand (CODEBOOK command)
FILEINFO Subcommand (CODEBOOK command)
STATISTICS Subcommand (CODEBOOK command)
OPTIONS Subcommand (CODEBOOK command)


Examples (CODEBOOK command)

CODEBOOK with No Additional Specifications

CODEBOOK.

The default output includes:

• Variable information for all variables in the dataset, except for reserved system attributes.

• Counts and percents for all categories of nominal and ordinal variables, labeled categories of scale variables, and multiple response sets.

• Mean, standard deviation, and quartiles for scale variables.

Specifying Specific Variables, Variable Information, and Statistics

CODEBOOK Var1 Var3 [N] $Multvar
  /VARINFO LABEL MEASURE VALUELABELS MISSING
  /STATISTICS COUNT MEAN
  /OPTIONS MAXCATS=10.

• The results will only include information for the two specified variables and the one multiple response set.

• Var3 [N] indicates that Var3 should be treated as nominal for summary statistics. This has no effect on the defined measurement level for the variable or the measurement level displayed in the results.

• Dictionary information will be limited to variable label, measurement level, value labels, and missing values.

• Only counts will be included for nominal/ordinal variables, multiple response sets and labeled categories of scale variables.

• Only the mean will be included for scale variables.

• For nominal/ordinal variables, multiple response sets, and labeled values of scale variables, MAXCATS=10 will suppress the display of value labels and counts if there are more than 10 unique, valid values.

Related Topics

CODEBOOK
Overview (CODEBOOK command)
Variable List (CODEBOOK command)
VARINFO Subcommand (CODEBOOK command)
FILEINFO Subcommand (CODEBOOK command)
STATISTICS Subcommand (CODEBOOK command)
OPTIONS Subcommand (CODEBOOK command)


Variable List (CODEBOOK command)

CODEBOOK (command),CODEBOOK (command),CODEBOOK (command)
variables,variables,variables
measurement level,measurement level,measurement level
summary statistics,summary statistics,summary statistics

The optional variable list specification allows you to limit the results to specified variables and/or multiple response sets and override the defined measurement level for specified numeric variables.

• Each variable or multiple response set can be specified or implied only once.

• Multiple response set names must include the leading dollar sign ($).

• Keyword TO can be used to specify consecutive variables in file order. It cannot be used to specify a list of multiple response sets.

• Keyword ALL can be used to specify all variables (does not include multiple response sets). Note: ALL cannot be used in combination with a list of one or more specific variable names since a variable can be specified only once.

• Keyword $ALL can be used to specify all multiple response sets (does not include variables). Note: $ALL cannot be used in combination with a list of one or more specific multiple response sets, since a set can be specified only once.

Overriding Defined Measurement Level

Available summary statistics are determined by the measurement level of the variable. You can override the defined measurement level by including a measurement level specification in square brackets after the variable name: [N] for nominal, [O] for ordinal, and [S] for scale. This does not change the defined measurement level for the variable, and if results include measurement level, the defined measurement level is displayed in the results.

• For string variables and multiple response sets, measurement level can only be nominal or ordinal.

• Measurement level specification cannot be used with keywords ALL or $ALL.

Example

CODEBOOK Var1 Var3 [N] Var5 TO Var8 [N] $Multvar.

• Var3 and Var8 will be treated as nominal for summary statistics, so the available summary statistics for those two variables are counts and percents.

• The defined measurement level will be used to determine available summary statistics for all other variables, including all the variables preceding Var8 in the set of variables defined by Var5 TO Var8.

Related Topics

CODEBOOK
Overview (CODEBOOK command)
Examples (CODEBOOK command)
VARINFO Subcommand (CODEBOOK command)
FILEINFO Subcommand (CODEBOOK command)
STATISTICS Subcommand (CODEBOOK command)
OPTIONS Subcommand (CODEBOOK command)


VARINFO Subcommand (CODEBOOK command)

CODEBOOK (command),CODEBOOK (command),CODEBOOK (command)
VARINFO subcommand,VARINFO subcommand,VARINFO subcommand
dictionary information,dictionary information,dictionary information
VARINFO (subcommand),VARINFO (subcommand),VARINFO (subcommand)
CODEBOOK command,CODEBOOK command,CODEBOOK command
dictionary,dictionary,dictionary
CODEBOOK command,CODEBOOK command,CODEBOOK command
POSITION (keyword),POSITION (keyword),POSITION (keyword)
CODEBOOK command,CODEBOOK command,CODEBOOK command
LABEL (keyword),LABEL (keyword),LABEL (keyword)
CODEBOOK command,CODEBOOK command,CODEBOOK command
TYPE (keyword),TYPE (keyword),TYPE (keyword)
CODEBOOK command,CODEBOOK command,CODEBOOK command
FORMAT (keyword),FORMAT (keyword),FORMAT (keyword)
CODEBOOK command,CODEBOOK command,CODEBOOK command
MEASURE (keyword),MEASURE (keyword),MEASURE (keyword)
CODEBOOK command,CODEBOOK command,CODEBOOK command
VALUELABELS (keyword),VALUELABELS (keyword),VALUELABELS (keyword)
CODEBOOK command,CODEBOOK command,CODEBOOK command
ATTRIBUTES (keyword),ATTRIBUTES (keyword),ATTRIBUTES (keyword)
CODEBOOK command,CODEBOOK command,CODEBOOK command
MISSING (keyword),MISSING (keyword),MISSING (keyword)
CODEBOOK command,CODEBOOK command,CODEBOOK command

The optional VARINFO subcommand allows you to control the variable information included in the results.

• By default, all available variable information, with the exception of reserved system attributes, is included.

• If you include the VARINFO subcommand, it should be followed by one or more of the available keywords that indicate the dictionary information to include.

The available options are:

POSITION. File position. An integer that represents the position of the variable in file order. This is not available for multiple response sets.

LABEL. Defined variable label.See the topic VARIABLE LABELS for more information.

TYPE. Fundamental data type. This is either Numeric, String, or Multiple Response Set.

FORMAT. Print format. The display format for the variable, such as A4, F8.2, or DATE11. See the topic Variable Types and Formats for more information. This is not available for multiple response sets.

MEASURE. Measurement level. The possible values are Nominal, Ordinal, Scale, and Unknown. The value displayed is the measurement level stored in the dictionary and is not affected by any temporary measurement level override specified by the CODEBOOK command. See the topic VARIABLE LEVEL for more information. This is not available for multiple response sets. (Note: The measurement level for numeric variables may be "unknown" prior to the first data pass when the measurement level has not been explicitly set, such as data read from an external source or newly created variables. The measurement level for string variables is always known.)

ROLE. Role when using predefined roles in dialogs. Some dialogs support predefined roles that can be used to pre-select variables for analysis. See the topic Overview (VARIABLE ROLE command) for more information.

ATTRIBUTES. User-defined custom variable attributes. Output includes both the names and values for any custom variable attributes associated with each variable. See the topic VARIABLE ATTRIBUTE for more information. This is not available for multiple response sets.

VALUELABELS. Defined value labels. If the STATISTICS subcommand includes COUNT or PERCENT, defined value labels are included in the output even if this keyword is omitted from the VARINFO subcommand. For information on defining value labels, see VALUE LABELS .

MISSING. User-defined missing values. If the STATISTICS subcommand includes COUNT or PERCENT, defined value labels are included in the output even if this keyword is omitted from the VARINFO subcommand. For information on defining missing values, see MISSING VALUES . This is not available for multiple response sets.

RESERVEDATTRIBUTES. Reserved system variable attributes. You can display system attributes, but you should not alter them. System attribute names start with a dollar sign ($) . Non-display attributes, with names that begin with either "@" or "$@", are not included. Output includes both the names and values for any system attributes associated with each variable. This is not available for multiple response sets.

Example

CODEBOOK
  /VARINFO LABEL MEASURE VALUELABELS MISSING.

Related Topics

CODEBOOK
Overview (CODEBOOK command)
Examples (CODEBOOK command)
Variable List (CODEBOOK command)
FILEINFO Subcommand (CODEBOOK command)
STATISTICS Subcommand (CODEBOOK command)
OPTIONS Subcommand (CODEBOOK command)


FILEINFO Subcommand (CODEBOOK command)

CODEBOOK (command),CODEBOOK (command),CODEBOOK (command)
FILEINFO subcommand,FILEINFO subcommand,FILEINFO subcommand
FILEINFO (subcommand),FILEINFO (subcommand),FILEINFO (subcommand)
CODEBOOK command,CODEBOOK command,CODEBOOK command
NAME (keyword),NAME (keyword),NAME (keyword)
CODEBOOK command,CODEBOOK command,CODEBOOK command
LOCATION (keyword),LOCATION (keyword),LOCATION (keyword)
CODEBOOK command,CODEBOOK command,CODEBOOK command
CASECOUNT (keyword),CASECOUNT (keyword),CASECOUNT (keyword)
CODEBOOK command,CODEBOOK command,CODEBOOK command
LABEL (keyword),LABEL (keyword),LABEL (keyword)
CODEBOOK command,CODEBOOK command,CODEBOOK command
ATTRIBUTES (keyword),ATTRIBUTES (keyword),ATTRIBUTES (keyword)
CODEBOOK command,CODEBOOK command,CODEBOOK command
WEIGHT (keyword),WEIGHT (keyword),WEIGHT (keyword)
CODEBOOK command,CODEBOOK command,CODEBOOK command
RESERVEDATTRIBUTES (keyword),RESERVEDATTRIBUTES (keyword),RESERVEDATTRIBUTES (keyword)
CODEBOOK command,CODEBOOK command,CODEBOOK command

The optional FILEINFO subcommand allows you to control the file information included in the results.

• By default, no file information is included.

• If you include the FILEINFO subcommand, it should be followed by one or more of the available keywords that indicate the file information to include.

The available options are:

NAME. Name of the PASW Statistics data file. If the dataset has never been saved in PASW Statistics format, then there is no data file name.

LOCATION. Directory (folder) location of the PASW Statistics data file. If the dataset has never been saved in PASW Statistics format, then there is no location.

CASECOUNT. Number of cases in the active dataset. This is the total number of cases, including any cases that may be excluded from summary statistics due to filter conditions.

LABEL. File label.See the topic FILE LABEL for more information.

ATTRIBUTES. User-defined custom data file attributes.See the topic DATAFILE ATTRIBUTE for more information.

DOCUMENTS. Data file document text. Document text created with the DOCUMENT or ADD DOCUMENT commands. See the topic ADD DOCUMENT for more information.

WEIGHT. Weight status If weighting is on, the name of the weight variable is displayed.

RESERVEDATTRIBUTES. Reserved system data file attributes. You can display system attributes, but you should not alter them. System attribute names start with a dollar sign ($) . Non-display attributes, with names that begin with either "@" or "$@", are not included. Output includes both the names and values for any system data file attributes.

Example

CODEBOOK
  /FILEINFO NAME LOCATION CASECOUNT.

• The file information table will only include the name and location of the PASW Statistics data file and the total number of cases in the file.

• The output will also include a table of variable information and summary statistics for each variable and multiple response set, because all variable information is included by default.

Related Topics

CODEBOOK
Overview (CODEBOOK command)
Examples (CODEBOOK command)
Variable List (CODEBOOK command)
VARINFO Subcommand (CODEBOOK command)
STATISTICS Subcommand (CODEBOOK command)
OPTIONS Subcommand (CODEBOOK command)


STATISTICS Subcommand (CODEBOOK command)

CODEBOOK (command),CODEBOOK (command),CODEBOOK (command)
STATISTICS subcommand,STATISTICS subcommand,STATISTICS subcommand
measurement level,measurement level,measurement level
summary statistics,summary statistics,summary statistics
STATISTICS (subcommand),STATISTICS (subcommand),STATISTICS (subcommand)
CODEBOOK command,CODEBOOK command,CODEBOOK command
COUNT (keyword),COUNT (keyword),COUNT (keyword)
CODEBOOK (command),CODEBOOK (command),CODEBOOK (command)
PERCENT (keyword),PERCENT (keyword),PERCENT (keyword)
CODEBOOK (command),CODEBOOK (command),CODEBOOK (command)
MEAN (keyword),MEAN (keyword),MEAN (keyword)
CODEBOOK (command),CODEBOOK (command),CODEBOOK (command)
STDDEV (keyword),STDDEV (keyword),STDDEV (keyword)
CODEBOOK (command),CODEBOOK (command),CODEBOOK (command)
QUARTILES (keyword),QUARTILES (keyword),QUARTILES (keyword)
CODEBOOK (command),CODEBOOK (command),CODEBOOK (command)
NONE (keyword),NONE (keyword),NONE (keyword)
CODEBOOK (command),CODEBOOK (command),CODEBOOK (command)

The optional STATISTICS subcommand allows you to control the summary statistics that are included in the output, or suppress the display of summary statistics entirely.

• By default, all summary statistics are included.

• If you include the STATISTICS subcommand, it should be followed by one or more of the available keywords.

The available options are:

COUNT. Number of cases in each category. This applies to nominal and ordinal variables, multiple response sets, and labeled values of scale variables.

PERCENT. Percent of cases in each category. This applies to nominal and ordinal variables, multiple response sets, and labeled values of scale variables. The denominator is the total number of cases, including cases with missing values for the variable. If filtering is in effect, it is the total number of unfiltered cases. For multiple response sets, percentages can sum to more than 100%.

MEAN. Mean. This applies to scale variables only.

STDDEV. Standard deviation. This applies to scale variables only.

QUARTILES. 25th, 50th (median), and 75th percentiles. This applies to scale variables only.

NONE. Do not include any summary statistics. If specified, this can be the only keyword included on the STATISTICS subcommand.

Example

CODEBOOK
    /STATISTICS COUNT MEAN.

Related Topics

CODEBOOK
Overview (CODEBOOK command)
Examples (CODEBOOK command)
Variable List (CODEBOOK command)
VARINFO Subcommand (CODEBOOK command)
FILEINFO Subcommand (CODEBOOK command)
OPTIONS Subcommand (CODEBOOK command)


OPTIONS Subcommand (CODEBOOK command)

CODEBOOK (command),CODEBOOK (command),CODEBOOK (command)
OPTIONS subcommand,OPTIONS subcommand,OPTIONS subcommand
sorting options,sorting options,sorting options
OPTIONS (subcommand),OPTIONS (subcommand),OPTIONS (subcommand)
CODEBOOK command,CODEBOOK command,CODEBOOK command
MAXCATS (keyword),MAXCATS (keyword),MAXCATS (keyword)
CODEBOOK (command),CODEBOOK (command),CODEBOOK (command)

The OPTIONS subcommand allows you to suppress the display of value labels, counts, and percents for variables with more than a specified number of values or value labels and control the order in which variables are displayed in the output.

• If the CODEBOOK command does not include a variable list, the default display order is ascending file order.

• If the CODEBOOK command includes a variable list, the default display order is the order in which the variables are listed on the command.

MAXCATS Keyword Collapse Hide details

MAXCATS Keyword

MAXCATS=N. Suppress counts and percents for variables with more than the specified number of valid values. The default is 200. This applies to nominal and ordinal variables, multiple response sets, and labeled values of scale variables. For scale variables, the number of categories is the number of labeled values.

VARORDER Keyword Collapse Hide details

VARORDER Keyword

The optional VARORDER keyword is followed by an equals sign (=) and one of the following alternatives:

FILE. File order.

ALPHA. Alphabetic order by variable name.

VARLIST. Order in which variables and multiple response sets are listed on the command. If there is no variable list, this setting is ignored, and the default file order is used.

MEASURE. Sort by measurement level. This creates four sorting groups: nominal, ordinal, scale, and unknown. (Note: The measurement level for numeric variables may be "unknown" prior to the first data pass when the measurement level has not been explicitly set, such as data read from an external source or newly created variables. The measurement level for string variables is always known.)

ATTRIBUTE (name). Alphabetic order by user-defined custom attribute name and value. In ascending order, variables that don't have the attribute sort to the top, followed by variables that have the attribute but no defined value for the attribute, followed by variables with defined values for the attribute in alphabetic order of the values. See the topic VARIABLE ATTRIBUTE for more information.

SORT Keyword Collapse Hide details

SORT Keyword

The optional SORT keyword is followed by an equals sign (=) and one of the following alternatives:

ASCENDING. Ascending order.

DESCENDING. Descending order.

Example

CODEBOOK
    /OPTIONS MAXCATS=50 VARORDER=ALPHA SORT=DESCENDING.

Related Topics

CODEBOOK
Overview (CODEBOOK command)
Examples (CODEBOOK command)
Variable List (CODEBOOK command)
VARINFO Subcommand (CODEBOOK command)
FILEINFO Subcommand (CODEBOOK command)
STATISTICS Subcommand (CODEBOOK command)


COMMENT

COMMENT (command),COMMENT (command),COMMENT (command)
COMMENT (command),COMMENT (command),COMMENT (command)
syntax chart,syntax chart,syntax chart
{COMMENT} text
{   *   }

Related Topics

Overview (COMMENT command)
Examples (COMMENT command)


Overview (COMMENT command)

COMMENT inserts explanatory text within the command sequence. Comments are included among the commands printed back in the output; they do not become part of the information saved in a data file. To include commentary in the dictionary of a data file, use the DOCUMENT command.

Syntax Rules Collapse Hide details

Syntax Rules

• The first line of a comment can begin with the keyword COMMENT or with an asterisk (*). Comment text can extend for multiple lines and can contain any characters. A period is required at the end of the last line to terminate the comment.

• Use /* and */ to set off a comment within a command. The comment can be placed wherever a blank is valid (except within strings) and should be preceded by a blank. Comments within a command cannot be continued onto the next line.

• The closing */ is optional when the comment is at the end of the line. The command can continue onto the next line just as if the inserted comment was a blank.

• Comments cannot be inserted within data lines.

• A comment on a separate line by itself within a command will cause an error. The comment line will be interpreted as a blank line, which is interpreted as a command terminator.

Related Topics

COMMENT
Examples (COMMENT command)


Examples (COMMENT command)

Comment As a Separate Command

* Create a new variable as a combination of two old variables;
  the new variable is a scratch variable used later in the
  session;  it will not be saved with the data file.

COMPUTE #XYVAR=0.
IF (XVAR EQ 1 AND YVAR EQ 1) #XYVAR=1.

The three-line comment will be included in the display file but will not be part of the data file if the active dataset is saved.

Comments within Commands

IF (RACE EQ 1 AND GENDER EQ 1) GENDERRACE = 1.  /*White males.

The comment is entered on a command line. The closing */ is not needed because the comment is at the end of the line.

Comment on Separate Line within a Command

FREQUENCIES VARIABLES=Var1 to Var5
  /*this will cause an error*/
  /FORMAT=NOTABLE
  /BARCHART.

A comment on a separate line within a command will cause an error. The comment is interpreted as a blank line, and a blank line is interpreted as a command terminator. So /FORMAT=NOTABLE will be intrepreted as the start of a different command, resulting in an error.

Related Topics

COMMENT
Overview (COMMENT command)


COMPUTE

COMPUTE target variable=expression

This command does not read the active dataset. It is stored, pending execution with the next command that reads the dataset. See the topic Command Order for more information.

Syntax for the COMPUTE command can be generated from the Compute Variable dialog.

COMPUTE (command),COMPUTE (command),COMPUTE (command)
COMPUTE (command),COMPUTE (command),COMPUTE (command)
syntax chart,syntax chart,syntax chart
COMPUTE (command),COMPUTE (command),COMPUTE (command)
functions,functions,functions
data transformations,data transformations,data transformations
functions,functions,functions
functions,functions,functions
computing values,computing values,computing values
functions,functions,functions

Example

COMPUTE newvar1=var1+var2.
COMPUTE newvar2=RND(MEAN(var1 to var4).
COMPUTE logicalVar=(var1>5).
STRING newString (A10).
COMPUTE newString=CONCAT((RTRIM(stringVar1), stringVar2).

Functions and operators available for COMPUTE are described in Transformation Expressions.

• Arithmetic Operations

• Numeric Constants

• Numeric Functions

• Arithmetic Functions

• Statistical Functions

• Random Variable and Distribution Functions

• String Functions

• String/Numeric Conversion Functions

• Logical Functions

• Relational Operators

• NOT Logical Operator

• AND and OR Logical Operators

• LAG Function

• Missing Value Functions

• Scoring Expressions (PASW Statistics Server)

• Date and Time Functions

Related Topics

Overview (COMPUTE command)
Syntax Rules (COMPUTE command)
Operations (COMPUTE command)
Examples (COMPUTE command)


Overview (COMPUTE command)

string variables,string variables,string variables
computing values,computing values,computing values
computing values,computing values,computing values
string variables,string variables,string variables
target variables,target variables,target variables
computing values,computing values,computing values
assignment expression,assignment expression,assignment expression
computing values,computing values,computing values
computing values,computing values,computing values
assignment expression,assignment expression,assignment expression
computing values,computing values,computing values
target variable,target variable,target variable

COMPUTE creates new numeric variables or modifies the values of existing string or numeric variables. The variable named on the left of the equals sign is the target variable. The variables, constants, and functions on the right side of the equals sign form an assignment expression. For a complete discussion of functions, see Transformation Expressions.

Numeric Transformations Collapse Hide details

Numeric Transformations

Numeric variables can be created or modified with COMPUTE. The assignment expression for numeric transformations can include combinations of constants, variables, numeric operators, and functions.

String Transformations Collapse Hide details

String Transformations

String variables can be modified but cannot be created with COMPUTE. However, a new string variable can be declared and assigned a width with the STRING command and then assigned values by COMPUTE. The assignment expression can include string constants, string variables, and any of the string functions. All other functions are available for numeric transformations only.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is a target variable, an equals sign (required), and an assignment expression.

Related Topics

COMPUTE
Syntax Rules (COMPUTE command)
Operations (COMPUTE command)
Examples (COMPUTE command)


Syntax Rules (COMPUTE command)

computing values,computing values,computing values
syntax rules,syntax rules,syntax rules

• The target variable must be named first, and the equals sign is required. Only one target variable is allowed per COMPUTE command.

• If the target variable is numeric, the expression must yield a numeric value; if the target variable is a string, the expression must yield a string value.

• Each function must specify at least one argument enclosed in parentheses. If a function has two or more arguments, the arguments must be separated by commas. For a complete discussion of functions and their arguments, see Transformation Expressions.

• You can use the TO keyword to refer to a set of variables where the argument is a list of variables.

Related Topics

COMPUTE
Overview (COMPUTE command)
Operations (COMPUTE command)
Examples (COMPUTE command)
Numeric Variables (COMPUTE command)
String Variables (COMPUTE command)


Numeric Variables (COMPUTE command)

• Parentheses are used to indicate the order of execution and to set off the arguments to a function.

• Numeric functions use simple or complex expressions as arguments. Expressions must be enclosed in parentheses.

Related Topics

Syntax Rules (COMPUTE command)
String Variables (COMPUTE command)


String Variables (COMPUTE command)

• String values and constants must be enclosed in single or double quotes.

• When strings of different lengths are compared using the ANY or RANGE functions, the shorter string is right-padded with blanks so that its length equals that of the longer string.

Related Topics

Syntax Rules (COMPUTE command)
Numeric Variables (COMPUTE command)


Operations (COMPUTE command)

• If the target variable already exists, its values are replaced.

• If the target variable does not exist and the assignment expression is numeric, the program creates a new variable.

• If the target variable does not exist and the assignment expression is a string, the program displays an error message and does not execute the command. Use the STRING command to declare new string variables before using them as target variables.

Related Topics

COMPUTE
Overview (COMPUTE command)
Syntax Rules (COMPUTE command)
Examples (COMPUTE command)
Numeric Variables (COMPUTE command)
String Variables (COMPUTE command)


Numeric Variables (COMPUTE command)

formats,formats,formats
of new variables,of new variables,of new variables
computing values,computing values,computing values
formats of new variables,formats of new variables,formats of new variables
target variables,target variables,target variables
formats,formats,formats

• New numeric variables created with COMPUTE are assigned a dictionary format of F8.2 and are initialized to the system-missing value for each case (unless the LEAVE command is used). Existing numeric variables transformed with COMPUTE retain their original dictionary formats. The format of a numeric variable can be changed with the FORMATS command.

• All expressions are evaluated in the following order: first functions, then exponentiation, and then arithmetic operations. The order of operations can be changed with parentheses.

missing values,missing values,missing values
in functions,in functions,in functions
functions,functions,functions
missing values in,missing values in,missing values in
computing values,computing values,computing values
missing values,missing values,missing values
COMPUTE (command),COMPUTE (command),COMPUTE (command)
missing values,missing values,missing values

• COMPUTE returns the system-missing value when it doesn’t have enough information to evaluate a function properly. Arithmetic functions that take only one argument cannot be evaluated if that argument is missing. The date and time functions cannot be evaluated if any argument is missing. Statistical functions are evaluated if a sufficient number of arguments is valid. For example, in the command

COMPUTE FACTOR = SCORE1 + SCORE2 + SCORE3.

FACTOR is assigned the system-missing value for a case if any of the three score values is missing. It is assigned a valid value only when all score values are valid. In the command

COMPUTE FACTOR = SUM(SCORE1 TO SCORE3).

FACTOR is assigned a valid value if at least one score value is valid. It is system-missing only when all three score values are missing. See Missing Values in Numeric Expressions for information on how to control the minimum number of non-missing arguments required to return a non-missing result.

Related Topics

Operations (COMPUTE command)
String Variables (COMPUTE command)


String Variables (COMPUTE command)

computing values,computing values,computing values
string variables,string variables,string variables
COMPUTE (command),COMPUTE (command),COMPUTE (command)
with STRING command,with STRING command,with STRING command
string variables,string variables,string variables
computing values,computing values,computing values

• String variables can be modified but not created on COMPUTE. However, a new string variable can be created and assigned a width with the STRING command and then assigned new values with COMPUTE.

• Existing string variables transformed with COMPUTE retain their original dictionary formats. String variables declared on STRING and transformed with COMPUTE retain the formats assigned to them on STRING.

• The format of string variables cannot be changed with FORMATS. Instead, use STRING to create a new variable with the desired width and then use COMPUTE to set the values of the new string equal to the values of the original.

• The string returned by a string expression does not have to be the same width as the target variable. If the target variable is shorter, the result is right-trimmed. If the target variable is longer, the result is right-padded. The program displays no warning messages when trimming or padding.

• To control the width of strings, use the functions that are available for padding (LPAD, RPAD), trimming (LTRIM, RTRIM), and selecting a portion of strings (SUBSTR).

• To determine whether a character in a string is single-byte or double-byte, use the MBLEN.BYTE function. Specify the string and, optionally, its beginning byte position. If the position is not specified, it defaults to 1.

See the topic String Functions for more information.

Related Topics

Operations (COMPUTE command)
Numeric Variables (COMPUTE command)


Examples (COMPUTE command)

functions,functions,functions
examples,examples,examples

A number of examples are provided to illustrate the use of COMPUTE. For a complete list of available functions and detailed function descriptions, see Transformation Expressions.

Related Topics

COMPUTE
Overview (COMPUTE command)
Syntax Rules (COMPUTE command)
Operations (COMPUTE command)
Arithmetic Operations (COMPUTE command)
Arithmetic Functions (COMPUTE command)
Statistical Functions (COMPUTE command)
Missing-Value Functions (COMPUTE command)
String Functions (COMPUTE command)
Scoring Functions (PASW Statistics Server Only) (COMPUTE command)


Arithmetic Operations (COMPUTE command)

COMPUTE (command),COMPUTE (command),COMPUTE (command)
with DO IF command,with DO IF command,with DO IF command
data transformations,data transformations,data transformations
arithmetic operators,arithmetic operators,arithmetic operators
computing values,computing values,computing values
arithmetic operators,arithmetic operators,arithmetic operators
arithmetic operators,arithmetic operators,arithmetic operators
COMPUTE V1=25-V2.
COMPUTE V3=(V2/V4)*100.

DO IF Tenure GT 5.
COMPUTE Raise=Salary*.12.
ELSE IF Tenure GT 1.
COMPUTE Raise=Salary*.1.
ELSE.
COMPUTE Raise=0.
END IF.

• V1 is 25 minus V2 for all cases. V3 is V2 expressed as a percentage of V4.

• Raise is 12% of Salary if Tenure is greater than 5. For remaining cases, Raise is 10% of Salary if Tenure is greater than 1. For all other cases, Raise is 0.

Related Topics

Examples (COMPUTE command)
Arithmetic Functions (COMPUTE command)
Statistical Functions (COMPUTE command)
Missing-Value Functions (COMPUTE command)
String Functions (COMPUTE command)
Scoring Functions (PASW Statistics Server Only) (COMPUTE command)


Arithmetic Functions (COMPUTE command)

data transformations,data transformations,data transformations
arithmetic functions,arithmetic functions,arithmetic functions
computing values,computing values,computing values
arithmetic functions,arithmetic functions,arithmetic functions
arithmetic functions,arithmetic functions,arithmetic functions
COMPUTE WtChange=ABS(Weight1-Weight2).
COMPUTE NewVar=RND((V1/V2)*100).
COMPUTE Income=TRUNC(Income).
COMPUTE MinSqrt=SQRT(MIN(V1,V2,V3,V4)).

COMPUTE Test = TRUNC(SQRT(X/Y)) * .5.
COMPUTE Parens = TRUNC(SQRT(X/Y) * .5).

• WtChange is the absolute value of Weight1 minus Weight2.

• NewVar is the percentage V1 is of V2, rounded to an integer.

• Income is truncated to an integer.

• MinSqrt is the square root of the minimum value of the four variables V1 to V4. MIN determines the minimum value of the four variables, and SQRT computes the square root.

• The last two examples above illustrate the use of parentheses to control the order of execution. For a case with value 2 for X and Y, Test equals 0.5, since 2 divided by 2 (X/Y) is 1, the square root of 1 is 1, truncating 1 returns 1, and 1 times 0.5 is 0.5. However, Parens equals 0 for the same case, since SQRT(X/Y) is 1, 1 times 0.5 is 0.5, and truncating 0.5 returns 0.

Related Topics

Examples (COMPUTE command)
Arithmetic Operations (COMPUTE command)
Statistical Functions (COMPUTE command)
Missing-Value Functions (COMPUTE command)
String Functions (COMPUTE command)
Scoring Functions (PASW Statistics Server Only) (COMPUTE command)


Statistical Functions (COMPUTE command)

data transformations,data transformations,data transformations
statistical functions,statistical functions,statistical functions
computing values,computing values,computing values
statistical functions,statistical functions,statistical functions
statistical functions,statistical functions,statistical functions
COMPUTE NewSalary = SUM(Salary,Raise).
COMPUTE MinValue = MIN(V1,V2,V3,V4).
COMPUTE MeanValue = MEAN(V1,V2,V3,V4).
COMPUTE NewMean = MEAN.3(V1,V2,V3,V4).

• NewSalary is the sum of Salary plus Raise.

• MinValue is the minimum of the values for V1 to V4.

• MeanValue is the mean of the values for V1 to V4. Since the mean can be computed for one, two, three, or four values, MeanValue is assigned a valid value as long as any one of the four variables has a valid value for that case.

• In the last example above, the .3 suffix specifies the minimum number of valid arguments required. NewMean is the mean of variables V1 to V4 only if at least three of these variables have valid values. Otherwise, NewMean is system-missing for that case.

Related Topics

Examples (COMPUTE command)
Arithmetic Operations (COMPUTE command)
Arithmetic Functions (COMPUTE command)
Missing-Value Functions (COMPUTE command)
String Functions (COMPUTE command)
Scoring Functions (PASW Statistics Server Only) (COMPUTE command)


Missing-Value Functions (COMPUTE command)

computing values,computing values,computing values
missing-value functions,missing-value functions,missing-value functions
data transformations,data transformations,data transformations
missing-value functions,missing-value functions,missing-value functions
missing-value functions,missing-value functions,missing-value functions
MISSING VALUE V1 V2 V3 (0).
COMPUTE AllValid=V1 + V2 + V3.
COMPUTE UM=VALUE(V1) + VALUE(V2) + VALUE(V3).
COMPUTE SM=SYSMIS(V1) + SYSMIS(V2) + SYSMIS(V3).
COMPUTE M=MISSING(V1) + MISSING(V2) + MISSING(V3).

• The MISSING VALUE command declares the value 0 as missing for V1, V2, and V3.

• AllValid is the sum of three variables only for cases with valid values for all three variables. AllValid is assigned the system-missing value for a case if any variable in the assignment expression has a system- or user-missing value.

• The VALUE function overrides user-missing value status. Thus, UM is the sum of V1, V2, and V3 for each case, including cases with the value 0 (the user-missing value) for any of the three variables. Cases with the system-missing value for V1, V2, and V3 are system-missing.

• The SYSMIS function on the third COMPUTE returns the value 1 if the variable is system-missing. Thus, SM ranges from 0 to 3 for each case, depending on whether the variables V1, V2, and V3 are system-missing for that case.

• The MISSING function on the fourth COMPUTE returns the value 1 if the variable named is system- or user-missing. Thus, M ranges from 0 to 3 for each case, depending on whether the variables V1, V2, and V3 are user- or system-missing for that case.

• Alternatively, you could use the COUNT command to create the variables SM and M.

* Test for listwise deletion of missing values.

DATA LIST /V1 TO V6 1-6.
BEGIN DATA
213 56
123457
123457
9234 6
END DATA.
MISSING VALUES V1 TO V6(6,9).

COMPUTE NotValid=NMISS(V1 TO V6).
FREQUENCIES VAR=NotValid.

• COMPUTE determines the number of missing values for each case. For each case without missing values, the value of NotValid is 0. For each case with one missing value, the value of NotValid is 1, and so on. Both system- and user-missing values are counted.

• FREQUENCIES generates a frequency table for NotValid. The table gives a count of how many cases have all valid values, how many cases have one missing value, how many cases have two missing values, and so on, for variables V1 to V6. This table can be used to determine how many cases would be dropped in an analysis that uses listwise deletion of missing values. For other ways to check listwise deletion, see the examples for the ELSE command (in the DO IF command) and those for the IF command.

See the topic Missing Value Functions for more information.

Related Topics

Examples (COMPUTE command)
Arithmetic Operations (COMPUTE command)
Arithmetic Functions (COMPUTE command)
Statistical Functions (COMPUTE command)
String Functions (COMPUTE command)
Scoring Functions (PASW Statistics Server Only) (COMPUTE command)


String Functions (COMPUTE command)

COMPUTE (command),COMPUTE (command),COMPUTE (command)
with STRING command,with STRING command,with STRING command
string functions,string functions,string functions
computing values,computing values,computing values
string functions,string functions,string functions
data transformations,data transformations,data transformations
string functions,string functions,string functions
DATA LIST FREE / FullName (A20).
BEGIN DATA
"Fred Smith"
END DATA.
STRING FirstName LastName LastFirstName (A20).
COMPUTE #spaceLoc=INDEX(FullName, " ").
COMPUTE FirstName=SUBSTR(FullName, 1, (#spaceLoc-1)).
COMPUTE LastName=SUBSTR(FullName, (#spaceLoc+1)).
COMPUTE LastFirstName=CONCAT(RTRIM(LastName), ", ", FirstName).
COMPUTE LastFirstName=REPLACE(LastFirstName, "Fred", "Ted").

• The INDEX function returns a number that represents the location of the first blank space in the value of the string variable FullName.

• The first SUBSTR function sets FirstName to the portion of FullName prior to the first space in the value. So, in this example, the value of FirstName is "Fred".

• The second SUBSTR function sets LastName to the portion of FullName after the first blank space in the value. So, in this example, the value of LastName is "Smith".

• The CONCAT function combines the values of LastName and FirstName, with a comma and a space between the two values. So, in this example, the value of LastFirstName is "Smith, Fred". Since all string values are right-padded with blank spaces to the defined width of the string variable, the RTRIM function is needed to remove all the extra blank spaces from LastName.

• The REPLACE function changes any instances of the string "Fred" in LastFirstName to "Ted". So, in this example, the value of LastFirstName is changed to "Smith, Ted".

See the topic String Functions for more information.

Related Topics

Examples (COMPUTE command)
Arithmetic Operations (COMPUTE command)
Arithmetic Functions (COMPUTE command)
Statistical Functions (COMPUTE command)
Missing-Value Functions (COMPUTE command)
Scoring Functions (PASW Statistics Server Only) (COMPUTE command)


Scoring Functions (PASW Statistics Server Only) (COMPUTE command)

scoring functions,scoring functions,scoring functions
data transformations,data transformations,data transformations
scoring functions,scoring functions,scoring functions
computing values,computing values,computing values
scoring functions,scoring functions,scoring functions
COMPUTE (command),COMPUTE (command),COMPUTE (command)
with STRING command,with STRING command,with STRING command
string functions,string functions,string functions
computing values,computing values,computing values
string functions,string functions,string functions
data transformations,data transformations,data transformations
string functions,string functions,string functions
STRING SPECIES(A20).
COMPUTE SCOREPROB=ApplyModel(CREDITMOD1,'PROBABILIT').
COMPUTE SPECIES=StrApplyModel(QUESTMOD1,'PREDICT').

• SCOREPROB is the probability that the value predicted from the model specified by CREDITMOD1 is correct.

• SPECIES is the predicted result from the model specified by QUESTMOD1 as applied to the active dataset. The prediction is returned as a string value.

Related Topics

Examples (COMPUTE command)
Arithmetic Operations (COMPUTE command)
Arithmetic Functions (COMPUTE command)
Statistical Functions (COMPUTE command)
Missing-Value Functions (COMPUTE command)
String Functions (COMPUTE command)


CONJOINT

CONJOINT (command),CONJOINT (command),CONJOINT (command)
CONJOINT (command),CONJOINT (command),CONJOINT (command)
syntax chart,syntax chart,syntax chart
Conjoint analysis,Conjoint analysis,Conjoint analysis
command syntax,command syntax,command syntax

CONJOINT is available in the Conjoint option.

CONJOINT  [PLAN={*                  }]
                {'savfile'|'dataset'}

 [/DATA={*                  }]
        {'savfile'|'dataset'}

  /{SEQUENCE}=varlist
   {RANK    }
   {SCORE   }

 [/SUBJECT=variable]

 [/FACTORS=varlist['labels'] ([{DISCRETE[{MORE}]}]
                               {         {LESS} }
                               {LINEAR[{MORE}]  }
                               {       {LESS}   }
                               {IDEAL           }
                               {ANTIIDEAL       }
           [values['labels']])]

           varlist...

 [/PRINT={ALL**      } [SUMMARYONLY]]
         {ANALYSIS   }
         {SIMULATION }
         {NONE       }

 [/UTILITY=file]

 [/PLOT={[SUMMARY] [SUBJECT] [ALL]}]
        {[NONE**]                 }

**Default if the subcommand or keyword is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See CONJOINT Algorithms for computational details for this procedure.

Example:

CONJOINT PLAN='/DATA/CARPLAN.SAV'
 /FACTORS=SPEED (LINEAR MORE) WARRANTY (DISCRETE MORE)
  PRICE (LINEAR LESS) SEATS
 /SUBJECT=SUBJ /RANK=RANK1 TO RANK15 /UTILITY='UTIL.SAV'.

Related Topics

Overview (CONJOINT command)
Examples (CONJOINT command)
PLAN Subcommand (CONJOINT command)
DATA Subcommand (CONJOINT command)
SEQUENCE, RANK, or SCORE Subcommand (CONJOINT command)
SUBJECT Subcommand (CONJOINT command)
FACTORS Subcommand (CONJOINT command)
PRINT Subcommand (CONJOINT command)
UTILITY Subcommand (CONJOINT command)
PLOT Subcommand (CONJOINT command)


Overview (CONJOINT command)

CONJOINT (command),CONJOINT (command),CONJOINT (command)
with ORTHOPLAN command,with ORTHOPLAN command,with ORTHOPLAN command
ORTHOPLAN (command),ORTHOPLAN (command),ORTHOPLAN (command)
with CONJOINT command,with CONJOINT command,with CONJOINT command

CONJOINT analyzes score or rank data from full-concept conjoint studies. A plan file that is generated by ORTHOPLAN or entered by the user describes the set of full concepts that are scored or ranked in terms of preference. A variety of continuous and discrete models is available to estimate utilities for each individual subject and for the group. Simulation estimates for concepts that are not rated can also be computed.

Options Collapse Hide details

Options

Data Input. You can analyze data recorded as rankings of an ordered set of profiles (or cards) as the profile numbers arranged in rank order, or as preference scores of an ordered set of profiles.

Model Specification. You can specify how each factor is expected to be related to the scores or ranks.

Display Output. The output can include the analysis of the experimental data, results of simulation data, or both.

Writing an External File. An data file containing utility estimates and associated statistics for each subject can be written for use in further analyses or graphs.

Basic Specification Collapse Hide details

Basic Specification

• The basic specification is CONJOINT, a PLAN or DATA subcommand, and a SEQUENCE, RANK, or SCORE subcommand to describe the type of data.

• CONJOINT requires two files: a plan file and a data file. If only the PLAN subcommand or the DATA subcommand—but not both—is specified, CONJOINT will read the file that is specified on the PLAN or DATA subcommand and use the active dataset as the other file.

• By default, estimates are computed by using the DISCRETE model for all variables in the plan file (except those named STATUS_ and CARD_). Output includes Kendall’s tau and Pearson’s product-moment correlation coefficients measuring the relationship between predicted scores and actual scores. Significance levels for one-tailed tests are displayed.

Subcommand Order Collapse Hide details

Subcommand Order

• Subcommands can appear in any order.

Syntax Rules Collapse Hide details

Syntax Rules

• Multiple FACTORS subcommands are all executed. For all other subcommands, only the last occurrence is executed.

Operations Collapse Hide details

Operations

• Both the plan and data files can be external PASW Statistics data files. In this case, CONJOINT can be used before an active dataset is defined.

• The variable STATUS_ in the plan file must equal 0 for experimental profiles, 1 for holdout profiles, and 2 for simulation profiles. Holdout profiles are judged by the subjects but are not used when CONJOINT estimates utilities. Instead, these profiles are used as a check on the validity of the estimated utilities. Simulation profiles are factor-level combinations that are not rated by the subjects but are estimated by CONJOINT based on the ratings of the experimental profiles. If there is no STATUS_ variable, all profiles in the plan file are assumed to be experimental profiles.

• All variables in the plan file except STATUS_ and CARD_ are used by CONJOINT as factors.

• In addition to the estimates for each individual subject, average estimates for each split-file group that is identified in the data file are computed. The plan file cannot have a split-file structure.

• Factors are tested for orthogonality by CONJOINT. If all of the factors are not orthogonal, a matrix of Cramér’s V statistics is displayed to describe the non-orthogonality.

• When SEQUENCE or RANK data are used, CONJOINT internally reverses the ranking scale so that the computed coefficients are positive.

• The plan file cannot be sorted or modified in any way after the data are collected, because the sequence of profiles in the plan file must match the sequence of values in the data file in a one-to-one correspondence. (CONJOINT uses the order of profiles as they appear in the plan file, not the value of CARD_, to determine profile order.) If RANK or SCORE is the data-recording method, the first response from the first subject in the data file is the rank or score of the first profile in the plan file. If SEQUENCE is the data-recording method, the first response from the first subject in the data file is the profile number (determined by the order of profiles in the plan file) of the most preferred profile.

Limitations Collapse Hide details

Limitations

• Factors must be numeric.

• The plan file cannot contain missing values or case weights. In the active dataset, profiles with missing values on the SUBJECT variable are grouped together and averaged at the end. If any preference data (the ranks, scores, or profile numbers) are missing, that subject is skipped.

• Factors must have at least two levels. The maximum number of levels for each factor is 99. Note that ORTHOPLAN will only produce plans with factors with 9 or fewer levels for each factor.

Related Topics

CONJOINT
Examples (CONJOINT command)
PLAN Subcommand (CONJOINT command)
DATA Subcommand (CONJOINT command)
SEQUENCE, RANK, or SCORE Subcommand (CONJOINT command)
SUBJECT Subcommand (CONJOINT command)
FACTORS Subcommand (CONJOINT command)
PRINT Subcommand (CONJOINT command)
UTILITY Subcommand (CONJOINT command)
PLOT Subcommand (CONJOINT command)


Examples (CONJOINT command)

CONJOINT PLAN='/DATA/CARPLAN.SAV'
 /FACTORS=SPEED (LINEAR MORE) WARRANTY (DISCRETE MORE)
  PRICE (LINEAR LESS) SEATS
 /SUBJECT=SUBJ /RANK=RANK1 TO RANK15 /UTILITY='UTIL.SAV'.

• The PLAN subcommand specifies the PASW Statistics data file CARPLAN.SAV as the plan file containing the full-concept profiles. Because there is no DATA subcommand, the active dataset is assumed to contain the subjects’ rankings of these profiles.

• The FACTORS subcommand specifies the ways in which the factors are expected to be related to the rankings. For example, speed is expected to be linearly related to the rankings, so that cars with higher speeds will receive lower (more-preferred) rankings.

• The SUBJECT subcommand specifies the variable SUBJ in the active dataset as an identification variable. All consecutive cases with the same value on this variable are combined to estimate utilities.

• The RANK subcommand specifies that each data point is a ranking of a specific profile and identifies the variables in the active dataset that contain these rankings.

• UTILITY writes out an external data file named UTIL.SAV containing the utility estimates and associated statistics for each subject.

Related Topics

CONJOINT
Overview (CONJOINT command)
PLAN Subcommand (CONJOINT command)
DATA Subcommand (CONJOINT command)
SEQUENCE, RANK, or SCORE Subcommand (CONJOINT command)
SUBJECT Subcommand (CONJOINT command)
FACTORS Subcommand (CONJOINT command)
PRINT Subcommand (CONJOINT command)
UTILITY Subcommand (CONJOINT command)
PLOT Subcommand (CONJOINT command)


PLAN Subcommand (CONJOINT command)

PLAN (subcommand),PLAN (subcommand),PLAN (subcommand)
CONJOINT command,CONJOINT command,CONJOINT command
CONJOINT (command),CONJOINT (command),CONJOINT (command)
PLAN subcommand,PLAN subcommand,PLAN subcommand

PLAN identifies the file containing the full-concept profiles.

• PLAN is followed by quoted file specification for an external PASW Statistics data file or currently open dataset containing the plan. An asterisk instead of a file specification indicates the active dataset.

• If the PLAN subcommand is omitted, the active dataset is assumed by default. However, you must specify at least one PASW Statistics data file or dataset on a PLAN or DATA subcommand. The active dataset cannot be specified as both the plan file and data file.

CONJOINT (command),CONJOINT (command),CONJOINT (command)
with ORTHOPLAN command,with ORTHOPLAN command,with ORTHOPLAN command

• The plan file is a specially prepared file that is generated by ORTHOPLAN or entered by the user. The plan file can contain the variables CARD_ and STATUS_, and it must contain the factors of the conjoint study. The value of CARD_ is a profile identification number. The value of STATUS_ is 0, 1, or 2, depending on whether the profile is an experimental profile (0), a holdout profile (1), or a simulation profile (2).

• The sequence of the profiles in the plan file must match the sequence of values in the data file.

• Any simulation profiles (STATUS_=2) must follow experimental and holdout profiles in the plan file.

• All variables in the plan file except CARD_ and STATUS_ are used as factors by CONJOINT.

Example

DATA LIST FREE /CARD_ WARRANTY SEATS PRICE SPEED STATUS_.
BEGIN DATA
1 1 4 14000 130 2
2 1 4 14000 100 2
3 3 4 14000 130 2
4 3 4 14000 100 2
END DATA.
ADD FILES FILE='/DATA/CARPLAN.SAV'/FILE=*.
CONJOINT PLAN=* /DATA='/DATA/CARDATA.SAV'
  /FACTORS=PRICE (ANTIIDEAL) SPEED (LINEAR) WARRANTY (DISCRETE MORE)
  /SUBJECT=SUBJ /RANK=RANK1 TO RANK15 /PRINT=SIMULATION.

• DATA LIST defines six variables—a CARD_ identification variable, four factors, and a STATUS_ variable.

• The data between BEGIN DATA and END DATA are four simulation profiles. Each profile contains a CARD_ identification number and the specific combination of factor levels of interest.

• The variable STATUS_ is equal to 2 for all cases (profiles). CONJOINT interprets profiles with STATUS_ equal to 2 as simulation profiles.

• The ADD FILES command joins an old plan file, CARPLAN.SAV, with the active dataset. Note that the active dataset is indicated last on the ADD FILES command so that the simulation profiles are appended to the end of CARPLAN.SAV.

• The PLAN subcommand on CONJOINT defines the new active dataset as the plan file. The DATA subcommand specifies a data file from a previous CONJOINT analysis.

Related Topics

CONJOINT
Overview (CONJOINT command)
Examples (CONJOINT command)
DATA Subcommand (CONJOINT command)
SEQUENCE, RANK, or SCORE Subcommand (CONJOINT command)
SUBJECT Subcommand (CONJOINT command)
FACTORS Subcommand (CONJOINT command)
PRINT Subcommand (CONJOINT command)
UTILITY Subcommand (CONJOINT command)
PLOT Subcommand (CONJOINT command)


DATA Subcommand (CONJOINT command)

DATA (subcommand),DATA (subcommand),DATA (subcommand)
CONJOINT command,CONJOINT command,CONJOINT command
CONJOINT (command),CONJOINT (command),CONJOINT (command)
DATA subcommand,DATA subcommand,DATA subcommand

DATA identifies the file containing the subjects’ preference scores or rankings.

DATA (subcommand),DATA (subcommand),DATA (subcommand)
with PLAN subcommand,with PLAN subcommand,with PLAN subcommand
PLAN (subcommand),PLAN (subcommand),PLAN (subcommand)
with DATA subcommand,with DATA subcommand,with DATA subcommand

• DATA is followed by a quoted file specification for an external PASW Statistics data file or a currently open dataset containing the data. An asterisk instead of a file specification indicates the active dataset.

• If the DATA subcommand is omitted, the active dataset is assumed by default. However, you must specify at least one PASW Statistics data file on a DATA or PLAN subcommand. The active dataset cannot be specified as both the plan file and data file.

• One variable in the data file can be a subject identification variable. All other variables are the subject responses and are equal in number to the number of experimental and holdout profiles in the plan file.

• The subject responses can be in the form of ranks assigned to an ordered sequence of profiles, scores assigned to an ordered sequence of profiles, or profile numbers in preference order from most liked to least liked.

• Tied ranks or scores are allowed. If tied ranks are present, CONJOINT issues a warning and then proceeds with the analysis. Data recorded in SEQUENCE format, however, cannot have ties, because each profile number must be unique.

Example

DATA LIST FREE /SUBJ RANK1 TO RANK15.
BEGIN DATA
01  3  7  6  1  2  4  9 12 15 13 14  5  8 10 11
02  7  3  4  9  6 15 10 13  5 11  1  8  4  2 12
03 12 13  5  1 14  8 11  2  7  6  3  4 15  9 10
04  3  6  7  4  2  1  9 12 15 11 14  5  8 10 13
05  9  3  4  7  6 10 15 13  5 12  1  8  4  2 11
50 12 13  8  1 14  5 11  6  7  2  3  4 15 10  9
END DATA.
SAVE OUTFILE='/DATA/RANKINGS.SAV'.
DATA LIST FREE /CARD_ WARRANTY SEATS PRICE SPEED.
BEGIN DATA
 1 1 4 14000 130
 2 1 4 14000 100
 3 3 4 14000 130
 4 3 4 14000 100
 5 5 2 10000 130
 6 1 4 10000 070
 7 3 4 10000 070
 8 5 2 10000 100
 9 1 4 07000 130
10 1 4 07000 100
11 5 2 07000 070
12 5 4 07000 070
13 1 4 07000 070
14 5 2 10000 070
15 5 2 14000 130
END DATA.
CONJOINT PLAN=* /DATA='/DATA/RANKINGS.SAV'
  /FACTORS=PRICE (ANTIIDEAL) SPEED (LINEAR)
   WARRANTY (DISCRETE MORE)
  /SUBJECT=SUBJ /RANK=RANK1 TO RANK15.

• The first set of DATA LIST and BEGIN–END DATA commands creates a data file containing the rankings. This file is saved in the external file RANKINGS.SAV.

• The second set of DATA LIST and BEGIN–END DATA commands defines the plan file as the active dataset.

• The CONJOINT command uses the active dataset as the plan file and uses RANKINGS.SAV as the data file.

Related Topics

CONJOINT
Overview (CONJOINT command)
Examples (CONJOINT command)
PLAN Subcommand (CONJOINT command)
SEQUENCE, RANK, or SCORE Subcommand (CONJOINT command)
SUBJECT Subcommand (CONJOINT command)
FACTORS Subcommand (CONJOINT command)
PRINT Subcommand (CONJOINT command)
UTILITY Subcommand (CONJOINT command)
PLOT Subcommand (CONJOINT command)


SEQUENCE, RANK, or SCORE Subcommand (CONJOINT command)

SEQUENCE (subcommand),SEQUENCE (subcommand),SEQUENCE (subcommand)
CONJOINT command,CONJOINT command,CONJOINT command
CONJOINT (command),CONJOINT (command),CONJOINT (command)
SEQUENCE subcommand,SEQUENCE subcommand,SEQUENCE subcommand
CONJOINT (command),CONJOINT (command),CONJOINT (command)
SCORE subcommand,SCORE subcommand,SCORE subcommand
CONJOINT (command),CONJOINT (command),CONJOINT (command)
RANK subcommand,RANK subcommand,RANK subcommand

The SEQUENCE, RANK, or SCORE subcommand is specified to indicate the way in which the preference data were recorded.

SEQUENCE | Each data point in the data file is a profile number, starting with the most-preferred profile and ending with the least-preferred profile. This is how the data are recorded if the subject is asked to order the deck of profiles from most preferred to least preferred. The researcher records which profile number was first, which profile number was second, and so on.
RANK | Each data point is a ranking, starting with the ranking of profile 1, then the ranking of profile 2, and so on. This is how the data are recorded if the subject is asked to assign a rank to each profile, ranging from 1 to n, where n is the number of profiles. A lower rank implies greater preference.
SCORE | Each data point is a preference score assigned to the profiles, starting with the score of profile 1, then the score of profile 2, and so on. These types of data might be generated, for example, by asking subjects to use a Likert scale to assign a score to each profile or by asking subjects to assign a number from 1 to 100 to show how much they like the profile. A higher score implies greater preference.

• You must specify one, and only one, of these three subcommands.

• After each subcommand, the names of the variables containing the preference data (the profile numbers, ranks, or scores) are listed. There must be as many variable names listed as there are experimental and holdout profiles in the plan file.

Example

CONJOINT PLAN=* /DATA='DATA.SAV'
  /FACTORS=PRICE (ANTIIDEAL) SPEED (LINEAR) WARRANTY (DISCRETE MORE)
  /SUBJECT=SUBJ
  /RANK=RANK1 TO RANK15.

• The RANK subcommand indicates that the data are rankings of an ordered sequence of profiles. The first data point after SUBJ is variable RANK1, which is the ranking that is given by subject 1 to profile 1.

• There are 15 profiles in the plan file, so there must be 15 variables listed on the RANK subcommand.

• The example uses the TO keyword to refer to the 15 rank variables.

Related Topics

CONJOINT
Overview (CONJOINT command)
Examples (CONJOINT command)
PLAN Subcommand (CONJOINT command)
DATA Subcommand (CONJOINT command)
SUBJECT Subcommand (CONJOINT command)
FACTORS Subcommand (CONJOINT command)
PRINT Subcommand (CONJOINT command)
UTILITY Subcommand (CONJOINT command)
PLOT Subcommand (CONJOINT command)


SUBJECT Subcommand (CONJOINT command)

SUBJECT (subcommand),SUBJECT (subcommand),SUBJECT (subcommand)
CONJOINT command,CONJOINT command,CONJOINT command
CONJOINT (command),CONJOINT (command),CONJOINT (command)
SUBJECT subcommand,SUBJECT subcommand,SUBJECT subcommand

SUBJECT specifies an identification variable. All consecutive cases having the same value on this variable are combined to estimate the utilities.

• If SUBJECT is not specified, all data are assumed to come from one subject, and only a group summary is displayed.

• SUBJECT is followed by the name of a variable in the active dataset.

• If the same SUBJECT value appears later in the data file, it is treated as a different subject.

Related Topics

CONJOINT
Overview (CONJOINT command)
Examples (CONJOINT command)
PLAN Subcommand (CONJOINT command)
DATA Subcommand (CONJOINT command)
SEQUENCE, RANK, or SCORE Subcommand (CONJOINT command)
FACTORS Subcommand (CONJOINT command)
PRINT Subcommand (CONJOINT command)
UTILITY Subcommand (CONJOINT command)
PLOT Subcommand (CONJOINT command)


FACTORS Subcommand (CONJOINT command)

FACTORS (subcommand),FACTORS (subcommand),FACTORS (subcommand)
CONJOINT command,CONJOINT command,CONJOINT command
CONJOINT (command),CONJOINT (command),CONJOINT (command)
FACTORS subcommand,FACTORS subcommand,FACTORS subcommand

FACTORS specifies the way in which each factor is expected to be related to the rankings or scores.

• If FACTORS is not specified, the DISCRETE model is assumed for all factors.

• All variables in the plan file except CARD_ and STATUS_ are used as factors, even if they are not specified on FACTORS.

DISCRETE (keyword),DISCRETE (keyword),DISCRETE (keyword)
CONJOINT command,CONJOINT command,CONJOINT command
LINEAR (keyword),LINEAR (keyword),LINEAR (keyword)
CONJOINT command,CONJOINT command,CONJOINT command
MORE (keyword),MORE (keyword),MORE (keyword)
CONJOINT command,CONJOINT command,CONJOINT command
LESS (keyword),LESS (keyword),LESS (keyword)
CONJOINT command,CONJOINT command,CONJOINT command

• FACTORS is followed by a variable list and a model specification in parentheses that describes the expected relationship between scores or ranks and factor levels for that variable list.

• The model specification consists of a model name and, for the DISCRETE and LINEAR models, an optional MORE or LESS keyword to indicate the direction of the expected relationship. Values and value labels can also be specified.

• MORE and LESS keywords will not affect estimates of utilities. They are used simply to identify subjects whose estimates do not match the expected direction.

The four available models are as follows:

IDEAL (keyword),IDEAL (keyword),IDEAL (keyword)
CONJOINT command,CONJOINT command,CONJOINT command
ANTIIDEAL (keyword),ANTIIDEAL (keyword),ANTIIDEAL (keyword)
CONJOINT command,CONJOINT command,CONJOINT command
DISCRETE | No assumption. The factor levels are categorical, and no assumption is made about the relationship between the factor and the scores or ranks. This setting is the default. Specify keyword MORE after DISCRETE to indicate that higher levels of a factor are expected to be more preferred. Specify keyword LESS after DISCRETE to indicate that lower levels of a factor are expected to be more preferred.
LINEAR | Linear relationship. The scores or ranks are expected to be linearly related to the factor. Specify keyword MORE after LINEAR to indicate that higher levels of a factor are expected to be more preferred. Specify keyword LESS after LINEAR to indicate that lower levels of a factor are expected to be more preferred.
IDEAL | Quadratic relationship, decreasing preference. A quadratic relationship is expected between the scores or ranks and the factor. It is assumed that there is an ideal level for the factor, and distance from this ideal point, in either direction, is associated with decreasing preference. Factors that are described with this model should have at least three levels.
ANTIIDEAL | Quadratic relationship, increasing preference. A quadratic relationship is expected between the scores or ranks and the factor. It is assumed that there is a worst level for the factor, and distance from this point, in either direction, is associated with increasing preference. Factors that are described with this model should have at least three levels.

• The DISCRETE model is assumed for those variables that are not listed on the FACTORS subcommand.

• When a MORE or LESS keyword is used with DISCRETE or LINEAR, a reversal is noted when the expected direction does not occur.

• Both IDEAL and ANTIIDEAL create a quadratic function for the factor. The only difference is whether preference increases or decreases with distance from the point. The estimated utilities are the same for these two models. A reversal is noted when the expected model (IDEAL or ANTIIDEAL) does not occur.

• The optional value and value label lists allow you to recode data and/or replace value labels. The new values, in the order in which they appear on the value list, replace existing values, starting with the smallest existing value. If a new value is not specified for an existing value, the value remains unchanged.

• New value labels are specified in apostrophes or quotation marks. New values without new labels retain existing labels; new value labels without new values are assigned to values in the order in which they appear, starting with the smallest existing value.

• For each factor that is recoded, a table is displayed, showing the original and recoded values and the value labels.

• If the factor levels are coded in discrete categories (for example, 1, 2, 3), these values are the values used by CONJOINT in computations, even if the value labels contain the actual values (for example, 80, 100, 130). Value labels are never used in computations. You can recode the values as described above to change the coded values to the real values. Recoding does not affect DISCRETE factors but does change the coefficients of LINEAR, IDEAL, and ANTIIDEAL factors.

• In the output, variables are described in the following order:

1. All DISCRETE variables in the order in which they appear on the FACTORS subcommand.

2. All LINEAR variables in the order in which they appear on the FACTORS subcommand.

3. All IDEAL and ANTIIDEAL factors in the order in which they appear on the FACTORS subcommand.

Example

CONJOINT DATA='DATA.SAV'
 /FACTORS=PRICE (LINEAR LESS) SPEED (IDEAL 70 100 130)
  WARRANTY (DISCRETE MORE)
 /RANK=RANK1 TO RANK15.

• The FACTORS subcommand specifies the expected relationships. A linear relationship is expected between price and rankings, so that the higher the price, the lower the preference (higher ranks). A quadratic relationship is expected between speed levels and rankings, and longer warranties are expected to be associated with greater preference (lower ranks).

• The SPEED factor has a new value list. If the existing values were 1, 2, and 3, 70 replaces 1, 100 replaces 2, and 130 replaces 3.

• Any variable in the plan file (except CARD_ and STATUS_) that is not listed on the FACTORS subcommand uses the DISCRETE model.

Related Topics

CONJOINT
Overview (CONJOINT command)
Examples (CONJOINT command)
PLAN Subcommand (CONJOINT command)
DATA Subcommand (CONJOINT command)
SEQUENCE, RANK, or SCORE Subcommand (CONJOINT command)
SUBJECT Subcommand (CONJOINT command)
PRINT Subcommand (CONJOINT command)
UTILITY Subcommand (CONJOINT command)
PLOT Subcommand (CONJOINT command)


PRINT Subcommand (CONJOINT command)

PRINT (subcommand),PRINT (subcommand),PRINT (subcommand)
CONJOINT command,CONJOINT command,CONJOINT command
CONJOINT (command),CONJOINT (command),CONJOINT (command)
PRINT subcommand,PRINT subcommand,PRINT subcommand

PRINT controls whether your output includes the analysis of the experimental data, the results of the simulation data, both, or none.

The following keywords are available:

ANALYSIS (keyword),ANALYSIS (keyword),ANALYSIS (keyword)
CONJOINT command,CONJOINT command,CONJOINT command
SIMULATIONS (keyword),SIMULATIONS (keyword),SIMULATIONS (keyword)
CONJOINT command,CONJOINT command,CONJOINT command
ALL (keyword),ALL (keyword),ALL (keyword)
CONJOINT command,CONJOINT command,CONJOINT command
NONE (keyword),NONE (keyword),NONE (keyword)
CONJOINT command,CONJOINT command,CONJOINT command
ANALYSIS | Only the results of the experimental data analysis are included.
SIMULATION | Only the results of the simulation data analysis are included. The results of three simulation models—maximum utility, Bradley-Terry-Luce (BTL), and logit—are displayed.
SUMMARYONLY | Only the summaries in the output are included, not the individual subjects. Thus, if you have a large number of subjects, you can see the summary results without having to generate output for each subject.
ALL | The results of both the experimental data and simulation data analyses are included. ALL is the default.
NONE | No results are written to the display file. This keyword is useful if you are interested only in writing the utility file (see “UTILITY Subcommand” below).

Related Topics

CONJOINT
Overview (CONJOINT command)
Examples (CONJOINT command)
PLAN Subcommand (CONJOINT command)
DATA Subcommand (CONJOINT command)
SEQUENCE, RANK, or SCORE Subcommand (CONJOINT command)
SUBJECT Subcommand (CONJOINT command)
FACTORS Subcommand (CONJOINT command)
UTILITY Subcommand (CONJOINT command)
PLOT Subcommand (CONJOINT command)


UTILITY Subcommand (CONJOINT command)

UTILITY (subcommand),UTILITY (subcommand),UTILITY (subcommand)
CONJOINT command,CONJOINT command,CONJOINT command
CONJOINT (command),CONJOINT (command),CONJOINT (command)
UTILITY subcommand,UTILITY subcommand,UTILITY subcommand

UTILITY writes a utility file to the specified PASW Statistics file.

• If UTILITY is not specified, no utility file is written.

• UTILITY is followed by the name of the file to be written.

• The file is specified in the usual manner for your operating system.

• The utility file contains one case for each subject. If SUBJECT is not specified, the utility file contains a single case with statistics for the group as a whole.

The variables that are written to the utility file are in the following order:

• Any SPLIT FILE variables in the active dataset.

• Any SUBJECT variable.

UTILITY (subcommand),UTILITY (subcommand),UTILITY (subcommand)
with FACTORS subcommand,with FACTORS subcommand,with FACTORS subcommand
FACTORS (subcommand),FACTORS (subcommand),FACTORS (subcommand)
with UTILITY subcommand,with UTILITY subcommand,with UTILITY subcommand

• The constant for the regression equation for the subject. The regression equation constant is named CONSTANT.

• For DISCRETE factors, all of the utilities that are estimated for the subject. The names of the utilities that are estimated with DISCRETE factors are formed by appending a digit after the factor name. The first utility gets a 1, the second utility gets a 2, and so on.

• For LINEAR factors, a single coefficient. The name of the coefficient for LINEAR factors is formed by appending _L to the factor name. (To calculate the predicted score, multiply the factor value by the coefficient.)

• For IDEAL or ANTIIDEAL factors, two coefficients. The name of the two coefficients for IDEAL or ANTIIDEAL factors are formed by appending _L and _Q, respectively, to the factor name. (To use these coefficients in calculating the predicted score, multiply the factor value by the first coefficient and add that to the product of the second coefficient and the square of the factor value.)

• The estimated ranks or scores for all profiles in the plan file. The names of the estimated ranks or scores are of the form SCOREn for experimental and holdout profiles, or SIMULn for simulation profiles, where n is the position in the plan file. The name is SCORE for experimental and holdout profiles even if the data are ranks.

If the variable names that are created are too long, letters are truncated from the end of the original variable name before new suffixes are appended.

Related Topics

CONJOINT
Overview (CONJOINT command)
Examples (CONJOINT command)
PLAN Subcommand (CONJOINT command)
DATA Subcommand (CONJOINT command)
SEQUENCE, RANK, or SCORE Subcommand (CONJOINT command)
SUBJECT Subcommand (CONJOINT command)
FACTORS Subcommand (CONJOINT command)
PRINT Subcommand (CONJOINT command)
PLOT Subcommand (CONJOINT command)


PLOT Subcommand (CONJOINT command)

The PLOT subcommand produces plots in addition to the output that is usually produced by CONJOINT.

The following keywords are available for this subcommand:

SUMMARY | Produces a bar chart of the importance values for all variables, plus a utility bar chart for each variable. This setting is the default if the PLOT subcommand is specified with no keywords.
SUBJECT | Plots a clustered bar chart of the importance values for each factor, clustered by subjects, and one clustered bar chart for each factor, showing the utilities for each factor level, clustered by subjects. If no SUBJECT subcommand was specified naming the variables, no plots are produced and a warning is displayed.
ALL | Plots both summary and subject charts.
NONE | Does not produce any charts. This setting is the default if the subcommand is omitted.

Related Topics

CONJOINT
Overview (CONJOINT command)
Examples (CONJOINT command)
PLAN Subcommand (CONJOINT command)
DATA Subcommand (CONJOINT command)
SEQUENCE, RANK, or SCORE Subcommand (CONJOINT command)
SUBJECT Subcommand (CONJOINT command)
FACTORS Subcommand (CONJOINT command)
PRINT Subcommand (CONJOINT command)
UTILITY Subcommand (CONJOINT command)


CORRELATIONS

CORRELATIONS (command),CORRELATIONS (command),CORRELATIONS (command)
CORRELATIONS (command),CORRELATIONS (command),CORRELATIONS (command)
syntax chart,syntax chart,syntax chart

CORRELATIONS is available in the Statistics Base option.

CORRELATIONS VARIABLES= varlist [WITH varlist] [/varlist...]

 [/MISSING={PAIRWISE**}  [{INCLUDE}]]
           {LISTWISE  }   {EXCLUDE}

 [/PRINT={TWOTAIL**}  {SIG**}]
         {ONETAIL  }  {NOSIG}

 [/MATRIX=OUT({*                  })]
              {'savfile'|'dataset'}

 [/STATISTICS=[DESCRIPTIVES] [XPROD] [ALL]]

**Default if the subcommand is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See CORRELATIONS Algorithms

Syntax for the CORRELATIONS command can be generated from the Bivariate Correlations for computational details for this procedure. dialog.

Release History Collapse Hide details

Release History

CORRELATIONS
  /VARIABLES=sales mpg
  /PRINT=TWOTAIL NOSIG
  /MISSING=PAIRWISE .

Release 16.0

• Added support for SET THREADS and SET MCACHE.

Example

CORRELATIONS VARIABLES=FOOD RENT PUBTRANS TEACHER COOK ENGINEER
  /MISSING=INCLUDE.

Related Topics

Overview (CORRELATIONS command)
Example (CORRELATIONS command)
VARIABLES Subcommand (CORRELATIONS command)
PRINT Subcommand (CORRELATIONS command)
STATISTICS Subcommand (CORRELATIONS command)
MISSING Subcommand (CORRELATIONS command)
MATRIX Subcommand (CORRELATIONS command)
Format of the Matrix Data File (CORRELATIONS command)
Split Files (CORRELATIONS command)
Missing Values (CORRELATIONS command)
Example (CORRELATIONS command)
Example (CORRELATIONS command)
Example (CORRELATIONS command)


Overview (CORRELATIONS command)

CORRELATIONS (command),CORRELATIONS (command),CORRELATIONS (command)
limitations,limitations,limitations
correlation coefficients,correlation coefficients,correlation coefficients
Pearson correlation,Pearson correlation,Pearson correlation
Correlations command,Correlations command,Correlations command

CORRELATIONS (alias PEARSON CORR) produces Pearson product-moment correlations with significance levels and, optionally, univariate statistics, covariances, and cross-product deviations. Other procedures that produce correlation matrices are PARTIAL CORR, REGRESSION, DISCRIMINANT, and FACTOR.

Options Collapse Hide details

Options

Types of Matrices. A simple variable list on the VARIABLES subcommand produces a square matrix. You can also request a rectangular matrix of correlations between specific pairs of variables or between variable lists using the keyword WITH on VARIABLES.

Significance Levels. By default, CORRELATIONS displays the number of cases and significance levels for each coefficient. Significance levels are based on a two-tailed test. You can request a one-tailed test, and you can display the significance level for each coefficient as an annotation using the PRINT subcommand.

Additional Statistics. You can obtain the mean, standard deviation, and number of nonmissing cases for each variable, and the cross-product deviations and covariance for each pair of variables using the STATISTICS subcommand.

Matrix Output. You can write matrix materials to a data file using the MATRIX subcommand. The matrix materials include the mean, standard deviation, number of cases used to compute each coefficient, and Pearson correlation coefficient for each variable. The matrix data file can be read by several other procedures.

Basic Specification Collapse Hide details

Basic Specification

• The basic specification is the VARIABLES subcommand, which specifies the variables to be analyzed.

• By default, CORRELATIONS produces a matrix of correlation coefficients. The number of cases and the significance level are displayed for each coefficient. The significance level is based on a two-tailed test.

Subcommand Order Collapse Hide details

Subcommand Order

• The VARIABLES subcommand must be first.

• The remaining subcommands can be specified in any order.

Operations Collapse Hide details

Operations

• The correlation of a variable with itself is displayed as 1.0000.

• A correlation that cannot be computed is displayed as a period (.).

• CORRELATIONS does not execute if string variables are specified on the variable list.

• This procedure uses the multithreaded options specified by SET THREADS and SET MCACHE.

Limitations Collapse Hide details

Limitations

• A maximum of 40 variable lists.

• A maximum of 500 variables total per command.

• A maximum of 250 syntax elements. Each individual occurrence of a variable name, keyword, or special delimiter counts as 1 toward this total. Variables implied by the TO keyword do not count toward this total.

Related Topics

CORRELATIONS
Example (CORRELATIONS command)
VARIABLES Subcommand (CORRELATIONS command)
PRINT Subcommand (CORRELATIONS command)
STATISTICS Subcommand (CORRELATIONS command)
MISSING Subcommand (CORRELATIONS command)
MATRIX Subcommand (CORRELATIONS command)
Format of the Matrix Data File (CORRELATIONS command)
Split Files (CORRELATIONS command)
Missing Values (CORRELATIONS command)
Example (CORRELATIONS command)
Example (CORRELATIONS command)
Example (CORRELATIONS command)


Example (CORRELATIONS command)

CORRELATIONS
  /VARIABLES=sales mpg
  /PRINT=TWOTAIL NOSIG
  /MISSING=PAIRWISE .

• The procedure produces a correlation matrix for sales and mpg.

• All other options are set to their default values.

For discussion of output from this syntax and to place the example in context, see Using Correlations to Study the Association between Motor Vehicles Sales and Fuel Efficiency.

Related Topics

CORRELATIONS
Overview (CORRELATIONS command)
VARIABLES Subcommand (CORRELATIONS command)
PRINT Subcommand (CORRELATIONS command)
STATISTICS Subcommand (CORRELATIONS command)
MISSING Subcommand (CORRELATIONS command)
MATRIX Subcommand (CORRELATIONS command)
Format of the Matrix Data File (CORRELATIONS command)
Split Files (CORRELATIONS command)
Missing Values (CORRELATIONS command)
Example (CORRELATIONS command)
Example (CORRELATIONS command)
Example (CORRELATIONS command)


VARIABLES Subcommand (CORRELATIONS command)

VARIABLES specifies the variable list.

• A simple variable list produces a square matrix of correlations of each variable with every other variable.

• Variable lists joined by the keyword WITH produce a rectangular correlation matrix. Variables before WITH define the rows of the matrix and variables after WITH define the columns.

• The keyword ALL can be used on the variable list to refer to all user-defined variables.

• You can specify multiple VARIABLES subcommands on a single CORRELATIONS command. The slash between the subcommands is required; the keyword VARIABLES is not.

Example

CORRELATIONS VARIABLES=FOOD RENT PUBTRANS TEACHER COOK ENGINEER
  /VARIABLES=FOOD RENT WITH COOK TEACHER MANAGER ENGINEER
  /MISSING=INCLUDE.

• The first VARIABLES subcommand requests a square matrix of correlation coefficients among the variables FOOD, RENT, PUBTRANS, TEACHER, COOK, and ENGINEER.

• The second VARIABLES subcommand requests a rectangular correlation matrix in which FOOD and RENT are the row variables and COOK, TEACHER, MANAGER, and ENGINEER are the column variables.

Related Topics

CORRELATIONS
Overview (CORRELATIONS command)
Example (CORRELATIONS command)
PRINT Subcommand (CORRELATIONS command)
STATISTICS Subcommand (CORRELATIONS command)
MISSING Subcommand (CORRELATIONS command)
MATRIX Subcommand (CORRELATIONS command)
Format of the Matrix Data File (CORRELATIONS command)
Split Files (CORRELATIONS command)
Missing Values (CORRELATIONS command)
Example (CORRELATIONS command)
Example (CORRELATIONS command)
Example (CORRELATIONS command)


PRINT Subcommand (CORRELATIONS command)

CORRELATIONS (command),CORRELATIONS (command),CORRELATIONS (command)
significance tests,significance tests,significance tests
CORRELATIONS (command),CORRELATIONS (command),CORRELATIONS (command)
PRINT subcommand,PRINT subcommand,PRINT subcommand
PRINT (subcommand),PRINT (subcommand),PRINT (subcommand)
CORRELATIONS command,CORRELATIONS command,CORRELATIONS command

PRINT controls whether the significance level is based on a one- or two-tailed test and whether the number of cases and the significance level for each correlation coefficient are displayed.

TWOTAIL (keyword),TWOTAIL (keyword),TWOTAIL (keyword)
CORRELATIONS command,CORRELATIONS command,CORRELATIONS command
ONETAIL (keyword),ONETAIL (keyword),ONETAIL (keyword)
CORRELATIONS command,CORRELATIONS command,CORRELATIONS command
SIG (keyword),SIG (keyword),SIG (keyword)
CORRELATIONS command,CORRELATIONS command,CORRELATIONS command
NOSIG (keyword),NOSIG (keyword),NOSIG (keyword)
CORRELATIONS command,CORRELATIONS command,CORRELATIONS command
TWOTAIL | Two-tailed test of significance. This test is appropriate when the direction of the relationship cannot be determined in advance, as is often the case in exploratory data analysis. This is the default.
ONETAIL | One-tailed test of significance. This test is appropriate when the direction of the relationship between a pair of variables can be specified in advance of the analysis.
SIG | Do not flag significant values. SIG is the default.
NOSIG | Flag significant values. Values significant at the 0.05 level are flagged with a single asterisk; those that are significant at the 0.01 level are flagged with two asterisks.

Related Topics

CORRELATIONS
Overview (CORRELATIONS command)
Example (CORRELATIONS command)
VARIABLES Subcommand (CORRELATIONS command)
STATISTICS Subcommand (CORRELATIONS command)
MISSING Subcommand (CORRELATIONS command)
MATRIX Subcommand (CORRELATIONS command)
Format of the Matrix Data File (CORRELATIONS command)
Split Files (CORRELATIONS command)
Missing Values (CORRELATIONS command)
Example (CORRELATIONS command)
Example (CORRELATIONS command)
Example (CORRELATIONS command)


STATISTICS Subcommand (CORRELATIONS command)

CORRELATIONS (command),CORRELATIONS (command),CORRELATIONS (command)
STATISTICS subcommand,STATISTICS subcommand,STATISTICS subcommand
STATISTICS (subcommand),STATISTICS (subcommand),STATISTICS (subcommand)
CORRELATIONS command,CORRELATIONS command,CORRELATIONS command

The correlation coefficients are automatically displayed in the Correlations table for an analysis specified by a VARIABLES list. STATISTICS requests additional statistics.

DESCRIPTIVES (keyword),DESCRIPTIVES (keyword),DESCRIPTIVES (keyword)
CORRELATIONS command,CORRELATIONS command,CORRELATIONS command
XPROD (keyword),XPROD (keyword),XPROD (keyword)
CORRELATIONS command,CORRELATIONS command,CORRELATIONS command
matrices,matrices,matrices
covariance,covariance,covariance
ALL (keyword),ALL (keyword),ALL (keyword)
CORRELATIONS command,CORRELATIONS command,CORRELATIONS command
DESCRIPTIVES | Display mean, standard deviation, and number of nonmissing cases for each variable on the Variables list in the Descriptive Statistics table. This table precedes all Correlations tables. Variables specified on more than one VARIABLES list are displayed only once. Missing values are handled on a variable-by-variable basis regardless of the missing-value option in effect for the correlations.
XPROD | Display cross-product deviations and covariance for each pair of variables in the Correlations table(s).
ALL | All additional statistics. This produces the same statistics as DESCRIPTIVES and XPROD together.

Related Topics

CORRELATIONS
Overview (CORRELATIONS command)
Example (CORRELATIONS command)
VARIABLES Subcommand (CORRELATIONS command)
PRINT Subcommand (CORRELATIONS command)
MISSING Subcommand (CORRELATIONS command)
MATRIX Subcommand (CORRELATIONS command)
Format of the Matrix Data File (CORRELATIONS command)
Split Files (CORRELATIONS command)
Missing Values (CORRELATIONS command)
Example (CORRELATIONS command)
Example (CORRELATIONS command)
Example (CORRELATIONS command)


MISSING Subcommand (CORRELATIONS command)

CORRELATIONS (command),CORRELATIONS (command),CORRELATIONS (command)
MISSING subcommand,MISSING subcommand,MISSING subcommand
MISSING (subcommand),MISSING (subcommand),MISSING (subcommand)
CORRELATIONS command,CORRELATIONS command,CORRELATIONS command

MISSING controls the treatment of missing values.

• The PAIRWISE and LISTWISE keywords are alternatives; however, each can be specified with INCLUDE or EXCLUDE.

• The default is PAIRWISE and EXCLUDE.

PAIRWISE (keyword),PAIRWISE (keyword),PAIRWISE (keyword)
CORRELATIONS command,CORRELATIONS command,CORRELATIONS command
LISTWISE (keyword),LISTWISE (keyword),LISTWISE (keyword)
CORRELATIONS command,CORRELATIONS command,CORRELATIONS command
INCLUDE (keyword),INCLUDE (keyword),INCLUDE (keyword)
CORRELATIONS command,CORRELATIONS command,CORRELATIONS command
EXCLUDE (keyword),EXCLUDE (keyword),EXCLUDE (keyword)
CORRELATIONS command,CORRELATIONS command,CORRELATIONS command
PAIRWISE | Exclude missing values pairwise. Cases that have missing values for one or both of a pair of variables for a specific correlation coefficient are excluded from the computation of that coefficient. Since each coefficient is based on all cases that have valid values for that particular pair of variables, this can result in a set of coefficients based on a varying number of cases. The valid number of cases is displayed in the Correlations table. This is the default.
LISTWISE | Exclude missing values listwise. Cases that have missing values for any variable named on any VARIABLES list are excluded from the computation of all coefficients across lists. The valid number of cases is the same for all analyses and is displayed in a single annotation.
INCLUDE | Include user-missing values. User-missing values are included in the analysis.
EXCLUDE | Exclude all missing values. Both user- and system-missing values are excluded from the analysis.

Related Topics

CORRELATIONS
Overview (CORRELATIONS command)
Example (CORRELATIONS command)
VARIABLES Subcommand (CORRELATIONS command)
PRINT Subcommand (CORRELATIONS command)
STATISTICS Subcommand (CORRELATIONS command)
MATRIX Subcommand (CORRELATIONS command)
Format of the Matrix Data File (CORRELATIONS command)
Split Files (CORRELATIONS command)
Missing Values (CORRELATIONS command)
Example (CORRELATIONS command)
Example (CORRELATIONS command)
Example (CORRELATIONS command)


MATRIX Subcommand (CORRELATIONS command)

CORRELATIONS (command),CORRELATIONS (command),CORRELATIONS (command)
MATRIX subcommand,MATRIX subcommand,MATRIX subcommand
MATRIX (subcommand),MATRIX (subcommand),MATRIX (subcommand)
CORRELATIONS command,CORRELATIONS command,CORRELATIONS command
CORRELATIONS (command),CORRELATIONS (command),CORRELATIONS (command)
matrix output,matrix output,matrix output
WITH (keyword),WITH (keyword),WITH (keyword)
CORRELATIONS command,CORRELATIONS command,CORRELATIONS command

MATRIX writes matrix materials to a data file or previously declared dataset (DATASET DECLARE command). The matrix materials include the mean and standard deviation for each variable, the number of cases used to compute each coefficient, and the Pearson correlation coefficients. Several procedures can read matrix materials produced by CORRELATIONS, including PARTIAL CORR, REGRESSION, FACTOR, and CLUSTER.

• CORRELATIONS cannot write rectangular matrices (those specified with the keyword WITH) to a file.

OUT (keyword),OUT (keyword),OUT (keyword)
CORRELATIONS command,CORRELATIONS command,CORRELATIONS command

• If you specify more than one variable list on CORRELATIONS, only the last list that does not use the keyword WITH is written to the matrix data file.

• The keyword OUT specifies the file to which the matrix is written. Specify an asterisk to replace the active dataset or a quoted file specification or dataset name, enclosed in parentheses.

• Documents from the original file will not be included in the matrix file and will not be present if the matrix file becomes the working data file.

Related Topics

CORRELATIONS
Overview (CORRELATIONS command)
Example (CORRELATIONS command)
VARIABLES Subcommand (CORRELATIONS command)
PRINT Subcommand (CORRELATIONS command)
STATISTICS Subcommand (CORRELATIONS command)
MISSING Subcommand (CORRELATIONS command)
Format of the Matrix Data File (CORRELATIONS command)
Split Files (CORRELATIONS command)
Missing Values (CORRELATIONS command)
Example (CORRELATIONS command)
Example (CORRELATIONS command)
Example (CORRELATIONS command)


Format of the Matrix Data File (CORRELATIONS command)

• The matrix data file has two special variables created by the program: ROWTYPE_ and VARNAME_. The variable ROWTYPE_ is a short string variable with values MEAN, STDDEV, N, and CORR (for Pearson correlation coefficient). The next variable, VARNAME_, is a short string variable whose values are the names of the variables used to form the correlation matrix. When ROWTYPE_ is CORR, VARNAME_ gives the variable associated with that row of the correlation matrix.

• The remaining variables in the file are the variables used to form the correlation matrix.

Related Topics

CORRELATIONS
Overview (CORRELATIONS command)
Example (CORRELATIONS command)
VARIABLES Subcommand (CORRELATIONS command)
PRINT Subcommand (CORRELATIONS command)
STATISTICS Subcommand (CORRELATIONS command)
MISSING Subcommand (CORRELATIONS command)
MATRIX Subcommand (CORRELATIONS command)
Split Files (CORRELATIONS command)
Missing Values (CORRELATIONS command)
Example (CORRELATIONS command)
Example (CORRELATIONS command)
Example (CORRELATIONS command)


Split Files (CORRELATIONS command)

• When split-file processing is in effect, the first variables in the matrix file will be split variables, followed by ROWTYPE_, VARNAME_, and the variables used to form the correlation matrix.

• A full set of matrix materials is written for each subgroup defined by the split variables.

• A split variable cannot have the same name as any other variable written to the matrix data file.

• If split-file processing is in effect when a matrix is written, the same split-file specifications must be in effect when that matrix is read by another procedure.

Related Topics

CORRELATIONS
Overview (CORRELATIONS command)
Example (CORRELATIONS command)
VARIABLES Subcommand (CORRELATIONS command)
PRINT Subcommand (CORRELATIONS command)
STATISTICS Subcommand (CORRELATIONS command)
MISSING Subcommand (CORRELATIONS command)
MATRIX Subcommand (CORRELATIONS command)
Format of the Matrix Data File (CORRELATIONS command)
Missing Values (CORRELATIONS command)
Example (CORRELATIONS command)
Example (CORRELATIONS command)
Example (CORRELATIONS command)


Missing Values (CORRELATIONS command)

• With pairwise treatment of missing values (the default), a matrix of the number of cases used to compute each coefficient is included with the matrix materials.

• With listwise treatment, a single number indicating the number of cases used to calculate all coefficients is included.

Related Topics

CORRELATIONS
Overview (CORRELATIONS command)
Example (CORRELATIONS command)
VARIABLES Subcommand (CORRELATIONS command)
PRINT Subcommand (CORRELATIONS command)
STATISTICS Subcommand (CORRELATIONS command)
MISSING Subcommand (CORRELATIONS command)
MATRIX Subcommand (CORRELATIONS command)
Format of the Matrix Data File (CORRELATIONS command)
Split Files (CORRELATIONS command)
Example (CORRELATIONS command)
Example (CORRELATIONS command)
Example (CORRELATIONS command)


Example (CORRELATIONS command)

GET FILE=CITY /KEEP FOOD RENT PUBTRANS TEACHER COOK ENGINEER.
CORRELATIONS VARIABLES=FOOD TO ENGINEER
 /MATRIX OUT(CORRMAT).

• CORRELATIONS reads data from the file CITY and writes one set of matrix materials to the file CORRMAT. The working file is still CITY. Subsequent commands are executed on CITY.

Related Topics

CORRELATIONS
Overview (CORRELATIONS command)
Example (CORRELATIONS command)
VARIABLES Subcommand (CORRELATIONS command)
PRINT Subcommand (CORRELATIONS command)
STATISTICS Subcommand (CORRELATIONS command)
MISSING Subcommand (CORRELATIONS command)
MATRIX Subcommand (CORRELATIONS command)
Format of the Matrix Data File (CORRELATIONS command)
Split Files (CORRELATIONS command)
Missing Values (CORRELATIONS command)
Example (CORRELATIONS command)
Example (CORRELATIONS command)


Example (CORRELATIONS command)

GET FILE=CITY /KEEP FOOD RENT PUBTRANS TEACHER COOK ENGINEER.
CORRELATIONS VARIABLES=FOOD TO ENGINEER
 /MATRIX OUT(*).
LIST.
DISPLAY DICTIONARY.

• CORRELATIONS writes the same matrix as in the example above. However, the matrix data file replaces the working file. The LIST and DISPLAY commands are executed on the matrix file, not on the CITY file.

Related Topics

CORRELATIONS
Overview (CORRELATIONS command)
Example (CORRELATIONS command)
VARIABLES Subcommand (CORRELATIONS command)
PRINT Subcommand (CORRELATIONS command)
STATISTICS Subcommand (CORRELATIONS command)
MISSING Subcommand (CORRELATIONS command)
MATRIX Subcommand (CORRELATIONS command)
Format of the Matrix Data File (CORRELATIONS command)
Split Files (CORRELATIONS command)
Missing Values (CORRELATIONS command)
Example (CORRELATIONS command)
Example (CORRELATIONS command)


Example (CORRELATIONS command)

CORRELATIONS VARIABLES=FOOD RENT COOK TEACHER MANAGER ENGINEER
 /FOOD TO TEACHER /PUBTRANS WITH MECHANIC
 /MATRIX OUT(*).

• Only the matrix for FOOD TO TEACHER is written to the matrix data file because it is the last variable list that does not use the keyword WITH.

Related Topics

CORRELATIONS
Overview (CORRELATIONS command)
Example (CORRELATIONS command)
VARIABLES Subcommand (CORRELATIONS command)
PRINT Subcommand (CORRELATIONS command)
STATISTICS Subcommand (CORRELATIONS command)
MISSING Subcommand (CORRELATIONS command)
MATRIX Subcommand (CORRELATIONS command)
Format of the Matrix Data File (CORRELATIONS command)
Split Files (CORRELATIONS command)
Missing Values (CORRELATIONS command)
Example (CORRELATIONS command)
Example (CORRELATIONS command)


CORRESPONDENCE

CORRESPONDENCE (command),CORRESPONDENCE (command),CORRESPONDENCE (command)
CORRESPONDENCE (command),CORRESPONDENCE (command),CORRESPONDENCE (command)
syntax chart,syntax chart,syntax chart
release history,release history,release history
Correspondence Analysis,Correspondence Analysis,Correspondence Analysis
command syntax,command syntax,command syntax

CORRESPONDENCE is available in the Categories option.

CORRESPONDENCE

/TABLE = {rowvar (min, max) BY colvar (min, max)}
         {ALL (# of rows, # of columns)         }

[/SUPPLEMENTARY = [{rowvar (valuelist)}] [{colvar (valuelist)}]]
                   {ROW (valuelist)   }   {COLUMN (valuelist)}

[/EQUAL = [{rowvar (valuelist)}] [{colvar (valuelist)}]]
           {ROW (valuelist)   }   {COLUMN (valuelist)}

[/MEASURE = {CHISQ**}]
            {EUCLID }

[/STANDARDIZE = {RMEAN   }]
                {CMEAN   }
                {RCMEAN**}
                {RSUM    }
                {CSUM    }

[/DIMENSION = {2**  }]
              {value}

[/NORMALIZATION = {SYMMETRICAL**}]
                  {PRINCIPAL    }
                  {RPRINCIPAL   }
                  {CPRINCIPAL   }
                  {value        }

[/PRINT = [TABLE**] [RPROF] [CPROF] [RPOINTS**] [CPOINTS**]
          [RCONF] [CCONF] [PERMUTATION[(n)]] [DEFAULT] [NONE]]

[/PLOT = [NDIM({value,value})]
               {value,MAX  }
         [RPOINTS[(n)]] [CPOINTS[(n)] [TRROWS[(n)]]
         [TRCOLUMNS[(n)]] [BIPLOT**[(n)]] [NONE]]

[/OUTFILE = [SCORE('savfile'|'dataset')] [VARIANCE('savfile'|'dataset')]

**Default if the subcommand or keyword is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See CORRESPONDENCE Algorithms for computational details for this procedure.

Syntax for the CORRESPONDENCE command can be generated from the Correspondence Analysis dialog.

Release History Collapse Hide details

Release History

Release 13.0

• For the NDIM keyword on the PLOT subcommand, the default is changed to all dimensions.

• The maximum label length on the PLOT subcommand is increased to 60 (previous value was 20).

Related Topics

Overview (CORRESPONDENCE command)
Example (CORRESPONDENCE command)
TABLE Subcommand (CORRESPONDENCE command)
DIMENSION Subcommand (CORRESPONDENCE command)
SUPPLEMENTARY Subcommand (CORRESPONDENCE command)
EQUAL Subcommand (CORRESPONDENCE command)
MEASURE Subcommand (CORRESPONDENCE command)
STANDARDIZE Subcommand (CORRESPONDENCE command)
NORMALIZATION Subcommand (CORRESPONDENCE command)
PRINT Subcommand (CORRESPONDENCE command)
PLOT Subcommand (CORRESPONDENCE command)
OUTFILE Subcommand (CORRESPONDENCE command)


Overview (CORRESPONDENCE command)

CORRESPONDENCE displays the relationships between rows and columns of a two-way table graphically by a biplot. It computes the row and column scores and statistics and produces plots based on the scores. Also, confidence statistics are computed.

Options Collapse Hide details

Options

Number of Dimensions. You can specify how many dimensions CORRESPONDENCE should compute.

Supplementary Points. You can specify supplementary rows and columns.

Equality Restrictions. You can restrict rows and columns to have equal scores.

Measure. You can specify the distance measure to be the chi-square of Euclidean.

Standardization. You can specify one of five different standardization methods.

Method of Normalization. You can specify one of five different methods for normalizing the row and column scores.

Confidence Statistics. You can request computation of confidence statistics (standard deviations and correlations) for row and column scores. For singular values, confidence statistics are always computed.

Data Input. You can analyze individual casewise data, aggregated data, or table data.

Display Output. You can control which statistics are displayed and plotted.

Writing Matrices. You can write the row and column scores and the confidence statistics (variances and covariances) for the singular values to external files.

Basic Specification Collapse Hide details

Basic Specification

• The basic specification is CORRESPONDENCE and the TABLE subcommand. By default, CORRESPONDENCE computes a two-dimensional solution and displays the correspondence table, the summary table, an overview of the row and column scores, and a biplot of the row and column points.

Subcommand Order Collapse Hide details

Subcommand Order

• The TABLE subcommand must appear first.

• All other subcommands can appear in any order.

Syntax Rules Collapse Hide details

Syntax Rules

• Only one keyword can be specified on the MEASURE subcommand.

• Only one keyword can be specified on the STANDARDIZE subcommand.

• Only one keyword can be specified on the NORMALIZATION subcommand.

• Only one parameter can be specified on the DIMENSION subcommand.

Operations Collapse Hide details

Operations

• If a subcommand is specified more than once, only the last occurrence is executed.

equality constraints,equality constraints,equality constraints
CORRESPONDENCE command,CORRESPONDENCE command,CORRESPONDENCE command
Limitations Collapse Hide details

Limitations

• The table input data and the aggregated input data cannot contain negative values. CORRESPONDENCE will treat such values as 0.

• Rows and columns that are specified as supplementary cannot be equalized.

• The maximum number of supplementary points for a variable is 200.

• The maximum number of equalities for a variable is 200.

Related Topics

CORRESPONDENCE
Example (CORRESPONDENCE command)
TABLE Subcommand (CORRESPONDENCE command)
DIMENSION Subcommand (CORRESPONDENCE command)
SUPPLEMENTARY Subcommand (CORRESPONDENCE command)
EQUAL Subcommand (CORRESPONDENCE command)
MEASURE Subcommand (CORRESPONDENCE command)
STANDARDIZE Subcommand (CORRESPONDENCE command)
NORMALIZATION Subcommand (CORRESPONDENCE command)
PRINT Subcommand (CORRESPONDENCE command)
PLOT Subcommand (CORRESPONDENCE command)
OUTFILE Subcommand (CORRESPONDENCE command)


Example (CORRESPONDENCE command)

CORRESPONDENCE TABLE=MENTAL(1,4) BY SES(1,6)
/PRINT=RPOINTS CPOINTS
/PLOT=RPOINTS CPOINTS.

• Two variables, MENTAL and SES, are specified on the TABLE subcommand. MENTAL has values ranging from 1 to 4, and SES has values ranging from 1 to 6.

• The summary table and overview tables of the row and column scores are displayed.

• The row points plot and the column points plot are produced.

Related Topics

CORRESPONDENCE
Overview (CORRESPONDENCE command)
TABLE Subcommand (CORRESPONDENCE command)
DIMENSION Subcommand (CORRESPONDENCE command)
SUPPLEMENTARY Subcommand (CORRESPONDENCE command)
EQUAL Subcommand (CORRESPONDENCE command)
MEASURE Subcommand (CORRESPONDENCE command)
STANDARDIZE Subcommand (CORRESPONDENCE command)
NORMALIZATION Subcommand (CORRESPONDENCE command)
PRINT Subcommand (CORRESPONDENCE command)
PLOT Subcommand (CORRESPONDENCE command)
OUTFILE Subcommand (CORRESPONDENCE command)


TABLE Subcommand (CORRESPONDENCE command)

TABLE (subcommand),TABLE (subcommand),TABLE (subcommand)
CORRESPONDENCE command,CORRESPONDENCE command,CORRESPONDENCE command
CORRESPONDENCE (command),CORRESPONDENCE (command),CORRESPONDENCE (command)
TABLE subcommand,TABLE subcommand,TABLE subcommand

TABLE specifies the row and column variables along with their integer value ranges. The two variables are separated by the keyword BY.

• The TABLE subcommand is required.

Related Topics

CORRESPONDENCE
Overview (CORRESPONDENCE command)
Example (CORRESPONDENCE command)
DIMENSION Subcommand (CORRESPONDENCE command)
SUPPLEMENTARY Subcommand (CORRESPONDENCE command)
EQUAL Subcommand (CORRESPONDENCE command)
MEASURE Subcommand (CORRESPONDENCE command)
STANDARDIZE Subcommand (CORRESPONDENCE command)
NORMALIZATION Subcommand (CORRESPONDENCE command)
PRINT Subcommand (CORRESPONDENCE command)
PLOT Subcommand (CORRESPONDENCE command)
OUTFILE Subcommand (CORRESPONDENCE command)
Casewise Data (CORRESPONDENCE command)
Aggregated Data (CORRESPONDENCE command)
Table Data (CORRESPONDENCE command)


Casewise Data (CORRESPONDENCE command)

• Each variable is followed by an integer value range in parentheses. The value range consists of the variable’s minimum value and its maximum value.

• Values outside of the specified range are not included in the analysis.

• Values do not have to be sequential. Empty categories yield a zero in the input table and do not affect the statistics for other categories.

Example

DATA LIST FREE/VAR1 VAR2.
BEGIN DATA
3 1
6 1
3 1
4 2
4 2
6 3
6 3
6 3
3 2
4 2
6 3
END DATA.
CORRESPONDENCE TABLE=VAR1(3,6) BY VAR2(1,3).

• DATA LIST defines two variables, VAR1 and VAR2.

• VAR1 has three levels, coded 3, 4, and 6. VAR2 also has three levels, coded 1, 2, and 3.

• Since a range of (3,6) is specified for VAR1, CORRESPONDENCE defines four categories, coded 3, 4, 5, and 6. The empty category, 5, for which there is no data, receives system-missing values for all statistics and does not affect the analysis.

Related Topics

TABLE Subcommand (CORRESPONDENCE command)
Aggregated Data (CORRESPONDENCE command)
Table Data (CORRESPONDENCE command)


Aggregated Data (CORRESPONDENCE command)

analyzing aggregated data,analyzing aggregated data,analyzing aggregated data
CORRESPONDENCE command,CORRESPONDENCE command,CORRESPONDENCE command
WEIGHT (command),WEIGHT (command),WEIGHT (command)
with CORRESPONDENCE command,with CORRESPONDENCE command,with CORRESPONDENCE command

To analyze aggregated data, such as data from a crosstabulation where cell counts are available but the original raw data are not, you can use the WEIGHT command before CORRESPONDENCE.

Example

To analyze a 3×3 table, such as the one shown below, you could use these commands:

DATA LIST FREE/ BIRTHORD ANXIETY COUNT.
BEGIN DATA
1 1 48
1 2 27
1 3 22
2 1 33
2 2 20
2 3 39
3 1 29
3 2 42
3 3 47
END DATA.
WEIGHT BY COUNT.
CORRESPONDENCE TABLE=BIRTHORD (1,3) BY ANXIETY (1,3).

• The WEIGHT command weights each case by the value of COUNT, as if there are 48 subjects with BIRTHORD=1 and ANXIETY=1, 27 subjects with BIRTHORD=1 and ANXIETY=2, and so on.

• CORRESPONDENCE can then be used to analyze the data.

• If any of the table cell values (the values of the WEIGHT variable) equals 0, the WEIGHT command issues a warning, but the CORRESPONDENCE analysis is done correctly.

• The table cell values (the values of the WEIGHT variable) cannot be negative.

3 x 3 table
 |  | Anxiety
 |  | High | Med | Low
Birth order | First | 48 | 27 | 22
 | Second | 33 | 20 | 39
 | Other | 29 | 42 | 47

Related Topics

TABLE Subcommand (CORRESPONDENCE command)
Casewise Data (CORRESPONDENCE command)
Table Data (CORRESPONDENCE command)


Table Data (CORRESPONDENCE command)

ALL (keyword),ALL (keyword),ALL (keyword)
CORRESPONDENCE command,CORRESPONDENCE command,CORRESPONDENCE command
analyzing table data,analyzing table data,analyzing table data
CORRESPONDENCE command,CORRESPONDENCE command,CORRESPONDENCE command

• The cells of a table can be read and analyzed directly by using the keyword ALL after TABLE.

• The columns of the input table must be specified as variables on the DATA LIST command. Only columns are defined, not rows.

• ALL is followed by the number of rows in the table, a comma, and the number of columns in the table, all in parentheses.

• The row variable is named ROW, and the column variable is named COLUMN.

• The number of rows and columns specified can be smaller than the actual number of rows and columns if you want to analyze only a subset of the table.

• The variables (columns of the table) are treated as the column categories, and the cases (rows of the table) are treated as the row categories.

• Row categories can be assigned values (category codes) when you specify TABLE=ALL by the optional variable ROWCAT_. This variable must be defined as a numeric variable with unique values corresponding to the row categories. If ROWCAT_ is not present, the row index (case) numbers are used as row category values.

Example

DATA LIST /ROWCAT_ 1 COL1 3-4 COL2 6-7 COL3 9-10.
BEGIN DATA
1 50 19 26
2 16 40 34
3 12 35 65
4 11 20 58
END DATA.
VALUE LABELS ROWCAT_ 1 ‘ROW1’ 2 ‘ROW2’ 3 ‘ROW3’ 4 ‘ROW4’.
CORRESPONDENCE TABLE=ALL(4,3).

• DATA LIST defines the row category naming variable ROWCAT_ and the three columns of the table as the variables.

• The TABLE=ALL specification indicates that the data are the cells of a table. The (4,3) specification indicates that there are four rows and three columns.

• The column variable is named COLUMN with categories labeled COL1, COL2, and COL3.

• The row variable is named ROW with categories labeled ROW1, ROW2, ROW3, and ROW4.

Related Topics

TABLE Subcommand (CORRESPONDENCE command)
Casewise Data (CORRESPONDENCE command)
Aggregated Data (CORRESPONDENCE command)


DIMENSION Subcommand (CORRESPONDENCE command)

DIMENSION (subcommand),DIMENSION (subcommand),DIMENSION (subcommand)
CORRESPONDENCE command,CORRESPONDENCE command,CORRESPONDENCE command
CORRESPONDENCE (command),CORRESPONDENCE (command),CORRESPONDENCE (command)
DIMENSION subcommand,DIMENSION subcommand,DIMENSION subcommand
dimensions,dimensions,dimensions
CORRESPONDENCE command,CORRESPONDENCE command,CORRESPONDENCE command
CORRESPONDENCE (command),CORRESPONDENCE (command),CORRESPONDENCE (command)
dimensions,dimensions,dimensions

DIMENSION specifies the number of dimensions you want CORRESPONDENCE to compute.

• If you do not specify the DIMENSION subcommand, CORRESPONDENCE computes two dimensions.

• DIMENSION is followed by a positive integer indicating the number of dimensions. If this parameter is omitted, a value of 2 is assumed.

• In general, you should choose as few dimensions as needed to explain most of the variation. The minimum number of dimensions that can be specified is 1. The maximum number of dimensions that can be specified equals the minimum of the number of active rows and the number of active columns minus 1. An active row or column is a nonsupplementary row or column that is used in the analysis. For example, in a table where the number of rows is 5 (2 of which are supplementary) and the number of columns is 4, the number of active rows (3) is smaller than the number of active columns (4). Thus, the maximum number of dimensions that can be specified is (5−2)−1, or 2. Rows and columns that are restricted to have equal scores count as 1 toward the number of active rows or columns. For example, in a table with five rows and four columns, where two columns are restricted to have equal scores, the number of active rows is 5 and the number of active columns is (4−1), or 3. The maximum number of dimensions that can be specified is (3−1), or 2. Empty rows and columns (rows or columns with no data, all zeros, or all missing data) are not counted toward the number of rows and columns.

• If more than the maximum allowed number of dimensions is specified, CORRESPONDENCE reduces the number of dimensions to the maximum.

Related Topics

CORRESPONDENCE
Overview (CORRESPONDENCE command)
Example (CORRESPONDENCE command)
TABLE Subcommand (CORRESPONDENCE command)
SUPPLEMENTARY Subcommand (CORRESPONDENCE command)
EQUAL Subcommand (CORRESPONDENCE command)
MEASURE Subcommand (CORRESPONDENCE command)
STANDARDIZE Subcommand (CORRESPONDENCE command)
NORMALIZATION Subcommand (CORRESPONDENCE command)
PRINT Subcommand (CORRESPONDENCE command)
PLOT Subcommand (CORRESPONDENCE command)
OUTFILE Subcommand (CORRESPONDENCE command)


SUPPLEMENTARY Subcommand (CORRESPONDENCE command)

SUPPLEMENTARY (subcommand),SUPPLEMENTARY (subcommand),SUPPLEMENTARY (subcommand)
CORRESPONDENCE command,CORRESPONDENCE command,CORRESPONDENCE command
CORRESPONDENCE (command),CORRESPONDENCE (command),CORRESPONDENCE (command)
SUPPLEMENTARY subcommand,SUPPLEMENTARY subcommand,SUPPLEMENTARY subcommand
supplementary points,supplementary points,supplementary points
CORRESPONDENCE command,CORRESPONDENCE command,CORRESPONDENCE command
CORRESPONDENCE (command),CORRESPONDENCE (command),CORRESPONDENCE (command)
supplementary points,supplementary points,supplementary points

The SUPPLEMENTARY subcommand specifies the rows and/or columns that you want to treat as supplementary (also called passive or illustrative).

• For casewise data, the specification on SUPPLEMENTARY is the row and/or column variable name, followed by a value list in parentheses. The values must be in the value range specified on the TABLE subcommand for the row or column variable.

• For table data, the specification on SUPPLEMENTARY is ROW and/or COLUMN, followed by a value list in parentheses. The values represent the row or column indices of the table input data.

• The maximum number of supplementary rows or columns is the number of rows or columns minus 2. Rows and columns that are restricted to have equal scores count as 1 toward the number of rows or columns.

• Supplementary rows and columns cannot be equalized.

Example

CORRESPONDENCE TABLE=MENTAL(1,8) BY SES(1,6)
/SUPPLEMENTARY MENTAL(3) SES(2,6).

• SUPPLEMENTARY specifies the third level of MENTAL and the second and sixth levels of SES to be supplementary.

Example

CORRESPONDENCE TABLE=ALL(8,6)
/SUPPLEMENTARY ROW(3) COLUMN(2,6).

• SUPPLEMENTARY specifies the third level of the row variable and the second and sixth levels of the column variable to be supplementary.

Related Topics

CORRESPONDENCE
Overview (CORRESPONDENCE command)
Example (CORRESPONDENCE command)
TABLE Subcommand (CORRESPONDENCE command)
DIMENSION Subcommand (CORRESPONDENCE command)
EQUAL Subcommand (CORRESPONDENCE command)
MEASURE Subcommand (CORRESPONDENCE command)
STANDARDIZE Subcommand (CORRESPONDENCE command)
NORMALIZATION Subcommand (CORRESPONDENCE command)
PRINT Subcommand (CORRESPONDENCE command)
PLOT Subcommand (CORRESPONDENCE command)
OUTFILE Subcommand (CORRESPONDENCE command)


EQUAL Subcommand (CORRESPONDENCE command)

EQUAL (subcommand),EQUAL (subcommand),EQUAL (subcommand)
CORRESPONDENCE command,CORRESPONDENCE command,CORRESPONDENCE command
CORRESPONDENCE (command),CORRESPONDENCE (command),CORRESPONDENCE (command)
EQUAL subcommand,EQUAL subcommand,EQUAL subcommand
equality constraints,equality constraints,equality constraints
CORRESPONDENCE command,CORRESPONDENCE command,CORRESPONDENCE command
CORRESPONDENCE (command),CORRESPONDENCE (command),CORRESPONDENCE (command)
equality constraints,equality constraints,equality constraints

The EQUAL subcommand specifies the rows and/or columns that you want to restrict to have equal scores.

• For casewise data, the specification on EQUAL is the row and/or column variable name, followed by a list of at least two values in parentheses. The values must be in the value range specified on the TABLE subcommand for the row or column variable.

• For table data, the specification on EQUAL is ROW and/or COLUMN, followed by a value list in parentheses. The values represent the row or column indices of the table input data.

• Rows or columns that are restricted to have equal scores cannot be supplementary.

• The maximum number of equal rows or columns is the number of active rows or columns minus 1.

Example

CORRESPONDENCE TABLE=MENTAL(1,8) BY SES(1,6)
/EQUAL MENTAL(1,2) (6,7) SES(1,2,3).

• EQUAL specifies the first and second level of MENTAL, the sixth and seventh level of MENTAL, and the first, second, and third levels of SES to have equal scores.

Related Topics

CORRESPONDENCE
Overview (CORRESPONDENCE command)
Example (CORRESPONDENCE command)
TABLE Subcommand (CORRESPONDENCE command)
DIMENSION Subcommand (CORRESPONDENCE command)
SUPPLEMENTARY Subcommand (CORRESPONDENCE command)
MEASURE Subcommand (CORRESPONDENCE command)
STANDARDIZE Subcommand (CORRESPONDENCE command)
NORMALIZATION Subcommand (CORRESPONDENCE command)
PRINT Subcommand (CORRESPONDENCE command)
PLOT Subcommand (CORRESPONDENCE command)
OUTFILE Subcommand (CORRESPONDENCE command)


MEASURE Subcommand (CORRESPONDENCE command)

MEASURE (subcommand),MEASURE (subcommand),MEASURE (subcommand)
CORRESPONDENCE command,CORRESPONDENCE command,CORRESPONDENCE command
CORRESPONDENCE (command),CORRESPONDENCE (command),CORRESPONDENCE (command)
MEASURE subcommand,MEASURE subcommand,MEASURE subcommand
distance measures,distance measures,distance measures
CORRESPONDENCE command,CORRESPONDENCE command,CORRESPONDENCE command
CORRESPONDENCE (command),CORRESPONDENCE (command),CORRESPONDENCE (command)
distance measures,distance measures,distance measures

The MEASURE subcommand specifies the measure of distance between the row and column profiles.

• Only one keyword can be used.

The following keywords are available:

CHISQ (keyword),CHISQ (keyword),CHISQ (keyword)
CORRESPONDENCE command,CORRESPONDENCE command,CORRESPONDENCE command
chi-square distance,chi-square distance,chi-square distance
CORRESPONDENCE command,CORRESPONDENCE command,CORRESPONDENCE command
EUCLID (keyword),EUCLID (keyword),EUCLID (keyword)
CORRESPONDENCE command,CORRESPONDENCE command,CORRESPONDENCE command
Euclidean distance,Euclidean distance,Euclidean distance
CORRESPONDENCE command,CORRESPONDENCE command,CORRESPONDENCE command
CHISQ | Chi-square distance. This is the weighted distance, where the weight is the mass of the rows or columns. This is the default specification for MEASURE and is the necessary specification for standard correspondence analysis.
EUCLID | Euclidean distance. The distance is the square root of the sum of squared differences between the values for two rows or columns.

Related Topics

CORRESPONDENCE
Overview (CORRESPONDENCE command)
Example (CORRESPONDENCE command)
TABLE Subcommand (CORRESPONDENCE command)
DIMENSION Subcommand (CORRESPONDENCE command)
SUPPLEMENTARY Subcommand (CORRESPONDENCE command)
EQUAL Subcommand (CORRESPONDENCE command)
STANDARDIZE Subcommand (CORRESPONDENCE command)
NORMALIZATION Subcommand (CORRESPONDENCE command)
PRINT Subcommand (CORRESPONDENCE command)
PLOT Subcommand (CORRESPONDENCE command)
OUTFILE Subcommand (CORRESPONDENCE command)


STANDARDIZE Subcommand (CORRESPONDENCE command)

STANDARDIZE (subcommand),STANDARDIZE (subcommand),STANDARDIZE (subcommand)
CORRESPONDENCE command,CORRESPONDENCE command,CORRESPONDENCE command
CORRESPONDENCE (command),CORRESPONDENCE (command),CORRESPONDENCE (command)
STANDARDIZE subcommand,STANDARDIZE subcommand,STANDARDIZE subcommand
standardization,standardization,standardization
CORRESPONDENCE command,CORRESPONDENCE command,CORRESPONDENCE command
CORRESPONDENCE (command),CORRESPONDENCE (command),CORRESPONDENCE (command)
standardization,standardization,standardization

When MEASURE=EUCLID, the STANDARDIZE subcommand specifies the method of standardization.

• Only one keyword can be used.

• If MEASURE is CHISQ, only RCMEAN standardization can be used, resulting in standard correspondence analysis.

The following keywords are available:

RMEAN (keyword),RMEAN (keyword),RMEAN (keyword)
CORRESPONDENCE command,CORRESPONDENCE command,CORRESPONDENCE command
CMEAN (keyword),CMEAN (keyword),CMEAN (keyword)
CORRESPONDENCE command,CORRESPONDENCE command,CORRESPONDENCE command
RCMEAN (keyword),RCMEAN (keyword),RCMEAN (keyword)
CORRESPONDENCE command,CORRESPONDENCE command,CORRESPONDENCE command
RSUM (keyword),RSUM (keyword),RSUM (keyword)
CORRESPONDENCE command,CORRESPONDENCE command,CORRESPONDENCE command
CSUM (keyword),CSUM (keyword),CSUM (keyword)
CORRESPONDENCE command,CORRESPONDENCE command,CORRESPONDENCE command
RMEAN | The row means are removed.
CMEAN | The column means are removed.
RCMEAN | Both the row and column means are removed. This is the default specification.
RSUM | First the row totals are equalized and then the row means are removed.
CSUM | First the column totals are equalized and then the column means are removed.

Related Topics

CORRESPONDENCE
Overview (CORRESPONDENCE command)
Example (CORRESPONDENCE command)
TABLE Subcommand (CORRESPONDENCE command)
DIMENSION Subcommand (CORRESPONDENCE command)
SUPPLEMENTARY Subcommand (CORRESPONDENCE command)
EQUAL Subcommand (CORRESPONDENCE command)
MEASURE Subcommand (CORRESPONDENCE command)
NORMALIZATION Subcommand (CORRESPONDENCE command)
PRINT Subcommand (CORRESPONDENCE command)
PLOT Subcommand (CORRESPONDENCE command)
OUTFILE Subcommand (CORRESPONDENCE command)


NORMALIZATION Subcommand (CORRESPONDENCE command)

NORMALIZATION (subcommand),NORMALIZATION (subcommand),NORMALIZATION (subcommand)
CORRESPONDENCE command,CORRESPONDENCE command,CORRESPONDENCE command
CORRESPONDENCE (command),CORRESPONDENCE (command),CORRESPONDENCE (command)
NORMALIZATION subcommand,NORMALIZATION subcommand,NORMALIZATION subcommand
normalization,normalization,normalization
CORRESPONDENCE command,CORRESPONDENCE command,CORRESPONDENCE command
CORRESPONDENCE (command),CORRESPONDENCE (command),CORRESPONDENCE (command)
normalization,normalization,normalization

The NORMALIZATION subcommand specifies one of five methods for normalizing the row and column scores. Only the scores and confidence statistics are affected; contributions and profiles are not changed.

The following keywords are available:

SYMMETRICAL (keyword),SYMMETRICAL (keyword),SYMMETRICAL (keyword)
CORRESPONDENCE command,CORRESPONDENCE command,CORRESPONDENCE command
PRINCIPAL (keyword),PRINCIPAL (keyword),PRINCIPAL (keyword)
CORRESPONDENCE command,CORRESPONDENCE command,CORRESPONDENCE command
RPRINCIPAL (keyword),RPRINCIPAL (keyword),RPRINCIPAL (keyword)
CORRESPONDENCE command,CORRESPONDENCE command,CORRESPONDENCE command
CPRINCIPAL (keyword),CPRINCIPAL (keyword),CPRINCIPAL (keyword)
CORRESPONDENCE command,CORRESPONDENCE command,CORRESPONDENCE command
SYMMETRICAL | For each dimension, rows are the weighted average of columns divided by the matching singular value, and columns are the weighted average of rows divided by the matching singular value. This is the default if the NORMALIZATION subcommand is not specified. Use this normalization method if you are primarily interested in differences or similarities between rows and columns.
PRINCIPAL | Distances between row points and distances between column points are approximations of chi-square distances or of Euclidean distances (depending on MEASURE). The distances represent the distance between the row or column and its corresponding average row or column profile. Use this normalization method if you want to examine both differences between categories of the row variable and differences between categories of the column variable (but not differences between variables).
RPRINCIPAL | Distances between row points are approximations of chi-square distances or of Euclidean distances (depending on MEASURE). This method maximizes distances between row points, resulting in row points that are weighted averages of the column points. This is useful when you are primarily interested in differences or similarities between categories of the row variable.
CPRINCIPAL | Distances between column points are approximations of chi-square distances or of Euclidean distances (depending on MEASURE). This method maximizes distances between column points, resulting in column points that are weighted averages of the row points. This is useful when you are primarily interested in differences or similarities between categories of the column variable.

The fifth method allows the user to specify any value in the range –1 to +1, inclusive. A value of 1 is equal to the RPRINCIPAL method, a value of 0 is equal to the SYMMETRICAL method, and a value of –1 is equal to the CPRINCIPAL method. By specifying a value between –1 and 1, the user can spread the inertia over both row and column scores to varying degrees. This method is useful for making tailor-made biplots.

Related Topics

CORRESPONDENCE
Overview (CORRESPONDENCE command)
Example (CORRESPONDENCE command)
TABLE Subcommand (CORRESPONDENCE command)
DIMENSION Subcommand (CORRESPONDENCE command)
SUPPLEMENTARY Subcommand (CORRESPONDENCE command)
EQUAL Subcommand (CORRESPONDENCE command)
MEASURE Subcommand (CORRESPONDENCE command)
STANDARDIZE Subcommand (CORRESPONDENCE command)
PRINT Subcommand (CORRESPONDENCE command)
PLOT Subcommand (CORRESPONDENCE command)
OUTFILE Subcommand (CORRESPONDENCE command)


PRINT Subcommand (CORRESPONDENCE command)

PRINT (subcommand),PRINT (subcommand),PRINT (subcommand)
CORRESPONDENCE command,CORRESPONDENCE command,CORRESPONDENCE command
CORRESPONDENCE (command),CORRESPONDENCE (command),CORRESPONDENCE (command)
PRINT subcommand,PRINT subcommand,PRINT subcommand

Use PRINT to control which of several correspondence statistics are displayed. The summary table (singular values, inertia, proportion of inertia accounted for, cumulative proportion of inertia accounted for, and confidence statistics for the maximum number of dimensions) is always produced. If PRINT is not specified, the input table, the summary table, the overview of row points table, and the overview of column points table are displayed.

The following keywords are available:

TABLE (keyword),TABLE (keyword),TABLE (keyword)
CORRESPONDENCE command,CORRESPONDENCE command,CORRESPONDENCE command
RPROFILES (keyword),RPROFILES (keyword),RPROFILES (keyword)
CORRESPONDENCE command,CORRESPONDENCE command,CORRESPONDENCE command
CPROFILES (keyword),CPROFILES (keyword),CPROFILES (keyword)
CORRESPONDENCE command,CORRESPONDENCE command,CORRESPONDENCE command
RPOINTS (keyword),RPOINTS (keyword),RPOINTS (keyword)
CORRESPONDENCE command,CORRESPONDENCE command,CORRESPONDENCE command
CPOINTS (keyword),CPOINTS (keyword),CPOINTS (keyword)
CORRESPONDENCE command,CORRESPONDENCE command,CORRESPONDENCE command
RCONF (keyword),RCONF (keyword),RCONF (keyword)
CORRESPONDENCE command,CORRESPONDENCE command,CORRESPONDENCE command
CCONF (keyword),CCONF (keyword),CCONF (keyword)
CORRESPONDENCE command,CORRESPONDENCE command,CORRESPONDENCE command
PERMUTATION (keyword),PERMUTATION (keyword),PERMUTATION (keyword)
CORRESPONDENCE command,CORRESPONDENCE command,CORRESPONDENCE command
NONE (keyword),NONE (keyword),NONE (keyword)
CORRESPONDENCE command,CORRESPONDENCE command,CORRESPONDENCE command
DEFAULT (keyword),DEFAULT (keyword),DEFAULT (keyword)
CORRESPONDENCE command,CORRESPONDENCE command,CORRESPONDENCE command
TABLE | A crosstabulation of the input variables showing row and column marginals.
RPROFILES | The row profiles. PRINT=RPROFILES is analogous to the CELLS=ROW subcommand in CROSSTABS.
CPROFILES | The column profiles. PRINT=CPROFILES is analogous to the CELLS= COLUMN subcommand in CROSSTABS.
RPOINTS | Overview of row points (mass, scores, inertia, contribution of the points to the inertia of the dimension, and the contribution of the dimensions to the inertia of the points).
CPOINTS | Overview of column points (mass, scores, inertia, contribution of the points to the inertia of the dimension, and the contribution of the dimensions to the inertia of the points).
RCONF | Confidence statistics (standard deviations and correlations) for the active row points.
CCONF | Confidence statistics (standard deviations and correlations) for the active column points.
PERMUTATION(n) | The original table permuted according to the scores of the rows and columns. PERMUTATION can be followed by a number in parentheses indicating the maximum number of dimensions for which you want permuted tables. The default number of dimensions is 1.
NONE | No output other than the SUMMARY table.
DEFAULT | TABLE, RPOINTS, CPOINTS, and the SUMMARY tables. These statistics are displayed if you omit the PRINT subcommand.

Related Topics

CORRESPONDENCE
Overview (CORRESPONDENCE command)
Example (CORRESPONDENCE command)
TABLE Subcommand (CORRESPONDENCE command)
DIMENSION Subcommand (CORRESPONDENCE command)
SUPPLEMENTARY Subcommand (CORRESPONDENCE command)
EQUAL Subcommand (CORRESPONDENCE command)
MEASURE Subcommand (CORRESPONDENCE command)
STANDARDIZE Subcommand (CORRESPONDENCE command)
NORMALIZATION Subcommand (CORRESPONDENCE command)
PLOT Subcommand (CORRESPONDENCE command)
OUTFILE Subcommand (CORRESPONDENCE command)


PLOT Subcommand (CORRESPONDENCE command)

PLOT (subcommand),PLOT (subcommand),PLOT (subcommand)
CORRESPONDENCE command,CORRESPONDENCE command,CORRESPONDENCE command
CORRESPONDENCE (command),CORRESPONDENCE (command),CORRESPONDENCE (command)
PLOT subcommand,PLOT subcommand,PLOT subcommand
plots,plots,plots
CORRESPONDENCE command,CORRESPONDENCE command,CORRESPONDENCE command
CORRESPONDENCE (command),CORRESPONDENCE (command),CORRESPONDENCE (command)
plots,plots,plots

Use PLOT to produce a biplot of row and column points, plus plots of the row points, column points, transformations of the categories of the row variable, and transformations of the categories of the column variable. If PLOT is not specified or is specified without keywords, a biplot is produced.

The following keywords are available:

TRROWS (keyword),TRROWS (keyword),TRROWS (keyword)
CORRESPONDENCE command,CORRESPONDENCE command,CORRESPONDENCE command
TRCOLUMNS (keyword),TRCOLUMNS (keyword),TRCOLUMNS (keyword)
CORRESPONDENCE command,CORRESPONDENCE command,CORRESPONDENCE command
RPOINTS (keyword),RPOINTS (keyword),RPOINTS (keyword)
CORRESPONDENCE command,CORRESPONDENCE command,CORRESPONDENCE command
CPOINTS (keyword),CPOINTS (keyword),CPOINTS (keyword)
CORRESPONDENCE command,CORRESPONDENCE command,CORRESPONDENCE command
BIPLOT (keyword),BIPLOT (keyword),BIPLOT (keyword)
CORRESPONDENCE command,CORRESPONDENCE command,CORRESPONDENCE command
biplots,biplots,biplots
CORRESPONDENCE command,CORRESPONDENCE command,CORRESPONDENCE command
NONE (keyword),NONE (keyword),NONE (keyword)
CORRESPONDENCE command,CORRESPONDENCE command,CORRESPONDENCE command
TRROWS(n) | Transformation plots for the rows (row category scores against row category indicator values).
TRCOLUMNS(n) | Transformation plots for the columns (column category scores against column category indicator values).
RPOINTS(n) | Plot of the row points.
CPOINTS(n) | Plot of the column points.
BIPLOT(n) | Biplot of the row and column points. This is the default plot. This plot is not available when NORMALIZATION=PRINCIPAL.
NONE | No plots.

• For all of the keywords except NONE the user can specify an optional parameter l in parentheses in order to control the global upper boundary of value label lengths in the plot. The label length parameter l can take any nonnegative integer less than or equal to the applicable maximum length of 60. If l is not specified, CORRESPONDENCE assumes that each value label at its full length is displayed. If l is an integer larger than the applicable maximum, then we reset it to the applicable maximum, but do not issue a warning. If a positive value of l is given but if some or all of the category values do not have labels, then for those values the values themselves are used as the labels.

In addition to the plot keywords, the following can be specified:

NDIM (keyword),NDIM (keyword),NDIM (keyword)
CORRESPONDENCE command,CORRESPONDENCE command,CORRESPONDENCE command
NDIM(value,value) Dimension pairs to be plotted. NDIM is followed by a pair of values in parentheses. If NDIM is not specified or if NDIM is specified without parameter values, a matrix scatterplot including all dimensions is produced.

• The first value must be any integer from 1 to the number of dimensions in the solution minus 1.

MAX (keyword),MAX (keyword),MAX (keyword)
CORRESPONDENCE command,CORRESPONDENCE command,CORRESPONDENCE command

• The second value must be an integer from 2 to the number of dimensions in the solution. The second value must exceed the first. Alternatively, the keyword MAX can be used instead of a value to indicate the highest dimension of the solution.

• For TRROWS and TRCOLUMNS, the first and second values indicate the range of dimensions for which the plots are created.

• For RPOINTS, CPOINTS, and BIPLOT, the first and second values indicate plotting pairs of dimensions. The first value indicates the dimension that is plotted against higher dimensions. The second value indicates the highest dimension to be used in plotting the dimension pairs.

Example

CORRESPONDENCE TABLE=MENTAL(1,4) BY SES(1,6)
/PLOT NDIM(1,3) BIPLOT(5).

• BIPLOT and NDIM(1,3) requests that a scatterplot for dimensions 1 and 2, and a scatterplot for dimensions 1 and 3 should be produced.

• The 5 following BIPLOT indicates that only the first five characters of each label are to be shown in the biplot matrix.

Example

CORRESPONDENCE TABLE=MENTAL(1,4) BY SES(1,6)
/DIMENSION = 3
/PLOT NDIM(1,MAX) TRROWS.

• Three transformation plots for the row categories are produced, one for each dimension from 1 to the highest dimension of the analysis (in this case, 3). The label parameter is not specified, and so the category labels in the plot are shown up their full lengths.

Related Topics

CORRESPONDENCE
Overview (CORRESPONDENCE command)
Example (CORRESPONDENCE command)
TABLE Subcommand (CORRESPONDENCE command)
DIMENSION Subcommand (CORRESPONDENCE command)
SUPPLEMENTARY Subcommand (CORRESPONDENCE command)
EQUAL Subcommand (CORRESPONDENCE command)
MEASURE Subcommand (CORRESPONDENCE command)
STANDARDIZE Subcommand (CORRESPONDENCE command)
NORMALIZATION Subcommand (CORRESPONDENCE command)
PRINT Subcommand (CORRESPONDENCE command)
OUTFILE Subcommand (CORRESPONDENCE command)


OUTFILE Subcommand (CORRESPONDENCE command)

OUTFILE (subcommand),OUTFILE (subcommand),OUTFILE (subcommand)
CORRESPONDENCE command,CORRESPONDENCE command,CORRESPONDENCE command
CORRESPONDENCE (command),CORRESPONDENCE (command),CORRESPONDENCE (command)
OUTFILE subcommand,OUTFILE subcommand,OUTFILE subcommand

Use OUTFILE to write row and column scores and/or confidence statistics (variances and covariances) for the singular values and row and column scores to an an external PASW Statistics data file or previously declared dataset.

OUTFILE must be followed by one or both of the following keywords:

SCORE (keyword),SCORE (keyword),SCORE (keyword)
CORRESPONDENCE command,CORRESPONDENCE command,CORRESPONDENCE command
VARIANCE (keyword),VARIANCE (keyword),VARIANCE (keyword)
CORRESPONDENCE command,CORRESPONDENCE command,CORRESPONDENCE command
SCORE ('file'|'dataset') | Write row and column scores.
VARIANCE ('file'|'dataset') | Write variances and covariances.

• Filenames should be enclosed in quotes and are stored in the working directory unless a path is included as part of the file specification. Datasets are available during the current session but are not available in subsequent sessions unless you explicitly save them as data files. The names should be different for the each of the keywords.

• For VARIANCE, supplementary and equality constrained rows and columns are not produced in the external file.

The variables in the SCORE matrix data file and their values are:

ROWTYPE_ variable,ROWTYPE_ variable,ROWTYPE_ variable
CORRESPONDENCE command,CORRESPONDENCE command,CORRESPONDENCE command
LEVEL_ variable,LEVEL_ variable,LEVEL_ variable
CORRESPONDENCE command,CORRESPONDENCE command,CORRESPONDENCE command
VARNAME_ variable,VARNAME_ variable,VARNAME_ variable
CORRESPONDENCE command,CORRESPONDENCE command,CORRESPONDENCE command
DIMn variable,DIMn variable,DIMn variable
CORRESPONDENCE command,CORRESPONDENCE command,CORRESPONDENCE command
ROWTYPE_ | String variable containing the value ROW for all of the rows and COLUMN for all of the columns.
LEVEL_ | String variable containing the values (or value labels, if present) of each original variable.
VARNAME_ | String variable containing the original variable names.
DIM1...DIMn | Numerical variables containing the row and column scores for each dimension. Each variable is named DIMn, where n represents the dimension number.

The variables in the VARIANCE matrix data file and their values are:

ROWTYPE_ variable,ROWTYPE_ variable,ROWTYPE_ variable
CORRESPONDENCE command,CORRESPONDENCE command,CORRESPONDENCE command
VARNAME_ variable,VARNAME_ variable,VARNAME_ variable
CORRESPONDENCE command,CORRESPONDENCE command,CORRESPONDENCE command
LEVEL_ variable,LEVEL_ variable,LEVEL_ variable
CORRESPONDENCE command,CORRESPONDENCE command,CORRESPONDENCE command
DIMNMBR_ variable,DIMNMBR_ variable,DIMNMBR_ variable
CORRESPONDENCE command,CORRESPONDENCE command,CORRESPONDENCE command
DIMn variable,DIMn variable,DIMn variable
CORRESPONDENCE command,CORRESPONDENCE command,CORRESPONDENCE command
ROWTYPE_ | String variable containing the value COV for all of the cases in the file.
VARNAME_ | String variable containing the value SINGULAR, the row variable’s name, and the column variable’s name.
LEVEL_ | String variable containing the row variable’s values (or labels), the column variable’s values (or labels), and a blank value for VARNAME_ = SINGULAR.
DIMNMBR_ | String variable containing the dimension number.
DIM1...DIMn | Numerical variables containing the variances and covariances for each dimension. Each variable is named DIMn, where n represents the dimension number.

Related Topics

CORRESPONDENCE
Overview (CORRESPONDENCE command)
Example (CORRESPONDENCE command)
TABLE Subcommand (CORRESPONDENCE command)
DIMENSION Subcommand (CORRESPONDENCE command)
SUPPLEMENTARY Subcommand (CORRESPONDENCE command)
EQUAL Subcommand (CORRESPONDENCE command)
MEASURE Subcommand (CORRESPONDENCE command)
STANDARDIZE Subcommand (CORRESPONDENCE command)
NORMALIZATION Subcommand (CORRESPONDENCE command)
PRINT Subcommand (CORRESPONDENCE command)
PLOT Subcommand (CORRESPONDENCE command)


COUNT

COUNT (command),COUNT (command),COUNT (command)
COUNT (command),COUNT (command),COUNT (command)
syntax chart,syntax chart,syntax chart
COUNT varname=varlist(value list) [/varname=...]

Keywords for numeric value lists:

LOWEST, LO, HIGHEST, HI, THRU, MISSING, SYSMIS

This command does not read the active dataset. It is stored, pending execution with the next command that reads the dataset. See the topic Command Order for more information.

Syntax for the COUNT command can be generated from the Count Occurrences of Values within Cases dialog.

Example

COUNT TARGET=V1 V2 V3 (2).

Related Topics

Overview (COUNT command)
Examples (COUNT command)


Overview (COUNT command)

counting occurrences,counting occurrences,counting occurrences
defining values,defining values,defining values
THRU (keyword),THRU (keyword),THRU (keyword)
COUNT command,COUNT command,COUNT command
LOWEST (keyword),LOWEST (keyword),LOWEST (keyword)
COUNT command,COUNT command,COUNT command
HIGHEST (keyword),HIGHEST (keyword),HIGHEST (keyword)
COUNT command,COUNT command,COUNT command
SYSMIS (keyword),SYSMIS (keyword),SYSMIS (keyword)
COUNT command,COUNT command,COUNT command
MISSING (keyword),MISSING (keyword),MISSING (keyword)
COUNT command,COUNT command,COUNT command
data transformations,data transformations,data transformations
counting the same value across variables,counting the same value across variables,counting the same value across variables
missing values,missing values,missing values
counting occurrences,counting occurrences,counting occurrences
COUNT (command),COUNT (command),COUNT (command)
missing values,missing values,missing values
counting occurrences,counting occurrences,counting occurrences
missing values,missing values,missing values
target variables,target variables,target variables
counting values,counting values,counting values
SYSMIS (keyword),SYSMIS (keyword),SYSMIS (keyword)
COUNT command,COUNT command,COUNT command
MISSING (keyword),MISSING (keyword),MISSING (keyword)
COUNT command,COUNT command,COUNT command
target variables,target variables,target variables
counting values,counting values,counting values

COUNT creates a numeric variable that, for each case, counts the occurrences of the same value (or list of values) across a list of variables. The new variable is called the target variable. The variables and values that are counted are the criterion variables and values. Criterion variables can be either numeric or string.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is the target variable, an equals sign, the criterion variable(s), and the criterion value(s) enclosed in parentheses.

Syntax Rules Collapse Hide details

Syntax Rules

• Use a slash to separate the specifications for each target variable.

• The criterion variables specified for a single target variable must be either all numeric or all string.

• Each value on a list of criterion values must be separated by a comma or space. String values must be enclosed in quotes.

• The keywords THRU, LOWEST (LO), HIGHEST (HI), SYSMIS, and MISSING can be used only with numeric criterion variables.

• A variable can be specified on more than one criterion variable list.

• You can use the keyword TO to specify consecutive criterion variables that have the same criterion value or values.

• You can specify multiple variable lists for a single target variable to count different values for different variables.

Operations Collapse Hide details

Operations

• Target variables are always numeric and are initialized to 0 for each case. They are assigned a dictionary format of F8.2.

• If the target variable already exists, its previous values are replaced.

• COUNT ignores the missing-value status of user-missing values. It counts a value even if that value has been previously declared as missing.

• The target variable is never system-missing. To define user-missing values for target variables, use the RECODE or MISSING VALUES command.

• SYSMIS counts system-missing values for numeric variables.

• MISSING counts both user- and system-missing values for numeric variables.

Related Topics

COUNT
Examples (COUNT command)


Examples (COUNT command)

Counting Occurrences of a Single Value

COUNT TARGET=V1 V2 V3 (2).

• The value of TARGET for each case will be either 0, 1, 2, or 3, depending on the number of times the value 2 occurs across the three variables for each case.

• TARGET is a numeric variable with an F8.2 format.

Counting Occurrences of a Range of Values and System-Missing Values

COUNT QLOW=Q1 TO Q10 (LO THRU 0)
  /QSYSMIS=Q1 TO Q10 (SYSMIS).

• Assuming that there are 10 variables between and including Q1 and Q10 in the active dataset, QLOW ranges from 0 to 10, depending on the number of times a case has a negative or 0 value across the variables Q1 to Q10.

• QSYSMIS ranges from 0 to 10, depending on how many system-missing values are encountered for Q1 to Q10 for each case. User-missing values are not counted.

• Both QLOW and QSYSMIS are numeric variables and have F8.2 formats.

Counting Occurrences of String Values

COUNT SVAR=V1 V2 ('male  ') V3 V4 V5 ('female').

• SVAR ranges from 0 to 5, depending on the number of times a case has a value of male for V1 and V2 and a value of female for V3, V4, and V5.

• SVAR is a numeric variable with an F8.2 format.

Related Topics

COUNT
Overview (COUNT command)


COXREG

COXREG (command),COXREG (command),COXREG (command)
COXREG (command),COXREG (command),COXREG (command)
syntax chart,syntax chart,syntax chart
Cox Regression,Cox Regression,Cox Regression
command syntax,command syntax,command syntax

COXREG is available in the Advanced Statistics option.

COXREG VARIABLES = survival varname [WITH varlist]
    / STATUS = varname [EVENT] (vallist) [LOST (vallist)]
   [/STRATA  = varname]
   [/CATEGORICAL = varname]
   [/CONTRAST (varname) = {DEVIATION (refcat)}]
                          {SIMPLE (refcat)   }
                          {DIFFERENCE        }
                          {HELMERT           }
                          {REPEATED          }
                          {POLYNOMIAL(metric)}
                          {SPECIAL (matrix)  }
                          {INDICATOR (refcat)}

   [/METHOD = {ENTER**      }   [{varlist}]]
              {BSTEP [{COND}]}    {ALL    }
                      {LR  }
                      {WALD}
              {FSTEP [{COND}]}
                      {LR  }
                      {WALD}

   [/MISSING = {EXCLUDE**}]
               {INCLUDE  }

   [/PRINT = [{DEFAULT**}]  [CI ({95})]]
              {SUMMARY  }        {n }
              {BASELINE }
              {CORR     }
              {ALL      }

   [/CRITERIA = [{BCON}({1E-4**})]   [LCON({1E-5**})]
                 {PCON} { n    }           { n    }
                [ITERATE({20**})]
                         { n  }
                [PIN({0.05**})]      [POUT({0.1**})]]
                     { n    }              { n   }

   [/PLOT = [NONE**] [SURVIVAL] [HAZARD] [LML] [OMS]]
   [/PATTERN = [varname(value)...] [BY varname]]
   [/OUTFILE = [COEFF('savfile' | 'dataset')] [TABLE('savfile' | 'dataset')]
               [PARAMETER('file')]]
   [/SAVE = tempvar [(newvarname)],tempvar ...]
   [/EXTERNAL]

**Default if subcommand or keyword is omitted.

Temporary variables created by COXREG are:

SURVIVAL

SE

HAZARD

RESID

LML

DFBETA

PRESID

XBETA

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See COXREG Algorithms for computational details for this procedure.

Syntax for the COXREG command can be generated from the Cox Regression Analysis dialog box.

Example

TIME PROGRAM.
COMPUTE Z=AGE + T_.

COXREG SURVIVAL WITH Z
  /STATUS SURVSTA EVENT(1).

Related Topics

Overview (COXREG command)
Examples (COXREG command)
VARIABLES Subcommand (COXREG command)
STATUS Subcommand (COXREG command)
STRATA Subcommand (COXREG command)
CATEGORICAL Subcommand (COXREG command)
CONTRAST Subcommand (COXREG command)
METHOD Subcommand (COXREG command)
MISSING Subcommand (COXREG command)
PRINT Subcommand (COXREG command)
CRITERIA Subcommand (COXREG command)
PLOT Subcommand (COXREG command)
PATTERN Subcommand (COXREG command)
OUTFILE Subcommand (COXREG command)
SAVE Subcommand (COXREG command)
EXTERNAL Subcommand (COXREG command)
TIME PROGRAM
CLEAR TIME PROGRAM


Overview (COXREG command)

COXREG applies Cox proportional hazards regression to analysis of survival times—that is, the length of time before the occurrence of an event. COXREG supports continuous and categorical independent variables (covariates), which can be time dependent. Unlike SURVIVAL and KM, which compare only distinct subgroups of cases, COXREG provides an easy way of considering differences in subgroups as well as analyzing effects of a set of covariates.

Options Collapse Hide details

Options

Processing of Independent Variables. You can specify which of the independent variables are categorical with the CATEGORICAL subcommand and control treatment of these variables with the CONTRAST subcommand. You can select one of seven methods for entering independent variables into the model using the METHOD subcommand. You can also indicate interaction terms using the keyword BY between variable names on either the VARIABLES subcommand or the METHOD subcommand.

Specifying Termination and Model-Building Criteria. You can specify the criteria for termination of iteration and control variable entry and removal with the CRITERIA subcommand.

Adding New Variables to Active Dataset. You can use the SAVE subcommand to save the cumulative survival, standard error, cumulative hazard, log-minus-log-of-survival function, residuals, XBeta, and, wherever available, partial residuals and DfBeta.

Output. You can print optional output using the PRINT subcommand, suppress or request plots with the PLOT subcommand, and, with the OUTFILE subcommand, write data files containing coefficients from the final model or a survival table. When only time-constant covariates are used, you can use the PATTERN subcommand to specify a pattern of covariate values in addition to the covariate means to use for the plots and the survival table.

Basic Specification Collapse Hide details

Basic Specification

• The minimum specification on COXREG is a dependent variable with the STATUS subcommand.

• To analyze the influence of time-constant covariates on the survival times, the minimum specification requires either the WITH keyword followed by at least one covariate (independent variable) on the VARIABLES subcommand or a METHOD subcommand with at least one independent variable.

• To analyze the influence of time-dependent covariates on the survival times, the TIME PROGRAM command and transformation language are required to define the functions for the time-dependent covariate(s).

Subcommand Order Collapse Hide details

Subcommand Order

• The VARIABLES subcommand must be specified first; the subcommand keyword is optional.

• Remaining subcommands can be named in any order.

Syntax Rules Collapse Hide details

Syntax Rules

• Only one dependent variable can be specified for each COXREG command.

• Any number of covariates (independent variables) can be specified. The dependent variable cannot appear on the covariate list.

• The covariate list is required if any of the METHOD subcommands are used without a variable list or if the METHOD subcommand is not used.

• Only one status variable can be specified on the STATUS subcommand. If multiple STATUS subcommands are specified, only the last specification is in effect.

• You can use the BY keyword to specify interaction between covariates.

Operations Collapse Hide details

Operations

• TIME PROGRAM computes the values for time-dependent covariates. See the topic TIME PROGRAM for more information.

• COXREG replaces covariates specified on CATEGORICAL with sets of contrast variables. In stepwise analyses, the set of contrast variables associated with one categorical variable is entered or removed from the model as a block.

• Covariates are screened to detect and eliminate redundancies.

• COXREG deletes all cases that have negative values for the dependent variable.

COXREG (command),COXREG (command),COXREG (command)
limitations,limitations,limitations
Limitations Collapse Hide details

Limitations

• Only one dependent variable is allowed.

• Maximum 100 covariates in a single interaction term.

• Maximum 35 levels for a BY variable on PATTERN.

Related Topics

COXREG
Examples (COXREG command)
VARIABLES Subcommand (COXREG command)
STATUS Subcommand (COXREG command)
STRATA Subcommand (COXREG command)
CATEGORICAL Subcommand (COXREG command)
CONTRAST Subcommand (COXREG command)
METHOD Subcommand (COXREG command)
MISSING Subcommand (COXREG command)
PRINT Subcommand (COXREG command)
CRITERIA Subcommand (COXREG command)
PLOT Subcommand (COXREG command)
PATTERN Subcommand (COXREG command)
OUTFILE Subcommand (COXREG command)
SAVE Subcommand (COXREG command)
EXTERNAL Subcommand (COXREG command)


Examples (COXREG command)

COXREG
  tenure  /STATUS=churn(1)
  /PATTERN BY custcat
  /CONTRAST (marital)=Indicator  /CONTRAST (ed)=Indicator  /CONTRAST
  (retire)=Indicator  /CONTRAST (gender)=Indicator  /CONTRAST
  (custcat)=Indicator
  /METHOD=FSTEP(LR) age marital address ed employ retire gender reside
 /METHOD=ENTER custcat
  /PLOT SURVIVAL HAZARD
  /CRITERIA=PIN(.05) POUT(.10) ITERATE(20) .

• The procedure fits a Cox regression model to the variable tenure.

• The STATUS subcommand specifies that a value of 1 on the variable churn indicates the event of interest has occurred.

• The PATTERN subcommand specifies that separate lines be produced for each value of custcat on the requested plots.

• The CONTRAST subcommand specifies that marital, ed, retire, gender, and custcat should be treated as categorical variables using indicator contrasts.

• The first METHOD subcommand specifies that age, marital, address, ed, employ, retire, gender, and reside should be tested for entry into the model using forward stepwise selection using the likelihood ratio statistic.

• The second METHOD subcommand specifies that custcat should be entered into the model after the forward stepwise selection is performed in the previous METHOD subcommand.

• The PLOT subcommand requests plots of the cumulative survival and cumulative hazard functions.

• All other options are set to their default values.

For discussion of output from this syntax and to place the example in context, see Using Cox Regression to Model Customer Time to Churn.

Using a Time-Dependent Covariate

TIME PROGRAM.
COMPUTE T_COV_ = T_*age .
COXREG
  time  /STATUS=arrest2(1)
  /METHOD=ENTER age T_COV_
  /CRITERIA=PIN(.05) POUT(.10) ITERATE(20) .

• TIME PROGRAM defines the time-dependent covariate T_COV_ as the interaction between the current time and age.

• COXREG fits a Cox regression model to the variable time.

• The STATUS subcommand specifies that a value of 1 on the variable arrest2 indicates the event of interest (a second arrest) has occurred.

• The METHOD subcommand specifies that age and T_COV_ should be entered into the model.

• All other options are set to their default values.

See the topic TIME PROGRAM for more information.

For discussion of output from this syntax and to place the example in context, see Cox Regression with a Time-Dependent Covariate.

Related Topics

COXREG
Overview (COXREG command)
VARIABLES Subcommand (COXREG command)
STATUS Subcommand (COXREG command)
STRATA Subcommand (COXREG command)
CATEGORICAL Subcommand (COXREG command)
CONTRAST Subcommand (COXREG command)
METHOD Subcommand (COXREG command)
MISSING Subcommand (COXREG command)
PRINT Subcommand (COXREG command)
CRITERIA Subcommand (COXREG command)
PLOT Subcommand (COXREG command)
PATTERN Subcommand (COXREG command)
OUTFILE Subcommand (COXREG command)
SAVE Subcommand (COXREG command)
EXTERNAL Subcommand (COXREG command)


VARIABLES Subcommand (COXREG command)

VARIABLES (subcommand),VARIABLES (subcommand),VARIABLES (subcommand)
COXREG command,COXREG command,COXREG command
COXREG (command),COXREG (command),COXREG (command)
VARIABLES subcommand,VARIABLES subcommand,VARIABLES subcommand

VARIABLES identifies the dependent variable and the covariates to be included in the analysis.

• The minimum specification is the dependent variable.

• Cases whose dependent variable values are negative are excluded from the analysis.

• You must specify the keyword WITH and a list of all covariates if no METHOD subcommand is specified or if a METHOD subcommand is specified without naming the variables to be used.

• If the covariate list is not specified on VARIABLES but one or more METHOD subcommands are used, the covariate list is assumed to be the union of the sets of variables listed on all of the METHOD subcommands.

interaction terms,interaction terms,interaction terms
COXREG command,COXREG command,COXREG command

• You can specify an interaction of two or more covariates using the keyword BY. For example, A B BY C D specifies the three terms A, B*C, and D.

• The keyword TO can be used to specify a list of covariates. The implied variable order is the same as in the active dataset.

Related Topics

COXREG
Overview (COXREG command)
Examples (COXREG command)
STATUS Subcommand (COXREG command)
STRATA Subcommand (COXREG command)
CATEGORICAL Subcommand (COXREG command)
CONTRAST Subcommand (COXREG command)
METHOD Subcommand (COXREG command)
MISSING Subcommand (COXREG command)
PRINT Subcommand (COXREG command)
CRITERIA Subcommand (COXREG command)
PLOT Subcommand (COXREG command)
PATTERN Subcommand (COXREG command)
OUTFILE Subcommand (COXREG command)
SAVE Subcommand (COXREG command)
EXTERNAL Subcommand (COXREG command)


STATUS Subcommand (COXREG command)

COXREG (command),COXREG (command),COXREG (command)
survival status variable,survival status variable,survival status variable
COXREG (command),COXREG (command),COXREG (command)
STATUS subcommand,STATUS subcommand,STATUS subcommand
STATUS (subcommand),STATUS (subcommand),STATUS (subcommand)
COXREG command,COXREG command,COXREG command

To determine whether the event has occurred for a particular observation, COXREG checks the value of a status variable. STATUS lists the status variable and the code for the occurrence of the event.

• Only one status variable can be specified. If multiple STATUS subcommands are specified, COXREG uses the last specification and displays a warning.

• The keyword EVENT is optional, but the value list in parentheses must be specified.

• The value list must be enclosed in parentheses. All cases with non-negative times that do not have a code within the range specified after EVENT are classified as censored cases—that is, cases for which the event has not yet occurred.

• The value list can be one value, a list of values separated by blanks or commas, a range of values using the keyword THRU, or a combination.

• If missing values occur within the specified ranges, they are ignored if MISSING=EXCLUDE (the default) is specified, but they are treated as valid values for the range if MISSING=INCLUDE is specified.

• The status variable can be either numeric or string. If a string variable is specified, the EVENT values must be enclosed in apostrophes and the keyword THRU cannot be used.

Example

COXREG VARIABLES = SURVIVAL WITH GROUP
  /STATUS SURVSTA (3 THRU 5, 8 THRU 10).

• STATUS specifies that SURVSTA is the status variable.

• A value between either 3 and 5 or 8 and 10, inclusive, means that the terminal event occurred.

• Values outside the specified ranges indicate censored cases.

Related Topics

COXREG
Overview (COXREG command)
Examples (COXREG command)
VARIABLES Subcommand (COXREG command)
STRATA Subcommand (COXREG command)
CATEGORICAL Subcommand (COXREG command)
CONTRAST Subcommand (COXREG command)
METHOD Subcommand (COXREG command)
MISSING Subcommand (COXREG command)
PRINT Subcommand (COXREG command)
CRITERIA Subcommand (COXREG command)
PLOT Subcommand (COXREG command)
PATTERN Subcommand (COXREG command)
OUTFILE Subcommand (COXREG command)
SAVE Subcommand (COXREG command)
EXTERNAL Subcommand (COXREG command)


STRATA Subcommand (COXREG command)

COXREG (command),COXREG (command),COXREG (command)
stratification variable,stratification variable,stratification variable
COXREG (command),COXREG (command),COXREG (command)
STRATA subcommand,STRATA subcommand,STRATA subcommand
STRATA (subcommand),STRATA (subcommand),STRATA (subcommand)
COXREG command,COXREG command,COXREG command

STRATA identifies a stratification variable. A different baseline survival function is computed for each stratum.

• The only specification is the subcommand keyword with one, and only one, variable name.

• If you have more than one stratification variable, create a new variable that corresponds to the combination of categories of the individual variables before invoking the COXREG command.

• There is no limit to the number of levels for the strata variable.

Example

COXREG VARIABLES = SURVIVAL WITH GROUP
 /STATUS SURVSTA (1)
 /STRATA=LOCATION.

• STRATA specifies LOCATION as the strata variable.

• Different baseline survival functions are computed for each value of LOCATION.

Related Topics

COXREG
Overview (COXREG command)
Examples (COXREG command)
VARIABLES Subcommand (COXREG command)
STATUS Subcommand (COXREG command)
CATEGORICAL Subcommand (COXREG command)
CONTRAST Subcommand (COXREG command)
METHOD Subcommand (COXREG command)
MISSING Subcommand (COXREG command)
PRINT Subcommand (COXREG command)
CRITERIA Subcommand (COXREG command)
PLOT Subcommand (COXREG command)
PATTERN Subcommand (COXREG command)
OUTFILE Subcommand (COXREG command)
SAVE Subcommand (COXREG command)
EXTERNAL Subcommand (COXREG command)


CATEGORICAL Subcommand (COXREG command)

COXREG (command),COXREG (command),COXREG (command)
categorical covariates,categorical covariates,categorical covariates
COXREG (command),COXREG (command),COXREG (command)
CATEGORICAL subcommand,CATEGORICAL subcommand,CATEGORICAL subcommand
CATEGORICAL (subcommand),CATEGORICAL (subcommand),CATEGORICAL (subcommand)
COXREG command,COXREG command,COXREG command

CATEGORICAL identifies covariates that are nominal or ordinal. Variables that are declared to be categorical are automatically transformed to a set of contrast variables (see CONTRAST Subcommand (COXREG command)). If a variable coded as 0–1 is declared as categorical, by default, its coding scheme will be changed to deviation contrasts.

• Covariates not specified on CATEGORICAL are assumed to be at least interval, except for strings.

• Variables specified on CATEGORICAL but not on VARIABLES or any METHOD subcommand are ignored.

• Variables specified on CATEGORICAL are replaced by sets of contrast variables. If the categorical variable has n distinct values, n−1 contrast variables will be generated. The set of contrast variables associated with one categorical variable are entered or removed from the model together.

• If any one of the variables in an interaction term is specified on CATEGORICAL, the interaction term is replaced by contrast variables.

• All string variables are categorical. Only the first eight bytes of each value of a string variable are used in distinguishing among values. Thus, if two values of a string variable are identical for the first eight characters, the values are treated as though they were the same.

Related Topics

COXREG
Overview (COXREG command)
Examples (COXREG command)
VARIABLES Subcommand (COXREG command)
STATUS Subcommand (COXREG command)
STRATA Subcommand (COXREG command)
CONTRAST Subcommand (COXREG command)
METHOD Subcommand (COXREG command)
MISSING Subcommand (COXREG command)
PRINT Subcommand (COXREG command)
CRITERIA Subcommand (COXREG command)
PLOT Subcommand (COXREG command)
PATTERN Subcommand (COXREG command)
OUTFILE Subcommand (COXREG command)
SAVE Subcommand (COXREG command)
EXTERNAL Subcommand (COXREG command)


CONTRAST Subcommand (COXREG command)

COXREG (command),COXREG (command),COXREG (command)
contrasts,contrasts,contrasts
COXREG (command),COXREG (command),COXREG (command)
CONTRAST subcommand,CONTRAST subcommand,CONTRAST subcommand
CONTRAST (subcommand),CONTRAST (subcommand),CONTRAST (subcommand)
COXREG command,COXREG command,COXREG command

CONTRAST specifies the type of contrast used for categorical covariates. The interpretation of the regression coefficients for categorical covariates depends on the contrasts used. The default is DEVIATION. For illustration of contrast types, see the appendix.

• The categorical covariate is specified in parentheses following CONTRAST.

• If the categorical variable has n values, there will be n−1 rows in the contrast matrix. Each contrast matrix is treated as a set of independent variables in the analysis.

• Only one variable can be specified per CONTRAST subcommand, but multiple CONTRAST subcommands can be specified.

• You can specify one of the contrast keywords in parentheses following the variable specification to request a specific contrast type.

The following contrast types are available:

deviation contrasts,deviation contrasts,deviation contrasts
COXREG command,COXREG command,COXREG command
DEVIATION (keyword),DEVIATION (keyword),DEVIATION (keyword)
COXREG command,COXREG command,COXREG command
simple contrasts,simple contrasts,simple contrasts
COXREG command,COXREG command,COXREG command
SIMPLE (keyword),SIMPLE (keyword),SIMPLE (keyword)
COXREG command,COXREG command,COXREG command
difference contrasts,difference contrasts,difference contrasts
COXREG command,COXREG command,COXREG command
DIFFERENCE (keyword),DIFFERENCE (keyword),DIFFERENCE (keyword)
COXREG command,COXREG command,COXREG command
Helmert contrasts,Helmert contrasts,Helmert contrasts
COXREG command,COXREG command,COXREG command
HELMERT (keyword),HELMERT (keyword),HELMERT (keyword)
COXREG command,COXREG command,COXREG command
polynomial contrasts,polynomial contrasts,polynomial contrasts
COXREG command,COXREG command,COXREG command
POLYNOMIAL (keyword),POLYNOMIAL (keyword),POLYNOMIAL (keyword)
COXREG command,COXREG command,COXREG command
repeated contrasts,repeated contrasts,repeated contrasts
COXREG command,COXREG command,COXREG command
REPEATED (keyword),REPEATED (keyword),REPEATED (keyword)
COXREG command,COXREG command,COXREG command
SPECIAL (keyword),SPECIAL (keyword),SPECIAL (keyword)
COXREG command,COXREG command,COXREG command
INDICATOR (keyword),INDICATOR (keyword),INDICATOR (keyword)
COXREG command,COXREG command,COXREG command
DEVIATION(refcat) | Deviations from the overall effect. This is the default. The effect for each category of the independent variable except one is compared to the overall effect. Refcat is the category for which parameter estimates are not displayed (they must be calculated from the others). By default, refcat is the last category. To omit a category other than the last, specify the sequence number of the omitted category (which is not necessarily the same as its value) in parentheses following the keyword DEVIATION.
SIMPLE(refcat) | Each category of the independent variable except the last is compared to the last category. To use a category other than the last as the omitted reference category, specify its sequence number (which is not necessarily the same as its value) in parentheses following the keyword SIMPLE.
DIFFERENCE | Difference or reverse Helmert contrasts. The effects for each category of the covariate except the first are compared to the mean effect of the previous categories.
HELMERT | Helmert contrasts. The effects for each category of the independent variable except the last are compared to the mean effects of subsequent categories.
POLYNOMIAL(metric) | Polynomial contrasts. The first degree of freedom contains the linear effect across the categories of the independent variable, the second contains the quadratic effect, and so on. By default, the categories are assumed to be equally spaced; unequal spacing can be specified by entering a metric consisting of one integer for each category of the independent variable in parentheses after the keyword POLYNOMIAL. For example, CONTRAST (STIMULUS) = POLYNOMIAL(1,2,4) indicates that the three levels of STIMULUS are actually in the proportion 1:2:4. The default metric is always (1,2,...,k), where k categories are involved. Only the relative differences between the terms of the metric matter: (1,2,4) is the same metric as (2,3,5) or (20,30,50) because, in each instance, the difference between the second and third numbers is twice the difference between the first and second.
REPEATED | Comparison of adjacent categories. Each category of the independent variable except the last is compared to the next category.
SPECIAL(matrix) | A user-defined contrast. After this keyword, a matrix is entered in parentheses with k−1 rows and k columns, where k is the number of categories of the independent variable. The rows of the contrast matrix contain the special contrasts indicating the desired comparisons between categories. If the special contrasts are linear combinations of each other, COXREG reports the linear dependency and stops processing. If k rows are entered, the first row is discarded and only the last k−1 rows are used as the contrast matrix in the analysis.
INDICATOR(refcat) | Indicator variables. Contrasts indicate the presence or absence of category membership. By default, refcat is the last category (represented in the contrast matrix as a row of zeros). To omit a category other than the last, specify the sequence number of the category (which is not necessarily the same as its value) in parentheses after the keyword INDICATOR.

Example

COXREG VARIABLES = SURVIVAL WITH GROUP
 /STATUS SURVSTA (1)
 /STRATA=LOCATION
 /CATEGORICAL = GROUP
 /CONTRAST(GROUP)=SPECIAL(2 -1 -1
                            0  1 -1).

• The specification of GROUP on CATEGORICAL replaces the variable with a set of contrast variables.

• GROUP identifies whether a case is in one of the three treatment groups.

• A SPECIAL type contrast is requested. A three-column, two-row contrast matrix is entered in parentheses.

Related Topics

COXREG
Overview (COXREG command)
Examples (COXREG command)
VARIABLES Subcommand (COXREG command)
STATUS Subcommand (COXREG command)
STRATA Subcommand (COXREG command)
CATEGORICAL Subcommand (COXREG command)
METHOD Subcommand (COXREG command)
MISSING Subcommand (COXREG command)
PRINT Subcommand (COXREG command)
CRITERIA Subcommand (COXREG command)
PLOT Subcommand (COXREG command)
PATTERN Subcommand (COXREG command)
OUTFILE Subcommand (COXREG command)
SAVE Subcommand (COXREG command)
EXTERNAL Subcommand (COXREG command)


METHOD Subcommand (COXREG command)

COXREG (command),COXREG (command),COXREG (command)
method,method,method
COXREG (command),COXREG (command),COXREG (command)
METHOD subcommand,METHOD subcommand,METHOD subcommand
METHOD (subcommand),METHOD (subcommand),METHOD (subcommand)
COXREG command,COXREG command,COXREG command

METHOD specifies the order of processing and the manner in which the covariates enter the model. If no METHOD subcommand is specified, the default method is ENTER.

• The subcommand keyword METHOD can be omitted.

• You can list all covariates to be used for the method on a variable list. If no variable list is specified, the default is ALL; all covariates named after WITH on the VARIABLES subcommand are used for the method.

• The keyword BY can be used between two variable names to specify an interaction term.

• Variables specified on CATEGORICAL are replaced by sets of contrast variables. The contrast variables associated with a categorical variable are entered or removed from the model together.

• Three keywords are available to specify how the model is to be built:

forced-entry method,forced-entry method,forced-entry method
COXREG command,COXREG command,COXREG command
ENTER (keyword),ENTER (keyword),ENTER (keyword)
COXREG command,COXREG command,COXREG command
forward selection,forward selection,forward selection
COXREG command,COXREG command,COXREG command
FSTEP (keyword),FSTEP (keyword),FSTEP (keyword)
COXREG command,COXREG command,COXREG command
backward elimination,backward elimination,backward elimination
COXREG command,COXREG command,COXREG command
BSTEP (keyword),BSTEP (keyword),BSTEP (keyword)
COXREG command,COXREG command,COXREG command
ENTER | Forced entry. All variables are entered in a single step. This is the default if the METHOD subcommand is omitted.
FSTEP | Forward stepwise. The covariates specified on FSTEP are tested for entry into the model one by one based on the significance level of the score statistic. The variable with the smallest significance less than PIN is entered into the model. After each entry, variables that are already in the model are tested for possible removal based on the significance of the Wald statistic, likelihood ratio, or conditional criterion. The variable with the largest probability greater than the specified POUT value is removed and the model is reestimated. Variables in the model are then again evaluated for removal. Once no more variables satisfy the removal criteria, covariates not in the model are evaluated for entry. Model building stops when no more variables meet entry or removal criteria, or when the current model is the same as a previous one.
BSTEP | Backward stepwise. As a first step, the covariates specified on BSTEP are entered into the model together and are tested for removal one by one. Stepwise removal and entry then follow the same process as described for FSTEP until no more variables meet entry and removal criteria, or when the current model is the same as a previous one.

• Multiple METHOD subcommands are allowed and are processed in the order in which they are specified. Each method starts with the results from the previous method. If BSTEP is used, all eligible variables are entered at the first step. All variables are then eligible for entry and removal unless they have been excluded from the METHOD variable list.

• The statistic used in the test for removal can be specified by an additional keyword in parentheses following FSTEP or BSTEP. If FSTEP or BSTEP is specified by itself, the default is COND.

conditional statistic,conditional statistic,conditional statistic
COXREG command,COXREG command,COXREG command
CONDITIONAL (keyword),CONDITIONAL (keyword),CONDITIONAL (keyword)
COXREG command,COXREG command,COXREG command
Wald statistic,Wald statistic,Wald statistic
COXREG command,COXREG command,COXREG command
WALD (keyword),WALD (keyword),WALD (keyword)
COXREG command,COXREG command,COXREG command
likelihood ratio,likelihood ratio,likelihood ratio
COXREG command,COXREG command,COXREG command
LR (keyword),LR (keyword),LR (keyword)
COXREG command,COXREG command,COXREG command
COND | Conditional statistic. This is the default if FSTEP or BSTEP is specified by itself
WALD | Wald statistic. The removal of a covariate from the model is based on the significance of the Wald statistic.
LR | Likelihood ratio. The removal of a covariate from the model is based on the significance of the change in the log-likelihood. If LR is specified, the model must be reestimated without each of the variables in the model. This can substantially increase computational time. However, the likelihood-ratio statistic is better than the Wald statistic for deciding which variables are to be removed.

Example

COXREG VARIABLES = SURVIVAL WITH GROUP SMOKE DRINK
 /STATUS SURVSTA (1)
 /CATEGORICAL = GROUP SMOKE DRINK
 /METHOD ENTER GROUP
 /METHOD BSTEP (LR) SMOKE DRINK SMOKE BY DRINK.

• GROUP, SMOKE, and DRINK are specified as covariates and as categorical variables.

• The first METHOD subcommand enters GROUP into the model.

• Variables in the model at the termination of the first METHOD subcommand are included in the model at the beginning of the second METHOD subcommand.

• The second METHOD subcommand adds SMOKE, DRINK, and the interaction of SMOKE with DRINK to the previous model.

• Backward stepwise regression analysis is then done using the likelihood-ratio statistic as the removal criterion. The variable GROUP is not eligible for removal because it was not specified on the BSTEP subcommand.

• The procedure continues until the removal of a variable will result in a decrease in the log-likelihood with a probability smaller than POUT.

Related Topics

COXREG
Overview (COXREG command)
Examples (COXREG command)
VARIABLES Subcommand (COXREG command)
STATUS Subcommand (COXREG command)
STRATA Subcommand (COXREG command)
CATEGORICAL Subcommand (COXREG command)
CONTRAST Subcommand (COXREG command)
MISSING Subcommand (COXREG command)
PRINT Subcommand (COXREG command)
CRITERIA Subcommand (COXREG command)
PLOT Subcommand (COXREG command)
PATTERN Subcommand (COXREG command)
OUTFILE Subcommand (COXREG command)
SAVE Subcommand (COXREG command)
EXTERNAL Subcommand (COXREG command)


MISSING Subcommand (COXREG command)

COXREG (command),COXREG (command),COXREG (command)
missing values,missing values,missing values
missing values,missing values,missing values
COXREG command,COXREG command,COXREG command
COXREG (command),COXREG (command),COXREG (command)
MISSING subcommand,MISSING subcommand,MISSING subcommand
MISSING (subcommand),MISSING (subcommand),MISSING (subcommand)
COXREG command,COXREG command,COXREG command

MISSING controls missing value treatments. If MISSING is omitted, the default is EXCLUDE.

• Cases with negative values on the dependent variable are automatically treated as missing and are excluded.

• To be included in the model, a case must have nonmissing values for the dependent, status, strata, and all independent variables specified on the COXREG command.

EXCLUDE (keyword),EXCLUDE (keyword),EXCLUDE (keyword)
COXREG command,COXREG command,COXREG command
INCLUDE (keyword),INCLUDE (keyword),INCLUDE (keyword)
COXREG command,COXREG command,COXREG command
EXCLUDE | Exclude user-missing values. User-missing values are treated as missing. This is the default if MISSING is omitted.
INCLUDE | Include user-missing values. User-missing values are included in the analysis.

Related Topics

COXREG
Overview (COXREG command)
Examples (COXREG command)
VARIABLES Subcommand (COXREG command)
STATUS Subcommand (COXREG command)
STRATA Subcommand (COXREG command)
CATEGORICAL Subcommand (COXREG command)
CONTRAST Subcommand (COXREG command)
METHOD Subcommand (COXREG command)
PRINT Subcommand (COXREG command)
CRITERIA Subcommand (COXREG command)
PLOT Subcommand (COXREG command)
PATTERN Subcommand (COXREG command)
OUTFILE Subcommand (COXREG command)
SAVE Subcommand (COXREG command)
EXTERNAL Subcommand (COXREG command)


PRINT Subcommand (COXREG command)

COXREG (command),COXREG (command),COXREG (command)
display options,display options,display options
COXREG (command),COXREG (command),COXREG (command)
PRINT subcommand,PRINT subcommand,PRINT subcommand
PRINT (subcommand),PRINT (subcommand),PRINT (subcommand)
COXREG command,COXREG command,COXREG command

By default, COXREG prints a full regression report for each step. You can use the PRINT subcommand to request specific output. If PRINT is not specified, the default is DEFAULT.

DEFAULT (keyword),DEFAULT (keyword),DEFAULT (keyword)
COXREG command,COXREG command,COXREG command
SUMMARY (keyword),SUMMARY (keyword),SUMMARY (keyword)
COXREG command,COXREG command,COXREG command
parameter estimates,parameter estimates,parameter estimates
COXREG command,COXREG command,COXREG command
CORR (keyword),CORR (keyword),CORR (keyword)
COXREG command,COXREG command,COXREG command
BASELINE (keyword),BASELINE (keyword),BASELINE (keyword)
COXREG command,COXREG command,COXREG command
confidence intervals,confidence intervals,confidence intervals
COXREG command,COXREG command,COXREG command
CI (keyword),CI (keyword),CI (keyword)
COXREG command,COXREG command,COXREG command
DEFAULT | Full regression output including overall model statistics and statistics for variables in the equation and variables not in the equation. This is the default when PRINT is omitted.
SUMMARY | Summary information. The output includes –2 log-likelihood for the initial model, one line of summary for each step, and the final model printed with full detail.
CORR | Correlation/covariance matrix of parameter estimates for the variables in the model.
BASELINE | Baseline table. For each stratum, a table is displayed showing the baseline cumulative hazard, as well as survival, standard error, and cumulative hazard evaluated at the covariate means for each observed time point in that stratum.
CI (value) | Confidence intervals foreβ. Specify the confidence level in parentheses. The requested intervals are displayed whenever a variables-in-equation table is printed. The default is 95%.
ALL | All available output.

Estimation histories showing the last 10 iterations are printed if the solution fails to converge.

Example

COXREG VARIABLES = SURVIVAL WITH GROUP
 /STATUS = SURVSTA (1)
 /STRATA = LOCATION
 /CATEGORICAL = GROUP
 /METHOD = ENTER
 /PRINT ALL.

PRINT requests summary information, a correlation matrix for parameter estimates, a baseline survival table for each stratum, and confidence intervals for eβ with each variables-in-equation table, in addition to the default output.

Related Topics

COXREG
Overview (COXREG command)
Examples (COXREG command)
VARIABLES Subcommand (COXREG command)
STATUS Subcommand (COXREG command)
STRATA Subcommand (COXREG command)
CATEGORICAL Subcommand (COXREG command)
CONTRAST Subcommand (COXREG command)
METHOD Subcommand (COXREG command)
MISSING Subcommand (COXREG command)
CRITERIA Subcommand (COXREG command)
PLOT Subcommand (COXREG command)
PATTERN Subcommand (COXREG command)
OUTFILE Subcommand (COXREG command)
SAVE Subcommand (COXREG command)
EXTERNAL Subcommand (COXREG command)


CRITERIA Subcommand (COXREG command)

COXREG (command),COXREG (command),COXREG (command)
iteration criteria,iteration criteria,iteration criteria
COXREG (command),COXREG (command),COXREG (command)
CRITERIA subcommand,CRITERIA subcommand,CRITERIA subcommand
CRITERIA (subcommand),CRITERIA (subcommand),CRITERIA (subcommand)
COXREG command,COXREG command,COXREG command

CRITERIA controls the statistical criteria used in building the Cox Regression models. The way in which these criteria are used depends on the method specified on the METHOD subcommand. The default criteria are noted in the description of each keyword below. Iterations will stop if any of the criteria for BCON, LCON, or ITERATE are satisfied.

BCON (keyword),BCON (keyword),BCON (keyword)
COXREG command,COXREG command,COXREG command
ITER (keyword),ITER (keyword),ITER (keyword)
COXREG command,COXREG command,COXREG command
LCON (keyword),LCON (keyword),LCON (keyword)
COXREG command,COXREG command,COXREG command
PIN (keyword),PIN (keyword),PIN (keyword)
COXREG command,COXREG command,COXREG command
POUT (keyword),POUT (keyword),POUT (keyword)
COXREG command,COXREG command,COXREG command
BCON(value) | Change in parameter estimates for terminating iteration. Alias PCON. Iteration terminates when the parameters change by less than the specified value. BCON defaults to 1E−4. To eliminate this criterion, specify a value of 0.
ITERATE(value) | Maximum number of iterations. If a solution fails to converge after the maximum number of iterations has been reached, COXREG displays an iteration history showing the last 10 iterations and terminates the procedure. The default for ITERATE is 20.
LCON(value) | Percentage change in the log-likelihood ratio for terminating iteration. If the log-likelihood decreases by less than the specified value, iteration terminates. LCON defaults to 1E−5. To eliminate this criterion, specify a value of 0.
PIN(value) | Probability of score statistic for variable entry. A variable whose significance level is greater than PIN cannot enter the model. The default for PIN is 0.05.
POUT(value) | Probability of Wald, LR, or conditional LR statistic to remove a variable. A variable whose significance is less than POUT cannot be removed. The default for POUT is 0.1.

Example

COXREG VARIABLES = SURVIVAL WITH GROUP AGE BP TMRSZ
 /STATUS = SURVSTA (1)
 /STRATA = LOCATION
 /CATEGORICAL = GROUP
 /METHOD BSTEP
 /CRITERIA BCON(0) ITERATE(10) PIN(0.01) POUT(0.05).

• A backward stepwise Cox Regression analysis is performed.

• CRITERIA alters four of the default statistical criteria that control the building of a model.

• Zero specified on BCON indicates that change in parameter estimates is not a criterion for termination. BCON can be set to 0 if only LCON and ITER are to be used.

• ITERATE specifies that the maximum number of iterations is 10. LCON is not changed and the default remains in effect. If either ITERATE or LCON is met, iterations will terminate.

• POUT requires that the probability of the statistic used to test whether a variable should remain in the model be smaller than 0.05. This is more stringent than the default value of 0.1.

• PIN requires that the probability of the score statistic used to test whether a variable should be included be smaller than 0.01. This makes it more difficult for variables to be included in the model than does the default PIN, which has a value of 0.05.

Related Topics

COXREG
Overview (COXREG command)
Examples (COXREG command)
VARIABLES Subcommand (COXREG command)
STATUS Subcommand (COXREG command)
STRATA Subcommand (COXREG command)
CATEGORICAL Subcommand (COXREG command)
CONTRAST Subcommand (COXREG command)
METHOD Subcommand (COXREG command)
MISSING Subcommand (COXREG command)
PRINT Subcommand (COXREG command)
PLOT Subcommand (COXREG command)
PATTERN Subcommand (COXREG command)
OUTFILE Subcommand (COXREG command)
SAVE Subcommand (COXREG command)
EXTERNAL Subcommand (COXREG command)


PLOT Subcommand (COXREG command)

COXREG (command),COXREG (command),COXREG (command)
plots,plots,plots
COXREG (command),COXREG (command),COXREG (command)
PLOT subcommand,PLOT subcommand,PLOT subcommand
PLOT (subcommand),PLOT (subcommand),PLOT (subcommand)
COXREG command,COXREG command,COXREG command

You can request specific plots to be produced with the PLOT subcommand. Each requested plot is produced once for each pattern specified on the PATTERN subcommand. If PLOT is not specified, the default is NONE (no plots are printed). Requested plots are displayed at the end of the final model.

• The set of plots requested is displayed for the functions at the mean of the covariates and at each combination of covariate values specified on PATTERN.

• If time-dependent covariates are included in the model, no plots are produced.

• Lines on a plot are connected as step functions.

NONE (keyword),NONE (keyword),NONE (keyword)
COXREG command,COXREG command,COXREG command
survival plots,survival plots,survival plots
COXREG command,COXREG command,COXREG command
SURVIVAL (keyword),SURVIVAL (keyword),SURVIVAL (keyword)
COXREG command,COXREG command,COXREG command
hazard plots,hazard plots,hazard plots
COXREG command,COXREG command,COXREG command
HAZARD (keyword),HAZARD (keyword),HAZARD (keyword)
COXREG command,COXREG command,COXREG command
LM (keyword),LM (keyword),LM (keyword)
COXREG command,COXREG command,COXREG command
log-minus-log plots,log-minus-log plots,log-minus-log plots
COXREG command,COXREG command,COXREG command
OMS (keyword),OMS (keyword),OMS (keyword)
COXREG command,COXREG command,COXREG command
one-minus-survival plots,one-minus-survival plots,one-minus-survival plots
COXREG command,COXREG command,COXREG command
NONE | Do not display plots.
SURVIVAL | Plot the cumulative survival distribution.
HAZARD | Plot the cumulative hazard function.
LML | Plot the log-minus-log-of-survival function.
OMS | Plot the one-minus-survival function.

Related Topics

COXREG
Overview (COXREG command)
Examples (COXREG command)
VARIABLES Subcommand (COXREG command)
STATUS Subcommand (COXREG command)
STRATA Subcommand (COXREG command)
CATEGORICAL Subcommand (COXREG command)
CONTRAST Subcommand (COXREG command)
METHOD Subcommand (COXREG command)
MISSING Subcommand (COXREG command)
PRINT Subcommand (COXREG command)
CRITERIA Subcommand (COXREG command)
PATTERN Subcommand (COXREG command)
OUTFILE Subcommand (COXREG command)
SAVE Subcommand (COXREG command)
EXTERNAL Subcommand (COXREG command)


PATTERN Subcommand (COXREG command)

COXREG (command),COXREG (command),COXREG (command)
plots,plots,plots
COXREG (command),COXREG (command),COXREG (command)
PATTERN subcommand,PATTERN subcommand,PATTERN subcommand
PATTERN (subcommand),PATTERN (subcommand),PATTERN (subcommand)
COXREG command,COXREG command,COXREG command

PATTERN specifies the pattern of covariate values to be used for the requested plots and coefficient tables.

• A value must be specified for each variable specified on PATTERN.

• Continuous variables that are included in the model but not named on PATTERN are evaluated at their means.

• Categorical variables that are included in the model but not named on PATTERN are evaluated at the means of the set of contrasts generated to replace them.

• You can request separate lines for each category of a variable that is in the model. Specify the name of the categorical variable after the keyword BY. The BY variable must be a categorical covariate. You cannot specify a value for the BY covariate.

• Multiple PATTERN subcommands can be specified. COXREG produces a set of requested plots for each specified pattern.

• PATTERN cannot be used when time-dependent covariates are included in the model.

Related Topics

COXREG
Overview (COXREG command)
Examples (COXREG command)
VARIABLES Subcommand (COXREG command)
STATUS Subcommand (COXREG command)
STRATA Subcommand (COXREG command)
CATEGORICAL Subcommand (COXREG command)
CONTRAST Subcommand (COXREG command)
METHOD Subcommand (COXREG command)
MISSING Subcommand (COXREG command)
PRINT Subcommand (COXREG command)
CRITERIA Subcommand (COXREG command)
PLOT Subcommand (COXREG command)
OUTFILE Subcommand (COXREG command)
SAVE Subcommand (COXREG command)
EXTERNAL Subcommand (COXREG command)


OUTFILE Subcommand (COXREG command)

COXREG (command),COXREG (command),COXREG (command)
OUTFILE subcommand,OUTFILE subcommand,OUTFILE subcommand
OUTFILE (subcommand),OUTFILE (subcommand),OUTFILE (subcommand)
COXREG command,COXREG command,COXREG command

OUTFILE writes data to an external PASW Statistics data file or a previously declared dataset (DATASET DECLARE command). COXREG writes two types of data files. You can specify the file type to be created with one of the two keywords, followed by a quoted file specification in parentheses. It also saves model information in XML format.

COEFF (keyword),COEFF (keyword),COEFF (keyword)
COXREG command,COXREG command,COXREG command
TABLE (keyword),TABLE (keyword),TABLE (keyword)
COXREG command,COXREG command,COXREG command
PARAMETER (keyword),PARAMETER (keyword),PARAMETER (keyword)
COXREG command,COXREG command,COXREG command
COEFF('savfile' | 'dataset')
 | Write a data file containing the coefficients from the final model.
TABLE('savfile' | 'dataset')
 | Write the survival table to a data file. The file contains cumulative survival, standard error, and cumulative hazard statistics for each uncensored time within each stratum evaluated at the baseline and at the mean of the covariates. Additional covariate patterns can be requested on PATTERN.
PARAMETER('file')
 | Write parameter estimates only to an XML file. SmartScore and PASW Statistics Server (a separate product) can use this model file to apply the model information to other data files for scoring purposes.

Related Topics

COXREG
Overview (COXREG command)
Examples (COXREG command)
VARIABLES Subcommand (COXREG command)
STATUS Subcommand (COXREG command)
STRATA Subcommand (COXREG command)
CATEGORICAL Subcommand (COXREG command)
CONTRAST Subcommand (COXREG command)
METHOD Subcommand (COXREG command)
MISSING Subcommand (COXREG command)
PRINT Subcommand (COXREG command)
CRITERIA Subcommand (COXREG command)
PLOT Subcommand (COXREG command)
PATTERN Subcommand (COXREG command)
SAVE Subcommand (COXREG command)
EXTERNAL Subcommand (COXREG command)


SAVE Subcommand (COXREG command)

COXREG (command),COXREG (command),COXREG (command)
saving new variables,saving new variables,saving new variables
COXREG (command),COXREG (command),COXREG (command)
SAVE subcommand,SAVE subcommand,SAVE subcommand
SAVE (subcommand),SAVE (subcommand),SAVE (subcommand)
COXREG command,COXREG command,COXREG command

SAVE saves the temporary variables created by COXREG. The temporary variables include:

SURVIVAL (keyword),SURVIVAL (keyword),SURVIVAL (keyword)
COXREG command,COXREG command,COXREG command
SE (keyword),SE (keyword),SE (keyword)
COXREG command,COXREG command,COXREG command
HAZARD (keyword),HAZARD (keyword),HAZARD (keyword)
COXREG command,COXREG command,COXREG command
LML (keyword),LML (keyword),LML (keyword)
COXREG command,COXREG command,COXREG command
DFBETA (keyword),DFBETA (keyword),DFBETA (keyword)
COXREG command,COXREG command,COXREG command
PRESID (keyword),PRESID (keyword),PRESID (keyword)
COXREG command,COXREG command,COXREG command
XBETA (keyword),XBETA (keyword),XBETA (keyword)
COXREG command,COXREG command,COXREG command
SURVIVAL | Survival function evaluated at the current case.
SE | Standard error of the survival function.
HAZARD | Cumulative hazard function evaluated at the current case. Alias RESID.
LML | Log-minus-log-of-survival function.
DFBETA | Change in the coefficient if the current case is removed. There is one DFBETA for each covariate in the final model. If there are time-dependent covariates, only DFBETA can be requested. Requests for any other temporary variable are ignored.
PRESID | Partial residuals. There is one residual variable for each covariate in the final model. If a covariate is not in the final model, the corresponding new variable has the system-missing value.
XBETA | Linear combination of mean corrected covariates times regression coefficients from the final model.

• To specify variable names for the new variables, assign the new names in parentheses following each temporary variable name.

• Assigned variable names must be unique in the active dataset. Scratch or system variable names cannot be used (that is, the variable names cannot begin with # or $).

• If new variable names are not specified, COXREG generates default names. The default name is composed of the first three characters of the name of the temporary variable (two for SE), followed by an underscore and a number to make it unique.

• A temporary variable can be saved only once on the same SAVE subcommand.

Example

COXREG VARIABLES = SURVIVAL WITH GROUP
 /STATUS = SURVSTA (1)
 /STRATA = LOCATION
 /CATEGORICAL = GROUP
 /METHOD = ENTER
 /SAVE SURVIVAL HAZARD.

COXREG saves cumulative survival and hazard in two new variables, SUR_1 and HAZ_1, provided that neither of the two names exists in the active dataset. If one does, the numeric suffixes will be incremented to make a distinction.

Related Topics

COXREG
Overview (COXREG command)
Examples (COXREG command)
VARIABLES Subcommand (COXREG command)
STATUS Subcommand (COXREG command)
STRATA Subcommand (COXREG command)
CATEGORICAL Subcommand (COXREG command)
CONTRAST Subcommand (COXREG command)
METHOD Subcommand (COXREG command)
MISSING Subcommand (COXREG command)
PRINT Subcommand (COXREG command)
CRITERIA Subcommand (COXREG command)
PLOT Subcommand (COXREG command)
PATTERN Subcommand (COXREG command)
OUTFILE Subcommand (COXREG command)
EXTERNAL Subcommand (COXREG command)


EXTERNAL Subcommand (COXREG command)

COXREG (command),COXREG (command),COXREG (command)
split-file processing,split-file processing,split-file processing
COXREG (command),COXREG (command),COXREG (command)
EXTERNAL subcommand,EXTERNAL subcommand,EXTERNAL subcommand
EXTERNAL (subcommand),EXTERNAL (subcommand),EXTERNAL (subcommand)
COXREG command,COXREG command,COXREG command

EXTERNAL specifies that the data for each split-file group should be held in an external scratch file during processing. This helps conserve working space when running analyses with large datasets.

• The EXTERNAL subcommand takes no other keyword and is specified by itself.

• If time-dependent covariates exist, external data storage is unavailable, and EXTERNAL is ignored.

Related Topics

COXREG
Overview (COXREG command)
Examples (COXREG command)
VARIABLES Subcommand (COXREG command)
STATUS Subcommand (COXREG command)
STRATA Subcommand (COXREG command)
CATEGORICAL Subcommand (COXREG command)
CONTRAST Subcommand (COXREG command)
METHOD Subcommand (COXREG command)
MISSING Subcommand (COXREG command)
PRINT Subcommand (COXREG command)
CRITERIA Subcommand (COXREG command)
PLOT Subcommand (COXREG command)
PATTERN Subcommand (COXREG command)
OUTFILE Subcommand (COXREG command)
SAVE Subcommand (COXREG command)


CREATE

CREATE (command),CREATE (command),CREATE (command)
CREATE (command),CREATE (command),CREATE (command)
syntax chart,syntax chart,syntax chart
CREATE new series={CSUM (series)                       }
                  {DIFF (series, order)                }
                  {FFT (series)                        }
                  {IFFT (series)                       }
                  {LAG (series, order [,order ])       }
                  {LEAD (series, order [,order ])      }
                  {MA (series, span [,minimum span])   }
                  {PMA (series, span)                  }
                  {RMED (series, span [,minimum span]) }
                  {SDIFF (series, order [,periodicity])}
                  {T4253H (series)                     }

[/new series=function (series {,span  {,minimum span}})]
                              {,order {,order       }}
                                      {,periodicity }

Function keywords:

CSUM | Cumulative sum
DIFF | Difference
FFT | Fast Fourier transform
IFFT | Inverse fast Fourier transform
LAG | Lag
LEAD | Lead
MA | Centered moving averages
PMA | Prior moving averages
RMED | Running medians
SDIFF | Seasonal difference
T4253H | Smoothing

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See CREATE Algorithms for computational details for this procedure.

Syntax for the CREATE command can be generated from the Create Time Series dialog.

Example

CREATE NEWVAR1 NEWVAR2 = CSUM(TICKETS RNDTRP).

Related Topics

Overview (CREATE command)
Examples (CREATE command)
CSUM Function (CREATE command)
DIFF Function (CREATE command)
FFT Function (CREATE command)
IFFT Function (CREATE command)
LAG Function (CREATE command)
LEAD Function (CREATE command)
MA Function (CREATE command)
PMA Function (CREATE command)
RMED Function (CREATE command)
SDIFF Function (CREATE command)
T4253H Function (CREATE command)
References (CREATE command)


Overview (CREATE command)

CREATE produces new series as a function of existing series. You can also use CREATE to replace the values of existing series.

CREATE displays a list of the new series, the case numbers of the first and last nonmissing cases, the number of valid cases, and the functions used to create the variables.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is a new series name, an equals sign, a function, and the existing series, along with any additional specifications needed.

Syntax Rules Collapse Hide details

Syntax Rules

• The existing series together with any additional specifications (order, span, or periodicity) must be enclosed in parentheses.

• The equals sign is required.

• Series names and additional specifications must be separated by commas or spaces.

• You can specify only one function per equation.

• You can create more than one new series per equation by specifying more than one new series name on the left side of the equation and either multiple existing series names or multiple orders on the right.

• The number of new series named on the left side of the equation must equal the number of series created on the right. Note that the FFT function creates two new series for each existing series, and IFFT creates one series from two existing series.

• You can specify more than one equation on a CREATE command. Equations are separated by slashes.

• A newly created series can be specified in subsequent equations on the same CREATE command.

Operations Collapse Hide details

Operations

• Each new series created is added to the active dataset.

• If the new series named already exist, their values are replaced.

• If the new series named do not already exist, they are created.

• Series are created in the order in which they are specified on the CREATE command.

• If multiple series are created by a single equation, the first new series named is assigned the values of the first series created, the second series named is assigned the values of the second series created, and so on.

• CREATE automatically generates a variable label for each new series describing the function and series used to create it.

• The format of the new series is based on the function specified and the format of the existing series.

• CREATE honors the TSET MISSING setting that is currently in effect.

• CREATE does not honor the USE command.

• When an even-length span is specified for the functions MA and RMED, the centering algorithm uses an average of two spans of the specified length. The first span ranges from span/2 cases before the current observation to the span length. The second span ranges from (span/2)−1 cases before the current observation to the span length.

Limitations Collapse Hide details

Limitations

• A maximum of 1 function per equation.

• There is no limit on the number of series created by an equation.

• There is no limit on the number of equations.

Related Topics

CREATE
Examples (CREATE command)
CSUM Function (CREATE command)
DIFF Function (CREATE command)
FFT Function (CREATE command)
IFFT Function (CREATE command)
LAG Function (CREATE command)
LEAD Function (CREATE command)
MA Function (CREATE command)
PMA Function (CREATE command)
RMED Function (CREATE command)
SDIFF Function (CREATE command)
T4253H Function (CREATE command)
References (CREATE command)


Examples (CREATE command)

CREATE NEWVAR1 = DIFF(OLDVAR,1).

• In this example, the series NEWVAR1 is created by taking the first-order difference of OLDVAR.

Related Topics

CREATE
Overview (CREATE command)
CSUM Function (CREATE command)
DIFF Function (CREATE command)
FFT Function (CREATE command)
IFFT Function (CREATE command)
LAG Function (CREATE command)
LEAD Function (CREATE command)
MA Function (CREATE command)
PMA Function (CREATE command)
RMED Function (CREATE command)
SDIFF Function (CREATE command)
T4253H Function (CREATE command)
References (CREATE command)


CSUM Function (CREATE command)

functions,functions,functions
time series,time series,time series
time series functions,time series functions,time series functions
CSUM (function),CSUM (function),CSUM (function)
CREATE command,CREATE command,CREATE command
CREATE (command),CREATE (command),CREATE (command)
CSUM function,CSUM function,CSUM function
cumulative sum function,cumulative sum function,cumulative sum function

CSUM produces new series based on the cumulative sums of the existing series. Cumulative sums are the inverse of first-order differencing.

• The only specification on CSUM is the name or names of the existing series in parentheses.

• Cases with missing values in the existing series are not used to compute values for the new series. The values of these cases are system-missing in the new series.

Example

CREATE NEWVAR1 NEWVAR2 = CSUM(TICKETS RNDTRP).

• This example produces a new series called NEWVAR1, which is the cumulative sum of the series TICKETS, and a new series called NEWVAR2, which is the cumulative sum of the series RNDTRP.

Related Topics

CREATE
Overview (CREATE command)
Examples (CREATE command)
DIFF Function (CREATE command)
FFT Function (CREATE command)
IFFT Function (CREATE command)
LAG Function (CREATE command)
LEAD Function (CREATE command)
MA Function (CREATE command)
PMA Function (CREATE command)
RMED Function (CREATE command)
SDIFF Function (CREATE command)
T4253H Function (CREATE command)
References (CREATE command)


DIFF Function (CREATE command)

CREATE (command),CREATE (command),CREATE (command)
DIFF function,DIFF function,DIFF function
DIFF (function),DIFF (function),DIFF (function)
CREATE command,CREATE command,CREATE command
difference function,difference function,difference function

DIFF produces new series based on nonseasonal differences of existing series.

• The specification on DIFF is the name or names of the existing series and the degree of differencing, in parentheses.

• The degree of differencing must be specified; there is no default.

• Since one observation is lost for each order of differencing, system-missing values will appear at the beginning of the new series.

• You can specify only one degree of differencing per DIFF function.

• If either of the pair of values involved in a difference computation is missing, the result is set to system-missing in the new series.

Example

CREATE ADIF2 = DIFF(VARA,2) /
       YDIF1 ZDIF1 = DIFF(VARY VARZ,1).

• The series ADIF2 is created by differencing VARA twice.

• The series YDIF1 is created by differencing VARY once.

• The series ZDIF1 is created by differencing VARZ once.

Related Topics

CREATE
Overview (CREATE command)
Examples (CREATE command)
CSUM Function (CREATE command)
FFT Function (CREATE command)
IFFT Function (CREATE command)
LAG Function (CREATE command)
LEAD Function (CREATE command)
MA Function (CREATE command)
PMA Function (CREATE command)
RMED Function (CREATE command)
SDIFF Function (CREATE command)
T4253H Function (CREATE command)
References (CREATE command)


FFT Function (CREATE command)

CREATE (command),CREATE (command),CREATE (command)
FFT function,FFT function,FFT function
FFT (function),FFT (function),FFT (function)
CREATE command,CREATE command,CREATE command
Fourier transformation function,Fourier transformation function,Fourier transformation function

FFT produces new series based on fast Fourier transformations of existing series (Brigham, 1974).

• The only specification on FFT is the name or names of the existing series in parentheses.

• FFT creates two series, the cosine and sine parts (also called real and imaginary parts), for each existing series named. Thus, you must specify two new series names on the left side of the equation for each existing series specified on the right side.

• The first new series named becomes the real series, and the second new series named becomes the imaginary series.

• The existing series cannot have embedded missing values.

• The existing series must be of even length. If an odd-length series is specified, FFT pads it with a 0 to make it even. Alternatively, you can make the series even by adding or dropping an observation.

• The new series will be only half as long as the existing series. The remaining cases are assigned the system-missing value.

Example

CREATE A B = FFT(C).

• Two series, A (real) and B (imaginary), are created by applying a fast Fourier transformation to series C.

Related Topics

CREATE
Overview (CREATE command)
Examples (CREATE command)
CSUM Function (CREATE command)
DIFF Function (CREATE command)
IFFT Function (CREATE command)
LAG Function (CREATE command)
LEAD Function (CREATE command)
MA Function (CREATE command)
PMA Function (CREATE command)
RMED Function (CREATE command)
SDIFF Function (CREATE command)
T4253H Function (CREATE command)
References (CREATE command)


IFFT Function (CREATE command)

CREATE (command),CREATE (command),CREATE (command)
IFFT function,IFFT function,IFFT function
IFFT (function),IFFT (function),IFFT (function)
CREATE command,CREATE command,CREATE command
inverse Fourier transformation function,inverse Fourier transformation function,inverse Fourier transformation function
Fourier transformation function,Fourier transformation function,Fourier transformation function
inverse,inverse,inverse

IFFT produces new series based on the inverse Fourier transformation of existing series.

• The only specification on IFFT is the name or names of the existing series in parentheses.

• IFFT needs two existing series to compute each new series. Thus, you must specify two existing series names on the right side of the equation for each new series specified on the left.

• The first existing series specified is the real series and the second series is the imaginary series.

• The existing series cannot have embedded missing values.

• The new series will be twice as long as the existing series. Thus, the last half of each existing series must be system-missing to allow enough room to create the new series.

Example

CREATE C = IFFT(A B).

• This command creates one new series, C, from the series A (real) and B (imaginary).

Related Topics

CREATE
Overview (CREATE command)
Examples (CREATE command)
CSUM Function (CREATE command)
DIFF Function (CREATE command)
FFT Function (CREATE command)
LAG Function (CREATE command)
LEAD Function (CREATE command)
MA Function (CREATE command)
PMA Function (CREATE command)
RMED Function (CREATE command)
SDIFF Function (CREATE command)
T4253H Function (CREATE command)
References (CREATE command)


LAG Function (CREATE command)

CREATE (command),CREATE (command),CREATE (command)
LAG function,LAG function,LAG function
LAG (function),LAG (function),LAG (function)
CREATE command,CREATE command,CREATE command
LAG (function),LAG (function),LAG (function)

LAG creates new series by copying the values of the existing series and moving them forward the specified number of observations. This number is called the lag order. The table below shows a first-order lag for a hypothetical dataset.

• The specification on LAG is the name or names of the existing series and one or two lag orders, in parentheses.

• At least one lag order must be specified; there is no default.

• Two lag orders indicate a range. For example, 2,6 indicates lag orders two through six. A new series is created for each lag order in the range.

• The number of new series specified must equal the number of existing series specified times the number of lag orders in the range.

• The first n cases at the beginning of the new series, where n is the lag order, are assigned the system-missing value.

• Missing values in the existing series are lagged and are assigned the system-missing value in the new series.

• A first-order lagged series can also be created using COMPUTE. COMPUTE does not cause a data pass (see COMPUTE).

First-order lag and lead of series X
X | Lag | Lead
198 | . | 220
220 | 198 | 305
305 | 220 | 470
470 | 305 | .

Example

CREATE LAGVAR2 TO LAGVAR5 = LAG(VARA,2,5).

• Four new variables are created based on lags on VARA. LAGVAR2 is VARA lagged two steps, LAGVAR3 is VARA lagged three steps, LAGVAR4 is VARA lagged four steps, and LAGVAR5 is VARA lagged five steps.

Related Topics

CREATE
Overview (CREATE command)
Examples (CREATE command)
CSUM Function (CREATE command)
DIFF Function (CREATE command)
FFT Function (CREATE command)
IFFT Function (CREATE command)
LEAD Function (CREATE command)
MA Function (CREATE command)
PMA Function (CREATE command)
RMED Function (CREATE command)
SDIFF Function (CREATE command)
T4253H Function (CREATE command)
References (CREATE command)


LEAD Function (CREATE command)

CREATE (command),CREATE (command),CREATE (command)
LEAD function,LEAD function,LEAD function
LEAD (function),LEAD (function),LEAD (function)
CREATE command,CREATE command,CREATE command
lead function,lead function,lead function

LEAD creates new series by copying the values of the existing series and moving them back the specified number of observations. This number is called the lead order.

• The specification on LEAD is the name or names of the existing series and one or two lead orders, in parentheses.

• At least one lead order must be specified; there is no default.

• Two lead orders indicate a range. For example, 1,5 indicates lead orders one through five. A new series is created for each lead order in the range.

• The number of new series must equal the number of existing series specified times the number of lead orders in the range.

• The last n cases at the end of the new series, where n equals the lead order, are assigned the system-missing value.

• Missing values in the existing series are moved back and are assigned the system-missing value in the new series.

Example

CREATE LEAD1 TO LEAD4 = LEAD(VARA,1,4).

• Four new series are created based on leads of VARA. LEAD1 is VARA led one step, LEAD2 is VARA led two steps, LEAD3 is VARA led three steps, and LEAD4 is VARA led four steps.

Related Topics

CREATE
Overview (CREATE command)
Examples (CREATE command)
CSUM Function (CREATE command)
DIFF Function (CREATE command)
FFT Function (CREATE command)
IFFT Function (CREATE command)
LAG Function (CREATE command)
MA Function (CREATE command)
PMA Function (CREATE command)
RMED Function (CREATE command)
SDIFF Function (CREATE command)
T4253H Function (CREATE command)
References (CREATE command)


MA Function (CREATE command)

CREATE (command),CREATE (command),CREATE (command)
MA function,MA function,MA function
MA (function),MA (function),MA (function)
CREATE command,CREATE command,CREATE command
prior moving average function,prior moving average function,prior moving average function
moving averages,moving averages,moving averages
centered moving average function,centered moving average function,centered moving average function

MA produces new series based on the centered moving averages of existing series.

• The specification on MA is the name or names of the existing series and the span to be used in averaging, in parentheses.

• A span must be specified; there is no default.

• If the specified span is odd, the MA is naturally associated with the middle term. If the specified span is even, the MA is centered by averaging each pair of uncentered means (Velleman and Hoaglin, 1981).

• After the initial span, a second span can be specified to indicate the minimum number of values to use in averaging when the number specified for the initial span is unavailable. This makes it possible to produce nonmissing values at or near the ends of the new series.

• The second span must be greater than or equal to 1 and less than or equal to the first span.

• The second span should be even (or 1) if the first span is even; it should be odd if the first span is odd. Otherwise, the next higher span value will be used.

• If no second span is specified, the minimum span is simply the value of the first span.

• If the number of values specified for the span or the minimum span is not available, the case in the new series is set to system-missing. Thus, unless a minimum span of 1 is specified, the endpoints of the new series will contain system-missing values.

• When MA encounters an embedded missing value in the existing series, it creates two subsets, one containing cases before the missing value and one containing cases after the missing value. Each subset is treated as a separate series for computational purposes.

• The endpoints of these subset series will have missing values according to the rules described above for the endpoints of the entire series. Thus, if the minimum span is 1, the endpoints of the subsets will be nonmissing; the only cases that will be missing in the new series are cases that were missing in the original series.

Example

CREATE TICKMA = MA(TICKETS,4,2).

• This example creates the series TICKMA based on centered moving average values of the series TICKETS.

• A span of 4 is used for computing averages. At the endpoints, where four values are not available, the average is based on the specified minimum of two values.

Related Topics

CREATE
Overview (CREATE command)
Examples (CREATE command)
CSUM Function (CREATE command)
DIFF Function (CREATE command)
FFT Function (CREATE command)
IFFT Function (CREATE command)
LAG Function (CREATE command)
LEAD Function (CREATE command)
PMA Function (CREATE command)
RMED Function (CREATE command)
SDIFF Function (CREATE command)
T4253H Function (CREATE command)
References (CREATE command)


PMA Function (CREATE command)

CREATE (command),CREATE (command),CREATE (command)
PMA function,PMA function,PMA function
PMA (function),PMA (function),PMA (function)
CREATE command,CREATE command,CREATE command
prior moving average function,prior moving average function,prior moving average function

PMA creates new series based on the prior moving averages of existing series. The prior moving average for each case in the original series is computed by averaging the values of a span of cases preceding it.

• The specification on PMA is the name or names of the existing series and the span to be used, in parentheses.

• Only one span can be specified and it is required. There is no default span.

• If the number of values specified for the span is not available, the case is set to system-missing. Thus, the number of cases with system-missing values at the beginning of the new series equals the number specified for the span.

• When PMA encounters an imbedded missing value in the existing series, it creates two subsets, one containing cases before the missing value and one containing cases after the missing value. Each subset is treated as a separate series for computational purposes. The first n cases in the second subset will be system-missing, where n is the span.

Example

CREATE PRIORA = PMA(VARA,3).

• This command creates the series PRIORA by computing prior moving averages for the series VARA. Since the span is 3, the first three cases in the series PRIORA are system-missing. The fourth case equals the average of cases 1, 2, and 3 of VARA, the fifth case equals the average of cases 2, 3, and 4 of VARA, and so on.

Related Topics

CREATE
Overview (CREATE command)
Examples (CREATE command)
CSUM Function (CREATE command)
DIFF Function (CREATE command)
FFT Function (CREATE command)
IFFT Function (CREATE command)
LAG Function (CREATE command)
LEAD Function (CREATE command)
MA Function (CREATE command)
RMED Function (CREATE command)
SDIFF Function (CREATE command)
T4253H Function (CREATE command)
References (CREATE command)


RMED Function (CREATE command)

CREATE (command),CREATE (command),CREATE (command)
RMED function,RMED function,RMED function
RMED (function),RMED (function),RMED (function)
CREATE command,CREATE command,CREATE command
centered running median function,centered running median function,centered running median function
running median function,running median function,running median function

RMED produces new series based on the centered running medians of existing series.

• The specification on RMED is the name or names of the existing series and the span to be used in finding the median, in parentheses.

• A span must be specified; there is no default.

• If the specified span is odd, RMED is naturally the middle term. If the specified span is even, the RMED is centered by averaging each pair of uncentered medians (Velleman and Hoaglin, 1981).

• After the initial span, a second span can be specified to indicate the minimum number of values to use in finding the median when the number specified for the initial span is unavailable. This makes it possible to produce nonmissing values at or near the ends of the new series.

• The second span must be greater than or equal to 1 and less than or equal to the first span.

• The second span should be even (or 1) if the first span is even; it should be odd if the first span is odd. Otherwise, the next higher span value will be used.

• If no second span is specified, the minimum span is simply the value of the first span.

• If the number of values specified for the span or the minimum span is not available, the case in the new series is set to system-missing. Thus, unless a minimum span of 1 is specified, the endpoints of the new series will contain system-missing values.

• When RMED encounters an imbedded missing value in the existing series, it creates two subsets, one containing cases before the missing value and one containing cases after the missing value. Each subset is treated as a separate series for computational purposes.

• The endpoints of these subset series will have missing values according to the rules described above for the endpoints of the entire series. Thus, if the minimum span is 1, the endpoints of the subsets will be nonmissing; the only cases that will be missing in the new series are cases that were missing in the original series.

Example

CREATE TICKRMED = RMED(TICKETS,4,2).

• This example creates the series TICKRMED using centered running median values of the series TICKETS.

• A span of 4 is used for computing medians. At the endpoints, where four values are not available, the median is based on the specified minimum of two values.

Related Topics

CREATE
Overview (CREATE command)
Examples (CREATE command)
CSUM Function (CREATE command)
DIFF Function (CREATE command)
FFT Function (CREATE command)
IFFT Function (CREATE command)
LAG Function (CREATE command)
LEAD Function (CREATE command)
MA Function (CREATE command)
PMA Function (CREATE command)
SDIFF Function (CREATE command)
T4253H Function (CREATE command)
References (CREATE command)


SDIFF Function (CREATE command)

CREATE (command),CREATE (command),CREATE (command)
SDIFF function,SDIFF function,SDIFF function
SDIFF (function),SDIFF (function),SDIFF (function)
CREATE command,CREATE command,CREATE command
seasonal difference function,seasonal difference function,seasonal difference function

SDIFF produces new series based on seasonal differences of existing series.

• The specification on SDIFF is the name or names of the existing series, the degree of differencing, and, optionally, the periodicity, all in parentheses.

• The degree of differencing must be specified; there is no default.

• Since the number of seasons used in the calculations decreases by 1 for each order of differencing, system-missing values will appear at the beginning of the new series.

• You can specify only one degree of differencing per SDIFF function.

• If no periodicity is specified, the periodicity established on TSET PERIOD is in effect. If TSET PERIOD has not been specified, the periodicity established on the DATE command is used. If periodicity was not established anywhere, the SDIFF function cannot be executed.

• If either of the pair of values involved in a seasonal difference computation is missing, the result is set to system-missing in the new series.

Example

CREATE SDVAR = SDIFF(VARA,1,12).

• The series SDVAR is created by applying one seasonal difference with a periodicity of 12 to the series VARA.

Related Topics

CREATE
Overview (CREATE command)
Examples (CREATE command)
CSUM Function (CREATE command)
DIFF Function (CREATE command)
FFT Function (CREATE command)
IFFT Function (CREATE command)
LAG Function (CREATE command)
LEAD Function (CREATE command)
MA Function (CREATE command)
PMA Function (CREATE command)
RMED Function (CREATE command)
T4253H Function (CREATE command)
References (CREATE command)


T4253H Function (CREATE command)

CREATE (command),CREATE (command),CREATE (command)
T4253H function,T4253H function,T4253H function
T4253H (function),T4253H (function),T4253H (function)
CREATE command,CREATE command,CREATE command
smoothing function,smoothing function,smoothing function
T4253H smoothing,T4253H smoothing,T4253H smoothing

T4253H produces new series by applying a compound data smoother to the original series. The smoother starts with a running median of 4, which is centered by a running median of 2. It then resmooths these values by applying a running median of 5, a running median of 3, and hanning (running weighted averages). Residuals are computed by subtracting the smoothed series from the original series. This whole process is then repeated on the computed residuals. Finally, the smoothed residuals are added to the smoothed values obtained the first time through the process (Velleman and Hoaglin, 1981).

• The only specification on T4253H is the name or names of the existing series in parentheses.

• The existing series cannot contain imbedded missing values.

• Endpoints are smoothed through extrapolation and are not system-missing.

Example

CREATE SMOOTHA = T4253H(VARA).

• The series SMOOTHA is a smoothed version of the series VARA.

Related Topics

CREATE
Overview (CREATE command)
Examples (CREATE command)
CSUM Function (CREATE command)
DIFF Function (CREATE command)
FFT Function (CREATE command)
IFFT Function (CREATE command)
LAG Function (CREATE command)
LEAD Function (CREATE command)
MA Function (CREATE command)
PMA Function (CREATE command)
RMED Function (CREATE command)
SDIFF Function (CREATE command)
References (CREATE command)


References (CREATE command)

Box, G. E. P., and G. M. Jenkins. 1976. Time series analysis: Forecasting and control, Rev. ed. San Francisco: Holden-Day.

Brigham, E. O. 1974. The fast Fourier transform. Englewood Cliffs, N.J.: Prentice-Hall.

Cryer, J. D. 1986. Time series analysis. Boston, Mass.: Duxbury Press.

Makridakis, S. G., S. C. Wheelwright, and R. J. Hyndman. 1997. Forecasting: Methods and applications, 3rd ed. ed. New York: John Wiley and Sons.

Monro, D. M. 1975. Algorithm AS 83: Complex discrete fast Fourier transform. Applied Statistics, 24, 153-160.

Monro, D. M., and J. L. Branch. 1977. Algorithm AS 117: The Chirp discrete Fourier transform of general length. Applied Statistics, 26, 351-361.

Velleman, P. F., and D. C. Hoaglin. 1981. Applications, basics, and computing of exploratory data analysis. Boston, Mass.: Duxbury Press.

Related Topics

CREATE
Overview (CREATE command)
Examples (CREATE command)
CSUM Function (CREATE command)
DIFF Function (CREATE command)
FFT Function (CREATE command)
IFFT Function (CREATE command)
LAG Function (CREATE command)
LEAD Function (CREATE command)
MA Function (CREATE command)
PMA Function (CREATE command)
RMED Function (CREATE command)
SDIFF Function (CREATE command)
T4253H Function (CREATE command)


CROSSTABS

CROSSTABS (command),CROSSTABS (command),CROSSTABS (command)
CROSSTABS (command),CROSSTABS (command),CROSSTABS (command)
syntax chart,syntax chart,syntax chart
crosstabulation,crosstabulation,crosstabulation

CROSSTABS is available in the Statistics Base option.

General mode:

CROSSTABS is available in the Statistics Base option.

CROSSTABS [TABLES=]varlist BY varlist [BY...] [/varlist...]

 [/MISSING={TABLE**}]
           {INCLUDE}

 [/WRITE[={NONE**}]]
          {CELLS }

Integer mode :

CROSSTABS VARIABLES=varlist(min,max) [varlist...]

 /TABLES=varlist BY varlist [BY...] [/varlist...]

 [/MISSING={TABLE**}]
           {INCLUDE}
           {REPORT }

 [/WRITE[={NONE**}]]
          {CELLS }
          {ALL   }

Both modes:

 [/FORMAT= {AVALUE**}  {TABLES**}]
           {DVALUE  }  {NOTABLES}

 [/COUNT = [{ASIS}] [{ROUND   }]
            {CASE}   {TRUNCATE}
            {CELL}

 [/CELLS=[{COUNT**}]  [ROW   ]  [EXPECTED]  [SRESID ]]
          {NONE   }   [COLUMN]  [RESID   ]  [ASRESID]
                      [TOTAL ]              [ALL    ]

 [/STATISTICS=[CHISQ]  [LAMBDA]  [BTAU ] [GAMMA  ]  [ETA    ]]
              [PHI  ]  [UC    ]  [CTAU ] [D      ]  [CORR   ]
              [CC   ]  [RISK  ]  [KAPPA] [MCNEMAR]  [CMH(1*)]
              [ALL  ]  [NONE  ]

 [/METHOD={MC [CIN({99.0 })] [SAMPLES({10000})]}]††
                   {value}            {value}
          {EXACT [TIMER({5    })]              }
                        {value}

 [/BARCHART]

**Default if the subcommand is omitted.

†† The METHOD subcommand is available only if the Exact Tests option is installed (available only on Windows operating systems).

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See CROSSTABS Algorithms for computational details for this procedure.

Syntax for the CROSSTABS command can be generated from the Crosstabs dialog.

Example

CROSSTABS TABLES=FEAR BY SEX
 /CELLS=ROW COLUMN EXPECTED RESIDUALS
 /STATISTICS=CHISQ.

Related Topics

Overview (CROSSTABS command)
Examples (CROSSTABS command)
VARIABLES Subcommand (CROSSTABS command)
TABLES Subcommand (CROSSTABS command)
General Mode (CROSSTABS command)
Integer Mode (CROSSTABS command)
CELLS Subcommand (CROSSTABS command)
STATISTICS Subcommand (CROSSTABS command)
METHOD Subcommand (CROSSTABS command)
MISSING Subcommand (CROSSTABS command)
FORMAT Subcommand (CROSSTABS command)
COUNT Subcommand (CROSSTABS command)
BARCHART Subcommand (CROSSTABS command)
WRITE Subcommand (CROSSTABS command)
Reading a CROSSTABS Procedure Output File (CROSSTABS command)
References (CROSSTABS command)


Overview (CROSSTABS command)

CROSSTABS (command),CROSSTABS (command),CROSSTABS (command)
limitations,limitations,limitations

CROSSTABS produces contingency tables showing the joint distribution of two or more variables that have a limited number of distinct values. The frequency distribution of one variable is subdivided according to the values of one or more variables. The unique combination of values for two or more variables defines a cell.

CROSSTABS can operate in two different modes: general and integer. Integer mode builds some tables more efficiently but requires more specifications than general mode. Some subcommand specifications and statistics are available only in integer mode.

Options Collapse Hide details

Options

Methods for Building Tables. To build tables in general mode, use the TABLES subcommand. Integer mode requires the TABLES and VARIABLES subcommands and minimum and maximum values for the variables.

Cell Contents. By default, CROSSTABS displays only the number of cases in each cell. You can request row, column, and total percentages, and also expected values and residuals, by using the CELLS subcommand.

Statistics. In addition to the tables, you can obtain measures of association and tests of hypotheses for each subtable using the STATISTICS subcommand.

Formatting Options. With the FORMAT subcommand, you can control the display order for categories in rows and columns of subtables and suppress crosstabulation.

Writing and Reproducing Tables. You can write cell frequencies to a file and reproduce the original tables with the WRITE subcommand.

Basic Specification Collapse Hide details

Basic Specification

In general mode, the basic specification is TABLES with a table list. The actual keyword TABLES can be omitted. In integer mode, the minimum specification is the VARIABLES subcommand, specifying the variables to be used and their value ranges, and the TABLES subcommand with a table list.

• The minimum table list specifies a list of row variables, the keyword BY, and a list of column variables.

• In integer mode, all variables must be numeric with integer values. In general mode, variables can be numeric (integer or non-integer) or string.

• The default table shows cell counts.

Subcommand Order Collapse Hide details

Subcommand Order

• In general mode, the table list must be first if the keyword TABLES is omitted. If the keyword TABLES is explicitly used, subcommands can be specified in any order.

• In integer mode, VARIABLES must precede TABLES. The keyword TABLES must be explicitly specified.

Operations Collapse Hide details

Operations

• Integer mode builds tables more quickly but requires more workspace if a table has many empty cells.

• Statistics are calculated separately for each two-way table or two-way subtable. Missing values are reported for the table as a whole.

• In general mode, the keyword TO on the TABLES subcommand refers to the order of variables in the active dataset. ALL refers to all variables in the active dataset. In integer mode, TO and ALL refer to the position and subset of variables specified on the VARIABLES subcommand.

Limitations Collapse Hide details

Limitations

The following limitations apply to CROSSTABS in general mode:

• A maximum of 200 variables named or implied on the TABLES subcommand

• A maximum of 1000 non-empty rows or columns for each table

• A maximum of 20 table lists per CROSSTABS command

• A maximum of 10 dimensions (9 BY keywords) per table

• A maximum of 400 value labels displayed on any single table

The following limitations apply to CROSSTABS in integer mode:

• A maximum of 100 variables named or implied on the VARIABLES subcommand

• A maximum of 100 variables named or implied on the TABLES subcommand

• A maximum of 1000 non-empty rows or columns for each table

• A maximum of 20 table lists per CROSSTABS command

• A maximum of 8 dimensions (7 BY keywords) per table

• A maximum of 20 rows or columns of missing values when REPORT is specified on MISSING

• The minimum value that can be specified is –99,999

• The maximum value that can be specified is 999,999

Related Topics

CROSSTABS
Examples (CROSSTABS command)
VARIABLES Subcommand (CROSSTABS command)
TABLES Subcommand (CROSSTABS command)
General Mode (CROSSTABS command)
Integer Mode (CROSSTABS command)
CELLS Subcommand (CROSSTABS command)
STATISTICS Subcommand (CROSSTABS command)
METHOD Subcommand (CROSSTABS command)
MISSING Subcommand (CROSSTABS command)
FORMAT Subcommand (CROSSTABS command)
COUNT Subcommand (CROSSTABS command)
BARCHART Subcommand (CROSSTABS command)
WRITE Subcommand (CROSSTABS command)
Reading a CROSSTABS Procedure Output File (CROSSTABS command)
References (CROSSTABS command)


Examples (CROSSTABS command)

Nominal by nominal relationships

CROSSTABS
  /TABLES=store  BY service
  /FORMAT= AVALUE TABLES
  /STATISTIC=CHISQ CC PHI LAMBDA UC
  /CELLS= COUNT .

• The procedure produces a crosstabulation table for store by service, with row and column variables displayed in ascending value.

• The CELLS subcommand specifies that only counts are displayed in the cells of the table.

• The STATISTICS subcommand requests a chi-square test and nominal-by-nominal measures of association .

For discussion of output from this syntax and to place the example in context, see Using Crosstabs to Study Nominal-by-Nominal Relationships .

Ordinal by ordinal relationships

CROSSTABS
  /TABLES=regular  BY overall
  /FORMAT= AVALUE TABLES
  /STATISTIC=D BTAU CTAU GAMMA
  /CELLS= COUNT .

• The procedure produces a crosstabulation table for regular by overall, with row and column variables displayed in ascending value.

• The CELLS subcommand specifies that only counts are displayed in the cells of the table.

• The STATISTICS subcommand requests measures of ordinal-by-ordinal association.

For discussion of output from this syntax and to place the example in context, see Using Crosstabs to Study Ordinal-by-Ordinal Relationships .

Relative risk

CROSSTABS
  /TABLES=news  BY response
  /FORMAT= AVALUE TABLES
  /STATISTIC= RISK
  /CELLS= COUNT ROW.

• The procedure produces a crosstabulation table for news by response, with row and column variables displayed in ascending value.

• The CELLS subcommand specifies that counts and row percentages are displayed in the cells of the table.

• The STATISTICS subcommand requests relative risk.

For discussion of output from this syntax and to place the example in context, see Using Crosstabs to Measure the Relative Risk of an Event .

Measuring agreement

CROSSTABS
  /TABLES=cons1  BY cons2
  /FORMAT= AVALUE TABLES
  /STATISTIC=KAPPA
  /CELLS= COUNT .

• The procedure produces a crosstabulation table for cons by cons2, with row and column variables displayed in ascending value.

• The CELLS subcommand specifies that only counts are displayed in the cells of the table.

• The STATISTICS subcommand requests the Kappa measure of agreement.

For discussion of output from this syntax and to place the example in context, see Using Crosstabs to Measure Agreement .

Related Topics

CROSSTABS
Overview (CROSSTABS command)
VARIABLES Subcommand (CROSSTABS command)
TABLES Subcommand (CROSSTABS command)
General Mode (CROSSTABS command)
Integer Mode (CROSSTABS command)
CELLS Subcommand (CROSSTABS command)
STATISTICS Subcommand (CROSSTABS command)
METHOD Subcommand (CROSSTABS command)
MISSING Subcommand (CROSSTABS command)
FORMAT Subcommand (CROSSTABS command)
COUNT Subcommand (CROSSTABS command)
BARCHART Subcommand (CROSSTABS command)
WRITE Subcommand (CROSSTABS command)
Reading a CROSSTABS Procedure Output File (CROSSTABS command)
References (CROSSTABS command)


VARIABLES Subcommand (CROSSTABS command)

CROSSTABS (command),CROSSTABS (command),CROSSTABS (command)
VARIABLES subcommand,VARIABLES subcommand,VARIABLES subcommand
VARIABLES (subcommand),VARIABLES (subcommand),VARIABLES (subcommand)
CROSSTABS command,CROSSTABS command,CROSSTABS command

The VARIABLES subcommand is required for integer mode. VARIABLES specifies a list of variables to be used in the crosstabulations and the lowest and highest values for each variable. Values are specified in parentheses and must be integers. Non-integer values are truncated.

• Variables can be specified in any order. However, the order in which they are named on VARIABLES determines their implied order on TABLES (see the TABLES subcommand below).

• A range must be specified for each variable. If several variables can have the same range, it can be specified once after the last variable to which it applies.

• CROSSTABS uses the specified ranges to allocate tables. One cell is allocated for each possible combination of values of the row and column variables before the data are read. Thus, if the specified ranges are larger than the actual ranges, workspace will be wasted.

• Cases with values outside the specified range are considered missing and are not used in the computation of the table. This allows you to select a subset of values within CROSSTABS.

• If the table is sparse because the variables do not have values throughout the specified range, consider using general mode or recoding the variables.

Example

CROSSTABS VARIABLES=FEAR SEX RACE (1,2) MOBILE16 (1,3)
   /TABLES=FEAR BY SEX MOBILE16 BY RACE.

• VARIABLES defines values 1 and 2 for FEAR, SEX, and RACE and values 1, 2, and 3 for MOBILE16.

Related Topics

CROSSTABS
Overview (CROSSTABS command)
Examples (CROSSTABS command)
TABLES Subcommand (CROSSTABS command)
General Mode (CROSSTABS command)
Integer Mode (CROSSTABS command)
CELLS Subcommand (CROSSTABS command)
STATISTICS Subcommand (CROSSTABS command)
METHOD Subcommand (CROSSTABS command)
MISSING Subcommand (CROSSTABS command)
FORMAT Subcommand (CROSSTABS command)
COUNT Subcommand (CROSSTABS command)
BARCHART Subcommand (CROSSTABS command)
WRITE Subcommand (CROSSTABS command)
Reading a CROSSTABS Procedure Output File (CROSSTABS command)
References (CROSSTABS command)


TABLES Subcommand (CROSSTABS command)

CROSSTABS (command),CROSSTABS (command),CROSSTABS (command)
TABLES subcommand,TABLES subcommand,TABLES subcommand
TABLES (subcommand),TABLES (subcommand),TABLES (subcommand)
CROSSTABS command,CROSSTABS command,CROSSTABS command

TABLES specifies the table lists and is required in both integer mode and general mode. The following rules apply to both modes:

• You can specify multiple TABLES subcommands on a single CROSSTABS command. The slash between the subcommands is required; the keyword TABLES is required only in integer mode.

BY (keyword),BY (keyword),BY (keyword)
CROSSTABS command,CROSSTABS command,CROSSTABS command

• Variables named before the first BY on a table list are row variables, and variables named after the first BY on a table list are column variables.

• When the table list specifies two dimensions (one BY keyword), the first variable before BY is crosstabulated with each variable after BY, then the second variable before BY with each variable after BY, and so on.

• Each subsequent use of the keyword BY on a table list adds a new dimension to the tables requested. Variables named after the second (or subsequent) BY are control variables.

• When the table list specifies more than two dimensions, a two-way subtable is produced for each combination of values of control variables. The value of the last specified control variable changes the most slowly in determining the order in which tables are displayed.

• You can name more than one variable in each dimension.

Related Topics

CROSSTABS
Overview (CROSSTABS command)
Examples (CROSSTABS command)
VARIABLES Subcommand (CROSSTABS command)
General Mode (CROSSTABS command)
Integer Mode (CROSSTABS command)
CELLS Subcommand (CROSSTABS command)
STATISTICS Subcommand (CROSSTABS command)
METHOD Subcommand (CROSSTABS command)
MISSING Subcommand (CROSSTABS command)
FORMAT Subcommand (CROSSTABS command)
COUNT Subcommand (CROSSTABS command)
BARCHART Subcommand (CROSSTABS command)
WRITE Subcommand (CROSSTABS command)
Reading a CROSSTABS Procedure Output File (CROSSTABS command)
References (CROSSTABS command)


General Mode (CROSSTABS command)

general mode,general mode,general mode
CROSSTABS command,CROSSTABS command,CROSSTABS command
CROSSTABS (command),CROSSTABS (command),CROSSTABS (command)
general mode,general mode,general mode

• The actual keyword TABLES can be omitted in general mode.

• In general mode, both numeric and string variables can be specified.

• The keywords ALL and TO can be specified in any dimension. In general mode, TO refers to the order of variables in the active dataset and ALL refers to all variables defined in the active dataset.

Example

CROSSTABS  TABLES=FEAR BY SEX BY RACE.

• This example crosstabulates FEAR by SEX controlling for RACE. In each subtable, FEAR is the row variable and SEX is the column variable.

• A subtable is produced for each value of the control variable RACE.

Example

CROSSTABS  TABLES=CONFINAN TO CONARMY BY SEX TO REGION.

• This command produces crosstabulations of all variables in the active dataset between and including CONFINAN and CONARMY by all variables between and including SEX and REGION.

Related Topics

CROSSTABS
Overview (CROSSTABS command)
Examples (CROSSTABS command)
VARIABLES Subcommand (CROSSTABS command)
TABLES Subcommand (CROSSTABS command)
Integer Mode (CROSSTABS command)
CELLS Subcommand (CROSSTABS command)
STATISTICS Subcommand (CROSSTABS command)
METHOD Subcommand (CROSSTABS command)
MISSING Subcommand (CROSSTABS command)
FORMAT Subcommand (CROSSTABS command)
COUNT Subcommand (CROSSTABS command)
BARCHART Subcommand (CROSSTABS command)
WRITE Subcommand (CROSSTABS command)
Reading a CROSSTABS Procedure Output File (CROSSTABS command)
References (CROSSTABS command)


Integer Mode (CROSSTABS command)

CROSSTABS (command),CROSSTABS (command),CROSSTABS (command)
integer mode,integer mode,integer mode
integer mode,integer mode,integer mode
CROSSTABS command,CROSSTABS command,CROSSTABS command

• In integer mode, variables specified on TABLES must first be named on VARIABLES.

• The keywords TO and ALL can be specified in any dimension. In integer mode, TO and ALL refer to the position and subset of variables specified on the VARIABLES subcommand, not to the variables in the active dataset.

Example

CROSSTABS  VARIABLES=FEAR (1,2) MOBILE16 (1,3)
  /TABLES=FEAR BY MOBILE16.

• VARIABLES names two variables, FEAR and MOBILE16. Values 1 and 2 for FEAR are used in the tables, and values 1, 2, and 3 are used for the variable MOBILE16.

• TABLES specifies a Crosstabulation table with two rows (values 1 and 2 for FEAR) and three columns (values 1, 2, and 3 for MOBILE16). FEAR and MOBILE16 can be named on TABLES because they were named on the previous VARIABLES subcommand.

Example

CROSSTABS  VARIABLES=FEAR SEX RACE DEGREE (1,2)
  /TABLES=FEAR BY SEX BY RACE BY DEGREE.

• This command produces four subtables. The first subtable crosstabulates FEAR by SEX, controlling for the first value of RACE and the first value of DEGREE; the second subtable controls for the second value of RACE and the first value of DEGREE; the third subtable controls for the first value of RACE and the second value of DEGREE; and the fourth subtable controls for the second value of RACE and the second value of DEGREE.

Related Topics

CROSSTABS
Overview (CROSSTABS command)
Examples (CROSSTABS command)
VARIABLES Subcommand (CROSSTABS command)
TABLES Subcommand (CROSSTABS command)
General Mode (CROSSTABS command)
CELLS Subcommand (CROSSTABS command)
STATISTICS Subcommand (CROSSTABS command)
METHOD Subcommand (CROSSTABS command)
MISSING Subcommand (CROSSTABS command)
FORMAT Subcommand (CROSSTABS command)
COUNT Subcommand (CROSSTABS command)
BARCHART Subcommand (CROSSTABS command)
WRITE Subcommand (CROSSTABS command)
Reading a CROSSTABS Procedure Output File (CROSSTABS command)
References (CROSSTABS command)


CELLS Subcommand (CROSSTABS command)

CROSSTABS (command),CROSSTABS (command),CROSSTABS (command)
residuals,residuals,residuals
CROSSTABS (command),CROSSTABS (command),CROSSTABS (command)
CELLS subcommand,CELLS subcommand,CELLS subcommand
CELLS (subcommand),CELLS (subcommand),CELLS (subcommand)
CROSSTABS command,CROSSTABS command,CROSSTABS command
CROSSTABS (command),CROSSTABS (command),CROSSTABS (command)
cell percentages,cell percentages,cell percentages
CROSSTABS (command),CROSSTABS (command),CROSSTABS (command)
expected count,expected count,expected count

By default, CROSSTABS displays only the number of cases in each cell of the Crosstabulation table. Use CELLS to display row, column, or total percentages, expected counts, or residuals. These are calculated separately for each Crosstabulation table or subtable.

• CELLS specified without keywords displays cell counts plus row, column, and total percentages for each cell.

• If CELLS is specified with keywords, CROSSTABS displays only the requested cell information.

• Scientific notation is used for cell contents when necessary.

COUNT (keyword),COUNT (keyword),COUNT (keyword)
CROSSTABS command,CROSSTABS command,CROSSTABS command
row percentages,row percentages,row percentages
CROSSTABS (command),CROSSTABS (command),CROSSTABS (command)
ROW (keyword),ROW (keyword),ROW (keyword)
CROSSTABS command,CROSSTABS command,CROSSTABS command
percentages,percentages,percentages
CROSSTABS command,CROSSTABS command,CROSSTABS command
COLUMN (keyword),COLUMN (keyword),COLUMN (keyword)
CROSSTABS command,CROSSTABS command,CROSSTABS command
column percentages,column percentages,column percentages
CROSSTABS (command),CROSSTABS (command),CROSSTABS (command)
TOTAL (keyword),TOTAL (keyword),TOTAL (keyword)
CROSSTABS command,CROSSTABS command,CROSSTABS command
EXPECTED (keyword),EXPECTED (keyword),EXPECTED (keyword)
CROSSTABS command,CROSSTABS command,CROSSTABS command
residuals,residuals,residuals
CROSSTABS command,CROSSTABS command,CROSSTABS command
RESID (keyword),RESID (keyword),RESID (keyword)
CROSSTABS command,CROSSTABS command,CROSSTABS command
SRESID (keyword),SRESID (keyword),SRESID (keyword)
CROSSTABS command,CROSSTABS command,CROSSTABS command
ASRESID (keyword),ASRESID (keyword),ASRESID (keyword)
CROSSTABS command,CROSSTABS command,CROSSTABS command
ALL (keyword),ALL (keyword),ALL (keyword)
CROSSTABS command,CROSSTABS command,CROSSTABS command
NONE (keyword),NONE (keyword),NONE (keyword)
CROSSTABS command,CROSSTABS command,CROSSTABS command
COUNT | Observed cell counts. This is the default if CELLS is omitted.
ROW | Row percentages. The number of cases in each cell in a row is expressed as a percentage of all cases in that row.
COLUMN | Column percentages. The number of cases in each cell in a column is expressed as a percentage of all cases in that column.
TOTAL | Two-way table total percentages. The number of cases in each cell of a subtable is expressed as a percentage of all cases in that subtable.
EXPECTED | Expected counts. Expected counts are the number of cases expected in each cell if the two variables in the subtable are statistically independent.
RESID | Residuals. Residuals are the difference between the observed and expected cell counts.
SRESID | Standardized residuals(Haberman, 1978).
ASRESID | Adjusted standardized residuals (Haberman, 1978).
ALL | All cell information. This includes cell counts; row, column, and total percentages; expected counts; residuals; standardized residuals; and adjusted standardized residuals.
NONE | No cell information. Use NONE when you want to write tables to a procedure output file without displaying them. See the topic WRITE Subcommand (CROSSTABS command) for more information. This is the same as specifying NOTABLES on FORMAT.

Related Topics

CROSSTABS
Overview (CROSSTABS command)
Examples (CROSSTABS command)
VARIABLES Subcommand (CROSSTABS command)
TABLES Subcommand (CROSSTABS command)
General Mode (CROSSTABS command)
Integer Mode (CROSSTABS command)
STATISTICS Subcommand (CROSSTABS command)
METHOD Subcommand (CROSSTABS command)
MISSING Subcommand (CROSSTABS command)
FORMAT Subcommand (CROSSTABS command)
COUNT Subcommand (CROSSTABS command)
BARCHART Subcommand (CROSSTABS command)
WRITE Subcommand (CROSSTABS command)
Reading a CROSSTABS Procedure Output File (CROSSTABS command)
References (CROSSTABS command)


STATISTICS Subcommand (CROSSTABS command)

CROSSTABS (command),CROSSTABS (command),CROSSTABS (command)
STATISTICS subcommand,STATISTICS subcommand,STATISTICS subcommand
STATISTICS (subcommand),STATISTICS (subcommand),STATISTICS (subcommand)
CROSSTABS command,CROSSTABS command,CROSSTABS command

STATISTICS requests measures of association and related statistics. By default, CROSSTABS does not display any additional statistics.

• STATISTICS without keywords displays the chi-square test.

• If STATISTICS is specified with keywords, CROSSTABS calculates only the requested statistics.

• In integer mode, values that are not included in the specified range are not used in the calculation of the statistics, even if these values exist in the data.

• If user-missing values are included with MISSING, cases with user-missing values are included in the calculation of statistics as well as in the tables.

likelihood-ratio chi-square,likelihood-ratio chi-square,likelihood-ratio chi-square
CROSSTABS command,CROSSTABS command,CROSSTABS command
Yates' correction for continuity,Yates' correction for continuity,Yates' correction for continuity
CROSSTABS command,CROSSTABS command,CROSSTABS command
chi-square,chi-square,chi-square
CROSSTABS command,CROSSTABS command,CROSSTABS command
CHISQ (keyword),CHISQ (keyword),CHISQ (keyword)
CROSSTABS command,CROSSTABS command,CROSSTABS command
Fisher's exact test,Fisher's exact test,Fisher's exact test
CROSSTABS command,CROSSTABS command,CROSSTABS command
Pearson chi-square,Pearson chi-square,Pearson chi-square
CROSSTABS command,CROSSTABS command,CROSSTABS command
Mantel-Haenszel statistic,Mantel-Haenszel statistic,Mantel-Haenszel statistic
CROSSTABS command,CROSSTABS command,CROSSTABS command
Cramér's V,Cramér's V,Cramér's V
CROSSTABS command,CROSSTABS command,CROSSTABS command
PHI (keyword),PHI (keyword),PHI (keyword)
CROSSTABS command,CROSSTABS command,CROSSTABS command
CC (keyword),CC (keyword),CC (keyword)
CROSSTABS command,CROSSTABS command,CROSSTABS command
contingency coefficient,contingency coefficient,contingency coefficient
CROSSTABS command,CROSSTABS command,CROSSTABS command
Goodman and Kruskal's lambda,Goodman and Kruskal's lambda,Goodman and Kruskal's lambda
CROSSTABS command,CROSSTABS command,CROSSTABS command
Goodman and Kruskal's tau,Goodman and Kruskal's tau,Goodman and Kruskal's tau
CROSSTABS command,CROSSTABS command,CROSSTABS command
LAMBDA (keyword),LAMBDA (keyword),LAMBDA (keyword)
CROSSTABS command,CROSSTABS command,CROSSTABS command
tau,tau,tau
CROSSTABS command,CROSSTABS command,CROSSTABS command
UC (keyword),UC (keyword),UC (keyword)
CROSSTABS command,CROSSTABS command,CROSSTABS command
uncertainty coefficient,uncertainty coefficient,uncertainty coefficient
CROSSTABS command,CROSSTABS command,CROSSTABS command
Kendall's tau-b,Kendall's tau-b,Kendall's tau-b
CROSSTABS command,CROSSTABS command,CROSSTABS command
BTAU (keyword),BTAU (keyword),BTAU (keyword)
CROSSTABS command,CROSSTABS command,CROSSTABS command
tau-b,tau-b,tau-b
CROSSTABS command,CROSSTABS command,CROSSTABS command
CTAU (keyword),CTAU (keyword),CTAU (keyword)
CROSSTABS command,CROSSTABS command,CROSSTABS command
Kendall's tau-c,Kendall's tau-c,Kendall's tau-c
CROSSTABS command,CROSSTABS command,CROSSTABS command
tau-c,tau-c,tau-c
CROSSTABS command,CROSSTABS command,CROSSTABS command
Goodman and Kruskal's gamma,Goodman and Kruskal's gamma,Goodman and Kruskal's gamma
CROSSTABS command,CROSSTABS command,CROSSTABS command
GAMMA (keyword),GAMMA (keyword),GAMMA (keyword)
CROSSTABS command,CROSSTABS command,CROSSTABS command
Somers' d,Somers' d,Somers' d
CROSSTABS command,CROSSTABS command,CROSSTABS command
D (keyword),D (keyword),D (keyword)
CROSSTABS command,CROSSTABS command,CROSSTABS command
ETA (keyword),ETA (keyword),ETA (keyword)
CROSSTABS command,CROSSTABS command,CROSSTABS command
Pearson correlation,Pearson correlation,Pearson correlation
CROSSTABS command,CROSSTABS command,CROSSTABS command
CORR (keyword),CORR (keyword),CORR (keyword)
CROSSTABS command,CROSSTABS command,CROSSTABS command
Spearman correlation coefficient,Spearman correlation coefficient,Spearman correlation coefficient
CROSSTABS command,CROSSTABS command,CROSSTABS command
Cohen's kappa,Cohen's kappa,Cohen's kappa
CROSSTABS command,CROSSTABS command,CROSSTABS command
KAPPA (keyword),KAPPA (keyword),KAPPA (keyword)
CROSSTABS command,CROSSTABS command,CROSSTABS command
RISK (keyword),RISK (keyword),RISK (keyword)
CROSSTABS command,CROSSTABS command,CROSSTABS command
relative risk,relative risk,relative risk
CROSSTABS command,CROSSTABS command,CROSSTABS command
Cohen's kappa,Cohen's kappa,Cohen's kappa
CROSSTABS command,CROSSTABS command,CROSSTABS command
McNemar test,McNemar test,McNemar test
CROSSTABS command,CROSSTABS command,CROSSTABS command
CMH (keyword),CMH (keyword),CMH (keyword)
CROSSTABS command,CROSSTABS command,CROSSTABS command
CROSSTABS (command),CROSSTABS (command),CROSSTABS (command)
CMH keyword,CMH keyword,CMH keyword
conditional independence test,conditional independence test,conditional independence test
CROSSTABS command,CROSSTABS command,CROSSTABS command
homogeneity tests,homogeneity tests,homogeneity tests
CROSSTABS command,CROSSTABS command,CROSSTABS command
Cochran's statistic,Cochran's statistic,Cochran's statistic
CROSSTABS command,CROSSTABS command,CROSSTABS command
Mantel-Haenszel statistic,Mantel-Haenszel statistic,Mantel-Haenszel statistic
CROSSTABS command,CROSSTABS command,CROSSTABS command
Breslow-Day statistic,Breslow-Day statistic,Breslow-Day statistic
CROSSTABS command,CROSSTABS command,CROSSTABS command
Tarone's statistic,Tarone's statistic,Tarone's statistic
CROSSTABS command,CROSSTABS command,CROSSTABS command
ALL (keyword),ALL (keyword),ALL (keyword)
CROSSTABS command,CROSSTABS command,CROSSTABS command
NONE (keyword),NONE (keyword),NONE (keyword)
CROSSTABS command,CROSSTABS command,CROSSTABS command
CHISQ | Display the Chi-Square Test table. Chi-square statistics include Pearson chi-square, likelihood-ratio chi-square, and Mantel-Haenszel chi-square (linear-by-linear association). Mantel-Haenszel is valid only if both variables are numeric. Fisher’s exact test and Yates’ corrected chi-square are computed for all 2 × 2 tables. This is the default if STATISTICS is specified with no keywords.
PHI | Display phi and Cramér’s V in the Symmetric Measures table.
CC | Display contingency coefficient in the Symmetric Measures table.
LAMBDA | Display lambda (symmetric and asymmetric) and Goodman and Kruskal’s tau in the Directional Measures table.
UC | Display uncertainty coefficient (symmetric and asymmetric) in the Directional Measures table.
BTAU | Display Kendall’s tau-b in the Symmetric Measures table.
CTAU | Display Kendall’s tau-c in the Symmetric Measures table.
GAMMA | Display gamma in the Symmetric Measures table or Zero-Order and Partial Gammas table. The Zero-Order and Partial Gammas table is produced only for tables with more than two variable dimensions in integer mode.
D | Display Somers’ d (symmetric and asymmetric) in the Directional Measures table.
ETA | Display eta in the Directional Measures table. Available for numeric data only.
CORR | Display Pearson’s r and Spearman’s correlation coefficient in the Symmetric Measures table. This is available for numeric data only.
KAPPA | Display kappa coefficient(Kraemer, 1982) in the Symmetric Measures table. Kappa can be computed only for square tables in which the row and column values are identical.
RISK | Display relative risk(Bishop, Feinberg, and Holland, 1975) in the Risk Estimate table. Relative risk can be calculated only for 2 x 2 tables.
MCNEMAR | Display a test of symmetry for square tables. The McNemar test is displayed for 2 x 2 tables, and the McNemar-Bowker test, for larger tables.
CMH(1*) | Conditional independence and homogeneity tests. Cochran’s and the Mantel-Haenszel statistics are computed for the test for conditional independence. The Breslow-Day and Tarone’s statistics are computed for the test for homogeneity. For each test, the chi-squared statistic with its degrees of freedom and asymptotic p value are computed. Mantel-Haenszel relative risk (common odds ratio) estimate. The Mantel-Haenszel relative risk (common odds ratio) estimate, the natural log of the estimate, the standard error of the natural log of the estimate, the asymptotic p value, and the asymptotic confidence intervals for common odds ratio and for the natural log of the common odds ratio are computed. The user can specify the null hypothesis for the common odds ratio in parentheses after the keyword. The passive default is 1. (The parameter value must be positive.)
ALL | All statistics available.
NONE | No summary statistics. This is the default if STATISTICS is omitted.

Related Topics

CROSSTABS
Overview (CROSSTABS command)
Examples (CROSSTABS command)
VARIABLES Subcommand (CROSSTABS command)
TABLES Subcommand (CROSSTABS command)
General Mode (CROSSTABS command)
Integer Mode (CROSSTABS command)
CELLS Subcommand (CROSSTABS command)
METHOD Subcommand (CROSSTABS command)
MISSING Subcommand (CROSSTABS command)
FORMAT Subcommand (CROSSTABS command)
COUNT Subcommand (CROSSTABS command)
BARCHART Subcommand (CROSSTABS command)
WRITE Subcommand (CROSSTABS command)
Reading a CROSSTABS Procedure Output File (CROSSTABS command)
References (CROSSTABS command)


METHOD Subcommand (CROSSTABS command)

CROSSTABS (command),CROSSTABS (command),CROSSTABS (command)
METHOD subcommand,METHOD subcommand,METHOD subcommand
CROSSTABS (command),CROSSTABS (command),CROSSTABS (command)
exact tests,exact tests,exact tests
METHOD (subcommand),METHOD (subcommand),METHOD (subcommand)
CROSSTABS command,CROSSTABS command,CROSSTABS command

METHOD displays additional results for each statistic requested. If no METHOD subcommand is specified, the standard asymptotic results are displayed. If fractional weights have been specified, results for all methods will be calculated on the weight rounded to the nearest integer. This subcommand is available only if you have the Exact Tests add-on option installed, which is only available on Windows operating systems.

MC (keyword),MC (keyword),MC (keyword)
CROSSTABS command,CROSSTABS command,CROSSTABS command
CIN (keyword),CIN (keyword),CIN (keyword)
CROSSTABS command,CROSSTABS command,CROSSTABS command
SAMPLES (keyword),SAMPLES (keyword),SAMPLES (keyword)
CROSSTABS command,CROSSTABS command,CROSSTABS command
EXACT (keyword),EXACT (keyword),EXACT (keyword)
CROSSTABS command,CROSSTABS command,CROSSTABS command
TIMER (keyword),TIMER (keyword),TIMER (keyword)
CROSSTABS command,CROSSTABS command,CROSSTABS command
MC | Displays an unbiased point estimate and confidence interval based on the Monte Carlo sampling method, for all statistics. Asymptotic results are also displayed. When exact results can be calculated, they will be provided instead of the Monte Carlo results.
CIN(n) | Controls the confidence level for the Monte Carlo estimate. CIN is available only when /METHOD=MC is specified. CIN has a default value of 99.0. You can specify a confidence interval between 0.01 and 99.9, inclusive.
SAMPLES | Specifies the number of tables sampled from the reference set when calculating the Monte Carlo estimate of the exact p value. Larger sample sizes lead to narrower confidence limits but also take longer to calculate. You can specify any integer between 1 and 1,000,000,000 as the sample size. SAMPLES has a default value of 10,000.
EXACT | Computes the exact significance level for all statistics in addition to the asymptotic results. EXACT and MC are mutually exclusive alternatives (you cannot specify both on the same command). Calculating the exact p value can be memory-intensive. If you have specified /METHOD=EXACT and find that you have insufficient memory to calculate results, you should first close any other applications that are currently running in order to make more memory available. You can also enlarge the size of your swap file (see your Windows documentation for more information). If you still cannot obtain exact results, specify /METHOD=MC to obtain the Monte Carlo estimate of the exact p value. An optional TIMER keyword is available if you choose /METHOD=EXACT.
TIMER(n) | Specifies the maximum number of minutes allowed to run the exact analysis for each statistic. If the time limit is reached, the test is terminated, no exact results are provided, and the program begins to calculate the next test in the analysis. TIMER is available only when /METHOD=EXACT is specified. You can specify any integer value for TIMER. Specifying a value of 0 for TIMER turns the timer off completely. TIMER has a default value of 5 minutes. If a test exceeds a time limit of 30 minutes, it is recommended that you use the Monte Carlo, rather than the exact, method.

Example

CROSSTABS TABLES=FEAR BY SEX
 /CELLS=ROW COLUMN EXPECTED RESIDUALS
 /STATISTICS=CHISQ
 /METHOD=MC SAMPLES(10000) CIN(95).

• This example requests chi-square statistics.

• An unbiased point estimate and confidence interval based on the Monte Carlo sampling method are displayed with the asymptotic results.

Related Topics

CROSSTABS
Overview (CROSSTABS command)
Examples (CROSSTABS command)
VARIABLES Subcommand (CROSSTABS command)
TABLES Subcommand (CROSSTABS command)
General Mode (CROSSTABS command)
Integer Mode (CROSSTABS command)
CELLS Subcommand (CROSSTABS command)
STATISTICS Subcommand (CROSSTABS command)
MISSING Subcommand (CROSSTABS command)
FORMAT Subcommand (CROSSTABS command)
COUNT Subcommand (CROSSTABS command)
BARCHART Subcommand (CROSSTABS command)
WRITE Subcommand (CROSSTABS command)
Reading a CROSSTABS Procedure Output File (CROSSTABS command)
References (CROSSTABS command)


MISSING Subcommand (CROSSTABS command)

CROSSTABS (command),CROSSTABS (command),CROSSTABS (command)
MISSING subcommand,MISSING subcommand,MISSING subcommand
MISSING (subcommand),MISSING (subcommand),MISSING (subcommand)
CROSSTABS command,CROSSTABS command,CROSSTABS command

By default, CROSSTABS deletes cases with missing values on a table-by-table basis. Cases with missing values for any variable specified for a table are not used in the table or in the calculation of statistics. Use MISSING to specify alternative missing-value treatments.

• The only specification is a single keyword.

• The number of missing cases is always displayed in the Case Processing Summary table.

• If the missing values are not included in the range specified on VARIABLES, they are excluded from the table regardless of the keyword you specify on MISSING.

TABLE (keyword),TABLE (keyword),TABLE (keyword)
CROSSTABS command,CROSSTABS command,CROSSTABS command
INCLUDE (keyword),INCLUDE (keyword),INCLUDE (keyword)
CROSSTABS command,CROSSTABS command,CROSSTABS command
REPORT (keyword),REPORT (keyword),REPORT (keyword)
CROSSTABS command,CROSSTABS command,CROSSTABS command
TABLE | Delete cases with missing values on a table-by-table basis. When multiple table lists are specified, missing values are handled separately for each list. This is the default.
INCLUDE | Include user-missing values.
REPORT | Report missing values in the tables. This option includes missing values in tables but not in the calculation of percentages or statistics. The missing status is indicated on the categorical label. REPORT is available only in integer mode.

Related Topics

CROSSTABS
Overview (CROSSTABS command)
Examples (CROSSTABS command)
VARIABLES Subcommand (CROSSTABS command)
TABLES Subcommand (CROSSTABS command)
General Mode (CROSSTABS command)
Integer Mode (CROSSTABS command)
CELLS Subcommand (CROSSTABS command)
STATISTICS Subcommand (CROSSTABS command)
METHOD Subcommand (CROSSTABS command)
FORMAT Subcommand (CROSSTABS command)
COUNT Subcommand (CROSSTABS command)
BARCHART Subcommand (CROSSTABS command)
WRITE Subcommand (CROSSTABS command)
Reading a CROSSTABS Procedure Output File (CROSSTABS command)
References (CROSSTABS command)


FORMAT Subcommand (CROSSTABS command)

CROSSTABS (command),CROSSTABS (command),CROSSTABS (command)
FORMAT subcommand,FORMAT subcommand,FORMAT subcommand
FORMAT (subcommand),FORMAT (subcommand),FORMAT (subcommand)
CROSSTABS command,CROSSTABS command,CROSSTABS command

By default, CROSSTABS displays tables and subtables. The values for the row and column variables are displayed in order from lowest to highest. Use FORMAT to modify the default table display.

AVALUE (keyword),AVALUE (keyword),AVALUE (keyword)
CROSSTABS command,CROSSTABS command,CROSSTABS command
DVALUE (keyword),DVALUE (keyword),DVALUE (keyword)
CROSSTABS command,CROSSTABS command,CROSSTABS command
TABLES (keyword),TABLES (keyword),TABLES (keyword)
CROSSTABS command,CROSSTABS command,CROSSTABS command
NOTABLES (keyword),NOTABLES (keyword),NOTABLES (keyword)
CROSSTABS command,CROSSTABS command,CROSSTABS command
suppressing tables,suppressing tables,suppressing tables
AVALUE | Display row and column variables from lowest to highest value. This is the default.
DVALUE | Display row variables from highest to lowest. This setting has no effect on column variables.
TABLES | Display tables. This is the default.
NOTABLES | Suppress Crosstabulation tables. NOTABLES is useful when you want to write tables to a file without displaying them or when you want only the Statistics table. This is the same as specifying NONE on CELLS.

Related Topics

CROSSTABS
Overview (CROSSTABS command)
Examples (CROSSTABS command)
VARIABLES Subcommand (CROSSTABS command)
TABLES Subcommand (CROSSTABS command)
General Mode (CROSSTABS command)
Integer Mode (CROSSTABS command)
CELLS Subcommand (CROSSTABS command)
STATISTICS Subcommand (CROSSTABS command)
METHOD Subcommand (CROSSTABS command)
MISSING Subcommand (CROSSTABS command)
COUNT Subcommand (CROSSTABS command)
BARCHART Subcommand (CROSSTABS command)
WRITE Subcommand (CROSSTABS command)
Reading a CROSSTABS Procedure Output File (CROSSTABS command)
References (CROSSTABS command)


COUNT Subcommand (CROSSTABS command)

CROSSTABS (command),CROSSTABS (command),CROSSTABS (command)
COUNT subcommand,COUNT subcommand,COUNT subcommand

The COUNT subcommand controls how case weights are handled.

ASIS (keyword),ASIS (keyword),ASIS (keyword)
CROSSTABS command,CROSSTABS command,CROSSTABS command
CASE (keyword),CASE (keyword),CASE (keyword)
CROSSTABS command,CROSSTABS command,CROSSTABS command
CELL (keyword),CELL (keyword),CELL (keyword)
CROSSTABS command,CROSSTABS command,CROSSTABS command
ROUND (keyword),ROUND (keyword),ROUND (keyword)
CROSSTABS command,CROSSTABS command,CROSSTABS command
TRUNCATE (keyword),TRUNCATE (keyword),TRUNCATE (keyword)
CROSSTABS command,CROSSTABS command,CROSSTABS command
ASIS | The case weights are used as is. However, when Exact Statistics are requested, the accumulated weights in the cells are either truncated or rounded before computing the Exact test statistics.
CASE | The case weights are either rounded or truncated before use.
CELL | The case weights are used as is but the accumulated weights in the cells are either truncated or rounded before computing any statistics.
ROUND | Performs Rounding operation.
TRUNCATE | Performs Truncation operation.

Related Topics

CROSSTABS
Overview (CROSSTABS command)
Examples (CROSSTABS command)
VARIABLES Subcommand (CROSSTABS command)
TABLES Subcommand (CROSSTABS command)
General Mode (CROSSTABS command)
Integer Mode (CROSSTABS command)
CELLS Subcommand (CROSSTABS command)
STATISTICS Subcommand (CROSSTABS command)
METHOD Subcommand (CROSSTABS command)
MISSING Subcommand (CROSSTABS command)
FORMAT Subcommand (CROSSTABS command)
BARCHART Subcommand (CROSSTABS command)
WRITE Subcommand (CROSSTABS command)
Reading a CROSSTABS Procedure Output File (CROSSTABS command)
References (CROSSTABS command)


BARCHART Subcommand (CROSSTABS command)

CROSSTABS (command),CROSSTABS (command),CROSSTABS (command)
BARCHART subcommand,BARCHART subcommand,BARCHART subcommand
BARCHART (subcommand),BARCHART (subcommand),BARCHART (subcommand)
CROSSTABS command,CROSSTABS command,CROSSTABS command

BARCHART produces a clustered bar chart where bars represent categories defined by the first variable in a crosstabulation while clusters represent categories defined by the second variable in a crosstabulation. Any controlling variables in a crosstabulation are collapsed over before the clustered bar chart is created.

• BARCHART takes no further specification.

• If integer mode is in effect and MISSING=REPORT, BARCHART displays valid and user-missing values. Otherwise only valid values are used.

Related Topics

CROSSTABS
Overview (CROSSTABS command)
Examples (CROSSTABS command)
VARIABLES Subcommand (CROSSTABS command)
TABLES Subcommand (CROSSTABS command)
General Mode (CROSSTABS command)
Integer Mode (CROSSTABS command)
CELLS Subcommand (CROSSTABS command)
STATISTICS Subcommand (CROSSTABS command)
METHOD Subcommand (CROSSTABS command)
MISSING Subcommand (CROSSTABS command)
FORMAT Subcommand (CROSSTABS command)
COUNT Subcommand (CROSSTABS command)
WRITE Subcommand (CROSSTABS command)
Reading a CROSSTABS Procedure Output File (CROSSTABS command)
References (CROSSTABS command)


WRITE Subcommand (CROSSTABS command)

WRITE (subcommand),WRITE (subcommand),WRITE (subcommand)
CROSSTABS command,CROSSTABS command,CROSSTABS command
CROSSTABS (command),CROSSTABS (command),CROSSTABS (command)
WRITE subcommand,WRITE subcommand,WRITE subcommand

Use the WRITE subcommand to write cell frequencies to a file for subsequent use by the current program or another program. CROSSTABS can also use these cell frequencies as input to reproduce tables and compute statistics. When WRITE is specified, an Output File Summary table is displayed before all other tables.

• The only specification is a single keyword.

PROCEDURE OUTPUT (command),PROCEDURE OUTPUT (command),PROCEDURE OUTPUT (command)
with CROSSTABS,with CROSSTABS,with CROSSTABS
CROSSTABS (command),CROSSTABS (command),CROSSTABS (command)
with PROCEDURE OUTPUT command,with PROCEDURE OUTPUT command,with PROCEDURE OUTPUT command

• The name of the file must be specified on the PROCEDURE OUTPUT command preceding CROSSTABS.

• If you include missing values with INCLUDE or REPORT on MISSING, no values are considered missing and all non-empty cells, including those with missing values, are written, even if CELLS is specified.

• If you exclude missing values on a table-by-table basis (the default), no records are written for combinations of values that include a missing value.

• If multiple tables are specified, the tables are written in the same order as they are displayed.

NONE (keyword),NONE (keyword),NONE (keyword)
CROSSTABS command,CROSSTABS command,CROSSTABS command
CELLS (keyword),CELLS (keyword),CELLS (keyword)
CROSSTABS command,CROSSTABS command,CROSSTABS command
ALL (keyword),ALL (keyword),ALL (keyword)
CROSSTABS command,CROSSTABS command,CROSSTABS command
NONE | Do not write cell counts to a file. This is the default.
CELLS | Write cell counts for non-empty and nonmissing cells to a file. Combinations of values that include a missing value are not written to the file.
ALL | Write cell counts for all cells to a file. A record for each combination of values defined by VARIABLES and TABLES is written to the file. ALL is available only in integer mode.

The file contains one record for each cell. Each record contains the following:

Columns | Contents
1–4 | Split-file group number, numbered consecutively from 1. Note that this is not the value of the variable or variables used to define the splits.
5–8 | Table number. Tables are defined by the TABLES subcommand.
9–16 | Cell frequency. The number of times this combination of variable values occurred in the data, or, if case weights are used, the sum of case weights for cases having this combination of values.
17–24 | The value of the row variable (the one named before the first BY).
25–32 | The value of the column variable (the one named after the first BY).
33–40 | The value of the first control variable (the one named after the second BY).
41–48 | The value of the second control variable (the one named after the third BY).
49–56 | The value of the third control variable (the one named after the fourth BY).
57–64 | The value of the fourth control variable (the one named after the fifth BY).
65–72 | The value of the fifth control variable (the one named after the sixth BY).
73–80 | The value of the sixth control variable (the one named after the seventh BY).

• The split-file group number, table number, and frequency are written as integers.

• In integer mode, the values of variables are also written as integers. In general mode, the values are written according to the print format specified for each variable. Alphanumeric values are written at the left end of any field in which they occur.

• Within each table, records are written from one column of the table at a time, and the value of the last control variable changes the most slowly.

Example

PROCEDURE OUTPUT  OUTFILE='/data/celldata.txt'.
CROSSTABS VARIABLES=FEAR SEX (1,2)
 /TABLES=FEAR BY SEX
 /WRITE=ALL.

• CROSSTABS writes a record for each cell in the table FEAR by SEX to the file celldata.txt.

Example

PROCEDURE OUTPUT  OUTFILE='/data/xtabdata.txt'.
CROSSTABS  TABLES=V1 TO V3 BY V4 BY V10 TO V15
  /WRITE=CELLS.

• CROSSTABS writes a set of records for each table to file xtabdata.txt.

• Records for the table V1 by V4 by V10 are written first, followed by records for V1 by V4 by V11, and so on. The records for V3 by V4 by V15 are written last.

Related Topics

CROSSTABS
Overview (CROSSTABS command)
Examples (CROSSTABS command)
VARIABLES Subcommand (CROSSTABS command)
TABLES Subcommand (CROSSTABS command)
General Mode (CROSSTABS command)
Integer Mode (CROSSTABS command)
CELLS Subcommand (CROSSTABS command)
STATISTICS Subcommand (CROSSTABS command)
METHOD Subcommand (CROSSTABS command)
MISSING Subcommand (CROSSTABS command)
FORMAT Subcommand (CROSSTABS command)
COUNT Subcommand (CROSSTABS command)
BARCHART Subcommand (CROSSTABS command)
Reading a CROSSTABS Procedure Output File (CROSSTABS command)
References (CROSSTABS command)


Reading a CROSSTABS Procedure Output File (CROSSTABS command)

reproducing tables,reproducing tables,reproducing tables
CROSSTABS (command),CROSSTABS (command),CROSSTABS (command)
with WEIGHT command,with WEIGHT command,with WEIGHT command
WEIGHT (command),WEIGHT (command),WEIGHT (command)
with CROSSTABS command,with CROSSTABS command,with CROSSTABS command

You can use the file created by WRITE in a subsequent session to reproduce a table and compute statistics for it. Each record in the file contains all of the information used to build the original table. The cell frequency information can be used as a weight variable on the WEIGHT command to replicate the original cases.

Example

DATA LIST FILE='/celldata.txt'
 /WGHT 9-16 FEAR 17-24 SEX 25-32.
VARIABLE LABELS FEAR 'AFRAID TO WALK AT NIGHT IN NEIGHBORHOODS'.
VALUE LABELS  FEAR 1 'YES' 2 'NO'/ SEX 1 'MALE' 2 'FEMALE'.
WEIGHT BY WGHT.
CROSSTABS TABLES=FEAR BY SEX
 /STATISTICS=ALL.

• DATA LIST reads the cell frequencies and row and column values from the celldata.txt file. The cell frequency is read as a weighting factor (variable WGHT). The values for the rows are read as FEAR, and the values for the columns are read as SEX, the two original variables.

• The WEIGHT command recreates the sample size by weighting each of the four cases (cells) by the cell frequency.

If you do not have the original data or the CROSSTABS procedure output file, you can reproduce a crosstabulation and compute statistics simply by entering the values from the table:

DATA LIST  /FEAR 1 SEX 3 WGHT 5-7.
VARIABLE LABELS  FEAR 'AFRAID TO WALK AT NIGHT IN NEIGHBORHOOD'.
VALUE LABELS  FEAR 1 'YES' 2 'NO'/ SEX 1 'MALE' 2 'FEMALE'.
 WEIGHT  BY WGHT.
BEGIN DATA
1 1  55
2 1 172
1 2 180
2 2  89
END DATA.
CROSSTABS  TABLES=FEAR BY SEX
/STATISTICS=ALL.

Related Topics

CROSSTABS
Overview (CROSSTABS command)
Examples (CROSSTABS command)
VARIABLES Subcommand (CROSSTABS command)
TABLES Subcommand (CROSSTABS command)
General Mode (CROSSTABS command)
Integer Mode (CROSSTABS command)
CELLS Subcommand (CROSSTABS command)
STATISTICS Subcommand (CROSSTABS command)
METHOD Subcommand (CROSSTABS command)
MISSING Subcommand (CROSSTABS command)
FORMAT Subcommand (CROSSTABS command)
COUNT Subcommand (CROSSTABS command)
BARCHART Subcommand (CROSSTABS command)
WRITE Subcommand (CROSSTABS command)
References (CROSSTABS command)


References (CROSSTABS command)

Bishop, Y. M., S. E. Feinberg, and P. W. Holland. 1975. Discrete multivariate analysis: Theory and practice. Cambridge, Mass.: MIT Press.

Haberman, S. J. 1978. Analysis of qualitative data. London: Academic Press.

Kraemer, H. C. 1982. Kappa Coefficient. In: Encyclopedia of Statistical Sciences, S. Kotz, and N. L. Johnson, eds. New York: John Wiley and Sons.

Related Topics

CROSSTABS
Overview (CROSSTABS command)
Examples (CROSSTABS command)
VARIABLES Subcommand (CROSSTABS command)
TABLES Subcommand (CROSSTABS command)
General Mode (CROSSTABS command)
Integer Mode (CROSSTABS command)
CELLS Subcommand (CROSSTABS command)
STATISTICS Subcommand (CROSSTABS command)
METHOD Subcommand (CROSSTABS command)
MISSING Subcommand (CROSSTABS command)
FORMAT Subcommand (CROSSTABS command)
COUNT Subcommand (CROSSTABS command)
BARCHART Subcommand (CROSSTABS command)
WRITE Subcommand (CROSSTABS command)
Reading a CROSSTABS Procedure Output File (CROSSTABS command)


CSCOXREG

CSCOXREG (command),CSCOXREG (command),CSCOXREG (command)
CSCOXREG (command),CSCOXREG (command),CSCOXREG (command)
syntax chart,syntax chart,syntax chart
Complex Samples Cox Regression,Complex Samples Cox Regression,Complex Samples Cox Regression
command syntax,command syntax,command syntax

CSCOXREG is available in the Complex Samples option.

Note: Square brackets used in the CSCOXREG syntax chart are required parts of the syntax and are not used to indicate optional elements. Equals signs (=) used in the syntax chart are required elements. All subcommands are optional.

CSCOXREG starttime endtime BY factor list WITH covariate list

/VARIABLES STATUS = varname(valuelist)
           ID = varname BASELINESTRATA = varname

/PLAN FILE = 'file'

/JOINTPROB FILE = 'savfile' | 'dataset'

/MODEL effect list
/CUSTOM LABEL = 'label'
      LMATRIX = {effect list, effect list ...; ...      }
                {effect list, effect list ...           }
                {ALL list; ALL ...                     }
                {ALL list                              }

      KMATRIX = {number; number; ...}
                {number             }

/CUSTOM ...

/CRITERIA CILEVEL = {95**  } DF = number
                    {number}

          LCONVERGE = [{0**   } {RELATIVE**}]
                       {number} {ABSOLUTE  }

          MXITER = {100**  } MXSTEP = {5**    }
                   {integer}          {integer}

          PCONVERGE = [{1E-6**} {RELATIVE**}]
                       {number} {ABSOLUTE  }
          SINGULAR = {1E-12**}
                     {number }
          TIES = {EFRON**}
                 {BRESLOW}

/STATISTICS PARAMETER EXP SE TTEST CINTERVAL DEFF DEFFSQRT

/TEST TYPE = {F**         } PADJUST = {LSD**        }
             {ADJF        }           {BONFERRONI   }
             {CHISQUARE   }           {SEQBONFERRONI}
             {ADJCHISQUARE}           {SIDAK        }
                                      {SEQSIDAK     }

/TESTASSUMPTIONS PROPHAZARD = {KM**                        }
                              {IDENTITY                    }
                              {LOG                         }
                              {RANK                        }
                 PARAMETER COVB

/DOMAIN VARIABLE = varname (value)

/MISSING CLASSMISSING = {EXCLUDE**}
                        {INCLUDE  }

/SURVIVALMETHOD BASELINE = {BRESLOW     } CI = {ORIGINAL}
                           {EFRON       }      {LOG**   }
                           {PRODUCTLIMIT}      {LML     }

/PRINT SAMPLEINFO** EVENTINFO** RISKINFO
       HISTORY({1**    }) GEF LMATRIX COVB CORB BASELINE NONE
               {integer}

/SAVE SCHOENFELD(rootname:{25**   }) MARTINGALE(varname) DEVIANCE(varname)
                          {integer}
      COXSNELL(varname) SCORE(rootname:{25**   }) DFBETA(rootname:{25**   })
                                       {integer}                  {integer}
      AGGMARTINGALE(varname)  AGGDEVIANCE(varname) AGGCOXSNELL(varname)
      AGGSCORE(rootname:{25**   }) AGGDFBETA(rootname:{25**   })
                        {integer}                     {integer}
      SURVIVAL(varname) LCL_SURVIVAL(varname) UCL_SURVIVAL(varname)
      CUMHAZARD(varname) LCL_CUMHAZARD(varname) UCL_CUMHAZARD(varname)
      XBETA(varname)

/PLOT SURVIVAL CUMHAZARD LML OMS CI = {YES }
                                      {NO**}

/PATTERN {varname(value)...                          }
         {endtime(valuelist) varname({valuelist}) ...}
                                     {value    }
         BY factor

/PATTERN ...

/OUTFILE {COVB = 'savfile' | 'dataset'    } {MODEL = 'file'    }
         {CORB = 'savfile' | 'dataset'    }
         {SURVIVAL = 'savfile' | 'dataset'}

** Default if the subcommand or keyword is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See CSCOXREG Algorithms for computational details for this procedure.

Syntax for the CSCOXREG command can be generated from the Complex Samples Cox Regression dialog box.

Release History Collapse Hide details

Release History

Release 16.0

• Command introduced.

Release 17.0

• Added support for SET THREADS.

Example

CSCOXREG endtime_var BY a b c WITH x y z
  /VARIABLES STATUS=status_var(1)
  /PLAN FILE='/survey/myfile.csplan'.

Related Topics

Overview (CSCOXREG command)
Examples (CSCOXREG command)
Variable List Subcommand (CSCOXREG command)
VARIABLES Subcommand (CSCOXREG command)
PLAN Subcommand (CSCOXREG command)
JOINTPROB Subcommand (CSCOXREG command)
MODEL Subcommand (CSCOXREG command)
CUSTOM Subcommand (CSCOXREG command)
CRITERIA Subcommand (CSCOXREG command)
STATISTICS Subcommand (CSCOXREG command)
TEST Subcommand (CSCOXREG command)
TESTASSUMPTIONS Subcommand (CSCOXREG command)
DOMAIN Subcommand (CSCOXREG command)
MISSING Subcommand (CSCOXREG command)
SURVIVALMETHOD Subcommand (CSCOXREG command)
PRINT Subcommand (CSCOXREG command)
SAVE Subcommand (CSCOXREG command)
PLOT Subcommand (CSCOXREG command)
PATTERN Subcommand (CSCOXREG command)
OUTFILE Subcommand (CSCOXREG command)
TIME PROGRAM
CLEAR TIME PROGRAM


Overview (CSCOXREG command)

For samples drawn by complex sampling methods, CSCOXREG applies Cox proportional hazards regression to analysis of survival times—that is, the length of time before the occurrence of an event. CSCOXREG supports scale and categorical predictors, which can be time dependent. CSCOXREG provides an easy way of considering differences in subgroups as well as analyzing effects of a set of predictors. The procedure estimates variances by taking into account the sample design used to select the sample, including equal probability and probability proportional to size (PPS) methods and with replacement (WR) and without replacement (WOR) sampling procedures. Optionally, CSCOXREG performs analyses for a subpopulation.

Basic Specification Collapse Hide details

Basic Specification

• The basic specification is a variable list identifying the time variables (at least one but can be up to two), the factors (if any), and the covariates (if any); a VARIABLES subcommand specifying the event status variable; and a PLAN subcommand with the name of a complex sample analysis plan file, which may be generated by the CSPLAN procedure.

• The default model includes main effects for any factors and any covariates.

• The basic specification displays summary information about the sample and all analysis variables, model summary statistics, and Wald F tests for all model effects. Additional subcommands must be used for other output.

• Minimum syntax is a time variable, a status variable, and the PLAN subcommand. This specification fits a baseline-only model.

Syntax Rules Collapse Hide details

Syntax Rules

• The endtime variable, STATUS in VARIABLES subcommand, and PLAN subcommand are required. All other variables and subcommands are optional.

• Multiple CUSTOM and PATTERN subcommands may be specified; each is treated independently. All other subcommands may be specified only once.

• Empty subcommands are not allowed; all subcommands must be specified with options.

• Each keyword may be specified only once within a subcommand.

• Subcommand names and keywords must be spelled in full.

• Equals signs (=) and slashes shown in the syntax chart are required.

• Bold square brackets shown in the syntax chart are required parts of the syntax and are not used to indicate optional elements.

• Subcommands may be specified in any order.

• The factors, ID variable, baseline strata variable, and the subpopulation can be numeric or string variables, but covariates must be numeric.

• Across the time variables, factor, and covariate variable lists, a variable may be specified only once.

• The status variable, ID variable, baseline strata variable, and subpopulation variables may not be specified on the variable list

• Minimum syntax is a time variable, a status variable, and the PLAN subcommand. This specification fits a baseline-only model.

• Only factors and covariates can be defined by the TIME PROGRAM, all other variables cannot be defined there. See the topic TIME PROGRAM for more information.

Operations Collapse Hide details

Operations

• TIME PROGRAM computes the values for time-dependent predictors (see TIME PROGRAM syntax help).

• CSCOXREG performs Cox proportional hazards regression analysis for sampling designs supported by the CSPLAN and CSSELECT procedures.

• The input dataset must contain the variables to be analyzed and variables related to the sampling design.

• The complex sample analysis plan file provides an analysis plan based on the sampling design.

• By default, CSCOXREG uses a model that includes main effects for any factors and any covariates.

• Other effects, including interaction and nested effects, may be specified using the MODEL subcommand.

• The default output for the specified model is summary information about the sample and all analysis variables, model summary statistics, and Wald F tests for all model effects.

• This procedure uses the multithreaded options specified by SET THREADS.

Limitations Collapse Hide details

Limitations

WEIGHT and SPLIT FILE settings are ignored with a warning by the CSCOXREG procedure.

Related Topics

CSCOXREG
Examples (CSCOXREG command)
Variable List Subcommand (CSCOXREG command)
VARIABLES Subcommand (CSCOXREG command)
PLAN Subcommand (CSCOXREG command)
JOINTPROB Subcommand (CSCOXREG command)
MODEL Subcommand (CSCOXREG command)
CUSTOM Subcommand (CSCOXREG command)
CRITERIA Subcommand (CSCOXREG command)
STATISTICS Subcommand (CSCOXREG command)
TEST Subcommand (CSCOXREG command)
TESTASSUMPTIONS Subcommand (CSCOXREG command)
DOMAIN Subcommand (CSCOXREG command)
MISSING Subcommand (CSCOXREG command)
SURVIVALMETHOD Subcommand (CSCOXREG command)
PRINT Subcommand (CSCOXREG command)
SAVE Subcommand (CSCOXREG command)
PLOT Subcommand (CSCOXREG command)
PATTERN Subcommand (CSCOXREG command)
OUTFILE Subcommand (CSCOXREG command)


Examples (CSCOXREG command)

CSCOXREG t BY a b c WITH x
  /VARIABLES STATUS = dead(1)
  /PLAN FILE=’c:\survey\myfile.csplan’.

• t is the time variable; a, b, and c are factors; x is a covariate.

• The status variable is dead with a value of 1 representing the terminal event.

• The complex sampling plan is given in the file c:\survey\myfile.csplan.

• CSCOXREG will fit the default model including the main effects for factors a, b, and c and the covariate x.

Multiple Cases per Subject

* Complex Samples Cox Regression.
CSCOXREG start_time time_to_event  BY mi is hs
  /PLAN FILE='samplesDirectory\srs.csaplan'
  /VARIABLES STATUS=event(4)  ID=patid
  /MODEL mi is hs
  /PRINT SAMPLEINFO EVENTINFO
  /STATISTICS PARAMETER EXP SE CINTERVAL
  /PLOT LML CI=NO
  /PATTERN is(1) hs(0) BY mi
  /TEST TYPE=F PADJUST=LSD
  /CRITERIA MXITER=100 MXSTEP=5 PCONVERGE=[1E-006 RELATIVE] LCONVERGE=[0] TIES=BRESLOW CILEVEL=95
  /SURVIVALMETHOD BASELINE=EFRON CI=LOG
  /MISSING CLASSMISSING=EXCLUDE.

• The CSCOXREG procedure creates a Cox regression model for survival times defined by start_time and time_to_event, using mi, is, and hs as factors. The sampling design is defined in srs.csaplan.

• The VARIABLES subcommand specifies on the STATUS keyword that a value of 4 for event indicates that the terminal event (death) has occurred. The ID keyword specifies patid as the subject ID variable. All cases sharing the same value of patid belong to the same subject.

• The STATISTICS subcommand requests estimates, exponentiated estimates, standard errors, and confidence intervals for model parameters.

• The PLOT subcommand requests log-minus-log plots of the estimated survival for the reference pattern (which uses the highest value of each factor), plus each pattern defined in any PATTERN subcommands.

• The PATTERN subcommand requests a plot to be produced using 1 as the value for is and 0 as the value for hs. Separate lines in the plot will be produced for each value of mi.

• The CRITERIA subcommand requests that the Breslow method be used for breaking ties.

• All other options are set to their default values.

For discussion of output from this syntax and to place the example in context, see Multiple Cases per Subject in Complex Samples Cox Regression.

Time-Dependent Covariates

* Complex Samples Cox Regression.
CLEAR TIME PROGRAM.
TIME PROGRAM.
COMPUTE t_age=ln(T_)*age.
CSCOXREG time_to_event  WITH age t_age
  /PLAN FILE='samplesDirectory\recidivism_cs.csplan'
  /JOINTPROB FILE='samplesDirectory\recidivism_cs_jointprob.sav'
  /VARIABLES STATUS=arrest2(1)
  /MODEL age t_age
  /PRINT SAMPLEINFO EVENTINFO
  /STATISTICS PARAMETER SE CINTERVAL DEFF
  /TEST TYPE=F PADJUST=LSD
  /CRITERIA MXITER=100 MXSTEP=5 PCONVERGE=[1E-006 RELATIVE]
    LCONVERGE=[0] TIES=EFRON CILEVEL=95
  /SURVIVALMETHOD BASELINE=EFRON CI=LOG
  /MISSING CLASSMISSING=EXCLUDE.

• The TIME PROGRAM command indicates that the following COMPUTE statement defines a time-dependent predictor for use with CSCOXREG. The time-dependent predictor is the interaction between the covariate age and the natural log of the internal time variable T_.

• The CSCOXREG procedure fits a model for time_to_event given covariates age and t_age. The sampling design is defined in recidivism_cs.csplan, and joint probabilities are stored in recidivism_cs_jointprob.sav.

• The VARIABLES subcommand specifies that a value of 1 for arrest2 indicates that the event of interest (rearrest) has occurred.

• The STATISTICS subcommand requests estimates, standard errors, confidence intervals, and design effects for model parameters.

• All other options are set to their default values.

For discussion of output from this syntax and to place the example in context, see Using a Time-Dependent Predictor in Complex Samples Cox Regression.

Related Topics

CSCOXREG
Overview (CSCOXREG command)
Variable List Subcommand (CSCOXREG command)
VARIABLES Subcommand (CSCOXREG command)
PLAN Subcommand (CSCOXREG command)
JOINTPROB Subcommand (CSCOXREG command)
MODEL Subcommand (CSCOXREG command)
CUSTOM Subcommand (CSCOXREG command)
CRITERIA Subcommand (CSCOXREG command)
STATISTICS Subcommand (CSCOXREG command)
TEST Subcommand (CSCOXREG command)
TESTASSUMPTIONS Subcommand (CSCOXREG command)
DOMAIN Subcommand (CSCOXREG command)
MISSING Subcommand (CSCOXREG command)
SURVIVALMETHOD Subcommand (CSCOXREG command)
PRINT Subcommand (CSCOXREG command)
SAVE Subcommand (CSCOXREG command)
PLOT Subcommand (CSCOXREG command)
PATTERN Subcommand (CSCOXREG command)
OUTFILE Subcommand (CSCOXREG command)


Variable List Subcommand (CSCOXREG command)

The variable list specifies the time variable(s), the factors, and the covariates in the model.

• The time variables starttime (if specified) and endtime must be listed first. These variables represent the endpoints of a time interval (starttime, endtime) during which the case is at risk.

• When starttime is not specified, it is implied that starttime = 0 for all cases if an ID variable is not specified. If an ID variable is specified, it is assumed that starttime = 0 for the first observation for that subject and starttime for following observations equals endtime of the previous observation. See the example below.

• The time variables must be numeric and non-negative.

• If the time variables are of Date or Time type, the internal numeric representation will be used and a warning will be given. For example, November 8, 1957, is 1.2E+10 (the number of seconds from midnight, October 14, 1582). See Date and Time Functions for detailed internal numeric representation of different date and time formats.

• The names of the factors and covariates, if any, follow the time variables. Specify any factors following the keyword BY. Specify any covariates following the keyword WITH.

• Factors can be numeric or string variables, but covariates must be numeric.

• Each variable may be specified only once on the variable list.

• The status variable, ID variable, baseline strata variable, and subpopulation variables may not be specified on the variable list.

Example

CSCOXREG tstart tend BY a b c WITH x
  /VARIABLES STATUS = dead(1) ID = SSN
  /PLAN FILE=’c:\survey\myfile.csplan’
  /MODEL a b c a*b a*c b*c x.

• Two time variables, tstart and tend, are specified.

• ID specifies SSN as the subject ID variable. All cases sharing the same value of SSN belong to the same subject.

• This example fits a model that includes the main effects for factors a, b, and c; all two-way interactions among the factors; and the covariate x.

CSCOXREG tend BY a b c WITH x
  /VARIABLES STATUS = dead(1) ID = SSN
  /PLAN FILE=’c:\survey\myfile.csplan’
  /MODEL a b c a*b a*c b*c x.

• This is the same as the above example except that only one time variable, tend, is specified.

• The values of starttime derived from tend. For example, for the following subject,

SSN | tend |
123456789 | 10 | ...
123456789 | 20 | ...
123456789 | 25 | ...

it is implied that starttime = 0, 10, and 20 for these three cases.

Related Topics

CSCOXREG
Overview (CSCOXREG command)
Examples (CSCOXREG command)
VARIABLES Subcommand (CSCOXREG command)
PLAN Subcommand (CSCOXREG command)
JOINTPROB Subcommand (CSCOXREG command)
MODEL Subcommand (CSCOXREG command)
CUSTOM Subcommand (CSCOXREG command)
CRITERIA Subcommand (CSCOXREG command)
STATISTICS Subcommand (CSCOXREG command)
TEST Subcommand (CSCOXREG command)
TESTASSUMPTIONS Subcommand (CSCOXREG command)
DOMAIN Subcommand (CSCOXREG command)
MISSING Subcommand (CSCOXREG command)
SURVIVALMETHOD Subcommand (CSCOXREG command)
PRINT Subcommand (CSCOXREG command)
SAVE Subcommand (CSCOXREG command)
PLOT Subcommand (CSCOXREG command)
PATTERN Subcommand (CSCOXREG command)
OUTFILE Subcommand (CSCOXREG command)


VARIABLES Subcommand (CSCOXREG command)

CSCOXREG (command),CSCOXREG (command),CSCOXREG (command)
VARIABLES subcommand,VARIABLES subcommand,VARIABLES subcommand
VARIABLES (subcommand),VARIABLES (subcommand),VARIABLES (subcommand)
CSCOXREG command,CSCOXREG command,CSCOXREG command

VARIABLES specifies the status variable, ID variable, and baseline strata variable.

STATUS (keyword),STATUS (keyword),STATUS (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
ID (keyword),ID (keyword),ID (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
BASELINESTRATA (keyword),BASELINESTRATA (keyword),BASELINESTRATA (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
STATUS = varname
 | Event status variable. To determine whether the event has occurred at endtime for a particular observation, CSCOXREG checks the value of a status variable. STATUS lists the status variable and the values that indicate the occurrence of the event.
 | The value list must be enclosed in parentheses. All cases with non-negative times that do not have a value within the range specified are classified as censored cases—that is, cases for which the event has not yet occurred at endtime.
 | The value list can be one value, a list of values separated by blanks or commas, a range of values using the keyword THRU, or a combination.
 | The status variable can be either numeric or string. If a string variable is specified, the event values must be enclosed in apostrophes and the keyword THRU cannot be used.
ID = varname
 | ID variable. Cases with the same ID value are repeated observations from the same subject. If ID is not specified, each case represents one subject.
BASELINESTRATA = varname
 | Baseline stratification variable. A separate baseline hazard and survival function is computed for each value of this variable, while a single set of model coefficients is estimated across strata.

Example

CSCOXREG SURVIVAL by GROUP
/VARIABLES STATUS=SURVSTA(3 THRU 5, 8 THRU 10) BASELINESTRATA=LOCATION
/PLAN FILE=’c:\survey\myfile.csplan’.

• STATUS specifies that SURVSTA is the status variable.

• A value between either 3 and 5 or 8 and 10, inclusive, means that the terminal event occurred.

• Values outside the specified ranges indicate censored cases.

• BASELINESTRATA specifies LOCATION as the strata variable.

• Different baseline survival functions are computed for each value of LOCATION.

Related Topics

CSCOXREG
Overview (CSCOXREG command)
Examples (CSCOXREG command)
Variable List Subcommand (CSCOXREG command)
PLAN Subcommand (CSCOXREG command)
JOINTPROB Subcommand (CSCOXREG command)
MODEL Subcommand (CSCOXREG command)
CUSTOM Subcommand (CSCOXREG command)
CRITERIA Subcommand (CSCOXREG command)
STATISTICS Subcommand (CSCOXREG command)
TEST Subcommand (CSCOXREG command)
TESTASSUMPTIONS Subcommand (CSCOXREG command)
DOMAIN Subcommand (CSCOXREG command)
MISSING Subcommand (CSCOXREG command)
SURVIVALMETHOD Subcommand (CSCOXREG command)
PRINT Subcommand (CSCOXREG command)
SAVE Subcommand (CSCOXREG command)
PLOT Subcommand (CSCOXREG command)
PATTERN Subcommand (CSCOXREG command)
OUTFILE Subcommand (CSCOXREG command)


PLAN Subcommand (CSCOXREG command)

CSCOXREG (command),CSCOXREG (command),CSCOXREG (command)
PLAN subcommand,PLAN subcommand,PLAN subcommand
PLAN (subcommand),PLAN (subcommand),PLAN (subcommand)
CSCOXREG command,CSCOXREG command,CSCOXREG command

The PLAN subcommand specifies the name of an XML file containing analysis design specifications. This file is written by the CSPLAN procedure.

• The PLAN subcommand is required.

FILE (keyword),FILE (keyword),FILE (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
FILE Specifies the name of an external file.

Related Topics

CSCOXREG
Overview (CSCOXREG command)
Examples (CSCOXREG command)
Variable List Subcommand (CSCOXREG command)
VARIABLES Subcommand (CSCOXREG command)
JOINTPROB Subcommand (CSCOXREG command)
MODEL Subcommand (CSCOXREG command)
CUSTOM Subcommand (CSCOXREG command)
CRITERIA Subcommand (CSCOXREG command)
STATISTICS Subcommand (CSCOXREG command)
TEST Subcommand (CSCOXREG command)
TESTASSUMPTIONS Subcommand (CSCOXREG command)
DOMAIN Subcommand (CSCOXREG command)
MISSING Subcommand (CSCOXREG command)
SURVIVALMETHOD Subcommand (CSCOXREG command)
PRINT Subcommand (CSCOXREG command)
SAVE Subcommand (CSCOXREG command)
PLOT Subcommand (CSCOXREG command)
PATTERN Subcommand (CSCOXREG command)
OUTFILE Subcommand (CSCOXREG command)


JOINTPROB Subcommand (CSCOXREG command)

CSCOXREG (command),CSCOXREG (command),CSCOXREG (command)
JOINTPROB subcommand,JOINTPROB subcommand,JOINTPROB subcommand
JOINTPROB (subcommand),JOINTPROB (subcommand),JOINTPROB (subcommand)
CSCOXREG command,CSCOXREG command,CSCOXREG command

The JOINTPROB subcommand is used to specify the file or dataset containing the first stage joint inclusion probabilities for UNEQUAL_WOR estimation. The CSSELECT procedure writes this file in the same location and with the same name (but a different extension) as the plan file. When UNEQUAL_WOR estimation is specified, the procedure will use the default location and name of the file unless the JOINTPROB subcommand is used to override them.

FILE (keyword),FILE (keyword),FILE (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
FILE Specifies the name of the file or dataset containing the joint inclusion probabilities.

Related Topics

CSCOXREG
Overview (CSCOXREG command)
Examples (CSCOXREG command)
Variable List Subcommand (CSCOXREG command)
VARIABLES Subcommand (CSCOXREG command)
PLAN Subcommand (CSCOXREG command)
MODEL Subcommand (CSCOXREG command)
CUSTOM Subcommand (CSCOXREG command)
CRITERIA Subcommand (CSCOXREG command)
STATISTICS Subcommand (CSCOXREG command)
TEST Subcommand (CSCOXREG command)
TESTASSUMPTIONS Subcommand (CSCOXREG command)
DOMAIN Subcommand (CSCOXREG command)
MISSING Subcommand (CSCOXREG command)
SURVIVALMETHOD Subcommand (CSCOXREG command)
PRINT Subcommand (CSCOXREG command)
SAVE Subcommand (CSCOXREG command)
PLOT Subcommand (CSCOXREG command)
PATTERN Subcommand (CSCOXREG command)
OUTFILE Subcommand (CSCOXREG command)


MODEL Subcommand (CSCOXREG command)

CSCOXREG (command),CSCOXREG (command),CSCOXREG (command)
MODEL subcommand,MODEL subcommand,MODEL subcommand
MODEL (subcommand),MODEL (subcommand),MODEL (subcommand)
CSCOXREG command,CSCOXREG command,CSCOXREG command

The MODEL subcommand is used to specify the effects to be included in the model.

• Specify a list of terms to be included in the model, separated by spaces or commas.

• If the MODEL subcommand is not specified, CSCOXREG uses a model that includes main effects for any factors, and any covariates, in the order specified on the variable list.

• To include a term for the main effect of a factor, enter the name of the factor.

• To include a term for an interaction among factors, use the keyword BY or the asterisk (*) to join the factors involved in the interaction. For example, A*B means a two-way interaction effect of A and B, where A and B are factors. A*A is not allowed because factors inside an interaction effect must be distinct.

• To include a term for nesting one factor within another, use a pair of parentheses. For example, A(B) means that A is nested within B. A(A) is not allowed because factors inside a nested effect must be distinct.

• Multiple nesting is allowed. For example, A(B(C)) means that B is nested within C, and A is nested within B(C). When more than one pair of parentheses is present, each pair of parentheses must be enclosed or nested within another pair of parentheses. Thus, A(B)(C) is not valid.

• Nesting within an interaction effect is valid. For example, A(B*C) means that A is nested within B*C.

• Interactions among nested effects are allowed. The correct syntax is the interaction followed by the common nested effect inside the parentheses. For example, interaction between A and B within levels of C should be specified as A*B(C) instead of A(C)*B(C).

• To include a covariate term in the design, enter the name of the covariate.

• Covariates can be connected, but not nested, through the * operator or using the keyword BY to form another covariate effect. Interactions among covariates such as X1*X1 and X1*X2 are valid, but X1(X2) is not.

• Factor and covariate effects can be connected in various ways except that no effects can be nested within a covariate effect. Suppose A and B are factors and X1 and X2 are covariates, examples of valid combinations of factor and covariate effects are A*X1, A*B*X1, X1(A), X1(A*B), X1*A(B), X1*X2(A*B), and A*B*X1*X2.

Related Topics

CSCOXREG
Overview (CSCOXREG command)
Examples (CSCOXREG command)
Variable List Subcommand (CSCOXREG command)
VARIABLES Subcommand (CSCOXREG command)
PLAN Subcommand (CSCOXREG command)
JOINTPROB Subcommand (CSCOXREG command)
CUSTOM Subcommand (CSCOXREG command)
CRITERIA Subcommand (CSCOXREG command)
STATISTICS Subcommand (CSCOXREG command)
TEST Subcommand (CSCOXREG command)
TESTASSUMPTIONS Subcommand (CSCOXREG command)
DOMAIN Subcommand (CSCOXREG command)
MISSING Subcommand (CSCOXREG command)
SURVIVALMETHOD Subcommand (CSCOXREG command)
PRINT Subcommand (CSCOXREG command)
SAVE Subcommand (CSCOXREG command)
PLOT Subcommand (CSCOXREG command)
PATTERN Subcommand (CSCOXREG command)
OUTFILE Subcommand (CSCOXREG command)


CUSTOM Subcommand (CSCOXREG command)

CSCOXREG (command),CSCOXREG (command),CSCOXREG (command)
CUSTOM subcommand,CUSTOM subcommand,CUSTOM subcommand
CUSTOM (subcommand),CUSTOM (subcommand),CUSTOM (subcommand)
CSCOXREG command,CSCOXREG command,CSCOXREG command

The CUSTOM subcommand defines custom hypothesis tests by specifying the L matrix (contrast coefficients matrix) and the K matrix (contrast results matrix) in the general form of the linear hypothesis LB = K. The vector B is the parameter vector in the linear model.

• Multiple CUSTOM subcommands are allowed. Each subcommand is treated independently.

• An optional label may be specified by using the LABEL keyword. The label is a string with a maximum length of 255 characters. Only one label can be specified.

• Either the LMATRIX or KMATRIX keyword, or both, must be specified.

LMATRIX (keyword),LMATRIX (keyword),LMATRIX (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
KMATRIX (keyword),KMATRIX (keyword),KMATRIX (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
LMATRIX | Contrast coefficients matrix. This matrix specifies coefficients of contrasts, which can be used for studying the effects in the model. An L matrix can be specified by using the LMATRIX keyword.
KMATRIX | Contrast results matrix. This matrix specifies the results of the linear hypothesis. A K matrix can be specified by using the KMATRIX keyword.

• The number of rows in the L and K matrices must be equal.

• A custom hypothesis test can be formed by specifying an L or K matrix, or both. If only one matrix is specified, the unspecified matrix uses the defaults described below.

• If KMATRIX is specified but LMATRIX is not specified, the L matrix is assumed to be the row vector corresponding to the intercept in the estimable function, provided that INCLUDE = YES or ONLY is specified on the INTERCEPT subcommand. In this case, the K matrix can be only a scalar matrix.

• The default K matrix is a zero matrix—that is, LB = 0 is assumed.

• There are three general formats that can be used on the LMATRIX keyword: (1) Specify a coefficient value for the intercept, followed optionally by an effect name and a list of real numbers. (2) Specify an effect name and a list of real numbers. (3) Specify keyword ALL and a list of real numbers. In all three formats, there can be multiple effect names (or instances of the keyword ALL) and number lists.

• Only valid effects in the default model or on the MODEL subcommand can be specified on the LMATRIX keyword.

• The length of the list of real numbers on the LMATRIX keyword must be equal to the number of parameters (including the redundant parameters) corresponding to the specified effect. For example, if the effect A*B takes up six columns in the design matrix, the list after A*B must contain exactly six numbers.

• When ALL is specified, the length of the list that follows ALL must be equal to the total number of parameters (including the redundant parameters) in the model.

• Effects that are in the model but not specified on the LMATRIX keyword are assumed to have entries of 0 in the corresponding columns of the L matrix.

• When an L matrix is being defined, a number can be specified as a fraction with a positive denominator. For example, 1/3 and –1/3 are valid, but 1/–3 is invalid.

• A semicolon (;) indicates the end of a row in the L matrix.

• The format for the KMATRIX keyword is one or more real numbers. If more than one number is specified, then separate adjacent numbers using a semicolon (;). Each semicolon indicates the end of a row in the K matrix. Each number is the hypothesized value for a contrast, which is defined by a row in the L matrix.

• For the KMATRIX keyword to be valid, either the LMATRIX keyword, or INCLUDE = YES on the INTERCEPT subcommand, must be specified.

Example

Suppose that factors A and B each have three levels.

CSCOXREG t BY a b
  /VARIABLES STATUS=death(1)
  /PLAN FILE=’c:\survey\myfile.csplan’
  /MODEL a b a*b
  /CUSTOM  LABEL = “Effect A”
     LMATRIX = a 1 0 -1
         a*b  1/3  1/3  1/3
              0    0    0
             -1/3 -1/3 -1/3;
         a 0 1 -1
         a*b  0    0    0
              1/3  1/3  1/3
             -1/3 -1/3 -1/3.

• The preceding syntax specifies a test of effect A.

• Because there are three levels in effect A, two independent contrasts can be formed at most; thus, there are two rows in the L matrix separated by a semicolon (;).

• There are three levels each in effects A and B; thus, the interaction effect A*B takes nine columns in the design matrix.

• The first row in the L matrix tests the difference between levels 1 and 3 of effect A; the second row tests the difference between levels 2 and 3 of effect A.

• The KMATRIX keyword is not specified, so the null hypothesis value for both tests is 0.

Example

Suppose that factor A has three levels.

CSCOXREG t BY a
  /VARIABLES STATUS=death(1)
  /PLAN FILE=’c:\survey\myfile.csplan’
  /MODEL a
  /CUSTOM  LABEL = ‘Effect A’
   LMATRIX = a 1 0 -1;
             a 0 1 -1
   KMATRIX = 1; 1.

• The syntax specifies a model with a main effect for factor A and a custom hypothesis test of effect A.

• The equivalent LMATRIX keyword using the ALL option follows.

LMATRIX = ALL 1  0 -1;
          ALL 0  1 -1

• The KMATRIX keyword is specified and the hypothesis that the difference between levels 1 and 3 and levels 2 and 3 of effect A are both equal to 1 is tested.

Related Topics

CSCOXREG
Overview (CSCOXREG command)
Examples (CSCOXREG command)
Variable List Subcommand (CSCOXREG command)
VARIABLES Subcommand (CSCOXREG command)
PLAN Subcommand (CSCOXREG command)
JOINTPROB Subcommand (CSCOXREG command)
MODEL Subcommand (CSCOXREG command)
CRITERIA Subcommand (CSCOXREG command)
STATISTICS Subcommand (CSCOXREG command)
TEST Subcommand (CSCOXREG command)
TESTASSUMPTIONS Subcommand (CSCOXREG command)
DOMAIN Subcommand (CSCOXREG command)
MISSING Subcommand (CSCOXREG command)
SURVIVALMETHOD Subcommand (CSCOXREG command)
PRINT Subcommand (CSCOXREG command)
SAVE Subcommand (CSCOXREG command)
PLOT Subcommand (CSCOXREG command)
PATTERN Subcommand (CSCOXREG command)
OUTFILE Subcommand (CSCOXREG command)


CRITERIA Subcommand (CSCOXREG command)

CSCOXREG (command),CSCOXREG (command),CSCOXREG (command)
CRITERIA subcommand,CRITERIA subcommand,CRITERIA subcommand
CRITERIA (subcommand),CRITERIA (subcommand),CRITERIA (subcommand)
CSCOXREG command,CSCOXREG command,CSCOXREG command

The CRITERIA subcommand controls the iterative algorithm used for estimation, specifies the numerical tolerance for checking for singularity, and specifies the ties breaking method used in estimating regression parameters.

CILEVEL (keyword),CILEVEL (keyword),CILEVEL (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
DF (keyword),DF (keyword),DF (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
LCONVERGE (keyword),LCONVERGE (keyword),LCONVERGE (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
MXITER (keyword),MXITER (keyword),MXITER (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
MXSTEP (keyword),MXSTEP (keyword),MXSTEP (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
PCONVERGE (keyword),PCONVERGE (keyword),PCONVERGE (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
SINGULAR (keyword),SINGULAR (keyword),SINGULAR (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
TIES (keyword),TIES (keyword),TIES (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
CILEVEL = number
 | Confidence interval level for coefficient estimates, exponentiated coefficient estimates, survival function estimates, and cumulative hazard function estimates. Specify a value greater than or equal to 0 and less than 100. The default value is 95.
DF = number
 | Sampling design degrees of freedom to use in computing p values for all test statistics. Specify a positive number. The default value is the difference between the number of primary sampling units and the number of strata in the first stage of sampling.
LCONVERGE = [number RELATIVE|ABSOLUTE]
 | Log-likelihood function convergence criterion. Convergence is assumed if the relative or absolute change in the log-likelihood function is less than the given value. This criterion is not used if the value is 0.
 | Specify square brackets containing a non-negative number followed optionally by keyword RELATIVE or ABSOLUTE, which indicates the type of change. The default value is 0; the default type is RELATIVE.
MXITER = integer
 | Maximum number of iterations. Specify a non-negative integer. The default value is 100.
MXSTEP = integer
 | Maximum step-halving allowed. Specify a positive integer. The default value is 5.
PCONVERGE = [number RELATIVE|ABSOLUTE]
 | Parameter estimates convergence criterion. Convergence is assumed if the relative or absolute change in the parameter estimates is less than the given value. This criterion is not used if the value is 0.
 | Specify square brackets containing a non-negative number followed optionally by keyword RELATIVE or ABSOLUTE, which indicates the type of change. The default value is 10-6; the default type is RELATIVE.
SINGULAR = number
 | Tolerance value used to test for singularity. Specify a positive value. The default value is 10-12.
TIES = EFRON|BRESLOW
 | Tie breaking method in estimating parameters. The default Efron method is specified by the keyword EFRON; the default Breslow method is specified by the keyword BRESLOW.

Related Topics

CSCOXREG
Overview (CSCOXREG command)
Examples (CSCOXREG command)
Variable List Subcommand (CSCOXREG command)
VARIABLES Subcommand (CSCOXREG command)
PLAN Subcommand (CSCOXREG command)
JOINTPROB Subcommand (CSCOXREG command)
MODEL Subcommand (CSCOXREG command)
CUSTOM Subcommand (CSCOXREG command)
STATISTICS Subcommand (CSCOXREG command)
TEST Subcommand (CSCOXREG command)
TESTASSUMPTIONS Subcommand (CSCOXREG command)
DOMAIN Subcommand (CSCOXREG command)
MISSING Subcommand (CSCOXREG command)
SURVIVALMETHOD Subcommand (CSCOXREG command)
PRINT Subcommand (CSCOXREG command)
SAVE Subcommand (CSCOXREG command)
PLOT Subcommand (CSCOXREG command)
PATTERN Subcommand (CSCOXREG command)
OUTFILE Subcommand (CSCOXREG command)


STATISTICS Subcommand (CSCOXREG command)

CSCOXREG (command),CSCOXREG (command),CSCOXREG (command)
STATISTICS subcommand,STATISTICS subcommand,STATISTICS subcommand
STATISTICS (subcommand),STATISTICS (subcommand),STATISTICS (subcommand)
CSCOXREG command,CSCOXREG command,CSCOXREG command

The STATISTICS subcommand requests various statistics associated with the parameter estimates.

There are no default keywords on the STATISTICS subcommand. If this subcommand is not specified, then none of the statistics listed below are displayed.

PARAMETER (keyword),PARAMETER (keyword),PARAMETER (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
EXP (keyword),EXP (keyword),EXP (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
SE (keyword),SE (keyword),SE (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
TTEST (keyword),TTEST (keyword),TTEST (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
CINTERVAL (keyword),CINTERVAL (keyword),CINTERVAL (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
DEFF (keyword),DEFF (keyword),DEFF (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
DEFFSQRT (keyword),DEFFSQRT (keyword),DEFFSQRT (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
PARAMETER | Parameter estimates.
EXP | The exponentiated parameter estimates.
SE | Standard error for each parameter estimate.
TTEST | t test for each parameter estimate.
CINTERVAL | Confidence interval for each parameter estimate and/or exponentiated parameter estimate.
DEFF | Design effect for each parameter estimate.
DEFFSQRT | Square root of design effect for each parameter estimate.

Related Topics

CSCOXREG
Overview (CSCOXREG command)
Examples (CSCOXREG command)
Variable List Subcommand (CSCOXREG command)
VARIABLES Subcommand (CSCOXREG command)
PLAN Subcommand (CSCOXREG command)
JOINTPROB Subcommand (CSCOXREG command)
MODEL Subcommand (CSCOXREG command)
CUSTOM Subcommand (CSCOXREG command)
CRITERIA Subcommand (CSCOXREG command)
TEST Subcommand (CSCOXREG command)
TESTASSUMPTIONS Subcommand (CSCOXREG command)
DOMAIN Subcommand (CSCOXREG command)
MISSING Subcommand (CSCOXREG command)
SURVIVALMETHOD Subcommand (CSCOXREG command)
PRINT Subcommand (CSCOXREG command)
SAVE Subcommand (CSCOXREG command)
PLOT Subcommand (CSCOXREG command)
PATTERN Subcommand (CSCOXREG command)
OUTFILE Subcommand (CSCOXREG command)


TEST Subcommand (CSCOXREG command)

CSCOXREG (command),CSCOXREG (command),CSCOXREG (command)
TEST subcommand,TEST subcommand,TEST subcommand
TEST (subcommand),TEST (subcommand),TEST (subcommand)
CSCOXREG command,CSCOXREG command,CSCOXREG command

The TEST subcommand specifies the type of test statistic and the method of adjusting the significance level to be used for hypothesis tests requested on the MODEL, CUSTOM, and PRINT subcommands.

TYPE (keyword),TYPE (keyword),TYPE (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
F (keyword),F (keyword),F (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
ADJF (keyword),ADJF (keyword),ADJF (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
CHISQUARE (keyword),CHISQUARE (keyword),CHISQUARE (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
ADJCHISQUARE (keyword),ADJCHISQUARE (keyword),ADJCHISQUARE (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
TYPE Keyword Collapse Hide details

TYPE Keyword

The TYPE keyword indicates the type of test statistic.

F | Wald F test. This is the default test statistic if the TYPE keyword is not specified.
ADJF | Adjusted Wald F test.
CHISQUARE | Wald chi-square test.
ADJCHISQUARE | Adjusted Wald chi-square test.
PADJUST (keyword),PADJUST (keyword),PADJUST (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
LSD (keyword),LSD (keyword),LSD (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
BONFERRONI (keyword),BONFERRONI (keyword),BONFERRONI (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
SEQBONFERRONI (keyword),SEQBONFERRONI (keyword),SEQBONFERRONI (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
SIDAK (keyword),SIDAK (keyword),SIDAK (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
SEQSIDAK (keyword),SEQSIDAK (keyword),SEQSIDAK (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
PADJUST Keyword Collapse Hide details

PADJUST Keyword

The PADJUST keyword indicates the method of adjusting the significance level.

LSD | Least significant difference. This method does not control the overall probability of rejecting the hypotheses that some linear contrasts are different from the null hypothesis value(s). This is the default.
BONFERRONI | Bonferroni. This method adjusts the observed significance level for the fact that multiple contrasts are being tested.
SEQBONFERRONI
 | Sequential Bonferroni. This is a sequentially step-down rejective Bonferroni procedure that is much less conservative in terms of rejecting individual hypotheses but maintains the same overall significance level.
SIDAK | Sidak. This method provides tighter bounds than the Bonferroni approach.
SEQSIDAK | Sequential Sidak. This is a sequentially step-down rejective Sidak procedure that is much less conservative in terms of rejecting individual hypotheses but maintains the same overall significance level.

Related Topics

CSCOXREG
Overview (CSCOXREG command)
Examples (CSCOXREG command)
Variable List Subcommand (CSCOXREG command)
VARIABLES Subcommand (CSCOXREG command)
PLAN Subcommand (CSCOXREG command)
JOINTPROB Subcommand (CSCOXREG command)
MODEL Subcommand (CSCOXREG command)
CUSTOM Subcommand (CSCOXREG command)
CRITERIA Subcommand (CSCOXREG command)
STATISTICS Subcommand (CSCOXREG command)
TESTASSUMPTIONS Subcommand (CSCOXREG command)
DOMAIN Subcommand (CSCOXREG command)
MISSING Subcommand (CSCOXREG command)
SURVIVALMETHOD Subcommand (CSCOXREG command)
PRINT Subcommand (CSCOXREG command)
SAVE Subcommand (CSCOXREG command)
PLOT Subcommand (CSCOXREG command)
PATTERN Subcommand (CSCOXREG command)
OUTFILE Subcommand (CSCOXREG command)


TESTASSUMPTIONS Subcommand (CSCOXREG command)

CSCOXREG (command),CSCOXREG (command),CSCOXREG (command)
TESTASSUMPTIONS subcommand,TESTASSUMPTIONS subcommand,TESTASSUMPTIONS subcommand
TESTASSUMPTIONS (subcommand),TESTASSUMPTIONS (subcommand),TESTASSUMPTIONS (subcommand)
CSCOXREG command,CSCOXREG command,CSCOXREG command

The TESTASSUMPTIONS subcommand produces tests of the proportional hazards and covariate form model assumptions. You can request various statistics associated with the alternative models.

PROPHAZARD (keyword),PROPHAZARD (keyword),PROPHAZARD (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
PROPHAZARD Keyword Collapse Hide details

PROPHAZARD Keyword

The PROPHAZARD keyword produces a test for proportional hazards assumption. The time function used in testing for proportional hazards is specified in parentheses. Specify one of the following options.

KM | Kaplan-Meier estimation of survival function. This is the default.
IDENTITY | Identity function of time.
LOG | Log function of time.
RANK | Rank of death time.
PARAMETER (keyword),PARAMETER (keyword),PARAMETER (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
PARAMETER Keyword Collapse Hide details

PARAMETER Keyword

The PARAMETER keyword displays the parameter estimates of the alternative model. The alternative model is estimated using the same convergence criteria as the original model. Both parameters and their standard errors are estimated.

COVB (keyword),COVB (keyword),COVB (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
COVB Keyword Collapse Hide details

COVB Keyword

The COVB keyword displays the covariance matrix for the alternative model parameters

Related Topics

CSCOXREG
Overview (CSCOXREG command)
Examples (CSCOXREG command)
Variable List Subcommand (CSCOXREG command)
VARIABLES Subcommand (CSCOXREG command)
PLAN Subcommand (CSCOXREG command)
JOINTPROB Subcommand (CSCOXREG command)
MODEL Subcommand (CSCOXREG command)
CUSTOM Subcommand (CSCOXREG command)
CRITERIA Subcommand (CSCOXREG command)
STATISTICS Subcommand (CSCOXREG command)
TEST Subcommand (CSCOXREG command)
DOMAIN Subcommand (CSCOXREG command)
MISSING Subcommand (CSCOXREG command)
SURVIVALMETHOD Subcommand (CSCOXREG command)
PRINT Subcommand (CSCOXREG command)
SAVE Subcommand (CSCOXREG command)
PLOT Subcommand (CSCOXREG command)
PATTERN Subcommand (CSCOXREG command)
OUTFILE Subcommand (CSCOXREG command)


DOMAIN Subcommand (CSCOXREG command)

CSCOXREG (command),CSCOXREG (command),CSCOXREG (command)
DOMAIN subcommand,DOMAIN subcommand,DOMAIN subcommand
DOMAIN (subcommand),DOMAIN (subcommand),DOMAIN (subcommand)
CSCOXREG command,CSCOXREG command,CSCOXREG command

The DOMAIN subcommand specifies the subpopulation for which the analysis is to be performed.

• The keyword VARIABLE, followed by an equals sign, a variable, and a value in parentheses are required. Put the value inside a pair of quotes if the value is formatted (such as date or currency) or if the factor is of string type.

• The subpopulation is defined by all cases having the given value on the specified variable.

• Analyses are performed only for the specified subpopulation.

• For example, DOMAIN VARIABLE = myvar (1) defines the subpopulation by all cases for which variable MYVAR has value 1.

• The specified variable may be numeric or string and must exist at the time the CSCOXREG procedure is invoked.

• Stratification or cluster variables may be specified, but no other plan file variables are allowed on the DOMAIN subcommand.

• Analysis variables may not be specified on the DOMAIN subcommand.

Related Topics

CSCOXREG
Overview (CSCOXREG command)
Examples (CSCOXREG command)
Variable List Subcommand (CSCOXREG command)
VARIABLES Subcommand (CSCOXREG command)
PLAN Subcommand (CSCOXREG command)
JOINTPROB Subcommand (CSCOXREG command)
MODEL Subcommand (CSCOXREG command)
CUSTOM Subcommand (CSCOXREG command)
CRITERIA Subcommand (CSCOXREG command)
STATISTICS Subcommand (CSCOXREG command)
TEST Subcommand (CSCOXREG command)
TESTASSUMPTIONS Subcommand (CSCOXREG command)
MISSING Subcommand (CSCOXREG command)
SURVIVALMETHOD Subcommand (CSCOXREG command)
PRINT Subcommand (CSCOXREG command)
SAVE Subcommand (CSCOXREG command)
PLOT Subcommand (CSCOXREG command)
PATTERN Subcommand (CSCOXREG command)
OUTFILE Subcommand (CSCOXREG command)


MISSING Subcommand (CSCOXREG command)

CSCOXREG (command),CSCOXREG (command),CSCOXREG (command)
MISSING subcommand,MISSING subcommand,MISSING subcommand
MISSING (subcommand),MISSING (subcommand),MISSING (subcommand)
CSCOXREG command,CSCOXREG command,CSCOXREG command

The MISSING subcommand specifies how missing values are handled.

• In general, cases must have valid data for all design variables as well as for the dependent variable and any covariates. Cases with invalid data for any of these variables are excluded from the analysis.

• There is one important exception to the preceding rule. This exception applies when an inclusion probability or population size variable is defined in an analysis plan file. Within a stratum at a given stage, if the inclusion probability or population size values are unequal across cases or missing for a case, then the first valid value found within that stratum is used as the value for the stratum. If strata are not defined, then the first valid value found in the sample is used. If the inclusion probability or population size values are missing for all cases within a stratum (or within the sample if strata are not defined) at a given stage, then an error message is issued.

• The CLASSMISSING keyword specifies whether user-missing values are treated as valid. This specification is applied to categorical design variables (that is, strata, cluster, and subpopulation variables), the dependent variable, and any factors.

CLASSMISSING (keyword),CLASSMISSING (keyword),CLASSMISSING (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
EXCLUDE (keyword),EXCLUDE (keyword),EXCLUDE (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
INCLUDE (keyword),INCLUDE (keyword),INCLUDE (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
EXCLUDE | Exclude user-missing values among the strata, cluster, subpopulation, dependent variable, and factor variables. This is the default.
INCLUDE | Include user-missing values among the strata, cluster, subpopulation, dependent variable, and factor variables. Treat user-missing values for these variables as valid data.

Related Topics

CSCOXREG
Overview (CSCOXREG command)
Examples (CSCOXREG command)
Variable List Subcommand (CSCOXREG command)
VARIABLES Subcommand (CSCOXREG command)
PLAN Subcommand (CSCOXREG command)
JOINTPROB Subcommand (CSCOXREG command)
MODEL Subcommand (CSCOXREG command)
CUSTOM Subcommand (CSCOXREG command)
CRITERIA Subcommand (CSCOXREG command)
STATISTICS Subcommand (CSCOXREG command)
TEST Subcommand (CSCOXREG command)
TESTASSUMPTIONS Subcommand (CSCOXREG command)
DOMAIN Subcommand (CSCOXREG command)
SURVIVALMETHOD Subcommand (CSCOXREG command)
PRINT Subcommand (CSCOXREG command)
SAVE Subcommand (CSCOXREG command)
PLOT Subcommand (CSCOXREG command)
PATTERN Subcommand (CSCOXREG command)
OUTFILE Subcommand (CSCOXREG command)


SURVIVALMETHOD Subcommand (CSCOXREG command)

CSCOXREG (command),CSCOXREG (command),CSCOXREG (command)
SURVIVALMETHOD subcommand,SURVIVALMETHOD subcommand,SURVIVALMETHOD subcommand
SURVIVALMETHOD (subcommand),SURVIVALMETHOD (subcommand),SURVIVALMETHOD (subcommand)
CSCOXREG command,CSCOXREG command,CSCOXREG command

The SURVIVALMETHOD subcommand controls the methods for estimating baseline functions and the confidence interval of the survival function.

BASELINE (keyword),BASELINE (keyword),BASELINE (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
EFRON (keyword),EFRON (keyword),EFRON (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
BRESLOW (keyword),BRESLOW (keyword),BRESLOW (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
PRODUCTLIMIT (keyword),PRODUCTLIMIT (keyword),PRODUCTLIMIT (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
BASELINE Keyword Collapse Hide details

BASELINE Keyword

The BASELINE keyword controls the method for estimating baseline functions. Specify one of the following options.

EFRON | Efron method. Default if EFRON is chosen in TIES.
BRESLOW | Breslow method. Default if BRESLOW is chosen in TIES.
PRODUCTLIMIT | Product limit method.
CI (keyword),CI (keyword),CI (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
ORIGINAL (keyword),ORIGINAL (keyword),ORIGINAL (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
LOG (keyword),LOG (keyword),LOG (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
LML (keyword),LML (keyword),LML (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
CI Keyword Collapse Hide details

CI Keyword

The CI keyword controls the method for estimating the confidence interval of the survival function. Specify one of the following options.

ORIGINAL | Based on original scale. Calculate the confidence interval for the survival function directly.
LOG | Based on log scale. Calculate the confidence interval for ln(survival) first, then back transform to get the confidence interval for the survival function.
LML | Based on log-log scale. Calculate the confidence interval for ln(−ln(survival)) first, then back transform to get the confidence interval for the survival function.

Related Topics

CSCOXREG
Overview (CSCOXREG command)
Examples (CSCOXREG command)
Variable List Subcommand (CSCOXREG command)
VARIABLES Subcommand (CSCOXREG command)
PLAN Subcommand (CSCOXREG command)
JOINTPROB Subcommand (CSCOXREG command)
MODEL Subcommand (CSCOXREG command)
CUSTOM Subcommand (CSCOXREG command)
CRITERIA Subcommand (CSCOXREG command)
STATISTICS Subcommand (CSCOXREG command)
TEST Subcommand (CSCOXREG command)
TESTASSUMPTIONS Subcommand (CSCOXREG command)
DOMAIN Subcommand (CSCOXREG command)
MISSING Subcommand (CSCOXREG command)
PRINT Subcommand (CSCOXREG command)
SAVE Subcommand (CSCOXREG command)
PLOT Subcommand (CSCOXREG command)
PATTERN Subcommand (CSCOXREG command)
OUTFILE Subcommand (CSCOXREG command)


PRINT Subcommand (CSCOXREG command)

CSCOXREG (command),CSCOXREG (command),CSCOXREG (command)
PRINT subcommand,PRINT subcommand,PRINT subcommand
PRINT (subcommand),PRINT (subcommand),PRINT (subcommand)
CSCOXREG command,CSCOXREG command,CSCOXREG command

The PRINT subcommand is used to display optional output.

• If the PRINT subcommand is not specified, then the default output includes sample information, variable and factor information, and model summary statistics.

• If the PRINT subcommand is specified, then CSCOXREG displays output only for those keywords that are specified.

SAMPLEINFO (keyword),SAMPLEINFO (keyword),SAMPLEINFO (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
EVENTINFO (keyword),EVENTINFO (keyword),EVENTINFO (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
RISKINFO (keyword),RISKINFO (keyword),RISKINFO (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
HISTORY (keyword),HISTORY (keyword),HISTORY (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
GEF (keyword),GEF (keyword),GEF (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
LMATRIX (keyword),LMATRIX (keyword),LMATRIX (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
COVB (keyword),COVB (keyword),COVB (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
CORB (keyword),CORB (keyword),CORB (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
BASELINE (keyword),BASELINE (keyword),BASELINE (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
NONE (keyword),NONE (keyword),NONE (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
SAMPLEINFO | Sample information table. Displays summary information about the sample, including the unweighted count, the event and censoring counts, and the population size. This is default output if the PRINT subcommand is not specified.
EVENTINFO | Event and censoring information. Displays event and censoring information for each baseline stratum. This is the default output if the PRINT subcommand is not specified.
RISKINFO | Risk and event information. Displays number of events and number at risk for each event time in each baseline stratum.
HISTORY(n) | Iteration history. Displays coefficient estimates and statistics at every nth iteration beginning with the 0th iteration (the initial estimates). The default is to print every iteration (n = 1). The last iteration is always printed if HISTORY is specified, regardless of the value of n.
GEF | General estimable function table.
LMATRIX | Set of contrast coefficients (L) matrices. These are the Type III contrast matrices used in testing model effects.
COVB | Covariance matrix for model parameters.
CORB | Correlation matrix for model parameters.
BASELINE | Baseline functions. Displays the baseline survival function, baseline cumulative hazards function and their standard errors. If time-dependent covariates defined by TIME PROGRAM are included in the model, no baseline functions are produced.
NONE | No PRINT output. None of the PRINT subcommand default output is displayed. However, if NONE is specified with one or more other keywords, then the other keywords override NONE.

Related Topics

CSCOXREG
Overview (CSCOXREG command)
Examples (CSCOXREG command)
Variable List Subcommand (CSCOXREG command)
VARIABLES Subcommand (CSCOXREG command)
PLAN Subcommand (CSCOXREG command)
JOINTPROB Subcommand (CSCOXREG command)
MODEL Subcommand (CSCOXREG command)
CUSTOM Subcommand (CSCOXREG command)
CRITERIA Subcommand (CSCOXREG command)
STATISTICS Subcommand (CSCOXREG command)
TEST Subcommand (CSCOXREG command)
TESTASSUMPTIONS Subcommand (CSCOXREG command)
DOMAIN Subcommand (CSCOXREG command)
MISSING Subcommand (CSCOXREG command)
SURVIVALMETHOD Subcommand (CSCOXREG command)
SAVE Subcommand (CSCOXREG command)
PLOT Subcommand (CSCOXREG command)
PATTERN Subcommand (CSCOXREG command)
OUTFILE Subcommand (CSCOXREG command)


SAVE Subcommand (CSCOXREG command)

CSCOXREG (command),CSCOXREG (command),CSCOXREG (command)
SAVE subcommand,SAVE subcommand,SAVE subcommand
SAVE (subcommand),SAVE (subcommand),SAVE (subcommand)
CSCOXREG command,CSCOXREG command,CSCOXREG command

The SAVE subcommand writes optional model variables to the working data file.

• Specify one or more temporary variables, each followed by an optional new name in parentheses.

• The optional names must be valid variable names.

• If new names are not specified, CSCOXREG uses the default names.

• The optional variable name must be unique. If the default name is used and it conflicts with existing variable names, then a suffix is added to the default name to make it unique.

• If a subpopulation is defined on the DOMAIN subcommand, then SAVE applies only to cases within the subpopulation.

• Aggregated residuals are residuals aggregated over records with the same ID value. If ID is not specified, aggregated residuals are not available and a warning is issued if they are requested. The aggregated residual for a subject is written in the last case (or first case if it is easier) of that subject.

• If time-dependent covariates defined by TIME PROGRAM are included in the model, the following options are not available: MARTINGALE, DEVIANCE, COXSNELL, AGGMARTINGALE, AGGDEVIANCE, AGGCOXSNELL, SURVIVAL, LCL_SURVIVAL, UCL_SURVIVAL, CUMHAZARD, LCL_CUMHAZARD, and UCL_CUMHAZARD. A warning is issued if they are requested.

• In situations when rootname is needed, the rootname can be followed by a colon and a positive integer giving the maximum number of variables with the same rootname to be saved. The first n variables are saved. The default n is 25. To specify n without a rootname, enter a colon before the number.

SCHOENFELD (keyword),SCHOENFELD (keyword),SCHOENFELD (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
MARTINGALE (keyword),MARTINGALE (keyword),MARTINGALE (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
DEVIANCE (keyword),DEVIANCE (keyword),DEVIANCE (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
COXSNELL (keyword),COXSNELL (keyword),COXSNELL (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
SCORE (keyword),SCORE (keyword),SCORE (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
DFBETA (keyword),DFBETA (keyword),DFBETA (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
AGGMARTINGALE (keyword),AGGMARTINGALE (keyword),AGGMARTINGALE (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
AGGDEVIANCE (keyword),AGGDEVIANCE (keyword),AGGDEVIANCE (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
AGGCOXSNELL (keyword),AGGCOXSNELL (keyword),AGGCOXSNELL (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
AGGSCORE (keyword),AGGSCORE (keyword),AGGSCORE (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
AGGDFBETA (keyword),AGGDFBETA (keyword),AGGDFBETA (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
XBETA (keyword),XBETA (keyword),XBETA (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
SURVIVAL (keyword),SURVIVAL (keyword),SURVIVAL (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
LCL_SURVIVAL (keyword),LCL_SURVIVAL (keyword),LCL_SURVIVAL (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
UCL_SURVIVAL (keyword),UCL_SURVIVAL (keyword),UCL_SURVIVAL (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
CUMHAZARD (keyword),CUMHAZARD (keyword),CUMHAZARD (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
LCL_CUMHAZARD (keyword),LCL_CUMHAZARD (keyword),LCL_CUMHAZARD (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
UCL_CUMHAZARD (keyword),UCL_CUMHAZARD (keyword),UCL_CUMHAZARD (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
SCHOENFELD(rootname:n)
 | Schoenfeld residual. A separate variable is saved for each nonredundant parameter and calculated only for noncensored observations. The default variable name is Resid_Schoenfeld.
MARTINGALE(varname)
 | Martingale residual. The default variable name is Resid_Martingale.
DEVIANCE(varname)
 | Deviance residual. The default variable name is Resid_Deviance.
COXSNELL(varname)
 | Cox_Snell residual. The default variable name is Resid_CoxSnell.
SCORE(rootname:n)
 | Score residual. A separate variable is saved for each nonredundant parameter. The default variable name is Resid_Score.
DFBETA(rootname:n)
 | DFBETA. A separate variable is saved for each nonredundant parameter. The default variable name is Resid_DFBETA.
AGGMARTINGALE(varname)
 | Aggregated Martingale residual. The default variable name is AggResid_Martingale.
AGGDEVIANCE(varname)
 | Aggregated Deviance residual. The default variable name is AggResid_Deviance.
AGGCOXSNELL(varname)
 | Aggregated CoxSnell residual. The default variable name is AggResid_CoxSnell.
AGGSCORE(rootname:n)
 | Aggregated Score residual. A separate variable is saved for each nonredundant parameter. The default variable name is AggResid_Score.
AGGDFBETA(rootname:n)
 | Aggregated DFBETA. A separate variable is saved for each nonredundant parameter. The default variable name is AggResid_DFBETA.
XBETA(varname)
 | Linear combination of reference value corrected predictors times regression coefficients. The default variable name is XBETA.
SURVIVAL(varname)
 | Survival function. For one-time input data, it is the survival function at the observed time and predictor pattern for each record. For two-time input data, it is the survival function at endtime assuming that the predictor is fixed. The default variable name is Survival.
LCL_SURVIVAL(varname)
 | Lower confidence level of survival function. The default variable name is LCL_Survival.
UCL_SURVIVAL(varname)
 | Upper confidence level of survival function. The default variable name is UCL_Survival.
CUMHAZARD(varname)
 | Cumulative hazards function. The default variable name is CumHazard.
LCL_CUMHAZARD(varname)
 | Lower confidence level of cumulative hazards function. The default variable name is LCL_CumHazard.
UCL_CUMHAZARD(varname)
 | Upper confidence level of cumulative hazards function. The default variable name is SECumHazard.

Related Topics

CSCOXREG
Overview (CSCOXREG command)
Examples (CSCOXREG command)
Variable List Subcommand (CSCOXREG command)
VARIABLES Subcommand (CSCOXREG command)
PLAN Subcommand (CSCOXREG command)
JOINTPROB Subcommand (CSCOXREG command)
MODEL Subcommand (CSCOXREG command)
CUSTOM Subcommand (CSCOXREG command)
CRITERIA Subcommand (CSCOXREG command)
STATISTICS Subcommand (CSCOXREG command)
TEST Subcommand (CSCOXREG command)
TESTASSUMPTIONS Subcommand (CSCOXREG command)
DOMAIN Subcommand (CSCOXREG command)
MISSING Subcommand (CSCOXREG command)
SURVIVALMETHOD Subcommand (CSCOXREG command)
PRINT Subcommand (CSCOXREG command)
PLOT Subcommand (CSCOXREG command)
PATTERN Subcommand (CSCOXREG command)
OUTFILE Subcommand (CSCOXREG command)


PLOT Subcommand (CSCOXREG command)

CSCOXREG (command),CSCOXREG (command),CSCOXREG (command)
PLOT subcommand,PLOT subcommand,PLOT subcommand
PLOT (subcommand),PLOT (subcommand),PLOT (subcommand)
CSCOXREG command,CSCOXREG command,CSCOXREG command

You can request specific plots to be produced with the PLOT subcommand. Each requested plot is produced once for each pattern specified on the PATTERN subcommand.

• The set of plots requested is displayed for the functions at the mean of the covariates and at each combination of covariate values specified on PATTERN.

• Lines on a plot are connected as step functions.

SURVIVAL (keyword),SURVIVAL (keyword),SURVIVAL (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
HAZARD (keyword),HAZARD (keyword),HAZARD (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
LML (keyword),LML (keyword),LML (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
OMS (keyword),OMS (keyword),OMS (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
CI (keyword),CI (keyword),CI (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
SURVIVAL | Plot the survival function.
HAZARD | Plot the cumulative hazard function.
LML | Plot the log-minus-log-of-survival function.
OMS | Plot the one-minus-survival function.
CI = NO | YES | Plot confidence intervals along with the specified functions. NO is the default.

Related Topics

CSCOXREG
Overview (CSCOXREG command)
Examples (CSCOXREG command)
Variable List Subcommand (CSCOXREG command)
VARIABLES Subcommand (CSCOXREG command)
PLAN Subcommand (CSCOXREG command)
JOINTPROB Subcommand (CSCOXREG command)
MODEL Subcommand (CSCOXREG command)
CUSTOM Subcommand (CSCOXREG command)
CRITERIA Subcommand (CSCOXREG command)
STATISTICS Subcommand (CSCOXREG command)
TEST Subcommand (CSCOXREG command)
TESTASSUMPTIONS Subcommand (CSCOXREG command)
DOMAIN Subcommand (CSCOXREG command)
MISSING Subcommand (CSCOXREG command)
SURVIVALMETHOD Subcommand (CSCOXREG command)
PRINT Subcommand (CSCOXREG command)
SAVE Subcommand (CSCOXREG command)
PATTERN Subcommand (CSCOXREG command)
OUTFILE Subcommand (CSCOXREG command)


PATTERN Subcommand (CSCOXREG command)

CSCOXREG (command),CSCOXREG (command),CSCOXREG (command)
PATTERN subcommand,PATTERN subcommand,PATTERN subcommand
PATTERN (subcommand),PATTERN (subcommand),PATTERN (subcommand)
CSCOXREG command,CSCOXREG command,CSCOXREG command

PATTERN specifies the pattern of predictor values to be used for requested plots on the PLOT subcommand and the exported survival file on the OUTFILE subcommand. PATTERN cannot be used when time-dependent predictors calculated by TIME PROGRAM are included in the model.

• A value must be specified for each variable specified on PATTERN.

• Covariates that are included in the model but not named on PATTERN are evaluated at their means.

• Factors that are included in the model but not named on PATTERN are evaluated at the reference category.

• You can request separate lines for each category of a factor that is in the model. Specify the name of the categorical variable after the keyword BY. The BY variable must be a categorical variable. You cannot specify a value for the BY variable.

• Multiple PATTERN subcommands can be specified. CSCOXREG produces a set of requested plots for each specified pattern.

• Piecewise constant predictor paths are also allowed. The path is specified by endtime(valuelist) varname(valuelist) varname(value)…. If varname(valuelist) is used, the length of valuelist must be the same as that for endtime. The varname(value) means that the value of the variable is constant over time.

Example

CSCOXREG t by A with x1 x2
/VARIABLES STATUS=dead(1)
/PLAN FILE=’c:\survey\myfile.csplan’
/PATTERN x1(0.1) x2(3) A(3)
/PLOT SURVIVAL.

• Predictor pattern x1 = 0.1, x2 = 3, A = 3 is specified by PATTERN.

• The survival function is plotted for the specified pattern.

Example: Piecewise constant predictor path

CSCOXREG t1 t2 by A with x1 x2
/VARIABLES STATUS=dead(1)
/PLAN FILE=’c:\survey\myfile.csplan’.
/PATTERN t2(10 20 30 50) x1(1 1.2 1.7 1.9) x2(3) BY A
/OUTFILE SURVIVAL='surv.sav'.

• Two time variables are specified on the CSCOXREG variable list.

• PATTERN defines the following predictor paths for x1 and x2.

starttime | endtime | x1 | x2
0 | 10 | 1.0 | 3
10 | 20 | 1.2 | 3
20 | 30 | 1.7 | 3
30 | 50 | 1.9 | 3

• PATTERN, through BY A, also specifies that each category of factor A is considered separately. Combining different categories of A with the paths for x1 and x2, the total number of paths considered here actually equals the number of categories of A.

• The survival table for the specified predictor paths are calculated and written to the file surv.sav.

Related Topics

CSCOXREG
Overview (CSCOXREG command)
Examples (CSCOXREG command)
Variable List Subcommand (CSCOXREG command)
VARIABLES Subcommand (CSCOXREG command)
PLAN Subcommand (CSCOXREG command)
JOINTPROB Subcommand (CSCOXREG command)
MODEL Subcommand (CSCOXREG command)
CUSTOM Subcommand (CSCOXREG command)
CRITERIA Subcommand (CSCOXREG command)
STATISTICS Subcommand (CSCOXREG command)
TEST Subcommand (CSCOXREG command)
TESTASSUMPTIONS Subcommand (CSCOXREG command)
DOMAIN Subcommand (CSCOXREG command)
MISSING Subcommand (CSCOXREG command)
SURVIVALMETHOD Subcommand (CSCOXREG command)
PRINT Subcommand (CSCOXREG command)
SAVE Subcommand (CSCOXREG command)
PLOT Subcommand (CSCOXREG command)
OUTFILE Subcommand (CSCOXREG command)


OUTFILE Subcommand (CSCOXREG command)

CSCOXREG (command),CSCOXREG (command),CSCOXREG (command)
OUTFILE subcommand,OUTFILE subcommand,OUTFILE subcommand
OUTFILE (subcommand),OUTFILE (subcommand),OUTFILE (subcommand)
CSCOXREG command,CSCOXREG command,CSCOXREG command

The OUTFILE subcommand saves an external PASW Statistics data file or previously declared dataset containing the parameter covariance or correlation matrix with parameter estimates, standard errors, significance values, and sampling design degrees of freedom. It also saves the parameter estimates and the parameter covariance matrix in XML format.

• At least one keyword and a filename are required.

• The COVB and CORB keywords are mutually exclusive, as are the MODEL and PARAMETER keywords.

• The filename must be specified in full. CSCOXREG does not supply an extension.

COVB (keyword),COVB (keyword),COVB (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
CORB (keyword),CORB (keyword),CORB (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
MODEL (keyword),MODEL (keyword),MODEL (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
SURVIVAL (keyword),SURVIVAL (keyword),SURVIVAL (keyword)
CSCOXREG command,CSCOXREG command,CSCOXREG command
COVB = 'savfile'|'dataset'
 | Writes the parameter covariance matrix and other statistics to an external PASW Statistics data file or previously declared dataset.
CORB = 'savfile'|'dataset'
 | Writes the parameter correlation matrix and other statistics to an external PASW Statistics data file or previously declared dataset.
MODEL = 'file'
 | Writes all information needed to predict the survival function, including the parameter estimates and baseline survival function, to a PMML file.
SURVIVAL= 'savfile'|'dataset'
 | Writes survival table to an external PASW Statistics data file or previously declared dataset. The file contains the survival function, standard error of the survival function, upper and lower bounds of the confidence interval of the survival function, and the cumulative hazards function for each failure or event time evaluated at the baseline and at the covariate patterns specified on PATTERN. If time-dependent covariates are included in the model, no file is written.

Related Topics

CSCOXREG
Overview (CSCOXREG command)
Examples (CSCOXREG command)
Variable List Subcommand (CSCOXREG command)
VARIABLES Subcommand (CSCOXREG command)
PLAN Subcommand (CSCOXREG command)
JOINTPROB Subcommand (CSCOXREG command)
MODEL Subcommand (CSCOXREG command)
CUSTOM Subcommand (CSCOXREG command)
CRITERIA Subcommand (CSCOXREG command)
STATISTICS Subcommand (CSCOXREG command)
TEST Subcommand (CSCOXREG command)
TESTASSUMPTIONS Subcommand (CSCOXREG command)
DOMAIN Subcommand (CSCOXREG command)
MISSING Subcommand (CSCOXREG command)
SURVIVALMETHOD Subcommand (CSCOXREG command)
PRINT Subcommand (CSCOXREG command)
SAVE Subcommand (CSCOXREG command)
PLOT Subcommand (CSCOXREG command)
PATTERN Subcommand (CSCOXREG command)


CSDESCRIPTIVES

Complex Samples Descriptives,Complex Samples Descriptives,Complex Samples Descriptives
command syntax,command syntax,command syntax
CSDESCRIPTIVES (command),CSDESCRIPTIVES (command),CSDESCRIPTIVES (command)
CSDESCRIPTIVES (command),CSDESCRIPTIVES (command),CSDESCRIPTIVES (command)
syntax chart,syntax chart,syntax chart

CSDESCRIPTIVES is available in the Complex Samples option.

CSDESCRIPTIVES

/PLAN FILE = file

[/JOINTPROB FILE = file]

[/SUMMARY VARIABLES = varlist]

[/MEAN [TTEST = {value    }]
                {valuelist}

[/SUM [TTEST = {value    }]
               {valuelist}

[/RATIO NUMERATOR = varlist DENOMINATOR = varlist

        [TTEST = {value    }]]
                 {valuelist}

[/RATIO...]

[/STATISTICS [COUNT] [POPSIZE] [SE] [CV] [DEFF] [DEFFSQRT]
             [CIN [({95** })]]]
                    {value}

[/SUBPOP TABLE = varname [BY varname [BY ...]] [DISPLAY = {LAYERED }]]
                                                          {SEPARATE}

[/MISSING [SCOPE = {ANALYSIS}] [CLASSMISSING = {EXCLUDE}]]
                   {LISTWISE}                  {INCLUDE}

**Default if the subcommand is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See CSDESCRIPTIVES Algorithms for computational details for this procedure.

Syntax for the CSDESCRIPTIVES command can be generated from the Complex Samples Descriptives dialog.

Example

CSDESCRIPTIVES
  /PLAN FILE = ‘/survey/myfile.xml’
  /SUMMARY VARIABLES = y1 y2
  /MEAN.

Related Topics

Overview (CSDESCRIPTIVES command)
Examples (CSDESCRIPTIVES command)
PLAN Subcommand (CSDESCRIPTIVES command)
JOINTPROB Subcommand (CSDESCRIPTIVES command)
SUMMARY Subcommand (CSDESCRIPTIVES command)
MEAN Subcommand (CSDESCRIPTIVES command)
SUM Subcommand (CSDESCRIPTIVES command)
RATIO Subcommand (CSDESCRIPTIVES command)
STATISTICS Subcommand (CSDESCRIPTIVES command)
SUBPOP Subcommand (CSDESCRIPTIVES command)
MISSING Subcommand (CSDESCRIPTIVES command)


Overview (CSDESCRIPTIVES command)

CSDESCRIPTIVES estimates means, sums, and ratios, and computes their standard errors, design effects, confidence intervals, and hypothesis tests, for samples that are drawn by complex sampling methods. The procedure estimates variances by taking into account the sample design that is used to select the sample, including equal probability and probability proportional to size (PPS) methods, and with replacement (WR) and without replacement (WOR) sampling procedures. Optionally, CSDESCRIPTIVES performs analyses for subpopulations.

Basic Specification Collapse Hide details

Basic Specification

• The basic specification is a PLAN subcommand and the name of a complex sample analysis plan file (which may be generated by the CSPLAN procedure) and a MEAN, SUM, or RATIO subcommand. If a MEAN or SUM subcommand is specified, a SUMMARY subcommand must also be present.

• The basic specification displays the overall population size estimate. Additional subcommands must be used for other results.

Operations Collapse Hide details

Operations

• CSDESCRIPTIVES computes estimates for sampling designs that are supported by the CSPLAN and CSSELECT procedures.

• The input dataset must contain the variables to be analyzed and variables that are related to the sampling design.

• The complex sample analysis plan file provides an analysis plan based on the sampling design.

• The default output for each requested mean, sum, or ratio is the estimate and its standard error.

• WEIGHT and SPLIT FILE settings are ignored by the CSDESCRIPTIVES procedure.

Syntax Rules Collapse Hide details

Syntax Rules

• The PLAN subcommand is required. In addition, the SUMMARY subcommand and the MEAN or SUM subcommand must be specified, or the RATIO subcommand must be specified. All other subcommands are optional.

• Multiple instances of the RATIO subcommand are allowed—each instance is treated independently. All other subcommands may be specified only once.

• Subcommands can be specified in any order.

• All subcommand names and keywords must be spelled in full.

• Equals signs (=) that are shown in the syntax chart are required.

• The MEAN and SUM subcommands can be specified without further keywords, but no other subcommands may be empty.

Related Topics

CSDESCRIPTIVES
Examples (CSDESCRIPTIVES command)
PLAN Subcommand (CSDESCRIPTIVES command)
JOINTPROB Subcommand (CSDESCRIPTIVES command)
SUMMARY Subcommand (CSDESCRIPTIVES command)
MEAN Subcommand (CSDESCRIPTIVES command)
SUM Subcommand (CSDESCRIPTIVES command)
RATIO Subcommand (CSDESCRIPTIVES command)
STATISTICS Subcommand (CSDESCRIPTIVES command)
SUBPOP Subcommand (CSDESCRIPTIVES command)
MISSING Subcommand (CSDESCRIPTIVES command)


Examples (CSDESCRIPTIVES command)

Example: Univariate Descriptive Statistics

* Complex Samples Descriptives.
CSDESCRIPTIVES
 /PLAN FILE = 'samplesDirectory\nhis2000_subset.csaplan'
 /JOINTPROB FILE = 'samplesDirectory\nhis2000_subset.sav'
 /SUMMARY VARIABLES =VIGFREQW MODFREQW STRFREQW
 /SUBPOP TABLE = age_cat  DISPLAY=LAYERED
 /MEAN
 /STATISTICS SE CIN (95)
 /MISSING SCOPE = ANALYSIS CLASSMISSING = EXCLUDE.

• The procedure computes estimates based on the complex sample analysis plan that is given in nhis2000_subset.csaplan.

• The procedure estimates the mean, its standard error, and 95% confidence interval for variables vigfreqw, modfreqw, and strfreqw.

• In addition, these statistics are computed for the variables by values of age_cat. The results for subpopulations are displayed in a single table.

• Other subcommands and keywords are set to their default values.

For discussion of output from this syntax and to place the example in context, see Using Complex Samples Descriptives to Analyze Activity Levels.

Example: Ratio Statistics

* Complex Samples Ratios.
CSDESCRIPTIVES
 /PLAN FILE = 'samplesDirectory\property_assess.csplan'
 /RATIO NUMERATOR = currval  DENOMINATOR = lastval  TTEST = 1.3
 /STATISTICS SE COUNT POPSIZE CIN (95)
 /SUBPOP TABLE = county  DISPLAY=LAYERED
 /MISSING SCOPE = ANALYSIS CLASSMISSING = EXCLUDE.

• The procedure computes estimates based on the complex sample analysis plan that is given in property_assess.csplan.

• The ratio estimate for currval/lastval, its standard error, 95% confidence interval, observed count of cases used in the computations, and estimated population size are displayed.

• A t test of the ratio is performed against a hypothesized value of 1.3.

• In addition, these statistics are computed for the variables by values of county. The results for subpopulations are displayed in a single table.

• Other subcommands and keywords are set to their default values.

For discussion of output from this syntax and to place the example in context, see Using Complex Samples Ratios to Aid Property Value Assessment.

Related Topics

CSDESCRIPTIVES
Overview (CSDESCRIPTIVES command)
PLAN Subcommand (CSDESCRIPTIVES command)
JOINTPROB Subcommand (CSDESCRIPTIVES command)
SUMMARY Subcommand (CSDESCRIPTIVES command)
MEAN Subcommand (CSDESCRIPTIVES command)
SUM Subcommand (CSDESCRIPTIVES command)
RATIO Subcommand (CSDESCRIPTIVES command)
STATISTICS Subcommand (CSDESCRIPTIVES command)
SUBPOP Subcommand (CSDESCRIPTIVES command)
MISSING Subcommand (CSDESCRIPTIVES command)


PLAN Subcommand (CSDESCRIPTIVES command)

PLAN (subcommand),PLAN (subcommand),PLAN (subcommand)
CSDESCRIPTIVES command,CSDESCRIPTIVES command,CSDESCRIPTIVES command
CSDESCRIPTIVES (command),CSDESCRIPTIVES (command),CSDESCRIPTIVES (command)
PLAN subcommand,PLAN subcommand,PLAN subcommand

PLAN specifies the name of an XML file containing analysis design specifications. This file is written by the CSPLAN procedure.

• The PLAN subcommand is required.

FILE (keyword),FILE (keyword),FILE (keyword)
CSDESCRIPTIVES command,CSDESCRIPTIVES command,CSDESCRIPTIVES command
FILE Specifies the name of an external file.

Related Topics

CSDESCRIPTIVES
Overview (CSDESCRIPTIVES command)
Examples (CSDESCRIPTIVES command)
JOINTPROB Subcommand (CSDESCRIPTIVES command)
SUMMARY Subcommand (CSDESCRIPTIVES command)
MEAN Subcommand (CSDESCRIPTIVES command)
SUM Subcommand (CSDESCRIPTIVES command)
RATIO Subcommand (CSDESCRIPTIVES command)
STATISTICS Subcommand (CSDESCRIPTIVES command)
SUBPOP Subcommand (CSDESCRIPTIVES command)
MISSING Subcommand (CSDESCRIPTIVES command)


JOINTPROB Subcommand (CSDESCRIPTIVES command)

JOINTPROB (subcommand),JOINTPROB (subcommand),JOINTPROB (subcommand)
CSDESCRIPTIVES command,CSDESCRIPTIVES command,CSDESCRIPTIVES command
CSDESCRIPTIVES (command),CSDESCRIPTIVES (command),CSDESCRIPTIVES (command)
JOINTPROB subcommand,JOINTPROB subcommand,JOINTPROB subcommand

JOINTPROB is used to specify the file or dataset containing the first-stage joint inclusion probabilities for UNEQUAL_WOR estimation. The CSSELECT procedure writes this file in the same location and with the same name (but different extension) as the plan file. When UNEQUAL_WOR estimation is specified, the CSDESCRIPTIVES procedure will use the default location and name of the file unless the JOINTPROB subcommand is used to override them.

FILE (keyword),FILE (keyword),FILE (keyword)
CSDESCRIPTIVES command,CSDESCRIPTIVES command,CSDESCRIPTIVES command
FILE Specifies the name of the file or dataset containing the joint inclusion probabilities.

Related Topics

CSDESCRIPTIVES
Overview (CSDESCRIPTIVES command)
Examples (CSDESCRIPTIVES command)
PLAN Subcommand (CSDESCRIPTIVES command)
SUMMARY Subcommand (CSDESCRIPTIVES command)
MEAN Subcommand (CSDESCRIPTIVES command)
SUM Subcommand (CSDESCRIPTIVES command)
RATIO Subcommand (CSDESCRIPTIVES command)
STATISTICS Subcommand (CSDESCRIPTIVES command)
SUBPOP Subcommand (CSDESCRIPTIVES command)
MISSING Subcommand (CSDESCRIPTIVES command)


SUMMARY Subcommand (CSDESCRIPTIVES command)

SUMMARY (subcommand),SUMMARY (subcommand),SUMMARY (subcommand)
CSDESCRIPTIVES command,CSDESCRIPTIVES command,CSDESCRIPTIVES command
CSDESCRIPTIVES (command),CSDESCRIPTIVES (command),CSDESCRIPTIVES (command)
SUMMARY subcommand,SUMMARY subcommand,SUMMARY subcommand

SUMMARY specifies the analysis variables that are used by the MEAN and SUM subcommands.

• A variable list is required only if means or sums are to be estimated. If only ratios are to be estimated (that is, if the RATIO subcommand is specified but the MEAN and SUM subcommands are not specified), the SUMMARY subcommand is ignored.

• All specified variables must be numeric.

• All specified variables must be unique.

• Plan file and subpopulation variables may not be specified on the SUMMARY subcommand.

FILE (keyword),FILE (keyword),FILE (keyword)
CSDESCRIPTIVES command,CSDESCRIPTIVES command,CSDESCRIPTIVES command
VARIABLES Specifies the variables used by the MEAN and SUM subcommands.

Related Topics

CSDESCRIPTIVES
Overview (CSDESCRIPTIVES command)
Examples (CSDESCRIPTIVES command)
PLAN Subcommand (CSDESCRIPTIVES command)
JOINTPROB Subcommand (CSDESCRIPTIVES command)
MEAN Subcommand (CSDESCRIPTIVES command)
SUM Subcommand (CSDESCRIPTIVES command)
RATIO Subcommand (CSDESCRIPTIVES command)
STATISTICS Subcommand (CSDESCRIPTIVES command)
SUBPOP Subcommand (CSDESCRIPTIVES command)
MISSING Subcommand (CSDESCRIPTIVES command)


MEAN Subcommand (CSDESCRIPTIVES command)

MEAN (subcommand),MEAN (subcommand),MEAN (subcommand)
CSDESCRIPTIVES command,CSDESCRIPTIVES command,CSDESCRIPTIVES command
CSDESCRIPTIVES (command),CSDESCRIPTIVES (command),CSDESCRIPTIVES (command)
MEAN subcommand,MEAN subcommand,MEAN subcommand

MEAN is used to request that means be estimated for variables that are specified on the SUMMARY subcommand.

TTEST (keyword),TTEST (keyword),TTEST (keyword)
CSDESCRIPTIVES command,CSDESCRIPTIVES command,CSDESCRIPTIVES command

The TTEST keyword requests t tests of the population means(s) and gives the null hypothesis value(s). If subpopulations are defined on the SUBPOP subcommand, null hypothesis values are used in the test(s) for each subpopulation, as well as for the entire population.

value | The null hypothesis is that the population mean equals the specified value for all t tests.
valuelist | This list gives the null hypothesis value of the population mean for each variable on the SUMMARY subcommand. The number and order of values must correspond to the variables on the SUMMARY subcommand.

• Commas or spaces must be used to separate the values.

Related Topics

CSDESCRIPTIVES
Overview (CSDESCRIPTIVES command)
Examples (CSDESCRIPTIVES command)
PLAN Subcommand (CSDESCRIPTIVES command)
JOINTPROB Subcommand (CSDESCRIPTIVES command)
SUMMARY Subcommand (CSDESCRIPTIVES command)
SUM Subcommand (CSDESCRIPTIVES command)
RATIO Subcommand (CSDESCRIPTIVES command)
STATISTICS Subcommand (CSDESCRIPTIVES command)
SUBPOP Subcommand (CSDESCRIPTIVES command)
MISSING Subcommand (CSDESCRIPTIVES command)


SUM Subcommand (CSDESCRIPTIVES command)

SUM (subcommand),SUM (subcommand),SUM (subcommand)
CSDESCRIPTIVES command,CSDESCRIPTIVES command,CSDESCRIPTIVES command
CSDESCRIPTIVES (command),CSDESCRIPTIVES (command),CSDESCRIPTIVES (command)
SUM subcommand,SUM subcommand,SUM subcommand

SUM is used to request that sums be estimated for variables specified on the SUMMARY subcommand.

TTEST (keyword),TTEST (keyword),TTEST (keyword)
CSDESCRIPTIVES command,CSDESCRIPTIVES command,CSDESCRIPTIVES command

The TTEST keyword requests t tests of the population sum(s) and gives the null hypothesis value(s). If subpopulations are defined on the SUBPOP subcommand, then null hypothesis values are used in the test(s) for each subpopulation as well as for the entire population.

value | The null hypothesis is that the population sum equals the specified value for all t tests.
valuelist | This list gives the null hypothesis value of the population sum for each variable on the SUMMARY subcommand. The number and order of values must correspond to the variables on the SUMMARY subcommand.

• Commas or spaces must be used to separate the values.

Related Topics

CSDESCRIPTIVES
Overview (CSDESCRIPTIVES command)
Examples (CSDESCRIPTIVES command)
PLAN Subcommand (CSDESCRIPTIVES command)
JOINTPROB Subcommand (CSDESCRIPTIVES command)
SUMMARY Subcommand (CSDESCRIPTIVES command)
MEAN Subcommand (CSDESCRIPTIVES command)
RATIO Subcommand (CSDESCRIPTIVES command)
STATISTICS Subcommand (CSDESCRIPTIVES command)
SUBPOP Subcommand (CSDESCRIPTIVES command)
MISSING Subcommand (CSDESCRIPTIVES command)


RATIO Subcommand (CSDESCRIPTIVES command)

RATIO (subcommand),RATIO (subcommand),RATIO (subcommand)
CSDESCRIPTIVES command,CSDESCRIPTIVES command,CSDESCRIPTIVES command
CSDESCRIPTIVES (command),CSDESCRIPTIVES (command),CSDESCRIPTIVES (command)
RATIO subcommand,RATIO subcommand,RATIO subcommand

RATIO specifies ratios of variables to be estimated.

• Ratios are defined by crossing variables on the NUMERATOR keyword with variables on the DENOMINATOR keyword, with DENOMINATOR variables looping fastest, irrespective of the order of the keywords. For example, /RATIO NUMERATOR = N1 N2 DENOMINATOR = D1 D2 yields the following ordered list of ratios: N1/D1, N1/D2, N2/D1, N2/D2.

• Multiple RATIO subcommands are allowed. Each subcommand is treated independently.

• Variables that are specified on the RATIO subcommand do not need to be specified on the SUMMARY subcommand.

• All specified variables must be numeric.

• Within each variable list, all specified variables must be unique.

• Plan file and subpopulation variables may not be specified on the RATIO subcommand.

TTEST (keyword),TTEST (keyword),TTEST (keyword)
CSDESCRIPTIVES command,CSDESCRIPTIVES command,CSDESCRIPTIVES command

The TTEST keyword requests t tests of the population ratio(s) and gives the null hypothesis value(s). If subpopulations are defined on the SUBPOP subcommand, then null hypothesis values are used in the test(s) for each subpopulation as well as for the entire population.

value | The null hypothesis is that the population ratio equals the specified value for all t tests.
valuelist | This list gives the null hypothesis value of the population ratio for each ratio specified on the RATIO subcommand. The number and order of values must correspond to the ratios defined on the RATIO subcommand.

• Commas or spaces must be used to separate the values.

Related Topics

CSDESCRIPTIVES
Overview (CSDESCRIPTIVES command)
Examples (CSDESCRIPTIVES command)
PLAN Subcommand (CSDESCRIPTIVES command)
JOINTPROB Subcommand (CSDESCRIPTIVES command)
SUMMARY Subcommand (CSDESCRIPTIVES command)
MEAN Subcommand (CSDESCRIPTIVES command)
SUM Subcommand (CSDESCRIPTIVES command)
STATISTICS Subcommand (CSDESCRIPTIVES command)
SUBPOP Subcommand (CSDESCRIPTIVES command)
MISSING Subcommand (CSDESCRIPTIVES command)


STATISTICS Subcommand (CSDESCRIPTIVES command)

STATISTICS (subcommand),STATISTICS (subcommand),STATISTICS (subcommand)
CSDESCRIPTIVES command,CSDESCRIPTIVES command,CSDESCRIPTIVES command
CSDESCRIPTIVES (command),CSDESCRIPTIVES (command),CSDESCRIPTIVES (command)
STATISTICS subcommand,STATISTICS subcommand,STATISTICS subcommand

STATISTICS requests various statistics that are associated with the mean, sum, or ratio estimates. If the STATISTICS subcommand is not specified, the standard error is computed for any displayed estimates. If the STATISTICS subcommand is specified, only statistics that are requested are computed.

COUNT (keyword),COUNT (keyword),COUNT (keyword)
CSDESCRIPTIVES command,CSDESCRIPTIVES command,CSDESCRIPTIVES command
POPSIZE (keyword),POPSIZE (keyword),POPSIZE (keyword)
CSDESCRIPTIVES command,CSDESCRIPTIVES command,CSDESCRIPTIVES command
SE (keyword),SE (keyword),SE (keyword)
CSDESCRIPTIVES command,CSDESCRIPTIVES command,CSDESCRIPTIVES command
CV (keyword),CV (keyword),CV (keyword)
CSDESCRIPTIVES command,CSDESCRIPTIVES command,CSDESCRIPTIVES command
DEFF (keyword),DEFF (keyword),DEFF (keyword)
CSDESCRIPTIVES command,CSDESCRIPTIVES command,CSDESCRIPTIVES command
DEFFSQRT (keyword),DEFFSQRT (keyword),DEFFSQRT (keyword)
CSDESCRIPTIVES command,CSDESCRIPTIVES command,CSDESCRIPTIVES command
CIN (keyword),CIN (keyword),CIN (keyword)
CSDESCRIPTIVES command,CSDESCRIPTIVES command,CSDESCRIPTIVES command
COUNT | The number of valid observations in the dataset for each mean, sum, or ratio estimate.
POPSIZE | The population size for each mean, sum, or ratio estimate.
SE | The standard error for each mean, sum, or ratio estimate. This output is default output if the STATISTICS subcommand is not specified.
CV | Coefficient of variation.
DEFF | Design effect.
DEFFSQRT | Square root of the design effect.
CIN [(value)] | Confidence interval. If the CIN keyword is specified alone, the default 95% confidence interval is computed. Optionally, CIN may be followed by a value in parentheses, where 0 ≤ value < 100.

Related Topics

CSDESCRIPTIVES
Overview (CSDESCRIPTIVES command)
Examples (CSDESCRIPTIVES command)
PLAN Subcommand (CSDESCRIPTIVES command)
JOINTPROB Subcommand (CSDESCRIPTIVES command)
SUMMARY Subcommand (CSDESCRIPTIVES command)
MEAN Subcommand (CSDESCRIPTIVES command)
SUM Subcommand (CSDESCRIPTIVES command)
RATIO Subcommand (CSDESCRIPTIVES command)
SUBPOP Subcommand (CSDESCRIPTIVES command)
MISSING Subcommand (CSDESCRIPTIVES command)


SUBPOP Subcommand (CSDESCRIPTIVES command)

SUBPOP (subcommand),SUBPOP (subcommand),SUBPOP (subcommand)
CSDESCRIPTIVES command,CSDESCRIPTIVES command,CSDESCRIPTIVES command
CSDESCRIPTIVES (command),CSDESCRIPTIVES (command),CSDESCRIPTIVES (command)
SUBPOP subcommand,SUBPOP subcommand,SUBPOP subcommand

SUBPOP specifies subpopulations for which analyses are to be performed.

• The set of subpopulations is defined by specifying a single categorical variable or specifying two or more categorical variables, separated by the BY keyword, whose values are crossed.

• For example, /SUBPOP TABLE = A defines subpopulations based on the levels of variable A.

• For example, /SUBPOP TABLE = A BY B defines subpopulations based on crossing the levels of variables A and B.

• A maximum of 17 variables may be specified.

• Numeric or string variables may be specified.

• All specified variables must be unique.

• Stratification or cluster variables may be specified, but no other plan file variables are allowed on the SUBPOP subcommand.

• Analysis variables may not be specified on the SUBPOP subcommand.

• The BY keyword is used to separate variables.

DISPLAY (keyword),DISPLAY (keyword),DISPLAY (keyword)
CSDESCRIPTIVES command,CSDESCRIPTIVES command,CSDESCRIPTIVES command

The DISPLAY keyword specifies the layout of results for subpopulations.

LAYERED (keyword),LAYERED (keyword),LAYERED (keyword)
CSDESCRIPTIVES command,CSDESCRIPTIVES command,CSDESCRIPTIVES command
SEPARATE (keyword),SEPARATE (keyword),SEPARATE (keyword)
CSDESCRIPTIVES command,CSDESCRIPTIVES command,CSDESCRIPTIVES command
LAYERED | Results for all subpopulations are displayed in the same table. This is the default.
SEPARATE | Results for different subpopulations are displayed in different tables.

Related Topics

CSDESCRIPTIVES
Overview (CSDESCRIPTIVES command)
Examples (CSDESCRIPTIVES command)
PLAN Subcommand (CSDESCRIPTIVES command)
JOINTPROB Subcommand (CSDESCRIPTIVES command)
SUMMARY Subcommand (CSDESCRIPTIVES command)
MEAN Subcommand (CSDESCRIPTIVES command)
SUM Subcommand (CSDESCRIPTIVES command)
RATIO Subcommand (CSDESCRIPTIVES command)
STATISTICS Subcommand (CSDESCRIPTIVES command)
MISSING Subcommand (CSDESCRIPTIVES command)


MISSING Subcommand (CSDESCRIPTIVES command)

MISSING (subcommand),MISSING (subcommand),MISSING (subcommand)
CSDESCRIPTIVES command,CSDESCRIPTIVES command,CSDESCRIPTIVES command
CSDESCRIPTIVES (command),CSDESCRIPTIVES (command),CSDESCRIPTIVES (command)
MISSING subcommand,MISSING subcommand,MISSING subcommand

MISSING specifies how missing values are handled.

• All design variables must have valid data. Cases with invalid data for any design variable are deleted from the analysis.

SCOPE (keyword),SCOPE (keyword),SCOPE (keyword)
CSDESCRIPTIVES command,CSDESCRIPTIVES command,CSDESCRIPTIVES command

The SCOPE keyword specifies which cases are used in the analyses. This specification is applied to analysis variables but not design variables.

ANALYSIS (keyword),ANALYSIS (keyword),ANALYSIS (keyword)
CSDESCRIPTIVES command,CSDESCRIPTIVES command,CSDESCRIPTIVES command
LISTWISE (keyword),LISTWISE (keyword),LISTWISE (keyword)
CSDESCRIPTIVES command,CSDESCRIPTIVES command,CSDESCRIPTIVES command
ANALYSIS | Each statistic is based on all valid data for the analysis variable(s) used in computing the statistic. Ratios are computed by using all cases with valid data for both of the specified variables. Statistics for different variables may be based on different sample sizes. This setting is the default.
LISTWISE | Only cases with valid data for all analysis variables are used in computing any statistics. Statistics for different variables are always based on the same sample size.
CLASSMISSING (keyword),CLASSMISSING (keyword),CLASSMISSING (keyword)
CSDESCRIPTIVES command,CSDESCRIPTIVES command,CSDESCRIPTIVES command

The CLASSMISSING keyword specifies whether user-missing values are treated as valid. This specification is applied only to categorical design variables (strata, cluster, and subpopulation variables).

EXCLUDE (keyword),EXCLUDE (keyword),EXCLUDE (keyword)
CSDESCRIPTIVES command,CSDESCRIPTIVES command,CSDESCRIPTIVES command
INCLUDE (keyword),INCLUDE (keyword),INCLUDE (keyword)
CSDESCRIPTIVES command,CSDESCRIPTIVES command,CSDESCRIPTIVES command
EXCLUDE | Exclude user-missing values among the strata, cluster, and subpopulation variables. This setting is the default.
INCLUDE | Include user-missing values among the strata, cluster, and subpopulation variables. Treat user-missing values for these variables as valid data.

Related Topics

CSDESCRIPTIVES
Overview (CSDESCRIPTIVES command)
Examples (CSDESCRIPTIVES command)
PLAN Subcommand (CSDESCRIPTIVES command)
JOINTPROB Subcommand (CSDESCRIPTIVES command)
SUMMARY Subcommand (CSDESCRIPTIVES command)
MEAN Subcommand (CSDESCRIPTIVES command)
SUM Subcommand (CSDESCRIPTIVES command)
RATIO Subcommand (CSDESCRIPTIVES command)
STATISTICS Subcommand (CSDESCRIPTIVES command)
SUBPOP Subcommand (CSDESCRIPTIVES command)


CSGLM

Complex Samples General Linear Model,Complex Samples General Linear Model,Complex Samples General Linear Model
command syntax,command syntax,command syntax
CSGLM (command),CSGLM (command),CSGLM (command)
CSGLM (command),CSGLM (command),CSGLM (command)
syntax chart,syntax chart,syntax chart
release history,release history,release history

CSGLM is available in the Complex Samples option.

Note: Square brackets that are used in the CSGLM syntax chart are required parts of the syntax and are not used to indicate optional elements. Equals signs (=) that are used in the syntax chart are required elements. All subcommands, save the PLAN subcommand, are optional.

CSGLM dependent var BY factor list WITH covariate list

  /PLAN FILE = file

  /JOINTPROB FILE = file

  /MODEL effect list

  /INTERCEPT INCLUDE = {YES**} SHOW = {YES**}
                       {NO   }        {NO   }
                       {ONLY }

  /CUSTOM LABEL = "label"

           LMATRIX = {number effect list effect list ...; ...}
                     {number effect list effect list ...     }
                     {effect list effect list ...; ...       }
                     {effect list effect list ...            }
                     {ALL list; ALL ...                      }
                     {ALL list                               }

           KMATRIX = {number; number; ...}
                     {number             }

  /CUSTOM ...

  /EMMEANS TABLES = {factor          }
                    {factor*factor...}

           OTHER = [varname (value) varname (value) ...]

           COMPARE = factor

           CONTRAST = {SIMPLE** (value)        }
                      {DEVIATION (value)       }
                      {DIFFERENCE              }
                      {HELMERT                 }
                      {REPEATED                }
                      {POLYNOMIAL (number list)}

  /EMMEANS ...

  /CRITERIA CILEVEL = {95** } DF = n SINGULAR = {1E-12**}
                      {value}                   {value  }

  /STATISTICS PARAMETER SE TTEST CINTERVAL DEFF DEFFSQRT

  /TEST TYPE = {F**         } PADJUST = {LSD**        }
               {ADJF        }           {BONFERRONI   }
               {CHISQUARE   }           {SEQBONFERRONI}
               {ADJCHISQUARE}           {SIDAK        }
                                        {SEQSIDAK     }

  /DOMAIN VARIABLE = varname (value)

  /MISSING CLASSMISSING = {EXCLUDE**}
                          {INCLUDE  }

  /PRINT SAMPLEINFO** VARIABLEINFO** SUMMARY**

         GEF LMATRIX COVB CORB NONE

  /SAVE PRED(varname) RESID(varname)

  /OUTFILE {COVB='savfile'|'dataset'} {MODEL = 'file'    }
           {CORB='savfile'|'dataset'} {PARAMETER = 'file'}

**Default if the keyword or subcommand is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See CSGLM Algorithms for computational details for this procedure.

Syntax for the CSGLM command can be generated from the Complex Samples General Linear Model dialog box.

Release History Collapse Hide details

Release History

Release 13.0

• Command introduced.

Example

CSGLM y BY a b c WITH x
  /PLAN FILE='/survey/myfile.csplan'.

Related Topics

Overview (CSGLM command)
Examples (CSGLM command)
CSGLM Variable List (CSGLM command)
PLAN Subcommand (CSGLM command)
JOINTPROB Subcommand (CSGLM command)
MODEL Subcommand (CSGLM command)
INTERCEPT Subcommand (CSGLM command)
CUSTOM Subcommand (CSGLM command)
EMMEANS Subcommand (CSGLM command)
CONTRAST Keyword (CSGLM command)
CRITERIA Subcommand (CSGLM command)
STATISTICS Subcommand (CSGLM command)
TEST Subcommand (CSGLM command)
DOMAIN Subcommand (CSGLM command)
MISSING Subcommand (CSGLM command)
PRINT Subcommand (CSGLM command)
SAVE Subcommand (CSGLM command)
OUTFILE Subcommand (CSGLM command)


Overview (CSGLM command)

CSGLM (command),CSGLM (command),CSGLM (command)
Overview,Overview,Overview

CSGLM performs linear regression analysis, as well as analysis of variance and covariance, for samples that are drawn by complex sampling methods. The procedure estimates variances by taking into account the sample design that is used to select the sample, including equal probability and probability proportional to size (PPS) methods, and with replacement (WR) and without replacement (WOR) sampling procedures. Optionally, CSGLM performs analyses for a subpopulation.

Basic Specification Collapse Hide details

Basic Specification

• The basic specification is a variable list (identifying the dependent variable, the factors, if any, and the covariates, if any) and a PLAN subcommand with the name of a complex sample analysis plan file, which may be generated by the CSPLAN procedure.

• The default model includes the intercept term, main effects for any factors, and any covariates.

• The basic specification displays summary information about the sample design, R-square and root mean square error for the model, regression coefficient estimates and t tests, and Wald F tests for all model effects. Additional subcommands must be used for other results.

Operations Collapse Hide details

Operations

• CSGLM computes linear model estimates for sampling designs that are supported by the CSPLAN and CSSELECT procedures.

• The input dataset must contain the variables to be analyzed and variables that are related to the sampling design.

• The complex sample analysis plan file provides an analysis plan based on the sampling design.

• By default, CSGLM uses a model that includes the intercept term, main effects for any factors, and any covariates.

• Other effects, including interaction and nested effects, may be specified by using the MODEL subcommand.

• The default output for the specified model is summary information about the sample design, R-square and root mean square error, regression coefficient estimates and t tests, and Wald F tests for all effects.

• WEIGHT and SPLIT FILE settings are ignored by the CSGLM procedure.

Syntax Rules Collapse Hide details

Syntax Rules

• The dependent variable and PLAN subcommand are required. All other variables and subcommands are optional.

• Multiple CUSTOM and EMMEANS subcommands may be specified; each subcommand is treated independently. All other subcommands may be specified only once.

• The EMMEANS subcommand may be specified without options. All other subcommands must be specified with options.

• Each keyword may be specified only once within a subcommand.

• Subcommand names and keywords must be spelled in full.

• Equals signs (=) that are shown in the syntax chart are required.

• Subcommands may be specified in any order.

• The dependent variable and covariates must be numeric, but factors and the subpopulation variable can be numeric or string variables.

• Across the dependent, factor, and covariate variable lists, a variable may be specified only once.

• Plan file and subpopulation variables may not be specified on the variable list.

• Minimum syntax is a dependent variable and the PLAN subcommand. This specification fits an intercept-only model.

Limitations Collapse Hide details

Limitations

• WEIGHT and SPLIT FILE settings are ignored with a warning by the CSGLM procedure.

Related Topics

CSGLM
Examples (CSGLM command)
CSGLM Variable List (CSGLM command)
PLAN Subcommand (CSGLM command)
JOINTPROB Subcommand (CSGLM command)
MODEL Subcommand (CSGLM command)
INTERCEPT Subcommand (CSGLM command)
CUSTOM Subcommand (CSGLM command)
EMMEANS Subcommand (CSGLM command)
CONTRAST Keyword (CSGLM command)
CRITERIA Subcommand (CSGLM command)
STATISTICS Subcommand (CSGLM command)
TEST Subcommand (CSGLM command)
DOMAIN Subcommand (CSGLM command)
MISSING Subcommand (CSGLM command)
PRINT Subcommand (CSGLM command)
SAVE Subcommand (CSGLM command)
OUTFILE Subcommand (CSGLM command)


Examples (CSGLM command)

* Complex Samples General Linear Model.
CSGLM amtspent BY shopfor usecoup
 /PLAN FILE = 'samplesDirectory\grocery.csplan'
 /JOINTPROB FILE = 'samplesDirectory\grocery.sav'
 /MODEL shopfor usecoup shopfor*usecoup
 /INTERCEPT INCLUDE=YES SHOW=YES
 /STATISTICS PARAMETER SE CINTERVAL DEFF
 /PRINT SUMMARY VARIABLEINFO SAMPLEINFO
 /TEST TYPE=F PADJUST=LSD
 /EMMEANS TABLES=shopfor COMPARE CONTRAST=SIMPLE(3)
 /EMMEANS TABLES=usecoup COMPARE CONTRAST=SIMPLE(1)
 /EMMEANS TABLES=shopfor*usecoup
 /MISSING CLASSMISSING=EXCLUDE
 /CRITERIA CILEVEL=95.

• The procedure fits a general linear model for the dependent variable amtspent using shopfor and usecoup as factors.

• The complex sampling plan is located in grocery.csplan; the file containing the joint inclusion probabilities is grocery.sav.

• The model specification calls for a full factorial model with intercept.

• Parameter estimates, their standard errors, 95% confidence intervals, and design effects will be displayed.

• Estimated marginal means are computed for each of the model effects. The third level of shopfor is specified as the reference category for contrast comparisons; the first level of usecoup is specified as the reference category.

• All other options are set to their default values.

For discussion of output from this syntax and to place the example in context, see Using Complex Samples General Linear Model to Fit a Two-Factor ANOVA.

Related Topics

CSGLM
Overview (CSGLM command)
CSGLM Variable List (CSGLM command)
PLAN Subcommand (CSGLM command)
JOINTPROB Subcommand (CSGLM command)
MODEL Subcommand (CSGLM command)
INTERCEPT Subcommand (CSGLM command)
CUSTOM Subcommand (CSGLM command)
EMMEANS Subcommand (CSGLM command)
CONTRAST Keyword (CSGLM command)
CRITERIA Subcommand (CSGLM command)
STATISTICS Subcommand (CSGLM command)
TEST Subcommand (CSGLM command)
DOMAIN Subcommand (CSGLM command)
MISSING Subcommand (CSGLM command)
PRINT Subcommand (CSGLM command)
SAVE Subcommand (CSGLM command)
OUTFILE Subcommand (CSGLM command)


CSGLM Variable List (CSGLM command)

The variable list specifies the dependent variable, the factors, and the covariates in the model.

• The dependent variable must be the first specification on CSGLM.

• The names of the factors and covariates, if any, follow the dependent variable. Specify any factors following the keyword BY. Specify any covariates following the keyword WITH.

• The dependent variable and covariates must be numeric, but factors can be numeric or string variables.

• Each variable may be specified only once on the variable list.

• Plan file and subpopulation variables may not be specified on the variable list.

Related Topics

CSGLM
Overview (CSGLM command)
Examples (CSGLM command)
PLAN Subcommand (CSGLM command)
JOINTPROB Subcommand (CSGLM command)
MODEL Subcommand (CSGLM command)
INTERCEPT Subcommand (CSGLM command)
CUSTOM Subcommand (CSGLM command)
EMMEANS Subcommand (CSGLM command)
CONTRAST Keyword (CSGLM command)
CRITERIA Subcommand (CSGLM command)
STATISTICS Subcommand (CSGLM command)
TEST Subcommand (CSGLM command)
DOMAIN Subcommand (CSGLM command)
MISSING Subcommand (CSGLM command)
PRINT Subcommand (CSGLM command)
SAVE Subcommand (CSGLM command)
OUTFILE Subcommand (CSGLM command)


PLAN Subcommand (CSGLM command)

plan file,plan file,plan file
CSGLM command,CSGLM command,CSGLM command
PLAN (subcommand),PLAN (subcommand),PLAN (subcommand)
CSGLM command,CSGLM command,CSGLM command
CSGLM (command),CSGLM (command),CSGLM (command)
PLAN subcommand,PLAN subcommand,PLAN subcommand

The PLAN subcommand specifies the name of an XML file containing analysis design specifications. This file is written by the CSPLAN procedure.

• The PLAN subcommand is required.

FILE (keyword),FILE (keyword),FILE (keyword)
CSGLM command,CSGLM command,CSGLM command
FILE Specifies the name of an external file.

Related Topics

CSGLM
Overview (CSGLM command)
Examples (CSGLM command)
CSGLM Variable List (CSGLM command)
JOINTPROB Subcommand (CSGLM command)
MODEL Subcommand (CSGLM command)
INTERCEPT Subcommand (CSGLM command)
CUSTOM Subcommand (CSGLM command)
EMMEANS Subcommand (CSGLM command)
CONTRAST Keyword (CSGLM command)
CRITERIA Subcommand (CSGLM command)
STATISTICS Subcommand (CSGLM command)
TEST Subcommand (CSGLM command)
DOMAIN Subcommand (CSGLM command)
MISSING Subcommand (CSGLM command)
PRINT Subcommand (CSGLM command)
SAVE Subcommand (CSGLM command)
OUTFILE Subcommand (CSGLM command)


JOINTPROB Subcommand (CSGLM command)

joint probabilities,joint probabilities,joint probabilities
CSGLM command,CSGLM command,CSGLM command
JOINTPROB (subcommand),JOINTPROB (subcommand),JOINTPROB (subcommand)
CSGLM command,CSGLM command,CSGLM command
CSGLM (command),CSGLM (command),CSGLM (command)
JOINTPROB subcommand,JOINTPROB subcommand,JOINTPROB subcommand

The JOINTPROB subcommand is used to specify the file or dataset containing the first stage joint inclusion probabilities for UNEQUAL_WOR estimation. The CSSELECT procedure writes this file in the same location and with the same name (but different extension) as the plan file. When UNEQUAL_WOR estimation is specified, the CSGLM procedure will use the default location and name of the file unless the JOINTPROB subcommand is used to override them.

FILE (keyword),FILE (keyword),FILE (keyword)
CSGLM command,CSGLM command,CSGLM command
FILE Specifies the name of the file or dataset containing the joint inclusion probabilities.

Related Topics

CSGLM
Overview (CSGLM command)
Examples (CSGLM command)
CSGLM Variable List (CSGLM command)
PLAN Subcommand (CSGLM command)
MODEL Subcommand (CSGLM command)
INTERCEPT Subcommand (CSGLM command)
CUSTOM Subcommand (CSGLM command)
EMMEANS Subcommand (CSGLM command)
CONTRAST Keyword (CSGLM command)
CRITERIA Subcommand (CSGLM command)
STATISTICS Subcommand (CSGLM command)
TEST Subcommand (CSGLM command)
DOMAIN Subcommand (CSGLM command)
MISSING Subcommand (CSGLM command)
PRINT Subcommand (CSGLM command)
SAVE Subcommand (CSGLM command)
OUTFILE Subcommand (CSGLM command)


MODEL Subcommand (CSGLM command)

MODEL (subcommand),MODEL (subcommand),MODEL (subcommand)
CSGLM command,CSGLM command,CSGLM command
CSGLM (command),CSGLM (command),CSGLM (command)
MODEL subcommand,MODEL subcommand,MODEL subcommand

The MODEL subcommand is used to specify the effects to be included in the model. Use the INTERCEPT subcommand to control whether the intercept is included.

• The MODEL subcommand defines the cells in a design. In particular, cells are defined by all of the possible combinations of levels of the factors in the design. The number of cells equals the product of the number of levels of all the factors. A design is balanced if each cell contains the same number of cases. CSGLM can analyze balanced and unbalanced designs.

• The format is a list of effects to be included in the model, separated by spaces or commas.

• If the MODEL subcommand is not specified, CSGLM uses a model that includes the intercept term (unless it is excluded on the INTERCEPT subcommand), main effects for any factors, and any covariates.

• To include a term for the main effect of a factor, enter the name of the factor.

• To include a term for an interaction between factors, use the keyword BY or the asterisk (*) to join the factors that are involved in the interaction. For example, A*B means a two-way interaction effect of A and B, where A and B are factors. A*A is not allowed because factors inside an interaction effect must be distinct.

• To include a term for nesting one effect within another effect, use a pair of parentheses. For example, A(B) means that A is nested within B. When more than one pair of parentheses is present, each pair of parentheses must be enclosed or nested within another pair of parentheses. Thus, A(B)(C) is not valid.

• Multiple nesting is allowed. For example, A(B(C)) means that B is nested within C, and A is nested within B(C).

• Interactions between nested effects are not valid. For example, neither A(C)*B(C) nor A(C)*B(D) is valid.

• To include a covariate term in the design, enter the name of the covariate.

• Covariates can be connected, but not nested, through the * operator to form another covariate effect. Interactions among covariates such as X1*X1 and X1*X2 are valid, but X1(X2) is not.

• Factor and covariate effects can be connected only by the * operator. Suppose A and B are factors, and X1 and X2 are covariates. Examples of valid factor-by-covariate interaction effects are A*X1, A*B*X1, X1*A(B), A*X1*X1, and B*X1*X2.

Related Topics

CSGLM
Overview (CSGLM command)
Examples (CSGLM command)
CSGLM Variable List (CSGLM command)
PLAN Subcommand (CSGLM command)
JOINTPROB Subcommand (CSGLM command)
INTERCEPT Subcommand (CSGLM command)
CUSTOM Subcommand (CSGLM command)
EMMEANS Subcommand (CSGLM command)
CONTRAST Keyword (CSGLM command)
CRITERIA Subcommand (CSGLM command)
STATISTICS Subcommand (CSGLM command)
TEST Subcommand (CSGLM command)
DOMAIN Subcommand (CSGLM command)
MISSING Subcommand (CSGLM command)
PRINT Subcommand (CSGLM command)
SAVE Subcommand (CSGLM command)
OUTFILE Subcommand (CSGLM command)


INTERCEPT Subcommand (CSGLM command)

intercept,intercept,intercept
CSGLM command,CSGLM command,CSGLM command
INTERCEPT (subcommand),INTERCEPT (subcommand),INTERCEPT (subcommand)
CSGLM command,CSGLM command,CSGLM command
CSGLM (command),CSGLM (command),CSGLM (command)
INTERCEPT subcommand,INTERCEPT subcommand,INTERCEPT subcommand

The INTERCEPT subcommand controls whether an intercept term is included in the model. This subcommand can also be used to display or suppress the intercept term in output tables.

Related Topics

CSGLM
Overview (CSGLM command)
Examples (CSGLM command)
CSGLM Variable List (CSGLM command)
PLAN Subcommand (CSGLM command)
JOINTPROB Subcommand (CSGLM command)
MODEL Subcommand (CSGLM command)
CUSTOM Subcommand (CSGLM command)
EMMEANS Subcommand (CSGLM command)
CONTRAST Keyword (CSGLM command)
CRITERIA Subcommand (CSGLM command)
STATISTICS Subcommand (CSGLM command)
TEST Subcommand (CSGLM command)
DOMAIN Subcommand (CSGLM command)
MISSING Subcommand (CSGLM command)
PRINT Subcommand (CSGLM command)
SAVE Subcommand (CSGLM command)
OUTFILE Subcommand (CSGLM command)
INCLUDE Keyword (CSGLM command)
SHOW Keyword (CSGLM command)
Example (CSGLM command)


INCLUDE Keyword (CSGLM command)

The INCLUDE keyword specifies whether the intercept is included in the model, or the keyword requests the intercept-only model.

YES (keyword),YES (keyword),YES (keyword)
CSGLM command,CSGLM command,CSGLM command
NO (keyword),NO (keyword),NO (keyword)
CSGLM command,CSGLM command,CSGLM command
ONLY (keyword),ONLY (keyword),ONLY (keyword)
CSGLM command,CSGLM command,CSGLM command
YES | The intercept is included in the model. This setting is the default.
NO | The intercept is not included in the model. If no factors or covariates are defined, specifying INCLUDE = NO is invalid syntax.
ONLY | The intercept-only model is fit. If the MODEL subcommand is specified, specifying INCLUDE = ONLY is invalid syntax.

Related Topics

INTERCEPT Subcommand (CSGLM command)
SHOW Keyword (CSGLM command)
Example (CSGLM command)


SHOW Keyword (CSGLM command)

The SHOW keyword specifies whether the intercept is displayed or suppressed in output tables.

YES (keyword),YES (keyword),YES (keyword)
CSGLM command,CSGLM command,CSGLM command
NO (keyword),NO (keyword),NO (keyword)
CSGLM command,CSGLM command,CSGLM command
YES | The intercept is displayed in output tables. This setting is the default.
NO | The intercept is not displayed in output tables. If INCLUDE = NO or ONLY is specified, SHOW = NO is ignored.

Related Topics

INTERCEPT Subcommand (CSGLM command)
INCLUDE Keyword (CSGLM command)
Example (CSGLM command)


Example (CSGLM command)

CSGLM y BY a b c
  /PLAN FILE='/survey/myfile.csplan'
  /INTERCEPT INCLUDE = ONLY.

• The preceding syntax defines the model space using factors A, B, and C but fits the intercept-only model.

Related Topics

INTERCEPT Subcommand (CSGLM command)
INCLUDE Keyword (CSGLM command)
SHOW Keyword (CSGLM command)


CUSTOM Subcommand (CSGLM command)

custom hypothesis tests,custom hypothesis tests,custom hypothesis tests
CSGLM command,CSGLM command,CSGLM command
CUSTOM (subcommand),CUSTOM (subcommand),CUSTOM (subcommand)
CSGLM command,CSGLM command,CSGLM command
CSGLM (command),CSGLM (command),CSGLM (command)
CUSTOM subcommand,CUSTOM subcommand,CUSTOM subcommand

The CUSTOM subcommand defines custom hypothesis tests by specifying the L matrix (contrast coefficients matrix) and the K matrix (contrast results matrix) in the general form of the linear hypothesis LB = K. The vector B is the parameter vector in the linear model.

• Multiple CUSTOM subcommands are allowed. Each subcommand is treated independently.

• An optional label may be specified by using the LABEL keyword. The label is a string with a maximum length of 255 characters. Only one label can be specified.

• Either the LMATRIX or KMATRIX keyword, or both, must be specified.

LMATRIX (keyword),LMATRIX (keyword),LMATRIX (keyword)
CSGLM command,CSGLM command,CSGLM command
KMATRIX (keyword),KMATRIX (keyword),KMATRIX (keyword)
CSGLM command,CSGLM command,CSGLM command
LMATRIX | Contrast coefficients matrix. This matrix specifies coefficients of contrasts, which can be used for studying the effects in the model. An L matrix can be specified by using the LMATRIX keyword.
KMATRIX | Contrast results matrix. This matrix specifies the results of the linear hypothesis. A K matrix can be specified by using the KMATRIX keyword.

• The number of rows in the L and K matrices must be equal.

• A custom hypothesis test can be formed by specifying an L or K matrix, or both. If only one matrix is specified, the unspecified matrix uses the defaults described below.

• If KMATRIX is specified but LMATRIX is not specified, the L matrix is assumed to be the row vector corresponding to the intercept in the estimable function, provided that INCLUDE = YES or ONLY is specified on the INTERCEPT subcommand. In this case, the K matrix can be only a scalar matrix.

• The default K matrix is a zero matrix; that is, LB = 0 is assumed.

• There are three general formats that can be used on the LMATRIX keyword: (1) Specify a coefficient value for the intercept, followed optionally by an effect name and a list of real numbers. (2) Specify an effect name and a list of real numbers. (3) Specify keyword ALL and a list of real numbers. In all three formats, there can be multiple effect names (or instances of the keyword ALL) and number lists.

• Only valid effects in the default model or on the MODEL subcommand can be specified on the LMATRIX keyword.

• The length of the list of real numbers on the LMATRIX keyword must be equal to the number of parameters (including the redundant parameters) corresponding to the specified effect. For example, if the effect A*B takes up six columns in the design matrix, the list after A*B must contain exactly six numbers.

• When ALL is specified, the length of the list that follows ALL must be equal to the total number of parameters (including the redundant parameters) in the model.

• Effects that are in the model but not specified on the LMATRIX keyword are assumed to have entries of 0 in the corresponding columns of the L matrix.

• When an L matrix is being defined, a number can be specified as a fraction with a positive denominator. For example, 1/3 and –1/3 are valid, but 1/–3 is invalid.

• A semicolon (;) indicates the end of a row in the L matrix.

• The format for the KMATRIX keyword is one or more real numbers. If more than one number is specified, then separate adjacent numbers using a semicolon (;). Each semicolon indicates the end of a row in the K matrix. Each number is the hypothesized value for a contrast, which is defined by a row in the L matrix.

• For the KMATRIX keyword to be valid, either the LMATRIX keyword, or INCLUDE = YES on the INTERCEPT subcommand, must be specified.

Example

Suppose that factors A and B each have three levels.

CSGLM y BY a b
  /PLAN FILE='/survey/myfile.csplan'
  /MODEL a b a*b
  /CUSTOM  LABEL = “Effect A”
     LMATRIX = a 1 0 -1
         a*b  1/3  1/3  1/3
              0    0    0
             -1/3 -1/3 -1/3;
         a 0 1 -1
        a*b  0    0    0
              1/3  1/3  1/3
             -1/3 -1/3 -1/3.

• The preceding syntax specifies a test of effect A.

• Because there are three levels in effect A, two independent contrasts can be formed at most; thus, there are two rows in the L matrix, separated by a semicolon (;).

• There are three levels each in effects A and B; thus, the interaction effect A*B takes nine columns in the design matrix.

• The first row in the L matrix tests the difference between levels 1 and 3 of effect A; the second row tests the difference between levels 2 and 3 of effect A.

• The KMATRIX keyword is not specified, so the null hypothesis value for both tests is 0.

Example

Suppose that factors A and B each have three levels.

CSGLM y BY a b
  /PLAN FILE='/survey/myfile.csplan'
  /CUSTOM LABEL = “Effect A”
     LMATRIX = a 1 0 -1; a 1 –1 0
  /CUSTOM LABEL = “Effect B”
     LMATRIX = b 1 0 –1; b 1 –1 0
     KMATRIX = 0; 0.

• The preceding syntax specifies tests of effects A and B.

• The MODEL subcommand is not specified, so the default model—which includes the intercept and main effects for A and B—is used.

• There are two CUSTOM subcommands; each subcommand specifies two rows in the L matrix.

• The first CUSTOM subcommand does not specify the KMATRIX keyword. By default, this subcommand tests whether the effect of factor A is 0.

• The second CUSTOM subcommand specifies the KMATRIX keyword. This subcommand tests whether the effect of factor B is 0.

Related Topics

CSGLM
Overview (CSGLM command)
Examples (CSGLM command)
CSGLM Variable List (CSGLM command)
PLAN Subcommand (CSGLM command)
JOINTPROB Subcommand (CSGLM command)
MODEL Subcommand (CSGLM command)
INTERCEPT Subcommand (CSGLM command)
EMMEANS Subcommand (CSGLM command)
CONTRAST Keyword (CSGLM command)
CRITERIA Subcommand (CSGLM command)
STATISTICS Subcommand (CSGLM command)
TEST Subcommand (CSGLM command)
DOMAIN Subcommand (CSGLM command)
MISSING Subcommand (CSGLM command)
PRINT Subcommand (CSGLM command)
SAVE Subcommand (CSGLM command)
OUTFILE Subcommand (CSGLM command)


EMMEANS Subcommand (CSGLM command)

estimated marginal means,estimated marginal means,estimated marginal means
CSGLM command,CSGLM command,CSGLM command
marginal means,marginal means,marginal means
CSGLM command,CSGLM command,CSGLM command
EMMEANS (subcommand),EMMEANS (subcommand),EMMEANS (subcommand)
CSGLM command,CSGLM command,CSGLM command
CSGLM (command),CSGLM (command),CSGLM (command)
EMMEANS subcommand,EMMEANS subcommand,EMMEANS subcommand

The EMMEANS subcommand displays estimated marginal means of the dependent variable in the cells for the specified factors. Note that these means are predicted, not observed, means.

• Multiple EMMEANS subcommands are allowed. Each subcommand is treated independently.

• The EMMEANS subcommand may be specified with no additional keywords. The output for an empty EMMEANS subcommand is the overall estimated marginal mean of the dependent variable, collapsing over any factors, and with any covariates held at their overall means.

TABLES (keyword),TABLES (keyword),TABLES (keyword)
CSGLM command,CSGLM command,CSGLM command
OTHER (keyword),OTHER (keyword),OTHER (keyword)
CSGLM command,CSGLM command,CSGLM command
CONTRAST (keyword),CONTRAST (keyword),CONTRAST (keyword)
CSGLM command,CSGLM command,CSGLM command
TABLES = option | Valid options are factors appearing on the factor list and crossed factors that are constructed of factors on the factor list. Crossed factors can be specified by using an asterisk (*) or the keyword BY. All factors in a crossed factor specification must be unique. If a factor or a crossing of factors is specified on the TABLES keyword, CSGLM collapses over any other factors before computing the estimated marginal means for the dependent variable. If the TABLES keyword is not specified, the overall estimated marginal mean of the dependent variable, collapsing over any factors, is computed.
OTHER = [option] | Specifies the covariate values to use when computing the estimated marginal means. If the OTHER keyword is used, it must be followed by an equals sign and one or more elements enclosed in square brackets. Valid elements are covariates appearing on the CSGLM covariate list, each of which must be followed by a numeric value or the keyword MEAN in parentheses.
 | If a numeric value is used, the estimated marginal mean will be computed by holding the specified covariate at the supplied value. If the keyword MEAN is used, the estimated marginal mean will be computed by holding the covariate at its overall mean. If a covariate is not specified on the OTHER option, its overall mean will be used in estimated marginal mean calculations.
 | Any covariate may occur only once on the OTHER keyword.
CONTRAST = type | Specifies the type of contrast that is desired among the levels of the factor that is given on the COMPARE keyword. This keyword creates an L matrix such that the columns corresponding to the factor match the contrast that is given. The other columns are adjusted so that the L matrix is estimable. Available contrast types and their options are described in a separate table below. The CONTRAST keyword is ignored if the COMPARE keyword is not specified.
COMPARE = factor | Compares levels of a factor specified on the TABLES keyword and displays results for each individual comparison as well as for the overall set of comparisons. If only one factor is specified on TABLES, COMPARE can be specified by itself; otherwise, the factor specification is required. In the latter case, levels of the specified factor are compared for each level of the other factors that are specified on TABLES. The type of comparison that is performed is determined by the CONTRAST keyword. The TABLES keyword must be specified for the COMPARE keyword to be valid.

Related Topics

CSGLM
Overview (CSGLM command)
Examples (CSGLM command)
CSGLM Variable List (CSGLM command)
PLAN Subcommand (CSGLM command)
JOINTPROB Subcommand (CSGLM command)
MODEL Subcommand (CSGLM command)
INTERCEPT Subcommand (CSGLM command)
CUSTOM Subcommand (CSGLM command)
CONTRAST Keyword (CSGLM command)
CRITERIA Subcommand (CSGLM command)
STATISTICS Subcommand (CSGLM command)
TEST Subcommand (CSGLM command)
DOMAIN Subcommand (CSGLM command)
MISSING Subcommand (CSGLM command)
PRINT Subcommand (CSGLM command)
SAVE Subcommand (CSGLM command)
OUTFILE Subcommand (CSGLM command)


CONTRAST Keyword (CSGLM command)

contrasts,contrasts,contrasts
CSGLM command,CSGLM command,CSGLM command

The contrast types that may be specified on the CONTRAST keyword are described below.

The CSGLM procedure sorts levels of the factor in ascending order and defines the highest level as the last level. (If the factor is a string variable, the value of the highest level is locale-dependent.)

SIMPLE (keyword),SIMPLE (keyword),SIMPLE (keyword)
CSGLM command,CSGLM command,CSGLM command
simple contrasts,simple contrasts,simple contrasts
CSGLM command,CSGLM command,CSGLM command
DEVIATION (keyword),DEVIATION (keyword),DEVIATION (keyword)
CSGLM command,CSGLM command,CSGLM command
deviation contrasts,deviation contrasts,deviation contrasts
CSGLM command,CSGLM command,CSGLM command
DIFFERENCE (keyword),DIFFERENCE (keyword),DIFFERENCE (keyword)
CSGLM command,CSGLM command,CSGLM command
difference contrasts,difference contrasts,difference contrasts
CSGLM command,CSGLM command,CSGLM command
HELMERT (keyword),HELMERT (keyword),HELMERT (keyword)
CSGLM command,CSGLM command,CSGLM command
Helmert contrasts,Helmert contrasts,Helmert contrasts
CSGLM command,CSGLM command,CSGLM command
REPEATED (keyword),REPEATED (keyword),REPEATED (keyword)
CSGLM command,CSGLM command,CSGLM command
repeated contrasts,repeated contrasts,repeated contrasts
CSGLM command,CSGLM command,CSGLM command
POLYNOMIAL (keyword),POLYNOMIAL (keyword),POLYNOMIAL (keyword)
CSGLM command,CSGLM command,CSGLM command
polynomial contrasts,polynomial contrasts,polynomial contrasts
CSGLM command,CSGLM command,CSGLM command
SIMPLE (value) | Each level of the factor (except the highest level) is compared to the highest level. SIMPLE is the default contrast type if the COMPARE keyword is specified.
 | The SIMPLE keyword may be followed optionally by parentheses containing a value. Put the value inside a pair of quotation marks if the value is formatted (such as date or currency) or if the factor is of string type. If a value is specified, the factor level with that value is used as the omitted reference category. If the specified value does not exist in the data, a warning is issued and the highest level is used.
 | An example is as follows: CSGLM y BY a … /EMMEANS TABLES=a COMPARE=a CONTRAST=SIMPLE(1). The specified contrast compares all levels of factor A (except level 1) to level 1. Simple contrasts are not orthogonal.
DEVIATION (value) | Each level of the factor (except the highest level) is compared to the grand mean.
 | The DEVIATION keyword may be followed optionally by parentheses containing a value. Put the value inside a pair of quotation marks if the value is formatted (such as date or currency) or if the factor is of string type. If a value is specified, the factor level with that value is used as the omitted reference category. If the specified value does not exist in the data, a warning is issued and the highest level is used.
 | An example is as follows: CSGLM y BY a … /EMMEANS TABLES=a COMPARE=a CONTRAST=DEVIATION(1). The specified contrast omits level 1 of A. Deviation contrasts are not orthogonal.
DIFFERENCE | Each level of the factor (except the lowest level) is compared to the mean of previous levels. In a balanced design, difference contrasts are orthogonal.
HELMERT | Each level of the factor (except the highest level) is compared to the mean of subsequent levels. In a balanced design, Helmert contrasts are orthogonal.
REPEATED | Each level of the factor (except the highest level) is compared to the previous level. Repeated contrasts are not orthogonal.
POLYNOMIAL (number list) | Polynomial contrasts. The first degree of freedom contains the linear effect across the levels of the factor, the second contains the quadratic effect, and so on. By default, the levels are assumed to be equally spaced; the default metric is (1 2 . . . k), where k levels are involved.
 | The POLYNOMIAL keyword may be followed optionally by parentheses containing a number list. Numbers in the list must be separated by spaces or commas. Unequal spacing may be specified by entering a metric consisting of one integer for each level of the factor. Only the relative differences between the terms of the metric matter. Thus, for example, (1 2 4) is the same metric as (2 3 5) or (20 30 50) because, in each instance, the difference between the second and third numbers is twice the difference between the first and second numbers. All numbers in the metric must be unique; thus, (1 1 2) is not valid.
 | An example is as follows: CSGLM y BY a … /EMMEANS TABLES=a COMPARE=a CONTRAST=POLYNOMIAL(1 2 4). Suppose that factor A has three levels. The specified contrast indicates that the three levels of A are actually in the proportion 1:2:4. In a balanced design, polynomial contrasts are orthogonal.

Orthogonal contrasts are particularly useful. In a balanced design, contrasts are orthogonal if the sum of the coefficients in each contrast row is 0 and if, for any pair of contrast rows, the products of corresponding coefficients sum to 0.

Related Topics

CSGLM
Overview (CSGLM command)
Examples (CSGLM command)
CSGLM Variable List (CSGLM command)
PLAN Subcommand (CSGLM command)
JOINTPROB Subcommand (CSGLM command)
MODEL Subcommand (CSGLM command)
INTERCEPT Subcommand (CSGLM command)
CUSTOM Subcommand (CSGLM command)
EMMEANS Subcommand (CSGLM command)
CRITERIA Subcommand (CSGLM command)
STATISTICS Subcommand (CSGLM command)
TEST Subcommand (CSGLM command)
DOMAIN Subcommand (CSGLM command)
MISSING Subcommand (CSGLM command)
PRINT Subcommand (CSGLM command)
SAVE Subcommand (CSGLM command)
OUTFILE Subcommand (CSGLM command)


CRITERIA Subcommand (CSGLM command)

CRITERIA (subcommand),CRITERIA (subcommand),CRITERIA (subcommand)
CSGLM command,CSGLM command,CSGLM command
CSGLM (command),CSGLM (command),CSGLM (command)
CRITERIA subcommand,CRITERIA subcommand,CRITERIA subcommand

The CRITERIA subcommand controls statistical criteria and specifies numerical tolerance for checking singularity.

CILEVEL (keyword),CILEVEL (keyword),CILEVEL (keyword)
CSGLM command,CSGLM command,CSGLM command
DF (keyword),DF (keyword),DF (keyword)
CSGLM command,CSGLM command,CSGLM command
SINGULAR (keyword),SINGULAR (keyword),SINGULAR (keyword)
CSGLM command,CSGLM command,CSGLM command
CILEVEL = value | Confidence interval level for coefficient estimates and estimated marginal means. Specify a value that is greater than or equal to 0 and less than 100. The default value is 95.
DF = value | Sampling design degrees of freedom to use in computing p values for all test statistics. Specify a positive number. The default value is the difference between the number of primary sampling units and the number of strata in the first stage of sampling.
SINGULAR = value | Tolerance value used to test for singularity. Specify a positive value. The default value is 10-12.

Related Topics

CSGLM
Overview (CSGLM command)
Examples (CSGLM command)
CSGLM Variable List (CSGLM command)
PLAN Subcommand (CSGLM command)
JOINTPROB Subcommand (CSGLM command)
MODEL Subcommand (CSGLM command)
INTERCEPT Subcommand (CSGLM command)
CUSTOM Subcommand (CSGLM command)
EMMEANS Subcommand (CSGLM command)
CONTRAST Keyword (CSGLM command)
STATISTICS Subcommand (CSGLM command)
TEST Subcommand (CSGLM command)
DOMAIN Subcommand (CSGLM command)
MISSING Subcommand (CSGLM command)
PRINT Subcommand (CSGLM command)
SAVE Subcommand (CSGLM command)
OUTFILE Subcommand (CSGLM command)


STATISTICS Subcommand (CSGLM command)

STATISTICS (subcommand),STATISTICS (subcommand),STATISTICS (subcommand)
CSGLM command,CSGLM command,CSGLM command
CSGLM (command),CSGLM (command),CSGLM (command)
STATISTICS subcommand,STATISTICS subcommand,STATISTICS subcommand

The STATISTICS subcommand requests various statistics associated with the coefficient estimates.

• There are no default keywords on the STATISTICS subcommand. If this subcommand is not specified, no statistics that are listed below are displayed.

PARAMETER (keyword),PARAMETER (keyword),PARAMETER (keyword)
CSGLM command,CSGLM command,CSGLM command
parameter estimates,parameter estimates,parameter estimates
CSGLM command,CSGLM command,CSGLM command
SE (keyword),SE (keyword),SE (keyword)
CSGLM command,CSGLM command,CSGLM command
standard error,standard error,standard error
CSGLM command,CSGLM command,CSGLM command
TTEST (keyword),TTEST (keyword),TTEST (keyword)
CSGLM command,CSGLM command,CSGLM command
t test,t test,t test
CSGLM command,CSGLM command,CSGLM command
CINTERVAL (keyword),CINTERVAL (keyword),CINTERVAL (keyword)
CSGLM command,CSGLM command,CSGLM command
confidence intervals,confidence intervals,confidence intervals
CSGLM command,CSGLM command,CSGLM command
DEFF (keyword),DEFF (keyword),DEFF (keyword)
CSGLM command,CSGLM command,CSGLM command
design effect,design effect,design effect
CSGLM command,CSGLM command,CSGLM command
DEFFSQRT (keyword),DEFFSQRT (keyword),DEFFSQRT (keyword)
CSGLM command,CSGLM command,CSGLM command
square root of design effect,square root of design effect,square root of design effect
CSGLM command,CSGLM command,CSGLM command
PARAMETER | Coefficient estimates.
SE | Standard error for each coefficient estimate.
TTEST | t test for each coefficient estimate.
CINTERVAL | Confidence interval for each coefficient estimate.
DEFF | Design effect for each coefficient estimate.
DEFFSQRT | Square root of the design effect for each coefficient estimate.

Related Topics

CSGLM
Overview (CSGLM command)
Examples (CSGLM command)
CSGLM Variable List (CSGLM command)
PLAN Subcommand (CSGLM command)
JOINTPROB Subcommand (CSGLM command)
MODEL Subcommand (CSGLM command)
INTERCEPT Subcommand (CSGLM command)
CUSTOM Subcommand (CSGLM command)
EMMEANS Subcommand (CSGLM command)
CONTRAST Keyword (CSGLM command)
CRITERIA Subcommand (CSGLM command)
TEST Subcommand (CSGLM command)
DOMAIN Subcommand (CSGLM command)
MISSING Subcommand (CSGLM command)
PRINT Subcommand (CSGLM command)
SAVE Subcommand (CSGLM command)
OUTFILE Subcommand (CSGLM command)


TEST Subcommand (CSGLM command)

TEST (subcommand),TEST (subcommand),TEST (subcommand)
CSGLM command,CSGLM command,CSGLM command
CSGLM (command),CSGLM (command),CSGLM (command)
TEST subcommand,TEST subcommand,TEST subcommand

The TEST subcommand specifies the type of test statistic and the method of adjusting the significance level to be used for hypothesis tests that are requested on the MODEL, CUSTOM, and EMMEANS subcommands.

Related Topics

CSGLM
Overview (CSGLM command)
Examples (CSGLM command)
CSGLM Variable List (CSGLM command)
PLAN Subcommand (CSGLM command)
JOINTPROB Subcommand (CSGLM command)
MODEL Subcommand (CSGLM command)
INTERCEPT Subcommand (CSGLM command)
CUSTOM Subcommand (CSGLM command)
EMMEANS Subcommand (CSGLM command)
CONTRAST Keyword (CSGLM command)
CRITERIA Subcommand (CSGLM command)
STATISTICS Subcommand (CSGLM command)
DOMAIN Subcommand (CSGLM command)
MISSING Subcommand (CSGLM command)
PRINT Subcommand (CSGLM command)
SAVE Subcommand (CSGLM command)
OUTFILE Subcommand (CSGLM command)
TYPE Keyword (CSGLM command)
PADJUST keyword (CSGLM command)


TYPE Keyword (CSGLM command)

The TYPE keyword indicates the type of test statistic.

F (keyword),F (keyword),F (keyword)
CSGLM command,CSGLM command,CSGLM command
F statistic,F statistic,F statistic
CSGLM command,CSGLM command,CSGLM command
ADJF (keyword),ADJF (keyword),ADJF (keyword)
CSGLM command,CSGLM command,CSGLM command
adjusted F statistic,adjusted F statistic,adjusted F statistic
CSGLM command,CSGLM command,CSGLM command
CHISQUARE (keyword),CHISQUARE (keyword),CHISQUARE (keyword)
CSGLM command,CSGLM command,CSGLM command
chi-square,chi-square,chi-square
CSGLM command,CSGLM command,CSGLM command
ADJCHISQUARE (keyword),ADJCHISQUARE (keyword),ADJCHISQUARE (keyword)
CSGLM command,CSGLM command,CSGLM command
adjusted chi-square,adjusted chi-square,adjusted chi-square
CSGLM command,CSGLM command,CSGLM command
F | Wald F test. This is the default test statistic if the TYPE keyword is not specified.
ADJF | Adjusted Wald F test.
CHISQUARE | Wald chi-square test.
ADJCHISQUARE | Adjusted Wald chi-square test.

Related Topics

TEST Subcommand (CSGLM command)
PADJUST keyword (CSGLM command)


PADJUST keyword (CSGLM command)

The PADJUST keyword indicates the method of adjusting the significance level.

LSD (keyword),LSD (keyword),LSD (keyword)
CSGLM command,CSGLM command,CSGLM command
BONFERRONI (keyword),BONFERRONI (keyword),BONFERRONI (keyword)
CSGLM command,CSGLM command,CSGLM command
Bonferroni correction,Bonferroni correction,Bonferroni correction
CSGLM command,CSGLM command,CSGLM command
SEQBONFERRONI (keyword),SEQBONFERRONI (keyword),SEQBONFERRONI (keyword)
CSGLM command,CSGLM command,CSGLM command
sequential Bonferroni correction,sequential Bonferroni correction,sequential Bonferroni correction
CSGLM command,CSGLM command,CSGLM command
SIDAK (keyword),SIDAK (keyword),SIDAK (keyword)
CSGLM command,CSGLM command,CSGLM command
Sidak correction,Sidak correction,Sidak correction
CSGLM command,CSGLM command,CSGLM command
SEQSIDAK (keyword),SEQSIDAK (keyword),SEQSIDAK (keyword)
CSGLM command,CSGLM command,CSGLM command
sequential Sidak correction,sequential Sidak correction,sequential Sidak correction
CSGLM command,CSGLM command,CSGLM command
LSD | Least significant difference. This method does not control the overall probability of rejecting the hypotheses that some linear contrasts are different from the null hypothesis value(s). This setting is the default.
BONFERRONI | Bonferroni. This method adjusts the observed significance level for the fact that multiple contrasts are being tested.
SEQBONFERRONI | Sequential Bonferroni. This procedure is a sequentially step-down rejective Bonferroni procedure that is much less conservative in terms of rejecting individual hypotheses but maintains the same overall significance level.
SIDAK | Sidak. This method provides tighter bounds than the Bonferroni approach.
SEQSIDAK | Sequential Sidak. This procedure is a sequentially rejective step-down rejective Sidak procedure that is much less conservative in terms of rejecting individual hypotheses but maintains the same overall significance level.

Related Topics

TEST Subcommand (CSGLM command)
TYPE Keyword (CSGLM command)


DOMAIN Subcommand (CSGLM command)

DOMAIN (subcommand),DOMAIN (subcommand),DOMAIN (subcommand)
CSGLM command,CSGLM command,CSGLM command
CSGLM (command),CSGLM (command),CSGLM (command)
DOMAIN subcommand,DOMAIN subcommand,DOMAIN subcommand

The DOMAIN subcommand specifies the subpopulation for which the analysis is to be performed.

VARIABLE (keyword),VARIABLE (keyword),VARIABLE (keyword)
CSGLM command,CSGLM command,CSGLM command

• Keyword VARIABLE, followed by an equals sign, a variable, and a value in parentheses, are required. Put the value inside a pair of quotation marks if the value is formatted (such as date or currency) or if the variable is of string type.

• The subpopulation is defined by all cases having the given value on the specified variable.

• Analyses are performed only for the specified subpopulation.

• For example, DOMAIN VARIABLE = myvar (1) defines the subpopulation by all cases for which variable MYVAR has value 1.

• The specified variable may be numeric or string and must exist at the time that the CSGLM procedure is invoked.

• Stratification or cluster variables may be specified, but no other plan file variables are allowed on the DOMAIN subcommand.

• Analysis variables may not be specified on the DOMAIN subcommand.

Related Topics

CSGLM
Overview (CSGLM command)
Examples (CSGLM command)
CSGLM Variable List (CSGLM command)
PLAN Subcommand (CSGLM command)
JOINTPROB Subcommand (CSGLM command)
MODEL Subcommand (CSGLM command)
INTERCEPT Subcommand (CSGLM command)
CUSTOM Subcommand (CSGLM command)
EMMEANS Subcommand (CSGLM command)
CONTRAST Keyword (CSGLM command)
CRITERIA Subcommand (CSGLM command)
STATISTICS Subcommand (CSGLM command)
TEST Subcommand (CSGLM command)
MISSING Subcommand (CSGLM command)
PRINT Subcommand (CSGLM command)
SAVE Subcommand (CSGLM command)
OUTFILE Subcommand (CSGLM command)


MISSING Subcommand (CSGLM command)

CSGLM (command),CSGLM (command),CSGLM (command)
missing values,missing values,missing values
MISSING (subcommand),MISSING (subcommand),MISSING (subcommand)
CSGLM command,CSGLM command,CSGLM command
CSGLM (command),CSGLM (command),CSGLM (command)
MISSING subcommand,MISSING subcommand,MISSING subcommand

The MISSING subcommand specifies how missing values are handled.

• All design variables, as well as the dependent variable and any covariates, must have valid data. Cases with invalid data for any of these variables are deleted from the analysis.

CLASSMISSING (keyword),CLASSMISSING (keyword),CLASSMISSING (keyword)
CSGLM command,CSGLM command,CSGLM command

• The CLASSMISSING keyword specifies whether user-missing values are treated as valid. This specification is applied to categorical design variables (i.e., strata, cluster, and subpopulation variables) and any factors.

EXCLUDE (keyword),EXCLUDE (keyword),EXCLUDE (keyword)
CSGLM command,CSGLM command,CSGLM command
INCLUDE (keyword),INCLUDE (keyword),INCLUDE (keyword)
CSGLM command,CSGLM command,CSGLM command
EXCLUDE | Exclude user-missing values among the strata, cluster, subpopulation, and factor variables. This setting is the default.
INCLUDE | Include user-missing values among the strata, cluster, subpopulation, and factor variables. Treat user-missing values for these variables as valid data.

Related Topics

CSGLM
Overview (CSGLM command)
Examples (CSGLM command)
CSGLM Variable List (CSGLM command)
PLAN Subcommand (CSGLM command)
JOINTPROB Subcommand (CSGLM command)
MODEL Subcommand (CSGLM command)
INTERCEPT Subcommand (CSGLM command)
CUSTOM Subcommand (CSGLM command)
EMMEANS Subcommand (CSGLM command)
CONTRAST Keyword (CSGLM command)
CRITERIA Subcommand (CSGLM command)
STATISTICS Subcommand (CSGLM command)
TEST Subcommand (CSGLM command)
DOMAIN Subcommand (CSGLM command)
PRINT Subcommand (CSGLM command)
SAVE Subcommand (CSGLM command)
OUTFILE Subcommand (CSGLM command)


PRINT Subcommand (CSGLM command)

PRINT (subcommand),PRINT (subcommand),PRINT (subcommand)
CSGLM command,CSGLM command,CSGLM command
CSGLM (command),CSGLM (command),CSGLM (command)
PRINT subcommand,PRINT subcommand,PRINT subcommand

The PRINT subcommand is used to display optional output.

• If the PRINT subcommand is not specified, the default output includes sample information, variable and factor information, and model summary statistics.

• If the PRINT subcommand is specified, CSGLM displays output only for those keywords that are specified.

SAMPLEINFO (keyword),SAMPLEINFO (keyword),SAMPLEINFO (keyword)
CSGLM command,CSGLM command,CSGLM command
VARIABLEINFO (keyword),VARIABLEINFO (keyword),VARIABLEINFO (keyword)
CSGLM command,CSGLM command,CSGLM command
SUMMARY (keyword),SUMMARY (keyword),SUMMARY (keyword)
CSGLM command,CSGLM command,CSGLM command
r-squared,r-squared,r-squared
CSGLM command,CSGLM command,CSGLM command
root mean squared error,root mean squared error,root mean squared error
CSGLM command,CSGLM command,CSGLM command
GEF (keyword),GEF (keyword),GEF (keyword)
CSGLM command,CSGLM command,CSGLM command
general estimable function,general estimable function,general estimable function
CSGLM command,CSGLM command,CSGLM command
LMATRIX (keyword),LMATRIX (keyword),LMATRIX (keyword)
CSGLM command,CSGLM command,CSGLM command
contrast coefficients matrix,contrast coefficients matrix,contrast coefficients matrix
CSGLM command,CSGLM command,CSGLM command
L matrix,L matrix,L matrix
CSGLM command,CSGLM command,CSGLM command
COVB (keyword),COVB (keyword),COVB (keyword)
CSGLM command,CSGLM command,CSGLM command
covariance matrix,covariance matrix,covariance matrix
CSGLM command,CSGLM command,CSGLM command
CORB (keyword),CORB (keyword),CORB (keyword)
CSGLM command,CSGLM command,CSGLM command
correlation matrix,correlation matrix,correlation matrix
CSGLM command,CSGLM command,CSGLM command
NONE (keyword),NONE (keyword),NONE (keyword)
CSGLM command,CSGLM command,CSGLM command
SAMPLEINFO | Sample information table. Displays summary information about the sample, including the unweighted count and the population size. This output is default output if the PRINT subcommand is not specified.
VARIABLEINFO | Variable information. Displays summary information about the dependent variable, covariates, and factors. This output is default output if the PRINT subcommand is not specified.
SUMMARY | Model summary statistics. Displays R2 and root mean squared error statistics. This output is default output if the PRINT subcommand is not specified.
GEF | General estimable function table.
LMATRIX | Set of contrast coefficients (L) matrices.
COVB | Covariance matrix for regression coefficients.
CORB | Correlation matrix for regression coefficients.
NONE | No PRINT subcommand output. None of the PRINT subcommand output is displayed. However, if NONE is specified with one or more other keywords, the other keywords override NONE.

Related Topics

CSGLM
Overview (CSGLM command)
Examples (CSGLM command)
CSGLM Variable List (CSGLM command)
PLAN Subcommand (CSGLM command)
JOINTPROB Subcommand (CSGLM command)
MODEL Subcommand (CSGLM command)
INTERCEPT Subcommand (CSGLM command)
CUSTOM Subcommand (CSGLM command)
EMMEANS Subcommand (CSGLM command)
CONTRAST Keyword (CSGLM command)
CRITERIA Subcommand (CSGLM command)
STATISTICS Subcommand (CSGLM command)
TEST Subcommand (CSGLM command)
DOMAIN Subcommand (CSGLM command)
MISSING Subcommand (CSGLM command)
SAVE Subcommand (CSGLM command)
OUTFILE Subcommand (CSGLM command)


SAVE Subcommand (CSGLM command)

CSGLM (command),CSGLM (command),CSGLM (command)
saving new variables,saving new variables,saving new variables
SAVE (subcommand),SAVE (subcommand),SAVE (subcommand)
CSGLM command,CSGLM command,CSGLM command
CSGLM (command),CSGLM (command),CSGLM (command)
SAVE subcommand,SAVE subcommand,SAVE subcommand

The SAVE subcommand adds predicted or residual values to the active dataset.

• Specify one or more temporary variables, each variable followed by an optional new name in parentheses.

• The optional names must be unique, valid variable names.

• If new names are not specified, CSGLM uses the default names. If the default names conflict with existing variable names, a suffix is added to the default name to make it unique.

PRED (keyword),PRED (keyword),PRED (keyword)
CSGLM command,CSGLM command,CSGLM command
predicted values,predicted values,predicted values
CSGLM command,CSGLM command,CSGLM command
RESID (keyword),RESID (keyword),RESID (keyword)
CSGLM command,CSGLM command,CSGLM command
residuals,residuals,residuals
CSGLM command,CSGLM command,CSGLM command
PRED | Saves predicted values. The default variable name is Predicted.
RESID | Saves residuals. The default variable name is Residual.

Related Topics

CSGLM
Overview (CSGLM command)
Examples (CSGLM command)
CSGLM Variable List (CSGLM command)
PLAN Subcommand (CSGLM command)
JOINTPROB Subcommand (CSGLM command)
MODEL Subcommand (CSGLM command)
INTERCEPT Subcommand (CSGLM command)
CUSTOM Subcommand (CSGLM command)
EMMEANS Subcommand (CSGLM command)
CONTRAST Keyword (CSGLM command)
CRITERIA Subcommand (CSGLM command)
STATISTICS Subcommand (CSGLM command)
TEST Subcommand (CSGLM command)
DOMAIN Subcommand (CSGLM command)
MISSING Subcommand (CSGLM command)
PRINT Subcommand (CSGLM command)
OUTFILE Subcommand (CSGLM command)


OUTFILE Subcommand (CSGLM command)

PASW Statistics data file export,PASW Statistics data file export,PASW Statistics data file export
CSGLM command,CSGLM command,CSGLM command
exporting output,exporting output,exporting output
CSGLM command,CSGLM command,CSGLM command
XML export,XML export,XML export
CSGLM command,CSGLM command,CSGLM command
CSGLM (command),CSGLM (command),CSGLM (command)
export PASW Statistics data format,export PASW Statistics data format,export PASW Statistics data format
CSGLM (command),CSGLM (command),CSGLM (command)
export XML format,export XML format,export XML format
OUTFILE (subcommand),OUTFILE (subcommand),OUTFILE (subcommand)
CSGLM command,CSGLM command,CSGLM command
CSGLM (command),CSGLM (command),CSGLM (command)
OUTFILE subcommand,OUTFILE subcommand,OUTFILE subcommand

The OUTFILE subcommand saves an external PASW Statistics data file or previously declared dataset containing the parameter covariance or correlation matrix with parameter estimates, standard errors, significance values, and sampling design degrees of freedom. It also saves the parameter estimates and the parameter covariance matrix in XML format.

• At least one keyword and a filename are required. Specify the keyword followed by a quoted file specification.

• The COVB and CORB keywords are mutually exclusive, as are the MODEL and PARAMETER keywords.

• The filename must be specified in full. CSGLM does not supply an extension.

• For COVB and CORB, you can specify a previously declared dataset name (DATASET DECLARE command) instead of a file specification.

COVB (keyword),COVB (keyword),COVB (keyword)
CSGLM command,CSGLM command,CSGLM command
CORB (keyword),CORB (keyword),CORB (keyword)
CSGLM command,CSGLM command,CSGLM command
MODEL (keyword),MODEL (keyword),MODEL (keyword)
CSGLM command,CSGLM command,CSGLM command
PARAMETER (keyword),PARAMETER (keyword),PARAMETER (keyword)
CSGLM command,CSGLM command,CSGLM command
CSGLM (command),CSGLM (command),CSGLM (command)
COVB = 'savfile'|'dataset' | Writes the parameter covariance matrix and other statistics to an external PASW Statistics datafile or previously declared dataset.
CORB = 'savfile'|'dataset' | Writes the parameter correlation matrix and other statistics to an external PASW Statistics data file or previously declared dataset.
MODEL = 'file' | Writes the parameter estimates and the parameter covariance matrix to an XML file.
PARAMETER = 'file' | Writes the parameter estimates to an XML file.

Related Topics

CSGLM
Overview (CSGLM command)
Examples (CSGLM command)
CSGLM Variable List (CSGLM command)
PLAN Subcommand (CSGLM command)
JOINTPROB Subcommand (CSGLM command)
MODEL Subcommand (CSGLM command)
INTERCEPT Subcommand (CSGLM command)
CUSTOM Subcommand (CSGLM command)
EMMEANS Subcommand (CSGLM command)
CONTRAST Keyword (CSGLM command)
CRITERIA Subcommand (CSGLM command)
STATISTICS Subcommand (CSGLM command)
TEST Subcommand (CSGLM command)
DOMAIN Subcommand (CSGLM command)
MISSING Subcommand (CSGLM command)
PRINT Subcommand (CSGLM command)
SAVE Subcommand (CSGLM command)


CSLOGISTIC

Complex Samples Logistic Regression,Complex Samples Logistic Regression,Complex Samples Logistic Regression
command syntax,command syntax,command syntax
CSLOGISTIC (command),CSLOGISTIC (command),CSLOGISTIC (command)
CSLOGISTIC (command),CSLOGISTIC (command),CSLOGISTIC (command)
syntax chart,syntax chart,syntax chart
release history,release history,release history

CSLOGISTIC is available in the Complex Samples option.

Note: Square brackets that are used in the CSLOGISTIC syntax chart are required parts of the syntax and are not used to indicate optional elements. Equals signs (=) that are used in the syntax chart are required elements. All subcommands, save the PLAN subcommand, are optional.

CSLOGISTIC dependent var ({LOW   }) BY factor list WITH covariate list
                          {HIGH**}
                          {value }

  /PLAN FILE = file

  /JOINTPROB FILE = file

  /MODEL effect list

  /INTERCEPT INCLUDE = {YES**} SHOW = {YES**}
                       {NO   }        {NO   }
                       {ONLY }

  /CUSTOM LABEL = "label"

     LMATRIX = {number effect list effect list ...; ...}
               {number effect list effect list ...     }
               {effect list effect list ...; ...       }
               {effect list effect list ...            }
               {ALL list; ALL ...                      }
               {ALL list                               }

     KMATRIX = {number; number; ...}
               {number             }

  /CUSTOM ...

  /ODDSRATIOS {FACTOR = [varname ({LOW   }) varname ...] }
                                  {HIGH**}
                                  {value }

              {COVARIATE = [varname ({1**        }) varname ...]}
                                     {number list}

               CONTROL = [varname (value) varname (value) ...]

  /ODDSRATIOS ...

  /CRITERIA CHKSEP = {20**} CILEVEL = {95** } DF = n
                     {n   }           {value}

            LCONVERGE = [{0**   } {RELATIVE**}] MXITER = {100**}
                    {value} {ABSOLUTE  }           {n    }

            MXSTEP = {5**} PCONVERGE = [{1E-6**} {RELATIVE**}]
                     {n  }              {value } {ABSOLUTE }

            SINGULAR = {1E-12**}
                       {value  }

  /STATISTICS PARAMETER EXP SE TTEST CINTERVAL DEFF DEFFSQRT

  /TEST TYPE = {F**         } PADJUST = {LSD**        }
               {ADJF        }           {BONFERRONI   }
               {CHISQUARE   }           {SEQBONFERRONI}
               {ADJCHISQUARE}           {SIDAK        }
                                        {SEQSIDAK     }

  /DOMAIN VARIABLE = varname (value)

  /MISSING CLASSMISSING = {EXCLUDE**}
                          {INCLUDE  }

  /PRINT SAMPLEINFO** VARIABLEINFO** SUMMARY**

         HISTORY({1**}) GEF LMATRIX COVB CORB CLASSTABLE NONE
                 {n  }

  /SAVE PREDPROB(rootname:{25**}) PREDVAL(varname)
                          {n   }

  /OUTFILE {COVB = 'savfile'|'dataset'} {MODEL = 'file'    }
           {CORB = 'savfile'|'dataset'} {PARAMETER = 'file'}

**Default if the keyword or subcommand is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See CSLOGISTIC Algorithms for computational details for this procedure.

Syntax for the CSLOGISTIC command can be generated from the Complex Samples Logistic Regression dialog.

Release History Collapse Hide details

Release History

Release 13.0

• Command introduced.

Release 17.0

• Added support for SET THREADS.

Example

CSLOGISTIC y BY a b c WITH x
  /PLAN FILE='/survey/myfile.csplan'.

Related Topics

Overview (CSLOGISTIC command)
Examples (CSLOGISTIC command)
CSLOGISTIC Variable List (CSLOGISTIC command)
PLAN Subcommand (CSLOGISTIC command)
JOINTPROB Subcommand (CSLOGISTIC command)
MODEL Subcommand (CSLOGISTIC command)
INTERCEPT Subcommand (CSLOGISTIC command)
CUSTOM Subcommand (CSLOGISTIC command)
ODDSRATIOS Subcommand (CSLOGISTIC command)
CRITERIA Subcommand (CSLOGISTIC command)
STATISTICS Subcommand (CSLOGISTIC command)
TEST Subcommand (CSLOGISTIC command)
DOMAIN Subcommand (CSLOGISTIC command)
MISSING Subcommand (CSLOGISTIC command)
PRINT Subcommand (CSLOGISTIC command)
SAVE Subcommand (CSLOGISTIC command)
OUTFILE Subcommand (CSLOGISTIC command)


Overview (CSLOGISTIC command)

CSLOGISTIC performs logistic regression analysis on a binary or multinomial dependent variable using the generalized link function for samples that are drawn by complex sampling methods. The procedure estimates variances by taking into account the sample design that is used to select the sample, including equal probability and probability proportional to size (PPS) methods, and with replacement (WR) and without replacement (WOR) sampling procedures. Optionally, CSLOGISTIC performs analyses for a subpopulation.

Basic Specification Collapse Hide details

Basic Specification

• The basic specification is a variable list (identifying the dependent variable, the factors, if any, and the covariates, if any) and a PLAN subcommand with the name of a complex sample analysis plan file, which may be generated by the CSPLAN procedure.

• The default model includes the intercept term, main effects for any factors, and any covariates.

• The basic specification displays summary information about the sample and all analysis variables, model summary statistics, and Wald F tests for all model effects. Additional subcommands must be used for other output.

Operations Collapse Hide details

Operations

• CSLOGISTIC performs logistic regression analysis for sampling designs that are supported by the CSPLAN and CSSELECT procedures.

• The input dataset must contain the variables to be analyzed and variables that are related to the sampling design.

• The complex sample analysis plan file provides an analysis plan based on the sampling design.

• By default, CSLOGISTIC uses a model that includes the intercept term, main effects for any factors, and any covariates.

• Other effects, including interaction and nested effects, may be specified by using the MODEL subcommand.

• The default output for the specified model is summary information about the sample and all analysis variables, model summary statistics, and Wald F tests for all model effects.

• WEIGHT and SPLIT FILE settings are ignored by the CSLOGISTIC procedure.

• This procedure uses the multithreaded options specified by SET THREADS.

Syntax Rules Collapse Hide details

Syntax Rules

• The dependent variable and PLAN subcommand are required. All other variables and subcommands are optional.

• Multiple CUSTOM and ODDSRATIOS subcommands may be specified; each subcommand is treated independently. All other subcommands may be specified only once.

• Empty subcommands are not allowed; all subcommands must be specified with options.

• Each keyword may be specified only once within a subcommand.

• Subcommand names and keywords must be spelled in full.

• Equals signs (=) that are shown in the syntax chart are required.

• Subcommands may be specified in any order.

• The dependent variable, factors, and the subpopulation variable can be numeric or string variables, but covariates must be numeric.

• Across the dependent, factor, and covariate variable lists, a variable may be specified only once.

• Plan file and subpopulation variables may not be specified on the variable list.

• Minimum syntax is a dependent variable and the PLAN subcommand. This specification fits an intercept-only model.

Limitations Collapse Hide details

Limitations

• WEIGHT and SPLIT FILE settings are ignored with a warning by the CSLOGISTIC procedure.

Related Topics

CSLOGISTIC
Examples (CSLOGISTIC command)
CSLOGISTIC Variable List (CSLOGISTIC command)
PLAN Subcommand (CSLOGISTIC command)
JOINTPROB Subcommand (CSLOGISTIC command)
MODEL Subcommand (CSLOGISTIC command)
INTERCEPT Subcommand (CSLOGISTIC command)
CUSTOM Subcommand (CSLOGISTIC command)
ODDSRATIOS Subcommand (CSLOGISTIC command)
CRITERIA Subcommand (CSLOGISTIC command)
STATISTICS Subcommand (CSLOGISTIC command)
TEST Subcommand (CSLOGISTIC command)
DOMAIN Subcommand (CSLOGISTIC command)
MISSING Subcommand (CSLOGISTIC command)
PRINT Subcommand (CSLOGISTIC command)
SAVE Subcommand (CSLOGISTIC command)
OUTFILE Subcommand (CSLOGISTIC command)


Examples (CSLOGISTIC command)

* Complex Samples Logistic Regression.
CSLOGISTIC default(LOW) BY ed WITH age employ address income debtinc creddebt othdebt
 /PLAN FILE = 'samplesDirectory\bankloan.csaplan'
 /MODEL ed age employ address income debtinc creddebt othdebt
 /INTERCEPT INCLUDE=YES SHOW=YES
 /STATISTICS PARAMETER EXP SE CINTERVAL DEFF
 /TEST TYPE=F PADJUST=LSD
 /ODDSRATIOS FACTOR=[ed(HIGH)]
 /ODDSRATIOS COVARIATE=[employ(1)]
 /ODDSRATIOS COVARIATE=[debtinc(1)]
 /MISSING CLASSMISSING=EXCLUDE
 /CRITERIA MXITER=100 MXSTEP=5
  PCONVERGE=[1e-006 RELATIVE] CHKSEP=20
  CILEVEL=95
 /PRINT SUMMARY CLASSTABLE VARIABLEINFO SAMPLEINFO .

• The procedure fits a logistic regression model for the dependent variable default (with the lowest value as the reference category) using ed as a factor and age, employ, address, income, debtinc, creddebt, and othdebt as covariates.

• The complex sampling analysis plan is contained in the file bankloan.csaplan.

• The model specification calls for a main effects model with intercept.

• Parameter estimates, their standard errors, 95% confidence intervals, and exponentiated parameter estimates and their 95% confidence intervals are requested.

• A classification table is requested in addition to the default model output.

• Odds ratios are produced for the factor ed and the covariates employ and debtinc, using the default reference category and change in value, respectively.

• All other options are set to their default values.

For discussion of output from this syntax and to place the example in context, see Using Complex Samples Logistic Regression to Assess Credit Risk.

Related Topics

CSLOGISTIC
Overview (CSLOGISTIC command)
CSLOGISTIC Variable List (CSLOGISTIC command)
PLAN Subcommand (CSLOGISTIC command)
JOINTPROB Subcommand (CSLOGISTIC command)
MODEL Subcommand (CSLOGISTIC command)
INTERCEPT Subcommand (CSLOGISTIC command)
CUSTOM Subcommand (CSLOGISTIC command)
ODDSRATIOS Subcommand (CSLOGISTIC command)
CRITERIA Subcommand (CSLOGISTIC command)
STATISTICS Subcommand (CSLOGISTIC command)
TEST Subcommand (CSLOGISTIC command)
DOMAIN Subcommand (CSLOGISTIC command)
MISSING Subcommand (CSLOGISTIC command)
PRINT Subcommand (CSLOGISTIC command)
SAVE Subcommand (CSLOGISTIC command)
OUTFILE Subcommand (CSLOGISTIC command)


CSLOGISTIC Variable List (CSLOGISTIC command)

The variable list specifies the dependent variable and reference category, the factors, and the covariates in the model.

• The dependent variable must be the first specification on CLOGISTIC.

• The dependent variable can be numeric or string.

• The CSLOGISTIC procedure sorts levels of the dependent variable in ascending order and defines the highest level as the last level. (If the dependent variable is a string variable, the value of the highest level is locale-dependent.) By default, the highest response category is used as the base (or reference) category.

• A custom reference category may be specified in parentheses immediately following the dependent variable.

LOW (keyword),LOW (keyword),LOW (keyword)
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
HIGH (keyword),HIGH (keyword),HIGH (keyword)
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
LOW | The lowest category is the reference category.
HIGH | The highest category is the reference category. This setting is the default.
value | User-specified reference category. The category that corresponds to the specified value is the reference category. Put the value inside a pair of quotation marks if the value is formatted (such as date or time) or if the dependent variable is of string type. Note, however, that this does not work for custom currency formats.

• If a value is specified as the reference category of the dependent variable, but the value does not exist in the data, a warning is issued and the default HIGH is used.

• The names of the factors and covariates, if any, follow the dependent variable. Specify any factors following the keyword BY. Specify any covariates following the keyword WITH.

• Factors can be numeric or string variables, but covariates must be numeric.

• Each variable may be specified only once on the variable list.

• Plan file and subpopulation variables may not be specified on the variable list.

Related Topics

CSLOGISTIC
Overview (CSLOGISTIC command)
Examples (CSLOGISTIC command)
PLAN Subcommand (CSLOGISTIC command)
JOINTPROB Subcommand (CSLOGISTIC command)
MODEL Subcommand (CSLOGISTIC command)
INTERCEPT Subcommand (CSLOGISTIC command)
CUSTOM Subcommand (CSLOGISTIC command)
ODDSRATIOS Subcommand (CSLOGISTIC command)
CRITERIA Subcommand (CSLOGISTIC command)
STATISTICS Subcommand (CSLOGISTIC command)
TEST Subcommand (CSLOGISTIC command)
DOMAIN Subcommand (CSLOGISTIC command)
MISSING Subcommand (CSLOGISTIC command)
PRINT Subcommand (CSLOGISTIC command)
SAVE Subcommand (CSLOGISTIC command)
OUTFILE Subcommand (CSLOGISTIC command)


PLAN Subcommand (CSLOGISTIC command)

plan file,plan file,plan file
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
PLAN (subcommand),PLAN (subcommand),PLAN (subcommand)
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
CSLOGISTIC (command),CSLOGISTIC (command),CSLOGISTIC (command)
PLAN subcommand,PLAN subcommand,PLAN subcommand

The PLAN subcommand specifies the name of an XML file containing analysis design specifications. This file is written by the CSPLAN procedure.

• The PLAN subcommand is required.

FILE (keyword),FILE (keyword),FILE (keyword)
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
FILE Specifies the name of an external file.

Related Topics

CSLOGISTIC
Overview (CSLOGISTIC command)
Examples (CSLOGISTIC command)
CSLOGISTIC Variable List (CSLOGISTIC command)
JOINTPROB Subcommand (CSLOGISTIC command)
MODEL Subcommand (CSLOGISTIC command)
INTERCEPT Subcommand (CSLOGISTIC command)
CUSTOM Subcommand (CSLOGISTIC command)
ODDSRATIOS Subcommand (CSLOGISTIC command)
CRITERIA Subcommand (CSLOGISTIC command)
STATISTICS Subcommand (CSLOGISTIC command)
TEST Subcommand (CSLOGISTIC command)
DOMAIN Subcommand (CSLOGISTIC command)
MISSING Subcommand (CSLOGISTIC command)
PRINT Subcommand (CSLOGISTIC command)
SAVE Subcommand (CSLOGISTIC command)
OUTFILE Subcommand (CSLOGISTIC command)


JOINTPROB Subcommand (CSLOGISTIC command)

joint probabilities,joint probabilities,joint probabilities
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
JOINTPROB (subcommand),JOINTPROB (subcommand),JOINTPROB (subcommand)
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
CSLOGISTIC (command),CSLOGISTIC (command),CSLOGISTIC (command)
JOINTPROB subcommand,JOINTPROB subcommand,JOINTPROB subcommand

The JOINTPROB subcommand is used to specify the file or dataset containing the first stage joint inclusion probabilities for UNEQUAL_WOR estimation. The CSSELECT procedure writes this file in the same location and with the same name (but different extension) as the plan file. When UNEQUAL_WOR estimation is specified, the CSLOGISTIC procedure will use the default location and name of the file unless the JOINTPROB subcommand is used to override them.

FILE (keyword),FILE (keyword),FILE (keyword)
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
FILE Specifies the name of the file or dataset containing the joint inclusion probabilities.

Related Topics

CSLOGISTIC
Overview (CSLOGISTIC command)
Examples (CSLOGISTIC command)
CSLOGISTIC Variable List (CSLOGISTIC command)
PLAN Subcommand (CSLOGISTIC command)
MODEL Subcommand (CSLOGISTIC command)
INTERCEPT Subcommand (CSLOGISTIC command)
CUSTOM Subcommand (CSLOGISTIC command)
ODDSRATIOS Subcommand (CSLOGISTIC command)
CRITERIA Subcommand (CSLOGISTIC command)
STATISTICS Subcommand (CSLOGISTIC command)
TEST Subcommand (CSLOGISTIC command)
DOMAIN Subcommand (CSLOGISTIC command)
MISSING Subcommand (CSLOGISTIC command)
PRINT Subcommand (CSLOGISTIC command)
SAVE Subcommand (CSLOGISTIC command)
OUTFILE Subcommand (CSLOGISTIC command)


MODEL Subcommand (CSLOGISTIC command)

model terms,model terms,model terms
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
MODEL (subcommand),MODEL (subcommand),MODEL (subcommand)
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
CSLOGISTIC (command),CSLOGISTIC (command),CSLOGISTIC (command)
MODEL subcommand,MODEL subcommand,MODEL subcommand

The MODEL subcommand is used to specify the effects to be included in the model. Use the INTERCEPT subcommand to control whether the intercept is included.

• The MODEL subcommand defines the cells in a design. In particular, cells are defined by all of the possible combinations of levels of the factors in the design. The number of cells equals the product of the number of levels of all the factors. A design is balanced if each cell contains the same number of cases. CSLOGISTIC can analyze balanced and unbalanced designs.

• The format is a list of effects to be included in the model, separated by spaces or commas.

• If the MODEL subcommand is not specified, CSLOGISTIC uses a model that includes the intercept term (unless it is excluded on the INTERCEPT subcommand), main effects for any factors, and any covariates.

• To include a term for the main effect of a factor, enter the name of the factor.

• To include a term for an interaction between factors, use the keyword BY or the asterisk (*) to join the factors that are involved in the interaction. For example, A*B means a two-way interaction effect of A and B, where A and B are factors. A*A is not allowed because factors that are inside an interaction effect must be distinct.

• To include a term for nesting one effect within another effect, use a pair of parentheses. For example, A(B) means that A is nested within B. When more than one pair of parentheses is present, each pair of parentheses must be enclosed or nested within another pair of parentheses. Thus, A(B)(C) is not valid.

• Multiple nesting is allowed. For example, A(B(C)) means that B is nested within C, and A is nested within B(C).

• Interactions between nested effects are not valid. For example, neither A(C)*B(C) nor A(C)*B(D) is valid.

• To include a covariate term in the design, enter the name of the covariate.

• Covariates can be connected, but not nested, through the * operator to form another covariate effect. Interactions among covariates such as X1*X1 and X1*X2 are valid, but X1(X2) is not.

• Factor and covariate effects can be connected only by the * operator. Suppose A and B are factors, and X1 and X2 are covariates. Examples of valid factor-by-covariate interaction effects are A*X1, A*B*X1, X1*A(B), A*X1*X1, and B*X1*X2.

Related Topics

CSLOGISTIC
Overview (CSLOGISTIC command)
Examples (CSLOGISTIC command)
CSLOGISTIC Variable List (CSLOGISTIC command)
PLAN Subcommand (CSLOGISTIC command)
JOINTPROB Subcommand (CSLOGISTIC command)
INTERCEPT Subcommand (CSLOGISTIC command)
CUSTOM Subcommand (CSLOGISTIC command)
ODDSRATIOS Subcommand (CSLOGISTIC command)
CRITERIA Subcommand (CSLOGISTIC command)
STATISTICS Subcommand (CSLOGISTIC command)
TEST Subcommand (CSLOGISTIC command)
DOMAIN Subcommand (CSLOGISTIC command)
MISSING Subcommand (CSLOGISTIC command)
PRINT Subcommand (CSLOGISTIC command)
SAVE Subcommand (CSLOGISTIC command)
OUTFILE Subcommand (CSLOGISTIC command)


INTERCEPT Subcommand (CSLOGISTIC command)

intercept,intercept,intercept
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
INTERCEPT (subcommand),INTERCEPT (subcommand),INTERCEPT (subcommand)
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
CSLOGISTIC (command),CSLOGISTIC (command),CSLOGISTIC (command)
INTERCEPT subcommand,INTERCEPT subcommand,INTERCEPT subcommand

The INTERCEPT subcommand controls whether an intercept term is included in the model. This subcommand can also be used to display or suppress the intercept term in output tables.

Related Topics

CSLOGISTIC
Overview (CSLOGISTIC command)
Examples (CSLOGISTIC command)
CSLOGISTIC Variable List (CSLOGISTIC command)
PLAN Subcommand (CSLOGISTIC command)
JOINTPROB Subcommand (CSLOGISTIC command)
MODEL Subcommand (CSLOGISTIC command)
CUSTOM Subcommand (CSLOGISTIC command)
ODDSRATIOS Subcommand (CSLOGISTIC command)
CRITERIA Subcommand (CSLOGISTIC command)
STATISTICS Subcommand (CSLOGISTIC command)
TEST Subcommand (CSLOGISTIC command)
DOMAIN Subcommand (CSLOGISTIC command)
MISSING Subcommand (CSLOGISTIC command)
PRINT Subcommand (CSLOGISTIC command)
SAVE Subcommand (CSLOGISTIC command)
OUTFILE Subcommand (CSLOGISTIC command)
INCLUDE Keyword (CSLOGISTIC command)
SHOW Keyword (CSLOGISTIC command)
Example (CSLOGISTIC command)


INCLUDE Keyword (CSLOGISTIC command)

The INCLUDE keyword specifies whether the intercept is included in the model, or the keyword requests the intercept-only model.

YES (keyword),YES (keyword),YES (keyword)
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
NO (keyword),NO (keyword),NO (keyword)
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
ONLY (keyword),ONLY (keyword),ONLY (keyword)
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
YES | The intercept is included in the model. This setting is the default.
NO | The intercept is not included in the model. If no factors or covariates are defined, specifying INCLUDE = NO is invalid syntax.
ONLY | The intercept-only model is fit. If the MODEL subcommand is specified, specifying INCLUDE = ONLY is invalid syntax.

Related Topics

INTERCEPT Subcommand (CSLOGISTIC command)
SHOW Keyword (CSLOGISTIC command)
Example (CSLOGISTIC command)


SHOW Keyword (CSLOGISTIC command)

The SHOW keyword specifies whether the intercept is displayed or suppressed in output tables.

YES (keyword),YES (keyword),YES (keyword)
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
NO (keyword),NO (keyword),NO (keyword)
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
YES | The intercept is displayed in output tables. This setting is the default.
NO | The intercept is not displayed in output tables. If INCLUDE = NO or ONLY is specified, SHOW = NO is ignored.

Related Topics

INTERCEPT Subcommand (CSLOGISTIC command)
INCLUDE Keyword (CSLOGISTIC command)
Example (CSLOGISTIC command)


Example (CSLOGISTIC command)

CSLOGISTIC y BY a b c
  /PLAN FILE='/survey/myfile.csplan'
  /INTERCEPT INCLUDE = ONLY.

• The preceding syntax defines the model space using factors A, B, and C but fits the intercept-only model.

Related Topics

INTERCEPT Subcommand (CSLOGISTIC command)
INCLUDE Keyword (CSLOGISTIC command)
SHOW Keyword (CSLOGISTIC command)


CUSTOM Subcommand (CSLOGISTIC command)

custom hypothesis tests,custom hypothesis tests,custom hypothesis tests
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
CUSTOM (subcommand),CUSTOM (subcommand),CUSTOM (subcommand)
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
CSLOGISTIC (command),CSLOGISTIC (command),CSLOGISTIC (command)
CUSTOM subcommand,CUSTOM subcommand,CUSTOM subcommand

The CUSTOM subcommand defines custom hypothesis tests by specifying the L matrix (contrast coefficients matrix) and the K matrix (contrast results matrix) in the general form of the linear hypothesis LB = K. The vector B is the parameter vector in the linear model.

For a binary dependent variable, CSLOGISTIC models a single logit. In this case, there is one set of parameters associated with the logit.

For a multinomial dependent variable with K levels, CSLOGISTIC models K−1 logits. In this case, there are K−1 sets of parameters, each associated with a different logit. The CUSTOM subcommand allows you to specify an L matrix in which the same or different contrast coefficients are used across logits.

• Multiple CUSTOM subcommands are allowed. Each subcommand is treated independently.

• An optional label may be specified by using the LABEL keyword. The label is a string with a maximum length of 255 characters. Only one label can be specified.

• Either the LMATRIX or KMATRIX keyword, or both, must be specified.

LMATRIX (keyword),LMATRIX (keyword),LMATRIX (keyword)
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
KMATRIX (keyword),KMATRIX (keyword),KMATRIX (keyword)
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
LMATRIX | Contrast coefficients matrix. This matrix specifies coefficients of contrasts, which can be used for studying the effects in the model. An L matrix can be specified by using the LMATRIX keyword.
KMATRIX | Contrast results matrix. This matrix specifies the results of the linear hypothesis. A K matrix can be specified by using the KMATRIX keyword.

• The number of rows in the L and K matrices must be equal.

• A custom hypothesis test can be formed by specifying an L or K matrix, or both. If only one matrix is specified, the unspecified matrix uses the defaults described below.

• If KMATRIX is specified but LMATRIX is not specified, the L matrix is assumed to be the row vector corresponding to the intercept in the estimable function, provided that INCLUDE = YES or ONLY is specified on the INTERCEPT subcommand.

• The default K matrix is a zero matrix; that is, LB = 0 is assumed.

• There are three general formats that can be used on the LMATRIX keyword: (1) Specify a coefficient value for the intercept, followed optionally by an effect name and a list of real numbers. (2) Specify an effect name and a list of real numbers. (3) Specify keyword ALL and a list of real numbers. In all three formats, there can be multiple effect names (or instances of the keyword ALL) and number lists.

• Only valid effects in the default model or on the MODEL subcommand can be specified on the LMATRIX keyword.

• The length of the list of real numbers on the LMATRIX keyword must be equal to the number of parameters (including the redundant parameters) corresponding to the specified effect. For example, if the effect A*B takes up six columns in the design matrix, the list after A*B must contain exactly six numbers.

• When ALL is specified, the length of the list that follows ALL must be equal to the total number of parameters (including the redundant parameters) in the model. For a binary dependent variable, the contrast coefficients for the one set of parameters must be listed following the ALL keyword. For a multinomial dependent variable with K levels, the contrast coefficients for the K−1 sets of parameters must be listed in order following the ALL keyword. That is, first list all parameters (including the redundant parameters) for the first logit, then list all parameters for the second logit, and so forth.

• In general, for a multinomial dependent variable with K levels, each contrast and its associated hypothesized value are generated separately for each of the K−1 logits; that is, any given contrast is generated K−1 times. However, if the LMATRIX ALL keyword is used to define a contrast, then that contrast and its associated hypothesized value are generated once, simultaneously covering all logits.

• Effects that are in the model but not specified on the LMATRIX keyword are assumed to have entries of 0 in the corresponding columns of the L matrix.

• When an L matrix is defined, a number can be specified as a fraction with a positive denominator. For example, 1/3 and –1/3 are valid, but 1/–3 is invalid.

• A semicolon (;) indicates the end of a row in the L matrix.

• The format for the KMATRIX keyword is one or more real numbers. If more than one number is specified, then separate adjacent numbers using a semicolon (;). Each semicolon indicates the end of a row in the K matrix. Each number is the hypothesized value for a contrast, which is defined by a row in the L matrix.

• For the KMATRIX keyword to be valid, either the LMATRIX keyword, or INCLUDE = YES on the INTERCEPT subcommand, must be specified.

Related Topics

CSLOGISTIC
Overview (CSLOGISTIC command)
Examples (CSLOGISTIC command)
CSLOGISTIC Variable List (CSLOGISTIC command)
PLAN Subcommand (CSLOGISTIC command)
JOINTPROB Subcommand (CSLOGISTIC command)
MODEL Subcommand (CSLOGISTIC command)
INTERCEPT Subcommand (CSLOGISTIC command)
ODDSRATIOS Subcommand (CSLOGISTIC command)
CRITERIA Subcommand (CSLOGISTIC command)
STATISTICS Subcommand (CSLOGISTIC command)
TEST Subcommand (CSLOGISTIC command)
DOMAIN Subcommand (CSLOGISTIC command)
MISSING Subcommand (CSLOGISTIC command)
PRINT Subcommand (CSLOGISTIC command)
SAVE Subcommand (CSLOGISTIC command)
OUTFILE Subcommand (CSLOGISTIC command)
Example (CSLOGISTIC command)
Example (CSLOGISTIC command)
Example (CSLOGISTIC command)


Example (CSLOGISTIC command)

Suppose that dependent variable Y is binary, and factors A and B each have three levels.

CSLOGISTIC y BY a b
  /PLAN FILE='/survey/myfile.csplan'
  /MODEL a b a*b
  /CUSTOM  LABEL = ‘Effect A’
     LMATRIX = a 1 0 -1
       a*b  1/3  1/3  1/3
            0    0    0
           -1/3 -1/3 -1/3;
       a 0 1 -1
       a*b  0    0    0
            1/3  1/3  1/3
           -1/3 -1/3 -1/3.

• The preceding syntax specifies a test of effect A.

• Because there are three levels in effect A, two independent contrasts can be formed at most; thus, there are two rows in the L matrix, separated by a semicolon (;).

• There are three levels each in effects A and B; thus, the interaction effect A*B takes nine columns in the design matrix.

• The first row in the L matrix tests the difference between levels 1 and 3 of effect A; the second row tests the difference between levels 2 and 3 of effect A.

• The KMATRIX keyword is not specified, so the null hypothesis value for both tests is 0.

Related Topics

CUSTOM Subcommand (CSLOGISTIC command)
Example (CSLOGISTIC command)
Example (CSLOGISTIC command)


Example (CSLOGISTIC command)

Suppose that dependent variable Z and factor A each have three levels.

CSLOGISTIC z BY a
  /PLAN FILE='/survey/myfile.csplan'
  /MODEL a
  /CUSTOM LABEL = ‘Effect A’
     LMATRIX = a 1 0 -1;
               a 0 1 -1

• The dependent variable Z has three categories, so there will be two logits.

• The syntax specifies a model with an intercept and a main effect for factor A and a custom hypothesis test of effect A.

• Because the ALL option is not used on the LMATRIX keyword, the same set of contrast coefficients for the parameters will be used across both logits. That is, the resulting L matrix is block diagonal with the same 2-by-4 matrix of coefficients in each block. The equivalent LMATRIX keyword using the ALL option is as follows:

     LMATRIX = ALL 0 1  0 -1 0 0  0  0;
               ALL 0 0  1 -1 0 0  0  0;
               ALL 0 0  0  0 0 1  0 -1;
               ALL 0 0  0  0 0 0  1 -1

Related Topics

CUSTOM Subcommand (CSLOGISTIC command)
Example (CSLOGISTIC command)
Example (CSLOGISTIC command)


Example (CSLOGISTIC command)

Suppose that dependent variable Z has three categories, and factors A and B each have three levels.

CSLOGISTIC z BY a b
  /PLAN FILE='/survey/myfile.csplan'
  /CUSTOM LABEL = ‘Effect A for All Logits’
     LMATRIX = a 1 0 -1; a 0 1 –1
  /CUSTOM LABEL = ‘Effect A for 1st Logit, Effect B for 2nd Logit’
     LMATRIX = ALL 0 1 0 –1 0 0 0 0 0 0 0 1 0 –1;
       ALL 0 0 1 –1 0 0 0 0 0 0 0 0 1 –1
     KMATRIX = 0; 0.

• The dependent variable Z has three categories, so there will be two logits.

• The MODEL subcommand is not specified; thus the default model—which includes the intercept and main effects for A and B—is used.

• The first CUSTOM subcommand tests whether the effect of factor A is 0 across both logits.

• The second CUSTOM subcommand specifies different contrast coefficients for each logit. In particular, the L matrix tests the effect of factor A for the first logit and factor B for the second logit. The KMATRIX keyword explicitly states that each linear combination that is formed from the contrast coefficients and the parameter estimates is tested against the value 0.

Related Topics

CUSTOM Subcommand (CSLOGISTIC command)
Example (CSLOGISTIC command)
Example (CSLOGISTIC command)


ODDSRATIOS Subcommand (CSLOGISTIC command)

odds ratio,odds ratio,odds ratio
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
ODDSRATIOS (subcommand),ODDSRATIOS (subcommand),ODDSRATIOS (subcommand)
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
CSLOGISTIC (command),CSLOGISTIC (command),CSLOGISTIC (command)
ODDSRATIOS subcommand,ODDSRATIOS subcommand,ODDSRATIOS subcommand

The ODDSRATIOS subcommand estimates odds ratios for the specified factor(s) or covariate(s). Note that these odds ratios are model-based and are not directly computed by using the observed data.

A separate set of odds ratios is computed for each category of the dependent variable (except the reference category).

If the FACTOR keyword is specified, the odds ratios compare the odds at each category j with the odds at category J, where J is the reference category defined in parentheses following the variable name of the factor. All other factors and covariates are fixed as defined on the CONTROL keyword.

If the COVARIATE keyword is specified, the odds ratios compare the odds at value x with the odds at value x + Δx, where Δx is the change in x defined in parentheses following the variable name of the covariate. To define the value x, specify the covariate and the value on the CONTROL keyword. All other factors and covariates are fixed as defined on the CONTROL keyword.

If a specified factor or covariate interacts with other predictors in the model, the odds ratios depend not only on the change in the specified variable but also on the values of the variables with which it interacts. If a specified covariate interacts with itself in the model (for example, X*X), the odds ratios depend on both the change in the covariate and the value of the covariate. The values of interacting factors and covariates can be customized by using the CONTROL keyword.

The CSLOGISTIC procedure sorts levels of each factor in ascending order and defines the highest level as the last level. (If the factor is a string variable, the value of the highest level is locale-dependent.)

• Multiple ODDSRATIOS subcommands are allowed. Each subcommand is treated independently.

• Either the FACTOR keyword and one or more factors, or the COVARIATE keyword and one or more covariates, but not both, are required. All other keywords are optional.

• The FACTOR, COVARIATE, and CONTROL keywords must be followed by an equals sign and one or more elements enclosed in square brackets.

• If a variable is specified on the FACTOR or COVARIATE keyword and is also specified on the CONTROL keyword, the CONTROL specification for that variable is ignored when the variable’s odds ratios are computed. Thus, FACTOR = [A B] CONTROL = [A(1) B(2)] estimates odds ratios for factor A holding factor B at level 2 and for factor B holding factor A at level 1.

FACTOR (keyword),FACTOR (keyword),FACTOR (keyword)
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
COVARIATE (keyword),COVARIATE (keyword),COVARIATE (keyword)
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
CONTROL (keyword),CONTROL (keyword),CONTROL (keyword)
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
FACTOR = [option] | Valid options are one or more factors appearing on the factor list. Optionally, each factor may be followed by parentheses containing the level to use as the reference category when computing odds ratios. Keyword LOW or HIGH, or a value, may be specified. Put the value inside a pair of quotes if the value is formatted (such as date or currency) or if the factor is of string type. By default, the highest category is used as the reference category.
 | If a value is specified but the value does not exist in the data, a warning is issued and the default HIGH is used.
 | Any factor may occur only once on the FACTOR keyword.
COVARIATE = [option] | Valid options are one or more covariates appearing on the covariate list. Optionally, each covariate may be followed by parentheses containing one or more nonzero numbers giving unit(s) of change to use for covariates when computing odds ratios. Odds ratios are estimated for each distinct value. The default value is 1.
 | Any covariate may occur only once on the COVARIATE keyword.
CONTROL= [option] | Specifies the factor and/or covariate values to use when computing odds ratios. Factors must appear on the factor list, and covariates must appear on the covariate list, of the CSLOGISTIC command.
 | Factors must be followed by the keyword LOW or HIGH, or a value, in parentheses. Put the value inside a pair of quotation marks if the value is formatted (such as date or currency) or if the factor is of string type. If keyword LOW or HIGH is used, each odds ratio is computed by holding the factor at its lowest or highest level, respectively. If a value is used, each odds ratio is computed by holding the specified factor at the supplied value. If a factor is not specified on the CONTROL option, its highest category is used in odds ratio calculations.
 | If a factor value is specified but the value does not exist in the data, a warning is issued and the default HIGH is used.
 | Covariates must be followed by the keyword MEAN or a number in parentheses. If the keyword MEAN is used, each odds ratio is computed by holding the covariate at its overall mean. If a number is used, each odds ratio is computed by holding the specified covariate at the supplied value. If a covariate is not specified on the CONTROL option, its overall mean is used in odds ratio calculations.
 | Any factor or covariate may occur only once on the CONTROL keyword.

Related Topics

CSLOGISTIC
Overview (CSLOGISTIC command)
Examples (CSLOGISTIC command)
CSLOGISTIC Variable List (CSLOGISTIC command)
PLAN Subcommand (CSLOGISTIC command)
JOINTPROB Subcommand (CSLOGISTIC command)
MODEL Subcommand (CSLOGISTIC command)
INTERCEPT Subcommand (CSLOGISTIC command)
CUSTOM Subcommand (CSLOGISTIC command)
CRITERIA Subcommand (CSLOGISTIC command)
STATISTICS Subcommand (CSLOGISTIC command)
TEST Subcommand (CSLOGISTIC command)
DOMAIN Subcommand (CSLOGISTIC command)
MISSING Subcommand (CSLOGISTIC command)
PRINT Subcommand (CSLOGISTIC command)
SAVE Subcommand (CSLOGISTIC command)
OUTFILE Subcommand (CSLOGISTIC command)
Example (CSLOGISTIC command)
Example (CSLOGISTIC command)


Example (CSLOGISTIC command)

Suppose that dependent variable Y is binary; factor A has two levels; and factor B has three levels coded 1, 2, and 3.

CSLOGISTIC y BY a b WITH x
  /PLAN FILE='/survey/myfile.csplan'
  /MODEL a b a*b x
  /ODDSRATIOS FACTOR=[a] CONTROL=[b(1)]
  /ODDSRATIOS FACTOR=[a] CONTROL=[b(2)]
  /ODDSRATIOS FACTOR=[a] CONTROL=[b(3)].

• The default reference category (the highest category) is used for the dependent variable.

• The model includes the intercept, main effects for factors A and B, the A*B interaction effect, and the covariate X.

• Odds ratios are requested for factor A. Assuming the A*B interaction effect is significant, the odds ratio for factor A will differ across levels of factor B. The specified syntax requests three odds ratios for factor A; each odds ratio is computed at a different level of factor B.

Related Topics

ODDSRATIOS Subcommand (CSLOGISTIC command)
Example (CSLOGISTIC command)


Example (CSLOGISTIC command)

CSLOGISTIC y BY a b c WITH x
  /PLAN FILE='/survey/myfile.csplan'
  /MODEL a b c x
  /ODDSRATIOS COVARIATE=[x(1 3 5)].

• The preceding syntax will compute three odds ratios for covariate X.

• The parenthesized list following variable X provides the unit of change values to use when computing odds ratios. Odds ratios will be computed for X increasing by 1, 3, and 5 units.

Related Topics

ODDSRATIOS Subcommand (CSLOGISTIC command)
Example (CSLOGISTIC command)


CRITERIA Subcommand (CSLOGISTIC command)

CRITERIA (subcommand),CRITERIA (subcommand),CRITERIA (subcommand)
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
CSLOGISTIC (command),CSLOGISTIC (command),CSLOGISTIC (command)
CRITERIA subcommand,CRITERIA subcommand,CRITERIA subcommand

The CRITERIA subcommand offers controls on the iterative algorithm that is used for estimation, and the subcommand specifies numerical tolerance for checking singularity.

CHKSEP (keyword),CHKSEP (keyword),CHKSEP (keyword)
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
CILEVEL (keyword),CILEVEL (keyword),CILEVEL (keyword)
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
DF (keyword),DF (keyword),DF (keyword)
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
LCONVERGE (keyword),LCONVERGE (keyword),LCONVERGE (keyword)
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
MXITER (keyword),MXITER (keyword),MXITER (keyword)
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
MXSTEP (keyword),MXSTEP (keyword),MXSTEP (keyword)
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
PCONVERGE (keyword),PCONVERGE (keyword),PCONVERGE (keyword)
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
SINGULAR (keyword),SINGULAR (keyword),SINGULAR (keyword)
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
CHKSEP = value | Starting iteration for checking complete separation. Specify a non-negative integer. This criterion is not used if the value is 0. The default value is 20.
CILEVEL = value | Confidence interval level for coefficient estimates, exponentiated coefficient estimates, and odds ratio estimates. Specify a value that is greater than or equal to 0 and less than 100. The default value is 95.
DF = value | Sampling design degrees of freedom to use in computing p values for all test statistics. Specify a positive number. The default value is the difference between the number of primary sampling units and the number of strata in the first stage of sampling.
LCONVERGE = [option] | Log-likelihood function convergence criterion. Convergence is assumed if the absolute or relative change in the log-likelihood function is less than the given value. This criterion is not used if the value is 0. Specify square brackets containing a non-negative number followed optionally by keyword ABSOLUTE or RELATIVE, which indicates the type of change. The default value is 0, and the default type is RELATIVE.
MXITER = value | Maximum number of iterations. Specify a non-negative integer. The default value is 100.
MXSTEP = value | Maximum step-halving allowed. Specify a positive integer. The default value is 5.
PCONVERGE = [option] | Parameter estimates convergence criterion. Convergence is assumed if the absolute or relative change in the parameter estimates is less than the given value. This criterion is not used if the value is 0. Specify square brackets containing a non-negative number followed optionally by keyword ABSOLUTE or RELATIVE, which indicates the type of change. The default value is 10-6, and the default type is RELATIVE.
SINGULAR = value | Tolerance value used to test for singularity. Specify a positive value. The default value is 10-12.

Related Topics

CSLOGISTIC
Overview (CSLOGISTIC command)
Examples (CSLOGISTIC command)
CSLOGISTIC Variable List (CSLOGISTIC command)
PLAN Subcommand (CSLOGISTIC command)
JOINTPROB Subcommand (CSLOGISTIC command)
MODEL Subcommand (CSLOGISTIC command)
INTERCEPT Subcommand (CSLOGISTIC command)
CUSTOM Subcommand (CSLOGISTIC command)
ODDSRATIOS Subcommand (CSLOGISTIC command)
STATISTICS Subcommand (CSLOGISTIC command)
TEST Subcommand (CSLOGISTIC command)
DOMAIN Subcommand (CSLOGISTIC command)
MISSING Subcommand (CSLOGISTIC command)
PRINT Subcommand (CSLOGISTIC command)
SAVE Subcommand (CSLOGISTIC command)
OUTFILE Subcommand (CSLOGISTIC command)


STATISTICS Subcommand (CSLOGISTIC command)

STATISTICS (subcommand),STATISTICS (subcommand),STATISTICS (subcommand)
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
CSLOGISTIC (command),CSLOGISTIC (command),CSLOGISTIC (command)
STATISTICS subcommand,STATISTICS subcommand,STATISTICS subcommand

The STATISTICS subcommand requests various statistics that are associated with the coefficient estimates.

• There are no default keywords on the STATISTICS subcommand. If this subcommand is not specified, no statistics that are listed below are displayed.

PARAMETER (keyword),PARAMETER (keyword),PARAMETER (keyword)
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
parameter estimates,parameter estimates,parameter estimates
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
EXP (keyword),EXP (keyword),EXP (keyword)
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
SE (keyword),SE (keyword),SE (keyword)
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
standard error,standard error,standard error
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
TTEST (keyword),TTEST (keyword),TTEST (keyword)
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
t test,t test,t test
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
CINTERVAL (keyword),CINTERVAL (keyword),CINTERVAL (keyword)
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
confidence intervals,confidence intervals,confidence intervals
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
DEFFSQRT (keyword),DEFFSQRT (keyword),DEFFSQRT (keyword)
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
square root of the design effect,square root of the design effect,square root of the design effect
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
DEFF (keyword),DEFF (keyword),DEFF (keyword)
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
design effect,design effect,design effect
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
PARAMETER | Coefficient estimates.
EXP | The exponentiated coefficient estimates.
SE | Standard error for each coefficient estimate.
TTEST | t test for each coefficient estimate.
CINTERVAL | Confidence interval for each coefficient estimate and/or exponentiated coefficient estimate.
DEFFSQRT | Square root of the design effect for each coefficient estimate.
DEFF | Design effect for each coefficient estimate.

Related Topics

CSLOGISTIC
Overview (CSLOGISTIC command)
Examples (CSLOGISTIC command)
CSLOGISTIC Variable List (CSLOGISTIC command)
PLAN Subcommand (CSLOGISTIC command)
JOINTPROB Subcommand (CSLOGISTIC command)
MODEL Subcommand (CSLOGISTIC command)
INTERCEPT Subcommand (CSLOGISTIC command)
CUSTOM Subcommand (CSLOGISTIC command)
ODDSRATIOS Subcommand (CSLOGISTIC command)
CRITERIA Subcommand (CSLOGISTIC command)
TEST Subcommand (CSLOGISTIC command)
DOMAIN Subcommand (CSLOGISTIC command)
MISSING Subcommand (CSLOGISTIC command)
PRINT Subcommand (CSLOGISTIC command)
SAVE Subcommand (CSLOGISTIC command)
OUTFILE Subcommand (CSLOGISTIC command)


TEST Subcommand (CSLOGISTIC command)

TEST (subcommand),TEST (subcommand),TEST (subcommand)
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
CSLOGISTIC (command),CSLOGISTIC (command),CSLOGISTIC (command)
TEST subcommand,TEST subcommand,TEST subcommand

The TEST subcommand specifies the type of test statistic and the method of adjusting the significance level to be used for hypothesis tests that are requested on the MODEL and CUSTOM subcommands.

Related Topics

CSLOGISTIC
Overview (CSLOGISTIC command)
Examples (CSLOGISTIC command)
CSLOGISTIC Variable List (CSLOGISTIC command)
PLAN Subcommand (CSLOGISTIC command)
JOINTPROB Subcommand (CSLOGISTIC command)
MODEL Subcommand (CSLOGISTIC command)
INTERCEPT Subcommand (CSLOGISTIC command)
CUSTOM Subcommand (CSLOGISTIC command)
ODDSRATIOS Subcommand (CSLOGISTIC command)
CRITERIA Subcommand (CSLOGISTIC command)
STATISTICS Subcommand (CSLOGISTIC command)
DOMAIN Subcommand (CSLOGISTIC command)
MISSING Subcommand (CSLOGISTIC command)
PRINT Subcommand (CSLOGISTIC command)
SAVE Subcommand (CSLOGISTIC command)
OUTFILE Subcommand (CSLOGISTIC command)
TYPE Keyword (CSLOGISTIC command)
PADJUST Keyword (CSLOGISTIC command)


TYPE Keyword (CSLOGISTIC command)

The TYPE keyword indicates the type of test statistic.

F (keyword),F (keyword),F (keyword)
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
F statistic,F statistic,F statistic
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
ADJF (keyword),ADJF (keyword),ADJF (keyword)
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
adjusted F statistic,adjusted F statistic,adjusted F statistic
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
CHISQUARE (keyword),CHISQUARE (keyword),CHISQUARE (keyword)
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
chi-square,chi-square,chi-square
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
ADJCHISQUARE (keyword),ADJCHISQUARE (keyword),ADJCHISQUARE (keyword)
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
adjusted chi-square,adjusted chi-square,adjusted chi-square
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
F | Wald F test. This is the default test statistic if the TYPE keyword is not specified.
ADJF | Adjusted Wald F test.
CHISQUARE | Wald chi-square test.
ADJCHISQUARE | Adjusted Wald chi-square test.

Related Topics

TEST Subcommand (CSLOGISTIC command)
PADJUST Keyword (CSLOGISTIC command)


PADJUST Keyword (CSLOGISTIC command)

The PADJUST keyword indicates the method of adjusting the significance level.

LSD (keyword),LSD (keyword),LSD (keyword)
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
BONFERRONI (keyword),BONFERRONI (keyword),BONFERRONI (keyword)
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
Bonferroni correction,Bonferroni correction,Bonferroni correction
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
SEQBONFERRONI (keyword),SEQBONFERRONI (keyword),SEQBONFERRONI (keyword)
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
sequential Bonferroni correction,sequential Bonferroni correction,sequential Bonferroni correction
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
SIDAK (keyword),SIDAK (keyword),SIDAK (keyword)
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
Sidak correction,Sidak correction,Sidak correction
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
SEQSIDAK (keyword),SEQSIDAK (keyword),SEQSIDAK (keyword)
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
sequential Sidak correction,sequential Sidak correction,sequential Sidak correction
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
LSD | Least significant difference. This method does not control the overall probability of rejecting the hypotheses that some linear contrasts are different from the null hypothesis value(s). This setting is the default.
BONFERRONI | Bonferroni. This method adjusts the observed significance level for the fact that multiple contrasts are being tested.
SEQBONFERRONI | Sequential Bonferroni. This procedure is a sequentially step-down rejective Bonferroni procedure that is much less conservative in terms of rejecting individual hypotheses but maintains the same overall significance level.
SIDAK | Sidak. This method provides tighter bounds than the Bonferroni approach.
SEQSIDAK | Sequential Sidak. This procedure is a sequentially rejective step-down rejective Sidak procedure that is much less conservative in terms of rejecting individual hypotheses but maintains the same overall significance level.

Related Topics

TEST Subcommand (CSLOGISTIC command)
TYPE Keyword (CSLOGISTIC command)


DOMAIN Subcommand (CSLOGISTIC command)

DOMAIN (subcommand),DOMAIN (subcommand),DOMAIN (subcommand)
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
CSLOGISTIC (command),CSLOGISTIC (command),CSLOGISTIC (command)
DOMAIN subcommand,DOMAIN subcommand,DOMAIN subcommand

The DOMAIN subcommand specifies the subpopulation for which the analysis is to be performed.

VARIABLE (keyword),VARIABLE (keyword),VARIABLE (keyword)
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command

• Keyword VARIABLE, followed by an equals sign, a variable, and a value in parentheses, are required. Put the value inside a pair of quotation marks if the value is formatted (such as date or currency) or if the factor is of string type.

• The subpopulation is defined by all cases having the given value on the specified variable.

• Analyses are performed only for the specified subpopulation.

• For example, DOMAIN VARIABLE = myvar (1) defines the subpopulation by all cases for which variable MYVAR has value 1.

• The specified variable may be numeric or string and must exist at the time that the CSLOGISTIC procedure is invoked.

• Stratification or cluster variables may be specified, but no other plan file variables are allowed on the DOMAIN subcommand.

• Analysis variables may not be specified on the DOMAIN subcommand.

Related Topics

CSLOGISTIC
Overview (CSLOGISTIC command)
Examples (CSLOGISTIC command)
CSLOGISTIC Variable List (CSLOGISTIC command)
PLAN Subcommand (CSLOGISTIC command)
JOINTPROB Subcommand (CSLOGISTIC command)
MODEL Subcommand (CSLOGISTIC command)
INTERCEPT Subcommand (CSLOGISTIC command)
CUSTOM Subcommand (CSLOGISTIC command)
ODDSRATIOS Subcommand (CSLOGISTIC command)
CRITERIA Subcommand (CSLOGISTIC command)
STATISTICS Subcommand (CSLOGISTIC command)
TEST Subcommand (CSLOGISTIC command)
MISSING Subcommand (CSLOGISTIC command)
PRINT Subcommand (CSLOGISTIC command)
SAVE Subcommand (CSLOGISTIC command)
OUTFILE Subcommand (CSLOGISTIC command)


MISSING Subcommand (CSLOGISTIC command)

Complex Samples Logistic Regression,Complex Samples Logistic Regression,Complex Samples Logistic Regression
missing values,missing values,missing values
MISSING (subcommand),MISSING (subcommand),MISSING (subcommand)
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
CSLOGISTIC (command),CSLOGISTIC (command),CSLOGISTIC (command)
MISSING subcommand,MISSING subcommand,MISSING subcommand

The MISSING subcommand specifies how missing values are handled.

• All design variables, as well as the dependent variable and any covariates, must have valid data. Cases with invalid data for any of these variables are deleted from the analysis.

CLASSMISSING (keyword),CLASSMISSING (keyword),CLASSMISSING (keyword)
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command

• The CLASSMISSING keyword specifies whether user-missing values are treated as valid. This specification is applied to categorical design variables (i.e., strata, cluster, and subpopulation variables), the dependent variable, and any factors.

EXCLUDE (keyword),EXCLUDE (keyword),EXCLUDE (keyword)
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
INCLUDE (keyword),INCLUDE (keyword),INCLUDE (keyword)
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
EXCLUDE | Exclude user-missing values among the strata, cluster, subpopulation, and factor variables. This setting is the default.
INCLUDE | Include user-missing values among the strata, cluster, subpopulation, and factor variables. Treat user-missing values for these variables as valid data.

Related Topics

CSLOGISTIC
Overview (CSLOGISTIC command)
Examples (CSLOGISTIC command)
CSLOGISTIC Variable List (CSLOGISTIC command)
PLAN Subcommand (CSLOGISTIC command)
JOINTPROB Subcommand (CSLOGISTIC command)
MODEL Subcommand (CSLOGISTIC command)
INTERCEPT Subcommand (CSLOGISTIC command)
CUSTOM Subcommand (CSLOGISTIC command)
ODDSRATIOS Subcommand (CSLOGISTIC command)
CRITERIA Subcommand (CSLOGISTIC command)
STATISTICS Subcommand (CSLOGISTIC command)
TEST Subcommand (CSLOGISTIC command)
DOMAIN Subcommand (CSLOGISTIC command)
PRINT Subcommand (CSLOGISTIC command)
SAVE Subcommand (CSLOGISTIC command)
OUTFILE Subcommand (CSLOGISTIC command)


PRINT Subcommand (CSLOGISTIC command)

PRINT (subcommand),PRINT (subcommand),PRINT (subcommand)
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
CSLOGISTIC (command),CSLOGISTIC (command),CSLOGISTIC (command)
PRINT subcommand,PRINT subcommand,PRINT subcommand

The PRINT subcommand is used to display optional output.

• If the PRINT subcommand is not specified, the default output includes sample information, variable and factor information, and model summary statistics.

• If the PRINT subcommand is specified, CSLOGISTIC displays output only for those keywords that are specified.

SAMPLEINFO (keyword),SAMPLEINFO (keyword),SAMPLEINFO (keyword)
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
VARIABLEINFO (keyword),VARIABLEINFO (keyword),VARIABLEINFO (keyword)
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
SUMMARY (keyword),SUMMARY (keyword),SUMMARY (keyword)
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
HISTORY (keyword),HISTORY (keyword),HISTORY (keyword)
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
iteration history,iteration history,iteration history
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
GEF (keyword),GEF (keyword),GEF (keyword)
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
general estimable function,general estimable function,general estimable function
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
LMATRIX (keyword),LMATRIX (keyword),LMATRIX (keyword)
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
L matrix,L matrix,L matrix
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
contrast coefficients matrix,contrast coefficients matrix,contrast coefficients matrix
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
COVB (keyword),COVB (keyword),COVB (keyword)
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
covariance matrix,covariance matrix,covariance matrix
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
CORB (keyword),CORB (keyword),CORB (keyword)
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
correlation matrix,correlation matrix,correlation matrix
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
CLASSTABLE (keyword),CLASSTABLE (keyword),CLASSTABLE (keyword)
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
classification tables,classification tables,classification tables
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
NONE (keyword),NONE (keyword),NONE (keyword)
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
SAMPLEINFO | Sample information table. Displays summary information about the sample, including the unweighted count and the population size. This output is default output if the PRINT subcommand is not specified.
VARIABLEINFO | Variable information. Displays summary information about the dependent variable, covariates, and factors. This output is default output if the PRINT subcommand is not specified.
SUMMARY | Model summary statistics. Displays pseudo-R2 statistics. This output is default output if the PRINT subcommand is not specified.
HISTORY(n) | Iteration history. Displays coefficient estimates and statistics at every nth iteration beginning with the zeroth iteration (the initial estimates). The default is to print every iteration (n = 1). The last iteration is always printed if HISTORY is specified, regardless of the value of n.
GEF | General estimable function table.
LMATRIX | Set of contrast coefficients (L) matrices.
COVB | Covariance matrix for regression coefficients.
CORB | Correlation matrix for regression coefficients.
CLASSTABLE | Classification table. Displays frequencies of observed versus predicted response categories.
NONE | No PRINT subcommand output. None of the PRINT subcommand output is displayed. However, if NONE is specified with one or more other keywords, the other keywords override NONE.

Related Topics

CSLOGISTIC
Overview (CSLOGISTIC command)
Examples (CSLOGISTIC command)
CSLOGISTIC Variable List (CSLOGISTIC command)
PLAN Subcommand (CSLOGISTIC command)
JOINTPROB Subcommand (CSLOGISTIC command)
MODEL Subcommand (CSLOGISTIC command)
INTERCEPT Subcommand (CSLOGISTIC command)
CUSTOM Subcommand (CSLOGISTIC command)
ODDSRATIOS Subcommand (CSLOGISTIC command)
CRITERIA Subcommand (CSLOGISTIC command)
STATISTICS Subcommand (CSLOGISTIC command)
TEST Subcommand (CSLOGISTIC command)
DOMAIN Subcommand (CSLOGISTIC command)
MISSING Subcommand (CSLOGISTIC command)
SAVE Subcommand (CSLOGISTIC command)
OUTFILE Subcommand (CSLOGISTIC command)


SAVE Subcommand (CSLOGISTIC command)

Complex Samples Logistic Regression,Complex Samples Logistic Regression,Complex Samples Logistic Regression
saving new variables,saving new variables,saving new variables
SAVE (subcommand),SAVE (subcommand),SAVE (subcommand)
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
CSLOGISTIC (command),CSLOGISTIC (command),CSLOGISTIC (command)
SAVE subcommand,SAVE subcommand,SAVE subcommand

The SAVE subcommand writes optional model variables to the active dataset.

• Specify one or more temporary variables, each variable followed by an optional new name in parentheses.

• The optional names must be unique, valid variable names.

• If new names are not specified, CSLOGISTIC generates a name using the temporary variable name with a suffix.

PREDPROB (keyword),PREDPROB (keyword),PREDPROB (keyword)
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
predicted probability,predicted probability,predicted probability
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
PREDVAL (keyword),PREDVAL (keyword),PREDVAL (keyword)
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
predicted values,predicted values,predicted values
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
PREDPROB | Predicted probability. The user-specified or default name is treated as the rootname, and a suffix is added to get new unique variables names. The rootname can be followed by a colon and a positive integer giving the number of predicted probabilities to save. The predicted probabilities of the first n response categories are saved. One predicted probability variable can be saved for each category of the dependent variable. The default rootname is PredictedProbability. The default n of predicted probabilities to save is 25. To specify n without a rootname, enter a colon before the number.
PREDVAL | Predicted value. The class or value that is predicted by the model. The optional variable name must be unique. If the default name is used and it conflicts with existing variable names, a suffix is added to the default name to make it unique. The default variable name is PredictedValue.

Related Topics

CSLOGISTIC
Overview (CSLOGISTIC command)
Examples (CSLOGISTIC command)
CSLOGISTIC Variable List (CSLOGISTIC command)
PLAN Subcommand (CSLOGISTIC command)
JOINTPROB Subcommand (CSLOGISTIC command)
MODEL Subcommand (CSLOGISTIC command)
INTERCEPT Subcommand (CSLOGISTIC command)
CUSTOM Subcommand (CSLOGISTIC command)
ODDSRATIOS Subcommand (CSLOGISTIC command)
CRITERIA Subcommand (CSLOGISTIC command)
STATISTICS Subcommand (CSLOGISTIC command)
TEST Subcommand (CSLOGISTIC command)
DOMAIN Subcommand (CSLOGISTIC command)
MISSING Subcommand (CSLOGISTIC command)
PRINT Subcommand (CSLOGISTIC command)
OUTFILE Subcommand (CSLOGISTIC command)


OUTFILE Subcommand (CSLOGISTIC command)

PASW Statistics data file export,PASW Statistics data file export,PASW Statistics data file export
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
XML export,XML export,XML export
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
CSLOGISTIC (command),CSLOGISTIC (command),CSLOGISTIC (command)
export to XML,export to XML,export to XML
CSLOGISTIC (command),CSLOGISTIC (command),CSLOGISTIC (command)
export to PASW Statistics data file,export to PASW Statistics data file,export to PASW Statistics data file
OUTFILE (subcommand),OUTFILE (subcommand),OUTFILE (subcommand)
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
CSLOGISTIC (command),CSLOGISTIC (command),CSLOGISTIC (command)
OUTFILE subcommand,OUTFILE subcommand,OUTFILE subcommand

The OUTFILE subcommand saves an external PASW Statistics data file or previously declared dataset containing the parameter covariance or correlation matrix with parameter estimates, standard errors, significance values, and sampling design degrees of freedom. It also saves the parameter estimates and the parameter covariance matrix in XML format.

• At least one keyword and a file specification are required. The file specification should be enclosed in quotes.

• The COVB and CORB keywords are mutually exclusive, as are the MODEL and PARAMETER keywords.

• The filename must be specified in full. CSLOGISTIC does not supply an extension.

• For COVB and CORB, you can specify a previously declared dataset name (DATASET DECLARE command) instead of a file specification.

COVB (keyword),COVB (keyword),COVB (keyword)
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
CORB (keyword),CORB (keyword),CORB (keyword)
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
MODEL (keyword),MODEL (keyword),MODEL (keyword)
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
PARAMETER (keyword),PARAMETER (keyword),PARAMETER (keyword)
CSLOGISTIC command,CSLOGISTIC command,CSLOGISTIC command
CSLOGISTIC (command),CSLOGISTIC (command),CSLOGISTIC (command)
COVB = 'savfile'|'dataset' | Writes the parameter covariance matrix and other statistics to an external PASW Statistics data file or previously declared dataset.
CORB = 'savfile'|'dataset' | Writes the parameter correlation matrix and other statistics to an external PASW Statistics data file or previously declared dataset.
MODEL = 'file' | Writes the parameter estimates and the parameter covariance matrix to an XML file.
PARAMETER = 'file' | Writes the parameter estimates to an XML file.

Related Topics

CSLOGISTIC
Overview (CSLOGISTIC command)
Examples (CSLOGISTIC command)
CSLOGISTIC Variable List (CSLOGISTIC command)
PLAN Subcommand (CSLOGISTIC command)
JOINTPROB Subcommand (CSLOGISTIC command)
MODEL Subcommand (CSLOGISTIC command)
INTERCEPT Subcommand (CSLOGISTIC command)
CUSTOM Subcommand (CSLOGISTIC command)
ODDSRATIOS Subcommand (CSLOGISTIC command)
CRITERIA Subcommand (CSLOGISTIC command)
STATISTICS Subcommand (CSLOGISTIC command)
TEST Subcommand (CSLOGISTIC command)
DOMAIN Subcommand (CSLOGISTIC command)
MISSING Subcommand (CSLOGISTIC command)
PRINT Subcommand (CSLOGISTIC command)
SAVE Subcommand (CSLOGISTIC command)


CSORDINAL

CSORDINAL (command),CSORDINAL (command),CSORDINAL (command)
CSORDINAL (command),CSORDINAL (command),CSORDINAL (command)
syntax chart,syntax chart,syntax chart
release history,release history,release history
Associated UI topic if any,Associated UI topic if any,Associated UI topic if any
command syntax,command syntax,command syntax

CSORDINAL is available in the Complex Samples option.

Note: Square brackets that are used in the CSORDINAL syntax chart are required parts of the syntax and are not used to indicate optional elements. Equals signs (=) that are used in the syntax chart are required elements. Except for the PLAN subcommand, all subcommands are optional.

CSORDINAL dependent varname ({ASCENDING**}) BY factor list
                             {DESCENDING }
          WITH covariate list

/PLAN FILE = 'file'

/JOINTPROB FILE = 'savfile' | 'dataset'

/MODEL effect-list

/LINK  FUNCTION = {CAUCHIT}]
                  {CLOGLOG}
                  {LOGIT**}
                  {NLOGLOG}
                  {PROBIT }

/CUSTOM LABEL = "label"

      LMATRIX = {list, effect list, effect list ...; ...}
                {list, effect list, effect list ...     }
                {effect list, effect list ...; ...      }
                {effect list, effect list ...           }
                {ALL list; ALL ...                      }
                {ALL list                               }

      KMATRIX = {number; number; ...}
                {number             }

/CUSTOM ...

/ODDSRATIOS  {FACTOR = [varname ({LOW   }) varname ...]       }
                                 {HIGH**}
                                 {value }

             {COVARIATE = [varname ({1**        }) varname ...]}
                                    {number list}

             CONTROL = [varname (value) varname (value) ...]

/ODDSRATIOS ...

/CRITERIA CHKSEP = {20**}] CILEVEL = {95** }] [DF = value]
                   {n   }            {value}

          LCONVERGE = [{0**  } {RELATIVE**}] METHOD = {FISHER(n)}
                       {value} {ABSOLUTE  }           {NEWTON** }

           MXITER = {100**} MXSTEP = {5**}
                    {n    }          {n  }

           PCONVERGE = [{1E-6**} {RELATIVE**}] SINGULAR = {1E-12**}
                        {value } {ABSOLUTE  }             {value  }

/STATISTICS PARAMETER EXP SE TTEST CINTERVAL DEFF DEFFSQRT

/NONPARALLEL TEST PARAMETER COVB

/TEST TYPE = {F**         } PADJUST = {LSD**        }
             {ADJF        }           {BONFERRONI   }
             {CHISQUARE   }           {SEQBONFERRONI}
             {ADJCHISQUARE}           {SIDAK        }
                                      {SEQSIDAK     }

/DOMAIN VARIABLE = varname (value)

/MISSING CLASSMISSING = {EXCLUDE**}
                        {INCLUDE  }

/PRINT SAMPLEINFO** VARIABLEINFO** SUMMARY**
       HISTORY({1**}) GEF LMATRIX COVB CORB
               {n  }
       CLASSTABLE NONE

/SAVE CUMPROB(rootname:{25**}) PREDPROB(rootname:{25**})
                       {n   }                    {n   }
      PREDVAL(varname) PREDVALPROB(varname) OBSVALPROB(varname)

/OUTFILE {COVB = 'savfile' | 'dataset'} {MODEL = 'file'    }
         {CORB = 'savfile' | 'dataset'} {PARAMETER = 'file'}

** Default if the subcommand or keyword is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

CSORDINAL Algorithms for computational details for this procedure.

Syntax for the CSORDINAL command can be generated from the Complex Samples Ordinal Regression dialog.

Release History Collapse Hide details

Release History

Release 15.0

• Command introduced.

Release 17.0

• Added support for SET THREADS.

Example

CSORDINAL y BY a b c WITH x
  /PLAN FILE='/survey/myfile.csplan'.

Related Topics

Overview (CSORDINAL command)
Examples (CSORDINAL command)
Variable List (CSORDINAL command)
PLAN Subcommand (CSORDINAL command)
JOINTPROB Subcommand (CSORDINAL command)
MODEL Subcommand (CSORDINAL command)
LINK Subcommand (CSORDINAL command)
CUSTOM Subcommand (CSORDINAL command)
ODDSRATIOS Subcommand (CSORDINAL command)
CRITERIA Subcommand (CSORDINAL command)
STATISTICS Subcommand (CSORDINAL command)
NONPARALLEL Subcommand (CSORDINAL command)
TEST Subcommand (CSORDINAL command)
DOMAIN Subcommand (CSORDINAL command)
MISSING Subcommand (CSORDINAL command)
PRINT Subcommand (CSORDINAL command)
SAVE Subcommand (CSORDINAL command)
OUTFILE Subcommand (CSORDINAL command)


Overview (CSORDINAL command)

CSORDINAL performs regression analysis on a binary or ordinal polytomous dependent variable using the selected cumulative link function for samples drawn by complex sampling methods. The procedure estimates variances by taking into account the sample design used to select the sample, including equal probability and probability proportional to size (PPS) methods and with replacement (WR) and without replacement (WOR) sampling procedures. Optionally, CSORDINAL performs analyses for a subpopulation.

Basic Specification Collapse Hide details

Basic Specification

• The basic specification is a variable list identifying the dependent variable, the factors (if any), and the covariates (if any) and a PLAN subcommand with the name of a complex sample analysis plan file, which may be generated by the CSPLAN procedure.

• The default model includes threshold parameters, main effects for any factors, and any covariates.

• The basic specification displays summary information about the sample and all analysis variables, model summary statistics, and Wald F tests for all model effects. Additional subcommands must be used for other output.

Syntax Rules Collapse Hide details

Syntax Rules

• The dependent variable and PLAN subcommand are required. All other variables and subcommands are optional.

• Multiple CUSTOM and ODDSRATIOS subcommands may be specified; each is treated independently. All other subcommands may be specified only once.

• Empty subcommands are not allowed; all subcommands must be specified with options.

• Each keyword may be specified only once within a subcommand.

• Subcommand names and keywords must be spelled in full.

• Equals signs (=) shown in the syntax chart are required.

• Square brackets shown in the syntax chart are required parts of the syntax and are not used to indicate optional elements. (See the ODDSRATIOS and CRITERIA subcommands.)

• Subcommands may be specified in any order.

• The dependent variable, factors, and the subpopulation variable can be numeric or string variables, but covariates must be numeric.

• Across the dependent, factor, and covariate variable lists, a variable may be specified only once.

• Plan file and subpopulation variables may not be specified on the variable list.

• Minimum syntax is a dependent variable and the PLAN subcommand. This specification fits a thresholds-only model.

Operations Collapse Hide details

Operations

• CSORDINAL performs ordinal regression analysis for sampling designs supported by the CSPLAN and CSSELECT procedures.

• The input data set must contain the variables to be analyzed and variables related to the sampling design.

• The complex sample analysis plan file provides an analysis plan based on the sampling design.

• By default, CSORDINAL uses a model that includes thresholds, main effects for any factors, and any covariates.

• Other effects, including interaction and nested effects, may be specified using the MODEL subcommand.

• The default output for the specified model is summary information about the sample and all analysis variables, model summary statistics, and Wald F tests for all model effects.

• WEIGHT and SPLIT FILE settings are ignored by the CSORDINAL procedure.

• This procedure uses the multithreaded options specified by SET THREADS.

Limitations Collapse Hide details

Limitations

• WEIGHT and SPLIT FILE settings are ignored with a warning by the CSORDINAL procedure.

Related Topics

CSORDINAL
Examples (CSORDINAL command)
Variable List (CSORDINAL command)
PLAN Subcommand (CSORDINAL command)
JOINTPROB Subcommand (CSORDINAL command)
MODEL Subcommand (CSORDINAL command)
LINK Subcommand (CSORDINAL command)
CUSTOM Subcommand (CSORDINAL command)
ODDSRATIOS Subcommand (CSORDINAL command)
CRITERIA Subcommand (CSORDINAL command)
STATISTICS Subcommand (CSORDINAL command)
NONPARALLEL Subcommand (CSORDINAL command)
TEST Subcommand (CSORDINAL command)
DOMAIN Subcommand (CSORDINAL command)
MISSING Subcommand (CSORDINAL command)
PRINT Subcommand (CSORDINAL command)
SAVE Subcommand (CSORDINAL command)
OUTFILE Subcommand (CSORDINAL command)


Examples (CSORDINAL command)

* Complex Samples Ordinal Regression.
CSORDINAL  opinion_gastax (ASCENDING) BY agecat gender votelast drivefreq
 /PLAN FILE = 'samplesDirectory\poll.csplan'
 /JOINTPROB FILE = 'samplesDirectory\poll_jointprob.sav'
 /LINK FUNCTION=LOGIT
 /MODEL agecat gender votelast drivefreq
 /STATISTICS PARAMETER EXP SE CINTERVAL DEFF
 /NONPARALLEL TEST PARAMETER
 /TEST TYPE=ADJF PADJUST=SEQSIDAK
 /ODDSRATIOS FACTOR=[agecat(HIGH)]
 /ODDSRATIOS FACTOR=[drivefreq(3)]
 /MISSING CLASSMISSING=EXCLUDE
 /CRITERIA MXITER=100 MXSTEP=5
 PCONVERGE=[1e-006 RELATIVE] LCONVERGE=[0]
 METHOD=NEWTON CHKSEP=20
 CILEVEL=95
 /PRINT SUMMARY CLASSTABLE VARIABLEINFO SAMPLEINFO.

• The procedure builds a model for opinion_gastax using agecat, gender, votelast, and drivefreq as factors.

• The complex sampling plan is located in poll.csplan, and the joint inclusion probabilities are in poll_jointprob.sav.

• The model specifically calls for a main-effects model.

• Parameter estimates, their standard errors, 95% confidence intervals, and design effects are requested, along with exponentiated parameter estimates and their 95% confidence intervals.

• The test of parallel lines is requested, and the parameter estimates for the generalized cumulative model will be displayed.

• For all appropriate tests, the adjusted Wald F statistic will be computed, and p values for multiple comparisons will be adjusted according to the sequential Sidak method.

• Cumulative odds ratios are requested for agecat, with the highest level as the reference category, and drivefreq, with the third level as the reference category.

• A classification table is requested in addition to the default model output.

• All other options are set to their default values.

For discussion of output from this syntax and to place the example in context, see Using Complex Samples Ordinal Regression to Analyze Survey Results.

Related Topics

CSORDINAL
Overview (CSORDINAL command)
Variable List (CSORDINAL command)
PLAN Subcommand (CSORDINAL command)
JOINTPROB Subcommand (CSORDINAL command)
MODEL Subcommand (CSORDINAL command)
LINK Subcommand (CSORDINAL command)
CUSTOM Subcommand (CSORDINAL command)
ODDSRATIOS Subcommand (CSORDINAL command)
CRITERIA Subcommand (CSORDINAL command)
STATISTICS Subcommand (CSORDINAL command)
NONPARALLEL Subcommand (CSORDINAL command)
TEST Subcommand (CSORDINAL command)
DOMAIN Subcommand (CSORDINAL command)
MISSING Subcommand (CSORDINAL command)
PRINT Subcommand (CSORDINAL command)
SAVE Subcommand (CSORDINAL command)
OUTFILE Subcommand (CSORDINAL command)


Variable List (CSORDINAL command)

CSORDINAL (command),CSORDINAL (command),CSORDINAL (command)
variable list,variable list,variable list

The variable list specifies the dependent variable with the categories order, the factors, and the covariates in the model.

• The dependent variable must be the first specification on CSORDINAL.

• The dependent variable can be numeric or string.

• The CSORDINAL procedure sorts levels of the dependent variable in ascending or descending order. (If the dependent variable is a string variable, then the order is locale-dependent.)

• Sorting order for the values of the dependent variable may be specified in parentheses immediately following the dependent variable.

ASCENDING (keyword),ASCENDING (keyword),ASCENDING (keyword)
CSORDINAL command,CSORDINAL command,CSORDINAL command
DESCENDING (keyword),DESCENDING (keyword),DESCENDING (keyword)
CSORDINAL command,CSORDINAL command,CSORDINAL command
ASCENDING | Sort dependent variable values in ascending order. This is the default setting.
DESCENDING | Sort dependent variable values in descending order.

• The names of the factors and covariates, if any, follow the dependent variable. Specify any factors following the keyword BY. Specify any covariates following the keyword WITH.

• Factors can be numeric or string variables, but covariates must be numeric.

• Each variable may be specified only once on the variable list.

• Plan file and subpopulation variables may not be specified on the variable list.

Related Topics

CSORDINAL
Overview (CSORDINAL command)
Examples (CSORDINAL command)
PLAN Subcommand (CSORDINAL command)
JOINTPROB Subcommand (CSORDINAL command)
MODEL Subcommand (CSORDINAL command)
LINK Subcommand (CSORDINAL command)
CUSTOM Subcommand (CSORDINAL command)
ODDSRATIOS Subcommand (CSORDINAL command)
CRITERIA Subcommand (CSORDINAL command)
STATISTICS Subcommand (CSORDINAL command)
NONPARALLEL Subcommand (CSORDINAL command)
TEST Subcommand (CSORDINAL command)
DOMAIN Subcommand (CSORDINAL command)
MISSING Subcommand (CSORDINAL command)
PRINT Subcommand (CSORDINAL command)
SAVE Subcommand (CSORDINAL command)
OUTFILE Subcommand (CSORDINAL command)


PLAN Subcommand (CSORDINAL command)

CSORDINAL (command),CSORDINAL (command),CSORDINAL (command)
PLAN subcommand,PLAN subcommand,PLAN subcommand
PLAN (subcommand),PLAN (subcommand),PLAN (subcommand)
CSORDINAL command,CSORDINAL command,CSORDINAL command

The PLAN subcommand specifies the name of an XML file containing analysis design specifications. This file is written by the CSPLAN procedure.

• The PLAN subcommand is required.

FILE (keyword),FILE (keyword),FILE (keyword)
CSORDINAL command,CSORDINAL command,CSORDINAL command
'FILE' Specifies the name of an external file.

Related Topics

CSORDINAL
Overview (CSORDINAL command)
Examples (CSORDINAL command)
Variable List (CSORDINAL command)
JOINTPROB Subcommand (CSORDINAL command)
MODEL Subcommand (CSORDINAL command)
LINK Subcommand (CSORDINAL command)
CUSTOM Subcommand (CSORDINAL command)
ODDSRATIOS Subcommand (CSORDINAL command)
CRITERIA Subcommand (CSORDINAL command)
STATISTICS Subcommand (CSORDINAL command)
NONPARALLEL Subcommand (CSORDINAL command)
TEST Subcommand (CSORDINAL command)
DOMAIN Subcommand (CSORDINAL command)
MISSING Subcommand (CSORDINAL command)
PRINT Subcommand (CSORDINAL command)
SAVE Subcommand (CSORDINAL command)
OUTFILE Subcommand (CSORDINAL command)


JOINTPROB Subcommand (CSORDINAL command)

CSORDINAL (command),CSORDINAL (command),CSORDINAL (command)
JOINTPROB subcommand,JOINTPROB subcommand,JOINTPROB subcommand
JOINTPROB (subcommand),JOINTPROB (subcommand),JOINTPROB (subcommand)
CSORDINAL command,CSORDINAL command,CSORDINAL command

The JOINTPROB subcommand is used to specify the file containing the first stage joint inclusion probabilities for UNEQUAL_WOR estimation. The CSSELECT procedure writes this file in the same location and with the same name (but different extension) as the plan file. When UNEQUAL_WOR estimation is specified, the CSORDINAL procedure will use the default location and name of the file unless the JOINTPROB subcommand is used to override them.

FILE (keyword),FILE (keyword),FILE (keyword)
CSORDINAL command,CSORDINAL command,CSORDINAL command
'FILE' | 'dataset'
The name of the joint inclusion probabilities file. It can be an external file or an open dataset.

Related Topics

CSORDINAL
Overview (CSORDINAL command)
Examples (CSORDINAL command)
Variable List (CSORDINAL command)
PLAN Subcommand (CSORDINAL command)
MODEL Subcommand (CSORDINAL command)
LINK Subcommand (CSORDINAL command)
CUSTOM Subcommand (CSORDINAL command)
ODDSRATIOS Subcommand (CSORDINAL command)
CRITERIA Subcommand (CSORDINAL command)
STATISTICS Subcommand (CSORDINAL command)
NONPARALLEL Subcommand (CSORDINAL command)
TEST Subcommand (CSORDINAL command)
DOMAIN Subcommand (CSORDINAL command)
MISSING Subcommand (CSORDINAL command)
PRINT Subcommand (CSORDINAL command)
SAVE Subcommand (CSORDINAL command)
OUTFILE Subcommand (CSORDINAL command)


MODEL Subcommand (CSORDINAL command)

CSORDINAL (command),CSORDINAL (command),CSORDINAL (command)
MODEL subcommand,MODEL subcommand,MODEL subcommand
MODEL (subcommand),MODEL (subcommand),MODEL (subcommand)
CSORDINAL command,CSORDINAL command,CSORDINAL command

The MODEL subcommand is used to specify the effects to be included in the model. Threshold parameters are included automatically. Their number is one less then the number of categories of the dependent variable found in the data.

• Specify a list of terms to be included in the model, separated by spaces or commas.

• If the MODEL subcommand is not specified, CSORDINAL uses a model that includes threshold parameters, main effects for any factors, and any covariates in the order specified on the variable list.

• To include a term for the main effect of a factor, enter the name of the factor.

• To include a term for an interaction among factors, use the keyword BY or the asterisk (*) to join the factors involved in the interaction. For example, A*B means a two-way interaction effect of A and B, where A and B are factors. A*A is not allowed because factors inside an interaction effect must be distinct.

• To include a term for nesting one factor within another, use a pair of parentheses. For example, A(B) means that A is nested within B. A(A) is not allowed because factors inside a nested effect must be distinct.

• Multiple nesting is allowed. For example, A(B(C)) means that B is nested within C, and A is nested within B(C). When more than one pair of parentheses is present, each pair of parentheses must be enclosed or nested within another pair of parentheses. Thus, A(B)(C) is not valid.

• Nesting within an interaction effect is valid. For example, A(B*C) means that A is nested within B*C.

• Interactions among nested effects are allowed. The correct syntax is the interaction followed by the common nested effect inside the parentheses. For example, interaction between A and B within levels of C should be specified as A*B(C) instead of A(C)*B(C).

• To include a covariate term in the design, enter the name of the covariate.

• Covariates can be connected, but not nested, through the * operator or using the keyword BY to form another covariate effect. Interactions among covariates such as X1*X1 and X1*X2 are valid, but X1(X2) is not.

• Factor and covariate effects can be connected in various ways except that no effects can be nested within a covariate effect. Suppose A and B are factors and X1 and X2 are covariates. Examples of valid combinations of factor and covariate effects are A*X1, A*B*X1, X1(A), X1(A*B), X1*A(B), X1*X2(A*B), and A*B*X1*X2.

Related Topics

CSORDINAL
Overview (CSORDINAL command)
Examples (CSORDINAL command)
Variable List (CSORDINAL command)
PLAN Subcommand (CSORDINAL command)
JOINTPROB Subcommand (CSORDINAL command)
LINK Subcommand (CSORDINAL command)
CUSTOM Subcommand (CSORDINAL command)
ODDSRATIOS Subcommand (CSORDINAL command)
CRITERIA Subcommand (CSORDINAL command)
STATISTICS Subcommand (CSORDINAL command)
NONPARALLEL Subcommand (CSORDINAL command)
TEST Subcommand (CSORDINAL command)
DOMAIN Subcommand (CSORDINAL command)
MISSING Subcommand (CSORDINAL command)
PRINT Subcommand (CSORDINAL command)
SAVE Subcommand (CSORDINAL command)
OUTFILE Subcommand (CSORDINAL command)


LINK Subcommand (CSORDINAL command)

CSORDINAL (command),CSORDINAL (command),CSORDINAL (command)
LINK subcommand,LINK subcommand,LINK subcommand
LINK (subcommand),LINK (subcommand),LINK (subcommand)
CSORDINAL command,CSORDINAL command,CSORDINAL command

The LINK subcommand offers the choice of a cumulative link function to specify the model.

• The keyword FUNCTION, followed by an equals sign, and a link function keyword are required.

• If the subcommand is not specified, LOGIT is the default cumulative link function.

• Only a single cumulative link function can be specified.

CAUCHIT (keyword),CAUCHIT (keyword),CAUCHIT (keyword)
CSORDINAL command,CSORDINAL command,CSORDINAL command
CLOGLOG (keyword),CLOGLOG (keyword),CLOGLOG (keyword)
CSORDINAL command,CSORDINAL command,CSORDINAL command
LOGIT (keyword),LOGIT (keyword),LOGIT (keyword)
CSORDINAL command,CSORDINAL command,CSORDINAL command
NLOGLOG (keyword),NLOGLOG (keyword),NLOGLOG (keyword)
CSORDINAL command,CSORDINAL command,CSORDINAL command
PROBIT (keyword),PROBIT (keyword),PROBIT (keyword)
CSORDINAL command,CSORDINAL command,CSORDINAL command
CAUCHIT | Cauchit function. f(x)=tan(π(x−0.5))
CLOGLOG | Complementary log-log function. f(x)=log(−log(1−x)
LOGIT | Logit function. f(x)=log(x / (1−x)). This is the default link function.
NLOGLOG | Negative log-log function. f(x)=−log(−log(x))
PROBIT | Probit function. f(x)=Φ−1(x), where Φ−1 is the inverse standard normal cumulative distribution function.

Related Topics

CSORDINAL
Overview (CSORDINAL command)
Examples (CSORDINAL command)
Variable List (CSORDINAL command)
PLAN Subcommand (CSORDINAL command)
JOINTPROB Subcommand (CSORDINAL command)
MODEL Subcommand (CSORDINAL command)
CUSTOM Subcommand (CSORDINAL command)
ODDSRATIOS Subcommand (CSORDINAL command)
CRITERIA Subcommand (CSORDINAL command)
STATISTICS Subcommand (CSORDINAL command)
NONPARALLEL Subcommand (CSORDINAL command)
TEST Subcommand (CSORDINAL command)
DOMAIN Subcommand (CSORDINAL command)
MISSING Subcommand (CSORDINAL command)
PRINT Subcommand (CSORDINAL command)
SAVE Subcommand (CSORDINAL command)
OUTFILE Subcommand (CSORDINAL command)


CUSTOM Subcommand (CSORDINAL command)

CSORDINAL (command),CSORDINAL (command),CSORDINAL (command)
CUSTOM subcommand,CUSTOM subcommand,CUSTOM subcommand
CUSTOM (subcommand),CUSTOM (subcommand),CUSTOM (subcommand)
CSORDINAL command,CSORDINAL command,CSORDINAL command

The CUSTOM subcommand defines custom hypothesis tests by specifying the L matrix (contrast coefficients matrix) and the K matrix (contrast results matrix) in the general form of the linear hypothesis LB = K. The vector B is the parameter vector in the cumulative link model.

For a binary dependent variable, CSORDINAL models a single threshold parameter and a set of regression parameters. For a polytomous ordinal dependent variable with K levels, CSORDINAL models a threshold parameter for each category except the last and a single set of regression parameters for all response categories. The CUSTOM subcommand allows you to specify an L matrix with contrast coefficients for all thresholds and regression parameters.

• Multiple CUSTOM subcommands are allowed. Each is treated independently.

• An optional label may be specified using the LABEL keyword. The label is a string with a maximum length of 255 characters. Only one label can be specified.

• The L matrix is the contrast coefficients matrix. This matrix specifies coefficients of contrasts, which can be used for studying the effects in the model. An L matrix must always be specified using the LMATRIX keyword.

• The K matrix is the contrast results matrix. This matrix specifies the results of the linear hypothesis. A K matrix can be specified using the KMATRIX keyword.

• The number of rows in the L and K matrices must be equal.

• The default K matrix is a zero matrix; that is, LB = 0 is assumed.

• There are three general formats that can be used on the LMATRIX keyword: (1) Specify coefficient values for thresholds, followed optionally by an effect name and a list of real numbers. (2) Specify an effect name and a list of real numbers. (3) Specify the keyword ALL and a list of real numbers. In all three formats, there can be multiple effect names (or instances of the keyword ALL) and number lists.

• When specifying threshold coeffients in the first or the third general format, a complete list of K−1 coefficient values must be given in the increasing threshold order.

• Only valid effects in the default model or on the MODEL subcommand can be specified on the LMATRIX keyword.

• The length of the list of real numbers on the LMATRIX keyword must be equal to the number of parameters (including the redundant ones) corresponding to the specified effect. For example, if the effect A*B takes up six columns in the design matrix, then the list after A*B must contain exactly six numbers.

• When ALL is specified, the length of the list that follows ALL must be equal to the total number of parameters (including the redundant ones) in the model. For a binary dependent variable, the contrast coefficients for the single threshold and all regression parameters must be listed following the ALL keyword. For a polytomous dependent variable with K levels, the contrast coefficients for the K−1 thresholds and all regression parameters must be listed in order following the ALL keyword.

• Effects that are in the model but not specified on the LMATRIX keyword are assumed to have entries of 0 in the corresponding columns of the L matrix.

• When defining an L matrix, a number can be specified as a fraction with a positive denominator—for example, 1/3 and –1/3 are valid, but 1/–3 is invalid.

• A semicolon (;) indicates the end of a row in the L matrix.

• The format for the KMATRIX keyword is one or more real numbers. If more than one number is specified, then separate adjacent numbers using a semicolon (;). Each semicolon indicates the end of a row in the K matrix. Each number is the hypothesized value for a contrast, which is defined by a row in the L matrix.

• If rows of the L matrix are not independent, a submatrix of L with independent rows is used for testing. Tested rows are indicated when the K matrix is not a zero matrix.

Example

Suppose that factors A and B each have three levels.

CSORDINAL y BY a b
  /PLAN FILE='/survey/myfile.csplan'
  /MODEL a b a*b
  /CUSTOM  LABEL = ‘Effect A'
   LMATRIX = a 1 0 -1
             a*b  1/3  1/3  1/3
                    0    0    0
                 -1/3 -1/3 -1/3;
             a 0 1 -1
             a*b    0    0    0
                  1/3  1/3  1/3
                 -1/3 -1/3 -1/3.

• The preceding syntax specifies a test of effect A.

• Because there are three levels in effect A, at most two independent contrasts can be formed; thus, there are two rows in the L matrix, separated by a semicolon (;).

• There are three levels each in effects A and B; thus, the interaction effect A*B takes nine columns in the design matrix.

• The first row in the L matrix tests the difference between levels 1 and 3 of effect A; the second row tests the difference between levels 2 and 3 of effect A.

• The KMATRIX keyword is not specified, so the null hypothesis value for both tests is 0.

Example

Suppose that dependent variable Z and factor A each have three levels.

CSORDINAL z BY a
  /PLAN FILE='/survey/myfile.csplan'
  /MODEL a
  /CUSTOM  LABEL = ‘Effect A'
   LMATRIX = a 1 0 -1;
             a 0 1 -1
   KMATRIX = 1; 1.

• The dependent variable Z has three categories, so there will be two thresholds.

• The syntax specifies a model with thresholds and a main effect for factor A, and a custom hypothesis test of effect A.

• Because the ALL option is not used on the LMATRIX keyword, threshold coefficients are set to zero. The equivalent LMATRIX keyword using the ALL option follows.

    LMATRIX = ALL 0 0  1  0 -1;
              ALL 0 0  0  1 -1

• The KMATRIX keyword is specified and the hypothesis that the difference between levels 1 and 3 and levels 2 and 3 of effect A are both equal to 1 is tested.

Related Topics

CSORDINAL
Overview (CSORDINAL command)
Examples (CSORDINAL command)
Variable List (CSORDINAL command)
PLAN Subcommand (CSORDINAL command)
JOINTPROB Subcommand (CSORDINAL command)
MODEL Subcommand (CSORDINAL command)
LINK Subcommand (CSORDINAL command)
ODDSRATIOS Subcommand (CSORDINAL command)
CRITERIA Subcommand (CSORDINAL command)
STATISTICS Subcommand (CSORDINAL command)
NONPARALLEL Subcommand (CSORDINAL command)
TEST Subcommand (CSORDINAL command)
DOMAIN Subcommand (CSORDINAL command)
MISSING Subcommand (CSORDINAL command)
PRINT Subcommand (CSORDINAL command)
SAVE Subcommand (CSORDINAL command)
OUTFILE Subcommand (CSORDINAL command)


ODDSRATIOS Subcommand (CSORDINAL command)

CSORDINAL (command),CSORDINAL (command),CSORDINAL (command)
ODDSRATIOS subcommand,ODDSRATIOS subcommand,ODDSRATIOS subcommand
ODDSRATIOS (subcommand),ODDSRATIOS (subcommand),ODDSRATIOS (subcommand)
CSORDINAL command,CSORDINAL command,CSORDINAL command

The ODDSRATIOS subcommand estimates cumulative odds ratios for the specified factor(s) or covariate(s). The subcommand is available only for LOGIT link. For other link functions, the subcommand is ignored and a warning is issued. Note that these cumulative odds ratios are model-based and are not directly computed using the observed data.

A single cumulative odds ratio is computed for all categories of the dependent variable except the last; the proportional odds model postulates that they are all equal.

If the FACTOR keyword is specified, the cumulative odds ratios compare the cumulative odds at each factor category j with the cumulative odds at category J, where J is the reference category defined in parentheses following the variable name of the factor. All other factors and covariates are fixed as defined on the CONTROL keyword.

If the COVARIATE keyword is specified, the cumulative odds ratios compare the cumulative odds at value x with the cumulative odds at value x + Δx, where Δx is the change in x defined in parentheses following the variable name of the covariate. To define the value x, specify the covariate and the value on the CONTROL keyword. The value of all other factors and covariates are fixed as defined on the CONTROL keyword also.

If a specified factor or covariate interacts with other predictors in the model, then the cumulative odds ratios depend not only on the change in the specified variable but also on the values of the variables with which it interacts. If a specified covariate interacts with itself in the model (for example, X*X), then the cumulative odds ratios depend on both the change in the covariate and the value of the covariate. The values of interacting factors and covariates can be customized using the CONTROL keyword.

The CSORDINAL procedure sorts levels of each factor in ascending order and defines the highest level as the last level. (If the factor is a string variable, then the value of the highest level is locale-dependent.)

• Multiple ODDSRATIOS subcommands are allowed. Each is treated independently.

• Either the FACTOR keyword and one or more factors, or the COVARIATE keyword and one or more covariates, but not both, are required. All other keywords are optional.

• The FACTOR, COVARIATE, and CONTROL keywords must be followed by an equals sign and one or more elements enclosed in square brackets.

• If a variable is specified on the FACTOR keyword and is also specified on the CONTROL keyword, then the CONTROL specification for that variable is ignored when the variable's odds ratios are computed. Thus, FACTOR = [A B] CONTROL = [A(1) B(2)] estimates odds ratios for factor A holding factor B at level 2, and for factor B holding factor A at level 1.

FACTOR (keyword),FACTOR (keyword),FACTOR (keyword)
CSORDINAL command,CSORDINAL command,CSORDINAL command
COVARIATE (keyword),COVARIATE (keyword),COVARIATE (keyword)
CSORDINAL command,CSORDINAL command,CSORDINAL command
CONTROL (keyword),CONTROL (keyword),CONTROL (keyword)
CSORDINAL command,CSORDINAL command,CSORDINAL command
FACTOR = [option]
 | Valid options are one or more factors appearing on the factor list. Optionally, each factor may be followed by parentheses containing the level to use as the reference category when computing cumulative odds ratios. The keyword LOW or HIGH, or a value, may be specified. Put the value inside a pair of quotes if the value is formatted (such as date or currency) or if the factor is of string type. By default, the highest category is used as the reference category.
 | If a value is specified but the value does not exist in the data, then a warning is issued and the default HIGH is used.
 | Any factor may occur only once on the FACTOR keyword.
COVARIATE = [option]
 | Valid options are one or more covariates appearing on the covariate list. Optionally, each covariate may be followed by parentheses containing one or more nonzero numbers giving unit(s) of change to use for covariates when computing cumulative odds ratios. Cumulative odds ratios are estimated for each distinct value. The default value is 1.
 | Any covariate may occur only once on the COVARIATE keyword.
CONTROL = [option]
 | Specifies the factor and/or covariate values to use when computing cumulative odds ratios. Factors must appear on the factor list, and covariates on the covariate list, of the CSORDINAL command.
 | Factors must be followed by the keyword LOW or HIGH, or a value, in parentheses. Put the value inside a pair of quotes if the value is formatted (such as date or currency) or if the factor is of string type. If keyword LOW or HIGH is used, then each cumulative odds ratio is computed by holding the factor at its lowest or highest level, respectively. If a value is used, then each cumulative odds ratio is computed by holding the specified factor at the supplied value. If a factor is not specified on the CONTROL option, then its highest category is used in cumulative odds ratio calculations.
 | If a factor value is specified but the value does not exist in the data, then a warning is issued and the default HIGH is used.
 | Covariates must be followed by keyword MEAN or a number in parentheses. If keyword MEAN is used, then each cumulative odds ratio is computed by holding the covariate at its overall mean. If a number is used, then each cumulative odds ratio is computed by holding the specified covariate at the supplied value. If a covariate is not specified on the CONTROL option, then its overall mean is used in cumulative odds ratio calculations.
 | Any factor or covariate may occur only once on the CONTROL keyword.

Example

Suppose that dependent variable Y has three levels; factor A has two levels; and factor B has three levels coded 1, 2, and 3.

CSORDINAL y BY a b WITH x
  /PLAN FILE='/survey/myfile.csplan'
  /MODEL a b a*b x
  /ODDSRATIOS FACTOR=[a] CONTROL=[b(1)]
  /ODDSRATIOS FACTOR=[a] CONTROL=[b(2)]
  /ODDSRATIOS FACTOR=[a] CONTROL=[b(3)].

• The default LOGIT cumulative link function is used and the cumulative odds ratios are computed. They are equal across all response levels by the model definition.

• The model includes two thresholds, main effects for factors A and B, the A*B interaction effect, and the covariate X.

• Cumulative odds ratios are requested for factor A. Assuming the A*B interaction effect is significant, the cumulative odds ratio for factor A will differ across levels of factor B. The specified syntax requests three cumulative odds ratios for factor A; each is computed at a different level of factor B.

Example

CSORDINAL z BY a b c WITH x y
  /PLAN FILE='/survey/myfile.csplan'
  /MODEL a b c x*y
  /ODDSRATIOS COVARIATE=[x(1 3 5)] CONTROL=[y(1)].

• The preceding syntax will compute three cumulative odds ratios for covariate X.

• The parenthesized list following variable X provides the unit of change values to use when computing cumulative odds ratios. Cumulative odds ratios will be computed for X increasing by 1, 3, and 5 units and holding covariate Y equal to 1.

Related Topics

CSORDINAL
Overview (CSORDINAL command)
Examples (CSORDINAL command)
Variable List (CSORDINAL command)
PLAN Subcommand (CSORDINAL command)
JOINTPROB Subcommand (CSORDINAL command)
MODEL Subcommand (CSORDINAL command)
LINK Subcommand (CSORDINAL command)
CUSTOM Subcommand (CSORDINAL command)
CRITERIA Subcommand (CSORDINAL command)
STATISTICS Subcommand (CSORDINAL command)
NONPARALLEL Subcommand (CSORDINAL command)
TEST Subcommand (CSORDINAL command)
DOMAIN Subcommand (CSORDINAL command)
MISSING Subcommand (CSORDINAL command)
PRINT Subcommand (CSORDINAL command)
SAVE Subcommand (CSORDINAL command)
OUTFILE Subcommand (CSORDINAL command)


CRITERIA Subcommand (CSORDINAL command)

CSORDINAL (command),CSORDINAL (command),CSORDINAL (command)
CRITERIA subcommand,CRITERIA subcommand,CRITERIA subcommand
CRITERIA (subcommand),CRITERIA (subcommand),CRITERIA (subcommand)
CSORDINAL command,CSORDINAL command,CSORDINAL command

The CRITERIA subcommand offers controls on the iterative algorithm used for estimation, and specifies numerical tolerance for checking singularity.

CHKSEP (keyword),CHKSEP (keyword),CHKSEP (keyword)
CSORDINAL command,CSORDINAL command,CSORDINAL command
CILEVEL (keyword),CILEVEL (keyword),CILEVEL (keyword)
CSORDINAL command,CSORDINAL command,CSORDINAL command
DF (keyword),DF (keyword),DF (keyword)
CSORDINAL command,CSORDINAL command,CSORDINAL command
LCONVERGE (keyword),LCONVERGE (keyword),LCONVERGE (keyword)
CSORDINAL command,CSORDINAL command,CSORDINAL command
RELATIVE (keyword),RELATIVE (keyword),RELATIVE (keyword)
CSORDINAL command,CSORDINAL command,CSORDINAL command
ABSOLUTE (keyword),ABSOLUTE (keyword),ABSOLUTE (keyword)
CSORDINAL command,CSORDINAL command,CSORDINAL command
METHOD (keyword),METHOD (keyword),METHOD (keyword)
CSORDINAL command,CSORDINAL command,CSORDINAL command
FISHER (keyword),FISHER (keyword),FISHER (keyword)
CSORDINAL command,CSORDINAL command,CSORDINAL command
NEWTON (keyword),NEWTON (keyword),NEWTON (keyword)
CSORDINAL command,CSORDINAL command,CSORDINAL command
MXITER (keyword),MXITER (keyword),MXITER (keyword)
CSORDINAL command,CSORDINAL command,CSORDINAL command
MXSTEP (keyword),MXSTEP (keyword),MXSTEP (keyword)
CSORDINAL command,CSORDINAL command,CSORDINAL command
PCONVERGE (keyword),PCONVERGE (keyword),PCONVERGE (keyword)
CSORDINAL command,CSORDINAL command,CSORDINAL command
SINGULAR (keyword),SINGULAR (keyword),SINGULAR (keyword)
CSORDINAL command,CSORDINAL command,CSORDINAL command
CHKSEP = integer
 | Starting iteration for checking complete and quasi-complete separation. Specify a non-negative integer. This criterion is not used if the value is 0. The default value is 20.
CILEVEL = value
 | Confidence interval level for coefficient estimates, exponentiated coefficient estimates, and cumulative odds ratio estimates. Specify a value greater than or equal to 0, and less than 100. The default value is 95.
DF = value
 | Sampling design degrees of freedom to use in computing p values for all test statistics. Specify a positive number. The default value is the difference between the number of primary sampling units and the number of strata in the first stage of sampling.
LCONVERGE = [number (RELATIVE | ABSOLUTE)]
 | Log-likelihood function convergence criterion. Convergence is assumed if the relative or absolute change in the log-likelihood function is less than the given value. This criterion is not used if the value is 0.
 | Specify square brackets containing a non-negative number followed optionally by the keyword RELATIVE or ABSOLUTE, which indicates the type of change. The default value is 0; the default type is RELATIVE.
METHOD = FISHER(number) | NEWTON
 | Model parameters estimation method. The Fisher scoring method is specified by the keyword FISHER, the Newton-Raphson method, by the keyword NEWTON, and a hybrid method is available by specifying FISHER(n). In the hybrid method, n is the maximal number of Fisher scoring iterations before switching to the Newton-Raphson method. If convergence is achieved during the Fisher scoring phase of the hybrid method, iterations continue with the Newton-Raphson method.
MXITER = integer
 | Maximum number of iterations. Specify a non-negative integer. The default value is 100.
MXSTEP = integer
 | Maximum step-halving allowed. Specify a positive integer. The default value is 5.
PCONVERGE = [number (RELATIVE | ABSOLUTE)]
 | Parameter estimates convergence criterion. Convergence is assumed if the relative or absolute change in the parameter estimates is less than the given value. This criterion is not used if the value is 0.
 | Specify square brackets containing a non-negative number followed optionally by the keyword RELATIVE or ABSOLUTE, which indicates the type of change. The default value is 10-6; the default type is RELATIVE.
SINGULAR = value
 | Tolerance value used to test for singularity. Specify a positive value. The default value is 10-12.

Related Topics

CSORDINAL
Overview (CSORDINAL command)
Examples (CSORDINAL command)
Variable List (CSORDINAL command)
PLAN Subcommand (CSORDINAL command)
JOINTPROB Subcommand (CSORDINAL command)
MODEL Subcommand (CSORDINAL command)
LINK Subcommand (CSORDINAL command)
CUSTOM Subcommand (CSORDINAL command)
ODDSRATIOS Subcommand (CSORDINAL command)
STATISTICS Subcommand (CSORDINAL command)
NONPARALLEL Subcommand (CSORDINAL command)
TEST Subcommand (CSORDINAL command)
DOMAIN Subcommand (CSORDINAL command)
MISSING Subcommand (CSORDINAL command)
PRINT Subcommand (CSORDINAL command)
SAVE Subcommand (CSORDINAL command)
OUTFILE Subcommand (CSORDINAL command)


STATISTICS Subcommand (CSORDINAL command)

CSORDINAL (command),CSORDINAL (command),CSORDINAL (command)
STATISTICS subcommand,STATISTICS subcommand,STATISTICS subcommand
STATISTICS (subcommand),STATISTICS (subcommand),STATISTICS (subcommand)
CSORDINAL command,CSORDINAL command,CSORDINAL command

The STATISTICS subcommand requests various statistics associated with the parameter estimates.

• There are no default keywords on the STATISTICS subcommand. If this subcommand is not specified, then none of the statistics listed below are displayed

PARAMETER (keyword),PARAMETER (keyword),PARAMETER (keyword)
CSORDINAL command,CSORDINAL command,CSORDINAL command
EXP (keyword),EXP (keyword),EXP (keyword)
CSORDINAL command,CSORDINAL command,CSORDINAL command
SE (keyword),SE (keyword),SE (keyword)
CSORDINAL command,CSORDINAL command,CSORDINAL command
TTEST (keyword),TTEST (keyword),TTEST (keyword)
CSORDINAL command,CSORDINAL command,CSORDINAL command
CINTERVAL (keyword),CINTERVAL (keyword),CINTERVAL (keyword)
CSORDINAL command,CSORDINAL command,CSORDINAL command
DEFF (keyword),DEFF (keyword),DEFF (keyword)
CSORDINAL command,CSORDINAL command,CSORDINAL command
DEFFSQRT (keyword),DEFFSQRT (keyword),DEFFSQRT (keyword)
CSORDINAL command,CSORDINAL command,CSORDINAL command
PARAMETER | Parameter estimates.
EXP | The exponentiated parameter estimates. It is available only for the LOGIT link.
SE | Standard error for each parameter estimate.
TTEST | t test for each parameter estimate.
CINTERVAL | Confidence interval for each parameter estimate and/or exponentiated parameter estimate.
DEFF | Design effect for each parameter estimate.
DEFFSQRT | Square root of design effect for each parameter estimate.

Related Topics

CSORDINAL
Overview (CSORDINAL command)
Examples (CSORDINAL command)
Variable List (CSORDINAL command)
PLAN Subcommand (CSORDINAL command)
JOINTPROB Subcommand (CSORDINAL command)
MODEL Subcommand (CSORDINAL command)
LINK Subcommand (CSORDINAL command)
CUSTOM Subcommand (CSORDINAL command)
ODDSRATIOS Subcommand (CSORDINAL command)
CRITERIA Subcommand (CSORDINAL command)
NONPARALLEL Subcommand (CSORDINAL command)
TEST Subcommand (CSORDINAL command)
DOMAIN Subcommand (CSORDINAL command)
MISSING Subcommand (CSORDINAL command)
PRINT Subcommand (CSORDINAL command)
SAVE Subcommand (CSORDINAL command)
OUTFILE Subcommand (CSORDINAL command)


NONPARALLEL Subcommand (CSORDINAL command)

CSORDINAL (command),CSORDINAL (command),CSORDINAL (command)
NONPARALLEL subcommand,NONPARALLEL subcommand,NONPARALLEL subcommand
NONPARALLEL (subcommand),NONPARALLEL (subcommand),NONPARALLEL (subcommand)
CSORDINAL command,CSORDINAL command,CSORDINAL command

The NONPARALLEL subcommand requests various statistics associated with a general cumulative link model with non-parallel lines where a separate regression line is fitted for each response category except for the last.

TEST (keyword),TEST (keyword),TEST (keyword)
CSORDINAL command,CSORDINAL command,CSORDINAL command
PARAMETER (keyword),PARAMETER (keyword),PARAMETER (keyword)
CSORDINAL command,CSORDINAL command,CSORDINAL command
COVB (keyword),COVB (keyword),COVB (keyword)
CSORDINAL command,CSORDINAL command,CSORDINAL command
TEST | Test of parallel lines assumption. Test whether regression parameters are equal for all cumulative responses. The general model with non-parallel lines is estimated and the Wald test of equal parameters is applied.
PARAMETER | Parameters of the general model with non-parallel lines. The general model is estimated using the same convergence criteria as for the original model. Both parameters and their standard errors are estimated.
COVB | Covariance matrix for the general model parameters.

Related Topics

CSORDINAL
Overview (CSORDINAL command)
Examples (CSORDINAL command)
Variable List (CSORDINAL command)
PLAN Subcommand (CSORDINAL command)
JOINTPROB Subcommand (CSORDINAL command)
MODEL Subcommand (CSORDINAL command)
LINK Subcommand (CSORDINAL command)
CUSTOM Subcommand (CSORDINAL command)
ODDSRATIOS Subcommand (CSORDINAL command)
CRITERIA Subcommand (CSORDINAL command)
STATISTICS Subcommand (CSORDINAL command)
TEST Subcommand (CSORDINAL command)
DOMAIN Subcommand (CSORDINAL command)
MISSING Subcommand (CSORDINAL command)
PRINT Subcommand (CSORDINAL command)
SAVE Subcommand (CSORDINAL command)
OUTFILE Subcommand (CSORDINAL command)


TEST Subcommand (CSORDINAL command)

CSORDINAL (command),CSORDINAL (command),CSORDINAL (command)
TEST subcommand,TEST subcommand,TEST subcommand
TEST (subcommand),TEST (subcommand),TEST (subcommand)
CSORDINAL command,CSORDINAL command,CSORDINAL command

The TEST subcommand specifies the type of test statistic and the method of adjusting the significance level to be used for hypothesis tests requested on the MODEL, CUSTOM, and PRINT subcommands.

TYPE (keyword),TYPE (keyword),TYPE (keyword)
CSORDINAL command,CSORDINAL command,CSORDINAL command
F (keyword),F (keyword),F (keyword)
CSORDINAL command,CSORDINAL command,CSORDINAL command
ADJF (keyword),ADJF (keyword),ADJF (keyword)
CSORDINAL command,CSORDINAL command,CSORDINAL command
CHISQUARE (keyword),CHISQUARE (keyword),CHISQUARE (keyword)
CSORDINAL command,CSORDINAL command,CSORDINAL command
ADJCHISQUARE (keyword),ADJCHISQUARE (keyword),ADJCHISQUARE (keyword)
CSORDINAL command,CSORDINAL command,CSORDINAL command
TYPE Keyword Collapse Hide details

TYPE Keyword

The TYPE keyword indicates the type of test statistic.

F | Wald F test. This is the default test statistic if the TYPE keyword is not specified.
ADJF | Adjusted Wald F test.
CHISQUARE | Wald chi-square test.
ADJCHISQUARE | Adjusted Wald chi-square test.
PADJUST (keyword),PADJUST (keyword),PADJUST (keyword)
CSORDINAL command,CSORDINAL command,CSORDINAL command
LSD (keyword),LSD (keyword),LSD (keyword)
CSORDINAL command,CSORDINAL command,CSORDINAL command
BONFERRONI (keyword),BONFERRONI (keyword),BONFERRONI (keyword)
CSORDINAL command,CSORDINAL command,CSORDINAL command
SEQBONFERRONI (keyword),SEQBONFERRONI (keyword),SEQBONFERRONI (keyword)
CSORDINAL command,CSORDINAL command,CSORDINAL command
SIDAK (keyword),SIDAK (keyword),SIDAK (keyword)
CSORDINAL command,CSORDINAL command,CSORDINAL command
SEQSIDAK (keyword),SEQSIDAK (keyword),SEQSIDAK (keyword)
CSORDINAL command,CSORDINAL command,CSORDINAL command
PADJUST Keyword Collapse Hide details

PADJUST Keyword

The PADJUST keyword indicates the method of adjusting the significance level.

LSD | Least significant difference. This method does not control the overall probability of rejecting the hypotheses that some linear contrasts are different from the null hypothesis value(s). This is the default.
BONFERRONI | Bonferroni. This method adjusts the observed significance level for the fact that multiple contrasts are being tested.
SEQBONFERRONI
 | Sequential Bonferroni. This is a sequentially step-down rejective Bonferroni procedure that is much less conservative in terms of rejecting individual hypotheses but maintains the same overall significance level.
SIDAK | Sidak. This method provides tighter bounds than the Bonferroni approach.
SEQSIDAK | Sequential Sidak. This is a sequentially step-down rejective Sidak procedure that is much less conservative in terms of rejecting individual hypotheses but maintains the same overall significance level.

Related Topics

CSORDINAL
Overview (CSORDINAL command)
Examples (CSORDINAL command)
Variable List (CSORDINAL command)
PLAN Subcommand (CSORDINAL command)
JOINTPROB Subcommand (CSORDINAL command)
MODEL Subcommand (CSORDINAL command)
LINK Subcommand (CSORDINAL command)
CUSTOM Subcommand (CSORDINAL command)
ODDSRATIOS Subcommand (CSORDINAL command)
CRITERIA Subcommand (CSORDINAL command)
STATISTICS Subcommand (CSORDINAL command)
NONPARALLEL Subcommand (CSORDINAL command)
DOMAIN Subcommand (CSORDINAL command)
MISSING Subcommand (CSORDINAL command)
PRINT Subcommand (CSORDINAL command)
SAVE Subcommand (CSORDINAL command)
OUTFILE Subcommand (CSORDINAL command)


DOMAIN Subcommand (CSORDINAL command)

CSORDINAL (command),CSORDINAL (command),CSORDINAL (command)
DOMAIN subcommand,DOMAIN subcommand,DOMAIN subcommand
DOMAIN (subcommand),DOMAIN (subcommand),DOMAIN (subcommand)
CSORDINAL command,CSORDINAL command,CSORDINAL command

The DOMAIN subcommand specifies the subpopulation for which the analysis is to be performed.

• The keyword VARIABLE, followed by an equals sign, a variable, and a value in parentheses, are required. Put the value inside a pair of quotes if the value is formatted (such as date or currency) or if the factor is of string type.

• The subpopulation is defined by all cases having the given value on the specified variable.

• Analyses are performed only for the specified subpopulation.

• For example, DOMAIN VARIABLE = myvar (1) defines the subpopulation by all cases for which variable MYVAR has value 1.

• The specified variable may be numeric or string and must exist at the time the CSORDINAL procedure is invoked.

• Stratification or cluster variables may be specified, but no other plan file variables are allowed on the DOMAIN subcommand.

• Analysis variables may not be specified on the DOMAIN subcommand.

Related Topics

CSORDINAL
Overview (CSORDINAL command)
Examples (CSORDINAL command)
Variable List (CSORDINAL command)
PLAN Subcommand (CSORDINAL command)
JOINTPROB Subcommand (CSORDINAL command)
MODEL Subcommand (CSORDINAL command)
LINK Subcommand (CSORDINAL command)
CUSTOM Subcommand (CSORDINAL command)
ODDSRATIOS Subcommand (CSORDINAL command)
CRITERIA Subcommand (CSORDINAL command)
STATISTICS Subcommand (CSORDINAL command)
NONPARALLEL Subcommand (CSORDINAL command)
TEST Subcommand (CSORDINAL command)
MISSING Subcommand (CSORDINAL command)
PRINT Subcommand (CSORDINAL command)
SAVE Subcommand (CSORDINAL command)
OUTFILE Subcommand (CSORDINAL command)


MISSING Subcommand (CSORDINAL command)

CSORDINAL (command),CSORDINAL (command),CSORDINAL (command)
MISSING subcommand,MISSING subcommand,MISSING subcommand
MISSING (subcommand),MISSING (subcommand),MISSING (subcommand)
CSORDINAL command,CSORDINAL command,CSORDINAL command

The MISSING subcommand specifies how missing values are handled.

• In general, cases must have valid data for all design variables as well as for the dependent variable and any covariates. Cases with invalid data for any of these variables are excluded from the analysis.

• There is one important exception to the preceding rule. This exception applies when an inclusion probability or population size variable is defined in an analysis plan file. Within a stratum at a given stage, if the inclusion probability or population size values are unequal across cases or missing for a case, then the first valid value found within that stratum is used as the value for the stratum. If strata are not defined, then the first valid value found in the sample is used. If the inclusion probability or population size values are missing for all cases within a stratum (or within the sample if strata are not defined) at a given stage, then an error message is issued.

• The CLASSMISSING keyword specifies whether user-missing values are treated as valid. This specification is applied to categorical design variables that is, strata, cluster, and subpopulation variables), the dependent variable, and any factors.

CLASSMISSING (keyword),CLASSMISSING (keyword),CLASSMISSING (keyword)
CSORDINAL command,CSORDINAL command,CSORDINAL command
EXCLUDE (keyword),EXCLUDE (keyword),EXCLUDE (keyword)
CSORDINAL command,CSORDINAL command,CSORDINAL command
INCLUDE (keyword),INCLUDE (keyword),INCLUDE (keyword)
CSORDINAL command,CSORDINAL command,CSORDINAL command
EXCLUDE | Exclude user-missing values among the strata, cluster, subpopulation, the dependent variable, and factor variables. This is the default.
INCLUDE | Include user-missing values among the strata, cluster, subpopulation, the dependent variable, and factor variables. Treat user-missing values for these variables as valid data.

Related Topics

CSORDINAL
Overview (CSORDINAL command)
Examples (CSORDINAL command)
Variable List (CSORDINAL command)
PLAN Subcommand (CSORDINAL command)
JOINTPROB Subcommand (CSORDINAL command)
MODEL Subcommand (CSORDINAL command)
LINK Subcommand (CSORDINAL command)
CUSTOM Subcommand (CSORDINAL command)
ODDSRATIOS Subcommand (CSORDINAL command)
CRITERIA Subcommand (CSORDINAL command)
STATISTICS Subcommand (CSORDINAL command)
NONPARALLEL Subcommand (CSORDINAL command)
TEST Subcommand (CSORDINAL command)
DOMAIN Subcommand (CSORDINAL command)
PRINT Subcommand (CSORDINAL command)
SAVE Subcommand (CSORDINAL command)
OUTFILE Subcommand (CSORDINAL command)


PRINT Subcommand (CSORDINAL command)

CSORDINAL (command),CSORDINAL (command),CSORDINAL (command)
PRINT subcommand,PRINT subcommand,PRINT subcommand
PRINT (subcommand),PRINT (subcommand),PRINT (subcommand)
CSORDINAL command,CSORDINAL command,CSORDINAL command

The PRINT subcommand is used to display optional output.

• If the PRINT subcommand is not specified, then the default output includes sample information, variable and factor information, and model summary statistics.

• If the PRINT subcommand is specified, then CSORDINAL displays output only for those keywords that are specified.

SAMPLEINFO (keyword),SAMPLEINFO (keyword),SAMPLEINFO (keyword)
CSORDINAL command,CSORDINAL command,CSORDINAL command
VARIABLEINFO (keyword),VARIABLEINFO (keyword),VARIABLEINFO (keyword)
CSORDINAL command,CSORDINAL command,CSORDINAL command
SUMMARY (keyword),SUMMARY (keyword),SUMMARY (keyword)
CSORDINAL command,CSORDINAL command,CSORDINAL command
HISTORY (keyword),HISTORY (keyword),HISTORY (keyword)
CSORDINAL command,CSORDINAL command,CSORDINAL command
GEF (keyword),GEF (keyword),GEF (keyword)
CSORDINAL command,CSORDINAL command,CSORDINAL command
L MATRIX (keyword),L MATRIX (keyword),L MATRIX (keyword)
CSORDINAL command,CSORDINAL command,CSORDINAL command
COVB (keyword),COVB (keyword),COVB (keyword)
CSORDINAL command,CSORDINAL command,CSORDINAL command
CORB (keyword),CORB (keyword),CORB (keyword)
CSORDINAL command,CSORDINAL command,CSORDINAL command
CLASSTABLE (keyword),CLASSTABLE (keyword),CLASSTABLE (keyword)
CSORDINAL command,CSORDINAL command,CSORDINAL command
NONE (keyword),NONE (keyword),NONE (keyword)
CSORDINAL command,CSORDINAL command,CSORDINAL command
SAMPLEINFO | Sample information table. Displays summary information about the sample, including the unweighted count and the population size. This is default output if the PRINT subcommand is not specified.
VARIABLEINFO
 | Variable information. Displays summary information about the dependent variable, covariates, and factors. This is default output if the PRINT subcommand is not specified.
SUMMARY | Model summary statistics. Displays pseudo-R2 statistics. This is default output if the PRINT subcommand is not specified.
HISTORY(n) | Iteration history. Displays coefficient estimates and statistics at every nth iteration beginning with the 0th iteration (the initial estimates). The default is to print every iteration (n = 1). The last iteration is always printed if HISTORY is specified, regardless of the value of n.
GEF | General estimable function table.
LMATRIX | Set of contrast coefficients (L) matrices. These are the Type III contrast matrices used in testing model effects.
COVB | Covariance matrix for model parameters.
CORB | Correlation matrix for model parameters.
CLASSTABLE | Classification table. Displays frequencies of observed versus predicted response categories.
NONE | No PRINT subcommand output. None of the PRINT subcommand output is displayed. However, if NONE is specified with one or more other keywords, then the other keywords override NONE.

Related Topics

CSORDINAL
Overview (CSORDINAL command)
Examples (CSORDINAL command)
Variable List (CSORDINAL command)
PLAN Subcommand (CSORDINAL command)
JOINTPROB Subcommand (CSORDINAL command)
MODEL Subcommand (CSORDINAL command)
LINK Subcommand (CSORDINAL command)
CUSTOM Subcommand (CSORDINAL command)
ODDSRATIOS Subcommand (CSORDINAL command)
CRITERIA Subcommand (CSORDINAL command)
STATISTICS Subcommand (CSORDINAL command)
NONPARALLEL Subcommand (CSORDINAL command)
TEST Subcommand (CSORDINAL command)
DOMAIN Subcommand (CSORDINAL command)
MISSING Subcommand (CSORDINAL command)
SAVE Subcommand (CSORDINAL command)
OUTFILE Subcommand (CSORDINAL command)


SAVE Subcommand (CSORDINAL command)

CSORDINAL (command),CSORDINAL (command),CSORDINAL (command)
SAVE subcommand,SAVE subcommand,SAVE subcommand
SAVE (subcommand),SAVE (subcommand),SAVE (subcommand)
CSORDINAL command,CSORDINAL command,CSORDINAL command

The SAVE subcommand writes optional model variables to the active dataset.

• Specify one or more temporary variables, each followed by an optional new name in parentheses.

• The optional names must be valid variable names.

• If new names are not specified, CSORDINAL uses the default names.

• If a subpopulation is defined on the DOMAIN subcommand, then SAVE applies only to cases within the subpopulation.

The following rules describe the functionality of the SAVE subcommand in relation to the predictor values for each case.

• If all factors and covariates in the model have valid values for the case, then the procedure computes the predicted values. (The MISSING subcommand setting is taken into account when defining valid/invalid values for a factor.)

• An additional restriction for factors is that only those values of the factor actually used in building the model are considered valid. For example, suppose factor A takes values 1, 2, and 3 when the procedure builds the model. Also suppose there is a case with a value of 4 on factor A, and valid values on all other factors and covariates. For this case, no predicted values are saved because there is no model coefficient corresponding to factor A = 4.

Computation of predicted values for a given case does not depend on the value of the dependent variable; it could be missing.

CUMPROB (keyword),CUMPROB (keyword),CUMPROB (keyword)
CSORDINAL command,CSORDINAL command,CSORDINAL command
PREDPROB (keyword),PREDPROB (keyword),PREDPROB (keyword)
CSORDINAL command,CSORDINAL command,CSORDINAL command
PREDVAL (keyword),PREDVAL (keyword),PREDVAL (keyword)
CSORDINAL command,CSORDINAL command,CSORDINAL command
PREDVALPROB (keyword),PREDVALPROB (keyword),PREDVALPROB (keyword)
CSORDINAL command,CSORDINAL command,CSORDINAL command
OBSVALPROB (keyword),OBSVALPROB (keyword),OBSVALPROB (keyword)
CSORDINAL command,CSORDINAL command,CSORDINAL command
CUMPROB (rootname:n)
 | Cumulative probability. The user-specified or default name is treated as the root name, and a suffix is added to get new unique variable names. The root name can be followed by a colon and a positive integer giving the number of predicted cumulative probabilities to save. The predicted cumulative probabilities of the first n response categories are saved. One cumulative predicted probability variable can be saved for each category of the dependent variable. The default root name is CumulativeProbability. The default n is 25. To specify n without a root name, enter a colon before the number.
PREDPROB (rootname:n)
 | Predicted probability. The user-specified or default name is treated as the root name, and a suffix is added to get new unique variable names. The root name can be followed by a colon and a positive integer giving the number of predicted probabilities to save. The predicted probabilities of the first n response categories are saved. One predicted probability variable can be saved for each category of the dependent variable. The default root name is PredictedProbability. The default n is 25. To specify n without a root name, enter a colon before the number.
PREDVAL (varname)
 | Predicted value. The class or value predicted by the model. The optional variable name must be unique. If the default name is used and it conflicts with existing variable names, then a suffix is added to the default name to make it unique. The default variable name is PredictedValue.
PREDVALPROB (varname)
 | Predicted value probability. The probability of value predicted by the model. This probability is the maximum probability predicted by the model for a given case. The optional variable name must be unique. If the default name is used and it conflicts with existing variable names, then a suffix is added to the default name to make it unique. The default variable name is PredictedValueProbability.
OBSVALPROB (varname)
 | Observed value probability. The probability predicted for the observed response value. The optional variable name must be unique. If the default name is used and it conflicts with existing variable names, then a suffix is added to the default name to make it unique. The default variable name is ObservedValueProbability.

Related Topics

CSORDINAL
Overview (CSORDINAL command)
Examples (CSORDINAL command)
Variable List (CSORDINAL command)
PLAN Subcommand (CSORDINAL command)
JOINTPROB Subcommand (CSORDINAL command)
MODEL Subcommand (CSORDINAL command)
LINK Subcommand (CSORDINAL command)
CUSTOM Subcommand (CSORDINAL command)
ODDSRATIOS Subcommand (CSORDINAL command)
CRITERIA Subcommand (CSORDINAL command)
STATISTICS Subcommand (CSORDINAL command)
NONPARALLEL Subcommand (CSORDINAL command)
TEST Subcommand (CSORDINAL command)
DOMAIN Subcommand (CSORDINAL command)
MISSING Subcommand (CSORDINAL command)
PRINT Subcommand (CSORDINAL command)
OUTFILE Subcommand (CSORDINAL command)


OUTFILE Subcommand (CSORDINAL command)

CSORDINAL (command),CSORDINAL (command),CSORDINAL (command)
OUTFILE subcommand,OUTFILE subcommand,OUTFILE subcommand
OUTFILE (subcommand),OUTFILE (subcommand),OUTFILE (subcommand)
CSORDINAL command,CSORDINAL command,CSORDINAL command

The OUTFILE subcommand saves an external PASW Statistics data file or previously declared dataset containing the parameter covariance or correlation matrix with parameter estimates, standard errors, significance values, and sampling design degrees of freedom. It also saves the parameter estimates and the parameter covariance matrix in XML format.

• At least one keyword and a filename are required.

• The COVB and CORB keywords are mutually exclusive, as are the MODEL and PARAMETER keywords.

• The filename must be specified in full. CSORDINAL does not supply an extension.

COVB (keyword),COVB (keyword),COVB (keyword)
CSORDINAL command,CSORDINAL command,CSORDINAL command
CORB (keyword),CORB (keyword),CORB (keyword)
CSORDINAL command,CSORDINAL command,CSORDINAL command
MODEL (keyword),MODEL (keyword),MODEL (keyword)
CSORDINAL command,CSORDINAL command,CSORDINAL command
PARAMETER (keyword),PARAMETER (keyword),PARAMETER (keyword)
CSORDINAL command,CSORDINAL command,CSORDINAL command
COVB = 'savfile' | 'dataset'
 | Writes the parameter covariance matrix and other statistics to an external PASW Statistics data file or previously declared dataset.
CORB = 'savfile' | 'dataset'
 | Writes the parameter correlation matrix and other statistics to an external PASW Statistics data file or previously declared dataset.
MODEL = 'file'
 | Writes the parameter estimates and the parameter covariance matrix to an XML file.
PARAMETER = 'file'
 | Writes the parameter estimates to an XML file.

Related Topics

CSORDINAL
Overview (CSORDINAL command)
Examples (CSORDINAL command)
Variable List (CSORDINAL command)
PLAN Subcommand (CSORDINAL command)
JOINTPROB Subcommand (CSORDINAL command)
MODEL Subcommand (CSORDINAL command)
LINK Subcommand (CSORDINAL command)
CUSTOM Subcommand (CSORDINAL command)
ODDSRATIOS Subcommand (CSORDINAL command)
CRITERIA Subcommand (CSORDINAL command)
STATISTICS Subcommand (CSORDINAL command)
NONPARALLEL Subcommand (CSORDINAL command)
TEST Subcommand (CSORDINAL command)
DOMAIN Subcommand (CSORDINAL command)
MISSING Subcommand (CSORDINAL command)
PRINT Subcommand (CSORDINAL command)
SAVE Subcommand (CSORDINAL command)


CSPLAN

CSPLAN (command),CSPLAN (command),CSPLAN (command)
CSPLAN (command),CSPLAN (command),CSPLAN (command)
syntax chart,syntax chart,syntax chart

CSPLAN is available in the Complex Samples option.

CSPLAN SAMPLE

/PLAN FILE=file

[/PLANVARS  [SAMPLEWEIGHT=varname]]
            [PREVIOUSWEIGHT=varname]

[/PRINT [PLAN**] [MATRIX]]

Design Block: Stage 1

/DESIGN [STAGELABEL='label']
        [STRATA=varname [varname [...] ] ]
        [CLUSTER=varname [varname [...] ] ]

/METHOD TYPE={SIMPLE_WOR       }    [ESTIMATION={DEFAULT**}]
             {SIMPLE_WR        }                {WR       }
             {SIMPLE_SYSTEMATIC}
             {SIMPLE_CHROMY    }
             {PPS_WOR          }
             {PPS_WR           }
             {PPS_SYSTEMATIC   }
             {PPS_BREWER       }
             {PPS_MURTHY       }
             {PPS_SAMPFORD     }
             {PPS_CHROMY       }

[/MOS     {VARIABLE=varname} [MIN=value]  [MAX=value] ]
          {SOURCE=FROMDATA }

[/SIZE {VALUE=sizevalue                                                       }]
       {VARIABLE=varname                                                      }
       {MATRIX=varname [varname [...] ]; catlist value [;catlist value [;...]]}

[/RATE {VALUE=ratevalue                                                       }]
       {VARIABLE=varname                                                      }
       {MATRIX=varname [varname [...] ]; catlist value [;catlist value [;...]]}
       [MINSIZE=value]
       [MAXSIZE=value]

[/STAGEVARS  [INCLPROB[(varname)]]]
             [CUMWEIGHT[varname)]]
             [INDEX[(varname)]]
             [POPSIZE[(varname)]]
             [SAMPSIZE[(varname)]]
             [RATE[(varname)]]
             [WEIGHT[(varname)]]

Design Block: Stages 2 and 3

/DESIGN [STAGELABEL='label']
        [STRATA=varname [varname [...] ] ]
        [CLUSTER=varname [varname [...] ] ]

/METHOD TYPE={SIMPLE_WOR       }
             {SIMPLE_WR        }
             {SIMPLE_SYSTEMATIC}
             {SIMPLE_CHROMY    }

[/SIZE {VALUE=sizevalue                                                       }]
       {VARIABLE=varname                                                      }
       {MATRIX=varname [varname [...] ]; catlist value [;catlist value [;...]]}

[/RATE {VALUE=ratevalue                                                       }]
       {VARIABLE=varname                                                      }
       {MATRIX=varname [varname [...] ]; catlist value [;catlist value [;...]]}
       [MINSIZE=value]
       [MAXSIZE=value]

[/STAGEVARS  [INCLPROB[(varname)]]]
             [CUMWEIGHT[varname)]]
             [INDEX[(varname)]]
             [POPSIZE[(varname)]]
             [SAMPSIZE[(varname)]]
             [RATE[(varname)]]
             [WEIGHT[(varname)]]

Create an Analysis Design

CSPLAN ANALYSIS

/PLAN FILE=file

/PLANVARS ANALYSISWEIGHT=varname

[/SRSESTIMATOR TYPE={WOR**}]
                    {WR   }

[/PRINT [PLAN**] [MATRIX]]

Design Block: Stage 1

/DESIGN [STAGELABEL='label']
        [STRATA=varname [varname [...] ] ]
        [CLUSTER=varname [varname [...] ] ]

/ESTIMATOR TYPE= {EQUAL_WOR  }
                 {UNEQUAL_WOR}
                 {WR         }

[/POPSIZE {VALUE=sizevalue                                                       }]
          {VARIABLE=varname                                                      }
          {MATRIX=varname [varname [...] ]; catlist value [;catlist value [;...]]}

[/INCLPROB {VALUE=probvalue                                                     }]
           {VARIABLE=varname                                                    }
           {MATRIX=varname [varname [...]]; catlist value [;catlist value[;...]]}

Design Block: Stages 2 and 3

/DESIGN [STAGELABEL='label']
        [STRATA=varname [varname [...] ] ]
        [CLUSTER=varname [varname [...] ] ]

/ESTIMATOR TYPE= {EQUAL_WOR}
                 {WR       }

[/POPSIZE {VALUE=sizevalue                                                      }]
          {VARIABLE=varname                                                     }
          {MATRIX=varname [varname [...]]; catlist value [;catlist value [;...]]}

[/INCLPROB {VALUE=probvalue                                                     }]
           {VARIABLE=varname                                                    }
           {MATRIX=varname [varname [...]]; catlist value [;catlist value[;...]]}

Display an Existing Plan

CSPLAN VIEW

/PLAN FILE=file

[/PRINT [PLAN**] [MATRIX]]

** Default if the subcommand is omitted.

This command takes effect immediately. It does not read the active dataset or execute pending transformations. See the topic Command Order for more information.

Syntax for the CSPLAN command can be generated from the Sampling Wizard. Syntax for the CSPLAN command can be generated from the Analysis Preparation Wizard.

Example

CSPLAN  SAMPLE
  /PLAN FILE= '/survey/myfile.csplan'
  /DESIGN STRATA=region CLUSTER=school
  /METHOD TYPE=PPS_WOR
  /MOS VARIABLE=mysizevar
  /SIZE VALUE=100.

CSPLAN  ANALYSIS
  /PLAN FILE= '/survey/myfile.csaplan'
  /PLANVARS ANALYSISWEIGHT=sampleweight
  /DESIGN CLUSTER=district
  /ESTIMATOR TYPE=UNEQUAL_WOR
  /DESIGN CLUSTER=school
  /ESTIMATOR TYPE=EQUAL_WOR
  /INCLPROB VARIABLE=sprob.

CSPLAN  VIEW
  /PLAN FILE= '/survey/myfile.csplan'.

Related Topics

Overview (CSPLAN command)
Examples (CSPLAN command)
CSPLAN Command (CSPLAN command)
PLAN Subcommand (CSPLAN command)
PLANVARS Subcommand (CSPLAN command)
SRSESTIMATOR Subcommand (CSPLAN command)
PRINT Subcommand (CSPLAN command)
DESIGN Subcommand (CSPLAN command)
METHOD Subcommand (CSPLAN command)
SIZE Subcommand (CSPLAN command)
RATE Subcommand (CSPLAN command)
MOS Subcommand (CSPLAN command)
STAGEVARS Subcommand (CSPLAN command)
ESTIMATOR Subcommand (CSPLAN command)
POPSIZE Subcommand (CSPLAN command)
INCLPROB Subcommand (CSPLAN command)


Overview (CSPLAN command)

CSPLAN creates a complex sample design or analysis specification that is used by companion procedures in the Complex Samples option. CSSELECT uses specifications from a plan file when selecting cases from the active file. Analysis procedures in the Complex Samples option, such as CSDESCRIPTIVES, require a plan file in order to produce summary statistics for a complex sample. You can also use CSPLAN to view sample or analysis specifications within an existing plan file.

The CSPLAN design specification is used only by procedures in the Complex Samples option.

Options Collapse Hide details

Options

Design Specification. CSPLAN writes a sample or analysis design to a file. A sample design can be used to extract sampling units from the active file. An analysis design is used to analyze a complex sample. When a sample design is created, the procedure automatically saves an appropriate analysis design to the plan file. Thus, a plan file created for designing a sample can be used for both sample selection and analysis.

Both sample and analysis designs can specify stratification, or independent sampling within nonoverlapping groups, as well as cluster sampling, in which groups of sampling units are selected. A single or multistage design can be specified with a maximum of three stages.

CSPLAN does not actually execute the plan (that is, it does not extract the sample or analyze data). To sample cases, use a sample design created by CSPLAN as input to CSSELECT. To analyze sample data, use an analysis design created by CSPLAN as input to Complex Samples procedures, such as CSDESCRIPTIVES.

Sample Design. A variety of equal- and unequal-probability methods are available for sample selection, including simple and systematic random sampling. CSPLAN offers several methods for sampling with probability proportionate to size (PPS), including Brewer's method, Murthy's method, and Sampford's method. Units can be drawn with replacement (WR) or without replacement (WOR) from the population. At each stage of the design, you can control the number or percentage of units to be drawn. You can also choose output variables, such as stagewise sampling weights, that are created when the sample design is executed.

Analysis Design. The following estimation methods are available: with replacement, equal probability without replacement, and unequal probability without replacement. Unequal probability estimation without replacement can be requested in the first stage only. You can specify variables to be used as input to the estimation process, such as overall sample weights and inclusion probabilities.

Operations Collapse Hide details

Operations

• If a sample design is created, the procedure automatically writes a suitable analysis design to the plan file. The default analysis design specifies stratification variables and cluster variables for each stage, as well as an estimation method appropriate for the chosen extraction method.

• CSPLAN writes design specifications in XML format.

• By default, CSPLAN displays output that summarizes the sample or analysis design.

Subcommand Order Collapse Hide details

Subcommand Order

• The first DESIGN subcommand must precede all other subcommands except PLAN, PLANVARS, and PRINT.

• PLAN, PLANVARS, and PRINT subcommands can be used in any order.

Limitations Collapse Hide details

Limitations

• A maximum of three design blocks can be specified.

• CSPLAN ignores SPLIT FILE and WEIGHT commands with a warning.

Related Topics

CSPLAN
Examples (CSPLAN command)
CSPLAN Command (CSPLAN command)
PLAN Subcommand (CSPLAN command)
PLANVARS Subcommand (CSPLAN command)
SRSESTIMATOR Subcommand (CSPLAN command)
PRINT Subcommand (CSPLAN command)
DESIGN Subcommand (CSPLAN command)
METHOD Subcommand (CSPLAN command)
SIZE Subcommand (CSPLAN command)
RATE Subcommand (CSPLAN command)
MOS Subcommand (CSPLAN command)
STAGEVARS Subcommand (CSPLAN command)
ESTIMATOR Subcommand (CSPLAN command)
POPSIZE Subcommand (CSPLAN command)
INCLPROB Subcommand (CSPLAN command)
Basic Specification (CSPLAN command)
Syntax Rules (CSPLAN command)


Basic Specification (CSPLAN command)

You can specify a sample or analysis design to be created or a plan file to be displayed.

Creating a Sample Plan

• The SAMPLE keyword must be specified on the CSPLAN command.

• A PLAN subcommand is required that specifies a file that will contain the design specification.

• A DESIGN subcommand is required.

• A METHOD subcommand must specify an extraction method.

• Sample size or rate must be specified unless the PPS_MURTHY or PPS_BREWER extraction method is chosen.

Creating an Analysis Plan

• The ANALYSIS keyword must be specified on the CSPLAN command.

• A PLAN subcommand is required that specifies a file that will contain the analysis specification.

• A PLANVARS subcommand is required that specifies a sample weight variable.

• A DESIGN subcommand is required.

• An ESTIMATOR subcommand must specify an estimator.

• The POPSIZE or INCLPROB subcommand must be specified if the EQUAL_WOR estimator is selected.

Displaying an Existing Plan

• The VIEW keyword must be specified on the CSPLAN command.

• A PLAN subcommand is required that specifies a file whose specifications are to be displayed.

Related Topics

Overview (CSPLAN command)
Syntax Rules (CSPLAN command)


Syntax Rules (CSPLAN command)

General

• PLAN, PLANVARS, and PRINT are global. Only a single instance of each global subcommand is allowed.

• Within a subcommand, an error occurs if a keyword or attribute is specified more than once.

• Equals signs shown in the syntax chart are required.

• Subcommand names and keywords (for example, PPS_WR) must be spelled in full.

• In general, empty subcommands (that is, those that have no specifications) generate an error. DESIGN is the only subcommand that can be empty.

• Any variable names that are specified must be valid PASW Statistics variable names.

Creating a Plan

• Stages are specified in design blocks. The DESIGN subcommand signals the start of a block. The first block corresponds to stage 1, the second to stage 2, and the third to stage 3. One DESIGN subcommand must be specified per stage.

• The following subcommands are local and apply to the immediately preceding DESIGN subcommand: METHOD, MOS, SIZE, RATE, STAGEVARS, ESTIMATOR, POPSIZE, and INCLPROB. An error occurs if any of these subcommands appears more than once within a block.

• Available METHOD and ESTIMATOR options depend on the stage.

• The following subcommands are honored only if a sample design is requested: METHOD, MOS, SIZE, RATE, and STAGEVARS. An error occurs if any of these subcommands is specified for an analysis design.

• MOS can be specified in stage 1 only.

• The following subcommands can be used only if an analysis design is requested: ESTIMATOR, POPSIZE, and INCLPROB. An error occurs if any of these subcommands is specified for a sample design.

• In general, each variable specified in the design can assume only one role. For example, a weight variable cannot be used as a stratification or cluster variable. Exceptions are listed below.

Displaying a Plan

• If CSPLAN VIEW is used, only the PLAN and PRINT subcommands can be specified.

Related Topics

Overview (CSPLAN command)
Basic Specification (CSPLAN command)


Examples (CSPLAN command)

Simple Sample Design

CSPLAN SAMPLE
  /PLAN FILE='/survey/myfile.csplan'
  /DESIGN
  /METHOD TYPE=SIMPLE_WOR
  /SIZE VALUE=100.

• A single-stage sample design is created that is saved in myfile.csplan.

• One hundred cases will be selected from the active file when the sample design is executed by the CSSELECT procedure.

• The extraction method is simple random sampling without replacement.

• The plan file also includes a default analysis design that uses the EQUAL_WOR estimator (the default when units are extracted using the SIMPLE_WOR method).

Stratified Sample Design

CSPLAN SAMPLE
  /PLAN FILE='/survey/myfile.csplan'
  /DESIGN STRATA=region
  /METHOD TYPE=SIMPLE_WOR
  /RATE MATRIX=REGION; 'East' 0.1 ; 'West' 0.2;
                       'North' 0.1; 'South' 0.3.

• A stratified sample design is specified with disproportionate sampling rates for the strata. Sample elements will be drawn independently within each region.

• The extraction method is simple random sampling without replacement.

• CSPLAN generates a default analysis design using region as a stratification variable and the EQUAL_WOR estimator.

Stratified Cluster Sample Design

CSPLAN SAMPLE
  /PLAN FILE='/survey/myfile.csplan'
  /DESIGN STRATA=region CLUSTER=school
  /METHOD TYPE=PPS_WOR
  /SIZE VALUE=10
  /MOS VARIABLE=mysizevar.

• A stratified cluster sample design is specified.

• Ten schools will be selected within each region with probability proportionate to size.

• Size values for the strata are read from mysizevar.

• CSPLAN generates a default analysis design using region as a stratification variable and school as a cluster variable.

• The UNEQUAL_WOR estimator will be used for analysis. UNEQUAL_WOR is the default when units are sampled with probability proportionate to size.

Multistage Cluster Sample Design

CSPLAN SAMPLE
  /PLAN FILE='/survey/myfile.csplan'
  /DESIGN STAGELABEL='school districts' CLUSTER=district
  /METHOD TYPE=PPS_WOR
  /RATE VALUE=.2
  /MOS VARIABLE=districtsize
  /DESIGN STAGELABEL='schools' CLUSTER=school
  /METHOD TYPE=SIMPLE_WOR
  /RATE VALUE=0.3.

• A multistage cluster sample design is specified.

• Twenty percent of school districts will be drawn with probability proportionate to size.

• Within each selected school district, 30% of schools will be drawn without replacement.

• CSPLAN generates a default analysis design. Since the PPS_WOR sampling method is specified in stage 1, the UNEQUAL_WOR estimator will be used for analysis for that stage. The EQUAL_WOR method will be used to analyze stage 2.

Simple Analysis Design

CSPLAN ANALYSIS
  /PLAN FILE='/survey/myfile.csaplan'
  /PLANVARS ANALYSISWEIGHT=sampleweight
  /DESIGN
  /ESTIMATOR TYPE=EQUAL_WOR
  /POPSIZE VALUE=5000.

• An analysis design is specified.

• The variable sampleweight is specified as the variable containing sample weights for analysis.

• The EQUAL_WOR estimator will be used for analysis.

• POPSIZE specifies that the sample was drawn from a population of 5,000.

Simple Analysis Design

CSPLAN ANALYSIS
  /PLAN FILE='/survey/myfile.csaplan'
  /PLANVARS ANALYSISWEIGHT=sampleweight
  /DESIGN
  /ESTIMATOR TYPE=EQUAL_WOR
  /INCLPROB VALUE=0.10.

• An analysis design is specified.

• The variable sampleweight is specified as the variable containing sample weights for analysis.

• The EQUAL_WOR estimator will be used for analysis.

• INCLPROB specifies that 10% of population units were selected for inclusion in the sample.

Stratified Analysis Design

CSPLAN ANALYSIS
  /PLAN FILE='/survey/myfile.csaplan'
  /PLANVARS ANALYSISWEIGHT=sampleweight
  /DESIGN STRATA=region
  /ESTIMATOR TYPE=EQUAL_WOR
  /INCLPROB MATRIX=REGION; 'East' 0.1; 'West' 0.2;
                           'North' 0.1; 'South' 0.3.

• The analysis design specifies that the sample is stratified by region.

• Inclusion probabilities are specified for each stratum.

• The variable sampleweight is specified as the variable containing sample weights for analysis.

Stratified Clustering Analysis Design

CSPLAN ANALYSIS
  /PLAN FILE='/survey/myfile.csaplan'
  /PLANVARS ANALYSISWEIGHT=sampleweight
  /DESIGN STRATA=district CLUSTER=school
  /ESTIMATOR TYPE=UNEQUAL_WOR.

• The analysis design specifies that units were sampled using stratified clustering.

• The variable sampleweight is specified as the variable containing sample weights for analysis.

• District is defined as a stratification variable and school is defined as a cluster variable.

• The UNEQUAL_WOR estimator will be used for analysis.

Multistage Analysis Design

CSPLAN ANALYSIS
  /PLAN FILE='/survey/myfile.csaplan'
  /PLANVARS ANALYSISWEIGHT=sampleweight
  /DESIGN CLUSTER=district
  /ESTIMATOR TYPE=UNEQUAL_WOR
  /DESIGN CLUSTER=school
  /ESTIMATOR TYPE=EQUAL_WOR
  /INCLPROB VARIABLE=sprob.

• The analysis design specifies that cases were sampled using multistage clustering. Schools were sampled within districts.

• The UNEQUAL_WOR estimator will be used in stage 1.

• The EQUAL_WOR estimator will be used in stage 2.

• The variable sprob contains inclusion probabilities, which are required for analysis of the second stage.

• The variable sampleweight is specified as the variable containing sample weights for analysis.

Display Plan

CSPLAN  VIEW
  /PLAN FILE='/survey/myfile.csplan'.

• The syntax displays the specifications in the plan file myfile.csplan.

Related Topics

CSPLAN
Overview (CSPLAN command)
CSPLAN Command (CSPLAN command)
PLAN Subcommand (CSPLAN command)
PLANVARS Subcommand (CSPLAN command)
SRSESTIMATOR Subcommand (CSPLAN command)
PRINT Subcommand (CSPLAN command)
DESIGN Subcommand (CSPLAN command)
METHOD Subcommand (CSPLAN command)
SIZE Subcommand (CSPLAN command)
RATE Subcommand (CSPLAN command)
MOS Subcommand (CSPLAN command)
STAGEVARS Subcommand (CSPLAN command)
ESTIMATOR Subcommand (CSPLAN command)
POPSIZE Subcommand (CSPLAN command)
INCLPROB Subcommand (CSPLAN command)


CSPLAN Command (CSPLAN command)

CSPLAN creates a complex sample design or analysis specification.

SAMPLE (keyword),SAMPLE (keyword),SAMPLE (keyword)
CSPLAN command,CSPLAN command,CSPLAN command
ANALYSIS (keyword),ANALYSIS (keyword),ANALYSIS (keyword)
CSPLAN command,CSPLAN command,CSPLAN command
VIEW (keyword),VIEW (keyword),VIEW (keyword)
CSPLAN command,CSPLAN command,CSPLAN command
SAMPLE | Creates a sample design.
ANALYSIS | Creates an analysis design.
VIEW | Displays a sample or analysis design.

Related Topics

CSPLAN
Overview (CSPLAN command)
Examples (CSPLAN command)
PLAN Subcommand (CSPLAN command)
PLANVARS Subcommand (CSPLAN command)
SRSESTIMATOR Subcommand (CSPLAN command)
PRINT Subcommand (CSPLAN command)
DESIGN Subcommand (CSPLAN command)
METHOD Subcommand (CSPLAN command)
SIZE Subcommand (CSPLAN command)
RATE Subcommand (CSPLAN command)
MOS Subcommand (CSPLAN command)
STAGEVARS Subcommand (CSPLAN command)
ESTIMATOR Subcommand (CSPLAN command)
POPSIZE Subcommand (CSPLAN command)
INCLPROB Subcommand (CSPLAN command)


PLAN Subcommand (CSPLAN command)

PLAN (subcommand),PLAN (subcommand),PLAN (subcommand)
CSPLAN command,CSPLAN command,CSPLAN command
CSPLAN (command),CSPLAN (command),CSPLAN (command)
PLAN subcommand,PLAN subcommand,PLAN subcommand

The PLAN subcommand specifies the name of a design file to be written or displayed by CSPLAN. The file contains sample and/or analysis design specifications.

FILE (keyword),FILE (keyword),FILE (keyword)
CSPLAN command,CSPLAN command,CSPLAN command
FILE Sampling design file. Specify the filename in full. If you are creating a plan and the file already exists, it is overwritten without warning.

Related Topics

CSPLAN
Overview (CSPLAN command)
Examples (CSPLAN command)
CSPLAN Command (CSPLAN command)
PLANVARS Subcommand (CSPLAN command)
SRSESTIMATOR Subcommand (CSPLAN command)
PRINT Subcommand (CSPLAN command)
DESIGN Subcommand (CSPLAN command)
METHOD Subcommand (CSPLAN command)
SIZE Subcommand (CSPLAN command)
RATE Subcommand (CSPLAN command)
MOS Subcommand (CSPLAN command)
STAGEVARS Subcommand (CSPLAN command)
ESTIMATOR Subcommand (CSPLAN command)
POPSIZE Subcommand (CSPLAN command)
INCLPROB Subcommand (CSPLAN command)


PLANVARS Subcommand (CSPLAN command)

PLANVARS (subcommand),PLANVARS (subcommand),PLANVARS (subcommand)
CSPLAN command,CSPLAN command,CSPLAN command
CSPLAN (command),CSPLAN (command),CSPLAN (command)
PLANVARS subcommand,PLANVARS subcommand,PLANVARS subcommand

PLANVARS is used to name planwise variables to be created when a sample is extracted or used as input to the selection or estimation process.

ANALYSISWEIGHT (keyword),ANALYSISWEIGHT (keyword),ANALYSISWEIGHT (keyword)
CSPLAN command,CSPLAN command,CSPLAN command
SAMPLEWEIGHT (keyword),SAMPLEWEIGHT (keyword),SAMPLEWEIGHT (keyword)
CSPLAN command,CSPLAN command,CSPLAN command
PERVIOUSWEIGHT (keyword),PERVIOUSWEIGHT (keyword),PERVIOUSWEIGHT (keyword)
CSPLAN command,CSPLAN command,CSPLAN command
ANALYSISWEIGHT | Final sample weights for each unit to be used by Complex Samples analysis procedures in the estimation process. ANALYSISWEIGHT is required if an analysis design is specified. It is ignored with a warning if a sample design is specified.
SAMPLEWEIGHT | Overall sample weights that will be generated when the sample design is executed using CSSELECT. A final sampling weight is created automatically when the sample plan is executed.
SAMPLEWEIGHT is honored only if a sampling design is specified. It is ignored with a warning if an analysis design is specified.
Sample weights are positive for selected units. They take into account all stages of the design as well as previous sampling weights if specified.
If SAMPLEWEIGHT is not specified, a default name (SampleWeight_Final_) is used for the sample weight variable.
PREVIOUSWEIGHT | Weights to be used in computing final sampling weights in a multistage design. PREVIOUSWEIGHT is honored only if a sampling design is specified. It is ignored with a warning if an analysis design is specified.
Typically, the previous weight variable is produced in an earlier stage of a stage-by-stage sample selection process. CSSELECT multiplies previous weights with those for the current stage to obtain final sampling weights.
For example, suppose that you want to sample individuals within cities but only city data are available at the outset of the study. For the first stage of extraction, a design plan is created that specifies that 10 cities are to be sampled from the active file. The PLANVARS subcommand specifies that sampling weights are to be saved under the name CityWeights:
CSPLAN SAMPLE
  /PLAN FILE='/survey/city.csplan'
  /PLANVARS SAMPLEWEIGHT=CityWeights
  /DESIGN CLUSTER=city
  /METHOD TYPE=PPS_WOR
  /MOS VARIABLE=SizeVar
  /SIZE VALUE=10.
This plan would be executed using CSSELECT on an active file in which each case is a city.
For the next stage of extraction, a design plan is created that specifies that 50 individuals are to be sampled within cities. The design uses the PREVIOUSWEIGHT keyword to specify that sample weights generated in the first stage are to be used when computing final sampling weights for selected individuals. Final weights are saved to the variable FinalWeights.
CSPLAN SAMPLE
  /PLAN FILE='/survey/individuals.csplan'
  /PLANVARS PREVIOUSWEIGHT=CityWeights
            SAMPLEWEIGHT=FinalWeights
  /DESIGN STRATA=city
  /METHOD TYPE=SIMPLE_WOR
  /SIZE VALUE=50.
The plan for stage 2 would be executed using CSSELECT on an active file in which cases represent individuals and both city and CityWeights are recorded for each individual. Note that city is identified as a stratification variable in this stage, so individuals are sampled within cities.

Related Topics

CSPLAN
Overview (CSPLAN command)
Examples (CSPLAN command)
CSPLAN Command (CSPLAN command)
PLAN Subcommand (CSPLAN command)
SRSESTIMATOR Subcommand (CSPLAN command)
PRINT Subcommand (CSPLAN command)
DESIGN Subcommand (CSPLAN command)
METHOD Subcommand (CSPLAN command)
SIZE Subcommand (CSPLAN command)
RATE Subcommand (CSPLAN command)
MOS Subcommand (CSPLAN command)
STAGEVARS Subcommand (CSPLAN command)
ESTIMATOR Subcommand (CSPLAN command)
POPSIZE Subcommand (CSPLAN command)
INCLPROB Subcommand (CSPLAN command)


SRSESTIMATOR Subcommand (CSPLAN command)

SRSESTIMATOR (subcommand),SRSESTIMATOR (subcommand),SRSESTIMATOR (subcommand)
CSPLAN command,CSPLAN command,CSPLAN command
CSPLAN (command),CSPLAN (command),CSPLAN (command)
SRSESTIMATOR subcommand,SRSESTIMATOR subcommand,SRSESTIMATOR subcommand

The SRSESTIMATOR subcommand specifies the variance estimator used under the simple random sampling assumption. This estimate is needed, for example, in computation of design effects in Complex Samples analysis procedures.

WOR (keyword),WOR (keyword),WOR (keyword)
CSPLAN command,CSPLAN command,CSPLAN command
WR (keyword),WR (keyword),WR (keyword)
CSPLAN command,CSPLAN command,CSPLAN command
WOR | SRS variance estimator includes the finite population correction. This estimator is the default.
WR | SRS variance estimator does not include the finite population correction. This estimator is recommended when the analysis weights have been scaled so that they do not add up to the population size.

Related Topics

CSPLAN
Overview (CSPLAN command)
Examples (CSPLAN command)
CSPLAN Command (CSPLAN command)
PLAN Subcommand (CSPLAN command)
PLANVARS Subcommand (CSPLAN command)
PRINT Subcommand (CSPLAN command)
DESIGN Subcommand (CSPLAN command)
METHOD Subcommand (CSPLAN command)
SIZE Subcommand (CSPLAN command)
RATE Subcommand (CSPLAN command)
MOS Subcommand (CSPLAN command)
STAGEVARS Subcommand (CSPLAN command)
ESTIMATOR Subcommand (CSPLAN command)
POPSIZE Subcommand (CSPLAN command)
INCLPROB Subcommand (CSPLAN command)


PRINT Subcommand (CSPLAN command)

PRINT (subcommand),PRINT (subcommand),PRINT (subcommand)
CSPLAN command,CSPLAN command,CSPLAN command
CSPLAN (command),CSPLAN (command),CSPLAN (command)
PRINT subcommand,PRINT subcommand,PRINT subcommand
PLAN (keyword),PLAN (keyword),PLAN (keyword)
CSPLAN command,CSPLAN command,CSPLAN command
MATRIX (keyword),MATRIX (keyword),MATRIX (keyword)
CSPLAN command,CSPLAN command,CSPLAN command
PLAN | Displays a summary of plan specifications. The output reflects your specifications at each stage of the design. The plan is shown by default. The PRINT subcommand is used to control output from CSPLAN.
MATRIX | Displays a table of MATRIX specifications. MATRIX is ignored if you do not use the MATRIX form of the SIZE, RATE, POPSIZE, or INCLPROB subcommand. By default, the table is not shown.

Related Topics

CSPLAN
Overview (CSPLAN command)
Examples (CSPLAN command)
CSPLAN Command (CSPLAN command)
PLAN Subcommand (CSPLAN command)
PLANVARS Subcommand (CSPLAN command)
SRSESTIMATOR Subcommand (CSPLAN command)
DESIGN Subcommand (CSPLAN command)
METHOD Subcommand (CSPLAN command)
SIZE Subcommand (CSPLAN command)
RATE Subcommand (CSPLAN command)
MOS Subcommand (CSPLAN command)
STAGEVARS Subcommand (CSPLAN command)
ESTIMATOR Subcommand (CSPLAN command)
POPSIZE Subcommand (CSPLAN command)
INCLPROB Subcommand (CSPLAN command)


DESIGN Subcommand (CSPLAN command)

DESIGN (subcommand),DESIGN (subcommand),DESIGN (subcommand)
CSPLAN command,CSPLAN command,CSPLAN command
CSPLAN (command),CSPLAN (command),CSPLAN (command)
DESIGN subcommand,DESIGN subcommand,DESIGN subcommand

The DESIGN subcommand signals a stage of the design. It also can be used to define stratification variables, cluster variables, or a descriptive label for a particular stage.

Related Topics

CSPLAN
Overview (CSPLAN command)
Examples (CSPLAN command)
CSPLAN Command (CSPLAN command)
PLAN Subcommand (CSPLAN command)
PLANVARS Subcommand (CSPLAN command)
SRSESTIMATOR Subcommand (CSPLAN command)
PRINT Subcommand (CSPLAN command)
METHOD Subcommand (CSPLAN command)
SIZE Subcommand (CSPLAN command)
RATE Subcommand (CSPLAN command)
MOS Subcommand (CSPLAN command)
STAGEVARS Subcommand (CSPLAN command)
ESTIMATOR Subcommand (CSPLAN command)
POPSIZE Subcommand (CSPLAN command)
INCLPROB Subcommand (CSPLAN command)
STAGELABEL Keyword (CSPLAN command)
STRATA Keyword (CSPLAN command)
CLUSTER Keyword (CSPLAN command)


STAGELABEL Keyword (CSPLAN command)

STAGELABEL allows a descriptive label to be entered for the stage that appears in Complex Samples procedure output.

'Label' Descriptive stage label. The label must be specified within quotes. If a label is not provided, a default label is generated that indicates the stage number.

Related Topics

DESIGN Subcommand (CSPLAN command)
STRATA Keyword (CSPLAN command)
CLUSTER Keyword (CSPLAN command)


STRATA Keyword (CSPLAN command)

STRATA is used to identify stratification variables whose values represent nonoverlapping subgroups. Stratification is typically done to decrease sampling variation and/or to ensure adequate representation of small groups in a sample.

If STRATA is used, CSSELECT draws samples independently within each stratum. For example, if region is a stratification variable, separate samples are drawn for each region (for example, East, West, North, and South). If multiple STRATA variables are specified, sampling is performed within each combination of strata.

varlist Stratification variables.

Related Topics

DESIGN Subcommand (CSPLAN command)
STAGELABEL Keyword (CSPLAN command)
CLUSTER Keyword (CSPLAN command)


CLUSTER Keyword (CSPLAN command)

CLUSTER is used to sample groups of sampling units, such as states, counties, or school districts. Cluster sampling is often performed to reduce travel and/or interview costs in social surveys. For example, if census tracts are sampled within a particular city and each interviewer works within a particular tract, he or she would be able to conduct interviews within a small area, thus minimizing time and travel expenses.

• If CLUSTER is used, CSSELECT samples from values of the cluster variable as opposed to sampling elements (cases).

• If two or more cluster variables are specified, samples are drawn from among all combinations of values of the variables.

• CLUSTER is required for nonfinal stages of a sample or analysis plan.

• CLUSTER is required if any of the following sampling methods is specified: PPS_WOR, PPS_BREWER, PPS_MURTHY, or PPS_SAMPFORD.

• CLUSTER is required if the UNEQUAL_WOR estimator is specified.

varlist Cluster variables.

Related Topics

DESIGN Subcommand (CSPLAN command)
STAGELABEL Keyword (CSPLAN command)
STRATA Keyword (CSPLAN command)


METHOD Subcommand (CSPLAN command)

METHOD (subcommand),METHOD (subcommand),METHOD (subcommand)
CSPLAN command,CSPLAN command,CSPLAN command
CSPLAN (command),CSPLAN (command),CSPLAN (command)
METHOD subcommand,METHOD subcommand,METHOD subcommand

The METHOD subcommand specifies the sample extraction method. A variety of equal- and unequal-probability methods are available.

The following table lists extraction methods and their availability at each stage of the design. For details on each method, see the CSSELECT algorithms document.

• PPS methods are available only in stage 1. WR methods are available only in the final stage. Other methods are available in any stage.

• If a PPS method is chosen, a measure of size (MOS) must be specified.

• If the PPS_WOR, PPS_BREWER, PPS_SAMPFORD, or PPS_MURTHY method is selected, first-stage joint inclusion probabilities are written to an external file when the sample plan is executed. Joint probabilities are needed for UNEQUAL_WOR estimation by Complex Samples analysis procedures.

• By default, CSPLAN chooses an appropriate estimation method for the selected sampling method. If ESTIMATION=WR, Complex Samples analysis procedures use the WR (with replacement) estimator regardless of the sampling method.

SIMPLE_WOR (keyword),SIMPLE_WOR (keyword),SIMPLE_WOR (keyword)
CSPLAN command,CSPLAN command,CSPLAN command
SIMPLE_WR (keyword),SIMPLE_WR (keyword),SIMPLE_WR (keyword)
CSPLAN command,CSPLAN command,CSPLAN command
SIMPLE_SYSTEMATIC (keyword),SIMPLE_SYSTEMATIC (keyword),SIMPLE_SYSTEMATIC (keyword)
CSPLAN command,CSPLAN command,CSPLAN command
SIMPLE_CHROMY (keyword),SIMPLE_CHROMY (keyword),SIMPLE_CHROMY (keyword)
CSPLAN command,CSPLAN command,CSPLAN command
PPS_WOR (keyword),PPS_WOR (keyword),PPS_WOR (keyword)
CSPLAN command,CSPLAN command,CSPLAN command
PPS_WR (keyword),PPS_WR (keyword),PPS_WR (keyword)
CSPLAN command,CSPLAN command,CSPLAN command
PPS_SYSTEMATIC (keyword),PPS_SYSTEMATIC (keyword),PPS_SYSTEMATIC (keyword)
CSPLAN command,CSPLAN command,CSPLAN command
PPS_CHROMY (keyword),PPS_CHROMY (keyword),PPS_CHROMY (keyword)
CSPLAN command,CSPLAN command,CSPLAN command
PPS_BREWER (keyword),PPS_BREWER (keyword),PPS_BREWER (keyword)
CSPLAN command,CSPLAN command,CSPLAN command
PPS_MURTHY (keyword),PPS_MURTHY (keyword),PPS_MURTHY (keyword)
CSPLAN command,CSPLAN command,CSPLAN command
PPS_SAMPFORD (keyword),PPS_SAMPFORD (keyword),PPS_SAMPFORD (keyword)
CSPLAN command,CSPLAN command,CSPLAN command
Type | Description | Default estimator
SIMPLE_WOR | Selects units with equal probability. Units are extracted without replacement. | EQUAL_WOR
SIMPLE_WR | Selects units with equal probability. Units are extracted with replacement. | WR
SIMPLE_SYSTEMATIC | Selects units at a fixed interval throughout the sampling frame or stratum. A random starting point is chosen within the first interval. | WR
SIMPLE_CHROMY | Selects units sequentially with equal probability. Units are extracted without replacement. | WR
PPS_WOR | Selects units with probability proportional to size. Units are extracted without replacement. | UNEQUAL_WOR
PPS_WR | Selects units with probability proportional to size. Units are extracted with replacement. | WR
PPS_SYSTEMATIC | Selects units by systematic random sampling with probability proportional to size. Units are extracted without replacement. | WR
PPS_CHROMY | Selects units sequentially with probability proportional to size without replacement. | WR
PPS_BREWER | Selects two units from each stratum with probability proportional to size. Units are extracted without replacement. | UNEQUAL_WOR
PPS_MURTHY | Selects two units from each stratum with probability proportional to size. Units are extracted without replacement. | UNEQUAL_WOR
PPS_SAMPFORD | An extension of the Brewer's method that selects more than two units from each stratum with probability proportional to size. Units are extracted without replacement. | UNEQUAL_WOR

Related Topics

CSPLAN
Overview (CSPLAN command)
Examples (CSPLAN command)
CSPLAN Command (CSPLAN command)
PLAN Subcommand (CSPLAN command)
PLANVARS Subcommand (CSPLAN command)
SRSESTIMATOR Subcommand (CSPLAN command)
PRINT Subcommand (CSPLAN command)
DESIGN Subcommand (CSPLAN command)
SIZE Subcommand (CSPLAN command)
RATE Subcommand (CSPLAN command)
MOS Subcommand (CSPLAN command)
STAGEVARS Subcommand (CSPLAN command)
ESTIMATOR Subcommand (CSPLAN command)
POPSIZE Subcommand (CSPLAN command)
INCLPROB Subcommand (CSPLAN command)
ESTIMATION Keyword (CSPLAN command)


ESTIMATION Keyword (CSPLAN command)

By default, the estimation method used when sample data are analyzed is implied by the specified extraction method. If ESTIMATION=WR is specified, the with-replacement estimator is used when summary statistics are produced using Complex Samples analysis procedures.

• The WR keyword has no effect if the specified METHOD implies WR estimation.

• If ESTIMATION=WR is specified, the joint probabilities file is not created when the sample plan is executed.

• ESTIMATION=WR is available only in the first stage.

Related Topics

METHOD Subcommand (CSPLAN command)


SIZE Subcommand (CSPLAN command)

SIZE (subcommand),SIZE (subcommand),SIZE (subcommand)
CSPLAN command,CSPLAN command,CSPLAN command
CSPLAN (command),CSPLAN (command),CSPLAN (command)
SIZE subcommand,SIZE subcommand,SIZE subcommand

The SIZE subcommand specifies the number of sampling units to draw at the current stage.

• You can specify a single value, a variable name, or a matrix of counts for design strata.

• Size values must be positive integers.

• The SIZE subcommand is ignored with a warning if the PPS_MURTHY or PPS_BREWER method is specified.

• The SIZE or RATE subcommand must be specified for each stage. An error occurs if both are specified.

VALUE (keyword),VALUE (keyword),VALUE (keyword)
CSPLAN command,CSPLAN command,CSPLAN command
MATRIX (keyword),MATRIX (keyword),MATRIX (keyword)
CSPLAN command,CSPLAN command,CSPLAN command
VARIABLE (keyword),VARIABLE (keyword),VARIABLE (keyword)
CSPLAN command,CSPLAN command,CSPLAN command
VALUE | Apply a single value to all strata. For example, VALUE=10 selects 10 units per stratum.
MATRIX | Specify disproportionate sample sizes for different strata. Specify one or more variables after the MATRIX keyword. Then provide one size specification per stratum. A size specification includes a set of category values and a size value. Category values should be listed in the same order as variables to which they apply. Semicolons are used to separate the size specifications.

For example, the following syntax selects 10 units from the North stratum and 20 from the South stratum:

/SIZE MATRIX=region;  'North' 10; 'South' 20

If there is more than one variable, specify one size per combination of strata. For example, the following syntax specifies rate values for combinations of Region and Sex strata:

/SIZE MATRIX=region sex; 'North' 'Male' 10; 'North' 'Female'15;
                         'South' 'Male' 24; 'South' 'Female' 30

The variable list must contain all or a subset of stratification variables from the same and previous stages and cluster variables from the previous stages. An error occurs if the list contains variables that are not defined as strata or cluster variables.

Each size specification must contain one category value per variable. If multiple size specifications are provided for the same strata or combination of strata, only the last one is honored.

String and date category values must be quoted.

A semicolon must appear after the variable list and after each size specification. The semicolon is not allowed after the last size specification.
VARIABLE | Specify the name of a single variable that contains the sample sizes.

Related Topics

CSPLAN
Overview (CSPLAN command)
Examples (CSPLAN command)
CSPLAN Command (CSPLAN command)
PLAN Subcommand (CSPLAN command)
PLANVARS Subcommand (CSPLAN command)
SRSESTIMATOR Subcommand (CSPLAN command)
PRINT Subcommand (CSPLAN command)
DESIGN Subcommand (CSPLAN command)
METHOD Subcommand (CSPLAN command)
RATE Subcommand (CSPLAN command)
MOS Subcommand (CSPLAN command)
STAGEVARS Subcommand (CSPLAN command)
ESTIMATOR Subcommand (CSPLAN command)
POPSIZE Subcommand (CSPLAN command)
INCLPROB Subcommand (CSPLAN command)


RATE Subcommand (CSPLAN command)

RATE (subcommand),RATE (subcommand),RATE (subcommand)
CSPLAN command,CSPLAN command,CSPLAN command
CSPLAN (command),CSPLAN (command),CSPLAN (command)
RATE subcommand,RATE subcommand,RATE subcommand

The RATE subcommand specifies the percentage of units to draw at the current stage—that is, the sampling fraction.

• Specify a single value, a variable name, or a matrix of rates for design strata. In all cases, the value 1 is treated as 100%.

• Rate values must be positive.

• RATE is ignored with a warning if the PPS_MURTHY or PPS_BREWER method is specified.

• Either SIZE or RATE must be specified for each stage. An error occurs if both are specified.

VALUE (keyword),VALUE (keyword),VALUE (keyword)
CSPLAN command,CSPLAN command,CSPLAN command
MATRIX (keyword),MATRIX (keyword),MATRIX (keyword)
CSPLAN command,CSPLAN command,CSPLAN command
VARIABLE (keyword),VARIABLE (keyword),VARIABLE (keyword)
CSPLAN command,CSPLAN command,CSPLAN command
VALUE | Apply a single value to all strata. For example, VALUE=.10 selects 10% of units per stratum.
MATRIX | Specify disproportionate rates for different strata. Specify one or more variables after the MATRIX keyword. Then provide one rate specification per stratum. A rate specification includes a set of category values and a rate value. Category values should be listed in the same order as variables to which they apply. Semicolons are used to separate the rate specifications.

For example, the following syntax selects 10% of units from the North stratum and 20% from the South stratum:

/RATE MATRIX=region;  'North' .1; 'South' .2

If there is more than one variable, specify one rate per combination of strata. For example, the following syntax specifies rate values for combinations of Region and Sex strata:

/RATE MATRIX=region sex; 'North' 'Male' .1; 'North' 'Female' .15;
                         'South' 'Male' .24; 'South' 'Female' .3

The variable list must contain all or a subset of stratification variables from the same and previous stages and cluster variables from the previous stages. An error occurs if the list contains variables that are not defined as strata or cluster variables.

Each rate specification must contain one category value per variable. If multiple rate specifications are provided for the same strata or combination of strata, only the last one is honored.

String and date category values must be quoted. A semicolon must appear after the variable list and after each rate specification.

The semicolon is not allowed after the last rate specification.
VARIABLE | Specify the name of a single variable that contains the sample rates.

Related Topics

CSPLAN
Overview (CSPLAN command)
Examples (CSPLAN command)
CSPLAN Command (CSPLAN command)
PLAN Subcommand (CSPLAN command)
PLANVARS Subcommand (CSPLAN command)
SRSESTIMATOR Subcommand (CSPLAN command)
PRINT Subcommand (CSPLAN command)
DESIGN Subcommand (CSPLAN command)
METHOD Subcommand (CSPLAN command)
SIZE Subcommand (CSPLAN command)
MOS Subcommand (CSPLAN command)
STAGEVARS Subcommand (CSPLAN command)
ESTIMATOR Subcommand (CSPLAN command)
POPSIZE Subcommand (CSPLAN command)
INCLPROB Subcommand (CSPLAN command)
MINSIZE Keyword (CSPLAN command)
MAXSIZE Keyword (CSPLAN command)


MINSIZE Keyword (CSPLAN command)

MINSIZE specifies the minimum number of units to draw when RATE is specified. MINSIZE is useful when the sampling rate for a particular stratum turns out to be very small due to rounding.

value The value must be a positive integer. An error occurs if the value exceeds MAXSIZE.

Related Topics

RATE Subcommand (CSPLAN command)
MAXSIZE Keyword (CSPLAN command)


MAXSIZE Keyword (CSPLAN command)

MAXSIZE specifies the maximum number of units to draw when RATE is specified. MAXSIZE is useful when the sampling rate for a particular stratum turns out to be larger than desired due to rounding.

value The value must be a positive integer. An error occurs if the value is less than MINSIZE.

Related Topics

RATE Subcommand (CSPLAN command)
MINSIZE Keyword (CSPLAN command)


MOS Subcommand (CSPLAN command)

MOS (subcommand),MOS (subcommand),MOS (subcommand)
CSPLAN command,CSPLAN command,CSPLAN command
CSPLAN (command),CSPLAN (command),CSPLAN (command)
MOS subcommand,MOS subcommand,MOS subcommand

The MOS subcommand specifies the measure of size for population units in a PPS design. Specify a variable that contains the sizes or request that sizes be determined when CSSELECT scans the sample frame.

VARIABLE (keyword),VARIABLE (keyword),VARIABLE (keyword)
CSPLAN command,CSPLAN command,CSPLAN command
SOURCE (keyword),SOURCE (keyword),SOURCE (keyword)
CSPLAN command,CSPLAN command,CSPLAN command
VARIABLE | Specify a variable containing the sizes.
SOURCE=FROMDATA | The CSSELECT procedure counts the number of cases that belong to each cluster to determine the MOS. SOURCE=FROMDATA can be used only if a CLUSTER variable is defined. Otherwise, an error is generated.

• The MOS subcommand is required for PPS designs. Otherwise, it is ignored with a warning.

Related Topics

CSPLAN
Overview (CSPLAN command)
Examples (CSPLAN command)
CSPLAN Command (CSPLAN command)
PLAN Subcommand (CSPLAN command)
PLANVARS Subcommand (CSPLAN command)
SRSESTIMATOR Subcommand (CSPLAN command)
PRINT Subcommand (CSPLAN command)
DESIGN Subcommand (CSPLAN command)
METHOD Subcommand (CSPLAN command)
SIZE Subcommand (CSPLAN command)
RATE Subcommand (CSPLAN command)
STAGEVARS Subcommand (CSPLAN command)
ESTIMATOR Subcommand (CSPLAN command)
POPSIZE Subcommand (CSPLAN command)
INCLPROB Subcommand (CSPLAN command)
MIN Keyword (CSPLAN command)
MAX Keyword (CSPLAN command)


MIN Keyword (CSPLAN command)

MIN specifies a minimum MOS for population units that overrides the value specified in the MOS variable or obtained by scanning the data.

value The value must be positive. MIN must be less than or equal to MAX.

• MIN is optional for PPS methods. It is ignored for other methods.

Related Topics

MOS Subcommand (CSPLAN command)
MAX Keyword (CSPLAN command)


MAX Keyword (CSPLAN command)

MAX specifies a maximum MOS for population units that overrides the value specified in the MOS variable or obtained by scanning the data.

value The value must be positive. MAX must be greater than or equal to MIN.

• MAX is optional for PPS methods. It is ignored for other methods.

Related Topics

MOS Subcommand (CSPLAN command)
MIN Keyword (CSPLAN command)


STAGEVARS Subcommand (CSPLAN command)

STAGEVARS (subcommand),STAGEVARS (subcommand),STAGEVARS (subcommand)
CSPLAN command,CSPLAN command,CSPLAN command
CSPLAN (command),CSPLAN (command),CSPLAN (command)
STAGEVARS subcommand,STAGEVARS subcommand,STAGEVARS subcommand

The STAGEVARS subcommand is used to obtain stagewise sample information variables when a sample design is executed. Certain variables are created automatically and cannot be suppressed. The names of both automatic and optional stagewise variables can be user-specified.

• Stagewise inclusion probabilities and cumulative sampling weights are always created.

• A stagewise duplication index is created only when sampling is done with replacement. A warning occurs if index variables are requested when sampling is done without replacement.

• If a keyword is specified without a variable name, a default name is used. The default name indicates the stage to which the variable applies.

Example

/STAGEVARS POPSIZE
           INCLPROB(SelectionProb)

• The syntax requests that the population size for the stage be saved using a default name.

• Inclusion probabilities for the stage will be saved using the name SelectionProb. (Note that inclusion probabilities are always saved when the sample design is executed. The syntax shown here requests that they be saved using a nondefault name.)

Related Topics

CSPLAN
Overview (CSPLAN command)
Examples (CSPLAN command)
CSPLAN Command (CSPLAN command)
PLAN Subcommand (CSPLAN command)
PLANVARS Subcommand (CSPLAN command)
SRSESTIMATOR Subcommand (CSPLAN command)
PRINT Subcommand (CSPLAN command)
DESIGN Subcommand (CSPLAN command)
METHOD Subcommand (CSPLAN command)
SIZE Subcommand (CSPLAN command)
RATE Subcommand (CSPLAN command)
MOS Subcommand (CSPLAN command)
ESTIMATOR Subcommand (CSPLAN command)
POPSIZE Subcommand (CSPLAN command)
INCLPROB Subcommand (CSPLAN command)
STAGEVARS Variables (CSPLAN command)


STAGEVARS Variables (CSPLAN command)

The following table shows available STAGEVARS variables. See the CSSELECT algorithms document for a detailed explanation of each quantity.

If the default variable name is used, a numeric suffix that corresponds to the stage number is added to the root shown below. All names end in an underscore—for example, InclusionProbability_1_.

INCLPROB (keyword),INCLPROB (keyword),INCLPROB (keyword)
CSPLAN command,CSPLAN command,CSPLAN command
CUMWEIGHT (keyword),CUMWEIGHT (keyword),CUMWEIGHT (keyword)
CSPLAN command,CSPLAN command,CSPLAN command
INDEX (keyword),INDEX (keyword),INDEX (keyword)
CSPLAN command,CSPLAN command,CSPLAN command
POPSIZE (keyword),POPSIZE (keyword),POPSIZE (keyword)
CSPLAN command,CSPLAN command,CSPLAN command
SAMPSIZE (keyword),SAMPSIZE (keyword),SAMPSIZE (keyword)
CSPLAN command,CSPLAN command,CSPLAN command
RATE (keyword),RATE (keyword),RATE (keyword)
CSPLAN command,CSPLAN command,CSPLAN command
WEIGHT (keyword),WEIGHT (keyword),WEIGHT (keyword)
CSPLAN command,CSPLAN command,CSPLAN command
Keyword | Default root name | Description | Generated automatically when sample executed?
INCLPROB | InclusionProbability_ | Stagewise inclusion (selection) probabilities. The proportion of units drawn from the population at a particular stage. | Yes
CUMWEIGHT | SampleWeightCumulative_ | Cumulative sampling weight for a given stage. Takes into account prior stages. | Yes
INDEX | Index_ | Duplication index for units selected in a given stage. The index uniquely identifies units selected more than once when sampling is done with replacement. | Yes, when sampling is done with replacement.
POPSIZE | PopulationSize_ | Population size for a given stage. | No
SAMPSIZE | SampleSize_ | Number of units drawn at a given stage. | No
RATE | SamplingRate_ | Stagewise sampling rate. | No
WEIGHT | SampleWeight_ | Sampling weight for a given stage. The inverse of the stagewise inclusion probability. Stage weights are positive for each unit selected in a particular stage. | No

Related Topics

STAGEVARS Subcommand (CSPLAN command)


ESTIMATOR Subcommand (CSPLAN command)

ESTIMATOR (subcommand),ESTIMATOR (subcommand),ESTIMATOR (subcommand)
CSPLAN command,CSPLAN command,CSPLAN command
CSPLAN (command),CSPLAN (command),CSPLAN (command)
ESTIMATOR subcommand,ESTIMATOR subcommand,ESTIMATOR subcommand

The ESTIMATOR subcommand is used to choose an estimation method for the current stage. There is no default estimator.

Available estimators depend on the stage:

• EQUAL_WOR can be specified in any stage of the design.

• UNEQUAL_WOR can be specified in the first stage only. An error occurs if it is used in stage 2 or 3.

• WR can be specified in any stage. However, the stage in which it is specified is treated as the last stage. Any subsequent stages are ignored when the data are analyzed.

EQUAL_WOR (keyword),EQUAL_WOR (keyword),EQUAL_WOR (keyword)
CSPLAN command,CSPLAN command,CSPLAN command
UNEQUAL_WOR (keyword),UNEQUAL_WOR (keyword),UNEQUAL_WOR (keyword)
CSPLAN command,CSPLAN command,CSPLAN command
WR (keyword),WR (keyword),WR (keyword)
CSPLAN command,CSPLAN command,CSPLAN command
EQUAL_WOR | Equal selection probabilities without replacement. POPSIZE or INCLPROB must be specified.
UNEQUAL_WOR | Unequal selection probabilities without replacement. If POPSIZE or INCLPROB is specified, it is ignored and a warning is issued.
WR | Selection with replacement. If POPSIZE or INCLPROB is specified, it is ignored and a warning is issued.

Related Topics

CSPLAN
Overview (CSPLAN command)
Examples (CSPLAN command)
CSPLAN Command (CSPLAN command)
PLAN Subcommand (CSPLAN command)
PLANVARS Subcommand (CSPLAN command)
SRSESTIMATOR Subcommand (CSPLAN command)
PRINT Subcommand (CSPLAN command)
DESIGN Subcommand (CSPLAN command)
METHOD Subcommand (CSPLAN command)
SIZE Subcommand (CSPLAN command)
RATE Subcommand (CSPLAN command)
MOS Subcommand (CSPLAN command)
STAGEVARS Subcommand (CSPLAN command)
POPSIZE Subcommand (CSPLAN command)
INCLPROB Subcommand (CSPLAN command)


POPSIZE Subcommand (CSPLAN command)

POPSIZE (subcommand),POPSIZE (subcommand),POPSIZE (subcommand)
CSPLAN command,CSPLAN command,CSPLAN command
CSPLAN (command),CSPLAN (command),CSPLAN (command)
POPSIZE subcommand,POPSIZE subcommand,POPSIZE subcommand

The POPSIZE subcommand specifies the population size for each sample element. Specify a single value, a variable name, or a matrix of counts for design strata.

• The POPSIZE and INCLPROB subcommands are mutually exclusive. An error occurs if both are specified for a particular stage.

• Population size values must be positive integers.

VALUE (keyword),VALUE (keyword),VALUE (keyword)
CSPLAN command,CSPLAN command,CSPLAN command
MATRIX (keyword),MATRIX (keyword),MATRIX (keyword)
CSPLAN command,CSPLAN command,CSPLAN command
VARIABLE (keyword),VARIABLE (keyword),VARIABLE (keyword)
CSPLAN command,CSPLAN command,CSPLAN command
VALUE | Apply a single value to all strata. For example, VALUE=1000 indicates that each stratum has a population size of 1,000.
MATRIX | Specify disproportionate population sizes for different strata. Specify one or more variables after the MATRIX keyword. Then provide one size specification per stratum. A size specification includes a set of category values and a population size value. Category values should be listed in the same order as variables to which they apply. Semicolons are used to separate the size specifications.

For example, the following syntax specifies that units in the North stratum were sampled from a population of 1,000. The population size for the South stratum is specified as 2,000:

/SIZE MATRIX=region;  'North' 1000; 'South' 2000

If there is more than one variable, specify one size per combination of strata. For example, the following syntax specifies rate values for combinations of Region and Sex strata:

/SIZE MATRIX=region sex; 'North' 'Male' 1000; 'North' 'Female' 1500;
                         'South' 'Male' 2400; 'South' 'Female' 3000

The variable list must contain all or a subset of stratification variables from the same and previous stages and cluster variables from the previous stages. An error occurs if the list contains variables that are not defined as strata or cluster variables.

Each size specification must contain one category value per variable. If multiple size specifications are provided for the same strata or combination of strata, only the last one is honored.

String and date category values must be quoted.

A semicolon must appear after the variable list and after each size specification. The semicolon is not allowed after the last size specification.
VARIABLE | Specify the name of a single variable that contains the population sizes.

Related Topics

CSPLAN
Overview (CSPLAN command)
Examples (CSPLAN command)
CSPLAN Command (CSPLAN command)
PLAN Subcommand (CSPLAN command)
PLANVARS Subcommand (CSPLAN command)
SRSESTIMATOR Subcommand (CSPLAN command)
PRINT Subcommand (CSPLAN command)
DESIGN Subcommand (CSPLAN command)
METHOD Subcommand (CSPLAN command)
SIZE Subcommand (CSPLAN command)
RATE Subcommand (CSPLAN command)
MOS Subcommand (CSPLAN command)
STAGEVARS Subcommand (CSPLAN command)
ESTIMATOR Subcommand (CSPLAN command)
INCLPROB Subcommand (CSPLAN command)


INCLPROB Subcommand (CSPLAN command)

INCLPROB (subcommand),INCLPROB (subcommand),INCLPROB (subcommand)
CSPLAN command,CSPLAN command,CSPLAN command
CSPLAN (command),CSPLAN (command),CSPLAN (command)
INCLPROB subcommand,INCLPROB subcommand,INCLPROB subcommand

The INCLPROB subcommand specifies the proportion of units drawn from the population at a given stage. Specify a single value, a variable name, or a matrix of inclusion probabilities for design strata.

• The POPSIZE and INCLPROB subcommands are mutually exclusive. An error occurs if both are specified for a particular stage.

• Proportions must be a positive value less than or equal to 1.

VALUE (keyword),VALUE (keyword),VALUE (keyword)
CSPLAN command,CSPLAN command,CSPLAN command
MATRIX (keyword),MATRIX (keyword),MATRIX (keyword)
CSPLAN command,CSPLAN command,CSPLAN command
VARIABLE (keyword),VARIABLE (keyword),VARIABLE (keyword)
CSPLAN command,CSPLAN command,CSPLAN command
VALUE | Apply a single value to all strata. For example, VALUE=0.10 indicates that 10% of elements in each stratum were selected.
MATRIX | Specify unequal proportions for different strata. Specify one or more variables after the MATRIX keyword. Then provide one proportion per stratum. A proportion specification includes a set of category values and a proportion value. Category values should be listed in the same order as variables to which they apply. Semicolons are used to separate the proportion specifications.

For example, the following syntax indicates that 10% of units were selected from the North stratum and 20% were selected from the South stratum:

/INCLPROB MATRIX=region;  'North' 0.1; 'South' 0.2

If there is more than one variable, specify one proportion per combination of strata. For example, the following syntax specifies proportions for combinations of Region and Sex strata:

/INCLPROB MATRIX=region sex; 'North' 'Male' 0.1; 'North' 'Female' 0.15;
                             'South' 'Male' 0.24; 'South' 'Female' 0.3

The variable list must contain all or a subset of stratification variables from the same and previous stages and cluster variables from the previous stages. An error occurs if the list contains variables that are not defined as strata or cluster variables.

Each proportion specification must contain one category value per variable. If multiple proportions are provided for the same strata or combination of strata, only the last one is honored.

String and date category values must be quoted.

A semicolon must appear after the variable list and after each proportion specification. The semicolon is not allowed after the last proportion specification.
VARIABLE | Specify the name of a single variable that contains inclusion probabilities.

Related Topics

CSPLAN
Overview (CSPLAN command)
Examples (CSPLAN command)
CSPLAN Command (CSPLAN command)
PLAN Subcommand (CSPLAN command)
PLANVARS Subcommand (CSPLAN command)
SRSESTIMATOR Subcommand (CSPLAN command)
PRINT Subcommand (CSPLAN command)
DESIGN Subcommand (CSPLAN command)
METHOD Subcommand (CSPLAN command)
SIZE Subcommand (CSPLAN command)
RATE Subcommand (CSPLAN command)
MOS Subcommand (CSPLAN command)
STAGEVARS Subcommand (CSPLAN command)
ESTIMATOR Subcommand (CSPLAN command)
POPSIZE Subcommand (CSPLAN command)


CSSELECT

CSSELECT (command),CSSELECT (command),CSSELECT (command)
CSSELECT (command),CSSELECT (command),CSSELECT (command)
syntax chart,syntax chart,syntax chart

CSSELECT is available in the Complex Samples option.

CSSELECT

/PLAN FILE='file'

[/CRITERIA [STAGES=n [n [n]]] [SEED={RANDOM**}]]
                                    {value   }

[/CLASSMISSING {EXCLUDE**}]
               {INCLUDE  }

[/DATA [RENAMEVARS] [PRESORTED]]

[/SAMPLEFILE OUTFILE='savfile'|'dataset' [KEEP=varlist] [DROP=varlist]]

[/JOINTPROB OUTFILE='savfile'|'dataset']

[/SELECTRULE OUTFILE='file']

[/PRINT [SELECTION**] [CPS]]

**Default if the subcommand is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See CSSELECT Algorithms for computational details for this procedure.

Syntax for the CSSELECT command can be generated from the Sampling Wizard.

Release History Collapse Hide details

Release History

Release 16.0

• Added support for SET THREADS.

Example

CSSELECT
  /PLAN FILE='/survey/myfile.csplan'.

Related Topics

Overview (CSSELECT command)
Example (CSSELECT command)
PLAN Subcommand (CSSELECT command)
CRITERIA Subcommand (CSSELECT command)
CLASSMISSING Subcommand (CSSELECT command)
DATA Subcommand (CSSELECT command)
SAMPLEFILE Subcommand (CSSELECT command)
JOINTPROB Subcommand (CSSELECT command)
SELECTRULE Subcommand (CSSELECT command)
PRINT Subcommand (CSSELECT command)


Overview (CSSELECT command)

CSSELECT selects complex, probability-based samples from a population. CSSELECT selects units according to a sample design created using the CSPLAN procedure.

Options Collapse Hide details

Options

Scope of Execution. By default, CSSELECT executes all stages defined in the sampling plan. Optionally, you can execute specific stages of the design. This capability is useful if a full sampling frame is not available at the outset of the sampling process, in which case new stages can be sampled as they become available. For example, CSSELECT might first be used to sample cities, then to sample blocks, and finally to sample individuals. Each time a different stage of the sampling plan would be executed.

Seed. By default, a random seed value is used by the CSSELECT random number generator. You can specify a seed to ensure that the same sample will be drawn when CSSELECT is invoked repeatedly using the same sample plan and population frame. The CSSELECT seed value is independent of the global seed specified via the SET command.

Missing Values. A case is excluded from the sample frame if it has a system-missing value for any input variable in the plan file. You can control whether user-missing values of stratification and cluster variables are treated as invalid. User-missing values of measure variables are always treated as invalid.

Input Data. If the sampling frame is sorted in advance, you can specify that the data are presorted, which may improve performance when stratification and/or clustering is requested for a large sampling frame.

Sample Data. CSSELECT writes data to the active dataset (the default) or an external file. Regardless of the data destination, CSSELECT generates final sampling weights, stagewise inclusion probabilities, stagewise cumulative sampling weights, as well as variables requested in the sampling plan.

External files or datasets produced by CSSELECT include selected cases only. By default, all variables in the active dataset are copied to the external file or dataset. Optionally, you can specify that only certain variables are to be copied.

Joint Probabilities. First-stage joint inclusion probabilities are automatically saved to an external file when the plan file specifies a PPS without-replacement sampling method. Joint probabilities are used by Complex Samples analysis procedures, such as CSDESCRIPTIVES and CSTABULATE. You can control the name and location of the joint probabilities file.

Output. By default, CSSELECT displays the distribution of selected cases by stratum. Optionally, you can display a case-processing summary.

Basic Specification Collapse Hide details

Basic Specification

• The basic specification is a PLAN subcommand that specifies a sample design file.

• By default, CSPLAN writes output data to the active dataset including final sample weights, stagewise cumulative weights, and stagewise inclusion probabilities. See the CSPLAN design for a description of available output variables.

Operations Collapse Hide details

Operations

• CSSELECT selects sampling units according to specifications given in a sample plan. Typically, the plan is created using the CSPLAN procedure.

• In general, elements are selected. If cluster sampling is performed, groups of elements are selected.

• CSSELECT assumes that the active dataset represents the sampling frame. If a multistage sample design is executed, the active dataset should contain data for all stages. For example, if you want to sample individuals within cities and city blocks, then each case should be an individual, and city and block variables should be coded for each individual. When CSSELECT is used to execute particular stages of the sample design, the active dataset should represent the subframe for those stages only.

• A case is excluded from the sample frame if it has a system-missing value for any input variable in the plan.

• You can control whether user-missing values of stratification and cluster variables are treated as valid. By default, they are treated as invalid.

• User-missing values of measure variables are always treated as invalid.

• The CSSELECT procedure has its own seed specification that is independent of the global SET command.

• First-stage joint inclusion probabilities are automatically saved to an external file when the plan file specifies a PPS without-replacement sampling method. By default, the joint probabilities file is given the same name as the plan file (with a different extension) and is written to the same location.

• Output data must be written to an external data file if with-replacement sampling is specified in the plan file.

• This procedure uses the multithreaded options specified by SET THREADS.

Syntax Rules Collapse Hide details

Syntax Rules

• The PLAN subcommand is required. All other subcommands are optional.

• Only a single instance of each subcommand is allowed.

• An error occurs if an attribute or keyword is specified more than once within a subcommand.

• An error occurs if the same output file is specified for more than one subcommand.

• Equals signs shown in the syntax chart are required.

• Subcommand names and keywords must be spelled in full.

• Empty subcommands are not allowed.

Limitations Collapse Hide details

Limitations

• WEIGHT and SPLIT FILE settings are ignored with a warning by the CSSELECT procedure.

Related Topics

CSSELECT
Example (CSSELECT command)
PLAN Subcommand (CSSELECT command)
CRITERIA Subcommand (CSSELECT command)
CLASSMISSING Subcommand (CSSELECT command)
DATA Subcommand (CSSELECT command)
SAMPLEFILE Subcommand (CSSELECT command)
JOINTPROB Subcommand (CSSELECT command)
SELECTRULE Subcommand (CSSELECT command)
PRINT Subcommand (CSSELECT command)


Example (CSSELECT command)

CSSELECT
  /PLAN FILE='/survey/myfile.csplan'
  /CRITERIA SEED=99999
  /SAMPLEFILE OUTFILE='/survey/sample.sav'.

• CSSELECT reads the plan file myfile.csplan.

• CSSELECT draws cases according to the sampling design specified in the plan file.

• Sampled cases and weights are written to an external file. By default, output data include final sample weights, stagewise inclusion probabilities, stagewise cumulative weights, and any other variables requested in the sample plan.

• The seed value for the random number generator is 99999.

Related Topics

CSSELECT
Overview (CSSELECT command)
PLAN Subcommand (CSSELECT command)
CRITERIA Subcommand (CSSELECT command)
CLASSMISSING Subcommand (CSSELECT command)
DATA Subcommand (CSSELECT command)
SAMPLEFILE Subcommand (CSSELECT command)
JOINTPROB Subcommand (CSSELECT command)
SELECTRULE Subcommand (CSSELECT command)
PRINT Subcommand (CSSELECT command)


PLAN Subcommand (CSSELECT command)

PLAN (subcommand),PLAN (subcommand),PLAN (subcommand)
CSSELECT command,CSSELECT command,CSSELECT command
CSSELECT (command),CSSELECT (command),CSSELECT (command)
PLAN subcommand,PLAN subcommand,PLAN subcommand

PLAN identifies the plan file whose specifications are to be used for selecting sampling units. FILE specifies the name of the file. An error occurs if the file does not exist.

Related Topics

CSSELECT
Overview (CSSELECT command)
Example (CSSELECT command)
CRITERIA Subcommand (CSSELECT command)
CLASSMISSING Subcommand (CSSELECT command)
DATA Subcommand (CSSELECT command)
SAMPLEFILE Subcommand (CSSELECT command)
JOINTPROB Subcommand (CSSELECT command)
SELECTRULE Subcommand (CSSELECT command)
PRINT Subcommand (CSSELECT command)


CRITERIA Subcommand (CSSELECT command)

CRITERIA (subcommand),CRITERIA (subcommand),CRITERIA (subcommand)
CSSELECT command,CSSELECT command,CSSELECT command
CSSELECT (command),CSSELECT (command),CSSELECT (command)
CRITERIA subcommand,CRITERIA subcommand,CRITERIA subcommand

CRITERIA is used to control the scope of execution and specify a seed value.

Related Topics

CSSELECT
Overview (CSSELECT command)
Example (CSSELECT command)
PLAN Subcommand (CSSELECT command)
CLASSMISSING Subcommand (CSSELECT command)
DATA Subcommand (CSSELECT command)
SAMPLEFILE Subcommand (CSSELECT command)
JOINTPROB Subcommand (CSSELECT command)
SELECTRULE Subcommand (CSSELECT command)
PRINT Subcommand (CSSELECT command)
STAGES Keyword (CSSELECT command)
SEED Keyword (CSSELECT command)


STAGES Keyword (CSSELECT command)

STAGES specifies the scope of execution.

• By default, all stages defined in the sampling plan are executed. STAGES is used to limit execution to specific stages of the design.

• Specify one or more stages. The list can include up to three integer values—for example, STAGES=1 2 3. If two or more values are provided, they must be consecutive. An error occurs if a stage is specified that does not correspond to a stage in the plan file.

• If the sample plan specifies a previous weight variable, it is used in the first stage of the plan.

• When executing latter stages of a multistage sampling design in which the earlier stages have already been sampled, CSSELECT requires the cumulative sampling weights of the last stage sampled, in order to compute the correct final sampling weights for the whole design. For example, if you have executed the first two stages of a three-stage design and saved the second-stage cumulative weights to SampleWeightCumulative_2_, when you sample the third stage of the design, the active dataset must contain SampleWeightCumulative_2_ to compute the final sampling weights.

Related Topics

CRITERIA Subcommand (CSSELECT command)
SEED Keyword (CSSELECT command)


SEED Keyword (CSSELECT command)

SEED specifies the random number seed used by the CSSELECT procedure.

• By default, a random seed value is selected. To replicate a particular sample, the same seed, sample plan, and sample frame should be specified when the procedure is executed.

• The CSSELECT seed value is independent of the global seed specified via the SET command.

RANDOM (keyword),RANDOM (keyword),RANDOM (keyword)
CSSELECT command,CSSELECT command,CSSELECT command
RANDOM | A seed value is selected at random. This is the default.
value | Specifies a custom seed value. The seed value must be a positive integer.

Related Topics

CRITERIA Subcommand (CSSELECT command)
STAGES Keyword (CSSELECT command)


CLASSMISSING Subcommand (CSSELECT command)

CLASSMISSING (subcommand),CLASSMISSING (subcommand),CLASSMISSING (subcommand)
CSSELECT command,CSSELECT command,CSSELECT command
CSSELECT (command),CSSELECT (command),CSSELECT (command)
CLASSMISSING subcommand,CLASSMISSING subcommand,CLASSMISSING subcommand

CLASSMISSING is used to control whether user-missing values of classification (stratification and clustering) variables are treated as valid values. By default, they are treated as invalid.

EXCLUDE (keyword),EXCLUDE (keyword),EXCLUDE (keyword)
CSSELECT command,CSSELECT command,CSSELECT command
INCLUDE (keyword),INCLUDE (keyword),INCLUDE (keyword)
CSSELECT command,CSSELECT command,CSSELECT command
EXCLUDE | User-missing values of stratification and cluster variables are treated as invalid. This is the default.
INCLUDE | User-missing values of stratification and cluster variables are treated as valid values.

CSSELECT always treats user-missing values of measure variables (previous weight, MOS, size, and rate) as invalid.

Related Topics

CSSELECT
Overview (CSSELECT command)
Example (CSSELECT command)
PLAN Subcommand (CSSELECT command)
CRITERIA Subcommand (CSSELECT command)
DATA Subcommand (CSSELECT command)
SAMPLEFILE Subcommand (CSSELECT command)
JOINTPROB Subcommand (CSSELECT command)
SELECTRULE Subcommand (CSSELECT command)
PRINT Subcommand (CSSELECT command)


DATA Subcommand (CSSELECT command)

DATA (subcommand),DATA (subcommand),DATA (subcommand)
CSSELECT command,CSSELECT command,CSSELECT command
CSSELECT (command),CSSELECT (command),CSSELECT (command)
DATA subcommand,DATA subcommand,DATA subcommand

DATA specifies general options concerning input and output files.

Related Topics

CSSELECT
Overview (CSSELECT command)
Example (CSSELECT command)
PLAN Subcommand (CSSELECT command)
CRITERIA Subcommand (CSSELECT command)
CLASSMISSING Subcommand (CSSELECT command)
SAMPLEFILE Subcommand (CSSELECT command)
JOINTPROB Subcommand (CSSELECT command)
SELECTRULE Subcommand (CSSELECT command)
PRINT Subcommand (CSSELECT command)
RENAMEVARS Keyword (CSSELECT command)
PRESORTED Keyword (CSSELECT command)


RENAMEVARS Keyword (CSSELECT command)

RENAMEVARS (keyword),RENAMEVARS (keyword),RENAMEVARS (keyword)
CSSELECT command,CSSELECT command,CSSELECT command

The RENAMEVARS keyword handles name conflicts between existing variables and variables to be created by the CSSELECT procedure.

• If the RENAMEVARS keyword is not specified, conflicting variable names generate an error. This is the default.

• If output data are directed to the active dataset, RENAMEVARS specifies that an existing variable should be renamed with a warning if its name conflicts with that of a variable created by the CSSELECT procedure.

• If output data are directed to an external file or dataset, RENAMEVARS specifies that a variable to be copied from the active dataset should be renamed, with a warning if its name conflicts with that of a variable created by the CSSELECT procedure. See the SAMPLEFILE subcommand for details about copying variables from the active dataset.

Related Topics

DATA Subcommand (CSSELECT command)
PRESORTED Keyword (CSSELECT command)


PRESORTED Keyword (CSSELECT command)

PRESORTED (keyword),PRESORTED (keyword),PRESORTED (keyword)
CSSELECT command,CSSELECT command,CSSELECT command

By default, CSSELECT assumes that the active dataset is unsorted. The PRESORTED keyword specifies that the data are sorted in advance, which may improve performance when stratification and/or clustering is requested for a large sample frame.

If PRESORTED is used, the data should be sorted first by all stratification variables then by cluster variables consecutively in each stage. The data can be sorted in ascending or descending order. For example, given a sample plan created using the following CSPLAN syntax, the sample frame should be sorted by region, ses, district, type, and school, in that order.

Example

CSPLAN
  /PLAN OUTFILE='/survey/myfile.csplan'
  /DESIGN STRATA=region ses CLUSTER=district type
  /SAMPLE RATE=.2 MOS=districtsize METHOD=PPS_WOR
  /DESIGN CLUSTER=school
  /SAMPLE RATE=.3 METHOD=SIMPLE_WOR.

An error occurs if PRESORTED is specified and the data are not sorted in proper order.

Related Topics

DATA Subcommand (CSSELECT command)
RENAMEVARS Keyword (CSSELECT command)


SAMPLEFILE Subcommand (CSSELECT command)

SAMPLEFILE (subcommand),SAMPLEFILE (subcommand),SAMPLEFILE (subcommand)
CSSELECT command,CSSELECT command,CSSELECT command
CSSELECT (command),CSSELECT (command),CSSELECT (command)
SAMPLEFILE subcommand,SAMPLEFILE subcommand,SAMPLEFILE subcommand

SAMPLEFILE is used to write sampled units to an external file or dataset. Datasets are available during the current session but are not available in subsequent sessions unless you explicitly save them as data files.

• The external file or dataset contains sampled cases only. By default, all variables in the active dataset are copied to the external file or dataset.

• If SAMPLEFILE is specified, data are not written to the active dataset.

• SAMPLEFILE must be used if with-replacement sampling is specified in the plan file. Otherwise, an error is generated.

• KEEP and DROP can be used simultaneously; the effect is cumulative. An error occurs if you specify a variable already named on a previous DROP or one not named on a previous KEEP.

Related Topics

CSSELECT
Overview (CSSELECT command)
Example (CSSELECT command)
PLAN Subcommand (CSSELECT command)
CRITERIA Subcommand (CSSELECT command)
CLASSMISSING Subcommand (CSSELECT command)
DATA Subcommand (CSSELECT command)
JOINTPROB Subcommand (CSSELECT command)
SELECTRULE Subcommand (CSSELECT command)
PRINT Subcommand (CSSELECT command)
OUTFILE Keyword (CSSELECT command)
KEEP Keyword (CSSELECT command)
DROP Keyword (CSSELECT command)


OUTFILE Keyword (CSSELECT command)

The OUTFILE keyword specifies the name of the external file or the name of a dataset. An external file, a file handle, or a dataset name must be specified. If the file or dataset exists, it is overwritten without warning.

Related Topics

SAMPLEFILE Subcommand (CSSELECT command)
KEEP Keyword (CSSELECT command)
DROP Keyword (CSSELECT command)


KEEP Keyword (CSSELECT command)

The KEEP keyword lists variables to be copied from the active dataset to the file or dataset specified on the OUTFILE keyword. KEEP has no bearing on the active dataset.

• At least one variable must be specified.

• Variables not listed are not copied.

• An error occurs if a specified variable does not exist in the active dataset.

• Variables are copied in the order in which they are listed.

Related Topics

SAMPLEFILE Subcommand (CSSELECT command)
OUTFILE Keyword (CSSELECT command)
DROP Keyword (CSSELECT command)


DROP Keyword (CSSELECT command)

The DROP keyword excludes variables from the file or dataset specified on the OUTFILE keyword. DROP has no bearing on the active dataset.

• At least one variable must be specified.

• Variables not listed are copied.

• The ALL keyword can be used to drop all variables.

• An error occurs if a specified variable does not exist in the active dataset.

Related Topics

SAMPLEFILE Subcommand (CSSELECT command)
OUTFILE Keyword (CSSELECT command)
KEEP Keyword (CSSELECT command)


JOINTPROB Subcommand (CSSELECT command)

JOINTPROB (subcommand),JOINTPROB (subcommand),JOINTPROB (subcommand)
CSSELECT command,CSSELECT command,CSSELECT command
CSSELECT (command),CSSELECT (command),CSSELECT (command)
JOINTPROB subcommand,JOINTPROB subcommand,JOINTPROB subcommand

First-stage joint inclusion probabilities are automatically saved to an external PASW Statistics data file when the plan file specifies a PPS without-replacement sampling method. By default, the joint probabilities file is given the same name as the plan file (with a different extension), and it is written to the same location. JOINTPROB is used to override the default name and location of the file.

• OUTFILE specifies the name of the file. In general, if the file exists, it is overwritten without warning.

• The joint probabilities file is generated only when the plan file specifies PPS_WOR, PPS_BREWER, PPS_SAMPFORD, or PPS_MURTHY as the sampling method. A warning is generated if JOINTPROB is used when any other sampling method is requested in the plan file.

Related Topics

CSSELECT
Overview (CSSELECT command)
Example (CSSELECT command)
PLAN Subcommand (CSSELECT command)
CRITERIA Subcommand (CSSELECT command)
CLASSMISSING Subcommand (CSSELECT command)
DATA Subcommand (CSSELECT command)
SAMPLEFILE Subcommand (CSSELECT command)
SELECTRULE Subcommand (CSSELECT command)
PRINT Subcommand (CSSELECT command)


Structure of the Joint Probabilities File

joint probabilities,joint probabilities,joint probabilities
file structure,file structure,file structure

Complex Samples analysis procedures will expect the following variables in the joint probability file in the order listed below. If there are other variables beyond the joint probability variables, they will be silently ignored.

1. Stratification variables. These are the stratification variables used in the first stage of sampling. If there is no stratification in first stage, no stratification variables are included in the file.

2. Cluster variables. These are variables used to identify each primary sampling unit (PSU) within a stratum. At least one cluster variable is always included, since it is required for all selection methods that generate the joint probabilities as well as for the estimation method using them.

3. System PSU id. This variable labels PSU's within a stratum. The variable name used is Unit_No_.

4. Joint probability variables. These variables store the joint inclusion probabilities for each pair of units. The default names of these variables will have the form Joint_Prob_n_; for example, the joint inclusion probabilities of the 2nd and 3rd units will be the values located at case 2 of Joint_Prob_3_ or case 3 of Joint_Prob_2_. Since the analysis procedures extract joint probabilities by location, it is safe to rename these variables at your convenience. Within each stratum, these joint inclusion probabilities will form a square symmetric matrix. Since the joint inclusion probabilities only vary for the off diagonal entries, the diagonal elements correspond to the first stage inclusion probabilities. The maximum number of joint inclusion probability variables will be equal to the maximum sample size across all strata.

Example

Joint probabilities file

The file poll_jointprob.sav contains first-stage joint probabilities for selected townships within counties. County is a first-stage stratification variable, and Township is a cluster variable. Combinations of these variables identify all first-stage PSUs uniquely. Unit_No_ labels PSUs within each stratum and is used to match up with Joint_Prob_1_, Joint_Prob_2_, Joint_Prob_3_, Joint_Prob_4_, and Joint_Prob_5_. The first two strata each have 4 PSUs; therefore, the joint inclusion probability matrices are 4×4 for these strata, and the Joint_Prob_5_ column is left empty for these rows. Similarly, strata 3 and 5 have 3×3 joint inclusion probability matrices, and stratum 4 has a 5×5 joint inclusion probability matrix.

The need for a joint probabilities file is seen by perusing the values of the joint inclusion probability matrices. When the sampling method is not a PPS WOR method, the selection of a PSU is independent of the selection of another PSU, and their joint inclusion probability is simply the product of their inclusion probabilities. In contrast, the joint inclusion probability for Townships 9 and 10 of County 1 is approximately 0.11 (see the first case of Joint_Prob_3_ or the third case of Joint_Prob_1_), or less than the product of their individual inclusion probabilities (the product of the first case of Joint_Prob_1_ and the third case of Joint_Prob_3_ is 0.31×0.44=0.1364).


SELECTRULE Subcommand (CSSELECT command)

SELECTRULE (subcommand),SELECTRULE (subcommand),SELECTRULE (subcommand)
CSSELECT command,CSSELECT command,CSSELECT command
CSSELECT (command),CSSELECT (command),CSSELECT (command)
SELECTRULE subcommand,SELECTRULE subcommand,SELECTRULE subcommand

SELECTRULE generates a text file containing a rule that describes characteristics of selected units.

• The selection rule is not generated by default.

• OUTFILE specifies the name of the file. If the file exists, it is overwritten without warning.

• The selection rule is written in generic notation, for example—(a EQ 1) AND (b EQ 2)’. You can transform the selection rule into SQL code or command syntax that can be used to extract a subframe for the next stage of a multistage extraction.

Related Topics

CSSELECT
Overview (CSSELECT command)
Example (CSSELECT command)
PLAN Subcommand (CSSELECT command)
CRITERIA Subcommand (CSSELECT command)
CLASSMISSING Subcommand (CSSELECT command)
DATA Subcommand (CSSELECT command)
SAMPLEFILE Subcommand (CSSELECT command)
JOINTPROB Subcommand (CSSELECT command)
PRINT Subcommand (CSSELECT command)


PRINT Subcommand (CSSELECT command)

PRINT (subcommand),PRINT (subcommand),PRINT (subcommand)
CSSELECT command,CSSELECT command,CSSELECT command
CSSELECT (command),CSSELECT (command),CSSELECT (command)
PRINT subcommand,PRINT subcommand,PRINT subcommand

PRINT controls output display.

SELECTION (keyword),SELECTION (keyword),SELECTION (keyword)
CSSELECT command,CSSELECT command,CSSELECT command
CPS (keyword),CPS (keyword),CPS (keyword)
CSSELECT command,CSSELECT command,CSSELECT command
SELECTION | Summarizes the distribution of selected cases across strata. The information is reported per design stage. The table is shown by default.
CPS | Displays a case processing summary.

Related Topics

CSSELECT
Overview (CSSELECT command)
Example (CSSELECT command)
PLAN Subcommand (CSSELECT command)
CRITERIA Subcommand (CSSELECT command)
CLASSMISSING Subcommand (CSSELECT command)
DATA Subcommand (CSSELECT command)
SAMPLEFILE Subcommand (CSSELECT command)
JOINTPROB Subcommand (CSSELECT command)
SELECTRULE Subcommand (CSSELECT command)


CSTABULATE

CSTABULATE (command),CSTABULATE (command),CSTABULATE (command)
CSTABULATE (command),CSTABULATE (command),CSTABULATE (command)
syntax chart,syntax chart,syntax chart
Complex Samples Crosstabs,Complex Samples Crosstabs,Complex Samples Crosstabs
command syntax,command syntax,command syntax
Complex Samples Frequencies,Complex Samples Frequencies,Complex Samples Frequencies
command syntax,command syntax,command syntax

CSTABULATE is available in the Complex Samples option.

CSTABULATE

/PLAN FILE = file

[/JOINTPROB FILE = file]

/TABLES VARIABLES = varlist [BY varname]

[/CELLS [POPSIZE] [ROWPCT] [COLPCT] [TABLEPCT]]

[/STATISTICS [SE] [CV] [DEFF] [DEFFSQRT] [CIN [({95** })]] [COUNT]
                                                {value}

             --- options for one-way frequency tables ---

             [CUMULATIVE]

             --- options for two-way crosstabulations ---

             [EXPECTED] [RESID] [ASRESID]]

[/TEST       --- options for one-way frequency tables ---

             [HOMOGENEITY]

             --- options for two-way crosstabulations ---

             [INDEPENDENCE]

             --- options for two-by-two crosstabulations ---

             [ODDSRATIO] [RELRISK] [RISKDIFF]]

[/SUBPOP TABLE = varname [BY varname [BY ...]] [DISPLAY = {LAYERED  }]]
                                                          {SEPARATE }

[/MISSING [SCOPE = {TABLE   }] [CLASSMISSING = {EXCLUDE }]]
                   {LISTWISE}                  {INCLUDE }

** Default if the subcommand is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See CSTABULATE Algorithms for computational details for this procedure.

Syntax for the CSTABULATE command can be generated from the Complex Samples Frequencies dialog. Syntax for the CSTABULATE command can be generated from the Complex Samples Crosstabs dialog.

Example

CSTABULATE
  /PLAN FILE = '/survey/myfile.xml'
  /TABLES VARIABLES = a.

Related Topics

Overview (CSTABULATE command)
Examples (CSTABULATE command)
PLAN Subcommand (CSTABULATE command)
JOINTPROB Subcommand (CSTABULATE command)
TABLES Subcommand (CSTABULATE command)
CELLS Subcommand (CSTABULATE command)
STATISTICS Subcommand (CSTABULATE command)
TEST Subcommand (CSTABULATE command)
SUBPOP Subcommand (CSTABULATE command)
MISSING Subcommand (CSTABULATE command)


Overview (CSTABULATE command)

CSTABULATE displays one-way frequency tables or two-way crosstabulations, and associated standard errors, design effects, confidence intervals, and hypothesis tests, for samples drawn by complex sampling methods. The procedure estimates variances by taking into account the sample design used to select the sample, including equal probability and probability proportional to size (PPS) methods, and with-replacement (WR) and without-replacement (WOR) sampling procedures. Optionally, CSTABULATE creates tables for subpopulations.

Basic Specification Collapse Hide details

Basic Specification

• The basic specification is a PLAN subcommand and the name of a complex sample analysis specification file, which may be generated by CSPLAN, and a TABLES subcommand with at least one variable specified.

• This specification displays a population size estimate and its standard error for each cell in the defined table, as well as for all marginals.

Operations Collapse Hide details

Operations

• CSTABULATE computes table statistics for sampling designs supported by CSPLAN and CSSELECT.

• The input dataset must contain the variables to be analyzed and variables related to the sampling design.

• The complex sample analysis specification file provides an analysis plan based on the sampling design.

• For each cell and marginal in the defined table, the default output is the population size estimate and its standard error.

• WEIGHT and SPLIT FILE settings are ignored by CSTABULATE.

Syntax Rules Collapse Hide details

Syntax Rules

• The PLAN and TABLES subcommands are required. All other subcommands are optional.

• Each subcommand may be specified only once.

• Subcommands can be specified in any order.

• All subcommand names and keywords must be spelled in full.

• Equals signs (=) shown in the syntax chart are required.

• Empty subcommands are not allowed.

Related Topics

CSTABULATE
Examples (CSTABULATE command)
PLAN Subcommand (CSTABULATE command)
JOINTPROB Subcommand (CSTABULATE command)
TABLES Subcommand (CSTABULATE command)
CELLS Subcommand (CSTABULATE command)
STATISTICS Subcommand (CSTABULATE command)
TEST Subcommand (CSTABULATE command)
SUBPOP Subcommand (CSTABULATE command)
MISSING Subcommand (CSTABULATE command)


Examples (CSTABULATE command)

Example: Frequency tables

* Complex Samples Frequencies.
CSTABULATE
 /PLAN FILE = 'samplesDirectory\nhis2000_subset.csaplan'
 /TABLES VARIABLES = VITANY
 /CELLS  POPSIZE TABLEPCT
 /STATISTICS  SE CIN(95)
 /SUBPOP TABLE = AGE_CAT
 /MISSING SCOPE = TABLE CLASSMISSING = EXCLUDE.

• The procedure will compute estimates based on the complex sample analysis specification given in nhis2000_subset.csaplan.

• One-way frequency tables are produced for variable VITANY. Estimates, standard errors, and 95% confidence intervals are displayed for the population size and table percent for each category.

• In addition, a separate table is produced for these statistics by levels of AGE_CAT.

• All other options are set to their default values.

For discussion of output from this syntax and to place the example in context, see Using Complex Samples Frequencies to Analyze Nutritional Supplement Usage.

Example: Crosstabulation table

* Complex Samples Crosstabs.
CSTABULATE
 /PLAN FILE = 'samplesDirectory\demo.csplan'
 /TABLES VARIABLES = news BY response
 /SUBPOP TABLE = inccat  DISPLAY=LAYERED
 /CELLS  ROWPCT
 /STATISTICS  SE
 /TEST  ODDSRATIO RELRISK
 /MISSING SCOPE = LISTWISE CLASSMISSING = INCLUDE.

• The procedure will compute estimates based on the complex sampling plan in demo.csplan.

• The crosstabulation of news by response is produced overall and again by levels of inccat.

• The estimates and standard errors of the row percentages are reported in the cells of the crosstabulation tables.

• In addition, the odds ratio and relative risk for news by response is computed for the overall population and separately for levels of inccat.

• All other options are set to their default values.

For discussion of output from this syntax and to place the example in context, see Using Complex Samples Crosstabs to Measure the Relative Risk of an Event .

Related Topics

CSTABULATE
Overview (CSTABULATE command)
PLAN Subcommand (CSTABULATE command)
JOINTPROB Subcommand (CSTABULATE command)
TABLES Subcommand (CSTABULATE command)
CELLS Subcommand (CSTABULATE command)
STATISTICS Subcommand (CSTABULATE command)
TEST Subcommand (CSTABULATE command)
SUBPOP Subcommand (CSTABULATE command)
MISSING Subcommand (CSTABULATE command)


PLAN Subcommand (CSTABULATE command)

PLAN (subcommand),PLAN (subcommand),PLAN (subcommand)
CSTABULATE command,CSTABULATE command,CSTABULATE command
CSTABULATE (command),CSTABULATE (command),CSTABULATE (command)
PLAN subcommand,PLAN subcommand,PLAN subcommand

The PLAN subcommand specifies the name of an XML file containing analysis design specifications. This file is written by CSPLAN.

• The PLAN subcommand is required.

FILE (keyword),FILE (keyword),FILE (keyword)
CSTABULATE command,CSTABULATE command,CSTABULATE command
FILE Specifies the name of an external file.

Related Topics

CSTABULATE
Overview (CSTABULATE command)
Examples (CSTABULATE command)
JOINTPROB Subcommand (CSTABULATE command)
TABLES Subcommand (CSTABULATE command)
CELLS Subcommand (CSTABULATE command)
STATISTICS Subcommand (CSTABULATE command)
TEST Subcommand (CSTABULATE command)
SUBPOP Subcommand (CSTABULATE command)
MISSING Subcommand (CSTABULATE command)


JOINTPROB Subcommand (CSTABULATE command)

JOINTPROB (subcommand),JOINTPROB (subcommand),JOINTPROB (subcommand)
CSTABULATE command,CSTABULATE command,CSTABULATE command
CSTABULATE (command),CSTABULATE (command),CSTABULATE (command)
JOINTPROB subcommand,JOINTPROB subcommand,JOINTPROB subcommand

The JOINTPROB subcommand is used to specify the file or dataset containing the first stage joint inclusion probabilities for the UNEQUAL_WOR estimation. CSSELECT writes this file in the same location and with the same name (but different extension) as the plan file. When the UNEQUAL_WOR estimation is specified, CSTABULATE will use the default location and name of the file unless the JOINTPROB subcommand is used to override them.

FILE (keyword),FILE (keyword),FILE (keyword)
CSTABULATE command,CSTABULATE command,CSTABULATE command
FILE Specifies the name of the file or dataset containing the joint inclusion probabilities.

Related Topics

CSTABULATE
Overview (CSTABULATE command)
Examples (CSTABULATE command)
PLAN Subcommand (CSTABULATE command)
TABLES Subcommand (CSTABULATE command)
CELLS Subcommand (CSTABULATE command)
STATISTICS Subcommand (CSTABULATE command)
TEST Subcommand (CSTABULATE command)
SUBPOP Subcommand (CSTABULATE command)
MISSING Subcommand (CSTABULATE command)


TABLES Subcommand (CSTABULATE command)

TABLES (subcommand),TABLES (subcommand),TABLES (subcommand)
CSTABULATE command,CSTABULATE command,CSTABULATE command
CSTABULATE (command),CSTABULATE (command),CSTABULATE (command)
TABLES subcommand,TABLES subcommand,TABLES subcommand

The TABLES subcommand specifies the tabulation variables.

• If a single variable list is specified, then a one-way frequency table is displayed for each variable in the list.

• If the variable list is followed by the BY keyword and a variable, then two-way crosstabulations are displayed for each pair of variables. Pairs of variables are defined by crossing the variable list to the left of the BY keyword with the variable to the right. Each variable on the left defines the row dimension in a two-way crosstabulation, and the variable to the right defines the column dimension. For example, TABLES VARIABLES = A B BY C displays two tables: A by C and B by C.

• Numeric or string variables may be specified.

• Plan file and subpopulation variables may not be specified on the TABLES subcommand.

• Within the variable list, all specified variables must be unique. Also, if a variable is specified after the BY keyword, then it must be different from all variables preceding the BY keyword.

VARIABLES (keyword),VARIABLES (keyword),VARIABLES (keyword)
CSTABULATE command,CSTABULATE command,CSTABULATE command
VARIABLES Specifies the tabulation variables.

Related Topics

CSTABULATE
Overview (CSTABULATE command)
Examples (CSTABULATE command)
PLAN Subcommand (CSTABULATE command)
JOINTPROB Subcommand (CSTABULATE command)
CELLS Subcommand (CSTABULATE command)
STATISTICS Subcommand (CSTABULATE command)
TEST Subcommand (CSTABULATE command)
SUBPOP Subcommand (CSTABULATE command)
MISSING Subcommand (CSTABULATE command)


CELLS Subcommand (CSTABULATE command)

CELLS (subcommand),CELLS (subcommand),CELLS (subcommand)
CSTABULATE command,CSTABULATE command,CSTABULATE command
CSTABULATE (command),CSTABULATE (command),CSTABULATE (command)
CELLS subcommand,CELLS subcommand,CELLS subcommand

The CELLS subcommand requests various summary value estimates associated with the table cells.

If the CELLS subcommand is not specified, then CSTABULATE displays the population size estimate for each cell in the defined table(s), as well as for all marginals. However, if the CELLS subcommand is specified, then only those summary values that are requested are displayed.

POPSIZE (keyword),POPSIZE (keyword),POPSIZE (keyword)
CSTABULATE command,CSTABULATE command,CSTABULATE command
ROWPCT (keyword),ROWPCT (keyword),ROWPCT (keyword)
CSTABULATE command,CSTABULATE command,CSTABULATE command
COLPCT (keyword),COLPCT (keyword),COLPCT (keyword)
CSTABULATE command,CSTABULATE command,CSTABULATE command
TABLEPCT (keyword),TABLEPCT (keyword),TABLEPCT (keyword)
CSTABULATE command,CSTABULATE command,CSTABULATE command
POPSIZE | The population size estimate for each cell and marginal in a table. This is the default output if the CELLS subcommand is not specified.
ROWPCT | Row percentages. The population size estimate in each cell in a row is expressed as a percentage of the population size estimate for that row. Available for two-way crosstabulations. For one-way frequency tables, specifying this keyword gives the same output as the TABLEPCT keyword.
COLPCT | Column percentages. The population size estimate in each cell in a column is expressed as a percentage of the population size estimate for that column. Available for two-way crosstabulations. For one-way frequency tables, specifying this keyword gives the same output as the TABLEPCT keyword.
TABLEPCT | Table percentages. The population size estimate in each cell of a table is expressed as a percentage of the population size estimate for that table.

Related Topics

CSTABULATE
Overview (CSTABULATE command)
Examples (CSTABULATE command)
PLAN Subcommand (CSTABULATE command)
JOINTPROB Subcommand (CSTABULATE command)
TABLES Subcommand (CSTABULATE command)
STATISTICS Subcommand (CSTABULATE command)
TEST Subcommand (CSTABULATE command)
SUBPOP Subcommand (CSTABULATE command)
MISSING Subcommand (CSTABULATE command)


STATISTICS Subcommand (CSTABULATE command)

STATISTICS (subcommand),STATISTICS (subcommand),STATISTICS (subcommand)
CSTABULATE command,CSTABULATE command,CSTABULATE command
CSTABULATE (command),CSTABULATE (command),CSTABULATE (command)
STATISTICS subcommand,STATISTICS subcommand,STATISTICS subcommand

The STATISTICS subcommand requests various statistics associated with the summary value estimates in the table cells.

If the STATISTICS subcommand is not specified, then CSTABULATE displays the standard error for each summary value estimate in the defined table(s) cells. However, if the STATISTICS subcommand is specified, then only those statistics that are requested are displayed.

SE (keyword),SE (keyword),SE (keyword)
CSTABULATE command,CSTABULATE command,CSTABULATE command
CV (keyword),CV (keyword),CV (keyword)
CSTABULATE command,CSTABULATE command,CSTABULATE command
DEFF (keyword),DEFF (keyword),DEFF (keyword)
CSTABULATE command,CSTABULATE command,CSTABULATE command
DEFFSQRT (keyword),DEFFSQRT (keyword),DEFFSQRT (keyword)
CSTABULATE command,CSTABULATE command,CSTABULATE command
CIN (keyword),CIN (keyword),CIN (keyword)
CSTABULATE command,CSTABULATE command,CSTABULATE command
COUNT (keyword),COUNT (keyword),COUNT (keyword)
CSTABULATE command,CSTABULATE command,CSTABULATE command
CUMULATIVE (keyword),CUMULATIVE (keyword),CUMULATIVE (keyword)
CSTABULATE command,CSTABULATE command,CSTABULATE command
EXPECTED (keyword),EXPECTED (keyword),EXPECTED (keyword)
CSTABULATE command,CSTABULATE command,CSTABULATE command
RESID (keyword),RESID (keyword),RESID (keyword)
CSTABULATE command,CSTABULATE command,CSTABULATE command
ASRESID (keyword),ASRESID (keyword),ASRESID (keyword)
CSTABULATE command,CSTABULATE command,CSTABULATE command
SE | The standard error for each summary value estimate. This is the default output if the STATISTICS subcommand is not specified.
CV | Coefficient of variation.
DEFF | Design effects.
DEFFSQRT | Square root of the design effects.
CIN [(value)] | Confidence interval. If the CIN keyword is specified alone, then the default 95% confidence interval is computed. Optionally, CIN may be followed by a value in parentheses, where 0 ≤ value < 100.
COUNT | Unweighted counts. The number of valid observations in the dataset for each summary value estimate.
CUMULATIVE | Cumulative summary value estimates. Available for one-way frequency tables only.
EXPECTED | Expected summary value estimates. The summary value estimate in each cell if the two variables in a crosstabulation are statistically independent. Available for two-way crosstabulations only and displayed only if the TABLEPCT keyword is specified on the CELLS subcommand.
RESID | Residuals. The difference between the observed and expected summary value estimates in each cell. Available for two-way crosstabulations only and displayed only if the TABLEPCT keyword is specified on the CELLS subcommand.
ASRESID | Adjusted Pearson residuals. Available for two-way crosstabulations only and displayed only if the TABLEPCT keyword is specified on the CELLS subcommand.

Related Topics

CSTABULATE
Overview (CSTABULATE command)
Examples (CSTABULATE command)
PLAN Subcommand (CSTABULATE command)
JOINTPROB Subcommand (CSTABULATE command)
TABLES Subcommand (CSTABULATE command)
CELLS Subcommand (CSTABULATE command)
TEST Subcommand (CSTABULATE command)
SUBPOP Subcommand (CSTABULATE command)
MISSING Subcommand (CSTABULATE command)


TEST Subcommand (CSTABULATE command)

TEST (subcommand),TEST (subcommand),TEST (subcommand)
CSTABULATE command,CSTABULATE command,CSTABULATE command
CSTABULATE (command),CSTABULATE (command),CSTABULATE (command)
TEST subcommand,TEST subcommand,TEST subcommand

The TEST subcommand requests statistics or tests for summarizing the entire table.

Furthermore, if subpopulations are defined on the SUBPOP subcommand using only first-stage stratification variables (or a subset of them), then tests are performed for each subpopulation also.

HOMOGENEITY (keyword),HOMOGENEITY (keyword),HOMOGENEITY (keyword)
CSTABULATE command,CSTABULATE command,CSTABULATE command
INDEPENDENCE (keyword),INDEPENDENCE (keyword),INDEPENDENCE (keyword)
CSTABULATE command,CSTABULATE command,CSTABULATE command
ODDSRATIO (keyword),ODDSRATIO (keyword),ODDSRATIO (keyword)
CSTABULATE command,CSTABULATE command,CSTABULATE command
RELRISK (keyword),RELRISK (keyword),RELRISK (keyword)
CSTABULATE command,CSTABULATE command,CSTABULATE command
RISKDIFF (keyword),RISKDIFF (keyword),RISKDIFF (keyword)
CSTABULATE command,CSTABULATE command,CSTABULATE command
HOMOGENEITY | Test of homogeneous proportions. Available for one-way frequency tables only.
INDEPENDENCE | Test of independence. Available for two-way crosstabulations only.
ODDSRATIO | Odds ratio. Available for two-by-two crosstabulations only.
RELRISK | Relative risk. Available for two-by-two crosstabulations only.
RISKDIFF | Risk difference. Available for two-by-two crosstabulations only.

Related Topics

CSTABULATE
Overview (CSTABULATE command)
Examples (CSTABULATE command)
PLAN Subcommand (CSTABULATE command)
JOINTPROB Subcommand (CSTABULATE command)
TABLES Subcommand (CSTABULATE command)
CELLS Subcommand (CSTABULATE command)
STATISTICS Subcommand (CSTABULATE command)
SUBPOP Subcommand (CSTABULATE command)
MISSING Subcommand (CSTABULATE command)


SUBPOP Subcommand (CSTABULATE command)

SUBPOP (subcommand),SUBPOP (subcommand),SUBPOP (subcommand)
CSTABULATE command,CSTABULATE command,CSTABULATE command
CSTABULATE (command),CSTABULATE (command),CSTABULATE (command)
SUBPOP subcommand,SUBPOP subcommand,SUBPOP subcommand

The SUBPOP subcommand specifies subpopulations for which analyses are to be performed.

• The set of subpopulations is defined by specifying a single categorical variable, or two or more categorical variables, separated by the BY keyword, whose values are crossed.

• For example, /SUBPOP TABLE = A defines subpopulations based on the levels of variable A.

• For example, /SUBPOP TABLE = A BY B defines subpopulations based on crossing the levels of variables A and B.

• A maximum of 16 variables may be specified.

• Numeric or string variables may be specified.

• All specified variables must be unique.

• Stratification or cluster variables may be specified, but no other plan file variables are allowed on the SUBPOP subcommand.

• Tabulation variables may not be specified on the SUBPOP subcommand.

• The BY keyword is used to separate variables.

The DISPLAY keyword specifies the layout of results for subpopulations.

LAYERED (keyword),LAYERED (keyword),LAYERED (keyword)
CSTABULATE command,CSTABULATE command,CSTABULATE command
SEPARATE (keyword),SEPARATE (keyword),SEPARATE (keyword)
CSTABULATE command,CSTABULATE command,CSTABULATE command
LAYERED | Results for all subpopulations are displayed in the same table. This is the default.
SEPARATE | Results for different subpopulations are displayed in different tables.

Related Topics

CSTABULATE
Overview (CSTABULATE command)
Examples (CSTABULATE command)
PLAN Subcommand (CSTABULATE command)
JOINTPROB Subcommand (CSTABULATE command)
TABLES Subcommand (CSTABULATE command)
CELLS Subcommand (CSTABULATE command)
STATISTICS Subcommand (CSTABULATE command)
TEST Subcommand (CSTABULATE command)
MISSING Subcommand (CSTABULATE command)


MISSING Subcommand (CSTABULATE command)

MISSING (subcommand),MISSING (subcommand),MISSING (subcommand)
CSTABULATE command,CSTABULATE command,CSTABULATE command
CSTABULATE (command),CSTABULATE (command),CSTABULATE (command)
MISSING subcommand,MISSING subcommand,MISSING subcommand

The MISSING subcommand specifies how missing values are handled.

• All design variables must have valid data. Cases with invalid data for any design variable are deleted from the analysis.

The SCOPE keyword specifies which cases are used in the analyses. This specification is applied to tabulation variables but not design variables.

TABLE (keyword),TABLE (keyword),TABLE (keyword)
CSTABULATE command,CSTABULATE command,CSTABULATE command
LISTWISE (keyword),LISTWISE (keyword),LISTWISE (keyword)
CSTABULATE command,CSTABULATE command,CSTABULATE command
TABLE | Each table is based on all valid data for the tabulation variable(s) used in creating the table. Tables for different variables may be based on different sample sizes. This is the default.
LISTWISE | Only cases with valid data for all tabulation variables are used in creating the tables. Tables for different variables are always based on the same sample size.

The CLASSMISSING keyword specifies whether user-missing values are treated as valid. This specification is applied to tabulation variables and categorical design variables (that is, strata, cluster, and subpopulation variables).

EXCLUDE (keyword),EXCLUDE (keyword),EXCLUDE (keyword)
CSTABULATE command,CSTABULATE command,CSTABULATE command
INCLUDE (keyword),INCLUDE (keyword),INCLUDE (keyword)
CSTABULATE command,CSTABULATE command,CSTABULATE command
EXCLUDE | Exclude user-missing values. This is the default.
INCLUDE | Include user-missing values. Treat user-missing values as valid data.

Related Topics

CSTABULATE
Overview (CSTABULATE command)
Examples (CSTABULATE command)
PLAN Subcommand (CSTABULATE command)
JOINTPROB Subcommand (CSTABULATE command)
TABLES Subcommand (CSTABULATE command)
CELLS Subcommand (CSTABULATE command)
STATISTICS Subcommand (CSTABULATE command)
TEST Subcommand (CSTABULATE command)
SUBPOP Subcommand (CSTABULATE command)


CTABLES

CTABLES (command),CTABLES (command),CTABLES (command)
CTABLES (command),CTABLES (command),CTABLES (command)
syntax chart,syntax chart,syntax chart
release history,release history,release history

CTABLES is available in the Custom Tables option.

Note: Square brackets that are used in the CTABLES syntax chart are required parts of the syntax and are not used to indicate optional elements. All subcommands except /TABLE are optional.

CTABLES

 /FORMAT MINCOLWIDTH={DEFAULT}  MAXCOLWIDTH={DEFAULT}
                     {value  }              {value  }

         UNITS={POINTS}   EMPTY= {ZERO   }   MISSING= {'.'    }
               {INCHES}          {BLANK  }            {'chars'}
               {CM    }          {'chars'}

 /VLABELS VARIABLES= varlist

         DISPLAY= {DEFAULT}
                  {NAME   }
                  {LABEL  }
                  {BOTH   }
                  {NONE   }

 /MRSETS COUNTDUPLICATES= {NO }
                          {YES}

 /SMISSING {VARIABLE}
           {LISTWISE}

 /PCOMPUTE &catname= EXPR(expression)

 /PPROPERTIES &catname &catname...
              LABEL= "label"
              FORMAT= summary format ... summary format
              HIDESOURCECATS= {NO**}
                              {YES }

 /TABLE  rows BY columns BY layers

 /SLABELS POSITION= {COLUMN}  VISIBLE= {YES}
                    {ROW   }           {NO }
                    {LAYER }

 /CLABELS {AUTO                  }
          {ROWLABELS= {OPPOSITE} }
                      {LAYER   }
          {COLLABELS= {OPPOSITE} }
                      {LAYER   }

 /CATEGORIES  VARIABLES= varlist

    { [value, value, value...]                              }
    { ORDER= {A} KEY= {VALUE           } MISSING= {EXCLUDE} }
             {D}      {LABEL           }          {INCLUDE}
                      {summary(varname)}

     TOTAL= {NO  }  LABEL= "label" POSITION= {AFTER } EMPTY= {INCLUDE}
            {YES }                           {BEFORE}        {EXCLUDE}

   Explicit value lists can include SUBTOTAL=’label’, HSUBTOTAL=’label’, MISSING, OTHERNM.

 /TITLES  CAPTION= ['text' 'text'...]
          CORNER=  ['text' 'text'...]
          TITLE=   ['text' 'text'...]
          Text can contain the symbols )DATE  )TIME  )TABLE

 /SIGTEST TYPE= CHISQUARE  ALPHA= {0.05              }
                                  {significance level}

          INCLUDEMRSETS={YES**}
                        {NO   }

          CATEGORIES={ALLVISIBLE**}
                     {SUBTOTALS   }

 /COMPARETEST TYPE= {PROP}  ALPHA= {0.05              }
                    {MEAN}         {significance level}

          ADJUST= {BONFERRONI}  ORIGIN=COLUMN
                  {NONE      }

          INCLUDEMRSETS={YES**}  MEANSVARIANCE={ALLCATS   }
                        {NO   }                {TESTEDCATS}

          CATEGORIES={ALLVISIBLE**}
                     {SUBTOTALS   }

          MERGE={NO**}
                {YES}

Row, column, and layer elements each have the general form

 varname {[C]} [summary ‘label’ format...] {+}  varname ...
         {[S]}                             {>}

When nesting (>) and concatenation (+) are combined, as in a + b > c, nesting occurs before concatenation; parentheses can be used to change precedence, as in (a + b) > c.

Summary functions available for all variables: COUNT ROWPCT.COUNT COLPCT.COUNT TABLEPCT.COUNT SUBTABLEPCT.COUNT LAYERPCT.COUNT LAYERROWPCT.COUNT LAYERCOLPCT.COUNT ROWPCT.VALIDN COLPCT.VALIDN TABLEPCT.VALIDN SUBTABLEPCT.VALIDN LAYERPCT.VALIDN LAYERROWPCT.VALIDN LAYERCOLPCT.VALIDN ROWPCT.TOTALN COLPCT.TOTALN TABLEPCT.TOTALN SUBTABLEPCT.TOTALN LAYERPCT.TOTALN LAYERROWPCT.TOTALN LAYERCOLPCT.TOTALN

Summary functions available for scale variables and for totals and subtotals of numeric variables: MAXIMUM MEAN MEDIAN MINIMUM MISSING MODE PTILE RANGE SEMEAN STDDEV SUM TOTALN VALIDN VARIANCE ROWPCT.SUM COLPCT.SUM TABLEPCT.SUM SUBTABLEPCT.SUM LAYERPCT.SUM LAYERROWPCT.SUM LAYERCOLPCT.SUM

Summary functions available for multiple response variables and their totals: RESPONSES ROWPCT.RESPONSES COLPCT.RESPONSES TABLEPCT.RESPONSES SUBTABLEPCT.RESPONSES LAYERPCT.RESPONSES LAYERROWPCT.RESPONSES LAYERCOLPCT.RESPONSES ROWPCT.RESPONSES.COUNT COLPCT.RESPONSES.COUNT TABLEPCT.RESPONSES.COUNT SUBTABLEPCT.RESPONSES.COUNT LAYERPCT.RESPONSES.COUNT LAYERROWPCT.RESPONSES.COUNT LAYERCOLPCT.RESPONSES.COUNT ROWPCT.COUNT.RESPONSES COLPCT.COUNT.RESPONSES TABLEPCT.COUNT.RESPONSES SUBTABLEPCT.COUNT.RESPONSES LAYERPCT.COUNT.RESPONSES LAYERROWPCT. COUNT.RESPONSES LAYERCOLPCT.COUNT.RESPONSES

For unweighted summaries, prefix U to a function name, as in UCOUNT.

Formats for summaries: COMMAw.d DOLLARw.d Fw.d NEGPARENw.d NEQUALw.d PARENw.d PCTw.d PCTPARENw.d DOTw.d CCA...CCEw.d Nw.d Ew.d and all DATE formats

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

Syntax for the CTABLES command can be generated from the Custom Tables dialog.

Release History Collapse Hide details

Release History

Release 13.0

• HSUBTOTAL keyword introduced on the CATEGORIES subcommand.

Release 14.0

• INCLUDEMRSETS keyword introduced on the SIGTEST and COMPARETEST subcommands.

• CATEGORIES keyword introduced on the SIGTEST and COMPARETEST subcommands.

• MEANSVARIANCE keyword introduced on the COMPARETEST subcommand.

Release 18.0

• MERGE keyword introduced on the COMPARETEST subcommand.

• PCOMPUTE and PPROPERTIES subcommands introduced.

Examples

CTABLES /TABLE POLVIEWS [COLPCT] BY AGECAT.

CTABLES /TABLE $MLTNEWS [COUNT COLPCT] BY SEX
  /SLABELS VISIBLE=NO
  /CATEGORIES VARIABLES=SEX TOTAL=YES.

CTABLES /TABLE (CONFINAN + CONBUS + CONBUS + CONEDUC
  + CONPRESS + CONMEDIC)[COUNT ROWPCT]
  /CLABELS ROWLABELS=OPPOSITE.

Related Topics

Overview (CTABLES command)
Syntax Conventions (CTABLES command)
Examples (CTABLES command)
TABLE Subcommand (CTABLES command)
SLABELS Subcommand (CTABLES command)
CLABELS Subcommand (CTABLES command)
CATEGORIES Subcommand (CTABLES command)
Explicit Category Specification (CTABLES command)
Implicit Category Specification (CTABLES command)
Totals (CTABLES command)
Empty Categories (CTABLES command)
TITLES Subcommand: Titles, Captions, and Corner Text (CTABLES command)
Significance Testing (CTABLES command)
Chi-Square Tests: SIGTEST Subcommand (CTABLES command)
Pairwise Comparisons of Proportions and Means: COMPARETEST Subcommand (CTABLES command)
FORMAT Subcommand (CTABLES command)
VLABELS Subcommand (CTABLES command)
SMISSING Subcommand (CTABLES command)
MRSETS Subcommand (CTABLES command)
PCOMPUTE Subcommand (CTABLES command)
PPROPERTIES Subcommand (CTABLES command)


Overview (CTABLES command)

CTABLES (command),CTABLES (command),CTABLES (command)
overview,overview,overview

The Custom Tables procedure produces tables in one, two, or three dimensions and provides a great deal of flexibility for organizing and displaying the contents.

• In each dimension (row, column, and layer), you can stack multiple variables to concatenate tables and nest variables to create subtables. See the TABLE subcommand.

• You can let Custom Tables determine summary statistics according to the measurement level in the dictionary, or you can assign one or more summaries to specific variables and override the measurement level without altering the dictionary. See the TABLE subcommand.

• You can create multiple response sets with the MRSETS command and use them like ordinary categorical variables in a table expression. You can control the percentage base by choosing an appropriate summary function, and you can control with the MRSETS subcommand whether duplicate responses from a single respondent are counted.

• You can assign totals to categorical variables at different nesting levels to create subtable and table totals, and you can assign subtotals across subsets of the values of a variable. See the CATEGORIES subcommand.

• You can determine, on a per-variable basis, which categories to display in the table, including whether to display missing values and empty categories for which variable labels exist. You can also sort categories by name, label, or the value of a summary function. See the CATEGORIES subcommand.

• You can specify whether to show or hide summary and category labels and where to position the labels. For variable labels, you can specify whether to show labels, names, both, or neither. See the SLABELS, CLABELS, and VLABELS subcommands.

• You can request chi-square tests and pairwise comparisons of column proportions and means. See the SIGTEST and COMPARETEST subcommands.

• You can assign custom titles and captions (see the TITLES subcommand) and control what is displayed for empty cells and those for which a summary function cannot be computed. See the FORMAT subcommand.

CTABLES (command),CTABLES (command),CTABLES (command)
split-file processing,split-file processing,split-file processing

• CTABLES ignores SPLIT FILE requests if layered splits (compare groups in the graphical user interface) are requested. You can compare groups by using the split variables at the highest nesting level for row variables. See the TABLE subcommand for nesting variables.

Related Topics

CTABLES
Syntax Conventions (CTABLES command)
Examples (CTABLES command)
TABLE Subcommand (CTABLES command)
SLABELS Subcommand (CTABLES command)
CLABELS Subcommand (CTABLES command)
CATEGORIES Subcommand (CTABLES command)
Explicit Category Specification (CTABLES command)
Implicit Category Specification (CTABLES command)
Totals (CTABLES command)
Empty Categories (CTABLES command)
TITLES Subcommand: Titles, Captions, and Corner Text (CTABLES command)
Significance Testing (CTABLES command)
Chi-Square Tests: SIGTEST Subcommand (CTABLES command)
Pairwise Comparisons of Proportions and Means: COMPARETEST Subcommand (CTABLES command)
FORMAT Subcommand (CTABLES command)
VLABELS Subcommand (CTABLES command)
SMISSING Subcommand (CTABLES command)
MRSETS Subcommand (CTABLES command)
PCOMPUTE Subcommand (CTABLES command)
PPROPERTIES Subcommand (CTABLES command)


Syntax Conventions (CTABLES command)

CTABLES (command),CTABLES (command),CTABLES (command)
syntax conventions,syntax conventions,syntax conventions

• The basic specification is a TABLE subcommand with at least one variable in one dimension. Multiple TABLE subcommands can be included in one CTABLES command.

• The global subcommands FORMAT, VLABELS, MRSETS, and SMISSING must precede the first TABLE subcommand and can be named in any order.

• The local subcommands SLABELS, CLABELS, CATEGORIES, TITLES, SIGTEST, and COMPARETEST follow the TABLE subcommand in any order and refer to the immediately preceding table expression.

• In general, if subcommands are repeated, their specifications are merged. The last value of each specified attribute is honored.

• Equals signs that are shown in the syntax charts are required.

• Square brackets that are shown in the syntax charts are required.

• All keywords except summary function names, attribute values, and explicit category list keywords can be truncated to as few as three characters. Function names must be spelled in full.

• The slash before all subcommands, including the first subcommand, is required.

Related Topics

CTABLES
Overview (CTABLES command)
Examples (CTABLES command)
TABLE Subcommand (CTABLES command)
SLABELS Subcommand (CTABLES command)
CLABELS Subcommand (CTABLES command)
CATEGORIES Subcommand (CTABLES command)
Explicit Category Specification (CTABLES command)
Implicit Category Specification (CTABLES command)
Totals (CTABLES command)
Empty Categories (CTABLES command)
TITLES Subcommand: Titles, Captions, and Corner Text (CTABLES command)
Significance Testing (CTABLES command)
Chi-Square Tests: SIGTEST Subcommand (CTABLES command)
Pairwise Comparisons of Proportions and Means: COMPARETEST Subcommand (CTABLES command)
FORMAT Subcommand (CTABLES command)
VLABELS Subcommand (CTABLES command)
SMISSING Subcommand (CTABLES command)
MRSETS Subcommand (CTABLES command)
PCOMPUTE Subcommand (CTABLES command)
PPROPERTIES Subcommand (CTABLES command)


Examples (CTABLES command)

Example: Column Percentages

CTABLES /TABLE POLVIEWS [COLPCT] BY AGECAT.

• POLVIEWS defines the rows, and AGECAT defines the columns. Column percentages are requested, overriding the default COUNT function.

Example: Using a Multiple Response Set

CTABLES  /TABLE $MLTNEWS [COUNT COLPCT] BY SEX
  /SLABELS VISIBLE=NO
  /CATEGORIES VARIABLES=SEX TOTAL=YES.

• $MLTNEWS is a multiple response set.

• The COLPCT function uses the number of respondents as the percentage base, so each cell shows the percentage of males or females who gave each response, and the sum of percentage for each column is greater than 100.

• Summary labels are hidden.

• The CATEGORIES subcommand creates a total for both sexes.

Example: Concatenation

CTABLES /TABLE (CONFINAN + CONBUS + CONBUS + CONEDUC
  + CONPRESS + CONMEDIC)[COUNT ROWPCT]
  /CLABELS ROWLABELS=OPPOSITE.

• The six confidence variables all have the same categories with the same value labels for each category.

• The CLABELS subcommand moves the category labels to the columns.

Related Topics

CTABLES
Overview (CTABLES command)
Syntax Conventions (CTABLES command)
TABLE Subcommand (CTABLES command)
SLABELS Subcommand (CTABLES command)
CLABELS Subcommand (CTABLES command)
CATEGORIES Subcommand (CTABLES command)
Explicit Category Specification (CTABLES command)
Implicit Category Specification (CTABLES command)
Totals (CTABLES command)
Empty Categories (CTABLES command)
TITLES Subcommand: Titles, Captions, and Corner Text (CTABLES command)
Significance Testing (CTABLES command)
Chi-Square Tests: SIGTEST Subcommand (CTABLES command)
Pairwise Comparisons of Proportions and Means: COMPARETEST Subcommand (CTABLES command)
FORMAT Subcommand (CTABLES command)
VLABELS Subcommand (CTABLES command)
SMISSING Subcommand (CTABLES command)
MRSETS Subcommand (CTABLES command)
PCOMPUTE Subcommand (CTABLES command)
PPROPERTIES Subcommand (CTABLES command)


TABLE Subcommand (CTABLES command)

TABLE (subcommand),TABLE (subcommand),TABLE (subcommand)
CTABLES command,CTABLES command,CTABLES command
CTABLES (command),CTABLES (command),CTABLES (command)
TABLE subcommand,TABLE subcommand,TABLE subcommand
CTABLES (command),CTABLES (command),CTABLES (command)
table expression,table expression,table expression

The TABLE subcommand specifies the structure of the table, including the variables and summary functions that define each dimension. The TABLE subcommand has the general form

/TABLE  rows BY columns BY layers

The minimum specification for a row, column, or layer is a variable name. You can specify one or more dimensions.

Related Topics

CTABLES
Overview (CTABLES command)
Syntax Conventions (CTABLES command)
Examples (CTABLES command)
SLABELS Subcommand (CTABLES command)
CLABELS Subcommand (CTABLES command)
CATEGORIES Subcommand (CTABLES command)
Explicit Category Specification (CTABLES command)
Implicit Category Specification (CTABLES command)
Totals (CTABLES command)
Empty Categories (CTABLES command)
TITLES Subcommand: Titles, Captions, and Corner Text (CTABLES command)
Significance Testing (CTABLES command)
Chi-Square Tests: SIGTEST Subcommand (CTABLES command)
Pairwise Comparisons of Proportions and Means: COMPARETEST Subcommand (CTABLES command)
FORMAT Subcommand (CTABLES command)
VLABELS Subcommand (CTABLES command)
SMISSING Subcommand (CTABLES command)
MRSETS Subcommand (CTABLES command)
PCOMPUTE Subcommand (CTABLES command)
PPROPERTIES Subcommand (CTABLES command)
Variable Types (CTABLES command)
Category Variables and Multiple Response Sets (CTABLES command)
Stacking and Nesting (CTABLES command)
Scale Variables (CTABLES command)
Specifying Summaries (CTABLES command)
Formats for Summaries (CTABLES command)
Missing Values in Summaries (CTABLES command)


Variable Types (CTABLES command)

CTABLES (command),CTABLES (command),CTABLES (command)
variable types,variable types,variable types
variable types,variable types,variable types
CTABLES command,CTABLES command,CTABLES command

The variables that are used in a table expression can be category variables, scale variables, or multiple response sets. Multiple response sets are defined by the MRSETS command and always begin with a $. Custom Tables uses the measurement level in the dictionary for the active data file to identify category and scale variables. You can override the default variable type for numeric variables by placing [C] or [S] after the variable name. Thus, to treat the category variable HAPPY as a scale variable and obtain a mean, you would specify

/TABLE HAPPY [S].

Related Topics

TABLE Subcommand (CTABLES command)
Category Variables and Multiple Response Sets (CTABLES command)
Stacking and Nesting (CTABLES command)
Scale Variables (CTABLES command)
Specifying Summaries (CTABLES command)
Formats for Summaries (CTABLES command)
Missing Values in Summaries (CTABLES command)


Category Variables and Multiple Response Sets (CTABLES command)

category variables,category variables,category variables
CTABLES command,CTABLES command,CTABLES command
category variables,category variables,category variables
CTABLES command,CTABLES command,CTABLES command
CTABLES (command),CTABLES (command),CTABLES (command)
category variables,category variables,category variables
CTABLES (command),CTABLES (command),CTABLES (command)
multiple response sets,multiple response sets,multiple response sets

Category variables define one cell per value. See the CATEGORIES subcommand for ways of controlling how categories are displayed. Multiple response sets also define one cell per value.

Example

CTABLES /TABLE HAPPY.

• The counts for HAPPY are in the rows.

Example

CTABLES /TABLE BY HAPPY.

• The counts for HAPPY are in the columns.

Example

CTABLES /TABLE BY BY HAPPY

• The counts for HAPPY are in layers.

Related Topics

TABLE Subcommand (CTABLES command)
Variable Types (CTABLES command)
Stacking and Nesting (CTABLES command)
Scale Variables (CTABLES command)
Specifying Summaries (CTABLES command)
Formats for Summaries (CTABLES command)
Missing Values in Summaries (CTABLES command)


Stacking and Nesting (CTABLES command)

stacking,stacking,stacking
CTABLES command,CTABLES command,CTABLES command
nesting,nesting,nesting
CTABLES command,CTABLES command,CTABLES command
CTABLES (command),CTABLES (command),CTABLES (command)
stacking,stacking,stacking
CTABLES (command),CTABLES (command),CTABLES (command)
nesting,nesting,nesting
concatenation,concatenation,concatenation
CTABLES command,CTABLES command,CTABLES command
CTABLES (command),CTABLES (command),CTABLES (command)
concatenation,concatenation,concatenation

Stacking (or concatenating) variables creates multiple logical tables within a single table structure.

Example

CTABLES /TABLE HAPPY + HAPMAR BY CHILDCAT.

• The output contains two tables: one table for general happiness by number of children and one table for happiness in marriage by number of children. Except for missing values, all of the cases in the data appear in both tables.

Nesting variables creates hierarchical tables.

Example

CTABLES /TABLE SEX > HAPMAR BY CHILDCAT.

• The output contains one table with a subtable for each value of SEX. The same subtables would result from the table expression HAPMAR BY CHILDCAT BY SEX, but the subtables would appear in separate layers.

Stacking and nesting can be combined. When they are combined, by default, nesting takes precedence over stacking. You can use parentheses to alter the order of operations.

Example

CTABLES /TABLE (HAPPY + HAPMAR) > SEX.

• The output contains two tables. Without the parentheses, the first table, for general happiness, would not have separate rows for male and female.

Related Topics

TABLE Subcommand (CTABLES command)
Variable Types (CTABLES command)
Category Variables and Multiple Response Sets (CTABLES command)
Scale Variables (CTABLES command)
Specifying Summaries (CTABLES command)
Formats for Summaries (CTABLES command)
Missing Values in Summaries (CTABLES command)


Scale Variables (CTABLES command)

scale variables,scale variables,scale variables
CTABLES command,CTABLES command,CTABLES command
CTABLES (command),CTABLES (command),CTABLES (command)
scale variables,scale variables,scale variables

Scale variables, such as age in years or population of towns, do not define multiple cells within a table. The table expression /TABLE AGE creates a table with one cell containing the mean of AGE across all cases in the data. You can use nesting and/or dimensions to display summary statistics for scale variables within categories. The nature of scale variables prevents their being arranged hierarchically. Therefore:

• A scale variable cannot be nested under another scale variable.

• Scale variables can be used in only one dimension.

Example

CTABLES /TABLE AGE > HAPPY BY SEX.

Related Topics

TABLE Subcommand (CTABLES command)
Variable Types (CTABLES command)
Category Variables and Multiple Response Sets (CTABLES command)
Stacking and Nesting (CTABLES command)
Specifying Summaries (CTABLES command)
Formats for Summaries (CTABLES command)
Missing Values in Summaries (CTABLES command)


Specifying Summaries (CTABLES command)

CTABLES (command),CTABLES (command),CTABLES (command)
summary specifications,summary specifications,summary specifications
summaries,summaries,summaries
CTABLES command,CTABLES command,CTABLES command

You can specify one or more summary functions for variables in any one dimension. For category variables, summaries can be specified only for the variables at the lowest nesting level. Thus, in the table expression

/TABLE SEX > (HAPPY + HAPMAR) BY AGECAT

you can assign summaries to HAPPY and HAPMAR or to AGECAT, but not to both and not to SEX.

scale variables,scale variables,scale variables
CTABLES command,CTABLES command,CTABLES command

If a scale variable appears in a dimension, that dimension becomes the statistics dimension, and all statistics must be specified for that dimension. A scale variable need not be at the lowest level of nesting. Thus, the following is a valid specification:

CTABLES /TABLE AGE [MINIMUM, MAXIMUM, MEAN] > SEX > HAPPY.
multiple response sets,multiple response sets,multiple response sets
CTABLES command,CTABLES command,CTABLES command

A multiple response variable also need not be at the lowest level of nesting. The following specification is a valid specification:

CTABLES /TABLE $MLTCARS [COUNT, RESPONSES] > SEX.

However, if two multiple response variables are nested, as in $MULTCARS > $MULTNEWS, summaries can be requested only for the variable at the innermost nesting level (in this case, $MULTNEWS).

The general form for a summary specification is

[summary 'label' format, ..., summary 'label' format]

• The specification follows the variable name in the table expression. You can apply a summary specification to multiple variables by enclosing the variables in parentheses. The following specifications are equivalent:

/TABLE SEX [COUNT] + HAPPY [COUNT, COLPCT]
/TABLE (SEX + HAPPY [COLPCT])[COUNT]

• The brackets are required even if only one summary is specified.

• Commas are optional.

• Label and format are both optional; defaults are used if label and format are not specified.

• If totals or subtotals are defined for a variable (on the CATEGORIES subcommand), by default, the same functions that are specified for the variable are used for the totals. You can use the keyword TOTALS within the summary specification to specify different summary functions for the totals and subtotals. The specification then has the form [summary ‘label’ format ... TOTALS [summary ‘label’ format...]]. You must still specify TOTAL=YES on the CATEGORIES subcommand to see the totals.

• Summaries that are available for category variables are also available for scale variables and multiple response sets. Functions that are specific to scale variables and to multiple response sets are also available.

unweighted functions,unweighted functions,unweighted functions
CTABLES command,CTABLES command,CTABLES command
CTABLES (command),CTABLES (command),CTABLES (command)
unweighted functions,unweighted functions,unweighted functions

• If case weighting is in effect, summaries are calculated taking into account the current WEIGHT value. To obtain unweighted summaries, prefix a U to the function name, as in UCOUNT. Unweighted functions are not available where weighting would not apply, as in the MINIMUM and MAXIMUM functions.

Example

CTABLES /TABLE SEX > HAPMAR [COLPCT] BY CHILDCAT.

Example

CTABLES /TABLE AGECAT > TVHOURS [MEAN F5.2,
   STDDEV 'Standard Deviation' F5.2, PTILE 90 '90th Percentile'].

• Each summary function for the row variable appears by default in a column.

• Labels for standard deviation and the 90th percentile override the defaults.

• Because TVHOURS is recorded in whole hours and has an integer print format, the default general print formats for mean and standard deviation would also be integer, so overrides are specified.

CTABLES (command),CTABLES (command),CTABLES (command)
summary functions,summary functions,summary functions
percentage functions,percentage functions,percentage functions
CTABLES command,CTABLES command,CTABLES command
CTABLES (command),CTABLES (command),CTABLES (command)
percentage functions,percentage functions,percentage functions
Summary functions: all variables
Function | Description | Default Label* | Default Format
COUNT | Number of cases in each category. This is the default for categorical and multiple response variables. | Count | Count
ROWPCT.COUNT | Row percentage based on cell counts. Computed within subtable. | Row % | Percent
COLPCT.COUNT | Column percentage based on cell counts. Computed within subtable. | Column % | Percent
TABLEPCT.COUNT | Table percentage based on cell counts. | Table % | Percent
SUBTABLEPCT.COUNT | Subtable percentage based on cell counts. | Subtable % | Percent
LAYERPCT.COUNT | Layer percentage based on cell counts. Same as table percentage if no layers are defined. | Layer % | Percent
LAYERROWPCT.COUNT | Row percentage based on cell counts. Percentages sum to 100% across the entire row (that is, across subtables). | Layer Row % | Percent
LAYERCOLPCT.COUNT | Column percentage based on cell counts. Percentages sum to 100% across the entire column (that is, across subtables). | Layer Column % | Percent
ROWPCT.VALIDN | Row percentage based on valid count. | Row Valid N % | Percent
COLPCT.VALIDN | Column percentage based on valid count. | Column Valid N % | Percent
TABLEPCT.VALIDN | Table percentage based on valid count. | Table Valid N % | Percent
SUBTABLEPCT.VALIDN | Subtable percentage based on valid count. | Subtable Valid N % | Percent
LAYERPCT.VALIDN | Layer percentage based on valid count. | Layer Valid N % | Percent
LAYERROWPCT.VALIDN | Row percentage based on valid count. Percentages sum to 100% across the entire row. | Layer Row Valid N % | Percent
LAYERCOLPCT.VALIDN | Column percentage based on valid count. Percentages sum to 100% across the entire column. | Layer Column Valid N % | Percent
ROWPCT.TOTALN | Row percentage based on total count, including user-missing and system-missing values. | Row Total N % | Percent
COLPCT.TOTALN | Column percentage based on total count, including user-missing and system-missing values. | Column Total N % | Percent
TABLEPCT.TOTALN | Table percentage based on total count, including user-missing and system-missing values. | Table Total N % | Percent
SUBTABLEPCT.TOTALN | Subtable percentage based on total count, including user-missing and system-missing values. | Subtable Total N % | Percent
LAYERPCT.TOTALN | Layer percentage based on total count, including user-missing and system-missing values. | Layer Total N % | Percent
LAYERROWPCT.TOTALN | Row percentage based on total count, including user-missing and system-missing values. Percentages sum to 100% across the entire row. | Layer Row Total N % | Percent
LAYERCOLPCT.TOTALN | Column percentage based on total count, including user-missing and system-missing values. Percentages sum to 100% across the entire column. | Layer Column Total N % | Percent

* This is the default on a U.S.-English system.

The .COUNT suffix can be omitted from percentages that are based on cell counts. Thus, ROWPCT is equivalent to ROWPCT.COUNT.

scale variables,scale variables,scale variables
functions in CTABLES command,functions in CTABLES command,functions in CTABLES command
CTABLES (command),CTABLES (command),CTABLES (command)
summary functions for scale variables,summary functions for scale variables,summary functions for scale variables
percentiles,percentiles,percentiles
CTABLES command,CTABLES command,CTABLES command
Summary functions: scale variables, totals, and subtotals
Function | Description | Default Label | Default Format
MAXIMUM | Largest value. | Maximum | General
MEAN | Arithmetic mean. The default for scale variables. | Mean | General
MEDIAN | 50th percentile. | Median | General
MINIMUM | Smallest value. | Minimum | General
MISSING | Count of missing values (both user-missing and system-missing). | Missing | General
MODE | Most frequent value. If there is a tie, the smallest value is shown. | Mode | General
PTILE | Percentile. Takes a numeric value between 0 and 100 as a required parameter. PTILE is computed the same way as APTILE in the TABLES command. Note that in the TABLES command, the default percentile method was HPTILE. | Percentile ####.## | General
RANGE | Difference between maximum and minimum values. | Range | General
SEMEAN | Standard error of the mean. | Std Error of Mean | General
STDDEV | Standard deviation. | Std Deviation | General
SUM | Sum of values. | Sum | General
TOTALN | Count of nonmissing, user-missing, and system-missing values. The count excludes valid values hidden via the CATEGORIES subcommand. | Total N | Count
VALIDN | Count of nonmissing values. | Valid N | Count
VARIANCE | Variance. | Variance | General
ROWPCT.SUM | Row percentage based on sums. | Row Sum % | Percent
COLPCT.SUM | Column percentage based on sums. | Column Sum % | Percent
TABLEPCT.SUM | Table percentage based on sums. | Table Sum % | Percent
SUBTABLEPCT.SUM | Subtable percentage based on sums. | Subtable Sum % | Percent
LAYERPCT.SUM | Layer percentage based on sums. | Layer Sum % | Percent
LAYERROWPCT.SUM | Row percentage based on sums. Percentages sum to 100% across the entire row. | Layer Row Sum % | Percent
LAYERCOLPCT.SUM | Column percentage based on sums. Percentages sum to 100% across the entire column. | Layer Column Sum % | Percent
CTABLES (command),CTABLES (command),CTABLES (command)
scale variable functions,scale variable functions,scale variable functions
multiple response sets,multiple response sets,multiple response sets
functions in CTABLES command,functions in CTABLES command,functions in CTABLES command
CTABLES (command),CTABLES (command),CTABLES (command)
multiple response functions,multiple response functions,multiple response functions
CTABLES (command),CTABLES (command),CTABLES (command)
summary functions for multiple response sets,summary functions for multiple response sets,summary functions for multiple response sets
Summary functions: multiple response sets
Function | Description | Default Label | Default Format
RESPONSES | Count of responses. | Responses | Count
ROWPCT.RESPONSES | Row percentage based on responses. Total number of responses is the denominator. | Row Responses % | Percent
COLPCT.RESPONSES | Column percentage based on responses. Total number of responses is the denominator. | Column Responses % | Percent
TABLEPCT.RESPONSES | Table percentage based on responses. Total number of responses is the denominator. | Table Responses % | Percent
SUBTABLEPCT.RESPONSES | Subtable percentage based on responses. Total number of responses is the denominator. | Subtable Responses % | Percent
LAYERPCT.RESPONSES | Layer percentage based on responses. Total number of responses is the denominator. | Layer Responses % | Percent
LAYERROWPCT.RESPONSES | Row percentage based on responses. Total number of responses is the denominator. Percentages sum to 100% across the entire row (that is, across subtables). | Layer Row Responses % | Percent
LAYERCOLPCT.RESPONSES | Column percentage based on responses. Total number of responses is the denominator. Percentages sum to 100% across the entire column (that is, across subtables). | Layer Column Responses % | Percent
ROWPCT.RESPONSES.COUNT | Row percentage: Responses are the numerator, and total count is the denominator. | Row Responses % (Base: Count) | Percent
COLPCT.RESPONSES.COUNT | Column percentage: Responses are the numerator, and total count is the denominator. | Column Responses % (Base: Count) | Percent
TABLEPCT.RESPONSES.COUNT | Table percentage: Responses are the numerator, and total count is the denominator. | Table Responses % (Base: Count) | Percent
SUBTABLEPCT.RESPONSES.COUNT | Subtable percentage: Responses are the numerator, and total count is the denominator. | Subtable Responses % (Base: Count) | Percent
LAYERPCT.RESPONSES.COUNT | Layer percentage: Responses are the numerator, and total count is the denominator. | Layer Responses % (Base: Count) | Percent
LAYERROWPCT.RESPONSES.COUNT | Row percentage: Responses are the numerator, and total count is the denominator. Percentages sum to 100% across the entire row (that is, across subtables). | Layer Row Responses % (Base: Count) | Percent
LAYERCOLPCT.RESPONSES.COUNT | Column percentage: Responses are the numerator, and total count is the denominator. Percentages sum to 100% across the entire column (that is, across subtables). | Layer Column Responses % (Base: Count) | Percent
ROWPCT.COUNT.RESPONSES | Row percentage: Count is the numerator, and total responses are the denominator. | Row Count % (Base: Responses) | Percent
COLPCT.COUNT.RESPONSES | Column percentage: Count is the numerator, and total responses are the denominator. | Column Count % (Base: Responses) | Percent
TABLEPCT.COUNT.RESPONSES | Table percentage: Count is the numerator, and total responses are the denominator. | Table Count % (Base: Responses) | Percent
SUBTABLEPCT.COUNT. RESPONSES | Subtable percentage: Count is the numerator, and total responses are the denominator. | Subtable Count % (Base: Responses) | Percent
LAYERPCT.COUNT. RESPONSES | Layer percentage: Count is the numerator, and total responses are the denominator. | Layer Count % (Base: Responses) | Percent
LAYERROWPCT.COUNT.RESPONSES | Row percentage: Count is the numerator, and total responses are the denominator. Percentages sum to 100% across the entire row (that is, across subtables). | Layer Row Count % (Base: Responses) | Percent
LAYERCOLPCT.COUNT.RESPONSES | Row percentage: Count is the numerator, and total responses are the denominator. Percentages sum to 100% across the entire column (that is, across subtables). | Layer Column Count % (Base: Responses) | Percent

Related Topics

TABLE Subcommand (CTABLES command)
Variable Types (CTABLES command)
Category Variables and Multiple Response Sets (CTABLES command)
Stacking and Nesting (CTABLES command)
Scale Variables (CTABLES command)
Formats for Summaries (CTABLES command)
Missing Values in Summaries (CTABLES command)


Formats for Summaries (CTABLES command)

formats for summary functions,formats for summary functions,formats for summary functions
CTABLES command,CTABLES command,CTABLES command
CTABLES (command),CTABLES (command),CTABLES (command)
formats for summaries,formats for summaries,formats for summaries

A default format is assigned to each summary function:

Count | The value is expressed in F (standard numeric) format with 0 decimal places. If you have fractional weights and want a count that reflects those weights, use F format with appropriate decimal places.
Percent | The value is expressed with one decimal place and a percent symbol.
General | The value is expressed in the variable’s print format.

These default formats are internal to CTABLES and cannot be used in table expressions. To override the default formats, use any of the print formats that are available in the Core system except Z, PBHEX, and HEX, or use the additional formats that are described in the following table.

Additional formats for summaries
Format | Description | Example
NEGPARENw.d | Parentheses appear around negative numbers. | –1234.567 formatted as NEGPAREN9.2 yields (1234.57).
NEQUALw.d | “N=” precedes the number. | 1234.567 formatted as NEQUAL9.2 yields N=1234.57.
PARENw.d | The number is parenthesized. | 1234.567 formatted as PAREN8.2 yields (1234.57).
PCTPARENw.d | A percent symbol follows the parenthesized value. | 1234.567 formatted as PCTPAREN10.2 yields (1234.57%).

Related Topics

TABLE Subcommand (CTABLES command)
Variable Types (CTABLES command)
Category Variables and Multiple Response Sets (CTABLES command)
Stacking and Nesting (CTABLES command)
Scale Variables (CTABLES command)
Specifying Summaries (CTABLES command)
Missing Values in Summaries (CTABLES command)


Missing Values in Summaries (CTABLES command)

CTABLES (command),CTABLES (command),CTABLES (command)
missing values,missing values,missing values
missing values,missing values,missing values
CTABLES command,CTABLES command,CTABLES command

The following table presents the rules for including cases in a table for VALIDN, COUNT, and TOTALN functions when values are included or excluded explicitly through an explicit category list or implicitly through inclusion or exclusion of user-missing values.

Inclusion/exclusion of values in summaries
Variable and Value Type | VALIDN | COUNT | TOTALN
Categorical Variable: shown valid value Multiple Dichotomy Set: at least one “true” value Multiple Category Set: at least one shown valid value Scale Variable: valid value | Include | Include | Include
Categorical Variable: included user-missing value Multiple Category Set: all values are included user-missing Scale Variable: user-missing or system-missing | Exclude | Include | Include
Categorical Variable: excluded user-missing or system-missing value Multiple Dichotomy Set: all values are “false” Multiple Category Set: all values are excluded user-missing, system-missing, or excluded valid, but at least one value is not excluded valid | Exclude | Exclude | Include
Categorical Variable: excluded valid value Multiple Dichotomy Set: all values are excluded valid values | Exclude | Exclude | Exclude

Related Topics

TABLE Subcommand (CTABLES command)
Variable Types (CTABLES command)
Category Variables and Multiple Response Sets (CTABLES command)
Stacking and Nesting (CTABLES command)
Scale Variables (CTABLES command)
Specifying Summaries (CTABLES command)
Formats for Summaries (CTABLES command)


SLABELS Subcommand (CTABLES command)

SLABELS (subcommand),SLABELS (subcommand),SLABELS (subcommand)
CTABLES command,CTABLES command,CTABLES command
labels,labels,labels
positioning summary labels in CTABLES command,positioning summary labels in CTABLES command,positioning summary labels in CTABLES command
summary labels,summary labels,summary labels
CTABLES command,CTABLES command,CTABLES command
CTABLES (command),CTABLES (command),CTABLES (command)
SLABELS subcommand,SLABELS subcommand,SLABELS subcommand
CTABLES (command),CTABLES (command),CTABLES (command)
summary label positioning,summary label positioning,summary label positioning

The SLABELS subcommand controls the position of summary statistics in the table and controls whether summary labels are shown.

/SLABELS POSITION= {COLUMN}  VISIBLE= {YES}
                   {ROW   }           {NO }
                   {LAYER }

By default, summaries appear in the columns and labels are visible.

CTABLES (command),CTABLES (command),CTABLES (command)
category label positioning,category label positioning,category label positioning

Example: Summary Label Positioning

CTABLES /TABLE NEWS [COUNT COLPCT].
CTABLES /TABLE NEWS [COUNT COLPCT]
  /SLABELS POSITION=ROW VISIBLE=NO.

Related Topics

CTABLES
Overview (CTABLES command)
Syntax Conventions (CTABLES command)
Examples (CTABLES command)
TABLE Subcommand (CTABLES command)
CLABELS Subcommand (CTABLES command)
CATEGORIES Subcommand (CTABLES command)
Explicit Category Specification (CTABLES command)
Implicit Category Specification (CTABLES command)
Totals (CTABLES command)
Empty Categories (CTABLES command)
TITLES Subcommand: Titles, Captions, and Corner Text (CTABLES command)
Significance Testing (CTABLES command)
Chi-Square Tests: SIGTEST Subcommand (CTABLES command)
Pairwise Comparisons of Proportions and Means: COMPARETEST Subcommand (CTABLES command)
FORMAT Subcommand (CTABLES command)
VLABELS Subcommand (CTABLES command)
SMISSING Subcommand (CTABLES command)
MRSETS Subcommand (CTABLES command)
PCOMPUTE Subcommand (CTABLES command)
PPROPERTIES Subcommand (CTABLES command)


CLABELS Subcommand (CTABLES command)

labels,labels,labels
positioning category labels in CTABLES command,positioning category labels in CTABLES command,positioning category labels in CTABLES command
category labels,category labels,category labels
positioning in CTABLES command,positioning in CTABLES command,positioning in CTABLES command
CTABLES (command),CTABLES (command),CTABLES (command)
CLABELS subcommand,CLABELS subcommand,CLABELS subcommand
CLABELS (subcommand),CLABELS (subcommand),CLABELS (subcommand)
CTABLES command,CTABLES command,CTABLES command

The CLABELS subcommand controls the location of category labels.

/CLABELS {AUTO                  }
         {ROWLABELS= {OPPOSITE} }
                     {LAYER   }
         {COLLABELS= {OPPOSITE} }
                     {LAYER   }

By default, category labels are nested under the variables to which they belong. Category labels for row and column variables can be moved to the opposite dimension or to the layers. If labels exist in both dimensions, only one dimension, row labels or column labels, can be moved; they cannot be swapped.

Example

CTABLES
  /TABLE (CONFINAN + CONEDUC + CONBUS + CONMEDIC + CONPRESS + CONTV )

• Six variables are stacked in the rows, and their category labels are stacked under them.

CTABLES
  /TABLE (CONFINAN + CONEDUC + CONBUS + CONMEDIC + CONPRESS + CONTV )
  /SLABELS VISIBLE=NO   /CLABELS ROWLABELS=OPPOSITE

• The category labels are moved to the columns. Where variables are stacked, as in this example, the value labels for all of the variables must be exactly the same to allow for this format. Additionally, all must have the same category specifications, and data-dependent sorting is not allowed.

Related Topics

CTABLES
Overview (CTABLES command)
Syntax Conventions (CTABLES command)
Examples (CTABLES command)
TABLE Subcommand (CTABLES command)
SLABELS Subcommand (CTABLES command)
CATEGORIES Subcommand (CTABLES command)
Explicit Category Specification (CTABLES command)
Implicit Category Specification (CTABLES command)
Totals (CTABLES command)
Empty Categories (CTABLES command)
TITLES Subcommand: Titles, Captions, and Corner Text (CTABLES command)
Significance Testing (CTABLES command)
Chi-Square Tests: SIGTEST Subcommand (CTABLES command)
Pairwise Comparisons of Proportions and Means: COMPARETEST Subcommand (CTABLES command)
FORMAT Subcommand (CTABLES command)
VLABELS Subcommand (CTABLES command)
SMISSING Subcommand (CTABLES command)
MRSETS Subcommand (CTABLES command)
PCOMPUTE Subcommand (CTABLES command)
PPROPERTIES Subcommand (CTABLES command)


CATEGORIES Subcommand (CTABLES command)

CLABELS (command),CLABELS (command),CLABELS (command)
CATEGORIES subcommand,CATEGORIES subcommand,CATEGORIES subcommand
CATEGORIES subcommand,CATEGORIES subcommand,CATEGORIES subcommand
CTABLES command,CTABLES command,CTABLES command

The CATEGORIES subcommand controls the order of categories in the rows and columns of the table, controls the showing and hiding of ordinary and user-missing values, and controls the computation of totals and subtotals.

/CATEGORIES  VARIABLES= varlist

    { [value, value, value...]                              }
    { ORDER= {A} KEY= {VALUE           } MISSING= {EXCLUDE} }
             {D}      {LABEL           }          {INCLUDE}
                      {summary(varname)}

     TOTAL= {NO  }  LABEL= "label" POSITION= {AFTER } EMPTY= {INCLUDE}
            {YES }                           {BEFORE}        {EXCLUDE}

The minimum specification is a variable list and one of the following specifications: a category specification, TOTAL specification, or EMPTY specification. The variable list can be a list of variables or the keyword ALL, which refers to all category variables in the table expression. ALL cannot be used with the explicit category list.

Related Topics

CTABLES
Overview (CTABLES command)
Syntax Conventions (CTABLES command)
Examples (CTABLES command)
TABLE Subcommand (CTABLES command)
SLABELS Subcommand (CTABLES command)
CLABELS Subcommand (CTABLES command)
Explicit Category Specification (CTABLES command)
Implicit Category Specification (CTABLES command)
Totals (CTABLES command)
Empty Categories (CTABLES command)
TITLES Subcommand: Titles, Captions, and Corner Text (CTABLES command)
Significance Testing (CTABLES command)
Chi-Square Tests: SIGTEST Subcommand (CTABLES command)
Pairwise Comparisons of Proportions and Means: COMPARETEST Subcommand (CTABLES command)
FORMAT Subcommand (CTABLES command)
VLABELS Subcommand (CTABLES command)
SMISSING Subcommand (CTABLES command)
MRSETS Subcommand (CTABLES command)
PCOMPUTE Subcommand (CTABLES command)
PPROPERTIES Subcommand (CTABLES command)


Explicit Category Specification (CTABLES command)

explicit category specification,explicit category specification,explicit category specification
in CTABLES command,in CTABLES command,in CTABLES command
CTABLES (command),CTABLES (command),CTABLES (command)
explicit category specification,explicit category specification,explicit category specification
CTABLES (command),CTABLES (command),CTABLES (command)
excluding valid values,excluding valid values,excluding valid values
valid values,valid values,valid values
excluding in CTABLES command,excluding in CTABLES command,excluding in CTABLES command

The explicit category specification is a bracketed list of data values or value ranges in the order in which they are to be displayed in the table. Values not included in the list are excluded from the table. This form allows for subtotals and showing or hiding of specific values (both ordinary and user-missing).

• The list can include both ordinary and user-missing values but not the system-missing value (.).

• Values are optionally separated by commas.

• String and date values must be quoted. Date values must be consistent with the variable's print format.

• The LO, THRU, and HI keywords can be used in the value list to refer to a range of categories. LO and HI can be used only as part of a range specification.

• The MISSING keyword can be used to refer to all user-missing values.

• The OTHERNM keyword can be used to refer to all nonmissing values that are not explicitly named in the list. The keyword can be placed anywhere within the list. The values to which it refers appear in ascending order.

• If a value is repeated in the list, the last instance is honored. Thus, for a variable RATING with integer values 1 through 5, the following specifications are equal:

/CATEGORIES VARIABLES = RATING [1,2,4,5,3]
/CATEGORIES VARIABLES = RATING [1 THRU 5,3]
/CATEGORIES VARIABLES = RATING [OTHERNM,3]

• For a multiple dichotomy set, you can order the variables in the set by using the names of the variables in the set. The variable names are not enclosed in quotation marks.

subtotals,subtotals,subtotals
CTABLES command,CTABLES command,CTABLES command
CTABLES (command),CTABLES (command),CTABLES (command)
subtotals,subtotals,subtotals

• The SUBTOTAL keyword is used within a category list to request subtotals for a variable. The position of a subtotal within the list determines where it will appear in the table and the categories to which it applies. By default, a subtotal applies to all values that precede it up to the next subtotal. If POSITION=BEFORE is specified (See the topic Totals (CTABLES command) for more information. ), subtotals apply to the categories that follow them in the list. Hierarchical and overlapping subtotals are not supported. You can specify a label for a subtotal by placing the label in quotation marks immediately following the SUBTOTAL keyword and an equals sign, as illustrated in the following example:

Example

CTABLES  /TABLE AGECAT
   /CATEGORIES VARIABLES=AGECAT [1, 2, 3, SUBTOTAL='Subtotal < 45',
   4, 5, 6, SUBTOTAL='Subtotal 45+'].
collapsing table categories,collapsing table categories,collapsing table categories
CTABLES command,CTABLES command,CTABLES command
CTABLES (command),CTABLES (command),CTABLES (command)
collapsing table categories,collapsing table categories,collapsing table categories

• The HSUBTOTAL keyword functions just like the SUBTOTAL keyword, except that only the subtotal is displayed in the table; the categories that define the subtotal are not included in the table. So you can use HSUBTOTAL to collapse categories in a table without recoding the original variables.

Example

CTABLES  /TABLE AGECAT
   /CATEGORIES VARIABLES=AGECAT [1, 2, 3, HSUBTOTAL='Under 45',
       4, 5, 6, HSUBTOTAL='45 or older']..

Related Topics

CTABLES
Overview (CTABLES command)
Syntax Conventions (CTABLES command)
Examples (CTABLES command)
TABLE Subcommand (CTABLES command)
SLABELS Subcommand (CTABLES command)
CLABELS Subcommand (CTABLES command)
CATEGORIES Subcommand (CTABLES command)
Implicit Category Specification (CTABLES command)
Totals (CTABLES command)
Empty Categories (CTABLES command)
TITLES Subcommand: Titles, Captions, and Corner Text (CTABLES command)
Significance Testing (CTABLES command)
Chi-Square Tests: SIGTEST Subcommand (CTABLES command)
Pairwise Comparisons of Proportions and Means: COMPARETEST Subcommand (CTABLES command)
FORMAT Subcommand (CTABLES command)
VLABELS Subcommand (CTABLES command)
SMISSING Subcommand (CTABLES command)
MRSETS Subcommand (CTABLES command)
PCOMPUTE Subcommand (CTABLES command)
PPROPERTIES Subcommand (CTABLES command)


Implicit Category Specification (CTABLES command)

implicit category specification,implicit category specification,implicit category specification
CTABLES command,CTABLES command,CTABLES command

The implicit list allows you to sort the categories and to show or hide user-missing values without having to enumerate the values. The implicit list also provides for data-dependent sorting. If you do not supply an explicit value list, you can use the following keywords:

CTABLES (command),CTABLES (command),CTABLES (command)
sorting categories,sorting categories,sorting categories
sorting categories,sorting categories,sorting categories
CTABLES command,CTABLES command,CTABLES command
ORDER (keyword),ORDER (keyword),ORDER (keyword)
CTABLES command,CTABLES command,CTABLES command
MISSING (keyword),MISSING (keyword),MISSING (keyword)
CTABLES command,CTABLES command,CTABLES command
ORDER | The sorting order. You can select A (the default) for ascending order, or D for descending order.
KEY | The sort key. You can specify VALUE (the default) to sort by the values or LABEL to sort by the value labels. When values are sorted by label, any unlabeled values appear after the labeled values in the table. You can also specify a summary function for data-dependent sorting.
MISSING | Whether user-missing values are included. You can specify EXCLUDE (the default) or INCLUDE. System-missing values are never included.

Data-Dependent Sorting. The following conventions and limitations apply to sorting by using a summary function as the key:

• The sort function must be a summary function that is supported in CTABLES.

• The sort function must be used in the table. The exception to this rule is COUNT. You can sort by COUNT even if counts do not appear in the table.

• Data-dependent sorting is not available if category labels are repositioned by using the CLABELS subcommand.

• Summary functions that are available only for scale variables require that you give the variable name in parentheses, as in MEAN(age). For percentiles, the variable name must be followed by a comma and an integer value between 0 and 100, as in PTILE(age, 75). Other functions, such as COUNT, do not require a variable name, but you can supply a variable name to restrict the sort.

• When a variable name is given, and multiple logical tables are created through stacking, the entire table is sorted based on the first logical table that includes the categorical variable that is being sorted and the variable that is specified in the key.

• When a table contains more than one dimension, the sort is based on the distribution of the key within the categories of the sorted variable, without regard to the contents of the other dimensions. Thus, given the table

CTABLES /TABLE A BY B + C /CAT VAR=A ORDER=A KEY=COUNT(A),

the rows are sorted according to the counts for the categories of A, without regard to the values of B and C. If there are no missing values in the other dimension, the result is the same as sorting on the totals for that dimension (in this case, B or C). If the other dimension has an unbalanced pattern of missing values, the sorting may give unexpected results; however, the result is unaffected by differences in the pattern for B and C.

• If the sort variable is crossed with stacked category variables, the first table in the stack determines the sort order.

• To ensure that the categories are sorted the same way in each layer of the pivot table, layer variables are ignored for the purpose of sorting.

Example

CTABLES
  /TABLE CAR1 BY AGECAT
  /CATEGORIES VARIABLES=AGECAT TOTAL=YES
  /CATEGORIES VARIABLES=CAR1 ORDER=D KEY=COUNT.

• The first CATEGORIES subcommand requests a total across all age categories.

• The second CATEGORIES subcommand requests a sort of the categories of CAR1 in descending order (using COUNT as the key). The categories of CAR1 are sorted according to the total counts.

Example

CTABLES
  /TABLE AGE [MEAN F5.1] > CAR1 BY SEX
  /CATEGORIES VARIABLES=SEX TOTAL=YES
  /CATEGORIES VARIABLES=CAR1 KEY=MEAN(AGE).

• The first CATEGORIES subcommand requests a total across the values of SEX.

• The second CATEGORIES subcommand requests that the categories of CAR1 be sorted according to the mean of AGE. The categories are sorted according to the total means for both sexes, and that would be the case if the totals were not shown in the table.

Related Topics

CTABLES
Overview (CTABLES command)
Syntax Conventions (CTABLES command)
Examples (CTABLES command)
TABLE Subcommand (CTABLES command)
SLABELS Subcommand (CTABLES command)
CLABELS Subcommand (CTABLES command)
CATEGORIES Subcommand (CTABLES command)
Explicit Category Specification (CTABLES command)
Totals (CTABLES command)
Empty Categories (CTABLES command)
TITLES Subcommand: Titles, Captions, and Corner Text (CTABLES command)
Significance Testing (CTABLES command)
Chi-Square Tests: SIGTEST Subcommand (CTABLES command)
Pairwise Comparisons of Proportions and Means: COMPARETEST Subcommand (CTABLES command)
FORMAT Subcommand (CTABLES command)
VLABELS Subcommand (CTABLES command)
SMISSING Subcommand (CTABLES command)
MRSETS Subcommand (CTABLES command)
PCOMPUTE Subcommand (CTABLES command)
PPROPERTIES Subcommand (CTABLES command)


Totals (CTABLES command)

totals,totals,totals
CTABLES command,CTABLES command,CTABLES command
CTABLES (command),CTABLES (command),CTABLES (command)
totals,totals,totals

A total can be specified for any category variable regardless of its level of nesting within a dimension. Totals can be requested in more than one dimension. The following options are available:

TOTAL (keyword),TOTAL (keyword),TOTAL (keyword)
CTABLES command,CTABLES command,CTABLES command
CTABLES (command),CTABLES (command),CTABLES (command)
position of totals,position of totals,position of totals
position of totals,position of totals,position of totals
CTABLES command,CTABLES command,CTABLES command
TOTAL | Whether to display a total for a variable. You can specify TOTAL=NO (the default) or TOTAL=YES.
LABEL | The label for the total. The specification is a quoted string.
POSITION | Whether a total comes after or before the categories of the variable being totaled. You can specify AFTER (the default) or BEFORE. POSITION also determines whether subtotals that are specified in an explicit list of categories apply to the categories that precede them (AFTER) or follow them (BEFORE).
scale variables,scale variables,scale variables
totaling in CTABLES command,totaling in CTABLES command,totaling in CTABLES command
CTABLES (command),CTABLES (command),CTABLES (command)
scale variable totals,scale variable totals,scale variable totals

Scale variables cannot be totaled directly. To obtain a total or subtotals for a scale variable, request the total or subtotals for the category variable within whose categories the summaries for the scale variable appear.

Example

CTABLES /TABLE AGECAT
  /CATEGORIES VARIABLES=AGECAT TOTAL=YES LABEL='Total Respondents'.

Example

CTABLES /TABLE AGE [MEAN 'Average' F5.1] > SEX
  /CATEGORIES VARIABLES=SEX TOTAL=YES LABEL='Combined'.

• The summary function for AGE appears in cells that are determined by the values of SEX. The total is requested for SEX to obtain the average age across both sexes.

Related Topics

CTABLES
Overview (CTABLES command)
Syntax Conventions (CTABLES command)
Examples (CTABLES command)
TABLE Subcommand (CTABLES command)
SLABELS Subcommand (CTABLES command)
CLABELS Subcommand (CTABLES command)
CATEGORIES Subcommand (CTABLES command)
Explicit Category Specification (CTABLES command)
Implicit Category Specification (CTABLES command)
Empty Categories (CTABLES command)
TITLES Subcommand: Titles, Captions, and Corner Text (CTABLES command)
Significance Testing (CTABLES command)
Chi-Square Tests: SIGTEST Subcommand (CTABLES command)
Pairwise Comparisons of Proportions and Means: COMPARETEST Subcommand (CTABLES command)
FORMAT Subcommand (CTABLES command)
VLABELS Subcommand (CTABLES command)
SMISSING Subcommand (CTABLES command)
MRSETS Subcommand (CTABLES command)
PCOMPUTE Subcommand (CTABLES command)
PPROPERTIES Subcommand (CTABLES command)


Empty Categories (CTABLES command)

CTABLES (command),CTABLES (command),CTABLES (command)
empty categories,empty categories,empty categories
empty categories,empty categories,empty categories
excluding in CTABLES command,excluding in CTABLES command,excluding in CTABLES command
empty categories,empty categories,empty categories
including in CTABLES command,including in CTABLES command,including in CTABLES command

Empty categories are those categories for which no cases appear in the data. For an explicit category list, this includes all explicitly named values and all labeled values that are implied by THRU, OTHERNM, or MISSING. For an implicit category list, this includes all values for which value labels exist.

EMPTY Whether to show categories whose count is zero. You can specify EMPTY=INCLUDE (the default) or EMPTY=EXCLUDE.

Related Topics

CTABLES
Overview (CTABLES command)
Syntax Conventions (CTABLES command)
Examples (CTABLES command)
TABLE Subcommand (CTABLES command)
SLABELS Subcommand (CTABLES command)
CLABELS Subcommand (CTABLES command)
CATEGORIES Subcommand (CTABLES command)
Explicit Category Specification (CTABLES command)
Implicit Category Specification (CTABLES command)
Totals (CTABLES command)
TITLES Subcommand: Titles, Captions, and Corner Text (CTABLES command)
Significance Testing (CTABLES command)
Chi-Square Tests: SIGTEST Subcommand (CTABLES command)
Pairwise Comparisons of Proportions and Means: COMPARETEST Subcommand (CTABLES command)
FORMAT Subcommand (CTABLES command)
VLABELS Subcommand (CTABLES command)
SMISSING Subcommand (CTABLES command)
MRSETS Subcommand (CTABLES command)
PCOMPUTE Subcommand (CTABLES command)
PPROPERTIES Subcommand (CTABLES command)


TITLES Subcommand: Titles, Captions, and Corner Text (CTABLES command)

CTABLES (command),CTABLES (command),CTABLES (command)
TITLES subcommand,TITLES subcommand,TITLES subcommand
TITLES (subcommand),TITLES (subcommand),TITLES (subcommand)
CTABLES command,CTABLES command,CTABLES command

The TITLES subcommand specifies table annotations. If the subcommand is used, a title, caption, or corner text must be specified. No caption, title, or corner text is displayed by default.

 /TITLES  CAPTION= ['text' 'text'...]
          CORNER=  ['text' 'text'...]
          TITLE=   ['text' 'text'...]
CAPTION (keyword),CAPTION (keyword),CAPTION (keyword)
CTABLES command,CTABLES command,CTABLES command
captions,captions,captions
CTABLES command,CTABLES command,CTABLES command
CTABLES (command),CTABLES (command),CTABLES (command)
caption lines,caption lines,caption lines
CORNER (keyword),CORNER (keyword),CORNER (keyword)
CTABLES command,CTABLES command,CTABLES command
corner text,corner text,corner text
CTABLES command,CTABLES command,CTABLES command
CTABLES (command),CTABLES (command),CTABLES (command)
corner text,corner text,corner text
CTABLES (command),CTABLES (command),CTABLES (command)
TITLE keyword,TITLE keyword,TITLE keyword
CAPTION | Caption lines. The caption appears below the table. Multiple lines can be specified. Each line must be quoted.
CORNER | Corner text. Corner text appears in the corner cell of the table, above row titles and next to column titles. Multiple lines can be specified. Each line must be quoted.
 | Pivot tables show all corner text that fits in the corner cell. The specified text is ignored if the table has no corner cell.
 | The system default TableLook uses the corner area for display of row dimension labels. To display CTABLES corner text, the Row Dimension Labels setting in Table Properties should be set to Nested. This choice can be preset in the default TableLook.
TITLE | Title text. The title appears above the table. Multiple lines can be specified. Each line must be quoted.

The following symbols can be used within any caption, corner text, or title line. Each symbol must be specified by using an opening right parenthesis and all uppercase letters.

)DATE (keyword),)DATE (keyword),)DATE (keyword)
CTABLES command,CTABLES command,CTABLES command
CTABLES (command),CTABLES (command),CTABLES (command)
dates in titles,dates in titles,dates in titles
)TIME (keyword),)TIME (keyword),)TIME (keyword)
CTABLES command,CTABLES command,CTABLES command
)TABLE (keyword),)TABLE (keyword),)TABLE (keyword)
CTABLES command,CTABLES command,CTABLES command
CTABLES (command),CTABLES (command),CTABLES (command)
table description in titles,table description in titles,table description in titles
)DATE | Current date. Displays a locale-appropriate date stamp that includes the year, month, and day.
)TIME | Current time. Displays a locale-appropriate time stamp.
)TABLE | Table description. Inserts a description of the table, which consists of the table expression stripped of measurement levels, statistics specifications, and /TABLE. If variable labels are available, they are used instead of variable names in the table expression.

Example

CTABLES /VLABELS VARIABLES=SEX HAPMAR DISPLAY=NONE
  /TABLE SEX > HAPMAR BY CHILDCAT [COLPCT]
  /SLABELS VISIBLE=NO
  /TITLE TITLE = 'Marital Happiness for Men and Women '+
              'by Number of Children'
         CAPTION= 'Report created at )TIME on )DATE' ')TABLE'.

• The VLABELS subcommand suppresses the display of variable labels for SEX and HAPMAR.

• The SLABELS subcommand suppresses the default label for the summary function.

• The TITLE specification on the TITLE subcommand uses the standard PASW Statistics convention to break a single string across input lines.

• The CAPTION specification uses the )DATE, )TIME, and )TABLE keywords to print the date, time, and a description of the table structure.

Related Topics

CTABLES
Overview (CTABLES command)
Syntax Conventions (CTABLES command)
Examples (CTABLES command)
TABLE Subcommand (CTABLES command)
SLABELS Subcommand (CTABLES command)
CLABELS Subcommand (CTABLES command)
CATEGORIES Subcommand (CTABLES command)
Explicit Category Specification (CTABLES command)
Implicit Category Specification (CTABLES command)
Totals (CTABLES command)
Empty Categories (CTABLES command)
Significance Testing (CTABLES command)
Chi-Square Tests: SIGTEST Subcommand (CTABLES command)
Pairwise Comparisons of Proportions and Means: COMPARETEST Subcommand (CTABLES command)
FORMAT Subcommand (CTABLES command)
VLABELS Subcommand (CTABLES command)
SMISSING Subcommand (CTABLES command)
MRSETS Subcommand (CTABLES command)
PCOMPUTE Subcommand (CTABLES command)
PPROPERTIES Subcommand (CTABLES command)


Significance Testing (CTABLES command)

Custom Tables can perform the chi-square test of independence and pairwise comparisons of column proportions for tables that contain at least one category variable in both the rows and the columns. Custom Tables can perform pairwise comparisons of column means for tables that contain at least one summary variable in the rows and one category variable in the columns.

Related Topics

CTABLES
Overview (CTABLES command)
Syntax Conventions (CTABLES command)
Examples (CTABLES command)
TABLE Subcommand (CTABLES command)
SLABELS Subcommand (CTABLES command)
CLABELS Subcommand (CTABLES command)
CATEGORIES Subcommand (CTABLES command)
Explicit Category Specification (CTABLES command)
Implicit Category Specification (CTABLES command)
Totals (CTABLES command)
Empty Categories (CTABLES command)
TITLES Subcommand: Titles, Captions, and Corner Text (CTABLES command)
Chi-Square Tests: SIGTEST Subcommand (CTABLES command)
Pairwise Comparisons of Proportions and Means: COMPARETEST Subcommand (CTABLES command)
FORMAT Subcommand (CTABLES command)
VLABELS Subcommand (CTABLES command)
SMISSING Subcommand (CTABLES command)
MRSETS Subcommand (CTABLES command)
PCOMPUTE Subcommand (CTABLES command)
PPROPERTIES Subcommand (CTABLES command)


Chi-Square Tests: SIGTEST Subcommand (CTABLES command)

CTABLES (command),CTABLES (command),CTABLES (command)
SIGTEST subcommand,SIGTEST subcommand,SIGTEST subcommand
SIGTEST (subcommand),SIGTEST (subcommand),SIGTEST (subcommand)
CTABLES command,CTABLES command,CTABLES command
CHISQUARE (keyword),CHISQUARE (keyword),CHISQUARE (keyword)
CTABLES command,CTABLES command,CTABLES command
 /SIGTEST TYPE= CHISQUARE  ALPHA= {0.05              }
                                  {significance level}

          INCLUDEMRSETS={YES**}
                        {NO   }

          CATEGORIES={ALLVISIBLE**}
                     {SUBTOTALS   }

The SIGTEST subcommand has the following specifications:

TYPE | Type of significance test. The specification is required. The only current choice is CHISQUARE.
ALPHA | Significance level for the test. The specification must be greater than 0 and less than 1. The default is 0.05.
INCLUDEMRSETS | Include multiple response variables in tests. If there are no multiple response sets, this keyword is ignored. If INCLUDEMRSETS=YES and COUNTDUPLICATES=YES on the MRSETS subcommand, multiple response sets are suppressed with a warning.
CATEGORIES | Replacing categories with subtotals for testing. If SUBTOTALS is specified, each subtotal replaces its categories for significance testing. If ALLVISIBLE is specified, only subtotals that are specified by using the HSUBTOTAL keyword replace their categories for testing.

Example

CTABLES /TABLE AGECAT BY MARITAL
  /CATEGORIES VARIABLES=AGECAT MARITAL TOTAL=YES
  /SIGTEST TYPE=CHISQUARE.

Related Topics

CTABLES
Overview (CTABLES command)
Syntax Conventions (CTABLES command)
Examples (CTABLES command)
TABLE Subcommand (CTABLES command)
SLABELS Subcommand (CTABLES command)
CLABELS Subcommand (CTABLES command)
CATEGORIES Subcommand (CTABLES command)
Explicit Category Specification (CTABLES command)
Implicit Category Specification (CTABLES command)
Totals (CTABLES command)
Empty Categories (CTABLES command)
TITLES Subcommand: Titles, Captions, and Corner Text (CTABLES command)
Significance Testing (CTABLES command)
Pairwise Comparisons of Proportions and Means: COMPARETEST Subcommand (CTABLES command)
FORMAT Subcommand (CTABLES command)
VLABELS Subcommand (CTABLES command)
SMISSING Subcommand (CTABLES command)
MRSETS Subcommand (CTABLES command)
PCOMPUTE Subcommand (CTABLES command)
PPROPERTIES Subcommand (CTABLES command)


Pairwise Comparisons of Proportions and Means: COMPARETEST Subcommand (CTABLES command)

pairwise comparisons,pairwise comparisons,pairwise comparisons
CTABLES command,CTABLES command,CTABLES command
CTABLES (command),CTABLES (command),CTABLES (command)
COMPARETEST subcommand,COMPARETEST subcommand,COMPARETEST subcommand
COMPARETEST (subcommand),COMPARETEST (subcommand),COMPARETEST (subcommand)
CTABLES command,CTABLES command,CTABLES command
 /COMPARETEST TYPE= {PROP}  ALPHA= {0.05              }
                    {MEAN}         {significance level}

          ADJUST= {BONFERRONI}  ORIGIN=COLUMN
                  {NONE      }

          INCLUDEMRSETS={YES**}  MEANSVARIANCE={ALLCATS   }
                        {NO   }                {TESTEDCATS}

          CATEGORIES={ALLVISIBLE**}
                     {SUBTOTALS   }

          MERGE={NO}
                {YES}

The COMPARETEST subcommand has the following specifications:

Bonferroni correction,Bonferroni correction,Bonferroni correction
CTABLES command,CTABLES command,CTABLES command
TYPE | The type of pairwise comparison. The specification is required. To compare proportions when the test variable in the rows is categorical, choose PROP. To compare means when the test variable in the rows is scale, choose MEAN.
ALPHA | The significance level for the test. The specification must be greater than 0 and less than 1. The default is 0.05.
ADJUST | The method for adjusting p values for multiple comparisons. Valid options are NONE and BONFERRONI. If ADJUST is not specified, the Bonferroni correction is used.
ORIGIN | The direction of the comparison. This specification will determine whether column means (proportions) or row means (proportions) are being compared. Currently, only COLUMN is supported.
INCLUDEMRSETS | Include multiple response variables in tests. If there are no multiple response sets, this keyword is ignored. If INCLUDEMRSETS=YES and COUNTDUPLICATES=YES on the MRSETS subcommand, multiple response sets are suppressed with a warning.
MEANSVARIANCE | Computation of variance for means test. The variance for the means test is always based on the categories that are compared for multiple response tests, but for ordinary categorical variables, the variance can be estimated from just the categories that are compared or all categories. This keyword is ignored unless TYPE=MEAN.
CATEGORIES | Replacing categories with subtotals for testing. If SUBTOTALS is specified, each subtotal replaces its categories for significance testing. If ALLVISIBLE is specified, only subtotals that are specified by using the HSUBTOTAL keyword replace their categories for testing.
MERGE | Merge significance indicators into the main table. If NO is specified, significant differences are indicated in a separate table that follows the main table. If YES is specified, significance differences indicators are merged with the main table. The main table identifies significant differences with APA-style formatting using subscript letters.

Example

CTABLES /TABLE AGECAT BY MARITAL
  /CATEGORIES VARIABLES=AGECAT MARITAL TOTAL=YES
  /COMPARETEST TYPE=PROP ALPHA=.01.

• The table of counts is identical to that shown in the example for chi-square above.

• The comparison output shows a number of predictable pairs for marital status among different age groups that are significant at the 0.01 level that is specified with ALPHA in the command.

Example

CTABLES /TABLE AGE > SEX BY MARITAL
  /CATEGORIES VARIABLES=SEX TOTAL=YES
  /COMPARETEST TYPE=MEAN.

Related Topics

CTABLES
Overview (CTABLES command)
Syntax Conventions (CTABLES command)
Examples (CTABLES command)
TABLE Subcommand (CTABLES command)
SLABELS Subcommand (CTABLES command)
CLABELS Subcommand (CTABLES command)
CATEGORIES Subcommand (CTABLES command)
Explicit Category Specification (CTABLES command)
Implicit Category Specification (CTABLES command)
Totals (CTABLES command)
Empty Categories (CTABLES command)
TITLES Subcommand: Titles, Captions, and Corner Text (CTABLES command)
Significance Testing (CTABLES command)
Chi-Square Tests: SIGTEST Subcommand (CTABLES command)
FORMAT Subcommand (CTABLES command)
VLABELS Subcommand (CTABLES command)
SMISSING Subcommand (CTABLES command)
MRSETS Subcommand (CTABLES command)
PCOMPUTE Subcommand (CTABLES command)
PPROPERTIES Subcommand (CTABLES command)


FORMAT Subcommand (CTABLES command)

FORMAT (subcommand),FORMAT (subcommand),FORMAT (subcommand)
CTABLES command,CTABLES command,CTABLES command
CTABLES (command),CTABLES (command),CTABLES (command)
FORMAT subcommand,FORMAT subcommand,FORMAT subcommand
EMPTY (keyword),EMPTY (keyword),EMPTY (keyword)
CTABLES command,CTABLES command,CTABLES command
CTABLES (command),CTABLES (command),CTABLES (command)
empty cell format,empty cell format,empty cell format
 /FORMAT MINCOLWIDTH={DEFAULT}  MAXCOLWIDTH={DEFAULT}
                     {value  }              {value  }

         UNITS={POINTS}   EMPTY= {ZERO   }   MISSING= {'.'    }
               {INCHES}          {BLANK  }            {'chars'}
               {CM    }          {'chars'}

The FORMAT subcommand controls the appearance of the table. At least one of the following attributes must be specified: MINCOLWIDTH, MAXCOLWIDTH, UNITS, EMPTY, or MISSING.

column width,column width,column width
CTABLES command,CTABLES command,CTABLES command
CTABLES (command),CTABLES (command),CTABLES (command)
column width,column width,column width
missing summary,missing summary,missing summary
CTABLES command,CTABLES command,CTABLES command
CTABLES (command),CTABLES (command),CTABLES (command)
empty cells,empty cells,empty cells
MISSING (keyword),MISSING (keyword),MISSING (keyword)
CTABLES command,CTABLES command,CTABLES command
CTABLES (command),CTABLES (command),CTABLES (command)
missing summaries,missing summaries,missing summaries
MINCOLWIDTH | The minimum width of columns in the table. This setting includes the main tables as well as any tables of significance tests. DEFAULT honors the column labels setting in the current TableLook. The value must be less than or equal to the setting for MAXCOLWIDTH.
MAXCOLWIDTH | The maximum width of columns in the table. This setting includes the main tables as well as any tables of significance tests. DEFAULT honors the column labels setting in the current TableLook. The value must be greater than or equal to the setting for MINCOLWIDTH.
UNITS | The measurement system for column width values. The default is POINTS. You can also specify INCHES or CM (centimeters). UNITS is ignored unless MINCOLWIDTH or MAXCOLWIDTH is specified.
EMPTY | Fill characters used when a count or percentage is zero. ZERO (the default) displays a 0 using the format for the cell statistic. BLANK leaves the statistic blank. You can also specify a quoted character string. If the string is too wide for the cell, the text is truncated.
 | If FORMAT EMPTY=BLANK, there will be no visible difference between cells that have a count of 0 and cells for which no statistics are defined.
MISSING | Fill characters used when a cell statistic cannot be computed. This specification applies to non-empty cells for which a statistic, such as standard deviation, cannot be computed. The default is a period (.). You can specify a quoted string. If the string is too wide for the cell, the text is truncated.

Related Topics

CTABLES
Overview (CTABLES command)
Syntax Conventions (CTABLES command)
Examples (CTABLES command)
TABLE Subcommand (CTABLES command)
SLABELS Subcommand (CTABLES command)
CLABELS Subcommand (CTABLES command)
CATEGORIES Subcommand (CTABLES command)
Explicit Category Specification (CTABLES command)
Implicit Category Specification (CTABLES command)
Totals (CTABLES command)
Empty Categories (CTABLES command)
TITLES Subcommand: Titles, Captions, and Corner Text (CTABLES command)
Significance Testing (CTABLES command)
Chi-Square Tests: SIGTEST Subcommand (CTABLES command)
Pairwise Comparisons of Proportions and Means: COMPARETEST Subcommand (CTABLES command)
VLABELS Subcommand (CTABLES command)
SMISSING Subcommand (CTABLES command)
MRSETS Subcommand (CTABLES command)
PCOMPUTE Subcommand (CTABLES command)
PPROPERTIES Subcommand (CTABLES command)


VLABELS Subcommand (CTABLES command)

variable labels,variable labels,variable labels
CTABLES command,CTABLES command,CTABLES command
CTABLES (command),CTABLES (command),CTABLES (command)
variable labels,variable labels,variable labels
VLABELS (subcommand),VLABELS (subcommand),VLABELS (subcommand)
CTABLES command,CTABLES command,CTABLES command
CTABLES (command),CTABLES (command),CTABLES (command)
VLABELS subcommand,VLABELS subcommand,VLABELS subcommand
 /VLABELS VARIABLES=varlist

         DISPLAY={DEFAULT}
                 {NAME   }
                 {LABEL  }
                 {BOTH   }
                 {NONE   }

By default, the display of variable labels is controlled by the TVARS specification on the SET command in the Core system. The VLABELS subcommand allows you to show a name, label, or both for each table variable. The minimum specification is a variable list and a DISPLAY specification. To give different specifications for different variables, use multiple VLABELS subcommands.

VARIABLES | The variables to which the subcommand applies. You can use ALL or VARNAME TO VARNAME, which refers to the order of variables in the current active data file. If a specified variable does not appear in a table, VLABELS is ignored for that variable.
DISPLAY | Whether the variable's name, label, both, or neither is shown in the table. DEFAULT honors the SET TVARS setting. NAME shows the variable name only. LABEL shows the variable label only. BOTH shows the variable name and label. NONE hides the name and label.

Related Topics

CTABLES
Overview (CTABLES command)
Syntax Conventions (CTABLES command)
Examples (CTABLES command)
TABLE Subcommand (CTABLES command)
SLABELS Subcommand (CTABLES command)
CLABELS Subcommand (CTABLES command)
CATEGORIES Subcommand (CTABLES command)
Explicit Category Specification (CTABLES command)
Implicit Category Specification (CTABLES command)
Totals (CTABLES command)
Empty Categories (CTABLES command)
TITLES Subcommand: Titles, Captions, and Corner Text (CTABLES command)
Significance Testing (CTABLES command)
Chi-Square Tests: SIGTEST Subcommand (CTABLES command)
Pairwise Comparisons of Proportions and Means: COMPARETEST Subcommand (CTABLES command)
FORMAT Subcommand (CTABLES command)
SMISSING Subcommand (CTABLES command)
MRSETS Subcommand (CTABLES command)
PCOMPUTE Subcommand (CTABLES command)
PPROPERTIES Subcommand (CTABLES command)


SMISSING Subcommand (CTABLES command)

CTABLES (command),CTABLES (command),CTABLES (command)
SMISSING subcommand,SMISSING subcommand,SMISSING subcommand
SMISSING (subcommand),SMISSING (subcommand),SMISSING (subcommand)
CTABLES command,CTABLES command,CTABLES command
missing values,missing values,missing values
CTABLES command,CTABLES command,CTABLES command
CTABLES (command),CTABLES (command),CTABLES (command)
missing values,missing values,missing values
listwise deletion,listwise deletion,listwise deletion
CTABLES command,CTABLES command,CTABLES command
 /SMISSING {VARIABLE}
           {LISTWISE}

If more than one scale variable is included in a table, you can control whether cases that are missing on one variable are included in summaries for which they have valid values.

VARIABLE | Exclude cases variable by variable. A case is included in summaries for each scale variable for which the case has a valid value regardless of whether the case has missing values for other scale variables in the table.
LISTWISE | Exclude cases that are missing on any scale variable in the table. This process ensures that summaries for all scale variables in the table are based on the same set of cases.

Listwise deletion applies on a per-table basis. Thus, given the specification

/TABLE (AGE [MEAN,COUNT]>SEX) + (AGE+CHILDS)[MEAN,COUNT] > HAPPY

all cases with valid values for AGE will be used in the AGE > SEX table, regardless of whether they have missing values for CHILDS (assuming that they also have valid values for SEX).

Related Topics

CTABLES
Overview (CTABLES command)
Syntax Conventions (CTABLES command)
Examples (CTABLES command)
TABLE Subcommand (CTABLES command)
SLABELS Subcommand (CTABLES command)
CLABELS Subcommand (CTABLES command)
CATEGORIES Subcommand (CTABLES command)
Explicit Category Specification (CTABLES command)
Implicit Category Specification (CTABLES command)
Totals (CTABLES command)
Empty Categories (CTABLES command)
TITLES Subcommand: Titles, Captions, and Corner Text (CTABLES command)
Significance Testing (CTABLES command)
Chi-Square Tests: SIGTEST Subcommand (CTABLES command)
Pairwise Comparisons of Proportions and Means: COMPARETEST Subcommand (CTABLES command)
FORMAT Subcommand (CTABLES command)
VLABELS Subcommand (CTABLES command)
MRSETS Subcommand (CTABLES command)
PCOMPUTE Subcommand (CTABLES command)
PPROPERTIES Subcommand (CTABLES command)


MRSETS Subcommand (CTABLES command)

MRSETS (subcommand),MRSETS (subcommand),MRSETS (subcommand)
CTABLES command,CTABLES command,CTABLES command
CTABLES (command),CTABLES (command),CTABLES (command)
MRSETS subcommand,MRSETS subcommand,MRSETS subcommand
COUNTDUPLICATES (keyword),COUNTDUPLICATES (keyword),COUNTDUPLICATES (keyword)
CTABLES command,CTABLES command,CTABLES command
multiple response sets,multiple response sets,multiple response sets
CTABLES command,CTABLES command,CTABLES command
CTABLES (command),CTABLES (command),CTABLES (command)
multiple response sets,multiple response sets,multiple response sets
 /MRSETS COUNTDUPLICATES= {NO }
                          {YES}

For multiple response sets that combine multiple category variables, a respondent can select the same response for more than one of the variables. Typically, only one response is desired. For example, $MAGS can combine MAG1 to MAG5 to record which magazines a respondent reads regularly. If a respondent indicated the same magazine for MAG1 and MAG2, you would not want to count that magazine twice. However, if $CARS combines CAR1 to CAR5 to indicate which cars a respondent owns now, and a respondent owns two cars of the same make, you might want to count both responses. The MRSETS subcommand allows you to specify whether duplicates are counted. By default, duplicates are not counted.

The MRSETS specification applies only to RESPONSES and percentages based on RESPONSES. MRSETS does not affect counts, which always ignore duplicates.

Related Topics

CTABLES
Overview (CTABLES command)
Syntax Conventions (CTABLES command)
Examples (CTABLES command)
TABLE Subcommand (CTABLES command)
SLABELS Subcommand (CTABLES command)
CLABELS Subcommand (CTABLES command)
CATEGORIES Subcommand (CTABLES command)
Explicit Category Specification (CTABLES command)
Implicit Category Specification (CTABLES command)
Totals (CTABLES command)
Empty Categories (CTABLES command)
TITLES Subcommand: Titles, Captions, and Corner Text (CTABLES command)
Significance Testing (CTABLES command)
Chi-Square Tests: SIGTEST Subcommand (CTABLES command)
Pairwise Comparisons of Proportions and Means: COMPARETEST Subcommand (CTABLES command)
FORMAT Subcommand (CTABLES command)
VLABELS Subcommand (CTABLES command)
SMISSING Subcommand (CTABLES command)
PCOMPUTE Subcommand (CTABLES command)
PPROPERTIES Subcommand (CTABLES command)


PCOMPUTE Subcommand (CTABLES command)

PCOMPUTE (subcommand),PCOMPUTE (subcommand),PCOMPUTE (subcommand)
CTABLES command,CTABLES command,CTABLES command
CTABLES (command),CTABLES (command),CTABLES (command)
PCOMPUTE subcommand,PCOMPUTE subcommand,PCOMPUTE subcommand
CTABLES (command),CTABLES (command),CTABLES (command)
computed categories,computed categories,computed categories
postcomputes,postcomputes,postcomputes

In addition to displaying the aggregated results of summary statistics, a table can display one or more categories computed from those aggregated results and/or constant values. These are known as computed categories or postcomputes and are specified by the PCOMPUTE subcommand.

 /PCOMPUTE &catname= EXPR(expression)

The left side of the equation specifies the computed category name, which must be a valid name preceded by an ampersand (&). (For more information about valid names, see the topic Variable Names.) If two or more PCOMPUTE subcommands specify the same category name, the last one takes precedence. Computed categories cannot be referenced in a table expression or in the expression for another computed category.

The right side of the equation defines the expression used to calculate the postcomputed category. The expression is calculated for each summary statistic and can consist of:

• References to category values. These are enclosed in brackets and must be quoted if they are strings or dates (for example, [1] or ['Male']). All categories in an expression must be of the same type (numeric, string, or date). Both valid and user-missing values are allowed.

• Arithmetic operators. The supported operators are - (subtraction), + (addition), * (multiplication), / (division), and ** (exponentiation).

• Parentheses. These are used to control the order of evaluation.

• Numeric constants. Constants can be used by themselves (for example, &x=EXPR(50) or as part of a larger expression (for example, &x=EXPR(([1] + [2]) * 0.8)).

• Keywords. The following keywords are supported in the expression: LO, THRU, HIGH, MISSING, and OTHERNM. If a range is specified, it must appear in square brackets (for example, &x=EXPR([LO THRU HIGH]) or &x=EXPR([1 THRU 5])). The values in the range are totaled.

• References to totals and subtotals. If only one SUBTOTAL or HSUBTOTAL is used in a category list, the PCOMPUTE expression may refer to it by the SUBTOTAL keyword only or by keyword and position. (Both SUBTOTAL and HSUBTOTAL are referenced by the SUBTOTAL keyword in the computed category's expression.) If multiple subtotals are used, the expression must refer to them by position. The position is specified within square brackets following the keyword and must be an integer greater than or equal to 1 (for example, SUBTOTAL[2]). Totals are always referenced by keyword only.

All categories referenced in the expression must be also be explicitly specified in the CATEGORIES subcommand. As with other items in the table, the computed category's position in the CATEGORIES subcommand determines its position in the table.

By default, the values of computed categories use the same formatting for summary statistics as the other categories in the variable. The PPROPERTIES subcommand allows you to specify different formatting. This subcommand also allows you to specify a label for the computed category and hide the categories used in the computed category's expression. See the topic PPROPERTIES Subcommand (CTABLES command) for more information.

Examples

CTABLES
  /PCOMPUTE &x=EXPR([2]-[1])
  /PPROPERTIES &x LABEL = "Female - Male"
  /TABLE SEX
  /CATEGORIES VARIABLES=SEX [1, 2, &x].
CTABLES
  /PCOMPUTE &x=EXPR([2]/[1])
  /PPROPERTIES &x LABEL = "Female / Male" FORMAT = COUNT F8.3
  /TABLE SEX
  /CATEGORIES VARIABLES=SEX [1, 2, &x].
CTABLES
  /PCOMPUTE &x = EXPR(SUBTOTAL[1] + SUBTOTAL[2])
  /PPROPERTIES &x LABEL="0-12"
  /TABLE educ[C]
  /CATEGORIES VARIABLES=educ [0 THRU 8, HSUBTOTAL="0-8", 9 THRU 12, HSUBTOTAL="9-12", &x,
   OTHERNM, HSUBTOTAL=">12"] TOTAL=YES.

Related Topics

CTABLES
Overview (CTABLES command)
Syntax Conventions (CTABLES command)
Examples (CTABLES command)
TABLE Subcommand (CTABLES command)
SLABELS Subcommand (CTABLES command)
CLABELS Subcommand (CTABLES command)
CATEGORIES Subcommand (CTABLES command)
Explicit Category Specification (CTABLES command)
Implicit Category Specification (CTABLES command)
Totals (CTABLES command)
Empty Categories (CTABLES command)
TITLES Subcommand: Titles, Captions, and Corner Text (CTABLES command)
Significance Testing (CTABLES command)
Chi-Square Tests: SIGTEST Subcommand (CTABLES command)
Pairwise Comparisons of Proportions and Means: COMPARETEST Subcommand (CTABLES command)
FORMAT Subcommand (CTABLES command)
VLABELS Subcommand (CTABLES command)
SMISSING Subcommand (CTABLES command)
MRSETS Subcommand (CTABLES command)
PPROPERTIES Subcommand (CTABLES command)


PPROPERTIES Subcommand (CTABLES command)

PPROPERTIES (subcommand),PPROPERTIES (subcommand),PPROPERTIES (subcommand)
CTABLES command,CTABLES command,CTABLES command
CTABLES (command),CTABLES (command),CTABLES (command)
PPROPERTIES subcommand,PPROPERTIES subcommand,PPROPERTIES subcommand
LABEL (keyword),LABEL (keyword),LABEL (keyword)
CTABLES command,CTABLES command,CTABLES command
FORMAT (keyword),FORMAT (keyword),FORMAT (keyword)
CTABLES command,CTABLES command,CTABLES command
HIDESOURCECATS (keyword),HIDESOURCECATS (keyword),HIDESOURCECATS (keyword)
CTABLES command,CTABLES command,CTABLES command
 /PPROPERTIES &catname &catname...
              LABEL= "label"
              FORMAT= summary format ... summary format
              HIDESOURCECATS= {NO**}
                              {YES }

The PPROPERTIES subcommand defines properties for one or more computed categories. (For more information about creating computed categories, see the topic PCOMPUTE Subcommand (CTABLES command).) One PPROPERTIES subcommand can be used to define properties for multiple computed categories. If multiple PPROPERTIES subcommands are specified for a single computed category, the results are cumulative.

The PPROPERTIES subcommand has the following keywords:

LABEL | Label for the computed category. The quoted text defines the label that appears in the table. If no label is specified, the computed category's expression is used for the label. Like other labels, the maximum length is 120 bytes. The label can also include the symbol )LABEL[n] to display the label for the nth category specified in the CATEGORIES subcommand.
FORMAT | One or more pairs of summary statistics and display formats for the computed category. Each summary statistic is followed by a display format for that statistic. For a list of summary statistics, see the topic Specifying Summaries (CTABLES command). For a list of formats, see the topic Formats for Summaries (CTABLES command).
HIDESOURCECATS | Hide categories, totals, or subtotals used in the computed category's expression. Use YES to hide the categories, totals, or subtotals used to evaluate the computed category. This setting ignores the EMPTY keyword. If HIDESOURCECAT=YES, categories are hidden, even if EMPTY is set to INCLUDE. You cannot use YES if you request significance tests.

Related Topics

CTABLES
Overview (CTABLES command)
Syntax Conventions (CTABLES command)
Examples (CTABLES command)
TABLE Subcommand (CTABLES command)
SLABELS Subcommand (CTABLES command)
CLABELS Subcommand (CTABLES command)
CATEGORIES Subcommand (CTABLES command)
Explicit Category Specification (CTABLES command)
Implicit Category Specification (CTABLES command)
Totals (CTABLES command)
Empty Categories (CTABLES command)
TITLES Subcommand: Titles, Captions, and Corner Text (CTABLES command)
Significance Testing (CTABLES command)
Chi-Square Tests: SIGTEST Subcommand (CTABLES command)
Pairwise Comparisons of Proportions and Means: COMPARETEST Subcommand (CTABLES command)
FORMAT Subcommand (CTABLES command)
VLABELS Subcommand (CTABLES command)
SMISSING Subcommand (CTABLES command)
MRSETS Subcommand (CTABLES command)
PCOMPUTE Subcommand (CTABLES command)


CURVEFIT

CURVEFIT (command),CURVEFIT (command),CURVEFIT (command)
CURVEFIT (command),CURVEFIT (command),CURVEFIT (command)
syntax chart,syntax chart,syntax chart
Curve Estimation,Curve Estimation,Curve Estimation
command syntax,command syntax,command syntax

CURVEFIT is available in the Statistics Base option

CURVEFIT VARIABLES= varname [WITH varname]

 [/MODEL= [LINEAR**] [LOGARITHMIC] [INVERSE]

          [QUADRATIC] [CUBIC] [COMPOUND]

          [POWER] [S] [GROWTH] [EXPONENTIAL]

          [LGSTIC] [ALL]]

 [/CIN={95** }]
       {value}

 [/UPPERBOUND={NO**}]
              {n   }

 [/{CONSTANT† }
   {NOCONSTANT}

 [/PLOT={FIT**}]
        {NONE }

 [/ID = varname]

 [/PRINT=ANOVA]

 [/SAVE=[PRED] [RESID] [CIN]]

 [/APPLY [='model name'] [{SPECIFICATIONS}]]
                          {FIT           }

**Default if the subcommand is omitted.

†Default if the subcommand is omitted and there is no corresponding specification on the TSET command.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See CURVEFIT Algorithms for computational details for this procedure.

Syntax for the CURVEFIT command can be generated from the Curve Estimation dialog.

Example

CURVEFIT VARIABLES = VARY
  /MODEL=CUBIC.

Related Topics

Overview (CURVEFIT command)
Examples (CURVEFIT command)
VARIABLES Subcommand (CURVEFIT command)
MODEL Subcommand (CURVEFIT command)
UPPERBOUND Subcommand (CURVEFIT command)
CONSTANT and NOCONSTANT Subcommands (CURVEFIT command)
CIN Subcommand (CURVEFIT command)
PLOT Subcommand (CURVEFIT command)
ID Subcommand (CURVEFIT command)
SAVE Subcommand (CURVEFIT command)
PRINT Subcommand (CURVEFIT command)
APPLY Subcommand (CURVEFIT command)
References (CURVEFIT command)
MODEL NAME
READ MODEL
SAVE MODEL
TDISPLAY


Overview (CURVEFIT command)

forecasting,forecasting,forecasting
CURVEFIT command,CURVEFIT command,CURVEFIT command

CURVEFIT fits selected curves to a line plot, allowing you to examine the relationship between one or more dependent variables and one independent variable. CURVEFIT also fits curves to time series and produces forecasts, forecast errors, lower confidence limits, and upper confidence limits. You can choose curves from a variety of regression models.

Options Collapse Hide details

Options

Model Specification. There are 11 regression models available on the MODEL subcommand. You can fit any or all of these to the data. The keyword ALL is available to fit all 11 models. You can control whether the regression equation includes a constant term using the CONSTANT or NOCONSTANT subcommand.

Upperbound Value. You can specify the upperbound value for the logistic model using the UPPERBOUND subcommand.

Output. You can produce an analysis-of-variance summary table using the PRINT subcommand. You can suppress the display of the curve-fitting plot using the PLOT subcommand.

New Variables. To evaluate the regression statistics without saving predicted and residual variables, specify TSET NEWVAR=NONE prior to CURVEFIT. To save the new variables and replace the variables saved earlier, use TSET NEWVAR=CURRENT (the default). To save the new variables without erasing variables saved earlier, use TSET NEWVAR=ALL or the SAVE subcommand on CURVEFIT.

Forecasting. When used with the PREDICT command, CURVEFIT can produce forecasts and confidence limits beyond the end of the series. See the topic PREDICT for more information.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is one or more dependent variables. If the variables are not time series, you must also specify the keyword WITH and an independent variable.

• By default, the LINEAR model is fit.

• A 95% confidence interval is used unless it is changed by a TSET CIN command prior to the procedure.

• CURVEFIT produces a plot of the curve, a regression summary table displaying the type of curve used, the R2 coefficient, degrees of freedom, overall F test and significance level, and the regression coefficients.

• For each variable and model combination, CURVEFIT creates four variables: fit/forecast values, residuals, lower confidence limits, and upper confidence limits. These variables are automatically labeled and added to the active dataset unless TSET NEWVAR=NONE is specified prior to CURVEFIT. See the topic SAVE Subcommand (CURVEFIT command) for more information.

Subcommand Order Collapse Hide details

Subcommand Order

• Subcommands can be specified in any order.

Syntax Rules Collapse Hide details

Syntax Rules

• VARIABLES can be specified only once.

• Other subcommands can be specified more than once, but only the last specification of each one is executed.

exponential model,exponential model,exponential model
CURVEFIT command,CURVEFIT command,CURVEFIT command
growth model,growth model,growth model
CURVEFIT command,CURVEFIT command,CURVEFIT command
power model,power model,power model
CURVEFIT command,CURVEFIT command,CURVEFIT command
compound model,compound model,compound model
CURVEFIT command,CURVEFIT command,CURVEFIT command
cubic model,cubic model,cubic model
CURVEFIT command,CURVEFIT command,CURVEFIT command
quadratic model,quadratic model,quadratic model
CURVEFIT command,CURVEFIT command,CURVEFIT command
Operations Collapse Hide details

Operations

• When CURVEFIT is used with the PREDICT command to forecast values beyond the end of a time series, the original and residual series are assigned the system-missing value after the last case in the original series.

• If a model requiring a log transformation (COMPOUND, POWER, S, GROWTH, EXPONENTIAL, or LGSTIC) is requested and there are values in the dependent variable(s) less than or equal to 0, the model cannot be fit because nonpositive values cannot be log-transformed.

• CURVEFIT uses listwise deletion of missing values. Whenever one dependent variable is missing a value for a particular case or observation, that case or observation will not be included in any computations.

• For the models QUADRATIC and CUBIC, a message is issued if the tolerance criterion is not met. (See TSET for information on changing the tolerance criterion.)

• Since CURVEFIT automatically generates four variables for each dependent variable and model combination, the ALL specification after MODEL should be used cautiously to avoid creating and adding to the active dataset many more variables than are necessary.

• The residual variable is always reported in the original metric. To compute the logged residual (which should be used for diagnostic checks) for the models COMPOUND, POWER, S, GROWTH, and EXPONENTIAL, specify

COMPUTE NEWVAR = LN(VAR) - LN(FIT#n).

where NEWVAR is the logged residual, VAR is the name of the dependent variable or observed series, and FIT#n is the name of the fitted variable generated by CURVEFIT.

For the LGSTIC (logistic) model, the logged residual can be obtained by

COMPUTE NEWERR = LN(VAR) - LN(1/FIT#n).

or, if upperbound value u is specified on the UPPERBOUND subcommand, by

COMPUTE NEWVAR = LN(1/VAR - 1/u) - LN(1/FIT#n).

• CURVEFIT obeys the WEIGHT command when there is an independent variable. The WEIGHT specification is ignored if no independent variable is specified.

Limitations Collapse Hide details

Limitations

• A maximum of 1 VARIABLES subcommand. There is no limit on the number of dependent variables or series named on the subcommand.

• A maximum of 1 independent variable can be specified after the keyword WITH.

Related Topics

CURVEFIT
Examples (CURVEFIT command)
VARIABLES Subcommand (CURVEFIT command)
MODEL Subcommand (CURVEFIT command)
UPPERBOUND Subcommand (CURVEFIT command)
CONSTANT and NOCONSTANT Subcommands (CURVEFIT command)
CIN Subcommand (CURVEFIT command)
PLOT Subcommand (CURVEFIT command)
ID Subcommand (CURVEFIT command)
SAVE Subcommand (CURVEFIT command)
PRINT Subcommand (CURVEFIT command)
APPLY Subcommand (CURVEFIT command)
References (CURVEFIT command)


Examples (CURVEFIT command)

Comparing linear and quadratic models

* Curve Estimation.
CURVEFIT /VARIABLES=sales  WITH advert
  /CONSTANT
  /MODEL=LINEAR QUADRATIC
  /PLOT FIT
  /SAVE=PRED RESID .

• The procedure fits a curve to sales using advert.

• The MODEL subcommand requests linear and quadratic models; the CONSTANT subcommand specifies that a constant term should be included in each model.

• The PLOT subcommand requests a plot of sales by advert for the observed values and each fit model.

• The SAVE subcommand requests that fitted values and residuals be saved to the active dataset.

For discussion of output from this syntax and to place the example in context, see Using Curve Estimation to Model the Law of Diminishing Returns.

A cubic model

* Curve Estimation.
CURVEFIT /VARIABLES=infected  WITH time
  /CONSTANT
  /MODEL= CUBIC
  /PRINT ANOVA
  /PLOT FIT
  /SAVE=PRED RESID .

• The procedure fits a curve to infected using time.

• The MODEL subcommand requests a cubic model; the CONSTANT subcommand specifies that a constant term should be included in the model.

• The PRINT subcommand requests an ANOVA table.

• The PLOT subcommand requests a plot of infected by time for the observed values and the fit model.

• The SAVE subcommand requests that fitted values and residuals be saved to the active dataset.

For discussion of output from this syntax and to place the example in context, see Using Curve Estimation to Model Viral Growth.

Related Topics

CURVEFIT
Overview (CURVEFIT command)
VARIABLES Subcommand (CURVEFIT command)
MODEL Subcommand (CURVEFIT command)
UPPERBOUND Subcommand (CURVEFIT command)
CONSTANT and NOCONSTANT Subcommands (CURVEFIT command)
CIN Subcommand (CURVEFIT command)
PLOT Subcommand (CURVEFIT command)
ID Subcommand (CURVEFIT command)
SAVE Subcommand (CURVEFIT command)
PRINT Subcommand (CURVEFIT command)
APPLY Subcommand (CURVEFIT command)
References (CURVEFIT command)


VARIABLES Subcommand (CURVEFIT command)

CURVEFIT (command),CURVEFIT (command),CURVEFIT (command)
VARIABLES subcommand,VARIABLES subcommand,VARIABLES subcommand
VARIABLES (subcommand),VARIABLES (subcommand),VARIABLES (subcommand)
CURVEFIT command,CURVEFIT command,CURVEFIT command

VARIABLES specifies the variables and is the only required subcommand.

WITH (keyword),WITH (keyword),WITH (keyword)
CURVEFIT command,CURVEFIT command,CURVEFIT command

• If the dependent variables specified are not time series, you must also specify the keyword WITH and an independent variable.

Related Topics

CURVEFIT
Overview (CURVEFIT command)
Examples (CURVEFIT command)
MODEL Subcommand (CURVEFIT command)
UPPERBOUND Subcommand (CURVEFIT command)
CONSTANT and NOCONSTANT Subcommands (CURVEFIT command)
CIN Subcommand (CURVEFIT command)
PLOT Subcommand (CURVEFIT command)
ID Subcommand (CURVEFIT command)
SAVE Subcommand (CURVEFIT command)
PRINT Subcommand (CURVEFIT command)
APPLY Subcommand (CURVEFIT command)
References (CURVEFIT command)


MODEL Subcommand (CURVEFIT command)

CURVEFIT (command),CURVEFIT (command),CURVEFIT (command)
MODEL subcommand,MODEL subcommand,MODEL subcommand
MODEL (subcommand),MODEL (subcommand),MODEL (subcommand)
CURVEFIT command,CURVEFIT command,CURVEFIT command
LINEAR (keyword),LINEAR (keyword),LINEAR (keyword)
CURVEFIT command,CURVEFIT command,CURVEFIT command
CURVEFIT (command),CURVEFIT (command),CURVEFIT (command)
models,models,models

MODEL specifies the model or models to be fit to the data. The default model is LINEAR.

• You can fit any or all of the 11 available models.

• Model name keywords can be abbreviated to the first three characters.

• You can use the keyword ALL to fit all models.

• When the LGSTIC model is specified, the upperbound value is included in the output.

LGSTIC (keyword),LGSTIC (keyword),LGSTIC (keyword)
CURVEFIT command,CURVEFIT command,CURVEFIT command
POWER (keyword),POWER (keyword),POWER (keyword)
CURVEFIT command,CURVEFIT command,CURVEFIT command
COMPOUND (keyword),COMPOUND (keyword),COMPOUND (keyword)
CURVEFIT command,CURVEFIT command,CURVEFIT command
CUBIC (keyword),CUBIC (keyword),CUBIC (keyword)
CURVEFIT command,CURVEFIT command,CURVEFIT command
QUADRATIC (keyword),QUADRATIC (keyword),QUADRATIC (keyword)
CURVEFIT command,CURVEFIT command,CURVEFIT command
INVERSE (keyword),INVERSE (keyword),INVERSE (keyword)
CURVEFIT command,CURVEFIT command,CURVEFIT command
LOGARITHMIC (keyword),LOGARITHMIC (keyword),LOGARITHMIC (keyword)
CURVEFIT command,CURVEFIT command,CURVEFIT command
S (keyword),S (keyword),S (keyword)
CURVEFIT command,CURVEFIT command,CURVEFIT command
GROWTH (keyword),GROWTH (keyword),GROWTH (keyword)
CURVEFIT command,CURVEFIT command,CURVEFIT command
EXPONENTIAL (keyword),EXPONENTIAL (keyword),EXPONENTIAL (keyword)
CURVEFIT command,CURVEFIT command,CURVEFIT command
inverse model,inverse model,inverse model
CURVEFIT command,CURVEFIT command,CURVEFIT command

The following table lists the available models and their regression equations. The linear transformations for the last six models are also shown.

linear model,linear model,linear model
CURVEFIT command,CURVEFIT command,CURVEFIT command
logarithmic model,logarithmic model,logarithmic model
CURVEFIT command,CURVEFIT command,CURVEFIT command
quadratic model,quadratic model,quadratic model
CURVEFIT command,CURVEFIT command,CURVEFIT command
cubic model,cubic model,cubic model
CURVEFIT command,CURVEFIT command,CURVEFIT command
compound model,compound model,compound model
CURVEFIT command,CURVEFIT command,CURVEFIT command
power model,power model,power model
CURVEFIT command,CURVEFIT command,CURVEFIT command
growth model,growth model,growth model
CURVEFIT command,CURVEFIT command,CURVEFIT command
exponential model,exponential model,exponential model
CURVEFIT command,CURVEFIT command,CURVEFIT command
logistic model,logistic model,logistic model
CURVEFIT command,CURVEFIT command,CURVEFIT command
Keyword | Equation | Linear equation
LINEAR | Y=b0+b1t |
LOGARITHMIC | Y=b0+b1ln(t) |
INVERSE | Y=b0+b1/t |
QUADRATIC | Y=b0+b1t+b2t2 |
CUBIC | Y=b0+b1t+b2t2+b3t3 |
COMPOUND | Y=b0b1t | ln(Y)=ln(b0)+tln(b1)
POWER | Y=b0tb1 | ln(Y)=ln(b0)+b1ln(t)
S | Y=eb0+b1/t | ln(Y)=b0+b1/t
GROWTH | Y=eb0+b1t | ln(Y)=b0+b1t
EXPONENTIAL | Y=b0eb1t | ln(Y)=ln(b0)+b1t
LGSTIC (logistic) | Y=(1/u+b0b1t)−1 | ln(1/Y−1/u)=ln(b0)+tln(b1)

where

b0 = a constant

bn = regression coefficient

t = independent variable or time value

ln = the natural logarithm

u = upperbound value for LGSTIC

Example

CURVEFIT VARIABLES = VARX.

• This command fits a curve to VARX using the linear regression model (the default).

Example

CURVEFIT VARIABLES = VARY
  /MODEL=GROWTH EXPONENTIAL.

• This command fits two curves to VARY, one using the growth model and the other using the exponential model.

Related Topics

CURVEFIT
Overview (CURVEFIT command)
Examples (CURVEFIT command)
VARIABLES Subcommand (CURVEFIT command)
UPPERBOUND Subcommand (CURVEFIT command)
CONSTANT and NOCONSTANT Subcommands (CURVEFIT command)
CIN Subcommand (CURVEFIT command)
PLOT Subcommand (CURVEFIT command)
ID Subcommand (CURVEFIT command)
SAVE Subcommand (CURVEFIT command)
PRINT Subcommand (CURVEFIT command)
APPLY Subcommand (CURVEFIT command)
References (CURVEFIT command)


UPPERBOUND Subcommand (CURVEFIT command)

CURVEFIT (command),CURVEFIT (command),CURVEFIT (command)
UPPERBOUND subcommand,UPPERBOUND subcommand,UPPERBOUND subcommand
UPPERBOUND (subcommand),UPPERBOUND (subcommand),UPPERBOUND (subcommand)
CURVEFIT command,CURVEFIT command,CURVEFIT command

UPPERBOUND is used with the logistic model (keyword LGSTIC) to specify an upper boundary value to be used in the regression equation.

• The specification on UPPERBOUND must be a positive number and must be greater than the largest data value in any of the specified dependent variables.

• The default UPPERBOUND value is infinity, so that 1/u = 0 and is dropped from the equation.

• You can specify UPPERBOUND NO to reset the value to infinity when applying a previous model.

• If you specify UPPERBOUND without LGSTIC, it is ignored.

• Note that UPPERBOUND is a subcommand and cannot be used within a MODEL subcommand. For example, the following specification is not valid:

  /MODEL=CUBIC LGSTIC   /UPPER=99 LINEAR

The correct specification is:

  /MODEL=CUBIC LGSTIC LINEAR
  /UPPER=99

Related Topics

CURVEFIT
Overview (CURVEFIT command)
Examples (CURVEFIT command)
VARIABLES Subcommand (CURVEFIT command)
MODEL Subcommand (CURVEFIT command)
CONSTANT and NOCONSTANT Subcommands (CURVEFIT command)
CIN Subcommand (CURVEFIT command)
PLOT Subcommand (CURVEFIT command)
ID Subcommand (CURVEFIT command)
SAVE Subcommand (CURVEFIT command)
PRINT Subcommand (CURVEFIT command)
APPLY Subcommand (CURVEFIT command)
References (CURVEFIT command)


CONSTANT and NOCONSTANT Subcommands (CURVEFIT command)

CURVEFIT (command),CURVEFIT (command),CURVEFIT (command)
CONSTANT/NOCONSTANT subcommands,CONSTANT/NOCONSTANT subcommands,CONSTANT/NOCONSTANT subcommands
CONSTANT (subcommand),CONSTANT (subcommand),CONSTANT (subcommand)
CURVEFIT command,CURVEFIT command,CURVEFIT command
NOCONSTANT (subcommand),NOCONSTANT (subcommand),NOCONSTANT (subcommand)
CURVEFIT command,CURVEFIT command,CURVEFIT command
CURVEFIT (command),CURVEFIT (command),CURVEFIT (command)
including constant,including constant,including constant

CONSTANT and NOCONSTANT indicate whether a constant term should be estimated in the regression equation. The specification overrides the corresponding setting on the TSET command.

• CONSTANT indicates that a constant should be estimated. It is the default unless changed by TSET NOCONSTANT prior to the current procedure.

• NOCONSTANT eliminates the constant term from the model.

Example

CURVEFIT VARIABLES = Y1
  /MODEL=COMPOUND
  /NOCONSTANT.

• In this example, a compound curve is fit to Y1 with no constant term in the model.

Related Topics

CURVEFIT
Overview (CURVEFIT command)
Examples (CURVEFIT command)
VARIABLES Subcommand (CURVEFIT command)
MODEL Subcommand (CURVEFIT command)
UPPERBOUND Subcommand (CURVEFIT command)
CIN Subcommand (CURVEFIT command)
PLOT Subcommand (CURVEFIT command)
ID Subcommand (CURVEFIT command)
SAVE Subcommand (CURVEFIT command)
PRINT Subcommand (CURVEFIT command)
APPLY Subcommand (CURVEFIT command)
References (CURVEFIT command)


CIN Subcommand (CURVEFIT command)

CURVEFIT (command),CURVEFIT (command),CURVEFIT (command)
CIN subcommand,CIN subcommand,CIN subcommand
CIN (subcommand),CIN (subcommand),CIN (subcommand)
CURVEFIT command,CURVEFIT command,CURVEFIT command
confidence intervals,confidence intervals,confidence intervals
CURVEFIT command,CURVEFIT command,CURVEFIT command
CURVEFIT (command),CURVEFIT (command),CURVEFIT (command)
confidence intervals,confidence intervals,confidence intervals

CIN controls the size of the confidence interval for confidence interval variables saved with the SAVE subcommand. It has no effect on the model results displayed in output tables.

• The specification on CIN must be greater than 0 and less than 100.

• The default confidence interval is 95.

• The CIN subcommand overrides the TSET CIN setting.

Related Topics

CURVEFIT
Overview (CURVEFIT command)
Examples (CURVEFIT command)
VARIABLES Subcommand (CURVEFIT command)
MODEL Subcommand (CURVEFIT command)
UPPERBOUND Subcommand (CURVEFIT command)
CONSTANT and NOCONSTANT Subcommands (CURVEFIT command)
PLOT Subcommand (CURVEFIT command)
ID Subcommand (CURVEFIT command)
SAVE Subcommand (CURVEFIT command)
PRINT Subcommand (CURVEFIT command)
APPLY Subcommand (CURVEFIT command)
References (CURVEFIT command)


PLOT Subcommand (CURVEFIT command)

CURVEFIT (command),CURVEFIT (command),CURVEFIT (command)
PLOT subcommand,PLOT subcommand,PLOT subcommand
PLOT (subcommand),PLOT (subcommand),PLOT (subcommand)
CURVEFIT command,CURVEFIT command,CURVEFIT command

PLOT specifies whether the curve-fitting plot is displayed. If PLOT is not specified, the default is FIT. The curve-fitting plot is displayed. PLOT=FIT is generally used with an APPLY subcommand to turn off a PLOT=NONE specification in the applied model.

FIT (keyword),FIT (keyword),FIT (keyword)
CURVEFIT command,CURVEFIT command,CURVEFIT command
NONE (keyword),NONE (keyword),NONE (keyword)
CURVEFIT command,CURVEFIT command,CURVEFIT command
FIT | Display the curve-fitting plot.
NONE | Do not display the plot.

Related Topics

CURVEFIT
Overview (CURVEFIT command)
Examples (CURVEFIT command)
VARIABLES Subcommand (CURVEFIT command)
MODEL Subcommand (CURVEFIT command)
UPPERBOUND Subcommand (CURVEFIT command)
CONSTANT and NOCONSTANT Subcommands (CURVEFIT command)
CIN Subcommand (CURVEFIT command)
ID Subcommand (CURVEFIT command)
SAVE Subcommand (CURVEFIT command)
PRINT Subcommand (CURVEFIT command)
APPLY Subcommand (CURVEFIT command)
References (CURVEFIT command)


ID Subcommand (CURVEFIT command)

ID (subcommand),ID (subcommand),ID (subcommand)
CURVEFIT command,CURVEFIT command,CURVEFIT command
CURVEFIT (command),CURVEFIT (command),CURVEFIT (command)
ID subcommand,ID subcommand,ID subcommand

ID specifies an identification variable. When in point selection mode, you can click on an individual chart point to display the value of the ID variable for the selected case.

Related Topics

CURVEFIT
Overview (CURVEFIT command)
Examples (CURVEFIT command)
VARIABLES Subcommand (CURVEFIT command)
MODEL Subcommand (CURVEFIT command)
UPPERBOUND Subcommand (CURVEFIT command)
CONSTANT and NOCONSTANT Subcommands (CURVEFIT command)
CIN Subcommand (CURVEFIT command)
PLOT Subcommand (CURVEFIT command)
SAVE Subcommand (CURVEFIT command)
PRINT Subcommand (CURVEFIT command)
APPLY Subcommand (CURVEFIT command)
References (CURVEFIT command)


SAVE Subcommand (CURVEFIT command)

CURVEFIT (command),CURVEFIT (command),CURVEFIT (command)
SAVE subcommand,SAVE subcommand,SAVE subcommand
SAVE (subcommand),SAVE (subcommand),SAVE (subcommand)
CURVEFIT command,CURVEFIT command,CURVEFIT command

SAVE saves the values of predicted, residual, and/or confidence interval variables generated during the current session in the active dataset.

• SAVE saves the specified variables with default names: FIT_n for predicted values, ERR_n for residuals, LCL_n for the lower confidence limit, and UCL_n for the upper confidence limit, where n increments each time any variable is saved for a model.

• SAVE overrides the CURRENT or NONE setting on TSET NEWVARS (see TSET).

predicted values,predicted values,predicted values
saving CURVEFIT command,saving CURVEFIT command,saving CURVEFIT command
PRED (keyword),PRED (keyword),PRED (keyword)
CURVEFIT command,CURVEFIT command,CURVEFIT command
residuals,residuals,residuals
saving CURVEFIT command,saving CURVEFIT command,saving CURVEFIT command
RESID (keyword),RESID (keyword),RESID (keyword)
CURVEFIT command,CURVEFIT command,CURVEFIT command
prediction intervals,prediction intervals,prediction intervals
saving CURVEFIT command,saving CURVEFIT command,saving CURVEFIT command
CIN (keyword),CIN (keyword),CIN (keyword)
CURVEFIT command,CURVEFIT command,CURVEFIT command
PRED | Predicted variable.
RESID | Residual variable.
CIN | Confidence interval. The default is a 95% confidence interval. Use the CIN subcommand to specify a different confidence interval.

Related Topics

CURVEFIT
Overview (CURVEFIT command)
Examples (CURVEFIT command)
VARIABLES Subcommand (CURVEFIT command)
MODEL Subcommand (CURVEFIT command)
UPPERBOUND Subcommand (CURVEFIT command)
CONSTANT and NOCONSTANT Subcommands (CURVEFIT command)
CIN Subcommand (CURVEFIT command)
PLOT Subcommand (CURVEFIT command)
ID Subcommand (CURVEFIT command)
PRINT Subcommand (CURVEFIT command)
APPLY Subcommand (CURVEFIT command)
References (CURVEFIT command)


PRINT Subcommand (CURVEFIT command)

PRINT (subcommand),PRINT (subcommand),PRINT (subcommand)
CURVEFIT command,CURVEFIT command,CURVEFIT command
CURVEFIT (command),CURVEFIT (command),CURVEFIT (command)
PRINT subcommand,PRINT subcommand,PRINT subcommand
ANOVA (keyword),ANOVA (keyword),ANOVA (keyword)
CURVEFIT command,CURVEFIT command,CURVEFIT command
analysis of variance,analysis of variance,analysis of variance
CURVEFIT command,CURVEFIT command,CURVEFIT command

PRINT is used to produce an additional analysis-of-variance table for each model and variable.

• The only specification on PRINT is the keyword ANOVA.

Related Topics

CURVEFIT
Overview (CURVEFIT command)
Examples (CURVEFIT command)
VARIABLES Subcommand (CURVEFIT command)
MODEL Subcommand (CURVEFIT command)
UPPERBOUND Subcommand (CURVEFIT command)
CONSTANT and NOCONSTANT Subcommands (CURVEFIT command)
CIN Subcommand (CURVEFIT command)
PLOT Subcommand (CURVEFIT command)
ID Subcommand (CURVEFIT command)
SAVE Subcommand (CURVEFIT command)
APPLY Subcommand (CURVEFIT command)
References (CURVEFIT command)


APPLY Subcommand (CURVEFIT command)

CURVEFIT (command),CURVEFIT (command),CURVEFIT (command)
APPLY subcommand,APPLY subcommand,APPLY subcommand
APPLY (subcommand),APPLY (subcommand),APPLY (subcommand)
CURVEFIT command,CURVEFIT command,CURVEFIT command
CURVEFIT (command),CURVEFIT (command),CURVEFIT (command)
using a previously defined model,using a previously defined model,using a previously defined model

APPLY allows you to use a previously defined CURVEFIT model without having to repeat the specifications.

• The specifications on APPLY can include the name of a previous model in quotes and one of two keywords. All of these specifications are optional.

• If a model name is not specified, the model specified on the previous CURVEFIT command is used.

• To change one or more of the specifications of the model, specify the subcommands of only those portions you want to change after the subcommand APPLY.

• If no variables or series are specified on the CURVEFIT command, the dependent variables that were originally specified with the model being reapplied are used.

• To change the dependent variables used with the model, enter new variable names before or after the APPLY subcommand.

The keywords available for APPLY on CURVEFIT are:

SPECIFICATIONS (keyword),SPECIFICATIONS (keyword),SPECIFICATIONS (keyword)
CURVEFIT command,CURVEFIT command,CURVEFIT command
FIT (keyword),FIT (keyword),FIT (keyword)
CURVEFIT command,CURVEFIT command,CURVEFIT command
SPECIFICATIONS | Use only the specifications from the original model. This is the default.
FIT | Use the coefficients estimated for the original model in the equation.

Example

CURVEFIT VARIABLES = X1
  /MODEL=QUADRATIC.
CURVEFIT VARIABLES = Z1
  /APPLY.

• The first command fits a quadratic curve to X1.

• The second command fits the same type of curve to Z1.

Example

CURVEFIT VARIABLES = X1 Y1 Z1
  /MODEL=QUADRATIC.
CURVEFIT APPLY
  /MODEL=CUBIC.

• The first command fits quadratic curves to X1, Y1, and Z1.

• The second command fits curves to the same three series using the cubic model.

Related Topics

CURVEFIT
Overview (CURVEFIT command)
Examples (CURVEFIT command)
VARIABLES Subcommand (CURVEFIT command)
MODEL Subcommand (CURVEFIT command)
UPPERBOUND Subcommand (CURVEFIT command)
CONSTANT and NOCONSTANT Subcommands (CURVEFIT command)
CIN Subcommand (CURVEFIT command)
PLOT Subcommand (CURVEFIT command)
ID Subcommand (CURVEFIT command)
SAVE Subcommand (CURVEFIT command)
PRINT Subcommand (CURVEFIT command)
References (CURVEFIT command)


References (CURVEFIT command)

Abraham, B., and J. Ledolter. 1983. Statistical methods of forecasting. New York: John Wiley and Sons.

Draper, N. R., and H. Smith. 1981. Applied regression analysis, 2nd ed. New York: John Wiley and Sons.

Montgomery, D. C., and E. A. Peck. 1982. Introduction to linear regression analysis. New York: John Wiley and Sons.

Related Topics

CURVEFIT
Overview (CURVEFIT command)
Examples (CURVEFIT command)
VARIABLES Subcommand (CURVEFIT command)
MODEL Subcommand (CURVEFIT command)
UPPERBOUND Subcommand (CURVEFIT command)
CONSTANT and NOCONSTANT Subcommands (CURVEFIT command)
CIN Subcommand (CURVEFIT command)
PLOT Subcommand (CURVEFIT command)
ID Subcommand (CURVEFIT command)
SAVE Subcommand (CURVEFIT command)
PRINT Subcommand (CURVEFIT command)
APPLY Subcommand (CURVEFIT command)


DATA LIST

text data files,text data files,text data files
data types,data types,data types
formats,formats,formats
display formats,display formats,display formats
input formats,input formats,input formats
output formats,output formats,output formats
data types,data types,data types
DATA LIST (command),DATA LIST (command),DATA LIST (command)
variable formats,variable formats,variable formats
syntax chart,syntax chart,syntax chart
DATA LIST (command),DATA LIST (command),DATA LIST (command)
DATA LIST [FILE='file'] [ENCODING='encoding specification']

[{FIXED}]
  {FREE }  [{("delimiter", "delimiter",..., TAB)}]
  {LIST }

[RECORDS={1}] [SKIP={n}] [{TABLE  }]
         {n}              {NOTABLE}

 /{1    } varname {col location [(format)]} [varname ...]
  {rec #}         {(FORTRAN-like format)  }

 [/{2    } ...] [/ ...]
   {rec #}

Numeric and string input formats:

Type | Column-style format | FORTRAN-like format
Numeric (default) | d or F,d | Fw.d
Restricted numeric | N,d | Nw.d
Scientific notation | E,d | Ew.d
Numeric with commas | COMMA,d | COMMAw.d
Numeric with dots | DOT,d | DOTw.d
Numeric with commas and dollar sign | DOLLAR,d | DOLLARw.d
Numeric with percent sign | PCT,d | PCTw.d
Zoned decimal | Z,d | Zw.d
String | A | Aw
string variables,string variables,string variables
input formats,input formats,input formats
numeric data,numeric data,numeric data
input formats,input formats,input formats

Format elements to skip columns:

Type | Column-style format | FORTRAN-like format
Tab to column n |  | Tn
Skip n columns |  | nX

Date and time input formats:

Type | Data input | Format | FORTRAN-like format
International date | dd-mmm-yyyy | DATE | DATEw
American date | mm/dd/yyyy | ADATE | ADATEw
European date | dd/mm/yy | EDATE | EDATEw
Julian date | yyddd | JDATE | JDATEw
Sorted date | yy/mm/dd | SDATE | SDATEw
Quarter and year | qQyyyy | QYR | QYRw
Month and year | mm/yyyy | MOYR | MOYRw
Week and year | wkWKyyyy | WKYR | WKYRw
Date and time | dd-mmm-yyyy hh:mm:ss.ss | DATETIME | DATETIMEw.d
Time | hh:mm:ss.ss | TIME | TIMEw.d
Days and time | ddd hh:mm:ss.ss | DTIME | DTIMEw.d
Day of the week | string | WKDAY | WKDAYw
Month | string | MONTH | MONTHw

Note: For default numeric (F) format and scientific notation (E) format, the decimal indicator of the input data must match the PASW Statistics locale decimal indicator (period or comma). Use SHOW DECIMAL to display the current decimal indicator and SET DECIMAL to set the decimal indicator. (Comma and Dollar formats only recognize a period as the decimal indicator, and Dot format only recognizes the comma as the decimal indicator.)

Release History Collapse Hide details

Release History

Release 16.0

• ENCODING subcommand added for Unicode support.

Example

DATA LIST /ID 1-3 SEX 5 (A) AGE 7-8 OPINION1 TO OPINION5 10-14.

Related Topics

Overview (DATA LIST command)
Examples (DATA LIST command)
Operations (DATA LIST command)
FILE Subcommand (DATA LIST command)
ENCODING Subcommand (DATA LIST command)
FIXED, FREE, and LIST Keywords (DATA LIST command)
TABLE and NOTABLE Subcommands (DATA LIST command)
RECORDS Subcommand (DATA LIST command)
SKIP Subcommand (DATA LIST command)
END Subcommand (DATA LIST command)
Variable Definition (DATA LIST command)
Variable Names (DATA LIST command)
Variable Location (DATA LIST command)
Fixed-Format Data (DATA LIST command)
Freefield Data (DATA LIST command)
Variable Formats (DATA LIST command)


Overview (DATA LIST command)

inline data,inline data,inline data
data,data,data
inline,inline,inline
DATA LIST (command),DATA LIST (command),DATA LIST (command)
inline data,inline data,inline data
DATA LIST (command),DATA LIST (command),DATA LIST (command)
fixed-format data,fixed-format data,fixed-format data
fixed format,fixed format,fixed format
text data files,text data files,text data files
fixed format,fixed format,fixed format
text data files,text data files,text data files
freefield format,freefield format,freefield format
freefield format,freefield format,freefield format
DATA LIST (command),DATA LIST (command),DATA LIST (command)
freefield data,freefield data,freefield data
data files,data files,data files
reading,reading,reading

DATA LIST defines a raw data file (a raw data file contains numbers and other alphanumeric characters) by assigning names and formats to each variable in the file. Raw data can be inline (entered with your commands between BEGIN DATA and END DATA) or stored in an external file. They can be in fixed format (values for the same variable are always entered in the same location on the same record for each case) or in freefield format (values for consecutive variables are not in particular columns but are entered one after the other, separated by blanks or commas).

For information on defining matrix materials, see MATRIX DATA. For information on defining complex data files that cannot be defined with DATA LIST, see FILE TYPE and REPEATING DATA. For information on reading PASW Statistics data files and portable files, see GET and IMPORT.

The program can also read data files created by other software applications. Commands that read these files include GET CAPTURE and GET TRANSLATE.

Options Collapse Hide details

Options

Data Source. You can use inline data or data from an external file.

Data Formats. You can define numeric (with or without decimal places) and string variables using an array of input formats (percent, dollar, date and time, and so forth). You can also specify column binary and unaligned positive integer binary formats (available only if used with the MODE=MULTIPUNCH setting on the FILE HANDLE command).

Data Organization. You can define data that are in fixed format (values in the same location on the same record for each case), in freefield format with multiple cases per record, or in freefield format with one case on each record using the FIXED, FREE, and LIST keywords.

Multiple Records. For fixed-format data, you can indicate the number of records per case on the RECORDS subcommand. You can specify which records to read in the variable definition portion of DATA LIST.

Summary Table. For fixed-format data, you can display a table that summarizes the variable definitions using the TABLE subcommand. You can suppress this table using NOTABLE.

Value Delimiter. For freefield-format data (keywords FREE and LIST), you can specify the character(s) that separate data values, or you can use the keyword TAB to specify the tab character as the delimiter. Any delimiter other than the TAB keyword must be enclosed in quotation marks, and the specification must be enclosed in parentheses, as in DATA LIST FREE(",").

End-of-File Processing. You can specify a logical variable that indicates the end of the data using the END subcommand. This logical variable can be used to invoke special processing after all the cases from the data file have been read.

Basic Specification Collapse Hide details

Basic Specification

• The basic specification is the FIXED, LIST, or FREE keyword followed by a slash that signals the beginning of variable definition.

• FIXED is the default.

• If the data are in an external file, the FILE subcommand must be used.

• If the data are inline, the FILE subcommand is omitted and the data are specified between the BEGIN DATA and END DATA commands.

• Variable definition for fixed-format data includes a variable name, a column location, and a format (unless the default numeric format is used). The column location is not specified if FORTRAN-like formats are used, since these formats include the variable width.

• Variable definition for freefield data includes a variable name and, optionally, a delimiter specification and a FORTRAN-like format specification. If format specifications include a width and number of decimal positions (for example, F8.2), the width and decimal specifications are not used to read the data but are assigned as print and write formats for the variables.

Subcommand Order Collapse Hide details

Subcommand Order

Subcommands can be named in any order. However, all subcommands must precede the first slash, which signals the beginning of variable definition.

Syntax Rules Collapse Hide details

Syntax Rules

Subcommands on DATA LIST are separated by spaces or commas, not by slashes.

Related Topics

DATA LIST
Examples (DATA LIST command)
Operations (DATA LIST command)
FILE Subcommand (DATA LIST command)
ENCODING Subcommand (DATA LIST command)
FIXED, FREE, and LIST Keywords (DATA LIST command)
TABLE and NOTABLE Subcommands (DATA LIST command)
RECORDS Subcommand (DATA LIST command)
SKIP Subcommand (DATA LIST command)
END Subcommand (DATA LIST command)
Variable Definition (DATA LIST command)
Variable Names (DATA LIST command)
Variable Location (DATA LIST command)
Fixed-Format Data (DATA LIST command)
Freefield Data (DATA LIST command)
Variable Formats (DATA LIST command)


Examples (DATA LIST command)

DATA LIST (command),DATA LIST (command),DATA LIST (command)
inline data,inline data,inline data
inline data,inline data,inline data
data,data,data
inline,inline,inline
* Column-style format specifications.

DATA LIST /ID 1-3 SEX 5 (A) AGE 7-8 OPINION1 TO OPINION5 10-14.
BEGIN DATA
001 m 28 12212
002 f 29 21212
003 f 45 32145
 ...
128 m 17 11194
END DATA.

• The data are inline between the BEGIN DATA and END DATA commands, so the FILE subcommand is not specified. The data are in fixed format. The keyword FIXED is not specified because it is the default.

• Variable definition begins after the slash. Variable ID is in columns 1 through 3. Because no format is specified, numeric format is assumed. Variable ID is therefore a numeric variable that is three digits wide.

• Variable SEX is a short string variable in column 5. Variable SEX is one byte wide.

• AGE is a two-column numeric variable in columns 7 and 8.

• Variables OPINION1, OPINION2, OPINION3, OPINION4, and OPINION5 are named using the TO keyword. Each is a one-column numeric variable, with OPINION1 located in column 10 and OPINION5 located in column 14.

• The BEGIN DATA and END DATA commands enclose the inline data. Note that the values of SEX are lowercase letters and must be specified as such on subsequent commands.

Related Topics

DATA LIST
Overview (DATA LIST command)
Operations (DATA LIST command)
FILE Subcommand (DATA LIST command)
ENCODING Subcommand (DATA LIST command)
FIXED, FREE, and LIST Keywords (DATA LIST command)
TABLE and NOTABLE Subcommands (DATA LIST command)
RECORDS Subcommand (DATA LIST command)
SKIP Subcommand (DATA LIST command)
END Subcommand (DATA LIST command)
Variable Definition (DATA LIST command)
Variable Names (DATA LIST command)
Variable Location (DATA LIST command)
Fixed-Format Data (DATA LIST command)
Freefield Data (DATA LIST command)
Variable Formats (DATA LIST command)


Operations (DATA LIST command)

DATA LIST (command),DATA LIST (command),DATA LIST (command)
decimal indicator,decimal indicator,decimal indicator
decimal indicator,decimal indicator,decimal indicator
DATA LIST command,DATA LIST command,DATA LIST command

• DATA LIST creates a new active dataset.

• Variable names are stored in the active dataset dictionary.

output formats,output formats,output formats

• Formats are stored in the active dataset dictionary and are used to display and write the values. To change output formats of numeric variables defined on DATA LIST, use the FORMATS command.

• For default numeric (F) format and scientific notation (E) format, the decimal indicator of the input data must match the PASW Statistics locale decimal indicator (period or comma). Use SHOW DECIMAL to display the current decimal indicator and SET DECIMAL to set the decimal indicator. (Comma and Dollar formats only recognize a period as the decimal indicator, and Dot format only recognizes the comma as the decimal indicator.)

Related Topics

DATA LIST
Overview (DATA LIST command)
Examples (DATA LIST command)
FILE Subcommand (DATA LIST command)
ENCODING Subcommand (DATA LIST command)
FIXED, FREE, and LIST Keywords (DATA LIST command)
TABLE and NOTABLE Subcommands (DATA LIST command)
RECORDS Subcommand (DATA LIST command)
SKIP Subcommand (DATA LIST command)
END Subcommand (DATA LIST command)
Variable Definition (DATA LIST command)
Variable Names (DATA LIST command)
Variable Location (DATA LIST command)
Fixed-Format Data (DATA LIST command)
Freefield Data (DATA LIST command)
Variable Formats (DATA LIST command)


Fixed-Format Data (DATA LIST command)

• The order of the variables in the active dataset dictionary is the order in which they are defined on DATA LIST, not their sequence in the input data file. This order is important if you later use the TO keyword to refer to variables on subsequent commands.

text data files,text data files,text data files
blanks,blanks,blanks

• In numeric format, blanks to the left or right of a number are ignored; embedded blanks are invalid. When the program encounters a field that contains one or more blanks interspersed among the numbers, it issues a warning message and assigns the system-missing value to that case.

• Alphabetical and special characters, except the decimal point and leading plus and minus signs, are not valid in numeric variables and are set to system-missing if encountered in the data.

• For string variables, "column" specifications represent bytes, not characters. Many string characters that only take one byte in code page format take two or more bytes in Unicode format. For example, é is one byte in code page format but is two bytes in Unicode format; so résumé is six bytes in a code page file and eight bytes in a Unicode file.

• The system-missing value is assigned to a completely blank field for numeric variables. The value assigned to blanks can be changed using the BLANKS specification on the SET command.

• The program ignores data contained in columns and records that are not specified in the variable definition.

Related Topics

Freefield Data (DATA LIST command)
Variable Location (DATA LIST command)


Freefield Data (DATA LIST command)

DATA LIST (command),DATA LIST (command),DATA LIST (command)
freefield data,freefield data,freefield data
text data files,text data files,text data files
freefield format,freefield format,freefield format
freefield format,freefield format,freefield format

FREE can read freefield data with multiple cases recorded on one record or with one case recorded on more than one record. LIST can read freefield data with one case on each record.

• Line endings are read as delimiters between values.

• If you use FORTRAN-like format specifications (for example, DOLLAR12.2), width and decimal specifications are not used to read the data but are assigned as print and write formats for the variable.

DATA LIST (command),DATA LIST (command),DATA LIST (command)
freefield data,freefield data,freefield data
text data files,text data files,text data files
freefield format,freefield format,freefield format
freefield format,freefield format,freefield format

For freefield data without explicitly specified value delimiters:

• Commas and blanks are interpreted as delimiters between values.

• Extra blanks are ignored.

• Multiple commas with or without blank space between them can be used to specify missing data.

• If a valid value contains commas or blank spaces, enclose the values in quotes.

For data with explicitly specified value delimiters (for example, DATA LIST FREE (",")):

• Multiple delimiters without any intervening space can be used to specify missing data.

• The specified delimiters cannot occur within a data value, even if you enclose the value in quotes.

Note: Freefield format with specified value delimiters is typically used to read data in text format written by a computer program, not for data manually entered in a text editor.

Related Topics

Fixed-Format Data (DATA LIST command)
Variable Location (DATA LIST command)


FILE Subcommand (DATA LIST command)

FILE (subcommand),FILE (subcommand),FILE (subcommand)
DATA LIST command,DATA LIST command,DATA LIST command
DATA LIST (command),DATA LIST (command),DATA LIST (command)
FILE subcommand,FILE subcommand,FILE subcommand

FILE specifies the raw data file. FILE is required when data are stored in an external data file. FILE must not be used when the data are stored in a file that is included with the INCLUDE command or when the data are inline (see INCLUDE and BEGIN DATA—END DATA).

• FILE must be separated from other DATA LIST subcommands by at least one blank or comma.

• FILE must precede the first slash, which signals the beginning of variable definition.

Related Topics

DATA LIST
Overview (DATA LIST command)
Examples (DATA LIST command)
Operations (DATA LIST command)
ENCODING Subcommand (DATA LIST command)
FIXED, FREE, and LIST Keywords (DATA LIST command)
TABLE and NOTABLE Subcommands (DATA LIST command)
RECORDS Subcommand (DATA LIST command)
SKIP Subcommand (DATA LIST command)
END Subcommand (DATA LIST command)
Variable Definition (DATA LIST command)
Variable Names (DATA LIST command)
Variable Location (DATA LIST command)
Fixed-Format Data (DATA LIST command)
Freefield Data (DATA LIST command)
Variable Formats (DATA LIST command)


ENCODING Subcommand (DATA LIST command)

DATA LIST (command),DATA LIST (command),DATA LIST (command)
ENCODING subcommand,ENCODING subcommand,ENCODING subcommand
Unicode files,Unicode files,Unicode files
ENCODING (subcommand),ENCODING (subcommand),ENCODING (subcommand)
DATA LIST command,DATA LIST command,DATA LIST command
Unicode,Unicode,Unicode
text data files,text data files,text data files

ENCODING specifies the encoding format of the file. The keyword is followed by an equals sign and a quoted encoding specification.

• In Unicode mode, the default is UTF8. For more information, see SET command, UNICODE subcommand.

• In code page mode, the default is the current locale setting. For more information, see SET command, LOCALE subcommand.

• The quoted encoding value can be: Locale (the current locale setting), UTF8, UTF16, UTF16BE (big endian), UTF16LE (little endian), a numeric Windows code page value (for example, '1252'), or an IANA code page value (for example, 'iso8859-1' or cp1252).

• In Unicode mode, the defined width of string variables is tripled for code page and UTF-16 text data files. Use ALTER TYPE to automatically adjust the defined width of string variables.

• If there is no FILE subcommand, the ENCODING subcommand is ignored.

Related Topics

DATA LIST
Overview (DATA LIST command)
Examples (DATA LIST command)
Operations (DATA LIST command)
FILE Subcommand (DATA LIST command)
FIXED, FREE, and LIST Keywords (DATA LIST command)
TABLE and NOTABLE Subcommands (DATA LIST command)
RECORDS Subcommand (DATA LIST command)
SKIP Subcommand (DATA LIST command)
END Subcommand (DATA LIST command)
Variable Definition (DATA LIST command)
Variable Names (DATA LIST command)
Variable Location (DATA LIST command)
Fixed-Format Data (DATA LIST command)
Freefield Data (DATA LIST command)
Variable Formats (DATA LIST command)


FIXED, FREE, and LIST Keywords (DATA LIST command)

DATA LIST (command),DATA LIST (command),DATA LIST (command)
FIXED keyword,FIXED keyword,FIXED keyword
DATA LIST (command),DATA LIST (command),DATA LIST (command)
FREE keyword,FREE keyword,FREE keyword
DATA LIST (command),DATA LIST (command),DATA LIST (command)
LIST keyword,LIST keyword,LIST keyword
FIXED (keyword),FIXED (keyword),FIXED (keyword)
DATA LIST command,DATA LIST command,DATA LIST command
FREE (keyword),FREE (keyword),FREE (keyword)
DATA LIST command,DATA LIST command,DATA LIST command
LIST (keyword),LIST (keyword),LIST (keyword)
DATA LIST command,DATA LIST command,DATA LIST command
text data files,text data files,text data files
fixed format,fixed format,fixed format
fixed format,fixed format,fixed format
text data files,text data files,text data files
freefield format,freefield format,freefield format
freefield format,freefield format,freefield format
DATA LIST (command),DATA LIST (command),DATA LIST (command)
fixed-format data,fixed-format data,fixed-format data
DATA LIST (command),DATA LIST (command),DATA LIST (command)
freefield data,freefield data,freefield data

FIXED, FREE, or LIST indicates the format of the data. Only one of these keywords can be used on each DATA LIST. The default is FIXED.

FIXED | Fixed-format data. Each variable is recorded in the same column location on the same record for each case in the data. FIXED is the default.
FREE | Freefield data. The variables are recorded in the same order for each case but not necessarily in the same column locations. More than one case can be entered on the same record. By default, values are separated by blanks or commas. You can also specify different value delimiters.
LIST | Freefield data with one case on each record. The variables are recorded in freefield format as described for the keyword FREE except that the variables for each case must be recorded on one record.

• FIXED, FREE, or LIST must be separated from other DATA LIST subcommands by at least one blank or comma.

• FIXED, FREE, or LIST must precede the first slash, which signals the beginning of data definition.

• For fixed-format data, you can use column-style or FORTRAN-like formats, or a combination of both. For freefield data, you can use only FORTRAN-like formats.

• For fixed-format data, the program reads values according to the column locations specified or implied by the FORTRAN-like format. Values in the data do not have to be in the same order as the variables named on DATA LIST and do not have to be separated by a space or column.

• For freefield data, the program reads values sequentially in the order in which the variables are named on DATA LIST. Values in the data must be in the order in which the variables are named on DATA LIST and must be separated by at least one valid delimiter.

• For freefield data, multiple blank spaces can be used to indicate missing information only if a blank space is explicitly specified as the delimiter. In general, it is better to use multiple nonblank delimiters (for example, two commas with no intervening space) to specify missing data.

• In freefield format, a value cannot be split across records.

Example

* Data in fixed format.

DATA LIST FILE="/data/hubdata.txt" FIXED RECORDS=3
  /1 YRHIRED 14-15 DEPT 19 SEX 20.

• FIXED indicates explicitly that the hubdata.txt file is in fixed format. Because FIXED is the default, the keyword FIXED could have been omitted.

• Variable definition begins after the slash. Column locations are specified after each variable. Since formats are not specified, the default numeric format is used. Variable widths are determined by the column specifications: YRHIRED is two digits wide, and DEPT and SEX are each one digit wide.

Example

* Data in freefield format.

DATA LIST FREE / POSTPOS NWINS.
BEGIN DATA
2, 19, 7, 5, 10, 25, 5, 17, 8, 11, 3,, 6, 8, 1, 29
END DATA.

• Data are inline, so FILE is omitted. The keyword FREE is used because data are in freefield format with multiple cases on a single record. Two variables, POSTPOS and NWINS, are defined. Since formats are not specified, both variables receive the default F8.2 format.

• All of the data are recorded on one record. The first two values build the first case in the active dataset. For the first case, POSTPOS has value 2 and NWINS has value 19. For the second case, POSTPOS has value 7 and NWINS has value 5, and so on. The active dataset will contain eight cases.

• The two commas without intervening space after the data value 3 indicate a missing data value.

Example

* Data in list format.

DATA LIST LIST (",")/ POSTPOS NWINS.
BEGIN DATA
2,19
7,5
10,25
5,17
8,11
3,
6,8
1,29
END DATA.

• This example defines the same data as the previous example, but LIST is used because each case is recorded on a separate record. FREE could also be used. However, LIST is less prone to errors in data entry. If you leave out a value in the data with FREE format, all values after the missing value are assigned to the wrong variable. Since LIST format reads a case from each record, a missing value will affect only one case.

• A comma is specified as the delimiter between values.

• Since line endings are interpreted as delimiters between values, the second comma after the value 3 (in the sixth line of data) is not necessary to indicate that the value of NWINS is missing for that case.

Related Topics

DATA LIST
Overview (DATA LIST command)
Examples (DATA LIST command)
Operations (DATA LIST command)
FILE Subcommand (DATA LIST command)
ENCODING Subcommand (DATA LIST command)
TABLE and NOTABLE Subcommands (DATA LIST command)
RECORDS Subcommand (DATA LIST command)
SKIP Subcommand (DATA LIST command)
END Subcommand (DATA LIST command)
Variable Definition (DATA LIST command)
Variable Names (DATA LIST command)
Variable Location (DATA LIST command)
Fixed-Format Data (DATA LIST command)
Freefield Data (DATA LIST command)
Variable Formats (DATA LIST command)


TABLE and NOTABLE Subcommands (DATA LIST command)

DATA LIST (command),DATA LIST (command),DATA LIST (command)
TABLE subcommand,TABLE subcommand,TABLE subcommand
TABLE (subcommand),TABLE (subcommand),TABLE (subcommand)
DATA LIST command,DATA LIST command,DATA LIST command
DATA LIST (command),DATA LIST (command),DATA LIST (command)
NOTABLE subcommand,NOTABLE subcommand,NOTABLE subcommand
NOTABLE (subcommand),NOTABLE (subcommand),NOTABLE (subcommand)
DATA LIST command,DATA LIST command,DATA LIST command

TABLE displays a table summarizing the variable definitions supplied on DATA LIST. NOTABLE suppresses the summary table. TABLE is the default.

• TABLE and NOTABLE can be used only for fixed-format data.

• TABLE and NOTABLE must be separated from other DATA LIST subcommands by at least one blank or comma.

• TABLE and NOTABLE must precede the first slash, which signals the beginning of variable definition.

Related Topics

DATA LIST
Overview (DATA LIST command)
Examples (DATA LIST command)
Operations (DATA LIST command)
FILE Subcommand (DATA LIST command)
ENCODING Subcommand (DATA LIST command)
FIXED, FREE, and LIST Keywords (DATA LIST command)
RECORDS Subcommand (DATA LIST command)
SKIP Subcommand (DATA LIST command)
END Subcommand (DATA LIST command)
Variable Definition (DATA LIST command)
Variable Names (DATA LIST command)
Variable Location (DATA LIST command)
Fixed-Format Data (DATA LIST command)
Freefield Data (DATA LIST command)
Variable Formats (DATA LIST command)


RECORDS Subcommand (DATA LIST command)

DATA LIST (command),DATA LIST (command),DATA LIST (command)
RECORDS subcommand,RECORDS subcommand,RECORDS subcommand
RECORDS (subcommand),RECORDS (subcommand),RECORDS (subcommand)
DATA LIST command,DATA LIST command,DATA LIST command
data records,data records,data records
defining,defining,defining
records,records,records
defining,defining,defining

RECORDS indicates the number of records per case for fixed-format data. In the variable definition portion of DATA LIST, each record is preceded by a slash. By default, DATA LIST reads one record per case.

• The only specification on RECORDS is a single integer indicating the total number of records for each case (even if the DATA LIST command does not define all the records).

• RECORDS can be used only for fixed-format data and must be separated from other DATA LIST subcommands by at least one blank or comma. RECORDS must precede the first slash, which signals the beginning of variable definition.

• Each slash in the variable definition portion of DATA LIST indicates the beginning of a new record. The first slash indicates the first (or only) record. The second and any subsequent slashes tell the program to go to a new record.

• To skip a record, specify a slash without any variables for that record.

• The number of slashes in the variable definition cannot exceed the value of the integer specified on RECORDS.

• The sequence number of the record being defined can be specified after each slash. DATA LIST reads the number to determine which record to read. If the sequence number is used, you do not have to use a slash for any skipped records. However, the records to be read must be in their sequential order.

• The slashes for the second and subsequent records can be specified within the variable list, or they can be specified on a format list following the variable list (see the example below).

• All variables to be read from one record should be defined before you proceed to the next record.

• Since RECORDS can be used only with fixed format, it is not necessary to define all the variables on a given record or to follow their order in the input data file.

Example

DATA LIST FILE="/data/hubdata.txt" RECORDS=3
 /2 YRHIRED 14-15 DEPT 19 SEX 20.

• DATA LIST defines fixed-format data. RECORDS can be used only for fixed-format data.

• RECORDS indicates that there are three records per case in the data. Only one record per case is defined in the data definition.

• The sequence number (2) before the first variable definition indicates that the variables being defined are on the second record. Because the sequence number is provided, a slash is not required for the first record, which is skipped.

• The variables YRHIRED, DEPT, and SEX are defined and will be included in the active dataset. Any other variables on the second record or on the other records are not defined and are not included in the active dataset.

Example

DATA LIST FILE="/data/hubdata.txt" RECORDS=3
  / /YRHIRED 14-15 DEPT 19 SEX 20.

• This command is equivalent to the one in the previous example. Because the record sequence number is omitted, a slash is required to skip the first record.

Example

DATA LIST FILE="/data/hubdata.txt" RECORDS=3
  /YRHIRED (T14,F2.0) /  /NAME (T25,A24).

• RECORDS indicates there are three records for each case in the data.

• YRHIRED is the only variable defined on the first record. The FORTRAN-like format specification T14 means tab over 14 columns. Thus, YRHIRED begins in column 14 and has format F2.0.

• The second record is skipped. Because the record sequence numbers are not specified, a slash must be used to skip the second record.

• NAME is the only variable defined for the third record. NAME begins in column 25 and is a string variable with a width of 24 bytes (format A24).

Example

DATA LIST FILE="/data/hubdata.txt" RECORDS=3
  /YRHIRED NAME (T14,F2.0 /  / T25,A24).

• This command is equivalent to the one in the previous example. YRHIRED is located on the first record, and NAME is located on the third record.

• The slashes that indicate the second and third records are specified within the format specifications. The format specifications follow the complete variable list.

Related Topics

DATA LIST
Overview (DATA LIST command)
Examples (DATA LIST command)
Operations (DATA LIST command)
FILE Subcommand (DATA LIST command)
ENCODING Subcommand (DATA LIST command)
FIXED, FREE, and LIST Keywords (DATA LIST command)
TABLE and NOTABLE Subcommands (DATA LIST command)
SKIP Subcommand (DATA LIST command)
END Subcommand (DATA LIST command)
Variable Definition (DATA LIST command)
Variable Names (DATA LIST command)
Variable Location (DATA LIST command)
Fixed-Format Data (DATA LIST command)
Freefield Data (DATA LIST command)
Variable Formats (DATA LIST command)


SKIP Subcommand (DATA LIST command)

DATA LIST (command),DATA LIST (command),DATA LIST (command)
SKIP subcommand,SKIP subcommand,SKIP subcommand
SKIP (subcommand),SKIP (subcommand),SKIP (subcommand)
DATA LIST command,DATA LIST command,DATA LIST command
text data files,text data files,text data files
skipping the first n records,skipping the first n records,skipping the first n records

SKIP skips the first n records of the data file.

Example

DATA LIST LIST SKIP=2 /numvar.
BEGIN DATA
Some text describing the file
followed by some more text
1
2
3
END DATA.

Related Topics

DATA LIST
Overview (DATA LIST command)
Examples (DATA LIST command)
Operations (DATA LIST command)
FILE Subcommand (DATA LIST command)
ENCODING Subcommand (DATA LIST command)
FIXED, FREE, and LIST Keywords (DATA LIST command)
TABLE and NOTABLE Subcommands (DATA LIST command)
RECORDS Subcommand (DATA LIST command)
END Subcommand (DATA LIST command)
Variable Definition (DATA LIST command)
Variable Names (DATA LIST command)
Variable Location (DATA LIST command)
Fixed-Format Data (DATA LIST command)
Freefield Data (DATA LIST command)
Variable Formats (DATA LIST command)


END Subcommand (DATA LIST command)

INPUT PROGRAM (command),INPUT PROGRAM (command),INPUT PROGRAM (command)
with END subcommand on DATA LIST,with END subcommand on DATA LIST,with END subcommand on DATA LIST
end-of-file control,end-of-file control,end-of-file control
in input programs,in input programs,in input programs
input programs,input programs,input programs
end-of-file control,end-of-file control,end-of-file control
DATA LIST (command),DATA LIST (command),DATA LIST (command)
END subcommand,END subcommand,END subcommand
END (subcommand),END (subcommand),END (subcommand)
DATA LIST command,DATA LIST command,DATA LIST command
DATA LIST (command),DATA LIST (command),DATA LIST (command)
with INPUT PROGRAM command,with INPUT PROGRAM command,with INPUT PROGRAM command

END provides control of end-of-file processing by specifying a variable that is set to a value of 0 until the end of the data file is encountered, at which point the variable is set to 1. The values of all variables named on DATA LIST are left unchanged. The logical variable created with END can then be used on DO IF and LOOP commands to invoke special processing after all of the cases from a particular input file have been built.

• DATA LIST and the entire set of commands used to define the cases must be enclosed within an INPUT PROGRAM—END INPUT PROGRAM structure. The END FILE command must also be used to signal the end of case generation.

• END can be used only with fixed-format data. An error is generated if the END subcommand is used with FREE or LIST.

input programs,input programs,input programs
examples,examples,examples
INPUT PROGRAM (command),INPUT PROGRAM (command),INPUT PROGRAM (command)
examples,examples,examples

Example

INPUT PROGRAM.
NUMERIC        TINCOME (DOLLAR8.0).                 /* Total income
LEAVE          TINCOME.
DO IF          $CASENUM EQ 1.
+  PRINT       EJECT.
+  PRINT       / 'Name        Income'.
END IF
DATA LIST     FILE=INCOME END=#EOF NOTABLE / NAME 1-10(A)
                                             INCOME 16-20(F).
DO IF          #EOF.
+  PRINT       / 'TOTAL     ', TINCOME.
+  END FILE.
ELSE.
+  PRINT       / NAME, INCOME (A10,COMMA8).
+  COMPUTE     TINCOME = TINCOME+INCOME.  /* Accumulate total income
END IF.
END INPUT PROGRAM.

EXECUTE.

• The data definition commands are enclosed within an INPUT PROGRAM—END INPUT PROGRAM structure.

• NUMERIC indicates that a new numeric variable, TINCOME, will be created.

• LEAVE tells the program to leave variable TINCOME at its value for the previous case as each new case is read, so that it can be used to accumulate totals across cases.

• The first DO IF structure, enclosing the PRINT EJECT and PRINT commands, tells the program to display the headings Name and Income at the top of the display (when $CASENUM equals 1).

• DATA LIST defines variables NAME and INCOME, and it specifies the scratch variable #EOF on the END subcommand.

• The second DO IF prints the values for NAME and INCOME and accumulates the variable INCOME into TINCOME by passing control to ELSE as long as #EOF is not equal to 1. At the end of the file, #EOF equals 1, and the expression on DO IF is true. The label TOTAL and the value for TINCOME are displayed, and control is passed to END FILE.

Example

* Concatenate three raw data files.

INPUT PROGRAM.
NUMERIC #EOF1 TO #EOF3.  /*These will be used as the END variables.

DO IF #EOF1 & #EOF2 & #EOF3.
+   END FILE.
ELSE IF #EOF1 & #EOF2.
+    DATA LIST  FILE=THREE END=#EOF3 NOTABLE / NAME 1-20(A)
             AGE 25-26 SEX 29(A).
+    DO IF NOT #EOF3.
+       END CASE.
+    END IF.
ELSE IF #EOF1.
+    DATA LIST  FILE=TWO END=#EOF2 NOTABLE / NAME 1-20(A)
             AGE 21-22 SEX 24(A).
+    DO IF NOT #EOF2.
+       END CASE.
+    END IF.
ELSE.
+    DATA LIST  FILE=ONE END=#EOF1 NOTABLE /1 NAME 1-20(A)
             AGE 21-22 SEX 24 (A).
+    DO IF NOT #EOF1.
+       END CASE.
+    END IF.
END IF.
END INPUT PROGRAM.

REPORT FORMAT AUTOMATIC LIST /VARS=NAME AGE SEX.

• The input program contains a DO IF—ELSE IF—END IF structure.

• Scratch variables are used on each END subcommand so the value will not be reinitialized to the system-missing value after each case is built.

• Three data files are read, two of which contain data in the same format. The third requires a slightly different format for the data items. All three DATA LIST commands are placed within the DO IF structure.

• END CASE builds cases from each record of the three files. END FILE is used to trigger end-of-file processing once all data records have been read.

Related Topics

DATA LIST
Overview (DATA LIST command)
Examples (DATA LIST command)
Operations (DATA LIST command)
FILE Subcommand (DATA LIST command)
ENCODING Subcommand (DATA LIST command)
FIXED, FREE, and LIST Keywords (DATA LIST command)
TABLE and NOTABLE Subcommands (DATA LIST command)
RECORDS Subcommand (DATA LIST command)
SKIP Subcommand (DATA LIST command)
Variable Definition (DATA LIST command)
Variable Names (DATA LIST command)
Variable Location (DATA LIST command)
Fixed-Format Data (DATA LIST command)
Freefield Data (DATA LIST command)
Variable Formats (DATA LIST command)


Variable Definition (DATA LIST command)

DATA LIST (command),DATA LIST (command),DATA LIST (command)
variable definition,variable definition,variable definition
text data files,text data files,text data files
variable definition,variable definition,variable definition
variables,variables,variables
defining,defining,defining

The variable definition portion of DATA LIST assigns names and formats to the variables in the data. Depending on the format of the file, you may also need to specify record and column location. The following sections describe variable names, location, and formats.

Related Topics

DATA LIST
Overview (DATA LIST command)
Examples (DATA LIST command)
Operations (DATA LIST command)
FILE Subcommand (DATA LIST command)
ENCODING Subcommand (DATA LIST command)
FIXED, FREE, and LIST Keywords (DATA LIST command)
TABLE and NOTABLE Subcommands (DATA LIST command)
RECORDS Subcommand (DATA LIST command)
SKIP Subcommand (DATA LIST command)
END Subcommand (DATA LIST command)
Variable Names (DATA LIST command)
Variable Location (DATA LIST command)
Fixed-Format Data (DATA LIST command)
Freefield Data (DATA LIST command)
Variable Formats (DATA LIST command)


Variable Names (DATA LIST command)

variables,variables,variables
naming rules,naming rules,naming rules
DATA LIST (command),DATA LIST (command),DATA LIST (command)
variable names,variable names,variable names

• Variable names must conform to variable-naming rules. System variables (beginning with a $) cannot be defined on DATA LIST. See the topic Variable Names for more information.

• The keyword TO can be used to generate names for consecutive variables in the data. Leading zeros in the number are preserved in the name. X1 TO X100 and X001 TO X100 both generate 100 variable names, but the first 99 names are not the same in the two lists. X01 TO X9 is not a valid specification.

• The order in which variables are named on DATA LIST determines their order in the active dataset.

Example

DATA LIST FREE / ID SALARY #V1 TO #V4.

• The FREE keyword indicates that the data are in freefield format. Six variables are defined: ID, SALARY, #V1, #V2, #V3, and #V4. #V1 to #V4 are scratch variables that are not stored in the active dataset. Their values can be used in transformations but not in procedure commands.

Related Topics

DATA LIST
Overview (DATA LIST command)
Examples (DATA LIST command)
Operations (DATA LIST command)
FILE Subcommand (DATA LIST command)
ENCODING Subcommand (DATA LIST command)
FIXED, FREE, and LIST Keywords (DATA LIST command)
TABLE and NOTABLE Subcommands (DATA LIST command)
RECORDS Subcommand (DATA LIST command)
SKIP Subcommand (DATA LIST command)
END Subcommand (DATA LIST command)
Variable Definition (DATA LIST command)
Variable Location (DATA LIST command)
Fixed-Format Data (DATA LIST command)
Freefield Data (DATA LIST command)
Variable Formats (DATA LIST command)


Variable Location (DATA LIST command)

For fixed-format data, variable locations are specified either explicitly using column locations or implicitly using FORTRAN-like formats. For freefield data, variable locations are not specified. Values are read sequentially in the order in which variables are named on the variable list.

Related Topics

DATA LIST
Overview (DATA LIST command)
Examples (DATA LIST command)
Operations (DATA LIST command)
FILE Subcommand (DATA LIST command)
ENCODING Subcommand (DATA LIST command)
FIXED, FREE, and LIST Keywords (DATA LIST command)
TABLE and NOTABLE Subcommands (DATA LIST command)
RECORDS Subcommand (DATA LIST command)
SKIP Subcommand (DATA LIST command)
END Subcommand (DATA LIST command)
Variable Definition (DATA LIST command)
Variable Names (DATA LIST command)
Fixed-Format Data (DATA LIST command)
Freefield Data (DATA LIST command)
Variable Formats (DATA LIST command)
Fixed-Format Data (DATA LIST command)
Freefield Data (DATA LIST command)


Fixed-Format Data (DATA LIST command)

text data files,text data files,text data files
fixed format,fixed format,fixed format
fixed format,fixed format,fixed format
DATA LIST (command),DATA LIST (command),DATA LIST (command)
fixed-format data,fixed-format data,fixed-format data

• If column-style formats are used, you must specify the column location of each variable after the variable name. If the variable is one column wide, specify the column number. Otherwise, specify the first column number followed by a dash (–) and the last column number.

• If several adjacent variables on the same record have the same width and format type, you can use one column specification after the last variable name. Specify the beginning column location of the first variable, a dash, and the ending column location of the last variable. The program divides the total number of columns specified equally among the variables. If the number of columns does not divide equally, an error message is issued.

• The same column locations can be used to define multiple variables.

• For FORTRAN-like formats, column locations are implied by the width specified on the formats. See the topic Variable Formats (DATA LIST command) for more information. To skip columns, use the Tn or nX format specifications.

• With fixed format, column-style and FORTRAN-like specifications can be mixed on the same DATA LIST command.

• Record location is indicated by a slash or a slash and record number before the names of the variables on that record. See the topic RECORDS Subcommand (DATA LIST command) for more information.

• The program ignores data in columns and on records that are not specified on DATA LIST.

• In the data, values do not have to be separated by a space or comma.

Example

DATA LIST  FILE="/data/hubdata.txt" RECORDS=3
  /1 YRHIRED 14-15 DEPT 19 SEX 20
  /2 SALARY 21-25.

• The data are in fixed format (the default) and are read from the file HUBDATA.

• Three variables, YRHIRED, DEPT, and SEX, are defined on the first record of the HUBDATA file. One variable, SALARY, is read from columns 21 through 25 on the second record. The total number of records per case is specified as 3 even though no variables are defined on the third record. The third record is simply skipped in data definition.

Example

DATA LIST  FILE="/data/hubdata.txt" RECORDS=3
  /1 DEPT 19 SEX 20 YRHIRED 14-15 MOHIRED 12-13 HIRED 12-15
  /2 SALARY 21-25.

• The first two defined variables are DEPT and SEX, located in columns 19 and 20 on record 1. The next three variables, YRHIRED, MOHIRED, and HIRED, are also located on the first record.

• YRHIRED is read from columns 14 and 15, MOHIRED from columns 12 and 13, and HIRED from columns 12 through 15. The variable HIRED is a four-column variable with the first two columns representing the month when an employee was hired (the same as MOHIRED) and the last two columns representing the year of employment (the same as YRHIRED).

• The order of the variables in the dictionary is the order in which they are defined on DATA LIST, not their sequence in the HUBDATA file.

Example

DATA LIST  FILE="/data/hubdata.txt" RECORDS=3
  /1 DEPT 19 SEX 20 MOHIRED YRHIRED 12-15
  /2 SALARY 21-25.

• A single column specification follows MOHIRED and YRHIRED. DATA LIST divides the total number of columns specified equally between the two variables. Thus, each variable has a width of two columns.

Example

* Mixing column-style and FORTRAN-like format specifications.

DATA LIST FILE=PRSNL / LNAME M_INIT STREET (A20,A1,1X,A10)
    AGE 35-36.

• FORTRAN-like format specifications are used for string variables LNAME, M_INIT, and STREET. These variables must be adjacent in the data file. LNAME is 20 bytes wide and is located in columns 1–20. M_INIT is one byte wide and is located in column 21. The 1X specification defines a blank column between M_INIT and STREET. STREET is 10 bytes wide and is located in columns 23–32.

• A column-style format is used for the variable AGE. AGE begins in column 35, ends in column 36, and by default has numeric format.

Related Topics

DATA LIST
Overview (DATA LIST command)
Examples (DATA LIST command)
Operations (DATA LIST command)
FILE Subcommand (DATA LIST command)
ENCODING Subcommand (DATA LIST command)
FIXED, FREE, and LIST Keywords (DATA LIST command)
TABLE and NOTABLE Subcommands (DATA LIST command)
RECORDS Subcommand (DATA LIST command)
SKIP Subcommand (DATA LIST command)
END Subcommand (DATA LIST command)
Variable Definition (DATA LIST command)
Variable Names (DATA LIST command)
Variable Location (DATA LIST command)
Freefield Data (DATA LIST command)
Variable Formats (DATA LIST command)


Freefield Data (DATA LIST command)

text data files,text data files,text data files
freefield format,freefield format,freefield format
freefield format,freefield format,freefield format
DATA LIST (command),DATA LIST (command),DATA LIST (command)
freefield data,freefield data,freefield data

• In freefield data, column location is irrelevant since values are not in fixed column positions. Instead, values are simply separated from each other by blanks, commas, or a specified delimiter. Any number of consecutive blanks are interpreted as one delimiter unless a blank space is explicitly specified as the value delimiter. A value cannot be split across records.

• If there are not enough values to complete the last case, a warning is issued and the incomplete case is dropped.

• The specified delimiter can only be used within data values if the value is enclosed in quotes.

• To include a single quote (apostrophe) in a string value, enclose the value in double quotes. To include double quotes in a string value, enclose the value in single quotes. See the topic String Values in Command Specifications for more information.

Related Topics

DATA LIST
Overview (DATA LIST command)
Examples (DATA LIST command)
Operations (DATA LIST command)
FILE Subcommand (DATA LIST command)
ENCODING Subcommand (DATA LIST command)
FIXED, FREE, and LIST Keywords (DATA LIST command)
TABLE and NOTABLE Subcommands (DATA LIST command)
RECORDS Subcommand (DATA LIST command)
SKIP Subcommand (DATA LIST command)
END Subcommand (DATA LIST command)
Variable Definition (DATA LIST command)
Variable Names (DATA LIST command)
Variable Location (DATA LIST command)
Fixed-Format Data (DATA LIST command)
Variable Formats (DATA LIST command)


Variable Formats (DATA LIST command)

DATA LIST (command),DATA LIST (command),DATA LIST (command)
variable formats,variable formats,variable formats
input formats,input formats,input formats

Two types of format specifications are available: column-style and FORTRAN-like. With each type, you can specify both numeric and string formats. The difference between the two types is that FORTRAN-like formats include the width of the variable and column-style formats do not.

• Column-style formats are available only for fixed-format data.

• Column-style and FORTRAN-like formats can be mixed on the same DATA LIST to define fixed-format data.

• A value that cannot be read according to the format type specified is assigned the system-missing value and a warning message is issued.

The following sections discuss the rules for specifying column-style and FORTRAN-like formats, followed by additional considerations for numeric and string formats.

Related Topics

DATA LIST
Overview (DATA LIST command)
Examples (DATA LIST command)
Operations (DATA LIST command)
FILE Subcommand (DATA LIST command)
ENCODING Subcommand (DATA LIST command)
FIXED, FREE, and LIST Keywords (DATA LIST command)
TABLE and NOTABLE Subcommands (DATA LIST command)
RECORDS Subcommand (DATA LIST command)
SKIP Subcommand (DATA LIST command)
END Subcommand (DATA LIST command)
Variable Definition (DATA LIST command)
Variable Names (DATA LIST command)
Variable Location (DATA LIST command)
Fixed-Format Data (DATA LIST command)
Freefield Data (DATA LIST command)
Column-Style Format Specifications (DATA LIST command)
FORTRAN-like Format Specifications (DATA LIST command)
Numeric Formats (DATA LIST command)
Implied Decimal Positions (DATA LIST command)
String Formats (DATA LIST command)


Column-Style Format Specifications (DATA LIST command)

DATA LIST (command),DATA LIST (command),DATA LIST (command)
column-style formats,column-style formats,column-style formats
column-style format specifications,column-style format specifications,column-style format specifications
input formats,input formats,input formats
column-style specifications,column-style specifications,column-style specifications

The following rules apply to column-style formats:

• Data must be in a fixed format.

• Column locations must be specified after variable names. The width of a variable is determined by the number of specified columns. See the topic Fixed-Format Data (DATA LIST command) for more information.

• Following the column location, specify the format type in parentheses. The format type applies only to the variable or the list of variables associated with the column location specification immediately before it. If no format type is specified, numeric (F) format is used.

• To include decimal positions in the format, specify the format type followed by a comma and the number of decimal positions. For example, (DOLLAR) specifies only whole dollar amounts, and (DOLLAR,2) specifies DOLLAR format with two decimal positions.

• Since column positions are explicitly specified, the variables can be named in any order.

Related Topics

Variable Formats (DATA LIST command)
FORTRAN-like Format Specifications (DATA LIST command)
Numeric Formats (DATA LIST command)
Implied Decimal Positions (DATA LIST command)
String Formats (DATA LIST command)


FORTRAN-like Format Specifications (DATA LIST command)

DATA LIST (command),DATA LIST (command),DATA LIST (command)
FORTRAN-like formats,FORTRAN-like formats,FORTRAN-like formats
FORTRAN-like format specifications,FORTRAN-like format specifications,FORTRAN-like format specifications
input formats,input formats,input formats
FORTRAN-like specifications,FORTRAN-like specifications,FORTRAN-like specifications

The following rules apply to FORTRAN-like formats:

• Data can be in either fixed or freefield format.

• Column locations cannot be specified. The width of a variable is determined by the width portion (w) of the format specification. The width must specify the number of bytes in the widest value.

• One format specification applies to only one variable. The format is specified in parentheses after the variable to which it applies. Alternatively, a variable list can be followed by an equal number of format specifications contained in one set of parentheses. When a number of consecutive variables have the same format, the number can be used as a multiplying factor preceding the format. For example, (3F5.2) assigns the format F5.2 to three consecutive variables.

• For fixed data, the number of formats specified (either explicitly or implied by the multiplication factor) must be the same as the number of variables. Otherwise, the program issues an error message. If no formats are specified, all variables have the default format F8.2.

• For freefield data, variables with no specified formats take the default F8.2 format. However, an asterisk (*) must be used to indicate where the default format stops. Otherwise, the program tries to apply the next specified format to every variable before it and issues an error message if the number of formats specified is less than the number of variables.

• For freefield data, width and decimal specifications are not used to read the data but are assigned as print and write formats for the variable.

• For fixed data, Tn can be used before a format to indicate that the variable begins at the nth column, and nX can be used to skip n columns before reading the variable. When Tn is specified, variables named do not have to follow the order of the variables in the data.

• For freefield data, variables are located according to the sequence in which they are named on DATA LIST. The order of variables on DATA LIST must correspond to the order of variables in the data.

• To include decimal positions in the format for fixed-format data, specify the total width followed by a decimal point and the number of decimal positions. For example, (DOLLAR5) specifies a five-column DOLLAR format without decimal positions, and (DOLLAR5.2) specifies a five-column DOLLAR format, two columns of which are decimal positions.

Related Topics

Variable Formats (DATA LIST command)
Column-Style Format Specifications (DATA LIST command)
Numeric Formats (DATA LIST command)
Implied Decimal Positions (DATA LIST command)
String Formats (DATA LIST command)


Numeric Formats (DATA LIST command)

input formats,input formats,input formats
numeric,numeric,numeric
numeric data,numeric data,numeric data
input formats,input formats,input formats

• Format specifications on DATA LIST are input formats. Based on the width specification and format type, the program generates output (print and write) formats for each variable. The program automatically expands the output format to accommodate punctuation characters such as decimal points, commas, dollar signs, or date and time delimiters. (The program does not automatically expand the output formats you assign on the FORMATS, PRINT FORMATS, and WRITE FORMATS commands. For information on assigning output formats, refer to these commands.)

• Scientific notation is accepted in input data with F, COMMA, DOLLAR, DOT, and PCT formats. The same rules apply to these formats as to E format. The values 1.234E3, 1.234+3, and 1.234E 3 are all legitimate. The last value (with a blank space) will cause freefield data to be misread and therefore should be avoided when LIST or FREE is specified.

Related Topics

Variable Formats (DATA LIST command)
Column-Style Format Specifications (DATA LIST command)
FORTRAN-like Format Specifications (DATA LIST command)
Implied Decimal Positions (DATA LIST command)
String Formats (DATA LIST command)


Implied Decimal Positions (DATA LIST command)

decimal places,decimal places,decimal places
implied,implied,implied
implied decimal format,implied decimal format,implied decimal format

• For fixed-format data, decimal positions can be coded in the data or implied by the format. If decimal positions are implied but are not entered in the data, the program interprets the rightmost digits in each value as the decimal digits. A coded decimal point in a value overrides the number of implied decimal places. For example, (DOLLAR,2) specifies two decimal positions. The value 123 is interpreted as 1.23; however, the value 12.3 is interpreted as 12.3 because the coded decimal position overrides the number of implied decimal positions.

• For freefield data, decimal positions cannot be implied but must be coded in the data. If decimal positions are specified in the format but a data value does not include a decimal point, the program fills the decimal places with zeros. For example, with F3.1 format (three columns with one decimal place), the value 22 is displayed as 22.0. If a value in the data has more decimal digits than are specified in the format, the additional decimals are truncated in displayed output (but not in calculations). For example, with F3.1 format, the value 2.22 is displayed as 2.2 even though in calculations it remains 2.22.

The table below compares how values are interpreted for fixed and freefield formats. Values in the table are for a four-column numeric variable.

Interpretation of values in fixed and freefield format
 | Fixed |  | Freefield
Values | Default | Two defined decimal places | Default | Two defined decimal places
2001 | 2001 | 20.01 | 2001.00 | 2001.00
201 | 201 | 2.01 | 201.00 | 201.00
–201 | –201 | –2.01 | –201.00 | –201.00
2 | 2 | .02 | 2.00 | 2.00
20 | 20 | .20 | 20.00 | 20.00
2.2 | 2.2 | 2.2 | 2.20 | 2.20
.201 | .201 | .201 | .201 | .201
2 01 | Undefined | Undefined | Two values | Two values

Example

DATA LIST
  /MODEL 1 RATE 2-6(PCT,2) COST 7-11(DOLLAR) READY 12-21(ADATE).
BEGIN DATA
1935  7878811-07-1988
2 16754654606-08-1989
3 17684783612-09-1989
END DATA.

• Data are inline and in fixed format (the default).

• Each variable is followed by its column location. After the column location, a column-style format is specified in parentheses.

• MODEL begins in column 1, is one column wide, and receives the default numeric F format.

• RATE begins in column 2 and ends in column 6. The PCT format is specified with two decimal places. A comma is used to separate the format type from the number of decimal places. Decimal points are not coded in the data. Thus, the program reads the rightmost digits of each value as decimal digits. The value 935 for the first case in the data is interpreted as 9.35. Note that it does not matter where numbers are entered within the column width.

• COST begins in column 7 and ends in column 11. DOLLAR format is specified.

• READY begins in column 12 and ends in column 21. ADATE format is specified.

Example

DATA LIST FILE="/data/data1.txt"
  /MODEL (F1) RATE (PCT5.2) COST (DOLLAR5) READY (ADATE10).

• In this example, the FILE subcommand is used because the data are in an external file.

• The variable definition is the same as in the preceding example except that FORTRAN-like format specifications are used rather than column-style. Column locations are not specified. Instead, the format specifications include a width for each format type.

• The width (w) portion of each format must specify the total number of bytes in the widest value. DOLLAR5 format for COST accepts the five-digit value 78788, which displays as $78,788. Thus, the specified input format DOLLAR5 generates an output format DOLLAR7. The program automatically expands the width of the output format to accommodate the dollar sign and comma in displayed output.

Related Topics

Variable Formats (DATA LIST command)
Column-Style Format Specifications (DATA LIST command)
FORTRAN-like Format Specifications (DATA LIST command)
Numeric Formats (DATA LIST command)
String Formats (DATA LIST command)


String Formats (DATA LIST command)

input formats,input formats,input formats
string,string,string
string variables,string variables,string variables
input formats,input formats,input formats

String (alphanumeric) variables can contain any numbers, letters, or characters, including special characters and embedded blanks. Numbers entered as values for string variables cannot be used in calculations unless you convert them to numeric format (see RECODE). On DATA LIST, a string variable is defined with an A format if data are in standard character form or an AHEX format if data are in hexadecimal form.

• For fixed-format data, the width of a string variable is either implied by the column location specification or specified by the w on the FORTRAN-like format. For freefield data, the width must be specified on the FORTRAN-like format.

• For string variables, "column" and width specifications represent bytes, not characters. Many string characters that only take one byte in code page format take two or more bytes in Unicode format. For example, é is one byte in code page format but is two bytes in Unicode format; so resumé is six bytes in a code page file and seven bytes in a Unicode file.

• AHEX format is available only for fixed-format data. Since each set of two hexadecimal characters represents one standard character, the width specification must be an even number. The output format for a variable in AHEX format is A format with half the specified width.

• If a string in the data is longer than its specified width, the string is truncated and a warning message is displayed. If the string in the data is shorter, it is right-padded with blanks and no warning message is displayed.

• For fixed-format data, all characters within the specified or implied columns, including leading, trailing, and embedded blanks and punctuation marks, are read as the value of the string.

• For freefield data without a specified delimiter, string values in the data must be enclosed in quotes if the string contains a blank or a comma. Otherwise, the blank or comma is treated as a delimiter between values. See the topic String Values in Command Specifications for more information.

Example

DATA LIST FILE="/data/wins.txt" FREE /POSTPOS NWINS * POSNAME (A24).

• POSNAME is specified as a 24-byte string. The asterisk preceding POSNAME indicates that POSTPOS and NWINS are read with the default format. If the asterisk was not specified, the program would apply the A24 format to POSNAME and then issue an error message indicating that there are more variables than specified formats.

Example

DATA LIST FILE="/data/wins.txt" FREE /POSTPOS * NWINS (A5) POSWINS.

• Both POSTPOS and POSWINS receive the default numeric format F8.2.

• NWINS receives the specified format of A5.

Related Topics

Variable Formats (DATA LIST command)
Column-Style Format Specifications (DATA LIST command)
FORTRAN-like Format Specifications (DATA LIST command)
Numeric Formats (DATA LIST command)
Implied Decimal Positions (DATA LIST command)


DATAFILE ATTRIBUTE

attributes,attributes,attributes
user-defined data file attributes,user-defined data file attributes,user-defined data file attributes
DATAFILE ATTRIBUTE (command),DATAFILE ATTRIBUTE (command),DATAFILE ATTRIBUTE (command)
DATAFILE ATTRIBUTE (command),DATAFILE ATTRIBUTE (command),DATAFILE ATTRIBUTE (command)
syntax chart,syntax chart,syntax chart
release history,release history,release history
DATAFILE ATTRIBUTE
         ATTRIBUTE=name('value') name('value')...
                   arrayname[1]('value') arrayname[2]('value')...
         DELETE=name name...
                arrayname[n] arrayname...

This command takes effect immediately. It does not read the active dataset or execute pending transformations. See the topic Command Order for more information.

Release History Collapse Hide details

Release History

Release 14.0

• Command introduced.

Example

DATAFILE ATTRIBUTE
  ATTRIBUTE=OriginalVersion ('1').

Related Topics

Overview (DATAFILE ATTRIBUTE command)
VARIABLE ATTRIBUTE


Overview (DATAFILE ATTRIBUTE command)

DATAFILE ATTRIBUTE provides the ability for you to define your own data file attributes and assign attribute values to the active dataset.

• User-defined data file attributes are saved with the data file in the data dictionary.

• The DATAFILE ATTRIBUTE command takes effect immediately, updating the data dictionary without requiring a data pass.

• You can display a list of data file and variable attributes with DISPLAY ATTRIBUTES. See the topic DISPLAY for more information.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is:

• ATTRIBUTE keyword followed by an equals sign (=) and one or more attribute names that follow variable naming rules, with each attribute name followed by a quoted attribute value, enclosed in parentheses.

or

• DELETE keyword followed by an equals sign (=) and a list of defined attribute names or attribute arrays.

Syntax Rules Collapse Hide details

Syntax Rules

• The keywords ATTRIBUTE and DELETE must each be followed by an equals sign (=).

• Each ATTRIBUTE keyword must be followed by a name that follows variable naming rules and a single, quoted attribute value, enclosed in parentheses. See the topic Variable Names for more information.

• Attribute names that begin with @ are not displayed by DISPLAY DICTIONARY or DISPLAY ATTRIBUTES. They can only be displayed with DISPLAY @ATTRIBUTES.

• Attribute names that begin with a dollar sign ($) are reserved for internal use.

• All attribute values must be quoted (single or double quotes), even if the values are numbers.

• Attribute values can be up to 32,767 bytes in length.

Example

DATAFILE ATTRIBUTE
  ATTRIBUTE=OriginalVersion ('1')
            CreationDate('10/28/2004')
            RevisionDate('10/29/2004').
Attribute Arrays Collapse Hide details

Attribute Arrays

If you append an integer enclosed in square brackets to the end of an attribute name, the attribute is interpreted as an array of attributes. For example:

DATAFILE ATTRIBUTE
  ATTRIBUTE=FileAttribute[99]('not quite 100').

will create 99 attributes--FileAttribute[01] through FileAttribute[99]--and will assign the value "not quite 100" to the last one.

• Array subscripts (the value enclosed in square brackets) must be integers greater than 0. (Array subscript numbering starts with 1, not 0.)

• If the root name of an attribute array is the same as an existing attribute name, the attribute array replaces the existing attribute. If no value is assigned to the first element in the array (subscript [1]), the original attribute value is used for that element value.

With the DELETE keyword, the following rules apply to attribute arrays:

• If you specify DELETE followed by an array root name and no value in square brackets, all attributes in the array are deleted.

• If you specify DELETE with an array name followed by an integer value in square brackets, the specified array element is deleted and the integer values for all subsequent attributes in the array (in numeric order) are changed to reflect the new order of array elements.

Example Collapse Hide details

Example

DATAFILE ATTRIBUTE
  ATTRIBUTE=RevisionDate('10/29/2004').
 DATAFILE ATTRIBUTE
   ATTRIBUTE=RevisionDate[2] ('10/21/2005').
DATAFILE ATTRIBUTE
  DELETE=RevisionDate[1].
DATAFILE ATTRIBUTE
  DELETE=RevisionDate.

• The first DATAFILE ATTRIBUTE command creates the attribute RevisionDate with a value of 10/29/2004.

• The second DATAFILE ATTRIBUTE command creates an array attribute named RevisionDate, which replaces the original attribute of the same name. Two array elements are created: RevisionDate[1] retains the original value of RevisionDate, and RevisionDate[2] has a value of 10/21/2005.

• The third DATAFILE ATTRIBUTE command deletes RevisionDate[1], and the array element formerly known as RevisionDate[2] becomes the new RevisionDate[1] (with a value of 10/21/2005).

• The last DATAFILE ATTRIBUTE command deletes all attributes in the RevisionDate array, since it specifies the array root name without an integer value in brackets.

Related Topics

DATAFILE ATTRIBUTE


DATASET ACTIVATE

DATASET ACTIVATE (command),DATASET ACTIVATE (command),DATASET ACTIVATE (command)
DATASET ACTIVATE (command),DATASET ACTIVATE (command),DATASET ACTIVATE (command)
syntax chart,syntax chart,syntax chart
release history,release history,release history
data files,data files,data files
multiple data files open at same time,multiple data files open at same time,multiple data files open at same time
DATASET ACTIVATE name
        [WINDOW={ASIS }]
                {FRONT}
Release History Collapse Hide details

Release History

Release 14.0

• Command introduced.

Example

GET FILE='/data/mydata.sav'.
DATASET NAME file1.
COMPUTE AvgIncome=income/famsize.
GET DATA /TYPE=XLS
  /FILE='/data/exceldata.xls'.
COMPUTE TotIncome=SUM(income1, income2, income3).
DATASET NAME file2.
DATASET ACTIVATE file1.

Related Topics

Overview (DATASET ACTIVATE command)
DATASET CLOSE
Overview (DATASET CLOSE command)
DATASET COPY
Overview (DATASET COPY command)
DATASET DECLARE
Overview (DATASET DECLARE command)
DATASET DISPLAY
Overview (DATASET DISPLAY command)
DATASET NAME
Overview (DATASET NAME command)


Overview (DATASET ACTIVATE command)

DATASET ACTIVATE (command),DATASET ACTIVATE (command),DATASET ACTIVATE (command)

The DATASET commands (DATASET NAME, DATASET ACTIVATE, DATASET DECLARE, DATASET COPY, DATASET CLOSE) provide the ability to have multiple data sources open at the same time and control which open data source is active at any point in the session. Using defined dataset names, you can then:

• Merge data (for example, MATCH FILES, ADD FILES, UPDATE) from multiple different source types (for example, text data, database, spreadsheet) without saving each one as an external PASW Statistics data file first.

• Create new datasets that are subsets of open data sources (for example, males in one subset, females in another, people under a certain age in another, or original data in one set and transformed/computed values in another subset).

• Copy and paste variables, cases, and/or variable properties between two or more open data sources in the Data Editor.

The DATASET ACTIVATE command makes the named dataset the active dataset in the session.

• If the previous active dataset does not have a defined dataset name, it is no longer available in the session.

• If the previous active dataset has a defined dataset name, it remains available for subsequent use in its current state.

• If the named dataset does not exist, an error occurs, and the command is not executed.

• DATASET ACTIVATE cannot be used within transformation structures such as DO IF, DO REPEAT, or LOOP.

Basic Specification

The basic specification for DATASET ACTIVATE is the command name followed by a name of a previously defined dataset. See the topic DATASET NAME for more information.

WINDOW keyword

The WINDOW keyword controls the state of the Data Editor window associated with the dataset.

ASIS | The Data Editor window containing the dataset is not affected. This is the default.
FRONT | The Data Editor window containing the dataset is brought to the front and the dataset becomes the active dataset for dialog boxes.
Operations Collapse Hide details

Operations

• Commands operate on the active dataset. The active dataset is the data source most recently opened (for example, by commands such as GET DATA, GET SAS, GET STATA, GET TRANSLATE) or most recently activated by a DATASET ACTIVATE command.

Note: The active dataset can also be changed by clicking anywhere in the Data Editor window of an open data source or selecting a dataset from the list of available datasets in a syntax window toolbar.

• Variables from one dataset are not available when another dataset is the active dataset.

• Transformations to the active dataset--before or after defining a dataset name--are preserved with the named dataset during the session, and any pending transformations to the active dataset are automatically executed whenever a different data source becomes the active dataset.

• Dataset names can be used in most commands that can contain references to PASW Statistics data files.

• Wherever a dataset name, file handle (defined by the FILE HANDLE command), or filename can be used to refer to PASW Statistics data files, defined dataset names take precedence over file handles, which take precedence over filenames. For example, if file1 exists as both a dataset name and a file handle, FILE=file1 in the MATCH FILES command will be interpreted as referring to the dataset named file1, not the file handle.

Example Collapse Hide details

Example

GET FILE='/data/mydata.sav'.
DATASET NAME file1.
COMPUTE AvgIncome=income/famsize.
GET DATA /TYPE=XLS
  /FILE='/data/exceldata.xls'.
COMPUTE TotIncome=SUM(income1, income2, income3).
DATASET NAME file2.
DATASET ACTIVATE file1.

• Reading a new data source automatically changes the active dataset; so the GET DATA command changes the active dataset to the data read from the Excel worksheet.

• Since the previous active dataset has a defined dataset name associated with it, it is preserved in its current state for subsequent use in the session. The "current state" includes the new variable AvgIncome generated by the COMPUTE command, since pending transformations are automatically executed before the Excel worksheet become the active dataset.

• When the dataset file1 is activated again, any pending transformations associated with dataset file2 are automatically executed; so the new variable TotIncome is preserved with the dataset.

Related Topics

DATASET ACTIVATE
DATASET CLOSE
Overview (DATASET CLOSE command)
DATASET COPY
Overview (DATASET COPY command)
DATASET DECLARE
Overview (DATASET DECLARE command)
DATASET DISPLAY
Overview (DATASET DISPLAY command)
DATASET NAME
Overview (DATASET NAME command)


DATASET CLOSE

DATASET CLOSE (command),DATASET CLOSE (command),DATASET CLOSE (command)
DATASET CLOSE (command),DATASET CLOSE (command),DATASET CLOSE (command)
syntax chart,syntax chart,syntax chart
release history,release history,release history
data files,data files,data files
multiple data files open at same time,multiple data files open at same time,multiple data files open at same time
DATASET CLOSE {name}
              {*   }
              {ALL }

This command takes effect immediately. It does not read the active dataset or execute pending transformations. See the topic Command Order for more information.

Release History Collapse Hide details

Release History

Release 14.0

• Command introduced.

Example

DATASET CLOSE file1.

Related Topics

DATASET ACTIVATE
Overview (DATASET ACTIVATE command)
Overview (DATASET CLOSE command)
DATASET COPY
Overview (DATASET COPY command)
DATASET DECLARE
Overview (DATASET DECLARE command)
DATASET DISPLAY
Overview (DATASET DISPLAY command)
DATASET NAME
Overview (DATASET NAME command)


Overview (DATASET CLOSE command)

DATASET CLOSE (command),DATASET CLOSE (command),DATASET CLOSE (command)

The DATASET commands (DATASET NAME, DATASET ACTIVATE, DATASET DECLARE, DATASET COPY, DATASET CLOSE) provide the ability to have multiple data sources open at the same time and control which open data source is active at any point in the session. Using defined dataset names, you can then:

• Merge data (for example, MATCH FILES, ADD FILES, UPDATE) from multiple different source types (for example, text data, database, spreadsheet) without saving each one as an external PASW Statistics data file first.

• Create new datasets that are subsets of open data sources (for example, males in one subset, females in another, people under a certain age in another, or original data in one set and transformed/computed values in another subset).

• Copy and paste variables, cases, and/or variable properties between two or more open data sources in the Data Editor.

The DATASET CLOSE command closes the named dataset.

• If the dataset name specified is not the active dataset, that dataset is closed and no longer available in the session.

• If the dataset name specified is the active dataset or if an asterisk (*) is specified and the active dataset has a name, the association with that name is broken. The active dataset remains active but has no name.

• If ALL is specified, all associations with datasets are broken. All the datasets except the active dataset and their data windows are closed and no longer available in the session. The active dataset remains active but has no name.

Basic Specification

The only specification for DATASET CLOSE is the command name followed by a dataset name, an asterisk (*), or the keyword ALL.

Related Topics

DATASET ACTIVATE
Overview (DATASET ACTIVATE command)
DATASET CLOSE
DATASET COPY
Overview (DATASET COPY command)
DATASET DECLARE
Overview (DATASET DECLARE command)
DATASET DISPLAY
Overview (DATASET DISPLAY command)
DATASET NAME
Overview (DATASET NAME command)


DATASET COPY

DATASET COPY (command),DATASET COPY (command),DATASET COPY (command)
DATASET COPY (command),DATASET COPY (command),DATASET COPY (command)
syntax chart,syntax chart,syntax chart
release history,release history,release history
data files,data files,data files
multiple data files open at same time,multiple data files open at same time,multiple data files open at same time
DATASET COPY name
        [WINDOW={MINIMIZED}]
                {HIDDEN   }
                {FRONT    }

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

Release History Collapse Hide details

Release History

Release 14.0

• Command introduced.

Example

DATASET NAME original.
DATASET COPY males.
DATASET ACTIVATE males.
SELECT IF gender=0.
DATASET ACTIVATE original.
DATASET COPY females.
DATASET ACTIVATE females.
SELECT IF gender=1.

Related Topics

DATASET ACTIVATE
Overview (DATASET ACTIVATE command)
DATASET CLOSE
Overview (DATASET CLOSE command)
Overview (DATASET COPY command)
DATASET DECLARE
Overview (DATASET DECLARE command)
DATASET DISPLAY
Overview (DATASET DISPLAY command)
DATASET NAME
Overview (DATASET NAME command)


Overview (DATASET COPY command)

DATASET COPY (command),DATASET COPY (command),DATASET COPY (command)

The DATASET commands (DATASET NAME, DATASET ACTIVATE, DATASET DECLARE, DATASET COPY, DATASET CLOSE) provide the ability to have multiple data sources open at the same time and control which open data source is active at any point in the session. Using defined dataset names, you can then:

• Merge data (for example, MATCH FILES, ADD FILES, UPDATE) from multiple different source types (for example, text data, database, spreadsheet) without saving each one as an external PASW Statistics data file first.

• Create new datasets that are subsets of open data sources (for example, males in one subset, females in another, people under a certain age in another, or original data in one set and transformed/computed values in another subset).

• Copy and paste variables, cases, and/or variable properties between two or more open data sources in the Data Editor.

The DATASET COPY command creates a new dataset that captures the current state of the active dataset. This is particularly useful for creating multiple subsets of data from the same original data source.

• If the active dataset has a defined dataset name, its name remains associated with subsequent changes.

• If this command occurs when there are transformations pending, those transformations are executed, as if EXECUTE had been run prior to making the copy; so the transformations appear in both the original and the copy. The command is illegal where EXECUTE would be illegal. If no transformations are pending, the data are not passed.

• If the specified dataset name is already associated with a dataset, a warning is issued, the old dataset is destroyed, and the specified name becomes associated with the current state of the active dataset.

• If the specified name is associated with the active dataset, it becomes associated with the current state and the active dataset becomes unnamed.

Basic Specification

The basic specification for DATASET COPY is the command name followed by a new dataset name that conforms to variable naming rules. See the topic Variable Names for more information.

WINDOW Keyword

The WINDOW keyword controls the state of the Data Editor window associated with the dataset.

MINIMIZED | The Data Editor window associated with the new dataset is opened in a minimized state. This is the default.
HIDDEN | The Data Editor window associated with the new dataset is not displayed.
FRONT | The Data Editor window containing the dataset is brought to the front and the dataset becomes the active dataset for dialog boxes.
Operations Collapse Hide details

Operations

• Commands operate on the active dataset. The active dataset is the data source most recently opened (for example, by commands such as GET DATA, GET SAS, GET STATA, GET TRANSLATE) or most recently activated by a DATASET ACTIVATE command.

Note: The active dataset can also be changed by clicking anywhere in the Data Editor window of an open data source or selecting a dataset from the list of available datasets in a syntax window toolbar.

• Variables from one dataset are not available when another dataset is the active dataset.

• Transformations to the active dataset--before or after defining a dataset name--are preserved with the named dataset during the session, and any pending transformations to the active dataset are automatically executed whenever a different data source becomes the active dataset.

• Dataset names can be used in most commands that can contain references to PASW Statistics data files.

• Wherever a dataset name, file handle (defined by the FILE HANDLE command), or filename can be used to refer to PASW Statistics data files, defined dataset names take precedence over file handles, which take precedence over filenames. For example, if file1 exists as both a dataset name and a file handle, FILE=file1 in the MATCH FILES command will be interpreted as referring to the dataset named file1, not the file handle.

Limitations Collapse Hide details

Limitations

Because each window requires a minimum amount of memory, there is a limit to the number of windows, PASW Statistics or otherwise, that can be concurrently open on a given system. The particular number depends on the specifications of your system and may be independent of total memory due to OS constraints.

Example Collapse Hide details

Example

DATASET NAME original.
DATASET COPY males.
DATASET ACTIVATE males.
SELECT IF gender=0.
DATASET ACTIVATE original.
DATASET COPY females.
DATASET ACTIVATE females.
SELECT IF gender=1.

• The first DATASET COPY command creates a new dataset, males, that represents the state of the active dataset at the time it was copied.

• The males dataset is activated and a subset of males is created.

• The original dataset is activated, restoring the cases deleted from the males subset.

• The second DATASET COPY command creates a second copy of the original dataset with the name females, which is then activated and a subset of females is created.

• Three different versions of the initial data file are now available in the session: the original version, a version containing only data for males, and a version containing only data for females.

Related Topics

DATASET ACTIVATE
Overview (DATASET ACTIVATE command)
DATASET CLOSE
Overview (DATASET CLOSE command)
DATASET COPY
DATASET DECLARE
Overview (DATASET DECLARE command)
DATASET DISPLAY
Overview (DATASET DISPLAY command)
DATASET NAME
Overview (DATASET NAME command)


DATASET DECLARE

DATASET DECLARE (command),DATASET DECLARE (command),DATASET DECLARE (command)
DATASET DECLARE (command),DATASET DECLARE (command),DATASET DECLARE (command)
syntax chart,syntax chart,syntax chart
release history,release history,release history
data files,data files,data files
multiple data files open at same time,multiple data files open at same time,multiple data files open at same time
DATASET DECLARE name
        [WINDOW={MINIMIZED}]
                {HIDDEN   }
                {FRONT    }

This command takes effect immediately. It does not read the active dataset or execute pending transformations. See the topic Command Order for more information.

Release History Collapse Hide details

Release History

Release 14.0

• Command introduced.

Example

DATASET DECLARE corrmatrix.
REGRESSION
  /DEPENDENT=var1
  /METHOD=ENTER= var2 to var10
  /OUTFILE=CORB(corrmatrix).
DATASET ACTIVATE corrmatrix.

Related Topics

DATASET ACTIVATE
Overview (DATASET ACTIVATE command)
DATASET CLOSE
Overview (DATASET CLOSE command)
DATASET COPY
Overview (DATASET COPY command)
Overview (DATASET DECLARE command)
DATASET DISPLAY
Overview (DATASET DISPLAY command)
DATASET NAME
Overview (DATASET NAME command)


Overview (DATASET DECLARE command)

DATASET DECLARE (command),DATASET DECLARE (command),DATASET DECLARE (command)

The DATASET commands (DATASET NAME, DATASET ACTIVATE, DATASET DECLARE, DATASET COPY, DATASET CLOSE) provide the ability to have multiple data sources open at the same time and control which open data source is active at any point in the session. Using defined dataset names, you can then:

• Merge data (for example, MATCH FILES, ADD FILES, UPDATE) from multiple different source types (for example, text data, database, spreadsheet) without saving each one as an external PASW Statistics data file first.

• Create new datasets that are subsets of open data sources (for example, males in one subset, females in another, people under a certain age in another, or original data in one set and transformed/computed values in another subset).

• Copy and paste variables, cases, and/or variable properties between two or more open data sources in the Data Editor.

The DATASET DECLARE command creates a new dataset name that is not associated with any open dataset. It can become associated with a dataset if it is used in a command that writes PASW Statistics data files. This is particularly useful if you need to create temporary PASW Statistics data files as an intermediate step in a program.

Basic Specification

The basic specification for DATASET DECLARE is the command name followed by a new dataset name that conforms to variable naming rules. See the topic Variable Names for more information.

WINDOW Keyword

The WINDOW keyword controls the state of the Data Editor window associated with the dataset.

MINIMIZED | The Data Editor window associated with the new dataset is opened in a minimized state. This is the default.
HIDDEN | The Data Editor window associated with the new dataset is not displayed.
FRONT | The Data Editor window containing the dataset is brought to the front and the dataset becomes the active dataset for dialog boxes.
Example Collapse Hide details

Example

DATASET DECLARE corrmatrix.
REGRESSION
  /DEPENDENT=var1
  /METHOD=ENTER= var2 to var10
  /OUTFILE=CORB(corrmatrix).

• The DATASET DECLARE command creates a new dataset name, corrmatrix, that is initially not assigned to any data source.

• The REGRESSION command writes a correlation matrix to a data file.

• Instead of specifying an external data file, the OUTFILE subcommand specifies the dataset name corrmatrix, which is now available for subsequent use in the session. If not explicitly saved (for example, with the SAVE command), this dataset will be automatically deleted at the end of the session.

Related Topics

DATASET ACTIVATE
Overview (DATASET ACTIVATE command)
DATASET CLOSE
Overview (DATASET CLOSE command)
DATASET COPY
Overview (DATASET COPY command)
DATASET DECLARE
DATASET DISPLAY
Overview (DATASET DISPLAY command)
DATASET NAME
Overview (DATASET NAME command)


DATASET DISPLAY

DATASET DISPLAY (command),DATASET DISPLAY (command),DATASET DISPLAY (command)
DATASET DISPLAY (command),DATASET DISPLAY (command),DATASET DISPLAY (command)
syntax chart,syntax chart,syntax chart
release history,release history,release history
data files,data files,data files
multiple data files open at same time,multiple data files open at same time,multiple data files open at same time
DATASET DISPLAY

This command takes effect immediately. It does not read the active dataset or execute pending transformations. See the topic Command Order for more information.

Release History Collapse Hide details

Release History

Release 14.0

• Command introduced.

Example

DATASET DISPLAY.

Related Topics

DATASET ACTIVATE
Overview (DATASET ACTIVATE command)
DATASET CLOSE
Overview (DATASET CLOSE command)
DATASET COPY
Overview (DATASET COPY command)
DATASET DECLARE
Overview (DATASET DECLARE command)
Overview (DATASET DISPLAY command)
DATASET NAME
Overview (DATASET NAME command)


Overview (DATASET DISPLAY command)

DATASET DISPLAY (command),DATASET DISPLAY (command),DATASET DISPLAY (command)

The DATASET commands (DATASET NAME, DATASET ACTIVATE, DATASET DECLARE, DATASET COPY, DATASET CLOSE) provide the ability to have multiple data sources open at the same time and control which open data source is active at any point in the session. Using defined dataset names, you can then:

• Merge data (for example, MATCH FILES, ADD FILES, UPDATE) from multiple different source types (for example, text data, database, spreadsheet) without saving each one as an external PASW Statistics data file first.

• Create new datasets that are subsets of open data sources (for example, males in one subset, females in another, people under a certain age in another, or original data in one set and transformed/computed values in another subset).

• Copy and paste variables, cases, and/or variable properties between two or more open data sources in the Data Editor.

The DATASET DISPLAY command displays a list of currently available datasets. The only specification is the command name DATASET DISPLAY.

Related Topics

DATASET ACTIVATE
Overview (DATASET ACTIVATE command)
DATASET CLOSE
Overview (DATASET CLOSE command)
DATASET COPY
Overview (DATASET COPY command)
DATASET DECLARE
Overview (DATASET DECLARE command)
DATASET DISPLAY
DATASET NAME
Overview (DATASET NAME command)


DATASET NAME

DATASET NAME (command),DATASET NAME (command),DATASET NAME (command)
DATASET NAME (command),DATASET NAME (command),DATASET NAME (command)
syntax chart,syntax chart,syntax chart
release history,release history,release history
data files,data files,data files
multiple data files open at same time,multiple data files open at same time,multiple data files open at same time
DATASET NAME name
        [WINDOW={ASIS }]
                {FRONT}

This command takes effect immediately. It does not read the active dataset or execute pending transformations. See the topic Command Order for more information.

Release History Collapse Hide details

Release History

Release 14.0

• Command introduced.

Example

GET FILE='/data/mydata.sav'.
DATASET NAME file1.
SORT CASES BY ID.
GET FILE '/data/moredata.sav'
SORT CASES BY ID.
DATASET NAME file2.
GET DATA  /TYPE=XLS
  /FILE='/data/exceldata.xls'.
SORT CASES BY ID.
MATCH FILES FILE=*
  /FILE=file1
  /FILE=file2
  /BY ID.
SAVE OUTFILE='/data/mergedata.sav'.

Related Topics

DATASET ACTIVATE
Overview (DATASET ACTIVATE command)
DATASET CLOSE
Overview (DATASET CLOSE command)
DATASET COPY
Overview (DATASET COPY command)
DATASET DECLARE
Overview (DATASET DECLARE command)
DATASET DISPLAY
Overview (DATASET DISPLAY command)
Overview (DATASET NAME command)


Overview (DATASET NAME command)

DATASET NAME (command),DATASET NAME (command),DATASET NAME (command)

The DATASET commands (DATASET NAME, DATASET ACTIVATE, DATASET DECLARE, DATASET COPY, DATASET CLOSE) provide the ability to have multiple data sources open at the same time and control which open data source is active at any point in the session. Using defined dataset names, you can then:

• Merge data (for example, MATCH FILES, ADD FILES, UPDATE) from multiple different source types (for example, text data, database, spreadsheet) without saving each one as an external PASW Statistics data file first.

• Create new datasets that are subsets of open data sources (for example, males in one subset, females in another, people under a certain age in another, or original data in one set and transformed/computed values in another subset).

• Copy and paste variables, cases, and/or variable properties between two or more open data sources in the Data Editor.

The DATASET NAME command:

• Assigns a unique name to the active dataset, which can be used in subsequent file access commands and subsequent DATASET commands.

• Makes the current data file available even after other data sources have been opened/activated.

The following general rules apply:

• If the active dataset already has a defined dataset name, the existing association is broken, and the new name is associated with the active file.

• If the name is already associated with another dataset, that association is broken, and the new association is created. The dataset previously associated with that name is closed and is no longer available.

Basic Specification

The basic specification for DATASET NAME is the command name followed by a name that conforms to variable naming rules. See the topic Variable Names for more information.

WINDOW Keyword

The WINDOW keyword controls the state of the Data Editor window associated with the dataset.

ASIS | The Data Editor window containing the dataset is not affected. This is the default.
FRONT | The Data Editor window containing the dataset is brought to the front and the dataset becomes the active dataset for dialog boxes.
Operations Collapse Hide details

Operations

• Commands operate on the active dataset. The active dataset is the data source most recently opened (for example, by commands such as GET DATA, GET SAS, GET STATA, GET TRANSLATE) or most recently activated by a DATASET ACTIVATE command.

Note: The active dataset can also be changed by clicking anywhere in the Data Editor window of an open data source or selecting a dataset from the list of available datasets in a syntax window toolbar.

• Variables from one dataset are not available when another dataset is the active dataset.

• Transformations to the active dataset--before or after defining a dataset name--are preserved with the named dataset during the session, and any pending transformations to the active dataset are automatically executed whenever a different data source becomes the active dataset.

• Dataset names can be used in most commands that can contain references to PASW Statistics data files.

• Wherever a dataset name, file handle (defined by the FILE HANDLE command), or filename can be used to refer to PASW Statistics data files, defined dataset names take precedence over file handles, which take precedence over filenames. For example, if file1 exists as both a dataset name and a file handle, FILE=file1 in the MATCH FILES command will be interpreted as referring to the dataset named file1, not the file handle.

Example Collapse Hide details

Example

GET FILE='/examples/data/mydata.sav'.
SORT CASES BY ID.
DATASET NAME mydata.
GET DATA /TYPE=XLS
  /FILE='/examples/data/excelfile.xls'.
SORT CASES BY ID.
DATASET NAME excelfile.
GET DATA /TYPE=ODBC /CONNECT=
 'DSN=MS Access Database;DBQ=/examples/data/dm_demo.mdb;'+
 'DriverId=25;FIL=MS Access;MaxBufferSize=2048;PageTimeout=5;'
 /SQL='SELECT * FROM main'.
SORT CASES BY ID.
MATCH FILES
 /FILE='mydata'
 /FILE='excelfile'
 /FILE=*
 /BY ID.

• A data file in PASW Statistics format and assigned the dataset name mydata. Since it has been assigned a dataset name, it remains available for subsequent use even after other data sources have been opened.

• An Excel file is then read and assigned the dataset name exceldata. Like the PASW Statistics data file, since it has been assigned a dataset name, it remains available after other data sources have been opened.

• Then a table from a database is read. Since it is the most recently opened or activated dataset, it is the active dataset.

• The three datasets are then merged together with MATCH FILES command, using the dataset names on the FILE subcommands instead of file names.

• An asterisk (*) is used to specify the active dataset, which is the database table in this example.

• The files are merged together based on the value of the key variable ID, specified on the BY subcommand.

• Since all the files being merged need to be sorted in the same order of the key variable(s), SORT CASES is performed on each dataset.

Related Topics

DATASET ACTIVATE
Overview (DATASET ACTIVATE command)
DATASET CLOSE
Overview (DATASET CLOSE command)
DATASET COPY
Overview (DATASET COPY command)
DATASET DECLARE
Overview (DATASET DECLARE command)
DATASET DISPLAY
Overview (DATASET DISPLAY command)
DATASET NAME


DATE

DATE (command),DATE (command),DATE (command)
date variables,date variables,date variables
creating,creating,creating
data transformations,data transformations,data transformations
time series,time series,time series
time series analysis,time series analysis,time series analysis
date variables,date variables,date variables
time series analysis,time series analysis,time series analysis
data transformations,data transformations,data transformations
DATE (command),DATE (command),DATE (command)
syntax chart,syntax chart,syntax chart
YEAR (keyword),YEAR (keyword),YEAR (keyword)
DATE command,DATE command,DATE command
MONTH (keyword),MONTH (keyword),MONTH (keyword)
DATE command,DATE command,DATE command
WEEK (keyword),WEEK (keyword),WEEK (keyword)
DATE command,DATE command,DATE command
DAY (keyword),DAY (keyword),DAY (keyword)
DATE command,DATE command,DATE command
HOUR (keyword),HOUR (keyword),HOUR (keyword)
DATE command,DATE command,DATE command
MINUTE (keyword),MINUTE (keyword),MINUTE (keyword)
DATE command,DATE command,DATE command
SECOND (keyword),SECOND (keyword),SECOND (keyword)
DATE command,DATE command,DATE command
CYCLE (keyword),CYCLE (keyword),CYCLE (keyword)
DATE command,DATE command,DATE command
OBS (keyword),OBS (keyword),OBS (keyword)
DATE command,DATE command,DATE command
DATE  keyword [starting value [periodicity]]

      [keyword [starting value [periodicity]]]

      [BY increment]

Keywords for long time periods:

Keyword | Abbreviation | Default starting value | Default periodicity
YEAR | Y | 1 | none
QUARTER | Q | 1 | 4
MONTH | M | 1 | 12

Keywords for short time periods:

Keyword | Abbreviation | Default starting value | Default periodicity
WEEK | W | 1 | none
DAY | D | 1 | 7
HOUR | H | 0 | 24
MINUTE | MI | 0 | 60
SECOND | S | 0 | 60

Keywords for any time periods:

Keyword | Abbreviation | Default starting value | Default periodicity
CYCLE | C | 1 | none
OBS | O | none | none

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

The DATE command can be executed from the Define Dates dialog.

Example

DATE Y 1960 M.

Related Topics

Overview (DATE command)
Syntax Rules (DATE command)
Starting Value and Periodicity (DATE command)
BY Keyword (DATE command)
Example 1 (DATE command)
Example 2 (DATE command)
Example 3 (DATE command)
Example 4 (DATE command)
Example 5 (DATE command)
Example 6 (DATE command)
Example 7 (DATE command)


Overview (DATE command)

DATE generates date identification variables. You can use these variables to label plots and other output, establish periodicity, and distinguish between historical, validation, and forecasting periods.

Options Collapse Hide details

Options

You can specify the starting value and periodicity. You can also specify an increment for the lowest-order keyword specified.

Basic Specification Collapse Hide details

Basic Specification

The basic specification on DATE is a single keyword.

• For each keyword specified, DATE creates a numeric variable whose name is the keyword with an underscore as a suffix. Values for this variable are assigned to observations sequentially, beginning with the specified starting value. DATE also creates a string variable named DATE_, which combines the information from the numeric date variables and is used for labeling.

• If no starting value is specified, either the default is used or the value is inferred from the starting value of another DATE keyword.

• All variables created by DATE are automatically assigned variable labels that describe periodicity and associated formats. DATE produces a list of the names of the variables it creates and their variable labels.

Subcommand Order Collapse Hide details

Subcommand Order

• Keywords can be specified in any order.

Operations Collapse Hide details

Operations

• DATE creates a numeric variable for every keyword specified, plus a string variable DATE_, which combines information from all the specified keywords.

• DATE automatically creates variable labels for each keyword specified indicating the variable name and its periodicity. For the DATE_ variable, the label indicates the variable name and format.

• If the highest-order DATE variable specified has a periodicity, the CYCLE_ variable will automatically be created. CYCLE_ cannot have a periodicity. See the topic Example 3 (DATE command) for more information.

• Default periodicities are not used for the highest-order keyword specified. The exception is QUARTER, which will always have a default periodicity.

• The periodicity of the lowest-order variable is the default periodicity used by the procedures when periodicity is not defined either within the procedure or by the TSET command.

• The keyword name with an underscore is always used as the new variable name, even if keyword abbreviations are used in the specifications.

• Each time the DATE command is used, any DATE variables already in the active dataset are deleted.

• The DATE command invalidates any previous USE and PREDICT commands specified. The USE and PREDICT periods must be respecified after DATE.

Limitations Collapse Hide details

Limitations

• There is no limit on the number of keywords on the DATE command. However, keywords that describe long time periods (YEAR, QUARTER, MONTH) cannot be used on the same command with keywords that describe short time periods (WEEK, DAY, HOUR, MINUTE, SECOND).

• User-defined variable names must not conflict with DATE variable names.

Related Topics

DATE
Syntax Rules (DATE command)
Starting Value and Periodicity (DATE command)
BY Keyword (DATE command)
Example 1 (DATE command)
Example 2 (DATE command)
Example 3 (DATE command)
Example 4 (DATE command)
Example 5 (DATE command)
Example 6 (DATE command)
Example 7 (DATE command)


Syntax Rules (DATE command)

• You can specify more than one keyword per command.

• If a keyword is specified more than once, only the last one is executed.

• Keywords that describe long time periods (YEAR, QUARTER, MONTH) cannot be used on the same command with keywords that describe short time periods (WEEK, DAY, HOUR, MINUTE, SECOND).

• Keywords CYCLE and OBS can be used with any other keyword.

• The lowest-order keyword specified should correspond to the level at which observations occur. For example, if observations are daily, the lowest-order keyword should be DAY.

• Keywords (except MINUTE) can be abbreviated down to the first character. MINUTE must have at least two characters (MI) to distinguish it from keyword MONTH.

• Keywords and additional specifications are separated by commas or spaces.

Related Topics

DATE
Overview (DATE command)
Starting Value and Periodicity (DATE command)
BY Keyword (DATE command)
Example 1 (DATE command)
Example 2 (DATE command)
Example 3 (DATE command)
Example 4 (DATE command)
Example 5 (DATE command)
Example 6 (DATE command)
Example 7 (DATE command)


Starting Value and Periodicity (DATE command)

DATE (command),DATE (command),DATE (command)
starting value,starting value,starting value

• A starting value and periodicity can be entered for any keyword except CYCLE. CYCLE can have only a starting value.

• Starting value and periodicity must be specified for keyword OBS.

• The starting value is specified first, followed by the periodicity, if any.

• You cannot specify a periodicity without first specifying a starting value.

• Starting values for HOUR, MINUTE, and SECOND can range from 0 to the periodicity minus 1 (for example, 0 to 59). For all other keywords, the range is 1 to the periodicity.

• If both MONTH and QUARTER are specified, DATE can infer the starting value of one from the other. See the topic Example 5 (DATE command) for more information.

• Specifying conflicting starting values for MONTH and QUARTER, such as Q 1 M 4, results in an error.

• For keyword YEAR, the starting value can be specified as the last two digits (93) instead of the whole year (1993) when the series and any forecasting are all within the same century. The same format (2 digits or 4 digits) must be used in all other commands that use year values.

• If you specify keywords that describe short time periods and skip over a level of measurement (for example, if you specify HOUR and SECOND but not MINUTE), you must specify the starting value and periodicity of the keyword after the skipped keywords. Otherwise, inappropriate periodicities will be generated. See the topic Example 7 (DATE command) for more information.

Related Topics

DATE
Overview (DATE command)
Syntax Rules (DATE command)
BY Keyword (DATE command)
Example 1 (DATE command)
Example 2 (DATE command)
Example 3 (DATE command)
Example 4 (DATE command)
Example 5 (DATE command)
Example 6 (DATE command)
Example 7 (DATE command)


BY Keyword (DATE command)

BY (keyword),BY (keyword),BY (keyword)
DATE command,DATE command,DATE command
DATE (command),DATE (command),DATE (command)
BY keyword,BY keyword,BY keyword

• Keyword BY and a positive integer can be specified after the lowest-order keyword on the command to indicate an increment value. This value indicates how much to increment values of the lowest-order date variable as they are assigned to observations. See the topic Example 4 (DATE command) for more information.

• The increment value must divide evenly into the periodicity of the lowest-order DATE variable specified.

Related Topics

DATE
Overview (DATE command)
Syntax Rules (DATE command)
Starting Value and Periodicity (DATE command)
Example 1 (DATE command)
Example 2 (DATE command)
Example 3 (DATE command)
Example 4 (DATE command)
Example 5 (DATE command)
Example 6 (DATE command)
Example 7 (DATE command)


Example 1 (DATE command)

DATE (command),DATE (command),DATE (command)
examples,examples,examples
DATE Y 1960 M.

• This command generates variables DATE_, YEAR_, and MONTH_.

• YEAR_ has a starting value of 1960. MONTH_ starts at the default value of 1.

• By default, YEAR_ has no periodicity, and MONTH_ has a periodicity of 12.

DATE reports the following:

  Name        Label

  YEAR_       YEAR, not periodic
  MONTH_      MONTH, period 12
  DATE_       DATE.  FORMAT:  "MMM YYYY"

The following is a partial listing of the new variables:

   YEAR_ MONTH_ DATE_

    1960    1   JAN 1960
    1960    2   FEB 1960
    1960    3   MAR 1960
    1960    4   APR 1960
     ...
    1960   10   OCT 1960
    1960   11   NOV 1960
    1960   12   DEC 1960
    1961    1   JAN 1961
    1961    2   FEB 1961
     ...
    1999    4   APR 1999
    1999    5   MAY 1999
    1999    6   JUN 1999

Related Topics

DATE
Overview (DATE command)
Syntax Rules (DATE command)
Starting Value and Periodicity (DATE command)
BY Keyword (DATE command)
Example 2 (DATE command)
Example 3 (DATE command)
Example 4 (DATE command)
Example 5 (DATE command)
Example 6 (DATE command)
Example 7 (DATE command)


Example 2 (DATE command)

DATE WEEK DAY 1 5 HOUR 1 8.

• This command creates four variables (DATE_, WEEK_, DAY_, and HOUR_) in a file where observations occur hourly in a 5-day, 40-hour week.

• For WEEK, the default starting value is 1 and the default periodicity is none.

• For DAY_, the starting value has to be specified, even though it is the same as the default, because a periodicity is specified. The periodicity of 5 means that observations are measured in a 5-day week.

• For HOUR_, a starting value of 1 is specified. The periodicity of 8 means that observations occur in an 8-hour day.

DATE reports the following:

  Name        Label

  WEEK_       WEEK, not periodic
  DAY_        DAY, period 5
  HOUR_       HOUR, period 24
  DATE_       DATE.  FORMAT:  "WWW D HH"

The following is a partial listing of the new variables:

   WEEK_ DAY_ HOUR_ DATE_

       1   1     1    1 1  1
       1   1     2    1 1  2
       1   1     3    1 1  3
       1   1     4    1 1  4
       1   1     5    1 1  5
       ...
       1   1    22    1 1 22
       1   1    23    1 1 23
       1   2     0    1 2  0
       1   2     1    1 2  1
       1   2     2    1 2  2
       ...
       4   5    16    4 5 16
       4   5    17    4 5 17
       4   5    18    4 5 18

Related Topics

DATE
Overview (DATE command)
Syntax Rules (DATE command)
Starting Value and Periodicity (DATE command)
BY Keyword (DATE command)
Example 1 (DATE command)
Example 3 (DATE command)
Example 4 (DATE command)
Example 5 (DATE command)
Example 6 (DATE command)
Example 7 (DATE command)


Example 3 (DATE command)

DATE DAY 1 5 HOUR 3 8.

• This command creates four variables (DATE_, CYCLE_, DAY_, and HOUR_) in a file where observations occur hourly.

• For HOUR_, the starting value is 3 and the periodicity is 8.

• For DAY_, the starting value is 1 and the periodicity is 5. Since DAY_ is the highest-order variable and it has a periodicity assigned, variable CYCLE_ is automatically created.

DATE reports the following:

  Name        Label

  CYCLE_      CYCLE, not periodic
  DAY_        DAY, period 5
  HOUR_       HOUR, period 8
  DATE_       DATE.  FORMAT:  "CCCC D H"

The following is a partial listing of the new variables:

  CYCLE_ DAY_ HOUR_ DATE_

       1   1    3      1 1 3
       1   1    4      1 1 4
       1   1    5      1 1 5
       1   1    6      1 1 6
       1   1    7      1 1 7
       1   2    0      1 2 0
       1   2    1      1 2 1
      ...
      12   4    6     12 4 6
      12   4    7     12 4 7
      12   5    0     12 5 0
      12   5    1     12 5 1
      12   5    2     12 5 2
      12   5    3     12 5 3
      12   5    4     12 5 4

Related Topics

DATE
Overview (DATE command)
Syntax Rules (DATE command)
Starting Value and Periodicity (DATE command)
BY Keyword (DATE command)
Example 1 (DATE command)
Example 2 (DATE command)
Example 4 (DATE command)
Example 5 (DATE command)
Example 6 (DATE command)
Example 7 (DATE command)


Example 4 (DATE command)

DATE DAY HOUR 1 24 BY 2.

• This command creates three variables (DATE_, DAY_, and HOUR_) in a file where observations occur every two hours in a 24-hour day.

• DAY_ uses the default starting value of 1. It has no periodicity, since none is specified, and it is the highest-order keyword on the command.

• HOUR_ starts with a value of 1 and has a periodicity of 24.

• Keyword BY specifies an increment of 2 to use in assigning hour values.

DATE reports the following:

  Name        Label

  DAY_        DAY, not periodic
  HOUR_       HOUR, period 24 by 2
  DATE_       DATE.  FORMAT:  "DDDD HH"

The following is a partial listing of the new variables:

    DAY_ HOUR_ DATE_

       1    1     1  1
       1    3     1  3
       1    5     1  5
     ...
      39   17    39 17
      39   19    39 19
      39   21    39 21
      39   23    39 23
      40    1    40  1
      40    3    40  3
      40    5    40  5
      40    7    40  7
      40    9    40  9
      40   11    40 11

Related Topics

DATE
Overview (DATE command)
Syntax Rules (DATE command)
Starting Value and Periodicity (DATE command)
BY Keyword (DATE command)
Example 1 (DATE command)
Example 2 (DATE command)
Example 3 (DATE command)
Example 5 (DATE command)
Example 6 (DATE command)
Example 7 (DATE command)


Example 5 (DATE command)

DATE Y 1950 Q 2 M.

• This example creates four variables (DATE_, YEAR_, QUARTER_, and MONTH_) in a file where observations are quarterly, starting with April 1950.

• The starting value for MONTH_ is inferred from QUARTER_.

• This specification is equivalent to DATE Y 1950 Q M 4. Here, the starting value for QUARTER_ (2) would be inferred from MONTH.

DATE reports the following:

  Name        Label

  YEAR_       YEAR, not periodic
  QUARTER_    QUARTER, period 4
  MONTH_      MONTH, period 12
  DATE_       DATE.  FORMAT:  "MMM YYYY"

The following is a partial listing of the new variables:

   YEAR_ QUARTER_ MONTH_ DATE_

    1950     2       4   APR 1950
    1950     2       5   MAY 1950
    1950     2       6   JUN 1950
    1950     3       7   JUL 1950
    1950     3       8   AUG 1950
     ...
    1988     4      11   NOV 1988
    1988     4      12   DEC 1988
    1989     1       1   JAN 1989
    1989     1       2   FEB 1989
    1989     1       3   MAR 1989
    1989     2       4   APR 1989
    1989     2       5   MAY 1989
    1989     2       6   JUN 1989
    1989     3       7   JUL 1989
    1989     3       8   AUG 1989
    1989     3       9   SEP 1989

Related Topics

DATE
Overview (DATE command)
Syntax Rules (DATE command)
Starting Value and Periodicity (DATE command)
BY Keyword (DATE command)
Example 1 (DATE command)
Example 2 (DATE command)
Example 3 (DATE command)
Example 4 (DATE command)
Example 6 (DATE command)
Example 7 (DATE command)


Example 6 (DATE command)

DATE OBS 9 17.

• This command creates variables DATE_, CYCLE_, and OBS_ and assigns values to observations sequentially, starting with value 9. The periodicity is 17.

DATE reports the following:

  Name        Label

  CYCLE_      CYCLE, not periodic
  OBS_        OBS, period 17
  DATE_       DATE.  FORMAT:  "CCCC OO"

The following is a partial listing of the new variables:

 CYCLE_ OBS_ DATE_

       1   9     1  9
       1  10     1 10
       1  11     1 11
       1  12     1 12
       1  13     1 13
       1  14     1 14
       1  15     1 15
       1  16     1 16
       1  17     1 17
       2   1     2  1
       2   2     2  2
      ...
      28  15    28 15
      28  16    28 16
      28  17    28 17
      29   1    29  1
      29   2    29  2
      29   3    29  3
      29   4    29  4
      29   5    29  5
      29   6    29  6

Related Topics

DATE
Overview (DATE command)
Syntax Rules (DATE command)
Starting Value and Periodicity (DATE command)
BY Keyword (DATE command)
Example 1 (DATE command)
Example 2 (DATE command)
Example 3 (DATE command)
Example 4 (DATE command)
Example 5 (DATE command)
Example 7 (DATE command)


Example 7 (DATE command)

DATE W H 1 168

• This example creates three variables (DATE_, WEEK_, and HOUR_) in a file where observations occur hourly.

• Since the DAY keyword is not specified, a periodicity must be specified for HOUR. The value 168 indicates that there are 168 hours in a week.

• The starting value of HOUR is specified as 1.

DATE reports the following:

  Name        Label

  WEEK_       WEEK, not periodic
  HOUR_       HOUR, period 168
  DATE_       DATE.  FORMAT:  "WWWW HHH"

The following is a partial listing of the new variables:

    WEEK_ HOUR_ DATE_

       1    1     1   1
       1    2     1   2
       1    3     1   3
       1    4     1   4
       1    5     1   5
       1    6     1   6
     ...
       1  161     1 161
       1  162     1 162
       1  163     1 163
       1  164     1 164
       1  165     1 165
       1  166     1 166
       1  167     1 167
       2    0     2   0
       2    1     2   1
       2    2     2   2
       2    3     2   3
       2    4     2   4
       2    5     2   5
      ...
       3  131     3 131
       3  132     3 132
       3  133     3 133
       3  134     3 134
       3  135     3 135
       3  136     3 136
       3  137     3 137
       3  138     3 138

Related Topics

DATE
Overview (DATE command)
Syntax Rules (DATE command)
Starting Value and Periodicity (DATE command)
BY Keyword (DATE command)
Example 1 (DATE command)
Example 2 (DATE command)
Example 3 (DATE command)
Example 4 (DATE command)
Example 5 (DATE command)
Example 6 (DATE command)


DEFINE-!ENDDEFINE

DEFINE (command),DEFINE (command),DEFINE (command)
DEFINE (command),DEFINE (command),DEFINE (command)
syntax chart,syntax chart,syntax chart
release history,release history,release history
macros,macros,macros
DEFINE macro name

 ([{argument name=} [!DEFAULT (string)] [!NOEXPAND] {!TOKENS  (n)             }]
   {!POSITIONAL=  }                                 {!CHAREND ('char')        }
                                                    {!ENCLOSE ('char', 'char')}
                                                    {!CMDEND                  }

 [/{argument name=} ...])
   {!POSITIONAL=  }

macro body

!ENDDEFINE

SET command controls:

PRESERVE
RESTORE

Assignment:

!LET var=expression

Conditional processing:

!IF (expression) !THEN statements
    [!ELSE statements]
!IFEND

Looping constructs:

!DO !varname=start !TO finish [!BY step]
   statements  [!BREAK]
!DOEND

!DO !varname !IN (list)
   statements  [!BREAK]
!DOEND

Macro directives:

!OFFEXPAND
!ONEXPAND

String manipulation functions:

!LENGTH (string)
!CONCAT (string1,string2)
!SUBSTR (string,from,[length])
!INDEX (string1,string2)
!HEAD (string)
!TAIL (string)
!QUOTE (string)
!UNQUOTE (string)
!UPCASE (string)
!BLANKS (n)
!NULL
!EVAL (string)
Release History Collapse Hide details

Release History

Release 14.0

• For syntax processed in interactive mode, modifications to the macro facility may affect macro calls occurring at the end of a command. See the topic Overview (DEFINE-!ENDDEFINE command) for more information.

Example

DEFINE sesvars ()
  age sex educ religion
!ENDDEFINE.

Related Topics

Overview (DEFINE-!ENDDEFINE command)
Examples (DEFINE-!ENDDEFINE command)
Macro Arguments (DEFINE-!ENDDEFINE command)
Macro Directives (DEFINE-!ENDDEFINE command)
Macro Expansion in Comments (DEFINE-!ENDDEFINE command)
String Manipulation Functions (DEFINE-!ENDDEFINE command)
SET Subcommands for Use with Macro (DEFINE-!ENDDEFINE command)
Restoring SET Specifications (DEFINE-!ENDDEFINE command)
Conditional Processing (DEFINE-!ENDDEFINE command)
Unquoted String Constants in Conditional !IF Statements (DEFINE-!ENDDEFINE command)
Looping Constructs (DEFINE-!ENDDEFINE command)
Index Loop (DEFINE-!ENDDEFINE command)
List-Processing Loop (DEFINE-!ENDDEFINE command)
Direct Assignment of Macro Variables (DEFINE-!ENDDEFINE command)


Overview (DEFINE-!ENDDEFINE command)

macro facility,macro facility,macro facility
macro definition,macro definition,macro definition
macro facility,macro facility,macro facility
macro call,macro call,macro call
DEFINE (command),DEFINE (command),DEFINE (command)
limitations,limitations,limitations

DEFINE—!ENDDEFINE defines a program macro, which can then be used within a command sequence. A macro can be useful in several different contexts. For example, it can be used to:

• Issue a series of the same or similar commands repeatedly, using looping constructs rather than redundant specifications.

• Specify a set of variables.

• Produce output from several program procedures with a single command.

• Create complex input programs, procedure specifications, or whole sessions that can then be executed.

A macro is defined by specifying any part of a valid command and giving it a macro name. This name is then specified in a macro call within a command sequence. When the program encounters the macro name, it expands the macro.

In the examples of macro definition throughout this reference, the macro name, body, and arguments are shown in lowercase for readability. Macro keywords, which are always preceded by an exclamation point (!), are shown in uppercase.

Options Collapse Hide details

Options

Macro Arguments. You can declare and use arguments in the macro definition and then assign specific values to these arguments in the macro call. You can define defaults for the arguments and indicate whether an argument should be expanded when the macro is called. See the topic Macro Arguments (DEFINE-!ENDDEFINE command) for more information.

Macro Directives. You can turn macro expansion on and off. See the topic Macro Directives (DEFINE-!ENDDEFINE command) for more information.

String Manipulation Functions. You can process one or more character strings and produce either a new character string or a character representation of a numeric result. See the topic String Manipulation Functions (DEFINE-!ENDDEFINE command) for more information.

Conditional Processing. You can build conditional and looping constructs. See the topic Conditional Processing (DEFINE-!ENDDEFINE command) for more information.

Macro Variables. You can directly assign values to macro variables See the topic Direct Assignment of Macro Variables (DEFINE-!ENDDEFINE command) for more information.

Basic Specification Collapse Hide details

Basic Specification

All macros must start with DEFINE and end with !ENDDEFINE. These commands identify the beginning and end of a macro definition and are used to separate the macro definition from the rest of the command sequence.

• Immediately after DEFINE, specify the macro name. All macros must have a name. The name is used in the macro call to refer to the macro. Macro names can begin with an exclamation point (!), but other than this, follow the usual naming conventions. Starting a name with an ! ensures that it will not conflict with the other text or variables in the session.

• Immediately after the macro name, specify an optional argument definition in parentheses. This specification indicates the arguments that will be read when the macro is called. If you do not want to include arguments, specify just the parentheses; the parentheses are required, whether or not they enclose an argument.

• Next specify the body of the macro. The macro body can include commands, parts of commands, or macro statements (macro directives, string manipulation statements, and looping and conditional processing statements).

• At the end of the macro body, specify !ENDDEFINE.

To invoke the macro, issue a macro call in the command sequence. To call a macro, specify the macro name and any necessary arguments. If there are no arguments, only the macro name is required.

Operations Collapse Hide details

Operations

• When the program reads the macro definition, it translates into uppercase all text (except arguments) not enclosed in quotation marks. Arguments are read in upper- and lowercase.

• The macro facility does not build and execute commands; rather, it expands strings in a process called macro expansion. A macro call initiates macro expansion. After the strings are expanded, the commands (or parts of commands) that contain the expanded strings are executed as part of the command sequence.

• Any elements on the macro call that are not used in the macro expansion are read and combined with the expanded strings.

• The expanded strings and the remaining elements from the macro call, if any, must conform to the syntax rules for the program. If not, the program generates either a warning or an error message, depending on the nature of the syntax problem.

Syntax Rules Collapse Hide details

Syntax Rules

Just like other commands, expanded macros must adhere to the rules of the processing mode under which they are run. While it is desirable to create macro syntax that will run in both interactive and batch modes, this may sometimes add a layer of complexity that you may want to avoid. So we recommend that you write macro syntax that adheres to interactive syntax rules and structure your jobs to execute macro syntax under interactive syntax rules.

• The macro !ENDDEFINE statement should end with a period. A period as the last character on a line is interpreted as a command terminator in interactive mode.

• Other macro statements (for example, !IF, !LOOP, !LET) should not end with a period.

• Text within the body of the macro that represent commands that will be generated when the macro is expanded should include the period at the end of each command, and each command should start on a new line.

Example

DEFINE !macro1(type = !DEFAULT(1) !TOKENS(1)
                             /varlist=!CMDEND)
!IF (!type = 1)!THEN
frequencies variables=!varlist.
!ELSE
descriptives variables=!varlist.
!IFEND
!ENDDEFINE.

• The macro statements DEFINE, !IF, !ELSE, and !IFEND do not end with a period.

• !ENDDEFINE ends with a period.

• The FREQUENCIES and DESCRIPTIVES commands generated by the macro each start on a new line and end with a period.

To structure your command syntax jobs so that interactive processing rules are always used instead of batch processing rules:

• Use INSERT instead of INCLUDE to combine command files containing macros with other command files. See the topic INSERT for more information.

• In Production Facility jobs, select Interactive for the Syntax Input Format. See the topic Production Jobs for more information.

• In the Batch Facility (available only with PASW Statistics Server), use the -i switch to use interactive processing rules.

Compatibility Collapse Hide details

Compatibility

Improvements to the macro facility may cause errors in jobs that previously ran without errors. Specifically, for syntax that is processed with interactive rules, if a macro call occurs at the end of a command, and there is no command terminator (either a period or a blank line), the next command after the macro expansion will be interpreted as a continuation line instead of a new command, as in:

DEFINE !macro1()
var1 var2 var3
!ENDDEFINE.
FREQUENCIES VARIABLES = !macro1
DESCRIPTIVES VARIABLES = !macro1.

In interactive mode, the DESCRIPTIVES command will be interpreted as a continuation of the FREQUENCIES command, and neither command will run.

Limitations Collapse Hide details

Limitations

• The BEGIN DATA—END DATA commands are not allowed within a macro.

• BEGIN PROGRAM-END PROGRAM commands are not supported within a macro.

• The DEFINE command is not allowed within a macro.

Related Topics

DEFINE-!ENDDEFINE
Examples (DEFINE-!ENDDEFINE command)
Macro Arguments (DEFINE-!ENDDEFINE command)
Macro Directives (DEFINE-!ENDDEFINE command)
Macro Expansion in Comments (DEFINE-!ENDDEFINE command)
String Manipulation Functions (DEFINE-!ENDDEFINE command)
SET Subcommands for Use with Macro (DEFINE-!ENDDEFINE command)
Restoring SET Specifications (DEFINE-!ENDDEFINE command)
Conditional Processing (DEFINE-!ENDDEFINE command)
Unquoted String Constants in Conditional !IF Statements (DEFINE-!ENDDEFINE command)
Looping Constructs (DEFINE-!ENDDEFINE command)
Index Loop (DEFINE-!ENDDEFINE command)
List-Processing Loop (DEFINE-!ENDDEFINE command)
Direct Assignment of Macro Variables (DEFINE-!ENDDEFINE command)


Examples (DEFINE-!ENDDEFINE command)

Example

* Macro without arguments: Specify a group of variables.

DEFINE sesvars ()
   age sex educ religion
!ENDDEFINE.

FREQUENCIES VARIABLES=sesvars.

• The macro name is sesvars. Because the parentheses are empty, sesvars has no arguments. The macro body defines four variables: age, sex, educ, and religion.

• The macro call is specified on FREQUENCIES. When the call is executed, sesvars is expanded into the variables age, sex, educ, and religion.

• After the macro expansion, FREQUENCIES is executed.

Example

* Macro without arguments: Repeat a sequence of commands.

DATA LIST FILE = MAC4D /GROUP 1   REACTIME 3-5 ACCURACY 7-9.
VALUE LABELS GROUP    1'normal'
                      2'learning disabled'.
* Macro definition.
DEFINE check ()
split file by group.
frequencies variables = reactime accuracy
  /histogram.
descriptives reactime accuracy.
list.
split file off.
regression variables = group reactime accuracy
  /dependent = accuracy
  /enter
  /scatterplot (reactime, accuracy).
!ENDDEFINE.

check.                       /* First call of defined macro check

COMPUTE REACTIME = SQRT (REACTIME).
COMPUTE ACCURACY = SQRT (ACCURACY).

check.                       /* Second call of defined macro check

COMPUTE REACTIME = lg10 (REACTIME * REACTIME).
COMPUTE ACCURACY = lg10 (ACCURACY * ACCURACY).

check.                       /* Third call of defined macro check

• The name of the macro is check. The empty parentheses indicate that there are no arguments to the macro.

• The macro definition (between DEFINE and !ENDDEFINE) contains the command sequence to be repeated: SPLIT FILE, FREQUENCIES, DESCRIPTIVES, LIST, SPLIT FILE, and REGRESSION.

• The macro is called three times. Every time check is encountered, it is replaced with the command sequence SPLIT FILE, FREQUENCIES, DESCRIPTIVES, LIST, SPLIT FILE OFF, and REGRESSION. The command sequence using the macro facility is identical to the command sequence in which the specified commands are explicitly stated three separate times.

Example

* Macro with an argument.

DEFINE myfreq (vars = !CHAREND('/'))
frequencies variables = !vars
  /format = notable
  /statistics = default skewness kurtosis.
!ENDDEFINE.

myfreq vars = age sex educ religion /.

• The macro definition defines vars as the macro argument. In the macro call, four variables are specified as the argument to the macro myfreq. When the program expands the myfreq macro, it substitutes the argument, age, sex, educ, and religion, for !vars and executes the resulting commands.

Related Topics

DEFINE-!ENDDEFINE
Overview (DEFINE-!ENDDEFINE command)
Macro Arguments (DEFINE-!ENDDEFINE command)
Macro Directives (DEFINE-!ENDDEFINE command)
Macro Expansion in Comments (DEFINE-!ENDDEFINE command)
String Manipulation Functions (DEFINE-!ENDDEFINE command)
SET Subcommands for Use with Macro (DEFINE-!ENDDEFINE command)
Restoring SET Specifications (DEFINE-!ENDDEFINE command)
Conditional Processing (DEFINE-!ENDDEFINE command)
Unquoted String Constants in Conditional !IF Statements (DEFINE-!ENDDEFINE command)
Looping Constructs (DEFINE-!ENDDEFINE command)
Index Loop (DEFINE-!ENDDEFINE command)
List-Processing Loop (DEFINE-!ENDDEFINE command)
Direct Assignment of Macro Variables (DEFINE-!ENDDEFINE command)


Macro Arguments (DEFINE-!ENDDEFINE command)

DEFINE (command),DEFINE (command),DEFINE (command)
macro arguments,macro arguments,macro arguments
!POSITIONAL (keyword),!POSITIONAL (keyword),!POSITIONAL (keyword)
DEFINE command,DEFINE command,DEFINE command
DEFINE (command),DEFINE (command),DEFINE (command)
!POSITIONAL keyword,!POSITIONAL keyword,!POSITIONAL keyword

The macro definition can include macro arguments, which can be assigned specific values in the macro call. There are two types of arguments: keyword and positional. Keyword arguments are assigned names in the macro definition; in the macro call, they are identified by name. Positional arguments are defined after the keyword !POSITIONAL in the macro definition; in the macro call, they are identified by their relative position within the macro definition.

• There is no limit to the number of arguments that can be specified in a macro.

• All arguments are specified in parentheses and must be separated by slashes.

• If both keyword and positional arguments are defined in the same definition, the positional arguments must be defined, used in the macro body, and invoked in the macro call before the keyword arguments.

Example

* A keyword argument.

DEFINE macname (arg1 = !TOKENS(1))
frequencies variables = !arg1.
!ENDDEFINE.

macname arg1 = V1.

• The macro definition defines macname as the macro name and arg1 as the argument. The argument arg1 has one token and can be assigned any value in the macro call.

• The macro call expands the macname macro. The argument is identified by its name, arg1, and is assigned the value V1. V1 is substituted wherever !arg1 appears in the macro body. The macro body in this example is the FREQUENCIES command.

Example

* A positional argument.

DEFINE macname (!POSITIONAL !TOKENS(1)
               /!POSITIONAL !TOKENS(2))
frequencies variables = !1 !2.
!ENDDEFINE.

macname V1 V2 V3.

• The macro definition defines macname as the macro name with two positional arguments. The first argument has one token and the second argument has two tokens. The tokens can be assigned any values in the macro call.

• The macro call expands the macname macro. The arguments are identified by their positions. V1 is substituted for !1 wherever !1 appears in the macro body. V2 and V3 are substituted for !2 wherever !2 appears in the macro body. The macro body in this example is the FREQUENCIES command.

Related Topics

DEFINE-!ENDDEFINE
Overview (DEFINE-!ENDDEFINE command)
Examples (DEFINE-!ENDDEFINE command)
Macro Directives (DEFINE-!ENDDEFINE command)
Macro Expansion in Comments (DEFINE-!ENDDEFINE command)
String Manipulation Functions (DEFINE-!ENDDEFINE command)
SET Subcommands for Use with Macro (DEFINE-!ENDDEFINE command)
Restoring SET Specifications (DEFINE-!ENDDEFINE command)
Conditional Processing (DEFINE-!ENDDEFINE command)
Unquoted String Constants in Conditional !IF Statements (DEFINE-!ENDDEFINE command)
Looping Constructs (DEFINE-!ENDDEFINE command)
Index Loop (DEFINE-!ENDDEFINE command)
List-Processing Loop (DEFINE-!ENDDEFINE command)
Direct Assignment of Macro Variables (DEFINE-!ENDDEFINE command)
Keyword Arguments (DEFINE-!ENDDEFINE command)
Positional Arguments (DEFINE-!ENDDEFINE command)
Assigning Tokens to Arguments (DEFINE-!ENDDEFINE command)
Defining Defaults (DEFINE-!ENDDEFINE command)
Controlling Expansion (DEFINE-!ENDDEFINE command)


Keyword Arguments (DEFINE-!ENDDEFINE command)

macro facility,macro facility,macro facility
keyword arguments,keyword arguments,keyword arguments

Keyword arguments are called with user-defined keywords that can be specified in any order. In the macro body, the argument name is preceded by an exclamation point. On the macro call, the argument is specified without the exclamation point.

• Keyword argument definitions contain the argument name, an equals sign, and the !TOKENS, !ENCLOSE, !CHAREND, or !CMDEND keyword. See the topic Assigning Tokens to Arguments (DEFINE-!ENDDEFINE command) for more information.

• Argument names are limited to 63 bytes and cannot match the character portion of a macro keyword, such as DEFINE, TOKENS, CHAREND, and so forth.

• The keyword !POSITIONAL cannot be used in keyword argument definitions.

• Keyword arguments do not have to be called in the order they were defined.

Example

DATA LIST FILE=MAC / V1 1-2 V2 4-5 V3 7-8.

* Macro definition.
DEFINE macdef2 (arg1 = !TOKENS(1)
               /arg2 = !TOKENS(1)
               /arg3 = !TOKENS(1))
frequencies  variables = !arg1 !arg2 !arg3.
!ENDDEFINE.

* Macro call.
macdef2 arg1=V1  arg2=V2  arg3=V3.
macdef2 arg3=V3  arg1=V1  arg2=V2.

• Three arguments are defined: arg1, arg2, and arg3, each with one token. In the first macro call, arg1 is assigned the value V1, arg2 is assigned the value V2, and arg3 is assigned the value V3. V1, V2, and V3 are then used as the variables in the FREQUENCIES command.

• The second macro call yields the same results as the first one. With keyword arguments, you do not need to call the arguments in the order in which they were defined.

Related Topics

Macro Arguments (DEFINE-!ENDDEFINE command)
Positional Arguments (DEFINE-!ENDDEFINE command)
Assigning Tokens to Arguments (DEFINE-!ENDDEFINE command)
Defining Defaults (DEFINE-!ENDDEFINE command)
Controlling Expansion (DEFINE-!ENDDEFINE command)


Positional Arguments (DEFINE-!ENDDEFINE command)

macro facility,macro facility,macro facility
positional arguments,positional arguments,positional arguments

Positional arguments must be defined in the order in which they will be specified on the macro call. In the macro body, the first positional argument is referred to by !1, the second positional argument defined is referred to by !2, and so on. Similarly, the value of the first argument in the macro call is assigned to !1, the value of the second argument is assigned to !2, and so on.

• Positional arguments can be collectively referred to in the macro body by specifying !*. The !* specification concatenates arguments, separating individual arguments with a blank.

Example

DATA LIST FILE='/data/mac.txt' / V1 1-2 V2 4-5 V3 7-8.

* Macro definition.
DEFINE macdef (!POS !TOKENS(1)
              /!POS !TOKENS(1)
              /!POS !TOKENS(1))
frequencies variables = !1 !2 !3.
!ENDDEFINE.

* Macro call.
macdef  V1    V2   V3.
macdef  V3    V1   V2.

• Three positional arguments with one token each are defined. The first positional argument is referred to by !1 on the FREQUENCIES command, the second by !2, and the third by !3.

• When the first call expands the macro, the first positional argument (!1) is assigned the value V1, the second positional argument (!2) is assigned the value V2, and the third positional argument (!3) is assigned the value V3.

• In the second call, the first positional argument is assigned the value V3, the second positional argument is assigned the value V1, and the third positional argument is assigned the value V2.

Example

DEFINE macdef (!POS !TOKENS(3))
frequencies variables = !1.
!ENDDEFINE.

macdef  V1    V2   V3.

• This example is the same as the previous one, except that it assigns three tokens to one argument instead of assigning one token to each of three arguments. The result is the same.

Example

DEFINE macdef (!POS !TOKENS(1)
              /!POS !TOKENS(1)
              /!POS !TOKENS(1)
frequencies variables = !*.
!ENDDEFINE.

macdef  V1    V2   V3.

• This is a third alternative for achieving the macro expansion shown in the previous two examples. It specifies three arguments but then joins them all together on one FREQUENCIES command using the symbol !*.

Related Topics

Macro Arguments (DEFINE-!ENDDEFINE command)
Keyword Arguments (DEFINE-!ENDDEFINE command)
Assigning Tokens to Arguments (DEFINE-!ENDDEFINE command)
Defining Defaults (DEFINE-!ENDDEFINE command)
Controlling Expansion (DEFINE-!ENDDEFINE command)


Assigning Tokens to Arguments (DEFINE-!ENDDEFINE command)

DEFINE (command),DEFINE (command),DEFINE (command)
tokens,tokens,tokens
macro facility,macro facility,macro facility
tokens,tokens,tokens

A token is a character or group of characters that has a predefined function in a specified context. The argument definition must include a keyword that indicates which tokens following the macro name are associated with each argument.

• Any program keyword, variable name, or delimiter (a slash, comma, and so on) is a valid token.

• The arguments for a given macro can use a combination of the token keywords.

DEFINE (command),DEFINE (command),DEFINE (command)
!TOKENS keyword,!TOKENS keyword,!TOKENS keyword
!TOKENS (keyword),!TOKENS (keyword),!TOKENS (keyword)
DEFINE command,DEFINE command,DEFINE command
DEFINE (command),DEFINE (command),DEFINE (command)
!CHAREND keyword,!CHAREND keyword,!CHAREND keyword
!CHAREND (keyword),!CHAREND (keyword),!CHAREND (keyword)
DEFINE command,DEFINE command,DEFINE command
DEFINE (command),DEFINE (command),DEFINE (command)
!ENCLOSE keyword,!ENCLOSE keyword,!ENCLOSE keyword
!ENCLOSE (keyword),!ENCLOSE (keyword),!ENCLOSE (keyword)
DEFINE command,DEFINE command,DEFINE command
DEFINE (command),DEFINE (command),DEFINE (command)
!CMDEND keyword,!CMDEND keyword,!CMDEND keyword
!CMDEND (keyword),!CMDEND (keyword),!CMDEND (keyword)
DEFINE command,DEFINE command,DEFINE command
!TOKENS (n) | Assign the next n tokens to the argument. The value n can be any positive integer and must be enclosed in parentheses. !TOKENS allows you to specify exactly how many tokens are desired.
!CHAREND ('char') | Assign all tokens up to the specified character to the argument. The character must be a one-character string specified in apostrophes and enclosed in parentheses. !CHAREND specifies the character that ends the argument assignment. This is useful when the number of assigned tokens is arbitrary or not known in advance.
!ENCLOSE ('char','char') | Assign all tokens between the indicated characters to the argument. The starting and ending characters can be any one-character strings, and they do not need to be the same. The characters are each enclosed in apostrophes and separated by a comma. The entire specification is enclosed in parentheses. !ENCLOSE allows you to group multiple tokens within a specified pair of symbols. This is useful when the number of tokens to be assigned to an argument is indeterminate, or when the use of an ending character is not sufficient.
!CMDEND | Assign to the argument all of the remaining text on the macro call, up to the start of the next command. !CMDEND is useful for changing the defaults on an existing command. Since !CMDEND reads up to the next command, only the last argument on the argument list can be specified with !CMDEND. If !CMDEND is not the final argument, the arguments following !CMDEND are read as text.

Example

* Keyword !TOKENS.

DEFINE macname (!POSITIONAL !TOKENS (3)
frequencies variables = !1.
!ENDDEFINE.

macname ABC DEFG HI.

• The three tokens following macname (ABC, DEFG, and HI) are assigned to the positional argument !1, and FREQUENCIES is then executed.

Example

* Keyword !TOKENS.

* Macro definition.
DEFINE earnrep (varrep = !TOKENS (1))
sort cases by !varrep.
report variables = earnings
  /break = !varrep
  /summary = mean.
!ENDDEFINE.

* Call the macro three times.
earnrep varrep= SALESMAN.  /*First macro call
earnrep varrep = REGION.   /*Second macro call
earnrep varrep = MONTH.    /*Third macro call

• This macro runs a REPORT command three times, each time with a different break variable.

• The macro name is earnrep, and there is one keyword argument, varrep, which has one token.

• In the first macro call, the token SALESMAN is substituted for !varrep when the macro is expanded. REGION and MONTH are substituted for !varrep when the macro is expanded in the second and third calls.

Example

* Keyword !CHAREND'.

DEFINE macname (!POSITIONAL !CHAREND ('/')
               /!POSITIONAL !TOKENS(2))
frequencies variables = !1.
correlations variables= !2.
!ENDDEFINE.

macname A B C D / E F.

• When the macro is called, all tokens up to the slash (A, B, C, and D) are assigned to the positional argument !1. E and F are assigned to the positional argument !2.

Example

* Keyword !CHAREND.

DEFINE macname (!POSITIONAL !CHAREND ('/'))
frequencies variables = !1.
!ENDDEFINE.

macname A B C D / E F.

• Although E and F are not part of the positional argument and are not used in the macro expansion, the program still reads them as text and interprets them in relation to where the macro definition ends. In this example, macro definition ends after the expanded variable list (D). E and F are names of variables. Thus, E and F are added to the variable list and FREQUENCIES is executed with six variables: A, B, C, D, E, and F.

Example

* Keyword !ENCLOSE.

DEFINE macname (!POSITIONAL !ENCLOSE('(',')'))
frequencies variables = !1
  /statistics = default skewness.
!ENDDEFINE.

macname (A B C) D E.

• When the macro is called, the three tokens enclosed in parentheses--A, B, and C--are assigned to the positional argument !1 in the macro body.

• After macro expansion is complete, the program reads the remaining characters on the macro call as text. In this instance, the macro definition ends with keyword SKEWNESS on the STATISTICS subcommand. Adding variable names to the STATISTICS subcommand is not valid syntax. The program generates a warning message but is still able to execute the frequencies command. Frequency tables and the specified statistics are generated for the variables A, B, and C.

Example

* Keyword !CMDEND'.

DEFINE macname (!POSITIONAL !TOKENS(2)
               /!POSITIONAL !CMDEND)
frequencies variables = !1.
correlations variables= !2.
!ENDDEFINE.

macname A B C D E.

• When the macro is called, the first two tokens following macname (A and B) are assigned to the positional argument !1. C, D, and E are assigned to the positional argument !2. Thus, the variables used for FREQUENCIES are A and B, and the variables used for CORRELATION are C, D, and E.

Example

* Incorrect order for !CMDEND.

DEFINE macname  (!POSITIONAL !CMDEND
                /!POSITIONAL !tokens(2))
frequencies variables = !1.
correlations variables= !2.
!ENDDEFINE.

macname  A B C D E.

• When the macro is called, all five tokens, A, B, C, D, and E, are assigned to the first positional argument. No variables are included on the variable list for CORRELATIONS, causing the program to generate an error message. The previous example declares the arguments in the correct order.

Example

* Using !CMDEND.
SUBTITLE 'CHANGING DEFAULTS ON A COMMAND'.

DEFINE myfreq (!POSITIONAL !CMDEND)
frequencies !1
  /statistics=default skewness  /* Modify default statistics.
!ENDDEFINE.

myfreq VARIABLES = A B /HIST.

• The macro myfreq contains options for the FREQUENCIES command. When the macro is called, myfreq is expanded to perform a FREQUENCIES analysis on the variables A and B. The analysis produces default statistics and the skewness statistic, plus a histogram, as requested on the macro call.

Example

* Keyword arguments: Using a combination of token keywords.

DATA LIST FREE / A B C D E.
DEFINE macdef3 (arg1 = !TOKENS(1)
               /arg2 = !ENCLOSE ('(',')')
               /arg3 = !CHAREND('%'))
frequencies variables = !arg1  !arg2 !arg3.
!ENDDEFINE.
macdef arg1 = A  arg2=(B C)  arg3=D E %.

• Because arg1 is defined with the !TOKENS keyword, the value for arg1 is simply specified as A. The value for arg2 is specified in parentheses, as indicated by !ENCLOSE. The value for arg3 is followed by a percentage sign, as indicated by !CHAREND.

Related Topics

Macro Arguments (DEFINE-!ENDDEFINE command)
Keyword Arguments (DEFINE-!ENDDEFINE command)
Positional Arguments (DEFINE-!ENDDEFINE command)
Defining Defaults (DEFINE-!ENDDEFINE command)
Controlling Expansion (DEFINE-!ENDDEFINE command)


Defining Defaults (DEFINE-!ENDDEFINE command)

DEFINE (command),DEFINE (command),DEFINE (command)
!DEFAULT keyword,!DEFAULT keyword,!DEFAULT keyword
!DEFAULT (keyword),!DEFAULT (keyword),!DEFAULT (keyword)
DEFINE command,DEFINE command,DEFINE command
macro facility,macro facility,macro facility
assigning defaults,assigning defaults,assigning defaults

The optional !DEFAULT keyword in the macro definition establishes default settings for arguments.

!DEFAULT Default argument. After !DEFAULT, specify the value you want to use as a default for that argument. A default can be specified for each argument.

Example

DEFINE macdef (arg1 = !DEFAULT (V1) !TOKENS(1)
              /arg2 = !TOKENS(1)
              /arg3 = !TOKENS(1))
frequencies variables = !arg1 !arg2 !arg3.
!ENDDEFINE.

macdef arg2=V2  arg3=V3.

• V1 is defined as the default value for argument arg1. Since arg1 is not specified on the macro call, it is set to V1.

• If !DEFAULT (V1) were not specified, the value of arg1 would be set to a null string.

Related Topics

Macro Arguments (DEFINE-!ENDDEFINE command)
Keyword Arguments (DEFINE-!ENDDEFINE command)
Positional Arguments (DEFINE-!ENDDEFINE command)
Assigning Tokens to Arguments (DEFINE-!ENDDEFINE command)
Controlling Expansion (DEFINE-!ENDDEFINE command)


Controlling Expansion (DEFINE-!ENDDEFINE command)

DEFINE (command),DEFINE (command),DEFINE (command)
!NOEXPAND keyword,!NOEXPAND keyword,!NOEXPAND keyword
!NOEXPAND (keyword),!NOEXPAND (keyword),!NOEXPAND (keyword)
DEFINE command,DEFINE command,DEFINE command

!NOEXPAND indicates that an argument should not be expanded when the macro is called.

!NOEXPAND Do not expand the specified argument. !NOEXPAND applies to a single argument and is useful only when a macro calls another macro (embedded macros).

Related Topics

Macro Arguments (DEFINE-!ENDDEFINE command)
Keyword Arguments (DEFINE-!ENDDEFINE command)
Positional Arguments (DEFINE-!ENDDEFINE command)
Assigning Tokens to Arguments (DEFINE-!ENDDEFINE command)
Defining Defaults (DEFINE-!ENDDEFINE command)


Macro Directives (DEFINE-!ENDDEFINE command)

!ONEXPAND and !OFFEXPAND determine whether macro expansion is on or off. !ONEXPAND activates macro expansion and !OFFEXPAND stops macro expansion. All symbols between !OFFEXPAND and !ONEXPAND in the macro definition will not be expanded when the macro is called.

!ONEXPAND (keyword),!ONEXPAND (keyword),!ONEXPAND (keyword)
DEFINE command,DEFINE command,DEFINE command
DEFINE (command),DEFINE (command),DEFINE (command)
!ONEXPAND keyword,!ONEXPAND keyword,!ONEXPAND keyword
!OFFEXPAND (keyword),!OFFEXPAND (keyword),!OFFEXPAND (keyword)
DEFINE command,DEFINE command,DEFINE command
DEFINE (command),DEFINE (command),DEFINE (command)
!OFFEXPAND keyword,!OFFEXPAND keyword,!OFFEXPAND keyword
!ONEXPAND | Turn macro expansion on.
!OFFEXPAND | Turn macro expansion off. !OFFEXPAND is effective only when SETMEXPAND is ON (the default).

Related Topics

DEFINE-!ENDDEFINE
Overview (DEFINE-!ENDDEFINE command)
Examples (DEFINE-!ENDDEFINE command)
Macro Arguments (DEFINE-!ENDDEFINE command)
Macro Expansion in Comments (DEFINE-!ENDDEFINE command)
String Manipulation Functions (DEFINE-!ENDDEFINE command)
SET Subcommands for Use with Macro (DEFINE-!ENDDEFINE command)
Restoring SET Specifications (DEFINE-!ENDDEFINE command)
Conditional Processing (DEFINE-!ENDDEFINE command)
Unquoted String Constants in Conditional !IF Statements (DEFINE-!ENDDEFINE command)
Looping Constructs (DEFINE-!ENDDEFINE command)
Index Loop (DEFINE-!ENDDEFINE command)
List-Processing Loop (DEFINE-!ENDDEFINE command)
Direct Assignment of Macro Variables (DEFINE-!ENDDEFINE command)


Macro Expansion in Comments (DEFINE-!ENDDEFINE command)

When macro expansion is on, a macro is expanded when its name is specified in a comment line beginning with *. To use a macro name in a comment, specify the comment within slashes and asterisks (/*...*/) to avoid unwanted macro expansion. (See COMMENT.)

Related Topics

DEFINE-!ENDDEFINE
Overview (DEFINE-!ENDDEFINE command)
Examples (DEFINE-!ENDDEFINE command)
Macro Arguments (DEFINE-!ENDDEFINE command)
Macro Directives (DEFINE-!ENDDEFINE command)
String Manipulation Functions (DEFINE-!ENDDEFINE command)
SET Subcommands for Use with Macro (DEFINE-!ENDDEFINE command)
Restoring SET Specifications (DEFINE-!ENDDEFINE command)
Conditional Processing (DEFINE-!ENDDEFINE command)
Unquoted String Constants in Conditional !IF Statements (DEFINE-!ENDDEFINE command)
Looping Constructs (DEFINE-!ENDDEFINE command)
Index Loop (DEFINE-!ENDDEFINE command)
List-Processing Loop (DEFINE-!ENDDEFINE command)
Direct Assignment of Macro Variables (DEFINE-!ENDDEFINE command)


String Manipulation Functions (DEFINE-!ENDDEFINE command)

macro facility,macro facility,macro facility
string functions,string functions,string functions
DEFINE (command),DEFINE (command),DEFINE (command)
string functions,string functions,string functions
string functions,string functions,string functions
macro facility,macro facility,macro facility

String manipulation functions process one or more character strings and produce either a new character string or a character representation of a numeric result.

• The result of any string manipulation function is treated as a character string.

• The arguments to string manipulation functions can be strings, variables, or even other macros. A macro argument or another function can be used in place of a string.

• The strings within string manipulation functions must be either single tokens, such as ABC, or delimited by apostrophes or quotation marks, as in ‘A B C’.

Expressions and results
Expression | Result
!UPCASE(abc) | ABC
!UPCASE(‘abc’) | ABC
!UPCASE(a b c) | error
!UPCASE(‘a b c’) | A B C
!UPCASE(a/b/c) | error
!UPCASE(‘a/b/c’) | A/B/C
!UPCASE(!CONCAT(a,b,c)) | ABC
!UPCASE(!CONCAT(‘a’,‘b’,‘c’)) | ABC
!UPCASE(!CONCAT(a, b, c)) | ABC
!UPCASE(!CONCAT(‘a ’,‘b ’,‘c ’)) | A B C
!UPCASE(!CONCAT(‘a,b,c’)) | A,B,C
!QUOTE(abc) | ‘ABC’
!QUOTE(‘abc’) | abc
!QUOTE(‘Bill”s’) | ‘Bill”s’
!QUOTE(“Bill’s”) | “Bill’s”
!QUOTE(Bill’s) | error
!QUOTE(!UNQUOTE(‘Bill”s’)) | ‘Bill”s’
!LENGTH (function),!LENGTH (function),!LENGTH (function)
DEFINE command,DEFINE command,DEFINE command
!CONCAT (function),!CONCAT (function),!CONCAT (function)
DEFINE command,DEFINE command,DEFINE command
!SUBSTRING (function),!SUBSTRING (function),!SUBSTRING (function)
DEFINE command,DEFINE command,DEFINE command
!INDEX (function),!INDEX (function),!INDEX (function)
DEFINE command,DEFINE command,DEFINE command
!HEAD (function),!HEAD (function),!HEAD (function)
DEFINE command,DEFINE command,DEFINE command
!TAIL (function),!TAIL (function),!TAIL (function)
DEFINE command,DEFINE command,DEFINE command
!QUOTE (function),!QUOTE (function),!QUOTE (function)
DEFINE command,DEFINE command,DEFINE command
!UNQUOTE (function),!UNQUOTE (function),!UNQUOTE (function)
DEFINE command,DEFINE command,DEFINE command
!UPCASE (function),!UPCASE (function),!UPCASE (function)
DEFINE command,DEFINE command,DEFINE command
!BLANKS (function),!BLANKS (function),!BLANKS (function)
DEFINE command,DEFINE command,DEFINE command
!NULL (function),!NULL (function),!NULL (function)
DEFINE command,DEFINE command,DEFINE command
!EVAL (function),!EVAL (function),!EVAL (function)
DEFINE command,DEFINE command,DEFINE command
!LENGTH (str) | Return the length of the specified string. The result is a character representation of the string length. !LENGTH(abcdef) returns 6. If the string is specified with apostrophes around it, each apostrophe adds 1 to the length. !LENGTH (‘abcdef’) returns 8. If an argument is used in place of a string and it is set to null, this function will return 0.
!CONCAT (str1,str2 . . .) | Return a string that is the concatenation of the strings. For example, !CONCAT (abc,def) returns abcdef.
!SUBSTR (str,from,[length]) | Return a substring of the specified string. The substring starts at the from position and continues for the specified length. If the length is not specified, the substring ends at the end of the input string. For example, !SUBSTR (abcdef, 3, 2) returns cd.
!INDEX (haystack,needle) | Return the position of the first occurrence of the needle in the haystack. If the needle is not found in the haystack, the function returns 0. !INDEX (abcdef,def) returns 4.
!HEAD (str) | Return the first token within a string. The input string is not changed. !HEAD (‘a b c’) returns a.
!TAIL (str) | Return all tokens except the head token. The input string is not changed. !TAIL(‘a b c’) returns b c.
!QUOTE (str) | Put apostrophes around the argument. !QUOTE replicates any embedded apostrophe. !QUOTE(abc) returns ‘abc’. If !1 equals Bill’s, !QUOTE(!1) returns ‘Bill’’s’.
!UNQUOTE (str) | Remove quotation marks and apostrophes from the enclosed string. If !1 equals ‘abc’, !UNQUOTE(!1) is abc. Internal paired quotation marks are unpaired; if !1 equals ‘Bill”s’, !UNQUOTE(!1) is Bill’s. The specification !UNQUOTE(!QUOTE(Bill)) returns Bill.
!UPCASE (str) | Convert all lowercase characters in the argument to uppercase. !UPCASE(‘abc def’) returns ABC DEF.
!BLANKS (n) | Generate a string containing the specified number of blanks. The n specification must be a positive integer. !BLANKS(5) returns a string of five blank spaces. Unless the blanks are quoted, they cannot be processed, since the macro facility compresses blanks.
!NULL | Generate a string of length 0. This can help determine whether an argument was ever assigned a value, as in !IF (!1 !EQ !NULL) !THEN. . . .
!EVAL (str) | Scan the argument for macro calls. During macro definition, an argument to a function or an operand in an expression is not scanned for possible macro calls unless the !EVAL function is used. It returns a string that is the expansion of its argument. For example, if mac1 is a macro, then !EVAL(mac1) returns the expansion of mac1. If mac1 is not a macro, !EVAL(mac1) returns mac1.

Related Topics

DEFINE-!ENDDEFINE
Overview (DEFINE-!ENDDEFINE command)
Examples (DEFINE-!ENDDEFINE command)
Macro Arguments (DEFINE-!ENDDEFINE command)
Macro Directives (DEFINE-!ENDDEFINE command)
Macro Expansion in Comments (DEFINE-!ENDDEFINE command)
SET Subcommands for Use with Macro (DEFINE-!ENDDEFINE command)
Restoring SET Specifications (DEFINE-!ENDDEFINE command)
Conditional Processing (DEFINE-!ENDDEFINE command)
Unquoted String Constants in Conditional !IF Statements (DEFINE-!ENDDEFINE command)
Looping Constructs (DEFINE-!ENDDEFINE command)
Index Loop (DEFINE-!ENDDEFINE command)
List-Processing Loop (DEFINE-!ENDDEFINE command)
Direct Assignment of Macro Variables (DEFINE-!ENDDEFINE command)


SET Subcommands for Use with Macro (DEFINE-!ENDDEFINE command)

DEFINE (command),DEFINE (command),DEFINE (command)
with SET command,with SET command,with SET command

Four subcommands on the SET command were designed for use with the macro facility.

MPRINT (subcommand),MPRINT (subcommand),MPRINT (subcommand)
SET command,SET command,SET command
MEXPAND (subcommand),MEXPAND (subcommand),MEXPAND (subcommand)
SET command,SET command,SET command
MNEST (subcommand),MNEST (subcommand),MNEST (subcommand)
SET command,SET command,SET command
MITERATE (subcommand),MITERATE (subcommand),MITERATE (subcommand)
SET command,SET command,SET command
MPRINT | Display a list of commands after macro expansion. The specification on MPRINT is YES or NO (alias ON or OFF). By default, the output does not include a list of commands after macro expansion (MPRINT NO). The MPRINT subcommand on SET is independent of the PRINTBACK command.
MEXPAND | Macro expansion. The specification on MEXPAND is YES or NO (alias ON or OFF). By default, MEXPAND is on. SET MEXPAND OFF prevents macro expansion. Specifying SET MEXPAND ON reestablishes macro expansion.
MNEST | Maximum nesting level for macros. The default number of levels that can be nested is 50. The maximum number of levels depends on storage capacity.
MITERATE | Maximum loop iterations permitted in macro expansions. The default number of iterations is 1000.

Related Topics

DEFINE-!ENDDEFINE
Overview (DEFINE-!ENDDEFINE command)
Examples (DEFINE-!ENDDEFINE command)
Macro Arguments (DEFINE-!ENDDEFINE command)
Macro Directives (DEFINE-!ENDDEFINE command)
Macro Expansion in Comments (DEFINE-!ENDDEFINE command)
String Manipulation Functions (DEFINE-!ENDDEFINE command)
Restoring SET Specifications (DEFINE-!ENDDEFINE command)
Conditional Processing (DEFINE-!ENDDEFINE command)
Unquoted String Constants in Conditional !IF Statements (DEFINE-!ENDDEFINE command)
Looping Constructs (DEFINE-!ENDDEFINE command)
Index Loop (DEFINE-!ENDDEFINE command)
List-Processing Loop (DEFINE-!ENDDEFINE command)
Direct Assignment of Macro Variables (DEFINE-!ENDDEFINE command)


Restoring SET Specifications (DEFINE-!ENDDEFINE command)

RESTORE (command),RESTORE (command),RESTORE (command)
macro facility,macro facility,macro facility
PRESERVE (command),PRESERVE (command),PRESERVE (command)
macro facility,macro facility,macro facility

The PRESERVE and RESTORE commands bring more flexibility and control over SET. PRESERVE and RESTORE are available generally within the program but are especially useful with macros.

• The settings of all SET subcommands—those set explicitly and those set by default (except MEXPAND)—are saved with PRESERVE. PRESERVE has no further specifications.

• With RESTORE, all SET subcommands are changed to what they were when the PRESERVE command was executed. RESTORE has no further specifications.

• PRESERVE...RESTORE sequences can be nested up to five levels.

PRESERVE | Store the SET specifications that are in effect at this point in the session.
RESTORE | Restore the SET specifications to what they were when PRESERVE was specified.

Example

* Two nested levels of preserve and restore'.

DEFINE macdef ()
preserve.
set format F5.3.
descriptives v1 v2.
+ preserve.
set format F3.0 blanks=999.
descriptives v3 v4.
+ restore.
descriptives v5 v6.
restore.
!ENDDEFINE.

• The first PRESERVE command saves all of the current SET conditions. If none have been specified, the default settings are saved.

• Next, the format is set to F5.3 and descriptive statistics for V1 and V2 are obtained.

• The second PRESERVE command saves the F5.3 format setting and all other settings in effect.

• The second SET command changes the format to F3.0 and sets BLANKS to 999 (the default is SYSMIS). Descriptive statistics are then obtained for V3 and V4.

• The first RESTORE command restores the format to F5.3 and BLANKS to the default, the setting in effect at the second PRESERVE. Descriptive statistics are then obtained for V5 and V6.

• The last RESTORE restores the settings in effect when the first PRESERVE was specified.

Related Topics

DEFINE-!ENDDEFINE
Overview (DEFINE-!ENDDEFINE command)
Examples (DEFINE-!ENDDEFINE command)
Macro Arguments (DEFINE-!ENDDEFINE command)
Macro Directives (DEFINE-!ENDDEFINE command)
Macro Expansion in Comments (DEFINE-!ENDDEFINE command)
String Manipulation Functions (DEFINE-!ENDDEFINE command)
SET Subcommands for Use with Macro (DEFINE-!ENDDEFINE command)
Conditional Processing (DEFINE-!ENDDEFINE command)
Unquoted String Constants in Conditional !IF Statements (DEFINE-!ENDDEFINE command)
Looping Constructs (DEFINE-!ENDDEFINE command)
Index Loop (DEFINE-!ENDDEFINE command)
List-Processing Loop (DEFINE-!ENDDEFINE command)
Direct Assignment of Macro Variables (DEFINE-!ENDDEFINE command)


Conditional Processing (DEFINE-!ENDDEFINE command)

macro facility,macro facility,macro facility
conditional processing,conditional processing,conditional processing
DEFINE (command),DEFINE (command),DEFINE (command)
!IF command,!IF command,!IF command
!IF (command),!IF (command),!IF (command)
DEFINE command,DEFINE command,DEFINE command
DEFINE (command),DEFINE (command),DEFINE (command)
!IFEND command,!IFEND command,!IFEND command
!IFEND (command),!IFEND (command),!IFEND (command)
DEFINE command,DEFINE command,DEFINE command
DEFINE (command),DEFINE (command),DEFINE (command)
!THEN keyword,!THEN keyword,!THEN keyword
!THEN (keyword),!THEN (keyword),!THEN (keyword)
DEFINE command,DEFINE command,DEFINE command
DEFINE (command),DEFINE (command),DEFINE (command)
!ELSE keyword,!ELSE keyword,!ELSE keyword
!ELSE (keyword),!ELSE (keyword),!ELSE (keyword)
DEFINE command,DEFINE command,DEFINE command

The !IF construct specifies conditions for processing. The syntax is as follows:

!IF (expression) !THEN statements
                [!ELSE statements]
!IFEND

• !IF, !THEN, and !IFEND are all required. !ELSE is optional.

• If the result of the expression is true, the statements following !THEN are executed. If the result of the expression is false and !ELSE is specified, the statements following !ELSE are executed. Otherwise, the program continues.

• Valid operators for the expressions include !EQ, !NE, !GT, !LT, !GE, !LE, !OR, !NOT, and !AND, or =, ~= (¬=), >, <, >=, <=, |, ~ (¬), and &.

• When a macro is expanded, conditional processing constructs are interpreted after arguments are substituted and functions are executed.

• !IF statements can be nested whenever necessary. Parentheses can be used to specify the order of evaluation. The default order is the same as for transformations: !NOT has precedence over !AND, which has precedence over !OR.

Example

DEFINE mymacro(type = !DEFAULT(1) !TOKENS(1))
!IF (!type = 1)!then
frequencies variables=varone.
!ELSE
descriptives variables=vartwo.
!IFEND
!ENDDEFINE.

Related Topics

DEFINE-!ENDDEFINE
Overview (DEFINE-!ENDDEFINE command)
Examples (DEFINE-!ENDDEFINE command)
Macro Arguments (DEFINE-!ENDDEFINE command)
Macro Directives (DEFINE-!ENDDEFINE command)
Macro Expansion in Comments (DEFINE-!ENDDEFINE command)
String Manipulation Functions (DEFINE-!ENDDEFINE command)
SET Subcommands for Use with Macro (DEFINE-!ENDDEFINE command)
Restoring SET Specifications (DEFINE-!ENDDEFINE command)
Unquoted String Constants in Conditional !IF Statements (DEFINE-!ENDDEFINE command)
Looping Constructs (DEFINE-!ENDDEFINE command)
Index Loop (DEFINE-!ENDDEFINE command)
List-Processing Loop (DEFINE-!ENDDEFINE command)
Direct Assignment of Macro Variables (DEFINE-!ENDDEFINE command)


Unquoted String Constants in Conditional !IF Statements (DEFINE-!ENDDEFINE command)

Prior to version 12.0, under certain circumstances unquoted string constants in conditional !IF statements were not case sensitive. Starting with version 12.0, unquoted string constants are case sensitive. For backward compatibility, always use quoted string constants.

Example

DEFINE noquote(type = !DEFAULT(a) !TOKENS(1))
!IF (!type = A)!THEN
frequencies variables=varone.
!ELSE
descriptives variables=vartwo.
!IFEND
!ENDDEFINE.
DEFINE yesquote(type = !DEFAULT(‘a’) !TOKENS(1)).
!IF (!type = ‘A’)!THEN
FREQUENCIES varone.
!ELSE
DESCRIPTIVES vartwo.
!IFEND.
!ENDDEFINE.

• In the first macro, !IF(!type = A) is evaluated as false if the value of the unquoted string constant is lowercase ‘a’—and is therefore evaluated as false in this example.

• Prior to version 12.0, !IF (!type = A) was evaluated as true if the value of the unquoted string constant was lowercase ‘a’ or uppercase ‘A’—and was therefore evaluated as true in this example.

• In the second macro, !IF (!type = ‘A’) is always evaluated as false if the value of the string constant is lowercase ‘a.’

Related Topics

DEFINE-!ENDDEFINE
Overview (DEFINE-!ENDDEFINE command)
Examples (DEFINE-!ENDDEFINE command)
Macro Arguments (DEFINE-!ENDDEFINE command)
Macro Directives (DEFINE-!ENDDEFINE command)
Macro Expansion in Comments (DEFINE-!ENDDEFINE command)
String Manipulation Functions (DEFINE-!ENDDEFINE command)
SET Subcommands for Use with Macro (DEFINE-!ENDDEFINE command)
Restoring SET Specifications (DEFINE-!ENDDEFINE command)
Conditional Processing (DEFINE-!ENDDEFINE command)
Looping Constructs (DEFINE-!ENDDEFINE command)
Index Loop (DEFINE-!ENDDEFINE command)
List-Processing Loop (DEFINE-!ENDDEFINE command)
Direct Assignment of Macro Variables (DEFINE-!ENDDEFINE command)


Looping Constructs (DEFINE-!ENDDEFINE command)

macro facility,macro facility,macro facility
loop structures,loop structures,loop structures
loop structures,loop structures,loop structures
macro facility,macro facility,macro facility
DEFINE (command),DEFINE (command),DEFINE (command)
!DO command,!DO command,!DO command
!DO (command),!DO (command),!DO (command)
DEFINE command,DEFINE command,DEFINE command
DEFINE (command),DEFINE (command),DEFINE (command)
!DOEND command,!DOEND command,!DOEND command
!DOEND (command),!DOEND (command),!DOEND (command)
DEFINE command,DEFINE command,DEFINE command
DEFINE (command),DEFINE (command),DEFINE (command)
!BY keyword,!BY keyword,!BY keyword
!BY (keyword),!BY (keyword),!BY (keyword)
DEFINE command,DEFINE command,DEFINE command
DEFINE (command),DEFINE (command),DEFINE (command)
!TO keyword,!TO keyword,!TO keyword
!TO (keyword),!TO (keyword),!TO (keyword)
DEFINE command,DEFINE command,DEFINE command
DEFINE (command),DEFINE (command),DEFINE (command)
!BREAK command,!BREAK command,!BREAK command
!BREAK (command),!BREAK (command),!BREAK (command)
DEFINE command,DEFINE command,DEFINE command

Looping constructs accomplish repetitive tasks. Loops can be nested to whatever depth is required, but loops cannot be crossed. The macro facility has two looping constructs: the index loop (DO loop) and the list-processing loop (DO IN loop).

• When a macro is expanded, looping constructs are interpreted after arguments are substituted and functions are executed.

Related Topics

DEFINE-!ENDDEFINE
Overview (DEFINE-!ENDDEFINE command)
Examples (DEFINE-!ENDDEFINE command)
Macro Arguments (DEFINE-!ENDDEFINE command)
Macro Directives (DEFINE-!ENDDEFINE command)
Macro Expansion in Comments (DEFINE-!ENDDEFINE command)
String Manipulation Functions (DEFINE-!ENDDEFINE command)
SET Subcommands for Use with Macro (DEFINE-!ENDDEFINE command)
Restoring SET Specifications (DEFINE-!ENDDEFINE command)
Conditional Processing (DEFINE-!ENDDEFINE command)
Unquoted String Constants in Conditional !IF Statements (DEFINE-!ENDDEFINE command)
Index Loop (DEFINE-!ENDDEFINE command)
List-Processing Loop (DEFINE-!ENDDEFINE command)
Direct Assignment of Macro Variables (DEFINE-!ENDDEFINE command)


Index Loop (DEFINE-!ENDDEFINE command)

The syntax of an index loop is as follows:

!DO !var = start !TO finish [ !BY step ]
    statements
!BREAK
!DOEND

• The indexing variable is !var and must begin with an exclamation point.

• The start, finish, and step values must be numbers or expressions that evaluate to numbers.

• The loop begins at the start value and continues until it reaches the finish value (unless a !BREAK statement is encountered). The step value is optional and can be used to specify a subset of iterations. If start is set to 1, finish to 10, and step to 3, the loop will be executed four times with the index variable assigned values 1, 4, 7, and 10.

• The statements can be any valid commands or macro keywords. !DOEND specifies the end of the loop.

• !BREAK is an optional specification. It can be used in conjunction with conditional processing to exit the loop.

Example

DEFINE macdef (arg1 = !TOKENS(1)
              /arg2 = !TOKENS(1))
!DO !i = !arg1 !TO !arg2.
frequencies variables = !CONCAT(var,!i).
!DOEND
!ENDDEFINE.
macdef arg1 = 1 arg2 = 3.

• The variable !i is initially assigned the value 1 (arg1) and is incremented until it equals 3 (arg2), at which point the loop ends.

• The first loop concatenates var and the value for !I, which is 1 in the first loop. The second loop concatenates var and 2, and the third concatenates var and 3. The result is that FREQUENCIES is executed three times, with variables VAR1, VAR2, and VAR3, respectively.

Related Topics

DEFINE-!ENDDEFINE
Overview (DEFINE-!ENDDEFINE command)
Examples (DEFINE-!ENDDEFINE command)
Macro Arguments (DEFINE-!ENDDEFINE command)
Macro Directives (DEFINE-!ENDDEFINE command)
Macro Expansion in Comments (DEFINE-!ENDDEFINE command)
String Manipulation Functions (DEFINE-!ENDDEFINE command)
SET Subcommands for Use with Macro (DEFINE-!ENDDEFINE command)
Restoring SET Specifications (DEFINE-!ENDDEFINE command)
Conditional Processing (DEFINE-!ENDDEFINE command)
Unquoted String Constants in Conditional !IF Statements (DEFINE-!ENDDEFINE command)
Looping Constructs (DEFINE-!ENDDEFINE command)
List-Processing Loop (DEFINE-!ENDDEFINE command)
Direct Assignment of Macro Variables (DEFINE-!ENDDEFINE command)


List-Processing Loop (DEFINE-!ENDDEFINE command)

DEFINE (command),DEFINE (command),DEFINE (command)
!IN keyword,!IN keyword,!IN keyword
!IN (keyword),!IN (keyword),!IN (keyword)
DEFINE command,DEFINE command,DEFINE command

The syntax of a list-processing loop is as follows:

!DO !var !IN (list)
    statements
!BREAK
!DOEND

• The !DO and !DOEND statements begin and end the loop. !BREAK is used to exit the loop.

• The !IN function requires one argument, which must be a list of items. The number of items on the list determines the number of iterations. At each iteration, the index variable !var is set to each item on the list.

• The list can be any expression, although it is usually a string. Only one list can be specified in each list-processing loop.

Example

DEFINE macdef (!POS !CHAREND('/'))
!DO !i !IN (!1)
frequencies variables = !i.
!DOEND
!ENDDEFINE.
macdef VAR1 VAR2 VAR3  /.

• The macro call assigns three variables, VAR1, VAR2, and VAR3, to the positional argument !1. Thus, the loop completes three iterations.

• In the first iteration, !i is set to value VAR1. In the second and third iterations, !I is set to VAR2 and VAR3, respectively. Thus, FREQUENCIES is executed three times, respectively with VAR1, VAR2, and VAR3.

Example

DEFINE macdef (!POS !CHAREND('/'))
!DO !i !IN (!1)
sort cases by !i.
report var = earnings
  /break = !i
  /summary = mean.
!DOEND
!ENDDEFINE.

macdef SALESMAN REGION MONTH /.

• The positional argument !1 is assigned the three variables SALESMAN, REGION, and MONTH. The loop is executed three times and the index variable !i is set to each of the variables in succession. The macro creates three reports.

Related Topics

DEFINE-!ENDDEFINE
Overview (DEFINE-!ENDDEFINE command)
Examples (DEFINE-!ENDDEFINE command)
Macro Arguments (DEFINE-!ENDDEFINE command)
Macro Directives (DEFINE-!ENDDEFINE command)
Macro Expansion in Comments (DEFINE-!ENDDEFINE command)
String Manipulation Functions (DEFINE-!ENDDEFINE command)
SET Subcommands for Use with Macro (DEFINE-!ENDDEFINE command)
Restoring SET Specifications (DEFINE-!ENDDEFINE command)
Conditional Processing (DEFINE-!ENDDEFINE command)
Unquoted String Constants in Conditional !IF Statements (DEFINE-!ENDDEFINE command)
Looping Constructs (DEFINE-!ENDDEFINE command)
Index Loop (DEFINE-!ENDDEFINE command)
Direct Assignment of Macro Variables (DEFINE-!ENDDEFINE command)


Direct Assignment of Macro Variables (DEFINE-!ENDDEFINE command)

!LET (command),!LET (command),!LET (command)
DEFINE command,DEFINE command,DEFINE command
DEFINE (command),DEFINE (command),DEFINE (command)
!LET command,!LET command,!LET command

The macro command !LET assigns values to macro variables. The syntax is as follows:

!LET !var = expression

• The expression must be either a single token or enclosed in parentheses.

• The macro variable !var cannot be a macro keyword, and it cannot be the name of one of the arguments within the macro definition. Thus, !LET cannot be used to change the value of an argument.

• The macro variable !var can be a new variable or one previously assigned by a !DO command or another !LET command.

Example

!LET !a = 1
!LET !b = !CONCAT(ABC,!SUBSTR(!1,3,1),DEF)
!LET !c = (!2 ~= !NULL)

• The first !LET sets !a equal to 1.

• The second !LET sets !b equal to ABC followed by 1 character taken from the third position of !1 followed by DEF.

• The last !LET sets !c equal to 0 (false) if !2 is a null string or to 1 (true) if !2 is not a null string.

Related Topics

DEFINE-!ENDDEFINE
Overview (DEFINE-!ENDDEFINE command)
Examples (DEFINE-!ENDDEFINE command)
Macro Arguments (DEFINE-!ENDDEFINE command)
Macro Directives (DEFINE-!ENDDEFINE command)
Macro Expansion in Comments (DEFINE-!ENDDEFINE command)
String Manipulation Functions (DEFINE-!ENDDEFINE command)
SET Subcommands for Use with Macro (DEFINE-!ENDDEFINE command)
Restoring SET Specifications (DEFINE-!ENDDEFINE command)
Conditional Processing (DEFINE-!ENDDEFINE command)
Unquoted String Constants in Conditional !IF Statements (DEFINE-!ENDDEFINE command)
Looping Constructs (DEFINE-!ENDDEFINE command)
Index Loop (DEFINE-!ENDDEFINE command)
List-Processing Loop (DEFINE-!ENDDEFINE command)


DELETE VARIABLES

DELETE VARIABLES (command),DELETE VARIABLES (command),DELETE VARIABLES (command)
DELETE VARIABLES (command),DELETE VARIABLES (command),DELETE VARIABLES (command)
syntax chart,syntax chart,syntax chart
DELETE VARIABLES  varlist.

This command takes effect immediately. It does not read the active dataset or execute pending transformations. See the topic Command Order for more information.

Example

DElETE VARIABLES varX varY thisVar TO thatVar.

Related Topics

Overview (DELETE VARIABLES command)


Overview (DELETE VARIABLES command)

DELETE VARIABLES deletes the specified variables from the active dataset.

Basic Specification Collapse Hide details

Basic Specification

• The basic specification is one or more variable names.

Syntax Rules Collapse Hide details

Syntax Rules

• The variables must exist in the active dataset.

• The keyword TO can be used to specify consecutive variable in the active dataset.

• This command cannot be executed when there are pending transformations. For example, DELETE VARIABLES cannot be immediately preceded by transformation commands such as COMPUTE or RECODE.

• DELETE VARIABLES cannot be used with TEMPORARY.

• You cannot use this command to delete all variables in the active dataset. If the variable list includes all variables in the active dataset, an error results and the command is not executed. Use NEW FILE to delete all variables.

Related Topics

DELETE VARIABLES


DESCRIPTIVES

DESCRIPTIVES (command),DESCRIPTIVES (command),DESCRIPTIVES (command)
DESCRIPTIVES (command),DESCRIPTIVES (command),DESCRIPTIVES (command)
syntax chart,syntax chart,syntax chart

DESCRIPTIVES is available in the Statistics Base option.

DESCRIPTIVES VARIABLES= varname[(zname)] [varname...]

 [/MISSING={VARIABLE**}  [INCLUDE]]
           {LISTWISE  }

 [/SAVE]

 [/STATISTICS=[DEFAULT**]  [MEAN**]  [MIN**]  [SKEWNESS]]
              [STDDEV** ]  [SEMEAN]  [MAX**]  [KURTOSIS]
              [VARIANCE ]  [SUM   ]  [RANGE]  [ALL]

 [/SORT=[{MEAN    }] [{(A)}]]
         {SMEAN   }   {(D)}
         {STDDEV  }
         {VARIANCE}
         {KURTOSIS}
         {SKEWNESS}
         {RANGE   }
         {MIN     }
         {MAX     }
         {SUM     }
         {NAME    }

**Default if the subcommand is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See DESCRIPTIVES Algorithms for computational details for this procedure.

Syntax for the DESCRIPTIVES command can be generated from the Descriptives dialog.

Example

DESCRIPTIVES VARIABLES=FOOD RENT, APPL TO COOK

Related Topics

Overview (DESCRIPTIVES command)
Example (DESCRIPTIVES command)
VARIABLES Subcommand (DESCRIPTIVES command)
Z Scores (DESCRIPTIVES command)
SAVE Subcommand (DESCRIPTIVES command)
STATISTICS Subcommand (DESCRIPTIVES command)
SORT Subcommand (DESCRIPTIVES command)
MISSING Subcommand (DESCRIPTIVES command)


Overview (DESCRIPTIVES command)

DESCRIPTIVES computes univariate statistics--including the mean, standard deviation, minimum, and maximum--for numeric variables. Because it does not sort values into a frequency table, DESCRIPTIVES is an efficient means of computing descriptive statistics for continuous variables. Other procedures that display descriptive statistics include FREQUENCIES, MEANS, and EXAMINE.

Options Collapse Hide details

Options

Z Scores. You can create new variables that contain z scores (standardized deviation scores from the mean) and add them to the active dataset by specifying z-score names on the VARIABLES subcommand or by using the SAVE subcommand.

Statistical Display. Optional statistics available with the STATISTICS subcommand include the standard error of the mean, variance, kurtosis, skewness, range, and sum. DESCRIPTIVES does not compute the median or mode (see FREQUENCIES or EXAMINE).

Display Order. You can list variables in ascending or descending alphabetical order or by the numerical value of any of the available statistics using the SORT subcommand.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is the VARIABLES subcommand with a list of variables. All cases with valid values for a variable are included in the calculation of statistics for that variable. Statistics include the mean, standard deviation, minimum, maximum, and number of cases with valid values.

Subcommand Order Collapse Hide details

Subcommand Order

• Subcommands can be used in any order.

Operations Collapse Hide details

Operations

• If a string variable is specified on the variable list, no statistics are displayed for that variable.

• If there is insufficient memory available to calculate statistics for all variables requested, DESCRIPTIVES truncates the variable list.

Related Topics

DESCRIPTIVES
Example (DESCRIPTIVES command)
VARIABLES Subcommand (DESCRIPTIVES command)
Z Scores (DESCRIPTIVES command)
SAVE Subcommand (DESCRIPTIVES command)
STATISTICS Subcommand (DESCRIPTIVES command)
SORT Subcommand (DESCRIPTIVES command)
MISSING Subcommand (DESCRIPTIVES command)


Example (DESCRIPTIVES command)

DESCRIPTIVES
  VARIABLES=longmon tollmon equipmon cardmon wiremon
  /STATISTICS=MEAN STDDEV MIN MAX .

• The procedure analyzes the variables longmon, tollmon, equipmon, cardmon, and wiremon.

• The STATISTICS subcommand requests the mean, standard deviation, minimum, and maximum.

For discussion of output from this syntax and to place the example in context, see Using Descriptives to Study Quantitative Data .

Related Topics

DESCRIPTIVES
Overview (DESCRIPTIVES command)
VARIABLES Subcommand (DESCRIPTIVES command)
Z Scores (DESCRIPTIVES command)
SAVE Subcommand (DESCRIPTIVES command)
STATISTICS Subcommand (DESCRIPTIVES command)
SORT Subcommand (DESCRIPTIVES command)
MISSING Subcommand (DESCRIPTIVES command)


VARIABLES Subcommand (DESCRIPTIVES command)

DESCRIPTIVES (command),DESCRIPTIVES (command),DESCRIPTIVES (command)
VARIABLES subcommand,VARIABLES subcommand,VARIABLES subcommand
VARIABLES (subcommand),VARIABLES (subcommand),VARIABLES (subcommand)
DESCRIPTIVES command,DESCRIPTIVES command,DESCRIPTIVES command

VARIABLES names the variables for which you want to compute statistics.

• The keyword ALL can be used to refer to all user-defined variables in the active dataset.

• Only one variable list can be specified.

Related Topics

DESCRIPTIVES
Overview (DESCRIPTIVES command)
Example (DESCRIPTIVES command)
Z Scores (DESCRIPTIVES command)
SAVE Subcommand (DESCRIPTIVES command)
STATISTICS Subcommand (DESCRIPTIVES command)
SORT Subcommand (DESCRIPTIVES command)
MISSING Subcommand (DESCRIPTIVES command)


Z Scores (DESCRIPTIVES command)

DESCRIPTIVES (command),DESCRIPTIVES (command),DESCRIPTIVES (command)
Z scores,Z scores,Z scores
z scores,z scores,z scores
DESCRIPTIVES command,DESCRIPTIVES command,DESCRIPTIVES command

The z-score transformation standardizes variables to the same scale, producing new variables with a mean of 0 and a standard deviation of 1. These variables are added to the active dataset.

• To obtain z scores for all specified variables, use the SAVE subcommand.

• To obtain z scores for a subset of variables, name the new variable in parentheses following the source variable on the VARIABLES subcommand and do not use the SAVE subcommand.

• Specify new names individually; a list in parentheses is not recognized.

• The new variable name can be any acceptable variable name that is not already part of the active dataset. For information on variable naming rules, see “Variable Names” on p. 36.

Example

DESCRIPTIVES VARIABLES=NTCSAL NTCPUR (PURCHZ) NTCPRI (PRICEZ).

• DESCRIPTIVES creates z-score variables named PURCHZ and PRICEZ for NTCPUR and NTCPRI, respectively. No z-score variable is created for NTCSAL.

Related Topics

DESCRIPTIVES
Overview (DESCRIPTIVES command)
Example (DESCRIPTIVES command)
VARIABLES Subcommand (DESCRIPTIVES command)
SAVE Subcommand (DESCRIPTIVES command)
STATISTICS Subcommand (DESCRIPTIVES command)
SORT Subcommand (DESCRIPTIVES command)
MISSING Subcommand (DESCRIPTIVES command)


SAVE Subcommand (DESCRIPTIVES command)

DESCRIPTIVES (command),DESCRIPTIVES (command),DESCRIPTIVES (command)
SAVE subcommand,SAVE subcommand,SAVE subcommand
SAVE (subcommand),SAVE (subcommand),SAVE (subcommand)
DESCRIPTIVES command,DESCRIPTIVES command,DESCRIPTIVES command
z scores,z scores,z scores
saving as variables,saving as variables,saving as variables

SAVE creates a z-score variable for each variable specified on the VARIABLES subcommand. The new variables are added to the active dataset.

• When DESCRIPTIVES creates new z-score variables, it displays the source variable names, the new variable names, and their labels in the Notes table.

• DESCRIPTIVES automatically supplies variable names for the new variables. The new variable name is created by prefixing the letter Z to the source variable name. For example, ZNTCPRI is the z-score variable for NTCPRI.

• If the default naming convention duplicates variable names in the active dataset, DESCRIPTIVES uses an alternative naming convention: first ZSC001 through ZSC099, then STDZ01 through STDZ09, then ZZZZ01 through ZZZZ09, and then ZQZQ01 through ZQZQ09.

• Variable labels are created by prefixing ZSCORE to the source variable label. If the alternative naming convention is used, DESCRIPTIVES prefixes ZSCORE(varname) to the label. If the source variable does not have a label, DESCRIPTIVES uses ZSCORE(varname) for the label.

• If you specify new names on the VARIABLES subcommand and use the SAVE subcommand, DESCRIPTIVES creates one new variable for each variable on the VARIABLES subcommand, using default names for variables not assigned names on VARIABLES.

• If at any time you want to change any of the variable names, whether those DESCRIPTIVES created or those you previously assigned, you can do so with the RENAME VARIABLES command.

Example

DESCRIPTIVES VARIABLES=ALL
  /SAVE.

• SAVE creates a z-score variable for all variables in the active dataset. All z-score variables receive the default name.

Example

DESCRIPTIVES VARIABLES=NTCSAL NTCPUR (PURCHZ) NTCPRI (PRICEZ)
  /SAVE.

• DESCRIPTIVES creates three z-score variables named ZNTCSAL (the default name), PURCHZ, and PRICEZ.

Related Topics

DESCRIPTIVES
Overview (DESCRIPTIVES command)
Example (DESCRIPTIVES command)
VARIABLES Subcommand (DESCRIPTIVES command)
Z Scores (DESCRIPTIVES command)
STATISTICS Subcommand (DESCRIPTIVES command)
SORT Subcommand (DESCRIPTIVES command)
MISSING Subcommand (DESCRIPTIVES command)


STATISTICS Subcommand (DESCRIPTIVES command)

STATISTICS (subcommand),STATISTICS (subcommand),STATISTICS (subcommand)
DESCRIPTIVES command,DESCRIPTIVES command,DESCRIPTIVES command
DESCRIPTIVES (command),DESCRIPTIVES (command),DESCRIPTIVES (command)
STATISTICS subcommand,STATISTICS subcommand,STATISTICS subcommand

By default, DESCRIPTIVES displays the mean, standard deviation, minimum, and maximum. Use the STATISTICS subcommand to request other statistics.

• When you use STATISTICS, DESCRIPTIVES displays only those statistics you request.

• The keyword ALL obtains all statistics.

• You can specify the keyword DEFAULT to obtain the default statistics without having to name MEAN, STDDEV, MIN, and MAX.

• The median and mode, which are available in FREQUENCIES and EXAMINE, are not available in DESCRIPTIVES. These statistics require that values be sorted, and DESCRIPTIVES does not sort values (the SORT subcommand does not sort values, it simply lists variables in the order you request).

• If you request a statistic that is not available, DESCRIPTIVES issues an error message and the command is not executed.

MEAN (keyword),MEAN (keyword),MEAN (keyword)
DESCRIPTIVES command,DESCRIPTIVES command,DESCRIPTIVES command
SEMEAN (keyword),SEMEAN (keyword),SEMEAN (keyword)
DESCRIPTIVES command,DESCRIPTIVES command,DESCRIPTIVES command
standard error of the mean,standard error of the mean,standard error of the mean
DESCRIPTIVES command,DESCRIPTIVES command,DESCRIPTIVES command
STDDEV (keyword),STDDEV (keyword),STDDEV (keyword)
DESCRIPTIVES command,DESCRIPTIVES command,DESCRIPTIVES command
standard deviation,standard deviation,standard deviation
DESCRIPTIVES command,DESCRIPTIVES command,DESCRIPTIVES command
VARIANCE (keyword),VARIANCE (keyword),VARIANCE (keyword)
DESCRIPTIVES command,DESCRIPTIVES command,DESCRIPTIVES command
KURTOSIS (keyword),KURTOSIS (keyword),KURTOSIS (keyword)
DESCRIPTIVES command,DESCRIPTIVES command,DESCRIPTIVES command
SKEWNESS (keyword),SKEWNESS (keyword),SKEWNESS (keyword)
DESCRIPTIVES command,DESCRIPTIVES command,DESCRIPTIVES command
RANGE (keyword),RANGE (keyword),RANGE (keyword)
DESCRIPTIVES command,DESCRIPTIVES command,DESCRIPTIVES command
MIN (keyword),MIN (keyword),MIN (keyword)
DESCRIPTIVES command,DESCRIPTIVES command,DESCRIPTIVES command
MAX (keyword),MAX (keyword),MAX (keyword)
DESCRIPTIVES command,DESCRIPTIVES command,DESCRIPTIVES command
SUM (keyword),SUM (keyword),SUM (keyword)
DESCRIPTIVES command,DESCRIPTIVES command,DESCRIPTIVES command
DEFAULT (keyword),DEFAULT (keyword),DEFAULT (keyword)
DESCRIPTIVES command,DESCRIPTIVES command,DESCRIPTIVES command
ALL (keyword),ALL (keyword),ALL (keyword)
DESCRIPTIVES command,DESCRIPTIVES command,DESCRIPTIVES command
MEAN | Mean.
SEMEAN | Standard error of the mean.
STDDEV | Standard deviation.
VARIANCE | Variance.
KURTOSIS | Kurtosis and standard error of kurtosis.
SKEWNESS | Skewness and standard error of skewness.
RANGE | Range.
MIN | Minimum observed value.
MAX | Maximum observed value.
SUM | Sum.
DEFAULT | Mean, standard deviation, minimum, and maximum. These are the default statistics.
ALL | All statistics available in DESCRIPTIVES.

Related Topics

DESCRIPTIVES
Overview (DESCRIPTIVES command)
Example (DESCRIPTIVES command)
VARIABLES Subcommand (DESCRIPTIVES command)
Z Scores (DESCRIPTIVES command)
SAVE Subcommand (DESCRIPTIVES command)
SORT Subcommand (DESCRIPTIVES command)
MISSING Subcommand (DESCRIPTIVES command)


SORT Subcommand (DESCRIPTIVES command)

SORT (subcommand),SORT (subcommand),SORT (subcommand)
DESCRIPTIVES command,DESCRIPTIVES command,DESCRIPTIVES command
DESCRIPTIVES (command),DESCRIPTIVES (command),DESCRIPTIVES (command)
SORT subcommand,SORT subcommand,SORT subcommand

By default, DESCRIPTIVES lists variables in the order in which they are specified on VARIABLES. Use SORT to list variables in ascending or descending alphabetical order of variable name or in ascending or descending order of numeric value of any of the statistics.

• If you specify SORT without any keywords, variables are sorted in ascending order of the mean.

• SORT can sort variables by the value of any of the statistics available with DESCRIPTIVES, but only those statistics specified on STATISTICS (or the default statistics) are displayed.

Only one of the following keywords can be specified on SORT:

MEAN (keyword),MEAN (keyword),MEAN (keyword)
DESCRIPTIVES command,DESCRIPTIVES command,DESCRIPTIVES command
SEMEAN (keyword),SEMEAN (keyword),SEMEAN (keyword)
DESCRIPTIVES command,DESCRIPTIVES command,DESCRIPTIVES command
STDDEV (keyword),STDDEV (keyword),STDDEV (keyword)
DESCRIPTIVES command,DESCRIPTIVES command,DESCRIPTIVES command
VARIANCE (keyword),VARIANCE (keyword),VARIANCE (keyword)
DESCRIPTIVES command,DESCRIPTIVES command,DESCRIPTIVES command
KURTOSIS (keyword),KURTOSIS (keyword),KURTOSIS (keyword)
DESCRIPTIVES command,DESCRIPTIVES command,DESCRIPTIVES command
SKEWNESS (keyword),SKEWNESS (keyword),SKEWNESS (keyword)
DESCRIPTIVES command,DESCRIPTIVES command,DESCRIPTIVES command
RANGE (keyword),RANGE (keyword),RANGE (keyword)
DESCRIPTIVES command,DESCRIPTIVES command,DESCRIPTIVES command
MIN (keyword),MIN (keyword),MIN (keyword)
DESCRIPTIVES command,DESCRIPTIVES command,DESCRIPTIVES command
MAX (keyword),MAX (keyword),MAX (keyword)
DESCRIPTIVES command,DESCRIPTIVES command,DESCRIPTIVES command
SUM (keyword),SUM (keyword),SUM (keyword)
DESCRIPTIVES command,DESCRIPTIVES command,DESCRIPTIVES command
NAME (keyword),NAME (keyword),NAME (keyword)
DESCRIPTIVES command,DESCRIPTIVES command,DESCRIPTIVES command
MEAN | Sort by mean. This is the default when SORT is specified without a keyword.
SEMEAN | Sort by standard error of the mean.
STDDEV | Sort by standard deviation.
VARIANCE | Sort by variance.
KURTOSIS | Sort by kurtosis.
SKEWNESS | Sort by skewness.
RANGE | Sort by range.
MIN | Sort by minimum observed value.
MAX | Sort by maximum observed value.
SUM | Sort by sum.
NAME | Sort by variable name.

Sort order can be specified in parentheses following the specified keyword:

A (keyword),A (keyword),A (keyword)
DESCRIPTIVES command,DESCRIPTIVES command,DESCRIPTIVES command
D (keyword),D (keyword),D (keyword)
DESCRIPTIVES command,DESCRIPTIVES command,DESCRIPTIVES command
A | Sort in ascending order. This is the default when SORT is specified without keywords.
D | Sort in descending order.

Example

DESCRIPTIVES VARIABLES=A B C
 /STATISTICS=DEFAULT RANGE
 /SORT=RANGE (D).

• DESCRIPTIVES sorts variables A, B, and C in descending order of range and displays the mean, standard deviation, minimum and maximum values, range, and the number of valid cases.

Related Topics

DESCRIPTIVES
Overview (DESCRIPTIVES command)
Example (DESCRIPTIVES command)
VARIABLES Subcommand (DESCRIPTIVES command)
Z Scores (DESCRIPTIVES command)
SAVE Subcommand (DESCRIPTIVES command)
STATISTICS Subcommand (DESCRIPTIVES command)
MISSING Subcommand (DESCRIPTIVES command)


MISSING Subcommand (DESCRIPTIVES command)

DESCRIPTIVES (command),DESCRIPTIVES (command),DESCRIPTIVES (command)
MISSING subcommand,MISSING subcommand,MISSING subcommand
MISSING (subcommand),MISSING (subcommand),MISSING (subcommand)
DESCRIPTIVES command,DESCRIPTIVES command,DESCRIPTIVES command

MISSING controls missing values.

• By default, DESCRIPTIVES deletes cases with missing values on a variable-by-variable basis. A case with a missing value for a variable will not be included in the summary statistics for that variable, but the case will be included for variables where it is not missing.

• The VARIABLE and LISTWISE keywords are alternatives; however, each can be specified with INCLUDE.

• When either the keyword VARIABLE or the default missing-value treatment is used, DESCRIPTIVES reports the number of valid cases for each variable. It always displays the number of cases that would be available if listwise deletion of missing values had been selected.

VARIABLE (keyword),VARIABLE (keyword),VARIABLE (keyword)
DESCRIPTIVES command,DESCRIPTIVES command,DESCRIPTIVES command
LISTWISE (keyword),LISTWISE (keyword),LISTWISE (keyword)
DESCRIPTIVES command,DESCRIPTIVES command,DESCRIPTIVES command
INCLUDE (keyword),INCLUDE (keyword),INCLUDE (keyword)
DESCRIPTIVES command,DESCRIPTIVES command,DESCRIPTIVES command
VARIABLE | Exclude cases with missing values on a variable-by-variable basis. This is the default.
LISTWISE | Exclude cases with missing values listwise. Cases with missing values for any variable named are excluded from the computation of statistics for all variables.
INCLUDE | Include user-missing values.

Related Topics

DESCRIPTIVES
Overview (DESCRIPTIVES command)
Example (DESCRIPTIVES command)
VARIABLES Subcommand (DESCRIPTIVES command)
Z Scores (DESCRIPTIVES command)
SAVE Subcommand (DESCRIPTIVES command)
STATISTICS Subcommand (DESCRIPTIVES command)
SORT Subcommand (DESCRIPTIVES command)


DETECTANOMALY

DETECTANOMALY (command),DETECTANOMALY (command),DETECTANOMALY (command)
DETECTANOMALY (command),DETECTANOMALY (command),DETECTANOMALY (command)
syntax chart,syntax chart,syntax chart
release history,release history,release history
Anomaly Detection,Anomaly Detection,Anomaly Detection
command syntax,command syntax,command syntax

DETECTANOMALY is available in the Data Preparation option.

DETECTANOMALY

[/VARIABLES [CATEGORICAL=varlist]
            [SCALE=varlist]
            [ID=variable]
            [EXCEPT=varlist]]

[/HANDLEMISSING [APPLY={NO**}]
                       {YES }
                [CREATEMISPROPVAR={NO**}]]
                                  {YES }

[/CRITERIA [MINNUMPEERS={1**    }]
                        {integer}
           [MAXNUMPEERS={15**   }]
                        {integer}
           [MLWEIGHT={6**   }]
                     {number}
           [NUMREASONS={1**    }]
                       {integer}
           [PCTANOMALOUSCASES={5**   }]
                              {number}
           [NUMANOMALOUSCASES={integer}]
           [ANOMALYCUTPOINT={2**   }
                            {number}
                            {NONE  }]]

[/SAVE [ANOMALY[(varname)]]
       [PEERID[(varname)]]
       [PEERSIZE[(varname)]]
       [PEERPCTSIZE[(varname)]]
       [REASONVAR[(rootname)]]
       [REASONMEASURE[(rootname)]]
       [REASONVALUE[(rootname)]]
       [REASONNORM[(rootname)]]]

[/OUTFILE [MODEL=filespec]]

[/PRINT [CPS]  [ANOMALYLIST**]  [NORMS]
        [ANOMALYSUMMARY]  [REASONSUMMARY]
        [NONE]]

** Default if the subcommand or keyword is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See DETECTANOMALY Algorithms for computational details for this procedure.

Syntax for the DETECTANOMALY command can be generated from the Identify Unusual Cases dialog.

Release History Collapse Hide details

Release History

Release 14.0

• Command introduced.

Example

DETECTANOMALY.

Related Topics

Overview (DETECTANOMALY command)
Examples (DETECTANOMALY command)
VARIABLES Subcommand (DETECTANOMALY command)
HANDLEMISSING Subcommand (DETECTANOMALY command)
CRITERIA Subcommand (DETECTANOMALY command)
SAVE Subcommand (DETECTANOMALY command)
OUTFILE Subcommand (DETECTANOMALY command)
PRINT Subcommand (DETECTANOMALY command)


Overview (DETECTANOMALY command)

The Anomaly Detection procedure searches for unusual cases based on deviations from the norms of their cluster groups. The procedure is designed to quickly detect unusual cases for data-auditing purposes in the exploratory data analysis step, prior to any inferential data analysis. This algorithm is designed for generic anomaly detection; that is, the definition of an anomalous case is not specific to any particular application, such as detection of unusual payment patterns in the healthcare industry or detection of money laundering in the finance industry, in which the definition of an anomaly can be well-defined.

Options Collapse Hide details

Options

Methods. The DETECTANOMALY procedure clusters cases into peer groups based on the similarities of a set of input variables. An anomaly index is assigned to each case to reflect the unusualness of a case with respect to its peer group. All cases are sorted by the values of the anomaly index, and the top portion of the cases is identified as the set of anomalies. For each variable, an impact measure is assigned to each case that reflects the contribution of the variable to the deviation of the case from its peer group. For each case, the variables are sorted by the values of the variable impact measure, and the top portion of variables is identified as the set of reasons why the case is anomalous.

Data File. The DETECTANOMALY procedure assumes that the input data is a flat file in which each row represents a distinct case and each column represents a distinct variable. Moreover, it is assumed that all input variables are non-constant and that no case has missing values for all of the input variables.

Missing Values. The DETECTANOMALY procedure allows missing values. By default, missing values of continuous variables are substituted by their corresponding grand means, and missing categories of categorical variables are grouped and treated as a valid category. Moreover, an additional variable called the Missing Proportion Variable, which represents the proportion of missing variables in each case, is created. The processed variables are used to detect the anomalies in the data. You can turn off either of the options. If the first is turned off, cases with missing values are excluded from the analysis. In this situation, the second option is turned off automatically.

ID Variable. A variable that is the unique identifier of the cases in the data can optionally be specified in the ID keyword. If this keyword is not specified, the case sequence number of the active dataset is assumed to be the ID.

Weights. The DETECTANOMALY procedure ignores specification on the WEIGHT command.

Output. The DETECTANOMALY procedure displays an anomaly list in pivot table output, or offers an option for suppressing it. The procedure can also save the anomaly information to the active dataset as additional variables. Anomaly information can be grouped into three sets of variables: anomaly, peer, and reason. The anomaly set consists of the anomaly index of each case. The peer set consists of the peer group ID of each case, the size, and the percentage size of the peer group. The reason set consists of a number of reasons. Each reason consists of information such as the variable impact, the variable name for this reason, the value of the variable, and the corresponding norm value of the peer group.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is the DETECTANOMALY command. By default, all variables in the active dataset are used in the procedure, with the dictionary setting of each variable in the dataset determining its measurement level.

Syntax Rules Collapse Hide details

Syntax Rules

• All subcommands are optional.

• Only a single instance of each subcommand is allowed.

• An error occurs if an attribute or keyword is specified more than once within a subcommand.

• Parentheses, slashes, and equals signs shown in the syntax chart are required.

• Subcommand names and keywords must be spelled in full.

• Empty subcommands are not honored.

Operations Collapse Hide details

Operations

The DETECTANOMALY procedure begins by applying the missing value handling option and the create missing proportion variable option to the data.

Then the procedure groups cases into their peer groups based on the similarities of the processed variables. An anomaly index is assigned to each case to measure the overall deviation of the case from its peer group. All cases are sorted by the values of the anomaly index, and the top portion of the cases is identified as the anomaly list.

For each anomalous case, the variables are sorted by their corresponding variable impact values. The top variables, their values, and the corresponding norm values are presented as the reasons why a case is identified as an anomaly.

By default, the anomaly list is presented in a pivot table. Optionally, the anomaly information can be added to the active dataset as additional variable. The anomaly detection model may be written to an XML model file.

Limitations Collapse Hide details

Limitations

WEIGHT and SPLIT FILE settings are ignored with a warning by the DETECTANOMALY procedure.

Related Topics

DETECTANOMALY
Examples (DETECTANOMALY command)
VARIABLES Subcommand (DETECTANOMALY command)
HANDLEMISSING Subcommand (DETECTANOMALY command)
CRITERIA Subcommand (DETECTANOMALY command)
SAVE Subcommand (DETECTANOMALY command)
OUTFILE Subcommand (DETECTANOMALY command)
PRINT Subcommand (DETECTANOMALY command)


Examples (DETECTANOMALY command)

DETECTANOMALY
  /VARIABLES CATEGORICAL=A B C SCALE=D E
  /SAVE ANOMALY REASON.

• DETECTANOMALY treats variables A, B, and C as categorical variables and D and F as continuous variables.

• All of the processed variables are then used in the analysis to generate the anomaly list. Since no ID option is specified, the case number is used as the case identity variable. The size of the list is the number of cases with an anomaly index of at least 2.0 and is not more than 5% of the size of the working file. The anomaly list consists of the ID variable, the anomaly index, the peer group ID and size, and the reason. By default, there is one reason for each anomaly. Each reason consists of information such as the variable impact measure, the variable name for this reason, the value of the variable, and the value of the corresponding peer group. The anomaly list is presented in the pivot table output.

• Since the keywords ANOMALY and REASON are specified in the SAVE subcommand, the additional variables for the anomaly index and the anomaly reason are added to the active dataset.

Specifying a Case ID Variable and Excepted Variables

DETECTANOMALY
  /VARIABLES ID=CaseID EXCEPT=GeoID DemoID AddressID.

• DETECTANOMALY uses all variables in the active dataset in the analysis, except the variables GeoID, DemoID, and AddressID, which are excluded. Moreover, it treats the variable CaseID as the ID variable in the procedure. The processed variables are used in the analysis to generate the anomaly list.

Related Topics

DETECTANOMALY
Overview (DETECTANOMALY command)
VARIABLES Subcommand (DETECTANOMALY command)
HANDLEMISSING Subcommand (DETECTANOMALY command)
CRITERIA Subcommand (DETECTANOMALY command)
SAVE Subcommand (DETECTANOMALY command)
OUTFILE Subcommand (DETECTANOMALY command)
PRINT Subcommand (DETECTANOMALY command)


VARIABLES Subcommand (DETECTANOMALY command)

DETECTANOMALY (command),DETECTANOMALY (command),DETECTANOMALY (command)
VARIABLES subcommand,VARIABLES subcommand,VARIABLES subcommand
VARIABLES (subcommand),VARIABLES (subcommand),VARIABLES (subcommand)
DETECTANOMALY command,DETECTANOMALY command,DETECTANOMALY command

The VARIABLES subcommand specifies the variables to be used in the procedure. If the CATEGORICAL option or the SCALE option are specified, then variables that are listed in these options are used in the analysis. If neither the CATEGORICAL option nor the SCALE option is specified, then all variables in the active dataset are used, except the variable specified in the ID option and those in the EXCEPT option, if any. In the latter situation, the dictionary setting of each variable determines its measurement level. The procedure treats ordinal and nominal variables equivalently as categorical.

CATEGORICAL (keyword),CATEGORICAL (keyword),CATEGORICAL (keyword)
DETECTANOMALY command,DETECTANOMALY command,DETECTANOMALY command
SCALE (keyword),SCALE (keyword),SCALE (keyword)
DETECTANOMALY command,DETECTANOMALY command,DETECTANOMALY command
ID (keyword),ID (keyword),ID (keyword)
DETECTANOMALY command,DETECTANOMALY command,DETECTANOMALY command
EXCEPT (keyword),EXCEPT (keyword),EXCEPT (keyword)
DETECTANOMALY command,DETECTANOMALY command,DETECTANOMALY command
CATEGORICAL=varlist | List of categorical variables. If this option is specified, at least one variable must be listed. Variables in the list can be numeric or string. They are treated as categorical variables and are used in the analysis. If duplicate variables are specified in the list, the duplicates are ignored. After the EXCEPT option (if specified) is applied, if there are variables also specified in either the continuous list or as an ID variable, an error is issued. TO and ALL keywords may be used.
SCALE=varlist | List of continuous variables. If this option is specified, at least one variable must be listed. Variables in the list must be numeric and are used in the analysis. If duplicate variables are specified in the list, the duplicates are ignored. After the EXCEPT option (if specified) is applied, if there are variables also specified in either the categorical list or as an ID variable, an error is issued. TO and ALL keywords may be used.
ID=variable | Case ID variable. If this option is specified, one variable must be listed. The variable can be numeric or string. It is used as a unique identifier for the cases in the data file and is not used in the analysis. If this option is not specified, the case number of the active dataset is used as the identifier variable. If the identifier variable is specified in either the categorical list or continuous list, an error is issued.
EXCEPT=varlist | List of variables that are excluded from the analysis. If this option is specified, at least one variable must be listed. Variables in the list are not used in the analysis, even if they are specified in the continuous or categorical lists. This option ignores duplicate variables and variables that are not specified on the continuous or categorical list. Specifying the ALL keyword causes an error. The TO keyword may be used.
 | This option can be useful if the categorical list or continuous list contains a large number of variables but there are a few variables that should be excluded.

Related Topics

DETECTANOMALY
Overview (DETECTANOMALY command)
Examples (DETECTANOMALY command)
HANDLEMISSING Subcommand (DETECTANOMALY command)
CRITERIA Subcommand (DETECTANOMALY command)
SAVE Subcommand (DETECTANOMALY command)
OUTFILE Subcommand (DETECTANOMALY command)
PRINT Subcommand (DETECTANOMALY command)


HANDLEMISSING Subcommand (DETECTANOMALY command)

DETECTANOMALY (command),DETECTANOMALY (command),DETECTANOMALY (command)
HANDLEMISSING subcommand,HANDLEMISSING subcommand,HANDLEMISSING subcommand
HANDLEMISSING (subcommand),HANDLEMISSING (subcommand),HANDLEMISSING (subcommand)
DETECTANOMALY command,DETECTANOMALY command,DETECTANOMALY command

The HANDLEMISSING subcommand specifies the methods of handling missing values in this procedure.

APPLY (keyword),APPLY (keyword),APPLY (keyword)
DETECTANOMALY command,DETECTANOMALY command,DETECTANOMALY command
CREATEMISPROPVAR (keyword),CREATEMISPROPVAR (keyword),CREATEMISPROPVAR (keyword)
DETECTANOMALY command,DETECTANOMALY command,DETECTANOMALY command
APPLY=optionvalue | Apply missing value handling. Valid option values are YES or NO. If YES, the missing values of continuous variables are substituted by their corresponding grand means, and missing categories of categorical variables are grouped and treated as a valid category. The processed variables are used in the analysis. If NO, cases with missing values are excluded from the analysis. The default value is NO.
CREATEMISPROPVAR=optionvalue | Create an additional Missing Proportion Variable and use it in the analysis. Valid option values are YES or NO. If YES, an additional variable called the Missing Proportion Variable that represents the proportion of missing variables in each case is created, and this variable is used in the analysis. If NO, the Missing Proportion Variable is not created. The default value is NO.

Related Topics

DETECTANOMALY
Overview (DETECTANOMALY command)
Examples (DETECTANOMALY command)
VARIABLES Subcommand (DETECTANOMALY command)
CRITERIA Subcommand (DETECTANOMALY command)
SAVE Subcommand (DETECTANOMALY command)
OUTFILE Subcommand (DETECTANOMALY command)
PRINT Subcommand (DETECTANOMALY command)


CRITERIA Subcommand (DETECTANOMALY command)

DETECTANOMALY (command),DETECTANOMALY (command),DETECTANOMALY (command)
CRITERIA subcommand,CRITERIA subcommand,CRITERIA subcommand
CRITERIA (subcommand),CRITERIA (subcommand),CRITERIA (subcommand)
DETECTANOMALY command,DETECTANOMALY command,DETECTANOMALY command

The CRITERIA subcommand specifies settings for the DETECTANOMALY procedure.

MINNUMPEERS (keyword),MINNUMPEERS (keyword),MINNUMPEERS (keyword)
DETECTANOMALY command,DETECTANOMALY command,DETECTANOMALY command
MAXNUMPEERS (keyword),MAXNUMPEERS (keyword),MAXNUMPEERS (keyword)
DETECTANOMALY command,DETECTANOMALY command,DETECTANOMALY command
MLWEIGHT (keyword),MLWEIGHT (keyword),MLWEIGHT (keyword)
DETECTANOMALY command,DETECTANOMALY command,DETECTANOMALY command
NUMREASONS (keyword),NUMREASONS (keyword),NUMREASONS (keyword)
DETECTANOMALY command,DETECTANOMALY command,DETECTANOMALY command
PCTANOMALOUSCASES (keyword),PCTANOMALOUSCASES (keyword),PCTANOMALOUSCASES (keyword)
DETECTANOMALY command,DETECTANOMALY command,DETECTANOMALY command
NUMANOMALOUSCASES (keyword),NUMANOMALOUSCASES (keyword),NUMANOMALOUSCASES (keyword)
DETECTANOMALY command,DETECTANOMALY command,DETECTANOMALY command
ANOMALYCUTPOINT (keyword),ANOMALYCUTPOINT (keyword),ANOMALYCUTPOINT (keyword)
DETECTANOMALY command,DETECTANOMALY command,DETECTANOMALY command
MINNUMPEERS=integer | Minimum number of peer groups. The procedure will search for the best number of peer groups between the specified value and the value in the MAXNUMPEERS keyword. The specified value must be a positive integer less than or equal to the value in the MAXNUMPEERS keyword. When the specified value is equal to the value in the MAXNUMPEERS keyword, the procedure assumes a fixed number of peer groups. The default value is 1.
 | Note: Depending on the amount of variation in your data, there may be situations in which the number of peer groups that the data can support is less than the number specified in the MINNUMPEERS option. In such a situation, the procedure may produce a smaller number of peer groups.
MAXNUMPEERS=integer | Maxim number of peer groups. The procedure will search for the best number of peer groups between the value in the MINNUMPEERS keyword and the specified value. The specified value must be a positive integer greater than or equal to the value in the MINNUMPEERS keyword. When the specified value is equal to the value in the MINNUMPEERS keyword, the procedure assumes a fixed number of peer groups. The default value is 15.
MLWEIGHT=number | An adjustment weight on the measurement level. This parameter is used to balance the influences between continuous and categorical variables during the calculation of the indices. A large value increases the influence of a continuous variable. Specify a positive number. The default value is 6.
NUMREASONS=integer | Number of reasons in the anomaly list. A reason consists of information such as the variable impact measure, the variable name for this reason, the value of the variable, and the value of the corresponding peer group. Specify a non-negative integer less than or equal to the number of processed variables used in the analysis. The specified option value will be adjusted downward to the maximum number of variables used in the analysis if it is set larger than the number of variables. The default value is 1.
PCTANOMALOUSCASES=number | Percentage of cases considered as anomalies and included in the anomaly list. Specify a non-negative number less than or equal to 100. The default value is 5.
NUMANOMALOUSCASES=integer | Number of cases considered as anomalies and included in the anomaly list. Specify a non-negative integer less than or equal to the total number of cases in the active dataset and used in the analysis. If this option is specified, an option value must be listed. The specified option value will be adjusted downward to the maximum available if it is set larger than the number of cases used in the analysis. This option, if specified, overrides the PCTANOMALOUSCASES option.
ANOMALYCUTPOINT=number | Cut point of the anomaly index to determine whether a case is considered as an anomaly. Specify a non-negative number. A case is considered anomalous if its anomaly index value is larger than or equal to the specified cut point. This option can be used together with the PCTANOMALOUSCASES and NUMANOMALOUSCASES options. For example, if NUMANOMALOUSCASES=50 and ANOMALYCUTPOINT=2 are specified, the anomaly list will consist of at most 50 cases each with an anomaly index value larger than or equal to 2. The default value is 2. If NONE is specified, the option is suppressed and no cut point is set.

Related Topics

DETECTANOMALY
Overview (DETECTANOMALY command)
Examples (DETECTANOMALY command)
VARIABLES Subcommand (DETECTANOMALY command)
HANDLEMISSING Subcommand (DETECTANOMALY command)
SAVE Subcommand (DETECTANOMALY command)
OUTFILE Subcommand (DETECTANOMALY command)
PRINT Subcommand (DETECTANOMALY command)


SAVE Subcommand (DETECTANOMALY command)

DETECTANOMALY (command),DETECTANOMALY (command),DETECTANOMALY (command)
SAVE subcommand,SAVE subcommand,SAVE subcommand
SAVE (subcommand),SAVE (subcommand),SAVE (subcommand)
DETECTANOMALY command,DETECTANOMALY command,DETECTANOMALY command

The SAVE subcommand specifies the additional variables to save to the active dataset.

• One or more keywords should be specified, each followed by an optional variable name or rootname in parentheses.

• The variable name or the rootname, if specified, must be a valid variable name.

• If no variable name or rootname is specified, a default varname or rootname is used. If the default varname or rootname is used and it conflicts with that of an existing variable, a suffix is added to make the name unique.

• The values of the additional variables are assigned to all cases included in the analysis, even if the cases are not in the anomaly list.

• This subcommand is not affected by the specifications on the PCTANOMALOUSCASES, NUMANOMALOUSCASES, or ANOMALYCUTPOINT keywords in the CRITERIA subcommand.

ANOMALY (keyword),ANOMALY (keyword),ANOMALY (keyword)
DETECTANOMALY command,DETECTANOMALY command,DETECTANOMALY command
PEERID (keyword),PEERID (keyword),PEERID (keyword)
DETECTANOMALY command,DETECTANOMALY command,DETECTANOMALY command
PEERSIZE (keyword),PEERSIZE (keyword),PEERSIZE (keyword)
DETECTANOMALY command,DETECTANOMALY command,DETECTANOMALY command
PEERPCTSIZE (keyword),PEERPCTSIZE (keyword),PEERPCTSIZE (keyword)
DETECTANOMALY command,DETECTANOMALY command,DETECTANOMALY command
REASONVAR (keyword),REASONVAR (keyword),REASONVAR (keyword)
DETECTANOMALY command,DETECTANOMALY command,DETECTANOMALY command
REASONMEASURE (keyword),REASONMEASURE (keyword),REASONMEASURE (keyword)
DETECTANOMALY command,DETECTANOMALY command,DETECTANOMALY command
REASONVALUE (keyword),REASONVALUE (keyword),REASONVALUE (keyword)
DETECTANOMALY command,DETECTANOMALY command,DETECTANOMALY command
REASONNORM (keyword),REASONNORM (keyword),REASONNORM (keyword)
DETECTANOMALY command,DETECTANOMALY command,DETECTANOMALY command
ANOMALY(varname) | The anomaly index. If an optional varname is not specified, the default varname is AnomalyIndex, which is the anomaly index. If an optional varname is specified, the specified varname is used to replace the default varname. For example, if ANOMALY(MyAnomaly) is specified, the variable name will be MyAnomaly.
PEERID(varname) | Peer group ID. If an optional varname is not specified, the default varname PeerId is used. If an optional varname is specified, the specified name is used.
PEERSIZE(varname) | Peer group size. If an optional varname is not specified, the default variable name PeerSize is used. If an optional varname is specified, the specified name is used.
PEERPCTSIZE(varname) | Peer group size in percentage. If an optional varname is not specified, the default varname PeerPctSize is used. If an optional varname is specified, the specified name is used.
REASONVAR(rootname) | The variable associated with a reason. The number of REASONVAR variables created depends on the number of reasons specified on the CRITERIA subcommand NUMREASONS option. If an optional rootname is not specified, the default rootname ReasonVar is used to automatically generate one or more varnames, ReasonVar_k, where k is the kth reason. If an optional rootname is specified, the specified name is used. If NUMREASONS=0 is specified, this option is ignored and a warning is issued.
REASONMEASURE(rootname) |
 | The variable impact measure associated with a reason. The number of REASONMEASURE variables created depends on the number of reasons specified on the CRITERIA subcommand NUMREASONS option. If an optional rootname is not specified, the default rootname ReasonMeasure is used to automatically generate one or more varnames, ReasonMeasure_k, where k is the kth reason. If an optional rootname is specified, the specified name is used. If NUMREASONS=0 is specified, this option is ignored and a warning is issued.
REASONVALUE(rootname) | The variable value associated with a reason. The number of REASONVALUE variables created depends on the number of reasons specified on the CRITERIA subcommand NUMREASONS option. If an optional rootname is not specified, the default rootname ReasonValue is used to automatically generate one or more varnames, ReasonValue_k, where k is the kth reason. If an optional rootname is specified, the specified name is used. If NUMREASONS=0 is specified, this option is ignored and a warning is issued.
REASONNORM(rootname) | The norm value associated with a reason. The number of REASONNORM variables created depends on the number of reasons specified on the CRITERIA subcommand NUMREASONS option. If an optional rootname is not specified, the default rootname ReasonNorm is used to automatically generate one or more varnames, ReasonNorm_k, where k is the kth reason. If an optional rootname is specified, the specified name is used. If NUMREASONS=0 is specified, this option is ignored and a warning is issued.

Related Topics

DETECTANOMALY
Overview (DETECTANOMALY command)
Examples (DETECTANOMALY command)
VARIABLES Subcommand (DETECTANOMALY command)
HANDLEMISSING Subcommand (DETECTANOMALY command)
CRITERIA Subcommand (DETECTANOMALY command)
OUTFILE Subcommand (DETECTANOMALY command)
PRINT Subcommand (DETECTANOMALY command)


OUTFILE Subcommand (DETECTANOMALY command)

DETECTANOMALY (command),DETECTANOMALY (command),DETECTANOMALY (command)
OUTFILE subcommand,OUTFILE subcommand,OUTFILE subcommand
OUTFILE (subcommand),OUTFILE (subcommand),OUTFILE (subcommand)
DETECTANOMALY command,DETECTANOMALY command,DETECTANOMALY command

The OUTFILE subcommand directs the DETECTANOMALY procedure to write its model to the specified filename as XML.

MODEL (keyword),MODEL (keyword),MODEL (keyword)
DETECTANOMALY command,DETECTANOMALY command,DETECTANOMALY command
MODEL=filespec File specification to which the model is written.

Related Topics

DETECTANOMALY
Overview (DETECTANOMALY command)
Examples (DETECTANOMALY command)
VARIABLES Subcommand (DETECTANOMALY command)
HANDLEMISSING Subcommand (DETECTANOMALY command)
CRITERIA Subcommand (DETECTANOMALY command)
SAVE Subcommand (DETECTANOMALY command)
PRINT Subcommand (DETECTANOMALY command)


PRINT Subcommand (DETECTANOMALY command)

DETECTANOMALY (command),DETECTANOMALY (command),DETECTANOMALY (command)
PRINT subcommand,PRINT subcommand,PRINT subcommand
PRINT (subcommand),PRINT (subcommand),PRINT (subcommand)
DETECTANOMALY command,DETECTANOMALY command,DETECTANOMALY command

The PRINT subcommand controls the display of the output results.

• If the PRINT subcommand is not specified, the default output is the anomaly list. If the PRINT subcommand is specified, DETECTANOMALY displays output only for the keywords that are specified.

CPS (keyword),CPS (keyword),CPS (keyword)
DETECTANOMALY command,DETECTANOMALY command,DETECTANOMALY command
ANOMALYLIST (keyword),ANOMALYLIST (keyword),ANOMALYLIST (keyword)
DETECTANOMALY command,DETECTANOMALY command,DETECTANOMALY command
NORMS (keyword),NORMS (keyword),NORMS (keyword)
DETECTANOMALY command,DETECTANOMALY command,DETECTANOMALY command
ANOMALYSUMMARY (keyword),ANOMALYSUMMARY (keyword),ANOMALYSUMMARY (keyword)
DETECTANOMALY command,DETECTANOMALY command,DETECTANOMALY command
REASONSUMMARY (keyword),REASONSUMMARY (keyword),REASONSUMMARY (keyword)
DETECTANOMALY command,DETECTANOMALY command,DETECTANOMALY command
NONE (keyword),NONE (keyword),NONE (keyword)
DETECTANOMALY command,DETECTANOMALY command,DETECTANOMALY command
CPS | Display a case processing summary. The case processing summary displays the counts and count percentages for all cases in the active dataset, the cases included and excluded in the analysis, and the cases in each peer.
ANOMALYLIST | Display the anomaly index list, the anomaly peer ID list, and the anomaly reason list. The anomaly index list displays the case number and its corresponding anomaly index value. The anomaly peer ID list displays the case number, its corresponding peer group ID, peer size, and size in percent. The anomaly reason list displays the case number, the reason variable, the variable impact value, the value of the variable, and the norm of the variable for each reason. All tables are sorted by anomaly index in descending order. Moreover, the IDs of the cases are displayed if the case identifier variable is specified in the ID option of the VARIABLES subcommand. This is the default output.
NORMS | Display the continuous variable norms table if any continuous variable is used in the analysis, and display the categorical variable norms table if any categorical variable is used in the analysis. In the continuous variable norms table, the mean and standard deviation of each continuous variable for each peer group is displayed. In the categorical variable norms table, the mode (most popular category), its frequency, and frequency percent of each categorical variable for each peer group is displayed. The mean of a continuous variable and the mode of a categorical variable are used as the norm values in the analysis.
ANOMALYSUMMARY | Display the anomaly index summary. The anomaly index summary displays descriptive statistics for the anomaly index of the cases identified as the most unusual.
REASONSUMMARY | Display the reason summary table for each reason. For each reason, the table displays the frequency and frequency percent of each variable's occurrence as a reason. It also reports the descriptive statistics of the impact of each variable. If NUMREASONS=0 is specified on the CRITERIA subcommand, this option is ignored and a warning is issued.
NONE | Suppress all displayed output except the notes table and any warnings. If NONE is specified with one or more other keywords, the other keywords override NONE.

Related Topics

DETECTANOMALY
Overview (DETECTANOMALY command)
Examples (DETECTANOMALY command)
VARIABLES Subcommand (DETECTANOMALY command)
HANDLEMISSING Subcommand (DETECTANOMALY command)
CRITERIA Subcommand (DETECTANOMALY command)
SAVE Subcommand (DETECTANOMALY command)
OUTFILE Subcommand (DETECTANOMALY command)


DISCRIMINANT

DISCRIMINANT (command),DISCRIMINANT (command),DISCRIMINANT (command)
DISCRIMINANT (command),DISCRIMINANT (command),DISCRIMINANT (command)
syntax chart,syntax chart,syntax chart

DISCRIMINANT is available in the Statistics Base option.

DISCRIMINANT GROUPS=varname(min,max) /VARIABLES=varlist

 [/SELECT=varname(value)]

 [/ANALYSIS=varlist[(level)] [varlist...]]

 [/OUTFILE MODEL('file')]

 [/METHOD={DIRECT**}] [/TOLERANCE={0.001}]
          {WILKS   }              {  n  }
          {MAHAL   }
          {MAXMINF }
          {MINRESID}
          {RAO     }

 [/MAXSTEPS={n}]

 [/FIN={3.84**}] [/FOUT={2.71**}] [/PIN={n}]
       { n    }         { n    }

 [/POUT={n}] [/VIN={0**}]
                   { n }

 [/FUNCTIONS={g-1,100.0,1.0**}] [/PRIORS={EQUAL**   }]
             {n1 , n2  , n3  }           {SIZE      }
                                         {value list}
 [/SAVE=[CLASS[=varname]] [PROBS[=rootname]]

        [SCORES[=rootname]]]

 [/ANALYSIS=...]

 [/MISSING={EXCLUDE**}]
           {INCLUDE  }

 [/MATRIX=[OUT({*                  })] [IN({*                  })]]
               {'savfile'|'dataset'}       {'savfile'|'dataset'}

 [/HISTORY={STEP**} ]
           {NONE  }

 [/ROTATE={NONE**   }]
          {COEFF    }
          {STRUCTURE}

 [/CLASSIFY={NONMISSING  }  {POOLED  }  [MEANSUB]]
            {UNSELECTED  }  {SEPARATE}
            {UNCLASSIFIED}

 [/STATISTICS=[MEAN]  [COV  ]  [FPAIR]  [RAW ] [STDDEV]
              [GCOV]  [UNIVF]  [COEFF]  [CORR] [TCOV  ]
              [BOXM]  [TABLE]  [CROSSVALID]
              [ALL]]

 [/PLOT=[MAP]  [SEPARATE]  [COMBINED]  [CASES[(n)]]  [ALL]]

**Default if subcommand or keyword is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See DISCRIMINANT Algorithms for computational details for this procedure.

Syntax for the DISCRIMINANT command can be generated from the Discriminant Analysis dialog.

Release History Collapse Hide details

Release History

Release 17.0

• Added support for SET THREADS and SET MCACHE.

Example

DISCRIMINANT GROUPS=OUTCOME (1,4)
  /VARIABLES=V1 TO V7.

Related Topics

Overview (DISCRIMINANT command)
Examples (DISCRIMINANT command)
GROUPS Subcommand (DISCRIMINANT command)
VARIABLES Subcommand (DISCRIMINANT command)
SELECT Subcommand (DISCRIMINANT command)
ANALYSIS Subcommand (DISCRIMINANT command)
METHOD Subcommand (DISCRIMINANT command)
OUTFILE Subcommand (DISCRIMINANT command)
TOLERANCE Subcommand (DISCRIMINANT command)
PIN and POUT Subcommands (DISCRIMINANT command)
FIN and FOUT Subcommands (DISCRIMINANT command)
VIN Subcommand (DISCRIMINANT command)
MAXSTEPS Subcommand (DISCRIMINANT command)
FUNCTIONS Subcommand (DISCRIMINANT command)
PRIORS Subcommand (DISCRIMINANT command)
SAVE Subcommand (DISCRIMINANT command)
STATISTICS Subcommand (DISCRIMINANT command)
ROTATE Subcommand (DISCRIMINANT command)
HISTORY Subcommand (DISCRIMINANT command)
CLASSIFY Subcommand (DISCRIMINANT command)
PLOT Subcommand (DISCRIMINANT command)
MISSING Subcommand (DISCRIMINANT command)
MATRIX Subcommand (DISCRIMINANT command)


Overview (DISCRIMINANT command)

DISCRIMINANT (command),DISCRIMINANT (command),DISCRIMINANT (command)
analysis block,analysis block,analysis block
DISCRIMINANT (command),DISCRIMINANT (command),DISCRIMINANT (command)
limitations,limitations,limitations

DISCRIMINANT performs linear discriminant analysis for two or more groups. The goal of discriminant analysis is to classify cases into one of several mutually exclusive groups based on their values for a set of predictor variables. In the analysis phase, a classification rule is developed using cases for which group membership is known. In the classification phase, the rule is used to classify cases for which group membership is not known. The grouping variable must be categorical, and the independent (predictor) variables must be interval or dichotomous, since they will be used in a regression-type equation.

Options Collapse Hide details

Options

Variable Selection Method. In addition to the direct-entry method, you can specify any of several stepwise methods for entering variables into the discriminant analysis using the METHOD subcommand. You can set the values for the statistical criteria used to enter variables into the equation using the TOLERANCE, FIN, PIN, FOUT, POUT, and VIN subcommands, and you can specify inclusion levels on the ANALYSIS subcommand. You can also specify the maximum number of steps in a stepwise analysis using the MAXSTEPS subcommand.

Case Selection. You can select a subset of cases for the analysis phase using the SELECT subcommand.

Prior Probabilities. You can specify prior probabilities for membership in a group using the PRIORS subcommand. Prior probabilities are used in classifying cases.

New Variables. You can add new variables to the active dataset containing the predicted group membership, the probability of membership in each group, and discriminant function scores using the SAVE subcommand.

Classification Options. With the CLASSIFY subcommand, you can classify only those cases that were not selected for inclusion in the discriminant analysis, or only those cases whose value for the grouping variable was missing or fell outside the range analyzed. In addition, you can classify cases based on the separate-group covariance matrices of the functions instead of the pooled within-groups covariance matrix.

Statistical Display. You can request any of a variety of statistics on the STATISTICS subcommand. You can rotate the pattern or structure matrices using the ROTATE subcommand. You can compare actual with predicted group membership using a classification results table requested with the STATISTICS subcommand or compare any of several types of plots or histograms using the PLOT subcommand.

Basic Specification Collapse Hide details

Basic Specification

The basic specification requires two subcommands:

• GROUPS specifies the variable used to group cases.

• VARIABLES specifies the predictor variables.

By default, DISCRIMINANT enters all variables simultaneously into the discriminant equation (the DIRECT method), provided that they are not so highly correlated that multicollinearity problems arise. Default output includes analysis case processing summary, valid numbers of cases in group statistics, variables failing tolerance test, a summary of canonical discriminant functions, standardized canonical discriminant function coefficients, a structure matrix showing pooled within-groups correlations between the discriminant functions and the predictor variables, and functions at group centroids.

Subcommand Order Collapse Hide details

Subcommand Order

• The GROUPS, VARIABLES, and SELECT subcommands must precede all other subcommands and may be entered in any order.

• The analysis block follows, which may include ANALYSIS, METHOD, TOLERANCE, MAXSTEPS, FIN, FOUT, PIN, POUT, VIN, FUNCTIONS, PRIORS, SAVE, and OUTFILE. Each analysis block performs a single analysis. To do multiple analyses, specify multiple analysis blocks.

• The keyword ANALYSIS is optional for the first analysis block. Each new analysis block must begin with an ANALYSIS subcommand. Remaining subcommands in the block may be used in any order and apply only to the analysis defined within the same block.

• No analysis block subcommands can be specified after any of the global subcommands, which apply to all analysis blocks. The global subcommands are MISSING, MATRIX, HISTORY, ROTATE, CLASSIFY, STATISTICS, and PLOT. If an analysis block subcommand appears after a global subcommand, the program displays a warning and ignores it.

Syntax Rules Collapse Hide details

Syntax Rules

• Only one GROUPS, one SELECT, and one VARIABLES subcommand can be specified per DISCRIMINANT command.

Operations Collapse Hide details

Operations

• DISCRIMINANT first estimates one or more discriminant functions that best distinguish among the groups.

• Using these functions, DISCRIMINANT then classifies cases into groups (if classification output is requested).

• If more than one analysis block is specified, the above steps are repeated for each block.

• This procedure uses the multithreaded options specified by SET THREADS and SET MCACHE.

Limitations Collapse Hide details

Limitations

• Pairwise deletion of missing data is not available.

Related Topics

DISCRIMINANT
Examples (DISCRIMINANT command)
GROUPS Subcommand (DISCRIMINANT command)
VARIABLES Subcommand (DISCRIMINANT command)
SELECT Subcommand (DISCRIMINANT command)
ANALYSIS Subcommand (DISCRIMINANT command)
METHOD Subcommand (DISCRIMINANT command)
OUTFILE Subcommand (DISCRIMINANT command)
TOLERANCE Subcommand (DISCRIMINANT command)
PIN and POUT Subcommands (DISCRIMINANT command)
FIN and FOUT Subcommands (DISCRIMINANT command)
VIN Subcommand (DISCRIMINANT command)
MAXSTEPS Subcommand (DISCRIMINANT command)
FUNCTIONS Subcommand (DISCRIMINANT command)
PRIORS Subcommand (DISCRIMINANT command)
SAVE Subcommand (DISCRIMINANT command)
STATISTICS Subcommand (DISCRIMINANT command)
ROTATE Subcommand (DISCRIMINANT command)
HISTORY Subcommand (DISCRIMINANT command)
CLASSIFY Subcommand (DISCRIMINANT command)
PLOT Subcommand (DISCRIMINANT command)
MISSING Subcommand (DISCRIMINANT command)
MATRIX Subcommand (DISCRIMINANT command)


Examples (DISCRIMINANT command)

DISCRIMINANT
  /GROUPS=default(0 1)
  /VARIABLES=employ address debtinc creddebt
  /SELECT=validate(1)
  /ANALYSIS ALL
  /SAVE=CLASS PROBS
  /PRIORS  EQUAL
  /STATISTICS=MEANS STDDEV UNIVF BOXM COEFF RAW FPAIR TABLE CROSSVALID CORR
  /CLASSIFY=NONMISSING POOLED .

• The procedure builds a model for discriminating between the values 0 and 1 on the variable default using the variables employ, address, debtinc, and creddebt.

• The SELECT subcommand specifies that only cases with a value of 1 on the variable validate are used to build the model.

• The SAVE subcommand requests predicted group membership and predicted probabilities for each group to be saved to the active dataset.

• The STATISTICS subcommand requests Box's M test, classification function coefficients, unstandardized discriminant functions, pairwise F ratios, classification results and crossvalidated results, and a pooled within-groups correlation matrix in addition to the default output.

• All other options are set to their default values.

For discussion of output from this syntax and to place the example in context, see Using Discriminant Analysis to Assess Credit Risk.

Stepwise variable selection

DISCRIMINANT
  /GROUPS=custcat(1 4)
  /VARIABLES=age marital address income ed retire employ gender reside
  /ANALYSIS ALL
   /METHOD=WILKS
   /FIN= 3.84
   /FOUT= 2.71
  /PRIORS  EQUAL
   /HISTORY
  /STATISTICS= TABLE
  /PLOT=MAP
  /CLASSIFY=NONMISSING POOLED .

• The procedure builds a model for discriminating between the values 1, 2, 3, and 4 on the variable custcat using the variables age, marital, address, income, ed, retire, employ, gender, and reside.

• The METHOD, FIN, and FOUT subcommands specify stepwise variable selection using Wilks' lambda as the statistic, an F value of 3.84 as the criteria for determining entry into the model, and an F value of 2.71 for determining removal from the model.

• The STATISTICS subcommand requests a classification table.

• The PLOT subcommand requests a territorial map.

• All other options are set to their default values.

For discussion of output from this syntax and to place the example in context, see Using Discriminant Analysis to Classify Telecommunications Customers.

Related Topics

DISCRIMINANT
Overview (DISCRIMINANT command)
GROUPS Subcommand (DISCRIMINANT command)
VARIABLES Subcommand (DISCRIMINANT command)
SELECT Subcommand (DISCRIMINANT command)
ANALYSIS Subcommand (DISCRIMINANT command)
METHOD Subcommand (DISCRIMINANT command)
OUTFILE Subcommand (DISCRIMINANT command)
TOLERANCE Subcommand (DISCRIMINANT command)
PIN and POUT Subcommands (DISCRIMINANT command)
FIN and FOUT Subcommands (DISCRIMINANT command)
VIN Subcommand (DISCRIMINANT command)
MAXSTEPS Subcommand (DISCRIMINANT command)
FUNCTIONS Subcommand (DISCRIMINANT command)
PRIORS Subcommand (DISCRIMINANT command)
SAVE Subcommand (DISCRIMINANT command)
STATISTICS Subcommand (DISCRIMINANT command)
ROTATE Subcommand (DISCRIMINANT command)
HISTORY Subcommand (DISCRIMINANT command)
CLASSIFY Subcommand (DISCRIMINANT command)
PLOT Subcommand (DISCRIMINANT command)
MISSING Subcommand (DISCRIMINANT command)
MATRIX Subcommand (DISCRIMINANT command)


GROUPS Subcommand (DISCRIMINANT command)

GROUPS specifies the name of the grouping variable, which defines the categories or groups, and a range of categories.

• GROUPS is required and can be specified only once.

• The specification consists of a variable name followed by a range of values in parentheses.

• Only one grouping variable may be specified; its values must be integers. To use a string variable as the grouping variable, first use AUTORECODE to convert the string values to integers and then specify the recoded variable as the grouping variable.

• Empty groups are ignored and do not affect calculations. For example, if there are no cases in group 2, the value range (1, 5) will define only four groups.

• Cases with values outside the value range or missing are ignored during the analysis phase but are classified during the classification phase.

Related Topics

DISCRIMINANT
Overview (DISCRIMINANT command)
Examples (DISCRIMINANT command)
VARIABLES Subcommand (DISCRIMINANT command)
SELECT Subcommand (DISCRIMINANT command)
ANALYSIS Subcommand (DISCRIMINANT command)
METHOD Subcommand (DISCRIMINANT command)
OUTFILE Subcommand (DISCRIMINANT command)
TOLERANCE Subcommand (DISCRIMINANT command)
PIN and POUT Subcommands (DISCRIMINANT command)
FIN and FOUT Subcommands (DISCRIMINANT command)
VIN Subcommand (DISCRIMINANT command)
MAXSTEPS Subcommand (DISCRIMINANT command)
FUNCTIONS Subcommand (DISCRIMINANT command)
PRIORS Subcommand (DISCRIMINANT command)
SAVE Subcommand (DISCRIMINANT command)
STATISTICS Subcommand (DISCRIMINANT command)
ROTATE Subcommand (DISCRIMINANT command)
HISTORY Subcommand (DISCRIMINANT command)
CLASSIFY Subcommand (DISCRIMINANT command)
PLOT Subcommand (DISCRIMINANT command)
MISSING Subcommand (DISCRIMINANT command)
MATRIX Subcommand (DISCRIMINANT command)


VARIABLES Subcommand (DISCRIMINANT command)

VARIABLES identifies the predictor variables, which are used to classify cases into the groups defined on the GROUPS subcommand. The list of variables follows the usual conventions for variable lists.

• VARIABLES is required and can be specified only once. Use the ANALYSIS subcommand to obtain multiple analyses.

• Only numeric variables can be used.

• Variables should be suitable for use in a regression-type equation, either measured at the interval level or dichotomous.

Related Topics

DISCRIMINANT
Overview (DISCRIMINANT command)
Examples (DISCRIMINANT command)
GROUPS Subcommand (DISCRIMINANT command)
SELECT Subcommand (DISCRIMINANT command)
ANALYSIS Subcommand (DISCRIMINANT command)
METHOD Subcommand (DISCRIMINANT command)
OUTFILE Subcommand (DISCRIMINANT command)
TOLERANCE Subcommand (DISCRIMINANT command)
PIN and POUT Subcommands (DISCRIMINANT command)
FIN and FOUT Subcommands (DISCRIMINANT command)
VIN Subcommand (DISCRIMINANT command)
MAXSTEPS Subcommand (DISCRIMINANT command)
FUNCTIONS Subcommand (DISCRIMINANT command)
PRIORS Subcommand (DISCRIMINANT command)
SAVE Subcommand (DISCRIMINANT command)
STATISTICS Subcommand (DISCRIMINANT command)
ROTATE Subcommand (DISCRIMINANT command)
HISTORY Subcommand (DISCRIMINANT command)
CLASSIFY Subcommand (DISCRIMINANT command)
PLOT Subcommand (DISCRIMINANT command)
MISSING Subcommand (DISCRIMINANT command)
MATRIX Subcommand (DISCRIMINANT command)


SELECT Subcommand (DISCRIMINANT command)

DISCRIMINANT (command),DISCRIMINANT (command),DISCRIMINANT (command)
SELECT subcommand,SELECT subcommand,SELECT subcommand
SELECT (subcommand),SELECT (subcommand),SELECT (subcommand)
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command
DISCRIMINANT (command),DISCRIMINANT (command),DISCRIMINANT (command)
selecting a subset of cases,selecting a subset of cases,selecting a subset of cases

SELECT limits cases used in the analysis phase to those with a specified value for any one variable.

• Only one SELECT subcommand is allowed. It can follow the GROUPS and VARIABLES subcommands but must precede all other subcommands.

• The specification is a variable name and a single integer value in parentheses. Multiple variables or values are not permitted.

• The selection variable does not have to be specified on the VARIABLES subcommand.

• Only cases with the specified value for the selection variable are used in the analysis phase.

• All cases, whether selected or not, are classified by default. Use CLASSIFY=UNSELECTED to classify only the unselected cases.

• When SELECT is used, classification statistics are reported separately for selected and unselected cases, unless CLASSIFY=UNSELECTED is used to restrict classification.

Example

DISCRIMINANT GROUPS=APPROVAL(1,5)
  /VARS=Q1 TO Q10
  /SELECT=COMPLETE(1)
  /CLASSIFY=UNSELECTED.

• Using only cases with the value 1 for the variable COMPLETE, DISCRIMINANT estimates a function of Q1 to Q10 that discriminates between the categories 1 to 5 of the grouping variable APPROVAL.

• Because CLASSIFY=UNSELECTED is specified, the discriminant function will be used to classify only the unselected cases (cases for which COMPLETE does not equal 1).

Related Topics

DISCRIMINANT
Overview (DISCRIMINANT command)
Examples (DISCRIMINANT command)
GROUPS Subcommand (DISCRIMINANT command)
VARIABLES Subcommand (DISCRIMINANT command)
ANALYSIS Subcommand (DISCRIMINANT command)
METHOD Subcommand (DISCRIMINANT command)
OUTFILE Subcommand (DISCRIMINANT command)
TOLERANCE Subcommand (DISCRIMINANT command)
PIN and POUT Subcommands (DISCRIMINANT command)
FIN and FOUT Subcommands (DISCRIMINANT command)
VIN Subcommand (DISCRIMINANT command)
MAXSTEPS Subcommand (DISCRIMINANT command)
FUNCTIONS Subcommand (DISCRIMINANT command)
PRIORS Subcommand (DISCRIMINANT command)
SAVE Subcommand (DISCRIMINANT command)
STATISTICS Subcommand (DISCRIMINANT command)
ROTATE Subcommand (DISCRIMINANT command)
HISTORY Subcommand (DISCRIMINANT command)
CLASSIFY Subcommand (DISCRIMINANT command)
PLOT Subcommand (DISCRIMINANT command)
MISSING Subcommand (DISCRIMINANT command)
MATRIX Subcommand (DISCRIMINANT command)


ANALYSIS Subcommand (DISCRIMINANT command)

DISCRIMINANT (command),DISCRIMINANT (command),DISCRIMINANT (command)
ANALYSIS subcommand,ANALYSIS subcommand,ANALYSIS subcommand
ANALYSIS (subcommand),ANALYSIS (subcommand),ANALYSIS (subcommand)
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command
DISCRIMINANT (command),DISCRIMINANT (command),DISCRIMINANT (command)
stepwise methods,stepwise methods,stepwise methods
DISCRIMINANT (command),DISCRIMINANT (command),DISCRIMINANT (command)
multiple analyses,multiple analyses,multiple analyses

ANALYSIS is used to request several different discriminant analyses using the same grouping variable, or to control the order in which variables are entered into a stepwise analysis.

• ANALYSIS is optional for the first analysis block. By default, all variables specified on the VARIABLES subcommand are included in the analysis.

• The variables named on ANALYSIS must first be specified on the VARIABLES subcommand.

• The keyword ALL includes all variables on the VARIABLES subcommand.

• If the keyword TO is used to specify a list of variables on an ANALYSIS subcommand, it refers to the order of variables on the VARIABLES subcommand, which is not necessarily the order of variables in the active dataset.

Example

DISCRIMINANT GROUPS=SUCCESS(0,1)
  /VARIABLES=V10 TO V15, AGE, V5
  /ANALYSIS=V15 TO V5
  /ANALYSIS=ALL.

• The first analysis will use the variables V15, AGE, and V5 to discriminate between cases where SUCCESS equals 0 and SUCCESS equals 1.

• The second analysis will use all variables named on the VARIABLES subcommand.

Related Topics

DISCRIMINANT
Overview (DISCRIMINANT command)
Examples (DISCRIMINANT command)
GROUPS Subcommand (DISCRIMINANT command)
VARIABLES Subcommand (DISCRIMINANT command)
SELECT Subcommand (DISCRIMINANT command)
METHOD Subcommand (DISCRIMINANT command)
OUTFILE Subcommand (DISCRIMINANT command)
TOLERANCE Subcommand (DISCRIMINANT command)
PIN and POUT Subcommands (DISCRIMINANT command)
FIN and FOUT Subcommands (DISCRIMINANT command)
VIN Subcommand (DISCRIMINANT command)
MAXSTEPS Subcommand (DISCRIMINANT command)
FUNCTIONS Subcommand (DISCRIMINANT command)
PRIORS Subcommand (DISCRIMINANT command)
SAVE Subcommand (DISCRIMINANT command)
STATISTICS Subcommand (DISCRIMINANT command)
ROTATE Subcommand (DISCRIMINANT command)
HISTORY Subcommand (DISCRIMINANT command)
CLASSIFY Subcommand (DISCRIMINANT command)
PLOT Subcommand (DISCRIMINANT command)
MISSING Subcommand (DISCRIMINANT command)
MATRIX Subcommand (DISCRIMINANT command)
Inclusion Levels (DISCRIMINANT command)


Inclusion Levels (DISCRIMINANT command)

DISCRIMINANT (command),DISCRIMINANT (command),DISCRIMINANT (command)
inclusion levels,inclusion levels,inclusion levels
stepwise selection,stepwise selection,stepwise selection
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command

When you specify a stepwise method on the METHOD subcommand (any method other than the default direct-entry method), you can control the order in which variables are considered for entry or removal by specifying inclusion levels on the ANALYSIS subcommand. By default, all variables in the analysis are entered according to the criterion requested on the METHOD subcommand.

• An inclusion level is an integer between 0 and 99, specified in parentheses after a variable or list of variables on the ANALYSIS subcommand.

• The default inclusion level is 1.

• Variables with higher inclusion levels are considered for entry before variables with lower inclusion levels.

• Variables with even inclusion levels are entered as a group.

• Variables with odd inclusion levels are entered individually, according to the stepwise method specified on the METHOD subcommand.

• Only variables with an inclusion level of 1 are considered for removal. To make a variable with a higher inclusion level eligible for removal, name it twice on the ANALYSIS subcommand, first specifying the desired inclusion level and then an inclusion level of 1.

• Variables with an inclusion level of 0 are never entered. However, the statistical criterion for entry is computed and displayed.

• Variables that fail the tolerance criterion are not entered regardless of their inclusion level.

The following are some common methods of entering variables and the inclusion levels that could be used to achieve them. These examples assume that one of the stepwise methods is specified on the METHOD subcommand (otherwise, inclusion levels have no effect).

Direct. ANALYSIS=ALL(2) forces all variables into the equation. (This is the default and can be requested with METHOD=DIRECT or simply by omitting the METHOD subcommand.)

Stepwise. ANALYSIS=ALL(1) yields a stepwise solution in which variables are entered and removed in stepwise fashion. (This is the default when anything other than DIRECT is specified on the METHOD subcommand.)

Forward. ANALYSIS=ALL(3) enters variables into the equation stepwise but does not remove variables.

Backward. ANALYSIS=ALL(2) ALL(1) forces all variables into the equation and then allows them to be removed stepwise if they satisfy the criterion for removal.

Inclusion Levels Used With a Stepwise Method

DISCRIMINANT GROUPS=SUCCESS(0,1)
  /VARIABLES=A, B, C, D, E
  /ANALYSIS=A TO C (2) D, E (1)
  /METHOD=WILKS.

• A, B, and C are entered into the analysis first, assuming that they pass the tolerance criterion. Since their inclusion level is even, they are entered together.

• D and E are then entered stepwise. The one that minimizes the overall value of Wilks’ lambda is entered first.

• After entering D and E, the program checks whether the partial F for either one justifies removal from the equation (see the FOUT and POUT subcommands).

Inclusion Levels Without a Stepwise Method

DISCRIMINANT GROUPS=SUCCESS(0,1)
  /VARIABLES=A, B, C, D, E
  /ANALYSIS=A TO C (2) D, E (1).

• Since no stepwise method is specified, inclusion levels have no effect and all variables are entered into the model at once.

Related Topics

ANALYSIS Subcommand (DISCRIMINANT command)


METHOD Subcommand (DISCRIMINANT command)

DISCRIMINANT (command),DISCRIMINANT (command),DISCRIMINANT (command)
METHOD subcommand,METHOD subcommand,METHOD subcommand
METHOD (subcommand),METHOD (subcommand),METHOD (subcommand)
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command
DISCRIMINANT (command),DISCRIMINANT (command),DISCRIMINANT (command)
variable selection methods,variable selection methods,variable selection methods

METHOD is used to select a method for entering variables into an analysis.

• A variable will never be entered into the analysis if it does not pass the tolerance criterion specified on the TOLERANCE subcommand (or the default).

• A METHOD subcommand applies only to the preceding ANALYSIS subcommand, or to an analysis using all predictor variables if no ANALYSIS subcommand has been specified before it.

• If more than one METHOD subcommand is specified within one analysis block, the last is used.

Any one of the following methods can be specified on the METHOD subcommand:

forced-entry method,forced-entry method,forced-entry method
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command
DIRECT (keyword),DIRECT (keyword),DIRECT (keyword)
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command
lambda,lambda,lambda
Wilks',Wilks',Wilks'
WILKS (keyword),WILKS (keyword),WILKS (keyword)
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command
Mahalanobis distance,Mahalanobis distance,Mahalanobis distance
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command
MAHAL (keyword),MAHAL (keyword),MAHAL (keyword)
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command
smallest F-ratio criterion,smallest F-ratio criterion,smallest F-ratio criterion
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command
MAXMINF (keyword),MAXMINF (keyword),MAXMINF (keyword)
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command
unexplained variance criterion,unexplained variance criterion,unexplained variance criterion
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command
MINRESID (keyword),MINRESID (keyword),MINRESID (keyword)
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command
Rao's V,Rao's V,Rao's V
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command
RAO (keyword),RAO (keyword),RAO (keyword)
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command
DIRECT | All variables passing the tolerance criteria are entered simultaneously. This is the default method.
WILKS | At each step, the variable that minimizes the overall Wilks’ lambda is entered.
MAHAL | At each step, the variable that maximizes the Mahalanobis distance between the two closest groups is entered.
MAXMINF | At each step, the variable that maximizes the smallest F ratio between pairs of groups is entered.
MINRESID | At each step, the variable that minimizes the sum of the unexplained variation for all pairs of groups is entered.
RAO | At each step, the variable that produces the largest increase in Rao’s V is entered.

Related Topics

DISCRIMINANT
Overview (DISCRIMINANT command)
Examples (DISCRIMINANT command)
GROUPS Subcommand (DISCRIMINANT command)
VARIABLES Subcommand (DISCRIMINANT command)
SELECT Subcommand (DISCRIMINANT command)
ANALYSIS Subcommand (DISCRIMINANT command)
OUTFILE Subcommand (DISCRIMINANT command)
TOLERANCE Subcommand (DISCRIMINANT command)
PIN and POUT Subcommands (DISCRIMINANT command)
FIN and FOUT Subcommands (DISCRIMINANT command)
VIN Subcommand (DISCRIMINANT command)
MAXSTEPS Subcommand (DISCRIMINANT command)
FUNCTIONS Subcommand (DISCRIMINANT command)
PRIORS Subcommand (DISCRIMINANT command)
SAVE Subcommand (DISCRIMINANT command)
STATISTICS Subcommand (DISCRIMINANT command)
ROTATE Subcommand (DISCRIMINANT command)
HISTORY Subcommand (DISCRIMINANT command)
CLASSIFY Subcommand (DISCRIMINANT command)
PLOT Subcommand (DISCRIMINANT command)
MISSING Subcommand (DISCRIMINANT command)
MATRIX Subcommand (DISCRIMINANT command)


OUTFILE Subcommand (DISCRIMINANT command)

model information,model information,model information
exporting from DISCRIMINANT command,exporting from DISCRIMINANT command,exporting from DISCRIMINANT command
DISCRIMINANT (command),DISCRIMINANT (command),DISCRIMINANT (command)
exporting model information,exporting model information,exporting model information
DISCRIMINANT (command),DISCRIMINANT (command),DISCRIMINANT (command)
OUTFILE subcommand,OUTFILE subcommand,OUTFILE subcommand
OUTFILE (subcommand),OUTFILE (subcommand),OUTFILE (subcommand)
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command

Exports model information to the specified file in XML (PMML) format. SmartScore and PASW Statistics Server (a separate product) can use this model file to apply the model information to other data files for scoring purposes.

• The minimum specification is the keyword MODEL and a file name enclosed in parentheses.

• The OUTFILE subcommand cannot be used if split file processing is on (SPLIT FILE command).

Related Topics

DISCRIMINANT
Overview (DISCRIMINANT command)
Examples (DISCRIMINANT command)
GROUPS Subcommand (DISCRIMINANT command)
VARIABLES Subcommand (DISCRIMINANT command)
SELECT Subcommand (DISCRIMINANT command)
ANALYSIS Subcommand (DISCRIMINANT command)
METHOD Subcommand (DISCRIMINANT command)
TOLERANCE Subcommand (DISCRIMINANT command)
PIN and POUT Subcommands (DISCRIMINANT command)
FIN and FOUT Subcommands (DISCRIMINANT command)
VIN Subcommand (DISCRIMINANT command)
MAXSTEPS Subcommand (DISCRIMINANT command)
FUNCTIONS Subcommand (DISCRIMINANT command)
PRIORS Subcommand (DISCRIMINANT command)
SAVE Subcommand (DISCRIMINANT command)
STATISTICS Subcommand (DISCRIMINANT command)
ROTATE Subcommand (DISCRIMINANT command)
HISTORY Subcommand (DISCRIMINANT command)
CLASSIFY Subcommand (DISCRIMINANT command)
PLOT Subcommand (DISCRIMINANT command)
MISSING Subcommand (DISCRIMINANT command)
MATRIX Subcommand (DISCRIMINANT command)


TOLERANCE Subcommand (DISCRIMINANT command)

TOLERANCE specifies the minimum tolerance a variable can have and still be entered into the analysis. The tolerance of a variable that is a candidate for inclusion in the analysis is the proportion of its within-groups variance not accounted for by other variables in the analysis. A variable with very low tolerance is nearly a linear function of the other variables; its inclusion in the analysis would make the calculations unstable.

• The default tolerance is 0.001.

• You can specify any decimal value between 0 and 1 as the minimum tolerance.

Related Topics

DISCRIMINANT
Overview (DISCRIMINANT command)
Examples (DISCRIMINANT command)
GROUPS Subcommand (DISCRIMINANT command)
VARIABLES Subcommand (DISCRIMINANT command)
SELECT Subcommand (DISCRIMINANT command)
ANALYSIS Subcommand (DISCRIMINANT command)
METHOD Subcommand (DISCRIMINANT command)
OUTFILE Subcommand (DISCRIMINANT command)
PIN and POUT Subcommands (DISCRIMINANT command)
FIN and FOUT Subcommands (DISCRIMINANT command)
VIN Subcommand (DISCRIMINANT command)
MAXSTEPS Subcommand (DISCRIMINANT command)
FUNCTIONS Subcommand (DISCRIMINANT command)
PRIORS Subcommand (DISCRIMINANT command)
SAVE Subcommand (DISCRIMINANT command)
STATISTICS Subcommand (DISCRIMINANT command)
ROTATE Subcommand (DISCRIMINANT command)
HISTORY Subcommand (DISCRIMINANT command)
CLASSIFY Subcommand (DISCRIMINANT command)
PLOT Subcommand (DISCRIMINANT command)
MISSING Subcommand (DISCRIMINANT command)
MATRIX Subcommand (DISCRIMINANT command)


PIN and POUT Subcommands (DISCRIMINANT command)

PIN specifies the minimum probability of F that a variable can have to enter the analysis and POUT specifies the maximum probability of F that a variable can have and not be removed from the model.

• PIN and POUT take precedence over FIN and FOUT. That is, if all are specified, PIN and POUT values are used.

• If PIN and POUT are omitted, FIN and FOUT are used by default.

• You can set PIN and POUT to any decimal value between 0 and 1. However, POUT should be greater than PIN if PIN is also specified.

• PIN and POUT apply only to the stepwise methods and are ignored if the METHOD subcommand is omitted or if DIRECT is specified on METHOD.

Related Topics

DISCRIMINANT
Overview (DISCRIMINANT command)
Examples (DISCRIMINANT command)
GROUPS Subcommand (DISCRIMINANT command)
VARIABLES Subcommand (DISCRIMINANT command)
SELECT Subcommand (DISCRIMINANT command)
ANALYSIS Subcommand (DISCRIMINANT command)
METHOD Subcommand (DISCRIMINANT command)
OUTFILE Subcommand (DISCRIMINANT command)
TOLERANCE Subcommand (DISCRIMINANT command)
FIN and FOUT Subcommands (DISCRIMINANT command)
VIN Subcommand (DISCRIMINANT command)
MAXSTEPS Subcommand (DISCRIMINANT command)
FUNCTIONS Subcommand (DISCRIMINANT command)
PRIORS Subcommand (DISCRIMINANT command)
SAVE Subcommand (DISCRIMINANT command)
STATISTICS Subcommand (DISCRIMINANT command)
ROTATE Subcommand (DISCRIMINANT command)
HISTORY Subcommand (DISCRIMINANT command)
CLASSIFY Subcommand (DISCRIMINANT command)
PLOT Subcommand (DISCRIMINANT command)
MISSING Subcommand (DISCRIMINANT command)
MATRIX Subcommand (DISCRIMINANT command)


FIN and FOUT Subcommands (DISCRIMINANT command)

FIN specifies the minimum partial F value that a variable must have to enter the analysis. As additional variables are entered into the analysis, the partial F for variables already in the equation changes. FOUT specifies the smallest partial F that a variable can have and not be removed from the model.

• PIN and POUT take precedence over FIN and FOUT. That is, if all are specified, PIN and POUT values are used.

• If PIN and POUT are omitted, FIN and FOUT are used by default. If FOUT is specified but FIN is omitted, the default value for FIN is 3.84. If FIN is specified, the default value for FOUT is 2.71.

• You can set FIN and FOUT to any non-negative number. However, FOUT should be less than FIN if FIN is also specified.

• FIN and FOUT apply only to the stepwise methods and are ignored if the METHOD subcommand is omitted or if DIRECT is specified on METHOD.

Related Topics

DISCRIMINANT
Overview (DISCRIMINANT command)
Examples (DISCRIMINANT command)
GROUPS Subcommand (DISCRIMINANT command)
VARIABLES Subcommand (DISCRIMINANT command)
SELECT Subcommand (DISCRIMINANT command)
ANALYSIS Subcommand (DISCRIMINANT command)
METHOD Subcommand (DISCRIMINANT command)
OUTFILE Subcommand (DISCRIMINANT command)
TOLERANCE Subcommand (DISCRIMINANT command)
PIN and POUT Subcommands (DISCRIMINANT command)
VIN Subcommand (DISCRIMINANT command)
MAXSTEPS Subcommand (DISCRIMINANT command)
FUNCTIONS Subcommand (DISCRIMINANT command)
PRIORS Subcommand (DISCRIMINANT command)
SAVE Subcommand (DISCRIMINANT command)
STATISTICS Subcommand (DISCRIMINANT command)
ROTATE Subcommand (DISCRIMINANT command)
HISTORY Subcommand (DISCRIMINANT command)
CLASSIFY Subcommand (DISCRIMINANT command)
PLOT Subcommand (DISCRIMINANT command)
MISSING Subcommand (DISCRIMINANT command)
MATRIX Subcommand (DISCRIMINANT command)


VIN Subcommand (DISCRIMINANT command)

VIN specifies the minimum Rao’s V that a variable must have to enter the analysis. When you use METHOD=RAO, variables satisfying one of the other criteria for entering the equation may actually cause a decrease in Rao’s V for the equation. The default VIN prevents this but does not prevent the addition of variables that provide no additional separation between groups.

• You can specify any value for VIN. The default is 0.

• VIN should be used only when you have specified METHOD=RAO. Otherwise, it is ignored.

Related Topics

DISCRIMINANT
Overview (DISCRIMINANT command)
Examples (DISCRIMINANT command)
GROUPS Subcommand (DISCRIMINANT command)
VARIABLES Subcommand (DISCRIMINANT command)
SELECT Subcommand (DISCRIMINANT command)
ANALYSIS Subcommand (DISCRIMINANT command)
METHOD Subcommand (DISCRIMINANT command)
OUTFILE Subcommand (DISCRIMINANT command)
TOLERANCE Subcommand (DISCRIMINANT command)
PIN and POUT Subcommands (DISCRIMINANT command)
FIN and FOUT Subcommands (DISCRIMINANT command)
MAXSTEPS Subcommand (DISCRIMINANT command)
FUNCTIONS Subcommand (DISCRIMINANT command)
PRIORS Subcommand (DISCRIMINANT command)
SAVE Subcommand (DISCRIMINANT command)
STATISTICS Subcommand (DISCRIMINANT command)
ROTATE Subcommand (DISCRIMINANT command)
HISTORY Subcommand (DISCRIMINANT command)
CLASSIFY Subcommand (DISCRIMINANT command)
PLOT Subcommand (DISCRIMINANT command)
MISSING Subcommand (DISCRIMINANT command)
MATRIX Subcommand (DISCRIMINANT command)


MAXSTEPS Subcommand (DISCRIMINANT command)

MAXSTEPS is used to decrease the maximum number of steps allowed. By default, the maximum number of steps allowed in a stepwise analysis is the number of variables with inclusion levels greater than 1 plus twice the number of variables with inclusion levels equal to 1. This is the maximum number of steps possible without producing a loop in which a variable is repeatedly cycled in and out.

• MAXSTEPS applies only to the stepwise methods (all except DIRECT).

• MAXSTEPS applies only to the preceding METHOD subcommand.

• The format is MAX=n, where n is the maximum number of steps desired.

• If multiple MAXSTEPS subcommands are specified, the last is used.

Related Topics

DISCRIMINANT
Overview (DISCRIMINANT command)
Examples (DISCRIMINANT command)
GROUPS Subcommand (DISCRIMINANT command)
VARIABLES Subcommand (DISCRIMINANT command)
SELECT Subcommand (DISCRIMINANT command)
ANALYSIS Subcommand (DISCRIMINANT command)
METHOD Subcommand (DISCRIMINANT command)
OUTFILE Subcommand (DISCRIMINANT command)
TOLERANCE Subcommand (DISCRIMINANT command)
PIN and POUT Subcommands (DISCRIMINANT command)
FIN and FOUT Subcommands (DISCRIMINANT command)
VIN Subcommand (DISCRIMINANT command)
FUNCTIONS Subcommand (DISCRIMINANT command)
PRIORS Subcommand (DISCRIMINANT command)
SAVE Subcommand (DISCRIMINANT command)
STATISTICS Subcommand (DISCRIMINANT command)
ROTATE Subcommand (DISCRIMINANT command)
HISTORY Subcommand (DISCRIMINANT command)
CLASSIFY Subcommand (DISCRIMINANT command)
PLOT Subcommand (DISCRIMINANT command)
MISSING Subcommand (DISCRIMINANT command)
MATRIX Subcommand (DISCRIMINANT command)


FUNCTIONS Subcommand (DISCRIMINANT command)

By default, DISCRIMINANT computes all possible functions. This is either the number of groups minus 1 or the number of predictor variables, whichever is less. Use FUNCTIONS to set more restrictive criteria for the extraction of functions.

FUNCTIONS has three parameters:

n | Maximum number of functions. The default is the number of groups minus 1 or the number of predictor variables, whichever is less.
n | Cumulative percentage of the sum of the eigenvalues. The default is 100.
n | Significance level of function. The default is 1.0.

• The parameters must always be specified in sequential order (n1, n2, n3). To specify n2, you must explicitly specify the default for n1. Similarly, to specify n3, you must specify the defaults for n1 and n2.

• If more than one restriction is specified, the program stops extracting functions when any one of the restrictions is met.

• When multiple FUNCTIONS subcommands are specified, the program uses the last; however, if n2 or n3 are omitted on the last FUNCTIONS subcommand, the corresponding specifications on the previous FUNCTIONS subcommands will remain in effect.

Example

DISCRIMINANT  GROUPS=CLASS(1,5)
  /VARIABLES = SCORE1 TO SCORE20
  /FUNCTIONS=4,100,.80.

• The first two parameters on the FUNCTIONS subcommand are defaults: the default for n1 is 4 (the number of groups minus 1), and the default for n2 is 100.

• The third parameter tells DISCRIMINANT to use fewer than four discriminant functions if the significance level of a function is greater than 0.80.

Related Topics

DISCRIMINANT
Overview (DISCRIMINANT command)
Examples (DISCRIMINANT command)
GROUPS Subcommand (DISCRIMINANT command)
VARIABLES Subcommand (DISCRIMINANT command)
SELECT Subcommand (DISCRIMINANT command)
ANALYSIS Subcommand (DISCRIMINANT command)
METHOD Subcommand (DISCRIMINANT command)
OUTFILE Subcommand (DISCRIMINANT command)
TOLERANCE Subcommand (DISCRIMINANT command)
PIN and POUT Subcommands (DISCRIMINANT command)
FIN and FOUT Subcommands (DISCRIMINANT command)
VIN Subcommand (DISCRIMINANT command)
MAXSTEPS Subcommand (DISCRIMINANT command)
PRIORS Subcommand (DISCRIMINANT command)
SAVE Subcommand (DISCRIMINANT command)
STATISTICS Subcommand (DISCRIMINANT command)
ROTATE Subcommand (DISCRIMINANT command)
HISTORY Subcommand (DISCRIMINANT command)
CLASSIFY Subcommand (DISCRIMINANT command)
PLOT Subcommand (DISCRIMINANT command)
MISSING Subcommand (DISCRIMINANT command)
MATRIX Subcommand (DISCRIMINANT command)


PRIORS Subcommand (DISCRIMINANT command)

PRIORS (subcommand),PRIORS (subcommand),PRIORS (subcommand)
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command
DISCRIMINANT (command),DISCRIMINANT (command),DISCRIMINANT (command)
PRIORS subcommand,PRIORS subcommand,PRIORS subcommand
DISCRIMINANT (command),DISCRIMINANT (command),DISCRIMINANT (command)
prior probabilities,prior probabilities,prior probabilities
prior probability,prior probability,prior probability
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command
group membership,group membership,group membership
probabilities,probabilities,probabilities

By default, DISCRIMINANT assumes equal prior probabilities for groups when classifying cases. You can provide different prior probabilities with the PRIORS subcommand.

• Prior probabilities are used only during classification.

• If you provide unequal prior probabilities, DISCRIMINANT adjusts the classification coefficients to reflect this.

• If adjacent groups have the same prior probability, you can use the notation n*c on the value list to indicate that n adjacent groups have the same prior probability c.

• You can specify a prior probability of 0. No cases are classified into such a group.

• If the sum of the prior probabilities is not 1, the program rescales the probabilities to sum to 1 and issues a warning.

EQUAL (keyword),EQUAL (keyword),EQUAL (keyword)
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command
SIZE (keyword),SIZE (keyword),SIZE (keyword)
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command
EQUAL | Equal prior probabilities. This is the default.
SIZE | Proportion of the cases analyzed that fall into each group. If 50% of the cases included in the analysis fall into the first group, 25% in the second, and 25% in the third, the prior probabilities are 0.5, 0.25, and 0.25, respectively. Group size is determined after cases with missing values for the predictor variables are deleted.
Value list | User-specified prior probabilities. The list of probabilities must sum to 1.0. The number of prior probabilities named or implied must equal the number of groups.

Example

DISCRIMINANT  GROUPS=TYPE(1,5)
  /VARIABLES=A TO H
  /PRIORS = 4*.15,.4.

• The PRIORS subcommand establishes prior probabilities of 0.15 for the first four groups and 0.4 for the fifth group.

Related Topics

DISCRIMINANT
Overview (DISCRIMINANT command)
Examples (DISCRIMINANT command)
GROUPS Subcommand (DISCRIMINANT command)
VARIABLES Subcommand (DISCRIMINANT command)
SELECT Subcommand (DISCRIMINANT command)
ANALYSIS Subcommand (DISCRIMINANT command)
METHOD Subcommand (DISCRIMINANT command)
OUTFILE Subcommand (DISCRIMINANT command)
TOLERANCE Subcommand (DISCRIMINANT command)
PIN and POUT Subcommands (DISCRIMINANT command)
FIN and FOUT Subcommands (DISCRIMINANT command)
VIN Subcommand (DISCRIMINANT command)
MAXSTEPS Subcommand (DISCRIMINANT command)
FUNCTIONS Subcommand (DISCRIMINANT command)
SAVE Subcommand (DISCRIMINANT command)
STATISTICS Subcommand (DISCRIMINANT command)
ROTATE Subcommand (DISCRIMINANT command)
HISTORY Subcommand (DISCRIMINANT command)
CLASSIFY Subcommand (DISCRIMINANT command)
PLOT Subcommand (DISCRIMINANT command)
MISSING Subcommand (DISCRIMINANT command)
MATRIX Subcommand (DISCRIMINANT command)


SAVE Subcommand (DISCRIMINANT command)

DISCRIMINANT (command),DISCRIMINANT (command),DISCRIMINANT (command)
SAVE subcommand,SAVE subcommand,SAVE subcommand
SAVE (subcommand),SAVE (subcommand),SAVE (subcommand)
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command
DISCRIMINANT (command),DISCRIMINANT (command),DISCRIMINANT (command)
saving classification variables,saving classification variables,saving classification variables
DISCRIMINANT (command),DISCRIMINANT (command),DISCRIMINANT (command)
casewise results,casewise results,casewise results

SAVE allows you to save casewise information as new variables in the active dataset.

• SAVE applies only to the current analysis block. To save casewise results from more than one analysis, specify a SAVE subcommand in each analysis block.

• You can specify a variable name for CLASS and rootnames for SCORES and PROBS to obtain descriptive names for the new variables.

• If you do not specify a variable name for CLASS, the program forms variable names using the formula DSC_m, where m increments to distinguish group membership variables saved on different SAVE subcommands for different analysis blocks.

• If you do not specify a rootname for SCORES or PROBS, the program forms new variable names using the formula DSCn_m, where m increments to create unique rootnames and n increments to create unique variable names. For example, the first set of default names assigned to discriminant scores or probabilities are DSC1_1, DSC2_1, DSC3_1, and so on. The next set of default names assigned will be DSC1_2, DSC2_2, DSC3_2, and so on, regardless of whether discriminant scores or probabilities are being saved or whether they are saved by the same SAVE subcommand.

• The keywords CLASS, SCORES, and PROBS can be used in any order, but the new variables are always added to the end of the active dataset in the following order: first the predicted group, then the discriminant scores, and finally probabilities of group membership.

• Appropriate variable labels are automatically generated. The labels describe whether the variables contain predictor group membership, discriminant scores, or probabilities, and for which analysis they are generated.

• The CLASS variable will use the value labels (if any) from the grouping variable specified for the analysis.

• When SAVE is specified with any keyword, DISCRIMINANT displays a classification processing summary table and a prior probabilities for groups table.

• You cannot use the SAVE subcommand if you are replacing the active dataset with matrix materials (see Matrix Output).

group membership,group membership,group membership
predicted,predicted,predicted
CLASS (keyword),CLASS (keyword),CLASS (keyword)
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command
discriminant scores,discriminant scores,discriminant scores
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command
SCORES (keyword),SCORES (keyword),SCORES (keyword)
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command
posterior probability,posterior probability,posterior probability
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command
PROBS (keyword),PROBS (keyword),PROBS (keyword)
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command
CLASS [(varname)] | Predicted group membership.
SCORES [(rootname)] | Discriminant scores. One score is saved for each discriminant function derived. If a rootname is specified, DISCRIMINANT will append a sequential number to the name to form new variable names for the discriminant scores.
PROBS [(rootname)] | For each case, the probabilities of membership in each group. As many variables are added to each case as there are groups. If a rootname is specified, DISCRIMINANT will append a sequential number to the name to form new variable names.

Example

DISCRIMINANT GROUPS=WORLD(1,3)
 /VARIABLES=FOOD TO FSALES
 /SAVE CLASS=PRDCLASS SCORES=SCORE PROBS=PRB
 /ANALYSIS=FOOD SERVICE COOK MANAGER FSALES
 /SAVE CLASS SCORES PROBS.

• Two analyses are specified. The first uses all variables named on the VARIABLES subcommand and the second narrows down to five variables. For each analysis, a SAVE subcommand is specified.

• For each analysis, DISCRIMINANT displays a classification processing summary table and a prior probabilities for groups table.

• On the first SAVE subcommand, a variable name and two rootnames are provided. With three groups, the following variables are added to each case:

Name | Variable label | Description
PRDCLASS | Predicted group for analysis 1 | Predicted group membership
SCORE1 | Function 1 for analysis 1 | Discriminant score for function 1
SCORE2 | Function 2 for analysis 1 | Discriminant score for function 2
PRB1 | Probability 1 for analysis 1 | Probability of being in group 1
PRB2 | Probability 2 for analysis 1 | Probability of being in group 2
PRB3 | Probability 3 for analysis 1 | Probability of being in group 3

• Since no variable name or rootnames are provided on the second SAVE subcommand, DISCRIMINANT uses default names. Note that m serves only to distinguish variables saved as a set and does not correspond to the sequential number of an analysis. To find out what information a new variable holds, read the variable label, as shown in the following table:

Name | Variable label | Description
DSC_1 | Predicted group for analysis 2 | Predicted group membership
DSC1_1 | Function 1 for analysis 2 | Discriminant score for function 1
DSC2_1 | Function 2 for analysis 2 | Discriminant score for function 2
DSC1_2 | Probability 1 for analysis 2 | Probability of being in group 1
DSC2_2 | Probability 2 for analysis 2 | Probability of being in group 2
DSC3_2 | Probability 3 for analysis 2 | Probability of being in group 3

Related Topics

DISCRIMINANT
Overview (DISCRIMINANT command)
Examples (DISCRIMINANT command)
GROUPS Subcommand (DISCRIMINANT command)
VARIABLES Subcommand (DISCRIMINANT command)
SELECT Subcommand (DISCRIMINANT command)
ANALYSIS Subcommand (DISCRIMINANT command)
METHOD Subcommand (DISCRIMINANT command)
OUTFILE Subcommand (DISCRIMINANT command)
TOLERANCE Subcommand (DISCRIMINANT command)
PIN and POUT Subcommands (DISCRIMINANT command)
FIN and FOUT Subcommands (DISCRIMINANT command)
VIN Subcommand (DISCRIMINANT command)
MAXSTEPS Subcommand (DISCRIMINANT command)
FUNCTIONS Subcommand (DISCRIMINANT command)
PRIORS Subcommand (DISCRIMINANT command)
STATISTICS Subcommand (DISCRIMINANT command)
ROTATE Subcommand (DISCRIMINANT command)
HISTORY Subcommand (DISCRIMINANT command)
CLASSIFY Subcommand (DISCRIMINANT command)
PLOT Subcommand (DISCRIMINANT command)
MISSING Subcommand (DISCRIMINANT command)
MATRIX Subcommand (DISCRIMINANT command)


STATISTICS Subcommand (DISCRIMINANT command)

DISCRIMINANT (command),DISCRIMINANT (command),DISCRIMINANT (command)
STATISTICS subcommand,STATISTICS subcommand,STATISTICS subcommand
STATISTICS (subcommand),STATISTICS (subcommand),STATISTICS (subcommand)
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command

By default, DISCRIMINANT produces the following statistics for each analysis: analysis case processing summary, valid numbers of cases in group statistics, variables failing tolerance test, a summary of canonical discriminant functions, standardized canonical discriminant function coefficients, a structure matrix showing pooled within-groups correlations between the discriminant functions and the predictor variables, and functions at group centroids.

• Group statistics. Only valid number of cases is reported.

eigenvalues,eigenvalues,eigenvalues
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command

• Summary of canonical discriminant functions. Displayed in two tables: an eigenvalues table with percentage of variance, cumulative percentage of variance, and canonical correlations and a Wilks’ lambda table with Wilks’ lambda, chi-square, degrees of freedom, and significance.

• Stepwise statistics. Wilks’ lambda, equivalent F, degrees of freedom, significance of F and number of variables are reported for each step. Tolerance, F-to-remove, and the value of the statistic used for variable selection are reported for each variable in the equation. Tolerance, minimum tolerance, F-to-enter, and the value of the statistic used for variable selection are reported for each variable not in the equation. (These statistics can be suppressed with HISTORY=NONE.)

discriminant function coefficients,discriminant function coefficients,discriminant function coefficients
standardized,standardized,standardized
structure matrix,structure matrix,structure matrix
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command

• Final statistics. Standardized canonical discriminant function coefficients, the structure matrix of discriminant functions and all variables named in the analysis (whether they were entered into the equation or not), and functions evaluated at group means are reported following the last step.

In addition, you can request optional statistics on the STATISTICS subcommand. STATISTICS can be specified by itself or with one or more keywords.

• STATISTICS without keywords displays MEAN, STDDEV, and UNIVF. If you include a keyword or keywords on STATISTICS, only the statistics you request are displayed.

MEAN (keyword),MEAN (keyword),MEAN (keyword)
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command
STDDEV (keyword),STDDEV (keyword),STDDEV (keyword)
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command
analysis of variance,analysis of variance,analysis of variance
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command
UNIVF (keyword),UNIVF (keyword),UNIVF (keyword)
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command
DISCRIMINANT (command),DISCRIMINANT (command),DISCRIMINANT (command)
matrices,matrices,matrices
covariance matrix,covariance matrix,covariance matrix
pooled within-groups,pooled within-groups,pooled within-groups
COV (keyword),COV (keyword),COV (keyword)
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command
correlation matrix,correlation matrix,correlation matrix
pooled within-groups,pooled within-groups,pooled within-groups
CORR (keyword),CORR (keyword),CORR (keyword)
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command
analysis of variance,analysis of variance,analysis of variance
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command
FPAIR (keyword),FPAIR (keyword),FPAIR (keyword)
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command
Box's M test,Box's M test,Box's M test
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command
BOXM (keyword),BOXM (keyword),BOXM (keyword)
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command
covariance matrix,covariance matrix,covariance matrix
separate-groups,separate-groups,separate-groups
GCOV (keyword),GCOV (keyword),GCOV (keyword)
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command
covariance matrix,covariance matrix,covariance matrix
total,total,total
TCOV (keyword),TCOV (keyword),TCOV (keyword)
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command
DISCRIMINANT (command),DISCRIMINANT (command),DISCRIMINANT (command)
function coefficients,function coefficients,function coefficients
discriminant function coefficients,discriminant function coefficients,discriminant function coefficients
unstandardized,unstandardized,unstandardized
RAW (keyword),RAW (keyword),RAW (keyword)
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command
Fisher's classification function coefficients,Fisher's classification function coefficients,Fisher's classification function coefficients
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command
COEFF (keyword),COEFF (keyword),COEFF (keyword)
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command
DISCRIMINANT (command),DISCRIMINANT (command),DISCRIMINANT (command)
classification summary,classification summary,classification summary
confusion matrix,confusion matrix,confusion matrix
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command
TABLE (keyword),TABLE (keyword),TABLE (keyword)
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command
classification tables,classification tables,classification tables
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command
CROSSVALID (keyword),CROSSVALID (keyword),CROSSVALID (keyword)
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command
DISCRIMINANT (command),DISCRIMINANT (command),DISCRIMINANT (command)
cross-validation,cross-validation,cross-validation
ALL (keyword),ALL (keyword),ALL (keyword)
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command
MEAN | Means. Total and group means for all variables named on the ANALYSIS subcommand are displayed.
STDDEV | Standard deviations. Total and group standard deviations for all variables named on the ANALYSIS subcommand are displayed.
UNIVF | Univariate F ratios. The analysis-of-variance F statistic for equality of group means for each predictor variable is displayed. This is a one-way analysis-of-variance test for equality of group means on a single discriminating variable.
COV | Pooled within-groups covariance matrix.
CORR | Pooled within-groups correlation matrix.
FPAIR | Matrix of pairwise F ratios. The F ratio for each pair of groups is displayed. This F is the significance test for the Mahalanobis distance between groups. This statistic is available only with stepwise methods.
BOXM | Box’s M test. This is a test for equality of group covariance matrices.
GCOV | Group covariance matrices.
TCOV | Total covariance matrix.
RAW | Unstandardized canonical discriminant functions.
COEFF | Classification function coefficients. Although DISCRIMINANT does not directly use these coefficients to classify cases, you can use them to classify other samples (see the CLASSIFY subcommand).
TABLE | Classification results. If both selected and unselected cases are classified, the results are reported separately. To obtain cross-validated results for selected cases, specify CROSSVALID.
CROSSVALID | Cross-validated classification results. The cross-validation is done by treating n–1 out of n observations as the training dataset to determine the discrimination rule and using the rule to classify the one observation left out. The results are displayed only for selected cases.
ALL | All optional statistics.

Related Topics

DISCRIMINANT
Overview (DISCRIMINANT command)
Examples (DISCRIMINANT command)
GROUPS Subcommand (DISCRIMINANT command)
VARIABLES Subcommand (DISCRIMINANT command)
SELECT Subcommand (DISCRIMINANT command)
ANALYSIS Subcommand (DISCRIMINANT command)
METHOD Subcommand (DISCRIMINANT command)
OUTFILE Subcommand (DISCRIMINANT command)
TOLERANCE Subcommand (DISCRIMINANT command)
PIN and POUT Subcommands (DISCRIMINANT command)
FIN and FOUT Subcommands (DISCRIMINANT command)
VIN Subcommand (DISCRIMINANT command)
MAXSTEPS Subcommand (DISCRIMINANT command)
FUNCTIONS Subcommand (DISCRIMINANT command)
PRIORS Subcommand (DISCRIMINANT command)
SAVE Subcommand (DISCRIMINANT command)
ROTATE Subcommand (DISCRIMINANT command)
HISTORY Subcommand (DISCRIMINANT command)
CLASSIFY Subcommand (DISCRIMINANT command)
PLOT Subcommand (DISCRIMINANT command)
MISSING Subcommand (DISCRIMINANT command)
MATRIX Subcommand (DISCRIMINANT command)


ROTATE Subcommand (DISCRIMINANT command)

ROTATE (subcommand),ROTATE (subcommand),ROTATE (subcommand)
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command
DISCRIMINANT (command),DISCRIMINANT (command),DISCRIMINANT (command)
ROTATE subcommand,ROTATE subcommand,ROTATE subcommand
DISCRIMINANT (command),DISCRIMINANT (command),DISCRIMINANT (command)
rotation of matrices,rotation of matrices,rotation of matrices

The coefficient and correlation matrices can be rotated to facilitate interpretation of results. To control varimax rotation, use the ROTATE subcommand.

• Neither COEFF nor STRUCTURE affects the classification of cases.

pattern matrix,pattern matrix,pattern matrix
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command
COEFF (keyword),COEFF (keyword),COEFF (keyword)
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command
structure matrix,structure matrix,structure matrix
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command
STRUCTURE (keyword),STRUCTURE (keyword),STRUCTURE (keyword)
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command
COEFF | Rotate pattern matrix. DISCRIMINANT displays a varimax transformation matrix, a rotated standardized canonical discriminant function coefficients table, and a correlations between variables and rotated functions table.
STRUCTURE | Rotate structure matrix. DISCRIMINANT displays a varimax transformation matrix, a rotated structure matrix, and a rotated standardized canonical discriminant function coefficients table.
NONE | Do not rotate. This is the default.

Related Topics

DISCRIMINANT
Overview (DISCRIMINANT command)
Examples (DISCRIMINANT command)
GROUPS Subcommand (DISCRIMINANT command)
VARIABLES Subcommand (DISCRIMINANT command)
SELECT Subcommand (DISCRIMINANT command)
ANALYSIS Subcommand (DISCRIMINANT command)
METHOD Subcommand (DISCRIMINANT command)
OUTFILE Subcommand (DISCRIMINANT command)
TOLERANCE Subcommand (DISCRIMINANT command)
PIN and POUT Subcommands (DISCRIMINANT command)
FIN and FOUT Subcommands (DISCRIMINANT command)
VIN Subcommand (DISCRIMINANT command)
MAXSTEPS Subcommand (DISCRIMINANT command)
FUNCTIONS Subcommand (DISCRIMINANT command)
PRIORS Subcommand (DISCRIMINANT command)
SAVE Subcommand (DISCRIMINANT command)
STATISTICS Subcommand (DISCRIMINANT command)
HISTORY Subcommand (DISCRIMINANT command)
CLASSIFY Subcommand (DISCRIMINANT command)
PLOT Subcommand (DISCRIMINANT command)
MISSING Subcommand (DISCRIMINANT command)
MATRIX Subcommand (DISCRIMINANT command)


HISTORY Subcommand (DISCRIMINANT command)

HISTORY (subcommand),HISTORY (subcommand),HISTORY (subcommand)
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command
DISCRIMINANT (command),DISCRIMINANT (command),DISCRIMINANT (command)
HISTORY subcommand,HISTORY subcommand,HISTORY subcommand
DISCRIMINANT (command),DISCRIMINANT (command),DISCRIMINANT (command)
stepwise output,stepwise output,stepwise output

HISTORY controls the display of stepwise and summary output.

• By default, HISTORY displays both the step-by-step output and the summary table (keyword STEP, alias END).

END (keyword),END (keyword),END (keyword)
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command
STEP (keyword),STEP (keyword),STEP (keyword)
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command
NONE (keyword),NONE (keyword),NONE (keyword)
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command
STEP | Display step-by-step and summary output. Alias END. This is the default. See Stepwise statistics in STATISTICS Subcommand.
NONE | Suppress the step-by-step and summary table. Alias NOSTEP, NOEND.

Related Topics

DISCRIMINANT
Overview (DISCRIMINANT command)
Examples (DISCRIMINANT command)
GROUPS Subcommand (DISCRIMINANT command)
VARIABLES Subcommand (DISCRIMINANT command)
SELECT Subcommand (DISCRIMINANT command)
ANALYSIS Subcommand (DISCRIMINANT command)
METHOD Subcommand (DISCRIMINANT command)
OUTFILE Subcommand (DISCRIMINANT command)
TOLERANCE Subcommand (DISCRIMINANT command)
PIN and POUT Subcommands (DISCRIMINANT command)
FIN and FOUT Subcommands (DISCRIMINANT command)
VIN Subcommand (DISCRIMINANT command)
MAXSTEPS Subcommand (DISCRIMINANT command)
FUNCTIONS Subcommand (DISCRIMINANT command)
PRIORS Subcommand (DISCRIMINANT command)
SAVE Subcommand (DISCRIMINANT command)
STATISTICS Subcommand (DISCRIMINANT command)
ROTATE Subcommand (DISCRIMINANT command)
CLASSIFY Subcommand (DISCRIMINANT command)
PLOT Subcommand (DISCRIMINANT command)
MISSING Subcommand (DISCRIMINANT command)
MATRIX Subcommand (DISCRIMINANT command)


CLASSIFY Subcommand (DISCRIMINANT command)

CLASSIFY (subcommand),CLASSIFY (subcommand),CLASSIFY (subcommand)
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command
DISCRIMINANT (command),DISCRIMINANT (command),DISCRIMINANT (command)
CLASSIFY subcommand,CLASSIFY subcommand,CLASSIFY subcommand
DISCRIMINANT (command),DISCRIMINANT (command),DISCRIMINANT (command)
classification phase,classification phase,classification phase

CLASSIFY determines how cases are handled during classification.

• By default, all cases with nonmissing values for all predictors are classified, and the pooled within-groups covariance matrix is used to classify cases.

• The default keywords for CLASSIFY are NONMISSING and POOLED.

NONMISSING (keyword),NONMISSING (keyword),NONMISSING (keyword)
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command
UNSELECTED (keyword),UNSELECTED (keyword),UNSELECTED (keyword)
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command
UNCLASSIFIED (keyword),UNCLASSIFIED (keyword),UNCLASSIFIED (keyword)
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command
covariance matrix,covariance matrix,covariance matrix
pooled within-groups,pooled within-groups,pooled within-groups
POOLED (keyword),POOLED (keyword),POOLED (keyword)
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command
covariance matrix,covariance matrix,covariance matrix
separate-groups,separate-groups,separate-groups
SEPARATE (keyword),SEPARATE (keyword),SEPARATE (keyword)
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command
mean substitution,mean substitution,mean substitution
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command
MEANSUBSTITUTION (keyword),MEANSUBSTITUTION (keyword),MEANSUBSTITUTION (keyword)
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command
NONMISSING | Classify all cases that do not have missing values on any predictor variables. Two sets of classification results are produced, one for selected cases (those specified on the SELECT subcommand) and one for unselected cases. This is the default.
UNSELECTED | Classify only unselected cases. The classification phase is suppressed for cases selected via the SELECT subcommand. If all cases are selected (when the SELECT subcommand is omitted), the classification phase is suppressed for all cases and no classification results are produced.
UNCLASSIFIED | Classify only unclassified cases. The classification phase is suppressed for cases that fall within the range specified on the GROUPS subcommand.
POOLED | Use the pooled within-groups covariance matrix to classify cases. This is the default.
SEPARATE | Use separate-groups covariance matrices of the discriminant functions for classification. DISCRIMINANT displays the group covariances of canonical discriminant functions and Box’s test of equality of covariance matrices of canonical discriminant functions. Since classification is based on the discriminant functions and not the original variables, this option is not necessarily equivalent to quadratic discrimination.
MEANSUB | Substitute means for missing predictor values during classification. During classification, means are substituted for missing values and cases with missing values are classified. Cases with missing values are not used during analysis.

Related Topics

DISCRIMINANT
Overview (DISCRIMINANT command)
Examples (DISCRIMINANT command)
GROUPS Subcommand (DISCRIMINANT command)
VARIABLES Subcommand (DISCRIMINANT command)
SELECT Subcommand (DISCRIMINANT command)
ANALYSIS Subcommand (DISCRIMINANT command)
METHOD Subcommand (DISCRIMINANT command)
OUTFILE Subcommand (DISCRIMINANT command)
TOLERANCE Subcommand (DISCRIMINANT command)
PIN and POUT Subcommands (DISCRIMINANT command)
FIN and FOUT Subcommands (DISCRIMINANT command)
VIN Subcommand (DISCRIMINANT command)
MAXSTEPS Subcommand (DISCRIMINANT command)
FUNCTIONS Subcommand (DISCRIMINANT command)
PRIORS Subcommand (DISCRIMINANT command)
SAVE Subcommand (DISCRIMINANT command)
STATISTICS Subcommand (DISCRIMINANT command)
ROTATE Subcommand (DISCRIMINANT command)
HISTORY Subcommand (DISCRIMINANT command)
PLOT Subcommand (DISCRIMINANT command)
MISSING Subcommand (DISCRIMINANT command)
MATRIX Subcommand (DISCRIMINANT command)


PLOT Subcommand (DISCRIMINANT command)

PLOT (subcommand),PLOT (subcommand),PLOT (subcommand)
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command
DISCRIMINANT (command),DISCRIMINANT (command),DISCRIMINANT (command)
PLOT subcommand,PLOT subcommand,PLOT subcommand

PLOT requests additional output to help you examine the effectiveness of the discriminant analysis.

• If PLOT is specified without keywords, the default is COMBINED and CASES.

• If any keywords are requested on PLOT, only the requested plots are displayed.

• If PLOT is specified with any keyword except MAP, DISCRIMINANT displays a classification processing summary table and a prior probabilities for groups table.

scatterplots,scatterplots,scatterplots
all-groups,all-groups,all-groups
COMBINED (keyword),COMBINED (keyword),COMBINED (keyword)
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command
DISCRIMINANT (command),DISCRIMINANT (command),DISCRIMINANT (command)
function coefficients,function coefficients,function coefficients
discriminant scores,discriminant scores,discriminant scores
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command
CASES (keyword),CASES (keyword),CASES (keyword)
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command
territorial map,territorial map,territorial map
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command
MAP (keyword),MAP (keyword),MAP (keyword)
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command
scatterplots,scatterplots,scatterplots
separate-groups,separate-groups,separate-groups
ALL (keyword),ALL (keyword),ALL (keyword)
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command
COMBINED | All-groups plot. For each case, the first two function values are plotted.
CASES(n) | Casewise statistics. For each case, classification information, squared Mahalanobis distance to centroid for the highest and second highest groups, and discriminant scores of all functions are plotted. Validated statistics are displayed for selected cases if CROSSVALID is specified on STATISTICS. If n is specified, DISCRIMINANT displays the first n cases only.
MAP | Territorial map. A plot of group centroids and boundaries used for classifying groups.
SEPARATE | Separate-groups plots. These are the same types of plots produced by the keyword COMBINED, except that a separate plot is produced for each group. If only one function is used, a histogram is displayed.
ALL | All available plots.

Related Topics

DISCRIMINANT
Overview (DISCRIMINANT command)
Examples (DISCRIMINANT command)
GROUPS Subcommand (DISCRIMINANT command)
VARIABLES Subcommand (DISCRIMINANT command)
SELECT Subcommand (DISCRIMINANT command)
ANALYSIS Subcommand (DISCRIMINANT command)
METHOD Subcommand (DISCRIMINANT command)
OUTFILE Subcommand (DISCRIMINANT command)
TOLERANCE Subcommand (DISCRIMINANT command)
PIN and POUT Subcommands (DISCRIMINANT command)
FIN and FOUT Subcommands (DISCRIMINANT command)
VIN Subcommand (DISCRIMINANT command)
MAXSTEPS Subcommand (DISCRIMINANT command)
FUNCTIONS Subcommand (DISCRIMINANT command)
PRIORS Subcommand (DISCRIMINANT command)
SAVE Subcommand (DISCRIMINANT command)
STATISTICS Subcommand (DISCRIMINANT command)
ROTATE Subcommand (DISCRIMINANT command)
HISTORY Subcommand (DISCRIMINANT command)
CLASSIFY Subcommand (DISCRIMINANT command)
MISSING Subcommand (DISCRIMINANT command)
MATRIX Subcommand (DISCRIMINANT command)


MISSING Subcommand (DISCRIMINANT command)

DISCRIMINANT (command),DISCRIMINANT (command),DISCRIMINANT (command)
MISSING subcommand,MISSING subcommand,MISSING subcommand
MISSING (subcommand),MISSING (subcommand),MISSING (subcommand)
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command
DISCRIMINANT (command),DISCRIMINANT (command),DISCRIMINANT (command)
missing values,missing values,missing values

MISSING controls the treatment of cases with missing values in the analysis phase. By default, cases with missing values for any variable named on the VARIABLES subcommand are not used in the analysis phase but are used in classification.

• The keyword INCLUDE includes cases with user-missing values in the analysis phase.

• Cases with missing or out-of-range values for the grouping variable are always excluded.

EXCLUDE (keyword),EXCLUDE (keyword),EXCLUDE (keyword)
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command
INCLUDE (keyword),INCLUDE (keyword),INCLUDE (keyword)
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command
EXCLUDE | Exclude all cases with missing values. Cases with user or system-missing values are excluded from the analysis. This is the default.
INCLUDE | Include cases with user-missing values. User-missing values are treated as valid values. Only the system-missing value is treated as missing.

Related Topics

DISCRIMINANT
Overview (DISCRIMINANT command)
Examples (DISCRIMINANT command)
GROUPS Subcommand (DISCRIMINANT command)
VARIABLES Subcommand (DISCRIMINANT command)
SELECT Subcommand (DISCRIMINANT command)
ANALYSIS Subcommand (DISCRIMINANT command)
METHOD Subcommand (DISCRIMINANT command)
OUTFILE Subcommand (DISCRIMINANT command)
TOLERANCE Subcommand (DISCRIMINANT command)
PIN and POUT Subcommands (DISCRIMINANT command)
FIN and FOUT Subcommands (DISCRIMINANT command)
VIN Subcommand (DISCRIMINANT command)
MAXSTEPS Subcommand (DISCRIMINANT command)
FUNCTIONS Subcommand (DISCRIMINANT command)
PRIORS Subcommand (DISCRIMINANT command)
SAVE Subcommand (DISCRIMINANT command)
STATISTICS Subcommand (DISCRIMINANT command)
ROTATE Subcommand (DISCRIMINANT command)
HISTORY Subcommand (DISCRIMINANT command)
CLASSIFY Subcommand (DISCRIMINANT command)
PLOT Subcommand (DISCRIMINANT command)
MATRIX Subcommand (DISCRIMINANT command)


MATRIX Subcommand (DISCRIMINANT command)

DISCRIMINANT (command),DISCRIMINANT (command),DISCRIMINANT (command)
matrix output,matrix output,matrix output
DISCRIMINANT (command),DISCRIMINANT (command),DISCRIMINANT (command)
matrix input,matrix input,matrix input
MATRIX (subcommand),MATRIX (subcommand),MATRIX (subcommand)
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command
DISCRIMINANT (command),DISCRIMINANT (command),DISCRIMINANT (command)
MATRIX subcommand,MATRIX subcommand,MATRIX subcommand
matrix output,matrix output,matrix output
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command
matrix input,matrix input,matrix input
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command

MATRIX reads and writes PASW Statistics matrix data files.

OUT (keyword),OUT (keyword),OUT (keyword)
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command
IN (keyword),IN (keyword),IN (keyword)
DISCRIMINANT command,DISCRIMINANT command,DISCRIMINANT command

• Either IN or OUT and the matrix file in parentheses are required. When both IN and OUT are used in the same DISCRIMINANT procedure, they can be specified on separate MATRIX subcommands or on the same subcommand.

OUT ('savfile'|'dataset') | Write a matrix data file. Specify either a quoted file specification, a previously declared dataset name (DATASET DECLARE command) or an asterisk (*), enclosed in parentheses. If you specify an asterisk (*), the matrix data file replaces the active dataset .
IN ('savfile'|'dataset') | Read a matrix data file. Specify either a quoted file specification, a previously declared dataset name (DATASET DECLARE command) or an asterisk (*), enclosed in parentheses. An asterisk indicates the active dataset. A matrix file read from an a file or dataset does not replace the active dataset.

Related Topics

DISCRIMINANT
Overview (DISCRIMINANT command)
Examples (DISCRIMINANT command)
GROUPS Subcommand (DISCRIMINANT command)
VARIABLES Subcommand (DISCRIMINANT command)
SELECT Subcommand (DISCRIMINANT command)
ANALYSIS Subcommand (DISCRIMINANT command)
METHOD Subcommand (DISCRIMINANT command)
OUTFILE Subcommand (DISCRIMINANT command)
TOLERANCE Subcommand (DISCRIMINANT command)
PIN and POUT Subcommands (DISCRIMINANT command)
FIN and FOUT Subcommands (DISCRIMINANT command)
VIN Subcommand (DISCRIMINANT command)
MAXSTEPS Subcommand (DISCRIMINANT command)
FUNCTIONS Subcommand (DISCRIMINANT command)
PRIORS Subcommand (DISCRIMINANT command)
SAVE Subcommand (DISCRIMINANT command)
STATISTICS Subcommand (DISCRIMINANT command)
ROTATE Subcommand (DISCRIMINANT command)
HISTORY Subcommand (DISCRIMINANT command)
CLASSIFY Subcommand (DISCRIMINANT command)
PLOT Subcommand (DISCRIMINANT command)
MISSING Subcommand (DISCRIMINANT command)
Matrix Output (DISCRIMINANT command)
Matrix Input (DISCRIMINANT command)
Format of the Matrix Data File (DISCRIMINANT command)
Split Files (DISCRIMINANT command)
STDDEV and CORR Records (DISCRIMINANT command)
Missing Values (DISCRIMINANT command)
Examples (DISCRIMINANT command)


Matrix Output (DISCRIMINANT command)

• In addition to Pearson correlation coefficients, the matrix materials written by DISCRIMINANT include weighted and unweighted numbers of cases, means, and standard deviations. (See Format of the Matrix Data File for a description of the file.) These materials can be used in subsequent DISCRIMINANT procedures.

• Any documents contained in the active dataset are not transferred to the matrix file.

• If BOXM or GCOV is specified on the STATISTICS subcommand or SEPARATE is specified on the CLASSIFY subcommand when a matrix file is written, the STDDEV and CORR records in the matrix materials represent within-cell data, and separate covariance matrices are written to the file. When the matrix file is used as input for a subsequent DISCRIMINANT procedure, at least one of these specifications must be used on that DISCRIMINANT command.

Related Topics

MATRIX Subcommand (DISCRIMINANT command)
Matrix Input (DISCRIMINANT command)
Format of the Matrix Data File (DISCRIMINANT command)
Split Files (DISCRIMINANT command)
STDDEV and CORR Records (DISCRIMINANT command)
Missing Values (DISCRIMINANT command)
Examples (DISCRIMINANT command)


Matrix Input (DISCRIMINANT command)

• DISCRIMINANT can read correlation matrices written by a previous DISCRIMINANT command or by other procedures. Matrix materials read by DISCRIMINANT must contain records with ROWTYPE_ values MEAN, N or COUNT (or both), STDDEV, and CORR.

• If the data do not include records with ROWTYPE_ value COUNT (unweighted number of cases), DISCRIMINANT uses information from records with ROWTYPE_ value N (weighted number of cases). Conversely, if the data do not have N values, DISCRIMINANT uses the COUNT values. These records can appear in any order in the matrix input file with the following exceptions: the order of split-file groups cannot be violated and all CORR vectors must appear consecutively within each split-file group.

• If you want to use a covariance-type matrix as input to DISCRIMINANT, you must first use the MCONVERT command to change the covariance matrix to a correlation matrix.

• DISCRIMINANT can use a matrix from a previous dataset to classify data in the active dataset. The program checks to make sure that the grouping variable (specified on GROUPS) and the predictor variables (specified on VARIABLES) are the same in the active dataset as in the matrix file. If they are not, the program displays an error message and the classification will not be executed.

• MATRIX=IN cannot be used unless a active dataset has already been defined. To read an existing matrix data file at the beginning of a session, first use GET to retrieve the matrix file and then specify IN(*) on MATRIX.

Related Topics

MATRIX Subcommand (DISCRIMINANT command)
Matrix Output (DISCRIMINANT command)
Format of the Matrix Data File (DISCRIMINANT command)
Split Files (DISCRIMINANT command)
STDDEV and CORR Records (DISCRIMINANT command)
Missing Values (DISCRIMINANT command)
Examples (DISCRIMINANT command)


Format of the Matrix Data File (DISCRIMINANT command)

• The matrix data file has two special variables created by the program: ROWTYPE_ and VARNAME_. Variable ROWTYPE_ is a short string variable having values N, COUNT, MEAN, STDDEV, and CORR (for Pearson correlation coefficient). The variable VARNAME_ is a short string variable whose values are the names of the variables used to form the correlation matrix.

• When ROWTYPE_ is CORR, VARNAME_ gives the variable associated with that row of the correlation matrix.

• Between ROWTYPE_ and VARNAME_ is the grouping variable, which is specified on the GROUPS subcommand of DISCRIMINANT.

• The remaining variables are the variables used to form the correlation matrix.

Related Topics

MATRIX Subcommand (DISCRIMINANT command)
Matrix Output (DISCRIMINANT command)
Matrix Input (DISCRIMINANT command)
Split Files (DISCRIMINANT command)
STDDEV and CORR Records (DISCRIMINANT command)
Missing Values (DISCRIMINANT command)
Examples (DISCRIMINANT command)


Split Files (DISCRIMINANT command)

• When split-file processing is in effect, the first variables in the matrix data file will be split variables, followed by ROWTYPE_, the grouping variable, VARNAME_, and then the variables used to form the correlation matrix.

• A full set of matrix materials is written for each subgroup defined by the split variables.

• A split variable cannot have the same variable name as any other variable written to the matrix data file.

• If split-file processing is in effect when a matrix is written, the same split file must be in effect when that matrix is read by another procedure.

Related Topics

MATRIX Subcommand (DISCRIMINANT command)
Matrix Output (DISCRIMINANT command)
Matrix Input (DISCRIMINANT command)
Format of the Matrix Data File (DISCRIMINANT command)
STDDEV and CORR Records (DISCRIMINANT command)
Missing Values (DISCRIMINANT command)
Examples (DISCRIMINANT command)


STDDEV and CORR Records (DISCRIMINANT command)

Records written with ROWTYPE_ values STDDEV and CORR are influenced by specifications on the STATISTICS and CLASSIFY subcommands.

• If BOXM or GCOV is specified on STATISTICS or SEPARATE is specified on CLASSIFY, the STDDEV and CORR records represent within-cell data and receive values for the grouping variable.

• If none of the above specifications is in effect, the STDDEV and CORR records represent pooled values. The STDDEV vector contains the square root of the mean square error for each variable, and STDDEV and CORR records receive the system-missing value for the grouping variable.

Related Topics

MATRIX Subcommand (DISCRIMINANT command)
Matrix Output (DISCRIMINANT command)
Matrix Input (DISCRIMINANT command)
Format of the Matrix Data File (DISCRIMINANT command)
Split Files (DISCRIMINANT command)
Missing Values (DISCRIMINANT command)
Examples (DISCRIMINANT command)


Missing Values (DISCRIMINANT command)

DISCRIMINANT (command),DISCRIMINANT (command),DISCRIMINANT (command)
missing values,missing values,missing values

Missing-value treatment affects the values written to a matrix data file. When reading a matrix data file, be sure to specify a missing-value treatment on DISCRIMINANT that is compatible with the treatment that was in effect when the matrix materials were generated.

Related Topics

MATRIX Subcommand (DISCRIMINANT command)
Matrix Output (DISCRIMINANT command)
Matrix Input (DISCRIMINANT command)
Format of the Matrix Data File (DISCRIMINANT command)
Split Files (DISCRIMINANT command)
STDDEV and CORR Records (DISCRIMINANT command)
Examples (DISCRIMINANT command)


Examples (DISCRIMINANT command)

Writing Output to a Matrix Data File

GET FILE='/DATA/UNIONBK.SAV' /KEEP WORLD FOOD SERVICE BUS MECHANIC
                  CONSTRUC COOK MANAGER FSALES APPL RENT.
DISCRIMINANT  GROUPS=WORLD(1,3)
 /VARIABLES=FOOD SERVICE BUS MECHANIC CONSTRUC COOK MANAGER FSALES
 /METHOD=WILKS
 /PRIORS=SIZE
 /MATRIX=OUT('/DATA/DISCMTX.SAV').

• DISCRIMINANT reads data from the data file UNIONBK.SAV and writes one set of matrix materials to the file DISCMTX.SAV.

• The active dataset is still UNIONBK.SAV. Subsequent commands are executed on this file.

Using Matrix Output to Classify Data in a Different File

GET FILE=UB2 /KEEP WORLD FOOD SERVICE BUS MECHANIC
              CONSTRUC COOK MANAGER FSALES APPL RENT.
DISCRIMINANT  GROUPS=WORLD(1,3)
 /VARIABLES=FOOD SERVICE BUS MECHANIC CONSTRUC COOK MANAGER FSALES
 /METHOD=WILKS
 /PRIORS=SIZE
 /MATRIX=IN(DISCMTX).

• The matrix data file created in the previous example is used to classify data from the file UB2.

Replacing the Active Dataset with Matrix Data Output

GET FILE=UNIONBK /KEEP WORLD FOOD SERVICE BUS MECHANIC
                  CONSTRUC COOK MANAGER FSALES APPL RENT.
DISCRIMINANT  GROUPS=WORLD(1,3)
 /VARIABLES=FOOD SERVICE BUS MECHANIC CONSTRUC COOK MANAGER FSALES
 /METHOD=WILKS
 /PRIORS=SIZE
 /MATRIX=OUT(*).
LIST.

• DISCRIMINANT writes the same matrix as in the first example. However, the matrix data file replaces the active dataset.

• The LIST command is executed on the matrix file, not on the UNIONBK file.

Using the Active Dataset as Matrix Input

GET FILE=DISCMTX.
DISCRIMINANT  GROUPS=WORLD(1,3)
 /VARIABLES=FOOD SERVICE BUS MECHANIC CONSTRUC COOK MANAGER FSALES
 /METHOD=RAO
 /MATRIX=IN(*).

• This example assumes that you are starting a new session and want to read an existing matrix data file. GET retrieves the matrix data file DISCMTX.

• MATRIX=IN specifies an asterisk because the matrix data file is the active dataset. If MATRIX=IN(DISCMTX) is specified, the program issues an error message.

• If the GET command is omitted, the program issues an error message.

Using Matrix Output as Matrix Input in the Active Dataset

GET FILE=UNIONBK /KEEP WORLD FOOD SERVICE BUS MECHANIC
                  CONSTRUC COOK MANAGER FSALES APPL RENT.
DISCRIMINANT  GROUPS=WORLD(1,3)
 /VARIABLES=FOOD SERVICE BUS MECHANIC CONSTRUC COOK MANAGER FSALES
 /CLASSIFY=SEPARATE
 /MATRIX=OUT(*).
DISCRIMINANT  GROUPS=WORLD(1,3)
 /VARIABLES=FOOD SERVICE BUS MECHANIC CONSTRUC COOK MANAGER FSALES
 /STATISTICS=BOXM
 /MATRIX=IN(*).

• The first DISCRIMINANT command creates a matrix with CLASSIFY=SEPARATE in effect. To read this matrix, the second DISCRIMINANT command must specify either BOXM or GCOV on STATISTICS or SEPARATE on CLASSIFY. STATISTICS=BOXM is used.

Related Topics

MATRIX Subcommand (DISCRIMINANT command)
Matrix Output (DISCRIMINANT command)
Matrix Input (DISCRIMINANT command)
Format of the Matrix Data File (DISCRIMINANT command)
Split Files (DISCRIMINANT command)
STDDEV and CORR Records (DISCRIMINANT command)
Missing Values (DISCRIMINANT command)


DISPLAY

DISPLAY (command),DISPLAY (command),DISPLAY (command)
DISPLAY (command),DISPLAY (command),DISPLAY (command)
syntax chart,syntax chart,syntax chart
release history,release history,release history
DISPLAY [SORTED] [{NAMES**   }] [/VARIABLES=varlist]
                  {INDEX      }
                  {VARIABLES  }
                  {LABELS     }
                  {DICTIONARY }
                  {ATTRIBUTES }
                  {@ATTRIBUTES}

        {[SCRATCH]  }
        {[VECTOR]   }
        {[MACROS]   }
        {[DOCUMENTS]}

**Default if the subcommand is omitted.

This command takes effect immediately. It does not read the active dataset or execute pending transformations. See the topic Command Order for more information.

Release History Collapse Hide details

Release History

Release 14.0

• ATTRIBUTES keyword introduced.

Release 15.0

• @ATTRIBUTES keyword introduced.

Example

DISPLAY SORTED DICTIONARY /VARIABLES=DEPT SALARY SEX TO JOBCAT.

Related Topics

Overview (DISPLAY command)
Examples (DISPLAY command)
SORTED Keyword (DISPLAY command)
VARIABLES Subcommand (DISPLAY command)


Overview (DISPLAY command)

NAMES (keyword),NAMES (keyword),NAMES (keyword)
DISPLAY command,DISPLAY command,DISPLAY command
DOCUMENTS (keyword),DOCUMENTS (keyword),DOCUMENTS (keyword)
DISPLAY command,DISPLAY command,DISPLAY command
DICTIONARY (keyword),DICTIONARY (keyword),DICTIONARY (keyword)
DISPLAY command,DISPLAY command,DISPLAY command
INDEX (keyword),INDEX (keyword),INDEX (keyword)
DISPLAY command,DISPLAY command,DISPLAY command
VARIABLES (keyword),VARIABLES (keyword),VARIABLES (keyword)
DISPLAY command,DISPLAY command,DISPLAY command
LABELS (keyword),LABELS (keyword),LABELS (keyword)
DISPLAY command,DISPLAY command,DISPLAY command
SCRATCH (keyword),SCRATCH (keyword),SCRATCH (keyword)
DISPLAY command,DISPLAY command,DISPLAY command
VECTOR (keyword),VECTOR (keyword),VECTOR (keyword)
DISPLAY command,DISPLAY command,DISPLAY command
MACROS (keyword),MACROS (keyword),MACROS (keyword)
DISPLAY command,DISPLAY command,DISPLAY command
ATTRIBUTES (keyword),ATTRIBUTES (keyword),ATTRIBUTES (keyword)
DISPLAY command,DISPLAY command,DISPLAY command
@ATTRIBUTES (keyword),@ATTRIBUTES (keyword),@ATTRIBUTES (keyword)
DISPLAY command,DISPLAY command,DISPLAY command

DISPLAY exhibits information from the dictionary of the active dataset. The information can be sorted, and it can be limited to selected variables.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is simply the command keyword, which displays an unsorted list of the variables in the active dataset.

Syntax Rules Collapse Hide details

Syntax Rules

DISPLAY can be specified by itself or with one of the keywords defined below. NAMES is the default. To specify two or more keywords, use multiple DISPLAY commands.

NAMES | Variable names. A list of the variables in the active dataset is displayed.
DOCUMENTS | Documentary text. Documentary text is provided on the DOCUMENT and ADD DOCUMENT commands. No error message is issued if there is no documentary information in the active dataset.
DICTIONARY | Complete dictionary information for variables. Information includes variable names, labels, role, sequential position of each variable in the file, print and write formats, missing values, and value labels.
ATTRIBUTES | Variable and data file attributes, except attributes with names that begin with "@" or "$@". Custom attributes defined by the VARIABLE ATTRIBUTE and DATAFILE ATTRIBUTE commands.
@ATTRIBUTES | All variable and data file attributes, including those with names that begin with "@" or "$@".
INDEX | Variable names and positions.
VARIABLES | Variable names, positions, print and write formats, and missing values.
LABELS | Variable names, positions, and variable labels.
SCRATCH | Scratch variable names.
VECTOR | Vector names.
MACROS | Currently defined macros. The macro names are always sorted.
Operations Collapse Hide details

Operations

• DISPLAY directs information to the output.

• If SORTED is not specified, information is displayed according to the order of variables in the active dataset.

• DISPLAY is executed as soon as it is encountered in the command sequence, as long as a dictionary has been defined.

Related Topics

DISPLAY
Examples (DISPLAY command)
SORTED Keyword (DISPLAY command)
VARIABLES Subcommand (DISPLAY command)


Examples (DISPLAY command)

GET FILE="/data/hub.sav".
DISPLAY DOCUMENTS.
DISPLAY DICTIONARY.

• Each DISPLAY command specifies only one keyword. The first requests documentary text and the second requests complete dictionary information for the hub.sav file.

Related Topics

DISPLAY
Overview (DISPLAY command)
SORTED Keyword (DISPLAY command)
VARIABLES Subcommand (DISPLAY command)


SORTED Keyword (DISPLAY command)

SORTED (keyword),SORTED (keyword),SORTED (keyword)
DISPLAY command,DISPLAY command,DISPLAY command

SORTED alphabetizes the display by variable name. SORTED can precede the keywords NAMES, DICTIONARY, INDEX, VARIABLES, LABELS, SCRATCH, or VECTOR.

Example

DISPLAY SORTED DICTIONARY.

• This command displays complete dictionary information for variables in the active dataset, sorted alphabetically by variable name.

Related Topics

DISPLAY
Overview (DISPLAY command)
Examples (DISPLAY command)
VARIABLES Subcommand (DISPLAY command)


VARIABLES Subcommand (DISPLAY command)

VARIABLES (subcommand),VARIABLES (subcommand),VARIABLES (subcommand)
DISPLAY command,DISPLAY command,DISPLAY command
DISPLAY (command),DISPLAY (command),DISPLAY (command)
VARIABLES subcommand,VARIABLES subcommand,VARIABLES subcommand

VARIABLES (alias NAMES) limits the displayed information to a set of specified variables. VARIABLES must be the last specification on DISPLAY and can follow any specification that requests information about variables (all except VECTOR, SCRATCH, DOCUMENTS, and MACROS).

• The only specification is a slash followed by a list of variables. The slash is optional.

• If the keyword SORTED is not specified, information is displayed in the order in which variables are stored in the active dataset, regardless of the order in which variables are named on VARIABLES.

Example

DISPLAY SORTED DICTIONARY
 /VARIABLES=DEPT, SALARY, SEX TO JOBCAT.

• DISPLAY exhibits dictionary information only for the variables named and implied by the keyword TO on the VARIABLES subcommand, sorted alphabetically by variable name.

Related Topics

DISPLAY
Overview (DISPLAY command)
Examples (DISPLAY command)
SORTED Keyword (DISPLAY command)


DMCLUSTER

DMCLUSTER (command),DMCLUSTER (command),DMCLUSTER (command)

DMCLUSTER is available in the Direct Marketing option.

This is an alias for TWOSTEP CLUSTER. See the topic TWOSTEP CLUSTER for more information.


DMLOGISTIC

DMLOGISTIC (command),DMLOGISTIC (command),DMLOGISTIC (command)

DMLOGISTIC is available in the Direct Marketing option.

This is an alias for LOGISTIC REGRESSION. See the topic LOGISTIC REGRESSION for more information.


DMROC

DMROC (command),DMROC (command),DMROC (command)

DMROC is available in the Direct Marketing option.

This is an alias for ROC. See the topic ROC for more information.


DMTABLES

DMTABLES (command),DMTABLES (command),DMTABLES (command)

DMTABLES is available in the Direct Marketing option.

This is an alias for CTABLES. See the topic CTABLES for more information.


DMTREE

DMTREE (command),DMTREE (command),DMTREE (command)

DMTREE is available in the Direct Marketing option.

This is an alias for TREE. See the topic TREE for more information.


DO IF

DO IF (command),DO IF (command),DO IF (command)
DO IF (command),DO IF (command),DO IF (command)
syntax chart,syntax chart,syntax chart
END IF (command),END IF (command),END IF (command)
ELSE IF (command),ELSE IF (command),ELSE IF (command)
ELSE (command),ELSE (command),ELSE (command)
conditional transformations,conditional transformations,conditional transformations
DO IF [(]logical expression[)]

transformation commands

[ELSE IF [(]logical expression[)]]

transformation commands

[ELSE IF [(]logical expression[)]]
  .
  .
  .
[ELSE]

transformation commands

END IF

This command does not read the active dataset. It is stored, pending execution with the next command that reads the dataset. See the topic Command Order for more information.

relational operators,relational operators,relational operators
data transformations,data transformations,data transformations
relational operators,relational operators,relational operators
conditional transformations,conditional transformations,conditional transformations
relational operators,relational operators,relational operators
computing values,computing values,computing values
relational operators,relational operators,relational operators

The following relational operators can be used in logical expressions:

Symbol | Definition
EQ or = | Equal to
NE or ~= or ¬ = or <> | Not equal to
LT or < | Less than
LE or <= | Less than or equal to
GT or > | Greater than
GE or >= | Greater than or equal to
logical operators,logical operators,logical operators
data transformations,data transformations,data transformations
logical operators,logical operators,logical operators
conditional transformations,conditional transformations,conditional transformations
logical operators,logical operators,logical operators
computing values,computing values,computing values
logical operators,logical operators,logical operators

The following logical operators can be used in logical expressions:

Symbol | Definition
AND or & | Both relations must be true
OR or | | Either relation can be true
NOT | Reverses the outcome of an expression

Example

DO IF (YearHired GT 87).
COMPUTE            Bonus = 0.
ELSE IF (Dept87 EQ 3).
COMPUTE            Bonus = .1*Salary87.
ELSE IF (Dept87 EQ 1).
COMPUTE            Bonus = .12*Salary87.
ELSE IF (Dept87 EQ 4).
COMPUTE            Bonus = .08*Salary87.
ELSE IF (Dept87 EQ 2).
COMPUTE            Bonus = .14*Salary87.
END IF.

Related Topics

Overview (DO IF command)
Examples (DO IF command)
Syntax Rules (DO IF command)
Logical Expressions (DO IF command)
Operations (DO IF command)
Flow of Control (DO IF command)
Missing Values and Logical Operators (DO IF command)
ELSE Command (DO IF command)
ELSE IF Command (DO IF command)
Nested DO IF Structures (DO IF command)
Complex File Structures (DO IF command)


Overview (DO IF command)

The DO IF—END IF structure conditionally executes one or more transformations on subsets of cases based on one or more logical expressions. The ELSE command can be used within the structure to execute one or more transformations when the logical expression on DO IF is not true. The ELSE IF command within the structure provides further control.

The DO IF—END IF structure is best used for conditionally executing multiple transformation commands, such as COMPUTE, RECODE, and COUNT. DO IF—END IF transforms data for subsets of cases defined by logical expressions. To perform repeated transformations on the same case, use LOOP—END LOOP.

A DO IF—END IF structure can be used within an input program to define complex files that cannot be handled by standard file definition facilities. See the topic Complex File Structures (DO IF command) for more information.

See END FILE for information on using DO IF—END IF to instruct the program to stop reading data before it encounters the end of the file or to signal the end of the file when creating data.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is DO IF followed by a logical expression, a transformation command, and the END IF command, which has no specifications.

Related Topics

DO IF
Examples (DO IF command)
Syntax Rules (DO IF command)
Logical Expressions (DO IF command)
Operations (DO IF command)
Flow of Control (DO IF command)
Missing Values and Logical Operators (DO IF command)
ELSE Command (DO IF command)
ELSE IF Command (DO IF command)
Nested DO IF Structures (DO IF command)
Complex File Structures (DO IF command)


Examples (DO IF command)

Simple, One-Condition Example

DO IF (YearHired LT 87).
RECODE Ethnicity(1=5)(2=4)(4=2)(5=1).
END IF.

• The RECODE command recodes Ethnicity for those individuals hired before 1987 (YearHired is less than 87). The Ethnicity variable is not recoded for individuals hired in 1987 or later.

• The RECODE command is skipped for any case with a missing value for YearHired.

Conditional Execution Based on a Logical Expression

DATA LIST      FREE / X(F1).
NUMERIC        #QINIT.
DO IF          NOT #QINIT.
+  PRINT EJECT.
+  COMPUTE        #QINIT = 1.
END IF.
PRINT          / X.

BEGIN DATA
1 2 3 4 5
END DATA.
EXECUTE.

• This example shows how to execute a command only once.

• The NUMERIC command creates scratch variable #QINIT, which is initialized to 0.

• The NOT logical operator on DO IF reverses the outcome of a logical expression. In this example, the logical expression is a numeric variable that takes only 0 (false) or 1 (true) as its values. The PRINT EJECT command is executed only once, when the value of scratch variable #QINIT equals 0. After the COMPUTE command sets #QINIT to 1, the DO IF structure is skipped for all subsequent cases. A scratch variable is used because it is initialized to 0 and is not reinitialized after each case.

Related Topics

DO IF
Overview (DO IF command)
Syntax Rules (DO IF command)
Logical Expressions (DO IF command)
Operations (DO IF command)
Flow of Control (DO IF command)
Missing Values and Logical Operators (DO IF command)
ELSE Command (DO IF command)
ELSE IF Command (DO IF command)
Nested DO IF Structures (DO IF command)
Complex File Structures (DO IF command)


Syntax Rules (DO IF command)

• The ELSE IF command is optional and can be repeated as many times as needed.

• The ELSE command is optional. It can be used only once and must follow any ELSE IF commands.

• The END IF command must follow any ELSE IF and ELSE commands.

conditional expressions,conditional expressions,conditional expressions
conditional transformations,conditional transformations,conditional transformations
conditional expressions,conditional expressions,conditional expressions
data transformations,data transformations,data transformations
conditional expressions,conditional expressions,conditional expressions
computing values,computing values,computing values
conditional expressions,conditional expressions,conditional expressions
logical expressions,logical expressions,logical expressions
data transformations,data transformations,data transformations
logical expressions,logical expressions,logical expressions
conditional transformations,conditional transformations,conditional transformations
logical expressions,logical expressions,logical expressions
computing values,computing values,computing values
logical expressions,logical expressions,logical expressions
DO IF (command),DO IF (command),DO IF (command)
logical expressions,logical expressions,logical expressions

• A logical expression must be specified on the DO IF and ELSE IF commands. Logical expressions are not used on the ELSE and END IF commands.

conditional transformations,conditional transformations,conditional transformations
string variables,string variables,string variables
DO IF (command),DO IF (command),DO IF (command)
string variables,string variables,string variables
string variables,string variables,string variables
conditional transformations,conditional transformations,conditional transformations

• String values used in expressions must be specified in quotation marks and must include any leading or trailing blanks. Lowercase letters are distinguished from uppercase letters.

• To create a new string variable within a DO IF—END IF structure, you must first declare the variable on the STRING command.

• DO IF—END IF structures can be nested to any level permitted by available memory. They can be nested within LOOP—END LOOP structures, and loop structures can be nested within DO IF structures.

Example Collapse Hide details

Example

DATA LIST FREE /var1.
BEGIN DATA
1 2 3 4 5
END DATA.
DO IF (var1 > 2) & (var1 < 5).
- COMPUTE var2=1.
ELSE IF (var1=2).
- COMPUTE var2=2.
ELSE.
- COMPUTE var2=3.
END IF.

var1 | var2
1 | 3
2 | 2
3 | 1
4 | 1
5 | 3
Example Collapse Hide details

Example

INPUT PROGRAM.
+ STRING odd (A3).
+ LOOP numvar=1 TO 5.
+  DO IF MOD(numvar, 2)=0.
+   COMPUTE odd='No'.
+  ELSE.
+   COMPUTE odd='Yes'.
+  END IF.
+  END CASE.
+ END LOOP.
+ END FILE.
END INPUT PROGRAM.

numvar | odd
1 | Yes
2 | No
3 | Yes
4 | No
5 | Yes

Related Topics

DO IF
Overview (DO IF command)
Examples (DO IF command)
Logical Expressions (DO IF command)
Operations (DO IF command)
Flow of Control (DO IF command)
Missing Values and Logical Operators (DO IF command)
ELSE Command (DO IF command)
ELSE IF Command (DO IF command)
Nested DO IF Structures (DO IF command)
Complex File Structures (DO IF command)


Logical Expressions (DO IF command)

• Logical expressions can be simple logical variables or relations, or they can be complex logical tests involving variables, constants, functions, relational operators, and logical operators. Logical expressions can use any of the numeric or string functions allowed in COMPUTE transformations (see COMPUTE).

• Parentheses can be used to enclose the logical expression itself and to specify the order of operations within a logical expression. Extra blanks or parentheses can be used to make the expression easier to read.

• Blanks (not commas) are used to separate relational operators from expressions.

• A relation can include variables, constants, or more complicated arithmetic expressions. Relations cannot be abbreviated. For example, the first relation below is valid; the second is not:

Valid: (A EQ 2 OR A EQ 5) Not valid: (A EQ 2 OR 5)

• A relation cannot compare a string variable to a numeric value or variable, or vice versa. A relation cannot compare the result of a logical function (SYSMIS, MISSING, ANY, or RANGE) to a number.

Related Topics

DO IF
Overview (DO IF command)
Examples (DO IF command)
Syntax Rules (DO IF command)
Operations (DO IF command)
Flow of Control (DO IF command)
Missing Values and Logical Operators (DO IF command)
ELSE Command (DO IF command)
ELSE IF Command (DO IF command)
Nested DO IF Structures (DO IF command)
Complex File Structures (DO IF command)


Operations (DO IF command)

• DO IF marks the beginning of the control structure and END IF marks the end. Control for a case is passed out of the structure as soon as a logical condition is met on a DO IF, ELSE IF, or ELSE command.

• A logical expression is evaluated as true, false, or missing. A transformation specified for a logical expression is executed only if the expression is true.

• Logical expressions are evaluated in the following order: functions, exponentiation, arithmetic operations, relations, and finally, logical operators. (For strings, the order is functions, relations, and then logical operators.) When more than one logical operator is used, NOT is evaluated first, followed by AND, and then OR. You can change the order of operations using parentheses.

formats,formats,formats
of new variables,of new variables,of new variables
conditional transformations,conditional transformations,conditional transformations
formats of new variables,formats of new variables,formats of new variables

• Numeric variables created within a DO IF structure are initially set to the system-missing value. By default, they are assigned an F8.2 format.

string variables,string variables,string variables
conditional transformations,conditional transformations,conditional transformations
DO IF (command),DO IF (command),DO IF (command)
string variables,string variables,string variables
conditional transformations,conditional transformations,conditional transformations
string variables,string variables,string variables

• New string variables created within a DO IF structure are initially set to a blank value and are assigned the format specified on the STRING command that creates them.

• If the transformed value of a string variable exceeds the variable’s defined format, the value is truncated. If the value is shorter than the format, the value is right-padded with blanks.

• If WEIGHT is specified within a DO IF structure, it takes effect unconditionally.

• Commands like SET, DISPLAY, SHOW, and so forth specified within a DO IF structure are executed when they are encountered in the command file.

• The DO IF—END IF structure (like LOOP—END LOOP) can include commands such as DATA LIST, END CASE, END FILE, and REREAD, which define complex file structures.

Related Topics

DO IF
Overview (DO IF command)
Examples (DO IF command)
Syntax Rules (DO IF command)
Logical Expressions (DO IF command)
Flow of Control (DO IF command)
Missing Values and Logical Operators (DO IF command)
ELSE Command (DO IF command)
ELSE IF Command (DO IF command)
Nested DO IF Structures (DO IF command)
Complex File Structures (DO IF command)


Flow of Control (DO IF command)

• If the logical expression on DO IF is true, the commands immediately following DO IF are executed up to the next ELSE IF, ELSE, or END IF command. Control then passes to the first statement following END IF.

• If the expression on DO IF is false, control passes to the following ELSE IF command. Multiple ELSE IF commands are evaluated in the order in which they are specified until the logical expression on one of them is true. Commands following that ELSE IF command are executed up to the ELSE or END IF command, and control passes to the first statement following END IF.

• If none of the expressions are true on the DO IF or any of the ELSE IF commands, the commands following ELSE are executed and control passes out of the structure. If there is no ELSE command, a case goes through the entire structure with no change.

conditional transformations,conditional transformations,conditional transformations
missing values,missing values,missing values
DO IF (command),DO IF (command),DO IF (command)
missing values,missing values,missing values

• Missing values returned by the logical expression on DO IF or on any ELSE IF cause control to pass to the END IF command at that point.

Related Topics

DO IF
Overview (DO IF command)
Examples (DO IF command)
Syntax Rules (DO IF command)
Logical Expressions (DO IF command)
Operations (DO IF command)
Missing Values and Logical Operators (DO IF command)
ELSE Command (DO IF command)
ELSE IF Command (DO IF command)
Nested DO IF Structures (DO IF command)
Complex File Structures (DO IF command)


Missing Values and Logical Operators (DO IF command)

missing values,missing values,missing values
and logical operators,and logical operators,and logical operators
logical operators,logical operators,logical operators
missing values,missing values,missing values

When two or more relations are joined by logical operators AND and OR, the program always returns missing if all of the relations in the expression are missing. However, if any one of the relations can be determined, the program tries to return true or false according to the logical outcomes shown in the following table. The asterisk indicates situations where the program can evaluate the outcome with incomplete information.

Logical outcomes
Expression | Outcome | Expression | Outcome
true AND true | = true | true OR true | = true
true AND false | = false | true OR false | = true
false AND false | = false | false OR false | = false
true AND missing | = missing | true OR missing | = true*
missing AND missing | = missing | missing OR missing | = missing
false AND missing | = false* | false OR missing | = missing

Related Topics

DO IF
Overview (DO IF command)
Examples (DO IF command)
Syntax Rules (DO IF command)
Logical Expressions (DO IF command)
Operations (DO IF command)
Flow of Control (DO IF command)
ELSE Command (DO IF command)
ELSE IF Command (DO IF command)
Nested DO IF Structures (DO IF command)
Complex File Structures (DO IF command)


ELSE Command (DO IF command)

DO IF (command),DO IF (command),DO IF (command)
with ELSE command,with ELSE command,with ELSE command

ELSE executes one or more transformations when none of the logical expressions on DO IF or any ELSE IF commands is true.

• Only one ELSE command is allowed within a DO IF—END IF structure.

• ELSE must follow all ELSE IF commands (if any) in the structure.

• If the logical expression on DO IF or any ELSE IF command is true, the program ignores the commands following ELSE.

Example

DO IF (X EQ 0).
COMPUTE Y=1.
ELSE.
COMPUTE Y=2.
END IF.

• Y is set to 1 for all cases with value 0 for X, and Y is 2 for all cases with any other valid value for X.

• The value of Y is not changed by this structure if X is missing.

Example

DO IF (YearHired GT 87).
COMPUTE            Bonus = 0.
ELSE.
IF (Dept87 EQ 1) Bonus = .12*Salary87.
IF (Dept87 EQ 2) Bonus = .14*Salary87.
IF (Dept87 EQ 3) Bonus = .1*Salary87.
IF (Dept87 EQ 4) Bonus = .08*Salary87.
END IF.

• If an individual was hired after 1987 (YearHired is greater than 87), Bonus is set to 0 and control passes out of the structure. Otherwise, control passes to the IF commands following ELSE.

• Each IF command evaluates every case. The value of Bonus is transformed only when the case meets the criteria specified on IF. Compare this structure with the second example for the ELSE IF command, which performs the same task more efficiently.

Example

* Test for listwise deletion of missing values.

DATA LIST / V1 TO V6 1-6.
BEGIN DATA
123456
    56
1 3456
123456
123456
END DATA.

DO IF NMISS(V1 TO V6)=0.
+  COMPUTE SELECT='V'.
ELSE
+  COMPUTE SELECT='M'.
END IF.

FREQUENCIES VAR=SELECT.

• If there are no missing values for any of the variables V1 to V6, COMPUTE sets the value of SELECT equal to V (for valid). Otherwise, COMPUTE sets the value of SELECT equal to M (for missing).

• FREQUENCIES generates a frequency table for SELECT. The table gives a count of how many cases have missing values for one or more variables, and how many cases have valid values for all variables. Commands in this example can be used to determine how many cases are dropped from an analysis that uses listwise deletion of missing values.

Related Topics

DO IF
Overview (DO IF command)
Examples (DO IF command)
Syntax Rules (DO IF command)
Logical Expressions (DO IF command)
Operations (DO IF command)
Flow of Control (DO IF command)
Missing Values and Logical Operators (DO IF command)
ELSE IF Command (DO IF command)
Nested DO IF Structures (DO IF command)
Complex File Structures (DO IF command)


ELSE IF Command (DO IF command)

DO IF (command),DO IF (command),DO IF (command)
with ELSE IF command,with ELSE IF command,with ELSE IF command

ELSE IF executes one or more transformations when the logical expression on DO IF is not true.

• Multiple ELSE IF commands are allowed within the DO IF—END IF structure.

• If the logical expression on DO IF is true, the program executes the commands immediately following DO IF up to the first ELSE IF. Then control passes to the command following the END IF command.

• If the result of the logical expression on DO IF is false, control passes to ELSE IF.

Example

STRING Stock(A9).
DO IF (ITEM EQ 0).
COMPUTE Stock='New'.
ELSE IF (ITEM LE 9).
COMPUTE Stock='Old'.
ELSE.
COMPUTE Stock='Cancelled'.
END IF.

• STRING declares string variable Stock and assigns it a width of nine characters.

• The first COMPUTE is executed for cases with value 0 for ITEM, and then control passes out of the structure. Such cases are not reevaluated by ELSE IF, even though 0 is less than 9.

• When the logical expression on DO IF is false, control passes to the ELSE IF command, where the second COMPUTE is executed only for cases with ITEM less than or equal to 9. Then control passes out of the structure.

• If the logical expressions on both the DO IF and ELSE IF commands are false, control passes to ELSE, where the third COMPUTE is executed.

• The DO IF—END IF structure sets Stock equal to New when ITEM equals 0, to Old when ITEM is less than or equal to 9 but not equal to 0 (including negative numbers if they are valid), and to Cancelled for all valid values of ITEM greater than 9. The value of Stock remains blank if ITEM is missing.

Example

DO IF (YearHired GT 87).
COMPUTE            Bonus = 0.
ELSE IF (Dept87 EQ 3).
COMPUTE            Bonus = .1*Salary87.
ELSE IF (Dept87 EQ 1).
COMPUTE            Bonus = .12*Salary87.
ELSE IF (Dept87 EQ 4).
COMPUTE            Bonus = .08*Salary87.
ELSE IF (Dept87 EQ 2).
COMPUTE            Bonus = .14*Salary87.
END IF.

• For cases hired after 1987, Bonus is set to 0 and control passes out of the structure. For a case that was hired before 1987 with value 3 for Dept87, Bonus equals 10% of salary. Control then passes out of the structure. The other three ELSE IF commands are not evaluated for that case. This differs from the second example for the ELSE command, where the IF command is evaluated for every case. The DO IF—ELSE IF structure shown here is more efficient.

• If Department 3 is the largest, Department 1 the next largest, and so forth, control passes out of the structure quickly for many cases. For a large number of cases or a command file that will be executed frequently, these efficiency considerations can be important.

Related Topics

DO IF
Overview (DO IF command)
Examples (DO IF command)
Syntax Rules (DO IF command)
Logical Expressions (DO IF command)
Operations (DO IF command)
Flow of Control (DO IF command)
Missing Values and Logical Operators (DO IF command)
ELSE Command (DO IF command)
Nested DO IF Structures (DO IF command)
Complex File Structures (DO IF command)


Nested DO IF Structures (DO IF command)

DO IF (command),DO IF (command),DO IF (command)
nested,nested,nested
nested conditions,nested conditions,nested conditions
conditional transformations,conditional transformations,conditional transformations
nested,nested,nested

To perform transformations involving logical tests on two variables, you can use nested DO IF—END IF structures.

• There must be an END IF command for every DO IF command in the structure.

Example

DO IF (Ethnicity EQ 5).         /*Do whites
+  DO IF (Gender EQ 2).       /*White female
+  COMPUTE Gender_Ethnicity=3.
+  ELSE.                   /*White male
+  COMPUTE Gender_Ethnicity=1.
+  END IF.                 /*Whites done
ELSE IF (Gender EQ 2).        /*Nonwhite female
COMPUTE Gender_Ethnicity=4.
ELSE.                      /*Nonwhite male
COMPUTE Gender_Ethnicity=2.
END IF.                    /*Nonwhites done

• This structure creates variable Gender_Ethnicity, which indicates both the sex and minority status of an individual.

• An optional plus sign, minus sign, or period in the first column allows you to indent commands so you can easily see the nested structures.

Related Topics

DO IF
Overview (DO IF command)
Examples (DO IF command)
Syntax Rules (DO IF command)
Logical Expressions (DO IF command)
Operations (DO IF command)
Flow of Control (DO IF command)
Missing Values and Logical Operators (DO IF command)
ELSE Command (DO IF command)
ELSE IF Command (DO IF command)
Complex File Structures (DO IF command)


Complex File Structures (DO IF command)

DATA LIST (command),DATA LIST (command),DATA LIST (command)
with INPUT PROGRAM command,with INPUT PROGRAM command,with INPUT PROGRAM command
INPUT PROGRAM (command),INPUT PROGRAM (command),INPUT PROGRAM (command)
with DATA LIST command,with DATA LIST command,with DATA LIST command
complex files,complex files,complex files
defining,defining,defining

Some complex file structures may require you to embed more than one DATA LIST command inside a DO IF—END IF structure. For example, consider a data file that has been collected from various sources. The information from each source is basically the same, but it is in different places on the records:

111295100FORD      CHAPMAN AUTO SALES
121199005VW    MIDWEST VOLKSWAGEN SALES
11 395025FORD      BETTER USED CARS
11       CHEVY 195005        HUFFMAN SALES & SERVICE
11       VW    595020        MIDWEST VOLKSWAGEN SALES
11       CHEVY 295015        SAM'S AUTO REPAIR
12       CHEVY 210 20        LONGFELLOW CHEVROLET
 9555032 VW                  HYDE PARK IMPORTS

In the above file, an automobile part number always appears in columns 1 and 2, and the automobile manufacturer always appears in columns 10 through 14. The location of other information, such as price and quantity, depends on both the part number and the type of automobile. The DO IF—END IF structure in the following example reads records for part type 11.

input programs,input programs,input programs
examples,examples,examples
DO IF (command),DO IF (command),DO IF (command)
with INPUT PROGRAM command,with INPUT PROGRAM command,with INPUT PROGRAM command
INPUT PROGRAM (command),INPUT PROGRAM (command),INPUT PROGRAM (command)
examples,examples,examples

Example

INPUT PROGRAM.
DATA LIST FILE="/data/carparts.txt"
  /PARTNO 1-2 KIND 10-14 (A).

DO IF (PARTNO EQ 11 AND KIND EQ 'FORD').
+ REREAD.
+ DATA LIST /PRICE 3-6 (2) QUANTITY 7-9 BUYER 20-43 (A).
+ END CASE.

ELSE IF (PARTNO EQ 11 AND (KIND EQ 'CHEVY' OR KIND EQ 'VW')).
+ REREAD.
+ DATA LIST /PRICE 15-18 (2) QUANTITY 19-21 BUYER 30-53 (A).
+ END CASE.
END IF.
END INPUT PROGRAM.

PRINT FORMATS PRICE (DOLLAR6.2).
PRINT /PARTNO TO BUYER.
WEIGHT BY QUANTITY.
DESCRIPTIVES PRICE.

• The first DATA LIST extracts the part number and the type of automobile.

• Depending on the information from the first DATA LIST, the records are reread, pulling the price, quantity, and buyer from different places.

• The two END CASE commands limit the working file to only those cases with a part number of 11 and automobile type of Ford, Chevrolet, or Volkswagen. Without the END CASE commands, cases would be created in the working file for other part numbers and automobile types with missing values for price, quantity, and buyer.

• The results of the PRINT command are shown below.

Printed information for part 11
11 FORD $12.95 100 CHAPMAN AUTO SALES
11 FORD  $3.95 25  BETTER USED CARS
11 CHEVY $1.95 5   HUFFMAN SALES & SERVICE
11 VW    $5.95 20  MIDWEST VOLKSWAGEN SALES
11 CHEVY $2.95 15  SAM’S AUTO REPAIR

Related Topics

DO IF
Overview (DO IF command)
Examples (DO IF command)
Syntax Rules (DO IF command)
Logical Expressions (DO IF command)
Operations (DO IF command)
Flow of Control (DO IF command)
Missing Values and Logical Operators (DO IF command)
ELSE Command (DO IF command)
ELSE IF Command (DO IF command)
Nested DO IF Structures (DO IF command)


DO REPEAT-END REPEAT

DO REPEAT (command),DO REPEAT (command),DO REPEAT (command)
END REPEAT (command),END REPEAT (command),END REPEAT (command)
DO REPEAT (command),DO REPEAT (command),DO REPEAT (command)
syntax chart,syntax chart,syntax chart
release history,release history,release history
DO REPEAT stand-in var={varlist  | ALL  } [/stand-in var=...]
                       {value list}

transformation commands

END REPEAT [PRINT]
Release History Collapse Hide details

Release History

Release 14.0

• ALL keyword introduced.

Example

DO REPEAT var=var1 to var5
         /value=1 to 5.
COMPUTE var=value.
END REPEAT.

This command does not read the active dataset. It is stored, pending execution with the next command that reads the dataset. See the topic Command Order for more information.

Related Topics

Overview (DO REPEAT-END REPEAT command)
Examples (DO REPEAT-END REPEAT command)
PRINT Subcommand (DO REPEAT-END REPEAT command)


Overview (DO REPEAT-END REPEAT command)

The DO REPEAT—END REPEAT structure repeats the same transformations on a specified set of variables, reducing the number of commands you must enter to accomplish a task. This utility does not reduce the number of commands the program executes, just the number of commands you enter. To display the expanded set of commands the program generates, specify PRINT on END REPEAT.

stand-in variable,stand-in variable,stand-in variable
DO REPEAT (command),DO REPEAT (command),DO REPEAT (command)
stand-in variable,stand-in variable,stand-in variable

DO REPEAT uses a stand-in variable to represent a replacement list of variables or values. The stand-in variable is specified as a placeholder on one or more transformation commands within the structure. When the program repeats the transformation commands, the stand-in variable is replaced, in turn, by each variable or value specified on the replacement list.

The following commands can be used within a DO REPEAT—END REPEAT structure:

• Data transformations: COMPUTE, RECODE, IF, COUNT, and SELECT IF

• Data declarations: VECTOR, STRING, NUMERIC, and LEAVE

• Data definition: DATA LIST, MISSING VALUES (but not VARIABLE LABELS or VALUE LABELS)

• Loop structure commands: LOOP, END LOOP, and BREAK

• Do-if structure commands: DO IF, ELSE IF, ELSE, and END IF

• Print and write commands: PRINT, PRINT EJECT, PRINT SPACE, and WRITE

• Format commands: PRINT FORMATS, WRITE FORMATS, and FORMATS

Basic Specification Collapse Hide details

Basic Specification

The basic specification is DO REPEAT, a stand-in variable followed by a required equals sign and a replacement list of variables or values, and at least one transformation command. The structure must end with the END REPEAT command. On the transformation commands, a single stand-in variable represents every variable or value specified on the replacement list.

Syntax Rules Collapse Hide details

Syntax Rules

• Multiple stand-in variables can be specified on a DO REPEAT command. Each stand-in variable must have its own equals sign and associated variable or value list and must be separated from other stand-in variables by a slash. All lists must name or generate the same number of items.

• Stand-in variables can be assigned any valid variable names: permanent, temporary, scratch, system, and so forth. A stand-in variable does not exist outside the DO REPEAT—END REPEAT structure and has no effect on variables with the same name that exist outside the structure. However, two stand-in variables cannot have the same name within the same DO REPEAT structure.

• A replacement variable list can include either new or existing variables. You cannot mix new and existing variables in the same replacement list.

• Keyword TO can be used to name consecutive existing variables and to create a set of new variables, and keyword ALL can be used to specify all variables.

• New string variables must be declared on the STRING command either before DO REPEAT or within the DO REPEAT structure.

• All replacement variable and value lists must have the same number of items.

• A replacement value list can be a list of strings or numeric values, or it can be of the form n1 TO n2, where n1 is less than n2 and both are integers. (Note that the keyword is TO, not THRU.)

Operations Collapse Hide details

Operations

• DO REPEAT marks the beginning of the control structure and END REPEAT marks the end. Once control passes out of the structure, all stand-in variables defined within the structure cease to exist.

• The program repeats the commands between DO REPEAT and END REPEAT once for each variable or value on the replacement list.

• Numeric variables created within the structure are initially set to the system-missing value. By default, they are assigned an F8.2 format.

• New string variables declared within the structure are initially set to a blank value and are assigned the format specified on the STRING command that creates them.

• If DO REPEAT is used to create new variables, the order in which they are created depends on how the transformation commands are specified. Variables created by specifying the TO keyword (for example, V1 TO V5) are not necessarily consecutive in the active dataset. See the topic PRINT Subcommand (DO REPEAT-END REPEAT command) for more information.

• Multiple replacement lists are stepped through in parallel, not in a nested fashion, and all replacement lists must name or generate the same number of items.

Related Topics

DO REPEAT-END REPEAT
Examples (DO REPEAT-END REPEAT command)
PRINT Subcommand (DO REPEAT-END REPEAT command)


Examples (DO REPEAT-END REPEAT command)

INPUT PROGRAM (command),INPUT PROGRAM (command),INPUT PROGRAM (command)
examples,examples,examples
input programs,input programs,input programs
examples,examples,examples
DO REPEAT (command),DO REPEAT (command),DO REPEAT (command)
with INPUT PROGRAM command,with INPUT PROGRAM command,with INPUT PROGRAM command
DO REPEAT (command),DO REPEAT (command),DO REPEAT (command)
with LOOP command,with LOOP command,with LOOP command

Creating Multiple New Variables with the Same Value

DO REPEAT R=REGION1 TO REGION5.
COMPUTE R=0.
END REPEAT.

• DO REPEAT defines the stand-in variable R, which represents five new numeric variables: REGION1, REGION2, REGION3, REGION4, and REGION5.

• The five variables are initialized to 0 by a single COMPUTE specification that is repeated for each variable on the replacement list. Thus, the program generates five COMPUTE commands from the one specified.

• Stand-in variable R ceases to exist once control passes out of the DO REPEAT structure.

Multiple Replacement Lists

DO REPEAT existVar=firstVar TO var5
         /newVar=new1 TO new5
         /value=1 TO 5.
COMPUTE newVar=existVar*value.
END REPEAT PRINT.

****generated COMPUTE commands****
  57 +COMPUTE        new1=firstVar*1
  58 +COMPUTE        new2=secondVar*2
  59 +COMPUTE        new3=var3*3
  60 +COMPUTE        new4=fourthVar*4
  61 +COMPUTE        new5=var5*5.

• existVar=firstVar to var5 includes all existing variables from firstVar to var5, in file order.

• newVar=new1 TO new5 specifies five new variables: var1, var2, var3, var4, and var5.

• value=1 to 5 specifies a list of five consecutive values: 1, 2, 3, 4, 5.

• All three replacement lists contain five items, and five COMPUTE commands are generated.

Generating Data with DO REPEAT, LOOP, and INPUT PROGRAM

* This example shows a typical application of INPUT PROGRAM, LOOP,
   and DO REPEAT. A data file containing random numbers is generated.

INPUT PROGRAM.
+  LOOP #I = 1 TO 1000.
+     DO REPEAT RESPONSE = R1 TO R400.
+          COMPUTE RESPONSE = UNIFORM(1) > 0.5.
+     END REPEAT.
+     COMPUTE AVG = MEAN(R1 TO R400).
+     END CASE.
+   END LOOP.
+   END FILE.
END INPUT PROGRAM.

FREQUENCIES VARIABLE=AVG
 /FORMAT=CONDENSE
 /HISTOGRAM
 /STATISTICS=MEAN MEDIAN MODE STDDEV MIN MAX.

• The INPUT PROGRAM—END INPUT PROGRAM structure encloses an input program that builds cases from transformation commands.

• The indexing variable (#I) on LOOP—END LOOP indicates that the loop should be executed 1000 times.

• The DO REPEAT—END REPEAT structure generates 400 variables, each with a 50% chance of being 0 and a 50% chance of being 1. This is accomplished by specifying a logical expression on COMPUTE that compares the values returned by UNIFORM(1) to the value 0.5. (UNIFORM(1) generates random numbers between 0 and 1.) Logical expressions are evaluated as false (0), true (1), or missing. Thus, each random number returned by UNIFORM that is 0.5 or less is evaluated as false and assigned the value 0, and each random number returned by UNIFORM that is greater than 0.5 is evaluated as true and assigned the value 1.

• The second COMPUTE creates variable AVG, which is the mean of R1 to R400 for each case.

• END CASE builds a case with the variables created within each loop. Thus, the loop structure creates 1000 cases, each with 401 variables (R1 to R400, and AVG).

• END FILE signals the end of the data file generated by the input program. If END FILE were not specified in this example, the input program would go into an infinite loop. No dataset would be built, and the program would display an error message for every procedure that follows the input program.

• FREQUENCIES produces a condensed frequency table, histogram, and statistics for AVG. The histogram for AVG shows a normal distribution.

Related Topics

DO REPEAT-END REPEAT
Overview (DO REPEAT-END REPEAT command)
PRINT Subcommand (DO REPEAT-END REPEAT command)


PRINT Subcommand (DO REPEAT-END REPEAT command)

PRINT (subcommand),PRINT (subcommand),PRINT (subcommand)
DO REPEAT command,DO REPEAT command,DO REPEAT command
DO REPEAT (command),DO REPEAT (command),DO REPEAT (command)
PRINT subcommand,PRINT subcommand,PRINT subcommand

The PRINT subcommand on END REPEAT displays the commands generated by the DO REPEAT—END REPEAT structure. PRINT can be used to verify the order in which commands are executed.

Example

DO REPEAT Q=Q1 TO Q5/ R=R1 TO R5.
COMPUTE Q=0.
COMPUTE R=1.
END REPEAT PRINT.

• The DO REPEAT—END REPEAT structure initializes one set of variables to 0 and another set to 1.

• The output from the PRINT subcommand is shown below. The generated commands are preceded by plus signs.

• The COMPUTE commands are generated in such a way that variables are created in alternating order: Q1, R1, Q2, R2, and so forth. If you plan to use the TO keyword to refer to Q1 to Q5 later, you should use two separate DO REPEAT utilities; otherwise, Q1 to Q5 will include four of the five R variables. Alternatively, use the NUMERIC command to predetermine the order in which variables are added to the active dataset, or specify the replacement value lists as shown in the next example.

Output from the PRINT subcommand
  2	  0	      DO REPEAT Q=Q1 TO Q5/ R=R1 TO R5
  3	  0	      COMPUTE Q=0
  4	  0	      COMPUTE R=1
  5	  0	      END REPEAT PRINT

  6	  0	     +COMPUTE Q1=0
  7	  0	     +COMPUTE R1=1
  8	  0	     +COMPUTE Q2=0
  9	  0	     +COMPUTE R2=1
 10	  0	     +COMPUTE Q3=0
 11	  0	     +COMPUTE R3=1
 12	  0	     +COMPUTE Q4=0
 13	  0	     +COMPUTE R4=1
 14	  0	     +COMPUTE Q5=0
 15	  0	     +COMPUTE R5=1

Example

DO REPEAT Q=Q1 TO Q5,R1 TO R5/ N=0,0,0,0,0,1,1,1,1,1.
COMPUTE Q=N.
END REPEAT PRINT.

• In this example, a series of constants is specified as a stand-in value list for N. All the Q variables are initialized first, and then all the R variables, as shown below.

Output from the PRINT subcommand
  2	  0	           DO REPEAT Q=Q1 TO Q5,R1 TO R5/ N=0,0,0,0,0,1,1,1,1,1
  3	  0	           COMPUTE Q=N
  4	  0	           END REPEAT PRINT

  5	  0	          +COMPUTE Q1=0
  6	  0	          +COMPUTE Q2=0
  7	  0	          +COMPUTE Q3=0
  8	  0	          +COMPUTE Q4=0
  9	  0	          +COMPUTE Q5=0
 10	  0	          +COMPUTE R1=1
 11	  0	          +COMPUTE R2=1
 12	  0	          +COMPUTE R3=1
 13	  0	          +COMPUTE R4=1
 14	  0	          +COMPUTE R5=1

Example

DO REPEAT R=REGION1 TO REGION5/ X=1 TO 5.
COMPUTE R=REGION EQ X.
END REPEAT PRINT.

• In this example, stand-in variable R represents the variable list REGION1 to REGION5. Stand-in variable X represents the value list 1 to 5.

• The DO REPEAT—END REPEAT structure creates dummy variables REGION1 to REGION5 that equal 0 or 1 for each of 5 regions, depending on whether variable REGION equals the current value of stand-in variable X.

• PRINT on END REPEAT causes the program to display the commands generated by the structure, as shown below.

Commands generated by DO REPEAT
  2	  0	  DO REPEAT R=REGION1 TO REGION5/ X=1 TO 5
  3	  0	  COMPUTE R=REGION EQ X
  4	  0	  END REPEAT PRINT

  5	  0	 +COMPUTE REGION1=REGION EQ 1
  6	  0	 +COMPUTE REGION2=REGION EQ 2
  7	  0	 +COMPUTE REGION3=REGION EQ 3
  8	  0	 +COMPUTE REGION4=REGION EQ 4
  9	  0	 +COMPUTE REGION5=REGION EQ 5

Related Topics

DO REPEAT-END REPEAT
Overview (DO REPEAT-END REPEAT command)
Examples (DO REPEAT-END REPEAT command)


DOCUMENT

DOCUMENT (command),DOCUMENT (command),DOCUMENT (command)
syntax chart,syntax chart,syntax chart
DOCUMENT (command),DOCUMENT (command),DOCUMENT (command)
DOCUMENT text

This command takes effect immediately. It does not read the active dataset or execute pending transformations. See the topic Command Order for more information.

Equivalent functionality to the DOCUMENT command is provided by the preferred ADD DOCUMENT command. Syntax for the ADD DOCUMENT command can be generated from the Data File Comments dialog.

Example

DOCUMENT    This file contains a subset of variables from the
            General Social Survey data.  For each case it records
            only the age, sex, education level, marital status,
            number of children, and type of medical insurance
            coverage.

Related Topics

Overview (DOCUMENT command)
Examples (DOCUMENT command)


Overview (DOCUMENT command)

DOCUMENT saves a block of text of any length in data files saved in PASW Statistics format. The documentation can be displayed with the DISPLAY command. (See also ADD DOCUMENT.)

When GET retrieves a data file, or when ADD FILES, MATCH FILES, or UPDATE is used to combine data files, all documents from each specified file are copied into the active dataset. DROP DOCUMENTS can be used to drop those documents from the active dataset. Whether or not DROP DOCUMENTS is used, new documents can be added to the active dataset with the DOCUMENT command.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is DOCUMENT followed by any length of text. The text is stored in the file dictionary when the data file is saved in PASW Statistics format.

Syntax Rules Collapse Hide details

Syntax Rules

• The text can be entered on as many lines as needed.

• Blank lines can be used to separate paragraphs.

• A period at the end of a line terminates the command, so you should not place a period at the end of any line but the last.

• Multiple DOCUMENT commands can be used within the command sequence. However, the DISPLAY command cannot be used to exhibit the text from a particular DOCUMENT command. DISPLAY shows all existing documentation.

Operations Collapse Hide details

Operations

• The documentation and the date it was entered are saved in the data file’s dictionary. New documentation is saved along with any documentation already in the active dataset.

• If a DROP DOCUMENTS command follows a DOCUMENT command anywhere in the command sequence, the documentation added by that DOCUMENT command is dropped from the active dataset along with all other documentation.

Related Topics

DOCUMENT
Examples (DOCUMENT command)


Examples (DOCUMENT command)

Adding Descriptive Text to a Data File

GET FILE="/data/gensoc.sav" /KEEP=AGE SEX EDUC MARITAL CHILDRN MED_INS.
FILE LABEL  General Social Survey subset.

DOCUMENT    This file contains a subset of variables from the
            General Social Survey data.  For each case it records
            only the age, sex, education level, marital status,
            number of children, and type of medical insurance
            coverage.

SAVE OUTFILE="/data/subsoc.sav".

• GET keeps only a subset of variables from the file gensoc.sav. All documentation from the file GENSOC is copied into the active dataset.

• FILE LABEL creates a label for the new active dataset.

• DOCUMENT specifies the new document text. Both existing documents from the file GENSOC and the new document text are saved in the file subsoc.sav.

Replacing Existing DOCUMENT Text

GET FILE="/data/gensoc.sav" /KEEP=AGE SEX EDUC MARITAL CHILDRN MED_INS.

DROP DOCUMENTS.

FILE LABEL  General Social Survey subset.

DOCUMENT    This file contains a subset of variables from the
            General Social Survey data.  For each case it records
            only the age, sex, education level, marital status,
            number of children, and type of medical insurance
            coverage.

SAVE OUTFILE="/data/subsoc.sav".

• DROP DOCUMENTS drops the documentation from the file gensoc.sav as data are copied into the active dataset. Only the new documentation specified on DOCUMENT is saved in the file subsoc.sav.

Related Topics

DOCUMENT
Overview (DOCUMENT command)


DROP DOCUMENTS

DROP DOCUMENTS (command),DROP DOCUMENTS (command),DROP DOCUMENTS (command)
DROP DOCUMENTS (command),DROP DOCUMENTS (command),DROP DOCUMENTS (command)
syntax chart,syntax chart,syntax chart
DROP DOCUMENTS

This command takes effect immediately. It does not read the active dataset or execute pending transformations. See the topic Command Order for more information.

Syntax for the DROP DOCUMENTS command can be generated from the Data File Comments dialog box by selecting existing comments, cutting or deleting them, and clicking Paste.

Related Topics

Overview (DROP DOCUMENTS command)
Examples (DROP DOCUMENTS command)


Overview (DROP DOCUMENTS command)

When GET retrieves PASW Statistics data files, or when ADD FILES, MATCH FILES, or UPDATE are used to combine PASW Statistics data files, all documents from each specified file are copied into the active dataset. DROP DOCUMENTS is used to drop these or any documents added with the DOCUMENT command from the active dataset. Whether or not DROP DOCUMENTS is used, new documents can be added to the active dataset with the DOCUMENT command.

Basic Specification Collapse Hide details

Basic Specification

The only specification is DROP DOCUMENTS. There are no additional specifications.

Operations Collapse Hide details

Operations

• Documents are dropped from the active dataset only. The original data file is unchanged, unless it is resaved.

• DROP DOCUMENTS drops all documentation, including documentation added by any DOCUMENT commands specified prior to the DROP DOCUMENTS command.

Related Topics

DROP DOCUMENTS
Examples (DROP DOCUMENTS command)


Examples (DROP DOCUMENTS command)

GET FILE="/data/gensoc.sav"
  /KEEP=AGE SEX EDUC MARITAL CHILDRN MED_INS.

DROP DOCUMENTS.

FILE LABEL  General Social Survey Subset.
DOCUMENT    This file contains a subset of variables from the
            General Social Survey data.  For each case it records
            only the age, sex, education level, marital status,
            number of children, and type of medical insurance
            coverage.

SAVE OUTFILE="/data/subsoc.sav".

• DROP DOCUMENTS drops the documentation text from data file. Only the new documentation added with the DOCUMENT command is saved in file subsoc.sav.

• The original file gensoc.sav is unchanged.

Related Topics

DROP DOCUMENTS
Overview (DROP DOCUMENTS command)


ECHO

ECHO (command),ECHO (command),ECHO (command)
ECHO (command),ECHO (command),ECHO (command)
syntax chart,syntax chart,syntax chart
ECHO "text".

This command takes effect immediately. It does not read the active dataset or execute pending transformations. See the topic Command Order for more information.

Example

ECHO "Hey! Look at this!".

Related Topics

Overview (ECHO command)


Overview (ECHO command)

ECHO displays the quoted text string as text output.

Basic Specification

The basic specification is the command name ECHO followed by a quoted text string.

Syntax Rules

The text string must be enclosed in single or double quotes, following the standard rules for quoted strings.

• The text string can be continued on multiple lines by enclosing each line in quotes and using the plus sign (+) to combine the strings; the string will be displayed on a single line in output.

Related Topics

ECHO


END CASE

END CASE (command),END CASE (command),END CASE (command)
command syntax,command syntax,command syntax
END CASE (command),END CASE (command),END CASE (command)
END CASE

Example

* Restructure a data file to make each data item into a single case.

INPUT PROGRAM.
DATA LIST /#X1 TO #X3 (3(F1,1X)).

VECTOR V=#X1 TO #X3.

LOOP #I=1 TO 3.
- COMPUTE X=V(#I).
- END CASE.
END LOOP.
END INPUT PROGRAM.

Related Topics

Overview (END CASE command)
Examples (END CASE command)


Overview (END CASE command)

END CASE is used in an INPUT PROGRAM—END INPUT PROGRAM structure to signal that a case is complete. Control then passes to the commands immediately following the input program. After these commands are executed for the newly created case, the program returns to the input program and continues building cases by processing the commands immediately after the last END CASE command that was executed. For more information about the flow control in an input program, see INPUT PROGRAM—END INPUT PROGRAM.

END CASE is especially useful for restructuring files, either building a single case from several cases or building several cases from a single case. It can also be used to generate data without any data input (see DO REPEAT for an example).

Basic Specification Collapse Hide details

Basic Specification

The basic specification is simply END CASE. There are no additional specifications.

Syntax Rules Collapse Hide details

Syntax Rules

• END CASE is available only within an input program and is generally specified within a loop.

• Multiple END CASE commands can be used within an input program. Each builds a case from the transformation and data definition commands executed since the last END CASE command.

• If no END CASE is explicitly specified, an END CASE command is implied immediately before END INPUT PROGRAM and the input program loops until an end-of-file is encountered or specified (see END FILE).

Operations Collapse Hide details

Operations

• When an END CASE command is encountered, the program suspends execution of the rest of the commands before the END INPUT PROGRAM command and passes control to the commands after the input program. After these commands are executed for the new case, control returns to the input program. The program continues building cases by processing the commands immediately after the most recent END CASE command. Use a loop to build cases from the same set of transformation and data definition commands.

• When multiple END CASE commands are specified, the program follows the flow of the input program and builds a case whenever it encounters an END CASE command, using the set of commands executed since the last END CASE.

• Unless LEAVE is specified, all variables are reinitialized each time the input program is resumed.

• When transformations such as COMPUTE, definitions such as VARIABLE LABELS, and utilities such as PRINT are specified between the last END CASE command and END INPUT PROGRAM, they are executed while a case is being initialized, not when it is complete. This may produce undesirable results.

Related Topics

END CASE
Examples (END CASE command)


Examples (END CASE command)

END CASE (command),END CASE (command),END CASE (command)
with VECTOR command,with VECTOR command,with VECTOR command
LOOP (command),LOOP (command),LOOP (command)
examples,examples,examples
VECTOR (command),VECTOR (command),VECTOR (command)
examples,examples,examples
complex files,complex files,complex files
defining,defining,defining
input programs,input programs,input programs
examples,examples,examples
INPUT PROGRAM (command),INPUT PROGRAM (command),INPUT PROGRAM (command)
examples,examples,examples
data files,data files,data files
complex,complex,complex
END CASE (command),END CASE (command),END CASE (command)
with VECTOR command,with VECTOR command,with VECTOR command
VECTOR (command),VECTOR (command),VECTOR (command)
examples,examples,examples

Restructuring a data file to make each data item a single case

INPUT PROGRAM.
DATA LIST /#X1 TO #X3 (3(F1,1X)).

VECTOR V=#X1 TO #X3.

LOOP #I=1 TO 3.
- COMPUTE X=V(#I).
- END CASE.
END LOOP.
END INPUT PROGRAM.

BEGIN DATA
2 1 1
3 5 1
END DATA.
FORMAT X(F1.0).
PRINT / X.
EXECUTE.

• The input program encloses the commands that build cases from the input file. An input program is required because END CASE is used to create multiple cases from single input records.

• DATA LIST defines three variables. In the format specification, the number 3 is a repetition factor that repeats the format in parentheses three times, once for each variable. The specified format is F1 and the 1X specification skips one column.

• VECTOR creates the vector V with the original scratch variables as its three elements. The indexing expression on the LOOP command increments the variable #I three times to control the number of iterations per input case and to provide the index for the vector V.

• COMPUTE sets X equal to each of the scratch variables. END CASE tells the program to build a case. Thus, the first loop (for the first case) sets X equal to the first element of vector V. Since V(1) references #X1, and #X1 is 2, the value of X is 2. Variable X is then formatted and printed before control returns to the command END LOOP. The loop continues, since indexing is not complete. Thus, the program then sets X to #X2, which is 1, builds the second case, and passes it to the FORMAT and PRINT commands. After the third iteration, which sets X equal to 1, the program formats and prints the case and terminates the loop. Since the end of the file has not been encountered, END INPUT PROGRAM passes control to the first command in the input program, DATA LIST, to read the next input case. After the second loop, however, the program encounters END DATA and completes building the active dataset.

• The six new cases are shown below.

Outcome for multiple cases read from a single case
2
1
1
3
5
1

Restructuring a data file to create a separate case for each book order

INPUT PROGRAM.
DATA LIST  /ORDER 1-4 #X1 TO #X22 (1X,11(F3.0,F2.0,1X)).

LEAVE ORDER.
VECTOR BOOKS=#X1 TO #X22.

LOOP #I=1 TO 21 BY 2 IF NOT SYSMIS(BOOKS(#I)).
- COMPUTE ISBN=BOOKS(#I).
- COMPUTE QUANTITY=BOOKS(#I+1).
- END CASE.
END LOOP.
END INPUT PROGRAM.
BEGIN DATA
1045 182 2 155 1 134 1 153 5
1046 155 3 153 5 163 1
1047 161 5 182 2 163 4 186 6
1048 186 2
1049 155 2 163 2 153 2 074 1 161 1
END DATA.

SORT CASES ISBN.
DO IF $CASENUM EQ 1.
- PRINT EJECT /'Order ISBN Quantity'.
- PRINT SPACE.
END IF.

FORMATS ISBN (F3)/ QUANTITY (F2).
PRINT /' ' ORDER ' ' ISBN '  ' QUANTITY.

EXECUTE.

• Data are extracted from a file whose records store values for an invoice number and a series of book codes and quantities ordered. For example, invoice 1045 is for four different titles and a total of nine books: two copies of book 182, one copy each of 155 and 134, and five copies of book 153. The task is to break each individual book order into a record, preserving the order number on each new case.

• The input program encloses the commands that build cases from the input file. They are required because the END CASE command is used to create multiple cases from single input records.

• DATA LIST specifies ORDER as a permanent variable and defines 22 scratch variables to hold the book numbers and quantities (this is the maximum number of numbers and quantities that will fit in 72 columns). In the format specification, the first element skips one space after the value for the variable ORDER. The number 11 repeats the formats that follow it 11 times: once for each book number and quantity pair. The specified format is F3.0 for book numbers and F2.0 for quantities. The 1X specification skips one column after each quantity value.

• LEAVE preserves the value of the variable ORDER across the new cases to be generated.

• VECTOR sets up the vector BOOKS with the 22 scratch variables as its elements. The first element is #X1, the second is #X2, and so on.

• If the element for the vector BOOKS is not system-missing, LOOP initiates the loop structure that moves through the vector BOOKS, picking off the book numbers and quantities. The indexing clause initiates the indexing variable #I at 1, to be increased by 2 to a maximum of 21.

• The first COMPUTE command sets the variable ISBN equal to the element in the vector BOOKS indexed by #I, which is the current book number. The second COMPUTE sets the variable QUANTITY equal to the next element in the vector BOOKS, #I +1, which is the quantity associated with the book number in BOOKS(#I).

• END CASE tells the program to write out a case with the current values of the three variables: ORDER, ISBN, and QUANTITY.

• END LOOP terminates the loop structure and control is returned to the LOOP command, where #I is increased by 2 and looping continues until the entire input case is read or until #I exceeds the maximum value of 21.

• SORT CASES sorts the new cases by book number.

• The DO IF structure encloses a PRINT EJECT command and a PRINT SPACE command to set up titles for the output.

• FORMATS establishes dictionary formats for the new variables ISBN and QUANTITY. PRINT displays the new cases.

• EXECUTE runs the commands. The output is shown below.

PRINT output showing new cases
Order ISBN Quantity
 1049   74    1
 1045  134    1
 1045  153    5
 1046  153    5
 1049  153    2
 1045  155    1
 1046  155    3
 1049  155    2
 1047  161    5
 1049  161    1
 1046  163    1
 1047  163    4
 1049  163    2
 1045  182    2
 1047  182    2
 1047  186    6
 1048  186    2

Create variable that approximates a log-normal distribution

SET FORMAT=F8.0.

INPUT PROGRAM.
LOOP I=1 TO 1000.
+ COMPUTE SCORE=EXP(NORMAL(1)).
+ END CASE.
END LOOP.
END FILE.
END INPUT PROGRAM.

FREQUENCIES VARIABLES=SCORE /FORMAT=NOTABLE /HISTOGRAM
 /PERCENTILES=1 10 20 30 40 50 60 70 80 90 99
 /STATISTICS=ALL.

• The input program creates 1,000 cases with a single variable SCORE. Values for SCORE approximate a log-normal distribution.

Restructure a data file to create a separate case for each individual

INPUT PROGRAM.
DATA LIST  /#RECS 1 HEAD1 HEAD2 3-4(A).    /*Read header info
LEAVE  HEAD1 HEAD2.

LOOP  #I=1 TO #RECS.
DATA LIST  /INDIV 1-2(1).                  /*Read individual info
PRINT  /#RECS HEAD1 HEAD2 INDIV.
END CASE.                                  /*Create combined case
END LOOP.
END INPUT PROGRAM.
BEGIN DATA
1 AC
91
2 CC
35
43
0 XX
1 BA
34
3 BB
42
96
37
END DATA.
LIST.

• Data are in a file with header records that indicate the type of record and the number of individual records that follow. The number of records following each header record varies. For example, the 1 in the first column of the first header record (AC) says that only one individual record (91) follows. The 2 in the first column of the second header record (CC) says that two individual records (35 and 43) follow. The next header record has no individual records, indicated by the 0 in column 1, and so on.

• The first DATA LIST reads the expected number of individual records for each header record into temporary variable #RECS. #RECS is then used as the terminal value in the indexing variable to read the correct number of individual records using the second DATA LIST.

• The variables HEAD1 and HEAD2 contain the information in columns 3 and 4, respectively, in the header records. The LEAVE command retains HEAD1 and HEAD2 so that this information can be spread to the individual records.

• The variable INDIV is the information from the individual record. INDIV is combined with #RECS, HEAD1, and HEAD2 to create the new case. Notice in the output from the PRINT command below that no case is created for the header record with 0 for #RECS.

• END CASE passes each case out of the input program to the LIST command. Without END CASE, the PRINT command would still display the cases because it is inside the loop. However, only one (the last) case per header record would pass out of the input program. The outcome for LIST will be quite different.

PRINT output
1 A C 9.1
2 C C 3.5
2 C C 4.3
1 B A 3.4
3 B B 4.2
3 B B 9.6
3 B B 3.7
LIST output when END CASE is specified
HEAD1 HEAD2 INDIV

A     C      9.1
C     C      3.5
C     C      4.3
B     A      3.4
B     B      4.2
B     B      9.6
B     B      3.7
LIST output when END CASE is not specified
HEAD1 HEAD2 INDIV

A     C      9.1
C     C      4.3
X     X       .
B     A      3.4
B     B      3.7

Related Topics

END CASE
Overview (END CASE command)


END FILE

END FILE (command),END FILE (command),END FILE (command)
END FILE (command),END FILE (command),END FILE (command)
syntax chart,syntax chart,syntax chart
END FILE

Example

INPUT PROGRAM.
DATA LIST FILE=PRICES /YEAR 1-4 QUARTER 6 PRICE 8-12(2).
DO IF (YEAR GE 1881).  /*Stop reading before 1881
END FILE.
END IF.
END INPUT PROGRAM.

Related Topics

Overview (END FILE command)
Examples (END FILE command)


Overview (END FILE command)

END FILE is used in an INPUT PROGRAM—END INPUT PROGRAM structure to tell the program to stop reading data before it actually encounters the end of the file. END FILE can be used with END CASE to concatenate raw data files by causing the program to delay end-of-file processing until it has read multiple data files. END FILE can also be used with LOOP and END CASE to generate data without any data input.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is simply END FILE. There are no additional specifications. The end of file is defined according to the conditions specified for END FILE in the input program.

Syntax Rules Collapse Hide details

Syntax Rules

• END FILE is available only within an INPUT PROGRAM structure.

• Only one END FILE command can be executed per input program. However, multiple END FILE commands can be specified within a conditional structure in the input program.

Operations Collapse Hide details

Operations

• When END FILE is encountered, the program stops reading data and puts an end of file in the active dataset it was building. The case that causes the execution of END FILE is not read. To include this case, use the END CASE command before END FILE (see the examples below).

• END FILE has the same effect as the end of the input data file. It terminates the input program (see INPUT PROGRAM—END INPUT PROGRAM).

Related Topics

END FILE
Examples (END FILE command)


Examples (END FILE command)

input programs,input programs,input programs
examples,examples,examples
INPUT PROGRAM (command),INPUT PROGRAM (command),INPUT PROGRAM (command)
examples,examples,examples
END FILE (command),END FILE (command),END FILE (command)
with END CASE command,with END CASE command,with END CASE command

Stop reading a file based on a data value

*Select cases.

INPUT PROGRAM.
DATA LIST FILE=PRICES /YEAR 1-4 QUARTER 6 PRICE 8-12(2).

DO IF (YEAR GE 1881).  /*Stop reading before 1881
END FILE.
END IF.

END INPUT PROGRAM.

LIST.

• This example assumes that data records are entered chronologically by year. The DO IF—END IF structure specifies an end of file when the first case with a value of 1881 or later for YEAR is reached.

• LIST executes the input program and lists cases in the active dataset. The case that causes the end of the file is not included in the active dataset.

• As an alternative to an input program with END FILE, you can use N OF CASES to select cases if you know the exact number of cases. Another alternative is to use SELECT IF to select cases before 1881, but then the program would unnecessarily read the entire input file.

END FILE with END CASE

*Select cases but retain the case that causes end-of-file processing.

INPUT PROGRAM.
DATA LIST FILE=PRICES /YEAR 1-4 QUARTER 6 PRICE 8-12(2).

DO IF (YEAR GE 1881).   /*Stop reading before 1881 (or at end of file)
END CASE.              /*Create case 1881
END FILE.

ELSE.
END CASE.              /*Create all other cases
END IF.
END INPUT PROGRAM.

LIST.

• The first END CASE command forces the program to retain the case that causes end-of-file processing.

• The second END CASE indicates the end of case for all other cases and passes them out of the input program one at a time. It is required because the first END CASE command causes the program to abandon default end-of-case processing (see END CASE).

Related Topics

END FILE
Overview (END FILE command)


ERASE

ERASE (command),ERASE (command),ERASE (command)
ERASE (command),ERASE (command),ERASE (command)
syntax chart,syntax chart,syntax chart
ERASE FILE='file'

This command takes effect immediately. It does not read the active dataset or execute pending transformations. See the topic Command Order for more information.

Example

ERASE FILE='PRSNL.DAT'.

Related Topics

Overview (ERASE command)
Examples (ERASE command)


Overview (ERASE command)

ERASE removes a file from a disk.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is the keyword FILE followed by a file specification enclosed in quotes. The specified file is erased from the disk. The file specification may vary from operating system to operating system.

Syntax Rules Collapse Hide details

Syntax Rules

• The keyword FILE is required, but the equals sign is optional.

• ERASE allows one file specification only and does not accept wildcard characters. To erase more than one file, specify multiple ERASE commands.

• The file to be erased must be specified in full. ERASE does not recognize any default file extension.

Operations Collapse Hide details

Operations

ERASE deletes the specified file regardless of its type. No message is displayed unless the command cannot be executed. Use ERASE with caution.

Related Topics

ERASE
Examples (ERASE command)


Examples (ERASE command)

ERASE FILE '/data/textdata.txt'.

Related Topics

ERASE
Overview (ERASE command)


EXAMINE

EXAMINE (command),EXAMINE (command),EXAMINE (command)
EXAMINE (command),EXAMINE (command),EXAMINE (command)
syntax chart,syntax chart,syntax chart
Explore,Explore,Explore
EXAMINE command syntax,EXAMINE command syntax,EXAMINE command syntax

EXAMINE is available in the Statistics Base option.

EXAMINE VARIABLES=varlist [[BY varlist] [varname BY varname]]

 [/COMPARE={GROUPS** }]
           {VARIABLES}

 [/{TOTAL**}]
   {NOTOTAL}

 [/ID={case number**}]
      {varname      }

 [/PERCENTILES [[({5,10,25,50,75,90,95})=[{HAVERAGE  }] [NONE]]
                  {value list         }   {WAVERAGE  }
                                          {ROUND     }
                                          {AEMPIRICAL}
                                          {EMPIRICAL }

 [/PLOT=[STEMLEAF**] [BOXPLOT**] [NPPLOT] [SPREADLEVEL(n)] [HISTOGRAM]]

        [{ALL   }]
         {NONE}

 [/STATISTICS=[DESCRIPTIVES**] [EXTREME({5})]]
                                        {n}
              [{ALL }]
               {NONE}

 [/CINTERVAL {95**}]
             {n   }

 [/MESTIMATOR=[{NONE**}]]
               {ALL   }

              [HUBER({1.339})] [ANDREW({1.34}]
                     {c    }           {c    }

              [HAMPEL({1.7,3.4,8.5})]
                      {a  ,b  ,c  }

              [TUKEY({4.685})]
                     {c    }

[/MISSING=[{LISTWISE**}] [{EXCLUDE**}] [{NOREPORT**}]]
           {PAIRWISE  }   {INCLUDE  }   {REPORT    }

**Default if the subcommand is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See EXAMINE Algorithms for computational details for this procedure.

Syntax for the EXAMINE command can be generated from the Explore dialog, and from the Define Boxplot dialogs.

Examples

EXAMINE VARIABLES=ENGSIZE,COST.

EXAMINE VARIABLES=MIPERGAL BY MODEL, MODEL BY CYLINDERS.

Related Topics

Overview (EXAMINE command)
Examples (EXAMINE command)
VARIABLES Subcommand (EXAMINE command)
COMPARE Subcommand (EXAMINE command)
TOTAL and NOTOTAL Subcommands (EXAMINE command)
ID Subcommand (EXAMINE command)
PERCENTILES Subcommand (EXAMINE command)
PLOT Subcommand (EXAMINE command)
STATISTICS Subcommand (EXAMINE command)
CINTERVAL Subcommand (EXAMINE command)
MESTIMATORS Subcommand (EXAMINE command)
MISSING Subcommand (EXAMINE command)
References (EXAMINE command)


Overview (EXAMINE command)

EXAMINE (command),EXAMINE (command),EXAMINE (command)
limitations,limitations,limitations

EXAMINE provides stem-and-leaf plots, histograms, boxplots, normal plots, robust estimates of location, tests of normality, and other descriptive statistics. Separate analyses can be obtained for subgroups of cases.

Options Collapse Hide details

Options

Cells. You can subdivide cases into cells based on their values for grouping (factor) variables using the BY keyword on the VARIABLES subcommand.

Output. You can control the display of output using the COMPARE subcommand. You can specify the computational method and break points for percentiles with the PERCENTILES subcommand, and you can assign a variable to be used for labeling outliers on the ID subcommand.

Plots. You can request stem-and-leaf plots, histograms, vertical boxplots, spread-versus-level plots with Levene tests for homogeneity of variance, and normal and detrended probability plots with tests for normality. These plots are available through the PLOT subcommand.

Statistics. You can request univariate statistical output with the STATISTICS subcommand and maximum-likelihood estimators with the MESTIMATORS subcommand.

Basic Specification Collapse Hide details

Basic Specification

• The basic specification is VARIABLES and at least one dependent variable.

• The default output includes a Descriptives table displaying univariate statistics (mean, median, standard deviation, standard error, variance, kurtosis, kurtosis standard error, skewness, skewness standard error, sum, interquartile range (IQR), range, minimum, maximum, and 5% trimmed mean), a vertical boxplot, and a stem-and-leaf plot. Outliers are labeled on the boxplot with the system variable $CASENUM.

Subcommand Order Collapse Hide details

Subcommand Order

Subcommands can be named in any order.

Limitations Collapse Hide details

Limitations

• When string variables are used as factors, only the first eight characters are used to form cells. String variables cannot be specified as dependent variables.

• When more than eight crossed factors (for example, A, B, ... in the specification Y by A by B by ...) are specified, the command is not executed.

Related Topics

EXAMINE
Examples (EXAMINE command)
VARIABLES Subcommand (EXAMINE command)
COMPARE Subcommand (EXAMINE command)
TOTAL and NOTOTAL Subcommands (EXAMINE command)
ID Subcommand (EXAMINE command)
PERCENTILES Subcommand (EXAMINE command)
PLOT Subcommand (EXAMINE command)
STATISTICS Subcommand (EXAMINE command)
CINTERVAL Subcommand (EXAMINE command)
MESTIMATORS Subcommand (EXAMINE command)
MISSING Subcommand (EXAMINE command)
References (EXAMINE command)


Examples (EXAMINE command)

Univariate statistics

EXAMINE VARIABLES=ENGSIZE,COST.

• ENGSIZE and COST are the dependent variables.

• EXAMINE produces univariate statistics for ENGSIZE and COST in the Descriptives table and a vertical boxplot and a stem-and-leaf plot for each variable.

Descriptive statistics across groups

EXAMINE  VARIABLES=toxin BY yield
  /PLOT BOXPLOT STEMLEAF
  /COMPARE GROUP
  /STATISTICS DESCRIPTIVES
  /CINTERVAL 95
  /MISSING LISTWISE
  /NOTOTAL.

• The procedure examines values of the variable toxin by values of the variable yield.

• All other options are set to their default values.

For discussion of output from this syntax and to place the example in context, see Descriptive Statistics across Groups.

Exploring distributions

EXAMINE  VARIABLES=temp BY batch /ID= labrunid
  /PLOT BOXPLOT STEMLEAF NPPLOT
  /COMPARE GROUP
  /MESTIMATORS  HUBER(1.339) ANDREW(1.34) HAMPEL(1.7,3.4,8.5) TUKEY(4.685)
  /STATISTICS DESCRIPTIVES EXTREME
  /CINTERVAL 95
  /MISSING LISTWISE
  /NOTOTAL.

• The procedure examines values of temp by values of batch.

• The ID subcommand specifies that cases in the output should be labeled by values of labrunid.

• The PLOT subcommand requests boxplots, stem-and-leaf plots, and normality plots.

• The MESTIMATORS subcommand requests Huber's, Andrews', Hampel's, and Tukey's robust estimators of location with default weights.

• The STATISTICS subcommand requests a descriptive statistics table and an extreme values table with the 5 largest and 5 smallest values.

• All other options are set to their default values.

For discussion of output from this syntax and to place the example in context, see Exploring Distributions.

Related Topics

EXAMINE
Overview (EXAMINE command)
VARIABLES Subcommand (EXAMINE command)
COMPARE Subcommand (EXAMINE command)
TOTAL and NOTOTAL Subcommands (EXAMINE command)
ID Subcommand (EXAMINE command)
PERCENTILES Subcommand (EXAMINE command)
PLOT Subcommand (EXAMINE command)
STATISTICS Subcommand (EXAMINE command)
CINTERVAL Subcommand (EXAMINE command)
MESTIMATORS Subcommand (EXAMINE command)
MISSING Subcommand (EXAMINE command)
References (EXAMINE command)


VARIABLES Subcommand (EXAMINE command)

EXAMINE (command),EXAMINE (command),EXAMINE (command)
VARIABLES subcommand,VARIABLES subcommand,VARIABLES subcommand
VARIABLES (subcommand),VARIABLES (subcommand),VARIABLES (subcommand)
EXAMINE command,EXAMINE command,EXAMINE command

VARIABLES specifies the dependent variables and the cells. The dependent variables are specified first, followed by the keyword BY and the variables that define the cells. Repeated models on the same EXAMINE are discarded.

• To create cells defined by the combination of values of two or more factors, specify the factor names separated by the keyword BY.

Caution. Large amounts of output can be produced if many cells are specified. If there are many factors or if the factors have many values, EXAMINE will produce a large number of separate analyses.

Example

EXAMINE VARIABLES=SALARY,YRSEDUC BY RACE,SEX,DEPT,RACE BY SEX.

• SALARY and YRSEDUC are dependent variables.

• Cells are formed first for the values of SALARY and YRSEDUC individually, and then each by values for RACE, SEX, DEPT, and the combination of RACE and SEX.

• By default, EXAMINE produces Descriptives tables, stem-and-leaf plots, and boxplots.

Related Topics

EXAMINE
Overview (EXAMINE command)
Examples (EXAMINE command)
COMPARE Subcommand (EXAMINE command)
TOTAL and NOTOTAL Subcommands (EXAMINE command)
ID Subcommand (EXAMINE command)
PERCENTILES Subcommand (EXAMINE command)
PLOT Subcommand (EXAMINE command)
STATISTICS Subcommand (EXAMINE command)
CINTERVAL Subcommand (EXAMINE command)
MESTIMATORS Subcommand (EXAMINE command)
MISSING Subcommand (EXAMINE command)
References (EXAMINE command)


COMPARE Subcommand (EXAMINE command)

EXAMINE (command),EXAMINE (command),EXAMINE (command)
COMPARE subcommand,COMPARE subcommand,COMPARE subcommand
COMPARE (subcommand),COMPARE (subcommand),COMPARE (subcommand)
EXAMINE command,EXAMINE command,EXAMINE command
boxplots,boxplots,boxplots
comparing variables,comparing variables,comparing variables
boxplots,boxplots,boxplots
comparing factor levels,comparing factor levels,comparing factor levels

COMPARE controls how boxplots are displayed. This subcommand is most useful if there is more than one dependent variable and at least one factor in the design.

GROUPS (keyword),GROUPS (keyword),GROUPS (keyword)
EXAMINE command,EXAMINE command,EXAMINE command
VARIABLES (keyword),VARIABLES (keyword),VARIABLES (keyword)
EXAMINE command,EXAMINE command,EXAMINE command
GROUPS | For each dependent variable, boxplots for all cells are displayed together. With this display, comparisons across cells for a single dependent variable are easily made. This is the default.
VARIABLES | For each cell, boxplots for all dependent variables are displayed together. With this display, comparisons of several dependent variables are easily made. This is useful in situations where the dependent variables are repeated measures of the same variable (see the following example) or have similar scales, or when the dependent variable has very different values for different cells, and plotting all cells on the same scale would cause information to be lost.

Example

EXAMINE VARIABLES=GPA1 GPA2 GPA3 GPA4 BY MAJOR   /COMPARE=VARIABLES.

• The four GPA variables are summarized for each value of MAJOR.

• COMPARE=VARIABLES groups the boxplots for the four GPA variables together for each value of MAJOR.

Example

EXAMINE VARIABLES=GPA1 GPA2 GPA3 GPA4 BY MAJOR /COMPARE=GROUPS.

• COMPARE=GROUPS groups the boxplots for GPA1 for all majors together, followed by boxplots for GPA2 for all majors, and so on.

Related Topics

EXAMINE
Overview (EXAMINE command)
Examples (EXAMINE command)
VARIABLES Subcommand (EXAMINE command)
TOTAL and NOTOTAL Subcommands (EXAMINE command)
ID Subcommand (EXAMINE command)
PERCENTILES Subcommand (EXAMINE command)
PLOT Subcommand (EXAMINE command)
STATISTICS Subcommand (EXAMINE command)
CINTERVAL Subcommand (EXAMINE command)
MESTIMATORS Subcommand (EXAMINE command)
MISSING Subcommand (EXAMINE command)
References (EXAMINE command)


TOTAL and NOTOTAL Subcommands (EXAMINE command)

NOTOTAL (subcommand),NOTOTAL (subcommand),NOTOTAL (subcommand)
EXAMINE command,EXAMINE command,EXAMINE command
EXAMINE (command),EXAMINE (command),EXAMINE (command)
TOTAL subcommand,TOTAL subcommand,TOTAL subcommand
TOTAL (subcommand),TOTAL (subcommand),TOTAL (subcommand)
EXAMINE command,EXAMINE command,EXAMINE command
EXAMINE (command),EXAMINE (command),EXAMINE (command)
NOTOTAL subcommand,NOTOTAL subcommand,NOTOTAL subcommand

TOTAL and NOTOTAL control the amount of output produced by EXAMINE when factor variables are specified.

• TOTAL is the default. By default, or when TOTAL is specified, EXAMINE produces statistics and plots for each dependent variable overall and for each cell specified by the factor variables.

• NOTOTAL suppresses overall statistics and plots.

• TOTAL and NOTOTAL are alternatives.

• NOTOTAL is ignored when the VARIABLES subcommand does not specify factor variables.

Related Topics

EXAMINE
Overview (EXAMINE command)
Examples (EXAMINE command)
VARIABLES Subcommand (EXAMINE command)
COMPARE Subcommand (EXAMINE command)
ID Subcommand (EXAMINE command)
PERCENTILES Subcommand (EXAMINE command)
PLOT Subcommand (EXAMINE command)
STATISTICS Subcommand (EXAMINE command)
CINTERVAL Subcommand (EXAMINE command)
MESTIMATORS Subcommand (EXAMINE command)
MISSING Subcommand (EXAMINE command)
References (EXAMINE command)


ID Subcommand (EXAMINE command)

EXAMINE (command),EXAMINE (command),EXAMINE (command)
ID subcommand,ID subcommand,ID subcommand
ID (subcommand),ID (subcommand),ID (subcommand)
EXAMINE command,EXAMINE command,EXAMINE command
boxplots,boxplots,boxplots
identifying outliers,identifying outliers,identifying outliers
outliers,outliers,outliers
identifying,identifying,identifying

ID assigns a variable from the active dataset to identify the cases in the output. By default the case number is used for labeling outliers and extreme cases in boxplots.

• The identification variable can be either string or numeric. If it is numeric, value labels are used to label cases. If no value labels exist, the values are used.

• Only one identification variable can be specified.

Example

EXAMINE VARIABLES=SALARY BY RACE BY SEX /ID=LASTNAME.

• ID displays the value of LASTNAME for outliers and extreme cases in the boxplots.

Related Topics

EXAMINE
Overview (EXAMINE command)
Examples (EXAMINE command)
VARIABLES Subcommand (EXAMINE command)
COMPARE Subcommand (EXAMINE command)
TOTAL and NOTOTAL Subcommands (EXAMINE command)
PERCENTILES Subcommand (EXAMINE command)
PLOT Subcommand (EXAMINE command)
STATISTICS Subcommand (EXAMINE command)
CINTERVAL Subcommand (EXAMINE command)
MESTIMATORS Subcommand (EXAMINE command)
MISSING Subcommand (EXAMINE command)
References (EXAMINE command)


PERCENTILES Subcommand (EXAMINE command)

EXAMINE (command),EXAMINE (command),EXAMINE (command)
PERCENTILES subcommand,PERCENTILES subcommand,PERCENTILES subcommand
PERCENTILES (subcommand),PERCENTILES (subcommand),PERCENTILES (subcommand)
EXAMINE command,EXAMINE command,EXAMINE command
percentiles,percentiles,percentiles
break points,break points,break points
percentiles,percentiles,percentiles
methods,methods,methods

PERCENTILES displays the Percentiles table. If PERCENTILES is omitted, no percentiles are produced. If PERCENTILES is specified without keywords, HAVERAGE is used with default break points of 5, 10, 25, 50, 75, 90, and 95.

• Values for break points are specified in parentheses following the subcommand. EXAMINE displays up to six decimal places for user-specified percentile values.

• The method keywords follow the specifications for break points.

For each of the following methods of percentile calculation, w is the sum of the weights for all nonmissing cases, p is the specified percentile divided by 100, and Xi is the value of the ith case (cases are assumed to be ranked in ascending order). For details on the specific formulas used, see the algorithms documentation included on the installation CD.

HAVERAGE (keyword),HAVERAGE (keyword),HAVERAGE (keyword)
EXAMINE command,EXAMINE command,EXAMINE command
WAVERAGE (keyword),WAVERAGE (keyword),WAVERAGE (keyword)
EXAMINE command,EXAMINE command,EXAMINE command
ROUND (keyword),ROUND (keyword),ROUND (keyword)
EXAMINE command,EXAMINE command,EXAMINE command
EMPIRICAL (keyword),EMPIRICAL (keyword),EMPIRICAL (keyword)
EXAMINE command,EXAMINE command,EXAMINE command
AEMPIRICAL (keyword),AEMPIRICAL (keyword),AEMPIRICAL (keyword)
EXAMINE command,EXAMINE command,EXAMINE command
NONE (keyword),NONE (keyword),NONE (keyword)
EXAMINE command,EXAMINE command,EXAMINE command
HAVERAGE | Weighted average at X(w + 1)p. The percentile value is the weighted average of Xi and Xi + 1, where i is the integer part of (w + 1)p. This is the default if PERCENTILES is specified without a keyword.
WAVERAGE | Weighted average at Xwp. The percentile value is the weighted average of Xi and X(i + 1), where i is the integer portion of wp.
ROUND | Observation closest to wp. The percentile value is Xi or Xi + 1, depending upon whether i or i + 1 is "closer" to wp.
EMPIRICAL | Empirical distribution function. The percentile value is Xi, where i is equal to wp rounded up to the next integer.
AEMPIRICAL | Empirical distribution with averaging. This is equivalent to EMPIRICAL, except when i=wp, in which case the percentile value is the average of Xi and Xi + 1.
NONE | Suppress percentile output. This is the default if PERCENTILES is omitted.

Example

EXAMINE VARIABLE=SALARY /PERCENTILES(10,50,90)=EMPIRICAL.

• PERCENTILES produces the 10th, 50th, and 90th percentiles for the dependent variable SALARY using the EMPIRICAL distribution function.

Related Topics

EXAMINE
Overview (EXAMINE command)
Examples (EXAMINE command)
VARIABLES Subcommand (EXAMINE command)
COMPARE Subcommand (EXAMINE command)
TOTAL and NOTOTAL Subcommands (EXAMINE command)
ID Subcommand (EXAMINE command)
PLOT Subcommand (EXAMINE command)
STATISTICS Subcommand (EXAMINE command)
CINTERVAL Subcommand (EXAMINE command)
MESTIMATORS Subcommand (EXAMINE command)
MISSING Subcommand (EXAMINE command)
References (EXAMINE command)


PLOT Subcommand (EXAMINE command)

EXAMINE (command),EXAMINE (command),EXAMINE (command)
PLOT subcommand,PLOT subcommand,PLOT subcommand
PLOT (subcommand),PLOT (subcommand),PLOT (subcommand)
EXAMINE command,EXAMINE command,EXAMINE command

PLOT controls plot output. The default is a vertical boxplot and a stem-and-leaf plot for each dependent variable for each cell in the model.

• Spread-versus-level plots can be produced only if there is at least one factor variable on the VARIABLES subcommand. If you request a spread-versus-level plot and there are no factor variables, the program issues a warning and no spread-versus-level plot is produced.

• If you specify the PLOT subcommand, only those plots explicitly requested are produced.

BOXPLOT (keyword),BOXPLOT (keyword),BOXPLOT (keyword)
EXAMINE command,EXAMINE command,EXAMINE command
STEMLEAF (keyword),STEMLEAF (keyword),STEMLEAF (keyword)
EXAMINE command,EXAMINE command,EXAMINE command
HISTOGRAM (keyword),HISTOGRAM (keyword),HISTOGRAM (keyword)
EXAMINE command,EXAMINE command,EXAMINE command
SPREADLEVEL (keyword),SPREADLEVEL (keyword),SPREADLEVEL (keyword)
EXAMINE command,EXAMINE command,EXAMINE command
Levene test,Levene test,Levene test
EXAMINE command,EXAMINE command,EXAMINE command
Lilliefors test,Lilliefors test,Lilliefors test
EXAMINE command,EXAMINE command,EXAMINE command
detrended normal plots,detrended normal plots,detrended normal plots
EXAMINE command,EXAMINE command,EXAMINE command
NPPLOT (keyword),NPPLOT (keyword),NPPLOT (keyword)
EXAMINE command,EXAMINE command,EXAMINE command
normal probability plots,normal probability plots,normal probability plots
EXAMINE command,EXAMINE command,EXAMINE command
Shapiro-Wilk's test,Shapiro-Wilk's test,Shapiro-Wilk's test
EXAMINE command,EXAMINE command,EXAMINE command
ALL (keyword),ALL (keyword),ALL (keyword)
EXAMINE command,EXAMINE command,EXAMINE command
NONE (keyword),NONE (keyword),NONE (keyword)
EXAMINE command,EXAMINE command,EXAMINE command
BOXPLOT | Vertical boxplot. The boundaries of the box are Tukey’s hinges. The median is identified by a line inside the box. The length of the box is the interquartile range (IQR) computed from Tukey’s hinges. Values more than three IQR’s from the end of a box are labeled as extreme, denoted with an asterisk (*). Values more than 1.5 IQR’s but less than 3 IQR’s from the end of the box are labeled as outliers (o).
STEMLEAF | Stem-and-leaf plot. In a stem-and-leaf plot, each observed value is divided into two components—leading digits (stem) and trailing digits (leaf).
HISTOGRAM | Histogram.
SPREADLEVEL(n) | Spread-versus-level plot with the Test of Homogeneity of Variance table. If the keyword appears alone, the natural logs of the interquartile ranges are plotted against the natural logs of the medians for all cells. If a power for transforming the data (n) is given, the IQR and median of the transformed data are plotted. If 0 is specified for n, a natural log transformation of the data is done. The slope of the regression line and Levene tests for homogeneity of variance are also displayed. The Levene tests are based on the original data if no transformation is specified and on the transformed data if a transformation is requested.
NPPLOT | Normal and detrended Q-Q plots with the Tests of Normality table presenting Shapiro-Wilk’s statistic and a Kolmogorov-Smirnov statistic with a Lilliefors significance level for testing normality. If non-integer weights are specified, the Shapiro-Wilk’s statistic is calculated when the weighted sample size lies between 3 and 50. For no weights or integer weights, the statistic is calculated when the weighted sample size lies between 3 and 5,000.
ALL | All available plots.
NONE | No plots.

Example

EXAMINE VARIABLES=CYCLE BY TREATMNT /PLOT=NPPLOT.

• PLOT produces normal and detrended Q-Q plots for each value of TREATMNT and a Tests of Normality table.

Example

EXAMINE VARIABLES=CYCLE BY TREATMNT /PLOT=SPREADLEVEL(.5).

• PLOT produces a spread-versus-level plot of the medians and interquartile ranges of the square root of CYCLE. Each point on the plot represents one of the TREATMNT groups.

• A Test of Homogeneity of Variance table displays Levene statistics.

Example

EXAMINE VARIABLES=CYCLE BY TREATMNT /PLOT=SPREADLEVEL(0).

• PLOT generates a spread-versus-level plot of the medians and interquartile ranges of the natural logs of CYCLE for each TREATMENT group.

• A Test of Homogeneity of Variance table displays Levene statistics.

Example

EXAMINE VARIABLES=CYCLE BY TREATMNT /PLOT=SPREADLEVEL.

• PLOT generates a spread-versus-level plot of the natural logs of the medians and interquartile ranges of CYCLE for each TREATMNT group.

• A Test of Homogeneity of Variance table displays Levene statistics.

Related Topics

EXAMINE
Overview (EXAMINE command)
Examples (EXAMINE command)
VARIABLES Subcommand (EXAMINE command)
COMPARE Subcommand (EXAMINE command)
TOTAL and NOTOTAL Subcommands (EXAMINE command)
ID Subcommand (EXAMINE command)
PERCENTILES Subcommand (EXAMINE command)
STATISTICS Subcommand (EXAMINE command)
CINTERVAL Subcommand (EXAMINE command)
MESTIMATORS Subcommand (EXAMINE command)
MISSING Subcommand (EXAMINE command)
References (EXAMINE command)


STATISTICS Subcommand (EXAMINE command)

EXAMINE (command),EXAMINE (command),EXAMINE (command)
STATISTICS subcommand,STATISTICS subcommand,STATISTICS subcommand
STATISTICS (subcommand),STATISTICS (subcommand),STATISTICS (subcommand)
EXAMINE command,EXAMINE command,EXAMINE command

STATISTICS requests univariate statistics and determines how many extreme values are displayed. DESCRIPTIVES is the default. If you specify keywords on STATISTICS, only the requested statistics are displayed.

DESCRIPTIVES (keyword),DESCRIPTIVES (keyword),DESCRIPTIVES (keyword)
EXAMINE command,EXAMINE command,EXAMINE command
standard error,standard error,standard error
EXAMINE command,EXAMINE command,EXAMINE command
standard deviation,standard deviation,standard deviation
EXAMINE command,EXAMINE command,EXAMINE command
variance,variance,variance
EXAMINE command,EXAMINE command,EXAMINE command
trimmed mean,trimmed mean,trimmed mean
EXAMINE command,EXAMINE command,EXAMINE command
median,median,median
EXAMINE command,EXAMINE command,EXAMINE command
mean,mean,mean
EXAMINE command,EXAMINE command,EXAMINE command
kurtosis,kurtosis,kurtosis
EXAMINE command,EXAMINE command,EXAMINE command
skewness,skewness,skewness
EXAMINE command,EXAMINE command,EXAMINE command
range,range,range
EXAMINE command,EXAMINE command,EXAMINE command
minimum,minimum,minimum
EXAMINE command,EXAMINE command,EXAMINE command
maximum,maximum,maximum
EXAMINE command,EXAMINE command,EXAMINE command
EXTREME (keyword),EXTREME (keyword),EXTREME (keyword)
EXAMINE command,EXAMINE command,EXAMINE command
ALL (keyword),ALL (keyword),ALL (keyword)
EXAMINE command,EXAMINE command,EXAMINE command
NONE (keyword),NONE (keyword),NONE (keyword)
EXAMINE command,EXAMINE command,EXAMINE command
DESCRIPTIVES | Display the Descriptives table showing univariate statistics (the mean, median, 5% trimmed mean, standard error, variance, standard deviation, minimum, maximum, range, interquartile range, skewness, skewness standard error, kurtosis, and kurtosis standard error). This is the default.
EXTREME(n) | Display the Extreme Values table presenting cases with the n largest and n smallest values. If n is omitted, the five largest and five smallest values are displayed. Extreme cases are labeled with their values for the identification variable if the ID subcommand is used or with their values for the system variable $CASENUM if ID is not specified.
ALL | Display the Descriptives and Extreme Values tables.
NONE | Display neither the Descriptives nor the Extreme Values tables.

Example

EXAMINE VARIABLE=FAILTIME /ID=BRAND
  /STATISTICS=EXTREME(10) /PLOT=NONE.

• STATISTICS identifies the cases with the 10 lowest and 10 highest values for FAILTIME. These cases are labeled with the first characters of their values for the variable BRAND. The Descriptives table is not displayed.

Related Topics

EXAMINE
Overview (EXAMINE command)
Examples (EXAMINE command)
VARIABLES Subcommand (EXAMINE command)
COMPARE Subcommand (EXAMINE command)
TOTAL and NOTOTAL Subcommands (EXAMINE command)
ID Subcommand (EXAMINE command)
PERCENTILES Subcommand (EXAMINE command)
PLOT Subcommand (EXAMINE command)
CINTERVAL Subcommand (EXAMINE command)
MESTIMATORS Subcommand (EXAMINE command)
MISSING Subcommand (EXAMINE command)
References (EXAMINE command)


CINTERVAL Subcommand (EXAMINE command)

confidence intervals,confidence intervals,confidence intervals
EXAMINE command,EXAMINE command,EXAMINE command
EXAMINE (command),EXAMINE (command),EXAMINE (command)
CINTERVAL subcommand,CINTERVAL subcommand,CINTERVAL subcommand
CINTERVAL (subcommand),CINTERVAL (subcommand),CINTERVAL (subcommand)
EXAMINE command,EXAMINE command,EXAMINE command

CINTERVAL controls the confidence level when the default DESCRIPTIVES statistics is displayed. CINTERVAL has a default value of 95.

• You can specify a CINTERVAL value (n) between 50 and 99.99 inclusive. If the value you specify is out of range, the program issues a warning and uses the default 95% intervals.

• If you specify a keyword on STATISTICS subcommand that turns off the default DESCRIPTIVES, the CINTERVAL subcommand is ignored.

• The confidence interval appears in the output with the label n% CI for Mean, followed by the confidence interval in parentheses. For example, 95% CI for Mean (.0001,.00013)

The n in the label shows up to six decimal places. That is, input /CINTERVAL 95 displays as 95% CI while input /CINTERVAL 95.975 displays as 95.975% CI.

Related Topics

EXAMINE
Overview (EXAMINE command)
Examples (EXAMINE command)
VARIABLES Subcommand (EXAMINE command)
COMPARE Subcommand (EXAMINE command)
TOTAL and NOTOTAL Subcommands (EXAMINE command)
ID Subcommand (EXAMINE command)
PERCENTILES Subcommand (EXAMINE command)
PLOT Subcommand (EXAMINE command)
STATISTICS Subcommand (EXAMINE command)
MESTIMATORS Subcommand (EXAMINE command)
MISSING Subcommand (EXAMINE command)
References (EXAMINE command)


MESTIMATORS Subcommand (EXAMINE command)

EXAMINE (command),EXAMINE (command),EXAMINE (command)
MESTIMATORS subcommand,MESTIMATORS subcommand,MESTIMATORS subcommand
MESTIMATORS (subcommand),MESTIMATORS (subcommand),MESTIMATORS (subcommand)
EXAMINE command,EXAMINE command,EXAMINE command

M-estimators are robust maximum-likelihood estimators of location. Four M-estimators are available for display in the M-Estimators table. They differ in the weights they apply to the cases. MESTIMATORS with no keywords produces Huber’s M-estimator with c=1.339; Andrews’ wave with c=1.34π; Hampel’s M-estimator with a=1.7, b=3.4, and c=8.5; and Tukey’s biweight with c=4.685.

HUBER (keyword),HUBER (keyword),HUBER (keyword)
EXAMINE command,EXAMINE command,EXAMINE command
ANDREW (keyword),ANDREW (keyword),ANDREW (keyword)
EXAMINE command,EXAMINE command,EXAMINE command
HAMPEL (keyword),HAMPEL (keyword),HAMPEL (keyword)
EXAMINE command,EXAMINE command,EXAMINE command
TUKEY (keyword),TUKEY (keyword),TUKEY (keyword)
EXAMINE command,EXAMINE command,EXAMINE command
ALL (keyword),ALL (keyword),ALL (keyword)
EXAMINE command,EXAMINE command,EXAMINE command
NONE (keyword),NONE (keyword),NONE (keyword)
EXAMINE command,EXAMINE command,EXAMINE command
HUBER(c) | Huber’s M-estimator. The value of weighting constant c can be specified in parentheses following the keyword. The default is c=1.339.
ANDREW(c) | Andrews’ wave estimator. The value of weighting constant c can be specified in parentheses following the keyword. Constants are multiplied by π. The default is 1.34π.
HAMPEL(a,b,c) | Hampel’s M-estimator. The values of weighting constants a, b, and c can be specified in order in parentheses following the keyword. The default values are a=1.7, b=3.4, and c=8.5.
TUKEY(c) | Tukey’s biweight estimator. The value of weighting constant c can be specified in parentheses following the keyword. The default is c=4.685.
ALL | All four above M-estimators. This is the default when MESTIMATORS is specified with no keyword. The default values for weighting constants are used.
NONE | No M-estimators. This is the default if MESTIMATORS is omitted.

Example

EXAMINE VARIABLE=CASTTEST /MESTIMATORS.

• MESTIMATORS generates all four M-estimators computed with the default constants.

Example

EXAMINE VARIABLE=CASTTEST /MESTIMATORS=HAMPELS(2,4,8).

• MESTIMATOR produces Hampel’s M-estimator with weighting constants a=2, b=4, and c=8.

Related Topics

EXAMINE
Overview (EXAMINE command)
Examples (EXAMINE command)
VARIABLES Subcommand (EXAMINE command)
COMPARE Subcommand (EXAMINE command)
TOTAL and NOTOTAL Subcommands (EXAMINE command)
ID Subcommand (EXAMINE command)
PERCENTILES Subcommand (EXAMINE command)
PLOT Subcommand (EXAMINE command)
STATISTICS Subcommand (EXAMINE command)
CINTERVAL Subcommand (EXAMINE command)
MISSING Subcommand (EXAMINE command)
References (EXAMINE command)


MISSING Subcommand (EXAMINE command)

EXAMINE (command),EXAMINE (command),EXAMINE (command)
MISSING subcommand,MISSING subcommand,MISSING subcommand
MISSING (subcommand),MISSING (subcommand),MISSING (subcommand)
EXAMINE command,EXAMINE command,EXAMINE command

MISSING controls the processing of missing values in the analysis. The default is LISTWISE, EXCLUDE, and NOREPORT.

• LISTWISE and PAIRWISE are alternatives and apply to all variables. They are modified for dependent variables by INCLUDE/EXCLUDE and for factor variables by REPORT/NOREPORT.

• INCLUDE and EXCLUDE are alternatives; they apply only to dependent variables.

• REPORT and NOREPORT are alternatives; they determine if missing values for factor variables are treated as valid categories.

LISTWISE (keyword),LISTWISE (keyword),LISTWISE (keyword)
EXAMINE command,EXAMINE command,EXAMINE command
PAIRWISE (keyword),PAIRWISE (keyword),PAIRWISE (keyword)
EXAMINE command,EXAMINE command,EXAMINE command
EXCLUDE (keyword),EXCLUDE (keyword),EXCLUDE (keyword)
EXAMINE command,EXAMINE command,EXAMINE command
INCLUDE (keyword),INCLUDE (keyword),INCLUDE (keyword)
EXAMINE command,EXAMINE command,EXAMINE command
NOREPORT (keyword),NOREPORT (keyword),NOREPORT (keyword)
EXAMINE command,EXAMINE command,EXAMINE command
REPORT (keyword),REPORT (keyword),REPORT (keyword)
EXAMINE command,EXAMINE command,EXAMINE command
LISTWISE | Delete cases with missing values listwise. A case with missing values for any dependent variable or any factor in the model specification is excluded from statistics and plots unless modified by INCLUDE or REPORT. This is the default.
PAIRWISE | Delete cases with missing values pairwise. A case is deleted from the analysis only if it has a missing value for the dependent variable or factor being analyzed.
EXCLUDE | Exclude user-missing values. User-missing values and system-missing values for dependent variables are excluded. This is the default.
INCLUDE | Include user-missing values. Only system-missing values for dependent variables are excluded from the analysis.
NOREPORT | Exclude user- and system-missing values for factor variables. This is the default.
REPORT | Include user- and system-missing values for factor variables. User- and system-missing values for factors are treated as valid categories and are labeled as missing.

Example

EXAMINE VARIABLES=RAINFALL MEANTEMP BY REGION.

• MISSING is not specified and the default is used. Any case with a user- or system-missing value for RAINFALL, MEANTEMP, or REGION is excluded from the analysis and display.

Example

EXAMINE VARIABLES=RAINFALL MEANTEMP BY REGION
  /MISSING=PAIRWISE.

• Only cases with missing values for RAINFALL are excluded from the analysis of RAINFALL, and only cases with missing values for MEANTEMP are excluded from the analysis of MEANTEMP. Missing values for REGION are not used.

Example

EXAMINE VARIABLES=RAINFALL MEANTEMP BY REGION
  /MISSING=REPORT.

• Missing values for REGION are considered valid categories and are labeled as missing.

Related Topics

EXAMINE
Overview (EXAMINE command)
Examples (EXAMINE command)
VARIABLES Subcommand (EXAMINE command)
COMPARE Subcommand (EXAMINE command)
TOTAL and NOTOTAL Subcommands (EXAMINE command)
ID Subcommand (EXAMINE command)
PERCENTILES Subcommand (EXAMINE command)
PLOT Subcommand (EXAMINE command)
STATISTICS Subcommand (EXAMINE command)
CINTERVAL Subcommand (EXAMINE command)
MESTIMATORS Subcommand (EXAMINE command)
References (EXAMINE command)


References (EXAMINE command)

Hoaglin, D. C., F. Mosteller, and J. W. Tukey. 1983. Understanding robust and exploratory data analysis. New York: John Wiley and Sons.

Hoaglin, D. C., F. Mosteller, and J. W. Tukey. 1985. Exploring data tables, trends, and shapes. New York: John Wiley and Sons.

Tukey, J. W. 1977. Exploratory data analysis. Reading, MA: Addison-Wesley.

Velleman, P. F., and D. C. Hoaglin. 1981. Applications, basics, and computing of exploratory data analysis. Boston, Mass.: Duxbury Press.

Related Topics

EXAMINE
Overview (EXAMINE command)
Examples (EXAMINE command)
VARIABLES Subcommand (EXAMINE command)
COMPARE Subcommand (EXAMINE command)
TOTAL and NOTOTAL Subcommands (EXAMINE command)
ID Subcommand (EXAMINE command)
PERCENTILES Subcommand (EXAMINE command)
PLOT Subcommand (EXAMINE command)
STATISTICS Subcommand (EXAMINE command)
CINTERVAL Subcommand (EXAMINE command)
MESTIMATORS Subcommand (EXAMINE command)
MISSING Subcommand (EXAMINE command)


EXECUTE

EXECUTE (command),EXECUTE (command),EXECUTE (command)
EXECUTE (command),EXECUTE (command),EXECUTE (command)
syntax chart,syntax chart,syntax chart
EXECUTE.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

Related Topics

Overview (EXECUTE command)
Examples (EXECUTE command)


Overview (EXECUTE command)

EXECUTE forces the data to be read and executes the transformations that precede it in the command sequence.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is simply the command keyword. EXECUTE has no additional specifications.

Operations Collapse Hide details

Operations

• EXECUTE causes the data to be read but has no other influence on the session.

• EXECUTE is designed for use with transformation commands and facilities such as ADD FILES, MATCH FILES, UPDATE, PRINT, and WRITE, which do not read data and are not executed unless followed by a data-reading procedure.

Related Topics

EXECUTE
Examples (EXECUTE command)


Examples (EXECUTE command)

DATA LIST  FILE=RAWDATA / 1 LNAME 1-13 (A) FNAME 15-24 (A)
  MMAIDENL 40-55.
VAR LABELS  MMAIDENL 'MOTHER''S MAIDEN NAME'.
DO IF (MMAIDENL EQ 'Smith').
WRITE OUTFILE=SMITHS/LNAME FNAME.
END IF.
EXECUTE.

• This example writes the last and first names of all people whose mother’s maiden name was Smith to the data file SMITHS.

• DO IF-END IF and WRITE do not read data and are executed only when data are read for a procedure. Because there is no procedure in this session, EXECUTE is used to read the data and execute all of the preceding transformation commands. Otherwise, the commands would not be executed.

Related Topics

EXECUTE
Overview (EXECUTE command)


EXPORT

EXPORT (command),EXPORT (command),EXPORT (command)
EXPORT (command),EXPORT (command),EXPORT (command)
syntax chart,syntax chart,syntax chart
EXPORT OUTFILE='file'

 [/TYPE={COMM**}]
        {TAPE  }

 [/UNSELECTED=[{RETAIN}]
               {DELETE}

 [/KEEP={ALL**  }] [/DROP=varlist]
        {varlist}

 [/RENAME=(old varnames=new varnames)...]

 [/MAP]

 [/DIGITS=n]

**Default if the subcommand is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

Syntax for the EXPORT command can be generated from the Save Data As dialog when selecting portable as the file type.

Example

EXPORT OUTFILE="/data/newdata.por"
  /RENAME=(V1 TO V3=ID, SEX, AGE) /MAP.

Related Topics

Overview (EXPORT command)
Examples (EXPORT command)
Methods of Transporting Portable Files (EXPORT command)
Magnetic Tape (EXPORT command)
Communications Programs (EXPORT command)
Character Translation (EXPORT command)
OUTFILE Subcommand (EXPORT command)
TYPE Subcommand (EXPORT command)
UNSELECTED Subcommand (EXPORT command)
DROP and KEEP Subcommands (EXPORT command)
RENAME Subcommand (EXPORT command)
MAP Subcommand (EXPORT command)
DIGITS Subcommand (EXPORT command)


Overview (EXPORT command)

EXPORT produces a portable data file. A portable data file is a data file created used to transport data between different types of computers and operating systems, or other software using the same portable file format. A portable file contains all of the data and dictionary information stored in the active dataset from which it was created.

EXPORT is similar to the SAVE command. It can occur in the same position in the command sequence as the SAVE command and saves the active dataset. The file includes the results of all permanent transformations and any temporary transformations made just prior to the EXPORT command. The active dataset is unchanged after the EXPORT command.

• In most cases, saving data in portable format is no longer necessary, since PASW Statistics data files should be platform/operating system independent.

• To export data in external data formats (e.g., Excel, SAS, Stata, CSV, tab-delimited), use SAVE TRANSLATE.

Options Collapse Hide details

Options

Format. You can control the format of the portable file using the TYPE subcommand.

Variables. You can save a subset of variables from the active dataset and rename the variables using the DROP, KEEP, and RENAME subcommands. You can also produce a record of all variables and their names on the exported file with the MAP subcommand.

Precision. You can specify the number of decimal digits of precision for the values of all numeric variables on the DIGITS subcommand.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is the OUTFILE subcommand with a file specification. All variables from the active dataset are written to the portable file, with variable names, variable and value labels, missing-value flags, and print and write formats.

Subcommand Order Collapse Hide details

Subcommand Order

Subcommands can be named in any order.

Operations Collapse Hide details

Operations

• Portable files are written with 80-character record lengths.

• Portable files may contain some unprintable characters.

• The active dataset is still available for transformations and procedures after the portable file is created.

• The system variables $CASENUM and $DATE are assigned when the file is read by IMPORT.

• If the WEIGHT command is used before EXPORT, the weighting variable is included in the portable file.

• Variable names that exceed eight bytes are converted to unique eight-byte names—for example, mylongrootname1, mylongrootname2, and mylongrootname3 would be converted to mylongro, mylong_2, and mylong_3, respectively.

Limitations Collapse Hide details

Limitations

The EXPORT command is not supported in Unicode mode. For more information, see SET command, UNICODE subcommand.

Related Topics

EXPORT
Examples (EXPORT command)
Methods of Transporting Portable Files (EXPORT command)
Magnetic Tape (EXPORT command)
Communications Programs (EXPORT command)
Character Translation (EXPORT command)
OUTFILE Subcommand (EXPORT command)
TYPE Subcommand (EXPORT command)
UNSELECTED Subcommand (EXPORT command)
DROP and KEEP Subcommands (EXPORT command)
RENAME Subcommand (EXPORT command)
MAP Subcommand (EXPORT command)
DIGITS Subcommand (EXPORT command)


Examples (EXPORT command)

EXPORT OUTFILE="/newdata.por"
  /RENAME=(V1 TO V3=ID,SEX,AGE) /MAP.

• The portable file is written to newdata.por.

• The variables V1, V2, and V3 are renamed ID, SEX, and AGE in the portable file. Their names remain V1, V2, and V3 in the active dataset. None of the other variables written to the portable file are renamed.

• MAP requests a display of the variables in the portable file.

Related Topics

EXPORT
Overview (EXPORT command)
Methods of Transporting Portable Files (EXPORT command)
Magnetic Tape (EXPORT command)
Communications Programs (EXPORT command)
Character Translation (EXPORT command)
OUTFILE Subcommand (EXPORT command)
TYPE Subcommand (EXPORT command)
UNSELECTED Subcommand (EXPORT command)
DROP and KEEP Subcommands (EXPORT command)
RENAME Subcommand (EXPORT command)
MAP Subcommand (EXPORT command)
DIGITS Subcommand (EXPORT command)


Methods of Transporting Portable Files (EXPORT command)

Portable files can be transported on magnetic tape or by a communications program.

Related Topics

EXPORT
Overview (EXPORT command)
Examples (EXPORT command)
Magnetic Tape (EXPORT command)
Communications Programs (EXPORT command)
Character Translation (EXPORT command)
OUTFILE Subcommand (EXPORT command)
TYPE Subcommand (EXPORT command)
UNSELECTED Subcommand (EXPORT command)
DROP and KEEP Subcommands (EXPORT command)
RENAME Subcommand (EXPORT command)
MAP Subcommand (EXPORT command)
DIGITS Subcommand (EXPORT command)


Magnetic Tape (EXPORT command)

Before transporting files on a magnetic tape, make sure the receiving computer can read the tape being sent. The following tape specifications must be known before you write the portable file on the tape:

• Number of tracks. Either 7 or 9.

• Tape density. 200, 556, 800, 1600, or 6250 bits per inch (BPI).

• Parity. Even or odd. This must be known only when writing a 7-track tape.

• Tape labeling. Labeled or unlabeled. Check whether the site can use tape labels. Also make sure that the site has the ability to read multivolume tape files if the file being written uses more than one tape.

• Blocksize. The maximum blocksize the receiving computer can accept.

A tape written with the following characteristics can be read by most computers: 9 track, 1600 BPI, unlabeled, and a blocksize of 3200 characters. However, there is no guarantee that a tape written with these characteristics can be read successfully. The best policy is to know the requirements of the receiving computer ahead of time.

The following advice may help ensure successful file transfers by magnetic tape:

• Unless you are certain that the receiving computer can read labels, prepare an unlabeled tape.

• Make sure the record length of 80 is not changed.

• Do not use a separate character translation program, especially ASCII/EBCDIC translations. EXPORT/IMPORT takes care of this for you.

• Make sure the same blocking factor is used when writing and reading the tape. A blocksize of 3200 is frequently a good choice.

• If possible, write the portable file directly to tape to avoid possible interference from copy programs. Read the file directly from the tape for the same reason.

• Use the INFO LOCAL command to find out about using the program on your particular computer and operating system. INFO LOCAL generally includes additional information about reading and writing portable files.

Related Topics

EXPORT
Overview (EXPORT command)
Examples (EXPORT command)
Methods of Transporting Portable Files (EXPORT command)
Communications Programs (EXPORT command)
Character Translation (EXPORT command)
OUTFILE Subcommand (EXPORT command)
TYPE Subcommand (EXPORT command)
UNSELECTED Subcommand (EXPORT command)
DROP and KEEP Subcommands (EXPORT command)
RENAME Subcommand (EXPORT command)
MAP Subcommand (EXPORT command)
DIGITS Subcommand (EXPORT command)


Communications Programs (EXPORT command)

Transmission of a portable file by a communications program may not be possible if the program misinterprets any characters in the file as control characters (for example, as a line feed, carriage return, or end of transmission). This can be prevented by specifying TYPE=COMM on EXPORT. This specification replaces each control character with the character 0. The affected control characters are in positions 0–60 of the IMPORT/EXPORT character set. See the topic IMPORT/EXPORT Character Sets for more information.

The line length that the communications program uses must be set to 80 to match the 80-character record length of portable files. A transmitted file must be checked for blank lines or special characters inserted by the communications program. These must be edited out prior to reading the file with the IMPORT command.

Related Topics

EXPORT
Overview (EXPORT command)
Examples (EXPORT command)
Methods of Transporting Portable Files (EXPORT command)
Magnetic Tape (EXPORT command)
Character Translation (EXPORT command)
OUTFILE Subcommand (EXPORT command)
TYPE Subcommand (EXPORT command)
UNSELECTED Subcommand (EXPORT command)
DROP and KEEP Subcommands (EXPORT command)
RENAME Subcommand (EXPORT command)
MAP Subcommand (EXPORT command)
DIGITS Subcommand (EXPORT command)


Character Translation (EXPORT command)

Portable files are character files, not binary files, and they have 80-character records so they can be transmitted over data links. A receiving computer may not use the same character set as the computer where the portable file was written. When it imports a portable file, the program translates characters in the file to the character set used by the receiving computer. Depending on the character set in use, some characters in labels and in string data may be lost in the translation. For example, if a file is transported from a computer using a seven-bit ASCII character set to a computer using a six-bit ASCII character set, some characters in the file may have no matching characters in six-bit ASCII. For a character that has no match, the program generates an appropriate nonprintable character (the null character in most cases).

For a table of the character-set translations available with IMPORT and EXPORT, refer to Appendix B. A blank in a column of the table means that there is no matching character for that character set and an appropriate nonprintable character will be generated when you import a file.

Related Topics

EXPORT
Overview (EXPORT command)
Examples (EXPORT command)
Methods of Transporting Portable Files (EXPORT command)
Magnetic Tape (EXPORT command)
Communications Programs (EXPORT command)
OUTFILE Subcommand (EXPORT command)
TYPE Subcommand (EXPORT command)
UNSELECTED Subcommand (EXPORT command)
DROP and KEEP Subcommands (EXPORT command)
RENAME Subcommand (EXPORT command)
MAP Subcommand (EXPORT command)
DIGITS Subcommand (EXPORT command)


OUTFILE Subcommand (EXPORT command)

OUTFILE (subcommand),OUTFILE (subcommand),OUTFILE (subcommand)
EXPORT command,EXPORT command,EXPORT command
EXPORT (command),EXPORT (command),EXPORT (command)
OUTFILE subcommand,OUTFILE subcommand,OUTFILE subcommand

OUTFILE specifies the portable file. OUTFILE is the only required subcommand on EXPORT.

Related Topics

EXPORT
Overview (EXPORT command)
Examples (EXPORT command)
Methods of Transporting Portable Files (EXPORT command)
Magnetic Tape (EXPORT command)
Communications Programs (EXPORT command)
Character Translation (EXPORT command)
TYPE Subcommand (EXPORT command)
UNSELECTED Subcommand (EXPORT command)
DROP and KEEP Subcommands (EXPORT command)
RENAME Subcommand (EXPORT command)
MAP Subcommand (EXPORT command)
DIGITS Subcommand (EXPORT command)


TYPE Subcommand (EXPORT command)

TYPE (subcommand),TYPE (subcommand),TYPE (subcommand)
EXPORT command,EXPORT command,EXPORT command
EXPORT (command),EXPORT (command),EXPORT (command)
TYPE subcommand,TYPE subcommand,TYPE subcommand

TYPE indicates whether the portable file should be formatted for magnetic tape or for a communications program. You can specify either COMM or TAPE. See the topic Methods of Transporting Portable Files (EXPORT command) for more information.

COMM (keyword),COMM (keyword),COMM (keyword)
EXPORT command,EXPORT command,EXPORT command
TAPE (keyword),TAPE (keyword),TAPE (keyword)
EXPORT command,EXPORT command,EXPORT command
COMM | Transport portable files by a communications program. When COMM is specified on TYPE, the program removes all control characters and replaces them with the character 0. This is the default.
TAPE | Transport portable files on magnetic tape.

Example

EXPORT TYPE=TAPE /OUTFILE=HUBOUT.

• File HUBOUT is saved as a tape-formatted portable file.

Related Topics

EXPORT
Overview (EXPORT command)
Examples (EXPORT command)
Methods of Transporting Portable Files (EXPORT command)
Magnetic Tape (EXPORT command)
Communications Programs (EXPORT command)
Character Translation (EXPORT command)
OUTFILE Subcommand (EXPORT command)
UNSELECTED Subcommand (EXPORT command)
DROP and KEEP Subcommands (EXPORT command)
RENAME Subcommand (EXPORT command)
MAP Subcommand (EXPORT command)
DIGITS Subcommand (EXPORT command)


UNSELECTED Subcommand (EXPORT command)

EXPORT (command),EXPORT (command),EXPORT (command)
UNSELECTED subcommand,UNSELECTED subcommand,UNSELECTED subcommand
UNSELECTED (subcommand),UNSELECTED (subcommand),UNSELECTED (subcommand)
EXPORT command,EXPORT command,EXPORT command

UNSELECTED determines whether cases excluded on a previous FILTER or USE command are to be retained or deleted in the data file. The default is RETAIN. The UNSELECTED subcommand has no effect when the active dataset does not contain unselected cases.

RETAIN | Retain the unselected cases. All cases in the active dataset are saved. This is the default when UNSELECTED is specified by itself.
DELETE | Delete the unselected cases. Only cases that meet the FILTER or USE criteria are saved in the data file.

Related Topics

EXPORT
Overview (EXPORT command)
Examples (EXPORT command)
Methods of Transporting Portable Files (EXPORT command)
Magnetic Tape (EXPORT command)
Communications Programs (EXPORT command)
Character Translation (EXPORT command)
OUTFILE Subcommand (EXPORT command)
TYPE Subcommand (EXPORT command)
DROP and KEEP Subcommands (EXPORT command)
RENAME Subcommand (EXPORT command)
MAP Subcommand (EXPORT command)
DIGITS Subcommand (EXPORT command)


DROP and KEEP Subcommands (EXPORT command)

DROP (subcommand),DROP (subcommand),DROP (subcommand)
EXPORT command,EXPORT command,EXPORT command
EXPORT (command),EXPORT (command),EXPORT (command)
DROP subcommand,DROP subcommand,DROP subcommand
KEEP (subcommand),KEEP (subcommand),KEEP (subcommand)
EXPORT command,EXPORT command,EXPORT command
EXPORT (command),EXPORT (command),EXPORT (command)
KEEP subcommand,KEEP subcommand,KEEP subcommand

DROP and KEEP save a subset of variables in the portable file.

• DROP excludes a variable or list of variables from the portable file. All variables not named are included in the portable file.

• KEEP includes a variable or list of variables in the portable file. All variables not named are excluded.

• Variables can be specified on DROP and KEEP in any order. With the DROP subcommand, the order of variables in the portable file is the same as their order in the active dataset. With the KEEP subcommand, the order of variables in the portable file is the order in which they are named on KEEP. Thus, KEEP can be used to reorder variables in the portable file.

• Both DROP and KEEP can be used on the same EXPORT command; the effect is cumulative. If you specify a variable already named on a previous DROP or one not named on a previous KEEP, the variable is considered nonexistent and the program displays an error message. The command is aborted and no portable file is saved.

Example

EXPORT OUTFILE=NEWSUM /DROP=DEPT TO DIVISION.

• The portable file is written to file NEWSUM. Variables between and including DEPT and DIVISION in the active dataset are excluded from the portable file.

• All other variables are saved in the portable file.

Related Topics

EXPORT
Overview (EXPORT command)
Examples (EXPORT command)
Methods of Transporting Portable Files (EXPORT command)
Magnetic Tape (EXPORT command)
Communications Programs (EXPORT command)
Character Translation (EXPORT command)
OUTFILE Subcommand (EXPORT command)
TYPE Subcommand (EXPORT command)
UNSELECTED Subcommand (EXPORT command)
RENAME Subcommand (EXPORT command)
MAP Subcommand (EXPORT command)
DIGITS Subcommand (EXPORT command)


RENAME Subcommand (EXPORT command)

RENAME (subcommand),RENAME (subcommand),RENAME (subcommand)
EXPORT command,EXPORT command,EXPORT command
EXPORT (command),EXPORT (command),EXPORT (command)
RENAME subcommand,RENAME subcommand,RENAME subcommand

RENAME renames variables being written to the portable file. The renamed variables retain their original variable and value labels, missing-value flags, and print formats. The names of the variables are not changed in the active dataset.

• To rename a variable, specify the name of the variable in the active dataset, an equals sign, and the new name.

• A variable list can be specified on both sides of the equals sign. The number of variables on both sides must be the same, and the entire specification must be enclosed in parentheses.

• The keyword TO can be used for both variable lists.

• If you specify a renamed variable on a subsequent DROP or KEEP subcommand, the new variable name must be used.

Example

EXPORT OUTFILE=NEWSUM /DROP=DEPT TO DIVISION
  /RENAME=(NAME,WAGE=LNAME,SALARY).

• RENAME renames NAME and WAGE to LNAME and SALARY.

• LNAME and SALARY retain the variable and value labels, missing-value flags, and print formats assigned to NAME and WAGE.

Related Topics

EXPORT
Overview (EXPORT command)
Examples (EXPORT command)
Methods of Transporting Portable Files (EXPORT command)
Magnetic Tape (EXPORT command)
Communications Programs (EXPORT command)
Character Translation (EXPORT command)
OUTFILE Subcommand (EXPORT command)
TYPE Subcommand (EXPORT command)
UNSELECTED Subcommand (EXPORT command)
DROP and KEEP Subcommands (EXPORT command)
MAP Subcommand (EXPORT command)
DIGITS Subcommand (EXPORT command)


MAP Subcommand (EXPORT command)

MAP (subcommand),MAP (subcommand),MAP (subcommand)
EXPORT command,EXPORT command,EXPORT command
EXPORT (command),EXPORT (command),EXPORT (command)
MAP subcommand,MAP subcommand,MAP subcommand

MAP displays any changes that have been specified by the RENAME, DROP, or KEEP subcommands.

• MAP can be specified as often as desired.

• Each MAP subcommand maps the results of subcommands that precede it; results of subcommands that follow it are not mapped. When MAP is specified last, it also produces a description of the portable file.

Example

EXPORT OUTFILE=NEWSUM /DROP=DEPT TO DIVISION /MAP
  /RENAME NAME=LNAME WAGE=SALARY /MAP.

• The first MAP subcommand produces a listing of the variables in the file after DROP has dropped the specified variables.

• RENAME renames NAME and WAGE.

• The second MAP subcommand shows the variables in the file after renaming. Since this is the last subcommand, the listing will show the variables as they are written in the portable file.

Related Topics

EXPORT
Overview (EXPORT command)
Examples (EXPORT command)
Methods of Transporting Portable Files (EXPORT command)
Magnetic Tape (EXPORT command)
Communications Programs (EXPORT command)
Character Translation (EXPORT command)
OUTFILE Subcommand (EXPORT command)
TYPE Subcommand (EXPORT command)
UNSELECTED Subcommand (EXPORT command)
DROP and KEEP Subcommands (EXPORT command)
RENAME Subcommand (EXPORT command)
DIGITS Subcommand (EXPORT command)


DIGITS Subcommand (EXPORT command)

DIGITS (subcommand),DIGITS (subcommand),DIGITS (subcommand)
EXPORT command,EXPORT command,EXPORT command
EXPORT (command),EXPORT (command),EXPORT (command)
DIGITS subcommand,DIGITS subcommand,DIGITS subcommand

DIGITS specifies the degree of precision for all noninteger numeric values written to the portable file.

• DIGITS has the general form DIGITS=n, where n is the number of digits of precision.

• DIGITS applies to all numbers for which rounding is required.

• Different degrees of precision cannot be specified for different variables. Thus, DIGITS should be set according to the requirements of the variable that needs the most precision.

• Default precision methods used by EXPORT work perfectly for integers that are not too large and for fractions whose denominators are products of 2, 3, and 5 (all decimals, quarters, eighths, sixteenths, thirds, thirtieths, sixtieths, and so forth.) For other fractions and for integers too large to be represented exactly in the active dataset (usually more than 9 digits, often 15 or more), the representation used in the active dataset contains some error already, so no exact way of sending these numbers is possible. The program sends enough digits to get very close. The number of digits sent in these cases depends on the originating computer: on mainframe IBM versions of the program, it is the equivalent of 13 decimal digits (integer and fractional parts combined). If many numbers on a file require this level of precision, the file can grow quite large. If you do not need the full default precision, you can save some space in the portable file by using the DIGITS subcommand.

Example

EXPORT OUTFILE=NEWSUM /DROP=DEPT TO DIVISION /MAP /DIGITS=4.

• DIGITS guarantees the accuracy of values to four significant digits. For example, 12.34567890876 will be rounded to 12.35.

Related Topics

EXPORT
Overview (EXPORT command)
Examples (EXPORT command)
Methods of Transporting Portable Files (EXPORT command)
Magnetic Tape (EXPORT command)
Communications Programs (EXPORT command)
Character Translation (EXPORT command)
OUTFILE Subcommand (EXPORT command)
TYPE Subcommand (EXPORT command)
UNSELECTED Subcommand (EXPORT command)
DROP and KEEP Subcommands (EXPORT command)
RENAME Subcommand (EXPORT command)
MAP Subcommand (EXPORT command)


EXTENSION

EXTENSION (command),EXTENSION (command),EXTENSION (command)
EXTENSION (command),EXTENSION (command),EXTENSION (command)
syntax chart,syntax chart,syntax chart
EXTENSION ACTION={ADD** }
                 {REMOVE}

  /SPECIFICATION COMMAND=file.

** Default if the subcommand or keyword is omitted.

This command takes effect immediately. It does not read the active dataset or execute pending transformations. See the topic Command Order for more information.

Release History Collapse Hide details

Release History

Release 16.0

• Command introduced.

Example

EXTENSION
  /SPECIFICATION COMMAND="c:\mypls.xml"

Related Topics

Overview (EXTENSION command)
Examples (EXTENSION command)
SPECIFICATION Subcommand (EXTENSION command)


Overview (EXTENSION command)

EXTENSION allows you to add user-created "extension" commands to the command table, enabling the use of "native" command syntax to drive functions written in an external programming language.

Basic Specification Collapse Hide details

Basic Specification

The minimum specification is the SPECIFICATION subcommand with a COMMAND file specified.

ACTION (keyword),ACTION (keyword),ACTION (keyword)
EXTENSION command,EXTENSION command,EXTENSION command
ACTION Keyword Collapse Hide details

ACTION Keyword

The ACTION keyword specifies the action to be taken on the command table.

ADD | Add command name to command table. This is the default. Note that ADD will replace a built-in command of the same name as well as an existing extension command of the same name, regardless of the languages in which the extension commands are written. It will not replace an abbreviated form of a built-in command unless the name matches the abbreviation. For example, an extension command named FREQUENCIES will replace the built-in FREQUENCIES command but the abbreviation FREQ will still run the built-in command.
REMOVE | Remove command name from command table. Any built-in command replaced by the specified extension command will be restored when the extension command is removed.

For information on creating extension commands, see the article "Writing PASW Statistics Extension Commands", available from Developer Central at http://www.spss.com/devcentral. You may also want to consult the chapter on Extension Commands in Programming and Data Management for PASW Statistics, available in PDF from http://www.spss.com/spss/data_management_book.htm.

Related Topics

EXTENSION
Examples (EXTENSION command)
SPECIFICATION Subcommand (EXTENSION command)


Examples (EXTENSION command)

Adding a New Command

EXTENSION
  /SPECIFICATION COMMAND="<installdir>/extensions/plscommand.xml".

The SPECIFICATION subcommand specifies that the syntax diagram for the extension command is defined by plscommand.xml in the \extensions subdirectory of the main installation directory (replace <installdir> with the path to the installation directory on your system). The default action is for the command name provided in the XML file to be added to the command table or replace an existing command name.

Removing a Command

EXTENSION ACTION=REMOVE
  /SPECIFICATION COMMAND="<installdir>/extensions/plscommand.xml".

The ACTION keyword specifies that the command name provided in plscommand.xml should be removed from the command table.

Related Topics

EXTENSION
Overview (EXTENSION command)
SPECIFICATION Subcommand (EXTENSION command)


SPECIFICATION Subcommand (EXTENSION command)

EXTENSION (command),EXTENSION (command),EXTENSION (command)
SPECIFICATION subcommand,SPECIFICATION subcommand,SPECIFICATION subcommand
SPECIFICATION (subcommand),SPECIFICATION (subcommand),SPECIFICATION (subcommand)
EXTENSION command,EXTENSION command,EXTENSION command

The SPECIFICATION subcommand allows you to specify the location of the XML file that defines the syntax diagram for the extension command.

Note: At startup, the system processes all XML files in the \extensions subdirectory of the main installation directory as well as in any directories specified in the optional SPSS_EXTENSIONS_PATH environment variable. EXTENSION is most useful when you have XML files that are not in one of those locations, or want to add a new extension command to an already-running session.

COMMAND (keyword),COMMAND (keyword),COMMAND (keyword)
EXTENSION command,EXTENSION command,EXTENSION command
COMMAND Keyword Collapse Hide details

COMMAND Keyword

The COMMAND keyword specifies the location of the XML file that defines the syntax diagram for the extension command. This file provides the command name and is used by the universal parser to pass the correct arguments to the extension command.

Related Topics

EXTENSION
Overview (EXTENSION command)
Examples (EXTENSION command)


EXSMOOTH

EXSMOOTH (command),EXSMOOTH (command),EXSMOOTH (command)
EXSMOOTH (command),EXSMOOTH (command),EXSMOOTH (command)
syntax chart,syntax chart,syntax chart
Exponential Smoothing,Exponential Smoothing,Exponential Smoothing
command syntax,command syntax,command syntax

EXSMOOTH requires a special license that is not available to all users.

EXSMOOTH  [VARIABLES=] series names

 [/MODEL={NN** or SINGLE }]
         {NA             }
         {NM             }

         {LN or HOLT     }
         {LA             }
         {LM or WINTERS  }

         {EN             }
         {EA             }
         {EM             }

         {DN             }
         {DA             }
         {DM             }

 [/PERIOD=n]

 [/SEASFACT={(value list)}]
            {varname     }

 [/ALPHA={0.1**                         }]
         {value                         }
         {GRID ({0,1,0.1              })}
                {start, end, increment}

 [/GAMMA={0.1**                         }]
         {value                         }
         {GRID ({0,1,0.2              })}
                {start, end, increment}

 [/DELTA={0.1**                         }]
         {value                         }
         {GRID ({0,1,0.2              })}
                {start, end, increment}

 [/PHI={0.1**                         }]
       {value                         }
       {GRID ({0.1,0.9,0.2          })}
              {start, end, increment}

 [/INITIAL={CALCULATE**               }]
           {(start value, trend value)}

 [/APPLY[='model name']]

**Default if the subcommand is omitted.

See EXSMOOTH Algorithms for computational details for this procedure.

Example

EXSMOOTH VAR2
  /MODEL=LN.

Related Topics

Overview (EXSMOOTH command)
VARIABLES Subcommand (EXSMOOTH command)
MODEL Subcommand (EXSMOOTH command)
PERIOD Subcommand (EXSMOOTH command)
SEASFACT Subcommand (EXSMOOTH command)
Smoothing Parameter Subcommands (EXSMOOTH command)
INITIAL Subcommand (EXSMOOTH command)
APPLY Subcommand (EXSMOOTH command)
References (EXSMOOTH command)
AREG
ARIMA
FIT
SEASON
SPECTRA
TSET
TSHOW
MODEL NAME
READ MODEL
SAVE MODEL
TDISPLAY


Overview (EXSMOOTH command)

EXSMOOTH produces fit/forecast values and residuals for one or more time series. A variety of models differing in trend (none, linear, or exponential) and seasonality (none, additive, or multiplicative) are available (Gardner, 1985).

Options Collapse Hide details

Options

Model Specification. You can specify a model with any combination of trend and seasonality components using the MODEL subcommand. For seasonal models, you can specify the periodicity using the PERIOD subcommand.

Parameter Specification. You can specify values for the smoothing parameters using the ALPHA, GAMMA, DELTA, and PHI subcommands. You can also specify initial values using the subcommand INITIAL and seasonal factor estimates using the subcommand SEASFACT.

Statistical Output. To get a list of all the SSE’s and parameters instead of just the 10 smallest, specify TSET PRINT=DETAILED prior to EXSMOOTH.

New Variables. Because of the number of parameter and value combinations available, EXSMOOTH can create many new variables (up to the maximum specified on the TSET MXNEWVARS command). To evaluate the sum of squared errors without creating and saving new variables to the active dataset, use TSET NEWVAR=NONE prior to EXSMOOTH. To add new variables without erasing the values of previous Forecasting-generated variables, specify TSET NEWVAR=ALL. This saves all new variables generated during the current session to the active dataset.

Forecasting. When used with the PREDICT command, EXSMOOTH can produce forecasts beyond the end of the series (see PREDICT for more information).

Basic Specification Collapse Hide details

Basic Specification

The basic specification is one or more series names.

• If a model is not specified, the NN (no trend and nonseasonal) model is used. The default value for each of the smoothing parameters is 0.1.

• Unless the default on the TSET NEWVAR is changed prior to the EXSMOOTH procedure, for each combination of smoothing parameters and series specified, EXSMOOTH creates two variables: FIT#n to contain the predicted values and ERR#n to contain residuals. These variables are automatically labeled and added to the active dataset.

• The output displays the initial values used in the analysis (Ledolter and Abraham, 1984), the error degrees of freedom (DFE), and an ascending list of the smallest sum of squared errors (SSE) next to the associated set of smoothing parameters, up to a maximum of 10. For seasonal series, initial seasonal factor estimates are also displayed.

Subcommand Order Collapse Hide details

Subcommand Order

• Subcommands can be specified in any order.

Syntax Rules Collapse Hide details

Syntax Rules

• VARIABLES can be specified only once.

• Other subcommands can be specified more than once, but only the last specification of each one is executed.

• The value list for subcommand SEASFACT and the grid values for the smoothing parameters must be enclosed within parentheses.

Operations Collapse Hide details

Operations

• If a smoothing parameter is specified for an inappropriate model, it is ignored. See the topic Smoothing Parameter Subcommands (EXSMOOTH command) for more information.

• EXSMOOTH cannot process series with missing observations. (You can use the RMV command to replace missing values, and USE to ignore missing observations at the beginning or end of a series. See RMV and USE for more information.)

• When EXSMOOTH is used with PREDICT, error series are assigned the system-missing value in the entire PREDICT range. The original series is system-missing beyond the last original case if the series is extended. (See PREDICT for more information.)

Limitations Collapse Hide details

Limitations

• Maximum 1 VARIABLES subcommand. There is no limit on the number of series named on the list.

• Maximum 1 model keyword on the MODEL subcommand.

Related Topics

EXSMOOTH
VARIABLES Subcommand (EXSMOOTH command)
MODEL Subcommand (EXSMOOTH command)
PERIOD Subcommand (EXSMOOTH command)
SEASFACT Subcommand (EXSMOOTH command)
Smoothing Parameter Subcommands (EXSMOOTH command)
INITIAL Subcommand (EXSMOOTH command)
APPLY Subcommand (EXSMOOTH command)
References (EXSMOOTH command)


VARIABLES Subcommand (EXSMOOTH command)

EXSMOOTH (command),EXSMOOTH (command),EXSMOOTH (command)
VARIABLES subcommand,VARIABLES subcommand,VARIABLES subcommand
VARIABLES (subcommand),VARIABLES (subcommand),VARIABLES (subcommand)
EXSMOOTH command,EXSMOOTH command,EXSMOOTH command

VARIABLES specifies the series names and is the only required subcommand. The actual keyword VARIABLES can be omitted.

• For seasonal models, the series must contain at least four full seasons of data.

Related Topics

EXSMOOTH
Overview (EXSMOOTH command)
MODEL Subcommand (EXSMOOTH command)
PERIOD Subcommand (EXSMOOTH command)
SEASFACT Subcommand (EXSMOOTH command)
Smoothing Parameter Subcommands (EXSMOOTH command)
INITIAL Subcommand (EXSMOOTH command)
APPLY Subcommand (EXSMOOTH command)
References (EXSMOOTH command)


MODEL Subcommand (EXSMOOTH command)

EXSMOOTH (command),EXSMOOTH (command),EXSMOOTH (command)
MODEL subcommand,MODEL subcommand,MODEL subcommand
MODEL (subcommand),MODEL (subcommand),MODEL (subcommand)
EXSMOOTH command,EXSMOOTH command,EXSMOOTH command
EXSMOOTH (command),EXSMOOTH (command),EXSMOOTH (command)
models,models,models

MODEL specifies the type of model to be used.

• The only specification on MODEL is a model keyword.

• Only one model keyword can be specified. If more than one is specified, only the first is used.

The following models are available.

seasonality,seasonality,seasonality
EXSMOOTH command,EXSMOOTH command,EXSMOOTH command
no trend model,no trend model,no trend model
EXSMOOTH command,EXSMOOTH command,EXSMOOTH command

No trend models:

NN (keyword),NN (keyword),NN (keyword)
EXSMOOTH command,EXSMOOTH command,EXSMOOTH command
NA (keyword),NA (keyword),NA (keyword)
EXSMOOTH command,EXSMOOTH command,EXSMOOTH command
NM (keyword),NM (keyword),NM (keyword)
EXSMOOTH command,EXSMOOTH command,EXSMOOTH command
NN | No trend and no seasonality. This is the default model. The keyword SINGLE is an alias for NN.
NA | No trend and an additive seasonal component.
NM | No trend and a multiplicative seasonal component.
linear model,linear model,linear model
EXSMOOTH command,EXSMOOTH command,EXSMOOTH command

Linear trend models:

LN (keyword),LN (keyword),LN (keyword)
EXSMOOTH command,EXSMOOTH command,EXSMOOTH command
HOLT (keyword),HOLT (keyword),HOLT (keyword)
EXSMOOTH command,EXSMOOTH command,EXSMOOTH command
LA (keyword),LA (keyword),LA (keyword)
EXSMOOTH command,EXSMOOTH command,EXSMOOTH command
LM (keyword),LM (keyword),LM (keyword)
EXSMOOTH command,EXSMOOTH command,EXSMOOTH command
WINTERS (keyword),WINTERS (keyword),WINTERS (keyword)
EXSMOOTH command,EXSMOOTH command,EXSMOOTH command
LN | Linear trend component and no seasonality. The keyword HOLT is an alias for LN.
LA | Linear trend component and an additive seasonal component.
LM | Linear trend component and a multiplicative seasonal component. The keyword WINTERS is an alias for LM.
exponential model,exponential model,exponential model
EXSMOOTH command,EXSMOOTH command,EXSMOOTH command

Exponential trend models:

EN (keyword),EN (keyword),EN (keyword)
EXSMOOTH command,EXSMOOTH command,EXSMOOTH command
EA (keyword),EA (keyword),EA (keyword)
EXSMOOTH command,EXSMOOTH command,EXSMOOTH command
EM (keyword),EM (keyword),EM (keyword)
EXSMOOTH command,EXSMOOTH command,EXSMOOTH command
EN | Exponential trend component and no seasonality.
EA | Exponential trend component and an additive seasonal component.
EM | Exponential trend component and a multiplicative seasonal component.
damped model,damped model,damped model
EXSMOOTH command,EXSMOOTH command,EXSMOOTH command

Damped trend models:

DN (keyword),DN (keyword),DN (keyword)
EXSMOOTH command,EXSMOOTH command,EXSMOOTH command
DA (keyword),DA (keyword),DA (keyword)
EXSMOOTH command,EXSMOOTH command,EXSMOOTH command
DM (keyword),DM (keyword),DM (keyword)
EXSMOOTH command,EXSMOOTH command,EXSMOOTH command
seasonality,seasonality,seasonality
EXSMOOTH command,EXSMOOTH command,EXSMOOTH command
DN | Damped trend component and no seasonality.
DA | Damped trend component and an additive seasonal component.
DM | Damped trend component and a multiplicative seasonal component.
NN (keyword),NN (keyword),NN (keyword)
EXSMOOTH command,EXSMOOTH command,EXSMOOTH command
NA (keyword),NA (keyword),NA (keyword)
EXSMOOTH command,EXSMOOTH command,EXSMOOTH command
NM (keyword),NM (keyword),NM (keyword)
EXSMOOTH command,EXSMOOTH command,EXSMOOTH command
LN (keyword),LN (keyword),LN (keyword)
EXSMOOTH command,EXSMOOTH command,EXSMOOTH command
LA (keyword),LA (keyword),LA (keyword)
EXSMOOTH command,EXSMOOTH command,EXSMOOTH command
LM (keyword),LM (keyword),LM (keyword)
EXSMOOTH command,EXSMOOTH command,EXSMOOTH command
EN (keyword),EN (keyword),EN (keyword)
EXSMOOTH command,EXSMOOTH command,EXSMOOTH command
EA (keyword),EA (keyword),EA (keyword)
EXSMOOTH command,EXSMOOTH command,EXSMOOTH command
EM (keyword),EM (keyword),EM (keyword)
EXSMOOTH command,EXSMOOTH command,EXSMOOTH command
DN (keyword),DN (keyword),DN (keyword)
EXSMOOTH command,EXSMOOTH command,EXSMOOTH command
DA (keyword),DA (keyword),DA (keyword)
EXSMOOTH command,EXSMOOTH command,EXSMOOTH command
DM (keyword),DM (keyword),DM (keyword)
EXSMOOTH command,EXSMOOTH command,EXSMOOTH command

Models for different types of trends and seasons
 |  | Seasonal component
 |  | None | Additive | Multiplicative
 | None | NN | NA | NM
Trend component | Linear | LN | LA | LM
 | Exponential | EN | EA | EM
 | Damped | DN | DA | DM

Example

EXSMOOTH VAR1.

• This example uses the default model NN for series VAR1.

Example

EXSMOOTH VAR2
  /MODEL=LN.
EXSMOOTH (command),EXSMOOTH (command),EXSMOOTH (command)
MODEL subcommand,MODEL subcommand,MODEL subcommand
MODEL (subcommand),MODEL (subcommand),MODEL (subcommand)
EXSMOOTH command,EXSMOOTH command,EXSMOOTH command
EXSMOOTH (command),EXSMOOTH (command),EXSMOOTH (command)
models,models,models

• This example uses model LN (linear trend with no seasonality) for series VAR2.

Related Topics

EXSMOOTH
Overview (EXSMOOTH command)
VARIABLES Subcommand (EXSMOOTH command)
PERIOD Subcommand (EXSMOOTH command)
SEASFACT Subcommand (EXSMOOTH command)
Smoothing Parameter Subcommands (EXSMOOTH command)
INITIAL Subcommand (EXSMOOTH command)
APPLY Subcommand (EXSMOOTH command)
References (EXSMOOTH command)


PERIOD Subcommand (EXSMOOTH command)

EXSMOOTH (command),EXSMOOTH (command),EXSMOOTH (command)
PERIOD subcommand,PERIOD subcommand,PERIOD subcommand
PERIOD (subcommand),PERIOD (subcommand),PERIOD (subcommand)
EXSMOOTH command,EXSMOOTH command,EXSMOOTH command
periodicity,periodicity,periodicity
EXSMOOTH command,EXSMOOTH command,EXSMOOTH command
Exponential Smoothing,Exponential Smoothing,Exponential Smoothing
specifying periodicity,specifying periodicity,specifying periodicity
PERIOD (subcommand),PERIOD (subcommand),PERIOD (subcommand)
EXSMOOTH command,EXSMOOTH command,EXSMOOTH command

PERIOD indicates the periodicity of the seasonal component for seasonal models.

• The specification on PERIOD indicates how many observations are in one period or season and can be any positive integer.

• PERIOD is ignored if it is specified with a nonseasonal model.

• If PERIOD is not specified, the periodicity established on TSET PERIOD is in effect. If TSET PERIOD is not specified, the periodicity established on the DATE command is used. If periodicity was not established anywhere and a seasonal model is specified, EXSMOOTH will terminate.

Example

EXSMOOTH VAR1
  /MODEL=LA
  /PERIOD=12.

• This example specifies a periodicity of 12 for the seasonal VAR1 series.

Related Topics

EXSMOOTH
Overview (EXSMOOTH command)
VARIABLES Subcommand (EXSMOOTH command)
MODEL Subcommand (EXSMOOTH command)
SEASFACT Subcommand (EXSMOOTH command)
Smoothing Parameter Subcommands (EXSMOOTH command)
INITIAL Subcommand (EXSMOOTH command)
APPLY Subcommand (EXSMOOTH command)
References (EXSMOOTH command)


SEASFACT Subcommand (EXSMOOTH command)

EXSMOOTH (command),EXSMOOTH (command),EXSMOOTH (command)
SEASFACT subcommand,SEASFACT subcommand,SEASFACT subcommand
SEASFACT (subcommand),SEASFACT (subcommand),SEASFACT (subcommand)
EXSMOOTH command,EXSMOOTH command,EXSMOOTH command
seasonal factor estimates,seasonal factor estimates,seasonal factor estimates
EXSMOOTH command,EXSMOOTH command,EXSMOOTH command

SEASFACT specifies initial seasonal factor estimates for seasonal models.

• The specification on SEASFACT is either a value list enclosed in parentheses or a variable name.

• If a value list is specified, the number of values in the list must equal the periodicity. For example, if the periodicity is 12, then 12 initial values must be specified.

• For multiplicative models, the sum of the values in the list should equal the periodicity. For additive models, the sum of the values should equal 0.

• A variable specification on SEASFACT indicates the name of a variable in the active dataset containing the seasonal factor estimates (see SEASON).

• If the model is seasonal and SEASFACT is not specified, EXSMOOTH calculates the initial seasonal factors.

• The seasonal factor estimates of a SEASFACT subcommand are not used when the model is respecified using the APPLY subcommand.

Example

EXSMOOTH VAR2
  /MODEL=LA
  /PERIOD=8
  /SEASFACT=(-25.30 -3 -14.70 17 4 3 13 6).

• This command uses the list of values specified on the SEASFACT subcommand as the initial seasonal factor estimates.

• Eight values are specified, since the periodicity is 8.

• The eight values sum to 0, since this is an additive seasonal model.

Example

EXSMOOTH VAR3
  /MODEL=LA
  /SEASFACT=SAF#1.

• This command uses the initial seasonal factors contained in variable SAF#1, which was saved in the active dataset by a previous SEASON command.

Related Topics

EXSMOOTH
Overview (EXSMOOTH command)
VARIABLES Subcommand (EXSMOOTH command)
MODEL Subcommand (EXSMOOTH command)
PERIOD Subcommand (EXSMOOTH command)
Smoothing Parameter Subcommands (EXSMOOTH command)
INITIAL Subcommand (EXSMOOTH command)
APPLY Subcommand (EXSMOOTH command)
References (EXSMOOTH command)


Smoothing Parameter Subcommands (EXSMOOTH command)

EXSMOOTH (command),EXSMOOTH (command),EXSMOOTH (command)
smoothing parameter subcommands,smoothing parameter subcommands,smoothing parameter subcommands
smoothing parameter subcommands,smoothing parameter subcommands,smoothing parameter subcommands
EXSMOOTH command,EXSMOOTH command,EXSMOOTH command
ALPHA (subcommand),ALPHA (subcommand),ALPHA (subcommand)
EXSMOOTH command,EXSMOOTH command,EXSMOOTH command
GAMMA (subcommand),GAMMA (subcommand),GAMMA (subcommand)
EXSMOOTH command,EXSMOOTH command,EXSMOOTH command
DELTA (subcommand),DELTA (subcommand),DELTA (subcommand)
EXSMOOTH command,EXSMOOTH command,EXSMOOTH command
PHI (subcommand),PHI (subcommand),PHI (subcommand)
EXSMOOTH command,EXSMOOTH command,EXSMOOTH command
EXSMOOTH (command),EXSMOOTH (command),EXSMOOTH (command)
ALPHA subcommand,ALPHA subcommand,ALPHA subcommand
EXSMOOTH (command),EXSMOOTH (command),EXSMOOTH (command)
GAMMA subcommand,GAMMA subcommand,GAMMA subcommand
EXSMOOTH (command),EXSMOOTH (command),EXSMOOTH (command)
DELTA subcommand,DELTA subcommand,DELTA subcommand
EXSMOOTH (command),EXSMOOTH (command),EXSMOOTH (command)
PHI subcommand,PHI subcommand,PHI subcommand
GRID (keyword),GRID (keyword),GRID (keyword)
EXSMOOTH command,EXSMOOTH command,EXSMOOTH command

ALPHA, GAMMA, DELTA, and PHI specify the values that are used for the smoothing parameters.

• The specification on each subcommand is either a value within the valid range, or the keyword GRID followed by optional range values.

• If GAMMA, DELTA, or PHI are not specified but are required for the model, the default values are used.

• ALPHA is applied to all models. If it is not specified, the default value is used.

trend smoothing parameter,trend smoothing parameter,trend smoothing parameter
EXSMOOTH command,EXSMOOTH command,EXSMOOTH command
general smoothing parameter,general smoothing parameter,general smoothing parameter
EXSMOOTH command,EXSMOOTH command,EXSMOOTH command
seasonal smoothing parameter,seasonal smoothing parameter,seasonal smoothing parameter
EXSMOOTH command,EXSMOOTH command,EXSMOOTH command
trend modification parameter,trend modification parameter,trend modification parameter
EXSMOOTH command,EXSMOOTH command,EXSMOOTH command
ALPHA | General smoothing parameter. This parameter is applied to all models. Alpha can be any value between and including 0 and 1. (For EM models, alpha must be greater than 0 and less than or equal to 1.) The default value is 0.1.
GAMMA | Trend smoothing parameter. Gamma is used only with models that have a trend component, excluding damped seasonal (DA, DM) models. It is ignored if it is specified with a damped seasonal or no-trend model. Gamma can be any value between and including 0 and 1. The default value is 0.1.
DELTA | Seasonal smoothing parameter. Delta is used only with models that have a seasonal component. It is ignored if it is specified with any of the nonseasonal models. Delta can be any value between and including 0 and 1. The default value is 0.1.
PHI | Trend modification parameter. Phi is used only with models that have a damped trend component. It is ignored if it is specified with models that do not have a damped trend. Phi can be any value greater than 0 and less than 1. The default value is 0.1.
EXSMOOTH (command),EXSMOOTH (command),EXSMOOTH (command)
PHI subcommand,PHI subcommand,PHI subcommand
EXSMOOTH (command),EXSMOOTH (command),EXSMOOTH (command)
DELTA subcommand,DELTA subcommand,DELTA subcommand
EXSMOOTH (command),EXSMOOTH (command),EXSMOOTH (command)
GAMMA subcommand,GAMMA subcommand,GAMMA subcommand
EXSMOOTH (command),EXSMOOTH (command),EXSMOOTH (command)
ALPHA subcommand,ALPHA subcommand,ALPHA subcommand
PHI (subcommand),PHI (subcommand),PHI (subcommand)
EXSMOOTH command,EXSMOOTH command,EXSMOOTH command
DELTA (subcommand),DELTA (subcommand),DELTA (subcommand)
EXSMOOTH command,EXSMOOTH command,EXSMOOTH command
GAMMA (subcommand),GAMMA (subcommand),GAMMA (subcommand)
EXSMOOTH command,EXSMOOTH command,EXSMOOTH command
ALPHA (subcommand),ALPHA (subcommand),ALPHA (subcommand)
EXSMOOTH command,EXSMOOTH command,EXSMOOTH command

The following table summarizes the parameters that are used with each EXSMOOTH model. An X indicates that the parameter is used for the model.

Parameters that can be specified with EXSMOOTH models
 |  | Smoothing parameter
 |  | ALPHA | DELTA | GAMMA | PHI
 | NN | x |  |  |
 | NA | x | x |  |
 | NM | x | x |  |
 | LN | x |  | x |
 | LA | x | x | x |
Model | LM | x | x | x |
 | EN | x |  | x |
 | EA | x | x | x |
 | EM | x | x | x |
 | DN | x |  | x | x
 | DA | x | x |  | x
 | DM | x | x |  | x

Related Topics

EXSMOOTH
Overview (EXSMOOTH command)
VARIABLES Subcommand (EXSMOOTH command)
MODEL Subcommand (EXSMOOTH command)
PERIOD Subcommand (EXSMOOTH command)
SEASFACT Subcommand (EXSMOOTH command)
INITIAL Subcommand (EXSMOOTH command)
APPLY Subcommand (EXSMOOTH command)
References (EXSMOOTH command)
Keyword GRID (EXSMOOTH command)


Keyword GRID (EXSMOOTH command)

grid search,grid search,grid search
EXSMOOTH command,EXSMOOTH command,EXSMOOTH command

The keyword GRID specifies a range of values to use for the associated smoothing parameter. When GRID is specified, new variables are saved only for the optimal set of parameters on the grid.

• The first value on GRID specifies the start value, the second value is the end value, and the last value is the increment.

• The start, end, and increment values on GRID are separated by commas or spaces and enclosed in parentheses.

• If you specify any grid values, you must specify all three.

• If no values are specified on GRID, the default values are used.

• Grid start and end values for alpha, gamma, and delta can range from 0 to 1. The defaults are 0 for the start value and 1 for the end value.

• Grid start and end values for phi can range from 0 to 1, exclusive. The defaults are 0.1 for the start value and 0.9 for the end value.

• Grid increment values must be within the range specified by start and end values. The default is 0.1 for alpha, and 0.2 for gamma, delta, and phi.

Example

EXSMOOTH VAR1
  /MODEL=LA
  /PERIOD=12
  /GAMMA=0.20
  /DELTA=0.20.

• This example uses a model with a linear trend and additive seasonality.

• The parameters and values are alpha = 0.10, gamma = 0.20, and delta = 0.20. Alpha is not specified but is always used by default.

• This command generates one FIT variable and one ERR variable to contain the forecasts and residuals generated by this one set of parameters.

Example

EXSMOOTH VAR2
  /MODEL=EA
  /ALPHA=GRID
  /DELTA=GRID(0.2,0.6,0.2).

• This example specifies a model with an exponential trend component and an additive seasonal component.

• The default start, end, and increment values (0, 1, and 0.1) are used for the grid search of alpha. Thus, the values used for alpha are 0, 0.1, 0.2, 0.3, ..., 0.9, and 1.

• The grid specification for delta indicates a start value of 0.2, an end value of 0.6, and an increment of 0.2. Thus, the values used for delta are 0.2, 0.4, and 0.6.

• Since this is an exponential trend model, the parameter gamma will be supplied by EXSMOOTH with the default value of 0.1, even though it is not specified on the command.

GRID (keyword),GRID (keyword),GRID (keyword)
EXSMOOTH command,EXSMOOTH command,EXSMOOTH command

• Two variables (FIT and ERR) will be generated for the parameters resulting in the best-fitting model.

Related Topics

Smoothing Parameter Subcommands (EXSMOOTH command)


INITIAL Subcommand (EXSMOOTH command)

INITIAL (subcommand),INITIAL (subcommand),INITIAL (subcommand)
EXSMOOTH command,EXSMOOTH command,EXSMOOTH command
EXSMOOTH (command),EXSMOOTH (command),EXSMOOTH (command)
INITIAL subcommand,INITIAL subcommand,INITIAL subcommand
initial parameter values,initial parameter values,initial parameter values
EXSMOOTH command,EXSMOOTH command,EXSMOOTH command

INITIAL specifies the initial start and trend values used in the models.

• The specification on INITIAL is the start and trend values enclosed in parentheses. You must specify both values.

• The values specified on INITIAL are saved as part of the model and can be reapplied with the APPLY subcommand.

• If INITIAL is not specified, the initial start and trend values are calculated by EXSMOOTH. These calculated initial values are not saved as part of the model.

CALCULATE (keyword),CALCULATE (keyword),CALCULATE (keyword)
EXSMOOTH command,EXSMOOTH command,EXSMOOTH command
CALCULATE (keyword),CALCULATE (keyword),CALCULATE (keyword)
EXSMOOTH command,EXSMOOTH command,EXSMOOTH command

• To turn off the values specified on INITIAL when the model is used on an APPLY subcommand, specify INITIAL=CALCULATE. New initial values will then be calculated by EXSMOOTH.

Example

EXSMOOTH VAR2
  /MODEL=LA
  /PERIOD=4
  /SEASFACT=(23 -14.4 7 -15.6)
  /ALPHA=0.20
  /GAMMA=0.20
  /DELTA=0.30
  /INITIAL=(112,17).

• In this example, an initial start value of 112 and trend value of 17 is specified for series VAR2.

Related Topics

EXSMOOTH
Overview (EXSMOOTH command)
VARIABLES Subcommand (EXSMOOTH command)
MODEL Subcommand (EXSMOOTH command)
PERIOD Subcommand (EXSMOOTH command)
SEASFACT Subcommand (EXSMOOTH command)
Smoothing Parameter Subcommands (EXSMOOTH command)
APPLY Subcommand (EXSMOOTH command)
References (EXSMOOTH command)


APPLY Subcommand (EXSMOOTH command)

APPLY (subcommand),APPLY (subcommand),APPLY (subcommand)
EXSMOOTH command,EXSMOOTH command,EXSMOOTH command
EXSMOOTH (command),EXSMOOTH (command),EXSMOOTH (command)
APPLY subcommand,APPLY subcommand,APPLY subcommand
EXSMOOTH (command),EXSMOOTH (command),EXSMOOTH (command)
using a previously defined model,using a previously defined model,using a previously defined model

APPLY allows you to use a previously defined EXSMOOTH model without having to repeat the specifications.

• The only specification on APPLY is the name of a previous model in quotes. If a model name is not specified, the model specified on the previous EXSMOOTH command is used.

• To change one or more model specifications, specify the subcommands of only those portions you want to change after the APPLY subcommand.

• If no series are specified on the command, the series that were originally specified with the model being reapplied are used.

• To change the series used with the model, enter new series names before or after the APPLY subcommand. If a series name is specified before APPLY, the slash before the subcommand is required.

• Initial values from the previous model’s INITIAL subcommand are applied unless you specify INITIAL = CALCULATE or a new set of initial values. Initial values from the original model are not applied if they were calculated by EXSMOOTH.

• Seasonal factor estimates from the original model’s SEASFACT subcommand are not applied. To use seasonal factor estimates, you must respecify SEASFACT.

Example

EXSMOOTH VAR1
  /MODEL=NA
  /PERIOD=12
  /ALPHA=0.2
  /DELTA=0.2.
EXSMOOTH APPLY
  /DELTA=0.3.
EXSMOOTH VAR2
  /APPLY.

• The first command uses a model with no trend but additive seasonality for series VAR1. The length of the season (PERIOD) is 12. A general smoothing parameter (ALPHA) and a seasonal smoothing parameter (DELTA) are used, both with values set equal to 0.2.

• The second command applies the same model to the same series but changes the delta value to 0.3. Everything else stays the same.

• The last command applies the model and parameter values used in the second EXSMOOTH command to series VAR2.

Example

EXSMOOTH VAR3
  /MOD=NA
  /ALPHA=0.20
  /DELTA=0.4
  /INITIAL=(114,20).
EXSMOOTH VAR4
  /APPLY
  /INITIAL=CALCULATE.

• The first command uses a model with no trend and additive seasonality model with alpha set to 0.2 and delta set to 0.4. Initial start and trend values of 114 and 20 are specified.

• The second command applies the previous model and parameter values to a new variable, VAR4, but without the initial starting values. The initial starting values will be calculated by EXSMOOTH.

Related Topics

EXSMOOTH
Overview (EXSMOOTH command)
VARIABLES Subcommand (EXSMOOTH command)
MODEL Subcommand (EXSMOOTH command)
PERIOD Subcommand (EXSMOOTH command)
SEASFACT Subcommand (EXSMOOTH command)
Smoothing Parameter Subcommands (EXSMOOTH command)
INITIAL Subcommand (EXSMOOTH command)
References (EXSMOOTH command)


References (EXSMOOTH command)

Abraham, B., and J. Ledolter. 1983. Statistical methods of forecasting. New York: John Wiley and Sons.

Gardner, E. S. 1985. Exponential smoothing: The state of the art. Journal of Forecasting, 4, 1-28.

Ledolter, J., and B. Abraham. 1984. Some comments on the initialization of exponential smoothing. Journal of Forecasting, 3, 79-84.

Makridakis, S., S. C. Wheelwright, and V. E. McGee. 1983. Forecasting: Methods and applications. New York: John Wiley and Sons.

Related Topics

EXSMOOTH
Overview (EXSMOOTH command)
VARIABLES Subcommand (EXSMOOTH command)
MODEL Subcommand (EXSMOOTH command)
PERIOD Subcommand (EXSMOOTH command)
SEASFACT Subcommand (EXSMOOTH command)
Smoothing Parameter Subcommands (EXSMOOTH command)
INITIAL Subcommand (EXSMOOTH command)
APPLY Subcommand (EXSMOOTH command)


FACTOR

Factor Analysis,Factor Analysis,Factor Analysis
command syntax,command syntax,command syntax
FACTOR (command),FACTOR (command),FACTOR (command)
FACTOR (command),FACTOR (command),FACTOR (command)
syntax charts,syntax charts,syntax charts

FACTOR is available in the Statistics Base option.

FACTOR VARIABLES=varlist† [/MISSING=[{LISTWISE**}] [INCLUDE]]
                                     {PAIRWISE  }
                                     {MEANSUB   }
                                     {DEFAULT** }

 [/MATRIX=[IN({COR='savfile'|'dataset'})]  [OUT({COR='savfile'|'dataset'})]]
              {COR=*                  }         {COR=*                  }
              {COV='savfile'|'dataset'}         {COV='savfile'|'dataset'}
              {COV=*                  }         {COV=*                  }
              {FAC='savfile'|'dataset'}         {FAC='savfile'|'dataset'}
              {FAC=*                  }         {FAC=*                  }
                         {FSC='savfile'|'dataset'}
                         {FSC=*                   }

 [/METHOD = {CORRELATION**}]
            {COVARIANCE   }

 [/SELECT=varname(value)]

 [/ANALYSIS=varlist...]

 [/PRINT=[DEFAULT**] [INITIAL**] [EXTRACTION**] [ROTATION**]
         [UNIVARIATE] [CORRELATION] [COVARIANCE] [DET] [INV]
         [REPR] [AIC] [KMO] [FSCORE] [SIG] [ALL]]

 [/PLOT=[EIGEN] [ROTATION [(n1,n2)]]]

 [/DIAGONAL={value list}]
            {DEFAULT** }

 [/FORMAT=[SORT] [BLANK(n)] [DEFAULT**]]

 [/CRITERIA=[FACTORS(n)] [MINEIGEN({1.0**})] [ITERATE({25**})]
                                   {n    }            {n   }

            [RCONVERGE({0.0001**})]  [{KAISER**}]
                       {n       }     {NOKAISER}

            [ECONVERGE({0.001**})] [DEFAULT**]]
                       {n      }

 [/EXTRACTION={PC**     }] [/ROTATION={VARIMAX**   }]
              {PA1**    }             {EQUAMAX     }
              {PAF      }             {QUARTIMAX   }
              {ALPHA    }             {OBLIMIN({0})}
              {IMAGE    }                      {n}
              {ULS      }             {PROMAX({4}  }
              {GLS      }                     {n}
              {ML       }             {NOROTATE    }
              {DEFAULT**}             {DEFAULT**   }

 [/SAVE=[{REG    } ({ALL}[rootname])]]
         {BART   }  {n  }
         {AR     }
         {DEFAULT}

† Omit VARIABLES with matrix input.

**Default if subcommand or keyword is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See FACTOR Algorithms for computational details for this procedure.

Syntax for the FACTOR command can be generated from the Factor Analysis dialog.

Release History Collapse Hide details

Release History

Release 16.0

• Added support for SET THREADS and SET MCACHE.

Example

FACTOR VARIABLES=V1 TO V12.

Related Topics

Overview (FACTOR command)
Examples (FACTOR command)
VARIABLES Subcommand (FACTOR command)
MISSING Subcommand (FACTOR command)
METHOD Subcommand (FACTOR command)
SELECT Subcommand (FACTOR command)
ANALYSIS Subcommand (FACTOR command)
FORMAT Subcommand (FACTOR command)
PRINT Subcommand (FACTOR command)
PLOT Subcommand (FACTOR command)
DIAGONAL Subcommand (FACTOR command)
CRITERIA Subcommand (FACTOR command)
EXTRACTION Subcommand (FACTOR command)
ROTATION Subcommand (FACTOR command)
SAVE Subcommand (FACTOR command)
MATRIX Subcommand (FACTOR command)
References (FACTOR command)


Overview (FACTOR command)

FACTOR performs factor analysis based either on correlations or covariances and using one of the seven extraction methods. FACTOR also accepts matrix input in the form of correlation matrices, covariance matrices, or factor-loading matrices and can write the matrix materials to a matrix data file.

Options Collapse Hide details

Options

Analysis Phase Options. You can choose to analyze a correlation or covariance matrix using the METHOD subcommand. You can select a subset of cases for the analysis phase using the SELECT subcommand. You can tailor the statistical display for an analysis using the PRINT subcommand. You can sort the output in the factor pattern and structure matrices with the FORMAT subcommand. You can also request scree plots and plots of the variables in factor space on the PLOT subcommand.

Extraction Phase Options. With the EXTRACTION subcommand, you can specify one of six extraction methods in addition to the default principal components extraction: principal axis factoring, alpha factoring, image factoring, unweighted least squares, generalized least squares, and maximum likelihood. You can supply initial diagonal values for principal axis factoring on the DIAGONAL subcommand. On the CRITERIA subcommand, you can alter the default statistical criteria used in the extraction.

Rotation Phase Options. You can control the criteria for factor rotation with the CRITERIA subcommand. On the ROTATION subcommand, you can choose among four rotation methods (equamax, quartimax, promax, and oblimin) in addition to the default varimax rotation, or you can specify no rotation.

Factor Scores. You can save factor scores as new variables in the active dataset using any of the three methods available on the SAVE subcommand.

Matrix Input and Output. With the MATRIX subcommand, you can write a correlation matrix, a covariance matrix, or a factor-loading matrix. You can also read matrix materials written either by a previous FACTOR procedure or by a procedure that writes correlation or covariance matrices.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is the VARIABLES subcommand with a variable list. FACTOR performs principal components analysis with a varimax rotation on all variables in the analysis using default criteria.

• When matrix materials are used as input, do not specify VARIABLES. Use the ANALYSIS subcommand to specify a subset of the variables in the matrix.

Subcommand Order Collapse Hide details

Subcommand Order

• METHOD and SELECT can be specified anywhere. VARIABLES must be specified before any other subcommands, unless an input matrix is specified. MISSING must be specified before ANALYSIS.

• The ANALYSIS, EXTRACTION, ROTATION, and SAVE subcommands must be specified in the order they are listed here. If you specify these subcommands out of order, you may get unpracticed results. For example, if you specify EXTRACTION before ANALYSIS and SAVE before ROTATION, EXTRACTION and SAVE are ignored. If no EXTRACTION and SAVE subcommands are specified in proper order, the default will be used (that is, PC for EXTRACTION and no SAVE).

• The FORMAT subcommand can be specified anywhere after the VARIABLES subcommand.

• If an ANALYSIS subcommand is present, the statistical display options on PRINT, PLOT, or DIAGONAL must be specified after it. PRINT, PLOT, and DIAGONAL subcommands specified before the ANALYSIS subcommand are ignored. If no such commands are specified after the ANALYSIS subcommand, the default is used.

• The CRITERIA subcommand can be specified anywhere, but applies only to the subcommands that follow. If no CRITERIA subcommand is specified before EXTRACTION or ROTATION, the default criteria for the respective subcommand are used.

Example

FACTOR VAR=V1 TO V12
  /ANALYSIS=V1 TO V8
  /CRITERIA=FACTORS(3)
  /EXTRACTION=PAF
  /ROTATION=QUARTIMAX.

• The default CORRELATION method is used. FACTOR performs a factor analysis of the correlation matrix based on the first eight variables in the active dataset (V1 to V8).

• The procedure extracts three factors using the principal axis method and quartimax rotation.

• LISTWISE (the default for MISSING) is in effect. Cases with missing values for any one of the variables from V1 to V12 are omitted from the analysis. As a result, if you ask for the factor analysis using VAR=V1 TO V8 and ANALYSIS=ALL, the results may be different even though the variables used in the analysis are the same.

Syntax Rules Collapse Hide details

Syntax Rules

• Each FACTOR procedure performs only one analysis with one extraction and one rotation. Use multiple FACTOR commands to perform multiple analyses.

• VARIABLES or MATRIX=IN can be specified only once. Any other subcommands can be specified multiple times but only the last in proper order takes effect.

Operations Collapse Hide details

Operations

• VARIABLES calculates a correlation and a covariance matrix. If SELECT is specified, only the selected cases are used.

• The correlation or covariance matrix (either calculated from the data or read in) is the basis for the factor analysis.

• Factor scores are calculated for all cases (selected and unselected).

• This procedure uses the multithreaded options specified by SET THREADS and SET MCACHE.

Related Topics

FACTOR
Examples (FACTOR command)
VARIABLES Subcommand (FACTOR command)
MISSING Subcommand (FACTOR command)
METHOD Subcommand (FACTOR command)
SELECT Subcommand (FACTOR command)
ANALYSIS Subcommand (FACTOR command)
FORMAT Subcommand (FACTOR command)
PRINT Subcommand (FACTOR command)
PLOT Subcommand (FACTOR command)
DIAGONAL Subcommand (FACTOR command)
CRITERIA Subcommand (FACTOR command)
EXTRACTION Subcommand (FACTOR command)
ROTATION Subcommand (FACTOR command)
SAVE Subcommand (FACTOR command)
MATRIX Subcommand (FACTOR command)
References (FACTOR command)


Examples (FACTOR command)

For data reduction

FACTOR
  /VARIABLES type price engine_s horsepow wheelbas width length curb_wgt
  fuel_cap mpg /MISSING LISTWISE /ANALYSIS type price engine_s horsepow
  wheelbas width length curb_wgt fuel_cap mpg
  /PRINT INITIAL EXTRACTION ROTATION FSCORE AIC
  /PLOT EIGEN
  /CRITERIA MINEIGEN(1) ITERATE(25)
  /EXTRACTION PC
  /CRITERIA ITERATE(25)
  /ROTATION VARIMAX
  /METHOD=CORRELATION
  /SAVE = REG(3).

• The procedure requests a principal components analysis of the variables type through mpg.

• The PRINT subcommand requests the initial communalities, extracted communalities, rotated communalities, factor score coefficient matrix, and anti-image covariance and correlation matrices.

• The PLOT subcommand requests a scree plot.

• The ROTATION subcommand requests a Varimax rotation of the solution for easier interpretation of the results.

• The SAVE subcommand requests the factor scores, computed using the regression method, to be saved to the active dataset. Three scores will be added.

• All other options are set to their default values.

For discussion of output from this syntax and to place the example in context, see Using Factor Analysis for Data Reduction.

For structure detection

FACTOR
  /VARIABLES longmon tollmon equipmon cardmon wiremon multline voice
  ebill pager internet callid callwait forward confer /MISSING LISTWISE /ANALYSIS
  longmon tollmon equipmon cardmon wiremon multline voice pager
  internet callid callwait forward confer ebill
  /PRINT INITIAL KMO EXTRACTION ROTATION
  /PLOT EIGEN ROTATION
  /CRITERIA MINEIGEN(1) ITERATE(25)
  /EXTRACTION PAF
  /CRITERIA ITERATE(25)
  /ROTATION VARIMAX
  /METHOD=CORRELATION .

• The procedure requests a principal axis factoring of the variables longmon through confer.

• The PRINT subcommand requests the initial communalities, extracted communalities, rotated communalities, and the Kaiser-Meyer-Olkin measure of sampling adequacy and Bartlett’s test of sphericity.

• The PLOT subcommand requests a scree plot and loadings plot.

• The ROTATION subcommand requests a Varimax rotation of the solution for easier interpretation of the results.

• All other options are set to their default values.

For discussion of output from this syntax and to place the example in context, see Using Factor Analysis for Structure Detection.

Related Topics

FACTOR
Overview (FACTOR command)
VARIABLES Subcommand (FACTOR command)
MISSING Subcommand (FACTOR command)
METHOD Subcommand (FACTOR command)
SELECT Subcommand (FACTOR command)
ANALYSIS Subcommand (FACTOR command)
FORMAT Subcommand (FACTOR command)
PRINT Subcommand (FACTOR command)
PLOT Subcommand (FACTOR command)
DIAGONAL Subcommand (FACTOR command)
CRITERIA Subcommand (FACTOR command)
EXTRACTION Subcommand (FACTOR command)
ROTATION Subcommand (FACTOR command)
SAVE Subcommand (FACTOR command)
MATRIX Subcommand (FACTOR command)
References (FACTOR command)


VARIABLES Subcommand (FACTOR command)

FACTOR (command),FACTOR (command),FACTOR (command)
VARIABLES subcommand,VARIABLES subcommand,VARIABLES subcommand
VARIABLES (subcommand),VARIABLES (subcommand),VARIABLES (subcommand)
FACTOR command,FACTOR command,FACTOR command

VARIABLES names all the variables to be used in the FACTOR procedure.

• VARIABLES is required except when matrix input is used. When FACTOR reads a matrix data file, the VARIABLES subcommand cannot be used.

• The specification on VARIABLES is a list of numeric variables.

• Keyword ALL on VARIABLES refers to all variables in the active dataset.

• Only one VARIABLES subcommand can be specified, and it must be specified first.

Related Topics

FACTOR
Overview (FACTOR command)
Examples (FACTOR command)
MISSING Subcommand (FACTOR command)
METHOD Subcommand (FACTOR command)
SELECT Subcommand (FACTOR command)
ANALYSIS Subcommand (FACTOR command)
FORMAT Subcommand (FACTOR command)
PRINT Subcommand (FACTOR command)
PLOT Subcommand (FACTOR command)
DIAGONAL Subcommand (FACTOR command)
CRITERIA Subcommand (FACTOR command)
EXTRACTION Subcommand (FACTOR command)
ROTATION Subcommand (FACTOR command)
SAVE Subcommand (FACTOR command)
MATRIX Subcommand (FACTOR command)
References (FACTOR command)


MISSING Subcommand (FACTOR command)

MISSING (subcommand),MISSING (subcommand),MISSING (subcommand)
FACTOR command,FACTOR command,FACTOR command
FACTOR (command),FACTOR (command),FACTOR (command)
MISSING subcommand,MISSING subcommand,MISSING subcommand

MISSING controls the treatment of cases with missing values.

• If MISSING is omitted or included without specifications, listwise deletion is in effect.

• MISSING must precede the ANALYSIS subcommand.

• The LISTWISE, PAIRWISE, and MEANSUB keywords are alternatives, but any one of them can be used with INCLUDE.

LISTWISE (keyword),LISTWISE (keyword),LISTWISE (keyword)
FACTOR command,FACTOR command,FACTOR command
PAIRWISE (keyword),PAIRWISE (keyword),PAIRWISE (keyword)
FACTOR command,FACTOR command,FACTOR command
mean substitution,mean substitution,mean substitution
FACTOR command,FACTOR command,FACTOR command
MEANSUBSTITUTION (keyword),MEANSUBSTITUTION (keyword),MEANSUBSTITUTION (keyword)
FACTOR command,FACTOR command,FACTOR command
INCLUDE (keyword),INCLUDE (keyword),INCLUDE (keyword)
FACTOR command,FACTOR command,FACTOR command
LISTWISE | Delete cases with missing values listwise. Only cases with nonmissing values for all variables named on the VARIABLES subcommand are used. Cases are deleted even if they have missing values only for variables listed on VARIABLES and have valid values for all variables listed on ANALYSIS. Alias DEFAULT.
PAIRWISE | Delete cases with missing values pairwise. All cases with nonmissing values for each pair of variables correlated are used to compute that correlation, regardless of whether the cases have missing values for any other variable.
MEANSUB | Replace missing values with the variable mean. All cases are used after the substitution is made. If INCLUDE is also specified, user-missing values are included in the computation of the means, and means are substituted only for the system-missing value. If SELECT is in effect, only the values of selected cases are used in calculating the means used to replace missing values for selected cases in analysis and for all cases in computing factor scores.
INCLUDE | Include user-missing values. Cases with user-missing values are treated as valid.

Related Topics

FACTOR
Overview (FACTOR command)
Examples (FACTOR command)
VARIABLES Subcommand (FACTOR command)
METHOD Subcommand (FACTOR command)
SELECT Subcommand (FACTOR command)
ANALYSIS Subcommand (FACTOR command)
FORMAT Subcommand (FACTOR command)
PRINT Subcommand (FACTOR command)
PLOT Subcommand (FACTOR command)
DIAGONAL Subcommand (FACTOR command)
CRITERIA Subcommand (FACTOR command)
EXTRACTION Subcommand (FACTOR command)
ROTATION Subcommand (FACTOR command)
SAVE Subcommand (FACTOR command)
MATRIX Subcommand (FACTOR command)
References (FACTOR command)


METHOD Subcommand (FACTOR command)

METHOD specifies whether the factor analysis is performed on a correlation matrix or a covariance matrix.

• Only one METHOD subcommand is allowed. If more than one is specified, the last is in effect.

CORRELATION | Perform a correlation matrix analysis. This is the default.
COVARIANCE | Perform a covariance matrix analysis. Valid only with principal components, principal axis factoring, or image factoring methods of extraction. The program issues an error if this keyword is specified when the input is a factor-loading matrix or a correlation matrix that does not contain standard deviations (STDDEV or SD).

Related Topics

FACTOR
Overview (FACTOR command)
Examples (FACTOR command)
VARIABLES Subcommand (FACTOR command)
MISSING Subcommand (FACTOR command)
SELECT Subcommand (FACTOR command)
ANALYSIS Subcommand (FACTOR command)
FORMAT Subcommand (FACTOR command)
PRINT Subcommand (FACTOR command)
PLOT Subcommand (FACTOR command)
DIAGONAL Subcommand (FACTOR command)
CRITERIA Subcommand (FACTOR command)
EXTRACTION Subcommand (FACTOR command)
ROTATION Subcommand (FACTOR command)
SAVE Subcommand (FACTOR command)
MATRIX Subcommand (FACTOR command)
References (FACTOR command)


SELECT Subcommand (FACTOR command)

FACTOR (command),FACTOR (command),FACTOR (command)
SELECT subcommand,SELECT subcommand,SELECT subcommand
SELECT (subcommand),SELECT (subcommand),SELECT (subcommand)
FACTOR command,FACTOR command,FACTOR command
FACTOR (command),FACTOR (command),FACTOR (command)
selecting a subset of cases,selecting a subset of cases,selecting a subset of cases

SELECT limits cases used in the analysis phase to those with a specified value for any one variable.

• Only one SELECT subcommand is allowed. If more than one is specified, the last is in effect.

• The specification is a variable name and a valid value in parentheses. A string value must be specified within quotes. Multiple variables or values are not permitted.

• The selection variable does not have to be specified on the VARIABLES subcommand.

• Only cases with the specified value for the selection variable are used in computing the correlation or covariance matrix. You can compute and save factor scores for the unselected cases as well as the selected cases.

• SELECT is not valid if MATRIX = IN is specified.

Example

FACTOR VARIABLES = V1 TO V10
  /SELECT=COMPLETE(1)
  /SAVE (4).

• FACTOR analyzes all ten variables named on VARIABLES, using only cases with a value of 1 for the variable COMPLETE.

• By default, FACTOR uses the CORRELATION method and performs the principal components analysis of the selected cases. Those with eigenvalues greater than 1 are rotated using varimax rotation.

• Four factor scores, for both selected and unselected cases, are computed using the default regression method and four new variables are saved in the active dataset.

Related Topics

FACTOR
Overview (FACTOR command)
Examples (FACTOR command)
VARIABLES Subcommand (FACTOR command)
MISSING Subcommand (FACTOR command)
METHOD Subcommand (FACTOR command)
ANALYSIS Subcommand (FACTOR command)
FORMAT Subcommand (FACTOR command)
PRINT Subcommand (FACTOR command)
PLOT Subcommand (FACTOR command)
DIAGONAL Subcommand (FACTOR command)
CRITERIA Subcommand (FACTOR command)
EXTRACTION Subcommand (FACTOR command)
ROTATION Subcommand (FACTOR command)
SAVE Subcommand (FACTOR command)
MATRIX Subcommand (FACTOR command)
References (FACTOR command)


ANALYSIS Subcommand (FACTOR command)

ANALYSIS (subcommand),ANALYSIS (subcommand),ANALYSIS (subcommand)
FACTOR command,FACTOR command,FACTOR command
FACTOR (command),FACTOR (command),FACTOR (command)
ANALYSIS subcommand,ANALYSIS subcommand,ANALYSIS subcommand

The ANALYSIS subcommand specifies a subset of the variables named on VARIABLES for use in an analysis.

• The specification on ANALYSIS is a list of variables, all of which must have been named on the VARIABLES subcommand. For matrix input, ANALYSIS can specify a subset of the variables in a correlation or covariance matrix.

• Only one ANALYSIS subcommand is allowed. When multiple ANALYSIS subcommands are specified, the last is in effect.

• If no ANALYSIS is specified, all variables named on the VARIABLES subcommand (or included in the matrix input file) are used.

• Keyword TO in a variable list on ANALYSIS refers to the order in which variables are named on the VARIABLES subcommand, not to their order in the active dataset.

• Keyword ALL refers to all variables named on the VARIABLES subcommand.

Example

FACTOR VARIABLES=V1 V2 V3 V4 V5 V6
   /ANALYSIS=V4 TO V6.

• This example requests a factor analysis of V4, V5, and V6. Keyword TO on ANALYSIS refers to the order of variables on VARIABLES, not the order in the active dataset.

• Cases with missing values for all variables specified on VARIABLES are omitted from the analysis. (The default setting for MISSING.)

• By default, the CORRELATION method is used and a principal components analysis with a varimax rotation is performed.

Related Topics

FACTOR
Overview (FACTOR command)
Examples (FACTOR command)
VARIABLES Subcommand (FACTOR command)
MISSING Subcommand (FACTOR command)
METHOD Subcommand (FACTOR command)
SELECT Subcommand (FACTOR command)
FORMAT Subcommand (FACTOR command)
PRINT Subcommand (FACTOR command)
PLOT Subcommand (FACTOR command)
DIAGONAL Subcommand (FACTOR command)
CRITERIA Subcommand (FACTOR command)
EXTRACTION Subcommand (FACTOR command)
ROTATION Subcommand (FACTOR command)
SAVE Subcommand (FACTOR command)
MATRIX Subcommand (FACTOR command)
References (FACTOR command)


FORMAT Subcommand (FACTOR command)

FORMAT (subcommand),FORMAT (subcommand),FORMAT (subcommand)
FACTOR command,FACTOR command,FACTOR command
FACTOR (command),FACTOR (command),FACTOR (command)
FORMAT subcommand,FORMAT subcommand,FORMAT subcommand
FACTOR (command),FACTOR (command),FACTOR (command)
coefficient display format,coefficient display format,coefficient display format

FORMAT modifies the format of factor pattern and structure matrices.

• FORMAT can be specified anywhere after VARIABLES and MISSING. If more than one FORMAT is specified, the last is in effect.

• If FORMAT is omitted or included without specifications, variables appear in the order in which they are named on ANALYSIS and all matrix entries are displayed.

SORT (keyword),SORT (keyword),SORT (keyword)
FACTOR command,FACTOR command,FACTOR command
BLANK (keyword),BLANK (keyword),BLANK (keyword)
FACTOR command,FACTOR command,FACTOR command
SORT | Order the factor loadings in descending order. Variables are displayed in descending order of the factor 1 loadings until a loading for factor 2 exceeds the loading for factor 1. The remaining variables are then displayed in descending order of the factor 2 loadings until a loading for factor 3 exceeds the loading for factor 2, and so on. The result shows blocks of variables that are similar.
BLANK(n) | Suppress display of coefficients lower than n in absolute value. The corresponding cells in the table will be blank.
DEFAULT | Turn off keywords SORT and BLANK.

Example

FACTOR VARIABLES=V1 TO V12
  /MISSING=MEANSUB
  /FORMAT=SORT BLANK(.3)
  /EXTRACTION=ULS
  /ROTATION=NOROTATE.

• This example specifies an analysis of all variables between and including V1 and V12 in the active dataset.

• The default CORRELATION method is used.

• The MISSING subcommand substitutes variable means for missing values.

• The FORMAT subcommand orders variables in factor pattern matrices by descending value of loadings. Factor loadings with an absolute value less than 0.3 are omitted.

• Factors are extracted using unweighted least squares and are not rotated.

Related Topics

FACTOR
Overview (FACTOR command)
Examples (FACTOR command)
VARIABLES Subcommand (FACTOR command)
MISSING Subcommand (FACTOR command)
METHOD Subcommand (FACTOR command)
SELECT Subcommand (FACTOR command)
ANALYSIS Subcommand (FACTOR command)
PRINT Subcommand (FACTOR command)
PLOT Subcommand (FACTOR command)
DIAGONAL Subcommand (FACTOR command)
CRITERIA Subcommand (FACTOR command)
EXTRACTION Subcommand (FACTOR command)
ROTATION Subcommand (FACTOR command)
SAVE Subcommand (FACTOR command)
MATRIX Subcommand (FACTOR command)
References (FACTOR command)


PRINT Subcommand (FACTOR command)

PRINT controls the statistical display in the output.

• Keywords INITIAL, EXTRACTION, and ROTATION are the defaults if PRINT is omitted or specified without keywords.

• If any keywords are specified, only the output specifically requested is produced.

• The requested statistics are displayed only for variables specified on the last ANALYSIS subcommand.

• If more than one PRINT subcommand is specified, the last is in effect.

• If any ANALYSIS subcommand is explicitly specified, all PRINT subcommands specified before the last ANALYSIS subcommand are ignored. If no PRINT subcommand is specified after the last ANALYSIS subcommand, the default takes effect.

eigenvalues,eigenvalues,eigenvalues
FACTOR command,FACTOR command,FACTOR command
communality,communality,communality
FACTOR command,FACTOR command,FACTOR command
INITIAL (keyword),INITIAL (keyword),INITIAL (keyword)
FACTOR command,FACTOR command,FACTOR command
factor pattern matrix,factor pattern matrix,factor pattern matrix
FACTOR command,FACTOR command,FACTOR command
EXTRACTION (keyword),EXTRACTION (keyword),EXTRACTION (keyword)
FACTOR command,FACTOR command,FACTOR command
factor structure matrix,factor structure matrix,factor structure matrix
FACTOR command,FACTOR command,FACTOR command
factor transformation matrix,factor transformation matrix,factor transformation matrix
FACTOR command,FACTOR command,FACTOR command
ROTATION (keyword),ROTATION (keyword),ROTATION (keyword)
FACTOR command,FACTOR command,FACTOR command
standard deviation,standard deviation,standard deviation
FACTOR command,FACTOR command,FACTOR command
mean,mean,mean
FACTOR command,FACTOR command,FACTOR command
UNIVARIATE (keyword),UNIVARIATE (keyword),UNIVARIATE (keyword)
FACTOR command,FACTOR command,FACTOR command
Pearson correlation,Pearson correlation,Pearson correlation
FACTOR command,FACTOR command,FACTOR command
CORRELATION (keyword),CORRELATION (keyword),CORRELATION (keyword)
FACTOR command,FACTOR command,FACTOR command
COVARIANCE (keyword),COVARIANCE (keyword),COVARIANCE (keyword)
FACTOR command,FACTOR command,FACTOR command
significance level,significance level,significance level
FACTOR command,FACTOR command,FACTOR command
SIG (keyword),SIG (keyword),SIG (keyword)
FACTOR command,FACTOR command,FACTOR command
determinant,determinant,determinant
FACTOR command,FACTOR command,FACTOR command
DET (keyword),DET (keyword),DET (keyword)
FACTOR command,FACTOR command,FACTOR command
inverse correlation matrix,inverse correlation matrix,inverse correlation matrix
FACTOR command,FACTOR command,FACTOR command
INV (keyword),INV (keyword),INV (keyword)
FACTOR command,FACTOR command,FACTOR command
anti-image matrix,anti-image matrix,anti-image matrix
FACTOR command,FACTOR command,FACTOR command
AIC (keyword),AIC (keyword),AIC (keyword)
FACTOR command,FACTOR command,FACTOR command
KMO (keyword),KMO (keyword),KMO (keyword)
FACTOR command,FACTOR command,FACTOR command
Kaiser-Meyer-Olkin measure,Kaiser-Meyer-Olkin measure,Kaiser-Meyer-Olkin measure
FACTOR command,FACTOR command,FACTOR command
Bartlett's test of sphericity,Bartlett's test of sphericity,Bartlett's test of sphericity
FACTOR command,FACTOR command,FACTOR command
reproduced correlation matrix,reproduced correlation matrix,reproduced correlation matrix
FACTOR command,FACTOR command,FACTOR command
REPR (keyword),REPR (keyword),REPR (keyword)
FACTOR command,FACTOR command,FACTOR command
factor score coefficient matrix,factor score coefficient matrix,factor score coefficient matrix
FACTOR command,FACTOR command,FACTOR command
FSCORE (keyword),FSCORE (keyword),FSCORE (keyword)
FACTOR command,FACTOR command,FACTOR command
INITIAL | Initial communalities for each variable, eigenvalues of the unreduced correlation matrix, and percentage of variance for each factor.
EXTRACTION | Factor pattern matrix, revised communalities, the eigenvalue of each factor retained, and the percentage of variance each eigenvalue represents.
ROTATION | Rotated factor pattern matrix, factor transformation matrix, factor correlation matrix, and the post-rotation sums of squared loadings.
UNIVARIATE | Valid number of cases, means, and standard deviations. (Not available with matrix input.) If MISSING=MEANSUB or PAIRWISE, the output also includes the number of missing cases.
CORRELATION | Correlation matrix. Ignored if the input is a factor-loading matrix.
COVARIANCE | Covariance matrix. Ignored if the input is a factor-loading matrix or a correlation matrix that does not contain standard deviations (STDDEV or SD).
SIG | Matrix of significance levels of correlations.
DET | Determinant of the correlation or covariance matrix, depending on the specification on METHOD.
INV | Inverse of the correlation or covariance matrix, depending on the specification on METHOD.
AIC | Anti-image covariance and correlation matrices(Kaiser, 1970). The measure of sampling adequacy for the individual variable is displayed on the diagonal of the anti-image correlation matrix.
KMO | Kaiser-Meyer-Olkin measure of sampling adequacy and Bartlett’s test of sphericity. Always based on the correlation matrix. Not computed for an input matrix when it does not contain N values.
REPR | Reproduced correlations and residuals or reproduced covariance and residuals, depending on the specification on METHOD.
FSCORE | Factor score coefficient matrix. Factor score coefficients are calculated using the method requested on the SAVE subcommand. The default is the regression method.
ALL | All available statistics.
DEFAULT | INITIAL, EXTRACTION, and ROTATION.

Example

FACTOR VARS=V1 TO V12
  /SELECT=COMPLETE (‘yes’)
  /MISS=MEANSUB
  /PRINT=DEF AIC KMO REPR
  /EXTRACT=ULS
  /ROTATE=VARIMAX.

• This example specifies a factor analysis that includes all variables between and including V1 and V12 in the active dataset.

• Only cases with the value “yes” on COMPLETE are used.

• Variable means are substituted for missing values. Only values for the selected cases are used in computing the mean. This mean is used to substitute missing values in analyzing the selected cases and in computing factor scores for all cases.

• The output includes the anti-image correlation and covariance matrices, the Kaiser-Meyer-Olkin measure of sampling adequacy, the reproduced correlation and residual matrix, as well as the default statistics.

• Factors are extracted using unweighted least squares.

• The factor pattern matrix is rotated using the varimax rotation.

Related Topics

FACTOR
Overview (FACTOR command)
Examples (FACTOR command)
VARIABLES Subcommand (FACTOR command)
MISSING Subcommand (FACTOR command)
METHOD Subcommand (FACTOR command)
SELECT Subcommand (FACTOR command)
ANALYSIS Subcommand (FACTOR command)
FORMAT Subcommand (FACTOR command)
PLOT Subcommand (FACTOR command)
DIAGONAL Subcommand (FACTOR command)
CRITERIA Subcommand (FACTOR command)
EXTRACTION Subcommand (FACTOR command)
ROTATION Subcommand (FACTOR command)
SAVE Subcommand (FACTOR command)
MATRIX Subcommand (FACTOR command)
References (FACTOR command)


PLOT Subcommand (FACTOR command)

Use PLOT to request scree plots or plots of variables in rotated factor space.

• If PLOT is omitted, no plots are produced. If PLOT is used without specifications, it is ignored.

• If more than one PLOT subcommand is specified, only the last one is in effect.

• If any ANALYSIS subcommand is explicitly specified, all PLOT subcommands specified before the last ANALYSIS subcommand are ignored. If no PLOT subcommand is specified after the last ANALYSIS subcommand, no plot is produced.

scree plots,scree plots,scree plots
FACTOR command,FACTOR command,FACTOR command
eigenvalues,eigenvalues,eigenvalues
FACTOR command,FACTOR command,FACTOR command
EIGEN (keyword),EIGEN (keyword),EIGEN (keyword)
FACTOR command,FACTOR command,FACTOR command
factor-loading plots,factor-loading plots,factor-loading plots
FACTOR command,FACTOR command,FACTOR command
ROTATION (keyword),ROTATION (keyword),ROTATION (keyword)
FACTOR command,FACTOR command,FACTOR command
EIGEN | Scree plot(Cattell, 1966). The eigenvalues from each extraction are plotted in descending order.
ROTATION | Plots of variables in factor space. When used without any additional specifications, ROTATION can produce only high-resolution graphics. If three or more factors are extracted, a 3-D plot is produced with the factor space defined by the first three factors. You can request two-dimensional plots by specifying pairs of factor numbers in parentheses; for example, PLOT ROTATION(1,2)(1,3)(2,3) requests three plots, each defined by two factors. The ROTATION subcommand must be explicitly specified when you enter the keyword ROTATION on the PLOT subcommand.

Related Topics

FACTOR
Overview (FACTOR command)
Examples (FACTOR command)
VARIABLES Subcommand (FACTOR command)
MISSING Subcommand (FACTOR command)
METHOD Subcommand (FACTOR command)
SELECT Subcommand (FACTOR command)
ANALYSIS Subcommand (FACTOR command)
FORMAT Subcommand (FACTOR command)
PRINT Subcommand (FACTOR command)
DIAGONAL Subcommand (FACTOR command)
CRITERIA Subcommand (FACTOR command)
EXTRACTION Subcommand (FACTOR command)
ROTATION Subcommand (FACTOR command)
SAVE Subcommand (FACTOR command)
MATRIX Subcommand (FACTOR command)
References (FACTOR command)


DIAGONAL Subcommand (FACTOR command)

DIAGONAL (subcommand),DIAGONAL (subcommand),DIAGONAL (subcommand)
FACTOR command,FACTOR command,FACTOR command
FACTOR (command),FACTOR (command),FACTOR (command)
DIAGONAL subcommand,DIAGONAL subcommand,DIAGONAL subcommand
FACTOR (command),FACTOR (command),FACTOR (command)
diagonal values,diagonal values,diagonal values

DIAGONAL specifies values for the diagonal in conjunction with principal axis factoring.

• If DIAGONAL is omitted or included without specifications, FACTOR uses the default method for specifying the diagonal.

• DIAGONAL is ignored with extraction methods other than PAF. The values are automatically adjusted by corresponding variances if METHOD=COVARIANCE.

• If more than one DIAGONAL subcommand is specified, only the last one is in effect.

• If any ANALYSIS subcommand is explicitly specified, DIAGONAL subcommands specified before the last ANALYSIS subcommand are ignored. If no DIAGONAL is specified after the last ANALYSIS subcommand, the default is used.

• Default communality estimates for PAF are squared multiple correlations. If these cannot be computed, the maximum absolute correlation between the variable and any other variable in the analysis is used.

diagonal values,diagonal values,diagonal values
FACTOR command,FACTOR command,FACTOR command
valuelist | Diagonal values. The number of values supplied must equal the number of variables in the analysis block. Use the notation n* before a value to indicate that the value is repeated n times.
DEFAULT | Initial communality estimates.

Example

FACTOR VARIABLES=V1 TO V12
  /DIAGONAL=.56 .55 .74 2*.56 .70 3*.65 .76 .64 .63
  /EXTRACTION=PAF
  /ROTATION=VARIMAX.

• The factor analysis includes all variables between and including V1 and V12 in the active dataset.

• DIAGONAL specifies 12 values to use as initial estimates of communalities in principal axis factoring.

• The factor pattern matrix is rotated using varimax rotation.

Related Topics

FACTOR
Overview (FACTOR command)
Examples (FACTOR command)
VARIABLES Subcommand (FACTOR command)
MISSING Subcommand (FACTOR command)
METHOD Subcommand (FACTOR command)
SELECT Subcommand (FACTOR command)
ANALYSIS Subcommand (FACTOR command)
FORMAT Subcommand (FACTOR command)
PRINT Subcommand (FACTOR command)
PLOT Subcommand (FACTOR command)
CRITERIA Subcommand (FACTOR command)
EXTRACTION Subcommand (FACTOR command)
ROTATION Subcommand (FACTOR command)
SAVE Subcommand (FACTOR command)
MATRIX Subcommand (FACTOR command)
References (FACTOR command)


CRITERIA Subcommand (FACTOR command)

CRITERIA controls extraction and rotation criteria.

• CRITERIA can be specified anywhere after VARIABLES and MISSING.

• Only explicitly specified criteria are changed. Unspecified criteria keep their defaults.

• Multiple CRITERIA subcommands are allowed. Changes made by a previous CRITERIA subcommand are overwritten by a later CRITERIA subcommand.

• Any CRITERIA subcommands specified after the last EXTRACTION subcommand have no effect on extraction.

• Any CRITERIA subcommands specified after the last ROTATION subcommand have no effect on rotation.

The following keywords on CRITERIA apply to extractions:

FACTORS (keyword),FACTORS (keyword),FACTORS (keyword)
FACTOR command,FACTOR command,FACTOR command
eigenvalues,eigenvalues,eigenvalues
FACTOR command,FACTOR command,FACTOR command
MINEIGEN (keyword),MINEIGEN (keyword),MINEIGEN (keyword)
FACTOR command,FACTOR command,FACTOR command
convergence criterion,convergence criterion,convergence criterion
FACTOR command,FACTOR command,FACTOR command
ECONVERGE (keyword),ECONVERGE (keyword),ECONVERGE (keyword)
FACTOR command,FACTOR command,FACTOR command
FACTORS(n) | Number of factors extracted. The default is the number of eigenvalues greater than MINEIGEN. When specified, FACTORS overrides MINEIGEN.
MINEIGEN(n) | Minimum eigenvalue used to control the number of factors extracted. If METHOD=CORRELATION, the default is 1. If METHOD=COVARIANCE, the default is computed as (Total Variance/Number of Variables)*n, where Total Variance is the total weighted variance principal components or principal axis factoring extraction and the total image variance for image factoring extraction.
ECONVERGE(n) | Convergence criterion for extraction. The default is 0.001.

The following keywords on CRITERIA apply to rotations:

RCONVERGE (keyword),RCONVERGE (keyword),RCONVERGE (keyword)
FACTOR command,FACTOR command,FACTOR command
Kaiser normalization,Kaiser normalization,Kaiser normalization
FACTOR command,FACTOR command,FACTOR command
KAISER (keyword),KAISER (keyword),KAISER (keyword)
FACTOR command,FACTOR command,FACTOR command
NOKAISER (keyword),NOKAISER (keyword),NOKAISER (keyword)
FACTOR command,FACTOR command,FACTOR command
RCONVERGE(n) | Convergence criterion for rotation. The default is 0.0001.
KAISER | Kaiser normalization in the rotation phase. This is the default. The alternative is NOKAISER.
NOKAISER | No Kaiser normalization.

The following keywords on CRITERIA apply to both extractions and rotations:

ITERATE (keyword),ITERATE (keyword),ITERATE (keyword)
FACTOR command,FACTOR command,FACTOR command
ITERATE(n) | Maximum number of iterations for solutions in the extraction or rotation phases. The default is 25.
DEFAULT | Reestablish default values for all criteria.

Example

FACTOR VARIABLES=V1 TO V12
  /CRITERIA=FACTORS(6)
  /EXTRACTION=PC
  /ROTATION=NOROTATE
  /PLOT=ROTATION.

• This example analyzes all variables between and including V1 and V12 in the active dataset.

• Six factors are extracted using the default principal components method, and the factor pattern matrix is not rotated.

• PLOT sends all extracted factors to the graphics editor and shows a 3-D plot of the first three factors.

Related Topics

FACTOR
Overview (FACTOR command)
Examples (FACTOR command)
VARIABLES Subcommand (FACTOR command)
MISSING Subcommand (FACTOR command)
METHOD Subcommand (FACTOR command)
SELECT Subcommand (FACTOR command)
ANALYSIS Subcommand (FACTOR command)
FORMAT Subcommand (FACTOR command)
PRINT Subcommand (FACTOR command)
PLOT Subcommand (FACTOR command)
DIAGONAL Subcommand (FACTOR command)
EXTRACTION Subcommand (FACTOR command)
ROTATION Subcommand (FACTOR command)
SAVE Subcommand (FACTOR command)
MATRIX Subcommand (FACTOR command)
References (FACTOR command)


EXTRACTION Subcommand (FACTOR command)

FACTOR (command),FACTOR (command),FACTOR (command)
EXTRACTION subcommand,EXTRACTION subcommand,EXTRACTION subcommand
EXTRACTION (subcommand),EXTRACTION (subcommand),EXTRACTION (subcommand)
FACTOR command,FACTOR command,FACTOR command
FACTOR (command),FACTOR (command),FACTOR (command)
extraction methods,extraction methods,extraction methods

EXTRACTION specifies the factor extraction technique.

• Only one EXTRACTION subcommand is allowed. If multiple EXTRACTION subcommands are specified, only the last is performed.

• If any ANALYSIS subcommand is explicitly specified, all EXTRACTION subcommands before the last ANALYSIS subcommand are ignored. If no EXTRACTION subcommand is specified after the last ANALYSIS subcommand, the default extraction is performed.

• If EXTRACTION is not specified or is included without specifications, principal components extraction is used.

• If you specify criteria for EXTRACTION, the CRITERIA subcommand must precede the EXTRACTION subcommand.

• When you specify EXTRACTION, you should always explicitly specify the ROTATION subcommand. If ROTATION is not specified, the factors are not rotated.

PA1 (keyword),PA1 (keyword),PA1 (keyword)
FACTOR command,FACTOR command,FACTOR command
PC (keyword),PC (keyword),PC (keyword)
FACTOR command,FACTOR command,FACTOR command
principal components,principal components,principal components
FACTOR command,FACTOR command,FACTOR command
principal axis factoring,principal axis factoring,principal axis factoring
FACTOR command,FACTOR command,FACTOR command
PA2 (keyword),PA2 (keyword),PA2 (keyword)
FACTOR command,FACTOR command,FACTOR command
PAF (keyword),PAF (keyword),PAF (keyword)
FACTOR command,FACTOR command,FACTOR command
alpha factoring,alpha factoring,alpha factoring
FACTOR command,FACTOR command,FACTOR command
ALPHA (keyword),ALPHA (keyword),ALPHA (keyword)
FACTOR command,FACTOR command,FACTOR command
image factoring,image factoring,image factoring
FACTOR command,FACTOR command,FACTOR command
IMAGE (keyword),IMAGE (keyword),IMAGE (keyword)
FACTOR command,FACTOR command,FACTOR command
least-squares method,least-squares method,least-squares method
unweighted,unweighted,unweighted
ULS (keyword),ULS (keyword),ULS (keyword)
FACTOR command,FACTOR command,FACTOR command
least-squares method,least-squares method,least-squares method
generalized,generalized,generalized
GLS (keyword),GLS (keyword),GLS (keyword)
FACTOR command,FACTOR command,FACTOR command
maximum-likelihood estimation,maximum-likelihood estimation,maximum-likelihood estimation
FACTOR command,FACTOR command,FACTOR command
ML (keyword),ML (keyword),ML (keyword)
FACTOR command,FACTOR command,FACTOR command
PC | Principal components analysis(Harman, 1976). This is the default. PC can also be requested with keyword PA1 or DEFAULT.
PAF | Principal axis factoring. PAF can also be requested with keyword PA2.
ALPHA | Alpha factoring(Kaiser and Caffry, 1965). Invalid if METHOD=COVARIANCE.
IMAGE | Image factoring(Kaiser, 1963).
ULS | Unweighted least squares(Jöreskog, 1977). Invalid if METHOD=COVARIANCE.
GLS | Generalized least squares. Invalid if METHOD=COVARIANCE.
ML | Maximum likelihood(Jöreskog and Lawley, 1968). Invalid if METHOD=COVARIANCE.

Example

FACTOR VARIABLES=V1 TO V12
  /ANALYSIS=V1 TO V6
  /EXTRACTION=ULS
  /ROTATE=NOROTATE.

• This example analyzes variables V1 through V6 with an unweighted least-squares extraction. No rotation is performed.

Related Topics

FACTOR
Overview (FACTOR command)
Examples (FACTOR command)
VARIABLES Subcommand (FACTOR command)
MISSING Subcommand (FACTOR command)
METHOD Subcommand (FACTOR command)
SELECT Subcommand (FACTOR command)
ANALYSIS Subcommand (FACTOR command)
FORMAT Subcommand (FACTOR command)
PRINT Subcommand (FACTOR command)
PLOT Subcommand (FACTOR command)
DIAGONAL Subcommand (FACTOR command)
CRITERIA Subcommand (FACTOR command)
ROTATION Subcommand (FACTOR command)
SAVE Subcommand (FACTOR command)
MATRIX Subcommand (FACTOR command)
References (FACTOR command)


ROTATION Subcommand (FACTOR command)

ROTATION (subcommand),ROTATION (subcommand),ROTATION (subcommand)
FACTOR command,FACTOR command,FACTOR command
FACTOR (command),FACTOR (command),FACTOR (command)
ROTATION subcommand,ROTATION subcommand,ROTATION subcommand
FACTOR (command),FACTOR (command),FACTOR (command)
rotation methods,rotation methods,rotation methods

ROTATION specifies the factor rotation method. It can also be used to suppress the rotation phase entirely.

• Only one ROTATION subcommand is allowed. If multiple ROTATION subcommands are specified, only the last is performed.

• If any ANALYSIS subcommand is explicitly specified, all ROTATION subcommands before the last ANALYSIS subcommand are ignored. If any EXTRACTION subcommand is explicitly specified, all ROTATION subcommands before the last EXTRACTION subcommand are ignored.

• If ROTATION is omitted together with EXTRACTION, varimax rotation is used.

• If ROTATION is omitted but EXTRACTION is not, factors are not rotated.

• Keyword NOROTATE on the ROTATION subcommand produces a plot of variables in unrotated factor space if the PLOT subcommand is also included for the analysis.

orthogonal rotation,orthogonal rotation,orthogonal rotation
FACTOR command,FACTOR command,FACTOR command
varimax rotation,varimax rotation,varimax rotation
FACTOR command,FACTOR command,FACTOR command
VARIMAX (keyword),VARIMAX (keyword),VARIMAX (keyword)
FACTOR command,FACTOR command,FACTOR command
equamax rotation,equamax rotation,equamax rotation
FACTOR command,FACTOR command,FACTOR command
EQUAMAX (keyword),EQUAMAX (keyword),EQUAMAX (keyword)
FACTOR command,FACTOR command,FACTOR command
quartimax rotation,quartimax rotation,quartimax rotation
FACTOR command,FACTOR command,FACTOR command
QUARTIMAX (keyword),QUARTIMAX (keyword),QUARTIMAX (keyword)
FACTOR command,FACTOR command,FACTOR command
oblique rotation,oblique rotation,oblique rotation
FACTOR command,FACTOR command,FACTOR command
oblimin rotation,oblimin rotation,oblimin rotation
FACTOR command,FACTOR command,FACTOR command
OBLIMIN (keyword),OBLIMIN (keyword),OBLIMIN (keyword)
FACTOR command,FACTOR command,FACTOR command
promax rotation,promax rotation,promax rotation
FACTOR command,FACTOR command,FACTOR command
oblique rotation,oblique rotation,oblique rotation
FACTOR command,FACTOR command,FACTOR command
PROMAX (keyword),PROMAX (keyword),PROMAX (keyword)
FACTOR command,FACTOR command,FACTOR command
NOROTATE (keyword),NOROTATE (keyword),NOROTATE (keyword)
FACTOR command,FACTOR command,FACTOR command
VARIMAX | Varimax rotation. This is the default if ROTATION is entered without specifications or if EXTRACTION and ROTATION are both omitted. Varimax rotation can also be requested with keyword DEFAULT.
EQUAMAX | Equamax rotation.
QUARTIMAX | Quartimax rotation.
OBLIMIN(n) | Direct oblimin rotation. This is a nonorthogonal rotation; thus, a factor correlation matrix will also be displayed. You can specify a delta (n≤0.8) in parentheses. The value must be less than or equal to 0.8. The default is 0.
PROMAX(n) | Promax rotation. This is a nonorthogonal rotation; thus, a factor correlation matrix will also be displayed. For this method, you can specify a real-number value greater than 1. The default is 4.
NOROTATE | No rotation.

Example

FACTOR VARIABLES=V1 TO V12
  /EXTRACTION=ULS
  /ROTATION
  /ROTATION=OBLIMIN.

• The first ROTATION subcommand specifies the default varimax rotation.

• The second ROTATION subcommand specifies an oblimin rotation based on the same extraction of factors.

Related Topics

FACTOR
Overview (FACTOR command)
Examples (FACTOR command)
VARIABLES Subcommand (FACTOR command)
MISSING Subcommand (FACTOR command)
METHOD Subcommand (FACTOR command)
SELECT Subcommand (FACTOR command)
ANALYSIS Subcommand (FACTOR command)
FORMAT Subcommand (FACTOR command)
PRINT Subcommand (FACTOR command)
PLOT Subcommand (FACTOR command)
DIAGONAL Subcommand (FACTOR command)
CRITERIA Subcommand (FACTOR command)
EXTRACTION Subcommand (FACTOR command)
SAVE Subcommand (FACTOR command)
MATRIX Subcommand (FACTOR command)
References (FACTOR command)


SAVE Subcommand (FACTOR command)

SAVE allows you to save factor scores from any rotated or unrotated extraction as new variables in the active dataset. You can use any of the three methods for computing the factor scores.

• Only one SAVE subcommand is executed. If you specify multiple SAVE subcommands, only the last is executed.

• SAVE must follow the last ROTATION subcommand.

• If no ROTATION subcommand is specified after the last EXTRACTION subcommand, SAVE must follow the last EXTRACTION subcommand and no rotation is used.

• If neither ROTATION nor EXTRACTION is specified, SAVE must follow the last ANALYSIS subcommand and the default extraction and rotation are used to compute the factor scores.

• SAVE subcommands before any explicitly specified ANALYSIS, EXTRACTION, or ROTATION subcommands are ignored.

• You cannot use the SAVE subcommand if you are replacing the active dataset with matrix materials. (See the topic Matrix Output (FACTOR command) for more information. )

• The new variables are added to the end of the active dataset.

Keywords to specify the method of computing factor scores are:

regression factor scores,regression factor scores,regression factor scores
FACTOR command,FACTOR command,FACTOR command
REG (keyword),REG (keyword),REG (keyword)
FACTOR command,FACTOR command,FACTOR command
Bartlett factor scores,Bartlett factor scores,Bartlett factor scores
FACTOR command,FACTOR command,FACTOR command
BART (keyword),BART (keyword),BART (keyword)
FACTOR command,FACTOR command,FACTOR command
AR (keyword),AR (keyword),AR (keyword)
FACTOR command,FACTOR command,FACTOR command
Anderson-Rubin factor scores,Anderson-Rubin factor scores,Anderson-Rubin factor scores
FACTOR command,FACTOR command,FACTOR command
REG | Regression method. This is the default.
BART | Bartlett method.
AR | Anderson-Rubin method.
DEFAULT | The same as REG.

• After one of the above keywords, specify in parentheses the number of scores to save and a rootname to use in naming the variables.

• You can specify either an integer or the keyword ALL. The maximum number of scores you can specify is the number of factors in the solution.

• FACTOR forms variable names by appending sequential numbers to the rootname you specify. The rootname must begin with a letter and conform to the rules for variable names. For information on variable naming rules, see Variable Names.

• If you do not specify a rootname, FACTOR forms unique variable names using the formula FACn_m, where m increments to create a new rootname and n increments to create a unique variable name. For example, FAC1_1, FAC2_1, FAC3_1, and so on will be generated for the first set of saved scores and FAC1_2, FAC2_2, FAC3_2, and so on for the second set.

• FACTOR automatically generates variable labels for the new variables. Each label contains information about the method of computing the factor score, its sequential number, and the sequential number of the analysis.

Example

FACTOR VARIABLES=V1 TO V12
  /CRITERIA FACTORS(4)
  /ROTATION
  /SAVE REG (4,PCOMP).

• Since there is no EXTRACTION subcommand before the ROTATION subcommand, the default principal components extraction is performed.

• The CRITERIA subcommand specifies that four principal components should be extracted.

• The ROTATION subcommand requests the default varimax rotation for the principal components.

• The SAVE subcommand calculates scores using the regression method. Four scores will be added to the file: PCOMP1, PCOMP2, PCOMP3, and PCOMP4.

Related Topics

FACTOR
Overview (FACTOR command)
Examples (FACTOR command)
VARIABLES Subcommand (FACTOR command)
MISSING Subcommand (FACTOR command)
METHOD Subcommand (FACTOR command)
SELECT Subcommand (FACTOR command)
ANALYSIS Subcommand (FACTOR command)
FORMAT Subcommand (FACTOR command)
PRINT Subcommand (FACTOR command)
PLOT Subcommand (FACTOR command)
DIAGONAL Subcommand (FACTOR command)
CRITERIA Subcommand (FACTOR command)
EXTRACTION Subcommand (FACTOR command)
ROTATION Subcommand (FACTOR command)
MATRIX Subcommand (FACTOR command)
References (FACTOR command)


MATRIX Subcommand (FACTOR command)

MATRIX (subcommand),MATRIX (subcommand),MATRIX (subcommand)
FACTOR command,FACTOR command,FACTOR command
FACTOR (command),FACTOR (command),FACTOR (command)
MATRIX subcommand,MATRIX subcommand,MATRIX subcommand
OUT (keyword),OUT (keyword),OUT (keyword)
FACTOR command,FACTOR command,FACTOR command
IN (keyword),IN (keyword),IN (keyword)
FACTOR command,FACTOR command,FACTOR command
matrix output,matrix output,matrix output
FACTOR command,FACTOR command,FACTOR command
matrix input,matrix input,matrix input
FACTOR command,FACTOR command,FACTOR command

MATRIX reads and writes matrix data files.

• MATRIX must always be specified first.

• Only one IN and one OUT keyword can be specified on the MATRIX subcommand. If either IN or OUT is specified more than once, the FACTOR procedure is not executed.

• The matrix type must be indicated on IN or OUT. The types are COR for a correlation matrix, COV for a covariance matrix, and FAC for a factor-loading matrix. Indicate the matrix type within parentheses immediately before you identify the matrix file.

• If you use both IN and OUT on MATRIX, you can specify them in either order. You cannot write a covariance matrix if the input matrix is a factor-loading matrix or a correlation matrix that does not contain standard deviations (STDDEV or SD).

• If you read in a covariance matrix and write out a factor-loading matrix, the output factor loadings are rescaled.

OUT (matrix type= 'savfile'|'dataset') | Write a matrix data file. Specify the matrix type (COR, COV, FAC, or FSC) and the matrix file in parentheses. For the matrix data file, specify a filename to store the matrix materials on disk, a previously declared dataset available in the current session, or an asterisk to replace the active dataset. If you specify an asterisk or a dataset name, the matrix data file is not stored on disk unless you use SAVE or XSAVE.
IN (matrix type= 'savfile'|'dataset') | Read a matrix data file. Specify the matrix type (COR, COV, or FAC) and the matrix file in parentheses. For the matrix data file, specify an asterisk if the matrix data file is the active dataset. If the matrix file is another file, specify the filename or dataset name in parentheses. A matrix file read from an external file or another dataset in the current session does not replace the active dataset.

Related Topics

FACTOR
Overview (FACTOR command)
Examples (FACTOR command)
VARIABLES Subcommand (FACTOR command)
MISSING Subcommand (FACTOR command)
METHOD Subcommand (FACTOR command)
SELECT Subcommand (FACTOR command)
ANALYSIS Subcommand (FACTOR command)
FORMAT Subcommand (FACTOR command)
PRINT Subcommand (FACTOR command)
PLOT Subcommand (FACTOR command)
DIAGONAL Subcommand (FACTOR command)
CRITERIA Subcommand (FACTOR command)
EXTRACTION Subcommand (FACTOR command)
ROTATION Subcommand (FACTOR command)
SAVE Subcommand (FACTOR command)
References (FACTOR command)
Matrix Output (FACTOR command)
Matrix Input (FACTOR command)
Format of the Matrix Data File (FACTOR command)
Split Files (FACTOR command)
Example: Factor Correlation Matrix Output to External File (FACTOR command)
Example: Factor Correlation Matrix Output Replacing Active Dataset (FACTOR command)
Example: Factor-Loading Matrix Output Replacing Active Dataset (FACTOR command)
Example: Matrix Input from active dataset (FACTOR command)
Example: Matrix Input from External File (FACTOR command)
Example: Matrix Input from active dataset (FACTOR command)
Example: Using Saved Coefficients to Score an External File (FACTOR command)


Matrix Output (FACTOR command)

FACTOR can write matrix materials in the form of a correlation matrix, a covariance matrix, a factor-loading matrix, or a factor score coefficients matrix.

• The correlation and covariance matrix materials include counts, means, and standard deviations in addition to correlations or covariances.

• The factor-loading matrix materials contain only factor values and no additional statistics.

• The factor score coefficients materials include means and standard deviations, in addition to factor score coefficients.

• See Format of the Matrix Data File (FACTOR command) for a description of the file.

• FACTOR generates one matrix per split file.

• Any documents contained in the active dataset are not transferred to the matrix file.

Related Topics

MATRIX Subcommand (FACTOR command)
Matrix Input (FACTOR command)
Format of the Matrix Data File (FACTOR command)
Split Files (FACTOR command)
Example: Factor Correlation Matrix Output to External File (FACTOR command)
Example: Factor Correlation Matrix Output Replacing Active Dataset (FACTOR command)
Example: Factor-Loading Matrix Output Replacing Active Dataset (FACTOR command)
Example: Matrix Input from active dataset (FACTOR command)
Example: Matrix Input from External File (FACTOR command)
Example: Matrix Input from active dataset (FACTOR command)
Example: Using Saved Coefficients to Score an External File (FACTOR command)


Matrix Input (FACTOR command)

• FACTOR can read matrix materials written either by a previous FACTOR procedure or by a procedure that writes correlation or covariance matrices. See the topic Universals for more information.

• MATRIX=IN cannot be used unless a active dataset has already been defined. To read an existing matrix data file at the beginning of a session, first use GET to retrieve the matrix file and then specify IN(COR=*), IN(COV=*) or IN(FAC=*) on MATRIX.

• The VARIABLES subcommand cannot be used with matrix input.

• For correlation and covariance matrix input, the ANALYSIS subcommand can specify a subset of the variables in the matrix. You cannot specify a subset of variables for factor-loading matrix input. By default, the ANALYSIS subcommand uses all variables in the matrix.

Related Topics

MATRIX Subcommand (FACTOR command)
Matrix Output (FACTOR command)
Format of the Matrix Data File (FACTOR command)
Split Files (FACTOR command)
Example: Factor Correlation Matrix Output to External File (FACTOR command)
Example: Factor Correlation Matrix Output Replacing Active Dataset (FACTOR command)
Example: Factor-Loading Matrix Output Replacing Active Dataset (FACTOR command)
Example: Matrix Input from active dataset (FACTOR command)
Example: Matrix Input from External File (FACTOR command)
Example: Matrix Input from active dataset (FACTOR command)
Example: Using Saved Coefficients to Score an External File (FACTOR command)


Format of the Matrix Data File (FACTOR command)

• For correlation or covariance matrices, the matrix data file has two special variables created by the program: ROWTYPE_ and VARNAME_. Variable ROWTYPE_ is a short string variable with the value CORR (for Pearson correlation coefficient) or COV (for covariance) for each matrix row. Variable VARNAME_ is a short string variable whose values are the names of the variables used to form the correlation matrix.

• For factor-loading matrices, the program generates two special variables named ROWTYPE_ and FACTOR_. The value for ROWTYPE_ is always FACTOR. The values for FACTOR_ are the ordinal numbers of the factors.

• For factor score coefficient matrices, the matrix data file has two special variables created: ROWTYPE_ and VARNAME_. If split-file processing is in effect, the split variables appear first in the matrix output file, followed by ROWTYPE_, VARNAME_, and the variables in the analysis. ROWTYPE_ is a short string with three possible values: MEAN, STDDEV, and FSCOEF. There is always one occurrence of the value MEAN. If /METHOD = CORRELATION then there is one occurrence of the value STDDEV. Otherwise, this value does not appear. There are as many occurrences of FSCOEF as the number of extracted factors. VARNAME_ is a short string who values are FACn where n is the sequence of the saved factor when ROWTYPE_ equals FSCOEF. Otherwise the value is empty.

• The remaining variables are the variables used to form the matrix.

Related Topics

MATRIX Subcommand (FACTOR command)
Matrix Output (FACTOR command)
Matrix Input (FACTOR command)
Split Files (FACTOR command)
Example: Factor Correlation Matrix Output to External File (FACTOR command)
Example: Factor Correlation Matrix Output Replacing Active Dataset (FACTOR command)
Example: Factor-Loading Matrix Output Replacing Active Dataset (FACTOR command)
Example: Matrix Input from active dataset (FACTOR command)
Example: Matrix Input from External File (FACTOR command)
Example: Matrix Input from active dataset (FACTOR command)
Example: Using Saved Coefficients to Score an External File (FACTOR command)


Split Files (FACTOR command)

• FACTOR can read or write split-file matrices.

• When split-file processing is in effect, the first variables in the matrix data file are the split variables, followed by ROWTYPE_, VARNAME_ (or FACTOR_), and then the variables used to form the matrix.

• A full set of matrix materials is written for each split-file group defined by the split variables.

• A split variable cannot have the same variable name as any other variable written to the matrix data file.

• If split-file processing is in effect when a matrix is written, the same split file must be in effect when that matrix is read by any other procedure.

Related Topics

MATRIX Subcommand (FACTOR command)
Matrix Output (FACTOR command)
Matrix Input (FACTOR command)
Format of the Matrix Data File (FACTOR command)
Example: Factor Correlation Matrix Output to External File (FACTOR command)
Example: Factor Correlation Matrix Output Replacing Active Dataset (FACTOR command)
Example: Factor-Loading Matrix Output Replacing Active Dataset (FACTOR command)
Example: Matrix Input from active dataset (FACTOR command)
Example: Matrix Input from External File (FACTOR command)
Example: Matrix Input from active dataset (FACTOR command)
Example: Using Saved Coefficients to Score an External File (FACTOR command)


Example: Factor Correlation Matrix Output to External File (FACTOR command)

GET FILE='/data/GSS80.sav'
  /KEEP ABDEFECT TO ABSINGLE.
FACTOR VARIABLES=ABDEFECT TO ABSINGLE
  /MATRIX OUT(COR='/data/cormtx.sav').

• FACTOR retrieves the GSS80.sav file and writes a factor correlation matrix to the file cormtx.sav.

• The active dataset is still GSS80.sav. Subsequent commands will be executed on this file.

Related Topics

MATRIX Subcommand (FACTOR command)
Matrix Output (FACTOR command)
Matrix Input (FACTOR command)
Format of the Matrix Data File (FACTOR command)
Split Files (FACTOR command)
Example: Factor Correlation Matrix Output Replacing Active Dataset (FACTOR command)
Example: Factor-Loading Matrix Output Replacing Active Dataset (FACTOR command)
Example: Matrix Input from active dataset (FACTOR command)
Example: Matrix Input from External File (FACTOR command)
Example: Matrix Input from active dataset (FACTOR command)
Example: Using Saved Coefficients to Score an External File (FACTOR command)


Example: Factor Correlation Matrix Output Replacing Active Dataset (FACTOR command)

GET FILE='/data/GSS80.sav'
  /KEEP ABDEFECT TO ABSINGLE.
FACTOR VARIABLES=ABDEFECT TO ABSINGLE
  /MATRIX OUT(COR=*).
LIST.

• FACTOR writes the same matrix as in the previous example.

• The active dataset is replaced with the correlation matrix. The LIST command is executed on the matrix file, not on GSS80.

Related Topics

MATRIX Subcommand (FACTOR command)
Matrix Output (FACTOR command)
Matrix Input (FACTOR command)
Format of the Matrix Data File (FACTOR command)
Split Files (FACTOR command)
Example: Factor Correlation Matrix Output to External File (FACTOR command)
Example: Factor-Loading Matrix Output Replacing Active Dataset (FACTOR command)
Example: Matrix Input from active dataset (FACTOR command)
Example: Matrix Input from External File (FACTOR command)
Example: Matrix Input from active dataset (FACTOR command)
Example: Using Saved Coefficients to Score an External File (FACTOR command)


Example: Factor-Loading Matrix Output Replacing Active Dataset (FACTOR command)

GET FILE='/dataGSS80.sav'
  /KEEP ABDEFECT TO ABSINGLE.
FACTOR VARIABLES=ABDEFECT TO ABSINGLE
  /MATRIX OUT(FAC=*).

• FACTOR generates a factor-loading matrix that replaces the active dataset.

Related Topics

MATRIX Subcommand (FACTOR command)
Matrix Output (FACTOR command)
Matrix Input (FACTOR command)
Format of the Matrix Data File (FACTOR command)
Split Files (FACTOR command)
Example: Factor Correlation Matrix Output to External File (FACTOR command)
Example: Factor Correlation Matrix Output Replacing Active Dataset (FACTOR command)
Example: Matrix Input from active dataset (FACTOR command)
Example: Matrix Input from External File (FACTOR command)
Example: Matrix Input from active dataset (FACTOR command)
Example: Using Saved Coefficients to Score an External File (FACTOR command)


Example: Matrix Input from active dataset (FACTOR command)

GET FILE='/data/country.sav'
  /KEEP SAVINGS POP15 POP75 INCOME GROWTH.
REGRESSION MATRIX OUT(*)
  /VARS=SAVINGS TO GROWTH
  /MISS=PAIRWISE
  /DEP=SAVINGS /ENTER.
FACTOR MATRIX IN(COR=*) /MISSING=PAIRWISE.

• The GET command retrieves the country.sav file and selects the variables needed for the analysis.

• The REGRESSION command computes correlations among five variables with pairwise deletion. MATRIX=OUT writes a matrix data file, which replaces the active dataset.

• MATRIX IN(COR=*) on FACTOR reads the matrix materials REGRESSION has written to the active dataset. An asterisk is specified because the matrix materials are in the active dataset. FACTOR uses pairwise deletion, since this is what was in effect when the matrix was built.

Related Topics

MATRIX Subcommand (FACTOR command)
Matrix Output (FACTOR command)
Matrix Input (FACTOR command)
Format of the Matrix Data File (FACTOR command)
Split Files (FACTOR command)
Example: Factor Correlation Matrix Output to External File (FACTOR command)
Example: Factor Correlation Matrix Output Replacing Active Dataset (FACTOR command)
Example: Factor-Loading Matrix Output Replacing Active Dataset (FACTOR command)
Example: Matrix Input from External File (FACTOR command)
Example: Matrix Input from active dataset (FACTOR command)
Example: Using Saved Coefficients to Score an External File (FACTOR command)


Example: Matrix Input from External File (FACTOR command)

GET FILE='/data/country.sav'
  /KEEP SAVINGS POP15 POP75 INCOME GROWTH.
REGRESSION
  /VARS=SAVINGS TO GROWTH
  /MISS=PAIRWISE
  /DEP=SAVINGS /ENTER.
FACTOR MATRIX IN(COR=CORMTX).

• This example performs a regression analysis on file country.sav and then uses a different file for FACTOR. The file is an existing matrix data file.

• MATRIX=IN specifies the matrix data file CORMTX.

• CORMTX does not replace country.sav as the active dataset.

Related Topics

MATRIX Subcommand (FACTOR command)
Matrix Output (FACTOR command)
Matrix Input (FACTOR command)
Format of the Matrix Data File (FACTOR command)
Split Files (FACTOR command)
Example: Factor Correlation Matrix Output to External File (FACTOR command)
Example: Factor Correlation Matrix Output Replacing Active Dataset (FACTOR command)
Example: Factor-Loading Matrix Output Replacing Active Dataset (FACTOR command)
Example: Matrix Input from active dataset (FACTOR command)
Example: Matrix Input from active dataset (FACTOR command)
Example: Using Saved Coefficients to Score an External File (FACTOR command)


Example: Matrix Input from active dataset (FACTOR command)

GET FILE='/data/cormtx.sav'.
FACTOR MATRIX IN(COR=*).

• This example starts a new session and reads an existing matrix data file. GET retrieves the matrix data file cormtx.sav.

• MATRIX=IN specifies an asterisk because the matrix data file is the active dataset. If MATRIX=IN(cormtx.sav) is specified, the program issues an error message.

• If the GET command is omitted, the program issues an error message.

Related Topics

MATRIX Subcommand (FACTOR command)
Matrix Output (FACTOR command)
Matrix Input (FACTOR command)
Format of the Matrix Data File (FACTOR command)
Split Files (FACTOR command)
Example: Factor Correlation Matrix Output to External File (FACTOR command)
Example: Factor Correlation Matrix Output Replacing Active Dataset (FACTOR command)
Example: Factor-Loading Matrix Output Replacing Active Dataset (FACTOR command)
Example: Matrix Input from active dataset (FACTOR command)
Example: Matrix Input from External File (FACTOR command)
Example: Using Saved Coefficients to Score an External File (FACTOR command)


Example: Using Saved Coefficients to Score an External File (FACTOR command)

MATRIX.
GET A /FILE="fsc.sav".
GET B /FILE="ext_data_standardized.sav" /VAR=varlist.
COMPUTE SCORES=A*TRANSPOS(B).
SAVE SCORES /OUTFILE="scored.sav".
END MATRIX.

• This example scores an external file using the factor score coefficients from a previous analysis, say, upon original.sav.

• Factor score coefficients are read from fsc.sav into A.

• The data are read from ext_data_standardized.sav into B. The variable values in the external file should be standardized. Note that if the values in ext_data_standardized.sav are standardized based upon the means and standard deviations of the unstandardized values in ext_data.sav, and not upon the means and standard deviations of values in original.sav, then this analysis will be different from one in which original.sav and ext_data.sav are merged and FACTOR is run using the SELECT subcommand with cases from original.sav selected for use in computing the correlation or covariance matrix.

If there are missing values, add /MISSING=OMIT or /MISSING=0 to the second GET statement to remove cases with missing values or impute the mean (0, since the variables are standardized).

• The scores are saved to scored.sav.

Related Topics

MATRIX Subcommand (FACTOR command)
Matrix Output (FACTOR command)
Matrix Input (FACTOR command)
Format of the Matrix Data File (FACTOR command)
Split Files (FACTOR command)
Example: Factor Correlation Matrix Output to External File (FACTOR command)
Example: Factor Correlation Matrix Output Replacing Active Dataset (FACTOR command)
Example: Factor-Loading Matrix Output Replacing Active Dataset (FACTOR command)
Example: Matrix Input from active dataset (FACTOR command)
Example: Matrix Input from External File (FACTOR command)
Example: Matrix Input from active dataset (FACTOR command)


References (FACTOR command)

Cattell, R. B. 1966. The scree test for the number of factors. Journal of Multivariate Behavioral Research, 1, 245-276.

Harman, H. H. 1976. Modern Factor Analysis, 3rd ed. Chicago: University of Chicago Press.

Jöreskog, K. G. 1977. Factor analysis by least-square and maximum-likelihood method. In: Statistical Methods for Digital Computers, volume 3, K. Enslein, A. Ralston, and R. S. Wilf, eds. New York: John Wiley and Sons.

Jöreskog, K. G., and D. N. Lawley. 1968. New methods in maximum likelihood factor analysis. British Journal of Mathematical and Statistical Psychology, 21, 85-96.

Kaiser, H. F. 1963. Image analysis. In: Problems in Measuring Change, C. W. Harris, eds. Madison: University of Wisconsin Press.

Kaiser, H. F. 1970. A second-generation Little Jiffy. Psychometrika, 35, 401-415.

Kaiser, H. F., and J. Caffry. 1965. Alpha factor analysis. Psychometrika, 30, 1-14.

Related Topics

FACTOR
Overview (FACTOR command)
Examples (FACTOR command)
VARIABLES Subcommand (FACTOR command)
MISSING Subcommand (FACTOR command)
METHOD Subcommand (FACTOR command)
SELECT Subcommand (FACTOR command)
ANALYSIS Subcommand (FACTOR command)
FORMAT Subcommand (FACTOR command)
PRINT Subcommand (FACTOR command)
PLOT Subcommand (FACTOR command)
DIAGONAL Subcommand (FACTOR command)
CRITERIA Subcommand (FACTOR command)
EXTRACTION Subcommand (FACTOR command)
ROTATION Subcommand (FACTOR command)
SAVE Subcommand (FACTOR command)
MATRIX Subcommand (FACTOR command)


FILE HANDLE

FILE HANDLE (command),FILE HANDLE (command),FILE HANDLE (command)
FILE HANDLE (command),FILE HANDLE (command),FILE HANDLE (command)
syntax chart,syntax chart,syntax chart
release history,release history,release history
FILE HANDLE handle /NAME='path and/or file specifications'
                  [/MODE={CHARACTER }] [/RECFORM={FIXED   } [/LRECL=n]
                         {BINARY    }            {VARIABLE}
                         {MULTIPUNCH}            {SPANNED }
                         {IMAGE     }
                         {360       }
                  [/ENCODING = 'encoding specification']

This command takes effect immediately. It does not read the active dataset or execute pending transformations. See the topic Command Order for more information.

Release History Collapse Hide details

Release History

Release 13.0

• The NAME subcommand is modified to accept a path and/or file.

Release 16.0

• ENCODING subcommand added for Unicode support.

Example

FILE HANDLE thisMonthFile /NAME='/sales/data/july.sav'.
FILE HANDLE dataDirectory /NAME='/sales/data'.
GET FILE 'thisMonthFile'.
GET FILE 'dataDirectory/july.sav'.

Related Topics

Overview (FILE HANDLE command)
NAME Subcommand (FILE HANDLE command)
MODE Subcommand (FILE HANDLE command)
RECFORM Subcommand (FILE HANDLE command)
LRECL Subcommand (FILE HANDLE command)
ENCODING Subcommand (FILE HANDLE command)


Overview (FILE HANDLE command)

FILE HANDLE assigns a unique file handle to a path and/or file and supplies operating system specifications for the file. A defined file handle can be specified on any subsequent FILE, OUTFILE, MATRIX, or WRITE subcommands of various procedures.

Syntax Rules Collapse Hide details

Syntax Rules

• FILE HANDLE is required for reading data files with record lengths greater than 8,192. See the topic LRECL Subcommand (FILE HANDLE command) for more information.

• FILE HANDLE is required for reading IBM VSAM datasets, EBCDIC data files, binary data files, and character data files that are not delimited by ASCII line feeds.

• If you specify 360 on the MODE subcommand, you must specify RECFORM.

• If you specify IMAGE on the MODE subcommand, you must specify LRECL.

Operations Collapse Hide details

Operations

A file handle is used only during the current session. The handle is never saved as part of a data file. The normal quoting conventions for file specifications apply, with or without file handles.

Related Topics

FILE HANDLE
NAME Subcommand (FILE HANDLE command)
MODE Subcommand (FILE HANDLE command)
RECFORM Subcommand (FILE HANDLE command)
LRECL Subcommand (FILE HANDLE command)
ENCODING Subcommand (FILE HANDLE command)


Example (FILE HANDLE command)

FILE HANDLE thisMonthFile /NAME='/sales/data/july.sav'.
FILE HANDLE dataDirectory /NAME='/sales/data'.
GET FILE 'thisMonthFile'.
GET FILE 'dataDirectory/july.sav'.

• The first FILE HANDLE command defines a file handle that refers to a specific file.

• The second FILE HANDLE command only specifies a directory path.

• The two subsequent GET FILE commands are functionally equivalent. Note that both file specifications are enclosed in quotes (a good general practice).


NAME Subcommand (FILE HANDLE command)

directory location,directory location,directory location
file paths,file paths,file paths
paths,paths,paths
in file specifications,in file specifications,in file specifications

NAME specifies the path and/or file you want to refer to by the file handle. The file specifications must conform to the file naming convention for the type of computer and operating system on which the program is run. See the documentation for your system for specific information about the file naming convention.

If NAME specifies a relative path or does not include a path, the path is set to the current working directory at the time the FILE HANDLE command is executed.

Related Topics

FILE HANDLE
Overview (FILE HANDLE command)
MODE Subcommand (FILE HANDLE command)
RECFORM Subcommand (FILE HANDLE command)
LRECL Subcommand (FILE HANDLE command)
ENCODING Subcommand (FILE HANDLE command)


MODE Subcommand (FILE HANDLE command)

MODE specifies the type of file you want to refer to by the file handle.

multipunch data,multipunch data,multipunch data
MULTIPUNCH (keyword),MULTIPUNCH (keyword),MULTIPUNCH (keyword)
FILE HANDLE command,FILE HANDLE command,FILE HANDLE command
EBCDIC data,EBCDIC data,EBCDIC data
CHARACTER | Character file whose logical records are delimited by ASCII line feeds.
BINARY | Unformatted binary file generated by Microsoft FORTRAN.
MULTIPUNCH | Column binary file.
IMAGE | Binary file consisting of fixed-length records.
360 | EBCDIC data file.

Example

FILE HANDLE ELE48 /NAME='/data/ELE48.DAT' /MODE=MULTIPUNCH.
DATA LIST FILE=ELE48.

• FILE HANDLE defines ELE48 as the handle for the file.

• The MODE subcommand indicates that the file contains multipunch data.

• The file specification on NAME conforms to VMS convention: the file ELE48.DAT is located in the directory data.

• The FILE subcommand on DATA LIST refers to the handle defined on the FILE HANDLE command.

Related Topics

FILE HANDLE
Overview (FILE HANDLE command)
NAME Subcommand (FILE HANDLE command)
RECFORM Subcommand (FILE HANDLE command)
LRECL Subcommand (FILE HANDLE command)
ENCODING Subcommand (FILE HANDLE command)


RECFORM Subcommand (FILE HANDLE command)

RECFORM specifies the record format and is necessary when you specify 360 on MODE. RECFORM has no effect with other specifications on MODE.

FIXED | Fixed-length record. All records have the same length. Alias F. When FIXED is specified, the record length must be specified on the LRECL subcommand.
VARIABLE | Variable-length record. No logical record is larger than one physical block. Alias V.
SPANNED | Spanned record. Records may be larger than fixed-length physical blocks. Alias VS.

Related Topics

FILE HANDLE
Overview (FILE HANDLE command)
NAME Subcommand (FILE HANDLE command)
MODE Subcommand (FILE HANDLE command)
LRECL Subcommand (FILE HANDLE command)
ENCODING Subcommand (FILE HANDLE command)


LRECL Subcommand (FILE HANDLE command)

wide data files,wide data files,wide data files
specifying record length with FILE HANDLE,specifying record length with FILE HANDLE,specifying record length with FILE HANDLE
record length,record length,record length
specifying wide records with FILE HANDLE,specifying wide records with FILE HANDLE,specifying wide records with FILE HANDLE

LRECL specifies the length of each record in the file. When you specify IMAGE under UNIX, OS/2, or Microsoft Windows, or 360 for IBM360 EBCDIC data files, you must specify LRECL. You can specify a record length greater than the default (8,192) for an image file, a character file, or a binary file. The maximum record length is 2,147,483,647. Do not use LRECL with MULTIPUNCH.

Example

FILE HANDLE TRGT1 /NAME='/data/RGT.DAT'
                 /MODE=IMAGE LRECL=16.
DATA LIST FILE=TRGT1.

• IMAGE is specified on the MODE subcommand. Subcommand LRECL must be specified.

• The file handle is used on the DATA LIST command.

Related Topics

FILE HANDLE
Overview (FILE HANDLE command)
NAME Subcommand (FILE HANDLE command)
MODE Subcommand (FILE HANDLE command)
RECFORM Subcommand (FILE HANDLE command)
ENCODING Subcommand (FILE HANDLE command)


ENCODING Subcommand (FILE HANDLE command)

FILE HANDLE (command),FILE HANDLE (command),FILE HANDLE (command)
ENCODING subcommand,ENCODING subcommand,ENCODING subcommand
Unicode files,Unicode files,Unicode files
ENCODING (subcommand),ENCODING (subcommand),ENCODING (subcommand)
FILE HANDLE command,FILE HANDLE command,FILE HANDLE command
Unicode,Unicode,Unicode
text data files,text data files,text data files

ENCODING specifies the encoding format of the file. The keyword is followed by an equals sign and a quoted encoding specification.

• In Unicode mode, the default is UTF8. For more information, see SET command, UNICODE subcommand.

• In code page mode, the default is the current locale setting. For more information, see SET command, LOCALE subcommand.

• The quoted encoding value can be: Locale (the current locale setting), UTF8, UTF16, UTF16BE (big endian), UTF16LE (little endian), a numeric Windows code page value (for example, '1252'), or an IANA code page value (for example, 'iso8859-1' or cp1252).

• In Unicode mode, the defined width of string variables is tripled for code page and UTF-16 text data files. Use ALTER TYPE to automatically adjust the defined width of string variables.

Related Topics

FILE HANDLE
Overview (FILE HANDLE command)
NAME Subcommand (FILE HANDLE command)
MODE Subcommand (FILE HANDLE command)
RECFORM Subcommand (FILE HANDLE command)
LRECL Subcommand (FILE HANDLE command)


FILE LABEL

FILE LABEL (command),FILE LABEL (command),FILE LABEL (command)
FILE LABEL (command),FILE LABEL (command),FILE LABEL (command)
syntax chart,syntax chart,syntax chart
data files,data files,data files
file information,file information,file information
file information,file information,file information
data files,data files,data files
FILE LABEL label text

This command takes effect immediately. It does not read the active dataset or execute pending transformations. See the topic Command Order for more information.

Example

FILE LABEL Original survey responses prior to recoding.

Related Topics

Overview (FILE LABEL command)


Overview (FILE LABEL command)

FILE LABEL (command),FILE LABEL (command),FILE LABEL (command)

FILE LABEL provides a descriptive label for a data file.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is the command name followed by the label text.

Syntax Rules Collapse Hide details

Syntax Rules

• The label text cannot exceed 64 bytes.

• Labels do not need to be enclosed in quotes.

• If the label is enclosed in quotes—or starts with a quotation mark (single or double)—standard rules for quoted strings apply. See the topic String Values in Command Specifications for more information.

Operations Collapse Hide details

Operations

• If the data file is saved in PASW Statistics format, the label is saved in the dictionary.

• The file label is displayed in the Notes tables generated by procedures.

• A data file can only contain one file label. Subsequent FILE LABEL commands replace the label text.

Example

FILE LABEL Respondent's original data.
FILE LABEL "Respondent's original data".
FILE LABEL 'Respondent's original data.'

• The first two commands are functionally equivalent. The enclosing double-quotes in the second command are not included as part of the label text, and the apostrophe (single quote) is preserved.

• In the last command, everything after the apostrophe in Respondent's will be omitted from the label because the apostrophe will be interpreted as the closing single quote to match the opening single quote.

Related Topics

FILE LABEL


FILE TYPE-END FILE TYPE

FILE TYPE (command),FILE TYPE (command),FILE TYPE (command)
FILE TYPE (command),FILE TYPE (command),FILE TYPE (command)
syntax chart,syntax chart,syntax chart

For mixed file types:

FILE TYPE MIXED [FILE='file'] [ENCODING='encoding specification']
  RECORD=[varname] column location [(format)]

  [WILD={NOWARN}]
        {WARN  }

For grouped file types:

FILE TYPE GROUPED [FILE='file'] [ENCODING='encoding specification']
  RECORD=[varname] column location [(format)]

 CASE=[varname] column location [(format)]

 [WILD={WARN  }] [DUPLICATE={WARN  }]
       {NOWARN}             {NOWARN}

 [MISSING={WARN  }] [ORDERED={YES}]
          {NOWARN}           {NO }

For nested file types:

FILE TYPE NESTED [FILE='file'] [ENCODING='encoding specification']
  RECORD=[varname] column location [(format)]

 [CASE=[varname] column location [(format)]]

 [WILD={NOWARN}] [DUPLICATE={NOWARN}]
       {WARN  }             {WARN  }
                            {CASE  }

 [MISSING={NOWARN}]
          {WARN  }

END FILE TYPE
Release History Collapse Hide details

Release History

Release 16.0

• ENCODING subcommand added for Unicode support.

Example

FILE TYPE  MIXED RECORD=RECID 1-2.
RECORD TYPE 23.
DATA LIST   /SEX 5 AGE 6-7 DOSAGE 8-10 RESULT 12.
END FILE TYPE.

BEGIN DATA
21  145010 1
22  257200 2
25  235  250  2
35  167          300    3
24  125150 1
23  272075 1
21  149050 2
25  134  035  3
30  138          300    3
32  229          500    3
END DATA.

Related Topics

Overview (FILE TYPE-END FILE TYPE command)
Examples (FILE TYPE-END FILE TYPE command)
Specification Order (FILE TYPE-END FILE TYPE command)
Types of Files (FILE TYPE-END FILE TYPE command)
Subcommands and Their Defaults for Each File Type (FILE TYPE-END FILE TYPE command)
FILE Subcommand (FILE TYPE-END FILE TYPE command)
ENCODING Subcommand (FILE TYPE-END FILE TYPE command)
RECORD Subcommand (FILE TYPE-END FILE TYPE command)
CASE Subcommand (FILE TYPE-END FILE TYPE command)
WILD Subcommand (FILE TYPE-END FILE TYPE command)
DUPLICATE Subcommand (FILE TYPE-END FILE TYPE command)
MISSING Subcommand (FILE TYPE-END FILE TYPE command)
ORDERED Subcommand (FILE TYPE-END FILE TYPE command)


Overview (FILE TYPE-END FILE TYPE command)

The FILE TYPE-END FILE TYPE structure defines data for any one of the three types of complex raw data files: mixed files, which contain several types of records that define different types of cases; hierarchical or nested files, which contain several types of records with a defined relationship among the record types; or grouped files, which contain several records for each case with some records missing or duplicated. A fourth type of complex file, files with repeating groups of information, can be defined with the REPEATING DATA command.

FILE TYPE must be followed by at least one RECORD TYPE command and one DATA LIST command. Each pair of RECORD TYPE and DATA LIST commands defines one type of record in the data. END FILE TYPE signals the end of file definition.

Within the FILE TYPE structure, the lowest-level record in a nested file can be read with a REPEATING DATA command rather than a DATA LIST command. In addition, any record in a mixed file can be read with REPEATING DATA.

Basic Specification Collapse Hide details

Basic Specification

The basic specification on FILE TYPE is one of the three file type keywords (MIXED, GROUPED, or NESTED) and the RECORD subcommand. RECORD names the record identification variable and specifies its column location. If keyword GROUPED is specified, the CASE subcommand is also required. CASE names the case identification variable and specifies its column location.

The FILE TYPE-END FILE TYPE structure must enclose at least one RECORD TYPE and one DATA LIST command. END FILE TYPE is required to signal the end of file definition.

• RECORD TYPE specifies the values of the record type identifier (see RECORD TYPE).

• DATA LIST defines variables for the record type specified on the preceding RECORD TYPE command (see DATA LIST).

• Separate pairs of RECORD TYPE and DATA LIST commands must be used to define each different record type.

The resulting active dataset is always a rectangular file, regardless of the structure of the original data file.

Syntax Rules Collapse Hide details

Syntax Rules

• For mixed files, if the record types have different variables or if they have the same variables recorded in different locations, separate RECORD TYPE and DATA LIST commands are required for each record type.

• For mixed files, the same variable name can be used on different DATA LIST commands, since each record type defines a separate case.

• For mixed files, if the same variable is defined for more than one record type, the format type and length of the variable should be the same on all DATA LIST commands. The program refers to the first DATA LIST command that defines a variable for the print and write formats to include in the dictionary of the active dataset.

• For grouped and nested files, the variable names on each DATA LIST must be unique, since a case is built by combining all record types together into a single record.

• For nested files, the order of the RECORD TYPE commands defines the hierarchical structure of the file. The first RECORD TYPE defines the highest-level record type, the next RECORD TYPE defines the next highest-level record, and so forth. The last RECORD TYPE command defines a case in the active dataset. By default, variables from higher-level records are spread to the lowest-level record.

• For nested files, the SPREAD subcommand on RECORD TYPE can be used to spread the values in a record type only to the first case built from each record of that type. All other cases associated with that record are assigned the system-missing value for the variables defined on that type. See RECORD TYPE for more information.

• String values specified on the RECORD TYPE command must be enclosed in quotes.

Operations Collapse Hide details

Operations

• For mixed file types, the program skips all records that are not specified on one of the RECORD TYPE commands.

• If different variables are defined for different record types in mixed files, the variables are assigned the system-missing value for those record types on which they are not defined.

• For nested files, the first record in the file should be the type specified on the first RECORD TYPE command—the highest level of the hierarchy. If the first record in the file is not the highest-level type, the program skips all records until it encounters a record of the highest-level type. If MISSING or DUPLICATE has been specified, these records may produce warning messages but will not be used to build a case in the active dataset.

• When defining complex files, you are effectively building an input program and can use only commands that are allowed in the input state.

Related Topics

FILE TYPE-END FILE TYPE
Examples (FILE TYPE-END FILE TYPE command)
Specification Order (FILE TYPE-END FILE TYPE command)
Types of Files (FILE TYPE-END FILE TYPE command)
Subcommands and Their Defaults for Each File Type (FILE TYPE-END FILE TYPE command)
FILE Subcommand (FILE TYPE-END FILE TYPE command)
ENCODING Subcommand (FILE TYPE-END FILE TYPE command)
RECORD Subcommand (FILE TYPE-END FILE TYPE command)
CASE Subcommand (FILE TYPE-END FILE TYPE command)
WILD Subcommand (FILE TYPE-END FILE TYPE command)
DUPLICATE Subcommand (FILE TYPE-END FILE TYPE command)
MISSING Subcommand (FILE TYPE-END FILE TYPE command)
ORDERED Subcommand (FILE TYPE-END FILE TYPE command)


Examples (FILE TYPE-END FILE TYPE command)

Reading multiple record types from a mixed file

FILE TYPE  MIXED FILE='/data/treatmnt.txt' RECORD=RECID 1-2.
+ RECORD TYPE 21,22,23,24.
+ DATA LIST   /SEX 5 AGE 6-7 DOSAGE 8-10 RESULT 12.
+ RECORD TYPE 25.
+ DATA LIST   /SEX 5 AGE 6-7 DOSAGE 10-12 RESULT 15.
END FILE TYPE.

• Variable DOSAGE is read from columns 8–10 for record types 21, 22, 23, and 24 and from columns 10–12 for record type 25. RESULT is read from column 12 for record types 21, 22, 23, and 24, and from column 15 for record type 25.

• The active dataset contains values for all variables defined on the DATA LIST commands for record types 21 through 25. All other record types are skipped.

Reading only one record type from a mixed file

FILE TYPE  MIXED RECORD=RECID 1-2.
RECORD TYPE 23.
DATA LIST   /SEX 5 AGE 6-7 DOSAGE 8-10 RESULT 12.
END FILE TYPE.

BEGIN DATA
21  145010 1
22  257200 2
25  235  250  2
35  167          300    3
24  125150 1
23  272075 1
21  149050 2
25  134  035  3
30  138          300    3
32  229          500    3
END DATA.

• FILE TYPE begins the file definition and END FILE TYPE indicates the end of file definition. FILE TYPE specifies a mixed file type. Since the data are included between BEGIN DATA-END DATA, the FILE subcommand is omitted. The record identification variable RECID is located in columns 1 and 2.

• RECORD TYPE indicates that records with value 23 for variable RECID will be copied into the active dataset. All other records are skipped. the program does not issue a warning when it skips records in mixed files.

• DATA LIST defines variables on records with the value 23 for variable RECID.

A grouped file of student test scores

FILE TYPE GROUPED RECORD=#TEST 6 CASE=STUDENT 1-4.
RECORD TYPE 1.
DATA LIST  /ENGLISH 8-9 (A).
RECORD TYPE 2.
DATA LIST /READING 8-10.
RECORD TYPE 3.
DATA LIST /MATH 8-10.
END FILE TYPE.

BEGIN DATA
0001 1 B+
0001 2  74
0001 3  83
0002 1 A
0002 2 100
0002 3  71
0003 1 B-
0003 2  88
0003 3  81
0004 1 C
0004 2  94
0004 3  91
END DATA.

• FILE TYPE identifies the file as a grouped file. As required for grouped files, all records for a single case are together in the data. The record identification variable #TEST is located in column 6. A scratch variable is specified so it won’t be saved in the active dataset. The case identification variable STUDENT is located in columns 1–4.

• Because there are three record types, there are three RECORD TYPE commands. For each RECORD TYPE, there is a DATA LIST to define variables on that record type.

• END FILE TYPE signals the end of file definition.

• The program builds four cases—one for each student. Each case includes the case identification variable plus the variables defined for each record type (the test scores). The values for #TEST are not saved in the active dataset. Thus, each case in the active dataset has four variables: STUDENT, ENGLISH, READING, and MATH.

A nested file of accident records

FILE TYPE NESTED RECORD=6 CASE=ACCID 1-4.
RECORD TYPE 1.
DATA LIST /ACC_ID 9-11 WEATHER 12-13 STATE 15-16 (A) DATE 18-24 (A).
RECORD TYPE 2.
DATA LIST /STYLE 11 MAKE 13 OLD 14 LICENSE 15-16(A) INSURNCE 18-21 (A).
RECORD TYPE 3.
DATA LIST /PSNGR_NO 11 AGE 13-14 SEX 16 (A) INJURY 18 SEAT 20-21 (A)
           COST 23-24.
END FILE TYPE.

BEGIN DATA
0001 1  322 1 IL 3/13/88   /* Type 1:  accident record
0001 2    1 44MI 134M      /* Type 2:    vehicle record
0001 3    1 34 M 1 FR  3   /* Type 3:      person record
0001 2    2 16IL 322F      /*            vehicle record
0001 3    1 22 F 1 FR 11   /*              person record
0001 3    2 35 M 1 FR  5   /*              person record
0001 3    3 59 M 1 BK  7   /*              person record
0001 2    3 21IN 146M      /*            vehicle record
0001 3    1 46 M 0 FR  0   /*              person record
END DATA.

• FILE TYPE specifies a nested file type. The record identifier, located in column 6, is not assigned a variable name, so the default scratch variable name ####RECD is used. The case identification variable ACCID is located in columns 1–4.

• Because there are three record types, there are three RECORD TYPE commands. For each RECORD TYPE, there is a DATA LIST command to define variables on that record type. The order of the RECORD TYPE commands defines the hierarchical structure of the file.

• END FILE TYPE signals the end of file definition.

• The program builds a case for each lowest-level (type 3) record, representing each person in the file. There can be only one type 1 record for each type 2 record, and one type 2 record for each type 3 record. Each vehicle can be in only one accident, and each person can be in only one vehicle. The variables from the type 1 and type 2 records are spread to their corresponding type 3 records.

Related Topics

FILE TYPE-END FILE TYPE
Overview (FILE TYPE-END FILE TYPE command)
Specification Order (FILE TYPE-END FILE TYPE command)
Types of Files (FILE TYPE-END FILE TYPE command)
Subcommands and Their Defaults for Each File Type (FILE TYPE-END FILE TYPE command)
FILE Subcommand (FILE TYPE-END FILE TYPE command)
ENCODING Subcommand (FILE TYPE-END FILE TYPE command)
RECORD Subcommand (FILE TYPE-END FILE TYPE command)
CASE Subcommand (FILE TYPE-END FILE TYPE command)
WILD Subcommand (FILE TYPE-END FILE TYPE command)
DUPLICATE Subcommand (FILE TYPE-END FILE TYPE command)
MISSING Subcommand (FILE TYPE-END FILE TYPE command)
ORDERED Subcommand (FILE TYPE-END FILE TYPE command)


Specification Order (FILE TYPE-END FILE TYPE command)

• FILE TYPE must be the first command in the FILE TYPE-END FILE TYPE structure. FILE TYPE subcommands can be named in any order.

• Each RECORD TYPE command must precede its corresponding DATA LIST command.

• END FILE TYPE must be the last command in the structure.

Related Topics

FILE TYPE-END FILE TYPE
Overview (FILE TYPE-END FILE TYPE command)
Examples (FILE TYPE-END FILE TYPE command)
Types of Files (FILE TYPE-END FILE TYPE command)
Subcommands and Their Defaults for Each File Type (FILE TYPE-END FILE TYPE command)
FILE Subcommand (FILE TYPE-END FILE TYPE command)
ENCODING Subcommand (FILE TYPE-END FILE TYPE command)
RECORD Subcommand (FILE TYPE-END FILE TYPE command)
CASE Subcommand (FILE TYPE-END FILE TYPE command)
WILD Subcommand (FILE TYPE-END FILE TYPE command)
DUPLICATE Subcommand (FILE TYPE-END FILE TYPE command)
MISSING Subcommand (FILE TYPE-END FILE TYPE command)
ORDERED Subcommand (FILE TYPE-END FILE TYPE command)


Types of Files (FILE TYPE-END FILE TYPE command)

NESTED (keyword),NESTED (keyword),NESTED (keyword)
FILE TYPE command,FILE TYPE command,FILE TYPE command
GROUPED (keyword),GROUPED (keyword),GROUPED (keyword)
FILE TYPE command,FILE TYPE command,FILE TYPE command
MIXED (keyword),MIXED (keyword),MIXED (keyword)
FILE TYPE command,FILE TYPE command,FILE TYPE command
FILE TYPE (command),FILE TYPE (command),FILE TYPE (command)
NESTED keyword,NESTED keyword,NESTED keyword
FILE TYPE (command),FILE TYPE (command),FILE TYPE (command)
GROUPED keyword,GROUPED keyword,GROUPED keyword
FILE TYPE (command),FILE TYPE (command),FILE TYPE (command)
MIXED keyword,MIXED keyword,MIXED keyword

The first specification on FILE TYPE is a file type keyword, which defines the structure of the data file. There are three file type keywords: MIXED, GROUPED, and NESTED. Only one of the three types can be specified on FILE TYPE.

mixed files,mixed files,mixed files
complex raw data files,complex raw data files,complex raw data files
mixed,mixed,mixed
complex raw data files,complex raw data files,complex raw data files
grouped,grouped,grouped
grouped files,grouped files,grouped files
nested files,nested files,nested files
complex raw data files,complex raw data files,complex raw data files
nested,nested,nested
hierarchical files. See nested files,hierarchical files. See nested files,hierarchical files. See nested files
MIXED | Mixed file type. MIXED specifies a file in which each record type named on a RECORD TYPE command defines a case. You do not need to define all types of records in the file. In fact, FILE TYPE MIXED is useful for reading only one type of record because the program can decide whether to execute the DATA LIST for a record by simply reading the variable that identifies the record type.
GROUPED | Grouped file type. GROUPED defines a file in which cases are defined by grouping together record types with the same identification number. Each case usually has one record of each type. All records for a single case must be together in the file. By default, the program assumes that the records are in the same sequence within each case.
NESTED | Nested file type. NESTED defines a file in which the record types are related to each other hierarchically. The record types are grouped together by a case identification number that identifies the highest level—the first record type—of the hierarchy. Usually, the last record type specified—the lowest level of the hierarchy—defines a case. For example, in a file containing household records and records for each person living in the household, each person record defines a case. Information from higher record types may be spread to each case. For example, the value for a variable on the household record, such as CITY, can be spread to the records for each person in the household.

Related Topics

FILE TYPE-END FILE TYPE
Overview (FILE TYPE-END FILE TYPE command)
Examples (FILE TYPE-END FILE TYPE command)
Specification Order (FILE TYPE-END FILE TYPE command)
Subcommands and Their Defaults for Each File Type (FILE TYPE-END FILE TYPE command)
FILE Subcommand (FILE TYPE-END FILE TYPE command)
ENCODING Subcommand (FILE TYPE-END FILE TYPE command)
RECORD Subcommand (FILE TYPE-END FILE TYPE command)
CASE Subcommand (FILE TYPE-END FILE TYPE command)
WILD Subcommand (FILE TYPE-END FILE TYPE command)
DUPLICATE Subcommand (FILE TYPE-END FILE TYPE command)
MISSING Subcommand (FILE TYPE-END FILE TYPE command)
ORDERED Subcommand (FILE TYPE-END FILE TYPE command)


Subcommands and Their Defaults for Each File Type (FILE TYPE-END FILE TYPE command)

FILE TYPE (command),FILE TYPE (command),FILE TYPE (command)
subcommand summary,subcommand summary,subcommand summary

The specifications on the FILE TYPE differ for each type of file. The following table shows whether each subcommand is required or optional and, where applicable, what the default specification is for each file type. N/A indicates that the subcommand is not applicable to that type of file.

Summary of FILE TYPE subcommands for different file types
Subcommand | Mixed | Grouped | Nested
FILE | Conditional | Conditional | Conditional
RECORD | Required | Required | Required
CASE | Not Applicable | Required | Optional
WILD | NOWARN | WARN | NOWARN
DUPLICATE | N/A | WARN | NOWARN
MISSING | N/A | WARN | NOWARN
ORDERED | N/A | YES | N/A

• FILE is required unless data are inline (included between BEGIN DATA-END DATA).

• RECORD is always required.

• CASE is required for grouped files.

• The subcommands CASE, DUPLICATE, and MISSING can also be specified on the associated RECORD TYPE commands for grouped files. However, DUPLICATE=CASE is invalid.

• For nested files, CASE and MISSING can be specified on the associated RECORD TYPE commands.

• If the subcommands CASE, DUPLICATE, or MISSING are specified on a RECORD TYPE command, the specification on the FILE TYPE command (or the default) is overridden only for the record types listed on that RECORD TYPE command. The FILE TYPE specification or default applies to all other record types.

Related Topics

FILE TYPE-END FILE TYPE
Overview (FILE TYPE-END FILE TYPE command)
Examples (FILE TYPE-END FILE TYPE command)
Specification Order (FILE TYPE-END FILE TYPE command)
Types of Files (FILE TYPE-END FILE TYPE command)
FILE Subcommand (FILE TYPE-END FILE TYPE command)
ENCODING Subcommand (FILE TYPE-END FILE TYPE command)
RECORD Subcommand (FILE TYPE-END FILE TYPE command)
CASE Subcommand (FILE TYPE-END FILE TYPE command)
WILD Subcommand (FILE TYPE-END FILE TYPE command)
DUPLICATE Subcommand (FILE TYPE-END FILE TYPE command)
MISSING Subcommand (FILE TYPE-END FILE TYPE command)
ORDERED Subcommand (FILE TYPE-END FILE TYPE command)


FILE Subcommand (FILE TYPE-END FILE TYPE command)

FILE (subcommand),FILE (subcommand),FILE (subcommand)
FILE TYPE command,FILE TYPE command,FILE TYPE command
FILE TYPE (command),FILE TYPE (command),FILE TYPE (command)
FILE subcommand,FILE subcommand,FILE subcommand

FILE specifies a text file containing the data. FILE is not used when the data are inline.

Example

FILE TYPE  MIXED FILE='/data/treatmnt.txt' RECORD=RECID 1-2.

• Data are in the file treatmnt.txt. The file type is mixed. The record identification variable RECID is located in columns 1 and 2 of each record.

Related Topics

FILE TYPE-END FILE TYPE
Overview (FILE TYPE-END FILE TYPE command)
Examples (FILE TYPE-END FILE TYPE command)
Specification Order (FILE TYPE-END FILE TYPE command)
Types of Files (FILE TYPE-END FILE TYPE command)
Subcommands and Their Defaults for Each File Type (FILE TYPE-END FILE TYPE command)
ENCODING Subcommand (FILE TYPE-END FILE TYPE command)
RECORD Subcommand (FILE TYPE-END FILE TYPE command)
CASE Subcommand (FILE TYPE-END FILE TYPE command)
WILD Subcommand (FILE TYPE-END FILE TYPE command)
DUPLICATE Subcommand (FILE TYPE-END FILE TYPE command)
MISSING Subcommand (FILE TYPE-END FILE TYPE command)
ORDERED Subcommand (FILE TYPE-END FILE TYPE command)


ENCODING Subcommand (FILE TYPE-END FILE TYPE command)

FILE TYPE (command),FILE TYPE (command),FILE TYPE (command)
ENCODING subcommand,ENCODING subcommand,ENCODING subcommand
ENCODING (subcommand),ENCODING (subcommand),ENCODING (subcommand)
FILE TYPE command,FILE TYPE command,FILE TYPE command

ENCODING specifies the encoding format of the file. The keyword is followed by an equals sign and a quoted encoding specification.

• In Unicode mode, the default is UTF8. For more information, see SET command, UNICODE subcommand.

• In code page mode, the default is the current locale setting. For more information, see SET command, LOCALE subcommand.

• The quoted encoding value can be: Locale (the current locale setting), UTF8, UTF16, UTF16BE (big endian), UTF16LE (little endian), a numeric Windows code page value (for example, '1252'), or an IANA code page value (for example, 'iso8859-1' or cp1252).

• In Unicode mode, the defined width of string variables is tripled for code page and UTF-16 text data files. Use ALTER TYPE to automatically adjust the defined width of string variables.

• If there is no FILE subcommand, the ENCODING subcommand is ignored.

Related Topics

FILE TYPE-END FILE TYPE
Overview (FILE TYPE-END FILE TYPE command)
Examples (FILE TYPE-END FILE TYPE command)
Specification Order (FILE TYPE-END FILE TYPE command)
Types of Files (FILE TYPE-END FILE TYPE command)
Subcommands and Their Defaults for Each File Type (FILE TYPE-END FILE TYPE command)
FILE Subcommand (FILE TYPE-END FILE TYPE command)
RECORD Subcommand (FILE TYPE-END FILE TYPE command)
CASE Subcommand (FILE TYPE-END FILE TYPE command)
WILD Subcommand (FILE TYPE-END FILE TYPE command)
DUPLICATE Subcommand (FILE TYPE-END FILE TYPE command)
MISSING Subcommand (FILE TYPE-END FILE TYPE command)
ORDERED Subcommand (FILE TYPE-END FILE TYPE command)


RECORD Subcommand (FILE TYPE-END FILE TYPE command)

FILE TYPE (command),FILE TYPE (command),FILE TYPE (command)
RECORD subcommand,RECORD subcommand,RECORD subcommand
RECORD (subcommand),RECORD (subcommand),RECORD (subcommand)
FILE TYPE command,FILE TYPE command,FILE TYPE command

RECORD specifies the name and column location of the record identification variable.

• The column location of the record identifier is required. The variable name is optional.

• If you do not want to save the record type variable, you can assign a scratch variable name by using the # character as the first character of the name. If a variable name is not specified on RECORD, the record identifier is defined as the scratch variable ####RECD.

• The value of the identifier for each record type must be unique and must be in the same location on all records. However, records do not have to be sorted according to type.

• A column-style format can be specified for the record identifier. For example, the following two specifications are valid:

RECORD=V1 1-2(N)
RECORD=V1 1-2(F,1)

FORTRAN-like formats cannot be used because the column location must be specified explicitly.

• Specify A in parentheses after the column location to define the record type variable as a string variable.

Example

FILE TYPE  MIXED FILE='/data/treatmnt.txt' RECORD=RECID 1-2.

• The record identifier is variable RECID, located in columns 1 and 2 of the hospital treatment data file.

Related Topics

FILE TYPE-END FILE TYPE
Overview (FILE TYPE-END FILE TYPE command)
Examples (FILE TYPE-END FILE TYPE command)
Specification Order (FILE TYPE-END FILE TYPE command)
Types of Files (FILE TYPE-END FILE TYPE command)
Subcommands and Their Defaults for Each File Type (FILE TYPE-END FILE TYPE command)
FILE Subcommand (FILE TYPE-END FILE TYPE command)
ENCODING Subcommand (FILE TYPE-END FILE TYPE command)
CASE Subcommand (FILE TYPE-END FILE TYPE command)
WILD Subcommand (FILE TYPE-END FILE TYPE command)
DUPLICATE Subcommand (FILE TYPE-END FILE TYPE command)
MISSING Subcommand (FILE TYPE-END FILE TYPE command)
ORDERED Subcommand (FILE TYPE-END FILE TYPE command)


CASE Subcommand (FILE TYPE-END FILE TYPE command)

FILE TYPE (command),FILE TYPE (command),FILE TYPE (command)
CASE subcommand,CASE subcommand,CASE subcommand
CASE (subcommand),CASE (subcommand),CASE (subcommand)
FILE TYPE command,FILE TYPE command,FILE TYPE command

CASE specifies a name and column location for the case identification variable. CASE is required for grouped files and optional for nested files. It cannot be used with mixed files.

• For grouped files, each unique value for the case identification variable defines a case in the active dataset.

• For nested files, the case identification variable identifies the highest-level record of the hierarchy. The program issues a warning message for each record with a case identification number not equal to the case identification number on the last highest-level record. However, the record with the invalid case number is used to build the case.

• The column location of the case identifier is required. The variable name is optional.

• If you do not want to save the case identification variable, you can assign a scratch variable name by using the # character as the first character of the name. If a variable name is not specified on CASE, the case identifier is defined as the scratch variable ####CASE.

• A column-style format can be specified for the case identifier. For example, the following two specifications are valid:

CASE=V1 1-2(N)
CASE=V1 1-2(F,1)

FORTRAN-like formats cannot be used because the column location must be specified explicitly.

• Specify A in parentheses after the column location to define the case identification variable as a string variable.

• If the case identification number is not in the same columns on all record types, use the CASE subcommand on the RECORD TYPE commands as well as on the FILE TYPE command (see RECORD TYPE).

Example

* A grouped file of student test scores.

FILE TYPE GROUPED RECORD=#TEST 6 CASE=STUDENT 1-4.
RECORD TYPE 1.
DATA LIST  /ENGLISH 8-9 (A).
RECORD TYPE 2.
DATA LIST /READING 8-10.
RECORD TYPE 3.
DATA LIST /MATH 8-10.
END FILE TYPE.

BEGIN DATA
0001 1 B+
0001 2  74
0001 3  83
0002 1 A
0002 2 100
0002 3  71
0003 1 B-
0003 2  88
0003 3  81
0004 1 C
0004 2  94
0004 3  91
END DATA.

• CASE is required for grouped files. CASE specifies variable STUDENT, located in columns 1–4, as the case identification variable.

• The data contain four different values for STUDENT. The active dataset therefore has four cases, one for each value of STUDENT. In a grouped file, each unique value for the case identification variable defines a case in the active dataset.

• Each case includes the case identification variable plus the variables defined for each record type. The values for #TEST are not saved in the active dataset. Thus, each case in the active dataset has four variables: STUDENT, ENGLISH, READING, and MATH.

Example

* A nested file of accident records.

FILE TYPE NESTED RECORD=6 CASE=ACCID 1-4.
RECORD TYPE 1.
DATA LIST   /ACC_ID 9-11 WEATHER 12-13 STATE 15-16 (A) DATE 18-24 (A).
RECORD TYPE 2.
DATA LIST /STYLE 11 MAKE 13 OLD 14 LICENSE 15-16 (A) INSURNCE 18-21 (A).
RECORD TYPE 3.
DATA LIST /PSNGR_NO 11 AGE 13-14 SEX 16 (A) INJURY 18 SEAT 20-21 (A)
           COST 23-24.
END FILE TYPE.

BEGIN DATA
0001 1  322 1 IL 3/13/88   /* Type 1:  accident record
0001 2    1 44MI 134M      /* Type 2:    vehicle record
0001 3    1 34 M 1 FR  3   /* Type 3:       person record
0001 2    2 16IL 322F      /*            vehicle record
0001 3    1 22 F 1 FR 11   /*               person record
0001 3    2 35 M 1 FR  5   /*               person record
0001 3    3 59 M 1 BK  7   /*               person record
0001 2    3 21IN 146M      /*            vehicle record
0001 3    1 46 M 0 FR  0   /*               person record
END DATA.

• CASE specifies variable ACCID, located in columns 1–4, as the case identification variable. ACCID identifies the highest level of the hierarchy: the level for the accident records.

• As each case is built, the value of the variable ACCID is checked against the value of ACCID on the last highest-level record (record type 1). If the values do not match, a warning message is issued. However, the record is used to build the case.

• The data in this example contain only one value for ACCID, which is spread across all cases. In a nested file, the lowest-level record type determines the number of cases in the active dataset. In this example, the active dataset has five cases because there are five person records.

Example

* Specifying case on the RECORD TYPE command.

FILE TYPE GROUPED FILE=HUBDATA RECORD=#RECID 80 CASE=ID 1-5.
RECORD TYPE 1.
DATA LIST   /MOHIRED YRHIRED 12-15 DEPT79 TO DEPT82 SEX 16-20.
RECORD TYPE 2.
DATA LIST   /SALARY79 TO SALARY82 6-25 HOURLY81 HOURLY82 40-53 (2)
            PROMO81 72  AGE 54-55 RAISE82 66-70.
RECORD TYPE 3  CASE=75-79.
DATA LIST   /JOBCAT 6 NAME 25-48 (A).
END FILE TYPE.

• The CASE subcommand on FILE TYPE indicates that the case identification number is located in columns 1–5. However, for type 3 records, the case identification number is located in columns 75–79. The CASE subcommand is therefore specified on the third RECORD TYPE command to override the case setting for type 3 records.

• The format of the case identification variable must be the same on all records. If the case identification variable is defined as a string on the FILE TYPE command, it cannot be defined as a numeric variable on the RECORD TYPE command, and vice versa.

Related Topics

FILE TYPE-END FILE TYPE
Overview (FILE TYPE-END FILE TYPE command)
Examples (FILE TYPE-END FILE TYPE command)
Specification Order (FILE TYPE-END FILE TYPE command)
Types of Files (FILE TYPE-END FILE TYPE command)
Subcommands and Their Defaults for Each File Type (FILE TYPE-END FILE TYPE command)
FILE Subcommand (FILE TYPE-END FILE TYPE command)
ENCODING Subcommand (FILE TYPE-END FILE TYPE command)
RECORD Subcommand (FILE TYPE-END FILE TYPE command)
WILD Subcommand (FILE TYPE-END FILE TYPE command)
DUPLICATE Subcommand (FILE TYPE-END FILE TYPE command)
MISSING Subcommand (FILE TYPE-END FILE TYPE command)
ORDERED Subcommand (FILE TYPE-END FILE TYPE command)


WILD Subcommand (FILE TYPE-END FILE TYPE command)

FILE TYPE (command),FILE TYPE (command),FILE TYPE (command)
WILD subcommand,WILD subcommand,WILD subcommand
WILD (subcommand),WILD (subcommand),WILD (subcommand)
FILE TYPE command,FILE TYPE command,FILE TYPE command
WARN (keyword),WARN (keyword),WARN (keyword)
FILE TYPE command,FILE TYPE command,FILE TYPE command
NOWARN (keyword),NOWARN (keyword),NOWARN (keyword)
FILE TYPE command,FILE TYPE command,FILE TYPE command

WILD determines whether the program issues a warning when it encounters undefined record types in the data file. Regardless of whether the warning is issued, undefined records are not included in the active dataset.

• The only specification on WILD is keyword WARN or NOWARN.

• WARN cannot be specified if keyword OTHER is specified on the last RECORD TYPE command to indicate all other record types (see RECORD TYPE).

WARN | Issue warning messages. The program displays a warning message and the first 80 characters of the record for each record type that is not mentioned on a RECORD TYPE command. This is the default for grouped file types.
NOWARN | Suppress warning messages. The program simply skips all record types not mentioned on a RECORD TYPE command and does not display warning messages. This is the default for mixed and nested file types.

Example

FILE TYPE  MIXED FILE='/data/treatmnt.txt' RECORD=RECID 1-2 WILD=WARN.

• WARN is specified on the WILD subcommand. The program displays a warning message and the first 80 characters of the record for each record type that is not mentioned on a RECORD TYPE command.

Related Topics

FILE TYPE-END FILE TYPE
Overview (FILE TYPE-END FILE TYPE command)
Examples (FILE TYPE-END FILE TYPE command)
Specification Order (FILE TYPE-END FILE TYPE command)
Types of Files (FILE TYPE-END FILE TYPE command)
Subcommands and Their Defaults for Each File Type (FILE TYPE-END FILE TYPE command)
FILE Subcommand (FILE TYPE-END FILE TYPE command)
ENCODING Subcommand (FILE TYPE-END FILE TYPE command)
RECORD Subcommand (FILE TYPE-END FILE TYPE command)
CASE Subcommand (FILE TYPE-END FILE TYPE command)
DUPLICATE Subcommand (FILE TYPE-END FILE TYPE command)
MISSING Subcommand (FILE TYPE-END FILE TYPE command)
ORDERED Subcommand (FILE TYPE-END FILE TYPE command)


DUPLICATE Subcommand (FILE TYPE-END FILE TYPE command)

FILE TYPE (command),FILE TYPE (command),FILE TYPE (command)
DUPLICATE subcommand,DUPLICATE subcommand,DUPLICATE subcommand
DUPLICATE (subcommand),DUPLICATE (subcommand),DUPLICATE (subcommand)
FILE TYPE command,FILE TYPE command,FILE TYPE command
CASE (keyword),CASE (keyword),CASE (keyword)
FILE TYPE command,FILE TYPE command,FILE TYPE command

DUPLICATE determines how the program responds when it encounters more than one record of each type for a single case. DUPLICATE is optional for grouped and nested files. DUPLICATE cannot be used with mixed files.

• The only specification on DUPLICATE is keyword WARN, NOWARN, or CASE.

WARN | Issue warning messages. The program displays a warning message and the first 80 characters of the last record of the duplicate set of record types. Only the last record from a set of duplicates is included in the active dataset. This is the default for grouped files.
NOWARN | Suppress warning messages. The program does not display warning messages when it encounters duplicate record types. Only the last record from a set of duplicates is included in the active dataset. This is the default for nested files.
CASE | Build a case in the active dataset for each duplicate record. The program builds one case in the active dataset for each duplicate record, spreading information from any higher-level records and assigning system-missing values to the variables defined on lower-level records. This option is available only for nested files.

Example

* A nested file of accident records.
* Issue a warning for duplicate record types.

FILE TYPE NESTED RECORD=6 CASE=ACCID 1-4 DUPLICATE=WARN.
RECORD TYPE 1.
DATA LIST   /ACC_ID 9-11 WEATHER 12-13 STATE 15-16 (A) DATE 18-24 (A).
RECORD TYPE 2.
DATA LIST /STYLE 11 MAKE 13 OLD 14 LICENSE 15-16 (A) INSURNCE 18-21 (A).
RECORD TYPE 3.
DATA LIST /PSNGR_NO 11 AGE 13-14 SEX 16 (A) INJURY 18 SEAT 20-21 (A)
           COST 23-24.
END FILE TYPE.

BEGIN DATA
0001 1  322 1 IL 3/13/88   /*          accident record
0001 2    1 44MI 134M      /*            vehicle record
0001 3    1 34 M 1 FR  3   /*               person record
0001 2    1 31IL 134M      /*  duplicate vehicle record
0001 2    2 16IL 322F      /*            vehicle record
0001 3    1 22 F 1 FR 11   /*               person record
0001 3    2 35 M 1 FR  5   /*               person record
0001 3    3 59 M 1 BK  7   /*               person record
0001 2    3 21IN 146M      /*            vehicle record
0001 3    1 46 M 0 FR  0   /*               person record
END DATA.

• In the data, there are two vehicle (type 2) records above the second set of person (type 3) records. This implies that an empty (for example, parked) vehicle was involved, or that each of the three persons was in two vehicles, which is impossible.

• DUPLICATE specifies keyword WARN. The program displays a warning message and the first 80 characters of the second of the duplicate set of type 2 records. The first duplicate record is skipped, and only the second is included in the active dataset. This assumes that no empty vehicles were involved in the accident.

• If the duplicate record represents an empty vehicle, it can be included in the active dataset by specifying keyword CASE on DUPLICATE. The program builds one case in the active dataset for the first duplicate record, spreading information to that case from the previous type 1 record and assigning system-missing values to the variables defined for type 3 records. The second record from the duplicate set is used to build the three cases for the associated type 3 records.

Related Topics

FILE TYPE-END FILE TYPE
Overview (FILE TYPE-END FILE TYPE command)
Examples (FILE TYPE-END FILE TYPE command)
Specification Order (FILE TYPE-END FILE TYPE command)
Types of Files (FILE TYPE-END FILE TYPE command)
Subcommands and Their Defaults for Each File Type (FILE TYPE-END FILE TYPE command)
FILE Subcommand (FILE TYPE-END FILE TYPE command)
ENCODING Subcommand (FILE TYPE-END FILE TYPE command)
RECORD Subcommand (FILE TYPE-END FILE TYPE command)
CASE Subcommand (FILE TYPE-END FILE TYPE command)
WILD Subcommand (FILE TYPE-END FILE TYPE command)
MISSING Subcommand (FILE TYPE-END FILE TYPE command)
ORDERED Subcommand (FILE TYPE-END FILE TYPE command)


MISSING Subcommand (FILE TYPE-END FILE TYPE command)

FILE TYPE (command),FILE TYPE (command),FILE TYPE (command)
MISSING subcommand,MISSING subcommand,MISSING subcommand
MISSING (subcommand),MISSING (subcommand),MISSING (subcommand)
FILE TYPE command,FILE TYPE command,FILE TYPE command

MISSING determines whether the program issues a warning when it encounters a missing record type for a case. Regardless of whether the program issues the warning, it builds the case in the active dataset with system-missing values for the variables defined on the missing record. MISSING is optional for grouped and nested files.

• MISSING cannot be used with mixed files and is optional for grouped and nested files.

• For grouped and nested files, the program verifies that each defined case includes one record of each type.

• The only specification is keyword WARN or NOWARN.

WARN | Issue a warning message when a record type is missing for a case. This is the default for grouped files.
NOWARN | Suppress the warning message when a record type is missing for a case. This is the default for nested files.

Example

* A grouped file with missing records.

FILE TYPE GROUPED RECORD=#TEST 6 CASE=STUDENT 1-4 MISSING=NOWARN.
RECORD TYPE 1.
DATA LIST  /ENGLISH 8-9 (A).
RECORD TYPE 2.
DATA LIST /READING 8-10.
RECORD TYPE 3.
DATA LIST /MATH 8-10.
END FILE TYPE.

BEGIN DATA
0001 1 B+
0001 2  74
0002 1 A
0002 2 100
0002 3  71
0003 3  81
0004 1 C
0004 2  94
0004 3  91
END DATA.

• The data contain records for three tests administered to four students. However, not all students took all tests. The first student took only the English and reading tests. The third student took only the math test.

• One case in the active dataset is built for each of the four students. If a student did not take a test, the system-missing value is assigned in the active dataset to the variable for the missing test. Thus, the first student has the system-missing value for the math test, and the third student has missing values for the English and reading tests.

• Keyword NOWARN is specified on MISSING. Therefore, no warning messages are issued for the missing records.

Example

* A nested file with missing records.

FILE TYPE NESTED RECORD=6 CASE=ACCID 1-4 MISSING=WARN.
RECORD TYPE 1.
DATA LIST   /ACC_ID 9-11 WEATHER 12-13 STATE 15-16 (A) DATE 18-24 (A).
RECORD TYPE 2.
DATA LIST /STYLE 11 MAKE 13 OLD 14 LICENSE 15-16 (A) INSURNCE 18-21 (A).
RECORD TYPE 3.
DATA LIST /PSNGR_NO 11 AGE 13-14 SEX 16 (A) INJURY 18 SEAT 20-21 (A)
           COST 23-24.
END FILE TYPE.

BEGIN DATA
0001 1  322 1 IL 3/13/88   /*          accident record
0001 3    1 34 M 1 FR  3   /*               person record
0001 2    2 16IL 322F      /*            vehicle record
0001 3    1 22 F 1 FR 11   /*               person record
0001 3    2 35 M 1 FR  5   /*               person record
0001 3    3 59 M 1 BK  7   /*               person record
0001 2    3 21IN 146M      /*            vehicle record
0001 3    1 46 M 0 FR  0   /*               person record
END DATA.

• The data contain records for one accident. The first record is a type 1 (accident) record, and the second record is a type 3 (person) record. However, there is no type 2 record, and therefore no vehicle associated with the first person. The person may have been a pedestrian, but it is also possible that the vehicle record is missing.

• One case is built for each person record. The first case has missing values for the variables specified on the vehicle record.

• Keyword WARN is specified on MISSING. A warning message is issued for the missing record.

Related Topics

FILE TYPE-END FILE TYPE
Overview (FILE TYPE-END FILE TYPE command)
Examples (FILE TYPE-END FILE TYPE command)
Specification Order (FILE TYPE-END FILE TYPE command)
Types of Files (FILE TYPE-END FILE TYPE command)
Subcommands and Their Defaults for Each File Type (FILE TYPE-END FILE TYPE command)
FILE Subcommand (FILE TYPE-END FILE TYPE command)
ENCODING Subcommand (FILE TYPE-END FILE TYPE command)
RECORD Subcommand (FILE TYPE-END FILE TYPE command)
CASE Subcommand (FILE TYPE-END FILE TYPE command)
WILD Subcommand (FILE TYPE-END FILE TYPE command)
DUPLICATE Subcommand (FILE TYPE-END FILE TYPE command)
ORDERED Subcommand (FILE TYPE-END FILE TYPE command)


ORDERED Subcommand (FILE TYPE-END FILE TYPE command)

FILE TYPE (command),FILE TYPE (command),FILE TYPE (command)
ORDERED subcommand,ORDERED subcommand,ORDERED subcommand
ORDERED (subcommand),ORDERED (subcommand),ORDERED (subcommand)
FILE TYPE command,FILE TYPE command,FILE TYPE command

ORDERED indicates whether the records are in the same order as they are defined on the RECORD TYPE commands. Regardless of the order of the records in the data file and the specification on ORDERED, the program builds cases in the active dataset with records in the order defined on the RECORD TYPE commands.

• ORDERED can be used only for grouped files.

• The only specification is keyword YES or NO.

• If YES is in effect but the records are not in the order defined on the RECORD TYPE commands, the program issues a warning for each record that is out of order. The program still uses these records to build cases.

YES | Records for each case are in the same order as they are defined on the RECORD TYPE commands. This is the default.
NO | Records are not in the same order within each case.

Example

* A grouped file with records out of order.

FILE TYPE GROUPED RECORD=#TEST 6 CASE=STUDENT 1-4  MISSING=NOWARN
  ORDERED=NO.
RECORD TYPE 1.
DATA LIST  /ENGLISH 8-9 (A).
RECORD TYPE 2.
DATA LIST /READING 8-10.
RECORD TYPE 3.
DATA LIST /MATH 8-10.
END FILE TYPE.

BEGIN DATA
0001 2  74
0001 1 B+
0002 3  71
0002 2 100
0002 1 A
0003 2  81
0004 2  94
0004 1 C
0004 3  91
END DATA.

• The first RECORD TYPE command specifies record type 1, the second specifies record type 2, and the third specifies record type 3. However, records for each case are not always ordered type 1, type 2, and type 3.

• NO is specified on ORDERED. The program builds cases without issuing a warning that they are out of order in the data.

• Regardless of whether YES or NO is in effect for ORDERED, the program builds cases in the active dataset in the same order specified on the RECORD TYPE commands.

Related Topics

FILE TYPE-END FILE TYPE
Overview (FILE TYPE-END FILE TYPE command)
Examples (FILE TYPE-END FILE TYPE command)
Specification Order (FILE TYPE-END FILE TYPE command)
Types of Files (FILE TYPE-END FILE TYPE command)
Subcommands and Their Defaults for Each File Type (FILE TYPE-END FILE TYPE command)
FILE Subcommand (FILE TYPE-END FILE TYPE command)
ENCODING Subcommand (FILE TYPE-END FILE TYPE command)
RECORD Subcommand (FILE TYPE-END FILE TYPE command)
CASE Subcommand (FILE TYPE-END FILE TYPE command)
WILD Subcommand (FILE TYPE-END FILE TYPE command)
DUPLICATE Subcommand (FILE TYPE-END FILE TYPE command)
MISSING Subcommand (FILE TYPE-END FILE TYPE command)


FILTER

FILTER (command),FILTER (command),FILTER (command)
FILTER (command),FILTER (command),FILTER (command)
syntax chart,syntax chart,syntax chart
subsets of cases,subsets of cases,subsets of cases
FILTER command,FILTER command,FILTER command
select cases,select cases,select cases
FILTER  {BY var}
        {OFF   }

This command takes effect immediately. It does not read the active dataset or execute pending transformations. See the topic Command Order for more information.

Syntax for the FILTER command can be generated from the Select Cases dialog by selecting If condition is satisfied or Use filter variable.

Example

FILTER BY SEX.
FREQUENCIES BONUS.

Related Topics

Overview (FILTER command)
Examples (FILTER command)
USE
SELECT IF


Overview (FILTER command)

FILTER is used to exclude cases from program procedures without deleting them from the active dataset. When FILTER is in effect, cases with a zero or missing value for the specified variable are not used in program procedures. Those cases are not actually deleted and are available again if the filter is turned off. To see the current filter status, use the SHOW command.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is keyword BY followed by a variable name. Cases that have a zero or missing value for the filter variable are excluded from subsequent procedures.

Syntax Rules Collapse Hide details

Syntax Rules

• Only one numeric variable can be specified. The variable can be one of the original variables in the data file or a variable computed with transformation commands.

• Keyword OFF turns off the filter. All cases in the active dataset become available to subsequent procedures.

• If FILTER is specified without a keyword, FILTER OFF is assumed but the program displays a warning message.

• FILTER can be specified anywhere in the command sequence. Unlike SELECT IF, FILTER has the same effect within an input program as it does outside an input program. Attention must be paid to the placement of any transformation command used to compute values for the filter variable (see INPUT PROGRAM).

Operations Collapse Hide details

Operations

• FILTER performs case selection without changing the active dataset. Cases that have a zero or missing value are excluded from subsequent procedures but are not deleted from the file.

• Both system-missing and user-missing values are treated as missing. The FILTER command does not offer options for changing selection criteria. To set up different criteria for exclusion, create a numeric variable and conditionally compute its values before specifying it on FILTER.

• If FILTER is specified after TEMPORARY, FILTER affects the next procedure only. After that procedure, the filter status reverts to whatever it was before the TEMPORARY command.

• The filter status does not change until another FILTER command is specified, a USE command is specified, or the active dataset is replaced.

• FILTER and USE are mutually exclusive. USE automatically turns off any previous FILTER command, and FILTER automatically turns off any previous USE command.

• If the specified filter variable is renamed, it is still in effect. The SHOW command will display the new name of the filter variable. However, the filter is turned off if the filter variable is recoded into a string variable or is deleted from the file.

• If the active dataset is replaced after a MATCH FILES, ADD FILES, or UPDATE command and the active dataset is one of the input files, the filter remains in effect if the new active dataset has a numeric variable with the name of the filter variable. If the active dataset does not have a numeric variable with that name (for example, if the filter variable was dropped or renamed), the filter is turned off.

• If the active dataset is replaced by an entirely new data file (for example, by a DATA LIST, GET, or IMPORT command), the filter is turned off.

• The FILTER command changes the filter status and takes effect when a procedure is executed or an EXECUTE command is encountered.

Related Topics

FILTER
Examples (FILTER command)


Examples (FILTER command)

Filter by a variable with values of 0 and 1

FILTER BY SEX.
FREQUENCIES BONUS.

• This example assumes that SEX is a numeric variable, with male and female coded as 0 and 1, respectively. The FILTER command excludes males and cases with missing values for SEX from the subsequent procedures. The FREQUENCIES command generates a frequency table of BONUS for females only.

Recoding the filter variable to change the filter criterion

RECODE SEX (1=0)(0=1).
FILTER BY SEX.
FREQUENCIES BONUS.

• This example assumes the same coding scheme for SEX as the previous example. Before FILTER is specified, variable SEX is recoded. The FILTER command then excludes females and cases with missing values for SEX. The FREQUENCIES command generates a frequency table of BONUS for males only.

Related Topics

FILTER
Overview (FILTER command)


FINISH

FINISH (command),FINISH (command),FINISH (command)
FINISH (command),FINISH (command),FINISH (command)
syntax chart,syntax chart,syntax chart
FINISH

Related Topics

Overview (FINISH command)
Example (FINISH command)
Basic Specification (FINISH command)
Command Files (FINISH command)
Prompted Sessions (FINISH command)


Overview (FINISH command)

FINISH causes the program to stop reading commands.

Operations Collapse Hide details

Operations

• FINISH immediately causes the program to stop reading commands.

• The appearance of FINISH on the printback of commands in the display file indicates that the session has been completed.

Related Topics

FINISH
Example (FINISH command)
Basic Specification (FINISH command)
Command Files (FINISH command)
Prompted Sessions (FINISH command)


Example (FINISH command)

DATA LIST FILE=RAWDATA /NAME 1-15(A) V1 TO V15 16-30.
LIST.
FINISH.
REPORT FORMAT=AUTO LIST /VARS=NAME V1 TO V10.

• FINISH causes the program to stop reading commands after LIST is executed. The REPORT command is not executed.

Related Topics

FINISH
Overview (FINISH command)
Basic Specification (FINISH command)
Command Files (FINISH command)
Prompted Sessions (FINISH command)


Basic Specification (FINISH command)

The basic specification is keyword FINISH. There are no additional specifications.

Related Topics

FINISH
Overview (FINISH command)
Example (FINISH command)
Command Files (FINISH command)
Prompted Sessions (FINISH command)


Command Files (FINISH command)

• FINISH is optional in a command file and is used to mark the end of a session.

• FINISH causes the program to stop reading commands. Anything following FINISH in the command file is ignored. Any commands following FINISH in an INCLUDE file are ignored.

• FINISH cannot be used within a DO IF structure to end a session conditionally. FINISH within a DO IF structure will end the session unconditionally.

Related Topics

FINISH
Overview (FINISH command)
Example (FINISH command)
Basic Specification (FINISH command)
Prompted Sessions (FINISH command)


Prompted Sessions (FINISH command)

• FINISH is required in a prompted session to terminate the session.

• Because FINISH is a program command, it can be used only after the command line prompt for the program, which expects a procedure name. FINISH cannot be used to end a prompted session from a DATA>, CONTINUE>, HELP>, or DEFINE> prompt.

Related Topics

FINISH
Overview (FINISH command)
Example (FINISH command)
Basic Specification (FINISH command)
Command Files (FINISH command)


FIT

FIT (command),FIT (command),FIT (command)
FIT (command),FIT (command),FIT (command)
syntax chart,syntax chart,syntax chart
FIT [[ERRORS=] residual series names]

    [/OBS=observed series names]

    [/{DFE=error degrees of freedom     }]
      {DFH=hypothesis degrees of freedom}

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See FIT Algorithms for computational details for this procedure.

Example

FIT.

Related Topics

Overview (FIT command)
Example (FIT command)
ERRORS Subcommand (FIT command)
OBS Subcommand (FIT command)
DFE and DFH Subcommands (FIT command)
Output Considerations for SSE (FIT command)
References (FIT command)
AREG
ARIMA
EXSMOOTH
SEASON
SPECTRA
TSET
TSHOW


Overview (FIT command)

FIT displays a variety of descriptive statistics computed from the residual series as an aid in evaluating the goodness of fit of one or more models.

Options Collapse Hide details

Options

Statistical Output. You can produce statistics for a particular residual series by specifying the names of the series after FIT. You can also obtain percent error statistics for specified residual series by specifying observed series on the OBS subcommand.

Degrees of Freedom. You can specify the degrees of freedom for the residual series using the DFE or DFH subcommands.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is simply the command keyword FIT. All other specifications are optional.

• By default, FIT calculates the mean error, mean percent error, mean absolute error, mean absolute percent error, sum of squared errors, mean square error, root mean square error, and the Durbin-Watson statistic for the last ERR_n (residual) series generated and the corresponding observed series in the active dataset.

• If neither residual nor observed series are specified, percent error statistics for the default residual and observed series are included.

Syntax Rules Collapse Hide details

Syntax Rules

• If OBS is specified, the ERRORS subcommand naming the residual series is required.

Operations Collapse Hide details

Operations

• Observed series and degrees of freedom are matched with residual series according to the order in which they are specified.

• If residual series are explicitly specified but observed series are not, percent error statistics are not included in the output. If neither residual nor observed series are specified, percent error statistics for the default residual and observed series are included.

• If subcommand DFH is specified, FIT calculates the DFE (error degrees of freedom) by subtracting the DFH (hypothesis degrees of freedom) from the number of valid cases in the series.

• If a PREDICT period (validation period) starts before the end of the observed series, statistics are reported separately for the USE period (historical period) and the PREDICT period.

Limitations Collapse Hide details

Limitations

• There is no limit on the number of residual series specified. However, the number of observed series must equal the number of residual series.

Related Topics

FIT
Example (FIT command)
ERRORS Subcommand (FIT command)
OBS Subcommand (FIT command)
DFE and DFH Subcommands (FIT command)
Output Considerations for SSE (FIT command)
References (FIT command)


Example (FIT command)

FIT ERR_4 ERR_5 ERR_6.

• This command requests goodness-of-fit statistics for the residual series ERR_4, ERR_5, and ERR_6, which were generated by previous procedures. Percent error statistics are not included in the output, since only residual series are named.

Related Topics

FIT
Overview (FIT command)
ERRORS Subcommand (FIT command)
OBS Subcommand (FIT command)
DFE and DFH Subcommands (FIT command)
Output Considerations for SSE (FIT command)
References (FIT command)


ERRORS Subcommand (FIT command)

FIT (command),FIT (command),FIT (command)
ERRORS subcommand,ERRORS subcommand,ERRORS subcommand
ERRORS (subcommand),ERRORS (subcommand),ERRORS (subcommand)
FIT command,FIT command,FIT command

ERRORS specifies the residual (error) series.

• The actual keyword ERRORS can be omitted. VARIABLES is an alias for ERRORS.

• The minimum specification on ERRORS is a residual series name.

• The ERRORS subcommand is required if the OBS subcommand is specified.

Related Topics

FIT
Overview (FIT command)
Example (FIT command)
OBS Subcommand (FIT command)
DFE and DFH Subcommands (FIT command)
Output Considerations for SSE (FIT command)
References (FIT command)


OBS Subcommand (FIT command)

FIT (command),FIT (command),FIT (command)
OBS subcommand,OBS subcommand,OBS subcommand
OBS (subcommand),OBS (subcommand),OBS (subcommand)
FIT command,FIT command,FIT command

OBS specifies the observed series to use for calculating the mean percentage error and mean absolute percentage error.

• OBS can be used only when the residual series are explicitly specified.

• The number and order of observed series must be the same as that of the residual series.

• If more than one residual series was calculated from a single observed series, the observed series is specified once for each residual series that is based on it.

Example

FIT ERRORS=ERR#1 ERR#2
  /OBS=VAR1 VAR1.

• This command requests FIT statistics for two residual series, ERR#1 and ERR#2, which were computed from the same observed series, VAR1.

Related Topics

FIT
Overview (FIT command)
Example (FIT command)
ERRORS Subcommand (FIT command)
DFE and DFH Subcommands (FIT command)
Output Considerations for SSE (FIT command)
References (FIT command)


DFE and DFH Subcommands (FIT command)

FIT (command),FIT (command),FIT (command)
DFE/DFH subcommands,DFE/DFH subcommands,DFE/DFH subcommands
DFE (subcommand),DFE (subcommand),DFE (subcommand)
FIT command,FIT command,FIT command
DFH (subcommand),DFH (subcommand),DFH (subcommand)
FIT command,FIT command,FIT command
residuals,residuals,residuals
degrees of freedom,degrees of freedom,degrees of freedom

DFE and DFH specify the degrees of freedom for each residual series. With DFE, error degrees of freedom are entered directly. DFH specifies hypothesis degrees of freedom so FIT can compute the DFE.

• Only one DFE or DFH subcommand should be specified. If both are specified, only the last one is in effect.

• The specification on DFE or DFH is a list of numeric values. The order of these values should correspond to the order of the residual series list.

• The error degrees of freedom specified on DFE are used to compute the mean square error (MSE) and root mean square (RMS).

• The value specified for DFH should equal the number of parameters in the model (including the constant if it is present). Differencing is not considered in calculating DFH, since any observations lost due to differencing are system-missing.

• If neither DFE or DFH are specified, FIT sets DFE equal to the number of observations.

Example

FIT ERR#1 ERR#2
  /OBS=VAR1 VAR2
  /DFE=47 46.

• In this example, the error degrees of freedom for the first residual series, ERR#1, is 47. The error degrees of freedom for the second residual series, ERR#2, is 46.

Related Topics

FIT
Overview (FIT command)
Example (FIT command)
ERRORS Subcommand (FIT command)
OBS Subcommand (FIT command)
Output Considerations for SSE (FIT command)
References (FIT command)


Output Considerations for SSE (FIT command)

The sum of squared errors (SSE) reported by FIT may not be the same as the SSE reported by the estimation procedure. The SSE from the procedure is an estimate of sigma squared for that model. The SSE from FIT is simply the sum of the squared residuals.

Related Topics

FIT
Overview (FIT command)
Example (FIT command)
ERRORS Subcommand (FIT command)
OBS Subcommand (FIT command)
DFE and DFH Subcommands (FIT command)
References (FIT command)


References (FIT command)

Makridakis, S., S. C. Wheelwright, and V. E. McGee. 1983. Forecasting: Methods and applications. New York: John Wiley and Sons.

McLaughlin, R. L. 1984. Forecasting techniques for decision making. Rockville, Md.: Control Data Management Institute.

Related Topics

FIT
Overview (FIT command)
Example (FIT command)
ERRORS Subcommand (FIT command)
OBS Subcommand (FIT command)
DFE and DFH Subcommands (FIT command)
Output Considerations for SSE (FIT command)


FLIP

FLIP (command),FLIP (command),FLIP (command)
FLIP (command),FLIP (command),FLIP (command)
syntax chart,syntax chart,syntax chart
FLIP [VARIABLES= {ALL    }]
                 {varlist}

     [/NEWNAMES=variable]

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

Syntax for the FLIP command can be generated from the Transpose dialog.

Example

FLIP.

Related Topics

Overview (FLIP command)
Example (FLIP command)
VARIABLES Subcommand (FLIP command)
NEWNAMES Subcommand (FLIP command)


Overview (FLIP command)

The program requires a file structure in which the variables are the columns and observations (cases) are the rows. If a file is organized such that variables are in rows and observations are in columns, you need to use FLIP to reorganize it. FLIP transposes the rows and columns of the data in the active dataset so that, for example, row 1, column 2 becomes row 2, column 1, and so forth.

Options Collapse Hide details

Options

Variable Subsets. You can transpose specific variables (columns) from the original file using the VARIABLES subcommand.

Variable Names. You can use the values of one of the variables from the original file as the variable names in the new file, using the NEWNAMES subcommand.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is the command keyword FLIP, which transposes all rows and columns.

• By default, FLIP assigns variable names VAR001 to VARn to the variables in the new file. It also creates the new variable CASE_LBL, whose values are the variable names that existed before transposition.

Subcommand Order Collapse Hide details

Subcommand Order

VARIABLES must precede NEWNAMES.

Operations Collapse Hide details

Operations

• FLIP replaces the active dataset with the transposed file and displays a list of variable names in the transposed file.

• FLIP discards any previous VARIABLE LABELS, VALUE LABELS, and WEIGHT settings. Values defined as user-missing in the original file are translated to system-missing in the transposed file.

• FLIP obeys any SELECT IF, N, and SAMPLE commands in effect.

• FLIP does not obey the TEMPORARY command. Any transformations become permanent when followed by FLIP.

• String variables in the original file are assigned system-missing values after transposition.

• Numeric variables are assigned a default format of F8.2 after transposition (with the exceptions of CASE_LBL and the variable specified on NEWNAMES).

• The variable CASE_LBL is created and added to the active dataset each time FLIP is executed.

• If CASE_LBL already exists as the result of a previous FLIP, its current values are used as the names of variables in the new file (if NEWNAMES is not specified).

Related Topics

FLIP
Example (FLIP command)
VARIABLES Subcommand (FLIP command)
NEWNAMES Subcommand (FLIP command)


Example (FLIP command)

The following is the LIST output for a data file arranged in a typical spreadsheet format, with variables in rows and observations in columns:

A              B         C         D

Income     22.00     31.00     43.00
Price      34.00     29.00     50.00
Year     1970.00   1971.00   1972.00

The command

FLIP.

transposes all variables in the file. The LIST output for the transposed file is as follows:

CASE_LBL    VAR001    VAR002    VAR003

A              .         .         .
B            22.00     34.00   1970.00
C            31.00     29.00   1971.00
D            43.00     50.00   1972.00

• The values for the new variable CASE_LBL are the variable names from the original file.

• Case A has system-missing values, since variable A had the string values Income, Price, and Year.

• The names of the variables in the new file are CASE_LBL, VAR001, VAR002, and VAR003.

Related Topics

FLIP
Overview (FLIP command)
VARIABLES Subcommand (FLIP command)
NEWNAMES Subcommand (FLIP command)


VARIABLES Subcommand (FLIP command)

FLIP (command),FLIP (command),FLIP (command)
VARIABLES subcommand,VARIABLES subcommand,VARIABLES subcommand
VARIABLES (subcommand),VARIABLES (subcommand),VARIABLES (subcommand)
FLIP command,FLIP command,FLIP command

VARIABLES names one or more variables (columns) to be transposed. The specified variables become observations (rows) in the new active dataset.

• The VARIABLES subcommand is optional. If it is not used, all variables are transposed.

• If the VARIABLES subcommand is specified, variables that are not named are discarded.

Example

Using the untransposed file from the previous example, the command

FLIP VARIABLES=A TO C.

transposes only variables A through C. Variable D is not transposed and is discarded from the active dataset. The LIST output for the transposed file is as follows:

CASE_LBL    VAR001    VAR002    VAR003

A              .         .         .
B            22.00     34.00   1970.00
C            31.00     29.00   1971.00

Related Topics

FLIP
Overview (FLIP command)
Example (FLIP command)
NEWNAMES Subcommand (FLIP command)


NEWNAMES Subcommand (FLIP command)

FLIP (command),FLIP (command),FLIP (command)
NEWNAMES subcommand,NEWNAMES subcommand,NEWNAMES subcommand
NEWNAMES (subcommand),NEWNAMES (subcommand),NEWNAMES (subcommand)
FLIP command,FLIP command,FLIP command

NEWNAMES specifies a variable whose values are used as the new variable names.

• The NEWNAMES subcommand is optional. If it is not used, the new variable names are either VAR001 to VARn, or the values of CASE_LBL if it exists.

• Only one variable can be specified on NEWNAMES.

• The variable specified on NEWNAMES does not become an observation (case) in the new active dataset, regardless of whether it is specified on the VARIABLES subcommand.

• If the variable specified is numeric, its values become a character string beginning with the prefixK_.

• Characters not allowed in variables names, such as blank spaces, are replaced with underscore (_) characters.

• If the variable’s values are not unique, unique variable names are created by appending a sequential suffix of the general form _A, _B, _C,..._AA, _AB, _AC,..._AAA, _AAB, _AAC,...etc.

Example

Using the untransposed file from the first example, the command

FLIP NEWNAMES=A.

uses the values for variable A as variable names in the new file. The LIST output for the transposed file is as follows:

CASE_LBL    INCOME     PRICE      YEAR

B            22.00     34.00   1970.00
C            31.00     29.00   1971.00
D            43.00     50.00   1972.00

• Variable A does not become an observation in the new file. The string values for A are converted to upper case.

The following command transposes this file back to a form resembling its original structure:

FLIP.

The LIST output for the transposed file is as follows:

CASE_LBL       B         C         D

INCOME     22.00     31.00     43.00
PRICE      34.00     29.00     50.00
YEAR     1970.00   1971.00   1972.00

• Since the NEWNAMES subcommand is not used, the values of CASE_LBL from the previous FLIP (B, C, and D) are used as variable names in the new file.

FLIP (command),FLIP (command),FLIP (command)
NEWNAMES subcommand,NEWNAMES subcommand,NEWNAMES subcommand
NEWNAMES (subcommand),NEWNAMES (subcommand),NEWNAMES (subcommand)
FLIP command,FLIP command,FLIP command
FLIP (command),FLIP (command),FLIP (command)
transposing cases and variables,transposing cases and variables,transposing cases and variables

• The values of CASE_LBL are now INCOME, PRICE, and YEAR.

Related Topics

FLIP
Overview (FLIP command)
Example (FLIP command)
VARIABLES Subcommand (FLIP command)


FORMATS

FORMATS (command),FORMATS (command),FORMATS (command)
FORMATS (command),FORMATS (command),FORMATS (command)
syntax chart,syntax chart,syntax chart
FORMATS varlist(format) [varlist...]

This command takes effect immediately. It does not read the active dataset or execute pending transformations. See the topic Command Order for more information.

Example

FORMATS SALARY (DOLLAR8) / HOURLY (DOLLAR7.2) / RAISE BONUS (PCT2).

Variable formats can also be specified from the Variable View tab.

Related Topics

Overview (FORMATS command)
Syntax Rules (FORMATS command)
Examples (FORMATS command)


Overview (FORMATS command)

output formats,output formats,output formats
custom currency,custom currency,custom currency
output formats,output formats,output formats
string variables,string variables,string variables
string variables,string variables,string variables
output formats,output formats,output formats

FORMATS changes variable print and write formats. In this program, print and write formats are output formats. Print formats, also called display formats, control the form in which values are displayed by a procedure or by the PRINT command; write formats control the form in which values are written by the WRITE command.

FORMATS changes both print and write formats. To change only print formats, use PRINT FORMATS. To change only write formats, use WRITE FORMATS. For information on assigning input formats during data definition, see DATA LIST.

For detailed information on available formats and specifications, see Variable Types and Formats.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is a variable list followed by a format specification in parentheses. All variables on the list receive the new format.

Operations Collapse Hide details

Operations

• Unlike most transformations, FORMATS takes effect as soon as it is encountered in the command sequence. Special attention should be paid to its position among commands. See the topic Command Order for more information.

• Variables not specified on FORMATS retain their current print and write formats in the active dataset. To see the current formats, use the DISPLAY command.

• The new formats are changed only in the active dataset and are in effect for the duration of the current session or until changed again with a FORMATS, PRINT FORMATS, or WRITE FORMATS command. Formats in the original data file (if one exists) are not changed unless the file is resaved with the SAVE or XSAVE command.

• New numeric variables created with transformation commands are assigned default print and write formats of F8.2 (or the format specified on the FORMAT subcommand of SET). The FORMATS command can be used to change the new variable’s print and write formats.

• For string variables, you can only use FORMATS to switch between A and AHEX formats, and the AHEX length must be exactly twice the A length. FORMATS cannot be used to change the length of string variables. To change the defined length of a string variable, use the ALTER TYPE command.

• If a numeric data value exceeds its width specification, the program attempts to display some value nevertheless. The program first rounds decimal values, then removes punctuation characters, then tries scientific notation, and finally, if there is still not enough space, produces asterisks indicating that a value is present but cannot be displayed in the assigned width.

Related Topics

FORMATS
Syntax Rules (FORMATS command)
Examples (FORMATS command)


Syntax Rules (FORMATS command)

• You can specify more than one variable or variable list, followed by a format in parentheses. Only one format can be specified after each variable list. For clarity, each set of specifications can be separated by a slash.

• You can use keyword TO to refer to consecutive variables in the active dataset.

• The specified width of a format must include enough positions to accommodate any punctuation characters such as decimal points, commas, dollar signs, or date and time delimiters. (This differs from assigning an input format on DATA LIST, where the program automatically expands the input format to accommodate punctuation characters in output.)

• Custom currency formats (CCw, CCw.d) must first be defined on the SET command before they can be used on FORMATS.

• For string variables, you can only use FORMATS to switch between A and AHEX formats.FORMATS cannot be used to change the length of string variables. To change the length of a string variable, declare a new variable of the desired length with the STRING command and then use COMPUTE to copy values from the existing string into the new variable.

Related Topics

FORMATS
Overview (FORMATS command)
Examples (FORMATS command)


Examples (FORMATS command)

Changing Formats for Multiple Variables

FORMATS SALARY (DOLLAR8) /HOURLY (DOLLAR7.2)
        /RAISE BONUS (PCT2).

• The print and write formats for SALARY are changed to DOLLAR format with eight positions, including the dollar sign and comma when appropriate. The value 11550 is displayed as $11,550. An eight-digit number would require a DOLLAR11 format: eight characters for the digits, two characters for commas, and one character for the dollar sign.

• The print and write formats for HOURLY are changed to DOLLAR format with seven positions, including the dollar sign, decimal point, and two decimal places. The value 115 is displayed as $115.00. If DOLLAR6.2 had been specified, the value 115 would be displayed as $115.0. The program would truncate the last 0 because a width of 6 is not enough to display the full value.

• The print and write formats for both RAISE and BONUS are changed to PCT with two positions: one position for the percentage and one position for the percent sign. The value 9 is displayed as 9%. Because the width allows for only two positions, the value 10 is displayed as 10, since the percent sign is truncated.

Changing Default Variable Formats

COMPUTE V3=V1 + V2.
FORMATS V3 (F3.1).

• COMPUTE creates the new numeric variable V3. By default, V3 is assigned an F8.2 format (or the default format specified on SET).

• FORMATS changes both the print and write formats for V3 to F3.1.

Working With Custom Currency Formats

SET CCA='-/-.Dfl ..-'.
FORMATS COST (CCA14.2).

• SET defines a European currency format for the custom currency format type CCA.

• FORMATS assigns format CCA to variable COST. With the format defined for CCA on SET, the value 37419 is displayed as Dfl 37.419,00. See the SET command for more information on custom currency formats.

Related Topics

FORMATS
Overview (FORMATS command)
Syntax Rules (FORMATS command)


FREQUENCIES

FREQUENCIES (command),FREQUENCIES (command),FREQUENCIES (command)
FREQUENCIES (command),FREQUENCIES (command),FREQUENCIES (command)
syntax chart,syntax chart,syntax chart

FREQUENCIES is available in the Statistics Base option.

FREQUENCIES VARIABLES=varlist [varlist...]

 [/FORMAT= [{NOTABLE }] [{AVALUE**}]
            {LIMIT(n)}   {DVALUE  }
                         {AFREQ   }
                         {DFREQ   }

 [/MISSING=INCLUDE]

 [/BARCHART=[MINIMUM(n)] [MAXIMUM(n)] [{FREQ(n)   }]]
                                       {PERCENT(n)}

 [/PIECHART=[MINIMUM(n)] [MAXIMUM(n)] [{FREQ   }] [{MISSING  }]]
                                       {PERCENT}   {NOMISSING}

 [/HISTOGRAM=[MINIMUM(n)] [MAXIMUM(n)] [{FREQ(n)   }] [{NONORMAL}] ]
                                                       {NORMAL  }

 [/GROUPED=varlist [{(width)        }]]
                    {(boundary list)}

 [/NTILES=n]

 [/PERCENTILES=value list]

 [/STATISTICS=[DEFAULT] [MEAN] [STDDEV] [MINIMUM] [MAXIMUM]
              [SEMEAN] [VARIANCE] [SKEWNESS] [SESKEW] [RANGE]
              [MODE] [KURTOSIS] [SEKURT] [MEDIAN] [SUM] [ALL]
                [NONE]]

 [/ORDER=[{ANALYSIS}] [{VARIABLE}]

** Default if subcommand is omitted or specified without keyword.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See FREQUENCIES Algorithms for computational details for this procedure.

Syntax for the FREQUENCIES command can be generated from the Frequencies dialog.

Example

FREQUENCIES VARIABLES = RACE.

Related Topics

Overview (FREQUENCIES command)
Examples (FREQUENCIES command)
VARIABLES Subcommand (FREQUENCIES command)
FORMAT Subcommand (FREQUENCIES command)
BARCHART Subcommand (FREQUENCIES command)
PIECHART Subcommand (FREQUENCIES command)
HISTOGRAM Subcommand (FREQUENCIES command)
GROUPED Subcommand (FREQUENCIES command)
PERCENTILES Subcommand (FREQUENCIES command)
NTILES Subcommand (FREQUENCIES command)
STATISTICS Subcommand (FREQUENCIES command)
MISSING Subcommand (FREQUENCIES command)
ORDER Subcommand (FREQUENCIES command)


Overview (FREQUENCIES command)

frequency tables,frequency tables,frequency tables
FREQUENCIES (command),FREQUENCIES (command),FREQUENCIES (command)
limitations,limitations,limitations

FREQUENCIES produces Frequency tables showing frequency counts and percentages of the values of individual variables. You can also use FREQUENCIES to obtain Statistics tables for categorical variables and to obtain Statistics tables and graphical displays for continuous variables.

Options Collapse Hide details

Options

Display Format. You can suppress tables and alter the order of values within tables using the FORMAT subcommand.

Statistical Display. Percentiles and ntiles are available for numeric variables with the PERCENTILES and NTILES subcommands. The following statistics are available with the STATISTICS subcommand: mean, median, mode, standard deviation, variance, skewness, kurtosis, and sum.

Plots. Histograms can be specified for numeric variables on the HISTOGRAM subcommand. Bar charts can be specified for numeric or string variables on the BARCHART subcommand.

Input Data. On the GROUPED subcommand, you can indicate whether the input data are grouped (or collapsed) so that a better estimate can be made of percentiles.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is the VARIABLES subcommand and the name of at least one variable. By default, FREQUENCIES produces a Frequency table.

Subcommand Order Collapse Hide details

Subcommand Order

Subcommands can be named in any order.

Syntax Rules Collapse Hide details

Syntax Rules

• You can specify multiple NTILES subcommands.

• BARCHART and HISTOGRAM are mutually exclusive.

• You can specify numeric variables (with or without decimal values) or string variables. Only the short-string portion of long-string variables are tabulated.

• Keyword ALL can be used on VARIABLES to refer to all user-defined variables in the active dataset.

Operations Collapse Hide details

Operations

• Variables are tabulated in the order they are mentioned on the VARIABLES subcommand.

• If a requested ntile or percentile cannot be calculated, a period (.) is displayed.

• FREQUENCIES dynamically builds the table, setting up one cell for each unique value encountered in the data.

Limitations Collapse Hide details

Limitations

• Maximum 1,000 variables total per FREQUENCIES command.

Related Topics

FREQUENCIES
Examples (FREQUENCIES command)
VARIABLES Subcommand (FREQUENCIES command)
FORMAT Subcommand (FREQUENCIES command)
BARCHART Subcommand (FREQUENCIES command)
PIECHART Subcommand (FREQUENCIES command)
HISTOGRAM Subcommand (FREQUENCIES command)
GROUPED Subcommand (FREQUENCIES command)
PERCENTILES Subcommand (FREQUENCIES command)
NTILES Subcommand (FREQUENCIES command)
STATISTICS Subcommand (FREQUENCIES command)
MISSING Subcommand (FREQUENCIES command)
ORDER Subcommand (FREQUENCIES command)


Examples (FREQUENCIES command)

Including a Statistics Table in the Output

FREQUENCIES
  VARIABLES=dept
  /PIECHART
  /ORDER=  ANALYSIS .

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

For discussion of output from this syntax and to place the example in context, see Using Frequencies to Study Nominal Data .

Suppressing the Frequency Tables in the Output

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

• The procedure produces a table of statistical summaries and a histogram for Amount of Last Sale.

• FORMAT suppresses the Frequency tables, which are not useful for continuous variables.

For discussion of output from this syntax and to place the example in context, see Using Frequencies to Study Scale Data .

Related Topics

FREQUENCIES
Overview (FREQUENCIES command)
VARIABLES Subcommand (FREQUENCIES command)
FORMAT Subcommand (FREQUENCIES command)
BARCHART Subcommand (FREQUENCIES command)
PIECHART Subcommand (FREQUENCIES command)
HISTOGRAM Subcommand (FREQUENCIES command)
GROUPED Subcommand (FREQUENCIES command)
PERCENTILES Subcommand (FREQUENCIES command)
NTILES Subcommand (FREQUENCIES command)
STATISTICS Subcommand (FREQUENCIES command)
MISSING Subcommand (FREQUENCIES command)
ORDER Subcommand (FREQUENCIES command)


VARIABLES Subcommand (FREQUENCIES command)

FREQUENCIES (command),FREQUENCIES (command),FREQUENCIES (command)
VARIABLES subcommand,VARIABLES subcommand,VARIABLES subcommand
VARIABLES (subcommand),VARIABLES (subcommand),VARIABLES (subcommand)
FREQUENCIES command,FREQUENCIES command,FREQUENCIES command

VARIABLES names the variables to be tabulated and is the only required subcommand.

Related Topics

FREQUENCIES
Overview (FREQUENCIES command)
Examples (FREQUENCIES command)
FORMAT Subcommand (FREQUENCIES command)
BARCHART Subcommand (FREQUENCIES command)
PIECHART Subcommand (FREQUENCIES command)
HISTOGRAM Subcommand (FREQUENCIES command)
GROUPED Subcommand (FREQUENCIES command)
PERCENTILES Subcommand (FREQUENCIES command)
NTILES Subcommand (FREQUENCIES command)
STATISTICS Subcommand (FREQUENCIES command)
MISSING Subcommand (FREQUENCIES command)
ORDER Subcommand (FREQUENCIES command)


FORMAT Subcommand (FREQUENCIES command)

frequency tables,frequency tables,frequency tables
format,format,format
FREQUENCIES (command),FREQUENCIES (command),FREQUENCIES (command)
FORMAT subcommand,FORMAT subcommand,FORMAT subcommand
FORMAT (subcommand),FORMAT (subcommand),FORMAT (subcommand)
FREQUENCIES command,FREQUENCIES command,FREQUENCIES command

FORMAT controls various features of the output, including order of categories and suppression of tables.

• The minimum specification is a single keyword.

• By default, FREQUENCIES displays the Frequency table and sort categories in ascending order of values for numeric variables and in alphabetical order for string variables.

Table Order

AVALUE (keyword),AVALUE (keyword),AVALUE (keyword)
FREQUENCIES command,FREQUENCIES command,FREQUENCIES command
FREQUENCIES (command),FREQUENCIES (command),FREQUENCIES (command)
display order,display order,display order
DVALUE (keyword),DVALUE (keyword),DVALUE (keyword)
FREQUENCIES command,FREQUENCIES command,FREQUENCIES command
AFREQ (keyword),AFREQ (keyword),AFREQ (keyword)
FREQUENCIES command,FREQUENCIES command,FREQUENCIES command
DFREQ (keyword),DFREQ (keyword),DFREQ (keyword)
FREQUENCIES command,FREQUENCIES command,FREQUENCIES command
AVALUE | Sort categories in ascending order of values (numeric variables) or in alphabetical order (string variables). This is the default.
DVALUE | Sort categories in descending order of values (numeric variables) or in reverse alphabetical order (string variables). This is ignored when HISTOGRAM, NTILES, or PERCENTILES is requested.
AFREQ | Sort categories in ascending order of frequency. This is ignored when HISTOGRAM, NTILES, or PERCENTILES is requested.
DFREQ | Sort categories in descending order of frequency. This is ignored when HISTOGRAM, NTILES, or PERCENTILES is requested.

Table Suppression

FREQUENCIES (command),FREQUENCIES (command),FREQUENCIES (command)
suppressing tables,suppressing tables,suppressing tables
LIMIT (keyword),LIMIT (keyword),LIMIT (keyword)
FREQUENCIES command,FREQUENCIES command,FREQUENCIES command
NOTABLE (keyword),NOTABLE (keyword),NOTABLE (keyword)
FREQUENCIES command,FREQUENCIES command,FREQUENCIES command
LIMIT(n) | Suppress frequency tables with more than n categories. The number of missing and valid cases and requested statistics are displayed for suppressed tables.
NOTABLE | Suppress all frequency tables. The number of missing and valid cases are displayed for suppressed tables. NOTABLE overrides LIMIT.

Related Topics

FREQUENCIES
Overview (FREQUENCIES command)
Examples (FREQUENCIES command)
VARIABLES Subcommand (FREQUENCIES command)
BARCHART Subcommand (FREQUENCIES command)
PIECHART Subcommand (FREQUENCIES command)
HISTOGRAM Subcommand (FREQUENCIES command)
GROUPED Subcommand (FREQUENCIES command)
PERCENTILES Subcommand (FREQUENCIES command)
NTILES Subcommand (FREQUENCIES command)
STATISTICS Subcommand (FREQUENCIES command)
MISSING Subcommand (FREQUENCIES command)
ORDER Subcommand (FREQUENCIES command)


BARCHART Subcommand (FREQUENCIES command)

FREQUENCIES (command),FREQUENCIES (command),FREQUENCIES (command)
BARCHART subcommand,BARCHART subcommand,BARCHART subcommand
BARCHART (subcommand),BARCHART (subcommand),BARCHART (subcommand)
FREQUENCIES command,FREQUENCIES command,FREQUENCIES command
bar charts,bar charts,bar charts
FREQUENCIES command,FREQUENCIES command,FREQUENCIES command
bar charts,bar charts,bar charts
interval width,interval width,interval width
bar charts,bar charts,bar charts
scale,scale,scale
FREQUENCIES (command),FREQUENCIES (command),FREQUENCIES (command)
charts,charts,charts

BARCHART produces a bar chart for each variable named on the VARIABLES subcommand. By default, the horizontal axis for each bar chart is scaled in frequencies, and the interval width is determined by the largest frequency count for the variable being plotted. Bar charts are labeled with value labels or with the value itself if no label is defined.

• The minimum specification is the BARCHART keyword, which generates default bar charts.

• BARCHART cannot be used with HISTOGRAM.

MINIMUM (keyword),MINIMUM (keyword),MINIMUM (keyword)
FREQUENCIES command,FREQUENCIES command,FREQUENCIES command
MAXIMUM (keyword),MAXIMUM (keyword),MAXIMUM (keyword)
FREQUENCIES command,FREQUENCIES command,FREQUENCIES command
FREQ (keyword),FREQ (keyword),FREQ (keyword)
FREQUENCIES command,FREQUENCIES command,FREQUENCIES command
MIN(n) | Lower bound below which values are not plotted.
MAX(n) | Upper bound above which values are not plotted.
FREQ(n) | Vertical axis scaled in frequencies, where optional n is the maximum. If n is not specified or if it is too small, FREQUENCIES chooses 5, 10, 20, 50, 100, 200, 500, 1000, 2000, and so forth, depending on the largest category. This is the default.
PERCENT(n) | Vertical axis scaled in percentages, where optional n is the maximum. If n is not specified or if it is too small, FREQUENCIES chooses 5, 10, 25, 50, or 100, depending on the frequency count for the largest category.

Producing a Basic Bar Chart

FREQUENCIES VARIABLES = RACE /BARCHART.

• FREQUENCIES produces a frequency table and the default bar chart for variable RACE.

Producing a Custom Bar Chart

FREQUENCIES VARIABLES = V1 V2 /BAR=MAX(10).

• FREQUENCIES produces a frequency table and bar chart with values through 10 for each of variables V1 and V2.

Related Topics

FREQUENCIES
Overview (FREQUENCIES command)
Examples (FREQUENCIES command)
VARIABLES Subcommand (FREQUENCIES command)
FORMAT Subcommand (FREQUENCIES command)
PIECHART Subcommand (FREQUENCIES command)
HISTOGRAM Subcommand (FREQUENCIES command)
GROUPED Subcommand (FREQUENCIES command)
PERCENTILES Subcommand (FREQUENCIES command)
NTILES Subcommand (FREQUENCIES command)
STATISTICS Subcommand (FREQUENCIES command)
MISSING Subcommand (FREQUENCIES command)
ORDER Subcommand (FREQUENCIES command)


PIECHART Subcommand (FREQUENCIES command)

FREQUENCIES (command),FREQUENCIES (command),FREQUENCIES (command)
BARCHART subcommand,BARCHART subcommand,BARCHART subcommand
BARCHART (subcommand),BARCHART (subcommand),BARCHART (subcommand)
FREQUENCIES command,FREQUENCIES command,FREQUENCIES command
bar charts,bar charts,bar charts
FREQUENCIES command,FREQUENCIES command,FREQUENCIES command
bar charts,bar charts,bar charts
interval width,interval width,interval width
bar charts,bar charts,bar charts
scale,scale,scale
FREQUENCIES (command),FREQUENCIES (command),FREQUENCIES (command)
charts,charts,charts

PIECHART produces a pie chart for each variable named on the VARIABLES subcommand. By default, one slice corresponds to each category defined by the variable with one slice representing all missing values. Pie charts are labeled with value labels or with the value if no label is defined.

• The minimum specification is the PIECHART keyword, which generates default pie charts.

• PIECHART can be requested together with either BARCHART or HISTOGRAM.

• FREQ and PERCENT are mutually exclusive. If both are specified, only the first specification is in effect.

• MISSING and NOMISSING are mutually exclusive. If both are specified, only the first specification is in effect.

MINIMUM (keyword),MINIMUM (keyword),MINIMUM (keyword)
FREQUENCIES command,FREQUENCIES command,FREQUENCIES command
MAXIMUM (keyword),MAXIMUM (keyword),MAXIMUM (keyword)
FREQUENCIES command,FREQUENCIES command,FREQUENCIES command
FREQ (keyword),FREQ (keyword),FREQ (keyword)
FREQUENCIES command,FREQUENCIES command,FREQUENCIES command
PERCENT (keyword),PERCENT (keyword),PERCENT (keyword)
FREQUENCIES command,FREQUENCIES command,FREQUENCIES command
MIN(n) | Lower bound below which values are not plotted.
MAX(n) | Upper bound above which values are not plotted.
FREQ | The pie charts are based on frequencies. Frequencies are displayed when you request values in the Chart Editor. This is the default.
PERCENT | The pie charts are based on percentage. Percentage is displayed when you request values in the Chart Editor.
MISSING | User-missing and system-missing values are treated as one category. This is the default. Specify INCLUDE on the MISSING subcommand to display system-missing and user-missing values as separate slices.
NOMISSING | Missing values are excluded from the chart. If you specify INCLUDE on the MISSING subcommand, each user-missing value is represented by one slice.

Producing a Basic Pie Chart

FREQUENCIES VARIABLES = RACE /PIECHART.

• FREQUENCIES produces a frequency table and the default pie chart for variable RACE.

Producing a Custom Pie Chart

FREQUENCIES VARIABLES = V1 V2 /PIE=MAX(10).

• For each variable V1 and V2, FREQUENCIES produces a frequency table and a pie chart with values through 10.

Related Topics

FREQUENCIES
Overview (FREQUENCIES command)
Examples (FREQUENCIES command)
VARIABLES Subcommand (FREQUENCIES command)
FORMAT Subcommand (FREQUENCIES command)
BARCHART Subcommand (FREQUENCIES command)
HISTOGRAM Subcommand (FREQUENCIES command)
GROUPED Subcommand (FREQUENCIES command)
PERCENTILES Subcommand (FREQUENCIES command)
NTILES Subcommand (FREQUENCIES command)
STATISTICS Subcommand (FREQUENCIES command)
MISSING Subcommand (FREQUENCIES command)
ORDER Subcommand (FREQUENCIES command)


HISTOGRAM Subcommand (FREQUENCIES command)

FREQUENCIES (command),FREQUENCIES (command),FREQUENCIES (command)
HISTOGRAM subcommand,HISTOGRAM subcommand,HISTOGRAM subcommand
HISTOGRAM (subcommand),HISTOGRAM (subcommand),HISTOGRAM (subcommand)
FREQUENCIES command,FREQUENCIES command,FREQUENCIES command
histograms,histograms,histograms
interval width,interval width,interval width
histograms,histograms,histograms
scale,scale,scale
histograms,histograms,histograms
FREQUENCIES command,FREQUENCIES command,FREQUENCIES command

HISTOGRAM displays a plot for each numeric variable named on the VARIABLES subcommand. By default, the horizontal axis of each histogram is scaled in frequencies and the interval width is determined by the largest frequency count of the variable being plotted.

• The minimum specification is the HISTOGRAM keyword, which generates default histograms.

• HISTOGRAM cannot be used with BARCHART.

MINIMUM (keyword),MINIMUM (keyword),MINIMUM (keyword)
FREQUENCIES command,FREQUENCIES command,FREQUENCIES command
MAXIMUM (keyword),MAXIMUM (keyword),MAXIMUM (keyword)
FREQUENCIES command,FREQUENCIES command,FREQUENCIES command
FREQ (keyword),FREQ (keyword),FREQ (keyword)
FREQUENCIES command,FREQUENCIES command,FREQUENCIES command
NORMAL (keyword),NORMAL (keyword),NORMAL (keyword)
FREQUENCIES command,FREQUENCIES command,FREQUENCIES command
histograms,histograms,histograms
with normal curve,with normal curve,with normal curve
NONORMAL (keyword),NONORMAL (keyword),NONORMAL (keyword)
FREQUENCIES command,FREQUENCIES command,FREQUENCIES command
MIN(n) | Lower bound below which values are not plotted.
MAX(n) | Upper bound above which values are not plotted.
FREQ(n) | Vertical axis scaled in frequencies, where optional n is the scale. If n is not specified or if it is too small, FREQUENCIES chooses 5, 10, 20, 50, 100, 200, 500, 1000, 2000, and so forth, depending on the largest category. This is the default.
NORMAL | Superimpose a normal curve. The curve is based on all valid values for the variable, including values excluded by MIN and MAX.
NONORMAL | Suppress the normal curve. This is the default.

Example

FREQUENCIES VARIABLES = V1 /HIST=NORMAL.

• FREQUENCIES requests a histogram with a superimposed normal curve.

Related Topics

FREQUENCIES
Overview (FREQUENCIES command)
Examples (FREQUENCIES command)
VARIABLES Subcommand (FREQUENCIES command)
FORMAT Subcommand (FREQUENCIES command)
BARCHART Subcommand (FREQUENCIES command)
PIECHART Subcommand (FREQUENCIES command)
GROUPED Subcommand (FREQUENCIES command)
PERCENTILES Subcommand (FREQUENCIES command)
NTILES Subcommand (FREQUENCIES command)
STATISTICS Subcommand (FREQUENCIES command)
MISSING Subcommand (FREQUENCIES command)
ORDER Subcommand (FREQUENCIES command)


GROUPED Subcommand (FREQUENCIES command)

FREQUENCIES (command),FREQUENCIES (command),FREQUENCIES (command)
GROUPED subcommand,GROUPED subcommand,GROUPED subcommand
GROUPED (subcommand),GROUPED (subcommand),GROUPED (subcommand)
FREQUENCIES command,FREQUENCIES command,FREQUENCIES command
percentiles,percentiles,percentiles
estimating from grouped data,estimating from grouped data,estimating from grouped data

When the values of a variable represent grouped or collapsed data, it is possible to estimate percentiles for the original, ungrouped data from the grouped data. The GROUPED subcommand specifies which variables have been grouped. It affects only the output from the PERCENTILES and NTILES subcommands and the MEDIAN statistic from the STATISTICS subcommand.

• Multiple GROUPED subcommands can be used on a single FREQUENCIES command. Multiple variable lists, separated by slashes, can appear on a single GROUPED subcommand.

• The variables named on GROUPED must have been named on the VARIABLES subcommand.

• The value or value list in the parentheses is optional. When it is omitted, the program treats the values of the variables listed on GROUPED as midpoints. If the values are not midpoints, they must first be recoded with the RECODE command.

• A single value in parentheses specifies the width of each grouped interval. The data values must be group midpoints, but there can be empty categories. For example, if you have data values of 10, 20, and 30 and specify an interval width of 5, the categories are 10 ± 2.5, 20 ± 2.5, and 30 ± 2.5. The categories 15 ± 2.5 and 25 ± 2.5 are empty.

• A value list in the parentheses specifies interval boundaries. The data values do not have to represent midpoints, but the lowest boundary must be lower than any value in the data. If any data values exceed the highest boundary specified (the last value within the parentheses), they will be assigned to an open-ended interval. In this case, some percentiles cannot be calculated.

Basic Example

RECODE AGE (1=15) (2=25) (3=35) (4=45) (5=55)
           (6=65) (7=75) (8=85) (9=95)
  /INCOME  (1=5)  (2=15) (3=25) (4=35) (5=45)
           (6=55) (7=65) (8=75) (9=100).

FREQUENCIES VARIABLES=AGE, SEX, RACE, INCOME
  /GROUPED=AGE, INCOME
  /PERCENTILES=5,25,50,75,95.

• The AGE and INCOME categories of 1, 2, 3, and so forth are recoded to category midpoints. Note that data can be recoded to category midpoints on any scale; here AGE is recoded in years, but INCOME is recoded in thousands of dollars.

• The GROUPED subcommand on FREQUENCIES allows more accurate estimates of the requested percentiles.

Specifying the Width of Each Grouped Interval

FREQUENCIES VARIABLES=TEMP
  /GROUPED=TEMP (0.5)
  /NTILES=10.

• The values of TEMP (temperature) in this example were recorded using an inexpensive thermometer whose readings are precise only to the nearest half degree.

• The observed values of 97.5, 98, 98.5, 99, and so on, are treated as group midpoints, smoothing out the discrete distribution. This yields more accurate estimates of the deciles.

Specifying Interval Boundaries

FREQUENCIES VARIABLES=AGE
  /GROUPED=AGE (17.5, 22.5, 27.5, 32.5, 37.5, 42.5, 47.5
                52.5, 57.5, 62.5, 67.5, 72.5, 77.5, 82.5)
  /PERCENTILES=5, 10, 25, 50, 75, 90, 95.

• The values of AGE in this example have been estimated to the nearest five years. The first category is 17.5 to 22.5, the second is 22.5 to 27.5, and so forth. The artificial clustering of age estimates at multiples of five years is smoothed out by treating AGE as grouped data.

• It is not necessary to recode the ages to category midpoints, since the interval boundaries are explicitly given.

Related Topics

FREQUENCIES
Overview (FREQUENCIES command)
Examples (FREQUENCIES command)
VARIABLES Subcommand (FREQUENCIES command)
FORMAT Subcommand (FREQUENCIES command)
BARCHART Subcommand (FREQUENCIES command)
PIECHART Subcommand (FREQUENCIES command)
HISTOGRAM Subcommand (FREQUENCIES command)
PERCENTILES Subcommand (FREQUENCIES command)
NTILES Subcommand (FREQUENCIES command)
STATISTICS Subcommand (FREQUENCIES command)
MISSING Subcommand (FREQUENCIES command)
ORDER Subcommand (FREQUENCIES command)


PERCENTILES Subcommand (FREQUENCIES command)

FREQUENCIES (command),FREQUENCIES (command),FREQUENCIES (command)
PERCENTILES subcommand,PERCENTILES subcommand,PERCENTILES subcommand
PERCENTILES (subcommand),PERCENTILES (subcommand),PERCENTILES (subcommand)
FREQUENCIES command,FREQUENCIES command,FREQUENCIES command
percentiles,percentiles,percentiles
FREQUENCIES command,FREQUENCIES command,FREQUENCIES command

PERCENTILES displays the value below which the specified percentage of cases falls. The desired percentiles must be explicitly requested. There are no defaults.

Example

FREQUENCIES VARIABLES = V1 /PERCENTILES=10 25 33.3 66.7 75.

• FREQUENCIES requests the values for percentiles 10, 25, 33.3, 66.7, and 75 for V1.

Related Topics

FREQUENCIES
Overview (FREQUENCIES command)
Examples (FREQUENCIES command)
VARIABLES Subcommand (FREQUENCIES command)
FORMAT Subcommand (FREQUENCIES command)
BARCHART Subcommand (FREQUENCIES command)
PIECHART Subcommand (FREQUENCIES command)
HISTOGRAM Subcommand (FREQUENCIES command)
GROUPED Subcommand (FREQUENCIES command)
NTILES Subcommand (FREQUENCIES command)
STATISTICS Subcommand (FREQUENCIES command)
MISSING Subcommand (FREQUENCIES command)
ORDER Subcommand (FREQUENCIES command)


NTILES Subcommand (FREQUENCIES command)

FREQUENCIES (command),FREQUENCIES (command),FREQUENCIES (command)
NTILES subcommand,NTILES subcommand,NTILES subcommand
NTILES (subcommand),NTILES (subcommand),NTILES (subcommand)
FREQUENCIES command,FREQUENCIES command,FREQUENCIES command

NTILES calculates the percentages that divide the distribution into the specified number of categories and displays the values below which the requested percentages of cases fall. There are no default ntiles.

• Multiple NTILES subcommands are allowed. Each NTILES subcommand generates separate percentiles. Any duplicate percentiles generated by different NTILES subcommands are consolidated in the output.

Basic Example

FREQUENCIES VARIABLES=V1 /NTILES=4.

• FREQUENCIES requests quartiles (percentiles 25, 50, and 75) for V1.

Working With Multiple NTILES Subcommands

FREQUENCIES VARIABLES=V1 /NTILES=4 /NTILES=10.

• The first NTILES subcommand requests percentiles 25, 50, and 75.

• The second NTILES subcommand requests percentiles 10 through 90 in increments of 10.

• The 50th percentile is produced by both specifications but is displayed only once in the output.

Related Topics

FREQUENCIES
Overview (FREQUENCIES command)
Examples (FREQUENCIES command)
VARIABLES Subcommand (FREQUENCIES command)
FORMAT Subcommand (FREQUENCIES command)
BARCHART Subcommand (FREQUENCIES command)
PIECHART Subcommand (FREQUENCIES command)
HISTOGRAM Subcommand (FREQUENCIES command)
GROUPED Subcommand (FREQUENCIES command)
PERCENTILES Subcommand (FREQUENCIES command)
STATISTICS Subcommand (FREQUENCIES command)
MISSING Subcommand (FREQUENCIES command)
ORDER Subcommand (FREQUENCIES command)


STATISTICS Subcommand (FREQUENCIES command)

FREQUENCIES (command),FREQUENCIES (command),FREQUENCIES (command)
STATISTICS subcommand,STATISTICS subcommand,STATISTICS subcommand
STATISTICS (subcommand),STATISTICS (subcommand),STATISTICS (subcommand)
FREQUENCIES command,FREQUENCIES command,FREQUENCIES command

STATISTICS controls the display of statistics. By default, cases with missing values are excluded from the calculation of statistics.

• The minimum specification is the keyword STATISTICS, which generates the mean, standard deviation, minimum, and maximum (these statistics are also produced by keyword DEFAULT).

MEAN (keyword),MEAN (keyword),MEAN (keyword)
FREQUENCIES command,FREQUENCIES command,FREQUENCIES command
mean,mean,mean
FREQUENCIES command,FREQUENCIES command,FREQUENCIES command
standard error of the mean,standard error of the mean,standard error of the mean
FREQUENCIES command,FREQUENCIES command,FREQUENCIES command
SEMEAN (keyword),SEMEAN (keyword),SEMEAN (keyword)
FREQUENCIES command,FREQUENCIES command,FREQUENCIES command
MEDIAN (keyword),MEDIAN (keyword),MEDIAN (keyword)
FREQUENCIES command,FREQUENCIES command,FREQUENCIES command
median,median,median
FREQUENCIES command,FREQUENCIES command,FREQUENCIES command
MODE (keyword),MODE (keyword),MODE (keyword)
FREQUENCIES command,FREQUENCIES command,FREQUENCIES command
mode,mode,mode
FREQUENCIES command,FREQUENCIES command,FREQUENCIES command
STDDEV (keyword),STDDEV (keyword),STDDEV (keyword)
FREQUENCIES command,FREQUENCIES command,FREQUENCIES command
standard deviation,standard deviation,standard deviation
FREQUENCIES command,FREQUENCIES command,FREQUENCIES command
VARIANCE (keyword),VARIANCE (keyword),VARIANCE (keyword)
FREQUENCIES command,FREQUENCIES command,FREQUENCIES command
variance,variance,variance
FREQUENCIES command,FREQUENCIES command,FREQUENCIES command
skewness,skewness,skewness
FREQUENCIES command,FREQUENCIES command,FREQUENCIES command
SKEWNESS (keyword),SKEWNESS (keyword),SKEWNESS (keyword)
FREQUENCIES command,FREQUENCIES command,FREQUENCIES command
SESKEW (keyword),SESKEW (keyword),SESKEW (keyword)
FREQUENCIES command,FREQUENCIES command,FREQUENCIES command
kurtosis,kurtosis,kurtosis
FREQUENCIES command,FREQUENCIES command,FREQUENCIES command
KURTOSIS (keyword),KURTOSIS (keyword),KURTOSIS (keyword)
FREQUENCIES command,FREQUENCIES command,FREQUENCIES command
SEKURT (keyword),SEKURT (keyword),SEKURT (keyword)
FREQUENCIES command,FREQUENCIES command,FREQUENCIES command
RANGE (keyword),RANGE (keyword),RANGE (keyword)
FREQUENCIES command,FREQUENCIES command,FREQUENCIES command
range,range,range
FREQUENCIES command,FREQUENCIES command,FREQUENCIES command
MINIMUM (keyword),MINIMUM (keyword),MINIMUM (keyword)
FREQUENCIES command,FREQUENCIES command,FREQUENCIES command
minimum,minimum,minimum
FREQUENCIES command,FREQUENCIES command,FREQUENCIES command
MAXIMUM (keyword),MAXIMUM (keyword),MAXIMUM (keyword)
FREQUENCIES command,FREQUENCIES command,FREQUENCIES command
maximum,maximum,maximum
FREQUENCIES command,FREQUENCIES command,FREQUENCIES command
SUM (keyword),SUM (keyword),SUM (keyword)
FREQUENCIES command,FREQUENCIES command,FREQUENCIES command
sum,sum,sum
FREQUENCIES command,FREQUENCIES command,FREQUENCIES command
DEFAULT (keyword),DEFAULT (keyword),DEFAULT (keyword)
FREQUENCIES command,FREQUENCIES command,FREQUENCIES command
ALL (keyword),ALL (keyword),ALL (keyword)
FREQUENCIES command,FREQUENCIES command,FREQUENCIES command
NONE (keyword),NONE (keyword),NONE (keyword)
FREQUENCIES command,FREQUENCIES command,FREQUENCIES command
MEAN | Mean.
SEMEAN | Standard error of the mean.
MEDIAN | Median. Ignored when AFREQ or DFREQ are specified on the FORMAT subcommand.
MODE | Mode. If there is more than one mode, only the first mode is displayed.
STDDEV | Standard deviation.
VARIANCE | Variance.
SKEWNESS | Skewness.
SESKEW | Standard error of the skewness statistic.
KURTOSIS | Kurtosis.
SEKURT | Standard error of the kurtosis statistic.
RANGE | Range.
MINIMUM | Minimum.
MAXIMUM | Maximum.
SUM | Sum.
DEFAULT | Mean, standard deviation, minimum, and maximum.
ALL | All available statistics.
NONE | No statistics.

Specifying a Particular Statistic

FREQUENCIES VARIABLES = AGE /STATS=MODE.

• STATISTICS requests the mode of AGE.

Including the Default Statistics

FREQUENCIES VARIABLES = AGE /STATS=DEF MODE.

• STATISTICS requests the default statistics (mean, standard deviation, minimum, and maximum) plus the mode of AGE.

Related Topics

FREQUENCIES
Overview (FREQUENCIES command)
Examples (FREQUENCIES command)
VARIABLES Subcommand (FREQUENCIES command)
FORMAT Subcommand (FREQUENCIES command)
BARCHART Subcommand (FREQUENCIES command)
PIECHART Subcommand (FREQUENCIES command)
HISTOGRAM Subcommand (FREQUENCIES command)
GROUPED Subcommand (FREQUENCIES command)
PERCENTILES Subcommand (FREQUENCIES command)
NTILES Subcommand (FREQUENCIES command)
MISSING Subcommand (FREQUENCIES command)
ORDER Subcommand (FREQUENCIES command)


MISSING Subcommand (FREQUENCIES command)

FREQUENCIES (command),FREQUENCIES (command),FREQUENCIES (command)
MISSING subcommand,MISSING subcommand,MISSING subcommand
MISSING (subcommand),MISSING (subcommand),MISSING (subcommand)
FREQUENCIES command,FREQUENCIES command,FREQUENCIES command

By default, both user-missing and system-missing values are labeled as missing in the table but are not included in the valid and cumulative percentages, in the calculation of descriptive statistics, or in charts and histograms.

INCLUDE (keyword),INCLUDE (keyword),INCLUDE (keyword)
FREQUENCIES command,FREQUENCIES command,FREQUENCIES command
INCLUDE Include cases with user-missing values. Cases with user-missing values are included in statistics and plots.

Related Topics

FREQUENCIES
Overview (FREQUENCIES command)
Examples (FREQUENCIES command)
VARIABLES Subcommand (FREQUENCIES command)
FORMAT Subcommand (FREQUENCIES command)
BARCHART Subcommand (FREQUENCIES command)
PIECHART Subcommand (FREQUENCIES command)
HISTOGRAM Subcommand (FREQUENCIES command)
GROUPED Subcommand (FREQUENCIES command)
PERCENTILES Subcommand (FREQUENCIES command)
NTILES Subcommand (FREQUENCIES command)
STATISTICS Subcommand (FREQUENCIES command)
ORDER Subcommand (FREQUENCIES command)


ORDER Subcommand (FREQUENCIES command)

You can organize your output by variable or by analysis. Frequencies output that is organized by analysis has a single statistics table for all variables. Output organized by variable has a statistics table and a frequency table for each variable.

ANALYSIS | Organize output by analysis. Displays a single statistics table for all variables. This is the default.
VARIABLE | Organize output by variable. Displays a statistics table and a frequency table for each variable.

Related Topics

FREQUENCIES
Overview (FREQUENCIES command)
Examples (FREQUENCIES command)
VARIABLES Subcommand (FREQUENCIES command)
FORMAT Subcommand (FREQUENCIES command)
BARCHART Subcommand (FREQUENCIES command)
PIECHART Subcommand (FREQUENCIES command)
HISTOGRAM Subcommand (FREQUENCIES command)
GROUPED Subcommand (FREQUENCIES command)
PERCENTILES Subcommand (FREQUENCIES command)
NTILES Subcommand (FREQUENCIES command)
STATISTICS Subcommand (FREQUENCIES command)
MISSING Subcommand (FREQUENCIES command)


GENLIN

GENLIN (command),GENLIN (command),GENLIN (command)
GENLIN (command),GENLIN (command),GENLIN (command)
syntax chart,syntax chart,syntax chart
release history,release history,release history
Generalized Linear Models,Generalized Linear Models,Generalized Linear Models
command syntax,command syntax,command syntax
Generalized Estimating Equations,Generalized Estimating Equations,Generalized Estimating Equations
command syntax,command syntax,command syntax

GENLIN is available in the Advanced Statistics option.

Note: Equals signs (=) used in the syntax chart are required elements. All subcommands are optional.

GENLIN
    {dependent-var  [(REFERENCE = {LAST**})] [(ORDER = {ASCENDING**})]}
                                  {FIRST }             {DESCENDING }
                                  {value }             {DATA       }

    {events-var OF {trials-var}                                       }
                   {n         }

    [BY factor-list [(ORDER = {ASCENDING**})]]
                              {DESCENDING }
                              {DATA       }

    [WITH covariate-list]

[/MODEL  [effect-list]    [INTERCEPT = {YES**}]
                                       {NO   }

    [OFFSET = {variable}]    [SCALEWEIGHT = variable]
              {value   }

    [DISTRIBUTION = {BINOMIAL        }]
                    {GAMMA           }
                    {IGAUSS          }
                    {MULTINOMIAL     }
                    {NEGBIN ({1**  })}
                             {value}
                             {MLE  }
                    {NORMAL          }
                    {POISSON         }
                    {TWEEDIE (value) }

    [LINK = {CLOGLOG         }]]
            {IDENTITY        }
            {LOG             }
            {LOGC            }
            {LOGIT           }
            {NEGBIN          }
            {NLOGLOG         }
            {ODDSPOWER(value)}
            {POWER(value)    }
            {PROBIT          }
            {CUMCAUCHIT      }
            {CUMCLOGLOG      }
            {CUMLOGIT        }
            {CUMNLOGLOG      }
            {CUMPROBIT       }

[/CRITERIA  [ANALYSISTYPE = {3**} [({WALD**})]   [CHECKSEP = {20**}]
                            {1  }   {LR    }                 {n   }
                            {ALL}

    [CILEVEL = {95** }]    [CITYPE = {WALD**              }]
               {value}               {PROFILE [({1E-4**})]}
                                                {value }

    [COVB = {MODEL**}]     [HCONVERGE = {0**  } [({ABSOLUTE**})]]
            {ROBUST }                   {value}   {RELATIVE  }

    [INITIAL = {number-list [NEGBIN({1**  })]}]
                                    {value}
               {'savfile' | 'dataset'        }

    [LCONVERGE = {0**  } [({ABSOLUTE**})]]    [LIKELIHOOD = {FULL**}]
                 {value}   {RELATIVE  }                     {KERNEL}

    [MAXITERATIONS = {100**}]    [MAXSTEPHALVING = {5**}]
                    {n    }                        {n  }

    [METHOD = {FISHER ({1**})}]
                       {n  }
              {NEWTON        }

    [PCONVERGE = {1E-6**} [({ABSOLUTE**})]]
                 {value }   {RELATIVE  }

    [SCALE = {MLE**   }]
             {DEVIANCE}
             {PEARSON }
             {1**     }
             {value   }

    [SINGULAR = {1E-12**}]]
                {value  }

[/REPEATED SUBJECT = variable [* variable...]

    [WITHINSUBJECT = variable [* variable...]]

    [SORT = {YES**}]
            {NO   }

    [CORRTYPE = {INDEPENDENT**      }]
                {AR(1)              }
                {EXCHANGEABLE       }
                {FIXED (number-list)}
                {MDEPENDENT (n)     }
                {UNSTRUCTURED       }

    [ADJUSTCORR = {YES**}]
                  {NO   }

    [COVB = {ROBUST**}]
            {MODEL   }

    [HCONVERGE = {0**  }]
                 {value}

    [MAXITERATIONS = {100**}]
                     {n    }

    [PCONVERGE = {1E-6**} [({ABSOLUTE**})]]
                 {value }   {RELATIVE  }

    [UPDATECORR = {1**}]]
                  {n  }

[/EMMEANS [TABLES = factor [* factor ...]]

    [CONTROL = variable (value) [variable (value) ...]]

    [SCALE = {ORIGINAL** }]
             {TRANSFORMED}

    [COMPARE = factor [* factor ...]]

    [CONTRAST = {PAIRWISE**                }]
                {DEVIATION                 }
                {DIFFERENCE                }
                {HELMERT                   }
                {POLYNOMIAL ({1,2,3,...**})}
                             {number-list}
                {REPEATED                  }
                {SIMPLE   (value)          }

    [PADJUST = {LSD**        }]
               {BONFERRONI   }
               {SEQBONFERRONI}
               {SIDAK        }
               {SEQSIDAK     }

[/EMMEANS...]

[/MISSING CLASSMISSING = {EXCLUDE**}]
                         {INCLUDE  }

[/PRINT  [CORB] [COVB] [CPS**] [FIT**] [GEF] [HISTORY[({1**})]]
                                                       {n  }
        [LAGRANGE] [LMATRIX] [MODELINFO**] [SOLUTION**[(EXPONENTIATED)]]
        [SUMMARY**] [DESCRIPTIVES**] [WORKINGCORR] [NONE]]

[/SAVE [XBPRED[({varname             })]] [XBSTDERROR[({varname             })]]
                {rootname[:{25**   }]}                 {rootname[:{25**   }]}
                           {integer}                             {integer}
       [MEANPRED[({varname           })]]
                {rootname[:{25**   }]}
                           {integer}
       [CIMEANPREDL[({varname             })]] CIMEANPREDU[({varname)            })]]
                     {rootname[:{25**   }]}                 {rootname[:{25**   }]}
                                {integer}                              {integer}
       [PREDVAL[(varname)]]  [LEVERAGE[(varname)]]  [RESID[(varname)]]
       [PEARSONRESID[(varname)]] [DEVIANCERESID[(varname)]]
       [STDPEARSONRESID[(varname)]]  [STDDEVIANCERESID[(varname)]]
       [LIKELIHOODRESID[(varname)]]  [COOK[(varname)]]

/OUTFILE  {CORB = 'savfile' | 'dataset'}  {MODEL = 'file'    }
          {COVB = 'savfile' | 'dataset'}  {PARAMETER = 'file'}

** Default if the subcommand or keyword is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See GENLIN Algorithms for computational details for this procedure.

Syntax for the GENLIN command can be generated from the Generalized Linear Models Response dialog.

Release History Collapse Hide details

Release History

Release 15.0

• Command introduced.

Release 16.0

• Added multinomial and tweedie distributions; added MLE estimation option for ancillary parameter of negative binomial distribution (MODEL subcommand, DISTRIBUTION keyword). Notes related to the addition of the new distributions added throughout.

• Added cumulative Cauchit, cumulative complementary log-log, cumulative logit, cumulative negative log-log, and cumulative probit link functions (MODEL subcommand, LINK keyword).

• Added likelihood-ratio chi-square statistics as an alternative to Wald statistics (CRITERIA subcommand, ANALYSISTYPE keyword).

• Added profile likelihood confidence intervals as an alternative to Wald confidence intervals (CRITERIA subcommand, CITYPE keyword).

• Added option to specify initial value for ancillary parameter of negative binomial distribution (CRITERIA subcommand, INITIAL keyword).

• Changed default display of the likelihood function for GEEs to show the full value instead of the kernel (CRITERIA subcommand, LIKELIHOOD keyword).

Example

GENLIN mydepvar BY a b c WITH x y z
  /MODEL a b c x y z.

Related Topics

Overview (GENLIN command)
Examples (GENLIN command)
Variable List (GENLIN command)
MODEL Subcommand (GENLIN command)
CRITERIA Subcommand (GENLIN command)
REPEATED Subcommand (GENLIN command)
EMMEANS Subcommand (GENLIN command)
MISSING Subcommand (GENLIN command)
PRINT Subcommand (GENLIN command)
SAVE Subcommand (GENLIN command)
OUTFILE Subcommand (GENLIN command)


Overview (GENLIN command)

The GENLIN procedure fits the generalized linear model and generalized estimating equations.

The generalized linear model includes one dependent variable and usually one or more independent effects. Subjects are assumed to be independent. The generalized linear model covers not only widely used statistical models such as linear regression for normally distributed responses, logistic models for binary data, and loglinear models for count data, but also many other statistical models via its very general model formulation. However, the independence assumption prohibits the model from being applied to correlated data.

Generalized estimating equations extend the generalized linear model to correlated longitudinal data and clustered data. More particularly, generalized estimating equations model correlations within subjects. Data across subjects are still assumed independent.

Options Collapse Hide details

Options

Independence Assumption. The GENLIN procedure fits either the generalized linear model assuming independence across subjects, or generalized estimating equations assuming correlated measurements within subjects but independence across subjects.

Events/Trials Specification for Binomial Distribution. The typical dependent variable specification will be a single variable, but for the binomial distribution the dependent variable may be specified using a number-of-events variable and a number-of-trials variable. Alternatively, if the number of trials is the same across all subjects, then trials may be specified using a fixed number instead of a variable.

Probability Distribution of Dependent Variable. The probability distribution of the dependent variable may be specified as normal, binomial, gamma, inverse Gaussian, multinomial, negative binomial, Poisson, or Tweedie.

Link Function. GENLIN offers the following link functions: Identity, complementary log-log, log, log-complement, logit, negative binomial, negative log-log, odds power, power, and probit. For the multinomial distribution, the following link functions are available: cumulative Cauchit, cumulative complementary log-log, cumulative logit, cumulative negative log-log, and cumulative probit.

Correlation Structure for Generalized Estimating Equations. When measurements within subjects are assumed correlated, the correlation structure may be specified as independent, AR(1), exchangeable, fixed, m-dependent, or unstructured.

Estimated Marginal Means. Estimated marginal means may be computed for one or more crossed factors and may be based on either the response or the linear predictor.

Basic Specification Collapse Hide details

Basic Specification

• The basic specification is a MODEL subcommand with one or more model effects and a variable list identifying the dependent variable, the factors (if any), and the covariates (if any).

• If the MODEL subcommand is not specified, or is specified with no model effects, then the default model is the intercept-only model using the normal distribution and identity link.

• If the REPEATED subcommand is not specified, then subjects are assumed to be independent.

• If the REPEATED subcommand is specified, then generalized estimating equations, which model correlations within subjects, are fit. By default, generalized estimating equations use the independent correlation structure.

• The basic specification displays default output, including a case processing summary table, variable information, model information, goodness of fit statistics, model summary statistics, and parameter estimates and related statistics.

Syntax Rules Collapse Hide details

Syntax Rules

• The dependent variable, or an events/trials specification is required. All other variables and subcommands are optional.

• It is invalid to specify a dependent variable and an events/trials specification in the same GENLIN command.

• Multiple EMMEANS subcommands may be specified; each is treated independently. All other subcommands may be specified only once.

• The EMMEANS subcommand may be specified without options. All other subcommands must be specified with options.

• Each keyword may be specified only once within a subcommand.

• The command name, all subcommand names, and all keywords must be spelled in full.

• Subcommands may be specified in any order.

• Within subcommands, keyword settings may be specified in any order.

• The following variables, if specified, must be numeric: events and trials variables, covariates, OFFSET variable, and SCALEWEIGHT variable. The following, if specified, may be numeric or string variables: the dependent variable, factors, SUBJECT variables, and WITHINSUBJECT variables.

• All variables must be unique within and across the following variables or variable lists: the dependent variable, events variable, trials variable, factor list, covariate list, OFFSET variable, and SCALEWEIGHT variable.

• The dependent variable, events variable, trials variable, and covariates may not be specified as SUBJECT or WITHINSUBJECT variables.

• SUBJECT variables may not be specified as WITHINSUBJECT variables.

• The minimum syntax is a dependent variable. This specification fits an intercept-only model.

Case Frequency Collapse Hide details

Case Frequency

• If an WEIGHT variable is specified, then its values are used as frequency weights by the GENLIN procedure.

• Weight values are rounded to the nearest whole numbers before use. For example, 0.5 is rounded to 1, and 2.4 is rounded to 2.

• The WEIGHT variable may not be specified on any subcommand in the GENLIN procedure.

• Cases with missing weights or weights less than 0.5 are not used in the analyses.

Related Topics

GENLIN
Examples (GENLIN command)
Variable List (GENLIN command)
MODEL Subcommand (GENLIN command)
CRITERIA Subcommand (GENLIN command)
REPEATED Subcommand (GENLIN command)
EMMEANS Subcommand (GENLIN command)
MISSING Subcommand (GENLIN command)
PRINT Subcommand (GENLIN command)
SAVE Subcommand (GENLIN command)
OUTFILE Subcommand (GENLIN command)


Examples (GENLIN command)

Poisson Regression

* Generalized Linear Models.
GENLIN damage_incidents BY type construction operation (ORDER=DESCENDING)
  /MODEL type construction operation  INTERCEPT=YES  OFFSET=log_months_service
    DISTRIBUTION=POISSON LINK=LOG
  /CRITERIA METHOD=FISHER(1) SCALE=PEARSON COVB=MODEL MAXITERATIONS=100
    MAXSTEPHALVING=5 PCONVERGE=1E-006(ABSOLUTE) SINGULAR=1E-012
    ANALYSISTYPE=3(WALD) CILEVEL=95 CITYPE=WALD LIKELIHOOD=FULL
  /EMMEANS TABLES=type SCALE=TRANSFORMED COMPARE=type CONTRAST=PAIRWISE
    PADJUST=SEQSIDAK
  /EMMEANS TABLES=construction SCALE=TRANSFORMED COMPARE=construction
    CONTRAST=PAIRWISE PADJUST=SEQSIDAK
  /MISSING CLASSMISSING=EXCLUDE
  /PRINT CPS DESCRIPTIVES MODELINFO FIT SUMMARY SOLUTION
  /SAVE XBPRED STDDEVIANCERESID.

• The procedure fits a model for the dependent variable damage_incidents, using type, construction, and operation as factors.

• The model specification assumes that damage_incidents has a Poisson distribution. A log link function relates the distribution of damage_incidents to a linear combination of the predictors, including an intercept term, and an offset equal to the values log_months_service.

• The Pearson chi-square method is used to estimate the scale parameter. All other model fitting criteria are set to their default values.

• Estimated marginal means are computed on the scale of the linear predictor for type and construction using pairwise contrasts. The sequential Sidak method for multiple comparisons is used to adjust p-values.

• Print outputs are set to their default values.

• The model-estimated values of the linear predictor and the standardized deviance residual are saved to the active dataset.

For discussion of output from this syntax and to place the example in context, see Using Poisson Regression to Analyze Ship Damage Rates (Generalized Linear Models).

Gamma Regression

* Generalized Linear Models.
GENLIN claimamt BY holderage vehiclegroup vehicleage (ORDER=DESCENDING)
  /MODEL holderage vehiclegroup vehicleage  INTERCEPT=YES
    SCALEWEIGHT=nclaims DISTRIBUTION=GAMMA LINK=POWER(-1)
  /CRITERIA METHOD=FISHER(1) SCALE=PEARSON COVB=MODEL MAXITERATIONS=100
    MAXSTEPHALVING=5 PCONVERGE=1E-006(ABSOLUTE) SINGULAR=1E-012
    ANALYSISTYPE=3(WALD) CILEVEL=95 CITYPE=WALD LIKELIHOOD=FULL
  /EMMEANS TABLES=holderage SCALE=ORIGINAL COMPARE=holderage
    CONTRAST=REPEATED PADJUST=SEQSIDAK
  /EMMEANS TABLES=vehiclegroup SCALE=ORIGINAL COMPARE=vehiclegroup
    CONTRAST=PAIRWISE PADJUST=SEQSIDAK
  /EMMEANS TABLES=vehicleage SCALE=ORIGINAL COMPARE=vehicleage
    CONTRAST=REPEATED PADJUST=SEQSIDAK
  /MISSING CLASSMISSING=EXCLUDE
  /PRINT CPS DESCRIPTIVES MODELINFO FIT SUMMARY SOLUTION
  /SAVE XBPRED STDDEVIANCERESID.

• The procedure fits a model for the dependent variable claimamt, using holderage, vehiclegroup, and vehicleage as factors. The category order for all factors is descending values of factor levels.

• The model specification assumes that claimamt has a gamma distribution. A power link function with -1 as the exponent relates the distribution of claimamt to a linear combination of the predictors (including an intercept term).

• The Pearson chi-square method is used to estimate the scale parameter, with nclaims providing scale weights. All other model fitting criteria are set to their default values.

• Estimated marginal means are computed for holderage, using repeated contrasts; vehiclegroup, using pairwise contrasts; and vehicleage, using repeated contrasts. All tests are adjusted using the sequential Sidak method.

• Print outputs are set to their default values.

• The model-estimated values of the linear predictor and the standardized deviance residual are saved to the active dataset.

For discussion of output from this syntax and to place the example in context, see Fitting a Gamma Regression to Car Insurance Claims (Generalized Linear Models).

Complementary Log-log Regression for Interval-Censored Survival Data

* Generalized Linear Models.
GENLIN result2 (REFERENCE=FIRST) BY id duration treatment period
    (ORDER=DESCENDING) WITH age
  /MODEL period duration treatment age  INTERCEPT=NO
    DISTRIBUTION=BINOMIAL LINK=CLOGLOG
  /CRITERIA METHOD=FISHER(1) SCALE=1 COVB=MODEL MAXITERATIONS=100
    MAXSTEPHALVING=5 PCONVERGE=1E-006(ABSOLUTE) SINGULAR=1E-012
    ANALYSISTYPE=3(WALD) CILEVEL=95 CITYPE=WALD LIKELIHOOD=FULL
  /MISSING CLASSMISSING=EXCLUDE
  /PRINT CPS DESCRIPTIVES MODELINFO FIT SUMMARY SOLUTION.

• The procedure fits a model for the dependent variable result2, using id as a factor to determine subpopulations and duration, treatment, and period as factors to predict values, with age as a covariate. The first category of result2 is used as the reference category, and the category order for all factors is descending values of factor levels.

• The model specification assumes that result2 has a binomial distribution. A complementary log-log link function relates the probability of result2 to a linear combination of the predictors, excluding an intercept term.

• Model fitting criteria and print output are set to their default values.

For discussion of output from this syntax and to place the example in context, see Analyzing Interval-Censored Survival Data (Generalized Linear Models).

Repeated Measures Logistic Regression (Generalized Estimating Equation)

* Generalized Estimating Equations.
GENLIN
    wheeze (REFERENCE=LAST) BY age smoker (ORDER=ASCENDING)
  /MODEL age smoker   INTERCEPT=YES
    DISTRIBUTION=BINOMIAL LINK=LOGIT
  /CRITERIA METHOD=FISHER(1) SCALE=1 MAXITERATIONS=100 MAXSTEPHALVING=5
    PCONVERGE=1E-006(ABSOLUTE) SINGULAR=1E-012 ANALYSISTYPE=3(WALD)
    CILEVEL=95
  /REPEATED SUBJECT=id WITHINSUBJECT=age SORT=YES CORRTYPE=UNSTRUCTURED
    ADJUSTCORR=YES COVB=ROBUST MAXITERATIONS=100 PCONVERGE=1e-006(ABSOLUTE)
    UPDATECORR=1
  /MISSING CLASSMISSING=EXCLUDE
  /PRINT CPS DESCRIPTIVES MODELINFO FIT SUMMARY SOLUTION WORKINGCORR.

• The procedure fits a model for the dependent variable wheeze, using smoker and age as factors. The first category of wheeze is used as the reference category.

• The model specification assumes that wheeze has a binomial distribution. A logit link function relates the probability of wheeze to a linear combination of the predictors, including an intercept term.

• Clusters of correlated observations are defined by values of the subject variable id. Repeated measurements are ordered within subjects by values of age. An unstructured working correlation matrix is estimated.

• Model fitting criteria are set to their default values.

• The working correlation matrix is requested as output in addition to the default output.

For discussion of output from this syntax and to place the example in context, see Using Generalized Estimating Equations to Fit a Repeated Measures Logistic Regression.

Related Topics

GENLIN
Overview (GENLIN command)
Variable List (GENLIN command)
MODEL Subcommand (GENLIN command)
CRITERIA Subcommand (GENLIN command)
REPEATED Subcommand (GENLIN command)
EMMEANS Subcommand (GENLIN command)
MISSING Subcommand (GENLIN command)
PRINT Subcommand (GENLIN command)
SAVE Subcommand (GENLIN command)
OUTFILE Subcommand (GENLIN command)


Variable List (GENLIN command)

GENLIN (command),GENLIN (command),GENLIN (command)
variable list,variable list,variable list
variable list,variable list,variable list
GENLIN command,GENLIN command,GENLIN command

The GENLIN command variable list specifies the dependent variable using either a single variable or events and trials variables. Alternatively, the number of trials may be specified as a fixed number. The variable list also specifies any factors and covariates.

If an events/trials specification is used for the dependent variable, then the GENLIN procedure automatically computes the ratio of the events variable over the trials variable or number. Technically, the procedure treats the events variable as the dependent variable in the sense that predicted values and residuals are based on the events variable rather than the events/trials ratio.

• The first specification on GENLIN must be a single dependent variable name or an events/trials specification.

• If the dependent variable is specified as a single variable, then it may be scale, an integer-valued count variable, binary, or ordinal.

• If the dependent variable is binary, then it may be numeric or string and there may be only two distinct valid data values.

• If the dependent variable is categorical, then it may be numeric or string and must have at least two distinct valid data values.

• If the dependent variable is not binary or categorical, then it must be numeric.

• The REFERENCE keyword specifies the dependent variable value to use as the reference category for parameter estimation. No model parameters are assigned to the reference category.

REFERENCE (keyword),REFERENCE (keyword),REFERENCE (keyword)
GENLIN command,GENLIN command,GENLIN command
LAST (keyword),LAST (keyword),LAST (keyword)
GENLIN command,GENLIN command,GENLIN command
FIRST (keyword),FIRST (keyword),FIRST (keyword)
GENLIN command,GENLIN command,GENLIN command
REFERENCE = LAST
 | The last dependent variable value is the reference category. The last dependent variable value is defined based on the ascending order of the data values. This is the default.
 | If REFERENCE = LAST, then the procedure models the first value as the response, treating the last value as the reference category.
REFERENCE = FIRST
 | The first dependent variable value is the reference category. The first dependent variable value is defined based on the ascending order of the data values.
 | If REFERENCE = FIRST, then the procedure models the last value as the response, treating the first value as the reference category.
REFERENCE = value
 | The specified dependent variable value is the reference category. Put the value inside a pair of quotes if it is formatted (such as date or time) or if the dependent variable is of string type; note, however, that this does not work for custom currency formats.
 | If REFERENCE = value, then the procedure models the unspecified value as the response, treating the specified value as the reference category.

• The REFERENCE specification is honored only if the dependent variable is binary and the binomial distribution is used (that is, DISTRIBUTION = BINOMIAL is specified on the MODEL subcommand). Otherwise, this specification is silently ignored.

• If the dependent variable is a string variable, then the value at the highest or lowest level is locale-dependent.

• If a value is specified as the reference category of the dependent variable, then the value must exist in the data.

• The ORDER keyword following the dependent variable is honored only if the dependent variable is categorical and the multinomial distribution is used (/MODEL DISTRIBUTION = MULTINOMIAL). Otherwise, this specification is silently ignored.

• ORDER determines the sort order of the dependent variable’s values. Cumulative link functions are applied based on this order.

ORDER (keyword),ORDER (keyword),ORDER (keyword)
GENLIN command,GENLIN command,GENLIN command
ASCENDING (keyword),ASCENDING (keyword),ASCENDING (keyword)
GENLIN command,GENLIN command,GENLIN command
DATA (keyword),DATA (keyword),DATA (keyword)
GENLIN command,GENLIN command,GENLIN command
DESCENDING (keyword),DESCENDING (keyword),DESCENDING (keyword)
GENLIN command,GENLIN command,GENLIN command
ORDER = ASCENDING
 | Dependent variable values are sorted in ascending order, from the lowest value to the highest value. This is the default.
ORDER = DATA
 | Dependent variable values are not sorted. The first value encountered in the data defines the first category, the last value encountered defines the last category. This option may not be specified if splits are defined on the SPLIT FILE command.
ORDER = DESCENDING
 | Dependent variable values are sorted in descending order, from the highest value to the lowest value.

• If the dependent variable is a string variable, then ascending and descending order are locale-dependent.

• If an events/trials specification is used, then the events variable must be specified first, followed by the OF keyword, and then the trials variable or number.

• If an events/trials specification is used, then DISTRIBUTION = BINOMIAL must be specified on the MODEL subcommand. In this case, the procedure automatically computes the ratio of the events variable over the trials variable or number.

• The events and trials variables must be numeric.

• The events variable is usually the number of successes for each case. Data values must be nonnegative integers. Cases with invalid values are not used in the analysis.

• If a trials variable is specified, data values must be positive integers, and each value must be greater than or equal to the corresponding events value for a case. Cases with invalid values are not used in the analysis. If a number is specified, then it must be a positive integer, and it must be greater than or equal to the events value for each case. Cases with invalid values are not used in the analysis.

• The events and trials options are invalid if a dependent variable name is specified.

• The names of the factors and covariates, if any, follow the dependent variable or events/trials specification. Names of factors are specified following the keyword BY. Names of covariates are specified following the keyword WITH.

• The ORDER specification following a list of factor variable names determines the sort order of factor values. This order is relevant for determining a factor's last level, which may be associated with a redundant parameter in the estimation algorithm.

ORDER (keyword),ORDER (keyword),ORDER (keyword)
GENLIN command,GENLIN command,GENLIN command
ASCENDING (keyword),ASCENDING (keyword),ASCENDING (keyword)
GENLIN command,GENLIN command,GENLIN command
DATA (keyword),DATA (keyword),DATA (keyword)
GENLIN command,GENLIN command,GENLIN command
DESCENDING (keyword),DESCENDING (keyword),DESCENDING (keyword)
GENLIN command,GENLIN command,GENLIN command
ORDER = ASCENDING
 | Factor variable values are sorted in ascending order, from the lowest value to the highest value. This is the default order.
ORDER = DATA
 | Factor variable values are not sorted. The first value encountered in the data defines the first category; the last value encountered defines the last category.
 | This option may not be specified if splits are defined on the SPLIT FILE command.
ORDER = DESCENDING
 | Factor variable values are sorted in descending order, from the highest value to the lowest value.

• Covariates must be numeric, but factors can be numeric or string variables.

• Each variable may be specified only once on the variable list.

• The OFFSET and SCALEWEIGHT variables may not be specified on the GENLIN command variable list.

• The SUBJECT and WITHINSUBJECT variables may not be specified as dependent, events, or trials variables on the GENLIN command variable list.

• Cases with missing values on the dependent variable, the events or trials variable, or any covariate are not used in the analysis.

Related Topics

GENLIN
Overview (GENLIN command)
Examples (GENLIN command)
MODEL Subcommand (GENLIN command)
CRITERIA Subcommand (GENLIN command)
REPEATED Subcommand (GENLIN command)
EMMEANS Subcommand (GENLIN command)
MISSING Subcommand (GENLIN command)
PRINT Subcommand (GENLIN command)
SAVE Subcommand (GENLIN command)
OUTFILE Subcommand (GENLIN command)


MODEL Subcommand (GENLIN command)

GENLIN (command),GENLIN (command),GENLIN (command)
MODEL subcommand,MODEL subcommand,MODEL subcommand
MODEL (subcommand),MODEL (subcommand),MODEL (subcommand)
GENLIN command,GENLIN command,GENLIN command

The MODEL subcommand is used to specify model effects, an offset or scale weight variable if either exists, the probability distribution, and the link function.

• The effect list includes all effects to be included in the model except for the intercept, which is specified using the INTERCEPT keyword. Effects must be separated by spaces or commas.

• If the multinomial distribution is used (DISTRIBUTION = MULTINOMIAL), then the intercept is inapplicable. The multinomial model always includes threshold parameters. The number of threshold parameters is one less than the number of dependent variable categories.

• To include a term for the main effect of a factor, enter the variable name of the factor.

• To include a term for an interaction between factors, use the keyword BY or an asterisk (*) to join the factors involved in the interaction. For example, A*B means a two-way interaction effect of A and B, where A and B are factors. A*A is not allowed because factors in an interaction effect must be distinct.

• To include a term for nesting one effect within another, use a pair of parentheses. For example, A(B) means that A is nested within B.

• Multiple nesting is allowed. For example, A(B(C)) means that B is nested within C, and A is nested within B(C). When more than one pair of parentheses is present, each pair of parentheses must be enclosed or nested within another pair of parentheses. Thus, A(B)(C) is not valid.

• Interactions between nested effects are not valid. For example, neither A(C)*B(C) nor A(C)*B(D) is valid.

• To include a covariate term in the design, enter the variable name of the covariate.

• Covariates can be connected, but not nested, through the * operator to form another covariate effect. Interactions among covariates such as X1*X1 and X1*X2 are valid, but X1(X2) is not.

• Factor and covariate effects can be connected only by the * operator. Suppose A and B are factors, and X1 and X2 are covariates. Examples of valid factor-by-covariate interaction effects are A*X1, A*B*X1, X1*A(B), A*X1*X1, and B*X1*X2.

• If the MODEL subcommand is not specified, or if it is specified with no model effects, then the GENLIN procedure fits the intercept-only model (unless the intercept is excluded on the INTERCEPT keyword). If the multinomial distribution is being used, then the GENLIN procedure fits the thresholds-only model.

INTERCEPT (keyword),INTERCEPT (keyword),INTERCEPT (keyword)
GENLIN command,GENLIN command,GENLIN command
YES (keyword),YES (keyword),YES (keyword)
GENLIN command,GENLIN command,GENLIN command
NO (keyword),NO (keyword),NO (keyword)
GENLIN command,GENLIN command,GENLIN command
INTERCEPT Keyword Collapse Hide details

INTERCEPT Keyword

The INTERCEPT keyword controls whether an intercept term is included in the model.

• If the multinomial distribution is in effect (DISTRIBUTION = MULTINOMIAL), then the INTERCEPT keyword is silently ignored.

YES | The intercept is included in the model. This is the default.
NO | The intercept is not included in the model. If no model effects are defined and INTERCEPT = NO is specified, then a null model is fit.
OFFSET (keyword),OFFSET (keyword),OFFSET (keyword)
GENLIN command,GENLIN command,GENLIN command
OFFSET Keyword Collapse Hide details

OFFSET Keyword

The OFFSET keyword specifies an offset variable or fixes the offset at a number.

• The offset variable, if specified, must be numeric.

• The offset variable may not be a dependent variable, events or trials variable, factor, covariate, SCALEWEIGHT, SUBJECT, or WITHINSUBJECT variable.

• Cases with missing values on the OFFSET variable are not used in the analysis.

• Specifying a number when INTERCEPT = YES is equivalent to adding a constant to the intercept.

• Specifying a number when INTERCEPT = NO is equivalent to fixing the intercept at the specified number.

SCALEWEIGHT (keyword),SCALEWEIGHT (keyword),SCALEWEIGHT (keyword)
GENLIN command,GENLIN command,GENLIN command
SCALEWEIGHT Keyword Collapse Hide details

SCALEWEIGHT Keyword

The SCALEWEIGHT keyword specifies a variable that contains omega weight values for the scale parameter.

• The scale weight variable must be numeric.

• The scale weight variable may not be a dependent variable, events or trials variable, factor, covariate, OFFSET, SUBJECT, or WITHINSUBJECT variable.

• Cases with scale weight values that are less than or equal to 0, or missing, are not used in the analysis.

DISTRIBUTION (keyword),DISTRIBUTION (keyword),DISTRIBUTION (keyword)
GENLIN command,GENLIN command,GENLIN command
NORMAL (keyword),NORMAL (keyword),NORMAL (keyword)
GENLIN command,GENLIN command,GENLIN command
BINOMIAL (keyword),BINOMIAL (keyword),BINOMIAL (keyword)
GENLIN command,GENLIN command,GENLIN command
GAMMA (keyword),GAMMA (keyword),GAMMA (keyword)
GENLIN command,GENLIN command,GENLIN command
IGAUSS (keyword),IGAUSS (keyword),IGAUSS (keyword)
GENLIN command,GENLIN command,GENLIN command
MULTINOMIAL (keyword),MULTINOMIAL (keyword),MULTINOMIAL (keyword)
GENLIN command,GENLIN command,GENLIN command
NEGBIN (keyword),NEGBIN (keyword),NEGBIN (keyword)
GENLIN command,GENLIN command,GENLIN command
POISSON (keyword),POISSON (keyword),POISSON (keyword)
GENLIN command,GENLIN command,GENLIN command
TWEEDIE (keyword),TWEEDIE (keyword),TWEEDIE (keyword)
GENLIN command,GENLIN command,GENLIN command
DISTRIBUTION Keyword Collapse Hide details

DISTRIBUTION Keyword

The DISTRIBUTION keyword specifies the probability distribution of the dependent variable.

• The default probability distribution depends on the specification format of the dependent variable. If an events/trials specification is used, then the default distribution is BINOMIAL. If a single variable specification is used, then the default distribution is NORMAL.

• Caution must be exercised when the dependent variable has events/trials format, and the LINK but not the DISTRIBUTION keyword is used. In this condition, depending on the LINK specification, the default DISTRIBUTION = BINOMIAL may yield an improper combination of DISTRIBUTION and LINK settings.

• Also, caution must be exercised when the dependent variable has single variable format, and the LINK but not the DISTRIBUTION keyword is used. In this condition, if the dependent variable is a string then an error will result because a string variable cannot have a normal probability distribution. Moreover, depending on the LINK specification, the default DISTRIBUTION = NORMAL may yield an improper combination of DISTRIBUTION and LINK settings.

• The discussion of the LINK keyword below gives details about proper and improper combinations of DISTRIBUTION and LINK settings.

BINOMIAL | Binomial probability distribution. If the dependent variable is specified as a single variable, then it may be numeric or string and there may be only two distinct valid data values.
 | If the events and trials options are specified on the GENLIN command, then the procedure automatically computes the ratio of the events variable over the trials variable or number. The events variable—and the trials variable if specified—must be numeric. Data values for the events variable must be integers greater than or equal to zero. Data values for the trials variable must be integers greater than zero. For each case, the trials value must be greater than or equal to the events value. If an events value is noninteger, less than zero, or missing, then the corresponding case is not used in the analysis. If a trials value is noninteger, less than or equal to zero, less than the events value, or missing, then the corresponding case is not used in the analysis.
 | If the trials option specifies a number, then it must be a positive integer, and it must be greater than or equal to the events value for each case. Cases with invalid values are not used in the analysis.
 | This is the default probability distribution if the dependent variable is specified using events/trials format.
GAMMA | Gamma probability distribution. The dependent variable must be numeric, with data values greater than zero. If a data value is less than or equal to zero, or missing, then the corresponding case is not used in the analysis.
IGAUSS | Inverse Gaussian probability distribution. The dependent variable must be numeric, with data values greater than zero. If a data value is less than or equal to zero, or missing, then the corresponding case is not used in the analysis.
MULTINOMIAL | Multinomial probability distribution. The dependent variable must be specified as a single variable, it may be numeric or string, and it must have at least two distinct valid data values. The dependent variable is assumed to be ordinal with values having an intrinsic ordering.
NEGBIN(number | MLE)
 | Negative binomial probability distribution. The dependent variable must be numeric, with data values that are integers greater than or equal to zero. If a data value is noninteger, less than zero, or missing, then the corresponding case is not used in the analysis.
 | The option specifies the negative binomial distribution’s ancillary parameter. Specify a number greater than or equal to zero to fix the parameter at the number. Specify MLE to use the maximum likelihood estimate of the parameter. The default value is 1.
 | If the REPEATED subcommand is specified, then the ancillary parameter is treated as follows. (1) If the ancillary parameter is specified as a number, then it is fixed at that number for the initial generalized linear model and the generalized estimating equations. (2) If the ancillary parameter is estimated using maximum likelihood in the initial generalized linear model, then the estimate is passed to the generalized estimating equations, where it is treated as a fixed number. (3) If NEGBIN(MLE) is specified but the initial generalized linear model is bypassed and initial values are directly input to the generalized estimating equations (see the discussion of Initial Values and Generalized Estimating Equations in REPEATED Subcommand (GENLIN command)), then the initial value of the ancillary parameter is passed to the generalized estimating equations, where it is treated as a fixed number.
NORMAL | Normal probability distribution. The dependent variable must be numeric. This is the default probability distribution if the dependent variable is specified using single-variable format.
POISSON | Poisson probability distribution. The dependent variable must be numeric, with data values that are integers greater than or equal to zero. If a data value is noninteger, less than zero, or missing, then the corresponding case is not used in the analysis.
TWEEDIE(number)
 | Tweedie probability distribution. The dependent variable must be numeric, with data values greater than or equal to zero. If a data value is less than zero or missing, then the corresponding case is not used in the analysis. The required number specification is the fixed value of the Tweedie distribution’s parameter. Specify a number greater than one and less than two. There is no default value.
LINK (keyword),LINK (keyword),LINK (keyword)
GENLIN command,GENLIN command,GENLIN command
IDENTITY (keyword),IDENTITY (keyword),IDENTITY (keyword)
GENLIN command,GENLIN command,GENLIN command
CLOGLOG (keyword),CLOGLOG (keyword),CLOGLOG (keyword)
GENLIN command,GENLIN command,GENLIN command
LOG (keyword),LOG (keyword),LOG (keyword)
GENLIN command,GENLIN command,GENLIN command
LOGC (keyword),LOGC (keyword),LOGC (keyword)
GENLIN command,GENLIN command,GENLIN command
LOGIT (keyword),LOGIT (keyword),LOGIT (keyword)
GENLIN command,GENLIN command,GENLIN command
NEGBIN (keyword),NEGBIN (keyword),NEGBIN (keyword)
GENLIN command,GENLIN command,GENLIN command
NLOGLOG (keyword),NLOGLOG (keyword),NLOGLOG (keyword)
GENLIN command,GENLIN command,GENLIN command
ODDSPOWER (keyword),ODDSPOWER (keyword),ODDSPOWER (keyword)
GENLIN command,GENLIN command,GENLIN command
PROBIT (keyword),PROBIT (keyword),PROBIT (keyword)
GENLIN command,GENLIN command,GENLIN command
POWER (keyword),POWER (keyword),POWER (keyword)
GENLIN command,GENLIN command,GENLIN command
CUMCAUCHIT (keyword),CUMCAUCHIT (keyword),CUMCAUCHIT (keyword)
GENLIN command,GENLIN command,GENLIN command
CUMCLOGLOG (keyword),CUMCLOGLOG (keyword),CUMCLOGLOG (keyword)
GENLIN command,GENLIN command,GENLIN command
CUMLOGIT (keyword),CUMLOGIT (keyword),CUMLOGIT (keyword)
GENLIN command,GENLIN command,GENLIN command
CUMNLOGLOG (keyword),CUMNLOGLOG (keyword),CUMNLOGLOG (keyword)
GENLIN command,GENLIN command,GENLIN command
CUMPROBIT (keyword),CUMPROBIT (keyword),CUMPROBIT (keyword)
GENLIN command,GENLIN command,GENLIN command
LINK Keyword Collapse Hide details

LINK Keyword

The LINK keyword specifies the link function. The following link functions are available.

• If the multinomial distribution is in effect (DISTRIBUTION = MULTINOMIAL), then only the the cumulative link functions are available. Keywords corresponding to these functions have prefix CUM. If a non-cumulative link function is specified for the multinomial distribution, then an error is issued.

IDENTITY | Identity link function. f(x)=x
CLOGLOG | Complementary log-log link function. f(x)=ln(−ln(1−x))
LOG | Log link function. f(x)=ln(x)
LOGC | Log complement link function. f(x)=ln(1−x)
LOGIT | Logit link function. f(x)=ln(x / (1−x))
NEGBIN | Negative binomial link function. f(x)=ln(x / (x+k−1))
NLOGLOG | Negative log-log link function. f(x)=−ln(−ln(x))
ODDSPOWER(number)
 | Odds power link function. f(x)=[(x/(1−x))α−1]/α, if α≠0. f(x)=ln(x), if α=0. α is the required number specification and must be a real number. There is no default value.
POWER(number)
 | Power link function. f(x)=xα, if α≠0. f(x)=ln(x), if α=0. α is the required number specification and must be a real number. If |α| < 2.2e-16, α is treated as 0. There is no default value.
PROBIT | Probit link function. f(x)=Φ−1(x), where Φ−1 is the inverse standard normal cumulative distribution function.
CUMCAUCHIT | Cumulative Cauchit link function. f(x) = tan(π (x - 0.5)). May be specified only if DISTRIBUTION = MULTINOMIAL.
CUMCLOGLOG | Cumulative complementary log-log link function. f(x)=ln(−ln(1−x)). May be specified only if DISTRIBUTION = MULTINOMIAL.
CUMLOGIT | Cumulative logit link function. f(x)=ln(x / (1−x)). May be specified only if DISTRIBUTION = MULTINOMIAL.
CUMNLOGLOG | Cumulative negative log-log link function. f(x)=−ln(−ln(x)). May be specified only if DISTRIBUTION = MULTINOMIAL.
CUMPROBIT | Cumulative probit link function. f(x)=Φ−1(x), where Φ−1 is the inverse standard normal cumulative distribution function. May be specified only if DISTRIBUTION = MULTINOMIAL.

• If neither the DISTRIBUTION nor the LINK keyword is specified, then the default link function is IDENTITY.

• If DISTRIBUTION is specified but LINK is not, then the default setting for LINK depends on the DISTRIBUTION setting as shown in the following table.

DISTRIBUTION Setting | Default LINK Setting
NORMAL | IDENTITY
BINOMIAL | LOGIT
GAMMA | POWER(−1)
IGAUSS | POWER(−2)
MULTINOMIAL | CUMLOGIT
NEGBIN | LOG
POISSON | LOG
TWEEDIE | POWER(1−p), where p is the Tweedie distrubution's parameter

• The GENLIN procedure will fit a model if a permissible combination of LINK and DISTRIBUTION specifications is given. The table below indicates the permissible LINK and DISTRIBUTION combinations. Specifying an improper combination will yield an error message.

• Note that the default setting for DISTRIBUTION is NORMAL irrespective of the LINK specification, and that not all LINK specifications are valid for DISTRIBUTION = NORMAL. Thus, if LINK is specified but DISTRIBUTION is not, then the default DISTRIBUTION = NORMAL may yield an improper combination of DISTRIBUTION and LINK settings.

Valid combinations of distribution and link function
Link | Distribution |  |  |  |  |  |
 | NORMAL | BINOMIAL | GAMMA | IGAUSS | NEGBIN | POISSON | TWEEDIE
IDENTITY | X | X | X | X | X | X | X
CLOGLOG |  | X |  |  |  |  |
LOG | X | X | X | X | X | X | X
LOGC |  | X |  |  |  |  |
LOGIT |  | X |  |  |  |  |
NEGBIN |  |  |  |  | X |  |
NLOGLOG |  | X |  |  |  |  |
ODDSPOWER |  | X |  |  |  |  |
PROBIT |  | X |  |  |  |  |
POWER | X | X | X | X | X | X | X

Note: The NEGBIN link function is not available if DISTRIBUTION = NEGBIN(0) is specified.

Related Topics

GENLIN
Overview (GENLIN command)
Examples (GENLIN command)
Variable List (GENLIN command)
CRITERIA Subcommand (GENLIN command)
REPEATED Subcommand (GENLIN command)
EMMEANS Subcommand (GENLIN command)
MISSING Subcommand (GENLIN command)
PRINT Subcommand (GENLIN command)
SAVE Subcommand (GENLIN command)
OUTFILE Subcommand (GENLIN command)


CRITERIA Subcommand (GENLIN command)

GENLIN (command),GENLIN (command),GENLIN (command)
CRITERIA subcommand,CRITERIA subcommand,CRITERIA subcommand
CRITERIA (subcommand),CRITERIA (subcommand),CRITERIA (subcommand)
GENLIN command,GENLIN command,GENLIN command

The CRITERIA subcommand controls statistical criteria for the generalized linear model and specifies numerical tolerance for checking singularity.

Note that if the REPEATED subcommand is used, then the GENLIN procedure fits generalized estimating equations, which comprise a generalized linear model and a working correlation matrix that models within-subject correlations. In this case, the GENLIN procedure first fits a generalized linear model assuming independence and uses the final parameter estimates as the initial values for the linear model part of the generalized estimating equations. (See the topic REPEATED Subcommand (GENLIN command) for more information. ) The description of each CRITERIA subcommand keyword below is followed by a statement indicating how the keyword is affected by specification of the REPEATED subcommand.

ANALYSISTYPE (keyword),ANALYSISTYPE (keyword),ANALYSISTYPE (keyword)
GENLIN command,GENLIN command,GENLIN command
CHECKSEP (keyword),CHECKSEP (keyword),CHECKSEP (keyword)
GENLIN command,GENLIN command,GENLIN command
CILEVEL (keyword),CILEVEL (keyword),CILEVEL (keyword)
GENLIN command,GENLIN command,GENLIN command
CITYPE (keyword),CITYPE (keyword),CITYPE (keyword)
GENLIN command,GENLIN command,GENLIN command
COVB (keyword),COVB (keyword),COVB (keyword)
GENLIN command,GENLIN command,GENLIN command
HCONVERGE (keyword),HCONVERGE (keyword),HCONVERGE (keyword)
GENLIN command,GENLIN command,GENLIN command
INITIAL (keyword),INITIAL (keyword),INITIAL (keyword)
GENLIN command,GENLIN command,GENLIN command
LCONVERGE (keyword),LCONVERGE (keyword),LCONVERGE (keyword)
GENLIN command,GENLIN command,GENLIN command
LIKELIHOOD (keyword),LIKELIHOOD (keyword),LIKELIHOOD (keyword)
GENLIN command,GENLIN command,GENLIN command
MAXITERATIONS (keyword),MAXITERATIONS (keyword),MAXITERATIONS (keyword)
GENLIN command,GENLIN command,GENLIN command
MAXSTEPHALVING (keyword),MAXSTEPHALVING (keyword),MAXSTEPHALVING (keyword)
GENLIN command,GENLIN command,GENLIN command
METHOD (keyword),METHOD (keyword),METHOD (keyword)
GENLIN command,GENLIN command,GENLIN command
PCONVERGE (keyword),PCONVERGE (keyword),PCONVERGE (keyword)
GENLIN command,GENLIN command,GENLIN command
SCALE (keyword),SCALE (keyword),SCALE (keyword)
GENLIN command,GENLIN command,GENLIN command
SINGULAR (keyword),SINGULAR (keyword),SINGULAR (keyword)
GENLIN command,GENLIN command,GENLIN command
ALL (keyword),ALL (keyword),ALL (keyword)
GENLIN command,GENLIN command,GENLIN command
WALD (keyword),WALD (keyword),WALD (keyword)
GENLIN command,GENLIN command,GENLIN command
PROFILE (keyword),PROFILE (keyword),PROFILE (keyword)
GENLIN command,GENLIN command,GENLIN command
FULL (keyword),FULL (keyword),FULL (keyword)
GENLIN command,GENLIN command,GENLIN command
KERNEL (keyword),KERNEL (keyword),KERNEL (keyword)
GENLIN command,GENLIN command,GENLIN command
FISHER (keyword),FISHER (keyword),FISHER (keyword)
GENLIN command,GENLIN command,GENLIN command
NEWTON (keyword),NEWTON (keyword),NEWTON (keyword)
GENLIN command,GENLIN command,GENLIN command
PEARSON (keyword),PEARSON (keyword),PEARSON (keyword)
GENLIN command,GENLIN command,GENLIN command
DEVIANCE (keyword),DEVIANCE (keyword),DEVIANCE (keyword)
GENLIN command,GENLIN command,GENLIN command
MLE (keyword),MLE (keyword),MLE (keyword)
GENLIN command,GENLIN command,GENLIN command
ANALYSISTYPE = 3 | 1 | ALL (WALD | LR)
Type of analysis for each model effect. Specify 1 for a type I analysis, 3 for type III analysis, or ALL for both. Each of these specifications computes chi-square statistics for each model effect.
Optionally, 1, 3, or ALL may be followed by WALD or LR in parentheses to specify the type of chi-square statistics to compute. WALD computes Wald statistics, LR computes likelihood-ratio statistics.
If likelihood-ratio statistics are computed, then the log-likelihood convergence criterion is used in all reduced models if type I analysis is in effect , or in all constrained models if type III analysis is in effect, irrespective of the convergence criteria used for parameter estimation in the full model. That is, for reduced or constrained models, any HCONVERGE and PCONVERGE specifications are not used, but all LCONVERGE specifications are used. (See the discussions of the HCONVERGE, PCONVERGE, and LCONVERGE keywords below.) If the log-likelihood convergence criterion is not in effect for the full model, then the reduced or constrained models use the log-likelihood convergence criterion with tolerance level 1E-4 and absolute change. The maximum number of iterations (MAXITERATIONS), maximum number of step-halvings (MAXSTEPHALVING), and starting iteration for checking complete and quasi-complete separation (CHECKSEP) are the same for reduced or constrained models as for the full model.
The default value is 3(WALD).
If the REPEATED subcommand is specified, then the option on the ANALYSISTYPE keyword is used for the generalized estimating equations. In this case, the WALD option computes Wald statistics, but the LR option computes generalized score statistics instead of likelihood-ratio statistics. For generalized score statistics, the convergence criteria for reduced or constrained models are the same as for the full model; that is, HCONVERGE or PCONVERGE as specified on the REPEATED subcommand.
CHECKSEP = integer
Starting iteration for checking complete and quasi-complete separation. Specify an integer greater than or equal to zero. This criterion is not used if the value is 0. The default value is 20. This criterion is used only for the binomial or multinomial probability distributions (that is, if DISTRIBUTION = BINOMIAL or MULTINOMIAL is specified on the MODEL subcommand). For all other probability distributions, it is silently ignored.
If the CHECKSEP value is greater than 0 and the binomial or multinomial probability distribution is being used, then separation is always checked following the final iteration.
If the REPEATED subcommand is specified, then the CHECKSEP keyword is applicable only to the initial generalized linear model.
CILEVEL = number
Confidence interval level for coefficient estimates and estimated marginal means. Specify a number greater than or equal to 0, and less than 100. The default value is 95.
If the REPEATED subcommand is specified, then the CILEVEL keyword is applicable to any parameter that is fit in the process of computing the generalized estimating equations.
CITYPE = WALD | PROFILE(number)
Confidence interval type. Specify WALD for Wald confidence intervals, or PROFILE for profile likelilhood confidence intervals. The default value is WALD.
PROFILE may be followed optionally by parentheses containing the tolerance level used by the two convergence criteria. The default value is 1E-4.
If the REPEATED subcommand is specified, then the CITYPE keyword is applicable only to the initial generalized linear model. For the linear model part of the generalized estimating equations, Wald confidence intervals are always used.
COVB = MODEL | ROBUST
Parameter estimate covariance matrix. Specify MODEL to use the model-based estimator of the parameter estimate covariance matrix, or ROBUST to use the robust estimator. The default value is MODEL.
If the REPEATED subcommand is specified, then the CRITERIA subcommand COVB keyword is silently ignored. The REPEATED subcommand COVB keyword is applicable to the linear model part of the generalized estimating equations.
HCONVERGE = number (ABSOLUTE | RELATIVE)
Hessian convergence criterion. Specify a number greater than or equal to 0, and the ABSOLUTE or RELATIVE keyword in parentheses to define the type of convergence. The number and keyword may be separated by a space character or a comma. If HCONVERGE = 0, the absolute Hessian convergence criterion will be checked with value 1E-4 after any specified convergence criteria have been satisfied. If it is not met, a warning is displayed. The default value is 0 (ABSOLUTE).
At least one of the CRITERIA subcommand keywords HCONVERGE, LCONVERGE, PCONVERGE must specify a nonzero number.
For a model with a normal distribution and identity link function, an iterative process is not used for parameter estimation. Thus, if DISTRIBUTION = NORMAL and LINK = IDENTITY on the MODEL subcommand, then the HCONVERGE keyword is silently ignored.
If the REPEATED subcommand is specified, then the CRITERIA subcommand HCONVERGE keyword is applicable only to the initial generalized linear model. The REPEATED subcommand HCONVERGE keyword is applicable to the linear model part of the generalized estimating equations.
INITIAL = number-list | 'savfile' | 'dataset'
Initial values for parameter estimates. Specify a list of numbers, an external PASW Statistics data file, or a currently open dataset. If a list of numbers is specified, then each number must be separated by a space character or a comma. If an external data file is specified, then the full path and filename must be given in quotes.
If the INITIAL keyword is specified, then initial values must be supplied for all parameters (including redundant parameters) in the generalized linear model. The ordering of the initial values should correspond to the ordering of the model parameters used by the GENLIN procedure. One way to determine how parameters are ordered for a given model is to run the GENLIN procedure for the model – without the INITIAL keyword – and examine the PRINT subcommand SOLUTION output.
If INITIAL is not specified, then the GENLIN procedure automatically determines the initial values.
If DISTRIBUTION = NORMAL and LINK = IDENTITY on the MODEL subcommand, then the INITIAL keyword is ignored with a warning.
If the REPEATED subcommand is specified, then the CRITERIA subcommand INITIAL keyword is applicable only to the initial generalized linear model. See the REPEATED subcommand below for a detailed discussion of initial values and generalized estimating equations.
Initial Values Specified using a List of Numbers
For all distributions except multinomial, if MODEL INTERCEPT = YES, then the initial values must begin with the initial value for the intercept parameter. If MODEL INTERCEPT = NO, then the initial values must begin with the initial value for the first regression parameter.
If SCALE = MLE, then the initial values must continue with the initial value for the scale parameter. If SCALE = DEVIANCE, PEARSON, or a fixed number, then a value may be given for the scale parameter but it is optional and always silently ignored.
Finally, if DISTRIBUTION = NEGBIN(MLE), then the initial values may end with an initial value for the negative binomial distribution’s ancillary parameter. The initial value for this parameter must be specified as NEGBIN(number), where number is a number greater than or equal to zero. The default value is 1. If DISTRIBUTION = NEGBIN(MLE) is not in effect, then NEGBIN(number) is silently ignored.
For the multinomial distribution, the ordering of initial values is: threshold parameters, regression parameters.
Any additional unused numbers at the end of the list; that is, any numbers beyond those that are mapped to parameters, are silently ignored.
If the SPLIT FILE command is in effect, then the exact same list is applied to all splits. That is, each split must have the same set of parameters, and the same list is applied to each split. If the list contains too few or too many numbers for any split, then an error message is displayed.
Initial Values Specified using a Dataset or External PASW Statistics Data File
If a currently open dataset or external PASW Statistics data file is specified, then the file structure must be the same as that used in the OUTFILE subcommand CORB and COVB files. This structure allows the final values from one run of the GENLIN procedure to be saved in a CORB or COVB file and input as initial values in a subsequent run of the procedure.
In the dataset, the ordering of variables from left to right must be: RowType_, VarName_, P1, P2, …. The variables RowType_ and VarName_ are string variables. P1, P2, … are numeric variables corresponding to an ordered list of the parameters. (Variable names P1, P2, … are not required; the procedure will accept any valid variable names for the parameters. The mapping of variables to parameters is based on variable position, not variable name.) Any variables beyond the last parameter are ignored.
Initial values are supplied on a record with value ‘EST’ for variable RowType_; the actual initial values are given under variables P1, P2, …. The GENLIN procedure ignores all records for which RowType_ has a value other than ‘EST’, as well as any records beyond the first occurrence of RowType_ equal to ‘EST’.
The required order of the intercept (if any) or threshold parameters, and regression parameters, is the same as for the list of numbers specification. However, when initial values are entered via a dataset or external data file, these parameters must always be followed by the scale parameter and then, if DISTRIBUTION = NEGBIN, by the negative binomial parameter.
If SPLIT FILE is in effect, then the variables must begin with the split-file variable or variables in the order specified on the SPLIT FILE command, followed by RowType_, VarName_, P1, P2, … as above. Splits must occur in the specified dataset in the same order as in the original dataset.
Examples.
The following example specifies initial values using a list of numbers. Suppose factor A has three levels. The INITIAL keyword supplies initial value 1 for the intercept, 1.5 for the first level of factor A, 2.5 for the second level, 0 for the last level, and 3 for the covariate X.
GENLIN depvar BY a WITH x
       /MODEL a x
       /CRITERIA INITIAL = 1 1.5 2.5 0 3.
The next example outputs the final estimates from one run of the GENLIN procedure and inputs these estimates as the initial values in the second run.
GENLIN depvar BY a WITH x
       /MODEL a x
       /OUTFILE COVB = '/work/estimates.sav'.
GENLIN depvar BY a WITH x
       /MODEL a x
       /CRITERIA INITIAL = '/work/estimates.sav'.
LCONVERGE = number (ABSOLUTE | RELATIVE)
Log-likelihood convergence criterion. Specify a number greater than or equal to 0, and the ABSOLUTE or RELATIVE keyword in parentheses to define the type of convergence. The number and keyword may be separated by a space character or a comma. The log-likelihood convergence criterion is not used if the number is 0. The default value is 0 (ABSOLUTE).
At least one of the CRITERIA subcommand keywords HCONVERGE, LCONVERGE, PCONVERGE must specify a nonzero number.
If DISTRIBUTION = NORMAL and LINK = IDENTITY on the MODEL subcommand, then the LCONVERGE keyword is silently ignored.
If the REPEATED subcommand is specified, then the LCONVERGE keyword is applicable only to the initial generalized linear model.
LIKELIHOOD = FULL | KERNEL
Form of the log-likelihood or log-quasi-likelihood function. Specify FULL for the full function, or KERNEL for the kernel of the function. The default value is FULL.
For generalized linear models, the LIKELIHOOD keyword specifies the form of the log likelihood function. If the REPEATED subcommand is specified, then it specifies the form of the log quasi-likelihood function.
MAXITERATIONS = integer
Maximum number of iterations. Specify an integer greater than or equal to 0. The default value is 100. If DISTRIBUTION = NORMAL and LINK = IDENTITY on the MODEL subcommand, then the MAXITERATIONS keyword is silently ignored.
If the REPEATED subcommand is specified, then the CRITERIA subcommand MAXITERATIONS keyword is applicable only to the initial generalized linear model. The REPEATED subcommand MAXITERATIONS keyword is applicable to the linear model part of the generalized estimating equations.
MAXSTEPHALVING = integer
Maximum number of steps in step-halving method. Specify an integer greater than 0. The default value is 5. If DISTRIBUTION = NORMAL and LINK = IDENTITY on the MODEL subcommand, then the MAXSTEPHALVING keyword is silently ignored.
If the REPEATED subcommand is specified, then the MAXSTEPHALVING keyword is applicable only to the initial generalized linear model.
METHOD = FISHER | NEWTON | FISHER(integer)
Model parameters estimation method. Specify FISHER to use the Fisher scoring method, NEWTON to use the Newton-Raphson method, or FISHER(integer) to use a hybrid method.
In the hybrid method option, integer is an integer greater than 0 and specifies the maximum number of Fisher scoring iterations before switching to the Newton-Raphson method. If convergence is achieved during the Fisher scoring phase of the hybrid method, then additional Newton-Raphson steps are performed until convergence is achieved for Newton-Raphson too.
The default algorithm for the generalized linear model uses Fisher scoring in the first iteration and Newton-Raphson thereafter; the default value for the METHOD keyword is FISHER(1).
If DISTRIBUTION = NORMAL and LINK = IDENTITY on the MODEL subcommand, then the METHOD keyword is silently ignored.
If the REPEATED subcommand is specified, then the METHOD keyword is applicable only to the initial generalized linear model.
PCONVERGE = number (ABSOLUTE | RELATIVE)
Parameter convergence criterion. Specify a number greater than or equal to 0, and the ABSOLUTE or RELATIVE keyword in parentheses to define the type of convergence. The number and keyword may be separated by a space character or a comma. The parameter convergence criterion is not used if the number is 0. The default value is 1E-6 (ABSOLUTE).
At least one of the CRITERIA subcommand keywords HCONVERGE, LCONVERGE, PCONVERGE must specify a nonzero number.
If DISTRIBUTION = NORMAL and LINK = IDENTITY on the MODEL subcommand, then the PCONVERGE keyword is silently ignored.
If the REPEATED subcommand is specified, then the CRITERIA subcommand PCONVERGE keyword is applicable only to the initial generalized linear model. The REPEATED subcommand PCONVERGE keyword is applicable to the linear model part of the generalized estimating equations.
SCALE = MLE | DEVIANCE | PEARSON | number
Method of fitting the scale parameter. Specify MLE to compute a maximum likelihood estimate, DEVIANCE to compute the scale parameter using the deviance, PEARSON to compute it using the Pearson chi-square, or a number greater than 0 to fix the scale parameter.
If the MODEL subcommand specifies DISTRIBUTION = NORMAL, IGAUSS, GAMMA, or TWEEDIE then any of the SCALE options may be used. For these distributions, the default value is MLE.
If the MODEL subcommand specifies DISTRIBUTION = NEGBIN, POISSON, BINOMIAL, or MULTINOMIAL, then DEVIANCE, PEARSON, or a fixed number may be used. For these distributions, the default value is the fixed number 1.

If the REPEATED subcommand is specified, then the SCALE keyword is directly applicable only to the initial generalized linear model. For the linear model part of the generalized estimating equations, the scale parameter is treated as follows:

• If SCALE = MLE, then the scale parameter estimate from the initial generalized linear model is passed to the generalized estimating equations, where it is updated by the Pearson chi-square divided by its degrees of freedom.

• If SCALE = DEVIANCE or PEARSON, then the scale parameter estimate from the initial generalized linear model is passed to the generalized estimating equations, where it is treated as a fixed number.

• If SCALE is specified with a fixed number, then the scale parameter is also held fixed at the same number in the generalized estimating equations.
SINGULAR = number
Tolerance value used to test for singularity. Specify a number greater than 0. The default value is 1E-12.
If the REPEATED subcommand is specified, then the SINGULAR keyword is applicable to any linear model that is fit in the process of computing the generalized estimating equations.

Related Topics

GENLIN
Overview (GENLIN command)
Examples (GENLIN command)
Variable List (GENLIN command)
MODEL Subcommand (GENLIN command)
REPEATED Subcommand (GENLIN command)
EMMEANS Subcommand (GENLIN command)
MISSING Subcommand (GENLIN command)
PRINT Subcommand (GENLIN command)
SAVE Subcommand (GENLIN command)
OUTFILE Subcommand (GENLIN command)


REPEATED Subcommand (GENLIN command)

GENLIN (command),GENLIN (command),GENLIN (command)
REPEATED subcommand,REPEATED subcommand,REPEATED subcommand
REPEATED (subcommand),REPEATED (subcommand),REPEATED (subcommand)
GENLIN command,GENLIN command,GENLIN command

The REPEATED subcommand specifies the correlation structure used by generalized estimating equations to model correlations within subjects and controls statistical criteria in the nonlikelihood-based iterative fitting algorithm. If the REPEATED subcommand is not specified, then the GENLIN procedure fits a generalized linear model assuming independence.

Initial Values and Generalized Estimating Equations

Generalized estimating equations require initial values for the parameter estimates in the linear model. Initial values are not needed for the working correlation matrix because matrix elements are based on the parameter estimates.

The GENLIN procedure automatically supplies initial values to the generalized estimating equations algorithm. The default initial values are the final parameter estimates from the ordinary generalized linear model, assuming independence, that is fit based on the MODEL and CRITERIA subcommand specifications.

Recall that if the REPEATED subcommand is specified, then the CRITERIA subcommand SCALE keyword is directly applicable only to the initial generalized linear model. For the linear model part of the generalized estimating equations, the scale parameter is treated as follows.

• If SCALE = MLE, then the scale parameter estimate from the initial generalized linear model is passed to the generalized estimating equations, where it is updated by the Pearson chi-square divided by its degrees of freedom. Pearson chi-square is used because generalized estimating equations do not have the concept of likelihood, and hence the scale estimate cannot be updated by methods related to maximum likelihood estimation.

• If SCALE = DEVIANCE or PEARSON, then the scale parameter estimate from the initial generalized linear model is passed to the generalized estimating equations, where it is treated as a fixed number.

• If SCALE is specified with a fixed number, then the scale parameter is also held fixed in the generalized estimating equations.

It is possible to bypass fitting the generalized linear model and directly input initial values to the generalized estimating equations algorithm. To do this, specify the linear model as usual on the MODEL subcommand. Then, on the CRITERIA subcommand, specify initial values for the linear model on the INITIAL keyword and set MAXITERATIONS = 0.

For example, suppose factor A has three levels. The INITIAL keyword supplies initial value 1 for the intercept, 1.5 for the first level of factor A, 2.5 for the second level, 0 for the last level, and 3 for the covariate X. Because MAXITERATIONS = 0, no iterations are performed for the generalized linear model and the specified initial values are passed directly to the generalized estimating equations algorithm.

GENLIN depvar BY a WITH x
  /MODEL a x
    DISTRIBUTION = BINOMIAL
    LINK = LOGIT
    INITIAL = 1 1.5 2.5 0 3
    MAXITERATIONS = 0
  /REPEATED
    SUBJECT=idvar.

It is also possible to use a maximum likelihood estimate of the scale parameter as the initial value and to fix the scale parameter at this initial value for the generalized estimating equations. That is, we can override the default updating by the Pearson chi-square divided by its degrees of freedom. To do this, first fit a generalized linear model, estimating the scale parameter via maximum likelihood, and save the final parameter estimates in an external file (using the OUTFILE subcommand CORB or COVB option). Next, open this external file and copy the scale parameter estimate in full precision. Finally, fit the generalized estimating equations, using the final parameter estimates from the generalized linear model as the initial values, with MAXITERATIONS = 0 on the CRITERIA subcommand and SCALE fixed at the scale parameter estimate on the CRITERIA subcommand. The following example syntax assumes that the maximum likelihood estimate of the scale parameter is 0.1234567890123456.

GENLIN depvar BY a WITH x
  /MODEL a x
     DISTRIBUTION = NORMAL
     LINK = LOG
  /CRITERIA
     SCALE = MLE
  /OUTFILE
     COVB = '/work/estimates.sav'.

GENLIN depvar BY a WITH x
  /MODEL a x
     DISTRIBUTION = NORMAL
     LINK = LOG
  /CRITERIA
     INITIAL = '/work/estimates.sav'
     MAXITERATIONS = 0
     SCALE = 0.1234567890123456
  /REPEATED
     SUBJECT=idvar.

When the negative binomial distribution is used (/MODEL DISTRIBUTION = NEGBIN), the distribution’s ancillary parameter is treated as follows:

1. If the ancillary parameter is specified as a number, then it is fixed at that number for the initial generalized linear model and the generalized estimating equations.

2. If the ancillary parameter is estimated using maximum likelihood in the initial generalized linear model, then the estimate is passed to the generalized estimating equations, where it is treated as a fixed number.

3. If NEGBIN(MLE) is specified but the initial generalized linear model is bypassed and initial values are directly input to the generalized estimating equations, then the initial value of the ancillary parameter is passed to the generalized estimating equations, where it is treated as a fixed number.

SUBJECT (keyword),SUBJECT (keyword),SUBJECT (keyword)
GENLIN command,GENLIN command,GENLIN command
SUBJECT Keyword Collapse Hide details

SUBJECT Keyword

The SUBJECT keyword identifies subjects in the active dataset. Complete independence is assumed across subjects, but responses within subjects are assumed to be correlated.

• Specify a single variable or a list of variables connected by asterisks (*) or the keyword BY.

• Variables may be numeric or string variables.

• The number of subjects equals the number of distinct combinations of values of the variables.

• If the active dataset is sorted by the subject variables, then all records with equal values on the subject variables are contiguous and define the measurements for one subject.

• In contrast, if the active dataset is not sorted, then the GENLIN procedure reads the data record by record. Each block of equal values on the subject variables defines a new subject. Please be aware that this approach may produce invalid results if all records for a subject are not contiguous in the active dataset.

• By default, the GENLIN procedure automatically sorts the active dataset by subject and any within-subject variables before performing analyses. See the SORT keyword below for more information.

• All specified variables must be unique.

• The dependent, events, trials, and WITHINSUBJECT variables may not be specified as SUBJECT variables.

• The SUBJECT keyword is required if the REPEATED subcommand is used.

• Cases with missing values for any of the subject variables are not used in the analysis.

WITHINSUBJECT (keyword),WITHINSUBJECT (keyword),WITHINSUBJECT (keyword)
GENLIN command,GENLIN command,GENLIN command
WITHINSUBJECT Keyword Collapse Hide details

WITHINSUBJECT Keyword

The WITHINSUBJECT keyword gives the within-subject or time effect. This effect defines the ordering of measurements within subjects. If some measurements do not appear in the data for some subjects, then the existing measurements are ordered and the omitted measurements are treated as missing values. If WITHINSUBJECT is not used, then measurements may be improperly ordered and missing values assumed for the last measurements within subjects.

• Specify a single variable or a list of variables connected by asterisks (*) or the keyword BY.

• Variables may be numeric or string variables.

• The WITHINSUBJECT keyword is honored only if the default SORT = YES is in effect. The number of measurements within a subject equals the number of distinct combinations of values of the WITHINSUBJECT variables.

• The WITHINSUBJECT keyword is ignored and a warning is issued if SORT = NO is in effect. In this case, the GENLIN procedure reads the records for a subject in the order given in the active dataset.

• By default, the GENLIN procedure automatically sorts the active dataset by subject and any within-subject variables before performing analyses. See the SORT keyword below for more information.

• All specified variables must be unique.

• The dependent, events, trials, and SUBJECT variables may not be specified as WITHINSUBJECT variables.

• The WITHINSUBJECT keyword is not required if the data are properly ordered within each subject.

• Cases with missing values for any of the within-subject variables are not used in the analysis.

SORT (keyword),SORT (keyword),SORT (keyword)
GENLIN command,GENLIN command,GENLIN command
YES (keyword),YES (keyword),YES (keyword)
GENLIN command,GENLIN command,GENLIN command
NO (keyword),NO (keyword),NO (keyword)
GENLIN command,GENLIN command,GENLIN command
SORT Keyword Collapse Hide details

SORT Keyword

The SORT keyword indicates whether to sort cases in the working dataset by the subject effect and the within-subject effect.

YES | Sort cases by subject and any within-subject variables. The GENLIN procedure sorts the active dataset before performing analyses. The subject and any within-subject variables are sorted based on the ascending sort order of their data values. If any of the variables are strings, then their sort order is locale-dependent. This is the default. This sort is temporary—it is in effect only for the duration of the GENLIN procedure.
NO | Do not sort cases by subject and any within-subject variables. If SORT = NO is specified, then the GENLIN procedure does not sort the active dataset before performing analyses.
CORRTYPE (keyword),CORRTYPE (keyword),CORRTYPE (keyword)
GENLIN command,GENLIN command,GENLIN command
INDEPENDENT (keyword),INDEPENDENT (keyword),INDEPENDENT (keyword)
GENLIN command,GENLIN command,GENLIN command
AR (keyword),AR (keyword),AR (keyword)
GENLIN command,GENLIN command,GENLIN command
EXCHANGEABLE (keyword),EXCHANGEABLE (keyword),EXCHANGEABLE (keyword)
GENLIN command,GENLIN command,GENLIN command
FIXED (keyword),FIXED (keyword),FIXED (keyword)
GENLIN command,GENLIN command,GENLIN command
MDEPENDENT (keyword),MDEPENDENT (keyword),MDEPENDENT (keyword)
GENLIN command,GENLIN command,GENLIN command
UNSTRUCTURED (keyword),UNSTRUCTURED (keyword),UNSTRUCTURED (keyword)
GENLIN command,GENLIN command,GENLIN command
CORRTYPE Keyword Collapse Hide details

CORRTYPE Keyword

The CORRTYPE keyword specifies the working correlation matrix structure.

INDEPENDENT | Independent working correlation matrix. This is the default working correlation matrix structure.
AR(1) | AR(1) working correlation matrix.
EXCHANGEABLE | Exchangeable working correlation matrix.
FIXED(list) | Fixed working correlation matrix. Specify a list of numbers, with each number separated by a space character or a comma.
The list of numbers must define a valid working correlation matrix. The number of rows and the number of columns must equal the dimension of the working correlation matrix. This dimension depends on the subject effect, the within-subject effect, whether the active dataset is sorted, and the data. The simplest way to determine the working correlation matrix dimension is to run the GENLIN procedure first for the model using the default working correlation matrix structure (instead of the FIXED structure) and examine the PRINT MODELINFO output for the working correlation matrix dimension. Then, rerun the procedure with the FIXED specification.
Specify only the lower triangular portion of the matrix. Matrix elements must be specified row-by-row. All elements must be between 0 and 1 inclusive.
For example, if there are three measurements per subject, then the following specification defines a 3 * 3 working correlation matrix.
CORRTYPE = FIXED(0.84 0.65 0.75)
1.00 0.84 0.65
0.84 1.00 0.75
0.65 0.75 1.00
There is no default value for the fixed working correlation matrix.
MDEPENDENT(integer)
m-dependent working correlation matrix. Specify the value of m in parentheses as an integer greater than or equal to 0. The specified m should be less than the number of row or column levels in the working correlation matrix. If the specified m is greater than the dimension of the working correlation matrix, then m is set equal to the number of row or column levels minus 1. For example, if the dimension of the working correlation matrix is 4, then m should be 3 or less. In this case, if you specify m > 3, then m will be set equal to 3. There is no default value.
UNSTRUCTURED | Unstructured working correlation matrix.
ADJUSTCORR (keyword),ADJUSTCORR (keyword),ADJUSTCORR (keyword)
GENLIN command,GENLIN command,GENLIN command
ADJUSTCORR Keyword Collapse Hide details

ADJUSTCORR Keyword

The ADJUSTCORR keyword indicates whether to adjust the working correlation matrix estimator by the number of nonredundant parameters.

YES | Adjust the working correlation matrix estimator. This is the default.
NO | Compute the working correlation matrix estimator without the adjustment.
COVB (keyword),COVB (keyword),COVB (keyword)
GENLIN command,GENLIN command,GENLIN command
ROBUST (keyword),ROBUST (keyword),ROBUST (keyword)
GENLIN command,GENLIN command,GENLIN command
MODEL (keyword),MODEL (keyword),MODEL (keyword)
GENLIN command,GENLIN command,GENLIN command
COVB Keyword Collapse Hide details

COVB Keyword

The COVB keyword specifies whether to use the robust or the model-based estimator of the parameter estimate covariance matrix for generalized estimating equations.

ROBUST | Robust estimator of the parameter estimate covariance matrix. This is the default.
MODEL | Model-based estimator of the parameter estimate covariance matrix.
HCONVERGE (keyword),HCONVERGE (keyword),HCONVERGE (keyword)
GENLIN command,GENLIN command,GENLIN command
HCONVERGE Keyword Collapse Hide details

HCONVERGE Keyword

The HCONVERGE keyword specifies the Hessian convergence criterion for the generalized estimating equations algorithm. For generalized estimating equations, the Hessian convergence criterion is always absolute.

• Specify a number greater than or equal to 0. If HCONVERGE = 0, the Hessian convergence criterion will be checked value 1E-4after any specified convergence criteria have been satisfied. If it is not met, a warning is displayed. The default value is 0.

• At least one of the REPEATED subcommand keywords HCONVERGE, PCONVERGE must specify a nonzero number.

MAXITERATIONS (keyword),MAXITERATIONS (keyword),MAXITERATIONS (keyword)
GENLIN command,GENLIN command,GENLIN command
MAXITERATIONS Keyword Collapse Hide details

MAXITERATIONS Keyword

The MAXITERATIONS keyword specifies the maximum number of iterations for the generalized estimating equations algorithm.

• Specify an integer greater than or equal to 0. The default value is 100.

PCONVERGE (keyword),PCONVERGE (keyword),PCONVERGE (keyword)
GENLIN command,GENLIN command,GENLIN command
PCONVERGE Keyword Collapse Hide details

PCONVERGE Keyword

The PCONVERGE keyword specifies the parameter convergence criterion for the generalized estimating equations algorithm.

• Specify a number greater than or equal to 0, and the ABSOLUTE or RELATIVE keyword in parentheses to define the type of convergence. The number and keyword may be separated by a space character or a comma. The parameter convergence criterion is not used if the number is 0. The default value is 1E-6 (ABSOLUTE).

• At least one of the REPEATED subcommand keywords HCONVERGE, PCONVERGE must specify a nonzero number.

UPDATECORR (keyword),UPDATECORR (keyword),UPDATECORR (keyword)
GENLIN command,GENLIN command,GENLIN command
UPDATECORR Keyword Collapse Hide details

UPDATECORR Keyword

The UPDATECORR keyword specifies the number of iterations between updates of the working correlation matrix. Elements in the working correlation matrix are based on the parameter estimates, which are updated in each iteration of the algorithm. The UPDATECORR keyword specifies the iteration interval at which to update working correlation matrix elements. Specifying a value greater than 1 may reduce processing time.

• Specify an integer greater than 0.

• The working correlation matrix is not updated at all if the value is 0. In this case, the initial working correlation matrix is used throughout the estimation process.

• The default value is 1. By default, the working correlation matrix is updated after every iteration, beginning with the first.

• The UPDATECORR value must be less than or equal to the REPEATED MAXITERATIONS value.

Related Topics

GENLIN
Overview (GENLIN command)
Examples (GENLIN command)
Variable List (GENLIN command)
MODEL Subcommand (GENLIN command)
CRITERIA Subcommand (GENLIN command)
EMMEANS Subcommand (GENLIN command)
MISSING Subcommand (GENLIN command)
PRINT Subcommand (GENLIN command)
SAVE Subcommand (GENLIN command)
OUTFILE Subcommand (GENLIN command)


EMMEANS Subcommand (GENLIN command)

GENLIN (command),GENLIN (command),GENLIN (command)
EMMEANS subcommand,EMMEANS subcommand,EMMEANS subcommand
EMMEANS (subcommand),EMMEANS (subcommand),EMMEANS (subcommand)
GENLIN command,GENLIN command,GENLIN command

The EMMEANS subcommand displays estimated marginal means of the dependent variable for all level combinations of a set of factors. Note that these are predicted, not observed, means. Estimated marginal means can be computed based on the original scale of the dependent variable or the based on the link function transformation.

• Multiple EMMEANS subcommands are allowed. Each is treated independently.

• The EMMEANS subcommand may be specified with no additional keywords. The output for an empty EMMEANS subcommand is the overall estimated marginal mean of the response, collapsing over any factors and holding any covariates at their overall means.

• Estimated marginal means are not available if the multinomial distribution is used. If DISTRIBUTION = MULTINOMIAL on the MODEL subcommand and the EMMEANS subcommand is specified, then EMMEANS is ignored and a warning is issued.

TABLES (keyword),TABLES (keyword),TABLES (keyword)
GENLIN command,GENLIN command,GENLIN command
TABLES Keyword Collapse Hide details

TABLES Keyword

The TABLES keyword specifies the cells for which estimated marginal means are displayed.

• Valid options are factors appearing on the GENLIN command factor list, and crossed factors constructed of factors on the factor list. Crossed factors can be specified using an asterisk (*) or the keyword BY. All factors in a crossed factor specification must be unique.

• If the TABLES keyword is specified, then the GENLIN procedure collapses over any factors on the GENLIN command factor list but not on the TABLES keyword before computing the estimated marginal means for the dependent variable.

• If the TABLES keyword is not specified, then the overall estimated marginal mean of the dependent variable, collapsing over any factors, is computed.

CONTROL (keyword),CONTROL (keyword),CONTROL (keyword)
GENLIN command,GENLIN command,GENLIN command
CONTROL Keyword Collapse Hide details

CONTROL Keyword

The CONTROL keyword specifies the covariate values to use when computing the estimated marginal means.

• Specify one or more covariates appearing on the GENLIN command covariate list, each of which must be followed by a numeric value or the keyword MEAN in parentheses.

• If a numeric value is given for a covariate, then the estimated marginal means will be computed by holding the covariate at the supplied value. If the keyword MEAN is used, then the estimated marginal means will be computed by holding the covariate at its overall mean. If a covariate is not specified on the CONTROL option, then its overall mean will be used in estimated marginal means calculations.

• Any covariate may occur only once on the CONTROL keyword.

SCALE (keyword),SCALE (keyword),SCALE (keyword)
GENLIN command,GENLIN command,GENLIN command
ORIGINAL (keyword),ORIGINAL (keyword),ORIGINAL (keyword)
GENLIN command,GENLIN command,GENLIN command
TRANSFORMED (keyword),TRANSFORMED (keyword),TRANSFORMED (keyword)
GENLIN command,GENLIN command,GENLIN command
SCALE Keyword Collapse Hide details

SCALE Keyword

The SCALE keyword specifies whether to compute estimated marginal means based on the original scale of the dependent variable or based on the link function transformation.

ORIGINAL | Estimated marginal means are based on the original scale of the dependent variable. Estimated marginal means are computed for the response. This is the default. Note that when the dependent variable is specified using the events/trials option, ORIGINAL gives the estimated marginal means for the events/trials proportion rather than for the number of events.
TRANSFORMED | Estimated marginal means are based on the link function transformation. Estimated marginal means are computed for the linear predictor.

Example

The following syntax specifies a logistic regression model with binary dependent variable Y and categorical predictor A. Estimated marginal means are requested for each level of A. Because SCALE = ORIGINAL is used, the estimated marginal means are based on the original response. Thus, the estimated marginal means are real numbers between 0 and 1. If SCALE = TRANSFORMED had been used instead, then the estimated marginal means would be based on the logit-transformed response and would be real numbers between negative and positive infinity.

GENLIN y BY a
  /MODEL a
    DISTRIBUTION=BINOMIAL
    LINK=LOGIT
  /EMMEANS TABLES=a SCALE=ORIGINAL.
COMPARE (keyword),COMPARE (keyword),COMPARE (keyword)
GENLIN command,GENLIN command,GENLIN command
COMPARE Keyword Collapse Hide details

COMPARE Keyword

The COMPARE keyword specifies a factor or a set of crossed factors, the levels or level combinations of which are compared using the contrast type specified on the CONTRAST keyword.

• Valid options are factors appearing on the TABLES keyword. Crossed factors can be specified using an asterisk (*) or the keyword BY. All factors in a crossed factor specification must be unique.

• The COMPARE keyword is valid only if the TABLES keyword is also specified.

• If a single factor is specified, then levels of the factor are compared for each level combination of any other factors on the TABLES keyword.

• If a set of crossed factors is specified, then level combinations of the crossed factors are compared for each level combination of any other factors on the TABLES keyword. Crossed factors may be specified only if PAIRWISE is specified on the CONTRAST keyword.

• By default, the GENLIN procedure sorts levels of the factors in ascending order and defines the highest level as the last level. (If the factor is a string variable, then the value of the highest level is locale-dependent.) However, the sort order can be modified using the ORDER keyword following the factor list on the GENLIN command.

• Only one COMPARE keyword is allowed on a given EMMEANS subcommand.

PAIRWISE (keyword),PAIRWISE (keyword),PAIRWISE (keyword)
GENLIN command,GENLIN command,GENLIN command
CONTRAST (keyword),CONTRAST (keyword),CONTRAST (keyword)
GENLIN command,GENLIN command,GENLIN command
SIMPLE (keyword),SIMPLE (keyword),SIMPLE (keyword)
GENLIN command,GENLIN command,GENLIN command
DEVIATION (keyword),DEVIATION (keyword),DEVIATION (keyword)
GENLIN command,GENLIN command,GENLIN command
DIFFERENCE (keyword),DIFFERENCE (keyword),DIFFERENCE (keyword)
GENLIN command,GENLIN command,GENLIN command
HELMERT (keyword),HELMERT (keyword),HELMERT (keyword)
GENLIN command,GENLIN command,GENLIN command
REPEATED (keyword),REPEATED (keyword),REPEATED (keyword)
GENLIN command,GENLIN command,GENLIN command
POLYNOMIAL (keyword),POLYNOMIAL (keyword),POLYNOMIAL (keyword)
GENLIN command,GENLIN command,GENLIN command
CONTRAST Keyword Collapse Hide details

CONTRAST Keyword

The CONTRAST keyword specifies the type of contrast to use for the levels of the factor, or level combinations of the crossed factors, on the COMPARE keyword. The CONTRAST keyword creates an L matrix (that is, a coefficient matrix) such that the columns corresponding to the factor(s) match the contrast given. The other columns are adjusted so that the L matrix is estimable.

• The CONTRAST keyword is valid only if the COMPARE keyword is also specified.

• If a single factor is specified on the COMPARE keyword, then any contrast type may be specified on the CONTRAST keyword.

• If a set of crossed factors is specified on the COMPARE keyword, then only the PAIRWISE keyword may be specified on the CONTRAST keyword.

• Only one CONTRAST keyword is allowed on a given EMMEANS subcommand.

• If the COMPARE keyword is specified without CONTRAST, then pairwise comparisons are performed for the factor(s) on COMPARE.

• DIFFERENCE, HELMERT, REPEATED, and SIMPLE contrasts are defined with respect to a first or last level. The first or last level is determined by the ORDER specification following the factors on the GENLIN command line. By default, ORDER = ASCENDING and the last level corresponds to the last level.

The following contrast types are available.

PAIRWISE | Pairwise comparisons are computed for all level combinations of the specified or implied factors. This is the default contrast type.
For example,
GENLIN y BY a b c
  …
  /EMMEANS TABLES=a*b*c COMPARE a*b CONTRAST=PAIRWISE.
The specified contrast performs pairwise comparisons of all level combinations of factors A and B, for each level of factor C.
Pairwise contrasts are not orthogonal.
DEVIATION (value)
Each level of the factor is compared to the grand mean. Deviation contrasts are not orthogonal.
DIFFERENCE | Each level of the factor except the first is compared to the mean of previous levels. In a balanced design, difference contrasts are orthogonal.
HELMERT | Each level of the factor except the last is compared to the mean of subsequent levels. In a balanced design, Helmert contrasts are orthogonal.
POLYNOMIAL (number list)
Polynomial contrasts. The first degree of freedom contains the linear effect across the levels of the factor, the second contains the quadratic effect, and so on. By default, the levels are assumed to be equally spaced; the default metric is (1 2 . . . k), where k levels are involved. The POLYNOMIAL keyword may be followed optionally by parentheses containing a number list. Numbers in the list must be separated by spaces or commas. Unequal spacing may be specified by entering a metric consisting of one number for each level of the factor. Only the relative differences between the terms of the metric matter. Thus, for example, (1 2 4) is the same metric as (2 3 5) or (20 30 50) because, in each instance, the difference between the second and third numbers is twice the difference between the first and second. All numbers in the metric must be unique; thus, (1 1 2) is not valid.
A user-specified metric must supply at least as many numbers as there are levels of the compared factor. If too few numbers are specified, then a warning is issued and hypothesis tests are not performed. If too many numbers are specified, then a warning is issued but hypothesis tests are still performed. In the latter case, the contrast is created based on the specified numbers beginning with the first and using as many numbers as there are levels of the compared factor. In any event, we recommend printing the L matrix (/PRINT LMATRIX) to confirm that the proper contrast is being constructed.
For example,
GENLIN y BY a
  …
  /EMMEANS TABLES=a CONTRAST=POLYNOMIAL(1 2 4).
Suppose that factor A has three levels. The specified contrast indicates that the three levels of A are actually in the proportion 1:2:4.
Alternatively, suppose that factor A has two levels. In this case, the specified contrast indicates that the two levels of A are in the proportion 1:2.
In a balanced design, polynomial contrasts are orthogonal.
REPEATED | Each level of the factor except the last is compared to the next level. Repeated contrasts are not orthogonal.
SIMPLE (value)
Each level of the factor except the last is compared to the last level. The SIMPLE keyword may be followed optionally by parentheses containing a value. Put the value inside a pair of quotes if it is formatted (such as date or currency) or if the factor is of string type. If a value is specified, then the factor level with that value is used as the omitted reference category. If the specified value does not exist in the data, then a warning is issued and the last level is used.
For example,
GENLIN y BY a
  …
  /EMMEANS TABLES=a CONTRAST=SIMPLE(1).
The specified contrast compares all levels of factor A (except level 1) to level 1.
Simple contrasts are not orthogonal.
PADJUST (keyword),PADJUST (keyword),PADJUST (keyword)
GENLIN command,GENLIN command,GENLIN command
LSD (keyword),LSD (keyword),LSD (keyword)
GENLIN command,GENLIN command,GENLIN command
BONFERRONI (keyword),BONFERRONI (keyword),BONFERRONI (keyword)
GENLIN command,GENLIN command,GENLIN command
SEQBONFERRONI (keyword),SEQBONFERRONI (keyword),SEQBONFERRONI (keyword)
GENLIN command,GENLIN command,GENLIN command
SIDAK (keyword),SIDAK (keyword),SIDAK (keyword)
GENLIN command,GENLIN command,GENLIN command
SEQSIDAK (keyword),SEQSIDAK (keyword),SEQSIDAK (keyword)
GENLIN command,GENLIN command,GENLIN command
PADJUST Keyword Collapse Hide details

PADJUST Keyword

The PADJUST keyword indicates the method of adjusting the significance level.

LSD | Least significant difference. This method does not control the overall probability of rejecting the hypotheses that some linear contrasts are different from the null hypothesis value(s). This is the default.
BONFERRONI
 | Bonferroni. This method adjusts the observed significance level for the fact that multiple contrasts are being tested.
SEQBONFERRONI
 | Sequential Bonferroni. This is a sequentially step-down rejective Bonferroni procedure that is much less conservative in terms of rejecting individual hypotheses but maintains the same overall significance level.
SIDAK | Sidak. This method provides tighter bounds than the Bonferroni approach.
SEQSIDAK | Sequential Sidak. This is a sequentially step-down rejective Sidak procedure that is much less conservative in terms of rejecting individual hypotheses but maintains the same overall significance level.
DISPLAY (keyword),DISPLAY (keyword),DISPLAY (keyword)
GENLIN command,GENLIN command,GENLIN command
NONE (keyword),NONE (keyword),NONE (keyword)
GENLIN command,GENLIN command,GENLIN command
CORRELATIONS (keyword),CORRELATIONS (keyword),CORRELATIONS (keyword)
GENLIN command,GENLIN command,GENLIN command
COVARIANCES (keyword),COVARIANCES (keyword),COVARIANCES (keyword)
GENLIN command,GENLIN command,GENLIN command
ALL (keyword),ALL (keyword),ALL (keyword)
GENLIN command,GENLIN command,GENLIN command

Related Topics

GENLIN
Overview (GENLIN command)
Examples (GENLIN command)
Variable List (GENLIN command)
MODEL Subcommand (GENLIN command)
CRITERIA Subcommand (GENLIN command)
REPEATED Subcommand (GENLIN command)
MISSING Subcommand (GENLIN command)
PRINT Subcommand (GENLIN command)
SAVE Subcommand (GENLIN command)
OUTFILE Subcommand (GENLIN command)


MISSING Subcommand (GENLIN command)

GENLIN (command),GENLIN (command),GENLIN (command)
MISSING subcommand,MISSING subcommand,MISSING subcommand
MISSING (subcommand),MISSING (subcommand),MISSING (subcommand)
GENLIN command,GENLIN command,GENLIN command

The MISSING subcommand specifies how missing values are handled.

• Cases with system missing values on any variable used by the GENLIN procedure are excluded from the analysis.

• Cases must have valid data for the dependent variable or the events and trials variables, any covariates, the OFFSET variable if it exists, the SCALEWEIGHT variable if it exists, and any SUBJECT and WITHINSUBJECT variables. Cases with missing values for any of these variables are not used in the analysis.

• The CLASSMISSING keyword specifies whether user-missing values of any factors are treated as valid.

CLASSMISSING (keyword),CLASSMISSING (keyword),CLASSMISSING (keyword)
GENLIN command,GENLIN command,GENLIN command
EXCLUDE (keyword),EXCLUDE (keyword),EXCLUDE (keyword)
GENLIN command,GENLIN command,GENLIN command
INCLUDE (keyword),INCLUDE (keyword),INCLUDE (keyword)
GENLIN command,GENLIN command,GENLIN command
EXCLUDE | Exclude user-missing values among any factor or subpopulation variables. Treat user-missing values for these variables as invalid data. This is the default.
INCLUDE | Include user-missing values among any factor or subpopulation variables. Treat user-missing values for these variables as valid data.

Related Topics

GENLIN
Overview (GENLIN command)
Examples (GENLIN command)
Variable List (GENLIN command)
MODEL Subcommand (GENLIN command)
CRITERIA Subcommand (GENLIN command)
REPEATED Subcommand (GENLIN command)
EMMEANS Subcommand (GENLIN command)
PRINT Subcommand (GENLIN command)
SAVE Subcommand (GENLIN command)
OUTFILE Subcommand (GENLIN command)


PRINT Subcommand (GENLIN command)

GENLIN (command),GENLIN (command),GENLIN (command)
PRINT subcommand,PRINT subcommand,PRINT subcommand
PRINT (subcommand),PRINT (subcommand),PRINT (subcommand)
GENLIN command,GENLIN command,GENLIN command

The PRINT subcommand is used to display optional output.

• If the PRINT subcommand is not specified, then the default output indicated below is displayed.

• If the PRINT subcommand is specified, then the GENLIN procedure displays output only for those keywords that are specified.

CORB (keyword),CORB (keyword),CORB (keyword)
GENLIN command,GENLIN command,GENLIN command
COVB (keyword),COVB (keyword),COVB (keyword)
GENLIN command,GENLIN command,GENLIN command
CPS (keyword),CPS (keyword),CPS (keyword)
GENLIN command,GENLIN command,GENLIN command
FIT (keyword),FIT (keyword),FIT (keyword)
GENLIN command,GENLIN command,GENLIN command
GEF (keyword),GEF (keyword),GEF (keyword)
GENLIN command,GENLIN command,GENLIN command
HISTORY (keyword),HISTORY (keyword),HISTORY (keyword)
GENLIN command,GENLIN command,GENLIN command
LAGRANGE (keyword),LAGRANGE (keyword),LAGRANGE (keyword)
GENLIN command,GENLIN command,GENLIN command
LMATRIX (keyword),LMATRIX (keyword),LMATRIX (keyword)
GENLIN command,GENLIN command,GENLIN command
MODELINFO (keyword),MODELINFO (keyword),MODELINFO (keyword)
GENLIN command,GENLIN command,GENLIN command
SOLUTION (keyword),SOLUTION (keyword),SOLUTION (keyword)
GENLIN command,GENLIN command,GENLIN command
SUMMARY (keyword),SUMMARY (keyword),SUMMARY (keyword)
GENLIN command,GENLIN command,GENLIN command
DESCRIPTIVES (keyword),DESCRIPTIVES (keyword),DESCRIPTIVES (keyword)
GENLIN command,GENLIN command,GENLIN command
WORKINGCORR (keyword),WORKINGCORR (keyword),WORKINGCORR (keyword)
GENLIN command,GENLIN command,GENLIN command
NONE (keyword),NONE (keyword),NONE (keyword)
GENLIN command,GENLIN command,GENLIN command
CORB | Correlation matrix for parameter estimates.
COVB | Covariance matrix for parameter estimates.
CPS | Case processing summary. For generalized estimating equations, this keyword also displays the Correlated Data Summary table. This is the default output if the PRINT subcommand is not specified.
DESCRIPTIVES
 | Descriptive statistics. Displays descriptive statistics and summary information about the dependent variable, covariates, factors. This is the default output if the PRINT subcommand is not specified.
FIT | Goodness of fit. For generalized linear models, displays deviance and scaled deviance, Pearson chi-square and scaled Pearson chi-square, log likelihood, Akaike's information criterion (AIC), finite sample corrected AIC (AICC), Bayesian information criterion (BIC), and consistent AIC (CAIC).
 | Note that when the scale parameter is fit using the deviance (/CRITERIA SCALE = DEVIANCE) or Pearson chi-square (/CRITERIA SCALE = PEARSON), the algorithm begins by assuming the scale parameter equals 1. Following estimation of the regression coefficients, the estimated scale parameter is calculated. Finally, estimated standard errors, Wald confidence intervals, and significance tests are adjusted based on the estimated scale parameter. However, in order to ensure fair comparison in the information criteria and the model fit omnibus test (see the SUMMARY keyword below), the log likelihood is not revised by the estimated scale parameter. Instead, when the scale parameter is fit using the deviance or Pearson chi-square, the log likelihood is computed with the scale parameter set equal to 1.
 | For generalized estimating equations, displays two extensions of AIC for model selection: Quasi-likelihood under the independence model criterion (QIC) for choosing the best correlation structure, and corrected quasi-likelihood under the independence model criterion (QICC) for choosing the best subset of predictors.
 | The quasi-likelihood functions are computed with the scale parameter set equal to a fixed value if a fixed value is specified on the /CRITERIA SCALE keyword. Otherwise, if /CRITERIA SCALE = MLE, DEVIANCE, or PEARSON, then the quasi-likelihood functions are computed with the scale parameter set equal to 1.
 | Goodness of fit statistics are not available for generalized estimating equations when the multinomial distribution is used. Thus, if the REPEATED subcommand and /MODEL DISTRIBUTION = MULTINOMIAL are specified, then the FIT keyword is silently ignored.
 | This is the default output if the PRINT subcommand is not specified.
GEF | General estimable function.
HISTORY (integer)
 | Iteration history. For generalized linear models, displays the iteration history for the parameter estimates and log-likelihood, and prints the last evaluation of the gradient vector and the Hessian matrix. Also displays the iteration history for the profile likelihood confidence intervals (if requested via CRITERIA CITYPE = PROFILE) and for type I or III analyses (if requested via PRINT SUMMARY).
 | For generalized estimating equations, displays the iteration history for the parameter estimates, and prints the last evaluation of the generalized gradient and the Hessian matrix. Also displays the iteration history for type III analyses (if requested via PRINT SUMMARY).
 | The HISTORY keyword may be followed optionally by an integer n in parentheses, where the integer is greater than zero. The iteration history table displays parameter estimates for every n iterations beginning with the 0th iteration (the initial estimates). The default is to print every iteration (n = 1). If HISTORY is specified, then the last iteration is always displayed regardless of the value of n.
LAGRANGE | Lagrange multiplier test. For the normal, gamma, inverse Gaussian, and Tweedie distributions, displays Lagrange multiplier test statistics for assessing the validity of a scale parameter that is computed using the deviance or Pearson chi-square, or set at a fixed number. For the negative binomial distribution, tests the fixed ancillary parameter.
 | The LAGRANGE keyword is honored if MODEL DISTRIBUTION = NORMAL, GAMMA, IGAUSS, or TWEEDIE and CRITERIA SCALE = DEVIANCE, PEARSON, or number; or if MODEL DISTRIBUTION = NEGBIN(number) is specified. Otherwise the keyword is ignored and a warning is issued.
 | If the REPEATED subcommand is specified, then the LAGRANGE keyword is silently ignored.
LMATRIX | Set of contrast coefficient (L) matrices. Displays contrast coefficients for the default effects and for the estimated marginal means if requested.
MODELINFO | Model information. Displays the dataset name, dependent variable or events and trials variables, offset variable, scale weight variable, probability distribution, and link function.
 | For generalized estimating equations, also displays the subject variables, within-subject variables, and working correlation matrix structure.
 | This is the default output if the PRINT subcommand is not specified.
SOLUTION | Parameter estimates and corresponding statistics. This is the default output if the PRINT subcommand is not specified.
 | The SOLUTION keyword may be followed optionally by the keyword EXPONENTIATED in parentheses to display exponentiated parameter estimates in addition to the raw parameter estimates.
SUMMARY | Model summary statistics. Displays model fit tests, including likelihood ratio statistics for the model fit omnibus test, and statistics for the type I or III contrasts for each effect (depending on the CRITERIA ANALYSISTYPE specification). This is default output if the PRINT subcommand is not specified.
 | If the REPEATED subcommand is specified, then only the statistics for each effect are displayed.
WORKINGCORR
 | Working correlation matrix. This keyword is honored only if the REPEATED is in effect. Otherwise it is silently ignored.
NONE | No PRINT subcommand output. None of the PRINT subcommand output is displayed. If NONE is specified, then no other keywords are allowed on the PRINT subcommand.

Related Topics

GENLIN
Overview (GENLIN command)
Examples (GENLIN command)
Variable List (GENLIN command)
MODEL Subcommand (GENLIN command)
CRITERIA Subcommand (GENLIN command)
REPEATED Subcommand (GENLIN command)
EMMEANS Subcommand (GENLIN command)
MISSING Subcommand (GENLIN command)
SAVE Subcommand (GENLIN command)
OUTFILE Subcommand (GENLIN command)


SAVE Subcommand (GENLIN command)

GENLIN (command),GENLIN (command),GENLIN (command)
SAVE subcommand,SAVE subcommand,SAVE subcommand
SAVE (subcommand),SAVE (subcommand),SAVE (subcommand)
GENLIN command,GENLIN command,GENLIN command

The SAVE subcommand adds predicted, residual, leverage, or Cook's distance values to the working dataset.

• Specify one or more temporary variables, each followed by an optional new name in parentheses.

• The optional names must be unique, valid variable names.

• If new names are not specified, then GENLIN uses the default names. If the default names conflict with existing variable names, then a suffix is added to the default names to make them unique.

The following rules describe the functionality of the SAVE subcommand when the response variable—either the dependent variable or the events or trials variable—has an invalid value for a case.

• If all factors and covariates in the model have valid values for the case, then the procedure computes predicted values but not the residuals. (The MISSING subcommand setting is taken into account when defining valid/invalid values for a factor.)

• An additional restriction for factors is that only those values of the factor actually used in building the model are considered valid. For example, suppose factor A takes values 1, 2, and 3 when the procedure builds the model. Also suppose there is a case with an invalid dependent variable value, a value of 4 on factor A, and valid values on all other factors and covariates. For this case, no predicted value is saved because there is no model coefficient corresponding to factor A = 4.

XBPRED (keyword),XBPRED (keyword),XBPRED (keyword)
GENLIN command,GENLIN command,GENLIN command
XBSTDERROR (keyword),XBSTDERROR (keyword),XBSTDERROR (keyword)
GENLIN command,GENLIN command,GENLIN command
MEANPRED(keyword),MEANPRED(keyword),MEANPRED(keyword)
GENLIN command,GENLIN command,GENLIN command
CIMEANPREDL (keyword),CIMEANPREDL (keyword),CIMEANPREDL (keyword)
GENLIN command,GENLIN command,GENLIN command
CIMEANPREDU (keyword),CIMEANPREDU (keyword),CIMEANPREDU (keyword)
GENLIN command,GENLIN command,GENLIN command
LEVERAGE (keyword),LEVERAGE (keyword),LEVERAGE (keyword)
GENLIN command,GENLIN command,GENLIN command
RESID (keyword),RESID (keyword),RESID (keyword)
GENLIN command,GENLIN command,GENLIN command
PEARSONRESID (keyword),PEARSONRESID (keyword),PEARSONRESID (keyword)
GENLIN command,GENLIN command,GENLIN command
DEVIANCERESID (keyword),DEVIANCERESID (keyword),DEVIANCERESID (keyword)
GENLIN command,GENLIN command,GENLIN command
STDPEARSONRESID (keyword),STDPEARSONRESID (keyword),STDPEARSONRESID (keyword)
GENLIN command,GENLIN command,GENLIN command
STDDEVIANCERESID (keyword),STDDEVIANCERESID (keyword),STDDEVIANCERESID (keyword)
GENLIN command,GENLIN command,GENLIN command
LIKELIHOODRESID (keyword),LIKELIHOODRESID (keyword),LIKELIHOODRESID (keyword)
GENLIN command,GENLIN command,GENLIN command
COOK (keyword),COOK (keyword),COOK (keyword)
GENLIN command,GENLIN command,GENLIN command
XBPRED (varname | rootname:n)
 | Predicted value(s) of the linear predictor. For all distributions except the multinomial, XBPRED creates one variable and the default variable name is XBPredicted. Specify a variable name in parentheses to override the default.
 | For the multinomial distribution, one variable is created for each dependent variable category except the last (see the dependent variable ORDER keyword in the section Variable List (GENLIN command)). XBPRED saves the predicted values of the linear predictor for the first 25 categories, up to but not including the last, by default. The default root name is XBPredicted, and the default variable names are XBPredicted_1, XBPredicted_2, and so on, corresponding to the order of the dependent variable categories. Specify a root name in parentheses to override the default. Specify a colon and a positive integer giving the number of categories to override the default 25. To specify a number without a root name, simply enter a colon before the number.
XBSTDERROR (varname | rootname:n)
 | Estimated standard error(s) of the predicted value of the linear predictor. For all distributions except the multinomial, XBSTDERROR creates one variable and the default variable name is XBStandardError. Specify a variable name in parentheses to override the default.
 | For the multinomial distribution, one variable is created for each dependent variable category except the last (see the dependent variable ORDER keyword in the section Variable List (GENLIN command)). XBSTDERROR saves the estimated standard errors for the first 25 categories, up to but not including the last, by default. The default root name is XBStandardError, and the default variable names are XBStandardError_1, XBStandardError_2, and so on, corresponding to the order of the dependent variable categories. Specify a root name in parentheses to override the default. Specify a colon and a positive integer giving the number of categories to override the default 25. To specify a number without a root name, simply enter a colon before the number.
MEANPRED (varname | rootname:n)
 | Predicted value(s) of the mean of the response. For all distributions except the multinomial, MEANPRED creates one variable and the default variable name is MeanPredicted. Specify a variable name in parentheses to override the default.
 | If the binomial distribution is used and the dependent variable is in single variable format, then MEANPRED computes a predicted probability. Suppose the dependent variable has data values 0 and 1. If the default reference category is in effect, that is, REFERENCE = LAST on the GENLIN command line, then 1 is the reference category and MEANPRED computes the predicted probability that the dependent variable equals 0. To compute the predicted probability that the dependent variable equals 1 instead, specify REFERENCE = FIRST on the GENLIN command line.
 | If the binomial distribution is used and the dependent variable is in events/trials format, then MEANPRED computes the predicted number of events.
 | For the multinomial distribution, one variable is created for each dependent variable category except the last (see the dependent variable ORDER keyword in the section Variable List (GENLIN command)). MEANPRED saves the cumulative predicted probability for the first 25 categories, up to but not including the last, by default. The default root name is CumMeanPredicted, and the default variable names are CumMeanPredicted_1, CumMeanPredicted_2, and so on, corresponding to the order of the dependent variable categories. Specify a root name in parentheses to override the default. Specify a colon and a positive integer giving the number of categories to override the default 25. To specify a number without a root name, simply enter a colon before the number.
CIMEANPREDL (varname | rootname:n)
 | Lower bound(s) of the confidence interval for the mean of the response. For all distributions except the multinomial, CIMEANPREDL creates one variable and the default variable name is CIMeanPredictedLower. Specify a variable name in parentheses to override the default.
 | For the multinomial distribution, one variable is created for each dependent variable category except the last (see the dependent variable ORDER keyword in the section Variable List (GENLIN command)). CIMEANPREDL saves the lower bound of the cumulative predicted probability for the first 25 categories, up to but not including the last, by default. The default root name is CICumMeanPredictedLower, and the default variable names are CICumMeanPredictedLower_1, CICumMeanPredictedLower_2, and so on, corresponding to the order of the dependent variable categories. Specify a root name in parentheses to override the default. Specify a colon and a positive integer giving the number of categories to override the default 25. To specify a number without a root name, simply enter a colon before the number.
CIMEANPREDU (varname | rootname:n)
 | Upper bound(s) of the confidence interval for the mean of the response. For all distributions except the multinomial, CIMEANPREDU creates one variable and the default variable name is CIMeanPredictedUpper. Specify a variable name in parentheses to override the default.
 | For the multinomial distribution, one variable is created for each dependent variable category except the last (see the dependent variable ORDER keyword in the section Variable List (GENLIN command)). CIMEANPREDU saves the upper bound of the cumulative predicted probability for the first 25 categories, up to but not including the last, by default. The default root name is CICumMeanPredictedUpper, and the default variable names are CICumMeanPredictedUpper_1, CICumMeanPredictedUpper_2, and so on, corresponding to the order of the dependent variable categories. Specify a root name in parentheses to override the default. Specify a colon and a positive integer giving the number of categories to override the default 25. To specify a number without a root name, simply enter a colon before the number.
PREDVAL (varname)
 | Predicted category value for binomial or multinomial distribution. The class or value predicted by the model if the binomial or multinomial distribution is in effect. This keyword is honored only if the binomial distribution is used, that is, if DISTRIBUTION = BINOMIAL is specified or implied on the MODEL subcommand and the dependent variable is in single variable format, or the multinomial distribution is used (DISTRIBUTION = MULTINOMIAL). Otherwise, the PREDVAL keyword is ignored with a warning. The default variable name is PredictedValue.
LEVERAGE (varname)
 | Leverage value. The default variable name is Leverage. Leverage values are not available for the multinomial distribution or generalized estimating equations.
RESID (varname)
 | Raw residual. The default variable name is Residual. Raw residuals are not available for the multinomial distribution.
PEARSONRESID (varname)
 | Pearson residual. The default variable name is PearsonResidual. Pearson residuals are not available for the multinomial distribution.
DEVIANCERESID (varname)
 | Deviance residual. The default variable name is DevianceResidual. Deviance residuals are not available for the multinomial distribution or generalized estimating equations.
STDPEARSONRESID (varname)
 | Standardized Pearson residual. The default variable name is StdPearsonResidual. Standardized Pearson residuals are not available for the multinomial distribution or generalized estimating equations.
STDDEVIANCERESID (varname)
 | Standardized deviance residual. The default variable name is StdDevianceResidual. Standardized deviance residuals are not available for the multinomial distribution or generalized estimating equations.
LIKELIHOODRESID (varname)
 | Likelihood residual. The default variable name is LikelihoodResidual. Likelihood residuals are not available for the multinomial distribution or generalized estimating equations.
COOK (varname)
 | Cook's distance. The default variable name is CooksDistance. Cook's distances are not available for the multinomial distribution or generalized estimating equations.

Related Topics

GENLIN
Overview (GENLIN command)
Examples (GENLIN command)
Variable List (GENLIN command)
MODEL Subcommand (GENLIN command)
CRITERIA Subcommand (GENLIN command)
REPEATED Subcommand (GENLIN command)
EMMEANS Subcommand (GENLIN command)
MISSING Subcommand (GENLIN command)
PRINT Subcommand (GENLIN command)
OUTFILE Subcommand (GENLIN command)


OUTFILE Subcommand (GENLIN command)

GENLIN (command),GENLIN (command),GENLIN (command)
OUTFILE subcommand,OUTFILE subcommand,OUTFILE subcommand
OUTFILE (subcommand),OUTFILE (subcommand),OUTFILE (subcommand)
GENLIN command,GENLIN command,GENLIN command

The OUTFILE subcommand saves an external PASW Statistics data file or previously declared dataset containing the parameter correlation or covariance matrix with parameter estimates, standard errors, significance values, and degrees of freedom. It also saves the parameter estimates and the parameter covariance matrix in XML format.

• At least one keyword and a filename are required.

• The COVB and CORB keywords are mutually exclusive, as are the MODEL and PARAMETER keywords.

• The filename must be specified in full. GENLIN does not supply an extension.

COVB (keyword),COVB (keyword),COVB (keyword)
GENLIN command,GENLIN command,GENLIN command
CORB (keyword),CORB (keyword),CORB (keyword)
GENLIN command,GENLIN command,GENLIN command
MODEL (keyword),MODEL (keyword),MODEL (keyword)
GENLIN command,GENLIN command,GENLIN command
PARAMETER (keyword),PARAMETER (keyword),PARAMETER (keyword)
GENLIN command,GENLIN command,GENLIN command
CUSTOM (keyword),CUSTOM (keyword),CUSTOM (keyword)
GENLIN command,GENLIN command,GENLIN command
COVB = 'savfile' | 'dataset'
 | Writes the parameter covariance matrix and other statistics to an external PASW Statistics data file or previously declared dataset.
CORB = 'savfile' | 'dataset'
 | Writes the parameter correlation matrix and other statistics to an external PASW Statistics data file or previously declared dataset..
MODEL = 'file'
 | Writes the parameter estimates and the parameter covariance matrix to an XML file.
PARAMETER = 'file'
 | Writes the parameter estimates to an XML file.

Related Topics

GENLIN
Overview (GENLIN command)
Examples (GENLIN command)
Variable List (GENLIN command)
MODEL Subcommand (GENLIN command)
CRITERIA Subcommand (GENLIN command)
REPEATED Subcommand (GENLIN command)
EMMEANS Subcommand (GENLIN command)
MISSING Subcommand (GENLIN command)
PRINT Subcommand (GENLIN command)
SAVE Subcommand (GENLIN command)


GENLOG

General Loglinear Analysis,General Loglinear Analysis,General Loglinear Analysis
command syntax,command syntax,command syntax
GENLOG (command),GENLOG (command),GENLOG (command)
GENLOG (command),GENLOG (command),GENLOG (command)
syntax chart,syntax chart,syntax chart

GENLOG is available in the Advanced Statistics option.

GENLOG varlist[BY] varlist [WITH covariate varlist]

 [/CSTRUCTURE=varname]

 [/GRESID=varlist]

 [/GLOR=varlist]

 [/MODEL={POISSON**  }]
         {MULTINOMIAL}

 [/CRITERIA=[CONVERGE({0.001**})][ITERATE({20**})][DELTA({0.5**})]
                      {n      }           {n   }         {n    }

            [CIN({95**})] [EPS({1E-8**})]
                 {n   }       {n     }

            [DEFAULT]

 [/PRINT=[FREQ**][RESID**][ADJRESID**][DEV**]
         [ZRESID][ITERATION][COV][DESIGN][ESTIM][CORR]
         [ALL] [NONE]
         [DEFAULT]]

 [/PLOT={DEFAULT**                 }]
        {RESID([ADJRESID][DEV])    }
        {NORMPROB([ADJRESID][DEV]) }
        {NONE                      }

 [/SAVE=tempvar (newvar)[tempvar (newvar)...]]

 [/MISSING=[{EXCLUDE**}]]
            {INCLUDE  }

 [/DESIGN=effect[(n)] effect[(n)]... effect {BY} effect...]
                                            {* }

**Default if the subcommand or keyword is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See GENLOG Multinomial Loglinear and Logit Models Algorithms and GENLOG Poisson Loglinear Model Algorithms for computational details for this procedure.

Syntax for the GENLOG command can be generated from the General Loglinear Analysis dialog.

Example

GENLOG DPREF RACE CAMP.

Related Topics

Overview (GENLOG command)
Examples (GENLOG command)
Variable List (GENLOG command)
CSTRUCTURE Subcommand (GENLOG command)
GRESID Subcommand (GENLOG command)
GLOR Subcommand (GENLOG command)
MODEL Subcommand (GENLOG command)
CRITERIA Subcommand (GENLOG command)
PRINT Subcommand (GENLOG command)
PLOT Subcommand (GENLOG command)
MISSING Subcommand (GENLOG command)
SAVE Subcommand (GENLOG command)
DESIGN Subcommand (GENLOG command)
References (GENLOG command)


Overview (GENLOG command)

GENLOG is a general procedure for model fitting, hypothesis testing, and parameter estimation for any model that has categorical variables as its major components. As such, GENLOG subsumes a variety of related techniques, including general models of multiway contingency tables, logit models, logistic regression on categorical variables, and quasi-independence models.

GENLOG, following the regression approach, uses dummy coding to construct a design matrix for estimation and produces maximum likelihood estimates of parameters by means of the Newton-Raphson algorithm. Since the regression approach uses the original parameter spaces, the parameter estimates correspond to the original levels of the categories and are therefore easier to interpret.

HILOGLINEAR, which uses an iterative proportional-fitting algorithm, is more efficient for hierarchical models and useful in model building, but it cannot produce parameter estimates for unsaturated models, does not permit specification of contrasts for parameters, and does not display a correlation matrix of the parameter estimates.

The General Loglinear Analysis and Logit Loglinear Analysis dialog boxes are both associated with the GENLOG command. In previous releases, these dialog boxes were associated with the LOGLINEAR command. The LOGLINEAR command is now available only as a syntax command. The differences are described in the discussion of the LOGLINEAR command.

Options Collapse Hide details

Options

Cell Weights. You can specify cell weights (such as structural zero indicators) for the model with the CSTRUCTURE subcommand.

Linear Combinations. You can compute linear combinations of observed cell frequencies, expected cell frequencies, and adjusted residuals using the GRESID subcommand.

Generalized Log-Odds Ratios. You can specify contrast variables on the GLOR subcommand and test whether the generalized log-odds ratio equals 0.

Model Assumption. You can specify POISSON or MULTINOMIAL on the MODEL subcommand to request the Poisson loglinear model or the product multinomial loglinear model.

Tuning the Algorithm. You can control the values of algorithm-tuning parameters with the CRITERIA subcommand.

Output Display. You can control the output display with the PRINT subcommand.

Optional Plots. You can request plots of adjusted or deviance residuals against observed and expected counts, or normal plots and detrended normal plots of adjusted or deviance residuals using the PLOT subcommand.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is one or more factor variables that define the tabulation. By default, GENLOG assumes a Poisson distribution and estimates the saturated model. Default output includes the factors or effects, their levels, and any labels; observed and expected frequencies and percentages for each factor and code; and residuals, adjusted residuals, and deviance residuals.

GENLOG (command),GENLOG (command),GENLOG (command)
limitations,limitations,limitations
Limitations Collapse Hide details

Limitations

• Maximum 10 factor variables (dependent and independent).

• Maximum 200 covariates.

Subcommand Order Collapse Hide details

Subcommand Order

• The variable specification must come first.

• Subcommands can be specified in any order.

• When multiple subcommands are specified, only the last specification takes effect.

Related Topics

GENLOG
Examples (GENLOG command)
Variable List (GENLOG command)
CSTRUCTURE Subcommand (GENLOG command)
GRESID Subcommand (GENLOG command)
GLOR Subcommand (GENLOG command)
MODEL Subcommand (GENLOG command)
CRITERIA Subcommand (GENLOG command)
PRINT Subcommand (GENLOG command)
PLOT Subcommand (GENLOG command)
MISSING Subcommand (GENLOG command)
SAVE Subcommand (GENLOG command)
DESIGN Subcommand (GENLOG command)
References (GENLOG command)


Examples (GENLOG command)

GENLOG DPREF RACE CAMP.

• DPREF, RACE, and CAMP are categorical variables.

• This is a general loglinear model because no BY keyword appears.

• The design defaults to a saturated model that includes all main effects and two-way and three-way interaction effects.

Example: Specifying a Custom Model

GENLOG GSLEVEL EDUC SEX
  /DESIGN=GSLEVEL EDUC SEX.

• GSLEVEL, EDUC, and SEX are categorical variables.

• DESIGN specifies a model with main effects only.

Poisson Regression

WEIGHT
  BY accid .
GENLOG
  agecat gender  /CSTRUCTURE = pop
  /MODEL = POISSON
  /PRINT = FREQ RESID DEV ADJRESID ESTIM CORR COV
  /CRITERIA = CIN(95) ITERATE(20) CONVERGE(.001) DELTA(.5)
  /DESIGN .

• The procedure examines the relationship between agecat and gender. Cases are weighted by accid to give the raw cell counts, and the CSTRUCTURE subcommand specifies that pop should be used to weight the cells to account for cell-to-cell variation in the population at risk.

• The empty DESIGN subcommand means that a saturated model will be fit. No plots are produced for a saturated model.

• The PRINT subcommand requests, in addition to the default output, the parameter estimates and the correlation and covariance matrix of the estimates.

For discussion of output from this syntax and to place the example in context, see Using General Loglinear Analysis to Model Accident Rates.

Paired Data : Symmetry, Quasi-Symmetry, and Quasi-Independence Models

WEIGHT
  BY count .
GENLOG
  pref1 pref2  WITH s12 s13 s14 s23 s24 s34  /CSTRUCTURE = offdiag
  /MODEL = POISSON
  /PRINT = FREQ RESID DEV ADJRESID
  /PLOT = NONE
  /CRITERIA = CIN(95) ITERATE(20) CONVERGE(.001) DELTA(.5)
  /DESIGN s12 s13 s14 s23 s24 s34  .

• The procedure examines the relationship between pref1 and pref2, using s12, s13, s14, s23, s24, and s34 as cell covariates. Cases are weighted by count to give the raw cell counts, and the CSTRUCTURE subcommand specifies that offdiag should be used to indicate the off-diagonal cells of interest that correspond to cases that switched their preferred candidate.

• The DESIGN subcommand specifies that a symmetry model will be fit; the symmetry model for paired data supposes that for each supporter a candidate gained from another contender, they lost a supporter to that same contender.

• The PLOT subcommand turns off the default plots.

• All other options are set to their default values.

GENLOG
  pref1 pref2  WITH s12 s13 s14 s23 s24 s34  /CSTRUCTURE = offdiag
  /MODEL = POISSON
  /PRINT = FREQ RESID DEV ADJRESID
  /PLOT = NONE
  /CRITERIA = CIN(95) ITERATE(20) CONVERGE(.001) DELTA(.5)
  /DESIGN pref1 pref2 s12 s13 s14 s23 s24 s34  .

• The DESIGN subcommand now specifies a quasi-symmetry model will be fit; the likelihood ratio statistic from symmetry and quasi-symmetry models can be compared to determine whether there is a statistically significant change in voter preference after the debate.

GENLOG
  pref1 pref2  /CSTRUCTURE = offdiag
  /MODEL = POISSON
  /PRINT = FREQ RESID DEV ADJRESID
  /PLOT = NONE
  /CRITERIA = CIN(95) ITERATE(20) CONVERGE(.001) DELTA(.5)
  /DESIGN pref1 pref2  .

• The procedure now removes the cell covariates to specify the quasi-independence model, which is a main-effect model of pref1 and pref2 with offdiag as the cell structure variable. When marginal homogeneity does not hold, the quasi-independence model tests the null hypothesis that respondents who switched from a given candidate did not tend to move to particular oppenents.

For discussion of output from these syntax jobs and to place the example in context, see Paired Data.

Logit Loglinear Analysis

GENLOG
  bfast  BY active gender agecat
  /MODEL = MULTINOMIAL
  /PRINT = FREQ RESID DEV ADJRESID  ESTIM CORR COV
  /PLOT = NONE
  /CRITERIA = CIN(95) ITERATE(20) CONVERGE(.001) DELTA(.5)
  /DESIGN bfast bfast*active bfast*agecat  .

• The keyword BY on the variable list specifies a logit model in which bfast is the dependent variable and active, gender, and agecat are the independent variables.

• A logit model is multinomial.

• The DESIGN subcommand specifies a model that tests for the absence of the joint effect of active and agecat on bfast.

• The PLOT subcommand turns off the default plots.

• The PRINT subcommand requests, in addition to the default output, the parameter estimates and the correlation and covariance matrix of the estimates.

• All other options are set to their default values.

For discussion of output from this syntax and to place the example in context, see Using Logit Loglinear Analysis to Model Consumer Preference of Packaged Goods.

Related Topics

GENLOG
Overview (GENLOG command)
Variable List (GENLOG command)
CSTRUCTURE Subcommand (GENLOG command)
GRESID Subcommand (GENLOG command)
GLOR Subcommand (GENLOG command)
MODEL Subcommand (GENLOG command)
CRITERIA Subcommand (GENLOG command)
PRINT Subcommand (GENLOG command)
PLOT Subcommand (GENLOG command)
MISSING Subcommand (GENLOG command)
SAVE Subcommand (GENLOG command)
DESIGN Subcommand (GENLOG command)
References (GENLOG command)


Variable List (GENLOG command)

GENLOG (command),GENLOG (command),GENLOG (command)
variable list,variable list,variable list

The variable list specifies the variables to be included in the model. GENLOG analyzes two classes of variables—categorical and continuous. Categorical variables are used to define the cells of the table. Continuous variables are used as cell covariates.

• The list of categorical variables must be specified first. Categorical variables must be numeric.

• Continuous variables can be specified only after the WITH keyword following the list of categorical variables.

• To specify a logit model, use the keyword BY(see Logit Model (GENLOG command)). A variable list without the keyword BY generates a general loglinear model.

• A variable can be specified only once in the variable list—as a dependent variable immediately following GENLOG, as an independent variable following the keyword BY, or as a covariate following the keyword WITH.

• No range needs to be specified for categorical variables.

Related Topics

GENLOG
Overview (GENLOG command)
Examples (GENLOG command)
CSTRUCTURE Subcommand (GENLOG command)
GRESID Subcommand (GENLOG command)
GLOR Subcommand (GENLOG command)
MODEL Subcommand (GENLOG command)
CRITERIA Subcommand (GENLOG command)
PRINT Subcommand (GENLOG command)
PLOT Subcommand (GENLOG command)
MISSING Subcommand (GENLOG command)
SAVE Subcommand (GENLOG command)
DESIGN Subcommand (GENLOG command)
References (GENLOG command)
Logit Model (GENLOG command)
Cell Covariates (GENLOG command)


Logit Model (GENLOG command)

GENLOG (command),GENLOG (command),GENLOG (command)
logit model,logit model,logit model
BY (keyword),BY (keyword),BY (keyword)
GENLOG command,GENLOG command,GENLOG command

The logit model examines the relationships between dependent and independent factor variables.

• To separate the independent variables from the dependent variables in a logit model, use the keyword BY. The categorical variables preceding BY are the dependent variables; the categorical variables following BY are the independent variables.

• Up to 10 variables can be specified, including both dependent and independent variables.

• For the logit model, you must specify MULTINOMIAL on the MODEL subcommand.

• GENLOG displays an analysis of dispersion and two measures of association—entropy and concentration. These measures are discussed elsewhere (Haberman, 1982) and can be used to quantify the magnitude of association among the variables. Both are proportional-reduction-in-error measures. The entropy statistic is analogous to Theil’s entropy measure, while the concentration statistic is analogous to Goodman and Kruskal’s tau-b. Both statistics measure the strength of association between the dependent variable and the independent variable set.

Example

GENLOG  GSLEVEL BY EDUC SEX
  /MODEL=MULTINOMIAL
  /DESIGN=GSLEVEL, GSLEVEL BY EDUC, GSLEVEL BY SEX.

• The keyword BY on the variable list specifies a logit model in which GSLEVEL is the dependent variable and EDUC and SEX are the independent variables.

• A logit model is multinomial.

• DESIGN specifies a model that can test for the absence of the joint effect of SEX and EDUC on GSLEVEL.

Related Topics

Variable List (GENLOG command)
Cell Covariates (GENLOG command)


Cell Covariates (GENLOG command)

GENLOG (command),GENLOG (command),GENLOG (command)
cell covariates,cell covariates,cell covariates

• Continuous variables can be used as covariates. When used, the covariates must be specified after the WITH keyword following the list of categorical variables.

• A variable cannot be named as both a categorical variable and a cell covariate.

• To enter cell covariates into a model, the covariates must be specified on the DESIGN subcommand.

• Cell covariates are not applied on a case-by-case basis. The weighted covariate mean for a cell is applied to that cell.

Example

GENLOG DPREF RACE CAMP WITH X
  /DESIGN=DPREF RACE CAMP X.

• The variable X is a continuous variable specified as a cell covariate. Cell covariates must be specified after the keyword WITH following the variable list. No range is defined for cell covariates.

• To include the cell covariate in the model, the variable X is specified on DESIGN.

Related Topics

Variable List (GENLOG command)
Logit Model (GENLOG command)


CSTRUCTURE Subcommand (GENLOG command)

CSTRUCTURE (subcommand),CSTRUCTURE (subcommand),CSTRUCTURE (subcommand)
GENLOG command,GENLOG command,GENLOG command
GENLOG (command),GENLOG (command),GENLOG (command)
CSTRUCTURE subcommand,CSTRUCTURE subcommand,CSTRUCTURE subcommand
GENLOG (command),GENLOG (command),GENLOG (command)
cell weights,cell weights,cell weights
GENLOG (command),GENLOG (command),GENLOG (command)
cell structure,cell structure,cell structure

CSTRUCTURE specifies the variable that contains values for computing cell weights, such as structural zero indicators. By default, cell weights are equal to 1.

• The specification must be a numeric variable.

• Variables specified as dependent or independent variables in the variable list cannot be specified on CSTRUCTURE.

GENLOG (command),GENLOG (command),GENLOG (command)
structural zeros,structural zeros,structural zeros

• Cell weights are not applied on a case-by-case basis. The weighted mean for a cell is applied to that cell.

• CSTRUCTURE can be used to impose structural, or a priori, zeros on the model. This feature is useful in specifying a quasi-symmetry model and in excluding cells from entering into estimation.

• If multiple CSTRUCTURE subcommands are specified, the last specification takes effect.

Example

COMPUTE  CWT=(HUSED NE WIFED).
GENLOG HUSED WIFED WITH DISTANCE
  /CSTRUCTURE=CWT
  /DESIGN=HUSED WIFED DISTANCE.

• The Boolean expression assigns CWT the value of 1 when HUSED is not equal to WIFED, and the value of 0 otherwise.

• CSTRUCTURE imposes structural zeros on the diagonal of the symmetric crosstabulation.

Related Topics

GENLOG
Overview (GENLOG command)
Examples (GENLOG command)
Variable List (GENLOG command)
GRESID Subcommand (GENLOG command)
GLOR Subcommand (GENLOG command)
MODEL Subcommand (GENLOG command)
CRITERIA Subcommand (GENLOG command)
PRINT Subcommand (GENLOG command)
PLOT Subcommand (GENLOG command)
MISSING Subcommand (GENLOG command)
SAVE Subcommand (GENLOG command)
DESIGN Subcommand (GENLOG command)
References (GENLOG command)


GRESID Subcommand (GENLOG command)

GRESID (subcommand),GRESID (subcommand),GRESID (subcommand)
GENLOG command,GENLOG command,GENLOG command
GENLOG (command),GENLOG (command),GENLOG (command)
GRESID subcommand,GRESID subcommand,GRESID subcommand
GENLOG (command),GENLOG (command),GENLOG (command)
generalized residuals,generalized residuals,generalized residuals

GRESID (Generalized Residual) calculates linear combinations of observed and expected cell frequencies as well as simple, standardized, and adjusted residuals.

• The variables specified must be numeric, and they must contain coefficients of the desired linear combinations.

• Variables specified as dependent or independent variables in the variable list cannot be specified on GRESID.

• The generalized residual coefficient is not applied on a case-by-case basis. The weighted coefficient mean of the value for all cases in a cell is applied to that cell.

• Each variable specified on the GRESID subcommand contains a single linear combination.

• If multiple GRESID subcommands are specified, the last specification takes effect.

Example

COMPUTE GR_1=(MONTH LE 6).
COMPUTE GR_2=(MONTH GE 7).
GENLOG  MONTH WITH Z
 /GRESID=GR_1 GR_2
 /DESIGN=Z.

• The first variable, GR_1, combines the first six months into a single effect; the second variable, GR_2, combines the rest of the months.

• For each effect, GENLOG displays the observed and expected counts as well as the simple, standardized, and adjusted residuals.

Related Topics

GENLOG
Overview (GENLOG command)
Examples (GENLOG command)
Variable List (GENLOG command)
CSTRUCTURE Subcommand (GENLOG command)
GLOR Subcommand (GENLOG command)
MODEL Subcommand (GENLOG command)
CRITERIA Subcommand (GENLOG command)
PRINT Subcommand (GENLOG command)
PLOT Subcommand (GENLOG command)
MISSING Subcommand (GENLOG command)
SAVE Subcommand (GENLOG command)
DESIGN Subcommand (GENLOG command)
References (GENLOG command)


GLOR Subcommand (GENLOG command)

GENLOG (command),GENLOG (command),GENLOG (command)
GLOR subcommand,GLOR subcommand,GLOR subcommand
GLOR (subcommand),GLOR (subcommand),GLOR (subcommand)
GENLOG command,GENLOG command,GENLOG command
GENLOG (command),GENLOG (command),GENLOG (command)
log-odds ratio,log-odds ratio,log-odds ratio
log-odds ratio,log-odds ratio,log-odds ratio
GENLOG command,GENLOG command,GENLOG command

GLOR (Generalized Log-Odds Ratio) specifies the population contrast variable(s). For each variable specified, GENLOG tests the null hypothesis that the generalized log-odds ratio equals 0 and displays the Wald statistic and the confidence interval. You can specify the level of the confidence interval using the CIN significance-level keyword on CRITERIA. By default, the confidence level is 95%.

• The variable sum is 0 for the loglinear model and for each combined level of independent variables for the logit model.

• Variables specified as dependent or independent variables in the variable list cannot be specified on GLOR.

• The coefficient is not applied on a case-by-case basis. The weighted mean for a cell is applied to that cell.

• If multiple GLOR subcommands are specified, the last specification takes effect.

Example

GENLOG A B
 /GLOR=COEFF
 /DESIGN=A B.

• The variable COEFF contains the coefficients of two dichotomous factors A and B.

• If the weighted cell mean for COEFF is 1 when A equals B and –1 otherwise, this example tests whether the log-odds ratio equals 0, or in this case, whether variables A and B are independent.

Related Topics

GENLOG
Overview (GENLOG command)
Examples (GENLOG command)
Variable List (GENLOG command)
CSTRUCTURE Subcommand (GENLOG command)
GRESID Subcommand (GENLOG command)
MODEL Subcommand (GENLOG command)
CRITERIA Subcommand (GENLOG command)
PRINT Subcommand (GENLOG command)
PLOT Subcommand (GENLOG command)
MISSING Subcommand (GENLOG command)
SAVE Subcommand (GENLOG command)
DESIGN Subcommand (GENLOG command)
References (GENLOG command)


MODEL Subcommand (GENLOG command)

GENLOG (command),GENLOG (command),GENLOG (command)
MODEL subcommand,MODEL subcommand,MODEL subcommand
MODEL (subcommand),MODEL (subcommand),MODEL (subcommand)
GENLOG command,GENLOG command,GENLOG command
GENLOG (command),GENLOG (command),GENLOG (command)
Poisson distribution,Poisson distribution,Poisson distribution
Poisson distribution,Poisson distribution,Poisson distribution
GENLOG command,GENLOG command,GENLOG command
GENLOG (command),GENLOG (command),GENLOG (command)
multinomial distribution,multinomial distribution,multinomial distribution
multinomial distribution,multinomial distribution,multinomial distribution
GENLOG command,GENLOG command,GENLOG command
GENLOG (command),GENLOG (command),GENLOG (command)
data distribution,data distribution,data distribution

MODEL specifies the assumed distribution of your data.

• You can specify only one keyword on MODEL. The default is POISSON.

• If more than one MODEL subcommand is specified, the last specification takes effect.

POISSON | The Poisson distribution. This is the default.
MULTINOMIAL | The multinomial distribution. For the logit model, you must specify MULTINOMIAL.

Related Topics

GENLOG
Overview (GENLOG command)
Examples (GENLOG command)
Variable List (GENLOG command)
CSTRUCTURE Subcommand (GENLOG command)
GRESID Subcommand (GENLOG command)
GLOR Subcommand (GENLOG command)
CRITERIA Subcommand (GENLOG command)
PRINT Subcommand (GENLOG command)
PLOT Subcommand (GENLOG command)
MISSING Subcommand (GENLOG command)
SAVE Subcommand (GENLOG command)
DESIGN Subcommand (GENLOG command)
References (GENLOG command)


CRITERIA Subcommand (GENLOG command)

CRITERIA (subcommand),CRITERIA (subcommand),CRITERIA (subcommand)
GENLOG command,GENLOG command,GENLOG command
GENLOG (command),GENLOG (command),GENLOG (command)
CRITERIA subcommand,CRITERIA subcommand,CRITERIA subcommand
GENLOG (command),GENLOG (command),GENLOG (command)
criteria,criteria,criteria

CRITERIA specifies the values used in tuning the parameters for the Newton-Raphson algorithm.

• If multiple CRITERIA subcommands are specified, the last specification takes effect.

GENLOG (command),GENLOG (command),GENLOG (command)
maximum iterations,maximum iterations,maximum iterations
delta,delta,delta
GENLOG command,GENLOG command,GENLOG command
GENLOG (command),GENLOG (command),GENLOG (command)
delta,delta,delta
confidence intervals,confidence intervals,confidence intervals
GENLOG command,GENLOG command,GENLOG command
CIN (keyword),CIN (keyword),CIN (keyword)
GENLOG command,GENLOG command,GENLOG command
GENLOG (command),GENLOG (command),GENLOG (command)
CIN keyword,CIN keyword,CIN keyword
EPS (keyword),EPS (keyword),EPS (keyword)
GENLOG command,GENLOG command,GENLOG command
GENLOG (command),GENLOG (command),GENLOG (command)
EPS keyword,EPS keyword,EPS keyword
epsilon,epsilon,epsilon
GENLOG command,GENLOG command,GENLOG command
CONVERGE(n) | Convergence criterion. Specify a positive value for the convergence criterion. The default is 0.001.
ITERATE(n) | Maximum number of iterations. Specify an integer. The default number is 20.
DELTA(n) | Cell delta value. Specify a non-negative value to add to each cell frequency for the first iteration. (For the saturated model, the delta value is added for all iterations.) The default is 0.5. The delta value is used to solve mathematical problems created by 0 observations; if all of your observations are greater than 0, we recommend that you set DELTA to 0.
CIN(n) | Level of confidence interval. Specify the percentage interval used in the test of generalized log-odds ratios and parameter estimates. The value must be between 50 and 99.99, inclusive. The default is 95.
EPS(n) | Epsilon value used for redundancy checking in design matrix. Specify a positive value. The default is 0.00000001.
DEFAULT | Default values are used. DEFAULT can be used to reset all criteria to default values.

Example

GENLOG  DPREF BY RACE ORIGIN CAMP
 /MODEL=MULTINOMIAL
 /CRITERIA=ITERATION(50) CONVERGE(.0001).

• ITERATION increases the maximum number of iterations to 50.

• CONVERGE lowers the convergence criterion to 0.0001.

Related Topics

GENLOG
Overview (GENLOG command)
Examples (GENLOG command)
Variable List (GENLOG command)
CSTRUCTURE Subcommand (GENLOG command)
GRESID Subcommand (GENLOG command)
GLOR Subcommand (GENLOG command)
MODEL Subcommand (GENLOG command)
PRINT Subcommand (GENLOG command)
PLOT Subcommand (GENLOG command)
MISSING Subcommand (GENLOG command)
SAVE Subcommand (GENLOG command)
DESIGN Subcommand (GENLOG command)
References (GENLOG command)


PRINT Subcommand (GENLOG command)

PRINT (subcommand),PRINT (subcommand),PRINT (subcommand)
GENLOG command,GENLOG command,GENLOG command
GENLOG (command),GENLOG (command),GENLOG (command)
PRINT subcommand,PRINT subcommand,PRINT subcommand
GENLOG (command),GENLOG (command),GENLOG (command)
statistics,statistics,statistics

PRINT controls the display of statistics.

• By default, GENLOG displays the frequency table and simple, adjusted, and deviance residuals.

• When PRINT is specified with one or more keywords, only the statistics requested by these keywords are displayed.

• When multiple PRINT subcommands are specified, the last specification takes effect.

The following keywords can be used on PRINT:

expected frequencies,expected frequencies,expected frequencies
GENLOG command,GENLOG command,GENLOG command
observed frequencies,observed frequencies,observed frequencies
GENLOG command,GENLOG command,GENLOG command
residuals,residuals,residuals
GENLOG command,GENLOG command,GENLOG command
standardized residuals,standardized residuals,standardized residuals
GENLOG command,GENLOG command,GENLOG command
adjusted residuals,adjusted residuals,adjusted residuals
GENLOG command,GENLOG command,GENLOG command
deviance residuals,deviance residuals,deviance residuals
GENLOG command,GENLOG command,GENLOG command
design matrix,design matrix,design matrix
GENLOG command,GENLOG command,GENLOG command
parameter estimates,parameter estimates,parameter estimates
GENLOG command,GENLOG command,GENLOG command
correlation matrix,correlation matrix,correlation matrix
GENLOG command,GENLOG command,GENLOG command
covariance matrix,covariance matrix,covariance matrix
GENLOG command,GENLOG command,GENLOG command
FREQ | Observed and expected cell frequencies and percentages. This is displayed by default.
RESID | Simple residuals. This is displayed by default.
ZRESID | Standardized residuals.
ADJRESID | Adjusted residuals. This is displayed by default.
DEV | Deviance residuals. This is displayed by default.
DESIGN | The design matrix of the model. The design matrix corresponding to the specified model is displayed.
ESTIM | The parameter estimates of the model. The parameter estimates refer to the original categories.
CORR | The correlation matrix of the parameter estimates.
COV | The covariance matrix of the parameter estimates.
ALL | All available output.
DEFAULT | FREQ, RESID, ADJRESID, and DEV. This keyword can be used to reset PRINT to its default setting.
NONE | The design and model information with goodness-of-fit statistics only. This option overrides all other specifications on the PRINT subcommand.

Example

GENLOG A B
 /PRINT=ALL
 /DESIGN=A B.

• The DESIGN subcommand specifies a main-effects model, which tests the hypothesis of no interaction. The PRINT subcommand displays all available output for this model.

Related Topics

GENLOG
Overview (GENLOG command)
Examples (GENLOG command)
Variable List (GENLOG command)
CSTRUCTURE Subcommand (GENLOG command)
GRESID Subcommand (GENLOG command)
GLOR Subcommand (GENLOG command)
MODEL Subcommand (GENLOG command)
CRITERIA Subcommand (GENLOG command)
PLOT Subcommand (GENLOG command)
MISSING Subcommand (GENLOG command)
SAVE Subcommand (GENLOG command)
DESIGN Subcommand (GENLOG command)
References (GENLOG command)


PLOT Subcommand (GENLOG command)

PLOT (subcommand),PLOT (subcommand),PLOT (subcommand)
GENLOG command,GENLOG command,GENLOG command
GENLOG (command),GENLOG (command),GENLOG (command)
PLOT subcommand,PLOT subcommand,PLOT subcommand

PLOT specifies which plots you want to display. Plots of adjusted residuals against observed and expected counts, and normal and detrended normal plots of the adjusted residuals are displayed if PLOT is not specified or is specified without a keyword. When multiple PLOT subcommands are specified, only the last specification is executed.

residual plots,residual plots,residual plots
GENLOG command,GENLOG command,GENLOG command
normal probability plots,normal probability plots,normal probability plots
GENLOG command,GENLOG command,GENLOG command
DEFAULT | RESID (ADJRESID) and NORMPROB (ADJRESID). This is the default if PLOT is not specified or is specified with no keyword.
RESID (type) | Plots of residuals against observed and expected counts. You can specify the type of residuals to plot. ADJRESID plots adjusted residuals; DEV plots deviance residuals. ADJRESID is the default if you do not specify a type.
NORMPROB (type) | Normal and detrended normal plots of the residuals. You can specify the type of residuals to plot. ADJRESID plots adjusted residuals; DEV plots deviance residuals. ADJRESID is the default if you do not specify a type.
NONE | No plots.

Example

GENLOG  RESPONSE BY SEASON
  /MODEL=MULTINOMIAL
  /PLOT=RESID(ADJRESID,DEV)
  /DESIGN=RESPONSE SEASON(1) BY RESPONSE.

• This example requests plots of adjusted and deviance residuals against observed and expected counts.

• Note that if you specify /PLOT=RESID(ADJRESID) RESID(DEV), only the deviance residuals are plotted. The first keyword specification, RESID(ADJRESID), is ignored.

Related Topics

GENLOG
Overview (GENLOG command)
Examples (GENLOG command)
Variable List (GENLOG command)
CSTRUCTURE Subcommand (GENLOG command)
GRESID Subcommand (GENLOG command)
GLOR Subcommand (GENLOG command)
MODEL Subcommand (GENLOG command)
CRITERIA Subcommand (GENLOG command)
PRINT Subcommand (GENLOG command)
MISSING Subcommand (GENLOG command)
SAVE Subcommand (GENLOG command)
DESIGN Subcommand (GENLOG command)
References (GENLOG command)


MISSING Subcommand (GENLOG command)

MISSING (subcommand),MISSING (subcommand),MISSING (subcommand)
GENLOG command,GENLOG command,GENLOG command
GENLOG (command),GENLOG (command),GENLOG (command)
MISSING subcommand,MISSING subcommand,MISSING subcommand
missing values,missing values,missing values
GENLOG command,GENLOG command,GENLOG command

MISSING controls missing values. By default, GENLOG excludes all cases with system- or user-missing values for any variable. You can specify INCLUDE to include user-missing values.

EXCLUDE | Delete cases with user-missing values. This is the default if the subcommand is omitted. You can also specify the keyword DEFAULT.
INCLUDE | Include cases with user-missing values. Only cases with system-missing values are deleted.

Example

MISSING VALUES A(0).
GENLOG A B
 /MISSING=INCLUDE
 /DESIGN=B.

• Even though 0 was specified as missing, it is treated as a nonmissing category of A in this analysis.

Related Topics

GENLOG
Overview (GENLOG command)
Examples (GENLOG command)
Variable List (GENLOG command)
CSTRUCTURE Subcommand (GENLOG command)
GRESID Subcommand (GENLOG command)
GLOR Subcommand (GENLOG command)
MODEL Subcommand (GENLOG command)
CRITERIA Subcommand (GENLOG command)
PRINT Subcommand (GENLOG command)
PLOT Subcommand (GENLOG command)
SAVE Subcommand (GENLOG command)
DESIGN Subcommand (GENLOG command)
References (GENLOG command)


SAVE Subcommand (GENLOG command)

GENLOG (command),GENLOG (command),GENLOG (command)
SAVE subcommand,SAVE subcommand,SAVE subcommand
SAVE (subcommand),SAVE (subcommand),SAVE (subcommand)
GENLOG command,GENLOG command,GENLOG command

SAVE saves specified temporary variables into the active dataset. You can assign a new name to each temporary variable saved.

• The temporary variables you can save include RESID (raw residual), ZRESID (standardized residual), ADJRESID (adjusted residual), DEV (deviance residual), and PRED (predicted cell frequency). An explanatory label is assigned to each saved variable.

• A temporary variable can be saved only once on a SAVE subcommand.

• To assign a name to a saved temporary variable, specify the new name in parentheses following that temporary variable. The new name must conform to PASW Statistics naming conventions and must be unique in the active dataset. The names cannot begin with # or $.

• If you do not specify a variable name in parentheses, GENLOG assigns default names to the saved temporary variables. A default name starts with the first three characters of the name of the saved temporary variable, followed by an underscore and a unique number. For example, RESID will be saved as RES_n, where n is a number incremented each time a default name is assigned to a saved RESID.

• The saved variables are pertinent to cells in the contingency table, not to individual observations. In the Data Editor, all cases that define one cell receive the same value. To make sense of these values, you need to aggregate the data to obtain cell counts.

Example

GENLOG A B
 /SAVE PRED (PREDA_B)
 /DESIGN = A, B.

• SAVE saves the predicted values for two independent variables A and B.

• The saved variable is renamed PREDA_B and added to the active dataset.

Related Topics

GENLOG
Overview (GENLOG command)
Examples (GENLOG command)
Variable List (GENLOG command)
CSTRUCTURE Subcommand (GENLOG command)
GRESID Subcommand (GENLOG command)
GLOR Subcommand (GENLOG command)
MODEL Subcommand (GENLOG command)
CRITERIA Subcommand (GENLOG command)
PRINT Subcommand (GENLOG command)
PLOT Subcommand (GENLOG command)
MISSING Subcommand (GENLOG command)
DESIGN Subcommand (GENLOG command)
References (GENLOG command)


DESIGN Subcommand (GENLOG command)

DESIGN (subcommand),DESIGN (subcommand),DESIGN (subcommand)
GENLOG command,GENLOG command,GENLOG command
GENLOG (command),GENLOG (command),GENLOG (command)
DESIGN subcommand,DESIGN subcommand,DESIGN subcommand
custom models,custom models,custom models
GENLOG command,GENLOG command,GENLOG command
GENLOG (command),GENLOG (command),GENLOG (command)
model specification,model specification,model specification

DESIGN specifies the model to be fit. If DESIGN is omitted or used with no specifications, the saturated model is produced. The saturated model fits all main effects and all interaction effects.

• Only one design can be specified on the subcommand.

GENLOG (command),GENLOG (command),GENLOG (command)
main-effects model,main-effects model,main-effects model

• To obtain main-effects models, name all of the variables listed on the variables specification.

interaction terms,interaction terms,interaction terms
GENLOG command,GENLOG command,GENLOG command
GENLOG (command),GENLOG (command),GENLOG (command)
single-degree-of-freedom partitions,single-degree-of-freedom partitions,single-degree-of-freedom partitions

• To obtain interactions, use the keyword BY or an asterisk (*) to specify each interaction, for example, A BY B or C*D. To obtain the single-degree-of-freedom partition of a specified factor, specify the partition in parentheses following the factor (see the example below).

GENLOG (command),GENLOG (command),GENLOG (command)
cell covariates,cell covariates,cell covariates
WITH (keyword),WITH (keyword),WITH (keyword)
GENLOG command,GENLOG command,GENLOG command
GENLOG (command),GENLOG (command),GENLOG (command)
WITH keyword,WITH keyword,WITH keyword

• To include cell covariates in the model, first identify them on the variable list by naming them after the keyword WITH, and then specify the variable names on DESIGN.

• Effects that involve only independent variables result in redundancy. GENLOG removes these effects from the model.

• If your variable list includes a cell covariate (identified by the keyword WITH), you cannot imply the saturated model by omitting DESIGN or specifying it alone. You need to request the model explicitly by specifying all main effects and interactions on DESIGN.

Example

COMPUTE X=MONTH.
GENLOG MONTH WITH X
  /DESIGN X.

• This example tests the linear effect of the dependent variable.

• The variable specification identifies MONTH as a categorical variable. The keyword WITH identifies X as a covariate.

• DESIGN tests the linear effect of MONTH.

Example

GENLOG A B
  /DESIGN=A.

GENLOG A B
  /DESIGN=A,B.

• Both designs specify main-effects models.

• The first design tests the homogeneity of category probabilities for B; it fits the marginal frequencies on A but assumes that membership in any of the categories of B is equiprobable.

• The second design tests the independence of A and B. It fits the marginals on both A and B.

Example

GENLOG A  B  C
  /DESIGN=A,B,C, A BY B.

• This design consists of the A main effect, the B main effect, the C main effect, and the interaction of A and B.

GENLOG (command),GENLOG (command),GENLOG (command)
simultaneous linear logit model,simultaneous linear logit model,simultaneous linear logit model

Example

GENLOG A BY B
 /MODEL=MULTINOMIAL
 /DESIGN=A,A BY B(1).

• This example specifies single-degree-of-freedom partitions.

• The value 1 following B to the first category of B.

Example

GENLOG HUSED WIFED WITH DISTANCE
  /DESIGN=HUSED WIFED DISTANCE.

• The continuous variable DISTANCE is identified as a cell covariate by the keyword WITH. The cell covariate is then included in the model by naming it on DESIGN.

Example

COMPUTE  X=1.
GENLOG  MONTH WITH X
  /DESIGN=X.

• This example specifies an equiprobability model.

• The design tests whether the frequencies in the table are equal by using a constant of 1 as a cell covariate.

Related Topics

GENLOG
Overview (GENLOG command)
Examples (GENLOG command)
Variable List (GENLOG command)
CSTRUCTURE Subcommand (GENLOG command)
GRESID Subcommand (GENLOG command)
GLOR Subcommand (GENLOG command)
MODEL Subcommand (GENLOG command)
CRITERIA Subcommand (GENLOG command)
PRINT Subcommand (GENLOG command)
PLOT Subcommand (GENLOG command)
MISSING Subcommand (GENLOG command)
SAVE Subcommand (GENLOG command)
References (GENLOG command)


References (GENLOG command)

Haberman, S. J. 1982. Analysis of dispersion of multinomial responses. Journal of the American Statistical Association, 77, 568-580.

Related Topics

GENLOG
Overview (GENLOG command)
Examples (GENLOG command)
Variable List (GENLOG command)
CSTRUCTURE Subcommand (GENLOG command)
GRESID Subcommand (GENLOG command)
GLOR Subcommand (GENLOG command)
MODEL Subcommand (GENLOG command)
CRITERIA Subcommand (GENLOG command)
PRINT Subcommand (GENLOG command)
PLOT Subcommand (GENLOG command)
MISSING Subcommand (GENLOG command)
SAVE Subcommand (GENLOG command)
DESIGN Subcommand (GENLOG command)


GET

GET (command),GET (command),GET (command)
GET (command),GET (command),GET (command)
syntax chart,syntax chart,syntax chart
GET FILE='file' [LOCK={YES**}]
                      {NO   }

 [/KEEP={ALL**  }] [/DROP=varlist]
        {varlist}

 [/RENAME=(old varnames=new varnames)...]

 [/MAP]

**Default if the subcommand is omitted.

Syntax for the GET command can be generated from the Open File dialog.

Release History Collapse Hide details

Release History

Release 17.0

• LOCK keyword introduced on the FILE subcommand.

Example

GET FILE='/data/empl.sav'.

Related Topics

Overview (GET command)
FILE Subcommand (GET command)
DROP and KEEP Subcommands (GET command)
RENAME Subcommand (GET command)
MAP Subcommand (GET command)


Overview (GET command)

data files,data files,data files

GET reads PASW Statistics data files. It also reads SPSS/PC+ data files, but you should not read SPSS/PC+ data files in Unicode mode (see Operations below).

GET is used only for reading PASW Statistics data files. See DATA LIST for information on reading and defining data in a text data file. See MATRIX DATA for information on defining matrix materials in a text data file. For information on defining complex data files that cannot be defined with DATA LIST alone, see FILE TYPE and REPEATING DATA.

The program can also read data files created for other software applications. See IMPORT for information on reading portable files created with EXPORT. See the relevant commands, such as GET DATA, GET STATA, and GET SAS, for information on reading files created by other software programs.

Options Collapse Hide details

Options

Variable Subsets and Order. You can read a subset of variables and reorder the variables that are copied into the active dataset using the DROP and KEEP subcommands.

Variable Names. You can rename variables as they are copied into the active dataset with the RENAME subcommand.

Variable Map. To confirm the names and order of variables in the active dataset, use the MAP subcommand.

Basic Specification Collapse Hide details

Basic Specification

• The basic specification is the FILE subcommand, which specifies the PASW Statistics data file to be read.

Subcommand Order Collapse Hide details

Subcommand Order

• FILE must be specified first.

• The remaining subcommands can be specified in any order.

Syntax Rules Collapse Hide details

Syntax Rules

• FILE is required and can be specified only once.

• KEEP, DROP, RENAME, and MAP can be used as many times as needed.

• GET cannot be used inside a DO IF—END IF or LOOP—END LOOP structure.

Operations Collapse Hide details

Operations

• If KEEP is not specified, variables in the active dataset are in the same order as the original data file.

• A file saved with weighting in effect maintains weighting the next time the file is accessed. For a discussion of turning off weights, see WEIGHT.

• In Unicode mode, for code page data files and data files created in releases prior to 16.0, the defined width of string variables in tripled. You can use ALTER TYPE to automatically adjust the width of all string variables.See SET command, UNICODE subcommand for more information.

• In Unicode mode, SPSS/PC+ data files may not be read correctly.

• SPSS/PC+ data files can be read only on Windows operating systems.

Related Topics

GET
FILE Subcommand (GET command)
DROP and KEEP Subcommands (GET command)
RENAME Subcommand (GET command)
MAP Subcommand (GET command)


FILE Subcommand (GET command)

FILE (subcommand),FILE (subcommand),FILE (subcommand)
GET command,GET command,GET command
GET (command),GET (command),GET (command)
FILE subcommand,FILE subcommand,FILE subcommand

FILE specifies the PASW Statistics data file to be read. FILE is required and can be specified only once. It must be the first specification on GET.

LOCK Keyword Collapse Hide details

LOCK Keyword

The LOCK keyword only applies when opening a file from a repository. It specifies whether the file is locked (in the repository) when opened. Locking a file prevents other users from modifying it while you are working with it. Other users can open locked files but they cannot save them back to the repository. The lock is released when the file is closed or when the current session ends.

• By default, files are opened as locked.

• The LOCK keyword is ignored if the specified file does not reside in a repository.

See the topic File Specifications for Repository Objects for more information.

Related Topics

GET
Overview (GET command)
DROP and KEEP Subcommands (GET command)
RENAME Subcommand (GET command)
MAP Subcommand (GET command)


DROP and KEEP Subcommands (GET command)

DROP (subcommand),DROP (subcommand),DROP (subcommand)
GET command,GET command,GET command
GET (command),GET (command),GET (command)
DROP subcommand,DROP subcommand,DROP subcommand
KEEP (subcommand),KEEP (subcommand),KEEP (subcommand)
GET command,GET command,GET command
GET (command),GET (command),GET (command)
KEEP subcommand,KEEP subcommand,KEEP subcommand

DROP and KEEP are used to copy a subset of variables into the active dataset. DROP specifies variables that should not be copied into the active dataset. KEEP specifies variables that should be copied. Variables not specified on KEEP are dropped.

• Variables can be specified in any order. The order of variables on KEEP determines the order of variables in the active dataset. The order of variables on DROP does not affect the order of variables in the active dataset.

• The keyword ALL on KEEP refers to all remaining variables not previously specified on KEEP. ALL must be the last specification on KEEP.

• If a variable is specified twice on the same subcommand, only the first mention is recognized.

• Multiple DROP and KEEP subcommands are allowed. However, specifying a variable named on a previous DROP or not named on a previous KEEP results in an error, and the GET command is not executed.

• The keyword TO can be used to specify a group of consecutive variables in the data file.

Example

GET FILE='/data/hubtemp.sav'   /DROP=DEPT79 TO DEPT84 SALARY79.

• All variables between and including DEPT79 and DEPT84, as well as SALARY79, are excluded from the active dataset. All other variables are included in the active dataset.

• Variables in the active dataset are in the same order as the variables in the original file.

Example

GET FILE='/data/prsnl.sav' /DROP=GRADE STORE
               /KEEP=LNAME NAME TENURE JTENURE ALL.

• The variables GRADE and STORE are dropped when the file prsnl.sav is copied into the active dataset.

• KEEP specifies that LNAME, NAME, TENURE, and JTENURE are the first four variables in the active dataset, followed by all remaining variables (except those dropped by the previous DROP subcommand). These remaining variables are copied into the active dataset in the same sequence in which they appear in the prsnl.sav file.

Related Topics

GET
Overview (GET command)
FILE Subcommand (GET command)
RENAME Subcommand (GET command)
MAP Subcommand (GET command)


RENAME Subcommand (GET command)

RENAME (subcommand),RENAME (subcommand),RENAME (subcommand)
GET command,GET command,GET command
GET (command),GET (command),GET (command)
RENAME subcommand,RENAME subcommand,RENAME subcommand

RENAME changes the names of variables as they are copied into the active dataset.

• The specification on RENAME is a list of old variable names followed by an equals sign and a list of new variable names. The same number of variables must be specified on both lists. The keyword TO can be used on the first list to refer to consecutive variables in the data file and on the second list to generate new variable names. The entire specification must be enclosed in parentheses.

• Alternatively, you can specify each old variable name individually, followed by an equals sign and the new variable name. Multiple sets of variable specifications are allowed. The parentheses around each set of specifications are optional.

• Old variable names do not need to be specified according to their order in the data file.

• Name changes take place in one operation. Therefore, variable names can be exchanged between two variables.

• Variables cannot be renamed to scratch variables.

• Multiple RENAME subcommands are allowed.

• On a subsequent DROP or KEEP subcommand, variables are referred to by their new names.

Example

GET FILE='/data/empl88.sav'
  /RENAME  AGE=AGE88 JOBCAT=JOBCAT88.

• RENAME specifies two name changes for the active dataset. AGE is renamed to AGE88 and JOBCAT is renamed to JOBCAT88.

Example

GET FILE='/data/empl88.sav'
  /RENAME (AGE JOBCAT=AGE88 JOBCAT88).

• The name changes are identical to those in the previous example. AGE is renamed to AGE88 and JOBCAT is renamed to JOBCAT88. The parentheses are required with this method.

Related Topics

GET
Overview (GET command)
FILE Subcommand (GET command)
DROP and KEEP Subcommands (GET command)
MAP Subcommand (GET command)


MAP Subcommand (GET command)

MAP (subcommand),MAP (subcommand),MAP (subcommand)
GET command,GET command,GET command
GET (command),GET (command),GET (command)
MAP subcommand,MAP subcommand,MAP subcommand

MAP displays a list of the variables in the active dataset and their corresponding names in the original data file.

• The only specification is the keyword MAP. There are no additional specifications.

• Multiple MAP subcommands are allowed. Each MAP subcommand maps the results of subcommands that precede it; results of subcommands that follow it are not mapped.

Example

GET FILE='/data/empl88.sav'
 /RENAME=(AGE=AGE88) (JOBCAT=JOBCAT88)
 /KEEP=LNAME NAME JOBCAT88 ALL /MAP.

• MAP is specified to confirm the new names for the variables AGE and JOBCAT and the order of variables in the active dataset (LNAME, NAME, and JOBCAT88, followed by all remaining variables in the data file).

Related Topics

GET
Overview (GET command)
FILE Subcommand (GET command)
DROP and KEEP Subcommands (GET command)
RENAME Subcommand (GET command)


GET CAPTURE

GET CAPTURE (command),GET CAPTURE (command),GET CAPTURE (command)
GET CAPTURE (command),GET CAPTURE (command),GET CAPTURE (command)
syntax chart,syntax chart,syntax chart
data files,data files,data files
databases,databases,databases
databases,databases,databases
reading,reading,reading
SQL queries,SQL queries,SQL queries

GET CAPTURE is supported for compatibility purposes. GET DATA is the preferred command for reading databases. See the topic GET DATA for more information.

GET CAPTURE {ODBC    }*

 [/CONNECT=’connection string’]
 [/UNENCRYPTED]
 [/LOGIN=login] [/PASSWORD=password]
 [/SERVER=host] [/DATABASE=database name]†

 /SQL ’select statement’
      [’continuation of select statement’]

* You can import data from any database for which you have an ODBC driver installed.

† Optional subcommands are database-specific. For more information, see Overview (GET CAPTURE command) below.

Release History Collapse Hide details

Release 15.0

• UNENCRYPTED subcommand introduced.

Example

GET CAPTURE ODBC
  /CONNECT='DSN=sales.mdb;DBQ=/data/saledata.mdb;DriverId=281;FIL=MS'+
  ' Access;MaxBufferSize=2048;PageTimeout=5;'
  /SQL = 'SELECT  T0.ID AS ID`,  T0.JOBCAT AS JOBCAT,  '
  '`T0`.`REGION` AS `REGION`,  `T0`.`DIVISION` AS `DIVISION`,`T0`.`TRAVEL`'
  ' AS `TRAVEL`,  `T0`.`SALES` AS `SALES`,  `T0`.`VOLUME96` AS `VOLUME96`,  '
  '`T1`.`REGION` AS `REGION1`,  `T1`.`AVGINC` AS `AVGINC`,`T1`.`AVGAGE` AS'
  ' `AVGAGE`,  `T1`.`POPULAT` AS `POPULAT` FROM { oj `Regions` `T1` LEFT '
  'OUTER JOIN `EmployeeSales` `T0` ON `T1`.`REGION` = `T0`.`REGION` } '.

Related Topics

Overview (GET CAPTURE command)
CONNECT Subcommand (GET CAPTURE command)
SQL Subcommand (GET CAPTURE command)
Data Conversion (GET CAPTURE command)
Variable Names and Labels (GET CAPTURE command)
Missing Values (GET CAPTURE command)
GET DATA


Overview (GET CAPTURE command)

GET CAPTURE retrieves data from a database and converts them to a format that can be used by program procedures. GET CAPTURE retrieves data and data information and builds an active dataset for the current session.

Note: Although GET CAPTURE is still supported, equivalent functionality and additional features are provided in the newer GET DATA command.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is one of the subcommands specifying the database type followed by the SQL subcommand and any select statement in quotation marks or apostrophes. Each line of the select statement should be enclosed in quotation marks or apostrophes, and no quoted string should exceed 255 characters.

Subcommand Order Collapse Hide details

Subcommand Order

The subcommand specifying the type of database must be the first specification. The SQL subcommand must be the last.

Syntax Rules Collapse Hide details

Syntax Rules

• Only one subcommand specifying the database type can be used.

• The CONNECT subcommand must be specified if you use the Microsoft ODBC (Open Database Connectivity) driver.

Operations Collapse Hide details

Operations

• GET CAPTURE retrieves the data specified on SQL.

• The variables are in the same order in which they are specified on the SQL subcommand.

• The data definition information captured from the database is stored in the active dataset dictionary.

Limitations Collapse Hide details

Limitations

• A maximum of 3,800 characters (approximately) can be specified on the SQL subcommand. This translates to 76 lines of 50 characters. Characters beyond the limit are ignored.

Related Topics

GET CAPTURE
CONNECT Subcommand (GET CAPTURE command)
SQL Subcommand (GET CAPTURE command)
Data Conversion (GET CAPTURE command)
Variable Names and Labels (GET CAPTURE command)
Missing Values (GET CAPTURE command)


CONNECT Subcommand (GET CAPTURE command)

GET CAPTURE (command),GET CAPTURE (command),GET CAPTURE (command)
CONNECT subcommand,CONNECT subcommand,CONNECT subcommand
CONNECT (subcommand),CONNECT (subcommand),CONNECT (subcommand)
GET CAPTURE command,GET CAPTURE command,GET CAPTURE command

CONNECT is required to access any database that has an installed Microsoft ODBC driver.

• You cannot specify the connection string directly in the syntax window, but you can paste it with the rest of the command from the Results dialog box, which is the last of the series of dialog boxes opened with the Database Wizard.

Related Topics

GET CAPTURE
Overview (GET CAPTURE command)
SQL Subcommand (GET CAPTURE command)
Data Conversion (GET CAPTURE command)
Variable Names and Labels (GET CAPTURE command)
Missing Values (GET CAPTURE command)


UNENCRYPTED Subcommands (GET DATA command)

UNENCRYPTED (subcommand),UNENCRYPTED (subcommand),UNENCRYPTED (subcommand)
GET CAPTURE command,GET CAPTURE command,GET CAPTURE command
GET CAPTURE (command),GET CAPTURE (command),GET CAPTURE (command)
UNENCRYPTED subcommand,UNENCRYPTED subcommand,UNENCRYPTED subcommand
password encryption,password encryption,password encryption
databases,databases,databases
databases,databases,databases
password encryption,password encryption,password encryption

UNENCRYPTED allows unencrypted passwords to be used in the CONNECT subcommand. By default, passwords are assumed to be encrypted.


SQL Subcommand (GET CAPTURE command)

SQL (subcommand),SQL (subcommand),SQL (subcommand)
GET CAPTURE command,GET CAPTURE command,GET CAPTURE command
GET CAPTURE (command),GET CAPTURE (command),GET CAPTURE (command)
SQL subcommand,SQL subcommand,SQL subcommand

SQL specifies any SQL select statement accepted by the database that you access. With ODBC, you can now select columns from more than one related table in an ODBC data source using either the inner join or the outer join.

Related Topics

GET CAPTURE
Overview (GET CAPTURE command)
CONNECT Subcommand (GET CAPTURE command)
Data Conversion (GET CAPTURE command)
Variable Names and Labels (GET CAPTURE command)
Missing Values (GET CAPTURE command)


Data Conversion (GET CAPTURE command)

GET CAPTURE converts variable names, labels, missing values, and data types, wherever necessary, to a format that conforms to PASW Statistics conventions.

Related Topics

GET CAPTURE
Overview (GET CAPTURE command)
CONNECT Subcommand (GET CAPTURE command)
SQL Subcommand (GET CAPTURE command)
Variable Names and Labels (GET CAPTURE command)
Missing Values (GET CAPTURE command)


Variable Names and Labels (GET CAPTURE command)

Database columns are read as variables.

• A column name is converted to a variable name if it conforms to variable naming conventions and is different from all other names created for the active dataset. If not, GET CAPTURE gives the column a name formed from the first few letters of the column and its column number. If this is not possible, the letters COL followed by the column number are used. For example, the seventh column specified in the select statement could be COL7.

• GET CAPTURE labels each variable with its full column name specified in the original database.

• You can display a table of variable names with their original database column names using the DISPLAY LABELS command.

Related Topics

GET CAPTURE
Overview (GET CAPTURE command)
CONNECT Subcommand (GET CAPTURE command)
SQL Subcommand (GET CAPTURE command)
Data Conversion (GET CAPTURE command)
Missing Values (GET CAPTURE command)


Missing Values (GET CAPTURE command)

Null values in the database are transformed into the system-missing value in numeric variables or into blanks in string variables.

Related Topics

GET CAPTURE
Overview (GET CAPTURE command)
CONNECT Subcommand (GET CAPTURE command)
SQL Subcommand (GET CAPTURE command)
Data Conversion (GET CAPTURE command)
Variable Names and Labels (GET CAPTURE command)


GET DATA

GET DATA (command),GET DATA (command),GET DATA (command)
GET DATA (command),GET DATA (command),GET DATA (command)
syntax chart,syntax chart,syntax chart
release history,release history,release history
Excel files,Excel files,Excel files
GET DATA command,GET DATA command,GET DATA command
databases,databases,databases
GET DATA command,GET DATA command,GET DATA command
text data files,text data files,text data files
GET DATA command,GET DATA command,GET DATA command
import data,import data,import data
GET DATA
  /TYPE = {ODBC }
          {OLEDB}
          {XLS  }
          {XLSX }
          {XLSM }
          {TXT  }

  /FILE = ’filename’

Subcommands for TYPE = ODBC and OLEDB
  /CONNECT=’connection string’
  [{/ENCRYPTED  }]
   {/UNENCRYPTED}
  /SQL ’select statement’
      [’select statement continued’]

Subcommands for TYPE=ODBC, TYPE=OLEDB, XLS, XLSX, and XLSM
 [/ASSUMEDSTRWIDTH={255**}]
                    {n    }

Subcommands for TYPE = XLS, XLSX, and XLSM*
  [/SHEET = {INDEX**} {sheet number}]
            {NAME   } {’sheet name’}
  [/CELLRANGE = {RANGE }  {’start point:end point’ }]
                {FULL**}
  [/READNAMES = {on** }]
                 {off  }

Subcommands for TYPE = TXT
  [/ARRANGEMENT = {FIXED      }]
                  {DELIMITED**}
  [/FIRSTCASE = {n}]
  [/DELCASE = {LINE**     }]1
              {VARIABLES n}

  [/FIXCASE = n]
  [/IMPORTCASE = {ALL**    }]
                 {FIRST n  }
                 {PERCENT n}
  [/DELIMITERS = {"delimiters"}]
  [/QUALIFIER = "qualifier"]

VARIABLES subcommand for ARRANGEMENT = DELIMITED
  /VARIABLES = varname  {format}

VARIABLES subcommand for ARRANGEMENT = FIXED
  /VARIABLES varname {startcol - endcol} {format}
     {/rec#} varname {startcol - endcol} {format}

*For Excel 4.0 or earlier files, use GET TRANSLATE.

**Default if the subcommand is omitted.

Syntax for the GET DATA command can be generated from the Database Wizard, the Text Import Wizard, or the Open File dialog (for Excel files).

Release History Collapse Hide details

Release History

Release 13.0

• ASSUMEDSTRWIDTH subcommand introduced for TYPE=ODBC.

Release 14.0

• ASSUMEDSTRWIDTH subcommand extended to TYPE=XLS.

• TYPE=OLEDB introduced.

Release 15.0

• ASSUMEDSTRWIDTH subcommand extended to TYPE=OLEDB.

Release 16.0

• TYPE=XLSX and TYPE=XLSM introduced.

Release 17.0

• ENCRYPTED subcommand introduced.

Example

GET DATA
   /TYPE=XLS
   /FILE='/PlanningDocs/files10.xls'
   /SHEET=name 'First Quarter'
   /CELLRANGE=full
   /READNAMES=on.

Related Topics

Overview (GET DATA command)
TYPE Subcommand (GET DATA command)
FILE Subcommand (GET DATA command)
Subcommands for TYPE=ODBC and TYPE=OLEDB (GET DATA command)
Subcommands for TYPE=XLS, XLSX, and XLSM (GET DATA command)
Subcommands for TYPE=TXT (GET DATA command)


Overview (GET DATA command)

GET DATA reads data from ODBC OLE DB data sources (databases), Excel files (release 5 or later), and text data files. It contains functionality and syntax similar to GET CAPTURE, GET TRANSLATE, and DATA LIST.

• GET DATA /TYPE=ODBC is almost identical to GET CAPTURE ODBC in both syntax and functionality.

• GET DATA /TYPE=XLS reads Excel 95 through Excel 2003 files; GET DATA /TYPE=XLSX and GET DATA /TYPE=XLSM read Excel 2007 or later files. GET TRANSLATE reads Excel 4 or earlier, Lotus, and dBASE files.

• GET DATA /TYPE=TXT is similar to DATA LIST but does not create a temporary copy of the data file, significantly reducing temporary file space requirements for large data files.

Related Topics

GET DATA
TYPE Subcommand (GET DATA command)
FILE Subcommand (GET DATA command)
Subcommands for TYPE=ODBC and TYPE=OLEDB (GET DATA command)
Subcommands for TYPE=XLS, XLSX, and XLSM (GET DATA command)
Subcommands for TYPE=TXT (GET DATA command)


TYPE Subcommand (GET DATA command)

GET DATA (command),GET DATA (command),GET DATA (command)
TYPE subcommand,TYPE subcommand,TYPE subcommand
TYPE (subcommand),TYPE (subcommand),TYPE (subcommand)
GET DATA command,GET DATA command,GET DATA command

The TYPE subcommand is required and must be the first subcommand specified.

GET DATA (command),GET DATA (command),GET DATA (command)
ODBC keyword,ODBC keyword,ODBC keyword
ODBC (keyword),ODBC (keyword),ODBC (keyword)
GET DATA command,GET DATA command,GET DATA command
GET DATA (command),GET DATA (command),GET DATA (command)
OLEDB keyword,OLEDB keyword,OLEDB keyword
OLEDB (keyword),OLEDB (keyword),OLEDB (keyword)
GET DATA command,GET DATA command,GET DATA command
GET DATA (command),GET DATA (command),GET DATA (command)
XLS keyword,XLS keyword,XLS keyword
XLS (keyword),XLS (keyword),XLS (keyword)
GET DATA command,GET DATA command,GET DATA command
GET DATA (command),GET DATA (command),GET DATA (command)
TXT keyword,TXT keyword,TXT keyword
TXT (keyword),TXT (keyword),TXT (keyword)
GET DATA command,GET DATA command,GET DATA command
text data file encoding,text data file encoding,text data file encoding
XLSX (keyword),XLSX (keyword),XLSX (keyword)
GET DATA command,GET DATA command,GET DATA command
XLSM (keyword),XLSM (keyword),XLSM (keyword)
GET DATA command,GET DATA command,GET DATA command
ODBC | Data sources accessed with ODBC drivers.
OLEDB | Data sources accessed with Microsoft OLEDB technology. Available only on Windows platforms and requires .NET framework and PASW Reports for Surveys Components. A version of PASW Reports for Surveys Componentsthat is compatible with this release can be installed from the installation media. If you are using PASW Statistics Developer, you can download a compatible version from the Downloads tab at www.spss.com/statistics. This is available only on Windows operating systems.
XLS | Excel 95 through Excel 2003 files. For earlier versions of Excel files, Lotus 1-2-3 files, and dBASE files, see the GET TRANSLATE command.
XLSX and XLSM | Excel 2007 files. Macros in XLSM files are ignored. XLSB (binary) format files are not supported.
TXT | Simple (ASCII) text data files. The encoding used to read text data files is UTF-8 in Unicode mode or the code page determined by the current locale in code page mode. See the topic UNICODE Subcommand for more information.

Related Topics

GET DATA
Overview (GET DATA command)
FILE Subcommand (GET DATA command)
Subcommands for TYPE=ODBC and TYPE=OLEDB (GET DATA command)
Subcommands for TYPE=XLS, XLSX, and XLSM (GET DATA command)
Subcommands for TYPE=TXT (GET DATA command)


FILE Subcommand (GET DATA command)

GET DATA (command),GET DATA (command),GET DATA (command)
FILE subcommand,FILE subcommand,FILE subcommand
FILE (subcommand),FILE (subcommand),FILE (subcommand)
GET DATA command,GET DATA command,GET DATA command

The FILE subcommand is required for TYPE=XLS, TYPE=XLSX, TYPE=XLSM, and TYPE=TXT and must immediately follow the TYPE subcommand. It specifies the file to read. File specifications should be enclosed in quotes.

Related Topics

GET DATA
Overview (GET DATA command)
TYPE Subcommand (GET DATA command)
Subcommands for TYPE=ODBC and TYPE=OLEDB (GET DATA command)
Subcommands for TYPE=XLS, XLSX, and XLSM (GET DATA command)
Subcommands for TYPE=TXT (GET DATA command)


Subcommands for TYPE=ODBC and TYPE=OLEDB (GET DATA command)

The CONNECT and SQL subcommands are both required, and SQL must be the last subcommand.

Example

GET DATA /TYPE=ODBC
  /CONNECT=
 'DSN=MS Access Database;DBQ=/examples/data/dm_demo.mdb;'+
 'DriverId=25;FIL=MS Access;MaxBufferSize=2048;PageTimeout=5;'
 /SQL = 'SELECT * FROM CombinedTable'.

Related Topics

GET DATA
Overview (GET DATA command)
TYPE Subcommand (GET DATA command)
FILE Subcommand (GET DATA command)
Subcommands for TYPE=XLS, XLSX, and XLSM (GET DATA command)
Subcommands for TYPE=TXT (GET DATA command)
CONNECT Subcommand (GET DATA command)
ENCRYPTED and UNENCRYPTED Subcommands (GET DATA command)
SQL Subcommand (GET DATA command)
ASSUMEDSTRWIDTH Subcommand (GET DATA command)


CONNECT Subcommand (GET DATA command)

GET DATA (command),GET DATA (command),GET DATA (command)
CONNECT subcommand,CONNECT subcommand,CONNECT subcommand
CONNECT (subcommand),CONNECT (subcommand),CONNECT (subcommand)
GET DATA command,GET DATA command,GET DATA command

The CONNECT subcommand identifies the database source. The recommended method for generating a valid CONNECT specification is to initially use the Database Wizard and paste the resulting syntax to a syntax window in the last step of the wizard. See the topic To Read Database Files for more information.

• The entire connect string must be enclosed in quotation marks.

• For long connect strings, you can use multiple quoted strings on separate lines, using a plus sign (+) to combine the quoted strings.

Example

GET DATA /TYPE=ODBC
  /CONNECT=
 'DSN=MS Access Database;DBQ=/examples/data/dm_demo.mdb;'+
 'DriverId=25;FIL=MS Access;MaxBufferSize=2048;PageTimeout=5;'
 /SQL = 'SELECT * FROM CombinedTable'.

Related Topics

Subcommands for TYPE=ODBC and TYPE=OLEDB (GET DATA command)
ENCRYPTED and UNENCRYPTED Subcommands (GET DATA command)
SQL Subcommand (GET DATA command)
ASSUMEDSTRWIDTH Subcommand (GET DATA command)


ENCRYPTED and UNENCRYPTED Subcommands (GET DATA command)

UNENCRYPTED (subcommand),UNENCRYPTED (subcommand),UNENCRYPTED (subcommand)
GET DATA command,GET DATA command,GET DATA command
ENCRYYPTED (subcommand),ENCRYYPTED (subcommand),ENCRYYPTED (subcommand)
GET DATA command,GET DATA command,GET DATA command
GET DATA (command),GET DATA (command),GET DATA (command)
UNENCRYPTED subcommand,UNENCRYPTED subcommand,UNENCRYPTED subcommand
ENCRYPTED subcommand,ENCRYPTED subcommand,ENCRYPTED subcommand
password encryption,password encryption,password encryption
databases,databases,databases
databases,databases,databases
password encryption,password encryption,password encryption

UNENCRYPTED allows unencrypted passwords to be used in the CONNECT subcommand. The default is ENCRYPTED.

Related Topics

Subcommands for TYPE=ODBC and TYPE=OLEDB (GET DATA command)
CONNECT Subcommand (GET DATA command)
SQL Subcommand (GET DATA command)
ASSUMEDSTRWIDTH Subcommand (GET DATA command)


SQL Subcommand (GET DATA command)

GET DATA (command),GET DATA (command),GET DATA (command)
SQL subcommand,SQL subcommand,SQL subcommand
SQL (subcommand),SQL (subcommand),SQL (subcommand)
GET DATA command,GET DATA command,GET DATA command

SQL specifies any SQL select statement accepted by the database that you access.

• You can select columns from more than one related table in a data source using either the inner join or the outer join.

• Each line of SQL must be enclosed in quotation marks and cannot exceed 255 characters.

• When the command is processed, all of the lines of the SQL statement are merged together in a very literal fashion; so each line should either begin or end with a blank space where spaces should occur between specifications.

• For TYPE=OLEDB (available only on Windows operating systems), table joins are not supported; you can specify fields only from a single table.

Example

GET DATA /TYPE=ODBC /CONNECT=
  'DSN=Microsoft Access;DBQ=/data/demo.mdb;DriverId=25;'+
  'FIL=MS Access;MaxBufferSize=2048;PageTimeout=5;'
 /SQL =
  'SELECT  SurveyResponses.ID,  SurveyResponses.Internet,'
  ' [Value Labels].[Internet Label]'
  ' FROM SurveyResponses LEFT OUTER JOIN [Value Labels]'
  ' ON SurveyResponses.Internet'
  ' = [Value Labels].[Internet Value]'.

If the SQL contains WHERE clauses with expressions for case selection, dates and times in expressions need to be specified in a special manner (including the curly braces shown in the examples):

• Date literals should be specified using the general form {d 'yyyy-mm-dd'}.

• Time literals should be specified using the general form {t 'hh:mm:ss'}.

• Date/time literals (timestamps) should be specified using the general form {ts 'yyyy-mm-dd hh:mm:ss'}.

• The entire date and/or time value must be enclosed in single quotes. Years must be expressed in four-digit form, and dates and times must contain two digits for each portion of the value. For example January 1, 2005, 1:05 AM would be expressed as:

{ts '2005-01-01 01:05:00'}

For functions used in expressions, a list of standard functions is available at http://msdn.microsoft.com/library/en-us/odbc/htm/odbcscalar_functions.asp.

Related Topics

Subcommands for TYPE=ODBC and TYPE=OLEDB (GET DATA command)
CONNECT Subcommand (GET DATA command)
ENCRYPTED and UNENCRYPTED Subcommands (GET DATA command)
ASSUMEDSTRWIDTH Subcommand (GET DATA command)


ASSUMEDSTRWIDTH Subcommand (GET DATA command)

string width,string width,string width
reading databases,reading databases,reading databases
ASSUMEDSTRWIDTH (subcommand),ASSUMEDSTRWIDTH (subcommand),ASSUMEDSTRWIDTH (subcommand)
GET DATA command,GET DATA command,GET DATA command
GET DATA (command),GET DATA (command),GET DATA (command)
ASSUMEDSTRWIDTH subcommand,ASSUMEDSTRWIDTH subcommand,ASSUMEDSTRWIDTH subcommand

For TYPE=ODBC, TYPE=OLEDB, and TYPE=XLS, this controls the width of variable-width string values. By default, the width is 255 bytes, and only the first 255 bytes will be read. The width can be up to 32,767 bytes. Although you probably don't want to truncate string values, you also don't want to specify an unnecessarily large value, since this will be used as the display width for those string values.

Related Topics

Subcommands for TYPE=ODBC and TYPE=OLEDB (GET DATA command)
CONNECT Subcommand (GET DATA command)
ENCRYPTED and UNENCRYPTED Subcommands (GET DATA command)
SQL Subcommand (GET DATA command)


Subcommands for TYPE=XLS, XLSX, and XLSM (GET DATA command)

Excel files,Excel files,Excel files
reading,reading,reading

For Excel 95 or later files, you can specify a spreadsheet within the workbook, a range of cells to read, and the contents of the first row of the spreadsheet (variable names or data). For files from earlier versions of Excel, use GET TRANSLATE .

Example

GET DATA /TYPE=XLS
   /FILE='/data/sales.xls'
   /SHEET=name 'June Sales'
   /CELLRANGE=range 'A1:C3'
   /READNAMES=on.

Related Topics

GET DATA
Overview (GET DATA command)
TYPE Subcommand (GET DATA command)
FILE Subcommand (GET DATA command)
Subcommands for TYPE=ODBC and TYPE=OLEDB (GET DATA command)
Subcommands for TYPE=TXT (GET DATA command)
SHEET Subcommand (GET DATA command)
CELLRANGE Subcommand (GET DATA command)
READNAMES Subcommand (GET DATA command)


SHEET Subcommand (GET DATA command)

GET DATA (command),GET DATA (command),GET DATA (command)
SHEET subcommand,SHEET subcommand,SHEET subcommand
SHEET (subcommand),SHEET (subcommand),SHEET (subcommand)
GET DATA command,GET DATA command,GET DATA command

The SHEET subcommand indicates the worksheet in the Excel file that will be read. Only one sheet can be specified. If no sheet is specified, the first sheet will be read.

INDEX n | Read the specified sheet number. The number represents the sequential order of the sheet within the workbook.
NAME 'name' | Read the specified sheet name. If the name contains spaces, it must be enclosed in quotes.

Related Topics

Subcommands for TYPE=XLS, XLSX, and XLSM (GET DATA command)
CELLRANGE Subcommand (GET DATA command)
READNAMES Subcommand (GET DATA command)


CELLRANGE Subcommand (GET DATA command)

GET DATA (command),GET DATA (command),GET DATA (command)
CELLRANGE subcommand,CELLRANGE subcommand,CELLRANGE subcommand
CELLRANGE (subcommand),CELLRANGE (subcommand),CELLRANGE (subcommand)
GET DATA command,GET DATA command,GET DATA command

The CELLRANGE subcommand specifies a range of cells to read within the specified worksheet. By default, the entire worksheet is read.

FULL | Read the entire worksheet. This is the default.
RANGE 'start:end' | Read the specified range of cells. Specify the beginning column letter and row number, a colon, and the ending column letter and row number, as in A1:K14. The cell range must be enclosed in quotes.

Related Topics

Subcommands for TYPE=XLS, XLSX, and XLSM (GET DATA command)
SHEET Subcommand (GET DATA command)
READNAMES Subcommand (GET DATA command)


READNAMES Subcommand (GET DATA command)

GET DATA (command),GET DATA (command),GET DATA (command)
READNAMES subcommand,READNAMES subcommand,READNAMES subcommand
READNAMES (subcommand),READNAMES (subcommand),READNAMES (subcommand)
GET DATA command,GET DATA command,GET DATA command
ON | Read the first row of the sheet or specified range as variable names. This is the default. Values that contain invalid characters or do not meet other criteria for variable names are converted to valid variable names. See the topic Variable Names for more information.
OFF | Read the first row of the sheet or specified range as data. Default variable names are assigned, and all rows are read as data.

Example

GET DATA /TYPE=XLS
   /FILE='/data/sales.xls'
   /SHEET=name 'June Sales'
   /CELLRANGE=range 'A1:C3'
   /READNAMES=on.

Related Topics

Subcommands for TYPE=XLS, XLSX, and XLSM (GET DATA command)
SHEET Subcommand (GET DATA command)
CELLRANGE Subcommand (GET DATA command)


Subcommands for TYPE=TXT (GET DATA command)

data files,data files,data files
text,text,text
text data files,text data files,text data files

The VARIABLES subcommand is required and must be the last GET DATA subcommand.

Example

GET DATA  /TYPE = TXT
  /FILE = '/data/textdata.dat'
  /DELCASE = LINE
  /DELIMITERS = "\t ,"
  /ARRANGEMENT = DELIMITED
  /FIRSTCASE = 2
  /IMPORTCASE = FIRST 200
  /VARIABLES = id F3.0 gender A1 bdate DATE10 educ F2.0
   jobcat F1.0 salary DOLLAR8 salbegin DOLLAR8
   jobtime F4.2 prevexp F4.2 minority F3.0.

Related Topics

GET DATA
Overview (GET DATA command)
TYPE Subcommand (GET DATA command)
FILE Subcommand (GET DATA command)
Subcommands for TYPE=ODBC and TYPE=OLEDB (GET DATA command)
Subcommands for TYPE=XLS, XLSX, and XLSM (GET DATA command)
ARRANGEMENT Subcommand (GET DATA command)
FIRSTCASE Subcommand (GET DATA command)
DELCASE Subcommand (GET DATA command)
FIXCASE Subcommand (GET DATA command)
IMPORTCASES Subcommand (GET DATA command)
DELIMITERS Subcommand (GET DATA command)
QUALIFIER Subcommand (GET DATA command)
VARIABLES Subcommand for ARRANGEMENT = DELIMITED (GET DATA command)
VARIABLES Subcommand for ARRANGEMENT = FIXED (GET DATA command)
Variable Format Specifications for TYPE = TXT (GET DATA command)


ARRANGEMENT Subcommand (GET DATA command)

GET DATA (command),GET DATA (command),GET DATA (command)
ARRANGEMENT subcommand,ARRANGEMENT subcommand,ARRANGEMENT subcommand
ARRANGEMENT (subcommand),ARRANGEMENT (subcommand),ARRANGEMENT (subcommand)
GET DATA command,GET DATA command,GET DATA command

The ARRANGEMENT subcommand specifies the data format.

GET DATA (command),GET DATA (command),GET DATA (command)
DELIMITED keyword,DELIMITED keyword,DELIMITED keyword
DELIMITED (keyword),DELIMITED (keyword),DELIMITED (keyword)
GET DATA command,GET DATA command,GET DATA command
GET DATA (command),GET DATA (command),GET DATA (command)
FIXED keyword,FIXED keyword,FIXED keyword
FIXED (keyword),FIXED (keyword),FIXED (keyword)
GET DATA command,GET DATA command,GET DATA command
DELIMITED | Spaces, commas, tabs, or other characters are used to separate variables. The variables are recorded in the same order for each case but not necessarily in the same column locations. This is the default.
FIXED | Each variable is recorded in the same column location for every case.

Related Topics

Subcommands for TYPE=TXT (GET DATA command)
FIRSTCASE Subcommand (GET DATA command)
DELCASE Subcommand (GET DATA command)
FIXCASE Subcommand (GET DATA command)
IMPORTCASES Subcommand (GET DATA command)
DELIMITERS Subcommand (GET DATA command)
QUALIFIER Subcommand (GET DATA command)
VARIABLES Subcommand for ARRANGEMENT = DELIMITED (GET DATA command)
VARIABLES Subcommand for ARRANGEMENT = FIXED (GET DATA command)
Variable Format Specifications for TYPE = TXT (GET DATA command)


FIRSTCASE Subcommand (GET DATA command)

GET DATA (command),GET DATA (command),GET DATA (command)
FIRSTCASE subcommand,FIRSTCASE subcommand,FIRSTCASE subcommand
FIRSTCASE (subcommand),FIRSTCASE (subcommand),FIRSTCASE (subcommand)
GET DATA command,GET DATA command,GET DATA command

FIRSTCASE specifies the first line (row) to read for the first case of data. This allows you to bypass information in the first n lines of the file that either don’t contain data or contain data that you don’t want to read. This subcommand applies to both fixed and delimited file formats.

The only specification for this subcommand is an integer greater than zero that indicates the number of lines to skip. The default is 1.

Related Topics

Subcommands for TYPE=TXT (GET DATA command)
ARRANGEMENT Subcommand (GET DATA command)
DELCASE Subcommand (GET DATA command)
FIXCASE Subcommand (GET DATA command)
IMPORTCASES Subcommand (GET DATA command)
DELIMITERS Subcommand (GET DATA command)
QUALIFIER Subcommand (GET DATA command)
VARIABLES Subcommand for ARRANGEMENT = DELIMITED (GET DATA command)
VARIABLES Subcommand for ARRANGEMENT = FIXED (GET DATA command)
Variable Format Specifications for TYPE = TXT (GET DATA command)


DELCASE Subcommand (GET DATA command)

GET DATA (command),GET DATA (command),GET DATA (command)
DELCASE subcommand,DELCASE subcommand,DELCASE subcommand
DELCASE (subcommand),DELCASE (subcommand),DELCASE (subcommand)
GET DATA command,GET DATA command,GET DATA command

The DELCASE subcommand applies to delimited data (ARRANGEMENT=DELIMITED) only.

LINE | Each case is contained on a single line (row). This is the default.
VARIABLES n | Each case contains n variables. Multiple cases can be contained on the same line, and data for one case can span more than one line. A case is defined by the number of variables.

Related Topics

Subcommands for TYPE=TXT (GET DATA command)
ARRANGEMENT Subcommand (GET DATA command)
FIRSTCASE Subcommand (GET DATA command)
FIXCASE Subcommand (GET DATA command)
IMPORTCASES Subcommand (GET DATA command)
DELIMITERS Subcommand (GET DATA command)
QUALIFIER Subcommand (GET DATA command)
VARIABLES Subcommand for ARRANGEMENT = DELIMITED (GET DATA command)
VARIABLES Subcommand for ARRANGEMENT = FIXED (GET DATA command)
Variable Format Specifications for TYPE = TXT (GET DATA command)


FIXCASE Subcommand (GET DATA command)

GET DATA (command),GET DATA (command),GET DATA (command)
FIXCASE subcommand,FIXCASE subcommand,FIXCASE subcommand
FIXCASE (subcommand),FIXCASE (subcommand),FIXCASE (subcommand)
GET DATA command,GET DATA command,GET DATA command

The FIXCASE subcommand applies to fixed data (ARRANGEMENT=FIXED) only. It specifies the number of lines (records) to read for each case.

The only specification for this subcommand is an integer greater than zero that indicates the number of lines (records) per case. The default is 1.

Related Topics

Subcommands for TYPE=TXT (GET DATA command)
ARRANGEMENT Subcommand (GET DATA command)
FIRSTCASE Subcommand (GET DATA command)
DELCASE Subcommand (GET DATA command)
IMPORTCASES Subcommand (GET DATA command)
DELIMITERS Subcommand (GET DATA command)
QUALIFIER Subcommand (GET DATA command)
VARIABLES Subcommand for ARRANGEMENT = DELIMITED (GET DATA command)
VARIABLES Subcommand for ARRANGEMENT = FIXED (GET DATA command)
Variable Format Specifications for TYPE = TXT (GET DATA command)


IMPORTCASES Subcommand (GET DATA command)

GET DATA (command),GET DATA (command),GET DATA (command)
IMPORTCASES subcommand,IMPORTCASES subcommand,IMPORTCASES subcommand
IMPORTCASES (subcommand),IMPORTCASES (subcommand),IMPORTCASES (subcommand)
GET DATA command,GET DATA command,GET DATA command

The IMPORTCASES subcommand allows you to specify the number of cases to read.

ALL | Read all cases in the file. This is the default.
FIRST n | Read the first n cases. The value of n must be a positive integer.
PERCENT n | Read approximately the first n percent of cases. The value of n must be a positive integer less than 100. The percentage of cases actually selected only approximates the specified percentage. The more cases there are in the data file, the closer the percentage of cases selected is to the specified percentage.

Related Topics

Subcommands for TYPE=TXT (GET DATA command)
ARRANGEMENT Subcommand (GET DATA command)
FIRSTCASE Subcommand (GET DATA command)
DELCASE Subcommand (GET DATA command)
FIXCASE Subcommand (GET DATA command)
DELIMITERS Subcommand (GET DATA command)
QUALIFIER Subcommand (GET DATA command)
VARIABLES Subcommand for ARRANGEMENT = DELIMITED (GET DATA command)
VARIABLES Subcommand for ARRANGEMENT = FIXED (GET DATA command)
Variable Format Specifications for TYPE = TXT (GET DATA command)


DELIMITERS Subcommand (GET DATA command)

GET DATA (command),GET DATA (command),GET DATA (command)
DELIMITERS subcommand,DELIMITERS subcommand,DELIMITERS subcommand
DELIMITERS (subcommand),DELIMITERS (subcommand),DELIMITERS (subcommand)
GET DATA command,GET DATA command,GET DATA command

The DELIMITERS subcommand applies to delimited data (ARRANGEMENT=DELIMITED) only. It specifies the characters to read as delimiters between data values.

• Each delimiter can be only a single character, except for the specification of a tab or a backslash as a delimiter (see below).

• The list of delimiters must be enclosed in quotes.

• There should be no spaces or other delimiters between delimiter specifications, except for a space that indicates a space as a delimiter.

• To specify a tab as a delimiter use "\t". This must be the first delimiter specified.

• To specify a backslash as a delimiter, use two backslashes ("\\"). This must be the first delimiter specified unless you also specify a tab as a delimiter, in which case the backslash specification should come second—immediately after the tab specification.

Missing data with delimited data. Multiple consecutive spaces in a data file are treated as a single space and cannot be used to indicate missing data. For any other delimiter, multiple delimiters without any intervening data indicate missing data.

Example

DELIMITERS "\t\\ ,;"

In this example, tabs, backslashes, spaces, commas, and semicolons will be read as delimiters between data values.

Related Topics

Subcommands for TYPE=TXT (GET DATA command)
ARRANGEMENT Subcommand (GET DATA command)
FIRSTCASE Subcommand (GET DATA command)
DELCASE Subcommand (GET DATA command)
FIXCASE Subcommand (GET DATA command)
IMPORTCASES Subcommand (GET DATA command)
QUALIFIER Subcommand (GET DATA command)
VARIABLES Subcommand for ARRANGEMENT = DELIMITED (GET DATA command)
VARIABLES Subcommand for ARRANGEMENT = FIXED (GET DATA command)
Variable Format Specifications for TYPE = TXT (GET DATA command)


QUALIFIER Subcommand (GET DATA command)

GET DATA (command),GET DATA (command),GET DATA (command)
QUALIFIER subcommand,QUALIFIER subcommand,QUALIFIER subcommand
QUALIFIER (subcommand),QUALIFIER (subcommand),QUALIFIER (subcommand)
GET DATA command,GET DATA command,GET DATA command
CSV format,CSV format,CSV format
reading data,reading data,reading data

The QUALIFIERS subcommand applies to delimited data (ARRANGEMENT=DELIMITED) only. It specifies the character used to enclose values that contain delimiter characters. For example, if a comma is the delimiter, values that contain commas will be read incorrectly unless there is a text qualifier enclosing the value, preventing the commas in the value from being interpreted as delimiters between values. CSV-format data files exported from Excel use a double quote (") as a text qualifier.

• The text qualifier appears at both the beginning and end of the value, enclosing the entire value.

• The qualifier value must be enclosed in single or double quotes. If the qualifier is a single quote, the value should be enclosed in double quotes. If the qualifier value is a double quote, the value should be enclosed in single quotes.

Example

/QUALIFIER = ‘”’

Related Topics

Subcommands for TYPE=TXT (GET DATA command)
ARRANGEMENT Subcommand (GET DATA command)
FIRSTCASE Subcommand (GET DATA command)
DELCASE Subcommand (GET DATA command)
FIXCASE Subcommand (GET DATA command)
IMPORTCASES Subcommand (GET DATA command)
DELIMITERS Subcommand (GET DATA command)
VARIABLES Subcommand for ARRANGEMENT = DELIMITED (GET DATA command)
VARIABLES Subcommand for ARRANGEMENT = FIXED (GET DATA command)
Variable Format Specifications for TYPE = TXT (GET DATA command)


VARIABLES Subcommand for ARRANGEMENT = DELIMITED (GET DATA command)

GET DATA (command),GET DATA (command),GET DATA (command)
VARIABLES subcommand,VARIABLES subcommand,VARIABLES subcommand
VARIABLES (subcommand),VARIABLES (subcommand),VARIABLES (subcommand)
GET DATA command,GET DATA command,GET DATA command

For delimited files, the VARIABLES subcommand specifies the variable names and variable formats.

• Variable names must conform to variable naming rules. See the topic Variable Names for more information.

• Each variable name must be followed by a format specification. See the topic Variable Format Specifications for TYPE = TXT (GET DATA command) for more information.

Related Topics

Subcommands for TYPE=TXT (GET DATA command)
ARRANGEMENT Subcommand (GET DATA command)
FIRSTCASE Subcommand (GET DATA command)
DELCASE Subcommand (GET DATA command)
FIXCASE Subcommand (GET DATA command)
IMPORTCASES Subcommand (GET DATA command)
DELIMITERS Subcommand (GET DATA command)
QUALIFIER Subcommand (GET DATA command)
VARIABLES Subcommand for ARRANGEMENT = FIXED (GET DATA command)
Variable Format Specifications for TYPE = TXT (GET DATA command)


VARIABLES Subcommand for ARRANGEMENT = FIXED (GET DATA command)

For fixed-format files, the VARIABLES subcommand specifies variable names, start and end column locations, and variable formats.

• Variable names must conform to variable naming rules. See the topic Variable Names for more information.

• Each variable name must be followed by column specifications. Start and end columns must be separated by a dash, as in 0-10.

• Column specifications must include both the start and end column positions, even if the width is only one column, as in 32-32.

• Each column specification must be followed by a format specification.

• Column numbering starts with 0, not 1 (in contrast to DATA LIST).

Multiple records. If each case spans more than one record (as specified with the FIXCASE subcommand), delimit variable specifications for each record with a slash (/) followed by the record number, as in:

  VARIABLES = /1 var1 0-10 F var2 11-20 DATE
  /2 var3 0-5 A var4 6-10 F
  /3 var5 0-20 A var6 21-30 DOLLAR

Related Topics

Subcommands for TYPE=TXT (GET DATA command)
ARRANGEMENT Subcommand (GET DATA command)
FIRSTCASE Subcommand (GET DATA command)
DELCASE Subcommand (GET DATA command)
FIXCASE Subcommand (GET DATA command)
IMPORTCASES Subcommand (GET DATA command)
DELIMITERS Subcommand (GET DATA command)
QUALIFIER Subcommand (GET DATA command)
VARIABLES Subcommand for ARRANGEMENT = DELIMITED (GET DATA command)
Variable Format Specifications for TYPE = TXT (GET DATA command)


Variable Format Specifications for TYPE = TXT (GET DATA command)

decimal indicator,decimal indicator,decimal indicator
GET DATA command,GET DATA command,GET DATA command

For both fixed and delimited files, available formats include (but are not limited to):

Fn.d | Numeric. Specification of the total number of characters (n) and decimals (d) is optional.
An | String (alphanumeric). Specification of the maximum string length (n) is optional.
DATEn | nDates of the general format dd-mmm-yyyy. Specification of the maximum length (n) is optional but must be eight or greater if specified.
ADATEn | Dates of the general format mm/dd/yyyy. Specification of the maximum length (n) is optional but must be eight or greater if specified.
DOLLARn.d | Currency with or without a leading dollar sign ($). Input values can include a leading dollar sign, but it is not required. Specification of the total number of characters (n) and decimals (d) is optional.

For a complete list of variable formats, see Variable Types and Formats.

Example

GET DATA  /TYPE = TXT
  /FILE = '/data/textdata.dat'
  /DELCASE = LINE
  /DELIMITERS = "\t ,"
  /ARRANGEMENT = DELIMITED
  /FIRSTCASE = 2
  /IMPORTCASE = FIRST 200
  /VARIABLES = id F3.0 gender A1 bdate DATE10 educ F2.0
   jobcat F1.0 salary DOLLAR8 salbegin DOLLAR8
   jobtime F4.2 prevexp F4.2 minority F3.0.

Note: For default numeric (F) format and scientific notation (E) format, the decimal indicator of the input data must match the PASW Statistics locale decimal indicator (period or comma). Use SHOW DECIMAL to display the current decimal indicator and SET DECIMAL to set the decimal indicator. (Comma and Dollar formats recognize only the period as the decimal indicator, and Dot format recognizes only the comma as the decimal indicator.)

Related Topics

Subcommands for TYPE=TXT (GET DATA command)
ARRANGEMENT Subcommand (GET DATA command)
FIRSTCASE Subcommand (GET DATA command)
DELCASE Subcommand (GET DATA command)
FIXCASE Subcommand (GET DATA command)
IMPORTCASES Subcommand (GET DATA command)
DELIMITERS Subcommand (GET DATA command)
QUALIFIER Subcommand (GET DATA command)
VARIABLES Subcommand for ARRANGEMENT = DELIMITED (GET DATA command)
VARIABLES Subcommand for ARRANGEMENT = FIXED (GET DATA command)


GET SAS

GET SAS (command),GET SAS (command),GET SAS (command)
GET SAS (command),GET SAS (command),GET SAS (command)
syntax chart,syntax chart,syntax chart
data files,data files,data files
SAS,SAS,SAS
SAS files,SAS files,SAS files
reading,reading,reading
GET SAS DATA='file' [DSET(dataset)]

 [/FORMATS=file]

Syntax for the GET SAS command can be generated from the Open File dialog when selecting one of the SAS file formats.

Example

GET SAS DATA='/data/elect.sd7'.

Related Topics

Overview (GET SAS command)
DATA Subcommand (GET SAS command)
FORMATS Subcommand (GET SAS command)
Creating a Formats File with PROC FORMAT (GET SAS command)
SAS Data Conversion (GET SAS command)
Variable Names (GET SAS command)
Variable Labels (GET SAS command)
Value Labels (GET SAS command)
Missing Values (GET SAS command)
Variable Types (GET SAS command)


Overview (GET SAS command)

GET SAS builds an active dataset from a SAS dataset or a SAS transport file. A SAS transport file is a sequential file written in SAS transport format and can be created by the SAS export engine available in SAS Release 6.06 or higher or by the EXPORT option on the COPY or XCOPY procedure in earlier versions. GET SAS reads SAS version 6-9 files.

Options Collapse Hide details

Options

Retrieving User-Defined Value Labels. For native SAS datasets, you can specify a file on the FORMATS subcommand to retrieve user-defined value labels associated with the data being read. This file must be created by the SAS PROC FORMAT statement and can be used only for native SAS datasets. For SAS transport files, the FORMATS subcommand is ignored.

Specifying the Dataset. You can name a dataset contained in a specified SAS file, using DSET on the DATA subcommand. GET SAS reads the specified dataset from the SAS file.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is the DATA subcommand followed by the name of the SAS file to read. By default, the first SAS dataset is copied into the active dataset and any necessary data conversions are made.

Syntax Rules Collapse Hide details

Syntax Rules

• The subcommand DATA and the SAS filename are required and must be specified first.

• The subcommand FORMATS is optional. This subcommand is ignored for SAS transport files.

• GET SAS does not allow KEEP, DROP, RENAME, and MAP subcommands. To use a subset of the variables, rename them, or display the file content, you can specify the appropriate commands after the active dataset is created.

Operations Collapse Hide details

Operations

• GET SAS reads data from the specified or default dataset contained in the SAS file named on the DATA subcommand.

• Value labels retrieved from a SAS user-defined format are used for variables associated with that format, becoming part of the PASW Statistics dictionary.

• All variables from the SAS dataset are included in the active dataset, and they are in the same order as in the SAS dataset.

Related Topics

GET SAS
DATA Subcommand (GET SAS command)
FORMATS Subcommand (GET SAS command)
Creating a Formats File with PROC FORMAT (GET SAS command)
SAS Data Conversion (GET SAS command)
Variable Names (GET SAS command)
Variable Labels (GET SAS command)
Value Labels (GET SAS command)
Missing Values (GET SAS command)
Variable Types (GET SAS command)


DATA Subcommand (GET SAS command)

GET SAS (command),GET SAS (command),GET SAS (command)
DATA subcommand,DATA subcommand,DATA subcommand
DATA (subcommand),DATA (subcommand),DATA (subcommand)
GET SAS command,GET SAS command,GET SAS command

DATA specifies the file that contains the SAS dataset to be read.

• DATA is required and must be the first specification on GET SAS.

• The file specification varies from operating system to operating system. File specifications should be enclosed in quotes.

• The optional DSET keyword on DATA determines which dataset within the specified SAS file is to be read. The default is the first dataset.

DSET (dataset) Dataset to be read. Specify the name of the dataset in parentheses. If the specified dataset does not exist in the SAS file, GET SAS displays a message informing you that the dataset was not found.

Example

GET SAS DATA='/data/elect.sd7' DSET(Y1948).

• The SAS file elect.sd7 is opened and the dataset named Y1948 is used to build the active dataset for the session.

Related Topics

GET SAS
Overview (GET SAS command)
FORMATS Subcommand (GET SAS command)
Creating a Formats File with PROC FORMAT (GET SAS command)
SAS Data Conversion (GET SAS command)
Variable Names (GET SAS command)
Variable Labels (GET SAS command)
Value Labels (GET SAS command)
Missing Values (GET SAS command)
Variable Types (GET SAS command)


FORMATS Subcommand (GET SAS command)

GET SAS (command),GET SAS (command),GET SAS (command)
FORMATS subcommand,FORMATS subcommand,FORMATS subcommand
FORMATS (subcommand),FORMATS (subcommand),FORMATS (subcommand)
GET SAS command,GET SAS command,GET SAS command
SAS files,SAS files,SAS files
value labels,value labels,value labels
value labels,value labels,value labels
SAS files,SAS files,SAS files

FORMATS specifies the file containing user-defined value labels to be applied to the retrieved data.

• File specifications should be enclosed in quotation marks.

• If FORMATS is omitted, no value labels are available.

• Value labels are applied only to numeric integer values. They are not applied to non-integer numeric values or string variables.

• The file specified on the FORMATS subcommand must be created with the SAS PROC FORMAT statement.

• For SAS transport files, the FORMATS subcommand is ignored.

Example

GET SAS /DATA='/data/elect.sas7bdat' DSET(Y1948)
 /FORMATS='data/formats.sas7bcat'.

• Value labels read from the SAS catalog file formats.sas7bcat are converted to conform to PASW Statistics conventions.

Related Topics

GET SAS
Overview (GET SAS command)
DATA Subcommand (GET SAS command)
Creating a Formats File with PROC FORMAT (GET SAS command)
SAS Data Conversion (GET SAS command)
Variable Names (GET SAS command)
Variable Labels (GET SAS command)
Value Labels (GET SAS command)
Missing Values (GET SAS command)
Variable Types (GET SAS command)


Creating a Formats File with PROC FORMAT (GET SAS command)

The following is an example of how to create a SAS format catalog file:

libname mylib 'c:\mydir\' ;

proc format library = mylib ;
value YesNo
  0='No'
  1='Yes' ;
value HighLow
   1 = 'Low'
   2 = 'Medium'
   3 = 'High' ;

options  fmtsearch=(mylib);

proc datasets library = mylib ;
modify mydata;
   format    var1 var2 var3 YesNo.;
   format    var4 var5 var6 HighLow.;

quit;

• libname defines a "library," which is a directory path.

• proc format defines two formats: YesNo and HighLow. Each format defines a set of value labels associated with data values.

• proc datasets identifies the data file--mydata--and the variables to which each of the defined formats should be applied. So the YesNo format is applied to variables var1, var2, and var3, and the HighLow format is applied to the variables var4, var5, and var6.

• This creates the SAS catalog file c:\mydir\formats.sas7bcat.

Related Topics

GET SAS
Overview (GET SAS command)
DATA Subcommand (GET SAS command)
FORMATS Subcommand (GET SAS command)
SAS Data Conversion (GET SAS command)
Variable Names (GET SAS command)
Variable Labels (GET SAS command)
Value Labels (GET SAS command)
Missing Values (GET SAS command)
Variable Types (GET SAS command)


SAS Data Conversion (GET SAS command)

SAS files,SAS files,SAS files
conversion,conversion,conversion

Although SAS and PASW Statistics data files have similar attributes, they are not identical. The following conversions are made to force SAS datasets to comply with PASW Statistics conventions.

Related Topics

GET SAS
Overview (GET SAS command)
DATA Subcommand (GET SAS command)
FORMATS Subcommand (GET SAS command)
Creating a Formats File with PROC FORMAT (GET SAS command)
Variable Names (GET SAS command)
Variable Labels (GET SAS command)
Value Labels (GET SAS command)
Missing Values (GET SAS command)
Variable Types (GET SAS command)


Variable Names (GET SAS command)

SAS variable names that do not conform to PASW Statistics variable name rules are converted to valid variable names.

Related Topics

GET SAS
Overview (GET SAS command)
DATA Subcommand (GET SAS command)
FORMATS Subcommand (GET SAS command)
Creating a Formats File with PROC FORMAT (GET SAS command)
SAS Data Conversion (GET SAS command)
Variable Labels (GET SAS command)
Value Labels (GET SAS command)
Missing Values (GET SAS command)
Variable Types (GET SAS command)


Variable Labels (GET SAS command)

SAS variable labels specified on the LABEL statement in the DATA step are used as variable labels.

Related Topics

GET SAS
Overview (GET SAS command)
DATA Subcommand (GET SAS command)
FORMATS Subcommand (GET SAS command)
Creating a Formats File with PROC FORMAT (GET SAS command)
SAS Data Conversion (GET SAS command)
Variable Names (GET SAS command)
Value Labels (GET SAS command)
Missing Values (GET SAS command)
Variable Types (GET SAS command)


Value Labels (GET SAS command)

SAS value formats that assign value labels are read from the dataset specified on the FORMATS subcommand. The SAS value labels are then converted to PASW Statistics value labels in the following manner:

• Labels assigned to single values are retained.

• Labels assigned to a range of values are ignored.

• Labels assigned to the SAS keywords LOW, HIGH, and OTHER are ignored.

• Labels assigned to string variables and non-integer numeric values are ignored.

Related Topics

GET SAS
Overview (GET SAS command)
DATA Subcommand (GET SAS command)
FORMATS Subcommand (GET SAS command)
Creating a Formats File with PROC FORMAT (GET SAS command)
SAS Data Conversion (GET SAS command)
Variable Names (GET SAS command)
Variable Labels (GET SAS command)
Missing Values (GET SAS command)
Variable Types (GET SAS command)


Missing Values (GET SAS command)

Since SAS has no user-defined missing values, all SAS missing codes are converted to PASW Statistics system-missing values.

Related Topics

GET SAS
Overview (GET SAS command)
DATA Subcommand (GET SAS command)
FORMATS Subcommand (GET SAS command)
Creating a Formats File with PROC FORMAT (GET SAS command)
SAS Data Conversion (GET SAS command)
Variable Names (GET SAS command)
Variable Labels (GET SAS command)
Value Labels (GET SAS command)
Variable Types (GET SAS command)


Variable Types (GET SAS command)

• Both SAS and PASW Statistics allow two basic types of variables: numeric and character string. During conversion, SAS numeric variables become PASW Statistics numeric variables, and SAS string variables become PASW Statistics string variables of the same length.

• Date, time, and date/time SAS variables are converted to equivalent PASW Statistics date, time, and date/time variables. All other numeric formats are converted to the default numeric format.

Related Topics

GET SAS
Overview (GET SAS command)
DATA Subcommand (GET SAS command)
FORMATS Subcommand (GET SAS command)
Creating a Formats File with PROC FORMAT (GET SAS command)
SAS Data Conversion (GET SAS command)
Variable Names (GET SAS command)
Variable Labels (GET SAS command)
Value Labels (GET SAS command)
Missing Values (GET SAS command)


GET STATA

GET STATA (command),GET STATA (command),GET STATA (command)
syntax chart,syntax chart,syntax chart
release history,release history,release history
GET STATA FILE='file'

Syntax for the GET STATA command can be generated from the Open File dialog.

Release History Collapse Hide details

Release History

Release 14.0

• Command introduced.

Example

GET STATA FILE='/data/empl.dta'.

Related Topics

Overview (GET STATA command)
FILE Keyword (GET STATA command)


Overview (GET STATA command)

data files,data files,data files
Stata,Stata,Stata

GET STATA reads Stata-format data files created by Stata versions 4–8.

Basic Specification Collapse Hide details

Basic Specification

• The only specification is the FILE keyword, which specifies the Stata data file to be read.

Operations Collapse Hide details

Operations

• Variable names. Stata variable names are converted to PASW Statistics variable names in case-sensitive form. Stata variable names that are identical except for case are converted to valid variable names by appending an underscore and a sequential letter (_A, _B, _C, ..., _Z, _AA, _AB, ..., and so forth).

• Variable labels. Stata variable labels are converted to PASW Statistics variable labels.

• Value labels. Stata value labels are converted to PASW Statistics value labels, except for Stata value labels assigned to "extended" missing values.

• Missing values. Stata "extended" missing values are converted to system-missing values.

• Date conversion. Stata date format values are converted to PASW Statistics DATE format (d-m-y) values. Stata "time-series" date format values (weeks, months, quarters, and so on) are converted to simple numeric (F) format, preserving the original, internal integer value, which is the number of weeks, months, quarters, and so on, since the start of 1960.

Related Topics

GET STATA
FILE Keyword (GET STATA command)


FILE Keyword (GET STATA command)

FILE (keyword),FILE (keyword),FILE (keyword)
GET STATA command,GET STATA command,GET STATA command
GET STATA (command),GET STATA (command),GET STATA (command)
FILE keyword,FILE keyword,FILE keyword

FILE specifies the Stata data file to be read. FILE is the only specification; it is required and can be specified only once. The keyword name is followed by an equals sign and a quoted file specification (or quoted file handle) that specifies the Stata data file to read.

Related Topics

GET STATA
Overview (GET STATA command)


GET TRANSLATE

GET TRANSLATE (command),GET TRANSLATE (command),GET TRANSLATE (command)
tab-delimited files,tab-delimited files,tab-delimited files
reading,reading,reading
SYLK files,SYLK files,SYLK files
reading,reading,reading
Excel files,Excel files,Excel files
reading,reading,reading
Multiplan files,Multiplan files,Multiplan files
reading,reading,reading
dBASE files,dBASE files,dBASE files
reading,reading,reading
Lotus 1-2-3 files,Lotus 1-2-3 files,Lotus 1-2-3 files
reading,reading,reading
spreadsheet files,spreadsheet files,spreadsheet files
reading,reading,reading
GET TRANSLATE FILE=file

 [/TYPE={WK }]
        {WK1}
        {WKS}
        {SYM}
        {SLK}
        {XLS}
        {DBF}
        {TAB}
        {SYS}

  [/FIELDNAMES]*

  [/RANGE={range name }]*
          {start..stop}
          {start:stop }

  [/KEEP={ALL**  }] [/DROP=varlist]
         {varlist}

[/MAP]

*Available only for spreadsheet and tab-delimited ASCII files.

**Default if the subcommand is omitted.

Keyword | Type of file
WK | Any Lotus 1-2-3 or Symphony file
WK1 | 1-2-3 Release 2.0
WKS | 1-2-3 Release 1A
WR1 | Symphony Release 2.0
WRK | Symphony Release 1.0
SLK | Microsoft Excel and Multiplan in SYLK (symbolic link) format
XLS | Microsoft Excel (for Excel 5 or later, use GET DATA)
DBF | All dBASE files
TAB | Tab-delimited ASCII file
SYS | Systat data file

Syntax for the GET TRANSLATE command can be generated from the Open File dialog when selecting one of the file types listed above.

Example

GET TRANSLATE FILE='PROJECT.WKS'
 /FIELDNAMES
 /RANGE=D3..J279.

Related Topics

Overview (GET TRANSLATE command)
Operations (GET TRANSLATE command)
Spreadsheets (GET TRANSLATE command)
Databases (GET TRANSLATE command)
Tab-Delimited ASCII Files (GET TRANSLATE command)
FILE Subcommand (GET TRANSLATE command)
TYPE Subcommand (GET TRANSLATE command)
FIELDNAMES Subcommand (GET TRANSLATE command)
RANGE Subcommand (GET TRANSLATE command)
DROP and KEEP Subcommands (GET TRANSLATE command)
MAP Subcommand (GET TRANSLATE command)
GET DATA


Overview (GET TRANSLATE command)

GET TRANSLATE (command),GET TRANSLATE (command),GET TRANSLATE (command)
limitation,limitation,limitation

GET TRANSLATE creates an active dataset from files produced by other software applications. Supported formats are 1-2-3, Symphony, Multiplan, Excel, dBASE II, dBASE III, dBASE IV, and tab-delimited ASCII files.

Options Collapse Hide details

Options

Variable Subsets. You can use the DROP and KEEP subcommands to specify variables to omit or retain in the resulting active dataset.

Variable Names. You can rename variables as they are translated using the RENAME subcommand.

Variable Map. To confirm the names and order of the variables in the active dataset, use the MAP subcommand. MAP displays the variables in the active dataset and their corresponding names in the other application.

Spreadsheet Files. You can use the RANGE subcommand to translate a subset of cells from a spreadsheet file. You can use the FIELDNAMES subcommand to translate field names in the spreadsheet file to variable names.

Basic Specification Collapse Hide details

Basic Specification

• The basic specification is FILE with a file specification enclosed in apostrophes.

• If the file’s extension is not the default for the type of file you are reading, TYPE must also be specified.

Subcommand Order Collapse Hide details

Subcommand Order

Subcommands can be named in any order.

Limitations Collapse Hide details

Limitations

The maximum number of variables that can be translated into the active dataset depends on the maximum number of variables that the other software application can handle:

Application | Maximum variables
1-2-3 | 256
Symphony | 256
Multiplan | 255
Excel | 256
dBASE IV | 255
dBASE III | 128
dBASE II | 32

Related Topics

GET TRANSLATE
Operations (GET TRANSLATE command)
Spreadsheets (GET TRANSLATE command)
Databases (GET TRANSLATE command)
Tab-Delimited ASCII Files (GET TRANSLATE command)
FILE Subcommand (GET TRANSLATE command)
TYPE Subcommand (GET TRANSLATE command)
FIELDNAMES Subcommand (GET TRANSLATE command)
RANGE Subcommand (GET TRANSLATE command)
DROP and KEEP Subcommands (GET TRANSLATE command)
MAP Subcommand (GET TRANSLATE command)


Operations (GET TRANSLATE command)

GET TRANSLATE replaces an existing active dataset.

Related Topics

GET TRANSLATE
Overview (GET TRANSLATE command)
Spreadsheets (GET TRANSLATE command)
Databases (GET TRANSLATE command)
Tab-Delimited ASCII Files (GET TRANSLATE command)
FILE Subcommand (GET TRANSLATE command)
TYPE Subcommand (GET TRANSLATE command)
FIELDNAMES Subcommand (GET TRANSLATE command)
RANGE Subcommand (GET TRANSLATE command)
DROP and KEEP Subcommands (GET TRANSLATE command)
MAP Subcommand (GET TRANSLATE command)


Spreadsheets (GET TRANSLATE command)

GET TRANSLATE (command),GET TRANSLATE (command),GET TRANSLATE (command)
spreadsheet files,spreadsheet files,spreadsheet files
data files,data files,data files
Lotus 1-2-3,Lotus 1-2-3,Lotus 1-2-3
data files,data files,data files
spreadsheet,spreadsheet,spreadsheet
data files,data files,data files
Excel,Excel,Excel
data files,data files,data files
Multiplan,Multiplan,Multiplan
data files,data files,data files
SYLK,SYLK,SYLK

A spreadsheet file suitable for this program should be arranged so that each row represents a case and each column, a variable.

• By default, the new active dataset contains all rows and up to 256 columns from Lotus 1-2-3, Symphony, or Excel, or up to 255 columns from Multiplan.

• By default, GET TRANSLATE uses the column letters as variable names in the active dataset.

• The first row of a spreadsheet or specified range may contain field labels immediately followed by rows of data. These names can be transferred as PASW Statistics variable names. See the topic FIELDNAMES Subcommand (GET TRANSLATE command) for more information.

• The current value of a formula is translated to the active dataset.

• Blank, ERR, and NA values in 1-2-3 and Symphony and error values such as #N/A in Excel are translated as system-missing values in the active dataset.

• Hidden columns and cells in 1-2-3 Release 2 and Symphony files are translated and copied into the active dataset.

• Column width and format type are transferred to the dictionary of the active dataset.

• The format type is assigned from values in the first data row. By default, the first data row is row 1. If RANGE is specified, the first data row is the first row in the range. If FIELDNAMES is specified, the first data row follows immediately after the single row containing field names.

• If a cell in the first data row is empty, the variable is assigned the global default format from the spreadsheet.

The formats from 1-2-3, Symphony, Excel, and Multiplan are translated as follows:

1-2-3/Symphony | Excel | SYLK | PASW Statistics
Fixed | 0.00; #,##0.00 | Fixed | F
 | 0; #,##0 | Integer | F
Scientific | 0.00E+00 | Exponent | E
Currency | $#,##0_);... | $ (dollar) | DOLLAR
, (comma) |  |  | COMMA
General | General | General | F
+/– |  | * (bargraph) | F
Percent | 0%; 0.00% | Percent | PCT
Date | m/d/yy;d-mmm-yy... |  | DATE
Time | h:mm; h:mm:ss... |  | TIME
Text/Literal |  |  | F
Label |  | Alpha | String

• If a string is encountered in a column with numeric format, it is converted to the system-missing value in the active dataset.

• If a numeric value is encountered in a column with string format, it is converted to a blank in the active dataset.

• Blank lines are translated as cases containing the system-missing value for numeric variables and blanks for string variables.

• 1-2-3 and Symphony date and time indicators (shown at the bottom of the screen) are not transferred from WKS, WK1, or SYM files.

Related Topics

GET TRANSLATE
Overview (GET TRANSLATE command)
Operations (GET TRANSLATE command)
Databases (GET TRANSLATE command)
Tab-Delimited ASCII Files (GET TRANSLATE command)
FILE Subcommand (GET TRANSLATE command)
TYPE Subcommand (GET TRANSLATE command)
FIELDNAMES Subcommand (GET TRANSLATE command)
RANGE Subcommand (GET TRANSLATE command)
DROP and KEEP Subcommands (GET TRANSLATE command)
MAP Subcommand (GET TRANSLATE command)


Databases (GET TRANSLATE command)

data files,data files,data files
dBASE,dBASE,dBASE
GET TRANSLATE (command),GET TRANSLATE (command),GET TRANSLATE (command)
database files,database files,database files

Database tables are logically very similar to PASW Statistics data files.

• By default, all fields and records from dBASE II, dBASE III, or dBASE IV files are included in the active dataset.

• Field names are automatically translated into variable names. If the FIELDNAMES subcommand is used with database files, it is ignored.

• Field names are converted to valid PASW Statistics variable names.

• Colons used in dBASE II field names are translated to underscores.

• Records in dBASE II, dBASE III, or dBASE IV that have been marked for deletion but that have not actually been purged are included in the active dataset. To differentiate these cases, GET TRANSLATE creates a new string variable, D_R, which contains an asterisk for cases marked for deletion. Other cases contain a blank for D_R.

• Character, floating, and numeric fields are transferred directly to variables. Logical fields are converted into string variables. Memo fields are ignored.

dBASE formats are translated as follows:

dBASE | PASW Statistics
Character | String
Logical | String
Date | Date
Numeric | Number
Floating | Number
Memo | Ignored

Related Topics

GET TRANSLATE
Overview (GET TRANSLATE command)
Operations (GET TRANSLATE command)
Spreadsheets (GET TRANSLATE command)
Tab-Delimited ASCII Files (GET TRANSLATE command)
FILE Subcommand (GET TRANSLATE command)
TYPE Subcommand (GET TRANSLATE command)
FIELDNAMES Subcommand (GET TRANSLATE command)
RANGE Subcommand (GET TRANSLATE command)
DROP and KEEP Subcommands (GET TRANSLATE command)
MAP Subcommand (GET TRANSLATE command)


Tab-Delimited ASCII Files (GET TRANSLATE command)

data files,data files,data files
tab-delimited,tab-delimited,tab-delimited
GET TRANSLATE (command),GET TRANSLATE (command),GET TRANSLATE (command)
tab-delimited files,tab-delimited files,tab-delimited files

Tab-delimited ASCII files are simple spreadsheets produced by a text editor, with the columns delimited by tabs and rows, by carriage returns. The first row is usually occupied by column headings.

• By default all columns of all rows are treated as data. Default variable names VAR1, VAR2, and so on are assigned to each column. The data type (numeric or string) for each variable is determined by the first data value in the column.

• If FIELDNAMES is specified, the program reads in the first row as variable names and determines the data type by the values read in from the second row.

• Any value that contains non-numeric characters is considered a string value. Dollar and date formats are not recognized and are treated as strings. When string values are encountered for a numeric variable, they are converted to the system-missing value.

• For numeric variables, the assigned format is F8.2 or the format of the first data value in the column, whichever is wider. Values that exceed the defined width are rounded for display, but the entire value is stored internally.

• For string variables, the assigned format is A8 or the format of the first data value in the column, whichever is wider. Values that exceed the defined width are truncated.

• ASCII data files delimited by space (instead of tabs) or in fixed format should be read by DATA LIST.

Related Topics

GET TRANSLATE
Overview (GET TRANSLATE command)
Operations (GET TRANSLATE command)
Spreadsheets (GET TRANSLATE command)
Databases (GET TRANSLATE command)
FILE Subcommand (GET TRANSLATE command)
TYPE Subcommand (GET TRANSLATE command)
FIELDNAMES Subcommand (GET TRANSLATE command)
RANGE Subcommand (GET TRANSLATE command)
DROP and KEEP Subcommands (GET TRANSLATE command)
MAP Subcommand (GET TRANSLATE command)


FILE Subcommand (GET TRANSLATE command)

GET TRANSLATE (command),GET TRANSLATE (command),GET TRANSLATE (command)
FILE subcommand,FILE subcommand,FILE subcommand
FILE (subcommand),FILE (subcommand),FILE (subcommand)
GET TRANSLATE command,GET TRANSLATE command,GET TRANSLATE command

FILE names the file to read. The only specification is the name of the file.

• File specifications should be enclosed in quotation marks or apostrophes.

Example

GET TRANSLATE FILE='PROJECT.WKS'.

• GET TRANSLATE creates an active dataset from the 1-2-3 Release 1.0 spreadsheet with the name PROJECT.WKS.

• The active dataset contains all rows and columns and uses the column letters as variable names.

• The format for each variable is determined by the format of the value in the first row of each column.

Related Topics

GET TRANSLATE
Overview (GET TRANSLATE command)
Operations (GET TRANSLATE command)
Spreadsheets (GET TRANSLATE command)
Databases (GET TRANSLATE command)
Tab-Delimited ASCII Files (GET TRANSLATE command)
TYPE Subcommand (GET TRANSLATE command)
FIELDNAMES Subcommand (GET TRANSLATE command)
RANGE Subcommand (GET TRANSLATE command)
DROP and KEEP Subcommands (GET TRANSLATE command)
MAP Subcommand (GET TRANSLATE command)


TYPE Subcommand (GET TRANSLATE command)

GET TRANSLATE (command),GET TRANSLATE (command),GET TRANSLATE (command)
TYPE subcommand,TYPE subcommand,TYPE subcommand
TYPE (subcommand),TYPE (subcommand),TYPE (subcommand)
GET TRANSLATE command,GET TRANSLATE command,GET TRANSLATE command

TYPE indicates the format of the file.

• TYPE can be omitted if the file extension named on FILE is the default for the type of file that you are reading.

• The TYPE subcommand takes precedence over the file extension.

• You can create a Lotus format file in Multiplan and translate it to an active dataset by specifying WKS on TYPE.

WK | Any Lotus 1-2-3 or Symphony file.
WK1 | 1-2-3 Release 2.0.
WKS | 1-2-3 Release 1A.
SYM | Symphony Release 2.0 or Symphony Release 1.0.
SLK | Microsoft Excel and Multiplan saved in SYLK (symbolic link) format.
XLS | Microsoft Excel. For Excel 5 or later, use GET DATA.
DBF | All dBASE files.
TAB | Tab-delimited ASCII data file.

Example

GET TRANSLATE FILE='PROJECT.OCT' /TYPE=SLK.

• GET TRANSLATE creates an active dataset from the Multiplan file PROJECT.OCT.

Related Topics

GET TRANSLATE
Overview (GET TRANSLATE command)
Operations (GET TRANSLATE command)
Spreadsheets (GET TRANSLATE command)
Databases (GET TRANSLATE command)
Tab-Delimited ASCII Files (GET TRANSLATE command)
FILE Subcommand (GET TRANSLATE command)
FIELDNAMES Subcommand (GET TRANSLATE command)
RANGE Subcommand (GET TRANSLATE command)
DROP and KEEP Subcommands (GET TRANSLATE command)
MAP Subcommand (GET TRANSLATE command)


FIELDNAMES Subcommand (GET TRANSLATE command)

spreadsheet files,spreadsheet files,spreadsheet files
read variable names,read variable names,read variable names
SYLK files,SYLK files,SYLK files
read variable names,read variable names,read variable names
GET TRANSLATE (command),GET TRANSLATE (command),GET TRANSLATE (command)
FIELDNAMES subcommand,FIELDNAMES subcommand,FIELDNAMES subcommand
FIELDNAMES (subcommand),FIELDNAMES (subcommand),FIELDNAMES (subcommand)
GET TRANSLATE command,GET TRANSLATE command,GET TRANSLATE command
Multiplan files,Multiplan files,Multiplan files
read variable names,read variable names,read variable names
Lotus 1-2-3 files,Lotus 1-2-3 files,Lotus 1-2-3 files
read variable names,read variable names,read variable names
Excel files,Excel files,Excel files
read variable names,read variable names,read variable names

FIELDNAMES translates spreadsheet field names into variable names.

• FIELDNAMES can be used with spreadsheet and tab-delimited ASCII files only. FIELDNAMES is ignored when used with database files.

• Each cell in the first row of the spreadsheet file (or the specified range) must contain a field name. If a column does not contain a name, the column is dropped.

• Field names are converted to valid PASW Statistics variable names.

• If two or more columns in the spreadsheet have the same field name, digits are appended to all field names after the first, making them unique.

• Illegal characters in field names are changed to underscores in this program.

• If the spreadsheet file uses reserved words (ALL, AND, BY, EQ, GE, GT, LE, LT, NE, NOT, OR, TO, or WITH) as field names, GET TRANSLATE appends a dollar sign ($) to the variable name. For example, columns named GE, GT, EQ, and BY will be renamed GE$, GT$, EQ$, and BY$ in the active dataset.

Example

GET TRANSLATE FILE='MONTHLY.SYM' /FIELDNAMES.

• GET TRANSLATE creates a active dataset from a Symphony 1.0 spreadsheet. The first row in the spreadsheet contains field names that are used as variable names in the active dataset.

Related Topics

GET TRANSLATE
Overview (GET TRANSLATE command)
Operations (GET TRANSLATE command)
Spreadsheets (GET TRANSLATE command)
Databases (GET TRANSLATE command)
Tab-Delimited ASCII Files (GET TRANSLATE command)
FILE Subcommand (GET TRANSLATE command)
TYPE Subcommand (GET TRANSLATE command)
RANGE Subcommand (GET TRANSLATE command)
DROP and KEEP Subcommands (GET TRANSLATE command)
MAP Subcommand (GET TRANSLATE command)


RANGE Subcommand (GET TRANSLATE command)

GET TRANSLATE (command),GET TRANSLATE (command),GET TRANSLATE (command)
RANGE subcommand,RANGE subcommand,RANGE subcommand
RANGE (subcommand),RANGE (subcommand),RANGE (subcommand)
GET TRANSLATE command,GET TRANSLATE command,GET TRANSLATE command
Lotus 1-2-3 files,Lotus 1-2-3 files,Lotus 1-2-3 files
read range,read range,read range
Multiplan files,Multiplan files,Multiplan files
read range,read range,read range
Excel files,Excel files,Excel files
read range,read range,read range
SYLK files,SYLK files,SYLK files
read ranges,read ranges,read ranges
spreadsheet files,spreadsheet files,spreadsheet files
read ranges,read ranges,read ranges

RANGE translates a specified set of cells from a spreadsheet file.

• RANGE cannot be used for translating database files.

• For 1-2-3 or Symphony, specify the beginning of the range with a column letter and row number followed by two periods and the end of the range with a column letter and row number, as in A1..K14.

• For Multiplan spreadsheets, specify the beginning and ending cells of the range separated by a colon, as in R1C1:R14C11.

• For Excel files, specify the beginning column letter and row number, a colon, and the ending column letter and row number, as in A1:K14.

• You can also specify the range using range names supplied in Symphony, 1-2-3, or Multiplan.

• If you specify FIELDNAMES with RANGE, the first row of the range must contain field names.

Example

GET TRANSLATE FILE='PROJECT.WKS' /FIELDNAMES /RANGE=D3..J279.

• GET TRANSLATE creates an active dataset from the 1-2-3 Release 1A file PROJECT.WKS.

• The field names in the first row of the range (row 3) are used as variable names.

• Data from cells D4 through J279 are transferred to the active dataset.

Related Topics

GET TRANSLATE
Overview (GET TRANSLATE command)
Operations (GET TRANSLATE command)
Spreadsheets (GET TRANSLATE command)
Databases (GET TRANSLATE command)
Tab-Delimited ASCII Files (GET TRANSLATE command)
FILE Subcommand (GET TRANSLATE command)
TYPE Subcommand (GET TRANSLATE command)
FIELDNAMES Subcommand (GET TRANSLATE command)
DROP and KEEP Subcommands (GET TRANSLATE command)
MAP Subcommand (GET TRANSLATE command)


DROP and KEEP Subcommands (GET TRANSLATE command)

GET TRANSLATE (command),GET TRANSLATE (command),GET TRANSLATE (command)
DROP subcommand,DROP subcommand,DROP subcommand
GET TRANSLATE (command),GET TRANSLATE (command),GET TRANSLATE (command)
KEEP subcommand,KEEP subcommand,KEEP subcommand
DROP (subcommand),DROP (subcommand),DROP (subcommand)
GET TRANSLATE command,GET TRANSLATE command,GET TRANSLATE command
KEEP (subcommand),KEEP (subcommand),KEEP (subcommand)
GET TRANSLATE command,GET TRANSLATE command,GET TRANSLATE command

DROP and KEEP are used to copy a subset of variables into the active dataset. DROP specifies the variables not to copy into the active dataset. KEEP specifies the variables to copy. Variables not specified on KEEP are dropped.

• DROP and KEEP cannot precede the FILE or TYPE subcommands.

• DROP and KEEP specifications use variable names. By default, this program uses the column letters from spreadsheets and the field names from databases as variable names.

• If FIELDNAMES is specified when translating from a spreadsheet, the DROP and KEEP subcommands must refer to the field names, not the default column letters.

• Variables can be specified in any order. Neither DROP nor KEEP affects the order of variables in the resulting file. Variables are kept in their original order.

• If a variable is referred to twice on the same subcommand, only the first mention of the variable is recognized.

• Multiple DROP and KEEP subcommands are allowed; the effect is cumulative. Specifying a variable named on a previous DROP or not named on a previous KEEP results in an error and the command is not executed.

• If you specify both RANGE and KEEP, the resulting file contains only variables that are both within the range and specified on KEEP.

• If you specify both RANGE and DROP, the resulting file contains only variables within the range and excludes those mentioned on DROP, even if they are within the range.

Example

GET TRANSLATE FILE='ADDRESS.DBF' /DROP=PHONENO, ENTRY.

• GET TRANSLATE creates an active dataset from the dBASE file ADDRESS.DBF, omitting the fields named PHONENO and ENTRY.

Example

GET TRANSLATE FILE='PROJECT.OCT' /TYPE=WK1 /FIELDNAMES
 /KEEP=NETINC, REP, QUANTITY, REGION, MONTH, DAY, YEAR.

• GET TRANSLATE creates a active dataset from the 1-2-3 Release 2.0 file called PROJECT.OCT.

• The subcommand FIELDNAMES indicates that the first row of the spreadsheet contains field names, which will be translated into variable names in the active dataset.

• The subcommand KEEP translates columns with the field names NETINC, REP, QUANTITY, REGION, MONTH, DAY, and YEAR to the active dataset.

Related Topics

GET TRANSLATE
Overview (GET TRANSLATE command)
Operations (GET TRANSLATE command)
Spreadsheets (GET TRANSLATE command)
Databases (GET TRANSLATE command)
Tab-Delimited ASCII Files (GET TRANSLATE command)
FILE Subcommand (GET TRANSLATE command)
TYPE Subcommand (GET TRANSLATE command)
FIELDNAMES Subcommand (GET TRANSLATE command)
RANGE Subcommand (GET TRANSLATE command)
MAP Subcommand (GET TRANSLATE command)


MAP Subcommand (GET TRANSLATE command)

MAP (subcommand),MAP (subcommand),MAP (subcommand)
GET TRANSLATE command,GET TRANSLATE command,GET TRANSLATE command
GET TRANSLATE (command),GET TRANSLATE (command),GET TRANSLATE (command)
MAP subcommand,MAP subcommand,MAP subcommand

MAP displays a list of the variables in the active dataset and their corresponding names in the other application.

• The only specification is the keyword MAP. There are no additional specifications.

• Multiple MAP subcommands are allowed. Each MAP subcommand maps the results of subcommands that precede it; results of subcommands that follow it are not mapped.

Example

GET TRANSLATE FILE='ADDRESS.DBF' /DROP=PHONENO, ENTRY /MAP.

• MAP is specified to confirm that the variables PHONENO and ENTRY have been dropped.

Related Topics

GET TRANSLATE
Overview (GET TRANSLATE command)
Operations (GET TRANSLATE command)
Spreadsheets (GET TRANSLATE command)
Databases (GET TRANSLATE command)
Tab-Delimited ASCII Files (GET TRANSLATE command)
FILE Subcommand (GET TRANSLATE command)
TYPE Subcommand (GET TRANSLATE command)
FIELDNAMES Subcommand (GET TRANSLATE command)
RANGE Subcommand (GET TRANSLATE command)
DROP and KEEP Subcommands (GET TRANSLATE command)


GGRAPH

GGRAPH (command),GGRAPH (command),GGRAPH (command)
GGRAPH (command),GGRAPH (command),GGRAPH (command)
syntax chart,syntax chart,syntax chart
release history,release history,release history
charts,charts,charts
graphs,graphs,graphs

Note: Square brackets used in the GGRAPH syntax chart are required parts of the syntax and are not used to indicate optional elements. Any equals signs (=) displayed in the syntax chart are required. The GRAPHSPEC subcommand is required.

GGRAPH

  /GRAPHDATASET NAME="name"

                DATASET=datasetname

                VARIABLES=variablespec

                TRANSFORM={NO**                                         }
                          {VARSTOCASES(SUMMARY="varname" INDEX="varname")}

                MISSING={LISTWISE**    } REPORTMISSING={NO**}
                        {VARIABLEWISE  }               {YES }

                CASELIMIT={1000000**}
                          {value    }

  /GRAPHSPEC  SOURCE={INLINE                                                              }
                     {GPLFILE("filespec")                                                 }
                     {VIZMLFILE("filespec")                                               }
                     {VIZTEMPLATE(NAME="template name"[LOCATION={LOCAL**                }]}
                                                                {"repository folderspec"}
                                  MAPPING(templatemapping))

              EDITABLE={YES**}
                       {NO   }

              LABEL="string"

              DEFAULTTEMPLATE={YES**} TEMPLATE=["filespec" ...]
                              {NO   }

              VIZSTYLESHEET="stylesheet name"[LOCATION={LOCAL**                }]
                                                       {"repository folderspec"}

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

Release History Collapse Hide details

Release History

Release 14.0

• Command introduced.

Release 15.0

• RENAME syntax qualifier deprecated.

• COUNTCI, MEDIANCI, MEANCI, MEANSD, and MEANSE functions introduced.

Release 17.0

• Added SOURCE=VIZTEMPLATE to support visualization templates.

• Added VIZSTYLESHEET keyword to support visualization stylesheets.

Examples

GGRAPH
  /GRAPHDATASET NAME="graphdataset" VARIABLES=jobcat COUNT()
  /GRAPHSPEC SOURCE=GPLFILE("simplebarchart.gpl").

GGRAPH
  /GRAPHDATASET NAME="graphdataset" VARIABLES=jobcat COUNT()
  /GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
  SOURCE: s=userSource(id("graphdataset"))
  DATA: jobcat=col(source(s), name("jobcat"), unit.category())
  DATA: count=col(source(s), name("COUNT"))
  GUIDE: axis(dim(1), label("Employment Category"))
  GUIDE: axis(dim(2), label("Count"))
  ELEMENT: interval(position(jobcat*count))
END GPL.

GGRAPH
  /GRAPHDATASET NAME="graphdataset" VARIABLES=jobcat
  /GRAPHSPEC SOURCE=VIZTEMPLATE(NAME="Bar"
                                MAPPING("Categories"="jobcat" "Summary"="Count"))
   DEFAULTTEMPLATE=NO.

Related Topics

Overview (GGRAPH command)
GRAPHDATASET Subcommand (GGRAPH command)
GRAPHSPEC Subcommand (GGRAPH command)
GPL Examples (GGRAPH command)


Overview (GGRAPH command)

GGRAPH generates a graph by computing statistics from variables in a data source and constructing the graph according to the graph specification, which may be written in the Graphics Productions Language (GPL) or ViZml.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is the GRAPHSPEC subcommand.

Syntax Rules Collapse Hide details

Syntax Rules

• Subcommands and keywords can appear in any order.

• Subcommand names and keywords must be spelled out in full.

• The GRAPHDATASET and GRAPHSPEC subcommands are repeatable.

• Parentheses, equals signs, and slashes shown in the syntax chart are required.

• Strings in the GPL are enclosed in quotation marks. You cannot use single quotes (apostrophes).

• With the PASW Statistics Batch Facility (available only with PASW Statistics Server), use the -i switch when submitting command files that contain BEGIN GPL-END GPL blocks.

Related Topics

GGRAPH
GRAPHDATASET Subcommand (GGRAPH command)
GRAPHSPEC Subcommand (GGRAPH command)
GPL Examples (GGRAPH command)


GRAPHDATASET Subcommand (GGRAPH command)

GRAPHDATASET (subcommand),GRAPHDATASET (subcommand),GRAPHDATASET (subcommand)
GGRAPH command,GGRAPH command,GGRAPH command
GGRAPH (command),GGRAPH (command),GGRAPH (command)
GRAPHDATASET subcommand,GRAPHDATASET subcommand,GRAPHDATASET subcommand

GRAPHDATASET creates graph datasets based on open PASW Statistics data files. The subcommand is repeatable, allowing you to create multiple graph datasets that can be referenced in a graph specification. Furthermore, multiple graph specifications (the ViZml or GPL code that defines a graph) can reference the same graph dataset.

Graph datasets contain the data that accompany a graph. The actual variables and statistics in the graph dataset are specified by the VARIABLES keyword.

Example

GGRAPH
  /GRAPHDATASET NAME="graphdataset" VARIABLES=jobcat COUNT()
  /GRAPHSPEC SOURCE=GPLFILE("simplebarchart.gpl").

Related Topics

GGRAPH
Overview (GGRAPH command)
GRAPHSPEC Subcommand (GGRAPH command)
GPL Examples (GGRAPH command)
NAME Keyword (GGRAPH command)
DATASET Keyword (GGRAPH command)
VARIABLES Keyword (GGRAPH command)
TRANSFORM Keyword (GGRAPH command)
MISSING Keyword (GGRAPH command)
REPORTMISSING Keyword (GGRAPH command)
CASELIMIT Keyword (GGRAPH command)


NAME Keyword (GGRAPH command)

NAME (keyword),NAME (keyword),NAME (keyword)
GGRAPH command,GGRAPH command,GGRAPH command
GGRAPH (command),GGRAPH (command),GGRAPH (command)
NAME keyword,NAME keyword,NAME keyword

The NAME keyword specifies the name that identifies the graph dataset when it is referenced in a graph specification. There is no default name, so you must specify one. You can choose any name that honors variable naming rules. (For more information about naming rules, see Variable Names.) When the same graph dataset name is used in multiple GRAPHDATASET subcommands, the name in the last GRAPHDATASET subcommand is honored.

Related Topics

GRAPHDATASET Subcommand (GGRAPH command)
DATASET Keyword (GGRAPH command)
VARIABLES Keyword (GGRAPH command)
TRANSFORM Keyword (GGRAPH command)
MISSING Keyword (GGRAPH command)
REPORTMISSING Keyword (GGRAPH command)
CASELIMIT Keyword (GGRAPH command)


DATASET Keyword (GGRAPH command)

DATASET (keyword),DATASET (keyword),DATASET (keyword)
GGRAPH command,GGRAPH command,GGRAPH command
GGRAPH (command),GGRAPH (command),GGRAPH (command)
DATASET keyword,DATASET keyword,DATASET keyword

The DATASET keyword specifies the dataset name of an open data file to use for the graph dataset. If the keyword is omitted, GGRAPH uses the active dataset. You can also use an asterisk (*) to refer to the active dataset.

The following are honored only for the active dataset (which cannot be named except with an asterisk):

• FILTER

• USE

• SPLIT FILE

• Weight filtering (exclusion of cases with non-positive weights)

• Temporary transformations

• Pending transformations

Example

GGRAPH
  /GRAPHDATASET NAME="graphdataset" DATASET=DataSet2 VARIABLES=jobcat COUNT()
  /GRAPHSPEC SOURCE=GPLFILE("simplebarchart.gpl").

Related Topics

GRAPHDATASET Subcommand (GGRAPH command)
NAME Keyword (GGRAPH command)
VARIABLES Keyword (GGRAPH command)
TRANSFORM Keyword (GGRAPH command)
MISSING Keyword (GGRAPH command)
REPORTMISSING Keyword (GGRAPH command)
CASELIMIT Keyword (GGRAPH command)


VARIABLES Keyword (GGRAPH command)

VARIABLES (keyword),VARIABLES (keyword),VARIABLES (keyword)
GGRAPH command,GGRAPH command,GGRAPH command
GGRAPH (command),GGRAPH (command),GGRAPH (command)
DATASET keyword,DATASET keyword,DATASET keyword

The VARIABLES keyword identifies the variables, statistics, and utility function results that are included in the graph dataset. These are collectively identified as a variable specification. The minimum variable specification is a variable. An aggregation or summary function is required when the variable specification includes a multiple-response set. The order of the variables and functions in the variable specification does not matter. Multiple aggregation or summary functions are allowed so that you can graph more than one statistic. You can also use the ALL and TO keywords to include multiple variables without explicitly listing them. For information about the ALL keyword, see Keyword ALL. For information about the TO keyword, see Keyword TO.

When the variable specification includes an aggregation function and does not include the CASEVALUE function, the graph dataset is aggregated. Any stand-alone variables in the variable specification act as categorical break variables for the aggregation (including scale variables that are not parameters of a summary function). The function is evaluated for each unique value in each break variable. When the variable specification includes only variables or includes the CASEVALUE function, the graph dataset is unaggregated. The built-in variable $CASENUM is included in the unaggregated dataset. $CASENUM cannot be specified or renamed in the variable specification, but you can refer to it in the graph specification.

An unaggregated graph dataset includes a case for every case in the PASW Statistics dataset. An aggregated dataset includes a case for every combination of unique break variable values. For example, assume that there are two categorical variables that act as break variables. If there are three categories in one variable and two in the other, there are six cases in the aggregated graph dataset, as long as there are values for each category.

Note: If the dataset is aggregated, be sure to include all of the break variables in the graph specification (the ViZml or GPL). For example, if the variable specification includes two categorical variables and a summary function of a scale variable, the graph specification should use one of the categorical variables as the x-axis variable and one as a grouping or panel variable. Otherwise, the resulting graph will not be correct because it does not contain all of the information used for the aggregation.

Example

GGRAPH
  /GRAPHDATASET NAME="graphdataset" VARIABLES=jobcat[NAME="empcat" LEVEL=NOMINAL] COUNT()
  /GRAPHSPEC SOURCE=GPLFILE("simplebarchart.gpl").

• The NAME qualifier renames a variable. See the topic Variable and Function Names (GGRAPH command) for more information.

• The LEVEL qualifier specifies a temporary measurement level for a variable. See the topic Measurement Level (GGRAPH command) for more information.

Related Topics

Variable and Function Names (GGRAPH command)
Measurement Level (GGRAPH command)
Functions (GGRAPH command)
NAME Keyword (GGRAPH command)
DATASET Keyword (GGRAPH command)
TRANSFORM Keyword (GGRAPH command)
MISSING Keyword (GGRAPH command)
REPORTMISSING Keyword (GGRAPH command)
CASELIMIT Keyword (GGRAPH command)


Variable and Function Names (GGRAPH command)

NAME (qualifier),NAME (qualifier),NAME (qualifier)
GGRAPH command,GGRAPH command,GGRAPH command
GGRAPH (command),GGRAPH (command),GGRAPH (command)
NAME qualifier,NAME qualifier,NAME qualifier
LOW (qualifier),LOW (qualifier),LOW (qualifier)
GGRAPH command,GGRAPH command,GGRAPH command
GGRAPH (command),GGRAPH (command),GGRAPH (command)
HIGH qualifier,HIGH qualifier,HIGH qualifier
LOW (qualifier),LOW (qualifier),LOW (qualifier)
GGRAPH command,GGRAPH command,GGRAPH command
GGRAPH (command),GGRAPH (command),GGRAPH (command)
HIGH qualifier,HIGH qualifier,HIGH qualifier

The variable name that you use in the variable specification is the same as the name defined in the data dictionary. This also the default name for referencing the variable in the graph specification. To use a different name in the graph specification, rename the variable by appending the qualifier [NAME="name"] to the name in the variable specification. You might do this to avoid name conflicts across datasets, to shorten the name, or to reuse the same graph specification even if the datasets have different variable names. For example:

GGRAPH
  /GRAPHDATASET NAME="graphdataset" VARIABLES=jobcat[NAME="catvar"] COUNT()
  /GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
  SOURCE: s=userSource(id("graphdataset"))
  DATA: catvar=col(source(s), name("catvar"), unit.category())
  DATA: count=col(source(s), name("COUNT"))
  GUIDE: axis(dim(1), label("Employment Category"))
  GUIDE: axis(dim(2), label("Count"))
  ELEMENT: interval(position(catvar*count))
END GPL.

The default name for a summary function is the function name in uppercase letters followed by the parameters separated by underscores. For example, if the function is MEAN(salary), the default name for referencing this function in the graph specification is MEAN_salary. For GPTILE(salary,90), the default name is GPTILE_salary_90. You can also change the default function name using the qualifier [NAME="name"], just as you do with variables. For example:

GGRAPH
  /GRAPHDATASET NAME="graphdataset"
                VARIABLES=jobcat MEDIAN(salary) MEAN(salary)[NAME="meansal"]
  /GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
  SOURCE: s=userSource(id("graphdataset"))
  DATA: jobcat=col(source(s), name("jobcat"), unit.category())
  DATA: medsal=col(source(s), name("MEDIAN_salary"))
  DATA: meansal=col(source(s), name("meansal"))
  GUIDE: axis(dim(1), label("Employment Category"))
  GUIDE: axis(dim(2), label("Salary"))
  ELEMENT: line(position(jobcat*medsal), color("Median"))
  ELEMENT: line(position(jobcat*meansal), color("Mean"))
END GPL.

Error interval functions produce three values (a summary value, an upper bound, and a lower bound), so there are three default names for these functions. The default name for the summary value follows the same rule as the default name for a summary function: the function name in uppercase letters followed by the parameters separated by underscores. The other two values are this name with _HIGH appended to the name for the upper bound and _LOW appended to the name for the lower bound. For example, if the function is MEANCI(salary, 95), the default names for referencing the results of this function in the graph specification are MEANCI_salary_95, MEANCI_salary_95_HIGH, and MEANCI_salary_95_LOW. You can change the names of the values using the qualifiers [NAME="name" HIGH="name" LOW="name"]. For example:

GGRAPH
  /GRAPHDATASET NAME="graphdataset"
                VARIABLES=jobcat COUNTCI(95)[NAME="stat" HIGH="high" LOW="low"]
  /GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
  SOURCE: s=userSource(id("graphdataset"))
  DATA: jobcat=col(source(s), name("jobcat"), unit.category())
  DATA: stat=col(source(s), name("stat"))
  DATA: high=col(source(s), name("high"))
  DATA: low=col(source(s), name("low"))
  GUIDE: axis(dim(1), label("Employment Category"))
  GUIDE: axis(dim(2), label("Count with 95% CI"))
  ELEMENT: point(position(jobcat*stat))
  ELEMENT: interval(position(region.spread.range(jobcat*(low+high))), shape(shape.ibeam))
END GPL.

Related Topics

VARIABLES Keyword (GGRAPH command)
Measurement Level (GGRAPH command)
Functions (GGRAPH command)


Measurement Level (GGRAPH command)

LEVEL (qualifier),LEVEL (qualifier),LEVEL (qualifier)
GGRAPH command,GGRAPH command,GGRAPH command
GGRAPH (command),GGRAPH (command),GGRAPH (command)
LEVEL qualifier,LEVEL qualifier,LEVEL qualifier

You can change a variable's measurement level temporarily by appending the qualifier [LEVEL=measurement level] to the name in the variable specification. (The variable's measurement level in the dictionary is unaffected.) Valid values for the measurement level are SCALE, NOMINAL, and ORDINAL. Currently, the measurement level qualifier is used to influence the behavior of the REPORTMISSING keyword. If the measurement level is set to SCALE, missing values are not reported for that variable, even if the value of the REPORTMISSING keyword is YES. If you are using the NAME qualifier for the same variable, both qualifiers are enclosed in the same pair of square brackets. For example:

GGRAPH
  /GRAPHDATASET NAME="graphdataset" VARIABLES=jobcat[NAME="empcat" LEVEL=NOMINAL] COUNT()
  /GRAPHSPEC SOURCE=GPLFILE("simplebarchart.gpl").

Related Topics

VARIABLES Keyword (GGRAPH command)
Variable and Function Names (GGRAPH command)
Functions (GGRAPH command)


Functions (GGRAPH command)

Utility functions:

CASEVALUE (function),CASEVALUE (function),CASEVALUE (function)
GGRAPH command,GGRAPH command,GGRAPH command
CASEVALUE(var) Yields the value of the specified variable for each case. CASEVALUE always produces one value for each case and always results in GGRAPH creating an unaggregated graph dataset. Use this function when you are creating graphs of individual cases and want to use the values of the specified variable as the axis tick labels for each case. This function cannot be used with multiple response sets or aggregation functions.

Aggregation functions:

Three groups of aggregation functions are available: count functions, summary functions, and error interval functions.

charts,charts,charts
count functions,count functions,count functions

Count functions:

COUNT (function),COUNT (function),COUNT (function)
GGRAPH command,GGRAPH command,GGRAPH command

Note: Percent and cumulative statistic functions are not available in the variable specification. Use the summary percent and cumulative statistic functions that are available in the Graphics Production Language (GPL) itself. The GPL documentation has more information about these functions and how to use them.

COUNT() | Frequency of cases in each category.
RESPONSES() | Number of responses for a multiple dichotomy set.
RESPONSES(DUP / NODUP)
 | Number of responses for a multiple category set. The argument (DUP or NODUP) specifies whether the function counts duplicates. The argument is optional, and the default is not to count duplicates. This function cannot be used with a multiple dichotomy set.

• Count functions yield the count of valid cases within categories determined by the other variables in the variable specification (including other scale variables that are not parameters of a summary function).

• Count functions do not use variables as parameters.

charts,charts,charts
summary functions,summary functions,summary functions

Summary functions:

MINIMUM (function),MINIMUM (function),MINIMUM (function)
GGRAPH command,GGRAPH command,GGRAPH command
MAXIMUM (function),MAXIMUM (function),MAXIMUM (function)
GGRAPH command,GGRAPH command,GGRAPH command
VALIDN (function),VALIDN (function),VALIDN (function)
GGRAPH command,GGRAPH command,GGRAPH command
COUNT (function),COUNT (function),COUNT (function)
GGRAPH command,GGRAPH command,GGRAPH command
MEAN (function),MEAN (function),MEAN (function)
GGRAPH command,GGRAPH command,GGRAPH command
STDDEV (function),STDDEV (function),STDDEV (function)
GGRAPH command,GGRAPH command,GGRAPH command
VARIANCE (function),VARIANCE (function),VARIANCE (function)
GGRAPH command,GGRAPH command,GGRAPH command
MEDIAN (function),MEDIAN (function),MEDIAN (function)
GGRAPH command,GGRAPH command,GGRAPH command
GMEDIAN (function),GMEDIAN (function),GMEDIAN (function)
GGRAPH command,GGRAPH command,GGRAPH command
MODE (function),MODE (function),MODE (function)
GGRAPH command,GGRAPH command,GGRAPH command
PTILE (function),PTILE (function),PTILE (function)
GGRAPH command,GGRAPH command,GGRAPH command
GPTILE (function),GPTILE (function),GPTILE (function)
GGRAPH command,GGRAPH command,GGRAPH command
PLT (function),PLT (function),PLT (function)
GGRAPH command,GGRAPH command,GGRAPH command
PGT (function),PGT (function),PGT (function)
GGRAPH command,GGRAPH command,GGRAPH command
NLT (function),NLT (function),NLT (function)
GGRAPH command,GGRAPH command,GGRAPH command
NGT (function),NGT (function),NGT (function)
GGRAPH command,GGRAPH command,GGRAPH command
PIN (function),PIN (function),PIN (function)
GGRAPH command,GGRAPH command,GGRAPH command
NIN (function),NIN (function),NIN (function)
GGRAPH command,GGRAPH command,GGRAPH command
NLE (function),NLE (function),NLE (function)
GGRAPH command,GGRAPH command,GGRAPH command
PLE (function),PLE (function),PLE (function)
GGRAPH command,GGRAPH command,GGRAPH command
NEQ (function),NEQ (function),NEQ (function)
GGRAPH command,GGRAPH command,GGRAPH command
PEQ (function),PEQ (function),PEQ (function)
GGRAPH command,GGRAPH command,GGRAPH command
NGE (function),NGE (function),NGE (function)
GGRAPH command,GGRAPH command,GGRAPH command
PGE (function),PGE (function),PGE (function)
GGRAPH command,GGRAPH command,GGRAPH command
MINIMUM(var) | Minimum value of the variable.
MAXIMUM(var) | Maximum value of the variable.
VALIDN(var) | Number of cases for which the variable has a nonmissing value.
SUM(var) | Sum of the values of the variable.
MEAN(var) | Mean of the variable.
STDDEV(var) | Standard deviation of the variable.
VARIANCE(var) | Variance of the variable.
MEDIAN(var) | Median of the variable.
GMEDIAN(var) | Group median of the variable.
MODE(var) | Mode of the variable.
PTILE(var,x) | Xth percentile value of the variable. X must be greater than 0 and less than 100.
GPTILE(var,x) | Xth percentile value of the variable, where the percentile is calculated as if the values were uniformly distributed over the whole interval. X must be greater than 0 and less than 100.
PLT(var,x) | Percentage of cases for which the value of the variable is less than x.
PGT(var,x) | Percentage of cases for which the value of the variable is greater than x.
NLT(var,x) | Number of cases for which the value of the variable is less than x.
NGT(var,x) | Number of cases for which the value of the variable is greater than x.
PIN(var,x1,x2) | Percentage of cases for which the value of the variable is greater than or equal to x1 and less than or equal to x2. x1 cannot exceed x2.
NIN(var,x1,x2) | Number of cases for which the value of the variable is greater than or equal to x1 and less than or equal to x2. x1 cannot exceed x2.
NLE(var,x) | Number of cases for which the value of the variable is less than or equal to x.
PLE(var,x) | Percentage of cases for which the value of the variable is less than or equal to x.
NEQ(var,x) | Number of cases for which the value of the variable is equal to x.
PEQ(var,x) | Percentage of cases for which the value of the variable is equal to x.
NGE(var,x) | Number of cases for which the value of the variable is greater than or equal to x.
PGE(var,x) | Percentage of cases for which the value of the variable is greater than or equal to x.

• Summary functions yield a single value.

• Summary functions operate on summary variables (variables that record continuous values, such as age or expenses). To use a summary function, specify the name of one or more variables as the first parameter of the function and then specify other required parameters as shown. The variable used as a parameter cannot contain string data.

charts,charts,charts
error functions,error functions,error functions

Error interval functions:

COUNTCI (function) MEDIANCI (function),COUNTCI (function) MEDIANCI (function),COUNTCI (function) MEDIANCI (function)
GGRAPH command,GGRAPH command,GGRAPH command
GGRAPH command,GGRAPH command,GGRAPH command
MEANCI (function),MEANCI (function),MEANCI (function)
GGRAPH command,GGRAPH command,GGRAPH command
MEANSD (function),MEANSD (function),MEANSD (function)
GGRAPH command,GGRAPH command,GGRAPH command
MEANSE (function),MEANSE (function),MEANSE (function)
GGRAPH command,GGRAPH command,GGRAPH command
COUNTCI(alpha) | Confidence intervals for the count with a confidence level of alpha. alpha must be greater than or equal to 50 and less than 100.
MEDIANCI(var,alpha) | Confidence intervals for median of the variable with a confidence level of alpha. alpha must be greater than or equal to 50 and less than 100.
MEANCI(var,alpha) | Confidence intervals for mean of the variable with a confidence level of alpha. alpha must be greater than or equal to 50 and less than 100.
MEANSD(var,multiplier)
 | Standard deviations for mean of the variable with a multiplier. multiplier must be an integer greater than 0.
MEANSE(var,multiplier)
 | Standard errors for mean of the variable with a multiplier. multiplier must be an integer greater than 0.

• Error functions yield three values: a summary value, a lower bound value, and an upper bound value.

• Error functions may or may not operate on summary variables (variables that record continuous values, such as age or expenses). To use a summary function that operates on a variable, specify the name of the variable as the first parameter of the function and then specify other required parameters as shown. The variable used as a parameter cannot contain string data.

Related Topics

VARIABLES Keyword (GGRAPH command)
Variable and Function Names (GGRAPH command)
Measurement Level (GGRAPH command)


TRANSFORM Keyword (GGRAPH command)

TRANSFORM (keyword),TRANSFORM (keyword),TRANSFORM (keyword)
GGRAPH command,GGRAPH command,GGRAPH command
GGRAPH (command),GGRAPH (command),GGRAPH (command)
TRANSFORM keyword,TRANSFORM keyword,TRANSFORM keyword

The TRANSFORM keyword applies a transformation to the graph dataset.

NO Do not transform the graph dataset.
VARSTOCASES(SUMMARY="varname" INDEX="varname")
Transform the summary function results to cases in the graph dataset. Use this when you are creating graphs of separate variables. The results of each summary function becomes a case in the graph dataset, and the data elements drawn for each case act like categories in a categorical graph. Each case is identified by an index variable whose value is a unique sequential number. The result of the summary function is stored in the summary variable. The upper and lower bound of error interval functions are also stored in two other variables. By default, the names of the variables are #INDEX for the index variable, #SUMMARY for the summary variable, #HIGH for the upper bound variable, and #LOW for the lower bound variable. You can change these names by using the SUMMARY, INDEX, HIGH, and LOW qualifiers. Furthermore, break variables in the variable specification are treated as fixed variables and are not transposed. Note that this transformation is similar to the VARSTOCASES command (see VARSTOCASES).

Examples

GGRAPH
  /GRAPHDATASET NAME="graphdataset" VARIABLES=MEAN(salbegin) MEAN(salary)
   TRANSFORM=VARSTOCASES(SUMMARY="meansal" INDEX="variables")
  /GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
  SOURCE: s=userSource(id("graphdataset"))
  DATA: variables=col(source(s), name("variables"), unit.category())
  DATA: meansal=col(source(s), name("meansal"))
  GUIDE: axis(dim(2), label("Mean"))
  ELEMENT: interval(position(variables*meansal))
END GPL.

GGRAPH
  /GRAPHDATASET NAME="graphdataset" VARIABLES=MEANCI(salbegin, 95) MEANCI(salary, 95)
   TRANSFORM=VARSTOCASES(SUMMARY="meansal" INDEX="variables" LOW="low" HIGH="high")
  /GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
  SOURCE: s=userSource(id("graphdataset"))
  DATA: variables=col(source(s), name("variables"), unit.category())
  DATA: meansal=col(source(s), name("meansal"))
  DATA: low=col(source(s), name("low"))
  DATA: high=col(source(s), name("high"))
  GUIDE: axis(dim(2), label("Mean with 95% CI"))
  ELEMENT: point(position(variables*meansal))
  ELEMENT: interval(position(region.spread.range(variables*(low+high))),
                    shape(shape.ibeam))
END GPL.

Related Topics

GRAPHDATASET Subcommand (GGRAPH command)
NAME Keyword (GGRAPH command)
DATASET Keyword (GGRAPH command)
VARIABLES Keyword (GGRAPH command)
MISSING Keyword (GGRAPH command)
REPORTMISSING Keyword (GGRAPH command)
CASELIMIT Keyword (GGRAPH command)


MISSING Keyword (GGRAPH command)

MISSING (keyword),MISSING (keyword),MISSING (keyword)
GGRAPH command,GGRAPH command,GGRAPH command
GGRAPH (command),GGRAPH (command),GGRAPH (command)
MISSING keyword,MISSING keyword,MISSING keyword

The MISSING keyword specifies how missing values are handled when the variable specification includes an aggregation function. When the variable specification includes only variables or includes the CASEVALUE function, this keyword does not affect the treatment of missing values. The graph dataset is unaggregated, so cases with system- and user-missing values are always included in the graph dataset.

LISTWISE | Exclude the whole case if any one of the variables in the variable specification has a missing value. This is the default.
VARIABLEWISE | Exclude a case from the aggregation function if the value is missing for a particular variable being analyzed. This means that a case is excluded if that case has a missing value for a variable that is a summary function parameter.

Related Topics

GRAPHDATASET Subcommand (GGRAPH command)
NAME Keyword (GGRAPH command)
DATASET Keyword (GGRAPH command)
VARIABLES Keyword (GGRAPH command)
TRANSFORM Keyword (GGRAPH command)
REPORTMISSING Keyword (GGRAPH command)
CASELIMIT Keyword (GGRAPH command)


REPORTMISSING Keyword (GGRAPH command)

REPORTMISSING (keyword),REPORTMISSING (keyword),REPORTMISSING (keyword)
GGRAPH command,GGRAPH command,GGRAPH command
GGRAPH (command),GGRAPH (command),GGRAPH (command)
REPORTMISSING keyword,REPORTMISSING keyword,REPORTMISSING keyword

The REPORTMISSING keyword specifies whether to create a category for each unique user-missing value.

NO | Do not create a category for each unique user-missing value. User-missing values are treated like system-missing values. This is the default.
YES | Create a category for each unique user-missing value. User-missing values are treated as valid categories, are included as break variables for aggregation functions, and are drawn in the graph. Note that this does not affect variables identified as SCALE by the LEVEL qualifier in the VARIABLES keyword.

Related Topics

GRAPHDATASET Subcommand (GGRAPH command)
NAME Keyword (GGRAPH command)
DATASET Keyword (GGRAPH command)
VARIABLES Keyword (GGRAPH command)
TRANSFORM Keyword (GGRAPH command)
MISSING Keyword (GGRAPH command)
CASELIMIT Keyword (GGRAPH command)


CASELIMIT Keyword (GGRAPH command)

CASELIMIT (keyword),CASELIMIT (keyword),CASELIMIT (keyword)
GGRAPH command,GGRAPH command,GGRAPH command
GGRAPH (command),GGRAPH (command),GGRAPH (command)
CASELIMIT keyword,CASELIMIT keyword,CASELIMIT keyword

The CASELIMIT keyword specifies a limit to the number of cases that are included in the graph dataset. The limit does not apply to the number of cases use for analysis in any functions specified by the VARIABLES keyword. It only limits the number of cases in the graph dataset, which may or may not affect the number cases drawn in the resulting chart. You may want to limit the number of cases for very large datasets that are not summarized by a function. A scatterplot is an example. Limiting cases may improve performance.

value Limit the number of cases in the graph dataset to the specified value. The default value is 1000000.

Related Topics

GRAPHDATASET Subcommand (GGRAPH command)
NAME Keyword (GGRAPH command)
DATASET Keyword (GGRAPH command)
VARIABLES Keyword (GGRAPH command)
TRANSFORM Keyword (GGRAPH command)
MISSING Keyword (GGRAPH command)
REPORTMISSING Keyword (GGRAPH command)


GRAPHSPEC Subcommand (GGRAPH command)

GRAPHSPEC (subcommand),GRAPHSPEC (subcommand),GRAPHSPEC (subcommand)
GGRAPH command,GGRAPH command,GGRAPH command
GGRAPH (command),GGRAPH (command),GGRAPH (command)
GRAPHSPEC subcommand,GRAPHSPEC subcommand,GRAPHSPEC subcommand

GRAPHSPEC defines a graph specification. A graph specification identifies the source used to create the graph, in addition to other features like templates. GRAPHSPEC is repeatable, allowing you to define multiple graph specifications to create multiple graphs with one GGRAPH command.

Example

GGRAPH
  /GRAPHDATASET NAME="graphdataset" VARIABLES=jobcat COUNT()
  /GRAPHSPEC SOURCE=GPLFILE("simplebarchart.gpl").

Related Topics

GGRAPH
Overview (GGRAPH command)
GRAPHDATASET Subcommand (GGRAPH command)
GPL Examples (GGRAPH command)
SOURCE Keyword
EDITABLE Keyword
LABEL Keyword
DEFAULTTEMPLATE Keyword (GGRAPH command)
TEMPLATE Keyword (GGRAPH command)
VIZSTYLESHEET Keyword (GGRAPH command)


SOURCE Keyword

SOURCE (keyword),SOURCE (keyword),SOURCE (keyword)
GGRAPH command,GGRAPH command,GGRAPH command
GGRAPH (command),GGRAPH (command),GGRAPH (command)
SOURCE keyword,SOURCE keyword,SOURCE keyword

The SOURCE keyword specifies the source of the graph specification.

INLINE An inline graph specification follows the GGRAPH command. Currently, the BEGIN GPL/END GPL block is used for the inline graph specification. This block must follow the GGRAPH command, and there must be as many blocks as there are GRAPHSPEC subcommands with SOURCE=INLINE. See the topic BEGIN GPL-END GPL for more information. See Overview (BEGIN GPL-END GPL command) for limitations.
GPLFILE("filespec")
Use the specified GPL file as the graph specification. See the GPL documentation for more details about GPL. The examples in the GPL documentation may look different compared to the syntax pasted from the Chart Builder. The main difference is in when aggregation occurs. See Working with the GPL (GGRAPH command) below for information about the differences. See GPL Examples (GGRAPH command) for examples with GPL that is similar to the pasted syntax.
VIZMLFILE("filespec")
Use the specified ViZml file as the graph specification. You can save ViZml from the Chart Editor. See the topic Saving the Chart as XML for more information. See the ViZml documentation for more details about ViZml.
VIZTEMPLATE(NAME="template name"[LOCATION=LOCAL]
MAPPING(templatemapping))
VIZTEMPLATE(NAME="template name"[LOCATION="repository folderspec"]
MAPPING(templatemapping))
Use the specified visualization template and mapping as the graph specification. The LOCATION qualifier specifies the location in which to find the named template. You cannot set an arbitrary location on your file system. Instead, you specify whether the template is a local template or is obtained from a specific repository. Note that a visualization template is not the same as a template for use with the TEMPLATE keyword.

• If you received a template and want to reference it in syntax, you must first manually import it with the Graphboard Template Chooser to make it a local template.

• For built-in or imported templates, set the location to LOCAL.

• For templates stored in a repository, use a repository file specification. For more information about repository file specifications, see File Specifications for Repository Objects.

The template mapping is a series of key-value pairs separated by spaces. An example is MAPPING("Categories"="jobcat" "Summary"="Count").

• The key is a slot defined by the template, and the value is a variable or string assigned to the slot.

• If a variable is renamed in the VARIABLES keyword using the [NAME="name"] qualifier, the value refers to the rename, not the original name.

• In the example, the keys are Categories and Summary, and the respective values are jobcat and Count.

• Individual keys and values are enclosed in quotes.

• Each value can also be followed by the qualifier [DATASET="dataset name"] to indicate a variable's dataset.

• At this time, only one dataset can be used with each template.

• To determine valid slot names, open the Graphboard Template Chooser, add variables to slots of interest, and paste the syntax. You can access the Template Chooser by selecting Graphboard Template Chooser from the Graphs menu.

New templates can be created with the separate PASW Viz Designer product. The GGRAPH command can use these templates if they are stored in the repository or if they are imported using the Graphboard Template Chooser.

Note: When using a visualization template, it is recommended that you include DEFAULTTEMPLATE=NO. This setting will prevent the default template from overriding the styles in the visualization template.

Examples

GGRAPH
  /GRAPHDATASET NAME="graphdataset" VARIABLES=jobcat COUNT()
  /GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
  SOURCE: s=userSource(id("graphdataset"))
  DATA: jobcat=col(source(s), name("jobcat"), unit.category())
  DATA: count=col(source(s), name("COUNT"))
  GUIDE: axis(dim(1), label("Employment Category"))
  GUIDE: axis(dim(2), label("Count"))
  ELEMENT: interval(position(jobcat*count))
END GPL.

GGRAPH
  /GRAPHDATASET NAME="graphdataset" VARIABLES=jobcat COUNT()
  /GRAPHSPEC SOURCE=GPLFILE("simplebarchart.gpl").
GGRAPH
  /GRAPHDATASET NAME="graphdataset" VARIABLES=jobcat COUNT()
  /GRAPHSPEC SOURCE=VIZMLFILE("simplebarchart.xml").
GGRAPH
  /GRAPHDATASET NAME="graphdataset" VARIABLES=jobcat
  /GRAPHSPEC SOURCE=VIZTEMPLATE(NAME="Bar"
                    MAPPING("Categories"="jobcat" "Summary"="Count"))
   DEFAULTTEMPLATE=NO.

GGRAPH
  /GRAPHDATASET NAME="graphdataset" VARIABLES=salbegin salary gender[NAME="sex"]
  /GRAPHSPEC SOURCE=VIZTEMPLATE(NAME="Binned Scatter"[LOCATION="SPSSCR:///viz/templates"]
                                MAPPING("X"="salbegin"[DATASET="graphdataset"]
                                        "Y"="salary"[DATASET="graphdataset"]
                                        "Panel across"="sex"[DATASET="graphdataset"]))
   DEFAULTTEMPLATE=NO.

Related Topics

GRAPHSPEC Subcommand (GGRAPH command)
EDITABLE Keyword
LABEL Keyword
DEFAULTTEMPLATE Keyword (GGRAPH command)
TEMPLATE Keyword (GGRAPH command)
VIZSTYLESHEET Keyword (GGRAPH command)


Working with the GPL (GGRAPH command)

The Chart Builder allows you to paste GGRAPH syntax. This syntax contains inline GPL

You may want to edit the GPL to create a chart or add a feature that isn't available from the Chart Builder. You can use the GPL documentation to help you. However, the GPL documentation always uses unaggregated data and includes GPL statistics in the examples to aggregate the data. The pasted syntax, on the other hand, may use data aggregated by a GGRAPH summary function. Also, the pasted syntax includes defaults that you may have to change when you edit the syntax. Therefore, it may be confusing how you can use the pasted syntax to create the examples. Following are some tips.

• Variables must be specified in two places: in the VARIABLES keyword in the GGRAPH command and in the DATA statements in the GPL. So, if you add a variable, make sure a reference to it appears in both places.

• Pasted syntax often uses the VARIABLES keyword to specify summary statistics. Like other variables, the summary function name is specified in the GPL DATA statement. You do not need to use GGRAPH summary functions. Instead, you can use the equivalent GPL statistic for aggregation. However, for very large data sets, you may find that pre-aggregating the data with GGRAPH is faster than using the aggregation in the GPL itself. Try both approaches and stick with the one that feels comfortable to you. In the examples that follow, you can compare the different approaches.

• Make sure that you understand how the functions are being used in the GPL. You may need to modify one or more of them when you add a variable to pasted syntax. For example, if you change the dimension on which a categorical variable appears, you may need to change references to the dimension in the GUIDE and SCALE statements. If you are unsure about whether you need a particular function, try removing it and see if you get the results you expect.

Here's an example from the GPL documentation:

Example from GPL documentation
SOURCE: s=usersource(id("Employeedata"))
DATA: jobcat = col(source(s), name("jobcat"), unit.category())
DATA: gender = col(source(s), name("gender"), unit.category())
DATA: salary = col(source(s), name("salary"))
SCALE: linear(dim(2), include(0))
GUIDE: axis(dim(3), label("Gender"))
GUIDE: axis(dim(2), label("Mean Salary"))
GUIDE: axis(dim(1), label("Job Category"))
ELEMENT: interval(position(summary.mean(jobcat*salary*gender)))

The simplest way to use the example is to use unaggregated data and VARIABLES=ALL like this:

Modified example with unaggregated data
GGRAPH
  /GRAPHDATASET NAME="Employeedata" VARIABLES=ALL
  /GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
SOURCE: s=usersource(id("Employeedata"))
DATA: jobcat = col(source(s), name("jobcat"), unit.category())
DATA: gender = col(source(s), name("gender"), unit.category())
DATA: salary = col(source(s), name("salary"))
SCALE: linear(dim(2), include(0))
GUIDE: axis(dim(3), label("Gender"))
GUIDE: axis(dim(2), label("Mean Salary"))
GUIDE: axis(dim(1), label("Job Category"))
ELEMENT: interval(position(summary.mean(jobcat*salary*gender)))END GPL

Note that specifying VARIABLES=ALL includes all the data in the graph. You can improve performance by using only those variables that you need. In this example, VARIABLES=jobcat gender salary would have been sufficient.

You can also use aggregated data like the following, which is more similar to the pasted syntax:

Modified example with aggregated data
GGRAPH
  /GRAPHDATASET NAME="Employeedata" VARIABLES=jobcat gender MEAN(salary)
  /GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
  SOURCE: s=userSource(id("Employeedata"))
  DATA: jobcat=col(source(s), name("jobcat"), unit.category())
  DATA: gender=col(source(s), name("gender"), unit.category())
  DATA: MEAN_salary=col(source(s), name("MEAN_salary"))
  SCALE: linear(dim(2), include(0))
  GUIDE: axis(dim(3), label("Gender"))
  GUIDE: axis(dim(2), label("Mean Salary"))
  GUIDE: axis(dim(1), label("Job Category"))
  ELEMENT: interval(position(jobcat*MEAN_salary*gender))
END GPL.


EDITABLE Keyword

EDITABLE (keyword),EDITABLE (keyword),EDITABLE (keyword)
GGRAPH command,GGRAPH command,GGRAPH command
GGRAPH (command),GGRAPH (command),GGRAPH (command)
EDITABLE keyword,EDITABLE keyword,EDITABLE keyword

The EDITABLE keyword specifies that the resulting graph can be edited. If you are creating a complicated graph with the graph specification, it may be useful to prevent editing because not all of the graph's features may be supported in the editor.

YES | The graph can be edited. This is the default.
NO | The graph cannot be edited.

Related Topics

GRAPHSPEC Subcommand (GGRAPH command)
SOURCE Keyword
LABEL Keyword
DEFAULTTEMPLATE Keyword (GGRAPH command)
TEMPLATE Keyword (GGRAPH command)
VIZSTYLESHEET Keyword (GGRAPH command)


LABEL Keyword

LABEL (keyword),LABEL (keyword),LABEL (keyword)
GGRAPH command,GGRAPH command,GGRAPH command
GGRAPH (command),GGRAPH (command),GGRAPH (command)
LABEL keyword,LABEL keyword,LABEL keyword

The LABEL keyword specifies the output label. This label appears in the Output Viewer. It is also used in Output XML (OXML) as a chartTitle element, which is not the same as the title in the graph itself.

string Use the specified string as the label.

Related Topics

GRAPHSPEC Subcommand (GGRAPH command)
SOURCE Keyword
EDITABLE Keyword
DEFAULTTEMPLATE Keyword (GGRAPH command)
TEMPLATE Keyword (GGRAPH command)
VIZSTYLESHEET Keyword (GGRAPH command)


DEFAULTTEMPLATE Keyword (GGRAPH command)

DEFAULTTEMPLATE (keyword),DEFAULTTEMPLATE (keyword),DEFAULTTEMPLATE (keyword)
GGRAPH command,GGRAPH command,GGRAPH command
GGRAPH (command),GGRAPH (command),GGRAPH (command)
DEFAULTTEMPLATE keyword,DEFAULTTEMPLATE keyword,DEFAULTTEMPLATE keyword

The DEFAULTTEMPLATE keyword specifies whether GGRAPH applies the default styles to the graph. Most default styles are defined in the Options dialog box, which you can access by choosing Options from the Edit menu. Then click the Charts tab. Some SET commands also define default aesthetics. Finally, other default styles are set to improve the presentation of graphs. These are controlled by the chart_style.sgt template file located in the installation directory.

YES | Apply default styles to the graph. This is the default.
NO | Do not apply default styles to the graph. This option is useful when you are using a custom ViZml or GPL file that defines styles that you do not want to be overridden by the default styles.

Related Topics

GRAPHSPEC Subcommand (GGRAPH command)
SOURCE Keyword
EDITABLE Keyword
LABEL Keyword
TEMPLATE Keyword (GGRAPH command)
VIZSTYLESHEET Keyword (GGRAPH command)


TEMPLATE Keyword (GGRAPH command)

TEMPLATE (keyword),TEMPLATE (keyword),TEMPLATE (keyword)
GGRAPH command,GGRAPH command,GGRAPH command
GGRAPH (command),GGRAPH (command),GGRAPH (command)
TEMPLATE keyword,TEMPLATE keyword,TEMPLATE keyword

The TEMPLATE keyword identifies an existing template file or files and applies them to the graph requested by the current GGRAPH command. The template overrides the default settings that are used to create any graph, and the specifications on the current GGRAPH command override the template. Templates do not override visualization stylesheets specified with the VIZSTYLESHEET keyword.

Templates are created in the Chart Editor by saving an existing chart as a template. Note that these templates are not the same as visualization templates. Visualization templates are created in a separate PASW Viz Designer product and are referenced by the SOURCE keyword.

The TEMPLATE keyword is followed by an equals sign (=) and square brackets ( [ ] ) that contain one or more file specifications. Each file specification is enclosed in quotation marks. The square brackets are optional if there is only one file, but the file must be enclosed in quotation marks. Note that the order in which the template files are specified is the order in which GGRAPH applies the templates. Therefore, template files that appear after other template files can override the templates that were applied earlier.

filespec Apply the specified template file or files to the graph being created.

Example

GGRAPH
  /GRAPHDATASET NAME="graphdataset" VARIABLES=jobcat COUNT()
  /GRAPHSPEC SOURCE=GPLFILE("simplebarchart.gpl")
             TEMPLATE=["mytemplate.sgt"
                       "/myothertemplate.sgt"].

Related Topics

GRAPHSPEC Subcommand (GGRAPH command)
SOURCE Keyword
EDITABLE Keyword
LABEL Keyword
DEFAULTTEMPLATE Keyword (GGRAPH command)
VIZSTYLESHEET Keyword (GGRAPH command)


VIZSTYLESHEET Keyword (GGRAPH command)

VIZSTYLESHEET (keyword),VIZSTYLESHEET (keyword),VIZSTYLESHEET (keyword)
GGRAPH command,GGRAPH command,GGRAPH command
GGRAPH (command),GGRAPH (command),GGRAPH (command)
VIZSTYLESHEET keyword,VIZSTYLESHEET keyword,VIZSTYLESHEET keyword

The VIZSTYLESHEET keyword identifies an existing visualization stylesheet and applies it to the graph requested by the current GGRAPH command. Styles stored in the original visualization template, GPL specification, ViZml specification, or user-specified templates are preserved. Because the default template may set styles that cannot be replaced by the visualization stylesheet, it is recommended that you use DEFAULTTEMPLATE=NO in combination with the VIZSTYLESHEET keyword.

The keyword is followed by an equals sign (=) and the name of the stylesheet in quotation marks. By default, GGRAPH looks for a built-in or imported template that is stored on the local machine. This default behavior is equivalent to appending the qualifier [LOCATION=LOCAL] to the quoted stylesheet name. To use a stylesheet in a repository, append the qualifier [LOCATION="repository folderspec"] to the quoted stylesheet name. For more information about repository file specifications, see File Specifications for Repository Objects. The repository file specification is enclosed in quotation marks.

New stylesheets can be created with the separate PASW Viz Designer product. The GGRAPH command can reference these stylesheets if they are stored in the repository or if they are imported using the Graphboard Template Chooser. You can access the Template Chooser by selecting Graphboard Template Chooser from the Graphs menu.

"stylesheet name"
Apply the specified stylesheet to the graph being created.

Example

GGRAPH
  /GRAPHDATASET NAME="graphdataset" VARIABLES=jobcat
  /GRAPHSPEC SOURCE=VIZTEMPLATE(NAME="Binned Scatter"[LOCATION=LOCAL]
                                MAPPING("X"="salbegin" "Y"="salary"
                                        "Panel across"="gender"))
   VIZSTYLESHEET="Corporate"[LOCATION="SPSSCR:///viz/stylesheets"]
   DEFAULTTEMPLATE=NO.

Related Topics

GRAPHSPEC Subcommand (GGRAPH command)
SOURCE Keyword
EDITABLE Keyword
LABEL Keyword
DEFAULTTEMPLATE Keyword (GGRAPH command)
TEMPLATE Keyword (GGRAPH command)


GPL Examples (GGRAPH command)

Following are some graph examples using GPL. Pictures are not included to encourage you to run the examples. Except when noted, all examples use Employee data.sav, which is located in the product installation directory. See the GPL documentation for more examples.

Simple Bar Chart

GGRAPH
  /GRAPHDATASET NAME="graphdataset" VARIABLES=jobcat MEAN(salary)
  /GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
  SOURCE: s=userSource(id("graphdataset"))
  DATA: jobcat=col(source(s), name("jobcat"), unit.category())
  DATA: meansal=col(source(s), name("MEAN_salary"))
  GUIDE: axis(dim(1), label("Employment Category"))
  GUIDE: axis(dim(2), label("Mean Current Salary"))
  ELEMENT: interval(position(jobcat*meansal))
END GPL.

Simple Bar Chart Using a Multiple-Response Set

Note: This example uses 1991 U.S. General Social Survey.sav, which is located in the product installation directory.

GGRAPH
  /GRAPHDATASET NAME="graphdataset" VARIABLES=$prob RESPONSES()[NAME="RESPONSES"]
  /GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
  SOURCE: s=userSource(id("graphdataset"))
  DATA: prob=col(source(s), name("$prob"), unit.category())
  DATA: responses=col(source(s), name("RESPONSES"))
  GUIDE: axis(dim(1), label("Most Important Problems in Last 12 Months"))
  GUIDE: axis(dim(2), label("Responses"))
  ELEMENT: interval(position(prob*responses))
END GPL.

Stacked Bar Chart

GGRAPH
  /GRAPHDATASET NAME="graphdataset" VARIABLES=jobcat gender COUNT()
  /GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
  SOURCE: s=userSource(id("graphdataset"))
  DATA: jobcat=col(source(s), name("jobcat"), unit.category())
  DATA: gender=col(source(s), name("gender"), unit.category())
  DATA: count=col(source(s), name("COUNT"))
  GUIDE: axis(dim(1), label("Employment Category"))
  GUIDE: axis(dim(2), label("Count"))
  ELEMENT: interval.stack(position(jobcat*count), color(gender))
END GPL.

Clustered Bar Chart

GGRAPH
  /GRAPHDATASET NAME="graphdataset" VARIABLES=jobcat gender MEAN(salary)
  /GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
  SOURCE: s=userSource(id("graphdataset"))
  DATA: jobcat=col(source(s), name("jobcat"), unit.category())
  DATA: gender=col(source(s), name("gender"), unit.category())
  DATA: meansal=col(source(s), name("MEAN_salary"))
  COORD: rect(dim(1,2), cluster(3,0))
  GUIDE: axis(dim(1), label("Employment Category"))
  GUIDE: axis(dim(2), label("Mean Current Salary"))
  ELEMENT: interval(position(gender*meansal*jobcat), color(gender))
END GPL.

Paneled Bar Chart

GGRAPH
  /GRAPHDATASET NAME="graphdataset" VARIABLES=jobcat gender MEAN(salary)
  /GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
  SOURCE: s=userSource(id("graphdataset"))
  DATA: jobcat=col(source(s), name("jobcat"), unit.category())
  DATA: gender=col(source(s), name("gender"), unit.category())
  DATA: meansal=col(source(s), name("MEAN_salary"))
  GUIDE: axis(dim(1), label("Gender"))
  GUIDE: axis(dim(2), label("Mean Current Salary"))
  GUIDE: axis(dim(3), label("Employment Category"))
  ELEMENT: interval(position(gender*meansal*jobcat))
END GPL.

3-D Bar Chart

GGRAPH
  /GRAPHDATASET NAME="graphdataset" VARIABLES=jobcat gender MEAN(salary)
  /GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
  SOURCE: s=userSource(id("graphdataset"))
  DATA: jobcat=col(source(s), name("jobcat"), unit.category())
  DATA: gender=col(source(s), name("gender"), unit.category())
  DATA: meansal=col(source(s), name("MEAN_salary"))
  GUIDE: axis(dim(1), label("Gender"))
  GUIDE: axis(dim(2), label("Employment Category"))
  GUIDE: axis(dim(3), label("Mean Current Salary"))
  COORD: rect(dim(1,2,3))
  ELEMENT: interval(position(gender*jobcat*meansal))
END GPL.

Simple Scatterplot

GGRAPH
  /GRAPHDATASET NAME="graphdataset" VARIABLES=salbegin salary
  /GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
  SOURCE: s=userSource(id("graphdataset"))
  DATA: salbegin=col(source(s), name("salbegin"))
  DATA: salary=col(source(s), name("salary"))
  GUIDE: axis(dim(1), label("Beginning Salary"))
  GUIDE: axis(dim(2), label("Current Salary"))
  ELEMENT: point(position(salbegin*salary))
END GPL.

Simple Scatterplot with Fit Line

GGRAPH
  /GRAPHDATASET NAME="graphdataset" VARIABLES=salbegin salary
  /GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
  SOURCE: s=userSource(id("graphdataset"))
  DATA: salbegin=col(source(s), name("salbegin"))
  DATA: salary=col(source(s), name("salary"))
  GUIDE: axis(dim(1), label("Beginning Salary"))
  GUIDE: axis(dim(2), label("Current Salary"))
  ELEMENT: point(position(salbegin*salary))
  ELEMENT: line(position(smooth.linear(salbegin*salary)))
END GPL.

Pie Chart

GGRAPH
  /GRAPHDATASET NAME="graphdataset" VARIABLES=jobcat COUNT()
  /GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
  SOURCE:s=userSource(id("graphdataset"))
  DATA: jobcat=col(source(s), name("jobcat"), unit.category())
  DATA: count=col(source(s), name("COUNT"))
  GUIDE: axis(dim(1), null())
  COORD: polar.theta()
  SCALE: linear(dim(1), dataMinimum(), dataMaximum())
  ELEMENT: interval.stack(position(summary.percent(count)),color(jobcat))
END GPL.

Area Chart

GGRAPH
  /GRAPHDATASET NAME="graphdataset" VARIABLES=jobcat MEAN(salary)
  /GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
  SOURCE: s=userSource(id("graphdataset"))
  DATA: jobcat=col(source(s), name("jobcat"), unit.category())
  DATA: meansal=col(source(s), name("MEAN_salary"))
  GUIDE: axis(dim(1), label("Employment Category"))
  GUIDE: axis(dim(2), label("Mean Current Salary"))
  ELEMENT: area(position(jobcat*meansal))
END GPL.

Grouped Line Chart

GGRAPH
  /GRAPHDATASET NAME="graphdataset" VARIABLES=jobcat gender MEAN(salary)
  /GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
  SOURCE: s=userSource(id("graphdataset"))
  DATA: jobcat=col(source(s), name("jobcat"), unit.category())
  DATA: gender=col(source(s), name("gender"), unit.category())
  DATA: meansal=col(source(s), name("MEAN_salary"))
  GUIDE: axis(dim(1), label("Employment Category"))
  GUIDE: axis(dim(2), label("Mean Current Salary"))
  ELEMENT: line(position(jobcat*meansal), color(gender), missing.wings())
END GPL.

Bar Chart of Separate Variables

GGRAPH
  /GRAPHDATASET NAME="graphdataset" VARIABLES=MEAN(salary) MEAN(salbegin)
   TRANSFORM=VARSTOCASES(SUMMARY="meansal" INDEX="variables")
  /GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
  SOURCE: s=userSource(id("graphdataset"))
  DATA: variables=col(source(s), name("variables"), unit.category())
  DATA: meansal=col(source(s), name("meansal"))
  GUIDE: axis(dim(2), label("Mean"))
  ELEMENT: interval(position(variables*meansal))
END GPL.

Bar Chart Clustered by Separate Variables

GGRAPH
  /GRAPHDATASET NAME="graphdataset" VARIABLES=MEAN(salary) MEAN(salbegin) jobcat
   TRANSFORM=VARSTOCASES(SUMMARY="meansal" INDEX="variables")
  /GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
  SOURCE: s=userSource(id("graphdataset"))
  DATA: variables=col(source(s), name("variables"), unit.category())
  DATA: jobcat=col(source(s), name("jobcat"), unit.category())
  DATA: meansal=col(source(s), name("meansal"))
  COORD: rect(dim(1,2), cluster(3,0))
  GUIDE: axis(dim(2), label("Mean"))
  GUIDE: legend(aesthetic(aesthetic.color), label("Variables"))
  ELEMENT: interval(position(variables*meansal*jobcat), color(variables))
END GPL.

Bar Chart of Separate Variables Clustered by Categorical Variable

GGRAPH
  /GRAPHDATASET NAME="graphdataset" VARIABLES=MEAN(salary) MEAN(salbegin) jobcat
   TRANSFORM=VARSTOCASES(SUMMARY="meansal" INDEX="variables")
  /GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
  SOURCE: s=userSource(id("graphdataset"))
  DATA: variables=col(source(s), name("variables"), unit.category())
  DATA: jobcat=col(source(s), name("jobcat"), unit.category())
  DATA: meansal=col(source(s), name("meansal"))
  COORD: rect(dim(1,2), cluster(3,0))
  GUIDE: axis(dim(2), label("Mean"))
  GUIDE: legend(aesthetic(aesthetic.color), label("Employment Category"))
  ELEMENT: interval(position(jobcat*meansal*variables), color(jobcat))
END GPL.

Related Topics

GGRAPH
Overview (GGRAPH command)
GRAPHDATASET Subcommand (GGRAPH command)
GRAPHSPEC Subcommand (GGRAPH command)


GLM

GLM (command),GLM (command),GLM (command)
syntax overview,syntax overview,syntax overview

GLM is available in the Advanced Statistics option.

GLM dependent varlist [BY factor list [WITH covariate list]]

[/WSFACTOR=name levels [{DEVIATION [(refcat)]       }] name...
                        {SIMPLE [(refcat)]          }
                        {DIFFERENCE                 }
                        {HELMERT                    }
                        {REPEATED                   }
                        {POLYNOMIAL [({1,2,3...})]**}
                        {             {metric  }    }
                        {SPECIAL (matrix)           }

[/MEASURE=newname newname...]

[/WSDESIGN=effect effect...]†

[/RANDOM=factor factor...]

[/REGWGT=varname]

[/METHOD=SSTYPE({1  })]
                {2  }
                {3**}
                {4  }

[/INTERCEPT=[INCLUDE**] [EXCLUDE]]

[/MISSING=[INCLUDE] [EXCLUDE**]]

[/CRITERIA=[EPS({1E-8**})][ALPHA({0.05**})]
                {a     }         {a     }

[/PRINT  = [DESCRIPTIVE] [HOMOGENEITY] [PARAMETER][ETASQ] [RSSCP]
           [GEF] [LOF] [OPOWER] [TEST [([SSCP] [LMATRIX] [MMATRIX])]]

[/PLOT=[SPREADLEVEL] [RESIDUALS]
       [PROFILE (factor factor*factor factor*factor*factor ...)
           [WITH(covariate={value} [...])]]
                           {MEAN }

[/TEST=effect VS {linear combination [DF(df)]}]
                 {value DF (df)              }

[/LMATRIX={["label"] effect list effect list ...;...}]
          {["label"] effect list effect list ...    }
          {["label"] ALL list; ALL...               }
          {["label"] ALL list                       }

[/CONTRAST (factor name)={DEVIATION[(refcat)]** ‡    }]
                         {SIMPLE [(refcat)]         }
                         {DIFFERENCE                }
                         {HELMERT                   }
                         {REPEATED                  }
                         {POLYNOMIAL  [({1,2,3...})]}
                         {              {metric  }  }
                         {SPECIAL (matrix)          }

[/MMATRIX= {["label"] depvar value depvar value ...;["label"]...}]
           {["label"] depvar value depvar value ...             }
           {["label"] ALL list; ["label"] ...                   }
           {["label"] ALL list                                  }

[/KMATRIX= {list of numbers    }]
           {list of numbers;...}

[/POSTHOC = effect [effect...]
          ([SNK] [TUKEY] [BTUKEY][DUNCAN]
           [SCHEFFE] [DUNNETT(refcat)] [DUNNETTL(refcat)]
           [DUNNETTR(refcat)] [BONFERRONI] [LSD] [SIDAK]
           [GT2] [GABRIEL] [FREGW] [QREGW]  [T2] [T3] [GH][C]
           [WALLER ({100** })]]
                    {kratio}
           [VS effect]

[/EMMEANS=TABLES({OVERALL               })  [WITH(covariate={value} [...])]]
                 {factor                }                   {MEAN }
                 {factor*factor...      }
                 {wsfactor              }
                 {wsfactor*wsfactor ... }
                 {factor*...wsfactor*...}

          [COMPARE ADJ(LSD) (BONFERRONI) (SIDAK)]

[/SAVE=[tempvar [(list of names)]] [tempvar [(list of names)]]...]
       [DESIGN]

[/OUTFILE=[{COVB('savfile'|'dataset')}]
           {CORB('savfile'|'dataset')}
          [EFFECT('savfile'|'dataset')] [DESIGN('savfile'|'dataset')]

[/DESIGN={[INTERCEPT...]    }]
         {[effect effect...]}

† WSDESIGN uses the same specification as DESIGN, with only within-subjects factors.

‡ DEVIATION is the default for between-subjects factors, while POLYNOMIAL is the default for within-subjects factors.

** Default if the subcommand or keyword is omitted.

Temporary variables (tempvar) are:

PRED, WPRED, RESID, WRESID, DRESID, ZRESID, SRESID, SEPRED, COOK, LEVER

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

Release History Collapse Hide details

Release History

Release 17.0

• POSTHOC subcommand: T2, T3, GH, and C keywords are not valid when multiple factors in the model.

• PLOT subcommand: new WITH keyword allows you to fix covariate values for profile plots.

Related Topics

Overview (GLM command)
General Linear Model (GLM) and MANOVA (GLM command)
Models (GLM command)
Custom Hypothesis Specifications (GLM command)
LMATRIX, MMATRIX, and KMATRIX Subcommands (GLM command)
CONTRAST Subcommand (GLM command)


Overview (GLM command)

GLM (command),GLM (command),GLM (command)
syntax overview,syntax overview,syntax overview
analysis of variance,analysis of variance,analysis of variance
GLM command,GLM command,GLM command
analysis of covariance,analysis of covariance,analysis of covariance
GLM command,GLM command,GLM command

GLM (general linear model) is a general procedure for analysis of variance and covariance, as well as regression. GLM is the most versatile of the analysis-of-variance procedures and can be used for both univariate and multivariate designs. GLM allows you to:

• Include interaction and nested effects in your design model. Multiple nesting is allowed; for example, A within B within C is specified as A(B(C)).

• Include covariates in your design model. GLM also allows covariate-by-covariate and covariate-by-factor interactions, such as X by X (or X*X), X by A (or X*A), and X by A within B (or X*A(B)). Thus, polynomial regression or a test of the homogeneity of regressions can be performed.

• Select appropriate sums-of-squares hypothesis tests for effects in balanced design models, unbalanced all-cells-filled design models, and some-cells-empty design models. The estimable functions that correspond to the hypothesis test for each effect in the model can also be displayed.

• Display the general form of estimable functions.

• Display expected mean squares, automatically detecting and using the appropriate error term for testing each effect in mixed-effects and random-effects models.

• Select commonly used contrasts or specify custom contrasts to perform hypothesis tests.

• Customize hypothesis testing, based on the null hypothesis LBM = K, where B is the parameter vector or matrix.

• Display a variety of post hoc tests for multiple comparisons.

• Display estimates of population marginal cell means for both between-subjects factors and within-subjects factors, adjusted for covariates.

• Perform multivariate analysis of variance and covariance.

• Estimate parameters by using the method of weighted least squares and a generalized inverse technique.

• Graphically compare the levels in a model by displaying plots of estimated marginal cell means for each level of a factor, with separate lines for each level of another factor in the model.

• Display a variety of estimates and measures that are useful for diagnostic checking. All of these estimates and measures can be saved in a data file for use by another procedure.

• Perform repeated measures analysis of variance.

• Display homogeneity tests for testing underlying assumptions in multivariate and univariate analyses.

Related Topics

GLM
General Linear Model (GLM) and MANOVA (GLM command)
Models (GLM command)
Custom Hypothesis Specifications (GLM command)
LMATRIX, MMATRIX, and KMATRIX Subcommands (GLM command)
CONTRAST Subcommand (GLM command)


General Linear Model (GLM) and MANOVA (GLM command)

MANOVA (command),MANOVA (command),MANOVA (command)
compared with GLM command,compared with GLM command,compared with GLM command

MANOVA, the other generalized procedure for analysis of variance and covariance, is available only in syntax. The major distinction between GLM and MANOVA in terms of statistical design and functionality is that GLM uses a non-full-rank, or overparameterized, indicator variable approach to parameterization of linear models instead of the full-rank reparameterization approach that is used in MANOVA. GLM employs a generalized inverse approach and employs aliasing of redundant parameters to 0. These processes employed by GLM allow greater flexibility in handling a variety of data situations, particularly situations involving empty cells. GLM offers the following features that are unavailable in MANOVA:

• Identification of the general forms of estimable functions.

• Identification of forms of estimable functions that are specific to four types of sums of squares (Types I–IV).

• Tests that use the four types of sums of squares, including Type IV, specifically designed for situations involving empty cells.

• Flexible specification of general comparisons among parameters, using the syntax subcommands LMATRIX, MMATRIX, and KMATRIX; sets of contrasts can be specified that involve any number of orthogonal or nonorthogonal linear combinations.

• Nonorthogonal contrasts for within-subjects factors (using the syntax subcommand WSFACTORS).

• Tests against nonzero null hypotheses, using the syntax subcommand KMATRIX.

• Feature where estimated marginal means (EMMEANS) and standard errors (adjusted for other factors and covariates) are available for all between-subjects and within-subjects factor combinations in the original variable metrics.

• Uncorrected pairwise comparisons among estimated marginal means for any main effect in the model, for both between- and within-subjects factors.

• Feature where post hoc or multiple comparison tests for unadjusted one-way factor means are available for between-subjects factors in ANOVA designs; twenty different types of comparisons are offered.

• Weighted least squares (WLS) estimation, including saving of weighted predicted values and residuals.

• Automatic handling of random effects in random-effects models and mixed models, including generation of expected mean squares and automatic assignment of proper error terms.

• Specification of several types of nested models via dialog boxes with proper use of the interaction operator (*), due to the nonreparameterized approach.

• Univariate homogeneity-of-variance assumption, tested by using the Levene test.

• Between-subjects factors that do not require specification of levels.

• Profile (interaction) plots of estimated marginal means for visual exploration of interactions involving combinations of between-subjects and/or within-subjects factors.

• Saving of casewise temporary variables for model diagnosis:

• | Predicted values—unstandardized (raw), weighted unstandardized.
• | Residuals—unstandardized, weighted unstandardized, standardized, Studentized, deleted.
• | Standard error of prediction.
• | Cook’s distance.
• | Leverage.

• Saving of a datafile in PASW Statistics format with parameter estimates and their degrees of freedom and significance level.

To simplify the presentation, GLM reference material is divided into three sections: univariate designs with one dependent variable, multivariate designs with several interrelated dependent variables, and repeated measures designs, in which the dependent variables represent the same types of measurements, taken at more than one time.

The full syntax diagram for GLM is presented here. The following GLM sections include partial syntax diagrams, showing the subcommands and specifications that are discussed in that section. Individually, those diagrams are incomplete. Subcommands that are listed for univariate designs are available for any analysis, and subcommands that are listed for multivariate designs can be used in any multivariate analysis, including repeated measures.

Related Topics

GLM
Overview (GLM command)
Models (GLM command)
Custom Hypothesis Specifications (GLM command)
LMATRIX, MMATRIX, and KMATRIX Subcommands (GLM command)
CONTRAST Subcommand (GLM command)


Models (GLM command)

GLM (command),GLM (command),GLM (command)
sample models,sample models,sample models

The following examples are models that can be specified by using GLM:

regression,regression,regression
syntax,syntax,syntax

Model 1: Univariate or Multivariate Simple and Multiple Regression

GLM Y WITH X1 X2.

GLM Y1 Y2 WITH X1 X2 X3.
fixed effects,fixed effects,fixed effects
syntax,syntax,syntax

Model 2: Fixed-effects ANOVA and MANOVA

GLM Y1 Y2 BY B.
ANCOVA model,ANCOVA model,ANCOVA model
syntax,syntax,syntax

Model 3: ANCOVA and Multivariate ANCOVA (MANCOVA)

GLM Y1 Y2 BY B WITH X1 X2 X3.
random-effects model,random-effects model,random-effects model
syntax,syntax,syntax

Model 4: Random-effects ANOVA and ANCOVA

GLM Y1 BY C WITH X1 X2
 /RANDOM = C.
mixed models,mixed models,mixed models
syntax,syntax,syntax

Model 5: Mixed-model ANOVA and ANCOVA

GLM Y1 BY B, C WITH X1 X2
 /RANDOM = C.
repeated measures models,repeated measures models,repeated measures models
syntax,syntax,syntax

Model 6: Repeated Measures Analysis Using a Split-plot Design

(Univariate mixed models approach with subject as a random effect)

If drug is a between-subjects factor and time is a within-subjects factor,

GLM Y BY DRUG SUBJECT TIME
 /RANDOM = SUBJECT
 /DESIGN = DRUG SUBJECT*DRUG TIME DRUG*TIME.

Model 7: Repeated Measures Using the WSFACTOR Subcommand

Use this model only when there is no random between-subjects effect in the model. For example, if Y1, Y2, Y3, and Y4 are the dependent variables, measured at times 1 to 4,

GLM Y1 Y2 Y3 Y4 BY DRUG
 /WSFACTOR = TIME 4
 /DESIGN.
doubly multivariate repeated measures,doubly multivariate repeated measures,doubly multivariate repeated measures
syntax,syntax,syntax

Model 8: Repeated Measures Doubly Multivariate Model

Repeated measures fixed-effects MANOVA is also called a doubly multivariate model. Varying or time-dependent covariates are not available. This model can be used only when there is no random between-subjects effect in the model.

GLM X11 X12 X13 X21 X22 X23
          Y11 Y12 Y13 Y21 Y22 Y23 BY C D
/MEASURE = X Y
/WSFACTOR = A 2 B 3
/WSDESIGN = A B A*B
/DESIGN = C D.
means model,means model,means model
syntax,syntax,syntax

Model 9: Means Model for ANOVA and MANOVA

This model takes only fixed-effect factors (no random effects and covariates) and always assumes the highest order of the interactions among the factors. For example, B, D, and E are fixed factors, and Y1 and Y2 are two dependent variables. You can specify a means model by suppressing the intercept effect and specifying the highest order of interaction on the DESIGN subcommand.

GLM Y1 Y2 BY B, D, E
/INTERCEPT = EXCLUDE
/DESIGN = B*D*E.

Related Topics

GLM
Overview (GLM command)
General Linear Model (GLM) and MANOVA (GLM command)
Custom Hypothesis Specifications (GLM command)
LMATRIX, MMATRIX, and KMATRIX Subcommands (GLM command)
CONTRAST Subcommand (GLM command)


Custom Hypothesis Specifications (GLM command)

hypotheses,hypotheses,hypotheses
custom,custom,custom

GLM provides a flexible way to customize hypothesis testing based on the general linear hypothesis LBM = K, where B is the parameter vector or matrix. You can specify a customized linear hypothesis by using one or more of the subcommands LMATRIX, MMATRIX, KMATRIX, and CONTRAST.

Related Topics

GLM
Overview (GLM command)
General Linear Model (GLM) and MANOVA (GLM command)
Models (GLM command)
LMATRIX, MMATRIX, and KMATRIX Subcommands (GLM command)
CONTRAST Subcommand (GLM command)


LMATRIX, MMATRIX, and KMATRIX Subcommands (GLM command)

GLM (command),GLM (command),GLM (command)
LMATRIX subcommand,LMATRIX subcommand,LMATRIX subcommand
LMATRIX (subcommand),LMATRIX (subcommand),LMATRIX (subcommand)
GLM command,GLM command,GLM command
GLM (command),GLM (command),GLM (command)
MMATRIX subcommand,MMATRIX subcommand,MMATRIX subcommand
MMATRIX (subcommand),MMATRIX (subcommand),MMATRIX (subcommand)
GLM command,GLM command,GLM command
GLM (command),GLM (command),GLM (command)
KMATRIX subcommand,KMATRIX subcommand,KMATRIX subcommand
KMATRIX (subcommand),KMATRIX (subcommand),KMATRIX (subcommand)
GLM command,GLM command,GLM command
L matrix,L matrix,L matrix
contrast coefficients matrix,contrast coefficients matrix,contrast coefficients matrix

• The L matrix is called the contrast coefficients matrix. This matrix specifies coefficients of contrasts, which can be used for studying the between-subjects effects in the model. One way to define the L matrix is by specifying the CONTRAST subcommand, on which you select a type of contrast. Another way is to specify your own L matrix directly by using the LMATRIX subcommand. See the topic LMATRIX Subcommand (GLM: Univariate command) for more information.

M matrix,M matrix,M matrix
transformation coefficients matrix,transformation coefficients matrix,transformation coefficients matrix

• The M matrix is called the transformation coefficients matrix. This matrix provides a transformation for the dependent variables. This transformation can be used to construct contrasts among the dependent variables in the model. The M matrix can be specified on the MMATRIX subcommand. See the topic MMATRIX Subcommand (GLM: Multivariate command) for more information.

K matrix,K matrix,K matrix
contrast results matrix,contrast results matrix,contrast results matrix

• The K matrix is called the contrast results matrix. This matrix specifies the results matrix in the general linear hypothesis. To define your own K matrix, use the KMATRIX subcommand. See the topic KMATRIX Subcommand (GLM: Univariate command) for more information.

For univariate and multivariate models, you can specify one, two, or all three of the L, M, and K matrices. If only one or two types are specified, the unspecified matrices use the defaults that are shown in the following table (read across the rows).

Default matrices for univariate and multivariate models if one matrix is specified
L matrix | M matrix | K matrix
If LMATRIX is used to specify the L matrix | Default = identity matrix* | Default = zero matrix
Default = intercept matrix† | If MMATRIX is used to specify the M matrix | Default = zero matrix
Default = intercept matrix† | Default = identity matrix* | If KMATRIX is used to specify the K matrix

* The dimension of the identity matrix is the same as the number of dependent variables that are being studied.

† The intercept matrix is the matrix that corresponds to the estimable function for the intercept term in the model, provided that the intercept term is included in the model. If the intercept term is not included in the model, the L matrix is not defined, and this custom hypothesis test cannot be performed.

Example

GLM Y1 Y2 BY A B
    /LMATRIX = A 1 -1
    /DESIGN A B.

Assume that factor A has two levels.

• Because there are two dependent variables, this model is a multivariate model with two main factor effects, A and B.

• A custom hypothesis test is requested by the LMATRIX subcommand.

• Because no MMATRIX or KMATRIX is specified, the M matrix is the default two-dimensional identity matrix, and the K matrix is a zero-row vector (0, 0).

For a repeated measures model, you can specify one, two, or all three of the L, M, and K matrices. If only one or two types are specified, the unspecified matrices use the defaults that are shown in the following table (read across the rows).

Default matrices for repeated measures models if only one matrix is specified
L matrix | M matrix | K matrix
If LMATRIX is used to specify the L matrix | Default = average matrix* | Default = zero matrix
Default = intercept matrix† | If MMATRIX is used to specify the M matrix | Default = zero matrix
Default = intercept matrix† | Default = average matrix* | If KMATRIX is used to specify the K matrix

* The average matrix is the transformation matrix that corresponds to the transformation for the between-subjects test. The dimension is the number of measures.

† The intercept matrix is the matrix that corresponds to the estimable function for the intercept term in the model, provided that the intercept term is included in the model. If the intercept term is not included in the model, the L matrix is not defined, and this custom hypothesis test cannot be performed.

Example

GLM Y1 Y2 BY A B
 /WSFACTOR TIME (2)
 /MMATRIX Y1 1 Y2 1; Y1 1 Y2 -1
 /DESIGN A B.

• Because WSFACTOR is specified, this model is a repeated measures model with two between-subjects factors A and B, and a within-subjects factor, TIME.

• A custom hypothesis is requested by the MMATRIX subcommand. The M matrix is a 2×2 matrix:

1 | 1
1 | −1

• Because the L matrix and K matrix are not specified, their defaults are used. The default for the L matrix is the matrix that corresponds to the estimable function for the intercept term in the between-subjects model, and the default for the K matrix is a zero-row vector (0, 0).

Related Topics

GLM
Overview (GLM command)
General Linear Model (GLM) and MANOVA (GLM command)
Models (GLM command)
Custom Hypothesis Specifications (GLM command)
CONTRAST Subcommand (GLM command)


CONTRAST Subcommand (GLM command)

contrasts,contrasts,contrasts
custom,custom,custom
CONTRAST (subcommand),CONTRAST (subcommand),CONTRAST (subcommand)
GLM command,GLM command,GLM command
GLM (command),GLM (command),GLM (command)
CONTRAST subcommand,CONTRAST subcommand,CONTRAST subcommand

When the CONTRAST subcommand is used, an L matrix, which is used in custom hypothesis testing, is generated according to the chosen contrast. The K matrix is always taken to be the zero matrix. If the model is univariate or multivariate, the M matrix is always the identity matrix, and its dimension is equal to the number of dependent variables. For a repeated measures model, the M matrix is always the average matrix that corresponds to the average transformation for the dependent variable.

Related Topics

GLM
Overview (GLM command)
General Linear Model (GLM) and MANOVA (GLM command)
Models (GLM command)
Custom Hypothesis Specifications (GLM command)
LMATRIX, MMATRIX, and KMATRIX Subcommands (GLM command)


GLM: Univariate

GLM Univariate,GLM Univariate,GLM Univariate
command syntax,command syntax,command syntax
GLM,GLM,GLM
syntax chart,syntax chart,syntax chart
GLM (command),GLM (command),GLM (command)

GLM is available in the Advanced Statistics option.

GLM dependent var [BY factor list [WITH covariate list]]

[/RANDOM=factor factor...]

[/REGWGT=varname]

[/METHOD=SSTYPE({1  })]
                {2  }
                {3**}
                {4  }

[/INTERCEPT=[INCLUDE**] [EXCLUDE]]

[/MISSING=[INCLUDE] [EXCLUDE**]]

[/CRITERIA=[EPS({1E-8**})][ALPHA({0.05**})]
                {a     }         {a     }

[/PRINT = [DESCRIPTIVE] [HOMOGENEITY] [PARAMETER][ETASQ]
          [GEF] [LOF] [OPOWER] [TEST(LMATRIX)]]

[/PLOT=[SPREADLEVEL] [RESIDUALS]
       [PROFILE (factor factor*factor factor*factor*factor ...)
          [WITH(covariate={value} [...])]]]
                          {MEAN }

[/TEST=effect VS {linear combination [DF(df)]}]
                 {value DF (df)              }

[/LMATRIX={["label"] effect list effect list ...;...}]
          {["label"] effect list effect list ...    }
          {["label"] ALL list; ALL...               }
          {["label"] ALL list                       }

[/KMATRIX= {number    }]
           {number;...}

[/CONTRAST (factor name)={DEVIATION[(refcat)]**     }]
                         {SIMPLE [(refcat)]         }
                         {DIFFERENCE                }
                         {HELMERT                   }
                         {REPEATED                  }
                         {POLYNOMIAL  [({1,2,3...})]}
                                        {metric  }
                         {SPECIAL (matrix)          }

[/POSTHOC =effect [effect...]
          ([SNK] [TUKEY] [BTUKEY][DUNCAN]
           [SCHEFFE] [DUNNETT(refcat)] [DUNNETTL(refcat)]
           [DUNNETTR(refcat)] [BONFERRONI] [LSD] [SIDAK]
           [GT2] [GABRIEL] [FREGW] [QREGW]  [T2] [T3] [GH] [C]
           [WALLER ({100** })])]
                    {kratio}
           [VS effect]

[/EMMEANS=TABLES({OVERALL         }) [WITH(covariate={value} [...])]]
                 {factor          }                  {MEAN }
                 {factor*factor...}

          [COMPARE ADJ(LSD) (BONFERRONI) (SIDAK)]

[/SAVE=[tempvar [(name)]] [tempvar [(name)]]...]

[/OUTFILE=[{COVB('savfile'|'dataset')}]
           {CORB('savfile'|'dataset')}
          [EFFECT('savfile'|'dataset')] [DESIGN('savfile'|'dataset')]

 [/DESIGN={[INTERCEPT...]    }]
          {[effect effect...]}

** Default if the subcommand or keyword is omitted.

Temporary variables (tempvar) are:

PRED, WPRED, RESID, WRESID, DRESID, ZRESID, SRESID, SEPRED, COOK, LEVER

See GLM Algorithms for computational details for this procedure.

Example

GLM YIELD BY SEED FERT
  /DESIGN.

Related Topics

Overview (GLM: Univariate command)
Example (GLM: Univariate command)
GLM Variable List (GLM: Univariate command)
RANDOM Subcommand (GLM: Univariate command)
REGWGT Subcommand (GLM: Univariate command)
METHOD Subcommand (GLM: Univariate command)
INTERCEPT Subcommand (GLM: Univariate command)
MISSING Subcommand (GLM: Univariate command)
CRITERIA Subcommand (GLM: Univariate command)
PRINT Subcommand (GLM: Univariate command)
PLOT Subcommand (GLM: Univariate command)
TEST Subcommand (GLM: Univariate command)
LMATRIX Subcommand (GLM: Univariate command)
KMATRIX Subcommand (GLM: Univariate command)
CONTRAST Subcommand (GLM: Univariate command)
POSTHOC Subcommand (GLM: Univariate command)
EMMEANS Subcommand (GLM: Univariate command)
SAVE Subcommand (GLM: Univariate command)
OUTFILE Subcommand (GLM: Univariate command)
DESIGN Subcommand (GLM: Univariate command)


Overview (GLM: Univariate command)

This section describes the use of GLM for univariate analyses. However, most of the subcommands that are described here can be used in any type of analysis with GLM. For additional subcommands that are used in multivariate analysis, see GLM: Multivariate. For additional subcommands that are used in repeated measures analysis, see GLM: Repeated Measures. For basic specification, syntax rules, and limitations of the GLM procedures, see GLM.

Options Collapse Hide details

Options

Design Specification. You can use the DESIGN subcommand to specify which terms to include in the design. This allows you to estimate a model other than the default full factorial model, incorporate factor-by-covariate interactions or covariate-by-covariate interactions, and indicate nesting of effects.

Contrast Types. You can specify contrasts other than the default deviation contrasts on the CONTRAST subcommand.

Optional Output. You can choose from a variety of optional output on the PRINT subcommand. Output that is appropriate to univariate designs includes descriptive statistics for each cell, parameter estimates, Levene’s test for equality of variance across cells, partial eta-squared for each effect and each parameter estimate, the general estimable function matrix, and a contrast coefficients table (L' matrix). The OUTFILE subcommand allows you to write out the covariance or correlation matrix, the design matrix, or the statistics from the between-subjects ANOVA table into a separate data file.

Using the EMMEANS subcommand, you can request tables of estimated marginal means of the dependent variable and their standard deviations. The SAVE subcommand allows you to save predicted values and residuals in weighted or unweighted and standardized or unstandardized forms. You can use the POSTHOC subcommand to specify different means comparison tests for comparing all possible pairs of cell means. In addition, you can specify your own hypothesis tests by specifying an L matrix and a K matrix to test the univariate hypothesis LB = K.

Basic Specification Collapse Hide details

Basic Specification

• The basic specification is a variable list identifying the dependent variable, the factors (if any), and the covariates (if any).

• By default, GLM uses a model that includes the intercept term, the covariate (if any), and the full factorial model, which includes all main effects and all possible interactions among factors. The intercept term is excluded if it is excluded in the model by specifying the keyword EXCLUDE on the INTERCEPT subcommand. Sums of squares are calculated and hypothesis tests are performed by using type-specific estimable functions. Parameters are estimated by using the normal equation and a generalized inverse of the SSCP matrix.

Subcommand Order Collapse Hide details

Subcommand Order

• The variable list must be specified first.

• Subcommands can be used in any order.

Syntax Rules Collapse Hide details

Syntax Rules

• For many analyses, the GLM variable list and the DESIGN subcommand are the only specifications that are needed.

• If you do not enter a DESIGN subcommand, GLM uses a full factorial model, with main effects of covariates, if any.

• At least one dependent variable must be specified, and at least one of the following specifications must occur: INTERCEPT, a between-subjects factor, or a covariate. The design contains the intercept by default.

• If more than one DESIGN subcommand is specified, only the last subcommand is in effect.

• Dependent variables and covariates must be numeric, but factors can be numeric or string variables.

• If a string variable is specified as a factor, only the first eight bytes of each value are used in distinguishing among values.

• If more than one MISSING subcommand is specified, only the last subcommand is in effect.

• The following words are reserved as keywords or internal commands in the GLM procedure:

INTERCEPT, BY, WITH, ALL, OVERALL, WITHIN

Variable names that duplicate these words should be changed before you run GLM.

Limitations Collapse Hide details

Limitations

• Any number of factors can be specified, but if the number of between-subjects factors plus the number of split variables exceeds 18, the Descriptive Statistics table is not printed even when you request it.

• Memory requirements depend primarily on the number of cells in the design. For the default full factorial model, this equals the product of the number of levels or categories in each factor.

Related Topics

GLM: Univariate
Example (GLM: Univariate command)
GLM Variable List (GLM: Univariate command)
RANDOM Subcommand (GLM: Univariate command)
REGWGT Subcommand (GLM: Univariate command)
METHOD Subcommand (GLM: Univariate command)
INTERCEPT Subcommand (GLM: Univariate command)
MISSING Subcommand (GLM: Univariate command)
CRITERIA Subcommand (GLM: Univariate command)
PRINT Subcommand (GLM: Univariate command)
PLOT Subcommand (GLM: Univariate command)
TEST Subcommand (GLM: Univariate command)
LMATRIX Subcommand (GLM: Univariate command)
KMATRIX Subcommand (GLM: Univariate command)
CONTRAST Subcommand (GLM: Univariate command)
POSTHOC Subcommand (GLM: Univariate command)
EMMEANS Subcommand (GLM: Univariate command)
SAVE Subcommand (GLM: Univariate command)
OUTFILE Subcommand (GLM: Univariate command)
DESIGN Subcommand (GLM: Univariate command)


Example (GLM: Univariate command)

GLM YIELD BY SEED FERT WITH RAINFALL
  /PRINT=DESCRIPTIVE PARAMETER
  /DESIGN.

• YIELD is the dependent variable; SEED and FERT are factors; RAINFALL is a covariate.

• The PRINT subcommand requests the descriptive statistics for the dependent variable for each cell and the parameter estimates, in addition to the default tables Between-Subjects Factors and Univariate Tests.

• The DESIGN subcommand requests the default design (a full factorial model with a covariate). This subcommand could have been omitted or could have been specified in full as

/DESIGN = INTERCEPT RAINFALL, SEED, FERT, SEED BY FERT.

Related Topics

GLM: Univariate
Overview (GLM: Univariate command)
GLM Variable List (GLM: Univariate command)
RANDOM Subcommand (GLM: Univariate command)
REGWGT Subcommand (GLM: Univariate command)
METHOD Subcommand (GLM: Univariate command)
INTERCEPT Subcommand (GLM: Univariate command)
MISSING Subcommand (GLM: Univariate command)
CRITERIA Subcommand (GLM: Univariate command)
PRINT Subcommand (GLM: Univariate command)
PLOT Subcommand (GLM: Univariate command)
TEST Subcommand (GLM: Univariate command)
LMATRIX Subcommand (GLM: Univariate command)
KMATRIX Subcommand (GLM: Univariate command)
CONTRAST Subcommand (GLM: Univariate command)
POSTHOC Subcommand (GLM: Univariate command)
EMMEANS Subcommand (GLM: Univariate command)
SAVE Subcommand (GLM: Univariate command)
OUTFILE Subcommand (GLM: Univariate command)
DESIGN Subcommand (GLM: Univariate command)


GLM Variable List (GLM: Univariate command)

The variable list specifies the dependent variable, the factors, and the covariates in the model.

• The dependent variable must be the first specification on GLM.

• The names of the factors follow the dependent variable. Use the keyword BY to separate the factors from the dependent variable.

• Enter the covariates, if any, following the factors. Use the keyword WITH to separate covariates from factors (if any) and the dependent variable.

Example

GLM DEPENDNT BY FACTOR1 FACTOR2, FACTOR3.

• In this example, three factors are specified.

• A default full factorial model is used for the analysis.

Example

GLM Y BY A WITH X
  /DESIGN.

• In this example, the DESIGN subcommand requests the default design, which includes the intercept term, the covariate X, and the factor A.

Related Topics

GLM: Univariate
Overview (GLM: Univariate command)
Example (GLM: Univariate command)
RANDOM Subcommand (GLM: Univariate command)
REGWGT Subcommand (GLM: Univariate command)
METHOD Subcommand (GLM: Univariate command)
INTERCEPT Subcommand (GLM: Univariate command)
MISSING Subcommand (GLM: Univariate command)
CRITERIA Subcommand (GLM: Univariate command)
PRINT Subcommand (GLM: Univariate command)
PLOT Subcommand (GLM: Univariate command)
TEST Subcommand (GLM: Univariate command)
LMATRIX Subcommand (GLM: Univariate command)
KMATRIX Subcommand (GLM: Univariate command)
CONTRAST Subcommand (GLM: Univariate command)
POSTHOC Subcommand (GLM: Univariate command)
EMMEANS Subcommand (GLM: Univariate command)
SAVE Subcommand (GLM: Univariate command)
OUTFILE Subcommand (GLM: Univariate command)
DESIGN Subcommand (GLM: Univariate command)


RANDOM Subcommand (GLM: Univariate command)

RANDOM (subcommand),RANDOM (subcommand),RANDOM (subcommand)
GLM command,GLM command,GLM command
GLM (command),GLM (command),GLM (command)
RANDOM subcommand,RANDOM subcommand,RANDOM subcommand
random effects,random effects,random effects
effects,effects,effects
random,random,random

RANDOM allows you to specify which effects in your design are random. When the RANDOM subcommand is used, a table of expected mean squares for all effects in the design is displayed, and an appropriate error term for testing each effect is calculated and used automatically.

• Random always implies a univariate mixed-model analysis.

• If you specify an effect on RANDOM, higher-order effects containing the specified effect (excluding any effects containing covariates) are automatically treated as random effects.

• The keyword INTERCEPT and effects containing covariates are not allowed on this subcommand.

• The RANDOM subcommand cannot be used if there is any within-subjects factor in the model (that is, RANDOM cannot be specified if WSFACTOR is specified).

• When the RANDOM subcommand is used, the appropriate error terms for the hypothesis testing of all effects in the model are automatically computed and used.

• More than one RANDOM subcommand is allowed. The specifications are accumulated.

Example

GLM DEP BY A B
  /RANDOM = B
  /DESIGN = A,B, A*B.

• In the example, effects B and A*B are considered as random effects. If only effect B is specified in the RANDOM subcommand, A*B is automatically considered as a random effect.

• The hypothesis testing for each effect in the design (A, B, and A*B) will be carried out by using the appropriate error term, which is calculated automatically.

Related Topics

GLM: Univariate
Overview (GLM: Univariate command)
Example (GLM: Univariate command)
GLM Variable List (GLM: Univariate command)
REGWGT Subcommand (GLM: Univariate command)
METHOD Subcommand (GLM: Univariate command)
INTERCEPT Subcommand (GLM: Univariate command)
MISSING Subcommand (GLM: Univariate command)
CRITERIA Subcommand (GLM: Univariate command)
PRINT Subcommand (GLM: Univariate command)
PLOT Subcommand (GLM: Univariate command)
TEST Subcommand (GLM: Univariate command)
LMATRIX Subcommand (GLM: Univariate command)
KMATRIX Subcommand (GLM: Univariate command)
CONTRAST Subcommand (GLM: Univariate command)
POSTHOC Subcommand (GLM: Univariate command)
EMMEANS Subcommand (GLM: Univariate command)
SAVE Subcommand (GLM: Univariate command)
OUTFILE Subcommand (GLM: Univariate command)
DESIGN Subcommand (GLM: Univariate command)


REGWGT Subcommand (GLM: Univariate command)

REGWGT (subcommand),REGWGT (subcommand),REGWGT (subcommand)
GLM command,GLM command,GLM command
GLM (command),GLM (command),GLM (command)
REGWGT subcommand,REGWGT subcommand,REGWGT subcommand

The only specification on REGWGT is the name of the variable containing the weights to be used in estimating a weighted least-squares model.

• Specify a numeric weight variable name following the REGWGT subcommand. Only observations with positive values in the weight variable will be used in the analysis.

• If more than one REGWGT subcommand is specified, only the last subcommand is in effect.

Example

GLM OUTCOME BY TREATMNT
  /REGWGT WT.

• The procedure performs a weighted least-squares analysis. The variable WT is used as the weight variable.

Related Topics

GLM: Univariate
Overview (GLM: Univariate command)
Example (GLM: Univariate command)
GLM Variable List (GLM: Univariate command)
RANDOM Subcommand (GLM: Univariate command)
METHOD Subcommand (GLM: Univariate command)
INTERCEPT Subcommand (GLM: Univariate command)
MISSING Subcommand (GLM: Univariate command)
CRITERIA Subcommand (GLM: Univariate command)
PRINT Subcommand (GLM: Univariate command)
PLOT Subcommand (GLM: Univariate command)
TEST Subcommand (GLM: Univariate command)
LMATRIX Subcommand (GLM: Univariate command)
KMATRIX Subcommand (GLM: Univariate command)
CONTRAST Subcommand (GLM: Univariate command)
POSTHOC Subcommand (GLM: Univariate command)
EMMEANS Subcommand (GLM: Univariate command)
SAVE Subcommand (GLM: Univariate command)
OUTFILE Subcommand (GLM: Univariate command)
DESIGN Subcommand (GLM: Univariate command)


METHOD Subcommand (GLM: Univariate command)

METHOD (subcommand),METHOD (subcommand),METHOD (subcommand)
GLM command,GLM command,GLM command
GLM (command),GLM (command),GLM (command)
METHOD subcommand,METHOD subcommand,METHOD subcommand

METHOD controls the computational aspects of the GLM analysis. You can specify one of four different methods for partitioning the sums of squares. If more than one METHOD subcommand is specified, only the last subcommand is in effect.

SSTYPE (keyword),SSTYPE (keyword),SSTYPE (keyword)
GLM command,GLM command,GLM command
sum of squares,sum of squares,sum of squares
Type I,Type I,Type I
GLM,GLM,GLM
Type I sum-of-squares method,Type I sum-of-squares method,Type I sum-of-squares method
sum of squares,sum of squares,sum of squares
Type II,Type II,Type II
GLM,GLM,GLM
Type II sum-of-squares method,Type II sum-of-squares method,Type II sum-of-squares method
contained effects,contained effects,contained effects
in GLM,in GLM,in GLM
GLM,GLM,GLM
contained effects,contained effects,contained effects
sum of squares,sum of squares,sum of squares
Type III,Type III,Type III
GLM,GLM,GLM
Type III sum-of-squares method,Type III sum-of-squares method,Type III sum-of-squares method
sum of squares,sum of squares,sum of squares
Type IV,Type IV,Type IV
GLM,GLM,GLM
Type IV sum-of-squares method,Type IV sum-of-squares method,Type IV sum-of-squares method
SSTYPE(1) | Type I sum-of-squares method. The Type I sum-of-squares method is also known as the hierarchical decomposition of the sum-of-squares method. Each term is adjusted only for the terms that precede it on the DESIGN subcommand. Under a balanced design, it is an orthogonal decomposition, and the sums of squares in the model add up to the total sum of squares.
SSTYPE(2) | Type II sum-of-squares method. This method calculates the sum of squares of an effect in the model, adjusted for all other “appropriate” effects. An appropriate effect is an effect that corresponds to all effects that do not contain the effect that is being examined.
 | For any two effects F1 and F2 in the model, F1 is contained in F2 under the following three conditions: Both effects F1 and F2 have the same covariate (if any), F2 consists of more factors than F1, or all factors in F1 also appear in F2. The intercept effect is treated as contained in all the pure factor effects. However, the intercept effect is not contained in any effect involving a covariate. No effect is contained in the intercept effect. Thus, for any one effect F of interest, all other effects in the model can be classified as being in one of the following two groups: the effects that do not contain F or the effects that contain F.
 | If the model is a main-effects design (that is, only main effects are in the model), the Type II sum-of-squares method is equivalent to the regression approach sums of squares, meaning that each main effect is adjusted for every other term in the model.
SSTYPE(3) | Type III sum-of-squares method. This setting is the default. This method calculates the sum of squares of an effect F in the design as the sum of squares adjusted for any other effects that do not contain it, and orthogonal to any effects (if any) that contain it. The Type III sums of squares have one major advantage—they are invariant with respect to the cell frequencies as long as the general form of estimability remains constant. Hence, this type of sums of squares is often used for an unbalanced model with no missing cells. In a factorial design with no missing cells, this method is equivalent to the Yates’ weighted squares of means technique, and it also coincides with the overparameterized ∑-restricted model.
SSTYPE(4) | Type IV sum-of-squares method. This method is designed for a situation in which there are missing cells. For any effect F in the design, if F is not contained in any other effect, then Type IV = Type III = Type II. When F is contained in other effects, Type IV equitably distributes the contrasts being made among the parameters in F to all higher-level effects.

Example

GLM DEP BY A B C
  /METHOD=SSTYPE(3)
  /DESIGN=A, B, C.

• The design is a main-effects model.

• The METHOD subcommand requests that the model be fitted with Type III sums of squares.

Related Topics

GLM: Univariate
Overview (GLM: Univariate command)
Example (GLM: Univariate command)
GLM Variable List (GLM: Univariate command)
RANDOM Subcommand (GLM: Univariate command)
REGWGT Subcommand (GLM: Univariate command)
INTERCEPT Subcommand (GLM: Univariate command)
MISSING Subcommand (GLM: Univariate command)
CRITERIA Subcommand (GLM: Univariate command)
PRINT Subcommand (GLM: Univariate command)
PLOT Subcommand (GLM: Univariate command)
TEST Subcommand (GLM: Univariate command)
LMATRIX Subcommand (GLM: Univariate command)
KMATRIX Subcommand (GLM: Univariate command)
CONTRAST Subcommand (GLM: Univariate command)
POSTHOC Subcommand (GLM: Univariate command)
EMMEANS Subcommand (GLM: Univariate command)
SAVE Subcommand (GLM: Univariate command)
OUTFILE Subcommand (GLM: Univariate command)
DESIGN Subcommand (GLM: Univariate command)


INTERCEPT Subcommand (GLM: Univariate command)

INTERCEPT (subcommand),INTERCEPT (subcommand),INTERCEPT (subcommand)
GLM command,GLM command,GLM command
GLM (command),GLM (command),GLM (command)
INTERCEPT subcommand,INTERCEPT subcommand,INTERCEPT subcommand
intercept,intercept,intercept
include or exclude,include or exclude,include or exclude

INTERCEPT controls whether an intercept term is included in the model. If more than one INTERCEPT subcommand is specified, only the last subcommand is in effect.

INCLUDE (keyword),INCLUDE (keyword),INCLUDE (keyword)
GLM command,GLM command,GLM command
EXCLUDE (keyword),EXCLUDE (keyword),EXCLUDE (keyword)
GLM command,GLM command,GLM command
INCLUDE | Include the intercept term. The intercept (constant) term is included in the model. This setting is the default.
EXCLUDE | Exclude the intercept term. The intercept term is excluded from the model. Specification of the keyword INTERCEPT on the DESIGN subcommand overrides INTERCEPT = EXCLUDE.

Related Topics

GLM: Univariate
Overview (GLM: Univariate command)
Example (GLM: Univariate command)
GLM Variable List (GLM: Univariate command)
RANDOM Subcommand (GLM: Univariate command)
REGWGT Subcommand (GLM: Univariate command)
METHOD Subcommand (GLM: Univariate command)
MISSING Subcommand (GLM: Univariate command)
CRITERIA Subcommand (GLM: Univariate command)
PRINT Subcommand (GLM: Univariate command)
PLOT Subcommand (GLM: Univariate command)
TEST Subcommand (GLM: Univariate command)
LMATRIX Subcommand (GLM: Univariate command)
KMATRIX Subcommand (GLM: Univariate command)
CONTRAST Subcommand (GLM: Univariate command)
POSTHOC Subcommand (GLM: Univariate command)
EMMEANS Subcommand (GLM: Univariate command)
SAVE Subcommand (GLM: Univariate command)
OUTFILE Subcommand (GLM: Univariate command)
DESIGN Subcommand (GLM: Univariate command)


MISSING Subcommand (GLM: Univariate command)

MISSING (subcommand),MISSING (subcommand),MISSING (subcommand)
GLM command,GLM command,GLM command
GLM (command),GLM (command),GLM (command)
MISSING subcommand,MISSING subcommand,MISSING subcommand

By default, cases with missing values for any of the variables on the GLM variable list are excluded from the analysis. The MISSING subcommand allows you to include cases with user-missing values.

• If MISSING is not specified, the default is EXCLUDE.

• Pairwise deletion of missing data is not available in GLM.

• Keywords INCLUDE and EXCLUDE are mutually exclusive.

• If more than one MISSING subcommand is specified, only the last subcommand is in effect.

EXCLUDE (keyword),EXCLUDE (keyword),EXCLUDE (keyword)
GLM command,GLM command,GLM command
INCLUDE (keyword),INCLUDE (keyword),INCLUDE (keyword)
GLM command,GLM command,GLM command
EXCLUDE | Exclude both user-missing and system-missing values. This setting is the default when MISSING is not specified.
INCLUDE | Treat user-missing values as valid. System-missing values cannot be included in the analysis.

Related Topics

GLM: Univariate
Overview (GLM: Univariate command)
Example (GLM: Univariate command)
GLM Variable List (GLM: Univariate command)
RANDOM Subcommand (GLM: Univariate command)
REGWGT Subcommand (GLM: Univariate command)
METHOD Subcommand (GLM: Univariate command)
INTERCEPT Subcommand (GLM: Univariate command)
CRITERIA Subcommand (GLM: Univariate command)
PRINT Subcommand (GLM: Univariate command)
PLOT Subcommand (GLM: Univariate command)
TEST Subcommand (GLM: Univariate command)
LMATRIX Subcommand (GLM: Univariate command)
KMATRIX Subcommand (GLM: Univariate command)
CONTRAST Subcommand (GLM: Univariate command)
POSTHOC Subcommand (GLM: Univariate command)
EMMEANS Subcommand (GLM: Univariate command)
SAVE Subcommand (GLM: Univariate command)
OUTFILE Subcommand (GLM: Univariate command)
DESIGN Subcommand (GLM: Univariate command)


CRITERIA Subcommand (GLM: Univariate command)

CRITERIA (subcommand),CRITERIA (subcommand),CRITERIA (subcommand)
GLM command,GLM command,GLM command
GLM (command),GLM (command),GLM (command)
CRITERIA subcommand,CRITERIA subcommand,CRITERIA subcommand

CRITERIA controls the statistical criteria used to build the models.

• More than one CRITERIA subcommand is allowed. The specifications are accumulated. Conflicts across CRITERIA subcommands are resolved by using the conflicting specification that was given on the last CRITERIA subcommand.

• The keyword must be followed by a positive number in parentheses.

EPS (keyword),EPS (keyword),EPS (keyword)
GLM command,GLM command,GLM command
tolerance level,tolerance level,tolerance level
ALPHA (keyword),ALPHA (keyword),ALPHA (keyword)
GLM command,GLM command,GLM command
alpha level,alpha level,alpha level
GLM,GLM,GLM
alpha level,alpha level,alpha level
power,power,power
GLM,GLM,GLM
power,power,power
alternative hypothesis,alternative hypothesis,alternative hypothesis
GLM,GLM,GLM
alternative hypothesis,alternative hypothesis,alternative hypothesis
observed power,observed power,observed power
power,power,power
observed,observed,observed
confidence intervals,confidence intervals,confidence intervals
GLM,GLM,GLM
confidence interval,confidence interval,confidence interval
EPS(n) | The tolerance level in redundancy detection. This value is used for redundancy checking in the design matrix. The default value is 1E-8.
ALPHA(n) | The alpha level. This keyword has two functions. First, the keyword gives the alpha level at which the power is calculated for the F test. After the noncentrality parameter for the alternative hypothesis is estimated from the data, the power is the probability that the test statistic is greater than the critical value under the alternative hypothesis. (The observed power is displayed by default for GLM.) The second function of alpha is to specify the level of the confidence interval. If the specified alpha level is n, the value (1−n)×100 indicates the level of confidence for all individual and simultaneous confidence intervals that are generated for the specified model. The value of n must be between 0 and 1, exclusive. The default value of alpha is 0.05, which means that the default power calculation is at the 0.05 level, and the default level of the confidence intervals is 95%, because (1−0.05)×100=95.

Related Topics

GLM: Univariate
Overview (GLM: Univariate command)
Example (GLM: Univariate command)
GLM Variable List (GLM: Univariate command)
RANDOM Subcommand (GLM: Univariate command)
REGWGT Subcommand (GLM: Univariate command)
METHOD Subcommand (GLM: Univariate command)
INTERCEPT Subcommand (GLM: Univariate command)
MISSING Subcommand (GLM: Univariate command)
PRINT Subcommand (GLM: Univariate command)
PLOT Subcommand (GLM: Univariate command)
TEST Subcommand (GLM: Univariate command)
LMATRIX Subcommand (GLM: Univariate command)
KMATRIX Subcommand (GLM: Univariate command)
CONTRAST Subcommand (GLM: Univariate command)
POSTHOC Subcommand (GLM: Univariate command)
EMMEANS Subcommand (GLM: Univariate command)
SAVE Subcommand (GLM: Univariate command)
OUTFILE Subcommand (GLM: Univariate command)
DESIGN Subcommand (GLM: Univariate command)


PRINT Subcommand (GLM: Univariate command)

PRINT (subcommand),PRINT (subcommand),PRINT (subcommand)
GLM command,GLM command,GLM command
GLM (command),GLM (command),GLM (command)
PRINT subcommand,PRINT subcommand,PRINT subcommand

PRINT controls the display of optional output.

• Some PRINT output applies to the entire GLM procedure and is displayed only once.

• Additional output can be obtained on the EMMEANS, PLOT, and SAVE subcommands.

• Some optional output may greatly increase the processing time. Request only the output that you want to see.

• If no PRINT command is specified, default output for a univariate analysis includes a factor information table and a Univariate Tests table (ANOVA) for all effects in the model.

• If more than one PRINT subcommand is specified, only the last subcommand is in effect.

The following keywords are available for GLM univariate analyses. For information about PRINT specifications that are appropriate for other GLM models, see GLM: Multivariate and GLM: Repeated Measures.

DESCRIPTIVES (keyword),DESCRIPTIVES (keyword),DESCRIPTIVES (keyword)
GLM command,GLM command,GLM command
HOMOGENEITY (keyword),HOMOGENEITY (keyword),HOMOGENEITY (keyword)
GLM command,GLM command,GLM command
GLM,GLM,GLM
Levene's test,Levene's test,Levene's test
GLM,GLM,GLM
homogeneity of variance,homogeneity of variance,homogeneity of variance
homogeneity of variance,homogeneity of variance,homogeneity of variance
in GLM,in GLM,in GLM
Levene test,Levene test,Levene test
in GLM,in GLM,in GLM
PARAMETER (keyword),PARAMETER (keyword),PARAMETER (keyword)
GLM command,GLM command,GLM command
parameter estimates,parameter estimates,parameter estimates
in GLM,in GLM,in GLM
GLM,GLM,GLM
parameter estimates,parameter estimates,parameter estimates
ETASQ (keyword),ETASQ (keyword),ETASQ (keyword)
GLM command,GLM command,GLM command
partial eta-squared,partial eta-squared,partial eta-squared
eta-squared,eta-squared,eta-squared
partial,partial,partial
EFSIZE (keyword),EFSIZE (keyword),EFSIZE (keyword)
GLM command,GLM command,GLM command
GEF (keyword),GEF (keyword),GEF (keyword)
GLM command,GLM command,GLM command
general estimable function,general estimable function,general estimable function
estimable functions,estimable functions,estimable functions
in GLM,in GLM,in GLM
GLM,GLM,GLM
estimable functions,estimable functions,estimable functions
LOF (keyword),LOF (keyword),LOF (keyword)
GLM command,GLM command,GLM command
OPOWER (keyword),OPOWER (keyword),OPOWER (keyword)
GLM command,GLM command,GLM command
TEST(LMATRIX) (keyword),TEST(LMATRIX) (keyword),TEST(LMATRIX) (keyword)
GLM command,GLM command,GLM command
matrices,matrices,matrices
L,L,L
contrast coefficients,contrast coefficients,contrast coefficients
in GLM,in GLM,in GLM
GLM,GLM,GLM
contrast coefficients,contrast coefficients,contrast coefficients
L matrix,L matrix,L matrix
in GLM,in GLM,in GLM
GLM,GLM,GLM
L matrix,L matrix,L matrix
TEST(ESTIMABLE) (keyword),TEST(ESTIMABLE) (keyword),TEST(ESTIMABLE) (keyword)
GLM command,GLM command,GLM command
DESCRIPTIVES | Basic information about each cell in the design. This process determines observed means, standard deviations, and counts for the dependent variable in all cells. The cells are constructed from the highest-order crossing of the between-subjects factors. For a multivariate model, statistics are given for each dependent variable. If the number of between-subjects factors plus the number of split variables exceeds 18, the Descriptive Statistics table is not printed.
HOMOGENEITY | Tests of homogeneity of variance. Levene’s test for equality of variances for the dependent variable across all level combinations of the between-subjects factors. If there are no between-subjects factors, this keyword is not valid. For a multivariate model, tests are displayed for each dependent variable.
PARAMETER | Parameter estimates. Parameter estimates, standard errors, t tests, and confidence intervals.
ETASQ | Partial eta-squared (η2). This value is an overestimate of the actual effect size in an F test. It is defined as η2=dfh×Fdfh×F+dfe where F is the test statistic and dfh and dfe are its degrees of freedom and degrees of freedom for error. The keyword EFSIZE can be used in place of ETASQ.
GEF | General estimable function table. This table shows the general form of the estimable functions.
LOF | Instruction to perform a lack-of-fit test (which requires at least one cell to have multiple observations). If the test is rejected, it implies that the current model cannot adequately account for the relationship between the response variable and the predictors. Either a variable is omitted or extra terms are needed in the model.
OPOWER | Observed power for each test. The observed power gives the probability that the F test would detect a population difference between groups that is equal to the difference that is implied by the sample difference.
TEST(LMATRIX) | Set of contrast coefficients (L) matrices. The transpose of the L matrix (L') is displayed. This set always includes one matrix displaying the estimable function for each between-subjects effect that appears or is implied in the DESIGN subcommand. Also, any L matrices generated by the LMATRIX or CONTRAST subcommands are displayed. TEST(ESTIMABLE) can be used in place of TEST(LMATRIX).

Example

GLM DEP BY A B WITH COV
  /PRINT=DESCRIPTIVE, TEST(LMATRIX), PARAMETER
  /DESIGN.

• Because the design in the DESIGN subcommand is not specified, the default design is used. In this case, the design includes the intercept term, the covariate COV, and the full factorial terms of A and B, which are A, B, and A*B.

• For each combination of levels of A and B, the descriptive statistics of DEP are displayed.

• The set of L matrices that generates the sums of squares for testing each effect in the design is displayed.

• The parameter estimates, their standard errors, t tests, confidence intervals, and the observed power for each test are displayed.

Related Topics

GLM: Univariate
Overview (GLM: Univariate command)
Example (GLM: Univariate command)
GLM Variable List (GLM: Univariate command)
RANDOM Subcommand (GLM: Univariate command)
REGWGT Subcommand (GLM: Univariate command)
METHOD Subcommand (GLM: Univariate command)
INTERCEPT Subcommand (GLM: Univariate command)
MISSING Subcommand (GLM: Univariate command)
CRITERIA Subcommand (GLM: Univariate command)
PLOT Subcommand (GLM: Univariate command)
TEST Subcommand (GLM: Univariate command)
LMATRIX Subcommand (GLM: Univariate command)
KMATRIX Subcommand (GLM: Univariate command)
CONTRAST Subcommand (GLM: Univariate command)
POSTHOC Subcommand (GLM: Univariate command)
EMMEANS Subcommand (GLM: Univariate command)
SAVE Subcommand (GLM: Univariate command)
OUTFILE Subcommand (GLM: Univariate command)
DESIGN Subcommand (GLM: Univariate command)


PLOT Subcommand (GLM: Univariate command)

PLOT (subcommand),PLOT (subcommand),PLOT (subcommand)
GLM command,GLM command,GLM command
GLM (command),GLM (command),GLM (command)
PLOT subcommand,PLOT subcommand,PLOT subcommand

PLOT provides a variety of plots that are useful in checking the assumptions that are needed in the analysis. The PLOT subcommand can be specified more than once. All of the plots that are requested on each PLOT subcommand are produced.

Use the following keywords on the PLOT subcommand to request plots:

SPREADLEVEL (keyword),SPREADLEVEL (keyword),SPREADLEVEL (keyword)
GLM command,GLM command,GLM command
spread-versus-level plots,spread-versus-level plots,spread-versus-level plots
in GLM,in GLM,in GLM
GLM,GLM,GLM
spread-versus-level plots,spread-versus-level plots,spread-versus-level plots
RESIDUALS (keyword),RESIDUALS (keyword),RESIDUALS (keyword)
GLM command,GLM command,GLM command
residual plots,residual plots,residual plots
in GLM,in GLM,in GLM
GLM,GLM,GLM
residual plots,residual plots,residual plots
PROFILE (keyword),PROFILE (keyword),PROFILE (keyword)
GLM command,GLM command,GLM command
profile plots,profile plots,profile plots
GLM,GLM,GLM
profile plots,profile plots,profile plots
estimated means plots,estimated means plots,estimated means plots
GLM,GLM,GLM
estimated means plots,estimated means plots,estimated means plots
SPREADLEVEL | Spread-versus-level plots. Plots are produced that are plots of observed cell means versus standard deviations and versus variances.
RESIDUALS | Observed by predicted by standardized residuals plot. A plot is produced for each dependent variable. In a univariate analysis, a plot is produced for the single dependent variable.
PROFILE | Line plots of dependent variable means for one-way, two-way, or three-way crossed factors. The PROFILE keyword must be followed by parentheses containing a list of one or more factor combinations. All specified factors (either individual or crossed) must be composed of only valid factors on the factor list. Factor combinations on the PROFILE keyword may use an asterisk (*) or the keyword BY to specify crossed factors. A factor cannot occur in a single factor combination more than once.
 | The order of factors in a factor combination is important, and there is no restriction on the order of factors. If a single factor is specified after the PROFILE keyword, a line plot of estimated means at each level of the factor is produced. If a two-way crossed factor combination is specified, the output includes a multiple-line plot of estimated means at each level of the first specified factor, with a separate line drawn for each level of the second specified factor. If a three-way crossed factor combination is specified, the output includes multiple-line plots of estimated means at each level of the first specified factor, with separate lines for each level of the second factor and separate plots for each level of the third factor.
 | The PROFILE keyword may be followed by the WITH keyword and a parenthesized list of covariates and values. Plots are produced with the values of the covariates fixed at the specified values. The keyword MEAN causes the covariate to be fixed at its observed mean value.

Example

GLM DEP BY A B
  /PLOT = SPREADLEVEL PROFILE(A A*B A*B*C) WITH(X=1.0)
  /DESIGN.

Assume that each of the factors A, B, and C has three levels.

• Spread-versus-level plots are produced, showing observed cell means versus standard deviations and observed cell means versus variances.

• Five profile plots are produced. For factor A, a line plot of estimated means at each level of A is produced (one plot). For the two-way crossed factor combination A*B, a multiple-line plot of estimated means at each level of Ais produced (one plot), with a separate line for each level of B. For the three-way crossed factor combination A*B*C, a multiple-line plot of estimated means at each level of A is produced for each of the three levels of C (three plots), with a separate line for each level of B. Plots are produced with the value of the covariate X fixed at 1.0.

Related Topics

GLM: Univariate
Overview (GLM: Univariate command)
Example (GLM: Univariate command)
GLM Variable List (GLM: Univariate command)
RANDOM Subcommand (GLM: Univariate command)
REGWGT Subcommand (GLM: Univariate command)
METHOD Subcommand (GLM: Univariate command)
INTERCEPT Subcommand (GLM: Univariate command)
MISSING Subcommand (GLM: Univariate command)
CRITERIA Subcommand (GLM: Univariate command)
PRINT Subcommand (GLM: Univariate command)
TEST Subcommand (GLM: Univariate command)
LMATRIX Subcommand (GLM: Univariate command)
KMATRIX Subcommand (GLM: Univariate command)
CONTRAST Subcommand (GLM: Univariate command)
POSTHOC Subcommand (GLM: Univariate command)
EMMEANS Subcommand (GLM: Univariate command)
SAVE Subcommand (GLM: Univariate command)
OUTFILE Subcommand (GLM: Univariate command)
DESIGN Subcommand (GLM: Univariate command)


TEST Subcommand (GLM: Univariate command)

The TEST subcommand allows you to test a hypothesis term against a specified error term.

• TEST is valid only for univariate analyses. Multiple TEST subcommands are allowed, with each subcommand being executed independently.

• You must specify both the hypothesis term and the error term. There is no default.

• The hypothesis term is specified before the keyword VS and must be a valid effect that is specified or implied on the DESIGN subcommand.

• The error term is specified after the keyword VS. You can specify either a linear combination or a value. The linear combination of effects takes the general form: coefficient*effect +/– coefficient*effect ...

• All effects in the linear combination must be specified or implied on the DESIGN subcommand. Effects that are specified or implied on DESIGN but not listed after VS are assumed to have a coefficient of 0.

• Duplicate effects are allowed. GLM adds coefficients associated with the same effect before performing the test. For example, the linear combination 5*A–0.9*B–A is combined to 4*A–0.9B.

• A coefficient can be specified as a fraction with a positive denominator (for example, 1/3 or –1/3 are valid, but 1/–3 is invalid).

• If you specify a value for the error term, you must specify the degrees of freedom after the keyword DF. The degrees of freedom must be a positive real number. DF and the degrees of freedom are optional for a linear combination.

Example

GLM DEP BY A B
  /TEST = A VS B + A*B
  /DESIGN = A, B, A*B.

• A is tested against the pooled effect of B + A*B.

Related Topics

GLM: Univariate
Overview (GLM: Univariate command)
Example (GLM: Univariate command)
GLM Variable List (GLM: Univariate command)
RANDOM Subcommand (GLM: Univariate command)
REGWGT Subcommand (GLM: Univariate command)
METHOD Subcommand (GLM: Univariate command)
INTERCEPT Subcommand (GLM: Univariate command)
MISSING Subcommand (GLM: Univariate command)
CRITERIA Subcommand (GLM: Univariate command)
PRINT Subcommand (GLM: Univariate command)
PLOT Subcommand (GLM: Univariate command)
LMATRIX Subcommand (GLM: Univariate command)
KMATRIX Subcommand (GLM: Univariate command)
CONTRAST Subcommand (GLM: Univariate command)
POSTHOC Subcommand (GLM: Univariate command)
EMMEANS Subcommand (GLM: Univariate command)
SAVE Subcommand (GLM: Univariate command)
OUTFILE Subcommand (GLM: Univariate command)
DESIGN Subcommand (GLM: Univariate command)


LMATRIX Subcommand (GLM: Univariate command)

LMATRIX (subcommand),LMATRIX (subcommand),LMATRIX (subcommand)
GLM command,GLM command,GLM command
GLM (command),GLM (command),GLM (command)
LMATRIX subcommand,LMATRIX subcommand,LMATRIX subcommand
matrices,matrices,matrices
L,L,L
L matrix,L matrix,L matrix
GLM,GLM,GLM
L matrix,L matrix,L matrix
contrast coefficients matrix,contrast coefficients matrix,contrast coefficients matrix

The LMATRIX subcommand allows you to customize your hypotheses tests by specifying the L matrix (contrast coefficients matrix) in the general form of the linear hypothesis LB = K, where K = 0 if it is not specified on the KMATRIX subcommand. The vector B is the parameter vector in the linear model.

• The basic format for the LMATRIX subcommand is an optional label in quotation marks, one or more effect names or the keyword ALL, and one or more lists of real numbers.

• The optional label is a string with a maximum length of 255 bytes. Only one label can be specified.

• Only valid effects that appear or are implied on the DESIGN subcommand can be specified on the LMATRIX subcommand.

• The length of the list of real numbers must be equal to the number of parameters (including the redundant parameters) corresponding to that effect. For example, if the effect A*B uses six columns in the design matrix, the list after A*B must contain exactly six numbers.

• A number can be specified as a fraction with a positive denominator (for example, 1/3 or –1/3 are valid, but 1/–3 is invalid).

• A semicolon (;) indicates the end of a row in the L matrix.

• When ALL is specified, the length of the list that follows ALL is equal to the total number of parameters (including the redundant parameters) in the model.

• Effects that appear or are implied on the DESIGN subcommand must be explicitly specified here.

• Multiple LMATRIX subcommands are allowed. Each subcommand is treated independently.

Example

GLM DEP BY A B
  /LMATRIX = "B1 vs B2 at A1"
              B 1 -1 0 A*B 1 -1 0 0 0 0 0 0 0
  /LMATRIX = "Effect A"
              A 1 0 -1
              A*B 1/3  1/3  1/3
                   0    0    0
                 -1/3 -1/3 -1/3;
              A 0 1 -1
              A*B  0    0    0
                  1/3  1/3  1/3
                 -1/3 -1/3 -1/3
  /LMATRIX = "B1 vs B2 at A2"
             ALL  0
                  0  0  0
                  1 -1  0
                  0  0  0  1 -1  0 0  0  0
  /DESIGN = A, B, A*B.

Assume that factors A and B each have three levels. There are three LMATRIX subcommands; each subcommand is treated independently.

• B1 Versus B2 at A1. In the first LMATRIX subcommand, the difference is tested between levels 1 and 2 of effect B when effect A is fixed at level 1. Because there are three levels each in effects A and B, the interaction effect A*B should use nine columns in the design matrix.

• Effect A. In the second LMATRIX subcommand, effect A is tested. Because there are three levels in effect A, no more than two independent contrasts can be formed; thus, there are two rows in the L matrix, which are separated by a semicolon (;). The first row tests the difference between levels 1 and 3 of effect A, while the second row tests the difference between levels 2 and 3 of effect A.

• B1 Versus B2 at A2. In the last LMATRIX subcommand, the keyword ALL is used. The first 0 corresponds to the intercept effect; the next three instances of 0 correspond to effect A.

Related Topics

GLM: Univariate
Overview (GLM: Univariate command)
Example (GLM: Univariate command)
GLM Variable List (GLM: Univariate command)
RANDOM Subcommand (GLM: Univariate command)
REGWGT Subcommand (GLM: Univariate command)
METHOD Subcommand (GLM: Univariate command)
INTERCEPT Subcommand (GLM: Univariate command)
MISSING Subcommand (GLM: Univariate command)
CRITERIA Subcommand (GLM: Univariate command)
PRINT Subcommand (GLM: Univariate command)
PLOT Subcommand (GLM: Univariate command)
TEST Subcommand (GLM: Univariate command)
KMATRIX Subcommand (GLM: Univariate command)
CONTRAST Subcommand (GLM: Univariate command)
POSTHOC Subcommand (GLM: Univariate command)
EMMEANS Subcommand (GLM: Univariate command)
SAVE Subcommand (GLM: Univariate command)
OUTFILE Subcommand (GLM: Univariate command)
DESIGN Subcommand (GLM: Univariate command)


KMATRIX Subcommand (GLM: Univariate command)

KMATRIX (subcommand),KMATRIX (subcommand),KMATRIX (subcommand)
GLM command,GLM command,GLM command
GLM (command),GLM (command),GLM (command)
KMATRIX subcommand,KMATRIX subcommand,KMATRIX subcommand
matrices,matrices,matrices
K,K,K
K matrix,K matrix,K matrix
in GLM,in GLM,in GLM
GLM,GLM,GLM
K matrix,K matrix,K matrix
contrast results matrix,contrast results matrix,contrast results matrix

The KMATRIX subcommand allows you to customize your hypothesis tests by specifying the K matrix (contrast results matrix) in the general form of the linear hypothesis LB = K. The vector B is the parameter vector in the linear model.

• The default K matrix is a zero matrix; that is, LB = 0 is assumed.

• For the KMATRIX subcommand to be valid, at least one of the following subcommands must be specified: the LMATRIX subcommand or the INTERCEPT = INCLUDE subcommand.

intercept,intercept,intercept
in estimable function,in estimable function,in estimable function
estimable functions,estimable functions,estimable functions
intercept,intercept,intercept

• If KMATRIX is specified but LMATRIX is not specified, the LMATRIX is assumed to take the row vector corresponding to the intercept in the estimable function, provided that the subcommand INTERCEPT = INCLUDE is specified. In this case, the K matrix can be only a scalar matrix.

• If KMATRIX and LMATRIX are specified, the number of rows in the requested K and L matrices must be equal. If there are multiple LMATRIX subcommands, all requested L matrices must have the same number of rows, and K must have the same number of rows as these L matrices.

• A semicolon (;) can be used to indicate the end of a row in the K matrix.

• If more than one KMATRIX subcommand is specified, only the last subcommand is in effect.

Example

GLM DEP BY A B
  /LMATRIX = “Effect A”
              A 1  0 -1; A 1 -1  0
  /LMATRIX = “Effect B”
              B 1  0 -1; B 1 -1  0
  /KMATRIX = 0; 0
  /DESIGN = A B.

In this example, assume that factors A and B each have three levels.

• There are two LMATRIX subcommands; both subcommands have two rows.

• The first LMATRIX subcommand tests whether the effect of A is 0, while the second LMATRIX subcommand tests whether the effect of B is 0.

• The KMATRIX subcommand specifies that the K matrix also has two rows, each row with value 0.

Related Topics

GLM: Univariate
Overview (GLM: Univariate command)
Example (GLM: Univariate command)
GLM Variable List (GLM: Univariate command)
RANDOM Subcommand (GLM: Univariate command)
REGWGT Subcommand (GLM: Univariate command)
METHOD Subcommand (GLM: Univariate command)
INTERCEPT Subcommand (GLM: Univariate command)
MISSING Subcommand (GLM: Univariate command)
CRITERIA Subcommand (GLM: Univariate command)
PRINT Subcommand (GLM: Univariate command)
PLOT Subcommand (GLM: Univariate command)
TEST Subcommand (GLM: Univariate command)
LMATRIX Subcommand (GLM: Univariate command)
CONTRAST Subcommand (GLM: Univariate command)
POSTHOC Subcommand (GLM: Univariate command)
EMMEANS Subcommand (GLM: Univariate command)
SAVE Subcommand (GLM: Univariate command)
OUTFILE Subcommand (GLM: Univariate command)
DESIGN Subcommand (GLM: Univariate command)


CONTRAST Subcommand (GLM: Univariate command)

CONTRAST (subcommand),CONTRAST (subcommand),CONTRAST (subcommand)
GLM command,GLM command,GLM command
GLM (command),GLM (command),GLM (command)
CONTRAST subcommand,CONTRAST subcommand,CONTRAST subcommand
contrasts,contrasts,contrasts
in GLM,in GLM,in GLM
GLM,GLM,GLM
contrasts,contrasts,contrasts

CONTRAST specifies the type of contrast that is desired among the levels of a factor. For a factor with k levels or values, the contrast type determines the meaning of its k−1 degrees of freedom.

• Specify the factor name in parentheses following the subcommand CONTRAST.

• You can specify only one factor per CONTRAST subcommand, but you can enter multiple CONTRAST subcommands.

• After closing the parentheses, enter an equals sign followed by one of the contrast keywords.

• This subcommand creates an L matrix where the columns corresponding to the factor match the contrast that is given. The other columns are adjusted so that the L matrix is estimable.

The following contrast types are available:

contrasts,contrasts,contrasts
deviation,deviation,deviation
DEVIATION (keyword),DEVIATION (keyword),DEVIATION (keyword)
GLM command,GLM command,GLM command
deviation contrasts,deviation contrasts,deviation contrasts
POLYNOMIAL (keyword),POLYNOMIAL (keyword),POLYNOMIAL (keyword)
GLM command,GLM command,GLM command
polynomial contrasts,polynomial contrasts,polynomial contrasts
contrasts,contrasts,contrasts
polynomial,polynomial,polynomial
difference contrasts,difference contrasts,difference contrasts
contrasts,contrasts,contrasts
difference,difference,difference
reverse Helmert contrasts,reverse Helmert contrasts,reverse Helmert contrasts
contrasts,contrasts,contrasts
reverse Helmert,reverse Helmert,reverse Helmert
DIFFERENCE (keyword),DIFFERENCE (keyword),DIFFERENCE (keyword)
GLM command,GLM command,GLM command
HELMERT (keyword),HELMERT (keyword),HELMERT (keyword)
GLM command,GLM command,GLM command
Helmert contrasts,Helmert contrasts,Helmert contrasts
contrasts,contrasts,contrasts
Helmert,Helmert,Helmert
SIMPLE (keyword),SIMPLE (keyword),SIMPLE (keyword)
GLM command,GLM command,GLM command
simple contrasts,simple contrasts,simple contrasts
contrasts,contrasts,contrasts
simple,simple,simple
repeated contrasts,repeated contrasts,repeated contrasts
contrasts,contrasts,contrasts
repeated,repeated,repeated
REPEATED (keyword),REPEATED (keyword),REPEATED (keyword)
GLM command,GLM command,GLM command
special contrasts,special contrasts,special contrasts
SPECIAL (keyword),SPECIAL (keyword),SPECIAL (keyword)
GLM command,GLM command,GLM command
contrasts,contrasts,contrasts
special,special,special
DEVIATION | Deviations from the grand mean. This setting is the default for between-subjects factors. Each level of the factor except one is compared to the grand mean. One category (by default, the last category) must be omitted so that the effects will be independent of one another. To omit a category other than the last category, specify the number of the omitted category (which is not necessarily the same as its value) in parentheses after the keyword DEVIATION. An example is as follows:
GLM Y BY B /CONTRAST(B)=DEVIATION(1).
Suppose factor B has three levels, with values 2, 4, and 6. The specified contrast omits the first category, in which B has the value 2. Deviation contrasts are not orthogonal.
POLYNOMIAL | Polynomial contrasts. This setting is the default for within-subjects factors. The first degree of freedom contains the linear effect across the levels of the factor, the second degree of freedom contains the quadratic effect, and so on. In a balanced design, polynomial contrasts are orthogonal. By default, the levels are assumed to be equally spaced; you can specify unequal spacing by entering a metric consisting of one integer for each level of the factor in parentheses after the keyword POLYNOMIAL. (All metrics that are specified cannot be equal; thus, (1, 1, . . . 1) is not valid.) An example is as follows:
GLM RESPONSE BY STIMULUS /CONTRAST(STIMULUS) = POLYNOMIAL(1,2,4).
Suppose that factor STIMULUS has three levels. The specified contrast indicates that the three levels of STIMULUS are actually in the proportion 1:2:4. The default metric is always (1, 2, . . . k), where k levels are involved. Only the relative differences between the terms of the metric matter. (1, 2, 4) is the same metric as (2, 3, 5) or (20, 30, 50) because, in each instance, the difference between the second and third numbers is twice the difference between the first and second.
DIFFERENCE | Difference or reverse Helmert contrasts. Each level of the factor (except the first level) is compared to the mean of the previous levels. In a balanced design, difference contrasts are orthogonal.
HELMERT | Helmert contrasts. Each level of the factor (except the last level) is compared to the mean of subsequent levels. In a balanced design, Helmert contrasts are orthogonal.
SIMPLE | Contrast where each level of the factor (except the last level) is compared to the last level. To use a category other than the last category as the omitted reference category, specify the category's number (which is not necessarily the same as its value) in parentheses following the keyword SIMPLE. An example is as follows:
GLM Y BY B /CONTRAST(B)=SIMPLE(1).
Suppose that factor B has three levels with values 2, 4, and 6. The specified contrast compares the other levels to the first level of B, in which B has the value 2. Simple contrasts are not orthogonal.
REPEATED | Comparison of adjacent levels. Each level of the factor (except the last level) is compared to the next level. Repeated contrasts are not orthogonal.
SPECIAL | A user-defined contrast. Values that are specified after this keyword are stored in a matrix in column major order. For example, if factor A has three levels, then CONTRAST(A)=SPECIAL(1 1 1 1 -1 0 0 1 -1) produces the following contrast matrix:
1   1   0
1  –1   1
1   0   –1
orthogonal contrasts,orthogonal contrasts,orthogonal contrasts
contrasts,contrasts,contrasts
orthogonal,orthogonal,orthogonal

Orthogonal contrasts are particularly useful. In a balanced design, contrasts are orthogonal if the sum of the coefficients in each contrast row is 0 and if, for any pair of contrast rows, the products of corresponding coefficients sum to 0. DIFFERENCE, HELMERT, and POLYNOMIAL contrasts always meet these criteria in balanced designs.

Example

GLM DEP BY FAC
  /CONTRAST(FAC)=DIFFERENCE
  /DESIGN.

• Suppose that the factor FAC has five categories and, therefore, has four degrees of freedom.

• CONTRAST requests DIFFERENCE contrasts, which compare each level (except the first level) with the mean of the previous levels.

Related Topics

GLM: Univariate
Overview (GLM: Univariate command)
Example (GLM: Univariate command)
GLM Variable List (GLM: Univariate command)
RANDOM Subcommand (GLM: Univariate command)
REGWGT Subcommand (GLM: Univariate command)
METHOD Subcommand (GLM: Univariate command)
INTERCEPT Subcommand (GLM: Univariate command)
MISSING Subcommand (GLM: Univariate command)
CRITERIA Subcommand (GLM: Univariate command)
PRINT Subcommand (GLM: Univariate command)
PLOT Subcommand (GLM: Univariate command)
TEST Subcommand (GLM: Univariate command)
LMATRIX Subcommand (GLM: Univariate command)
KMATRIX Subcommand (GLM: Univariate command)
POSTHOC Subcommand (GLM: Univariate command)
EMMEANS Subcommand (GLM: Univariate command)
SAVE Subcommand (GLM: Univariate command)
OUTFILE Subcommand (GLM: Univariate command)
DESIGN Subcommand (GLM: Univariate command)


POSTHOC Subcommand (GLM: Univariate command)

POSTHOC (subcommand),POSTHOC (subcommand),POSTHOC (subcommand)
GLM command,GLM command,GLM command
GLM (command),GLM (command),GLM (command)
POSTHOC subcommand,POSTHOC subcommand,POSTHOC subcommand
post hoc tests,post hoc tests,post hoc tests
GLM,GLM,GLM
GLM,GLM,GLM
post hoc tests,post hoc tests,post hoc tests
post hoc tests,post hoc tests,post hoc tests
in GLM,in GLM,in GLM
individual test names,individual test names,individual test names
multiple comparisons,multiple comparisons,multiple comparisons
in GLM,in GLM,in GLM
GLM,GLM,GLM
multiple comparisons,multiple comparisons,multiple comparisons

POSTHOC allows you to produce multiple comparisons between means of a factor. These comparisons are usually not planned at the beginning of the study but are suggested by the data during the course of study.

alpha value,alpha value,alpha value
for post hoc tests,for post hoc tests,for post hoc tests
post hoc tests,post hoc tests,post hoc tests
alpha value,alpha value,alpha value

• Post hoc tests are computed for the dependent variable. The alpha value that is used in the tests can be specified by using the keyword ALPHA on the CRITERIA subcommand. The default alpha value is 0.05. The confidence level for any confidence interval that is constructed is (1−α)×100. The default confidence level is 95. For a multivariate model, tests are computed for all specified dependent variables.

• Only between-subjects factors that appear in the factor list are valid in this subcommand. Individual factors can be specified.

• You can specify one or more effects to be tested. Only fixed main effects that appear or are implied on the DESIGN subcommand are valid test effects.

• Optionally, you can specify an effect defining the error term following the keyword VS after the test specification. The error effect can be any single effect in the design that is not the intercept or a main effect that is named on a POSTHOC subcommand.

• A variety of multiple comparison tests are available. Some tests are designed for detecting homogeneity subsets among the groups of means, some tests are designed for pairwise comparisons among all means, and some tests can be used for both purposes.

• For tests that are used for detecting homogeneity subsets of means, non-empty group means are sorted in ascending order. Means that are not significantly different are included together to form a homogeneity subset. The significance for each homogeneity subset of means is displayed. In a case where the numbers of valid cases are not equal in all groups, for most post hoc tests, the harmonic mean of the group sizes is used as the sample size in the calculation. For QREGW or FREGW, individual sample sizes are used.

• For tests that are used for pairwise comparisons, the display includes the difference between each pair of compared means, the confidence interval for the difference, and the significance. The sample sizes of the two groups that are being compared are used in the calculation.

• Output for tests that are specified on the POSTHOC subcommand is available according to their statistical purposes. The following table illustrates the statistical purpose of the post hoc tests:

post hoc tests,post hoc tests,post hoc tests
statistical purpose,statistical purpose,statistical purpose
least significant difference,least significant difference,least significant difference
post hoc tests,post hoc tests,post hoc tests
least significant difference,least significant difference,least significant difference
Sidak's t test,Sidak's t test,Sidak's t test
post hoc tests,post hoc tests,post hoc tests
Sidak's t test,Sidak's t test,Sidak's t test
Bonferroni test,Bonferroni test,Bonferroni test
post hoc tests,post hoc tests,post hoc tests
Bonferroni test,Bonferroni test,Bonferroni test
Games and Howell's pairwise comparisons test,Games and Howell's pairwise comparisons test,Games and Howell's pairwise comparisons test
post hoc tests,post hoc tests,post hoc tests
Games and Howell's pairwise comparisons test,Games and Howell's pairwise comparisons test,Games and Howell's pairwise comparisons test
Tamhane's T2,Tamhane's T2,Tamhane's T2
post hoc tests,post hoc tests,post hoc tests
Tamhane's T2,Tamhane's T2,Tamhane's T2
Tamhane's T3,Tamhane's T3,Tamhane's T3
post hoc tests,post hoc tests,post hoc tests
Tamhane's T3,Tamhane's T3,Tamhane's T3
Dunnett's C,Dunnett's C,Dunnett's C
post hoc tests,post hoc tests,post hoc tests
Dunnett's C,Dunnett's C,Dunnett's C
post hoc tests,post hoc tests,post hoc tests
Dunnett's t test,Dunnett's t test,Dunnett's t test
Dunnett's t test,Dunnett's t test,Dunnett's t test
Student-Newman-Keuls,Student-Newman-Keuls,Student-Newman-Keuls
post hoc tests,post hoc tests,post hoc tests
Student-Newman-Keuls,Student-Newman-Keuls,Student-Newman-Keuls
Tukey's b test,Tukey's b test,Tukey's b test
post hoc tests,post hoc tests,post hoc tests
Tukey's b test,Tukey's b test,Tukey's b test
Duncan's multiple range test,Duncan's multiple range test,Duncan's multiple range test
post hoc tests,post hoc tests,post hoc tests
Duncan's multiple comparison procedure,Duncan's multiple comparison procedure,Duncan's multiple comparison procedure
Ryan-Einot-Gabriel-Welsch multiple stepdown procedure,Ryan-Einot-Gabriel-Welsch multiple stepdown procedure,Ryan-Einot-Gabriel-Welsch multiple stepdown procedure
post hoc tests,post hoc tests,post hoc tests
Ryan-Einot-Gabriel-Welsch multiple stepdown procedure,Ryan-Einot-Gabriel-Welsch multiple stepdown procedure,Ryan-Einot-Gabriel-Welsch multiple stepdown procedure
Waller-Duncan t test,Waller-Duncan t test,Waller-Duncan t test
post hoc tests,post hoc tests,post hoc tests
Waller-Duncan test,Waller-Duncan test,Waller-Duncan test
Tukey's honestly significant difference,Tukey's honestly significant difference,Tukey's honestly significant difference
post hoc tests,post hoc tests,post hoc tests
Tukey's honestly significant difference,Tukey's honestly significant difference,Tukey's honestly significant difference
Scheffé test,Scheffé test,Scheffé test
post hoc tests,post hoc tests,post hoc tests
Scheffé test,Scheffé test,Scheffé test
Hochberg's GT2,Hochberg's GT2,Hochberg's GT2
post hoc tests,post hoc tests,post hoc tests
Hochberg's GT2,Hochberg's GT2,Hochberg's GT2
Post Hoc Tests | Statistical Purpose
Keyword | Homogeneity Subsets Detection | Pairwise Comparison and Confidence Interval
LSD |  | Yes
SIDAK |  | Yes
BONFERRONI |  | Yes
GH |  | Yes
T2 |  | Yes
T3 |  | Yes
C |  | Yes
DUNNETT |  | Yes*
DUNNETTL |  | Yes*
DUNNETTR |  | Yes*
SNK | Yes |
BTUKEY | Yes |
DUNCAN | Yes |
QREGW | Yes |
FREGW | Yes |
WALLER | Yes† |
TUKEY | Yes | Yes
SCHEFFE | Yes | Yes
GT2 | Yes | Yes
GABRIEL | Yes | Yes

* Only CIs for differences between test group means and control group means are given.

† No significance for Waller test is given.

• Tests that are designed for homogeneity subset detection display the detected homogeneity subsets and their corresponding significances.

• Tests that are designed for both homogeneity subset detection and pairwise comparisons display both kinds of output.

• For the DUNNETT, DUNNETTL, and DUNNETTR keywords, only individual factors can be specified.

• The default reference category for DUNNETT, DUNNETTL, and DUNNETTR is the last category. An integer that is greater than 0, specified within parentheses, can be used to specify a different reference category. For example, POSTHOC = A (DUNNETT(2)) requests a DUNNETT test for factor A, using the second level of A as the reference category.

• The keywords DUNCAN, DUNNETT, DUNNETTL, and DUNNETTR must be spelled out in full; using the first three characters alone is not sufficient.

• If the REGWGT subcommand is specified, weighted means are used in performing post hoc tests.

• Multiple POSTHOC subcommands are allowed. Each specification is executed independently so that you can test different effects against different error terms.

Student-Newman-Keuls,Student-Newman-Keuls,Student-Newman-Keuls
post hoc tests,post hoc tests,post hoc tests
Student-Newman-Keuls,Student-Newman-Keuls,Student-Newman-Keuls
SNK (keyword),SNK (keyword),SNK (keyword)
GLM command,GLM command,GLM command
Tukey's honestly significant difference,Tukey's honestly significant difference,Tukey's honestly significant difference
post hoc tests,post hoc tests,post hoc tests
Tukey's honestly significant difference,Tukey's honestly significant difference,Tukey's honestly significant difference
TUKEY (keyword),TUKEY (keyword),TUKEY (keyword)
GLM command,GLM command,GLM command
Tukey's b test,Tukey's b test,Tukey's b test
post hoc tests,post hoc tests,post hoc tests
Tukey's b test,Tukey's b test,Tukey's b test
BTUKEY (keyword),BTUKEY (keyword),BTUKEY (keyword)
GLM command,GLM command,GLM command
DUNCAN (keyword),DUNCAN (keyword),DUNCAN (keyword)
GLM command,GLM command,GLM command
Duncan's multiple range test,Duncan's multiple range test,Duncan's multiple range test
post hoc tests,post hoc tests,post hoc tests
Duncan's multiple comparison procedure,Duncan's multiple comparison procedure,Duncan's multiple comparison procedure
SCHEFFE (keyword),SCHEFFE (keyword),SCHEFFE (keyword)
GLM command,GLM command,GLM command
Scheffé test,Scheffé test,Scheffé test
post hoc tests,post hoc tests,post hoc tests
Scheffé test,Scheffé test,Scheffé test
DUNNETT (keyword),DUNNETT (keyword),DUNNETT (keyword)
GLM command,GLM command,GLM command
Dunnett's t test,Dunnett's t test,Dunnett's t test
DUNNETTL (keyword),DUNNETTL (keyword),DUNNETTL (keyword)
GLM command,GLM command,GLM command
Dunnett's t test,Dunnett's t test,Dunnett's t test
DUNNETTR (keyword),DUNNETTR (keyword),DUNNETTR (keyword)
GLM command,GLM command,GLM command
Bonferroni test,Bonferroni test,Bonferroni test
post hoc tests,post hoc tests,post hoc tests
Bonferroni test,Bonferroni test,Bonferroni test
BONFERRONI (keyword),BONFERRONI (keyword),BONFERRONI (keyword)
GLM command,GLM command,GLM command
least significant difference,least significant difference,least significant difference
post hoc tests,post hoc tests,post hoc tests
least significant difference,least significant difference,least significant difference
LSD (keyword),LSD (keyword),LSD (keyword)
GLM command,GLM command,GLM command
Sidak's t test,Sidak's t test,Sidak's t test
post hoc tests,post hoc tests,post hoc tests
Sidak's t test,Sidak's t test,Sidak's t test
SIDAK (keyword),SIDAK (keyword),SIDAK (keyword)
GLM command,GLM command,GLM command
Hochberg's GT2,Hochberg's GT2,Hochberg's GT2
post hoc tests,post hoc tests,post hoc tests
Hochberg's GT2,Hochberg's GT2,Hochberg's GT2
GT2 (keyword),GT2 (keyword),GT2 (keyword)
GLM command,GLM command,GLM command
GABRIEL (keyword),GABRIEL (keyword),GABRIEL (keyword)
GLM command,GLM command,GLM command
Gabriel's pairwise comparisons test,Gabriel's pairwise comparisons test,Gabriel's pairwise comparisons test
post hoc tests,post hoc tests,post hoc tests
Gabriel's pairwise comparisons test,Gabriel's pairwise comparisons test,Gabriel's pairwise comparisons test
Ryan-Einot-Gabriel-Welsch multiple stepdown procedure,Ryan-Einot-Gabriel-Welsch multiple stepdown procedure,Ryan-Einot-Gabriel-Welsch multiple stepdown procedure
post hoc tests,post hoc tests,post hoc tests
Ryan-Einot-Gabriel-Welsch multiple stepdown procedure,Ryan-Einot-Gabriel-Welsch multiple stepdown procedure,Ryan-Einot-Gabriel-Welsch multiple stepdown procedure
FREGW (keyword),FREGW (keyword),FREGW (keyword)
GLM command,GLM command,GLM command
QREGW (keyword),QREGW (keyword),QREGW (keyword)
GLM command,GLM command,GLM command
Tamhane's T2,Tamhane's T2,Tamhane's T2
post hoc tests,post hoc tests,post hoc tests
Tamhane's T2,Tamhane's T2,Tamhane's T2
T2 (keyword),T2 (keyword),T2 (keyword)
GLM command,GLM command,GLM command
T3 (keyword),T3 (keyword),T3 (keyword)
GLM command,GLM command,GLM command
Tamhane's T3,Tamhane's T3,Tamhane's T3
post hoc tests,post hoc tests,post hoc tests
Tamhane's T3,Tamhane's T3,Tamhane's T3
GH (keyword),GH (keyword),GH (keyword)
GLM command,GLM command,GLM command
Games and Howell's pairwise comparisons test,Games and Howell's pairwise comparisons test,Games and Howell's pairwise comparisons test
post hoc tests,post hoc tests,post hoc tests
Games and Howell's pairwise comparisons test,Games and Howell's pairwise comparisons test,Games and Howell's pairwise comparisons test
Dunnett's C,Dunnett's C,Dunnett's C
post hoc tests,post hoc tests,post hoc tests
Dunnett's C,Dunnett's C,Dunnett's C
C (keyword),C (keyword),C (keyword)
GLM command,GLM command,GLM command
Waller-Duncan t test,Waller-Duncan t test,Waller-Duncan t test
post hoc tests,post hoc tests,post hoc tests
Waller-Duncan test,Waller-Duncan test,Waller-Duncan test
WALLER (keyword),WALLER (keyword),WALLER (keyword)
GLM command,GLM command,GLM command
SNK | Student-Newman-Keuls procedure based on the Studentized range test.
TUKEY | Tukey’s honestly significant difference. This test uses the Studentized range statistic to make all pairwise comparisons between groups.
BTUKEY | Tukey’s b. This procedure is a multiple comparison procedure based on the average of Studentized range tests.
DUNCAN | Duncan’s multiple comparison procedure based on the Studentized range test.
SCHEFFE | Scheffé’s multiple comparison t test.
DUNNETT(refcat) | Dunnett’s two-tailed t test. Each level of the factor is compared to a reference category. A reference category can be specified in parentheses. The default reference category is the last category. This keyword must be spelled out in full.
DUNNETTL(refcat) | Dunnett’s one-tailed t test. This test indicates whether the mean at any level (except the reference category) of the factor is smaller than the mean of the reference category. A reference category can be specified in parentheses. The default reference category is the last category. This keyword must be spelled out in full.
DUNNETTR(refcat) | Dunnett’s one-tailed t test. This test indicates whether the mean at any level (except the reference category) of the factor is larger than the mean of the reference category. A reference category can be specified in parentheses. The default reference category is the last category. This keyword must be spelled out in full.
BONFERRONI | Bonferroni t test. This test is based on Student’s t statistic and adjusts the observed significance level based on the fact that multiple comparisons are made.
LSD | Least significant difference t test. This test is equivalent to multiple t tests between all pairs of groups. This test does not control the overall probability of rejecting the hypotheses that some pairs of means are different, while in fact they are equal.
SIDAK | Sidak t test. This test provides tighter bounds than the Bonferroni test.
GT2 | Hochberg’s GT2. This test is a pairwise comparisons test based on the Studentized maximum modulus test. Unless the cell sizes are extremely unbalanced, this test is fairly robust even for unequal variances.
GABRIEL | Gabriel’s pairwise comparisons test based on the Studentized maximum modulus test.
FREGW | Ryan-Einot-Gabriel-Welsch’s multiple stepdown procedure based on an F test.
QREGW | Ryan-Einot-Gabriel-Welsch’s multiple stepdown procedure based on the Studentized range test.
T2 | Tamhane’s T2. Tamhane’s pairwise comparisons test based on a t test. This test can be applied in situations where the variances are unequal. This test is invalid when there are multiple factors in the model, and the keyword is ignored with a warning in such cases.
T3 | Dunnett’s T3. Pairwise comparisons test based on the Studentized maximum modulus. This test is appropriate when the variances are unequal. This test is invalid when there are multiple factors in the model, and the keyword is ignored with a warning in such cases.
GH | Games and Howell’s pairwise comparisons test based on the Studentized range test. This test can be applied in situations where the variances are unequal. This test is invalid when there are multiple factors in the model, and the keyword is ignored with a warning in such cases.
C | Dunnett’s C. Pairwise comparisons based on the weighted average of Studentized ranges. This test can be applied in situations where the variances are unequal. This test is invalid when there are multiple factors in the model, and the keyword is ignored with a warning in such cases.
WALLER(kratio) | Waller-Duncan t test. This test uses a Bayesian approach. The test is restricted to cases with equal sample sizes. For cases with unequal sample sizes, the harmonic mean of the sample size is used. The kratio is the Type 1/Type 2 error seriousness ratio. The default value is 100. You can specify an integer that is greater than 1, enclosed within parentheses.

Related Topics

GLM: Univariate
Overview (GLM: Univariate command)
Example (GLM: Univariate command)
GLM Variable List (GLM: Univariate command)
RANDOM Subcommand (GLM: Univariate command)
REGWGT Subcommand (GLM: Univariate command)
METHOD Subcommand (GLM: Univariate command)
INTERCEPT Subcommand (GLM: Univariate command)
MISSING Subcommand (GLM: Univariate command)
CRITERIA Subcommand (GLM: Univariate command)
PRINT Subcommand (GLM: Univariate command)
PLOT Subcommand (GLM: Univariate command)
TEST Subcommand (GLM: Univariate command)
LMATRIX Subcommand (GLM: Univariate command)
KMATRIX Subcommand (GLM: Univariate command)
CONTRAST Subcommand (GLM: Univariate command)
EMMEANS Subcommand (GLM: Univariate command)
SAVE Subcommand (GLM: Univariate command)
OUTFILE Subcommand (GLM: Univariate command)
DESIGN Subcommand (GLM: Univariate command)


EMMEANS Subcommand (GLM: Univariate command)

estimated marginal means,estimated marginal means,estimated marginal means
in GLM,in GLM,in GLM
EMMEANS (subcommand),EMMEANS (subcommand),EMMEANS (subcommand)
GLM command,GLM command,GLM command
GLM (command),GLM (command),GLM (command)
EMMEANS subcommand,EMMEANS subcommand,EMMEANS subcommand
GLM,GLM,GLM
estimated marginal means,estimated marginal means,estimated marginal means

EMMEANS displays estimated marginal means of the dependent variable in the cells (with covariates held at their overall mean value) and their standard errors of the means for the specified factors. These means are predicted, not observed, means. The estimated marginal means are calculated by using a modified definition by Searle, Speed, and Milliken (1980).

• TABLES, followed by an option in parentheses, is required. COMPARE is optional; if specified, COMPARE must follow TABLES.

• Multiple EMMEANS subcommands are allowed. Each subcommand is treated independently.

• If identical EMMEANS subcommands are specified, only the last identical subcommand is in effect. EMMEANS subcommands that are redundant but not identical (for example, crossed factor combinations such as A*B and B*A) are all processed.

TABLES (keyword),TABLES (keyword),TABLES (keyword)
GLM command,GLM command,GLM command
table specifications,table specifications,table specifications
in GLM,in GLM,in GLM
TABLES(option) | Table specification. Valid options are the keyword OVERALL, factors appearing on the factor list, and crossed factors that are constructed of factors on the factor list. Crossed factors can be specified by using an asterisk (*) or the keyword BY. All factors in a crossed factor specification must be unique.
 | If OVERALL is specified, the estimated marginal means of the dependent variable are displayed, collapsing over between-subjects factors.
 | If a between-subjects factor, or a crossing of between-subjects factors, is specified on the TABLES keyword, GLM collapses over any other between-subjects factors before computing the estimated marginal means for the dependent variable. For a multivariate model, GLM collapses over any other between-subjects or within-subjects factors.
 | The TABLES keyword may be followed by the WITH keyword and a parenthesized list of covariates and values. Tables are produced with the values of the covariates fixed at the specified values. The keyword MEAN causes the covariate to be fixed at its observed mean value.
COMPARE(factor) ADJ(method) | Main-effects or simple-main-effects omnibus tests and pairwise comparisons of the dependent variable. This option gives the mean difference, standard error, significance, and confidence interval for each pair of levels for the effect that is specified in the TABLES command, as well as an omnibus test for that effect. If only one factor is specified on TABLES, COMPARE can be specified by itself; otherwise, the factor specification is required. In this case, levels of the specified factor are compared with each other for each level of the other factors in the interaction.
 | The optional ADJ keyword allows you to apply an adjustment to the confidence intervals and significance values to account for multiple comparisons. Available methods are LSD (no adjustment), BONFERRONI, or SIDAK.
 | If OVERALL is specified on TABLES, COMPARE is invalid.

Example

GLM DEP BY A B
  /EMMEANS = TABLES(A*B) WITH(X=1.0) COMPARE(A)
  /DESIGN.

• The output of this analysis includes a pairwise comparisons table for the dependent variable DEP.

• Assume that A has three levels and B has two levels. The first level of A is compared with the second and third levels, the second level is compared with the first and third levels, and the third level is compared with the first and second levels, with the value of the covariate X fixed at 1.0. The pairwise comparison is repeated for the two levels of B.

Related Topics

GLM: Univariate
Overview (GLM: Univariate command)
Example (GLM: Univariate command)
GLM Variable List (GLM: Univariate command)
RANDOM Subcommand (GLM: Univariate command)
REGWGT Subcommand (GLM: Univariate command)
METHOD Subcommand (GLM: Univariate command)
INTERCEPT Subcommand (GLM: Univariate command)
MISSING Subcommand (GLM: Univariate command)
CRITERIA Subcommand (GLM: Univariate command)
PRINT Subcommand (GLM: Univariate command)
PLOT Subcommand (GLM: Univariate command)
TEST Subcommand (GLM: Univariate command)
LMATRIX Subcommand (GLM: Univariate command)
KMATRIX Subcommand (GLM: Univariate command)
CONTRAST Subcommand (GLM: Univariate command)
POSTHOC Subcommand (GLM: Univariate command)
SAVE Subcommand (GLM: Univariate command)
OUTFILE Subcommand (GLM: Univariate command)
DESIGN Subcommand (GLM: Univariate command)


SAVE Subcommand (GLM: Univariate command)

SAVE (subcommand),SAVE (subcommand),SAVE (subcommand)
GLM command,GLM command,GLM command
GLM (command),GLM (command),GLM (command)
SAVE subcommand,SAVE subcommand,SAVE subcommand

Use SAVE to add one or more residual or fit values to the active dataset.

• Specify one or more temporary variables, each variable followed by an optional new name in parentheses. For a multivariate model, you can optionally specify a new name for the temporary variable related to each dependent variable.

• WPRED and WRESID can be saved only if REGWGT has been specified.

• Specifying a temporary variable on this subcommand results in a variable being added to the active data file for each dependent variable.

• You can specify variable names for the temporary variables. These names must be unique, valid variable names. For a multivariate model, there should be as many variable names specified as there are dependent variables, and names should be listed in the order of the dependent variables as specified on the GLM command. If you do not specify enough variable names, default variable names are used for any remaining variables.

• If new names are not specified, GLM generates a rootname by using a shortened form of the temporary variable name with a suffix. For a multivariate model, the suffix _n is added to the temporary variable name, where n is the ordinal number of the dependent variable as specified on the GLM command.

• If more than one SAVE subcommand is specified, only the last subcommand is in effect.

PRED (keyword),PRED (keyword),PRED (keyword)
GLM command,GLM command,GLM command
unstandardized predicted values,unstandardized predicted values,unstandardized predicted values
in GLM,in GLM,in GLM
GLM,GLM,GLM
unstandardized predicted residuals,unstandardized predicted residuals,unstandardized predicted residuals
WPRED (keyword),WPRED (keyword),WPRED (keyword)
GLM command,GLM command,GLM command
weighted unstandardized predicted values,weighted unstandardized predicted values,weighted unstandardized predicted values
in GLM,in GLM,in GLM
GLM,GLM,GLM
weighted unstandardized predicted values,weighted unstandardized predicted values,weighted unstandardized predicted values
RESID (keyword),RESID (keyword),RESID (keyword)
GLM command,GLM command,GLM command
GLM,GLM,GLM
unstandardized residuals,unstandardized residuals,unstandardized residuals
unstandardized residuals,unstandardized residuals,unstandardized residuals
in GLM,in GLM,in GLM
WRESID (keyword),WRESID (keyword),WRESID (keyword)
GLM command,GLM command,GLM command
weighted unstandardized residuals,weighted unstandardized residuals,weighted unstandardized residuals
in GLM,in GLM,in GLM
GLM,GLM,GLM
weighted unstandardized residuals,weighted unstandardized residuals,weighted unstandardized residuals
DRESID (keyword),DRESID (keyword),DRESID (keyword)
GLM command,GLM command,GLM command
deleted residuals,deleted residuals,deleted residuals
in GLM,in GLM,in GLM
GLM,GLM,GLM
deleted residuals,deleted residuals,deleted residuals
ZRESID (keyword),ZRESID (keyword),ZRESID (keyword)
GLM command,GLM command,GLM command
standardized residuals,standardized residuals,standardized residuals
in GLM,in GLM,in GLM
GLM,GLM,GLM
standardized residuals,standardized residuals,standardized residuals
SRESID (keyword),SRESID (keyword),SRESID (keyword)
GLM command,GLM command,GLM command
Studentized residuals,Studentized residuals,Studentized residuals
in GLM,in GLM,in GLM
GLM,GLM,GLM
Studentized residuals,Studentized residuals,Studentized residuals
SEPRED (keyword),SEPRED (keyword),SEPRED (keyword)
GLM command,GLM command,GLM command
standard errors,standard errors,standard errors
in GLM,in GLM,in GLM
COOK (keyword),COOK (keyword),COOK (keyword)
GLM command,GLM command,GLM command
LEVER (keyword),LEVER (keyword),LEVER (keyword)
GLM command,GLM command,GLM command
PRED | Unstandardized predicted values.
WPRED | Weighted unstandardized predicted values. This setting is available only if REGWGT has been specified.
RESID | Unstandardized residuals.
WRESID | Weighted unstandardized residuals. This setting is available only if REGWGT has been specified.
DRESID | Deleted residuals.
ZRESID | Standardized residuals.
SRESID | Studentized residuals.
SEPRED | Standard errors of predicted value.
COOK | Cook’s distances.
LEVER | Uncentered leverage values.

Related Topics

GLM: Univariate
Overview (GLM: Univariate command)
Example (GLM: Univariate command)
GLM Variable List (GLM: Univariate command)
RANDOM Subcommand (GLM: Univariate command)
REGWGT Subcommand (GLM: Univariate command)
METHOD Subcommand (GLM: Univariate command)
INTERCEPT Subcommand (GLM: Univariate command)
MISSING Subcommand (GLM: Univariate command)
CRITERIA Subcommand (GLM: Univariate command)
PRINT Subcommand (GLM: Univariate command)
PLOT Subcommand (GLM: Univariate command)
TEST Subcommand (GLM: Univariate command)
LMATRIX Subcommand (GLM: Univariate command)
KMATRIX Subcommand (GLM: Univariate command)
CONTRAST Subcommand (GLM: Univariate command)
POSTHOC Subcommand (GLM: Univariate command)
EMMEANS Subcommand (GLM: Univariate command)
OUTFILE Subcommand (GLM: Univariate command)
DESIGN Subcommand (GLM: Univariate command)


OUTFILE Subcommand (GLM: Univariate command)

OUTFILE (subcommand),OUTFILE (subcommand),OUTFILE (subcommand)
GLM command,GLM command,GLM command
GLM (command),GLM (command),GLM (command)
OUTFILE subcommand,OUTFILE subcommand,OUTFILE subcommand

The OUTFILE subcommand writes data to a data file or previously declared dataset that can be used in other procedures.

• You must specify a keyword on OUTFILE. There is no default.

• You must specify a quoted file specification or previously declared dataset name (DATASET DECLARE command) in parentheses after a keyword. The asterisk (*) is not allowed.

• If you specify more than one keyword, a different filename is required for each keyword.

• If more than one OUTFILE subcommand is specified, only the last subcommand is in effect.

• For COVB or CORB, the output will contain, in addition to the covariance or correlation matrix, three rows for each dependent variable: a row of parameter estimates, a row of residual degrees of freedom, and a row of significance values for the t statistics corresponding to the parameter estimates. All statistics are displayed separately by split.

COVB ('savfile'|'dataset') | Writes the parameter covariance matrix.
CORB ('savfile'|'dataset') | Writes the parameter correlation matrix.
EFFECT ('savfile'|'dataset') | Writes the statistics from the between-subjects ANOVA table. This specification is invalid for repeated measures analyses.
DESIGN ('savfile'|'dataset') | Writes the design matrix. The number of rows equals the number of cases, and the number of columns equals the number of parameters. The variable names are DES_1, DES_2, ..., DES_p, where p is the number of the parameters.

Related Topics

GLM: Univariate
Overview (GLM: Univariate command)
Example (GLM: Univariate command)
GLM Variable List (GLM: Univariate command)
RANDOM Subcommand (GLM: Univariate command)
REGWGT Subcommand (GLM: Univariate command)
METHOD Subcommand (GLM: Univariate command)
INTERCEPT Subcommand (GLM: Univariate command)
MISSING Subcommand (GLM: Univariate command)
CRITERIA Subcommand (GLM: Univariate command)
PRINT Subcommand (GLM: Univariate command)
PLOT Subcommand (GLM: Univariate command)
TEST Subcommand (GLM: Univariate command)
LMATRIX Subcommand (GLM: Univariate command)
KMATRIX Subcommand (GLM: Univariate command)
CONTRAST Subcommand (GLM: Univariate command)
POSTHOC Subcommand (GLM: Univariate command)
EMMEANS Subcommand (GLM: Univariate command)
SAVE Subcommand (GLM: Univariate command)
DESIGN Subcommand (GLM: Univariate command)


DESIGN Subcommand (GLM: Univariate command)

balanced designs,balanced designs,balanced designs
in GLM,in GLM,in GLM

DESIGN specifies the effects included in a specific model. The cells in a design are defined by all of the possible combinations of levels of the factors in that design. The number of cells equals the product of the number of levels of all the factors. A design is balanced if each cell contains the same number of cases. GLM can analyze both balanced and unbalanced designs.

• Specify a list of terms to be included in the model, and separate the terms by spaces or commas.

• The default design, if the DESIGN subcommand is omitted or is specified by itself, is a design consisting of the following terms in order: the intercept term (if INTERCEPT=INCLUDE is specified), the covariates that are given in the covariate list, and the full factorial model defined by all factors on the factor list and excluding the intercept.

• To include a term for the main effect of a factor, enter the name of the factor on the DESIGN subcommand.

• To include the intercept term in the design, use the keyword INTERCEPT on the DESIGN subcommand. If INTERCEPT is specified on the DESIGN subcommand, the subcommand INTERCEPT=EXCLUDE is overridden.

interactions,interactions,interactions
in GLM,in GLM,in GLM

• To include a term for an interaction between factors, use the keyword BY or the asterisk (*) to join the factors that are involved in the interaction. For example, A*B means a two-way interaction effect of A and B, where A and B are factors. A*A is not allowed because factors inside an interaction effect must be distinct.

nested design,nested design,nested design
in GLM,in GLM,in GLM

• To include a term for nesting one effect within another effect, use the keyword WITHIN or use a pair of parentheses on the DESIGN subcommand. For example, A(B) means that A is nested within B. The expression A(B) is equivalent to the expression A WITHIN B. When more than one pair of parentheses is present, each pair of parentheses must be enclosed or nested within another pair of parentheses. Thus, A(B)(C) is not valid.

nesting,nesting,nesting
multiple,multiple,multiple

• Multiple nesting is allowed. For example, A(B(C)) means that B is nested within C and A is nested within B(C).

• Interactions between nested effects are not valid. For example, neither A(C)*B(C) nor A(C)*B(D) is valid.

• To include a covariate term in the design, enter the name of the covariate on the DESIGN subcommand.

• Covariates can be connected—but not nested—through the * operator to form another covariate effect. Therefore, interactions among covariates such as X1*X1 and X1*X2 are valid but not X1(X2). Using covariate effects such as X1*X1, X1*X1*X1, X1*X2, and X1*X1*X2*X2 makes fitting a polynomial regression model easy in GLM.

• Factor and covariate effects can be connected only by the * operator. Suppose A and B are factors and X1 and X2 are covariates. Examples of valid factor-by-covariate interaction effects are A*X1, A*B*X1, X1*A(B), A*X1*X1, and B*X1*X2.

• If more than one DESIGN subcommand is specified, only the last subcommand is in effect.

Example

GLM Y BY A B C WITH X
  /DESIGN A B(A) X*A.

• In this example, the design consists of a main effect A, a nested effect B within A, and an interaction effect of a covariate X with a factor A.

Related Topics

GLM: Univariate
Overview (GLM: Univariate command)
Example (GLM: Univariate command)
GLM Variable List (GLM: Univariate command)
RANDOM Subcommand (GLM: Univariate command)
REGWGT Subcommand (GLM: Univariate command)
METHOD Subcommand (GLM: Univariate command)
INTERCEPT Subcommand (GLM: Univariate command)
MISSING Subcommand (GLM: Univariate command)
CRITERIA Subcommand (GLM: Univariate command)
PRINT Subcommand (GLM: Univariate command)
PLOT Subcommand (GLM: Univariate command)
TEST Subcommand (GLM: Univariate command)
LMATRIX Subcommand (GLM: Univariate command)
KMATRIX Subcommand (GLM: Univariate command)
CONTRAST Subcommand (GLM: Univariate command)
POSTHOC Subcommand (GLM: Univariate command)
EMMEANS Subcommand (GLM: Univariate command)
SAVE Subcommand (GLM: Univariate command)
OUTFILE Subcommand (GLM: Univariate command)


GLM: Multivariate

GLM Multivariate,GLM Multivariate,GLM Multivariate
command syntax,command syntax,command syntax
GLM (command),GLM (command),GLM (command)
multivariate syntax,multivariate syntax,multivariate syntax
GLM (command),GLM (command),GLM (command)

GLM is available in the Advanced Statistics option.

GLM dependent varlist [BY factor list [WITH covariate list]]

[/REGWGT=varname]

[/METHOD=SSTYPE({1  })]
                {2  }
                {3**}
                {4  }

[/INTERCEPT=[INCLUDE**] [EXCLUDE]]

[/MISSING=[INCLUDE] [EXCLUDE**]]

[/CRITERIA=[EPS({1E-8**})] [ALPHA({0.05**})]
                {a     }          {a     }

[/PRINT  = [DESCRIPTIVE] [HOMOGENEITY] [PARAMETER][ETASQ] [RSSCP]
           [GEF] [LOF] [OPOWER] [TEST [([SSCP] [LMATRIX] [MMATRIX])]]

[/PLOT=[SPREADLEVEL] [RESIDUALS]
       [PROFILE (factor factor*factor factor*factor*factor ...) [WITH(covariate={value} [...])]]
                                                                                {MEAN }

[/LMATRIX={["label"] effect list effect list ...;...}]
          {["label"] effect list effect list ...    }
          {["label"] ALL list; ALL...               }
          {["label"] ALL list                       }

[/MMATRIX= {["label"] depvar value depvar value ...;["label"]...}]
           {["label"] depvar value depvar value ...             }
           {["label"] ALL list; ["label"] ...                   }
           {["label"] ALL list                                  }

[/KMATRIX= {list of numbers    }]
           {list of numbers;...}

[/SAVE=[tempvar [(list of names)]] [tempvar [(list of names)]]...]
       [DESIGN]

[/OUTFILE=[{COVB('savfile'|'dataset')}]
           {CORB('savfile'|'dataset')}
          [EFFECT('savfile'|'dataset')] [DESIGN('savfile'|'dataset')]

[/DESIGN={[INTERCEPT...]    }]
         {[effect effect...]}

** Default if the subcommand or keyword is omitted.

Temporary variables (tempvar) are:

PRED, WPRED, RESID, WRESID, DRESID, ZRESID, SRESID, SEPRED, COOK, LEVER

See GLM Algorithms for computational details for this procedure.

Syntax for GLM: Multivariate analyses can be generated from the GLM Multivariate Analysis dialog.

Example

GLM SCORE1 TO SCORE4 BY METHOD(1,3).

Related Topics

Overview (GLM: Multivariate command)
GLM Variable List (GLM: Multivariate command)
PRINT Subcommand (GLM: Multivariate command)
MMATRIX Subcommand (GLM: Multivariate command)


Overview (GLM: Multivariate command)

This section discusses the subcommands that are used in multivariate general linear models and covariance designs with several interrelated dependent variables. The discussion focuses on subcommands and keywords that do not apply—or apply in different manners—to univariate analyses. The discussion does not contain information about all subcommands that you will need to specify the design. For subcommands that are not covered here, see GLM: Univariate.

Options Collapse Hide details

Options

Optional Output. In addition to the output that is described in GLM: Univariate, you can have both multivariate and univariate F tests. Using the PRINT subcommand, you can request the hypothesis and error sums-of-squares and cross-product matrices for each effect in the design, the transformation coefficient table (M matrix), Box’s M test for equality of covariance matrices, and Bartlett’s test of sphericity.

Basic Specification Collapse Hide details

Basic Specification

• The basic specification is a variable list identifying the dependent variables, with the factors (if any) named after BY and the covariates (if any) named after WITH.

• By default, GLM uses a model that includes the intercept term, the covariates (if any), and the full factorial model, which includes all main effects and all possible interactions among factors. The intercept term is excluded if it is excluded in the model by specifying EXCLUDE on the INTERCEPT subcommand. GLM produces multivariate and univariate F tests for each effect in the model. GLM also calculates the power for each test, based on the default alpha value.

Subcommand Order Collapse Hide details

Subcommand Order

• The variable list must be specified first.

• Subcommands can be used in any order.

Syntax Rules Collapse Hide details

Syntax Rules

• The syntax rules that apply to univariate analysis also apply to multivariate analysis.

• If you enter one of the multivariate specifications in a univariate analysis, GLM ignores it.

Limitations Collapse Hide details

Limitations

• Any number of factors can be specified, but if the number of between-subjects factors plus the number of split variables exceeds 18, the Descriptive Statistics table is not printed even when you request it.

• Memory requirements depend primarily on the number of cells in the design. For the default full factorial model, this equals the product of the number of levels or categories in each factor.

Related Topics

GLM: Multivariate
GLM Variable List (GLM: Multivariate command)
PRINT Subcommand (GLM: Multivariate command)
MMATRIX Subcommand (GLM: Multivariate command)


Example

Multivariate Analysis of Variance (MANOVA)

GLM
  los cost  BY clotsolv proc
  /CONTRAST (clotsolv)=Simple(1)
  /METHOD = SSTYPE(3)
  /INTERCEPT = INCLUDE
  /PRINT = ETASQ TEST(SSCP) HOMOGENEITY
  /PLOT = SPREADLEVEL
  /CRITERIA = ALPHA(.05)
  /DESIGN = clotsolv proc clotsolv*proc .

• The procedure fits a model for the dependent variables los and cost using clotsolv and proc as factors.

• The CONTRAST subcommand specifies simple contrasts for clotsolv, using the first category as the reference category, to test differences between the categories. No contrasts are specified for proc.

• The PRINT subcommand requests tabular output for estimates of effect size, SSCP matrices, and homogeneity tests.

• The PLOT subcommand requests spread vs. level plots.

• All other options are set to their default values.

For discussion of output from this syntax and to place the example in context, see Multivariate Analysis of Variance (MANOVA) Using the GLM Multivariate Procedure .


GLM Variable List (GLM: Multivariate command)

• Multivariate GLM calculates statistical tests that are valid for analyses of dependent variables that are correlated with one another. The dependent variables must be specified first.

• The factor and covariate lists follow the same rules as in univariate analyses.

• If the dependent variables are uncorrelated, the univariate significance tests have greater statistical power.

Related Topics

GLM: Multivariate
Overview (GLM: Multivariate command)
PRINT Subcommand (GLM: Multivariate command)
MMATRIX Subcommand (GLM: Multivariate command)


PRINT Subcommand (GLM: Multivariate command)

PRINT (subcommand),PRINT (subcommand),PRINT (subcommand)
GLM command,GLM command,GLM command
GLM (command),GLM (command),GLM (command)
PRINT subcommand,PRINT subcommand,PRINT subcommand
GLM Multivariate,GLM Multivariate,GLM Multivariate
HSSCP matrices,HSSCP matrices,HSSCP matrices

By default, if no PRINT subcommand is specified, multivariate GLM produces multivariate tests (MANOVA) and univariate tests (ANOVA) for all effects in the model. All PRINT specifications that are described in GLM: Univariate are available in multivariate analyses. The following additional output can be requested:

TEST(SSCP) (keyword),TEST(SSCP) (keyword),TEST(SSCP) (keyword)
GLM command,GLM command,GLM command
sums-of-squares and cross-product matrices,sums-of-squares and cross-product matrices,sums-of-squares and cross-product matrices
GLM command,GLM command,GLM command
HSSCP matrices,HSSCP matrices,HSSCP matrices
GLM command,GLM command,GLM command
ESSCP matrices,ESSCP matrices,ESSCP matrices
GLM command,GLM command,GLM command
RSSCP matrices,RSSCP matrices,RSSCP matrices
GLM command,GLM command,GLM command
TEST(MMATRIX) (keyword),TEST(MMATRIX) (keyword),TEST(MMATRIX) (keyword)
GLM command,GLM command,GLM command
M matrix,M matrix,M matrix
GLM command,GLM command,GLM command
TEST(TRANSFORM) (keyword),TEST(TRANSFORM) (keyword),TEST(TRANSFORM) (keyword)
GLM command,GLM command,GLM command
HOMOGENEITY (keyword),HOMOGENEITY (keyword),HOMOGENEITY (keyword)
GLM command,GLM command,GLM command
Levene test,Levene test,Levene test
GLM command,GLM command,GLM command
homogeneity of variance,homogeneity of variance,homogeneity of variance
GLM command,GLM command,GLM command
RSSCP (keyword),RSSCP (keyword),RSSCP (keyword)
GLM command,GLM command,GLM command
sums-of-squares and cross-products of residuals,sums-of-squares and cross-products of residuals,sums-of-squares and cross-products of residuals
GLM command,GLM command,GLM command
residual SSCP,residual SSCP,residual SSCP
GLM command,GLM command,GLM command
residual covariance matrix,residual covariance matrix,residual covariance matrix
GLM command,GLM command,GLM command
residual correlation matrix,residual correlation matrix,residual correlation matrix
GLM command,GLM command,GLM command
TEST(SSCP) | Sums-of-squares and cross-product matrices. Hypothesis (HSSCP) and error (ESSCP) sums-of-squares and cross-product matrices for each effect in the design are displayed. Each between-subjects effect has a different HSSCP matrix, but there is a single ESSCP matrix for all between-subjects effects. For a repeated measures design, each within-subjects effect has an HSSCP matrix and an ESSCP matrix. If there are no within-subjects effects, the ESSCP matrix for the between-subjects effects is the same as the RSSCP matrix.
TEST(MMATRIX) | Set of transformation coefficients (M) matrices. Any M matrices that are generated by the MMATRIX subcommand are displayed. If no M matrix is specified on the MMATRIX subcommand, this specification is skipped, unless you are using a repeated measures design. In a repeated measures design, this set always includes the M matrix that is determined by the WSFACTOR subcommand. The specification TEST(TRANSFORM) is equivalent to TEST(MMATRIX).
HOMOGENEITY | Tests of homogeneity of variance. In addition to Levene’s test for equality of variances for each dependent variable, the display includes Box’s M test of homogeneity of the covariance matrices of the dependent variables across all level combinations of the between-subjects factors.
RSSCP | Sums-of-squares and cross-products of residuals. Three matrices are displayed:
 | Residual SSCP matrix. This matrix is a square matrix of sums of squares and cross- products of residuals. The dimension of this matrix is the same as the number of dependent variables in the model.
 | Residual covariance matrix. This matrix is the residual SSCP matrix divided by the degrees of freedom of the residual.
 | Residual correlation matrix. This matrix is the standardized form of the residual covariance matrix.

Example

GLM Y1 Y2 Y3 BY A B
 /PRINT = HOMOGENEITY RSSCP
 /DESIGN.

• Since there are three dependent variables, this model is a multivariate model.

• The keyword RSSCP produces three matrices of sums of squares and cross-products of residuals. The output also contains the result of Bartlett’s test of the sphericity of the residual covariance matrix.

• In addition to the Levene test for each dependent variable, the keyword HOMOGENEITY produces the result of Box’s M test of homogeneity in the multivariate model.

Related Topics

GLM: Multivariate
Overview (GLM: Multivariate command)
GLM Variable List (GLM: Multivariate command)
MMATRIX Subcommand (GLM: Multivariate command)


MMATRIX Subcommand (GLM: Multivariate command)

MMATRIX (subcommand),MMATRIX (subcommand),MMATRIX (subcommand)
GLM command,GLM command,GLM command
GLM (command),GLM (command),GLM (command)
MMATRIX subcommand,MMATRIX subcommand,MMATRIX subcommand
M matrix,M matrix,M matrix
in GLM Multivariate,in GLM Multivariate,in GLM Multivariate

The MMATRIX subcommand allows you to customize your hypothesis tests by specifying the M matrix (transformation coefficients matrix) in the general form of the linear hypothesis LBM = K, where K = 0 if it is not specified on the KMATRIX subcommand. The vector B is the parameter vector in the linear model.

• Specify an optional label in quotation marks. Then either list dependent variable names, each name followed by a real number, or specify the keyword ALL followed by a list of real numbers. Only variable names that appear on the dependent variable list can be specified on the MMATRIX subcommand.

• You can specify one label for each column in the M matrix.

• If you specify ALL, the length of the list that follows ALL should be equal to the number of dependent variables.

• There is no limit on the length of the label.

• For the MMATRIX subcommand to be valid, at least one of the following specifications must be made: the LMATRIX subcommand or INTERCEPT=INCLUDE. (Either of these specifications defines an L matrix.)

• If both LMATRIX and MMATRIX are specified, the L matrix is defined by the LMATRIX subcommand.

• If MMATRIX or KMATRIX is specified but LMATRIX is not specified, the L matrix is defined by the estimable function for the intercept effect, provided that the intercept effect is included in the model.

• If LMATRIX is specified but MMATRIX is not specified, the M matrix is assumed to be an r×r identity matrix, where r is the number of dependent variables.

• A semicolon (;) indicates the end of a column in the M matrix.

• Dependent variables that do not appear on a list of dependent variable names and real numbers are assigned a value of 0.

• Dependent variables that do not appear in the MMATRIX subcommand will have a row of zeros in the M matrix.

• A number can be specified as a fraction with a positive denominator (for example, 1/3 or –1/3 is valid, but 1/–3 is invalid).

• The number of columns must be greater than 0. You can specify as many columns as you need.

• If more than one MMATRIX subcommand is specified, only the last subcommand is in effect.

Example

GLM Y1 Y2 Y3 BY A B
 /MMATRIX = “Y1–Y2” Y1 1 Y2 –1; “Y1–Y3” Y1 1 Y3 –1
            “Y2–Y3” Y2 1 Y3 –1
 /DESIGN.

• In the above example, Y1, Y2, and Y3 are the dependent variables.

• The MMATRIX subcommand requests all pairwise comparisons among the dependent variables.

• Because LMATRIX was not specified, the L matrix is defined by the estimable function for the intercept effect.

Related Topics

GLM: Multivariate
Overview (GLM: Multivariate command)
GLM Variable List (GLM: Multivariate command)
PRINT Subcommand (GLM: Multivariate command)


GLM: Repeated Measures

GLM,GLM,GLM
repeated measures syntax,repeated measures syntax,repeated measures syntax

GLM is available in the Advanced Statistics option.

GLM dependent varlist [BY factor list [WITH covariate list]]

/WSFACTOR=name levels [{DEVIATION [(refcat)]       }] name...
                       {SIMPLE [(refcat)]          }
                       {DIFFERENCE                 }
                       {HELMERT                    }
                       {REPEATED                   }
                       {POLYNOMIAL [({1,2,3...})]**}
                       {             {metric  }    }
                       {SPECIAL (matrix)           }

[/MEASURE=newname newname...]

[/WSDESIGN=effect effect...]

[/REGWGT=varname]

[/METHOD=SSTYPE({1  })]
                {2  }
                {3**}
                {4  }

[/INTERCEPT=[INCLUDE**] [EXCLUDE]]

[/MISSING=[INCLUDE] [EXCLUDE**]]

[/PRINT  = [DESCRIPTIVE] [HOMOGENEITY] [PARAMETER][ETASQ] [RSSCP]
           [GEF] [LOF] [OPOWER] [TEST [([SSCP] [LMATRIX] [MMATRIX])]]

[/SAVE=[tempvar [(list of names)]] [tempvar [(list of names)]]...]
       [DESIGN]

[/EMMEANS=TABLES({OVERALL             })] [COMPARE ADJ(LSD)(BONFERRONI)(SIDAK)]
                 {factor                }
                 {factor*factor...      }
                 {wsfactor              }
                 {wsfactor*wsfactor...  }
                 {factor*...wsfactor*...]
                 {factor*factor...      }

[/DESIGN={[INTERCEPT...]    }]*
         {[effect effect...]}

* The DESIGN subcommand has the same syntax as is described in GLM: Univariate.

** Default if the subcommand or keyword is omitted.

See GLM Algorithms for computational details for this procedure.

Syntax for GLM: Repeated Measures analyses can be generated from the GLM Repeated Measures dialog box.

Example

GLM Y1 TO Y4 BY GROUP
  /WSFACTOR=YEAR 4.

Related Topics

Overview (GLM: Repeated Measures command)
Examples (GLM: Repeated Measures command)
GLM Variable List (GLM: Repeated Measures command)
WSFACTOR Subcommand (GLM: Repeated Measures command)
Contrasts for WSFACTOR (GLM: Repeated Measures command)
WSDESIGN Subcommand (GLM: Repeated Measures command)
MEASURE Subcommand (GLM: Repeated Measures command)
EMMEANS Subcommand (GLM: Repeated Measures command)


Overview (GLM: Repeated Measures command)

repeated measures analysis of variance,repeated measures analysis of variance,repeated measures analysis of variance
limitations,limitations,limitations
GLM Repeated Measures,GLM Repeated Measures,GLM Repeated Measures
repeated measures analysis of variance,repeated measures analysis of variance,repeated measures analysis of variance

This section discusses the subcommands that are used in repeated measures designs, in which the dependent variables represent measurements of the same variable (or variables) taken repeatedly. This section does not contain information on all of the subcommands that you will need to specify the design. For some subcommands or keywords not covered here, such as DESIGN, see GLM: Univariate. For information on optional output and the multivariate significance tests available, see GLM: Multivariate.

• In a simple repeated measures analysis, all dependent variables represent different measurements of the same variable for different values (or levels) of a within-subjects factor. Between-subjects factors and covariates can also be included in the model, just as in analyses not involving repeated measures.

within-subjects factors,within-subjects factors,within-subjects factors

• A within-subjects factor is simply a factor that distinguishes measurements made on the same subject or case, rather than distinguishing different subjects or cases.

• GLM permits more complex analyses, in which the dependent variables represent levels of two or more within-subjects factors.

• GLM also permits analyses in which the dependent variables represent measurements of several variables for the different levels of the within-subjects factors. These are known as doubly multivariate designs.

• A repeated measures analysis includes a within-subjects design describing the model to be tested with the within-subjects factors, as well as the usual between-subjects design describing the effects to be tested with between-subjects factors. The default for the within-subjects factors design is a full factorial model which includes the main within-subjects factor effects and all their interaction effects.

hypotheses,hypotheses,hypotheses
custom,custom,custom
transformation matrix,transformation matrix,transformation matrix
displaying,displaying,displaying

• If a custom hypothesis test is required (defined by the CONTRAST, LMATRIX, or KMATRIX subcommands), the default transformation matrix (M matrix) is taken to be the average transformation matrix, which can be displayed by using the keyword TEST(MMATRIX) on the PRINT subcommand. The default contrast result matrix (K matrix) is the zero matrix.

• If the contrast coefficient matrix (L matrix) is not specified, but a custom hypothesis test is required by the MMATRIX or the KMATRIX subcommand, the contrast coefficient matrix (L matrix) is taken to be the L matrix which corresponds to the estimable function for the intercept in the between-subjects model. This matrix can be displayed by using the keyword TEST(LMATRIX) on the PRINT subcommand.

Basic Specification Collapse Hide details

Basic Specification

• The basic specification is a variable list followed by the WSFACTOR subcommand.

• Whenever WSFACTOR is specified, GLM performs special repeated measures processing. The multivariate and univariate tests are provided. In addition, for any within-subjects effect involving more than one transformed variable, the Mauchly test of sphericity is displayed to test the assumption that the covariance matrix of the transformed variables is constant on the diagonal and zero off the diagonal. The Greenhouse-Geisser epsilon and the Huynh-Feldt epsilon are also displayed for use in correcting the significance tests in the event that the assumption of sphericity is violated.

Subcommand Order Collapse Hide details

Subcommand Order

• The list of dependent variables, factors, and covariates must be first.

Syntax Rules Collapse Hide details

Syntax Rules

• The WSFACTOR (within-subjects factors), WSDESIGN (within-subjects design), and MEASURE subcommands are used only in repeated measures analysis.

• WSFACTOR is required for any repeated measures analysis.

• If WSDESIGN is not specified, a full factorial within-subjects design consisting of all main effects and all interactions among within-subjects factors is used by default.

• The MEASURE subcommand is used for doubly multivariate designs, in which the dependent variables represent repeated measurements of more than one variable.

Limitations Collapse Hide details

Limitations

• Any number of factors can be specified, but if the number of between-subjects factors plus the number of split variables exceeds 18, the Descriptive Statistics table is not printed even when you request it.

• Maximum of 18 within-subjects factors.

• Memory requirements depend primarily on the number of cells in the design. For the default full factorial model, this equals the product of the number of levels or categories in each factor.

Related Topics

GLM: Repeated Measures
Examples (GLM: Repeated Measures command)
GLM Variable List (GLM: Repeated Measures command)
WSFACTOR Subcommand (GLM: Repeated Measures command)
Contrasts for WSFACTOR (GLM: Repeated Measures command)
WSDESIGN Subcommand (GLM: Repeated Measures command)
MEASURE Subcommand (GLM: Repeated Measures command)
EMMEANS Subcommand (GLM: Repeated Measures command)


Examples (GLM: Repeated Measures command)

Repeated Measures ANOVA

GLM Y1 TO Y4 BY GROUP
  /WSFACTOR=YEAR 4 POLYNOMIAL
  /WSDESIGN=YEAR
  /PRINT=PARAMETER
  /DESIGN=GROUP.

• WSFACTOR specifies a repeated measures analysis in which the four dependent variables represent a single variable measured at four levels of the within-subjects factor. The within-subjects factor is called YEAR for the duration of the GLM procedure.

• POLYNOMIAL requests polynomial contrasts for the levels of YEAR. Because the four variables, Y1, Y2, Y3, and Y4, in the active dataset represent the four levels of YEAR, the effect is to perform an orthonormal polynomial transformation of these variables.

• PRINT requests that the parameter estimates be displayed.

• WSDESIGN specifies a within-subjects design that includes only the effect of the YEAR within-subjects factor. Because YEAR is the only within-subjects factor specified, this is the default design, and WSDESIGN could have been omitted.

• DESIGN specifies a between-subjects design that includes only the effect of the GROUP between-subjects factor. This subcommand could have been omitted.

Repeated Measures ANOVA, Unbalanced Design with Missing Cells

GLM
  sales.1 sales.2 sales.3 sales.4 BY promo marketid
  /WSFACTOR = week 4
  /MEASURE = sales
  /METHOD = SSTYPE(4)
  /PRINT = ETASQ TEST(SSCP) PARAMETER RSSCP HOMOGENEITY
  /PLOT = PROFILE ( week*promo )
  /PLOT = PROFILE ( week*marketid )
  /CRITERIA = ALPHA(.05)
  /WSDESIGN = week
  /DESIGN = promo marketid promo*marketid.

• The procedure fits a model to the dependent variables sales.1 through sales.4 using promo and marketid as factors.

• WSFACTOR specifies a repeated measures analysis in which the four dependent variables represent a single variable measured at four levels of the within-subjects factor. The within-subjects factor is called week for the duration of the GLM procedure.

• METHOD specifies the Type IV method for partitioning sums of squares. This is recommended because the cell frequencies for the layout of Market ID and Promotion * Market ID are unbalanced and Promotion * Market ID has empty cells.

• PRINT requests that the estimates of effect size, SSCP matrices, and homogeneity tests be displayed.

• The first PLOT subcommand requests profile plots for week*promo, which will result in a single plot for each dependent variable. Each plot will feature the levels of week on the x-axis and the estimated marginal means for the levels of week on the y-axis. A separate line is produced for each level of promo.

• The first PLOT subcommand requests profile plots for week*marketid, which will result in a single plot for each dependent variable. Each plot will feature the levels of week on the x-axis and the estimated marginal means for the levels of week on the y-axis. A separate line is produced for each level of marketid.

• All other options are set to their default values.

For discussion of output from this syntax and to place the example in context, see A Repeated Measures Analysis of Variance.

Doubly Multivariate ANOVA

GLM
  tg0 tg1 tg2 tg3 tg4 wgt0 wgt1 wgt2 wgt3 wgt4 BY gender
  /WSFACTOR = time 5 Repeated
  /MEASURE = tg wgt
  /METHOD = SSTYPE(3)
  /PLOT = PROFILE( time*gender )
  /EMMEANS = TABLES(gender*time)
  /PRINT = ETASQ TEST(SSCP)
  /CRITERIA = ALPHA(.05)
  /WSDESIGN = time
  /DESIGN = gender .

• The procedure fits a model to the dependent variables tg0 through wgt4 using gender as a factor.

• WSFACTOR and MEASURE specify a repeated measures analysis in which the ten dependent variables represent two variables measured at five levels of the within-subjects factor. The within-subjects factor is called time and the measures are called tg and wgt for the duration of the GLM procedure. Repeated contrasts are specified for the within-subjects factor.

• PLOT requests profile plots for time*gender, which will result in a single plot for each measure. Each plot will feature the levels of week on the x-axis and the estimated marginal means for the measure at the levels of week on the y-axis. A separate line is produced for each level of gender.

• EMMEANS requests estimated marginal means for gender*time, which will results in a tabular representation of the profile plots.

• PRINT requests that the estimates of effect size and SSCP matrices be displayed.

• All other options are set to their default values.

For discussion of output from this syntax and to place the example in context, see A Doubly Multivariate Analysis of Variance.

Related Topics

GLM: Repeated Measures
Overview (GLM: Repeated Measures command)
GLM Variable List (GLM: Repeated Measures command)
WSFACTOR Subcommand (GLM: Repeated Measures command)
Contrasts for WSFACTOR (GLM: Repeated Measures command)
WSDESIGN Subcommand (GLM: Repeated Measures command)
MEASURE Subcommand (GLM: Repeated Measures command)
EMMEANS Subcommand (GLM: Repeated Measures command)


GLM Variable List (GLM: Repeated Measures command)

The list of dependent variables, factors, and covariates must be specified first.

• WSFACTOR determines how the dependent variables on the GLM variable list will be interpreted.

• The number of dependent variables on the GLM variable list must be a multiple of the number of cells in the within-subjects design. If there are six cells in the within-subjects design, each group of six dependent variables represents a single within-subjects variable that has been measured in each of the six cells.

• Normally, the number of dependent variables should equal the number of cells in the within-subjects design multiplied by the number of variables named on the MEASURE subcommand (if one is used). If you have more groups of dependent variables than are accounted for by the MEASURE subcommand, GLM will choose variable names to label the output, which may be difficult to interpret.

• Covariates are specified after keyword WITH. You can specify constant covariates. Constant covariates represent variables whose values remain the same at each within-subjects level.

Example

GLM MATH1 TO MATH4 BY METHOD WITH SES
  /WSFACTOR=SEMESTER 4.

• The four dependent variables represent a score measured four times (corresponding to the four levels of SEMESTER).

• SES is a constant covariate. Its value does not change over the time covered by the four levels of SEMESTER.

• Default contrast (POLYNOMIAL) is used.

Related Topics

GLM: Repeated Measures
Overview (GLM: Repeated Measures command)
Examples (GLM: Repeated Measures command)
WSFACTOR Subcommand (GLM: Repeated Measures command)
Contrasts for WSFACTOR (GLM: Repeated Measures command)
WSDESIGN Subcommand (GLM: Repeated Measures command)
MEASURE Subcommand (GLM: Repeated Measures command)
EMMEANS Subcommand (GLM: Repeated Measures command)


WSFACTOR Subcommand (GLM: Repeated Measures command)

WSFACTOR (subcommand),WSFACTOR (subcommand),WSFACTOR (subcommand)
GLM command,GLM command,GLM command
GLM (command),GLM (command),GLM (command)
WSFACTOR subcommand,WSFACTOR subcommand,WSFACTOR subcommand

WSFACTOR names the within-subjects factors, specifies the number of levels for each, and specifies the contrast for each.

• Presence of the WSFACTOR subcommand implies that the repeated measures model is being used.

Mauchly's test of sphericity,Mauchly's test of sphericity,Mauchly's test of sphericity

• Mauchly’s test of sphericity is automatically performed when WSFACTOR is specified.

contrasts,contrasts,contrasts
within-subjects factor,within-subjects factor,within-subjects factor

• Names and number levels for the within-subjects factors are specified on the WSFACTOR subcommand. Factor names must not duplicate any of the dependent variables, factors, or covariates named on the GLM variable list. A type of contrast can also be specified for each within-subjects factor in order to perform comparisons among its levels. This contrast amounts to a transformation on the dependent variables.

• If there are more than one within-subjects factors, they must be named in the order corresponding to the order of the dependent variables on the GLM variable list. GLM varies the levels of the last-named within-subjects factor most rapidly when assigning dependent variables to within-subjects cells (see the example below).

• The number of cells in the within-subjects design is the product of the number of levels for all within-subjects factors.

• Levels of the factors must be represented in the data by the dependent variables named on the GLM variable list.

levels,levels,levels
within-subjects factors,within-subjects factors,within-subjects factors

• The number of levels of each factor must be at least two. Enter an integer equal to or greater than 2 after each factor to indicate how many levels the factor has. Optionally, you can enclose the number of levels in parentheses.

• Enter only the number of levels for within-subjects factors, not a range of values.

• If more than one WSFACTOR subcommand is specified, only the last one is in effect.

Related Topics

GLM: Repeated Measures
Overview (GLM: Repeated Measures command)
Examples (GLM: Repeated Measures command)
GLM Variable List (GLM: Repeated Measures command)
Contrasts for WSFACTOR (GLM: Repeated Measures command)
WSDESIGN Subcommand (GLM: Repeated Measures command)
MEASURE Subcommand (GLM: Repeated Measures command)
EMMEANS Subcommand (GLM: Repeated Measures command)


Contrasts for WSFACTOR (GLM: Repeated Measures command)

contrasts,contrasts,contrasts
WSFACTOR,WSFACTOR,WSFACTOR

The levels of a within-subjects factor are represented by different dependent variables. Therefore, contrasts between levels of such a factor compare these dependent variables. Specifying the type of contrast amounts to specifying a transformation to be performed on the dependent variables.

• In testing the within-subjects effects, an orthonormal transformation is automatically performed on the dependent variables in a repeated measures analysis.

• The contrast for each within-subjects factor is entered after the number of levels. If no contrast keyword is specified, POLYNOMIAL(1,2,3...) is the default. This contrast is used in comparing the levels of the within-subjects factors. Intrinsically orthogonal contrast types are recommended for within-subjects factors if you wish to examine each degree-of-freedom test, provided compound symmetry is assumed within each within-subjects factor. Other orthogonal contrast types are DIFFERENCE and HELMERT.

transformation matrix,transformation matrix,transformation matrix
M matrix,M matrix,M matrix
displaying,displaying,displaying
Kronecker product,Kronecker product,Kronecker product

• If there are more than one within-subjects factors, the transformation matrix (M matrix) is computed as the Kronecker product of the matrices generated by the contrasts specified.

• The transformation matrix (M matrix) generated by the specified contrasts can be displayed by using the keyword TEST(MMATRIX) on the subcommand PRINT.

• The contrast types available for within-subjects factors are the same as those on the CONTRAST subcommand for between-subjects factors, described in CONTRAST Subcommand (GLM: Univariate command) in GLM: Univariate.

The following contrast types are available:

DEVIATION (keyword),DEVIATION (keyword),DEVIATION (keyword)
GLM command,GLM command,GLM command
deviations from the mean,deviations from the mean,deviations from the mean
repeated measures,repeated measures,repeated measures
POLYNOMIAL (keyword),POLYNOMIAL (keyword),POLYNOMIAL (keyword)
GLM command,GLM command,GLM command
polynomial contrasts,polynomial contrasts,polynomial contrasts
repeated measures,repeated measures,repeated measures
contrasts,contrasts,contrasts
polynomial,polynomial,polynomial
DIFFERENCE (keyword),DIFFERENCE (keyword),DIFFERENCE (keyword)
GLM command,GLM command,GLM command
difference contrasts,difference contrasts,difference contrasts
repeated measures,repeated measures,repeated measures
contrasts,contrasts,contrasts
difference,difference,difference
Helmert contrasts,Helmert contrasts,Helmert contrasts
reverse,reverse,reverse
HELMERT (keyword),HELMERT (keyword),HELMERT (keyword)
GLM command,GLM command,GLM command
Helmert contrasts,Helmert contrasts,Helmert contrasts
contrasts,contrasts,contrasts
Helmert,Helmert,Helmert
SIMPLE (keyword),SIMPLE (keyword),SIMPLE (keyword)
GLM command,GLM command,GLM command
simple contrasts,simple contrasts,simple contrasts
repeated measures,repeated measures,repeated measures
contrasts,contrasts,contrasts
simple,simple,simple
REPEATED (keyword),REPEATED (keyword),REPEATED (keyword)
GLM command,GLM command,GLM command
repeated contrasts,repeated contrasts,repeated contrasts
repeated measures,repeated measures,repeated measures
contrasts,contrasts,contrasts
repeated,repeated,repeated
SPECIAL (keyword),SPECIAL (keyword),SPECIAL (keyword)
GLM command,GLM command,GLM command
special contrasts,special contrasts,special contrasts
repeated measures,repeated measures,repeated measures
contrasts,contrasts,contrasts
special,special,special
DEVIATION | Deviations from the grand mean. This is the default for between-subjects factors. Each level of the factor except one is compared to the grand mean. One category (by default the last) must be omitted so that the effects will be independent of one another. To omit a category other than the last, specify the number of the omitted category in parentheses after the keyword DEVIATION. For example,
GLM Y1 Y2 Y3 BY GROUP /WSFACTOR = Y 3 DEVIATION (1)
Deviation contrasts are not orthogonal.
POLYNOMIAL | Polynomial contrasts. This is the default for within-subjects factors. The first degree of freedom contains the linear effect across the levels of the factor, the second contains the quadratic effect, and so on. In a balanced design, polynomial contrasts are orthogonal. By default, the levels are assumed to be equally spaced; you can specify unequal spacing by entering a metric consisting of one integer for each level of the factor in parentheses after the keyword POLYNOMIAL. (All metrics specified cannot be equal; thus (1,1,...,1) is not valid.) For example,
/WSFACTOR=D 3 POLYNOMIAL(1,2,4).
Suppose that factor D has three levels. The specified contrast indicates that the three levels of D are actually in the proportion 1:2:4. The default metric is always (1,2,...,k), where k levels are involved. Only the relative differences between the terms of the metric matter (1,2,4) is the same metric as (2,3,5) or (20,30,50) because, in each instance, the difference between the second and third numbers is twice the difference between the first and second.
DIFFERENCE | Difference or reverse Helmert contrasts. Each level of the factor except the first is compared to the mean of the previous levels. In a balanced design, difference contrasts are orthogonal.
HELMERT | Helmert contrasts. Each level of the factor except the last is compared to the mean of subsequent levels. In a balanced design, Helmert contrasts are orthogonal.
SIMPLE | Each level of the factor except the last is compared to the last level. To use a category other than the last as the omitted reference category, specify its number in parentheses following keyword SIMPLE. For example,
/WSFACTOR=B 3 SIMPLE (1).
Simple contrasts are not orthogonal.
REPEATED | Comparison of adjacent levels. Each level of the factor except the last is compared to the next level. Repeated contrasts are not orthogonal.
SPECIAL | A user-defined contrast. Values specified after this keyword are stored in a matrix in column major order. For example, if factor A has three levels, then WSFACTOR(A)=SPECIAL(1 1 1 1 -1 0 0 1 -1) produces the following contrast matrix:
1   1   0
1  –1   1
1   0   –1

Example

GLM X1Y1 X1Y2 X2Y1 X2Y2 X3Y1 X3Y2 BY TREATMNT GROUP
  /WSFACTOR=X 3 Y 2
  /DESIGN.

• The GLM variable list names six dependent variables and two between-subjects factors, TREATMNT and GROUP.

• WSFACTOR identifies two within-subjects factors whose levels distinguish the six dependent variables. X has three levels, and Y has two. Thus, there are 3 × 2 = 6 cells in the within-subjects design, corresponding to the six dependent variables.

• Variable X1Y1 corresponds to levels 1,1 of the two within-subjects factors; variable X1Y2 corresponds to levels 1,2; X2Y1 to levels 2,1; and so on up to X3Y2, which corresponds to levels 3,2. The first within-subjects factor named, X, varies most slowly, and the last within-subjects factor named, Y, varies most rapidly on the list of dependent variables.

• Because there is no WSDESIGN subcommand, the within-subjects design will include all main effects and interactions: X, Y, and X by Y.

• Likewise, the between-subjects design includes all main effects and interactions (TREATMNT, GROUP, and TREATMNT by GROUP) plus the intercept.

• In addition, a repeated measures analysis always includes interactions between the within-subjects factors and the between-subjects factors. There are three such interactions for each of the three within-subjects effects.

Example

GLM SCORE1 SCORE2 SCORE3 BY GROUP
  /WSFACTOR=ROUND 3 DIFFERENCE
  /CONTRAST(GROUP)=DEVIATION
  /PRINT=PARAMETER TEST(LMATRIX).

• This analysis has one between-subjects factor, GROUP, and one within-subjects factor, ROUND, with three levels that are represented by the three dependent variables.

• The WSFACTOR subcommand also specifies difference contrasts for ROUND, the within-subjects factor.

• There is no WSDESIGN subcommand, so a default full factorial within-subjects design is assumed. This could also have been specified as WSDESIGN=ROUND, or simply WSDESIGN.

• The CONTRAST subcommand specifies deviation contrasts for GROUP, the between-subjects factor. This subcommand could have been omitted because deviation contrasts are the default.

• PRINT requests the display of the parameter estimates for the model and the L matrix.

• There is no DESIGN subcommand, so a default full factorial between-subjects design is assumed. This could also have been specified as DESIGN=GROUP, or simply DESIGN.

Related Topics

GLM: Repeated Measures
Overview (GLM: Repeated Measures command)
Examples (GLM: Repeated Measures command)
GLM Variable List (GLM: Repeated Measures command)
WSFACTOR Subcommand (GLM: Repeated Measures command)
WSDESIGN Subcommand (GLM: Repeated Measures command)
MEASURE Subcommand (GLM: Repeated Measures command)
EMMEANS Subcommand (GLM: Repeated Measures command)


WSDESIGN Subcommand (GLM: Repeated Measures command)

WSDESIGN (subcommand),WSDESIGN (subcommand),WSDESIGN (subcommand)
GLM command,GLM command,GLM command
GLM (command),GLM (command),GLM (command)
WSDESIGN subcommand,WSDESIGN subcommand,WSDESIGN subcommand
within-subjects model,within-subjects model,within-subjects model

WSDESIGN specifies the design for within-subjects factors. Its specifications are like those of the DESIGN subcommand, but it uses the within-subjects factors rather than the between-subjects factors.

• The default WSDESIGN is a full factorial design, which includes all main effects and all interactions for within-subjects factors. The default is in effect whenever a design is processed without a preceding WSDESIGN or when the preceding WSDESIGN subcommand has no specifications.

• A WSDESIGN specification cannot include between-subjects factors or terms based on them, nor does it accept interval-level variables.

• The keyword INTERCEPT is not allowed on WSDESIGN.

• Nested effects are not allowed. Therefore, the symbols ( ) are not allowed here.

• If more than one WSDESIGN subcommand is specified, only the last one is in effect.

Example

GLM JANLO,JANHI,FEBLO,FEBHI,MARLO,MARHI BY SEX
  /WSFACTOR MONTH 3 STIMULUS 2
  /WSDESIGN MONTH, STIMULUS
  /DESIGN SEX.

• There are six dependent variables, corresponding to three months and two different levels of stimulus.

• The dependent variables are named on the GLM variable list in an order such that the level of stimulus varies more rapidly than the month. Thus, STIMULUS is named last on the WSFACTOR subcommand.

• The WSDESIGN subcommand specifies only the main effects for within-subjects factors. There is no MONTH-by-STIMULUS interaction term.

Related Topics

GLM: Repeated Measures
Overview (GLM: Repeated Measures command)
Examples (GLM: Repeated Measures command)
GLM Variable List (GLM: Repeated Measures command)
WSFACTOR Subcommand (GLM: Repeated Measures command)
Contrasts for WSFACTOR (GLM: Repeated Measures command)
MEASURE Subcommand (GLM: Repeated Measures command)
EMMEANS Subcommand (GLM: Repeated Measures command)


MEASURE Subcommand (GLM: Repeated Measures command)

MEASURE (subcommand),MEASURE (subcommand),MEASURE (subcommand)
GLM command,GLM command,GLM command
GLM (command),GLM (command),GLM (command)
MEASURE subcommand,MEASURE subcommand,MEASURE subcommand
doubly multivariate repeated measures,doubly multivariate repeated measures,doubly multivariate repeated measures
analysis,analysis,analysis

In a doubly multivariate analysis, the dependent variables represent multiple variables measured under the different levels of the within-subjects factors. Use MEASURE to assign names to the variables that you have measured for the different levels of within-subjects factors.

• Specify a list of one or more variable names to be used in labeling the averaged results. If no within-subjects factor has more than two levels, MEASURE has no effect. You can use up to 255 bytes for each name.

• The number of dependent variables in the dependent variables list should equal the product of the number of cells in the within-subjects design and the number of names on MEASURE.

• If you do not enter a MEASURE subcommand and there are more dependent variables than cells in the within-subjects design, GLM assigns names (normally MEASURE_1, MEASURE_2, and so on) to the different measures.

• All of the dependent variables corresponding to each measure should be listed together and ordered so that the within-subjects factor named last on the WSFACTORS subcommand varies most rapidly.

Example

GLM TEMP11 TEMP12 TEMP21 TEMP22 TEMP31 TEMP32,
        WEIGHT11 WEIGHT12 WEIGHT21 WEIGHT22 WEIGHT31 WEIGHT32 BY GROUP
  /WSFACTOR=DAY 3 AMPM 2
  /MEASURE=TEMP WEIGHT
  /WSDESIGN=DAY, AMPM, DAY BY AMPM
  /DESIGN.

• There are 12 dependent variables: six temperatures and six weights, corresponding to morning and afternoon measurements on three days.

• WSFACTOR identifies the two factors (DAY and AMPM) that distinguish the temperature and weight measurements for each subject. These factors define six within-subjects cells.

• MEASURE indicates that the first group of six dependent variables correspond to TEMP and the second group of six dependent variables correspond to WEIGHT.

• These labels, TEMP and WEIGHT, are used on the output as the measure labels.

• WSDESIGN requests a full factorial within-subjects model. Because this is the default, WSDESIGN could have been omitted.

Related Topics

GLM: Repeated Measures
Overview (GLM: Repeated Measures command)
Examples (GLM: Repeated Measures command)
GLM Variable List (GLM: Repeated Measures command)
WSFACTOR Subcommand (GLM: Repeated Measures command)
Contrasts for WSFACTOR (GLM: Repeated Measures command)
WSDESIGN Subcommand (GLM: Repeated Measures command)
EMMEANS Subcommand (GLM: Repeated Measures command)


EMMEANS Subcommand (GLM: Repeated Measures command)

EMMEANS (subcommand),EMMEANS (subcommand),EMMEANS (subcommand)
GLM command,GLM command,GLM command
GLM (command),GLM (command),GLM (command)
EMMEANS subcommand,EMMEANS subcommand,EMMEANS subcommand
estimated marginal means,estimated marginal means,estimated marginal means
repeated measures,repeated measures,repeated measures

EMMEANS displays estimated marginal means of the dependent variables in the cells, adjusted for the effects of covariates at their overall means, for the specified factors. Note that these are predicted, not observed, means. The standard errors are also displayed. See the topic EMMEANS Subcommand (GLM: Univariate command) for more information.

• For the TABLES and COMPARE keywords, valid options include the within-subjects factors specified in the WSFACTOR subcommand, crossings among them, and crossings among factors specified in the factor list and factors specified on the WSFACTOR subcommand.

• All factors in a crossed-factors specification must be unique.

• If a between- or within-subjects factor, or a crossing of between- or within-subjects factors, is specified on the TABLES keyword, then GLM will collapse over any other between- or within-subjects factors before computing the estimated marginal means for the dependent variables.

Related Topics

GLM: Repeated Measures
Overview (GLM: Repeated Measures command)
Examples (GLM: Repeated Measures command)
GLM Variable List (GLM: Repeated Measures command)
WSFACTOR Subcommand (GLM: Repeated Measures command)
Contrasts for WSFACTOR (GLM: Repeated Measures command)
WSDESIGN Subcommand (GLM: Repeated Measures command)
MEASURE Subcommand (GLM: Repeated Measures command)


GRAPH

GRAPH (command),GRAPH (command),GRAPH (command)
GRAPH (command),GRAPH (command),GRAPH (command)
syntax chart,syntax chart,syntax chart
release history,release history,release history
charts,charts,charts

GRAPH is available in the Statistics Base option.

GRAPH

  [/TITLE='line 1' ['line 2']]
  [/SUBTITLE='line 1']
  [/FOOTNOTE='line 1' ['line 2']]

  {/BAR [{(SIMPLE)       }]=function/variable specification†       }
         {(GROUPED)      }
         {(STACKED)      }
         {(RANGE)        }

  {/LINE [{(SIMPLE)    }]=function/variable specification†         }
          {(MULTIPLE)  }
          {(DROP)      }
          {(AREA)      }
          {(DIFFERENCE)}

  {/PIE                                                            }

  {/PARETO[{(CUM)  }][{(SIMPLE) }]=function/variable specification†}
           {(NOCUM)}  {(STACKED)}

  {/HILO[{(SIMPLE) }]=function/variable specification††            }
         {(GROUPED)}

  {/HISTOGRAM[(NORMAL)]=var                                       }

  {/SCATTERPLOT[{(BIVARIATE)}]=variable specification†††           }
                {(OVERLAY)  }
                {(MATRIX)   }
                {(XYZ)      }

  {/ERRORBAR[{(CI[{95}])     }]={var [var var ...][BY var]}        }
                  {n }          {var BY var BY var        }
             {(STERRIR[{12}])}
                       {n }
             {(STDDEV[{2}])  }
                      {n}

  [/PANEL COLVAR=varlist COLOP={CROSS**} ROWVAR=varlist ROWOP={CROSS**}]
                               {NEST   }                      {NEST   }

  [/INTERVAL {CI     {(95)}}]
                     {(n) }
             {STDDEV {(2) }}
                     {(n) }
             {SE     {(2) }}
                     {(n) }

  [/TEMPLATE=file]

  [/MISSING=[{LISTWISE**}][{NOREPORT**}][{EXCLUDE**}]]
             {VARIABLE  }] {REPORT    }  {INCLUDE  }

** Default if the subcommand is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

Release History Collapse Hide details

Release History

Release 13.0

• PANEL subcommand introduced.

• INTERVAL subcommand introduced.

The following table shows all possible function/variable specifications for BAR, LINE, PIE, BLOCK, and PARETO subcommands. For special restrictions, see the individual subcommands. In the table, valuef refers to the value function, countf refers to the count functions, and sumf refers to the summary functions.

 | Simple bar, simple or area line, pie, simple high-low, and simple Pareto charts | Grouped or stacked bar, multiple, drop or difference area, and stacked Pareto charts
Categorical charts | [countf BY] var | [countf BY] var BY var
 | sumf(var) BY var | sumf(var) BY var BY var
 | sumf(varlist) | sumf(varlist) BY var
 | sumf(var) sumf(var)... | sumf(var) sumf(var)... BY var
Noncategorical charts | valuef(var) [BY var] | valuef(varlist) [BY var]

The following table shows all possible function/variable specifications for the HILO subcommand. Categorical variables for simple high-low-close charts must be dichotomous or trichotomous.

Simple range bar and simple high-low-close charts | Clustered range bar and clustered high-low-close charts
[countf BY] var | (sumf(var) sumf(var) [sumf(var)]) (...) ...BY var
sumf(var) sumf(var) sumf(var) BY var | sumf(var) sumf(var) [sumf(var)] BY var BY var
sumf(var) BY var BY var |
valuef(varlist) [BY var] | valuef(varlist) (...) ... [BY var]

Variable specification is required on all types of scatterplots. The following table shows all possible specifications:

BIVARIATE | var WITH var [BY var] [BY var ({NAME })] {IDENTIFY}
OVERLAY | varlist WITH varlist [(PAIR)] [BY var ({NAME })] {IDENTIFY}
MATRIX | varlist [BY var] [BY var ({NAME })] {IDENTIFY}
XYZ | var WITH var WITH var [BY var] [BY var ({NAME })] {IDENTIFY}

Value function:

The VALUE function yields the value of the specified variable for each case. It always produces one bar, point, or slice for each case. The VALUE(X) specification implies the value of X by n, where n is the number of each case. You can specify multiple variables, as in:

GRAPH /BAR = VALUE(SALARY BONUS BENEFIT).

This command draws a bar chart with the values of SALARY, BONUS, and BENEFIT for each employee (case). A BY variable can be used to supply case labels, but it does not affect the layout of the chart, even if values of the BY variable are the same for multiple cases.

Aggregation functions:

Two groups of aggregation functions are available: count functions and summary functions.

charts,charts,charts
count functions,count functions,count functions
GRAPH (command),GRAPH (command),GRAPH (command)
count functions,count functions,count functions

Count functions:

COUNT (function),COUNT (function),COUNT (function)
GRAPH command,GRAPH command,GRAPH command
PCT (function),PCT (function),PCT (function)
GRAPH command,GRAPH command,GRAPH command
CUPCT (function),CUPCT (function),CUPCT (function)
GRAPH command,GRAPH command,GRAPH command
CUFREQ (function),CUFREQ (function),CUFREQ (function)
GRAPH command,GRAPH command,GRAPH command
COUNT | Frequency of cases in each category.
PCT | Frequency of cases in each category expressed as a percentage of the whole.
CUPCT | Cumulative percentage sorted by category value.
CUFREQ | Cumulative frequency sorted by category value.

• Count functions yield the count or percentage of valid cases within categories determined by one or more BY variables, as in:

GRAPH /BAR (SIMPLE) = PCT BY REGION.

• Count functions do not have any arguments.

• You can omit the keyword COUNT and the subsequent keyword BY and specify just a variable, as in

GRAPH /BAR = DEPT.

This command is interpreted as

GRAPH /BAR = COUNT BY DEPT.
charts,charts,charts
summary functions,summary functions,summary functions
summary functions,summary functions,summary functions
GRAPH command,GRAPH command,GRAPH command
GRAPH (command),GRAPH (command),GRAPH (command)
summary functions,summary functions,summary functions

Summary functions:

MINIMUM (function),MINIMUM (function),MINIMUM (function)
GRAPH command,GRAPH command,GRAPH command
MAXIMUM (function),MAXIMUM (function),MAXIMUM (function)
GRAPH command,GRAPH command,GRAPH command
N (function),N (function),N (function)
GRAPH command,GRAPH command,GRAPH command
SUM (function),SUM (function),SUM (function)
GRAPH command,GRAPH command,GRAPH command
CUSUM (function),CUSUM (function),CUSUM (function)
GRAPH command,GRAPH command,GRAPH command
MEAN (function),MEAN (function),MEAN (function)
GRAPH command,GRAPH command,GRAPH command
STDDEV (function),STDDEV (function),STDDEV (function)
GRAPH command,GRAPH command,GRAPH command
VARIANCE (function),VARIANCE (function),VARIANCE (function)
GRAPH command,GRAPH command,GRAPH command
MEDIAN (function),MEDIAN (function),MEDIAN (function)
GRAPH command,GRAPH command,GRAPH command
MODE (function),MODE (function),MODE (function)
GRAPH command,GRAPH command,GRAPH command
PTILE (function),PTILE (function),PTILE (function)
GRAPH command,GRAPH command,GRAPH command
PLT (function),PLT (function),PLT (function)
GRAPH command,GRAPH command,GRAPH command
PGT (function),PGT (function),PGT (function)
GRAPH command,GRAPH command,GRAPH command
NLT (function),NLT (function),NLT (function)
GRAPH command,GRAPH command,GRAPH command
NGT (function),NGT (function),NGT (function)
GRAPH command,GRAPH command,GRAPH command
PIN (function),PIN (function),PIN (function)
GRAPH command,GRAPH command,GRAPH command
NIN (function),NIN (function),NIN (function)
GRAPH command,GRAPH command,GRAPH command
MINIMUM | Minimum value of the variable.
MAXIMUM | Maximum value of the variable.
N | Number of cases for which the variable has a nonmissing value.
SUM | Sum of the values of the variable.
CUSUM | Sum of the summary variable accumulated across values of the category variable.
MEAN | Mean.
STDDEV | Standard deviation.
VARIANCE | Variance.
MEDIAN | Median.
GMEDIAN | Group median.
MODE | Mode.
PTILE(x) | Xth percentile value of the variable. X must be greater than 0 and less than 100.
PLT(x) | Percentage of cases for which the value of the variable is less than x.
PGT(x) | Percentage of cases for which the value of the variable is greater than x.
NLT(x) | Number of cases for which the value of the variable is less than x.
NGT(x) | Number of cases for which the value of the variable is greater than x.
PIN(x1,x2) | Percentage of cases for which the value of the variable is greater than or equal to x1 and less than or equal to x2. x1 cannot exceed x2.
NIN(x1,x2) | Number of cases for which the value of the variable is greater than or equal to x1 and less than or equal to x2. x1 cannot exceed x2.

• Summary functions are usually used with summary variables (variables that record continuous values, such as age or expenses). To use a summary function, specify the name of one or more variables in parentheses after the name of the function, as in:

GRAPH /BAR = SUM(SALARY) BY DEPT.

• You can specify multiple summary functions for more chart types. For example, the same function can be applied to a list of variables, as in:

GRAPH /BAR = SUM(SALARY BONUS BENEFIT) BY DEPT.

This syntax is equivalent to:

GRAPH /BAR = SUM(SALARY) SUM(BONUS) SUM(BENEFIT) BY DEPT.

Different functions can be applied to the same variable, as in:

GRAPH /BAR = MEAN(SALARY) MEDIAN(SALARY) BY DEPT.

Different functions and variables can be combined, as in:

GRAPH /BAR = MIN(SALARY81) MAX(SALARY81)
                  MIN(SALARY82) MAX(SALARY82) BY JOBCAT.

The effect of multiple summary functions on the structure of the charts is illustrated under the discussion of specific chart types.

Related Topics

Overview (GRAPH command)
Examples (GRAPH command)
TITLE, SUBTITLE, and FOOTNOTE Subcommands (GRAPH command)
BAR Subcommand (GRAPH command)
LINE Subcommand (GRAPH command)
PIE Subcommand (GRAPH command)
HILO Subcommand (GRAPH command)
ERRORBAR Subcommand (GRAPH command)
SCATTERPLOT Subcommand (GRAPH command)
HISTOGRAM Subcommand (GRAPH command)
PARETO Subcommand (GRAPH command)
PANEL Subcommand (GRAPH command)
COLVAR and ROWVAR Keywords (GRAPH command)
COLOP and ROWOP Keywords (GRAPH command)
INTERVAL Subcommand (GRAPH command)
CI Keyword (GRAPH command)
STDDEV Keyword (GRAPH command)
SE Keyword (GRAPH command)
TEMPLATE Subcommand (GRAPH command)
Elements and Attributes Independent of Chart Types or Data (GRAPH command)
Elements and Attributes Dependent on Chart Type (GRAPH command)
Elements and Attributes Dependent on Data (GRAPH command)
MISSING Subcommand (GRAPH command)
Histograms
Scatterplots
Simple Scatterplots
Overlay Scatterplots
Scatterplot Matrix
3-D Scatterplots
Error Bar Charts
Simple Error Bar Summaries for Groups of Cases
Simple Error Bar Summaries of Separate Variables
Clustered Error Bar Summaries for Groups of Cases
Clustered Error Bar Summaries of Separate Variables
Pareto Charts
Simple Pareto Counts or Sums for Groups of Cases
Simple Pareto Sums of Separate Variables
Simple Pareto Values of Individual Cases
Stacked Pareto Counts or Sums for Groups of Cases
Stacked Pareto Sums of Separate Variables
Stacked Pareto Values of Individual Cases
High-Low Charts
Simple High-Low-Close Summaries for Groups of Cases
Simple High-Low-Close Summaries of Separate Variables
Simple High-Low-Close Values of Individual Cases
Clustered High-Low-Close Summaries for Groups of Cases
Clustered High-Low-Close Summaries of Separate Variables
Clustered High-Low-Close Values of Individual Cases
Simple Range Bar Summaries for Groups of Cases
Simple Range Bar Summaries of Separate Variables
Simple Range Bar Values of Individual Cases
Clustered Range Bar Summaries for Groups of Cases
Clustered Range Bar Summaries of Separate Variables
Clustered Range Bar Values of Individual Cases
Difference Area Summaries for Groups of Cases
Difference Area Summaries of Separate Variables
Difference Area Values of Individual Cases
Pie Charts
Pie Summaries for Groups of Cases
Pie Summaries of Separate Variables
Pie Values of Individual Cases
Area Charts
Simple Area Summaries for Groups of Cases
Simple Area Summaries of Separate Variables
Simple Area Values of Individual Cases
Stacked Area Summaries for Groups of Cases
Stacked Area Summaries of Separate Variables
Stacked Area Values of Individual Cases
Line Charts
Simple Line Summaries for Groups of Cases
Simple Line Summaries of Separate Variables
Simple Line Values of Individual Cases
Multiple Line Summaries for Groups of Cases
Multiple Line Summaries of Separate Variables
Multiple Line Values of Individual Cases
Drop-Line Summaries for Groups of Cases
Drop-Line Summaries of Separate Variables
Drop-Line Values of Individual Cases
Bar Charts
Simple Bar Summaries for Groups of Cases
Simple Bar Summaries of Separate Variables
Simple Bar Values of Individual Cases
Clustered Bar Summaries for Groups of Cases
Clustered Bar Summaries of Separate Variables
Clustered Bar Values of Individual Cases
Stacked Bar Summaries for Groups of Cases
Stacked Bar Summaries of Separate Variables
Stacked Bar Values of Individual Cases


Overview (GRAPH command)

GRAPH generates a high-resolution chart by computing statistics from variables in the active dataset and constructing the chart according to your specification. The chart can be a bar chart, pie chart, line chart, error bar chart, high-low-close histogram, scatterplot, or Pareto chart. The chart is displayed where high-resolution display is available and can be edited with a chart editor and saved as a chart file.

Options Collapse Hide details

Options

Titles and Footnotes. You can specify a title, subtitle, and footnote for the chart using the TITLE, SUBTITLE, and FOOTNOTE subcommands.

Chart Type. You can request a specific type of chart using the BAR, LINE, PIE, ERRORBAR, HILO, HISTOGRAM, SCATTERPLOT, or PARETO subcommand.

Chart Content. You can specify an aggregated categorical chart using various aggregation functions or a nonaggregated categorical chart using the VALUE function.

Templates. You can specify a template, using the TEMPLATE subcommand, to override the default chart attribute settings on your system.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is a chart type subcommand. By default, the generated chart will have no title, subtitle, or footnote.

Subcommand Order Collapse Hide details

Subcommand Order

Subcommands can be specified in any order.

Syntax Rules Collapse Hide details

Syntax Rules

• Only one chart type subcommand can be specified.

• The function/variable specification is required for all subtypes of bar, line, error bar, hilo, and Pareto charts; the variable specification is required for histograms and all subtypes of scatterplots.

• The function/variable or variable specifications should match the subtype keywords. If there is a discrepancy, GRAPH produces the default chart for the function/variable or variable specification regardless of the specified keyword.

Operations Collapse Hide details

Operations

• GRAPH computes aggregated functions to obtain the values needed for the requested chart and calculates an optimal scale for charting.

• The chart title, subtitle, and footnote are assigned as they are specified on the TITLE, SUBTITLE, and FOOTNOTE subcommands. If you do not use these subcommands, the chart title, subtitle, and footnote are null. The split-file information is displayed as a subtitle if split-file is in effect.

• GRAPH creates labels that provide information about the source of the values being plotted. Labeling conventions vary for different subtypes. Where variable or value labels are defined in the active dataset, GRAPH uses the labels; otherwise, variable names or values are used.

Limitations Collapse Hide details

Limitations

Categorical charts cannot display fewer than 2 or more than 3,000 categories.

Related Topics

GRAPH
Examples (GRAPH command)
TITLE, SUBTITLE, and FOOTNOTE Subcommands (GRAPH command)
BAR Subcommand (GRAPH command)
LINE Subcommand (GRAPH command)
PIE Subcommand (GRAPH command)
HILO Subcommand (GRAPH command)
ERRORBAR Subcommand (GRAPH command)
SCATTERPLOT Subcommand (GRAPH command)
HISTOGRAM Subcommand (GRAPH command)
PARETO Subcommand (GRAPH command)
PANEL Subcommand (GRAPH command)
COLVAR and ROWVAR Keywords (GRAPH command)
COLOP and ROWOP Keywords (GRAPH command)
INTERVAL Subcommand (GRAPH command)
CI Keyword (GRAPH command)
STDDEV Keyword (GRAPH command)
SE Keyword (GRAPH command)
TEMPLATE Subcommand (GRAPH command)
Elements and Attributes Independent of Chart Types or Data (GRAPH command)
Elements and Attributes Dependent on Chart Type (GRAPH command)
Elements and Attributes Dependent on Data (GRAPH command)
MISSING Subcommand (GRAPH command)


Examples (GRAPH command)

GRAPH /BAR=SUM (MURDER) BY CITY.

• This command generates a simple (default) bar chart showing the number of murders in each city.

• The category axis (x axis) labels are defined by the value labels (or values if no value labels exist) of the variable CITY.

• The default span (2) and sigma value (3) are used.

• Since no BY variable is specified, the x axis is labeled by sequence numbers.

Related Topics

GRAPH
Overview (GRAPH command)
TITLE, SUBTITLE, and FOOTNOTE Subcommands (GRAPH command)
BAR Subcommand (GRAPH command)
LINE Subcommand (GRAPH command)
PIE Subcommand (GRAPH command)
HILO Subcommand (GRAPH command)
ERRORBAR Subcommand (GRAPH command)
SCATTERPLOT Subcommand (GRAPH command)
HISTOGRAM Subcommand (GRAPH command)
PARETO Subcommand (GRAPH command)
PANEL Subcommand (GRAPH command)
COLVAR and ROWVAR Keywords (GRAPH command)
COLOP and ROWOP Keywords (GRAPH command)
INTERVAL Subcommand (GRAPH command)
CI Keyword (GRAPH command)
STDDEV Keyword (GRAPH command)
SE Keyword (GRAPH command)
TEMPLATE Subcommand (GRAPH command)
Elements and Attributes Independent of Chart Types or Data (GRAPH command)
Elements and Attributes Dependent on Chart Type (GRAPH command)
Elements and Attributes Dependent on Data (GRAPH command)
MISSING Subcommand (GRAPH command)


TITLE, SUBTITLE, and FOOTNOTE Subcommands (GRAPH command)

GRAPH (command),GRAPH (command),GRAPH (command)
FOOTNOTE subcommand,FOOTNOTE subcommand,FOOTNOTE subcommand
GRAPH (command),GRAPH (command),GRAPH (command)
SUBTITLE subcommand,SUBTITLE subcommand,SUBTITLE subcommand
GRAPH (command),GRAPH (command),GRAPH (command)
TITLE subcommand,TITLE subcommand,TITLE subcommand
FOOTNOTE (subcommand),FOOTNOTE (subcommand),FOOTNOTE (subcommand)
GRAPH command,GRAPH command,GRAPH command
SUBTITLE (subcommand),SUBTITLE (subcommand),SUBTITLE (subcommand)
GRAPH command,GRAPH command,GRAPH command
TITLE (subcommand),TITLE (subcommand),TITLE (subcommand)
GRAPH command,GRAPH command,GRAPH command

TITLE, SUBTITLE, and FOOTNOTE specify lines of text placed at the top or bottom of the chart.

• One or two lines of text can be specified for TITLE or FOOTNOTE, and one line of text can be specified for SUBTITLE.

• Each line of text must be enclosed in quotes. The maximum length of any line is 72 characters.

• The default font sizes and types are used for the title, subtitle, and footnote.

• By default, the title, subtitle, and footnote are left-aligned with the y axis.

• If you do not specify TITLE, the default title, subtitle, and footnote are null, which leaves more space for the chart. If split-file processing is in effect, the split-file information is provided as a default subtitle.

Example

GRAPH TITLE = 'Murder in Major U.S. Cities'
 /SUBTITLE='per 100,000 people'
 /FOOTNOTE='The above data was reported on August 26, 1987'
 /BAR=SUM(MURDER) BY CITY.

Related Topics

GRAPH
Overview (GRAPH command)
Examples (GRAPH command)
BAR Subcommand (GRAPH command)
LINE Subcommand (GRAPH command)
PIE Subcommand (GRAPH command)
HILO Subcommand (GRAPH command)
ERRORBAR Subcommand (GRAPH command)
SCATTERPLOT Subcommand (GRAPH command)
HISTOGRAM Subcommand (GRAPH command)
PARETO Subcommand (GRAPH command)
PANEL Subcommand (GRAPH command)
COLVAR and ROWVAR Keywords (GRAPH command)
COLOP and ROWOP Keywords (GRAPH command)
INTERVAL Subcommand (GRAPH command)
CI Keyword (GRAPH command)
STDDEV Keyword (GRAPH command)
SE Keyword (GRAPH command)
TEMPLATE Subcommand (GRAPH command)
Elements and Attributes Independent of Chart Types or Data (GRAPH command)
Elements and Attributes Dependent on Chart Type (GRAPH command)
Elements and Attributes Dependent on Data (GRAPH command)
MISSING Subcommand (GRAPH command)


BAR Subcommand (GRAPH command)

BAR (subcommand),BAR (subcommand),BAR (subcommand)
GRAPH command,GRAPH command,GRAPH command
GRAPH (command),GRAPH (command),GRAPH (command)
BAR subcommand,BAR subcommand,BAR subcommand
bar charts,bar charts,bar charts
charts,charts,charts
bar,bar,bar

BAR creates one of five types of bar charts using the keywords SIMPLE, COMPOSITIONAL, GROUPED, STACKED, or RANGE.

• Only one keyword can be specified, and it must be specified in parentheses.

• When no keyword is specified, the default is either SIMPLE or GROUPED, depending on the type of function/variable specification.

GRAPH (command),GRAPH (command),GRAPH (command)
SIMPLE keyword,SIMPLE keyword,SIMPLE keyword
SIMPLE (keyword),SIMPLE (keyword),SIMPLE (keyword)
GRAPH command,GRAPH command,GRAPH command
GROUPED (keyword),GROUPED (keyword),GROUPED (keyword)
GRAPH command,GRAPH command,GRAPH command
STACKED (keyword),STACKED (keyword),STACKED (keyword)
GRAPH command,GRAPH command,GRAPH command
RANGE (keyword),RANGE (keyword),RANGE (keyword)
GRAPH command,GRAPH command,GRAPH command
GRAPH (command),GRAPH (command),GRAPH (command)
RANGE keyword,RANGE keyword,RANGE keyword
charts,charts,charts
range bar,range bar,range bar
range bar charts,range bar charts,range bar charts
SIMPLE | Simple bar chart. This is the default if no keyword is specified on the BAR subcommand and the variables define a simple bar chart. A simple bar chart can be defined by a single summary or count function and a single BY variable or by multiple summary functions and no BY variable.
GROUPED | Clustered bar chart. A clustered bar chart is defined by a single function and two BY variables or by multiple functions and a single BY variable. This is the default if no keyword is specified on the BAR subcommand and the variables define a clustered bar chart.
STACKED | Stacked bar chart. A stacked bar chart displays a series of bars, each divided into segments stacked one on top of the other. The height of each segment represents the value of the category. Like a clustered bar chart, it is defined by a single function and two BY variables or by multiple functions and a single BY variable.
RANGE | Range bar chart. A range bar chart displays a series of floating bars. The height of each bar represents the range of the category and its position in the chart indicates the minimum and maximum values. A range bar chart can be defined by a single function and two BY variables or by multiple functions and a single BY variable. If a variable list is used as the argument for a function, the list must be of an even number. If a second BY variable is used to define the range, the variable must be dichotomous.

Related Topics

GRAPH
Overview (GRAPH command)
Examples (GRAPH command)
TITLE, SUBTITLE, and FOOTNOTE Subcommands (GRAPH command)
LINE Subcommand (GRAPH command)
PIE Subcommand (GRAPH command)
HILO Subcommand (GRAPH command)
ERRORBAR Subcommand (GRAPH command)
SCATTERPLOT Subcommand (GRAPH command)
HISTOGRAM Subcommand (GRAPH command)
PARETO Subcommand (GRAPH command)
PANEL Subcommand (GRAPH command)
COLVAR and ROWVAR Keywords (GRAPH command)
COLOP and ROWOP Keywords (GRAPH command)
INTERVAL Subcommand (GRAPH command)
CI Keyword (GRAPH command)
STDDEV Keyword (GRAPH command)
SE Keyword (GRAPH command)
TEMPLATE Subcommand (GRAPH command)
Elements and Attributes Independent of Chart Types or Data (GRAPH command)
Elements and Attributes Dependent on Chart Type (GRAPH command)
Elements and Attributes Dependent on Data (GRAPH command)
MISSING Subcommand (GRAPH command)


LINE Subcommand (GRAPH command)

LINE (subcommand),LINE (subcommand),LINE (subcommand)
GRAPH command,GRAPH command,GRAPH command
GRAPH (command),GRAPH (command),GRAPH (command)
LINE subcommand,LINE subcommand,LINE subcommand
charts,charts,charts
line,line,line
line charts,line charts,line charts

LINE creates one of five types of line charts using the keywords SIMPLE, MULTIPLE, DROP, AREA, or DIFFERENCE.

• Only one keyword can be specified, and it must be specified in parentheses.

• When no keyword is specified, the default is either SIMPLE or MULTIPLE, depending on the type of function/variable specification.

SIMPLE (keyword),SIMPLE (keyword),SIMPLE (keyword)
GRAPH command,GRAPH command,GRAPH command
GRAPH (command),GRAPH (command),GRAPH (command)
SIMPLE keyword,SIMPLE keyword,SIMPLE keyword
MULTIPLE (keyword),MULTIPLE (keyword),MULTIPLE (keyword)
GRAPH command,GRAPH command,GRAPH command
DROP (keyword),DROP (keyword),DROP (keyword)
GRAPH command,GRAPH command,GRAPH command
GRAPH (command),GRAPH (command),GRAPH (command)
DROP keyword,DROP keyword,DROP keyword
charts,charts,charts
drop-line,drop-line,drop-line
drop-line charts,drop-line charts,drop-line charts
AREA (keyword),AREA (keyword),AREA (keyword)
GRAPH command,GRAPH command,GRAPH command
DIFFERENCE (keyword),DIFFERENCE (keyword),DIFFERENCE (keyword)
GRAPH command,GRAPH command,GRAPH command
GRAPH (command),GRAPH (command),GRAPH (command)
DROP keyword,DROP keyword,DROP keyword
charts,charts,charts
difference area,difference area,difference area
difference area charts,difference area charts,difference area charts
SIMPLE | Simple line chart. A simple line chart is defined by a single function and a single BY variable or by multiple functions and no BY keyword. This is the default if no keyword is specified on LINE and the data define a simple line.
MULTIPLE | Multiple line chart. A multiple line chart is defined by a single function and two BY variables or by multiple functions and a single BY variable. This is the default if no keyword is specified on LINE and the data define a multiple line.
DROP | Drop-line chart. A drop-line chart shows the difference between two or more fluctuating variables. It is defined by a single function and two BY variables or by multiple functions and a single BY variable.
AREA | Area line chart. An area line chart fills the area beneath each line with a color or pattern. When multiple lines are specified, the second line is the sum of the first and second variables, the third line is the sum of the first, second, and third variables, and so on. The specification is the same as that for a simple or multiple line chart.
DIFFERENCE | Difference area chart. A difference area chart fills the area between a pair of lines. It highlights the difference between two variables or two groups. A difference area chart is defined by a single function and two BY variables or by two summary functions and a single BY variable. If a second BY variable is used to define the two groups, the variable must be dichotomous.

Related Topics

GRAPH
Overview (GRAPH command)
Examples (GRAPH command)
TITLE, SUBTITLE, and FOOTNOTE Subcommands (GRAPH command)
BAR Subcommand (GRAPH command)
PIE Subcommand (GRAPH command)
HILO Subcommand (GRAPH command)
ERRORBAR Subcommand (GRAPH command)
SCATTERPLOT Subcommand (GRAPH command)
HISTOGRAM Subcommand (GRAPH command)
PARETO Subcommand (GRAPH command)
PANEL Subcommand (GRAPH command)
COLVAR and ROWVAR Keywords (GRAPH command)
COLOP and ROWOP Keywords (GRAPH command)
INTERVAL Subcommand (GRAPH command)
CI Keyword (GRAPH command)
STDDEV Keyword (GRAPH command)
SE Keyword (GRAPH command)
TEMPLATE Subcommand (GRAPH command)
Elements and Attributes Independent of Chart Types or Data (GRAPH command)
Elements and Attributes Dependent on Chart Type (GRAPH command)
Elements and Attributes Dependent on Data (GRAPH command)
MISSING Subcommand (GRAPH command)


PIE Subcommand (GRAPH command)

PIE (subcommand),PIE (subcommand),PIE (subcommand)
GRAPH command,GRAPH command,GRAPH command
GRAPH (command),GRAPH (command),GRAPH (command)
PIE subcommand,PIE subcommand,PIE subcommand
charts,charts,charts
pie,pie,pie
pie charts,pie charts,pie charts

PIE creates pie charts. A pie chart can be defined by a single function and a single BY variable or by multiple summary functions and no BY variable. A pie chart divides a circle into slices. The size of each slice indicates the value of the category relative to the whole. Cumulative functions (CUPCT, CUFREQ, and CUSUM) are inappropriate for pie charts but are not prohibited. When specified, all cases except those in the last category are counted more than once in the resulting pie.

Related Topics

GRAPH
Overview (GRAPH command)
Examples (GRAPH command)
TITLE, SUBTITLE, and FOOTNOTE Subcommands (GRAPH command)
BAR Subcommand (GRAPH command)
LINE Subcommand (GRAPH command)
HILO Subcommand (GRAPH command)
ERRORBAR Subcommand (GRAPH command)
SCATTERPLOT Subcommand (GRAPH command)
HISTOGRAM Subcommand (GRAPH command)
PARETO Subcommand (GRAPH command)
PANEL Subcommand (GRAPH command)
COLVAR and ROWVAR Keywords (GRAPH command)
COLOP and ROWOP Keywords (GRAPH command)
INTERVAL Subcommand (GRAPH command)
CI Keyword (GRAPH command)
STDDEV Keyword (GRAPH command)
SE Keyword (GRAPH command)
TEMPLATE Subcommand (GRAPH command)
Elements and Attributes Independent of Chart Types or Data (GRAPH command)
Elements and Attributes Dependent on Chart Type (GRAPH command)
Elements and Attributes Dependent on Data (GRAPH command)
MISSING Subcommand (GRAPH command)


HILO Subcommand (GRAPH command)

GRAPH (command),GRAPH (command),GRAPH (command)
HILO subcommand,HILO subcommand,HILO subcommand
HILO (subcommand),HILO (subcommand),HILO (subcommand)
GRAPH command,GRAPH command,GRAPH command

HILO creates one of two types of high-low-close charts using the keywords SIMPLE or GROUPED. High-low-close charts show the range and the closing (or average) value of a series.

• Only one keyword can be specified.

• When a keyword is specified, it must be specified in parentheses.

• When no keyword is specified, the default is either SIMPLE or GROUPED, depending on the type of function/variable specification.

SIMPLE (keyword),SIMPLE (keyword),SIMPLE (keyword)
GRAPH command,GRAPH command,GRAPH command
GRAPH (command),GRAPH (command),GRAPH (command)
SIMPLE keyword,SIMPLE keyword,SIMPLE keyword
charts,charts,charts
high-low,high-low,high-low
high-low-close charts,high-low-close charts,high-low-close charts
simple,simple,simple
GROUPED (keyword),GROUPED (keyword),GROUPED (keyword)
GRAPH command,GRAPH command,GRAPH command
GRAPH (command),GRAPH (command),GRAPH (command)
GROUPED keyword,GROUPED keyword,GROUPED keyword
high-low-close charts,high-low-close charts,high-low-close charts
clustered,clustered,clustered
SIMPLE | Simple high-low-close chart. A simple high-low-close chart can be defined by a single summary or count function and two BY variables, by three summary functions and one BY variable, or by three values with one or no BY variable. When a second BY variable is used to define a high-low-close chart, the variable must be dichotomous or trichotomous. If dichotomous, the first value defines low and the second value defines high; if trichotomous, the first value defines high, the second defines low, and the third defines close.
GROUPED | Grouped high-low-close chart. A grouped high-low-close chart is defined by a single function and two BY variables or by multiple functions and a single BY variable. When a variable list is used for a single function, the list must contain two or three variables. If it contains two variables, the first defines the high value and the second defines the low value. If it contains three variables, the first defines the high value, the second defines the low value, and the third defines the close value. Likewise, if multiple functions are specified, they must be in groups of either two or three. The first function defines the high value, the second defines the low value, and the third, if specified, defines the close value.

Related Topics

GRAPH
Overview (GRAPH command)
Examples (GRAPH command)
TITLE, SUBTITLE, and FOOTNOTE Subcommands (GRAPH command)
BAR Subcommand (GRAPH command)
LINE Subcommand (GRAPH command)
PIE Subcommand (GRAPH command)
ERRORBAR Subcommand (GRAPH command)
SCATTERPLOT Subcommand (GRAPH command)
HISTOGRAM Subcommand (GRAPH command)
PARETO Subcommand (GRAPH command)
PANEL Subcommand (GRAPH command)
COLVAR and ROWVAR Keywords (GRAPH command)
COLOP and ROWOP Keywords (GRAPH command)
INTERVAL Subcommand (GRAPH command)
CI Keyword (GRAPH command)
STDDEV Keyword (GRAPH command)
SE Keyword (GRAPH command)
TEMPLATE Subcommand (GRAPH command)
Elements and Attributes Independent of Chart Types or Data (GRAPH command)
Elements and Attributes Dependent on Chart Type (GRAPH command)
Elements and Attributes Dependent on Data (GRAPH command)
MISSING Subcommand (GRAPH command)


ERRORBAR Subcommand (GRAPH command)

GRAPH (command),GRAPH (command),GRAPH (command)
ERRORBAR subcommand,ERRORBAR subcommand,ERRORBAR subcommand
ERRORBAR (subcommand),ERRORBAR (subcommand),ERRORBAR (subcommand)
GRAPH command,GRAPH command,GRAPH command
charts,charts,charts
error bar,error bar,error bar
error bar charts,error bar charts,error bar charts

ERRORBAR creates either a simple or a clustered error bar chart, depending on the variable specification on the subcommand. A simple error bar chart is defined by one numeric variable with or without a BY variable or a variable list. A clustered error bar chart is defined by one numeric variable with two BY variables or a variable list with a BY variable.

Error bar charts can display confidence intervals, standard deviations, or standard errors of the mean. To specify the statistics to be displayed, one of the following keywords is required:

CI (keyword),CI (keyword),CI (keyword)
GRAPH command,GRAPH command,GRAPH command
GRAPH (command),GRAPH (command),GRAPH (command)
CI keyword,CI keyword,CI keyword
STERROR (keyword),STERROR (keyword),STERROR (keyword)
GRAPH command,GRAPH command,GRAPH command
GRAPH (command),GRAPH (command),GRAPH (command)
STERROR keyword,STERROR keyword,STERROR keyword
STDDEV (keyword),STDDEV (keyword),STDDEV (keyword)
GRAPH command,GRAPH command,GRAPH command
GRAPH (command),GRAPH (command),GRAPH (command)
STDDEV keyword,STDDEV keyword,STDDEV keyword
CI value | Display confidence intervals for mean. You can specify a confidence level between 50 and 99.9. The default is 95.
STERROR n | Display standard errors of mean. You can specify any positive number for n. The default is 2.
STDDEV n | Display standard deviations. You can specify any positive number for n. The default is 2.

Related Topics

GRAPH
Overview (GRAPH command)
Examples (GRAPH command)
TITLE, SUBTITLE, and FOOTNOTE Subcommands (GRAPH command)
BAR Subcommand (GRAPH command)
LINE Subcommand (GRAPH command)
PIE Subcommand (GRAPH command)
HILO Subcommand (GRAPH command)
SCATTERPLOT Subcommand (GRAPH command)
HISTOGRAM Subcommand (GRAPH command)
PARETO Subcommand (GRAPH command)
PANEL Subcommand (GRAPH command)
COLVAR and ROWVAR Keywords (GRAPH command)
COLOP and ROWOP Keywords (GRAPH command)
INTERVAL Subcommand (GRAPH command)
CI Keyword (GRAPH command)
STDDEV Keyword (GRAPH command)
SE Keyword (GRAPH command)
TEMPLATE Subcommand (GRAPH command)
Elements and Attributes Independent of Chart Types or Data (GRAPH command)
Elements and Attributes Dependent on Chart Type (GRAPH command)
Elements and Attributes Dependent on Data (GRAPH command)
MISSING Subcommand (GRAPH command)


SCATTERPLOT Subcommand (GRAPH command)

scatterplots,scatterplots,scatterplots
charts,charts,charts
scatterplots,scatterplots,scatterplots
SCATTERPLOT (subcommand),SCATTERPLOT (subcommand),SCATTERPLOT (subcommand)
GRAPH command,GRAPH command,GRAPH command
GRAPH (command),GRAPH (command),GRAPH (command)
SCATTERPLOT subcommand,SCATTERPLOT subcommand,SCATTERPLOT subcommand

SCATTERPLOT produces two- or three-dimensional scatterplots. Multiple two-dimensional plots can be plotted within the same frame or as a scatterplot matrix. Only variables can be specified; aggregated functions cannot be plotted. When SCATTERPLOT is specified without keywords, the default is BIVARIATE.

BIVARIATE (keyword),BIVARIATE (keyword),BIVARIATE (keyword)
GRAPH command,GRAPH command,GRAPH command
GRAPH (command),GRAPH (command),GRAPH (command)
BIVARIATE keyword,BIVARIATE keyword,BIVARIATE keyword
OVERLAY (keyword),OVERLAY (keyword),OVERLAY (keyword)
GRAPH command,GRAPH command,GRAPH command
GRAPH (command),GRAPH (command),GRAPH (command)
OVERLAY keyword,OVERLAY keyword,OVERLAY keyword
MATRIX (keyword),MATRIX (keyword),MATRIX (keyword)
GRAPH command,GRAPH command,GRAPH command
GRAPH (command),GRAPH (command),GRAPH (command)
MATRIX keyword,MATRIX keyword,MATRIX keyword
XYZ (keyword),XYZ (keyword),XYZ (keyword)
GRAPH command,GRAPH command,GRAPH command
GRAPH (command),GRAPH (command),GRAPH (command)
XYZ keyword,XYZ keyword,XYZ keyword
BIVARIATE | One two-dimensional scatterplot. A basic scatterplot is defined by two variables separated by the keyword WITH. This is the default when SCATTERPLOT is specified without keywords.
OVERLAY | Multiple plots drawn within the same frame. Specify a variable list on both sides of WITH. By default, one scatterplot is drawn for each combination of variables on the left of WITH with variables on the right. You can specify PAIR in parentheses to indicate that the first variable on the left is paired with the first variable on the right, the second variable on the left with the second variable on the right, and so on. All plots are drawn within the same frame and are differentiated by color or pattern. The axes are scaled to accommodate the minimum and maximum values across all variables.
MATRIX | Scatterplot matrix. Specify at least two variables. One scatterplot is drawn for each combination of the specified variables above the diagonal and a second below the diagonal in a square matrix.
XYZ | One three-dimensional plot. Specify three variables, each separated from the next with the keyword WITH.

• If you specify a control variable using BY, GRAPH produces a control scatterplot where values of the BY variable are indicated by different colors or patterns. A control variable cannot be specified for overlay plots.

• You can display the value label of an identification variable at the plotting position for each case by adding BY var (NAME) or BY var (IDENTIFY) to the end of any valid scatterplot specification. When the chart is created, NAME turns the labels on, while IDENTIFY turns the labels off. You can use the Point Selection tool to turn individual labels off or on in the scatterplot.

Related Topics

GRAPH
Overview (GRAPH command)
Examples (GRAPH command)
TITLE, SUBTITLE, and FOOTNOTE Subcommands (GRAPH command)
BAR Subcommand (GRAPH command)
LINE Subcommand (GRAPH command)
PIE Subcommand (GRAPH command)
HILO Subcommand (GRAPH command)
ERRORBAR Subcommand (GRAPH command)
HISTOGRAM Subcommand (GRAPH command)
PARETO Subcommand (GRAPH command)
PANEL Subcommand (GRAPH command)
COLVAR and ROWVAR Keywords (GRAPH command)
COLOP and ROWOP Keywords (GRAPH command)
INTERVAL Subcommand (GRAPH command)
CI Keyword (GRAPH command)
STDDEV Keyword (GRAPH command)
SE Keyword (GRAPH command)
TEMPLATE Subcommand (GRAPH command)
Elements and Attributes Independent of Chart Types or Data (GRAPH command)
Elements and Attributes Dependent on Chart Type (GRAPH command)
Elements and Attributes Dependent on Data (GRAPH command)
MISSING Subcommand (GRAPH command)


HISTOGRAM Subcommand (GRAPH command)

charts,charts,charts
histograms,histograms,histograms
histograms,histograms,histograms
HISTOGRAM (subcommand),HISTOGRAM (subcommand),HISTOGRAM (subcommand)
GRAPH command,GRAPH command,GRAPH command
GRAPH (command),GRAPH (command),GRAPH (command)
HISTOGRAM subcommand,HISTOGRAM subcommand,HISTOGRAM subcommand

HISTOGRAM creates a histogram.

• Only one variable can be specified on this subcommand.

• GRAPH divides the values of the variable into several evenly spaced intervals and produces a bar chart showing the number of times the values for the variable fall within each interval.

• You can request a normal distribution line by specifying the keyword NORMAL in parentheses.

Related Topics

GRAPH
Overview (GRAPH command)
Examples (GRAPH command)
TITLE, SUBTITLE, and FOOTNOTE Subcommands (GRAPH command)
BAR Subcommand (GRAPH command)
LINE Subcommand (GRAPH command)
PIE Subcommand (GRAPH command)
HILO Subcommand (GRAPH command)
ERRORBAR Subcommand (GRAPH command)
SCATTERPLOT Subcommand (GRAPH command)
PARETO Subcommand (GRAPH command)
PANEL Subcommand (GRAPH command)
COLVAR and ROWVAR Keywords (GRAPH command)
COLOP and ROWOP Keywords (GRAPH command)
INTERVAL Subcommand (GRAPH command)
CI Keyword (GRAPH command)
STDDEV Keyword (GRAPH command)
SE Keyword (GRAPH command)
TEMPLATE Subcommand (GRAPH command)
Elements and Attributes Independent of Chart Types or Data (GRAPH command)
Elements and Attributes Dependent on Chart Type (GRAPH command)
Elements and Attributes Dependent on Data (GRAPH command)
MISSING Subcommand (GRAPH command)


PARETO Subcommand (GRAPH command)

GRAPH (command),GRAPH (command),GRAPH (command)
PARETO subcommand,PARETO subcommand,PARETO subcommand
PARETO (subcommand),PARETO (subcommand),PARETO (subcommand)
GRAPH command,GRAPH command,GRAPH command
Pareto charts,Pareto charts,Pareto charts
charts,charts,charts
Pareto,Pareto,Pareto

PARETO creates one of two types of Pareto charts. A Pareto chart is used in quality control to identify the few problems that create the majority of nonconformities. Only SUM, VALUE, and COUNT can be used with the PARETO subcommand.

Before plotting, PARETO sorts the plotted values in descending order by category. The right axis is always labeled by the cumulative percentage from 0 to 100. By default, a cumulative line is displayed. You can eliminate the cumulative line or explicitly request it by specifying one of the following keywords:

CUM (keyword),CUM (keyword),CUM (keyword)
GRAPH command,GRAPH command,GRAPH command
GRAPH (command),GRAPH (command),GRAPH (command)
CUM keyword,CUM keyword,CUM keyword
NOCUM (keyword),NOCUM (keyword),NOCUM (keyword)
GRAPH command,GRAPH command,GRAPH command
GRAPH (command),GRAPH (command),GRAPH (command)
NOCUM keyword,NOCUM keyword,NOCUM keyword
CUM | Display the cumulative line. This is the default.
NOCUM | Do not display the cumulative line.

You can request a simple or a stacked Pareto chart by specifying one of the following keywords and define it with appropriate function/variable specifications:

SIMPLE (keyword),SIMPLE (keyword),SIMPLE (keyword)
GRAPH command,GRAPH command,GRAPH command
GRAPH (command),GRAPH (command),GRAPH (command)
SIMPLE keyword,SIMPLE keyword,SIMPLE keyword
Pareto charts,Pareto charts,Pareto charts
simple,simple,simple
STACKED (keyword),STACKED (keyword),STACKED (keyword)
GRAPH command,GRAPH command,GRAPH command
GRAPH (command),GRAPH (command),GRAPH (command)
STACKED keyword,STACKED keyword,STACKED keyword
Pareto charts,Pareto charts,Pareto charts
stacked,stacked,stacked
SIMPLE | Simple Pareto chart. Each bar represents one type of nonconformity. A simple Pareto chart can be defined by a single variable, a single VALUE function, a single SUM function with a BY variable, or a SUM function with a variable list as an argument with no BY variable.
STACKED | Stacked Pareto chart. Each bar represents one or more types of nonconformity within the category. A stacked Pareto chart can be defined by a single SUM function with two BY variables, a single variable with a BY variable, a VALUE function with a variable list as an argument, or a SUM function with a variable list as an argument and a BY variable.

Related Topics

GRAPH
Overview (GRAPH command)
Examples (GRAPH command)
TITLE, SUBTITLE, and FOOTNOTE Subcommands (GRAPH command)
BAR Subcommand (GRAPH command)
LINE Subcommand (GRAPH command)
PIE Subcommand (GRAPH command)
HILO Subcommand (GRAPH command)
ERRORBAR Subcommand (GRAPH command)
SCATTERPLOT Subcommand (GRAPH command)
HISTOGRAM Subcommand (GRAPH command)
PANEL Subcommand (GRAPH command)
COLVAR and ROWVAR Keywords (GRAPH command)
COLOP and ROWOP Keywords (GRAPH command)
INTERVAL Subcommand (GRAPH command)
CI Keyword (GRAPH command)
STDDEV Keyword (GRAPH command)
SE Keyword (GRAPH command)
TEMPLATE Subcommand (GRAPH command)
Elements and Attributes Independent of Chart Types or Data (GRAPH command)
Elements and Attributes Dependent on Chart Type (GRAPH command)
Elements and Attributes Dependent on Data (GRAPH command)
MISSING Subcommand (GRAPH command)


PANEL Subcommand (GRAPH command)

PANEL (subcommand),PANEL (subcommand),PANEL (subcommand)
GRAPH command,GRAPH command,GRAPH command
GRAPH (command),GRAPH (command),GRAPH (command)
PANEL subcommand,PANEL subcommand,PANEL subcommand
charts,charts,charts
paneled charts,paneled charts,paneled charts
paneled charts,paneled charts,paneled charts

The PANEL subcommand specifies the variables and method used for paneling. Each keyword in the subcommand is followed by an equals sign (=) and the value for that keyword.

Related Topics

GRAPH
Overview (GRAPH command)
Examples (GRAPH command)
TITLE, SUBTITLE, and FOOTNOTE Subcommands (GRAPH command)
BAR Subcommand (GRAPH command)
LINE Subcommand (GRAPH command)
PIE Subcommand (GRAPH command)
HILO Subcommand (GRAPH command)
ERRORBAR Subcommand (GRAPH command)
SCATTERPLOT Subcommand (GRAPH command)
HISTOGRAM Subcommand (GRAPH command)
PARETO Subcommand (GRAPH command)
COLVAR and ROWVAR Keywords (GRAPH command)
COLOP and ROWOP Keywords (GRAPH command)
INTERVAL Subcommand (GRAPH command)
CI Keyword (GRAPH command)
STDDEV Keyword (GRAPH command)
SE Keyword (GRAPH command)
TEMPLATE Subcommand (GRAPH command)
Elements and Attributes Independent of Chart Types or Data (GRAPH command)
Elements and Attributes Dependent on Chart Type (GRAPH command)
Elements and Attributes Dependent on Data (GRAPH command)
MISSING Subcommand (GRAPH command)


COLVAR and ROWVAR Keywords (GRAPH command)

COLVAR (keyword),COLVAR (keyword),COLVAR (keyword)
GRAPH command,GRAPH command,GRAPH command
ROWVAR (keyword),ROWVAR (keyword),ROWVAR (keyword)
GRAPH command,GRAPH command,GRAPH command

The COLVAR and ROWVAR keywords identify the column and row variables, respectively. Each category in a column variable appears as a vertical column in the resulting chart. Each category in a row variable appears as a horizontal row in the resulting chart.

• If multiple variables are specified for a keyword, the COLOP and ROWOP keywords can be used to change the way in which variable categories are rendered in the chart.

• The ROWVAR keyword is not available for population pyramids.

varlist The list of variables used for paneling.

Examples

GRAPH
  /BAR(SIMPLE)=COUNT BY educ
  /PANEL COLVAR=gender COLOP=CROSS

• There are two columns in the resulting paneled chart, one for each gender.

• Because there is only one paneling variable, there are only as many panels as there are variable values. Therefore, there are two panels.

GRAPH
  /BAR(SIMPLE)=COUNT BY educ
  /PANEL COLVAR=minority ROWVAR=jobcat.

• There are two columns in the resulting paneled chart (for the gender variable values) and three rows (for the jobcat variable values).

Related Topics

GRAPH
Overview (GRAPH command)
Examples (GRAPH command)
TITLE, SUBTITLE, and FOOTNOTE Subcommands (GRAPH command)
BAR Subcommand (GRAPH command)
LINE Subcommand (GRAPH command)
PIE Subcommand (GRAPH command)
HILO Subcommand (GRAPH command)
ERRORBAR Subcommand (GRAPH command)
SCATTERPLOT Subcommand (GRAPH command)
HISTOGRAM Subcommand (GRAPH command)
PARETO Subcommand (GRAPH command)
PANEL Subcommand (GRAPH command)
COLOP and ROWOP Keywords (GRAPH command)
INTERVAL Subcommand (GRAPH command)
CI Keyword (GRAPH command)
STDDEV Keyword (GRAPH command)
SE Keyword (GRAPH command)
TEMPLATE Subcommand (GRAPH command)
Elements and Attributes Independent of Chart Types or Data (GRAPH command)
Elements and Attributes Dependent on Chart Type (GRAPH command)
Elements and Attributes Dependent on Data (GRAPH command)
MISSING Subcommand (GRAPH command)


COLOP and ROWOP Keywords (GRAPH command)

COLOP (keyword),COLOP (keyword),COLOP (keyword)
GRAPH command,GRAPH command,GRAPH command
ROWOP (keyword),ROWOP (keyword),ROWOP (keyword)
GRAPH command,GRAPH command,GRAPH command

The COLOP and ROWOP keywords specify the paneling method for the column and row variables, respectively. These keywords have no effect on the chart if there is only one variable in the rows and/or columns. They also have no effect if the data are not nested.

CROSS | Cross variables in the rows or columns. When the variables are crossed, a panel is created for every combination of categories in the variables. For example, if the categories in one variable are A and B and the categories in another variable are 1 and 2, the resulting chart will display a panel for the combinations of A and 1, A and 2, B and 1, and B and 2. A panel can be empty if the categories in that panel do not cross (for example, if there are no cases in the B category and the 1 category). This is the default.
NEST | Nest variables in the rows or columns. When the variables are nested, a panel is created for each category that is nested in the parent category. For example, if the data contain variables for states and cities, a panel is created for each city and the relevant state. However, panels are not created for cities that are not in certain states, as would happen with CROSS. When nesting, make sure that the variables specified for ROWVAR or COLVAR are in the correct order. Parent variables precede child variables.

Example

Assume you have the following data:

Nested data
State | City | Temperature
NJ | Springfield | 70
MA | Springfield | 60
IL | Springfield | 50
NJ | Trenton | 70
MA | Boston | 60

You can create a paneled chart from these data with the following syntax:

GRAPH
  /HISTOGRAM=temperature
  /PANEL COLVAR=state city COLOP=CROSS.

The command crosses every variable value to create the panels. Because not every state contains every city, the resulting paneled chart will contain blank panels. For example, there will be a blank panel for Springfield and New Jersey. In this dataset, the city variable is really nested in the state variable. To nest the variables in the panels and eliminate any blank panels, use the following syntax:

GRAPH
  /HISTOGRAM=temperature
  /PANEL COLVAR=state city COLOP=NEST.

Related Topics

GRAPH
Overview (GRAPH command)
Examples (GRAPH command)
TITLE, SUBTITLE, and FOOTNOTE Subcommands (GRAPH command)
BAR Subcommand (GRAPH command)
LINE Subcommand (GRAPH command)
PIE Subcommand (GRAPH command)
HILO Subcommand (GRAPH command)
ERRORBAR Subcommand (GRAPH command)
SCATTERPLOT Subcommand (GRAPH command)
HISTOGRAM Subcommand (GRAPH command)
PARETO Subcommand (GRAPH command)
PANEL Subcommand (GRAPH command)
COLVAR and ROWVAR Keywords (GRAPH command)
INTERVAL Subcommand (GRAPH command)
CI Keyword (GRAPH command)
STDDEV Keyword (GRAPH command)
SE Keyword (GRAPH command)
TEMPLATE Subcommand (GRAPH command)
Elements and Attributes Independent of Chart Types or Data (GRAPH command)
Elements and Attributes Dependent on Chart Type (GRAPH command)
Elements and Attributes Dependent on Data (GRAPH command)
MISSING Subcommand (GRAPH command)


INTERVAL Subcommand (GRAPH command)

INTERVAL (subcommand),INTERVAL (subcommand),INTERVAL (subcommand)
GRAPH command,GRAPH command,GRAPH command
GRAPH (command),GRAPH (command),GRAPH (command)
INTERVAL subcommand,INTERVAL subcommand,INTERVAL subcommand
charts,charts,charts
error bars,error bars,error bars

The INTERVAL subcommand adds errors bars to the chart. This is different from the ERRORBAR subcommand. The ERRORBAR subcommand adds error bar data elements. INTERVAL adds errors bars to other data elements (for example, areas, bars, and lines).

Error bars indicate the variability of the summary statistic being displayed. The length of the error bar on either side of the summary statistic represents a confidence interval or a specified number of standard errors or standard deviations. GRAPH supports error bars for simple or clustered categorical charts displaying means, medians, counts, and percentages.

The keywords are not followed by an equals sign (=). They are followed by a value in parentheses.

Example

GRAPH
  /BAR(SIMPLE)=COUNT BY jobcat
  /INTERVAL CI(95).

Related Topics

GRAPH
Overview (GRAPH command)
Examples (GRAPH command)
TITLE, SUBTITLE, and FOOTNOTE Subcommands (GRAPH command)
BAR Subcommand (GRAPH command)
LINE Subcommand (GRAPH command)
PIE Subcommand (GRAPH command)
HILO Subcommand (GRAPH command)
ERRORBAR Subcommand (GRAPH command)
SCATTERPLOT Subcommand (GRAPH command)
HISTOGRAM Subcommand (GRAPH command)
PARETO Subcommand (GRAPH command)
PANEL Subcommand (GRAPH command)
COLVAR and ROWVAR Keywords (GRAPH command)
COLOP and ROWOP Keywords (GRAPH command)
CI Keyword (GRAPH command)
STDDEV Keyword (GRAPH command)
SE Keyword (GRAPH command)
TEMPLATE Subcommand (GRAPH command)
Elements and Attributes Independent of Chart Types or Data (GRAPH command)
Elements and Attributes Dependent on Chart Type (GRAPH command)
Elements and Attributes Dependent on Data (GRAPH command)
MISSING Subcommand (GRAPH command)


CI Keyword (GRAPH command)

CI (keyword),CI (keyword),CI (keyword)
GRAPH command,GRAPH command,GRAPH command
(value) The percentage of the confidence interval to use as the length of the error bars.

Related Topics

GRAPH
Overview (GRAPH command)
Examples (GRAPH command)
TITLE, SUBTITLE, and FOOTNOTE Subcommands (GRAPH command)
BAR Subcommand (GRAPH command)
LINE Subcommand (GRAPH command)
PIE Subcommand (GRAPH command)
HILO Subcommand (GRAPH command)
ERRORBAR Subcommand (GRAPH command)
SCATTERPLOT Subcommand (GRAPH command)
HISTOGRAM Subcommand (GRAPH command)
PARETO Subcommand (GRAPH command)
PANEL Subcommand (GRAPH command)
COLVAR and ROWVAR Keywords (GRAPH command)
COLOP and ROWOP Keywords (GRAPH command)
INTERVAL Subcommand (GRAPH command)
STDDEV Keyword (GRAPH command)
SE Keyword (GRAPH command)
TEMPLATE Subcommand (GRAPH command)
Elements and Attributes Independent of Chart Types or Data (GRAPH command)
Elements and Attributes Dependent on Chart Type (GRAPH command)
Elements and Attributes Dependent on Data (GRAPH command)
MISSING Subcommand (GRAPH command)


STDDEV Keyword (GRAPH command)

STDDEV (keyword),STDDEV (keyword),STDDEV (keyword)
GRAPH command,GRAPH command,GRAPH command
(value) A multiplier indicating the number of standard deviations to use as the length of the error bars.

Related Topics

GRAPH
Overview (GRAPH command)
Examples (GRAPH command)
TITLE, SUBTITLE, and FOOTNOTE Subcommands (GRAPH command)
BAR Subcommand (GRAPH command)
LINE Subcommand (GRAPH command)
PIE Subcommand (GRAPH command)
HILO Subcommand (GRAPH command)
ERRORBAR Subcommand (GRAPH command)
SCATTERPLOT Subcommand (GRAPH command)
HISTOGRAM Subcommand (GRAPH command)
PARETO Subcommand (GRAPH command)
PANEL Subcommand (GRAPH command)
COLVAR and ROWVAR Keywords (GRAPH command)
COLOP and ROWOP Keywords (GRAPH command)
INTERVAL Subcommand (GRAPH command)
CI Keyword (GRAPH command)
SE Keyword (GRAPH command)
TEMPLATE Subcommand (GRAPH command)
Elements and Attributes Independent of Chart Types or Data (GRAPH command)
Elements and Attributes Dependent on Chart Type (GRAPH command)
Elements and Attributes Dependent on Data (GRAPH command)
MISSING Subcommand (GRAPH command)


SE Keyword (GRAPH command)

SE (keyword),SE (keyword),SE (keyword)
GRAPH command,GRAPH command,GRAPH command
(value) A multiplier indicating the number of standard errors to use as the length of the error bars.

Related Topics

GRAPH
Overview (GRAPH command)
Examples (GRAPH command)
TITLE, SUBTITLE, and FOOTNOTE Subcommands (GRAPH command)
BAR Subcommand (GRAPH command)
LINE Subcommand (GRAPH command)
PIE Subcommand (GRAPH command)
HILO Subcommand (GRAPH command)
ERRORBAR Subcommand (GRAPH command)
SCATTERPLOT Subcommand (GRAPH command)
HISTOGRAM Subcommand (GRAPH command)
PARETO Subcommand (GRAPH command)
PANEL Subcommand (GRAPH command)
COLVAR and ROWVAR Keywords (GRAPH command)
COLOP and ROWOP Keywords (GRAPH command)
INTERVAL Subcommand (GRAPH command)
CI Keyword (GRAPH command)
STDDEV Keyword (GRAPH command)
TEMPLATE Subcommand (GRAPH command)
Elements and Attributes Independent of Chart Types or Data (GRAPH command)
Elements and Attributes Dependent on Chart Type (GRAPH command)
Elements and Attributes Dependent on Data (GRAPH command)
MISSING Subcommand (GRAPH command)


TEMPLATE Subcommand (GRAPH command)

TEMPLATE (subcommand),TEMPLATE (subcommand),TEMPLATE (subcommand)
GRAPH command,GRAPH command,GRAPH command
GRAPH (command),GRAPH (command),GRAPH (command)
TEMPLATE subcommand,TEMPLATE subcommand,TEMPLATE subcommand
charts,charts,charts
templates,templates,templates
templates,templates,templates
in charts,in charts,in charts

TEMPLATE uses an existing chart as a template and applies it to the chart requested by the current GRAPH command.

• The specification on TEMPLATE is a chart file saved during a previous session.

• The general rule of application is that the template overrides the default setting, but the specifications on the current GRAPH command override the template. Nonapplicable elements and attributes are ignored.

• Three types of elements and attributes can be applied from a chart template: those dependent on data, those dependent on the chart type, and those dependent on neither.

Related Topics

GRAPH
Overview (GRAPH command)
Examples (GRAPH command)
TITLE, SUBTITLE, and FOOTNOTE Subcommands (GRAPH command)
BAR Subcommand (GRAPH command)
LINE Subcommand (GRAPH command)
PIE Subcommand (GRAPH command)
HILO Subcommand (GRAPH command)
ERRORBAR Subcommand (GRAPH command)
SCATTERPLOT Subcommand (GRAPH command)
HISTOGRAM Subcommand (GRAPH command)
PARETO Subcommand (GRAPH command)
PANEL Subcommand (GRAPH command)
COLVAR and ROWVAR Keywords (GRAPH command)
COLOP and ROWOP Keywords (GRAPH command)
INTERVAL Subcommand (GRAPH command)
CI Keyword (GRAPH command)
STDDEV Keyword (GRAPH command)
SE Keyword (GRAPH command)
Elements and Attributes Independent of Chart Types or Data (GRAPH command)
Elements and Attributes Dependent on Chart Type (GRAPH command)
Elements and Attributes Dependent on Data (GRAPH command)
MISSING Subcommand (GRAPH command)


Elements and Attributes Independent of Chart Types or Data (GRAPH command)

Elements and attributes common to all chart types are always applied unless overridden by the specifications on the current GRAPH command.

• The title, subtitle, and footnote, including text, color, font type and size, and line alignment are always applied. To give your chart a new title, subtitle, or footnote, specify the text on the TITLE, SUBTITLE, or FOOTNOTE subcommand. You cannot change other attributes.

• The outer frame of the chart, including line style, color, and fill pattern, is always applied. The inner frame is applied except for those charts that do not have an inner frame. The template overrides the system default.

• Label formats are applied wherever applicable. The template overrides the system default. Label text, however, is not applied. GRAPH automatically provides axis labels according to the function/variable specification.

• Legends and the legend title attributes, including color, font type and size, and alignment, are applied provided the current chart requires legends. The legend title text, however, is not applied. GRAPH provides the legend title according to the function/variable specification.

Related Topics

GRAPH
Overview (GRAPH command)
Examples (GRAPH command)
TITLE, SUBTITLE, and FOOTNOTE Subcommands (GRAPH command)
BAR Subcommand (GRAPH command)
LINE Subcommand (GRAPH command)
PIE Subcommand (GRAPH command)
HILO Subcommand (GRAPH command)
ERRORBAR Subcommand (GRAPH command)
SCATTERPLOT Subcommand (GRAPH command)
HISTOGRAM Subcommand (GRAPH command)
PARETO Subcommand (GRAPH command)
PANEL Subcommand (GRAPH command)
COLVAR and ROWVAR Keywords (GRAPH command)
COLOP and ROWOP Keywords (GRAPH command)
INTERVAL Subcommand (GRAPH command)
CI Keyword (GRAPH command)
STDDEV Keyword (GRAPH command)
SE Keyword (GRAPH command)
TEMPLATE Subcommand (GRAPH command)
Elements and Attributes Dependent on Chart Type (GRAPH command)
Elements and Attributes Dependent on Data (GRAPH command)
MISSING Subcommand (GRAPH command)


Elements and Attributes Dependent on Chart Type (GRAPH command)

Elements and attributes dependent on the chart type are those that exist only in a specific chart type. They include bars (in bar charts), lines and areas (in line charts), markers (in scatterplots), boxes (in boxplots), and pie sectors (in pie charts). These elements and their attributes are usually applied only when the template chart and the requested chart are of the same type. Some elements or their attributes may override the default settings across chart type.

• Color and pattern are always applied except for pie charts. The template overrides the system default.

• Scale axis lines are applied across chart types.

• Interval axis lines are applied from interval axis to interval axis. Interval axis bins are never applied.

• If the template is a 3-D bar chart and you request a chart with one category axis, attributes of the first axis are applied from the template. If you request a 3-D bar chart and the template is not a 3-D chart, no category axis attributes are applied.

Related Topics

GRAPH
Overview (GRAPH command)
Examples (GRAPH command)
TITLE, SUBTITLE, and FOOTNOTE Subcommands (GRAPH command)
BAR Subcommand (GRAPH command)
LINE Subcommand (GRAPH command)
PIE Subcommand (GRAPH command)
HILO Subcommand (GRAPH command)
ERRORBAR Subcommand (GRAPH command)
SCATTERPLOT Subcommand (GRAPH command)
HISTOGRAM Subcommand (GRAPH command)
PARETO Subcommand (GRAPH command)
PANEL Subcommand (GRAPH command)
COLVAR and ROWVAR Keywords (GRAPH command)
COLOP and ROWOP Keywords (GRAPH command)
INTERVAL Subcommand (GRAPH command)
CI Keyword (GRAPH command)
STDDEV Keyword (GRAPH command)
SE Keyword (GRAPH command)
TEMPLATE Subcommand (GRAPH command)
Elements and Attributes Independent of Chart Types or Data (GRAPH command)
Elements and Attributes Dependent on Data (GRAPH command)
MISSING Subcommand (GRAPH command)


Elements and Attributes Dependent on Data (GRAPH command)

Data-dependent elements and attributes are applied only when the template and the requested chart are of the same type and the template has at least as many series assigned to the same types of chart elements as the requested chart.

• Category attributes and elements, including fill, border, color, pattern, line style, weight of pie sectors, pie sector explosion, reference lines, projection lines, and annotations, are applied only when category values in the requested chart match those in the template.

• The attributes of data-related elements with on/off states are always applied. For example, the line style, weight, and color of a quadratic fit in a simple bivariate scatterplot are applied if the requested chart is also a simple bivariate scatterplot. The specification on the GRAPH command, for example, HISTOGRAM(NORMAL), overrides the applied on/off status; in this case, a normal curve is displayed regardless of whether the template displays a normal curve.

• In bar, line, and area charts, the assignment of series to bars, lines, and areas is not applied.

Related Topics

GRAPH
Overview (GRAPH command)
Examples (GRAPH command)
TITLE, SUBTITLE, and FOOTNOTE Subcommands (GRAPH command)
BAR Subcommand (GRAPH command)
LINE Subcommand (GRAPH command)
PIE Subcommand (GRAPH command)
HILO Subcommand (GRAPH command)
ERRORBAR Subcommand (GRAPH command)
SCATTERPLOT Subcommand (GRAPH command)
HISTOGRAM Subcommand (GRAPH command)
PARETO Subcommand (GRAPH command)
PANEL Subcommand (GRAPH command)
COLVAR and ROWVAR Keywords (GRAPH command)
COLOP and ROWOP Keywords (GRAPH command)
INTERVAL Subcommand (GRAPH command)
CI Keyword (GRAPH command)
STDDEV Keyword (GRAPH command)
SE Keyword (GRAPH command)
TEMPLATE Subcommand (GRAPH command)
Elements and Attributes Independent of Chart Types or Data (GRAPH command)
Elements and Attributes Dependent on Chart Type (GRAPH command)
MISSING Subcommand (GRAPH command)


MISSING Subcommand (GRAPH command)

GRAPH (command),GRAPH (command),GRAPH (command)
MISSING subcommand,MISSING subcommand,MISSING subcommand
MISSING (subcommand),MISSING (subcommand),MISSING (subcommand)
GRAPH command,GRAPH command,GRAPH command

MISSING controls the treatment of missing values in the chart drawn by GRAPH.

• The default is LISTWISE.

• The MISSING subcommand has no effect on variables used with the VALUE function to create nonaggregated charts. User-missing and system-missing values create empty cells.

• LISTWISE and VARIABLE are alternatives and apply to variables used in summary functions for a chart or to variables being plotted in a scatterplot.

• REPORT and NOREPORT are alternatives and apply only to category variables. They control whether categories and series with missing values are created. NOREPORT is the default.

• INCLUDE and EXCLUDE are alternatives and apply to both summary and category variables. EXCLUDE is the default.

• When a case has a missing value for the name variable but contains valid values for the dependent variable in a scatterplot, the case is always included. User-missing values are displayed as point labels; system-missing values are not displayed.

• For an aggregated categorical chart, if every aggregated series is empty in a category, the empty category is excluded.

• A nonaggregated categorical chart created with the VALUE function can contain completely empty categories. There are always as many categories as rows of data. However, at least one nonempty cell must be present; otherwise the chart is not created.

LISTWISE (keyword),LISTWISE (keyword),LISTWISE (keyword)
GRAPH command,GRAPH command,GRAPH command
GRAPH (command),GRAPH (command),GRAPH (command)
LISTWISE keyword,LISTWISE keyword,LISTWISE keyword
VARIABLE (keyword),VARIABLE (keyword),VARIABLE (keyword)
GRAPH command,GRAPH command,GRAPH command
GRAPH (command),GRAPH (command),GRAPH (command)
VARIABLE keyword,VARIABLE keyword,VARIABLE keyword
NOREPORT (keyword),NOREPORT (keyword),NOREPORT (keyword)
GRAPH command,GRAPH command,GRAPH command
GRAPH (command),GRAPH (command),GRAPH (command)
NOREPORT keyword,NOREPORT keyword,NOREPORT keyword
REPORT (keyword),REPORT (keyword),REPORT (keyword)
GRAPH command,GRAPH command,GRAPH command
GRAPH (command),GRAPH (command),GRAPH (command)
REPORT keyword,REPORT keyword,REPORT keyword
EXCLUDE (keyword),EXCLUDE (keyword),EXCLUDE (keyword)
GRAPH command,GRAPH command,GRAPH command
GRAPH (command),GRAPH (command),GRAPH (command)
INCLUDE keyword,INCLUDE keyword,INCLUDE keyword
INCLUDE (keyword),INCLUDE (keyword),INCLUDE (keyword)
GRAPH command,GRAPH command,GRAPH command
GRAPH (command),GRAPH (command),GRAPH (command)
INCLUDE keyword,INCLUDE keyword,INCLUDE keyword
LISTWISE | Listwise deletion of cases with missing values. A case with a missing value for any dependent variable is excluded from computations and graphs.
VARIABLE | Variable-wise deletion. A case is deleted from the analysis only if it has a missing value for the dependent variable being analyzed.
NOREPORT | Suppress missing-value categories. This is the default.
REPORT | Report and graph missing-value categories.
EXCLUDE | Exclude user-missing values. Both user- and system-missing values for dependent variables are excluded from computations and graphs. This is the default.
INCLUDE | Include user-missing values. Only system-missing values for dependent variables are excluded from computations and graphs.

Related Topics

GRAPH
Overview (GRAPH command)
Examples (GRAPH command)
TITLE, SUBTITLE, and FOOTNOTE Subcommands (GRAPH command)
BAR Subcommand (GRAPH command)
LINE Subcommand (GRAPH command)
PIE Subcommand (GRAPH command)
HILO Subcommand (GRAPH command)
ERRORBAR Subcommand (GRAPH command)
SCATTERPLOT Subcommand (GRAPH command)
HISTOGRAM Subcommand (GRAPH command)
PARETO Subcommand (GRAPH command)
PANEL Subcommand (GRAPH command)
COLVAR and ROWVAR Keywords (GRAPH command)
COLOP and ROWOP Keywords (GRAPH command)
INTERVAL Subcommand (GRAPH command)
CI Keyword (GRAPH command)
STDDEV Keyword (GRAPH command)
SE Keyword (GRAPH command)
TEMPLATE Subcommand (GRAPH command)
Elements and Attributes Independent of Chart Types or Data (GRAPH command)
Elements and Attributes Dependent on Chart Type (GRAPH command)
Elements and Attributes Dependent on Data (GRAPH command)


HILOGLINEAR

HILOGLINEAR (command),HILOGLINEAR (command),HILOGLINEAR (command)
HILOGLINEAR (command),HILOGLINEAR (command),HILOGLINEAR (command)
syntax chart,syntax chart,syntax chart
Model Selection Loglinear Analysis,Model Selection Loglinear Analysis,Model Selection Loglinear Analysis
command syntax,command syntax,command syntax

HILOGLINEAR is available in the Advanced Statistics option.

HILOGLINEAR {varlist} (min,max) [varlist ...]
            {ALL    }

 [/METHOD [= BACKWARD]]

 [/MAXORDER = k]

 [/CRITERIA = [CONVERGE({0.25**})] [ITERATE({20**})] [P({0.05**})]
                        {n     }            {n   }      {prob  }
              [DELTA({0.5**})] [MAXSTEPS({10**})]
                     {d    }             {n   }
              [DEFAULT] ]

 [/CWEIGHT = {varname }]
             {(matrix)}

 [/PRINT = {[FREQ**] [RESID**] [ESTIM**][ASSOCIATION**]}]
           {DEFAULT**                                  }
           {ALL                                        }
           {NONE                                       }

 [/PLOT = [{NONE**            } ]
           {DEFAULT           }
           {[RESID] [NORMPROB]}
           {ALL               }

 [/MISSING = [{EXCLUDE**}]]
              {INCLUDE  }

 [/DESIGN = effectname effectname*effectname ...]

** Default if subcommand or keyword is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See HILOGLINEAR Algorithms for computational details for this command.

Syntax for the HILOGLINEAR command can be generated from the Model Selection Loglinear Analysis dialog box.

Example

HILOGLINEAR V1(1,2) V2(1,2)
  /DESIGN=V1*V2.

Related Topics

Overview (HILOGLINEAR command)
Example (HILOGLINEAR command)
Variable List (HILOGLINEAR command)
METHOD Subcommand (HILOGLINEAR command)
MAXORDER Subcommand (HILOGLINEAR command)
CRITERIA Subcommand (HILOGLINEAR command)
CWEIGHT Subcommand (HILOGLINEAR command)
PRINT Subcommand (HILOGLINEAR command)
PLOT Subcommand (HILOGLINEAR command)
MISSING Subcommand (HILOGLINEAR command)
DESIGN Subcommand (HILOGLINEAR command)
References (HILOGLINEAR command)


Overview (HILOGLINEAR command)

HILOGLINEAR (command),HILOGLINEAR (command),HILOGLINEAR (command)
limitations,limitations,limitations

HILOGLINEAR fits hierarchical loglinear models to multidimensional contingency tables using an iterative proportional-fitting algorithm. HILOGLINEAR also estimates parameters for saturated models. These techniques are described elsewhere in (Everitt, 1977), (Bishop, Feinberg, and Holland, 1975), and (Goodman, 1978). HILOGLINEAR is much more efficient for these models than the LOGLINEAR procedure because HILOGLINEAR uses an iterative proportional-fitting algorithm rather than the Newton-Raphson method used in LOGLINEAR.

Options Collapse Hide details

Options

Design Specification. You can request automatic model selection using backward elimination with the METHOD subcommand. You can also specify any hierarchical design and request multiple designs using the DESIGN subcommand.

Design Control. You can control the criteria used in the iterative proportional-fitting and model-selection routines with the CRITERIA subcommand. You can also limit the order of effects in the model with the MAXORDER subcommand and specify structural zeros for cells in the tables you analyze with the CWEIGHT subcommand.

Display and Plots. You can select the display for each design with the PRINT subcommand. For saturated models, you can request tests for different orders of effects as well. With the PLOT subcommand, you can request residuals plots or normal probability plots of residuals.

Basic Specification Collapse Hide details

Basic Specification

• The basic specification is a variable list with at least two variables followed by their minimum and maximum values.

• HILOGLINEAR estimates a saturated model for all variables in the analysis.

• By default, HILOGLINEAR displays parameter estimates, measures of partial association, goodness of fit, and frequencies for the saturated model.

Subcommand Order Collapse Hide details

Subcommand Order

• The variable list must be specified first.

• Subcommands affecting a given DESIGN must appear before the DESIGN subcommand. Otherwise, subcommands can appear in any order.

• MISSING can be placed anywhere after the variable list.

Syntax Rules Collapse Hide details

Syntax Rules

• DESIGN is optional. If DESIGN is omitted or the last specification is not a DESIGN subcommand, a default saturated model is estimated.

• You can specify multiple PRINT, PLOT, CRITERIA, MAXORDER, and CWEIGHT subcommands. The last of each type specified is in effect for subsequent designs.

• PRINT, PLOT, CRITERIA, MAXORDER, and CWEIGHT specifications remain in effect until they are overridden by new specifications on these subcommands.

• You can specify multiple METHOD subcommands, but each one affects only the next design.

• MISSING can be specified only once.

Operations Collapse Hide details

Operations

• HILOGLINEAR builds a contingency table using all variables on the variable list. The table contains a cell for each possible combination of values within the range specified for each variable.

• HILOGLINEAR assumes that there is a category for every integer value in the range of each variable. Empty categories waste space and can cause computational problems. If there are empty categories, use the RECODE command to create consecutive integer values for categories.

• Cases with values outside the range specified for a variable are excluded.

• If the last subcommand is not a DESIGN subcommand, HILOGLINEAR displays a warning and generates the default model. This is the saturated model unless MAXORDER is specified. This model is in addition to any that are explicitly requested.

• If the model is not saturated (for example, when MAXORDER is less than the number of factors), only the goodness of fit and the observed and expected frequencies are given.

• The display uses the WIDTH subcommand defined on the SET command. If the defined width is less than 132, some portions of the display may be deleted.

Limitations Collapse Hide details

Limitations

The HILOGLINEAR procedure cannot estimate all possible frequency models, and it produces limited output for unsaturated models.

• It can estimate only hierarchical loglinear models.

• It treats all table variables as nominal. (You can use LOGLINEAR to fit nonhierarchical models to tables involving variables that are ordinal.)

• It can produce parameter estimates for saturated models only (those with all possible main-effect and interaction terms).

• It can estimate partial associations for saturated models only.

• It can handle tables with no more than 10 factors.

Related Topics

HILOGLINEAR
Example (HILOGLINEAR command)
Variable List (HILOGLINEAR command)
METHOD Subcommand (HILOGLINEAR command)
MAXORDER Subcommand (HILOGLINEAR command)
CRITERIA Subcommand (HILOGLINEAR command)
CWEIGHT Subcommand (HILOGLINEAR command)
PRINT Subcommand (HILOGLINEAR command)
PLOT Subcommand (HILOGLINEAR command)
MISSING Subcommand (HILOGLINEAR command)
DESIGN Subcommand (HILOGLINEAR command)
References (HILOGLINEAR command)


Example (HILOGLINEAR command)

HILOGLINEAR V1(1,2) V2(1,2) V3(1,3) V4(1,3)
  /DESIGN=V1*V2*V3, V4.

• HILOGLINEAR builds a 2 × 2 × 3 × 3 contingency table for analysis.

• DESIGN specifies the generating class for a hierarchical model. This model consists of main effects for all four variables, two-way interactions among V1, V2, and V3, and the three-way interaction term V1 by V2 by V3.

Backward Elimination

HILOGLINEAR
  inccat(1 4) news(0 1) response(0 1)  /METHOD=BACKWARD
  /CRITERIA MAXSTEPS(10) P(.05) ITERATION(20) DELTA(.5)
  /PRINT=FREQ RESID
  /DESIGN .

• HILOGLINEAR builds a 4× 2 × 2 contingency table for analysis.

• METHOD specifies that backward elimination should be used to choose a final model.

• All other options are set to their default values. The empty DESIGN subcommand indicates that the procedure will start with a saturated model.

For discussion of output from this syntax and to place the example in context, see Using Model Selection Loglinear Analysis to Find the "Best" Model.

Related Topics

HILOGLINEAR
Overview (HILOGLINEAR command)
Variable List (HILOGLINEAR command)
METHOD Subcommand (HILOGLINEAR command)
MAXORDER Subcommand (HILOGLINEAR command)
CRITERIA Subcommand (HILOGLINEAR command)
CWEIGHT Subcommand (HILOGLINEAR command)
PRINT Subcommand (HILOGLINEAR command)
PLOT Subcommand (HILOGLINEAR command)
MISSING Subcommand (HILOGLINEAR command)
DESIGN Subcommand (HILOGLINEAR command)
References (HILOGLINEAR command)


Variable List (HILOGLINEAR command)

HILOGLINEAR (command),HILOGLINEAR (command),HILOGLINEAR (command)
variable list,variable list,variable list

The required variable list specifies the variables in the analysis. The variable list must precede all other subcommands.

• Variables must be numeric and have integer values. If a variable has a fractional value, the fractional portion is truncated.

• Keyword ALL can be used to refer to all user-defined variables in the active dataset.

• A range must be specified for each variable, with the minimum and maximum values separated by a comma and enclosed in parentheses.

• If the same range applies to several variables, the range can be specified once after the last variable to which it applies.

• If ALL is specified, all variables must have the same range.

Related Topics

HILOGLINEAR
Overview (HILOGLINEAR command)
Example (HILOGLINEAR command)
METHOD Subcommand (HILOGLINEAR command)
MAXORDER Subcommand (HILOGLINEAR command)
CRITERIA Subcommand (HILOGLINEAR command)
CWEIGHT Subcommand (HILOGLINEAR command)
PRINT Subcommand (HILOGLINEAR command)
PLOT Subcommand (HILOGLINEAR command)
MISSING Subcommand (HILOGLINEAR command)
DESIGN Subcommand (HILOGLINEAR command)
References (HILOGLINEAR command)


METHOD Subcommand (HILOGLINEAR command)

HILOGLINEAR (command),HILOGLINEAR (command),HILOGLINEAR (command)
METHOD subcommand,METHOD subcommand,METHOD subcommand
METHOD (subcommand),METHOD (subcommand),METHOD (subcommand)
HILOGLINEAR command,HILOGLINEAR command,HILOGLINEAR command

By default, HILOGLINEAR tests the model specified on the DESIGN subcommand (or the default model) and does not perform any model selection. All variables are entered and none are removed. Use METHOD to specify automatic model selection using backward elimination for the next design specified.

• You can specify METHOD alone or with the keyword BACKWARD for an explicit specification.

• When the backward-elimination method is requested, a step-by-step output is displayed regardless of the specification on the PRINT subcommand.

BACKWARD (keyword),BACKWARD (keyword),BACKWARD (keyword)
HILOGLINEAR command,HILOGLINEAR command,HILOGLINEAR command

• METHOD affects only the next design.

backward elimination,backward elimination,backward elimination
HILOGLINEAR command,HILOGLINEAR command,HILOGLINEAR command
BACKWARD Backward elimination. Perform backward elimination of terms in the model. All terms are entered. Those that do not meet the P criterion specified on the CRITERIA subcommand (or the default P) are removed one at a time.

Related Topics

HILOGLINEAR
Overview (HILOGLINEAR command)
Example (HILOGLINEAR command)
Variable List (HILOGLINEAR command)
MAXORDER Subcommand (HILOGLINEAR command)
CRITERIA Subcommand (HILOGLINEAR command)
CWEIGHT Subcommand (HILOGLINEAR command)
PRINT Subcommand (HILOGLINEAR command)
PLOT Subcommand (HILOGLINEAR command)
MISSING Subcommand (HILOGLINEAR command)
DESIGN Subcommand (HILOGLINEAR command)
References (HILOGLINEAR command)


MAXORDER Subcommand (HILOGLINEAR command)

HILOGLINEAR (command),HILOGLINEAR (command),HILOGLINEAR (command)
MAXORDER subcommand,MAXORDER subcommand,MAXORDER subcommand
MAXORDER (subcommand),MAXORDER (subcommand),MAXORDER (subcommand)
HILOGLINEAR command,HILOGLINEAR command,HILOGLINEAR command
HILOGLINEAR (command),HILOGLINEAR (command),HILOGLINEAR (command)
maximum order of terms,maximum order of terms,maximum order of terms

MAXORDER controls the maximum order of terms in the model estimated for subsequent designs. If MAXORDER is specified, HILOGLINEAR tests a model only with terms of that order or less.

• MAXORDER specifies the highest-order term that will be considered for the next design. MAXORDER can thus be used to abbreviate computations for the BACKWARD method.

• If the integer on MAXORDER is less than the number of factors, parameter estimates and measures of partial association are not available. Only the goodness of fit and the observed and expected frequencies are displayed.

• You can use MAXORDER with backward elimination to find the best model with terms of a certain order or less. This is computationally much more efficient than eliminating terms from the saturated model.

Example

HILOGLINEAR V1 V2 V3(1,2)
  /MAXORDER=2
  /DESIGN=V1 V2 V3
  /DESIGN=V1*V2*V3.

• HILOGLINEAR builds a 2 × 2 × 2 contingency table for V1, V2, and V3.

• MAXORDER has no effect on the first DESIGN subcommand because the design requested considers only main effects.

• MAXORDER restricts the terms in the model specified on the second DESIGN subcommand to two-way interactions and main effects.

Related Topics

HILOGLINEAR
Overview (HILOGLINEAR command)
Example (HILOGLINEAR command)
Variable List (HILOGLINEAR command)
METHOD Subcommand (HILOGLINEAR command)
CRITERIA Subcommand (HILOGLINEAR command)
CWEIGHT Subcommand (HILOGLINEAR command)
PRINT Subcommand (HILOGLINEAR command)
PLOT Subcommand (HILOGLINEAR command)
MISSING Subcommand (HILOGLINEAR command)
DESIGN Subcommand (HILOGLINEAR command)
References (HILOGLINEAR command)


CRITERIA Subcommand (HILOGLINEAR command)

HILOGLINEAR (command),HILOGLINEAR (command),HILOGLINEAR (command)
CRITERIA subcommand,CRITERIA subcommand,CRITERIA subcommand
CRITERIA (subcommand),CRITERIA (subcommand),CRITERIA (subcommand)
HILOGLINEAR command,HILOGLINEAR command,HILOGLINEAR command

Use the CRITERIA subcommand to change the values of constants in the iterative proportional-fitting and model-selection routines for subsequent designs.

• The default criteria are in effect if the CRITERIA subcommand is omitted (see below).

• You cannot specify the CRITERIA subcommand without any keywords.

• Specify each CRITERIA keyword followed by a criterion value in parentheses. Only those criteria specifically altered are changed.

• You can specify more than one keyword on CRITERIA, and they can be in any order.

CONVERGE (keyword),CONVERGE (keyword),CONVERGE (keyword)
HILOGLINEAR command,HILOGLINEAR command,HILOGLINEAR command
ITERATE (keyword),ITERATE (keyword),ITERATE (keyword)
HILOGLINEAR command,HILOGLINEAR command,HILOGLINEAR command
HILOGLINEAR (command),HILOGLINEAR (command),HILOGLINEAR (command)
maximum iterations,maximum iterations,maximum iterations
P (keyword),P (keyword),P (keyword)
HILOGLINEAR command,HILOGLINEAR command,HILOGLINEAR command
MAXSTEPS (keyword),MAXSTEPS (keyword),MAXSTEPS (keyword)
HILOGLINEAR command,HILOGLINEAR command,HILOGLINEAR command
DELTA (keyword),DELTA (keyword),DELTA (keyword)
HILOGLINEAR command,HILOGLINEAR command,HILOGLINEAR command
delta,delta,delta
HILOGLINEAR command,HILOGLINEAR command,HILOGLINEAR command
DEFAULT | Reset parameters to their default values. If you have specified criteria other than the defaults for a design, use this keyword to restore the defaults for subsequent designs.
CONVERGE(n) | Convergence criterion. The default is 10-3 times the largest cell size, or 0.25, whichever is larger.
ITERATE(n) | Maximum number of iterations. The default is 20.
P(n) | Probability for change in chi-square if term is removed. Specify a value between (but not including) 0 and 1 for the significance level. The default is 0.05. P is in effect only when you request BACKWARD on the METHOD subcommand.
MAXSTEPS(n) | Maximum number of steps for model selection. Specify an integer between 1 and 99, inclusive. The default is 10.
DELTA(d) | Cell delta value. The value of delta is added to each cell frequency for the first iteration when estimating saturated models; it is ignored for unsaturated models. The default value is 0.5. You can specify any decimal value between 0 and 1 for d. HILOGLINEAR does not display parameter estimates or the covariance matrix of parameter estimates if any zero cells (either structural or sampling) exist in the expected table after delta is added.

Related Topics

HILOGLINEAR
Overview (HILOGLINEAR command)
Example (HILOGLINEAR command)
Variable List (HILOGLINEAR command)
METHOD Subcommand (HILOGLINEAR command)
MAXORDER Subcommand (HILOGLINEAR command)
CWEIGHT Subcommand (HILOGLINEAR command)
PRINT Subcommand (HILOGLINEAR command)
PLOT Subcommand (HILOGLINEAR command)
MISSING Subcommand (HILOGLINEAR command)
DESIGN Subcommand (HILOGLINEAR command)
References (HILOGLINEAR command)


CWEIGHT Subcommand (HILOGLINEAR command)

HILOGLINEAR (command),HILOGLINEAR (command),HILOGLINEAR (command)
CWEIGHT subcommand,CWEIGHT subcommand,CWEIGHT subcommand
CWEIGHT (subcommand),CWEIGHT (subcommand),CWEIGHT (subcommand)
HILOGLINEAR command,HILOGLINEAR command,HILOGLINEAR command
HILOGLINEAR (command),HILOGLINEAR (command),HILOGLINEAR (command)
cell weights,cell weights,cell weights
HILOGLINEAR (command),HILOGLINEAR (command),HILOGLINEAR (command)
weighted models,weighted models,weighted models

CWEIGHT specifies cell weights for a model. CWEIGHT is typically used to specify structural zeros in the table. You can also use CWEIGHT to adjust tables to fit new margins.

• You can specify the name of a variable whose values are cell weights, or provide a matrix of cell weights enclosed in parentheses.

• If you use a variable to specify cell weights, you are allowed only one CWEIGHT subcommand.

• If you specify a matrix, you must provide a weight for every cell in the contingency table, where the number of cells equals the product of the number of values of all variables.

• Cell weights are indexed by the values of the variables in the order in which they are specified on the variable list. The index values of the rightmost variable change the most quickly.

• You can use the notation n*cw to indicate that cell weight cw is repeated n times in the matrix.

Example

HILOGLINEAR V1(1,2) V2(1,2) V3(1,3)
  /CWEIGHT=CELLWGT
  /DESIGN=V1*V2, V2*V3, V1*V3.

• This example uses the variable CELLWGT to assign cell weights for the table. Only one CWEIGHT subcommand is allowed.

Example

HILOGLINEAR V4(1,3) V5(1,3)
  /CWEIGHT=(0 1 1  1 0 1  1 1 0)
  /DESIGN=V4, V5.

• The HILOGLINEAR command sets the diagonal cells in the model to structural zeros. This type of model is known as a quasi-independence model.

• Because both V4 and V5 have three values, weights must be specified for nine cells.

• The first cell weight is applied to the cell in which V4 is 1 and V5 is 1; the second weight is applied to the cell in which V4 is 1 and V5 is 2; and so on.

Example

HILOGLINEAR V4(1,3) V5(1,3)
  /CWEIGHT=(0 3*1 0 3*1 0)
  /DESIGN=V4,V5.

• This example is the same as the previous example except that the n*cw notation is used.

Example

* An Incomplete Rectangular Table

DATA LIST FREE / LOCULAR RADIAL FREQ.
WEIGHT BY FREQ.
BEGIN DATA
1 1 462
1 2 130
1 3 2
1 4 1
2 1 103
2 2 35
2 3 1
2 4 0
3 5 614
3 6 138
3 7 21
3 8 14
3 9 1
4 5 443
4 6 95
4 7 22
4 8 8
4 9 5
END DATA.
HILOGLINEAR LOCULAR (1,4) RADIAL (1,9)
  /CWEIGHT=(4*1 5*0   4*1 5*0   4*0 5*1   4*0 5*1)
  /DESIGN LOCULAR RADIAL.

• This example uses aggregated table data as input.

• The DATA LIST command defines three variables. The values of LOCULAR and RADIAL index the levels of those variables, so that each case defines a cell in the table. The values of FREQ are the cell frequencies.

• The WEIGHT command weights each case by the value of the variable FREQ. Because each case represents a cell in this example, the WEIGHT command assigns the frequencies for each cell.

• The BEGIN DATA and END DATA commands enclose the inline data.

• The HILOGLINEAR variable list specifies two variables. LOCULAR has values 1, 2, 3, and 4. RADIAL has integer values 1 through 9.

• The CWEIGHT subcommand identifies a block rectangular pattern of cells that are logically empty. There is one weight specified for each cell of the 36-cell table.

• In this example, the matrix form needs to be used in CWEIGHT because the structural zeros do not appear in the actual data. (For example, there is no case corresponding to LOCULAR = 1, RADIAL = 5.)

• The DESIGN subcommand specifies main effects only for LOCULAR and RADIAL. Lack of fit for this model indicates an interaction of the two variables.

• Because there is no PRINT or PLOT subcommand, HILOGLINEAR produces the default output for an unsaturated model.

Related Topics

HILOGLINEAR
Overview (HILOGLINEAR command)
Example (HILOGLINEAR command)
Variable List (HILOGLINEAR command)
METHOD Subcommand (HILOGLINEAR command)
MAXORDER Subcommand (HILOGLINEAR command)
CRITERIA Subcommand (HILOGLINEAR command)
PRINT Subcommand (HILOGLINEAR command)
PLOT Subcommand (HILOGLINEAR command)
MISSING Subcommand (HILOGLINEAR command)
DESIGN Subcommand (HILOGLINEAR command)
References (HILOGLINEAR command)


PRINT Subcommand (HILOGLINEAR command)

HILOGLINEAR (command),HILOGLINEAR (command),HILOGLINEAR (command)
PRINT subcommand,PRINT subcommand,PRINT subcommand
PRINT (subcommand),PRINT (subcommand),PRINT (subcommand)
HILOGLINEAR command,HILOGLINEAR command,HILOGLINEAR command

PRINT controls the display produced for the subsequent designs.

• If PRINT is omitted or included with no specifications, the default display is produced.

• If any keywords are specified on PRINT, only output specifically requested is displayed.

• HILOGLINEAR displays Pearson and likelihood-ratio chi-square goodness-of-fit tests for models. For saturated models, it also provides tests that the k-way effects and the k-way and higher-order effects are 0.

• Both adjusted and unadjusted degrees of freedom are displayed for tables with sampling or structural zeros. K-way and higher-order tests use the unadjusted degrees of freedom.

• The unadjusted degrees of freedom are not adjusted for zero cells, and they estimate the upper bound of the true degrees of freedom. These are the same degrees of freedom you would get if all cells were filled.

• The adjusted degrees of freedom are calculated from the number of non-zero-fitted cells minus the number of parameters that would be estimated if all cells were filled (that is, unadjusted degrees of freedom minus the number of zero-fitted cells). This estimate of degrees of freedom may be too low if some parameters do not exist because of zeros.

FREQ (keyword),FREQ (keyword),FREQ (keyword)
HILOGLINEAR command,HILOGLINEAR command,HILOGLINEAR command
observed frequencies,observed frequencies,observed frequencies
HILOGLINEAR command,HILOGLINEAR command,HILOGLINEAR command
expected frequencies,expected frequencies,expected frequencies
HILOGLINEAR command,HILOGLINEAR command,HILOGLINEAR command
RESID (keyword),RESID (keyword),RESID (keyword)
HILOGLINEAR command,HILOGLINEAR command,HILOGLINEAR command
residuals,residuals,residuals
HILOGLINEAR command,HILOGLINEAR command,HILOGLINEAR command
standardized residuals,standardized residuals,standardized residuals
HILOGLINEAR command,HILOGLINEAR command,HILOGLINEAR command
ESTIM (keyword),ESTIM (keyword),ESTIM (keyword)
HILOGLINEAR command,HILOGLINEAR command,HILOGLINEAR command
parameter estimates,parameter estimates,parameter estimates
HILOGLINEAR command,HILOGLINEAR command,HILOGLINEAR command
ASSOCIATION (keyword),ASSOCIATION (keyword),ASSOCIATION (keyword)
HILOGLINEAR command,HILOGLINEAR command,HILOGLINEAR command
partial associations,partial associations,partial associations
HILOGLINEAR command,HILOGLINEAR command,HILOGLINEAR command
NONE (keyword),NONE (keyword),NONE (keyword)
HILOGLINEAR command,HILOGLINEAR command,HILOGLINEAR command
DEFAULT | Default displays. This option includes FREQ and RESID output for nonsaturated models, and FREQ, RESID, ESTIM, and ASSOCIATION output for saturated models. For saturated models, the observed and expected frequencies are equal, and the residuals are zeros.
FREQ | Observed and expected cell frequencies.
RESID | Raw and standardized residuals.
ESTIM | Parameter estimates for a saturated model.
ASSOCIATION | Partial associations. You can request partial associations of effects only when you specify a saturated model. This option is computationally expensive for tables with many factors.
ALL | All available output.
NONE | Design information and goodness-of-fit statistics only. Use of this option overrides all other specifications on PRINT.

Related Topics

HILOGLINEAR
Overview (HILOGLINEAR command)
Example (HILOGLINEAR command)
Variable List (HILOGLINEAR command)
METHOD Subcommand (HILOGLINEAR command)
MAXORDER Subcommand (HILOGLINEAR command)
CRITERIA Subcommand (HILOGLINEAR command)
CWEIGHT Subcommand (HILOGLINEAR command)
PLOT Subcommand (HILOGLINEAR command)
MISSING Subcommand (HILOGLINEAR command)
DESIGN Subcommand (HILOGLINEAR command)
References (HILOGLINEAR command)


PLOT Subcommand (HILOGLINEAR command)

HILOGLINEAR (command),HILOGLINEAR (command),HILOGLINEAR (command)
PLOT subcommand,PLOT subcommand,PLOT subcommand
PLOT (subcommand),PLOT (subcommand),PLOT (subcommand)
HILOGLINEAR command,HILOGLINEAR command,HILOGLINEAR command
HILOGLINEAR (command),HILOGLINEAR (command),HILOGLINEAR (command)
residual plots,residual plots,residual plots
residual plots,residual plots,residual plots
HILOGLINEAR command,HILOGLINEAR command,HILOGLINEAR command

Use PLOT to request residuals plots.

• If PLOT is included without specifications, standardized residuals and normal probability plots are produced.

• No plots are displayed for saturated models.

• If PLOT is omitted, no plots are produced.

NORMPLOT (keyword),NORMPLOT (keyword),NORMPLOT (keyword)
HILOGLINEAR command,HILOGLINEAR command,HILOGLINEAR command
normal probability plots,normal probability plots,normal probability plots
HILOGLINEAR command,HILOGLINEAR command,HILOGLINEAR command
HILOGLINEAR (command),HILOGLINEAR (command),HILOGLINEAR (command)
normal probability plots,normal probability plots,normal probability plots
RESID | Standardized residuals by observed and expected counts.
NORMPLOT | Normal probability plots of adjusted residuals.
NONE | No plots. Specify NONE to suppress plots requested on a previous PLOT subcommand. This is the default if PLOT is omitted.
DEFAULT | Default plots. Includes RESID and NORMPLOT. This is the default when PLOT is specified without keywords.
ALL | All available plots.

Related Topics

HILOGLINEAR
Overview (HILOGLINEAR command)
Example (HILOGLINEAR command)
Variable List (HILOGLINEAR command)
METHOD Subcommand (HILOGLINEAR command)
MAXORDER Subcommand (HILOGLINEAR command)
CRITERIA Subcommand (HILOGLINEAR command)
CWEIGHT Subcommand (HILOGLINEAR command)
PRINT Subcommand (HILOGLINEAR command)
MISSING Subcommand (HILOGLINEAR command)
DESIGN Subcommand (HILOGLINEAR command)
References (HILOGLINEAR command)


MISSING Subcommand (HILOGLINEAR command)

HILOGLINEAR (command),HILOGLINEAR (command),HILOGLINEAR (command)
MISSING subcommand,MISSING subcommand,MISSING subcommand
MISSING (subcommand),MISSING (subcommand),MISSING (subcommand)
HILOGLINEAR command,HILOGLINEAR command,HILOGLINEAR command
missing values,missing values,missing values
HILOGLINEAR command,HILOGLINEAR command,HILOGLINEAR command

By default, a case with either system-missing or user-missing values for any variable named on the HILOGLINEAR variable list is omitted from the analysis. Use MISSING to change the treatment of cases with user-missing values.

• MISSING can be named only once and can be placed anywhere following the variable list.

• MISSING cannot be used without specifications.

LISTWISE (keyword),LISTWISE (keyword),LISTWISE (keyword)
HILOGLINEAR command,HILOGLINEAR command,HILOGLINEAR command

• A case with a system-missing value for any variable named on the variable list is always excluded from the analysis.

INCLUDE (keyword),INCLUDE (keyword),INCLUDE (keyword)
HILOGLINEAR command,HILOGLINEAR command,HILOGLINEAR command
EXCLUDE | Delete cases with missing values. This is the default if the subcommand is omitted. You can also specify keyword DEFAULT.
INCLUDE | Include user-missing values as valid. Only cases with system-missing values are deleted.

Related Topics

HILOGLINEAR
Overview (HILOGLINEAR command)
Example (HILOGLINEAR command)
Variable List (HILOGLINEAR command)
METHOD Subcommand (HILOGLINEAR command)
MAXORDER Subcommand (HILOGLINEAR command)
CRITERIA Subcommand (HILOGLINEAR command)
CWEIGHT Subcommand (HILOGLINEAR command)
PRINT Subcommand (HILOGLINEAR command)
PLOT Subcommand (HILOGLINEAR command)
DESIGN Subcommand (HILOGLINEAR command)
References (HILOGLINEAR command)


DESIGN Subcommand (HILOGLINEAR command)

HILOGLINEAR (command),HILOGLINEAR (command),HILOGLINEAR (command)
DESIGN subcommand,DESIGN subcommand,DESIGN subcommand
DESIGN (subcommand),DESIGN (subcommand),DESIGN (subcommand)
HILOGLINEAR command,HILOGLINEAR command,HILOGLINEAR command
saturated models,saturated models,saturated models
HILOGLINEAR command,HILOGLINEAR command,HILOGLINEAR command
HILOGLINEAR (command),HILOGLINEAR (command),HILOGLINEAR (command)
model specification,model specification,model specification
interaction terms,interaction terms,interaction terms
HILOGLINEAR command,HILOGLINEAR command,HILOGLINEAR command
HILOGLINEAR (command),HILOGLINEAR (command),HILOGLINEAR (command)
interaction terms,interaction terms,interaction terms
generating class,generating class,generating class
HILOGLINEAR command,HILOGLINEAR command,HILOGLINEAR command
custom models,custom models,custom models
HILOGLINEAR command,HILOGLINEAR command,HILOGLINEAR command
HILOGLINEAR (command),HILOGLINEAR (command),HILOGLINEAR (command)
custom models,custom models,custom models

By default, HILOGLINEAR uses a saturated model that includes all variables on the variable list. The model contains all main effects and interactions for those variables. Use DESIGN to specify a different generating class for the model.

• If DESIGN is omitted or included without specifications, the default model is estimated. When DESIGN is omitted, a warning message is issued.

• To specify a design, list the highest-order terms, using variable names and asterisks (*) to indicate interaction effects.

• In a hierarchical model, higher-order interaction effects imply lower-order interaction and main effects. V1*V2*V3 implies the three-way interaction V1 by V2 by V3, two-way interactions V1 by V2, V1 by V3, and V2 by V3, and main effects for V1, V2, and V3. The highest-order effects to be estimated are the generating class.

• Any PRINT, PLOT, CRITERIA, METHOD, and MAXORDER subcommands that apply to a DESIGN subcommand must appear before it.

• All variables named on DESIGN must be named or implied on the variable list.

• You can specify more than one DESIGN subcommand. One model is estimated for each DESIGN subcommand.

• If the last subcommand on HILOGLINEAR is not DESIGN, the default model will be estimated in addition to models explicitly requested. A warning message is issued for a missing DESIGN subcommand.

Related Topics

HILOGLINEAR
Overview (HILOGLINEAR command)
Example (HILOGLINEAR command)
Variable List (HILOGLINEAR command)
METHOD Subcommand (HILOGLINEAR command)
MAXORDER Subcommand (HILOGLINEAR command)
CRITERIA Subcommand (HILOGLINEAR command)
CWEIGHT Subcommand (HILOGLINEAR command)
PRINT Subcommand (HILOGLINEAR command)
PLOT Subcommand (HILOGLINEAR command)
MISSING Subcommand (HILOGLINEAR command)
References (HILOGLINEAR command)


References (HILOGLINEAR command)

Bishop, Y. M., S. E. Feinberg, and P. W. Holland. 1975. Discrete multivariate analysis: Theory and practice. Cambridge, Mass.: MIT Press.

Everitt, B. S. 1977. The Analysis of Contingency Tables. London: Chapman & Hall.

Goodman, L. A. 1978. Analyzing qualitative/categorical data. New York: University Press of America.

Related Topics

HILOGLINEAR
Overview (HILOGLINEAR command)
Example (HILOGLINEAR command)
Variable List (HILOGLINEAR command)
METHOD Subcommand (HILOGLINEAR command)
MAXORDER Subcommand (HILOGLINEAR command)
CRITERIA Subcommand (HILOGLINEAR command)
CWEIGHT Subcommand (HILOGLINEAR command)
PRINT Subcommand (HILOGLINEAR command)
PLOT Subcommand (HILOGLINEAR command)
MISSING Subcommand (HILOGLINEAR command)
DESIGN Subcommand (HILOGLINEAR command)


HOMALS

HOMALS (command),HOMALS (command),HOMALS (command)
HOMALS (command),HOMALS (command),HOMALS (command)
syntax chart,syntax chart,syntax chart

HOMALS is available in the Categories option.

HOMALS  VARIABLES=varlist(max)

[/ANALYSIS=varlist]

[/NOBSERVATIONS=value]

[/DIMENSION={2**  }]
            {value}

[/MAXITER={100**}]
          {value}

[/CONVERGENCE={.00001**}]
              {value   }

[/PRINT=[DEFAULT**] [FREQ**] [EIGEN**] [DISCRIM**]
        [QUANT**] [OBJECT] [HISTORY] [ALL] [NONE]]

[/PLOT=[NDIM=({1, 2        }**)]
              {value, value}
              {ALL, MAX    }
       [QUANT**[(varlist)][(n)]] [OBJECT**[(varlist)][(n)]]
       [DEFAULT**[(n)]] [DISCRIM[(n)]] [ALL[(n)]] [NONE]]

[/SAVE=[rootname] [(value)]]

[/MATRIX=OUT({*   })]
             {'savfile'|'dataset'}

**Default if the subcommand or keyword is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See HOMALS Algorithms for computational details for this procedure.

Example

HOMALS  VARIABLES=ACOLA(2) BCOLA(2) CCOLA(2) DCOLA(2).

Related Topics

Overview (HOMALS command)
Example (HOMALS command)
VARIABLES Subcommand (HOMALS command)
ANALYSIS Subcommand (HOMALS command)
NOBSERVATIONS Subcommand (HOMALS command)
DIMENSION Subcommand (HOMALS command)
MAXITER Subcommand (HOMALS command)
CONVERGENCE Subcommand (HOMALS command)
PRINT Subcommand (HOMALS command)
PLOT Subcommand (HOMALS command)
SAVE Subcommand (HOMALS command)
MATRIX Subcommand (HOMALS command)


Overview (HOMALS command)

HOMALS (homogeneity analysis by means of alternating least squares) estimates category quantifications, object scores, and other associated statistics that separate categories (levels) of nominal variables as much as possible and divide cases into homogeneous subgroups.

Options Collapse Hide details

Options

Data and variable selection. You can use a subset of the variables in the analysis and restrict the analysis to the first n observations.

Number of dimensions. You can specify the number of dimensions HOMALS should compute.

Iterations and convergence. You can specify the maximum number of iterations and the value of a convergence criterion.

Display output. The output can include all available statistics; just the default frequencies, eigenvalues, discrimination measures and category quantifications; or just the specific statistics you request. You can also control which statistics are plotted and specify the number of characters used in plot labels.

Saving scores. You can save object scores in the working data file.

Writing matrices. You can write a matrix data file containing category quantifications for use in further analyses.

Basic Specification Collapse Hide details

Basic Specification

• The basic specification is HOMALS and the VARIABLES subcommand. By default, HOMALS analyzes all of the variables listed for all cases and computes two solutions. Frequencies, eigenvalues, discrimination measures, and category quantifications are displayed, and category quantifications and object scores are plotted.

Subcommand Order Collapse Hide details

Subcommand Order

• Subcommands can appear in any order.

Syntax Rules Collapse Hide details

Syntax Rules

• If ANALYSIS is specified more than once, HOMALS is not executed. For all other subcommands, if a subcommand is specified more than once, only the last occurrence is executed.

HOMALS (command),HOMALS (command),HOMALS (command)
with RECODE command,with RECODE command,with RECODE command
RECODE (command),RECODE (command),RECODE (command)
with HOMALS command,with HOMALS command,with HOMALS command
HOMALS (command),HOMALS (command),HOMALS (command)
with AUTORECODE command,with AUTORECODE command,with AUTORECODE command
AUTORECODE (command),AUTORECODE (command),AUTORECODE (command)
with HOMALS command,with HOMALS command,with HOMALS command
Operations Collapse Hide details

Operations

• HOMALS treats every value in the range of 1 to the maximum value specified on VARIABLES as a valid category. If the data are not sequential, the empty categories (categories with no valid data) are assigned zeros for all statistics. You may want to use RECODE or AUTORECODE before HOMALS to get rid of these empty categories and avoid the unnecessary output (see RECODE and AUTORECODE for more information).

Limitations Collapse Hide details

Limitations

• String variables are not allowed; use AUTORECODE to recode string variables into numeric variables.

• The data (category values) must be positive integers. Zeros and negative values are treated as system-missing, which means that they are excluded from the analysis. Fractional values are truncated after the decimal and are included in the analysis. If one of the levels of a variable has been coded 0 or a negative value and you want to treat it as a valid category, use the AUTORECODE or RECODE command to recode the values of that variable.

• HOMALS ignores user-missing value specifications. Positive user-missing values less than the maximum value specified on the VARIABLES subcommand are treated as valid category values and are included in the analysis. If you do not want the category included, use COMPUTE or RECODE to change the value to something outside of the valid range. Values outside of the range (less than 1 or greater than the maximum value) are treated as system-missing and are excluded from the analysis.

Related Topics

HOMALS
Example (HOMALS command)
VARIABLES Subcommand (HOMALS command)
ANALYSIS Subcommand (HOMALS command)
NOBSERVATIONS Subcommand (HOMALS command)
DIMENSION Subcommand (HOMALS command)
MAXITER Subcommand (HOMALS command)
CONVERGENCE Subcommand (HOMALS command)
PRINT Subcommand (HOMALS command)
PLOT Subcommand (HOMALS command)
SAVE Subcommand (HOMALS command)
MATRIX Subcommand (HOMALS command)


Example (HOMALS command)

HOMALS  VARIABLES=ACOLA(2) BCOLA(2) CCOLA(2) DCOLA(2)
  /PRINT=FREQ EIGEN QUANT OBJECT.

• The four variables are analyzed using all available observations. Each variable has two categories, 1 and 2.

• The PRINT subcommand lists the frequencies, eigenvalues, category quantifications, and object scores.

• By default, plots of the category quantifications and the object scores are produced.

Related Topics

HOMALS
Overview (HOMALS command)
VARIABLES Subcommand (HOMALS command)
ANALYSIS Subcommand (HOMALS command)
NOBSERVATIONS Subcommand (HOMALS command)
DIMENSION Subcommand (HOMALS command)
MAXITER Subcommand (HOMALS command)
CONVERGENCE Subcommand (HOMALS command)
PRINT Subcommand (HOMALS command)
PLOT Subcommand (HOMALS command)
SAVE Subcommand (HOMALS command)
MATRIX Subcommand (HOMALS command)


VARIABLES Subcommand (HOMALS command)

VARIABLES (subcommand),VARIABLES (subcommand),VARIABLES (subcommand)
HOMALS command,HOMALS command,HOMALS command
HOMALS (command),HOMALS (command),HOMALS (command)
VARIABLES subcommand,VARIABLES subcommand,VARIABLES subcommand

VARIABLES specifies the variables that will be used in the analysis.

• The VARIABLES subcommand is required. The actual word VARIABLES can be omitted.

• After each variable or variable list, specify in parentheses the maximum number of categories (levels) of the variables.

HOMALS (command),HOMALS (command),HOMALS (command)
with AUTORECODE command,with AUTORECODE command,with AUTORECODE command
AUTORECODE (command),AUTORECODE (command),AUTORECODE (command)
with HOMALS command,with HOMALS command,with HOMALS command

• The number specified in parentheses indicates the number of categories and the maximum category value. For example, VAR1(3) indicates that VAR1 has three categories coded 1, 2, and 3. However, if a variable is not coded with consecutive integers, the number of categories used in the analysis will differ from the number of observed categories. For example, if a three-category variable is coded {2, 4, 6}, the maximum category value is 6. The analysis treats the variable as having six categories, three of which (categories 1, 3, and 5) are not observed and receive quantifications of 0.

• To avoid unnecessary output, use the AUTORECODE or RECODE command before HOMALS to recode a variable that does not have sequential values (see AUTORECODE and RECODE for more information).

Example

DATA LIST FREE/V1 V2 V3.
BEGIN DATA
3 1 1
6 1 1
3 1 3
3 2 2
3 2 2
6 2 2
6 1 3
6 2 2
3 2 2
6 2 1
END DATA.
AUTORECODE V1 /INTO NEWVAR1.
HOMALS VARIABLES=NEWVAR1 V2(2) V3(3).

• DATA LIST defines three variables, V1, V2, and V3.

• V1 has two levels, coded 3 and 6, V2 has two levels, coded 1 and 2, and V3 has three levels, coded 1, 2, and 3.

• The AUTORECODE command creates NEWVAR1 containing recoded values of V1. Values of 3 are recoded to 1; values of 6 are recoded to 2.

• The maximum category value for both NEWVAR1 and V2 is 2. A maximum value of 3 is specified for V3.

Related Topics

HOMALS
Overview (HOMALS command)
Example (HOMALS command)
ANALYSIS Subcommand (HOMALS command)
NOBSERVATIONS Subcommand (HOMALS command)
DIMENSION Subcommand (HOMALS command)
MAXITER Subcommand (HOMALS command)
CONVERGENCE Subcommand (HOMALS command)
PRINT Subcommand (HOMALS command)
PLOT Subcommand (HOMALS command)
SAVE Subcommand (HOMALS command)
MATRIX Subcommand (HOMALS command)


ANALYSIS Subcommand (HOMALS command)

ANALYSIS (subcommand),ANALYSIS (subcommand),ANALYSIS (subcommand)
HOMALS command,HOMALS command,HOMALS command
HOMALS (command),HOMALS (command),HOMALS (command)
ANALYSIS subcommand,ANALYSIS subcommand,ANALYSIS subcommand
ANALYSIS (subcommand),ANALYSIS (subcommand),ANALYSIS (subcommand)
with VARIABLES subcommand,with VARIABLES subcommand,with VARIABLES subcommand
VARIABLES (subcommand),VARIABLES (subcommand),VARIABLES (subcommand)
with ANALYSIS subcommand,with ANALYSIS subcommand,with ANALYSIS subcommand

ANALYSIS limits the analysis to a specific subset of the variables named on the VARIABLES subcommand.

• If ANALYSIS is not specified, all variables listed on the VARIABLES subcommand are used.

• ANALYSIS is followed by a variable list. The variables on the list must be specified on the VARIABLES subcommand.

• Variables listed on the VARIABLES subcommand but not on the ANALYSIS subcommand can still be used to label object scores on the PLOT subcommand.

Example

HOMALS VARIABLES=ACOLA(2) BCOLA(2) CCOLA(2) DCOLA(2)
  /ANALYSIS=ACOLA BCOLA
  /PRINT=OBJECT QUANT
  /PLOT=OBJECT(CCOLA).

• The VARIABLES subcommand specifies four variables.

• The ANALYSIS subcommand limits analysis to the first two variables. The PRINT subcommand lists the object scores and category quantifications from this analysis.

• The plot of the object scores is labeled with variable CCOLA, even though this variable is not included in the computations.

Related Topics

HOMALS
Overview (HOMALS command)
Example (HOMALS command)
VARIABLES Subcommand (HOMALS command)
NOBSERVATIONS Subcommand (HOMALS command)
DIMENSION Subcommand (HOMALS command)
MAXITER Subcommand (HOMALS command)
CONVERGENCE Subcommand (HOMALS command)
PRINT Subcommand (HOMALS command)
PLOT Subcommand (HOMALS command)
SAVE Subcommand (HOMALS command)
MATRIX Subcommand (HOMALS command)


NOBSERVATIONS Subcommand (HOMALS command)

HOMALS (command),HOMALS (command),HOMALS (command)
excluding cases,excluding cases,excluding cases
cases,cases,cases
excluding from HOMALS command,excluding from HOMALS command,excluding from HOMALS command
NOBSERVATIONS (subcommand),NOBSERVATIONS (subcommand),NOBSERVATIONS (subcommand)
HOMALS command,HOMALS command,HOMALS command
HOMALS (command),HOMALS (command),HOMALS (command)
NOBSERVATIONS subcommand,NOBSERVATIONS subcommand,NOBSERVATIONS subcommand

NOBSERVATIONS specifies how many cases are used in the analysis.

• If NOBSERVATIONS is not specified, all available observations in the working data file are used.

• NOBSERVATIONS is followed by an integer indicating that the first n cases are to be used.

Related Topics

HOMALS
Overview (HOMALS command)
Example (HOMALS command)
VARIABLES Subcommand (HOMALS command)
ANALYSIS Subcommand (HOMALS command)
DIMENSION Subcommand (HOMALS command)
MAXITER Subcommand (HOMALS command)
CONVERGENCE Subcommand (HOMALS command)
PRINT Subcommand (HOMALS command)
PLOT Subcommand (HOMALS command)
SAVE Subcommand (HOMALS command)
MATRIX Subcommand (HOMALS command)


DIMENSION Subcommand (HOMALS command)

DIMENSION (subcommand),DIMENSION (subcommand),DIMENSION (subcommand)
HOMALS command,HOMALS command,HOMALS command
HOMALS (command),HOMALS (command),HOMALS (command)
DIMENSION subcommand,DIMENSION subcommand,DIMENSION subcommand

DIMENSION specifies the number of dimensions you want HOMALS to compute.

• If you do not specify the DIMENSION subcommand, HOMALS computes two dimensions.

• The specification on DIMENSION is a positive integer indicating the number of dimensions.

• The minimum number of dimensions is 1.

• The maximum number of dimensions is equal to the smaller of the two values below:

Related Topics

HOMALS
Overview (HOMALS command)
Example (HOMALS command)
VARIABLES Subcommand (HOMALS command)
ANALYSIS Subcommand (HOMALS command)
NOBSERVATIONS Subcommand (HOMALS command)
MAXITER Subcommand (HOMALS command)
CONVERGENCE Subcommand (HOMALS command)
PRINT Subcommand (HOMALS command)
PLOT Subcommand (HOMALS command)
SAVE Subcommand (HOMALS command)
MATRIX Subcommand (HOMALS command)


MAXITER Subcommand (HOMALS command)

MAXITER (subcommand),MAXITER (subcommand),MAXITER (subcommand)
HOMALS command,HOMALS command,HOMALS command
HOMALS (command),HOMALS (command),HOMALS (command)
MAXITER subcommand,MAXITER subcommand,MAXITER subcommand

MAXITER specifies the maximum number of iterations HOMALS can go through in its computations.

• If MAXITER is not specified, HOMALS will iterate up to 100 times.

• The specification on MAXITER is a positive integer indicating the maximum number of iterations.

Related Topics

HOMALS
Overview (HOMALS command)
Example (HOMALS command)
VARIABLES Subcommand (HOMALS command)
ANALYSIS Subcommand (HOMALS command)
NOBSERVATIONS Subcommand (HOMALS command)
DIMENSION Subcommand (HOMALS command)
CONVERGENCE Subcommand (HOMALS command)
PRINT Subcommand (HOMALS command)
PLOT Subcommand (HOMALS command)
SAVE Subcommand (HOMALS command)
MATRIX Subcommand (HOMALS command)


CONVERGENCE Subcommand (HOMALS command)

CONVERGENCE (subcommand),CONVERGENCE (subcommand),CONVERGENCE (subcommand)
HOMALS command,HOMALS command,HOMALS command
HOMALS (command),HOMALS (command),HOMALS (command)
CONVERGENCE subcommand,CONVERGENCE subcommand,CONVERGENCE subcommand

CONVERGENCE specifies a convergence criterion value. HOMALS stops iterating if the difference in total fit between the last two iterations is less than the CONVERGENCE value.

• If CONVERGENCE is not specified, the default value is 0.00001.

• The specification on CONVERGENCE is a positive value.

Related Topics

HOMALS
Overview (HOMALS command)
Example (HOMALS command)
VARIABLES Subcommand (HOMALS command)
ANALYSIS Subcommand (HOMALS command)
NOBSERVATIONS Subcommand (HOMALS command)
DIMENSION Subcommand (HOMALS command)
MAXITER Subcommand (HOMALS command)
PRINT Subcommand (HOMALS command)
PLOT Subcommand (HOMALS command)
SAVE Subcommand (HOMALS command)
MATRIX Subcommand (HOMALS command)


PRINT Subcommand (HOMALS command)

PRINT (subcommand),PRINT (subcommand),PRINT (subcommand)
HOMALS command,HOMALS command,HOMALS command
HOMALS (command),HOMALS (command),HOMALS (command)
PRINT subcommand,PRINT subcommand,PRINT subcommand

PRINT controls which statistics are included in your display output. The default display includes the frequencies, eigenvalues, discrimination measures, and category quantifications.

The following keywords are available:

FREQ (keyword),FREQ (keyword),FREQ (keyword)
HOMALS command,HOMALS command,HOMALS command
HISTORY (keyword),HISTORY (keyword),HISTORY (keyword)
HOMALS command,HOMALS command,HOMALS command
EIGEN (keyword),EIGEN (keyword),EIGEN (keyword)
HOMALS command,HOMALS command,HOMALS command
DISCRIM (keyword),DISCRIM (keyword),DISCRIM (keyword)
HOMALS command,HOMALS command,HOMALS command
OBJECT (keyword),OBJECT (keyword),OBJECT (keyword)
HOMALS command,HOMALS command,HOMALS command
QUANT (keyword),QUANT (keyword),QUANT (keyword)
HOMALS command,HOMALS command,HOMALS command
DEFAULT (keyword),DEFAULT (keyword),DEFAULT (keyword)
HOMALS command,HOMALS command,HOMALS command
ALL (keyword),ALL (keyword),ALL (keyword)
HOMALS command,HOMALS command,HOMALS command
NONE (keyword),NONE (keyword),NONE (keyword)
HOMALS command,HOMALS command,HOMALS command
FREQ | Marginal frequencies for the variables in the analysis.
HISTORY | History of the iterations.
EIGEN | Eigenvalues.
DISCRIM | Discrimination measures for the variables in the analysis.
OBJECT | Object scores.
QUANT | Category quantifications for the variables in the analysis.
DEFAULT | FREQ, EIGEN, DISCRIM, and QUANT. These statistics are also displayed when you omit the PRINT subcommand.
ALL | All available statistics.
NONE | No statistics.

Related Topics

HOMALS
Overview (HOMALS command)
Example (HOMALS command)
VARIABLES Subcommand (HOMALS command)
ANALYSIS Subcommand (HOMALS command)
NOBSERVATIONS Subcommand (HOMALS command)
DIMENSION Subcommand (HOMALS command)
MAXITER Subcommand (HOMALS command)
CONVERGENCE Subcommand (HOMALS command)
PLOT Subcommand (HOMALS command)
SAVE Subcommand (HOMALS command)
MATRIX Subcommand (HOMALS command)


PLOT Subcommand (HOMALS command)

value labels,value labels,value labels
as point labels HOMALS command,as point labels HOMALS command,as point labels HOMALS command
variable labels,variable labels,variable labels
as plot labels HOMALS command,as plot labels HOMALS command,as plot labels HOMALS command
HOMALS (command),HOMALS (command),HOMALS (command)
labeling plots,labeling plots,labeling plots
PLOT (subcommand),PLOT (subcommand),PLOT (subcommand)
HOMALS command,HOMALS command,HOMALS command
HOMALS (command),HOMALS (command),HOMALS (command)
PLOT subcommand,PLOT subcommand,PLOT subcommand

PLOT can be used to produce plots of category quantifications, object scores, and discrimination measures.

• If PLOT is not specified, plots of the object scores and of the quantifications are produced.

• No plots are produced for a one-dimensional solution.

The following keywords can be specified on PLOT:

DISCRIM (keyword),DISCRIM (keyword),DISCRIM (keyword)
HOMALS command,HOMALS command,HOMALS command
OBJECT (keyword),OBJECT (keyword),OBJECT (keyword)
HOMALS command,HOMALS command,HOMALS command
QUANT (keyword),QUANT (keyword),QUANT (keyword)
HOMALS command,HOMALS command,HOMALS command
DEFAULT (keyword),DEFAULT (keyword),DEFAULT (keyword)
HOMALS command,HOMALS command,HOMALS command
ALL (keyword),ALL (keyword),ALL (keyword)
HOMALS command,HOMALS command,HOMALS command
NONE (keyword),NONE (keyword),NONE (keyword)
HOMALS command,HOMALS command,HOMALS command
DISCRIM | Plots of the discrimination measures.
OBJECT | Plots of the object scores.
QUANT | Plots of the category quantifications.
DEFAULT | QUANT and OBJECT.
ALL | All available plots.
NONE | No plots.

• Keywords OBJECT and QUANT can each be followed by a variable list in parentheses to indicate that plots should be labeled with those variables. For QUANT, the labeling variables must be specified on both the VARIABLES and ANALYSIS subcommands. For OBJECT, the variables must be specified on the VARIABLES subcommand but need not appear on the ANALYSIS subcommand. This means that variables not used in the computations can be used to label OBJECT plots. If the variable list is omitted, the default object and quantification plots are produced.

• Object score plots labeled with variables that appear on the ANALYSIS subcommand use category labels corresponding to all categories within the defined range. Objects in a category that is outside the defined range are labeled with the label corresponding to the category immediately following the defined maximum category value.

• Object score plots labeled with variables not included on the ANALYSIS subcommand use all category labels, regardless of whether or not the category value is inside the defined range.

value labels,value labels,value labels
HOMALS command,HOMALS command,HOMALS command
HOMALS (command),HOMALS (command),HOMALS (command)
value labels,value labels,value labels
variable labels,variable labels,variable labels
HOMALS command,HOMALS command,HOMALS command
HOMALS (command),HOMALS (command),HOMALS (command)
variable labels,variable labels,variable labels

• All keywords except NONE can be followed by an integer value in parentheses to indicate how many characters of the variable or value label are to be used on the plot. (If you specify a variable list after OBJECT or QUANT, specify the value in parentheses after the list.) The value can range from 1 to 20; the default is to use 12 characters. Spaces between words count as characters.

• DISCRIM plots use variable labels; all other plots use value labels.

• If a variable label is not supplied, the variable name is used for that variable. If a value label is not supplied, the actual value is used.

• Variable and value labels should be unique.

• When points overlap, the points involved are described in a summary following the plot.

Example

HOMALS VARIABLES COLA1 (4) COLA2 (4) COLA3 (4) COLA4 (2)
/ANALYSIS COLA1 COLA2 COLA3 COLA4
/PLOT OBJECT(COLA4).

• Four variables are included in the analysis.

• OBJECT requests a plot of the object scores labeled with the values of COLA4. Any object whose COLA4 value is not 1 or 2, is labeled 3 (or the value label for category 3, if supplied).

Example

HOMALS VARIABLES COLA1 (4) COLA2 (4) COLA3 (4) COLA4 (2)
/ANALYSIS COLA1 COLA2 COLA3
/PLOT OBJECT(COLA4).

• Three variables are included in the analysis.

• OBJECT requests a plot of the object scores labeled with the values of COLA4, a variable not included in the analysis. Objects are labeled using all values of COLA4.

In addition to the plot keywords, the following can be specified:

dimensions,dimensions,dimensions
HOMALS command,HOMALS command,HOMALS command
HOMALS (command),HOMALS (command),HOMALS (command)
dimensions,dimensions,dimensions
NDIM (keyword),NDIM (keyword),NDIM (keyword)
HOMALS command,HOMALS command,HOMALS command
NDIM Dimension pairs to be plotted. NDIM is followed by a pair of values in parentheses. If NDIM is not specified, plots are produced for dimension 1 versus dimension 2.

• The first value indicates the dimension that is plotted against all higher dimensions. This value can be any integer from 1 to the number of dimensions minus 1.

• The second value indicates the highest dimension to be used in plotting the dimension pairs. This value can be any integer from 2 to the number of dimensions.

MAX (keyword),MAX (keyword),MAX (keyword)
HOMALS command,HOMALS command,HOMALS command

• Keyword ALL can be used instead of the first value to indicate that all dimensions are paired with higher dimensions.

• Keyword MAX can be used instead of the second value to indicate that plots should be produced up to and including the highest dimension fit by the procedure.

Example

HOMALS COLA1 COLA2 COLA3 COLA4 (4)
 /PLOT NDIM(1,3) QUANT(5).

• The NDIM(1,3) specification indicates that plots should be produced for two dimension pairs—dimension 1 versus dimension 2 and dimension 1 versus dimension 3.

• QUANT requests plots of the category quantifications. The (5) specification indicates that the first five characters of the value labels are to be used on the plots.

Example

HOMALS COLA1 COLA2 COLA3 COLA4 (4)
 /PLOT NDIM(ALL,3) QUANT(5).

• This plot is the same as above except for the ALL specification following NDIM. This indicates that all possible pairs up to the second value should be plotted, so QUANT plots will be produced for dimension 1 versus dimension 2, dimension 2 versus dimension 3, and dimension 1 versus dimension 3.

Related Topics

HOMALS
Overview (HOMALS command)
Example (HOMALS command)
VARIABLES Subcommand (HOMALS command)
ANALYSIS Subcommand (HOMALS command)
NOBSERVATIONS Subcommand (HOMALS command)
DIMENSION Subcommand (HOMALS command)
MAXITER Subcommand (HOMALS command)
CONVERGENCE Subcommand (HOMALS command)
PRINT Subcommand (HOMALS command)
SAVE Subcommand (HOMALS command)
MATRIX Subcommand (HOMALS command)


SAVE Subcommand (HOMALS command)

object scores,object scores,object scores
saving HOMALS command,saving HOMALS command,saving HOMALS command
SAVE (subcommand),SAVE (subcommand),SAVE (subcommand)
HOMALS command,HOMALS command,HOMALS command
HOMALS (command),HOMALS (command),HOMALS (command)
SAVE subcommand,SAVE subcommand,SAVE subcommand

SAVE lets you add variables containing the object scores computed by HOMALS to the working data file.

• If SAVE is not specified, object scores are not added to the working data file.

SAVE (subcommand),SAVE (subcommand),SAVE (subcommand)
with DIMENSION subcommand,with DIMENSION subcommand,with DIMENSION subcommand
DIMENSION (subcommand),DIMENSION (subcommand),DIMENSION (subcommand)
with SAVE subcommand,with SAVE subcommand,with SAVE subcommand

• A variable rootname can be specified on the SAVE subcommand to which HOMALS adds the number of the dimension. Only one rootname can be specified and it can contain up to six characters.

• If a rootname is not specified, unique variable names are automatically generated. The variable names are HOMn_m, where n is a dimension number and m is a set number. If three dimensions are saved, the first set of names is HOM1_1, HOM2_1, and HOM3_1. If another HOMALS is then run, the variable names for the second set are HOM1_2, HOM2_2, HOM3_2, and so on.

• Following the rootname, the number of dimensions for which you want to save object scores can be specified in parentheses. The number cannot exceed the value on the DIMENSION subcommand.

SAVE (subcommand),SAVE (subcommand),SAVE (subcommand)
with MATRIX subcommand,with MATRIX subcommand,with MATRIX subcommand
MATRIX (subcommand),MATRIX (subcommand),MATRIX (subcommand)
with SAVE subcommand,with SAVE subcommand,with SAVE subcommand

• If the number of dimensions is not specified, the SAVE subcommand saves object scores for all dimensions.

• If you replace the working data file by specifying an asterisk (*) on a MATRIX subcommand, the SAVE subcommand is not executed.

Example

HOMALS CAR1 CAR2 CAR3 CAR4(5)
 /DIMENSION=3
 /SAVE=DIM(2).

• Four variables, each with five categories, are analyzed.

• The DIMENSION subcommand specifies that results for three dimensions will be computed.

• SAVE adds the object scores from the first two dimensions to the working data file. The names of these new variables will be DIM00001 and DIM00002, respectively.

Related Topics

HOMALS
Overview (HOMALS command)
Example (HOMALS command)
VARIABLES Subcommand (HOMALS command)
ANALYSIS Subcommand (HOMALS command)
NOBSERVATIONS Subcommand (HOMALS command)
DIMENSION Subcommand (HOMALS command)
MAXITER Subcommand (HOMALS command)
CONVERGENCE Subcommand (HOMALS command)
PRINT Subcommand (HOMALS command)
PLOT Subcommand (HOMALS command)
MATRIX Subcommand (HOMALS command)


MATRIX Subcommand (HOMALS command)

matrix output,matrix output,matrix output
HOMALS command,HOMALS command,HOMALS command
MATRIX (subcommand),MATRIX (subcommand),MATRIX (subcommand)
HOMALS command,HOMALS command,HOMALS command
HOMALS (command),HOMALS (command),HOMALS (command)
MATRIX subcommand,MATRIX subcommand,MATRIX subcommand
OUT (keyword),OUT (keyword),OUT (keyword)
HOMALS command,HOMALS command,HOMALS command

The MATRIX subcommand is used to write category quantifications to a matrix data file or a previously declared dataset name (DATASET DECLARE command).

• The specification on MATRIX is keyword OUT and a quoted file specification of dataset name, enclosed in parentheses.

• You can specify an asterisk (*) replace the active dataset.

• The matrix data file has one case for each value of each original variable.

The variables of the matrix data file and their values are:

ROWTYPE_ variable,ROWTYPE_ variable,ROWTYPE_ variable
HOMALS command,HOMALS command,HOMALS command
LEVEL variable,LEVEL variable,LEVEL variable
HOMALS command,HOMALS command,HOMALS command
VARNAME_ variable,VARNAME_ variable,VARNAME_ variable
HOMALS command,HOMALS command,HOMALS command
DIM variable,DIM variable,DIM variable
HOMALS command,HOMALS command,HOMALS command
ROWTYPE_ | String variable containing value QUANT for all cases.
LEVEL | String variable LEVEL containing the values (or value labels if present) of each original variable.
VARNAME_ | String variable containing the original variable names.
DIM1...DIMn | Numeric variable containing the category quantifications for each dimension. Each variable is labeled DIMn, where n represents the dimension number.

Related Topics

HOMALS
Overview (HOMALS command)
Example (HOMALS command)
VARIABLES Subcommand (HOMALS command)
ANALYSIS Subcommand (HOMALS command)
NOBSERVATIONS Subcommand (HOMALS command)
DIMENSION Subcommand (HOMALS command)
MAXITER Subcommand (HOMALS command)
CONVERGENCE Subcommand (HOMALS command)
PRINT Subcommand (HOMALS command)
PLOT Subcommand (HOMALS command)
SAVE Subcommand (HOMALS command)


HOST

HOST (command),HOST (command),HOST (command)
HOST (command),HOST (command),HOST (command)
syntax chart,syntax chart,syntax chart
release history,release history,release history

Note: Square brackets used in the HOST syntax chart are required parts of the syntax and are not used to indicate optional elements. Equals signs (=) used in the syntax chart are required elements.

HOST COMMAND=[’command’ ’command’...’command’]
  TIMELIMIT=n.

This command takes effect immediately. It does not read the active dataset or execute pending transformations. See the topic Command Order for more information.

Release History Collapse Hide details

Release History

Release 13.0

• Command introduced.

Example

HOST COMMAND=[’dir c:\myfiles\*.sav’].

Related Topics

Overview (HOST command)
Syntax (HOST command)
TIMELIMIT Keyword (HOST command)
Working Directory (HOST command)


Overview (HOST command)

The HOST command executes external commands at the operating system level. For a Windows operating system, for example, this is equivalent to running commands from a command prompt in a command window.

• No output is displayed in a command window. Output is either displayed in the Viewer or redirected as specified in the operating system command.

• Standard output is either displayed in a text object in the Viewer window or redirected as specified in the operating system command.

• Standard errors are displayed as text objects in the Viewer.

• Commands that return a prompt for user input result in an EOF condition without waiting for any user input (unless input has been redirected to read from a file).

• A command that generates an error condition terminates the HOST command, and no subsequent commands specified on the HOST command are executed.

• The HOST command runs synchronously. Commands that launch applications result in the suspension of further PASW Statistics processing until the application finishes execution, unless you also specify a time limit (see keyword TIMELIMIT). For example, in Windows operating systems, if a file extension is associated with an application, simply specifying a file a name an extension on the command line will launch the associated application, and no further commands will be executed until the application is closed.

• The HOST command starts in the current working directory. By default, the initial working directory is the installation directory.

• In distributed analysis mode (available with PASW Statistics Server), file paths in command specifications are relative to the remote server.

Related Topics

HOST
Syntax (HOST command)
TIMELIMIT Keyword (HOST command)
Working Directory (HOST command)


Syntax (HOST command)

The minimum specification is the command name HOST, followed by the keyword COMMAND, an equals sign (=), and one or more operating system level commands, each enclosed in quotes, with the entire set of commands enclosed in square brackets.

Example

HOST COMMAND=['dir c:\myfiles\*.sav'
              'dir c:\myfiles\*.sps > c:\myfiles\command_files.txt'
              'copy c:\myfiles\file1.txt > c:\myfiles\file2.txt'
              'dur c:\myfiles\*.xml > c:\myfiles\xmlfiles.txt'
              'c:\myfiles\myjobs\report.bat’].

• The directory listing for all .sav files is displayed in a text output object in the Viewer window.

• The directory listing for .sps files is redirected to a text file; so no output is displayed in the Viewer window.

• If file2.txt does not already exist, the copy command will copy the contents of file1.txt to a new file called file2.txt. If file2.txt exists, the copy command will not be executed since this would result in a user prompt asking for the user to confirm overwriting the file.

• The invalid dur command generates an error, which is displayed in the Viewer, and no output for that command is redirected to specified text file.

• The error condition caused by the invalid dur command terminates the HOST command, and report.bat is not run.

Related Topics

HOST
Overview (HOST command)
TIMELIMIT Keyword (HOST command)
Working Directory (HOST command)
Quoted Strings (HOST command)


Quoted Strings (HOST command)

If the command at the operating system level uses quoted strings, the standard rules for quoted strings within quoted strings apply. In general, use double-quotes to enclose a string that includes a string enclosed in single quotes, and vice-versa. See the topic String Values in Command Specifications for more information.

Related Topics

Syntax (HOST command)


TIMELIMIT Keyword (HOST command)

The optional TIMELIMIT keyword sets a time limit in seconds for execution of the bracketed list of commands. Fractional time values are rounded to the nearest integer.

Example

HOST COMMAND=[’c:\myfiles\report.bat’] TIMELIMIT=10.

Related Topics

HOST
Overview (HOST command)
Syntax (HOST command)
Working Directory (HOST command)
Using TIMELIMIT to Return Control (HOST command)


Using TIMELIMIT to Return Control (HOST command)

Since the HOST command runs synchronously, commands that launch applications result in the suspension of further PASW Statistics processing until the application finishes execution. That means that any commands that follow the HOST command will not be executed until any applications launched by the command are closed.

Example

OMS /DESTINATION FORMAT=HTML
  OUTFILE='c:\temp\temp.htm'.
FREQUENCIES VARIABLES=ALL.
OMSEND.
HOST COMMAND=['c:\temp\temp.htm'].
DESCRIPTIVES VARIABLES=ALL.

• On Windows operating systems, if the .htm extension is associated with an application (typically Internet Explorer), the HOST command in this example will launch the associated application.

• In the absence of a TIMELIMIT specification, the subsequent DESCRIPTIVES command will not be executed until the application launched by the HOST command is closed.

To make sure control is automatically returned to PASW Statistics and subsequent commands are executed, include a TIMELIMIT value, as in:

OMS /DESTINATION FORMAT=HTML
  OUTFILE='c:\temp\temp.htm'.
FREQUENCIES VARIABLES=ALL.
OMSEND.
HOST COMMAND=['c:\temp\temp.htm'] TIMELIMIT=5.
DESCRIPTIVES VARIABLES=ALL.

Related Topics

TIMELIMIT Keyword (HOST command)


Working Directory (HOST command)

HOST (command),HOST (command),HOST (command)
interactions with CD and INSERT commands,interactions with CD and INSERT commands,interactions with CD and INSERT commands
INSERT (command),INSERT (command),INSERT (command)
interaction with HOST command,interaction with HOST command,interaction with HOST command
CD (command),CD (command),CD (command)
interaction with HOST command,interaction with HOST command,interaction with HOST command

The HOST command starts in the current working directory. By default, the initial working directory is the installation directory. So, for example, HOST COMMAND=[’dir’] executed at the start of a session would typically return a directory listing of the installation directory. The working directory can be changed, however, by the CD command and the CD keyword of the INSERT command.

Example

*start of session.
HOST COMMAND=[’dir’]. /*lists contents of install directory.
CD ’c:\temp’.
HOST COMMAND=[’dir’]. /*lists contents of c:\temp directory.

Related Topics

HOST
Overview (HOST command)
Syntax (HOST command)
TIMELIMIT Keyword (HOST command)
UNC Paths on Windows Operating Systems (HOST command)


UNC Paths on Windows Operating Systems (HOST command)

To start in the PASW Statistics working directory, the HOST command actually issues an OS-level CD command that specifies the PASW Statistics working directory. On Windows operating systems, if you use UNC path specifications of the general form:

\\servername\sharename\path

on PASW Statistics commands such as CD or INSERT to set the working directory location, the HOST command will fail because UNC paths are not valid on the Windows CD command.

Example

INSERT FILE=’\\hqserver\public\report.sps’ CD=YES.
HOST [’dir’].

• The INSERT command uses a UNC path specification, and CD=YES makes that directory the working directory.

• The subsequent HOST command will generate an OS-level error message that says the current directory path is invalid because UNC paths are not supported.

Related Topics

Working Directory (HOST command)


IF

IF (command),IF (command),IF (command)
IF (command),IF (command),IF (command)
syntax chart,syntax chart,syntax chart
conditional transformations,conditional transformations,conditional transformations
data transformations,data transformations,data transformations
conditional expressions,conditional expressions,conditional expressions
data transformations,data transformations,data transformations
if case satisfies condition,if case satisfies condition,if case satisfies condition
computing values,computing values,computing values
if case satisfies condition,if case satisfies condition,if case satisfies condition
IF [(]logical expression[)] target variable=expression

This command does not read the active dataset. It is stored, pending execution with the next command that reads the dataset. See the topic Command Order for more information.

relational operators,relational operators,relational operators
data transformations,data transformations,data transformations
relational operators,relational operators,relational operators
conditional transformations,conditional transformations,conditional transformations
relational operators,relational operators,relational operators
computing values,computing values,computing values
relational operators,relational operators,relational operators

The following relational operators can be used in logical expressions:

Symbol | Definition
EQ or = | Equal to
NE or ~= or ¬ = or <> | Not equal to
LT or < | Less than
LE or <= | Less than or equal to
GT or > | Greater than
GE or >= | Greater than or equal to
logical operators,logical operators,logical operators
data transformations,data transformations,data transformations
logical operators,logical operators,logical operators
conditional transformations,conditional transformations,conditional transformations
logical operators,logical operators,logical operators
computing values,computing values,computing values
logical operators,logical operators,logical operators

The following logical operators can be used in logical expressions:

Symbol | Definition
AND or & | Both relations must be true
OR or | | Either relation can be true
NOT | Reverses the outcome of an expression

Example

IF (AGE > 20 AND SEX = 1) GROUP=2.

Related Topics

Overview (IF command)
Examples (IF command)
Operations (IF command)
Numeric Variables (IF command)
String Variables (IF command)
Missing Values and Logical Operators (IF command)


Overview (IF command)

IF (command),IF (command),IF (command)
string variables,string variables,string variables
conditional transformations,conditional transformations,conditional transformations
string variables,string variables,string variables
string variables,string variables,string variables
conditional transformations,conditional transformations,conditional transformations

IF conditionally executes a single transformation command based upon logical conditions found in the data. The transformation can create a new variable or modify the values of an existing variable for each case in the active dataset. You can create or modify the values of both numeric and string variables. If you create a new string variable, you must first declare it on the STRING command.

data transformations,data transformations,data transformations
conditional expressions,conditional expressions,conditional expressions
computing values,computing values,computing values
logical expressions,logical expressions,logical expressions
computing values,computing values,computing values
conditional expressions,conditional expressions,conditional expressions
conditional transformations,conditional transformations,conditional transformations
conditional expressions,conditional expressions,conditional expressions
data transformations,data transformations,data transformations
logical expressions,logical expressions,logical expressions
conditional transformations,conditional transformations,conditional transformations
logical expressions,logical expressions,logical expressions
logical expressions,logical expressions,logical expressions
IF (command),IF (command),IF (command)
logical expressions,logical expressions,logical expressions

IF has three components: a logical expression that sets up the logical criteria, a target variable (the one to be modified or created), and an assignment expression. The target variable’s values are modified according to the assignment expression.

IF is most efficient when used to execute a single, conditional, COMPUTE-like transformation. If you need multiple IF statements to define the condition, it is usually more efficient to use the RECODE command or a DO IF—END IF structure.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is a logical expression followed by a target variable, a required equals sign, and the assignment expression. The assignment is executed only if the logical expression is true.

Syntax Rules Collapse Hide details

Syntax Rules

• Logical expressions can be simple logical variables or relations, or complex logical tests involving variables, constants, functions, relational operators, and logical operators. Both the logical expression and the assignment expression can use any of the numeric or string functions allowed in COMPUTE transformations.

• Parentheses can be used to enclose the logical expression. Parentheses can also be used within the logical expression to specify the order of operations. Extra blanks or parentheses can be used to make the expression easier to read.

• A relation can compare variables, constants, or more complicated arithmetic expressions. Relations cannot be abbreviated. For example, (A EQ 2 OR A EQ 5) is valid, while (A EQ 2 OR 5) is not. Blanks (not commas) must be used to separate relational operators from the expressions being compared.

• A relation cannot compare a string variable to a numeric value or variable, or vice versa. A relation cannot compare the result of the logical functions SYSMIS, MISSING, ANY, or RANGE to a number.

• String values used in expressions must be specified in quotes and must include any leading or trailing blanks. Lowercase letters are considered distinct from uppercase letters.

• String variables that are used as target variables must already exist. To declare a new string variable, first create the variable with the STRING command and then specify the new variable as the target variable on IF.

Related Topics

IF
Examples (IF command)
Operations (IF command)
Numeric Variables (IF command)
String Variables (IF command)
Missing Values and Logical Operators (IF command)


Examples (IF command)

IF (command),IF (command),IF (command)
with LOOP command,with LOOP command,with LOOP command

IF with Numeric Values

IF (AGE > 20 AND SEX = 1) GROUP=2.

• The numeric variable GROUP is set to 2 for cases where AGE is greater than 20 and SEX is equal to 1.

• When the expression is false or missing, the value of GROUP remains unchanged. If GROUP has not been previously defined, it contains the system-missing value.

IF with String Values

IF (SEX EQ 'F') EEO=QUOTA+GAIN.

• The logical expression tests the string variable SEX for the value F.

• When the expression is true (when SEX equals F), the value of the numeric variable EEO is assigned the value of QUOTA plus GAIN. Both QUOTA and GAIN must be previously defined numeric variables.

• When the expression is false or missing (for example, if SEX equals F), the value of EEO remains unchanged. If EEO has not been previously defined, it contains the system-missing value.

Conditional Expressions with Arithmetic Operations

COMPUTE V3=0.
IF ((V1-V2) LE 7) V3=V1**2.

• COMPUTE assigns V3 the value 0.

• The logical expression tests whether V1 minus V2 is less than or equal to 7. If it is, the value of V3 is assigned the value of V1 squared. Otherwise, the value of V3 remains at 0.

Conditional Expressions with Arithmetic Operations and Functions

IF (ABS(A-C) LT 100) INT=100.

• IF tests whether the absolute value of the variable A minus the variable C is less than 100. If it is, INT is assigned the value 100. Otherwise, the value is unchanged. If INT has not been previously defined, it is system-missing.

Testing for Missing Values

* Test for listwise deletion of missing values.

DATA LIST  /V1 TO V6 1-6.
STRING SELECT(A1).
COMPUTE SELECT='V'.
VECTOR V=V1 TO V6.

LOOP #I=1 TO 6.
IF MISSING(V(#I)) SELECT='M'.
END LOOP.

BEGIN DATA
123456
    56
1 3456
123456
123456
END DATA.

FREQUENCIES VAR=SELECT.

• STRING creates the string variable SELECT with an A1 format and COMPUTE sets the value of SELECT to V.

• VECTOR defines the vector V as the original variables V1 to V6. Variables on a single vector must be all numeric or all string variables. In this example, because the vector V is used as an argument on the MISSING function of IF, the variables must be numeric (MISSING is not available for string variables).

• The loop structure executes six times: once for each VECTOR element. If a value is missing for any element, SELECT is set equal to M. In effect, if any case has a missing value for any of the variables V1 to V6, SELECT is set to M.

• FREQUENCIES generates a frequency table for SELECT. The table gives a count of how many cases have missing values for at least one variable and how many cases have valid values for all variables. This table can be used to determine how many cases would be dropped from an analysis that uses listwise deletion of missing values.

Example

IF YRHIRED LT 1980 RATE=0.02.
IF DEPT='SALES' DIVISION='TRANSFERRED'.

• The logical expression on the first IF command tests whether YRHIRED is less than 1980 (hired before 1980). If so, the variable RATE is set to 0.02.

• The logical expression on the second IF command tests whether DEPT equals SALES. When the condition is true, the value for the string variable DIVISION is changed to TRANSFERRED but is truncated if the format for DIVISION is not at least 11 characters wide. For any other value of DEPT, the value of DIVISION remains unchanged.

• Although there are two IF statements, each defines a separate and independent condition. The IF command is used rather than the DO IF—END IF structure in order to test both conditions on every case. If DO IF—END IF is used, control passes out of the structure as soon as the first logical condition is met.

Example

IF (STATE EQ 'IL' AND CITY EQ 13) COST=1.07 * COST.

• The logical expression tests whether STATE equals IL and CITY equals 13.

• If the logical expression is true, the numeric variable COST is increased by 7%.

• For any other value of STATE or CITY, the value of COST remains unchanged.

Example

STRING GROUP (A18).
IF (HIRED GE 1988) GROUP='Hired after merger'.

• STRING declares the string variable GROUP and assigns it a width of 18 characters.

• When HIRED is greater than or equal to 1988, GROUP is assigned the value Hired after merger. When HIRED is less than 1988, GROUP remains blank.

Example

IF (RECV GT DUE OR (REVNUES GE EXPNS AND BALNCE GT 0))STATUS='SOLVENT'.

• First, the program tests whether REVNUES is greater than or equal to EXPNS and whether BALNCE is greater than 0.

• Second, the program evaluates if RECV is greater than DUE.

• If either of these expressions is true, STATUS is assigned the value SOLVENT.

• If both expressions are false, STATUS remains unchanged.

• STATUS is an existing string variable in the active dataset. Otherwise, it would have to be declared on a preceding STRING command.

Related Topics

IF
Overview (IF command)
Operations (IF command)
Numeric Variables (IF command)
String Variables (IF command)
Missing Values and Logical Operators (IF command)


Operations (IF command)

• Each IF command evaluates every case in the data. Compare IF with DO IF, which passes control for a case out of the DO IF—END IF structure as soon as a logical condition is met.

• The logical expression is evaluated as true, false, or missing. The assignment is executed only if the logical expression is true. If the logical expression is false or missing, the assignment is not made. Existing target variables remain unchanged; new numeric variables retain their initial (system-missing) values.

IF (command),IF (command),IF (command)
missing values,missing values,missing values

• In general, a logical expression is evaluated as missing if any one of the variables used in the logical expression is system- or user-missing. However, when relations are joined by the logical operators AND or OR, the expression can sometimes be evaluated as true or false even when variables have missing values. See the topic Missing Values and Logical Operators (IF command) for more information.

Related Topics

IF
Overview (IF command)
Examples (IF command)
Numeric Variables (IF command)
String Variables (IF command)
Missing Values and Logical Operators (IF command)


Numeric Variables (IF command)

conditional transformations,conditional transformations,conditional transformations
formats of new variables,formats of new variables,formats of new variables
formats,formats,formats
of new variables,of new variables,of new variables

• Numeric variables created with IF are initially set to the system-missing value. By default, they are assigned an F8.2 format.

• Logical expressions are evaluated in the following order: functions, followed by exponentiation, arithmetic operations, relations, and logical operators. When more than one logical operator is used, NOT is evaluated first, followed by AND, and then OR. You can change the order of operations using parentheses.

• Assignment expressions are evaluated in the following order: functions, then exponentiation, and then arithmetic operators.

Related Topics

IF
Overview (IF command)
Examples (IF command)
Operations (IF command)
String Variables (IF command)
Missing Values and Logical Operators (IF command)


String Variables (IF command)

IF (command),IF (command),IF (command)
string variables,string variables,string variables
string variables,string variables,string variables
conditional transformations,conditional transformations,conditional transformations
conditional transformations,conditional transformations,conditional transformations
string variables,string variables,string variables

• New string variables declared on IF are initially set to a blank value and are assigned the format specified on the STRING command that creates them.

• Logical expressions are evaluated in the following order: string functions, then relations, and then logical operators. When more than one logical operator is used, NOT is evaluated first, followed by AND, and then OR. You can change the order of operations using parentheses.

• If the transformed value of a string variable exceeds the variable’s defined width, the transformed value is truncated. If the transformed value is shorter than the defined width, the string is right-padded with blanks.

Related Topics

IF
Overview (IF command)
Examples (IF command)
Operations (IF command)
Numeric Variables (IF command)
Missing Values and Logical Operators (IF command)


Missing Values and Logical Operators (IF command)

missing values,missing values,missing values
and logical operators,and logical operators,and logical operators
logical operators,logical operators,logical operators
missing values,missing values,missing values
IF (command),IF (command),IF (command)
missing values,missing values,missing values
conditional transformations,conditional transformations,conditional transformations
missing values,missing values,missing values

When two or more relations are joined by logical operators AND or OR, the program always returns a missing value if all of the relations in the expression are missing. However, if any one of the relations can be determined, the program interprets the expression as true or false according to the logical outcomes below. The asterisk flags expressions where the program can evaluate the outcome with incomplete information.

Logical outcomes
Expression | Outcome | Expression | Outcome
true AND true | = true | true OR true | = true
true AND false | = false | true OR false | = true
false AND false | = false | false OR false | = false
true AND missing | = missing | true OR missing | = true*
missing AND missing | = missing | missing OR missing | = missing
false AND missing | = false* | false OR missing | = missing

Related Topics

IF
Overview (IF command)
Examples (IF command)
Operations (IF command)
Numeric Variables (IF command)
String Variables (IF command)


IGRAPH

IGRAPH (command),IGRAPH (command),IGRAPH (command)
IGRAPH (command),IGRAPH (command),IGRAPH (command)
syntax chart,syntax chart,syntax chart

IGRAPH is available in the Statistics Base option.

Note: IGRAPH syntax is deprecated. It will be removed in an upcoming release. It is highly recommended that you convert existing IGRAPH syntax with the syntax converter. See the topic TABLES and IGRAPH Command Syntax Converter for more information.

IGRAPH

  [/Y=[VAR(varname1)]
      [TYPE={SCALE ([MIN=value] [MAX=value])}]
            {CATEGORICAL                    }
      [TITLE='string']]

  [/X1=[VAR(varname2)]]
       [TYPE={SCALE([MIN=value] [MAX=value])}]
             {CATEGORICAL                   }
       [TITLE='string']]

  [/X2=[VAR(varname3)]]
       [TYPE={SCALE([MIN=value] [MAX=value])}]
             {CATEGORICAL                   }
       [TITLE='string']]

  [/YLENGTH=value]

  [/X1LENGTH=value]

  [/CATORDER VAR(varname)
    ({COUNT     }   [{ASCENDING }] [{SHOWEMPTY])]
     {OCCURRENCE}    {DESCENDING}   {OMITEMPTY}
     {LABEL}
     {VALUE}

  [/COLOR=varname
      [TYPE={SCALE([MIN=value] [MAX=value])}]
            {CATEGORICAL                   }
      [LEGEND={ON|OFF}]
      [TITLE='string']]
      [{CLUSTER}]]
       {STACK  }

  [/REFLINE varname value [LABEL={ON|OFF}]
                          [SPIKE = {ON|OFF}]]
                          [COLOR={ON|OFF}]
                          [STYLE={ON|OFF}]

  [/STYLE=varname
      [LEGEND={ON|OFF}]
      [TITLE='string']]
      [{CLUSTER}]
       {STACK  }

  [/NORMALIZE]

  [/SIZE=varname
      [TYPE={SCALE([MIN=value] [MAX=value])}]
            {CATEGORICAL                   }
      [LEGEND={ON|OFF}]
      [TITLE='string']]

  [/STACK=varname]

  [/SUMMARYVAR=varname]

  [/PANEL varlist]

  [/POINTLABEL=varname]

  [/CASELABEL=varname]

  [/COORDINATE={HORIZONTAL}]
               {VERTICAL  }
               {THREE     }

  [/EFFECT={NONE }]
           {THREE}

  [/TITLE='string']

  [/SUBTITLE='string']

  [/CAPTION='string']

  [/VIEWNAME='line 1']

  [/CHARTLOOK='filename']

  [/SCATTER
      [COINCIDENT={NONE  }]
                  {JITTER}]

  [/BAR [(summary function)]
      [LABEL {INSIDE }[VAL][N]]
             {OUTSIDE}
      [BASELINE=(value)]]

  [/PIE [(summary function)]
       [START value]
       [{CW|CCW}]
       [SLICE={INSIDE } [LABEL] [PCT] [VAL] [N]]
              {OUTSIDE}
       [STACK=LABEL]

  [/BOX [OUTLIERS={ON|OFF}] [EXTREME={ON|OFF}]
        [MEDIAN={ON|OFF}]
        [WHISKER={T   }]
                 {LINE}
        [CAPWIDTH (pct)]]

  [/LINE [(summary function)]
      STYLE={DOTLINE}
            {LINE   }
            {DOT    }
            {NONE   }
      [DROPLINE={ON|OFF}]
      [LABEL=[VAL] [N] [PCT]]
      [LINELABEL=[CAT] [N] [PCT]]
      [INTERPOLATE={STRAIGHT}]
                   {LSTEP    }
                   {CSTEP    }
                   {RSTEP    }
                   {LJUMP    }
                   {RJUMP    }
                   {CJUMP    }
                   {SPLINE   }
      [BREAK={MISSING}]]
             {NONE   }

  [/AREA [(summary function)]]
     [POINTLABEL = [VAL] [N] [PCT]]
     [AREALABEL = [CAT] [N] [PCT]]
     [BASELINE=(value)]
     [INTERPOLATE={STRAIGHT}]
                  {LSTEP   }
                  {CSTEP   }
                  {RSTEP   }
     [BREAK={MISSING}]
            {NONE   }

  [/ERRORBAR [{CI(pctvalue)}]
              {SD(sdval)   }
              {SE(seval)   }
      [LABEL [VAL][N]]
      [CAPWIDTH (pct)]
      [CAPSTYLE={NONE}]
                {T   }
      [SYMBOL={ON|OFF}]
      [BASELINE=value]]

  [/HISTOGRAM [CUM]
      [SHAPE={HISTOGRAM}]
      [X1INTERVAL={AUTO   }]
                  {NUM=n  }
                  {WIDTH=n}
      [X2INTERVAL={AUTO   }]
                  {NUM=n  }
                  {WIDTH=n}
      [X1START=n]
      [X2START=n]
      [CURVE={OFF|ON}]

  [/FITLINE [METHOD={NONE             }]
                    {REGRESSION LINEAR}
                    {ORIGIN LINEAR    }
                    {MEAN             }
                    {LLR [(NORMAL|EPANECHNIKOV|UNIFORM)]
                         [BANDWIDTH={FAST|CONSTRAINED}]
                         [X1MULTIPLIER=multiplier]
                         [X2MULTIPLIER=multiplier]}
      [INTERVAL[(cval)]=[MEAN] [INDIVIDUAL]]
      [LINE=[TOTAL] [MEFFECT]]]

  [/SPIKE  {X1      }]
           {X2      }
           {Y       }
           {CORNER  }
           {ORIGIN  }
           {FLOOR   }
           {CENTROID}

   [/FORMAT [ SPIKE [COLOR={ON|OFF}] [STYLE={ON|OFF}]]
Release History Collapse Hide details

Release History

Release 18.0

• IGRAPH syntax is deprecated. It will be removed in an upcoming release. It is highly recommended that you convert existing IGRAPH syntax with the syntax converter. See the topic TABLES and IGRAPH Command Syntax Converter for more information.

• LABEL=N keyword for the BOX subcommand is ignored.

Release 16.0

• X2LENGTH subcommand is ignored.

• ChartLook .clo files are no longer supported by the CHARTLOOK subcommand. Use chart templates (.sgt files) instead. See the topic Using Chart Templates for more information.

• COINCIDENT keyword for the SCATTER subcommand can no longer specify a jittering amount.

• SHAPE keyword for the BAR subcommand is ignored. The shape of the bars is always a rectangle.

• BARBASE keyword for the BAR subcommand is ignored.

• CLUSTER keyword for the PIE subcommand is now an alias for STACK.

• TEXTIN and NUMIN are ignored by the SLICE keyword for the PIE subcommand.

• Label position values (URIGHT, LRIGHT, ULEFT, and LLEFT) are ignored by STACK keyword for the PIE subcommand. The position is always an optimal one.

• BOXBASE keyword for the BOX subcommand is ignored.

• FANCY value is ignored by the WHISKER keyword for the BOX subcommand.

• LAGRANGE3 and LAGRANGE5 values are now aliases for SPLINE for the INTERPOLATE keyword for the LINE subcommand.

• DIRECTION keyword is ignored by the ERRORBAR subcommand. Error bars always extend both above and below the mean values.

• FANCY value is ignored by the CAPSTYLE keyword for the ERRORBAR subcommand.

• TOTAL and MEFFECT values are ignored by the CENTROID keyword for the SPIKE subcommand. Spikes are always drawn to subgroup means.

• When using the FITLINE subcommand, the formula of the fit line is no longer displayed in the graph.

• The CLUSTER subcommand is now an alias for STACK.

Example

IGRAPH
    /VIEWNAME='Scatterplot'
    /X1=VAR(trial1) TYPE=SCALE
    /Y=VAR(trial3) TYPE=SCALE
    /X2=VAR(trial2) TYPE=SCALE
    /COORDINATE=THREE
    /X1LENGTH=3.0
    /YLENGTH=3.0
    /SCATTER COINCIDENT=NONE
    /FITLINE METHOD=REGRESSION LINEAR INTERVAL(90.0)=MEAN  LINE=TOTAL.

Related Topics

Overview (IGRAPH command)
General Syntax (IGRAPH command)
CATORDER Subcommand (IGRAPH command)
X1LENGTH, YLENGTH, and X2LENGTH Subcommands (IGRAPH command)
COLOR, STYLE, and SIZE Subcommands (IGRAPH command)
STACK Subcommand (IGRAPH command)
SUMMARYVAR Subcommand (IGRAPH command)
PANEL Subcommand (IGRAPH command)
POINTLABEL Subcommand (IGRAPH command)
CASELABEL Subcommand (IGRAPH command)
COORDINATE Subcommand (IGRAPH command)
EFFECT Subcommand (IGRAPH command)
TITLE, SUBTITLE, and CAPTION Subcommands (IGRAPH command)
VIEWNAME Subcommand (IGRAPH command)
CHARTLOOK Subcommand (IGRAPH command)
REFLINE Subcommand (IGRAPH command)
SPIKE Subcommand (IGRAPH command)
FORMAT Subcommand (IGRAPH command)
KEY Keyword (IGRAPH command)
Element Syntax (IGRAPH command)
SCATTER Subcommand (IGRAPH command)
AREA Subcommand (IGRAPH command)
BAR Subcommand (IGRAPH command)
PIE Subcommand (IGRAPH command)
BOX Subcommand (IGRAPH command)
LINE Subcommand (IGRAPH command)
ERRORBAR Subcommand (IGRAPH command)
HISTOGRAM Subcommand (IGRAPH command)
FITLINE Subcommand (IGRAPH command)
Summary Functions (IGRAPH command)


Overview (IGRAPH command)

The interactive Chart Editor is designed to emulate the experience of drawing a statistical chart with a pencil and paper. The Chart Editor is a highly interactive, direct manipulation environment that automates the data manipulation and drawing tasks required to draw a chart by hand, such as determining data ranges for axes; drawing ticks and labels; aggregating and summarizing data; drawing data representations such as bars, boxes, or clouds; and incorporating data dimensions as legends when the supply of dependent axes is exhausted.

The IGRAPH command creates a chart in an interactive environment. The interactive Chart Editor allows you to make extensive and fundamental changes to this chart instead of creating a new chart. The Chart Editor allows you to replace data, add new data, change dimensionality, create separate chart panels for different groups, or change the way data are represented in a chart (that is, change a bar chart into a boxplot). The Chart Editor is not a “typed” chart system. You can use chart elements in any combination, and you are not limited by “types” that the application recognizes.

To create a chart, you assign data dimensions to the domain (independent) and range (dependent) axes to create a “data region.” You also add data representations such as bars or clouds to the data region. Data representations automatically position themselves according to the data dimensions assigned to the data region.

There is no required order for assigning data dimensions or adding data representations; you can add the data dimensions first or add the data representations first. When defining the data region, you can define the range axis first or the domain axis first.

Options Collapse Hide details

Options

Titles and Captions. You can specify a title, subtitle, and caption for the chart.

Chart Type. You can request a specific type of chart using the BAR, PIE, BOX, LINE, ERRORBAR, HISTOGRAM, and SCATTERPLOT subcommands.

Chart Content. You can combine elements in a single chart. For example, you can add error bars to a bar chart.

Chart Legends. You can specify either scale legends or categorical legends. Moreover, you can specify whether a color or style is used to distinguish the legend variables.

Chart Appearance. You can specify a template, using the CHARTLOOK subcommand, to override the default chart attribute settings.

Basic Specification Collapse Hide details

Basic Specification

The minimum syntax to create a graph is simply the IGRAPH command, without any variable assignment. This will create an empty graph. To create an element in a chart, a dependent variable must be assigned and a chart element specified.

Subcommand Order Collapse Hide details

Subcommand Order

• Subcommands can be used in any order.

Syntax Rules Collapse Hide details

Syntax Rules

• EFFECT=THREE and COORDINATE=THREE cannot be specified together. If they are, the EFFECT keyword will be ignored.

Operations Collapse Hide details

Operations

• The chart title, subtitle, and caption are assigned as they are specified on the TITLE, SUBTITLE, and CAPTION subcommands. In the absence of any of these subcommands, the missing title, subtitle, or caption are null.

Related Topics

IGRAPH
General Syntax (IGRAPH command)
CATORDER Subcommand (IGRAPH command)
X1LENGTH, YLENGTH, and X2LENGTH Subcommands (IGRAPH command)
COLOR, STYLE, and SIZE Subcommands (IGRAPH command)
STACK Subcommand (IGRAPH command)
SUMMARYVAR Subcommand (IGRAPH command)
PANEL Subcommand (IGRAPH command)
POINTLABEL Subcommand (IGRAPH command)
CASELABEL Subcommand (IGRAPH command)
COORDINATE Subcommand (IGRAPH command)
EFFECT Subcommand (IGRAPH command)
TITLE, SUBTITLE, and CAPTION Subcommands (IGRAPH command)
VIEWNAME Subcommand (IGRAPH command)
CHARTLOOK Subcommand (IGRAPH command)
REFLINE Subcommand (IGRAPH command)
SPIKE Subcommand (IGRAPH command)
FORMAT Subcommand (IGRAPH command)
KEY Keyword (IGRAPH command)
Element Syntax (IGRAPH command)
SCATTER Subcommand (IGRAPH command)
AREA Subcommand (IGRAPH command)
BAR Subcommand (IGRAPH command)
PIE Subcommand (IGRAPH command)
BOX Subcommand (IGRAPH command)
LINE Subcommand (IGRAPH command)
ERRORBAR Subcommand (IGRAPH command)
HISTOGRAM Subcommand (IGRAPH command)
FITLINE Subcommand (IGRAPH command)
Summary Functions (IGRAPH command)


General Syntax (IGRAPH command)

Following are the most general-purpose subcommands. Even so, not all plots will use all subcommands. For example, if the only element in a chart is a bar, the SIZE subcommand will not be shown in the graph.

Each general subcommand may be specified only once. If one of these subcommands appears more than once, the last one is used.

Related Topics

IGRAPH
Overview (IGRAPH command)
CATORDER Subcommand (IGRAPH command)
X1LENGTH, YLENGTH, and X2LENGTH Subcommands (IGRAPH command)
COLOR, STYLE, and SIZE Subcommands (IGRAPH command)
STACK Subcommand (IGRAPH command)
SUMMARYVAR Subcommand (IGRAPH command)
PANEL Subcommand (IGRAPH command)
POINTLABEL Subcommand (IGRAPH command)
CASELABEL Subcommand (IGRAPH command)
COORDINATE Subcommand (IGRAPH command)
EFFECT Subcommand (IGRAPH command)
TITLE, SUBTITLE, and CAPTION Subcommands (IGRAPH command)
VIEWNAME Subcommand (IGRAPH command)
CHARTLOOK Subcommand (IGRAPH command)
REFLINE Subcommand (IGRAPH command)
SPIKE Subcommand (IGRAPH command)
FORMAT Subcommand (IGRAPH command)
KEY Keyword (IGRAPH command)
Element Syntax (IGRAPH command)
SCATTER Subcommand (IGRAPH command)
AREA Subcommand (IGRAPH command)
BAR Subcommand (IGRAPH command)
PIE Subcommand (IGRAPH command)
BOX Subcommand (IGRAPH command)
LINE Subcommand (IGRAPH command)
ERRORBAR Subcommand (IGRAPH command)
HISTOGRAM Subcommand (IGRAPH command)
FITLINE Subcommand (IGRAPH command)
Summary Functions (IGRAPH command)


X1, Y, and X2 Subcommands (IGRAPH command)

X1 (subcommand),X1 (subcommand),X1 (subcommand)
IGRAPH command,IGRAPH command,IGRAPH command
X1 (subcommand),X1 (subcommand),X1 (subcommand)
IGRAPH (command),IGRAPH (command),IGRAPH (command)
X2 subcommand,X2 subcommand,X2 subcommand
IGRAPH (command),IGRAPH (command),IGRAPH (command)
IGRAPH (command),IGRAPH (command),IGRAPH (command)
Y subcommand,Y subcommand,Y subcommand
IGRAPH (command),IGRAPH (command),IGRAPH (command)
IGRAPH (command),IGRAPH (command),IGRAPH (command)
X1 subcommand,X1 subcommand,X1 subcommand
IGRAPH (command),IGRAPH (command),IGRAPH (command)
X2 (subcommand),X2 (subcommand),X2 (subcommand)
IGRAPH command,IGRAPH command,IGRAPH command
X2 (subcommand),X2 (subcommand),X2 (subcommand)
Y (subcommand),Y (subcommand),Y (subcommand)
IGRAPH command,IGRAPH command,IGRAPH command
Y (subcommand),Y (subcommand),Y (subcommand)

X1 and Y, and X2 assign variables to the X1, Y, and X2 dimensions of the chart.

VAR (keyword),VAR (keyword),VAR (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
VAR (keyword),VAR (keyword),VAR (keyword)

• The variable must be enclosed in parentheses after the VAR keyword.

TITLE (keyword),TITLE (keyword),TITLE (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
TITLE (keyword),TITLE (keyword),TITLE (keyword)

• Each of these subcommands can include the TITLE keyword, specifying a string with which to title the corresponding axis.

• Each variable must be either a scale variable, a categorical variable, or a built-in data dimension. If a type is not specified, a default type is used from the variable’s definition.

SCALE (keyword),SCALE (keyword),SCALE (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
SCALE (keyword),SCALE (keyword),SCALE (keyword)
CATEGORICAL (keyword),CATEGORICAL (keyword),CATEGORICAL (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
CATEGORICAL (keyword),CATEGORICAL (keyword),CATEGORICAL (keyword)
SCALE | A scale dimension is interpreted as a measurement on some continuous scale for each case. Optionally, the minimum (MIN) and maximum (MAX) scale values can be specified. In the absence of MIN and MAX, the entire data range is used.
CATEGORICAL | A categorical dimension partitions cases into exclusive groups (each case is a member of exactly one group). The categories are represented by evenly spaced ticks.
$COUNT (keyword),$COUNT (keyword),$COUNT (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
$COUNT (keyword),$COUNT (keyword),$COUNT (keyword)
$PCT (keyword),$PCT (keyword),$PCT (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
$PCT (keyword),$PCT (keyword),$PCT (keyword)
$CASE (keyword),$CASE (keyword),$CASE (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
$CASE (keyword),$CASE (keyword),$CASE (keyword)

A built-in dimension is a user interface object used to create a chart of counts or percentages and to make a casewise chart of elements that usually aggregate data like bars or lines. The built-in dimensions are count ($COUNT), percentage ($PCT), and case ($CASE).

VAR (keyword),VAR (keyword),VAR (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
VAR (keyword),VAR (keyword),VAR (keyword)

• To create a chart that displays counts or percentages, one of the built-in data dimensions is assigned to the range (Y) axis. The VAR keyword is not used for built-in dimensions.

• Built-in count and percentage data dimensions cannot be assigned to a domain axis (X1 or X2) or to a legend subcommand.

• The count and percentage data dimensions are all scales and cannot be changed into categorizations.


CATORDER Subcommand (IGRAPH command)

CATORDER (subcommand),CATORDER (subcommand),CATORDER (subcommand)
IGRAPH command,IGRAPH command,IGRAPH command
IGRAPH (command),IGRAPH (command),IGRAPH (command)
CATORDER subcommand,CATORDER subcommand,CATORDER subcommand
sorting categories,sorting categories,sorting categories
interactive charts,interactive charts,interactive charts
category order,category order,category order
interactive charts,interactive charts,interactive charts
ordering categories,ordering categories,ordering categories
interactive charts,interactive charts,interactive charts

The CATORDER subcommand defines the order in which categories are displayed in a chart and controls the display of empty categories, based on the characteristics of a variable specified in parenthesis after the subcommand name.

• You can display categories in ascending or descending order based on category values, category value labels, counts, or values of a summary variable.

• You can either show or hide empty categories (categories with no cases).

Keywords for the CATORDER subcommand include:

empty categories,empty categories,empty categories
showing and hiding in interactive charts,showing and hiding in interactive charts,showing and hiding in interactive charts
categories,categories,categories
showing and hiding empty categories,showing and hiding empty categories,showing and hiding empty categories
ASCENDING | Display categories in ascending order of the specified order keyword.
DESCENDING | Display categories in descending order of the specified order keyword.
SHOWEMPTY | Include empty categories in the chart.
OMITEMPTY | Do not include empty categories in the chart.

ASCENDING and DESCENDING are mutually exclusive. SHOWEMPTY and OMITEMPTY are mutually exclusive.

Order keywords include:

COUNT | Sort categories based on the number of observations in each category.
OCCURRENCE | Sort categories based on the first occurrence of each unique value in the data file.
LABEL | Sort categories based on defined value labels for each category. For categories without defined value labels, the category value is used.
VALUE | Sort categories based on the values of the categories or the values of a specified summary function for the specified variable. See the topic Summary Functions (IGRAPH command) for more information.

Order keywords are mutually exclusive. You can specify only one order keyword on each CATORDER subcommand.

Related Topics

IGRAPH
Overview (IGRAPH command)
General Syntax (IGRAPH command)
X1LENGTH, YLENGTH, and X2LENGTH Subcommands (IGRAPH command)
COLOR, STYLE, and SIZE Subcommands (IGRAPH command)
STACK Subcommand (IGRAPH command)
SUMMARYVAR Subcommand (IGRAPH command)
PANEL Subcommand (IGRAPH command)
POINTLABEL Subcommand (IGRAPH command)
CASELABEL Subcommand (IGRAPH command)
COORDINATE Subcommand (IGRAPH command)
EFFECT Subcommand (IGRAPH command)
TITLE, SUBTITLE, and CAPTION Subcommands (IGRAPH command)
VIEWNAME Subcommand (IGRAPH command)
CHARTLOOK Subcommand (IGRAPH command)
REFLINE Subcommand (IGRAPH command)
SPIKE Subcommand (IGRAPH command)
FORMAT Subcommand (IGRAPH command)
KEY Keyword (IGRAPH command)
Element Syntax (IGRAPH command)
SCATTER Subcommand (IGRAPH command)
AREA Subcommand (IGRAPH command)
BAR Subcommand (IGRAPH command)
PIE Subcommand (IGRAPH command)
BOX Subcommand (IGRAPH command)
LINE Subcommand (IGRAPH command)
ERRORBAR Subcommand (IGRAPH command)
HISTOGRAM Subcommand (IGRAPH command)
FITLINE Subcommand (IGRAPH command)
Summary Functions (IGRAPH command)


X1LENGTH, YLENGTH, and X2LENGTH Subcommands (IGRAPH command)

X1LENGTH (subcommand),X1LENGTH (subcommand),X1LENGTH (subcommand)
IGRAPH command,IGRAPH command,IGRAPH command
X1LENGTH (subcommand),X1LENGTH (subcommand),X1LENGTH (subcommand)
X2LENGTH (subcommand),X2LENGTH (subcommand),X2LENGTH (subcommand)
IGRAPH command,IGRAPH command,IGRAPH command
X2LENGTH (subcommand),X2LENGTH (subcommand),X2LENGTH (subcommand)
YLENGTH (subcommand),YLENGTH (subcommand),YLENGTH (subcommand)
IGRAPH command,IGRAPH command,IGRAPH command
YLENGTH (subcommand),YLENGTH (subcommand),YLENGTH (subcommand)
IGRAPH (command),IGRAPH (command),IGRAPH (command)
X1LENGTH subcommand,X1LENGTH subcommand,X1LENGTH subcommand
IGRAPH (command),IGRAPH (command),IGRAPH (command)
IGRAPH (command),IGRAPH (command),IGRAPH (command)
X2LENGTH subcommand,X2LENGTH subcommand,X2LENGTH subcommand
IGRAPH (command),IGRAPH (command),IGRAPH (command)
IGRAPH (command),IGRAPH (command),IGRAPH (command)
YLENGTH subcommand,YLENGTH subcommand,YLENGTH subcommand
IGRAPH (command),IGRAPH (command),IGRAPH (command)

X1LENGTH and YLENGTH define the length in inches of the chart size in the direction of the corresponding axis. X2LENGTH is no longer supported and is ignored.

Example

IGRAPH
    /VIEWNAME='Scatterplot'
    /Y=VAR(sales96) TYPE=SCALE
    /X1=VAR(sales95) TYPE=SCALE
    /X2=VAR(region) TYPE=CATEGORICAL
    /X1LENGTH=2.39
    /YLENGTH=2.42
    /SCATTER.

• Y assigns sales96 to the dependent axis, defining it to be continuous.

• X1 assigns sales95 to the X1 axis, defining it to be a scale variable (continuous).

• X1LENGTH and YLENGTH define the width and height of the chart in inches.

Related Topics

IGRAPH
Overview (IGRAPH command)
General Syntax (IGRAPH command)
CATORDER Subcommand (IGRAPH command)
COLOR, STYLE, and SIZE Subcommands (IGRAPH command)
STACK Subcommand (IGRAPH command)
SUMMARYVAR Subcommand (IGRAPH command)
PANEL Subcommand (IGRAPH command)
POINTLABEL Subcommand (IGRAPH command)
CASELABEL Subcommand (IGRAPH command)
COORDINATE Subcommand (IGRAPH command)
EFFECT Subcommand (IGRAPH command)
TITLE, SUBTITLE, and CAPTION Subcommands (IGRAPH command)
VIEWNAME Subcommand (IGRAPH command)
CHARTLOOK Subcommand (IGRAPH command)
REFLINE Subcommand (IGRAPH command)
SPIKE Subcommand (IGRAPH command)
FORMAT Subcommand (IGRAPH command)
KEY Keyword (IGRAPH command)
Element Syntax (IGRAPH command)
SCATTER Subcommand (IGRAPH command)
AREA Subcommand (IGRAPH command)
BAR Subcommand (IGRAPH command)
PIE Subcommand (IGRAPH command)
BOX Subcommand (IGRAPH command)
LINE Subcommand (IGRAPH command)
ERRORBAR Subcommand (IGRAPH command)
HISTOGRAM Subcommand (IGRAPH command)
FITLINE Subcommand (IGRAPH command)
Summary Functions (IGRAPH command)


NORMALIZE Subcommand

NORMALIZE (subcommand),NORMALIZE (subcommand),NORMALIZE (subcommand)
IGRAPH command,IGRAPH command,IGRAPH command
IGRAPH (command),IGRAPH (command),IGRAPH (command)
NORMALIZE subcommand,NORMALIZE subcommand,NORMALIZE subcommand
stacked bar charts,stacked bar charts,stacked bar charts
100% stacking,100% stacking,100% stacking

The NORMALIZE subcommand creates 100% stacking for counts and converts statistics to percents. It has no additional specifications. This subcommand is valid only with the SUM, SUMAV, and SUMSQ summary functions or the $count and $pct built-in dimensions.


COLOR, STYLE, and SIZE Subcommands (IGRAPH command)

COLOR (subcommand),COLOR (subcommand),COLOR (subcommand)
IGRAPH command,IGRAPH command,IGRAPH command
COLOR (subcommand),COLOR (subcommand),COLOR (subcommand)
STYLE (subcommand),STYLE (subcommand),STYLE (subcommand)
IGRAPH command,IGRAPH command,IGRAPH command
STYLE (subcommand),STYLE (subcommand),STYLE (subcommand)
SIZE (subcommand),SIZE (subcommand),SIZE (subcommand)
IGRAPH command,IGRAPH command,IGRAPH command
SIZE (subcommand),SIZE (subcommand),SIZE (subcommand)
IGRAPH (command),IGRAPH (command),IGRAPH (command)
COLOR subcommand,COLOR subcommand,COLOR subcommand
IGRAPH (command),IGRAPH (command),IGRAPH (command)
IGRAPH (command),IGRAPH (command),IGRAPH (command)
STYLE subcommand,STYLE subcommand,STYLE subcommand
IGRAPH (command),IGRAPH (command),IGRAPH (command)
IGRAPH (command),IGRAPH (command),IGRAPH (command)
SIZE subcommand,SIZE subcommand,SIZE subcommand
IGRAPH (command),IGRAPH (command),IGRAPH (command)
legends,legends,legends
IGRAPH command,IGRAPH command,IGRAPH command

COLOR, STYLE, and SIZE specify variables used to create a legend. Each value of these variables corresponds to a unique property of the chart. The effect of these variables depends on the type of chart.

• Most charts use color in a similar fashion; casewise elements draw each case representation using the color value for the case, and summary elements draw each group representation in the color that represents a summarized value in the color data dimension.

• For dot-line charts, dot charts, and scatterplots, symbol shape is used for style variables and symbol size is used for size variables.

• For line charts and lines in a scatterplot, dash patterns encode style variables and line thickness encodes size variables.

• For bar charts, pie charts, boxplots, histograms, and error bars, fill pattern encodes style variables. Typically, these charts are not sensitive to size variables.

CATEGORICAL legend variables split the elements in the chart into categories. A categorical legend shows the reader which color, style, or size is associated with which category of the variable. The colors, styles, or sizes are assigned according to the discrete categories of the variable.

SCALE legend variables apply color or size to the elements by the value or a summary value of the legend variable, creating a continuum across the values. COLOR and SIZE can create either scale legends or categorical legends. STYLE can create categorical legends only.

Scale variables have the following keywords:

MIN (keyword),MIN (keyword),MIN (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
MIN (keyword),MIN (keyword),MIN (keyword)
MAX (keyword),MAX (keyword),MAX (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
MAX (keyword),MAX (keyword),MAX (keyword)
MIN | Defines the minimum value of the scale.
MAX | Defines the maximum value of the scale.

• The keywords MIN and MAX and their assigned values must be enclosed in parentheses.

In addition, the following keywords are available for COLOR, STYLE, and SIZE:

LEGEND (keyword),LEGEND (keyword),LEGEND (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
LEGEND (keyword),LEGEND (keyword),LEGEND (keyword)
TITLE (keyword),TITLE (keyword),TITLE (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
TITLE (keyword),TITLE (keyword),TITLE (keyword)
LEGEND | Determines if the legend is displayed or not. The legend explains how to decode color, size, or style in a chart.
TITLE | Specifies a string used to title the legend.

The following keywords are available for COLOR and STYLE:

CLUSTER (keyword),CLUSTER (keyword),CLUSTER (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
CLUSTER (keyword),CLUSTER (keyword),CLUSTER (keyword)
STACK (keyword),STACK (keyword),STACK (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
STACK (keyword),STACK (keyword),STACK (keyword)
CLUSTER | Creates clustered charts based on color or size variables.
STACK | Creates stacked charts based on color or size variables.

CLUSTER and STACK are mutually exclusive. Only one can be specified. Also, CLUSTER should not be used for both COLOR and STYLE.

Example

IGRAPH
    /VIEWNAME='Scatterplot'
    /Y=VAR(sales96) TYPE=SCALE
    /X1=VAR(sales95) TYPE=SCALE
    /X2=VAR(region) TYPE=CATEGORICAL
    /COLOR=VAR(tenure) TYPE=SCALE
    /STYLE=VAR(vol94)
    /SCATTER.

• The chart contains a three-dimensional scatterplot.

• COLOR defines a scale legend corresponding to the variable TENURE. Points appear in a continuum of colors, with the point color reflecting the value of TENURE.

• STYLE defines a categorical legend. Points appear with different shapes, with the point shape reflecting the value of VOL94.

Related Topics

IGRAPH
Overview (IGRAPH command)
General Syntax (IGRAPH command)
CATORDER Subcommand (IGRAPH command)
X1LENGTH, YLENGTH, and X2LENGTH Subcommands (IGRAPH command)
STACK Subcommand (IGRAPH command)
SUMMARYVAR Subcommand (IGRAPH command)
PANEL Subcommand (IGRAPH command)
POINTLABEL Subcommand (IGRAPH command)
CASELABEL Subcommand (IGRAPH command)
COORDINATE Subcommand (IGRAPH command)
EFFECT Subcommand (IGRAPH command)
TITLE, SUBTITLE, and CAPTION Subcommands (IGRAPH command)
VIEWNAME Subcommand (IGRAPH command)
CHARTLOOK Subcommand (IGRAPH command)
REFLINE Subcommand (IGRAPH command)
SPIKE Subcommand (IGRAPH command)
FORMAT Subcommand (IGRAPH command)
KEY Keyword (IGRAPH command)
Element Syntax (IGRAPH command)
SCATTER Subcommand (IGRAPH command)
AREA Subcommand (IGRAPH command)
BAR Subcommand (IGRAPH command)
PIE Subcommand (IGRAPH command)
BOX Subcommand (IGRAPH command)
LINE Subcommand (IGRAPH command)
ERRORBAR Subcommand (IGRAPH command)
HISTOGRAM Subcommand (IGRAPH command)
FITLINE Subcommand (IGRAPH command)
Summary Functions (IGRAPH command)


STACK Subcommand (IGRAPH command)

STACK (subcommand),STACK (subcommand),STACK (subcommand)
IGRAPH command,IGRAPH command,IGRAPH command
STACK (subcommand),STACK (subcommand),STACK (subcommand)
IGRAPH (command),IGRAPH (command),IGRAPH (command)
STACK subcommand,STACK subcommand,STACK subcommand
IGRAPH (command),IGRAPH (command),IGRAPH (command)

STACK defines the variable used to create stacked pie charts. The variable specified must be categorical. The stack will contain as many pies as there are categories in the stack variable.

Related Topics

IGRAPH
Overview (IGRAPH command)
General Syntax (IGRAPH command)
CATORDER Subcommand (IGRAPH command)
X1LENGTH, YLENGTH, and X2LENGTH Subcommands (IGRAPH command)
COLOR, STYLE, and SIZE Subcommands (IGRAPH command)
SUMMARYVAR Subcommand (IGRAPH command)
PANEL Subcommand (IGRAPH command)
POINTLABEL Subcommand (IGRAPH command)
CASELABEL Subcommand (IGRAPH command)
COORDINATE Subcommand (IGRAPH command)
EFFECT Subcommand (IGRAPH command)
TITLE, SUBTITLE, and CAPTION Subcommands (IGRAPH command)
VIEWNAME Subcommand (IGRAPH command)
CHARTLOOK Subcommand (IGRAPH command)
REFLINE Subcommand (IGRAPH command)
SPIKE Subcommand (IGRAPH command)
FORMAT Subcommand (IGRAPH command)
KEY Keyword (IGRAPH command)
Element Syntax (IGRAPH command)
SCATTER Subcommand (IGRAPH command)
AREA Subcommand (IGRAPH command)
BAR Subcommand (IGRAPH command)
PIE Subcommand (IGRAPH command)
BOX Subcommand (IGRAPH command)
LINE Subcommand (IGRAPH command)
ERRORBAR Subcommand (IGRAPH command)
HISTOGRAM Subcommand (IGRAPH command)
FITLINE Subcommand (IGRAPH command)
Summary Functions (IGRAPH command)


SUMMARYVAR Subcommand (IGRAPH command)

SUMMARYVAR (subcommand),SUMMARYVAR (subcommand),SUMMARYVAR (subcommand)
IGRAPH command,IGRAPH command,IGRAPH command
SUMMARYVAR (subcommand),SUMMARYVAR (subcommand),SUMMARYVAR (subcommand)
IGRAPH (command),IGRAPH (command),IGRAPH (command)
SUMMARYVAR subcommand,SUMMARYVAR subcommand,SUMMARYVAR subcommand
IGRAPH (command),IGRAPH (command),IGRAPH (command)
$COUNT (keyword),$COUNT (keyword),$COUNT (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
$COUNT (keyword),$COUNT (keyword),$COUNT (keyword)
$PCT (keyword),$PCT (keyword),$PCT (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
$PCT (keyword),$PCT (keyword),$PCT (keyword)

SUMMARYVAR specifies the variable or function for summarizing a pie element. It can only have the built-in variables $COUNT or $PCT or a user-defined variable name.

Specifying a user-defined variable on SUMMARYVAR requires specifying a summary function on the PIE subcommand. Valid summary functions include SUM, SUMAV, SUMSQ, NLT(x), NLE(x), NEQ(x), NGT(x), and NGE(x). The slices of the pie represent categories defined by the values of the summary function applied to SUMMARYVAR.

Related Topics

IGRAPH
Overview (IGRAPH command)
General Syntax (IGRAPH command)
CATORDER Subcommand (IGRAPH command)
X1LENGTH, YLENGTH, and X2LENGTH Subcommands (IGRAPH command)
COLOR, STYLE, and SIZE Subcommands (IGRAPH command)
STACK Subcommand (IGRAPH command)
PANEL Subcommand (IGRAPH command)
POINTLABEL Subcommand (IGRAPH command)
CASELABEL Subcommand (IGRAPH command)
COORDINATE Subcommand (IGRAPH command)
EFFECT Subcommand (IGRAPH command)
TITLE, SUBTITLE, and CAPTION Subcommands (IGRAPH command)
VIEWNAME Subcommand (IGRAPH command)
CHARTLOOK Subcommand (IGRAPH command)
REFLINE Subcommand (IGRAPH command)
SPIKE Subcommand (IGRAPH command)
FORMAT Subcommand (IGRAPH command)
KEY Keyword (IGRAPH command)
Element Syntax (IGRAPH command)
SCATTER Subcommand (IGRAPH command)
AREA Subcommand (IGRAPH command)
BAR Subcommand (IGRAPH command)
PIE Subcommand (IGRAPH command)
BOX Subcommand (IGRAPH command)
LINE Subcommand (IGRAPH command)
ERRORBAR Subcommand (IGRAPH command)
HISTOGRAM Subcommand (IGRAPH command)
FITLINE Subcommand (IGRAPH command)
Summary Functions (IGRAPH command)


PANEL Subcommand (IGRAPH command)

PANEL (subcommand),PANEL (subcommand),PANEL (subcommand)
IGRAPH command,IGRAPH command,IGRAPH command
PANEL (subcommand),PANEL (subcommand),PANEL (subcommand)
IGRAPH (command),IGRAPH (command),IGRAPH (command)
PANEL subcommand,PANEL subcommand,PANEL subcommand
IGRAPH (command),IGRAPH (command),IGRAPH (command)

PANEL specifies a categorical variable or variables for which separate charts will be created.

• Specifying a single panel variable results in a separate chart for each level of the panel variable.

• Specifying multiple panel variables results in a separate chart for each combination of levels of the panel variables.

Related Topics

IGRAPH
Overview (IGRAPH command)
General Syntax (IGRAPH command)
CATORDER Subcommand (IGRAPH command)
X1LENGTH, YLENGTH, and X2LENGTH Subcommands (IGRAPH command)
COLOR, STYLE, and SIZE Subcommands (IGRAPH command)
STACK Subcommand (IGRAPH command)
SUMMARYVAR Subcommand (IGRAPH command)
POINTLABEL Subcommand (IGRAPH command)
CASELABEL Subcommand (IGRAPH command)
COORDINATE Subcommand (IGRAPH command)
EFFECT Subcommand (IGRAPH command)
TITLE, SUBTITLE, and CAPTION Subcommands (IGRAPH command)
VIEWNAME Subcommand (IGRAPH command)
CHARTLOOK Subcommand (IGRAPH command)
REFLINE Subcommand (IGRAPH command)
SPIKE Subcommand (IGRAPH command)
FORMAT Subcommand (IGRAPH command)
KEY Keyword (IGRAPH command)
Element Syntax (IGRAPH command)
SCATTER Subcommand (IGRAPH command)
AREA Subcommand (IGRAPH command)
BAR Subcommand (IGRAPH command)
PIE Subcommand (IGRAPH command)
BOX Subcommand (IGRAPH command)
LINE Subcommand (IGRAPH command)
ERRORBAR Subcommand (IGRAPH command)
HISTOGRAM Subcommand (IGRAPH command)
FITLINE Subcommand (IGRAPH command)
Summary Functions (IGRAPH command)


POINTLABEL Subcommand (IGRAPH command)

POINTLABEL (subcommand),POINTLABEL (subcommand),POINTLABEL (subcommand)
IGRAPH command,IGRAPH command,IGRAPH command
POINTLABEL (subcommand),POINTLABEL (subcommand),POINTLABEL (subcommand)
IGRAPH (command),IGRAPH (command),IGRAPH (command)
POINTLABEL subcommand,POINTLABEL subcommand,POINTLABEL subcommand
IGRAPH (command),IGRAPH (command),IGRAPH (command)

POINTLABEL specifies a variable used to label points in a boxplot or scatterplot.

ALL (keyword),ALL (keyword),ALL (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
ALL (keyword),ALL (keyword),ALL (keyword)
NONE (keyword),NONE (keyword),NONE (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
NONE (keyword),NONE (keyword),NONE (keyword)

• If a label variable is specified without ALL or NONE, no labels are turned on (NONE).

• The keyword NONE turns all labels off.

Related Topics

IGRAPH
Overview (IGRAPH command)
General Syntax (IGRAPH command)
CATORDER Subcommand (IGRAPH command)
X1LENGTH, YLENGTH, and X2LENGTH Subcommands (IGRAPH command)
COLOR, STYLE, and SIZE Subcommands (IGRAPH command)
STACK Subcommand (IGRAPH command)
SUMMARYVAR Subcommand (IGRAPH command)
PANEL Subcommand (IGRAPH command)
CASELABEL Subcommand (IGRAPH command)
COORDINATE Subcommand (IGRAPH command)
EFFECT Subcommand (IGRAPH command)
TITLE, SUBTITLE, and CAPTION Subcommands (IGRAPH command)
VIEWNAME Subcommand (IGRAPH command)
CHARTLOOK Subcommand (IGRAPH command)
REFLINE Subcommand (IGRAPH command)
SPIKE Subcommand (IGRAPH command)
FORMAT Subcommand (IGRAPH command)
KEY Keyword (IGRAPH command)
Element Syntax (IGRAPH command)
SCATTER Subcommand (IGRAPH command)
AREA Subcommand (IGRAPH command)
BAR Subcommand (IGRAPH command)
PIE Subcommand (IGRAPH command)
BOX Subcommand (IGRAPH command)
LINE Subcommand (IGRAPH command)
ERRORBAR Subcommand (IGRAPH command)
HISTOGRAM Subcommand (IGRAPH command)
FITLINE Subcommand (IGRAPH command)
Summary Functions (IGRAPH command)


CASELABEL Subcommand (IGRAPH command)

CASELABEL (subcommand),CASELABEL (subcommand),CASELABEL (subcommand)
IGRAPH command,IGRAPH command,IGRAPH command
CASELABEL (subcommand),CASELABEL (subcommand),CASELABEL (subcommand)
IGRAPH (command),IGRAPH (command),IGRAPH (command)
CASELABEL subcommand,CASELABEL subcommand,CASELABEL subcommand
IGRAPH (command),IGRAPH (command),IGRAPH (command)

CASELABEL specifies a variable used to label cases in a chart of individual cases. For example, if you were creating a bar chart whose x axis specification was $case, CASELABEL would specify the content of the tick labels that appear on the x axis.

Related Topics

IGRAPH
Overview (IGRAPH command)
General Syntax (IGRAPH command)
CATORDER Subcommand (IGRAPH command)
X1LENGTH, YLENGTH, and X2LENGTH Subcommands (IGRAPH command)
COLOR, STYLE, and SIZE Subcommands (IGRAPH command)
STACK Subcommand (IGRAPH command)
SUMMARYVAR Subcommand (IGRAPH command)
PANEL Subcommand (IGRAPH command)
POINTLABEL Subcommand (IGRAPH command)
COORDINATE Subcommand (IGRAPH command)
EFFECT Subcommand (IGRAPH command)
TITLE, SUBTITLE, and CAPTION Subcommands (IGRAPH command)
VIEWNAME Subcommand (IGRAPH command)
CHARTLOOK Subcommand (IGRAPH command)
REFLINE Subcommand (IGRAPH command)
SPIKE Subcommand (IGRAPH command)
FORMAT Subcommand (IGRAPH command)
KEY Keyword (IGRAPH command)
Element Syntax (IGRAPH command)
SCATTER Subcommand (IGRAPH command)
AREA Subcommand (IGRAPH command)
BAR Subcommand (IGRAPH command)
PIE Subcommand (IGRAPH command)
BOX Subcommand (IGRAPH command)
LINE Subcommand (IGRAPH command)
ERRORBAR Subcommand (IGRAPH command)
HISTOGRAM Subcommand (IGRAPH command)
FITLINE Subcommand (IGRAPH command)
Summary Functions (IGRAPH command)


COORDINATE Subcommand (IGRAPH command)

COORDINATE (subcommand),COORDINATE (subcommand),COORDINATE (subcommand)
IGRAPH command,IGRAPH command,IGRAPH command
COORDINATE (subcommand),COORDINATE (subcommand),COORDINATE (subcommand)
IGRAPH (command),IGRAPH (command),IGRAPH (command)
COORDINATE subcommand,COORDINATE subcommand,COORDINATE subcommand
IGRAPH (command),IGRAPH (command),IGRAPH (command)

COORDINATE specifies the orientation of the chart.

HORIZONTAL (keyword),HORIZONTAL (keyword),HORIZONTAL (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
HORIZONTAL (keyword),HORIZONTAL (keyword),HORIZONTAL (keyword)
VERTICAL (keyword),VERTICAL (keyword),VERTICAL (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
VERTICAL (keyword),VERTICAL (keyword),VERTICAL (keyword)
THREE (keyword),THREE (keyword),THREE (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
THREE (keyword),THREE (keyword),THREE (keyword)
HORIZONTAL | The Y variable appears along the horizontal axis and the X1 variable appears along the vertical axis.
VERTICAL | The Y variable appears along the vertical axis and the X1 variable appears along the horizontal axis.
THREE | Create a three-dimensional chart. Three-dimensional charts have a default orientation that cannot be altered.

Example

IGRAPH
    /VIEWNAME='Scatterplot'
    /Y=VAR(sales96) TYPE=SCALE
    /X1=VAR(region) TYPE=CATEGORICAL
    /COORDINATE=HORIZONTAL
    /BAR (mean).

• The COORDINATE subcommand defines the bar chart as horizontal with region on the vertical dimension and means of sales96 on the horizontal dimension.

Related Topics

IGRAPH
Overview (IGRAPH command)
General Syntax (IGRAPH command)
CATORDER Subcommand (IGRAPH command)
X1LENGTH, YLENGTH, and X2LENGTH Subcommands (IGRAPH command)
COLOR, STYLE, and SIZE Subcommands (IGRAPH command)
STACK Subcommand (IGRAPH command)
SUMMARYVAR Subcommand (IGRAPH command)
PANEL Subcommand (IGRAPH command)
POINTLABEL Subcommand (IGRAPH command)
CASELABEL Subcommand (IGRAPH command)
EFFECT Subcommand (IGRAPH command)
TITLE, SUBTITLE, and CAPTION Subcommands (IGRAPH command)
VIEWNAME Subcommand (IGRAPH command)
CHARTLOOK Subcommand (IGRAPH command)
REFLINE Subcommand (IGRAPH command)
SPIKE Subcommand (IGRAPH command)
FORMAT Subcommand (IGRAPH command)
KEY Keyword (IGRAPH command)
Element Syntax (IGRAPH command)
SCATTER Subcommand (IGRAPH command)
AREA Subcommand (IGRAPH command)
BAR Subcommand (IGRAPH command)
PIE Subcommand (IGRAPH command)
BOX Subcommand (IGRAPH command)
LINE Subcommand (IGRAPH command)
ERRORBAR Subcommand (IGRAPH command)
HISTOGRAM Subcommand (IGRAPH command)
FITLINE Subcommand (IGRAPH command)
Summary Functions (IGRAPH command)


EFFECT Subcommand (IGRAPH command)

EFFECT (subcommand),EFFECT (subcommand),EFFECT (subcommand)
IGRAPH command,IGRAPH command,IGRAPH command
EFFECT (subcommand),EFFECT (subcommand),EFFECT (subcommand)
IGRAPH (command),IGRAPH (command),IGRAPH (command)
EFFECT subcommand,EFFECT subcommand,EFFECT subcommand
IGRAPH (command),IGRAPH (command),IGRAPH (command)

EFFECT displays a two-dimensional chart with additional depth along a third dimension. Two-dimensional objects other than points are displayed as three-dimensional solids.

• EFFECT is unavailable for three-dimensional charts.

Related Topics

IGRAPH
Overview (IGRAPH command)
General Syntax (IGRAPH command)
CATORDER Subcommand (IGRAPH command)
X1LENGTH, YLENGTH, and X2LENGTH Subcommands (IGRAPH command)
COLOR, STYLE, and SIZE Subcommands (IGRAPH command)
STACK Subcommand (IGRAPH command)
SUMMARYVAR Subcommand (IGRAPH command)
PANEL Subcommand (IGRAPH command)
POINTLABEL Subcommand (IGRAPH command)
CASELABEL Subcommand (IGRAPH command)
COORDINATE Subcommand (IGRAPH command)
TITLE, SUBTITLE, and CAPTION Subcommands (IGRAPH command)
VIEWNAME Subcommand (IGRAPH command)
CHARTLOOK Subcommand (IGRAPH command)
REFLINE Subcommand (IGRAPH command)
SPIKE Subcommand (IGRAPH command)
FORMAT Subcommand (IGRAPH command)
KEY Keyword (IGRAPH command)
Element Syntax (IGRAPH command)
SCATTER Subcommand (IGRAPH command)
AREA Subcommand (IGRAPH command)
BAR Subcommand (IGRAPH command)
PIE Subcommand (IGRAPH command)
BOX Subcommand (IGRAPH command)
LINE Subcommand (IGRAPH command)
ERRORBAR Subcommand (IGRAPH command)
HISTOGRAM Subcommand (IGRAPH command)
FITLINE Subcommand (IGRAPH command)
Summary Functions (IGRAPH command)


TITLE, SUBTITLE, and CAPTION Subcommands (IGRAPH command)

TITLE (subcommand),TITLE (subcommand),TITLE (subcommand)
IGRAPH command,IGRAPH command,IGRAPH command
TITLE (subcommand),TITLE (subcommand),TITLE (subcommand)
SUBTITLE (subcommand),SUBTITLE (subcommand),SUBTITLE (subcommand)
IGRAPH command,IGRAPH command,IGRAPH command
SUBTITLE (subcommand),SUBTITLE (subcommand),SUBTITLE (subcommand)
CAPTION (subcommand),CAPTION (subcommand),CAPTION (subcommand)
IGRAPH command,IGRAPH command,IGRAPH command
CAPTION (subcommand),CAPTION (subcommand),CAPTION (subcommand)
IGRAPH (command),IGRAPH (command),IGRAPH (command)
TITLE subcommand,TITLE subcommand,TITLE subcommand
IGRAPH (command),IGRAPH (command),IGRAPH (command)
IGRAPH (command),IGRAPH (command),IGRAPH (command)
SUBTITLE subcommand,SUBTITLE subcommand,SUBTITLE subcommand
IGRAPH (command),IGRAPH (command),IGRAPH (command)
IGRAPH (command),IGRAPH (command),IGRAPH (command)
CAPTION subcommand,CAPTION subcommand,CAPTION subcommand
IGRAPH (command),IGRAPH (command),IGRAPH (command)

TITLE, SUBTITLE, and CAPTION specify lines of text placed at the top or bottom of a chart.

• Multiple lines of text can be entered using the carriage control character (\n).

• Each title, subtitle, or caption must be enclosed in apostrophes or quotation marks.

• The maximum length of a title, subtitle, or caption is 255 characters.

• The font, point size, color, alignment, and orientation of the title, subtitle, and caption text is determined by the ChartLook.

Related Topics

IGRAPH
Overview (IGRAPH command)
General Syntax (IGRAPH command)
CATORDER Subcommand (IGRAPH command)
X1LENGTH, YLENGTH, and X2LENGTH Subcommands (IGRAPH command)
COLOR, STYLE, and SIZE Subcommands (IGRAPH command)
STACK Subcommand (IGRAPH command)
SUMMARYVAR Subcommand (IGRAPH command)
PANEL Subcommand (IGRAPH command)
POINTLABEL Subcommand (IGRAPH command)
CASELABEL Subcommand (IGRAPH command)
COORDINATE Subcommand (IGRAPH command)
EFFECT Subcommand (IGRAPH command)
VIEWNAME Subcommand (IGRAPH command)
CHARTLOOK Subcommand (IGRAPH command)
REFLINE Subcommand (IGRAPH command)
SPIKE Subcommand (IGRAPH command)
FORMAT Subcommand (IGRAPH command)
KEY Keyword (IGRAPH command)
Element Syntax (IGRAPH command)
SCATTER Subcommand (IGRAPH command)
AREA Subcommand (IGRAPH command)
BAR Subcommand (IGRAPH command)
PIE Subcommand (IGRAPH command)
BOX Subcommand (IGRAPH command)
LINE Subcommand (IGRAPH command)
ERRORBAR Subcommand (IGRAPH command)
HISTOGRAM Subcommand (IGRAPH command)
FITLINE Subcommand (IGRAPH command)
Summary Functions (IGRAPH command)


VIEWNAME Subcommand (IGRAPH command)

VIEWNAME (subcommand),VIEWNAME (subcommand),VIEWNAME (subcommand)
IGRAPH command,IGRAPH command,IGRAPH command
VIEWNAME (subcommand),VIEWNAME (subcommand),VIEWNAME (subcommand)
IGRAPH (command),IGRAPH (command),IGRAPH (command)
VIEWNAME subcommand,VIEWNAME subcommand,VIEWNAME subcommand
IGRAPH (command),IGRAPH (command),IGRAPH (command)

VIEWNAME assigns a name to the chart, which will appear in the outline pane of the Viewer. The name can have a maximum of 255 characters.

Related Topics

IGRAPH
Overview (IGRAPH command)
General Syntax (IGRAPH command)
CATORDER Subcommand (IGRAPH command)
X1LENGTH, YLENGTH, and X2LENGTH Subcommands (IGRAPH command)
COLOR, STYLE, and SIZE Subcommands (IGRAPH command)
STACK Subcommand (IGRAPH command)
SUMMARYVAR Subcommand (IGRAPH command)
PANEL Subcommand (IGRAPH command)
POINTLABEL Subcommand (IGRAPH command)
CASELABEL Subcommand (IGRAPH command)
COORDINATE Subcommand (IGRAPH command)
EFFECT Subcommand (IGRAPH command)
TITLE, SUBTITLE, and CAPTION Subcommands (IGRAPH command)
CHARTLOOK Subcommand (IGRAPH command)
REFLINE Subcommand (IGRAPH command)
SPIKE Subcommand (IGRAPH command)
FORMAT Subcommand (IGRAPH command)
KEY Keyword (IGRAPH command)
Element Syntax (IGRAPH command)
SCATTER Subcommand (IGRAPH command)
AREA Subcommand (IGRAPH command)
BAR Subcommand (IGRAPH command)
PIE Subcommand (IGRAPH command)
BOX Subcommand (IGRAPH command)
LINE Subcommand (IGRAPH command)
ERRORBAR Subcommand (IGRAPH command)
HISTOGRAM Subcommand (IGRAPH command)
FITLINE Subcommand (IGRAPH command)
Summary Functions (IGRAPH command)


CHARTLOOK Subcommand (IGRAPH command)

CHARTLOOK (subcommand),CHARTLOOK (subcommand),CHARTLOOK (subcommand)
IGRAPH command,IGRAPH command,IGRAPH command
CHARTLOOK (subcommand),CHARTLOOK (subcommand),CHARTLOOK (subcommand)
IGRAPH (command),IGRAPH (command),IGRAPH (command)
CHARTLOOK subcommand,CHARTLOOK subcommand,CHARTLOOK subcommand
IGRAPH (command),IGRAPH (command),IGRAPH (command)

CHARTLOOK identifies a template file containing specifications concerning the initial visual properties of a chart, such as fill, color, font, style, and symbol. By specifying a template, you can control cosmetic properties that are not explicitly available as syntax keywords.

Valid template files have an .sgt extension (old ChartLook .clo files are no longer supported). Files designated on CHARTLOOK must either be included with the software or created in the Chart Editor by saving a chart as a template. For more information about templates, see Using Chart Templates.

You can specify multiple templates by listing them in square brackets and separating each file name with a space (for example, CHARTLOOK=['template1.sgt' 'template2.sgt']). Templates are applied in the order in which they appear. If any of the settings in multiple templates conflict, the settings in the last template override the conflicting settings in previous templates.

A template contains values for the following properties:

• Color sequence for categorical color legends

• Color range for scale color legends

• Line style sequence for categorical style legends

• Symbol style sequence for categorical style legends

• Categorical legend fill styles

• Categorical symbol size sequence for categorical size legends

• Symbol size sequence for scale size sequences

• Categorical line weight sequence for categorical size legends

• Font, size, alignment, bold, and italic properties for text objects

• Fill and border for filled objects

• Style, weight, and color for line objects

• Font, shape, size, and color for symbol objects

• Style, weight, and color for visual connectors

• Axis properties: axis line style, color, and weight; major tick shape, location, color, and size

Example

IGRAPH
    /VIEWNAME='Slide 1'
    /X1=VAR(sales95) TYPE=SCALE
    /Y=VAR(sales96) TYPE=SCALE
    /X2=VAR(region) TYPE=CATEGORICAL
    /COORDINATE=THREE
    /POINTLABEL=VAR(division) NONE
    /TITLE='Scatterplot Comparing Regions'
    /SUBTITLE='Predicting 1996 Sales\nfrom 1995 Sales'
    /CHARTLOOK='Classic.sgt'
    /SCATTER.

• VIEWNAME assigns the name Slide 1 to the chart. The outline pane of the Viewer uses this name for the chart.

• Points in the chart are labeled with the values of division. Initially, all labels are off. Labels for individual points can be turned on interactively after creating the chart.

• TITLE and SUBTITLE define text to appear of the plot. The subtitle contains a carriage return between Sales and from.

• The appearance of the chart is defined in the Classic template.

Related Topics

IGRAPH
Overview (IGRAPH command)
General Syntax (IGRAPH command)
CATORDER Subcommand (IGRAPH command)
X1LENGTH, YLENGTH, and X2LENGTH Subcommands (IGRAPH command)
COLOR, STYLE, and SIZE Subcommands (IGRAPH command)
STACK Subcommand (IGRAPH command)
SUMMARYVAR Subcommand (IGRAPH command)
PANEL Subcommand (IGRAPH command)
POINTLABEL Subcommand (IGRAPH command)
CASELABEL Subcommand (IGRAPH command)
COORDINATE Subcommand (IGRAPH command)
EFFECT Subcommand (IGRAPH command)
TITLE, SUBTITLE, and CAPTION Subcommands (IGRAPH command)
VIEWNAME Subcommand (IGRAPH command)
REFLINE Subcommand (IGRAPH command)
SPIKE Subcommand (IGRAPH command)
FORMAT Subcommand (IGRAPH command)
KEY Keyword (IGRAPH command)
Element Syntax (IGRAPH command)
SCATTER Subcommand (IGRAPH command)
AREA Subcommand (IGRAPH command)
BAR Subcommand (IGRAPH command)
PIE Subcommand (IGRAPH command)
BOX Subcommand (IGRAPH command)
LINE Subcommand (IGRAPH command)
ERRORBAR Subcommand (IGRAPH command)
HISTOGRAM Subcommand (IGRAPH command)
FITLINE Subcommand (IGRAPH command)
Summary Functions (IGRAPH command)


REFLINE Subcommand (IGRAPH command)

The REFLINE subcommand inserts a reference line for the specified variable at the specified value. Optional keywords are:

LABEL={ON|OFF} | Display a label for the reference line. For variables with defined value labels, the value label for the specified value is displayed. If there is no defined value label for the specified value, the specified value is displayed.
SPIKE={ON|OFF} | Display spikes from the reference line to individual data points.

Example

IGRAPH
  /X1 = VAR(gender) TYPE = CATEGORICAL
  /Y = VAR(salary) TYPE = SCALE
  /BAR(MEAN)
  /REFLINE salary 30000 LABEL=ON.

Related Topics

IGRAPH
Overview (IGRAPH command)
General Syntax (IGRAPH command)
CATORDER Subcommand (IGRAPH command)
X1LENGTH, YLENGTH, and X2LENGTH Subcommands (IGRAPH command)
COLOR, STYLE, and SIZE Subcommands (IGRAPH command)
STACK Subcommand (IGRAPH command)
SUMMARYVAR Subcommand (IGRAPH command)
PANEL Subcommand (IGRAPH command)
POINTLABEL Subcommand (IGRAPH command)
CASELABEL Subcommand (IGRAPH command)
COORDINATE Subcommand (IGRAPH command)
EFFECT Subcommand (IGRAPH command)
TITLE, SUBTITLE, and CAPTION Subcommands (IGRAPH command)
VIEWNAME Subcommand (IGRAPH command)
CHARTLOOK Subcommand (IGRAPH command)
SPIKE Subcommand (IGRAPH command)
FORMAT Subcommand (IGRAPH command)
KEY Keyword (IGRAPH command)
Element Syntax (IGRAPH command)
SCATTER Subcommand (IGRAPH command)
AREA Subcommand (IGRAPH command)
BAR Subcommand (IGRAPH command)
PIE Subcommand (IGRAPH command)
BOX Subcommand (IGRAPH command)
LINE Subcommand (IGRAPH command)
ERRORBAR Subcommand (IGRAPH command)
HISTOGRAM Subcommand (IGRAPH command)
FITLINE Subcommand (IGRAPH command)
Summary Functions (IGRAPH command)


SPIKE Subcommand (IGRAPH command)

SPIKE (subcommand),SPIKE (subcommand),SPIKE (subcommand)
IGRAPH command,IGRAPH command,IGRAPH command
IGRAPH (command),IGRAPH (command),IGRAPH (command)
SPIKE subcommand,SPIKE subcommand,SPIKE subcommand
spikes,spikes,spikes
in interactive charts,in interactive charts,in interactive charts

The SPIKE subcommand inserts spikes from individual data points to the specified location. Keywords for location include:

X1 | Display spikes to the X1 axis.
X2 | Display spikes to the X2 axis.
Y | Display spikes to the Y axis.
CORNER | Display spikes to the corner defined by the lowest displayed values of the X1, X2, and Y axes.
ORIGIN | Display spikes to the origin. The origin is the point defined by the 0 values for the X1, X2, and Y axes.
FLOOR | Display spikes to the “floor” defined by the X1 and X2 axes.
CENTROID | Display spikes to the point defined by the subgroup mean values of the X1, X2, and Y variables. CENTROID=TOTAL is no longer supported. Spikes are always drawn to subgroup means defined by color and/or style variables.

Example:

IGRAPH
  /X1 = VAR(salbegin) TYPE = SCALE
  /Y = VAR(salary) TYPE = SCALE
  /COLOR = VAR(gender) TYPE = CATEGORICAL
  /SPIKE CENTROID.

Related Topics

IGRAPH
Overview (IGRAPH command)
General Syntax (IGRAPH command)
CATORDER Subcommand (IGRAPH command)
X1LENGTH, YLENGTH, and X2LENGTH Subcommands (IGRAPH command)
COLOR, STYLE, and SIZE Subcommands (IGRAPH command)
STACK Subcommand (IGRAPH command)
SUMMARYVAR Subcommand (IGRAPH command)
PANEL Subcommand (IGRAPH command)
POINTLABEL Subcommand (IGRAPH command)
CASELABEL Subcommand (IGRAPH command)
COORDINATE Subcommand (IGRAPH command)
EFFECT Subcommand (IGRAPH command)
TITLE, SUBTITLE, and CAPTION Subcommands (IGRAPH command)
VIEWNAME Subcommand (IGRAPH command)
CHARTLOOK Subcommand (IGRAPH command)
REFLINE Subcommand (IGRAPH command)
FORMAT Subcommand (IGRAPH command)
KEY Keyword (IGRAPH command)
Element Syntax (IGRAPH command)
SCATTER Subcommand (IGRAPH command)
AREA Subcommand (IGRAPH command)
BAR Subcommand (IGRAPH command)
PIE Subcommand (IGRAPH command)
BOX Subcommand (IGRAPH command)
LINE Subcommand (IGRAPH command)
ERRORBAR Subcommand (IGRAPH command)
HISTOGRAM Subcommand (IGRAPH command)
FITLINE Subcommand (IGRAPH command)
Summary Functions (IGRAPH command)


FORMAT Subcommand (IGRAPH command)

FORMAT (subcommand),FORMAT (subcommand),FORMAT (subcommand)
IGRAPH command,IGRAPH command,IGRAPH command
IGRAPH (command),IGRAPH (command),IGRAPH (command)
FORMAT subcommand,FORMAT subcommand,FORMAT subcommand

For charts with color or style variables, the FORMAT subcommand controls the color and style attributes of spikes. The keywords are:

SPIKE | Applies color and style specifications to spikes. This keyword is required.
COLOR{ON|OFF} | Controls use of color in spikes as defined by color variable. The default is ON.
STYLE {ON|OFF} | Controls use of line style in spikes as defined by style variable. The default is ON.

Example

IGRAPH
  /X1 = VAR(salbegin) TYPE = SCALE
  /Y = VAR(salary) TYPE = SCALE
  /COLOR = VAR(gender) TYPE = CATEGORICAL
  /SPIKE CENTROID
  /FORMAT SPIKE COLOR=OFF.

Related Topics

IGRAPH
Overview (IGRAPH command)
General Syntax (IGRAPH command)
CATORDER Subcommand (IGRAPH command)
X1LENGTH, YLENGTH, and X2LENGTH Subcommands (IGRAPH command)
COLOR, STYLE, and SIZE Subcommands (IGRAPH command)
STACK Subcommand (IGRAPH command)
SUMMARYVAR Subcommand (IGRAPH command)
PANEL Subcommand (IGRAPH command)
POINTLABEL Subcommand (IGRAPH command)
CASELABEL Subcommand (IGRAPH command)
COORDINATE Subcommand (IGRAPH command)
EFFECT Subcommand (IGRAPH command)
TITLE, SUBTITLE, and CAPTION Subcommands (IGRAPH command)
VIEWNAME Subcommand (IGRAPH command)
CHARTLOOK Subcommand (IGRAPH command)
REFLINE Subcommand (IGRAPH command)
SPIKE Subcommand (IGRAPH command)
KEY Keyword (IGRAPH command)
Element Syntax (IGRAPH command)
SCATTER Subcommand (IGRAPH command)
AREA Subcommand (IGRAPH command)
BAR Subcommand (IGRAPH command)
PIE Subcommand (IGRAPH command)
BOX Subcommand (IGRAPH command)
LINE Subcommand (IGRAPH command)
ERRORBAR Subcommand (IGRAPH command)
HISTOGRAM Subcommand (IGRAPH command)
FITLINE Subcommand (IGRAPH command)
Summary Functions (IGRAPH command)


KEY Keyword (IGRAPH command)

KEY (keyword),KEY (keyword),KEY (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
IGRAPH (command),IGRAPH (command),IGRAPH (command)
KEY keyword,KEY keyword,KEY keyword
keys,keys,keys
showing and hiding in interactive charts,showing and hiding in interactive charts,showing and hiding in interactive charts
hiding keys,hiding keys,hiding keys
in interactive charts,in interactive charts,in interactive charts

All interactive chart types except histograms include a key element that identifies the summary measures displayed in the chart (for example, counts, means, and medians). The KEY keyword controls the display of the key in the chart. The default is ON, which displays the key. The OFF specification hides the key. The KEY specification is part of the subcommand that defines the chart type.

Example

IGRAPH
  /X1 = VAR(jobcat) TYPE = CATEGORICAL
  /Y = $count
  /BAR KEY=OFF.

Related Topics

IGRAPH
Overview (IGRAPH command)
General Syntax (IGRAPH command)
CATORDER Subcommand (IGRAPH command)
X1LENGTH, YLENGTH, and X2LENGTH Subcommands (IGRAPH command)
COLOR, STYLE, and SIZE Subcommands (IGRAPH command)
STACK Subcommand (IGRAPH command)
SUMMARYVAR Subcommand (IGRAPH command)
PANEL Subcommand (IGRAPH command)
POINTLABEL Subcommand (IGRAPH command)
CASELABEL Subcommand (IGRAPH command)
COORDINATE Subcommand (IGRAPH command)
EFFECT Subcommand (IGRAPH command)
TITLE, SUBTITLE, and CAPTION Subcommands (IGRAPH command)
VIEWNAME Subcommand (IGRAPH command)
CHARTLOOK Subcommand (IGRAPH command)
REFLINE Subcommand (IGRAPH command)
SPIKE Subcommand (IGRAPH command)
FORMAT Subcommand (IGRAPH command)
Element Syntax (IGRAPH command)
SCATTER Subcommand (IGRAPH command)
AREA Subcommand (IGRAPH command)
BAR Subcommand (IGRAPH command)
PIE Subcommand (IGRAPH command)
BOX Subcommand (IGRAPH command)
LINE Subcommand (IGRAPH command)
ERRORBAR Subcommand (IGRAPH command)
HISTOGRAM Subcommand (IGRAPH command)
FITLINE Subcommand (IGRAPH command)
Summary Functions (IGRAPH command)


Element Syntax (IGRAPH command)

The following subcommands add elements to a chart. The same subcommand can be specified more than once. Each subcommand adds another element to the chart.

Related Topics

IGRAPH
Overview (IGRAPH command)
General Syntax (IGRAPH command)
CATORDER Subcommand (IGRAPH command)
X1LENGTH, YLENGTH, and X2LENGTH Subcommands (IGRAPH command)
COLOR, STYLE, and SIZE Subcommands (IGRAPH command)
STACK Subcommand (IGRAPH command)
SUMMARYVAR Subcommand (IGRAPH command)
PANEL Subcommand (IGRAPH command)
POINTLABEL Subcommand (IGRAPH command)
CASELABEL Subcommand (IGRAPH command)
COORDINATE Subcommand (IGRAPH command)
EFFECT Subcommand (IGRAPH command)
TITLE, SUBTITLE, and CAPTION Subcommands (IGRAPH command)
VIEWNAME Subcommand (IGRAPH command)
CHARTLOOK Subcommand (IGRAPH command)
REFLINE Subcommand (IGRAPH command)
SPIKE Subcommand (IGRAPH command)
FORMAT Subcommand (IGRAPH command)
KEY Keyword (IGRAPH command)
SCATTER Subcommand (IGRAPH command)
AREA Subcommand (IGRAPH command)
BAR Subcommand (IGRAPH command)
PIE Subcommand (IGRAPH command)
BOX Subcommand (IGRAPH command)
LINE Subcommand (IGRAPH command)
ERRORBAR Subcommand (IGRAPH command)
HISTOGRAM Subcommand (IGRAPH command)
FITLINE Subcommand (IGRAPH command)
Summary Functions (IGRAPH command)


SCATTER Subcommand (IGRAPH command)

SCATTER (subcommand),SCATTER (subcommand),SCATTER (subcommand)
IGRAPH command,IGRAPH command,IGRAPH command
SCATTER (subcommand),SCATTER (subcommand),SCATTER (subcommand)
IGRAPH (command),IGRAPH (command),IGRAPH (command)
SCATTER subcommand,SCATTER subcommand,SCATTER subcommand
IGRAPH (command),IGRAPH (command),IGRAPH (command)

SCATTER produces two- or three-dimensional scatterplots. Scatterplots can use either categorical or scale dimensions to create color or size legends. Categorical dimensions are required to create style legends.

COINCIDENT (keyword),COINCIDENT (keyword),COINCIDENT (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
COINCIDENT (keyword),COINCIDENT (keyword),COINCIDENT (keyword)

The keyword COINCIDENT controls the placement of markers that have identical values on all axes. COINCIDENT can have one of the following two values:

NONE (keyword),NONE (keyword),NONE (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
NONE (keyword),NONE (keyword),NONE (keyword)
JITTER (keyword),JITTER (keyword),JITTER (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
JITTER (keyword),JITTER (keyword),JITTER (keyword)
NONE | Places coincident markers on top of one another. This is the default value.
JITTER | Adds a small amount of random noise to all scale axis dimensions. Specifying an amount is no longer supported and is ignored.

Example

IGRAPH
    /Y=VAR(sales96) TYPE=SCALE
    /X1=VAR(sales95) TYPE=SCALE
    /COORDINATE=VERTICAL
    /SCATTER COINCIDENT=JITTER.

• COORDINATE defines the chart as two-dimensional with sales96 on the vertical dimension.

• SCATTER creates a scatterplot of sales96 and sales95.

• The scale axes have random noise added by the JITTER keyword allowing separation of coincident points.

Related Topics

IGRAPH
Overview (IGRAPH command)
General Syntax (IGRAPH command)
CATORDER Subcommand (IGRAPH command)
X1LENGTH, YLENGTH, and X2LENGTH Subcommands (IGRAPH command)
COLOR, STYLE, and SIZE Subcommands (IGRAPH command)
STACK Subcommand (IGRAPH command)
SUMMARYVAR Subcommand (IGRAPH command)
PANEL Subcommand (IGRAPH command)
POINTLABEL Subcommand (IGRAPH command)
CASELABEL Subcommand (IGRAPH command)
COORDINATE Subcommand (IGRAPH command)
EFFECT Subcommand (IGRAPH command)
TITLE, SUBTITLE, and CAPTION Subcommands (IGRAPH command)
VIEWNAME Subcommand (IGRAPH command)
CHARTLOOK Subcommand (IGRAPH command)
REFLINE Subcommand (IGRAPH command)
SPIKE Subcommand (IGRAPH command)
FORMAT Subcommand (IGRAPH command)
KEY Keyword (IGRAPH command)
Element Syntax (IGRAPH command)
AREA Subcommand (IGRAPH command)
BAR Subcommand (IGRAPH command)
PIE Subcommand (IGRAPH command)
BOX Subcommand (IGRAPH command)
LINE Subcommand (IGRAPH command)
ERRORBAR Subcommand (IGRAPH command)
HISTOGRAM Subcommand (IGRAPH command)
FITLINE Subcommand (IGRAPH command)
Summary Functions (IGRAPH command)


AREA Subcommand (IGRAPH command)

IGRAPH (command),IGRAPH (command),IGRAPH (command)
AREA subcommand,AREA subcommand,AREA subcommand

AREA creates area charts. These charts summarize categories of one or more variables. The following keywords are available:

summary functions,summary functions,summary functions
IGRAPH command,IGRAPH command,IGRAPH command
summary functions,summary functions,summary functions
$COUNT (keyword),$COUNT (keyword),$COUNT (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
$COUNT (keyword),$COUNT (keyword),$COUNT (keyword)
$PCT (keyword),$PCT (keyword),$PCT (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
$PCT (keyword),$PCT (keyword),$PCT (keyword)
MODE (keyword),MODE (keyword),MODE (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
MODE (keyword),MODE (keyword),MODE (keyword)
LABEL (keyword),LABEL (keyword),LABEL (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
LABEL (keyword),LABEL (keyword),LABEL (keyword)
VAL (keyword),VAL (keyword),VAL (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
VAL (keyword),VAL (keyword),VAL (keyword)
PCT (keyword),PCT (keyword),PCT (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
PCT (keyword),PCT (keyword),PCT (keyword)
N (keyword),N (keyword),N (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
N (keyword),N (keyword),N (keyword)
AREALABEL (keyword),AREALABEL (keyword),AREALABEL (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
AREALABEL (keyword),AREALABEL (keyword),AREALABEL (keyword)
CAT (keyword),CAT (keyword),CAT (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
CAT (keyword),CAT (keyword),CAT (keyword)
PCT (keyword),PCT (keyword),PCT (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
PCT (keyword),PCT (keyword),PCT (keyword)
N (keyword),N (keyword),N (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
N (keyword),N (keyword),N (keyword)
BREAK (keyword),BREAK (keyword),BREAK (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
BREAK (keyword),BREAK (keyword),BREAK (keyword)
MISSING (keyword),MISSING (keyword),MISSING (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
MISSING (keyword),MISSING (keyword),MISSING (keyword)
NONE (keyword),NONE (keyword),NONE (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
NONE (keyword),NONE (keyword),NONE (keyword)
(keyword),(keyword),(keyword)
IGRAPH command,IGRAPH command,IGRAPH command
BASELINE (keyword),BASELINE (keyword),BASELINE (keyword)
summary function | Defines a function used to summarize the variable defined on the Y subcommand. If the Y axis assignment is $COUNT or $PCT, the AREA subcommand cannot have a summary function. If the Y subcommand specifies TYPE=CATEGORICAL, then AREA can only specify MODE as the summary function.
POINTLABEL | Labels points with the actual values corresponding to the dependent axis (VAL), the percentage of cases (PCT), and the number of cases included in each data point (N). The default is no labels.
AREALABEL | Labels area with category labels (CAT), the percentage of cases (PCT), and the number of cases included in each line (N). The default is no labels.
BREAK | Indicates whether the lines break at missing values (MISSING) or not (NONE).
BASELINE | The baseline value determines the location from which the areas will hang (vertical) or extend (horizontal). The default value is 0.
INTERPOLATE (keyword),INTERPOLATE (keyword),INTERPOLATE (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
INTERPOLATE (keyword),INTERPOLATE (keyword),INTERPOLATE (keyword)

The INTERPOLATE keyword determines how the lines connecting the points are drawn. Options include:

STRAIGHT (keyword),STRAIGHT (keyword),STRAIGHT (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
STRAIGHT (keyword),STRAIGHT (keyword),STRAIGHT (keyword)
LSTEP (keyword),LSTEP (keyword),LSTEP (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
LSTEP (keyword),LSTEP (keyword),LSTEP (keyword)
CSTEP (keyword),CSTEP (keyword),CSTEP (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
CSTEP (keyword),CSTEP (keyword),CSTEP (keyword)
RSTEP (keyword),RSTEP (keyword),RSTEP (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
RSTEP (keyword),RSTEP (keyword),RSTEP (keyword)
STRAIGHT | Straight lines.
LSTEP | A horizontal line extends from each data point. A vertical riser connects the line to the next data point.
CSTEP | Each data point is centered on a horizontal line that extends half of the distance between consecutive points. Vertical risers connect the line to the next horizontal line.
RSTEP | A horizontal line terminates at each data point. A vertical riser extends from each data point, connecting to the next horizontal line.

Related Topics

IGRAPH
Overview (IGRAPH command)
General Syntax (IGRAPH command)
CATORDER Subcommand (IGRAPH command)
X1LENGTH, YLENGTH, and X2LENGTH Subcommands (IGRAPH command)
COLOR, STYLE, and SIZE Subcommands (IGRAPH command)
STACK Subcommand (IGRAPH command)
SUMMARYVAR Subcommand (IGRAPH command)
PANEL Subcommand (IGRAPH command)
POINTLABEL Subcommand (IGRAPH command)
CASELABEL Subcommand (IGRAPH command)
COORDINATE Subcommand (IGRAPH command)
EFFECT Subcommand (IGRAPH command)
TITLE, SUBTITLE, and CAPTION Subcommands (IGRAPH command)
VIEWNAME Subcommand (IGRAPH command)
CHARTLOOK Subcommand (IGRAPH command)
REFLINE Subcommand (IGRAPH command)
SPIKE Subcommand (IGRAPH command)
FORMAT Subcommand (IGRAPH command)
KEY Keyword (IGRAPH command)
Element Syntax (IGRAPH command)
SCATTER Subcommand (IGRAPH command)
BAR Subcommand (IGRAPH command)
PIE Subcommand (IGRAPH command)
BOX Subcommand (IGRAPH command)
LINE Subcommand (IGRAPH command)
ERRORBAR Subcommand (IGRAPH command)
HISTOGRAM Subcommand (IGRAPH command)
FITLINE Subcommand (IGRAPH command)
Summary Functions (IGRAPH command)


BAR Subcommand (IGRAPH command)

BAR (subcommand),BAR (subcommand),BAR (subcommand)
IGRAPH command,IGRAPH command,IGRAPH command
BAR (subcommand),BAR (subcommand),BAR (subcommand)
IGRAPH (command),IGRAPH (command),IGRAPH (command)
BAR subcommand,BAR subcommand,BAR subcommand
IGRAPH (command),IGRAPH (command),IGRAPH (command)

BAR creates a bar element in a chart, corresponding to the X1, X2, and Y axis assignments. Bars can be clustered by assigning variables to COLOR or STYLE. Horizontal or vertical orientation is specified by the COORDINATE subcommand.

summary functions,summary functions,summary functions
IGRAPH command,IGRAPH command,IGRAPH command
summary functions,summary functions,summary functions
$COUNT (keyword),$COUNT (keyword),$COUNT (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
$COUNT (keyword),$COUNT (keyword),$COUNT (keyword)
$PCT (keyword),$PCT (keyword),$PCT (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
$PCT (keyword),$PCT (keyword),$PCT (keyword)
MODE (keyword),MODE (keyword),MODE (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
MODE (keyword),MODE (keyword),MODE (keyword)
LABEL (keyword),LABEL (keyword),LABEL (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
LABEL (keyword),LABEL (keyword),LABEL (keyword)
VAL (keyword),VAL (keyword),VAL (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
VAL (keyword),VAL (keyword),VAL (keyword)
N (keyword),N (keyword),N (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
N (keyword),N (keyword),N (keyword)
INSIDE (keyword),INSIDE (keyword),INSIDE (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
INSIDE (keyword),INSIDE (keyword),INSIDE (keyword)
OUTSIDE (keyword),OUTSIDE (keyword),OUTSIDE (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
OUTSIDE (keyword),OUTSIDE (keyword),OUTSIDE (keyword)
SHAPE (keyword),SHAPE (keyword),SHAPE (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
SHAPE (keyword),SHAPE (keyword),SHAPE (keyword)
RECTANGLE (keyword),RECTANGLE (keyword),RECTANGLE (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
RECTANGLE (keyword),RECTANGLE (keyword),RECTANGLE (keyword)
PYRAMID (keyword),PYRAMID (keyword),PYRAMID (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
PYRAMID (keyword),PYRAMID (keyword),PYRAMID (keyword)
OBELISK (keyword),OBELISK (keyword),OBELISK (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
OBELISK (keyword),OBELISK (keyword),OBELISK (keyword)
BARBASE (keyword),BARBASE (keyword),BARBASE (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
BARBASE (keyword),BARBASE (keyword),BARBASE (keyword)
ROUND (keyword),ROUND (keyword),ROUND (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
ROUND (keyword),ROUND (keyword),ROUND (keyword)
SQUARE (keyword),SQUARE (keyword),SQUARE (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
SQUARE (keyword),SQUARE (keyword),SQUARE (keyword)
BASELINE (keyword),BASELINE (keyword),BASELINE (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
BASELINE (keyword),BASELINE (keyword),BASELINE (keyword)
summary function | Defines a function used to summarize the variable defined on the Y subcommand. If the Y axis assignment is $COUNT or $PCT, the BAR subcommand cannot have a summary function. If the Y subcommand specifies TYPE=CATEGORICAL, then BAR can specify only MODE as the summary function.
LABEL | Bars can be labeled with the actual values corresponding to the dependent axis (VAL) or with the number of cases included in each bar (N). The default is no labels. The placement of the labels is inside the bars (INSIDE) or outside the bars (OUTSIDE).
SHAPE | This keyword is no longer supported and is ignored. Bars are always drawn as rectangles.
BARBASE | This keyword is no longer supported and is ignored.
BASELINE | The baseline value determines the location from which the bars will hang (vertical) or extend (horizontal). The default value is 0.

Example

IGRAPH
    /X1=VAR(volume96) TYPE=CATEGORICAL
    /Y=$count
    /COORDINATE=VERTICAL
    /EFFECT=THREE
    /BAR LABEL INSIDE N.

• X1 assigns the categorical variable volume96 to the X1 axis.

• Y assigns the built-in dimension $count to the range axis.

• VERTICAL defines the counts to appear along the vertical dimension.

• BAR adds a bar element to the chart.

• LABEL labels the bars in the chart with the number of cases included in the bars. These labels appear inside the bars.

Example

IGRAPH
    /X1=VAR(volume94) TYPE=CATEGORICAL
    /Y=VAR(sales96) TYPE=SCALE
    /COORDINATE=HORIZONTAL
    /EFFECT=NONE
    /BAR (MEAN) LABEL OUTSIDE VAL BASELINE=370.00.

• X1 assigns the categorical variable volume94 to the X1 axis.

• Y assigns the scale variable sales96 to the range axis.

• HORIZONTAL defines sales96 to appear along the horizontal dimension.

• EFFECT defines the chart as two-dimensional.

• BAR adds a bar element to the chart.

• MEAN defines the summary function to apply to sales96. Each bar represents the mean sales96 value for the corresponding category of volume94.

• LABEL labels the bars in the chart with the mean sales96 value. These labels appear outside the bars.

• BASELINE indicates that bars should extend from 370. Any bar with a mean value above 370 extends to the right. Any bar with a mean value below 370 extends to the left.

Related Topics

IGRAPH
Overview (IGRAPH command)
General Syntax (IGRAPH command)
CATORDER Subcommand (IGRAPH command)
X1LENGTH, YLENGTH, and X2LENGTH Subcommands (IGRAPH command)
COLOR, STYLE, and SIZE Subcommands (IGRAPH command)
STACK Subcommand (IGRAPH command)
SUMMARYVAR Subcommand (IGRAPH command)
PANEL Subcommand (IGRAPH command)
POINTLABEL Subcommand (IGRAPH command)
CASELABEL Subcommand (IGRAPH command)
COORDINATE Subcommand (IGRAPH command)
EFFECT Subcommand (IGRAPH command)
TITLE, SUBTITLE, and CAPTION Subcommands (IGRAPH command)
VIEWNAME Subcommand (IGRAPH command)
CHARTLOOK Subcommand (IGRAPH command)
REFLINE Subcommand (IGRAPH command)
SPIKE Subcommand (IGRAPH command)
FORMAT Subcommand (IGRAPH command)
KEY Keyword (IGRAPH command)
Element Syntax (IGRAPH command)
SCATTER Subcommand (IGRAPH command)
AREA Subcommand (IGRAPH command)
PIE Subcommand (IGRAPH command)
BOX Subcommand (IGRAPH command)
LINE Subcommand (IGRAPH command)
ERRORBAR Subcommand (IGRAPH command)
HISTOGRAM Subcommand (IGRAPH command)
FITLINE Subcommand (IGRAPH command)
Summary Functions (IGRAPH command)


PIE Subcommand (IGRAPH command)

PIE (subcommand),PIE (subcommand),PIE (subcommand)
IGRAPH command,IGRAPH command,IGRAPH command
PIE (subcommand),PIE (subcommand),PIE (subcommand)
IGRAPH (command),IGRAPH (command),IGRAPH (command)
PIE subcommand,PIE subcommand,PIE subcommand

A simple pie chart summarizes categories defined by a single variable or by a group of related variables. A clustered pie chart contains a cluster of simple pies, all of which are stacked into categories by the same variable. The pies are of different sizes and appear to be stacked on top of one another. The cluster contains as many pies as there are categories in the cluster variable. For both simple and clustered pie charts, the size of each slice represents the count, the percentage, or a summary function of a variable.

The following keywords are available:

summary functions,summary functions,summary functions
IGRAPH command,IGRAPH command,IGRAPH command
summary functions,summary functions,summary functions
$COUNT (keyword),$COUNT (keyword),$COUNT (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
$COUNT (keyword),$COUNT (keyword),$COUNT (keyword)
$PCT (keyword),$PCT (keyword),$PCT (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
$PCT (keyword),$PCT (keyword),$PCT (keyword)
SUM (keyword),SUM (keyword),SUM (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
SUM (keyword),SUM (keyword),SUM (keyword)
SUMAV (keyword),SUMAV (keyword),SUMAV (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
SUMAV (keyword),SUMAV (keyword),SUMAV (keyword)
SUMSQ (keyword),SUMSQ (keyword),SUMSQ (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
SUMSQ (keyword),SUMSQ (keyword),SUMSQ (keyword)
NLT (keyword),NLT (keyword),NLT (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
NLT (keyword),NLT (keyword),NLT (keyword)
NLE (keyword),NLE (keyword),NLE (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
NLE (keyword),NLE (keyword),NLE (keyword)
NEQ (keyword),NEQ (keyword),NEQ (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
NEQ (keyword),NEQ (keyword),NEQ (keyword)
NGE (keyword),NGE (keyword),NGE (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
NGE (keyword),NGE (keyword),NGE (keyword)
NGT (keyword),NGT (keyword),NGT (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
NGT (keyword),NGT (keyword),NGT (keyword)
NIN (keyword),NIN (keyword),NIN (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
NIN (keyword),NIN (keyword),NIN (keyword)
START (keyword),START (keyword),START (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
START (keyword),START (keyword),START (keyword)
CW (keyword),CW (keyword),CW (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
CW (keyword),CW (keyword),CW (keyword)
CCW (keyword),CCW (keyword),CCW (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
CCW (keyword),CCW (keyword),CCW (keyword)
SLICE (keyword),SLICE (keyword),SLICE (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
SLICE (keyword),SLICE (keyword),SLICE (keyword)
LABEL (keyword),LABEL (keyword),LABEL (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
LABEL (keyword),LABEL (keyword),LABEL (keyword)
PCT (keyword),PCT (keyword),PCT (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
PCT (keyword),PCT (keyword),PCT (keyword)
N (keyword),N (keyword),N (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
N (keyword),N (keyword),N (keyword)
VAL (keyword),VAL (keyword),VAL (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
VAL (keyword),VAL (keyword),VAL (keyword)
INSIDE (keyword),INSIDE (keyword),INSIDE (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
INSIDE (keyword),INSIDE (keyword),INSIDE (keyword)
OUTSIDE (keyword),OUTSIDE (keyword),OUTSIDE (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
OUTSIDE (keyword),OUTSIDE (keyword),OUTSIDE (keyword)
TEXTIN (keyword),TEXTIN (keyword),TEXTIN (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
TEXTIN (keyword),TEXTIN (keyword),TEXTIN (keyword)
NUMIN (keyword),NUMIN (keyword),NUMIN (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
NUMIN (keyword),NUMIN (keyword),NUMIN (keyword)
CLUSTER (keyword),CLUSTER (keyword),CLUSTER (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
CLUSTER (keyword),CLUSTER (keyword),CLUSTER (keyword)
LABEL (keyword),LABEL (keyword),LABEL (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
LABEL (keyword),LABEL (keyword),LABEL (keyword)
PCT (keyword),PCT (keyword),PCT (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
PCT (keyword),PCT (keyword),PCT (keyword)
N (keyword),N (keyword),N (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
N (keyword),N (keyword),N (keyword)
VAL (keyword),VAL (keyword),VAL (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
VAL (keyword),VAL (keyword),VAL (keyword)
ULEFT (keyword),ULEFT (keyword),ULEFT (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
ULEFT (keyword),ULEFT (keyword),ULEFT (keyword)
URIGHT (keyword),URIGHT (keyword),URIGHT (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
URIGHT (keyword),URIGHT (keyword),URIGHT (keyword)
LLEFT (keyword),LLEFT (keyword),LLEFT (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
LLEFT (keyword),LLEFT (keyword),LLEFT (keyword)
LRIGHT (keyword),LRIGHT (keyword),LRIGHT (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
LRIGHT (keyword),LRIGHT (keyword),LRIGHT (keyword)
summary function | Defines a function used to summarize the variable defined on the SUMMARYVAR subcommand. If the SUMMARYVAR assignment is $COUNT or $PCT, the PIE subcommand cannot have a summary function. Otherwise, SUM, SUMAV, SUMSQ, NGT(x), NLE(x), NEQ(x), NGE(x), NGT(x), and NIN(x1,x2) are available. See the topic Summary Functions (IGRAPH command) for more information.
START num | Indicates the starting position of the smallest slice of the pie chart. Any integer can be specified for num. The value is converted to a number between 0 and 360, which represents the degree of rotation of the smallest slice.
CW | CCW | Sets the positive rotation of the pie to either clockwise (CW) or counterclockwise (CCW). The default rotation is clockwise.
SLICE | Sets the labeling characteristics for the slices of the pie. The pie slices can be labeled with the category labels (LABEL), the category percentages (PCT), the number of cases (N), and the category values (VAL). Label position is either all labels inside the pie (INSIDE) or all labels outside the pie (OUTSIDE). TEXTIN and NUMIN are no longer supported and are ignored.
STACK | Sets the labeling characteristics for the pies from stacks. This keyword is always set to LABEL so the pies are labeled with the category labels. (The PCT, N, and VAL values are no longer supported and are ignored.) Options for specifying the label position are no longer supported and are ignored. An optimal label position is always used.

Example

IGRAPH
    /SUMMARYVAR=$count
    /COLOR=VAR(volume96) TYPE=CATEGORICAL
    /EFFECT=THREE
    /PIE START 180 CW SLICE=INSIDE LABEL PCT N.

• The pie slices represent the number of cases (SUMMARYVAR=$count) in each category of volume96 (specified on the COLOR subcommand).

• EFFECT yields a pie chart with an additional third dimension.

• PIE creates a pie chart.

• The first slice begins at 180 degrees and the rotation of the pie is clockwise.

• SLICE labels the slices with category labels, the percentage in each category, and the number of cases in each category. INSIDE places the category and numeric labels inside the pie slices .

Example

IGRAPH
    /SUMMARYVAR=VAR(sales96)
    /COLOR=VAR(volume95) TYPE=CATEGORICAL
    /X1=VAR(region) TYPE=CATEGORICAL
    /Y=VAR(division) TYPE=CATEGORICAL
    /COORDINATE=VERTICAL
    /PIE (SUM) START 0 CW SLICE=INSIDE VAL.

• The pie slices represent the sums of sales96 values for each category of volume95 (specified on the COLOR subcommand).

• X1 and Y define two axes representing region and division. A pie chart is created for each combination of these variables.

• The first slice in each pie begins at 0 degrees and the rotation of the pie is clockwise.

• SUM indicates the summary function applied to the summary variable, sales96. The pie slices represent the sum of the sales96 values.

• SLICE labels the slices with the value of the summary function. INSIDE places the labels inside the pie slices.

Related Topics

IGRAPH
Overview (IGRAPH command)
General Syntax (IGRAPH command)
CATORDER Subcommand (IGRAPH command)
X1LENGTH, YLENGTH, and X2LENGTH Subcommands (IGRAPH command)
COLOR, STYLE, and SIZE Subcommands (IGRAPH command)
STACK Subcommand (IGRAPH command)
SUMMARYVAR Subcommand (IGRAPH command)
PANEL Subcommand (IGRAPH command)
POINTLABEL Subcommand (IGRAPH command)
CASELABEL Subcommand (IGRAPH command)
COORDINATE Subcommand (IGRAPH command)
EFFECT Subcommand (IGRAPH command)
TITLE, SUBTITLE, and CAPTION Subcommands (IGRAPH command)
VIEWNAME Subcommand (IGRAPH command)
CHARTLOOK Subcommand (IGRAPH command)
REFLINE Subcommand (IGRAPH command)
SPIKE Subcommand (IGRAPH command)
FORMAT Subcommand (IGRAPH command)
KEY Keyword (IGRAPH command)
Element Syntax (IGRAPH command)
SCATTER Subcommand (IGRAPH command)
AREA Subcommand (IGRAPH command)
BAR Subcommand (IGRAPH command)
BOX Subcommand (IGRAPH command)
LINE Subcommand (IGRAPH command)
ERRORBAR Subcommand (IGRAPH command)
HISTOGRAM Subcommand (IGRAPH command)
FITLINE Subcommand (IGRAPH command)
Summary Functions (IGRAPH command)


BOX Subcommand (IGRAPH command)

BOX (subcommand),BOX (subcommand),BOX (subcommand)
IGRAPH command,IGRAPH command,IGRAPH command
BOX (subcommand),BOX (subcommand),BOX (subcommand)
IGRAPH (command),IGRAPH (command),IGRAPH (command)
BOX subcommand,BOX subcommand,BOX subcommand
IGRAPH (command),IGRAPH (command),IGRAPH (command)
boxplots,boxplots,boxplots
IGRAPH command,IGRAPH command,IGRAPH command

BOX creates a boxplot, sometimes called a box-and-whiskers plot, showing the median, quartiles, and outlier and extreme values for a scale variable. The interquartile range (IQR) is the difference between the 75th and 25th percentiles and corresponds to the length of the box.

The following keywords are available:

OUTLIERS (keyword),OUTLIERS (keyword),OUTLIERS (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
OUTLIERS (keyword),OUTLIERS (keyword),OUTLIERS (keyword)
EXTREME (keyword),EXTREME (keyword),EXTREME (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
EXTREME (keyword),EXTREME (keyword),EXTREME (keyword)
MEDIAN (keyword),MEDIAN (keyword),MEDIAN (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
MEDIAN (keyword),MEDIAN (keyword),MEDIAN (keyword)
BOXBASE (keyword),BOXBASE (keyword),BOXBASE (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
BOXBASE (keyword),BOXBASE (keyword),BOXBASE (keyword)
SQUARE (keyword),SQUARE (keyword),SQUARE (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
SQUARE (keyword),SQUARE (keyword),SQUARE (keyword)
ROUND (keyword),ROUND (keyword),ROUND (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
ROUND (keyword),ROUND (keyword),ROUND (keyword)
WHISKER (keyword),WHISKER (keyword),WHISKER (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
WHISKER (keyword),WHISKER (keyword),WHISKER (keyword)
LINE (keyword),LINE (keyword),LINE (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
LINE (keyword),LINE (keyword),LINE (keyword)
T (keyword),T (keyword),T (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
T (keyword),T (keyword),T (keyword)
FANCY (keyword),FANCY (keyword),FANCY (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
FANCY (keyword),FANCY (keyword),FANCY (keyword)
CAPWIDTH (keyword),CAPWIDTH (keyword),CAPWIDTH (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
CAPWIDTH (keyword),CAPWIDTH (keyword),CAPWIDTH (keyword)
OUTLIERS | Indicates whether outliers should be displayed. Outliers are values between 1.5 IQR’s and 3 IQR’s from the end of a box. By default, the boxplot displays outliers (ON).
EXTREME | Indicates whether extreme values should be displayed. Values more than 3 IQR’s from the end of a box are defined as extreme. By default, the boxplot displays extreme values (ON).
MEDIAN | Indicates whether a line representing the median should be included in the box. By default, the boxplot displays the median line (ON).
BOXBASE | This keyword is no longer supported and is ignored.
WHISKER | Controls the appearance of the whiskers. Whiskers can be straight lines (LINE) or end in a T-shape (T). FANCY is no longer supported and is ignored.
CAPWIDTH(pct) | Controls the width of the whisker cap relative to the corresponding box. Pct equals the percentage of the box width. The default value for pct is 45.

Example

IGRAPH
    /X1=VAR(region) TYPE=CATEGORICAL
    /Y=VAR(sales96) TYPE=SCALE
    /COORDINATE=HORIZONTAL
    /BOX OUTLIERS=ON EXTREME=ON MEDIAN=ON WHISKER=LINE.

• X1 assigns the variable region to the X1 axis.

• Y assigns the variable sales96 to the range axis.

• COORDINATE positions the range axis along the horizontal dimension.

• BOX creates a boxplot. The outliers and extreme vales are shown. In addition, a line representing the median is added to the box.

• WHISKER yields whiskers ending in a straight lines.

Example

IGRAPH
    /X1=VAR(region) TYPE=CATEGORICAL
    /Y=VAR(sales96) TYPE=SCALE
    /X2=VAR(division) TYPE=CATEGORICAL
    /COORDINATE=THREE
    /BOX OUTLIERS=OFF EXTREME=ON MEDIAN=OFF WHISKER=T.

• X2 adds a third dimension, corresponding to division, to the boxplot in the previous example.

• COORDINATE indicates that the chart displays the third dimension.

• BOX creates a boxplot without outliers or a median line. Extreme values are shown.

Related Topics

IGRAPH
Overview (IGRAPH command)
General Syntax (IGRAPH command)
CATORDER Subcommand (IGRAPH command)
X1LENGTH, YLENGTH, and X2LENGTH Subcommands (IGRAPH command)
COLOR, STYLE, and SIZE Subcommands (IGRAPH command)
STACK Subcommand (IGRAPH command)
SUMMARYVAR Subcommand (IGRAPH command)
PANEL Subcommand (IGRAPH command)
POINTLABEL Subcommand (IGRAPH command)
CASELABEL Subcommand (IGRAPH command)
COORDINATE Subcommand (IGRAPH command)
EFFECT Subcommand (IGRAPH command)
TITLE, SUBTITLE, and CAPTION Subcommands (IGRAPH command)
VIEWNAME Subcommand (IGRAPH command)
CHARTLOOK Subcommand (IGRAPH command)
REFLINE Subcommand (IGRAPH command)
SPIKE Subcommand (IGRAPH command)
FORMAT Subcommand (IGRAPH command)
KEY Keyword (IGRAPH command)
Element Syntax (IGRAPH command)
SCATTER Subcommand (IGRAPH command)
AREA Subcommand (IGRAPH command)
BAR Subcommand (IGRAPH command)
PIE Subcommand (IGRAPH command)
LINE Subcommand (IGRAPH command)
ERRORBAR Subcommand (IGRAPH command)
HISTOGRAM Subcommand (IGRAPH command)
FITLINE Subcommand (IGRAPH command)
Summary Functions (IGRAPH command)


LINE Subcommand (IGRAPH command)

LINE (subcommand),LINE (subcommand),LINE (subcommand)
IGRAPH command,IGRAPH command,IGRAPH command
LINE (subcommand),LINE (subcommand),LINE (subcommand)
IGRAPH (command),IGRAPH (command),IGRAPH (command)
LINE subcommand,LINE subcommand,LINE subcommand
dot charts,dot charts,dot charts
IGRAPH command,IGRAPH command,IGRAPH command
ribbon charts,ribbon charts,ribbon charts
IGRAPH command,IGRAPH command,IGRAPH command

LINE creates line charts, dot charts, and ribbon charts. These charts summarize categories of one or more variables. Line charts tend to emphasize flow or movement instead of individual values. They are commonly used to display data over time and therefore can be used to give a good sense of trends. A ribbon chart is similar to a line chart, with the lines displayed as ribbons in a third dimension. Ribbon charts can either have two dimensions displayed with a 3-D effect, or they can have three dimensions.

The following keywords are available:

summary functions,summary functions,summary functions
IGRAPH command,IGRAPH command,IGRAPH command
summary functions,summary functions,summary functions
$COUNT (keyword),$COUNT (keyword),$COUNT (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
$COUNT (keyword),$COUNT (keyword),$COUNT (keyword)
$PCT (keyword),$PCT (keyword),$PCT (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
$PCT (keyword),$PCT (keyword),$PCT (keyword)
MODE (keyword),MODE (keyword),MODE (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
MODE (keyword),MODE (keyword),MODE (keyword)
STYLE (keyword),STYLE (keyword),STYLE (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
STYLE (keyword),STYLE (keyword),STYLE (keyword)
DOTLINE (keyword),DOTLINE (keyword),DOTLINE (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
DOTLINE (keyword),DOTLINE (keyword),DOTLINE (keyword)
LINE (keyword),LINE (keyword),LINE (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
LINE (keyword),LINE (keyword),LINE (keyword)
DOT (keyword),DOT (keyword),DOT (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
DOT (keyword),DOT (keyword),DOT (keyword)
NONE (keyword),NONE (keyword),NONE (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
NONE (keyword),NONE (keyword),NONE (keyword)
DROPLINE (keyword),DROPLINE (keyword),DROPLINE (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
DROPLINE (keyword),DROPLINE (keyword),DROPLINE (keyword)
LABEL (keyword),LABEL (keyword),LABEL (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
LABEL (keyword),LABEL (keyword),LABEL (keyword)
VAL (keyword),VAL (keyword),VAL (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
VAL (keyword),VAL (keyword),VAL (keyword)
PCT (keyword),PCT (keyword),PCT (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
PCT (keyword),PCT (keyword),PCT (keyword)
N (keyword),N (keyword),N (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
N (keyword),N (keyword),N (keyword)
LINELABEL (keyword),LINELABEL (keyword),LINELABEL (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
LINELABEL (keyword),LINELABEL (keyword),LINELABEL (keyword)
CAT (keyword),CAT (keyword),CAT (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
CAT (keyword),CAT (keyword),CAT (keyword)
PCT (keyword),PCT (keyword),PCT (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
PCT (keyword),PCT (keyword),PCT (keyword)
N (keyword),N (keyword),N (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
N (keyword),N (keyword),N (keyword)
BREAK (keyword),BREAK (keyword),BREAK (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
BREAK (keyword),BREAK (keyword),BREAK (keyword)
MISSING (keyword),MISSING (keyword),MISSING (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
MISSING (keyword),MISSING (keyword),MISSING (keyword)
NONE (keyword),NONE (keyword),NONE (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
NONE (keyword),NONE (keyword),NONE (keyword)
summary function | Defines a function used to summarize the variable defined on the Y subcommand. If the Y axis assignment is $COUNT or $PCT, the LINE subcommand cannot have a summary function. If the Y subcommand specifies TYPE=CATEGORICAL, then LINE can specify only MODE as the summary function.
STYLE | Chart can include dots and lines (DOTLINE), lines only (LINE), or dots only (DOT). The keyword NONE creates an empty chart.
DROPLINE | Indicates whether drop lines through points having the same value of a variable are included in the chart (ON) or not (OFF). To include drop lines, specify a categorical variable on the STYLE, COLOR, or SIZE subcommands.
LABEL | Labels points with the actual values corresponding to the dependent axis (VAL), the percentage of cases (PCT), and the number of cases included in each data point (N). The default is no labels.
LINELABEL | Labels lines with category labels (CAT), the percentage of cases (PCT), and the number of cases included in each line (N). The default is no labels.
BREAK | Indicates whether the lines break at missing values (MISSING) or not (NONE).
INTERPOLATE (keyword),INTERPOLATE (keyword),INTERPOLATE (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
INTERPOLATE (keyword),INTERPOLATE (keyword),INTERPOLATE (keyword)

The INTERPOLATE keyword determines how the lines connecting the points are drawn. Options include:

STRAIGHT (keyword),STRAIGHT (keyword),STRAIGHT (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
STRAIGHT (keyword),STRAIGHT (keyword),STRAIGHT (keyword)
LSTEP (keyword),LSTEP (keyword),LSTEP (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
LSTEP (keyword),LSTEP (keyword),LSTEP (keyword)
CSTEP (keyword),CSTEP (keyword),CSTEP (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
CSTEP (keyword),CSTEP (keyword),CSTEP (keyword)
RSTEP (keyword),RSTEP (keyword),RSTEP (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
RSTEP (keyword),RSTEP (keyword),RSTEP (keyword)
LJUMP (keyword),LJUMP (keyword),LJUMP (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
LJUMP (keyword),LJUMP (keyword),LJUMP (keyword)
RJUMP (keyword),RJUMP (keyword),RJUMP (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
RJUMP (keyword),RJUMP (keyword),RJUMP (keyword)
CJUMP (keyword),CJUMP (keyword),CJUMP (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
CJUMP (keyword),CJUMP (keyword),CJUMP (keyword)
SPLINE (keyword),SPLINE (keyword),SPLINE (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
SPLINE (keyword),SPLINE (keyword),SPLINE (keyword)
LAGRANGE3 (keyword),LAGRANGE3 (keyword),LAGRANGE3 (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
LAGRANGE3 (keyword),LAGRANGE3 (keyword),LAGRANGE3 (keyword)
LAGRANGE5 (keyword),LAGRANGE5 (keyword),LAGRANGE5 (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
LAGRANGE5 (keyword),LAGRANGE5 (keyword),LAGRANGE5 (keyword)
STRAIGHT | Straight lines.
LSTEP | A horizontal line extends from each data point. A vertical riser connects the line to the next data point.
CSTEP | Each data point is centered on a horizontal line that extends half of the distance between consecutive points. Vertical risers connect the line to the next horizontal line.
RSTEP | A horizontal line terminates at each data point. A vertical riser extends from each data point, connecting to the next horizontal line.
LJUMP | A horizontal line extends from each data point. No vertical risers connect the lines to the points.
RJUMP | A horizontal line terminates at each data point. No vertical risers connect the points to the next horizontal line.
CJUMP | A horizontal line is centered at each data point, extending half of the distance between consecutive points. No vertical risers connect the lines.
SPLINE | Connects data points with a cubic spline.
LAGRANGE3 | This is no longer supported and is now an alias for SPLINE.
LAGRANGE5 | This is no longer supported and is now an alias for SPLINE.

Example

IGRAPH
    /X1=VAR(volume95) TYPE=CATEGORICAL
    /Y=VAR(sales96) TYPE=SCALE
    /COLOR=VAR(volume94) TYPE=CATEGORICAL
    /COORDINATE=VERTICAL
    /LINE (MEAN) STYLE=LINE DROPLINE=ON LABEL VAL
        INTERPOLATE=STRAIGHT BREAK=MISSING.

• LINE creates a line chart. The lines represent the mean value of sales96 for each category of volume95.

• The chart contains a line for each category of volume94, with droplines connecting the lines at each category of volume95.

• LABEL labels the lines with the mean sales96 value for each category of volume95.

• INTERPOLATE specifies that straight lines connect the mean sales96 values across the volume95 categories.

• BREAK indicates that the lines will break at any missing values.

Related Topics

IGRAPH
Overview (IGRAPH command)
General Syntax (IGRAPH command)
CATORDER Subcommand (IGRAPH command)
X1LENGTH, YLENGTH, and X2LENGTH Subcommands (IGRAPH command)
COLOR, STYLE, and SIZE Subcommands (IGRAPH command)
STACK Subcommand (IGRAPH command)
SUMMARYVAR Subcommand (IGRAPH command)
PANEL Subcommand (IGRAPH command)
POINTLABEL Subcommand (IGRAPH command)
CASELABEL Subcommand (IGRAPH command)
COORDINATE Subcommand (IGRAPH command)
EFFECT Subcommand (IGRAPH command)
TITLE, SUBTITLE, and CAPTION Subcommands (IGRAPH command)
VIEWNAME Subcommand (IGRAPH command)
CHARTLOOK Subcommand (IGRAPH command)
REFLINE Subcommand (IGRAPH command)
SPIKE Subcommand (IGRAPH command)
FORMAT Subcommand (IGRAPH command)
KEY Keyword (IGRAPH command)
Element Syntax (IGRAPH command)
SCATTER Subcommand (IGRAPH command)
AREA Subcommand (IGRAPH command)
BAR Subcommand (IGRAPH command)
PIE Subcommand (IGRAPH command)
BOX Subcommand (IGRAPH command)
ERRORBAR Subcommand (IGRAPH command)
HISTOGRAM Subcommand (IGRAPH command)
FITLINE Subcommand (IGRAPH command)
Summary Functions (IGRAPH command)


ERRORBAR Subcommand (IGRAPH command)

ERRORBAR (subcommand),ERRORBAR (subcommand),ERRORBAR (subcommand)
IGRAPH command,IGRAPH command,IGRAPH command
ERRORBAR (subcommand),ERRORBAR (subcommand),ERRORBAR (subcommand)
IGRAPH (command),IGRAPH (command),IGRAPH (command)
ERRORBAR subcommand,ERRORBAR subcommand,ERRORBAR subcommand

Error bars help you to visualize distributions and dispersion by indicating the variability of the measure being displayed. The mean of a scale variable is plotted for a set of categories, and the length of an error bar on either side of the mean value indicates a confidence interval or a specified number of standard errors or standard deviations. Error bars can extend in one direction or in both directions from the mean. Error bars are sometimes displayed in the same chart with other chart elements, such as bars.

One of the following three keywords indicating the statistic and percentage/multiplier applied to the error bars must be specified:

CI (keyword),CI (keyword),CI (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
CI (keyword),CI (keyword),CI (keyword)
confidence intervals,confidence intervals,confidence intervals
IGRAPH command,IGRAPH command,IGRAPH command
SD (keyword),SD (keyword),SD (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
SD (keyword),SD (keyword),SD (keyword)
SE (keyword),SE (keyword),SE (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
CI(Pct) | Error bars represent confidence intervals. Pct indicates the level of confidence and varies from 0 to 100.
SD(sdval) | Error bars represent standard deviations. Sdval indicates how many standard deviations above and below the mean the error bars extend. Sdval must between 0 and 6.
SE(seval) | Error bars represent standard errors. Seval indicates how many standard errors above and below the mean the error bars extend. Seval must between 0 and 6.

In addition, the following keywords can be specified:

LABEL (keyword),LABEL (keyword),LABEL (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
LABEL (keyword),LABEL (keyword),LABEL (keyword)
VAL (keyword),VAL (keyword),VAL (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
VAL (keyword),VAL (keyword),VAL (keyword)
N (keyword),N (keyword),N (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
N (keyword),N (keyword),N (keyword)
DIRECTION (keyword),DIRECTION (keyword),DIRECTION (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
DIRECTION (keyword),DIRECTION (keyword),DIRECTION (keyword)
BOTH (keyword),BOTH (keyword),BOTH (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
BOTH (keyword),BOTH (keyword),BOTH (keyword)
UP (keyword),UP (keyword),UP (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
UP (keyword),UP (keyword),UP (keyword)
DOWN (keyword),DOWN (keyword),DOWN (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
DOWN (keyword),DOWN (keyword),DOWN (keyword)
SIGN (keyword),SIGN (keyword),SIGN (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
SIGN (keyword),SIGN (keyword),SIGN (keyword)
CAPSTYLE (keyword),CAPSTYLE (keyword),CAPSTYLE (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
CAPSTYLE (keyword),CAPSTYLE (keyword),CAPSTYLE (keyword)
T (keyword),T (keyword),T (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
T (keyword),T (keyword),T (keyword)
NONE (keyword),NONE (keyword),NONE (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
NONE (keyword),NONE (keyword),NONE (keyword)
FANCY (keyword),FANCY (keyword),FANCY (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
FANCY (keyword),FANCY (keyword),FANCY (keyword)
SYMBOL (keyword),SYMBOL (keyword),SYMBOL (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
SYMBOL (keyword),SYMBOL (keyword),SYMBOL (keyword)
BASELINE (keyword),BASELINE (keyword),BASELINE (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
BASELINE (keyword),BASELINE (keyword),BASELINE (keyword)
CAPWIDTH (keyword),CAPWIDTH (keyword),CAPWIDTH (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
CAPWIDTH (keyword),CAPWIDTH (keyword),CAPWIDTH (keyword)
LABEL | Labels error bars with means (VAL) and the number of cases (N).
DIRECTION | This keyword is no longer supported and is ignored. Error bars always extend both above and below the mean values.
CAPSTYLE | For error bars, the style can be T-shaped (T) or no cap (NONE). The default style is T-shaped. FANCY is no longer supported and is ignored.
SYMBOL | Displays the mean marker (ON). For no symbol, specify OFF.
BASELINE val | Defines the value (val) above which the error bars extend above the bars and below which the error bars extend below the bars.
CAPWIDTH(pct) | Controls the width of the cap relative to the distance between categories. Pct equals the percent of the distance. The default value for pct is 45.

Example

IGRAPH
    /X1=VAR(volume94) TYPE=CATEGORICAL
    /Y=VAR(sales96) TYPE=SCALE
    /BAR (MEAN) LABEL INSIDE VAL SHAPE=RECTANGLE BASELINE=0.00
    /ERRORBAR SE(2.0) CAPWIDTH (45) CAPSTYLE=NONE.

• BAR creates a bar chart with rectangular bars. The bars represent the mean sales96 values for the volume94 categories.

• ERRORBAR adds error bars to the bar chart. The error bars extend two standard errors above and below the mean.

Related Topics

IGRAPH
Overview (IGRAPH command)
General Syntax (IGRAPH command)
CATORDER Subcommand (IGRAPH command)
X1LENGTH, YLENGTH, and X2LENGTH Subcommands (IGRAPH command)
COLOR, STYLE, and SIZE Subcommands (IGRAPH command)
STACK Subcommand (IGRAPH command)
SUMMARYVAR Subcommand (IGRAPH command)
PANEL Subcommand (IGRAPH command)
POINTLABEL Subcommand (IGRAPH command)
CASELABEL Subcommand (IGRAPH command)
COORDINATE Subcommand (IGRAPH command)
EFFECT Subcommand (IGRAPH command)
TITLE, SUBTITLE, and CAPTION Subcommands (IGRAPH command)
VIEWNAME Subcommand (IGRAPH command)
CHARTLOOK Subcommand (IGRAPH command)
REFLINE Subcommand (IGRAPH command)
SPIKE Subcommand (IGRAPH command)
FORMAT Subcommand (IGRAPH command)
KEY Keyword (IGRAPH command)
Element Syntax (IGRAPH command)
SCATTER Subcommand (IGRAPH command)
AREA Subcommand (IGRAPH command)
BAR Subcommand (IGRAPH command)
PIE Subcommand (IGRAPH command)
BOX Subcommand (IGRAPH command)
LINE Subcommand (IGRAPH command)
HISTOGRAM Subcommand (IGRAPH command)
FITLINE Subcommand (IGRAPH command)
Summary Functions (IGRAPH command)


HISTOGRAM Subcommand (IGRAPH command)

HISTOGRAM (subcommand),HISTOGRAM (subcommand),HISTOGRAM (subcommand)
IGRAPH command,IGRAPH command,IGRAPH command
HISTOGRAM (subcommand),HISTOGRAM (subcommand),HISTOGRAM (subcommand)
IGRAPH (command),IGRAPH (command),IGRAPH (command)
HISTOGRAM subcommand,HISTOGRAM subcommand,HISTOGRAM subcommand
IGRAPH (command),IGRAPH (command),IGRAPH (command)

HISTOGRAM creates a histogram element in a chart, corresponding to the X1, X2, and Y axis assignments. Horizontal or vertical orientation is specified by the COORDINATE subcommand. A histogram groups the values of a variable into evenly spaced groups (intervals or bins) and plots a count of the number of cases in each group. The count can be expressed as a percentage. Percentages are useful for comparing datasets of different sizes. The count or percentage can also be accumulated across the groups.

$COUNT (keyword),$COUNT (keyword),$COUNT (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
$COUNT (keyword),$COUNT (keyword),$COUNT (keyword)
$PCT (keyword),$PCT (keyword),$PCT (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
$PCT (keyword),$PCT (keyword),$PCT (keyword)

• $COUNT or $PCT must be specified on the Y subcommand.

The following keywords are available:

SHAPE (keyword),SHAPE (keyword),SHAPE (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
SHAPE (keyword),SHAPE (keyword),SHAPE (keyword)
CUM (keyword),CUM (keyword),CUM (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
CUM (keyword),CUM (keyword),CUM (keyword)
X1INTERVAL (keyword),X1INTERVAL (keyword),X1INTERVAL (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
X1INTERVAL (keyword),X1INTERVAL (keyword),X1INTERVAL (keyword)
NUM (keyword),NUM (keyword),NUM (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
NUM (keyword),NUM (keyword),NUM (keyword)
WIDTH (keyword),WIDTH (keyword),WIDTH (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
WIDTH (keyword),WIDTH (keyword),WIDTH (keyword)
X2INTERVAL (keyword),X2INTERVAL (keyword),X2INTERVAL (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
X2INTERVAL (keyword),X2INTERVAL (keyword),X2INTERVAL (keyword)
NUM (keyword),NUM (keyword),NUM (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
NUM (keyword),NUM (keyword),NUM (keyword)
WIDTH (keyword),WIDTH (keyword),WIDTH (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
WIDTH (keyword),WIDTH (keyword),WIDTH (keyword)
CURVE (keyword),CURVE (keyword),CURVE (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
CURVE (keyword),CURVE (keyword),CURVE (keyword)
X1START (keyword),X1START (keyword),X1START (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
X1START (keyword),X1START (keyword),X1START (keyword)
X2START (keyword),X2START (keyword),X2START (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
X2START (keyword),X2START (keyword),X2START (keyword)
SHAPE | Defines the shape of the histogram. Currently, the only value for SHAPE is HISTOGRAM.
CUM | Specifies a cumulative histogram. Counts or percentages are aggregated across the values of the domain variables.
X1INTERVAL | Intervals on the X1 axis can be set automatically, or you can specify the number of intervals (1 to 250) along the axis (NUM) or the width of an interval (WIDTH).
X2INTERVAL | Intervals on the X2 axis can be set automatically, or you can specify the number of intervals (1 to 250) along the axis (NUM) or the width of an interval (WIDTH).
CURVE | Superimposes a normal curve on a 2-D histogram. The normal curve has the same mean and variance as the data.
X1START | The starting point along the X1 axis. Indicates the percentage of an interval width above the minimum value along the X1 axis at which to begin the histogram. The value can range from 0 to 99.
X2START | The starting point along the X2 axis. Indicates the percentage of an interval width above the minimum value along the X2 axis at which to begin the histogram. The value can range from 0 to 99.

Example

IGRAPH
    /X1=VAR(sales96) TYPE=SCALE
    /Y=$count
    /Histogram SHAPE=HISTOGRAM CURVE=ON X1INTERVAL WIDTH=100.

• Histogram creates a histogram of sales96. The sales96 intervals are 100 units wide.

• CURVE superimposes a normal curve on the histogram.

Related Topics

IGRAPH
Overview (IGRAPH command)
General Syntax (IGRAPH command)
CATORDER Subcommand (IGRAPH command)
X1LENGTH, YLENGTH, and X2LENGTH Subcommands (IGRAPH command)
COLOR, STYLE, and SIZE Subcommands (IGRAPH command)
STACK Subcommand (IGRAPH command)
SUMMARYVAR Subcommand (IGRAPH command)
PANEL Subcommand (IGRAPH command)
POINTLABEL Subcommand (IGRAPH command)
CASELABEL Subcommand (IGRAPH command)
COORDINATE Subcommand (IGRAPH command)
EFFECT Subcommand (IGRAPH command)
TITLE, SUBTITLE, and CAPTION Subcommands (IGRAPH command)
VIEWNAME Subcommand (IGRAPH command)
CHARTLOOK Subcommand (IGRAPH command)
REFLINE Subcommand (IGRAPH command)
SPIKE Subcommand (IGRAPH command)
FORMAT Subcommand (IGRAPH command)
KEY Keyword (IGRAPH command)
Element Syntax (IGRAPH command)
SCATTER Subcommand (IGRAPH command)
AREA Subcommand (IGRAPH command)
BAR Subcommand (IGRAPH command)
PIE Subcommand (IGRAPH command)
BOX Subcommand (IGRAPH command)
LINE Subcommand (IGRAPH command)
ERRORBAR Subcommand (IGRAPH command)
FITLINE Subcommand (IGRAPH command)
Summary Functions (IGRAPH command)


FITLINE Subcommand (IGRAPH command)

FITLINE (subcommand),FITLINE (subcommand),FITLINE (subcommand)
IGRAPH command,IGRAPH command,IGRAPH command
FITLINE (subcommand),FITLINE (subcommand),FITLINE (subcommand)
IGRAPH (command),IGRAPH (command),IGRAPH (command)
FITLINE subcommand,FITLINE subcommand,FITLINE subcommand
IGRAPH (command),IGRAPH (command),IGRAPH (command)
regression lines,regression lines,regression lines
IGRAPH command,IGRAPH command,IGRAPH command
IGRAPH (command),IGRAPH (command),IGRAPH (command)
smoothers,smoothers,smoothers

FITLINE adds a line or surface to a scatterplot to help you discern the relationship shown in the plot. The following general methods are available:

NONE (keyword),NONE (keyword),NONE (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
NONE (keyword),NONE (keyword),NONE (keyword)
REGRESSION (keyword),REGRESSION (keyword),REGRESSION (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
REGRESSION (keyword),REGRESSION (keyword),REGRESSION (keyword)
LINEAR (keyword),LINEAR (keyword),LINEAR (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
LINEAR (keyword),LINEAR (keyword),LINEAR (keyword)
ORIGIN (keyword),ORIGIN (keyword),ORIGIN (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
ORIGIN (keyword),ORIGIN (keyword),ORIGIN (keyword)
LINEAR (keyword),LINEAR (keyword),LINEAR (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
LINEAR (keyword),LINEAR (keyword),LINEAR (keyword)
MEAN (keyword),MEAN (keyword),MEAN (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
MEAN (keyword),MEAN (keyword),MEAN (keyword)
LLR (keyword),LLR (keyword),LLR (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
LLR (keyword),LLR (keyword),LLR (keyword)
NORMAL (keyword),NORMAL (keyword),NORMAL (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
NORMAL (keyword),NORMAL (keyword),NORMAL (keyword)
EPANECHNIKOV (keyword),EPANECHNIKOV (keyword),EPANECHNIKOV (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
EPANECHNIKOV (keyword),EPANECHNIKOV (keyword),EPANECHNIKOV (keyword)
UNIFORM (keyword),UNIFORM (keyword),UNIFORM (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
UNIFORM (keyword),UNIFORM (keyword),UNIFORM (keyword)
NONE | No line is fit.
REGRESSION | Fits a straight line (or surface) using ordinary least squares. Must be followed by the keyword LINEAR.
ORIGIN | Fits a straight line (or surface) through the origin. Must be followed by the keyword LINEAR.
MEAN | For a 2-D chart, fits a line at the mean of the dependent (Y) variable. For a 3-D chart, the Y mean is shown as a plane.
LLR | Fits a local linear regression curve or surface. A normal (NORMAL) kernel is the default. With EPANECHNIKOV, the curve is not as smooth as with a normal kernel and is smoother than with a uniform (UNIFORM) kernel.
LINE (keyword),LINE (keyword),LINE (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
LINE (keyword),LINE (keyword),LINE (keyword)
TOTAL (keyword),TOTAL (keyword),TOTAL (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
TOTAL (keyword),TOTAL (keyword),TOTAL (keyword)
MEFFECT (keyword),MEFFECT (keyword),MEFFECT (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
MEFFECT (keyword),MEFFECT (keyword),MEFFECT (keyword)

The keyword LINE indicates the number of fit lines. TOTAL fits the line to all of the cases. MEFFECT fits a separate line to the data for each value of a legend variable.

prediction intervals,prediction intervals,prediction intervals
IGRAPH command,IGRAPH command,IGRAPH command

The REGRESSION, ORIGIN, and MEAN methods offer the option of including prediction intervals with the following keyword:

INTERVAL (keyword),INTERVAL (keyword),INTERVAL (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
INTERVAL (keyword),INTERVAL (keyword),INTERVAL (keyword)
MEAN (keyword),MEAN (keyword),MEAN (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
MEAN (keyword),MEAN (keyword),MEAN (keyword)
INDIVIDUAL (keyword),INDIVIDUAL (keyword),INDIVIDUAL (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
INDIVIDUAL (keyword),INDIVIDUAL (keyword),INDIVIDUAL (keyword)
INTERVAL[(cval)] The intervals are based on the mean (MEAN) or on the individual cases (INDIVIDUAL). Cval indicates the size of the interval and ranges from 50 to 100.

The local linear regression (LLR) smoother offers the following controls for the smoothing process:

BANDWIDTH (keyword),BANDWIDTH (keyword),BANDWIDTH (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
BANDWIDTH (keyword),BANDWIDTH (keyword),BANDWIDTH (keyword)
X1MULTIPLIER (keyword),X1MULTIPLIER (keyword),X1MULTIPLIER (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
X1MULTIPLIER (keyword),X1MULTIPLIER (keyword),X1MULTIPLIER (keyword)
X2MULTIPLIER (keyword),X2MULTIPLIER (keyword),X2MULTIPLIER (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
X2MULTIPLIER (keyword),X2MULTIPLIER (keyword),X2MULTIPLIER (keyword)
BANDWIDTH | Constrains the bandwidth to be constant across subgroups or panels (CONSTRAINED). The default is unconstrained (FAST).
X1MULTIPLIER | Specifies the bandwidth multiplier for the X1 axis. The bandwidth multiplier changes the amount of data that is included in each calculation of a small part of the smoother. The multiplier can be adjusted to emphasize specific features of the plot that are of interest. Any positive multiplier (including fractions) is allowed. The larger the multiplier, the smoother the curve. The range between 0 and 10 should suffice in most applications.
X2MULTIPLIER | Specifies the bandwidth multiplier for the X2 axis. The bandwidth multiplier changes the amount of data that is included in each calculation of a small part of the smoother. The multiplier can be adjusted to emphasize specific features of the plot that are of interest. Any positive multiplier (including fractions) is allowed. The larger the multiplier, the smoother the curve. The range between 0 and 10 should suffice in most applications.

Example

IGRAPH
    /X1=VAR(sales95) TYPE=SCALE
    /Y=VAR(sales96) TYPE=SCALE
    /COLOR=VAR(region) TYPE=CATEGORICAL
    /SCATTER
    /FITLINE METHOD=LLR EPANECHNIKOV BANDWIDTH=CONSTRAINED
        X1MULTIPLIER=2.00 LINE=MEFFECT.

• SCATTER creates a scatterplot of sales95 and sales96.

• FITLINE adds a local linear regression smoother to the scatterplot. The Epanechnikov smoother is used with an X1 multiplier of 2. A separate line is fit for each category of region, and the bandwidth is constrained to be equal across region categories.

Related Topics

IGRAPH
Overview (IGRAPH command)
General Syntax (IGRAPH command)
CATORDER Subcommand (IGRAPH command)
X1LENGTH, YLENGTH, and X2LENGTH Subcommands (IGRAPH command)
COLOR, STYLE, and SIZE Subcommands (IGRAPH command)
STACK Subcommand (IGRAPH command)
SUMMARYVAR Subcommand (IGRAPH command)
PANEL Subcommand (IGRAPH command)
POINTLABEL Subcommand (IGRAPH command)
CASELABEL Subcommand (IGRAPH command)
COORDINATE Subcommand (IGRAPH command)
EFFECT Subcommand (IGRAPH command)
TITLE, SUBTITLE, and CAPTION Subcommands (IGRAPH command)
VIEWNAME Subcommand (IGRAPH command)
CHARTLOOK Subcommand (IGRAPH command)
REFLINE Subcommand (IGRAPH command)
SPIKE Subcommand (IGRAPH command)
FORMAT Subcommand (IGRAPH command)
KEY Keyword (IGRAPH command)
Element Syntax (IGRAPH command)
SCATTER Subcommand (IGRAPH command)
AREA Subcommand (IGRAPH command)
BAR Subcommand (IGRAPH command)
PIE Subcommand (IGRAPH command)
BOX Subcommand (IGRAPH command)
LINE Subcommand (IGRAPH command)
ERRORBAR Subcommand (IGRAPH command)
HISTOGRAM Subcommand (IGRAPH command)
Summary Functions (IGRAPH command)


Summary Functions (IGRAPH command)

summary functions,summary functions,summary functions
IGRAPH command,IGRAPH command,IGRAPH command
summary functions,summary functions,summary functions
IGRAPH (command),IGRAPH (command),IGRAPH (command)
summary functions,summary functions,summary functions
IGRAPH (command),IGRAPH (command),IGRAPH (command)

Summary functions apply to scale variables selected for a dependent axis or a slice summary. Percentages are based on the specified percent base. For a slice summary, only summary functions appropriate for the type of chart are available.

The following summary functions are available:

FIRST (keyword),FIRST (keyword),FIRST (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
FIRST (keyword),FIRST (keyword),FIRST (keyword)

First Values (FIRST). The value found in the first case for each category in the data file at the time the summary was defined.

KURTOSIS (keyword),KURTOSIS (keyword),KURTOSIS (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
KURTOSIS (keyword),KURTOSIS (keyword),KURTOSIS (keyword)

Kurtosis (KURTOSIS). A measure of the extent to which observations cluster around a central point. For a normal distribution, the value of the kurtosis statistic is 0. Positive kurtosis indicates that the observations cluster more and have longer tails than those in the normal distribution, and negative kurtosis indicates the observations cluster less and have shorter tails.

LAST (keyword),LAST (keyword),LAST (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
LAST (keyword),LAST (keyword),LAST (keyword)

Last Values (LAST). The value found in the last case for each category in the data file at the time the summary was defined.

MAXIMUM (keyword),MAXIMUM (keyword),MAXIMUM (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
MAXIMUM (keyword),MAXIMUM (keyword),MAXIMUM (keyword)

Maximum Values (MAXIMUM). The largest value for each category.

MINIMUM (keyword),MINIMUM (keyword),MINIMUM (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
MINIMUM (keyword),MINIMUM (keyword),MINIMUM (keyword)

Minimum Values (MINIMUM). The smallest value within the category.

MEAN (keyword),MEAN (keyword),MEAN (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
MEAN (keyword),MEAN (keyword),MEAN (keyword)

Means (MEAN). The arithmetic average for each category.

MEDIAN (keyword),MEDIAN (keyword),MEDIAN (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
MEDIAN (keyword),MEDIAN (keyword),MEDIAN (keyword)

Medians (MEDIAN). The values below which half of the cases fall in each category.

MODE (keyword),MODE (keyword),MODE (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
MODE (keyword),MODE (keyword),MODE (keyword)

Modes (MODE). The most frequently occurring value within each category.

NGT (keyword),NGT (keyword),NGT (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
NGT (keyword),NGT (keyword),NGT (keyword)

Number of Cases Above (NGT(x)). The number of cases having values above the specified value.

NIN (keyword),NIN (keyword),NIN (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
NIN (keyword),NIN (keyword),NIN (keyword)

Number of Cases Between (NIN(x1,x2)). The number of cases between two specified values.

NEQ (keyword),NEQ (keyword),NEQ (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
NEQ (keyword),NEQ (keyword),NEQ (keyword)

Number of Cases Equal to (NEQ(x)). The number of cases equal to the specified value.

NGE (keyword),NGE (keyword),NGE (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
NGE (keyword),NGE (keyword),NGE (keyword)

Number of Cases Greater Than or Equal to (NGE(x)). The number of cases having values above or equal to the specified value.

NLT (keyword),NLT (keyword),NLT (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
NLT (keyword),NLT (keyword),NLT (keyword)

Number of Cases Less Than (NLT(x)). The number of cases below the specified value.

NLE (keyword),NLE (keyword),NLE (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
NLE (keyword),NLE (keyword),NLE (keyword)

Number of Cases Less Than or Equal to (NLE(x)). The number of cases below or equal to the specified value.

PGT (keyword),PGT (keyword),PGT (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
PGT (keyword),PGT (keyword),PGT (keyword)

Percentage of Cases Above (PGT(x)). The percentage of cases having values above the specified value.

PIN (keyword),PIN (keyword),PIN (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
PIN (keyword),PIN (keyword),PIN (keyword)

Percentage of Cases Between (PIN(x1,x2)). The percentage of cases between two specified values.

PEQ (keyword),PEQ (keyword),PEQ (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
PEQ (keyword),PEQ (keyword),PEQ (keyword)

Percentage of Cases Equal to (PEQ(x)). The percentage of cases equal to the specified value.

PGE (keyword),PGE (keyword),PGE (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
PGE (keyword),PGE (keyword),PGE (keyword)

Percentage of Cases Greater Than or Equal to (PGE(x)). The percentage of cases having values above or equal to the specified value.

PLT (keyword),PLT (keyword),PLT (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
PLT (keyword),PLT (keyword),PLT (keyword)

Percentage of Cases Less Than (PLT(x)). The percentage of cases having values below the specified value.

PLE (keyword),PLE (keyword),PLE (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
PLE (keyword),PLE (keyword),PLE (keyword)

Percentage of Cases Less Than or Equal to (PLE(x)). The percentage of cases having values below or equal to the specified value.

PTILE (keyword),PTILE (keyword),PTILE (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
PTILE (keyword),PTILE (keyword),PTILE (keyword)

Percentiles (PTILE(x)). The data value below which the specified percentage of values fall within each category.

SKEW (keyword),SKEW (keyword),SKEW (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
SKEW (keyword),SKEW (keyword),SKEW (keyword)

Skewness (SKEW). A measure of the asymmetry of a distribution. The normal distribution is symmetric and has a skewness value of 0. A distribution with a significant positive skewness has a long right tail. A distribution with a significant negative skewness has a long left tail.

STDDEV (keyword),STDDEV (keyword),STDDEV (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
STDDEV (keyword),STDDEV (keyword),STDDEV (keyword)

Standard Deviations (STDDEV). A measure of dispersion around the mean, expressed in the same units of measurement as the observations, equal to the square root of the variance. In a normal distribution, 68% of cases fall within one SD of the mean and 95% of cases fall within two SD’s.

SEKURT (keyword),SEKURT (keyword),SEKURT (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
SEKURT (keyword),SEKURT (keyword),SEKURT (keyword)

Standard Errors of Kurtosis (SEKURT). The ratio of kurtosis to its standard error can be used as a test of normality (that is, you can reject normality if the ratio is less than –2 or greater than +2). A large positive value for kurtosis indicates that the tails of the distribution are longer than those of a normal distribution; a negative value for kurtosis indicates shorter tails (becoming like those of a box-shaped uniform distribution).

SEMEAN (keyword),SEMEAN (keyword),SEMEAN (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
SEMEAN (keyword),SEMEAN (keyword),SEMEAN (keyword)

Standard Errors of the Mean (SEMEAN). A measure of how much the value of the mean may vary from sample to sample taken from the same distribution. It can be used to roughly compare the observed mean to a hypothesized value (that is, you can conclude the two values are different if the ratio of the difference to the standard error is less than –2 or greater than +2).

SESKEW (keyword),SESKEW (keyword),SESKEW (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
SESKEW (keyword),SESKEW (keyword),SESKEW (keyword)

Standard Errors of Skewness (SESKEW). The ratio of skewness to its standard error can be used as a test of normality (that is, you can reject normality if the ratio is less than –2 or greater than +2). A large positive value for skewness indicates a long right tail; an extreme negative value, a long left tail.

SUM (keyword),SUM (keyword),SUM (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
SUM (keyword),SUM (keyword),SUM (keyword)

Sums (SUM). The sums of the values within each category.

SUMAV (keyword),SUMAV (keyword),SUMAV (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
SUMAV (keyword),SUMAV (keyword),SUMAV (keyword)

Sums of Absolute Values (SUMAV). The sums of the absolute values within each category.

SUMSQ (keyword),SUMSQ (keyword),SUMSQ (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
SUMSQ (keyword),SUMSQ (keyword),SUMSQ (keyword)

Sums of Squares (SUMSQ). The sums of the squares of the values within each category.

VARIANCE (keyword),VARIANCE (keyword),VARIANCE (keyword)
IGRAPH command,IGRAPH command,IGRAPH command
VARIANCE (keyword),VARIANCE (keyword),VARIANCE (keyword)
IGRAPH (command),IGRAPH (command),IGRAPH (command)

Variances (VARIANCE). A measure of how much observations vary from the mean, expressed in squared units.

Related Topics

IGRAPH
Overview (IGRAPH command)
General Syntax (IGRAPH command)
CATORDER Subcommand (IGRAPH command)
X1LENGTH, YLENGTH, and X2LENGTH Subcommands (IGRAPH command)
COLOR, STYLE, and SIZE Subcommands (IGRAPH command)
STACK Subcommand (IGRAPH command)
SUMMARYVAR Subcommand (IGRAPH command)
PANEL Subcommand (IGRAPH command)
POINTLABEL Subcommand (IGRAPH command)
CASELABEL Subcommand (IGRAPH command)
COORDINATE Subcommand (IGRAPH command)
EFFECT Subcommand (IGRAPH command)
TITLE, SUBTITLE, and CAPTION Subcommands (IGRAPH command)
VIEWNAME Subcommand (IGRAPH command)
CHARTLOOK Subcommand (IGRAPH command)
REFLINE Subcommand (IGRAPH command)
SPIKE Subcommand (IGRAPH command)
FORMAT Subcommand (IGRAPH command)
KEY Keyword (IGRAPH command)
Element Syntax (IGRAPH command)
SCATTER Subcommand (IGRAPH command)
AREA Subcommand (IGRAPH command)
BAR Subcommand (IGRAPH command)
PIE Subcommand (IGRAPH command)
BOX Subcommand (IGRAPH command)
LINE Subcommand (IGRAPH command)
ERRORBAR Subcommand (IGRAPH command)
HISTOGRAM Subcommand (IGRAPH command)
FITLINE Subcommand (IGRAPH command)


IMPORT

IMPORT (command),IMPORT (command),IMPORT (command)
IMPORT (command),IMPORT (command),IMPORT (command)
syntax chart,syntax chart,syntax chart
portable files,portable files,portable files
reading,reading,reading
data files,data files,data files
reading,reading,reading
IMPORT FILE='file'

 [/TYPE={COMM}]
        {TAPE}

 [/KEEP={ALL**  }] [/DROP=varlist]
        {varlist}

 [/RENAME=(old varnames=new varnames)...]

 [/MAP]

**Default if the subcommand is omitted.

Syntax for the IMPORT command can be generated from the Open File dialog when selecting portable as the file type.

Example

IMPORT FILE='/data/newdata.por'.

Related Topics

Overview (IMPORT command)
Examples (IMPORT command)
FILE Subcommand (IMPORT command)
TYPE Subcommand (IMPORT command)
DROP and KEEP Subcommands (IMPORT command)
RENAME Subcommand (IMPORT command)
MAP Subcommand (IMPORT command)


Overview (IMPORT command)

data files,data files,data files

IMPORT reads portable data files created with the EXPORT command. A portable data file is a data file created by the program and used to transport data between different types of computers and operating systems (such as between IBM CMS and Digital VAX/VMS) or between PASW Statistics and other software using the same portable file format. A portable file contains all of the data and dictionary information stored in the active dataset from which it was created.

The program can also read data files created by other software programs. See GET DATA and GET TRANSLATE for information on reading files created by spreadsheet and database programs such as dBASE, Lotus, and Excel.

Options Collapse Hide details

Options

Format. You can specify the format of the portable file (magnetic tape or communications program) on the TYPE subcommand.

Variables. You can read a subset of variables from the active dataset with the DROP and KEEP subcommands. You can rename variables using RENAME. You can also produce a record of all variables and their names in the active dataset with the MAP subcommand.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is the FILE subcommand with a file specification. All variables from the portable file are copied into the active dataset with their original names, variable and value labels, missing-value flags, and print and write formats.

Subcommand Order Collapse Hide details

Subcommand Order

• FILE and TYPE must precede all other subcommands.

• No specific order is required between FILE and TYPE or among other subcommands.

Operations Collapse Hide details

Operations

• The portable data file and dictionary become the active dataset and dictionary.

• A file saved with weighting in effect (using the WEIGHT command) automatically uses the case weights when the file is read.

Related Topics

IMPORT
Examples (IMPORT command)
FILE Subcommand (IMPORT command)
TYPE Subcommand (IMPORT command)
DROP and KEEP Subcommands (IMPORT command)
RENAME Subcommand (IMPORT command)
MAP Subcommand (IMPORT command)


Examples (IMPORT command)

IMPORT FILE="/data/newdata.por"
  /RENAME=(V1 TO V3=ID,SEX,AGE) /MAP.

• The active dataset is generated from the portable file newdata.por.

• Variables V1, V2, and V3 are renamed ID, SEX, and AGE in the active dataset. Their names remain V1, V2, and V3 in the portable file. None of the other variables copied into the active dataset are renamed.

• MAP requests a display of the variables in the active dataset.

Related Topics

IMPORT
Overview (IMPORT command)
FILE Subcommand (IMPORT command)
TYPE Subcommand (IMPORT command)
DROP and KEEP Subcommands (IMPORT command)
RENAME Subcommand (IMPORT command)
MAP Subcommand (IMPORT command)


FILE Subcommand (IMPORT command)

FILE (subcommand),FILE (subcommand),FILE (subcommand)
IMPORT command,IMPORT command,IMPORT command
IMPORT (command),IMPORT (command),IMPORT (command)
FILE subcommand,FILE subcommand,FILE subcommand

FILE specifies the portable file. FILE is the only required subcommand on IMPORT.

Related Topics

IMPORT
Overview (IMPORT command)
Examples (IMPORT command)
TYPE Subcommand (IMPORT command)
DROP and KEEP Subcommands (IMPORT command)
RENAME Subcommand (IMPORT command)
MAP Subcommand (IMPORT command)


TYPE Subcommand (IMPORT command)

TYPE (subcommand),TYPE (subcommand),TYPE (subcommand)
IMPORT command,IMPORT command,IMPORT command
IMPORT (command),IMPORT (command),IMPORT (command)
TYPE subcommand,TYPE subcommand,TYPE subcommand
COMM (keyword),COMM (keyword),COMM (keyword)
IMPORT command,IMPORT command,IMPORT command
TAPE (keyword),TAPE (keyword),TAPE (keyword)
IMPORT command,IMPORT command,IMPORT command

TYPE indicates whether the portable file is formatted for magnetic tape or for a communications program. TYPE can specify either COMM or TAPE. For more information on magnetic tapes and communications programs, see EXPORT.

COMM | Communications-formatted file. This is the default.
TAPE | Tape-formatted file.

Example

IMPORT TYPE=TAPE /FILE='hubout.por'.

• The file hubout.por is read as a tape-formatted portable file.

Related Topics

IMPORT
Overview (IMPORT command)
Examples (IMPORT command)
FILE Subcommand (IMPORT command)
DROP and KEEP Subcommands (IMPORT command)
RENAME Subcommand (IMPORT command)
MAP Subcommand (IMPORT command)


DROP and KEEP Subcommands (IMPORT command)

DROP (subcommand),DROP (subcommand),DROP (subcommand)
IMPORT command,IMPORT command,IMPORT command
IMPORT (command),IMPORT (command),IMPORT (command)
DROP subcommand,DROP subcommand,DROP subcommand
KEEP (subcommand),KEEP (subcommand),KEEP (subcommand)
IMPORT command,IMPORT command,IMPORT command
IMPORT (command),IMPORT (command),IMPORT (command)
KEEP subcommand,KEEP subcommand,KEEP subcommand

DROP and KEEP are used to read a subset of variables from the portable file.

• DROP excludes a variable or list of variables from the active dataset. All variables not named are included in the file.

• KEEP includes a variable or list of variables in the active dataset. All variables not specified on KEEP are excluded.

• DROP and KEEP cannot precede the FILE or TYPE subcommands.

• Variables can be specified in any order. The order of variables on KEEP determines the order of variables in the active dataset. The order on DROP does not affect the order of variables in the active dataset.

• If a variable is referred to twice on the same subcommand, only the first mention is recognized.

• Multiple DROP and KEEP subcommands are allowed; the effect is cumulative. Specifying a variable named on a previous DROP or not named on a previous KEEP results in an error and the command is not executed.

• The keyword TO can be used to specify a group of consecutive variables in the portable file.

• The portable file is not affected by DROP or KEEP.

Example

IMPORT FILE='/data/newsum.por'
  /DROP=DEPT TO DIVISION.

• The active dataset is generated from the portable file newsum.por. Variables between and including DEPT and DIVISION in the portable file are excluded from the active dataset.

• All other variables are copied into the active dataset.

Related Topics

IMPORT
Overview (IMPORT command)
Examples (IMPORT command)
FILE Subcommand (IMPORT command)
TYPE Subcommand (IMPORT command)
RENAME Subcommand (IMPORT command)
MAP Subcommand (IMPORT command)


RENAME Subcommand (IMPORT command)

RENAME (subcommand),RENAME (subcommand),RENAME (subcommand)
IMPORT command,IMPORT command,IMPORT command
IMPORT (command),IMPORT (command),IMPORT (command)
RENAME subcommand,RENAME subcommand,RENAME subcommand

RENAME renames variables being read from the portable file. The renamed variables retain the variable and value labels, missing-value flags, and print formats contained in the portable file.

• To rename a variable, specify the name of the variable in the portable file, a required equals sign, and the new name.

• A variable list can be specified on both sides of the equals sign. The number of variables on both sides must be the same, and the entire specification must be enclosed in parentheses.

• The keyword TO can be used for both variable lists.

• Any DROP or KEEP subcommand after RENAME must use the new variable names.

Example

IMPORT FILE='/data/newsum.por'
  /DROP=DEPT TO DIVISION
  /RENAME=(NAME,WAGE=LNAME,SALARY).

• RENAME renames NAME and WAGE to LNAME and SALARY.

• LNAME and SALARY retain the variable and value labels, missing-value flags, and print formats assigned to NAME and WAGE.

Related Topics

IMPORT
Overview (IMPORT command)
Examples (IMPORT command)
FILE Subcommand (IMPORT command)
TYPE Subcommand (IMPORT command)
DROP and KEEP Subcommands (IMPORT command)
MAP Subcommand (IMPORT command)


MAP Subcommand (IMPORT command)

MAP (subcommand),MAP (subcommand),MAP (subcommand)
IMPORT command,IMPORT command,IMPORT command
IMPORT (command),IMPORT (command),IMPORT (command)
MAP subcommand,MAP subcommand,MAP subcommand

MAP displays a list of variables in the active dataset, showing all changes that have been specified on the RENAME, DROP, or KEEP subcommands.

• MAP can be specified as often as desired.

• MAP confirms only the changes specified on the subcommands that precede the MAP request.

• Results of subcommands that follow MAP are not mapped. When MAP is specified last, it also produces a description of the file.

Example

IMPORT FILE='/data/newsum.por'
  /DROP=DEPT TO DIVISION /MAP
  /RENAME NAME=LNAME WAGE=SALARY /MAP.

• The first MAP subcommand produces a listing of the variables in the file after DROP has dropped the specified variables.

• RENAME renames NAME and WAGE.

• The second MAP subcommand shows the variables in the file after renaming.

Related Topics

IMPORT
Overview (IMPORT command)
Examples (IMPORT command)
FILE Subcommand (IMPORT command)
TYPE Subcommand (IMPORT command)
DROP and KEEP Subcommands (IMPORT command)
RENAME Subcommand (IMPORT command)


INCLUDE

INCLUDE (command),INCLUDE (command),INCLUDE (command)
INCLUDE (command),INCLUDE (command),INCLUDE (command)
syntax chart,syntax chart,syntax chart
command files,command files,command files
INCLUDE FILE='file'
       [ENCODING = 'encoding specification']

This command takes effect immediately. It does not read the active dataset or execute pending transformations. See the topic Command Order for more information.

Release History Collapse Hide details

Release History

Release 16.0

• ENCODING keyword added for Unicode support.

Example

INCLUDE FILE='/data/gsslabs.sps'.

Related Topics

Overview (INCLUDE command)
ENCODING Keyword (INCLUDE command)
Examples (INCLUDE command)
FILE Subcommand (INCLUDE command)
INSERT


Overview (INCLUDE command)

INCLUDE includes a file of commands in a session. INCLUDE is especially useful for including a long series of data definition statements or transformations. Another use for INCLUDE is to set up a library of commonly used commands and include them in the command sequence as they are needed.

Note: The newer INSERT provides equivalent functionality, plus additional features not available with INCLUDE. See the topic INSERT for more information.

INCLUDE allows you to run multiple commands together during a session and can save time. Complex or repetitive commands can be stored in a command file and included in the session, while simpler commands or commands unique to the current analysis can be entered during the session, before and after the included file.

Basic Specification Collapse Hide details

Basic Specification

The only specification is the FILE subcommand, which specifies the file to include. When INCLUDE is executed, the commands in the specified file are processed.

Syntax Rules Collapse Hide details

Syntax Rules

• Commands in an included file must begin in column 1, and continuation lines for each command must be indented at least one column.

• The maximum line length for a command syntax file run via the INCLUDE command is 256 characters. Any characters beyond this limit are truncated.

• As many INCLUDE commands as needed can be used in a session.

• INCLUDE commands can be nested so that one set of included commands includes another set of commands. This nesting can go to five levels. However, a file cannot be included that is still open from a previous step.

Operations Collapse Hide details

Operations

• If an included file contains a FINISH command, the session ends and no further commands are processed.

• If a journal file is created for the session, INCLUDE is copied to the journal file. Commands from the included file are also copied to the journal file but are treated like printed messages. Thus, INCLUDE can be executed from the journal file if the journal file is later used as a command file. Commands from the included file are executed only once.

Related Topics

INCLUDE
ENCODING Keyword (INCLUDE command)
Examples (INCLUDE command)
FILE Subcommand (INCLUDE command)


ENCODING Keyword (INCLUDE command)

INCLUDE (command),INCLUDE (command),INCLUDE (command)
ENCODING keyword,ENCODING keyword,ENCODING keyword
ENCODING (keyword),ENCODING (keyword),ENCODING (keyword)
INCLUDE command,INCLUDE command,INCLUDE command
Unicode,Unicode,Unicode
command syntax,command syntax,command syntax
syntax,syntax,syntax
Unicode,Unicode,Unicode
command syntax,command syntax,command syntax
Unicode,Unicode,Unicode

ENCODING specifies the encoding format of the file. The keyword is followed by an equals sign and a quoted encoding specification.

• In Unicode mode, the default is UTF8. For more information, see SET command, UNICODE subcommand.

• In code page mode, the default is the current locale setting. For more information, see SET command, LOCALE subcommand.

• The quoted encoding value can be: Locale (the current locale setting), UTF8, UTF16, UTF16BE (big endian), UTF16LE (little endian), a numeric Windows code page value (for example, '1252'), or an IANA code page value (for example, 'iso8859-1' or cp1252).

Related Topics

INCLUDE
Overview (INCLUDE command)
Examples (INCLUDE command)
FILE Subcommand (INCLUDE command)


Examples (INCLUDE command)

INCLUDE FILE='/data/gsslabs.sps'.

• INCLUDE includes the file gsslabs.sps in the prompted session. When INCLUDE is executed, the commands in gsslabs.sps are processed.

• Assume that the include file gsslabs.sps contains the following:

DATA LIST FILE='/data/data52.txt'
  /RELIGION 5 OCCUPAT 7 SES 12 ETHNIC 15
   PARTY 19 VOTE48 33 VOTE52 41.

The active dataset will be defined and ready for analysis after INCLUDE is executed.

Related Topics

INCLUDE
Overview (INCLUDE command)
ENCODING Keyword (INCLUDE command)
FILE Subcommand (INCLUDE command)


FILE Subcommand (INCLUDE command)

INCLUDE (command),INCLUDE (command),INCLUDE (command)
FILE subcommand,FILE subcommand,FILE subcommand
FILE (subcommand),FILE (subcommand),FILE (subcommand)
INCLUDE command,INCLUDE command,INCLUDE command

FILE identifies the file containing commands. FILE is the only specification on INCLUDE and is required.

Related Topics

INCLUDE
Overview (INCLUDE command)
ENCODING Keyword (INCLUDE command)
Examples (INCLUDE command)


INFO

INFO (command),INFO (command),INFO (command)

This command is obsolete and no longer supported.


INPUT PROGRAM-END INPUT PROGRAM

INPUT PROGRAM (command),INPUT PROGRAM (command),INPUT PROGRAM (command)
END INPUT PROGRAM (command),END INPUT PROGRAM (command),END INPUT PROGRAM (command)
INPUT PROGRAM (command),INPUT PROGRAM (command),INPUT PROGRAM (command)
syntax chart,syntax chart,syntax chart
INPUT PROGRAM

commands to create or define cases

END INPUT PROGRAM

Example

INPUT PROGRAM.
DATA LIST FILE=PRICES /YEAR 1-4 QUARTER 6 PRICE 8-12(2).

DO IF (YEAR GE 1881).  /*Stop reading before 1881
END FILE.
END IF.
END INPUT PROGRAM.

Related Topics

Overview (INPUT PROGRAM-END INPUT PROGRAM command)
Examples (INPUT PROGRAM-END INPUT PROGRAM command)
Input Programs (INPUT PROGRAM-END INPUT PROGRAM command)
Input State (INPUT PROGRAM-END INPUT PROGRAM command)
More Examples (INPUT PROGRAM-END INPUT PROGRAM command)


Overview (INPUT PROGRAM-END INPUT PROGRAM command)

The INPUT PROGRAM and END INPUT PROGRAM commands enclose data definition and transformation commands that build cases from input records. The input program often encloses one or more DO IF-END IF or LOOP-END LOOP structures, and it must include at least one file definition command, such as DATA LIST. One of the following utility commands is also usually used:

END CASE | Build cases from the commands within the input program and pass the cases to the commands immediately following the input program.
END FILE | Terminate processing of a data file before the actual end of the file or define the end of the file when the input program is used to read raw data.
REREAD | Reread the current record using a different DATA LIST.
REPEATING DATA | Read repeating groups of data from the same input record.

For more information on the commands used in an input program, see the discussion of each command.

Input programs create a dictionary and data for an active dataset from raw data files; they cannot be used to read PASW Statistics data files. They can be used to process direct-access and keyed data files. For details, see KEYED DATA LIST.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is INPUT PROGRAM, the commands used to create cases and define the active dataset, and END INPUT PROGRAM.

• INPUT PROGRAM and END INPUT PROGRAM each must be specified on a separate line and have no additional specifications.

• To define an active dataset, the input program must include at least one DATA LIST or END FILE command.

Operations Collapse Hide details

Operations

• The INPUT PROGRAM-END INPUT PROGRAM structure defines an active dataset and is not executed until the program encounters a procedure or the EXECUTE command.

• INPUT PROGRAM clears the current active dataset.

Related Topics

INPUT PROGRAM-END INPUT PROGRAM
Examples (INPUT PROGRAM-END INPUT PROGRAM command)
Input Programs (INPUT PROGRAM-END INPUT PROGRAM command)
Input State (INPUT PROGRAM-END INPUT PROGRAM command)
More Examples (INPUT PROGRAM-END INPUT PROGRAM command)


Examples (INPUT PROGRAM-END INPUT PROGRAM command)

input programs,input programs,input programs
examples,examples,examples

Select Cases with an Input Program

INPUT PROGRAM.
DATA LIST FILE=PRICES /YEAR 1-4 QUARTER 6 PRICE 8-12(2).

DO IF (YEAR GE 1881).  /*Stop reading when reaching 1881
END FILE.
END IF.
END INPUT PROGRAM.

LIST.

• The input program is defined between the INPUT PROGRAM and END INPUT PROGRAM commands.

• This example assumes that data records are entered chronologically by year. The DO IF-END IF structure specifies an end of file when the first case with a value of 1881 or later for YEAR is reached.

• LIST executes the input program and lists cases in the active dataset. The case that causes the end of the file is not included in the active dataset generated by the input program.

• As an alternative to this input program, you can use N OF CASES to select cases if you know the exact number of cases. Another alternative is to use SELECT IF to select cases before 1881, but then the program would unnecessarily read the entire input file.

Skip the First n Records in a File

INPUT PROGRAM.
NUMERIC        #INIT.
DO IF          NOT (#INIT).
+  LOOP           #I = 1 TO 5.
+     DATA LIST      NOTABLE/.   /* No data - just skip record
+  END LOOP.
+  COMPUTE        #INIT = 1.
END IF.
DATA LIST      NOTABLE/ X 1.
END INPUT PROGRAM.

BEGIN DATA
A                           /* The first 5 records are skipped
B
C
D
E
1
2
3
4
5
END DATA.
LIST.

• NUMERIC declares the scratch variable #INIT, which is initialized to system-missing.

• The DO IF structure is executed as long as #INIT does not equal 1.

• LOOP is executed five times. Within the loop, DATA LIST is specified without variable names, causing the program to read records in the data file without copying them into the active dataset. LOOP is executed five times, so the program reads five records in this manner. END LOOP terminates this loop.

• COMPUTE creates the scratch variable #INIT and sets it equal to 1. The DO IF structure is therefore not executed again.

• END IF terminates the DO IF structure.

• The second DATA LIST specifies numeric variable X, which is located in column 1 of each record. Because the program has already read five records, the first value for X that is copied into the active dataset is read from record 6.

Related Topics

INPUT PROGRAM-END INPUT PROGRAM
Overview (INPUT PROGRAM-END INPUT PROGRAM command)
Input Programs (INPUT PROGRAM-END INPUT PROGRAM command)
Input State (INPUT PROGRAM-END INPUT PROGRAM command)
More Examples (INPUT PROGRAM-END INPUT PROGRAM command)


Input Programs (INPUT PROGRAM-END INPUT PROGRAM command)

The program builds the active dataset dictionary when it encounters commands that create and define variables. At the same time, the program builds an input program that constructs cases and an optional transformation program that modifies cases prior to analysis or display. By the time the program encounters a procedure command that tells it to read the data, the active dataset dictionary is ready, and the programs that construct and modify the cases in the active dataset are built.

The internal input program is usually built from either a single DATA LIST command or from any of the commands that read or combine PASW Statistics data files (for example, GET, ADD FILES, MATCH FILES, UPDATE, and so on). The input program can also be built from the FILE TYPE-END FILE TYPE structure used to define nested, mixed, or grouped files. The third type of input program is specified with the INPUT PROGRAM-END INPUT PROGRAM commands.

With INPUT PROGRAM-END INPUT PROGRAM, you can create your own input program to perform many different operations on raw data. You can use transformation commands to build cases. You can read nonrectangular files, concatenate raw data files, and build cases selectively. You can also create an active dataset without reading any data at all.

Related Topics

INPUT PROGRAM-END INPUT PROGRAM
Overview (INPUT PROGRAM-END INPUT PROGRAM command)
Examples (INPUT PROGRAM-END INPUT PROGRAM command)
Input State (INPUT PROGRAM-END INPUT PROGRAM command)
More Examples (INPUT PROGRAM-END INPUT PROGRAM command)


Input State (INPUT PROGRAM-END INPUT PROGRAM command)

input state,input state,input state

There are four program states in the program: the initial state, in which there is no active dataset dictionary; the input state, in which cases are created from the input file; the transformation state, in which cases are transformed; and the procedure state, in which procedures are executed. When you specify INPUT PROGRAM-END INPUT PROGRAM, you must pay attention to which commands are allowed within the input state, which commands can appear only within the input state, and which are not allowed within the input state.

Related Topics

INPUT PROGRAM-END INPUT PROGRAM
Overview (INPUT PROGRAM-END INPUT PROGRAM command)
Examples (INPUT PROGRAM-END INPUT PROGRAM command)
Input Programs (INPUT PROGRAM-END INPUT PROGRAM command)
More Examples (INPUT PROGRAM-END INPUT PROGRAM command)


More Examples (INPUT PROGRAM-END INPUT PROGRAM command)

For additional examples of input programs, refer to DATA LIST, DO IF, DO REPEAT, END CASE, END FILE, LOOP, NUMERIC, POINT, REPEATING DATA, REREAD, and VECTOR.

Related Topics

INPUT PROGRAM-END INPUT PROGRAM
Overview (INPUT PROGRAM-END INPUT PROGRAM command)
Examples (INPUT PROGRAM-END INPUT PROGRAM command)
Input Programs (INPUT PROGRAM-END INPUT PROGRAM command)
Input State (INPUT PROGRAM-END INPUT PROGRAM command)


INSERT

INSERT (command),INSERT (command),INSERT (command)
INSERT (command),INSERT (command),INSERT (command)
syntax chart,syntax chart,syntax chart
release history,release history,release history

Note: Equals signs (=) used in the syntax chart are required elements.

INSERT  FILE='file specification'
       [SYNTAX = {INTERACTIVE*}]
                 {BATCH       }
       [ERROR = {CONTINUE*}]
                {STOP     }
       [CD = {NO*}]
             {YES}
       [ENCODING = 'encoding specification']

*Default if keyword omitted.

This command takes effect immediately. It does not read the active dataset or execute pending transformations. See the topic Command Order for more information.

Release History Collapse Hide details

Release History

Release 13.0

• Command introduced.

Release 16.0

• ENCODING keyword added for Unicode support.

Example

INSERT FILE='/examples/commands/file1.sps'
  SYNTAX=BATCH ERROR=STOP CD=YES ENCODING='UTF8'.

Related Topics

OVERVIEW (INSERT command)
FILE Keyword (INSERT command)
SYNTAX Keyword (INSERT command)
ERROR Keyword (INSERT command)
CD Keyword (INSERT command)
ENCODING Keyword (INSERT command)
INSERT vs. INCLUDE (INSERT command)


OVERVIEW (INSERT command)

INSERT includes a file of commands in a session. INSERT is especially useful for including a long series of data definition statements or transformations. Another use for INSERT is to set up a library of commonly used commands and include them in the command sequence as they are needed.

INSERT allows you to run multiple commands together during a session and can save time. Complex or repetitive commands can be stored in a command file and included in the session, while simpler commands or commands unique to the current analysis can be entered during the session, before and after the included file.

INSERT provides the same basic functionality as INCLUDE, plus the ability to:

• Insert files that use either batch or interactive syntax rules.

• Control treatment of error conditions in inserted files.

• Change the working directory to the directory containing an inserted file.

Limitations

The maximum line length for a command syntax file run via the INSERT command is 256 characters. Any characters beyond this limit are truncated.

Related Topics

INSERT
FILE Keyword (INSERT command)
SYNTAX Keyword (INSERT command)
ERROR Keyword (INSERT command)
CD Keyword (INSERT command)
ENCODING Keyword (INSERT command)
INSERT vs. INCLUDE (INSERT command)


FILE Keyword (INSERT command)

INSERT (command),INSERT (command),INSERT (command)
FILE keyword,FILE keyword,FILE keyword
FILE (keyword),FILE (keyword),FILE (keyword)
INSERT command,INSERT command,INSERT command

The minimum specification is the FILE keyword, followed by an equals sign and a quoted file specification (or quoted file handle) that specifies the file to insert. When the INSERT command is run, the commands in the specified file are processed.

Example

INSERT FILE='/examples/commands/file1.sps'.

Related Topics

INSERT
OVERVIEW (INSERT command)
SYNTAX Keyword (INSERT command)
ERROR Keyword (INSERT command)
CD Keyword (INSERT command)
ENCODING Keyword (INSERT command)
INSERT vs. INCLUDE (INSERT command)


SYNTAX Keyword (INSERT command)

INSERT (command),INSERT (command),INSERT (command)
SYNTAX keyword,SYNTAX keyword,SYNTAX keyword
SYNTAX (keyword),SYNTAX (keyword),SYNTAX (keyword)
INSERT command,INSERT command,INSERT command
syntax rules,syntax rules,syntax rules
inserted command files,inserted command files,inserted command files
interactive syntax rules,interactive syntax rules,interactive syntax rules
inserted command files,inserted command files,inserted command files
batch syntax rules,batch syntax rules,batch syntax rules
inserted command files,inserted command files,inserted command files

The optional SYNTAX keyword specifies the syntax rules that apply to the inserted file. The keyword is followed by an equals sign (=) and one of the following alternatives:

INTERACTIVE | Each command must end with a period. Periods can appear anywhere within the command, and commands can continue on multiple lines, but a period as the last non-blank character on a line is interpreted as the end of the command. Continuation lines and new commands can start anywhere on a new line. These are the "interactive" rules in effect when you select and run commands in a syntax window. This is the default if the SYNTAX keyword is omitted.
BATCH | Each command must start at the beginning of a new line (no blank spaces before the start of the command), and continuation lines must be indented at least one space. If you want to indent new commands, you can use a plus sign, dash, or period as the first character at the start of the line and then indent the actual command. The period at the end of the command is optional. This setting is compatible with the syntax rules for command files included with the INCLUDE command.

Command syntax created with the Paste button in dialogs will work in either interactive or batch modes. For more information on interactive and batch syntax rules, see Running Commands.

Related Topics

INSERT
OVERVIEW (INSERT command)
FILE Keyword (INSERT command)
ERROR Keyword (INSERT command)
CD Keyword (INSERT command)
ENCODING Keyword (INSERT command)
INSERT vs. INCLUDE (INSERT command)


ERROR Keyword (INSERT command)

errors,errors,errors
inserted command files,inserted command files,inserted command files
INSERT (command),INSERT (command),INSERT (command)
ERROR keyword,ERROR keyword,ERROR keyword
ERROR (keyword),ERROR (keyword),ERROR (keyword)
INSERT command,INSERT command,INSERT command

The optional ERROR keyword controls the handling of error conditions in inserted files. The keyword is followed by an equals sign (=) and one of the following alternatives:

CONTINUE | Errors in inserted files do not automatically stop command processing. The inserted commands are treated as part of the normal command stream, and command processing continues in the normal fashion. This is the default if the ERROR keyword is omitted.
STOP | Command processing stops when the first error in an inserted file is encountered. This is compatible with the behavior of command files included with the INCLUDE command.

Related Topics

INSERT
OVERVIEW (INSERT command)
FILE Keyword (INSERT command)
SYNTAX Keyword (INSERT command)
CD Keyword (INSERT command)
ENCODING Keyword (INSERT command)
INSERT vs. INCLUDE (INSERT command)


CD Keyword (INSERT command)

working directory,working directory,working directory
changing,changing,changing
changing the working directory,changing the working directory,changing the working directory
INSERT (command),INSERT (command),INSERT (command)
CD keyword,CD keyword,CD keyword
CD (keyword),CD (keyword),CD (keyword)
INSERT command,INSERT command,INSERT command

The optional CD keyword can specify the directory containing the inserted file as the working directory, making it possible to use relative paths for file specifications within the inserted file. The keyword is followed by an equals sign (=) and one of the following alternatives:

NO | The working directory is not changed. This is the default if the CD keyword is omitted.
YES | The working directory is changed to the directory containing the inserted file. Subsequent relative paths in command file specifications are interpreted as being relative to the location of the inserted file.

The change in the working directory remains in effect until some other condition occurs that changes the working directory during the session, such as explicitly changing the working directory on another INSERT command with a CD keyword or a CD command that specifies a different directory (see CD).

The CD keyword has no effect on the relative directory location for SET command file specifications, including JOURNAL , CTEMPLATE, and TLOOK. File specifications on the SET command should include complete path information.

The original working directory can be preserved with the PRESERVE command and later restored with the RESTORE command, as in:

PRESERVE.
INSERT FILE=’/commands/examples/file1.sps’
  CD=YES.
INSERT FILE=’file2.sps’.
RESTORE.

• PRESERVE retains the original working directory location.

• The first INSERT command changes the working directory.

• The second INSERT command will look for file2.sps in /commands/examples.

• RESTORE resets the working directory to whatever it was prior to the first INSERT command.

For more information, see the PRESERVE and RESTORE commands.

Related Topics

INSERT
OVERVIEW (INSERT command)
FILE Keyword (INSERT command)
SYNTAX Keyword (INSERT command)
ERROR Keyword (INSERT command)
ENCODING Keyword (INSERT command)
INSERT vs. INCLUDE (INSERT command)


ENCODING Keyword (INSERT command)

INSERT (command),INSERT (command),INSERT (command)
ENCODING keyword,ENCODING keyword,ENCODING keyword
ENCODING (keyword),ENCODING (keyword),ENCODING (keyword)
INSERT command,INSERT command,INSERT command
Unicode,Unicode,Unicode
command syntax,command syntax,command syntax
syntax,syntax,syntax
Unicode,Unicode,Unicode
command syntax,command syntax,command syntax
Unicode,Unicode,Unicode

ENCODING specifies the encoding format of the file. The keyword is followed by an equals sign and a quoted encoding specification.

• In Unicode mode, the default is UTF8. For more information, see SET command, UNICODE subcommand.

• In code page mode, the default is the current locale setting. For more information, see SET command, LOCALE subcommand.

• The quoted encoding value can be: Locale (the current locale setting), UTF8, UTF16, UTF16BE (big endian), UTF16LE (little endian), a numeric Windows code page value (for example, '1252'), or an IANA code page value (for example, 'iso8859-1' or cp1252).

Related Topics

INSERT
OVERVIEW (INSERT command)
FILE Keyword (INSERT command)
SYNTAX Keyword (INSERT command)
ERROR Keyword (INSERT command)
CD Keyword (INSERT command)
INSERT vs. INCLUDE (INSERT command)


INSERT vs. INCLUDE (INSERT command)

INSERT (command),INSERT (command),INSERT (command)
vs. INCLUDE command,vs. INCLUDE command,vs. INCLUDE command
INCLUDE (command),INCLUDE (command),INCLUDE (command)
vs. INSERT command,vs. INSERT command,vs. INSERT command

INSERT is a newer, more powerful and flexible alternative to INCLUDE. Files included with INCLUDE must always adhere to batch syntax rules, and command processing stops when the first error in an included file is encountered. You can effectively duplicate the INCLUDE behavior with SYNTAX=BATCH and ERROR=STOP on the INSERT command.

Related Topics

INSERT
OVERVIEW (INSERT command)
FILE Keyword (INSERT command)
SYNTAX Keyword (INSERT command)
ERROR Keyword (INSERT command)
CD Keyword (INSERT command)
ENCODING Keyword (INSERT command)


KEYED DATA LIST

KEYED DATA LIST (command),KEYED DATA LIST (command),KEYED DATA LIST (command)
KEYED DATA LIST (command),KEYED DATA LIST (command),KEYED DATA LIST (command)
syntax chart,syntax chart,syntax chart
data files,data files,data files
keyed,keyed,keyed
data files,data files,data files
direct access,direct access,direct access
keyed data files,keyed data files,keyed data files
reading,reading,reading
direct-access files,direct-access files,direct-access files
reading,reading,reading

KEYED DATA LIST KEY=varname IN=varname

 FILE='file' [{TABLE  }] [ENCODING='encoding specification']
              {NOTABLE}

 /varname {col location [(format)]} [varname ..]
          {(FORTRAN-like format)  }
Release History Collapse Hide details

Release History

Release 16.0

• ENCODING subcommand added for Unicode support.

Example

FILE HANDLE EMPL/ file specifications.
KEYED DATA LIST FILE=EMPL KEY=#NXTCASE IN=#FOUND
          /YRHIRED 1-2 SEX 3 JOBCLASS 4.

Related Topics

Overview (KEYED DATA LIST command)
Examples (KEYED DATA LIST command)
FILE Subcommand (KEYED DATA LIST command)
KEY Subcommand (KEYED DATA LIST command)
IN Subcommand (KEYED DATA LIST command)
TABLE and NOTABLE Subcommands (KEYED DATA LIST command)
ENCODING Subcommand (KEYED DATA LIST command)


Overview (KEYED DATA LIST command)

KEYED DATA LIST (command),KEYED DATA LIST (command),KEYED DATA LIST (command)
keyed files,keyed files,keyed files
KEYED DATA LIST (command),KEYED DATA LIST (command),KEYED DATA LIST (command)
keyed files,keyed files,keyed files
KEYED DATA LIST (command),KEYED DATA LIST (command),KEYED DATA LIST (command)
direct-access files,direct-access files,direct-access files

KEYED DATA LIST reads raw data from two types of nonsequential files: direct-access files, which provide direct access by a record number, and keyed files, which provide access by a record key. An example of a direct-access file is a file of 50 records, each corresponding to one of the United States. If you know the relationship between the states and the record numbers, you can retrieve the data for any specific state. An example of a keyed file is a file containing social security numbers and other information about a firm’s employees. The social security number can be used to identify the records in the file.

Direct-Access Files Collapse Hide details

Direct-Access Files

There are various types of direct-access files. This program’s concept of a direct-access file, however, is very specific. The file must be one from which individual records can be selected according to their number. The records in a 100-record direct-access file, for example, are numbered from 1 to 100.

Although the concept of record number applies to almost any file, not all files can be treated by this program as direct-access files. In fact, some operating systems provide no direct-access capabilities at all, and others permit only a narrowly defined subset of all files to be treated as direct access.

Very few files turn out to be good candidates for direct-access organization. In the case of an inventory file, for example, the usual large gaps in the part numbering sequence would result in large amounts of wasted file space. Gaps are not a problem, however, if they are predictable. For example, if you recognize that telephone area codes have first digits of 2 through 9, second digits of 0 or 1, and third digits of 0 through 9, you can transform an area code into a record number by using the following COMPUTE statement:

COMPUTE RECNUM = 20*(DIGIT1-2) + 10*DIGIT2 + DIGIT3 + 1.

where DIGIT1, DIGIT2, and DIGIT3 are variables corresponding to the respective digits in the area code, and RECNUM is the resulting record number. The record numbers would range from 1, for the nonexistent area code 200, through 160, for area code 919. The file would then have a manageable number of unused records.

Keyed Files Collapse Hide details

Keyed Files

Of the many kinds of keyed files, the ones to which the program can provide access are generally known as indexed sequential files. A file of this kind is basically a sequential file in which an index is maintained so that the file can be processed either sequentially or selectively. In effect, there is an underlying data file that is accessed through a file of index entries. The file of index entries may, for example, contain the fact that data record 797 is associated with social security number 476-77-1359. Depending on the implementation, the underlying data may or may not be maintained in sequential order.

The key for each record in the file generally comprises one or more pieces of information found within the record. An example of a complex key is a customer’s last name and house number, plus the consonants in the street name, plus the zip code, plus a unique digit in case there are duplicates. Regardless of the information contained in the key, the program treats it as a character string.

On some systems, more than one key is associated with each record. That is, the records in a file can be identified according to different types of information. Although the primary key for a file normally must be unique, sometimes the secondary keys need not be. For example, the records in an employee file might be identified by social security number and job classification.

Options Collapse Hide details

Options

Data Source. You can specify the name of the keyed file on the FILE subcommand. By default, the last file that was specified on an input command, such as DATA LIST or REPEATING DATA, is read.

Summary Table. You can display a table that summarizes the variable definitions.

Basic Specification Collapse Hide details

Basic Specification

• The basic specification requires FILE, KEY, and IN, each of which specifies one variable, followed by a slash and variable definitions.

• FILE specifies the direct-access or keyed file. The file must have a file handle already defined.

• KEY specifies the variable whose value will be used to read a record. For direct-access files, the variable must be numeric; for keyed files, it must be string.

• IN creates a logical variable that flags whether a record was successfully read.

• Variable definitions follow all subcommands; the slash preceding them is required. Variable definitions are similar to those specified on DATA LIST.

Subcommand Order Collapse Hide details

Subcommand Order

• Subcommands can be named in any order.

• Variable definitions must follow all specified subcommands.

Syntax Rules Collapse Hide details

Syntax Rules

• Specifications for the variable definitions are the same as those described for DATA LIST. The only difference is that only one record can be defined per case.

• The FILE HANDLE command must be used if the FILE subcommand is specified on KEYED DATA LIST.

• KEYED DATA LIST can be specified in an input program, or it can be used as a transformation language to change an existing active dataset. This differs from all other input commands, such as GET and DATA LIST, which create new active datasets.

Operations Collapse Hide details

Operations

• Variable names are stored in the active dataset dictionary.

• Formats are stored in the active dataset dictionary and are used to display and write the values. To change output formats of numeric variables, use the FORMATS command.

Related Topics

KEYED DATA LIST
Examples (KEYED DATA LIST command)
FILE Subcommand (KEYED DATA LIST command)
KEY Subcommand (KEYED DATA LIST command)
IN Subcommand (KEYED DATA LIST command)
TABLE and NOTABLE Subcommands (KEYED DATA LIST command)
ENCODING Subcommand (KEYED DATA LIST command)


Examples (KEYED DATA LIST command)

Specifying a Key Variable

FILE HANDLE EMPL/ file specifications.
KEYED DATA LIST FILE=EMPL KEY=#NXTCASE IN=#FOUND
          /YRHIRED 1-2 SEX 3 JOBCLASS 4.

• FILE HANDLE defines the handle for the data file to be read by KEYED DATA LIST. The handle is specified on the FILE subcommand of KEYED DATA LIST.

• KEY on KEYED DATA LIST specifies the variable to be used as the access key. For a direct-access file, the value of the variable must be between 1 and the number of records in the file. For a keyed file, the value must be a string.

• IN creates the logical scratch variable #FOUND, whose value will be 1 if the record is successfully read, or 0 if the record is not found.

• The variable definitions are the same as those used for DATA LIST.

Reading a Direct-Access File

* Reading a direct-access file: sampling 1 out of every 25 records.

FILE HANDLE    EMPL/ file specifications.
INPUT PROGRAM.
COMPUTE #INTRVL = TRUNC(UNIF(48))+1. /* Mean interval = 25
COMPUTE #NXTCASE = #NXTCASE+#INTRVL. /* Next record number
COMPUTE #EOF = #NXTCASE > 1000.      /* End of file check
DO IF   #EOF.
+  END FILE.
ELSE.
+  KEYED DATA LIST  FILE=EMPL, KEY=#NXTCASE, IN=#FOUND, NOTABLE
                   /YRHIRED 1-2 SEX 3 JOBCLASS 4.
+  DO IF       #FOUND.
+     END CASE.                     /* Return a case
+  ELSE.
+     PRINT / 'Oops. #NXTCASE=' #NXTCASE.
+  END IF.
END IF.
END INPUT PROGRAM.
EXECUTE.

• FILE HANDLE defines the handle for the data file to be read by the KEYED DATA LIST command. The record numbers for this example are generated by the transformation language; they are not based on data taken from another file.

• The INPUT PROGRAM and END INPUT PROGRAM commands begin and end the block of commands that build cases from the input file. Since the session generates cases, an input program is required.

• The first two COMPUTE statements determine the number of the next record to be selected. This is done in two steps. First, the integer portion is taken from the sum of 1 and a uniform pseudo-random number between 1 and 49. The result is a mean interval of 25. Second, the variable #NXTCASE is added to this number to generate the next record number. This record number, #NXTCASE, will be used for the key variable on the KEYED DATA LIST command. The third COMPUTE creates a logical scratch variable, #EOF, that has a value of 0 if the record number is less than or equal to 1000, or 1 if the value of the record number is greater than 1000.

• The DO IF—END IF structure controls the building of cases. If the record number is greater than 1000, #EOF equals 1, and the END FILE command tells the program to stop reading data and end the file.

• If the record number is less than or equal to 1000, the record is read via KEYED DATA LIST using the value of #NXTCASE. A case is generated if the record exists (#FOUND equals 1). If not, the program displays the record number and continues to the next case. The sample will have about 40 records.

• EXECUTE causes the transformations to be executed.

• This example illustrates the difference between DATA LIST, which always reads the next record in a file, and KEYED DATA LIST, which reads only specified records. The record numbers must be generated by another command or be contained in the active dataset.

Reading a Keyed File

* Reading a keyed file: reading selected records.

GET FILE=STUDENTS/KEEP=AGE,SEX,COURSE.
FILE HANDLE COURSES/ file specifications.
STRING #KEY(A4).
COMPUTE #KEY = STRING(COURSE,N4). /* Create a string key
KEYED DATA LIST FILE=COURSES KEY=#KEY IN=#FOUND NOTABLE
     /PERIOD 13 CREDITS 16.
SELECT IF #FOUND.
LIST.

• GET reads the STUDENTS file, which contains information on students, including a course identification for each student. The course identification will be used as the key for selecting one record from a file of courses.

• The FILE HANDLE command defines a file handle for the file of courses.

• The STRING and COMPUTE commands transform the course identification from numeric to string for use as a key. For keyed files, the key variable must be a string.

• KEYED DATA LIST uses the value of the newly created string variable #KEY as the key to search the course file. If a record that matches the value of #KEY is found, #FOUND is set to 1; otherwise, it is set to 0. Note that KEYED DATA LIST appears outside an input program in this example.

• If the course file contains the requested record, #FOUND equals 1. The variables PERIOD and CREDITS are added to the case and the case is selected via the SELECT IF command; otherwise, the case is dropped.

• LIST lists the values of the selected cases.

• This example shows how existing cases can be updated on the basis of information read from a keyed file.

• This task could also be accomplished by reading the entire course file with DATA LIST and combining it with the student file via the MATCH FILES command. The technique you should use depends on the percentage of the records in the course file that need to be accessed. If fewer than 10% of the course file records are read, KEYED DATA LIST is probably more efficient. As the percentage of the records that are read increases, reading the entire course file and using MATCH makes more sense.

Related Topics

KEYED DATA LIST
Overview (KEYED DATA LIST command)
FILE Subcommand (KEYED DATA LIST command)
KEY Subcommand (KEYED DATA LIST command)
IN Subcommand (KEYED DATA LIST command)
TABLE and NOTABLE Subcommands (KEYED DATA LIST command)
ENCODING Subcommand (KEYED DATA LIST command)


FILE Subcommand (KEYED DATA LIST command)

KEYED DATA LIST (command),KEYED DATA LIST (command),KEYED DATA LIST (command)
FILE subcommand,FILE subcommand,FILE subcommand
FILE (subcommand),FILE (subcommand),FILE (subcommand)
KEYED DATA LIST command,KEYED DATA LIST command,KEYED DATA LIST command

FILE specifies the handle for the direct-access or keyed data file. The file handle must have been defined on a previous FILE HANDLE command (or, in the case of the IBM OS environment, on a DD statement in the JCL).

Related Topics

KEYED DATA LIST
Overview (KEYED DATA LIST command)
Examples (KEYED DATA LIST command)
KEY Subcommand (KEYED DATA LIST command)
IN Subcommand (KEYED DATA LIST command)
TABLE and NOTABLE Subcommands (KEYED DATA LIST command)
ENCODING Subcommand (KEYED DATA LIST command)


KEY Subcommand (KEYED DATA LIST command)

KEY (subcommand),KEY (subcommand),KEY (subcommand)
KEYED DATA LIST command,KEYED DATA LIST command,KEYED DATA LIST command
KEYED DATA LIST (command),KEYED DATA LIST (command),KEYED DATA LIST (command)
KEY subcommand,KEY subcommand,KEY subcommand

KEY specifies the variable whose value will be used as the key. This variable must already exist as the result of a prior DATA LIST, KEYED DATA LIST, GET, or transformation command.

• KEY is required. Its only specification is a single variable. The variable can be a permanent variable or a scratch variable.

• For direct-access files, the key variable must be numeric, and its value must be between 1 and the number of records in the file.

• For keyed files, the key variable must be string. If the keys are numbers, such as social security numbers, the STRING function can be used to convert the numbers to strings. For example, the following might be required to get the value of a numeric key into exactly the same format as used on the keyed file:

COMPUTE #KEY=STRING(123,IB4).

Related Topics

KEYED DATA LIST
Overview (KEYED DATA LIST command)
Examples (KEYED DATA LIST command)
FILE Subcommand (KEYED DATA LIST command)
IN Subcommand (KEYED DATA LIST command)
TABLE and NOTABLE Subcommands (KEYED DATA LIST command)
ENCODING Subcommand (KEYED DATA LIST command)


IN Subcommand (KEYED DATA LIST command)

KEYED DATA LIST (command),KEYED DATA LIST (command),KEYED DATA LIST (command)
IN subcommand,IN subcommand,IN subcommand
IN (subcommand),IN (subcommand),IN (subcommand)
KEYED DATA LIST command,KEYED DATA LIST command,KEYED DATA LIST command

IN creates a numeric variable whose value indicates whether or not the specified record is found.

• IN is required. Its only specification is a single numeric variable. The variable can be a permanent variable or a scratch variable.

• The value of the variable is 1 if the record is successfully read or 0 if the record is not found. The IN variable can be used to select all cases that have been updated by KEYED DATA LIST.

Example

FILE HANDLE EMPL/ file specifications.
KEYED DATA LIST FILE=EMPL KEY=#NXTCASE IN=#FOUND
          /YRHIRED 1-2 SEX 3 JOBCLASS 4.

• IN creates the logical scratch variable #FOUND. The values of #FOUND will be 1 if the record indicated by the key value in #NXTCASE is found or 0 if the record does not exist.

Related Topics

KEYED DATA LIST
Overview (KEYED DATA LIST command)
Examples (KEYED DATA LIST command)
FILE Subcommand (KEYED DATA LIST command)
KEY Subcommand (KEYED DATA LIST command)
TABLE and NOTABLE Subcommands (KEYED DATA LIST command)
ENCODING Subcommand (KEYED DATA LIST command)


TABLE and NOTABLE Subcommands (KEYED DATA LIST command)

KEYED DATA LIST (command),KEYED DATA LIST (command),KEYED DATA LIST (command)
NOTABLE subcommand,NOTABLE subcommand,NOTABLE subcommand
NOTABLE (subcommand),NOTABLE (subcommand),NOTABLE (subcommand)
KEYED DATA LIST command,KEYED DATA LIST command,KEYED DATA LIST command
KEYED DATA LIST (command),KEYED DATA LIST (command),KEYED DATA LIST (command)
TABLE subcommand,TABLE subcommand,TABLE subcommand
TABLE (subcommand),TABLE (subcommand),TABLE (subcommand)
KEYED DATA LIST command,KEYED DATA LIST command,KEYED DATA LIST command

TABLE and NOTABLE determine whether the program displays a table that summarizes the variable definitions. TABLE, the default, displays the table. NOTABLE suppresses the table.

• TABLE and NOTABLE are optional and mutually exclusive.

• The only specification for TABLE or NOTABLE is the subcommand keyword. Neither subcommand has additional specifications.

Related Topics

KEYED DATA LIST
Overview (KEYED DATA LIST command)
Examples (KEYED DATA LIST command)
FILE Subcommand (KEYED DATA LIST command)
KEY Subcommand (KEYED DATA LIST command)
IN Subcommand (KEYED DATA LIST command)
ENCODING Subcommand (KEYED DATA LIST command)


ENCODING Subcommand (KEYED DATA LIST command)

KEYED DATA LIST (command),KEYED DATA LIST (command),KEYED DATA LIST (command)
ENCODING subcommand,ENCODING subcommand,ENCODING subcommand
ENCODING (subcommand),ENCODING (subcommand),ENCODING (subcommand)
KEYED DATA LIST command,KEYED DATA LIST command,KEYED DATA LIST command

ENCODING specifies the encoding format of the file. The keyword is followed by an equals sign and a quoted encoding specification.

• In Unicode mode, the default is UTF8. For more information, see SET command, UNICODE subcommand.

• In code page mode, the default is the current locale setting. For more information, see SET command, LOCALE subcommand.

• The quoted encoding value can be: Locale (the current locale setting), UTF8, UTF16, UTF16BE (big endian), UTF16LE (little endian), a numeric Windows code page value (for example, '1252'), or an IANA code page value (for example, 'iso8859-1' or cp1252).

• In Unicode mode, the defined width of string variables is tripled for code page and UTF-16 text data files. Use ALTER TYPE to automatically adjust the defined width of string variables.

Related Topics

KEYED DATA LIST
Overview (KEYED DATA LIST command)
Examples (KEYED DATA LIST command)
FILE Subcommand (KEYED DATA LIST command)
KEY Subcommand (KEYED DATA LIST command)
IN Subcommand (KEYED DATA LIST command)
TABLE and NOTABLE Subcommands (KEYED DATA LIST command)


KM

Kaplan-Meier,Kaplan-Meier,Kaplan-Meier
command syntax,command syntax,command syntax
KM (command),KM (command),KM (command)
KM (command),KM (command),KM (command)
syntax chart,syntax chart,syntax chart

KM is available in the Advanced Statistics option.

KM varname [BY factor varname]

   /STATUS = varname [EVENT](vallist) [LOST(vallist)]

   [/STRATA = varname]

   [/PLOT = {[SURVIVAL][LOGSURV][HAZARD][OMS] }]

   [/ID  = varname]

   [/PRINT = [TABLE**][MEAN**][NONE]]

   [/PERCENTILES = [(]{25, 50, 75 }[)]]
                      {value list }

   [/TEST = [LOGRANK**][BRESLOW][TARONE]]

   [/COMPARE = [{OVERALL**}][{POOLED**}]]
                {PAIRWISE }  {STRATA  }

   [/TREND = [(METRIC)]]

   [/SAVE = tempvar[(newvar)],...]

**Default if the subcommand or keyword is omitted.

Temporary variables created by Kaplan-Meier are:

SURVIVAL

HAZARD

SE

CUMEVENT

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See KM Algorithms for computational details for this procedure.

Syntax for the KM command can be generated from the Kaplan-Meier Survival Analysis dialog.

Example

KM LENGTH BY SEXRACE
 /STATUS=EMPLOY  EVENT (1) LOST (2)
 /STRATA=LOCATION.

Related Topics

Overview (KM command)
Examples (KM command)
Survival and Factor Variables (KM command)
STATUS Subcommand (KM command)
STRATA Subcommand (KM command)
PLOT Subcommand (KM command)
ID Subcommand (KM command)
PRINT Subcommand (KM command)
PERCENTILES Subcommand (KM command)
TEST Subcommand (KM command)
COMPARE Subcommand (KM command)
TREND Subcommand (KM command)
SAVE Subcommand (KM command)


Overview (KM command)

KM (alias K-M) uses the Kaplan-Meier (product-limit) technique to describe and analyze the length of time to the occurrence of an event, often known as survival time. KM is similar to SURVIVAL in that it produces nonparametric estimates of the survival functions. However, instead of dividing the period of time under examination into arbitrary intervals, KM evaluates the survival function at the observed event times. For analysis of survival times with covariates, including time-dependent covariates, see the COXREG command.

Options Collapse Hide details

Options

KM Tables. You can include one factor variable on the KM command. A KM table is produced for each level of the factor variable. You can also suppress the KM tables in the output with the PRINT subcommand.

Survival Status. You can specify the code(s) indicating that an event has occurred as well as code(s) for cases lost to follow-up using the STATUS subcommand.

Plots. You can plot the survival functions on a linear or log scale or plot the hazard function for each combination of factor and stratum with the PLOT subcommand.

Test Statistics. When a factor variable is specified, you can specify one or more tests of equality of survival distributions for the different levels of the factor using the TEST subcommand. You can also specify a trend metric for the requested tests with the TREND subcommand.

Display ID and Percentiles. You can specify an ID variable on the ID subcommand to identify each case. You can also request the display of percentiles in the output with the PERCENTILES subcommand.

Comparisons. When a factor variable is specified, you can use the COMPARE subcommand to compare the different levels of the factor, either pairwise or across all levels, and either pooled across all strata or within a stratum.

Add New Variables to Active Dataset. You can save new variables appended to the end of the active dataset with the SAVE subcommand.

Basic Specification Collapse Hide details

Basic Specification

• The basic specification requires a survival variable and the STATUS subcommand naming a variable that indicates whether the event occurred.

• The basic specification prints one survival table followed by the mean and median survival time with standard errors and 95% confidence intervals.

Subcommand Order Collapse Hide details

Subcommand Order

• The survival variable and the factor variable (if there is one) must be specified first.

• Remaining subcommands can be specified in any order.

Syntax Rules Collapse Hide details

Syntax Rules

• Only one survival variable can be specified. To analyze multiple survival variables, use multiple KM commands.

• Only one factor variable can be specified following the BY keyword. If you have multiple factors, use the transformation language to create a single factor variable before invoking KM.

• Only one status variable can be listed on the STATUS subcommand. You must specify the value(s) indicating that the event occurred.

• Only one variable can be specified on the STRATA subcommand. If you have more than one stratum, use the transformation language to create a single variable to specify on the STRATA subcommand.

Operations Collapse Hide details

Operations

• KM deletes all cases that have negative values for the survival variable.

• KM estimates the survival function and associated statistics for each combination of factor and stratum.

• Three statistics can be computed to test the equality of survival functions across factor levels within a stratum or across all factor levels while controlling for strata. The statistics are the log rank (Mantel-Cox), generalized Wilcoxon (Breslow), and Tarone-Ware tests.

• When the PLOTS subcommand is specified, KM produces one plot of survival functions for each stratum, with all factor levels represented by different symbols or colors.

Limitations Collapse Hide details

Limitations

• A maximum of 500 factor levels (symbols) can appear in a plot.

Related Topics

KM
Examples (KM command)
Survival and Factor Variables (KM command)
STATUS Subcommand (KM command)
STRATA Subcommand (KM command)
PLOT Subcommand (KM command)
ID Subcommand (KM command)
PRINT Subcommand (KM command)
PERCENTILES Subcommand (KM command)
TEST Subcommand (KM command)
COMPARE Subcommand (KM command)
TREND Subcommand (KM command)
SAVE Subcommand (KM command)


Examples (KM command)

KM LENGTH BY SEXRACE
 /STATUS=EMPLOY EVENT (1) LOST (2)
 /STRATA=LOCATION.

• Survival analysis is used to examine the length of unemployment. The survival variable LENGTH contains the number of months a subject is unemployed. The factor variable SEXRACE combines sex and race factors.

• A value of 1 on the variable EMPLOY indicates the occurrence of the event (employment). All other observed cases are censored. A value of 2 on EMPLOY indicates cases lost to follow-up. Cases with other values for EMPLOY are known to have remained unemployed during the course of the study. KM separates the two types of censored cases in the KM table if LOST is specified.

• For each combination of SEXRACE and LOCATION, one KM table is produced, followed by the mean and median survival times with standard errors and confidence intervals.

Using Kaplan-Meier to Test Competing Pain Relief Treatments

KM
  time  BY treatment  /STATUS=status(1)
  /PRINT TABLE MEAN
  /PERCENTILES
  /PLOT SURVIVAL
  /TEST LOGRANK BRESLOW TARONE
  /COMPARE OVERALL POOLED .

• Survival analysis is used to examine the time until the drug takes effect. The survival variable time is the time until effect. The factor variable treatment marks whether the experimental drug or the existing drug was administered.

• A value of 1 on the variable status indicates the occurrence of the event (drug takes effect). All other observed cases are censored.

• The PRINT subcommand produces a KM table for each value of treatment, followed by the mean and median survival times with standard errors and confidence intervals.

• The PERCENTILES subcommand, specified without keywords, requests the quartiles of the survival times for each value of treatment.

• The PLOT subcommand requests the cumulative survival distribution for each value of treatment.

• The TEST subcommand requests that the log rank, Breslow, and Tarone-Ware statistics be used to test the equality of the survival curves defined by the values of treatment. Per the COMPARE subcommand, all factor levels are compared in a single test.

For discussion of output from this syntax and to place the example in context, see Using Kaplan-Meier Survival Analysis to Test Competing Pain Relief Treatments.

Related Topics

KM
Overview (KM command)
Survival and Factor Variables (KM command)
STATUS Subcommand (KM command)
STRATA Subcommand (KM command)
PLOT Subcommand (KM command)
ID Subcommand (KM command)
PRINT Subcommand (KM command)
PERCENTILES Subcommand (KM command)
TEST Subcommand (KM command)
COMPARE Subcommand (KM command)
TREND Subcommand (KM command)
SAVE Subcommand (KM command)


Survival and Factor Variables (KM command)

KM (command),KM (command),KM (command)
survival time variable,survival time variable,survival time variable

You must identify the survival and factor variables for the analysis.

• The minimum specification is one, and only one, survival variable.

KM (command),KM (command),KM (command)
factor variable,factor variable,factor variable

• Only one factor variable can be specified using the BY keyword. If you have more than one factor, create a new variable combining all factors. There is no limit to the factor levels.

Example

DO IF SEX = 1.
+ COMPUTE SEXRACE = RACE.
ELSE.
+ COMPUTE SEXRACE = RACE + SEX.
END IF.
KM LENGTH BY SEXRACE
 /STATUS=EMPLOY EVENT (1) LOST (2).

• The two control variables, SEX and RACE, each with two values, 1 and 2, are combined into one factor variable, SEXRACE, with four values, 1 to 4.

• KM specifies LENGTH as the survival variable and SEXRACE as the factor variable.

• One KM table is produced for each factor level.

Related Topics

KM
Overview (KM command)
Examples (KM command)
STATUS Subcommand (KM command)
STRATA Subcommand (KM command)
PLOT Subcommand (KM command)
ID Subcommand (KM command)
PRINT Subcommand (KM command)
PERCENTILES Subcommand (KM command)
TEST Subcommand (KM command)
COMPARE Subcommand (KM command)
TREND Subcommand (KM command)
SAVE Subcommand (KM command)


STATUS Subcommand (KM command)

KM (command),KM (command),KM (command)
status variable,status variable,status variable
KM (command),KM (command),KM (command)
STATUS subcommand,STATUS subcommand,STATUS subcommand
STATUS (subcommand),STATUS (subcommand),STATUS (subcommand)
KM command,KM command,KM command

To determine whether the terminal event has occurred for a particular observation, KM checks the value of a status variable. STATUS lists the status variable and the code(s) for the occurrence of the event. The code(s) for cases lost to follow-up can also be specified.

• Only one status variable can be specified. If multiple STATUS subcommands are specified, KM uses the last specification and displays a warning.

KM (command),KM (command),KM (command)
defining event,defining event,defining event

• The keyword EVENT is optional, but the value list in parentheses must be specified. Use EVENT for clarity’s sake, especially when LOST is specified.

KM (command),KM (command),KM (command)
censored cases,censored cases,censored cases
censored cases,censored cases,censored cases
KM command,KM command,KM command

• The value list must be enclosed in parentheses. All cases with non-negative times that do not have a code within the range specified after EVENT are classified as censored cases—that is, cases for which the event has not yet occurred.

• The keyword LOST and the following value list are optional. LOST cannot be omitted if the value list for lost cases is specified.

• When LOST is specified, all cases with non-negative times that have a code within the specified value range are classified as lost to follow-up. Cases lost to follow-up are treated as censored in the analysis, and the statistics do not change, but the two types of censored cases are listed separately in the KM table.

• The value lists on EVENT or LOST can be one value, a list of values separated by blanks or commas, a range of values using the keyword THRU, or a combination.

• The status variable can be either numeric or string. If a string variable is specified, the EVENT or LOST values must be enclosed in apostrophes, and the keyword THRU cannot be used.

Example

KM LENGTH BY SEXRACE
 /STATUS=EMPLOY  EVENT (1) LOST (3,5 THRU 8).

• STATUS specifies that EMPLOY is the status variable.

• A value of 1 for EMPLOY means that the event (employment) occurred for the case.

• Values of 3 and 5 through 8 for EMPLOY mean that contact was lost with the case. The different values code different causes for the loss of contact.

• The summary table in the output includes columns for number lost and percentage lost, as well as for number censored and percentage censored.

Related Topics

KM
Overview (KM command)
Examples (KM command)
Survival and Factor Variables (KM command)
STRATA Subcommand (KM command)
PLOT Subcommand (KM command)
ID Subcommand (KM command)
PRINT Subcommand (KM command)
PERCENTILES Subcommand (KM command)
TEST Subcommand (KM command)
COMPARE Subcommand (KM command)
TREND Subcommand (KM command)
SAVE Subcommand (KM command)


STRATA Subcommand (KM command)

KM (command),KM (command),KM (command)
strata variable,strata variable,strata variable
stratification variable,stratification variable,stratification variable
KM command,KM command,KM command
KM (command),KM (command),KM (command)
STRATA subcommand,STRATA subcommand,STRATA subcommand
STRATA (subcommand),STRATA (subcommand),STRATA (subcommand)
KM command,KM command,KM command

STRATA identifies a stratification variable—that is, a variable whose values are used to form subgroups (strata) within the categories of the factor variable. Analysis is done within each level of the strata variable for each factor level, and estimates are pooled over strata for an overall comparison of factor levels.

• The minimum specification is the subcommand keyword with one, and only one, variable name.

• If you have more than one strata variable, create a new variable to combine the levels on separate variables before invoking the KM command.

• There is no limit to the number of levels for the strata variable.

Example

KM LENGTH BY SEXRACE
 /STATUS=EMPLOY EVENT (1) LOST (3,5 THRU 8)
 /STRATA=LOCATION.

• STRATA specifies LOCATION as the stratification variable. Analysis of the length of unemployment is done for each location within each sex and race subgroup.

Related Topics

KM
Overview (KM command)
Examples (KM command)
Survival and Factor Variables (KM command)
STATUS Subcommand (KM command)
PLOT Subcommand (KM command)
ID Subcommand (KM command)
PRINT Subcommand (KM command)
PERCENTILES Subcommand (KM command)
TEST Subcommand (KM command)
COMPARE Subcommand (KM command)
TREND Subcommand (KM command)
SAVE Subcommand (KM command)


PLOT Subcommand (KM command)

KM (command),KM (command),KM (command)
plots,plots,plots
KM (command),KM (command),KM (command)
PLOT subcommand,PLOT subcommand,PLOT subcommand
PLOT (subcommand),PLOT (subcommand),PLOT (subcommand)
SURVIVAL command,SURVIVAL command,SURVIVAL command

PLOT plots the cumulative survival distribution on a linear or logarithmic scale or plots the cumulative hazard function. A separate plot with all factor levels is produced for each stratum. Each factor level is represented by a different symbol or color. Censored cases are indicated by markers.

• When PLOT is omitted, no plots are produced. The default is NONE.

• When PLOT is specified without a keyword, the default is SURVIVAL. A plot of survival functions for each stratum is produced.

• To request specific plots, specify, following the PLOT subcommand, any combination of the keywords defined below.

• Multiple keywords can be used on the PLOT subcommand, each requesting a different plot. The effect is cumulative.

survival plots,survival plots,survival plots
KM command,KM command,KM command
SURVIVAL (keyword),SURVIVAL (keyword),SURVIVAL (keyword)
KM command,KM command,KM command
LOGSURV (keyword),LOGSURV (keyword),LOGSURV (keyword)
KM command,KM command,KM command
hazard plots,hazard plots,hazard plots
KM command,KM command,KM command
HAZARD (keyword),HAZARD (keyword),HAZARD (keyword)
KM command,KM command,KM command
OMS (keyword),OMS (keyword),OMS (keyword)
KM command,KM command,KM command
one-minus-survival plots,one-minus-survival plots,one-minus-survival plots
KM command,KM command,KM command
SURVIVAL | Plot the cumulative survival distribution on a linear scale. SURVIVAL is the default when PLOT is specified without a keyword.
LOGSURV | Plot the cumulative survival distribution on a logarithmic scale.
HAZARD | Plot the cumulative hazard function.
OMS | Plot the one-minus-survival function.

Example

KM LENGTH BY SEXRACE
 /STATUS=EMPLOY EVENT (1) LOST (3,5 THRU 8)
 /STRATA=LOCATION
 /PLOT = SURVIVAL HAZARD.

• PLOT produces one plot of the cumulative survival distribution on a linear scale and one plot of the cumulative hazard rate for each value of LOCATION.

Related Topics

KM
Overview (KM command)
Examples (KM command)
Survival and Factor Variables (KM command)
STATUS Subcommand (KM command)
STRATA Subcommand (KM command)
ID Subcommand (KM command)
PRINT Subcommand (KM command)
PERCENTILES Subcommand (KM command)
TEST Subcommand (KM command)
COMPARE Subcommand (KM command)
TREND Subcommand (KM command)
SAVE Subcommand (KM command)


ID Subcommand (KM command)

KM command,KM command,KM command
case-identification variable,case-identification variable,case-identification variable
KM command,KM command,KM command
labeling cases,labeling cases,labeling cases
ID (subcommand),ID (subcommand),ID (subcommand)
KM command,KM command,KM command
KM (command),KM (command),KM (command)
ID subcommand,ID subcommand,ID subcommand

ID specifies a variable used for labeling cases. If the ID variable is a string, KM uses the string values as case identifiers in the KM table. If the ID variable is numeric, KM uses value labels or numeric values if value labels are not defined.

• ID is the first column of the KM table displayed for each combination of factor and stratum.

• If a string value or a value label exceeds 20 bytes in width, KM truncates the case identifier and displays a warning.

Related Topics

KM
Overview (KM command)
Examples (KM command)
Survival and Factor Variables (KM command)
STATUS Subcommand (KM command)
STRATA Subcommand (KM command)
PLOT Subcommand (KM command)
PRINT Subcommand (KM command)
PERCENTILES Subcommand (KM command)
TEST Subcommand (KM command)
COMPARE Subcommand (KM command)
TREND Subcommand (KM command)
SAVE Subcommand (KM command)


PRINT Subcommand (KM command)

PRINT (subcommand),PRINT (subcommand),PRINT (subcommand)
KM command,KM command,KM command
KM (command),KM (command),KM (command)
PRINT subcommand,PRINT subcommand,PRINT subcommand

By default, KM prints survival tables and the mean and median survival time with standard errors and confidence intervals if PRINT is omitted. If PRINT is specified, only the specified keyword is in effect. Use PRINT to suppress tables or the mean statistics.

KM (command),KM (command),KM (command)
survival tables,survival tables,survival tables
survival tables,survival tables,survival tables
KM command,KM command,KM command
TABLE (keyword),TABLE (keyword),TABLE (keyword)
KM command,KM command,KM command
KM (command),KM (command),KM (command)
mean survival time,mean survival time,mean survival time
KM (command),KM (command),KM (command)
median survival time,median survival time,median survival time
MEAN (keyword),MEAN (keyword),MEAN (keyword)
KM command,KM command,KM command
TABLE | Print the KM tables. If PRINT is not specified, TABLE, together with MEAN, is the default. Specify TABLE on PRINT to suppress the mean statistics.
MEAN | Print the mean statistics. KM prints the mean and median survival time with standard errors and confidence intervals. If PRINT is not specified, MEAN, together with TABLE, is the default. Specify MEAN on PRINT to suppress the KM tables.
NONE | Suppress both the KM tables and the mean statistics. Only plots and comparisons are printed.

Example

KM LENGTH BY SEXRACE
 /STATUS=EMPLOY EVENT (1) LOST (3,5 THRU 8)
 /STRATA=LOCATION
 /PLOT=SURVIVAL HAZARD
 /PRINT=NONE.

• PRINT=NONE suppresses both the KM tables and the mean statistics.

Related Topics

KM
Overview (KM command)
Examples (KM command)
Survival and Factor Variables (KM command)
STATUS Subcommand (KM command)
STRATA Subcommand (KM command)
PLOT Subcommand (KM command)
ID Subcommand (KM command)
PERCENTILES Subcommand (KM command)
TEST Subcommand (KM command)
COMPARE Subcommand (KM command)
TREND Subcommand (KM command)
SAVE Subcommand (KM command)


PERCENTILES Subcommand (KM command)

percentiles,percentiles,percentiles
KM command,KM command,KM command
quartiles,quartiles,quartiles
KM command,KM command,KM command
KM (command),KM (command),KM (command)
percentiles,percentiles,percentiles
KM (command),KM (command),KM (command)
quartiles,quartiles,quartiles
KM (command),KM (command),KM (command)
PERCENTILES subcommand,PERCENTILES subcommand,PERCENTILES subcommand
PERCENTILES (subcommand),PERCENTILES (subcommand),PERCENTILES (subcommand)
KM command,KM command,KM command

PERCENTILES displays percentiles for each combination of factor and stratum. Percentiles are not displayed without the PERCENTILES subcommand. If the subcommand is specified without a value list, the default is 25, 50, and 75 for quartile display. You can specify any values between 0 and 100.

Related Topics

KM
Overview (KM command)
Examples (KM command)
Survival and Factor Variables (KM command)
STATUS Subcommand (KM command)
STRATA Subcommand (KM command)
PLOT Subcommand (KM command)
ID Subcommand (KM command)
PRINT Subcommand (KM command)
TEST Subcommand (KM command)
COMPARE Subcommand (KM command)
TREND Subcommand (KM command)
SAVE Subcommand (KM command)


TEST Subcommand (KM command)

KM (command),KM (command),KM (command)
TEST subcommand,TEST subcommand,TEST subcommand
TEST (subcommand),TEST (subcommand),TEST (subcommand)
KM command,KM command,KM command

TEST specifies the test statistic to use for testing the equality of survival distributions for the different levels of the factor.

• TEST is valid only when a factor variable is specified. If no factor variable is specified, KM issues a warning and TEST is not executed.

• If TEST is specified without a keyword, the default is LOGRANK. If a keyword is specified on TEST, only the specified test is performed.

• Each of the test statistics has a chi-square distribution with one degree of freedom.

log rank test,log rank test,log rank test
KM command,KM command,KM command
LOGRANK (keyword),LOGRANK (keyword),LOGRANK (keyword)
KM command,KM command,KM command
Breslow test,Breslow test,Breslow test
KM command,KM command,KM command
BRESLOW (keyword),BRESLOW (keyword),BRESLOW (keyword)
KM command,KM command,KM command
Tarone-Ware test,Tarone-Ware test,Tarone-Ware test
KM command,KM command,KM command
TARONE (keyword),TARONE (keyword),TARONE (keyword)
KM command,KM command,KM command
LOGRANK | Perform the log rank (Mantel-Cox) test.
BRESLOW | Perform the Breslow (generalized Wilcoxon) test.
TARONE | Perform the Tarone-Ware test.

Related Topics

KM
Overview (KM command)
Examples (KM command)
Survival and Factor Variables (KM command)
STATUS Subcommand (KM command)
STRATA Subcommand (KM command)
PLOT Subcommand (KM command)
ID Subcommand (KM command)
PRINT Subcommand (KM command)
PERCENTILES Subcommand (KM command)
COMPARE Subcommand (KM command)
TREND Subcommand (KM command)
SAVE Subcommand (KM command)


COMPARE Subcommand (KM command)

KM command,KM command,KM command
comparing factor levels,comparing factor levels,comparing factor levels
KM (command),KM (command),KM (command)
COMPARE subcommand,COMPARE subcommand,COMPARE subcommand
COMPARE (subcommand),COMPARE (subcommand),COMPARE (subcommand)
KM command,KM command,KM command

COMPARE compares the survival distributions for the different levels of the factor. Each of the keywords specifies a different method of comparison.

• COMPARE is valid only when a factor variable is specified. If no factor variable is specified, KM issues a warning and COMPARE is not executed.

• COMPARE uses whatever tests are specified on the TEST subcommand. If no TEST subcommand is specified, the log rank test is used.

• If COMPARE is not specified, the default is OVERALL and POOLED. All factor levels are compared across strata in a single test. The test statistics are displayed after the summary table at the end of output.

• Multiple COMPARE subcommands can be specified to request different comparisons.

OVERALL (keyword),OVERALL (keyword),OVERALL (keyword)
KM command,KM command,KM command
PAIRWISE (keyword),PAIRWISE (keyword),PAIRWISE (keyword)
KM command,KM command,KM command
POOLED (keyword),POOLED (keyword),POOLED (keyword)
KM command,KM command,KM command
STRATA (keyword),STRATA (keyword),STRATA (keyword)
KM command,KM command,KM command
OVERALL | Compare all factor levels in a single test. OVERALL, together with POOLED, is the default when COMPARE is not specified.
PAIRWISE | Compare each pair of factor levels. KM compares all distinct pairs of factor levels.
POOLED | Pool the test statistics across all strata. The test statistics are displayed after the summary table for all strata. POOLED, together with OVERALL, is the default when COMPARE is not specified.
STRATA | Compare the factor levels for each stratum. The test statistics are displayed for each stratum separately.

• If a factor variable has different levels across strata, you cannot request a pooled comparison. If you specify POOLED on COMPARE, KM displays a warning and ignores the request.

Example

KM LENGTH BY SEXRACE
 /STATUS=EMPLOY EVENT (1) LOST (3,5 THRU 8)
 /STRATA=LOCATION
 /TEST = BRESLOW
 /COMPARE = PAIRWISE.

• TEST specifies the Breslow test.

• COMPARE uses the Breslow test statistic to compare all distinct pairs of SEXRACE values and pools the test results over all strata defined by LOCATION.

• Test statistics are displayed at the end of output for all strata.

Related Topics

KM
Overview (KM command)
Examples (KM command)
Survival and Factor Variables (KM command)
STATUS Subcommand (KM command)
STRATA Subcommand (KM command)
PLOT Subcommand (KM command)
ID Subcommand (KM command)
PRINT Subcommand (KM command)
PERCENTILES Subcommand (KM command)
TEST Subcommand (KM command)
TREND Subcommand (KM command)
SAVE Subcommand (KM command)


TREND Subcommand (KM command)

KM (command),KM (command),KM (command)
trends for factor levels,trends for factor levels,trends for factor levels
KM (command),KM (command),KM (command)
TREND subcommand,TREND subcommand,TREND subcommand
TREND (subcommand),TREND (subcommand),TREND (subcommand)
KM command,KM command,KM command

TREND specifies that there is a trend across factor levels. This information is used when computing the tests for equality of survival functions specified on the TEST subcommand.

• The minimum specification is the subcommand keyword by itself. The default metric is chosen as follows:

If g is even,

(–(g–1), ..., –3, –1, 1, 3, ..., (g–1))

otherwise,

(−g−12,...,−1,0,1,...,g−12)

where g is the number of levels for the factor variable.

• If TREND is specified but COMPARE is not, KM performs the default log rank test with the trend metric for an OVERALL POOLED comparison.

• If the metric specified on TREND is longer than required by the factor levels, KM displays a warning and ignores extra values.

Example

KM LENGTH BY SEXRACE
 /STATUS=EMPLOY EVENT (1) LOST (3,5 THRU 8)
 /STRATA=LOCATION
 /TREND.

• TREND is specified by itself. KM uses the default metric. Since SEXRACE has four levels, the default is (–3, –1, 1, 3).

• Even though no TEST or COMPARE subcommand is specified, KM performs the default log rank test with the trend metric and does a default OVERALL POOLED comparison.

Related Topics

KM
Overview (KM command)
Examples (KM command)
Survival and Factor Variables (KM command)
STATUS Subcommand (KM command)
STRATA Subcommand (KM command)
PLOT Subcommand (KM command)
ID Subcommand (KM command)
PRINT Subcommand (KM command)
PERCENTILES Subcommand (KM command)
TEST Subcommand (KM command)
COMPARE Subcommand (KM command)
SAVE Subcommand (KM command)


SAVE Subcommand (KM command)

KM (command),KM (command),KM (command)
saving new variables,saving new variables,saving new variables
KM (command),KM (command),KM (command)
SAVE subcommand,SAVE subcommand,SAVE subcommand
SAVE (subcommand),SAVE (subcommand),SAVE (subcommand)
KM command,KM command,KM command

SAVE saves the temporary variables created by KM. The following temporary variables can be saved:

SURVIVAL (keyword),SURVIVAL (keyword),SURVIVAL (keyword)
KM command,KM command,KM command
SE (keyword),SE (keyword),SE (keyword)
KM command,KM command,KM command
HAZARD (keyword),HAZARD (keyword),HAZARD (keyword)
KM command,KM command,KM command
CUMEVENT (keyword),CUMEVENT (keyword),CUMEVENT (keyword)
KM command,KM command,KM command
SURVIVAL | Survival function evaluated at current case.
SE | Standard error of the survival function.
HAZARD | Cumulative hazard function evaluated at current case.
CUMEVENT | Cumulative number of events.

• To specify variable names for the new variables, assign the new names in parentheses following each temporary variable name.

• Assigned variable names must be unique in the active dataset. Scratch or system variable names cannot be used (that is, variable names cannot begin with # or $).

• If new variable names are not specified, KM generates default names. The default name is composed of the first three characters of the name of the temporary variable (two for SE), followed by an underscore and a number to make it unique.

• A temporary variable can be saved only once on the same SAVE subcommand.

Example

KM LENGTH BY SEXRACE
 /STATUS=EMPLOY EVENT (1) LOST (3,5 THRU 8)
 /STRATA=LOCATION
 /SAVE SURVIVAL HAZARD.

• KM saves cumulative survival and cumulative hazard rates in two new variables, SUR_1 and HAZ_1, provided that neither name exists in the active dataset. If one does, the numeric suffixes will be incremented to make a distinction.

Related Topics

KM
Overview (KM command)
Examples (KM command)
Survival and Factor Variables (KM command)
STATUS Subcommand (KM command)
STRATA Subcommand (KM command)
PLOT Subcommand (KM command)
ID Subcommand (KM command)
PRINT Subcommand (KM command)
PERCENTILES Subcommand (KM command)
TEST Subcommand (KM command)
COMPARE Subcommand (KM command)
TREND Subcommand (KM command)


KNN

KNN (command),KNN (command),KNN (command)
KNN (command),KNN (command),KNN (command)
syntax chart,syntax chart,syntax chart

KNN is available in the Statistics Base option.

KNN [dependent variable [(MLEVEL = {S})]]
                                   {O}
                                   {N}
    [BY factor-list] [WITH covariate-list]

[/EXCEPT VARIABLES = varlist]

[/CASELABELS VARIABLE = varname]

[/FOCALCASES VARIABLE = varname]

[/RESCALE [COVARIATE = {ADJNORMALIZED**}]]
                       {NONE           }

[/PARTITION {TRAINING = {70**   } HOLDOUT = {30**   }}]
                        {integer}           {integer}
            {VARIABLE = varname                      }

[/MODEL [METRIC = {EUCLID** }]
                  {CITYBLOCK}

        [NEIGHBORS = {FIXED**} [(K={3**    })                   ]]
                                   {integer}
                     {AUTO   } [(KMIN={3      }, KMAX={5      })]
                                      {integer}       {integer}

        [FEATURES = {ALL**}                                    ]
                    {AUTO } [(FORCE = variable [variable ...])]

[/CRITERIA  [NUMFEATURES = {AUTO**                       }]
                           {FIXED(integer)               }
                           {ERRORRATIO(MINCHANGE={0.01 })}
                                                 {value}

        [PREDICTED = {MEAN**}]
                     {MEDIAN}

        [WEIGHTFEATURES = {NO**}]
                          {YES }

[/CROSSVALIDATION {FOLDS = {10**   } }]
                           {integer}
                  {VARIABLE = varname}

[/MISSING USERMISSING = {EXCLUDE**}]
                        {INCLUDE  }

[/VIEWMODEL [DISPLAY = {YES**}]]
                       {NO   }

[/PRINT [CPS**] [NONE]]

[/SAVE [PREDVAL[(varname)]]     ]
       [PREDPROB[(rootname)]]
       [PARTITION[(varname)]]
       [FOLD[(varname)]]
       [MAXCAT({25**   })]
               {integer}

[/OUTFILE [MODEL ='filename']                 ]
          [FOCALCASES = 'savfile' | 'dataset'].

** Default if the subcommand or keyword is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See KNN Algorithms for computational details for this procedure.

Syntax for the KNN command can be generated from the Nearest Neighbor Analysis dialog.

Release History Collapse Hide details

Release History

Release 17.0

• Command introduced.

Example

KNN DepVar BY A B C WITH X Y Z.

Related Topics

Overview (KNN command)
Examples (KNN command)
Variable Lists (KNN command)
EXCEPT Subcommand (KNN command)
CASELABELS Subcommand (KNN command)
FOCALCASES Subcommand (KNN command)
RESCALE Subcommand (KNN command)
PARTITION Subcommand (KNN command)
MODEL Subcommand (KNN command)
CRITERIA Subcommand (KNN command)
CROSSVALIDATION Subcommand (KNN command)
MISSING Subcommand (KNN command)
VIEWMODEL Subcommand (KNN command)
PRINT Subcommand (KNN command)
SAVE Subcommand (KNN command)
OUTFILE Subcommand (KNN command)


Overview (KNN command)

Nearest Neighbor Analysis is a method for classifying cases based on their similarity to other cases. In machine learning, it was developed as a way to recognize patterns of data without requiring an exact match to any stored patterns, or cases. Similar cases are near each other and dissimilar cases are distant from each other. Thus, the distance between two cases is a measure of their dissimilarity.

Cases that are near each other are said to be “neighbors.” When a new case (holdout) is presented, its distance from each of the cases in the model is computed. The classifications of the most similar cases – the nearest neighbors – are tallied and the new case is placed into the category that contains the greatest number of nearest neighbors.

You can specify the number of nearest neighbors to examine; this value is called k. The pictures show how a new case would be classified using two different values of k. When k = 5, the new case is placed in category 1 because a majority of the nearest neighbors belong to category 1. However, when k = 9, the new case is placed in category 0 because a majority of the nearest neighbors belong to category 0.

The effects of changing k on classification

Nearest neighbor analysis can also be used to compute values for a continuous target. In this situation, the average or median target value of the nearest neighbors is used to obtain the predicted value for the new case.

Options Collapse Hide details

Options

Prediction or classification. The dependent variable may be scale, categorical, or a combination. If a dependent variable has scale measurement level, then the model predicts continuous values that approximate the “true” value of some continuous function of the input data. If a dependent variable is categorical, then the model is used to classify cases into the “best” category based on the input predictors.

Rescaling. KNN optionally rescales covariates; that is, predictors with scale measurement level, before training the model. Adjusted normalization is the rescaling method.

Training and holdout partitions. KNN optionally divides the data set into training and holdout partitions. The model is trained using the training partition. The holdout partition is completely excluded from the training process and is used for independent assessment of the final model.

Missing Values. The KNN procedure has an option for treating user-missing values of categorical variables as valid. User-missing values of scale variables are always treated as invalid. The procedure uses listwise deletion; that is, cases with invalid values for any variable are excluded from the model.

Output.KNN displays a case processing summary as pivot table output, and an interactive model view of other output. Tables in the model view include k nearest neighbors and distances for focal cases, classification of categorical response variables, and an error summary. Graphical output in the model view includes an automatic selection error log, feature importance chart, feature space chart, peers chart, and quadrant map. The procedure also optionally saves predicted values in the active dataset, PMML to an external file, and distances to focal cases to a new dataset or external file.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is the KNN command followed by zero or one dependent variable, the BY keyword and one or more factors, and the WITH keyword and one or more covariates.

By default, the KNN procedure normalizes covariates and selects a training sample before training the model. The model uses Euclidean distance to select the three nearest neighbors. User-missing values are excluded and default output is displayed.

If there are zero response variables, then the procedure finds the k nearest neighbors only – no classification or prediction is done.

Syntax Rules Collapse Hide details

Syntax Rules

• All subcommands are optional.

• Subcommands may be specified in any order.

• Only a single instance of each subcommand is allowed.

• An error occurs if a keyword is specified more than once within a subcommand.

• Parentheses, equals signs, and slashes shown in the syntax chart are required.

• The command name, subcommand names, and keywords must be spelled in full.

• Empty subcommands are not allowed.

• Any split variable defined on the SPLIT FILE command may not be used as a dependent variable, factor, covariate, or partition variable.

Limitations Collapse Hide details

Limitations

Frequency weights specified on the WEIGHT command are ignored with a warning by the KNN procedure.

Categorical Variables Collapse Hide details

Categorical Variables

Although the KNN procedure accepts categorical variables as predictors or dependent variables, the user should be cautious when using a categorical variable with a very large number of categories.

The KNN procedure temporarily recodes categorical predictors using one-of-c coding for the duration of the procedure. If there are c categories of a variable, then the variable is stored as c vectors, with the first category denoted (1,0,...,0), the next category (0,1,0,...,0), ..., and the final category (0,0,...,0,1).

This coding scheme increases the dimensionality of the feature space. In particular, the total number of dimensions is the number of scale predictors plus the number of categories across all categorical predictors. As a result, this coding scheme can lead to slower training. If your nearest neighbors training is proceeding very slowly, you might try reducing the number of categories in your categorical predictors by combining similar categories or dropping cases that have extremely rare categories before running the KNN procedure.

All one-of-c coding is based on the training data, even if a holdout sample is defined (see PARTITION Subcommand (KNN command)). Thus, if the holdout sample contains cases with predictor categories that are not present in the training data, then those cases are not scored. If the holdout sample contains cases with dependent variable categories that are not present in the training data, then those cases are scored.

Replicating Results Collapse Hide details

Replicating Results

The KNN procedure uses random number generation during random assignment of partitions and cross-validation folds. To reproduce the same randomized results in the future, use the SET command to set the initialization value for the random number generator before each run of the KNN procedure, or use variables to define partitions and cross-validation folds.

Related Topics

KNN
Examples (KNN command)
Variable Lists (KNN command)
EXCEPT Subcommand (KNN command)
CASELABELS Subcommand (KNN command)
FOCALCASES Subcommand (KNN command)
RESCALE Subcommand (KNN command)
PARTITION Subcommand (KNN command)
MODEL Subcommand (KNN command)
CRITERIA Subcommand (KNN command)
CROSSVALIDATION Subcommand (KNN command)
MISSING Subcommand (KNN command)
VIEWMODEL Subcommand (KNN command)
PRINT Subcommand (KNN command)
SAVE Subcommand (KNN command)
OUTFILE Subcommand (KNN command)


Examples (KNN command)

Basic specification with default settings

KNN DepVar BY A B C WITH X Y Z.

• The KNN procedure treats DepVar as the dependent variable. Predictors A, B, and C are factors, and X, Y, and Z are covariates.

• By default, covariates are normalized before training. Also, the active dataset is partitioned into training and holdout data samples, with 70% going to the training data and 30% to the holdout data sample.

• The model uses Euclidean distance to select the three nearest neighbors.

• User-missing values are excluded and default output is displayed.

No Target

*Nearest Neighbor Analysis.
KNN WITH price engine_s horsepow wheelbas width length curb_wgt fuel_cap mpg
  /FOCALCASES VARIABLE=focal
  /CASELABELS VARIABLE=model
  /RESCALE COVARIATE=ADJNORMALIZED
  /MODEL NEIGHBORS=FIXED(K=3) METRIC=EUCLID FEATURES=ALL
  /CRITERIA WEIGHTFEATURES=NO
  /PARTITION  VARIABLE=partition
  /PRINT CPS
  /VIEWMODEL DISPLAY=YES
  /MISSING USERMISSING=EXCLUDE.

• Since there is no dependent variable, the procedure finds the k nearest neighbors only – no classification or prediction is done. Predictors price through mpg are covariates.

• The FOCALCASES subcommand specifies focal as a focal case identifier. Cases with a positive value of focal are treated as focal cases.

• The CASELABELS subcommand specifies model as a case labeling variable. These values are used to label cases in the output.

• The PARTITION subcommand specifies that the variable partition should be used to assign each case in the active dataset to the training or holdout sample. Cases with a positive value on the variable are assigned to the training sample and cases with a non-positive value to the holdout sample.

• All other options are set to their default values.

For discussion of output from this syntax and to place the example in context, see Examining the Feature Space of Predictors.

Automatic k Selection, Nominal Target

*Nearest Neighbor Analysis.
PRESERVE.
SET RNG=MT MTINDEX=20040509.
SHOW RNG.
KNN type (MLEVEL=O) WITH price engine_s horsepow wheelbas width length curb_wgt fuel_cap mpg
  /FOCALCASES VARIABLE=focal
  /CASELABELS VARIABLE=model
  /RESCALE COVARIATE=ADJNORMALIZED
  /MODEL NEIGHBORS=AUTO(KMIN=3, KMAX=9) METRIC=EUCLID FEATURES=ALL
  /CRITERIA WEIGHTFEATURES=YES
  /PARTITION  VARIABLE=partition
  /CROSSVALIDATION FOLDS=10
  /PRINT CPS
  /VIEWMODEL DISPLAY=YES
  /MISSING USERMISSING=EXCLUDE.
RESTORE.

• The PRESERVE and RESTORE commands ensure that the "current state" of the random number generator is retained and then restored after KNN is run.

• For this run of KNN, the random number generator is set to the Mersenne Twister with seed 20040509.

• The ordinal variable type is specified as a dependent variable with covariates price through mpg as predictors.

• The FOCALCASES, CASELABELS, and PARTITION subcommands are unchanged from the previous run.

• The MODEL subcommand specifies that the procedure should automatically select the "best" number of nearest neighbors (k) in the range 3 to 9, inclusive. Since feature selection is not requested, k selection is performed using cross-validation.

• The CRITERIA subcommand specifies that features should be weighted by importance when computing distances.

• The CROSSVALIDATION subcommand specifies that the procedure should subdivide the cases into 10 cross-validation folds for performing k selection.

• All other options are set to their default values.

For discussion of output from this syntax and to place the example in context, see Checking Vehicle Type.

Automatic k and Feature Selection, Scale Target

*Nearest Neighbor Analysis.
KNN sales (MLEVEL=S) WITH price engine_s horsepow wheelbas width length curb_wgt fuel_cap mpg
  /FOCALCASES VARIABLE=focal
  /CASELABELS VARIABLE=model
  /RESCALE COVARIATE=ADJNORMALIZED
  /MODEL NEIGHBORS=AUTO(KMIN=3, KMAX=9) METRIC=EUCLID FEATURES=AUTO
  /CRITERIA PREDICTED=MEAN WEIGHTFEATURES=YES NUMFEATURES=FIXED(5)
  /PARTITION  VARIABLE=partition
  /SAVE PREDVAL
  /PRINT CPS
  /VIEWMODEL DISPLAY=YES
  /MISSING USERMISSING=EXCLUDE.

• The scale variable sales is specified as a dependent variable with covariates price through mpg as predictors.

• The FOCALCASES, CASELABELS, and PARTITION subcommands are unchanged from the previous run.

• The MODEL subcommand specifies that the procedure should automatically select the "best" number of nearest neighbors (k) in the range 3 to 9, inclusive. Feature selection is also requested.

• The CRITERIA subcommand specifies that the final nearest neighbor model should have the 5 "best" features.

• The SAVE subcommand requests that the predicted value for sales be saved to the active dataset.

• All other options are set to their default values.

For discussion of output from this syntax and to place the example in context, see Predicting Sales.

Related Topics

KNN
Overview (KNN command)
Variable Lists (KNN command)
EXCEPT Subcommand (KNN command)
CASELABELS Subcommand (KNN command)
FOCALCASES Subcommand (KNN command)
RESCALE Subcommand (KNN command)
PARTITION Subcommand (KNN command)
MODEL Subcommand (KNN command)
CRITERIA Subcommand (KNN command)
CROSSVALIDATION Subcommand (KNN command)
MISSING Subcommand (KNN command)
VIEWMODEL Subcommand (KNN command)
PRINT Subcommand (KNN command)
SAVE Subcommand (KNN command)
OUTFILE Subcommand (KNN command)


Variable Lists (KNN command)

KNN (command),KNN (command),KNN (command)
variable lists,variable lists,variable lists

The command line variable lists specify the dependent variable, any categorical predictors (also known as factors), and any scale predictors (also known as covariates).

Dependent Variable

• An optional dependent variable must be the first specification on the KNN command.

• The dependent variable may be followed by the measurement level specification, which contains, in parentheses, the MLEVEL keyword followed by an equals sign and then S for scale, O for ordinal, or N for nominal. KNN treats ordinal and nominal dependent variables equivalently as categorical.

• If a measurement level is specified, then it temporarily overrides a dependent variable's setting in the data dictionary.

• If no measurement level is specified, then KNN defaults to the dictionary setting.

• If a measurement level is not specified and no setting is recorded in the data dictionary, then a numeric variable is treated as scale and a string variable is treated as categorical.

• Dependent variables can be numeric or string.

• A string variable may be defined as ordinal or nominal only.

Predictor Variables

• The names of the factors, if any, must be preceded by the keyword BY.

• If keyword BY is specified with no factors, then a warning is issued and BY is ignored.

• The names of the covariates, if any, must be preceded by the keyword WITH.

• If keyword WITH is specified with no covariates, then a warning is issued and WITH is ignored.

• A dependent variable may not be specified within a factor or covariate list. If a dependent variable is specified within one of these lists, then an error is issued.

• All variables specified within a factor or covariate list must be unique. If duplicate variables are specified within a list, then the duplicates are ignored.

• If duplicate variables are specified across the factor and covariate lists, then an error is issued.

• Factor variables can be numeric or string.

• Covariates must be numeric.

• At least one predictor must be specified.

Related Topics

KNN
Overview (KNN command)
Examples (KNN command)
EXCEPT Subcommand (KNN command)
CASELABELS Subcommand (KNN command)
FOCALCASES Subcommand (KNN command)
RESCALE Subcommand (KNN command)
PARTITION Subcommand (KNN command)
MODEL Subcommand (KNN command)
CRITERIA Subcommand (KNN command)
CROSSVALIDATION Subcommand (KNN command)
MISSING Subcommand (KNN command)
VIEWMODEL Subcommand (KNN command)
PRINT Subcommand (KNN command)
SAVE Subcommand (KNN command)
OUTFILE Subcommand (KNN command)


EXCEPT Subcommand (KNN command)

KNN (command),KNN (command),KNN (command)
EXCEPT subcommand,EXCEPT subcommand,EXCEPT subcommand
EXCEPT (subcommand),EXCEPT (subcommand),EXCEPT (subcommand)
KNN command,KNN command,KNN command

The EXCEPT subcommand lists any variables that the KNN procedure should exclude from the factor or covariate lists on the command line. This subcommand is useful if the factor or covariate lists contain a large number of variables – specified using the TO or ALL keyword, for example – but there are a few variables (for example, Case ID) that should be excluded.

The EXCEPT subcommand is introduced strictly for the purpose of simplifying syntax. Missing values on factors or covariates specified on EXCEPT do not affect whether a case is included in the analysis. For example, the following two KNN commands are equivalent. In both commands, listwise deletion is based on the dependent variable and factors A, B, and C.

KNN DepVar BY A B C.

KNN DepVar BY A B C D
   /EXCEPT VARIABLES=D.

• The EXCEPT subcommand ignores duplicate variables, and variables that are not specified on the command line's factor or covariate lists.

• There is no default variable list on the EXCEPT subcommand.

Related Topics

KNN
Overview (KNN command)
Examples (KNN command)
Variable Lists (KNN command)
CASELABELS Subcommand (KNN command)
FOCALCASES Subcommand (KNN command)
RESCALE Subcommand (KNN command)
PARTITION Subcommand (KNN command)
MODEL Subcommand (KNN command)
CRITERIA Subcommand (KNN command)
CROSSVALIDATION Subcommand (KNN command)
MISSING Subcommand (KNN command)
VIEWMODEL Subcommand (KNN command)
PRINT Subcommand (KNN command)
SAVE Subcommand (KNN command)
OUTFILE Subcommand (KNN command)


CASELABELS Subcommand (KNN command)

KNN (command),KNN (command),KNN (command)
CASELABELS subcommand,CASELABELS subcommand,CASELABELS subcommand
CASELABELS (subcommand),CASELABELS (subcommand),CASELABELS (subcommand)
KNN command,KNN command,KNN command

The CASELABELS subcommand allows you to specify a variable containing values used to label cases in the output.

• Cases are labeled using these values in the feature space chart, peers chart, and quadrant map.

• There is no default variable list on the CASELABELS subcommand.

Related Topics

KNN
Overview (KNN command)
Examples (KNN command)
Variable Lists (KNN command)
EXCEPT Subcommand (KNN command)
FOCALCASES Subcommand (KNN command)
RESCALE Subcommand (KNN command)
PARTITION Subcommand (KNN command)
MODEL Subcommand (KNN command)
CRITERIA Subcommand (KNN command)
CROSSVALIDATION Subcommand (KNN command)
MISSING Subcommand (KNN command)
VIEWMODEL Subcommand (KNN command)
PRINT Subcommand (KNN command)
SAVE Subcommand (KNN command)
OUTFILE Subcommand (KNN command)


FOCALCASES Subcommand (KNN command)

KNN (command),KNN (command),KNN (command)
FOCALCASES subcommand,FOCALCASES subcommand,FOCALCASES subcommand
FOCALCASES (subcommand),FOCALCASES (subcommand),FOCALCASES (subcommand)
KNN command,KNN command,KNN command

The FOCALCASES subcommand allows you to mark cases of particular interest. For example, a researcher wants to determine whether the test scores from one school district – the focal case – are comparable to those from similar school districts. He uses nearest neighbor analysis to find the school districts that are most similar with respect to a given set of features. Then he compares the test scores from the focal school district to those from the nearest neighbors.

Focal cases could also be used in clinical studies to select control cases that are similar to clinical cases. Focal cases are displayed in the k nearest neighbors and distances table, feature space chart, peers chart, and quadrant map. Information on focal cases is saved to the files specified on the OUTFILE subcommand.

• Cases with a positive value on the specified variable are treated as focal cases. It is invalid to specify a variable with no positive values.

• There is no default variable list on the FOCALCASES subcommand.

Related Topics

KNN
Overview (KNN command)
Examples (KNN command)
Variable Lists (KNN command)
EXCEPT Subcommand (KNN command)
CASELABELS Subcommand (KNN command)
RESCALE Subcommand (KNN command)
PARTITION Subcommand (KNN command)
MODEL Subcommand (KNN command)
CRITERIA Subcommand (KNN command)
CROSSVALIDATION Subcommand (KNN command)
MISSING Subcommand (KNN command)
VIEWMODEL Subcommand (KNN command)
PRINT Subcommand (KNN command)
SAVE Subcommand (KNN command)
OUTFILE Subcommand (KNN command)


RESCALE Subcommand (KNN command)

KNN (command),KNN (command),KNN (command)
RESCALE subcommand,RESCALE subcommand,RESCALE subcommand
RESCALE (subcommand),RESCALE (subcommand),RESCALE (subcommand)
KNN command,KNN command,KNN command

The RESCALE subcommand is used to rescale covariates.

All rescaling is performed based on the training data, even if a holdout sample is defined (see PARTITION Subcommand (KNN command)). That is, the minimum value or maximum value of a covariate are computed using only the training data. It is important that these covariates have similar distributions across the training and holdout samples. If the data are partitioned by specifying ratios on the PARTITION subcommand, then the KNN procedure attempts to ensure this similarity by random assignment. However, if you use the PARTITION subcommand VARIABLE keyword to assign cases to the training and holdout samples, then we recommend that you confirm the distributions are similar across samples before running the KNN procedure.

COVARIATE (keyword),COVARIATE (keyword),COVARIATE (keyword)
KNN command,KNN command,KNN command
ADJNORMALIZED (keyword),ADJNORMALIZED (keyword),ADJNORMALIZED (keyword)
KNN command,KNN command,KNN command
NONE (keyword),NONE (keyword),NONE (keyword)
KNN command,KNN command,KNN command
COVARIATE Keyword Collapse Hide details

COVARIATE Keyword

The COVARIATE keyword specifies the rescaling method to use for covariates specified following WITH on the command line. If no covariates are specified on the command line, then the COVARIATE keyword is ignored.

ADJNORMALIZED | Adjusted version of subtract the minimum and divide by the range, [2*(x−min)/(max−min)]−1.
NONE | No rescaling of covariates.

Related Topics

KNN
Overview (KNN command)
Examples (KNN command)
Variable Lists (KNN command)
EXCEPT Subcommand (KNN command)
CASELABELS Subcommand (KNN command)
FOCALCASES Subcommand (KNN command)
PARTITION Subcommand (KNN command)
MODEL Subcommand (KNN command)
CRITERIA Subcommand (KNN command)
CROSSVALIDATION Subcommand (KNN command)
MISSING Subcommand (KNN command)
VIEWMODEL Subcommand (KNN command)
PRINT Subcommand (KNN command)
SAVE Subcommand (KNN command)
OUTFILE Subcommand (KNN command)


PARTITION Subcommand (KNN command)

KNN (command),KNN (command),KNN (command)
PARTITION subcommand,PARTITION subcommand,PARTITION subcommand
PARTITION (subcommand),PARTITION (subcommand),PARTITION (subcommand)
KNN command,KNN command,KNN command

The PARTITION subcommand specifies the method of partitioning the active dataset into training and holdout samples. The training sample comprises the data records used to train the model. The holdout sample is an independent set of data records used to assess the final model.

• The partition can be defined by specifying the ratio of cases randomly assigned to each sample (training and holdout), or by a variable that assigns each case to the training or holdout sample.

• If the PARTITION subcommand is not specified, then the default partition randomly assigns 70% of the cases to the training sample and 30% to the holdout sample. If you want to specify a different random assignment, then you must specify new values for the TRAINING and HOLDOUT keywords. The value specified on each keyword gives the relative number of cases in the active dataset to assign to each sample. For example, /PARTITION TRAINING = 50 HOLDOUT = 50 is equivalent to /PARTITION TRAINING = 5 HOLDOUT = 5; both subcommands randomly assign 50% of the cases to the training sample and 50% to the holdout sample.

• If you want to be able to reproduce results based on the TRAINING and HOLDOUT keywords later, use the SET command to set the initialization value for the random number generator before running the KNN procedure.

• Please see the discussion of the relationship between rescaling and partitioning in the RESCALE subcommand section above.

• All partitioning is performed after listwise deletion of any cases with invalid data for any variable used by the procedure. See the MISSING subcommand for details about valid and invalid data.

• It is invalid to specify both TRAINING and VARIABLE.

TRAINING (keyword),TRAINING (keyword),TRAINING (keyword)
KNN command,KNN command,KNN command
TRAINING Keyword Collapse Hide details

TRAINING Keyword

The TRAINING keyword specifies the relative number of cases in the active dataset to randomly assign to the training sample.

The value must be an integer greater than 0. The default (if the PARTITION subcommand is not specified) is 70.

HOLDOUT (keyword),HOLDOUT (keyword),HOLDOUT (keyword)
KNN command,KNN command,KNN command
HOLDOUT Keyword Collapse Hide details

HOLDOUT Keyword

The HOLDOUT keyword specifies the relative number of cases in the active dataset to randomly assign to the holdout sample.

The value must be an integer greater than or equal to 0. The default (if the PARTITION subcommand is not specified) is 30.

VARIABLE (keyword),VARIABLE (keyword),VARIABLE (keyword)
KNN command,KNN command,KNN command
VARIABLE Keyword Collapse Hide details

VARIABLE Keyword

The VARIABLE keyword specifies a variable that assigns each case in the active dataset to the training or holdout sample. Cases with a positive value on the variable are assigned to the training sample and cases with a non-positive value to the holdout sample. Cases with a system-missing value are excluded from the analysis. (Any user-missing values for the partition variable are always treated as valid.)

The variable may not be a dependent variable or any variable specified on the command line factor or covariate lists. The variable must be numeric.

Related Topics

KNN
Overview (KNN command)
Examples (KNN command)
Variable Lists (KNN command)
EXCEPT Subcommand (KNN command)
CASELABELS Subcommand (KNN command)
FOCALCASES Subcommand (KNN command)
RESCALE Subcommand (KNN command)
MODEL Subcommand (KNN command)
CRITERIA Subcommand (KNN command)
CROSSVALIDATION Subcommand (KNN command)
MISSING Subcommand (KNN command)
VIEWMODEL Subcommand (KNN command)
PRINT Subcommand (KNN command)
SAVE Subcommand (KNN command)
OUTFILE Subcommand (KNN command)


MODEL Subcommand (KNN command)

KNN (command),KNN (command),KNN (command)
MODEL subcommand,MODEL subcommand,MODEL subcommand
MODEL (subcommand),MODEL (subcommand),MODEL (subcommand)
KNN command,KNN command,KNN command

The MODEL subcommand is used to specify the nearest neighbor “model”. By default, the procedure builds a model based on 3 nearest neighbors, using all features specified on the variables list and the Euclidean distance measure of “nearness”.

METRIC (keyword),METRIC (keyword),METRIC (keyword)
KNN command,KNN command,KNN command
EUCLID (keyword),EUCLID (keyword),EUCLID (keyword)
KNN command,KNN command,KNN command
CITYBLOCK (keyword),CITYBLOCK (keyword),CITYBLOCK (keyword)
KNN command,KNN command,KNN command
METRIC Keyword Collapse Hide details

METRIC Keyword

The METRIC keyword allows you to specify the distance metric used to measure the similarity of cases.

EUCLID | Euclidean distance. This is the default specification for METRIC. The distance between two cases, x and y, is the square root of the sum, over all dimensions, of the squared differences between the values for the cases.
CITYBLOCK | City-block or Manhattan distance. The distance between two cases is the sum, over all dimensions, of the absolute differences between the values for the cases.
NEIGHBORS (keyword),NEIGHBORS (keyword),NEIGHBORS (keyword)
KNN command,KNN command,KNN command
FIXED (keyword),FIXED (keyword),FIXED (keyword)
KNN command,KNN command,KNN command
AUTO (keyword),AUTO (keyword),AUTO (keyword)
KNN command,KNN command,KNN command
NEIGHBORS Keyword Collapse Hide details

NEIGHBORS Keyword

The NEIGHBORS keyword indicates whether to use automatic selection of the number of nearest neighbors.

If no dependent variable is specified, then any specification other than NEIGHBORS=FIXED is ignored with a warning.

FIXED | Use a fixed number of neighbors. This is the default. The FIXED keyword may be followed by parentheses containing the K option, which specifies the number of neighbors. K must be a positive integer. The default value is 3.
 | If NEIGHBORS=FIXED is specified, then any CROSSVALIDATION subcommand specifications are ignored with a warning.
AUTO | Use automatic selection to determine the “best” number of neighbors. The AUTO keyword may be follwed by parentheses containing the KMIN and KMAX options, which specify the minimum and maximum number of neighbors, respectively, that automatic number of neighbors selection will consider in determining the “best” number of neighbors. It is invalid to specify only one option; you must specify both or neither. The options may be specified in any order and must be separated by a comma or space character. Both numbers must be integers greater than 0, with KMIN less than KMAX. The defaults are KMIN=3, KMAX=5.
 | If NEIGHBORS=AUTO and FEATURES=ALL are specified, then V-fold cross-validation is used to select the “best” number of neighbors. The CROSSVALIDATION subcommand specifies the settings for V-fold cross-validation.
FEATURES (keyword),FEATURES (keyword),FEATURES (keyword)
KNN command,KNN command,KNN command
ALL (keyword),ALL (keyword),ALL (keyword)
KNN command,KNN command,KNN command
AUTO (keyword),AUTO (keyword),AUTO (keyword)
KNN command,KNN command,KNN command
FEATURES Keyword Collapse Hide details

FEATURES Keyword

The FEATURES keyword indicates whether to use automatic selection of features (predictors).

If no dependent variable is specified, then any specification other than FEATURES=ALL is ignored with a warning.

ALL | Use all predictors on the command line variable lists. This is the default.
AUTO | Use forward selection to determine the “best” feature set. The AUTO keyword may be followed by parentheses containing the FORCE option, which specifies the starting set of predictors that must be included in the model. There is no default variable list on the FORCE option.
 | If FEATURES=AUTO is specified, then any CROSSVALIDATION subcommand specifications are ignored with a warning.
 | It is invalid for the variable list on the FORCE option to include all possible predictors; that is, there must be at least one predictor available for feature selection if FEATURES=AUTO is specified.
KeywordName (keyword),KeywordName (keyword),KeywordName (keyword)
KNN command,KNN command,KNN command
Combined Neighbors and Features Selection Collapse Hide details

Combined Neighbors and Features Selection

When NEIGHBORS=AUTO and FEATURES=AUTO, the following method is used for combined neighbors and features selection:

1. For each k, use the forward selection method for feature selection.

2. Select the k, and accompanying feature set, with the lowest error rate or the lowest sum-of-squares error.

Related Topics

KNN
Overview (KNN command)
Examples (KNN command)
Variable Lists (KNN command)
EXCEPT Subcommand (KNN command)
CASELABELS Subcommand (KNN command)
FOCALCASES Subcommand (KNN command)
RESCALE Subcommand (KNN command)
PARTITION Subcommand (KNN command)
CRITERIA Subcommand (KNN command)
CROSSVALIDATION Subcommand (KNN command)
MISSING Subcommand (KNN command)
VIEWMODEL Subcommand (KNN command)
PRINT Subcommand (KNN command)
SAVE Subcommand (KNN command)
OUTFILE Subcommand (KNN command)


CRITERIA Subcommand (KNN command)

KNN (command),KNN (command),KNN (command)
CRITERIA subcommand,CRITERIA subcommand,CRITERIA subcommand
CRITERIA (subcommand),CRITERIA (subcommand),CRITERIA (subcommand)
KNN command,KNN command,KNN command

The CRITERIA subcommand specifies computational and resource settings for the KNN procedure.

NUMFEATURES (keyword),NUMFEATURES (keyword),NUMFEATURES (keyword)
KNN command,KNN command,KNN command
ATUO (keyword),ATUO (keyword),ATUO (keyword)
KNN command,KNN command,KNN command
FIXED (keyword),FIXED (keyword),FIXED (keyword)
KNN command,KNN command,KNN command
ERRORRATIO (keyword),ERRORRATIO (keyword),ERRORRATIO (keyword)
KNN command,KNN command,KNN command
NUMFEATURES Keyword Collapse Hide details

NUMFEATURES Keyword

The NUMFEATURES keyword specifies how automatic feature selection should select the number of features.

This keyword is ignored if /MODEL FEATURES=AUTO is not in effect.

AUTO
 | Select a fixed number of features, where the number of features is computed from a formula. The number of features the procedure selects is equal to min(20,P) - JForced, where P is the total number of features and JForced is the number of forced features. This is the default.
FIXED(integer)
 | Select a fixed number of features, where the number of features is specified in advance. Specify a positive integer. It must be less than or equal to the number of unique predictors available for feature selection. This will be the number of predictors specified on the KNN command, minus any specified on the EXCEPT subcommand, minus any forced into the model.
ERRORRATIO(MINCHANGE=value)
 | Select features until the absolute change in the error ratio compared to the previous step is less than the criterion value. Specify a number greater than 0. The default value is 0.01.
PREDICTED (keyword),PREDICTED (keyword),PREDICTED (keyword)
KNN command,KNN command,KNN command
MEAN (keyword),MEAN (keyword),MEAN (keyword)
KNN command,KNN command,KNN command
MEDIAN (keyword),MEDIAN (keyword),MEDIAN (keyword)
KNN command,KNN command,KNN command
PREDICTED Keyword Collapse Hide details

PREDICTED Keyword

The PREDICTED keyword specifies the function used to compute the predicted value of scale response variables.

This keyword is ignored if no dependent variable is specified.

MEAN | Compute predicted values based upon the mean value of the nearest neighbors. This is the default.
MEDIAN | Compute predicted values based upon the median value of the nearest neighbors.
WEIGHTFEATURES (keyword),WEIGHTFEATURES (keyword),WEIGHTFEATURES (keyword)
KNN command,KNN command,KNN command
WEIGHTFEATURES Keyword Collapse Hide details

WEIGHTFEATURES Keyword

The WEIGHTFEATURES keyword specifies whether to weight features by their normalized importance when computing distances.

NO | Do not weight features by normalized importance. This is the default.
YES | Weight features by normalized importance. Feature importance for a predictor is calculated by the ratio of the error rate or sum-of-squares error of the model with the predictor removed from the model to the error rate or sum-of-squares error for the full model. Normalized importance is calculated by reweighting the feature importance values so that they sum to 1.
 | The specification WEIGHTFEATURES=YES is ignored with a warning if no dependent variable is specified.

Related Topics

KNN
Overview (KNN command)
Examples (KNN command)
Variable Lists (KNN command)
EXCEPT Subcommand (KNN command)
CASELABELS Subcommand (KNN command)
FOCALCASES Subcommand (KNN command)
RESCALE Subcommand (KNN command)
PARTITION Subcommand (KNN command)
MODEL Subcommand (KNN command)
CROSSVALIDATION Subcommand (KNN command)
MISSING Subcommand (KNN command)
VIEWMODEL Subcommand (KNN command)
PRINT Subcommand (KNN command)
SAVE Subcommand (KNN command)
OUTFILE Subcommand (KNN command)


CROSSVALIDATION Subcommand (KNN command)

KNN (command),KNN (command),KNN (command)
CROSSVALIDATION subcommand,CROSSVALIDATION subcommand,CROSSVALIDATION subcommand
CROSSVALIDATION (subcommand),CROSSVALIDATION (subcommand),CROSSVALIDATION (subcommand)
KNN command,KNN command,KNN command

The CROSSVALIDATION subcommand specifies settings for performing V-fold cross-validation to determine the “best” number of neighbors.

• V-fold cross validation divides the data into V folds. Then, for a fixed k, it applies nearest neighbor analysis to make predictions on the vth fold (using the other V−1 folds as the training sample) and evaluates the error. This process is successively applied to all possible choices of v. At the end of V folds, the computed errors are averaged. The above steps are repeated for various values of k. The value achieving the lowest average error is selected as the optimal value for k.

• If multiple values of k are tied on the lowest average error, then the smallest k among those that are tied is selected.

• Cross-validation is not used when /MODEL NEIGHBORS=FIXED or when /MODEL FEATURES=AUTO.

• It is invalid to specify both the FOLDS and VARIABLE keywords on the CROSSVALIDATION subcommand.

FOLDS (keyword),FOLDS (keyword),FOLDS (keyword)
KNN command,KNN command,KNN command
FOLDS Keyword Collapse Hide details

FOLDS Keyword

The FOLDS keyword specifies the number of folds that should be used for cross-validation. The procedure randomly assigns cases to folds, numbered from 1 to the number of folds.

• Specify an integer greater than 1. The default is 10.

• For a given training set, the upper limit to the number of folds is the number of cases. If the value of FOLDS is greater than the number of cases in the training partition (and for any split, if SPLIT FILE is in effect), then the number of folds is set to the number of cases in the training partition (for that split).

VARIABLE (keyword),VARIABLE (keyword),VARIABLE (keyword)
KNN command,KNN command,KNN command
VARIABLE Keyword Collapse Hide details

VARIABLE Keyword

The VARIABLE keyword specifies a variable that assigns each case in the active dataset to a fold from 1 to V.

The variable may not be a dependent variable or any variable specified on the command line factor or covariate lists. The variable must be numeric and take values from 1 to V. If any values in this range are missing on any splits (if SPLIT FILE is in effect) this will cause an error.

Related Topics

KNN
Overview (KNN command)
Examples (KNN command)
Variable Lists (KNN command)
EXCEPT Subcommand (KNN command)
CASELABELS Subcommand (KNN command)
FOCALCASES Subcommand (KNN command)
RESCALE Subcommand (KNN command)
PARTITION Subcommand (KNN command)
MODEL Subcommand (KNN command)
CRITERIA Subcommand (KNN command)
MISSING Subcommand (KNN command)
VIEWMODEL Subcommand (KNN command)
PRINT Subcommand (KNN command)
SAVE Subcommand (KNN command)
OUTFILE Subcommand (KNN command)


MISSING Subcommand (KNN command)

KNN (command),KNN (command),KNN (command)
MISSING subcommand,MISSING subcommand,MISSING subcommand
MISSING (subcommand),MISSING (subcommand),MISSING (subcommand)
KNN command,KNN command,KNN command

The MISSING subcommand is used to control whether user-missing values for categorical variables are treated as valid values. By default, user-missing values for categorical variables are treated as invalid.

• The MISSING subcommand defines categorical variables as dependent variables with MLEVEL specification O or N, dependent variables with measurement level set at Ordinal or Nominal in the data dictionary and no MLEVEL specification, and factors. Scale variables are dependent variables with MLEVEL specification S, dependent variables with Scale measurement level and no MLEVEL specification, and covariates.

• User-missing values for scale variables are always treated as invalid.

• System-missing values for any variables are always treated as invalid.

USERMISSING (keyword),USERMISSING (keyword),USERMISSING (keyword)
KNN command,KNN command,KNN command
USERMISSING=EXCLUDE
 | User-missing values for categorical variables are treated as invalid. This is the default.
USERMISSING=INCLUDE
 | User-missing values for categorical variables are treated as valid values.

Related Topics

KNN
Overview (KNN command)
Examples (KNN command)
Variable Lists (KNN command)
EXCEPT Subcommand (KNN command)
CASELABELS Subcommand (KNN command)
FOCALCASES Subcommand (KNN command)
RESCALE Subcommand (KNN command)
PARTITION Subcommand (KNN command)
MODEL Subcommand (KNN command)
CRITERIA Subcommand (KNN command)
CROSSVALIDATION Subcommand (KNN command)
VIEWMODEL Subcommand (KNN command)
PRINT Subcommand (KNN command)
SAVE Subcommand (KNN command)
OUTFILE Subcommand (KNN command)


VIEWMODEL Subcommand (KNN command)

KNN (command),KNN (command),KNN (command)
VIEWMODEL subcommand,VIEWMODEL subcommand,VIEWMODEL subcommand
VIEWMODEL (subcommand),VIEWMODEL (subcommand),VIEWMODEL (subcommand)
KNN command,KNN command,KNN command

The VIEWMODEL subcommand controls options for display of model-related output, including tables and charts. Tables in the model view include k nearest neighbors and distances for focal cases, classification of categorical response variables, and an error summary. Graphical output in the model view includes an automatic selection error log, feature importance chart, feature space chart, peers chart, and quadrant map. See the topic Model View (Nearest Neighbor Analysis) for more information.

DISPLAY (keyword),DISPLAY (keyword),DISPLAY (keyword)
KNN command,KNN command,KNN command
DISPLAY Keyword Collapse Hide details

DISPLAY Keyword

The DISPLAY keyword specifies whether to display the model view in the output.

YES | Display the model view. This is the default.
NO | Do not display the model view.

Related Topics

KNN
Overview (KNN command)
Examples (KNN command)
Variable Lists (KNN command)
EXCEPT Subcommand (KNN command)
CASELABELS Subcommand (KNN command)
FOCALCASES Subcommand (KNN command)
RESCALE Subcommand (KNN command)
PARTITION Subcommand (KNN command)
MODEL Subcommand (KNN command)
CRITERIA Subcommand (KNN command)
CROSSVALIDATION Subcommand (KNN command)
MISSING Subcommand (KNN command)
PRINT Subcommand (KNN command)
SAVE Subcommand (KNN command)
OUTFILE Subcommand (KNN command)


PRINT Subcommand (KNN command)

KNN (command),KNN (command),KNN (command)
PRINT subcommand,PRINT subcommand,PRINT subcommand
PRINT (subcommand),PRINT (subcommand),PRINT (subcommand)
KNN command,KNN command,KNN command

The PRINT subcommand indicates the tabular output to display outside the Model Viewer. If PRINT is not specified, then the default tables are displayed. If PRINT is specified, then only the requested PRINT output is displayed.

CPS (keyword),CPS (keyword),CPS (keyword)
KNN command,KNN command,KNN command
CPS Keyword Collapse Hide details

CPS Keyword

The CPS keyword displays the case processing summary table, which summarizes the number of cases included and excluded in the analysis, in total and by training and holdout samples. This table is shown by default.

NONE (keyword),NONE (keyword),NONE (keyword)
KNN command,KNN command,KNN command
NONE Keyword Collapse Hide details

NONE Keyword

The NONE keyword suppresses all PRINT output. This keyword may not be specified with any other PRINT keywords.

Related Topics

KNN
Overview (KNN command)
Examples (KNN command)
Variable Lists (KNN command)
EXCEPT Subcommand (KNN command)
CASELABELS Subcommand (KNN command)
FOCALCASES Subcommand (KNN command)
RESCALE Subcommand (KNN command)
PARTITION Subcommand (KNN command)
MODEL Subcommand (KNN command)
CRITERIA Subcommand (KNN command)
CROSSVALIDATION Subcommand (KNN command)
MISSING Subcommand (KNN command)
VIEWMODEL Subcommand (KNN command)
SAVE Subcommand (KNN command)
OUTFILE Subcommand (KNN command)


SAVE Subcommand (KNN command)

KNN (command),KNN (command),KNN (command)
SAVE subcommand,SAVE subcommand,SAVE subcommand
SAVE (subcommand),SAVE (subcommand),SAVE (subcommand)
KNN command,KNN command,KNN command

The SAVE subcommand writes optional temporary variables to the active dataset.

PREDVAL (keyword),PREDVAL (keyword),PREDVAL (keyword)
KNN command,KNN command,KNN command
PREDVAL Keyword Collapse Hide details

PREDVAL Keyword

This saves the predicted value for a scale dependent variable and the predicted category for a categorical dependent variable.

Specify a unique, valid variable name. The default variable name is KNN_PredictedValue.

If there is no dependent variabe, this keyword is ignored with a warning.

PREDPROB (keyword),PREDPROB (keyword),PREDPROB (keyword)
KNN command,KNN command,KNN command
PREDPROB Keyword Collapse Hide details

PREDPROB Keyword

If the dependent variable is categorical, then this keyword saves the predicted probabilities of the first n categories. The value of n is specified by the MAXCAT keyword.

• Specify a unique, valid variable name. The default root name is KNN_Probability.

• If there is no dependent variable, this keyword is ignored with a warning.

• If the dependent variable is scale, this keyword is ignored with a warning.

PARTITION (keyword),PARTITION (keyword),PARTITION (keyword)
KNN command,KNN command,KNN command
PARTITION Keyword Collapse Hide details

PARTITION Keyword

This saves the value of the partition (training or holdout) to which the case was assigned.

• Specify a valid variable name. The default variable name is KNN_Partition.

• This keyword is ignored with a warning if you specify a variable on the PARTITION subcommand.

FOLD (keyword),FOLD (keyword),FOLD (keyword)
KNN command,KNN command,KNN command
FOLD Keyword Collapse Hide details

FOLD Keyword

This saves the value of the fold to which the case was assigned.

• Specify a valid variable name. The default variable name name is KNN_Fold.

• This keyword is ignored if /MODEL NEIGHBORS=FIXED or /MODEL FEATURES=AUTO.

• This keyword is ignored with a warning if you specify a variable on the CROSSVALIDATION subcommand.

MAXCAT (keyword),MAXCAT (keyword),MAXCAT (keyword)
KNN command,KNN command,KNN command
MAXCAT Keyword Collapse Hide details

MAXCAT Keyword

The MAXCAT keyword specifies the number of categories for which predicted probabilities should be saved.

• Specify a positive integer in parentheses. The default is 25.

• This keyword is ignored if predicted probabilities are not saved.

Related Topics

KNN
Overview (KNN command)
Examples (KNN command)
Variable Lists (KNN command)
EXCEPT Subcommand (KNN command)
CASELABELS Subcommand (KNN command)
FOCALCASES Subcommand (KNN command)
RESCALE Subcommand (KNN command)
PARTITION Subcommand (KNN command)
MODEL Subcommand (KNN command)
CRITERIA Subcommand (KNN command)
CROSSVALIDATION Subcommand (KNN command)
MISSING Subcommand (KNN command)
VIEWMODEL Subcommand (KNN command)
PRINT Subcommand (KNN command)
OUTFILE Subcommand (KNN command)


OUTFILE Subcommand (KNN command)

KNN (command),KNN (command),KNN (command)
OUTFILE subcommand,OUTFILE subcommand,OUTFILE subcommand
OUTFILE (subcommand),OUTFILE (subcommand),OUTFILE (subcommand)
KNN command,KNN command,KNN command

The OUTFILE subcommand saves an XML-format file containing the nearest neighbor model. It also saves PASW Statistics-format data files containing distances from focal cases.

• File names must be specified in full. KNN does not supply extensions.

• The MODEL keyword is not honored if split-file processing is in effect (see the SPLIT FILE command). If this keyword is specified when split-file processing is on, then a warning is displayed.

MODEL (keyword),MODEL (keyword),MODEL (keyword)
KNN command,KNN command,KNN command
FOCALCASES (keyword),FOCALCASES (keyword),FOCALCASES (keyword)
KNN command,KNN command,KNN command
MODEL = 'file'
 | Writes the nearest neighbor mdoel to an XML file. Specify a valid file name. If the 'file' specification refers to an existing file, then the file is overwritten. The model is written in PMML with extensions.
FOCALCASES = 'savfile' | ‘dataset'
 | Writes the distances from focal cases to PASW Statistics-format data files. Specify a valid file or dataset name. If the specification refers to an existing file or dataset, then the file or dataset is overwritten.
 | For each focal case, a separate variable is created for each of the focal case's k nearest neighbors (from the training set) and the corresponding k nearest distances. The variable names are KNN_FocalCase_CaseNumber, KNN_NearestNeighbor_CaseNumber_1 through KNN_NearestNeighbor_CaseNumber_k and KNN_NearestNeighbor_Distance_1 through KNN_NearestNeighbor_CaseNumber_k.

Related Topics

KNN
Overview (KNN command)
Examples (KNN command)
Variable Lists (KNN command)
EXCEPT Subcommand (KNN command)
CASELABELS Subcommand (KNN command)
FOCALCASES Subcommand (KNN command)
RESCALE Subcommand (KNN command)
PARTITION Subcommand (KNN command)
MODEL Subcommand (KNN command)
CRITERIA Subcommand (KNN command)
CROSSVALIDATION Subcommand (KNN command)
MISSING Subcommand (KNN command)
VIEWMODEL Subcommand (KNN command)
PRINT Subcommand (KNN command)
SAVE Subcommand (KNN command)


LEAVE

LEAVE (command),LEAVE (command),LEAVE (command)
initialization,initialization,initialization
suppressing,suppressing,suppressing
LEAVE varlist

This command does not read the active dataset. It is stored, pending execution with the next command that reads the dataset. See the topic Command Order for more information.

Example

COMPUTE TSALARY=TSALARY+SALARY.
LEAVE TSALARY.
FORMAT TSALARY (DOLLAR8)/ SALARY (DOLLAR7).
EXECUTE.

Related Topics

Overview (LEAVE command)
Examples (LEAVE command)


Overview (LEAVE command)

Normally, the program reinitializes variables each time it prepares to read a new case. LEAVE suppresses reinitialization and retains the current value of the specified variable or variables when the program reads the next case. It also sets the initial value received by a numeric variable to 0 instead of system-missing. LEAVE is frequently used with COMPUTE to create a variable to store an accumulating sum. LEAVE is also used to spread a variable’s values across multiple cases when VECTOR is used within an input program to restructure a data file.

LEAVE cannot be used with scratch variables. See the topic Scratch Variables for more information.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is the variable(s) whose values are not to be reinitialized as each new case is read.

Syntax Rules Collapse Hide details

Syntax Rules

• Variables named on LEAVE must be new variables that do not already exist in the active dataset prior to the transformation block that defines them, but they must be defined in the transformation block prior to the LEAVE command that specifies them. See the topic Examples (LEAVE command) for more information.

• Variables named on LEAVE cannot be scratch variables (but scratch variables can be used to obtain functionality equivalent to LEAVE). See the topic Scratch Variables for more information.

• Multiple variables can be named. The keyword TO can be used to refer to a list of consecutive variables.

• String and numeric variables can be specified on the same LEAVE command.

Operations Collapse Hide details

Operations

• Numeric variables named on LEAVE are initialized to 0 for the first case, and string variables are initialized to blanks. These variables are not reinitialized when new cases are read.

Related Topics

LEAVE
Examples (LEAVE command)


Examples (LEAVE command)

Correct vs. Invalid Specifications for LEAVE

DATA LIST LIST /Var1 Var2 Var3.
BEGIN DATA
1 2 3
4 5 6
7 8 9
END DATA.

*this is the correct form.
COMPUTE TotalVar1=TotalVar1+Var1.
LEAVE TotalVar1.

*this will change the value of Var2 but LEAVE will fail,
 generating an error because Var2 already exists.
COMPUTE Var2=Var2+Var2.
LEAVE Var2.

*this will fail, generating an error because the LEAVE command
 occurs before the command that defines the variable named on LEAVE.
LEAVE TotalVar3.
COMPUTE TotalVar3=TotalVar3+Var3.

LIST.

Running Total

COMPUTE TSALARY=TSALARY+SALARY.
LEAVE TSALARY.
FORMAT TSALARY (DOLLAR8)/ SALARY (DOLLAR7).

• These commands keep a running total of salaries across all cases. SALARY is the variable containing the employee’s salary, and TSALARY is the new variable containing the cumulative salaries for all previous cases.

• For the first case, TSALARY is initialized to 0, and TSALARY equals SALARY. For the rest of the cases, TSALARY stores the cumulative totals for SALARY.

• LEAVE follows COMPUTE because TSALARY must first be defined before it can be specified on LEAVE.

• If LEAVE were not specified for this computation, TSALARY would be initialized to system-missing for all cases. TSALARY would remain system-missing because its value would be missing for every computation.

Separate Sums for Each Category of a Grouping Variable

SORT CASES DEPT.
IF DEPT NE LAG(DEPT,1) TSALARY=0.   /*Initialize for new dept
COMPUTE TSALARY=TSALARY+SALARY.     /*Sum salaries
LEAVE TSALARY.                    /*Prevent  initialization  each case
FORMAT TSALARY (DOLLAR8)/ SALARY (DOLLAR7).

• These commands accumulate a sum across cases for each department.

• SORT first sorts cases by the values of variable DEPT.

• IF specifies that if the value of DEPT for the current case is not equal to the value of DEPT for the previous case, TSALARY equals 0. Thus, TSALARY is reset to 0 each time the value of DEPT changes. (For the first case in the file, the logical expression on IF is missing. However, the desired effect is obtained because LEAVE initializes TSALARY to 0 for the first case, independent of the IF statement.)

• LEAVE prevents TSALARY from being initialized for cases within the same department.

Related Topics

LEAVE
Overview (LEAVE command)


LIST

LIST (command),LIST (command),LIST (command)
cases,cases,cases
listing,listing,listing
LIST [VARIABLES={ALL**  }] [/FORMAT=[{WRAP**}] [{UNNUMBERED**}]]
                {varlist}            {SINGLE}   {NUMBERED    }

 [/CASES=[FROM {1**}] [TO {eof**}] [BY {1**}]]
               {n  }      {n    }      {n  }

**Default if the subcommand is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

Example

LIST VARIABLES=V1 V2.

Related Topics

Overview (LIST command)
Examples (LIST command)
VARIABLES Subcommand (LIST command)
FORMAT Subcommand (LIST command)
CASES Subcommand (LIST command)
SUMMARIZE


Overview (LIST command)

LIST displays case values for variables in the active dataset. The output is similar to the output produced by the PRINT command. However, LIST is a procedure and reads data, whereas PRINT is a transformation and requires a procedure (or the EXECUTE command) to execute it.

Options Collapse Hide details

Options

Selecting and Ordering Variables. You can specify a list of variables to be listed using the VARIABLES subcommand.

Format. You can limit each case listing to a single line, and you can display the case number for each listed case with the FORMAT subcommand.

Selecting Cases. You can limit the listing to a particular sequence of cases using the CASES subcommand.

Basic Specification Collapse Hide details

Basic Specification

• The basic specification is simply LIST, which displays the values for all variables in the active dataset.

• By default, cases wrap to multiple lines if all the values do not fit within the page width (the page width is determined by the SET WIDTH command). Case numbers are not displayed for the listed cases.

Subcommand Order Collapse Hide details

Subcommand Order

All subcommands are optional and can be named in any order.

Operations Collapse Hide details

Operations

• If VARIABLES is not specified, variables are listed in the order in which they appear in the active dataset.

• LIST does not display values for scratch or system variables.

• LIST uses print formats contained in the dictionary of the active dataset. Alternative formats cannot be specified on LIST. See FORMATS or PRINT FORMATS for information on changing print formats.

• LIST output uses the width specified on SET.

• If a numeric value is longer than its defined width, the program first attempts to list the value by removing punctuation characters, then uses scientific notation, and finally prints asterisks.

• If a long string variable cannot be listed within the output width, it is truncated.

• Values of the variables listed for a case are always separated by at least one blank.

• System-missing values are displayed as a period for numeric variables and a blank for string variables.

• If cases fit on one line, the column width for each variable is determined by the length of the variable name or the format, whichever is greater. If the variable names do not fit on one line, they are printed vertically.

• If cases do not fit on one line within the output width specified on SET, they are wrapped. LIST displays a table illustrating the location of the variables in the output and prints the name of the first variable in each line at the beginning of the line.

• Each execution of LIST begins at the top of a new page. If SPLIT FILE is in effect, each split also begins at the top of a new page.

Related Topics

LIST
Examples (LIST command)
VARIABLES Subcommand (LIST command)
FORMAT Subcommand (LIST command)
CASES Subcommand (LIST command)


Examples (LIST command)

LIST with No Subcommands

LIST.

• LIST by itself requests a display of the values for all variables in the active dataset.

Controlling Listed Cases with CASES Subcommand

LIST VARIABLES=V1 V2 /CASES=FROM 10 TO 100 BY 2.

• LIST produces a list of every second case for variables V1 and V2, starting with case 10 and stopping at case 100.

Related Topics

LIST
Overview (LIST command)
VARIABLES Subcommand (LIST command)
FORMAT Subcommand (LIST command)
CASES Subcommand (LIST command)


VARIABLES Subcommand (LIST command)

VARIABLES (subcommand),VARIABLES (subcommand),VARIABLES (subcommand)
LIST command,LIST command,LIST command
LIST (command),LIST (command),LIST (command)
VARIABLES subcommand,VARIABLES subcommand,VARIABLES subcommand

VARIABLES specifies the variables to be listed.

• The variables must already exist, and they cannot be scratch or system variables.

• If VARIABLES is used, only the specified variables are listed.

• Variables are listed in the order in which they are named on VARIABLES.

• If a variable is named more than once, it is listed more than once.

• The keyword ALL (the default) can be used to request all variables. ALL can also be used with a variable list (see example below).

ALL List all user-defined variables. Variables are listed in the order in which they appear in the active dataset. This is the default if VARIABLES is omitted.

Example

LIST VARIABLES=V15 V31 ALL.

• VARIABLES is used to list values for V15 and V31 before all other variables. The keyword ALL then lists all variables, including V15 and V31, in the order in which they appear in the active dataset. Values for V15 and V31 are therefore listed twice.

Related Topics

LIST
Overview (LIST command)
Examples (LIST command)
FORMAT Subcommand (LIST command)
CASES Subcommand (LIST command)


FORMAT Subcommand (LIST command)

FORMAT (subcommand),FORMAT (subcommand),FORMAT (subcommand)
LIST command,LIST command,LIST command
LIST (command),LIST (command),LIST (command)
FORMAT subcommand,FORMAT subcommand,FORMAT subcommand

FORMAT controls whether cases wrap if they cannot fit on a single line and whether the case number is displayed for each listed case. The default display uses more than one line per case (if necessary) and does not number cases.

• The minimum specification is a single keyword.

• WRAP and SINGLE are alternatives, as are NUMBERED and UNNUMBERED. Only one of each pair can be specified.

• If SPLIT FILE is in effect for NUMBERED, case numbering restarts at each split. To get sequential numbering regardless of splits, create a variable and set it equal to the system variable $CASENUM and then name this variable as the first variable on the VARIABLES subcommand. An appropriate format should be specified for the new variable before it is used on LIST.

WRAP (keyword),WRAP (keyword),WRAP (keyword)
LIST command,LIST command,LIST command
SINGLE (keyword),SINGLE (keyword),SINGLE (keyword)
LIST command,LIST command,LIST command
UNNUMBERED (keyword),UNNUMBERED (keyword),UNNUMBERED (keyword)
LIST command,LIST command,LIST command
NUMBERED (keyword),NUMBERED (keyword),NUMBERED (keyword)
LIST command,LIST command,LIST command
WRAP | Wrap cases if they do not fit on a single line. Page width is determined by the SET WIDTH command. This is the default.
SINGLE | Limit each case to one line. Only variables that fit on a single line are displayed.
UNNUMBERED | Do not include the sequence number of each case. This is the default.
NUMBERED | Include the sequence number of each case. The sequence number is displayed to the left of the listed values.

Related Topics

LIST
Overview (LIST command)
Examples (LIST command)
VARIABLES Subcommand (LIST command)
CASES Subcommand (LIST command)


CASES Subcommand (LIST command)

CASES (subcommand),CASES (subcommand),CASES (subcommand)
LIST command,LIST command,LIST command
LIST (command),LIST (command),LIST (command)
CASES subcommand,CASES subcommand,CASES subcommand

CASES limits the number of cases listed. By default, all cases in the active dataset are listed.

• Any or all of the keywords below can be used. Defaults that are not changed remain in effect.

LIST (command),LIST (command),LIST (command)
with SAMPLE command,with SAMPLE command,with SAMPLE command
LIST (command),LIST (command),LIST (command)
with SELECT IF command,with SELECT IF command,with SELECT IF command

• If LIST is preceded by a SAMPLE or SELECT IF command, case selections specified by CASES are taken from those cases that were selected by SAMPLE or SELECT IF.

LIST (command),LIST (command),LIST (command)
with SPLIT FILE command,with SPLIT FILE command,with SPLIT FILE command

• If SPLIT FILE is in effect, case selections specified by CASES are restarted for each split.

FROM (keyword),FROM (keyword),FROM (keyword)
LIST command,LIST command,LIST command
TO (keyword),TO (keyword),TO (keyword)
LIST command,LIST command,LIST command
BY (keyword),BY (keyword),BY (keyword)
LIST command,LIST command,LIST command
FROM n | Number of the first case to be listed. The default is 1.
TO n | Number of the last case to be listed. The default is the end of the active dataset. CASES 100 is interpreted as CASES TO 100.
BY n | Increment used to choose cases for listing. The default is 1.

Example

LIST CASES BY 3 /FORMAT=NUMBERED.

• Every third case is listed for all variables in the active dataset. The listing begins with the first case and includes every third case up to the end of the file.

• FORMAT displays the case number of each listed case.

Example

LIST CASES FROM 10 TO 20.

• Cases from case 10 through case 20 are listed for all variables in the active dataset.

Related Topics

LIST
Overview (LIST command)
Examples (LIST command)
VARIABLES Subcommand (LIST command)
FORMAT Subcommand (LIST command)


LOGISTIC REGRESSION

Logistic Regression,Logistic Regression,Logistic Regression
command syntax,command syntax,command syntax
LOGISTIC REGRESSION (command),LOGISTIC REGRESSION (command),LOGISTIC REGRESSION (command)
LOGISTIC REGRESSION (command),LOGISTIC REGRESSION (command),LOGISTIC REGRESSION (command)
syntax chart,syntax chart,syntax chart
release history,release history,release history

LOGISTIC REGRESSION is available in the Regression option.

LOGISTIC REGRESSION VARIABLES = dependent var
        [WITH independent varlist [BY var [BY var] ... ]]

[/CATEGORICAL = var1, var2, ... ]

[/CONTRAST (categorical var) = [{INDICATOR [(refcat)]    }]]
                                {DEVIATION [(refcat)]    }
                                {SIMPLE [(refcat)]       }
                                {DIFFERENCE              }
                                {HELMERT                 }
                                {REPEATED                }
                                {POLYNOMIAL[({1,2,3...})]}
                                             {metric  }
                                {SPECIAL (matrix)        }

 [/METHOD = {ENTER**       }   [{ALL    }]]
            {BSTEP [{COND}]}    {varlist}
                    {LR  }
                    {WALD}
            {FSTEP [{COND}]}
                    {LR  }
                    {WALD}

 [/SELECT = {ALL**                 }]
            {varname relation value}

 [/{NOORIGIN**}]
   {ORIGIN    }

 [/ID = [variable]]

 [/PRINT = [DEFAULT**] [SUMMARY] [CORR] [ALL] [ITER [({1})]] [GOODFIT]]
                                                      {n}
           [CI(level)]

 [/CRITERIA = [BCON ({0.001**})] [ITERATE({20**})] [LCON({0**   })]
                     {value  }            {n   }         {value }

              [PIN({0.05**})] [POUT({0.10**})] [EPS({.00000001**})]]
                   {value }         {value }        {value      }

              [CUT[{O.5**  }]]
                   [value  }

 [/CLASSPLOT]

 [/MISSING = {EXCLUDE **}]
             {INCLUDE   }

 [/CASEWISE = [tempvarlist]  [OUTLIER({2    })]]
                                      {value}

 [/SAVE = tempvar[(newname)] tempvar[(newname)]...]

 [/OUTFILE = [{MODEL    }(filename)]]
              {PARAMETER}

 [/EXTERNAL]

**Default if the subcommand or keyword is omitted.

Temporary variables that are created by LOGISTIC REGRESSION are as follows:

PRED

PGROUP

RESID

DEV

LEVER

LRESID

SRESID

ZRESID

COOK

DFBETA

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See LOGISTIC REGRESSION Algorithms for computational details for this procedure.

Syntax for the LOGISTIC REGRESSION command can be generated from the Logistic Regression dialog box.

Release History Collapse Hide details

Release History

Release 13.0

• OUTFILE subcommand introduced.

Release 14.0

• Modification to the method of recoding string variables. See the topic Overview (LOGISTIC REGRESSION command) for more information.

Example

LOGISTIC REGRESSION VARIABLES = PROMOTED WITH AGE, JOBTIME, JOBRATE.

Related Topics

Overview (LOGISTIC REGRESSION command)
Examples (LOGISTIC REGRESSION command)
VARIABLES Subcommand (LOGISTIC REGRESSION command)
CATEGORICAL Subcommand (LOGISTIC REGRESSION command)
CONTRAST Subcommand (LOGISTIC REGRESSION command)
METHOD Subcommand (LOGISTIC REGRESSION command)
SELECT Subcommand (LOGISTIC REGRESSION command)
ORIGIN and NOORIGIN Subcommands (LOGISTIC REGRESSION command)
ID Subcommand (LOGISTIC REGRESSION command)
PRINT Subcommand (LOGISTIC REGRESSION command)
CRITERIA Subcommand (LOGISTIC REGRESSION command)
CLASSPLOT Subcommand (LOGISTIC REGRESSION command)
CASEWISE Subcommand (LOGISTIC REGRESSION command)
MISSING Subcommand (LOGISTIC REGRESSION command)
OUTFILE Subcommand (LOGISTIC REGRESSION command)
SAVE Subcommand (LOGISTIC REGRESSION command)
EXTERNAL Subcommand (LOGISTIC REGRESSION command)
References (LOGISTIC REGRESSION command)


Overview (LOGISTIC REGRESSION command)

LOGISTIC REGRESSION regresses a dichotomous dependent variable on a set of independent variables. Categorical independent variables are replaced by sets of contrast variables, each set entering and leaving the model in a single step.

Options Collapse Hide details

Options

Processing of Independent Variables. You can specify which independent variables are categorical in nature on the CATEGORICAL subcommand. You can control treatment of categorical independent variables by the CONTRAST subcommand. Seven methods are available for entering independent variables into the model. You can specify any one of them on the METHOD subcommand. You can also use the keyword BY between variable names to enter interaction terms.

Selecting Cases. You can use the SELECT subcommand to define subsets of cases to be used in estimating a model.

Regression through the Origin. You can use the ORIGIN subcommand to exclude a constant term from a model.

Specifying Termination and Model-Building Criteria. You can further control computations when building the model by specifying criteria on the CRITERIA subcommand.

Adding New Variables to the Active Dataset. You can save the residuals, predicted values, and diagnostics that are generated by LOGISTIC REGRESSION in the active dataset.

Output. You can use the PRINT subcommand to print optional output, use the CASEWISE subcommand to request analysis of residuals, and use the ID subcommand to specify a variable whose values or value labels identify cases in output. You can request plots of the actual values and predicted values for each case with the CLASSPLOT subcommand.

Basic Specification Collapse Hide details

Basic Specification

• The minimum specification is the VARIABLES subcommand with one dichotomous dependent variable. You must specify a list of independent variables either following the keyword WITH on the VARIABLES subcommand or on a METHOD subcommand.

• The default output includes goodness-of-fit tests for the model (–2 log-likelihood, goodness-of-fit statistic, Cox and Snell R2, and Nagelkerke R2) and a classification table for the predicted and observed group memberships. The regression coefficient, standard error of the regression coefficient, Wald statistic and its significance level, and a multiple correlation coefficient adjusted for the number of parameters (Atkinson, 1980) are displayed for each variable in the equation.

Subcommand Order Collapse Hide details

Subcommand Order

• Subcommands can be named in any order. If the VARIABLES subcommand is not specified first, a slash (/) must precede it.

• The ordering of METHOD subcommands determines the order in which models are estimated. Different sequences may result in different models.

Syntax Rules Collapse Hide details

Syntax Rules

• Only one dependent variable can be specified for each LOGISTIC REGRESSION.

• Any number of independent variables may be listed. The dependent variable may not appear on this list.

• The independent variable list is required if any of the METHOD subcommands are used without a variable list or if the METHOD subcommand is not used. The keyword TO cannot be used on any variable list.

• If you specify the keyword WITH on the VARIABLES subcommand, all independent variables must be listed.

• If the keyword WITH is used on the VARIABLES subcommand, interaction terms do not have to be specified on the variable list, but the individual variables that make up the interactions must be listed.

• Multiple METHOD subcommands are allowed.

• The minimum truncation for this command is LOGI REG.

Operations Collapse Hide details

Operations

• Independent variables that are specified on the CATEGORICAL subcommand are replaced by sets of contrast variables. In stepwise analyses, the set of contrast variables associated with a categorical variable is entered or removed from the model as a single step.

• Independent variables are screened to detect and eliminate redundancies.

• If the linearly dependent variable is one of a set of contrast variables, the set will be reduced by the redundant variable or variables. A warning will be issued, and the reduced set will be used.

• For the forward stepwise method, redundancy checking is done when a variable is to be entered into the model.

• When backward stepwise or direct-entry methods are requested, all variables for each METHOD subcommand are checked for redundancy before that analysis begins.

Compatibility Collapse Hide details

Compatibility

Prior to version 14.0, the order of recoded string values was dependent on the order of values in the data file. For example, when recoding the dependent variable, the first string value encountered was recoded to 0, and the second string value encountered was recoded to 1. Beginning with version 14.0, the procedure recodes string variables so that the order of recoded values is the alphanumeric order of the string values. Thus, the procedure may recode string variables differently than in previous versions.

Limitations Collapse Hide details

Limitations

• The dependent variable must be dichotomous for each split-file group. Specifying a dependent variable with more or less than two nonmissing values per split-file group will result in an error.

Related Topics

LOGISTIC REGRESSION
Examples (LOGISTIC REGRESSION command)
VARIABLES Subcommand (LOGISTIC REGRESSION command)
CATEGORICAL Subcommand (LOGISTIC REGRESSION command)
CONTRAST Subcommand (LOGISTIC REGRESSION command)
METHOD Subcommand (LOGISTIC REGRESSION command)
SELECT Subcommand (LOGISTIC REGRESSION command)
ORIGIN and NOORIGIN Subcommands (LOGISTIC REGRESSION command)
ID Subcommand (LOGISTIC REGRESSION command)
PRINT Subcommand (LOGISTIC REGRESSION command)
CRITERIA Subcommand (LOGISTIC REGRESSION command)
CLASSPLOT Subcommand (LOGISTIC REGRESSION command)
CASEWISE Subcommand (LOGISTIC REGRESSION command)
MISSING Subcommand (LOGISTIC REGRESSION command)
OUTFILE Subcommand (LOGISTIC REGRESSION command)
SAVE Subcommand (LOGISTIC REGRESSION command)
EXTERNAL Subcommand (LOGISTIC REGRESSION command)
References (LOGISTIC REGRESSION command)


Examples (LOGISTIC REGRESSION command)

LOGISTIC REGRESSION VAR=default
  /SELECT validate EQ 1
  /METHOD=FSTEP(LR) age ed employ address income debtinc creddebt othdebt
  /CONTRAST (ed)=Indicator
  /SAVE PRED COOK SRESID
  /CLASSPLOT
  /PRINT=GOODFIT
  /CRITERIA PIN(.05) POUT(.10) ITERATE(20) CUT(.5) .

• The procedure fits a logistic regression model for default.

• The SELECT subcommand specifies that only cases with a value of 1 on the variable validate will be used to build the model. Other cases will be scored and can be used to validate the final model.

• The variables specified on the METHOD subcommand will be entered into the model using forward stepwise regression based on the significance of the likelihood ratio statistic.

• The CONTRAST subcommand specifies that ed is a categorical variable and should be processed using indicator coding.

• The SAVE subcommand requests that the casewise predicted values, Cook's influence statistics, and studentized residuals be saved as new variables to the dataset.

• The CLASSPLOT subcommand requests a classification plot of the observed and predicted values.

• The PRINT subcommand requests the Hosmer-Lemeshow goodness-of-fit statistic.

• All other options are set to their default values.

For discussion of output from this syntax and to place the example in context, see Using Binary Logistic Regression to Assess Credit Risk.

Related Topics

LOGISTIC REGRESSION
Overview (LOGISTIC REGRESSION command)
VARIABLES Subcommand (LOGISTIC REGRESSION command)
CATEGORICAL Subcommand (LOGISTIC REGRESSION command)
CONTRAST Subcommand (LOGISTIC REGRESSION command)
METHOD Subcommand (LOGISTIC REGRESSION command)
SELECT Subcommand (LOGISTIC REGRESSION command)
ORIGIN and NOORIGIN Subcommands (LOGISTIC REGRESSION command)
ID Subcommand (LOGISTIC REGRESSION command)
PRINT Subcommand (LOGISTIC REGRESSION command)
CRITERIA Subcommand (LOGISTIC REGRESSION command)
CLASSPLOT Subcommand (LOGISTIC REGRESSION command)
CASEWISE Subcommand (LOGISTIC REGRESSION command)
MISSING Subcommand (LOGISTIC REGRESSION command)
OUTFILE Subcommand (LOGISTIC REGRESSION command)
SAVE Subcommand (LOGISTIC REGRESSION command)
EXTERNAL Subcommand (LOGISTIC REGRESSION command)
References (LOGISTIC REGRESSION command)


VARIABLES Subcommand (LOGISTIC REGRESSION command)

LOGISTIC REGRESSION (command),LOGISTIC REGRESSION (command),LOGISTIC REGRESSION (command)
VARIABLES subcommand,VARIABLES subcommand,VARIABLES subcommand
VARIABLES (subcommand),VARIABLES (subcommand),VARIABLES (subcommand)
LOGISTIC REGRESSION command,LOGISTIC REGRESSION command,LOGISTIC REGRESSION command

VARIABLES specifies the dependent variable and, optionally, all independent variables in the model. The dependent variable appears first on the list and is separated from the independent variables by the keyword WITH.

• One VARIABLES subcommand is allowed for each Logistic Regression procedure.

LOGISTIC REGRESSION (command),LOGISTIC REGRESSION (command),LOGISTIC REGRESSION (command)
dependent variable,dependent variable,dependent variable

• The dependent variable must be dichotomous—that is, it must have exactly two values other than system-missing and user-missing values for each split-file group.

BY (keyword),BY (keyword),BY (keyword)
LOGISTIC REGRESSION command,LOGISTIC REGRESSION command,LOGISTIC REGRESSION command

• The dependent variable may be a string variable if its two values can be differentiated by their first eight characters.

LOGISTIC REGRESSION (command),LOGISTIC REGRESSION (command),LOGISTIC REGRESSION (command)
interaction terms,interaction terms,interaction terms
WITH (keyword),WITH (keyword),WITH (keyword)
LOGISTIC REGRESSION command,LOGISTIC REGRESSION command,LOGISTIC REGRESSION command

• You can indicate an interaction term on the variable list by using the keyword BY to separate the individual variables.

• If all METHOD subcommands are accompanied by independent variable lists, the keyword WITH and the list of independent variables may be omitted.

• If the keyword WITH is used, all independent variables must be specified. For interaction terms, only the individual variable names that make up the interaction (for example, X1, X2) need to be specified. Specifying the actual interaction term (for example, X1 BY X2) on the VARIABLES subcommand is optional if you specify it on a METHOD subcommand.

Example

LOGISTIC REGRESSION VARIABLES = PROMOTED WITH AGE,JOBTIME,JOBRATE,
    AGE BY JOBTIME.

• PROMOTED is specified as the dependent variable.

• AGE, JOBTIME, JOBRATE, and the interaction AGE by JOBTIME are specified as the independent variables.

• Because no METHOD is specified, all three single independent variables and the interaction term are entered into the model.

• LOGISTIC REGRESSION produces the default output.

Related Topics

LOGISTIC REGRESSION
Overview (LOGISTIC REGRESSION command)
Examples (LOGISTIC REGRESSION command)
CATEGORICAL Subcommand (LOGISTIC REGRESSION command)
CONTRAST Subcommand (LOGISTIC REGRESSION command)
METHOD Subcommand (LOGISTIC REGRESSION command)
SELECT Subcommand (LOGISTIC REGRESSION command)
ORIGIN and NOORIGIN Subcommands (LOGISTIC REGRESSION command)
ID Subcommand (LOGISTIC REGRESSION command)
PRINT Subcommand (LOGISTIC REGRESSION command)
CRITERIA Subcommand (LOGISTIC REGRESSION command)
CLASSPLOT Subcommand (LOGISTIC REGRESSION command)
CASEWISE Subcommand (LOGISTIC REGRESSION command)
MISSING Subcommand (LOGISTIC REGRESSION command)
OUTFILE Subcommand (LOGISTIC REGRESSION command)
SAVE Subcommand (LOGISTIC REGRESSION command)
EXTERNAL Subcommand (LOGISTIC REGRESSION command)
References (LOGISTIC REGRESSION command)


CATEGORICAL Subcommand (LOGISTIC REGRESSION command)

LOGISTIC REGRESSION (command),LOGISTIC REGRESSION (command),LOGISTIC REGRESSION (command)
CATEGORICAL subcommand,CATEGORICAL subcommand,CATEGORICAL subcommand
CATEGORICAL (subcommand),CATEGORICAL (subcommand),CATEGORICAL (subcommand)
LOGISTIC REGRESSION command,LOGISTIC REGRESSION command,LOGISTIC REGRESSION command
LOGISTIC REGRESSION (command),LOGISTIC REGRESSION (command),LOGISTIC REGRESSION (command)
categorical covariates,categorical covariates,categorical covariates

CATEGORICAL identifies independent variables that are nominal or ordinal. Variables that are declared to be categorical are automatically transformed to a set of contrast variables as specified on the CONTRAST subcommand. If a variable that is coded as 0 – 1 is declared as categorical, its coding scheme is given indicator contrasts by default.

• Independent variables that are not specified on CATEGORICAL are assumed to be at least interval level, except for string variables.

• Any variable that is specified on CATEGORICAL is ignored if it does not appear either after WITH on the VARIABLES subcommand or on any METHOD subcommand.

• Variables that are specified on CATEGORICAL are replaced by sets of contrast variables. If the categorical variable has n distinct values, there will be n−1 contrast variables generated. The set of contrast variables associated with a categorical variable is entered or removed from the model as a step.

• If any one of the variables in an interaction term is specified on CATEGORICAL, the interaction term is replaced by contrast variables.

• All string variables are categorical. Only the first eight characters of each value of a string variable are used in distinguishing between values. Thus, if two values of a string variable are identical for the first eight characters, the values are treated as though they were the same.

Example

LOGISTIC REGRESSION VARIABLES = PASS WITH GPA, GRE, MAT, CLASS, TEACHER
 /CATEGORICAL = CLASS,TEACHER.

• The dichotomous dependent variable PASS is regressed on the interval-level independent variables GPA, GRE, and MAT and the categorical variables CLASS and TEACHER.

Related Topics

LOGISTIC REGRESSION
Overview (LOGISTIC REGRESSION command)
Examples (LOGISTIC REGRESSION command)
VARIABLES Subcommand (LOGISTIC REGRESSION command)
CONTRAST Subcommand (LOGISTIC REGRESSION command)
METHOD Subcommand (LOGISTIC REGRESSION command)
SELECT Subcommand (LOGISTIC REGRESSION command)
ORIGIN and NOORIGIN Subcommands (LOGISTIC REGRESSION command)
ID Subcommand (LOGISTIC REGRESSION command)
PRINT Subcommand (LOGISTIC REGRESSION command)
CRITERIA Subcommand (LOGISTIC REGRESSION command)
CLASSPLOT Subcommand (LOGISTIC REGRESSION command)
CASEWISE Subcommand (LOGISTIC REGRESSION command)
MISSING Subcommand (LOGISTIC REGRESSION command)
OUTFILE Subcommand (LOGISTIC REGRESSION command)
SAVE Subcommand (LOGISTIC REGRESSION command)
EXTERNAL Subcommand (LOGISTIC REGRESSION command)
References (LOGISTIC REGRESSION command)


CONTRAST Subcommand (LOGISTIC REGRESSION command)

LOGISTIC REGRESSION (command),LOGISTIC REGRESSION (command),LOGISTIC REGRESSION (command)
CONTRAST subcommand,CONTRAST subcommand,CONTRAST subcommand
CONTRAST (subcommand),CONTRAST (subcommand),CONTRAST (subcommand)
LOGISTIC REGRESSION command,LOGISTIC REGRESSION command,LOGISTIC REGRESSION command
LOGISTIC REGRESSION (command),LOGISTIC REGRESSION (command),LOGISTIC REGRESSION (command)
contrasts,contrasts,contrasts

CONTRAST specifies the type of contrast that is used for categorical independent variables. The interpretation of the regression coefficients for categorical variables depends on the contrasts that are used. The default is INDICATOR. The categorical independent variable is specified in parentheses following CONTRAST. The closing parenthesis is followed by one of the contrast-type keywords.

• If the categorical variable has n values, there will be n−1 rows in the contrast matrix. Each contrast matrix is treated as a set of independent variables in the analysis.

• Only one categorical independent variable can be specified per CONTRAST subcommand, but multiple CONTRAST subcommands can be specified.

The following contrast types are available (Finn, 1974), (Kirk, 1982).

INDICATOR (keyword),INDICATOR (keyword),INDICATOR (keyword)
LOGISTIC REGRESSION command,LOGISTIC REGRESSION command,LOGISTIC REGRESSION command
DEVIATION (keyword),DEVIATION (keyword),DEVIATION (keyword)
LOGISTIC REGRESSION command,LOGISTIC REGRESSION command,LOGISTIC REGRESSION command
SIMPLE (keyword),SIMPLE (keyword),SIMPLE (keyword)
LOGISTIC REGRESSION command,LOGISTIC REGRESSION command,LOGISTIC REGRESSION command
DIFFERENCE (keyword),DIFFERENCE (keyword),DIFFERENCE (keyword)
LOGISTIC REGRESSION command,LOGISTIC REGRESSION command,LOGISTIC REGRESSION command
HELMERT (keyword),HELMERT (keyword),HELMERT (keyword)
LOGISTIC REGRESSION command,LOGISTIC REGRESSION command,LOGISTIC REGRESSION command
POLYNOMIAL (keyword),POLYNOMIAL (keyword),POLYNOMIAL (keyword)
LOGISTIC REGRESSION command,LOGISTIC REGRESSION command,LOGISTIC REGRESSION command
REPEATED (keyword),REPEATED (keyword),REPEATED (keyword)
LOGISTIC REGRESSION command,LOGISTIC REGRESSION command,LOGISTIC REGRESSION command
SPECIAL (keyword),SPECIAL (keyword),SPECIAL (keyword)
LOGISTIC REGRESSION command,LOGISTIC REGRESSION command,LOGISTIC REGRESSION command
INDICATOR(refcat) | Indicator variables. Contrasts indicate the presence or absence of category membership. By default, refcat is the last category (represented in the contrast matrix as a row of zeros). To omit a category (other than the last category), specify the sequence number of the omitted category (which is not necessarily the same as its value) in parentheses after the keyword INDICATOR.
DEVIATION(refcat) | Deviations from the overall effect. The effect for each category of the independent variable (except one category) is compared to the overall effect. Refcat is the category for which parameter estimates are not displayed (they must be calculated from the others). By default, refcat is the last category. To omit a category (other than the last category), specify the sequence number of the omitted category (which is not necessarily the same as its value) in parentheses after the keyword DEVIATION.
SIMPLE(refcat) | Each category of the independent variable (except the last category) is compared to the last category. To use a category other than the last as the omitted reference category, specify its sequence number (which is not necessarily the same as its value) in parentheses following the keyword SIMPLE.
DIFFERENCE | Difference or reverse Helmert contrasts. The effects for each category of the independent variable (except the first category) are compared to the mean effects of the previous categories.
HELMERT | Helmert contrasts. The effects for each category of the independent variable (except the last category) are compared to the mean effects of subsequent categories.
POLYNOMIAL(metric) | Polynomial contrasts. The first degree of freedom contains the linear effect across the categories of the independent variable, the second degree of freedom contains the quadratic effect, and so on. By default, the categories are assumed to be equally spaced; unequal spacing can be specified by entering a metric consisting of one integer for each category of the independent variable in parentheses after the keyword POLYNOMIAL. For example, CONTRAST(STIMULUS)=POLYNOMIAL(1,2,4) indicates that the three levels of STIMULUS are actually in the proportion 1:2:4. The default metric is always (1,2, ..., k), where k categories are involved. Only the relative differences between the terms of the metric matter: (1,2,4) is the same metric as (2,3,5) or (20,30,50) because the difference between the second and third numbers is twice the difference between the first and second numbers in each instance.
REPEATED | Comparison of adjacent categories. Each category of the independent variable (except the last category) is compared to the next category.
SPECIAL(matrix) | A user-defined contrast. After this keyword, a matrix is entered in parentheses with k−1 rows and k columns (where k is the number of categories of the independent variable). The rows of the contrast matrix contain the special contrasts indicating the desired comparisons between categories. If the special contrasts are linear combinations of each other, LOGISTIC REGRESSION reports the linear dependency and stops processing. If k rows are entered, the first row is discarded and only the last k−1 rows are used as the contrast matrix in the analysis.

Example

LOGISTIC REGRESSION VARIABLES = PASS WITH GRE, CLASS
 /CATEGORICAL = CLASS
 /CONTRAST(CLASS)=HELMERT.

• A logistic regression analysis of the dependent variable PASS is performed on the interval independent variable GRE and the categorical independent variable CLASS.

• PASS is a dichotomous variable representing course pass/fail status and CLASS identifies whether a student is in one of three classrooms. A HELMERT contrast is requested.

Example

LOGISTIC REGRESSION VARIABLES = PASS WITH GRE, CLASS
 /CATEGORICAL = CLASS
 /CONTRAST(CLASS)=SPECIAL(2 -1 -1
                          0  1 -1).

• In this example, the contrasts are specified with the keyword SPECIAL.

Related Topics

LOGISTIC REGRESSION
Overview (LOGISTIC REGRESSION command)
Examples (LOGISTIC REGRESSION command)
VARIABLES Subcommand (LOGISTIC REGRESSION command)
CATEGORICAL Subcommand (LOGISTIC REGRESSION command)
METHOD Subcommand (LOGISTIC REGRESSION command)
SELECT Subcommand (LOGISTIC REGRESSION command)
ORIGIN and NOORIGIN Subcommands (LOGISTIC REGRESSION command)
ID Subcommand (LOGISTIC REGRESSION command)
PRINT Subcommand (LOGISTIC REGRESSION command)
CRITERIA Subcommand (LOGISTIC REGRESSION command)
CLASSPLOT Subcommand (LOGISTIC REGRESSION command)
CASEWISE Subcommand (LOGISTIC REGRESSION command)
MISSING Subcommand (LOGISTIC REGRESSION command)
OUTFILE Subcommand (LOGISTIC REGRESSION command)
SAVE Subcommand (LOGISTIC REGRESSION command)
EXTERNAL Subcommand (LOGISTIC REGRESSION command)
References (LOGISTIC REGRESSION command)


METHOD Subcommand (LOGISTIC REGRESSION command)

LOGISTIC REGRESSION (command),LOGISTIC REGRESSION (command),LOGISTIC REGRESSION (command)
METHOD subcommand,METHOD subcommand,METHOD subcommand
METHOD (subcommand),METHOD (subcommand),METHOD (subcommand)
LOGISTIC REGRESSION command,LOGISTIC REGRESSION command,LOGISTIC REGRESSION command

METHOD indicates how the independent variables enter the model. The specification is the METHOD subcommand followed by a single method keyword. The keyword METHOD can be omitted. Optionally, specify the independent variables and interactions for which the method is to be used. Use the keyword BY between variable names of an interaction term.

• If no variable list is specified, or if the keyword ALL is used, all of the independent variables following the keyword WITH on the VARIABLES subcommand are eligible for inclusion in the model.

• If no METHOD subcommand is specified, the default method is ENTER.

• Variables that are specified on CATEGORICAL are replaced by sets of contrast variables. The set of contrast variables associated with a categorical variable is entered or removed from the model as a single step.

• Any number of METHOD subcommands can appear in a Logistic Regression procedure. METHOD subcommands are processed in the order in which they are specified. Each method starts with the results from the previous method. If BSTEP is used, all remaining eligible variables are entered at the first step. All variables are then eligible for entry and removal unless they have been excluded from the METHOD variable list.

• The beginning model for the first METHOD subcommand is either the constant variable (by default or if NOORIGIN is specified) or an empty model (if ORIGIN is specified).

The available METHOD keywords are as follows:

forced-entry method,forced-entry method,forced-entry method
LOGISTIC REGRESSION command,LOGISTIC REGRESSION command,LOGISTIC REGRESSION command
ENTER (keyword),ENTER (keyword),ENTER (keyword)
LOGISTIC REGRESSION command,LOGISTIC REGRESSION command,LOGISTIC REGRESSION command
forward selection,forward selection,forward selection
LOGISTIC REGRESSION command,LOGISTIC REGRESSION command,LOGISTIC REGRESSION command
FSTEP (keyword),FSTEP (keyword),FSTEP (keyword)
LOGISTIC REGRESSION command,LOGISTIC REGRESSION command,LOGISTIC REGRESSION command
backward elimination,backward elimination,backward elimination
LOGISTIC REGRESSION command,LOGISTIC REGRESSION command,LOGISTIC REGRESSION command
BSTEP (keyword),BSTEP (keyword),BSTEP (keyword)
LOGISTIC REGRESSION command,LOGISTIC REGRESSION command,LOGISTIC REGRESSION command
ENTER | Forced entry. All variables are entered in a single step. This setting is the default if the METHOD subcommand is omitted.
FSTEP | Forward stepwise. The variables (or interaction terms) that are specified on FSTEP are tested for entry into the model one by one, based on the significance level of the score statistic. The variable with the smallest significance less than PIN is entered into the model. After each entry, variables that are already in the model are tested for possible removal, based on the significance of the conditional statistic, the Wald statistic, or the likelihood-ratio criterion. The variable with the largest probability greater than the specified POUT value is removed, and the model is reestimated. Variables in the model are then evaluated again for removal. When no more variables satisfy the removal criterion, covariates that are not in the model are evaluated for entry. Model building stops when no more variables meet entry or removal criteria or when the current model is the same as a previous model.
BSTEP | Backward stepwise. As a first step, the variables (or interaction terms) that are specified on BSTEP are entered into the model together and are tested for removal one by one. Stepwise removal and entry then follow the same process as described for FSTEP until no more variables meet entry or removal criteria or when the current model is the same as a previous model.

The statistic that is used in the test for removal can be specified by an additional keyword in parentheses following FSTEP or BSTEP. If FSTEP or BSTEP is specified by itself, the default is COND.

conditional statistic,conditional statistic,conditional statistic
LOGISTIC REGRESSION command,LOGISTIC REGRESSION command,LOGISTIC REGRESSION command
Wald statistic,Wald statistic,Wald statistic
LOGISTIC REGRESSION command,LOGISTIC REGRESSION command,LOGISTIC REGRESSION command
likelihood ratio,likelihood ratio,likelihood ratio
LOGISTIC REGRESSION command,LOGISTIC REGRESSION command,LOGISTIC REGRESSION command
COND | Conditional statistic. This setting is the default if FSTEP or BSTEP is specified by itself.
WALD | Wald statistic. The removal of a variable from the model is based on the significance of the Wald statistic.
LR | Likelihood ratio. The removal of a variable from the model is based on the significance of the change in the log-likelihood. If LR is specified, the model must be reestimated without each of the variables in the model. This process can substantially increase computational time. However, the likelihood-ratio statistic is the best criterion for deciding which variables are to be removed.

Example

LOGISTIC REGRESSION
  VARIABLES = PROMOTED WITH AGE JOBTIME JOBRATE RACE SEX AGENCY
 /CATEGORICAL RACE SEX AGENCY
 /METHOD ENTER AGE  JOBTIME
 /METHOD BSTEP (LR) RACE SEX JOBRATE AGENCY.

• AGE, JOBTIME, JOBRATE, RACE, SEX, and AGENCY are specified as independent variables. RACE, SEX, and AGENCY are specified as categorical independent variables.

• The first METHOD subcommand enters AGE and JOBTIME into the model.

• Variables in the model at the termination of the first METHOD subcommand are included in the model at the beginning of the second METHOD subcommand.

• The second METHOD subcommand adds the variables RACE, SEX, JOBRATE, and AGENCY to the previous model.

• Backward stepwise logistic regression analysis is then done with only the variables on the BSTEP variable list tested for removal by using the LR statistic.

• The procedure continues until all variables from the BSTEP variable list have been removed or the removal of a variable will not result in a decrease in the log-likelihood with a probability larger than POUT.

Related Topics

LOGISTIC REGRESSION
Overview (LOGISTIC REGRESSION command)
Examples (LOGISTIC REGRESSION command)
VARIABLES Subcommand (LOGISTIC REGRESSION command)
CATEGORICAL Subcommand (LOGISTIC REGRESSION command)
CONTRAST Subcommand (LOGISTIC REGRESSION command)
SELECT Subcommand (LOGISTIC REGRESSION command)
ORIGIN and NOORIGIN Subcommands (LOGISTIC REGRESSION command)
ID Subcommand (LOGISTIC REGRESSION command)
PRINT Subcommand (LOGISTIC REGRESSION command)
CRITERIA Subcommand (LOGISTIC REGRESSION command)
CLASSPLOT Subcommand (LOGISTIC REGRESSION command)
CASEWISE Subcommand (LOGISTIC REGRESSION command)
MISSING Subcommand (LOGISTIC REGRESSION command)
OUTFILE Subcommand (LOGISTIC REGRESSION command)
SAVE Subcommand (LOGISTIC REGRESSION command)
EXTERNAL Subcommand (LOGISTIC REGRESSION command)
References (LOGISTIC REGRESSION command)


SELECT Subcommand (LOGISTIC REGRESSION command)

LOGISTIC REGRESSION (command),LOGISTIC REGRESSION (command),LOGISTIC REGRESSION (command)
SELECT subcommand,SELECT subcommand,SELECT subcommand
SELECT (subcommand),SELECT (subcommand),SELECT (subcommand)
LOGISTIC REGRESSION command,LOGISTIC REGRESSION command,LOGISTIC REGRESSION command
LOGISTIC REGRESSION (command),LOGISTIC REGRESSION (command),LOGISTIC REGRESSION (command)
subsets of cases,subsets of cases,subsets of cases

By default, all cases in the active dataset are considered for inclusion in LOGISTIC REGRESSION. Use the optional SELECT subcommand to include a subset of cases in the analysis.

• The specification is either a logical expression or keyword ALL. ALL is the default. Variables that are named on VARIABLES, CATEGORICAL, or METHOD subcommands cannot appear on SELECT.

• In the logical expression on SELECT, the relation can be EQ, NE, LT, LE, GT, or GE. The variable must be numeric, and the value can be any number.

• Only cases for which the logical expression on SELECT is true are included in calculations. All other cases, including those cases with missing values for the variable that is named on SELECT, are unselected.

• Diagnostic statistics and classification statistics are reported for both selected and unselected cases.

• Cases that are deleted from the active dataset with the SELECT IF or SAMPLE command are not included among either the selected or unselected cases.

Example

LOGISTIC REGRESSION VARIABLES=GRADE WITH GPA,TUCE,PSI
 /SELECT SEX EQ 1 /CASEWISE=RESID.

• Only cases with the value 1 for SEX are included in the logistic regression analysis.

• Residual values that are generated by CASEWISE are displayed for both selected and unselected cases.

Related Topics

LOGISTIC REGRESSION
Overview (LOGISTIC REGRESSION command)
Examples (LOGISTIC REGRESSION command)
VARIABLES Subcommand (LOGISTIC REGRESSION command)
CATEGORICAL Subcommand (LOGISTIC REGRESSION command)
CONTRAST Subcommand (LOGISTIC REGRESSION command)
METHOD Subcommand (LOGISTIC REGRESSION command)
ORIGIN and NOORIGIN Subcommands (LOGISTIC REGRESSION command)
ID Subcommand (LOGISTIC REGRESSION command)
PRINT Subcommand (LOGISTIC REGRESSION command)
CRITERIA Subcommand (LOGISTIC REGRESSION command)
CLASSPLOT Subcommand (LOGISTIC REGRESSION command)
CASEWISE Subcommand (LOGISTIC REGRESSION command)
MISSING Subcommand (LOGISTIC REGRESSION command)
OUTFILE Subcommand (LOGISTIC REGRESSION command)
SAVE Subcommand (LOGISTIC REGRESSION command)
EXTERNAL Subcommand (LOGISTIC REGRESSION command)
References (LOGISTIC REGRESSION command)


ORIGIN and NOORIGIN Subcommands (LOGISTIC REGRESSION command)

LOGISTIC REGRESSION (command),LOGISTIC REGRESSION (command),LOGISTIC REGRESSION (command)
ORIGIN subcommand,ORIGIN subcommand,ORIGIN subcommand
ORIGIN (subcommand),ORIGIN (subcommand),ORIGIN (subcommand)
LOGISTIC REGRESSION command,LOGISTIC REGRESSION command,LOGISTIC REGRESSION command
LOGISTIC REGRESSION (command),LOGISTIC REGRESSION (command),LOGISTIC REGRESSION (command)
NOORIGIN subcommand,NOORIGIN subcommand,NOORIGIN subcommand
NOORIGIN (subcommand),NOORIGIN (subcommand),NOORIGIN (subcommand)
LOGISTIC REGRESSION command,LOGISTIC REGRESSION command,LOGISTIC REGRESSION command
LOGISTIC REGRESSION (command),LOGISTIC REGRESSION (command),LOGISTIC REGRESSION (command)
include constant,include constant,include constant

ORIGIN and NOORIGIN control whether the constant is included. NOORIGIN (the default) includes a constant term (intercept) in all equations. ORIGIN suppresses the constant term and requests regression through the origin. (NOCONST can be used as an alias for ORIGIN.)

• The only specification is either ORIGIN or NOORIGIN.

• ORIGIN or NOORIGIN can be specified only once per Logistic Regression procedure, and it affects all METHOD subcommands.

Example

LOGISTIC REGRESSION VARIABLES=PASS WITH GPA,GRE,MAT /ORIGIN.

• ORIGIN suppresses the automatic generation of a constant term.

Related Topics

LOGISTIC REGRESSION
Overview (LOGISTIC REGRESSION command)
Examples (LOGISTIC REGRESSION command)
VARIABLES Subcommand (LOGISTIC REGRESSION command)
CATEGORICAL Subcommand (LOGISTIC REGRESSION command)
CONTRAST Subcommand (LOGISTIC REGRESSION command)
METHOD Subcommand (LOGISTIC REGRESSION command)
SELECT Subcommand (LOGISTIC REGRESSION command)
ID Subcommand (LOGISTIC REGRESSION command)
PRINT Subcommand (LOGISTIC REGRESSION command)
CRITERIA Subcommand (LOGISTIC REGRESSION command)
CLASSPLOT Subcommand (LOGISTIC REGRESSION command)
CASEWISE Subcommand (LOGISTIC REGRESSION command)
MISSING Subcommand (LOGISTIC REGRESSION command)
OUTFILE Subcommand (LOGISTIC REGRESSION command)
SAVE Subcommand (LOGISTIC REGRESSION command)
EXTERNAL Subcommand (LOGISTIC REGRESSION command)
References (LOGISTIC REGRESSION command)


ID Subcommand (LOGISTIC REGRESSION command)

LOGISTIC REGRESSION (command),LOGISTIC REGRESSION (command),LOGISTIC REGRESSION (command)
ID subcommand,ID subcommand,ID subcommand
ID (subcommand),ID (subcommand),ID (subcommand)
LOGISTIC REGRESSION command,LOGISTIC REGRESSION command,LOGISTIC REGRESSION command
LOGISTIC REGRESSION (command),LOGISTIC REGRESSION (command),LOGISTIC REGRESSION (command)
label casewise listings,label casewise listings,label casewise listings

ID specifies a variable whose values or value labels identify the casewise listing. By default, cases are labeled by their case number.

• The only specification is the name of a single variable that exists in the active dataset.

• Only the first eight characters of the variable’s value labels are used to label cases. If the variable has no value labels, the values are used.

• Only the first eight characters of a string variable are used to label cases.

Related Topics

LOGISTIC REGRESSION
Overview (LOGISTIC REGRESSION command)
Examples (LOGISTIC REGRESSION command)
VARIABLES Subcommand (LOGISTIC REGRESSION command)
CATEGORICAL Subcommand (LOGISTIC REGRESSION command)
CONTRAST Subcommand (LOGISTIC REGRESSION command)
METHOD Subcommand (LOGISTIC REGRESSION command)
SELECT Subcommand (LOGISTIC REGRESSION command)
ORIGIN and NOORIGIN Subcommands (LOGISTIC REGRESSION command)
PRINT Subcommand (LOGISTIC REGRESSION command)
CRITERIA Subcommand (LOGISTIC REGRESSION command)
CLASSPLOT Subcommand (LOGISTIC REGRESSION command)
CASEWISE Subcommand (LOGISTIC REGRESSION command)
MISSING Subcommand (LOGISTIC REGRESSION command)
OUTFILE Subcommand (LOGISTIC REGRESSION command)
SAVE Subcommand (LOGISTIC REGRESSION command)
EXTERNAL Subcommand (LOGISTIC REGRESSION command)
References (LOGISTIC REGRESSION command)


PRINT Subcommand (LOGISTIC REGRESSION command)

LOGISTIC REGRESSION (command),LOGISTIC REGRESSION (command),LOGISTIC REGRESSION (command)
PRINT subcommand,PRINT subcommand,PRINT subcommand
PRINT (subcommand),PRINT (subcommand),PRINT (subcommand)
LOGISTIC REGRESSION command,LOGISTIC REGRESSION command,LOGISTIC REGRESSION command

PRINT controls the display of optional output. If PRINT is omitted, DEFAULT output (defined below) is displayed.

• The minimum specification is PRINT followed by a single keyword.

DEFAULT (keyword),DEFAULT (keyword),DEFAULT (keyword)
LOGISTIC REGRESSION command,LOGISTIC REGRESSION command,LOGISTIC REGRESSION command

• If PRINT is used, only the requested output is displayed.

LOGISTIC REGRESSION (command),LOGISTIC REGRESSION (command),LOGISTIC REGRESSION (command)
classification tables,classification tables,classification tables
classification tables,classification tables,classification tables
LOGISTIC REGRESSION command,LOGISTIC REGRESSION command,LOGISTIC REGRESSION command
SUMMARY (keyword),SUMMARY (keyword),SUMMARY (keyword)
LOGISTIC REGRESSION command,LOGISTIC REGRESSION command,LOGISTIC REGRESSION command
LOGISTIC REGRESSION (command),LOGISTIC REGRESSION (command),LOGISTIC REGRESSION (command)
correlation matrix,correlation matrix,correlation matrix
correlation matrix,correlation matrix,correlation matrix
LOGISTIC REGRESSION command,LOGISTIC REGRESSION command,LOGISTIC REGRESSION command
CORR (keyword),CORR (keyword),CORR (keyword)
LOGISTIC REGRESSION command,LOGISTIC REGRESSION command,LOGISTIC REGRESSION command
LOGISTIC REGRESSION (command),LOGISTIC REGRESSION (command),LOGISTIC REGRESSION (command)
iteration history,iteration history,iteration history
ITER (keyword),ITER (keyword),ITER (keyword)
LOGISTIC REGRESSION command,LOGISTIC REGRESSION command,LOGISTIC REGRESSION command
LOGISTIC REGRESSION (command),LOGISTIC REGRESSION (command),LOGISTIC REGRESSION (command)
Hosmer-Lemeshow goodness-of-fit statistic,Hosmer-Lemeshow goodness-of-fit statistic,Hosmer-Lemeshow goodness-of-fit statistic
Hosmer-Lemeshow goodness-of-fit statistic,Hosmer-Lemeshow goodness-of-fit statistic,Hosmer-Lemeshow goodness-of-fit statistic
LOGISTIC REGRESSION command,LOGISTIC REGRESSION command,LOGISTIC REGRESSION command
GOODFIT (keyword),GOODFIT (keyword),GOODFIT (keyword)
LOGISTIC REGRESSION command,LOGISTIC REGRESSION command,LOGISTIC REGRESSION command
CI (keyword),CI (keyword),CI (keyword)
LOGISTIC REGRESSION command,LOGISTIC REGRESSION command,LOGISTIC REGRESSION command
ALL (keyword),ALL (keyword),ALL (keyword)
LOGISTIC REGRESSION command,LOGISTIC REGRESSION command,LOGISTIC REGRESSION command
DEFAULT | Goodness-of-fit tests for the model, classification tables, and statistics for the variables in and not in the equation at each step. Tables and statistics are displayed for each split file and METHOD subcommand.
SUMMARY | Summary information. This output is the same output as DEFAULT, except that the output for each step is not displayed.
CORR | Correlation matrix of parameter estimates for the variables in the model.
ITER(value) | Iterations at which parameter estimates are to be displayed. The value in parentheses controls the spacing of iteration reports. If the value is n, the parameter estimates are displayed for every nth iteration, starting at 0. If a value is not supplied, intermediate estimates are displayed at each iteration.
GOODFIT | Hosmer-Lemeshow goodness-of-fit statistic (Hosmer and Lemeshow, 2000).
CI(level) | Confidence interval for exp(B). The value in parentheses must be an integer between 1 and 99.
ALL | All available output.

Example

LOGISTIC REGRESSION VARIABLES=PASS WITH GPA,GRE,MAT
 /METHOD FSTEP
 /PRINT CORR SUMMARY ITER(2).

• A forward stepwise logistic regression analysis of PASS on GPA, GRE, and MAT is specified.

• The PRINT subcommand requests the display of the correlation matrix of parameter estimates for the variables in the model (CORR), classification tables and statistics for the variables in and not in the equation for the final model (SUMMARY), and parameter estimates at every second iteration (ITER(2)).

Related Topics

LOGISTIC REGRESSION
Overview (LOGISTIC REGRESSION command)
Examples (LOGISTIC REGRESSION command)
VARIABLES Subcommand (LOGISTIC REGRESSION command)
CATEGORICAL Subcommand (LOGISTIC REGRESSION command)
CONTRAST Subcommand (LOGISTIC REGRESSION command)
METHOD Subcommand (LOGISTIC REGRESSION command)
SELECT Subcommand (LOGISTIC REGRESSION command)
ORIGIN and NOORIGIN Subcommands (LOGISTIC REGRESSION command)
ID Subcommand (LOGISTIC REGRESSION command)
CRITERIA Subcommand (LOGISTIC REGRESSION command)
CLASSPLOT Subcommand (LOGISTIC REGRESSION command)
CASEWISE Subcommand (LOGISTIC REGRESSION command)
MISSING Subcommand (LOGISTIC REGRESSION command)
OUTFILE Subcommand (LOGISTIC REGRESSION command)
SAVE Subcommand (LOGISTIC REGRESSION command)
EXTERNAL Subcommand (LOGISTIC REGRESSION command)
References (LOGISTIC REGRESSION command)


CRITERIA Subcommand (LOGISTIC REGRESSION command)

LOGISTIC REGRESSION (command),LOGISTIC REGRESSION (command),LOGISTIC REGRESSION (command)
CRITERIA subcommand,CRITERIA subcommand,CRITERIA subcommand
CRITERIA (subcommand),CRITERIA (subcommand),CRITERIA (subcommand)
LOGISTIC REGRESSION command,LOGISTIC REGRESSION command,LOGISTIC REGRESSION command
BCON (keyword),BCON (keyword),BCON (keyword)
LOGISTIC REGRESSION command,LOGISTIC REGRESSION command,LOGISTIC REGRESSION command

CRITERIA controls the statistical criteria that are used in building the logistic regression models. The way in which these criteria are used depends on the method that is specified on the METHOD subcommand. The default criteria are noted in the description of each keyword below. Iterations will stop if the criterion for BCON, LCON, or ITERATE is satisfied.

ITERATE (keyword),ITERATE (keyword),ITERATE (keyword)
LOGISTIC REGRESSION command,LOGISTIC REGRESSION command,LOGISTIC REGRESSION command
LCON (keyword),LCON (keyword),LCON (keyword)
LOGISTIC REGRESSION command,LOGISTIC REGRESSION command,LOGISTIC REGRESSION command
PIN (keyword),PIN (keyword),PIN (keyword)
LOGISTIC REGRESSION command,LOGISTIC REGRESSION command,LOGISTIC REGRESSION command
POUT (keyword),POUT (keyword),POUT (keyword)
LOGISTIC REGRESSION command,LOGISTIC REGRESSION command,LOGISTIC REGRESSION command
EPS (keyword),EPS (keyword),EPS (keyword)
LOGISTIC REGRESSION command,LOGISTIC REGRESSION command,LOGISTIC REGRESSION command
CUT (keyword),CUT (keyword),CUT (keyword)
LOGISTIC REGRESSION command,LOGISTIC REGRESSION command,LOGISTIC REGRESSION command
BCON(value) | Change in parameter estimates to terminate iteration. Iteration terminates when the parameters change by less than the specified value. The default is 0.001. To eliminate this criterion, specify a value of 0.
ITERATE | Maximum number of iterations. The default is 20.
LCON(value) | Percentage change in the log-likelihood ratio for termination of iterations. If the log-likelihood decreases by less than the specified value, iteration terminates. The default is 0, which is equivalent to not using this criterion.
PIN(value) | Probability of score statistic for variable entry. The default is 0.05. The larger the specified probability, the easier it is for a variable to enter the model.
POUT(value) | Probability of conditional, Wald, or LR statistic to remove a variable. The default is 0.1. The larger the specified probability, the easier it is for a variable to remain in the model.
EPS(value) | Epsilon value used for redundancy checking. The specified value must be less than or equal to 0.05 and greater than or equal to 10-12. The default is 10-8. Larger values make it harder for variables to pass the redundancy check—that is, they are more likely to be removed from the analysis.
CUT(value) | Cutoff value for classification. A case is assigned to a group when the predicted event probability is greater than or equal to the cutoff value. The cutoff value affects the value of the dichotomous derived variable in the classification table, the predicted group (PGROUP on CASEWISE), and the classification plot (CLASSPLOT). The default cutoff value is 0.5. You can specify a value between 0 and 1 (0 < value < 1).

Example

LOGISTIC REGRESSION VARIABLES = PROMOTED WITH AGE JOBTIME RACE
 /CATEGORICAL RACE
 /METHOD BSTEP
 /CRITERIA BCON(0.01) PIN(0.01) POUT(0.05).

• A backward stepwise logistic regression analysis is performed for the dependent variable PROMOTED and the independent variables AGE, JOBTIME, and RACE.

• CRITERIA alters four of the statistical criteria that control the building of a model.

• BCON specifies that if the change in the absolute value of all of the parameter estimates is less than 0.01, the iterative estimation process should stop. Larger values lower the number of required iterations. Notice that the ITER and LCON criteria remain unchanged and that if either of them is met before BCON, iterations will terminate. (LCON can be set to 0 if only BCON and ITER are to be used.)

• POUT requires that the probability of the statistic that is used to test whether a variable should remain in the model be smaller than 0.05. This requirement is more stringent than the default value of 0.1.

• PIN requires that the probability of the score statistic that is used to test whether a variable should be included be smaller than 0.01. This requirement makes it more difficult for variables to be included in the model than the default value of 0.05.

Related Topics

LOGISTIC REGRESSION
Overview (LOGISTIC REGRESSION command)
Examples (LOGISTIC REGRESSION command)
VARIABLES Subcommand (LOGISTIC REGRESSION command)
CATEGORICAL Subcommand (LOGISTIC REGRESSION command)
CONTRAST Subcommand (LOGISTIC REGRESSION command)
METHOD Subcommand (LOGISTIC REGRESSION command)
SELECT Subcommand (LOGISTIC REGRESSION command)
ORIGIN and NOORIGIN Subcommands (LOGISTIC REGRESSION command)
ID Subcommand (LOGISTIC REGRESSION command)
PRINT Subcommand (LOGISTIC REGRESSION command)
CLASSPLOT Subcommand (LOGISTIC REGRESSION command)
CASEWISE Subcommand (LOGISTIC REGRESSION command)
MISSING Subcommand (LOGISTIC REGRESSION command)
OUTFILE Subcommand (LOGISTIC REGRESSION command)
SAVE Subcommand (LOGISTIC REGRESSION command)
EXTERNAL Subcommand (LOGISTIC REGRESSION command)
References (LOGISTIC REGRESSION command)


CLASSPLOT Subcommand (LOGISTIC REGRESSION command)

LOGISTIC REGRESSION (command),LOGISTIC REGRESSION (command),LOGISTIC REGRESSION (command)
CLASSPLOT subcommand,CLASSPLOT subcommand,CLASSPLOT subcommand
CLASSPLOT (subcommand),CLASSPLOT (subcommand),CLASSPLOT (subcommand)
LOGISTIC REGRESSION command,LOGISTIC REGRESSION command,LOGISTIC REGRESSION command
classification plots,classification plots,classification plots
LOGISTIC REGRESSION command,LOGISTIC REGRESSION command,LOGISTIC REGRESSION command
LOGISTIC REGRESSION (command),LOGISTIC REGRESSION (command),LOGISTIC REGRESSION (command)
classification plots,classification plots,classification plots

CLASSPLOT generates a classification plot of the actual and predicted values of the dichotomous dependent variable at each step.

• Keyword CLASSPLOT is the only specification.

• If CLASSPLOT is not specified, plots are not generated.

Example

LOGISTIC REGRESSION VARIABLES = PROMOTED WITH JOBTIME RACE
 /CATEGORICAL RACE
 /CLASSPLOT.

• A logistic regression model is constructed for the dichotomous dependent variable PROMOTED and the independent variables JOBTIME and RACE.

• CLASSPLOT produces a classification plot for the dependent variable PROMOTED. The vertical axis of the plot is the frequency of the variable PROMOTED. The horizontal axis is the predicted probability of membership in the second of the two levels of PROMOTED.

Related Topics

LOGISTIC REGRESSION
Overview (LOGISTIC REGRESSION command)
Examples (LOGISTIC REGRESSION command)
VARIABLES Subcommand (LOGISTIC REGRESSION command)
CATEGORICAL Subcommand (LOGISTIC REGRESSION command)
CONTRAST Subcommand (LOGISTIC REGRESSION command)
METHOD Subcommand (LOGISTIC REGRESSION command)
SELECT Subcommand (LOGISTIC REGRESSION command)
ORIGIN and NOORIGIN Subcommands (LOGISTIC REGRESSION command)
ID Subcommand (LOGISTIC REGRESSION command)
PRINT Subcommand (LOGISTIC REGRESSION command)
CRITERIA Subcommand (LOGISTIC REGRESSION command)
CASEWISE Subcommand (LOGISTIC REGRESSION command)
MISSING Subcommand (LOGISTIC REGRESSION command)
OUTFILE Subcommand (LOGISTIC REGRESSION command)
SAVE Subcommand (LOGISTIC REGRESSION command)
EXTERNAL Subcommand (LOGISTIC REGRESSION command)
References (LOGISTIC REGRESSION command)


CASEWISE Subcommand (LOGISTIC REGRESSION command)

LOGISTIC REGRESSION (command),LOGISTIC REGRESSION (command),LOGISTIC REGRESSION (command)
CASEWISE subcommand,CASEWISE subcommand,CASEWISE subcommand
CASEWISE (subcommand),CASEWISE (subcommand),CASEWISE (subcommand)
LOGISTIC REGRESSION command,LOGISTIC REGRESSION command,LOGISTIC REGRESSION command
LOGISTIC REGRESSION (command),LOGISTIC REGRESSION (command),LOGISTIC REGRESSION (command)
casewise listings,casewise listings,casewise listings

CASEWISE produces a casewise listing of the values of the temporary variables that are created by LOGISTIC REGRESSION.

PRED (keyword),PRED (keyword),PRED (keyword)
LOGISTIC REGRESSION command,LOGISTIC REGRESSION command,LOGISTIC REGRESSION command

The following keywords are available for specifying temporary variables (see Fox, 1984). When CASEWISE is specified by itself, the default is to list PRED, PGROUP, RESID, and ZRESID. If a list of variable names is given, only those named temporary variables are displayed.

predicted probabilities,predicted probabilities,predicted probabilities
LOGISTIC REGRESSION command,LOGISTIC REGRESSION command,LOGISTIC REGRESSION command
predicted group,predicted group,predicted group
LOGISTIC REGRESSION command,LOGISTIC REGRESSION command,LOGISTIC REGRESSION command
PGROUP (keyword),PGROUP (keyword),PGROUP (keyword)
LOGISTIC REGRESSION command,LOGISTIC REGRESSION command,LOGISTIC REGRESSION command
residuals,residuals,residuals
LOGISTIC REGRESSION command,LOGISTIC REGRESSION command,LOGISTIC REGRESSION command
RESID (keyword),RESID (keyword),RESID (keyword)
LOGISTIC REGRESSION command,LOGISTIC REGRESSION command,LOGISTIC REGRESSION command
DEV (keyword),DEV (keyword),DEV (keyword)
LOGISTIC REGRESSION command,LOGISTIC REGRESSION command,LOGISTIC REGRESSION command
logit residuals,logit residuals,logit residuals
LOGISTIC REGRESSION command,LOGISTIC REGRESSION command,LOGISTIC REGRESSION command
LRESID (keyword),LRESID (keyword),LRESID (keyword)
LOGISTIC REGRESSION command,LOGISTIC REGRESSION command,LOGISTIC REGRESSION command
SRESID (keyword),SRESID (keyword),SRESID (keyword)
LOGISTIC REGRESSION command,LOGISTIC REGRESSION command,LOGISTIC REGRESSION command
Studentized residuals,Studentized residuals,Studentized residuals
LOGISTIC REGRESSION command,LOGISTIC REGRESSION command,LOGISTIC REGRESSION command
ZRESID (keyword),ZRESID (keyword),ZRESID (keyword)
LOGISTIC REGRESSION command,LOGISTIC REGRESSION command,LOGISTIC REGRESSION command
leverage,leverage,leverage
LOGISTIC REGRESSION command,LOGISTIC REGRESSION command,LOGISTIC REGRESSION command
LEVER (keyword),LEVER (keyword),LEVER (keyword)
LOGISTIC REGRESSION command,LOGISTIC REGRESSION command,LOGISTIC REGRESSION command
Cook's D,Cook's D,Cook's D
LOGISTIC REGRESSION command,LOGISTIC REGRESSION command,LOGISTIC REGRESSION command
COOK (keyword),COOK (keyword),COOK (keyword)
LOGISTIC REGRESSION command,LOGISTIC REGRESSION command,LOGISTIC REGRESSION command
DfBeta,DfBeta,DfBeta
LOGISTIC REGRESSION command,LOGISTIC REGRESSION command,LOGISTIC REGRESSION command
DFBETA (keyword),DFBETA (keyword),DFBETA (keyword)
LOGISTIC REGRESSION command,LOGISTIC REGRESSION command,LOGISTIC REGRESSION command
PRED | Predicted probability. For each case, the predicted probability of having the second of the two values of the dichotomous dependent variable.
PGROUP | Predicted group. The group to which a case is assigned based on the predicted probability.
RESID | Difference between observed and predicted probabilities.
DEV | Deviance values. For each case, a log-likelihood-ratio statistic, which measures how well the model fits the case, is computed.
LRESID | Logit residual. Residual divided by the product of PRED and 1–PRED.
SRESID | Studentized residual.
ZRESID | Normalized residual. Residual divided by the square root of the product of PRED and 1–PRED.
LEVER | Leverage value. A measure of the relative influence of each observation on the model’s fit.
COOK | Analog of Cook’s influence statistic.
DFBETA | Difference in beta. The difference in the estimated coefficients for each independent variable if the case is omitted.
OUTLIERS (keyword),OUTLIERS (keyword),OUTLIERS (keyword)
LOGISTIC REGRESSION command,LOGISTIC REGRESSION command,LOGISTIC REGRESSION command

The following keyword is available for restricting the cases to be displayed, based on the absolute value of SRESID:

OUTLIER (value) Cases with absolute values of SRESID greater than or equal to the specified value are displayed. If OUTLIER is specified with no value, the default is 2.

Example

LOGISTIC REGRESSION VARIABLES = PROMOTED WITH JOBTIME SEX RACE
 /CATEGORICAL SEX RACE
 /METHOD ENTER
 /CASEWISE SRESID LEVER DFBETA.

• CASEWISE produces a casewise listing of the temporary variables SRESID, LEVER, and DFBETA.

• There will be one DFBETA value for each parameter in the model. The continuous variable JOBTIME, the two-level categorical variable SEX, and the constant each require one parameter, while the four-level categorical variable RACE requires three parameters. Thus, six values of DFBETA will be produced for each case.

Related Topics

LOGISTIC REGRESSION
Overview (LOGISTIC REGRESSION command)
Examples (LOGISTIC REGRESSION command)
VARIABLES Subcommand (LOGISTIC REGRESSION command)
CATEGORICAL Subcommand (LOGISTIC REGRESSION command)
CONTRAST Subcommand (LOGISTIC REGRESSION command)
METHOD Subcommand (LOGISTIC REGRESSION command)
SELECT Subcommand (LOGISTIC REGRESSION command)
ORIGIN and NOORIGIN Subcommands (LOGISTIC REGRESSION command)
ID Subcommand (LOGISTIC REGRESSION command)
PRINT Subcommand (LOGISTIC REGRESSION command)
CRITERIA Subcommand (LOGISTIC REGRESSION command)
CLASSPLOT Subcommand (LOGISTIC REGRESSION command)
MISSING Subcommand (LOGISTIC REGRESSION command)
OUTFILE Subcommand (LOGISTIC REGRESSION command)
SAVE Subcommand (LOGISTIC REGRESSION command)
EXTERNAL Subcommand (LOGISTIC REGRESSION command)
References (LOGISTIC REGRESSION command)


MISSING Subcommand (LOGISTIC REGRESSION command)

LOGISTIC REGRESSION (command),LOGISTIC REGRESSION (command),LOGISTIC REGRESSION (command)
MISSING subcommand,MISSING subcommand,MISSING subcommand
MISSING (subcommand),MISSING (subcommand),MISSING (subcommand)
LOGISTIC REGRESSION command,LOGISTIC REGRESSION command,LOGISTIC REGRESSION command
LOGISTIC REGRESSION (command),LOGISTIC REGRESSION (command),LOGISTIC REGRESSION (command)
missing values,missing values,missing values
missing values,missing values,missing values
LOGISTIC REGRESSION command,LOGISTIC REGRESSION command,LOGISTIC REGRESSION command

LOGISTIC REGRESSION excludes all cases with missing values on any of the independent variables. For a case with a missing value on the dependent variable, predicted values are calculated if it has nonmissing values on all independent variables. The MISSING subcommand controls the processing of user-missing values. If the subcommand is not specified, the default is EXCLUDE.

EXCLUDE | Delete cases with user-missing values as well as system-missing values. This setting is the default.
INCLUDE | Include user-missing values in the analysis.

Related Topics

LOGISTIC REGRESSION
Overview (LOGISTIC REGRESSION command)
Examples (LOGISTIC REGRESSION command)
VARIABLES Subcommand (LOGISTIC REGRESSION command)
CATEGORICAL Subcommand (LOGISTIC REGRESSION command)
CONTRAST Subcommand (LOGISTIC REGRESSION command)
METHOD Subcommand (LOGISTIC REGRESSION command)
SELECT Subcommand (LOGISTIC REGRESSION command)
ORIGIN and NOORIGIN Subcommands (LOGISTIC REGRESSION command)
ID Subcommand (LOGISTIC REGRESSION command)
PRINT Subcommand (LOGISTIC REGRESSION command)
CRITERIA Subcommand (LOGISTIC REGRESSION command)
CLASSPLOT Subcommand (LOGISTIC REGRESSION command)
CASEWISE Subcommand (LOGISTIC REGRESSION command)
OUTFILE Subcommand (LOGISTIC REGRESSION command)
SAVE Subcommand (LOGISTIC REGRESSION command)
EXTERNAL Subcommand (LOGISTIC REGRESSION command)
References (LOGISTIC REGRESSION command)


OUTFILE Subcommand (LOGISTIC REGRESSION command)

OUTFILE (subcommand),OUTFILE (subcommand),OUTFILE (subcommand)
LOGISTIC REGRESSION command,LOGISTIC REGRESSION command,LOGISTIC REGRESSION command
LOGISTIC REGRESSION (command),LOGISTIC REGRESSION (command),LOGISTIC REGRESSION (command)
OUTFILE subcommand,OUTFILE subcommand,OUTFILE subcommand

The OUTFILE subcommand allows you to specify files to which output is written.

• Only one OUTFILE subcommand is allowed. If you specify more than one subcommand, only the last subcommand is executed.

• You must specify at least one keyword and a valid filename in parentheses. There is no default.

• MODEL cannot be used if split-file processing is on (SPLIT FILE command) or if more than one dependent variable is specified (DEPENDENT subcommand).

MODEL (keyword),MODEL (keyword),MODEL (keyword)
LOGISTIC REGRESSION command,LOGISTIC REGRESSION command,LOGISTIC REGRESSION command
PARAMETER (keyword),PARAMETER (keyword),PARAMETER (keyword)
LOGISTIC REGRESSION command,LOGISTIC REGRESSION command,LOGISTIC REGRESSION command
MODEL(filename) | Write parameter estimates and their covariances to an XML file. Specify the filename in full. LOGISTIC REGRESSION does not supply an extension. SmartScore and PASW Statistics Server (a separate product) can use this model file to apply the model information to other data files for scoring purposes.
PARAMETER(filename) | Write parameter estimates only to an XML file. Specify the filename in full. LOGISTIC REGRESSION does not supply an extension. SmartScore and PASW Statistics Server (a separate product) can use this model file to apply the model information to other data files for scoring purposes.

Related Topics

LOGISTIC REGRESSION
Overview (LOGISTIC REGRESSION command)
Examples (LOGISTIC REGRESSION command)
VARIABLES Subcommand (LOGISTIC REGRESSION command)
CATEGORICAL Subcommand (LOGISTIC REGRESSION command)
CONTRAST Subcommand (LOGISTIC REGRESSION command)
METHOD Subcommand (LOGISTIC REGRESSION command)
SELECT Subcommand (LOGISTIC REGRESSION command)
ORIGIN and NOORIGIN Subcommands (LOGISTIC REGRESSION command)
ID Subcommand (LOGISTIC REGRESSION command)
PRINT Subcommand (LOGISTIC REGRESSION command)
CRITERIA Subcommand (LOGISTIC REGRESSION command)
CLASSPLOT Subcommand (LOGISTIC REGRESSION command)
CASEWISE Subcommand (LOGISTIC REGRESSION command)
MISSING Subcommand (LOGISTIC REGRESSION command)
SAVE Subcommand (LOGISTIC REGRESSION command)
EXTERNAL Subcommand (LOGISTIC REGRESSION command)
References (LOGISTIC REGRESSION command)


SAVE Subcommand (LOGISTIC REGRESSION command)

LOGISTIC REGRESSION (command),LOGISTIC REGRESSION (command),LOGISTIC REGRESSION (command)
SAVE subcommand,SAVE subcommand,SAVE subcommand
SAVE (subcommand),SAVE (subcommand),SAVE (subcommand)
LOGISTIC REGRESSION command,LOGISTIC REGRESSION command,LOGISTIC REGRESSION command
LOGISTIC REGRESSION (command),LOGISTIC REGRESSION (command),LOGISTIC REGRESSION (command)
saving new variables,saving new variables,saving new variables

SAVE saves the temporary variables that are created by LOGISTIC REGRESSION. To specify variable names for the new variables, assign the new names in parentheses following each temporary variable name. If new variable names are not specified, LOGISTIC REGRESSION generates default names.

• Assigned variable names must be unique in the active dataset. Scratch or system variable names (that is, names that begin with # or $) cannot be used.

• A temporary variable can be saved only once on the same SAVE subcommand.

Example

LOGISTIC REGRESSION VARIABLES = PROMOTED WITH JOBTIME AGE
 /SAVE PRED (PREDPRO) DFBETA (DF).

• A logistic regression analysis of PROMOTED on the independent variables JOBTIME and AGE is performed.

• SAVE adds four variables to the active dataset: one variable named PREDPRO, containing the predicted value from the specified model for each case, and three variables named DF0, DF1, and DF2, containing, respectively, the DFBETA values for each case of the constant, the independent variable JOBTIME, and the independent variable AGE.

Related Topics

LOGISTIC REGRESSION
Overview (LOGISTIC REGRESSION command)
Examples (LOGISTIC REGRESSION command)
VARIABLES Subcommand (LOGISTIC REGRESSION command)
CATEGORICAL Subcommand (LOGISTIC REGRESSION command)
CONTRAST Subcommand (LOGISTIC REGRESSION command)
METHOD Subcommand (LOGISTIC REGRESSION command)
SELECT Subcommand (LOGISTIC REGRESSION command)
ORIGIN and NOORIGIN Subcommands (LOGISTIC REGRESSION command)
ID Subcommand (LOGISTIC REGRESSION command)
PRINT Subcommand (LOGISTIC REGRESSION command)
CRITERIA Subcommand (LOGISTIC REGRESSION command)
CLASSPLOT Subcommand (LOGISTIC REGRESSION command)
CASEWISE Subcommand (LOGISTIC REGRESSION command)
MISSING Subcommand (LOGISTIC REGRESSION command)
OUTFILE Subcommand (LOGISTIC REGRESSION command)
EXTERNAL Subcommand (LOGISTIC REGRESSION command)
References (LOGISTIC REGRESSION command)


EXTERNAL Subcommand (LOGISTIC REGRESSION command)

LOGISTIC REGRESSION (command),LOGISTIC REGRESSION (command),LOGISTIC REGRESSION (command)
EXTERNAL subcommand,EXTERNAL subcommand,EXTERNAL subcommand
EXTERNAL (subcommand),EXTERNAL (subcommand),EXTERNAL (subcommand)
LOGISTIC REGRESSION command,LOGISTIC REGRESSION command,LOGISTIC REGRESSION command

EXTERNAL indicates that the data for each split-file group should be held in an external scratch file during processing. This process can help conserve memory resources when running complex analyses or analyses with large data sets.

• The keyword EXTERNAL is the only specification.

• Specifying EXTERNAL may result in slightly longer processing time.

• If EXTERNAL is not specified, all data are held internally, and no scratch file is written.

Related Topics

LOGISTIC REGRESSION
Overview (LOGISTIC REGRESSION command)
Examples (LOGISTIC REGRESSION command)
VARIABLES Subcommand (LOGISTIC REGRESSION command)
CATEGORICAL Subcommand (LOGISTIC REGRESSION command)
CONTRAST Subcommand (LOGISTIC REGRESSION command)
METHOD Subcommand (LOGISTIC REGRESSION command)
SELECT Subcommand (LOGISTIC REGRESSION command)
ORIGIN and NOORIGIN Subcommands (LOGISTIC REGRESSION command)
ID Subcommand (LOGISTIC REGRESSION command)
PRINT Subcommand (LOGISTIC REGRESSION command)
CRITERIA Subcommand (LOGISTIC REGRESSION command)
CLASSPLOT Subcommand (LOGISTIC REGRESSION command)
CASEWISE Subcommand (LOGISTIC REGRESSION command)
MISSING Subcommand (LOGISTIC REGRESSION command)
OUTFILE Subcommand (LOGISTIC REGRESSION command)
SAVE Subcommand (LOGISTIC REGRESSION command)
References (LOGISTIC REGRESSION command)


References (LOGISTIC REGRESSION command)

Agresti, A. 2002. Categorical Data Analysis, 2nd ed. New York: John Wiley and Sons.

Aldrich, J. H., and F. D. Nelson. 1994. Linear Probability, Logit and Probit Models. Thousand Oaks, Calif.: Sage Publications, Inc..

Finn, J. D. 1974. A general model for multivariate analysis. New York: Holt, Rinehart and Winston.

Fox, J. 1984. Linear statistical models and related methods: With applications to social research. New York: John Wiley and Sons.

Hosmer, D. W., and S. Lemeshow. 2000. Applied Logistic Regression, 2nd ed. New York: John Wiley and Sons.

Kirk, R. E. 1982. Experimental design, 2nd ed. Monterey, California: Brooks/Cole.

McCullagh, P., and J. A. Nelder. 1989. Generalized Linear Models, 2nd ed. London: Chapman & Hall.

Related Topics

LOGISTIC REGRESSION
Overview (LOGISTIC REGRESSION command)
Examples (LOGISTIC REGRESSION command)
VARIABLES Subcommand (LOGISTIC REGRESSION command)
CATEGORICAL Subcommand (LOGISTIC REGRESSION command)
CONTRAST Subcommand (LOGISTIC REGRESSION command)
METHOD Subcommand (LOGISTIC REGRESSION command)
SELECT Subcommand (LOGISTIC REGRESSION command)
ORIGIN and NOORIGIN Subcommands (LOGISTIC REGRESSION command)
ID Subcommand (LOGISTIC REGRESSION command)
PRINT Subcommand (LOGISTIC REGRESSION command)
CRITERIA Subcommand (LOGISTIC REGRESSION command)
CLASSPLOT Subcommand (LOGISTIC REGRESSION command)
CASEWISE Subcommand (LOGISTIC REGRESSION command)
MISSING Subcommand (LOGISTIC REGRESSION command)
OUTFILE Subcommand (LOGISTIC REGRESSION command)
SAVE Subcommand (LOGISTIC REGRESSION command)
EXTERNAL Subcommand (LOGISTIC REGRESSION command)


LOGLINEAR

LOGLINEAR (command),LOGLINEAR (command),LOGLINEAR (command)
LOGLINEAR (command),LOGLINEAR (command),LOGLINEAR (command)
syntax chart,syntax chart,syntax chart

LOGLINEAR is available in the Advanced Statistics option.

The syntax for LOGLINEAR is available only in a syntax window, not from the dialog box interface. See GENLOG for information on the LOGLINEAR command available from the dialog box interface.

LOGLINEAR varlist(min,max)...[BY] varlist(min,max)

          [WITH covariate varlist]

 [/CWEIGHT={varname }] [/CWEIGHT=(matrix)...]
           {(matrix)}

 [/GRESID={varlist }]  [/GRESID=(matrix)...]
          {(matrix)}

 [/CONTRAST (varname)={DEVIATION [(refcat)]      } [/CONTRAST...]]
                      {DIFFERENCE                }
                      {HELMERT                   }
                      {SIMPLE [(refcat)]         }
                      {REPEATED                  }
                      {POLYNOMIAL [({1,2,3,...})]}
                      {             {metric   }  }
                      {[BASIS] SPECIAL(matrix)   }

 [/CRITERIA=[CONVERGE({0.001**})] [ITERATE({20**})] [DELTA({0.5**})]
                      {n      }            {n   }          {n    }
            [DEFAULT]]

 [/PRINT={[FREQ**][RESID**][DESIGN][ESTIM][COR]}]
         {DEFAULT                              }
         {ALL                                  }
         {NONE                                 }

 [/PLOT={NONE**  }]
        {DEFAULT }
        {RESID   }
        {NORMPROB}

 [/MISSING=[{EXCLUDE**}]]
            {INCLUDE  }

 [/DESIGN=effect[(n)] effect[(n)]... effect BY effect...] [/DESIGN...]

**Default if the subcommand or keyword is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See LOGLINEAR Algorithms for computational details for this procedure.

Example

LOGLINEAR JOBSAT (1,2) ZODIAC (1,12) /DESIGN=JOBSAT.

Related Topics

Overview (LOGLINEAR command)
Examples (LOGLINEAR command)
Variable List (LOGLINEAR command)
CWEIGHT Subcommand (LOGLINEAR command)
GRESID Subcommand (LOGLINEAR command)
CONTRAST Subcommand (LOGLINEAR command)
CRITERIA Subcommand (LOGLINEAR command)
PRINT Subcommand (LOGLINEAR command)
PLOT Subcommand (LOGLINEAR command)
MISSING Subcommand (LOGLINEAR command)
DESIGN Subcommand (LOGLINEAR command)


Overview (LOGLINEAR command)

GENLOG (command),GENLOG (command),GENLOG (command)
compared to LOGLINEAR,compared to LOGLINEAR,compared to LOGLINEAR
LOGLINEAR (command),LOGLINEAR (command),LOGLINEAR (command)
compared to GENLOG,compared to GENLOG,compared to GENLOG
LOGLINEAR (command),LOGLINEAR (command),LOGLINEAR (command)
limitations,limitations,limitations

LOGLINEAR is a general procedure for model fitting, hypothesis testing, and parameter estimation for any model that has categorical variables as its major components. As such, LOGLINEAR subsumes a variety of related techniques, including general models of multiway contingency tables, logit models, logistic regression on categorical variables, and quasi-independence models.

LOGLINEAR models cell frequencies using the multinomial response model and produces maximum likelihood estimates of parameters by means of the Newton-Raphson algorithm (Haberman, 1978). HILOGLINEAR, which uses an iterative proportional-fitting algorithm, is more efficient for hierarchical models, but it cannot produce parameter estimates for unsaturated models, does not permit specification of contrasts for parameters, and does not display a correlation matrix of the parameter estimates.

Comparison of the GENLOG and LOGLINEAR Commands Collapse Hide details

Comparison of the GENLOG and LOGLINEAR Commands

The General Loglinear Analysis and Logit Loglinear Analysis dialog boxes are both associated with the GENLOG command. In previous releases, these dialog boxes were associated with the LOGLINEAR command. The LOGLINEAR command is now available only as a syntax command. The differences are described below.

Distribution Assumptions

• GENLOG can handle both Poisson and multinomial distribution assumptions for observed cell counts.

• LOGLINEAR assumes only multinomial distribution.

Approach

• GENLOG uses a regression approach to parameterize a categorical variable in a design matrix.

• LOGLINEAR uses contrasts to reparameterize a categorical variable. The major disadvantage of the reparameterization approach is in the interpretation of the results when there is a redundancy in the corresponding design matrix. Also, the reparameterization approach may result in incorrect degrees of freedom for an incomplete table, leading to incorrect analysis results.

Contrasts and Generalized Log-Odds Ratios (GLOR)

• GENLOG doesn’t provide contrasts to reparameterize the categories of a factor. However, it offers generalized log-odds ratios (GLOR) for cell combinations. Often, comparisons among categories of factors can be derived from GLOR.

• LOGLINEAR offers contrasts to reparameterize the categories of a factor.

Deviance Residual

• GENLOG calculates and displays the deviance residual and its normal probability plot in addition to the other residuals.

• LOGLINEAR does not calculate the deviance residual.

Factor-by-Covariate Design

• When there is a factor-by-covariate term in the design, GENLOG generates one regression coefficient of the covariate for each combination of factor values. The estimates of these regression coefficients are calculated and displayed.

• LOGLINEAR estimates and displays the contrasts of these regression coefficients.

Partition Effect

• In GENLOG, the term partition effect refers to the category of a factor.

• In LOGLINEAR, the term partition effect refers to a particular contrast.

Options Collapse Hide details

Options

Model Specification. You can specify the model or models to be fit using the DESIGN subcommand.

Cell Weights. You can specify cell weights, such as structural zeros, for the model with the CWEIGHT subcommand.

Output Display. You can control the output display with the PRINT subcommand.

Optional Plots. You can produce plots of adjusted residuals against observed and expected counts, normal plots, and detrended normal plots with the PLOT subcommand.

Linear Combinations. You can calculate linear combinations of observed cell frequencies, expected cell frequencies, and adjusted residuals using the GRESID subcommand.

Contrasts. You can indicate the type of contrast desired for a factor using the CONTRAST subcommand.

Criteria for Algorithm. You can control the values of algorithm-tuning parameters with the CRITERIA subcommand.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is two or more variables that define the crosstabulation. The minimum and maximum values for each variable must be specified in parentheses after the variable name.

By default, LOGLINEAR estimates the saturated model for a multidimensional table. Output includes the factors or effects, their levels, and any labels; observed and expected frequencies and percentages for each factor and code; residuals, standardized residuals, and adjusted residuals; two goodness-of-fit statistics (the likelihood-ratio chi-square and Pearson’s chi-square); and estimates of the parameters with accompanying z values and 95% confidence intervals.

Limitations Collapse Hide details

Limitations

• A maximum of 10 independent (factor) variables

• A maximum of 200 covariates

Subcommand Order Collapse Hide details

Subcommand Order

• The variables specification must come first.

• The subcommands that affect a specific model must be placed before the DESIGN subcommand specifying the model.

• All subcommands can be used more than once and, with the exception of the DESIGN subcommand, are carried from model to model unless explicitly overridden.

• If the last subcommand is not DESIGN, LOGLINEAR generates a saturated model in addition to the explicitly requested model(s).

Related Topics

LOGLINEAR
Examples (LOGLINEAR command)
Variable List (LOGLINEAR command)
CWEIGHT Subcommand (LOGLINEAR command)
GRESID Subcommand (LOGLINEAR command)
CONTRAST Subcommand (LOGLINEAR command)
CRITERIA Subcommand (LOGLINEAR command)
PRINT Subcommand (LOGLINEAR command)
PLOT Subcommand (LOGLINEAR command)
MISSING Subcommand (LOGLINEAR command)
DESIGN Subcommand (LOGLINEAR command)


Examples (LOGLINEAR command)

Example: Main Effects General Loglinear Model

LOGLINEAR JOBSAT (1,2) ZODIAC (1,12) /DESIGN=JOBSAT, ZODIAC.

• The variable list specifies two categorical variables, JOBSAT and ZODIAC. JOBSAT has values 1 and 2. ZODIAC has values 1 through 12.

• DESIGN specifies a model with main effects only.

Example: Saturated General Loglinear Model

LOGLINEAR DPREF (2,3) RACE CAMP (1,2).

• DPREF is a categorical variable with values 2 and 3. RACE and CAMP are categorical variables with values 1 and 2.

• This is a general loglinear model because no BY keyword appears. The design defaults to a saturated model that includes all main effects and interaction effects.

Example: Logit Loglinear Model

LOGLINEAR GSLEVEL (4,8) BY EDUC (1,4) SEX (1,2)
  /DESIGN=GSLEVEL, GSLEVEL BY EDUC, GSLEVEL BY SEX.

• GSLEVEL is a categorical variable with values 4 through 8. EDUC is a categorical variable with values 1 through 4. SEX has values 1 and 2.

• The keyword BY on the variable list specifies a logit model in which GSLEVEL is the dependent variable and EDUC and SEX are the independent variables.

• DESIGN specifies a model that can test for the absence of a joint effect of SEX and EDUC on GSLEVEL.

Related Topics

LOGLINEAR
Overview (LOGLINEAR command)
Variable List (LOGLINEAR command)
CWEIGHT Subcommand (LOGLINEAR command)
GRESID Subcommand (LOGLINEAR command)
CONTRAST Subcommand (LOGLINEAR command)
CRITERIA Subcommand (LOGLINEAR command)
PRINT Subcommand (LOGLINEAR command)
PLOT Subcommand (LOGLINEAR command)
MISSING Subcommand (LOGLINEAR command)
DESIGN Subcommand (LOGLINEAR command)


Variable List (LOGLINEAR command)

LOGLINEAR (command),LOGLINEAR (command),LOGLINEAR (command)
variable list,variable list,variable list
LOGLINEAR (command),LOGLINEAR (command),LOGLINEAR (command)
categorical variables,categorical variables,categorical variables
LOGLINEAR (command),LOGLINEAR (command),LOGLINEAR (command)
cell covariates,cell covariates,cell covariates
LOGLINEAR (command),LOGLINEAR (command),LOGLINEAR (command)
factors,factors,factors
LOGLINEAR (command),LOGLINEAR (command),LOGLINEAR (command)
general loglinear model,general loglinear model,general loglinear model

The variable list specifies the variables to be included in the model. LOGLINEAR analyzes two classes of variables: categorical and continuous. Categorical variables are used to define the cells of the table. Continuous variables are used as cell covariates. Continuous variables can be specified only after the keyword WITH following the list of categorical variables.

• The list of categorical variables must be specified first. Categorical variables must be numeric and integer.

• A range must be defined for each categorical variable by specifying, in parentheses after each variable name, the minimum and maximum values for that variable. Separate the two values with at least one space or a comma.

• To specify the same range for a list of variables, specify the list of variables followed by a single range. The range applies to all variables on the list.

• To specify a logit model, use the keyword BY (see Logit Model (LOGLINEAR command)). A variable list without the keyword BY generates a general loglinear model.

• Cases with values outside the specified range are excluded from the analysis. Non-integer values within the range are truncated for the purpose of building the table.

Related Topics

LOGLINEAR
Overview (LOGLINEAR command)
Examples (LOGLINEAR command)
CWEIGHT Subcommand (LOGLINEAR command)
GRESID Subcommand (LOGLINEAR command)
CONTRAST Subcommand (LOGLINEAR command)
CRITERIA Subcommand (LOGLINEAR command)
PRINT Subcommand (LOGLINEAR command)
PLOT Subcommand (LOGLINEAR command)
MISSING Subcommand (LOGLINEAR command)
DESIGN Subcommand (LOGLINEAR command)
Logit Model (LOGLINEAR command)
Cell Covariates (LOGLINEAR command)


Logit Model (LOGLINEAR command)

LOGLINEAR (command),LOGLINEAR (command),LOGLINEAR (command)
logit model,logit model,logit model
BY (keyword),BY (keyword),BY (keyword)
LOGLINEAR command,LOGLINEAR command,LOGLINEAR command
LOGLINEAR (command),LOGLINEAR (command),LOGLINEAR (command)
dependent variables,dependent variables,dependent variables

• To segregate the independent (factor) variables from the dependent variables in a logit model, use the keyword BY. The categorical variables preceding BY are the dependent variables; the categorical variables following BY are the independent variables.

• A total of 10 categorical variables can be specified. In most cases, one of them is dependent.

LOGLINEAR (command),LOGLINEAR (command),LOGLINEAR (command)
measures of association,measures of association,measures of association

• A DESIGN subcommand should be used to request the desired logit model.

• LOGLINEAR displays an analysis of dispersion and two measures of association: entropy and concentration. These measures are discussed elsewhere (Haberman, 1982) and can be used to quantify the magnitude of association among the variables. Both are proportional reduction in error measures. The entropy statistic is analogous to Theil’s entropy measure, while the concentration statistic is analogous to Goodman and Kruskal’s tau-b. Both statistics measure the strength of association between the dependent variable and the predictor variable set.

Related Topics

Variable List (LOGLINEAR command)
Cell Covariates (LOGLINEAR command)


Cell Covariates (LOGLINEAR command)

• Continuous variables can be used as covariates. When used, the covariates must be specified after the keyword WITH following the list of categorical variables. Ranges are not specified for the continuous variables.

• A variable cannot be named as both a categorical variable and a cell covariate.

• To enter cell covariates into a model, the covariates must be specified on the DESIGN subcommand.

• Cell covariates are not applied on a case-by-case basis. The mean covariate value for a cell in the contingency table is applied to that cell.

Example

LOGLINEAR DPREF(2,3) RACE CAMP (1,2) WITH CONSTANT
  /DESIGN=DPREF RACE CAMP CONSTANT.

• The variable CONSTANT is a continuous variable specified as a cell covariate. Cell covariates must be specified after the keyword WITH following the variable list. No range is defined for cell covariates.

• To include the cell covariate in the model, the variable CONSTANT is specified on DESIGN.

Related Topics

Variable List (LOGLINEAR command)
Logit Model (LOGLINEAR command)


CWEIGHT Subcommand (LOGLINEAR command)

CWEIGHT (subcommand),CWEIGHT (subcommand),CWEIGHT (subcommand)
LOGLINEAR command,LOGLINEAR command,LOGLINEAR command
LOGLINEAR (command),LOGLINEAR (command),LOGLINEAR (command)
CWEIGHT subcommand,CWEIGHT subcommand,CWEIGHT subcommand
LOGLINEAR (command),LOGLINEAR (command),LOGLINEAR (command)
cell weights,cell weights,cell weights
LOGLINEAR (command),LOGLINEAR (command),LOGLINEAR (command)
cell weights,cell weights,cell weights

CWEIGHT specifies cell weights, such as structural zeros, for a model. By default, cell weights are equal to 1.

• The specification is either one numeric variable or a matrix of weights enclosed in parentheses.

• If a matrix of weights is specified, the matrix must contain the same number of elements as the product of the levels of the categorical variables. An asterisk can be used to signify repetitions of the same value.

• If weights are specified for a multiple-factor model, the index value of the rightmost factor increments the most rapidly.

• If a numeric variable is specified, only one CWEIGHT subcommand can be used on LOGLINEAR.

LOGLINEAR (command),LOGLINEAR (command),LOGLINEAR (command)
structural zeros,structural zeros,structural zeros

• To use multiple cell weights on the same LOGLINEAR command, specify all weights in matrix format. Each matrix must be specified on a separate CWEIGHT subcommand, and each CWEIGHT specification remains in effect until explicitly overridden by another CWEIGHT subcommand.

• CWEIGHT can be used to impose structural, or a priori, zeros on the model. This feature is useful in the analysis of symmetric tables.

Example

COMPUTE  CWT=1.
IF (HUSED EQ WIFED) CWT=0.
LOGLINEAR HUSED WIFED(1,4) WITH DISTANCE
  /CWEIGHT=CWT
  /DESIGN=HUSED WIFED DISTANCE.

• COMPUTE initially assigns CWT the value 1 for all cases.

• IF assigns CWT the value 0 when HUSED equals WIFED.

• CWEIGHT imposes structural zeros on the diagonal of the symmetric crosstabulation. Because a variable name is specified, only one CWEIGHT can be used.

Example

LOGLINEAR  HUSED WIFED(1,4) WITH DISTANCE
  /CWEIGHT=(0, 4*1, 0, 4*1, 0, 4*1, 0)
  /DESIGN=HUSED WIFED DISTANCE
  /CWEIGHT=(16*1)
  /DESIGN=HUSED WIFED DISTANCE.

• The first CWEIGHT matrix specifies the same values as variable CWT provided in the first example. The specified matrix is as follows:

0 1 1 1

1 0 1 1

1 1 0 1

1 1 1 0

• The same matrix can be specified in full as (0 1 1 1 1 0 1 1 1 1 0 1 1 1 1 0).

• By using the matrix format on CWEIGHT rather than a variable name, a different CWEIGHT subcommand can be used for the second model.

Related Topics

LOGLINEAR
Overview (LOGLINEAR command)
Examples (LOGLINEAR command)
Variable List (LOGLINEAR command)
GRESID Subcommand (LOGLINEAR command)
CONTRAST Subcommand (LOGLINEAR command)
CRITERIA Subcommand (LOGLINEAR command)
PRINT Subcommand (LOGLINEAR command)
PLOT Subcommand (LOGLINEAR command)
MISSING Subcommand (LOGLINEAR command)
DESIGN Subcommand (LOGLINEAR command)


GRESID Subcommand (LOGLINEAR command)

GRESID (subcommand),GRESID (subcommand),GRESID (subcommand)
LOGLINEAR command,LOGLINEAR command,LOGLINEAR command
LOGLINEAR (command),LOGLINEAR (command),LOGLINEAR (command)
GRESID subcommand,GRESID subcommand,GRESID subcommand
LOGLINEAR (command),LOGLINEAR (command),LOGLINEAR (command)
generalized residuals,generalized residuals,generalized residuals

GRESID (generalized residual) calculates linear combinations of observed cell frequencies, expected cell frequencies, and adjusted residuals.

• The specification is either a numeric variable or a matrix whose contents are coefficients of the desired linear combinations.

• If a matrix of coefficients is specified, the matrix must contain the same number of elements as the number of cells implied by the variables specification. An asterisk can be used to signify repetitions of the same value.

• Each GRESID subcommand specifies a single linear combination. Each matrix or variable must be specified on a separate GRESID subcommand. All GRESID subcommands specified are displayed for each design.

Example

LOGLINEAR  MONTH(1,18) WITH Z
 /GRESID=(6*1,12*0)
 /GRESID=(6*0,6*1,6*0)
 /GRESID=(12*0,6*1)
 /DESIGN=Z.

• The first GRESID subcommand combines the first six months into a single effect. The second GRESID subcommand combines the second six months, and the third GRESID subcommand combines the last six months.

• For each effect, LOGLINEAR displays the observed and expected counts, the residual, and the adjusted residual.

Related Topics

LOGLINEAR
Overview (LOGLINEAR command)
Examples (LOGLINEAR command)
Variable List (LOGLINEAR command)
CWEIGHT Subcommand (LOGLINEAR command)
CONTRAST Subcommand (LOGLINEAR command)
CRITERIA Subcommand (LOGLINEAR command)
PRINT Subcommand (LOGLINEAR command)
PLOT Subcommand (LOGLINEAR command)
MISSING Subcommand (LOGLINEAR command)
DESIGN Subcommand (LOGLINEAR command)


CONTRAST Subcommand (LOGLINEAR command)

CONTRAST (subcommand),CONTRAST (subcommand),CONTRAST (subcommand)
LOGLINEAR command,LOGLINEAR command,LOGLINEAR command
LOGLINEAR (command),LOGLINEAR (command),LOGLINEAR (command)
CONTRAST subcommand,CONTRAST subcommand,CONTRAST subcommand
LOGLINEAR (command),LOGLINEAR (command),LOGLINEAR (command)
contrasts,contrasts,contrasts

CONTRAST indicates the type of contrast desired for a factor, where a factor is any categorical dependent or independent variable. The default contrast is DEVIATION for each factor.

• The specification is CONTRAST, which is followed by a variable name in parentheses and the contrast-type keyword.

• To specify a contrast for more than one factor, use a separate CONTRAST subcommand for each specified factor. Only one contrast can be in effect for each factor on each DESIGN.

• A contrast specification remains in effect for subsequent designs until explicitly overridden by another CONTRAST subcommand.

• The design matrix used for the contrasts can be displayed by specifying the keyword DESIGN on the PRINT subcommand. However, this matrix is the basis matrix that is used to determine contrasts; it is not the contrast matrix itself.

• CONTRAST can be used for a multinomial logit model, in which the dependent variable has more than two categories.

• CONTRAST can be used for fitting linear logit models. The keyword BASIS is not appropriate for such models.

• In a logit model, CONTRAST is used to transform the independent variable into a metric variable. Again, the keyword BASIS is not appropriate.

The following contrast types are available:

deviation contrasts,deviation contrasts,deviation contrasts
LOGLINEAR command,LOGLINEAR command,LOGLINEAR command
difference contrasts,difference contrasts,difference contrasts
LOGLINEAR command,LOGLINEAR command,LOGLINEAR command
Helmert contrasts,Helmert contrasts,Helmert contrasts
LOGLINEAR command,LOGLINEAR command,LOGLINEAR command
simple contrasts,simple contrasts,simple contrasts
LOGLINEAR command,LOGLINEAR command,LOGLINEAR command
repeated contrasts,repeated contrasts,repeated contrasts
LOGLINEAR command,LOGLINEAR command,LOGLINEAR command
polynomial contrasts,polynomial contrasts,polynomial contrasts
LOGLINEAR command,LOGLINEAR command,LOGLINEAR command
DEVIATION(refcat) | Deviations from the overall effect. DEVIATION is the default contrast if the CONTRAST subcommand is not used. Refcat is the category for which parameter estimates are not displayed (they are the negative of the sum of the others). By default, refcat is the last category of the variable.
DIFFERENCE | Levels of a factor with the average effect of previous levels of a factor. Also known as reverse Helmert contrasts.
HELMERT | Levels of a factor with the average effect of subsequent levels of a factor.
SIMPLE(refcat) | Each level of a factor to the reference level. By default, LOGLINEAR uses the last category of the factor variable as the reference category. Optionally, any level can be specified as the reference category enclosed in parentheses after the keyword SIMPLE. The sequence of the level, not the actual value, must be specified.
REPEATED | Adjacent comparisons across levels of a factor.
POLYNOMIAL(metric) | Orthogonal polynomial contrasts. The default is equal spacing. Optionally, the coefficients of the linear polynomial can be specified in parentheses, indicating the spacing between levels of the treatment measured by the given factor.
[BASIS]SPECIAL(matrix) | User-defined contrast. As many elements as the number of categories squared must be specified. If BASIS is specified before SPECIAL, a basis matrix is generated for the special contrast, which makes the coefficients of the contrast equal to the special matrix. Otherwise, the matrix specified is transposed and then used as the basis matrix to determine coefficients for the contrast matrix.

Example

LOGLINEAR  A(1,4) BY B(1,4)
 /CONTRAST(B)=POLYNOMIAL
 /DESIGN=A A BY B(1)
 /CONTRAST(B)=SIMPLE
 /DESIGN=A A BY B(1).

• The first CONTRAST subcommand requests polynomial contrasts of B for the first design.

• The second CONTRAST subcommand requests the simple contrast of B, with the last category (value 4) used as the reference category for the second DESIGN subcommand.

LOGLINEAR (command),LOGLINEAR (command),LOGLINEAR (command)
logit model,logit model,logit model

Example

* Multinomial logit model

LOGLINEAR  PREF(1,5) BY RACE ORIGIN CAMP(1,2)
  /CONTRAST(PREF)=SPECIAL(5*1, 1 1 1 1 -4, 3 -1 -1 -1 0,
        0 1 1 -2 0, 0 1 -1 0 0).

• LOGLINEAR builds special contrasts among the five categories of the dependent variable PREF, which measures preference for training camps among Army recruits. For PREF, 1=stay, 2=move to north, 3=move to south, 4=move to unnamed camp, and 5=undecided.

• The four contrasts are: (1) move or stay versus undecided, (2) stay versus move, (3) named camp versus unnamed, and (4) northern camp versus southern. Because these contrasts are orthogonal, SPECIAL and BASIS SPECIAL produce equivalent results.

LOGLINEAR (command),LOGLINEAR (command),LOGLINEAR (command)
logit model,logit model,logit model

Example

* Contrasts for a linear logit model

LOGLINEAR RESPONSE(1,2) BY YEAR(0,20)
 /PRINT=DEFAULT ESTIM
 /CONTRAST(YEAR)=SPECIAL(21*1, -10, -9, -8, -7, -6, -5, -4,
                           -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7,
                            8, 9, 10, 399*1)
 /DESIGN=RESPONSE RESPONSE BY YEAR(1).

• YEAR measures years of education and ranges from 0 through 20. Therefore, allowing for the constant effect, YEAR has 20 estimable parameters associated with it.

• The SPECIAL contrast specifies the constant—that is, 21*1—and the linear effect of YEAR—that is, –10 to 10. The other 399 1’s fill out the 21*21 matrix.

Example

* Contrasts for a logistic regression model

LOGLINEAR RESPONSE(1,2) BY TIME(1,4)
  /CONTRAST(TIME) = SPECIAL(4*1, 7 14 27 51, 8*1)
  /PRINT=ALL /PLOT=DEFAULT
  /DESIGN=RESPONSE, TIME(1) BY RESPONSE.

• CONTRAST is used to transform the independent variable into a metric variable.

• TIME represents elapsed time in days. Therefore, the weights in the contrast represent the metric of the passage of time.

Related Topics

LOGLINEAR
Overview (LOGLINEAR command)
Examples (LOGLINEAR command)
Variable List (LOGLINEAR command)
CWEIGHT Subcommand (LOGLINEAR command)
GRESID Subcommand (LOGLINEAR command)
CRITERIA Subcommand (LOGLINEAR command)
PRINT Subcommand (LOGLINEAR command)
PLOT Subcommand (LOGLINEAR command)
MISSING Subcommand (LOGLINEAR command)
DESIGN Subcommand (LOGLINEAR command)


CRITERIA Subcommand (LOGLINEAR command)

CRITERIA (subcommand),CRITERIA (subcommand),CRITERIA (subcommand)
LOGLINEAR command,LOGLINEAR command,LOGLINEAR command
LOGLINEAR (command),LOGLINEAR (command),LOGLINEAR (command)
CRITERIA subcommand,CRITERIA subcommand,CRITERIA subcommand
LOGLINEAR (command),LOGLINEAR (command),LOGLINEAR (command)
convergence criteria,convergence criteria,convergence criteria

CRITERIA specifies the values of some constants in the Newton-Raphson algorithm. Defaults or specifications remain in effect until overridden with another CRITERIA subcommand.

LOGLINEAR (command),LOGLINEAR (command),LOGLINEAR (command)
maximum iterations,maximum iterations,maximum iterations
delta,delta,delta
LOGLINEAR command,LOGLINEAR command,LOGLINEAR command
LOGLINEAR (command),LOGLINEAR (command),LOGLINEAR (command)
delta,delta,delta
CONVERGE(n) | Convergence criterion. Specify a value for the convergence criterion. The default is 0.001.
ITERATE(n) | Maximum number of iterations. Specify the maximum number of iterations for the algorithm. The default number is 20.
DELTA(n) | Cell delta value. The value of delta is added to each cell frequency for the first iteration. For saturated models, it remains in the cell. The default value is 0.5. LOGLINEAR does not display parameter estimates or correlation matrices of parameter estimates if any sampling zero cells exist in the expected table after delta is added. Parameter estimates and correlation matrices can be displayed in the presence of structural zeros.
DEFAULT | Default values are used. DEFAULT can be used to reset the parameters to the default.

Example

LOGLINEAR  DPREF(2,3) BY RACE ORIGIN CAMP(1,2)
 /CRITERIA=ITERATION(50) CONVERGE(.0001).

• ITERATION increases the maximum number of iterations to 50.

• CONVERGE lowers the convergence criterion to 0.0001.

Related Topics

LOGLINEAR
Overview (LOGLINEAR command)
Examples (LOGLINEAR command)
Variable List (LOGLINEAR command)
CWEIGHT Subcommand (LOGLINEAR command)
GRESID Subcommand (LOGLINEAR command)
CONTRAST Subcommand (LOGLINEAR command)
PRINT Subcommand (LOGLINEAR command)
PLOT Subcommand (LOGLINEAR command)
MISSING Subcommand (LOGLINEAR command)
DESIGN Subcommand (LOGLINEAR command)


PRINT Subcommand (LOGLINEAR command)

PRINT (subcommand),PRINT (subcommand),PRINT (subcommand)
LOGLINEAR command,LOGLINEAR command,LOGLINEAR command
LOGLINEAR (command),LOGLINEAR (command),LOGLINEAR (command)
PRINT subcommand,PRINT subcommand,PRINT subcommand
NOPRINT (subcommand),NOPRINT (subcommand),NOPRINT (subcommand)
LOGLINEAR command,LOGLINEAR command,LOGLINEAR command
LOGLINEAR (command),LOGLINEAR (command),LOGLINEAR (command)
NOPRINT subcommand,NOPRINT subcommand,NOPRINT subcommand
LOGLINEAR (command),LOGLINEAR (command),LOGLINEAR (command)
statistics,statistics,statistics
LOGLINEAR (command),LOGLINEAR (command),LOGLINEAR (command)
display options,display options,display options

PRINT requests statistics that are not produced by default.

• By default, LOGLINEAR displays the frequency table and residuals. The parameter estimates of the model are also displayed if DESIGN is not used.

• Multiple PRINT subcommands are permitted. The specifications are cumulative.

The following keywords can be used on PRINT:

LOGLINEAR (command),LOGLINEAR (command),LOGLINEAR (command)
expected frequencies,expected frequencies,expected frequencies
LOGLINEAR (command),LOGLINEAR (command),LOGLINEAR (command)
observed frequencies,observed frequencies,observed frequencies
expected frequencies,expected frequencies,expected frequencies
LOGLINEAR command,LOGLINEAR command,LOGLINEAR command
observed frequencies,observed frequencies,observed frequencies
LOGLINEAR command,LOGLINEAR command,LOGLINEAR command
LOGLINEAR (command),LOGLINEAR (command),LOGLINEAR (command)
residuals,residuals,residuals
residuals,residuals,residuals
LOGLINEAR command,LOGLINEAR command,LOGLINEAR command
LOGLINEAR (command),LOGLINEAR (command),LOGLINEAR (command)
design matrix,design matrix,design matrix
LOGLINEAR (command),LOGLINEAR (command),LOGLINEAR (command)
parameter estimates,parameter estimates,parameter estimates
parameter estimates,parameter estimates,parameter estimates
LOGLINEAR command,LOGLINEAR command,LOGLINEAR command
correlation matrix,correlation matrix,correlation matrix
LOGLINEAR command,LOGLINEAR command,LOGLINEAR command
LOGLINEAR (command),LOGLINEAR (command),LOGLINEAR (command)
correlation matrix,correlation matrix,correlation matrix
FREQ | Observed and expected cell frequencies and percentages. This is displayed by default.
RESID | Raw, standardized, and adjusted residuals. This is displayed by default.
DESIGN | The design matrix of the model, showing the basis matrix corresponding to the contrasts used.
ESTIM | The parameter estimates of the model. If you do not specify a design on the DESIGN subcommand, LOGLINEAR generates a saturated model and displays the parameter estimates for the saturated model. LOGLINEAR does not display parameter estimates or correlation matrices of parameter estimates if any sampling zero cells exist in the expected table after delta is added. Parameter estimates and a correlation matrix are displayed when structural zeros are present.
COR | The correlation matrix of the parameter estimates. Alias COV.
ALL | All available output.
DEFAULT | FREQ and RESID. ESTIM is also displayed by default if the DESIGN subcommand is not used.
NONE | The design information and goodness-of-fit statistics only. This option overrides all other specifications on the PRINT subcommand. The NONE option applies only to the PRINT subcommand.

Example

LOGLINEAR A(1,2) B(1,2)
 /PRINT=ESTIM
 /DESIGN=A,B,A BY B
 /PRINT=ALL
 /DESIGN=A,B.

• The first design is the saturated model. The parameter estimates are displayed with ESTIM specified on PRINT.

• The second design is the main-effects model, which tests the hypothesis of no interaction. The second PRINT subcommand displays all available display output for this model.

Related Topics

LOGLINEAR
Overview (LOGLINEAR command)
Examples (LOGLINEAR command)
Variable List (LOGLINEAR command)
CWEIGHT Subcommand (LOGLINEAR command)
GRESID Subcommand (LOGLINEAR command)
CONTRAST Subcommand (LOGLINEAR command)
CRITERIA Subcommand (LOGLINEAR command)
PLOT Subcommand (LOGLINEAR command)
MISSING Subcommand (LOGLINEAR command)
DESIGN Subcommand (LOGLINEAR command)


PLOT Subcommand (LOGLINEAR command)

PLOT (subcommand),PLOT (subcommand),PLOT (subcommand)
LOGLINEAR command,LOGLINEAR command,LOGLINEAR command
LOGLINEAR (command),LOGLINEAR (command),LOGLINEAR (command)
PLOT subcommand,PLOT subcommand,PLOT subcommand
LOGLINEAR (command),LOGLINEAR (command),LOGLINEAR (command)
plots,plots,plots

PLOT produces optional plots. No plots are displayed if PLOT is not specified or is specified without any keyword. Multiple PLOT subcommands can be used. The specifications are cumulative.

residual plots,residual plots,residual plots
LOGLINEAR command,LOGLINEAR command,LOGLINEAR command
LOGLINEAR (command),LOGLINEAR (command),LOGLINEAR (command)
residual plots,residual plots,residual plots
normal probability plots,normal probability plots,normal probability plots
LOGLINEAR command,LOGLINEAR command,LOGLINEAR command
LOGLINEAR (command),LOGLINEAR (command),LOGLINEAR (command)
normal probability plots,normal probability plots,normal probability plots
RESID | Plots of adjusted residuals against observed and expected counts.
NORMPROB | Normal and detrended normal plots of the adjusted residuals.
NONE | No plots.
DEFAULT | RESID and NORMPROB. Alias ALL.

Example

LOGLINEAR  RESPONSE(1,2) BY TIME(1,4)
  /CONTRAST(TIME)=SPECIAL(4*1, 7 14 27 51, 8*1)
  /PLOT=DEFAULT
  /DESIGN=RESPONSE TIME(1) BY RESPONSE
  /PLOT=NONE
  /DESIGN.

• RESID and NORMPROB plots are displayed for the first design.

• No plots are displayed for the second design.

Related Topics

LOGLINEAR
Overview (LOGLINEAR command)
Examples (LOGLINEAR command)
Variable List (LOGLINEAR command)
CWEIGHT Subcommand (LOGLINEAR command)
GRESID Subcommand (LOGLINEAR command)
CONTRAST Subcommand (LOGLINEAR command)
CRITERIA Subcommand (LOGLINEAR command)
PRINT Subcommand (LOGLINEAR command)
MISSING Subcommand (LOGLINEAR command)
DESIGN Subcommand (LOGLINEAR command)


MISSING Subcommand (LOGLINEAR command)

MISSING (subcommand),MISSING (subcommand),MISSING (subcommand)
LOGLINEAR command,LOGLINEAR command,LOGLINEAR command
LOGLINEAR (command),LOGLINEAR (command),LOGLINEAR (command)
MISSING subcommand,MISSING subcommand,MISSING subcommand
missing values,missing values,missing values
LOGLINEAR command,LOGLINEAR command,LOGLINEAR command
LOGLINEAR (command),LOGLINEAR (command),LOGLINEAR (command)
missing values,missing values,missing values

MISSING controls missing values. By default, LOGLINEAR excludes all cases with system- or user-missing values on any variable. You can specify INCLUDE to include user-missing values. If INCLUDE is specified, user-missing values must also be included in the value range specification.

EXCLUDE | Delete cases with user-missing values. This is the default if the subcommand is omitted. You can also specify the keyword DEFAULT.
INCLUDE | Include user-missing values. Only cases with system-missing values are deleted.

Example

MISSING VALUES A(0).
LOGLINEAR A(0,2) B(1,2) /MISSING=INCLUDE
 /DESIGN=B.

• Even though 0 was specified as missing, it is treated as a nonmissing category of A in this analysis.

Related Topics

LOGLINEAR
Overview (LOGLINEAR command)
Examples (LOGLINEAR command)
Variable List (LOGLINEAR command)
CWEIGHT Subcommand (LOGLINEAR command)
GRESID Subcommand (LOGLINEAR command)
CONTRAST Subcommand (LOGLINEAR command)
CRITERIA Subcommand (LOGLINEAR command)
PRINT Subcommand (LOGLINEAR command)
PLOT Subcommand (LOGLINEAR command)
DESIGN Subcommand (LOGLINEAR command)


DESIGN Subcommand (LOGLINEAR command)

DESIGN (subcommand),DESIGN (subcommand),DESIGN (subcommand)
LOGLINEAR command,LOGLINEAR command,LOGLINEAR command
LOGLINEAR (command),LOGLINEAR (command),LOGLINEAR (command)
DESIGN subcommand,DESIGN subcommand,DESIGN subcommand
custom models,custom models,custom models
LOGLINEAR command,LOGLINEAR command,LOGLINEAR command
LOGLINEAR (command),LOGLINEAR (command),LOGLINEAR (command)
model specification,model specification,model specification
LOGLINEAR (command),LOGLINEAR (command),LOGLINEAR (command)
custom models,custom models,custom models

DESIGN specifies the model or models to be fit. If DESIGN is omitted or used with no specifications, the saturated model is produced. The saturated model fits all main effects and all interaction effects.

• To specify more than one model, use more than one DESIGN subcommand. Each DESIGN specifies one model.

LOGLINEAR (command),LOGLINEAR (command),LOGLINEAR (command)
main-effects model,main-effects model,main-effects model

• To obtain main-effects models, name all the variables listed on the variables specification.

interaction terms,interaction terms,interaction terms
LOGLINEAR command,LOGLINEAR command,LOGLINEAR command
LOGLINEAR (command),LOGLINEAR (command),LOGLINEAR (command)
interaction terms,interaction terms,interaction terms
LOGLINEAR (command),LOGLINEAR (command),LOGLINEAR (command)
single-degree-of-freedom partitions,single-degree-of-freedom partitions,single-degree-of-freedom partitions

• To obtain interactions, use the keyword BY to specify each interaction, as in A BY B and C BY D. To obtain the single-degree-of-freedom partition of a specified contrast, specify the partition in parentheses following the factor (see the example below).

LOGLINEAR (command),LOGLINEAR (command),LOGLINEAR (command)
covariates,covariates,covariates
WITH (keyword),WITH (keyword),WITH (keyword)
LOGLINEAR command,LOGLINEAR command,LOGLINEAR command

• To include cell covariates in the model, first identify them on the variable list by naming them after the keyword WITH, and then specify the variable names on DESIGN.

LOGLINEAR (command),LOGLINEAR (command),LOGLINEAR (command)
equiprobability model,equiprobability model,equiprobability model

• To specify an equiprobability model, name a cell covariate that is actually a constant of 1.

Example

* Testing the linear effect of the dependent variable

COMPUTE X=MONTH.
LOGLINEAR MONTH (1,12) WITH X
  /DESIGN X.

• The variable specification identifies MONTH as a categorical variable with values 1 through 12. The keyword WITH identifies X as a covariate.

• DESIGN tests the linear effect of MONTH.

Example

* Specifying main effects models

LOGLINEAR A(1,4) B(1,5)
  /DESIGN=A
  /DESIGN=A,B.

• The first design tests the homogeneity of category probabilities for B; it fits the marginal frequencies on A, but assumes that membership in any of the categories of B is equiprobable.

• The second design tests the independence of A and B. It fits the marginals on both A and B.

Example

* Specifying interactions

LOGLINEAR A(1,4) B(1,5) C(1,3)
  /DESIGN=A,B,C, A BY B.

• This design consists of the A main effect, the B main effect, the C main effect, and the interaction of A and B.

LOGLINEAR (command),LOGLINEAR (command),LOGLINEAR (command)
simultaneous linear logit model,simultaneous linear logit model,simultaneous linear logit model

Example

* Single-degree-of-freedom partitions
 LOGLINEAR A(1,4) BY B(1,5)
  /CONTRAST(B)=POLYNOMIAL
  /DESIGN=A,A BY B(1).

• The value 1 following B refers to the first partition of B, which is the linear effect of B; this follows from the contrast specified on the CONTRAST subcommand.

Example

* Specifying cell covariates

LOGLINEAR HUSED WIFED(1,4) WITH DISTANCE
   /DESIGN=HUSED WIFED DISTANCE.

• The continuous variable DISTANCE is identified as a cell covariate by specifying it after WITH on the variable list. The cell covariate is then included in the model by naming it on DESIGN.

Example

* Equiprobability model

COMPUTE  X=1.
LOGLINEAR  MONTH(1,18) WITH X
  /DESIGN=X.

• This model tests whether the frequencies in the 18-cell table are equal by using a cell covariate that is a constant of 1.

Related Topics

LOGLINEAR
Overview (LOGLINEAR command)
Examples (LOGLINEAR command)
Variable List (LOGLINEAR command)
CWEIGHT Subcommand (LOGLINEAR command)
GRESID Subcommand (LOGLINEAR command)
CONTRAST Subcommand (LOGLINEAR command)
CRITERIA Subcommand (LOGLINEAR command)
PRINT Subcommand (LOGLINEAR command)
PLOT Subcommand (LOGLINEAR command)
MISSING Subcommand (LOGLINEAR command)


LOOP-END LOOP

LOOP (command),LOOP (command),LOOP (command)
LOOP (command),LOOP (command),LOOP (command)
syntax chart,syntax chart,syntax chart
END LOOP (command),END LOOP (command),END LOOP (command)
LOOP [varname=n TO m [BY {1**}]]  [IF [(]logical expression[)]]
                         {n  }

transformation commands

END LOOP [IF [(]logical expression[)]]

**Default if the subcommand is omitted.

This command does not read the active dataset. It is stored, pending execution with the next command that reads the dataset. See the topic Command Order for more information.

Examples

SET MXLOOPS=10. /*Maximum number of loops allowed
LOOP. /*Loop with no limit other than MXLOOPS
COMPUTE X=X+1.
END LOOP.

LOOP #I=1 TO 5. /*Loop five times
COMPUTE X=X+1.
END LOOP.

Related Topics

Overview (LOOP-END LOOP command)
Examples (LOOP-END LOOP command)
IF Keyword (LOOP-END LOOP command)
Indexing Clause (LOOP-END LOOP command)
BY Keyword (LOOP-END LOOP command)
Missing Values (LOOP-END LOOP command)
Creating Data (LOOP-END LOOP command)


Overview (LOOP-END LOOP command)

LOOP (command),LOOP (command),LOOP (command)
nested,nested,nested
LOOP (command),LOOP (command),LOOP (command)
with SET MXLOOPS command,with SET MXLOOPS command,with SET MXLOOPS command
MXLOOPS (subcommand),MXLOOPS (subcommand),MXLOOPS (subcommand)
with LOOP command,with LOOP command,with LOOP command

The LOOP-END LOOP structure performs repeated transformations specified by the commands within the loop until they reach a specified cutoff. The cutoff can be specified by an indexing clause on the LOOP command, an IF clause on the END LOOP command, or a BREAK command within the loop structure (see BREAK). In addition, the maximum number of iterations within a loop can be specified on the MXLOOPS subcommand on SET. The default MXLOOPS is 40.

The IF clause on the LOOP command can be used to perform repeated transformations on a subset of cases. The effect is similar to nesting the LOOP-END LOOP structure within a DO IF-END IF structure, but using IF on LOOP is simpler and more efficient. You have to use the DO IF-END IF structure, however, if you want to perform different transformations on different subsets of cases. You can also use IF on LOOP to specify the cutoff, especially when the cutoff may be reached before the first iteration.

LOOP and END LOOP are usually used within an input program or with the VECTOR command. Since the loop structure repeats transformations on a single case or on a single input record containing information on multiple cases, it allows you to read complex data files or to generate data for a active dataset. For more information, see INPUT PROGRAM-END INPUT PROGRAM and VECTOR.

The loop structure repeats transformations on single cases across variables. It is different from the DO REPEAT-END REPEAT structure, which replicates transformations on a specified set of variables. When both can be used to accomplish a task, such as selectively transforming data for some cases on some variables, LOOP and END LOOP are generally more efficient and more flexible, but DO REPEAT allows selection of nonadjacent variables and use of replacement values with different intervals.

Options Collapse Hide details

Options

Missing Values. You can prevent cases with missing values for any of the variables used in the loop structure from entering the loop. See the topic Missing Values (LOOP-END LOOP command) for more information.

Creating Data. A loop structure within an input program can be used to generate data. See the topic Creating Data (LOOP-END LOOP command) for more information.

Defining Complex File Structures. A loop structure within an input program can be used to define complex files that cannot be handled by standard file definition facilities.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is LOOP followed by at least one transformation command. The structure must end with the END LOOP command. Commands within the loop are executed until the cutoff is reached.

Syntax Rules Collapse Hide details

Syntax Rules

• If LOOP and END LOOP are specified before an active dataset exists, they must be specified within an input program.

• If both an indexing and an IF clause are used on LOOP, the indexing clause must be first.

• Loop structures can be nested within other loop structures or within DO IF structures, and vice versa.

Operations Collapse Hide details

Operations

• The LOOP command defines the beginning of a loop structure and the END LOOP command defines its end. The LOOP command returns control to LOOP unless the cutoff has been reached. When the cutoff has been reached, control passes to the command immediately following END LOOP.

• When specified within a loop structure, definition commands (such as MISSING VALUES and VARIABLE LABELS) and utility commands (such as SET and SHOW) are invoked only once, when they are encountered for the first time within the loop.

• An indexing clause (e.g., LOOP #i=1 to 1000) will override the SET MXLOOPS limit, but a loop with an IF condition will terminate if the MXLOOPS limit is reached before the condition is satisfied.

Related Topics

LOOP-END LOOP
Examples (LOOP-END LOOP command)
IF Keyword (LOOP-END LOOP command)
Indexing Clause (LOOP-END LOOP command)
BY Keyword (LOOP-END LOOP command)
Missing Values (LOOP-END LOOP command)
Creating Data (LOOP-END LOOP command)


Examples (LOOP-END LOOP command)

LOOP (command),LOOP (command),LOOP (command)
with SET MXLOOPS command,with SET MXLOOPS command,with SET MXLOOPS command
MXLOOPS (subcommand),MXLOOPS (subcommand),MXLOOPS (subcommand)
with LOOP command,with LOOP command,with LOOP command

Example

SET MXLOOPS=10.
LOOP. /*Loop with no limit other than MXLOOPS
COMPUTE X=X+1.
END LOOP.

• This and the following examples assume that an active dataset and all of the variables mentioned in the loop exist.

• The SET MXLOOPS command limits the number of times the loop is executed to 10. The function of MXLOOPS is to prevent infinite loops when there is no indexing clause.

• Within the loop structure, each iteration increments X by 1. After 10 iterations, the value of X for all cases is increased by 10, and, as specified on the SET command, the loop is terminated.

Example

*Assume MXLOOPS set to default value of 40.
COMPUTE newvar1=0.
LOOP IF newvar1<100.
COMPUTE newvar1=newvar1+1.
END LOOP.

PRESERVE.
SET MXLOOPS 500.
COMPUTE newvar2=0.
LOOP IF newvar2<100.
COMPUTE newvar2=newvar2+1.
END LOOP.
RESTORE.

COMPUTE newvar3=0.
LOOP #i=1 to 1000.
COMPUTE newvar3=newvar3+1.
END LOOP.
EXECUTE.

• In the first loop, the value of newvar1 will reach 40, at which point the loop will terminate because the MXLOOPS limit has been exceeded.

• In the second loop, the value of MXLOOPS is increased to 500, and the loop will continue to iterate until the value of newvar2 reaches 100, at which point the IF condition is reached and the loop terminates.

• In the third loop, the indexing clause overrides the MXLOOPS setting, and the loop will iterate 1,000 times.

Related Topics

LOOP-END LOOP
Overview (LOOP-END LOOP command)
IF Keyword (LOOP-END LOOP command)
Indexing Clause (LOOP-END LOOP command)
BY Keyword (LOOP-END LOOP command)
Missing Values (LOOP-END LOOP command)
Creating Data (LOOP-END LOOP command)


IF Keyword (LOOP-END LOOP command)

logical expressions,logical expressions,logical expressions
in loop structures,in loop structures,in loop structures
IF (keyword),IF (keyword),IF (keyword)
LOOP command,LOOP command,LOOP command
LOOP (command),LOOP (command),LOOP (command)
logical expressions,logical expressions,logical expressions

The keyword IF and a logical expression can be specified on LOOP or on END LOOP to control iterations through the loop.

• The specification on IF is a logical expression enclosed in parentheses.

Example

LOOP.
COMPUTE X=X+1.
END LOOP IF (X EQ 5). /*Loop until X is 5

• Iterations continue until the logical expression on END LOOP is true, which for every case is when X equals 5. Each case does not go through the same number of iterations.

• This corresponds to the programming notion of DO UNTIL. The loop is always executed at least once.

Example

LOOP IF (X LT 5). /*Loop while X is less than 5
COMPUTE X=X+1.
END LOOP.

• The IF clause is evaluated each trip through the structure, so looping stops once X equals 5.

• This corresponds to the programming notion of DO WHILE. The loop may not be executed at all.

Example

LOOP IF (Y GT 10). /*Loop only for cases with Y GT 10
COMPUTE X=X+1.
END LOOP IF (X EQ 5). /*Loop until X IS 5

• The IF clause on LOOP allows transformations to be performed on a subset of cases. X is increased by 5 only for cases with values greater than 10 for Y. X is not changed for all other cases.

Related Topics

LOOP-END LOOP
Overview (LOOP-END LOOP command)
Examples (LOOP-END LOOP command)
Indexing Clause (LOOP-END LOOP command)
BY Keyword (LOOP-END LOOP command)
Missing Values (LOOP-END LOOP command)
Creating Data (LOOP-END LOOP command)


Indexing Clause (LOOP-END LOOP command)

indexing clause,indexing clause,indexing clause
LOOP command,LOOP command,LOOP command
LOOP (command),LOOP (command),LOOP (command)
indexing clause,indexing clause,indexing clause

The indexing clause limits the number of iterations for a loop by specifying the number of times the program should execute commands within the loop structure. The indexing clause is specified on the LOOP command and includes an indexing variable followed by initial and terminal values.

LOOP (command),LOOP (command),LOOP (command)
terminal value,terminal value,terminal value
LOOP (command),LOOP (command),LOOP (command)
initial value,initial value,initial value

• The program sets the indexing variable to the initial value and increases it by the specified increment each time the loop is executed for a case. When the indexing variable reaches the specified terminal value, the loop is terminated for that case.

• By default, the program increases the indexing variable by 1 for each iteration. The keyword BY overrides this increment.

• The indexing variable can have any valid variable name. Unless you specify a scratch variable, the indexing variable is treated as a permanent variable and is saved in the active dataset. If the indexing variable is assigned the same name as an existing variable, the values of the existing variable are altered by the LOOP structure as it is executed, and the original values are lost. See the topic Creating Data (LOOP-END LOOP command) for more information.

LOOP (command),LOOP (command),LOOP (command)
with SET MXLOOPS command,with SET MXLOOPS command,with SET MXLOOPS command
MXLOOPS (subcommand),MXLOOPS (subcommand),MXLOOPS (subcommand)
with LOOP command,with LOOP command,with LOOP command

• The indexing clause overrides the maximum number of loops specified by SET MXLOOPS.

• The initial and terminal values of the indexing clause can be numeric expressions. Noninteger and negative expressions are allowed.

• If the expression for the initial value is greater than the terminal value, the loop is not executed. For example, #J=X TO Y is a zero-trip loop if X is 0 and Y is –1.

• If the expressions for the initial and terminal values are equal, the loop is executed once. #J=0 TO Y is a one-trip loop when Y is 0.

• If the loop is exited via BREAK or a conditional clause on the END LOOP statement, the iteration variable is not updated. If the LOOP statement contains both an indexing clause and a conditional clause, the indexing clause is executed first, and the iteration variable is updated regardless of which clause causes the loop to terminate.

Example

LOOP #I=1 TO 5. /*LOOP FIVE TIMES
COMPUTE X=X+1.
END LOOP.

• The scratch variable #I (the indexing variable) is set to the initial value of 1 and increased by 1 each time the loop is executed for a case. When #I increases beyond the terminal value 5, no further loops are executed. Thus, the value of X will be increased by 5 for every case.

Example

LOOP #I=1 TO 5 IF (Y GT 10). /*Loop to X=5 only if Y GT 10
COMPUTE X=X+1.
END LOOP.

• Both an indexing clause and an IF clause are specified on LOOP. X is increased by 5 for all cases where Y is greater than 10.

Example

LOOP #I=1 TO Y. /*Loop to the value of Y
COMPUTE X=X+1.
END LOOP.

• The number of iterations for a case depends on the value of the variable Y for that case. For a case with value 0 for the variable Y, the loop is not executed and X is unchanged. For a case with value 1 for the variable Y, the loop is executed once and X is increased by 1.

Example

* Factorial routine.

DATA LIST FREE / X.
BEGIN DATA
1 2 3 4 5 6 7
END DATA.

COMPUTE FACTOR=1.
LOOP #I=1 TO X.
COMPUTE FACTOR=FACTOR * #I.
END LOOP.
LIST.

• The loop structure computes FACTOR as the factorial value of X.

LOOP (command),LOOP (command),LOOP (command)
nested,nested,nested

Example

* Example of nested loops:
  compute every possible combination of values for each variable.

INPUT PROGRAM.
-LOOP #I=1 TO 4. /* LOOP TO NUMBER OF VALUES FOR I
- LOOP #J=1 TO 3. /* LOOP TO NUMBER OF VALUES FOR J
-  LOOP #K=1 TO 4. /* LOOP TO NUMBER OF VALUES FOR K
-   COMPUTE I=#I.
-   COMPUTE J=#J.
-   COMPUTE K=#K.
-   END CASE.
-  END LOOP.
- END LOOP.
-END LOOP.
END FILE.
END INPUT PROGRAM.
LIST.

• The first loop iterates four times. The first iteration sets the indexing variable #I equal to 1 and then passes control to the second loop. #I remains 1 until the second loop has completed all of its iterations.

• The second loop is executed 12 times, three times for each value of #I. The first iteration sets the indexing variable #J equal to 1 and then passes control to the third loop. #J remains 1 until the third loop has completed all of its iterations.

• The third loop results in 48 iterations (4 × 3 × 4). The first iteration sets #K equal to 1. The COMPUTE statements set the variables I, J, and K each to 1, and END CASE creates a case. The third loop iterates a second time, setting #K equal to 2. Variables I, J, and K are then computed with values 1, 1, 2, respectively, and a second case is created. The third and fourth iterations of the third loop produce cases with I, J, and K, equal to 1, 1, 3 and 1, 1, 4, respectively. After the fourth iteration within the third loop, control passes back to the second loop.

• The second loop is executed again. #I remains 1, while #J increases to 2, and control returns to the third loop. The third loop completes its iterations, resulting in four more cases with I equal to 1, J to 2, and K increasing from 1 to 4. The second loop is executed a third time, resulting in cases with I=1, J=3, and K increasing from 1 to 4. Once the second loop has completed three iterations, control passes back to the first loop, and the entire cycle is repeated for the next increment of #I.

• Once the first loop completes four iterations, control passes out of the looping structures to END FILE. END FILE defines the resulting cases as a data file, the input program terminates, and the LIST command is executed.

• This example does not require a LEAVE command because the iteration variables are scratch variables. If the iteration variables were I, J, and K, LEAVE would be required because the variables would be reinitialized after each END CASE command.

Example

* Modifying the loop iteration variable.

INPUT PROGRAM.
PRINT SPACE    2.
LOOP           A = 1 TO 3. /*Simple iteration
+  PRINT          /'A WITHIN LOOP: ' A(F1).
+  COMPUTE        A = 0.
END LOOP.
PRINT          /'A AFTER LOOP:  ' A(F1).

NUMERIC        #B.
LOOP           B = 1 TO 3. /*Iteration + UNTIL
+  PRINT          /'B WITHIN LOOP: ' B(F1).
+  COMPUTE        B = 0.
+  COMPUTE        #B = #B+1.
END LOOP       IF #B = 3.
PRINT          /'B AFTER LOOP:  ' B(F1).

NUMERIC        #C.
LOOP           C = 1 TO 3 IF #C NE 3. /*Iteration + WHILE
+  PRINT          /'C WITHIN LOOP: ' C(F1).
+  COMPUTE        C = 0.
+  COMPUTE        #C = #C+1.
END LOOP.
PRINT          /'C AFTER LOOP:  ' C(F1).

NUMERIC        #D.
LOOP           D = 1 TO 3. /*Iteration + BREAK
+  PRINT          /'D WITHIN LOOP: ' D(F1).
+  COMPUTE        D = 0.
+  COMPUTE        #D = #D+1.
+  DO IF          #D = 3.
+     BREAK.
+  END IF.
END LOOP.
PRINT          /'D AFTER LOOP:  ' D(F1).

LOOP           E = 3 TO 1. /*Zero-trip iteration
+  PRINT          /'E WITHIN LOOP: ' E(F1).
+  COMPUTE        E = 0.
END LOOP.
PRINT          /'E AFTER LOOP:  ' E(F1).
END FILE.
END INPUT PROGRAM.
EXECUTE.

• If a loop is exited via BREAK or a conditional clause on the END LOOP statement, the iteration variable is not updated.

• If the LOOP statement contains both an indexing clause and a conditional clause, the indexing clause is executed first, and the actual iteration variable will be updated regardless of which clause causes termination of the loop.

The output from this example is shown below.

Modifying the loop iteration value
A WITHIN LOOP: 1
A WITHIN LOOP: 2
A WITHIN LOOP: 3
A AFTER LOOP:  4
B WITHIN LOOP: 1
B WITHIN LOOP: 2
B WITHIN LOOP: 3
B AFTER LOOP:  0
C WITHIN LOOP: 1
C WITHIN LOOP: 2
C WITHIN LOOP: 3
C AFTER LOOP:  4
D WITHIN LOOP: 1
D WITHIN LOOP: 2
D WITHIN LOOP: 3
D AFTER LOOP:  0
E AFTER LOOP:  3

Related Topics

LOOP-END LOOP
Overview (LOOP-END LOOP command)
Examples (LOOP-END LOOP command)
IF Keyword (LOOP-END LOOP command)
BY Keyword (LOOP-END LOOP command)
Missing Values (LOOP-END LOOP command)
Creating Data (LOOP-END LOOP command)


BY Keyword (LOOP-END LOOP command)

BY (keyword),BY (keyword),BY (keyword)
LOOP command,LOOP command,LOOP command
LOOP (command),LOOP (command),LOOP (command)
increment value,increment value,increment value

By default, the program increases the indexing variable by 1 for each iteration. The keyword BY overrides this increment.

• The increment value can be a numeric expression and can therefore be non-integer or negative. Zero causes a warning and results in a zero-trip loop.

• If the initial value is greater than the terminal value and the increment is positive, the loop is never entered. #I=1 TO 0 BY 2 results in a zero-trip loop.

• If the initial value is less than the terminal value and the increment is negative, the loop is never entered. #I=1 TO 2 BY –1 also results in a zero-trip loop.

• Order is unimportant: 2 BY 2 TO 10 is equivalent to 2 TO 10 BY 2.

Example

LOOP #I=2 TO 10 BY 2. /*Loop five times by 2'S
COMPUTE X=X+1.
END LOOP.

• The scratch variable #I starts at 2 and increases by 2 for each of five iterations until it equals 10 for the last iteration.

Example

LOOP #I=1 TO Y BY Z. /*Loop to Y incrementing by Z
COMPUTE X=X+1.
END LOOP.

• The loop is executed once for a case with Y equal to 2 and Z equal to 2 but twice for a case with Y equal to 3 and Z equal to 2.

Example

* Repeating data using LOOP.

INPUT PROGRAM.
DATA LIST      NOTABLE/ ORDER 1-4(N) #BKINFO 6-71(A).
LEAVE ORDER.
LOOP           #I = 1 TO 66 BY 6 IF SUBSTR(#BKINFO,#I,6) <> ' '.
+  REREAD         COLUMN = #I+5.
+  DATA LIST      NOTABLE/ ISBN 1-3(N) QUANTITY 4-5.
+  END CASE.
END LOOP.
END INPUT PROGRAM.
SORT CASES     BY ISBN ORDER.
BEGIN DATA
1045 182 2 155 1 134 1 153 5
1046 155 3 153 5 163 1
1047 161 5 182 2 163 4 186 6
1048 186 2
1049 155 2 163 2 153 2 074 1 161 1
END DATA.

DO IF          $CASENUM = 1.
+  PRINT EJECT    /'Order' 1  'ISBN' 7  'Quantity' 13.
END IF.
PRINT          /ORDER 2-5(N) ISBN 8-10(N) QUANTITY 13-17.
EXECUTE.

• This example uses LOOP to simulate a REPEATING DATA command.

• DATA LIST specifies the scratch variable #BKINFO as a string variable (format A) to allow blanks in the data.

• LOOP is executed if the SUBSTR function returns anything other than a blank or null value. SUBSTR returns a six-character substring of #BKINFO, beginning with the character in the position specified by the value of the indexing variable #I. As specified on the indexing clause, #I begins with a value of 1 and is increased by 6 for each iteration of LOOP, up to a maximum #I value of 61 (1 + 10 × 6 = 61). The next iteration would exceed the maximum #I value (1 + 11 × 6 = 67).

Related Topics

LOOP-END LOOP
Overview (LOOP-END LOOP command)
Examples (LOOP-END LOOP command)
IF Keyword (LOOP-END LOOP command)
Indexing Clause (LOOP-END LOOP command)
Missing Values (LOOP-END LOOP command)
Creating Data (LOOP-END LOOP command)


Missing Values (LOOP-END LOOP command)

missing values,missing values,missing values
LOOP command,LOOP command,LOOP command
LOOP (command),LOOP (command),LOOP (command)
missing values,missing values,missing values

• If the program encounters a case with a missing value for the initial, terminal, or increment value or expression, or if the conditional expression on the LOOP command returns missing, a zero-trip loop results and control is passed to the first command after the END LOOP command.

• If a case has a missing value for the conditional expression on an END LOOP command, the loop is terminated after the first iteration.

• To prevent cases with missing values for any variable used in the loop structure from entering the loop, use the IF clause on the LOOP command (see third example below).

Example

LOOP #I=1 TO Z  IF (Y GT 10). /*Loop to X=Z for cases with Y GT 10
COMPUTE X=X+1.
END LOOP.

• The value of X remains unchanged for cases with a missing value for Y or a missing value for Z (or if Z is less than 1).

Example

MISSING VALUES X(5).
LOOP.
COMPUTE X=X+1.
END LOOP IF (X GE 10). /*Loop until X is at least 10 or missing

• Looping is terminated when the value of X is 5 because 5 is defined as missing for X.

Example

LOOP IF NOT MISSING(Y). /*Loop only when Y isn't missing
COMPUTE X=X+Y.
END LOOP IF (X GE 10). /*Loop until X is at least 10

• The variable X is unchanged for cases with a missing value for Y, since the loop is never entered.

Related Topics

LOOP-END LOOP
Overview (LOOP-END LOOP command)
Examples (LOOP-END LOOP command)
IF Keyword (LOOP-END LOOP command)
Indexing Clause (LOOP-END LOOP command)
BY Keyword (LOOP-END LOOP command)
Creating Data (LOOP-END LOOP command)


Creating Data (LOOP-END LOOP command)

END CASE (command),END CASE (command),END CASE (command)
with LOOP command,with LOOP command,with LOOP command
END FILE (command),END FILE (command),END FILE (command)
with LOOP command,with LOOP command,with LOOP command
LOOP (command),LOOP (command),LOOP (command)
with END FILE command,with END FILE command,with END FILE command
LOOP (command),LOOP (command),LOOP (command)
with END CASE command,with END CASE command,with END CASE command

A loop structure and an END CASE command within an input program can be used to create data without any data input. The END FILE command must be used outside the loop (but within the input program) to terminate processing.

Example

INPUT PROGRAM.
LOOP #I=1 TO 20.
COMPUTE AMOUNT=RND(UNIFORM(5000))/100.
END CASE.
END LOOP.
END FILE.
END INPUT PROGRAM.

PRINT FORMATS AMOUNT (DOLLAR6.2).
PRINT /AMOUNT.
EXECUTE.

• This example creates 20 cases with a single variable, AMOUNT. AMOUNT is a uniformly distributed number between 0 and 5,000, rounded to an integer and divided by 100 to provide a variable in dollars and cents.

• The END FILE command is required to terminate processing once the loop structure is complete.

Scratch vs. Permanent Index Variables

Permanent variables are reinitialized to system-missing for each case, but scratch variables are initialized to 0 and are not reinitialized for each case; instead they retain their previous values. For loops that don't span cases, this is not an important factor, but in an input program a nested loop can persist across cases. In such instances, the index counter is not affected because it is cached and restored after execution of the loop, but the results of commands within the loop that use the value of the index variables will be different for scratch and permanent index variables.

*using scratch index variables.
INPUT PROGRAM.
LOOP #i=1 to 3.
- LOOP #j=#i to 4.
-  COMPUTE var1=#i.
-  COMPUTE var2=#j.
-  END CASE.
- END LOOP.
END LOOP.
END FILE.
END INPUT PROGRAM.
LIST.

*using non-scratch index variables.
INPUT PROGRAM.
LOOP i=1 to 3.
- LOOP j=i to 4.
-  COMPUTE var1=i.
-  COMPUTE var2=j.
-  END CASE.
- END LOOP.
END LOOP.
END FILE.
END INPUT PROGRAM.
LIST.
Case listing from loop using scratch variables
    var1     var2

    1.00     1.00
    1.00     2.00
    1.00     3.00
    1.00     4.00
    2.00     2.00
    2.00     3.00
    2.00     4.00
    3.00     3.00
    3.00     4.00
Case listing from loop using permanent variables
       i        j     var1     var2

    1.00     1.00     1.00     1.00
     .       2.00      .       2.00
     .       3.00      .       3.00
     .       4.00      .       4.00
    2.00     2.00     2.00     2.00
     .       3.00      .       3.00
     .       4.00      .       4.00
    3.00     3.00     3.00     3.00
     .       4.00      .       4.00

• Aside from the fact that the use of permanent variables as index variables results in the creation (or replacement) of those variables in the active dataset, note that many of the value for var1 (and i) are missing in the results from the input program that uses permanent variables as index variables, while none are missing from the one that uses scratch variables.

• In both cases, the inner loop ends with the END CASE command, which causes the permanent variable i to be reinitialized to system-missing for subsequent iterations of the inner loop, but the scratch variable #i retains its previous value.

• When control passes to the outer loop again, the cached index value is used to set and increment i; so it has a non-missing value for the first iteration of the inner loop, but once END CASE is encountered, it becomes missing again until control passes to the outer loop again.

See the topic Scratch Variables for more information.

Related Topics

LOOP-END LOOP
Overview (LOOP-END LOOP command)
Examples (LOOP-END LOOP command)
IF Keyword (LOOP-END LOOP command)
Indexing Clause (LOOP-END LOOP command)
BY Keyword (LOOP-END LOOP command)
Missing Values (LOOP-END LOOP command)


MANOVA

MANOVA (command),MANOVA (command),MANOVA (command)
MANOVA (command),MANOVA (command),MANOVA (command)
syntax chart,syntax chart,syntax chart

MANOVA is available in the Advanced Statistics option.

MANOVA dependent varlist [BY factor list (min,max)[factor list...]
                         [WITH covariate list]]

 [/WSFACTORS=varname (levels) [varname...] ]

 [/WSDESIGN]*

 [/TRANSFORM [(dependent varlist [/dependent varlist])]=
                     [ORTHONORM] [{CONTRAST}]  {DEVIATION (refcat)   } ]
                                  {BASIS   }   {DIFFERENCE           }
                                               {HELMERT              }
                                               {SIMPLE (refcat)      }
                                               {REPEATED             }
                                               {POLYNOMIAL [({1,2,3...})]}
                                               {             {metric  }  }
                                               {SPECIAL (matrix)     }

 [/MEASURE=newname newname...]

 [/RENAME={newname} {newname}...]
          {*      } {*      }

 [/ERROR={WITHIN           } ]
         {RESIDUAL         }
         {WITHIN + RESIDUAL}
         {n                }

 [/CONTRAST (factorname)={DEVIATION** [(refcat)]    }] †
                         {POLYNOMIAL**[({1,2,3...})]}
                         {              {metric  }  }
                         {SIMPLE [(refcat)]         }
                         {DIFFERENCE                }
                         {HELMERT                   }
                         {REPEATED                  }
                         {SPECIAL (matrix)          }

 [/PARTITION (factorname)[=({1,1...  })]]
                            {n1,n2...}

 [/METHOD=[{UNIQUE**  }]  [{CONSTANT**}] [{QR**    }]]
           {SEQUENTIAL}    {NOCONSTANT}   {CHOLESKY}

 [/{PRINT  }= [CELLINFO [([MEANS] [SSCP] [COV] [COR] [ALL])]]
   {NOPRINT}  [HOMOGENEITY [([ALL] [BARTLETT] [COCHRAN] [BOXM])]]
              [DESIGN [([OVERALL] [ONEWAY] [DECOMP] [BIAS] [SOLUTION]
                       [REDUNDANCY] [COLLINEARITY] [ALL])]]
              [PARAMETERS [([ESTIM] [ORTHO][COR][NEGSUM][EFSIZE][OPTIMAL][ALL])]]
              [SIGNIF [[(SINGLEDF)]
                       [(MULTIV**)] [(EIGEN)] [(DIMENR)]
                       [(UNIV**)] [(HYPOTH)][(STEPDOWN)] [(BRIEF)]
                       [{(AVERF**)}] [(HF)] [(GG)] [(EFSIZE)]]
                        {(AVONLY) }
             [ERROR[(STDDEV)][(COR)][(COV)][(SSCP)]]

 [/OMEANS =[VARIABLES(varlist)] [TABLES ({factor name     }] ]
                                         {factor BY factor}
                                         {CONSTANT        }

 [/PMEANS =[VARIABLES(varlist)] [TABLES ({factor name     })] [PLOT]] ]
                                         {factor BY factor}
                                         {CONSTANT        }

 [/RESIDUALS=[CASEWISE] [PLOT] ]

 [/POWER=[T({.05**})] [F({.05**})] [{APPROXIMATE}]]
            {a    }      {a    }    {EXACT      }

 [/CINTERVAL=[{INDIVIDUAL}][({.95}) ]
              {JOINT     }   {a  }
             [UNIVARIATE ({SCHEFFE})]
                          {BONFER }
             [MULTIVARIATE  ({ROY      })]  ]
                             {PILLAI   }
                             {BONFER   }
                             {HOTELLING}
                             {WILKS    }
 [/PCOMPS [COR] [COV] [ROTATE(rottype)]
          [NCOMP(n)] [MINEIGEN(eigencut)] [ALL] ]

 [/PLOT=[BOXPLOTS] [CELLPLOTS] [NORMAL]  [ALL] ]

 [/DISCRIM [RAW] [STAN] [ESTIM] [COR] [ALL]
           [ROTATE(rottype)] [ALPHA({.25**})]]
                                    {a    }

 [/MISSING=[LISTWISE**] [{EXCLUDE**}] ]
                         {INCLUDE  }

 [/MATRIX=[IN({file})]  [OUT({file})]]
              {[*] }         {[*] }

 [/ANALYSIS [({UNCONDITIONAL**})]=[(]dependent varlist
              {CONDITIONAL    }      [WITH covariate varlist]
                                      [/dependent varlist...][)][WITH varlist] ]

 [/DESIGN={factor [(n)]  }[BY factor[(n)]] [WITHIN factor[(n)]][WITHIN...]
          {[POOL(varlist)}

          [+ {factor [(n)] }...]
             {POOL(varlist)}

          [[= n] {AGAINST} {WITHIN  }
                 {VS     } {RESIDUAL}
                           {WR      }
                           {n       }

          [{factor [(n)] } ... ]
           {POOL(varlist)}

          [MWITHIN factor(n)]
          [MUPLUS]
          [CONSTANT [=n] ]

* WSDESIGN uses the same specification as DESIGN, with only within-subjects factors.

† DEVIATION is the default for between-subjects factors, while POLYNOMIAL is the default for within-subjects factors.

** Default if the subcommand or keyword is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See MANOVA Algorithms for computational details for this procedure.

Example 1

* Analysis of Variance

MANOVA RESULT BY TREATMNT(1,4) GROUP(1,2).

Example 2

* Analysis of Covariance

MANOVA RESULT BY TREATMNT(1,4) GROUP(1,2) WITH RAINFALL.

Example 3

* Repeated Measures Analysis

MANOVA SCORE1 TO SCORE4 BY CLASS(1,2)
  /WSFACTORS=MONTH(4).

Example 4

* Parallelism Test with Crossed Factors

MANOVA YIELD BY PLOT(1,4) TYPEFERT(1,3) WITH FERT
  /ANALYSIS YIELD
  /DESIGN FERT, PLOT, TYPEFERT, PLOT BY TYPEFERT,
   FERT BY PLOT + FERT BY TYPEFERT
   + FERT BY PLOT BY TYPEFERT.

Related Topics

Overview (MANOVA command)
MANOVA and General Linear Model (GLM) (MANOVA command)
MANOVA: Univariate
MANOVA: Multivariate
MANOVA: Repeated Measures


Overview (MANOVA command)

MANOVA (multivariate analysis of variance) is a generalized procedure for analysis of variance and covariance. MANOVA is a powerful procedure and can be used for both univariate and multivariate designs. MANOVA allows you to perform the following tasks:

• Specify nesting of effects.

• Specify individual error terms for effects in mixed-model analyses.

• Estimate covariate-by-factor interactions to test the assumption of homogeneity of regressions.

• Obtain parameter estimates for a variety of contrast types, including irregularly spaced polynomial contrasts with multiple factors.

• Test user-specified special contrasts with multiple factors.

• Partition effects in models.

• Pool effects in models.

Related Topics

MANOVA
MANOVA and General Linear Model (GLM) (MANOVA command)


MANOVA and General Linear Model (GLM) (MANOVA command)

MANOVA (command),MANOVA (command),MANOVA (command)
compared with GLM command,compared with GLM command,compared with GLM command

MANOVA is available only in syntax. GLM (general linear model), the other generalized procedure for analysis of variance and covariance, is available both in syntax and via the dialog boxes. The major distinction between GLM and MANOVA in terms of statistical design and functionality is that GLM uses a non-full-rank, or overparameterized, indicator variable approach to parameterization of linear models (instead of the full-rank reparameterization approach that is used in MANOVA). GLM uses a generalized inverse approach and uses the aliasing of redundant parameters to zero to allow greater flexibility in handling a variety of data situations, particularly situations involving empty cells. For features that are provided by GLM but unavailable in MANOVA, refer to General Linear Model (GLM) and MANOVA (GLM command).

To simplify the presentation, MANOVA reference material is divided into three sections: univariate designs with one dependent variable; multivariate designs with several interrelated dependent variables; and repeated measures designs in which the dependent variables represent the same types of measurements, taken at more than one time.

The full syntax diagram for MANOVA is presented here. The sections that follow include partial syntax diagrams that show the subcommands and specifications that are discussed in that section. Individually, those diagrams are incomplete. Subcommands that are listed for univariate designs are available for any analysis, and subcommands that are listed for multivariate designs can be used in any multivariate analysis, including repeated measures.

MANOVA was designed and programmed by Philip Burns of Northwestern University.

Related Topics

MANOVA
Overview (MANOVA command)


MANOVA: Univariate

MANOVA (command),MANOVA (command),MANOVA (command)
MANOVA (command),MANOVA (command),MANOVA (command)
syntax chart,syntax chart,syntax chart

MANOVA is available in the Advanced Statistics option.

MANOVA dependent var [BY factor list (min,max)][factor list...]
                     [WITH covariate list]
 [/ERROR={WITHIN           } ]
         {RESIDUAL         }
         {WITHIN + RESIDUAL}
         {n                }
 [/CONTRAST (factor name)={DEVIATION** [(refcat)]    }]
                          {POLYNOMIAL  [({1,2,3...})]}
                          {              {metric  }  }
                          {SIMPLE [(refcat)]         }
                          {DIFFERENCE                }
                          {HELMERT                   }
                          {REPEATED                  }
                          {SPECIAL (matrix)          }
 [/PARTITION (factor name)[=({1,1...  })]]
                             {n1,n2...}
 [/METHOD=[{UNIQUE**  }]  [{CONSTANT**}] [{QR**    }]]
           {SEQUENTIAL}    {NOCONSTANT}   {CHOLESKY}
 [/{PRINT  }= [CELLINFO [([MEANS] [SSCP] [COV] [COR] [ALL])]]
   {NOPRINT}  [HOMOGENEITY [([ALL] [BARTLETT] [COCHRAN])]]
              [DESIGN [([OVERALL] [ONEWAY] [DECOMP] [BIAS] [SOLUTION]
                       [REDUNDANCY] [COLLINEARITY])]]
              [PARAMETERS [([ESTIM][ORTHO][COR][NEGSUM][EFSIZE][OPTIMAL][ALL])]]
              [SIGNIF[(SINGLEDF)]]
              [ERROR[(STDDEV)]]                                            ]
 [/OMEANS =[VARIABLES(varlist)] [TABLES ({factor name     }] ]
                                         {factor BY factor}
                                         {CONSTANT        }
 [/PMEANS =[TABLES ({factor name     })] [PLOT]] ]
                    {factor BY factor}
                    {CONSTANT        }
 [/RESIDUALS=[CASEWISE] [PLOT] ]
 [/POWER=[T({.05**})] [F({.05**})] [{APPROXIMATE}]]
            {a    }      {a    }    {EXACT      }
 [/CINTERVAL=[{INDIVIDUAL}][({.95}) ]] [UNIVARIATE ({SCHEFFE})]
              {JOINT     }   {  a}                  {BONFER }
 [/PLOT=[BOXPLOTS] [CELLPLOTS] [NORMAL]  [ALL] ]
 [/MISSING=[LISTWISE**] [{EXCLUDE**}] ]
                         {INCLUDE  }
 [/MATRIX=[IN({file})]  [OUT({file})]]
              {[*] }         {[*] }
 [/ANALYSIS=dependent var [WITH covariate list]]
 [/DESIGN={factor [(n)]  }[BY factor[(n)]] [WITHIN factor[(n)]][WITHIN...]]
          {[POOL(varlist)}
          [+ {factor [(n)] }...]
             {POOL(varlist)}
          [[= n] {AGAINST} {WITHIN  }
                 {VS     } {RESIDUAL}
                           {WR      }
                           {n       }
          [{factor [(n)] } ... ]
           {POOL(varlist)}
          [MUPLUS]
          [MWITHIN factor(n)]
          [CONSTANT [=n] ]

** Default if the subcommand or keyword is omitted.

Example

MANOVA YIELD BY SEED(1,4) FERT(1,3)
  /DESIGN.

Related Topics

Overview (MANOVA: Univariate command)
Example (MANOVA: Univariate command)
MANOVA Variable List (MANOVA: Univariate command)
ERROR Subcommand (MANOVA: Univariate command)
CONTRAST Subcommand (MANOVA: Univariate command)
PARTITION Subcommand (MANOVA: Univariate command)
METHOD Subcommand (MANOVA: Univariate command)
PRINT and NOPRINT Subcommands (MANOVA: Univariate command)
CELLINFO Keyword (MANOVA: Univariate command)
PARAMETERS Keyword (MANOVA: Univariate command)
SIGNIF Keyword (MANOVA: Univariate command)
HOMOGENEITY Keyword (MANOVA: Univariate command)
DESIGN Keyword (MANOVA: Univariate command)
ERROR Keyword (MANOVA: Univariate command)
OMEANS Subcommand (MANOVA: Univariate command)
PMEANS Subcommand (MANOVA: Univariate command)
RESIDUALS Subcommand (MANOVA: Univariate command)
POWER Subcommand (MANOVA: Univariate command)
CINTERVAL Subcommand (MANOVA: Univariate command)
PLOT Subcommand (MANOVA: Univariate command)
MISSING Subcommand (MANOVA: Univariate command)
MATRIX Subcommand (MANOVA: Univariate command)
ANALYSIS Subcommand (MANOVA: Univariate command)
DESIGN Subcommand (MANOVA: Univariate command)
References (MANOVA: Univariate command)
MANOVA
MANOVA: Multivariate
MANOVA: Repeated Measures


Overview (MANOVA: Univariate command)

This section describes the use of MANOVA for univariate analyses. However, the subcommands that are described here can be used in any type of analysis with MANOVA. For additional subcommands that are used in multivariate analysis, see MANOVA: Multivariate. For additional subcommands that are used in repeated measures analysis, see MANOVA: Repeated Measures. For basic specification, syntax rules, and limitations of the MANOVA procedures, see MANOVA.

Options Collapse Hide details

Options

Design Specification. You can use the DESIGN subcommand to specify which terms to include in the design. This ability allows you to estimate a model other than the default full factorial model, incorporate factor-by-covariate interactions, indicate nesting of effects, and indicate specific error terms for each effect in mixed models. You can specify a different continuous variable as a dependent variable or work with a subset of the continuous variables with the ANALYSIS subcommand.

Contrast Types. You can specify contrasts other than the default deviation contrasts on the CONTRAST subcommand. You can also subdivide the degrees of freedom associated with a factor (using the PARTITION subcommand) and test the significance of a specific contrast or group of contrasts.

Optional Output. You can choose from a variety of optional output on the PRINT subcommand or suppress output using the NOPRINT subcommand. Output that is appropriate to univariate designs includes cell means, design or other matrices, parameter estimates, and tests for homogeneity of variance across cells. Using the OMEANS, PMEANS, RESIDUAL, and PLOT subcommands, you can also request tables of observed and/or predicted means, casewise values and residuals for your model, and various plots that are useful in checking assumptions. In addition, you can use the POWER subcommand to request observed power values (based on fixed-effect assumptions), and you can use the CINTERVAL subcommand to request simultaneous confidence intervals for each parameter estimate and regression coefficient.

Matrix Materials. You can write matrices of intermediate results to a matrix data file, and you can read such matrices in performing further analyses by using the MATRIX subcommand.

Basic Specification Collapse Hide details

Basic Specification

• The basic specification is a variable list that identifies the dependent variable, the factors (if any), and the covariates (if any).

• By default, MANOVA uses a full factorial model, which includes all main effects and all possible interactions among factors. Estimation is performed by using the cell-means model and UNIQUE (regression-type) sums of squares, adjusting each effect for all other effects in the model. Parameters are estimated by using DEVIATION contrasts to determine whether their categories differ significantly from the mean.

Subcommand Order Collapse Hide details

Subcommand Order

• The variable list must be specified first.

• Subcommands that are applicable to a specific design must be specified before that DESIGN subcommand. Otherwise, subcommands can be used in any order.

Syntax Rules Collapse Hide details

Syntax Rules

• For many analyses, the MANOVA variable list and the DESIGN subcommand are the only specifications that are needed. If a full factorial design is desired, DESIGN can be omitted.

• All other subcommands apply only to designs that follow. If you do not enter a DESIGN subcommand, or if the last subcommand is not DESIGN, MANOVA uses a full factorial model.

• Unless replaced, MANOVA subcommands (other than DESIGN) remain in effect for all subsequent models.

• MISSING can be specified only once.

• The following words are reserved as keywords or internal commands in the MANOVA procedure: AGAINST, CONSPLUS, CONSTANT, CONTIN, MUPLUS, MWITHIN, POOL, R, RESIDUAL, RW, VERSUS, VS, W, WITHIN, and WR. Variable names that duplicate these words should be changed before you invoke MANOVA.

• If you enter one of the multivariate specifications in a univariate analysis, MANOVA will ignore it.

Limitations Collapse Hide details

Limitations

• A maximum of 20 factors is in place.

• A maximum of 200 dependent variables is in place.

• Memory requirements depend primarily on the number of cells in the design. For the default full factorial model, the number of cells equals the product of the number of levels or categories in each factor.

Related Topics

MANOVA: Univariate
Example (MANOVA: Univariate command)
MANOVA Variable List (MANOVA: Univariate command)
ERROR Subcommand (MANOVA: Univariate command)
CONTRAST Subcommand (MANOVA: Univariate command)
PARTITION Subcommand (MANOVA: Univariate command)
METHOD Subcommand (MANOVA: Univariate command)
PRINT and NOPRINT Subcommands (MANOVA: Univariate command)
CELLINFO Keyword (MANOVA: Univariate command)
PARAMETERS Keyword (MANOVA: Univariate command)
SIGNIF Keyword (MANOVA: Univariate command)
HOMOGENEITY Keyword (MANOVA: Univariate command)
DESIGN Keyword (MANOVA: Univariate command)
ERROR Keyword (MANOVA: Univariate command)
OMEANS Subcommand (MANOVA: Univariate command)
PMEANS Subcommand (MANOVA: Univariate command)
RESIDUALS Subcommand (MANOVA: Univariate command)
POWER Subcommand (MANOVA: Univariate command)
CINTERVAL Subcommand (MANOVA: Univariate command)
PLOT Subcommand (MANOVA: Univariate command)
MISSING Subcommand (MANOVA: Univariate command)
MATRIX Subcommand (MANOVA: Univariate command)
ANALYSIS Subcommand (MANOVA: Univariate command)
DESIGN Subcommand (MANOVA: Univariate command)
References (MANOVA: Univariate command)


Example (MANOVA: Univariate command)

MANOVA YIELD BY SEED(1,4) FERT(1,3) WITH RAINFALL
  /PRINT=CELLINFO(MEANS) PARAMETERS(ESTIM)
  /DESIGN.

• YIELD is the dependent variable; SEED (with values 1, 2, 3, and 4) and FERT (with values 1, 2, and 3) are factors; RAINFALL is a covariate.

• The PRINT subcommand requests the means of the dependent variable for each cell and the default deviation parameter estimates.

• The DESIGN subcommand requests the default design, a full factorial model. This subcommand could have been omitted or could have been specified in full as:

/DESIGN = SEED, FERT, SEED BY FERT.

Related Topics

MANOVA: Univariate
Overview (MANOVA: Univariate command)
MANOVA Variable List (MANOVA: Univariate command)
ERROR Subcommand (MANOVA: Univariate command)
CONTRAST Subcommand (MANOVA: Univariate command)
PARTITION Subcommand (MANOVA: Univariate command)
METHOD Subcommand (MANOVA: Univariate command)
PRINT and NOPRINT Subcommands (MANOVA: Univariate command)
CELLINFO Keyword (MANOVA: Univariate command)
PARAMETERS Keyword (MANOVA: Univariate command)
SIGNIF Keyword (MANOVA: Univariate command)
HOMOGENEITY Keyword (MANOVA: Univariate command)
DESIGN Keyword (MANOVA: Univariate command)
ERROR Keyword (MANOVA: Univariate command)
OMEANS Subcommand (MANOVA: Univariate command)
PMEANS Subcommand (MANOVA: Univariate command)
RESIDUALS Subcommand (MANOVA: Univariate command)
POWER Subcommand (MANOVA: Univariate command)
CINTERVAL Subcommand (MANOVA: Univariate command)
PLOT Subcommand (MANOVA: Univariate command)
MISSING Subcommand (MANOVA: Univariate command)
MATRIX Subcommand (MANOVA: Univariate command)
ANALYSIS Subcommand (MANOVA: Univariate command)
DESIGN Subcommand (MANOVA: Univariate command)
References (MANOVA: Univariate command)


MANOVA Variable List (MANOVA: Univariate command)

The variable list specifies all variables that will be used in any subsequent analyses.

• The dependent variable must be the first specification on MANOVA.

• By default, MANOVA treats a list of dependent variables as jointly dependent, implying a multivariate design. However, you can use the ANALYSIS subcommand to change the role of a variable or its inclusion status in the analysis.

• The names of the factors follow the dependent variable. Use the keyword BY to separate the factors from the dependent variable.

• Factors must have adjacent integer values, and you must supply the minimum and maximum values in parentheses after the factor name(s).

• If several factors have the same value range, you can specify a list of factors followed by a single value range in parentheses.

• Certain one-cell designs, such as univariate and multivariate regression analysis, canonical correlation, and one-sample Hotelling’s T2, do not require a factor specification. To perform these analyses, omit the keyword BY and the factor list.

• Enter the covariates, if any, following the factors and their ranges. Use the keyword WITH to separate covariates from factors (if any) and the dependent variable.

Example

MANOVA DEPENDNT BY FACTOR1 (1,3) FACTOR2, FACTOR3 (1,2).

• In this example, three factors are specified.

• FACTOR1 has values 1, 2, and 3, while FACTOR2 and FACTOR3 have values 1 and 2.

• A default full factorial model is used for the analysis.

Example

MANOVA Y BY A(1,3) WITH X
  /DESIGN.

• In this example, the A effect is tested after adjusting for the effect of the covariate X. It is a test of equality of adjusted A means.

• The test of the covariate X is adjusted for A. The test is a test of the pooled within-groups regression of Y on X.

Related Topics

MANOVA: Univariate
Overview (MANOVA: Univariate command)
Example (MANOVA: Univariate command)
ERROR Subcommand (MANOVA: Univariate command)
CONTRAST Subcommand (MANOVA: Univariate command)
PARTITION Subcommand (MANOVA: Univariate command)
METHOD Subcommand (MANOVA: Univariate command)
PRINT and NOPRINT Subcommands (MANOVA: Univariate command)
CELLINFO Keyword (MANOVA: Univariate command)
PARAMETERS Keyword (MANOVA: Univariate command)
SIGNIF Keyword (MANOVA: Univariate command)
HOMOGENEITY Keyword (MANOVA: Univariate command)
DESIGN Keyword (MANOVA: Univariate command)
ERROR Keyword (MANOVA: Univariate command)
OMEANS Subcommand (MANOVA: Univariate command)
PMEANS Subcommand (MANOVA: Univariate command)
RESIDUALS Subcommand (MANOVA: Univariate command)
POWER Subcommand (MANOVA: Univariate command)
CINTERVAL Subcommand (MANOVA: Univariate command)
PLOT Subcommand (MANOVA: Univariate command)
MISSING Subcommand (MANOVA: Univariate command)
MATRIX Subcommand (MANOVA: Univariate command)
ANALYSIS Subcommand (MANOVA: Univariate command)
DESIGN Subcommand (MANOVA: Univariate command)
References (MANOVA: Univariate command)


ERROR Subcommand (MANOVA: Univariate command)

ERROR (subcommand),ERROR (subcommand),ERROR (subcommand)
MANOVA command,MANOVA command,MANOVA command
MANOVA (command),MANOVA (command),MANOVA (command)
ERROR subcommand,ERROR subcommand,ERROR subcommand
WITHIN (keyword),WITHIN (keyword),WITHIN (keyword)
MANOVA command,MANOVA command,MANOVA command
RESIDUAL (keyword),RESIDUAL (keyword),RESIDUAL (keyword)
MANOVA command,MANOVA command,MANOVA command

ERROR allows you to specify or change the error term that is used to test all effects for which you do not explicitly specify an error term on the DESIGN subcommand. ERROR affects all terms in all subsequent designs, except terms for which you explicitly provide an error term.

WITHIN | Terms in the model are tested against the within-cell sum of squares. This specification can be abbreviated to W. This setting is the default unless there is no variance within cells or a continuous variable is named on the DESIGN subcommand.
RESIDUAL | Terms in the model are tested against the residual sum of squares. This specification can be abbreviated to R. This specification includes all terms not named on the DESIGN subcommand.
WITHIN+RESIDUAL | Terms are tested against the pooled within-cells and residual sum of squares. This specification can be abbreviated to WR or RW. This setting is the default for designs in which a continuous variable appears on the DESIGN subcommand.
error number | Terms are tested against a numbered error term. The error term must be defined on each DESIGN subcommand. For a discussion of error terms, see DESIGN Keyword (MANOVA: Univariate command).

• If you specify ERROR=WITHIN+RESIDUAL and one of the components does not exist, MANOVA uses the other component alone.

• If you specify your own error term by number and a design does not have an error term with the specified number, MANOVA does not carry out significance tests. MANOVA will, however, display hypothesis sums of squares and, if requested, parameter estimates.

Example

MANOVA DEP BY A(1,2) B(1,4)
  /ERROR = 1
  /DESIGN = A, B, A BY B = 1 VS WITHIN
  /DESIGN = A, B.

• ERROR defines error term 1 as the default error term.

• In the first design, A by B is defined as error term 1 and is therefore used to test the A and B effects. The A by B effect itself is explicitly tested against the within-cells error.

• In the second design, no term is defined as error term 1, so no significance tests are carried out. Hypothesis sums of squares are displayed for A and B.

Related Topics

MANOVA: Univariate
Overview (MANOVA: Univariate command)
Example (MANOVA: Univariate command)
MANOVA Variable List (MANOVA: Univariate command)
CONTRAST Subcommand (MANOVA: Univariate command)
PARTITION Subcommand (MANOVA: Univariate command)
METHOD Subcommand (MANOVA: Univariate command)
PRINT and NOPRINT Subcommands (MANOVA: Univariate command)
CELLINFO Keyword (MANOVA: Univariate command)
PARAMETERS Keyword (MANOVA: Univariate command)
SIGNIF Keyword (MANOVA: Univariate command)
HOMOGENEITY Keyword (MANOVA: Univariate command)
DESIGN Keyword (MANOVA: Univariate command)
ERROR Keyword (MANOVA: Univariate command)
OMEANS Subcommand (MANOVA: Univariate command)
PMEANS Subcommand (MANOVA: Univariate command)
RESIDUALS Subcommand (MANOVA: Univariate command)
POWER Subcommand (MANOVA: Univariate command)
CINTERVAL Subcommand (MANOVA: Univariate command)
PLOT Subcommand (MANOVA: Univariate command)
MISSING Subcommand (MANOVA: Univariate command)
MATRIX Subcommand (MANOVA: Univariate command)
ANALYSIS Subcommand (MANOVA: Univariate command)
DESIGN Subcommand (MANOVA: Univariate command)
References (MANOVA: Univariate command)


CONTRAST Subcommand (MANOVA: Univariate command)

MANOVA (command),MANOVA (command),MANOVA (command)
CONTRAST subcommand,CONTRAST subcommand,CONTRAST subcommand
CONTRAST (subcommand),CONTRAST (subcommand),CONTRAST (subcommand)
MANOVA command,MANOVA command,MANOVA command

CONTRAST specifies the type of contrast that is desired among the levels of a factor. For a factor with k levels or values, the contrast type determines the meaning of its k−1 degrees of freedom. If the subcommand is omitted or is specified with no keyword, the default is DEVIATION for between-subjects factors.

• Specify the factor name in parentheses following the subcommand CONTRAST.

• You can specify only one factor per CONTRAST subcommand, but you can enter multiple CONTRAST subcommands.

• After closing the parentheses, enter an equals sign followed by one of the contrast keywords.

• To obtain F tests for individual degrees of freedom for the specified contrast, enter the factor name followed by a number in parentheses on the DESIGN subcommand. The number refers to a partition of the factor’s degrees of freedom. If you do not use the PARTITION subcommand, each degree of freedom is a distinct partition.

DEVIATION (keyword),DEVIATION (keyword),DEVIATION (keyword)
MANOVA command,MANOVA command,MANOVA command

The following contrast types are available:

DIFFERENCE (keyword),DIFFERENCE (keyword),DIFFERENCE (keyword)
MANOVA command,MANOVA command,MANOVA command
REPEATED (keyword),REPEATED (keyword),REPEATED (keyword)
MANOVA command,MANOVA command,MANOVA command
HELMERT (keyword),HELMERT (keyword),HELMERT (keyword)
MANOVA command,MANOVA command,MANOVA command
SIMPLE (keyword),SIMPLE (keyword),SIMPLE (keyword)
MANOVA command,MANOVA command,MANOVA command
SPECIAL (keyword),SPECIAL (keyword),SPECIAL (keyword)
MANOVA command,MANOVA command,MANOVA command
DEVIATION | Deviations from the grand mean. This setting is the default for between-subjects factors. Each level of the factor (except one level) is compared to the grand mean. One category (by default, the last category) must be omitted so that the effects will be independent of one another. To omit a category other than the last category, specify the number of the omitted category (which is not necessarily the same as its value) in parentheses after the keyword DEVIATION. An example is as follows:
 | MANOVA A BY B(2,4) /CONTRAST(B)=DEVIATION(1).
 | The specified contrast omits the first category, in which B has the value 2. Deviation contrasts are not orthogonal.
POLYNOMIAL | Polynomial contrasts. This setting is the default for within-subjects factors. The first degree of freedom contains the linear effect across the levels of the factor, the second degree of freedom contains the quadratic effect, and so on. In a balanced design, polynomial contrasts are orthogonal. By default, the levels are assumed to be equally spaced; you can specify unequal spacing by entering a metric—consisting of one integer for each level of the factor—in parentheses after the keyword POLYNOMIAL. An example is as follows:
 | MANOVA RESPONSE BY STIMULUS (4,6) /CONTRAST(STIMULUS) = POLYNOMIAL(1,2,4).
 | The specified contrast indicates that the three levels of STIMULUS are actually in the proportion 1:2:4. The default metric is always (1,2,...,k), where k levels are involved. Only the relative differences between the terms of the metric matter. (1,2,4) is the same metric as (2,3,5) or (20,30,50) because, in each instance, the difference between the second and third numbers is twice the difference between the first and second numbers.
DIFFERENCE | Difference or reverse Helmert contrasts. Each level of the factor (except the first level) is compared to the mean of the previous levels. In a balanced design, difference contrasts are orthogonal.
HELMERT | Helmert contrasts. Each level of the factor (except the last level) is compared to the mean of subsequent levels. In a balanced design, Helmert contrasts are orthogonal.
SIMPLE | Contrast where each level of the factor (except the last level) is compared to the last level. To use a category (other than the last category) as the omitted reference category, specify its number (which is not necessarily the same as its value) in parentheses following the keyword SIMPLE. An example is as follows:
 | MANOVA A BY B(2,4) /CONTRAST(B)=SIMPLE(1).
 | The specified contrast compares the other levels to the first level of B, in which B has the value 2. Simple contrasts are not orthogonal.
REPEATED | Comparison of adjacent levels. Each level of the factor (except the last level) is compared to the next level. Repeated contrasts are not orthogonal.
SPECIAL | A user-defined contrast. After this keyword, enter a square matrix in parentheses with as many rows and columns as there are levels in the factor. The first row represents the mean effect of the factor and is generally a vector of 1’s. The row represents a set of weights indicating how to collapse over the categories of this factor in estimating parameters for other factors. The other rows of the contrast matrix contain the special contrasts indicating the desired comparisons between levels of the factor. If the special contrasts are linear combinations of each other, MANOVA reports the linear dependency and stops processing.

Orthogonal contrasts are particularly useful. In a balanced design, contrasts are orthogonal if the sum of the coefficients in each contrast row is 0 and if, for any pair of contrast rows, the products of corresponding coefficients sum to 0. DIFFERENCE, HELMERT, and POLYNOMIAL contrasts always meet these criteria in balanced designs.

Example

MANOVA DEP BY FAC(1,5)
  /CONTRAST(FAC)=DIFFERENCE
  /DESIGN=FAC(1) FAC(2) FAC(3) FAC(4).

• The factor FAC has five categories and therefore four degrees of freedom.

• CONTRAST requests DIFFERENCE contrasts, which compare each level (except the first level) with the mean of the previous levels.

• Each of the four degrees of freedom is tested individually on the DESIGN subcommand.

Related Topics

MANOVA: Univariate
Overview (MANOVA: Univariate command)
Example (MANOVA: Univariate command)
MANOVA Variable List (MANOVA: Univariate command)
ERROR Subcommand (MANOVA: Univariate command)
PARTITION Subcommand (MANOVA: Univariate command)
METHOD Subcommand (MANOVA: Univariate command)
PRINT and NOPRINT Subcommands (MANOVA: Univariate command)
CELLINFO Keyword (MANOVA: Univariate command)
PARAMETERS Keyword (MANOVA: Univariate command)
SIGNIF Keyword (MANOVA: Univariate command)
HOMOGENEITY Keyword (MANOVA: Univariate command)
DESIGN Keyword (MANOVA: Univariate command)
ERROR Keyword (MANOVA: Univariate command)
OMEANS Subcommand (MANOVA: Univariate command)
PMEANS Subcommand (MANOVA: Univariate command)
RESIDUALS Subcommand (MANOVA: Univariate command)
POWER Subcommand (MANOVA: Univariate command)
CINTERVAL Subcommand (MANOVA: Univariate command)
PLOT Subcommand (MANOVA: Univariate command)
MISSING Subcommand (MANOVA: Univariate command)
MATRIX Subcommand (MANOVA: Univariate command)
ANALYSIS Subcommand (MANOVA: Univariate command)
DESIGN Subcommand (MANOVA: Univariate command)
References (MANOVA: Univariate command)


PARTITION Subcommand (MANOVA: Univariate command)

PARTITION (subcommand),PARTITION (subcommand),PARTITION (subcommand)
MANOVA command,MANOVA command,MANOVA command
MANOVA (command),MANOVA (command),MANOVA (command)
PARTITION subcommand,PARTITION subcommand,PARTITION subcommand

PARTITION subdivides the degrees of freedom that are associated with a factor. This process permits you to test the significance of the effect of a specific contrast or group of contrasts of the factor instead of the overall effect of all contrasts of the factor. The default is a single degree of freedom for each partition.

• Specify the factor name in parentheses following the PARTITION subcommand.

• Specify an integer list in parentheses after the optional equals sign to indicate the degrees of freedom for each partition.

• Each value in the partition list must be a positive integer, and the sum of the values cannot exceed the degrees of freedom for the factor.

• The degrees of freedom that are available for a factor are one less than the number of levels of the factor.

• The meaning of each degree of freedom depends on the contrast type for the factor. For example, with deviation contrasts (the default for between-subjects factors), each degree of freedom represents the deviation of the dependent variable in one level of the factor from its grand mean over all levels. With polynomial contrasts, the degrees of freedom represent the linear effect, the quadratic effect, and so on.

• If your list does not account for all the degrees of freedom, MANOVA adds one final partition containing the remaining degrees of freedom.

• You can use a repetition factor of the form n* to specify a series of partitions with the same number of degrees of freedom.

• To specify a model that tests only the effect of a specific partition of a factor in your design, include the number of the partition in parentheses on the DESIGN subcommand (see the example below).

• If you want the default single degree-of-freedom partition, you can omit the PARTITION subcommand and simply enter the appropriate term on the DESIGN subcommand.

Example

MANOVA OUTCOME BY TREATMNT(1,12)
  /PARTITION(TREATMNT) = (3*2,4)
  /DESIGN TREATMNT(2).

• The factor TREATMNT has 12 categories (hence, 11 degrees of freedom).

• PARTITION divides the effect of TREATMNT into four partitions, containing, respectively, 2, 2, 2, and 4 degrees of freedom. A fifth partition is formed to contain the remaining 1 degree of freedom.

• DESIGN specifies a model in which only the second partition of TREATMNT is tested. This partition contains the third and fourth degrees of freedom.

• Because the default contrast type for between-subjects factors is DEVIATION, this second partition represents the deviation of the third and fourth levels of TREATMNT from the grand mean.

Related Topics

MANOVA: Univariate
Overview (MANOVA: Univariate command)
Example (MANOVA: Univariate command)
MANOVA Variable List (MANOVA: Univariate command)
ERROR Subcommand (MANOVA: Univariate command)
CONTRAST Subcommand (MANOVA: Univariate command)
METHOD Subcommand (MANOVA: Univariate command)
PRINT and NOPRINT Subcommands (MANOVA: Univariate command)
CELLINFO Keyword (MANOVA: Univariate command)
PARAMETERS Keyword (MANOVA: Univariate command)
SIGNIF Keyword (MANOVA: Univariate command)
HOMOGENEITY Keyword (MANOVA: Univariate command)
DESIGN Keyword (MANOVA: Univariate command)
ERROR Keyword (MANOVA: Univariate command)
OMEANS Subcommand (MANOVA: Univariate command)
PMEANS Subcommand (MANOVA: Univariate command)
RESIDUALS Subcommand (MANOVA: Univariate command)
POWER Subcommand (MANOVA: Univariate command)
CINTERVAL Subcommand (MANOVA: Univariate command)
PLOT Subcommand (MANOVA: Univariate command)
MISSING Subcommand (MANOVA: Univariate command)
MATRIX Subcommand (MANOVA: Univariate command)
ANALYSIS Subcommand (MANOVA: Univariate command)
DESIGN Subcommand (MANOVA: Univariate command)
References (MANOVA: Univariate command)


METHOD Subcommand (MANOVA: Univariate command)

METHOD (subcommand),METHOD (subcommand),METHOD (subcommand)
MANOVA command,MANOVA command,MANOVA command
MANOVA (command),MANOVA (command),MANOVA (command)
METHOD subcommand,METHOD subcommand,METHOD subcommand

METHOD controls the computational aspects of the MANOVA analysis. You can specify one of two different methods for partitioning the sums of squares. The default is UNIQUE.

UNIQUE | Regression approach. Each term is corrected for every other term in the model. With this approach, sums of squares for various components of the model do not add up to the total sum of squares unless the design is balanced. This is the default if the METHOD subcommand is omitted or if neither of the two keywords is specified.
SEQUENTIAL | Hierarchical decomposition of the sums of squares. Each term is adjusted only for the terms that precede it on the DESIGN subcommand. This decomposition is an orthogonal decomposition, and the sums of squares in the model add up to the total sum of squares.

You can control how parameters are to be estimated by specifying one of the following two keywords that are available on MANOVA. The default is QR.

QR | Use modified Givens rotations. QR bypasses the normal equations and the inaccuracies that can result from creating the cross-products matrix, and it generally results in extremely accurate parameter estimates. This setting is the default if the METHOD subcommand is omitted or if neither of the two keywords is specified.
CHOLESKY | Use Cholesky decomposition of the cross-products matrix. This method is useful for large data sets with covariates entered on the DESIGN subcommand.

You can also control whether a constant term is included in all models. Two keywords are available on METHOD. The default is CONSTANT.

CONSTANT | All models include a constant (grand mean) term, even if none is explicitly specified on the DESIGN subcommand. This setting is the default if neither of the two keywords is specified.
NOCONSTANT | Exclude constant terms from models that do not include the keyword CONSTANT on the DESIGN subcommand.

Example

MANOVA DEP BY A B C (1,4)
  /METHOD=NOCONSTANT
  /DESIGN=A, B, C
  /METHOD=CONSTANT SEQUENTIAL
  /DESIGN.

• For the first design, a main-effects model, the METHOD subcommand requests the model to be fitted with no constant.

• The second design requests a full factorial model to be fitted with a constant and with a sequential decomposition of sums of squares.

Related Topics

MANOVA: Univariate
Overview (MANOVA: Univariate command)
Example (MANOVA: Univariate command)
MANOVA Variable List (MANOVA: Univariate command)
ERROR Subcommand (MANOVA: Univariate command)
CONTRAST Subcommand (MANOVA: Univariate command)
PARTITION Subcommand (MANOVA: Univariate command)
PRINT and NOPRINT Subcommands (MANOVA: Univariate command)
CELLINFO Keyword (MANOVA: Univariate command)
PARAMETERS Keyword (MANOVA: Univariate command)
SIGNIF Keyword (MANOVA: Univariate command)
HOMOGENEITY Keyword (MANOVA: Univariate command)
DESIGN Keyword (MANOVA: Univariate command)
ERROR Keyword (MANOVA: Univariate command)
OMEANS Subcommand (MANOVA: Univariate command)
PMEANS Subcommand (MANOVA: Univariate command)
RESIDUALS Subcommand (MANOVA: Univariate command)
POWER Subcommand (MANOVA: Univariate command)
CINTERVAL Subcommand (MANOVA: Univariate command)
PLOT Subcommand (MANOVA: Univariate command)
MISSING Subcommand (MANOVA: Univariate command)
MATRIX Subcommand (MANOVA: Univariate command)
ANALYSIS Subcommand (MANOVA: Univariate command)
DESIGN Subcommand (MANOVA: Univariate command)
References (MANOVA: Univariate command)


PRINT and NOPRINT Subcommands (MANOVA: Univariate command)

PRINT (subcommand),PRINT (subcommand),PRINT (subcommand)
MANOVA command,MANOVA command,MANOVA command
MANOVA (command),MANOVA (command),MANOVA (command)
PRINT subcommand,PRINT subcommand,PRINT subcommand
MANOVA (command),MANOVA (command),MANOVA (command)
NOPRINT subcommand,NOPRINT subcommand,NOPRINT subcommand
NOPRINT (subcommand),NOPRINT (subcommand),NOPRINT (subcommand)
MANOVA command,MANOVA command,MANOVA command

PRINT and NOPRINT control the display of optional output.

• Specifications on PRINT remain in effect for all subsequent designs.

• Some PRINT output, such as CELLINFO, applies to the entire MANOVA procedure and is displayed only once.

• You can turn off optional output that you have requested on PRINT by entering a NOPRINT subcommand with the specifications that were originally used on the PRINT subcommand.

• Additional output can be obtained on the PCOMPS, DISCRIM, OMEANS, PMEANS, PLOT, and RESIDUALS subcommands.

• Some optional output greatly increases the processing time. Request only the output that you want to see.

The following specifications are appropriate for univariate MANOVA analyses. For information about PRINT specifications that are appropriate for multivariate models, see PRINT and NOPRINT Subcommands (MANOVA: Multivariate command). For information about PRINT specifications that are appropriate for repeated measures models, see PRINT Subcommand (MANOVA: Repeated Measures command).

CELLINFO (keyword),CELLINFO (keyword),CELLINFO (keyword)
MANOVA command,MANOVA command,MANOVA command
CELLINFO | Basic information about each cell in the design.
PARAMETERS | Parameter estimates.
HOMOGENEITY | Tests of homogeneity of variance.
DESIGN | Design information.
ERROR | Error standard deviations.

Related Topics

MANOVA: Univariate
Overview (MANOVA: Univariate command)
Example (MANOVA: Univariate command)
MANOVA Variable List (MANOVA: Univariate command)
ERROR Subcommand (MANOVA: Univariate command)
CONTRAST Subcommand (MANOVA: Univariate command)
PARTITION Subcommand (MANOVA: Univariate command)
METHOD Subcommand (MANOVA: Univariate command)
CELLINFO Keyword (MANOVA: Univariate command)
PARAMETERS Keyword (MANOVA: Univariate command)
SIGNIF Keyword (MANOVA: Univariate command)
HOMOGENEITY Keyword (MANOVA: Univariate command)
DESIGN Keyword (MANOVA: Univariate command)
ERROR Keyword (MANOVA: Univariate command)
OMEANS Subcommand (MANOVA: Univariate command)
PMEANS Subcommand (MANOVA: Univariate command)
RESIDUALS Subcommand (MANOVA: Univariate command)
POWER Subcommand (MANOVA: Univariate command)
CINTERVAL Subcommand (MANOVA: Univariate command)
PLOT Subcommand (MANOVA: Univariate command)
MISSING Subcommand (MANOVA: Univariate command)
MATRIX Subcommand (MANOVA: Univariate command)
ANALYSIS Subcommand (MANOVA: Univariate command)
DESIGN Subcommand (MANOVA: Univariate command)
References (MANOVA: Univariate command)


CELLINFO Keyword (MANOVA: Univariate command)

You can request any of the following cell information by specifying the appropriate keyword(s) in parentheses after CELLINFO. The default is MEANS.

MEANS | Cell means, standard deviations, and counts for the dependent variable and covariates. Confidence intervals for the cell means are displayed if you have set a wide width. This setting is the default when CELLINFO is requested with no further specification.
SSCP | Within-cell sum-of-squares and cross-products matrices for the dependent variable and covariates.
COV | Within-cell variance-covariance matrices for the dependent variable and covariates.
COR | Within-cell correlation matrices, with standard deviations on the diagonal, for the dependent variable and covariates.
ALL | MEANS, SSCP, COV, and COR.

• Output from CELLINFO is displayed once before the analysis of any particular design. Specify CELLINFO only once.

• When you specify SSCP, COV, or COR, the cells are numbered for identification, beginning with cell 1.

• The levels vary most rapidly for the factor named last on the MANOVA variables specification.

• Empty cells are neither displayed nor numbered.

• At the beginning of MANOVA output, a table is displayed, showing the levels of each factor corresponding to each cell number.

Example

MANOVA DEP BY A(1,4) B(1,2) WITH COV
  /PRINT=CELLINFO(MEANS COV)
  /DESIGN.

• For each combination of levels of A and B, MANOVA displays separately the means and standard deviations of DEP and COV. Beginning with cell 1, MANOVA will then display the variance-covariance matrix of DEP and COV within each non-empty cell.

• A table of cell numbers will be displayed to show the factor levels corresponding to each cell.

• The keyword COV, as a parameter of CELLINFO, is not confused with the variable COV.

Related Topics

MANOVA: Univariate
Overview (MANOVA: Univariate command)
Example (MANOVA: Univariate command)
MANOVA Variable List (MANOVA: Univariate command)
ERROR Subcommand (MANOVA: Univariate command)
CONTRAST Subcommand (MANOVA: Univariate command)
PARTITION Subcommand (MANOVA: Univariate command)
METHOD Subcommand (MANOVA: Univariate command)
PRINT and NOPRINT Subcommands (MANOVA: Univariate command)
PARAMETERS Keyword (MANOVA: Univariate command)
SIGNIF Keyword (MANOVA: Univariate command)
HOMOGENEITY Keyword (MANOVA: Univariate command)
DESIGN Keyword (MANOVA: Univariate command)
ERROR Keyword (MANOVA: Univariate command)
OMEANS Subcommand (MANOVA: Univariate command)
PMEANS Subcommand (MANOVA: Univariate command)
RESIDUALS Subcommand (MANOVA: Univariate command)
POWER Subcommand (MANOVA: Univariate command)
CINTERVAL Subcommand (MANOVA: Univariate command)
PLOT Subcommand (MANOVA: Univariate command)
MISSING Subcommand (MANOVA: Univariate command)
MATRIX Subcommand (MANOVA: Univariate command)
ANALYSIS Subcommand (MANOVA: Univariate command)
DESIGN Subcommand (MANOVA: Univariate command)
References (MANOVA: Univariate command)


PARAMETERS Keyword (MANOVA: Univariate command)

PARAMETERS (keyword),PARAMETERS (keyword),PARAMETERS (keyword)
MANOVA command,MANOVA command,MANOVA command

The keyword PARAMETERS displays information about the estimated size of the effects in the model. You can specify any of the following keywords in parentheses on PARAMETERS. The default is ESTIM.

EFSIZE (keyword),EFSIZE (keyword),EFSIZE (keyword)
MANOVA command,MANOVA command,MANOVA command
OPTIMAL (keyword),OPTIMAL (keyword),OPTIMAL (keyword)
MANOVA command,MANOVA command,MANOVA command
SIGNIF (keyword),SIGNIF (keyword),SIGNIF (keyword)
MANOVA command,MANOVA command,MANOVA command
ESTIM | The estimated parameters themselves, along with their standard errors, t tests, and confidence intervals. Only nonredundant parameters are displayed. This setting is the default if PARAMETERS is requested without further specification.
NEGSUM | The negative of the sum of parameters for each effect. For DEVIATION main effects, this value equals the parameter for the omitted (redundant) contrast. NEGSUM is displayed, along with the parameter estimates.
ORTHO | The orthogonal estimates of parameters that are used to produce the sums of squares.
COR | Covariance factors and correlations among the parameter estimates.
EFSIZE | The effect size values.
OPTIMAL | Optimal Scheffé contrast coefficients.
ALL | ESTIM, NEGSUM, ORTHO, COR, EFSIZE, and OPTIMAL.

Related Topics

MANOVA: Univariate
Overview (MANOVA: Univariate command)
Example (MANOVA: Univariate command)
MANOVA Variable List (MANOVA: Univariate command)
ERROR Subcommand (MANOVA: Univariate command)
CONTRAST Subcommand (MANOVA: Univariate command)
PARTITION Subcommand (MANOVA: Univariate command)
METHOD Subcommand (MANOVA: Univariate command)
PRINT and NOPRINT Subcommands (MANOVA: Univariate command)
CELLINFO Keyword (MANOVA: Univariate command)
SIGNIF Keyword (MANOVA: Univariate command)
HOMOGENEITY Keyword (MANOVA: Univariate command)
DESIGN Keyword (MANOVA: Univariate command)
ERROR Keyword (MANOVA: Univariate command)
OMEANS Subcommand (MANOVA: Univariate command)
PMEANS Subcommand (MANOVA: Univariate command)
RESIDUALS Subcommand (MANOVA: Univariate command)
POWER Subcommand (MANOVA: Univariate command)
CINTERVAL Subcommand (MANOVA: Univariate command)
PLOT Subcommand (MANOVA: Univariate command)
MISSING Subcommand (MANOVA: Univariate command)
MATRIX Subcommand (MANOVA: Univariate command)
ANALYSIS Subcommand (MANOVA: Univariate command)
DESIGN Subcommand (MANOVA: Univariate command)
References (MANOVA: Univariate command)


SIGNIF Keyword (MANOVA: Univariate command)

SINGLEDF (keyword),SINGLEDF (keyword),SINGLEDF (keyword)
MANOVA command,MANOVA command,MANOVA command

SIGNIF requests special significance tests, most of which apply to multivariate designs (see SIGNIF Keyword (MANOVA: Multivariate command)). The following specification is useful in univariate applications of MANOVA:

SINGLEDF Significance tests for each single degree of freedom making up each effect for analysis-of-variance tables.

• When non-orthogonal contrasts are requested or when the design is unbalanced, the SINGLEDF effects will differ from single degree-of-freedom partitions. SINGLEDEF effects are orthogonal within an effect; single degree-of-freedom partitions are not orthogonal within an effect.

Example

MANOVA DEP BY FAC(1,5)
  /CONTRAST(FAC)=POLY
  /PRINT=SIGNIF(SINGLEDF)
  /DESIGN.

• POLYNOMIAL contrasts are applied to FAC, testing the linear, quadratic, cubic, and quartic components of its five levels. POLYNOMIAL contrasts are orthogonal in balanced designs.

• The SINGLEDF specification on SIGNIF requests significance tests for each of these four components.

Related Topics

MANOVA: Univariate
Overview (MANOVA: Univariate command)
Example (MANOVA: Univariate command)
MANOVA Variable List (MANOVA: Univariate command)
ERROR Subcommand (MANOVA: Univariate command)
CONTRAST Subcommand (MANOVA: Univariate command)
PARTITION Subcommand (MANOVA: Univariate command)
METHOD Subcommand (MANOVA: Univariate command)
PRINT and NOPRINT Subcommands (MANOVA: Univariate command)
CELLINFO Keyword (MANOVA: Univariate command)
PARAMETERS Keyword (MANOVA: Univariate command)
HOMOGENEITY Keyword (MANOVA: Univariate command)
DESIGN Keyword (MANOVA: Univariate command)
ERROR Keyword (MANOVA: Univariate command)
OMEANS Subcommand (MANOVA: Univariate command)
PMEANS Subcommand (MANOVA: Univariate command)
RESIDUALS Subcommand (MANOVA: Univariate command)
POWER Subcommand (MANOVA: Univariate command)
CINTERVAL Subcommand (MANOVA: Univariate command)
PLOT Subcommand (MANOVA: Univariate command)
MISSING Subcommand (MANOVA: Univariate command)
MATRIX Subcommand (MANOVA: Univariate command)
ANALYSIS Subcommand (MANOVA: Univariate command)
DESIGN Subcommand (MANOVA: Univariate command)
References (MANOVA: Univariate command)


HOMOGENEITY Keyword (MANOVA: Univariate command)

HOMOGENEITY (keyword),HOMOGENEITY (keyword),HOMOGENEITY (keyword)
MANOVA command,MANOVA command,MANOVA command

HOMOGENEITY requests tests for the homogeneity of variance of the dependent variable across the cells of the design. You can specify one or more of the following specifications in parentheses. If HOMOGENEITY is requested without further specification, the default is ALL.

BARTLETT | Bartlett-Box F test.
COCHRAN | Cochran’s C.
ALL | Both BARTLETT and COCHRAN. This setting is the default.

Related Topics

MANOVA: Univariate
Overview (MANOVA: Univariate command)
Example (MANOVA: Univariate command)
MANOVA Variable List (MANOVA: Univariate command)
ERROR Subcommand (MANOVA: Univariate command)
CONTRAST Subcommand (MANOVA: Univariate command)
PARTITION Subcommand (MANOVA: Univariate command)
METHOD Subcommand (MANOVA: Univariate command)
PRINT and NOPRINT Subcommands (MANOVA: Univariate command)
CELLINFO Keyword (MANOVA: Univariate command)
PARAMETERS Keyword (MANOVA: Univariate command)
SIGNIF Keyword (MANOVA: Univariate command)
DESIGN Keyword (MANOVA: Univariate command)
ERROR Keyword (MANOVA: Univariate command)
OMEANS Subcommand (MANOVA: Univariate command)
PMEANS Subcommand (MANOVA: Univariate command)
RESIDUALS Subcommand (MANOVA: Univariate command)
POWER Subcommand (MANOVA: Univariate command)
CINTERVAL Subcommand (MANOVA: Univariate command)
PLOT Subcommand (MANOVA: Univariate command)
MISSING Subcommand (MANOVA: Univariate command)
MATRIX Subcommand (MANOVA: Univariate command)
ANALYSIS Subcommand (MANOVA: Univariate command)
DESIGN Subcommand (MANOVA: Univariate command)
References (MANOVA: Univariate command)


DESIGN Keyword (MANOVA: Univariate command)

DESIGN (keyword),DESIGN (keyword),DESIGN (keyword)
MANOVA command,MANOVA command,MANOVA command

You can enter one or more of the following specifications in parentheses following the keyword DESIGN. If DESIGN is requested without further specification, the default is OVERALL.

The DECOMP and BIAS matrices can provide valuable information about the confounding of the effects and the estimability of the chosen contrasts. If two effects are confounded, the entry corresponding to them in the BIAS matrix will be nonzero; if the effects are orthogonal, the entry will be zero. This feature is particularly useful in designs with unpatterned empty cells. For further discussion of the matrices, see Bock (1985).

REDUNDANCY (keyword),REDUNDANCY (keyword),REDUNDANCY (keyword)
MANOVA command,MANOVA command,MANOVA command
COLLINEARITY (keyword),COLLINEARITY (keyword),COLLINEARITY (keyword)
MANOVA command,MANOVA command,MANOVA command
OVERALL | The overall reduced-model design matrix (not the contrast matrix). This setting is the default.
ONEWAY | The one-way basis matrix (not the contrast matrix) for each factor.
DECOMP | The upper triangular QR/CHOLESKY decomposition of the design.
BIAS | Contamination coefficients displaying the bias that is present in the design.
SOLUTION | Coefficients of the linear combinations of the cell means that are used in significance testing.
REDUNDANCY | Exact linear combinations of parameters that form a redundancy. This keyword displays a table only if QR (the default) is the estimation method.
COLLINEARITY | Collinearity diagnostics for design matrices. These diagnostics include the singular values of the normalized design matrix (which are the same as those values of the normalized decomposition matrix), condition indexes corresponding to each singular value, and the proportion of variance of the corresponding parameter accounted for by each principal component. For greatest accuracy, use the QR method of estimation whenever you request collinearity diagnostics.
ALL | All available options.

Related Topics

MANOVA: Univariate
Overview (MANOVA: Univariate command)
Example (MANOVA: Univariate command)
MANOVA Variable List (MANOVA: Univariate command)
ERROR Subcommand (MANOVA: Univariate command)
CONTRAST Subcommand (MANOVA: Univariate command)
PARTITION Subcommand (MANOVA: Univariate command)
METHOD Subcommand (MANOVA: Univariate command)
PRINT and NOPRINT Subcommands (MANOVA: Univariate command)
CELLINFO Keyword (MANOVA: Univariate command)
PARAMETERS Keyword (MANOVA: Univariate command)
SIGNIF Keyword (MANOVA: Univariate command)
HOMOGENEITY Keyword (MANOVA: Univariate command)
ERROR Keyword (MANOVA: Univariate command)
OMEANS Subcommand (MANOVA: Univariate command)
PMEANS Subcommand (MANOVA: Univariate command)
RESIDUALS Subcommand (MANOVA: Univariate command)
POWER Subcommand (MANOVA: Univariate command)
CINTERVAL Subcommand (MANOVA: Univariate command)
PLOT Subcommand (MANOVA: Univariate command)
MISSING Subcommand (MANOVA: Univariate command)
MATRIX Subcommand (MANOVA: Univariate command)
ANALYSIS Subcommand (MANOVA: Univariate command)
DESIGN Subcommand (MANOVA: Univariate command)
References (MANOVA: Univariate command)


ERROR Keyword (MANOVA: Univariate command)

ERROR (keyword),ERROR (keyword),ERROR (keyword)
MANOVA command,MANOVA command,MANOVA command

Generally, the keyword ERROR on PRINT produces error matrices. In univariate analyses, the only valid specification for ERROR is STDDEV, which is the default if ERROR is specified by itself.

STDDEV The error standard deviation. Normally, this deviation is the within-cells standard deviation of the dependent variable. If you specify multiple error terms on DESIGN, this specification will display the standard deviation for each term.

Related Topics

MANOVA: Univariate
Overview (MANOVA: Univariate command)
Example (MANOVA: Univariate command)
MANOVA Variable List (MANOVA: Univariate command)
ERROR Subcommand (MANOVA: Univariate command)
CONTRAST Subcommand (MANOVA: Univariate command)
PARTITION Subcommand (MANOVA: Univariate command)
METHOD Subcommand (MANOVA: Univariate command)
PRINT and NOPRINT Subcommands (MANOVA: Univariate command)
CELLINFO Keyword (MANOVA: Univariate command)
PARAMETERS Keyword (MANOVA: Univariate command)
SIGNIF Keyword (MANOVA: Univariate command)
HOMOGENEITY Keyword (MANOVA: Univariate command)
DESIGN Keyword (MANOVA: Univariate command)
OMEANS Subcommand (MANOVA: Univariate command)
PMEANS Subcommand (MANOVA: Univariate command)
RESIDUALS Subcommand (MANOVA: Univariate command)
POWER Subcommand (MANOVA: Univariate command)
CINTERVAL Subcommand (MANOVA: Univariate command)
PLOT Subcommand (MANOVA: Univariate command)
MISSING Subcommand (MANOVA: Univariate command)
MATRIX Subcommand (MANOVA: Univariate command)
ANALYSIS Subcommand (MANOVA: Univariate command)
DESIGN Subcommand (MANOVA: Univariate command)
References (MANOVA: Univariate command)


OMEANS Subcommand (MANOVA: Univariate command)

MANOVA (command),MANOVA (command),MANOVA (command)
OMEANS subcommand,OMEANS subcommand,OMEANS subcommand
OMEANS (subcommand),OMEANS (subcommand),OMEANS (subcommand)
MANOVA command,MANOVA command,MANOVA command

OMEANS (observed means) displays tables of the means of continuous variables for levels or combinations of levels of the factors.

• Use the keywords VARIABLES and TABLES to indicate which observed means you want to display.

• With no specifications, the OMEANS subcommand is equivalent to requesting CELLINFO (MEANS) on PRINT.

• OMEANS displays confidence intervals for the cell means if you have set the width to 132.

• Output from OMEANS is displayed once before the analysis of any particular design. This subcommand should be specified only once.

VARIABLES | Continuous variables for which you want means. Specify the variables in parentheses after the keyword VARIABLES. You can request means for the dependent variable or any covariates. If you omit the VARIABLES keyword, observed means are displayed for the dependent variable and all covariates. If you enter the keyword VARIABLES, you must also enter the keyword TABLES (discussed below).
TABLES | Factors for which you want the observed means displayed. In parentheses, list the factors, or combinations of factors, separated with BY. Observed means are displayed for each level, or combination of levels, of the factors that are named (see the example below). Both weighted means and unweighted means (where all cells are weighted equally, regardless of the number of cases that they contain) are displayed. If you enter the keyword CONSTANT, the grand mean is displayed.

Example

MANOVA DEP BY A(1,3) B(1,2)
  /OMEANS=TABLES(A,B)
  /DESIGN.

• Because there is no VARIABLES specification on the OMEANS subcommand, observed means are displayed for all continuous variables. DEP is the only dependent variable here, and there are no covariates.

• The TABLES specification on the OMEANS subcommand requests tables of observed means for each of the three categories of A (collapsing over B) and for both categories of B (collapsing over A).

• MANOVA displays weighted means, in which all cases count equally, and displays unweighted means, in which all cells count equally.

Related Topics

MANOVA: Univariate
Overview (MANOVA: Univariate command)
Example (MANOVA: Univariate command)
MANOVA Variable List (MANOVA: Univariate command)
ERROR Subcommand (MANOVA: Univariate command)
CONTRAST Subcommand (MANOVA: Univariate command)
PARTITION Subcommand (MANOVA: Univariate command)
METHOD Subcommand (MANOVA: Univariate command)
PRINT and NOPRINT Subcommands (MANOVA: Univariate command)
CELLINFO Keyword (MANOVA: Univariate command)
PARAMETERS Keyword (MANOVA: Univariate command)
SIGNIF Keyword (MANOVA: Univariate command)
HOMOGENEITY Keyword (MANOVA: Univariate command)
DESIGN Keyword (MANOVA: Univariate command)
ERROR Keyword (MANOVA: Univariate command)
PMEANS Subcommand (MANOVA: Univariate command)
RESIDUALS Subcommand (MANOVA: Univariate command)
POWER Subcommand (MANOVA: Univariate command)
CINTERVAL Subcommand (MANOVA: Univariate command)
PLOT Subcommand (MANOVA: Univariate command)
MISSING Subcommand (MANOVA: Univariate command)
MATRIX Subcommand (MANOVA: Univariate command)
ANALYSIS Subcommand (MANOVA: Univariate command)
DESIGN Subcommand (MANOVA: Univariate command)
References (MANOVA: Univariate command)


PMEANS Subcommand (MANOVA: Univariate command)

MANOVA (command),MANOVA (command),MANOVA (command)
PMEANS subcommand,PMEANS subcommand,PMEANS subcommand
PMEANS (subcommand),PMEANS (subcommand),PMEANS (subcommand)
MANOVA command,MANOVA command,MANOVA command

PMEANS (predicted means) displays a table of the predicted cell means of the dependent variable, adjusted for the effect of covariates in the cell and unadjusted for covariates. For comparison, PMEANS also displays the observed cell means.

• Output from PMEANS can be computationally expensive.

• PMEANS without any additional specifications displays a table showing, for each cell, the observed mean of the dependent variable, the predicted mean adjusted for the effect of covariates in that cell (ADJ. MEAN), the predicted mean unadjusted for covariates (EST. MEAN), and the raw and standardized residuals from the estimated means.

• Cells are numbered in output from PMEANS so that the levels vary most rapidly on the factor that is named last in the MANOVA variables specification. A table showing the levels of each factor corresponding to each cell number is displayed at the beginning of the MANOVA output.

• Predicted means are suppressed for any design in which the MUPLUS keyword appears.

• Covariates are not predicted.

• In designs with covariates and multiple error terms, use the ERROR subcommand to designate which error term’s regression coefficients are to be used in calculating the standardized residuals.

For univariate analysis, the following keywords are available on the PMEANS subcommand:

TABLES | Additional tables showing adjusted predicted means for specified factors or combinations of factors. Enter the names of factors or combinations of factors in parentheses after this keyword. For each factor or combination, MANOVA displays the predicted means (adjusted for covariates) collapsed over all other factors.
PLOT | A plot of the predicted means for each cell.

Example

MANOVA DEP BY A(1,4) B(1,3)
  /PMEANS TABLES(A, B, A BY B)
  /DESIGN = A, B.

• PMEANS displays the default table of observed and predicted means for DEP and raw and standardized residuals in each of the 12 cells in the model.

• The TABLES specification on PMEANS displays tables of predicted means for A (collapsing over B), for B (collapsing over A), and for all combinations of A and B.

• Because A and B are the only factors in the model, the means for A by B in the TABLES specification come from every cell in the model. The means are identical to the adjusted predicted means in the default PMEANS table, which always includes all non-empty cells.

• Predicted means for A by B can be requested in the TABLES specification, even though the A by B effect is not in the design.

Related Topics

MANOVA: Univariate
Overview (MANOVA: Univariate command)
Example (MANOVA: Univariate command)
MANOVA Variable List (MANOVA: Univariate command)
ERROR Subcommand (MANOVA: Univariate command)
CONTRAST Subcommand (MANOVA: Univariate command)
PARTITION Subcommand (MANOVA: Univariate command)
METHOD Subcommand (MANOVA: Univariate command)
PRINT and NOPRINT Subcommands (MANOVA: Univariate command)
CELLINFO Keyword (MANOVA: Univariate command)
PARAMETERS Keyword (MANOVA: Univariate command)
SIGNIF Keyword (MANOVA: Univariate command)
HOMOGENEITY Keyword (MANOVA: Univariate command)
DESIGN Keyword (MANOVA: Univariate command)
ERROR Keyword (MANOVA: Univariate command)
OMEANS Subcommand (MANOVA: Univariate command)
RESIDUALS Subcommand (MANOVA: Univariate command)
POWER Subcommand (MANOVA: Univariate command)
CINTERVAL Subcommand (MANOVA: Univariate command)
PLOT Subcommand (MANOVA: Univariate command)
MISSING Subcommand (MANOVA: Univariate command)
MATRIX Subcommand (MANOVA: Univariate command)
ANALYSIS Subcommand (MANOVA: Univariate command)
DESIGN Subcommand (MANOVA: Univariate command)
References (MANOVA: Univariate command)


RESIDUALS Subcommand (MANOVA: Univariate command)

MANOVA (command),MANOVA (command),MANOVA (command)
RESIDUALS subcommand,RESIDUALS subcommand,RESIDUALS subcommand
RESIDUALS (subcommand),RESIDUALS (subcommand),RESIDUALS (subcommand)
MANOVA command,MANOVA command,MANOVA command

Use RESIDUALS to display and plot casewise values and residuals for your models.

• Use the ERROR subcommand to specify an error term other than the default to be used to standardize the residuals.

• If a designated error term does not exist for a given design, no predicted values or residuals are calculated.

• If you specify RESIDUALS without any keyword, CASEWISE output is displayed.

The following keywords are available:

CASEWISE | A case-by-case listing of the observed, predicted, residual, and standardized residual values for each dependent variable.
PLOT | A plot of observed values, predicted values, and case numbers versus the standardized residuals, plus normal and detrended normal probability plots for the standardized residuals (five plots in all).

Related Topics

MANOVA: Univariate
Overview (MANOVA: Univariate command)
Example (MANOVA: Univariate command)
MANOVA Variable List (MANOVA: Univariate command)
ERROR Subcommand (MANOVA: Univariate command)
CONTRAST Subcommand (MANOVA: Univariate command)
PARTITION Subcommand (MANOVA: Univariate command)
METHOD Subcommand (MANOVA: Univariate command)
PRINT and NOPRINT Subcommands (MANOVA: Univariate command)
CELLINFO Keyword (MANOVA: Univariate command)
PARAMETERS Keyword (MANOVA: Univariate command)
SIGNIF Keyword (MANOVA: Univariate command)
HOMOGENEITY Keyword (MANOVA: Univariate command)
DESIGN Keyword (MANOVA: Univariate command)
ERROR Keyword (MANOVA: Univariate command)
OMEANS Subcommand (MANOVA: Univariate command)
PMEANS Subcommand (MANOVA: Univariate command)
POWER Subcommand (MANOVA: Univariate command)
CINTERVAL Subcommand (MANOVA: Univariate command)
PLOT Subcommand (MANOVA: Univariate command)
MISSING Subcommand (MANOVA: Univariate command)
MATRIX Subcommand (MANOVA: Univariate command)
ANALYSIS Subcommand (MANOVA: Univariate command)
DESIGN Subcommand (MANOVA: Univariate command)
References (MANOVA: Univariate command)


POWER Subcommand (MANOVA: Univariate command)

POWER (subcommand),POWER (subcommand),POWER (subcommand)
MANOVA command,MANOVA command,MANOVA command
MANOVA (command),MANOVA (command),MANOVA (command)
POWER subcommand,POWER subcommand,POWER subcommand

POWER requests observed power values based on fixed-effect assumptions for all univariate and multivariate F tests and t tests. Both approximate and exact power values can be computed, although exact multivariate power is displayed only when there is one hypothesis degree of freedom. If POWER is specified by itself, with no keywords, MANOVA calculates the approximate observed power values of all F tests at 0.05 significance level.

The following keywords are available on the POWER subcommand:

APPROXIMATE (keyword),APPROXIMATE (keyword),APPROXIMATE (keyword)
MANOVA command,MANOVA command,MANOVA command
EXACT (keyword),EXACT (keyword),EXACT (keyword)
MANOVA command,MANOVA command,MANOVA command
F (keyword),F (keyword),F (keyword)
MANOVA command,MANOVA command,MANOVA command
T (keyword),T (keyword),T (keyword)
MANOVA command,MANOVA command,MANOVA command
APPROXIMATE | Approximate power values. This setting is the default if POWER is specified without any keyword. Approximate power values for univariate tests are derived from an Edgeworth-type normal approximation to the noncentral beta distribution. Approximate values are normally accurate to three decimal places and are much cheaper to compute than exact values.
EXACT | Exact power values. Exact power values for univariate tests are computed from the noncentral incomplete beta distribution.
F(a) | Alpha level at which the power is to be calculated for F tests. The default is 0.05. To change the default, specify a decimal number between 0 and 1 in parentheses after F. The numbers 0 and 1 themselves are not allowed. F test at 0.05 significance level is the default when POWER is omitted or specified without any keyword.
T(a) | Alpha level at which the power is to be calculated for t tests. The default is 0.05. To change the default, specify a decimal number between 0 and 1 in parentheses after t. The numbers 0 and 1 themselves are not allowed.

• For univariate F tests and t tests, MANOVA computes a measure of the effect size based on partial η2:

partial η2 = (ssh)/(ssh + sse)

where ssh is the hypothesis sum of squares and sse is the error sum of squares. The measure is an overestimate of the actual effect size. However, the measure is consistent and is applicable to all F tests and t tests. For a discussion of effect size measures, see (Cohen, 1977) or (Hays, 1981).

Related Topics

MANOVA: Univariate
Overview (MANOVA: Univariate command)
Example (MANOVA: Univariate command)
MANOVA Variable List (MANOVA: Univariate command)
ERROR Subcommand (MANOVA: Univariate command)
CONTRAST Subcommand (MANOVA: Univariate command)
PARTITION Subcommand (MANOVA: Univariate command)
METHOD Subcommand (MANOVA: Univariate command)
PRINT and NOPRINT Subcommands (MANOVA: Univariate command)
CELLINFO Keyword (MANOVA: Univariate command)
PARAMETERS Keyword (MANOVA: Univariate command)
SIGNIF Keyword (MANOVA: Univariate command)
HOMOGENEITY Keyword (MANOVA: Univariate command)
DESIGN Keyword (MANOVA: Univariate command)
ERROR Keyword (MANOVA: Univariate command)
OMEANS Subcommand (MANOVA: Univariate command)
PMEANS Subcommand (MANOVA: Univariate command)
RESIDUALS Subcommand (MANOVA: Univariate command)
CINTERVAL Subcommand (MANOVA: Univariate command)
PLOT Subcommand (MANOVA: Univariate command)
MISSING Subcommand (MANOVA: Univariate command)
MATRIX Subcommand (MANOVA: Univariate command)
ANALYSIS Subcommand (MANOVA: Univariate command)
DESIGN Subcommand (MANOVA: Univariate command)
References (MANOVA: Univariate command)


CINTERVAL Subcommand (MANOVA: Univariate command)

CINTERVAL (subcommand),CINTERVAL (subcommand),CINTERVAL (subcommand)
MANOVA command,MANOVA command,MANOVA command
MANOVA (command),MANOVA (command),MANOVA (command)
CINTERVAL subcommand,CINTERVAL subcommand,CINTERVAL subcommand

CINTERVAL requests simultaneous confidence intervals for each parameter estimate and regression coefficient. MANOVA provides either individual or joint confidence intervals at any desired confidence level. You can compute joint confidence intervals that are using either Scheffé or Bonferroni intervals. Scheffé intervals are based on all possible contrasts, while Bonferroni intervals are based on the number of contrasts that are actually made. For a large number of contrasts, Bonferroni intervals will be larger than Scheffé intervals. Timm (Timm, 1975) provides a good discussion of which intervals are best for certain situations. Both Scheffé and Bonferroni intervals are computed separately for each term in the design. You can request only one type of confidence interval per design.

The following keywords are available on the CINTERVAL subcommand. If the subcommand is specified without any keyword, CINTERVAL automatically displays individual univariate confidence intervals at the 0.95 level.

INDIVIDUAL (keyword),INDIVIDUAL (keyword),INDIVIDUAL (keyword)
MANOVA command,MANOVA command,MANOVA command
JOINT (keyword),JOINT (keyword),JOINT (keyword)
MANOVA command,MANOVA command,MANOVA command
UNIVARIATE (keyword),UNIVARIATE (keyword),UNIVARIATE (keyword)
MANOVA command,MANOVA command,MANOVA command
INDIVIDUAL(a) | Individual confidence intervals. Specify the desired confidence level in parentheses following the keyword. The desired confidence level can be any decimal number between 0 and 1. When individual intervals are requested, BONFER and SCHEFFE have no effect.
JOINT(a) | Joint confidence intervals. Specify the desired confidence level in parentheses after the keyword. The default is 0.95. The desired confidence level can be any decimal number between 0 and 1.
UNIVARIATE(type) | Univariate confidence interval. Specify either SCHEFFE (for Scheffé intervals) or BONFER (for Bonferroni intervals) in parentheses after the keyword. The default specification is SCHEFFE.

Related Topics

MANOVA: Univariate
Overview (MANOVA: Univariate command)
Example (MANOVA: Univariate command)
MANOVA Variable List (MANOVA: Univariate command)
ERROR Subcommand (MANOVA: Univariate command)
CONTRAST Subcommand (MANOVA: Univariate command)
PARTITION Subcommand (MANOVA: Univariate command)
METHOD Subcommand (MANOVA: Univariate command)
PRINT and NOPRINT Subcommands (MANOVA: Univariate command)
CELLINFO Keyword (MANOVA: Univariate command)
PARAMETERS Keyword (MANOVA: Univariate command)
SIGNIF Keyword (MANOVA: Univariate command)
HOMOGENEITY Keyword (MANOVA: Univariate command)
DESIGN Keyword (MANOVA: Univariate command)
ERROR Keyword (MANOVA: Univariate command)
OMEANS Subcommand (MANOVA: Univariate command)
PMEANS Subcommand (MANOVA: Univariate command)
RESIDUALS Subcommand (MANOVA: Univariate command)
POWER Subcommand (MANOVA: Univariate command)
PLOT Subcommand (MANOVA: Univariate command)
MISSING Subcommand (MANOVA: Univariate command)
MATRIX Subcommand (MANOVA: Univariate command)
ANALYSIS Subcommand (MANOVA: Univariate command)
DESIGN Subcommand (MANOVA: Univariate command)
References (MANOVA: Univariate command)


PLOT Subcommand (MANOVA: Univariate command)

MANOVA can display a variety of plots that are useful in checking the assumptions that are needed in the analysis. Plots are produced only once in the MANOVA procedure, regardless of how many DESIGN subcommands you enter. Use the following keywords on the PLOT subcommand to request plots. If the PLOT subcommand is specified by itself, the default is BOXPLOTS.

BOXPLOTS | Boxplots. Plots are displayed for each continuous variable (dependent or covariate) that is named on the MANOVA variable list. Boxplots provide a simple graphical means of comparing the cells in terms of mean location and spread. The data must be stored in memory for these plots; if there is not enough memory, boxplots are not produced, and a warning message is issued. This setting is the default if the PLOT subcommand is specified without a keyword.
CELLPLOTS | Cell statistics, including a plot of cell means versus cell variances, a plot of cell means versus cell standard deviations, and a histogram of cell means. Plots are produced for each continuous variable (dependent or covariate) that is named on the MANOVA variable list. The first two plots aid in detecting heteroscedasticity (nonhomogeneous variances) and aid in determining an appropriate data transformation (if a transformation is needed). The third plot gives distributional information for the cell means.
NORMAL | Normal and detrended normal plots. Plots are produced for each continuous variable (dependent or covariate) that is named on the MANOVA variable list. MANOVA ranks the scores and then plots the ranks against the expected normal deviate, or detrended expected normal deviate, for that rank. These plots aid in detecting non-normality and outlying observations. All data must be held in memory to compute ranks. If not enough memory is available, MANOVA displays a warning and skips the plots.

• ZCORR, an additional plot that is available on the PLOT subcommand, is described in MANOVA: Multivariate.

• You can request other plots on PMEANS and RESIDUALS (see these respective subcommands).

Related Topics

MANOVA: Univariate
Overview (MANOVA: Univariate command)
Example (MANOVA: Univariate command)
MANOVA Variable List (MANOVA: Univariate command)
ERROR Subcommand (MANOVA: Univariate command)
CONTRAST Subcommand (MANOVA: Univariate command)
PARTITION Subcommand (MANOVA: Univariate command)
METHOD Subcommand (MANOVA: Univariate command)
PRINT and NOPRINT Subcommands (MANOVA: Univariate command)
CELLINFO Keyword (MANOVA: Univariate command)
PARAMETERS Keyword (MANOVA: Univariate command)
SIGNIF Keyword (MANOVA: Univariate command)
HOMOGENEITY Keyword (MANOVA: Univariate command)
DESIGN Keyword (MANOVA: Univariate command)
ERROR Keyword (MANOVA: Univariate command)
OMEANS Subcommand (MANOVA: Univariate command)
PMEANS Subcommand (MANOVA: Univariate command)
RESIDUALS Subcommand (MANOVA: Univariate command)
POWER Subcommand (MANOVA: Univariate command)
CINTERVAL Subcommand (MANOVA: Univariate command)
MISSING Subcommand (MANOVA: Univariate command)
MATRIX Subcommand (MANOVA: Univariate command)
ANALYSIS Subcommand (MANOVA: Univariate command)
DESIGN Subcommand (MANOVA: Univariate command)
References (MANOVA: Univariate command)


MISSING Subcommand (MANOVA: Univariate command)

MANOVA (command),MANOVA (command),MANOVA (command)
MISSING subcommand,MISSING subcommand,MISSING subcommand
MISSING (subcommand),MISSING (subcommand),MISSING (subcommand)
MANOVA command,MANOVA command,MANOVA command

By default, cases with missing values for any of the variables on the MANOVA variable list are excluded from the analysis. The MISSING subcommand allows you to include cases with user-missing values. If MISSING is not specified, the defaults are LISTWISE and EXCLUDE.

• The same missing-value treatment is used to process all designs in a single execution of MANOVA.

• If you enter more than one MISSING subcommand, the last subcommand that was entered will be in effect for the entire procedure, including designs that were specified before the last MISSING subcommand.

• Pairwise deletion of missing data is not available in MANOVA.

• Keywords INCLUDE and EXCLUDE are mutually exclusive; either keyword can be specified with LISTWISE.

EXCLUDE (keyword),EXCLUDE (keyword),EXCLUDE (keyword)
MANOVA command,MANOVA command,MANOVA command
LISTWISE | Cases with missing values for any variable that is named on the MANOVA variable list are excluded from the analysis. This process is always true in the MANOVA procedure.
EXCLUDE | Both user-missing and system-missing values are excluded. This setting is the default when MISSING is not specified.
INCLUDE | User-missing values are treated as valid. For factors, you must include the missing-value codes within the range that is specified on the MANOVA variable list. It may be necessary to recode these values so that they will be adjacent to the other factor values. System-missing values cannot be included in the analysis.

Related Topics

MANOVA: Univariate
Overview (MANOVA: Univariate command)
Example (MANOVA: Univariate command)
MANOVA Variable List (MANOVA: Univariate command)
ERROR Subcommand (MANOVA: Univariate command)
CONTRAST Subcommand (MANOVA: Univariate command)
PARTITION Subcommand (MANOVA: Univariate command)
METHOD Subcommand (MANOVA: Univariate command)
PRINT and NOPRINT Subcommands (MANOVA: Univariate command)
CELLINFO Keyword (MANOVA: Univariate command)
PARAMETERS Keyword (MANOVA: Univariate command)
SIGNIF Keyword (MANOVA: Univariate command)
HOMOGENEITY Keyword (MANOVA: Univariate command)
DESIGN Keyword (MANOVA: Univariate command)
ERROR Keyword (MANOVA: Univariate command)
OMEANS Subcommand (MANOVA: Univariate command)
PMEANS Subcommand (MANOVA: Univariate command)
RESIDUALS Subcommand (MANOVA: Univariate command)
POWER Subcommand (MANOVA: Univariate command)
CINTERVAL Subcommand (MANOVA: Univariate command)
PLOT Subcommand (MANOVA: Univariate command)
MATRIX Subcommand (MANOVA: Univariate command)
ANALYSIS Subcommand (MANOVA: Univariate command)
DESIGN Subcommand (MANOVA: Univariate command)
References (MANOVA: Univariate command)


MATRIX Subcommand (MANOVA: Univariate command)

IN (keyword),IN (keyword),IN (keyword)
MANOVA command,MANOVA command,MANOVA command
OUT (keyword),OUT (keyword),OUT (keyword)
MANOVA command,MANOVA command,MANOVA command
MATRIX (subcommand),MATRIX (subcommand),MATRIX (subcommand)
MANOVA command,MANOVA command,MANOVA command
MANOVA (command),MANOVA (command),MANOVA (command)
MATRIX subcommand,MATRIX subcommand,MATRIX subcommand

MATRIX reads and writes matrix data files. MATRIX writes correlation matrices that can be read by subsequent MANOVA procedures.

• Either IN or OUT is required to specify the matrix file in parentheses. When both IN and OUT are used on the same MANOVA procedure, they can be specified on separate MATRIX subcommands or on the same subcommand.

• The matrix materials include the N, mean, and standard deviation. Documents from the file that form the matrix are not included in the matrix data file.

• MATRIX=IN cannot be used in place of GET or DATA LIST to begin a new command syntax file. MATRIX is a subcommand on MANOVA, and MANOVA cannot run before an active dataset is defined. To begin a new command file and immediately read a matrix, first use GET to retrieve the matrix file, and then specify IN(*) on MATRIX.

• Records in the matrix data file that is read by MANOVA can be in any order, with the following exceptions: The order of split-file groups cannot be violated, and all CORR vectors must appear contiguously within each split-file group.

• When MANOVA reads matrix materials, it ignores the record containing the total number of cases. In addition, MANOVA skips unrecognized records. MANOVA does not issue a warning when it skips records.

The following two keywords are available on the MATRIX subcommand:

OUT | Write a matrix data file. Specify either a file or an asterisk, and enclose the specification in parentheses. If you specify a file, the file is stored on disk and can be retrieved at any time. If you specify an asterisk (*) or leave the parentheses empty, the matrix file replaces the active dataset but is not stored on disk unless you use SAVE or XSAVE.
IN | Read a matrix data file. If the matrix file is not the current active dataset, specify a file in parentheses. If the matrix file is the current active dataset, specify an asterisk (*) or leave the parentheses empty.

Related Topics

MANOVA: Univariate
Overview (MANOVA: Univariate command)
Example (MANOVA: Univariate command)
MANOVA Variable List (MANOVA: Univariate command)
ERROR Subcommand (MANOVA: Univariate command)
CONTRAST Subcommand (MANOVA: Univariate command)
PARTITION Subcommand (MANOVA: Univariate command)
METHOD Subcommand (MANOVA: Univariate command)
PRINT and NOPRINT Subcommands (MANOVA: Univariate command)
CELLINFO Keyword (MANOVA: Univariate command)
PARAMETERS Keyword (MANOVA: Univariate command)
SIGNIF Keyword (MANOVA: Univariate command)
HOMOGENEITY Keyword (MANOVA: Univariate command)
DESIGN Keyword (MANOVA: Univariate command)
ERROR Keyword (MANOVA: Univariate command)
OMEANS Subcommand (MANOVA: Univariate command)
PMEANS Subcommand (MANOVA: Univariate command)
RESIDUALS Subcommand (MANOVA: Univariate command)
POWER Subcommand (MANOVA: Univariate command)
CINTERVAL Subcommand (MANOVA: Univariate command)
PLOT Subcommand (MANOVA: Univariate command)
MISSING Subcommand (MANOVA: Univariate command)
ANALYSIS Subcommand (MANOVA: Univariate command)
DESIGN Subcommand (MANOVA: Univariate command)
References (MANOVA: Univariate command)
Format of the Matrix Data File (MANOVA: Univariate command)
Split Files and Variable Order (MANOVA: Univariate command)
Additional Statistics (MANOVA: Univariate command)


Format of the Matrix Data File (MANOVA: Univariate command)

The matrix data file includes two special variables: ROWTYPE_ and VARNAME_.

• Variable ROWTYPE_ is a short string variable having values N, MEAN, CORR (for Pearson correlation coefficients), and STDDEV.

• Variable VARNAME_ is a short string variable whose values are the names of the variables and covariates that are used to form the correlation matrix. When ROWTYPE_ is CORR, VARNAME_ gives the variable that is associated with that row of the correlation matrix.

• Between ROWTYPE_ and VARNAME_ are the factor variables (if any) that are defined in the BY portion of the MANOVA variable list. (Factor variables receive the system-missing value on vectors that represent pooled values.)

• Remaining variables are the variables that are used to form the correlation matrix.

Related Topics

MATRIX Subcommand (MANOVA: Univariate command)
Split Files and Variable Order (MANOVA: Univariate command)
Additional Statistics (MANOVA: Univariate command)


Split Files and Variable Order (MANOVA: Univariate command)

• When split-file processing is in effect, the first variables in the matrix system file will be the split variables, followed by ROWTYPE_, the factor variable(s), VARNAME_, and then the variables that are used to form the correlation matrix.

• A full set of matrix materials is written for each subgroup that is defined by the split variable(s).

• A split variable cannot have the same variable name as any other variable that is written to the matrix data file.

• If a split file is in effect when a matrix is written, the same split file must be in effect when that matrix is read into another procedure.

Related Topics

MATRIX Subcommand (MANOVA: Univariate command)
Format of the Matrix Data File (MANOVA: Univariate command)
Additional Statistics (MANOVA: Univariate command)


Additional Statistics (MANOVA: Univariate command)

In addition to the CORR values, MANOVA always includes the following with the matrix materials:

• The total weighted number of cases used to compute each correlation coefficient.

• A vector of N’s for each cell in the data.

• A vector of MEAN’s for each cell in the data.

• A vector of pooled standard deviations, STDDEV, which is the square root of the within-cells mean square error for each variable.

Example

GET FILE IRIS.
MANOVA SEPALLEN SEPALWID PETALLEN PETALWID BY TYPE(1,3)
  /MATRIX=OUT(MANMTX).

• MANOVA reads data from the data file IRIS and writes one set of matrix materials to the file MANMTX.

• The active dataset is still IRIS. Subsequent commands are executed on the file IRIS.

Example

GET FILE IRIS.
MANOVA SEPALLEN SEPALWID PETALLEN PETALWID BY TYPE(1,3)
  /MATRIX=OUT(*).
LIST.

• MANOVA writes the same matrix as in the example above. However, the matrix file replaces the active dataset. The LIST command is executed on the matrix file (not on the file IRIS).

Example

GET FILE=PRSNNL.
FREQUENCIES VARIABLE=AGE.

MANOVA SEPALLEN SEPALWID PETALLEN PETALWID BY TYPE(1,3)
  /MATRIX=IN(MANMTX).

• This example assumes that you want to perform a frequencies analysis on the file PRSNNL and then use MANOVA to read a different file. The file that you want to read is an existing matrix data file. The external matrix file MANMTX is specified in parentheses after IN on the MATRIX subcommand.

• MANMTX does not replace PRSNNL as the active dataset.

Example

GET FILE=MANMTX.
MANOVA SEPALLEN SEPALWID PETALLEN PETALWID BY TYPE(1,3)
  /MATRIX=IN(*).

• This example assumes that you are starting a new session and want to read an existing matrix data file. GET retrieves the matrix file MANMTX.

• An asterisk is specified in parentheses after IN on the MATRIX subcommand to read the active dataset. You can also leave the parentheses empty to indicate the default.

• If the GET command is omitted, an error message is issued.

• If you specify MANMTX in parentheses after IN, an error message is issued.

Related Topics

MATRIX Subcommand (MANOVA: Univariate command)
Format of the Matrix Data File (MANOVA: Univariate command)
Split Files and Variable Order (MANOVA: Univariate command)


ANALYSIS Subcommand (MANOVA: Univariate command)

MANOVA (command),MANOVA (command),MANOVA (command)
ANALYSIS subcommand,ANALYSIS subcommand,ANALYSIS subcommand
ANALYSIS (subcommand),ANALYSIS (subcommand),ANALYSIS (subcommand)
MANOVA command,MANOVA command,MANOVA command

ANALYSIS allows you to work with a subset of the continuous variables (dependent variable and covariates) that you named on the MANOVA variable list. In univariate analysis of variance, you can use ANALYSIS to allow factor-by-covariate interaction terms in your model (see the DESIGN subcommand below). You can also use ANALYSIS to switch the roles of the dependent variable and a covariate.

• In general, ANALYSIS gives you complete control over which continuous variables are to be dependent variables, which continuous variables are to be covariates, and which continuous variables are to be neither.

• ANALYSIS specifications are like the MANOVA variables specification, except that factors are not named. Enter the dependent variable and, if there are covariates, the keyword WITH and the covariates.

• Only variables that are listed as dependent variables or covariates on the MANOVA variable list can be entered on the ANALYSIS subcommand.

• In a univariate analysis of variance, the most important use of ANALYSIS is to omit covariates from the analysis list, thereby making them available for inclusion on DESIGN (see the example below and the DESIGN subcommand examples).

• For more information about ANALYSIS, refer to MANOVA: Multivariate.

Example

MANOVA DEP BY FACTOR(1,3) WITH COV
  /ANALYSIS DEP
  /DESIGN FACTOR, COV, FACTOR BY COV.

• COV, a continuous variable, is included on the MANOVA variable list as a covariate.

• COV is not mentioned on ANALYSIS, so it will not be included in the model as a dependent variable or covariate. COV can, therefore, be explicitly included on the DESIGN subcommand.

• DESIGN includes the main effects of FACTOR and COV and the FACTOR by COV interaction.

Related Topics

MANOVA: Univariate
Overview (MANOVA: Univariate command)
Example (MANOVA: Univariate command)
MANOVA Variable List (MANOVA: Univariate command)
ERROR Subcommand (MANOVA: Univariate command)
CONTRAST Subcommand (MANOVA: Univariate command)
PARTITION Subcommand (MANOVA: Univariate command)
METHOD Subcommand (MANOVA: Univariate command)
PRINT and NOPRINT Subcommands (MANOVA: Univariate command)
CELLINFO Keyword (MANOVA: Univariate command)
PARAMETERS Keyword (MANOVA: Univariate command)
SIGNIF Keyword (MANOVA: Univariate command)
HOMOGENEITY Keyword (MANOVA: Univariate command)
DESIGN Keyword (MANOVA: Univariate command)
ERROR Keyword (MANOVA: Univariate command)
OMEANS Subcommand (MANOVA: Univariate command)
PMEANS Subcommand (MANOVA: Univariate command)
RESIDUALS Subcommand (MANOVA: Univariate command)
POWER Subcommand (MANOVA: Univariate command)
CINTERVAL Subcommand (MANOVA: Univariate command)
PLOT Subcommand (MANOVA: Univariate command)
MISSING Subcommand (MANOVA: Univariate command)
MATRIX Subcommand (MANOVA: Univariate command)
DESIGN Subcommand (MANOVA: Univariate command)
References (MANOVA: Univariate command)


DESIGN Subcommand (MANOVA: Univariate command)

MANOVA (command),MANOVA (command),MANOVA (command)
DESIGN subcommand,DESIGN subcommand,DESIGN subcommand
DESIGN (subcommand),DESIGN (subcommand),DESIGN (subcommand)
MANOVA command,MANOVA command,MANOVA command

DESIGN specifies the effects that are included in a specific model. DESIGN must be the last subcommand entered for any model.

The cells in a design are defined by all of the possible combinations of levels of the factors in that design. The number of cells equals the product of the number of levels of all the factors. A design is balanced if each cell contains the same number of cases. MANOVA can analyze both balanced and unbalanced designs.

• Specify a list of terms to be included in the model, separated by spaces or commas.

• The default design, if the DESIGN subcommand is omitted or is specified by itself, is a full factorial model containing all main effects and all orders of factor-by-factor interaction.

• If the last subcommand that is specified is not DESIGN, a default full factorial design is estimated.

• To include a term for the main effect of a factor, enter the name of the factor on the DESIGN subcommand.

• To include a term for an interaction between factors, use the keyword BY to join the factors that are involved in the interaction.

• Terms are entered into the model in the order in which you list them on DESIGN. If you have specified SEQUENTIAL on the METHOD subcommand to partition the sums of squares in a hierarchical fashion, this order may affect the significance tests.

• You can specify other types of terms in the model, as described in the following sections.

• Multiple DESIGN subcommands are accepted. An analysis of one model is produced for each DESIGN subcommand.

Example

MANOVA Y BY A(1,2) B(1,2) C(1,3)
  /DESIGN
  /DESIGN A, B, C
  /DESIGN A, B, C, A BY B, A BY C.

• The first DESIGN produces the default full factorial design, with all main effects and interactions for factors A, B, and C.

• The second DESIGN produces an analysis with main effects only for A, B, and C.

• The third DESIGN produces an analysis with main effects and the interactions between A and the other two factors. The interaction between B and C is not in the design, nor is the interaction between all three factors.

Related Topics

MANOVA: Univariate
Overview (MANOVA: Univariate command)
Example (MANOVA: Univariate command)
MANOVA Variable List (MANOVA: Univariate command)
ERROR Subcommand (MANOVA: Univariate command)
CONTRAST Subcommand (MANOVA: Univariate command)
PARTITION Subcommand (MANOVA: Univariate command)
METHOD Subcommand (MANOVA: Univariate command)
PRINT and NOPRINT Subcommands (MANOVA: Univariate command)
CELLINFO Keyword (MANOVA: Univariate command)
PARAMETERS Keyword (MANOVA: Univariate command)
SIGNIF Keyword (MANOVA: Univariate command)
HOMOGENEITY Keyword (MANOVA: Univariate command)
DESIGN Keyword (MANOVA: Univariate command)
ERROR Keyword (MANOVA: Univariate command)
OMEANS Subcommand (MANOVA: Univariate command)
PMEANS Subcommand (MANOVA: Univariate command)
RESIDUALS Subcommand (MANOVA: Univariate command)
POWER Subcommand (MANOVA: Univariate command)
CINTERVAL Subcommand (MANOVA: Univariate command)
PLOT Subcommand (MANOVA: Univariate command)
MISSING Subcommand (MANOVA: Univariate command)
MATRIX Subcommand (MANOVA: Univariate command)
ANALYSIS Subcommand (MANOVA: Univariate command)
References (MANOVA: Univariate command)
Partitioned Effects: Number in Parentheses (MANOVA: Univariate command)
Nested Effects: WITHIN Keyword (MANOVA: Univariate command)
Simple Effects: WITHIN and MWITHIN Keywords (MANOVA: Univariate command)
Pooled Effects: Plus Sign (MANOVA: Univariate command)
MUPLUS Keyword (MANOVA: Univariate command)
Effects of Continuous Variables (MANOVA: Univariate command)
Error Terms for Individual Effects (MANOVA: Univariate command)
CONSTANT Keyword (MANOVA: Univariate command)


Partitioned Effects: Number in Parentheses (MANOVA: Univariate command)

You can specify a number in parentheses following a factor name on the DESIGN subcommand to identify individual degrees of freedom or partitions of the degrees of freedom that are associated with an effect.

• If you specify PARTITION, the number refers to a partition. Partitions can include more than one degree of freedom (see PARTITION Subcommand (MANOVA: Univariate command)). For example, if the first partition of SEED includes two degrees of freedom, the term SEED(1) on a DESIGN subcommand tests the two degrees of freedom.

• If you do not use PARTITION, the number refers to a single degree of freedom that is associated with the effect.

• The number refers to an individual level for a factor if that factor follows the keyword WITHIN or MWITHIN (see the sections about nested effects and pooled effects below).

• A factor has one less degree of freedom than it has levels or values.

Example

MANOVA YIELD BY SEED(1,4) WITH RAINFALL
  /PARTITION(SEED)=(2,1)
  /DESIGN=SEED(1) SEED(2).

• Factor SEED is subdivided into two partitions, one partition containing the first two degrees of freedom and the other partition containing the last degree of freedom.

• The two partitions of SEED are treated as independent effects.

Related Topics

DESIGN Subcommand (MANOVA: Univariate command)
Nested Effects: WITHIN Keyword (MANOVA: Univariate command)
Simple Effects: WITHIN and MWITHIN Keywords (MANOVA: Univariate command)
Pooled Effects: Plus Sign (MANOVA: Univariate command)
MUPLUS Keyword (MANOVA: Univariate command)
Effects of Continuous Variables (MANOVA: Univariate command)
Error Terms for Individual Effects (MANOVA: Univariate command)
CONSTANT Keyword (MANOVA: Univariate command)


Nested Effects: WITHIN Keyword (MANOVA: Univariate command)

WITHIN (keyword),WITHIN (keyword),WITHIN (keyword)
MANOVA command,MANOVA command,MANOVA command

Use the WITHIN keyword (alias W) to nest the effects of one factor within the effects of another factor or an interaction term.

Example

MANOVA YIELD BY SEED(1,4) FERT(1,3) PLOT (1,4)
  /DESIGN = FERT WITHIN SEED BY PLOT.

• The three factors in this example are type of seed (SEED), type of fertilizer (FERT), and location of plots (PLOT).

• The DESIGN subcommand nests the effects of FERT within the interaction term of SEED by PLOT. The levels of FERT are considered distinct for each combination of levels of SEED and PLOT.

Related Topics

DESIGN Subcommand (MANOVA: Univariate command)
Partitioned Effects: Number in Parentheses (MANOVA: Univariate command)
Simple Effects: WITHIN and MWITHIN Keywords (MANOVA: Univariate command)
Pooled Effects: Plus Sign (MANOVA: Univariate command)
MUPLUS Keyword (MANOVA: Univariate command)
Effects of Continuous Variables (MANOVA: Univariate command)
Error Terms for Individual Effects (MANOVA: Univariate command)
CONSTANT Keyword (MANOVA: Univariate command)


Simple Effects: WITHIN and MWITHIN Keywords (MANOVA: Univariate command)

A factor can be nested within one specific level of another factor by indicating the level in parentheses. This process allows you to estimate simple effects or the effect of one factor within only one level of another factor. Simple effects can be obtained for higher-order interactions as well.

Use WITHIN to request simple effects of between-subjects factors.

Example

MANOVA YIELD BY SEED(2,4) FERT(1,3) PLOT (1,4)
  /DESIGN = FERT WITHIN SEED (1).

• This example requests the simple effect of FERT within the first level of SEED.

• The number (n) specified after a WITHIN factor refers to the level of that factor. The value is the ordinal position, which is not necessarily the value of that level. In this example, the first level is associated with value 2.

• The number does not refer to the number of partitioned effects (see PARTITION Subcommand (MANOVA: Univariate command)).

Example

MANOVA YIELD BY SEED(2,4) FERT(1,3) PLOT (3,5)
 /DESIGN = FERT WITHIN PLOT(1) WITHIN SEED(2)

• This example requests the effect of FERT within the second SEED level of the first PLOT level.

MWITHIN (keyword),MWITHIN (keyword),MWITHIN (keyword)
MANOVA command,MANOVA command,MANOVA command

• The second SEED level is associated with value 3, and the first PLOT level is associated with value 3.

Use MWITHIN to request simple effects of within-subjects factors in repeated measures analysis (see MWITHIN Keyword for Simple Effects (MANOVA: Repeated Measures command)).

Related Topics

DESIGN Subcommand (MANOVA: Univariate command)
Partitioned Effects: Number in Parentheses (MANOVA: Univariate command)
Nested Effects: WITHIN Keyword (MANOVA: Univariate command)
Pooled Effects: Plus Sign (MANOVA: Univariate command)
MUPLUS Keyword (MANOVA: Univariate command)
Effects of Continuous Variables (MANOVA: Univariate command)
Error Terms for Individual Effects (MANOVA: Univariate command)
CONSTANT Keyword (MANOVA: Univariate command)


Pooled Effects: Plus Sign (MANOVA: Univariate command)

To pool different effects for the purpose of significance testing, join the effects with a plus sign (+). A single test is made for the combined effect of the pooled terms.

• The keyword BY is evaluated before effects are pooled together.

• Parentheses are not allowed for changing the order of evaluation. For example, it is illegal to specify (A + B) BY C. You must specify /DESIGN=A BY C + B BY C.

Example

MANOVA Y BY A(1,3) B(1,4) WITH X
 /ANALYSIS=Y
 /DESIGN=A, B, A BY B, A BY X + B BY X + A BY B BY X.

• This example shows how to test homogeneity of regressions in a two-way analysis of variance.

• The + signs are used to produce a pooled test of all interactions involving the covariate X. If this test is significant, the assumption of homogeneity of variance is questionable.

Related Topics

DESIGN Subcommand (MANOVA: Univariate command)
Partitioned Effects: Number in Parentheses (MANOVA: Univariate command)
Nested Effects: WITHIN Keyword (MANOVA: Univariate command)
Simple Effects: WITHIN and MWITHIN Keywords (MANOVA: Univariate command)
MUPLUS Keyword (MANOVA: Univariate command)
Effects of Continuous Variables (MANOVA: Univariate command)
Error Terms for Individual Effects (MANOVA: Univariate command)
CONSTANT Keyword (MANOVA: Univariate command)


MUPLUS Keyword (MANOVA: Univariate command)

MUPLUS (keyword),MUPLUS (keyword),MUPLUS (keyword)
MANOVA command,MANOVA command,MANOVA command

MUPLUS combines the constant term (μ) in the model with the term that is specified after it. The normal use of this specification is to obtain parameter estimates that represent weighted means for the levels of some factor. For example, MUPLUS SEED represents the constant, or overall, mean plus the effect for each level of SEED. The significance of such effects is usually uninteresting, but the parameter estimates represent the weighted means for each level of SEED, adjusted for any covariates in the model.

• MUPLUS cannot appear more than once on a given DESIGN subcommand.

• MUPLUS is the only way to get standard errors for the predicted mean for each level of the specified factor.

• Parameter estimates are not displayed by default; you must explicitly request them on the PRINT subcommand or via a CONTRAST subcommand.

• You can obtain the unweighted mean by specifying the full factorial model, excluding those terms that are contained by an effect, and prefixing the effect whose mean is to be found by MUPLUS.

Related Topics

DESIGN Subcommand (MANOVA: Univariate command)
Partitioned Effects: Number in Parentheses (MANOVA: Univariate command)
Nested Effects: WITHIN Keyword (MANOVA: Univariate command)
Simple Effects: WITHIN and MWITHIN Keywords (MANOVA: Univariate command)
Pooled Effects: Plus Sign (MANOVA: Univariate command)
Effects of Continuous Variables (MANOVA: Univariate command)
Error Terms for Individual Effects (MANOVA: Univariate command)
CONSTANT Keyword (MANOVA: Univariate command)


Effects of Continuous Variables (MANOVA: Univariate command)

Usually you name factors but not covariates on the DESIGN subcommand. The linear effects of covariates are removed from the dependent variable before the design is tested. However, the design can include variables that are measured at the interval level and originally named as covariates or as additional dependent variables.

• Continuous variables on a DESIGN subcommand must be named as dependents or covariates on the MANOVA variable list.

POOL (keyword),POOL (keyword),POOL (keyword)
MANOVA command,MANOVA command,MANOVA command

• Before you can name a continuous variable on a DESIGN subcommand, you must supply an ANALYSIS subcommand that does not name the variable. This action excludes it from the analysis as a dependent variable or covariate and makes it eligible for inclusion on DESIGN.

• You can use the keyword POOL(varlist) to pool more than one continuous variable into a single effect (provided that the continuous variables are all excluded on an ANALYSIS subcommand). For a single continuous variable, POOL(VAR) is equivalent to VAR.

• The TO convention in the variable list for POOL refers to the order of continuous variables (dependent variables and covariates) on the original MANOVA variable list, which is not necessarily their order on the active dataset. This use is the only allowable use of the keyword TO on a DESIGN subcommand.

• You can specify interaction terms between factors and continuous variables. If FAC is a factor and COV is a covariate that has been omitted from an ANALYSIS subcommand, FAC BY COV is a valid specification on a DESIGN statement.

• You cannot specify an interaction between two continuous variables. Use the COMPUTE command to create a variable representing the interaction prior to MANOVA.

Example

*  This example tests whether the regression of the dependent
   variable Y on the two variables X1 and X2 is the same across
   all the categories of the factors AGE and TREATMNT.

MANOVA Y BY AGE(1,5) TREATMNT(1,3) WITH X1, X2
  /ANALYSIS = Y
  /DESIGN = POOL(X1,X2),
            AGE, TREATMNT, AGE BY TREATMNT,
            POOL(X1,X2) BY AGE + POOL(X1,X2) BY TREATMNT
              + POOL(X1,X2) BY AGE BY TREATMNT.

• ANALYSIS excludes X1 and X2 from the standard treatment of covariates so that they can be used in the design.

• DESIGN includes five terms. POOL(X1,X2), the overall regression of the dependent variable on X1 and X2, is entered first, followed by the two factors and their interaction.

• The last term is the test for equal regressions. It consists of three factor-by-continuous-variable interactions pooled together. POOL(X1,X2) BY AGE is the interaction between AGE and the combined effect of the continuous variables X1 and X2. It is combined with similar interactions between TREATMNT and the continuous variables and between the AGE by TREATMNT interaction and the continuous variables.

VS (keyword),VS (keyword),VS (keyword)
MANOVA command,MANOVA command,MANOVA command

• If the last term is not statistically significant, there is no evidence that the regression of Y on X1 and X2 is different across any combination of the categories of AGE and TREATMNT.

Related Topics

DESIGN Subcommand (MANOVA: Univariate command)
Partitioned Effects: Number in Parentheses (MANOVA: Univariate command)
Nested Effects: WITHIN Keyword (MANOVA: Univariate command)
Simple Effects: WITHIN and MWITHIN Keywords (MANOVA: Univariate command)
Pooled Effects: Plus Sign (MANOVA: Univariate command)
MUPLUS Keyword (MANOVA: Univariate command)
Error Terms for Individual Effects (MANOVA: Univariate command)
CONSTANT Keyword (MANOVA: Univariate command)


Error Terms for Individual Effects (MANOVA: Univariate command)

The “error” sum of squares against which terms in the design are tested is specified on the ERROR subcommand. For any particular term on a DESIGN subcommand, you can specify a different error term to be used in the analysis of variance. To do so, name the term followed by the keyword VS (or AGAINST) and the error term keyword.

• To test a term against only the within-cells sum of squares, specify the term followed by VS WITHIN on the DESIGN subcommand. For example, GROUP VS WITHIN tests the effect of the factor GROUP against only the within-cells sum of squares. For most analyses, this term is the default error term.

• To test a term against only the residual sum of squares (the sum of squares for all terms that are not included in your DESIGN), specify the term followed by VS RESIDUAL.

• To test against the combined within-cells and residual sums of squares, specify the term followed by VS WITHIN+RESIDUAL.

• To test against any other sum of squares in the analysis of variance, include a term corresponding to the desired sum of squares in the design and assign it to an integer between 1 and 10. You can then test against the number of the error term. It is often convenient to test against the term before you define it. This process is perfectly acceptable as long as you define the error term on the same DESIGN subcommand.

Example

MANOVA DEP BY A, B, C (1,3)
  /DESIGN=A VS 1,
          B WITHIN A = 1 VS 2,
          C WITHIN B WITHIN A = 2 VS WITHIN.

• In this example, the factors A, B, and C are completely nested; levels of C occur within levels of B, which occur within levels of A. Each factor is tested against everything within it.

• A, the outermost factor, is tested against the B within A sum of squares, to see if it contributes anything beyond the effects of B within each of its levels. The B within A sum of squares is defined as error term number 1.

• B nested within A, in turn, is tested against error term number 2, which is defined as the C within B within A sum of squares.

• Finally, C nested within B nested within A is tested against the within-cells sum of squares.

User-defined error terms are specified by simply inserting = n after a term, where n is an integer from 1 to 10. The equals sign is required. Keywords that are used in building a design term, such as BY or WITHIN, are evaluated first. For example, error term number 2 in the above example consists of the entire term C WITHIN B WITHIN A. An error-term number, but not an error-term definition, can follow the keyword VS.

Related Topics

DESIGN Subcommand (MANOVA: Univariate command)
Partitioned Effects: Number in Parentheses (MANOVA: Univariate command)
Nested Effects: WITHIN Keyword (MANOVA: Univariate command)
Simple Effects: WITHIN and MWITHIN Keywords (MANOVA: Univariate command)
Pooled Effects: Plus Sign (MANOVA: Univariate command)
MUPLUS Keyword (MANOVA: Univariate command)
Effects of Continuous Variables (MANOVA: Univariate command)
CONSTANT Keyword (MANOVA: Univariate command)


CONSTANT Keyword (MANOVA: Univariate command)

CONSTANT (keyword),CONSTANT (keyword),CONSTANT (keyword)
MANOVA command,MANOVA command,MANOVA command

By default, the constant (grand mean) term is included as the first term in the model.

• If you have specified NOCONSTANT on the METHOD subcommand, a constant term will not be included in any design unless you request it with the CONSTANT keyword on DESIGN.

• You can specify an error term for the constant.

• A factor named CONSTANT will not be recognized on the DESIGN subcommand.

Related Topics

DESIGN Subcommand (MANOVA: Univariate command)
Partitioned Effects: Number in Parentheses (MANOVA: Univariate command)
Nested Effects: WITHIN Keyword (MANOVA: Univariate command)
Simple Effects: WITHIN and MWITHIN Keywords (MANOVA: Univariate command)
Pooled Effects: Plus Sign (MANOVA: Univariate command)
MUPLUS Keyword (MANOVA: Univariate command)
Effects of Continuous Variables (MANOVA: Univariate command)
Error Terms for Individual Effects (MANOVA: Univariate command)


References (MANOVA: Univariate command)

Bock, R. D. 1985. Multivariate statistical methods in behavioral research. Chicago: Scientific Software, Inc..

Cohen, J. 1977. Statistical power analysis for the behavioral sciences. San Diego, California: Academic Press.

Hays, W. L. 1981. Statistics, 3rd ed. New York: Holt, Rinehart, and Winston.

Timm, N. H. 1975. Multivariate statistics: With applications in education and psychology. Monterey, California: Brooks/Cole.

Related Topics

MANOVA: Univariate
Overview (MANOVA: Univariate command)
Example (MANOVA: Univariate command)
MANOVA Variable List (MANOVA: Univariate command)
ERROR Subcommand (MANOVA: Univariate command)
CONTRAST Subcommand (MANOVA: Univariate command)
PARTITION Subcommand (MANOVA: Univariate command)
METHOD Subcommand (MANOVA: Univariate command)
PRINT and NOPRINT Subcommands (MANOVA: Univariate command)
CELLINFO Keyword (MANOVA: Univariate command)
PARAMETERS Keyword (MANOVA: Univariate command)
SIGNIF Keyword (MANOVA: Univariate command)
HOMOGENEITY Keyword (MANOVA: Univariate command)
DESIGN Keyword (MANOVA: Univariate command)
ERROR Keyword (MANOVA: Univariate command)
OMEANS Subcommand (MANOVA: Univariate command)
PMEANS Subcommand (MANOVA: Univariate command)
RESIDUALS Subcommand (MANOVA: Univariate command)
POWER Subcommand (MANOVA: Univariate command)
CINTERVAL Subcommand (MANOVA: Univariate command)
PLOT Subcommand (MANOVA: Univariate command)
MISSING Subcommand (MANOVA: Univariate command)
MATRIX Subcommand (MANOVA: Univariate command)
ANALYSIS Subcommand (MANOVA: Univariate command)
DESIGN Subcommand (MANOVA: Univariate command)


MANOVA: Multivariate

MANOVA (command),MANOVA (command),MANOVA (command)
MANOVA (command),MANOVA (command),MANOVA (command)
syntax chart,syntax chart,syntax chart

MANOVA is available in the Advanced Statistics option.

MANOVA dependent varlist [BY factor list (min,max) [factor list...]]
                         [WITH covariate list]

 [/TRANSFORM [(dependent varlist [/dependent varlist])]=
                     [ORTHONORM] [{CONTRAST}]  {DEVIATIONS (refcat)     }]
                                  {BASIS   }   {DIFFERENCE              }
                                               {HELMERT                 }
                                               {SIMPLE (refcat)         }
                                               {REPEATED                }
                                               {POLYNOMIAL[({1,2,3...})]}
                                                            {metric  }
                                               {SPECIAL (matrix)        }

 [/RENAME={newname} {newname}...]
          {*      } {*      }

 [/{PRINT  }=[HOMOGENEITY [(BOXM)]]
   {NOPRINT} [ERROR [([COV] [COR] [SSCP] [STDDEV])]]
             [SIGNIF [([MULTIV**] [EIGEN] [DIMENR]
                       [UNIV**] [HYPOTH][STEPDOWN] [BRIEF])]]
             [TRANSFORM]                                    ]

 [/PCOMPS=[COR] [COV] [ROTATE(rottype)]
          [NCOMP(n)] [MINEIGEN(eigencut)] [ALL]]

 [/PLOT=[ZCORR]]

 [/DISCRIM [RAW] [STAN] [ESTIM] [COR] [ALL]
           [ROTATE(rottype)] [ALPHA({.25**})]]
                                    {a    }

 [/POWER=[T({.05**})] [F({.05**})] [{APPROXIMATE}]]
            {a    }      {a    }    {EXACT      }

 [/CINTERVAL=[MULTIVARIATE  ({ROY      })]]
                             {PILLAI   }
                             {BONFER   }
                             {HOTELLING}
                             {WILKS    }

 [/ANALYSIS [({UNCONDITIONAL**})]=[(]dependent varlist
              {CONDITIONAL    }      [WITH covariate varlist]
                                       [/dependent varlist...][)][WITH varlist]]

 [/DESIGN...]*

* The DESIGN subcommand has the same syntax as is described in MANOVA: Univariate.

**Default if the subcommand or keyword is omitted.

Example

MANOVA SCORE1 TO SCORE4 BY METHOD(1,3).

Related Topics

Overview (MANOVA: Multivariate command)
MANOVA Variable List (MANOVA: Multivariate command)
TRANSFORM Subcommand (MANOVA: Multivariate command)
RENAME Subcommand (MANOVA: Multivariate command)
PRINT and NOPRINT Subcommands (MANOVA: Multivariate command)
PLOT Subcommand (MANOVA: Multivariate command)
PCOMPS Subcommand (MANOVA: Multivariate command)
DISCRIM Subcommand (MANOVA: Multivariate command)
POWER Subcommand (MANOVA: Multivariate command)
CINTERVAL Subcommand (MANOVA: Multivariate command)
ANALYSIS Subcommand (MANOVA: Multivariate command)
CONDITIONAL and UNCONDITIONAL Keywords (MANOVA: Multivariate command)
MANOVA: Univariate
MANOVA
MANOVA: Repeated Measures


Overview (MANOVA: Multivariate command)

MANOVA (command),MANOVA (command),MANOVA (command)
variables specification,variables specification,variables specification
MANOVA (command),MANOVA (command),MANOVA (command)
limitations,limitations,limitations
MANOVA (command),MANOVA (command),MANOVA (command)
multivariate syntax,multivariate syntax,multivariate syntax

This section discusses the subcommands that are used in multivariate analysis of variance and covariance designs with several interrelated dependent variables. The discussion focuses on subcommands and keywords that do not apply, or apply in different manners, to univariate analyses. It does not contain information on all of the subcommands you will need to specify the design. For subcommands not covered here, see MANOVA: Univariate.

Options Collapse Hide details

Options

Dependent Variables and Covariates. You can specify subsets and reorder the dependent variables and covariates using the ANALYSIS subcommand. You can specify linear transformations of the dependent variables and covariates using the TRANSFORM subcommand. When transformations are performed, you can rename the variables using the RENAME subcommand and request the display of a transposed transformation matrix currently in effect using the PRINT subcommand.

Optional Output. You can request or suppress output on the PRINT and NOPRINT subcommands. Additional output appropriate to multivariate analysis includes error term matrices, Box’s M statistic, multivariate and univariate F tests, and other significance analyses. You can also request predicted cell means for specific dependent variables on the PMEANS subcommand, produce a canonical discriminant analysis for each effect in your model with the DISCRIM subcommand, specify a principal components analysis of each error sum-of-squares and cross-product matrix in a multivariate analysis on the PCOMPS subcommand, display multivariate confidence intervals using the CINTERVAL subcommand, and generate a half-normal plot of the within-cells correlations among the dependent variables with the PLOT subcommand.

Basic Specification Collapse Hide details

Basic Specification

• The basic specification is a variable list identifying the dependent variables, with the factors (if any) named after BY and the covariates (if any) named after WITH.

• By default, MANOVA produces multivariate and univariate F tests.

Subcommand Order Collapse Hide details

Subcommand Order

• The variable list must be specified first.

• Subcommands applicable to a specific design must be specified before that DESIGN subcommand. Otherwise, subcommands can be used in any order.

Syntax Rules Collapse Hide details

Syntax Rules

• All syntax rules applicable to univariate analysis also apply to multivariate analysis.

• If you enter one of the multivariate specifications in a univariate analysis, MANOVA ignores it.

Limitations Collapse Hide details

Limitations

• Maximum of 20 factors.

• Memory requirements depend primarily on the number of cells in the design. For the default full factorial model, the number of cells equals the product of the number of levels or categories in each factor.

Related Topics

MANOVA: Multivariate
MANOVA Variable List (MANOVA: Multivariate command)
TRANSFORM Subcommand (MANOVA: Multivariate command)
RENAME Subcommand (MANOVA: Multivariate command)
PRINT and NOPRINT Subcommands (MANOVA: Multivariate command)
PLOT Subcommand (MANOVA: Multivariate command)
PCOMPS Subcommand (MANOVA: Multivariate command)
DISCRIM Subcommand (MANOVA: Multivariate command)
POWER Subcommand (MANOVA: Multivariate command)
CINTERVAL Subcommand (MANOVA: Multivariate command)
ANALYSIS Subcommand (MANOVA: Multivariate command)
CONDITIONAL and UNCONDITIONAL Keywords (MANOVA: Multivariate command)


MANOVA Variable List (MANOVA: Multivariate command)

MANOVA (command),MANOVA (command),MANOVA (command)
dependent variable,dependent variable,dependent variable

• Multivariate MANOVA calculates statistical tests that are valid for analyses of dependent variables that are correlated with one another. The dependent variables must be specified first.

MANOVA (command),MANOVA (command),MANOVA (command)
covariates,covariates,covariates
MANOVA (command),MANOVA (command),MANOVA (command)
factors,factors,factors

• The factor and covariate lists follow the same rules as in univariate analyses.

• If the dependent variables are uncorrelated, the univariate significance tests have greater statistical power.

Related Topics

MANOVA: Multivariate
Overview (MANOVA: Multivariate command)
TRANSFORM Subcommand (MANOVA: Multivariate command)
RENAME Subcommand (MANOVA: Multivariate command)
PRINT and NOPRINT Subcommands (MANOVA: Multivariate command)
PLOT Subcommand (MANOVA: Multivariate command)
PCOMPS Subcommand (MANOVA: Multivariate command)
DISCRIM Subcommand (MANOVA: Multivariate command)
POWER Subcommand (MANOVA: Multivariate command)
CINTERVAL Subcommand (MANOVA: Multivariate command)
ANALYSIS Subcommand (MANOVA: Multivariate command)
CONDITIONAL and UNCONDITIONAL Keywords (MANOVA: Multivariate command)


TRANSFORM Subcommand (MANOVA: Multivariate command)

MANOVA,MANOVA,MANOVA
linear transformations,linear transformations,linear transformations

TRANSFORM performs linear transformations of some or all of the continuous variables (dependent variables and covariates). Specifications on TRANSFORM include an optional list of variables to be transformed, optional keywords to describe how to generate a transformation matrix from the specified contrasts, and a required keyword specifying the transformation contrasts.

• Transformations apply to all subsequent designs unless replaced by another TRANSFORM subcommand.

• TRANSFORM subcommands are not cumulative. Only the transformation specified most recently is in effect at any time. You can restore the original variables in later designs by specifying SPECIAL with an identity matrix.

• You should not use TRANSFORM when you use the WSFACTORS subcommand to request repeated measures analysis; a transformation is automatically performed in repeated measures analysis (see MANOVA: Repeated Measures).

• Transformations are in effect for the duration of the MANOVA procedure only. After the procedure is complete, the original variables remain in the active dataset.

• By default, the transformation matrix is not displayed. Specify the keyword TRANSFORM on the PRINT subcommand to see the matrix generated by the TRANSFORM subcommand.

• If you do not use the RENAME subcommand with TRANSFORM, the variables specified on TRANSFORM are renamed temporarily (for the duration of the procedure) as T1, T2, and so on. Explicit use of RENAME is recommended.

MANOVA (command),MANOVA (command),MANOVA (command)
OMEANS subcommand,OMEANS subcommand,OMEANS subcommand
OMEANS (subcommand),OMEANS (subcommand),OMEANS (subcommand)
MANOVA command,MANOVA command,MANOVA command

• Subsequent references to transformed variables should use the new names. The only exception is when you supply a VARIABLES specification on the OMEANS subcommand after using TRANSFORM. In this case, specify the original names. OMEANS displays observed means of original variables. See OMEANS Subcommand (MANOVA: Univariate command).

Related Topics

MANOVA: Multivariate
Overview (MANOVA: Multivariate command)
MANOVA Variable List (MANOVA: Multivariate command)
RENAME Subcommand (MANOVA: Multivariate command)
PRINT and NOPRINT Subcommands (MANOVA: Multivariate command)
PLOT Subcommand (MANOVA: Multivariate command)
PCOMPS Subcommand (MANOVA: Multivariate command)
DISCRIM Subcommand (MANOVA: Multivariate command)
POWER Subcommand (MANOVA: Multivariate command)
CINTERVAL Subcommand (MANOVA: Multivariate command)
ANALYSIS Subcommand (MANOVA: Multivariate command)
CONDITIONAL and UNCONDITIONAL Keywords (MANOVA: Multivariate command)
Variable Lists (MANOVA: Multivariate command)
CONTRAST, BASIS, and ORTHONORM Keywords (MANOVA: Multivariate command)
Transformation Methods (MANOVA: Multivariate command)


Variable Lists (MANOVA: Multivariate command)

• By default, MANOVA applies the transformation you request to all continuous variables (dependent variables and covariates).

• You can enter a variable list in parentheses following the TRANSFORM subcommand. If you do, only the listed variables are transformed.

• You can enter multiple variable lists, separated by slashes, within a single set of parentheses. Each list must have the same number of variables, and the lists must not overlap. The transformation is applied separately to the variables on each list.

• In designs with covariates, transform only the dependent variables, or, in some designs, apply the same transformation separately to the dependent variables and the covariates.

Related Topics

TRANSFORM Subcommand (MANOVA: Multivariate command)
CONTRAST, BASIS, and ORTHONORM Keywords (MANOVA: Multivariate command)
Transformation Methods (MANOVA: Multivariate command)


CONTRAST, BASIS, and ORTHONORM Keywords (MANOVA: Multivariate command)

BASIS (keyword),BASIS (keyword),BASIS (keyword)
MANOVA command,MANOVA command,MANOVA command
CONTRAST (keyword),CONTRAST (keyword),CONTRAST (keyword)
MANOVA command,MANOVA command,MANOVA command
ORTHONORM (keyword),ORTHONORM (keyword),ORTHONORM (keyword)
MANOVA command,MANOVA command,MANOVA command
MANOVA,MANOVA,MANOVA
contrasts,contrasts,contrasts
contrasts,contrasts,contrasts
in MANOVA,in MANOVA,in MANOVA

You can control how the transformation matrix is to be generated from the specified contrasts. If none of these three keywords is specified on TRANSFORM, the default is CONTRAST.

CONTRAST | Generate the transformation matrix directly from the contrast matrix specified (see CONTRAST Subcommand (MANOVA: Univariate command)). This is the default.
BASIS | Generate the transformation matrix from the one-way basis matrix corresponding to the specified contrast matrix. BASIS makes a difference only if the transformation contrasts are not orthogonal.
ORTHONORM | Orthonormalize the transformation matrix by rows before use. MANOVA eliminates redundant rows. By default, orthonormalization is not done.

• CONTRAST and BASIS are alternatives and are mutually exclusive.

• ORTHONORM is independent of the CONTRAST/BASIS choice; you can enter it before or after either of those keywords.

Related Topics

TRANSFORM Subcommand (MANOVA: Multivariate command)
Variable Lists (MANOVA: Multivariate command)
Transformation Methods (MANOVA: Multivariate command)


Transformation Methods (MANOVA: Multivariate command)

DEVIATION (keyword),DEVIATION (keyword),DEVIATION (keyword)
MANOVA command,MANOVA command,MANOVA command

To specify a transformation method, use one of the following keywords available on the TRANSFORM subcommand. Note that these are identical to the keywords available for the CONTRAST subcommand (see CONTRAST Subcommand (MANOVA: Univariate command)). However, in univariate designs, they are applied to the different levels of a factor. Here they are applied to the continuous variables in the analysis. This reflects the fact that the different dependent variables in a multivariate MANOVA setup can often be thought of as corresponding to different levels of some factor.

• The transformation keyword (and its specifications, if any) must follow all other specifications on the TRANSFORM subcommand.

deviation contrasts,deviation contrasts,deviation contrasts
in MANOVA command,in MANOVA command,in MANOVA command
DIFFERENCE (keyword),DIFFERENCE (keyword),DIFFERENCE (keyword)
MANOVA command,MANOVA command,MANOVA command
difference contrasts,difference contrasts,difference contrasts
in MANOVA command,in MANOVA command,in MANOVA command
HELMERT (keyword),HELMERT (keyword),HELMERT (keyword)
MANOVA command,MANOVA command,MANOVA command
Helmert contrasts,Helmert contrasts,Helmert contrasts
in MANOVA command,in MANOVA command,in MANOVA command
SIMPLE (keyword),SIMPLE (keyword),SIMPLE (keyword)
MANOVA command,MANOVA command,MANOVA command
simple contrasts,simple contrasts,simple contrasts
in MANOVA command,in MANOVA command,in MANOVA command
POLYNOMIAL (keyword),POLYNOMIAL (keyword),POLYNOMIAL (keyword)
MANOVA command,MANOVA command,MANOVA command
polynomial contrasts,polynomial contrasts,polynomial contrasts
in MANOVA command,in MANOVA command,in MANOVA command
REPEATED (keyword),REPEATED (keyword),REPEATED (keyword)
MANOVA command,MANOVA command,MANOVA command
repeated contrasts,repeated contrasts,repeated contrasts
in MANOVA command,in MANOVA command,in MANOVA command
SPECIAL (keyword),SPECIAL (keyword),SPECIAL (keyword)
MANOVA command,MANOVA command,MANOVA command
DEVIATION | Deviations from the mean of the variables being transformed. The first transformed variable is the mean of all variables in the transformation. Other transformed variables represent deviations of individual variables from the mean. One of the original variables (by default, the last) is omitted as redundant. To omit a variable other than the last, specify the number of the variable to be omitted in parentheses after the DEVIATION keyword. For example,
 | /TRANSFORM (A B C) = DEVIATION(1)
 | omits A and creates variables representing the mean, the deviation of B from the mean, and the deviation of C from the mean. A DEVIATION transformation is not orthogonal.
DIFFERENCE | Difference or reverse Helmert transformation. The first transformed variable is the mean of the original variables. Each of the original variables except the first is then transformed by subtracting the mean of those (original) variables that precede it. A DIFFERENCE transformation is orthogonal.
HELMERT | Helmert transformation. The first transformed variable is the mean of the original variables. Each of the original variables except the last is then transformed by subtracting the mean of those (original) variables that follow it. A HELMERT transformation is orthogonal.
SIMPLE | Each original variable, except the last, is compared to the last of the original variables. To use a variable other than the last as the omitted reference variable, specify its number in parentheses following the keyword SIMPLE. For example,
 | /TRANSFORM(A B C) = SIMPLE(2)
 | specifies the second variable, B, as the reference variable. The three transformed variables represent the mean of A, B, and C, the difference between A and B, and the difference between C and B. A SIMPLE transformation is not orthogonal.
POLYNOMIAL | Orthogonal polynomial transformation. The first transformed variable represents the mean of the original variables. Other transformed variables represent the linear, quadratic, and higher-degree components. By default, values of the original variables are assumed to represent equally spaced points. You can specify unequal spacing by entering a metric consisting of one integer for each variable in parentheses after the keyword POLYNOMIAL. For example,
 | /TRANSFORM(RESP1 RESP2 RESP3) = POLYNOMIAL(1,2,4)
 | might indicate that three response variables correspond to levels of some stimulus that are in the proportion 1:2:4. The default metric is always (1,2,..., k), where k variables are involved. Only the relative differences between the terms of the metric matter: (1,2,4) is the same metric as (2,3,5) or (20,30,50) because in each instance the difference between the second and third numbers is twice the difference between the first and second.
REPEATED | Comparison of adjacent variables. The first transformed variable is the mean of the original variables. Each additional transformed variable is the difference between one of the original variables and the original variable that followed it. Such transformed variables are often called difference scores. A REPEATED transformation is not orthogonal.
SPECIAL | A user-defined transformation. After the keyword SPECIAL, enter a square matrix in parentheses with as many rows and columns as there are variables to transform. MANOVA multiplies this matrix by the vector of original variables to obtain the transformed variables (see the examples below).

Example

MANOVA X1 TO X3 BY A(1,4)
  /TRANSFORM(X1 X2 X3) = SPECIAL( 1  1  1,
                                  1  0 -1,
                                  2 -1 -1)
  /DESIGN.

• The given matrix will be post-multiplied by the three continuous variables (considered as a column vector) to yield the transformed variables. The first transformed variable will therefore equal X1 + X2 + X3, the second will equal X1 − X3, and the third will equal 2X1 − X2 − X3.

• The variable list is optional in this example since all three interval-level variables are transformed.

• You do not need to enter the matrix one row at a time, as shown above. For example,

/TRANSFORM = SPECIAL(1 1 1 1 0 -1 2 -1 -1)

is equivalent to the TRANSFORM specification in the above example.

• You can specify a repetition factor followed by an asterisk to indicate multiple consecutive elements of a SPECIAL transformation matrix. For example,

/TRANSFORM = SPECIAL (4*1 0 -1 2 2*-1)

is again equivalent to the TRANSFORM specification above.

Example

MANOVA X1 TO X3, Y1 TO Y3 BY A(1,4)
 /TRANSFORM (X1 X2 X3/Y1 Y2 Y3) = SPECIAL( 1  1  1,
                                           1  0 -1,
                                           2 -1 -1)
 /DESIGN.

• Here the same transformation shown in the previous example is applied to X1, X2, X3 and to Y1, Y2, Y3.

Related Topics

TRANSFORM Subcommand (MANOVA: Multivariate command)
Variable Lists (MANOVA: Multivariate command)
CONTRAST, BASIS, and ORTHONORM Keywords (MANOVA: Multivariate command)


RENAME Subcommand (MANOVA: Multivariate command)

MANOVA (command),MANOVA (command),MANOVA (command)
RENAME subcommand,RENAME subcommand,RENAME subcommand
RENAME (subcommand),RENAME (subcommand),RENAME (subcommand)
MANOVA command,MANOVA command,MANOVA command
MANOVA,MANOVA,MANOVA
naming transformed variables,naming transformed variables,naming transformed variables

Use RENAME to assign new names to transformed variables. Renaming variables after a transformation is strongly recommended. If you transform but do not rename the variables, the names T1, T2, ...,Tn are used as names for the transformed variables.

• Follow RENAME with a list of new variable names.

• You must enter a new name for each dependent variable and covariate on the MANOVA variable list.

• Enter the new names in the order in which the original variables appeared on the MANOVA variable list.

• To retain the original name for one or more of the interval variables, you can either enter an asterisk or reenter the old name as the new name.

• References to dependent variables and covariates on subcommands following RENAME must use the new names. The original names will not be recognized within the MANOVA procedure. The only exception is the OMEANS subcommand, which displays observed means of the original (untransformed) variables. Use the original names on OMEANS.

• The new names exist only during the MANOVA procedure that created them. They do not remain in the active dataset after the procedure is complete.

Example

MANOVA A, B, C, V4, V5 BY TREATMNT(1,3)
  /TRANSFORM(A, B, C) = REPEATED
  /RENAME = MEANABC, AMINUSB, BMINUSC, *, *
  /DESIGN.

• The REPEATED transformation produces three transformed variables, which are then assigned mnemonic names MEANABC, AMINUSB, and BMINUSC.

• V4 and V5 retain their original names.

Example

MANOVA WT1, WT2, WT3, WT4 BY TREATMNT(1,3) WITH COV
  /TRANSFORM (WT1 TO WT4) = POLYNOMIAL
  /RENAME = MEAN, LINEAR, QUAD, CUBIC, *
  /ANALYSIS = MEAN, LINEAR, QUAD WITH COV
  /DESIGN.

• After the polynomial transformation of the four WT variables, RENAME assigns appropriate names to the various trends.

• Even though only four variables were transformed, RENAME applies to all five continuous variables. An asterisk is required to retain the original name for COV.

• The ANALYSIS subcommand following RENAME refers to the interval variables by their new names.

Related Topics

MANOVA: Multivariate
Overview (MANOVA: Multivariate command)
MANOVA Variable List (MANOVA: Multivariate command)
TRANSFORM Subcommand (MANOVA: Multivariate command)
PRINT and NOPRINT Subcommands (MANOVA: Multivariate command)
PLOT Subcommand (MANOVA: Multivariate command)
PCOMPS Subcommand (MANOVA: Multivariate command)
DISCRIM Subcommand (MANOVA: Multivariate command)
POWER Subcommand (MANOVA: Multivariate command)
CINTERVAL Subcommand (MANOVA: Multivariate command)
ANALYSIS Subcommand (MANOVA: Multivariate command)
CONDITIONAL and UNCONDITIONAL Keywords (MANOVA: Multivariate command)


PRINT and NOPRINT Subcommands (MANOVA: Multivariate command)

MANOVA (command),MANOVA (command),MANOVA (command)
display options,display options,display options
MANOVA (command),MANOVA (command),MANOVA (command)
PRINT subcommand,PRINT subcommand,PRINT subcommand
PRINT (subcommand),PRINT (subcommand),PRINT (subcommand)
MANOVA command,MANOVA command,MANOVA command
MANOVA (command),MANOVA (command),MANOVA (command)
NOPRINT subcommand,NOPRINT subcommand,NOPRINT subcommand
NOPRINT (subcommand),NOPRINT (subcommand),NOPRINT (subcommand)
MANOVA command,MANOVA command,MANOVA command

All of the PRINT specifications described in MANOVA: Univariate are available in multivariate analyses. The following additional output can be requested. To suppress any optional output, specify the appropriate keyword on NOPRINT.

MANOVA (command),MANOVA (command),MANOVA (command)
error matrices,error matrices,error matrices
MANOVA (command),MANOVA (command),MANOVA (command)
significance tests,significance tests,significance tests
transformation matrix,transformation matrix,transformation matrix
in MANOVA command,in MANOVA command,in MANOVA command
MANOVA (command),MANOVA (command),MANOVA (command)
transformation matrix,transformation matrix,transformation matrix
MANOVA (command),MANOVA (command),MANOVA (command)
homogeneity tests,homogeneity tests,homogeneity tests
homogeneity tests,homogeneity tests,homogeneity tests
in MANOVA command,in MANOVA command,in MANOVA command
ERROR (keyword),ERROR (keyword),ERROR (keyword)
MANOVA command,MANOVA command,MANOVA command
ERROR | Error matrices. Three types of matrices are available.
SIGNIF | Significance tests.
TRANSFORM | Transformation matrix. It is available if you have transformed the dependent variables with the TRANSFORM subcommand.
HOMOGENEITY | Test for homogeneity of variance. BOXM is available for multivariate analyses.

Related Topics

MANOVA: Multivariate
Overview (MANOVA: Multivariate command)
MANOVA Variable List (MANOVA: Multivariate command)
TRANSFORM Subcommand (MANOVA: Multivariate command)
RENAME Subcommand (MANOVA: Multivariate command)
PLOT Subcommand (MANOVA: Multivariate command)
PCOMPS Subcommand (MANOVA: Multivariate command)
DISCRIM Subcommand (MANOVA: Multivariate command)
POWER Subcommand (MANOVA: Multivariate command)
CINTERVAL Subcommand (MANOVA: Multivariate command)
ANALYSIS Subcommand (MANOVA: Multivariate command)
CONDITIONAL and UNCONDITIONAL Keywords (MANOVA: Multivariate command)
ERROR Keyword (MANOVA: Multivariate command)
SIGNIF Keyword (MANOVA: Multivariate command)
TRANSFORM Keyword (MANOVA: Multivariate command)
HOMOGENEITY Keyword (MANOVA: Multivariate command)


ERROR Keyword (MANOVA: Multivariate command)

SSCP (keyword),SSCP (keyword),SSCP (keyword)
MANOVA command,MANOVA command,MANOVA command

In multivariate analysis, error terms consist of entire matrices, not single values. You can display any of the following error matrices on a PRINT subcommand by requesting them in parentheses following the keyword ERROR. If you specify ERROR by itself, without further specifications, the default is to display COV and COR.

MANOVA,MANOVA,MANOVA
cross-products matrix,cross-products matrix,cross-products matrix
MANOVA,MANOVA,MANOVA
error sum of squares,error sum of squares,error sum of squares
COV (keyword),COV (keyword),COV (keyword)
MANOVA command,MANOVA command,MANOVA command
MANOVA,MANOVA,MANOVA
error variance-covariance matrix,error variance-covariance matrix,error variance-covariance matrix
COR (keyword),COR (keyword),COR (keyword)
MANOVA command,MANOVA command,MANOVA command
Bartlett's test of sphericity,Bartlett's test of sphericity,Bartlett's test of sphericity
in MANOVA,in MANOVA,in MANOVA
MANOVA,MANOVA,MANOVA
error correlation matrix,error correlation matrix,error correlation matrix
SSCP | Error sums-of-squares and cross-products matrix.
COV | Error variance-covariance matrix.
COR | Error correlation matrix with standard deviations on the diagonal. This also displays the determinant of the matrix and Bartlett’s test of sphericity, a test of whether the error correlation matrix is significantly different from an identity matrix.

Related Topics

PRINT and NOPRINT Subcommands (MANOVA: Multivariate command)
SIGNIF Keyword (MANOVA: Multivariate command)
TRANSFORM Keyword (MANOVA: Multivariate command)
HOMOGENEITY Keyword (MANOVA: Multivariate command)


SIGNIF Keyword (MANOVA: Multivariate command)

SIGNIF (keyword),SIGNIF (keyword),SIGNIF (keyword)
MANOVA command,MANOVA command,MANOVA command

You can request any of the optional output listed below by entering the appropriate specification in parentheses after the keyword SIGNIF on the PRINT subcommand. Further specifications for SIGNIF are described in MANOVA: Repeated Measures.

F test,F test,F test
in MANOVA,in MANOVA,in MANOVA
MANOVA,MANOVA,MANOVA
significance tests,significance tests,significance tests
MULTIV (keyword),MULTIV (keyword),MULTIV (keyword)
MANOVA command,MANOVA command,MANOVA command
EIGEN (keyword),EIGEN (keyword),EIGEN (keyword)
MANOVA command,MANOVA command,MANOVA command
eigenvalues,eigenvalues,eigenvalues
in MANOVA,in MANOVA,in MANOVA
DIMENR (keyword),DIMENR (keyword),DIMENR (keyword)
MANOVA command,MANOVA command,MANOVA command
dimension reduction analysis,dimension reduction analysis,dimension reduction analysis
in MANOVA,in MANOVA,in MANOVA
UNIV (keyword),UNIV (keyword),UNIV (keyword)
MANOVA command,MANOVA command,MANOVA command
HYPOTH (keyword),HYPOTH (keyword),HYPOTH (keyword)
MANOVA command,MANOVA command,MANOVA command
STEPDOWN (keyword),STEPDOWN (keyword),STEPDOWN (keyword)
MANOVA command,MANOVA command,MANOVA command
Roy-Bargmann stepdown F,Roy-Bargmann stepdown F,Roy-Bargmann stepdown F
in MANOVA,in MANOVA,in MANOVA
BRIEF (keyword),BRIEF (keyword),BRIEF (keyword)
MANOVA command,MANOVA command,MANOVA command
MULTIV | Multivariate F tests for group differences. MULTIV is always printed unless explicitly suppressed with the NOPRINT subcommand.
EIGEN | Eigenvalues of the SkSe−1 matrix. This matrix is the product of the hypothesis sums-of-squares and cross-products (SSCP) matrix and the inverse of the error SSCP matrix. To print EIGEN, request it on the PRINT subcommand.
DIMENR | A dimension-reduction analysis. To print DIMENR, request it on the PRINT subcommand.
UNIV | Univariate F tests. UNIV is always printed except in repeated measures analysis. If the dependent variables are uncorrelated, univariate tests have greater statistical power. To suppress UNIV, use the NOPRINT subcommand.
HYPOTH | The hypothesis SSCP matrix. To print HYPOTH, request it on the PRINT subcommand.
STEPDOWN | Roy-Bargmann stepdown F tests. To print STEPDOWN, request it on the PRINT subcommand.
BRIEF | Abbreviated multivariate output. This is similar to a univariate analysis of variance table but with Wilks’ multivariate F approximation (lambda) replacing the univariate F. BRIEF overrides any of the SIGNIF specifications listed above.
SINGLEDF | Significance tests for the single degree of freedom making up each effect for ANOVA tables. Results are displayed separately corresponding to each hypothesis degree of freedom. See the topic SIGNIF Keyword (MANOVA: Univariate command) for more information.

• If neither PRINT nor NOPRINT is specified, MANOVA displays the results corresponding to MULTIV and UNIV for a multivariate analysis not involving repeated measures.

• If you enter any specification except BRIEF or SINGLEDF for SIGNIF on the PRINT subcommand, the requested output is displayed in addition to the default.

SINGLEDF (keyword),SINGLEDF (keyword),SINGLEDF (keyword)
MANOVA command,MANOVA command,MANOVA command

• To suppress the default, specify the keyword(s) on the NOPRINT subcommand.

Related Topics

PRINT and NOPRINT Subcommands (MANOVA: Multivariate command)
ERROR Keyword (MANOVA: Multivariate command)
TRANSFORM Keyword (MANOVA: Multivariate command)
HOMOGENEITY Keyword (MANOVA: Multivariate command)


TRANSFORM Keyword (MANOVA: Multivariate command)

TRANSFORM (keyword),TRANSFORM (keyword),TRANSFORM (keyword)
MANOVA command,MANOVA command,MANOVA command

The keyword TRANSFORM specified on PRINT displays the transposed transformation matrix in use for each subsequent design. This matrix is helpful in interpreting a multivariate analysis in which the interval-level variables have been transformed with either TRANSFORM or WSFACTORS.

• The matrix displayed by this option is the transpose of the transformation matrix.

• Original variables correspond to the rows of the matrix, and transformed variables correspond to the columns.

• A transformed variable is a linear combination of the original variables using the coefficients displayed in the column corresponding to that transformed variable.

Related Topics

PRINT and NOPRINT Subcommands (MANOVA: Multivariate command)
ERROR Keyword (MANOVA: Multivariate command)
SIGNIF Keyword (MANOVA: Multivariate command)
HOMOGENEITY Keyword (MANOVA: Multivariate command)


HOMOGENEITY Keyword (MANOVA: Multivariate command)

HOMOGENEITY (keyword),HOMOGENEITY (keyword),HOMOGENEITY (keyword)
MANOVA command,MANOVA command,MANOVA command

In addition to the BARTLETT and COCHRAN specifications described in MANOVA: Univariate, the following test for homogeneity is available for multivariate analyses:

BOXM (keyword),BOXM (keyword),BOXM (keyword)
MANOVA command,MANOVA command,MANOVA command
Box's M test,Box's M test,Box's M test
in MANOVA,in MANOVA,in MANOVA
BOXM Box’s M statistic. BOXM requires at least two dependent variables. If there is only one dependent variable when BOXM is requested, MANOVA prints Bartlett-Box F test statistic and issues a note.

Related Topics

PRINT and NOPRINT Subcommands (MANOVA: Multivariate command)
ERROR Keyword (MANOVA: Multivariate command)
SIGNIF Keyword (MANOVA: Multivariate command)
TRANSFORM Keyword (MANOVA: Multivariate command)


PLOT Subcommand (MANOVA: Multivariate command)

MANOVA (command),MANOVA (command),MANOVA (command)
PLOT subcommand,PLOT subcommand,PLOT subcommand
PLOT (subcommand),PLOT (subcommand),PLOT (subcommand)
MANOVA command,MANOVA command,MANOVA command
ZCORR (keyword),ZCORR (keyword),ZCORR (keyword)
MANOVA command,MANOVA command,MANOVA command

In addition to the plots described in MANOVA: Univariate, the following is available for multivariate analyses:

ZCORR A half-normal plot of the within-cells correlations among the dependent variables. MANOVA first transforms the correlations using Fisher’s Z transformation. If errors for the dependent variables are uncorrelated, the plotted points should lie close to a straight line.

Related Topics

MANOVA: Multivariate
Overview (MANOVA: Multivariate command)
MANOVA Variable List (MANOVA: Multivariate command)
TRANSFORM Subcommand (MANOVA: Multivariate command)
RENAME Subcommand (MANOVA: Multivariate command)
PRINT and NOPRINT Subcommands (MANOVA: Multivariate command)
PCOMPS Subcommand (MANOVA: Multivariate command)
DISCRIM Subcommand (MANOVA: Multivariate command)
POWER Subcommand (MANOVA: Multivariate command)
CINTERVAL Subcommand (MANOVA: Multivariate command)
ANALYSIS Subcommand (MANOVA: Multivariate command)
CONDITIONAL and UNCONDITIONAL Keywords (MANOVA: Multivariate command)


PCOMPS Subcommand (MANOVA: Multivariate command)

MANOVA (command),MANOVA (command),MANOVA (command)
PCOMPS subcommand,PCOMPS subcommand,PCOMPS subcommand
PCOMPS (subcommand),PCOMPS (subcommand),PCOMPS (subcommand)
MANOVA command,MANOVA command,MANOVA command
principal components analysis,principal components analysis,principal components analysis
in MANOVA,in MANOVA,in MANOVA
MANOVA,MANOVA,MANOVA
principal components analysis,principal components analysis,principal components analysis

PCOMPS requests a principal components analysis of each error matrix in a multivariate analysis. You can display the principal components of the error correlation matrix, the error variance-covariance matrix, or both. These principal components are corrected for differences due to the factors and covariates in the MANOVA analysis. They tend to be more useful than principal components extracted from the raw correlation or covariance matrix when there are significant group differences between the levels of the factors or when a significant amount of error variance is accounted for by the covariates. You can specify any of the keywords listed below on PCOMPS.

ROTATE (keyword),ROTATE (keyword),ROTATE (keyword)
MANOVA command,MANOVA command,MANOVA command
VARIMAX (keyword),VARIMAX (keyword),VARIMAX (keyword)
MANOVA command,MANOVA command,MANOVA command
EQUAMAX (keyword),EQUAMAX (keyword),EQUAMAX (keyword)
MANOVA command,MANOVA command,MANOVA command
QUARTIMAX (keyword),QUARTIMAX (keyword),QUARTIMAX (keyword)
MANOVA command,MANOVA command,MANOVA command
NOROTATE (keyword),NOROTATE (keyword),NOROTATE (keyword)
MANOVA command,MANOVA command,MANOVA command
NCOMP (keyword),NCOMP (keyword),NCOMP (keyword)
MANOVA command,MANOVA command,MANOVA command
MINEIGEN (keyword),MINEIGEN (keyword),MINEIGEN (keyword)
MANOVA command,MANOVA command,MANOVA command
COR | Principal components analysis of the error correlation matrix.
COV | Principal components analysis of the error variance-covariance matrix.
ROTATE | Rotate the principal components solution. By default, no rotation is performed. Specify a rotation type (either VARIMAX, EQUAMAX, or QUARTIMAX) in parentheses after the keyword ROTATE. To cancel a rotation specified for a previous design, enter NOROTATE in the parentheses after ROTATE.
NCOMP(n) | The number of principal components to rotate. Specify a number in parentheses. The default is the number of dependent variables.
MINEIGEN(n) | The minimum eigenvalue for principal component extraction. Specify a cutoff value in parentheses. Components with eigenvalues below the cutoff will not be retained in the solution. The default is 0; all components (or the number specified on NCOMP) are extracted.
ALL | COR, COV, and ROTATE.

• You must specify either COR or COV (or both). Otherwise, MANOVA will not produce any principal components.

• Both NCOMP and MINEIGEN limit the number of components that are rotated.

• If the number specified on NCOMP is less than two, two components are rotated provided that at least two components have eigenvalues greater than any value specified on MINEIGEN.

• Principal components analysis is computationally expensive if the number of dependent variables is large.

Related Topics

MANOVA: Multivariate
Overview (MANOVA: Multivariate command)
MANOVA Variable List (MANOVA: Multivariate command)
TRANSFORM Subcommand (MANOVA: Multivariate command)
RENAME Subcommand (MANOVA: Multivariate command)
PRINT and NOPRINT Subcommands (MANOVA: Multivariate command)
PLOT Subcommand (MANOVA: Multivariate command)
DISCRIM Subcommand (MANOVA: Multivariate command)
POWER Subcommand (MANOVA: Multivariate command)
CINTERVAL Subcommand (MANOVA: Multivariate command)
ANALYSIS Subcommand (MANOVA: Multivariate command)
CONDITIONAL and UNCONDITIONAL Keywords (MANOVA: Multivariate command)


DISCRIM Subcommand (MANOVA: Multivariate command)

MANOVA (command),MANOVA (command),MANOVA (command)
DISCRIM subcommand,DISCRIM subcommand,DISCRIM subcommand
DISCRIM (subcommand),DISCRIM (subcommand),DISCRIM (subcommand)
MANOVA command,MANOVA command,MANOVA command
discriminant analysis,discriminant analysis,discriminant analysis
in MANOVA,in MANOVA,in MANOVA
MANOVA,MANOVA,MANOVA
discriminant analysis,discriminant analysis,discriminant analysis
RAW (keyword),RAW (keyword),RAW (keyword)
MANOVA command,MANOVA command,MANOVA command

DISCRIM produces a canonical discriminant analysis for each effect in a design. (For covariates, DISCRIM produces a canonical correlation analysis.) These analyses aid in the interpretation of multivariate effects. You can request the following statistics by entering the appropriate keywords after the subcommand DISCRIM:

STAN (keyword),STAN (keyword),STAN (keyword)
MANOVA command,MANOVA command,MANOVA command
ESTIM (keyword),ESTIM (keyword),ESTIM (keyword)
MANOVA command,MANOVA command,MANOVA command
ALPHA (keyword),ALPHA (keyword),ALPHA (keyword)
MANOVA command,MANOVA command,MANOVA command
RAW | Raw discriminant function coefficients.
STAN | Standardized discriminant function coefficients.
ESTIM | Effect estimates in discriminant function space.
COR | Correlations between the dependent variables and the canonical variables defined by the discriminant functions.
ROTATE | Rotation of the matrix of correlations between dependent and canonical variables. Specify rotation type VARIMAX, EQUAMAX, or QUARTIMAX in parentheses after this keyword.
ALL | RAW, STAN, ESTIM, COR, and ROTATE.

By default, the significance level required for the extraction of a canonical variable is 0.25. You can change this value by specifying the keyword ALPHA and a value between 0 and 1 in parentheses:

ALPHA The significance level required before a canonical variable is extracted. The default is 0.25. To change the default, specify a decimal number between 0 and 1 in parentheses after ALPHA.

• The correlations between dependent variables and canonical functions are not rotated unless at least two functions are significant at the level defined by ALPHA.

• If you set ALPHA to 1.0, all discriminant functions are reported (and rotated, if you so request).

• If you set ALPHA to 0, no discriminant functions are reported.

Related Topics

MANOVA: Multivariate
Overview (MANOVA: Multivariate command)
MANOVA Variable List (MANOVA: Multivariate command)
TRANSFORM Subcommand (MANOVA: Multivariate command)
RENAME Subcommand (MANOVA: Multivariate command)
PRINT and NOPRINT Subcommands (MANOVA: Multivariate command)
PLOT Subcommand (MANOVA: Multivariate command)
PCOMPS Subcommand (MANOVA: Multivariate command)
POWER Subcommand (MANOVA: Multivariate command)
CINTERVAL Subcommand (MANOVA: Multivariate command)
ANALYSIS Subcommand (MANOVA: Multivariate command)
CONDITIONAL and UNCONDITIONAL Keywords (MANOVA: Multivariate command)


POWER Subcommand (MANOVA: Multivariate command)

POWER (subcommand),POWER (subcommand),POWER (subcommand)
MANOVA command,MANOVA command,MANOVA command
MANOVA (command),MANOVA (command),MANOVA (command)
POWER subcommand,POWER subcommand,POWER subcommand
power estimates,power estimates,power estimates
in MANOVA,in MANOVA,in MANOVA
MANOVA,MANOVA,MANOVA
power estimates,power estimates,power estimates

The following specifications are available for POWER in multivariate analysis. For applications of POWER in univariate analysis, see MANOVA: Univariate.

APPROXIMATE (keyword),APPROXIMATE (keyword),APPROXIMATE (keyword)
MANOVA command,MANOVA command,MANOVA command
EXACT (keyword),EXACT (keyword),EXACT (keyword)
MANOVA command,MANOVA command,MANOVA command
APPROXIMATE | Approximate power values. This is the default. Approximate power values for multivariate tests are derived from procedures presented by Muller and Peterson (Muller and Peterson, 1984). Approximate values are normally accurate to three decimal places and are much cheaper to compute than exact values.
EXACT | Exact power values. Exact power values for multivariate tests are computed from the noncentral F distribution. Exact multivariate power values will be displayed only if there is one hypothesis degree of freedom, where all the multivariate criteria have identical power.

• For information on the multivariate generalizations of power and effect size, see (Muller and Peterson, 1984), (Green, 1978), and (Huberty, 1972).

Related Topics

MANOVA: Multivariate
Overview (MANOVA: Multivariate command)
MANOVA Variable List (MANOVA: Multivariate command)
TRANSFORM Subcommand (MANOVA: Multivariate command)
RENAME Subcommand (MANOVA: Multivariate command)
PRINT and NOPRINT Subcommands (MANOVA: Multivariate command)
PLOT Subcommand (MANOVA: Multivariate command)
PCOMPS Subcommand (MANOVA: Multivariate command)
DISCRIM Subcommand (MANOVA: Multivariate command)
CINTERVAL Subcommand (MANOVA: Multivariate command)
ANALYSIS Subcommand (MANOVA: Multivariate command)
CONDITIONAL and UNCONDITIONAL Keywords (MANOVA: Multivariate command)


CINTERVAL Subcommand (MANOVA: Multivariate command)

CINTERVAL (subcommand),CINTERVAL (subcommand),CINTERVAL (subcommand)
MANOVA command,MANOVA command,MANOVA command
MANOVA (command),MANOVA (command),MANOVA (command)
CINTERVAL subcommand,CINTERVAL subcommand,CINTERVAL subcommand
MANOVA,MANOVA,MANOVA
confidence intervals,confidence intervals,confidence intervals
confidence intervals,confidence intervals,confidence intervals
in MANOVA,in MANOVA,in MANOVA

In addition to the specifications described in MANOVA: Univariate, the keyword MULTIVARIATE is available for multivariate analysis. You can specify a type in parentheses after the MULTIVARIATE keyword. The following type keywords are available on MULTIVARIATE:

Roy's largest root,Roy's largest root,Roy's largest root
in MANOVA,in MANOVA,in MANOVA
Pillai's trace,Pillai's trace,Pillai's trace
in MANOVA,in MANOVA,in MANOVA
Wilks' lambda,Wilks' lambda,Wilks' lambda
in MANOVA,in MANOVA,in MANOVA
Hotelling's trace,Hotelling's trace,Hotelling's trace
in MANOVA,in MANOVA,in MANOVA
Bonferroni intervals,Bonferroni intervals,Bonferroni intervals
in MANOVA,in MANOVA,in MANOVA
ROY | Roy’s largest root. An approximation given by Pillai (Pillai, 1967) is used. This approximation is accurate for upper percentage points (0.95 to 1), but it is not as good for lower percentage points. Thus, for Roy intervals, the user is restricted to the range 0.95 to 1.
PILLAI | Pillai’s trace. The intervals are computed by approximating the percentage points with percentage points of the F distribution.
WILKS | Wilks’ lambda. The intervals are computed by approximating the percentage points with percentage points of the F distribution.
HOTELLING | Hotelling’s trace. The intervals are computed by approximating the percentage points with percentage points of the F distribution.
BONFER | Bonferroni intervals. This approximation is based on Student’s t distribution.

• The Wilks’, Pillai’s, and Hotelling’s approximate confidence intervals are thought to match exact intervals across a wide range of alpha levels, especially for large sample sizes (Burns, 1984). Use of these intervals, however, has not been widely investigated.

• To obtain multivariate intervals separately for each parameter, choose individual multivariate intervals. For individual multivariate confidence intervals, the hypothesis degree of freedom is set to 1, in which case Hotelling’s, Pillai’s, Wilks’, and Roy’s intervals will be identical and equivalent to those computed from percentage points of Hotelling’s T2 distribution. Individual Bonferroni intervals will differ and, for a small number of dependent variables, will generally be shorter.

• If you specify MULTIVARIATE on CINTERVAL, you must specify a type keyword. If you specify CINTERVAL without any keyword, the default is the same as with univariate analysis—CINTERVAL displays individual-univariate confidence intervals at the 0.95 level.

Related Topics

MANOVA: Multivariate
Overview (MANOVA: Multivariate command)
MANOVA Variable List (MANOVA: Multivariate command)
TRANSFORM Subcommand (MANOVA: Multivariate command)
RENAME Subcommand (MANOVA: Multivariate command)
PRINT and NOPRINT Subcommands (MANOVA: Multivariate command)
PLOT Subcommand (MANOVA: Multivariate command)
PCOMPS Subcommand (MANOVA: Multivariate command)
DISCRIM Subcommand (MANOVA: Multivariate command)
POWER Subcommand (MANOVA: Multivariate command)
ANALYSIS Subcommand (MANOVA: Multivariate command)
CONDITIONAL and UNCONDITIONAL Keywords (MANOVA: Multivariate command)


ANALYSIS Subcommand (MANOVA: Multivariate command)

MANOVA (command),MANOVA (command),MANOVA (command)
ANALYSIS subcommand,ANALYSIS subcommand,ANALYSIS subcommand
ANALYSIS (subcommand),ANALYSIS (subcommand),ANALYSIS (subcommand)
MANOVA command,MANOVA command,MANOVA command
MANOVA,MANOVA,MANOVA
analysis groups,analysis groups,analysis groups

ANALYSIS is discussed in MANOVA: Univariate as a means of obtaining factor-by-covariate interaction terms. In multivariate analyses, it is considerably more useful.

• ANALYSIS specifies a subset of the continuous variables (dependent variables and covariates) listed on the MANOVA variable list and completely redefines which variables are dependent and which are covariates.

• All variables named on an ANALYSIS subcommand must have been named on the MANOVA variable list. It does not matter whether they were named as dependent variables or as covariates.

• Factors cannot be named on an ANALYSIS subcommand.

• After the keyword ANALYSIS, specify the names of one or more dependent variables and, optionally, the keyword WITH followed by one or more covariates.

• An ANALYSIS specification remains in effect for all designs until you enter another ANALYSIS subcommand.

• Continuous variables named on the MANOVA variable list but omitted from the ANALYSIS subcommand currently in effect can be specified on the DESIGN subcommand. See the topic DESIGN Subcommand (MANOVA: Univariate command) for more information.

• You can use an ANALYSIS subcommand to request analyses of several groups of variables provided that the groups do not overlap. Separate the groups of variables with slashes and enclose the entire ANALYSIS specification in parentheses.

Related Topics

MANOVA: Multivariate
Overview (MANOVA: Multivariate command)
MANOVA Variable List (MANOVA: Multivariate command)
TRANSFORM Subcommand (MANOVA: Multivariate command)
RENAME Subcommand (MANOVA: Multivariate command)
PRINT and NOPRINT Subcommands (MANOVA: Multivariate command)
PLOT Subcommand (MANOVA: Multivariate command)
PCOMPS Subcommand (MANOVA: Multivariate command)
DISCRIM Subcommand (MANOVA: Multivariate command)
POWER Subcommand (MANOVA: Multivariate command)
CINTERVAL Subcommand (MANOVA: Multivariate command)
CONDITIONAL and UNCONDITIONAL Keywords (MANOVA: Multivariate command)


CONDITIONAL and UNCONDITIONAL Keywords (MANOVA: Multivariate command)

CONDITIONAL (keyword),CONDITIONAL (keyword),CONDITIONAL (keyword)
MANOVA command,MANOVA command,MANOVA command
UNCONDITIONAL (keyword),UNCONDITIONAL (keyword),UNCONDITIONAL (keyword)
MANOVA command,MANOVA command,MANOVA command

When several analysis groups are specified on a single ANALYSIS subcommand, you can control how each list is to be processed by specifying CONDITIONAL or UNCONDITIONAL in the parentheses immediately following the ANALYSIS subcommand. The default is UNCONDITIONAL.

UNCONDITIONAL | Process each analysis group separately, without regard to other lists. This is the default.
CONDITIONAL | Use variables specified in one analysis group as covariates in subsequent analysis groups.

• CONDITIONAL analysis is not carried over from one ANALYSIS subcommand to another.

• You can specify a final covariate list outside the parentheses. These covariates apply to every list within the parentheses, regardless of whether you specify CONDITIONAL or UNCONDITIONAL. The variables on this global covariate list must not be specified in any individual lists.

Example

MANOVA A B C BY FAC(1,4) WITH D, E
  /ANALYSIS = (A, B / C / D WITH E)
  /DESIGN.

• The first analysis uses A and B as dependent variables and uses no covariates.

• The second analysis uses C as a dependent variable and uses no covariates.

• The third analysis uses D as the dependent variable and uses E as a covariate.

Example

MANOVA A, B, C, D, E BY FAC(1,4) WITH F G
  /ANALYSIS = (A, B / C / D WITH E) WITH F G
  /DESIGN.

• A final covariate list WITH F G is specified outside the parentheses. The covariates apply to every list within the parentheses.

• The first analysis uses A and B, with F and G as covariates.

• The second analysis uses C, with F and G as covariates.

• The third analysis uses D, with E, F, and G as covariates.

• Factoring out F and G is the only way to use them as covariates in all three analyses, since no variable can be named more than once on an ANALYSIS subcommand.

Example

MANOVA A B C BY FAC(1,3)
  /ANALYSIS(CONDITIONAL) = (A WITH B / C)
  /DESIGN.

• In the first analysis, A is the dependent variable, B is a covariate, and C is not used.

• In the second analysis, C is the dependent variable, and both A and B are covariates.

Related Topics

MANOVA: Multivariate
Overview (MANOVA: Multivariate command)
MANOVA Variable List (MANOVA: Multivariate command)
TRANSFORM Subcommand (MANOVA: Multivariate command)
RENAME Subcommand (MANOVA: Multivariate command)
PRINT and NOPRINT Subcommands (MANOVA: Multivariate command)
PLOT Subcommand (MANOVA: Multivariate command)
PCOMPS Subcommand (MANOVA: Multivariate command)
DISCRIM Subcommand (MANOVA: Multivariate command)
POWER Subcommand (MANOVA: Multivariate command)
CINTERVAL Subcommand (MANOVA: Multivariate command)
ANALYSIS Subcommand (MANOVA: Multivariate command)


MANOVA: Repeated Measures

MANOVA is available in the Advanced Statistics option.

MANOVA dependent varlist [BY factor list (min,max)[factor list...]
         [WITH [varying covariate list] [(constant covariate list)]]

  /WSFACTORS = varname (levels) [varname...]

 [/WSDESIGN = [effect effect...]

 [/MEASURE = newname newname...]

 [/RENAME = newname newname...]

 [/{PRINT  }=[SIGNIF({AVERF**}) (HF) (GG) (EFSIZE)]]
   {NOPRINT}         {AVONLY }

 [/DESIGN]*

* The DESIGN subcommand has the same syntax as is described in MANOVA: Univariate.

** Default if the subcommand or keyword is omitted.

Example

MANOVA Y1 TO Y4 BY GROUP(1,2)
  /WSFACTORS=YEAR(4).

Related Topics

Overview (MANOVA: Repeated Measures command)
Example (MANOVA: Repeated Measures command)
MANOVA Variable List (MANOVA: Repeated Measures command)
WSFACTORS Subcommand (MANOVA: Repeated Measures command)
CONTRAST for WSFACTORS (MANOVA: Repeated Measures command)
PARTITION for WSFACTORS (MANOVA: Repeated Measures command)
WSDESIGN Subcommand (MANOVA: Repeated Measures command)
MWITHIN Keyword for Simple Effects (MANOVA: Repeated Measures command)
MEASURE Subcommand (MANOVA: Repeated Measures command)
RENAME Subcommand (MANOVA: Repeated Measures command)
PRINT Subcommand (MANOVA: Repeated Measures command)
References (MANOVA: Repeated Measures command)
MANOVA: Univariate
MANOVA: Multivariate
MANOVA


Overview (MANOVA: Repeated Measures command)

MANOVA (command),MANOVA (command),MANOVA (command)
within-subjects factors,within-subjects factors,within-subjects factors

This section discusses the subcommands that are used in repeated measures designs, in which the dependent variables represent measurements of the same variable (or variables) at different times. This section does not contain information on all subcommands you will need to specify the design. For some subcommands or keywords not covered here, such as DESIGN, see MANOVA: Univariate. For information on optional output and the multivariate significance tests available, see MANOVA: Multivariate.

• In a simple repeated measures analysis, all dependent variables represent different measurements of the same variable for different values (or levels) of a within-subjects factor. Between-subjects factors and covariates can also be included in the model, just as in analyses not involving repeated measures.

• A within-subjects factor is simply a factor that distinguishes measurements made on the same subject or case, rather than distinguishing different subjects or cases.

• MANOVA permits more complex analyses, in which the dependent variables represent levels of two or more within-subjects factors.

MANOVA (command),MANOVA (command),MANOVA (command)
doubly multivariate repeated measures,doubly multivariate repeated measures,doubly multivariate repeated measures

• MANOVA also permits analyses in which the dependent variables represent measurements of several variables for the different levels of the within-subjects factors. These are known as doubly multivariate designs.

MANOVA (command),MANOVA (command),MANOVA (command)
within-subjects factors,within-subjects factors,within-subjects factors
MANOVA (command),MANOVA (command),MANOVA (command)
between-subjects factors,between-subjects factors,between-subjects factors

• A repeated measures analysis includes a within-subjects design describing the model to be tested with the within-subjects factors, as well as the usual between-subjects design describing the effects to be tested with between-subjects factors. The default for both types of design is a full factorial model.

Mauchly's test of sphericity,Mauchly's test of sphericity,Mauchly's test of sphericity
in MANOVA command,in MANOVA command,in MANOVA command

• MANOVA always performs an orthonormal transformation of the dependent variables in a repeated measures analysis. By default, MANOVA renames them as T1, T2, and so forth.

Greenhouse-Geiser epsilon,Greenhouse-Geiser epsilon,Greenhouse-Geiser epsilon
Huynh-Feldt epsilon,Huynh-Feldt epsilon,Huynh-Feldt epsilon
Basic Specification Collapse Hide details

Basic Specification

• The basic specification is a variable list followed by the WSFACTORS subcommand.

• By default, MANOVA performs special repeated measures processing. Default output includes SIGNIF(AVERF) but not SIGNIF(UNIV). In addition, for any within-subjects effect involving more than one transformed variable, the Mauchly test of sphericity is displayed to test the assumption that the covariance matrix of the transformed variables is constant on the diagonal and zero off the diagonal. The Greenhouse-Geiser epsilon and the Huynh-Feldt epsilon are also displayed for use in correcting the significance tests in the event that the assumption of sphericity is violated.

Subcommand Order Collapse Hide details

Subcommand Order

• The list of dependent variables, factors, and covariates must be first.

• WSFACTORS must be the first subcommand used after the variable list.

Syntax Rules Collapse Hide details

Syntax Rules

• The WSFACTORS (within-subjects factors), WSDESIGN (within-subjects design), and MEASURE subcommands are used only in repeated measures analysis.

• WSFACTORS is required for any repeated measures analysis.

• If WSDESIGN is not specified, a full factorial within-subjects design consisting of all main effects and interactions among within-subjects factors is used by default.

• The MEASURE subcommand is used for doubly multivariate designs, in which the dependent variables represent repeated measurements of more than one variable.

• Do not use the TRANSFORM subcommand with the WSFACTORS subcommand because WSFACTORS automatically causes an orthonormal transformation of the dependent variables.

MANOVA (command),MANOVA (command),MANOVA (command)
limitations,limitations,limitations
Limitations Collapse Hide details

Limitations

• Maximum of 20 between-subjects factors. There is no limit on the number of measures for doubly multivariate designs.

• Memory requirements depend primarily on the number of cells in the design. For the default full factorial model, this equals the product of the number of levels or categories in each factor.

Related Topics

MANOVA: Repeated Measures
Example (MANOVA: Repeated Measures command)
MANOVA Variable List (MANOVA: Repeated Measures command)
WSFACTORS Subcommand (MANOVA: Repeated Measures command)
CONTRAST for WSFACTORS (MANOVA: Repeated Measures command)
PARTITION for WSFACTORS (MANOVA: Repeated Measures command)
WSDESIGN Subcommand (MANOVA: Repeated Measures command)
MWITHIN Keyword for Simple Effects (MANOVA: Repeated Measures command)
MEASURE Subcommand (MANOVA: Repeated Measures command)
RENAME Subcommand (MANOVA: Repeated Measures command)
PRINT Subcommand (MANOVA: Repeated Measures command)
References (MANOVA: Repeated Measures command)


Example (MANOVA: Repeated Measures command)

MANOVA Y1 TO Y4 BY GROUP(1,2)
  /WSFACTORS=YEAR(4)
  /CONTRAST(YEAR)=POLYNOMIAL
  /RENAME=CONST, LINEAR, QUAD, CUBIC
  /PRINT=TRANSFORM PARAM(ESTIM)
  /WSDESIGN=YEAR
  /DESIGN=GROUP.

• WSFACTORS immediately follows the MANOVA variable list and specifies a repeated measures analysis in which the four dependent variables represent a single variable measured at four levels of the within-subjects factor. The within-subjects factor is called YEAR for the duration of the MANOVA procedure.

• CONTRAST requests polynomial contrasts for the levels of YEAR. Because the four variables, Y1, Y2, Y3, and Y4, in the active dataset represent the four levels of YEAR, the effect is to perform an orthonormal polynomial transformation of these variables.

• RENAME assigns names to the dependent variables to reflect the transformation.

• PRINT requests that the transformation matrix and the parameter estimates be displayed.

• WSDESIGN specifies a within-subjects design that includes only the effect of the YEAR within-subjects factor. Because YEAR is the only within-subjects factor specified, this is the default design, and WSDESIGN could have been omitted.

• DESIGN specifies a between-subjects design that includes only the effect of the GROUP between-subjects factor. This subcommand could have been omitted.

Related Topics

MANOVA: Repeated Measures
Overview (MANOVA: Repeated Measures command)
MANOVA Variable List (MANOVA: Repeated Measures command)
WSFACTORS Subcommand (MANOVA: Repeated Measures command)
CONTRAST for WSFACTORS (MANOVA: Repeated Measures command)
PARTITION for WSFACTORS (MANOVA: Repeated Measures command)
WSDESIGN Subcommand (MANOVA: Repeated Measures command)
MWITHIN Keyword for Simple Effects (MANOVA: Repeated Measures command)
MEASURE Subcommand (MANOVA: Repeated Measures command)
RENAME Subcommand (MANOVA: Repeated Measures command)
PRINT Subcommand (MANOVA: Repeated Measures command)
References (MANOVA: Repeated Measures command)


MANOVA Variable List (MANOVA: Repeated Measures command)

MANOVA (command),MANOVA (command),MANOVA (command)
variable list,variable list,variable list

The list of dependent variables, factors, and covariates must be specified first.

• WSFACTORS determines how the dependent variables on the MANOVA variable list will be interpreted.

• The number of dependent variables on the MANOVA variable list must be a multiple of the number of cells in the within-subjects design. If there are six cells in the within-subjects design, each group of six dependent variables represents a single within-subjects variable that has been measured in each of the six cells.

• Normally, the number of dependent variables should equal the number of cells in the within-subjects design multiplied by the number of variables named on the MEASURE subcommand (if one is used). If you have more groups of dependent variables than are accounted for by the MEASURE subcommand, MANOVA will choose variable names to label the output, which may be difficult to interpret.

MANOVA (command),MANOVA (command),MANOVA (command)
constant covariate,constant covariate,constant covariate

• Covariates are specified after the keyword WITH. You can specify either varying covariates or constant covariates, or both. Varying covariates, similar to dependent variables in a repeated measures analysis, represent measurements of the same variable (or variables) at different times while constant covariates represent variables whose values remain the same at each within-subjects measurement.

• If you use varying covariates, the number of covariates specified must be an integer multiple of the number of dependent variables.

• If you use constant covariates, you must specify them in parentheses. If you use both constant and varying covariates, constant variates must be specified after all varying covariates.

Example

MANOVA MATH1 TO MATH4 BY METHOD(1,2) WITH PHYS1 TO PHYS4 (SES)
  /WSFACTORS=SEMESTER(4).

• The four dependent variables represent a score measured four times (corresponding to the four levels of SEMESTER).

• The four varying covariates PHYS1 to PHYS4 represents four measurements of another score.

• SES is a constant covariate. Its value does not change over the time covered by the four levels of SEMESTER.

• The default contrast (POLYNOMIAL) is used.

Related Topics

MANOVA: Repeated Measures
Overview (MANOVA: Repeated Measures command)
Example (MANOVA: Repeated Measures command)
WSFACTORS Subcommand (MANOVA: Repeated Measures command)
CONTRAST for WSFACTORS (MANOVA: Repeated Measures command)
PARTITION for WSFACTORS (MANOVA: Repeated Measures command)
WSDESIGN Subcommand (MANOVA: Repeated Measures command)
MWITHIN Keyword for Simple Effects (MANOVA: Repeated Measures command)
MEASURE Subcommand (MANOVA: Repeated Measures command)
RENAME Subcommand (MANOVA: Repeated Measures command)
PRINT Subcommand (MANOVA: Repeated Measures command)
References (MANOVA: Repeated Measures command)


WSFACTORS Subcommand (MANOVA: Repeated Measures command)

MANOVA (command),MANOVA (command),MANOVA (command)
WSFACTORS subcommand,WSFACTORS subcommand,WSFACTORS subcommand
WSFACTORS (subcommand),WSFACTORS (subcommand),WSFACTORS (subcommand)
MANOVA command,MANOVA command,MANOVA command
within-subjects factors,within-subjects factors,within-subjects factors
in MANOVA command,in MANOVA command,in MANOVA command
MANOVA (command),MANOVA (command),MANOVA (command)
within-subjects factors,within-subjects factors,within-subjects factors

WSFACTORS names the within-subjects factors and specifies the number of levels for each.

• For repeated measures designs, WSFACTORS must be the first subcommand after the MANOVA variable list.

• Only one WSFACTORS subcommand is permitted per execution of MANOVA.

• Names for the within-subjects factors are specified on the WSFACTORS subcommand. Factor names must not duplicate any of the dependent variables, factors, or covariates named on the MANOVA variable list.

• If there are more than one within-subjects factors, they must be named in the order corresponding to the order of the dependent variables on the MANOVA variable list. MANOVA varies the levels of the last-named within-subjects factor most rapidly when assigning dependent variables to within-subjects cells (see the example below).

• Levels of the factors must be represented in the data by the dependent variables named on the MANOVA variable list.

• Enter a number in parentheses after each factor to indicate how many levels the factor has. If two or more adjacent factors have the same number of levels, you can enter the number of levels in parentheses after all of them.

• Enter only the number of levels for within-subjects factors, not a range of values.

• The number of cells in the within-subjects design is the product of the number of levels for all within-subjects factors.

Example

MANOVA X1Y1 X1Y2 X2Y1 X2Y2 X3Y1 X3Y2 BY TREATMNT(1,5) GROUP(1,2)
  /WSFACTORS=X(3) Y(2)
  /DESIGN.

• The MANOVA variable list names six dependent variables and two between-subjects factors, TREATMNT and GROUP.

• WSFACTORS identifies two within-subjects factors whose levels distinguish the six dependent variables. X has three levels and Y has two. Thus, there are 3 × 2 = 6 cells in the within-subjects design, corresponding to the six dependent variables.

• Variable X1Y1 corresponds to levels 1,1 of the two within-subjects factors; variable X1Y2 corresponds to levels 1,2; X2Y1 to levels 2,1; and so on up to X3Y2, which corresponds to levels 3,2. The first within-subjects factor named, X, varies most slowly, and the last within-subjects factor named, Y, varies most rapidly on the list of dependent variables.

• Because there is no WSDESIGN subcommand, the within-subjects design will include all main effects and interactions: X, Y, and X by Y.

• Likewise, the between-subjects design includes all main effects and interactions: TREATMNT, GROUP, and TREATMNT by GROUP.

• In addition, a repeated measures analysis always includes interactions between the within-subjects factors and the between-subjects factors. There are three such interactions for each of the three within-subjects effects.

Related Topics

MANOVA: Repeated Measures
Overview (MANOVA: Repeated Measures command)
Example (MANOVA: Repeated Measures command)
MANOVA Variable List (MANOVA: Repeated Measures command)
CONTRAST for WSFACTORS (MANOVA: Repeated Measures command)
PARTITION for WSFACTORS (MANOVA: Repeated Measures command)
WSDESIGN Subcommand (MANOVA: Repeated Measures command)
MWITHIN Keyword for Simple Effects (MANOVA: Repeated Measures command)
MEASURE Subcommand (MANOVA: Repeated Measures command)
RENAME Subcommand (MANOVA: Repeated Measures command)
PRINT Subcommand (MANOVA: Repeated Measures command)
References (MANOVA: Repeated Measures command)


CONTRAST for WSFACTORS (MANOVA: Repeated Measures command)

contrasts,contrasts,contrasts
for within-subjects factors,for within-subjects factors,for within-subjects factors
CONTRAST (subcommand),CONTRAST (subcommand),CONTRAST (subcommand)
MANOVA command,MANOVA command,MANOVA command
MANOVA (command),MANOVA (command),MANOVA (command)
CONTRAST subcommand,CONTRAST subcommand,CONTRAST subcommand
MANOVA,MANOVA,MANOVA
contrasts,contrasts,contrasts

The levels of a within-subjects factor are represented by different dependent variables. Therefore, contrasts between levels of such a factor compare these dependent variables. Specifying the type of contrast amounts to specifying a transformation to be performed on the dependent variables.

• An orthonormal transformation is automatically performed on the dependent variables in a repeated measures analysis.

• To specify the type of orthonormal transformation, use the CONTRAST subcommand for the within-subjects factors.

• Regardless of the contrast type you specify, the transformation matrix is orthonormalized before use.

HELMERT (keyword),HELMERT (keyword),HELMERT (keyword)
MANOVA command,MANOVA command,MANOVA command
DIFFERENCE (keyword),DIFFERENCE (keyword),DIFFERENCE (keyword)
MANOVA command,MANOVA command,MANOVA command
POLYNOMIAL (keyword),POLYNOMIAL (keyword),POLYNOMIAL (keyword)
MANOVA command,MANOVA command,MANOVA command

• If you do not specify a contrast type for within-subjects factors, the default contrast type is orthogonal POLYNOMIAL. Intrinsically orthogonal contrast types are recommended for within-subjects factors if you wish to examine each degree-of-freedom test. Other orthogonal contrast types are DIFFERENCE and HELMERT. MULTIV and AVERF tests are identical, no matter what contrast was specified.

• To perform non-orthogonal contrasts, you must use the TRANSFORM subcommand instead of CONTRAST. The TRANSFORM subcommand is discussed in MANOVA: Multivariate.

• When you implicitly request a transformation of the dependent variables with CONTRAST for within-subjects factors, the same transformation is applied to any covariates in the analysis. The number of covariates must be an integer multiple of the number of dependent variables.

• You can display the transpose of the transformation matrix generated by your within-subjects contrast using the keyword TRANSFORM on the PRINT subcommand.

Example

MANOVA SCORE1 SCORE2 SCORE3 BY GROUP(1,4)
  /WSFACTORS=ROUND(3)
  /CONTRAST(ROUND)=DIFFERENCE
  /CONTRAST(GROUP)=DEVIATION
  /PRINT=TRANSFORM PARAM(ESTIM).

• This analysis has one between-subjects factor, GROUP, with levels 1, 2, 3, and 4, and one within-subjects factor, ROUND, with three levels that are represented by the three dependent variables.

• The first CONTRAST subcommand specifies difference contrasts for ROUND, the within-subjects factor.

• There is no WSDESIGN subcommand, so a default full factorial within-subjects design is assumed. This could also have been specified as WSDESIGN=ROUND, or simply WSDESIGN.

• The second CONTRAST subcommand specifies deviation contrasts for GROUP, the between-subjects factor. This subcommand could have been omitted because deviation contrasts are the default.

• PRINT requests the display of the transformation matrix generated by the within-subjects contrast and the parameter estimates for the model.

• There is no DESIGN subcommand, so a default full factorial between-subjects design is assumed. This could also have been specified as DESIGN=GROUP, or simply DESIGN.

Related Topics

MANOVA: Repeated Measures
Overview (MANOVA: Repeated Measures command)
Example (MANOVA: Repeated Measures command)
MANOVA Variable List (MANOVA: Repeated Measures command)
WSFACTORS Subcommand (MANOVA: Repeated Measures command)
PARTITION for WSFACTORS (MANOVA: Repeated Measures command)
WSDESIGN Subcommand (MANOVA: Repeated Measures command)
MWITHIN Keyword for Simple Effects (MANOVA: Repeated Measures command)
MEASURE Subcommand (MANOVA: Repeated Measures command)
RENAME Subcommand (MANOVA: Repeated Measures command)
PRINT Subcommand (MANOVA: Repeated Measures command)
References (MANOVA: Repeated Measures command)


PARTITION for WSFACTORS (MANOVA: Repeated Measures command)

The PARTITION subcommand also applies to factors named on WSFACTORS. See the topic PARTITION Subcommand (MANOVA: Univariate command) for more information.

Related Topics

MANOVA: Repeated Measures
Overview (MANOVA: Repeated Measures command)
Example (MANOVA: Repeated Measures command)
MANOVA Variable List (MANOVA: Repeated Measures command)
WSFACTORS Subcommand (MANOVA: Repeated Measures command)
CONTRAST for WSFACTORS (MANOVA: Repeated Measures command)
WSDESIGN Subcommand (MANOVA: Repeated Measures command)
MWITHIN Keyword for Simple Effects (MANOVA: Repeated Measures command)
MEASURE Subcommand (MANOVA: Repeated Measures command)
RENAME Subcommand (MANOVA: Repeated Measures command)
PRINT Subcommand (MANOVA: Repeated Measures command)
References (MANOVA: Repeated Measures command)


WSDESIGN Subcommand (MANOVA: Repeated Measures command)

MANOVA (command),MANOVA (command),MANOVA (command)
WSDESIGN subcommand,WSDESIGN subcommand,WSDESIGN subcommand
WSDESIGN (subcommand),WSDESIGN (subcommand),WSDESIGN (subcommand)
MANOVA command,MANOVA command,MANOVA command
within-subjects factors,within-subjects factors,within-subjects factors
in MANOVA,in MANOVA,in MANOVA
MANOVA,MANOVA,MANOVA
within-subjects factors,within-subjects factors,within-subjects factors

WSDESIGN specifies the design for within-subjects factors. Its specifications are like those of the DESIGN subcommand, but it uses the within-subjects factors rather than the between-subjects factors.

• The default WSDESIGN is a full factorial design, which includes all main effects and all interactions for within-subjects factors. The default is in effect whenever a design is processed without a preceding WSDESIGN or when the preceding WSDESIGN subcommand has no specifications.

• A WSDESIGN specification can include main effects, factor-by-factor interactions, nested terms (term within term), terms using the keyword MWITHIN, and pooled effects using the plus sign. The specification is the same as on the DESIGN subcommand but involves only within-subjects factors.

• A WSDESIGN specification cannot include between-subjects factors or terms based on them, nor does it accept interval-level variables, the keywords MUPLUS or CONSTANT, or error-term definitions or references.

• The WSDESIGN specification applies to all subsequent within-subjects designs until another WSDESIGN subcommand is encountered.

Example

MANOVA JANLO,JANHI,FEBLO,FEBHI,MARLO,MARHI BY SEX(1,2)
  /WSFACTORS MONTH(3) STIMULUS(2)
  /WSDESIGN MONTH, STIMULUS
  /WSDESIGN
  /DESIGN SEX.

• There are six dependent variables, corresponding to three months and two different levels of stimulus.

• The dependent variables are named on the MANOVA variable list in such an order that the level of stimulus varies more rapidly than the month. Thus, STIMULUS is named last on the WSFACTORS subcommand.

• The first WSDESIGN subcommand specifies only the main effects for within-subjects factors. There is no MONTH by STIMULUS interaction term.

• The second WSDESIGN subcommand has no specifications and, therefore, invokes the default within-subjects design, which includes the main effects and their interaction.

Related Topics

MANOVA: Repeated Measures
Overview (MANOVA: Repeated Measures command)
Example (MANOVA: Repeated Measures command)
MANOVA Variable List (MANOVA: Repeated Measures command)
WSFACTORS Subcommand (MANOVA: Repeated Measures command)
CONTRAST for WSFACTORS (MANOVA: Repeated Measures command)
PARTITION for WSFACTORS (MANOVA: Repeated Measures command)
MWITHIN Keyword for Simple Effects (MANOVA: Repeated Measures command)
MEASURE Subcommand (MANOVA: Repeated Measures command)
RENAME Subcommand (MANOVA: Repeated Measures command)
PRINT Subcommand (MANOVA: Repeated Measures command)
References (MANOVA: Repeated Measures command)


MWITHIN Keyword for Simple Effects (MANOVA: Repeated Measures command)

MANOVA,MANOVA,MANOVA
simple effects,simple effects,simple effects
simple effects,simple effects,simple effects
in MANOVA,in MANOVA,in MANOVA
MWITHIN (keyword),MWITHIN (keyword),MWITHIN (keyword)
MANOVA command,MANOVA command,MANOVA command

You can use MWITHIN on either the WSDESIGN or the DESIGN subcommand in a model with both between- and within-subjects factors to estimate simple effects for factors nested within factors of the opposite type.

Example

MANOVA WEIGHT1 WEIGHT2 BY TREAT(1,2)
 /WSFACTORS=WEIGHT(2)
 /DESIGN=MWITHIN TREAT(1) MWITHIN TREAT(2)
MANOVA WEIGHT1 WEIGHT2 BY TREAT(1,2)
 /WSFACTORS=WEIGHT(2)
 /WSDESIGN=MWITHIN WEIGHT(1) MWITHIN WEIGHT(2)
 /DESIGN.

• The first DESIGN tests the simple effects of WEIGHT within each level of TREAT.

• The second DESIGN tests the simple effects of TREAT within each level of WEIGHT.

Related Topics

MANOVA: Repeated Measures
Overview (MANOVA: Repeated Measures command)
Example (MANOVA: Repeated Measures command)
MANOVA Variable List (MANOVA: Repeated Measures command)
WSFACTORS Subcommand (MANOVA: Repeated Measures command)
CONTRAST for WSFACTORS (MANOVA: Repeated Measures command)
PARTITION for WSFACTORS (MANOVA: Repeated Measures command)
WSDESIGN Subcommand (MANOVA: Repeated Measures command)
MEASURE Subcommand (MANOVA: Repeated Measures command)
RENAME Subcommand (MANOVA: Repeated Measures command)
PRINT Subcommand (MANOVA: Repeated Measures command)
References (MANOVA: Repeated Measures command)


MEASURE Subcommand (MANOVA: Repeated Measures command)

MANOVA (command),MANOVA (command),MANOVA (command)
MEASURE subcommand,MEASURE subcommand,MEASURE subcommand
MEASURE (subcommand),MEASURE (subcommand),MEASURE (subcommand)
MANOVA command,MANOVA command,MANOVA command

In a doubly multivariate analysis, the dependent variables represent multiple variables measured under the different levels of the within-subjects factors. Use MEASURE to assign names to the variables that you have measured for the different levels of within-subjects factors.

• Specify a list of one or more variable names to be used in labeling the averaged results. If no within-subjects factor has more than two levels, MEASURE has no effect.

• The number of dependent variables on the DESIGN subcommand should equal the product of the number of cells in the within-subjects design and the number of names on MEASURE.

• If you do not enter a MEASURE subcommand and there are more dependent variables than cells in the within-subjects design, MANOVA assigns names (normally MEAS.1, MEAS.2, and so on) to the different measures.

• All of the dependent variables corresponding to each measure should be listed together and ordered so that the within-subjects factor named last on the WSFACTORS subcommand varies most rapidly.

Example

MANOVA TEMP1 TO TEMP6, WEIGHT1 TO WEIGHT6 BY GROUP(1,2)
  /WSFACTORS=DAY(3) AMPM(2)
  /MEASURE=TEMP WEIGHT
  /WSDESIGN=DAY, AMPM, DAY BY AMPM
  /PRINT=SIGNIF(HYPOTH AVERF)
  /DESIGN.

• There are 12 dependent variables: six temperatures and six weights, corresponding to morning and afternoon measurements on three days.

• WSFACTORS identifies the two factors (DAY and AMPM) that distinguish the temperature and weight measurements for each subject. These factors define six within-subjects cells.

• MEASURE indicates that the first group of six dependent variables correspond to TEMP and the second group of six dependent variables correspond to WEIGHT.

• These labels, TEMP and WEIGHT, are used on the output requested by PRINT.

• WSDESIGN requests a full factorial within-subjects model. Because this is the default, WSDESIGN could have been omitted.

Related Topics

MANOVA: Repeated Measures
Overview (MANOVA: Repeated Measures command)
Example (MANOVA: Repeated Measures command)
MANOVA Variable List (MANOVA: Repeated Measures command)
WSFACTORS Subcommand (MANOVA: Repeated Measures command)
CONTRAST for WSFACTORS (MANOVA: Repeated Measures command)
PARTITION for WSFACTORS (MANOVA: Repeated Measures command)
WSDESIGN Subcommand (MANOVA: Repeated Measures command)
MWITHIN Keyword for Simple Effects (MANOVA: Repeated Measures command)
RENAME Subcommand (MANOVA: Repeated Measures command)
PRINT Subcommand (MANOVA: Repeated Measures command)
References (MANOVA: Repeated Measures command)


RENAME Subcommand (MANOVA: Repeated Measures command)

RENAME (subcommand),RENAME (subcommand),RENAME (subcommand)
MANOVA command,MANOVA command,MANOVA command
MANOVA (command),MANOVA (command),MANOVA (command)
RENAME subcommand,RENAME subcommand,RENAME subcommand
MANOVA,MANOVA,MANOVA
renaming transformed variables,renaming transformed variables,renaming transformed variables

Because any repeated measures analysis involves a transformation of the dependent variables, it is always a good idea to rename the dependent variables. Choose appropriate names depending on the type of contrast specified for within-subjects factors. This is easier to do if you are using one of the orthogonal contrasts. The most reliable way to assign new names is to inspect the transformation matrix.

Example

MANOVA LOW1 LOW2 LOW3 HI1 HI2 HI3
  /WSFACTORS=LEVEL(2) TRIAL(3)
  /CONTRAST(TRIAL)=DIFFERENCE
  /RENAME=CONST LEVELDIF TRIAL21 TRIAL312 INTER1 INTER2
  /PRINT=TRANSFORM
  /DESIGN.

• This analysis has two within-subjects factors and no between-subjects factors.

• Difference contrasts are requested for TRIAL, which has three levels.

• Because all orthonormal contrasts produce the same F test for a factor with two levels, there is no point in specifying a contrast type for LEVEL.

• New names are assigned to the transformed variables based on the transformation matrix. These names correspond to the meaning of the transformed variables: the mean or constant, the average difference between levels, the average effect of trial 2 compared to 1, the average effect of trial 3 compared to 1 and 2; and the two interactions between LEVEL and TRIAL.

• The transformation matrix requested by the PRINT subcommand looks like the following table.

Transformation matrix
 | CONST | LEVELDIF | TRIAL1 | TRIAL2 | INTER1 | INTER2
LOW1 | 0.408 | 0.408 | -0.500 | -0.289 | -0.500 | -0.289
LOW2 | 0.408 | 0.408 | 0.500 | -0.289 | 0.500 | -0.289
LOW3 | 0.408 | 0.408 | 0.000 | 0.577 | 0.000 | 0.577
HI1 | 0.408 | -0.408 | -0.500 | -0.289 | 0.500 | 0.289
HI2 | 0.408 | -0.408 | 0.500 | -0.289 | -0.500 | 0.289
HI3 | 0.408 | -0.408 | 0.000 | 0.577 | 0.000 | -0.577

Related Topics

MANOVA: Repeated Measures
Overview (MANOVA: Repeated Measures command)
Example (MANOVA: Repeated Measures command)
MANOVA Variable List (MANOVA: Repeated Measures command)
WSFACTORS Subcommand (MANOVA: Repeated Measures command)
CONTRAST for WSFACTORS (MANOVA: Repeated Measures command)
PARTITION for WSFACTORS (MANOVA: Repeated Measures command)
WSDESIGN Subcommand (MANOVA: Repeated Measures command)
MWITHIN Keyword for Simple Effects (MANOVA: Repeated Measures command)
MEASURE Subcommand (MANOVA: Repeated Measures command)
PRINT Subcommand (MANOVA: Repeated Measures command)
References (MANOVA: Repeated Measures command)


PRINT Subcommand (MANOVA: Repeated Measures command)

MANOVA,MANOVA,MANOVA
display options,display options,display options
F test,F test,F test
in MANOVA,in MANOVA,in MANOVA
SIGNIF (keyword),SIGNIF (keyword),SIGNIF (keyword)
MANOVA command,MANOVA command,MANOVA command
AVERF (keyword),AVERF (keyword),AVERF (keyword)
MANOVA command,MANOVA command,MANOVA command
AVONLY (keyword),AVONLY (keyword),AVONLY (keyword)
MANOVA command,MANOVA command,MANOVA command

The following additional specifications on PRINT are useful in repeated measures analysis:

HF (keyword),HF (keyword),HF (keyword)
MANOVA command,MANOVA command,MANOVA command
GG (keyword),GG (keyword),GG (keyword)
MANOVA command,MANOVA command,MANOVA command
EFSIZE (keyword),EFSIZE (keyword),EFSIZE (keyword)
MANOVA command,MANOVA command,MANOVA command
t test,t test,t test
in MANOVA,in MANOVA,in MANOVA
SIGNIF(AVERF) | Averaged F tests for use with repeated measures. This is the default display in repeated measures analysis. The averaged F tests in the multivariate setup for repeated measures are equivalent to the univariate (or split-plot or mixed-model) approach to repeated measures.
SIGNIF(AVONLY) | Only the averaged F test for repeated measures. AVONLY produces the same output as AVERF and suppresses all other SIGNIF output.
SIGNIF(HF) | The Huynh-Feldt corrected significance values for averaged univariate F tests.
SIGNIF(GG) | The Greenhouse-Geisser corrected significance values for averaged univariate F tests.
SIGNIF(EFSIZE) | The effect size for the univariate F and t tests.

• The keywords AVERF and AVONLY are mutually exclusive.

• When you request repeated measures analysis with the WSFACTORS subcommand, the default display includes SIGNIF(AVERF) but does not include the usual SIGNIF(UNIV).

• The averaged F tests are appropriate in repeated measures because the dependent variables that are averaged actually represent contrasts of the WSFACTOR variables. When the analysis is not doubly multivariate, as discussed above, you can specify PRINT=SIGNIF(UNIV) to obtain significance tests for each degree of freedom, just as in univariate MANOVA.

Related Topics

MANOVA: Repeated Measures
Overview (MANOVA: Repeated Measures command)
Example (MANOVA: Repeated Measures command)
MANOVA Variable List (MANOVA: Repeated Measures command)
WSFACTORS Subcommand (MANOVA: Repeated Measures command)
CONTRAST for WSFACTORS (MANOVA: Repeated Measures command)
PARTITION for WSFACTORS (MANOVA: Repeated Measures command)
WSDESIGN Subcommand (MANOVA: Repeated Measures command)
MWITHIN Keyword for Simple Effects (MANOVA: Repeated Measures command)
MEASURE Subcommand (MANOVA: Repeated Measures command)
RENAME Subcommand (MANOVA: Repeated Measures command)
References (MANOVA: Repeated Measures command)


References (MANOVA: Repeated Measures command)

Burns, P. R. 1984. Multiple comparison methods in MANOVA. In: Proceedings of the 7th SPSS Users and Coordinators Conference. : .

Green, P. E. 1978. Analyzing multivariate data. Hinsdale, Ill.: The Dryden Press.

Huberty, C. J. 1972. Multivariate indices of strength of association. Multivariate Behavioral Research, 7, 516-523.

Muller, K. E., and B. L. Peterson. 1984. Practical methods for computing power in testing the multivariate general linear hypothesis. Computational Statistics and Data Analysis, 2, 143-158.

Pillai, K. C. S. 1967. Upper percentage points of the largest root of a matrix in multivariate analysis. Biometrika, 54, 189-194.

Related Topics

MANOVA: Repeated Measures
Overview (MANOVA: Repeated Measures command)
Example (MANOVA: Repeated Measures command)
MANOVA Variable List (MANOVA: Repeated Measures command)
WSFACTORS Subcommand (MANOVA: Repeated Measures command)
CONTRAST for WSFACTORS (MANOVA: Repeated Measures command)
PARTITION for WSFACTORS (MANOVA: Repeated Measures command)
WSDESIGN Subcommand (MANOVA: Repeated Measures command)
MWITHIN Keyword for Simple Effects (MANOVA: Repeated Measures command)
MEASURE Subcommand (MANOVA: Repeated Measures command)
RENAME Subcommand (MANOVA: Repeated Measures command)
PRINT Subcommand (MANOVA: Repeated Measures command)


MATCH FILES

MATCH FILES (command),MATCH FILES (command),MATCH FILES (command)
MATCH FILES (command),MATCH FILES (command),MATCH FILES (command)
syntax chart,syntax chart,syntax chart
merging data files,merging data files,merging data files
MATCH FILES (command),MATCH FILES (command),MATCH FILES (command)
MATCH FILES FILE={'savfile'|'dataset'}  [TABLE={'savfile'|'dataset'}]
                 {*                  }         {*                  }

 [/RENAME=(old varnames=new varnames)...]

 [/IN=varname]

 /FILE=...  [TABLE= ...]

 [/BY varlist]

 [/MAP]

 [/KEEP={ALL**  }] [/DROP=varlist]
        {varlist}

 [/FIRST=varname]  [/LAST=varname]

**Default if the subcommand is omitted.

Syntax for the MATCH FILES command can be generated from the Add Variables dialog.

Example

MATCH FILES FILE='/data/part1.sav'
  /FILE='/data/part2.sav'
  /FILE=*.

Related Topics

Overview (MATCH FILES command)
FILE Subcommand (MATCH FILES command)
Text Data Files (MATCH FILES command)
BY Subcommand (MATCH FILES command)
Duplicate Cases (MATCH FILES command)
TABLE Subcommand (MATCH FILES command)
RENAME Subcommand (MATCH FILES command)
DROP and KEEP Subcommands (MATCH FILES command)
IN Subcommand (MATCH FILES command)
FIRST and LAST Subcommands (MATCH FILES command)
MAP Subcommand (MATCH FILES command)


Overview (MATCH FILES command)

MATCH FILES (command),MATCH FILES (command),MATCH FILES (command)
with DROP DOCUMENTS command,with DROP DOCUMENTS command,with DROP DOCUMENTS command
DROP DOCUMENTS (command),DROP DOCUMENTS (command),DROP DOCUMENTS (command)
with MATCH FILES command,with MATCH FILES command,with MATCH FILES command
MATCH FILES (command),MATCH FILES (command),MATCH FILES (command)
limitations,limitations,limitations

MATCH FILES combines variables from 2 up to 50 PASW Statistics data files. MATCH FILES can make parallel or nonparallel matches between different files or perform table lookups. Parallel matches combine files sequentially by case (they are sometimes referred to as sequential matches). Nonparallel matches combine files according to the values of one or more key variables. In a table lookup, MATCH FILES looks up variables in one file and transfers those variables to a case file.

The files specified on MATCH FILES can be PASW Statistics data files or open datasets in the current session. The combined file becomes the new active dataset.

In general, MATCH FILES is used to combine files containing the same cases but different variables. To combine files containing the same variables but different cases, use ADD FILES. To update existing PASW Statistics data files, use UPDATE.

Options Collapse Hide details

Options

Variable Selection. You can specify which variables from each input file are included in the new active dataset using the DROP and KEEP subcommands.

Variable Names. You can rename variables in each input file before combining the files using the RENAME subcommand. This permits you to combine variables that are the same but whose names differ in different input files or to separate variables that are different but have the same name.

Variable Flag. You can create a variable that indicates whether a case came from a particular input file using IN. You can use the FIRST or LAST subcommands to create a variable that flags the first or last case of a group of cases with the same value for the key variable.

Variable Map. You can request a map showing all variables in the new active dataset, their order, and the input files from which they came using the MAP subcommand.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is two or more FILE subcommands, each of which specifies a file to be matched. In addition, BY is required to specify the key variables for nonparallel matches. Both BY and TABLE are required to match table-lookup files.

• All variables from all input files are included in the new active dataset unless DROP or KEEP is specified.

Subcommand Order Collapse Hide details

Subcommand Order

• RENAME and IN must immediately follow the FILE or TABLE subcommand to which they apply.

• Any BY, FIRST, LAST, KEEP, DROP, and MAP subcommands must follow all of the TABLE, FILE, RENAME, and IN subcommands.

Syntax Rules Collapse Hide details

Syntax Rules

• RENAME can be repeated after each FILE or TABLE subcommand and applies only to variables in the file named on the immediately preceding FILE or TABLE.

• IN can be used only for a nonparallel match or for a table lookup. (Thus, IN can be used only if BY is specified.)

• BY can be specified only once. However, multiple variables can be specified on BY. When BY is used, all files must be sorted in ascending order of the key variables named on BY.

• MAP can be repeated as often as desired.

Operations Collapse Hide details

Operations

• MATCH FILES reads all files named on FILE or TABLE and builds a new active dataset that replaces any active dataset created earlier in the session.

• The new active dataset contains complete dictionary information from the input files, including variable names, labels, print and write formats, and missing-value indicators. The new file also contains the documents from each of the input files. See DROP DOCUMENTS for information on deleting documents.

• Variables are copied in order from the first file specified, then from the second file specified, and so on.

• If the same variable name is used in more than one input file, data are taken from the file specified first. Dictionary information is taken from the first file containing value labels, missing values, or a variable label for the common variable. If the first file has no such information, MATCH FILES checks the second file, and so on, seeking dictionary information.

• All cases from all input files are included in the combined file. Cases that are absent from one of the input files will be assigned system-missing values for variables unique to that file.

• BY specifies that cases should be combined according to a common value on one or more key variables. All input files must be sorted in ascending order of the key variables.

• If BY is not used, the program performs a parallel (sequential) match, combining the first case from each file, then the second case from each file, and so on, without regard to any identifying values that may be present.

• If the active dataset is named as an input file, any N and SAMPLE commands that have been specified are applied to that file before files are matched.

Limitations Collapse Hide details

Limitations

• Maximum 50 files can be combined on one MATCH FILES command.

• Maximum one BY subcommand. However, BY can specify multiple variables.

• The TEMPORARY command cannot be in effect if the active dataset is used as an input file.

Example Collapse Hide details

Example

MATCH FILES FILE='/data/part1.sav'
  /FILE='/data/part2.sav'
  /FILE=*.

• MATCH FILES combines three files (the active dataset and two external PASW Statistics data files) in a parallel match. Cases are combined according to their order in each file.

• The new active dataset contains as many cases as are contained in the largest of the three input files.

Example Collapse Hide details

Example

GET FILE='/examples/data/mydata.sav'.
SORT CASES BY ID.
DATASET NAME mydata.
GET DATA /TYPE=XLS
  /FILE='/examples/data/excelfile.xls'.
SORT CASES BY ID.
DATASET NAME excelfile.
GET DATA /TYPE=ODBC /CONNECT=
 'DSN=MS Access Database;DBQ=/examples/data/dm_demo.mdb;'+
 'DriverId=25;FIL=MS Access;MaxBufferSize=2048;PageTimeout=5;'
 /SQL='SELECT * FROM main'.
SORT CASES BY ID.
MATCH FILES
 /FILE='mydata'
 /FILE='excelfile'
 /FILE=*
 /BY ID.

• A data file in PASW Statistics format and assigned the dataset name mydata. Since it has been assigned a dataset name, it remains available for subsequent use even after other data sources have been opened.

• An Excel file is then read and assigned the dataset name exceldata. Like the PASW Statistics data file, since it has been assigned a dataset name, it remains available after other data sources have been opened.

• Then a table from a database is read. Since it is the most recently opened or activated dataset, it is the active dataset.

• The three datasets are then merged together with MATCH FILES command, using the dataset names on the FILE subcommands instead of file names.

• An asterisk (*) is used to specify the active dataset, which is the database table in this example.

• The files are merged together based on the value of the key variable ID, specified on the BY subcommand.

• Since all the files being merged need to be sorted in the same order of the key variable(s), SORT CASES is performed on each dataset.

Related Topics

MATCH FILES
FILE Subcommand (MATCH FILES command)
Text Data Files (MATCH FILES command)
BY Subcommand (MATCH FILES command)
Duplicate Cases (MATCH FILES command)
TABLE Subcommand (MATCH FILES command)
RENAME Subcommand (MATCH FILES command)
DROP and KEEP Subcommands (MATCH FILES command)
IN Subcommand (MATCH FILES command)
FIRST and LAST Subcommands (MATCH FILES command)
MAP Subcommand (MATCH FILES command)


FILE Subcommand (MATCH FILES command)

FILE (subcommand),FILE (subcommand),FILE (subcommand)
MATCH FILES command,MATCH FILES command,MATCH FILES command
MATCH FILES (command),MATCH FILES (command),MATCH FILES (command)
FILE subcommand,FILE subcommand,FILE subcommand

FILE identifies the files to be combined (except table files). At least one FILE subcommand is required on MATCH FILES. A separate FILE subcommand must be used for each input file.

• An asterisk can be specified on FILE to refer to the active dataset.

• Dataset names instead of filenames can be used to refer to currently open datasets.

• The order in which files are specified determines the order of variables in the new active dataset. In addition, if the same variable name occurs in more than one input file, the variable is taken from the file specified first.

• If the files have unequal numbers of cases, cases are generated from the longest file. Cases that do not exist in the shorter files have system-missing values for variables that are unique to those files.

Related Topics

MATCH FILES
Overview (MATCH FILES command)
Text Data Files (MATCH FILES command)
BY Subcommand (MATCH FILES command)
Duplicate Cases (MATCH FILES command)
TABLE Subcommand (MATCH FILES command)
RENAME Subcommand (MATCH FILES command)
DROP and KEEP Subcommands (MATCH FILES command)
IN Subcommand (MATCH FILES command)
FIRST and LAST Subcommands (MATCH FILES command)
MAP Subcommand (MATCH FILES command)


Text Data Files (MATCH FILES command)

merging data files,merging data files,merging data files
raw data files,raw data files,raw data files
DATA LIST (command),DATA LIST (command),DATA LIST (command)
with MATCH FILES command,with MATCH FILES command,with MATCH FILES command
MATCH FILES (command),MATCH FILES (command),MATCH FILES (command)
with DATA LIST command,with DATA LIST command,with DATA LIST command
MATCH FILES (command),MATCH FILES (command),MATCH FILES (command)
active dataset,active dataset,active dataset

You can add variables from one or more text data files by reading the files into PASW Statistics (with DATA LIST or GET DATA), defining dataset names for each file (DATASET NAME command), and then using MATCH FILES to add the cases from each file.

Example

DATA LIST FILE="/data/textdata1.txt"
  /id 1-3 var1 5-7 var2 9-12.
SORT CASES by ID.
DATASET NAME file1.
DATA LIST FILE="/data/textdata2.txt"
  /id 1-3 var3 5-9 var4 11-15.
SORT CASES BY ID.
DATASET NAME file2.
DATA LIST FILE="/data/textdata3.txt"
  /id 1-3 var5 5-6 var6 8-10.
DATASET NAME file3.
MATCH FILES FILE='file1'
  /FILE='file2'
  /FILE='file3'
  /BY id.
SAVE OUTFILE='/data/combined_data.sav'.

Related Topics

MATCH FILES
Overview (MATCH FILES command)
FILE Subcommand (MATCH FILES command)
BY Subcommand (MATCH FILES command)
Duplicate Cases (MATCH FILES command)
TABLE Subcommand (MATCH FILES command)
RENAME Subcommand (MATCH FILES command)
DROP and KEEP Subcommands (MATCH FILES command)
IN Subcommand (MATCH FILES command)
FIRST and LAST Subcommands (MATCH FILES command)
MAP Subcommand (MATCH FILES command)


BY Subcommand (MATCH FILES command)

MATCH FILES (command),MATCH FILES (command),MATCH FILES (command)
BY subcommand,BY subcommand,BY subcommand
BY (subcommand),BY (subcommand),BY (subcommand)
MATCH FILES command,MATCH FILES command,MATCH FILES command
key variables,key variables,key variables
MATCH FILES command,MATCH FILES command,MATCH FILES command

BY specifies one or more identification, or key, variables that determine which cases are to be combined. When BY is specified, cases from one file are matched only with cases from other files that have the same values for the key variables. BY is required unless all input files are to be matched sequentially according to the order of cases.

• BY must follow the FILE and TABLE subcommands and any associated RENAME and IN subcommands.

• BY specifies the names of one or more key variables. The key variables must exist in all input files. The key variables can be numeric or long or short strings.

• All input files must be sorted in ascending order of the key variables. If necessary, use SORT CASES before MATCH FILES.

• Missing values for key variables are handled like any other values.

• Unmatched cases are assigned system-missing values (for numeric variables) or blanks (for string variables) for variables from files that do not contain a match.

Related Topics

MATCH FILES
Overview (MATCH FILES command)
FILE Subcommand (MATCH FILES command)
Text Data Files (MATCH FILES command)
Duplicate Cases (MATCH FILES command)
TABLE Subcommand (MATCH FILES command)
RENAME Subcommand (MATCH FILES command)
DROP and KEEP Subcommands (MATCH FILES command)
IN Subcommand (MATCH FILES command)
FIRST and LAST Subcommands (MATCH FILES command)
MAP Subcommand (MATCH FILES command)


Duplicate Cases (MATCH FILES command)

MATCH FILES (command),MATCH FILES (command),MATCH FILES (command)
duplicate cases,duplicate cases,duplicate cases

Duplicate cases are those with the same values for the key variables named on the BY subcommand.

• Duplicate cases are permitted in any input files except table files.

• When there is no table file, the first duplicate case in each file is matched with the first matching case (if any) from the other files; the second duplicate case is matched with a second matching duplicate, if any; and so on. (In effect, a parallel match is performed within groups of duplicate cases.) Unmatched cases are assigned system-missing values (for numeric variables) or blanks (for string variables) for variables from files that do not contain a match.

• The program displays a warning if it encounters duplicate keys in one or more of the files being matched.

Related Topics

MATCH FILES
Overview (MATCH FILES command)
FILE Subcommand (MATCH FILES command)
Text Data Files (MATCH FILES command)
BY Subcommand (MATCH FILES command)
TABLE Subcommand (MATCH FILES command)
RENAME Subcommand (MATCH FILES command)
DROP and KEEP Subcommands (MATCH FILES command)
IN Subcommand (MATCH FILES command)
FIRST and LAST Subcommands (MATCH FILES command)
MAP Subcommand (MATCH FILES command)


TABLE Subcommand (MATCH FILES command)

MATCH FILES (command),MATCH FILES (command),MATCH FILES (command)
TABLE subcommand,TABLE subcommand,TABLE subcommand
TABLE (subcommand),TABLE (subcommand),TABLE (subcommand)
MATCH FILES command,MATCH FILES command,MATCH FILES command
MATCH FILES (command),MATCH FILES (command),MATCH FILES (command)
table lookup files,table lookup files,table lookup files
table lookup files,table lookup files,table lookup files
keyed table,keyed table,keyed table

TABLE specifies a table lookup (or keyed table) file. A lookup file contributes variables but not cases to the new active dataset. Variables from the table file are added to all cases from other files that have matching values for the key variables. FILE specifies the files that supply the cases.

• A separate TABLE subcommand must be used to specify each lookup file, and a separate FILE subcommand must be used to specify each case file.

• The BY subcommand is required when TABLE is used.

• All specified files must be sorted in ascending order of the key variables. If necessary, use SORT CASES before MATCH FILES.

• A lookup file cannot contain duplicate cases (cases for which the key variable[s] named on BY have identical values).

• An asterisk on TABLE refers to the active dataset.

• Dataset names instead of file names can be used to refer to currently open datasets.

• Cases in a case file that do not have matches in a table file are assigned system-missing values (for numeric variables) or blanks (for string variables) for variables from that table file.

• Cases in a table file that do not match any cases in a case file are ignored.

Example

MATCH FILES FILE=*
  /TABLE='/data/master.sav'
  /BY EMP_ID.

• MATCH FILES combines variables from the PASW Statistics data file master.sav with the active dataset, matching cases by the variable EMP_ID.

• No new cases are added to the active dataset as a result of the table lookup.

• Cases whose value for EMP_ID is not included in the master.sav file are assigned system-missing values for variables taken from the table.

Related Topics

MATCH FILES
Overview (MATCH FILES command)
FILE Subcommand (MATCH FILES command)
Text Data Files (MATCH FILES command)
BY Subcommand (MATCH FILES command)
Duplicate Cases (MATCH FILES command)
RENAME Subcommand (MATCH FILES command)
DROP and KEEP Subcommands (MATCH FILES command)
IN Subcommand (MATCH FILES command)
FIRST and LAST Subcommands (MATCH FILES command)
MAP Subcommand (MATCH FILES command)


RENAME Subcommand (MATCH FILES command)

MATCH FILES (command),MATCH FILES (command),MATCH FILES (command)
RENAME subcommand,RENAME subcommand,RENAME subcommand
RENAME (subcommand),RENAME (subcommand),RENAME (subcommand)
MATCH FILES command,MATCH FILES command,MATCH FILES command

RENAME renames variables on the input files before they are processed by MATCH FILES. RENAME must follow the FILE or TABLE subcommand that contains the variables to be renamed.

• RENAME applies only to the immediately preceding FILE or TABLE subcommand. To rename variables from more than one input file, specify a RENAME subcommand after each FILE or TABLE subcommand.

• Specifications for RENAME consist of a left parenthesis, a list of old variable names, an equals sign, a list of new variable names, and a right parenthesis. The two variable lists must name or imply the same number of variables. If only one variable is renamed, the parentheses are optional.

• More than one rename specification can be specified on a single RENAME subcommand, each enclosed in parentheses.

• The TO keyword can be used to refer to consecutive variables in the file and to generate new variable names.

• RENAME takes effect immediately. Any KEEP and DROP subcommands entered prior to a RENAME must use the old names, while KEEP and DROP subcommands entered after a RENAME must use the new names.

• All specifications within a single set of parentheses take effect simultaneously. For example, the specification RENAME (A,B = B,A) swaps the names of the two variables.

• Variables cannot be renamed to scratch variables.

Example

MATCH FILES FILE='/data/update.sav'
 /RENAME=(NEWID = ID)
 /FILE='/data/master.sav'
 /BY ID.

• MATCH FILES matches a master PASW Statistics data file (master.sav) with an update data file (update.sav).

• The variable NEWID in the update.sav file is renamed ID so that it will have the same name as the identification variable in the master file and can be used on the BY subcommand.

Related Topics

MATCH FILES
Overview (MATCH FILES command)
FILE Subcommand (MATCH FILES command)
Text Data Files (MATCH FILES command)
BY Subcommand (MATCH FILES command)
Duplicate Cases (MATCH FILES command)
TABLE Subcommand (MATCH FILES command)
DROP and KEEP Subcommands (MATCH FILES command)
IN Subcommand (MATCH FILES command)
FIRST and LAST Subcommands (MATCH FILES command)
MAP Subcommand (MATCH FILES command)


DROP and KEEP Subcommands (MATCH FILES command)

MATCH FILES (command),MATCH FILES (command),MATCH FILES (command)
KEEP subcommand,KEEP subcommand,KEEP subcommand
KEEP (subcommand),KEEP (subcommand),KEEP (subcommand)
MATCH FILES command,MATCH FILES command,MATCH FILES command
MATCH FILES (command),MATCH FILES (command),MATCH FILES (command)
DROP subcommand,DROP subcommand,DROP subcommand
DROP (subcommand),DROP (subcommand),DROP (subcommand)
MATCH FILES command,MATCH FILES command,MATCH FILES command

DROP and KEEP are used to include a subset of variables in the new active dataset. DROP specifies a set of variables to exclude and KEEP specifies a set of variables to retain.

• DROP and KEEP do not affect the input files on disk.

• DROP and KEEP must follow all FILE, TABLE, and RENAME subcommands.

• DROP and KEEP must specify one or more variables. If RENAME is used to rename variables, specify the new names on DROP and KEEP.

• The keyword ALL can be specified on KEEP. ALL must be the last specification on KEEP, and it refers to all variables not previously named on KEEP.

• DROP cannot be used with variables created by the IN, FIRST, or LAST subcommands.

• KEEP can be used to change the order of variables in the resulting file. By default, MATCH FILES first copies the variables in order from the first file, then copies the variables in order from the second file, and so on. With KEEP, variables are kept in the order in which they are listed on the subcommand. If a variable is named more than once on KEEP, only the first mention of the variable is in effect; all subsequent references to that variable name are ignored.

Example

MATCH FILES FILE='/data/particle.sav'
  /RENAME=(PARTIC=POLLUTE1)
  /FILE='/data/gas.sav'
  /RENAME=(OZONE TO SULFUR=POLLUTE2 TO POLLUTE4)
  /DROP=POLLUTE4.

• The renamed variable POLLUTE4 is dropped from the resulting file. DROP is specified after all of the FILE and RENAME subcommands, and it refers to the dropped variable by its new name.

Related Topics

MATCH FILES
Overview (MATCH FILES command)
FILE Subcommand (MATCH FILES command)
Text Data Files (MATCH FILES command)
BY Subcommand (MATCH FILES command)
Duplicate Cases (MATCH FILES command)
TABLE Subcommand (MATCH FILES command)
RENAME Subcommand (MATCH FILES command)
IN Subcommand (MATCH FILES command)
FIRST and LAST Subcommands (MATCH FILES command)
MAP Subcommand (MATCH FILES command)


IN Subcommand (MATCH FILES command)

IN (subcommand),IN (subcommand),IN (subcommand)
MATCH FILES command,MATCH FILES command,MATCH FILES command
MATCH FILES (command),MATCH FILES (command),MATCH FILES (command)
IN subcommand,IN subcommand,IN subcommand
case source variable,case source variable,case source variable

IN creates a new variable in the resulting file that indicates whether a case came from the input file named on the preceding FILE subcommand. IN applies only to the file specified on the immediately preceding FILE subcommand.

• IN can be used only for a nonparallel match or table lookup.

• IN has only one specification—the name of the flag variable.

• The variable created by IN has the value 1 for every case that came from the associated input file and the value 0 if the case came from a different input file.

• Variables created by IN are automatically attached to the end of the resulting file and cannot be dropped. If FIRST or LAST is used, the variable created by IN precedes the variables created by FIRST or LAST.

Example

MATCH FILES  FILE='/data/week10.sav'
  /FILE='/data/week11.sav'
  /IN=INWEEK11
  /BY=EMPID.

• IN creates the variable INWEEK11, which has the value 1 for all cases in the resulting file that had values in the input file week11.sav and the value 0 for those cases that were not in file week11.sav.

Related Topics

MATCH FILES
Overview (MATCH FILES command)
FILE Subcommand (MATCH FILES command)
Text Data Files (MATCH FILES command)
BY Subcommand (MATCH FILES command)
Duplicate Cases (MATCH FILES command)
TABLE Subcommand (MATCH FILES command)
RENAME Subcommand (MATCH FILES command)
DROP and KEEP Subcommands (MATCH FILES command)
FIRST and LAST Subcommands (MATCH FILES command)
MAP Subcommand (MATCH FILES command)


FIRST and LAST Subcommands (MATCH FILES command)

FIRST (subcommand),FIRST (subcommand),FIRST (subcommand)
MATCH FILES command,MATCH FILES command,MATCH FILES command
LAST (subcommand),LAST (subcommand),LAST (subcommand)
MATCH FILES command,MATCH FILES command,MATCH FILES command
MATCH FILES (command),MATCH FILES (command),MATCH FILES (command)
FIRST subcommand,FIRST subcommand,FIRST subcommand
MATCH FILES (command),MATCH FILES (command),MATCH FILES (command)
LAST subcommand,LAST subcommand,LAST subcommand

FIRST and LAST create logical variables that flag the first or last case of a group of cases with the same value for the BY variables.

• FIRST and LAST must follow all TABLE and FILE subcommands and any associated RENAME and IN subcommands.

• FIRST and LAST have only one specification—the name of the flag variable.

• FIRST creates a variable with the value 1 for the first case of each group and the value 0 for all other cases.

• LAST creates a variable with the value 1 for the last case of each group and the value 0 for all other cases.

• Variables created by FIRST and LAST are automatically attached to the end of the resulting file and cannot be dropped.

• If one file has several cases with the same values for the key variables, FIRST or LAST can be used to create a variable that flags the first or last case of the group.

Example

MATCH FILES  TABLE='/data/house.sav'
 /FILE='/data/persons.sav'
 /BY=HOUSEID /FIRST=HEAD.

• The variable HEAD contains the value 1 for the first person in each household and the value 0 for all other persons. Assuming that the persons.sav file is sorted with the head of household as the first case for each household, the variable HEAD identifies the case for the head of household.

Example

* Using match files with only one file.

* This example flags the first of several cases with
  the same value for a key variable.

MATCH FILES  FILE='/data/persons.sav'
 /BY HOUSEID /FIRST=HEAD.
SELECT IF  (HEAD EQ 1).
CROSSTABS  JOBCAT BY SEX.

• MATCH FILES is used instead of GET to read the data file persons.sav. The BY subcommand identifies the key variable (HOUSEID), and FIRST creates the variable HEAD with the value 1 for the first case in each household and the value 0 for all other cases.

• SELECT IF selects only the cases with the value 1 for HEAD, and the CROSSTABS procedure is run on these cases.

Related Topics

MATCH FILES
Overview (MATCH FILES command)
FILE Subcommand (MATCH FILES command)
Text Data Files (MATCH FILES command)
BY Subcommand (MATCH FILES command)
Duplicate Cases (MATCH FILES command)
TABLE Subcommand (MATCH FILES command)
RENAME Subcommand (MATCH FILES command)
DROP and KEEP Subcommands (MATCH FILES command)
IN Subcommand (MATCH FILES command)
MAP Subcommand (MATCH FILES command)


MAP Subcommand (MATCH FILES command)

MATCH FILES (command),MATCH FILES (command),MATCH FILES (command)
MAP subcommand,MAP subcommand,MAP subcommand
MAP (subcommand),MAP (subcommand),MAP (subcommand)
MATCH FILES command,MATCH FILES command,MATCH FILES command

MAP produces a list of the variables that are in the new active dataset and the file or files from which they came. Variables are listed in the order in which they appear in the resulting file. MAP has no specifications and must be placed after all FILE, TABLE, and RENAME subcommands.

• Multiple MAP subcommands can be used. Each MAP shows the current status of the active dataset and reflects only the subcommands that precede the MAP subcommand.

• To obtain a map of the resulting file in its final state, specify MAP last.

• If a variable is renamed, its original and new names are listed. Variables created by IN, FIRST, and LAST are not included in the map, since they are automatically attached to the end of the file and cannot be dropped.

Related Topics

MATCH FILES
Overview (MATCH FILES command)
FILE Subcommand (MATCH FILES command)
Text Data Files (MATCH FILES command)
BY Subcommand (MATCH FILES command)
Duplicate Cases (MATCH FILES command)
TABLE Subcommand (MATCH FILES command)
RENAME Subcommand (MATCH FILES command)
DROP and KEEP Subcommands (MATCH FILES command)
IN Subcommand (MATCH FILES command)
FIRST and LAST Subcommands (MATCH FILES command)


MATRIX-END MATRIX

MATRIX (command),MATRIX (command),MATRIX (command)
MATRIX (command),MATRIX (command),MATRIX (command)
syntax chart,syntax chart,syntax chart
END MATRIX (command),END MATRIX (command),END MATRIX (command)
matrix language,matrix language,matrix language

This command is not available on all operating systems.

MATRIX

matrix statements

END MATRIX

The following matrix language statements can be used in a matrix program:

BREAK | DO IF | END LOOP | MSAVE | SAVE
CALL | ELSE | GET | PRINT | WRITE
COMPUTE | ELSE IF | LOOP | READ |
DISPLAY | END IF | MGET | RELEASE |

The following functions can be used in matrix language statements:

ABS | Absolute values of matrix elements
ALL | Test if all elements are positive
ANY | Test if any element is positive
ARSIN | Arcsines of matrix elements
ARTAN | Arctangents of matrix elements
BLOCK | Create block diagonal matrix
CDFNORM | Cumulative normal distribution function
CHICDF | Cumulative chi-squared distribution function
CHOL | Cholesky decomposition
CMAX | Column maxima
CMIN | Column minima
COS | Cosines of matrix elements
CSSQ | Column sums of squares
CSUM | Column sums
DESIGN | Create design matrix
DET | Determinant
DIAG | Diagonal of matrix
EOF | Check end of file
EVAL | Eigenvalues of symmetric matrix
EXP | Exponentials of matrix elements
FCDF | Cumulative F distribution function
GINV | Generalized inverse
GRADE | Rank elements in matrix, using sequential integers for ties
GSCH | Gram-Schmidt orthonormal basis
IDENT | Create identity matrix
INV | Inverse
KRONECKER | Kronecker product of two matrices
LG10 | Logarithms to base 10 of matrix elements
LN | Logarithms to base e of matrix elements
MAGIC | Create magic square
MAKE | Create a matrix with all elements equal
MDIAG | Create a matrix with the given diagonal
MMAX | Maximum element in matrix
MMIN | Minimum element in matrix
MOD | Remainders after division
MSSQ | Matrix sum of squares
MSUM | Matrix sum
NCOL | Number of columns
NROW | Number of rows
RANK | Matrix rank
RESHAPE | Change shape of matrix
RMAX | Row maxima
RMIN | Row minima
RND | Round off matrix elements to nearest integer
RNKORDER | Rank elements in matrix, averaging ties
RSSQ | Row sums of squares
RSUM | Row sums
SIN | Sines of matrix elements
SOLVE | Solve systems of linear equations
SQRT | Square roots of matrix elements
SSCP | Sums of squares and cross-products
SVAL | Singular values
SWEEP | Perform sweep transformation
T | Synonym for TRANSPOS
TCDF | Cumulative normal t distribution function
TRACE | Calculate trace (sum of diagonal elements)
TRANSPOS | Transposition of matrix
TRUNC | Truncation of matrix elements to integer
UNIFORM | Create matrix of uniform random numbers

Example

MATRIX.
READ A /FILE=MATRDATA /SIZE={6,6} /FIELD=1 TO 60.
CALL EIGEN(A,EIGENVEC,EIGENVAL).
LOOP J=1 TO NROW(EIGENVAL).
+ DO IF (EIGENVAL(J) > 1.0).
+   PRINT EIGENVAL(J) / TITLE="Eigenvalue:" /SPACE=3.
+   PRINT T(EIGENVEC(:,J)) / TITLE="Eigenvector:" /SPACE=1.
+ END IF.
END LOOP.
END MATRIX.

Related Topics

Overview (MATRIX-END MATRIX command)
Terminology (MATRIX-END MATRIX command)
Matrix Variables (MATRIX-END MATRIX command)
Syntax of Matrix Language (MATRIX-END MATRIX command)
Matrix Operations (MATRIX-END MATRIX command)
MATRIX and Other Commands (MATRIX-END MATRIX command)
MATRIX and END MATRIX Commands (MATRIX-END MATRIX command)
COMPUTE Statement (MATRIX-END MATRIX command)
CALL Statement (MATRIX-END MATRIX command)
PRINT Statement (MATRIX-END MATRIX command)
Matrix Control Structures (MATRIX-END MATRIX command)
READ Statement: Reading Character Data (MATRIX-END MATRIX command)
WRITE Statement: Writing Character Data (MATRIX-END MATRIX command)
GET Statement: Reading PASW Statistics Data Files (MATRIX-END MATRIX command)
SAVE Statement: Writing PASW Statistics Data Files (MATRIX-END MATRIX command)
MGET Statement: Reading Matrix Data Files (MATRIX-END MATRIX command)
MSAVE Statement: Writing Matrix Data Files (MATRIX-END MATRIX command)
DISPLAY Statement (MATRIX-END MATRIX command)
RELEASE Statement (MATRIX-END MATRIX command)
Macros Using the Matrix Language (MATRIX-END MATRIX command)


Overview (MATRIX-END MATRIX command)

The MATRIX and END MATRIX commands enclose statements that are executed by the matrix processor. Using matrix programs, you can write your own statistical routines in the compact language of matrix algebra. Matrix programs can include mathematical calculations, control structures, display of results, and reading and writing matrices as character files or data files.

As discussed below, a matrix program is for the most part independent of the rest of the session, although it can read and write PASW Statistics data files, including the active dataset.

This section does not attempt to explain the rules of matrix algebra. Many textbooks teach the application of matrix methods to statistics.

The MATRIX procedure was originally developed at the Madison Academic Computing Center, University of Wisconsin.

Related Topics

MATRIX-END MATRIX
Terminology (MATRIX-END MATRIX command)
Matrix Variables (MATRIX-END MATRIX command)
Syntax of Matrix Language (MATRIX-END MATRIX command)
Matrix Operations (MATRIX-END MATRIX command)
MATRIX and Other Commands (MATRIX-END MATRIX command)
MATRIX and END MATRIX Commands (MATRIX-END MATRIX command)
COMPUTE Statement (MATRIX-END MATRIX command)
CALL Statement (MATRIX-END MATRIX command)
PRINT Statement (MATRIX-END MATRIX command)
Matrix Control Structures (MATRIX-END MATRIX command)
READ Statement: Reading Character Data (MATRIX-END MATRIX command)
WRITE Statement: Writing Character Data (MATRIX-END MATRIX command)
GET Statement: Reading PASW Statistics Data Files (MATRIX-END MATRIX command)
SAVE Statement: Writing PASW Statistics Data Files (MATRIX-END MATRIX command)
MGET Statement: Reading Matrix Data Files (MATRIX-END MATRIX command)
MSAVE Statement: Writing Matrix Data Files (MATRIX-END MATRIX command)
DISPLAY Statement (MATRIX-END MATRIX command)
RELEASE Statement (MATRIX-END MATRIX command)
Macros Using the Matrix Language (MATRIX-END MATRIX command)


Terminology (MATRIX-END MATRIX command)

A variable within a matrix program represents a matrix, which is simply a set of values arranged in a rectangular array of rows and columns.

• An n × m (read “n by m”) matrix is one that has n rows and m columns. The integers n and m are the dimensions of the matrix. An n × m matrix contains n × m elements, or data values.

matrix language,matrix language,matrix language
column vector,column vector,column vector
matrix language,matrix language,matrix language
row vector,row vector,row vector

• An n × 1 matrix is sometimes called a column vector, and a 1 × n matrix is sometimes called a row vector. A vector is a special case of a matrix.

matrix language,matrix language,matrix language
scalar,scalar,scalar

• A 1 × 1 matrix, containing a single data value, is often called a scalar. A scalar is also a special case of a matrix.

• An index to a matrix or vector is an integer that identifies a specific row or column. Indexes normally appear in printed works as subscripts, as in A31, but are specified in the matrix language within parentheses, as in A(3,1). The row index for a matrix precedes the column index.

matrix language,matrix language,matrix language
main diagonal,main diagonal,main diagonal

• The main diagonal of a matrix consists of the elements whose row index equals their column index. It begins at the top left corner of the matrix; in a square matrix, it runs to the bottom right corner.

matrix language,matrix language,matrix language
transpose,transpose,transpose

• The transpose of a matrix is the matrix with rows and columns interchanged. The transpose of an n × m matrix is an m × n matrix.

matrix language,matrix language,matrix language
symmetric matrix,symmetric matrix,symmetric matrix

• A symmetric matrix is a square matrix that is unchanged if you flip it about the main diagonal. That is, the element in row i, column j equals the element in row j, column i. A symmetric matrix equals its transpose.

• Matrices are always rectangular, although it is possible to read or write symmetric matrices in triangular form. Vectors and scalars are considered degenerate rectangles.

• It is an error to try to create a matrix whose rows have different numbers of elements.

A matrix program does not process individual cases unless you so specify, using the control structures of the matrix language. Unlike ordinary PASW Statistics variables, matrix variables do not have distinct values for different cases. A matrix is a single entity.

Vectors in matrix processing should not be confused with the vectors temporarily created by the VECTOR command. The latter are shorthand for a list of PASW Statistics variables and, like all ordinary PASW Statistics variables, are unavailable during matrix processing.

Related Topics

MATRIX-END MATRIX
Overview (MATRIX-END MATRIX command)
Matrix Variables (MATRIX-END MATRIX command)
Syntax of Matrix Language (MATRIX-END MATRIX command)
Matrix Operations (MATRIX-END MATRIX command)
MATRIX and Other Commands (MATRIX-END MATRIX command)
MATRIX and END MATRIX Commands (MATRIX-END MATRIX command)
COMPUTE Statement (MATRIX-END MATRIX command)
CALL Statement (MATRIX-END MATRIX command)
PRINT Statement (MATRIX-END MATRIX command)
Matrix Control Structures (MATRIX-END MATRIX command)
READ Statement: Reading Character Data (MATRIX-END MATRIX command)
WRITE Statement: Writing Character Data (MATRIX-END MATRIX command)
GET Statement: Reading PASW Statistics Data Files (MATRIX-END MATRIX command)
SAVE Statement: Writing PASW Statistics Data Files (MATRIX-END MATRIX command)
MGET Statement: Reading Matrix Data Files (MATRIX-END MATRIX command)
MSAVE Statement: Writing Matrix Data Files (MATRIX-END MATRIX command)
DISPLAY Statement (MATRIX-END MATRIX command)
RELEASE Statement (MATRIX-END MATRIX command)
Macros Using the Matrix Language (MATRIX-END MATRIX command)


Matrix Variables (MATRIX-END MATRIX command)

matrix language,matrix language,matrix language
variables,variables,variables
variables,variables,variables
in matrix language,in matrix language,in matrix language
variables,variables,variables
in matrix language,in matrix language,in matrix language

A matrix variable is created by a matrix statement that assigns a value to a variable name.

• A matrix variable name follows the same rules as those applicable to an ordinary PASW Statistics variable name, except matrix variable names cannot exceed 8 bytes.

• The names of matrix functions and procedures cannot be used as variable names within a matrix program. (In particular, the letter T cannot be used as a variable name because T is an alias for the TRANSPOS function.)

• The COMPUTE, READ, GET, MGET, and CALL statements create matrices. An index variable named on a LOOP statement creates a scalar with a value assigned to it.

• A variable name can be redefined within a matrix program without regard to the dimensions of the matrix it represents. The same name can represent scalars, vectors, and full matrices at different points in the matrix program.

• MATRIX-END MATRIX does not include any special processing for missing data. When reading a data matrix from a data file, you must therefore specify whether missing data are to be accepted as valid or excluded from the matrix.

Related Topics

MATRIX-END MATRIX
Overview (MATRIX-END MATRIX command)
Terminology (MATRIX-END MATRIX command)
Syntax of Matrix Language (MATRIX-END MATRIX command)
Matrix Operations (MATRIX-END MATRIX command)
MATRIX and Other Commands (MATRIX-END MATRIX command)
MATRIX and END MATRIX Commands (MATRIX-END MATRIX command)
COMPUTE Statement (MATRIX-END MATRIX command)
CALL Statement (MATRIX-END MATRIX command)
PRINT Statement (MATRIX-END MATRIX command)
Matrix Control Structures (MATRIX-END MATRIX command)
READ Statement: Reading Character Data (MATRIX-END MATRIX command)
WRITE Statement: Writing Character Data (MATRIX-END MATRIX command)
GET Statement: Reading PASW Statistics Data Files (MATRIX-END MATRIX command)
SAVE Statement: Writing PASW Statistics Data Files (MATRIX-END MATRIX command)
MGET Statement: Reading Matrix Data Files (MATRIX-END MATRIX command)
MSAVE Statement: Writing Matrix Data Files (MATRIX-END MATRIX command)
DISPLAY Statement (MATRIX-END MATRIX command)
RELEASE Statement (MATRIX-END MATRIX command)
Macros Using the Matrix Language (MATRIX-END MATRIX command)
String Variables in Matrix Programs (MATRIX-END MATRIX command)


String Variables in Matrix Programs (MATRIX-END MATRIX command)

matrix language,matrix language,matrix language
string variables,string variables,string variables
string variables,string variables,string variables
in matrix language,in matrix language,in matrix language

Matrix variables can contain short string data. Support for string variables is limited, however.

• MATRIX will attempt to carry out calculations with string variables if you so request. The results will not be meaningful.

• You must specify a format (such as A8) when you display a matrix that contains string data.

Related Topics

Matrix Variables (MATRIX-END MATRIX command)


Syntax of Matrix Language (MATRIX-END MATRIX command)

A matrix program consists of statements. Matrix statements must appear in a matrix program, between the MATRIX and END MATRIX commands. They are analogous to PASW Statistics commands and follow the rules of the command language regarding the abbreviation of keywords; the equivalence of upper and lower case; the use of spaces, commas, and equals signs; and the splitting of statements across multiple lines. However, commas are required to separate arguments to matrix functions and procedures and to separate variable names on the RELEASE statement.

Matrix statements are composed of the following elements:

• Keywords, such as the names of matrix statements

• Variable names

• Explicitly written matrices, which are enclosed within braces ({})

• Arithmetic and logical operators

• Matrix functions

• The command terminator, which serves as a statement terminator within a matrix program

Related Topics

MATRIX-END MATRIX
Overview (MATRIX-END MATRIX command)
Terminology (MATRIX-END MATRIX command)
Matrix Variables (MATRIX-END MATRIX command)
Matrix Operations (MATRIX-END MATRIX command)
MATRIX and Other Commands (MATRIX-END MATRIX command)
MATRIX and END MATRIX Commands (MATRIX-END MATRIX command)
COMPUTE Statement (MATRIX-END MATRIX command)
CALL Statement (MATRIX-END MATRIX command)
PRINT Statement (MATRIX-END MATRIX command)
Matrix Control Structures (MATRIX-END MATRIX command)
READ Statement: Reading Character Data (MATRIX-END MATRIX command)
WRITE Statement: Writing Character Data (MATRIX-END MATRIX command)
GET Statement: Reading PASW Statistics Data Files (MATRIX-END MATRIX command)
SAVE Statement: Writing PASW Statistics Data Files (MATRIX-END MATRIX command)
MGET Statement: Reading Matrix Data Files (MATRIX-END MATRIX command)
MSAVE Statement: Writing Matrix Data Files (MATRIX-END MATRIX command)
DISPLAY Statement (MATRIX-END MATRIX command)
RELEASE Statement (MATRIX-END MATRIX command)
Macros Using the Matrix Language (MATRIX-END MATRIX command)
Comments in Matrix Programs (MATRIX-END MATRIX command)
Matrix Notation (MATRIX-END MATRIX command)
Matrix Notation Shorthand (MATRIX-END MATRIX command)
Extraction of an Element, a Vector, or a Submatrix (MATRIX-END MATRIX command)
Construction of a Matrix from Other Matrices (MATRIX-END MATRIX command)


Comments in Matrix Programs (MATRIX-END MATRIX command)

Within a matrix program, you can enter comments in any of the following forms: on lines beginning with the COMMENT command, on lines beginning with an asterisk, or between the characters /* and */ on a command line.

Related Topics

Syntax of Matrix Language (MATRIX-END MATRIX command)
Matrix Notation (MATRIX-END MATRIX command)
Matrix Notation Shorthand (MATRIX-END MATRIX command)
Extraction of an Element, a Vector, or a Submatrix (MATRIX-END MATRIX command)
Construction of a Matrix from Other Matrices (MATRIX-END MATRIX command)


Matrix Notation (MATRIX-END MATRIX command)

matrix language,matrix language,matrix language
matrix notation,matrix notation,matrix notation

To write a matrix explicitly:

• Enclose the matrix within braces ({}).

• Separate the elements of each row by commas.

• Separate the rows by semicolons.

• String elements must be enclosed in either quotes, as is generally true in the command language.

Example

{1,2,3;4,5,6}

• The example represents the following matrix:

[
1 | 2 | 3
4 | 5 | 6
]

Example

{1,2,3}

• This example represents a row vector:

[
1 2 3
]

Example

{11;12;13}

• This example represents a column vector:

[
11
12
13
]

Example

{3}

• This example represents a scalar. The braces are optional. You can specify the same scalar as 3.

Related Topics

Syntax of Matrix Language (MATRIX-END MATRIX command)
Comments in Matrix Programs (MATRIX-END MATRIX command)
Matrix Notation Shorthand (MATRIX-END MATRIX command)
Extraction of an Element, a Vector, or a Submatrix (MATRIX-END MATRIX command)
Construction of a Matrix from Other Matrices (MATRIX-END MATRIX command)


Matrix Notation Shorthand (MATRIX-END MATRIX command)

You can simplify the construction of matrices using notation shorthand.

Consecutive Integers. Use a colon to indicate a range of consecutive integers. For example, the vector {1,2,3,4,5,6} can be written as {1:6}.

Incremented Ranges of Integers. Use a second colon followed by an integer to indicate the increment. The matrix {1,3,5,7;2,5,8,11} can be written as {1:7:2;2:11:3}, where 1:7:2 indicates the integers from 1 to 7 incrementing by 2, and 2:11:3 indicates the integers from 2 to 11 incrementing by 3.

• You must use integers when specifying a range in either of these ways. Numbers with fractional parts are truncated to integers.

• If an arithmetic expression is used, it should be enclosed in parentheses.

Related Topics

Syntax of Matrix Language (MATRIX-END MATRIX command)
Comments in Matrix Programs (MATRIX-END MATRIX command)
Matrix Notation (MATRIX-END MATRIX command)
Extraction of an Element, a Vector, or a Submatrix (MATRIX-END MATRIX command)
Construction of a Matrix from Other Matrices (MATRIX-END MATRIX command)


Extraction of an Element, a Vector, or a Submatrix (MATRIX-END MATRIX command)

matrix language,matrix language,matrix language
extracting elements,extracting elements,extracting elements

You can use indexes in parentheses to extract an element from a vector or matrix, a vector from a matrix, or a submatrix from a matrix. In the following discussion, an integer index refers to an integer expression used as an index, which can be a scalar matrix with an integer value or an integer element extracted from a vector or matrix. Similarly, a vector index refers to a vector expression used as an index, which can be a vector matrix or a vector extracted from a matrix.

For example, if S is a scalar matrix, S=[2], R is a row vector, R=[
1 3 5
], C is a column vector, C=[
2
3
4
], and A is a 5 × 5 matrix, A=[
11 | 12 | 13 | 14 | 15
21 | 22 | 23 | 24 | 25
31 | 32 | 33 | 34 | 35
41 | 42 | 43 | 44 | 45
51 | 52 | 53 | 54 | 55
], then:

R(S) = R(2) = {3}

C(S) = C(2) = {3}

• An integer index extracts an element from a vector matrix.

• The distinction between a row and a column vector does not matter when an integer index is used to extract an element from it.

A(2,3) = A(S,3) = {23}

• Two integer indexes separated by a comma extract an element from a rectangular matrix.

A(R,2)=A(1:5:2,2)={12; 32; 52}

A(2,R)=A(2,1:5:2)={21, 23, 25}

A(C,2)=A(2:4,2)= {22;32;42}

A(2,C)=A(2,2:4)= {22,23,24}

• An integer and a vector index separated by a comma extract a vector from a matrix.

• The distinction between a row and a column vector does not matter when used as indexes in this way.

A(2,:)=A(S,:) = {21, 22, 23, 24, 25}

A(:,2) =A(:,S)= {12; 22; 32; 42; 52}

• A colon by itself used as an index extracts an entire row or column vector from a matrix.

A(R,C)=A(R,2:4)=A(1:5:2,C)=A(1:5:2,2:4)={12,13,14;32,33,34;52,53,54}

A(C,R)=A(C,1:5:2)=A(2:4,R)=A(2:4,1:5:2)={21,23,25;31,33,35;41,43,45}

• Two vector indexes separated by a comma extract a submatrix from a matrix.

• The distinction between a row and a column vector does not matter when used as indexes in this way.

Related Topics

Syntax of Matrix Language (MATRIX-END MATRIX command)
Comments in Matrix Programs (MATRIX-END MATRIX command)
Matrix Notation (MATRIX-END MATRIX command)
Matrix Notation Shorthand (MATRIX-END MATRIX command)
Construction of a Matrix from Other Matrices (MATRIX-END MATRIX command)


Construction of a Matrix from Other Matrices (MATRIX-END MATRIX command)

matrix language,matrix language,matrix language
constructing a matrix from other matrices,constructing a matrix from other matrices,constructing a matrix from other matrices

You can use vector or rectangular matrices to construct a new matrix, separating row expressions by semicolons and components of row expressions by commas. If a column vector Vc has n elements and matrix M has the dimensions n × m, then {M; Vc} is an n × (m + 1) matrix. Similarly, if the row vector Vr has m elements and M is the same, then {M; Vr} is an (n + 1) × m matrix. In fact, you can paste together any number of matrices and vectors this way.

• All of the components of each column expression must have the same number of actual rows, and all of the row expressions must have the same number of actual columns.

• The distinction between row vectors and column vectors must be observed carefully when constructing matrices in this way, so that the components will fit together properly.

• Several of the matrix functions are also useful in constructing matrices; see in particular the MAKE, UNIFORM, and IDENT functions in Matrix Functions (MATRIX-END MATRIX command).

Example

COMPUTE M={CORNER, COL3; ROW3}.

• This example constructs the matrix M from the matrix CORNER, the column vector COL3, and the row vector ROW3.

• COL3 supplies new row components and is separated from CORNER by a comma.

• ROW3 supplies column elements and is separated from previous expressions by a semicolon.

• COL3 must have the same number of rows as CORNER.

• ROW3 must have the same number of columns as the matrix resulting from the previous expressions.

• For example, if CORNER=[
11 | 12
21 | 22
], COL3=[
13
23
], and ROW3=[
31 32 33
], then:

M=[
11 | 12 | 13
21 | 22 | 23
31 | 32 | 33
]

Related Topics

Syntax of Matrix Language (MATRIX-END MATRIX command)
Comments in Matrix Programs (MATRIX-END MATRIX command)
Matrix Notation (MATRIX-END MATRIX command)
Matrix Notation Shorthand (MATRIX-END MATRIX command)
Extraction of an Element, a Vector, or a Submatrix (MATRIX-END MATRIX command)


Matrix Operations (MATRIX-END MATRIX command)

You can perform matrix calculations according to the rules of matrix algebra and compare matrices using relational or logical operators.

Related Topics

MATRIX-END MATRIX
Overview (MATRIX-END MATRIX command)
Terminology (MATRIX-END MATRIX command)
Matrix Variables (MATRIX-END MATRIX command)
Syntax of Matrix Language (MATRIX-END MATRIX command)
MATRIX and Other Commands (MATRIX-END MATRIX command)
MATRIX and END MATRIX Commands (MATRIX-END MATRIX command)
COMPUTE Statement (MATRIX-END MATRIX command)
CALL Statement (MATRIX-END MATRIX command)
PRINT Statement (MATRIX-END MATRIX command)
Matrix Control Structures (MATRIX-END MATRIX command)
READ Statement: Reading Character Data (MATRIX-END MATRIX command)
WRITE Statement: Writing Character Data (MATRIX-END MATRIX command)
GET Statement: Reading PASW Statistics Data Files (MATRIX-END MATRIX command)
SAVE Statement: Writing PASW Statistics Data Files (MATRIX-END MATRIX command)
MGET Statement: Reading Matrix Data Files (MATRIX-END MATRIX command)
MSAVE Statement: Writing Matrix Data Files (MATRIX-END MATRIX command)
DISPLAY Statement (MATRIX-END MATRIX command)
RELEASE Statement (MATRIX-END MATRIX command)
Macros Using the Matrix Language (MATRIX-END MATRIX command)
Conformable Matrices (MATRIX-END MATRIX command)
Scalar Expansion (MATRIX-END MATRIX command)
Arithmetic Operators (MATRIX-END MATRIX command)
Relational Operators (MATRIX-END MATRIX command)
Logical Operators (MATRIX-END MATRIX command)
Precedence of Operators (MATRIX-END MATRIX command)


Conformable Matrices (MATRIX-END MATRIX command)

matrix language,matrix language,matrix language
conformable matrices,conformable matrices,conformable matrices

Many operations with matrices make sense only if the matrices involved have “suitable” dimensions. Most often, this means that they should be the same size, with the same number of rows and the same number of columns. Matrices that are the right size for an operation are said to be conformable matrices. If you attempt to do something in a matrix program with a matrix that is not conformable for that operation--a matrix that has the wrong dimensions--you will receive an error message, and the operation will not be performed. An important exception, where one of the matrices is a scalar, is discussed below.

Requirements for carrying out matrix operations include:

• Matrix addition and subtraction require that the two matrices be the same size.

• The relational and logical operations described below require that the two matrices be the same size.

• Matrix multiplication requires that the number of columns of the first matrix equal the number of rows of the second matrix.

• Raising a matrix to a power can be done only if the matrix is square. This includes the important operation of inverting a matrix, where the power is −1.

• Conformability requirements for matrix functions are noted in Matrix Functions (MATRIX-END MATRIX command) and in COMPUTE Statement (MATRIX-END MATRIX command).

Related Topics

Matrix Operations (MATRIX-END MATRIX command)
Scalar Expansion (MATRIX-END MATRIX command)
Arithmetic Operators (MATRIX-END MATRIX command)
Relational Operators (MATRIX-END MATRIX command)
Logical Operators (MATRIX-END MATRIX command)
Precedence of Operators (MATRIX-END MATRIX command)


Scalar Expansion (MATRIX-END MATRIX command)

matrix language,matrix language,matrix language
scalar expansion,scalar expansion,scalar expansion

When one of the matrices involved in an operation is a scalar, the scalar is treated as a matrix of the correct size in order to carry out the operation. This internal scalar expansion is performed for the following operations:

• Addition and subtraction.

• Elementwise multiplication, division, and exponentiation. Note that multiplying a matrix elementwise by an expanded scalar is equivalent to ordinary scalar multiplication--each element of the matrix is multiplied by the scalar.

• All relational and logical operators.

Related Topics

Matrix Operations (MATRIX-END MATRIX command)
Conformable Matrices (MATRIX-END MATRIX command)
Arithmetic Operators (MATRIX-END MATRIX command)
Relational Operators (MATRIX-END MATRIX command)
Logical Operators (MATRIX-END MATRIX command)
Precedence of Operators (MATRIX-END MATRIX command)


Arithmetic Operators (MATRIX-END MATRIX command)

matrix language,matrix language,matrix language
arithmetic operators,arithmetic operators,arithmetic operators
arithmetic operators,arithmetic operators,arithmetic operators
in matrix language,in matrix language,in matrix language

You can add, subtract, multiply, or exponentiate matrices according to the rules of matrix algebra, or you can perform elementwise arithmetic, in which you multiply, divide, or exponentiate each element of a matrix separately. The arithmetic operators are listed below.

Unary − | Sign reversal. A minus sign placed in front of a matrix reverses the sign of each element. (The unary + is also accepted but has no effect.)
+ | Matrix addition. Corresponding elements of the two matrices are added. The matrices must have the same dimensions, or one must be a scalar.
− | Matrix subtraction. Corresponding elements of the two matrices are subtracted. The matrices must have the same dimensions, or one must be a scalar.
* | Multiplication. There are two cases. First, scalar multiplication: if either of the matrices is a scalar, each element of the other matrix is multiplied by that scalar. Second, matrix multiplication: if A is an m × n matrix and B is an n × p matrix, A*B is an m × p matrix in which the element in row i, column k, is equal to Σnj=1A(i,j)×B(j,k)
/ | Division. The division operator performs elementwise division (described below). True matrix division, the inverse operation of matrix multiplication, is accomplished by taking the INV function (square matrices) or the GINV function (rectangular matrices) of the denominator and multiplying.
** | Matrix exponentiation. A matrix can be raised only to an integer power. The matrix, which must be square, is multiplied by itself as many times as the absolute value of the exponent. If the exponent is negative, the result is then inverted.
&* | Elementwise multiplication. Each element of the matrix is multiplied by the corresponding element of the second matrix. The matrices must have the same dimensions, or one must be a scalar.
&/ | Elementwise division. Each element of the matrix is divided by the corresponding element of the second matrix. The matrices must have the same dimensions, or one must be a scalar.
&** | Elementwise exponentiation. Each element of the first matrix is raised to the power of the corresponding element of the second matrix. The matrices must have the same dimensions, or one must be a scalar.
: | Sequential integers. This operator creates a vector of consecutive integers from the value preceding the operator to the value following it. You can specify an optional increment following a second colon. See Matrix Notation Shorthand (MATRIX-END MATRIX command) for the principal use of this operator.

• Use these operators only with numeric matrices. The results are undefined when they are used with string matrices.

Related Topics

Matrix Operations (MATRIX-END MATRIX command)
Conformable Matrices (MATRIX-END MATRIX command)
Scalar Expansion (MATRIX-END MATRIX command)
Relational Operators (MATRIX-END MATRIX command)
Logical Operators (MATRIX-END MATRIX command)
Precedence of Operators (MATRIX-END MATRIX command)


Relational Operators (MATRIX-END MATRIX command)

matrix language,matrix language,matrix language
relational operators,relational operators,relational operators
relational operators,relational operators,relational operators
in matrix language,in matrix language,in matrix language

The relational operators are used to compare two matrices, element by element. The result is a matrix of the same size as the (expanded) operands and containing either 1 or 0. The value of each element, 1 or 0, is determined by whether the comparison between the corresponding element of the first matrix with the corresponding element of the second matrix is true or false--1 for true and 0 for false. The matrices being compared must be of the same dimensions unless one of them is a scalar. The relational operators are listed in the following table.

Relational operators in matrix programs
> | GT | Greater than
< | LT | Less than
<> or ~= (¬=) | NE | Not equal to
<= | LE | Less than or equal to
>= | GE | Greater than or equal to
= | EQ | Equal to

• The symbolic and alphabetic forms of these operators are equivalent.

• The symbols representing NE (~= or ¬=) are system dependent. In general, the tilde (~) is valid for ASCII systems, while the logical-not sign (¬), or whatever symbol is over the number 6 on the keyboard, is valid for IBM EBCDIC systems.

• Use these operators only with numeric matrices. The results are undefined when they are used with string matrices.

Related Topics

Matrix Operations (MATRIX-END MATRIX command)
Conformable Matrices (MATRIX-END MATRIX command)
Scalar Expansion (MATRIX-END MATRIX command)
Arithmetic Operators (MATRIX-END MATRIX command)
Logical Operators (MATRIX-END MATRIX command)
Precedence of Operators (MATRIX-END MATRIX command)


Logical Operators (MATRIX-END MATRIX command)

matrix language,matrix language,matrix language
logical operators,logical operators,logical operators
logical operators,logical operators,logical operators
in matrix language,in matrix language,in matrix language

Logical operators combine two matrices, normally containing values of 1 (true) or 0 (false). When used with other numerical matrices, they treat all positive values as true and all negative and 0 values as false. The logical operators are:

NOT | Reverses the truth of the matrix that follows it. Positive elements yield 0, and negative or 0 elements yield 1.
AND | Both must be true. The matrix A AND B is 1 where the corresponding elements of A and B are both positive and 0 elsewhere.
OR | Either must be true. The matrix A OR B is 1 where the corresponding element of either A or B is positive and 0 where both elements are negative or 0.
XOR | Either must be true but not both. The matrix A XOR B is 1 where one but not both of the corresponding elements of A and B is positive and 0 where both are positive or neither is positive.

Related Topics

Matrix Operations (MATRIX-END MATRIX command)
Conformable Matrices (MATRIX-END MATRIX command)
Scalar Expansion (MATRIX-END MATRIX command)
Arithmetic Operators (MATRIX-END MATRIX command)
Relational Operators (MATRIX-END MATRIX command)
Precedence of Operators (MATRIX-END MATRIX command)


Precedence of Operators (MATRIX-END MATRIX command)

Parentheses can be used to control the order in which complex expressions are evaluated. When the order of evaluation is not specified by parentheses, operations are carried out in the order listed below. The operations higher on the list take precedence over the operations lower on the list.

+ − (unary)

:

** &**

* &* &/

+ − (addition and subtraction)

> >= < <= <>=

NOT

AND

OR XOR

Operations of equal precedence are performed left to right of the expressions.

Examples

COMPUTE A = {1,2,3;4,5,6}.
COMPUTE B = A + 4.
COMPUTE C = A &** 2.
COMPUTE D = 2 &** A.
COMPUTE E = A < 5.
COMPUTE F = (C &/ 2) < B.

• The results of these COMPUTE statements are:

A=[
1 | 2 | 3
4 | 5 | 6
]

B=[
5 | 6 | 7
8 | 9 | 10
]

C=[
1 | 4 | 9
16 | 25 | 36
]

D=[
2 | 4 | 8
16 | 32 | 64
]

E=[
1 | 1 | 1
1 | 0 | 0
]

F=[
1 | 1 | 1
0 | 0 | 0
]

Related Topics

Matrix Operations (MATRIX-END MATRIX command)
Conformable Matrices (MATRIX-END MATRIX command)
Scalar Expansion (MATRIX-END MATRIX command)
Arithmetic Operators (MATRIX-END MATRIX command)
Relational Operators (MATRIX-END MATRIX command)
Logical Operators (MATRIX-END MATRIX command)


MATRIX and Other Commands (MATRIX-END MATRIX command)

A matrix program is a single procedure within a session.

• No active dataset is needed to run a matrix program. If one exists, it is ignored during matrix processing unless you specifically reference it (with an asterisk) on the GET, SAVE, MGET, or MSAVE statements.

• Variables defined in the active dataset are unavailable during matrix processing, except with the GET or MGET statements.

• Matrix variables are unavailable after the END MATRIX command unless you use SAVE or MSAVE to write them to the active dataset.

• You cannot run a matrix program from a syntax window if split-file processing is in effect. If you save the matrix program into a syntax file, however, you can use the INCLUDE command to run the program even if split-file processing is in effect.

Related Topics

MATRIX-END MATRIX
Overview (MATRIX-END MATRIX command)
Terminology (MATRIX-END MATRIX command)
Matrix Variables (MATRIX-END MATRIX command)
Syntax of Matrix Language (MATRIX-END MATRIX command)
Matrix Operations (MATRIX-END MATRIX command)
MATRIX and END MATRIX Commands (MATRIX-END MATRIX command)
COMPUTE Statement (MATRIX-END MATRIX command)
CALL Statement (MATRIX-END MATRIX command)
PRINT Statement (MATRIX-END MATRIX command)
Matrix Control Structures (MATRIX-END MATRIX command)
READ Statement: Reading Character Data (MATRIX-END MATRIX command)
WRITE Statement: Writing Character Data (MATRIX-END MATRIX command)
GET Statement: Reading PASW Statistics Data Files (MATRIX-END MATRIX command)
SAVE Statement: Writing PASW Statistics Data Files (MATRIX-END MATRIX command)
MGET Statement: Reading Matrix Data Files (MATRIX-END MATRIX command)
MSAVE Statement: Writing Matrix Data Files (MATRIX-END MATRIX command)
DISPLAY Statement (MATRIX-END MATRIX command)
RELEASE Statement (MATRIX-END MATRIX command)
Macros Using the Matrix Language (MATRIX-END MATRIX command)
Matrix Statements (MATRIX-END MATRIX command)
Exchanging Data with PASW Statistics Data Files (MATRIX-END MATRIX command)
Using an Active Dataset (MATRIX-END MATRIX command)


Matrix Statements (MATRIX-END MATRIX command)

The following table lists all of the statements that are accepted within a matrix program. Most of them have the same name as an analogous PASW Statistics command and perform an exactly analogous function. Use only these statements between the MATRIX and END MATRIX commands. Any command not recognized as a valid matrix statement will be rejected by the matrix processor.

Valid matrix statements
BREAK | ELSE IF | MSAVE
CALL | END IF | PRINT
COMPUTE | END LOOP | READ
DISPLAY | GET | RELEASE
DO IF | LOOP | SAVE*
ELSE | MGET | WRITE

*Maximum of 100 SAVE commands in amatrix program.

Related Topics

MATRIX and Other Commands (MATRIX-END MATRIX command)
Exchanging Data with PASW Statistics Data Files (MATRIX-END MATRIX command)
Using an Active Dataset (MATRIX-END MATRIX command)


Exchanging Data with PASW Statistics Data Files (MATRIX-END MATRIX command)

matrix language,matrix language,matrix language
reading PASW Statistics data files,reading PASW Statistics data files,reading PASW Statistics data files
matrix language,matrix language,matrix language
saving PASW Statistics data files,saving PASW Statistics data files,saving PASW Statistics data files

Matrix programs can read and write PASW Statistics data files.

• The GET and SAVE statements read and write ordinary (case-oriented) PASW Statistics data files, treating each case as a row of a matrix and each ordinary variable as a column.

A matrix program cannot contain more than 100 SAVE commands.

• The MGET and MSAVE statements read and write matrix-format data files, respecting the structure defined by PASW Statistics when it creates the file. These statements are discussed below.

• Case weighting in a data file is ignored when the file is read into a matrix program.

Related Topics

MATRIX and Other Commands (MATRIX-END MATRIX command)
Matrix Statements (MATRIX-END MATRIX command)
Using an Active Dataset (MATRIX-END MATRIX command)


Using an Active Dataset (MATRIX-END MATRIX command)

You can use the GET statement to read a case-oriented active dataset into a matrix variable. The result is a rectangular data matrix in which cases have become rows and variables have become columns. Special circumstances can affect the processing of this data matrix.

matrix language,matrix language,matrix language
with split-file processing,with split-file processing,with split-file processing

Split-File Processing. After a SPLIT FILE command, a matrix program executed with the INCLUDE command will read one split-file group with each execution of a GET statement. This enables you to process the subgroups separately within the matrix program.

matrix language,matrix language,matrix language
with subsets of cases,with subsets of cases,with subsets of cases

Case Selection. When a subset of cases is selected for processing, as the result of a SELECT IF, SAMPLE, or N OF CASES command, only the selected cases will be read by the GET statement in a matrix program.

matrix language,matrix language,matrix language
with temporary transformations,with temporary transformations,with temporary transformations

Temporary Transformations. The entire matrix program is treated as a single procedure. Temporary transformations--those preceded by the TEMPORARY command--entered immediately before a matrix program are in effect throughout that program (even if you GET the active dataset repeatedly) and are no longer in effect at the end of the matrix program.

matrix language,matrix language,matrix language
with case weighting,with case weighting,with case weighting

Case Weighting. Case weighting in a active dataset is ignored when the file is read into a matrix program.

Related Topics

MATRIX and Other Commands (MATRIX-END MATRIX command)
Matrix Statements (MATRIX-END MATRIX command)
Exchanging Data with PASW Statistics Data Files (MATRIX-END MATRIX command)


MATRIX and END MATRIX Commands (MATRIX-END MATRIX command)

The MATRIX command, when encountered in a session, invokes the matrix processor, which reads matrix statements until the END MATRIX or FINISH command is encountered.

• MATRIX is a procedure and cannot be entered inside a transformation structure such as DO IF or LOOP.

• The MATRIX procedure does not require an active dataset.

• Comments are removed before subsequent lines are passed to the matrix processor.

• Macros are expanded before subsequent lines are passed to the matrix processor.

The END MATRIX command terminates matrix processing and returns control to the command processor.

• The contents of matrix variables are lost after an END MATRIX command.

• The active dataset, if present, becomes available again after an END MATRIX command.

Related Topics

MATRIX-END MATRIX
Overview (MATRIX-END MATRIX command)
Terminology (MATRIX-END MATRIX command)
Matrix Variables (MATRIX-END MATRIX command)
Syntax of Matrix Language (MATRIX-END MATRIX command)
Matrix Operations (MATRIX-END MATRIX command)
MATRIX and Other Commands (MATRIX-END MATRIX command)
COMPUTE Statement (MATRIX-END MATRIX command)
CALL Statement (MATRIX-END MATRIX command)
PRINT Statement (MATRIX-END MATRIX command)
Matrix Control Structures (MATRIX-END MATRIX command)
READ Statement: Reading Character Data (MATRIX-END MATRIX command)
WRITE Statement: Writing Character Data (MATRIX-END MATRIX command)
GET Statement: Reading PASW Statistics Data Files (MATRIX-END MATRIX command)
SAVE Statement: Writing PASW Statistics Data Files (MATRIX-END MATRIX command)
MGET Statement: Reading Matrix Data Files (MATRIX-END MATRIX command)
MSAVE Statement: Writing Matrix Data Files (MATRIX-END MATRIX command)
DISPLAY Statement (MATRIX-END MATRIX command)
RELEASE Statement (MATRIX-END MATRIX command)
Macros Using the Matrix Language (MATRIX-END MATRIX command)


COMPUTE Statement (MATRIX-END MATRIX command)

COMPUTE (statement),COMPUTE (statement),COMPUTE (statement)
MATRIX command,MATRIX command,MATRIX command
MATRIX (command),MATRIX (command),MATRIX (command)
COMPUTE statement,COMPUTE statement,COMPUTE statement

The COMPUTE statement carries out most of the calculations in the matrix program. It closely resembles the COMPUTE command in the PASW Statistics transformation language.

• The basic specification is the target variable, an equals sign, and the assignment expression. Values of the target variable are calculated according to the specification on the assignment expression.

• The target variable must be named first, and the equals sign is required. Only one target variable is allowed per COMPUTE statement.

• Expressions that extract portions of a matrix, such as M(1,:) or M(1:3,4), are allowed to assign values. (See the topic Matrix Notation Shorthand (MATRIX-END MATRIX command) for more information. ) The target variable must be specified as a variable.

• Matrix functions must specify at least one argument enclosed in parentheses. If an expression has two or more arguments, each argument must be separated by a comma. For a complete discussion of the functions and their arguments, see Matrix Functions (MATRIX-END MATRIX command).

Related Topics

MATRIX-END MATRIX
Overview (MATRIX-END MATRIX command)
Terminology (MATRIX-END MATRIX command)
Matrix Variables (MATRIX-END MATRIX command)
Syntax of Matrix Language (MATRIX-END MATRIX command)
Matrix Operations (MATRIX-END MATRIX command)
MATRIX and Other Commands (MATRIX-END MATRIX command)
MATRIX and END MATRIX Commands (MATRIX-END MATRIX command)
CALL Statement (MATRIX-END MATRIX command)
PRINT Statement (MATRIX-END MATRIX command)
Matrix Control Structures (MATRIX-END MATRIX command)
READ Statement: Reading Character Data (MATRIX-END MATRIX command)
WRITE Statement: Writing Character Data (MATRIX-END MATRIX command)
GET Statement: Reading PASW Statistics Data Files (MATRIX-END MATRIX command)
SAVE Statement: Writing PASW Statistics Data Files (MATRIX-END MATRIX command)
MGET Statement: Reading Matrix Data Files (MATRIX-END MATRIX command)
MSAVE Statement: Writing Matrix Data Files (MATRIX-END MATRIX command)
DISPLAY Statement (MATRIX-END MATRIX command)
RELEASE Statement (MATRIX-END MATRIX command)
Macros Using the Matrix Language (MATRIX-END MATRIX command)
String Values on COMPUTE Statements (MATRIX-END MATRIX command)
Arithmetic Operations and Comparisons (MATRIX-END MATRIX command)
Matrix Functions (MATRIX-END MATRIX command)


String Values on COMPUTE Statements (MATRIX-END MATRIX command)

Matrix variables, unlike those in the transformation language, are not checked for data type (numeric or string) when you use them in a COMPUTE statement.

• Numerical calculations with matrices containing string values will produce meaningless results.

• One or more elements of a matrix can be set equal to string constants by enclosing the string constants in quotes on a COMPUTE statement.

• String values can be copied from one matrix to another with the COMPUTE statement.

• There is no way to display a matrix that contains both numeric and string values, if you compute one for some reason.

Example

COMPUTE LABELS={"Observe", "Predict", "Error"}.
PRINT LABELS /FORMAT=A7.

• LABELS is a row vector containing three string values.

Related Topics

COMPUTE Statement (MATRIX-END MATRIX command)
Arithmetic Operations and Comparisons (MATRIX-END MATRIX command)
Matrix Functions (MATRIX-END MATRIX command)


Arithmetic Operations and Comparisons (MATRIX-END MATRIX command)

The expression on a COMPUTE statement can be formed from matrix constants and variables, combined with the arithmetic, relational, and logical operators discussed above. Matrix constructions and matrix functions are also allowed.

Examples

COMPUTE PI = 3.14159265.
COMPUTE RSQ = R * R.
COMPUTE FLAGS = EIGENVAL >= 1.
COMPUTE ESTIM = {OBS, PRED, ERR}.

• The first statement computes a scalar. Note that the braces are optional on a scalar constant.

• The second statement computes the square of the matrix R. R can be any square matrix, including a scalar.

• The third statement computes a vector named FLAGS, which has the same dimension as the existing vector EIGENVAL. Each element of FLAGS equals 1 if the corresponding element of EIGENVAL is greater than or equal to 1, and 0 if the corresponding element is less than 1.

• The fourth statement constructs a matrix ESTIM by concatenating the three vectors or matrices OBS, PRED, and ERR. The component matrices must have the same number of rows.

Related Topics

COMPUTE Statement (MATRIX-END MATRIX command)
String Values on COMPUTE Statements (MATRIX-END MATRIX command)
Matrix Functions (MATRIX-END MATRIX command)


Matrix Functions (MATRIX-END MATRIX command)

MATRIX functions,MATRIX functions,MATRIX functions
functions,functions,functions
MATRIX command,MATRIX command,MATRIX command
matrix language,matrix language,matrix language
functions,functions,functions

The following functions are available in the matrix program. Except where noted, each takes one or more numeric matrices as arguments and returns a matrix value as its result. The arguments must be enclosed in parentheses, and multiple arguments must be separated by commas.

On the following list, matrix arguments are represented by names beginning with M. Unless otherwise noted, these arguments can be vectors or scalars. Arguments that must be vectors are represented by names beginning with V, and arguments that must be scalars are represented by names beginning with S.

ABS (function),ABS (function),ABS (function)
MATRIX command,MATRIX command,MATRIX command
ALL (function),ALL (function),ALL (function)
MATRIX command,MATRIX command,MATRIX command
ANY (function),ANY (function),ANY (function)
MATRIX command,MATRIX command,MATRIX command
ARSIN (function),ARSIN (function),ARSIN (function)
MATRIX command,MATRIX command,MATRIX command
ARTAN (function),ARTAN (function),ARTAN (function)
MATRIX command,MATRIX command,MATRIX command
BLOCK (function),BLOCK (function),BLOCK (function)
MATRIX command,MATRIX command,MATRIX command
CDFNORM (function),CDFNORM (function),CDFNORM (function)
MATRIX command,MATRIX command,MATRIX command
CHICDF (function),CHICDF (function),CHICDF (function)
MATRIX command,MATRIX command,MATRIX command
CHOL (function),CHOL (function),CHOL (function)
MATRIX command,MATRIX command,MATRIX command
CMAX (function),CMAX (function),CMAX (function)
MATRIX command,MATRIX command,MATRIX command
CMIN (function),CMIN (function),CMIN (function)
MATRIX command,MATRIX command,MATRIX command
COS (function),COS (function),COS (function)
MATRIX command,MATRIX command,MATRIX command
CSSQ (function),CSSQ (function),CSSQ (function)
MATRIX command,MATRIX command,MATRIX command
CSUM (function),CSUM (function),CSUM (function)
MATRIX command,MATRIX command,MATRIX command
DESIGN (function),DESIGN (function),DESIGN (function)
MATRIX command,MATRIX command,MATRIX command
DET (function),DET (function),DET (function)
MATRIX command,MATRIX command,MATRIX command
DIAG (function),DIAG (function),DIAG (function)
MATRIX command,MATRIX command,MATRIX command
EOF (function),EOF (function),EOF (function)
MATRIX command,MATRIX command,MATRIX command
EVAL (function),EVAL (function),EVAL (function)
MATRIX command,MATRIX command,MATRIX command
EXP (function),EXP (function),EXP (function)
MATRIX command,MATRIX command,MATRIX command
FCDF (function),FCDF (function),FCDF (function)
MATRIX command,MATRIX command,MATRIX command
GINV (function),GINV (function),GINV (function)
MATRIX command,MATRIX command,MATRIX command
GSCH (function),GSCH (function),GSCH (function)
MATRIX command,MATRIX command,MATRIX command
IDENT (function),IDENT (function),IDENT (function)
MATRIX command,MATRIX command,MATRIX command
INV (function),INV (function),INV (function)
MATRIX command,MATRIX command,MATRIX command
KRONEKER (function),KRONEKER (function),KRONEKER (function)
MATRIX command,MATRIX command,MATRIX command
LG10 (function),LG10 (function),LG10 (function)
MATRIX command,MATRIX command,MATRIX command
LN (function),LN (function),LN (function)
MATRIX command,MATRIX command,MATRIX command
MAGIC (function),MAGIC (function),MAGIC (function)
MATRIX command,MATRIX command,MATRIX command
MAKE (function),MAKE (function),MAKE (function)
MATRIX command,MATRIX command,MATRIX command
MDIAG (function),MDIAG (function),MDIAG (function)
MATRIX command,MATRIX command,MATRIX command
MMAX (function),MMAX (function),MMAX (function)
MATRIX command,MATRIX command,MATRIX command
MMIN (function),MMIN (function),MMIN (function)
MATRIX command,MATRIX command,MATRIX command
MOD (function),MOD (function),MOD (function)
MATRIX command,MATRIX command,MATRIX command
MSSQ (function),MSSQ (function),MSSQ (function)
MATRIX command,MATRIX command,MATRIX command
MSUM (function),MSUM (function),MSUM (function)
MATRIX command,MATRIX command,MATRIX command
NCOL (function),NCOL (function),NCOL (function)
MATRIX command,MATRIX command,MATRIX command
NROW (function),NROW (function),NROW (function)
MATRIX command,MATRIX command,MATRIX command
RANK (function),RANK (function),RANK (function)
MATRIX command,MATRIX command,MATRIX command
RESHAPE (function),RESHAPE (function),RESHAPE (function)
MATRIX command,MATRIX command,MATRIX command
RMAX (function),RMAX (function),RMAX (function)
MATRIX command,MATRIX command,MATRIX command
RMIN (function),RMIN (function),RMIN (function)
MATRIX command,MATRIX command,MATRIX command
RND (function),RND (function),RND (function)
MATRIX command,MATRIX command,MATRIX command
RNKORDER (function),RNKORDER (function),RNKORDER (function)
MATRIX command,MATRIX command,MATRIX command
RSSQ (function),RSSQ (function),RSSQ (function)
MATRIX command,MATRIX command,MATRIX command
RSUM (function),RSUM (function),RSUM (function)
MATRIX command,MATRIX command,MATRIX command
SIN (function),SIN (function),SIN (function)
MATRIX command,MATRIX command,MATRIX command
SOLVE (function),SOLVE (function),SOLVE (function)
MATRIX command,MATRIX command,MATRIX command
SQRT (function),SQRT (function),SQRT (function)
MATRIX command,MATRIX command,MATRIX command
SSCP (function),SSCP (function),SSCP (function)
MATRIX command,MATRIX command,MATRIX command
SVAL (function),SVAL (function),SVAL (function)
MATRIX command,MATRIX command,MATRIX command
SWEEP (function),SWEEP (function),SWEEP (function)
MATRIX command,MATRIX command,MATRIX command
TCDF (function),TCDF (function),TCDF (function)
MATRIX command,MATRIX command,MATRIX command
TRACE (function),TRACE (function),TRACE (function)
MATRIX command,MATRIX command,MATRIX command
TRANSPOS (function),TRANSPOS (function),TRANSPOS (function)
MATRIX command,MATRIX command,MATRIX command
T (function),T (function),T (function)
MATRIX command,MATRIX command,MATRIX command
TRUNC (function),TRUNC (function),TRUNC (function)
MATRIX command,MATRIX command,MATRIX command
UNIFORM (function),UNIFORM (function),UNIFORM (function)
MATRIX command,MATRIX command,MATRIX command
ABS(M) | Absolute value. Takes a single argument. Returns a matrix having the same dimensions as the argument, containing the absolute values of its elements.
ALL(M) | Test for all elements nonzero. Takes a single argument. Returns a scalar: 1 if all elements of the argument are nonzero and 0 if any element is zero.
ANY(M) | Test for any element nonzero. Takes a single argument. Returns a scalar: 1 if any element of the argument is nonzero and 0 if all elements are zero.
ARSIN(M) | Inverse sine. Takes a single argument, whose elements must be between −1 and 1. Returns a matrix having the same dimensions as the argument, containing the inverse sines (arcsines) of its elements. The results are in radians and are in the range from −π/2 to π/2.
ARTAN(M) | Inverse tangent. Takes a single argument. Returns a matrix having the same dimensions as the argument, containing the inverse tangents (arctangents) of its elements, in radians. To convert radians to degrees, multiply by 180/π, which you can compute as 45/ARTAN(1). For example, the statement COMPUTE DEGREES=ARTAN(M)*45/ARTAN(1) returns a matrix containing inverse tangents in degrees.
BLOCK(M1,M2,...) Create a block diagonal matrix. Takes any number of arguments. Returns a matrix with as many rows as the sum of the rows in all the arguments, and as many columns as the sum of the columns in all the arguments, with the argument matrices down the diagonal and zeros elsewhere. For example, if:

A=[
1 | 1 | 1
1 | 1 | 1
], B=[
2 | 2
2 | 2
], C=[
3 | 3 | 3
3 | 3 | 3
3 | 3 | 3
3 | 3 | 3
], and D=[
4 4 4
]

then: BLOCK(A,B,C,D)=[
1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0
1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0
0 | 0 | 0 | 2 | 2 | 0 | 0 | 0 | 0 | 0 | 0
0 | 0 | 0 | 2 | 2 | 0 | 0 | 0 | 0 | 0 | 0
0 | 0 | 0 | 0 | 0 | 3 | 3 | 3 | 0 | 0 | 0
0 | 0 | 0 | 0 | 0 | 3 | 3 | 3 | 0 | 0 | 0
0 | 0 | 0 | 0 | 0 | 3 | 3 | 3 | 0 | 0 | 0
0 | 0 | 0 | 0 | 0 | 3 | 3 | 3 | 0 | 0 | 0
0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 | 4 | 4
]

CDFNORM(M) | Standard normal cumulative distribution function of elements. Takes a single argument. Returns a matrix having the same dimensions as the argument, containing the values of the cumulative normal distribution function for each of its elements. If an element of the argument is x, the corresponding element of the result is a number between 0 and 1, giving the proportion of a normal distribution that is less than x. For example, CDFNORM({-1.96,0,1.96}) results in, approximately, {.025,.5,.975}.
CHICDF(M,S) | Chi-square cumulative distribution function of elements. Takes two arguments, a matrix of chi-square values and a scalar giving the degrees of freedom (which must be positive). Returns a matrix having the same dimensions as the first argument, containing the values of the cumulative chi-square distribution function for each of its elements. If an element of the first argument is x and the second argument is S, the corresponding element of the result is a number between 0 and 1, giving the proportion of a chi-square distribution with S degrees of freedom that is less than x. If x is not positive, the result is 0.
CHOL(M) | Cholesky decomposition. Takes a single argument, which must be a symmetric positive-definite matrix (a square matrix, symmetric about the main diagonal, with positive eigenvalues). Returns a matrix having the same dimensions as the argument. If M is a symmetric positive-definite matrix and B=CHOL(M), then T(B)* B=M, where T is the transpose function defined below.
CMAX(M) | Column maxima. Takes a single argument. Returns a row vector with the same number of columns as the argument. Each column of the result contains the maximum value of the corresponding column of the argument.
CMIN(M) | Column minima. Takes a single argument. Returns a row vector with the same number of columns as the argument. Each column of the result contains the minimum value of the corresponding column of the argument.
COS(M) | Cosines. Takes a single argument. Returns a matrix having the same dimensions as the argument, containing the cosines of the elements of the argument. Elements of the argument matrix are assumed to be measured in radians. To convert degrees to radians, multiply by π/180, which you can compute as ARTAN(1)/45. For example, the statement COMPUTE COSINES=COS(DEGREES*ARTAN(1)/45) returns cosines from a matrix containing elements measured in degrees.
CSSQ(M) | Column sums of squares. Takes a single argument. Returns a row vector with the same number of columns as the argument. Each column of the result contains the sum of the squared values of the elements in the corresponding column of the argument.
CSUM(M) | Column sums. Takes a single argument. Returns a row vector with the same number of columns as the argument. Each column of the result contains the sum of the elements in the corresponding column of the argument.
DESIGN(M) Main-effects design matrix from the columns of a matrix. Takes a single argument. Returns a matrix having the same number of rows as the argument, and as many columns as the sum of the numbers of unique values in each column of the argument. Constant columns in the argument are skipped with a warning message. The result contains 1 in the row(s) where the value in question occurs in the argument and 0 otherwise. For example, if:

A=[
1 | 2 | 8
1 | 3 | 8
2 | 6 | 5
3 | 3 | 8
3 | 6 | 5
], then:

DESIGN(A)=[
1 | 0 | 0 | 1 | 0 | 0 | 1 | 0
1 | 0 | 0 | 0 | 1 | 0 | 1 | 0
0 | 1 | 0 | 0 | 0 | 1 | 0 | 1
0 | 0 | 1 | 0 | 1 | 0 | 1 | 0
0 | 0 | 1 | 0 | 0 | 1 | 0 | 1
]

The first three columns of the result correspond to the three distinct values 1, 2, and 3 in the first column of A; the fourth through sixth columns of the result correspond to the three distinct values 2, 3, and 6 in the second column of A; and the last two columns of the result correspond to the two distinct values 8 and 5 in the third column of A.
DET(M) | Determinant. Takes a single argument, which must be a square matrix. Returns a scalar, which is the determinant of the argument.
DIAG(M) | Diagonal of a matrix. Takes a single argument. Returns a column vector with as many rows as the minimum of the number of rows and the number of columns in the argument. The ith element of the result is the value in row i, column i of the argument.
EOF(file) | End of file indicator. Normally used after a READ statement. Takes a single argument, which must be either a filename in quotes, or a file handle defined on a FILE HANDLE command that precedes the matrix program. Returns a scalar equal to 1 if the last attempt to read that file encountered the last record in the file, and equal to 0 if the last attempt did not encounter the last record in the file. Calling the EOF function causes a REREAD specification on the READ statement to be ignored on the next attempt to read the file.
EVAL(M) | Eigenvalues of a symmetric matrix. Takes a single argument, which must be a symmetric matrix. Returns a column vector with the same number of rows as the argument, containing the eigenvalues of the argument in decreasing numerical order.
EXP(M) | Exponentials of matrix elements. Takes a single argument. Returns a matrix having the same dimensions as the argument, in which each element equals e raised to the power of the corresponding element in the argument matrix.
FCDF(M,S1,S2) | Cumulative F distribution function of elements. Takes three arguments, a matrix of F values and two scalars giving the degrees of freedom (which must be positive). Returns a matrix having the same dimensions as the first argument M, containing the values of the cumulative F distribution function for each of its elements. If an element of the first argument is x and the second and third arguments are S1 and S2, the corresponding element of the result is a number between 0 and 1, giving the proportion of an F distribution with S1 and S2 degrees of freedom that is less than x. If x is not positive, the result is 0.
GINV(M) | Moore-Penrose generalized inverse of a matrix. Takes a single argument. Returns a matrix with the same dimensions as the transpose of the argument. If A is the generalized inverse of a matrix M, then M*A*M=M and A*M*A=A. Both A*M and M*A are symmetric.
GRADE(M) | Ranks elements in a matrix. Takes a single argument. Uses sequential integers for ties.
GSCH(M) | Gram-Schmidt orthonormal basis for the space spanned by the column vectors of a matrix. Takes a single argument, in which there must be as many linearly independent columns as there are rows. (That is, the rank of the argument must equal the number of rows.) Returns a square matrix with as many rows as the argument. The columns of the result form a basis for the space spanned by the columns of the argument.
IDENT(S1 [,S2]) | Create an identity matrix. Takes either one or two arguments, which must be scalars. Returns a matrix with as many rows as the first argument and as many columns as the second argument, if any. If the second argument is omitted, the result is a square matrix. Elements on the main diagonal of the result equal 1, and all other elements equal 0.
INV(M) | Inverse of a matrix. Takes a single argument, which must be square and nonsingular (that is, its determinant must not be 0). Returns a square matrix having the same dimensions as the argument. If A is the inverse of M, then M*A=A*M=I, where I is the identity matrix.
KRONEKER(M1,M2) | Kronecker product of two matrices. Takes two arguments. Returns a matrix whose row dimension is the product of the row dimensions of the arguments and whose column dimension is the product of the column dimensions of the arguments. The Kronecker product of two matrices A and B takes the form of an array of scalar products:

A(1,1)*BA(1,2)* B ... A(1,N)*B

A(2,1)*BA(2,2)* B ... A(2,N)* B

...

A(M,1)*BA(M,2)*B ... A(M, N)*B

LG10(M) | Base 10 logarithms of the elements. Takes a single argument, all of whose elements must be positive. Returns a matrix having the same dimensions as the argument, in which each element is the logarithm to base 10 of the corresponding element of the argument.
LN(M) | Natural logarithms of the elements. Takes a single argument, all of whose elements must be positive. Returns a matrix having the same dimensions as the argument, in which each element is the logarithm to base e of the corresponding element of the argument.
MAGIC(S) | Magic square. Takes a single scalar, which must be 3 or larger, as an argument. Returns a square matrix with S rows and S columns containing the integers from 1 through S2. All of the row sums and all of the column sums are equal in the result matrix. (The result matrix is only one of several possible magic squares.)
MAKE(S1,S2,S3) | Create a matrix, all of whose elements equal a specified value. Takes three scalars as arguments. Returns an S1 × S2 matrix, all of whose elements equal S3.
MDIAG(V) | Create a square matrix with a specified main diagonal. Takes a single vector as an argument. Returns a square matrix with as many rows and columns as the dimension of the vector. The elements of the vector appear on the main diagonal of the matrix, and the other matrix elements are all 0.
MMAX(M) | Maximum element in a matrix. Takes a single argument. Returns a scalar equal to the numerically largest element in the argument M.
MMIN(M) | Minimum element in a matrix. Takes a single argument. Returns a scalar equal to the numerically smallest element in the argument M.
MOD(M,S) | Remainders after division by a scalar. Takes two arguments, a matrix and a scalar (which must not be 0). Returns a matrix having the same dimensions as M, each of whose elements is the remainder after the corresponding element of M is divided by S. The sign of each element of the result is the same as the sign of the corresponding element of the matrix argument M.
MSSQ(M) | Matrix sum of squares. Takes a single argument. Returns a scalar that equals the sum of the squared values of all of the elements in the argument.
MSUM(M) | Matrix sum. Takes a single argument. Returns a scalar that equals the sum of all of the elements in the argument.
NCOL(M) | Number of columns in a matrix. Takes a single argument. Returns a scalar that equals the number of columns in the argument.
NROW(M) | Number of rows in a matrix. Takes a single argument. Returns a scalar that equals the number of rows in the argument.
RANK(M) | Rank of a matrix. Takes a single argument. Returns a scalar that equals the number of linearly independent rows or columns in the argument.
RESHAPE(M,S1,S2) | Matrix of different dimensions. Takes three arguments, a matrix and two scalars, whose product must equal the number of elements in the matrix. Returns a matrix whose dimensions are given by the scalar arguments. For example, if M is any matrix with exactly 50 elements, then RESHAPE(M, 5, 10) is a matrix with 5 rows and 10 columns. Elements are assigned to the reshaped matrix in order by row.
RMAX(M) | Row maxima. Takes a single argument. Returns a column vector with the same number of rows as the argument. Each row of the result contains the maximum value of the corresponding row of the argument.
RMIN(M) | Row minima. Takes a single argument. Returns a column vector with the same number of rows as the argument. Each row of the result contains the minimum value of the corresponding row of the argument.
RND(M) | Elements rounded to the nearest integers. Takes a single argument. Returns a matrix having the same dimensions as the argument. Each element of the result equals the corresponding element of the argument rounded to an integer.
RNKORDER(M) Ranking of matrix elements in ascending order. Takes a single argument. Returns a matrix having the same dimensions as the argument M. The smallest element of the argument corresponds to a result element of 1, and the largest element of the argument to a result element equal to the number of elements, except that ties (equal elements in M) are resolved by assigning a rank equal to the arithmetic mean of the applicable ranks. For example, if:

M=[
−1 | −21.7 | 8
0 | 3.91 | −21.7
8 | 9 | 10
], then:

RNKORDER(M)=[
3 | 1.5 | 6.5
4 | 5 | 1.5
6.5 | 8 | 9
]

RSSQ(M) | Row sums of squares. Takes a single argument. Returns a column vector having the same number of rows as the argument. Each row of the result contains the sum of the squared values of the elements in the corresponding row of the argument.
RSUM(M) | Row sums. Takes a single argument. Returns a column vector having the same number of rows as the argument. Each row of the result contains the sum of the elements in the corresponding row of the argument.
SIN(M) | Sines. Takes a single argument. Returns a matrix having the same dimensions as the argument, containing the sines of the elements of the argument. Elements of the argument matrix are assumed to be measured in radians. To convert degrees to radians, multiply by π/180, which you can compute as ARTAN(1)/45. For example, the statement COMPUTE SINES=SIN(DEGREES*ARTAN(1)/45) computes sines from a matrix containing elements measured in degrees.
SOLVE(M1,M2) | Solution of systems of linear equations. Takes two arguments, the first of which must be square and nonsingular (its determinant must be nonzero), and the second of which must have the same number of rows as the first. Returns a matrix with the same dimensions as the second argument. If M1*X=M2, then X= SOLVE(M1, M2). In effect, this function sets its result X equal to INV(M1)*M2.
SQRT(M) | Square roots of elements. Takes a single argument whose elements must not be negative. Returns a matrix having the same dimensions as the arguments, whose elements are the positive square roots of the corresponding elements of the argument.
SSCP(M) | Sums of squares and cross-products. Takes a single argument. Returns a square matrix having as many rows (and columns) as the argument has columns. SSCP(M) equals T(M)*M, where T is the transpose function defined below.
SVAL(M) | Singular values of a matrix. Takes a single argument. Returns a column vector containing as many rows as the minimum of the numbers of rows and columns in the argument, containing the singular values of the argument in decreasing numerical order. The singular values of a matrix M are the square roots of the eigenvalues of T(M)*M, where T is the transpose function discussed below.
SWEEP(M,S) | Sweep transformation of a matrix. Takes two arguments, a matrix and a scalar, which must be less than or equal to both the number of rows and the number of columns of the matrix. In other words, the pivot element of the matrix, which is M(S,S), must exist. Returns a matrix of the same dimensions as M. Suppose that S={ k} and A=SWEEP(M,S). If M(k,k) is not 0, then
A(k,k) = 1/M(k,k)
A(i,k) = −M(i,k)/M(k,k), for i not equal to k
A(k,j) = M(k,j)/M(k,k), for j not equal to k
A(i,j) = (M(i,j)*M(k,k), − M(i,k)*M(k,j))/M(k,k), for i,j not equal to k
and if M(k,k) equals 0, then
A(i,k) = A(k,i) = 0, for all i
A(i,j) = M(i,j), for i,j not equal to k
TCDF(M,S) | Cumulative t distribution function of elements. Takes two arguments, a matrix of t values and a scalar giving the degrees of freedom (which must be positive). Returns a matrix having the same dimensions as M, containing the values of the cumulative t distribution function for each of its elements. If an element of the first argument is x and the second argument is S, then the corresponding element of the result is a number between 0 and 1, giving the proportion of a t distribution with S degrees of freedom that is less than x.
TRACE(M) | Sum of the main diagonal elements. Takes a single argument. Returns a scalar, which equals the sum of the elements on the main diagonal of the argument.
TRANSPOS(M) | Transpose of the matrix. Takes a single argument. Returns the transpose of the argument. TRANSPOS can be shortened to T.
TRUNC(M) | Truncation of elements to integers. Takes a single argument. Returns a matrix having the same dimensions as the argument, whose elements equal the corresponding elements of the argument truncated to integers.
UNIFORM(S1,S2) | Uniformly distributed pseudo-random numbers between 0 and 1. Takes two scalars as arguments. Returns a matrix with the number of rows specified by the first argument and the number of columns specified by the second argument, containing pseudo-random numbers uniformly distributed between 0 and 1.

Related Topics

COMPUTE Statement (MATRIX-END MATRIX command)
String Values on COMPUTE Statements (MATRIX-END MATRIX command)
Arithmetic Operations and Comparisons (MATRIX-END MATRIX command)


CALL Statement (MATRIX-END MATRIX command)

CALL (statement),CALL (statement),CALL (statement)
MATRIX command,MATRIX command,MATRIX command
MATRIX (command),MATRIX (command),MATRIX (command)
CALL statement,CALL statement,CALL statement

Closely related to the matrix functions are the matrix procedures, which are invoked with the CALL statement. Procedures, similarly to functions, accept arguments enclosed in parentheses and separated by commas. They return their result in one or more of the arguments as noted in the individual descriptions below. They are implemented as procedures rather than as functions so that they can return more than one value or (in the case of SETDIAG) modify a matrix without making a copy of it.

EIGEN (keyword),EIGEN (keyword),EIGEN (keyword)
MATRIX command,MATRIX command,MATRIX command
SETDIAG (keyword),SETDIAG (keyword),SETDIAG (keyword)
MATRIX command,MATRIX command,MATRIX command
SVD (keyword),SVD (keyword),SVD (keyword)
MATRIX command,MATRIX command,MATRIX command
EIGEN(M,var1,var2) | Eigenvectors and eigenvalues of a symmetric matrix. Takes three arguments: a symmetric matrix and two valid variable names to which the results are assigned. If M is a symmetric matrix, the statement CALL EIGEN(M, A, B) will assign to A a matrix having the same dimensions as M, containing the eigenvectors of M as its columns, and will assign to B a column vector having as many rows as M, containing the eigenvalues of M in descending numerical order. The eigenvectors in A are ordered to correspond with the eigenvalues in B; thus, the first column corresponds to the largest eigenvalue, the second to the second largest, and so on.
SETDIAG(M,V) | Set the main diagonal of a matrix. Takes two arguments, a matrix and a vector. Elements on the main diagonal of M are set equal to the corresponding elements of V. If V is a scalar, all the diagonal elements are set equal to that scalar. Otherwise, if V has fewer elements than the main diagonal of M, remaining elements on the main diagonal are unchanged. If V has more elements than are needed, the extra elements are not used. See also the MDIAG matrix function.
SVD(M,var1,var2,var3) | Singular value decomposition of a matrix. Takes four arguments: a matrix and three valid variable names to which the results are assigned. If M is a matrix, the statement CALL SVD(M,U,Q,V) will assign to Q a diagonal matrix of the same dimensions as M, and to U and V unitary matrices (matrices whose inverses equal their transposes) of appropriate dimensions, such that M=U*Q*T(V), where T is the transpose function defined above. The singular values of M are in the main diagonal of Q.

Related Topics

MATRIX-END MATRIX
Overview (MATRIX-END MATRIX command)
Terminology (MATRIX-END MATRIX command)
Matrix Variables (MATRIX-END MATRIX command)
Syntax of Matrix Language (MATRIX-END MATRIX command)
Matrix Operations (MATRIX-END MATRIX command)
MATRIX and Other Commands (MATRIX-END MATRIX command)
MATRIX and END MATRIX Commands (MATRIX-END MATRIX command)
COMPUTE Statement (MATRIX-END MATRIX command)
PRINT Statement (MATRIX-END MATRIX command)
Matrix Control Structures (MATRIX-END MATRIX command)
READ Statement: Reading Character Data (MATRIX-END MATRIX command)
WRITE Statement: Writing Character Data (MATRIX-END MATRIX command)
GET Statement: Reading PASW Statistics Data Files (MATRIX-END MATRIX command)
SAVE Statement: Writing PASW Statistics Data Files (MATRIX-END MATRIX command)
MGET Statement: Reading Matrix Data Files (MATRIX-END MATRIX command)
MSAVE Statement: Writing Matrix Data Files (MATRIX-END MATRIX command)
DISPLAY Statement (MATRIX-END MATRIX command)
RELEASE Statement (MATRIX-END MATRIX command)
Macros Using the Matrix Language (MATRIX-END MATRIX command)


PRINT Statement (MATRIX-END MATRIX command)

PRINT (statement),PRINT (statement),PRINT (statement)
MATRIX command,MATRIX command,MATRIX command
MATRIX (command),MATRIX (command),MATRIX (command)
PRINT statement,PRINT statement,PRINT statement
matrix language,matrix language,matrix language
displaying results,displaying results,displaying results

The PRINT statement displays matrices or matrix expressions. Its syntax is as follows:

PRINT [matrix expression]
      [/FORMAT="format descriptor"]
      [/TITLE="title"]
      [/SPACE={NEWPAGE}]
              {n      }
      [{/RLABELS=list of quoted names}]
       {/RNAMES=vector of names      }

      [{/CLABELS=list of quoted names}]
       {/CNAMES=vector of names      }

Related Topics

MATRIX-END MATRIX
Overview (MATRIX-END MATRIX command)
Terminology (MATRIX-END MATRIX command)
Matrix Variables (MATRIX-END MATRIX command)
Syntax of Matrix Language (MATRIX-END MATRIX command)
Matrix Operations (MATRIX-END MATRIX command)
MATRIX and Other Commands (MATRIX-END MATRIX command)
MATRIX and END MATRIX Commands (MATRIX-END MATRIX command)
COMPUTE Statement (MATRIX-END MATRIX command)
CALL Statement (MATRIX-END MATRIX command)
Matrix Control Structures (MATRIX-END MATRIX command)
READ Statement: Reading Character Data (MATRIX-END MATRIX command)
WRITE Statement: Writing Character Data (MATRIX-END MATRIX command)
GET Statement: Reading PASW Statistics Data Files (MATRIX-END MATRIX command)
SAVE Statement: Writing PASW Statistics Data Files (MATRIX-END MATRIX command)
MGET Statement: Reading Matrix Data Files (MATRIX-END MATRIX command)
MSAVE Statement: Writing Matrix Data Files (MATRIX-END MATRIX command)
DISPLAY Statement (MATRIX-END MATRIX command)
RELEASE Statement (MATRIX-END MATRIX command)
Macros Using the Matrix Language (MATRIX-END MATRIX command)
Matrix Expression (MATRIX-END MATRIX command)
FORMAT Keyword (MATRIX-END MATRIX command)
TITLE Keyword (MATRIX-END MATRIX command)
SPACE Keyword (MATRIX-END MATRIX command)
RLABELS Keyword (MATRIX-END MATRIX command)
RNAMES Keyword (MATRIX-END MATRIX command)
CLABELS Keyword (MATRIX-END MATRIX command)
CNAMES Keyword (MATRIX-END MATRIX command)
Scaling Factor in Displays (MATRIX-END MATRIX command)


Matrix Expression (MATRIX-END MATRIX command)

Matrix expression is a single matrix variable name or an expression that evaluates to a matrix. PRINT displays the specified matrix.

• The matrix specification must precede any other specifications on the PRINT statement. If no matrix is specified, no data will be displayed, but the TITLE and SPACE specifications will be honored.

• You can specify a matrix name, a matrix raised to a power, or a matrix function (with its arguments in parentheses) by itself, but you must enclose other matrix expressions in parentheses. For example, PRINT A, PRINT INV(A), and PRINT B**DET(T(C)*D) are all legal, but PRINT A+B is not. You must specify PRINT (A+B).

• Constant expressions are allowed.

• A matrix program can consist entirely of PRINT statements, without defining any matrix variables.

Related Topics

PRINT Statement (MATRIX-END MATRIX command)
FORMAT Keyword (MATRIX-END MATRIX command)
TITLE Keyword (MATRIX-END MATRIX command)
SPACE Keyword (MATRIX-END MATRIX command)
RLABELS Keyword (MATRIX-END MATRIX command)
RNAMES Keyword (MATRIX-END MATRIX command)
CLABELS Keyword (MATRIX-END MATRIX command)
CNAMES Keyword (MATRIX-END MATRIX command)
Scaling Factor in Displays (MATRIX-END MATRIX command)


FORMAT Keyword (MATRIX-END MATRIX command)

FORMAT specifies a single format descriptor for display of the matrix data.

• All matrix elements are displayed with the same format.

• You can use any printable numeric format (for numeric matrices) or string format (for string matrices) as defined in FORMATS.

• The matrix processor will choose a suitable numeric format if you omit the FORMAT specification, but a string format such as A8 is essential when displaying a matrix containing string data.

• String values exceeding the width of a string format are truncated.

• See Scaling Factor in Displays (MATRIX-END MATRIX command) for default formatting of matrices containing large or small values.

Related Topics

PRINT Statement (MATRIX-END MATRIX command)
Matrix Expression (MATRIX-END MATRIX command)
TITLE Keyword (MATRIX-END MATRIX command)
SPACE Keyword (MATRIX-END MATRIX command)
RLABELS Keyword (MATRIX-END MATRIX command)
RNAMES Keyword (MATRIX-END MATRIX command)
CLABELS Keyword (MATRIX-END MATRIX command)
CNAMES Keyword (MATRIX-END MATRIX command)
Scaling Factor in Displays (MATRIX-END MATRIX command)


TITLE Keyword (MATRIX-END MATRIX command)

TITLE (keyword),TITLE (keyword),TITLE (keyword)
MATRIX command,MATRIX command,MATRIX command

TITLE specifies a title for the matrix displayed. The title must be enclosed in quotes. If it exceeds the maximum display width, it is truncated. The slash preceding TITLE is required, even if it is the only specification on the PRINT statement. If you omit the TITLE specification, the matrix name or expression from the PRINT statement is used as a default title.

Related Topics

PRINT Statement (MATRIX-END MATRIX command)
Matrix Expression (MATRIX-END MATRIX command)
FORMAT Keyword (MATRIX-END MATRIX command)
SPACE Keyword (MATRIX-END MATRIX command)
RLABELS Keyword (MATRIX-END MATRIX command)
RNAMES Keyword (MATRIX-END MATRIX command)
CLABELS Keyword (MATRIX-END MATRIX command)
CNAMES Keyword (MATRIX-END MATRIX command)
Scaling Factor in Displays (MATRIX-END MATRIX command)


SPACE Keyword (MATRIX-END MATRIX command)

SPACE (keyword),SPACE (keyword),SPACE (keyword)
MATRIX command,MATRIX command,MATRIX command

SPACE controls output spacing before printing the title and the matrix. You can specify either a positive number or the keyword NEWPAGE. The slash preceding SPACE is required, even if it is the only specification on the PRINT statement.

NEWPAGE | Start a new page before printing the title.
n | Skip n lines before displaying the title.

Related Topics

PRINT Statement (MATRIX-END MATRIX command)
Matrix Expression (MATRIX-END MATRIX command)
FORMAT Keyword (MATRIX-END MATRIX command)
TITLE Keyword (MATRIX-END MATRIX command)
RLABELS Keyword (MATRIX-END MATRIX command)
RNAMES Keyword (MATRIX-END MATRIX command)
CLABELS Keyword (MATRIX-END MATRIX command)
CNAMES Keyword (MATRIX-END MATRIX command)
Scaling Factor in Displays (MATRIX-END MATRIX command)


RLABELS Keyword (MATRIX-END MATRIX command)

RLABELS (keyword),RLABELS (keyword),RLABELS (keyword)
MATRIX command,MATRIX command,MATRIX command

RLABELS allows you to supply row labels for the matrix.

• The labels must be separated by commas.

• Enclose individual labels in quotes if they contain embedded commas or if you want to preserve lowercase letters. Otherwise, quotes are optional.

• If too many names are supplied, the extras are ignored. If not enough names are supplied, the last rows remain unlabeled.

Related Topics

PRINT Statement (MATRIX-END MATRIX command)
Matrix Expression (MATRIX-END MATRIX command)
FORMAT Keyword (MATRIX-END MATRIX command)
TITLE Keyword (MATRIX-END MATRIX command)
SPACE Keyword (MATRIX-END MATRIX command)
RNAMES Keyword (MATRIX-END MATRIX command)
CLABELS Keyword (MATRIX-END MATRIX command)
CNAMES Keyword (MATRIX-END MATRIX command)
Scaling Factor in Displays (MATRIX-END MATRIX command)


RNAMES Keyword (MATRIX-END MATRIX command)

RNAMES (keyword),RNAMES (keyword),RNAMES (keyword)
MATRIX command,MATRIX command,MATRIX command

RNAMES allows you to supply the name of a vector or a vector expression containing row labels for the matrix.

• Either a row vector or a column vector can be used, but the vector must contain string data.

• If too many names are supplied, the extras are ignored. If not enough names are supplied, the last rows remain unlabeled.

Related Topics

PRINT Statement (MATRIX-END MATRIX command)
Matrix Expression (MATRIX-END MATRIX command)
FORMAT Keyword (MATRIX-END MATRIX command)
TITLE Keyword (MATRIX-END MATRIX command)
SPACE Keyword (MATRIX-END MATRIX command)
RLABELS Keyword (MATRIX-END MATRIX command)
CLABELS Keyword (MATRIX-END MATRIX command)
CNAMES Keyword (MATRIX-END MATRIX command)
Scaling Factor in Displays (MATRIX-END MATRIX command)


CLABELS Keyword (MATRIX-END MATRIX command)

CLABELS (keyword),CLABELS (keyword),CLABELS (keyword)
MATRIX command,MATRIX command,MATRIX command

CLABELS allows you to supply column labels for the matrix.

• The labels must be separated by commas.

• Enclose individual labels in quotes if they contain embedded commas or if you want to preserve lowercase letters. Otherwise, quotes are optional.

• If too many names are supplied, the extras are ignored. If not enough names are supplied, the last columns remain unlabeled.

Related Topics

PRINT Statement (MATRIX-END MATRIX command)
Matrix Expression (MATRIX-END MATRIX command)
FORMAT Keyword (MATRIX-END MATRIX command)
TITLE Keyword (MATRIX-END MATRIX command)
SPACE Keyword (MATRIX-END MATRIX command)
RLABELS Keyword (MATRIX-END MATRIX command)
RNAMES Keyword (MATRIX-END MATRIX command)
CNAMES Keyword (MATRIX-END MATRIX command)
Scaling Factor in Displays (MATRIX-END MATRIX command)


CNAMES Keyword (MATRIX-END MATRIX command)

CNAMES (keyword),CNAMES (keyword),CNAMES (keyword)
MATRIX command,MATRIX command,MATRIX command

CNAMES allows you to supply the name of a vector or a vector expression containing column labels for the matrix.

• Either a row vector or a column vector can be used, but the vector must contain string data.

• If too many names are supplied, the extras are ignored. If not enough names are supplied, the last columns remain unlabeled.

Related Topics

PRINT Statement (MATRIX-END MATRIX command)
Matrix Expression (MATRIX-END MATRIX command)
FORMAT Keyword (MATRIX-END MATRIX command)
TITLE Keyword (MATRIX-END MATRIX command)
SPACE Keyword (MATRIX-END MATRIX command)
RLABELS Keyword (MATRIX-END MATRIX command)
RNAMES Keyword (MATRIX-END MATRIX command)
CLABELS Keyword (MATRIX-END MATRIX command)
Scaling Factor in Displays (MATRIX-END MATRIX command)


Scaling Factor in Displays (MATRIX-END MATRIX command)

When a matrix contains very large or very small numbers, it may be necessary to use scientific notation to display the data. If you do not specify a display format, the matrix processor chooses a power-of-10 multiplier that will allow the largest value to be displayed, and it displays this multiplier on a heading line before the data. The multiplier is not displayed for each element in the matrix. The displayed values, multiplied by the power of 10 that is indicated in the heading, equal the actual values (possibly rounded).

• Values that are very small, relative to the multiplier, are displayed as 0.

• If you explicitly specify a scientific-notation format (Ew.d), each matrix element is displayed using that format. This permits you to display very large and very small numbers in the same matrix without losing precision.

Example

COMPUTE M = {.0000000001357, 2.468, 3690000000}.
PRINT M /TITLE "Default format".
PRINT M /FORMAT "E13" /TITLE "Explicit exponential format".

• The first PRINT subcommand uses the default format with 109 as the multiplier for each element of the matrix. This results in the following output:

Note that the first element is displayed as 0 and the second is rounded to one significant digit.

• An explicitly specified exponential format on the second PRINT subcommand allows each element to be displayed with full precision, as the following output shows:

Related Topics

PRINT Statement (MATRIX-END MATRIX command)
Matrix Expression (MATRIX-END MATRIX command)
FORMAT Keyword (MATRIX-END MATRIX command)
TITLE Keyword (MATRIX-END MATRIX command)
SPACE Keyword (MATRIX-END MATRIX command)
RLABELS Keyword (MATRIX-END MATRIX command)
RNAMES Keyword (MATRIX-END MATRIX command)
CLABELS Keyword (MATRIX-END MATRIX command)
CNAMES Keyword (MATRIX-END MATRIX command)


Matrix Control Structures (MATRIX-END MATRIX command)

DO IF (statement),DO IF (statement),DO IF (statement)
MATRIX command,MATRIX command,MATRIX command
MATRIX (command),MATRIX (command),MATRIX (command)
DO IF statement,DO IF statement,DO IF statement
matrix language,matrix language,matrix language
control structures,control structures,control structures

The matrix language includes two structures that allow you to alter the flow of control within a matrix program.

• The DO IF statement tests a logical expression to determine whether one or more subsequent matrix statements should be executed.

• The LOOP statement defines the beginning of a block of matrix statements that should be executed repeatedly until a termination criterion is satisfied or a BREAK statement is executed.

These statements closely resemble the DO IF and LOOP commands in the PASW Statistics transformation language. In particular, these structures can be nested within one another as deeply as the available memory allows.

Related Topics

MATRIX-END MATRIX
Overview (MATRIX-END MATRIX command)
Terminology (MATRIX-END MATRIX command)
Matrix Variables (MATRIX-END MATRIX command)
Syntax of Matrix Language (MATRIX-END MATRIX command)
Matrix Operations (MATRIX-END MATRIX command)
MATRIX and Other Commands (MATRIX-END MATRIX command)
MATRIX and END MATRIX Commands (MATRIX-END MATRIX command)
COMPUTE Statement (MATRIX-END MATRIX command)
CALL Statement (MATRIX-END MATRIX command)
PRINT Statement (MATRIX-END MATRIX command)
READ Statement: Reading Character Data (MATRIX-END MATRIX command)
WRITE Statement: Writing Character Data (MATRIX-END MATRIX command)
GET Statement: Reading PASW Statistics Data Files (MATRIX-END MATRIX command)
SAVE Statement: Writing PASW Statistics Data Files (MATRIX-END MATRIX command)
MGET Statement: Reading Matrix Data Files (MATRIX-END MATRIX command)
MSAVE Statement: Writing Matrix Data Files (MATRIX-END MATRIX command)
DISPLAY Statement (MATRIX-END MATRIX command)
RELEASE Statement (MATRIX-END MATRIX command)
Macros Using the Matrix Language (MATRIX-END MATRIX command)
DO IF Structures (MATRIX-END MATRIX command)
LOOP Structures (MATRIX-END MATRIX command)
Index Clause on the LOOP Statement (MATRIX-END MATRIX command)
IF Clause on the LOOP Statement (MATRIX-END MATRIX command)
IF Clause on the END LOOP Statement (MATRIX-END MATRIX command)
BREAK Statement (MATRIX-END MATRIX command)


DO IF Structures (MATRIX-END MATRIX command)

ELSE IF (statement),ELSE IF (statement),ELSE IF (statement)
MATRIX command,MATRIX command,MATRIX command
ELSE (statement),ELSE (statement),ELSE (statement)
MATRIX command,MATRIX command,MATRIX command
END IF (statement),END IF (statement),END IF (statement)
MATRIX command,MATRIX command,MATRIX command
MATRIX (command),MATRIX (command),MATRIX (command)
ELSE IF statement,ELSE IF statement,ELSE IF statement
MATRIX (command),MATRIX (command),MATRIX (command)
ELSE statement,ELSE statement,ELSE statement
MATRIX (command),MATRIX (command),MATRIX (command)
END IF statement,END IF statement,END IF statement

A DO IF structure in a matrix program affects the flow of control exactly as the analogous commands affect a transformation program, except that missing-value considerations do not arise in a matrix program. The syntax of the DO IF structure is as follows:

DO IF [(]logical expression[)]

  matrix statements

[ELSE IF [(]logical expression[)]]

  matrix statements

[ELSE IF...]

  .
  .
  .

[ELSE]

 matrix statements

END IF.

• The DO IF statement marks the beginning of the structure, and the END IF statement marks its end.

• The ELSE IF statement is optional and can be repeated as many times as desired within the structure.

• The ELSE statement is optional. It can be used only once and must follow any ELSE IF statements.

• The END IF statement must follow any ELSE IF and ELSE statements.

• The DO IF and ELSE IF statements must contain a logical expression, normally one involving the relational operators EQ, GT, and so on. However, the matrix language allows any expression that evaluates to a scalar to be used as the logical expression. Scalars greater than 0 are considered true, and scalars less than or equal to 0 are considered false.

A DO IF structure affects the flow of control within a matrix program as follows:

• If the logical expression on the DO IF statement is true, the statements immediately following the DO IF are executed up to the next ELSE IF or ELSE in the structure. Control then passes to the first statement following the END IF for that structure.

• If the expression on the DO IF statement is false, control passes to the first ELSE IF, where the logical expression is evaluated. If this expression is true, statements following the ELSE IF are executed up to the next ELSE IF or ELSE statement, and control passes to the first statement following the END IF for that structure.

• If the expressions on the DO IF and the first ELSE IF statements are both false, control passes to the next ELSE IF, where that logical expression is evaluated. If none of the expressions is true on any of the ELSE IF statements, statements following the ELSE statement are executed up to the END IF statement, and control falls out of the structure.

• If none of the expressions on the DO IF statement or the ELSE IF statements is true and there is no ELSE statement, control passes to the first statement following the END IF for that structure.

Related Topics

Matrix Control Structures (MATRIX-END MATRIX command)
LOOP Structures (MATRIX-END MATRIX command)
Index Clause on the LOOP Statement (MATRIX-END MATRIX command)
IF Clause on the LOOP Statement (MATRIX-END MATRIX command)
IF Clause on the END LOOP Statement (MATRIX-END MATRIX command)
BREAK Statement (MATRIX-END MATRIX command)


LOOP Structures (MATRIX-END MATRIX command)

LOOP (statement),LOOP (statement),LOOP (statement)
MATRIX command,MATRIX command,MATRIX command
MATRIX (command),MATRIX (command),MATRIX (command)
LOOP statement,LOOP statement,LOOP statement
END LOOP (statement),END LOOP (statement),END LOOP (statement)
MATRIX command,MATRIX command,MATRIX command
MATRIX (command),MATRIX (command),MATRIX (command)
END LOOP statement,END LOOP statement,END LOOP statement
increment value,increment value,increment value
in matrix loop structures,in matrix loop structures,in matrix loop structures
indexing clause,indexing clause,indexing clause
in matrix loop structures,in matrix loop structures,in matrix loop structures
indexing variable,indexing variable,indexing variable
in matrix loop structures,in matrix loop structures,in matrix loop structures
initial value,initial value,initial value
in matrix loop structures,in matrix loop structures,in matrix loop structures

A LOOP structure in a matrix program affects the flow of control exactly as the analogous commands affect transformation program, except that missing-value considerations do not arise in a matrix program. Its syntax is as follows:

LOOP [varname=n TO m [BY k]] [IF [(]logical expression[)]

matrix statements

[BREAK]

matrix statements

END LOOP [IF [(]logical expression[)]]

The matrix statements specified between LOOP and END LOOP are executed repeatedly until one of the following conditions is met:

• A logical expression on the IF clause of the LOOP statement is evaluated as false.

• An index variable used on the LOOP statement passes beyond its terminal value.

• A logical expression on the IF clause of the END LOOP statement is evaluated as true.

• A BREAK statement is executed within the loop structure (but outside of any nested loop structures).

Note: Unlike the LOOP command (outside the matrix language), the index value of a matrix LOOP structure does not override the maximum number of loops controlled by SET MXLOOPS. You must explicitly set the MXLOOPS value to a value high enough to accommodate the index value. See the topic MXLOOPS Subcommand (SET command) for more information.

Related Topics

Matrix Control Structures (MATRIX-END MATRIX command)
DO IF Structures (MATRIX-END MATRIX command)
Index Clause on the LOOP Statement (MATRIX-END MATRIX command)
IF Clause on the LOOP Statement (MATRIX-END MATRIX command)
IF Clause on the END LOOP Statement (MATRIX-END MATRIX command)
BREAK Statement (MATRIX-END MATRIX command)


Index Clause on the LOOP Statement (MATRIX-END MATRIX command)

An index clause on a LOOP statement creates an index variable whose name is specified immediately after the keyword LOOP. The variable is assigned an initial value of n. Each time through the loop, the variable is tested against the terminal value m and incremented by the increment value k if k is specified or by 1 if k is not specified. When the index variable is greater than m for positive increments or less than m for negative increments, control passes to the statement after the END LOOP statement.

• Both the index clause and the IF clause are optional. If both are present, the index clause must appear first.

• The index variable must be scalar with a valid matrix variable name.

• The initial value, n, the terminal value, m, and the increment, k (if present), must be scalars or matrix expressions evaluating to scalars. Non-integer values are truncated to integers before use.

• If the keyword BY and the increment k are absent, an increment of 1 is used.

Related Topics

Matrix Control Structures (MATRIX-END MATRIX command)
DO IF Structures (MATRIX-END MATRIX command)
LOOP Structures (MATRIX-END MATRIX command)
IF Clause on the LOOP Statement (MATRIX-END MATRIX command)
IF Clause on the END LOOP Statement (MATRIX-END MATRIX command)
BREAK Statement (MATRIX-END MATRIX command)


IF Clause on the LOOP Statement (MATRIX-END MATRIX command)

The logical expression is evaluated before each iteration of the loop structure. If it is false, the loop terminates and control passes to the statement after END LOOP.

• The IF clause is optional. If both the index clause and the IF clause are present, the index clause must appear first.

• As in the DO IF structure, the logical expression of the IF clause is evaluated as scalar, with positive values being treated as true and 0 or negative values, as false.

Related Topics

Matrix Control Structures (MATRIX-END MATRIX command)
DO IF Structures (MATRIX-END MATRIX command)
LOOP Structures (MATRIX-END MATRIX command)
Index Clause on the LOOP Statement (MATRIX-END MATRIX command)
IF Clause on the END LOOP Statement (MATRIX-END MATRIX command)
BREAK Statement (MATRIX-END MATRIX command)


IF Clause on the END LOOP Statement (MATRIX-END MATRIX command)

When an IF clause is present on an END LOOP statement, the logical expression is evaluated after each iteration of the loop structure. If it is true, the loop terminates and control passes to the statement following the END LOOP statement.

• The IF clause is optional.

BREAK (statement),BREAK (statement),BREAK (statement)
MATRIX command,MATRIX command,MATRIX command
MATRIX (command),MATRIX (command),MATRIX (command)
BREAK statement,BREAK statement,BREAK statement

• As in the LOOP statement, the logical expression of the IF clause is evaluated as scalar, with positive values being treated as true and 0 or negative values, as false.

Related Topics

Matrix Control Structures (MATRIX-END MATRIX command)
DO IF Structures (MATRIX-END MATRIX command)
LOOP Structures (MATRIX-END MATRIX command)
Index Clause on the LOOP Statement (MATRIX-END MATRIX command)
IF Clause on the LOOP Statement (MATRIX-END MATRIX command)
BREAK Statement (MATRIX-END MATRIX command)


BREAK Statement (MATRIX-END MATRIX command)

The BREAK statement within a loop structure transfers control immediately to the statement following the (next) END LOOP statement. It is normally placed within a DO IF structure inside the LOOP structure to exit the loop when the specified conditions are met.

Example

LOOP LOCATION = 1, NROW(VEC).
+  DO IF (VEC(LOCATION) = TARGET).
+     BREAK.

+  END IF.
END LOOP.

• This loop searches for the (first) location of a specific value, TARGET, in a vector, VEC.

• The DO IF statement checks whether the vector element indexed by LOCATION equals the target.

• If so, the BREAK statement transfers control out of the loop, leaving LOCATION as the index of TARGET in VEC.

Related Topics

Matrix Control Structures (MATRIX-END MATRIX command)
DO IF Structures (MATRIX-END MATRIX command)
LOOP Structures (MATRIX-END MATRIX command)
Index Clause on the LOOP Statement (MATRIX-END MATRIX command)
IF Clause on the LOOP Statement (MATRIX-END MATRIX command)
IF Clause on the END LOOP Statement (MATRIX-END MATRIX command)


READ Statement: Reading Character Data (MATRIX-END MATRIX command)

READ (statement),READ (statement),READ (statement)
MATRIX command,MATRIX command,MATRIX command
MATRIX (command),MATRIX (command),MATRIX (command)
READ statement,READ statement,READ statement
matrix language,matrix language,matrix language
reading text files,reading text files,reading text files

The READ statement reads data into a matrix or submatrix from a character-format file--that is, a file containing ordinary numbers or words in readable form. The syntax for the READ statement is:

READ  variable reference
  [/FILE = file reference]
   /FIELD = c1 TO c2 [BY w]
  [/SIZE = size expression]
  [/MODE = {RECTANGULAR}]
           {SYMMETRIC  }
  [/REREAD]
  [/FORMAT = format descriptor]

• The file can contain values in freefield or fixed-column format. The data can appear in any of the field formats supported by DATA LIST.

• More than one matrix can be read from a single input record by rereading the record.

• If the end of the file is encountered during a READ operation (that is, fewer values are available than the number of elements required by the specified matrix size), a warning message is displayed and the contents of the unread elements of the matrix are unpredictable.

Related Topics

MATRIX-END MATRIX
Overview (MATRIX-END MATRIX command)
Terminology (MATRIX-END MATRIX command)
Matrix Variables (MATRIX-END MATRIX command)
Syntax of Matrix Language (MATRIX-END MATRIX command)
Matrix Operations (MATRIX-END MATRIX command)
MATRIX and Other Commands (MATRIX-END MATRIX command)
MATRIX and END MATRIX Commands (MATRIX-END MATRIX command)
COMPUTE Statement (MATRIX-END MATRIX command)
CALL Statement (MATRIX-END MATRIX command)
PRINT Statement (MATRIX-END MATRIX command)
Matrix Control Structures (MATRIX-END MATRIX command)
WRITE Statement: Writing Character Data (MATRIX-END MATRIX command)
GET Statement: Reading PASW Statistics Data Files (MATRIX-END MATRIX command)
SAVE Statement: Writing PASW Statistics Data Files (MATRIX-END MATRIX command)
MGET Statement: Reading Matrix Data Files (MATRIX-END MATRIX command)
MSAVE Statement: Writing Matrix Data Files (MATRIX-END MATRIX command)
DISPLAY Statement (MATRIX-END MATRIX command)
RELEASE Statement (MATRIX-END MATRIX command)
Macros Using the Matrix Language (MATRIX-END MATRIX command)
Variable Specification (MATRIX-END MATRIX command)
FILE Specification (MATRIX-END MATRIX command)
FIELD Specification (MATRIX-END MATRIX command)
SIZE Specification (MATRIX-END MATRIX command)
MODE Specification (MATRIX-END MATRIX command)
REREAD Specification (MATRIX-END MATRIX command)
FORMAT Specification (MATRIX-END MATRIX command)


Variable Specification (MATRIX-END MATRIX command)

The variable reference on the READ statement is a matrix variable name, with or without indexes.

For a name without indexes:

• READ creates the specified matrix variable.

• The matrix need not exist when READ is executed.

• If the matrix already exists, it is replaced by the matrix read from the file.

• You must specify the size of the matrix using the SIZE specification.

For an indexed name:

• READ creates a submatrix from an existing matrix.

• The matrix variable named must already exist.

• You can define any submatrix with indexes; for example, M(:,I). To define an entire existing matrix, specify M(:,:).

• The SIZE specification can be omitted. If specified, its value must match the size of the specified submatrix.

Related Topics

READ Statement: Reading Character Data (MATRIX-END MATRIX command)
FILE Specification (MATRIX-END MATRIX command)
FIELD Specification (MATRIX-END MATRIX command)
SIZE Specification (MATRIX-END MATRIX command)
MODE Specification (MATRIX-END MATRIX command)
REREAD Specification (MATRIX-END MATRIX command)
FORMAT Specification (MATRIX-END MATRIX command)


FILE Specification (MATRIX-END MATRIX command)

FILE (keyword),FILE (keyword),FILE (keyword)
MATRIX command,MATRIX command,MATRIX command

FILE designates the character file containing the data. It can be an actual filename in quotes, or a file handle defined on a FILE HANDLE command that precedes the matrix program.

• The filename or handle must specify an existing file containing character data, not a data file in PASW Statistics format or a specially formatted file of another kind, such as a spreadsheet file.

• The FILE specification is required on the first READ statement in a matrix program (first in order of appearance, not necessarily in order of execution). If you omit the FILE specification from a later READ statement, the statement uses the most recently named file (in order of appearance) on a READ statement in the same matrix program.

Related Topics

READ Statement: Reading Character Data (MATRIX-END MATRIX command)
Variable Specification (MATRIX-END MATRIX command)
FIELD Specification (MATRIX-END MATRIX command)
SIZE Specification (MATRIX-END MATRIX command)
MODE Specification (MATRIX-END MATRIX command)
REREAD Specification (MATRIX-END MATRIX command)
FORMAT Specification (MATRIX-END MATRIX command)


FIELD Specification (MATRIX-END MATRIX command)

FIELD (keyword),FIELD (keyword),FIELD (keyword)
MATRIX command,MATRIX command,MATRIX command

FIELD specifies the column positions of a fixed-format record where the data for matrix elements are located.

• The FIELD specification is required.

• Startcol is the number of the leftmost column of the input area.

• Endcol is the number of the rightmost column of the input area.

• Both startcol and endcol are required and both must be constants. For example, FIELD = 9 TO 72 specifies that values to be read appear between columns 9 and 72 (inclusive) of each input record.

• The BY clause, if present, indicates that each value appears within a fixed set of columns on the input record; that is, one value is separated from the next by its column position rather than by a space or comma. Width is the width of the area designated for each value. For example, FIELD = 1 TO 80 BY 10 indicates that there are eight possible values per record and that one will appear between columns 1 and 10 (inclusive), another between columns 11 and 20, and so on, up to columns 71 and 80. The BY value must evenly divide the length of the field. That is, endcol-startcol+1 must be a multiple of the width.

• You can use the FORMAT specification to supply the same information as the BY clause of the FIELD specification. If you omit the BY clause and do not specify a format on the FORMAT specification, READ assumes that values are separated by blanks or commas within the designated field.

Related Topics

READ Statement: Reading Character Data (MATRIX-END MATRIX command)
Variable Specification (MATRIX-END MATRIX command)
FILE Specification (MATRIX-END MATRIX command)
SIZE Specification (MATRIX-END MATRIX command)
MODE Specification (MATRIX-END MATRIX command)
REREAD Specification (MATRIX-END MATRIX command)
FORMAT Specification (MATRIX-END MATRIX command)


SIZE Specification (MATRIX-END MATRIX command)

SIZE (keyword),SIZE (keyword),SIZE (keyword)
MATRIX command,MATRIX command,MATRIX command

The SIZE specification is a matrix expression that, when evaluated, specifies the size of the matrix to be read.

• The expression should evaluate to a two-element row or column vector. The first element designates the number of rows in the matrix to be read; the second element gives the number of columns.

• Values of the SIZE specification are truncated to integers if necessary.

• The size expression may be a constant, such as {5;5}, or a matrix variable name, such as MSIZE, or any valid expression, such as INFO(1,:).

• If you use a scalar as the size expression, a column vector containing that number of rows is read. Thus, SIZE=1 reads a scalar, and SIZE=3 reads a 3 × 1 column vector.

You must include a SIZE specification whenever you name an entire matrix (rather than a submatrix) on the READ statement. If you specify a submatrix, the SIZE specification is optional but, if included, must agree with the size of the specified submatrix.

Related Topics

READ Statement: Reading Character Data (MATRIX-END MATRIX command)
Variable Specification (MATRIX-END MATRIX command)
FILE Specification (MATRIX-END MATRIX command)
FIELD Specification (MATRIX-END MATRIX command)
MODE Specification (MATRIX-END MATRIX command)
REREAD Specification (MATRIX-END MATRIX command)
FORMAT Specification (MATRIX-END MATRIX command)


MODE Specification (MATRIX-END MATRIX command)

MODE (keyword),MODE (keyword),MODE (keyword)
MATRIX command,MATRIX command,MATRIX command

MODE specifies the format of the matrix to be read in. It can be either rectangular or symmetric. If the MODE specification is omitted, the default is RECTANGULAR.

RECTANGULAR | Matrix is completely represented in file. Each row begins on a new record, and all entries in that row are present on that and (possibly) succeeding records. This is the default if the MODE specification is omitted.
SYMMETRIC | Elements of the matrix below the main diagonal are the same as those above it. Only matrix elements on and below the main diagonal are read; elements above the diagonal are set equal to the corresponding symmetric elements below the diagonal. Each row is read beginning on a new record, although it may span more than one record. Only a single value is read from the first record, two values are read from the second, and so on.

• If SYMMETRIC is specified, the matrix processor first checks that the number of rows and the number of columns are the same. If the numbers, specified either on SIZE or on the variable reference, are not the same, an error message is displayed and the command is not executed.

Related Topics

READ Statement: Reading Character Data (MATRIX-END MATRIX command)
Variable Specification (MATRIX-END MATRIX command)
FILE Specification (MATRIX-END MATRIX command)
FIELD Specification (MATRIX-END MATRIX command)
SIZE Specification (MATRIX-END MATRIX command)
REREAD Specification (MATRIX-END MATRIX command)
FORMAT Specification (MATRIX-END MATRIX command)


REREAD Specification (MATRIX-END MATRIX command)

REREAD (keyword),REREAD (keyword),REREAD (keyword)
MATRIX command,MATRIX command,MATRIX command

The REREAD specification indicates that the current READ statement should begin with the last record read by a previous READ statement.

• REREAD has no further specifications.

• REREAD cannot be used on the first READ statement to read from a file.

• If you omit REREAD, the READ statement begins with the first record following the last one read by the previous READ statement.

• The REREAD specification is ignored on the first READ statement following a call to the EOF function for the same file.

Related Topics

READ Statement: Reading Character Data (MATRIX-END MATRIX command)
Variable Specification (MATRIX-END MATRIX command)
FILE Specification (MATRIX-END MATRIX command)
FIELD Specification (MATRIX-END MATRIX command)
SIZE Specification (MATRIX-END MATRIX command)
MODE Specification (MATRIX-END MATRIX command)
FORMAT Specification (MATRIX-END MATRIX command)


FORMAT Specification (MATRIX-END MATRIX command)

FORMAT (keyword),FORMAT (keyword),FORMAT (keyword)
MATRIX command,MATRIX command,MATRIX command

FORMAT specifies how the matrix processor should interpret the input data. The format descriptor can be any valid PASW Statistics data format, such as F6, E12.2, or A6, or it can be a type code; for example, F, E, or A.

• If you omit the FORMAT specification, the default is F.

• You can specify the width of fixed-size data fields with either a FORMAT specification or a BY clause on a FIELD specification. You can include it in both places only if you specify the same value.

• If you do not include either a FORMAT or a BY clause on FIELD, READ expects values separated by blanks or commas.

• An additional way of specifying the width is to supply a repetition factor without a width (for example, 10F, 5COMMA, or 3E). The field width is then calculated by dividing the width of the whole input area on the FIELD specification by the repetition factor. A format with a digit for the repetition factor must be enclosed in quotes.

• Only one format can be specified. A specification such as FORMAT='5F2.0 3F3.0 F2.0' is invalid.

Related Topics

READ Statement: Reading Character Data (MATRIX-END MATRIX command)
Variable Specification (MATRIX-END MATRIX command)
FILE Specification (MATRIX-END MATRIX command)
FIELD Specification (MATRIX-END MATRIX command)
SIZE Specification (MATRIX-END MATRIX command)
MODE Specification (MATRIX-END MATRIX command)
REREAD Specification (MATRIX-END MATRIX command)


WRITE Statement: Writing Character Data (MATRIX-END MATRIX command)

WRITE (statement),WRITE (statement),WRITE (statement)
MATRIX command,MATRIX command,MATRIX command
MATRIX (command),MATRIX (command),MATRIX (command)
WRITE statement,WRITE statement,WRITE statement

WRITE writes the value of a matrix expression to an external file. The syntax of the WRITE statement is:

WRITE  matrix expression
   [/OUTFILE = file reference]
    /FIELD = startcol TO endcol [BY width]
   [/MODE = {RECTANGULAR}]
            {TRIANGULAR }
   [/HOLD]
   [/FORMAT = format descriptor]

Related Topics

MATRIX-END MATRIX
Overview (MATRIX-END MATRIX command)
Terminology (MATRIX-END MATRIX command)
Matrix Variables (MATRIX-END MATRIX command)
Syntax of Matrix Language (MATRIX-END MATRIX command)
Matrix Operations (MATRIX-END MATRIX command)
MATRIX and Other Commands (MATRIX-END MATRIX command)
MATRIX and END MATRIX Commands (MATRIX-END MATRIX command)
COMPUTE Statement (MATRIX-END MATRIX command)
CALL Statement (MATRIX-END MATRIX command)
PRINT Statement (MATRIX-END MATRIX command)
Matrix Control Structures (MATRIX-END MATRIX command)
READ Statement: Reading Character Data (MATRIX-END MATRIX command)
GET Statement: Reading PASW Statistics Data Files (MATRIX-END MATRIX command)
SAVE Statement: Writing PASW Statistics Data Files (MATRIX-END MATRIX command)
MGET Statement: Reading Matrix Data Files (MATRIX-END MATRIX command)
MSAVE Statement: Writing Matrix Data Files (MATRIX-END MATRIX command)
DISPLAY Statement (MATRIX-END MATRIX command)
RELEASE Statement (MATRIX-END MATRIX command)
Macros Using the Matrix Language (MATRIX-END MATRIX command)
Matrix Expression Specification (MATRIX-END MATRIX command)
OUTFILE Specification (MATRIX-END MATRIX command)
FIELD Specification (MATRIX-END MATRIX command)
MODE Specification (MATRIX-END MATRIX command)
HOLD Specification (MATRIX-END MATRIX command)
FORMAT Specification (MATRIX-END MATRIX command)


Matrix Expression Specification (MATRIX-END MATRIX command)

Specify any matrix expression that evaluates to the value(s) to be written.

• The matrix specification must precede any other specifications on the WRITE statement.

• You can specify a matrix name, a matrix raised to a power, or a matrix function (with its arguments in parentheses) by itself, but you must enclose other matrix expressions in parentheses. For example, WRITE A, WRITE INV(A), or WRITE B**DET(T(C)*D) is legal, but WRITE A+B is not. You must specify WRITE (A+B).

• Constant expressions are allowed.

Related Topics

WRITE Statement: Writing Character Data (MATRIX-END MATRIX command)
OUTFILE Specification (MATRIX-END MATRIX command)
FIELD Specification (MATRIX-END MATRIX command)
MODE Specification (MATRIX-END MATRIX command)
HOLD Specification (MATRIX-END MATRIX command)
FORMAT Specification (MATRIX-END MATRIX command)


OUTFILE Specification (MATRIX-END MATRIX command)

OUTFILE (keyword),OUTFILE (keyword),OUTFILE (keyword)
MATRIX command,MATRIX command,MATRIX command

OUTFILE designates the character file to which the matrix expression is to be written. The file reference can be an actual filename in quotes or a file handle defined on a FILE HANDLE command that precedes the matrix program. The filename or file handle must be a valid file specification.

• The OUTFILE specification is required on the first WRITE statement in a matrix program (first in order of appearance, not necessarily in order of execution).

• If you omit the OUTFILE specification from a later WRITE statement, the statement uses the most recently named file (in order of appearance) on a WRITE statement in the same matrix program.

Related Topics

WRITE Statement: Writing Character Data (MATRIX-END MATRIX command)
Matrix Expression Specification (MATRIX-END MATRIX command)
FIELD Specification (MATRIX-END MATRIX command)
MODE Specification (MATRIX-END MATRIX command)
HOLD Specification (MATRIX-END MATRIX command)
FORMAT Specification (MATRIX-END MATRIX command)


FIELD Specification (MATRIX-END MATRIX command)

FIELD specifies the column positions of a fixed-format record to which the data should be written.

• The FIELD specification is required.

• The start column, c1, is the number of the leftmost column of the output area.

• The end column, c2, is the number of the rightmost column of the output area.

• Both c1 and c2 are required, and both must be constants. For example, FIELD = 9 TO 72 specifies that values should be written between columns 9 and 72 (inclusive) of each output record.

• The BY clause, if present, indicates how many characters should be allocated to the output value of a single matrix element. The value w is the width of the area designated for each value. For example, FIELD = 1 TO 80 BY 10 indicates that up to eight values should be written per record, and that one should go between columns 1 and 10 (inclusive), another between columns 11 and 20, and so on up to columns 71 and 80. The value on the BY clause must evenly divide the length of the field. That is, c2 − c1 + 1 must be a multiple of w.

• You can use the FORMAT specification (see below) to supply the same information as the BY clause. If you omit the BY clause from the FIELD specification and do not specify a format on the FORMAT specification, WRITE uses freefield format, separating matrix elements by single blank spaces.

Related Topics

WRITE Statement: Writing Character Data (MATRIX-END MATRIX command)
Matrix Expression Specification (MATRIX-END MATRIX command)
OUTFILE Specification (MATRIX-END MATRIX command)
MODE Specification (MATRIX-END MATRIX command)
HOLD Specification (MATRIX-END MATRIX command)
FORMAT Specification (MATRIX-END MATRIX command)


MODE Specification (MATRIX-END MATRIX command)

MODE specifies the format of the matrix to be written. If MODE is not specified, the default is RECTANGULAR.

RECTANGULAR | Write the entire matrix. Each row starts a new record, and all of the values in that row are present in that and (possibly) subsequent records. This is the default if the MODE specification is omitted.
TRIANGULAR | Write only the lower triangular entries and the main diagonal. Each row begins a new record and may span more than one record. This mode may save file space.

• A matrix written with MODE = TRIANGULAR must be square, but it need not be symmetric. If it is not, values in the upper triangle are not written.

• A matrix written with MODE = TRIANGULAR may be read with MODE = SYMMETRIC.

Related Topics

WRITE Statement: Writing Character Data (MATRIX-END MATRIX command)
Matrix Expression Specification (MATRIX-END MATRIX command)
OUTFILE Specification (MATRIX-END MATRIX command)
FIELD Specification (MATRIX-END MATRIX command)
HOLD Specification (MATRIX-END MATRIX command)
FORMAT Specification (MATRIX-END MATRIX command)


HOLD Specification (MATRIX-END MATRIX command)

HOLD (keyword),HOLD (keyword),HOLD (keyword)
MATRIX command,MATRIX command,MATRIX command

HOLD causes the last line written by the current WRITE statement to be held so that the next WRITE to that file will write on the same line. Use HOLD to write more than one matrix on a line.

Related Topics

WRITE Statement: Writing Character Data (MATRIX-END MATRIX command)
Matrix Expression Specification (MATRIX-END MATRIX command)
OUTFILE Specification (MATRIX-END MATRIX command)
FIELD Specification (MATRIX-END MATRIX command)
MODE Specification (MATRIX-END MATRIX command)
FORMAT Specification (MATRIX-END MATRIX command)


FORMAT Specification (MATRIX-END MATRIX command)

FORMAT indicates how the internal (binary) values of matrix elements should be converted to character format for output.

• The format descriptor is any valid PASW Statistics data format, such as F6, E12.2, or A6, or it can be a format type code, such as F, E, or A. It specifies how the written data are encoded and, if a width is specified, how wide the fields containing the data are. (See FORMATS for valid formats.)

• If you omit the FORMAT specification, the default is F.

• The data field widths may be specified either here or after BY on the FIELD specification. You may specify the width in both places only if you give the same value.

• An additional way of specifying the width is to supply a repetition factor without a width (for example, 10F or 5COMMA). The field width is then calculated by dividing the width of the whole output area on the FIELD specification by the repetition factor. A format with a digit for the repetition factor must be enclosed in quotes.

• If the field width is not specified in any of these ways, then the freefield format is used--matrix values are written separated by one blank, and each value occupies as many positions as necessary to avoid the loss of precision. Each row of the matrix is written starting with a new output record.

• Only one format descriptor can be specified. Do not try to specify more than one format; for example, '5F2.0 3F3.0 F2.0' is invalid as a FORMAT specification on WRITE.

Related Topics

WRITE Statement: Writing Character Data (MATRIX-END MATRIX command)
Matrix Expression Specification (MATRIX-END MATRIX command)
OUTFILE Specification (MATRIX-END MATRIX command)
FIELD Specification (MATRIX-END MATRIX command)
MODE Specification (MATRIX-END MATRIX command)
HOLD Specification (MATRIX-END MATRIX command)


GET Statement: Reading PASW Statistics Data Files (MATRIX-END MATRIX command)

GET (statement),GET (statement),GET (statement)
MATRIX command,MATRIX command,MATRIX command
MATRIX (command),MATRIX (command),MATRIX (command)
GET statement,GET statement,GET statement

GET reads matrices from an external PASW Statistics data file or from the active dataset. The syntax of GET is as follows:

GET variable reference
  [/FILE={file reference}]
         {*             }
  [/VARIABLES = variable list]
  [/NAMES = names vector]
  [/MISSING = {ACCEPT}]
              {OMIT  }
              {value }
  [/SYSMIS = {OMIT }]
             {value}

Related Topics

MATRIX-END MATRIX
Overview (MATRIX-END MATRIX command)
Terminology (MATRIX-END MATRIX command)
Matrix Variables (MATRIX-END MATRIX command)
Syntax of Matrix Language (MATRIX-END MATRIX command)
Matrix Operations (MATRIX-END MATRIX command)
MATRIX and Other Commands (MATRIX-END MATRIX command)
MATRIX and END MATRIX Commands (MATRIX-END MATRIX command)
COMPUTE Statement (MATRIX-END MATRIX command)
CALL Statement (MATRIX-END MATRIX command)
PRINT Statement (MATRIX-END MATRIX command)
Matrix Control Structures (MATRIX-END MATRIX command)
READ Statement: Reading Character Data (MATRIX-END MATRIX command)
WRITE Statement: Writing Character Data (MATRIX-END MATRIX command)
SAVE Statement: Writing PASW Statistics Data Files (MATRIX-END MATRIX command)
MGET Statement: Reading Matrix Data Files (MATRIX-END MATRIX command)
MSAVE Statement: Writing Matrix Data Files (MATRIX-END MATRIX command)
DISPLAY Statement (MATRIX-END MATRIX command)
RELEASE Statement (MATRIX-END MATRIX command)
Macros Using the Matrix Language (MATRIX-END MATRIX command)
Variable Specification (MATRIX-END MATRIX command)
FILE Specification (MATRIX-END MATRIX command)
VARIABLES Specification (MATRIX-END MATRIX command)
NAMES Specification (MATRIX-END MATRIX command)
MISSING Specification (MATRIX-END MATRIX command)
SYSMIS Specification (MATRIX-END MATRIX command)


Variable Specification (MATRIX-END MATRIX command)

The variable reference on the GET statement is a matrix variable name with or without indexes.

For a name without indexes:

• GET creates the specified matrix variable.

• The size of the matrix is determined by the amount of data read from the PASW Statistics data file or the active dataset.

• If the matrix already exists, it is replaced by the matrix read from the file.

For an indexed name:

• GET creates a submatrix from an existing matrix.

• The matrix variable named must already exist.

• You can define any submatrix with indexes; for example, M(:,I). To define an entire existing matrix, specify M(:,:).

• The indexes, along with the size of the existing matrix, specify completely the size of the submatrix, which must agree with the dimensions of the data read from the PASW Statistics data file.

• The specified submatrix is replaced by the matrix elements read from the PASW Statistics data file.

Related Topics

GET Statement: Reading PASW Statistics Data Files (MATRIX-END MATRIX command)
FILE Specification (MATRIX-END MATRIX command)
VARIABLES Specification (MATRIX-END MATRIX command)
NAMES Specification (MATRIX-END MATRIX command)
MISSING Specification (MATRIX-END MATRIX command)
SYSMIS Specification (MATRIX-END MATRIX command)


FILE Specification (MATRIX-END MATRIX command)

FILE designates the PASW Statistics data file to be read. Use an asterisk, or simply omit the FILE specification, to designate the current active dataset.

• The file reference can be either a filename enclosed in quotes, a previously declared dataset in the current session, or a file handle defined on a FILE HANDLE command that precedes the matrix program.

• If you omit the FILE specification, the active dataset is used.

• In a matrix program executed with the INCLUDE command, if a SPLIT FILE command is in effect, a GET statement that references the active dataset will read a single split-file group of cases. (A matrix program cannot be executed from a syntax window if a SPLIT FILE command is in effect.)

Related Topics

GET Statement: Reading PASW Statistics Data Files (MATRIX-END MATRIX command)
Variable Specification (MATRIX-END MATRIX command)
VARIABLES Specification (MATRIX-END MATRIX command)
NAMES Specification (MATRIX-END MATRIX command)
MISSING Specification (MATRIX-END MATRIX command)
SYSMIS Specification (MATRIX-END MATRIX command)


VARIABLES Specification (MATRIX-END MATRIX command)

VARIABLES (keyword),VARIABLES (keyword),VARIABLES (keyword)
MATRIX command,MATRIX command,MATRIX command

VARIABLES specifies a list of variables to be read from the PASW Statistics data file.

• The keyword TO can be used to reference consecutive variables on the data file.

• The variable list can consist of the keyword ALL to get all the variables in the data file. ALL is the default if the VARIABLES specification is omitted.

• All variables read from the data file should be numeric. If a string variable is specified, a warning message is issued and the string variable is skipped.

Example

GET M /VARIABLES = AGE, RESIDE, INCOME TO HEALTH.

• The variables AGE, RESIDE, and INCOME TO HEALTH from the active dataset will form the columns of the matrix M.

Related Topics

GET Statement: Reading PASW Statistics Data Files (MATRIX-END MATRIX command)
Variable Specification (MATRIX-END MATRIX command)
FILE Specification (MATRIX-END MATRIX command)
NAMES Specification (MATRIX-END MATRIX command)
MISSING Specification (MATRIX-END MATRIX command)
SYSMIS Specification (MATRIX-END MATRIX command)


NAMES Specification (MATRIX-END MATRIX command)

NAMES (keyword),NAMES (keyword),NAMES (keyword)
MATRIX command,MATRIX command,MATRIX command

NAMES specifies a vector to store the variable names from the data file.

• If you omit the NAMES specification, the variable names are not available to the MATRIX procedure.

Related Topics

GET Statement: Reading PASW Statistics Data Files (MATRIX-END MATRIX command)
Variable Specification (MATRIX-END MATRIX command)
FILE Specification (MATRIX-END MATRIX command)
VARIABLES Specification (MATRIX-END MATRIX command)
MISSING Specification (MATRIX-END MATRIX command)
SYSMIS Specification (MATRIX-END MATRIX command)


MISSING Specification (MATRIX-END MATRIX command)

MISSING (keyword),MISSING (keyword),MISSING (keyword)
MATRIX command,MATRIX command,MATRIX command

MISSING specifies how missing values declared for the PASW Statistics data file should be handled.

• The MISSING specification is required if the data file contains missing values for any variable being read.

• If you omit the MISSING specification and a missing value is encountered for a variable being read, an error message is displayed and the GET statement is not executed.

The following keywords are available on the MISSING specification. There is no default.

ACCEPT | Accept user-missing values for entry. If the system-missing value exists for a variable to be read, you must specify SYSMIS to indicate how the system-missing value should be handled.
OMIT | Skip an entire observation when a variable with a missing value is encountered.
value | Recode all missing values encountered (including the system-missing value) to the specified value for entry. The replacement value can be any numeric constant.

Related Topics

GET Statement: Reading PASW Statistics Data Files (MATRIX-END MATRIX command)
Variable Specification (MATRIX-END MATRIX command)
FILE Specification (MATRIX-END MATRIX command)
VARIABLES Specification (MATRIX-END MATRIX command)
NAMES Specification (MATRIX-END MATRIX command)
SYSMIS Specification (MATRIX-END MATRIX command)


SYSMIS Specification (MATRIX-END MATRIX command)

SYSMIS (keyword),SYSMIS (keyword),SYSMIS (keyword)
MATRIX command,MATRIX command,MATRIX command

SYSMIS specifies how system-missing values should be handled when you have specified ACCEPT on MISSING.

• The SYSMIS specification is ignored unless ACCEPT is specified on MISSING.

• If you specify ACCEPT on MISSING but omit the SYSMIS specification, and a system-missing value is encountered for a variable being read, an error message is displayed and the GET statement is not executed.

The following keywords are available on the SYSMIS specification. There is no default.

OMIT | Skip an entire observation when a variable with a system-missing value is encountered.
value | Recode all system-missing values encountered to the specified value for entry. The replacement value can be any numeric constant.

Example

GET SCORES
  /VARIABLES = TEST1,TEST2,TEST3
  /NAMES = VARNAMES
  /MISSING = ACCEPT
  /SYSMIS = -1.0.

• A matrix named SCORES is read from the active dataset.

• The variables TEST1, TEST2, and TEST3 form the columns of the matrix, while the cases in the active dataset form the rows.

• A vector named VARNAMES, whose three elements contain the variable names TEST1, TEST2, and TEST3, is created.

• User-missing values defined in the active dataset are accepted into the matrix SCORES.

• System-missing values in the active dataset are converted to the value −1 in the matrix SCORES.

Related Topics

GET Statement: Reading PASW Statistics Data Files (MATRIX-END MATRIX command)
Variable Specification (MATRIX-END MATRIX command)
FILE Specification (MATRIX-END MATRIX command)
VARIABLES Specification (MATRIX-END MATRIX command)
NAMES Specification (MATRIX-END MATRIX command)
MISSING Specification (MATRIX-END MATRIX command)


SAVE Statement: Writing PASW Statistics Data Files (MATRIX-END MATRIX command)

SAVE (statement),SAVE (statement),SAVE (statement)
MATRIX command,MATRIX command,MATRIX command
MATRIX (command),MATRIX (command),MATRIX (command)
SAVE statement,SAVE statement,SAVE statement

SAVE writes matrices to an external PASW Statistics data file or to the current active dataset. The rows of the matrix expression become cases, and the columns become variables. The syntax of the SAVE statement is as follows:

SAVE matrix expression
  [/OUTFILE = {file reference}]
              {*             }
  [/VARIABLES = variable list]
  [/NAMES = names vector]
  [/STRINGS = variable list]

Related Topics

MATRIX-END MATRIX
Overview (MATRIX-END MATRIX command)
Terminology (MATRIX-END MATRIX command)
Matrix Variables (MATRIX-END MATRIX command)
Syntax of Matrix Language (MATRIX-END MATRIX command)
Matrix Operations (MATRIX-END MATRIX command)
MATRIX and Other Commands (MATRIX-END MATRIX command)
MATRIX and END MATRIX Commands (MATRIX-END MATRIX command)
COMPUTE Statement (MATRIX-END MATRIX command)
CALL Statement (MATRIX-END MATRIX command)
PRINT Statement (MATRIX-END MATRIX command)
Matrix Control Structures (MATRIX-END MATRIX command)
READ Statement: Reading Character Data (MATRIX-END MATRIX command)
WRITE Statement: Writing Character Data (MATRIX-END MATRIX command)
GET Statement: Reading PASW Statistics Data Files (MATRIX-END MATRIX command)
MGET Statement: Reading Matrix Data Files (MATRIX-END MATRIX command)
MSAVE Statement: Writing Matrix Data Files (MATRIX-END MATRIX command)
DISPLAY Statement (MATRIX-END MATRIX command)
RELEASE Statement (MATRIX-END MATRIX command)
Macros Using the Matrix Language (MATRIX-END MATRIX command)
Matrix Expression Specification (MATRIX-END MATRIX command)
OUTFILE Specification (MATRIX-END MATRIX command)
VARIABLES Specification (MATRIX-END MATRIX command)
NAMES Specification (MATRIX-END MATRIX command)
STRINGS Specification (MATRIX-END MATRIX command)


Matrix Expression Specification (MATRIX-END MATRIX command)

The matrix expression following the keyword SAVE is any matrix language expression that evaluates to the value(s) to be written to a data file.

• The matrix specification must precede any other specifications on the SAVE statement.

• You can specify a matrix name, a matrix raised to a power, or a matrix function (with its arguments in parentheses) by itself, but you must enclose other matrix expressions in parentheses. For example, SAVE A, SAVE INV(A), or SAVE B**DET(T(C)*D) is legal, but SAVE A+B is not. You must specify SAVE (A+B).

• Constant expressions are allowed.

Related Topics

SAVE Statement: Writing PASW Statistics Data Files (MATRIX-END MATRIX command)
OUTFILE Specification (MATRIX-END MATRIX command)
VARIABLES Specification (MATRIX-END MATRIX command)
NAMES Specification (MATRIX-END MATRIX command)
STRINGS Specification (MATRIX-END MATRIX command)


OUTFILE Specification (MATRIX-END MATRIX command)

OUTFILE (keyword),OUTFILE (keyword),OUTFILE (keyword)
MATRIX command,MATRIX command,MATRIX command

OUTFILE designates the file to which the matrix expression is to be written. It can be an actual filename in quotes, a previously declared dataset in the current session, or a file handle defined on a FILE HANDLE command that precedes the matrix program.

• To save a matrix expression as the active dataset, specify an asterisk (*). If there is no active dataset, one will be created; if there is one, it is replaced by the saved matrices.

• The OUTFILE specification is required on the first SAVE statement in a matrix program (first in order of appearance, not necessarily in order of execution). If you omit the OUTFILE specification from a later SAVE statement, the statement uses the most recently named file (in order of appearance) on a SAVE statement in the same matrix program.

• If more than one SAVE statement writes to the active dataset in a single matrix program, the dictionary of the new active dataset is written on the basis of the information given by the first such SAVE. All of the subsequently saved matrices are appended to the new active dataset as additional cases. If the number of columns differs, an error occurs.

• When you execute a matrix program with the INCLUDE command, the SAVE statement creates a new PASW Statistics data file at the end of the matrix program’s execution, so any attempt to GET the data file obtains the original data file, if any.

• When you execute a matrix program from a syntax window, SAVE creates a new PASW Statistics data file immediately, but the file remains open, so you cannot GET it until after the END MATRIX statement.

Related Topics

SAVE Statement: Writing PASW Statistics Data Files (MATRIX-END MATRIX command)
Matrix Expression Specification (MATRIX-END MATRIX command)
VARIABLES Specification (MATRIX-END MATRIX command)
NAMES Specification (MATRIX-END MATRIX command)
STRINGS Specification (MATRIX-END MATRIX command)


VARIABLES Specification (MATRIX-END MATRIX command)

You can provide variable names for the PASW Statistics data file with the VARIABLES specification. The variable list is a list of valid variable names separated by commas.

• You can use the TO convention, as shown in the example below.

• You can also use the NAMES specification, discussed below, to provide variable names.

Example

SAVE {A,B,X,Y} /OUTFILE=*
  /VARIABLES = A,B,X1 TO X50,Y1,Y2.

• The matrix expression on the SAVE statement constructs a matrix from two column vectors A and B and two matrices X and Y. All four matrix variables must have the same number of rows so that this matrix construction will be valid.

• The VARIABLES specification provides descriptive names so that the variable names in the new active dataset will resemble the names used in the matrix program.

Related Topics

SAVE Statement: Writing PASW Statistics Data Files (MATRIX-END MATRIX command)
Matrix Expression Specification (MATRIX-END MATRIX command)
OUTFILE Specification (MATRIX-END MATRIX command)
NAMES Specification (MATRIX-END MATRIX command)
STRINGS Specification (MATRIX-END MATRIX command)


NAMES Specification (MATRIX-END MATRIX command)

As an alternative to the explicit list on the VARIABLES specification, you can specify a name list with a vector containing string values. The elements of this vector are used as names for the variables.

• The NAMES specification on SAVE is designed to complement the NAMES specification on the GET statement. Names extracted from PASW Statistics data files can be used in a new data file by specifying the same vector name on both NAMES specifications.

• If you specify both VARIABLES and NAMES, a warning message is displayed and the VARIABLES specification is used.

• If you omit both the VARIABLES and NAMES specifications, or if you do not specify names for all columns of the matrix, the MATRIX procedure creates default names. The names have the form COLn, where n is the column number.

Related Topics

SAVE Statement: Writing PASW Statistics Data Files (MATRIX-END MATRIX command)
Matrix Expression Specification (MATRIX-END MATRIX command)
OUTFILE Specification (MATRIX-END MATRIX command)
VARIABLES Specification (MATRIX-END MATRIX command)
STRINGS Specification (MATRIX-END MATRIX command)


STRINGS Specification (MATRIX-END MATRIX command)

STRINGS (keyword),STRINGS (keyword),STRINGS (keyword)
MATRIX command,MATRIX command,MATRIX command

The STRINGS specification provides the names of variables that contain short string data rather than numeric data.

• By default, all variables are assumed to be numeric.

• The variable list specification following STRINGS consists of a list of variable names separated by commas. The names must be among those used by SAVE.

Related Topics

SAVE Statement: Writing PASW Statistics Data Files (MATRIX-END MATRIX command)
Matrix Expression Specification (MATRIX-END MATRIX command)
OUTFILE Specification (MATRIX-END MATRIX command)
VARIABLES Specification (MATRIX-END MATRIX command)
NAMES Specification (MATRIX-END MATRIX command)


MGET Statement: Reading Matrix Data Files (MATRIX-END MATRIX command)

MGET (statement),MGET (statement),MGET (statement)
MATRIX command,MATRIX command,MATRIX command
MATRIX (command),MATRIX (command),MATRIX (command)
MGET statement,MGET statement,MGET statement

MGET reads a matrix-format data file. MGET puts the data it reads into separate matrix variables. It also names these new variables automatically. The syntax of MGET is as follows:

MGET [ [/] FILE = file reference]
  [/TYPE = {COV   }]
           {CORR  }
           {MEAN  }
           {STDDEV}
           {N     }
           {COUNT }

• Since MGET assigns names to the matrices it reads, do not specify matrix names on the MGET statement.

Related Topics

MATRIX-END MATRIX
Overview (MATRIX-END MATRIX command)
Terminology (MATRIX-END MATRIX command)
Matrix Variables (MATRIX-END MATRIX command)
Syntax of Matrix Language (MATRIX-END MATRIX command)
Matrix Operations (MATRIX-END MATRIX command)
MATRIX and Other Commands (MATRIX-END MATRIX command)
MATRIX and END MATRIX Commands (MATRIX-END MATRIX command)
COMPUTE Statement (MATRIX-END MATRIX command)
CALL Statement (MATRIX-END MATRIX command)
PRINT Statement (MATRIX-END MATRIX command)
Matrix Control Structures (MATRIX-END MATRIX command)
READ Statement: Reading Character Data (MATRIX-END MATRIX command)
WRITE Statement: Writing Character Data (MATRIX-END MATRIX command)
GET Statement: Reading PASW Statistics Data Files (MATRIX-END MATRIX command)
SAVE Statement: Writing PASW Statistics Data Files (MATRIX-END MATRIX command)
MSAVE Statement: Writing Matrix Data Files (MATRIX-END MATRIX command)
DISPLAY Statement (MATRIX-END MATRIX command)
RELEASE Statement (MATRIX-END MATRIX command)
Macros Using the Matrix Language (MATRIX-END MATRIX command)
FILE Specification (MATRIX-END MATRIX command)
TYPE Specification (MATRIX-END MATRIX command)
Names of Matrix Variables from MGET (MATRIX-END MATRIX command)


FILE Specification (MATRIX-END MATRIX command)

FILE (keyword),FILE (keyword),FILE (keyword)
MATRIX command,MATRIX command,MATRIX command

FILE designates a matrix-format data file. See MATRIX DATA for a discussion of matrix-format data files. To designate the active dataset (if it is a matrix-format data file), use an asterisk, or simply omit the FILE specification.

• The file reference can be either a filename enclosed in quotes or a file handle defined on a FILE HANDLE command that precedes the matrix program.

• The same matrix-format data file can be read more than once.

• If you omit the FILE specification, the current active dataset is used.

• MGET ignores the SPLIT FILE command when reading the active dataset. It does honor the split-file groups that were in effect when the matrix-format data file was created.

• The maximum number of split-file groups that can be read is 99.

• The maximum number of cells that can be read is 99.

Related Topics

MGET Statement: Reading Matrix Data Files (MATRIX-END MATRIX command)
TYPE Specification (MATRIX-END MATRIX command)
Names of Matrix Variables from MGET (MATRIX-END MATRIX command)


TYPE Specification (MATRIX-END MATRIX command)

TYPE (keyword),TYPE (keyword),TYPE (keyword)
MATRIX command,MATRIX command,MATRIX command

TYPE specifies the rowtype(s) to read from the matrix-format data file.

• By default, records of all rowtypes are read.

• If the matrix-format data file does not contain rows of the requested type, an error occurs.

Valid keywords on the TYPE specification are:

COV | A matrix of covariances.
CORR | A matrix of correlation coefficients.
MEAN | A vector of means.
STDDEV | A vector of standard deviations.
N | A vector of numbers of cases.
COUNT | A vector of counts.

Related Topics

MGET Statement: Reading Matrix Data Files (MATRIX-END MATRIX command)
FILE Specification (MATRIX-END MATRIX command)
Names of Matrix Variables from MGET (MATRIX-END MATRIX command)


Names of Matrix Variables from MGET (MATRIX-END MATRIX command)

• The MGET statement automatically creates matrix variable names for the matrices it reads.

• All new variables created by MGET are reported to the user.

• If a matrix variable already exists with the same name that MGET chose for a new variable, the new variable is not created and a warning is issued. The RELEASE statement can be used to get rid of a variable. A COMPUTE statement followed by RELEASE can be used to change the name of an existing matrix variable.

MGET constructs variable names in the following manner:

• The first two characters of the name identify the row type. If there are no cells and no split file groups, these two characters constitute the name:

CV | A covariance matrix (rowtype COV)
CR | A correlation matrix (rowtype CORR)
MN | A vector of means (rowtype MEAN)
SD | A vector of standard deviations (rowtype STDDEV)
NC | A vector of numbers of cases (rowtype N)
CN | A vector of counts (rowtype COUNT)

• Characters 3–5 of the variable name identify the cell number or the split-group number. Cell identifiers consist of the letter F and a two-digit cell number. Split-group identifiers consist of the letter S and a two-digit split-group number; for example, MNF12 or SDS22.

• If there are both cells and split groups, characters 3–5 identify the cell and characters 6–8 identify the split group. The same convention for cell or split-file numbers is used; for example, CRF12S21.

• After the name is constructed as described above, any leading zeros are removed from the cell number and the split-group number; for example, CNF2S99 or CVF2S1.

Related Topics

MGET Statement: Reading Matrix Data Files (MATRIX-END MATRIX command)
FILE Specification (MATRIX-END MATRIX command)
TYPE Specification (MATRIX-END MATRIX command)


MSAVE Statement: Writing Matrix Data Files (MATRIX-END MATRIX command)

MSAVE (statement),MSAVE (statement),MSAVE (statement)
MATRIX command,MATRIX command,MATRIX command
MATRIX (command),MATRIX (command),MATRIX (command)
MSAVE statement,MSAVE statement,MSAVE statement

The MSAVE statement writes matrix expressions to a matrix-format data file that can be used as matrix input to other procedures. (See MATRIX DATA for a discussion of matrix-format data files.) The syntax of MSAVE is as follows:

MSAVE matrix expression
   /TYPE = {COV   }
           {CORR  }
           {MEAN  }
           {STDDEV}
           {N     }
           {COUNT }
  [/OUTFILE = {file reference}]
              {*             }
  [/VARIABLES = variable list]
  [/SNAMES = variable list]
  [/SPLIT = split vector]
  [/FNAMES = variable list]
  [/FACTOR = factor vector]

• Only one matrix-format data file can be saved in a single matrix program.

• Each MSAVE statement writes records of a single rowtype. Therefore, several MSAVE statements will normally be required to write a complete matrix-format data file.

• Most specifications are retained from one MSAVE statement to the next so that it is not necessary to repeat the same specifications on a series of MSAVE statements. The exception is the FACTOR specification, as noted below.

Example

MSAVE M /TYPE=MEAN /OUTFILE=CORRMAT /VARIABLES=V1 TO V8.
MSAVE S /TYPE STDDEV.
MSAVE MAKE(1,8,24) /TYPE N.
MSAVE C /TYPE CORR.

• The series of MSAVE statements save the matrix variables M, S, and C, which contain, respectively, vectors of means and standard deviations and a matrix of correlation coefficients. The matrix-format data file thus created is suitable for use in a procedure such as FACTOR.

• The first MSAVE statement saves M as a vector of means. This statement specifies OUTFILE, a previously defined file handle, and VARIABLES, a list of variable names to be used in the PASW Statistics data file.

• The second MSAVE statement saves S as a vector of standard deviations. Note that the OUTFILE and VARIABLES specifications do not have to be repeated.

• The third MSAVE statement saves a vector of case counts. The matrix function MAKE constructs an eight-element vector with values equal to the case count (24 in this example).

• The last MSAVE statement saves C, an 8 × 8 matrix, as the correlation matrix.

Related Topics

MATRIX-END MATRIX
Overview (MATRIX-END MATRIX command)
Terminology (MATRIX-END MATRIX command)
Matrix Variables (MATRIX-END MATRIX command)
Syntax of Matrix Language (MATRIX-END MATRIX command)
Matrix Operations (MATRIX-END MATRIX command)
MATRIX and Other Commands (MATRIX-END MATRIX command)
MATRIX and END MATRIX Commands (MATRIX-END MATRIX command)
COMPUTE Statement (MATRIX-END MATRIX command)
CALL Statement (MATRIX-END MATRIX command)
PRINT Statement (MATRIX-END MATRIX command)
Matrix Control Structures (MATRIX-END MATRIX command)
READ Statement: Reading Character Data (MATRIX-END MATRIX command)
WRITE Statement: Writing Character Data (MATRIX-END MATRIX command)
GET Statement: Reading PASW Statistics Data Files (MATRIX-END MATRIX command)
SAVE Statement: Writing PASW Statistics Data Files (MATRIX-END MATRIX command)
MGET Statement: Reading Matrix Data Files (MATRIX-END MATRIX command)
DISPLAY Statement (MATRIX-END MATRIX command)
RELEASE Statement (MATRIX-END MATRIX command)
Macros Using the Matrix Language (MATRIX-END MATRIX command)
Matrix Expression Specification (MATRIX-END MATRIX command)
TYPE Specification (MATRIX-END MATRIX command)
OUTFILE Specification (MATRIX-END MATRIX command)
VARIABLES Specification (MATRIX-END MATRIX command)
FACTOR Specification (MATRIX-END MATRIX command)
FNAMES Specification (MATRIX-END MATRIX command)
SPLIT Specification (MATRIX-END MATRIX command)
SNAMES Specification (MATRIX-END MATRIX command)


Matrix Expression Specification (MATRIX-END MATRIX command)

• The matrix expression must be specified first on the MSAVE statement.

• The matrix expression specification can be any matrix language expression that evaluates to the value(s) to be written to the matrix-format file.

• You can specify a matrix name, a matrix raised to a power, or a matrix function (with its arguments in parentheses) by itself, but you must enclose other matrix expressions in parentheses. For example, MSAVE A, SAVE INV(A), or MSAVE B**DET(T(C)*D) is legal, but MSAVE N * WT is not. You must specify MSAVE (N * WT).

• Constant expressions are allowed.

Related Topics

MSAVE Statement: Writing Matrix Data Files (MATRIX-END MATRIX command)
TYPE Specification (MATRIX-END MATRIX command)
OUTFILE Specification (MATRIX-END MATRIX command)
VARIABLES Specification (MATRIX-END MATRIX command)
FACTOR Specification (MATRIX-END MATRIX command)
FNAMES Specification (MATRIX-END MATRIX command)
SPLIT Specification (MATRIX-END MATRIX command)
SNAMES Specification (MATRIX-END MATRIX command)


TYPE Specification (MATRIX-END MATRIX command)

TYPE specifies the rowtype to write to the matrix-format data file. Only a single rowtype can be written by any one MSAVE statement.Valid keywords on the TYPE specification are:

COV | A matrix of covariances.
CORR | A matrix of correlation coefficients.
MEAN | A vector of means.
STDDEV | A vector of standard deviations.
N | A vector of numbers of cases.
COUNT | A vector of counts.

Related Topics

MSAVE Statement: Writing Matrix Data Files (MATRIX-END MATRIX command)
Matrix Expression Specification (MATRIX-END MATRIX command)
OUTFILE Specification (MATRIX-END MATRIX command)
VARIABLES Specification (MATRIX-END MATRIX command)
FACTOR Specification (MATRIX-END MATRIX command)
FNAMES Specification (MATRIX-END MATRIX command)
SPLIT Specification (MATRIX-END MATRIX command)
SNAMES Specification (MATRIX-END MATRIX command)


OUTFILE Specification (MATRIX-END MATRIX command)

OUTFILE (keyword),OUTFILE (keyword),OUTFILE (keyword)
MATRIX command,MATRIX command,MATRIX command

OUTFILE designates the matrix-format data file to which the matrices are to be written. It can be an asterisk, an actual filename in quotes, or a file handle defined on a FILE HANDLE command that precedes the matrix program. The filename or handle must be a valid file specification.

• The OUTFILE specification is required on the first MSAVE statement in a matrix program.

• To save a matrix expression as the active dataset (replacing any active dataset created before the matrix program), specify an asterisk (*).

• Since only one matrix-format data file can be written in a single matrix program, any OUTFILE specification on the second and later MSAVE statements in one matrix program must be the same as that on the first MSAVE statement.

Related Topics

MSAVE Statement: Writing Matrix Data Files (MATRIX-END MATRIX command)
Matrix Expression Specification (MATRIX-END MATRIX command)
TYPE Specification (MATRIX-END MATRIX command)
VARIABLES Specification (MATRIX-END MATRIX command)
FACTOR Specification (MATRIX-END MATRIX command)
FNAMES Specification (MATRIX-END MATRIX command)
SPLIT Specification (MATRIX-END MATRIX command)
SNAMES Specification (MATRIX-END MATRIX command)


VARIABLES Specification (MATRIX-END MATRIX command)

You can provide variable names for the matrix-format data file with the VARIABLES specification. The variable list is a list of valid variable names separated by commas. You can use the TO convention.

• The VARIABLES specification names only the data variables in the matrix. Split-file variables and grouping or factor variables are named on the SNAMES and FNAMES specifications.

• The names in the VARIABLES specification become the values of the special variable VARNAME_ in the matrix-format data file for rowtypes of CORR and COV.

• You cannot specify the reserved names ROWTYPE_ and VARNAME_ on the VARIABLES specification.

• If you omit the VARIABLES specification, the default names COL1, COL2, ..., etc., are used.

Related Topics

MSAVE Statement: Writing Matrix Data Files (MATRIX-END MATRIX command)
Matrix Expression Specification (MATRIX-END MATRIX command)
TYPE Specification (MATRIX-END MATRIX command)
OUTFILE Specification (MATRIX-END MATRIX command)
FACTOR Specification (MATRIX-END MATRIX command)
FNAMES Specification (MATRIX-END MATRIX command)
SPLIT Specification (MATRIX-END MATRIX command)
SNAMES Specification (MATRIX-END MATRIX command)


FACTOR Specification (MATRIX-END MATRIX command)

FACTORS (keyword),FACTORS (keyword),FACTORS (keyword)
MATRIX command,MATRIX command,MATRIX command

To write a matrix-format data file with factor or group codes, you must use the FACTOR specification to provide a row matrix containing the values of each of the factors or group variables for the matrix expression being written by the current MSAVE statement.

• The factor vector must have the same number of columns as there are factors in the matrix data file being written. You can use a scalar when the groups are defined by a single variable. For example, FACTOR=1 indicates that the matrix data being written are for the value 1 of the factor variable.

• The values of the factor vector are written to the matrix-format data file as values of the factors in the file.

• To create a complete matrix-format data file with factors, you must execute an MSAVE statement for every combination of values of the factors or grouping variables (in other words, for every group). If split-file variables are also present, you must execute an MSAVE statement for every combination of factor codes within every combination of values of the split-file variables.

Example

MSAVE M11 /TYPE=MEAN /OUTFILE=CORRMAT /VARIABLES=V1 TO V8
    /FNAMES=SEX, GROUP /FACTOR={1,1}.
MSAVE S11 /TYPE STDDEV.
MSAVE MAKE(1,8,N(1,1)) /TYPE N.
MSAVE C11 /TYPE CORR.

MSAVE M12 /TYPE=MEAN /FACTOR={1,2}.
MSAVE S12 /TYPE STDDEV.
MSAVE MAKE(1,8,N(1,2)) /TYPE N.
MSAVE C12 /TYPE CORR.

MSAVE M21 /TYPE=MEAN /FACTOR={2,1}.
MSAVE S21 /TYPE STDDEV.
MSAVE MAKE(1,8,N(2,1)) /TYPE N.
MSAVE C21 /TYPE CORR.

MSAVE M22 /TYPE=MEAN /FACTOR={2,2}.
MSAVE S22 /TYPE STDDEV.
MSAVE MAKE(1,8,N(2,2)) /TYPE N.
MSAVE C22 /TYPE CORR.

• The first four MSAVE statements provide data for a group defined by the variables SEX and GROUP, with both factors having the value 1.

• The second, third, and fourth groups of four MSAVE statements provide the corresponding data for the other groups, in which SEX and GROUP, respectively, equal 1 and 2, 2 and 1, and 2 and 2.

• Within each group of MSAVE statements, a suitable number-of-cases vector is created with the matrix function MAKE.

Related Topics

MSAVE Statement: Writing Matrix Data Files (MATRIX-END MATRIX command)
Matrix Expression Specification (MATRIX-END MATRIX command)
TYPE Specification (MATRIX-END MATRIX command)
OUTFILE Specification (MATRIX-END MATRIX command)
VARIABLES Specification (MATRIX-END MATRIX command)
FNAMES Specification (MATRIX-END MATRIX command)
SPLIT Specification (MATRIX-END MATRIX command)
SNAMES Specification (MATRIX-END MATRIX command)


FNAMES Specification (MATRIX-END MATRIX command)

FNAMES (keyword),FNAMES (keyword),FNAMES (keyword)
MATRIX command,MATRIX command,MATRIX command

To write a matrix-format data file with factor or group codes, you can use the FNAMES specification to provide variable names for the grouping or factor variables.

• The variable list following the keyword FNAMES is a list of valid variable names, separated by commas.

• If you omit the FNAMES specification, the default names FAC1, FAC2, ..., etc., are used.

Related Topics

MSAVE Statement: Writing Matrix Data Files (MATRIX-END MATRIX command)
Matrix Expression Specification (MATRIX-END MATRIX command)
TYPE Specification (MATRIX-END MATRIX command)
OUTFILE Specification (MATRIX-END MATRIX command)
VARIABLES Specification (MATRIX-END MATRIX command)
FACTOR Specification (MATRIX-END MATRIX command)
SPLIT Specification (MATRIX-END MATRIX command)
SNAMES Specification (MATRIX-END MATRIX command)


SPLIT Specification (MATRIX-END MATRIX command)

SPLIT (keyword),SPLIT (keyword),SPLIT (keyword)
MATRIX command,MATRIX command,MATRIX command

To write a matrix-format data file with split-file groups, you must use the SPLIT specification to provide a row matrix containing the values of each of the split-file variables for the matrix expression being written by the current MSAVE statement.

• The split vector must have the same number of columns as there are split-file variables in the matrix data file being written. You can use a scalar when there is only one split-file variable. For example, SPLIT=3 indicates that the matrix data being written are for the value 3 of the split-file variable.

• The values of the split vector are written to the matrix-format data file as values of the split-file variable(s).

• To create a complete matrix-format data file with split-file variables, you must execute MSAVE statements for every combination of values of the split-file variables. (If factor variables are present, you must execute MSAVE statements for every combination of factor codes within every combination of values of the split-file variables.)

Related Topics

MSAVE Statement: Writing Matrix Data Files (MATRIX-END MATRIX command)
Matrix Expression Specification (MATRIX-END MATRIX command)
TYPE Specification (MATRIX-END MATRIX command)
OUTFILE Specification (MATRIX-END MATRIX command)
VARIABLES Specification (MATRIX-END MATRIX command)
FACTOR Specification (MATRIX-END MATRIX command)
FNAMES Specification (MATRIX-END MATRIX command)
SNAMES Specification (MATRIX-END MATRIX command)


SNAMES Specification (MATRIX-END MATRIX command)

SNAMES (keyword),SNAMES (keyword),SNAMES (keyword)
MATRIX command,MATRIX command,MATRIX command

To write a matrix-format data file with split-file groups, you can use the SNAMES specification to provide variable names for the split-file variables.

• The variable list following the keyword SNAMES is a list of valid variable names separated by commas.

• If you omit the SNAMES specification, the default names SPL1, SPL2, ..., etc., are used.

Related Topics

MSAVE Statement: Writing Matrix Data Files (MATRIX-END MATRIX command)
Matrix Expression Specification (MATRIX-END MATRIX command)
TYPE Specification (MATRIX-END MATRIX command)
OUTFILE Specification (MATRIX-END MATRIX command)
VARIABLES Specification (MATRIX-END MATRIX command)
FACTOR Specification (MATRIX-END MATRIX command)
FNAMES Specification (MATRIX-END MATRIX command)
SPLIT Specification (MATRIX-END MATRIX command)


DISPLAY Statement (MATRIX-END MATRIX command)

DISPLAY (statement),DISPLAY (statement),DISPLAY (statement)
MATRIX command,MATRIX command,MATRIX command
MATRIX (command),MATRIX (command),MATRIX (command)
DISPLAY statement,DISPLAY statement,DISPLAY statement

DISPLAY provides information on the matrix variables currently defined in a matrix program and on usage of internal memory by the matrix processor. Two keywords are available on DISPLAY:

DICTIONARY | Display variable name and row and column dimensions for each matrix variable currently defined.
STATUS | Display the status and size of internal tables. This display is intended as a debugging aid when writing large matrix programs that approach the memory limitations of your system.

If you enter the DISPLAY statement with no specifications, both DICTIONARY and STATUS information is displayed.

Related Topics

MATRIX-END MATRIX
Overview (MATRIX-END MATRIX command)
Terminology (MATRIX-END MATRIX command)
Matrix Variables (MATRIX-END MATRIX command)
Syntax of Matrix Language (MATRIX-END MATRIX command)
Matrix Operations (MATRIX-END MATRIX command)
MATRIX and Other Commands (MATRIX-END MATRIX command)
MATRIX and END MATRIX Commands (MATRIX-END MATRIX command)
COMPUTE Statement (MATRIX-END MATRIX command)
CALL Statement (MATRIX-END MATRIX command)
PRINT Statement (MATRIX-END MATRIX command)
Matrix Control Structures (MATRIX-END MATRIX command)
READ Statement: Reading Character Data (MATRIX-END MATRIX command)
WRITE Statement: Writing Character Data (MATRIX-END MATRIX command)
GET Statement: Reading PASW Statistics Data Files (MATRIX-END MATRIX command)
SAVE Statement: Writing PASW Statistics Data Files (MATRIX-END MATRIX command)
MGET Statement: Reading Matrix Data Files (MATRIX-END MATRIX command)
MSAVE Statement: Writing Matrix Data Files (MATRIX-END MATRIX command)
RELEASE Statement (MATRIX-END MATRIX command)
Macros Using the Matrix Language (MATRIX-END MATRIX command)


RELEASE Statement (MATRIX-END MATRIX command)

RELEASE (statement),RELEASE (statement),RELEASE (statement)
MATRIX command,MATRIX command,MATRIX command
MATRIX (command),MATRIX (command),MATRIX (command)
RELEASE statement,RELEASE statement,RELEASE statement

Use the RELEASE statement to release the work areas in memory assigned to matrix variables that are no longer needed.

• Specify a list of currently defined matrix variables. Variable names on the list must be separated by commas.

• RELEASE discards the contents of the named matrix variables. Releasing a large matrix when it is no longer needed makes memory available for additional matrix variables.

• All matrix variables are released when the END MATRIX statement is encountered.

Related Topics

MATRIX-END MATRIX
Overview (MATRIX-END MATRIX command)
Terminology (MATRIX-END MATRIX command)
Matrix Variables (MATRIX-END MATRIX command)
Syntax of Matrix Language (MATRIX-END MATRIX command)
Matrix Operations (MATRIX-END MATRIX command)
MATRIX and Other Commands (MATRIX-END MATRIX command)
MATRIX and END MATRIX Commands (MATRIX-END MATRIX command)
COMPUTE Statement (MATRIX-END MATRIX command)
CALL Statement (MATRIX-END MATRIX command)
PRINT Statement (MATRIX-END MATRIX command)
Matrix Control Structures (MATRIX-END MATRIX command)
READ Statement: Reading Character Data (MATRIX-END MATRIX command)
WRITE Statement: Writing Character Data (MATRIX-END MATRIX command)
GET Statement: Reading PASW Statistics Data Files (MATRIX-END MATRIX command)
SAVE Statement: Writing PASW Statistics Data Files (MATRIX-END MATRIX command)
MGET Statement: Reading Matrix Data Files (MATRIX-END MATRIX command)
MSAVE Statement: Writing Matrix Data Files (MATRIX-END MATRIX command)
DISPLAY Statement (MATRIX-END MATRIX command)
Macros Using the Matrix Language (MATRIX-END MATRIX command)


Macros Using the Matrix Language (MATRIX-END MATRIX command)

macro facility,macro facility,macro facility
with MATRIX command,with MATRIX command,with MATRIX command
MATRIX (command),MATRIX (command),MATRIX (command)
with macro facility,with macro facility,with macro facility
macro facility,macro facility,macro facility
with matrix language,with matrix language,with matrix language
matrix language,matrix language,matrix language
with macro facility,with macro facility,with macro facility

Macro expansion (see DEFINE-!ENDDEFINE) occurs before command lines are passed to the matrix processor. Therefore, previously defined macro names can be used within a matrix program. If the macro name expands to one or more valid matrix statements, the matrix processor will execute those statements. Similarly, you can define an entire matrix program, including the MATRIX and END MATRIX commands, as a macro, but you cannot define a macro within a matrix program, since DEFINE and END DEFINE are not valid matrix statements.

Related Topics

MATRIX-END MATRIX
Overview (MATRIX-END MATRIX command)
Terminology (MATRIX-END MATRIX command)
Matrix Variables (MATRIX-END MATRIX command)
Syntax of Matrix Language (MATRIX-END MATRIX command)
Matrix Operations (MATRIX-END MATRIX command)
MATRIX and Other Commands (MATRIX-END MATRIX command)
MATRIX and END MATRIX Commands (MATRIX-END MATRIX command)
COMPUTE Statement (MATRIX-END MATRIX command)
CALL Statement (MATRIX-END MATRIX command)
PRINT Statement (MATRIX-END MATRIX command)
Matrix Control Structures (MATRIX-END MATRIX command)
READ Statement: Reading Character Data (MATRIX-END MATRIX command)
WRITE Statement: Writing Character Data (MATRIX-END MATRIX command)
GET Statement: Reading PASW Statistics Data Files (MATRIX-END MATRIX command)
SAVE Statement: Writing PASW Statistics Data Files (MATRIX-END MATRIX command)
MGET Statement: Reading Matrix Data Files (MATRIX-END MATRIX command)
MSAVE Statement: Writing Matrix Data Files (MATRIX-END MATRIX command)
DISPLAY Statement (MATRIX-END MATRIX command)
RELEASE Statement (MATRIX-END MATRIX command)


MATRIX DATA

MATRIX DATA (command),MATRIX DATA (command),MATRIX DATA (command)
MATRIX DATA (command),MATRIX DATA (command),MATRIX DATA (command)
syntax chart,syntax chart,syntax chart
matrix data files,matrix data files,matrix data files
raw,raw,raw
raw matrix data files,raw matrix data files,raw matrix data files
MATRIX DATA VARIABLES=varlist   [/FILE={INLINE**}]
                                       {file    }

 [/FORMAT=[{LIST**}]  [{LOWER**}]  [{DIAGONAL**}]]
           {FREE  }    {UPPER  }    {NODIAGONAL}
                       {FULL   }

 [/SPLIT=varlist]    [/FACTORS=varlist]

 [/CELLS=number of cells]    [/N=sample size]

 [/CONTENTS= [CORR**]  [COV]  [MAT]  [MSE]  [DFE]  [MEAN]  [PROX]

             [{STDDEV}]  [N_SCALAR]  [{N_VECTOR}]  [N_MATRIX]  [COUNT]]
              {SD    }                {N       }

**Default if the subcommand is omitted.

Example

MATRIX DATA VARIABLES=ROWTYPE_ SAVINGS POP15 POP75 INCOME GROWTH.
BEGIN DATA
MEAN 9.6710 35.0896 2.2930 1106.7784 3.7576
STDDEV 4.4804 9.1517 1.2907 990.8511 2.8699
N 50 50 50 50 50
CORR 1
CORR -.4555 1
CORR .3165 -.9085 1
CORR .2203 -.7562 .7870 1
CORR .3048 -.0478 .0253 -.1295  1
END DATA.

Related Topics

Overview (MATRIX DATA command)
Examples (MATRIX DATA command)
Operations (MATRIX DATA command)
VARIABLES Subcommand (MATRIX DATA command)
FILE Subcommand (MATRIX DATA command)
FORMAT Subcommand (MATRIX DATA command)
SPLIT Subcommand (MATRIX DATA command)
FACTORS Subcommand (MATRIX DATA command)
CELLS Subcommand (MATRIX DATA command)
CONTENTS Subcommand (MATRIX DATA command)
N Subcommand (MATRIX DATA command)


Overview (MATRIX DATA command)

raw matrix data files,raw matrix data files,raw matrix data files
format,format,format
ROWTYPE_ variable,ROWTYPE_ variable,ROWTYPE_ variable
MATRIX DATA command,MATRIX DATA command,MATRIX DATA command
MATRIX DATA (command),MATRIX DATA (command),MATRIX DATA (command)
ROWTYPE_ variable,ROWTYPE_ variable,ROWTYPE_ variable

MATRIX DATA reads raw matrix materials and converts them to a matrix data file that can be read by procedures that handle matrix materials. The data can include vector statistics, such as means and standard deviations, as well as matrices.

MATRIX DATA is similar to a DATA LIST command: it defines variable names and their order in a raw data file. However, MATRIX DATA can read only data that conform to the general format of matrix data files.

Matrix Files Collapse Hide details

Matrix Files

Like the matrix data files created by procedures, the file that MATRIX DATA creates contains the following variables in the indicated order. If the variables are in a different order in the raw data file, MATRIX DATA rearranges them in the active dataset.

• Split-file variables. These optional variables define split files. There can be up to eight split variables, and they must have numeric values. Split-file variables will appear in the order in which they are specified on the SPLIT subcommand.

• ROWTYPE_. This is a string variable with A8 format. Its values define the data type for each record. For example, it might identify a row of values as means, standard deviations, or correlation coefficients. Every matrix data file has a ROWTYPE_ variable.

• Factor variables. There can be any number of factors. They occur only if the data include within-cells information, such as the within-cells means. Factors have the system-missing value on records that define pooled information. Factor variables appear in the order in which they are specified on the FACTORS subcommand.

• VARNAME_. This is a string variable with A8 format. MATRIX DATA automatically generates VARNAME_ and its values based on the variables named on VARIABLES. You never enter values for VARNAME_. Values for VARNAME_ are blank for records that define vector information. Every matrix in the program has a VARNAME_ variable.

• Continuous variables. These are the variables that were used to generate the correlation coefficients or other aggregated data. There can be any number of them. Continuous variables appear in the order in which they are specified on VARIABLES.

Options Collapse Hide details

Options

Data Files. You can define both inline data and data in an external file.

Data Format. By default, data are assumed to be entered in freefield format with each vector or row beginning on a new record (the keyword LIST on the FORMAT subcommand). If each vector or row does not begin on a new record, use the keyword FREE. You can also use FORMAT to indicate whether matrices are entered in upper or lower triangular or full square or rectangular format and whether or not they include diagonal values.

Variable Types. You can specify split-file and factor variables using the SPLIT and FACTORS subcommands. You can identify record types by specifying ROWTYPE_ on the VARIABLES subcommand if ROWTYPE_ values are included in the data or by implying ROWTYPE_ values on CONTENTS.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is VARIABLES and a list of variables. Additional specifications are required as follows:

• FILE is required to specify the data file if the data are not inline.

• If data are in any format other than lower triangular with diagonal values included, FORMAT is required.

• If the data contain values in addition to matrix coefficients, such as the mean and standard deviation, either the variable ROWTYPE_ must be specified on VARIABLES and ROWTYPE_ values must be included in the data or CONTENTS must be used to describe the data.

• If the data include split-file variables, SPLIT is required. If there are factors, FACTORS is required.

Specifications on most MATRIX DATA subcommands depend on whether ROWTYPE_ is included in the data and specified on VARIABLES or whether it is implied using CONTENTS.

Subcommand requirements in relation to ROWTYPE_
Subcommand | Implicit ROWTYPE_ using CONTENTS | Explicit ROWTYPE_ on VARIABLES
FILE | Defaults to INLINE | Defaults to INLINE
VARIABLES | Required | Required
FORMAT | Defaults to LOWER DIAG | Defaults to LOWER DIAG
SPLIT | Required if split files* | Required if split files
FACTORS | Required if factors | Required if factors
CELLS | Required if factors | Inapplicable
CONTENTS | Defaults to CORR | Optional
N | Optional | Optional

* If the data do not contain values for the split-file variables, this subcommand can specify a single variable, which is not specified on the VARIABLES subcommand.

Subcommand Order Collapse Hide details

Subcommand Order

• SPLIT and FACTORS, when used, must follow VARIABLES.

• The remaining subcommands can be specified in any order.

Syntax Rules Collapse Hide details

Syntax Rules

• No commands can be specified between MATRIX DATA and BEGIN DATA, not even a VARIABLE LABELS or FORMAT command. Data transformations cannot be used until after MATRIX DATA is executed.

Related Topics

MATRIX DATA
Examples (MATRIX DATA command)
Operations (MATRIX DATA command)
VARIABLES Subcommand (MATRIX DATA command)
FILE Subcommand (MATRIX DATA command)
FORMAT Subcommand (MATRIX DATA command)
SPLIT Subcommand (MATRIX DATA command)
FACTORS Subcommand (MATRIX DATA command)
CELLS Subcommand (MATRIX DATA command)
CONTENTS Subcommand (MATRIX DATA command)
N Subcommand (MATRIX DATA command)


Examples (MATRIX DATA command)

MATRIX DATA (command),MATRIX DATA (command),MATRIX DATA (command)
with DISCRIMINANT command,with DISCRIMINANT command,with DISCRIMINANT command
DISCRIMINANT (command),DISCRIMINANT (command),DISCRIMINANT (command)
with MATRIX DATA command,with MATRIX DATA command,with MATRIX DATA command
MATRIX DATA (command),MATRIX DATA (command),MATRIX DATA (command)
with REGRESSION command,with REGRESSION command,with REGRESSION command
REGRESSION (command),REGRESSION (command),REGRESSION (command)
with MATRIX DATA command,with MATRIX DATA command,with MATRIX DATA command
MATRIX DATA (command),MATRIX DATA (command),MATRIX DATA (command)
with ONEWAY command,with ONEWAY command,with ONEWAY command
ONEWAY (command),ONEWAY (command),ONEWAY (command)
with MATRIX DATA command,with MATRIX DATA command,with MATRIX DATA command

Reading a Correlation Matrix

MATRIX DATA
    VARIABLES=ROWTYPE_ SAVINGS POP15 POP75 INCOME GROWTH.
BEGIN DATA
MEAN 9.6710 35.0896 2.2930 1106.7784 3.7576
STDDEV 4.4804 9.1517 1.2907 990.8511 2.8699
N 50 50 50 50 50
CORR 1
CORR -.4555 1
CORR .3165 -.9085 1
CORR .2203 -.7562 .7870 1
CORR .3048 -.0478 .0253 -.1295  1
END DATA.

• The variable ROWTYPE_ is specified on VARIABLES. ROWTYPE_ values are included in the data.

• No other specifications are required.

MATRIX DATA with DISCRIMINANT

 MATRIX DATA VARIABLES=WORLD ROWTYPE_ FOOD APPL SERVICE RENT
   /FACTORS=WORLD.
 BEGIN DATA
 1 N      25 25 25 25
 1 MEAN   76.64 77.32 81.52 101.40
 2 N      7 7 7 7
 2 MEAN   76.1428571 85.2857143 60.8571429 249.571429
 3 N      13 13 13 13
 3 MEAN   55.5384615 76 63.4615385 86.3076923
 . SD     16.4634139 22.5509310 16.8086768 77.1085326
 . CORR   1
 . CORR   .1425366 1
 . CORR   .5644693 .2762615 1
 . CORR   .2133413 -.0499003 .0417468 1
 END DATA.

 DISCRIMINANT GROUPS=WORLD(1,3)
   /VARIABLES=FOOD APPL SERVICE RENT /METHOD=WILKS /MATRIX=IN(*).

• MATRIX DATA is used to generate a active dataset that DISCRIMINANT can read. DISCRIMINANT reads the mean, count (unweighted N), and N (weighted N) for each cell in the data, as well as the pooled values for the standard deviation and correlation coefficients. If count equals N, only N needs to be supplied.

• ROWTYPE_ is specified on VARIABLES to identify record types in the data. Though CONTENTS and CELLS can be used to identify record types and distinguish between within-cells data and pooled values, it is usually easier to specify ROWTYPE_ on VARIABLES and enter the ROWTYPE_ values in the data.

• Because factors are present in the data, the continuous variables (FOOD, APPL, SERVICE, and RENT) must be specified last on VARIABLES and must be last in the data.

• The FACTORS subcommand identifies WORLD as the factor variable.

• BEGIN DATA immediately follows MATRIX DATA.

• N and MEAN values for each cell are entered in the data.

• ROWTYPE_ values for the pooled records are SD and COR. MATRIX DATA assigns the values STDDEV and CORR to the corresponding vectors in the matrix. Records with pooled information have the system-missing value (.) for the factors.

• The DISCRIMINANT procedure reads the data matrix. An asterisk (*) is specified as the input file on the MATRIX subcommand because the data are in the active dataset.

MATRIX DATA with REGRESSION

MATRIX DATA VARIABLES=SAVINGS POP15 POP75 INCOME GROWTH
  /CONTENTS=MEAN SD N CORR /FORMAT=UPPER NODIAGONAL.

BEGIN DATA
9.6710 35.0896 2.2930 1106.7784 3.7576
4.4804 9.1517 1.2908 990.8511 2.8699
50 50 50 50 50
-.4555 .3165 .2203 .3048
-.9085 -.7562 -.0478
 .7870 .0253
-.1295
END DATA.

REGRESSION MATRIX=IN(*) /VARIABLES=SAVINGS TO GROWTH
  /DEP=SAVINGS /ENTER.

• MATRIX DATA is used to generate a matrix that REGRESSION can read. REGRESSION reads and writes matrices that always contain the mean, standard deviation, N, and Pearson correlation coefficients. Data in this example do not have ROWTYPE_ values, and the correlation values are from the upper triangle of the matrix without the diagonal values.

• ROWTYPE_ is not specified on VARIABLES because its values are not included in the data.

• Because there are no ROWTYPE_ values, CONTENTS is required to define the record types and the order of the records in the file.

• By default, MATRIX DATA reads values from the lower triangle of the matrix, including the diagonal values. FORMAT is required in this example to indicate that the data are in the upper triangle and do not include diagonal values.

• BEGIN DATA immediately follows the MATRIX DATA command.

• The REGRESSION procedure reads the data matrix. An asterisk (*) is specified as the input file on the MATRIX subcommand because the data are in the active dataset. Since there is a single vector of N’s in the data, missing values are handled listwise (the default for REGRESSION).

MATRIX DATA with ONEWAY

 MATRIX DATA VARIABLES=EDUC ROWTYPE_ WELL /FACTORS=EDUC.
 BEGIN DATA
 1 N 65
 2 N 95
 3 N 181
 4 N 82
 5 N 40
 6 N 37
 1 MEAN 2.6462
 2 MEAN 2.7737
 3 MEAN 4.1796
 4 MEAN 4.5610
 5 MEAN 4.6625
 6 MEAN 5.2297
 . MSE 6.2699
 . DFE 494
 END DATA.

 ONEWAY WELL BY EDUC(1,6) /MATRIX=IN(*)

• One of the two types of matrices that the ONEWAY procedure reads includes a vector of frequencies for each factor level, a vector of means for each factor level, a record containing the pooled variance (within-group mean square error), and the degrees of freedom for the mean square error. MATRIX DATA is used to generate an active dataset containing this type of matrix data for the ONEWAY procedure.

• ROWTYPE_ is explicit on VARIABLES and identifies record types.

• Because factors are present in the data, the continuous variables (WELL) must be specified last on VARIABLES and must be last in the data.

• The FACTORS subcommand identifies EDUC as the factor variable.

• MSE is entered in the data as the ROWTYPE_ value for the vector of square pooled standard deviations.

• DFE is entered in the data as the ROWTYPE_ value for the vector of degrees of freedom.

• Records with pooled information have the system-missing value (.) for the factors.

Related Topics

MATRIX DATA
Overview (MATRIX DATA command)
Operations (MATRIX DATA command)
VARIABLES Subcommand (MATRIX DATA command)
FILE Subcommand (MATRIX DATA command)
FORMAT Subcommand (MATRIX DATA command)
SPLIT Subcommand (MATRIX DATA command)
FACTORS Subcommand (MATRIX DATA command)
CELLS Subcommand (MATRIX DATA command)
CONTENTS Subcommand (MATRIX DATA command)
N Subcommand (MATRIX DATA command)


Operations (MATRIX DATA command)

• MATRIX DATA defines and writes data in one step.

• MATRIX DATA clears the active dataset and defines a new active dataset.

• If CONTENTS is not specified and ROWTYPE_ is not specified on VARIABLES, MATRIX DATA assumes that the data contain only CORR values and issues warning messages to alert you to its assumptions.

• With the default format, data values, including diagonal values, must be in the lower triangle of the matrix. If MATRIX DATA encounters values in the upper triangle, it ignores those values and issues a series of warnings.

• With the default format, if any matrix rows span records in the data file, MATRIX DATA cannot form the matrix properly.

• MATRIX DATA does not allow format specifications for matrix materials. The procedure assigns the formats shown in the following table. To change data formats, execute MATRIX DATA and then assign new formats with the FORMATS, PRINT FORMATS, or WRITE FORMATS command.

Print and write formats for matrix variables
Variable type | Format
ROWTYPE_, VARNAME_ | A8
Split-file variables | F4.0
Factors | F4.0
Continuous variables | F10.4

Related Topics

MATRIX DATA
Overview (MATRIX DATA command)
Examples (MATRIX DATA command)
VARIABLES Subcommand (MATRIX DATA command)
FILE Subcommand (MATRIX DATA command)
FORMAT Subcommand (MATRIX DATA command)
SPLIT Subcommand (MATRIX DATA command)
FACTORS Subcommand (MATRIX DATA command)
CELLS Subcommand (MATRIX DATA command)
CONTENTS Subcommand (MATRIX DATA command)
N Subcommand (MATRIX DATA command)
Format of the Raw Matrix Data File (MATRIX DATA command)


Format of the Raw Matrix Data File (MATRIX DATA command)

MATRIX DATA (command),MATRIX DATA (command),MATRIX DATA (command)
entering data,entering data,entering data
raw matrix data files,raw matrix data files,raw matrix data files
format,format,format

• If LIST is in effect on the FORMAT subcommand, the data are entered in freefield format, with blanks and commas used as separators and each scalar, vector, or row of the matrix beginning on a new record. Unlike LIST format with DATA LIST, a vector or row of the matrix can be contained on multiple records. The continuation records do not have a value for ROWTYPE_.

• ROWTYPE_ values can be enclosed in quotes.

• The order of variables in the raw data file must match the order in which they are specified on VARIABLES. However, this order does not have to correspond to the order of variables in the resulting matrix data file.

• The way records are entered for pooled vectors or matrices when factors are present depends upon whether ROWTYPE_ is specified on the VARIABLES subcommand. See the topic FACTORS Subcommand (MATRIX DATA command) for more information.

MATRIX DATA (command),MATRIX DATA (command),MATRIX DATA (command)
scientific notation,scientific notation,scientific notation
MATRIX DATA (command),MATRIX DATA (command),MATRIX DATA (command)
field separators,field separators,field separators

• MATRIX DATA recognizes plus and minus signs as field separators when they are not preceded by the letter D or E. This allows MATRIX DATA to read scientific notation as well as correlation matrices written by FORTRAN in F10.8 format. A plus sign preceded by a D or E is read as part of the number in scientific notation.

Related Topics

Operations (MATRIX DATA command)


VARIABLES Subcommand (MATRIX DATA command)

MATRIX DATA (command),MATRIX DATA (command),MATRIX DATA (command)
VARIABLES subcommand,VARIABLES subcommand,VARIABLES subcommand
VARIABLES (subcommand),VARIABLES (subcommand),VARIABLES (subcommand)
MATRIX DATA command,MATRIX DATA command,MATRIX DATA command

VARIABLES specifies the names of the variables in the raw data and the order in which they occur.

• VARIABLES is required.

• There is no limit to the number of variables that can be specified.

• If ROWTYPE_ is specified on VARIABLES, the continuous variables must be the last variables specified on the subcommand and must be last in the data.

• If split-file variables are present, they must also be specified on SPLIT.

• If factor variables are present, they must also be specified on FACTORS.

When either of the following is true, the only variables that must be specified on VARIABLES are the continuous variables:

1. The data contain only correlation coefficients. There can be no additional information, such as the mean and standard deviation, and no factor information or split-file variables. MATRIX DATA assigns the record type CORR to all records.

2. CONTENTS is used to define all record types. The data can then contain information such as the mean and standard deviation, but no factor, split-file, or ROWTYPE_ variables. MATRIX DATA assigns the record types defined on the CONTENTS subcommand.

Related Topics

MATRIX DATA
Overview (MATRIX DATA command)
Examples (MATRIX DATA command)
Operations (MATRIX DATA command)
FILE Subcommand (MATRIX DATA command)
FORMAT Subcommand (MATRIX DATA command)
SPLIT Subcommand (MATRIX DATA command)
FACTORS Subcommand (MATRIX DATA command)
CELLS Subcommand (MATRIX DATA command)
CONTENTS Subcommand (MATRIX DATA command)
N Subcommand (MATRIX DATA command)
Variable VARNAME_ (MATRIX DATA command)
Variable ROWTYPE_ (MATRIX DATA command)


Variable VARNAME_ (MATRIX DATA command)

MATRIX DATA (command),MATRIX DATA (command),MATRIX DATA (command)
VARNAME_ variable,VARNAME_ variable,VARNAME_ variable

VARNAME_ cannot be specified on the VARIABLES subcommand or anywhere on MATRIX DATA, and its values cannot be included in the data. The MATRIX DATA command generates the variable VARNAME_ automatically.

Related Topics

VARIABLES Subcommand (MATRIX DATA command)
Variable ROWTYPE_ (MATRIX DATA command)


Variable ROWTYPE_ (MATRIX DATA command)

ROWTYPE_ variable,ROWTYPE_ variable,ROWTYPE_ variable
MATRIX DATA command,MATRIX DATA command,MATRIX DATA command
MATRIX DATA (command),MATRIX DATA (command),MATRIX DATA (command)
ROWTYPE_ variable,ROWTYPE_ variable,ROWTYPE_ variable

• ROWTYPE_ is a string variable with A8 format. Its values define the data types. All matrix data files contain a ROWTYPE_ variable.

• If ROWTYPE_ is specified on VARIABLES and its values are entered in the data, MATRIX DATA is primarily used to define the names and order of the variables in the raw data file.

• ROWTYPE_ must precede the continuous variables.

• Valid values for ROWTYPE_ are CORR, COV, MAT, MSE, DFE, MEAN, STDDEV (or SD), N_VECTOR (or N), N_SCALAR, N_MATRIX, COUNT, or PROX. For definitions of these values. See the topic CONTENTS Subcommand (MATRIX DATA command) for more information. Three-character abbreviations for these values are permitted. These values can also be enclosed in quotation marks or apostrophes.

• If ROWTYPE_ is not specified on VARIABLES, CONTENTS must be used to define the order in which the records occur within the file. MATRIX DATA follows these specifications strictly and generates a ROWTYPE_ variable according to the CONTENTS specifications. A data-entry error, especially skipping a record, can cause the procedure to assign the wrong values to the wrong records.

Example

* ROWTYPE_ is specified on VARIABLES.

MATRIX DATA
     VARIABLES=ROWTYPE_ SAVINGS POP15 POP75 INCOME GROWTH.
BEGIN DATA
MEAN 9.6710 35.0896 2.2930 1106.7784 3.7576
STDDEV 4.4804 9.1517 1.2907 990.8511 2.8699
N 50 50 50 50 50
CORR 1
CORR -.4555 1
CORR .3165 -.9085 1
CORR .2203 -.7562 .7870 1
CORR .3048 -.0478 .0253 -.1295  1
END DATA.

• ROWTYPE_ is specified on VARIABLES. ROWTYPE_ values in the data identify each record type.

• Note that VARNAME_ is not specified on VARIABLES, and its values are not entered in the data.

Example

* ROWTYPE_ is specified on VARIABLES.

MATRIX DATA
     VARIABLES=ROWTYPE_ SAVINGS POP15 POP75 INCOME GROWTH.
BEGIN DATA
'MEAN    ' 9.6710 35.0896 2.2930 1106.7784 3.7576
'SD      ' 4.4804 9.1517 1.2907 990.8511 2.8699
'N       ' 50 50 50 50 50
"CORR    " 1
"CORR    " -.4555 1
"CORR    " .3165 -.9085 1
"CORR    " .2203 -.7562 .7870 1
"CORR    " .3048 -.0478 .0253 -.1295  1
END DATA.

• ROWTYPE_ values for the mean, standard deviation, N, and Pearson correlation coefficients are abbreviated and enclosed in quotes.

Example

* ROWTYPE_ is not specified on VARIABLES.

MATRIX DATA VARIABLES=SAVINGS POP15 POP75 INCOME GROWTH
  /CONTENTS=MEAN SD N CORR.
BEGIN DATA
9.6710 35.0896 2.2930 1106.7784 3.7576
4.4804 9.1517 1.2907 990.8511 2.8699
50 50 50 50 50
 1
-.4555 1
 .3165 -.9085 1
 .2203 -.7562 .7870 1
 .3048 -.0478 .0253 -.1295 1
END DATA.

• ROWTYPE_ is not specified on VARIABLES, and its values are not included in the data.

• CONTENTS is required to define the record types and the order of the records in the file.

Related Topics

VARIABLES Subcommand (MATRIX DATA command)
Variable VARNAME_ (MATRIX DATA command)


FILE Subcommand (MATRIX DATA command)

MATRIX DATA (command),MATRIX DATA (command),MATRIX DATA (command)
FILE subcommand,FILE subcommand,FILE subcommand
FILE (subcommand),FILE (subcommand),FILE (subcommand)
MATRIX DATA command,MATRIX DATA command,MATRIX DATA command
INLINE (keyword),INLINE (keyword),INLINE (keyword)
MATRIX DATA command,MATRIX DATA command,MATRIX DATA command

FILE specifies the matrix file containing the data. The default specification is INLINE, which indicates that the data are included within the command sequence between the BEGIN DATA and END DATA commands.

• If the data are in an external file, FILE must specify the file.

• If the FILE subcommand is omitted, the data must be inline.

Example

MATRIX DATA FILE=RAWMTX /VARIABLES=varlist.

• FILE indicates that the data are in the file RAWMTX.

Related Topics

MATRIX DATA
Overview (MATRIX DATA command)
Examples (MATRIX DATA command)
Operations (MATRIX DATA command)
VARIABLES Subcommand (MATRIX DATA command)
FORMAT Subcommand (MATRIX DATA command)
SPLIT Subcommand (MATRIX DATA command)
FACTORS Subcommand (MATRIX DATA command)
CELLS Subcommand (MATRIX DATA command)
CONTENTS Subcommand (MATRIX DATA command)
N Subcommand (MATRIX DATA command)


FORMAT Subcommand (MATRIX DATA command)

MATRIX DATA (command),MATRIX DATA (command),MATRIX DATA (command)
FORMAT subcommand,FORMAT subcommand,FORMAT subcommand
FORMAT (subcommand),FORMAT (subcommand),FORMAT (subcommand)
MATRIX DATA command,MATRIX DATA command,MATRIX DATA command

FORMAT indicates how the matrix data are formatted. It applies only to matrix values in the data, not to vector values, such as the mean and standard deviation.

• FORMAT can specify up to three keywords: one to specify the data-entry format, one to specify matrix shape, and one to specify whether the data include diagonal values.

• The minimum specification is a single keyword.

• Default settings remain in effect unless explicitly overridden.

Related Topics

MATRIX DATA
Overview (MATRIX DATA command)
Examples (MATRIX DATA command)
Operations (MATRIX DATA command)
VARIABLES Subcommand (MATRIX DATA command)
FILE Subcommand (MATRIX DATA command)
SPLIT Subcommand (MATRIX DATA command)
FACTORS Subcommand (MATRIX DATA command)
CELLS Subcommand (MATRIX DATA command)
CONTENTS Subcommand (MATRIX DATA command)
N Subcommand (MATRIX DATA command)
Data-Entry Format (MATRIX DATA command)
Matrix Shape (MATRIX DATA command)
Diagonal Values (MATRIX DATA command)


Data-Entry Format (MATRIX DATA command)

MATRIX DATA (command),MATRIX DATA (command),MATRIX DATA (command)
data-entry format,data-entry format,data-entry format

FORMAT has two keywords that specify the data-entry format:

LIST (keyword),LIST (keyword),LIST (keyword)
MATRIX DATA command,MATRIX DATA command,MATRIX DATA command
FREE (keyword),FREE (keyword),FREE (keyword)
MATRIX DATA command,MATRIX DATA command,MATRIX DATA command
LIST | Each scalar, vector, and matrix row must begin on a new record. A vector or row of the matrix may be continued on multiple records. This is the default.
FREE | Matrix rows do not need to begin on a new record. Any item can begin in the middle of a record.

Related Topics

FORMAT Subcommand (MATRIX DATA command)
Matrix Shape (MATRIX DATA command)
Diagonal Values (MATRIX DATA command)


Matrix Shape (MATRIX DATA command)

MATRIX DATA (command),MATRIX DATA (command),MATRIX DATA (command)
matrix shape,matrix shape,matrix shape

FORMAT has three keywords that specify the matrix shape. With either triangular shape, no values—not even missing indicators—are entered for the implied values in the matrix.

LOWER (keyword),LOWER (keyword),LOWER (keyword)
MATRIX DATA command,MATRIX DATA command,MATRIX DATA command
UPPER (keyword),UPPER (keyword),UPPER (keyword)
MATRIX DATA command,MATRIX DATA command,MATRIX DATA command
FULL (keyword),FULL (keyword),FULL (keyword)
MATRIX DATA command,MATRIX DATA command,MATRIX DATA command
LOWER | Read data values from the lower triangle. This is the default.
UPPER | Read data values from the upper triangle.
FULL | Read the full square matrix of data values. FULL cannot be specified with NODIAGONAL.

Related Topics

FORMAT Subcommand (MATRIX DATA command)
Data-Entry Format (MATRIX DATA command)
Diagonal Values (MATRIX DATA command)


Diagonal Values (MATRIX DATA command)

FORMAT has two keywords that refer to the diagonal values:

DIAGONAL (keyword),DIAGONAL (keyword),DIAGONAL (keyword)
MATRIX DATA command,MATRIX DATA command,MATRIX DATA command
NODIAGONAL (keyword),NODIAGONAL (keyword),NODIAGONAL (keyword)
MATRIX DATA command,MATRIX DATA command,MATRIX DATA command
DIAGONAL | Data include the diagonal values. This is the default.
NODIAGONAL | Data do not include diagonal values. The diagonal value is set to the system-missing value for all matrices except the correlation matrices. For correlation matrices, the diagonal value is set to 1. NODIAGONAL cannot be specified with FULL.

The following table shows how data might be entered for each combination of FORMAT settings that govern matrix shape and diagonal values. With UPPER NODIAGONAL and LOWER NODIAGONAL, you do not enter the matrix row that has blank values for the continuous variables. If you enter that row, MATRIX DATA cannot properly form the matrix.

Various FORMAT settings
FULL | UPPER DIAGONAL | UPPER NODIAGONAL | LOWER DIAGONAL | LOWER NODIAGONAL
MEAN 5 4 3 | MEAN 5 4 3 | MEAN 5 4 3 | MEAN 5 4 3 | MEAN 5 4 3
SD 3 2 1 | SD 3 2 1 | SD 3 2 1 | SD 3 2 1 | SD 3 2 1
N 9 9 9 | N 9 9 9 | N 9 9 9 | N 9 9 9 | N 9 9 9
CORR 1 .6 .7 | CORR 1 .6 .7 | CORR .6 .7 | CORR 1 | CORR .6
CORR .6 1 .8 | CORR 1 .8 | CORR .8 | CORR .6 1 | CORR .7 .8
CORR .7 .8 1 | CORR 1 |  | CORR .7 .8 1 |

Example

MATRIX DATA VARIABLES=ROWTYPE_ V1 TO V3
   /FORMAT=UPPER NODIAGONAL.
BEGIN DATA
MEAN   5  4  3
SD     3  2  1
N      9  9  9
CORR     .6 .7
CORR        .8
END DATA.
LIST.

• FORMAT specifies the upper-triangle format with no diagonal values. The default LIST is in effect for the data-entry format.

Example

MATRIX DATA VARIABLES=ROWTYPE_ V1 TO V3
   /FORMAT=UPPER NODIAGONAL.
BEGIN DATA
MEAN 5 4 3
SD 3 2 1
N 9 9 9
CORR .6 .7
CORR .8
END DATA.
LIST.

• This example is identical to the previous example. It shows that data do not have to be aligned in columns. Data throughout this section are aligned in columns to emphasize the matrix format.

Related Topics

FORMAT Subcommand (MATRIX DATA command)
Data-Entry Format (MATRIX DATA command)
Matrix Shape (MATRIX DATA command)


SPLIT Subcommand (MATRIX DATA command)

MATRIX DATA (command),MATRIX DATA (command),MATRIX DATA (command)
SPLIT subcommand,SPLIT subcommand,SPLIT subcommand
SPLIT (subcommand),SPLIT (subcommand),SPLIT (subcommand)
MATRIX DATA command,MATRIX DATA command,MATRIX DATA command
raw matrix data files,raw matrix data files,raw matrix data files
split files,split files,split files

SPLIT specifies the variables whose values define the split files. SPLIT must follow the VARIABLES subcommand.

• SPLIT can specify a subset of up to eight of the variables named on VARIABLES. All split variables must be numeric. The keyword TO can be used to imply variables in the order in which they are named on VARIABLES.

• A separate matrix must be included in the data for each value of each split variable. MATRIX DATA generates a complete set of matrix materials for each.

• If the data contain neither ROWTYPE_ nor split-file variables, a single split-file variable can be specified on SPLIT. This variable is not specified on the VARIABLES subcommand. MATRIX DATA generates a complete set of matrix materials for each set of matrix materials in the data and assigns values 1, 2, 3, etc., to the split variable until the end of the data is encountered.

Example

MATRIX DATA  VARIABLES=S1 ROWTYPE_ V1 TO V3 /SPLIT=S1.
BEGIN DATA
0 MEAN   5  4  3
0 SD     1  2  3
0 N      9  9  9
0 CORR   1
0 CORR  .6  1
0 CORR  .7 .8  1
1 MEAN   9  8  7
1 SD     5  6  7
1 N      9  9  9
1 CORR   1
1 CORR  .4  1
1 CORR  .3 .2  1
END DATA.
LIST.

• The split variable S1 has two values: 0 and 1. Two separate matrices are entered in the data, one for each value S1.

• S1 must be specified on both VARIABLES and SPLIT.

Example

MATRIX DATA VARIABLES=V1 TO V3 /CONTENTS=MEAN SD N CORR
   /SPLIT=SPL.
BEGIN DATA
  5  4  3
  1  2  3
  9  9  9
  1
 .6  1
 .7 .8  1
  9  8  7
  5  6  7
  9  9  9
  1
 .4  1
 .3 .2  1
END DATA.
LIST.

• The split variable SPL is not specified on VARIABLES, and values for SPL are not included in the data.

• Two sets of matrix materials are included in the data. MATRIX DATA therefore assigns values 1 and 2 to variable SPL and generates two matrices in the matrix data file.

Related Topics

MATRIX DATA
Overview (MATRIX DATA command)
Examples (MATRIX DATA command)
Operations (MATRIX DATA command)
VARIABLES Subcommand (MATRIX DATA command)
FILE Subcommand (MATRIX DATA command)
FORMAT Subcommand (MATRIX DATA command)
FACTORS Subcommand (MATRIX DATA command)
CELLS Subcommand (MATRIX DATA command)
CONTENTS Subcommand (MATRIX DATA command)
N Subcommand (MATRIX DATA command)


FACTORS Subcommand (MATRIX DATA command)

MATRIX DATA (command),MATRIX DATA (command),MATRIX DATA (command)
FACTORS subcommand,FACTORS subcommand,FACTORS subcommand
FACTORS (subcommand),FACTORS (subcommand),FACTORS (subcommand)
MATRIX DATA command,MATRIX DATA command,MATRIX DATA command
raw matrix data files,raw matrix data files,raw matrix data files
factors,factors,factors

FACTORS specifies the variables whose values define the cells represented by the within-cells data. FACTORS must follow the VARIABLES subcommand.

• FACTORS specifies a subset of the variables named on the VARIABLES subcommand. The keyword TO can be used to imply variables in the order in which they are named on VARIABLES.

• If ROWTYPE_ is explicit on VARIABLES and its values are included in the data, records that represent pooled information have the system-missing value (indicated by a period) for the factors, since the values of ROWTYPE_ are ambiguous.

• If ROWTYPE_ is not specified on VARIABLES and its values are not in the data, enter data values for the factors only for records that represent within-cells information. Enter nothing for the factors for records that represent pooled information. CELLS must be specified to indicate the number of within-cells records, and CONTENTS must be specified to indicate which record types have within-cells data.

Example

* Rowtype is explicit.

MATRIX DATA VARIABLES=ROWTYPE_ F1 F2  VAR1 TO VAR3
  /FACTORS=F1 F2.
BEGIN DATA
MEAN 1 1  1  2  3
SD   1 1  5  4  3
N    1 1  9  9  9
MEAN 1 2  4  5  6
SD   1 2  6  5  4
N    1 2  9  9  9
MEAN 2 1  7  8  9
SD   2 1  7  6  5
N    2 1  9  9  9
MEAN 2 2  9  8  7
SD   2 2  8  7  6
N    2 2  9  9  9
CORR . . .1
CORR . . .6  1
CORR . . .7 .8  1
END DATA.

• ROWTYPE_ is specified on VARIABLES.

• Factor variables must be specified on both VARIABLES and FACTORS.

• Periods in the data represent missing values for the CORR factor values.

Example

* Rowtype is implicit.

MATRIX DATA VARIABLES=F1 F2  VAR1 TO VAR3
  /FACTORS=F1 F2 /CONTENTS=(MEAN SD N) CORR /CELLS=4.
BEGIN DATA
1 1  1  2  3
1 1  5  4  3
1 1  9  9  9
1 2  4  5  6
1 2  6  5  4
1 2  9  9  9
2 1  7  8  9
2 1  7  6  5
2 1  9  9  9
2 2  9  8  7
2 2  8  7  6
2 2  9  9  9
     1
    .6  1
    .7 .8 1
END DATA.

• ROWTYPE_ is not specified on VARIABLES.

• Nothing is entered for the CORR factor values because the records contain pooled information.

• CELLS is required because there are factors in the data and ROWTYPE_ is implicit.

• CONTENTS is required to define the record types and to differentiate between the within-cells and pooled types.

Related Topics

MATRIX DATA
Overview (MATRIX DATA command)
Examples (MATRIX DATA command)
Operations (MATRIX DATA command)
VARIABLES Subcommand (MATRIX DATA command)
FILE Subcommand (MATRIX DATA command)
FORMAT Subcommand (MATRIX DATA command)
SPLIT Subcommand (MATRIX DATA command)
CELLS Subcommand (MATRIX DATA command)
CONTENTS Subcommand (MATRIX DATA command)
N Subcommand (MATRIX DATA command)


CELLS Subcommand (MATRIX DATA command)

MATRIX DATA (command),MATRIX DATA (command),MATRIX DATA (command)
CELLS subcommand,CELLS subcommand,CELLS subcommand
CELLS (subcommand),CELLS (subcommand),CELLS (subcommand)
MATRIX DATA command,MATRIX DATA command,MATRIX DATA command
raw matrix data files,raw matrix data files,raw matrix data files
within-cells records,within-cells records,within-cells records

CELLS specifies the number of within-cells records in the data. The only valid specification for CELLS is a single integer, which indicates the number of sets of within-cells information that MATRIX DATA must read.

• CELLS is required when there are factors in the data and ROWTYPE_ is implicit.

• If CELLS is used when ROWTYPE_ is specified on VARIABLES, MATRIX DATA issues a warning and ignores the CELLS subcommand.

Example

MATRIX DATA VARIABLES=F1 VAR1 TO VAR3 /FACTORS=F1 /CELLS=2
  /CONTENTS=(MEAN SD N) CORR.
BEGIN DATA
1  5  4  3
1  3  2  1
1  9  9  9
2  8  7  6
2  6  7  8
2  9  9  9
   1
  .6  1
  .7 .8  1
END DATA.

• The specification for CELLS is 2 because the factor variable F1 has two values (1 and 2) and there are therefore two sets of within-cells information.

• If there were two factor variables, F1 and F2, and each had two values, 1 and 2, CELLS would equal 4 to account for all four possible factor combinations (assuming all that 4 combinations are present in the data).

Related Topics

MATRIX DATA
Overview (MATRIX DATA command)
Examples (MATRIX DATA command)
Operations (MATRIX DATA command)
VARIABLES Subcommand (MATRIX DATA command)
FILE Subcommand (MATRIX DATA command)
FORMAT Subcommand (MATRIX DATA command)
SPLIT Subcommand (MATRIX DATA command)
FACTORS Subcommand (MATRIX DATA command)
CONTENTS Subcommand (MATRIX DATA command)
N Subcommand (MATRIX DATA command)


CONTENTS Subcommand (MATRIX DATA command)

MATRIX DATA (command),MATRIX DATA (command),MATRIX DATA (command)
CONTENTS subcommand,CONTENTS subcommand,CONTENTS subcommand
CONTENTS (subcommand),CONTENTS (subcommand),CONTENTS (subcommand)
MATRIX DATA command,MATRIX DATA command,MATRIX DATA command
raw matrix data files,raw matrix data files,raw matrix data files
record types,record types,record types

CONTENTS defines the record types when ROWTYPE_ is not included in the data. The minimum specification is a single keyword indicating a type of record. The default is CORR.

• CONTENTS is required to define record types and record order whenever ROWTYPE_ is not specified on VARIABLES and its values are not in the data. The only exception to this rule is the rare situation in which all data values represent pooled correlation records and there are no factors. In that case, MATRIX DATA reads the data values and assigns the default ROWTYPE_ of CORR to all records.

• The order in which keywords are specified on CONTENTS must correspond to the order in which records appear in the data. If the keywords on CONTENTS are in the wrong order, MATRIX DATA will incorrectly assign values.

CORR (keyword),CORR (keyword),CORR (keyword)
MATRIX DATA command,MATRIX DATA command,MATRIX DATA command
COV (keyword),COV (keyword),COV (keyword)
MATRIX DATA command,MATRIX DATA command,MATRIX DATA command
MAT (keyword),MAT (keyword),MAT (keyword)
MATRIX DATA command,MATRIX DATA command,MATRIX DATA command
MSE (keyword),MSE (keyword),MSE (keyword)
MATRIX DATA command,MATRIX DATA command,MATRIX DATA command
DFE (keyword),DFE (keyword),DFE (keyword)
MATRIX DATA command,MATRIX DATA command,MATRIX DATA command
MEAN (keyword),MEAN (keyword),MEAN (keyword)
MATRIX DATA command,MATRIX DATA command,MATRIX DATA command
SD (keyword),SD (keyword),SD (keyword)
MATRIX DATA command,MATRIX DATA command,MATRIX DATA command
STDDEV (keyword),STDDEV (keyword),STDDEV (keyword)
MATRIX DATA command,MATRIX DATA command,MATRIX DATA command
N_VECTOR (keyword),N_VECTOR (keyword),N_VECTOR (keyword)
MATRIX DATA command,MATRIX DATA command,MATRIX DATA command
N (keyword),N (keyword),N (keyword)
MATRIX DATA command,MATRIX DATA command,MATRIX DATA command
N_SCALAR (keyword),N_SCALAR (keyword),N_SCALAR (keyword)
MATRIX DATA command,MATRIX DATA command,MATRIX DATA command
N_MATRIX (keyword),N_MATRIX (keyword),N_MATRIX (keyword)
MATRIX DATA command,MATRIX DATA command,MATRIX DATA command
COUNT (keyword),COUNT (keyword),COUNT (keyword)
MATRIX DATA command,MATRIX DATA command,MATRIX DATA command
PROX (keyword),PROX (keyword),PROX (keyword)
MATRIX DATA command,MATRIX DATA command,MATRIX DATA command
CORR | Matrix of correlation coefficients. This is the default. If ROWTYPE_ is not specified on the VARIABLES subcommand and you omit the CONTENTS subcommand, MATRIX DATA assigns the ROWTYPE_ value CORR to all matrix rows.
COV | Matrix of covariance coefficients.
MAT | Generic square matrix.
MSE | Vector of mean squared errors.
DFE | Vector of degrees of freedom.
MEAN | Vector of means.
STDDEV | Vector of standard deviations. SD is a synonym for STDDEV. MATRIX DATA assigns the ROWTYPE_ value STDDEV to the record if either STDDEV or SD is specified.
N_VECTOR | Vector of counts. N is a synonym for N_VECTOR. MATRIX DATA assigns the ROWTYPE_ value N to the record.
N_SCALAR | Count. Scalars are a shorthand mechanism for representing vectors in which all elements have the same value, such as when a vector of N’s is calculated using listwise deletion of missing values. Enter N_SCALAR as the ROWTYPE_ value in the data and then the N_SCALAR value for the first continuous variable only. MATRIX DATA assigns the ROWTYPE_ value N to the record and copies the specified N_SCALAR value across all of the continuous variables.
N_MATRIX | Square matrix of counts. Enter N_MATRIX as the ROWTYPE_ value for each row of counts in the data. MATRIX DATA assigns the ROWTYPE_ value N to each of those rows.
COUNT | Count vector accepted by procedure DISCRIMINANT. This contains unweighted N’s.
PROX | Matrix produced by PROXIMITIES. Any proximity matrix can be used with PROXIMITIES or CLUSTER. A value label of SIMILARITY or DISSIMILARITY should be specified for PROX by using the VALUE LABELS command after END DATA.

Example

MATRIX DATA VARIABLES=V1 TO V3 /CONTENTS=MEAN SD N_SCALAR CORR.
BEGIN DATA
  5  4  3
  3  2  1
  9
  1
 .6  1
 .7 .8  1
END DATA.
LIST.

• ROWTYPE_ is not specified on VARIABLES, and ROWTYPE_ values are not in the data. CONTENTS is therefore required to identify record types.

• CONTENTS indicates that the matrix records are in the following order: mean, standard deviation, N, and correlation coefficients.

• The N_SCALAR value is entered for the first continuous variable only.

Example

MATRIX DATA VARIABLES=V1 TO V3 /CONTENTS=PROX.
BEGIN DATA

data records

END DATA.
VALUE LABELS ROWTYPE_ 'PROX' 'DISSIMILARITY'.

• CONTENTS specifies PROX to read a raw matrix and create a matrix data file in the same format as one produced by procedure PROXIMITIES. PROX is assigned the value label DISSIMILARITY.

Related Topics

MATRIX DATA
Overview (MATRIX DATA command)
Examples (MATRIX DATA command)
Operations (MATRIX DATA command)
VARIABLES Subcommand (MATRIX DATA command)
FILE Subcommand (MATRIX DATA command)
FORMAT Subcommand (MATRIX DATA command)
SPLIT Subcommand (MATRIX DATA command)
FACTORS Subcommand (MATRIX DATA command)
CELLS Subcommand (MATRIX DATA command)
N Subcommand (MATRIX DATA command)
Within-Cells Record Definition (MATRIX DATA command)
Optional Specification When ROWTYPE_ Is Explicit (MATRIX DATA command)


Within-Cells Record Definition (MATRIX DATA command)

raw matrix data files,raw matrix data files,raw matrix data files
within-cells records,within-cells records,within-cells records
raw matrix data files,raw matrix data files,raw matrix data files
factors,factors,factors

When the data include factors and ROWTYPE_ is not specified, CONTENTS distinguishes between within-cells and pooled records by enclosing the keywords for within-cells records in parentheses.

• If the records associated with the within-cells keywords appear together for each set of factor values, enclose the keywords together within a single set of parentheses.

• If the records associated with each within-cells keyword are grouped together across factor values, enclose the keyword within its own parentheses.

Example

MATRIX DATA VARIABLES=F1 VAR1 TO VAR3 /FACTORS=F1 /CELLS=2
  /CONTENTS=(MEAN SD N) CORR.

• MEAN, SD, and N contain within-cells information and are therefore specified within parentheses. CORR is outside the parentheses because it identifies pooled records.

• CELLS is required because there is a factor specified and ROWTYPE_ is implicit.

Example

MATRIX DATA VARIABLES=F1 VAR1 TO VAR3 /FACTORS=F1 /CELLS=2
  /CONTENTS=(MEAN SD N) CORR.
BEGIN DATA
1  5  4  3
1  3  2  1
1  9  9  9
2  4  5  6
2  6  5  4
2  9  9  9
   1
  .6  1
  .7 .8  1
END DATA.

• The parentheses around the CONTENTS keywords indicate that the mean, standard deviation, and N for value 1 of factor F1 are together, followed by the mean, standard deviation, and N for value 2 of factor F1.

Example

MATRIX DATA VARIABLES=F1 VAR1 TO VAR3 /FACTORS=F1 /CELLS=2
  /CONTENTS=(MEAN) (SD) (N) CORR.
BEGIN DATA
1  5  4  3
2  4  5  6
1  3  2  1
2  6  5  4
1  9  9  9
2  9  9  9
   1
  .6  1
  .7 .8  1
END DATA.

• The parentheses around each CONTENTS keyword indicate that the data include the means for all cells, followed by the standard deviations for all cells, followed by the N values for all cells.

Example

MATRIX DATA VARIABLES=F1 VAR1 TO VAR3 /FACTORS=F1 /CELLS=2
  /CONTENTS=(MEAN SD) (N) CORR.
BEGIN DATA
1  5  4  3
1  3  2  1
2  4  5  6
2  6  5  4
1  9  9  9
2  9  9  9
   1
  .6  1
  .7 .8  1
END DATA.

• The parentheses around the CONTENTS keywords indicate that the data include the mean and standard deviation for value 1 of F1, followed by the mean and standard deviation for value 2 of F1, followed by the N values for all cells.

Related Topics

CONTENTS Subcommand (MATRIX DATA command)
Optional Specification When ROWTYPE_ Is Explicit (MATRIX DATA command)


Optional Specification When ROWTYPE_ Is Explicit (MATRIX DATA command)

When ROWTYPE_ is explicitly named on VARIABLES, MATRIX DATA uses ROWTYPE_ values to determine record types.

• When ROWTYPE_ is explicitly named on VARIABLES, CONTENTS can be used for informational purposes. However, ROWTYPE_ values in the data determine record types.

• If MATRIX DATA reads values for ROWTYPE_ that are not specified on CONTENTS, it issues a warning.

• Missing values for factors are entered as periods, even though CONTENTS is specified. See the topic FACTORS Subcommand (MATRIX DATA command) for more information.

Example

MATRIX DATA VARIABLES=ROWTYPE_ F1 F2 VAR1 TO VAR3
  /FACTORS=F1 F2 /CONTENTS=(MEAN SD N) CORR.
BEGIN DATA
MEAN 1 1  1  2  3
SD   1 1  5  4  3
N    1 1  9  9  9
MEAN 1 2  4  5  6
SD   1 2  6  5  4
N    1 2  9  9  9
CORR . .  1
CORR . . .6  1
CORR . . .7 .8  1
END DATA.

• ROWTYPE_ is specified on VARIABLES. MATRIX DATA therefore uses ROWTYPE_ values in the data to identify record types.

• Because ROWTYPE_ is specified on VARIABLES, CONTENTS is optional. However, CONTENTS is specified for informational purposes. This is most useful when data are in an external file and the ROWTYPE_ values cannot be seen in the data.

• Missing values for factors are entered as periods, even though CONTENTS is specified.

Related Topics

CONTENTS Subcommand (MATRIX DATA command)
Within-Cells Record Definition (MATRIX DATA command)


N Subcommand (MATRIX DATA command)

MATRIX DATA (command),MATRIX DATA (command),MATRIX DATA (command)
N subcommand,N subcommand,N subcommand
N (subcommand),N (subcommand),N (subcommand)
MATRIX DATA command,MATRIX DATA command,MATRIX DATA command

N specifies the population N when the data do not include it. The only valid specification is an integer, which indicates the population N.

• MATRIX DATA generates one record with a ROWTYPE_ of N for each split file, and it uses the specified N value for each continuous variable.

Example

MATRIX DATA VARIABLES=V1 TO V3 /CONTENTS=MEAN SD CORR
   /N=99.
BEGIN DATA
  5  4  3
  3  4  5
  1
 .6  1
 .7 .8  1
END DATA.

• MATRIX DATA uses 99 as the N value for all continuous variables.

Related Topics

MATRIX DATA
Overview (MATRIX DATA command)
Examples (MATRIX DATA command)
Operations (MATRIX DATA command)
VARIABLES Subcommand (MATRIX DATA command)
FILE Subcommand (MATRIX DATA command)
FORMAT Subcommand (MATRIX DATA command)
SPLIT Subcommand (MATRIX DATA command)
FACTORS Subcommand (MATRIX DATA command)
CELLS Subcommand (MATRIX DATA command)
CONTENTS Subcommand (MATRIX DATA command)


MCONVERT

MCONVERT (command),MCONVERT (command),MCONVERT (command)
matrix data files,matrix data files,matrix data files
converting covariance to correlation,converting covariance to correlation,converting covariance to correlation
matrix data files,matrix data files,matrix data files
converting correlation to covariance,converting correlation to covariance,converting correlation to covariance
MCONVERT [[/MATRIX=] [IN({*   })] [OUT({*   })]]
                         {file}        {file}
         [{/REPLACE}]
          {/APPEND }

Example

MCONVERT MATRIX=OUT(CORMTX) /APPEND.

Related Topics

Overview (MCONVERT command)
Examples (MCONVERT command)
MATRIX Subcommand (MCONVERT command)
REPLACE and APPEND Subcommands (MCONVERT command)


Overview (MCONVERT command)

MCONVERT converts covariance matrix materials to correlation matrix materials, or vice versa. For MCONVERT to convert a correlation matrix, the matrix data must contain CORR values (Pearson correlation coefficients) and a vector of standard deviations (STDDEV). For MCONVERT to convert a covariance matrix, only COV values are required in the data.

Options Collapse Hide details

Options

Matrix Files. MCONVERT can read matrix materials from an external matrix data file, and it can write converted matrix materials to an external file.

Matrix Materials. MCONVERT can write the converted matrix only or both the converted matrix and the original matrix to the resulting matrix data file.

Basic Specification Collapse Hide details

Basic Specification

The minimum specification is the command itself. By default, MCONVERT reads the original matrix from the active dataset and then replaces it with the converted matrix.

Syntax Rules Collapse Hide details

Syntax Rules

• The keywords IN and OUT cannot specify the same external file.

• The APPEND and REPLACE subcommands cannot be specified on the same MCONVERT command.

Operations Collapse Hide details

Operations

• If the data are covariance matrix materials, MCONVERT converts them to a correlation matrix plus a vector of standard deviations.

• If the data are a correlation matrix and vector of standard deviations, MCONVERT converts them to a covariance matrix.

• If there are multiple CORR or COV matrices (for example, one for each grouping (factor) or one for each split variable), each will be converted to a separate matrix, preserving the values of any factor or split variables.

• All cases with ROWTYPE_ values other than CORR or COV, such as MEAN, N, and STDDEV, are always copied into the new matrix data file.

• MCONVERT cannot read raw matrix values. If your data are raw values, use the MATRIXDATA command.

• Split variables (if any) must occur first in the file that MCONVERT reads, followed by the variable ROWTYPE_, the grouping variables (if any), and the variable VARNAME_. All variables following VARNAME_ are the variables for which a matrix will be read and created.

Limitations Collapse Hide details

Limitations

• The total number of split variables plus grouping variables cannot exceed eight.

Related Topics

MCONVERT
Examples (MCONVERT command)
MATRIX Subcommand (MCONVERT command)
REPLACE and APPEND Subcommands (MCONVERT command)


Examples (MCONVERT command)

MATRIX DATA VARIABLES=ROWTYPE_ SAVINGS POP15 POP75 INCOME GROWTH
  /FORMAT=FULL.
BEGIN DATA
COV    20.0740459  -18.678638    1.8304990  978.181242 3.9190106
COV   -18.678638    83.7541100 -10.731666 -6856.9888  -1.2561071
COV     1.8304990  -10.731666    1.6660908 1006.52742   .0937992
COV   978.181242 -6856.9888   1006.52742 981785.907 -368.18652
COV     3.9190106   -1.2561071    .0937992 -368.18652  8.2361574
END DATA.
MCONVERT.

• MATRIX DATA defines the variables in the file and creates a active dataset of matrix materials. The values for the variable ROWTYPE_ are COV, indicating that the matrix contains covariance coefficients. The FORMAT subcommand indicates that data are in full square format.

• MCONVERT converts the covariance matrix to a correlation matrix plus a vector of standard deviations. By default, the converted matrix is written to the active dataset.

Related Topics

MCONVERT
Overview (MCONVERT command)
MATRIX Subcommand (MCONVERT command)
REPLACE and APPEND Subcommands (MCONVERT command)


MATRIX Subcommand (MCONVERT command)

MCONVERT (command),MCONVERT (command),MCONVERT (command)
MATRIX subcommand,MATRIX subcommand,MATRIX subcommand
MATRIX (subcommand),MATRIX (subcommand),MATRIX (subcommand)
MCONVERT command,MCONVERT command,MCONVERT command

The MATRIX subcommand specifies the file for the matrix materials. By default, MATRIX reads the original matrix from the active dataset and replaces the active dataset with the converted matrix.

• MATRIX has two keywords, IN and OUT. The specification on both IN and OUT is the name of an external file in parentheses or an asterisk (*) to refer to the active dataset (the default).

• The actual keyword MATRIX is optional.

• IN and OUT cannot specify the same external file.

• MATRIX=IN cannot be specified unless an active dataset has already been defined. To convert an existing matrix at the beginning of a session, use GET to retrieve the matrix file and then specify IN(*) on MATRIX.

IN | The matrix file to read.
OUT | The matrix file to write.

Example

GET FILE=COVMTX.
MCONVERT MATRIX=OUT(CORMTX).

• GET retrieves the matrix data file COVMTX. COVMTX becomes the active dataset.

• By default, MCONVERT reads the original matrix from the active dataset. IN(*) can be specified to make the default explicit.

• The keyword OUT on MATRIX writes the converted matrix to file CORMTX.

Related Topics

MCONVERT
Overview (MCONVERT command)
Examples (MCONVERT command)
REPLACE and APPEND Subcommands (MCONVERT command)


REPLACE and APPEND Subcommands (MCONVERT command)

MCONVERT (command),MCONVERT (command),MCONVERT (command)
REPLACE subcommand,REPLACE subcommand,REPLACE subcommand
REPLACE (subcommand),REPLACE (subcommand),REPLACE (subcommand)
MCONVERT command,MCONVERT command,MCONVERT command
APPEND (subcommand),APPEND (subcommand),APPEND (subcommand)
MCONVERT command,MCONVERT command,MCONVERT command
MCONVERT (command),MCONVERT (command),MCONVERT (command)
APPEND subcommand,APPEND subcommand,APPEND subcommand

By default, MCONVERT writes only the converted matrix to the resulting matrix file. Use APPEND to copy both the original matrix and the converted matrix.

• The only specification is the keyword REPLACE or APPEND.

• REPLACE and APPEND are alternatives.

• REPLACE and APPEND affect the resulting matrix file only. The original matrix materials, whether in the active dataset or in an external file, remain intact.

APPEND | Write the original matrix followed by the converted matrix to the matrix file. If there are multiple sets of matrix materials, APPEND appends each converted matrix to the end of a copy of its original matrix.
REPLACE | Write the original matrix followed by the covariance matrix to the matrix file.

Example

MCONVERT MATRIX=OUT(COVMTX) /APPEND.

• MCONVERT reads matrix materials from the active dataset.

• The APPEND subcommand copies original matrix materials, appends each converted matrix to the end of the copy of its original matrix, and writes both sets to the file COVMTX.

Related Topics

MCONVERT
Overview (MCONVERT command)
Examples (MCONVERT command)
MATRIX Subcommand (MCONVERT command)


MEANS

MEANS (command),MEANS (command),MEANS (command)
MEANS (command),MEANS (command),MEANS (command)
syntax chart,syntax chart,syntax chart
BREAKDOWN (command). See MEANS,BREAKDOWN (command). See MEANS,BREAKDOWN (command). See MEANS

MEANS is available in the Statistics Base option.

MEANS [TABLES=]{varlist} [BY varlist] [BY...] [/varlist...]
               {ALL    }

 [/MISSING={TABLE     }]
           {INCLUDE  }
           {DEPENDENT}

 [/CELLS= [MEAN**  ] [COUNT**  ]  [STDDEV**]
          [MEDIAN] [GMEDIAN] [SEMEAN]  [SUM ]
          [MIN] [MAX] [RANGE] [VARIANCE]
          [KURT] [SEKURT] [SKEW] [SESKEW]
          [FIRST] [LAST]
          [NPCT] [SPCT] [NPCT(var)] [SPCT(var)]
          [HARMONIC] [GEOMETRIC]
          [DEFAULT]
          [ALL] ]

 [/STATISTICS=[ANOVA] [{LINEARITY}]  [NONE**]]
                       {ALL      }

**Default if the subcommand is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See MEANS Algorithms for computational details for this procedure.

Syntax for the MEANS command can be generated from the Means dialog.

Example

MEANS TABLES=V1 TO V5 BY GROUP.

Related Topics

Overview (MEANS command)
Examples (MEANS command)
TABLES Subcommand (MEANS command)
CELLS Subcommand (MEANS command)
STATISTICS Subcommand (MEANS command)
MISSING Subcommand (MEANS command)
References (MEANS command)


Overview (MEANS command)

general mode,general mode,general mode
MEANS command,MEANS command,MEANS command
MEANS (command),MEANS (command),MEANS (command)
limitations,limitations,limitations

By default, MEANS (alias BREAKDOWN) displays means, standard deviations, and group counts for a numeric dependent variable and group counts for a string variable within groups defined by one or more control (independent) variables. Other procedures that display univariate statistics are SUMMARIZE, FREQUENCIES, and DESCRIPTIVES.

Options Collapse Hide details

Options

Cell Contents. By default, MEANS displays means, standard deviations, and cell counts for a dependent variable across groups defined by one or more control variables. You can also display sums and variances using the CELLS subcommand.

Statistics. In addition to the statistics displayed for each cell of the table, you can obtain a one-way analysis of variance and test of linearity using the STATISTICS subcommand.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is TABLES with a table list. The actual keyword TABLES can be omitted.

• The minimum table list specifies a dependent variable.

• By default, MEANS displays means, standard deviations, and number of cases.

Subcommand Order Collapse Hide details

Subcommand Order

The table list must be first if the keyword TABLES is omitted. If the keyword TABLES is explicitly used, subcommands can be specified in any order.

Operations Collapse Hide details

Operations

• MEANS displays the number and percentage of the processed and missing cases in the Case Process Summary table.

• MEANS displays univariate statistics for the population as a whole and for each value of each successive control variable defined by the BY keyword on the TABLE subcommand in the Group Statistics table.

• ANOVA and linearity statistics, if requested, are displayed in the ANOVA and Measures of Association tables.

• If a string variable is specified as a dependent variable on any table lists, the MEANS procedure produces limited statistics (COUNT, FIRST, and LAST).

Limitations Collapse Hide details

Limitations

• Each TABLES subcommand can contain a maximum of 10 BY variable lists.

• There is a maximum of 30 TABLES subcommands for each MEANS command.

Related Topics

MEANS
Examples (MEANS command)
TABLES Subcommand (MEANS command)
CELLS Subcommand (MEANS command)
STATISTICS Subcommand (MEANS command)
MISSING Subcommand (MEANS command)
References (MEANS command)


Examples (MEANS command)

Specifying a Range of Dependent Variables

MEANS TABLES=V1 TO V5 BY GROUP
   /STATISTICS=ANOVA.

• TABLES specifies that V1 through V5 are the dependent variables. GROUP is the control variable.

• Assuming that variables V2, V3, and V4 lie between V1 and V5 in the active dataset, five tables are produced: V1 by GROUP, V2 by GROUP, V3 by GROUP, and so on.

• STATISTICS requests one-way analysis-of-variance tables of V1 through V5 by GROUP.

Creating Analyses for Two Separate Sets of Dependent Variables

MEANS VARA BY VARB BY VARC/V1 V2 BY V3 V4 BY V5.

• This command contains two TABLES subcommands that omit the optional TABLES keyword.

• The first table list produces a Group Statistics table for VARA within groups defined by each combination of values as well as the totals of VARB and VARC.

• The second table list produces a Group Statistics table displaying statistics for V1 by V3 by V5, V1 by V4 by V5, V2 by V3 by V5, and V2 by V4 by V5.

ANOVA and tests of linearity

MEANS
  TABLES=cigtry  BY avcig
  /CELLS MEAN COUNT STDDEV
  /STATISTICS ANOVA LINEARITY .

• The procedure specifies cigtry as the target variable and avcig as a factor.

• CELLS requests the cell means, counts, and standard deviations.

• STATISTICS requests an analysis of variance and tests of linearity.

For discussion of output from this syntax and to place the example in context, see One-way ANOVA and Test of Linearity.

Related Topics

MEANS
Overview (MEANS command)
TABLES Subcommand (MEANS command)
CELLS Subcommand (MEANS command)
STATISTICS Subcommand (MEANS command)
MISSING Subcommand (MEANS command)
References (MEANS command)


TABLES Subcommand (MEANS command)

TABLES (subcommand),TABLES (subcommand),TABLES (subcommand)
MEANS command,MEANS command,MEANS command
MEANS (command),MEANS (command),MEANS (command)
TABLES subcommand,TABLES subcommand,TABLES subcommand

TABLES specifies the table list.

• You can specify multiple TABLES subcommands on a single MEANS command (up to a maximum of 30). The slash between the subcommands is required. You can also name multiple table lists separated by slashes on one TABLES subcommand.

BY (keyword),BY (keyword),BY (keyword)
MEANS command,MEANS command,MEANS command
MEANS (command),MEANS (command),MEANS (command)
layers,layers,layers

• The dependent variable is specified first. If the dependent variable is a string variable, MEANS produces only limited statistics (COUNT, FIRST, and LAST). The control (independent) variables follow the BY keyword and can be numeric (integer or noninteger) or string.

• Each use of the keyword BY in a table list adds a dimension to the table requested. Statistics are displayed for each dependent variable by each combination of values and the totals of the control variables across dimensions. There is a maximum of 10 BY variable lists for each TABLES subcommand.

• The order in which control variables are displayed is the same as the order in which they are specified on TABLES. The values of the first control variable defined for the table appear in the leftmost column of the table and change the most slowly in the definition of groups.

• More than one dependent variable can be specified in a table list, and more than one control variable can be specified in each dimension of a table list.

Related Topics

MEANS
Overview (MEANS command)
Examples (MEANS command)
CELLS Subcommand (MEANS command)
STATISTICS Subcommand (MEANS command)
MISSING Subcommand (MEANS command)
References (MEANS command)


CELLS Subcommand (MEANS command)

MEANS (command),MEANS (command),MEANS (command)
statistics,statistics,statistics
CELLS (subcommand),CELLS (subcommand),CELLS (subcommand)
MEANS command,MEANS command,MEANS command
MEANS (command),MEANS (command),MEANS (command)
CELLS subcommand,CELLS subcommand,CELLS subcommand

By default, MEANS displays the means, standard deviations, and cell counts in each cell. Use CELLS to modify cell information.

• If CELLS is specified without keywords, MEANS displays the default statistics.

• If any keywords are specified on CELLS, only the requested information is displayed.

• MEDIAN and GMEDIAN are expensive in terms of computer resources and time. Requesting these statistics (via these keywords or ALL) may slow down performance.

standard deviation,standard deviation,standard deviation
MEANS command,MEANS command,MEANS command
mean,mean,mean
MEANS command,MEANS command,MEANS command
DEFAULT (keyword),DEFAULT (keyword),DEFAULT (keyword)
MEANS command,MEANS command,MEANS command
MEAN (keyword),MEAN (keyword),MEAN (keyword)
MEANS command,MEANS command,MEANS command
STDDEV (keyword),STDDEV (keyword),STDDEV (keyword)
MEANS command,MEANS command,MEANS command
COUNT (keyword),COUNT (keyword),COUNT (keyword)
MEANS command,MEANS command,MEANS command
MEDIAN (keyword),MEDIAN (keyword),MEDIAN (keyword)
MEANS command,MEANS command,MEANS command
GMEDIAN (keyword),GMEDIAN (keyword),GMEDIAN (keyword)
MEANS command,MEANS command,MEANS command
SEMEAN (keyword),SEMEAN (keyword),SEMEAN (keyword)
MEANS command,MEANS command,MEANS command
SUM (keyword),SUM (keyword),SUM (keyword)
MEANS command,MEANS command,MEANS command
MIN (keyword),MIN (keyword),MIN (keyword)
MEANS command,MEANS command,MEANS command
MAX (keyword),MAX (keyword),MAX (keyword)
MEANS command,MEANS command,MEANS command
RANGE (keyword),RANGE (keyword),RANGE (keyword)
MEANS command,MEANS command,MEANS command
variance,variance,variance
MEANS command,MEANS command,MEANS command
VARIANCE (keyword),VARIANCE (keyword),VARIANCE (keyword)
MEANS command,MEANS command,MEANS command
KURT (keyword),KURT (keyword),KURT (keyword)
MEANS command,MEANS command,MEANS command
SEKURT (keyword),SEKURT (keyword),SEKURT (keyword)
MEANS command,MEANS command,MEANS command
SKEW (keyword),SKEW (keyword),SKEW (keyword)
MEANS command,MEANS command,MEANS command
SESKEW (keyword),SESKEW (keyword),SESKEW (keyword)
MEANS command,MEANS command,MEANS command
FIRST (keyword),FIRST (keyword),FIRST (keyword)
MEANS command,MEANS command,MEANS command
LAST (keyword),LAST (keyword),LAST (keyword)
MEANS command,MEANS command,MEANS command
NPCT (keyword),NPCT (keyword),NPCT (keyword)
MEANS command,MEANS command,MEANS command
SPCT (keyword),SPCT (keyword),SPCT (keyword)
MEANS command,MEANS command,MEANS command
NPCT(var) (keyword),NPCT(var) (keyword),NPCT(var) (keyword)
MEANS command,MEANS command,MEANS command
SPCT(var) (keyword),SPCT(var) (keyword),SPCT(var) (keyword)
MEANS command,MEANS command,MEANS command
HARMONIC (keyword),HARMONIC (keyword),HARMONIC (keyword)
MEANS command,MEANS command,MEANS command
GEOMETRIC (keyword),GEOMETRIC (keyword),GEOMETRIC (keyword)
MEANS command,MEANS command,MEANS command
ALL (keyword),ALL (keyword),ALL (keyword)
MEANS command,MEANS command,MEANS command
DEFAULT | Means, standard deviations, and cell counts. This is the default if CELLS is omitted.
MEAN | Cell means.
STDDEV | Cell standard deviations.
COUNT | Cell counts.
MEDIAN | Cell median.
GMEDIAN | Grouped median.
SEMEAN | Standard error of cell mean.
SUM | Cell sums.
MIN | Cell minimum.
MAX | Cell maximum.
RANGE | Cell range.
VARIANCE | Variances.
KURT | Cell kurtosis.
SEKURT | Standard error of cell kurtosis.
SKEW | Cell skewness.
SESKEW | Standard error of cell skewness.
FIRST | First value.
LAST | Last value.
NPCT | Percentage of the total number of cases.
SPCT | Percentage of the total sum.
NPCT(var) | Percentage of the total number of cases within the specified variable. The specified variable must be one of the control variables.
SPCT(var) | Percentage of the total sum within the specified variable. The specified variable must be one of the control variables.
HARMONIC | Harmonic mean.
GEOMETRIC | Geometric mean.
ALL | All cell information.

Related Topics

MEANS
Overview (MEANS command)
Examples (MEANS command)
TABLES Subcommand (MEANS command)
STATISTICS Subcommand (MEANS command)
MISSING Subcommand (MEANS command)
References (MEANS command)


STATISTICS Subcommand (MEANS command)

MEANS (command),MEANS (command),MEANS (command)
STATISTICS subcommand,STATISTICS subcommand,STATISTICS subcommand
STATISTICS (subcommand),STATISTICS (subcommand),STATISTICS (subcommand)
MEANS command,MEANS command,MEANS command

Use STATISTICS to request a one-way analysis of variance and a test of linearity for each TABLE list.

• Statistics requested on STATISTICS are computed in addition to the statistics displayed in the Group Statistics table.

• If STATISTICS is specified without keywords, MEANS computes ANOVA.

• If two or more dimensions are specified, the second and subsequent dimensions are ignored in the analysis-of-variance table. To obtain a two-way and higher analysis of variance, use the ANOVA or MANOVA procedure. The ONEWAY procedure calculates a one-way analysis of variance with multiple comparison tests.

ANOVA (keyword),ANOVA (keyword),ANOVA (keyword)
MEANS command,MEANS command,MEANS command
eta,eta,eta
MEANS command,MEANS command,MEANS command
analysis of variance,analysis of variance,analysis of variance
MEANS command,MEANS command,MEANS command
linearity test,linearity test,linearity test
MEANS command,MEANS command,MEANS command
LINEARITY (keyword),LINEARITY (keyword),LINEARITY (keyword)
MEANS command,MEANS command,MEANS command
F ratio,F ratio,F ratio
MEANS command,MEANS command,MEANS command
R statistic,R statistic,R statistic
MEANS command,MEANS command,MEANS command
ALL (keyword),ALL (keyword),ALL (keyword)
MEANS command,MEANS command,MEANS command
NONE (keyword),NONE (keyword),NONE (keyword)
MEANS command,MEANS command,MEANS command
ANOVA | Analysis of variance. ANOVA displays a standard analysis-of-variance table and calculates eta and eta squared (displayed in the Measures of Association table). This is the default if STATISTICS is specified without keywords.
LINEARITY | Test of linearity. LINEARITY (alias ALL) displays additional statistics to the tables created by the ANOVA keyword: the sums of squares, degrees of freedom, and mean square associated with linear and nonlinear components, the F ratio, and significance level for the ANOVA table and Pearson’s r and r2 for the Measures of Association table. LINEARITY is ignored if the control variable is a string.
NONE | No additional statistics. This is the default if STATISTICS is omitted.

Example

MEANS TABLES=INCOME BY SEX BY RACE
  /STATISTICS=ANOVA.

• MEANS produces a Group Statistics table of INCOME by RACE within SEX and computes an analysis of variance only for INCOME by SEX.

Related Topics

MEANS
Overview (MEANS command)
Examples (MEANS command)
TABLES Subcommand (MEANS command)
CELLS Subcommand (MEANS command)
MISSING Subcommand (MEANS command)
References (MEANS command)


MISSING Subcommand (MEANS command)

MEANS (command),MEANS (command),MEANS (command)
MISSING subcommand,MISSING subcommand,MISSING subcommand
MISSING (subcommand),MISSING (subcommand),MISSING (subcommand)
MEANS command,MEANS command,MEANS command

MISSING controls the treatment of missing values. If no MISSING subcommand is specified, each combination of a dependent variable and control variables is handled separately.

TABLE (keyword),TABLE (keyword),TABLE (keyword)
MEANS command,MEANS command,MEANS command
INCLUDE (keyword),INCLUDE (keyword),INCLUDE (keyword)
MEANS command,MEANS command,MEANS command
DEPENDENT (keyword),DEPENDENT (keyword),DEPENDENT (keyword)
MEANS command,MEANS command,MEANS command
TABLE | Delete cases with missing values on a tablewise basis. A case with a missing value for any variable specified for a table is not used. Thus, every case contained in a table has a complete set of nonmissing values for all variables in that table. When you separate table requests with a slash, missing values are handled separately for each list. Any MISSING specification will result in tablewise treatment of missing values.
INCLUDE | Include user-missing values. This option treats user-missing values as valid values.
DEPENDENT | Exclude user-missing values for dependent variables only. DEPENDENT treats user-missing values for all control variables as valid.

Related Topics

MEANS
Overview (MEANS command)
Examples (MEANS command)
TABLES Subcommand (MEANS command)
CELLS Subcommand (MEANS command)
STATISTICS Subcommand (MEANS command)
References (MEANS command)


References (MEANS command)

Hays, W. L. 1981. Statistics for the social sciences, 3rd ed. New York: Holt, Rinehart, and Winston.

Related Topics

MEANS
Overview (MEANS command)
Examples (MEANS command)
TABLES Subcommand (MEANS command)
CELLS Subcommand (MEANS command)
STATISTICS Subcommand (MEANS command)
MISSING Subcommand (MEANS command)


MISSING VALUES

MISSING VALUES (command),MISSING VALUES (command),MISSING VALUES (command)
MISSING VALUES (command),MISSING VALUES (command),MISSING VALUES (command)
syntax chart,syntax chart,syntax chart
missing values,missing values,missing values
user-missing,user-missing,user-missing
missing values,missing values,missing values
defining,defining,defining
user-missing values,user-missing values,user-missing values
MISSING VALUES {varlist}(value list) [[/]{varlist} ...]
               {ALL    }                 {ALL    }

Keywords for numeric value lists:

LO, LOWEST, HI, HIGHEST, THRU

This command takes effect immediately. It does not read the active dataset or execute pending transformations. See the topic Command Order for more information.

Missing values can also be specified from the Variable View tab.

Example

MISSING VALUES V1 (8,9) V2 V3 (0) V4 ('X') V5 TO V9 ('    ').

Related Topics

Overview (MISSING VALUES command)
Examples (MISSING VALUES command)
Specifying Ranges of Missing Values (MISSING VALUES command)


Overview (MISSING VALUES command)

string variables,string variables,string variables
missing values,missing values,missing values
date format variables,date format variables,date format variables
missing values,missing values,missing values
missing values,missing values,missing values
date format variables,date format variables,date format variables
system-missing values,system-missing values,system-missing values
missing values,missing values,missing values
system-missing,system-missing,system-missing

MISSING VALUES declares values user-missing. These values can then receive special treatment in data transformations, statistical calculations, and case selection. By default, user-missing values are treated the same as the system-missing values. System-missing values are automatically assigned by the program when no legal value can be produced, such as when an alphabetical character is encountered in the data for a numeric variable, or when an illegal calculation, such as division by 0, is requested in a data transformation.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is a single variable followed by the user-missing value or values in parentheses. Each specified value for the variable is treated as user-missing for any analysis.

Syntax Rules Collapse Hide details

Syntax Rules

• Each variable can have a maximum of three individual user-missing values. A space or comma must separate each value. For numeric variables, you can also specify a range of missing values. See the topic Specifying Ranges of Missing Values (MISSING VALUES command) for more information.

• The missing-value specification must correspond to the variable type (numeric or string).

• The same values can be declared missing for more than one variable by specifying a variable list followed by the values in parentheses. Variable lists must have either all numeric or all string variables.

• Different values can be declared missing for different variables by specifying separate values for each variable. An optional slash can be used to separate specifications.

• Missing values for string variables must be enclosed in single or double quotes. The value specifications must include any leading or trailing blanks. See the topic String Values in Command Specifications for more information.

• For date format variables (for example, DATE, ADATE), missing values expressed in date formats must be enclosed in single or double quotes, and values must be expressed in the same date format as the defined date format for the variable.

• A variable list followed by an empty set of parentheses ( ) deletes any user-missing specifications for those variables.

• The keyword ALL can be used to refer to all user-defined variables in the active dataset, provided the variables are either all numeric or all string. ALL can refer to both numeric and string variables if it is followed by an empty set of parentheses. This will delete all user-missing specifications in the active dataset.

• More than one MISSING VALUES command can be specified per session.

Operations Collapse Hide details

Operations

• Unlike most transformations, MISSING VALUES takes effect as soon as it is encountered. Special attention should be paid to its position among commands. See the topic Command Order for more information.

• Missing-value specifications can be changed between procedures. New specifications replace previous ones. If a variable is mentioned more than once on one or more MISSING VALUES commands before a procedure, only the last specification is used.

• Missing-value specifications are saved in PASW Statistics data files (see SAVE) and portable files (see EXPORT).

Limitations Collapse Hide details

Limitations

Missing values for string variables cannot exceed 8 bytes. (There is no limit on the defined width of the string variable, but defined missing values cannot exceed 8 bytes.)

Related Topics

MISSING VALUES
Examples (MISSING VALUES command)
Specifying Ranges of Missing Values (MISSING VALUES command)


Examples (MISSING VALUES command)

Declaring Missing Values for Multiple Variables

MISSING VALUES V1 (8,9) V2 V3 (0) V4 ('X') V5 TO V9 ('    ').

• The values 8 and 9 are declared missing for the numeric variable V1.

• The value 0 is declared missing for the numeric variables V2 and V3.

• The value X is declared missing for the string variable V4.

• Blanks are declared missing for the string variables between and including V5 and V9. All of these variables must have a width of four columns.

Clearing Missing Values for Selected Variables

MISSING VALUES V1 ().

• Any previously declared missing values for V1 are deleted.

Declaring Missing Values for All Variables

MISSING VALUES ALL (9).

• The value 9 is declared missing for all variables in the active dataset; the variables must all be numeric. All previous user-missing specifications are overridden.

Clearing Missing Values for All Variables

MISSING VALUES ALL ().

• All previously declared user-missing values for all variables in the active dataset are deleted. The variables in the active dataset can be both numeric and string.

Related Topics

MISSING VALUES
Overview (MISSING VALUES command)
Specifying Ranges of Missing Values (MISSING VALUES command)


Specifying Ranges of Missing Values (MISSING VALUES command)

MISSING VALUES (command),MISSING VALUES (command),MISSING VALUES (command)
value range,value range,value range
THRU (keyword),THRU (keyword),THRU (keyword)
MISSING VALUES command,MISSING VALUES command,MISSING VALUES command
LOWEST (keyword),LOWEST (keyword),LOWEST (keyword)
MISSING VALUES command,MISSING VALUES command,MISSING VALUES command
HIGHEST (keyword),HIGHEST (keyword),HIGHEST (keyword)
MISSING VALUES command,MISSING VALUES command,MISSING VALUES command

A range of values can be specified as missing for numeric variables but not for string variables.

• The keyword THRU indicates an inclusive list of values. Values must be separated from THRU by at least one blank space.

• The keywords HIGHEST and LOWEST with THRU indicate the highest and lowest values of a variable. HIGHEST and LOWEST can be abbreviated to HI and LO.

• Only one THRU specification can be used for each variable or variable list. Each THRU specification can be combined with one additional missing value.

Example

MISSING VALUES  V1 (LOWEST THRU 0).

• All negative values and 0 are declared missing for the variable V1.

Example

MISSING VALUES  V1 (0 THRU 1.5).

• Values from 0 through and including 1.5 are declared missing.

Example

MISSING VALUES V1 (LO THRU 0, 999).

• All negative values, 0, and 999 are declared missing for the variable V1.

Related Topics

MISSING VALUES
Overview (MISSING VALUES command)
Examples (MISSING VALUES command)


MIXED

Linear Mixed Models,Linear Mixed Models,Linear Mixed Models
command syntax,command syntax,command syntax
MIXED (command),MIXED (command),MIXED (command)
MIXED (command),MIXED (command),MIXED (command)
syntax chart,syntax chart,syntax chart

MIXED is available in the Advanced Statistics option.

MIXED dependent varname [BY factor list] [WITH covariate list]

[/CRITERIA = [CIN({95** })] [HCONVERGE({0**  } {ABSOLUTE**})
                  {value}              {value} {RELATIVE  }

             [LCONVERGE({0**  } {ABSOLUTE**})] [MXITER({100**})]
                        {value} {RELATIVE  }           {n    }

             [MXSTEP({5**})] [PCONVERGE({1E-6**},{ABSOLUTE**})] [SCORING({1**})]
                     {n  }              {value } {RELATIVE  }            {n  }

             [SINGULAR({1E-12**})] ]
                       {value  }

[/EMMEANS = TABLES ({OVERALL          })]
                    {factor           }
                    {factor*factor ...}
            [WITH (covariate=value [covariate = value ...])
            [COMPARE [({factor})] [REFCAT({value})] [ADJ({LSD**     })] ]
                                          {FIRST}        {BONFERRONI}
                                          {LAST }        {SIDAK     }

[/FIXED = [effect [effect ...]] [| [NOINT] [SSTYPE({1  })] ] ]
                                                   {3**}

[/METHOD = {ML    }]
           {REML**}

[/MISSING = {EXCLUDE**}]
            {INCLUDE  }

[/PRINT = [CORB] [COVB] [CPS] [DESCRIPTIVES] [G] [HISTORY(1**)] [LMATRIX] [R]
                                                         (n  )
          [SOLUTION] [TESTCOV]]

[/RANDOM = effect [effect ...]
           [| [SUBJECT(varname[*varname[*...]])] [COVTYPE({VC**      })]]]
                                                          {covstruct+}

[/REGWGT = varname]

[/REPEATED = varname[*varname[*...]] | SUBJECT(varname[*varname[*...]])
             [COVTYPE({DIAG**    })]]
                      {covstruct†}

[/SAVE = [tempvar [(name)] [tempvar [(name)]] ...]

[/TEST[(valuelist)] =
    ['label']  effect valuelist ... [| effect valuelist ...] [divisor=value]]
    [; effect valuelist ... [| effect valuelist ...] [divisor=value]]

[/TEST[(valuelist)] = ['label'] ALL list [| list] [divisor=value]]
                      [; ALL list [| list] [divisor=value]]

** Default if the subcommand is omitted.

† covstruct can take the following values: AD1, AR1, ARH1, ARMA11, CS, CSH, CSR, DIAG, FA1, FAH1, HF, ID, TP, TPH, UN, UNR, VC.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See MIXED Algorithms for computational details for this procedure.

Syntax for the MIXED command can be generated from the Linear Mixed Models dialog box.

Example

MIXED Y.

Related Topics

Overview (MIXED command)
Examples
Case Frequency (MIXED command)
Covariance Structure List (MIXED command)
Variable List (MIXED command)
CRITERIA Subcommand (MIXED command)
EMMEANS Subcommand (MIXED command)
FIXED Subcommand (MIXED command)
METHOD Subcommand (MIXED command)
MISSING Subcommand (MIXED command)
PRINT Subcommand (MIXED command)
RANDOM Subcommand (MIXED command)
REGWGT Subcommand (MIXED command)
REPEATED Subcommand (MIXED command)
SAVE Subcommand (MIXED command)
TEST Subcommand (MIXED command)
Interpretation of Random Effect Covariance Structures (MIXED command)


Overview (MIXED command)

MIXED (command),MIXED (command),MIXED (command)
model examples,model examples,model examples
MIXED (command),MIXED (command),MIXED (command)
overview,overview,overview

The MIXED procedure fits a variety of mixed linear models. The mixed linear model expands the general linear model used in the GLM procedure in that the data are permitted to exhibit correlation and non-constant variability. The mixed linear model, therefore, provides the flexibility of modeling not only the means of the data but also their variances and covariances.

The MIXED procedure is also a flexible tool for fitting other models that can be formulated as mixed linear models. Such models include multilevel models, hierarchical linear models, and random coefficient models.

Important Changes to MIXED Compared to Previous Versions Collapse Hide details

Important Changes to MIXED Compared to Previous Versions

Independence of random effects. Prior to version 11.5, random effects were assumed to be independent. If you are using MIXED syntax jobs from a version prior to 11.5, be aware that the interpretation of the covariance structure may have changed. See the topic Interpretation of Random Effect Covariance Structures (MIXED command) for more information.

Default covariance structures. Prior to version 11.5, the default covariance structure for random effects was ID, and the default covariance structure for repeated effects was VC.

Interpretation of VC covariance structure. Prior to version 11.5, the variance components (VC) structure was a diagonal matrix with heterogenous variances. Now, when the variance components structure is specified on a RANDOM subcommand, a scaled identity (ID) structure is assigned to each of the effects specified on the subcommand. If the variance components structure is specified on the REPEATED subcommand, it will be replaced by the diagonal (DIAG) structure. Note that the diagonal structure has the same interpretation as the variance components structure in versions prior to 11.5.

Basic Features Collapse Hide details

Basic Features

Covariance structures. Various structures are available. Use multiple RANDOM subcommands to model a different covariance structure for each random effect.

Standard errors. Appropriate standard errors will be automatically calculated for all hypothesis tests on the fixed effects, and specified estimable linear combinations of fixed and random effects.

Subject blocking. Complete independence can be assumed across subject blocks.

Choice of estimation method. Two estimation methods for the covariance parameters are available.

Tuning the algorithm. You can control the values of algorithm-tuning parameters with the CRITERIA subcommand.

Optional output. You can request additional output through the PRINT subcommand. The SAVE subcommand allows you to save various casewise statistics back to the active dataset.

Basic Specification Collapse Hide details

Basic Specification

• The basic specification is a variable list identifying the dependent variable, the factors (if any) and the covariates (if any).

• By default, MIXED adopts the model that consists of the intercept term as the only fixed effect and the residual term as the only random effect.

Subcommand Order Collapse Hide details

Subcommand Order

• The variable list must be specified first.

• Subcommands can be specified in any order.

Syntax Rules Collapse Hide details

Syntax Rules

• For many analyses, the MIXED variable list, the FIXED subcommand, and the RANDOM subcommand are the only specifications needed.

• A dependent variable must be specified.

• Empty subcommands are silently ignored.

• Multiple RANDOM subcommands are allowed. However, if an effect with the same subject specification appears in multiple RANDOM subcommands, only the last specification will be used.

• Multiple TEST subcommands are allowed.

• All subcommands, except the RANDOM and the TEST subcommands, should be specified only once. If a subcommand is repeated, only the last specification will be used.

• The following words are reserved as keywords in the MIXED procedure: BY, WITH, and WITHIN.

Related Topics

MIXED
Examples
Case Frequency (MIXED command)
Covariance Structure List (MIXED command)
Variable List (MIXED command)
CRITERIA Subcommand (MIXED command)
EMMEANS Subcommand (MIXED command)
FIXED Subcommand (MIXED command)
METHOD Subcommand (MIXED command)
MISSING Subcommand (MIXED command)
PRINT Subcommand (MIXED command)
RANDOM Subcommand (MIXED command)
REGWGT Subcommand (MIXED command)
REPEATED Subcommand (MIXED command)
SAVE Subcommand (MIXED command)
TEST Subcommand (MIXED command)
Interpretation of Random Effect Covariance Structures (MIXED command)


Examples

The following are examples of models that can be specified using MIXED:

Model 1: Fixed-Effects ANOVA Model

Suppose that TREAT is the treatment factor and BLOCK is the blocking factor.

MIXED Y BY TREAT BLOCK
  /FIXED = TREAT BLOCK.

Model 2: Randomized Complete Blocks Design

Suppose that TREAT is the treatment factor and BLOCK is the blocking factor.

MIXED Y BY TREAT BLOCK
  /FIXED = TREAT
  /RANDOM = BLOCK.

Model 3: Split-Plot Design

An experiment consists of two factors, A and B. The experiment unit with respect to A is C. The experiment unit with respect to B is the individual subject, a subdivision of the factor C. Thus, C is the whole-plot unit, and the individual subject is the split-plot unit.

MIXED Y BY A B C
  /FIXED = A B A*B
  /RANDOM = C(A).

Model 4: Purely Random-Effects Model

Suppose that A, B, and C are random factors.

MIXED Y BY A B C
  /FIXED = | NOINT
  /RANDOM  = INTERCEPT A B C A*B A*C B*C | COVTYPE(CS).

The MIXED procedure allows effects specified on the same RANDOM subcommand to be correlated. Thus, in the model above, the parameters of a compound symmetry covariance matrix are computed across all levels of the random effects. In order to specify independent random effects, you need to specify separate RANDOM subcommands. For example:

MIXED Y BY A B C
  /FIXED = | NOINT
  /RANDOM  = INTERCEPT | COVTYPE(ID)
  /RANDOM  = A | COVTYPE(CS)
  /RANDOM  = B | COVTYPE(CS)
  /RANDOM  = C | COVTYPE(CS)
  /RANDOM  = A*B | COVTYPE(CS)
  /RANDOM  = A*C | COVTYPE(CS)
  /RANDOM  = B*C | COVTYPE(CS).

Here, the parameters of compound symmetry matrices are computed separately for each random effect.

Model 5: Random Coefficient Model

MIXED
  weight  WITH time
  /CRITERIA = CIN(95) MXITER(100) MXSTEP(5) SCORING(1)
  SINGULAR(0.000000000001) HCONVERGE(0, ABSOLUTE)
  LCONVERGE(0, ABSOLUTE) PCONVERGE(0.000001, ABSOLUTE)
  /FIXED = time  | SSTYPE(3)
  /METHOD = REML
  /PRINT = G SOLUTION TESTCOV
  /RANDOM INTERCEPT time  | SUBJECT(patid) COVTYPE(UN) .

• The procedure fits a model for weight. You believe that there is a linear relationship between weight and time, but there are also patient-specific effects on the size of the relationship that can be accounted for by random effects.

• The fixed-effects portion of the model includes time.

• The random-effects portion of the model includes the intercept and time with subjects identified by patid and an unstructured covariance matrix structure. You are, in essence, fitting a linear regression to each patient in which the regression coefficients are random effects; hence it is a "random coefficients" model.

• The PRINT subcommand requests the estimates of fixed effects, the random effects covariance (G) matrix, and tests of the covariance parameters.

• All other options are set to their default values.

For discussion of output from this syntax and to place the example in context, see Using Linear Mixed Models to Fit a Random Coefficients Model.

Model 6: Multilevel Analysis

Suppose that SCORE is the score of a particular achievement test given over TIME. STUDENT is nested within CLASS, and CLASS is nested within SCHOOL.

MIXED SCORE WITH TIME
  /FIXED = TIME
  /RANDOM = INTERCEPT TIME | SUBJECT(SCHOOL) COVTYPE(ID)
  /RANDOM = INTERCEPT TIME | SUBJECT(SCHOOL*CLASS) COVTYPE(ID)
  /RANDOM = INTERCEPT TIME | SUBJECT(SCHOOL*CLASS*STUDENT) COVTYPE(ID).

Model 7: Unconditional Linear Growth Model

Suppose that SUBJ is the individual’s identification and Y is the response of an individual observed over TIME. The covariance structure is unspecified.

MIXED Y WITH TIME
  /FIXED = TIME
  /RANDOM = INTERCEPT TIME | SUBJECT(SUBJ) COVTYPE(ID).

Model 8: Linear Growth Model with a Person-Level Covariate

Suppose that PCOVAR is the person-level covariate.

MIXED Y WITH TIME PCOVAR
  /FIXED = TIME PCOVAR TIME*PCOVAR
  /RANDOM = INTERCEPT TIME | SUBJECT(SUBJ) COVTYPE(ID).

Model 9: Repeated Measures Analysis

Suppose that SUBJ is the individual’s identification and Y is the response of an individual observed over several STAGEs. The covariance structure is compound symmetry.

MIXED Y BY STAGE
  /FIXED = STAGE
  /REPEATED = STAGE | SUBJECT(SUBJ) COVTYPE(CS).

Model 10: Repeated Measures Analysis with Time-Dependent Covariate

Suppose that SUBJ is the individual’s identification and Y is the response of an individual observed over several STAGEs. X is an individual-level covariate that also measures over several STAGEs. The residual covariance matrix structure is AR(1).

MIXED Y BY STAGE WITH X
  /FIXED = X STAGE
  /REPEATED = STAGE | SUBJECT(SUBJ) COVTYPE(AR1).

Model 11: Repeated Measures and Random Effects

MIXED
  sales  BY marketid mktsize promo locid
  /CRITERIA = CIN(95) MXITER(100) MXSTEP(10) SCORING(1)
  SINGULAR(0.000000000001) HCONVERGE(0, ABSOLUTE) LCONVERGE(0, ABSOLUTE)
  PCONVERGE(0.000001, ABSOLUTE)
  /FIXED = promo  | SSTYPE(3)
  /METHOD = REML
  /PRINT = G R SOLUTION TESTCOV
  /RANDOM = INTERCEPT | SUBJECT(marketid) COVTYPE(ID)
  /REPEATED = week  | SUBJECT(locid marketid ) COVTYPE(AR1) .

• The procedure fits a model for sales. The factor of interest is promo (the promotion offered); other factors are used to account for location and market effects.

• The fixed-effects portion of the model includes promo.

• The random-effects portion of the model includes the intercept with "subjects" identified by marketid and a scaled identity covariance matrix structure. This is equivalent to, but more computationally efficient than, specifying /RANDOM marketid | COVTYPE(ID).

• The repeated-effects portion of the model includes week with subjects identified by the unique combinations of locid and marketid, and a first order autoregressive covariance matrix structure.

• The PRINT subcommand requests the estimates of fixed effects, the random effects covariance (G) matrix, the residual covariance (R) matrix, and tests of the covariance parameters.

• All other options are set to their default values.

For discussion of output from this syntax and to place the example in context, see Using Linear Mixed Models to Model Random Effects and Repeated Measures.

Model 12: Crossover Trial

A crossover trial is a study where subjects are exposed to a series of treatments. The end goal is to establish treatment effects, but the model must also account for the effects of the sequencing of treatments. There are a number of ways to specify the model; for example, by using a random effects model of the customers within sequence:

MIXED
  amtspent  BY coupval seq carry week custid
  /CRITERIA = CIN(95) MXITER(100) MXSTEP(10) SCORING(1)
  SINGULAR(0.000000000001) HCONVERGE(0, ABSOLUTE) LCONVERGE(0, ABSOLUTE)
  PCONVERGE(0.000001, ABSOLUTE)
  /FIXED = coupval seq carry week  | SSTYPE(3)
  /METHOD = REML
  /PRINT = G SOLUTION TESTCOV
 /RANDOM = custid(seq) | COVTYPE(ID).

• The procedure fits a model for a carryover trial for amtspent (the amount spent by the customer). The factor of interest is coupval (the value of the offer to the customer); other factors are used to account for the effects of the sequencing of offers.

• The fixed-effects portion of the model includes coupval, seq (the sequence in which the customer received offers), carry (an indicator to account for carryover effects), and week (the week of the trial in which the observation is taken).

• The random-effects portion of the model includes custid(seq) (customers within sequence) with a scaled identity covariance matrix structure.

• The PRINT subcommand requests the estimates of fixed effects, the random effects covariance (G) matrix, and tests of the covariance parameters.

• All other options are set to their default values.

You can also use a repeated effects model on the time periods:

MIXED
  amtspent  BY coupval carry week seq
  /CRITERIA = CIN(95) MXITER(100) MXSTEP(100) SCORING(1)
  SINGULAR(0.000000000001) HCONVERGE(0, ABSOLUTE) LCONVERGE(0, ABSOLUTE)
  PCONVERGE(0.000001, ABSOLUTE)
  /FIXED = coupval seq carry week | SSTYPE(3)
  /METHOD = REML
  /PRINT = R SOLUTION TESTCOV
  /REPEATED = week  | SUBJECT(custid ) COVTYPE(AR1) .

• The procedure fits a model for a carryover trial for amtspent (the amount spent by the customer). The factor of interest is coupval (the value of the offer to the customer); other factors are used to account for the effects of the sequencing of offers.

• The fixed-effects portion of the model includes coupval, seq (the sequence in which the customer received offers), carry (an indicator to account for carryover effects), and week (the week of the trial in which the observation is taken).

• The repeated-effects portion of the model includes week with subjects identified by custid and a first-order autoregressive covariance matrix structure.

• The PRINT subcommand requests the estimates of fixed effects, the residual covariance (R) matrix, and tests of the covariance parameters.

• All other options are set to their default values.

Lastly, you can use a repeated effects model on the treatments:

MIXED
  amtspent  BY coupval carry week seq
  /CRITERIA = CIN(95) MXITER(100) MXSTEP(10) SCORING(1)
  SINGULAR(0.000000000001) HCONVERGE(0, ABSOLUTE) LCONVERGE(0, ABSOLUTE)
  PCONVERGE(0.000001, ABSOLUTE)
  /FIXED = coupval seq carry week | SSTYPE(3)
  /METHOD = REML
  /PRINT = R SOLUTION TESTCOV
  /REPEATED = coupval  | SUBJECT(custid ) COVTYPE(UN) .

• The procedure fits a model for a carryover trial for amtspent (the amount spent by the customer). The factor of interest is coupval (the value of the offer to the customer); other factors are used to account for the effects of the sequencing of offers.

• The fixed-effects portion of the model includes coupval, seq (the sequence in which the customer received offers), carry (an indicator to account for carryover effects), and week (the week of the trial in which the observation is taken).

• The repeated-effects portion of the model includes coupval with subjects identified by custid and an unstructured covariance matrix structure.

• The PRINT subcommand requests the estimates of fixed effects, the residual covariance (R) matrix, and tests of the covariance parameters.

• All other options are set to their default values.

For discussion of output from these syntax jobs and to place the example in context, see Using Linear Mixed Models to Analyze a Crossover Trial.

Related Topics

MIXED
Overview (MIXED command)
Case Frequency (MIXED command)
Covariance Structure List (MIXED command)
Variable List (MIXED command)
CRITERIA Subcommand (MIXED command)
EMMEANS Subcommand (MIXED command)
FIXED Subcommand (MIXED command)
METHOD Subcommand (MIXED command)
MISSING Subcommand (MIXED command)
PRINT Subcommand (MIXED command)
RANDOM Subcommand (MIXED command)
REGWGT Subcommand (MIXED command)
REPEATED Subcommand (MIXED command)
SAVE Subcommand (MIXED command)
TEST Subcommand (MIXED command)
Interpretation of Random Effect Covariance Structures (MIXED command)


Case Frequency (MIXED command)

• If a WEIGHT variable is specified, its values are used as frequency weights by the MIXED procedure.

• Cases with missing weights or weights less than 0.5 are not used in the analyses.

• The weight values are rounded to the nearest whole numbers before use. For example, 0.5 is rounded to 1, and 2.4 is rounded to 2.

Related Topics

MIXED
Overview (MIXED command)
Examples
Covariance Structure List (MIXED command)
Variable List (MIXED command)
CRITERIA Subcommand (MIXED command)
EMMEANS Subcommand (MIXED command)
FIXED Subcommand (MIXED command)
METHOD Subcommand (MIXED command)
MISSING Subcommand (MIXED command)
PRINT Subcommand (MIXED command)
RANDOM Subcommand (MIXED command)
REGWGT Subcommand (MIXED command)
REPEATED Subcommand (MIXED command)
SAVE Subcommand (MIXED command)
TEST Subcommand (MIXED command)
Interpretation of Random Effect Covariance Structures (MIXED command)


Covariance Structure List (MIXED command)

MIXED (command),MIXED (command),MIXED (command)
covariance structure,covariance structure,covariance structure

The following is the list of covariance structures being offered by the MIXED procedure. Unless otherwise implied or stated, the structures are not constrained to be non-negative definite in order to avoid nonlinear constraints and to reduce the optimization complexity. However, the variances are restricted to be non-negative.

• Separate covariance matrices are computed for each random effect; that is, while levels of a given random effect are allowed to co-vary, they are considered independent of the levels of other random effects.

AD1 (keyword),AD1 (keyword),AD1 (keyword)
MIXED command,MIXED command,MIXED command
DIAG (keyword),DIAG (keyword),DIAG (keyword)
MIXED command,MIXED command,MIXED command
AR1 (keyword),AR1 (keyword),AR1 (keyword)
MIXED command,MIXED command,MIXED command
ARH1 (keyword),ARH1 (keyword),ARH1 (keyword)
MIXED command,MIXED command,MIXED command
ARMA1 (keyword),ARMA1 (keyword),ARMA1 (keyword)
MIXED command,MIXED command,MIXED command
FA1 (keyword),FA1 (keyword),FA1 (keyword)
MIXED command,MIXED command,MIXED command
VC (keyword),VC (keyword),VC (keyword)
MIXED command,MIXED command,MIXED command
CS (keyword),CS (keyword),CS (keyword)
MIXED command,MIXED command,MIXED command
TPH (keyword),TPH (keyword),TPH (keyword)
MIXED command,MIXED command,MIXED command
UN (keyword),UN (keyword),UN (keyword)
MIXED command,MIXED command,MIXED command
UNR (keyword),UNR (keyword),UNR (keyword)
MIXED command,MIXED command,MIXED command
CSR (keyword),CSR (keyword),CSR (keyword)
MIXED command,MIXED command,MIXED command
CSH (keyword),CSH (keyword),CSH (keyword)
MIXED command,MIXED command,MIXED command
ID (keyword),ID (keyword),ID (keyword)
MIXED command,MIXED command,MIXED command
TP (keyword),TP (keyword),TP (keyword)
MIXED command,MIXED command,MIXED command
FAH1 (keyword),FAH1 (keyword),FAH1 (keyword)
MIXED command,MIXED command,MIXED command
HF (keyword),HF (keyword),HF (keyword)
MIXED command,MIXED command,MIXED command

AD1

First-order ante-dependence. The constraint |ρk|≤1 is imposed for stationarity.

[
σ21 | σ2σ1ρ1 | σ3σ1ρ1ρ2 | σ4σ1ρ1ρ2ρ3
σ2σ1ρ1 | σ22 | σ3σ2ρ2 | σ4σ2ρ2ρ3
σ3σ1ρ1ρ2 | σ3σ2ρ2 | σ23 | σ4σ3ρ3
σ4σ1ρ1ρ2ρ3 | σ4σ2ρ2ρ3 | σ4σ3ρ3 | σ24
]

AR1

First-order autoregressive. The constraint |ρ|≤1 is imposed for stationarity.

σ2[
1 | ρ | ρ2 | ρ3
ρ | 1 | ρ | ρ2
ρ2 | ρ | 1 | ρ
ρ3 | ρ2 | ρ | 1
]

ARH1

Heterogenous first-order autoregressive. The constraint |ρk|≤1 is imposed for stationarity.

[
σ21 | σ2σ1ρ | σ3σ1ρ2 | σ4σ1ρ3
σ2σ1ρ | σ22 | σ3σ2ρ | σ4σ2ρ2
σ3σ1ρ2 | σ3σ2ρ | σ23 | σ4σ3ρ
σ4σ1ρ3 | σ4σ2ρ2 | σ4σ3ρ | σ24
]

ARMA1

Autoregressive moving average (1,1). The constraints ||≤1 and |ρ|≤1 are imposed for stationarity.

σ2[
1 | φρ | φρ2 | φρ3
φρ | 1 | φρ | φρ2
φρ2 | φρ | 1 | φρ
φρ3 | φρ2 | φρ | 1
]

CS

Compound symmetry. This structure has constant variance and constant covariance.

[
σ2+σ21 | σ1 | σ1 | σ1
σ1 | σ2+σ21 | σ1 | σ1
σ1 | σ1 | σ2+σ21 | σ1
σ1 | σ1 | σ1 | σ2+σ21
]

CSH

Heterogenous compound symmetry. This structure has non-constant variance and constant correlation.

[
σ21 | σ2σ1ρ | σ3σ1ρ | σ4σ1ρ
σ2σ1ρ | σ22 | σ3σ2ρ | σ4σ2ρ
σ3σ1ρ | σ3σ2ρ | σ23 | σ4σ3ρ
σ4σ1ρ | σ4σ2ρ | σ4σ3ρ | σ24
]

CSR

Compound symmetry with correlation parameterization. This structure has constant variance and constant covariance.

σ2[
1 | ρ | ρ | ρ
ρ | 1 | ρ | ρ
ρ | ρ | 1 | ρ
ρ | ρ | ρ | 1
]

DIAG

Diagonal. This is a diagonal structure with heterogenous variance. This is the default covariance structure for repeated effects.

[
σ21 | 0 | 0 | 0
0 | σ22 | 0 | 0
0 | 0 | σ23 | 0
0 | 0 | 0 | σ24
]

FA1

First-order factor analytic with constant diagonal offset (d≥0).

[
λ21+d | λ2λ1 | λ3λ1 | λ4λ1
λ2λ1 | λ22+d | λ3λ2 | λ4λ2
λ3λ1 | λ3λ2 | λ23+d | λ4λ3
λ4λ1 | λ4λ2 | λ4λ3 | λ24+d
]

FAH1

First-order factor analytic with heterogenous diagonal offsets (dk≥0).

[
λ21+d1 | λ2λ1 | λ3λ1 | λ4λ1
λ2λ1 | λ22+d2 | λ3λ2 | λ4λ2
λ3λ1 | λ3λ2 | λ23+d3 | λ4λ3
λ4λ1 | λ4λ2 | λ4λ3 | λ24+d4
]

HF

Huynh-Feldt. This is a circular matrix that satisfies the condition σ2i+σ2j−2σij=2λ.

[
σ21 | σ21+σ222−λ | σ21+σ232−λ | σ21+σ242−λ
σ21+σ222−λ | σ22 | σ22+σ232−λ | σ22+σ242−λ
σ21+σ232−λ | σ22+σ232−λ | σ23 | σ23+σ242−λ
σ21+σ242−λ | σ22+σ242−λ | σ23+σ242−λ | σ24
]

ID

Identity. This is a scaled identity matrix.

σ2[
1 | 0 | 0 | 0
0 | 1 | 0 | 0
0 | 0 | 1 | 0
0 | 0 | 0 | 1
]

TP

Toeplitz ( |ρk|≤1).

σ2[
1 | ρ1 | ρ2 | ρ3
ρ1 | 1 | ρ1 | ρ2
ρ2 | ρ1 | 1 | ρ1
ρ3 | ρ2 | ρ1 | 1
]

TPH

Heterogenous Toeplitz ( |ρk|≤1).

[
σ21 | σ2σ1ρ1 | σ3σ1ρ2 | σ4σ1ρ3
σ2σ1ρ1 | σ22 | σ3σ2ρ1 | σ4σ2ρ2
σ3σ1ρ2 | σ3σ2ρ1 | σ23 | σ4σ3ρ1
σ4σ1ρ3 | σ4σ2ρ2 | σ4σ3ρ1 | σ24
]

UN

Unstructured. This is a completely general covariance matrix.

[
σ21 | σ21 | σ31 | σ41
σ21 | σ22 | σ32 | σ42
σ31 | σ32 | σ23 | σ43
σ41 | σ42 | σ43 | σ24
]

UNR

Unstructured correlations (|ρjk|≤1).

[
σ21 | σ2σ1ρ21 | σ3σ1ρ31 | σ4σ1ρ41
σ2σ1ρ21 | σ22 | σ3σ2ρ32 | σ4σ2ρ42
σ3σ1ρ31 | σ3σ2ρ32 | σ23 | σ4σ3ρ43
σ4σ1ρ41 | σ4σ2ρ42 | σ4σ3ρ43 | σ24
]

VC

Variance components. This is the default covariance structure for random effects. When the variance components structure is specified on a RANDOM subcommand, a scaled identity (ID) structure is assigned to each of the effects specified on the subcommand. If the variance components structure is specified on the REPEATED subcommand, it is replaced by the diagonal (DIAG) structure.

Related Topics

MIXED
Overview (MIXED command)
Examples
Case Frequency (MIXED command)
Variable List (MIXED command)
CRITERIA Subcommand (MIXED command)
EMMEANS Subcommand (MIXED command)
FIXED Subcommand (MIXED command)
METHOD Subcommand (MIXED command)
MISSING Subcommand (MIXED command)
PRINT Subcommand (MIXED command)
RANDOM Subcommand (MIXED command)
REGWGT Subcommand (MIXED command)
REPEATED Subcommand (MIXED command)
SAVE Subcommand (MIXED command)
TEST Subcommand (MIXED command)
Interpretation of Random Effect Covariance Structures (MIXED command)


Variable List (MIXED command)

The variable list specifies the dependent variable, the factors, and the covariates in the model.

• The dependent variable must be the first specification on MIXED.

• The names of the factors, if any, must be preceded by the keyword BY.

• The names of the covariates, if any, must be preceded by the keyword WITH.

• The dependent variable and the covariates must be numeric.

• The factor variables can be of any type (numeric and string).

• Only cases with no missing values in all of the variables specified will be used.

Related Topics

MIXED
Overview (MIXED command)
Examples
Case Frequency (MIXED command)
Covariance Structure List (MIXED command)
CRITERIA Subcommand (MIXED command)
EMMEANS Subcommand (MIXED command)
FIXED Subcommand (MIXED command)
METHOD Subcommand (MIXED command)
MISSING Subcommand (MIXED command)
PRINT Subcommand (MIXED command)
RANDOM Subcommand (MIXED command)
REGWGT Subcommand (MIXED command)
REPEATED Subcommand (MIXED command)
SAVE Subcommand (MIXED command)
TEST Subcommand (MIXED command)
Interpretation of Random Effect Covariance Structures (MIXED command)


CRITERIA Subcommand (MIXED command)

MIXED (command),MIXED (command),MIXED (command)
algorithm criteria,algorithm criteria,algorithm criteria
CRITERIA (subcommand),CRITERIA (subcommand),CRITERIA (subcommand)
MIXED command,MIXED command,MIXED command
MIXED (command),MIXED (command),MIXED (command)
CRITERIA subcommand,CRITERIA subcommand,CRITERIA subcommand

The CRITERIA subcommand controls the iterative algorithm used in the estimation and specifies numerical tolerance for checking singularity.

confidence intervals,confidence intervals,confidence intervals
MIXED command,MIXED command,MIXED command
CIN (keyword),CIN (keyword),CIN (keyword)
MIXED command,MIXED command,MIXED command
LCONVERGE (keyword),LCONVERGE (keyword),LCONVERGE (keyword)
MIXED command,MIXED command,MIXED command
ABSOLUTE (keyword),ABSOLUTE (keyword),ABSOLUTE (keyword)
MIXED command,MIXED command,MIXED command
RELATIVE (keyword),RELATIVE (keyword),RELATIVE (keyword)
MIXED command,MIXED command,MIXED command
MXITER (keyword),MXITER (keyword),MXITER (keyword)
MIXED command,MIXED command,MIXED command
PCONVERGE (keyword),PCONVERGE (keyword),PCONVERGE (keyword)
MIXED command,MIXED command,MIXED command
MXSTEP (keyword),MXSTEP (keyword),MXSTEP (keyword)
MIXED command,MIXED command,MIXED command
SCORING (keyword),SCORING (keyword),SCORING (keyword)
MIXED command,MIXED command,MIXED command
SINGULAR (keyword),SINGULAR (keyword),SINGULAR (keyword)
MIXED command,MIXED command,MIXED command
CIN(value) | Confidence interval level. This value is used whenever a confidence interval is constructed. Specify a value greater than or equal to 0 and less than 100. The default value is 95.
HCONVERGE(value, type) | Hessian convergence criterion. Convergence is assumed if g'kHk-1gk is less than a multiplier of value. The multiplier is 1 for ABSOLUTE type and is the absolute value of the current log-likelihood function for RELATIVE type. The criterion is not used if value equals 0. This criterion is not used by default. Specify a non-negative value and a measure type of convergence.
LCONVERGE(value, type) | Log-likelihood function convergence criterion. Convergence is assumed if the ABSOLUTE or RELATIVE change in the log-likelihood function is less than value. The criterion is not used if a equals 0. This criterion is not used by default. Specify a non-negative value and a measure type of convergence.
MXITER(n) | Maximum number of iterations. Specify a non-negative integer. The default value is 100.
PCONVERGE(value, type) | Parameter estimates convergence criterion. Convergence is assumed if the maximum ABSOLUTE or maximum RELATIVE change in the parameter estimates is less than value. The criterion is not used if a equals 0. Specify a non-negative value and a measure type of convergence. The default value for a is 10-6.
MXSTEP(n) | Maximum step-halving allowed. At each iteration, the step size is reduced by a factor of 0.5 until the log-likelihood increases or maximum step-halving is reached. Specify a positive integer. The default value is 10.
SCORING(n) | Apply scoring algorithm. Requests to use the Fisher scoring algorithm up to iteration number n. Specify a positive integer. The default is 1.
SINGULAR(value) | Value used as tolerance in checking singularity. Specify a positive value. The default value is 10 -12.

Example

MIXED SCORE BY SCHOOL CLASS WITH AGE
/CRITERIA = CIN(90) LCONVERGE(0) MXITER(50) PCONVERGE(1E-5 RELATIVE)
/FIXED = AGE
/RANDOM = SCHOOL CLASS.

• The CRITERIA subcommand requests that a 90% confidence interval be calculated whenever appropriate.

• The log-likelihood convergence criterion is not used. Convergence is attained when the maximum relative change in parameter estimates is less than 0.00001 and number of iterations is less than 50.

Example

MIXED SCORE BY SCHOOL CLASS WITH AGE
  /CRITERIA = MXITER(100) SCORING(100)
  /FIXED = AGE
  /RANDOM = SCHOOL CLASS.

• The Fisher scoring algorithm is used for all iterations.

Related Topics

MIXED
Overview (MIXED command)
Examples
Case Frequency (MIXED command)
Covariance Structure List (MIXED command)
Variable List (MIXED command)
EMMEANS Subcommand (MIXED command)
FIXED Subcommand (MIXED command)
METHOD Subcommand (MIXED command)
MISSING Subcommand (MIXED command)
PRINT Subcommand (MIXED command)
RANDOM Subcommand (MIXED command)
REGWGT Subcommand (MIXED command)
REPEATED Subcommand (MIXED command)
SAVE Subcommand (MIXED command)
TEST Subcommand (MIXED command)
Interpretation of Random Effect Covariance Structures (MIXED command)


EMMEANS Subcommand (MIXED command)

MIXED (command),MIXED (command),MIXED (command)
estimated marginal means,estimated marginal means,estimated marginal means
estimated marginal means,estimated marginal means,estimated marginal means
MIXED command,MIXED command,MIXED command
EMMEANS (subcommand),EMMEANS (subcommand),EMMEANS (subcommand)
MIXED command,MIXED command,MIXED command
MIXED (command),MIXED (command),MIXED (command)
EMMEANS subcommand,EMMEANS subcommand,EMMEANS subcommand

EMMEANS displays estimated marginal means of the dependent variable in the cells and their standard errors for the specified factors. Note that these are predicted, not observed, means.

• The TABLES keyword, followed by an option in parentheses, is required. COMPARE is optional; if specified, it must follow TABLES.

• Multiple EMMEANS subcommands are allowed. Each is treated independently.

• If identical EMMEANS subcommands are specified, only the last identical subcommand is in effect. EMMEANS subcommands that are redundant but not identical (for example, crossed factor combinations such as A*B and B*A) are all processed.

TABLES (keyword),TABLES (keyword),TABLES (keyword)
MIXED command,MIXED command,MIXED command
OVERALL (keyword),OVERALL (keyword),OVERALL (keyword)
MIXED command,MIXED command,MIXED command
WITH (keyword),WITH (keyword),WITH (keyword)
MIXED command,MIXED command,MIXED command
MEAN (keyword),MEAN (keyword),MEAN (keyword)
MIXED command,MIXED command,MIXED command
COMPARE (keyword),COMPARE (keyword),COMPARE (keyword)
MIXED command,MIXED command,MIXED command
REFCAT (keyword),REFCAT (keyword),REFCAT (keyword)
MIXED command,MIXED command,MIXED command
ADJ (keyword),ADJ (keyword),ADJ (keyword)
MIXED command,MIXED command,MIXED command
LSD (keyword),LSD (keyword),LSD (keyword)
MIXED command,MIXED command,MIXED command
BONFERRONI (keyword),BONFERRONI (keyword),BONFERRONI (keyword)
MIXED command,MIXED command,MIXED command
SIDAK (keyword),SIDAK (keyword),SIDAK (keyword)
MIXED command,MIXED command,MIXED command
TABLES(option) | Table specification. Valid options are the keyword OVERALL, factors appearing on the factor list, and crossed factors constructed of factors on the factor list. Crossed factors can be specified by using an asterisk (*) or the keyword BY. All factors in a crossed factor specification must be unique.
 | If OVERALL is specified, the estimated marginal means of the dependent variable are displayed, collapsing over all factors.
 | If a factor, or a crossing factor, is specified on the TABLES keyword, MIXED will compute the estimated marginal mean for each level combination of the specified factor(s), collapsing over all other factors not specified with TABLES.
WITH (option) | Covariate values. Valid options are covariates appearing on the covariate list on the VARIABLES subcommand. Each covariate must be followed by a numeric value or the keyword MEAN.
 | If a numeric value is used, the estimated marginal mean will be computed by holding the specified covariate at the supplied value.
 | When the keyword MEAN is used, the estimated marginal mean will be computed by holding the covariate at its overall mean. If a covariate is not specified in the WITH option, its overall mean will be used in estimated marginal mean calculations.
COMPARE(factor) REFCAT(value) ADJ(method) | Main- or simple-main-effects omnibus tests and pairwise comparisons of the dependent variable. This option gives the mean difference, standard error, degrees of freedom, significance, and confidence intervals for each pair of levels for the effect specified in the COMPARE keyword, and an omnibus test for that effect. If only one factor is specified on TABLES, COMPARE can be specified by itself; otherwise, the factor specification is required. In this case, levels of the specified factor are compared with each other for each level of the other factors in the interaction.
 | The optional ADJ keyword allows you to apply an adjustment to the confidence intervals and significance values to account for multiple comparisons. Methods available are LSD (no adjustment), BONFERRONI, or SIDAK.
 | By default, all pairwise comparisons of the specified factor will be constructed. Optionally, comparisons can be made to a reference category by specifying the value of that category after the REFCAT keyword. If the compare factor is a string variable, the category value must be a quoted string. If the compare factor is a numeric variable, the category value should be specified as an unquoted numeric value. Alternatively, the keywords FIRST or LAST can be used to specify whether the first or the last category will be used as a reference category.

Example

MIXED Y BY A B WITH X
  /FIXED A B X
  /EMMEANS TABLES(A*B) WITH(X=0.23) COMPARE(A) ADJ(SIDAK)
  /EMMEANS TABLES(A*B) WITH(X=MEAN) COMPARE(A) REFCAT(LAST) ADJ(LSD).

• In the example, the first EMMEANS subcommand will compute estimated marginal means for all level combinations of A*B by fixing the covariate X at 0.23. Then for each level of B, all pairwise comparisons on A will be performed using SIDAK adjustment.

• In the second EMMEANS subcommand, the estimated marginal means will be computed by fixing the covariate X at its mean. Since REFCAT(LAST) is specified, comparison will be made to the last category of factor A using LSD adjustment.

Related Topics

MIXED
Overview (MIXED command)
Examples
Case Frequency (MIXED command)
Covariance Structure List (MIXED command)
Variable List (MIXED command)
CRITERIA Subcommand (MIXED command)
FIXED Subcommand (MIXED command)
METHOD Subcommand (MIXED command)
MISSING Subcommand (MIXED command)
PRINT Subcommand (MIXED command)
RANDOM Subcommand (MIXED command)
REGWGT Subcommand (MIXED command)
REPEATED Subcommand (MIXED command)
SAVE Subcommand (MIXED command)
TEST Subcommand (MIXED command)
Interpretation of Random Effect Covariance Structures (MIXED command)


FIXED Subcommand (MIXED command)

MIXED (command),MIXED (command),MIXED (command)
fixed effects,fixed effects,fixed effects
fixed effects,fixed effects,fixed effects
MIXED command,MIXED command,MIXED command
FIXED (subcommand),FIXED (subcommand),FIXED (subcommand)
MIXED command,MIXED command,MIXED command
MIXED (command),MIXED (command),MIXED (command)
FIXED subcommand,FIXED subcommand,FIXED subcommand

The FIXED subcommand specifies the fixed effects in the mixed model.

• Specify a list of terms to be included in the model, separated by commas or spaces.

• The intercept term is included by default.

• The default model is generated if the FIXED subcommand is omitted or empty. The default model consists of only the intercept term (if included).

• To explicitly include the intercept term, specify the keyword INTERCEPT on the FIXED subcommand. The INTERCEPT term must be specified first on the FIXED subcommand.

• To include a main-effect term, enter the name of the factor on the FIXED subcommand.

• To include an interaction-effect term among factors, use the keyword BY or the asterisk (*) to connect factors involved in the interaction. For example, A*B*C means a three-way interaction effect of the factors A, B, and C. The expression A BY B BY C is equivalent to A*B*C. Factors inside an interaction effect must be distinct. Expressions such as A*C*A and A*A are invalid.

• To include a nested-effect term, use the keyword WITHIN or a pair of parentheses on the FIXED subcommand. For example, A(B) means that A is nested within B, where A and B are factors. The expression A WITHIN B is equivalent to A(B). Factors inside a nested effect must be distinct. Expressions such as A(A) and A(B*A) are invalid.

• Multiple-level nesting is supported. For example, A(B(C)) means that B is nested within C, and A is nested within B(C). When more than one pair of parentheses is present, each pair of parentheses must be enclosed or nested within another pair of parentheses. Thus, A(B)(C) is invalid.

• Nesting within an interaction effect is valid. For example, A(B*C) means that A is nested within B*C.

• Interactions among nested effects are allowed. The correct syntax is the interaction followed by the common nested effect inside the parentheses. For example, the interaction between A and B within levels of C should be specified as A*B(C) instead of A(C)*B(C).

• To include a covariate term in the model, enter the name of the covariate on the FIXED subcommand.

• Covariates can be connected using the keyword BY or the asterisk (*). For example, X*X is the product of X and itself. This is equivalent to entering a covariate whose values are the squared values of X.

• Factor and covariate effects can be connected in many ways. Suppose that A and B are factors and X and Y are covariates. Examples of valid combinations of factor and covariate effects are A*X, A*B*X, X(A), X(A*B), X*A(B), X*Y(A*B), and A*B*X*Y.

• No effects can be nested within a covariate effect. Suppose that A and B are factors and X and Y are covariates. The effects A(X), A(B*Y), X(Y), and X(B*Y) are invalid.

• The following options, which are specific for the fixed effects, can be entered after the effects. Use the vertical bar (|) to precede the options.

NOINT (keyword),NOINT (keyword),NOINT (keyword)
MIXED command,MIXED command,MIXED command
SSTYPE (keyword),SSTYPE (keyword),SSTYPE (keyword)
MIXED command,MIXED command,MIXED command
NOINT | No intercept. The intercept terms are excluded from the fixed effects.
SSTYPE(n) | Type of sum of squares. Specify the methods for partitioning the sums of squares. Specify n = 1 for Type I sum of squares or n = 3 for Type III sum of squares. The default is Type III sum of squares.

Example

MIXED  SCORE BY SCHOOL CLASS WITH AGE PRETEST
  /FIXED = AGE(SCHOOL) AGE*PRETEST(SCHOOL)
  /RANDOM = CLASS.

• In this example, the fixed-effects design consists of the default INTERCEPT, a nested effect AGE within SCHOOL, and another nested effect of the product of AGE and PRETEST within SCHOOL.

Example

MIXED SCORE BY SCHOOL CLASS
  /FIXED = | NOINT
  /RANDOM = SCHOOL CLASS.

• In this example, a purely random-effects model is fitted. The random effects are SCHOOL and CLASS. The fixed-effects design is empty because the implicit intercept term is removed by the NOINT keyword.

• You can explicitly insert the INTERCEPT effect as /FIXED = INTERCEPT | NOINT. But the specification will be identical to /FIXED = | NOINT.

Related Topics

MIXED
Overview (MIXED command)
Examples
Case Frequency (MIXED command)
Covariance Structure List (MIXED command)
Variable List (MIXED command)
CRITERIA Subcommand (MIXED command)
EMMEANS Subcommand (MIXED command)
METHOD Subcommand (MIXED command)
MISSING Subcommand (MIXED command)
PRINT Subcommand (MIXED command)
RANDOM Subcommand (MIXED command)
REGWGT Subcommand (MIXED command)
REPEATED Subcommand (MIXED command)
SAVE Subcommand (MIXED command)
TEST Subcommand (MIXED command)
Interpretation of Random Effect Covariance Structures (MIXED command)


METHOD Subcommand (MIXED command)

METHOD (subcommand),METHOD (subcommand),METHOD (subcommand)
MIXED command,MIXED command,MIXED command
MIXED (command),MIXED (command),MIXED (command)
METHOD subcommand,METHOD subcommand,METHOD subcommand

The METHOD subcommand specifies the estimation method.

• If this subcommand is not specified, the default is REML.

• The keywords ML and REML are mutually exclusive. Only one of them can be specified once.

ML (keyword),ML (keyword),ML (keyword)
MIXED command,MIXED command,MIXED command
REML (keyword),REML (keyword),REML (keyword)
MIXED command,MIXED command,MIXED command
ML | Maximum likelihood.
REML | Restricted maximum likelihood. This is the default.

Related Topics

MIXED
Overview (MIXED command)
Examples
Case Frequency (MIXED command)
Covariance Structure List (MIXED command)
Variable List (MIXED command)
CRITERIA Subcommand (MIXED command)
EMMEANS Subcommand (MIXED command)
FIXED Subcommand (MIXED command)
MISSING Subcommand (MIXED command)
PRINT Subcommand (MIXED command)
RANDOM Subcommand (MIXED command)
REGWGT Subcommand (MIXED command)
REPEATED Subcommand (MIXED command)
SAVE Subcommand (MIXED command)
TEST Subcommand (MIXED command)
Interpretation of Random Effect Covariance Structures (MIXED command)


MISSING Subcommand (MIXED command)

MIXED (command),MIXED (command),MIXED (command)
missing values,missing values,missing values
MISSING (subcommand),MISSING (subcommand),MISSING (subcommand)
MIXED command,MIXED command,MIXED command
MIXED (command),MIXED (command),MIXED (command)
MISSING subcommand,MISSING subcommand,MISSING subcommand

The MISSING subcommand specifies the way to handle cases with user-missing values.

• If this subcommand is not specified, the default is EXCLUDE.

• Cases, which contain system-missing values in one of the variables, are always deleted.

• The keywords EXCLUDE and INCLUDE are mutually exclusive. Only one of them can be specified at once.

EXCLUDE (keyword),EXCLUDE (keyword),EXCLUDE (keyword)
MIXED command,MIXED command,MIXED command
INCLUDE (keyword),INCLUDE (keyword),INCLUDE (keyword)
MIXED command,MIXED command,MIXED command
EXCLUDE | Exclude both user-missing and system-missing values. This is the default.
INCLUDE | User-missing values are treated as valid. System-missing values cannot be included in the analysis.

Related Topics

MIXED
Overview (MIXED command)
Examples
Case Frequency (MIXED command)
Covariance Structure List (MIXED command)
Variable List (MIXED command)
CRITERIA Subcommand (MIXED command)
EMMEANS Subcommand (MIXED command)
FIXED Subcommand (MIXED command)
METHOD Subcommand (MIXED command)
PRINT Subcommand (MIXED command)
RANDOM Subcommand (MIXED command)
REGWGT Subcommand (MIXED command)
REPEATED Subcommand (MIXED command)
SAVE Subcommand (MIXED command)
TEST Subcommand (MIXED command)
Interpretation of Random Effect Covariance Structures (MIXED command)


PRINT Subcommand (MIXED command)

MIXED (command),MIXED (command),MIXED (command)
output,output,output
PRINT (subcommand),PRINT (subcommand),PRINT (subcommand)
MIXED command,MIXED command,MIXED command
MIXED (command),MIXED (command),MIXED (command)
PRINT subcommand,PRINT subcommand,PRINT subcommand

The PRINT subcommand specifies additional output. If no PRINT subcommand is specified, the default output includes:

• A model dimension summary table

• A covariance parameter estimates table

• A model fit summary table

• A test of fixed effects table

correlation matrix,correlation matrix,correlation matrix
MIXED command,MIXED command,MIXED command
CORB (keyword),CORB (keyword),CORB (keyword)
MIXED command,MIXED command,MIXED command
covariance matrix,covariance matrix,covariance matrix
MIXED command,MIXED command,MIXED command
COVB (keyword),COVB (keyword),COVB (keyword)
MIXED command,MIXED command,MIXED command
case processing summary,case processing summary,case processing summary
MIXED command,MIXED command,MIXED command
CPS (keyword),CPS (keyword),CPS (keyword)
MIXED command,MIXED command,MIXED command
descriptive statistics,descriptive statistics,descriptive statistics
MIXED command,MIXED command,MIXED command
DESCRIPTIVES (keyword),DESCRIPTIVES (keyword),DESCRIPTIVES (keyword)
MIXED command,MIXED command,MIXED command
covariance matrix,covariance matrix,covariance matrix
MIXED command,MIXED command,MIXED command
G (keyword),G (keyword),G (keyword)
MIXED command,MIXED command,MIXED command
iteration history,iteration history,iteration history
MIXED command,MIXED command,MIXED command
HISTORY (keyword),HISTORY (keyword),HISTORY (keyword)
MIXED command,MIXED command,MIXED command
LMATRIX (keyword),LMATRIX (keyword),LMATRIX (keyword)
MIXED command,MIXED command,MIXED command
covariance matrix,covariance matrix,covariance matrix
MIXED command,MIXED command,MIXED command
R (keyword),R (keyword),R (keyword)
MIXED command,MIXED command,MIXED command
parameter estimates,parameter estimates,parameter estimates
MIXED command,MIXED command,MIXED command
SOLUTION (keyword),SOLUTION (keyword),SOLUTION (keyword)
MIXED command,MIXED command,MIXED command
TESTCOV (keyword),TESTCOV (keyword),TESTCOV (keyword)
MIXED command,MIXED command,MIXED command
CORB | Asymptotic correlation matrix of the fixed-effects parameter estimates.
COVB | Asymptotic covariance matrix of the fixed-effects parameter estimates.
CPS | Case processing summary. Displays the sorted values of the factors, the repeated measure variables, the repeated measure subjects, the random-effects subjects, and their frequencies.
DESCRIPTIVES | Descriptive statistics. Displays the sample sizes, the means, and the standard deviations of the dependent variable, and covariates (if specified). These statistics are displayed for each distinct combination of the factors.
G | Estimated covariance matrix of random effects. This keyword is accepted only when at least one RANDOM subcommand is specified. Otherwise, it will be ignored. If a SUBJECT variable is specified for a random effect, then the common block is displayed.
HISTORY(n) | Iteration history. The table contains the log-likelihood function value and parameter estimates for every n iterations beginning with the 0th iteration (the initial estimates). The default is to print every iteration (n = 1). If HISTORY is specified, the last iteration is always printed regardless of the value of n.
LMATRIX | Estimable functions. Displays the estimable functions used for testing the fixed effects and for testing the custom hypothesis.
R | Estimated covariance matrix of residual. This keyword is accepted only when a REPEATED subcommand is specified. Otherwise, it will be ignored. If a SUBJECT variable is specified, the common block is displayed.
SOLUTION | A solution for the fixed-effects and the random-effects parameters. The fixed-effects and the random-effects parameter estimates are displayed. Their approximate standard errors are also displayed.
TESTCOV | Tests for the covariance parameters. Displays the asymptotic standard errors and Wald tests for the covariance parameters.

Related Topics

MIXED
Overview (MIXED command)
Examples
Case Frequency (MIXED command)
Covariance Structure List (MIXED command)
Variable List (MIXED command)
CRITERIA Subcommand (MIXED command)
EMMEANS Subcommand (MIXED command)
FIXED Subcommand (MIXED command)
METHOD Subcommand (MIXED command)
MISSING Subcommand (MIXED command)
RANDOM Subcommand (MIXED command)
REGWGT Subcommand (MIXED command)
REPEATED Subcommand (MIXED command)
SAVE Subcommand (MIXED command)
TEST Subcommand (MIXED command)
Interpretation of Random Effect Covariance Structures (MIXED command)


RANDOM Subcommand (MIXED command)

random-effects model,random-effects model,random-effects model
MIXED command,MIXED command,MIXED command
RANDOM (subcommand),RANDOM (subcommand),RANDOM (subcommand)
MIXED command,MIXED command,MIXED command
MIXED (command),MIXED (command),MIXED (command)
RANDOM subcommand,RANDOM subcommand,RANDOM subcommand

The RANDOM subcommand specifies the random effects in the mixed model.

• Depending on the covariance type specified, random effects specified in one RANDOM subcommand may be correlated.

• One covariance G matrix will be constructed for each RANDOM subcommand. The dimension of the random effect covariance G matrix is equal to the sum of the levels of all random effects in the subcommand.

• When the variance components (VC) structure is specified, a scaled identity (ID) structure will be assigned to each of the effects specified. This is the default covariance type for the RANDOM subcommand.

• Note that the RANDOM subcommand in the MIXED procedure is different in syntax from the RANDOM subcommand in the GLM and VARCOMP procedures.

• Use a separate RANDOM subcommand when a different covariance structure is assumed for a list of random effects. If the same effect is listed on more than one RANDOM subcommand, it must be associated with a different SUBJECT combination.

• Specify a list of terms to be included in the model, separated by commas or spaces.

• No random effects are included in the mixed model unless a RANDOM subcommand is specified correctly.

• Specify the keyword INTERCEPT to include the intercept as a random effect. The MIXED procedure does not include the intercept in the RANDOM subcommand by default. The INTERCEPT term must be specified first on the RANDOM subcommand.

• To include a main-effect term, enter the name of the factor on the RANDOM subcommand.

• To include an interaction-effect term among factors, use the keyword BY or the asterisk (*) to join factors involved in the interaction. For example, A*B*C means a three-way interaction effect of A, B, and C, where A, B, and C are factors. The expression A BY B BY C is equivalent to A*B*C. Factors inside an interaction effect must be distinct. Expressions such as A*C*A and A*A are invalid.

• To include a nested-effect term, use the keyword WITHIN or a pair of parentheses on the RANDOM subcommand. For example, A(B) means that A is nested within B, where A and B are factors. The expression A WITHIN B is equivalent to A(B). Factors inside a nested effect must be distinct. Expressions such as A(A) and A(B*A) are invalid.

• Multiple-level nesting is supported. For example, A(B(C)) means that B is nested within C, and A is nested within B(C). When more than one pair of parentheses is present, each pair of parentheses must be enclosed or nested within another pair of parentheses. Thus, A(B)(C) is invalid.

• Nesting within an interaction effect is valid. For example, A(B*C) means that A is nested within B*C.

• Interactions among nested effects are allowed. The correct syntax is the interaction followed by the common nested effect inside the parentheses. For example, the interaction between A and B within levels of C should be specified as A*B(C) instead of A(C)*B(C).

• To include a covariate term in the model, enter the name of the covariate on the FIXED subcommand.

• Covariates can be connected using the keyword BY or the asterisk (*). For example, X*X is the product of X and itself. This is equivalent to entering a covariate whose values are the squared values of X.

• Factor and covariate effects can be connected in many ways. Suppose that A and B are factors and X and Y are covariates. Examples of valid combinations of factor and covariate effects are A*X, A*B*X, X(A), X(A*B), X*A(B), X*Y(A*B), and A*B*X*Y.

• No effects can be nested within a covariate effect. Suppose that A and B are factors and X and Y are covariates. The effects A(X), A(B*Y), X(Y), and X(B*Y) are invalid.

• The following options, which are specific for the random effects, can be entered after the effects. Use the vertical bar (|) to precede the options.

SUBJECT (keyword),SUBJECT (keyword),SUBJECT (keyword)
MIXED command,MIXED command,MIXED command
COVTYPE (keyword),COVTYPE (keyword),COVTYPE (keyword)
MIXED command,MIXED command,MIXED command
SUBJECT(varname*varname*… ) | Identify the subjects. Complete independence is assumed across subjects, thus producing a block-diagonal structure in the covariance matrix of the random effect with identical blocks. Specify a list of variable names (of any type) connected by asterisks. The number of subjects is equal to the number of distinct combinations of values of the variables. A case will not be used if it contains a missing value on any of the subject variables.
COVTYPE(type) | Covariance structure. Specify the covariance structure of the identical blocks for the random effects (see Covariance Structure List (MIXED command)). The default covariance structure for random effects is VC.

• If the REPEATED subcommand is specified, the variables in the RANDOM subject list must be a subset of the variables in the REPEATED subject list.

• Random effects are considered independent of each other, and a separate covariance matrix is computed for each effect.

Example

MIXED  SCORE BY SCHOOL CLASS
  /RANDOM = INTERCEPT SCHOOL CLASS.

Related Topics

MIXED
Overview (MIXED command)
Examples
Case Frequency (MIXED command)
Covariance Structure List (MIXED command)
Variable List (MIXED command)
CRITERIA Subcommand (MIXED command)
EMMEANS Subcommand (MIXED command)
FIXED Subcommand (MIXED command)
METHOD Subcommand (MIXED command)
MISSING Subcommand (MIXED command)
PRINT Subcommand (MIXED command)
REGWGT Subcommand (MIXED command)
REPEATED Subcommand (MIXED command)
SAVE Subcommand (MIXED command)
TEST Subcommand (MIXED command)
Interpretation of Random Effect Covariance Structures (MIXED command)


REGWGT Subcommand (MIXED command)

REGWGT (subcommand),REGWGT (subcommand),REGWGT (subcommand)
MIXED command,MIXED command,MIXED command
MIXED (command),MIXED (command),MIXED (command)
REGWGT subcommand,REGWGT subcommand,REGWGT subcommand

The REGWGT subcommand specifies the name of a variable containing the regression weights.

• Specify a numeric variable name following the REGWGT subcommand.

• Cases with missing or non-positive weights are not used in the analyses.

• The regression weights will be applied only to the covariance matrix of the residual term.

Related Topics

MIXED
Overview (MIXED command)
Examples
Case Frequency (MIXED command)
Covariance Structure List (MIXED command)
Variable List (MIXED command)
CRITERIA Subcommand (MIXED command)
EMMEANS Subcommand (MIXED command)
FIXED Subcommand (MIXED command)
METHOD Subcommand (MIXED command)
MISSING Subcommand (MIXED command)
PRINT Subcommand (MIXED command)
RANDOM Subcommand (MIXED command)
REPEATED Subcommand (MIXED command)
SAVE Subcommand (MIXED command)
TEST Subcommand (MIXED command)
Interpretation of Random Effect Covariance Structures (MIXED command)


REPEATED Subcommand (MIXED command)

REPEATED (subcommand),REPEATED (subcommand),REPEATED (subcommand)
MIXED command,MIXED command,MIXED command
MIXED (command),MIXED (command),MIXED (command)
REPEATED subcommand,REPEATED subcommand,REPEATED subcommand

The REPEATED subcommand specifies the residual covariance matrix in the mixed-effects model. If no REPEATED subcommand is specified, the residual covariance matrix assumes the form of a scaled identity matrix with the scale being the usual residual variance.

• Specify a list of variable names (of any type) connected by asterisks (repeated measure) following the REPEATED subcommand.

• Distinct combinations of values of the variables are used simply to identify the repeated observations. Order of the values will determine the order of occurrence of the repeated observations. Therefore, the lowest values of the variables associate with the first repeated observation, and the highest values associate with the last repeated observation.

• The VC covariance structure is obsolete in the REPEATED subcommand. If it is specified, it will be replaced with the DIAG covariance structure. An annotation will be made in the output to indicate this change.

• The default covariance type for repeated effects is DIAG.

• The following keywords, which are specific for the REPEATED subcommand, can be entered after the effects. Use the vertical bar (|) to precede the options.

SUBJECT (keyword),SUBJECT (keyword),SUBJECT (keyword)
MIXED command,MIXED command,MIXED command
COVTYPE (keyword),COVTYPE (keyword),COVTYPE (keyword)
MIXED command,MIXED command,MIXED command
SUBJECT(varname*varname*…) | Identify the subjects. Complete independence is assumed across subjects, thus producing a block-diagonal structure in the residual covariance matrix with identical blocks. The number of subjects is equal to the number of distinct combinations of values of the variables. A case will not be used if it contains a missing value on any of the subject variables.
COVTYPE(type) | Covariance structure. Specify the covariance structure of the identical blocks for the residual covariance matrix (see Covariance Structure List (MIXED command)). The default structure for repeated effects is DIAG.

• The SUBJECT keyword must be specified to identify the subjects in a repeated measurement analysis. The analysis will not be performed if this keyword is omitted.

• The list of subject variables must contain all of the subject variables specified in all RANDOM subcommands.

• Any variable used in the repeated measure list must not be used in the repeated subject specification.

Example

MIXED  SCORE BY CLASS
  /RANDOM = CLASS | SUBJECT(SCHOOL)
  /REPEATED = FLOOR | SUBJECT(SCHOOL*STUDENT).

However, the syntax in each of the following examples is invalid:

MIXED  SCORE BY CLASS
  /RANDOM = CLASS | SUBJECT(SCHOOL)
  /REPEATED = FLOOR | SUBJECT(STUDENT).

MIXED  SCORE BY CLASS
  /RANDOM = CLASS | SUBJECT(SCHOOL*STUDENT)
  /REPEATED = FLOOR | SUBJECT(STUDENT).

MIXED  SCORE BY CLASS
  /RANDOM = CLASS | SUBJECT(SCHOOL)
  /REPEATED = STUDENT | SUBJECT(STUDENT*SCHOOL).

• In the first two examples, the RANDOM subject list contains a variable not on the REPEATED subject list.

• In the third example, the REPEATED subject list contains a variable on the REPEATED variable list.

Related Topics

MIXED
Overview (MIXED command)
Examples
Case Frequency (MIXED command)
Covariance Structure List (MIXED command)
Variable List (MIXED command)
CRITERIA Subcommand (MIXED command)
EMMEANS Subcommand (MIXED command)
FIXED Subcommand (MIXED command)
METHOD Subcommand (MIXED command)
MISSING Subcommand (MIXED command)
PRINT Subcommand (MIXED command)
RANDOM Subcommand (MIXED command)
REGWGT Subcommand (MIXED command)
SAVE Subcommand (MIXED command)
TEST Subcommand (MIXED command)
Interpretation of Random Effect Covariance Structures (MIXED command)


SAVE Subcommand (MIXED command)

SAVE (subcommand),SAVE (subcommand),SAVE (subcommand)
MIXED command,MIXED command,MIXED command
MIXED (command),MIXED (command),MIXED (command)
SAVE subcommand,SAVE subcommand,SAVE subcommand

Use the SAVE subcommand to save one or more casewise statistics to the active dataset.

• Specify one or more temporary variables, each followed by an optional new name in parentheses.

• If new names are not specified, default names are generated.

FIXPRED (keyword),FIXPRED (keyword),FIXPRED (keyword)
MIXED command,MIXED command,MIXED command
PRED (keyword),PRED (keyword),PRED (keyword)
MIXED command,MIXED command,MIXED command
RESID (keyword),RESID (keyword),RESID (keyword)
MIXED command,MIXED command,MIXED command
SEFIXP (keyword),SEFIXP (keyword),SEFIXP (keyword)
MIXED command,MIXED command,MIXED command
SEPRED (keyword),SEPRED (keyword),SEPRED (keyword)
MIXED command,MIXED command,MIXED command
DFFIXP (keyword),DFFIXP (keyword),DFFIXP (keyword)
MIXED command,MIXED command,MIXED command
DFPRED (keyword),DFPRED (keyword),DFPRED (keyword)
MIXED command,MIXED command,MIXED command
FIXPRED | Fixed predicted values. The regression means without the random effects.
PRED | Predicted values. The model fitted value.
RESID | Residuals. The data value minus the predicted value.
SEFIXP | Standard error of fixed predicted values. These are the standard error estimates for the fixed effects predicted values obtained by the keyword FIXPRED.
SEPRED | Standard error of predicted values. These are the standard error estimates for the overall predicted values obtained by the keyword PRED.
DFFIXP | Degrees of freedom of fixed predicted values. These are the Satterthwaite degrees of freedom for the fixed effects predicted values obtained by the keyword FIXPRED.
DFPRED | Degrees of freedom of predicted values. These are the Satterthwaite degrees of freedom for the fixed effects predicted values obtained by the keyword PRED.

Example

MIXED  SCORE BY SCHOOL CLASS WITH AGE
  /FIXED = AGE
  /RANDOM = SCHOOL CLASS(SCHOOL)
  /SAVE = FIXPRED(BLUE) PRED(BLUP) SEFIXP(SEBLUE) SEPRED(SEBLUP).

• The SAVE subcommand appends four variables to the active dataset: BLUE, containing the fixed predicted values, BLUP, containing the predicted values, SEBLUE, containing the standard error of BLUE, and SEBLUP, containing the standard error of BLUP.

Related Topics

MIXED
Overview (MIXED command)
Examples
Case Frequency (MIXED command)
Covariance Structure List (MIXED command)
Variable List (MIXED command)
CRITERIA Subcommand (MIXED command)
EMMEANS Subcommand (MIXED command)
FIXED Subcommand (MIXED command)
METHOD Subcommand (MIXED command)
MISSING Subcommand (MIXED command)
PRINT Subcommand (MIXED command)
RANDOM Subcommand (MIXED command)
REGWGT Subcommand (MIXED command)
REPEATED Subcommand (MIXED command)
TEST Subcommand (MIXED command)
Interpretation of Random Effect Covariance Structures (MIXED command)


TEST Subcommand (MIXED command)

TEST (subcommand),TEST (subcommand),TEST (subcommand)
MIXED command,MIXED command,MIXED command
MIXED (command),MIXED (command),MIXED (command)
TEST subcommand,TEST subcommand,TEST subcommand

The TEST subcommand allows you to customize your hypotheses tests by directly specifying null hypotheses as linear combinations of parameters.

• Multiple TEST subcommands are allowed. Each is handled independently.

• The basic format for the TEST subcommand is an optional list of values enclosed in a pair of parentheses, an optional label in quotes, an effect name or the keyword ALL, and a list of values.

• When multiple linear combinations are specified within the same TEST subcommand, a semicolon (;) terminates each linear combination except the last one.

DIVISOR (keyword),DIVISOR (keyword),DIVISOR (keyword)
MIXED command,MIXED command,MIXED command

• At the end of a contrast coefficients row, you can use the option DIVISOR=value to specify a denominator for coefficients in that row. When specified, the contrast coefficients in that row will be divided by the given value. Note that the equals sign is required.

• The value list preceding the first effect or the keyword ALL contains the constants, to which the linear combinations are equated under the null hypotheses. If this value list is omitted, the constants are assumed to be zeros.

• The optional label is a string with a maximum length of 255 bytes. Only one label per TEST subcommand can be specified.

• The effect list is divided into two parts. The first part is for the fixed effects, and the second part is for the random effects. Both parts have the same syntax structure.

• Effects specified in the fixed-effect list should have already been specified or implied on the FIXED subcommand.

• Effects specified in the random-effect list should have already been specified on the RANDOM subcommand.

• To specify the coefficient for the intercept, use the keyword INTERCEPT. Only one value is expected to follow INTERCEPT.

• The number of values following an effect name must be equal to the number of parameters (including the redundant ones) corresponding to that effect. For example, if the effect A*B takes up to six parameters, then exactly six values must follow A*B.

• A number can be specified as a fraction with a positive denominator. For example, 1/3 or –1/3 are valid, but 1/–3 is invalid.

• When ALL is specified, only a list of values can follow. The number of values must be equal to the number of parameters (including the redundant ones) in the model.

• Effects appearing or implied on the FIXED and RANDOM subcommands but not specified on TEST are assumed to take the value 0 for all of their parameters.

• If ALL is specified for the first row in a TEST matrix, then all subsequent rows should begin with the ALL keyword.

• If effects are specified for the first row in a TEST matrix, then all subsequent rows should use the effect name (thus ALL is not allowed).

• When SUBJECT( ) is specified on a RANDOM subcommand, the coefficients given in the TEST subcommand will be divided by the number of subjects of that random effect automatically.

Example

MIXED Y BY A B C
  /FIX = A
  /RANDOM = B C
  /TEST = 'Contrasts of A' A 1/3 1/3 1/3; A 1 -1 0; A 1 -1/2 -1/2
  /TEST(1) = 'Contrast of B' | B 1 -1
  /TEST = 'BLUP at First Level of A'
          ALL 0 1 0 0 | 1 0 1 0;
          ALL         | 1 0 0 1;
          ALL 0 1 0 0;
          ALL 0 1 0 0 | 0 1 0 1.

Suppose that factor A has three levels and factors B and C each have two levels.

• The first TEST is labeled Contrasts of A. It performs three contrasts among levels of A. The first is technically not a contrast but the mean of level 1, level 2, and level 3 of A, the second is between level 1 and level 2 of A, and the third is between level 1 and the mean of level 2 and level 3 of A.

• The second TEST is labeled Contrast of B. Coefficients for B are preceded by the vertical bar (|) because B is a random effect. This contrast computes the difference between level 1 and level 2 of B, and tests if the difference equals 1.

• The third TEST is labeled BLUP at First Level of A. There are four parameters for the fixed effects (intercept and A), and there are four parameters for the random effects (B and C). Coefficients for the fixed-effect parameters are separated from those for the random-effect parameters by the vertical bar (|). The coefficients correspond to the parameter estimates in the order in which the parameter estimates are listed in the output.

Example

Suppose that factor A has three levels and factor B has four levels.

MIXED Y BY A B
  /FIXED = A B
  /TEST = 'test example' A 1 -1 0 DIVISOR=3;
                  B 0 0 1 -1 DIVISOR=4.

• For effect A, all contrast coefficients will be divided by 3; therefore, the actual coefficients are (1/3,–1/3,0).

• For effect B, all contrast coefficients will be divided by 4; therefore, the actual coefficients are (0,0,1/4,–1/4).

Related Topics

MIXED
Overview (MIXED command)
Examples
Case Frequency (MIXED command)
Covariance Structure List (MIXED command)
Variable List (MIXED command)
CRITERIA Subcommand (MIXED command)
EMMEANS Subcommand (MIXED command)
FIXED Subcommand (MIXED command)
METHOD Subcommand (MIXED command)
MISSING Subcommand (MIXED command)
PRINT Subcommand (MIXED command)
RANDOM Subcommand (MIXED command)
REGWGT Subcommand (MIXED command)
REPEATED Subcommand (MIXED command)
SAVE Subcommand (MIXED command)
Interpretation of Random Effect Covariance Structures (MIXED command)


Interpretation of Random Effect Covariance Structures (MIXED command)

This section is intended to provide some insight into the specification random effects and how their covariance structures differ from versions prior to 11.5. Throughout the examples, let A and B be factors with three levels, and let X and Y be covariates.

Example (Variance Component Models)

Random effect covariance matrix of A:

GA=σ2AI3

Random effect covariance matrix of B:

GB=σ2BI3

Overall random effect covariance matrix:

G=[
GA | 0
0 | GB
]6×6

Prior to version 11.5, this model could be specified by:

/RANDOM = A B | COVTYPE(ID)

or

/RANDOM = A | COVTYPE(ID)
/RANDOM = B | COVTYPE(ID)

with or without the explicit specification of the covariance structure.

As of version 11.5, this model could be specified by:

/RANDOM = A B | COVTYPE(VC)

or

/RANDOM = A | COVTYPE(VC)
/RANDOM = B | COVTYPE(VC)

with or without the explicit specification of the covariance structure.

or

/RANDOM = A | COVTYPE(ID)
/RANDOM = B | COVTYPE(ID)

with the explicit specification of the covariance structure.

Example (Independent Random Effects with Heterogeneous Variances)

Random effect covariance matrix of A:

GA=[
σ2A1 | 0 | 0
0 | σ2A2 | 0
0 | 0 | σ2A3
]

Random effect covariance matrix of B:

GB=[
σ2B1 | 0 | 0
0 | σ2B2 | 0
0 | 0 | σ2B3
]

Overall random effect covariance matrix:

G=[
GA | 0
0 | GB
]6×6

Prior to version 11.5, this model could be specified by:

/RANDOM = A B | COVTYPE(VC)

or

/RANDOM = A | COVTYPE(VC)
/RANDOM = B | COVTYPE(VC)

As of version 11.5, this model could be specified by:

/RANDOM = A B | COVTYPE(DIAG)

or

/RANDOM = A | COVTYPE(DIAG)
/RANDOM = B | COVTYPE(DIAG)

Example (Correlated Random Effects)

Overall random effect covariance matrix; one column belongs to X and one column belongs to Y.

G=[
σ2 | σ2ρ
σ2ρ | σ2
]

Prior to version 11.5, it was impossible to specify this model.

As of version 11.5, this model could be specified by:

/RANDOM = A B | COVTYPE(CSR)

Related Topics

MIXED
Overview (MIXED command)
Examples
Case Frequency (MIXED command)
Covariance Structure List (MIXED command)
Variable List (MIXED command)
CRITERIA Subcommand (MIXED command)
EMMEANS Subcommand (MIXED command)
FIXED Subcommand (MIXED command)
METHOD Subcommand (MIXED command)
MISSING Subcommand (MIXED command)
PRINT Subcommand (MIXED command)
RANDOM Subcommand (MIXED command)
REGWGT Subcommand (MIXED command)
REPEATED Subcommand (MIXED command)
SAVE Subcommand (MIXED command)
TEST Subcommand (MIXED command)


MLP

MLP (command),MLP (command),MLP (command)
MLP (command),MLP (command),MLP (command)
syntax chart,syntax chart,syntax chart
Multilayer Perceptron,Multilayer Perceptron,Multilayer Perceptron
command syntax,command syntax,command syntax

MLP is available in the Neural Networks option.

MLP dependent variable [(MLEVEL = {S})] [dependent variable...]
                                  {O}
                                  {N}

    [BY factor list] [WITH covariate list]

[/EXCEPT VARIABLES = varlist]

[/RESCALE [COVARIATE = {STANDARDIZED**}]
                       {NORMALIZED    }
                       {ADJNORMALIZED }
                       {NONE          }

          [DEPENDENT = {STANDARDIZED                         }]]
                       {NORMALIZED    [(CORRECTION = {0.02**})]}
                                                     {number}
                       {ADJNORMALIZED [(CORRECTION = {0.02**})]}
                                                     {number}
                       {NONE                                 }

[/PARTITION {TRAINING = {70**   } TESTING = {30**   } HOLDOUT = {0**    }}]
                        {integer}           {integer}           {integer}
            {VARIABLE = varname                                       }

[/ARCHITECTURE [AUTOMATIC = {YES**} [(MINUNITS = {1**    }, MAXUNITS = {50**   })]]
                                                 {integer}             {integer}
                            {NO   }

               [HIDDENLAYERS = {1** [(NUMUNITS = {AUTO** })]       }]
                                                 {integer}
                               {2 [(NUMUNITS = {AUTO**          })]}
                                               {integer, integer}
               [HIDDENFUNCTION = {TANH** }]   [OUTPUTFUNCTION = {IDENTITY}]]
                                 {SIGMOID}                      {SIGMOID }
                                                                {SOFTMAX }
                                                                {TANH    }

[/CRITERIA [TRAINING = {BATCH**  }]   [MINIBATCHSIZE = {AUTO** }]
                       {ONLINE   }                     {integer}
                       {MINIBATCH}

           [MEMSIZE = {1000** }]      [OPTIMIZATION = {GRADIENTDESCENT}]
                      {integer}                       {SCALEDCONJUGATE}

           [LEARNINGINITIAL = {0.4** }]   [LEARNINGLOWER = {0.001**}]
                              {number}                     {number }

           [MOMENTUM = {0.9** }]   [LEARNINGEPOCHS = {10**   }]
                       {number}                      {integer}

           [LAMBDAINITIAL = {0.0000005**}]   [SIGMAINITIAL = {0.00005**}]
                            {number     }                    {number   }

           [INTERVALCENTER = {0**   }]    [INTERVALOFFSET = {0.5** }]]
                             {number}                       {number}

[/STOPPINGRULES [ERRORSTEPS = {1**    } [(DATA = {AUTO** })]]
                              {integer}          {BOTH   }

                [TRAININGTIMER = {ON**} [(MAXTIME = {15**  })]]
                                 {OFF }             {number}

                [MAXEPOCHS = {AUTO** }
                             {integer}]

                [ERRORCHANGE = {0.0001**}]    [ERRORRATIO = {0.001**}]]
                               {number  }                   {number }

[/MISSING USERMISSING = {EXCLUDE**}]
                        {INCLUDE  }

[/PRINT [CPS**]  [NETWORKINFO**]  [SUMMARY**]  [CLASSIFICATION**]
        [SOLUTION]  [IMPORTANCE]  [NONE]]

[/PLOT [NETWORK**]  [PREDICTED]  [RESIDUAL]  [ROC]
       [GAIN]  [LIFT]  [NONE]]

[/SAVE [PREDVAL[(varname [varname...])]]

       [PSEUDOPROB[(rootname[:{25     }] [rootname...])]]]
                            {integer}

[/OUTFILE [MODEL = 'file' ['file'...]]]

** Default if the subcommand or keyword is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See MLP Algorithms for computational details for this procedure.

Syntax for the MLP command can be generated from the Multilayer Perceptron dialog box.

Release History Collapse Hide details

Release History

Release 16.0

• Command introduced.

Example

MLP dep_var BY A B C WITH X Y Z.

Related Topics

Overview (MLP command)
Examples (MLP command)
Variable Lists (MLP command)
EXCEPT Subcommand (MLP command)
RESCALE Subcommand (MLP command)
PARTITION Subcommand (MLP command)
ARCHITECTURE Subcommand (MLP command)
CRITERIA Subcommand (MLP command)
STOPPINGRULES Subcommand (MLP command)
MISSING Subcommand (MLP command)
PRINT Subcommand (MLP command)
PLOT Subcommand (MLP command)
SAVE Subcommand (MLP command)
OUTFILE Subcommand (MLP command)
PLOT Subcommand (RBF command)


Overview (MLP command)

Neural networks are a data mining tool for finding unknown patterns in databases. Neural networks can be used to make business decisions by forecasting demand for a product as a function of price and other variables or by categorizing customers based on buying habits and demographic characteristics. The MLP procedure fits a particular kind of neural network called a multilayer perceptron. The multilayer perceptron uses a feedforward architecture and can have multiple hidden layers. It is one of the most commonly used neural network architectures.

Options Collapse Hide details

Options

Prediction or classification. One or more dependent variables may be specified, and they may be scale, categorical, or a combination. If a dependent variable has a scale measurement level, then the neural network predicts continuous values that approximate the “true” value of some continuous function of the input data. If a dependent variable is categorical, then the neural network is used to classify cases into the “best” category based on the input predictors.

Rescaling. MLP optionally rescales covariates or scale dependent variables before training the neural network. There are three rescaling options: standardization, normalization, and adjusted normalization.

Training, testing, and holdout data. MLP optionally divides the dataset into training, testing, and holdout data. The neural network is trained using the training data. The training data or testing data, or both, can be used to track errors across steps and determine when to stop training. The holdout data is completely excluded from the training process and is used for independent assessment of the final network.

Architecture selection. MLP can perform automatic architecture selection, or it can build a neural network based on user specifications. Automatic architecture selection creates a neural network with one hidden layer and finds the “best” number of hidden units. Alternatively, you can specify one or two hidden layers and define the number of hidden units in each layer.

Activation functions. Units in the hidden layers can use the hyperbolic or sigmoid activation functions. Units in the output layer can use the hyperbolic, sigmoid, identity, or softmax activation functions.

Training methods. The neural network can be built using batch, online, or mini-batch training. Gradient descent and scaled conjugate gradient optimization algorithms are available.

Missing Values. The MLP procedure has an option for treating user-missing values of categorical variables as valid. User-missing values of scale variables are always treated as invalid.

Output. MLP displays pivot table output but offers an option for suppressing most such output. Graphical output includes a network diagram (default) and a number of optional charts: predicted-by-observed values, residual-by-predicted values, ROC (Receiver Operating Characteristic) curves, cumulative gains, lift, and independent variable importance. The procedure also optionally saves predicted values in the active dataset. Synaptic weight estimates can be saved in PASW Statistics or XML files also.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is the MLP command followed by one or more dependent variables, the BY keyword and one or more factors, and the WITH keyword and one or more covariates. By default, the MLP procedure standardizes covariates and selects a training sample before training the neural network. Automatic architecture selection is used to find the “best” neural network architecture. User-missing values are excluded, and default pivot table output is displayed.

Syntax Rules Collapse Hide details

Syntax Rules

• All subcommands are optional.

• Subcommands may be specified in any order.

• Only a single instance of each subcommand is allowed.

• An error occurs if a keyword is specified more than once within a subcommand.

• Parentheses, equals signs, and slashes shown in the syntax chart are required.

• The command name, subcommand names, and keywords must be spelled in full.

• Empty subcommands are not allowed.

• Any split variable defined on the SPLIT FILE command may not be used as a dependent variable, factor, covariate, or partition variable.

Limitations Collapse Hide details

Limitations

The WEIGHT setting is ignored with a warning by the MLP procedure.

Categorical Variables Collapse Hide details

Categorical Variables

Although the MLP procedure accepts categorical variables as predictors or as the dependent variable, the user should be cautious when using a categorical variable with a very large number of categories.

The MLP procedure temporarily recodes categorical predictors and dependent variables using one-of-c coding for the duration of the procedure. If there are c categories of a variable, then the variable is stored as c vectors, with the first category denoted (1,0,...,0), the next category (0,1,0,...,0), ..., and the final category (0,0,...,0,1).

This coding scheme increases the number of synaptic weights. In particular, the total number of input units is the number of scale predictors plus the number of categories across all categorical predictors. As a result, this coding scheme can lead to slower training, but more “compact” coding methods usually lead to poorly fit neural networks. If your network training is proceeding very slowly, you might try reducing the number of categories in your categorical predictors by combining similar categories or dropping cases that have extremely rare categories before running the MLP procedure.

All one-of-c coding is based on the training data, even if a testing or holdout sample is defined (see PARTITION Subcommand (MLP command)). Thus, if the testing or holdout samples contain cases with predictor categories that are not present in the training data, then those cases are not used by the procedure or in scoring. If the testing or holdout samples contain cases with dependent variable categories that are not present in the training data, then those cases are not used by the procedure but they may be scored.

Replicating results Collapse Hide details

Replicating results

The MLP procedure uses random number generation during random assignment of partitions, random subsampling for initialization of synaptic weights, random subsampling for automatic architecture selection, and the simulated annealing algorithm used in weight initialization and automatic architecture selection. To reproduce the same randomized results in the future, use the SET command to set the initialization value for the random number generator before each run of the MLP procedure.

MLP results are also dependent on data order. The online and mini-batch training methods are explicitly dependent upon data order; however, even batch training is data-order dependent due to the weight initialization algorithm. For all three training methods, initialization of synaptic weights uses simulated annealing, which takes a random sample from the entire data set and randomly splits it into training (70%) and testing (30%) samples. The size of the random sample is N = min(1000, memsize), where memsize is the user-controlled maximum number of cases stored in memory. (See the /CRITERIA MEMSIZE keyword.) If the entire dataset has less than N cases, then all N cases are used.

To minimize data order effects, randomly order the cases before running the MLP procedure. To verify the stability of a given solution, you may want to obtain several different solutions with cases sorted in different random orders. In situations with extremely large file sizes, multiple runs can be performed with a sample of cases sorted in different random orders.

Finally, MLP results may be influenced by the variable order on the command line due to the different pattern of initial values assigned when the command line variable order is changed. As with data order effects, you might try different command line variable orders to assess the stability of a given solution.

In summary, if you want to exactly replicate MLP results in the future, use the same initialization value for the random number generator, the same data order, and the same command line variable order, in addition to using the same MLP procedure settings.

Related Topics

MLP
Examples (MLP command)
Variable Lists (MLP command)
EXCEPT Subcommand (MLP command)
RESCALE Subcommand (MLP command)
PARTITION Subcommand (MLP command)
ARCHITECTURE Subcommand (MLP command)
CRITERIA Subcommand (MLP command)
STOPPINGRULES Subcommand (MLP command)
MISSING Subcommand (MLP command)
PRINT Subcommand (MLP command)
PLOT Subcommand (MLP command)
SAVE Subcommand (MLP command)
OUTFILE Subcommand (MLP command)
PLOT Subcommand (RBF command)


Examples (MLP command)

Basic specification with default neural network settings

MLP DepVar BY A B C WITH X Y Z.

• The MLP procedure treats DepVar as the dependent variable.

• Predictors A, B, and C are factors, and X, Y, and Z are covariates.

• By default, covariates are standardized before training. Also, the active dataset is partitioned into training and testing data samples, with 70% going to the training data and 30% to the testing data sample.

• Automatic architecture selection is used to find the “best” neural network architecture.

• User-missing values are excluded and default output is displayed.

User-specified neural network with two hidden layers

MLP DepVar BY A B C WITH X Y Z
  /PARTITION
     TRAINING=100 TESTING=0
  /ARCHITECTURE
     AUTOMATIC=NO
     HIDDENLAYERS=2 (NUMUNITS=25,10)
     OUTPUTFUNCTION=SIGMOID.

• The MLP procedure treats DepVar as the dependent variable. Predictors A, B, and C are factors, and X, Y, and Z are covariates.

• By default, covariates are standardized before training. The PARTITION subcommand overrides the default partitioning of the active dataset into training and testing data and treats all cases as training data.

• The ARCHITECTURE subcommand turns off automatic architecture selection (AUTOMATIC = NO) and specifies a neural network with two hidden layers. There are 25 hidden units in the first hidden layer and 10 hidden units in the second hidden layer. The sigmoid activation function is used for units in the output layer.

• User-missing values are excluded and default output is displayed.

Automatic architecture with partitions specified by variable

*Multilayer Perceptron Network.
MLP default (MLEVEL=N) BY ed WITH age employ address income debtinc
    creddebt othdebt
  /RESCALE COVARIATE=STANDARDIZED
  /PARTITION  VARIABLE=partition
  /ARCHITECTURE   AUTOMATIC=YES (MINUNITS=1 MAXUNITS=50)
  /CRITERIA TRAINING=BATCH OPTIMIZATION=SCALEDCONJUGATE LAMBDAINITIAL=0.0000005
    SIGMAINITIAL=0.00005 INTERVALCENTER=0 INTERVALOFFSET=0.5
  /PRINT CPS NETWORKINFO SUMMARY CLASSIFICATION IMPORTANCE
  /PLOT ROC GAIN LIFT PREDICTED
  /STOPPINGRULES ERRORSTEPS= 1 (DATA=AUTO) TRAININGTIMER=ON (MAXTIME=15)
    MAXEPOCHS=AUTO ERRORCHANGE=1.0E-4 ERRORRATIO=0.0010
  /MISSING USERMISSING=EXCLUDE .

• The procedure builds a network for the nominal-level variable default, based upon the factor ed and covariates age through othdebt.

• Cases are assigned to training, testing, and holdout samples based on the values of partition.

• In addition to the default tabular output, a sensitivity analysis to compute the importance of each predictor is requested.

• The default graphical output (the network diagram) is not requested, but an ROC curve, cumulative gains chart, lift chart, and predicted by observed chart will be produced.

• All other options are set to their default values.

For discussion of output from this syntax and to place the example in context, see Using a Multilayer Perceptron to Assess Credit Risk.

Multiple dependent variables; two hidden layers with automatic numbers of units selection

*Multilayer Perceptron Network.
MLP los (MLEVEL=S) cost (MLEVEL=S) BY agecat gender diabetes bp smoker choles
    active obesity angina mi nitro anticlot time doa ekg cpk tropt clotsolv
    bleed magnes digi betablk der proc comp
  /RESCALE DEPENDENT=ADJNORMALIZED (CORRECTION=0.02)
  /PARTITION  TRAINING=7  TESTING=2  HOLDOUT=1
  /ARCHITECTURE   AUTOMATIC=NO HIDDENLAYERS=2 (NUMUNITS=AUTO)
    HIDDENFUNCTION=TANH OUTPUTFUNCTION=TANH
  /CRITERIA TRAINING=ONLINE OPTIMIZATION=GRADIENTDESCENT LEARNINGINITIAL= 0.4
  LEARNINGLOWER= 0.001 LEARNINGEPOCHS= 10 MOMENTUM= 0.9 INTERVALCENTER=0
  INTERVALOFFSET=0.5 MEMSIZE=1000
  /PRINT CPS NETWORKINFO SUMMARY IMPORTANCE
  /PLOT PREDICTED RESIDUAL
  /SAVE PREDVAL
  /STOPPINGRULES ERRORSTEPS= 1 (DATA=AUTO) TRAININGTIMER=ON (MAXTIME=15)
    MAXEPOCHS=AUTO ERRORCHANGE=1.0E-4 ERRORRATIO=0.0010
  /MISSING USERMISSING=INCLUDE .

• The procedure has fit a network to the scale variables los and cost, using agecat through anticlot and time through comp as factors.

• The RESCALE subcommand specifies that dependent variables are rescaled using the adjusted normalized method.

• The PARTITION subcommand requests that cases be assigned to the training, testing, and holdout samples in a 7:2:1 ratio.

• The ARCHITECTURE subcommand specifies a custom architecture with two hidden layers and the hyperbolic tangent as the activation function for the output layer.

• The CRITERIA subcommand specifies that online training will be used to estimate the network parameters, using the default settings for the gradient descent algorithm.

• The PRINT subcommand requests a sensitivity analysis to compute the importance of each predictor, in addition to the default output.

• The PLOT subcommand does not request default graphical output (the network diagram), but predicted-by-observed and residuals-by-predicted charts will be produced.

• The SAVE subcommand requests that predicted values be saved to the active dataset.

• The MISSING subcommand specifies that user-missing values of factors and categorical dependents be included in the analysis.

• All other options are set to their default values.

For discussion of output from this syntax and to place the example in context, see Using a Multilayer Perceptron to Estimate Healthcare Costs and Lengths of Stay.

Related Topics

MLP
Overview (MLP command)
Variable Lists (MLP command)
EXCEPT Subcommand (MLP command)
RESCALE Subcommand (MLP command)
PARTITION Subcommand (MLP command)
ARCHITECTURE Subcommand (MLP command)
CRITERIA Subcommand (MLP command)
STOPPINGRULES Subcommand (MLP command)
MISSING Subcommand (MLP command)
PRINT Subcommand (MLP command)
PLOT Subcommand (MLP command)
SAVE Subcommand (MLP command)
OUTFILE Subcommand (MLP command)
PLOT Subcommand (RBF command)


Variable Lists (MLP command)

MLP (command),MLP (command),MLP (command)
variable lists,variable lists,variable lists

The command line variable lists specify the dependent variables, any categorical predictors (also known as factors), and any scale predictors (also known as covariates).

Dependent Variables

• A list of one or more dependent variables must be the first specification on the MLP command.

• Each dependent variable may be followed by the measurement level specification, which contains, in parentheses, the MLEVEL keyword followed by an equals sign and then S for scale, O for ordinal, or N for nominal. MLP treats ordinal and nominal dependent variables equivalently as categorical.

• If a measurement level is specified, then it temporarily overrides a dependent variable’s setting in the data dictionary.

• If no measurement level is specified, then MLP defaults to the dictionary setting.

• If a measurement level is not specified and no setting is recorded in the data dictionary, then a numeric variable is treated as scale and a string variable is treated as categorical.

• Dependent variables can be numeric or string.

• A string variable may be defined as ordinal or nominal only.

Predictor Variables

• The names of the factors, if any, must be preceded by the keyword BY.

• If keyword BY is specified with no factors, then a warning is issued and BY is ignored.

• The names of the covariates, if any, must be preceded by the keyword WITH.

• If keyword WITH is specified with no covariates, then a warning is issued and WITH is ignored.

• A dependent variable may not be specified within a factor or covariate list. If a dependent variable is specified within one of these lists, then an error is issued.

• All variables specified within a factor or covariate list must be unique. If duplicate variables are specified within a list, then the duplicates are ignored.

• If duplicate variables are specified across the factor and covariate lists, then an error is issued.

• The universal keywords TO and ALL may be specified in the factor and covariate lists.

• Factor variables can be numeric or string.

• Covariates must be numeric.

• If no predictors at all are specified, then the procedure fits an input layer containing only the bias unit—that is, the constant-only input layer.

• At least one predictor must be specified.

Related Topics

MLP
Overview (MLP command)
Examples (MLP command)
EXCEPT Subcommand (MLP command)
RESCALE Subcommand (MLP command)
PARTITION Subcommand (MLP command)
ARCHITECTURE Subcommand (MLP command)
CRITERIA Subcommand (MLP command)
STOPPINGRULES Subcommand (MLP command)
MISSING Subcommand (MLP command)
PRINT Subcommand (MLP command)
PLOT Subcommand (MLP command)
SAVE Subcommand (MLP command)
OUTFILE Subcommand (MLP command)
PLOT Subcommand (RBF command)


EXCEPT Subcommand (MLP command)

MLP (command),MLP (command),MLP (command)
EXCEPT subcommand,EXCEPT subcommand,EXCEPT subcommand
EXCEPT (subcommand),EXCEPT (subcommand),EXCEPT (subcommand)
MLP command,MLP command,MLP command

The EXCEPT subcommand lists any variables that the MLP procedure should exclude from the factor or covariate lists on the command line. This subcommand is useful if the factor or covariate lists contain a large number of variables—specified using the TO or ALL keyword, for example—but there are a few variables (for example, Case ID) that should be excluded.

The EXCEPT subcommand is introduced strictly for the purpose of simplifying syntax. Missing values on factors or covariates specified on EXCEPT do not affect whether a case is included in the analysis. For example, the following two MLP commands are equivalent. In both commands, listwise deletion is based on the dependent variable and factors A, B, and C.

MLP DepVar BY A B C.
MLP DepVar BY A B C D   /EXCEPT VARIABLES=D.

• The EXCEPT subcommand ignores duplicate variables and variables that are not specified on the command line’s factor or covariate lists.

• There is no default variable list on the EXCEPT subcommand.

Related Topics

MLP
Overview (MLP command)
Examples (MLP command)
Variable Lists (MLP command)
RESCALE Subcommand (MLP command)
PARTITION Subcommand (MLP command)
ARCHITECTURE Subcommand (MLP command)
CRITERIA Subcommand (MLP command)
STOPPINGRULES Subcommand (MLP command)
MISSING Subcommand (MLP command)
PRINT Subcommand (MLP command)
PLOT Subcommand (MLP command)
SAVE Subcommand (MLP command)
OUTFILE Subcommand (MLP command)
PLOT Subcommand (RBF command)


RESCALE Subcommand (MLP command)

MLP (command),MLP (command),MLP (command)
RESCALE subcommand,RESCALE subcommand,RESCALE subcommand
RESCALE (subcommand),RESCALE (subcommand),RESCALE (subcommand)
MLP command,MLP command,MLP command

The RESCALE subcommand is used to rescale covariates or scale dependent variables.

All rescaling is performed based on the training data, even if a testing or holdout sample is defined (see PARTITION Subcommand (MLP command)). That is, depending on the type of rescaling, the mean, standard deviation, minimum value, or maximum value of a covariate or dependent variable are computed using only the training data. It is important that these covariates or dependent variables have similar distributions across the training, testing, and holdout samples. If the data are partitioned by specifying percentages on the PARTITION subcommand, then the MLP procedure attempts to ensure this similarity by random assignment. However, if you use the PARTITION subcommand VARIABLE keyword to assign cases to the training, testing, and holdout samples, then we recommend that you confirm the distributions are similar across samples before running the MLP procedure.

COVARIATE (keyword),COVARIATE (keyword),COVARIATE (keyword)
MLP command,MLP command,MLP command
STANDARDIZED (keyword),STANDARDIZED (keyword),STANDARDIZED (keyword)
MLP command,MLP command,MLP command
NORMALIZED (keyword),NORMALIZED (keyword),NORMALIZED (keyword)
MLP command,MLP command,MLP command
ADJNORMALIZED (keyword),ADJNORMALIZED (keyword),ADJNORMALIZED (keyword)
MLP command,MLP command,MLP command
NONE (keyword),NONE (keyword),NONE (keyword)
MLP command,MLP command,MLP command
COVARIATE Keyword Collapse Hide details

COVARIATE Keyword

The COVARIATE keyword specifies the rescaling method to use for covariates specified following WITH on the command line. If no covariates are specified on the command line, then the COVARIATE keyword is ignored.

STANDARDIZED | Subtract the mean and divide by the standard deviation, (x−mean)/s. This is the default rescaling method for covariates.
NORMALIZED | Subtract the minimum and divide by the range, (x−min)/(max−min).
ADJNORMALIZED | Adjusted version of subtract the minimum and divide by the range, [2*(x−min)/(max−min)]−1 .
NONE | No rescaling of covariates.
DEPENDENT (keyword),DEPENDENT (keyword),DEPENDENT (keyword)
MLP command,MLP command,MLP command
STANDARDIZED (keyword),STANDARDIZED (keyword),STANDARDIZED (keyword)
MLP command,MLP command,MLP command
NORMALIZED (keyword),NORMALIZED (keyword),NORMALIZED (keyword)
MLP command,MLP command,MLP command
ADJNORMALIZED (keyword),ADJNORMALIZED (keyword),ADJNORMALIZED (keyword)
MLP command,MLP command,MLP command
NONE (keyword),NONE (keyword),NONE (keyword)
MLP command,MLP command,MLP command
DEPENDENT Keyword Collapse Hide details

DEPENDENT Keyword

The DEPENDENT keyword specifies the rescaling method to use for scale dependent variables.

• This keyword applies only to scale dependent variables—that is, either MLEVEL=S is specified on the command line or the variable has a scale measurement level based on its data dictionary setting. If a dependent variable is not scale, then the DEPENDENT keyword is ignored for that variable.

• The availability of these rescaling methods for scale dependent variables depends on the output layer activation function in effect.

• If the identity activation function is in effect, then any of the rescaling methods, including NONE, may be requested. If the sigmoid activation function is in effect, then NORMALIZED is required. If the hyperbolic tangent activation function is in effect, then ADJNORMALIZED is required.

• If automatic architecture selection is in effect (/ARCHITECTURE AUTOMATIC=YES), then the default output layer activation function (identity if there are any scale dependent variables) is always used. In this case, the default rescaling method (STANDARDIZED) is also used and the DEPENDENT keyword is ignored.

STANDARDIZED | Subtract the mean and divide by the standard deviation, (x−mean)/s. This is the default rescaling method for scale dependent variables if the output layer uses the identity activation function. This rescaling method may not be specified if the output layer uses the sigmoid or hyperbolic tangent activation function.
NORMALIZED | Subtract the minimum and divide by the range, (x−min)/(max−min). This is the required rescaling method for scale dependent variables if the output layer uses the sigmoid activation function. This rescaling method may not be specified if the output layer uses the hyperbolic tangent activation function.
 | The NORMALIZED keyword may be followed by the CORRECTION option, which specifies a number ε that is applied as a correction to the rescaling formula. In particular, the corrected formula is [x−(min−ε)]/[(max+ε)−(min−ε)]. This correction ensures that all rescaled dependent variable values will be within the range of the activation function. A real number greater than or equal to 0 must be specified. The default is 0.02.
ADJNORMALIZED | Adjusted version of subtract the minimum and divide by the range, [2*(x−min)/(max−min)]−1 . This is the required rescaling method for scale dependent variables if the output layer uses the hyperbolic tangent activation function. This rescaling method may not be specified if the output layer uses the sigmoid activation function.
 | The ADJNORMALIZED keyword may be followed by the CORRECTION option, which specifies a number ε that is applied as a correction to the rescaling formula. In particular, the corrected formula is {2*[(x−(min−ε))/((max+ε)−(min−ε))]}−1. This correction ensures that all rescaled dependent variable values will be within the range of the activation function. A real number greater than or equal to 0 must be specified. The default is 0.02.
NONE | No rescaling of scale dependent variables.

Related Topics

MLP
Overview (MLP command)
Examples (MLP command)
Variable Lists (MLP command)
EXCEPT Subcommand (MLP command)
PARTITION Subcommand (MLP command)
ARCHITECTURE Subcommand (MLP command)
CRITERIA Subcommand (MLP command)
STOPPINGRULES Subcommand (MLP command)
MISSING Subcommand (MLP command)
PRINT Subcommand (MLP command)
PLOT Subcommand (MLP command)
SAVE Subcommand (MLP command)
OUTFILE Subcommand (MLP command)
PLOT Subcommand (RBF command)


PARTITION Subcommand (MLP command)

MLP (command),MLP (command),MLP (command)
PARTITION subcommand,PARTITION subcommand,PARTITION subcommand
PARTITION (subcommand),PARTITION (subcommand),PARTITION (subcommand)
MLP command,MLP command,MLP command

The PARTITION subcommand specifies the method of partitioning the active dataset into training, testing, and holdout samples. The training sample comprises the data records used to train the neural network. The testing sample is an independent set of data records used to track prediction error during training in order to prevent overtraining. The holdout sample is another independent set of data records used to assess the final neural network.

• The partition can be defined by specifying the ratio of cases randomly assigned to each sample (training, testing, and holdout) or by a variable that assigns each case to the training, testing, or holdout sample.

• If the PARTITION subcommand is not specified, then the default partition randomly assigns 70% of the cases to the training sample, 30% to the testing sample, and 0% to the holdout sample. If you want to specify a different random assignment, then you must specify new values for the TRAINING, TESTING, and HOLDOUT keywords. The value specified on each keyword gives the relative number of cases in the active dataset to assign to each sample. For example, /PARTITION TRAINING = 50 TESTING = 30 HOLDOUT = 20 is equivalent to /PARTITION TRAINING = 5 TESTING = 3 HOLDOUT = 2; both subcommands randomly assign 50% of the cases to the training sample, 30% to the testing sample, and 20% to the holdout sample.

• If you want to be able to reproduce results based on the TRAINING, TESTING, and HOLDOUT keywords later, use the SET command to set the initialization value for the random number generator before running the MLP procedure.

• Be aware of the relationship between rescaling and partitioning. See the topic RESCALE Subcommand (MLP command) for more information.

• All partitioning is performed after listwise deletion of any cases with invalid data for any variable used by the procedure. See MISSING Subcommand (MLP command) for details about valid and invalid data.

TRAINING (keyword),TRAINING (keyword),TRAINING (keyword)
MLP command,MLP command,MLP command
TRAINING Keyword Collapse Hide details

TRAINING Keyword

The TRAINING keyword specifies the relative number of cases in the active dataset to randomly assign to the training sample. The value must be an integer greater than 0. The default (if the PARTITION subcommand is not specified) is 70.

TESTING (keyword),TESTING (keyword),TESTING (keyword)
MLP command,MLP command,MLP command
TESTING Keyword Collapse Hide details

TESTING Keyword

The TESTING keyword specifies the relative number of cases in the active dataset to randomly assign to the testing sample. The value must be an integer greater than 0. The default (if the PARTITION subcommand is not specified) is 30.

HOLDOUT (keyword),HOLDOUT (keyword),HOLDOUT (keyword)
MLP command,MLP command,MLP command
HOLDOUT Keyword Collapse Hide details

HOLDOUT Keyword

The HOLDOUT keyword specifies the relative number of cases in the active dataset to randomly assign to the holdout sample. The value must be an integer greater than 0. The default (if the PARTITION subcommand is not specified) is 0.

VARIABLE (keyword),VARIABLE (keyword),VARIABLE (keyword)
MLP command,MLP command,MLP command
VARIABLE Keyword Collapse Hide details

VARIABLE Keyword

The VARIABLE keyword specifies a variable that assigns each case in the active dataset to the training, testing, or holdout sample. Cases with a positive value on the variable are assigned to the training sample, cases with a value of 0 to the testing sample, and cases with a negative value to the holdout sample. Cases with a system-missing value are excluded from the analysis. (Any user-missing values for the partition variable are always treated as valid.)

The variable may not be the dependent variable or any variable specified on the command line factor or covariate lists. The variable must be numeric.

Related Topics

MLP
Overview (MLP command)
Examples (MLP command)
Variable Lists (MLP command)
EXCEPT Subcommand (MLP command)
RESCALE Subcommand (MLP command)
ARCHITECTURE Subcommand (MLP command)
CRITERIA Subcommand (MLP command)
STOPPINGRULES Subcommand (MLP command)
MISSING Subcommand (MLP command)
PRINT Subcommand (MLP command)
PLOT Subcommand (MLP command)
SAVE Subcommand (MLP command)
OUTFILE Subcommand (MLP command)
PLOT Subcommand (RBF command)


ARCHITECTURE Subcommand (MLP command)

MLP (command),MLP (command),MLP (command)
ARCHITECTURE subcommand,ARCHITECTURE subcommand,ARCHITECTURE subcommand
ARCHITECTURE (subcommand),ARCHITECTURE (subcommand),ARCHITECTURE (subcommand)
MLP command,MLP command,MLP command

The ARCHITECTURE subcommand is used to specify the neural network architecture. By default, automatic architecture selection is used to build the network. However, you have the option of overriding automatic architecture selection and building a more specific structure.

AUTOMATIC (keyword),AUTOMATIC (keyword),AUTOMATIC (keyword)
MLP command,MLP command,MLP command
YES (keyword),YES (keyword),YES (keyword)
MLP command,MLP command,MLP command
NO (keyword),NO (keyword),NO (keyword)
MLP command,MLP command,MLP command
AUTOMATIC Keyword Collapse Hide details

AUTOMATIC Keyword

The AUTOMATIC keyword indicates whether to use automatic architecture selection to build the neural network. Automatic architecture selection builds a network with one hidden layer. Using a prespecified range defining the minimum and maximum number of hidden units, automatic architecture selection computes the “best” number of units in the hidden layer. Automatic architecture selection uses the default activation functions for the hidden and output layers.

If automatic architecture selection is used, then a random sample from the total dataset (excluding any data records included in the holdout sample as defined on the PARTITION subcommand) is taken and split into training (70%) and testing (30%) samples. This random sample is used to find the architecture and fit the network. Then, the network is retrained using the entire dataset (taking into account the training, testing, and holdout samples defined on the PARTITION subcommand), with the synaptic weights obtained from the random sample used as the initial weights.

The size of the random sample N = min(1000, memsize), where memsize is the user-specified maximum number of cases to store in memory (see the MEMSIZE keyword in CRITERIA Subcommand (MLP command)). If the total dataset (excluding holdout cases) has less than N cases, then all cases (excluding holdout cases) are used. If you want to be able to reproduce results based on the AUTOMATIC keyword later, use the SET command to set the initialization value for the random number generator before running the MLP procedure.

YES | Use automatic architecture selection to build the network. This is the default.
 | The YES keyword may be followed by parentheses containing the MINUNITS and MAXUNITS options, which specify the minimum and maximum number of units, respectively, that automatic architecture selection will consider in determining the “best” number of units. It is invalid to specify only one option; you must specify both or neither. The options may be specified in any order and must be separated by a comma or space character. Both numbers must be integers greater than 0, with MINUNITS less than MAXUNITS. The defaults are MINUNITS=1, MAXUNITS=50.
 | If AUTOMATIC=YES is specified, then all other ARCHITECTURE subcommand keywords are invalid.
NO | Do not use automatic architecture selection to build the network. All other ARCHITECTURE subcommand keywords are valid only if AUTOMATIC=NO is specified.
HIDDENLAYERS (keyword),HIDDENLAYERS (keyword),HIDDENLAYERS (keyword)
MLP command,MLP command,MLP command
HIDDENLAYERS Keyword Collapse Hide details

HIDDENLAYERS Keyword

The HIDDENLAYERS keyword specifies the number of hidden layers in the neural network.

This keyword is honored only if automatic architecture selection is not used—that is, if AUTOMATIC=NO. If automatic architecture selection is in effect, then the HIDDENLAYERS keyword is ignored.

1 | One hidden layer. This is the default. The HIDDENLAYERS=1 specification may be followed by the NUMUNITS option, which gives the number of units in the first hidden layer, excluding the bias unit. Specify AUTO to automatically compute the number of units based on the number of input and output units. Alternatively, specify an integer greater than or equal to 1 to request a particular number of hidden units. The default is AUTO.
2 | Two hidden layers. The HIDDENLAYERS=2 specification may be followed by the NUMUNITS option, which gives the number of units in the first and second hidden layers, excluding the bias unit in each layer. Specify AUTO to automatically compute the numbers of units based on the number of input and output units. Alternatively, specify two integers greater than or equal to 1 to request particular numbers of hidden units in the first and second hidden layers, respectively. The default is AUTO.
HIDDENFUNCTION (keyword),HIDDENFUNCTION (keyword),HIDDENFUNCTION (keyword)
MLP command,MLP command,MLP command
TANH (keyword),TANH (keyword),TANH (keyword)
MLP command,MLP command,MLP command
SIGMOID (keyword),SIGMOID (keyword),SIGMOID (keyword)
MLP command,MLP command,MLP command
HIDDENFUNCTION Keyword Collapse Hide details

HIDDENFUNCTION Keyword

The HIDDENFUNCTION keyword specifies the activation function to use for all units in the hidden layers. This keyword is honored only if automatic architecture selection is not used—that is, if AUTOMATIC=NO. If automatic architecture selection is in effect, then the HIDDENFUNCTION keyword is ignored.

TANH | Hyperbolic tangent. This function has form: γ(c) = tanh(c) = (ec−e−c)/(ec+e−c). It takes real-valued arguments and transforms them to the range (–1, 1). This is the default activation function for all units in the hidden layers.
SIGMOID | Sigmoid. This function has form: γ(c) = 1/(1+e−c). It takes real-valued arguments and transforms them to the range (0, 1).
OUTPUTFUNCTION (keyword),OUTPUTFUNCTION (keyword),OUTPUTFUNCTION (keyword)
MLP command,MLP command,MLP command
IDENTITY (keyword),IDENTITY (keyword),IDENTITY (keyword)
MLP command,MLP command,MLP command
SIGMOID (keyword),SIGMOID (keyword),SIGMOID (keyword)
MLP command,MLP command,MLP command
TANH (keyword),TANH (keyword),TANH (keyword)
MLP command,MLP command,MLP command
SOFTMAX (keyword),SOFTMAX (keyword),SOFTMAX (keyword)
MLP command,MLP command,MLP command
OUTPUTFUNCTION Keyword Collapse Hide details

OUTPUTFUNCTION Keyword

The OUTPUTFUNCTION keyword specifies the activation function to use for all units in the output layer.

The activation function used in the output layer has a special relationship with the error function, which is the measure that the neural network is trying to minimize. In particular, the error function is automatically assigned based on the activation function for the output layer. Sum-of-squares error, the sum of the squared deviations between the observed dependent variable values and the model-predicted values, is used when the identity, sigmoid, or hyperbolic tangent activation function is applied to the output layer. Cross-entropy error is used when the softmax activation function is applied to the output layer.

The OUTPUTFUNCTION keyword is honored only if automatic architecture selection is not used—that is, if AUTOMATIC=NO. If automatic architecture selection is in effect, then OUTPUTFUNCTION is ignored.

IDENTITY | Identity. This function has form: γ(c) = c. It takes real-valued arguments and returns them unchanged. This is the default activation function for units in the output layer if there are any scale dependent variables.
SIGMOID | Sigmoid. This function has form: γ(c) = 1/(1+e−c). It takes real-valued arguments and transforms them to the range (0, 1).
TANH | Hyperbolic tangent. This function has form: γ(c) = tanh(c) = (ec−e−c)/(ec+e−c). It takes real-valued arguments and transforms them to the range (–1, 1).
SOFTMAX | Softmax. This function has form: γ(ck) = exp(ck)/Σjexp(cj). It takes a vector of real-valued arguments and transforms it to a vector whose elements fall in the range (0, 1) and sum to 1. Softmax is available only if all dependent variables are categorical; if SOFTMAX is specified and there are any scale dependent variables, then an error is issued. This is the default activation function for units in the output layer if all dependent variables are categorical.

Related Topics

MLP
Overview (MLP command)
Examples (MLP command)
Variable Lists (MLP command)
EXCEPT Subcommand (MLP command)
RESCALE Subcommand (MLP command)
PARTITION Subcommand (MLP command)
CRITERIA Subcommand (MLP command)
STOPPINGRULES Subcommand (MLP command)
MISSING Subcommand (MLP command)
PRINT Subcommand (MLP command)
PLOT Subcommand (MLP command)
SAVE Subcommand (MLP command)
OUTFILE Subcommand (MLP command)
PLOT Subcommand (RBF command)


CRITERIA Subcommand (MLP command)

MLP (command),MLP (command),MLP (command)
CRITERIA subcommand,CRITERIA subcommand,CRITERIA subcommand
CRITERIA (subcommand),CRITERIA (subcommand),CRITERIA (subcommand)
MLP command,MLP command,MLP command

The CRITERIA subcommand specifies computational and resource settings for the MLP procedure.

TRAINING (keyword),TRAINING (keyword),TRAINING (keyword)
MLP command,MLP command,MLP command
BATCH (keyword),BATCH (keyword),BATCH (keyword)
MLP command,MLP command,MLP command
ONLINE (keyword),ONLINE (keyword),ONLINE (keyword)
MLP command,MLP command,MLP command
MINIBATCH (keyword),MINIBATCH (keyword),MINIBATCH (keyword)
MLP command,MLP command,MLP command
TRAINING Keyword Collapse Hide details

TRAINING Keyword

The TRAINING keyword specifies the training type, which determines how the neural network processes training data records.

The online and mini-batch training methods are explicitly dependent upon data order; however, even batch training is dependent upon data order because initialization of synaptic weights involves subsampling from the dataset. To minimize data order effects, randomly order the cases before running the MLP procedure.

BATCH | Batch training. Updates the synaptic weights only after passing all training data records—that is, batch training uses information from all records in the training dataset. Batch training is often preferred because it directly minimizes the total prediction error. However, batch training may need to update the weights many times until one of the stopping rules is met and, hence, may need many data passes. It is most useful for smaller datasets. This is the default training type.
ONLINE | Online training. Updates the synaptic weights after every single training data record—that is, online training uses information from one record at a time. Online training continuously gets a record and updates the weights until one of the stopping rules is met. If all the records are used once and none of the stopping rules is met, then the process continues by recycling the data records. Online training is superior to batch only for larger datasets with associated predictors. If there are many records and many inputs, and their values are not independent of each other, then online training can more quickly obtain a reasonable answer than batch training.
MINIBATCH | Mini-batch training. Divides the training data records into K groups of approximately equal size, then updates the synaptic weights after passing one group—that is, mini-batch training uses information from a group of records. The process then recycles the data group if necessary. The number of training records per mini-batch is determined by the MINIBATCHSIZE keyword. Mini-batch training offers a compromise between batch and online training, and it may be best for "medium-size" datasets.
MINIBATCHSIZE (keyword),MINIBATCHSIZE (keyword),MINIBATCHSIZE (keyword)
MLP command,MLP command,MLP command
MINIBATCHSIZE Keyword Collapse Hide details

MINIBATCHSIZE Keyword

The MINIBATCHSIZE keyword specifies the number of training records per mini-batch.

• Specify AUTO to automatically compute the number of records per mini-batch as R = min(max(M/10,2),memsize), where M is the number of training records and memsize is the maximum number of cases to store in memory (see the MEMSIZE keyword below). If the remainder of M/R is r, then when the end of the data is reached, the process places the final r records in the same mini-batch with the first R−r records of the next data pass. This “wrapping” of mini-batches will place different cases in the mini-batches with each data pass unless R divides M with no remainder.

• Alternatively, specify an integer greater than or equal to 2 and less than or equal to memsize to request a particular number of records. If the number of training records turns out to be less than the specified MINIBATCHSIZE, the number of training records is used instead.

• The default is AUTO.

• This keyword is ignored if TRAINING = MINIBATCH is not in effect.

MEMSIZE (keyword),MEMSIZE (keyword),MEMSIZE (keyword)
MLP command,MLP command,MLP command
MEMSIZE Keyword Collapse Hide details

MEMSIZE Keyword

The MEMSIZE keyword specifies the maximum number of cases to store in memory when synaptic weight initialization, automatic architecture selection, and/or mini-batch training is in effect.

• Specify an integer greater than or equal to 2. The default is 1000.

OPTIMIZATION (keyword),OPTIMIZATION (keyword),OPTIMIZATION (keyword)
MLP command,MLP command,MLP command
GRADIENTDESCENT (keyword),GRADIENTDESCENT (keyword),GRADIENTDESCENT (keyword)
MLP command,MLP command,MLP command
SCALEDCONJUGATE (keyword),SCALEDCONJUGATE (keyword),SCALEDCONJUGATE (keyword)
MLP command,MLP command,MLP command
OPTIMIZATION Keyword Collapse Hide details

OPTIMIZATION Keyword

The OPTIMIZATION keyword specifies the optimization algorithm used to determine the synaptic weights.

GRADIENTDESCENT
 | Gradient descent. Gradient descent is the required optimization algorithm for online and mini-batch training. It is optional for batch training. When gradient descent is used with online and mini-batch training, the algorithm’s user-specified parameters are the initial learning rate, lower bound for the learning rate, momentum, and number of data passes (see the LEARNINGINITIAL, LEARNINGLOWER, MOMENTUM, and LEARNINGEPOCHS keywords, respectively). With batch training, the user-specified parameters are the initial learning rate and the momentum. See the topic Gradient Descent (multilayer perceptron algorithms) for more information.
SCALEDCONJUGATE
 | Scaled conjugate gradient. Scaled conjugate gradient is the default for batch training. The assumptions that justify the use of conjugate gradient methods do not apply to the online and mini-batch training, so this method may not be used if TRAINING = ONLINE or MINIBATCH. The user-specified parameters are the initial lambda and sigma (see the LAMBDAINITIAL and SIGMAINITIAL keywords). See the topic Scaled Conjugate Gradient (multilayer perceptron algorithms) for more information.
LEARNINGINITIAL (keyword),LEARNINGINITIAL (keyword),LEARNINGINITIAL (keyword)
MLP command,MLP command,MLP command
LEARNINGINITIAL Keyword Collapse Hide details

LEARNINGINITIAL Keyword

The LEARNINGINITIAL keyword specifies the initial learning rate η0 for the gradient descent optimization algorithm.

• Specify a number greater than 0. The default is 0.4.

• This keyword is ignored if OPTIMIZATION = GRADIENTDESCENT is not in effect.

LEARNINGLOWER (keyword),LEARNINGLOWER (keyword),LEARNINGLOWER (keyword)
MLP command,MLP command,MLP command
LEARNINGLOWER Keyword Collapse Hide details

LEARNINGLOWER Keyword

The LEARNINGLOWER keyword specifies the lower boundary for the learning rate ηlow when gradient descent is used with online or mini-batch training.

• Specify a number greater than 0 and less than the initial learning rate (see the LEARNINGINITIAL keyword). The default is 0.001.

• This keyword is ignored if TRAINING = ONLINE or MINIBATCH and OPTIMIZATION = GRADIENTDESCENT are not in effect.

MOMENTUM (keyword),MOMENTUM (keyword),MOMENTUM (keyword)
MLP command,MLP command,MLP command
MOMENTUM Keyword Collapse Hide details

MOMENTUM Keyword

The MOMENTUM keyword specifies the initial momentum rate α for the gradient descent optimization algorithm.

• Specify a number greater than 0. The default is 0.9.

• This keyword is ignored if OPTIMIZATION = GRADIENTDESCENT is not in effect.

LEARNINGEPOCHS (keyword),LEARNINGEPOCHS (keyword),LEARNINGEPOCHS (keyword)
MLP command,MLP command,MLP command
LEARNINGEPOCHS Keyword Collapse Hide details

LEARNINGEPOCHS Keyword

The LEARNINGEPOCHS keyword specifies the number of epochs (data passes of the training set) p to reduce the learning rate when gradient descent is used with online or mini-batch training. You can control the learning rate decay factor β by specifying the number of epochs it takes for the learning rate to decrease from η0 to ηlow. This corresponds to β = (1/pK)*ln(η0/ηlow), where K is the total number of mini-batches in the training dataset. For online training, K = M, where M is the number of training records.

• Specify an integer greater than 0. The default is 10.

• This keyword is ignored if TRAINING = ONLINE or MINIBATCH and OPTIMIZATION = GRADIENTDESCENT are not in effect.

LAMBDAINITIAL (keyword),LAMBDAINITIAL (keyword),LAMBDAINITIAL (keyword)
MLP command,MLP command,MLP command
LAMBDAINITIAL Keyword Collapse Hide details

LAMBDAINITIAL Keyword

The LAMBDAINITIAL keyword specifies the initial lambda, λ0, for the scaled conjugate gradient optimization algorithm.

• Specify a number greater than 0 and less than 10-6. The default is 0.0000005.

• This keyword is ignored if OPTIMIZATION = SCALEDCONJUGATE is not in effect.

SIGMAINITIAL (keyword),SIGMAINITIAL (keyword),SIGMAINITIAL (keyword)
MLP command,MLP command,MLP command
SIGMAINITIAL Keyword Collapse Hide details

SIGMAINITIAL Keyword

The SIGMAINITIAL keyword specifies the initial sigma, σ0, for the scaled conjugate gradient optimization algorithm.

• Specify a number greater than 0 and less than 10-4. The default is 0.00005.

• This keyword is ignored if OPTIMIZATION = SCALEDCONJUGATE is not in effect.

INTERVALCENTER (keyword),INTERVALCENTER (keyword),INTERVALCENTER (keyword)
MLP command,MLP command,MLP command
INTERVALOFFSET (keyword),INTERVALOFFSET (keyword),INTERVALOFFSET (keyword)
MLP command,MLP command,MLP command
INTERVALCENTER and INTERVALOFFSET Keywords Collapse Hide details

INTERVALCENTER and INTERVALOFFSET Keywords

The INTERVALCENTER and INTERVALOFFSET keywords specify the interval [a0−a, a0+a] in which weight vectors are randomly generated when simulated annealing is used. INTERVALCENTER corresponds to a0 and INTERVALOFFSET corresponds to a.

• Simulated annealing is used to break out of a local minimum, with the goal of finding the global minimum, during the optimization algorithm. This approach is used in weight initialization and automatic architecture selection.

• Specify a number for INTERVALCENTER. The INTERVALCENTER default is 0. Specify a number greater than 0 for INTERVALOFFSET. The INTERVALOFFSET default is 0.5. The default interval is [−0.5, 0.5].

Related Topics

MLP
Overview (MLP command)
Examples (MLP command)
Variable Lists (MLP command)
EXCEPT Subcommand (MLP command)
RESCALE Subcommand (MLP command)
PARTITION Subcommand (MLP command)
ARCHITECTURE Subcommand (MLP command)
STOPPINGRULES Subcommand (MLP command)
MISSING Subcommand (MLP command)
PRINT Subcommand (MLP command)
PLOT Subcommand (MLP command)
SAVE Subcommand (MLP command)
OUTFILE Subcommand (MLP command)
PLOT Subcommand (RBF command)


STOPPINGRULES Subcommand (MLP command)

MLP (command),MLP (command),MLP (command)
STOPPINGRULES subcommand,STOPPINGRULES subcommand,STOPPINGRULES subcommand
STOPPINGRULES (subcommand),STOPPINGRULES (subcommand),STOPPINGRULES (subcommand)
MLP command,MLP command,MLP command

The STOPPINGRULES subcommand specifies the rules that determine when to stop training the neural network. Training proceeds through at least one data pass. Training can then be stopped according to the following criteria, which are listed as STOPPINGRULES keywords. Stopping rules are checked in the listed order. (In the keyword descriptions, a step is a data pass for the online and mini-batch methods, an iteration for the batch method.)

Note: After each complete data pass, online and mini-batch training require an extra data pass in order to compute the training error. This extra data pass can slow training considerably, so if you use online or mini-batch training, we recommend specifying a testing dataset. Then, if you use only the testing set in the ERRORSTEPS criterion, the ERRORCHANGE and ERRORRATIO criteria will not be checked.

ERRORSTEPS (keyword),ERRORSTEPS (keyword),ERRORSTEPS (keyword)
MLP command,MLP command,MLP command
ERRORSTEPS Keyword Collapse Hide details

ERRORSTEPS Keyword

The ERRORSTEPS keyword specifies the number of steps, n, to allow before checking for a decrease in error. If there is no decrease in error after n steps, then training stops.

• Any integer greater than or equal to 1 may be specified. The default is 1.

• The DATA option following ERRORSTEPS specifies how to compute error.

(DATA=AUTO)
 | Compute error using the testing sample if it exists or using the training sample otherwise. If the error at any step does not decrease below the current minimum error (based on preceding steps) over the next n steps, then training stops.
 | For online and mini-batch training, if there is no testing sample, then the procedure computes error using the training sample. Batch training, on the other hand, guarantees a decrease in the training sample error after each data pass, thus this option is ignored if batch training is in effect and there is no testing sample.
 | DATA = AUTO is the default option.
(DATA=BOTH)
 | Compute errors using the testing sample and the training sample. If neither the testing sample error nor the training sample error decreases below its current minimum error over the next n steps, then training stops.
 | For batch training, which guarantees a decrease in the training sample error after each data pass, this option is the same as DATA= AUTO.
 | DATA = BOTH may be specified only if testing data are defined—that is, /PARTITION TESTING is specified with a number greater than zero or /PARTITION VARIABLE is used. If DATA = BOTH is specified when /PARTITION TESTING = 0, or when /PARTITION VARIABLE is used but no testing data exist in the active dataset, then an error is issued.
TRAININGTIMER (keyword),TRAININGTIMER (keyword),TRAININGTIMER (keyword)
MLP command,MLP command,MLP command
TRAININGTIMER Keyword Collapse Hide details

TRAININGTIMER Keyword

The TRAININGTIMER keyword specifies whether the training timer is turned on or off.

• If TRAININGTIMER = ON, then the MAXTIME option gives the maximum number of minutes allowed for training. Training stops if the algorithm exceeds the maximum allotted time.

• If TRAININGTIMER = OFF, then the MAXTIME option is ignored.

• TRAININGTIMER may be specified with keyword ON or OFF. The default is ON.

• The MAXTIME option may be specified with any number greater than 0. The default is 15.

MAXEPOCHS (keyword),MAXEPOCHS (keyword),MAXEPOCHS (keyword)
MLP command,MLP command,MLP command
MAXEPOCHS Keyword Collapse Hide details

MAXEPOCHS Keyword

The MAXEPOCHS keyword specifies the maximum number of epochs (data passes) allowed for the training data. If the maximum number of epochs is exceeded, then training stops.

• Specify AUTO to automatically compute the maximum number of epochs as max(2N+1, 100), where N is the number of synaptic weights in the neural network.

• Alternatively, specify an integer greater than 0 to request a particular maximum number of epochs.

• The default is AUTO.

ERRORCHANGE (keyword),ERRORCHANGE (keyword),ERRORCHANGE (keyword)
MLP command,MLP command,MLP command
ERRORCHANGE Keyword Collapse Hide details

ERRORCHANGE Keyword

The ERRORCHANGE keyword specifies the relative change in training error criterion. Training stops if the relative change in the training error compared to the previous step is less than the criterion value.

• Any number greater than 0 may be specified. The default is 0.0001.

• For online and mini-batch training, this criterion is ignored if the ERRORSTEPS criterion uses only testing data.

ERRORRATIO (keyword),ERRORRATIO (keyword),ERRORRATIO (keyword)
MLP command,MLP command,MLP command
ERRORRATIO Keyword Collapse Hide details

ERRORRATIO Keyword

The ERRORRATIO keyword specifies the training error ratio criterion. Training stops if the ratio of the training error to the error of the null model is less than the criterion value. The null model predicts the average value for all dependent variables.

• Any number greater than 0 may be specified. The default is 0.001.

• For online and mini-batch training, this criterion is ignored if the ERRORSTEPS criterion uses only testing data.

Related Topics

MLP
Overview (MLP command)
Examples (MLP command)
Variable Lists (MLP command)
EXCEPT Subcommand (MLP command)
RESCALE Subcommand (MLP command)
PARTITION Subcommand (MLP command)
ARCHITECTURE Subcommand (MLP command)
CRITERIA Subcommand (MLP command)
MISSING Subcommand (MLP command)
PRINT Subcommand (MLP command)
PLOT Subcommand (MLP command)
SAVE Subcommand (MLP command)
OUTFILE Subcommand (MLP command)
PLOT Subcommand (RBF command)


MISSING Subcommand (MLP command)

MLP (command),MLP (command),MLP (command)
MISSING subcommand,MISSING subcommand,MISSING subcommand
MISSING (subcommand),MISSING (subcommand),MISSING (subcommand)
MLP command,MLP command,MLP command

The MISSING subcommand is used to control whether user-missing values for categorical variables—that is, factors and categorical dependent variables—are treated as valid values. By default, user-missing values for categorical variables are treated as invalid.

• User-missing values for scale variables are always treated as invalid.

• System-missing values for any variables are always treated as invalid.

USERMISSING (keyword),USERMISSING (keyword),USERMISSING (keyword)
MLP command,MLP command,MLP command
USERMISSING=EXCLUDE
 | User-missing values for categorical variables are treated as invalid. This is the default.
USERMISSING=INCLUDE
 | User-missing values for categorical variables are treated as valid values.

Related Topics

MLP
Overview (MLP command)
Examples (MLP command)
Variable Lists (MLP command)
EXCEPT Subcommand (MLP command)
RESCALE Subcommand (MLP command)
PARTITION Subcommand (MLP command)
ARCHITECTURE Subcommand (MLP command)
CRITERIA Subcommand (MLP command)
STOPPINGRULES Subcommand (MLP command)
PRINT Subcommand (MLP command)
PLOT Subcommand (MLP command)
SAVE Subcommand (MLP command)
OUTFILE Subcommand (MLP command)
PLOT Subcommand (RBF command)


PRINT Subcommand (MLP command)

MLP (command),MLP (command),MLP (command)
PRINT subcommand,PRINT subcommand,PRINT subcommand
PRINT (subcommand),PRINT (subcommand),PRINT (subcommand)
MLP command,MLP command,MLP command

The PRINT subcommand indicates the tabular output to display and can be used to request a sensitivity analysis. If PRINT is not specified, then the default tables are displayed. If PRINT is specified, then only the requested PRINT output is displayed.

CPS (keyword),CPS (keyword),CPS (keyword)
MLP command,MLP command,MLP command
CPS Keyword Collapse Hide details

CPS Keyword

The CPS keyword displays the case processing summary table, which summarizes the number of cases included and excluded in the analysis, in total and by training, testing, and holdout samples. This table is shown by default.

NETWORKINFO (keyword),NETWORKINFO (keyword),NETWORKINFO (keyword)
MLP command,MLP command,MLP command
NETWORKINFO Keyword Collapse Hide details

NETWORKINFO Keyword

The NETWORKINFO keyword displays information about the neural network, including the dependent variables, number of input and output units, number of hidden layers and units, and activation functions. This table is shown by default.

SUMMARY (keyword),SUMMARY (keyword),SUMMARY (keyword)
MLP command,MLP command,MLP command
SUMMARY Keyword Collapse Hide details

SUMMARY Keyword

The SUMMARY keyword displays a summary of the neural network results, including the error, the relative error or percent of incorrect predictions, the stopping rule used to stop training, and the training time.

• The error is the sum-of-squares error when the identity, sigmoid, or hyperbolic tangent activation function is applied to the output layer. It is the cross-entropy error when the softmax activation function is applied to the output layer.

• In addition, relative errors or percents of incorrect predictions are displayed, depending on the dependent variable measurement levels. If any dependent variable has a scale measurement level, then the average overall relative error (relative to the mean model) is displayed. If all dependent variables are categorical, then the average percent of incorrect predictions is displayed. Relative errors or percents of incorrect predictions are also displayed for individual dependent variables.

• Summary results are given for the training data and for testing and hold-out data if they exist.

• This table is shown by default.

CLASSIFICATION (keyword),CLASSIFICATION (keyword),CLASSIFICATION (keyword)
MLP command,MLP command,MLP command
CLASSIFICATION Keyword Collapse Hide details

CLASSIFICATION Keyword

The CLASSIFICATION keyword displays a classification table for each categorical dependent variable. The table gives the number of cases classified correctly and incorrectly for each dependent variable category.

• In addition to classification tables, the CLASSIFICATION keyword reports the percent of the total cases that were correctly classified. A case is correctly classified if its highest predicted probabilities correspond to the observed categories for that case.

• Classification results are given for the training data and for testing and holdout data if they exist.

• Classification results are shown by default.

• The CLASSIFICATION keyword is ignored for scale dependent variables.

SOLUTION (keyword),SOLUTION (keyword),SOLUTION (keyword)
MLP command,MLP command,MLP command
SOLUTION Keyword Collapse Hide details

SOLUTION Keyword

The SOLUTION keyword displays the synaptic weights—that is, the coefficient estimates, from layer i−1 unit j to layer i unit k. The synaptic weights are based on the training sample even if the active dataset is partitioned into training, testing, and holdout data.

This table is not shown by default because the number of synaptic weights may be extremely large, and these weights are generally not used for interpreting network results.

IMPORTANCE (keyword),IMPORTANCE (keyword),IMPORTANCE (keyword)
MLP command,MLP command,MLP command
IMPORTANCE Keyword Collapse Hide details

IMPORTANCE Keyword

The IMPORTANCE keyword performs a sensitivity analysis, which computes the importance of each predictor in determining the neural network. The analysis is based on the combined training and testing samples or only the training sample if there is no testing sample. This keyword creates a table and a chart displaying importance and normalized importance for each predictor.

Sensitivity analysis is not performed by default because it is computationally expensive and time-consuming if there are a large number of predictors or cases.

NONE (keyword),NONE (keyword),NONE (keyword)
MLP command,MLP command,MLP command
NONE Keyword Collapse Hide details

NONE Keyword

The NONE keyword suppresses all PRINT output except the Notes table and any warnings. This keyword may not be specified with any other PRINT keywords.

Related Topics

MLP
Overview (MLP command)
Examples (MLP command)
Variable Lists (MLP command)
EXCEPT Subcommand (MLP command)
RESCALE Subcommand (MLP command)
PARTITION Subcommand (MLP command)
ARCHITECTURE Subcommand (MLP command)
CRITERIA Subcommand (MLP command)
STOPPINGRULES Subcommand (MLP command)
MISSING Subcommand (MLP command)
PLOT Subcommand (MLP command)
SAVE Subcommand (MLP command)
OUTFILE Subcommand (MLP command)
PLOT Subcommand (RBF command)


PLOT Subcommand (MLP command)

MLP (command),MLP (command),MLP (command)
PLOT subcommand,PLOT subcommand,PLOT subcommand
PLOT (subcommand),PLOT (subcommand),PLOT (subcommand)
MLP command,MLP command,MLP command

The PLOT subcommand indicates the chart output to display. If PLOT is not specified, then the default chart (the network diagram) is displayed. If PLOT is specified, then only the requested PLOT output is displayed.

NETWORK (keyword),NETWORK (keyword),NETWORK (keyword)
MLP command,MLP command,MLP command
NETWORK Keyword Collapse Hide details

NETWORK Keyword

The NETWORK keyword displays the network diagram. This chart is shown by default.

PREDICTED (keyword),PREDICTED (keyword),PREDICTED (keyword)
MLP command,MLP command,MLP command
PREDICTED Keyword Collapse Hide details

PREDICTED Keyword

The PREDICTED keyword displays a predicted-by-observed value chart for each dependent variable. For categorical dependent variables, a boxplot of predicted pseudo-probabilities is displayed. For scale dependent variables, a scatterplot is displayed.

• Predicted-by-observed value charts are based on the combined training and testing samples or only the training sample if there is no testing sample.

RESIDUAL (keyword),RESIDUAL (keyword),RESIDUAL (keyword)
MLP command,MLP command,MLP command
RESIDUAL Keyword Collapse Hide details

RESIDUAL Keyword

The RESIDUAL keyword displays a residual-by-predicted value chart for each scale dependent variable. This chart is available only for scale dependent variables. The RESIDUAL keyword is ignored for categorical dependent variables.

• Residual-by-predicted value charts are based on the combined training and testing samples or only the training sample if there is no testing sample.

ROC (keyword),ROC (keyword),ROC (keyword)
MLP command,MLP command,MLP command
ROC Keyword Collapse Hide details

ROC Keyword

The ROC keyword displays an ROC (Receiver Operating Characteristic) chart for each categorical dependent variable. It also displays a table giving the area under each curve in the chart.

• For a given dependent variable, the ROC chart displays one curve for each category. If the dependent variable has two categories, then each curve treats the category at issue as the positive state versus the other category. If the dependent variable has more than two categories, then each curve treats the category at issue as the positive state versus the aggregate of all other categories.

• This chart is available only for categorical dependent variables. The ROC keyword is ignored for scale dependent variables.

• ROC charts and area computations are based on the combined training and testing samples or only the training sample if there is no testing sample.

GAIN (keyword),GAIN (keyword),GAIN (keyword)
MLP command,MLP command,MLP command
GAIN Keyword Collapse Hide details

GAIN Keyword

The GAIN keyword displays a cumulative gains chart for each categorical dependent variable.

• The display of one curve for each dependent variable category is the same as for the ROC keyword.

• This chart is available only for categorical dependent variables. The GAIN keyword is ignored for scale dependent variables.

• Cumulative gains charts are based on the combined training and testing samples or only the training sample if there is no testing sample.

LIFT (keyword),LIFT (keyword),LIFT (keyword)
MLP command,MLP command,MLP command
LIFT Keyword Collapse Hide details

LIFT Keyword

The LIFT keyword displays a lift chart for each categorical dependent variable.

• The display of one curve for each dependent variable category is the same as for the ROC keyword.

• This chart is available only for categorical dependent variables. The LIFT keyword is ignored for scale dependent variables.

• Lift charts are based on the combined training and testing samples or only the training sample if there is no testing sample.

NONE (keyword),NONE (keyword),NONE (keyword)
MLP command,MLP command,MLP command
NONE Keyword Collapse Hide details

NONE Keyword

The NONE keyword suppresses all PLOT output. This keyword may not be specified with any other PLOT keywords.

Related Topics

MLP
Overview (MLP command)
Examples (MLP command)
Variable Lists (MLP command)
EXCEPT Subcommand (MLP command)
RESCALE Subcommand (MLP command)
PARTITION Subcommand (MLP command)
ARCHITECTURE Subcommand (MLP command)
CRITERIA Subcommand (MLP command)
STOPPINGRULES Subcommand (MLP command)
MISSING Subcommand (MLP command)
PRINT Subcommand (MLP command)
SAVE Subcommand (MLP command)
OUTFILE Subcommand (MLP command)
PLOT Subcommand (RBF command)


SAVE Subcommand (MLP command)

MLP (command),MLP (command),MLP (command)
SAVE subcommand,SAVE subcommand,SAVE subcommand
SAVE (subcommand),SAVE (subcommand),SAVE (subcommand)
MLP command,MLP command,MLP command

The SAVE subcommand writes optional temporary variables to the active dataset.

PREDVAL (keyword),PREDVAL (keyword),PREDVAL (keyword)
MLP command,MLP command,MLP command
PSEUDOPROB (keyword),PSEUDOPROB (keyword),PSEUDOPROB (keyword)
MLP command,MLP command,MLP command
PREDVAL(varname varname…)
 | Predicted value or category. This saves the predicted value for scale dependent variables and the predicted category for categorical dependent variables.
 | Specify one or more unique, valid variable names. There should be as many variable names specified as there are dependent variables, and the names should be listed in the order of the dependent variables on the command line. If you do not specify enough variable names, then default names are used for any remaining variables. If you specify too many variable names, then any remaining names are ignored.
 | If there is only one dependent variable, then the default variable name is MLP_PredictedValue. If there are multiple dependent variables, then the default variable names are MLP_PredictedValue_1, MLP_PredictedValue_2, etc., corresponding to the order of the dependent variables on the command line.
PSEUDOPROB(rootname:n rootname…)
 | Predicted pseudo-probability. If a dependent variable is categorical, then this keyword saves the predicted pseudo-probabilities of the first n categories of that dependent variable.
 | Specify one or more unique, valid variable names. There should be as many variable names specified as there are categorical dependent variables, and the names should be listed in the order of the categorical dependent variables on the command line. The specified names are treated as rootnames. Suffixes are added to each rootname to get a group of variable names corresponding to the categories for a given dependent variable. If you do not specify enough variable names, then default names are used for any remaining categorical dependent variables. If you specify too many variable names, then any remaining names are ignored.
 | A colon and a positive integer giving the number of probabilities to save for a dependent variable can follow the rootname.
 | If there is only one dependent variable, then the default rootname is MLP_PseudoProbability. If there are multiple dependent variables, then the default rootnames are MLP_PseudoProbability_1, MLP_PseudoProbability_2, etc., corresponding to the order of the categorical dependent variables on the command line and taking into account the position of any scale dependent variables.
 | The default n is 25.
 | This keyword is ignored for scale dependent variables.

Probabilities and Pseudo-probabilities

Categorical dependent variables with softmax activation and cross-entropy error will have a predicted value for each category, where each predicted value is the probability that the case belongs to the category.

Categorical dependent variables with sum-of-squares error will have a predicted value for each category, but the predicted values cannot be interpreted as probabilities. The SAVE subcommand saves these predicted pseudo-probabilities even if any are less than zero or greater than one or the sum for a given dependent variable is not 1.

The ROC, cumulative gains, and lift charts (see /PLOT ROC, GAIN, and LIFT, respectively) are created based on pseudo-probabilities. In the event that any of the pseudo-probabilities are less than zero or greater than one or the sum for a given variable is not 1, they are first rescaled to be between zero and one and to sum to 1. The SAVE subcommand saves the original pseudo-probabilities, but the charts are based on rescaled pseudo-probabilities.

Pseudo-probabilities are rescaled by dividing by their sum. For example, if a case has predicted pseudo-probabilities of 0.50, 0.60, and 0.40 for a three-category dependent variable, then each pseudo-probability is divided by the sum 1.50 to get 0.33, 0.40, and 0.27.

If any of the pseudo-probabilities are negative, then the absolute value of the lowest is added to all pseudo-probabilities before the above rescaling. For example, if the pseudo-probabilities are -0.30, 0.50, and 1.30, then first add 0.30 to each value to get 0.00, 0.80, and 1.60. Next, divide each new value by the sum 2.40 to get 0.00, 0.33, and 0.67.

Related Topics

MLP
Overview (MLP command)
Examples (MLP command)
Variable Lists (MLP command)
EXCEPT Subcommand (MLP command)
RESCALE Subcommand (MLP command)
PARTITION Subcommand (MLP command)
ARCHITECTURE Subcommand (MLP command)
CRITERIA Subcommand (MLP command)
STOPPINGRULES Subcommand (MLP command)
MISSING Subcommand (MLP command)
PRINT Subcommand (MLP command)
PLOT Subcommand (MLP command)
OUTFILE Subcommand (MLP command)
PLOT Subcommand (RBF command)


OUTFILE Subcommand (MLP command)

MLP (command),MLP (command),MLP (command)
OUTFILE subcommand,OUTFILE subcommand,OUTFILE subcommand
OUTFILE (subcommand),OUTFILE (subcommand),OUTFILE (subcommand)
MLP command,MLP command,MLP command

The OUTFILE subcommand saves XML-format (PMML) files containing the synaptic weights. SmartScore and PASW Statistics Server (a separate product) can use this file to apply the model information to other data files for scoring purposes.

• Filenames must be specified in full. MLP does not supply extensions.

• The MODEL keyword is not honored if split-file processing is in effect (see SPLIT FILE). If this keyword is specified when split-file processing is on, a warning is displayed.

MODEL (keyword),MODEL (keyword),MODEL (keyword)
MLP command,MLP command,MLP command
MODEL = 'file' 'file'…
Writes the synaptic weights to XML (PMML) files. Specify one or more unique, valid filenames. There should be as many filenames as there are dependent variables, and the names should be listed in the order of the dependent variables on the command line. If you do not specify enough filenames, then an error is issued. If you specify too many filenames, then any remaining names are ignored.

If any 'file' specification refers to an existing file, then the file is overwritten. If any 'file' specifications refer to the same file, then only the last instance of this 'file' specification is honored.

Related Topics

MLP
Overview (MLP command)
Examples (MLP command)
Variable Lists (MLP command)
EXCEPT Subcommand (MLP command)
RESCALE Subcommand (MLP command)
PARTITION Subcommand (MLP command)
ARCHITECTURE Subcommand (MLP command)
CRITERIA Subcommand (MLP command)
STOPPINGRULES Subcommand (MLP command)
MISSING Subcommand (MLP command)
PRINT Subcommand (MLP command)
PLOT Subcommand (MLP command)
SAVE Subcommand (MLP command)
PLOT Subcommand (RBF command)


MODEL CLOSE

MODEL CLOSE (command),MODEL CLOSE (command),MODEL CLOSE (command)
MODEL CLOSE (command),MODEL CLOSE (command),MODEL CLOSE (command)
syntax chart,syntax chart,syntax chart
release history,release history,release history

MODEL CLOSE is available in PASW Statistics Server.

MODEL CLOSE NAME={handlelist}
                 {ALL       }

This command takes effect immediately. It does not read the active dataset or execute pending transformations. See the topic Command Order for more information.

Release History Collapse Hide details

Release History

Release 13.0

• Command introduced.

Example

MODEL CLOSE NAME=discrimmod1 twostep1.

MODEL CLOSE NAME=ALL.

Related Topics

Overview (MODEL CLOSE command)
MODEL HANDLE
MODEL LIST


Overview (MODEL CLOSE command)

NAME (keyword),NAME (keyword),NAME (keyword)
MODEL CLOSE command,MODEL CLOSE command,MODEL CLOSE command

The MODEL CLOSE command is available only if you have access to PASW Statistics Server. MODEL CLOSE is used to discard cached models and their associated model handle names (see MODEL HANDLE).

Basic Specification

The basic specification is NAME followed by a list of model handles. Each model handle name should match the name specified on the MODEL HANDLE command. The keyword ALL specifies that all model handles are to be closed.

Related Topics

MODEL CLOSE


MODEL HANDLE

MODEL HANDLE (command),MODEL HANDLE (command),MODEL HANDLE (command)
MODEL HANDLE (command),MODEL HANDLE (command),MODEL HANDLE (command)
syntax chart,syntax chart,syntax chart
release history,release history,release history

MODEL HANDLE is available in PASW Statistics Server.

MODEL HANDLE NAME=handle FILE=’file specification’
 [/OPTIONS  [MISSING=[{SUBSTITUTE**}]] ]
                      {SYSMIS      }

 [/MAP  VARIABLES=varlist MODELVARIABLES=varlist  ]

**Default if the keyword is omitted.

This command takes effect immediately. It does not read the active dataset or execute pending transformations. See the topic Command Order for more information.

Syntax for the MODEL HANDLE command can be generated from the Load Model dialog.

Release History Collapse Hide details

Release History

Release 13.0

• Command introduced.

Example

MODEL HANDLE NAME=discrimmod1 FILE=’/modelfiles/discrim1.mml’.

Related Topics

Overview (MODEL HANDLE command)
NAME Subcommand (MODEL HANDLE command)
FILE Keyword (MODEL HANDLE command)
OPTIONS Subcommand (MODEL HANDLE command)
MAP Subcommand (MODEL HANDLE command)
MODEL CLOSE
MODEL LIST


Overview (MODEL HANDLE command)

The MODEL HANDLE command is available only if you have access to PASW Statistics Server.

MODEL HANDLE reads an external XML file containing specifications for a predictive model. It caches the model specifications and associates a unique name (handle) with the cached model. The model can then be used by the APPLYMODEL and STRAPPLYMODEL transformation functions to calculate scores and other results (see Scoring Expressions). The MODEL CLOSE command is used to discard a cached model from memory.

Different models can be applied to the same data by using separate MODEL HANDLE commands for each of the models.

MODEL HANDLE can read XML model specifications produced by:

• REGRESSION, DISCRIMINANT, and TWOSTEP CLUSTER in the Statistics Base option

• LOGISTIC REGRESSION and NOMREG in the Regression Models option

• TREE in the Decision Trees option

• All PASW Modeler models that support export to PMML except Sequence Detection

• AnswerTree and Predictive Analytic Components

Options Collapse Hide details

Options

Variable Mapping. You can map any or all of the variables in the original model to different variables in the current active dataset. By default, the model is applied to variables in the current active dataset with the same names as the variables in the original model.

Handling Missing Values. You can choose how to handle cases with missing values. By default, an attempt is made to substitute a sensible value for a missing value, but you can choose to treat missing values as system-missing.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is NAME and FILE. NAME specifies the model handle name to be used when referring to this model. FILE specifies the external file containing the model specifications.

Subcommand Order Collapse Hide details

Subcommand Order

• Subcommands can be specified in any order.

Syntax Rules Collapse Hide details

Syntax Rules

• When using the MAP subcommand, you must specify both the VARIABLES and MODELVARIABLES keywords.

• Multiple MAP subcommands are allowed. Each MAP subcommand should provide the mappings for a distinct subset of the variables. Subsequent mappings of a given variable override any previous mappings of that same variable.

Operations Collapse Hide details

Operations

• A model handle is used only during the current working session. The handle is not saved with the data file.

• Issuing a SET LOCALE command that changes the server’s code page requires closing any existing model handles (using MODEL CLOSE) and reopening the models (using MODEL HANDLE) before proceeding with scoring.

Related Topics

MODEL HANDLE
NAME Subcommand (MODEL HANDLE command)
FILE Keyword (MODEL HANDLE command)
OPTIONS Subcommand (MODEL HANDLE command)
MAP Subcommand (MODEL HANDLE command)


NAME Subcommand (MODEL HANDLE command)

NAME (subcommand),NAME (subcommand),NAME (subcommand)
MODEL HANDLE command,MODEL HANDLE command,MODEL HANDLE command
MODEL HANDLE (command),MODEL HANDLE (command),MODEL HANDLE (command)
NAME subcommand,NAME subcommand,NAME subcommand

NAME specifies the model handle name. The rules for valid model handle names are the same as for PASW Statistics variable names with the addition of the $ character as an allowed first character. The model handle name should be unique for each model.

Related Topics

MODEL HANDLE
Overview (MODEL HANDLE command)
FILE Keyword (MODEL HANDLE command)
OPTIONS Subcommand (MODEL HANDLE command)
MAP Subcommand (MODEL HANDLE command)


FILE Keyword (MODEL HANDLE command)

FILE (keyword),FILE (keyword),FILE (keyword)
MODEL HANDLE command,MODEL HANDLE command,MODEL HANDLE command

The FILE keyword is used to specify the external model file that you want to refer to by the model handle.

• File specifications should be enclosed in quotation marks.

• Fully qualified paths are recommended to avoid ambiguity.

Related Topics

MODEL HANDLE
Overview (MODEL HANDLE command)
NAME Subcommand (MODEL HANDLE command)
OPTIONS Subcommand (MODEL HANDLE command)
MAP Subcommand (MODEL HANDLE command)


OPTIONS Subcommand (MODEL HANDLE command)

OPTIONS (subcommand),OPTIONS (subcommand),OPTIONS (subcommand)
MODEL HANDLE command,MODEL HANDLE command,MODEL HANDLE command
MODEL HANDLE (command),MODEL HANDLE (command),MODEL HANDLE (command)
OPTIONS subcommand,OPTIONS subcommand,OPTIONS subcommand

Use OPTIONS to control the treatment of missing data.

Related Topics

MODEL HANDLE
Overview (MODEL HANDLE command)
NAME Subcommand (MODEL HANDLE command)
FILE Keyword (MODEL HANDLE command)
MAP Subcommand (MODEL HANDLE command)
MISSING Keyword (MODEL HANDLE command)


MISSING Keyword (MODEL HANDLE command)

MISSING (keyword),MISSING (keyword),MISSING (keyword)
MODEL HANDLE command,MODEL HANDLE command,MODEL HANDLE command

The MISSING keyword controls the treatment of missing values, encountered during the scoring process, for the predictor variables defined in the model. A missing value in the context of scoring refers to one of the following:

• A predictor variable contains no value. For numeric variables, this means the system-missing value. For string variables, this means a null string.

• The value has been defined as user-missing, in the model, for the given predictor. Values defined as user-missing in the active dataset, but not in the model, are not treated as missing values in the scoring process.

• The predictor variable is categorical and the value is not one of the categories defined in the model.

SYSMIS | Return the system-missing value when scoring a case with a missing value.
SUBSTITUTE | Use value substitution when scoring cases with missing values. This is the default.

The method for determining a value to substitute for a missing value depends on the type of predictive model:

• PASW Statistics models. For independent variables in linear regression (REGRESSION command) and discriminant (DISCRIMINANT command) models, if mean value substitution for missing values was specified when building and saving the model, then this mean value is used in place of the missing value in the scoring computation, and scoring proceeds. If the mean value is not available, then APPLYMODEL and STRAPPLYMODEL return the system-missing value.

• AnswerTree models & TREE command models. For the CHAID and Exhaustive CHAID algorithms, the biggest child node is selected for a missing split variable. The biggest child node is determined by the algorithm to be the one with the largest population among the child nodes using learning sample cases. For C&RT and QUEST algorithms, surrogate split variables (if any) are used first. (Surrogate splits are splits that attempt to match the original split as closely as possible using alternate predictors.) If no surrogate splits are specified or all surrogate split variables are missing, the biggest child node is used.

• PASW Modeler models. Linear regression models are handled as described under PASW Statistics models. Logistic regression models are handled as described under Logistic Regression models. C&R Tree models are handled as described for C&RT models under AnswerTree models.

• Logistic Regression models. For covariates in logistic regression models, if a mean value of the predictor was included as part of the saved model, then this mean value is used in place of the missing value in the scoring computation, and scoring proceeds. If the predictor is categorical (for example, a factor in a logistic regression model), or if the mean value is not available, then APPLYMODEL and STRAPPLYMODEL return the system-missing value.

Example

MODEL HANDLE NAME=twostep1 FILE=’twostep1.mml’
   /OPTIONS MISSING=SYSMIS.

• In this example, missing values encountered during scoring give rise to system-missing results.

Related Topics

OPTIONS Subcommand (MODEL HANDLE command)


MAP Subcommand (MODEL HANDLE command)

MAP (subcommand),MAP (subcommand),MAP (subcommand)
MODEL HANDLE command,MODEL HANDLE command,MODEL HANDLE command
MODEL HANDLE (command),MODEL HANDLE (command),MODEL HANDLE (command)
MAP subcommand,MAP subcommand,MAP subcommand

Use MAP to map a set of variable names from the input model to a different set of variable names in the active dataset. Both the VARIABLES and MODELVARIABLES keywords must be included. MODELVARIABLES is used to specify the list of variable names from the model that are to be mapped. VARIABLES is used to specify the list of target variable names in the active dataset.

• Both variable lists must contain the same number of names.

• No validation is performed against the current active file dictionary when the MODEL HANDLE command is processed. Errors associated with incorrect target variable names or variable data type mismatch are signaled when an APPLYMODEL or STRAPPLYMODEL transformation is processed.

Example

MODEL HANDLE NAME=creditmod1 FILE=’credit1.mml’
   /MAP VARIABLES=agecat curdebt
        MODELVARIABLES=age debt.

• In this example, the variable age from the model file is mapped to the variable agecat in the active dataset. Likewise, the variable debt from the model file is mapped to the variable curdebt in the active dataset.

Related Topics

MODEL HANDLE
Overview (MODEL HANDLE command)
NAME Subcommand (MODEL HANDLE command)
FILE Keyword (MODEL HANDLE command)
OPTIONS Subcommand (MODEL HANDLE command)


MODEL LIST

MODEL LIST (command),MODEL LIST (command),MODEL LIST (command)
MODEL LIST (command),MODEL LIST (command),MODEL LIST (command)
syntax chart,syntax chart,syntax chart
release history,release history,release history

MODEL LIST is available in PASW Statistics Server.

MODEL LIST

This command takes effect immediately. It does not read the active dataset or execute pending transformations. See the topic Command Order for more information.

Release History Collapse Hide details

Release History

Release 13.0

• Command introduced.

Example

MODEL LIST.

Related Topics

Overview (MODEL LIST command)
MODEL CLOSE
MODEL HANDLE


Overview (MODEL LIST command)

The MODEL LIST command is available only if you have access to PASW Statistics Server. MODEL LIST produces a list, in pivot table format, of the existing model handles (see MODEL HANDLE). The listing includes the handle name, the type of predictive model (for example, NOMREG) associated with the model handle, the external XML model file associated with the model handle, and the method (specified on the MODEL HANDLE command) for handling cases with missing values.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is simply MODEL LIST. There are no additional specifications.

Operations Collapse Hide details

Operations

• The MODEL LIST command lists only the handles created in the current working session.

Related Topics

MODEL LIST


MODEL NAME

MODEL NAME (command),MODEL NAME (command),MODEL NAME (command)
MODEL NAME (command),MODEL NAME (command),MODEL NAME (command)
syntax chart,syntax chart,syntax chart
MODEL NAME [model name] ['model label']

Example

MODEL NAME PLOTA1 'PLOT OF THE OBSERVED SERIES'.

Related Topics

Overview (MODEL NAME command)
Example (MODEL NAME command)
READ MODEL
SAVE MODEL
TDISPLAY


Overview (MODEL NAME command)

model names,model names,model names
MOD_n model names,MOD_n model names,MOD_n model names

MODEL NAME specifies a model name and label for the next procedure in the session.

Basic Specification Collapse Hide details

Basic Specification

The specification on MODEL NAME is a name, a label, or both.

• The default model name is MOD_n, where n increments by 1 each time an unnamed model is created. This default is in effect if it is not changed on the MODEL NAME command, or if the command is not specified. There is no default label.

Syntax Rules Collapse Hide details

Syntax Rules

• If both a name and label are specified, the name must be specified first.

• Only one model name and label can be specified on the command.

• The model name must be unique. The name can contain up to eight characters and must begin with a letter (A–Z).

• The model label can contain up to 60 characters and must be specified in quotes.

Operations Collapse Hide details

Operations

• MODEL NAME is executed at the next model-generating procedure.

• If the MODEL NAME command is used more than once before a procedure, the last command is in effect.

• If a duplicate model name is specified, the default MOD_n name will be used instead.

• MOD_n reinitializes at the start of every session and when the READ MODEL command is specified (see READ MODEL). If any models in the active dataset are already named MOD_n, those numbers are skipped when new MOD_n names are assigned.

• The following procedures can generate models that can be named with the MODEL NAME command: AREG, ARIMA, EXSMOOTH, SEASON, and SPECTRA in the Forecasting add-on module; ACF, CASEPLOT, CCF, CURVEFIT, PACF, PPLOT, and TSPLOT in the Core system; and WLS and 2SLS in the Regression add-on module.

Related Topics

MODEL NAME
Example (MODEL NAME command)


Example (MODEL NAME command)

MODEL NAME CURVE1 'First CURVEFIT model'.
CURVEFIT Y1.
CURVEFIT Y2.
CURVEFIT Y3
   /APPLY 'CURVE1'.

• In this example, the model name CURVE1 and the label First CURVEFIT model are assigned to the first CURVEFIT command.

• The second CURVEFIT command has no MODEL NAME command before it, so it is assigned the name MOD_n, where n is the next unused integer in the sequence.

• The third CURVEFIT command applies the model named CURVE1 to the series Y3. This model is named MOD_m, where m = n + 1.

Related Topics

MODEL NAME
Overview (MODEL NAME command)


MRSETS

MRSETS (command),MRSETS (command),MRSETS (command)
MRSETS (command),MRSETS (command),MRSETS (command)
syntax chart,syntax chart,syntax chart
release history,release history,release history
MRSETS

 /MDGROUP NAME= setname  {LABEL= 'label'      }
                         {LABELSOURCE=VARLABEL}
  CATEGORYLABELS={VARLABELS    }
                 {COUNTEDVALUES}
  VARIABLES= varlist
  VALUE= {value  }
         {'chars'}

 /MCGROUP NAME= setname  LABEL= 'label'
    VARIABLES= varlist

 /DELETE NAME= {[setlist]}
               {ALL      }

 /DISPLAY NAME= {[setlist]}
                {ALL      }

The set name must begin with a $ and follow PASW Statistics variable naming conventions.

Square brackets shown in the DELETE and DISPLAY subcommands are required if one or more set names is specified, but not with the keyword ALL.

This command takes effect immediately. It does not read the active dataset or execute pending transformations. See the topic Command Order for more information.

Syntax for the MRSETS command can be generated from the Multiple Response Sets dialog.

Release History Collapse Hide details

Release History

Release 14.0

• LABELSOURCE keyword introduced on MDGROUP subcommand.

• CATEGORYLABELS keyword introduced on MDGROUP subcommand.

Example

MRSETS
  /MDGROUP NAME=$mltnews LABEL='News sources'
   VARIABLES=news5 news4 news3 news2 news1
   VALUE=1
  /DISPLAY NAME=[$mltnews].

MRSETS
  /MCGROUP NAME=$mltcars
   LABEL='Car maker, most recent car'
   VARIABLES=car1 car2 car3
  /DISPLAY NAME=[$mltcars].

Related Topics

Overview (MRSETS command)
Syntax Conventions (MRSETS command)
MDGROUP Subcommand (MRSETS command)
MCGROUP Subcommand (MRSETS command)
DELETE Subcommand (MRSETS command)
DISPLAY Subcommand (MRSETS command)


Overview (MRSETS command)

The MRSETS command defines and manages multiple response sets. The set definitions are saved in the PASW Statistics data file, so they are available whenever the file is in use. Multiple response sets can be used in the GGRAPH and CTABLES (Tables option) commands. Two types of multiple response sets can be defined:

multiple dichotomy group, defined,multiple dichotomy group, defined,multiple dichotomy group, defined

• Multiple dichotomy (MD) groups combine variables so that each variable becomes a category in the group. For example, take five variables that ask for yes/no responses to the questions: Do you get news from the Internet? Do you get news from the radio? Do you get news from television? Do you get news from news magazines? Do you get news from newspapers? These variables are coded 1 for yes and 0 for no. A multiple dichotomy group combines the five variables into a single variable with five categories in which a respondent could be counted zero to five times, depending on how many of the five elementary variables contain a 1 for that respondent. It is not required that the elementary variables be dichotomous. If the five elementary variables had the values 1 for regularly, 2 for occasionally, and 3 for never, it would still be possible to create a multiple dichotomy group that counts the variables with 1’s and ignores the other responses.

multiple category group, defined,multiple category group, defined,multiple category group, defined

• Multiple category (MC) groups combine variables that have identical categories. For example, suppose that instead of having five yes/no questions for the five news sources, there are three variables, each coded 1 = Internet, 2 = radio, 3 = television, 4 = magazines, and 5 = newspapers. For each variable, a respondent could select one of these values. In a multiple category group based on these variables, a respondent could be counted zero to three times, once for each variable for which he or she selected a news source. For this sort of multiple response group, it is important that all of the source variables have the same set of values and value labels and the same missing values.

The MRSETS command also allows you to delete sets and to display information about the sets in the data file.

Related Topics

MRSETS
Syntax Conventions (MRSETS command)
MDGROUP Subcommand (MRSETS command)
MCGROUP Subcommand (MRSETS command)
DELETE Subcommand (MRSETS command)
DISPLAY Subcommand (MRSETS command)


Syntax Conventions (MRSETS command)

MRSETS (command),MRSETS (command),MRSETS (command)
syntax conventions,syntax conventions,syntax conventions

The following conventions apply to the MRSETS command:

• All subcommands are optional, but at least one must be specified.

• Subcommands can be issued more than once in any order.

• Within a subcommand, attributes can be specified in any order. If an attribute is specified more than once, the last instance is honored.

• Equals signs are required where shown in the syntax diagram.

• Square brackets are required where shown in the syntax diagram.

• The TO convention and the ALL keyword are honored in variable lists.

Related Topics

MRSETS
Overview (MRSETS command)
MDGROUP Subcommand (MRSETS command)
MCGROUP Subcommand (MRSETS command)
DELETE Subcommand (MRSETS command)
DISPLAY Subcommand (MRSETS command)


MDGROUP Subcommand (MRSETS command)

MRSETS (command),MRSETS (command),MRSETS (command)
MDGROUP subcommand,MDGROUP subcommand,MDGROUP subcommand
MDGROUP (subcommand),MDGROUP (subcommand),MDGROUP (subcommand)
MRSETS command,MRSETS command,MRSETS command
/MDGROUP NAME= setname  {LABEL= 'label'      }
                         {LABELSOURCE=VARLABEL}
  CATEGORYLABELS={VARLABELS    }
                 {COUNTEDVALUES}
  VARIABLES= varlist
  VALUE= {value  }
         {'chars'}

The MDGROUP subcommand defines or modifies a multiple dichotomy set. A name, variable list, and value must be specified. Optionally, you can control assignment of set and category labels.

NAME | The name of the multiple dichotomy set. The name must follow PASW Statistics variable naming conventions and begin with a $. If the name refers to an existing set, the set definition is overwritten.
LABEL | The label for the set. The label must be quoted and cannot be wider than the limit for variable labels. By default, the set is unlabeled. LABEL and LABELSOURCE are mutually exclusive.
LABELSOURCE | Use the variable label for the first variable in the set with a defined variable label as the set label. If none of the variables in the set have defined variable labels, the name of the first variable in the set is used as the set label. LABELSOURCE is an alternative to LABEL an is only available with CATEGORYLABELS=COUNTEDVALUES.
CATEGORYLABELS = [VARLABELS|COUNTEDVALUES]
 | Use variable labels or value labels of the counted values as category labels for the set. VARLABELS uses the defined variable labels (or variable names for variables without defined variable labels) as the set category labels. This is the default. COUNTEDVALUES uses the defined value labels of the counted values as the set category labels. The counted value for each variable must have a defined value label and the labels must be unique (the value label for the counted value must be different for each variable).
VARIABLES | The list of elementary variables that define the set. Variables must be of the same type (numeric or string). At least two variables must be specified.
VALUE | The value that indicates presence of a response. This is also referred to as the “counted” value. If the set type is numeric, the counted value must be an integer. If the set type is string, the counted value, after trimming trailing blanks, cannot be wider than the narrowest elementary variable.

Elementary variables need not have variable labels, but because variable labels are used as value labels for categories of the MD variable, a warning is issued if two or more variables of an MD set have the same variable label. A warning is also issued if two or more elementary variables use different labels for the counted value—for example, if it is labeled Yes for Q1 and No for Q2. When checking for label conflicts, case is ignored.

Related Topics

MRSETS
Overview (MRSETS command)
Syntax Conventions (MRSETS command)
MCGROUP Subcommand (MRSETS command)
DELETE Subcommand (MRSETS command)
DISPLAY Subcommand (MRSETS command)


MCGROUP Subcommand (MRSETS command)

MCGROUP (subcommand),MCGROUP (subcommand),MCGROUP (subcommand)
MRSETS command,MRSETS command,MRSETS command
MRSETS (command),MRSETS (command),MRSETS (command)
MCGROUP subcommand,MCGROUP subcommand,MCGROUP subcommand
/MCGROUP NAME= setname  LABEL= 'label'
    VARIABLES= varlist

The MCGROUP subcommand defines or modifies a multiple category group. A name and variable list must be specified. Optionally, a label can be specified for the set.

NAME | The name of the multiple category set. The name must follow PASW Statistics variable naming conventions and begin with a $. If the name refers to an existing set, the set definition is overwritten.
LABEL | The label for the set. The label must be quoted and cannot be wider than the limit for variable labels. By default, the set is unlabeled.
VARIABLES | The list of elementary variables that define the set. Variables must be of the same type (numeric or string). At least two variables must be specified.

The elementary variables need not have value labels, but a warning is issued if two or more elementary variables have different labels for the same value. When checking for label conflicts, case is ignored.

Related Topics

MRSETS
Overview (MRSETS command)
Syntax Conventions (MRSETS command)
MDGROUP Subcommand (MRSETS command)
DELETE Subcommand (MRSETS command)
DISPLAY Subcommand (MRSETS command)


DELETE Subcommand (MRSETS command)

MRSETS (command),MRSETS (command),MRSETS (command)
DELETE subcommand,DELETE subcommand,DELETE subcommand
/DELETE NAME= {[setlist]}
               {ALL      }

The DELETE subcommand deletes one or more set definitions. If one or more set names is given, the list must be enclosed in square brackets. ALL can be used to delete all sets; it is not enclosed in brackets.

Related Topics

MRSETS
Overview (MRSETS command)
Syntax Conventions (MRSETS command)
MDGROUP Subcommand (MRSETS command)
MCGROUP Subcommand (MRSETS command)
DISPLAY Subcommand (MRSETS command)


DISPLAY Subcommand (MRSETS command)

MRSETS (command),MRSETS (command),MRSETS (command)
DISPLAY subcommand,DISPLAY subcommand,DISPLAY subcommand
/DISPLAY NAME= {[setlist]}
               {ALL      }

The DISPLAY subcommand creates a table of information about one or more sets. If one or more set names is given, the list must be enclosed in square brackets. ALL can be used to refer to all sets; it is not enclosed in brackets.

Related Topics

MRSETS
Overview (MRSETS command)
Syntax Conventions (MRSETS command)
MDGROUP Subcommand (MRSETS command)
MCGROUP Subcommand (MRSETS command)
DELETE Subcommand (MRSETS command)


MULT RESPONSE

MULT RESPONSE (command),MULT RESPONSE (command),MULT RESPONSE (command)
multiple response analysis,multiple response analysis,multiple response analysis

MULT RESPONSE is available in the Statistics Base option.

MULT RESPONSE†

 {/GROUPS=groupname['label'](varlist ({value1,value2}))}
                                      {value        }
      ...[groupname...]

 {/VARIABLES=varlist(min,max)  [varlist...]            }

 {/FREQUENCIES=varlist                                 }

 {/TABLES=varlist BY varlist... [BY varlist] [(PAIRED)]}
        [/varlist BY...]

 [/MISSING=[{TABLE**}] [INCLUDE]]
            {MDGROUP}
            {MRGROUP}

 [/FORMAT={LABELS**}  {TABLE** }  [DOUBLE]]
          {NOLABELS}  {CONDENSE}
                      {ONEPAGE }

 [/BASE={CASES**  }]
        {RESPONSES}

 [/CELLS=[COUNT**] [ROW] [COLUMN] [TOTAL] [ALL]]

†A minimum of two subcommands must be used: at least one from the pair GROUPS or VARIABLES and one from the pair FREQUENCIES or TABLES.

**Default if the subcommand is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

Example

MULT RESPONSE  GROUPS=MAGS (TIME TO STONE (2))
   /FREQUENCIES=MAGS.

Related Topics

Overview (MULT RESPONSE command)
GROUPS Subcommand (MULT RESPONSE command)
VARIABLES Subcommand (MULT RESPONSE command)
FREQUENCIES Subcommand (MULT RESPONSE command)
TABLES Subcommand (MULT RESPONSE command)
PAIRED Keyword (MULT RESPONSE command)
CELLS Subcommand (MULT RESPONSE command)
BASE Subcommand (MULT RESPONSE command)
MISSING Subcommand (MULT RESPONSE command)
FORMAT Subcommand (MULT RESPONSE command)


Overview (MULT RESPONSE command)

MULT RESPONSE (command),MULT RESPONSE (command),MULT RESPONSE (command)
limitations,limitations,limitations

MULT RESPONSE displays frequencies and optional percentages for multiple-response items in univariate tables and multivariate crosstabulations. Another procedure that analyzes multiple-response items is TABLES, which has most, but not all, of the capabilities of MULT RESPONSE. TABLES has special formatting capabilities that make it useful for presentations.

multiple response analysis,multiple response analysis,multiple response analysis
multiple dichotomy,multiple dichotomy,multiple dichotomy
multiple response analysis,multiple response analysis,multiple response analysis
defining sets,defining sets,defining sets
multiple response analysis,multiple response analysis,multiple response analysis
multiple category,multiple category,multiple category
MULT RESPONSE (command),MULT RESPONSE (command),MULT RESPONSE (command)
multiple-response groups,multiple-response groups,multiple-response groups
MULT RESPONSE (command),MULT RESPONSE (command),MULT RESPONSE (command)
multiple-dichotomy groups,multiple-dichotomy groups,multiple-dichotomy groups

Multiple-response items are questions that can have more than one value for each case. For example, the respondent may have been asked to circle all magazines read within the last month in a list of magazines. You can organize multiple-response data in one of two ways for use in the program. For each possible response, you can create a variable that can have one of two values, such as 1 for no and 2 for yes; this is the multiple-dichotomy method. Alternatively, you can estimate the maximum number of possible answers from a respondent and create that number of variables, each of which can have a value representing one of the possible answers, such as 1 for Time, 2 for Newsweek, and 3 for PC Week. If an individual did not give the maximum number of answers, the extra variables receive a missing-value code. This is the multiple-response or multiple-category method of coding answers.

To analyze the data entered by either method, you combine variables into groups. The technique depends on whether you have defined multiple-dichotomy or multiple-response variables. When you create a multiple-dichotomy group, each component variable with at least one yes value across cases becomes a category of the group variable. When you create a multiple-response group, each value becomes a category and the program calculates the frequency for a particular value by adding the frequencies of all component variables with that value. Both multiple-dichotomy and multiple-response groups can be crosstabulated with other variables in MULT RESPONSE.

Options Collapse Hide details

Options

Cell Counts and Percentages. By default, crosstabulations include only counts and no percentages. You can request row, column, and total table percentages using the CELLS subcommand. You can also base percentages on responses instead of respondents using BASE.

Format. You can suppress the display of value labels and request condensed format for frequency tables using the FORMAT subcommand.

Basic Specification Collapse Hide details

Basic Specification

The subcommands required for the basic specification fall into two groups: GROUPS and VARIABLES name the elements to be included in the analysis; FREQUENCIES and TABLES specify the type of table display to be used for tabulation. The basic specification requires at least one subcommand from each group:

• GROUPS defines groups of multiple-response items to be analyzed and specifies how the component variables will be combined.

• VARIABLES identifies all individual variables to be analyzed.

• FREQUENCIES requests frequency tables for the groups and/or individual variables specified on GROUPS and VARIABLES.

• TABLES requests crosstabulations of groups and/or individual variables specified on GROUPS and VARIABLES.

Subcommand Order Collapse Hide details

Subcommand Order

• The basic subcommands must be used in the following order: GROUPS, VARIABLES, FREQUENCIES, and TABLES. Only one set of basic subcommands can be specified.

• All basic subcommands must precede all optional subcommands. Optional subcommands can be used in any order.

Operations Collapse Hide details

Operations

• Empty categories are not displayed in either frequency tables or crosstabulations.

• If you define a multiple-response group with a very wide range, the tables require substantial amounts of workspace. If the component variables are sparsely distributed, you should recode them to minimize the workspace required.

• MULT RESPONSE stores category labels in the workspace. If there is insufficient space to store the labels after the tables are built, the labels are not displayed.

Limitations Collapse Hide details

Limitations

• The component variables must have integer values. Non-integer values are truncated.

• A maximum of 100 existing variables named or implied by GROUPS and VARIABLES together.

• A maximum of 20 groups defined on GROUPS.

• A maximum of 32,767 categories for a multiple-response group or an individual variable.

• A maximum of 10 table lists on TABLES.

• A maximum of 5 dimensions per table.

• A maximum of 100 groups and variables named or implied on FREQUENCIES and TABLES together.

• A maximum of 200 non-empty rows and 200 non-empty columns in a single table.

Related Topics

MULT RESPONSE
GROUPS Subcommand (MULT RESPONSE command)
VARIABLES Subcommand (MULT RESPONSE command)
FREQUENCIES Subcommand (MULT RESPONSE command)
TABLES Subcommand (MULT RESPONSE command)
PAIRED Keyword (MULT RESPONSE command)
CELLS Subcommand (MULT RESPONSE command)
BASE Subcommand (MULT RESPONSE command)
MISSING Subcommand (MULT RESPONSE command)
FORMAT Subcommand (MULT RESPONSE command)


GROUPS Subcommand (MULT RESPONSE command)

MULT RESPONSE (command),MULT RESPONSE (command),MULT RESPONSE (command)
GROUPS subcommand,GROUPS subcommand,GROUPS subcommand
GROUPS (subcommand),GROUPS (subcommand),GROUPS (subcommand)
MULT RESPONSE command,MULT RESPONSE command,MULT RESPONSE command

GROUPS defines both multiple-dichotomy and multiple-response groups.

• Specify a name for the group and an optional label, followed by a list of the component variables and the value or values to be used in the tabulation.

• Enclose the variable list in parentheses and enclose the values in an inner set of parentheses following the last variable in the list.

• The label for the group is optional and can be up to 40 characters in length, including imbedded blanks. Quotes around the label are not required.

• To define a multiple-dichotomy group, specify only one tabulating value (the value that represents yes) following the variable list. Each component variable becomes a value of the group variable, and the number of cases that have the tabulating value becomes the frequency. If there are no cases with the tabulating value for a given component variable, that variable does not appear in the tabulation.

• To define a multiple-response group, specify two values following the variable list. These are the minimum and maximum values of the component variables. The group variable will have the same range of values. The frequency for each value is tabulated across all component variables in the list.

• You can use any valid variable name for the group except the name of an existing variable specified on the same MULT RESPONSE command. However, you can reuse a group name on another MULT RESPONSE command.

• The group names and labels exist only during MULT RESPONSE and disappear once MULT RESPONSE has been executed. If group names are referred to in other procedures, an error results.

• For a multiple-dichotomy group, the category labels come from the variable labels defined for the component variables.

• For a multiple-response group, the category labels come from the value labels for the first component variable in the group. If categories are missing for the first variable but are present for other variables in the group, you must define value labels for the missing categories. (You can use the ADD VALUE LABELS command to define extra value labels.)

Example

MULT RESPONSE  GROUPS=MAGS 'MAGAZINES READ' (TIME TO STONE (2))
   /FREQUENCIES=MAGS.

• The GROUPS subcommand creates a multiple-dichotomy group named MAGS. The variables between and including TIME and STONE become categories of MAGS, and the frequencies are cases with the value 2 (indicating yes, read the magazine) for the component variables.

• The group label is MAGAZINES READ.

Example

MULT RESPONSE  GROUPS=PROBS 'PERCEIVED NATIONAL PROBLEMS'
   (PROB1 TO PROB3 (1,9))
   /FREQUENCIES=PROBS.

• The GROUPS subcommand creates the multiple-response group PROBS. The component variables are the existing variables between and including PROB1 and PROB3, and the frequencies are tabulated for the values 1 through 9.

• The frequency for a given value is the number of cases that have that value in any of the variables PROB1 to PROB3.

Related Topics

MULT RESPONSE
Overview (MULT RESPONSE command)
VARIABLES Subcommand (MULT RESPONSE command)
FREQUENCIES Subcommand (MULT RESPONSE command)
TABLES Subcommand (MULT RESPONSE command)
PAIRED Keyword (MULT RESPONSE command)
CELLS Subcommand (MULT RESPONSE command)
BASE Subcommand (MULT RESPONSE command)
MISSING Subcommand (MULT RESPONSE command)
FORMAT Subcommand (MULT RESPONSE command)


VARIABLES Subcommand (MULT RESPONSE command)

MULT RESPONSE (command),MULT RESPONSE (command),MULT RESPONSE (command)
VARIABLES subcommand,VARIABLES subcommand,VARIABLES subcommand
VARIABLES (subcommand),VARIABLES (subcommand),VARIABLES (subcommand)
MULT RESPONSE command,MULT RESPONSE command,MULT RESPONSE command

VARIABLES specifies existing variables to be used in frequency tables and crosstabulations. Each variable is followed by parentheses enclosing a minimum and a maximum value, which are used to allocate cells for the tables for that variable.

• You can specify any numeric variable on VARIABLES, but non-integer values are truncated.

• If GROUPS is also specified, VARIABLES follows GROUPS.

• To provide the same minimum and maximum for each of a set of variables, specify a variable list followed by a range specification.

• The component variables specified on GROUPS can be used in frequency tables and crosstabulations, but you must specify them again on VARIABLES, along with a range for the values. You do not have to respecify the component variables if they will not be used as individual variables in any tables.

Example

MULT RESPONSE  GROUPS=MAGS 'MAGAZINES READ' (TIME TO STONE (2))
   /VARIABLES SEX(1,2) EDUC(1,3)
   /FREQUENCIES=MAGS SEX EDUC.

• The VARIABLES subcommand names the variables SEX and EDUC so that they can be used in a frequencies table.

Example

MULT RESPONSE  GROUPS=MAGS 'MAGAZINES READ' (TIME TO STONE (2))
   /VARIABLES=EDUC (1,3) TIME (1,2).
   /TABLES=MAGS BY EDUC TIME.

• The variable TIME is used in a group and also in a table.

Related Topics

MULT RESPONSE
Overview (MULT RESPONSE command)
GROUPS Subcommand (MULT RESPONSE command)
FREQUENCIES Subcommand (MULT RESPONSE command)
TABLES Subcommand (MULT RESPONSE command)
PAIRED Keyword (MULT RESPONSE command)
CELLS Subcommand (MULT RESPONSE command)
BASE Subcommand (MULT RESPONSE command)
MISSING Subcommand (MULT RESPONSE command)
FORMAT Subcommand (MULT RESPONSE command)


FREQUENCIES Subcommand (MULT RESPONSE command)

MULT RESPONSE (command),MULT RESPONSE (command),MULT RESPONSE (command)
FREQUENCIES subcommand,FREQUENCIES subcommand,FREQUENCIES subcommand
FREQUENCIES (subcommand),FREQUENCIES (subcommand),FREQUENCIES (subcommand)
MULT RESPONSE command,MULT RESPONSE command,MULT RESPONSE command

FREQUENCIES requests frequency tables for groups and individual variables. By default, a frequency table contains the count for each value, the percentage of responses, and the percentage of cases. For another method of producing frequency tables for individual variables, see the FREQUENCIES procedure.

• All groups must be created by GROUPS, and all individual variables to be tabulated must be named on VARIABLES.

• You can use the keyword TO to imply a set of group or individual variables. TO refers to the order in which variables are specified on the GROUPS or VARIABLES subcommand.

Example

MULT RESPONSE  GROUPS=MAGS 'MAGAZINES READ' (TIME TO STONE (2))
   /FREQUENCIES=MAGS.

• The FREQUENCIES subcommand requests a frequency table for the multiple-dichotomy group MAGS, tabulating the frequency of the value 2 for each of the component variables TIME to STONE.

Example

MULT RESPONSE
 GROUPS=MAGS 'MAGAZINES READ' (TIME TO STONE (2))
      PROBS 'PERCEIVED NATIONAL PROBLEMS' (PROB1 TO PROB3 (1,9))
      MEMS 'SOCIAL ORGANIZATION MEMBERSHIPS' (VFW AMLEG ELKS (1))
 /VARIABLES SEX(1,2) EDUC(1,3)
 /FREQUENCIES=MAGS TO MEMS SEX EDUC.

• The FREQUENCIES subcommand requests frequency tables for MAGS, PROBS, MEMS, SEX, and EDUC.

• You cannot specify MAGS TO EDUC because SEX and EDUC are individual variables, and MAGS, PROBS, and MEMS are group variables.

Related Topics

MULT RESPONSE
Overview (MULT RESPONSE command)
GROUPS Subcommand (MULT RESPONSE command)
VARIABLES Subcommand (MULT RESPONSE command)
TABLES Subcommand (MULT RESPONSE command)
PAIRED Keyword (MULT RESPONSE command)
CELLS Subcommand (MULT RESPONSE command)
BASE Subcommand (MULT RESPONSE command)
MISSING Subcommand (MULT RESPONSE command)
FORMAT Subcommand (MULT RESPONSE command)


TABLES Subcommand (MULT RESPONSE command)

MULT RESPONSE (command),MULT RESPONSE (command),MULT RESPONSE (command)
TABLES subcommand,TABLES subcommand,TABLES subcommand
TABLES (subcommand),TABLES (subcommand),TABLES (subcommand)
MULT RESPONSE command,MULT RESPONSE command,MULT RESPONSE command
BY (keyword),BY (keyword),BY (keyword)
MULT RESPONSE command,MULT RESPONSE command,MULT RESPONSE command
crosstabulation,crosstabulation,crosstabulation
multiple response,multiple response,multiple response

TABLES specifies the crosstabulations to be produced by MULT RESPONSE. Both individual variables and group variables can be tabulated together.

• The first list defines the rows of the tables; the next list (following BY) defines the columns. Subsequent lists following BY keywords define control variables, which produce subtables. Use the keyword BY to separate the dimensions. You can specify up to five dimensions (four BY keywords) for a table.

• To produce more than one table, name one or more variables for each dimension of the tables. You can also specify multiple table lists separated by a slash. If you use the keyword TO to imply a set of group or individual variables, TO refers to the order in which groups or variables are specified on the GROUPS or VARIABLES subcommand.

• If FREQUENCIES is also specified, TABLES follows FREQUENCIES.

• The value labels for columns are displayed on three lines with eight characters per line. To avoid splitting words, reverse the row and column variables, or redefine the variable or value labels (depending on whether the variables are multiple-dichotomy or multiple-response variables).

Example

MULT RESPONSE  GROUPS=MAGS 'MAGAZINES READ' (TIME TO STONE (2))
   /VARIABLES=EDUC (1,3)/TABLES=EDUC BY MAGS.

• The TABLES subcommand requests a crosstabulation of variable EDUC by the multiple-dichotomy group MAGS.

Example

MULT RESPONSE  GROUPS=MAGS 'MAGAZINES READ' (TIME TO STONE (2))
   MEMS 'SOCIAL ORGANIZATION MEMBERSHIPS' (VFW AMLEG ELKS (1))
   /VARIABLES EDUC (1,3)/TABLES=MEMS MAGS BY EDUC.

• The TABLES subcommand specifies two crosstabulations—MEMS by EDUC and MAGS by EDUC.

Example

MULT RESPONSE  GROUPS=MAGS 'MAGAZINES READ' (TIME TO STONE (2))
   /VARIABLES SEX (1,2) EDUC (1,3)
   /TABLES=MAGS BY EDUC SEX/EDUC BY SEX/MAGS BY EDUC BY SEX.

• The TABLES subcommand uses slashes to separate three table lists. It produces two tables from the first table list (MAGS by EDUC and MAGS by SEX) and one table from the second table list (EDUC by SEX). The third table list produces separate tables for each sex (MAGS by EDUC for male and for female).

Example

MULT RESPONSE  GROUPS=MAGS 'MAGAZINES READ' (TIME TO STONE (2))
   PROBS 'NATIONAL PROBLEMS MENTIONED' (PROB1 TO PROB3 (1,9))
   /TABLES=MAGS BY PROBS.

• The TABLES subcommand requests a crosstabulation of the multiple-dichotomy group MAGS with the multiple-response group PROBS.

Related Topics

MULT RESPONSE
Overview (MULT RESPONSE command)
GROUPS Subcommand (MULT RESPONSE command)
VARIABLES Subcommand (MULT RESPONSE command)
FREQUENCIES Subcommand (MULT RESPONSE command)
PAIRED Keyword (MULT RESPONSE command)
CELLS Subcommand (MULT RESPONSE command)
BASE Subcommand (MULT RESPONSE command)
MISSING Subcommand (MULT RESPONSE command)
FORMAT Subcommand (MULT RESPONSE command)


PAIRED Keyword (MULT RESPONSE command)

MULT RESPONSE (command),MULT RESPONSE (command),MULT RESPONSE (command)
PAIRED keyword,PAIRED keyword,PAIRED keyword
PAIRED (keyword),PAIRED (keyword),PAIRED (keyword)
MULT RESPONSE command,MULT RESPONSE command,MULT RESPONSE command

When MULT RESPONSE crosstabulates two multiple-response groups, by default it tabulates each variable in the first group with each variable in the second group and sums the counts for each cell. Thus, some responses can appear more than once in the table. Use PAIRED to pair the first variable in the first group with the first variable in the second group, the second variable in the first group with the second variable in the second group, and so on.

• The keyword PAIRED is specified in parentheses on the TABLES subcommand following the last variable named for a specific table list.

• When you request paired crosstabulations, the order of the component variables on the GROUPS subcommand determines the construction of the table.

• Although the tables can contain individual variables and multiple-dichotomy groups in a paired table request, only variables within multiple-response groups are paired.

• PAIRED also applies to a multiple-response group used as a control variable in a three-way or higher-order table.

• Paired tables are identified in the output by the label PAIRED GROUP.

• Percentages in paired tables are always based on responses rather than cases.

Example

MULT RESPONSE GROUPS=PSEX 'SEX OF CHILD'(P1SEX P2SEX P3SEX (1,2))
   /PAGE 'AGE OF ONSET OF PREGNANCY' (P1AGE P2AGE P3AGE (1,4))
   /TABLES=PSEX BY PAGE (PAIRED).

• The PAIRED keyword produces a paired crosstabulation of PSEX by PAGE, which is a combination of the tables P1SEX by P1AGE, P2SEX by P2AGE, and P3SEX by P3AGE.

Example

MULT RESPONSE GROUPS=PSEX 'SEX OF CHILD'(P1SEX P2SEX P3SEX (1,2))
   PAGE 'AGE OF ONSET OF PREGNANCY' (P1AGE P2AGE P3AGE (1,4))
   /VARIABLES=EDUC (1,3)
   /TABLES=PSEX BY PAGE BY EDUC (PAIRED).

• The TABLES subcommand pairs only PSEX with PAGE. EDUC is not paired because it is an individual variable, not a multiple-response group.

Related Topics

MULT RESPONSE
Overview (MULT RESPONSE command)
GROUPS Subcommand (MULT RESPONSE command)
VARIABLES Subcommand (MULT RESPONSE command)
FREQUENCIES Subcommand (MULT RESPONSE command)
TABLES Subcommand (MULT RESPONSE command)
CELLS Subcommand (MULT RESPONSE command)
BASE Subcommand (MULT RESPONSE command)
MISSING Subcommand (MULT RESPONSE command)
FORMAT Subcommand (MULT RESPONSE command)


CELLS Subcommand (MULT RESPONSE command)

MULT RESPONSE (command),MULT RESPONSE (command),MULT RESPONSE (command)
CELLS subcommand,CELLS subcommand,CELLS subcommand
CELLS (subcommand),CELLS (subcommand),CELLS (subcommand)
MULT RESPONSE command,MULT RESPONSE command,MULT RESPONSE command

By default, MULT RESPONSE displays cell counts but not percentages in crosstabulations. CELLS requests percentages for crosstabulations.

• If you specify one or more keywords on CELLS, MULT RESPONSE displays cell counts plus the percentages you request. The count cannot be eliminated from the table cells.

COUNT (keyword),COUNT (keyword),COUNT (keyword)
MULT RESPONSE command,MULT RESPONSE command,MULT RESPONSE command
ROW (keyword),ROW (keyword),ROW (keyword)
MULT RESPONSE command,MULT RESPONSE command,MULT RESPONSE command
COLUMN (keyword),COLUMN (keyword),COLUMN (keyword)
MULT RESPONSE command,MULT RESPONSE command,MULT RESPONSE command
TOTAL (keyword),TOTAL (keyword),TOTAL (keyword)
MULT RESPONSE command,MULT RESPONSE command,MULT RESPONSE command
ALL (keyword),ALL (keyword),ALL (keyword)
MULT RESPONSE command,MULT RESPONSE command,MULT RESPONSE command
COUNT | Cell counts. This is the default if you omit the CELLS subcommand.
ROW | Row percentages.
COLUMN | Column percentages.
TOTAL | Two-way table total percentages.
ALL | Cell counts, row percentages, column percentages, and two-way table total percentages. This is the default if you specify the CELLS subcommand without keywords.

Example

MULT RESPONSE  GROUPS=MAGS 'MAGAZINES READ' (TIME TO STONE (2))
  /VARIABLES=SEX (1,2) (EDUC (1,3)
  /TABLES=MAGS BY EDUC SEX
  /CELLS=ROW COLUMN.

• The CELLS subcommand requests row and column percentages in addition to counts.

Related Topics

MULT RESPONSE
Overview (MULT RESPONSE command)
GROUPS Subcommand (MULT RESPONSE command)
VARIABLES Subcommand (MULT RESPONSE command)
FREQUENCIES Subcommand (MULT RESPONSE command)
TABLES Subcommand (MULT RESPONSE command)
PAIRED Keyword (MULT RESPONSE command)
BASE Subcommand (MULT RESPONSE command)
MISSING Subcommand (MULT RESPONSE command)
FORMAT Subcommand (MULT RESPONSE command)


BASE Subcommand (MULT RESPONSE command)

MULT RESPONSE (command),MULT RESPONSE (command),MULT RESPONSE (command)
BASE subcommand,BASE subcommand,BASE subcommand
BASE (subcommand),BASE (subcommand),BASE (subcommand)
MULT RESPONSE command,MULT RESPONSE command,MULT RESPONSE command

BASE lets you obtain cell percentages and marginal frequencies based on responses rather than respondents. Specify one of two keywords:

CASES (keyword),CASES (keyword),CASES (keyword)
MULT RESPONSE command,MULT RESPONSE command,MULT RESPONSE command
RESPONSES (keyword),RESPONSES (keyword),RESPONSES (keyword)
MULT RESPONSE command,MULT RESPONSE command,MULT RESPONSE command
CASES | Base cell percentages on cases. This is the default if you omit the BASE subcommand and do not request paired tables. You cannot use this specification if you specify PAIRED on TABLE.
RESPONSES | Base cell percentages on responses. This is the default if you request paired tables.

Example

MULT RESPONSE  GROUPS=PROBS 'NATIONAL PROBLEMS MENTIONED'
   (PROB1 TO PROB3 (1,9))/VARIABLES=EDUC (1,3)
   /TABLES=EDUC BY PROBS
   /CELLS=ROW COLUMN
   /BASE=RESPONSES.

• The BASE subcommand requests marginal frequencies and cell percentages based on responses.

Related Topics

MULT RESPONSE
Overview (MULT RESPONSE command)
GROUPS Subcommand (MULT RESPONSE command)
VARIABLES Subcommand (MULT RESPONSE command)
FREQUENCIES Subcommand (MULT RESPONSE command)
TABLES Subcommand (MULT RESPONSE command)
PAIRED Keyword (MULT RESPONSE command)
CELLS Subcommand (MULT RESPONSE command)
MISSING Subcommand (MULT RESPONSE command)
FORMAT Subcommand (MULT RESPONSE command)


MISSING Subcommand (MULT RESPONSE command)

MULT RESPONSE (command),MULT RESPONSE (command),MULT RESPONSE (command)
MISSING subcommand,MISSING subcommand,MISSING subcommand
MISSING (subcommand),MISSING (subcommand),MISSING (subcommand)
MULT RESPONSE command,MULT RESPONSE command,MULT RESPONSE command
missing values,missing values,missing values
MULT RESPONSE command,MULT RESPONSE command,MULT RESPONSE command

MISSING controls missing values. Its minimum specification is a single keyword.

• By default, MULT RESPONSE deletes cases with missing values on a table-by-table basis for both individual variables and groups. In addition, values falling outside the specified range are not tabulated and are included in the missing category. Thus, specifying a range that excludes missing values is equivalent to the default missing-value treatment.

• For a multiple-dichotomy group, a case is considered missing by default if none of the component variables contains the tabulating value for that case. The keyword MDGROUP overrides the default and specifies listwise deletion for multiple-dichotomy groups.

• For a multiple-response group, a case is considered missing by default if none of the components has valid values falling within the tabulating range for that case. Thus, cases with missing or excluded values on some (but not all) of the components of a group are included in tabulations of the group variable. The keyword MRGROUP overrides the default and specifies listwise deletion for multiple-response groups.

• You can use INCLUDE with MDGROUP, MRGROUP, or TABLE. The user-missing value is tabulated if it is included in the range specification.

TABLE (keyword),TABLE (keyword),TABLE (keyword)
MULT RESPONSE command,MULT RESPONSE command,MULT RESPONSE command
MDGROUP (keyword),MDGROUP (keyword),MDGROUP (keyword)
MULT RESPONSE command,MULT RESPONSE command,MULT RESPONSE command
MRGROUP (keyword),MRGROUP (keyword),MRGROUP (keyword)
MULT RESPONSE command,MULT RESPONSE command,MULT RESPONSE command
INCLUDE (keyword),INCLUDE (keyword),INCLUDE (keyword)
MULT RESPONSE command,MULT RESPONSE command,MULT RESPONSE command
TABLE | Exclude missing values on a table-by-table basis. Missing values are excluded on a table-by-table basis for both component variables and groups. This is the default if you omit the MISSING subcommand.
MDGROUP | Exclude missing values listwise for multiple-dichotomy groups. Cases with missing values for any component dichotomy variable are excluded from the tabulation of the multiple-dichotomy group.
MRGROUP | Exclude missing values listwise for multiple-response groups. Cases with missing values for any component variable are excluded from the tabulation of the multiple-response group.
INCLUDE | Include user-missing values. User-missing values are treated as valid values if they are included in the range specification on the GROUPS or VARIABLES subcommands.

Example

MULT RESPONSE  GROUPS=FINANCL 'FINANCIAL PROBLEMS MENTIONED'
   (FINPROB1 TO FINPROB3 (1,3))
   SOCIAL 'SOCIAL PROBLEMS MENTIONED'(SOCPROB1 TO SOCPROB4 (4,9))
   /VARIABLES=EDUC (1,3)
   /TABLES=EDUC BY FINANCL SOCIAL
   /MISSING=MRGROUP.

• The MISSING subcommand indicates that a case will be excluded from counts in the first table if any of the variables in the group FINPROB1 to FINPROB3 has a missing value or a value outside the range 1 to 3. A case is excluded from the second table if any of the variables in the group SOCPROB1 to SOCPROB4 has a missing value or value outside the range 4 to 9.

Related Topics

MULT RESPONSE
Overview (MULT RESPONSE command)
GROUPS Subcommand (MULT RESPONSE command)
VARIABLES Subcommand (MULT RESPONSE command)
FREQUENCIES Subcommand (MULT RESPONSE command)
TABLES Subcommand (MULT RESPONSE command)
PAIRED Keyword (MULT RESPONSE command)
CELLS Subcommand (MULT RESPONSE command)
BASE Subcommand (MULT RESPONSE command)
FORMAT Subcommand (MULT RESPONSE command)


FORMAT Subcommand (MULT RESPONSE command)

MULT RESPONSE (command),MULT RESPONSE (command),MULT RESPONSE (command)
FORMAT subcommand,FORMAT subcommand,FORMAT subcommand
FORMAT (subcommand),FORMAT (subcommand),FORMAT (subcommand)
MULT RESPONSE command,MULT RESPONSE command,MULT RESPONSE command

FORMAT controls table formats. The minimum specification on FORMAT is a single keyword.

Labels are controlled by two keywords:

LABELS (keyword),LABELS (keyword),LABELS (keyword)
MULT RESPONSE command,MULT RESPONSE command,MULT RESPONSE command
NOLABELS (keyword),NOLABELS (keyword),NOLABELS (keyword)
MULT RESPONSE command,MULT RESPONSE command,MULT RESPONSE command
LABELS | Display value labels in frequency tables and crosstabulations. This is the default.
NOLABELS | Suppress value labels in frequency tables and crosstabulations for multiple-response variables and individual variables. You cannot suppress the display of variable labels used as value labels for multiple-dichotomy groups.

The following keywords apply to the format of frequency tables:

DOUBLE (keyword),DOUBLE (keyword),DOUBLE (keyword)
MULT RESPONSE command,MULT RESPONSE command,MULT RESPONSE command
TABLE (keyword),TABLE (keyword),TABLE (keyword)
MULT RESPONSE command,MULT RESPONSE command,MULT RESPONSE command
CONDENSE (keyword),CONDENSE (keyword),CONDENSE (keyword)
MULT RESPONSE command,MULT RESPONSE command,MULT RESPONSE command
ONEPAGE (keyword),ONEPAGE (keyword),ONEPAGE (keyword)
MULT RESPONSE command,MULT RESPONSE command,MULT RESPONSE command
DOUBLE | Double spacing for frequency tables. By default, MULT RESPONSE uses single spacing.
TABLE | One-column format for frequency tables. This is the default if you omit the FORMAT subcommand.
CONDENSE | Condensed format for frequency tables. This option uses a three-column condensed format for frequency tables for all multiple-response groups and individual variables. Labels are suppressed. This option does not apply to multiple-dichotomy groups.
ONEPAGE | Conditional condensed format for frequency tables. Three-column condensed format is used if the resulting table would not fit on a page. This option does not apply to multiple-dichotomy groups.

Example

MULT RESPONSE  GROUPS=PROBS 'NATIONAL PROBLEMS MENTIONED'
   (PROB1 TO PROB3 (1,9))/VARIABLES=EDUC (1,3)
   /FREQUENCIES=EDUC PROBS
   /FORMAT=CONDENSE.

• The FORMAT subcommand specifies condensed format, which eliminates category labels and displays the categories in three parallel sets of columns, each set containing one or more rows of categories (rather than displaying one set of columns aligned vertically down the page).

Related Topics

MULT RESPONSE
Overview (MULT RESPONSE command)
GROUPS Subcommand (MULT RESPONSE command)
VARIABLES Subcommand (MULT RESPONSE command)
FREQUENCIES Subcommand (MULT RESPONSE command)
TABLES Subcommand (MULT RESPONSE command)
PAIRED Keyword (MULT RESPONSE command)
CELLS Subcommand (MULT RESPONSE command)
BASE Subcommand (MULT RESPONSE command)
MISSING Subcommand (MULT RESPONSE command)


MULTIPLE CORRESPONDENCE

Homogeneity Analysis,Homogeneity Analysis,Homogeneity Analysis
command syntax,command syntax,command syntax
MULTIPLE CORRESPONDENCE (command),MULTIPLE CORRESPONDENCE (command),MULTIPLE CORRESPONDENCE (command)
MULTIPLE CORRESPONDENCE (command),MULTIPLE CORRESPONDENCE (command),MULTIPLE CORRESPONDENCE (command)
syntax chart,syntax chart,syntax chart
release history,release history,release history

MULTIPLE CORRESPONDENCE is available in the Categories option.

MULTIPLE CORRESPONDENCE [/VARIABLES =] varlist

  /ANALYSIS = varlist [([WEIGHT={1**}]
                                {n  }

 [/DISCRETIZATION = [varlist [([{GROUPING   }] [{NCAT={7}  }] [DISTR={NORMAL }])]]]
                                                      {n}            {UNIFORM}
                                                {EQINTV={n}}
                                {RANKING    }
                                {MULTIPLYING}

 [/MISSING = [{varlist} ([{PASSIVE**}] [{MODEIMPU**}])]]
              {ALL**  }                 {EXTRACAT  }
                          {ACTIVE   }   {MODEIMPU**}
                                        {EXTRACAT  }
                                        {LISTWISE  }

 [/SUPPLEMENTARY = [OBJECT(objlist)] [VARIABLE(varlist)]]

 [/CONFIGURATION = [{INITIAL}]('filename')]
                    {FIXED  }

 [/DIMENSION = {2**}]
               {n  }

 [/NORMALIZATION = {VPRINCIPAL**}]
                   {OPRINCIPAL  }
                   {SYMMETRICAL }
                   {INDEPENDENT }
                   {n           }

 [/MAXITER = {100**}]
             {n    }

 [/CRITITER = {.00001**}]
              {value   }

 [/PRINT = [CORR**] [DESCRIP**[(varlist)]] [HISTORY][DISCRIM**] [NONE]
           [OBJECT[([(varname)]varlist)]] [OCORR] [QUANT[(varlist)]]

 [/PLOT = [BIPLOT[((varlist))][(varlist)][(n)]]
          [CATEGORY (varlist)[(n)]]
          [JOINTCAT[(varlist)][(n)]]
          [DISCRIM**[(varlist)][(n)]]
          [NONE]
          [OBJECT**[(varlist)][(n)]]
          [RESID(varlist[({1**})])[(n)]]
                          {n  }
          [TRANS(varlist[({1**})])[(n)]]
                          {n  }
          [NDIM(value,value)]

 [/SAVE = [TRDATA[({TRA     }[(n)])]] [OBJECT[({OBSCO   }[(n)])]] ]
                   {rootname}                  {rootname}

[/OUTFILE = {DISCRDATA('filename')} {OBJECT('filename')} {TRDATA('filename')}]

** Default if subcommand is omitted

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See MULTIPLE CORRESPONDENCE Algorithms for computational details for this procedure.

Syntax for the MULTIPLE CORRESPONDENCE command can be generated from the Multiple Correspondence Analysis dialog.

Release History Collapse Hide details

Release History

Release 13.0

• Command introduced.

Related Topics

Overview (MULTIPLE CORRESPONDENCE command)
Example (MULTIPLE CORRESPONDENCE command)
Options (MULTIPLE CORRESPONDENCE command)
VARIABLES Subcommand (MULTIPLE CORRESPONDENCE command)
ANALYSIS Subcommand (MULTIPLE CORRESPONDENCE command)
DISCRETIZATION Subcommand (MULTIPLE CORRESPONDENCE command)
GROUPING Keyword (MULTIPLE CORRESPONDENCE command)
NCAT Keyword (MULTIPLE CORRESPONDENCE command)
MISSING Subcommand (MULTIPLE CORRESPONDENCE command)
PASSIVE Keyword (MULTIPLE CORRESPONDENCE command)
ACTIVE Keyword (MULTIPLE CORRESPONDENCE command)
SUPPLEMENTARY Subcommand (MULTIPLE CORRESPONDENCE command)
CONFIGURATION Subcommand (MULTIPLE CORRESPONDENCE command)
DIMENSION Subcommand (MULTIPLE CORRESPONDENCE command)
NORMALIZATION Subcommand (MULTIPLE CORRESPONDENCE command)
MAXITER Subcommand (MULTIPLE CORRESPONDENCE command)
CRITITER Subcommand (MULTIPLE CORRESPONDENCE command)
PRINT Subcommand (MULTIPLE CORRESPONDENCE command)
PLOT Subcommand (MULTIPLE CORRESPONDENCE command)
SAVE Subcommand (MULTIPLE CORRESPONDENCE command)
OUTFILE Subcommand (MULTIPLE CORRESPONDENCE command)


Overview (MULTIPLE CORRESPONDENCE command)

MULTIPLE CORRESPONDENCE (Multiple Correspondence Analysis; also known as homogeneity analysis) quantifies nominal (categorical) data by assigning numerical values to the cases (objects) and categories, such that in the low-dimensional representation of the data, objects within the same category are close together and objects in different categories are far apart. Each object is as close as possible to the category points of categories that apply to the object. In this way, the categories divide the objects into homogeneous subgroups. Variables are considered homogeneous when they classify objects in the same categories into the same subgroups.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is the command MULTIPLE CORRESPONDENCE with the VARIABLES and ANALYSIS subcommands.

Syntax Rules Collapse Hide details

Syntax Rules

• The VARIABLES and ANALYSIS subcommands always must appear.

• All subcommands can appear in any order.

• For the first subcommand after the procedure name, a slash is accepted, but not required.

• Variables specified in the ANALYSIS subcommand must be found in the VARIABLES subcommand.

• Variables specified in the SUPPLEMENTARY subcommand must be found in the ANALYSIS subcommand.

Operations Collapse Hide details

Operations

• If the same subcommand is repeated, it causes a syntax error and the procedure terminates.

Limitations Collapse Hide details

Limitations

• MULTIPLE CORRESPONDENCE operates on category indicator variables. The category indicators should be positive integers. You can use the DISCRETIZATION subcommand to convert fractional value variables and string variables into positive integers. If DISCRETIZATION is not specified, fractional value variables are automatically converted into positive integers by grouping them into seven categories (or into the number of distinct values of the variable if this number is less than seven) with a close-to-normal distribution, and string variables are automatically converted into positive integers by ranking.

• In addition to system-missing values and user-defined missing values, MULTIPLE CORRESPONDENCE treats category indicator values less than 1 as missing. If one of the values of a categorical variable has been coded 0 or some negative value and you want to treat it as a valid category, use the COMPUTE command to add a constant to the values of that variable such that the lowest value will be 1. You can also use the RANKING option of the DISCRETIZATION subcommand for this purpose, except for variables you want to treat as numerical, since the spacing of the categories will not be maintained.

• There must be at least three valid cases.

• Split-File has no implications for MULTIPLE CORRESPONDENCE.

Related Topics

MULTIPLE CORRESPONDENCE
Example (MULTIPLE CORRESPONDENCE command)
Options (MULTIPLE CORRESPONDENCE command)
VARIABLES Subcommand (MULTIPLE CORRESPONDENCE command)
ANALYSIS Subcommand (MULTIPLE CORRESPONDENCE command)
DISCRETIZATION Subcommand (MULTIPLE CORRESPONDENCE command)
GROUPING Keyword (MULTIPLE CORRESPONDENCE command)
NCAT Keyword (MULTIPLE CORRESPONDENCE command)
MISSING Subcommand (MULTIPLE CORRESPONDENCE command)
PASSIVE Keyword (MULTIPLE CORRESPONDENCE command)
ACTIVE Keyword (MULTIPLE CORRESPONDENCE command)
SUPPLEMENTARY Subcommand (MULTIPLE CORRESPONDENCE command)
CONFIGURATION Subcommand (MULTIPLE CORRESPONDENCE command)
DIMENSION Subcommand (MULTIPLE CORRESPONDENCE command)
NORMALIZATION Subcommand (MULTIPLE CORRESPONDENCE command)
MAXITER Subcommand (MULTIPLE CORRESPONDENCE command)
CRITITER Subcommand (MULTIPLE CORRESPONDENCE command)
PRINT Subcommand (MULTIPLE CORRESPONDENCE command)
PLOT Subcommand (MULTIPLE CORRESPONDENCE command)
SAVE Subcommand (MULTIPLE CORRESPONDENCE command)
OUTFILE Subcommand (MULTIPLE CORRESPONDENCE command)


Example (MULTIPLE CORRESPONDENCE command)

MULTIPLE CORRESPONDENCE /VARIABLES = TEST1 TEST2 TEST3 TO TEST6 TEST7 TEST8
  /ANALYSIS = TEST1 TO TEST2(WEIGHT=2)
              TEST3 TO TEST5
              TEST6 TEST7
              TEST8
  /DISCRETIZATION = TEST1(GROUPING NCAT=5 DISTR=UNIFORM)
                    TEST6(GROUPING) TEST8(MULTIPLYING)
  /MISSING = TEST5(ACTIVE) TEST6(ACTIVE EXTRACAT) TEST8(LISTWISE)
  /SUPPLEMENTARY = OBJECT(1 3) VARIABLE(TEST1)
  /CONFIGURATION = ('iniconf.sav')
  /DIMENSION = 2
  /NORMALIZATION = VPRINCIPAL
  /MAXITER = 150
  /CRITITER = .000001
  /PRINT =  DESCRIP DISCRIM CORR QUANT(TEST1 TO TEST3) OBJECT
  /PLOT = TRANS(TEST2 TO TEST5) OBJECT(TEST2 TEST3)
  /SAVE = TRDATA OBJECT
  /OUTFILE = TRDATA('/data/trans.sav')  OBJECT('/data/obs.sav').

• VARIABLES defines variables. The keyword TO refers to the order of the variables in the working data file.

• The ANALYSIS subcommand defines variables used in the analysis. It is specified that TEST1 and TEST2 have a weight of 2 (for the other variables, WEIGHT is not specified and thus they have the default weight value of 1).

• DISCRETIZATION specifies that TEST6 and TEST8, which are fractional value variables, are discretized: TEST6 by recoding into seven categories with a normal distribution (default because unspecified) and TEST8 by “multiplying”. TEST1, which is a categorical variable, is recoded into five categories with a close to uniform distribution.

• MISSING specifies that objects with missing values on TEST5 and TEST6 are included in the analysis: missing values on TEST5 are replaced with the mode (default if not specified) and missing values on TEST6 are treated as an extra category. Objects with a missing value on TEST8 are excluded from the analysis. For all other variables, the default is in effect; that is, missing values (not objects) are excluded from the analysis.

• CONFIGURATION specifies iniconf.sav as the file containing the coordinates of a configuration that is to be used as the initial configuration (default because unspecified).

• DIMENSION specifies the number of dimensions to be 2. This is the default, so this subcommand could be omitted here.

• The NORMALIZATION subcommand specifies optimization of the association between variables. This is the default, so this subcommand could be omitted here.

• MAXITER specifies the maximum number of iterations to be 150 instead of the default value of 100.

• CRITITER sets the convergence criterion to a value smaller than the default value.

• PRINT specifies descriptives, discrimination measures, and correlations (all default), and quantifications for TEST1 to TEST3, and the object scores.

• PLOT is used to request transformation plots for the variables TEST2 to TEST5, an object points plot labeled with the categories of TEST2, and an object points plot labeled with the categories of TEST3.

• The SAVE subcommand adds the transformed variables and the object scores to the working data file.

• The OUTFILE subcommand writes the transformed data to a data file called trans.sav and the object scores to a data file called obs.sav, both in the directory /data.

Related Topics

MULTIPLE CORRESPONDENCE
Overview (MULTIPLE CORRESPONDENCE command)
Options (MULTIPLE CORRESPONDENCE command)
VARIABLES Subcommand (MULTIPLE CORRESPONDENCE command)
ANALYSIS Subcommand (MULTIPLE CORRESPONDENCE command)
DISCRETIZATION Subcommand (MULTIPLE CORRESPONDENCE command)
GROUPING Keyword (MULTIPLE CORRESPONDENCE command)
NCAT Keyword (MULTIPLE CORRESPONDENCE command)
MISSING Subcommand (MULTIPLE CORRESPONDENCE command)
PASSIVE Keyword (MULTIPLE CORRESPONDENCE command)
ACTIVE Keyword (MULTIPLE CORRESPONDENCE command)
SUPPLEMENTARY Subcommand (MULTIPLE CORRESPONDENCE command)
CONFIGURATION Subcommand (MULTIPLE CORRESPONDENCE command)
DIMENSION Subcommand (MULTIPLE CORRESPONDENCE command)
NORMALIZATION Subcommand (MULTIPLE CORRESPONDENCE command)
MAXITER Subcommand (MULTIPLE CORRESPONDENCE command)
CRITITER Subcommand (MULTIPLE CORRESPONDENCE command)
PRINT Subcommand (MULTIPLE CORRESPONDENCE command)
PLOT Subcommand (MULTIPLE CORRESPONDENCE command)
SAVE Subcommand (MULTIPLE CORRESPONDENCE command)
OUTFILE Subcommand (MULTIPLE CORRESPONDENCE command)


Options (MULTIPLE CORRESPONDENCE command)

Discretization. You can use the DISCRETIZATION subcommand to discretize fractional value variables or to recode categorical variables.

Missing data. You can specify the treatment of missing data per variable with the MISSING subcommand.

Supplementary objects and variables. You can specify objects and variables that you want to treat as supplementary.

Read configuration. MULTIPLE CORRESPONDENCE can read a configuration from a file through the CONFIGURATION subcommand. This configuration can be used as the initial configuration or as a fixed configuration in which to fit variables.

Number of dimensions. You can specify how many dimensions MULTIPLE CORRESPONDENCE should compute.

Normalization. You can specify one of five different options for normalizing the objects and variables.

Tuning the algorithm. You can control the values of algorithm-tuning parameters with the MAXITER and CRITITER subcommands.

Optional output. You can request optional output through the PRINT subcommand.

Optional plots. You can request a plot of object points, transformation plots per variable, plots of category points per variable, or a joint plot of category points for specified variables. Other plot options include residuals plots, a biplot, and a plot of discrimination measures.

Writing discretized data, transformed data, and object scores. You can write the discretized data, the transformed data, and the object scores to outfiles for use in further analyses.

Saving transformed data and object scores. You can save the transformed variables and the object scores in the working data file.

Related Topics

MULTIPLE CORRESPONDENCE
Overview (MULTIPLE CORRESPONDENCE command)
Example (MULTIPLE CORRESPONDENCE command)
VARIABLES Subcommand (MULTIPLE CORRESPONDENCE command)
ANALYSIS Subcommand (MULTIPLE CORRESPONDENCE command)
DISCRETIZATION Subcommand (MULTIPLE CORRESPONDENCE command)
GROUPING Keyword (MULTIPLE CORRESPONDENCE command)
NCAT Keyword (MULTIPLE CORRESPONDENCE command)
MISSING Subcommand (MULTIPLE CORRESPONDENCE command)
PASSIVE Keyword (MULTIPLE CORRESPONDENCE command)
ACTIVE Keyword (MULTIPLE CORRESPONDENCE command)
SUPPLEMENTARY Subcommand (MULTIPLE CORRESPONDENCE command)
CONFIGURATION Subcommand (MULTIPLE CORRESPONDENCE command)
DIMENSION Subcommand (MULTIPLE CORRESPONDENCE command)
NORMALIZATION Subcommand (MULTIPLE CORRESPONDENCE command)
MAXITER Subcommand (MULTIPLE CORRESPONDENCE command)
CRITITER Subcommand (MULTIPLE CORRESPONDENCE command)
PRINT Subcommand (MULTIPLE CORRESPONDENCE command)
PLOT Subcommand (MULTIPLE CORRESPONDENCE command)
SAVE Subcommand (MULTIPLE CORRESPONDENCE command)
OUTFILE Subcommand (MULTIPLE CORRESPONDENCE command)


VARIABLES Subcommand (MULTIPLE CORRESPONDENCE command)

MULTIPLE CORRESPONDENCE (command),MULTIPLE CORRESPONDENCE (command),MULTIPLE CORRESPONDENCE (command)
VARIABLES subcommand,VARIABLES subcommand,VARIABLES subcommand
VARIABLES (subcommand),VARIABLES (subcommand),VARIABLES (subcommand)
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command

VARIABLES specifies the variables that may be analyzed in the current MULTIPLE CORRESPONDENCE procedure.

• The VARIABLES subcommand is required. The actual keyword VARIABLES can be omitted.

• At least two variables must be specified, except if the CONFIGURATION subcommand with the FIXED keyword is used.

• The keyword TO on the VARIABLES subcommand refers to the order of variables in the working data file. (Note that this behavior of TO is different from that in the varlist in the ANALYSIS subcommand.)

Related Topics

MULTIPLE CORRESPONDENCE
Overview (MULTIPLE CORRESPONDENCE command)
Example (MULTIPLE CORRESPONDENCE command)
Options (MULTIPLE CORRESPONDENCE command)
ANALYSIS Subcommand (MULTIPLE CORRESPONDENCE command)
DISCRETIZATION Subcommand (MULTIPLE CORRESPONDENCE command)
GROUPING Keyword (MULTIPLE CORRESPONDENCE command)
NCAT Keyword (MULTIPLE CORRESPONDENCE command)
MISSING Subcommand (MULTIPLE CORRESPONDENCE command)
PASSIVE Keyword (MULTIPLE CORRESPONDENCE command)
ACTIVE Keyword (MULTIPLE CORRESPONDENCE command)
SUPPLEMENTARY Subcommand (MULTIPLE CORRESPONDENCE command)
CONFIGURATION Subcommand (MULTIPLE CORRESPONDENCE command)
DIMENSION Subcommand (MULTIPLE CORRESPONDENCE command)
NORMALIZATION Subcommand (MULTIPLE CORRESPONDENCE command)
MAXITER Subcommand (MULTIPLE CORRESPONDENCE command)
CRITITER Subcommand (MULTIPLE CORRESPONDENCE command)
PRINT Subcommand (MULTIPLE CORRESPONDENCE command)
PLOT Subcommand (MULTIPLE CORRESPONDENCE command)
SAVE Subcommand (MULTIPLE CORRESPONDENCE command)
OUTFILE Subcommand (MULTIPLE CORRESPONDENCE command)


ANALYSIS Subcommand (MULTIPLE CORRESPONDENCE command)

MULTIPLE CORRESPONDENCE (command),MULTIPLE CORRESPONDENCE (command),MULTIPLE CORRESPONDENCE (command)
ANALYSIS subcommand,ANALYSIS subcommand,ANALYSIS subcommand
ANALYSIS (subcommand),ANALYSIS (subcommand),ANALYSIS (subcommand)
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command

ANALYSIS specifies the variables to be used in the computations, and the variable weight for each variable or variable list. ANALYSIS also specifies supplementary variables; no weight can be specified for supplementary variables.

• At least two variables must be specified, except if the CONFIGURATION subcommand with the FIXED keyword is used.

• All the variables on ANALYSIS must be specified on the VARIABLES subcommand.

• The ANALYSIS subcommand is required.

• The keyword TO in the variable list honors the order of variables in the VARIABLES subcommand.

• Variable weights are indicated by the keyword WEIGHT in parentheses following the variable or variable list.

MULTIPLE CORRESPONDENCE (command),MULTIPLE CORRESPONDENCE (command),MULTIPLE CORRESPONDENCE (command)
variable weight,variable weight,variable weight
variable weight,variable weight,variable weight
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command
WEIGHT (keyword),WEIGHT (keyword),WEIGHT (keyword)
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command
WEIGHT Specifies the variable weight. The default value is 1. If WEIGHT is specified for supplementary variables, this is ignored (but with a syntax warning).

Related Topics

MULTIPLE CORRESPONDENCE
Overview (MULTIPLE CORRESPONDENCE command)
Example (MULTIPLE CORRESPONDENCE command)
Options (MULTIPLE CORRESPONDENCE command)
VARIABLES Subcommand (MULTIPLE CORRESPONDENCE command)
DISCRETIZATION Subcommand (MULTIPLE CORRESPONDENCE command)
GROUPING Keyword (MULTIPLE CORRESPONDENCE command)
NCAT Keyword (MULTIPLE CORRESPONDENCE command)
MISSING Subcommand (MULTIPLE CORRESPONDENCE command)
PASSIVE Keyword (MULTIPLE CORRESPONDENCE command)
ACTIVE Keyword (MULTIPLE CORRESPONDENCE command)
SUPPLEMENTARY Subcommand (MULTIPLE CORRESPONDENCE command)
CONFIGURATION Subcommand (MULTIPLE CORRESPONDENCE command)
DIMENSION Subcommand (MULTIPLE CORRESPONDENCE command)
NORMALIZATION Subcommand (MULTIPLE CORRESPONDENCE command)
MAXITER Subcommand (MULTIPLE CORRESPONDENCE command)
CRITITER Subcommand (MULTIPLE CORRESPONDENCE command)
PRINT Subcommand (MULTIPLE CORRESPONDENCE command)
PLOT Subcommand (MULTIPLE CORRESPONDENCE command)
SAVE Subcommand (MULTIPLE CORRESPONDENCE command)
OUTFILE Subcommand (MULTIPLE CORRESPONDENCE command)


DISCRETIZATION Subcommand (MULTIPLE CORRESPONDENCE command)

MULTIPLE CORRESPONDENCE (command),MULTIPLE CORRESPONDENCE (command),MULTIPLE CORRESPONDENCE (command)
discretization,discretization,discretization
discretization,discretization,discretization
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command
MULTIPLE CORRESPONDENCE (command),MULTIPLE CORRESPONDENCE (command),MULTIPLE CORRESPONDENCE (command)
DISCRETIZATION subcommand,DISCRETIZATION subcommand,DISCRETIZATION subcommand
DISCRETIZATION (subcommand),DISCRETIZATION (subcommand),DISCRETIZATION (subcommand)
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command

DISCRETIZATION specifies fractional value variables you want to discretize. Also, you can use DISCRETIZATION for ranking or for two ways of recoding categorical variables.

• A string variable’s values are always converted into positive integers, by assigning category indicators according to the ascending alphanumeric order. DISCRETIZATION for string variables applies to these integers.

• When the DISCRETIZATION subcommand is omitted, or when the DISCRETIZATION subcommand is used without a varlist, fractional value variables are converted into positive integers by grouping them into seven categories (or into the number of distinct values of the variable if this number is less than seven) with a close-to-normal distribution.

• When no specification is given for variables in a varlist following DISCRETIZATION, these variables are grouped into seven categories (or into the number of distinct values of the variable if this number is less than seven) with a close-to-normal distribution.

• In MULTIPLE CORRESPONDENCE a system-missing value, user-defined missing values, and values less than 1 are considered to be missing values (see next section). However, in discretizing a variable, values less than 1 are considered to be valid values and are thus included in the discretization process. System-missing values and user-defined missing values are excluded.

GROUPING (keyword),GROUPING (keyword),GROUPING (keyword)
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command
RANKING (keyword),RANKING (keyword),RANKING (keyword)
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command
MULTIPLYING (keyword),MULTIPLYING (keyword),MULTIPLYING (keyword)
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command
GROUPING | Recode into the specified number of categories or recode intervals of equal size into categories.
RANKING | Rank cases. Rank 1 is assigned to the case with the smallest value on the variable.
MULTIPLYING | Multiplying the standardized values (z-scores) of a fractional value variable by 10, rounding, and adding a value such that the lowest value is 1.

Related Topics

MULTIPLE CORRESPONDENCE
Overview (MULTIPLE CORRESPONDENCE command)
Example (MULTIPLE CORRESPONDENCE command)
Options (MULTIPLE CORRESPONDENCE command)
VARIABLES Subcommand (MULTIPLE CORRESPONDENCE command)
ANALYSIS Subcommand (MULTIPLE CORRESPONDENCE command)
GROUPING Keyword (MULTIPLE CORRESPONDENCE command)
NCAT Keyword (MULTIPLE CORRESPONDENCE command)
MISSING Subcommand (MULTIPLE CORRESPONDENCE command)
PASSIVE Keyword (MULTIPLE CORRESPONDENCE command)
ACTIVE Keyword (MULTIPLE CORRESPONDENCE command)
SUPPLEMENTARY Subcommand (MULTIPLE CORRESPONDENCE command)
CONFIGURATION Subcommand (MULTIPLE CORRESPONDENCE command)
DIMENSION Subcommand (MULTIPLE CORRESPONDENCE command)
NORMALIZATION Subcommand (MULTIPLE CORRESPONDENCE command)
MAXITER Subcommand (MULTIPLE CORRESPONDENCE command)
CRITITER Subcommand (MULTIPLE CORRESPONDENCE command)
PRINT Subcommand (MULTIPLE CORRESPONDENCE command)
PLOT Subcommand (MULTIPLE CORRESPONDENCE command)
SAVE Subcommand (MULTIPLE CORRESPONDENCE command)
OUTFILE Subcommand (MULTIPLE CORRESPONDENCE command)


GROUPING Keyword (MULTIPLE CORRESPONDENCE command)

NCAT (keyword),NCAT (keyword),NCAT (keyword)
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command
EQINTV (keyword),EQINTV (keyword),EQINTV (keyword)
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command
NCAT | Recode into ncat categories. When NCAT is not specified, the number of categories is set to seven (or the number of distinct values of the variable if this number is less than seven).
EQINTV | Recode intervals of equal size into categories. The interval size must be specified (there is no default value). The resulting number of categories depends on the interval size.

Related Topics

MULTIPLE CORRESPONDENCE
Overview (MULTIPLE CORRESPONDENCE command)
Example (MULTIPLE CORRESPONDENCE command)
Options (MULTIPLE CORRESPONDENCE command)
VARIABLES Subcommand (MULTIPLE CORRESPONDENCE command)
ANALYSIS Subcommand (MULTIPLE CORRESPONDENCE command)
DISCRETIZATION Subcommand (MULTIPLE CORRESPONDENCE command)
NCAT Keyword (MULTIPLE CORRESPONDENCE command)
MISSING Subcommand (MULTIPLE CORRESPONDENCE command)
PASSIVE Keyword (MULTIPLE CORRESPONDENCE command)
ACTIVE Keyword (MULTIPLE CORRESPONDENCE command)
SUPPLEMENTARY Subcommand (MULTIPLE CORRESPONDENCE command)
CONFIGURATION Subcommand (MULTIPLE CORRESPONDENCE command)
DIMENSION Subcommand (MULTIPLE CORRESPONDENCE command)
NORMALIZATION Subcommand (MULTIPLE CORRESPONDENCE command)
MAXITER Subcommand (MULTIPLE CORRESPONDENCE command)
CRITITER Subcommand (MULTIPLE CORRESPONDENCE command)
PRINT Subcommand (MULTIPLE CORRESPONDENCE command)
PLOT Subcommand (MULTIPLE CORRESPONDENCE command)
SAVE Subcommand (MULTIPLE CORRESPONDENCE command)
OUTFILE Subcommand (MULTIPLE CORRESPONDENCE command)


NCAT Keyword (MULTIPLE CORRESPONDENCE command)

DISTR (keyword),DISTR (keyword),DISTR (keyword)
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command
NORMAL (keyword),NORMAL (keyword),NORMAL (keyword)
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command
UNIFORM (keyword),UNIFORM (keyword),UNIFORM (keyword)
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command

NCAT has the keyword DISTR, which has the following keywords:

NORMAL | Normal distribution. This is the default when DISTR is not specified.
UNIFORM | Uniform distribution.

Related Topics

MULTIPLE CORRESPONDENCE
Overview (MULTIPLE CORRESPONDENCE command)
Example (MULTIPLE CORRESPONDENCE command)
Options (MULTIPLE CORRESPONDENCE command)
VARIABLES Subcommand (MULTIPLE CORRESPONDENCE command)
ANALYSIS Subcommand (MULTIPLE CORRESPONDENCE command)
DISCRETIZATION Subcommand (MULTIPLE CORRESPONDENCE command)
GROUPING Keyword (MULTIPLE CORRESPONDENCE command)
MISSING Subcommand (MULTIPLE CORRESPONDENCE command)
PASSIVE Keyword (MULTIPLE CORRESPONDENCE command)
ACTIVE Keyword (MULTIPLE CORRESPONDENCE command)
SUPPLEMENTARY Subcommand (MULTIPLE CORRESPONDENCE command)
CONFIGURATION Subcommand (MULTIPLE CORRESPONDENCE command)
DIMENSION Subcommand (MULTIPLE CORRESPONDENCE command)
NORMALIZATION Subcommand (MULTIPLE CORRESPONDENCE command)
MAXITER Subcommand (MULTIPLE CORRESPONDENCE command)
CRITITER Subcommand (MULTIPLE CORRESPONDENCE command)
PRINT Subcommand (MULTIPLE CORRESPONDENCE command)
PLOT Subcommand (MULTIPLE CORRESPONDENCE command)
SAVE Subcommand (MULTIPLE CORRESPONDENCE command)
OUTFILE Subcommand (MULTIPLE CORRESPONDENCE command)


MISSING Subcommand (MULTIPLE CORRESPONDENCE command)

MULTIPLE CORRESPONDENCE (command),MULTIPLE CORRESPONDENCE (command),MULTIPLE CORRESPONDENCE (command)
missing values,missing values,missing values
missing values,missing values,missing values
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command
MULTIPLE CORRESPONDENCE (command),MULTIPLE CORRESPONDENCE (command),MULTIPLE CORRESPONDENCE (command)
MISSING subcommand,MISSING subcommand,MISSING subcommand
MISSING (subcommand),MISSING (subcommand),MISSING (subcommand)
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command

In MULTIPLE CORRESPONDENCE, system-missing values, user-defined missing values, and values less than 1 are treated as missing values. However, in discretizing a variable, values less than 1 are considered as valid values. The MISSING subcommand allows you to indicate how to handle missing values for each variable.

passive missing value treatment,passive missing value treatment,passive missing value treatment
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command
PASSIVE (keyword),PASSIVE (keyword),PASSIVE (keyword)
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command
imputing missing values,imputing missing values,imputing missing values
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command
ACTIVE (keyword),ACTIVE (keyword),ACTIVE (keyword)
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command
listwise deletion,listwise deletion,listwise deletion
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command
LISTWISE (keyword),LISTWISE (keyword),LISTWISE (keyword)
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command
PASSIVE | Exclude missing values on a variable from analysis. This is the default applicable to all variables, when the MISSING subcommand is omitted or specified without variable names or keywords. Also, any variable which is not included in the subcommand gets this specification. Passive treatment of missing values means that, in optimizing the quantification of a variable, only objects with non-missing values on the variable are involved and that only the non-missing values of variables contribute to the solution. Thus, when PASSIVE is specified, missing values do not affect the analysis. If an object has only missing values, and for all variables the MISSING option is passive, the object will be handled as a supplementary object. If on the PRINT subcommand, correlations are requested and passive treatment of missing values is specified for a variable, the missing values have to be imputed. For the correlations of the original variables, missing values on a variable are imputed with the most frequent category (mode) of the variable.
ACTIVE | Impute missing values. You can choose to use mode imputation, or to consider objects with missing values on a variable as belonging to the same category and impute missing values with an extra category indicator.
LISTWISE | Exclude cases with missing values on the specified variable(s). The cases used in the analysis are cases without missing values on the variable(s) specified. Also, any variable that is not included in the subcommand gets this specification.

• The ALL keyword may be used to indicate all variables. If it is used, it must be the only variable specification.

• A mode or extracat imputation is done before listwise deletion.

Related Topics

MULTIPLE CORRESPONDENCE
Overview (MULTIPLE CORRESPONDENCE command)
Example (MULTIPLE CORRESPONDENCE command)
Options (MULTIPLE CORRESPONDENCE command)
VARIABLES Subcommand (MULTIPLE CORRESPONDENCE command)
ANALYSIS Subcommand (MULTIPLE CORRESPONDENCE command)
DISCRETIZATION Subcommand (MULTIPLE CORRESPONDENCE command)
GROUPING Keyword (MULTIPLE CORRESPONDENCE command)
NCAT Keyword (MULTIPLE CORRESPONDENCE command)
PASSIVE Keyword (MULTIPLE CORRESPONDENCE command)
ACTIVE Keyword (MULTIPLE CORRESPONDENCE command)
SUPPLEMENTARY Subcommand (MULTIPLE CORRESPONDENCE command)
CONFIGURATION Subcommand (MULTIPLE CORRESPONDENCE command)
DIMENSION Subcommand (MULTIPLE CORRESPONDENCE command)
NORMALIZATION Subcommand (MULTIPLE CORRESPONDENCE command)
MAXITER Subcommand (MULTIPLE CORRESPONDENCE command)
CRITITER Subcommand (MULTIPLE CORRESPONDENCE command)
PRINT Subcommand (MULTIPLE CORRESPONDENCE command)
PLOT Subcommand (MULTIPLE CORRESPONDENCE command)
SAVE Subcommand (MULTIPLE CORRESPONDENCE command)
OUTFILE Subcommand (MULTIPLE CORRESPONDENCE command)


PASSIVE Keyword (MULTIPLE CORRESPONDENCE command)

MODEIMPU (keyword),MODEIMPU (keyword),MODEIMPU (keyword)
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command
EXTRACAT (keyword),EXTRACAT (keyword),EXTRACAT (keyword)
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command
MODEIMPU | Impute missing values on a variable with the mode of the quantified variable. This is the default.
EXTRACAT | Impute missing values on a variable with the quantification of an extra category. This implies that objects with a missing value are considered to belong to the same (extra) category.

Note: With passive treatment of missing values, imputation only applies to correlations and is done afterwards. Thus the imputation has no effect on the quantification or the solution.

Related Topics

MULTIPLE CORRESPONDENCE
Overview (MULTIPLE CORRESPONDENCE command)
Example (MULTIPLE CORRESPONDENCE command)
Options (MULTIPLE CORRESPONDENCE command)
VARIABLES Subcommand (MULTIPLE CORRESPONDENCE command)
ANALYSIS Subcommand (MULTIPLE CORRESPONDENCE command)
DISCRETIZATION Subcommand (MULTIPLE CORRESPONDENCE command)
GROUPING Keyword (MULTIPLE CORRESPONDENCE command)
NCAT Keyword (MULTIPLE CORRESPONDENCE command)
MISSING Subcommand (MULTIPLE CORRESPONDENCE command)
ACTIVE Keyword (MULTIPLE CORRESPONDENCE command)
SUPPLEMENTARY Subcommand (MULTIPLE CORRESPONDENCE command)
CONFIGURATION Subcommand (MULTIPLE CORRESPONDENCE command)
DIMENSION Subcommand (MULTIPLE CORRESPONDENCE command)
NORMALIZATION Subcommand (MULTIPLE CORRESPONDENCE command)
MAXITER Subcommand (MULTIPLE CORRESPONDENCE command)
CRITITER Subcommand (MULTIPLE CORRESPONDENCE command)
PRINT Subcommand (MULTIPLE CORRESPONDENCE command)
PLOT Subcommand (MULTIPLE CORRESPONDENCE command)
SAVE Subcommand (MULTIPLE CORRESPONDENCE command)
OUTFILE Subcommand (MULTIPLE CORRESPONDENCE command)


ACTIVE Keyword (MULTIPLE CORRESPONDENCE command)

MODEIMPU (keyword),MODEIMPU (keyword),MODEIMPU (keyword)
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command
EXTRACAT (keyword),EXTRACAT (keyword),EXTRACAT (keyword)
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command
MODEIMPU | Impute missing values on a variable with the most frequent category (mode). When there are multiple modes, the smallest category indicator is used. This is the default.
EXTRACAT | Impute missing values on a variable with an extra category indicator. This implies that objects with a missing value are considered to belong to the same (extra) category.

Note: With active treatment of missing values, imputation is done before the analysis starts, and thus will affect the quantification and the solution.

Related Topics

MULTIPLE CORRESPONDENCE
Overview (MULTIPLE CORRESPONDENCE command)
Example (MULTIPLE CORRESPONDENCE command)
Options (MULTIPLE CORRESPONDENCE command)
VARIABLES Subcommand (MULTIPLE CORRESPONDENCE command)
ANALYSIS Subcommand (MULTIPLE CORRESPONDENCE command)
DISCRETIZATION Subcommand (MULTIPLE CORRESPONDENCE command)
GROUPING Keyword (MULTIPLE CORRESPONDENCE command)
NCAT Keyword (MULTIPLE CORRESPONDENCE command)
MISSING Subcommand (MULTIPLE CORRESPONDENCE command)
PASSIVE Keyword (MULTIPLE CORRESPONDENCE command)
SUPPLEMENTARY Subcommand (MULTIPLE CORRESPONDENCE command)
CONFIGURATION Subcommand (MULTIPLE CORRESPONDENCE command)
DIMENSION Subcommand (MULTIPLE CORRESPONDENCE command)
NORMALIZATION Subcommand (MULTIPLE CORRESPONDENCE command)
MAXITER Subcommand (MULTIPLE CORRESPONDENCE command)
CRITITER Subcommand (MULTIPLE CORRESPONDENCE command)
PRINT Subcommand (MULTIPLE CORRESPONDENCE command)
PLOT Subcommand (MULTIPLE CORRESPONDENCE command)
SAVE Subcommand (MULTIPLE CORRESPONDENCE command)
OUTFILE Subcommand (MULTIPLE CORRESPONDENCE command)


SUPPLEMENTARY Subcommand (MULTIPLE CORRESPONDENCE command)

MULTIPLE CORRESPONDENCE (command),MULTIPLE CORRESPONDENCE (command),MULTIPLE CORRESPONDENCE (command)
supplementary objects/variables,supplementary objects/variables,supplementary objects/variables
MULTIPLE CORRESPONDENCE (command),MULTIPLE CORRESPONDENCE (command),MULTIPLE CORRESPONDENCE (command)
SUPPLEMENTARY subcommand,SUPPLEMENTARY subcommand,SUPPLEMENTARY subcommand
SUPPLEMENTARY (subcommand),SUPPLEMENTARY (subcommand),SUPPLEMENTARY (subcommand)
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command

The SUPPLEMENTARY subcommand specifies the objects or/and variables that you want to treat as supplementary. Supplementary variables must be found in the ANALYSIS subcommand. You can not weight supplementary objects and variables (specified weights are ignored). For supplementary variables, all options on the MISSING subcommand can be specified except LISTWISE.

supplementary objects,supplementary objects,supplementary objects
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command
OBJECT (keyword),OBJECT (keyword),OBJECT (keyword)
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command
supplementary variables,supplementary variables,supplementary variables
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command
VARIABLE (keyword),VARIABLE (keyword),VARIABLE (keyword)
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command
OBJECT | Objects you want to treat as supplementary are indicated with an object number list in parentheses following OBJECT. The keyword TO is allowed. The OBJECT specification is not allowed when CONFIGURATION = FIXED.
VARIABLE | Variables you want to treat as supplementary are indicated with a variable list in parentheses following VARIABLE. The keyword TO is allowed and honors the order of variables in the VARIABLES subcommand. The VARIABLE specification is ignored when CONFIGURATION = FIXED, for in that case all the variables in the ANALYSIS subcommand are automatically treated as supplementary variables.

Related Topics

MULTIPLE CORRESPONDENCE
Overview (MULTIPLE CORRESPONDENCE command)
Example (MULTIPLE CORRESPONDENCE command)
Options (MULTIPLE CORRESPONDENCE command)
VARIABLES Subcommand (MULTIPLE CORRESPONDENCE command)
ANALYSIS Subcommand (MULTIPLE CORRESPONDENCE command)
DISCRETIZATION Subcommand (MULTIPLE CORRESPONDENCE command)
GROUPING Keyword (MULTIPLE CORRESPONDENCE command)
NCAT Keyword (MULTIPLE CORRESPONDENCE command)
MISSING Subcommand (MULTIPLE CORRESPONDENCE command)
PASSIVE Keyword (MULTIPLE CORRESPONDENCE command)
ACTIVE Keyword (MULTIPLE CORRESPONDENCE command)
CONFIGURATION Subcommand (MULTIPLE CORRESPONDENCE command)
DIMENSION Subcommand (MULTIPLE CORRESPONDENCE command)
NORMALIZATION Subcommand (MULTIPLE CORRESPONDENCE command)
MAXITER Subcommand (MULTIPLE CORRESPONDENCE command)
CRITITER Subcommand (MULTIPLE CORRESPONDENCE command)
PRINT Subcommand (MULTIPLE CORRESPONDENCE command)
PLOT Subcommand (MULTIPLE CORRESPONDENCE command)
SAVE Subcommand (MULTIPLE CORRESPONDENCE command)
OUTFILE Subcommand (MULTIPLE CORRESPONDENCE command)


CONFIGURATION Subcommand (MULTIPLE CORRESPONDENCE command)

MULTIPLE CORRESPONDENCE (command),MULTIPLE CORRESPONDENCE (command),MULTIPLE CORRESPONDENCE (command)
CONFIGURATION subcommand,CONFIGURATION subcommand,CONFIGURATION subcommand
CONFIGURATION (subcommand),CONFIGURATION (subcommand),CONFIGURATION (subcommand)
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command

The CONFIGURATION subcommand allows you to read data from a file containing the coordinates of a configuration. The first variable in this file should contain the coordinates for the first dimension, the second variable should contain the coordinates for the second dimension, and so forth.

INITIAL (keyword),INITIAL (keyword),INITIAL (keyword)
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command
FIXED (keyword),FIXED (keyword),FIXED (keyword)
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command
INITIAL('filename') | Use the configuration in the specified file as the starting point of the analysis.
FIXED('filename') | Fit variables in the fixed configuration found in the specified file. The variables to fit in should be specified on the ANALYSIS subcommand but will be treated as supplementary variables. The SUPPLEMENTARY subcommand will be ignored. Also, variable weights will be ignored.

Related Topics

MULTIPLE CORRESPONDENCE
Overview (MULTIPLE CORRESPONDENCE command)
Example (MULTIPLE CORRESPONDENCE command)
Options (MULTIPLE CORRESPONDENCE command)
VARIABLES Subcommand (MULTIPLE CORRESPONDENCE command)
ANALYSIS Subcommand (MULTIPLE CORRESPONDENCE command)
DISCRETIZATION Subcommand (MULTIPLE CORRESPONDENCE command)
GROUPING Keyword (MULTIPLE CORRESPONDENCE command)
NCAT Keyword (MULTIPLE CORRESPONDENCE command)
MISSING Subcommand (MULTIPLE CORRESPONDENCE command)
PASSIVE Keyword (MULTIPLE CORRESPONDENCE command)
ACTIVE Keyword (MULTIPLE CORRESPONDENCE command)
SUPPLEMENTARY Subcommand (MULTIPLE CORRESPONDENCE command)
DIMENSION Subcommand (MULTIPLE CORRESPONDENCE command)
NORMALIZATION Subcommand (MULTIPLE CORRESPONDENCE command)
MAXITER Subcommand (MULTIPLE CORRESPONDENCE command)
CRITITER Subcommand (MULTIPLE CORRESPONDENCE command)
PRINT Subcommand (MULTIPLE CORRESPONDENCE command)
PLOT Subcommand (MULTIPLE CORRESPONDENCE command)
SAVE Subcommand (MULTIPLE CORRESPONDENCE command)
OUTFILE Subcommand (MULTIPLE CORRESPONDENCE command)


DIMENSION Subcommand (MULTIPLE CORRESPONDENCE command)

MULTIPLE CORRESPONDENCE (command),MULTIPLE CORRESPONDENCE (command),MULTIPLE CORRESPONDENCE (command)
DIMENSION subcommand,DIMENSION subcommand,DIMENSION subcommand
DIMENSION (subcommand),DIMENSION (subcommand),DIMENSION (subcommand)
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command

DIMENSION specifies the number of dimensions you want MULTIPLE CORRESPONDENCE to compute.

• If you do not specify the DIMENSION subcommand, MULTIPLE CORRESPONDENCE computes a two dimensional solution.

• DIMENSION is followed by an integer indicating the number of dimensions.

• The maximum number of dimensions is the smaller of a) the number of observations minus 1 and b) the total number of valid variable levels (categories) minus the number of variables if there are no variables with missing values to be treated as passive. If there are variables with missing values to be treated as passive, the maximum number of dimensions is the smaller of a) the number of observations minus 1 and b) the total number of valid variable levels (categories) minus the larger of c) 1 and d) the number of variables without missing values to be treated as passive.

• The maximum number of dimensions is the smaller of the number of observations minus 1 and the total number of valid variable levels (categories) minus the number of variables without missing values.

• MULTIPLE CORRESPONDENCE adjusts the number of dimensions to the maximum if the specified value is too large.

• The minimum number of dimensions is 1.

Related Topics

MULTIPLE CORRESPONDENCE
Overview (MULTIPLE CORRESPONDENCE command)
Example (MULTIPLE CORRESPONDENCE command)
Options (MULTIPLE CORRESPONDENCE command)
VARIABLES Subcommand (MULTIPLE CORRESPONDENCE command)
ANALYSIS Subcommand (MULTIPLE CORRESPONDENCE command)
DISCRETIZATION Subcommand (MULTIPLE CORRESPONDENCE command)
GROUPING Keyword (MULTIPLE CORRESPONDENCE command)
NCAT Keyword (MULTIPLE CORRESPONDENCE command)
MISSING Subcommand (MULTIPLE CORRESPONDENCE command)
PASSIVE Keyword (MULTIPLE CORRESPONDENCE command)
ACTIVE Keyword (MULTIPLE CORRESPONDENCE command)
SUPPLEMENTARY Subcommand (MULTIPLE CORRESPONDENCE command)
CONFIGURATION Subcommand (MULTIPLE CORRESPONDENCE command)
NORMALIZATION Subcommand (MULTIPLE CORRESPONDENCE command)
MAXITER Subcommand (MULTIPLE CORRESPONDENCE command)
CRITITER Subcommand (MULTIPLE CORRESPONDENCE command)
PRINT Subcommand (MULTIPLE CORRESPONDENCE command)
PLOT Subcommand (MULTIPLE CORRESPONDENCE command)
SAVE Subcommand (MULTIPLE CORRESPONDENCE command)
OUTFILE Subcommand (MULTIPLE CORRESPONDENCE command)


NORMALIZATION Subcommand (MULTIPLE CORRESPONDENCE command)

normalization,normalization,normalization
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command
MULTIPLE CORRESPONDENCE (command),MULTIPLE CORRESPONDENCE (command),MULTIPLE CORRESPONDENCE (command)
normalization,normalization,normalization
MULTIPLE CORRESPONDENCE (command),MULTIPLE CORRESPONDENCE (command),MULTIPLE CORRESPONDENCE (command)
NORMALIZATION subcommand,NORMALIZATION subcommand,NORMALIZATION subcommand
NORMALIZATION (subcommand),NORMALIZATION (subcommand),NORMALIZATION (subcommand)
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command

The NORMALIZATION subcommand specifies one of five options for normalizing the object scores and the variables.

• Only one normalization method can be used in a given analysis.

variable principal normalization,variable principal normalization,variable principal normalization
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command
VPRINCIPAL (keyword),VPRINCIPAL (keyword),VPRINCIPAL (keyword)
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command
object principal normalization,object principal normalization,object principal normalization
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command
OPRINCIPAL (keyword),OPRINCIPAL (keyword),OPRINCIPAL (keyword)
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command
symmetrical normalization,symmetrical normalization,symmetrical normalization
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command
SYMMETRICAL (keyword),SYMMETRICAL (keyword),SYMMETRICAL (keyword)
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command
independent normalization,independent normalization,independent normalization
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command
INDEPENDENT (keyword),INDEPENDENT (keyword),INDEPENDENT (keyword)
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command
VPRINCIPAL | Optimize the association between variables. With VPRINCIPAL, the categories are in the centroid of the objects in the particular categories. VPRINCIPAL is the default if the NORMALIZATION subcommand is not specified. This is useful when you are primarily interested in the association between the variables.
OPRINCIPAL | Optimize distances between objects. This is useful when you are primarily interested in differences or similarities between the objects.
SYMMETRICAL | Use this normalization option if you are primarily interested in the relation between objects and variables.
INDEPENDENT | Use this normalization option if you want to examine distances between objects and associations between variables separately.

The fifth method allows the user to specify any real value in the closed interval [–1, 1]. A value of 1 is equal to the OPRINCIPAL method, a value of 0 is equal to the SYMMETRICAL method, and a value of –1 is equal to the VPRINCIPAL method. By specifying a value greater than –1 and less than 1, the user can spread the eigenvalue over both objects and variables. This method is useful for making a tailor-made biplot. If the user specifies a value outside of this interval, the procedure issues a syntax error message and terminates.

Related Topics

MULTIPLE CORRESPONDENCE
Overview (MULTIPLE CORRESPONDENCE command)
Example (MULTIPLE CORRESPONDENCE command)
Options (MULTIPLE CORRESPONDENCE command)
VARIABLES Subcommand (MULTIPLE CORRESPONDENCE command)
ANALYSIS Subcommand (MULTIPLE CORRESPONDENCE command)
DISCRETIZATION Subcommand (MULTIPLE CORRESPONDENCE command)
GROUPING Keyword (MULTIPLE CORRESPONDENCE command)
NCAT Keyword (MULTIPLE CORRESPONDENCE command)
MISSING Subcommand (MULTIPLE CORRESPONDENCE command)
PASSIVE Keyword (MULTIPLE CORRESPONDENCE command)
ACTIVE Keyword (MULTIPLE CORRESPONDENCE command)
SUPPLEMENTARY Subcommand (MULTIPLE CORRESPONDENCE command)
CONFIGURATION Subcommand (MULTIPLE CORRESPONDENCE command)
DIMENSION Subcommand (MULTIPLE CORRESPONDENCE command)
MAXITER Subcommand (MULTIPLE CORRESPONDENCE command)
CRITITER Subcommand (MULTIPLE CORRESPONDENCE command)
PRINT Subcommand (MULTIPLE CORRESPONDENCE command)
PLOT Subcommand (MULTIPLE CORRESPONDENCE command)
SAVE Subcommand (MULTIPLE CORRESPONDENCE command)
OUTFILE Subcommand (MULTIPLE CORRESPONDENCE command)


MAXITER Subcommand (MULTIPLE CORRESPONDENCE command)

MULTIPLE CORRESPONDENCE (command),MULTIPLE CORRESPONDENCE (command),MULTIPLE CORRESPONDENCE (command)
MAXITER subcommand,MAXITER subcommand,MAXITER subcommand
MAXITER (subcommand),MAXITER (subcommand),MAXITER (subcommand)
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command

MAXITER specifies the maximum number of iterations MULTIPLE CORRESPONDENCE can go through in its computations.

• If MAXITER is not specified, the maximum number of iterations is 100.

• The specification on MAXITER is a positive integer indicating the maximum number of iterations. There is no uniquely predetermined (that is, hard-coded) maximum for the value that can be used.

Related Topics

MULTIPLE CORRESPONDENCE
Overview (MULTIPLE CORRESPONDENCE command)
Example (MULTIPLE CORRESPONDENCE command)
Options (MULTIPLE CORRESPONDENCE command)
VARIABLES Subcommand (MULTIPLE CORRESPONDENCE command)
ANALYSIS Subcommand (MULTIPLE CORRESPONDENCE command)
DISCRETIZATION Subcommand (MULTIPLE CORRESPONDENCE command)
GROUPING Keyword (MULTIPLE CORRESPONDENCE command)
NCAT Keyword (MULTIPLE CORRESPONDENCE command)
MISSING Subcommand (MULTIPLE CORRESPONDENCE command)
PASSIVE Keyword (MULTIPLE CORRESPONDENCE command)
ACTIVE Keyword (MULTIPLE CORRESPONDENCE command)
SUPPLEMENTARY Subcommand (MULTIPLE CORRESPONDENCE command)
CONFIGURATION Subcommand (MULTIPLE CORRESPONDENCE command)
DIMENSION Subcommand (MULTIPLE CORRESPONDENCE command)
NORMALIZATION Subcommand (MULTIPLE CORRESPONDENCE command)
CRITITER Subcommand (MULTIPLE CORRESPONDENCE command)
PRINT Subcommand (MULTIPLE CORRESPONDENCE command)
PLOT Subcommand (MULTIPLE CORRESPONDENCE command)
SAVE Subcommand (MULTIPLE CORRESPONDENCE command)
OUTFILE Subcommand (MULTIPLE CORRESPONDENCE command)


CRITITER Subcommand (MULTIPLE CORRESPONDENCE command)

MULTIPLE CORRESPONDENCE (command),MULTIPLE CORRESPONDENCE (command),MULTIPLE CORRESPONDENCE (command)
CRITITER subcommand,CRITITER subcommand,CRITITER subcommand
CRITITER (subcommand),CRITITER (subcommand),CRITITER (subcommand)
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command

CRITITER specifies a convergence criterion value. MULTIPLE CORRESPONDENCE stops iterating if the difference in fit between the last two iterations is less than the CRITITER value.

• If CRITITER is not specified, the convergence value is 0.00001.

• The specification on CRITITER is any positive value.

Related Topics

MULTIPLE CORRESPONDENCE
Overview (MULTIPLE CORRESPONDENCE command)
Example (MULTIPLE CORRESPONDENCE command)
Options (MULTIPLE CORRESPONDENCE command)
VARIABLES Subcommand (MULTIPLE CORRESPONDENCE command)
ANALYSIS Subcommand (MULTIPLE CORRESPONDENCE command)
DISCRETIZATION Subcommand (MULTIPLE CORRESPONDENCE command)
GROUPING Keyword (MULTIPLE CORRESPONDENCE command)
NCAT Keyword (MULTIPLE CORRESPONDENCE command)
MISSING Subcommand (MULTIPLE CORRESPONDENCE command)
PASSIVE Keyword (MULTIPLE CORRESPONDENCE command)
ACTIVE Keyword (MULTIPLE CORRESPONDENCE command)
SUPPLEMENTARY Subcommand (MULTIPLE CORRESPONDENCE command)
CONFIGURATION Subcommand (MULTIPLE CORRESPONDENCE command)
DIMENSION Subcommand (MULTIPLE CORRESPONDENCE command)
NORMALIZATION Subcommand (MULTIPLE CORRESPONDENCE command)
MAXITER Subcommand (MULTIPLE CORRESPONDENCE command)
PRINT Subcommand (MULTIPLE CORRESPONDENCE command)
PLOT Subcommand (MULTIPLE CORRESPONDENCE command)
SAVE Subcommand (MULTIPLE CORRESPONDENCE command)
OUTFILE Subcommand (MULTIPLE CORRESPONDENCE command)


PRINT Subcommand (MULTIPLE CORRESPONDENCE command)

MULTIPLE CORRESPONDENCE (command),MULTIPLE CORRESPONDENCE (command),MULTIPLE CORRESPONDENCE (command)
PRINT subcommand,PRINT subcommand,PRINT subcommand
PRINT (subcommand),PRINT (subcommand),PRINT (subcommand)
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command

The Model Summary statistics (Cronbach's alpha and the variance accounted for) and the HISTORY statistics (the variance accounted for, the loss, and the increase in variance accounted for) for the last iteration are always displayed. That is, they cannot be controlled by the PRINT subcommand. The PRINT subcommand controls the display of optional additional output. The output of the MULTIPLE CORRESPONDENCE procedure is always based on the transformed variables. However, the correlations of the original variables can be requested as well by the keyword OCORR.

The default keywords are DESCRIP, DISCRIM, and CORR. That is, the three keywords are in effect when the PRINT subcommand is omitted or when the PRINT subcommand is given without any keywords. Note that when some keywords are specified, the default is nullified and only the keywords specified become in effect. If a keyword that cannot be followed by a varlist is duplicated or if a contradicting keyword is encountered, then the later one silently becomes effective (in case of a contradicting use of NONE, only the keywords following NONE are effective). For example,

/PRINT <=> /PRINT = DESCRIP DISCRIM CORR

/PRINT = DISCRIM DISCRIM <=> /PRINT = DISCRIM

/PRINT = DISCRIM NONE CORR <=> /PRINT = CORR

If a keyword that can be followed by a varlist is duplicated, it will cause a syntax error and the procedure will terminate. For example, /PRINT = QUANT QUANT is a syntax error.

The following keywords can be specified:

descriptive statistics,descriptive statistics,descriptive statistics
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command
DESCRIP (keyword),DESCRIP (keyword),DESCRIP (keyword)
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command
discrimination measures,discrimination measures,discrimination measures
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command
DISCRIM (keyword),DISCRIM (keyword),DISCRIM (keyword)
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command
quantifications,quantifications,quantifications
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command
category quantifications,category quantifications,category quantifications
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command
QUANT (keyword),QUANT (keyword),QUANT (keyword)
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command
iteration history,iteration history,iteration history
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command
HISTORY (keyword),HISTORY (keyword),HISTORY (keyword)
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command
correlations,correlations,correlations
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command
CORR (keyword),CORR (keyword),CORR (keyword)
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command
OCORR (keyword),OCORR (keyword),OCORR (keyword)
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command
object scores,object scores,object scores
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command
OBJECT (keyword),OBJECT (keyword),OBJECT (keyword)
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command
NONE (keyword),NONE (keyword),NONE (keyword)
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command
DESCRIP(varlist) | Descriptive statistics (frequencies, missing values, and mode). The variables in the varlist must be specified on the VARIABLES subcommand, but need not appear on the ANALYSIS subcommand. If DESCRIP is not followed by a varlist, Descriptives tables are displayed for all the variables in the varlist on the ANALYSIS subcommand.
DISCRIM | Discrimination measures per variable and per dimension.
QUANT(varlist) | Category quantifications (centroid coordinates), mass, inertia of the categories, contribution of the categories to the inertia of the dimensions, and contribution of the dimensions to the inertia of the categories. Any variable in the ANALYSIS subcommand may be specified in parentheses after QUANT. If QUANT is not followed by a varlist, Quantification tables are displayed for all variables in the varlist on the ANALYSIS subcommand.
 | Note: the coordinates and contributions (including the mass and inertia) are displayed in separate layers of the pivot table output, with the coordinates shown by default. To display the contributions, activate (double-click) on the table and select Contributions from the Layer dropdown list.
HISTORY | History of iterations. For each iteration, the variance accounted for, the loss, and the increase in variance accounted for are shown.
CORR | Correlations of the transformed variables, and the eigenvalues of this correlation matrix. Correlation tables are displayed for each set of quantifications, thus there are ndim (the number of dimensions in the analysis) correlation tables; the ith table contains the correlations of the quantifications of dimension i, i = 1, ..., ndim. For variables with missing values specified to be treated as PASSIVE on the MISSING subcommand, the missing values are imputed according to the specification on the PASSIVE keyword (if nothing is specified, mode imputation is used).
OCORR | Correlations of the original variables, and the eigenvalues of this correlation matrix. For variables with missing values specified to be treated as PASSIVE on the MISSING subcommand, the missing values are imputed with the variable mode.
OBJECT((varname)varlist) | Object scores (component scores) and, in separate table, mass, inertia of the objects, contribution of the objects to the inertia of the dimensions, and contribution of the dimensions to the inertia of the objects. Following the keyword, a varlist can be given in parentheses to display variables (category indicators) along with the object scores. If you want to use a variable to label the objects, this variable must occur in parenthesis as the first variable in the varlist. If no labeling variable is specified, the objects are labeled with case numbers. The variables to display along with the object scores and the variable to label the objects must be specified on the VARIABLES subcommand but need not appear on the ANALYSIS subcommand. If no varlist is given, only the object scores are displayed.
NONE | No optional output is displayed. The only output shown is the Model Summary and the HISTORY statistics for the last iteration.

The keyword TO in a variable list can only be used with variables that are in the ANALYSIS subcommand, and TO applies only to the order of the variables in the ANALYSIS subcommand. For variables that are in the VARIABLES subcommand but not in the ANALYSIS subcommand, the keyword TO cannot be used. For example, if /VARIABLES = v1 TO v5 and the ANALYSIS subcommand has /ANALYSIS v2 v1 v4, then /PLOT OBJECT(v1 TO v4) will give two object plots, one labeled with v1 and one labeled with v4. (/PLOT OBJECT(v1 TO v4 v2 v3 v5) will give objects plots labeled with v1, v2, v3, v4, and v5).

Related Topics

MULTIPLE CORRESPONDENCE
Overview (MULTIPLE CORRESPONDENCE command)
Example (MULTIPLE CORRESPONDENCE command)
Options (MULTIPLE CORRESPONDENCE command)
VARIABLES Subcommand (MULTIPLE CORRESPONDENCE command)
ANALYSIS Subcommand (MULTIPLE CORRESPONDENCE command)
DISCRETIZATION Subcommand (MULTIPLE CORRESPONDENCE command)
GROUPING Keyword (MULTIPLE CORRESPONDENCE command)
NCAT Keyword (MULTIPLE CORRESPONDENCE command)
MISSING Subcommand (MULTIPLE CORRESPONDENCE command)
PASSIVE Keyword (MULTIPLE CORRESPONDENCE command)
ACTIVE Keyword (MULTIPLE CORRESPONDENCE command)
SUPPLEMENTARY Subcommand (MULTIPLE CORRESPONDENCE command)
CONFIGURATION Subcommand (MULTIPLE CORRESPONDENCE command)
DIMENSION Subcommand (MULTIPLE CORRESPONDENCE command)
NORMALIZATION Subcommand (MULTIPLE CORRESPONDENCE command)
MAXITER Subcommand (MULTIPLE CORRESPONDENCE command)
CRITITER Subcommand (MULTIPLE CORRESPONDENCE command)
PLOT Subcommand (MULTIPLE CORRESPONDENCE command)
SAVE Subcommand (MULTIPLE CORRESPONDENCE command)
OUTFILE Subcommand (MULTIPLE CORRESPONDENCE command)


PLOT Subcommand (MULTIPLE CORRESPONDENCE command)

MULTIPLE CORRESPONDENCE (command),MULTIPLE CORRESPONDENCE (command),MULTIPLE CORRESPONDENCE (command)
plots,plots,plots
MULTIPLE CORRESPONDENCE (command),MULTIPLE CORRESPONDENCE (command),MULTIPLE CORRESPONDENCE (command)
PLOT subcommand,PLOT subcommand,PLOT subcommand
PLOT (subcommand),PLOT (subcommand),PLOT (subcommand)
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command

The PLOT subcommand controls the display of plots. The default keywords are OBJECT and DISCRIM. That is, the two keywords are in effect when the PLOT subcommand is omitted, or when the PLOT subcommand is given without any keyword. If a keyword is duplicated (for example, /PLOT = RESID RESID), then it will cause a syntax error and the procedure will terminate. If the keyword NONE is used together with other keywords (for example, /PLOT = RESID NONE DISCRIM), then only the keywords following NONE are effective. That is, when keywords contradict, the later one overwrites the earlier ones.

• All the variables to be plotted must be specified in the ANALYSIS subcommand.

• If the variable list following the keywords CATEGORIES, TRANS, and RESID is empty, then it will cause a syntax error and the procedure will terminate.

• The variables in the varlist for labeling the object points following OBJECT and BIPLOT must be specified on the VARIABLES subcommand but need not appear on the ANALYSIS subcommand. This means that variables not included in the analysis can still be used to label plots.

• The keyword TO in a variable list can only be used with variables that are in the ANALYSIS subcommand, and TO applies only to the order of the variables in the ANALYSIS subcommand For variables that are in the VARIABLES subcommand but not in the ANALYSIS subcommand, the keyword TO cannot be used. For example, if /VARIABLES = v1 TO v5 and /ANALYSIS is v2 v1 v4, then /PLOT OBJECT(v1 TO v4) will give two object plots, one labeled with v1 and one labeled with v4. (/PLOT OBJECT(v1 TO v4 v2 v3 v5) will give objects plots labeled with v1, v2, v3, v4, and v5).

• For multidimensional plots, all of the dimensions in the solution are produced in a matrix scatterplot if the number of dimensions in the solution is greater than two and the NDIM keyword is not specified; if the specified number of dimensions is 2, a scatterplot is produced.

The following keywords can be specified:

object points plots,object points plots,object points plots
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command
OBJECT (keyword),OBJECT (keyword),OBJECT (keyword)
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command
category plots,category plots,category plots
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command
CATEGORY (keyword),CATEGORY (keyword),CATEGORY (keyword)
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command
DISCRIM (keyword),DISCRIM (keyword),DISCRIM (keyword)
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command
transformation plots,transformation plots,transformation plots
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command
TRANS (keyword),TRANS (keyword),TRANS (keyword)
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command
residual plots,residual plots,residual plots
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command
RESID (keyword),RESID (keyword),RESID (keyword)
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command
biplots,biplots,biplots
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command
BIPLOT (keyword),BIPLOT (keyword),BIPLOT (keyword)
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command
joint category plots,joint category plots,joint category plots
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command
JOINTCAT (keyword),JOINTCAT (keyword),JOINTCAT (keyword)
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command
NONE (keyword),NONE (keyword),NONE (keyword)
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command
OBJECT (varlist)(n) | Plots of the object points. Following the keyword, a list of variables in parentheses can be given to indicate that plots of object points labeled with the categories of the variables should be produced (one plot for each variable). If the variable list is omitted, a plot labeled with case numbers is produced.
CATEGORY(varlist)(n) | Plots of the category points (centroid coordinates). A list of variables must be given in parentheses following the keyword. Categories are in the centroids of the objects in the particular categories.
DISCRIM(varlist)(n) | Plot of the discrimination measures. DISCRIM can be followed by a varlist to select the variables to include in the plot. If the variable list is omitted, a plot including all variables is produced.
TRANS(varlist(n)) | Transformation plots per variable (optimal category quantifications against category indicators). Following the keyword, a list of variables in parentheses must be given. Each variable can be followed by a number of dimensions in parentheses to indicate you want to display p residual plots, one for each of the first p dimensions. If the number of dimensions is not specified, a plot for the first dimension is produced.
RESID(varlist(n))(n) | Plot of residuals per variable (approximation against optimal category quantifications). Following the keyword, a list of variables in parentheses must be given. Each variable can be followed by a number of dimensions in parentheses to indicate you want to display p residual plots, one for each of the first p dimensions. If the number of dimensions is not specified, a plot for the first dimension is produced.
BIPLOT((varlist))(varlist)(n) | Plot of objects and variables (centroids). When NORMALIZATION = INDEPENDENT, this plot is incorrect and therefore not available. BIPLOT can be followed by a varlist in double parentheses to select the variables to include in the plot. If this variable list is omitted, a plot including all variables is produced. Following BIPLOT or BIPLOT((varlist)), a list of variables in single parentheses can be given to indicate that plots with objects labeled with the categories of the variables should be produced (one plot for each variable). If this variable list is omitted, a plot with objects labeled with case numbers is produced.
JOINTCAT(varlist)(n) | Joint plot of the category points for the variables in the varlist. If no varlist is given, the category points for all variables are displayed.
NONE | No plots.

• For all of the keywords except TRANS and NONE, the user can specify an optional parameter l in parentheses after the variable list in order to control the global upper boundary of variable name/label and value label lengths in the plot. Note that this boundary is applied uniformly to all variables in the list. The label length parameter l can take any non-negative integer less than or equal to the applicable maximum length (64 for variable names, 255 for variable labels, and 60 for value labels). If l = 0, names/values instead of variable/value labels are displayed to indicate variables/categories. If l is not specified, MULTIPLE CORRESPONDENCE assumes that each variable name/label and value label at its full length is displayed. If l is an integer larger than the applicable maximum, then we reset it to the applicable maximum but do not issue a warning. If a positive value of l is given but if some or all of the variables/category values do not have labels, then for those variables/values the names/values themselves are used as the labels.

In addition to the plot keywords, the following can be specified:

NDIM (keyword),NDIM (keyword),NDIM (keyword)
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command
NDIM(value,value) Dimension pairs to be plotted. NDIM is followed by a pair of values in parentheses. If NDIM is not specified or if NDIM is specified without parameter values, a matrix scatterplot including all dimensions is produced.

• The first value (an integer that can range from 1 to the number of dimensions in the solution minus 1) indicates the dimension that is plotted against higher dimensions.

• The second value (an integer that can range from 2 to the number of dimensions in the solution) indicates the highest dimension to be used in plotting the dimension pairs.

• The NDIM specification applies to all requested multidimensional plots.

Related Topics

MULTIPLE CORRESPONDENCE
Overview (MULTIPLE CORRESPONDENCE command)
Example (MULTIPLE CORRESPONDENCE command)
Options (MULTIPLE CORRESPONDENCE command)
VARIABLES Subcommand (MULTIPLE CORRESPONDENCE command)
ANALYSIS Subcommand (MULTIPLE CORRESPONDENCE command)
DISCRETIZATION Subcommand (MULTIPLE CORRESPONDENCE command)
GROUPING Keyword (MULTIPLE CORRESPONDENCE command)
NCAT Keyword (MULTIPLE CORRESPONDENCE command)
MISSING Subcommand (MULTIPLE CORRESPONDENCE command)
PASSIVE Keyword (MULTIPLE CORRESPONDENCE command)
ACTIVE Keyword (MULTIPLE CORRESPONDENCE command)
SUPPLEMENTARY Subcommand (MULTIPLE CORRESPONDENCE command)
CONFIGURATION Subcommand (MULTIPLE CORRESPONDENCE command)
DIMENSION Subcommand (MULTIPLE CORRESPONDENCE command)
NORMALIZATION Subcommand (MULTIPLE CORRESPONDENCE command)
MAXITER Subcommand (MULTIPLE CORRESPONDENCE command)
CRITITER Subcommand (MULTIPLE CORRESPONDENCE command)
PRINT Subcommand (MULTIPLE CORRESPONDENCE command)
SAVE Subcommand (MULTIPLE CORRESPONDENCE command)
OUTFILE Subcommand (MULTIPLE CORRESPONDENCE command)


SAVE Subcommand (MULTIPLE CORRESPONDENCE command)

MULTIPLE CORRESPONDENCE (command),MULTIPLE CORRESPONDENCE (command),MULTIPLE CORRESPONDENCE (command)
save variables to file,save variables to file,save variables to file
MULTIPLE CORRESPONDENCE (command),MULTIPLE CORRESPONDENCE (command),MULTIPLE CORRESPONDENCE (command)
SAVE subcommand,SAVE subcommand,SAVE subcommand
SAVE (subcommand),SAVE (subcommand),SAVE (subcommand)
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command

The SAVE subcommand is used to add the transformed variables (category indicators replaced with optimal quantifications) and the object scores to the working data file.

• Excluded cases are represented by a dot (the sysmis symbol) on every saved variable.

TRDATA (keyword),TRDATA (keyword),TRDATA (keyword)
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command
OBJECT (keyword),OBJECT (keyword),OBJECT (keyword)
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command
TRDATA | Transformed variables. Missing values specified to be treated as passive are represented by a dot. Following TRDATA, a rootname, and the number of dimensions to be saved can be specified in parentheses (if the number of dimensions is not specified, all dimensions are saved).
OBJECT | Object scores.

MULTIPLE CORRESPONDENCE adds three numbers. The first number uniquely identifies the source variable names, the middle number corresponds to the dimension number, and the last number uniquely identifies the MULTIPLE CORRESPONDENCE procedures with the successfully executed SAVE subcommands. Only one rootname can be specified and it can contain up to three characters. If more than one rootname is specified, the first rootname is used; if a rootname contains more than three characters, the first three characters are used at most.

• If a rootname is not specified for TRDATA, rootname TRA is used to automatically generate unique variable names. The formula is ROOTNAMEk_m_n, where k increments from 1 to identify the source variable names by using the source variables’ position numbers in the ANALYSIS subcommand, m increments from 1 to identify the dimension number, and n increments from 1 to identify the MULTIPLE CORRESPONDENCE procedures with the successfully executed SAVE subcommands for a given data file in a continuous session. For example, with two variables specified on ANALYSIS and 2 dimensions to save, the first set of default names, if they do not exist in the data file, would be TRA1_1_1, TRA1_2_1, TRA2_1_1, TRA2_2_1. The next set of default names, if they do not exist in the data file, would be TRA1_1_2, TRA1_2_2, TRA2_1_2, TRA2_2_2. However, if, for example, TRA1_1_2 already exists in the data file, then the default names should be attempted as TRA1_1_3, TRA1_2_3, TRA2_1_3, TRA2_2_3. That is, the last number increments to the next available integer.

• Following OBJECT, a rootname and the number of dimensions can be specified in parentheses (if the number of dimensions is not specified, all dimensions are saved), to which MULTIPLE CORRESPONDENCE adds two numbers separated by the underscore symbol (_). The first number corresponds to the dimension number. The second number uniquely identifies the MULTIPLE CORRESPONDENCE procedures with the successfully executed SAVE subcommands. Only one rootname can be specified, and it can contain up to five characters. If more than one rootname is specified, the first rootname is used; if a rootname contains more than five characters, the first five characters are used at most.

• If a rootname is not specified for OBJECT, the rootname OBSCO is used to automatically generate unique variable names. The formula is ROOTNAMEm_n, where m increments from 1 to identify the dimension number and n increments from 1 to identify the MULTIPLE CORRESPONDENCE procedures with the successfully executed SAVE subcommands for a given data file in a continuous session. For example, if 2 dimensions are specified following OBJECT, the first set of default names, if they do not exist in the data file, would be OBSCO1_1, OBSCO2_1. The next set of default names, if they do not exist in the data file, would be OBSCO1_2, OBSCO2_2. However, if, for example, OBSCO2_2 already exists in the data file, then the default names should be attempted as OBSCO1_3, OBSCO2_3. That is, the second number increments to the next available integer.

• Variable labels are created automatically. They are shown in the Notes table and can also be displayed in the Data Editor window.

• If the number of dimensions is not specified, the SAVE subcommand saves all dimensions.

Related Topics

MULTIPLE CORRESPONDENCE
Overview (MULTIPLE CORRESPONDENCE command)
Example (MULTIPLE CORRESPONDENCE command)
Options (MULTIPLE CORRESPONDENCE command)
VARIABLES Subcommand (MULTIPLE CORRESPONDENCE command)
ANALYSIS Subcommand (MULTIPLE CORRESPONDENCE command)
DISCRETIZATION Subcommand (MULTIPLE CORRESPONDENCE command)
GROUPING Keyword (MULTIPLE CORRESPONDENCE command)
NCAT Keyword (MULTIPLE CORRESPONDENCE command)
MISSING Subcommand (MULTIPLE CORRESPONDENCE command)
PASSIVE Keyword (MULTIPLE CORRESPONDENCE command)
ACTIVE Keyword (MULTIPLE CORRESPONDENCE command)
SUPPLEMENTARY Subcommand (MULTIPLE CORRESPONDENCE command)
CONFIGURATION Subcommand (MULTIPLE CORRESPONDENCE command)
DIMENSION Subcommand (MULTIPLE CORRESPONDENCE command)
NORMALIZATION Subcommand (MULTIPLE CORRESPONDENCE command)
MAXITER Subcommand (MULTIPLE CORRESPONDENCE command)
CRITITER Subcommand (MULTIPLE CORRESPONDENCE command)
PRINT Subcommand (MULTIPLE CORRESPONDENCE command)
PLOT Subcommand (MULTIPLE CORRESPONDENCE command)
OUTFILE Subcommand (MULTIPLE CORRESPONDENCE command)


OUTFILE Subcommand (MULTIPLE CORRESPONDENCE command)

MULTIPLE CORRESPONDENCE (command),MULTIPLE CORRESPONDENCE (command),MULTIPLE CORRESPONDENCE (command)
OUTFILE subcommand,OUTFILE subcommand,OUTFILE subcommand
OUTFILE (subcommand),OUTFILE (subcommand),OUTFILE (subcommand)
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command

The OUTFILE subcommand is used to write the discretized data, transformed data (category indicators replaced with optimal quantifications), and the object scores to an external PASW Statistics data file or previously declared dataset. Excluded cases are represented by a dot (the sysmis symbol) on every saved variable.

DISCRDATA (keyword),DISCRDATA (keyword),DISCRDATA (keyword)
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command
TRDATA (keyword),TRDATA (keyword),TRDATA (keyword)
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command
OBJECT (keyword),OBJECT (keyword),OBJECT (keyword)
MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command,MULTIPLE CORRESPONDENCE command
DISCRDATA('savfile'|'dataset') | Discretized data.
TRDATA('savfile'|'dataset') | Transformed variables. Missing values specified to be treated as passive are represented by a dot.
OBJECT('savfile'|'dataset') | Object scores.

Filenames should be enclosed in quotes and are stored in the working directory unless a path is included as part of the file specification. datasets are available during the current session but are not available in subsequent sessions unless you explicitly save them as data files. The names should be different for each of the keywords.

• The active dataset, in principle, should not be replaced by this subcommand, and the asterisk (*) file specification is not supported. This strategy also helps prevent OUTFILE interference with the SAVE subcommand.

Related Topics

MULTIPLE CORRESPONDENCE
Overview (MULTIPLE CORRESPONDENCE command)
Example (MULTIPLE CORRESPONDENCE command)
Options (MULTIPLE CORRESPONDENCE command)
VARIABLES Subcommand (MULTIPLE CORRESPONDENCE command)
ANALYSIS Subcommand (MULTIPLE CORRESPONDENCE command)
DISCRETIZATION Subcommand (MULTIPLE CORRESPONDENCE command)
GROUPING Keyword (MULTIPLE CORRESPONDENCE command)
NCAT Keyword (MULTIPLE CORRESPONDENCE command)
MISSING Subcommand (MULTIPLE CORRESPONDENCE command)
PASSIVE Keyword (MULTIPLE CORRESPONDENCE command)
ACTIVE Keyword (MULTIPLE CORRESPONDENCE command)
SUPPLEMENTARY Subcommand (MULTIPLE CORRESPONDENCE command)
CONFIGURATION Subcommand (MULTIPLE CORRESPONDENCE command)
DIMENSION Subcommand (MULTIPLE CORRESPONDENCE command)
NORMALIZATION Subcommand (MULTIPLE CORRESPONDENCE command)
MAXITER Subcommand (MULTIPLE CORRESPONDENCE command)
CRITITER Subcommand (MULTIPLE CORRESPONDENCE command)
PRINT Subcommand (MULTIPLE CORRESPONDENCE command)
PLOT Subcommand (MULTIPLE CORRESPONDENCE command)
SAVE Subcommand (MULTIPLE CORRESPONDENCE command)


MULTIPLE IMPUTATION

MULTIPLE IMPUTATION (command),MULTIPLE IMPUTATION (command),MULTIPLE IMPUTATION (command)
MULTIPLE IMPUTATION (command),MULTIPLE IMPUTATION (command),MULTIPLE IMPUTATION (command)
syntax chart,syntax chart,syntax chart
Multiple Imputation,Multiple Imputation,Multiple Imputation
command syntax,command syntax,command syntax

MULTIPLE IMPUTATION is available in the Missing Values option.

MULTIPLE IMPUTATION varlist
[/IMPUTE [METHOD={AUTO**  }]
                 {FCS     }
                 {MONOTONE}
                 {NONE    }
         [NIMPUTATIONS={5**}]
                       {int}
         [SCALEMODEL = {LINEAR**}]
                       {PMM     }
         [INTERACTIONS = {NONE**}]
                         {TWOWAY}
         [MAXPCTMISSING={NONE**}]
                        {num   }
         [MAXCASEDRAWS={50**}]
                       {int }
         [MAXPARAMDRAWS={2**}]
                        {int}
         [MAXITER={10**}]
                  {int }
         [SINGULAR={1E-12**}]]
                   {num    }
         [MAXMODELPARAM={100**}]
                        {int  }
 [/CONSTRAINTS varlist ([MIN={NONE**}]
                             {num   }
                        [MAX={NONE**}]
                             {num   }
                        [RND={NO**  }]
                             {num   }
                        [ROLE={BOTH**}])]
                              {DEP   }
                              {IND   }
 [/MISSINGSUMMARIES [OVERALL**]
                    [VARIABLES[([MAXVARS={25**}][MINPCTMISSING={10**}])]
                                         {int }                {num }
                    [PATTERNS]
                    [NONE]]
 [/IMPUTATIONSUMMARIES [MODELS**] [DESCRIPTIVES[(varlist)]] [NONE]]
 [/ANALYSISWEIGHT var]
 [/OUTFILE [IMPUTATIONS = 'savfile' | 'dataset']]
           [FCSITERATIONS = 'savfile' | 'dataset']

** Default if the subcommand or keyword is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See Multiple Imputation Algorithms for computational details for this procedure.

Syntax for the MULTIPLE IMPUTATION command can be generated from the Analyze Patterns (Multiple Imputation) and Impute Missing Data Values (Multiple Imputation) dialogs.

Release History Collapse Hide details

Release History

Release 17.0

• Command introduced.

Example

DATASET DECLARE imputedData.
MULTIPLE IMPUTATION x y z
 /OUTFILE IMPUTATIONS = imputedData.

Related Topics

Overview (MULTIPLE IMPUTATION command)
Examples (MULTIPLE IMPUTATION command)
Variable Lists (MULTIPLE IMPUTATION command)
IMPUTE Subcommand (MULTIPLE IMPUTATION command)
CONSTRAINTS Subcommand (MULTIPLE IMPUTATION command)
MISSINGSUMMARIES Subcommand (MULTIPLE IMPUTATION command)
IMPUTATIONSUMMARIES Subcommand (MULTIPLE IMPUTATION command)
ANALYSISWEIGHT Subcommand (MULTIPLE IMPUTATION command)
OUTFILE Subcommand (MULTIPLE IMPUTATION command)


Overview (MULTIPLE IMPUTATION command)

The MULTIPLE IMPUTATION procedure performs multiple imputation of missing data values. Given a dataset containing missing values, it outputs one or more datasets in which missing values are replaced with plausible estimates. The procedure also summarizes missing values in the working dataset.

Datasets produced by the MULTIPLE IMPUTATION procedure can be analyzed using supported analysis procedures to obtain final (combined) parameter estimates that take into account the inherent uncertainty among the various sets of imputed values.

Options Collapse Hide details

Options

Variables. You can specify which variables to impute and specify constraints on the imputed values such as minimum and maximum values. You can also specify which variables are used as predictors when imputing missing values of other variables.

Methods. Three imputation methods are offered. The monotone method is an efficient method for data that have a monotone pattern of missingness. Fully conditional specification (FCS) is an iterative Markov Chain Monte Carlo (MCMC) method that is appropriate when the data have an arbitrary (monotone or nonmonotone) missing pattern. The default method (AUTO) scans the data to determine the best imputation method (monotone or FCS). For each method you can control the number of imputations.

Output. By default the procedure displays an overall summary of missingness in your data as well as an imputation summary and the imputation model for each variable whose values are imputed. You can obtain analysis of missing values by variable as well as tabulated patterns of missing values. If you request imputation you can obtain descriptive statistics for imputed values.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is two or more variables and a file specification where the imputed data will be written.

• By default, the procedure imputes missing values using the AUTO method. Five imputations are performed.

• When imputing the default model type depends on the measurement level of the variable: for categorical variables, logistic regression is used; for scale variables linear regression is used.

• The procedure generates output that summarizes missingness in the data and summaries how values were imputed.

Operations Collapse Hide details

Operations

• The output dataset contains the original (nonmissing) data and data for one or more imputations. Each imputation includes all of the observed data and imputed data values. The original and imputed data are stacked in the output dataset. A special variable, Imputation_, identifies whether a case represents original data (Imputation_ = 0) or imputed data (Imputation_ =1…m).

• Multiple imputation datasets can be analyzed using supported analysis procedures to obtain final (combined) parameter estimates that take into account the inherent uncertainty in the various sets of imputed values. Variable Imputation_ must be defined as a split variable in order to obtain pooled parameter estimates.

• The procedure honors the random number generator and seed specified via the global SET command. Specify the same seed across invocations of the procedure if you want to be able to reproduce your imputed values.

• The procedure honors the WEIGHT variable. It is treated as a replication weight when summarizing missing values and estimating imputation models. Cases with negative or zero value of replication weight are ignored. Noninteger weights are rounded to the nearest integer. The procedure also accepts analysis weights (see ANALYSISWEIGHT subcommand).

• The procedure honors SPLIT FILE. A separate missing value analysis and set of imputations is produced for each combination of values of the split variables. An error occurs if imputation is requested and the input dataset has eight split variables.

• The procedure honors the FILTER command. Cases filtered out are ignored by the procedure.

• The procedure accepts string variables and treats them as categorical. Completely blank string values are treated as valid values, i.e., they are not replaced.

• The procedure treats both user- and system-missing values as invalid values. Both types of missing values are replaced when values are imputed and both are treated as invalid values of variables used as predictors in imputation models. User- and system-missing values are also treated as missing in analyses of missingness (counts of missing values, etc.).

• Cases that have a missing value for each analysis variable are included in analyses of missingness but are excluded from imputation. Specifically, values of such cases are not imputed and are excluded when when building imputation models. The determination of which cases are completely missing is made after any variables are filtered out of the imputation model by the MAXPCTMISSING keyword.

• An error occurs if imputation is requested and the input dataset contains a variable named Imputation_.

• An error occurs if imputation and iteration history are requested and the input dataset contains a variable named Iteration_, or SummaryStatistic_.

Syntax Rules Collapse Hide details

Syntax Rules

• Two or more analysis variables are required.

• The OUTFILE subcommand is required unless imputation is turned off (/IMPUTE METHOD=NONE). All other subcommands are optional.

• Only a single instance of each subcommand is allowed except for the CONSTRAINTS command, which can be repeated.

• An error occurs if an attribute or keyword is specified more than once within a subcommand.

• Equals signs shown in the syntax chart are required.

• Subcommand names and keywords must be spelled in full.

• Empty subcommands are not allowed.

Related Topics

MULTIPLE IMPUTATION
Examples (MULTIPLE IMPUTATION command)
Variable Lists (MULTIPLE IMPUTATION command)
IMPUTE Subcommand (MULTIPLE IMPUTATION command)
CONSTRAINTS Subcommand (MULTIPLE IMPUTATION command)
MISSINGSUMMARIES Subcommand (MULTIPLE IMPUTATION command)
IMPUTATIONSUMMARIES Subcommand (MULTIPLE IMPUTATION command)
ANALYSISWEIGHT Subcommand (MULTIPLE IMPUTATION command)
OUTFILE Subcommand (MULTIPLE IMPUTATION command)


Examples (MULTIPLE IMPUTATION command)

Automatic Imputation

DATASET DECLARE imputedData.
MULTIPLE IMPUTATION x y z
  /OUTFILE IMPUTATIONS = imputedData.

• The command requests multiple imputation of scale variables x, y, and z.

• By default, the procedure chooses an imputation method based on a scan of the data. Five imputations are produced by default.

• As all variables are scale, a linear regression model is used for each. When a particular variable is imputed, all other variables are treated as covariates in the imputation model if FCS is automatically chosen as the imputation method. If the monotone method is chosen, only preceding variables are used as predictors.

• The imputed data are written to a new dataset imputedData.

• By default, an overall summary of missingness is displayed, as well as information about how values were imputed.

Analysis of Missingness

MULTIPLE IMPUTATION x y z
  /IMPUTE METHOD=NONE
  /MISSINGSUMMARIES VARIABLES.

• The command requests analysis of missing values for variables x, y, and z.

• No imputation is performed.

Custom Imputation Model

DATASET DECLARE imputedData.
MULTIPLE IMPUTATION x y z
  /IMPUTE METHOD=FCS
  /CONSTRAINTS x y (RND=1 MIN=1)
  /CONSTRAINTS x   (MAX=5)
  /CONSTRAINTS y   (MAX=10)
  /OUTFILE IMPUTATIONS = imputedData.

• Scale variables x, y, and z are defined as analysis variables.

• Missing values are imputed using the FCS method. Variables are imputed in order of their appearance in the variable list. Variable x is imputed first, using x and z as predictors. Then y is imputed, treating x and z as predictors. Finally, z is imputed using x and y as predictors.

• CONSTRAINTS subcommands specify constraints on imputed values. Imputed values of x and y are rounded to the nearest integer and are constrained to be no less than 1. Maximum values of 5 and 10 are specified for x and y, respectively. No constraints are defined for variable z.

• Imputed data are written to a new dataset imputedData.

• By default, an overall summary of missingness is displayed, as well as information about how values were imputed.

Related Topics

MULTIPLE IMPUTATION
Overview (MULTIPLE IMPUTATION command)
Variable Lists (MULTIPLE IMPUTATION command)
IMPUTE Subcommand (MULTIPLE IMPUTATION command)
CONSTRAINTS Subcommand (MULTIPLE IMPUTATION command)
MISSINGSUMMARIES Subcommand (MULTIPLE IMPUTATION command)
IMPUTATIONSUMMARIES Subcommand (MULTIPLE IMPUTATION command)
ANALYSISWEIGHT Subcommand (MULTIPLE IMPUTATION command)
OUTFILE Subcommand (MULTIPLE IMPUTATION command)


Variable Lists (MULTIPLE IMPUTATION command)

MULTIPLE IMPUTATION (command),MULTIPLE IMPUTATION (command),MULTIPLE IMPUTATION (command)
variable lists,variable lists,variable lists

Analysis variables are specified after the command name. Two or more variables must be specified. The TO and ALL keywords can be used to refer to multiple variables. If any variable is specified more than once, the last instance of that variable is honored.

The variable list specifies variables to impute and to include in analyses of missingness. By default, analyis variables are also used as predictors to in imputation models of other analysis variables. The lists of variables to impute and predictors can be restricted via the CONSTRAINTS subcommand.

Variable Order

When imputing using the FCS and MONOTONE methods, variables are imputed sequentially in the order in which they are listed in the variables list. The order of the variables is ignored by the AUTO method except to break ties.

Predictors

The set of predictors that is used when a particular variable is imputed depends on the imputation method:

• For the FCS method, when a variable is imputed all other analysis variables are used as predictors in the imputation model.

• When the MONOTONE method is used, only variables that precede the variable to be imputed in the variable list are used as predictors.

• When the AUTO method is used the set of predictors depends on the pattern of missingness in the data. If the data have a nonmonotone pattern of missingness, FCS is used and all other analysis variables are used as predictors. If the data have a monotone pattern, MONOTONE is used and all variables that precede the variable to be imputed are used predictors. Note that AUTO sorts the analysis variables to detect monotone pattern, so the actual order of variables may not correspond to their order in which they are specified in the variables list.

Measurement Level

Measurement level recorded in the data dictionary is honored for each analysis variable. Measurement level determines the following:

• The default type of imputation model for variables whose values are imputed (linear regression or logistic regression).

• Whether a variable is treated as a factor (categorical) or covariate (scale) when used as a predictor in imputation models.

• Whether the variable is treated as scale or categorical in summaries of missing values.

The procedure treats ordinal and nominal variables equivalently as categorical variables.

Related Topics

MULTIPLE IMPUTATION
Overview (MULTIPLE IMPUTATION command)
Examples (MULTIPLE IMPUTATION command)
IMPUTE Subcommand (MULTIPLE IMPUTATION command)
CONSTRAINTS Subcommand (MULTIPLE IMPUTATION command)
MISSINGSUMMARIES Subcommand (MULTIPLE IMPUTATION command)
IMPUTATIONSUMMARIES Subcommand (MULTIPLE IMPUTATION command)
ANALYSISWEIGHT Subcommand (MULTIPLE IMPUTATION command)
OUTFILE Subcommand (MULTIPLE IMPUTATION command)


IMPUTE Subcommand (MULTIPLE IMPUTATION command)

MULTIPLE IMPUTATION (command),MULTIPLE IMPUTATION (command),MULTIPLE IMPUTATION (command)
IMPUTE subcommand,IMPUTE subcommand,IMPUTE subcommand
IMPUTE (subcommand),IMPUTE (subcommand),IMPUTE (subcommand)
MULTIPLE IMPUTATION command,MULTIPLE IMPUTATION command,MULTIPLE IMPUTATION command

The IMPUTE subcommand controls the imputation method and model. By default, the AUTO method is used to impute missing data values.

METHOD (keyword),METHOD (keyword),METHOD (keyword)
MULTIPLE IMPUTATION command,MULTIPLE IMPUTATION command,MULTIPLE IMPUTATION command
METHOD Keyword Collapse Hide details

METHOD Keyword

The METHOD keyword specifies the imputation method. Specify one of the following options:

AUTO | Automatic method. This is the default. Chooses the best method based on a scan of the data. The monotone method is used when the data have a monotone pattern of missingness; otherwise, if the data have a nonmonotone pattern, FCS is used. The AUTO method internally sorts the analysis variables in order from the least missing to most missing to detect a monotone pattern of missingness if it exists; thus, order of variables in the variable list is ignored when AUTO is used.
MONOTONE | Monotone method. This is a noniterative method that can be used only when the data have a monotone pattern of missingness. A monotone pattern exists when you can order the variables such that, if a variable has a nonmissing value, all preceding variables also have nonmissing values. The monotone method imputes missing values sequentially in the order specified in the variable list. An error occurs if the input data do not have a monotone pattern for the order in which variables are specified.
FCS | Fully conditional specification method. This is an iterative Markov chain Monte Carlo (MCMC) method that can be used when the pattern of missing data is arbitrary (monotone or nonmonotone). In each iteration, the FCS method sequentially imputes missing values in the order specified in the variable list.
NONE | None. No imputation is performed. Choose this option if you want analyses of missingness only. A warning is issued if you turn off imputation and suppress all analyses of missing values.
NIMPUTATIONS (keyword),NIMPUTATIONS (keyword),NIMPUTATIONS (keyword)
MULTIPLE IMPUTATION command,MULTIPLE IMPUTATION command,MULTIPLE IMPUTATION command
NIMPUTATIONS Keyword Collapse Hide details

NIMPUTATIONS Keyword

By default, five imputations are performed. To request a different number of imputations, specify a positive integer. As a rule of thumb, the higher the degree of missing information in the data, the more imputations that are needed to obtain reasonable efficiency relative to an infinite number of imputations.

• NIMPUTATIONS is ignored if imputation is turned off.

SCALEMODEL (keyword),SCALEMODEL (keyword),SCALEMODEL (keyword)
MULTIPLE IMPUTATION command,MULTIPLE IMPUTATION command,MULTIPLE IMPUTATION command
SCALEMODEL Keyword Collapse Hide details

SCALEMODEL Keyword

The AUTO, FCS, and MONOTONE methods are multivariate methods that can be used when several variables have missing values. Each uses univariate models when imputing values of individual variables.

By default, the type of univariate model that is used depends on the measurement level of the variable whose missing values are to be imputed. Multinomial logistic regression is always used for categorical variables. For scale variables, linear regression (LINEAR) is used by default. Optionally you can use the predictive mean matching (PMM) method for scale variables. PMM is a variant of linear regression that ensures that the imputed values are plausible. For PMM the imputed value always matches an observed value (specifically, the observed value that is closest to the value drawn by the imputation model).

• SCALEMODEL is honored only when the FCS or MONOTONE method is chosen explicitly. Linear regression is always used for scale variables when the AUTO method is requested. A warning is issued if SCALEMODEL is specified for the AUTO method.

• SCALEMODEL is ignored if impution is turned off.

INTERACTIONS (keyword),INTERACTIONS (keyword),INTERACTIONS (keyword)
MULTIPLE IMPUTATION command,MULTIPLE IMPUTATION command,MULTIPLE IMPUTATION command
INTERACTIONS Keyword Collapse Hide details

INTERACTIONS Keyword

By default, the imputation model for each variable includes a constant term and main effects for predictor variables. You can optionally include all possible two-way interactions among categorical predictor variables. Specify INTERACTIONS=TWOWAY. Interaction terms do not include scale predictors.

• INTERACTIONS is honored only when the FCS or MONOTONE method is chosen explicitly. Two-way interactions are not included when AUTO method is requested. A warning is issued if INTERACTIONS is specified for the AUTO method.

• INTERACTIONS is ignored if imputation is turned off or if there are fewer than two categorical predictors.

MAXPCTMISSING (keyword),MAXPCTMISSING (keyword),MAXPCTMISSING (keyword)
MULTIPLE IMPUTATION command,MULTIPLE IMPUTATION command,MULTIPLE IMPUTATION command
MAXPCTMISSING Keyword Collapse Hide details

MAXPCTMISSING Keyword

By default analysis variables are imputed and used as predictors without regard to how many missing values they have provided they at least have sufficient data to estimate an imputation model. The optional MAXPCTMISSING keyword is used to exclude variables that have a high percentage of missing values. Specify the maximum allowable percentage of missing values as a positive number less than 100. For example, if you specify MAXMISSINGPCT=50, analysis variables that have more than 50% missing values are not imputed, nor are they used as predictors in imputation models.

• MAXPCTMISSING is ignored if imputation is turned off.

MAXCASEDRAWS (keyword),MAXCASEDRAWS (keyword),MAXCASEDRAWS (keyword)
MULTIPLE IMPUTATION command,MULTIPLE IMPUTATION command,MULTIPLE IMPUTATION command
MAXPARAMDRAWS (keyword),MAXPARAMDRAWS (keyword),MAXPARAMDRAWS (keyword)
MULTIPLE IMPUTATION command,MULTIPLE IMPUTATION command,MULTIPLE IMPUTATION command
Maximum Number of Draws Collapse Hide details

Maximum Number of Draws

If minimum or maximum values are specified for imputed values of scale variables (see CONSTRAINTS subcommand), the procedure attempts to draw values for a case until it finds a set of values that are within the specified ranges. By default, a maximum of 50 sets of values are drawn per case. To override the maximum, specify a positive integer for MAXCASEDRAWS. If a set of values is not obtained within the specified number of draws per case, the procedure draws another set of model parameters and the repeats the case-drawing process. By default, a maximum of 2 sets of model parameters are drawn. To override the maximum, specify a positive integer for MAXPARAMDRAWS. An error occurs if a set of values within the ranges is not obtained within the specified number of case and parameter draws.

Note that increasing these values can increase the processing time. If the procedure is taking a long time (or is unable) to find suitable draws, check the minimum and maximum values specified on the CONSTRAINTS subcommand to ensure they are appropriate.

• MAXCASEDRAWS and MAXPARAMDRAWS are ignored if imputation is turned off, when predictive mean matching is used, and when imputing categorical values.

MAXITER (keyword),MAXITER (keyword),MAXITER (keyword)
MULTIPLE IMPUTATION command,MULTIPLE IMPUTATION command,MULTIPLE IMPUTATION command
MAXITER Keyword Collapse Hide details

MAXITER Keyword

Iteration stops when the maximum number of iterations is reached. To override the default number of iterations (10), specify a positive integer value for MAXITER.

• MAXITER is honored only if the FCS method is chosen explicitly. The keyword is ignored when the AUTO method is used.

• The MAXITER keyword is ignored if the monotone method is used or imputation is turned off.

SINGULAR (keyword),SINGULAR (keyword),SINGULAR (keyword)
MULTIPLE IMPUTATION command,MULTIPLE IMPUTATION command,MULTIPLE IMPUTATION command
SINGULAR Keyword Collapse Hide details

SINGULAR Keyword

SINGULAR specifies the tolerance value used to test for singularity in univariate imputation models (linear regression, logistic regression, and predictive mean matching). The default value is 10e−12. Specify a positive value.

• SINGULAR is honored only if the FCS or MONOTONE method is chosen explicitly. The keyword is ignored and the default singularity tolerance is used when AUTO method is requested.

• SINGULAR is ignored if imputation is turned off.

MAXMODELPARAM (keyword),MAXMODELPARAM (keyword),MAXMODELPARAM (keyword)
MULTIPLE IMPUTATION command,MULTIPLE IMPUTATION command,MULTIPLE IMPUTATION command
MAXMODELPARAM Keyword Collapse Hide details

MAXMODELPARAM Keyword

MAXMODELPARAM specifies the maximum number of model parameters allowed when imputing any variable. If a model has more parameters than the specified limit, processing terminates with an error (no missing values are imputed). The default value is 100. Specify a positive integer value.

• MAXMODELPARAM is ignored if imputation is turned off.

Related Topics

MULTIPLE IMPUTATION
Overview (MULTIPLE IMPUTATION command)
Examples (MULTIPLE IMPUTATION command)
Variable Lists (MULTIPLE IMPUTATION command)
CONSTRAINTS Subcommand (MULTIPLE IMPUTATION command)
MISSINGSUMMARIES Subcommand (MULTIPLE IMPUTATION command)
IMPUTATIONSUMMARIES Subcommand (MULTIPLE IMPUTATION command)
ANALYSISWEIGHT Subcommand (MULTIPLE IMPUTATION command)
OUTFILE Subcommand (MULTIPLE IMPUTATION command)


CONSTRAINTS Subcommand (MULTIPLE IMPUTATION command)

MULTIPLE IMPUTATION (command),MULTIPLE IMPUTATION (command),MULTIPLE IMPUTATION (command)
CONSTRAINTS subcommand,CONSTRAINTS subcommand,CONSTRAINTS subcommand
CONSTRAINTS (subcommand),CONSTRAINTS (subcommand),CONSTRAINTS (subcommand)
MULTIPLE IMPUTATION command,MULTIPLE IMPUTATION command,MULTIPLE IMPUTATION command

The CONSTRAINTS subcommand specifies constraints on imputed values. CONSTRAINTS specifications are ignored when imputation is turned off.

To define constraints, specify one or more analysis variables and one or more of following in parentheses:

MIN (keyword),MIN (keyword),MIN (keyword)
MULTIPLE IMPUTATION command,MULTIPLE IMPUTATION command,MULTIPLE IMPUTATION command
MAX (keyword),MAX (keyword),MAX (keyword)
MULTIPLE IMPUTATION command,MULTIPLE IMPUTATION command,MULTIPLE IMPUTATION command
RND (keyword),RND (keyword),RND (keyword)
MULTIPLE IMPUTATION command,MULTIPLE IMPUTATION command,MULTIPLE IMPUTATION command
ROLE (keyword),ROLE (keyword),ROLE (keyword)
MULTIPLE IMPUTATION command,MULTIPLE IMPUTATION command,MULTIPLE IMPUTATION command
MIN = NONE | num
 | Minimum allowable imputed value for scale variables. Specify a number. If an imputed value is less than the minimum, the procedure draws another value until it finds one that is greater than or equal to MIN or the MAXCASEDRAWS or MAXPARAMDRAWS threshold is reached (See METHOD subcommand). There is no default minimum. MIN is ignored when predictive mean matching is used or when applied to a categorical variable. An error occurs if MIN is greater than or equal to MAX. For date format variables, values must be enclosed in single or double quotes and expressed in the same date format as the defined date format for the variable.
MAX = NONE | num
 | Maximum allowable imputed value for scale variables. Specify a number. If an imputed value is greater than the maximum, the procedure draws another value until it finds one that is less than or equal to MAX or the MAXCASEDRAWS or MAXPARAMDRAWS threshold is reached (See METHOD subcommand). There is no default maximum. MAX is ignored when predictive mean matching is used or when applied to a categorical variable. For date format variables, values must be enclosed in single or double quotes and expressed in the same date format as the defined date format for the variable.
RND = NO | num
 | Controls rounding of imputed values. By default imputed values are not rounded. To round imputed values, specify a numeric multiplier value. Imputed values are rounded to the nearest integer multiple of the specified multiplier. For example, if you specify RND=1, imputed values are rounded to the nearest integer; if you specify RND=0.1, imputed values are rounded to the nearest tenth. Note that no fuzz factor is added before rounding (that is, rounding is 'fuzzless'). RND is ignored when applied to a categorical or date format variable.
ROLE = BOTH | DEP | IND
 | Customize the set of variables to be imputed and/or treated as predictors. By default, each analysis variable is considered as both a dependent variable and independent variable. ROLE can be used to turn off imputation for variables that you want to use as independent variables only (ROLE=IND) or to exclude variables from being used as independent variables (ROLE=DEP) and thereby make the prediction model more compact. Other CONSTRAINTS keywords are ignored for a variable if you define a variable as a predictor only.
 | When imputation is requested, an error is issued if ROLE=IND for all analysis variables.
 | Note: Missing values of variables that are defined as predictor-only (ROLE=IND) variables are imputed, but only for internal use (otherwise those values of the variable could not be used to impute other variables). Imputed values of such variables are not saved to the output dataset. When imputing predictor-only variables, a main-effects only model is always used; the INTERACTIONS keyword is ignored.

The variable list honors the TO and ALL keywords. Constraints are ignored when applied to a variable that is not an analysis variable.

The CONSTRAINTS subcommand can be specified more than once, and its settings are cumulative. That is, if more than one set of specifications is provided for a variable across CONSTRAINTS subcommands, the specifications are merged. When merging, if a particular keyword has different values for the same variable, the value specified in the last CONSTRAINTS subcommand for that variable is honored.

Cumulative Effects of Multiple Constraints

MULTIPLE IMPUTATION x y z
  /CONSTRAINTS x y z (RND=1 MIN=1)
  /CONSTRAINTS x     (MAX=5)
  /CONSTRAINTS y     (MIN=2 MAX=10)
  /CONSTRAINTS z     (ROLE=DEP)
  /OUTFILE IMPUTATIONS = imputedData.

• The first CONSTRAINTS subcommand specifies that imputed values of x, y, and z are rounded to the nearest integer and are constrained to be no less than 1.

• The second CONSTRAINTS subcommand specifies a maximum value of 5 for x.

• The third CONSTRAINTS subcommand specifies a maximum value of 10 for y, and overrules the previous minimum of 1 with a minimum of 2 for y.

• The fourth CONSTRAINTS subcommand specifies that z should be used as a dependent variable only in the imputation models.

The constraints can be summarized as follows:

Variable | Role | Minimum | Maximum | Rounding
x | Dependent and Predictor | 1 | 5 | 1
y | Dependent and Predictor | 2 | 10 | 1
z | Dependent only | 1 |  | 1

Related Topics

MULTIPLE IMPUTATION
Overview (MULTIPLE IMPUTATION command)
Examples (MULTIPLE IMPUTATION command)
Variable Lists (MULTIPLE IMPUTATION command)
IMPUTE Subcommand (MULTIPLE IMPUTATION command)
MISSINGSUMMARIES Subcommand (MULTIPLE IMPUTATION command)
IMPUTATIONSUMMARIES Subcommand (MULTIPLE IMPUTATION command)
ANALYSISWEIGHT Subcommand (MULTIPLE IMPUTATION command)
OUTFILE Subcommand (MULTIPLE IMPUTATION command)


MISSINGSUMMARIES Subcommand (MULTIPLE IMPUTATION command)

MULTIPLE IMPUTATION (command),MULTIPLE IMPUTATION (command),MULTIPLE IMPUTATION (command)
MISSINGSUMMARIES subcommand,MISSINGSUMMARIES subcommand,MISSINGSUMMARIES subcommand
MISSINGSUMMARIES (subcommand),MISSINGSUMMARIES (subcommand),MISSINGSUMMARIES (subcommand)
MULTIPLE IMPUTATION command,MULTIPLE IMPUTATION command,MULTIPLE IMPUTATION command

The MISSINGSUMMARIES subcommand controls the display of missing values of analysis variables.

OVERALL (keyword),OVERALL (keyword),OVERALL (keyword)
MULTIPLE IMPUTATION command,MULTIPLE IMPUTATION command,MULTIPLE IMPUTATION command
OVERALL Keyword Collapse Hide details

OVERALL Keyword

The OVERALL keyword displays a graph that summarizes missingness for cases, variables, and individual data (cell) values:

• Number and percent of analysis variables that have one or more missing values.

• Number and percent of cases that have one or more missing values on analysis variables.

• Number and percent of individual data values that are missing among all analysis variables and cases.

Overall summaries are displayed by default.

VARIABLES (keyword),VARIABLES (keyword),VARIABLES (keyword)
MULTIPLE IMPUTATION command,MULTIPLE IMPUTATION command,MULTIPLE IMPUTATION command
VARIABLES Keyword Collapse Hide details

VARIABLES Keyword

The VARIABLES keyword displays a table of analysis variables sorted by percent of missing values. The table includes descriptive statistics (mean and standard deviation) for scale variables. The table is not shown by default.

You can optionally control the maximum number of variables to display (default=25) and minimum percentage missing (default=10) for a variable to be included in the display. Specify one or both in parentheses. For example, VARIABLES(MAXVARS=50 MINPCTMISSING=25) requests that the table display up to 50 variables that have at least 25% missing values. The set of variables that meet both criteria are displayed. For example, by default, if there are 25 analysis variables but only 5 have 10% or more missing values, the output includes only 5 variables. If there are more analysis variables than MAXVARS and all meet the MINPCTMISSING criteria, then variables with the most missing values are displayed.

• MAXVARS must be a positive integer.

• MINPCTMISSING must be a nonnegative number that is less than 100.

PATTERNS (keyword),PATTERNS (keyword),PATTERNS (keyword)
MULTIPLE IMPUTATION command,MULTIPLE IMPUTATION command,MULTIPLE IMPUTATION command
PATTERNS Keyword Collapse Hide details

PATTERNS Keyword

The PATTERNS keyword displays tabulated patterns of missing values. Each pattern corresponds to a group of cases with the same pattern of incomplete and complete data on analysis variables. You can use PATTERNS output to determine whether monotone imputation method can be used for your data, or if not, how closely your data approximate a monotone pattern.

To display patterns, specify the PATTERNS keyword. The chart orders analysis variables and patterns to reveal monotonicity where it exists. Specifically, variables are ordered from left to right in increasing order of missingness. Rows (patterns) are the sorted first by the last variable (nonmissing values first, then missing values), then by the second to last variable, and so on, working from right to left.

You can use PATTERNS output to determine whether monotone imputation method can be used for your data, or, if not, how closely your data approximate a monotone pattern. If no nonmonotone pattern exists after reordering you can conclude that the data have a monotonic pattern when analysis variables are ordered as such. If data are not monotone, the chart shows how to achieve reach monotonicity.

NONE (keyword),NONE (keyword),NONE (keyword)
MULTIPLE IMPUTATION command,MULTIPLE IMPUTATION command,MULTIPLE IMPUTATION command
NONE Keyword Collapse Hide details

NONE Keyword

NONE suppresses all MISSINGSUMMARIES output.

NONE generates an error when used with any other keyword.

Related Topics

MULTIPLE IMPUTATION
Overview (MULTIPLE IMPUTATION command)
Examples (MULTIPLE IMPUTATION command)
Variable Lists (MULTIPLE IMPUTATION command)
IMPUTE Subcommand (MULTIPLE IMPUTATION command)
CONSTRAINTS Subcommand (MULTIPLE IMPUTATION command)
IMPUTATIONSUMMARIES Subcommand (MULTIPLE IMPUTATION command)
ANALYSISWEIGHT Subcommand (MULTIPLE IMPUTATION command)
OUTFILE Subcommand (MULTIPLE IMPUTATION command)


IMPUTATIONSUMMARIES Subcommand (MULTIPLE IMPUTATION command)

MULTIPLE IMPUTATION (command),MULTIPLE IMPUTATION (command),MULTIPLE IMPUTATION (command)
IMPUTATIONSUMMARIES subcommand,IMPUTATIONSUMMARIES subcommand,IMPUTATIONSUMMARIES subcommand
IMPUTATIONSUMMARIES (subcommand),IMPUTATIONSUMMARIES (subcommand),IMPUTATIONSUMMARIES (subcommand)
MULTIPLE IMPUTATION command,MULTIPLE IMPUTATION command,MULTIPLE IMPUTATION command

If imputation is requested an overall imputation summary is displayed. Contents include analysis specifications and results:

• Specifications include imputation method, number of imputations, model type for scale variables, whether two-way interactions included in models, MAXPCTMISSING setting, and analysis weight.

• Results include imputation method, iterations (for FCS method), dependent variables imputed, dependent variables excluded from imputation, and imputation sequence.

If specified, constaints for analysis variables are also shown when imputation is requested. You can also obtain optional summaries of imputed data by specifying one or more of the following keywords. Imputation summary keywords are ignored if imputation is turned off.

MODELS (keyword),MODELS (keyword),MODELS (keyword)
MULTIPLE IMPUTATION command,MULTIPLE IMPUTATION command,MULTIPLE IMPUTATION command
MODELS Keyword Collapse Hide details

MODELS Keyword

The MODELS keyword displays the imputation model for dependent variables and predictors. Imputation models are shown by default. Includes univariate model type, model effects, and number of values imputed.

DESCRIPTIVES (keyword),DESCRIPTIVES (keyword),DESCRIPTIVES (keyword)
MULTIPLE IMPUTATION command,MULTIPLE IMPUTATION command,MULTIPLE IMPUTATION command
DESCRIPTIVES Keyword Collapse Hide details

DESCRIPTIVES Keyword

The DESCRIPTIVES keyword displays descriptive statistics for dependent variables for which values are imputed. Descriptive statistics are not shown by default.

• For scale variables the descriptive statistics include mean, count, standard deviation, min, and max for the original input data (prior to imputation), imputed values (by imputation), and complete data (original and imputed values together—by imputation).

• For categorical variables the descriptive statistics include count and percent by category for the original input data (prior to imputation), imputed values (by imputation), and complete data (original and imputed values together—by imputation).

If you specify DESCRIPTIVES, statistics are produced by default for each dependent variables for which values are imputed. You can optionally specify a list of dependent variables in parentheses. Descriptives are shown only for the requested variables. Non-analysis variables in the list are ignored.

NONE (keyword),NONE (keyword),NONE (keyword)
MULTIPLE IMPUTATION command,MULTIPLE IMPUTATION command,MULTIPLE IMPUTATION command
NONE Keyword Collapse Hide details

NONE Keyword

The NONE keyword suppresses IMPUTATIONSUMMARIES output.

NONE generates an error if any other keyword is specified.

Related Topics

MULTIPLE IMPUTATION
Overview (MULTIPLE IMPUTATION command)
Examples (MULTIPLE IMPUTATION command)
Variable Lists (MULTIPLE IMPUTATION command)
IMPUTE Subcommand (MULTIPLE IMPUTATION command)
CONSTRAINTS Subcommand (MULTIPLE IMPUTATION command)
MISSINGSUMMARIES Subcommand (MULTIPLE IMPUTATION command)
ANALYSISWEIGHT Subcommand (MULTIPLE IMPUTATION command)
OUTFILE Subcommand (MULTIPLE IMPUTATION command)


ANALYSISWEIGHT Subcommand (MULTIPLE IMPUTATION command)

MULTIPLE IMPUTATION (command),MULTIPLE IMPUTATION (command),MULTIPLE IMPUTATION (command)
ANALYSISWEIGHT subcommand,ANALYSISWEIGHT subcommand,ANALYSISWEIGHT subcommand
ANALYSISWEIGHT (subcommand),ANALYSISWEIGHT (subcommand),ANALYSISWEIGHT (subcommand)
MULTIPLE IMPUTATION command,MULTIPLE IMPUTATION command,MULTIPLE IMPUTATION command

The ANALYSISWEIGHT command specifies a variable containing analysis (regression) weights. The procedure incorporates analysis weights in regression and classification models used to impute missing values. Analysis weights are also used in summaries of imputed values (e.g,. mean, standard deviation, and standard error).

The analysis weight variable must be numeric. Cases with a negative or zero analysis weight are ignored.

Related Topics

MULTIPLE IMPUTATION
Overview (MULTIPLE IMPUTATION command)
Examples (MULTIPLE IMPUTATION command)
Variable Lists (MULTIPLE IMPUTATION command)
IMPUTE Subcommand (MULTIPLE IMPUTATION command)
CONSTRAINTS Subcommand (MULTIPLE IMPUTATION command)
MISSINGSUMMARIES Subcommand (MULTIPLE IMPUTATION command)
IMPUTATIONSUMMARIES Subcommand (MULTIPLE IMPUTATION command)
OUTFILE Subcommand (MULTIPLE IMPUTATION command)


OUTFILE Subcommand (MULTIPLE IMPUTATION command)

MULTIPLE IMPUTATION (command),MULTIPLE IMPUTATION (command),MULTIPLE IMPUTATION (command)
OUTFILE subcommand,OUTFILE subcommand,OUTFILE subcommand
OUTFILE (subcommand),OUTFILE (subcommand),OUTFILE (subcommand)
MULTIPLE IMPUTATION command,MULTIPLE IMPUTATION command,MULTIPLE IMPUTATION command

The OUTFILE subcommand allows you to export PASW Statistics-format data containing imputed values or PASW Statistics-format data containing an FCS iteration history. The OUTFILE subcommand is ignored if imputation is turned off.

IMPUTATIONS (keyword),IMPUTATIONS (keyword),IMPUTATIONS (keyword)
MULTIPLE IMPUTATION command,MULTIPLE IMPUTATION command,MULTIPLE IMPUTATION command
IMPUTATIONS Keyword Collapse Hide details

IMPUTATIONS Keyword

The IMPUTATIONS keyword specifies an optional dataset containing imputed data. The output dataset consists of the original data and one complete dataset per imputation. All variables in the input dataset are included in the output dataset. Dictionary properties (names, labels, etc.) of existing variables are copied to the new dataset. The file also contains a new variable, Imputation_, a numeric variable that indicates the imputation (0 for original data, 1..n for cases having imputed values).

The procedure automatically defines the Imputation_ variable as a split variable (see SPLIT FILE) when the output dataset is created. If SPLIT FILE is in effect when the procedure executes, the output dataset includes one set of imputations for each combination of values of split variables.

FCSITERATIONS (keyword),FCSITERATIONS (keyword),FCSITERATIONS (keyword)
MULTIPLE IMPUTATION command,MULTIPLE IMPUTATION command,MULTIPLE IMPUTATION command
FCSITERATIONS Keyword Collapse Hide details

FCSITERATIONS Keyword

The FCSITERATIONS keyword specifies an optional dataset that contains iteration history data for FCS imputation.

The dataset contains means and standard deviations by iteration and imputation for each scale dependent varable for which values are imputed. You can plot the data to help assess model convergence.

• The FCSITERATIONS keyword is ignored if the monotone method is used. A warning is shown and the dataset is not generated if all imputed variables are categorical.

Related Topics

MULTIPLE IMPUTATION
Overview (MULTIPLE IMPUTATION command)
Examples (MULTIPLE IMPUTATION command)
Variable Lists (MULTIPLE IMPUTATION command)
IMPUTE Subcommand (MULTIPLE IMPUTATION command)
CONSTRAINTS Subcommand (MULTIPLE IMPUTATION command)
MISSINGSUMMARIES Subcommand (MULTIPLE IMPUTATION command)
IMPUTATIONSUMMARIES Subcommand (MULTIPLE IMPUTATION command)
ANALYSISWEIGHT Subcommand (MULTIPLE IMPUTATION command)


MVA

Missing Value Analysis,Missing Value Analysis,Missing Value Analysis
command syntax,command syntax,command syntax
MVA (command),MVA (command),MVA (command)
MVA (command),MVA (command),MVA (command)
syntax chart,syntax chart,syntax chart

MVA is available in the Missing Values Analysis option.

MVA VARIABLES= {varlist}
               {ALL    }

  [/CATEGORICAL=varlist]

  [/MAXCAT={25**}]
           {n   }

  [/ID=varname]

Description:

  [/NOUNIVARIATE]

  [/TTEST [PERCENT={5}] [{T  }] [{DF  } [{PROB  }] [{COUNTS  }] [{MEANS  }]]
                   {n}   {NOT}   {NODF}  {NOPROB}]  {NOCOUNTS}   {NOMEANS}

  [/CROSSTAB [PERCENT={5}]]
                      {n}

  [/MISMATCH [PERCENT={5}] [NOSORT]]
                      {n}

  [/DPATTERN [SORT=varname[({ASCENDING })] [varname ... ]]
                            {DESCENDING}
             [DESCRIBE=varlist]]

  [/MPATTERN [NOSORT] [DESCRIBE=varlist]]

  [/TPATTERN [NOSORT] [DESCRIBE=varlist] [PERCENT={1}]]
                                                  {n}

Estimation:

  [/LISTWISE]

  [/PAIRWISE]

  [/EM  [predicted_varlist] [WITH predictor_varlist]
      [([TOLERANCE={0.001}   ]
                   {value}
        [CONVERGENCE={0.0001}]
                     {value }
        [ITERATIONS={25}     ]
                    {n }
        [TDF=n               ]
        [LAMBDA=a            ]
        [PROPORTION=b        ]
        [OUTFILE='file'      ])]

  [/REGRESSION  [predicted_varlist] [WITH predictor_varlist]
              [([TOLERANCE={0.001}                        ]
                              {n    }
                [FLIMIT={4.0}                             ]
                        {N  }
                [NPREDICTORS=number_of_predictor_variables]
                [ADDTYPE={RESIDUAL*}                      ]
                         {NORMAL   }
                         {T[({5})  }
                             {n}
                         {NONE     }
                [OUTFILE='file'                           ])]]

*If the number of complete cases is less than half the number of cases, the default ADDTYPE specification is NORMAL.

**Default if the subcommand is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See MVA Algorithms for computational details for this procedure.

Syntax for the MVA command can be generated from the dialog.

Examples

MVA VARIABLES=populatn density urban religion lifeexpf region
  /CATEGORICAL=region
  /ID=country
  /MPATTERN DESCRIBE=region religion.

MVA VARIABLES=all
 /EM males msport WITH males msport gradrate facratio.

Related Topics

Overview (MVA command)
Syntax Rules (MVA command)
Missing Indicator Variables (MVA command)
VARIABLES Subcommand (MVA command)
CATEGORICAL Subcommand (MVA command)
MAXCAT Subcommand (MVA command)
ID Subcommand (MVA command)
NOUNIVARIATE Subcommand (MVA command)
TTEST Subcommand (MVA command)
Display of Statistics (MVA command)
CROSSTAB Subcommand (MVA command)
MISMATCH Subcommand (MVA command)
DPATTERN Subcommand (MVA command)
MPATTERN Subcommand (MVA command)
TPATTERN Subcommand (MVA command)
LISTWISE Subcommand (MVA command)
PAIRWISE Subcommand (MVA command)
EM Subcommand (MVA command)
REGRESSION Subcommand (MVA command)


Overview (MVA command)

MVA (Missing Value Analysis) describes the missing value patterns in a data file (data matrix). It can estimate the means, the covariance matrix, and the correlation matrix by using listwise, pairwise, regression, and EM estimation methods. Missing values themselves can be estimated (imputed), and you can then save the new data file.

Options Collapse Hide details

Options

Categorical variables. String variables are automatically defined as categorical. For a long string variable, only the first eight characters are used to define categories. Quantitative variables can be designated as categorical by using the CATEGORICAL subcommand.

MAXCAT specifies the maximum number of categories for any categorical variable. If any categorical variable has more than the specified number of distinct values, MVA is not executed.

Analyzing Patterns. For each quantitative variable, the TTEST subcommand produces a series of t tests. Values of the quantitative variable are divided into two groups, based on the presence or absence of other variables. These pairs of groups are compared using the t test.

Crosstabulating Categorical Variables. The CROSSTAB subcommand produces a table for each categorical variable, showing, for each category, how many nonmissing values are in the other variables and the percentages of each type of missing value.

Displaying Patterns. DPATTERN displays a case-by-case data pattern with codes for system-missing, user-missing, and extreme values. MPATTERN displays only the cases that have missing values and sorts by the pattern that is formed by missing values. TPATTERN tabulates the cases that have a common pattern of missing values. The pattern tables have sorting options. Also, descriptive variables can be specified.

Labeling Cases. For pattern tables, an ID variable can be specified to label cases.

Suppression of Rows. To shorten tables, the PERCENT keyword suppresses missing-value patterns that occur relatively infrequently.

Statistics. Displays of univariate, listwise, and pairwise statistics are available.

Estimation. EM and REGRESSION use different algorithms to supply estimates of missing values, which are used in calculating estimates of the mean vector, the covariance matrix, and the correlation matrix of dependent variables. The estimates can be saved as replacements for missing values in a new data file.

Basic Specification Collapse Hide details

Basic Specification

The basic specification depends on whether you want to describe the missing data pattern or estimate statistics. Often, description is done first, and then, considering the results, an estimation is done. Alternatively, both description and estimation can be done by using the same MVA command.

Descriptive Analysis. A basic descriptive specification includes a list of variables and a statistics or pattern subcommand. For example, a list of variables and the subcommand DPATTERN would show missing value patterns for all cases with respect to the list of variables.

Estimation. A basic estimation specification includes a variable list and an estimation method. For example, if the EM method is specified, the following are estimated: the mean vector, the covariance matrix, and the correlation matrix of quantitative variables with missing values.

Related Topics

MVA
Syntax Rules (MVA command)
Missing Indicator Variables (MVA command)
VARIABLES Subcommand (MVA command)
CATEGORICAL Subcommand (MVA command)
MAXCAT Subcommand (MVA command)
ID Subcommand (MVA command)
NOUNIVARIATE Subcommand (MVA command)
TTEST Subcommand (MVA command)
Display of Statistics (MVA command)
CROSSTAB Subcommand (MVA command)
MISMATCH Subcommand (MVA command)
DPATTERN Subcommand (MVA command)
MPATTERN Subcommand (MVA command)
TPATTERN Subcommand (MVA command)
LISTWISE Subcommand (MVA command)
PAIRWISE Subcommand (MVA command)
EM Subcommand (MVA command)
REGRESSION Subcommand (MVA command)


Syntax Rules (MVA command)

• A variables specification is required directly after the command name. The specification can be either a variable list or the keyword ALL.

• The CATEGORICAL, MAXCAT, and ID subcommands, if used, must be placed after the variables list and before any other subcommand. These three subcommands can be in any order.

• Any combination of description and estimation subcommands can be specified. For example, both the EM and REGRESSION subcommands can be specified in one MVA command.

• Univariate statistics are displayed unless the NOUNIVARIATE subcommand is specified. Thus, if only a list of variables is specified, with no description or estimation subcommands, univariate statistics are displayed.

• If a subcommand is specified more than once, only the last subcommand is honored.

• The following words are reserved as keywords or internal commands in the MVA procedure: VARIABLES, SORT, NOSORT, DESCRIBE, and WITH. They cannot be used as variable names in MVA.

MVA (command),MVA (command),MVA (command)
summary tables,summary tables,summary tables

• The tables Summary of Estimated Means and Summary of Estimated Standard Deviations are produced if you specify more than one way to estimate means and standard deviations. The methods include univariate (default), listwise, pairwise, EM, and regression. For example, these tables are produced when you specify both LISTWISE and EM.

Related Topics

MVA
Overview (MVA command)
Missing Indicator Variables (MVA command)
VARIABLES Subcommand (MVA command)
CATEGORICAL Subcommand (MVA command)
MAXCAT Subcommand (MVA command)
ID Subcommand (MVA command)
NOUNIVARIATE Subcommand (MVA command)
TTEST Subcommand (MVA command)
Display of Statistics (MVA command)
CROSSTAB Subcommand (MVA command)
MISMATCH Subcommand (MVA command)
DPATTERN Subcommand (MVA command)
MPATTERN Subcommand (MVA command)
TPATTERN Subcommand (MVA command)
LISTWISE Subcommand (MVA command)
PAIRWISE Subcommand (MVA command)
EM Subcommand (MVA command)
REGRESSION Subcommand (MVA command)
Symbols (MVA command)


Symbols (MVA command)

MVA (command),MVA (command),MVA (command)
symbols,symbols,symbols

The symbols that are displayed in the DPATTERN and MPATTERN table cells are:

+ | Extremely high value
− | Extremely low value
S | System-missing value
A | First type of user-missing value
B | Second type of user-missing value
C | Third type of user-missing value
extreme values,extreme values,extreme values
MVA command,MVA command,MVA command
MVA (command),MVA (command),MVA (command)
extreme values,extreme values,extreme values

• An extremely high value is more than 1.5 times the interquartile range above the 75th percentile, if (number of variables) × n logn ≤ 150000, where n is the number of cases.

• An extremely low value is more than 1.5 times the interquartile range below the 25th percentile, if (number of variables) × n logn ≤ 150000, where n is the number of cases.

• For larger files—that is, (number of variables) × n logn > 150000—extreme values are two standard deviations from the mean.

Related Topics

Syntax Rules (MVA command)


Missing Indicator Variables (MVA command)

MVA (command),MVA (command),MVA (command)
missing indicator variables,missing indicator variables,missing indicator variables
missing indicator variables,missing indicator variables,missing indicator variables
MVA command,MVA command,MVA command

For each variable in the variables list, a binary indicator variable is formed (internal to MVA), indicating whether a value is present or missing.

Related Topics

MVA
Overview (MVA command)
Syntax Rules (MVA command)
VARIABLES Subcommand (MVA command)
CATEGORICAL Subcommand (MVA command)
MAXCAT Subcommand (MVA command)
ID Subcommand (MVA command)
NOUNIVARIATE Subcommand (MVA command)
TTEST Subcommand (MVA command)
Display of Statistics (MVA command)
CROSSTAB Subcommand (MVA command)
MISMATCH Subcommand (MVA command)
DPATTERN Subcommand (MVA command)
MPATTERN Subcommand (MVA command)
TPATTERN Subcommand (MVA command)
LISTWISE Subcommand (MVA command)
PAIRWISE Subcommand (MVA command)
EM Subcommand (MVA command)
REGRESSION Subcommand (MVA command)


VARIABLES Subcommand (MVA command)

MVA (command),MVA (command),MVA (command)
VARIABLES subcommand,VARIABLES subcommand,VARIABLES subcommand
VARIABLES (subcommand),VARIABLES (subcommand),VARIABLES (subcommand)
MVA command,MVA command,MVA command

A list of variables or the keyword ALL is required.

• The order in which the variables are listed determines the default order in the output.

• If the keyword ALL is used, the default order is the order of variables in the active dataset.

• String variables that are specified in the variable list, whether short or long, are automatically defined as categorical. For a long string variable, only the first eight characters of the values are used to distinguish categories.

• The list of variables must precede all other subcommands.

• Multiple lists of variables are not allowed.

Related Topics

MVA
Overview (MVA command)
Syntax Rules (MVA command)
Missing Indicator Variables (MVA command)
CATEGORICAL Subcommand (MVA command)
MAXCAT Subcommand (MVA command)
ID Subcommand (MVA command)
NOUNIVARIATE Subcommand (MVA command)
TTEST Subcommand (MVA command)
Display of Statistics (MVA command)
CROSSTAB Subcommand (MVA command)
MISMATCH Subcommand (MVA command)
DPATTERN Subcommand (MVA command)
MPATTERN Subcommand (MVA command)
TPATTERN Subcommand (MVA command)
LISTWISE Subcommand (MVA command)
PAIRWISE Subcommand (MVA command)
EM Subcommand (MVA command)
REGRESSION Subcommand (MVA command)


CATEGORICAL Subcommand (MVA command)

MVA (command),MVA (command),MVA (command)
CATEGORICAL subcommand,CATEGORICAL subcommand,CATEGORICAL subcommand
CATEGORICAL (subcommand),CATEGORICAL (subcommand),CATEGORICAL (subcommand)
MVA command,MVA command,MVA command

The MVA procedure automatically treats all string variables in the variables list as categorical. You can designate numeric variables as categorical by listing them on the CATEGORICAL subcommand. If a variable is designated categorical, it will be ignored if listed as a dependent or independent variable on the REGRESSION or EM subcommand.

Related Topics

MVA
Overview (MVA command)
Syntax Rules (MVA command)
Missing Indicator Variables (MVA command)
VARIABLES Subcommand (MVA command)
MAXCAT Subcommand (MVA command)
ID Subcommand (MVA command)
NOUNIVARIATE Subcommand (MVA command)
TTEST Subcommand (MVA command)
Display of Statistics (MVA command)
CROSSTAB Subcommand (MVA command)
MISMATCH Subcommand (MVA command)
DPATTERN Subcommand (MVA command)
MPATTERN Subcommand (MVA command)
TPATTERN Subcommand (MVA command)
LISTWISE Subcommand (MVA command)
PAIRWISE Subcommand (MVA command)
EM Subcommand (MVA command)
REGRESSION Subcommand (MVA command)


MAXCAT Subcommand (MVA command)

MVA (command),MVA (command),MVA (command)
MAXCAT subcommand,MAXCAT subcommand,MAXCAT subcommand
MAXCAT (subcommand),MAXCAT (subcommand),MAXCAT (subcommand)
MVA command,MVA command,MVA command

The MAXCAT subcommand sets the upper limit of the number of distinct values that each categorical variable in the analysis can have. The default is 25. This limit affects string variables in the variables list and also the categorical variables that are defined by the CATEGORICAL subcommand. A large number of categories can slow the analysis considerably. If any categorical variable violates this limit, MVA does not run.

Example

MVA VARIABLES=populatn density urban religion lifeexpf region
  /CATEGORICAL=region
  /MAXCAT=30
  /MPATTERN.

• The CATEGORICAL subcommand specifies that region, a numeric variable, is categorical. The variable religion, a string variable, is automatically categorical.

• The maximum number of categories in region or religion is 30. If either variable has more than 30 distinct values, MVA produces only a warning.

• Missing data patterns are shown for those cases that have at least one missing value in the specified variables.

• The summary table lists the number of missing and extreme values for each variable, including those with no missing values.

Related Topics

MVA
Overview (MVA command)
Syntax Rules (MVA command)
Missing Indicator Variables (MVA command)
VARIABLES Subcommand (MVA command)
CATEGORICAL Subcommand (MVA command)
ID Subcommand (MVA command)
NOUNIVARIATE Subcommand (MVA command)
TTEST Subcommand (MVA command)
Display of Statistics (MVA command)
CROSSTAB Subcommand (MVA command)
MISMATCH Subcommand (MVA command)
DPATTERN Subcommand (MVA command)
MPATTERN Subcommand (MVA command)
TPATTERN Subcommand (MVA command)
LISTWISE Subcommand (MVA command)
PAIRWISE Subcommand (MVA command)
EM Subcommand (MVA command)
REGRESSION Subcommand (MVA command)


ID Subcommand (MVA command)

MVA (command),MVA (command),MVA (command)
ID subcommand,ID subcommand,ID subcommand
ID (subcommand),ID (subcommand),ID (subcommand)
MVA command,MVA command,MVA command

The ID subcommand specifies a variable to label cases. These labels appear in the pattern tables. Without this subcommand, the case numbers are used.

Example

MVA VARIABLES=populatn density urban religion lifeexpf region
  /CATEGORICAL=region
  /MAXCAT=20
  /ID=country
  /MPATTERN.

• The values of the variable country are used as case labels.

• Missing data patterns are shown for those cases that have at least one missing value in the specified variables.

Related Topics

MVA
Overview (MVA command)
Syntax Rules (MVA command)
Missing Indicator Variables (MVA command)
VARIABLES Subcommand (MVA command)
CATEGORICAL Subcommand (MVA command)
MAXCAT Subcommand (MVA command)
NOUNIVARIATE Subcommand (MVA command)
TTEST Subcommand (MVA command)
Display of Statistics (MVA command)
CROSSTAB Subcommand (MVA command)
MISMATCH Subcommand (MVA command)
DPATTERN Subcommand (MVA command)
MPATTERN Subcommand (MVA command)
TPATTERN Subcommand (MVA command)
LISTWISE Subcommand (MVA command)
PAIRWISE Subcommand (MVA command)
EM Subcommand (MVA command)
REGRESSION Subcommand (MVA command)


NOUNIVARIATE Subcommand (MVA command)

MVA (command),MVA (command),MVA (command)
NOUNIVARIATE subcommand,NOUNIVARIATE subcommand,NOUNIVARIATE subcommand
NOUNIVARIATE (subcommand),NOUNIVARIATE (subcommand),NOUNIVARIATE (subcommand)
MVA command,MVA command,MVA command

By default, MVA computes univariate statistics for each variable—the number of cases with nonmissing values, the mean, the standard deviation, the number and percentage of missing values, and the counts of extreme low and high values. (Means, standard deviations, and extreme value counts are not reported for categorical variables.)

• To suppress the univariate statistics, specify NOUNIVARIATE.

Examples

MVA VARIABLES=populatn density urban religion lifeexpf region
  /CATEGORICAL=region
  /CROSSTAB PERCENT=0.

• Univariate statistics (number of cases, means, and standard deviations) are displayed for populatn, density, urban, and lifeexpf. Also, the number of cases, counts and percentages of missing values, and counts of extreme high and low values are displayed.

• The total number of cases and counts and percentages of missing values are displayed for region and religion (a string variable).

• Separate crosstabulations are displayed for region and religion.

MVA VARIABLES=populatn density urban religion lifeexpf region
  /CATEGORICAL=region.
  /NOUNIVARIATE
  /CROSSTAB PERCENT=0.

• Only crosstabulations are displayed (no univariate statistics).

Related Topics

MVA
Overview (MVA command)
Syntax Rules (MVA command)
Missing Indicator Variables (MVA command)
VARIABLES Subcommand (MVA command)
CATEGORICAL Subcommand (MVA command)
MAXCAT Subcommand (MVA command)
ID Subcommand (MVA command)
TTEST Subcommand (MVA command)
Display of Statistics (MVA command)
CROSSTAB Subcommand (MVA command)
MISMATCH Subcommand (MVA command)
DPATTERN Subcommand (MVA command)
MPATTERN Subcommand (MVA command)
TPATTERN Subcommand (MVA command)
LISTWISE Subcommand (MVA command)
PAIRWISE Subcommand (MVA command)
EM Subcommand (MVA command)
REGRESSION Subcommand (MVA command)


TTEST Subcommand (MVA command)

t test,t test,t test
MVA command,MVA command,MVA command
MVA (command),MVA (command),MVA (command)
TTEST subcommand,TTEST subcommand,TTEST subcommand
TTEST (subcommand),TTEST (subcommand),TTEST (subcommand)
MVA command,MVA command,MVA command

For each quantitative variable, a series of t tests are computed to test the difference of means between two groups defined by a missing indicator variable for each of the other variables. (See the topic Missing Indicator Variables (MVA command) for more information. ) For example, a t test is performed on populatn between two groups defined by whether their values are present or missing for calories. Another t test is performed on populatn for the two groups defined by whether their values for density are present or missing, and the tests continue for the remainder of the variable list.

PERCENT (keyword),PERCENT (keyword),PERCENT (keyword)
MVA command,MVA command,MVA command
PERCENT=n Omit indicator variables with less than the specified percentage of missing values. You can specify a percentage from 0 to 100. The default is 5, indicating the omission of any variable with less than 5% missing values. If you specify 0, all rows are displayed.

Related Topics

MVA
Overview (MVA command)
Syntax Rules (MVA command)
Missing Indicator Variables (MVA command)
VARIABLES Subcommand (MVA command)
CATEGORICAL Subcommand (MVA command)
MAXCAT Subcommand (MVA command)
ID Subcommand (MVA command)
NOUNIVARIATE Subcommand (MVA command)
Display of Statistics (MVA command)
CROSSTAB Subcommand (MVA command)
MISMATCH Subcommand (MVA command)
DPATTERN Subcommand (MVA command)
MPATTERN Subcommand (MVA command)
TPATTERN Subcommand (MVA command)
LISTWISE Subcommand (MVA command)
PAIRWISE Subcommand (MVA command)
EM Subcommand (MVA command)
REGRESSION Subcommand (MVA command)


Display of Statistics (MVA command)

The following statistics can be displayed for a t test:

• The t statistic, for comparing the means of two groups defined by whether the indicator variable is coded as missing or nonmissing. (See the topic Missing Indicator Variables (MVA command) for more information. )

T (keyword),T (keyword),T (keyword)
MVA command,MVA command,MVA command
NOT (keyword),NOT (keyword),NOT (keyword)
MVA command,MVA command,MVA command
T | Display the t statistics. This setting is the default.
NOT | Suppress the t statistics.

• The degrees of freedom associated with the t statistic.

DF (keyword),DF (keyword),DF (keyword)
MVA command,MVA command,MVA command
NODF (keyword),NODF (keyword),NODF (keyword)
MVA command,MVA command,MVA command
DF | Display the degrees of freedom. This setting is the default.
NODF | Suppress the degrees of freedom.

• The probability (two-tailed) associated with the t test, calculated for the variable that is tested without reference to other variables. Care should be taken when interpreting this probability.

PROB (keyword),PROB (keyword),PROB (keyword)
MVA command,MVA command,MVA command
NOPROB (keyword),NOPROB (keyword),NOPROB (keyword)
MVA command,MVA command,MVA command
PROB | Display probabilities.
NOPROB | Suppress probabilities. This setting is the default.

• The number of values in each group, where groups are defined by values that are coded as missing and present in the indicator variable.

COUNTS (keyword),COUNTS (keyword),COUNTS (keyword)
MVA command,MVA command,MVA command
NOCOUNTS (keyword),NOCOUNTS (keyword),NOCOUNTS (keyword)
MVA command,MVA command,MVA command
COUNTS | Display counts. This setting is the default.
NOCOUNTS | Suppress counts.

• The means of the groups, where groups are defined by values that are coded as missing and present in the indicator variable.

MEANS (keyword),MEANS (keyword),MEANS (keyword)
MVA command,MVA command,MVA command
NOMEANS (keyword),NOMEANS (keyword),NOMEANS (keyword)
MVA command,MVA command,MVA command
MEANS | Display means. This setting is the default.
NOMEANS | Suppress means.

Example

MVA VARIABLES=populatn density urban religion lifeexpf region
  /CATEGORICAL=region
  /ID=country
  /TTEST.

• The TTEST subcommand produces a table of t tests. For each quantitative variable named in the variables list, a t test is performed, comparing the mean of the values for which the other variable is present against the mean of the values for which the other variable is missing.

• The table displays default statistics, including values of t, degrees of freedom, counts, and means.

Related Topics

MVA
Overview (MVA command)
Syntax Rules (MVA command)
Missing Indicator Variables (MVA command)
VARIABLES Subcommand (MVA command)
CATEGORICAL Subcommand (MVA command)
MAXCAT Subcommand (MVA command)
ID Subcommand (MVA command)
NOUNIVARIATE Subcommand (MVA command)
TTEST Subcommand (MVA command)
CROSSTAB Subcommand (MVA command)
MISMATCH Subcommand (MVA command)
DPATTERN Subcommand (MVA command)
MPATTERN Subcommand (MVA command)
TPATTERN Subcommand (MVA command)
LISTWISE Subcommand (MVA command)
PAIRWISE Subcommand (MVA command)
EM Subcommand (MVA command)
REGRESSION Subcommand (MVA command)


CROSSTAB Subcommand (MVA command)

crosstabulation,crosstabulation,crosstabulation
MVA command,MVA command,MVA command
MVA (command),MVA (command),MVA (command)
CROSSTAB subcommand,CROSSTAB subcommand,CROSSTAB subcommand
CROSSTAB (subcommand),CROSSTAB (subcommand),CROSSTAB (subcommand)
MVA command,MVA command,MVA command

CROSSTAB produces a table for each categorical variable, showing the frequency and percentage of values that are present (nonmissing) and the percentage of missing values for each category as related to the other variables.

• No tables are produced if there are no categorical variables.

• Each categorical variable yields a table, whether it is a string variable that is assumed to be categorical or a numeric variable that is declared on the CATEGORICAL subcommand.

• The categories of the categorical variable define the columns of the table.

• Each of the remaining variables defines several rows—one each for the number of values present, the percentage of values present, and the percentage of system-missing values; and one each for the percentage of values defined as each discrete type of user-missing (if they are defined).

PERCENT (keyword),PERCENT (keyword),PERCENT (keyword)
MVA command,MVA command,MVA command
PERCENT=n Omit rows for variables with less than the specified percentage of missing values. You can specify a percentage from 0 to 100. The default is 5, indicating the omission of any variable with less than 5% missing values. If you specify 0, all rows are displayed.

Example

MVA VARIABLES=age income91 childs jazz folk
  /CATEGORICAL=jazz folk
  /CROSSTAB PERCENT=0.

• A table of univariate statistics is displayed by default.

• In the output are two crosstabulations (one crosstabulation for jazz and one crosstabulation for folk). The table for jazz displays, for each category of jazz, the number and percentage of present values for age, income91, childs, and folk. It also displays, for each category of jazz, the percentage of each type of missing value (system-missing and user-missing) in the other variables. The second crosstabulation shows similar counts and percentages for each category of folk.

• No rows are omitted, because PERCENT=0.

Related Topics

MVA
Overview (MVA command)
Syntax Rules (MVA command)
Missing Indicator Variables (MVA command)
VARIABLES Subcommand (MVA command)
CATEGORICAL Subcommand (MVA command)
MAXCAT Subcommand (MVA command)
ID Subcommand (MVA command)
NOUNIVARIATE Subcommand (MVA command)
TTEST Subcommand (MVA command)
Display of Statistics (MVA command)
MISMATCH Subcommand (MVA command)
DPATTERN Subcommand (MVA command)
MPATTERN Subcommand (MVA command)
TPATTERN Subcommand (MVA command)
LISTWISE Subcommand (MVA command)
PAIRWISE Subcommand (MVA command)
EM Subcommand (MVA command)
REGRESSION Subcommand (MVA command)


MISMATCH Subcommand (MVA command)

mismatch,mismatch,mismatch
MVA command,MVA command,MVA command
MVA (command),MVA (command),MVA (command)
MISMATCH subcommand,MISMATCH subcommand,MISMATCH subcommand
MISMATCH (subcommand),MISMATCH (subcommand),MISMATCH (subcommand)
MVA command,MVA command,MVA command

MISMATCH produces a matrix showing percentages of cases for a pair of variables in which one variable has a missing value and the other variable has a nonmissing value (a mismatch). The diagonal elements are percentages of missing values for a single variable, while the off-diagonal elements are the percentage of mismatch of the indicator variables. See the topic Missing Indicator Variables (MVA command) for more information. Rows and columns are sorted on missing patterns.

PERCENT (keyword),PERCENT (keyword),PERCENT (keyword)
MVA command,MVA command,MVA command
NOSORT (keyword),NOSORT (keyword),NOSORT (keyword)
MVA command,MVA command,MVA command
PERCENT=n | Omit patterns involving less than the specified percentage of cases. You can specify a percentage from 0 to 100. The default is 5, indicating the omission of any pattern that is found in less than 5% of the cases.
NOSORT | Suppress sorting of the rows and columns. The order of the variables in the variables list is used. If ALL was used in the variables list, the order is that of the data file.

Related Topics

MVA
Overview (MVA command)
Syntax Rules (MVA command)
Missing Indicator Variables (MVA command)
VARIABLES Subcommand (MVA command)
CATEGORICAL Subcommand (MVA command)
MAXCAT Subcommand (MVA command)
ID Subcommand (MVA command)
NOUNIVARIATE Subcommand (MVA command)
TTEST Subcommand (MVA command)
Display of Statistics (MVA command)
CROSSTAB Subcommand (MVA command)
DPATTERN Subcommand (MVA command)
MPATTERN Subcommand (MVA command)
TPATTERN Subcommand (MVA command)
LISTWISE Subcommand (MVA command)
PAIRWISE Subcommand (MVA command)
EM Subcommand (MVA command)
REGRESSION Subcommand (MVA command)


DPATTERN Subcommand (MVA command)

missing-value patterns,missing-value patterns,missing-value patterns
MVA command,MVA command,MVA command
MVA (command),MVA (command),MVA (command)
DPATTERN subcommand,DPATTERN subcommand,DPATTERN subcommand
DPATTERN (subcommand),DPATTERN (subcommand),DPATTERN (subcommand)
MVA command,MVA command,MVA command

DPATTERN lists the missing values and extreme values for each case symbolically. For a list of the symbols that are used, see Symbols (MVA command).

By default, the cases are listed in the order in which they appear in the file. The following keywords are available:

SORT (keyword),SORT (keyword),SORT (keyword)
MVA command,MVA command,MVA command
DESCRIBE (keyword),DESCRIBE (keyword),DESCRIBE (keyword)
MVA command,MVA command,MVA command
SORT=varname [(order)] | Sort the cases according to the values of the named variables. You can specify more than one variable for sorting. Each sort variable can be in ASCENDING or DESCENDING order. The default order is ASCENDING.
DESCRIBE=varlist | List values of each specified variable for each case.

Example

MVA VARIABLES=populatn density urban religion lifeexpf region
  /CATEGORICAL=region
  /ID=country
  /DPATTERN DESCRIBE=region religion SORT=region.

• In the data pattern table, the variables form the columns, and each case, identified by its country, defines a row.

• Missing and extreme values are indicated in the table, and, for each row, the number missing and percentage of variables that have missing values are listed.

• The values of region and religion are listed at the end of the row for each case.

• The cases are sorted by region in ascending order.

• Univariate statistics are displayed.

Related Topics

MVA
Overview (MVA command)
Syntax Rules (MVA command)
Missing Indicator Variables (MVA command)
VARIABLES Subcommand (MVA command)
CATEGORICAL Subcommand (MVA command)
MAXCAT Subcommand (MVA command)
ID Subcommand (MVA command)
NOUNIVARIATE Subcommand (MVA command)
TTEST Subcommand (MVA command)
Display of Statistics (MVA command)
CROSSTAB Subcommand (MVA command)
MISMATCH Subcommand (MVA command)
MPATTERN Subcommand (MVA command)
TPATTERN Subcommand (MVA command)
LISTWISE Subcommand (MVA command)
PAIRWISE Subcommand (MVA command)
EM Subcommand (MVA command)
REGRESSION Subcommand (MVA command)


MPATTERN Subcommand (MVA command)

MVA (command),MVA (command),MVA (command)
MPATTERN subcommand,MPATTERN subcommand,MPATTERN subcommand
MPATTERN (subcommand),MPATTERN (subcommand),MPATTERN (subcommand)
MVA command,MVA command,MVA command

The MPATTERN subcommand symbolically displays patterns of missing values for cases that have missing values. The variables form the columns. Each case that has any missing values in the specified variables forms a row. The rows are sorted by missing-value patterns. For use of symbols, see Symbols (MVA command).

• The rows are sorted to minimize the differences between missing patterns of consecutive cases.

• The columns are also sorted according to missing patterns of the variables.

The following keywords are available:

NOSORT (keyword),NOSORT (keyword),NOSORT (keyword)
MVA command,MVA command,MVA command
DESCRIBE (keyword),DESCRIBE (keyword),DESCRIBE (keyword)
MVA command,MVA command,MVA command
NOSORT | Suppress the sorting of variables. The order of the variables in the variables list is used. If ALL was used in the variables list, the order is that of the data file.
DESCRIBE=varlist | List values of each specified variable for each case.

Example

MVA VARIABLES=populatn density urban religion lifeexpf region
  /CATEGORICAL=region
  /ID=country
  /MPATTERN DESCRIBE=region religion.

• A table of missing data patterns is produced.

• The region and the religion are named for each listed case.

Related Topics

MVA
Overview (MVA command)
Syntax Rules (MVA command)
Missing Indicator Variables (MVA command)
VARIABLES Subcommand (MVA command)
CATEGORICAL Subcommand (MVA command)
MAXCAT Subcommand (MVA command)
ID Subcommand (MVA command)
NOUNIVARIATE Subcommand (MVA command)
TTEST Subcommand (MVA command)
Display of Statistics (MVA command)
CROSSTAB Subcommand (MVA command)
MISMATCH Subcommand (MVA command)
DPATTERN Subcommand (MVA command)
TPATTERN Subcommand (MVA command)
LISTWISE Subcommand (MVA command)
PAIRWISE Subcommand (MVA command)
EM Subcommand (MVA command)
REGRESSION Subcommand (MVA command)


TPATTERN Subcommand (MVA command)

MVA (command),MVA (command),MVA (command)
TPATTERN subcommand,TPATTERN subcommand,TPATTERN subcommand
TPATTERN (subcommand),TPATTERN (subcommand),TPATTERN (subcommand)
MVA command,MVA command,MVA command

The TPATTERN subcommand displays a tabulated patterns table, which lists the frequency of each missing value pattern. The variables in the variables list form the columns. Each pattern of missing values forms a row, and the frequency of the pattern is displayed.

• An X is used to indicate a missing value.

• The rows are sorted to minimize the differences between missing patterns of consecutive cases.

• The columns are sorted according to missing patterns of the variables.

The following keywords are available:

NOSORT (keyword),NOSORT (keyword),NOSORT (keyword)
MVA command,MVA command,MVA command
DESCRIBE (keyword),DESCRIBE (keyword),DESCRIBE (keyword)
MVA command,MVA command,MVA command
NOSORT | Suppress the sorting of the columns. The order of the variables in the variables list is used. If ALL was used in the variables list, the order is that of the data file.
DESCRIBE=varlist | Display values of variables for each pattern. Categories for each named categorical variable form columns in which the number of each pattern of missing values is tabulated. For quantitative variables, the mean value is listed for the cases having the pattern.
PERCENT=n | Omit patterns that describe less than 1% of the cases. You can specify a percentage from 0 to 100. The default is 1, indicating the omission of any pattern representing less than 1% of the total cases. If you specify 0, all patterns are displayed.

Example

MVA VARIABLES=populatn density urban religion lifeexpf region
  /CATEGORICAL=region
  /TPATTERN NOSORT DESCRIBE=populatn region.

• Missing value patterns are tabulated. Each row displays a missing value pattern and the number of cases having that pattern.

missing value patterns,missing value patterns,missing value patterns
MVA command,MVA command,MVA command

• DESCRIBE causes the mean value of populatn to be listed for each pattern. For the categories in region, the frequency distribution is given for the cases having the pattern in each row.

Related Topics

MVA
Overview (MVA command)
Syntax Rules (MVA command)
Missing Indicator Variables (MVA command)
VARIABLES Subcommand (MVA command)
CATEGORICAL Subcommand (MVA command)
MAXCAT Subcommand (MVA command)
ID Subcommand (MVA command)
NOUNIVARIATE Subcommand (MVA command)
TTEST Subcommand (MVA command)
Display of Statistics (MVA command)
CROSSTAB Subcommand (MVA command)
MISMATCH Subcommand (MVA command)
DPATTERN Subcommand (MVA command)
MPATTERN Subcommand (MVA command)
LISTWISE Subcommand (MVA command)
PAIRWISE Subcommand (MVA command)
EM Subcommand (MVA command)
REGRESSION Subcommand (MVA command)


LISTWISE Subcommand (MVA command)

MVA (command),MVA (command),MVA (command)
LISTWISE subcommand,LISTWISE subcommand,LISTWISE subcommand
LISTWISE (subcommand),LISTWISE (subcommand),LISTWISE (subcommand)
MVA command,MVA command,MVA command

For each quantitative variable in the variables list, the LISTWISE subcommand computes the mean, the covariance between the variables, and the correlation between the variables. The cases that are used in the computations are listwise nonmissing; that is, they have no missing value in any variable that is listed in the VARIABLES subcommand.

Example

MVA VARIABLES=populatn density urban religion lifeexpf region
  /CATEGORICAL=region
  /LISTWISE.

• Means, covariances, and correlations are displayed for populatn, density, urban, and lifeexpf. Only cases that have values for all of these variables are used.

Related Topics

MVA
Overview (MVA command)
Syntax Rules (MVA command)
Missing Indicator Variables (MVA command)
VARIABLES Subcommand (MVA command)
CATEGORICAL Subcommand (MVA command)
MAXCAT Subcommand (MVA command)
ID Subcommand (MVA command)
NOUNIVARIATE Subcommand (MVA command)
TTEST Subcommand (MVA command)
Display of Statistics (MVA command)
CROSSTAB Subcommand (MVA command)
MISMATCH Subcommand (MVA command)
DPATTERN Subcommand (MVA command)
MPATTERN Subcommand (MVA command)
TPATTERN Subcommand (MVA command)
PAIRWISE Subcommand (MVA command)
EM Subcommand (MVA command)
REGRESSION Subcommand (MVA command)


PAIRWISE Subcommand (MVA command)

MVA (command),MVA (command),MVA (command)
PAIRWISE subcommand,PAIRWISE subcommand,PAIRWISE subcommand
PAIRWISE (subcommand),PAIRWISE (subcommand),PAIRWISE (subcommand)
MVA command,MVA command,MVA command

For each pair of quantitative variables, the PAIRWISE subcommand computes the number of pairwise nonmissing values, the pairwise means, the pairwise standard deviations, the pairwise covariances, and the pairwise correlation matrices. These results are organized as matrices. The cases that are used are all cases having nonmissing values for the pair of variables for which each computation is done.

Example

MVA VARIABLES=populatn density urban religion lifeexpf region
  /CATEGORICAL=region
  /PAIRWISE.

• Frequencies, means, standard deviations, covariances, and the correlations are displayed for populatn, density, urban, and lifeexpf. Each calculation uses all cases that have values for both variables under consideration.

Related Topics

MVA
Overview (MVA command)
Syntax Rules (MVA command)
Missing Indicator Variables (MVA command)
VARIABLES Subcommand (MVA command)
CATEGORICAL Subcommand (MVA command)
MAXCAT Subcommand (MVA command)
ID Subcommand (MVA command)
NOUNIVARIATE Subcommand (MVA command)
TTEST Subcommand (MVA command)
Display of Statistics (MVA command)
CROSSTAB Subcommand (MVA command)
MISMATCH Subcommand (MVA command)
DPATTERN Subcommand (MVA command)
MPATTERN Subcommand (MVA command)
TPATTERN Subcommand (MVA command)
LISTWISE Subcommand (MVA command)
EM Subcommand (MVA command)
REGRESSION Subcommand (MVA command)


EM Subcommand (MVA command)

expectation maximization,expectation maximization,expectation maximization
see EM estimates,see EM estimates,see EM estimates
EM,EM,EM
MVA command,MVA command,MVA command
MVA (command),MVA (command),MVA (command)
EM subcommand,EM subcommand,EM subcommand
EM (subcommand),EM (subcommand),EM (subcommand)
MVA command,MVA command,MVA command

The EM subcommand uses an EM (expectation-maximization) algorithm to estimate the means, the covariances, and the Pearson correlations of quantitative variables. This process is an iterative process, which uses two steps for each iteration. The E step computes expected values conditional on the observed data and the current estimates of the parameters. The M step calculates maximum-likelihood estimates of the parameters based on values that are computed in the E step.

• If no variables are listed in the EM subcommand, estimates are performed for all quantitative variables in the variables list.

• If you want to limit the estimation to a subset of the variables in the list, specify a subset of quantitative variables to be estimated after the subcommand name EM. You can also list, after the keyword WITH, the quantitative variables to be used in estimating.

• The output includes tables of means, correlations, and covariances.

• The estimation, by default, assumes that the data are normally distributed. However, you can specify a multivariate t distribution with a specified number of degrees of freedom or a mixed normal distribution with any mixture proportion (PROPORTION) and any standard deviation ratio (LAMBDA).

• You can save a data file with the missing values filled in. You must specify a filename and its complete path in single or double quotation marks.

• Criteria keywords and OUTFILE specifications must be enclosed in a single pair of parentheses.

The criteria for the EM subcommand are as follows:

TOLERANCE (keyword),TOLERANCE (keyword),TOLERANCE (keyword)
MVA command,MVA command,MVA command
CONVERGE (keyword),CONVERGE (keyword),CONVERGE (keyword)
MVA command,MVA command,MVA command
ITERATIONS (keyword),ITERATIONS (keyword),ITERATIONS (keyword)
MVA command,MVA command,MVA command
TOLERANCE=value | Numerical accuracy control. Helps eliminate predictor variables that are highly correlated with other predictor variables and would reduce the accuracy of the matrix inversions that are involved in the calculations. The smaller the tolerance, the more inaccuracy is tolerated. The default value is 0.001.
CONVERGENCE=value | Convergence criterion. Determines when iteration ceases. If the relative change in the likelihood function is less than this value, convergence is assumed. The value of this ratio must be between 0 and 1. The default value is 0.0001.
ITERATIONS=n | Maximum number of iterations. Limits the number of iterations in the EM algorithm. Iteration stops after this many iterations even if the convergence criterion is not satisfied. The default value is 25.

Possible distribution assumptions are as follows:

TDF (keyword),TDF (keyword),TDF (keyword)
MVA command,MVA command,MVA command
LAMBDA (keyword),LAMBDA (keyword),LAMBDA (keyword)
MVA command,MVA command,MVA command
PROPORTION (keyword),PROPORTION (keyword),PROPORTION (keyword)
MVA command,MVA command,MVA command
TDF=n | Student’s t distribution with n degrees of freedom. The degrees of freedom must be specified if you use this keyword. The degrees of freedom must be an integer that is greater than or equal to 2.
LAMBDA=a | Ratio of standard deviations of a mixed normal distribution. Any positive real number can be specified.
PROPORTION=b | Mixture proportion of two normal distributions. Any real number between 0 and 1 can specify the mixture proportion of two normal distributions.

The following keyword produces a new data file:

MVA (command),MVA (command),MVA (command)
saving imputed data,saving imputed data,saving imputed data
OUTFILE (keyword),OUTFILE (keyword),OUTFILE (keyword)
MVA command,MVA command,MVA command
OUTFILE='file' Specify a filename or previously declared dataset name. Filenames should be enclosed in quotation marks and are stored in the working directory unless a path is included as part of the file specification. Datasets are available during the current session but are not available in subsequent sessions unless you explicitly save them as data files. Missing values for predicted variables in the file are filled in by using the EM algorithm. (Note that the data that are completed with EM-based imputations will not in general reproduce the EM estimates from MVA.)

Examples

MVA VARIABLES=males to tuition
 /EM (OUTFILE='/colleges/emdata.sav').

• All variables on the variables list are included in the estimations.

• The output includes the means of the listed variables, a correlation matrix, and a covariance matrix.

• A new data file named emdata.sav with imputed values is saved in the /colleges directory.

MVA VARIABLES=all
 /EM males msport WITH males msport gradrate facratio.

• For males and msport, the output includes a vector of means, a correlation matrix, and a covariance matrix.

• The values in the tables are calculated by using imputed values for males and msport. Existing observations for males, msport, gradrate, and facratio are used to impute the values that are used to estimate the means, correlations, and covariances.

MVA VARIABLES=males to tuition
 /EM verbal math WITH males msport gradrate facratio
  (TDF=3 OUTFILE '/colleges/emdata.sav').

• The analysis uses a t distribution with three degrees of freedom.

• A new data file named emdata.sav with imputed values is saved in the /colleges directory.

Related Topics

MVA
Overview (MVA command)
Syntax Rules (MVA command)
Missing Indicator Variables (MVA command)
VARIABLES Subcommand (MVA command)
CATEGORICAL Subcommand (MVA command)
MAXCAT Subcommand (MVA command)
ID Subcommand (MVA command)
NOUNIVARIATE Subcommand (MVA command)
TTEST Subcommand (MVA command)
Display of Statistics (MVA command)
CROSSTAB Subcommand (MVA command)
MISMATCH Subcommand (MVA command)
DPATTERN Subcommand (MVA command)
MPATTERN Subcommand (MVA command)
TPATTERN Subcommand (MVA command)
LISTWISE Subcommand (MVA command)
PAIRWISE Subcommand (MVA command)
REGRESSION Subcommand (MVA command)


REGRESSION Subcommand (MVA command)

regression estimates,regression estimates,regression estimates
MVA command,MVA command,MVA command
MVA (command),MVA (command),MVA (command)
REGRESSION subcommand,REGRESSION subcommand,REGRESSION subcommand
REGRESSION (subcommand),REGRESSION (subcommand),REGRESSION (subcommand)
MVA command,MVA command,MVA command

The REGRESSION subcommand estimates missing values by using multiple linear regression. It can add a random component to the regression estimate. Output includes estimates of means, a covariance matrix, and a correlation matrix of the variables that are specified as predicted.

• By default, all of the variables that are specified as predictors (after WITH) are used in the estimation, but you can limit the number of predictors (independent variables) by using NPREDICTORS.

• Predicted and predictor variables, if specified, must be quantitative.

• By default, REGRESSION adds the observed residuals of a randomly selected complete case to the regression estimates. However, you can specify that the program add random normal, t, or no variates instead. The normal and t distributions are properly scaled, and the degrees of freedom can be specified for the t distribution.

• If the number of complete cases is less than half the total number of cases, the default ADDTYPE is NORMAL instead of RESIDUAL.

• You can save a data file with the missing values filled in. You must specify a filename and its complete path in single or double quotation marks.

• The criteria and OUTFILE specifications for the REGRESSION subcommand must be enclosed in a single pair of parentheses.

The criteria for the REGRESSION subcommand are as follows:

TOLERANCE (keyword),TOLERANCE (keyword),TOLERANCE (keyword)
MVA command,MVA command,MVA command
FLIMIT (keyword),FLIMIT (keyword),FLIMIT (keyword)
MVA command,MVA command,MVA command
NPREDICTORS (keyword),NPREDICTORS (keyword),NPREDICTORS (keyword)
MVA command,MVA command,MVA command
ADDTYPE (keyword),ADDTYPE (keyword),ADDTYPE (keyword)
MVA command,MVA command,MVA command
RESIDUAL (keyword),RESIDUAL (keyword),RESIDUAL (keyword)
MVA command,MVA command,MVA command
NORMAL (keyword),NORMAL (keyword),NORMAL (keyword)
MVA command,MVA command,MVA command
T (keyword),T (keyword),T (keyword)
MVA command,MVA command,MVA command
TOLERANCE=value | Numerical accuracy control. Helps eliminate predictor variables that are highly correlated with other predictor variables and would reduce the accuracy of the matrix inversions that are involved in the calculations. If a variable passes the tolerance criterion, it is eligible for inclusion. The smaller the tolerance, the more inaccuracy is tolerated. The default value is 0.001.
FLIMIT=n | F-to-enter limit. The minimum value of the F statistic that a variable must achieve in order to enter the regression estimation. You may want to change this limit, depending on the number of variables and the correlation structure of the data. The default value is 4.
NPREDICTORS=n | Maximum number of predictor variables. Limits the total number of predictors in the analysis. The analysis uses the stepwise selected n best predictors, entered in accordance with the tolerance. If n=0, it is equivalent to replacing each variable with its mean.
ADDTYPE | Type of distribution from which the error term is randomly drawn. Random errors can be added to the regression estimates before the means, correlations, and covariances are calculated. You can specify one of the following types:
 | RESIDUAL. Error terms are chosen randomly from the observed residuals of complete cases to be added to the regression estimates.
 | NORMAL. Error terms are randomly drawn from a distribution with the expected value 0 and the standard deviation equal to the square root of the mean squared error term (sometimes called the root mean squared error, or RMSE) of the regression.
 | T(n). Error terms are randomly drawn from the t(n) distribution and scaled by the RMSE. The degrees of freedom can be specified in parentheses. If T is specified without a value, the default degrees of freedom is 5.
 | NONE. Estimates are made from the regression model with no error term added.

The following keyword produces a new data file:

OUTFILE (keyword),OUTFILE (keyword),OUTFILE (keyword)
MVA command,MVA command,MVA command
OUTFILE Specify a filename or previously declared dataset name. Filenames should be enclosed in quotation marks and are stored in the working directory unless a path is included as part of the file specification. Datasets are available during the current session but are not available in subsequent sessions unless you explicitly save them as data files. Missing values for the dependent variables in the file are imputed (filled in) by using the regression algorithm.

Examples

MVA VARIABLES=males to tuition
 /REGRESSION (OUTFILE='/colleges/regdata.sav').

• All variables in the variables list are included in the estimations.

• The output includes the means of the listed variables, a correlation matrix, and a covariance matrix.

• A new data file named regdata.sav with imputed values is saved in the /colleges directory.

MVA VARIABLES=males to tuition
 /REGRESSION males verbal math WITH males verbal math faculty
  (ADDTYPE = T(7)).

• The output includes the means of the listed variables, a correlation matrix, and a covariance matrix.

MVA (command),MVA (command),MVA (command)

• A t distribution with 7 degrees of freedom is used to produce the randomly assigned additions to the estimates.

Related Topics

MVA
Overview (MVA command)
Syntax Rules (MVA command)
Missing Indicator Variables (MVA command)
VARIABLES Subcommand (MVA command)
CATEGORICAL Subcommand (MVA command)
MAXCAT Subcommand (MVA command)
ID Subcommand (MVA command)
NOUNIVARIATE Subcommand (MVA command)
TTEST Subcommand (MVA command)
Display of Statistics (MVA command)
CROSSTAB Subcommand (MVA command)
MISMATCH Subcommand (MVA command)
DPATTERN Subcommand (MVA command)
MPATTERN Subcommand (MVA command)
TPATTERN Subcommand (MVA command)
LISTWISE Subcommand (MVA command)
PAIRWISE Subcommand (MVA command)
EM Subcommand (MVA command)


N OF CASES

case selection,case selection,case selection
cases,cases,cases
selecting subsets,selecting subsets,selecting subsets
cases,cases,cases
limiting,limiting,limiting
N OF CASES (command),N OF CASES (command),N OF CASES (command)
N OF CASES n

This command takes effect immediately. It does not read the active dataset or execute pending transformations. See the topic Command Order for more information.

Example

N OF CASES 100.

Related Topics

Overview (N OF CASES command)


Overview (N OF CASES command)

TEMPORARY (command),TEMPORARY (command),TEMPORARY (command)
with N OF CASES command,with N OF CASES command,with N OF CASES command
N OF CASES (command),N OF CASES (command),N OF CASES (command)
with TEMPORARY command,with TEMPORARY command,with TEMPORARY command
SAMPLE (command),SAMPLE (command),SAMPLE (command)
with N OF CASES command,with N OF CASES command,with N OF CASES command
N OF CASES (command),N OF CASES (command),N OF CASES (command)
with SAMPLE command,with SAMPLE command,with SAMPLE command
SELECT IF (command),SELECT IF (command),SELECT IF (command)
with N OF CASES command,with N OF CASES command,with N OF CASES command
N OF CASES (command),N OF CASES (command),N OF CASES (command)
with SELECT IF command,with SELECT IF command,with SELECT IF command

N OF CASES (alias N) limits the number of cases in the active dataset to the first n cases.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is N OF CASES followed by at least one space and a positive integer. Cases in the active dataset are limited to the specified number.

Syntax Rules Collapse Hide details

Syntax Rules

• To limit the number of cases for the next procedure only, use the TEMPORARY command before N OF CASES (see TEMPORARY).

• In some versions of the program, N OF CASES can be specified only after a active dataset is defined.

Operations Collapse Hide details

Operations

• N OF CASES takes effect as soon as it is encountered in the command sequence. Thus, special attention should be paid to the position of N OF CASES among commands. See the topic Command Order for more information.

• N OF CASES limits the number of cases that are analyzed by all subsequent procedures in the session. The active dataset will have no more than n cases after the first data pass following the N OF CASES command. Any subsequent N OF CASES command that specifies a greater number of cases will be ignored.

• If N OF CASES specifies more cases than can actually be built, the program builds as many cases as possible.

• If N OF CASES is used with SAMPLE or SELECT IF, the program reads as many records as required to build the specified n cases. It makes no difference whetherN OF CASES precedes or follows SAMPLE or SELECT IF.

Example

GET FILE='/data/city.sav'.
N 100.

• N OF CASES limits the number of cases on the active dataset to the first 100 cases. Cases are limited for all subsequent analyses.

Example

DATA LIST FILE='/data/prsnnl.txt'
  / NAME 1-20 (A) AGE 22-23 SALARY 25-30.
N 25.
SELECT IF (SALARY GT 20000).
LIST.

• DATA LIST defines variables from file prsnnl.txt.

• N OF CASES limits the active dataset to 25 cases after cases have been selected by SELECT IF.

• SELECT IF selects only cases in which SALARY is greater than $20,000.

• LIST produces a listing of the cases in the active dataset. If the original active dataset has fewer than 25 cases in which SALARY is greater than 20,000, fewer than 25 cases will be listed.

Example

DATA LIST FILE='/data/prsnnl.txt'
  / NAME 1-20 (A) AGE 22-23 SALARY 25-30 DEPT 32.
LIST.
TEMPORARY.
N 25.
FREQUENCIES VAR=SALARY.
N 50.
FREQUENCIES VAR=AGE.
REPORT FORMAT=AUTO /VARS=NAME AGE SALARY /BREAK=DEPT
  /SUMMARY=MEAN.

• The first N OF CASES command is temporary. Only 25 cases are used in the first FREQUENCIES procedure.

• The second N OF CASES command is permanent. The second frequency table and the report are based on 50 cases from file prsnnl.txt. The active dataset now contains 50 cases (assuming that the original active dataset had at least that many cases).

Related Topics

N OF CASES


NAIVEBAYES

NAIVEBAYES (command),NAIVEBAYES (command),NAIVEBAYES (command)
NAIVEBAYES (command),NAIVEBAYES (command),NAIVEBAYES (command)
syntax chart,syntax chart,syntax chart
release history,release history,release history
Naïve Bayes,Naïve Bayes,Naïve Bayes
command syntax,command syntax,command syntax

NAIVEBAYES is available in PASW Statistics Server.

NAIVEBAYES dependent variable BY factor list WITH covariate list

[/EXCEPT VARIABLES=varlist]

[/FORCE [FACTORS=varlist] [COVARIATES=varlist]]

[/TRAININGSAMPLE {PERCENT=number  }]
                 {VARIABLE=varname}

[/SUBSET {MAXSIZE={AUTO** } [(BESTSUBSET={PSEUDOBIC })]}]
                  {integer}              {TESTDATA  }
         {EXACTSIZE=integer                          }
         {NOSELECTION                                }

[/CRITERIA [BINS={10**   }]
                 {integer}
           [MEMALLOCATE {1024** }]
                        {number }
           [TIMER={5**   }]]
                  {number}

[/MISSING USERMISSING={EXCLUDE**}]
                      {INCLUDE  }

[/PRINT [CPS**]  [EXCLUDED**]  [SUMMARY**]
        [SELECTED**]  [CLASSIFICATION**]
        [NONE]]

[/SAVE [PREDVAL[(varname)]]
       [PREDPROB[(rootname[:{25     }])]]]
                            {integer}

[/OUTFILE MODEL=file]

** Default if the subcommand or keyword is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See NAIVE BAYES Algorithms for computational details for this procedure.

Release History Collapse Hide details

Release History

Release 14.0

• Command introduced.

Example

NAIVEBAYES default.

Related Topics

Overview (NAIVEBAYES command)
Examples (NAIVEBAYES command)
Variable Lists (NAIVEBAYES command)
EXCEPT Subcommand (NAIVEBAYES command)
FORCE Subcommand (NAIVEBAYES command)
TRAININGSAMPLE Subcommand (NAIVEBAYES command)
SUBSET Subcommand (NAIVEBAYES command)
CRITERIA Subcommand (NAIVEBAYES command)
MISSING Subcommand (NAIVEBAYES command)
PRINT Subcommand (NAIVEBAYES command)
SAVE Subcommand (NAIVEBAYES command)
OUTFILE Subcommand (NAIVEBAYES command)


Overview (NAIVEBAYES command)

The NAIVEBAYES procedure can be used in three ways:

1. Predictor selection followed by model building. The procedure submits a set of predictor variables and selects a smaller subset. Based on the Naïve Bayes model for the selected predictors, the procedure then classifies cases.

2. Predictor selection only. The procedure selects a subset of predictors for use in subsequent predictive modeling procedures but does not report classification results.

3. Model building only. The procedure fits the Naïve Bayes classification model by using all input predictors.

NAIVEBAYES is available for categorical dependent variables only and is not intended for use with a very large number of predictors.

Options Collapse Hide details

Options

Methods. The NAIVEBAYES procedure performs predictor selection followed by model building, or the procedure performs predictor selection only, or the procedure performs model building only.

Training and test data. NAIVEBAYES optionally divides the dataset into training and test samples. Predictor selection uses the training data to compute the underlying model, and either the training or the test data can be used to determine the “best” subset of predictors. If the dataset is partitioned, classification results are given for both the training and test samples. Otherwise, results are given for the training sample only.

Binning. The procedure automatically distributes scale predictors into 10 bins, but the number of bins can be changed.

Memory allocation. The NAIVEBAYES procedure automatically allocates 128MB of memory for storing training records when computing average log-likelihoods. The amount of memory that is allocated for this task can be modified.

Timer. The procedure automatically limits processing time to 5 minutes, but a different time limit can be specified.

Maximum or exact subset size. Either a maximum or an exact size can be specified for the subset of selected predictors. If a maximum size is used, the procedure creates a sequence of subsets, from an initial (smaller) subset to the maximum-size subset. The procedure then selects the “best” subset from this sequence.

Missing values. Cases with missing values for the dependent variable or for all predictors are excluded. The NAIVEBAYES procedure has an option for treating user-missing values of categorical variables as valid. User-missing values of scale variables are always treated as invalid.

Output. NAIVEBAYES displays pivot table output by default but offers an option for suppressing most such output. The procedure displays the lists of selected categorical and scale predictors in a text block. These lists can be copied for use in subsequent modeling procedures. The NAIVEBAYES procedure also optionally saves predicted values and probabilities based on the Naïve Bayes model.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is the NAIVEBAYES command followed by a dependent variable.

By default, NAIVEBAYES treats all variables — except the dependent variable and the weight variable if it is defined — as predictors, with the dictionary setting of each predictor determining its measurement level. NAIVEBAYES selects the “best” subset of predictors (based on the Naïve Bayes model) and then classifies cases by using the selected predictors. User-missing values are excluded and pivot table output is displayed by default.

Syntax Rules Collapse Hide details

Syntax Rules

• All subcommands are optional.

• Subcommands may be specified in any order.

• Only a single instance of each subcommand is allowed.

• An error occurs if a keyword is specified more than once within a subcommand.

• Parentheses, equal signs, and slashes that are shown in the syntax chart are required.

• The command name, subcommand names, and keywords must be spelled in full.

• Empty subcommands are not honored.

Operations Collapse Hide details

Operations

The NAIVEBAYES procedure automatically excludes cases and predictors with any of the following properties:

• Cases with a missing value for the dependent variable.

• Cases with missing values for all predictors.

• Predictors with missing values for all cases.

• Predictors with the same value for all cases.

The NAIVEBAYES procedure requires predictors to be categorical. Any scale predictors that are input to the procedure are temporarily binned into categorical variables for the procedure.

If predictor selection is used, the NAIVEBAYES procedure selects a subset of predictors that “best” predict the dependent variable, based on the training data. The procedure first creates a sequence of subsets, with an increasing number of predictors in each subset. The predictor that is added to each subsequent subset is the predictor that increases the average log-likelihood the most. The procedure uses simulated data to compute the average log-likelihood when the training dataset cannot fit into memory.

The final subset is obtained by using one of two approaches:

• By default, a maximum subset size is used. This approach creates a sequence of subsets from the initial subset to the maximum-size subset. The “best” subset is chosen by using a BIC-like criterion or a test data criterion.

• A particular subset size may be used to select the subset with the specified size.

If model building is requested, the NAIVEBAYES procedure classifies cases based on the Naïve Bayes model for the input or selected predictors, depending on whether predictor selection is requested. For a given case, the classification—or predicted category—is the dependent variable category with the highest posterior probability.

The NAIVEBAYES procedure uses the PASW Statistics random number generator in the following two scenarios: (1) if a percentage of cases in the active dataset is randomly assigned to the test dataset, and (2) if the procedure creates simulated data to compute the average log-likelihood when the training records cannot fit into memory. To ensure that the same results are obtained regardless of which scenario is in effect when NAIVEBAYES is invoked repeatedly, specify a seed on the SET command. If a seed is not specified, a default random seed is used, and results may differ across runs of the NAIVEBAYES procedure.

Frequency Weight Collapse Hide details

Frequency Weight

If a WEIGHT variable is in effect, its values are used as frequency weights by the NAIVEBAYES procedure.

• Cases with missing weights or weights that are less than 0.5 are not used in the analyses.

• The weight values are rounded to the nearest whole numbers before use. For example, 0.5 is rounded to 1, and 2.4 is rounded to 2.

Limitations Collapse Hide details

Limitations

SPLIT FILE settings are ignored by the NAIVEBAYES procedure.

Related Topics

NAIVEBAYES
Examples (NAIVEBAYES command)
Variable Lists (NAIVEBAYES command)
EXCEPT Subcommand (NAIVEBAYES command)
FORCE Subcommand (NAIVEBAYES command)
TRAININGSAMPLE Subcommand (NAIVEBAYES command)
SUBSET Subcommand (NAIVEBAYES command)
CRITERIA Subcommand (NAIVEBAYES command)
MISSING Subcommand (NAIVEBAYES command)
PRINT Subcommand (NAIVEBAYES command)
SAVE Subcommand (NAIVEBAYES command)
OUTFILE Subcommand (NAIVEBAYES command)


Examples (NAIVEBAYES command)

Predictor selection followed by model building

NAIVEBAYES default
  /EXCEPT VARIABLES=preddef1 preddef2 preddef3 training
  /TRAININGSAMPLE VARIABLE=training
  /SAVE PREDVAL PREDPROB.

• This analysis specifies default as the response variable.

• All other variables are to be considered as possible predictors, with the exception of preddef1, preddef2, preddef3, and training.

• Cases with a value of 1 on the variable training are assigned to the training sample and used to create the series of predictor subsets, while all other cases are assigned to the test sample and used to select the "best" subset.

• Model-predicted values of default are saved to the variable PredictedValue.

• Model-estimated probabilities for the values of default are saved to the variables PredictedProbability_1 and PredictedProbability_2.

For discussion of output from this syntax and to place the example in context, see Using Naive Bayes for Predictor Selection and Classification

Predictor selection only

NAIVEBAYES default
  /EXCEPT VARIABLES=preddef1 preddef2 preddef3 validate
  /TRAININGSAMPLE VARIABLE=validate
  /SUBSET EXACTSIZE=5
  /PRINT CLASSIFICATION=NO.

• The NAIVEBAYES procedure treats default as the dependent variable and selects a subset of five predictors from all other variables, with the exception of preddef1, preddef2, preddef3, and validate.

Model building only

NAIVEBAYES response_01
  BY addresscat callcard callid callwait card card2 churn
      commutecarpool confer ebill edcat equip forward internet
      multline owngame ownipod ownpc spousedcat tollfree voice
  WITH cardmon ed equipmon equipten lncardmon lntollmon
      pets_saltfish spoused tollmon tollten
  /SUBSET NOSELECTION
  /SAVE PREDPROB.

• This analysis specifies response_01 as the response variable.

• Variables following the BY keyword are treated as categorical predictors, while those following the WITH keyword are treated as scale.

• The SUBSET subcommand specifies that the procedure should not perform predictor selection. All specified predictors are to be used in creating the classification.

• Model-estimated probabilities for the values of response_01 are saved to the variables PredictedProbability_1 and PredictedProbability_2.

For discussion of output from this syntax and to place the example in context, see Using Naive Bayes to Classify Respondents

Related Topics

NAIVEBAYES
Overview (NAIVEBAYES command)
Variable Lists (NAIVEBAYES command)
EXCEPT Subcommand (NAIVEBAYES command)
FORCE Subcommand (NAIVEBAYES command)
TRAININGSAMPLE Subcommand (NAIVEBAYES command)
SUBSET Subcommand (NAIVEBAYES command)
CRITERIA Subcommand (NAIVEBAYES command)
MISSING Subcommand (NAIVEBAYES command)
PRINT Subcommand (NAIVEBAYES command)
SAVE Subcommand (NAIVEBAYES command)
OUTFILE Subcommand (NAIVEBAYES command)


Variable Lists (NAIVEBAYES command)

The variable lists specify the dependent variable, any categorical predictors (also known as factors), and any scale predictors (also known as covariates).

• The dependent variable must be the first specification on the NAIVEBAYES command.

• The dependent variable may not be the weight variable.

• The dependent variable is the only required specification on the NAIVEBAYES command.

• The dependent variable must have a dictionary setting of ordinal or nominal. In either case, NAIVEBAYES treats the dependent variable as categorical.

• The names of the factors, if any, must be preceded by the keyword BY.

• If keyword BY is specified with no factors, a warning is issued and the keyword is ignored.

• The names of covariates must be preceded by the keyword WITH.

• If keyword WITH is specified with no covariates, a warning is issued and the keyword is ignored.

• If the dependent variable or the weight variable is specified within a factor list or a covariate list, the variable is ignored in the list.

• All variables that are specified within a factor or covariate list must be unique. If duplicate variables are specified within a list, the duplicates are ignored.

• If duplicate variables are specified across the factor and covariate lists, an error is issued.

• The universal keywords TO and ALL may be specified in the factor and covariate lists.

• If the BY and WITH keywords are not specified, all variables in the active dataset—except the dependent variable, the weight variable, and any variables that are specified on the EXCEPT subcommand—are treated as predictors. If the dictionary setting of a predictor is nominal or ordinal, the predictor is treated as a factor. If the dictionary setting is scale, the predictor is treated as a covariate. (Note that any variables on the FORCE subcommand are still forced into each subset of selected predictors.)

• The dependent variable and factor variables can be numeric or string.

• The covariates must be numeric.

Related Topics

NAIVEBAYES
Overview (NAIVEBAYES command)
Examples (NAIVEBAYES command)
EXCEPT Subcommand (NAIVEBAYES command)
FORCE Subcommand (NAIVEBAYES command)
TRAININGSAMPLE Subcommand (NAIVEBAYES command)
SUBSET Subcommand (NAIVEBAYES command)
CRITERIA Subcommand (NAIVEBAYES command)
MISSING Subcommand (NAIVEBAYES command)
PRINT Subcommand (NAIVEBAYES command)
SAVE Subcommand (NAIVEBAYES command)
OUTFILE Subcommand (NAIVEBAYES command)


EXCEPT Subcommand (NAIVEBAYES command)

NAIVEBAYES (command),NAIVEBAYES (command),NAIVEBAYES (command)
EXCEPT subcommand,EXCEPT subcommand,EXCEPT subcommand
EXCEPT (subcommand),EXCEPT (subcommand),EXCEPT (subcommand)
NAIVEBAYES command,NAIVEBAYES command,NAIVEBAYES command

The EXCEPT subcommand lists any variables that the NAIVEBAYES procedure should exclude from the factor or covariate lists on the command line. This subcommand is useful if the factor or covariate lists contain a large number of variables--specified by using the TO or ALL keyword, for example--but a few variables (e.g., Case ID or a weight variable) should be excluded.

• The EXCEPT subcommand ignores the following types of variables if they are specified: Duplicate variables; the dependent variable; variables that are not specified on the command line’s factor or covariate lists; and variables that are specified on the FORCE subcommand.

• There is no default variable list on the EXCEPT subcommand.

Related Topics

NAIVEBAYES
Overview (NAIVEBAYES command)
Examples (NAIVEBAYES command)
Variable Lists (NAIVEBAYES command)
FORCE Subcommand (NAIVEBAYES command)
TRAININGSAMPLE Subcommand (NAIVEBAYES command)
SUBSET Subcommand (NAIVEBAYES command)
CRITERIA Subcommand (NAIVEBAYES command)
MISSING Subcommand (NAIVEBAYES command)
PRINT Subcommand (NAIVEBAYES command)
SAVE Subcommand (NAIVEBAYES command)
OUTFILE Subcommand (NAIVEBAYES command)


FORCE Subcommand (NAIVEBAYES command)

NAIVEBAYES (command),NAIVEBAYES (command),NAIVEBAYES (command)
FORCE subcommand,FORCE subcommand,FORCE subcommand
FORCE (subcommand),FORCE (subcommand),FORCE (subcommand)
NAIVEBAYES command,NAIVEBAYES command,NAIVEBAYES command

The FORCE subcommand specifies any predictors that will be in the initial predictor subset and all subsequent predictor subsets. The specified predictors are considered important and will be in the final subset irrespective of any other chosen predictors.

• Variables that are specified on the FORCE subcommand do not need to be specified in the variable lists on the command line.

• The FORCE subcommand overrides variable lists on the command line and overrides the EXCEPT subcommand. If a variable specified on the FORCE subcommand is also specified on the command line or the EXCEPT subcommand, the variable is forced into all subsets.

• There is no default list of forced variables; the default initial subset is the empty set.

FACTORS (keyword),FACTORS (keyword),FACTORS (keyword)
NAIVEBAYES command,NAIVEBAYES command,NAIVEBAYES command
FACTORS Keyword Collapse Hide details

FACTORS Keyword

The FACTORS keyword specifies any factors that should be forced into each subset.

• If duplicate variables are specified, the duplicates are ignored.

• The specified variables may not include the dependent variable, the weight variable, or any variable that is specified on the COVARIATES keyword.

• Specified variables may be numeric or string.

COVARIATES (keyword),COVARIATES (keyword),COVARIATES (keyword)
NAIVEBAYES command,NAIVEBAYES command,NAIVEBAYES command
COVARIATES Keyword Collapse Hide details

COVARIATES Keyword

The COVARIATES keyword specifies any covariates that should be forced into each subset.

• If duplicate variables are specified, the duplicates are ignored.

• The specified variables may not include the dependent variable, the weight variable, or any variable that is specified on the FACTORS keyword.

• Specified variables must be numeric.

Related Topics

NAIVEBAYES
Overview (NAIVEBAYES command)
Examples (NAIVEBAYES command)
Variable Lists (NAIVEBAYES command)
EXCEPT Subcommand (NAIVEBAYES command)
TRAININGSAMPLE Subcommand (NAIVEBAYES command)
SUBSET Subcommand (NAIVEBAYES command)
CRITERIA Subcommand (NAIVEBAYES command)
MISSING Subcommand (NAIVEBAYES command)
PRINT Subcommand (NAIVEBAYES command)
SAVE Subcommand (NAIVEBAYES command)
OUTFILE Subcommand (NAIVEBAYES command)


TRAININGSAMPLE Subcommand (NAIVEBAYES command)

NAIVEBAYES (command),NAIVEBAYES (command),NAIVEBAYES (command)
TRAININGSAMPLE subcommand,TRAININGSAMPLE subcommand,TRAININGSAMPLE subcommand
TRAININGSAMPLE (subcommand),TRAININGSAMPLE (subcommand),TRAININGSAMPLE (subcommand)
NAIVEBAYES command,NAIVEBAYES command,NAIVEBAYES command

The TRAININGSAMPLE subcommand indicates the method of partitioning the active dataset into training and test samples. You can specify either a percentage of cases to assign to the training sample, or you can specify a variable that indicates whether a case is assigned to the training sample.

• If TRAININGSAMPLE is not specified, all cases in the active dataset are treated as training data records.

PERCENT (keyword),PERCENT (keyword),PERCENT (keyword)
NAIVEBAYES command,NAIVEBAYES command,NAIVEBAYES command
PERCENT Keyword Collapse Hide details

PERCENT Keyword

The PERCENT keyword specifies the percentage of cases in the active dataset to randomly assign to the training sample. All other cases are assigned to the test sample. The percentage must be a number that is greater than 0 and less than 100. There is no default percentage.

If a weight variable is defined, the PERCENT keyword may not be used.

VARIABLE (keyword),VARIABLE (keyword),VARIABLE (keyword)
NAIVEBAYES command,NAIVEBAYES command,NAIVEBAYES command
VARIABLE Keyword Collapse Hide details

VARIABLE Keyword

The VARIABLE keyword specifies a variable that indicates which cases in the active dataset are assigned to the training sample. Cases with a value of 1 on the variable are assigned to the training sample. All other cases are assigned to the test sample.

• The specified variable may not be the dependent variable, the weight variable, any variable that is specified in the factor or covariate lists of the command line, or any variable that is specified in the factor or covariate lists of the FORCE subcommand.

• The variable must be numeric.

Related Topics

NAIVEBAYES
Overview (NAIVEBAYES command)
Examples (NAIVEBAYES command)
Variable Lists (NAIVEBAYES command)
EXCEPT Subcommand (NAIVEBAYES command)
FORCE Subcommand (NAIVEBAYES command)
SUBSET Subcommand (NAIVEBAYES command)
CRITERIA Subcommand (NAIVEBAYES command)
MISSING Subcommand (NAIVEBAYES command)
PRINT Subcommand (NAIVEBAYES command)
SAVE Subcommand (NAIVEBAYES command)
OUTFILE Subcommand (NAIVEBAYES command)


SUBSET Subcommand (NAIVEBAYES command)

NAIVEBAYES (command),NAIVEBAYES (command),NAIVEBAYES (command)
SUBSET subcommand,SUBSET subcommand,SUBSET subcommand
SUBSET (subcommand),SUBSET (subcommand),SUBSET (subcommand)
NAIVEBAYES command,NAIVEBAYES command,NAIVEBAYES command

The SUBSET subcommand gives settings for the subset of selected predictors.

• There are three mutually exclusive settings: (1) specify a maximum subset size and a method of selecting the best subset, (2) specify an exact subset size, or (3) do not specify a selection.

• Only one of the keywords MAXSIZE, EXACTSIZE, or NOSELECTION may be specified. The BESTSUBSET option is available only if MAXSIZE is specified.

MAXSIZE (keyword),MAXSIZE (keyword),MAXSIZE (keyword)
NAIVEBAYES command,NAIVEBAYES command,NAIVEBAYES command
MAXSIZE Keyword Collapse Hide details

MAXSIZE Keyword

The MAXSIZE keyword specifies the maximum subset size to use when creating the sequence of predictor subsets. The MAXSIZE value is the size of the largest subset beyond any predictors that were forced via the FORCE subcommand. If no predictors are forced, the MAXSIZE value is simply the size of the largest subset.

• Value AUTO indicates that the number should be computed automatically. Alternatively, a positive integer may be specified. The integer must be less than or equal to the number of unique predictors on the NAIVEBAYES command.

• By default, MAXSIZE is used and AUTO is the default value.

BESTSUBSET (keyword),BESTSUBSET (keyword),BESTSUBSET (keyword)
NAIVEBAYES command,NAIVEBAYES command,NAIVEBAYES command
PSEUDOBIC (keyword),PSEUDOBIC (keyword),PSEUDOBIC (keyword)
NAIVEBAYES command,NAIVEBAYES command,NAIVEBAYES command
TESTDATA (keyword),TESTDATA (keyword),TESTDATA (keyword)
NAIVEBAYES command,NAIVEBAYES command,NAIVEBAYES command
BESTSUBSET Keyword Collapse Hide details

BESTSUBSET Keyword

The BESTSUBSET keyword indicates the criterion for finding the best subset when a maximum subset size is used.

• This keyword is honored only if the MAXSIZE keyword is in effect and must be given in parentheses immediately following the MAXSIZE specification.

PSEUDOBIC | Use the pseudo-BIC criterion. The pseudo-BIC criterion is based on the training sample. If the active dataset is not partitioned into training and test samples, PSEUDOBIC is the default. If the active dataset is partitioned, PSEUDOBIC is available but is not the default.
TESTDATA | Use the test data criterion. The test data criterion is based on the test sample. If the active dataset is partitioned into training and test samples, TESTDATA is the default. If the active dataset is not partitioned, TESTDATA may not be specified.
EXACTSIZE (keyword),EXACTSIZE (keyword),EXACTSIZE (keyword)
NAIVEBAYES command,NAIVEBAYES command,NAIVEBAYES command
EXACTSIZE Keyword Collapse Hide details

EXACTSIZE Keyword

The EXACTSIZE keyword specifies a particular subset size to use. The EXACTSIZE value is the size of the subset beyond any predictors forced via the FORCE subcommand. If no predictors are forced, then the EXACTSIZE value is simply the size of the subset.

• A positive integer may be specified. The integer must be less than the number of unique predictors on the NAIVEBAYES command.

• There is no default value.

NOSELECTION (keyword),NOSELECTION (keyword),NOSELECTION (keyword)
NAIVEBAYES command,NAIVEBAYES command,NAIVEBAYES command
NOSELECTION Keyword Collapse Hide details

NOSELECTION Keyword

The NOSELECTION keyword indicates that all predictors that are specified on the NAIVEBAYES command—excluding any predictors that are also specified on the EXCEPT subcommand—are included in the final subset. This specification is useful if the NAIVEBAYES procedure is used for model building but not predictor selection.

Related Topics

NAIVEBAYES
Overview (NAIVEBAYES command)
Examples (NAIVEBAYES command)
Variable Lists (NAIVEBAYES command)
EXCEPT Subcommand (NAIVEBAYES command)
FORCE Subcommand (NAIVEBAYES command)
TRAININGSAMPLE Subcommand (NAIVEBAYES command)
CRITERIA Subcommand (NAIVEBAYES command)
MISSING Subcommand (NAIVEBAYES command)
PRINT Subcommand (NAIVEBAYES command)
SAVE Subcommand (NAIVEBAYES command)
OUTFILE Subcommand (NAIVEBAYES command)


CRITERIA Subcommand (NAIVEBAYES command)

NAIVEBAYES (command),NAIVEBAYES (command),NAIVEBAYES (command)
CRITERIA subcommand,CRITERIA subcommand,CRITERIA subcommand
CRITERIA (subcommand),CRITERIA (subcommand),CRITERIA (subcommand)
NAIVEBAYES command,NAIVEBAYES command,NAIVEBAYES command

The CRITERIA subcommand specifies computational and resource settings for the NAIVEBAYES procedure.

BINS (keyword),BINS (keyword),BINS (keyword)
NAIVEBAYES command,NAIVEBAYES command,NAIVEBAYES command
BINS Keyword Collapse Hide details

BINS Keyword

The BINS keyword specifies the number of bins to use when dividing the domain of a scale predictor into equal-width bins. A positive integer greater than 1 may be specified. The default is 10.

MEMALLOCATE (keyword),MEMALLOCATE (keyword),MEMALLOCATE (keyword)
NAIVEBAYES command,NAIVEBAYES command,NAIVEBAYES command
MEMALLOCATE Keyword Collapse Hide details

MEMALLOCATE Keyword

The MEMALLOCATE keyword specifies the maximum amount of memory in megabytes (MB) that the NAIVEBAYES procedure uses to store training data records when computing the average log-likelihood. If the amount of memory that is required to store records is larger, simulated data are used instead.

• Any number that is greater than or equal to 4 may be specified. Consult your system administrator for the largest value that can be specified on your system. The default is 1024.

TIMER (keyword),TIMER (keyword),TIMER (keyword)
NAIVEBAYES command,NAIVEBAYES command,NAIVEBAYES command
TIMER Keyword Collapse Hide details

TIMER Keyword

The TIMER keyword specifies the maximum number of minutes during which the NAIVEBAYES procedure can run. If the time limit is exceeded, the procedure is terminated and no results are given. Any number that is greater than or equal to 0 may be specified. Specifying 0 turns the timer off completely. The default is 5.

Related Topics

NAIVEBAYES
Overview (NAIVEBAYES command)
Examples (NAIVEBAYES command)
Variable Lists (NAIVEBAYES command)
EXCEPT Subcommand (NAIVEBAYES command)
FORCE Subcommand (NAIVEBAYES command)
TRAININGSAMPLE Subcommand (NAIVEBAYES command)
SUBSET Subcommand (NAIVEBAYES command)
MISSING Subcommand (NAIVEBAYES command)
PRINT Subcommand (NAIVEBAYES command)
SAVE Subcommand (NAIVEBAYES command)
OUTFILE Subcommand (NAIVEBAYES command)


MISSING Subcommand (NAIVEBAYES command)

NAIVEBAYES (command),NAIVEBAYES (command),NAIVEBAYES (command)
MISSING subcommand,MISSING subcommand,MISSING subcommand
MISSING (subcommand),MISSING (subcommand),MISSING (subcommand)
NAIVEBAYES command,NAIVEBAYES command,NAIVEBAYES command

The MISSING subcommand controls whether user-missing values for categorical variables are treated as valid values. By default, user-missing values for categorical variables are treated as invalid.

• User-missing values for scale variables are always treated as invalid.

• System-missing values for any variables are always treated as invalid.

USERMISSING (keyword),USERMISSING (keyword),USERMISSING (keyword)
NAIVEBAYES command,NAIVEBAYES command,NAIVEBAYES command
USERMISSING=EXCLUDE | User-missing values for categorical variables are treated as invalid values. This setting is the default.
USERMISSING=INCLUDE | User-missing values for categorical variables are treated as valid values.

Related Topics

NAIVEBAYES
Overview (NAIVEBAYES command)
Examples (NAIVEBAYES command)
Variable Lists (NAIVEBAYES command)
EXCEPT Subcommand (NAIVEBAYES command)
FORCE Subcommand (NAIVEBAYES command)
TRAININGSAMPLE Subcommand (NAIVEBAYES command)
SUBSET Subcommand (NAIVEBAYES command)
CRITERIA Subcommand (NAIVEBAYES command)
PRINT Subcommand (NAIVEBAYES command)
SAVE Subcommand (NAIVEBAYES command)
OUTFILE Subcommand (NAIVEBAYES command)


PRINT Subcommand (NAIVEBAYES command)

NAIVEBAYES (command),NAIVEBAYES (command),NAIVEBAYES (command)
PRINT subcommand,PRINT subcommand,PRINT subcommand
PRINT (subcommand),PRINT (subcommand),PRINT (subcommand)
NAIVEBAYES command,NAIVEBAYES command,NAIVEBAYES command

The PRINT subcommand indicates the statistical output to display.

NONE (keyword),NONE (keyword),NONE (keyword)
NAIVEBAYES command,NAIVEBAYES command,NAIVEBAYES command
CPS (keyword),CPS (keyword),CPS (keyword)
NAIVEBAYES command,NAIVEBAYES command,NAIVEBAYES command
EXCLUDED (keyword),EXCLUDED (keyword),EXCLUDED (keyword)
NAIVEBAYES command,NAIVEBAYES command,NAIVEBAYES command
SUMMARY (keyword),SUMMARY (keyword),SUMMARY (keyword)
NAIVEBAYES command,NAIVEBAYES command,NAIVEBAYES command
SELECTED (keyword),SELECTED (keyword),SELECTED (keyword)
NAIVEBAYES command,NAIVEBAYES command,NAIVEBAYES command
CLASSIFICATION (keyword),CLASSIFICATION (keyword),CLASSIFICATION (keyword)
NAIVEBAYES command,NAIVEBAYES command,NAIVEBAYES command
CPS | Case processing summary. The table summarizes the number of cases that are included and excluded in the analysis. This table is shown by default.
EXCLUDED | Predictors excluded due to missing or constant values for all cases. The table lists excluded predictors by type (categorical or scale) and the reasons for being excluded.
SUMMARY | Statistical summary of the sequence of predictor subsets. This table is shown by default. The SUMMARY keyword is ignored if NOSELECTION is specified on the SUBSET subcommand.
SELECTED | Selected predictors by type (categorical or scale). This table is shown by default. The SELECTED keyword is ignored if NOSELECTION is specified on the SUBSET subcommand.
CLASSIFICATION | Classification table. The table gives the number of cases that are classified correctly and incorrectly for each dependent variable category. If test data are defined, classification results are given for the training and the test samples. If test data are not defined, classification results are given only for the training sample. This table is shown by default.
NONE | Suppress all displayed output except the Notes table and any warnings. This keyword may not be specified with any other keywords.

Related Topics

NAIVEBAYES
Overview (NAIVEBAYES command)
Examples (NAIVEBAYES command)
Variable Lists (NAIVEBAYES command)
EXCEPT Subcommand (NAIVEBAYES command)
FORCE Subcommand (NAIVEBAYES command)
TRAININGSAMPLE Subcommand (NAIVEBAYES command)
SUBSET Subcommand (NAIVEBAYES command)
CRITERIA Subcommand (NAIVEBAYES command)
MISSING Subcommand (NAIVEBAYES command)
SAVE Subcommand (NAIVEBAYES command)
OUTFILE Subcommand (NAIVEBAYES command)


SAVE Subcommand (NAIVEBAYES command)

NAIVEBAYES (command),NAIVEBAYES (command),NAIVEBAYES (command)
SAVE subcommand,SAVE subcommand,SAVE subcommand
SAVE (subcommand),SAVE (subcommand),SAVE (subcommand)
NAIVEBAYES command,NAIVEBAYES command,NAIVEBAYES command

The SAVE subcommand writes optional temporary variables to the active dataset.

PREDVAL (keyword),PREDVAL (keyword),PREDVAL (keyword)
NAIVEBAYES command,NAIVEBAYES command,NAIVEBAYES command
PREDPROB (keyword),PREDPROB (keyword),PREDPROB (keyword)
NAIVEBAYES command,NAIVEBAYES command,NAIVEBAYES command
PREDVAL(varname) | Predicted value. The predicted value is the dependent variable category with the highest posterior probability as estimated by the Naïve Bayes model. A valid variable name must be specified. The default variable name is PredictedValue.
PREDPROB(rootname:n) | Predicted probability. The predicted probabilities of the first n categories of the dependent variable are saved. Suffixes are added to the root name to get a group of variable names that correspond to the dependent variable categories. If a root name is specified, it must be a valid variable name. The root name can be followed by a colon and a positive integer that indicates the number of probabilities to save. The default root name is PredictedProbability. The default n is 25. To specify n without a root name, enter a colon before the number.

Related Topics

NAIVEBAYES
Overview (NAIVEBAYES command)
Examples (NAIVEBAYES command)
Variable Lists (NAIVEBAYES command)
EXCEPT Subcommand (NAIVEBAYES command)
FORCE Subcommand (NAIVEBAYES command)
TRAININGSAMPLE Subcommand (NAIVEBAYES command)
SUBSET Subcommand (NAIVEBAYES command)
CRITERIA Subcommand (NAIVEBAYES command)
MISSING Subcommand (NAIVEBAYES command)
PRINT Subcommand (NAIVEBAYES command)
OUTFILE Subcommand (NAIVEBAYES command)


OUTFILE Subcommand (NAIVEBAYES command)

NAIVEBAYES (command),NAIVEBAYES (command),NAIVEBAYES (command)
OUTFILE subcommand,OUTFILE subcommand,OUTFILE subcommand
OUTFILE (subcommand),OUTFILE (subcommand),OUTFILE (subcommand)
NAIVEBAYES command,NAIVEBAYES command,NAIVEBAYES command

The OUTFILE subcommand writes the Naïve Bayes model to an XML file. The Naïve Bayes model is based on the training sample even if the active dataset is partitioned into training and test samples.

A valid file name must be specified on the MODEL keyword.

MODEL (keyword),MODEL (keyword),MODEL (keyword)
NAIVEBAYES command,NAIVEBAYES command,NAIVEBAYES command

Related Topics

NAIVEBAYES
Overview (NAIVEBAYES command)
Examples (NAIVEBAYES command)
Variable Lists (NAIVEBAYES command)
EXCEPT Subcommand (NAIVEBAYES command)
FORCE Subcommand (NAIVEBAYES command)
TRAININGSAMPLE Subcommand (NAIVEBAYES command)
SUBSET Subcommand (NAIVEBAYES command)
CRITERIA Subcommand (NAIVEBAYES command)
MISSING Subcommand (NAIVEBAYES command)
PRINT Subcommand (NAIVEBAYES command)
SAVE Subcommand (NAIVEBAYES command)


NEW FILE

NEW FILE (command),NEW FILE (command),NEW FILE (command)
NEW FILE (command),NEW FILE (command),NEW FILE (command)
syntax chart,syntax chart,syntax chart
NEW FILE

This command takes effect immediately. It does not read the active dataset or execute pending transformations. See the topic Command Order for more information.

Related Topics

Overview (NEW FILE command)


Overview (NEW FILE command)

The NEW FILE command clears the active dataset. NEW FILE is used when you want to build a new active dataset by generating data within an input program (see INPUT PROGRAM—END INPUT PROGRAM).

Basic Specification Collapse Hide details

Basic Specification

NEW FILE is always specified by itself. No other keyword is allowed.

Operations Collapse Hide details

Operations

• NEW FILE creates a new, blank active dataset. The command takes effect as soon as it is encountered.

• When you build an active dataset with GET, DATA LIST, or other file-definition commands (such as ADD FILES or MATCH FILES), the active dataset is automatically replaced. It is not necessary to specify NEW FILE.

Related Topics

NEW FILE


NLR

Nonlinear Regression,Nonlinear Regression,Nonlinear Regression
command syntax,command syntax,command syntax
NLR (command),NLR (command),NLR (command)
NLR (command),NLR (command),NLR (command)
syntax chart,syntax chart,syntax chart
CNLR (command),CNLR (command),CNLR (command)
syntax chart,syntax chart,syntax chart
CNLR (command),CNLR (command),CNLR (command)

NLR and CNLR are available in the Regression option.

MODEL PROGRAM parameter=value [parameter=value ...]
transformation commands

[DERIVATIVES
transformation commands]

[CLEAR MODEL PROGRAMS]

Procedure CNLR (Constrained Nonlinear Regression):

[CONSTRAINED FUNCTIONS
transformation commands]

CNLR dependent var

 [/FILE=file]   [/OUTFILE=file]

 [/PRED=varname]

 [/SAVE [PRED] [RESID[(varname)]] [DERIVATIVES] [LOSS]]

 [/CRITERIA=[ITER n] [MITER n] [CKDER {0.5**}]
                                      {n    }
            [ISTEP {1E+20**}] [FPR n] [LFTOL n]
                   {n      }
            [LSTOL n] [STEPLIMIT {2**}] [NFTOL n]
                                 {n  }
            [FTOL n] [OPTOL n] [CRSHTOL {.01**}]]
                                        {n    }

 [/BOUNDS=expression, expression, ...]

 [/LOSS=varname]

 [/BOOTSTRAP [=n]]

Procedure NLR (Nonlinear Regression):

NLR dependent var

 [/FILE=file]   [/OUTFILE=file]

 [/PRED=varname]

 [/SAVE [PRED] [RESID [(varname)] [DERIVATIVES]]

 [/CRITERIA=[ITER {100**}] [CKDER {0.5**}]
                  {n    }         {n    }
            [SSCON {1E-8**}]  [PCON {1E-8**}]  [RCON {1E-8**}]]
                   {n     }         {n     }         {n     }

**Default if the subcommand or keyword is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See NLR Algorithms for computational details for this procedure.

Syntax for the NLR and CNLR commands can be generated from the Nonlinear Regression dialog box.

Example

MODEL PROGRAM A=.6.
COMPUTE PRED=EXP(A*X).

NLR Y.

Related Topics

Overview (NLR command)
Operations (NLR command)
Examples (NLR command)
MODEL PROGRAM Command (NLR command)
DERIVATIVES Command (NLR command)
CONSTRAINED FUNCTIONS Command (NLR command)
CLEAR MODEL PROGRAMS Command (NLR command)
CNLR and NLR Commands (NLR command)
OUTFILE Subcommand (NLR command)
FILE Subcommand (NLR command)
PRED Subcommand (NLR command)
SAVE Subcommand (NLR command)
CRITERIA Subcommand (NLR command)
BOUNDS Subcommand (NLR command)
LOSS Subcommand (NLR command)
BOOTSTRAP Subcommand (NLR command)
References (NLR command)


Overview (NLR command)

NLR (command),NLR (command),NLR (command)
with MODEL PROGRAM command,with MODEL PROGRAM command,with MODEL PROGRAM command
CNLR (command),CNLR (command),CNLR (command)
with MODEL PROGRAM command,with MODEL PROGRAM command,with MODEL PROGRAM command
MODEL PROGRAM (command),MODEL PROGRAM (command),MODEL PROGRAM (command)
with CNLR/NLR command,with CNLR/NLR command,with CNLR/NLR command

Nonlinear regression is used to estimate parameter values and regression statistics for models that are not linear in their parameters. There are two procedures for estimating nonlinear equations. CNLR (constrained nonlinear regression), which uses a sequential quadratic programming algorithm, is applicable for both constrained and unconstrained problems. NLR (nonlinear regression), which uses a Levenberg-Marquardt algorithm, is applicable only for unconstrained problems.

CNLR is more general. It allows linear and nonlinear constraints on any combination of parameters. It will estimate parameters by minimizing any smooth loss function (objective function) and can optionally compute bootstrap estimates of parameter standard errors and correlations. The individual bootstrap parameter estimates can optionally be saved in a separate PASW Statistics data file.

Both programs estimate the values of the parameters for the model and, optionally, compute and save predicted values, residuals, and derivatives. Final parameter estimates can be saved in PASW Statistics data files and used in subsequent analyses.

CNLR and NLR use much of the same syntax. Some of the following sections discuss features that are common to both procedures. In these sections, the notation [C]NLR means that either the CNLR or NLR procedure can be specified. Sections that apply only to CNLR or only to NLR are clearly identified.

Options Collapse Hide details

Options

The Model. You can use any number of transformation commands under MODEL PROGRAM to define complex models.

Derivatives. You can use any number of transformation commands under DERIVATIVES to supply derivatives.

Adding Variables to Active Dataset. You can add predicted values, residuals, and derivatives to the active dataset with the SAVE subcommand.

Writing Parameter Estimates to a New Data File. You can save final parameter estimates as an external PASW Statistics data file by using the OUTFILE subcommand; you can retrieve them in subsequent analyses by using the FILE subcommand.

Controlling Model-Building Criteria. You can control the iteration process that is used in the regression with the CRITERIA subcommand.

Additional CNLR Controls. For CNLR, you can impose linear and nonlinear constraints on the parameters with the BOUNDS subcommand. Using the LOSS subcommand, you can specify a loss function for CNLR to minimize and, using the BOOTSTRAP subcommand, you can provide bootstrap estimates of the parameter standard errors, confidence intervals, and correlations.

Basic Specification Collapse Hide details

Basic Specification

The basic specification requires three commands: MODEL PROGRAM, COMPUTE (or any other computational transformation command), and [C]NLR.

• The MODEL PROGRAM command assigns initial values to the parameters and signifies the beginning of the model program.

• The computational transformation command generates a new variable to define the model. The variable can take any legitimate name, but if the name is not PRED, the PRED subcommand will be required.

• The [C]NLR command provides the regression specifications. The minimum specification is the dependent variable.

• By default, the residual sum of squares and estimated values of the model parameters are displayed for each iteration. Statistics that are generated include regression and residual sums of squares and mean squares, corrected and uncorrected total sums of squares, R2, parameter estimates with their asymptotic standard errors and 95% confidence intervals, and an asymptotic correlation matrix of the parameter estimates.

NLR (command),NLR (command),NLR (command)
DERIVATIVES command,DERIVATIVES command,DERIVATIVES command
CNLR (command),CNLR (command),CNLR (command)
DERIVATIVES command,DERIVATIVES command,DERIVATIVES command
DERIVATIVES (command),DERIVATIVES (command),DERIVATIVES (command)
CNLR/NLR command,CNLR/NLR command,CNLR/NLR command
CNLR (command),CNLR (command),CNLR (command)
with CONSTRAINED FUNCTIONS command,with CONSTRAINED FUNCTIONS command,with CONSTRAINED FUNCTIONS command
CONSTRAINED FUNCTIONS (command),CONSTRAINED FUNCTIONS (command),CONSTRAINED FUNCTIONS (command)
with CNLR command,with CNLR command,with CNLR command
Command Order Collapse Hide details

Command Order

• The model program, beginning with the MODEL PROGRAM command, must precede the [C]NLR command.

• The derivatives program (when used), beginning with the DERIVATIVES command, must follow the model program but precede the [C]NLR command.

• The constrained functions program (when used), beginning with the CONSTRAINED FUNCTIONS command, must immediately precede the CNLR command. The constrained functions program cannot be used with the NLR command.

• The CNLR command must follow the block of transformations for the model program and the derivatives program when specified; the CNLR command must also follow the constrained functions program when specified.

• Subcommands on [C]NLR can be named in any order.

Syntax Rules Collapse Hide details

Syntax Rules

• The FILE, OUTFILE, PRED, and SAVE subcommands work the same way for both CNLR and NLR.

• The CRITERIA subcommand is used by both CNLR and NLR, but iteration criteria are different. Therefore, the CRITERIA subcommand is documented separately for CNLR and NLR.

• The BOUNDS, LOSS, and BOOTSTRAP subcommands can be used only with CNLR. They cannot be used with NLR.

Related Topics

NLR
Operations (NLR command)
Examples (NLR command)
MODEL PROGRAM Command (NLR command)
DERIVATIVES Command (NLR command)
CONSTRAINED FUNCTIONS Command (NLR command)
CLEAR MODEL PROGRAMS Command (NLR command)
CNLR and NLR Commands (NLR command)
OUTFILE Subcommand (NLR command)
FILE Subcommand (NLR command)
PRED Subcommand (NLR command)
SAVE Subcommand (NLR command)
CRITERIA Subcommand (NLR command)
BOUNDS Subcommand (NLR command)
LOSS Subcommand (NLR command)
BOOTSTRAP Subcommand (NLR command)
References (NLR command)


Operations (NLR command)

• By default, the predicted values, residuals, and derivatives are created as temporary variables. To save these variables, use the SAVE subcommand.

Related Topics

NLR
Overview (NLR command)
Examples (NLR command)
MODEL PROGRAM Command (NLR command)
DERIVATIVES Command (NLR command)
CONSTRAINED FUNCTIONS Command (NLR command)
CLEAR MODEL PROGRAMS Command (NLR command)
CNLR and NLR Commands (NLR command)
OUTFILE Subcommand (NLR command)
FILE Subcommand (NLR command)
PRED Subcommand (NLR command)
SAVE Subcommand (NLR command)
CRITERIA Subcommand (NLR command)
BOUNDS Subcommand (NLR command)
LOSS Subcommand (NLR command)
BOOTSTRAP Subcommand (NLR command)
References (NLR command)
Weighting Cases (NLR command)
Missing Values (NLR command)


Weighting Cases (NLR command)

CNLR (command),CNLR (command),CNLR (command)
weighting cases,weighting cases,weighting cases
NLR (command),NLR (command),NLR (command)
weighting cases,weighting cases,weighting cases

• If case weighting is in effect, [C]NLR uses case weights when calculating the residual sum of squares and derivatives. However, the degrees of freedom in the ANOVA table are always based on unweighted cases.

• When the model program is first invoked for each case, the weight variable's value is set equal to its value in the active dataset. The model program may recalculate that value. For example, to effect a robust estimation, the model program may recalculate the weight variable's value as an inverse function of the residual magnitude. [C]NLR uses the weight variable's value after the model program is executed.

Related Topics

Operations (NLR command)
Missing Values (NLR command)


Missing Values (NLR command)

NLR (command),NLR (command),NLR (command)
missing values,missing values,missing values

Cases with missing values for any of the dependent or independent variables that are named on the [C]NLR command are excluded.

• Predicted values, but not residuals, can be calculated for cases with missing values on the dependent variable.

• [C]NLR ignores cases that have missing, negative, or zero weights. The procedure displays a warning message if it encounters any negative or zero weights at any time during its execution.

• If a variable that is used in the model program or the derivatives program is omitted from the independent variable list on the [C]NLR command, the predicted value and some or all of the derivatives may be missing for every case. If this situation happens, an error message is generated.

Related Topics

Operations (NLR command)
Weighting Cases (NLR command)


Examples (NLR command)

MODEL PROGRAM A=.5 B=1.6.
COMPUTE PRED=A*SPEED**B.

DERIVATIVES.
COMPUTE D.A=SPEED**B.
COMPUTE D.B=A*LN(SPEED)*SPEED**B.

NLR STOP.

• MODEL PROGRAM assigns values to the model parameters A and B.

• COMPUTE generates the variable PRED to define the nonlinear model using parameters A and B and the variable SPEED from the active dataset. Because this variable is named PRED, the PRED subcommand is not required on NLR.

• DERIVATIVES indicates that calculations for derivatives are being supplied.

• The two COMPUTE statements on the DERIVATIVES transformations list calculate the derivatives for the parameters A and B. If either parameter had been omitted, NLR would have calculated it numerically.

• NLR specifies STOP as the dependent variable. It is not necessary to specify SPEED as the independent variable because it has been used in the model and derivatives programs.

Asymptotic Regression

* NonLinear Regression.
MODEL PROGRAM b1=13 b2=-6 b3=-1.33 .
COMPUTE PRED_ = b1 + b2 * exp(b3*advert).
CNLR sales
  /OUTFILE='C:\TEMP\SPSSFNLR.TMP'
  /PRED PRED_
  /BOUNDS b1 >= 0; b2 <= 0; b3 <= 0
  /SAVE PRED RESID
  /CRITERIA STEPLIMIT 2 ISTEP 1E+20 .

• MODEL PROGRAM assigns initial values to the model parameters b1, b2, and b3.

• COMPUTE generates the variable PRED_ to define the nonlinear model using the parameters from MODEL PROGRAM and the variable advert from the active dataset.

• CNLR specifies sales as the dependent variable. It is not necessary to specify advert as the independent variable because it has been used in the computation of PRED_.

• The OUTFILE subcommand saves the final parameter estimates to an external file.

• The PRED subcommand specifies that PRED_ is the nonlinear model.

• The BOUNDS subcommand specifies that b1 must be nonnegative and b2 and b3 must be nonpositive.

• The SAVE subcommand requests the predicted values and residuals be saved as new variables to the active dataset.

• All other options are set to their default values.

For discussion of output from this syntax and to place the example in context, see Using Nonlinear Regression to Model the Law of Diminishing Returns.

Using Conditional Logic to Fit a Segmented Model

* NonLinear Regression.
MODEL PROGRAM b1=.65 b2=5 b3=0.03 a1=0.0 a2=.5 a3=-0.025.
COMPUTE PRED_ = (time<20)*b1/(1 + b2*exp(-b3*time)) + (time>=20)*(a1 + a2*exp(a3*(time-19))).
CNLR infected
  /OUTFILE='C:\TEMP\SPSSFNLR.TMP'
  /PRED PRED_
  /BOUNDS b1 >= 0; b2 >= 0; b3 >= 0; a1 >= 0; a2 >= 0; a3 <= 0
  /CRITERIA STEPLIMIT 2 ISTEP 1E+20
  /SAVE PRED RESID.

• MODEL PROGRAM assigns initial values to the model parameters b1, b2, b3, a1, a2, and a3.

• COMPUTE generates the variable PRED_ to define the nonlinear model using the parameters from MODEL PROGRAM and the variable time from the active dataset.

• CNLR specifies infected as the dependent variable. It is not necessary to specify time as the independent variable because it has been used in the computation of PRED_.

• The OUTFILE subcommand saves the final parameter estimates to an external file.

• The PRED subcommand specifies that PRED_ is the nonlinear model.

• The BOUNDS subcommand specifies that b1, b2, b3, a1, and a2 must be nonnegative and a3 must be nonpositive.

• The SAVE subcommand requests the predicted values and residuals be saved as new variables to the active dataset.

• All other options are set to their default values.

For discussion of output from this syntax and to place the example in context, see Using Nonlinear Regression to Model Viral Growth.

Related Topics

NLR
Overview (NLR command)
Operations (NLR command)
MODEL PROGRAM Command (NLR command)
DERIVATIVES Command (NLR command)
CONSTRAINED FUNCTIONS Command (NLR command)
CLEAR MODEL PROGRAMS Command (NLR command)
CNLR and NLR Commands (NLR command)
OUTFILE Subcommand (NLR command)
FILE Subcommand (NLR command)
PRED Subcommand (NLR command)
SAVE Subcommand (NLR command)
CRITERIA Subcommand (NLR command)
BOUNDS Subcommand (NLR command)
LOSS Subcommand (NLR command)
BOOTSTRAP Subcommand (NLR command)
References (NLR command)


MODEL PROGRAM Command (NLR command)

MODEL PROGRAM (command),MODEL PROGRAM (command),MODEL PROGRAM (command)
with CNLR/NLR command,with CNLR/NLR command,with CNLR/NLR command
CNLR (command),CNLR (command),CNLR (command)
with MODEL PROGRAM command,with MODEL PROGRAM command,with MODEL PROGRAM command
NLR (command),NLR (command),NLR (command)
with MODEL PROGRAM command,with MODEL PROGRAM command,with MODEL PROGRAM command
NLR (command),NLR (command),NLR (command)
model program,model program,model program
CNLR (command),CNLR (command),CNLR (command)
model program,model program,model program
NLR (command),NLR (command),NLR (command)
parameters,parameters,parameters
NLR (command),NLR (command),NLR (command)
model expression,model expression,model expression
CNLR (command),CNLR (command),CNLR (command)
parameters,parameters,parameters
CNLR (command),CNLR (command),CNLR (command)
model expression,model expression,model expression

The MODEL PROGRAM command assigns initial values to the parameters and signifies the beginning of the model program. The model program specifies the nonlinear equation that is chosen to model the data. There is no default model.

• The model program is required and must precede the [C]NLR command.

• The MODEL PROGRAM command must specify all parameters in the model program. Each parameter must be individually named. Keyword TO is not allowed.

• Parameters can be assigned any acceptable variable name. However, if you intend to write the final parameter estimates to a file with the OUTFILE subcommand, do not use the name SSE or NCASES (see OUTFILE Subcommand (NLR command)).

• Each parameter in the model program must have an assigned value. The value can be specified on MODEL PROGRAM or read from an existing parameter data file named on the FILE subcommand.

• Zero should be avoided as an initial value because it provides no information about the scale of the parameters. This situation is especially true for CNLR.

• The model program must include at least one command that uses the parameters and the independent variables (or preceding transformations of these) to calculate the predicted value of the dependent variable. This predicted value defines the nonlinear model. There is no default model.

• By default, the program assumes that PRED is the name assigned to the variable for the predicted values. If you use a different variable name in the model program, you must supply the name on the PRED subcommand (see PRED Subcommand (NLR command)).

• In the model program, you can assign a label to the variable holding predicted values and also change its print and write formats, but you should not specify missing values for this variable.

• You can use any computational commands (such as COMPUTE, IF, DO IF, LOOP, END LOOP, END IF, RECODE, or COUNT) or output commands (WRITE, PRINT, or XSAVE) in the model program, but you cannot use input commands (such as DATA LIST, GET, MATCH FILES, or ADD FILES).

• Transformations in the model program are used only by [C]NLR, and they do not affect the active dataset. The parameters that are created by the model program do not become a part of the active dataset. Permanent transformations should be specified before the model program.

Related Topics

NLR
Overview (NLR command)
Operations (NLR command)
Examples (NLR command)
DERIVATIVES Command (NLR command)
CONSTRAINED FUNCTIONS Command (NLR command)
CLEAR MODEL PROGRAMS Command (NLR command)
CNLR and NLR Commands (NLR command)
OUTFILE Subcommand (NLR command)
FILE Subcommand (NLR command)
PRED Subcommand (NLR command)
SAVE Subcommand (NLR command)
CRITERIA Subcommand (NLR command)
BOUNDS Subcommand (NLR command)
LOSS Subcommand (NLR command)
BOOTSTRAP Subcommand (NLR command)
References (NLR command)
Caution: Initial Values (NLR command)


Caution: Initial Values (NLR command)

The selection of good initial values for the parameters in the model program is very important to the operation of [C]NLR. The selection of poor initial values can result in no solution, a local solution rather than a general solution, or a physically impossible solution.

Example

MODEL PROGRAM A=10 B=1 C=5 D=1.
COMPUTE PRED= A*exp(B*X) + C*exp(D*X).

• The MODEL PROGRAM command assigns starting values to the four parameters A, B, C, and D.

• COMPUTE defines the model to be fit as the sum of two exponentials.

Related Topics

MODEL PROGRAM Command (NLR command)


DERIVATIVES Command (NLR command)

NLR (command),NLR (command),NLR (command)
DERIVATIVES command,DERIVATIVES command,DERIVATIVES command
CNLR (command),CNLR (command),CNLR (command)
DERIVATIVES command,DERIVATIVES command,DERIVATIVES command
DERIVATIVES (command),DERIVATIVES (command),DERIVATIVES (command)
CNLR/NLR command,CNLR/NLR command,CNLR/NLR command
NLR (command),NLR (command),NLR (command)
derivatives,derivatives,derivatives
CNLR (command),CNLR (command),CNLR (command)
derivatives,derivatives,derivatives

The optional DERIVATIVES command signifies the beginning of the derivatives program. The derivatives program contains transformation statements for computing some or all of the derivatives of the model. The derivatives program must follow the model program but precede the [C]NLR command.

If the derivatives program is not used, [C]NLR numerically estimates derivatives for all the parameters. Providing derivatives reduces computation time and, in some situations, may result in a better solution.

• The DERIVATIVES command has no further specifications but must be followed by the set of transformation statements that calculate the derivatives.

• You can use any computational commands (such as COMPUTE, IF, DO IF, LOOP, END LOOP, END IF, RECODE, or COUNT) or output commands (WRITE, PRINT, or XSAVE) in the derivatives program, but you cannot use input commands (such as DATA LIST, GET, MATCH FILES, or ADD FILES).

• To name the derivatives, specify the prefix D. before each parameter name. For example, the derivative name for the parameter PARM1 must be D.PARM1.

• When a derivative has been calculated by a transformation, the variable for that derivative can be used in subsequent transformations.

• You do not need to supply all of the derivatives. Those derivatives that are not supplied will be estimated by the program. During the first iteration of the nonlinear estimation procedure, derivatives that are calculated in the derivatives program are compared with numerically calculated derivatives. This process serves as a check on the supplied values (see CRITERIA Subcommand (NLR command)).

• Transformations in the derivatives program are used by [C]NLR only and do not affect the active dataset.

• For NLR, the derivative of each parameter must be computed with respect to the predicted function (see LOSS Subcommand (NLR command)).

Example

MODEL PROGRAM A=1, B=0, C=1, D=0
COMPUTE PRED = AeBx + CeDx
DERIVATIVES.
COMPUTE D.A = exp (B * X).
COMPUTE D.B = A * exp (B * X) * X.
COMPUTE D.C = exp (D * X).
COMPUTE D.D = C * exp (D * X) * X.

• The derivatives program specifies derivatives of the PRED function for the sum of the two exponentials in the model described by the following equation:

Y=AeBx+CeDx

Example

DERIVATIVES.
COMPUTE D.A = exp (B * X).
COMPUTE D.B = A * X * D.A.
COMPUTE D.C = exp (D * X).
COMPUTE D.D = C * X * D.C.

• This example is an alternative way to express the same derivatives program that was specified in the previous example.

Related Topics

NLR
Overview (NLR command)
Operations (NLR command)
Examples (NLR command)
MODEL PROGRAM Command (NLR command)
CONSTRAINED FUNCTIONS Command (NLR command)
CLEAR MODEL PROGRAMS Command (NLR command)
CNLR and NLR Commands (NLR command)
OUTFILE Subcommand (NLR command)
FILE Subcommand (NLR command)
PRED Subcommand (NLR command)
SAVE Subcommand (NLR command)
CRITERIA Subcommand (NLR command)
BOUNDS Subcommand (NLR command)
LOSS Subcommand (NLR command)
BOOTSTRAP Subcommand (NLR command)
References (NLR command)


CONSTRAINED FUNCTIONS Command (NLR command)

CONSTRAINED FUNCTIONS (command),CONSTRAINED FUNCTIONS (command),CONSTRAINED FUNCTIONS (command)
with CNLR command,with CNLR command,with CNLR command
CNLR (command),CNLR (command),CNLR (command)
with CONSTRAINED FUNCTIONS command,with CONSTRAINED FUNCTIONS command,with CONSTRAINED FUNCTIONS command
NLR (command),NLR (command),NLR (command)
constrained functions,constrained functions,constrained functions
CNLR (command),CNLR (command),CNLR (command)
constrained functions,constrained functions,constrained functions
nonlinear constraints,nonlinear constraints,nonlinear constraints

The optional CONSTRAINED FUNCTIONS command signifies the beginning of the constrained functions program, which specifies nonlinear constraints. The constrained functions program is specified after the model program and the derivatives program (when used). It can only be used with, and must precede, the CNLR command. See the topic BOUNDS Subcommand (NLR command) for more information.

Example

MODEL PROGRAM A=.5 B=1.6.
COMPUTE PRED=A*SPEED**B.

CONSTRAINED FUNCTIONS.
COMPUTE CF=A-EXP(B).

CNLR STOP
  /BOUNDS CF LE 0.

Related Topics

NLR
Overview (NLR command)
Operations (NLR command)
Examples (NLR command)
MODEL PROGRAM Command (NLR command)
DERIVATIVES Command (NLR command)
CLEAR MODEL PROGRAMS Command (NLR command)
CNLR and NLR Commands (NLR command)
OUTFILE Subcommand (NLR command)
FILE Subcommand (NLR command)
PRED Subcommand (NLR command)
SAVE Subcommand (NLR command)
CRITERIA Subcommand (NLR command)
BOUNDS Subcommand (NLR command)
LOSS Subcommand (NLR command)
BOOTSTRAP Subcommand (NLR command)
References (NLR command)


CLEAR MODEL PROGRAMS Command (NLR command)

CLEAR MODEL PROGRAMS deletes all transformations that are associated with the previously submitted model program, derivative program, and/or constrained functions program. It is primarily used in interactive mode to remove temporary variables that were created by these programs without affecting the active dataset or variables that were created by other transformation programs or temporary programs. It allows you to specify new models, derivatives, or constrained functions without having to run [C]NLR.

It is not necessary to use this command if you have already executed the [C]NLR procedure. Temporary variables that are associated with the procedure are automatically deleted.

Related Topics

NLR
Overview (NLR command)
Operations (NLR command)
Examples (NLR command)
MODEL PROGRAM Command (NLR command)
DERIVATIVES Command (NLR command)
CONSTRAINED FUNCTIONS Command (NLR command)
CNLR and NLR Commands (NLR command)
OUTFILE Subcommand (NLR command)
FILE Subcommand (NLR command)
PRED Subcommand (NLR command)
SAVE Subcommand (NLR command)
CRITERIA Subcommand (NLR command)
BOUNDS Subcommand (NLR command)
LOSS Subcommand (NLR command)
BOOTSTRAP Subcommand (NLR command)
References (NLR command)


CNLR and NLR Commands (NLR command)

Either the CNLR or the NLR command is required to specify the dependent and independent variables for the nonlinear regression.

NLR (command),NLR (command),NLR (command)
dependent variable,dependent variable,dependent variable
CNLR (command),CNLR (command),CNLR (command)
dependent variable,dependent variable,dependent variable

• For either CNLR or NLR, the minimum specification is a dependent variable.

• Only one dependent variable can be specified. It must be a numeric variable in the active dataset and cannot be a variable that is generated by the model or the derivatives program.

Related Topics

NLR
Overview (NLR command)
Operations (NLR command)
Examples (NLR command)
MODEL PROGRAM Command (NLR command)
DERIVATIVES Command (NLR command)
CONSTRAINED FUNCTIONS Command (NLR command)
CLEAR MODEL PROGRAMS Command (NLR command)
OUTFILE Subcommand (NLR command)
FILE Subcommand (NLR command)
PRED Subcommand (NLR command)
SAVE Subcommand (NLR command)
CRITERIA Subcommand (NLR command)
BOUNDS Subcommand (NLR command)
LOSS Subcommand (NLR command)
BOOTSTRAP Subcommand (NLR command)
References (NLR command)


OUTFILE Subcommand (NLR command)

NLR (command),NLR (command),NLR (command)
OUTFILE subcommand,OUTFILE subcommand,OUTFILE subcommand
CNLR (command),CNLR (command),CNLR (command)
OUTFILE subcommand,OUTFILE subcommand,OUTFILE subcommand
OUTFILE (subcommand),OUTFILE (subcommand),OUTFILE (subcommand)
CNLR/NLR command,CNLR/NLR command,CNLR/NLR command
NLR (command),NLR (command),NLR (command)
saving parameter estimates,saving parameter estimates,saving parameter estimates
NLR (command),NLR (command),NLR (command)
using parameter estimates from previous analysis,using parameter estimates from previous analysis,using parameter estimates from previous analysis
CNLR (command),CNLR (command),CNLR (command)
saving parameter estimates,saving parameter estimates,saving parameter estimates
CNLR (command),CNLR (command),CNLR (command)
using parameter estimates from previous analysis,using parameter estimates from previous analysis,using parameter estimates from previous analysis

OUTFILE stores final parameter estimates for use on a subsequent [C]NLR command. The only specification on OUTFILE is the target file. Some or all of the values from this file can be read into a subsequent [C]NLR procedure with the FILE subcommand. The parameter data file that is created by OUTFILE stores the following variables:

• All of the split-file variables. OUTFILE writes one case of values for each split-file group in the active dataset.

• All of the parameters named on the MODEL PROGRAM command.

• The labels, formats, and missing values of the split-file variables and parameters defined for them previous to their use in the [C]NLR procedure.

• The sum of squared residuals (named SSE). SSE has no labels or missing values. The print and write format for SSE is F10.8.

• The number of cases on which the analysis was based (named NCASES). NCASES has no labels or missing values. The print and write format for NCASES is F8.0.

When OUTFILE is used, the model program cannot create variables named SSE or NCASES.

Example

MODEL PROGRAM A=.5 B=1.6.
COMPUTE PRED=A*SPEED**B.
NLR STOP /OUTFILE=PARAM.

• OUTFILE generates a parameter data file containing one case for four variables: A, B, SSE, and NCASES.

Related Topics

NLR
Overview (NLR command)
Operations (NLR command)
Examples (NLR command)
MODEL PROGRAM Command (NLR command)
DERIVATIVES Command (NLR command)
CONSTRAINED FUNCTIONS Command (NLR command)
CLEAR MODEL PROGRAMS Command (NLR command)
CNLR and NLR Commands (NLR command)
FILE Subcommand (NLR command)
PRED Subcommand (NLR command)
SAVE Subcommand (NLR command)
CRITERIA Subcommand (NLR command)
BOUNDS Subcommand (NLR command)
LOSS Subcommand (NLR command)
BOOTSTRAP Subcommand (NLR command)
References (NLR command)


FILE Subcommand (NLR command)

NLR (command),NLR (command),NLR (command)
FILE subcommand,FILE subcommand,FILE subcommand
CNLR (command),CNLR (command),CNLR (command)
FILE subcommand,FILE subcommand,FILE subcommand
FILE (subcommand),FILE (subcommand),FILE (subcommand)
CNLR/NLR command,CNLR/NLR command,CNLR/NLR command

FILE reads starting values for the parameters from a parameter data file that was created by an OUTFILE subcommand from a previous [C]NLR procedure. When starting values are read from a file, they do not have to be specified on the MODEL PROGRAM command. Rather, the MODEL PROGRAM command simply names the parameters that correspond to the parameters in the data file.

• The only specification on FILE is the file that contains the starting values.

• Some new parameters may be specified for the model on the MODEL PROGRAM command while other parameters are read from the file that is specified on the FILE subcommand.

• You do not have to name the parameters on MODEL PROGRAM in the order in which they occur in the parameter data file. In addition, you can name a partial list of the variables that are contained in the file.

• If the starting value for a parameter is specified on MODEL PROGRAM, the specification overrides the value that is read from the parameter data file.

• If split-file processing is in effect, the starting values for the first subfile are taken from the first case of the parameter data file. Subfiles are matched with cases in order until the starting-value file runs out of cases. All subsequent subfiles use the starting values for the last case.

• To read starting values from a parameter data file and then replace those values with the final results from [C]NLR, specify the same file on the FILE and OUTFILE subcommands. The input file is read completely before anything is written in the output file.

Example

MODEL PROGRAM A B C=1 D=3.
COMPUTE PRED=A*SPEED**B + C*SPEED**D.
NLR STOP /FILE=PARAM /OUTFILE=PARAM.

• MODEL PROGRAM names four of the parameters that are used to calculate PRED but assigns values to only C and D. The values of A and B are read from the existing data file PARAM.

• After NLR computes the final estimates of the four parameters, OUTFILE writes over the old input file. If, in addition to these new final estimates, the former starting values of A and B are still desired, specify a different file on the OUTFILE subcommand.

Related Topics

NLR
Overview (NLR command)
Operations (NLR command)
Examples (NLR command)
MODEL PROGRAM Command (NLR command)
DERIVATIVES Command (NLR command)
CONSTRAINED FUNCTIONS Command (NLR command)
CLEAR MODEL PROGRAMS Command (NLR command)
CNLR and NLR Commands (NLR command)
OUTFILE Subcommand (NLR command)
PRED Subcommand (NLR command)
SAVE Subcommand (NLR command)
CRITERIA Subcommand (NLR command)
BOUNDS Subcommand (NLR command)
LOSS Subcommand (NLR command)
BOOTSTRAP Subcommand (NLR command)
References (NLR command)


PRED Subcommand (NLR command)

NLR (command),NLR (command),NLR (command)
PRED subcommand,PRED subcommand,PRED subcommand
CNLR (command),CNLR (command),CNLR (command)
PRED subcommand,PRED subcommand,PRED subcommand
PRED (subcommand),PRED (subcommand),PRED (subcommand)
CNLR/NLR command,CNLR/NLR command,CNLR/NLR command

PRED identifies the variable holding the predicted values.

• The only specification is a variable name, which must be identical to the variable name that is used to calculate predicted values in the model program.

• If the model program names the variable PRED, the PRED subcommand can be omitted. Otherwise, the PRED subcommand is required.

• The variable for predicted values is not saved in the active dataset unless the SAVE subcommand is used.

Example

MODEL PROGRAM A=.5 B=1.6.
COMPUTE PSTOP=A*SPEED**B.
NLR STOP /PRED=PSTOP.

• COMPUTE in the model program creates a variable named PSTOP to temporarily store the predicted values for the dependent variable STOP.

• PRED identifies PSTOP as the variable that is used to define the model for the NLR procedure.

Related Topics

NLR
Overview (NLR command)
Operations (NLR command)
Examples (NLR command)
MODEL PROGRAM Command (NLR command)
DERIVATIVES Command (NLR command)
CONSTRAINED FUNCTIONS Command (NLR command)
CLEAR MODEL PROGRAMS Command (NLR command)
CNLR and NLR Commands (NLR command)
OUTFILE Subcommand (NLR command)
FILE Subcommand (NLR command)
SAVE Subcommand (NLR command)
CRITERIA Subcommand (NLR command)
BOUNDS Subcommand (NLR command)
LOSS Subcommand (NLR command)
BOOTSTRAP Subcommand (NLR command)
References (NLR command)


SAVE Subcommand (NLR command)

NLR (command),NLR (command),NLR (command)
SAVE subcommand,SAVE subcommand,SAVE subcommand
CNLR (command),CNLR (command),CNLR (command)
SAVE subcommand,SAVE subcommand,SAVE subcommand
SAVE (subcommand),SAVE (subcommand),SAVE (subcommand)
CNLR/NLR command,CNLR/NLR command,CNLR/NLR command
NLR (command),NLR (command),NLR (command)
saving new variables,saving new variables,saving new variables
CNLR (command),CNLR (command),CNLR (command)
saving new variables,saving new variables,saving new variables

SAVE is used to save the temporary variables for the predicted values, residuals, and derivatives that are created by the model and the derivatives programs.

• The minimum specification is a single keyword.

• The variables to be saved must have unique names on the active dataset. If a naming conflict exists, the variables are not saved.

• Temporary variables—for example, variables that are created after a TEMPORARY command and parameters that are specified by the model program—are not saved in the active dataset. They will not cause naming conflicts.

The following keywords are available and can be used in any combination and in any order. The new variables are always appended to the active dataset in the order in which these keywords are presented here:

LOSS (keyword),LOSS (keyword),LOSS (keyword)
CNLR command,CNLR command,CNLR command
PRED (keyword),PRED (keyword),PRED (keyword)
NLR/CNLR command,NLR/CNLR command,NLR/CNLR command
RESID (keyword),RESID (keyword),RESID (keyword)
NLR/CNLR command,NLR/CNLR command,NLR/CNLR command
DERIVATIVES (keyword),DERIVATIVES (keyword),DERIVATIVES (keyword)
NLR/CNLR command,NLR/CNLR command,NLR/CNLR command
PRED | Save the predicted values. The variable's name, label, and formats are those specified for it (or assigned by default) in the model program.
RESID [(varname)] | Save the residuals variable. You can specify a variable name in parentheses following the keyword. If no variable name is specified, the name of this variable is the same as the specification that you use for this keyword. For example, if you use the three-character abbreviation RES, the default variable name will be RES. The variable has the same print and write format as the predicted values variable that is created by the model program. It has no variable label and no user-defined missing values. It is system-missing for any case in which either the dependent variable is missing or the predicted value cannot be computed.
DERIVATIVES | Save the derivative variables. The derivative variables are named with the prefix D. to the first six characters of the parameter names. Derivative variables use the print and write formats of the predicted values variable and have no value labels or user-missing values. Derivative variables are saved in the same order as the parameters named on MODEL PROGRAM. Derivatives are saved for all parameters, whether or not the derivative was supplied in the derivatives program.
LOSS | Save the user-specified loss function variable. This specification is available only with CNLR and only if the LOSS subcommand has been specified.

Asymptotic standard errors of predicted values and residuals, and special residuals used for outlier detection and influential case analysis are not provided by the [C]NLR procedure. However, for a squared loss function, the asymptotically correct values for all these statistics can be calculated by using the SAVE subcommand with [C]NLR and then using the REGRESSION procedure. In REGRESSION, the dependent variable is still the same, and derivatives of the model parameters are used as independent variables. Casewise plots, standard errors of prediction, partial regression plots, and other diagnostics of the regression are valid for the nonlinear model.

Example

MODEL PROGRAM A=.5 B=1.6.
COMPUTE PSTOP=A*SPEED**B.
NLR STOP /PRED=PSTOP
  /SAVE=RESID(RSTOP) DERIVATIVES PRED.
REGRESSION VARIABLES=STOP D.A D.B /ORIGIN
  /DEPENDENT=STOP /ENTER D.A D.B /RESIDUALS.

• The SAVE subcommand creates the residuals variable RSTOP and the derivative variables D.A and D.B.

• Because the PRED subcommand identifies PSTOP as the variable for predicted values in the nonlinear model, keyword PRED on SAVE adds the variable PSTOP to the active dataset.

• The new variables are added to the active dataset in the following order: PSTOP, RSTOP, D.A, and D.B.

• The subcommand RESIDUALS for REGRESSION produces the default analysis of residuals.

Related Topics

NLR
Overview (NLR command)
Operations (NLR command)
Examples (NLR command)
MODEL PROGRAM Command (NLR command)
DERIVATIVES Command (NLR command)
CONSTRAINED FUNCTIONS Command (NLR command)
CLEAR MODEL PROGRAMS Command (NLR command)
CNLR and NLR Commands (NLR command)
OUTFILE Subcommand (NLR command)
FILE Subcommand (NLR command)
PRED Subcommand (NLR command)
CRITERIA Subcommand (NLR command)
BOUNDS Subcommand (NLR command)
LOSS Subcommand (NLR command)
BOOTSTRAP Subcommand (NLR command)
References (NLR command)


CRITERIA Subcommand (NLR command)

NLR (command),NLR (command),NLR (command)
CRITERIA subcommand,CRITERIA subcommand,CRITERIA subcommand
CNLR (command),CNLR (command),CNLR (command)
CRITERIA subcommand,CRITERIA subcommand,CRITERIA subcommand
CRITERIA (subcommand),CRITERIA (subcommand),CRITERIA (subcommand)
NLR command,NLR command,NLR command
CRITERIA (subcommand),CRITERIA (subcommand),CRITERIA (subcommand)
CNLR command,CNLR command,CNLR command

CRITERIA controls the values of the cutoff points that are used to stop the iterative calculations in [C]NLR.

• The minimum specification is any of the criteria keywords and an appropriate value. The value can be specified in parentheses after an equals sign, a space, or a comma. Multiple keywords can be specified in any order. Defaults are in effect for keywords that are not specified.

• Keywords available for CRITERIA differ between CNLR and NLR and are discussed separately. However, with both CNLR and NLR, you can specify the critical value for derivative checking.

Related Topics

NLR
Overview (NLR command)
Operations (NLR command)
Examples (NLR command)
MODEL PROGRAM Command (NLR command)
DERIVATIVES Command (NLR command)
CONSTRAINED FUNCTIONS Command (NLR command)
CLEAR MODEL PROGRAMS Command (NLR command)
CNLR and NLR Commands (NLR command)
OUTFILE Subcommand (NLR command)
FILE Subcommand (NLR command)
PRED Subcommand (NLR command)
SAVE Subcommand (NLR command)
BOUNDS Subcommand (NLR command)
LOSS Subcommand (NLR command)
BOOTSTRAP Subcommand (NLR command)
References (NLR command)
Checking Derivatives for CNLR and NLR (NLR command)
Iteration Criteria for CNLR (NLR command)
Iteration Criteria for NLR (NLR command)


Checking Derivatives for CNLR and NLR (NLR command)

Upon entering the first iteration, [C]NLR always checks any derivatives that are calculated on the derivatives program by comparing them with numerically calculated derivatives. For each comparison, it computes an agreement score. A score of 1 indicates agreement to machine precision; a score of 0 indicates definite disagreement. If a score is less than 1, either an incorrect derivative was supplied or there were numerical problems in estimating the derivative. The lower the score, the more likely it is that the supplied derivatives are incorrect. Highly correlated parameters may cause disagreement even when a correct derivative is supplied. Be sure to check the derivatives if the agreement score is not 1.

During the first iteration, [C]NLR checks each derivative score. If any score is below 1, it begins displaying a table to show the worst (lowest) score for each derivative. If any score is below the critical value, the program stops.

To specify the critical value, use the following keyword on CRITERIA:

CKDER (keyword),CKDER (keyword),CKDER (keyword)
CNLR/NLR command,CNLR/NLR command,CNLR/NLR command
NLR (command),NLR (command),NLR (command)
critical value for derivative checking,critical value for derivative checking,critical value for derivative checking
CNLR (command),CNLR (command),CNLR (command)
critical value for derivative checking,critical value for derivative checking,critical value for derivative checking
CKDER n Critical value for derivative checking. Specify a number between 0 and 1 for n. The default is 0.5. Specify 0 to disable this criterion.

Related Topics

CRITERIA Subcommand (NLR command)
Iteration Criteria for CNLR (NLR command)
Iteration Criteria for NLR (NLR command)


Iteration Criteria for CNLR (NLR command)

CNLR (command),CNLR (command),CNLR (command)
iteration criteria,iteration criteria,iteration criteria

The CNLR procedure uses NPSOL (Version 4.0) Fortran Package for Nonlinear Programming (Gill, Murray, Saunders, and Wright, 1986). The CRITERIA subcommand of CNLR gives the control features of NPSOL. The following section summarizes the NPSOL documentation.

sequential quadratic programming,sequential quadratic programming,sequential quadratic programming
CNLR/NLR command,CNLR/NLR command,CNLR/NLR command
NLR (command),NLR (command),NLR (command)
sequential quadratic programming,sequential quadratic programming,sequential quadratic programming
CNLR (command),CNLR (command),CNLR (command)
sequential quadratic programming,sequential quadratic programming,sequential quadratic programming

CNLR uses a sequential quadratic programming algorithm, with a quadratic programming subproblem to determine the search direction. If constraints or bounds are specified, the first step is to find a point that is feasible with respect to those constraints. Each major iteration sets up a quadratic program to find the search direction, p. Minor iterations are used to solve this subproblem. Then, the major iteration determines a steplength α by a line search, and the function is evaluated at the new point. An optimal solution is found when the optimality tolerance criterion is met.

The CRITERIA subcommand has the following keywords when used with CNLR:

NLR (command),NLR (command),NLR (command)
major iterations,major iterations,major iterations
NLR (command),NLR (command),NLR (command)
maximum iterations,maximum iterations,maximum iterations
CNLR (command),CNLR (command),CNLR (command)
major iterations,major iterations,major iterations
CNLR (command),CNLR (command),CNLR (command)
maximum iterations,maximum iterations,maximum iterations
ITER (keyword),ITER (keyword),ITER (keyword)
CNLR command,CNLR command,CNLR command
NLR (command),NLR (command),NLR (command)
minor iterations,minor iterations,minor iterations
CNLR (command),CNLR (command),CNLR (command)
minor iterations,minor iterations,minor iterations
MINORITERATION (keyword),MINORITERATION (keyword),MINORITERATION (keyword)
CNLR command,CNLR command,CNLR command
NLR (command),NLR (command),NLR (command)
crash tolerance,crash tolerance,crash tolerance
CNLR (command),CNLR (command),CNLR (command)
crash tolerance,crash tolerance,crash tolerance
CRSHTOL (keyword),CRSHTOL (keyword),CRSHTOL (keyword)
CNLR command,CNLR command,CNLR command
NLR (command),NLR (command),NLR (command)
step limit,step limit,step limit
CNLR (command),CNLR (command),CNLR (command)
step limit,step limit,step limit
STEPLIMIT (keyword),STEPLIMIT (keyword),STEPLIMIT (keyword)
CNLR command,CNLR command,CNLR command
NLR (command),NLR (command),NLR (command)
feasibility tolerance,feasibility tolerance,feasibility tolerance
CNLR (command),CNLR (command),CNLR (command)
feasibility tolerance,feasibility tolerance,feasibility tolerance
FTOLERANCE (keyword),FTOLERANCE (keyword),FTOLERANCE (keyword)
CNLR command,CNLR command,CNLR command
NLR (command),NLR (command),NLR (command)
linear feasibility tolerance,linear feasibility tolerance,linear feasibility tolerance
CNLR (command),CNLR (command),CNLR (command)
linear feasibility tolerance,linear feasibility tolerance,linear feasibility tolerance
LFTOLERANCE (keyword),LFTOLERANCE (keyword),LFTOLERANCE (keyword)
CNLR command,CNLR command,CNLR command
NLR (command),NLR (command),NLR (command)
nonlinear feasibility tolerance,nonlinear feasibility tolerance,nonlinear feasibility tolerance
CNLR (command),CNLR (command),CNLR (command)
nonlinear feasibility tolerance,nonlinear feasibility tolerance,nonlinear feasibility tolerance
NFTOLERANCE (keyword),NFTOLERANCE (keyword),NFTOLERANCE (keyword)
CNLR command,CNLR command,CNLR command
NLR (command),NLR (command),NLR (command)
line-search tolerance,line-search tolerance,line-search tolerance
CNLR (command),CNLR (command),CNLR (command)
line-search tolerance,line-search tolerance,line-search tolerance
LSTOLERANCE (keyword),LSTOLERANCE (keyword),LSTOLERANCE (keyword)
CNLR command,CNLR command,CNLR command
NLR (command),NLR (command),NLR (command)
optimality tolerance,optimality tolerance,optimality tolerance
CNLR (command),CNLR (command),CNLR (command)
optimality tolerance,optimality tolerance,optimality tolerance
OPTOLERANCE (keyword),OPTOLERANCE (keyword),OPTOLERANCE (keyword)
CNLR command,CNLR command,CNLR command
OPTOLERANCE (keyword),OPTOLERANCE (keyword),OPTOLERANCE (keyword)
CNLR command,CNLR command,CNLR command
NLR (command),NLR (command),NLR (command)
function precision,function precision,function precision
CNLR (command),CNLR (command),CNLR (command)
function precision,function precision,function precision
FPRECISION (keyword),FPRECISION (keyword),FPRECISION (keyword)
CNLR command,CNLR command,CNLR command
NLR (command),NLR (command),NLR (command)
infinite step size,infinite step size,infinite step size
CNLR (command),CNLR (command),CNLR (command)
infinite step size,infinite step size,infinite step size
ISTEP (keyword),ISTEP (keyword),ISTEP (keyword)
CNLR command,CNLR command,CNLR command
ITER n | Maximum number of major iterations. Specify any positive integer for n. The default is max(50, 3(p+mL)+10mN), where p is the number of parameters, mL is the number of linear constraints, and mN is the number of nonlinear constraints. If the search for a solution stops because this limit is exceeded, CNLR issues a warning message.
MINORITERATION n | Maximum number of minor iterations. Specify any positive integer. This value is the number of minor iterations allowed within each major iteration. The default is max(50, 3(n+mL+mN)).
CRSHTOL n | Crash tolerance. CRSHTOL is used to determine whether initial values are within their specified bounds. Specify any value between 0 and 1. The default value is 0.01. A constraint of the form a´X≥l is considered a valid part of the working set if |a'X-l|<CRSHTOL(1+|l|).
STEPLIMIT n | Step limit. The CNLR algorithm does not allow changes in the length of the parameter vector to exceed a factor of n. The limit prevents very early steps from going too far from good initial estimates. Specify any positive value. The default value is 2.
FTOLERANCE n | Feasibility tolerance. This value is the maximum absolute difference allowed for both linear and nonlinear constraints for a solution to be considered feasible. Specify any value greater than 0. The default value is the square root of your machine's epsilon.
LFTOLERANCE n | Linear feasibility tolerance. If specified, this value overrides FTOLERANCE for linear constraints and bounds. Specify any value greater than 0. The default value is the square root of your machine's epsilon.
NFTOLERANCE n | Nonlinear feasibility tolerance. If specified, this value overrides FTOLERANCE for nonlinear constraints. Specify any value greater than 0. The default value is the square root of your machine's epsilon.
LSTOLERANCE n | Line search tolerance. This value must be between 0 and 1 (but not including 1). It controls the accuracy required of the line search that forms the innermost search loop. The default value, 0.9, specifies an inaccurate search. This setting is appropriate for many problems, particularly if nonlinear constraints are involved. A smaller positive value, corresponding to a more accurate line search, may give better performance if there are no nonlinear constraints, all (or most) derivatives are supplied in the derivatives program, and the data fit in memory.
OPTOLERANCE n | Optimality tolerance. If an iteration point is a feasible point, and the next step will not produce a relative change in either the parameter vector or the objective function of more than the square root of OPTOLERANCE, an optimal solution has been found. OPTOLERANCE can also be thought of as the number of significant digits in the objective function at the solution. For example, if OPTOLERANCE=10-6, the objective function should have approximately six significant digits of accuracy. Specify any number between the FPRECISION value and 1. The default value for OPTOLERANCE is epsilon**0.8.
FPRECISION n | Function precision. This measure is a measure of the accuracy with which the objective function can be checked. It acts as a relative precision when the function is large and an absolute precision when the function is small. For example, if the objective function is larger than 1, and six significant digits are desired, FPRECISION should be 1E-6. If, however, the objective function is of the order 0.001, FPRECISION should be 1E-9 to get six digits of accuracy. Specify any number between 0 and 1. The choice of FPRECISION can be very complicated for a badly scaled problem. Chapter 8 of Gill et al. (1981) gives some scaling suggestions. The default value is epsilon**0.9.
ISTEP n | Infinite step size. This value is the magnitude of the change in parameters that is defined as infinite. That is, if the change in the parameters at a step is greater than ISTEP, the problem is considered unbounded, and estimation stops. Specify any positive number. The default value is 1E+20.

Related Topics

CRITERIA Subcommand (NLR command)
Checking Derivatives for CNLR and NLR (NLR command)
Iteration Criteria for NLR (NLR command)


Iteration Criteria for NLR (NLR command)

CRITERIA (subcommand),CRITERIA (subcommand),CRITERIA (subcommand)
NLR command,NLR command,NLR command
NLR (command),NLR (command),NLR (command)
iteration criteria,iteration criteria,iteration criteria
NLR (command),NLR (command),NLR (command)
CRITERIA subcommand,CRITERIA subcommand,CRITERIA subcommand

The NLR procedure uses an adaptation of subroutine LMSTR from the MINPACK package by Garbow et al. Because the NLR algorithm differs substantially from CNLR, the CRITERIA subcommand for NLR has a different set of keywords.

NLR (command),NLR (command),NLR (command)
Levenberg-Marquardt method,Levenberg-Marquardt method,Levenberg-Marquardt method
CNLR (command),CNLR (command),CNLR (command)
Levenberg-Marquardt method,Levenberg-Marquardt method,Levenberg-Marquardt method
Levenberg-Marquardt method,Levenberg-Marquardt method,Levenberg-Marquardt method
CNLR/NLR command,CNLR/NLR command,CNLR/NLR command

NLR computes parameter estimates by using the Levenberg-Marquardt method. At each iteration, NLR evaluates the estimates against a set of control criteria. The iterative calculations continue until one of five cutoff points is met, at which point the iterations stop and the reason for stopping is displayed.

The CRITERIA subcommand has the following keywords when used with NLR:

NLR (command),NLR (command),NLR (command)
maximum iterations,maximum iterations,maximum iterations
CNLR (command),CNLR (command),CNLR (command)
maximum iterations,maximum iterations,maximum iterations
ITER (keyword),ITER (keyword),ITER (keyword)
NLR command,NLR command,NLR command
NLR (command),NLR (command),NLR (command)
sum-of-squares convergence,sum-of-squares convergence,sum-of-squares convergence
CNLR (command),CNLR (command),CNLR (command)
sum-of-squares convergence,sum-of-squares convergence,sum-of-squares convergence
SSCON (keyword),SSCON (keyword),SSCON (keyword)
NLR command,NLR command,NLR command
NLR (command),NLR (command),NLR (command)
parameter convergence,parameter convergence,parameter convergence
CNLR (command),CNLR (command),CNLR (command)
parameter convergence,parameter convergence,parameter convergence
PCON (keyword),PCON (keyword),PCON (keyword)
NLR command,NLR command,NLR command
NLR (command),NLR (command),NLR (command)
residual and derivative correlation convergence,residual and derivative correlation convergence,residual and derivative correlation convergence
CNLR (command),CNLR (command),CNLR (command)
residual and derivative correlation convergence,residual and derivative correlation convergence,residual and derivative correlation convergence
RCON (keyword),RCON (keyword),RCON (keyword)
NLR command,NLR command,NLR command
ITER n | Maximum number of major and minor iterations allowed. Specify any positive integer for n. The default is 100 iterations per parameter. If the search for a solution stops because this limit is exceeded, NLR issues a warning message.
SSCON n | Convergence criterion for the sum of squares. Specify any non-negative number for n. The default is 1E-8. If successive iterations fail to reduce the sum of squares by this proportion, the procedure stops. Specify 0 to disable this criterion.
PCON n | Convergence criterion for the parameter values. Specify any non-negative number for n. The default is 1E-8. If successive iterations fail to change any of the parameter values by this proportion, the procedure stops. Specify 0 to disable this criterion.
RCON n | Convergence criterion for the correlation between the residuals and the derivatives. Specify any non-negative number for n. The default is 1E-8. If the largest value for the correlation between the residuals and the derivatives equals this value, the procedure stops because it lacks the information that it needs to estimate a direction for its next move. This criterion is often referred to as a gradient convergence criterion. Specify 0 to disable this criterion.

Example

MODEL PROGRAM A=.5 B=1.6.
COMPUTE PRED=A*SPEED**B.
NLR STOP /CRITERIA=ITER(80) SSCON=.000001.

• CRITERIA changes two of the five cutoff values affecting iteration, ITER and SSCON, and leaves the remaining three, PCON, RCON, and CKDER, at their default values.

Related Topics

CRITERIA Subcommand (NLR command)
Checking Derivatives for CNLR and NLR (NLR command)
Iteration Criteria for CNLR (NLR command)


BOUNDS Subcommand (NLR command)

CNLR (command),CNLR (command),CNLR (command)
BOUNDS subcommand,BOUNDS subcommand,BOUNDS subcommand
BOUNDS (subcommand),BOUNDS (subcommand),BOUNDS (subcommand)
CNLR command,CNLR command,CNLR command
CNLR (command),CNLR (command),CNLR (command)
linear constraints,linear constraints,linear constraints
CNLR (command),CNLR (command),CNLR (command)
nonlinear constraints,nonlinear constraints,nonlinear constraints

The BOUNDS subcommand can be used to specify both linear and nonlinear constraints. It can be used only with CNLR; it cannot be used with NLR.

Related Topics

NLR
Overview (NLR command)
Operations (NLR command)
Examples (NLR command)
MODEL PROGRAM Command (NLR command)
DERIVATIVES Command (NLR command)
CONSTRAINED FUNCTIONS Command (NLR command)
CLEAR MODEL PROGRAMS Command (NLR command)
CNLR and NLR Commands (NLR command)
OUTFILE Subcommand (NLR command)
FILE Subcommand (NLR command)
PRED Subcommand (NLR command)
SAVE Subcommand (NLR command)
CRITERIA Subcommand (NLR command)
LOSS Subcommand (NLR command)
BOOTSTRAP Subcommand (NLR command)
References (NLR command)
Simple Bounds and Linear Constraints (NLR command)
Nonlinear Constraints (NLR command)


Simple Bounds and Linear Constraints (NLR command)

CNLR (command),CNLR (command),CNLR (command)
simple bounds,simple bounds,simple bounds
CNLR (command),CNLR (command),CNLR (command)
linear constraint,linear constraint,linear constraint
CNLR (command),CNLR (command),CNLR (command)
constraints,constraints,constraints
CNLR (command),CNLR (command),CNLR (command)
parameter constraints,parameter constraints,parameter constraints

BOUNDS can be used to impose bounds on parameter values. These bounds can involve either single parameters or a linear combination of parameters and can be either equalities or inequalities.

• All bounds are specified on the same BOUNDS subcommand and are separated by semicolons.

• The only variables that are allowed on BOUNDS are parameter variables (those variables that are named on MODEL PROGRAM).

• Only * (multiplication), + (addition), - (subtraction), = or EQ, >= or GE, and <= or LE can be used. When two relational operators are used (as in the third bound in the example below), they must both be in the same direction.

Example

  /BOUNDS 5 >= A;
          B >= 9;
          .01 <= 2*A + C <= 1;
          D + 2*E = 10

• BOUNDS imposes bounds on the parameters A, B, C, and D. Specifications for each parameter are separated by a semicolon.

Related Topics

BOUNDS Subcommand (NLR command)
Nonlinear Constraints (NLR command)


Nonlinear Constraints (NLR command)

CNLR (command),CNLR (command),CNLR (command)
nonlinear constraint,nonlinear constraint,nonlinear constraint

Nonlinear constraints on the parameters can also be specified with the BOUNDS subcommand. The constrained function must be calculated and stored in a variable by a constrained functions program directly preceding the CNLR command. The constraint is then specified on the BOUNDS subcommand.

In general, nonlinear bounds will not be obeyed until an optimal solution has been found. This process is different from simple and linear bounds, which are satisfied at each iteration. The constrained functions must be smooth near the solution.

Example

MODEL PROGRAM A=.5 B=1.6.
COMPUTE PRED=A*SPEED**B.

CONSTRAINED FUNCTIONS.
COMPUTE DIFF=A-10**B.

CNLR STOP /BOUNDS DIFF LE 0.

• The constrained function is calculated by a constrained functions program and stored in variable DIFF. The constrained functions program immediately precedes CNLR.

• BOUNDS imposes bounds on the function (less than or equal to 0).

• CONSTRAINED FUNCTIONS variables and parameters that are named on MODEL PROGRAM cannot be combined in the same BOUNDS expression. For example, you cannot specify (DIFF + A) >= 0 on the BOUNDS subcommand.

Related Topics

BOUNDS Subcommand (NLR command)
Simple Bounds and Linear Constraints (NLR command)


LOSS Subcommand (NLR command)

CNLR (command),CNLR (command),CNLR (command)
LOSS subcommand,LOSS subcommand,LOSS subcommand
LOSS (subcommand),LOSS (subcommand),LOSS (subcommand)
CNLR command,CNLR command,CNLR command
loss function,loss function,loss function
CNLR/NLR command,CNLR/NLR command,CNLR/NLR command
CNLR (command),CNLR (command),CNLR (command)
loss function,loss function,loss function

LOSS specifies a loss function for CNLR to minimize. By default, CNLR minimizes the sum of squared residuals. LOSS can be used only with CNLR; it cannot be used with NLR.

• The loss function must first be computed in the model program. LOSS is then used to specify the name of the computed variable.

• The minimizing algorithm may fail if it is given a loss function that is not smooth, such as the absolute value of residuals.

• If derivatives are supplied, the derivative of each parameter must be computed with respect to the loss function, rather than the predicted value. The easiest way to do this is in two steps: First compute derivatives of the model, and then compute derivatives of the loss function with respect to the model and multiply by the model derivatives.

• When LOSS is used, the usual summary statistics are not computed. Standard errors, confidence intervals, and correlations of the parameters are available only if the BOOTSTRAP subcommand is specified.

Example

MODEL PROGRAM  A=1 B=1.
COMPUTE PRED=EXP(A+B*T)/(1+EXP(A+B*T)).
COMPUTE LOSS=-W*(Y*LN(PRED)+(1-Y)*LN(1-PRED)).

DERIVATIVES.
COMPUTE D.A=PRED/(1+EXP(A+B*T)).
COMPUTE D.B=T*PRED/(1+EXP(A+B*T)).
COMPUTE D.A=(-W*(Y/PRED - (1-Y)/(1-PRED)) * D.A).
COMPUTE D.B=(-W*(Y/PRED - (1-Y)/(1-PRED)) * D.B).

CNLR Y /LOSS=LOSS.

• The second COMPUTE command in the model program computes the loss function and stores its values in the variable LOSS, which is then specified on the LOSS subcommand.

• Because derivatives are supplied in the derivatives program, the derivatives of all parameters are computed with respect to the loss function, rather than the predicted value.

Related Topics

NLR
Overview (NLR command)
Operations (NLR command)
Examples (NLR command)
MODEL PROGRAM Command (NLR command)
DERIVATIVES Command (NLR command)
CONSTRAINED FUNCTIONS Command (NLR command)
CLEAR MODEL PROGRAMS Command (NLR command)
CNLR and NLR Commands (NLR command)
OUTFILE Subcommand (NLR command)
FILE Subcommand (NLR command)
PRED Subcommand (NLR command)
SAVE Subcommand (NLR command)
CRITERIA Subcommand (NLR command)
BOUNDS Subcommand (NLR command)
BOOTSTRAP Subcommand (NLR command)
References (NLR command)


BOOTSTRAP Subcommand (NLR command)

CNLR (command),CNLR (command),CNLR (command)
BOOTSTRAP subcommand,BOOTSTRAP subcommand,BOOTSTRAP subcommand
BOOTSTRAP (subcommand),BOOTSTRAP (subcommand),BOOTSTRAP (subcommand)
CNLR command,CNLR command,CNLR command
bootstrap estimates,bootstrap estimates,bootstrap estimates
CNLR/NLR command,CNLR/NLR command,CNLR/NLR command
CNLR (command),CNLR (command),CNLR (command)
bootstrap estimates,bootstrap estimates,bootstrap estimates

BOOTSTRAP provides bootstrap estimates of the parameter standard errors, confidence intervals, and correlations. BOOTSTRAP can be used only with CNLR; it cannot be used with NLR.

Bootstrapping is a way of estimating the standard error of a statistic, using repeated samples from the original data set. This process is done by sampling with replacement to get samples of the same size as the original data set.

• The minimum specification is the subcommand keyword. Optionally, specify the number of samples to use for generating bootstrap results.

• By default, BOOTSTRAP generates bootstrap results based on 10*p*(p+1)/2 samples, where p is the number of parameters. That is, 10 samples are drawn for each statistic (standard error or correlation) to be calculated.

• When BOOTSTRAP is used, the nonlinear equation is estimated for each sample. The standard error of each parameter estimate is then calculated as the standard deviation of the bootstrapped estimates. Parameter values from the original data are used as starting values for each bootstrap sample. Even so, bootstrapping is computationally expensive.

• If the OUTFILE subcommand is specified, a case is written to the output file for each bootstrap sample. The first case in the file will be the actual parameter estimates, followed by the bootstrap samples. After the first case is eliminated (using SELECT IF), other procedures (such as FREQUENCIES) can be used to examine the bootstrap distribution.

Example

MODEL PROGRAM A=.5 B=1.6.
COMPUTE PSTOP=A*SPEED**B.
CNLR STOP /BOOTSTRAP /OUTFILE=PARAM.
GET FILE=PARAM.
LIST.
COMPUTE ID=$CASENUM.
SELECT IF (ID > 1).
FREQUENCIES A B /FORMAT=NOTABLE /HISTOGRAM.

• CNLR generates the bootstrap standard errors, confidence intervals, and parameter correlation matrix. OUTFILE saves the bootstrap estimates in the file PARAM.

• GET retrieves the system file PARAM.

• LIST lists the different sample estimates, along with the original estimate. NCASES in the listing (see OUTFILE Subcommand (NLR command)) refers to the number of distinct cases in the sample because cases are duplicated in each bootstrap sample.

• FREQUENCIES generates histograms of the bootstrapped parameter estimates.

Related Topics

NLR
Overview (NLR command)
Operations (NLR command)
Examples (NLR command)
MODEL PROGRAM Command (NLR command)
DERIVATIVES Command (NLR command)
CONSTRAINED FUNCTIONS Command (NLR command)
CLEAR MODEL PROGRAMS Command (NLR command)
CNLR and NLR Commands (NLR command)
OUTFILE Subcommand (NLR command)
FILE Subcommand (NLR command)
PRED Subcommand (NLR command)
SAVE Subcommand (NLR command)
CRITERIA Subcommand (NLR command)
BOUNDS Subcommand (NLR command)
LOSS Subcommand (NLR command)
References (NLR command)


References (NLR command)

Gill, P. E., W. M. Murray, M. A. Saunders, and M. H. Wright. 1986. User’s guide for NPSOL (version 4.0): A FORTRAN package for nonlinear programming. Technical Report SOL 86-2. Stanford University: Department of Operations Research.

Related Topics

NLR
Overview (NLR command)
Operations (NLR command)
Examples (NLR command)
MODEL PROGRAM Command (NLR command)
DERIVATIVES Command (NLR command)
CONSTRAINED FUNCTIONS Command (NLR command)
CLEAR MODEL PROGRAMS Command (NLR command)
CNLR and NLR Commands (NLR command)
OUTFILE Subcommand (NLR command)
FILE Subcommand (NLR command)
PRED Subcommand (NLR command)
SAVE Subcommand (NLR command)
CRITERIA Subcommand (NLR command)
BOUNDS Subcommand (NLR command)
LOSS Subcommand (NLR command)
BOOTSTRAP Subcommand (NLR command)


NOMREG

Multinomial Logistic Regression,Multinomial Logistic Regression,Multinomial Logistic Regression
command syntax,command syntax,command syntax
NOMREG (command),NOMREG (command),NOMREG (command)
NOMREG (command),NOMREG (command),NOMREG (command)
syntax chart,syntax chart,syntax chart
release history,release history,release history

NOMREG is available in the Regression option.

NOMREG dependent varname [(BASE = {FIRST } ORDER = {ASCENDING**})] [BY factor list]
                                  {LAST**}         {DATA       }
                                  {value }         {DESCENDING }
       [WITH covariate list]

 [/CRITERIA = [CIN({95**})] [DELTA({0**})] [MXITER({100**})] [MXSTEP({5**})]
                   {n   }          {n  }           {n    }           {n  }
             [LCONVERGE({0**})] [PCONVERGE({1.0E-6**})] [SINGULAR({1E-8**})]
                        {n  }              {n       }             {n     }
             [BIAS({0**})] [CHKSEP({20**})]  ]
                   {n  }           {n   }

 [/FULLFACTORIAL]

 [/INTERCEPT = {EXCLUDE   }]
               {INCLUDE** }

 [/MISSING = {EXCLUDE**}]
             {INCLUDE  }

 [/MODEL = {[effect effect ...]} [| {BACKWARD} = { effect effect ...}]]
                                    {FORWARD }
                                    {BSTEP   }
                                    {FSTEP   }

 [/STEPWISE =[RULE({SINGLE**   })][MINEFFECT({0**  })][MAXEFFECT(n)]]
                   {SFACTOR    }             {value}
                   {CONTAINMENT}
                   {NONE       }

             [PIN({0.05**})]  [POUT({0.10**})]
                  {value }          {value }

             [ENTRYMETHOD({LR** })] [REMOVALMETHOD({LR**})]
                          {SCORE}                  {WALD}

 [/OUTFILE = [{MODEL    }(filename)]]
              {PARAMETER}

 [/PRINT = [CELLPROB] [CLASSTABLE] [CORB] [HISTORY({1**})] [IC] ]
                                                   {n  }
           [SUMMARY ] [PARAMETER ] [COVB] [FIT] [LRT] [KERNEL]
     [ASSOCIATION] [CPS**] [STEP**] [MFI**] [NONE]

 [/SAVE = [ACPROB[(newname)]] [ESTPROB[(rootname[:{25**}])] ]
                                                  {n   }
          [PCPROB[(newname)]] [PREDCAT[(newname)]]

 [/SCALE = {1**     }]
           {n       }
           {DEVIANCE}
           {PEARSON }

 [/SUBPOP = varlist]

 [/TEST[(valuelist)] = {[‘label’] effect valuelist effect valuelist...;}]
                       {[‘label’] ALL list;                            }
                       {[‘label’] ALL list                           }

** Default if the subcommand is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See NOMREG Algorithms for computational details for this procedure.

Syntax for the NOMREG command can be generated from the Multinomial Logistic Regression dialog.

Release History Collapse Hide details

Release History

Release 13.0

• ENTRYMETHOD keyword introduced on STEPWISE subcommand.

• REMOVALMETHOD keyword introduced on STEPWISE subcommand.

• IC keyword introduced on PRINT subcommand.

Release 15.0

• ASSOCIATION keyword introduced on PRINT subcommand.

Release 17.0

• Added support for SET THREADS and SET MCACHE.

Example

NOMREG response.

Related Topics

Overview (NOMREG command)
Examples (NOMREG command)
Variable List (NOMREG command)
CRITERIA Subcommand (NOMREG command)
FULLFACTORIAL Subcommand (NOMREG command)
INTERCEPT Subcommand (NOMREG command)
MISSING Subcommand (NOMREG command)
MODEL Subcommand (NOMREG command)
STEPWISE Subcommand (NOMREG command)
OUTFILE Subcommand (NOMREG command)
PRINT Subcommand (NOMREG command)
SAVE Subcommand (NOMREG command)
SCALE Subcommand (NOMREG command)
SUBPOP Subcommand (NOMREG command)
TEST Subcommand (NOMREG command)


Overview (NOMREG command)

NOMREG is a procedure for fitting a multinomial logit model to a polytomous nominal dependent variable.

Options Collapse Hide details

Options

Tuning the algorithm. You can control the values of algorithm-tuning parameters with the CRITERIA subcommand.

Optional output. You can request additional output through the PRINT subcommand.

Exporting the model. You can export the model to an external file. The model information will be written using the Extensible Markup Language (XML).

Basic Specification Collapse Hide details

Basic Specification

The basic specification is one dependent variable.

Operations Collapse Hide details

Operations

• This procedure uses the multithreaded options specified by SET THREADS and SET MCACHE.

Syntax Rules Collapse Hide details

Syntax Rules

• Minimum syntax—at least one dependent variable must be specified.

• The variable specification must come first.

• Subcommands can be specified in any order.

• Empty subcommands except the MODEL subcommand are ignored.

• The MODEL and the FULLFACTORIAL subcommands are mutually exclusive. Only one of them can be specified at any time.

• The MODEL subcommand stepwise options and the TEST subcommand are mutually exclusive. Only one of them can be specified at any time.

• When repeated subcommands except the TEST subcommand are specified, all specifications except the last valid one are discarded.

• The following words are reserved as keywords or internal commands in the NOMREG procedure: BY, WITH, and WITHIN.

• The set of factors and covariates used in the MODEL subcommand (or implied on the FULLFACTORIAL subcommand) must be a subset of the variable list specified or implied on the SUBPOP subcommand.

Related Topics

NOMREG
Examples (NOMREG command)
Variable List (NOMREG command)
CRITERIA Subcommand (NOMREG command)
FULLFACTORIAL Subcommand (NOMREG command)
INTERCEPT Subcommand (NOMREG command)
MISSING Subcommand (NOMREG command)
MODEL Subcommand (NOMREG command)
STEPWISE Subcommand (NOMREG command)
OUTFILE Subcommand (NOMREG command)
PRINT Subcommand (NOMREG command)
SAVE Subcommand (NOMREG command)
SCALE Subcommand (NOMREG command)
SUBPOP Subcommand (NOMREG command)
TEST Subcommand (NOMREG command)


Examples (NOMREG command)

NOMREG
  bfast  BY agecat gender active
  /CRITERIA = CIN(95) DELTA(0) MXITER(100) MXSTEP(5) CHKSEP(20) LCONVERGE(0)
  PCONVERGE(1.0E-6) SINGULAR(1.0E-8)
  /MODEL = agecat active
  /INTERCEPT = INCLUDE
  /PRINT = CELLPROB CLASSTABLE FIT PARAMETER SUMMARY LRT MFI CPS.

• The procedure fits a model for bfast using agecat, gender, and active.

• The MODEL subcommand specifies a main effects model using agecat and active. Though gender is not in the model, it is still used to define subpopulations for fit statistics.

• The PRINT subcommand requests cell probabilities, the classification table, fit statistics, parameter estimates, the model summary, likelihood ratio tests, model fitting information, and the case processing summary.

• All other options are set to their default values.

For discussion of output from this syntax and to place the example in context, see Using Multinomial Logistic Regression to Profile Consumers of Packaged Goods.

1-1 Matched Case Control

NOMREG
  claim  WITH difhgt difwgt difnic difcvd difhaz
  /CRITERIA CIN(95) DELTA(0) MXITER(100) MXSTEP(5) CHKSEP(20) LCONVERGE(0)
  PCONVERGE(0.000001) SINGULAR(0.00000001)
  /MODEL
  /INTERCEPT EXCLUDE
  /PRINT PARAMETER SUMMARY LRT .

• The procedure fits a model for claim using variables difhgt, difwgt, difnic, difcvd, and difhaz as covariates. The values of these variables represent the difference in values between cases and controls.

• The empty MODEL subcommand indicates that a main-effects model using all the covariates will be created. The INTERCEPT subcommand exlcudes the intercept from the model.

• The PRINT subcommand requests the parameter estimates, model summary, and likelihood ratio tests.

• All other options are set to their default values.

For discussion of output from this syntax and to place the example in context, see Using Multinomial Logistic Regression to Analyze a 1-1 Matched Case-Control Study.

Related Topics

NOMREG
Overview (NOMREG command)
Variable List (NOMREG command)
CRITERIA Subcommand (NOMREG command)
FULLFACTORIAL Subcommand (NOMREG command)
INTERCEPT Subcommand (NOMREG command)
MISSING Subcommand (NOMREG command)
MODEL Subcommand (NOMREG command)
STEPWISE Subcommand (NOMREG command)
OUTFILE Subcommand (NOMREG command)
PRINT Subcommand (NOMREG command)
SAVE Subcommand (NOMREG command)
SCALE Subcommand (NOMREG command)
SUBPOP Subcommand (NOMREG command)
TEST Subcommand (NOMREG command)


Variable List (NOMREG command)

Nominal Regression procedure,Nominal Regression procedure,Nominal Regression procedure
variable list,variable list,variable list

The variable list specifies the dependent variable and the factors in the model.

• The dependent variable must be the first specification on NOMREG. It can be of any type (numeric or string). Values of the dependent variable are sorted according to the ORDER specification.

ORDER = ASCENDING | Response categories are sorted in ascending order. The lowest value defines the first category, and the highest value defines the last category.
ORDER = DATA | Response categories are not sorted. The first value encountered in the data defines the first category. The last distinct value defines the last category.
ORDER = DESCENDING | Response categories are sorted in descending order. The highest value defines the first category, and the lowest value defines the last category.

• By default, the last response category is used as the base (or reference) category. No model parameters are assigned to the base category. Use the BASE attribute to specify a custom base category.

BASE = FIRST | The first category is the base category.
BASE = LAST | The last category is the base category.
BASE = value | The category with the specified value is the base category. Put the value inside a pair of quotes if either the value is formatted (such as date or currency) or if the dependent variable is the string type.
BY (keyword),BY (keyword),BY (keyword)
NOMREG command,NOMREG command,NOMREG command
NOMREG (command),NOMREG (command),NOMREG (command)
BY keyword,BY keyword,BY keyword

• Factor variables can be of any type (numeric or string). The factors follow the dependent variable separated by the keyword BY.

WITH (keyword),WITH (keyword),WITH (keyword)
NOMREG command,NOMREG command,NOMREG command
NOMREG (command),NOMREG (command),NOMREG (command)
WITH keyword,WITH keyword,WITH keyword

• Covariate variables must be numeric. The covariates follow the factors, separated by the keyword WITH.

• Listwise deletion is used. If any variables in a case contain missing values, that case will be excluded.

• If the WEIGHT command was specified, the actual weight values are used for the respective category combination. No rounding or truncation will be done. However, cases with negative and zero weight values are excluded from the analyses.

Example

NOMREG response (ORDER = DESCENDING BASE='No') BY factor1.

• Values of the variable response are sorted in descending order, and the category whose value is No is the base category.

Example

NOMREG
  movie  BY gender date
  /CRITERIA = CIN(95) DELTA(0) MXITER(100) MXSTEP(5) LCONVERGE(0)
              PCONVERGE(0)
  /INTERCEPT = EXCLUDE
  /PRINT = CLASSTABLE FIT PARAMETER SUMMARY LRT .

• The dependent variable is movie, and gender and date are factors.

• CRITERIA specifies that the confidence level to use is 95, no delta value should be added to cells with observed zero frequency, and neither the log-likelihood nor parameter estimates convergence criteria should be used. This means that the procedure will stop when either 100 iterations or five step-halving operations have been performed.

• INTERCEPT specifies that the intercept should be excluded from the model.

• PRINT specifies that the classification table, goodness-of-fit statistics, parameter statistics, model summary, and likelihood-ratio tests should be displayed.

Related Topics

NOMREG
Overview (NOMREG command)
Examples (NOMREG command)
CRITERIA Subcommand (NOMREG command)
FULLFACTORIAL Subcommand (NOMREG command)
INTERCEPT Subcommand (NOMREG command)
MISSING Subcommand (NOMREG command)
MODEL Subcommand (NOMREG command)
STEPWISE Subcommand (NOMREG command)
OUTFILE Subcommand (NOMREG command)
PRINT Subcommand (NOMREG command)
SAVE Subcommand (NOMREG command)
SCALE Subcommand (NOMREG command)
SUBPOP Subcommand (NOMREG command)
TEST Subcommand (NOMREG command)


CRITERIA Subcommand (NOMREG command)

CRITERIA (subcommand),CRITERIA (subcommand),CRITERIA (subcommand)
NOMREG command,NOMREG command,NOMREG command
NOMREG (command),NOMREG (command),NOMREG (command)
CRITERIA subcommand,CRITERIA subcommand,CRITERIA subcommand

The CRITERIA subcommand offers controls on the iterative algorithm used for estimation and specifies numerical tolerance for checking singularity.

BIAS (keyword),BIAS (keyword),BIAS (keyword)
NOMREG command,NOMREG command,NOMREG command
CHKSEP (keyword),CHKSEP (keyword),CHKSEP (keyword)
NOMREG command,NOMREG command,NOMREG command
CIN (keyword),CIN (keyword),CIN (keyword)
NOMREG command,NOMREG command,NOMREG command
DELTA (keyword),DELTA (keyword),DELTA (keyword)
NOMREG command,NOMREG command,NOMREG command
LCONVERGE (keyword),LCONVERGE (keyword),LCONVERGE (keyword)
NOMREG command,NOMREG command,NOMREG command
MXITER (keyword),MXITER (keyword),MXITER (keyword)
NOMREG command,NOMREG command,NOMREG command
MXSTEP (keyword),MXSTEP (keyword),MXSTEP (keyword)
NOMREG command,NOMREG command,NOMREG command
PCONVERGE (keyword),PCONVERGE (keyword),PCONVERGE (keyword)
NOMREG command,NOMREG command,NOMREG command
SINGULAR (keyword),SINGULAR (keyword),SINGULAR (keyword)
NOMREG command,NOMREG command,NOMREG command
BIAS(n) | Bias value added to observed cell frequency. Specify a non-negative value less than 1. The default value is 0.
CHKSEP(n) | Starting iteration for checking for complete separation. Specify a non-negative integer. The default value is 20.
CIN(n) | Confidence interval level. Specify a value greater than or equal to 0 and less than 100. The default value is 95.
DELTA(n) | Delta value added to zero cell frequency. Specify a non-negative value less than 1. The default value is 0.
LCONVERGE(n) | Log-likelihood function convergence criterion. Convergence is assumed if the absolute change in the log-likelihood function is less than this value. The criterion is not used if the value is 0. Specify a non-negative value. The default value is 0.
MXITER(n) | Maximum number of iterations. Specify a positive integer. The default value is 100.
MXSTEP(n) | Maximum step-halving allowed. Specify a positive integer. The default value is 5.
PCONVERGE(a) | Parameter estimates convergence criterion. Convergence is assumed if the absolute change in the parameter estimates is less than this value. The criterion is not used if the value is 0. Specify a non-negative value. The default value is 10-6.
SINGULAR(a) | Value used as tolerance in checking singularity. Specify a positive value. The default value is 10-8.

Related Topics

NOMREG
Overview (NOMREG command)
Examples (NOMREG command)
Variable List (NOMREG command)
FULLFACTORIAL Subcommand (NOMREG command)
INTERCEPT Subcommand (NOMREG command)
MISSING Subcommand (NOMREG command)
MODEL Subcommand (NOMREG command)
STEPWISE Subcommand (NOMREG command)
OUTFILE Subcommand (NOMREG command)
PRINT Subcommand (NOMREG command)
SAVE Subcommand (NOMREG command)
SCALE Subcommand (NOMREG command)
SUBPOP Subcommand (NOMREG command)
TEST Subcommand (NOMREG command)


FULLFACTORIAL Subcommand (NOMREG command)

FULLFACTORIAL (subcommand),FULLFACTORIAL (subcommand),FULLFACTORIAL (subcommand)
NOMREG command,NOMREG command,NOMREG command
NOMREG (command),NOMREG (command),NOMREG (command)
FULLFACTORIAL subcommand,FULLFACTORIAL subcommand,FULLFACTORIAL subcommand

The FULLFACTORIAL subcommand generates a specific model: first, the intercept (if included); second, all of the covariates (if specified), in the order in which they are specified; next, all of the main factorial effects; next, all of the two-way factorial interaction effects, all of the three-way factorial interaction effects, and so on, up to the highest possible interaction effect.

• The FULLFACTORIAL and the MODEL subcommands are mutually exclusive. Only one of them can be specified at any time.

• The FULLFACTORIAL subcommand does not take any keywords.

Related Topics

NOMREG
Overview (NOMREG command)
Examples (NOMREG command)
Variable List (NOMREG command)
CRITERIA Subcommand (NOMREG command)
INTERCEPT Subcommand (NOMREG command)
MISSING Subcommand (NOMREG command)
MODEL Subcommand (NOMREG command)
STEPWISE Subcommand (NOMREG command)
OUTFILE Subcommand (NOMREG command)
PRINT Subcommand (NOMREG command)
SAVE Subcommand (NOMREG command)
SCALE Subcommand (NOMREG command)
SUBPOP Subcommand (NOMREG command)
TEST Subcommand (NOMREG command)


INTERCEPT Subcommand (NOMREG command)

INTERCEPT (subcommand),INTERCEPT (subcommand),INTERCEPT (subcommand)
NOMREG command,NOMREG command,NOMREG command
NOMREG (command),NOMREG (command),NOMREG (command)
INTERCEPT subcommand,INTERCEPT subcommand,INTERCEPT subcommand

The INTERCEPT subcommand controls whether intercept terms are included in the model. The number of intercept terms is the number of response categories less one.

INCLUDE (keyword),INCLUDE (keyword),INCLUDE (keyword)
NOMREG command,NOMREG command,NOMREG command
EXCLUDE (keyword),EXCLUDE (keyword),EXCLUDE (keyword)
NOMREG command,NOMREG command,NOMREG command
INCLUDE | Includes the intercept terms. This is the default.
EXCLUDE | Excludes the intercept terms.

Related Topics

NOMREG
Overview (NOMREG command)
Examples (NOMREG command)
Variable List (NOMREG command)
CRITERIA Subcommand (NOMREG command)
FULLFACTORIAL Subcommand (NOMREG command)
MISSING Subcommand (NOMREG command)
MODEL Subcommand (NOMREG command)
STEPWISE Subcommand (NOMREG command)
OUTFILE Subcommand (NOMREG command)
PRINT Subcommand (NOMREG command)
SAVE Subcommand (NOMREG command)
SCALE Subcommand (NOMREG command)
SUBPOP Subcommand (NOMREG command)
TEST Subcommand (NOMREG command)


MISSING Subcommand (NOMREG command)

MISSING (subcommand),MISSING (subcommand),MISSING (subcommand)
NOMREG command,NOMREG command,NOMREG command
NOMREG (command),NOMREG (command),NOMREG (command)
MISSING subcommand,MISSING subcommand,MISSING subcommand
missing values,missing values,missing values
NOMREG command,NOMREG command,NOMREG command
NOMREG (command),NOMREG (command),NOMREG (command)
missing values,missing values,missing values

By default, cases with missing values for any of the variables on the NOMREG variable list are excluded from the analysis. The MISSING subcommand allows you to include cases with user-missing values.

• Note that missing values are deleted at the subpopulation level.

EXCLUDE (keyword),EXCLUDE (keyword),EXCLUDE (keyword)
NOMREG command,NOMREG command,NOMREG command
INCLUDE (keyword),INCLUDE (keyword),INCLUDE (keyword)
NOMREG command,NOMREG command,NOMREG command
EXCLUDE | Excludes both user-missing and system-missing values. This is the default.
INCLUDE | User-missing values are treated as valid. System-missing values cannot be included in the analysis.

Related Topics

NOMREG
Overview (NOMREG command)
Examples (NOMREG command)
Variable List (NOMREG command)
CRITERIA Subcommand (NOMREG command)
FULLFACTORIAL Subcommand (NOMREG command)
INTERCEPT Subcommand (NOMREG command)
MODEL Subcommand (NOMREG command)
STEPWISE Subcommand (NOMREG command)
OUTFILE Subcommand (NOMREG command)
PRINT Subcommand (NOMREG command)
SAVE Subcommand (NOMREG command)
SCALE Subcommand (NOMREG command)
SUBPOP Subcommand (NOMREG command)
TEST Subcommand (NOMREG command)


MODEL Subcommand (NOMREG command)

MODEL (subcommand),MODEL (subcommand),MODEL (subcommand)
NOMREG command,NOMREG command,NOMREG command
NOMREG (command),NOMREG (command),NOMREG (command)
MODEL subcommand,MODEL subcommand,MODEL subcommand

The MODEL subcommand specifies the effects in the model.

• The MODEL and the FULLFACTORIAL subcommands are mutually exclusive. Only one of them can be specified at any time.

• If more than one MODEL subcommand is specified, only the last one is in effect.

• Specify a list of terms to be included in the model, separated by commas or spaces. If the MODEL subcommand is omitted or empty, the default model is generated. The default model contains: first, the intercept (if included); second, all of the covariates (if specified), in the order in which they are specified; and next, all of the main factorial effects, in the order in which they are specified.

• If a SUBPOP subcommand is specified, then effects specified in the MODEL subcommand can only be composed using the variables listed on the SUBPOP subcommand.

• To include a main-effect term, enter the name of the factor on the MODEL subcommand.

BY (keyword),BY (keyword),BY (keyword)
NOMREG subcommand,NOMREG subcommand,NOMREG subcommand

• To include an interaction-effect term among factors, use the keyword BY or the asterisk (*) to join factors involved in the interaction. For example, A*B*C means a three-way interaction effect of A, B, and C, where A, B, and C are factors. The expression A BY B BY C is equivalent to A*B*C. Factors inside an interaction effect must be distinct. Expressions such as A*C*A and A*A are invalid.

WITHIN (keyword),WITHIN (keyword),WITHIN (keyword)
NOMREG subcommand,NOMREG subcommand,NOMREG subcommand

• To include a nested-effect term, use the keyword WITHIN or a pair of parentheses on the MODEL subcommand. For example, A(B) means that A is nested within B, where A and B are factors. The expression A WITHIN B is equivalent to A(B). Factors inside a nested effect must be distinct. Expressions such as A(A) and A(B*A) are invalid.

• Multiple-level nesting is supported. For example, A(B(C)) means that B is nested within C, and A is nested within B(C). When more than one pair of parentheses is present, each pair of parentheses must be enclosed or nested within another pair of parentheses. Thus, A(B)(C) is not valid.

• Nesting within an interaction effect is valid. For example, A(B*C) means that A is nested within B*C.

• Interactions among nested effects are allowed. The correct syntax is the interaction followed by the common nested effect inside the parentheses. For example, interaction between A and B within levels of C should be specified as A*B(C) instead of A(C)*B(C).

• To include a covariate term in the model, enter the name of the covariate on the MODEL subcommand.

• Covariates can be connected, but not nested, using the keyword BY or the asterisk (*) operator. For example, X*X is the product of X and itself. This is equivalent to a covariate whose values are the square of those of X. However, X(Y) is invalid.

• Factor and covariate effects can be connected in many ways. No effects can be nested within a covariate effect. Suppose A and B are factors, and X and Y are covariates. Examples of valid combination of factor and covariate effects are A*X, A*B*X, X(A), X(A*B), X*A(B), X*Y(A*B), and A*B*X*Y.

• A stepwise method can be specified by following the model effects with a vertical bar (|), a stepwise method keyword, an equals sign (=), and a list of variables (or interactions or nested effects) for which the method is to be used.

• If a stepwise method is specified, then the TEST subcommand is ignored.

• If a stepwise method is specified, then it begins with the results of the model defined on the left side of the MODEL subcommand.

• If a stepwise method is specified but no effects are specified on the left side of the MODEL subcommand, then the initial model contains the intercept only (if INTERCEPT = INCLUDE) or the initial model is the null model (if INTERCEPT = EXCLUDE).

• The intercept cannot be specified as an effect in the stepwise method option.

• For all stepwise methods, if two effects have tied significance levels, then the removal or entry is performed on the effect specified first. For example, if the right side of the MODEL subcommand specifies FORWARD A*B A(B), where A*B and A(B) have the same significance level less than PIN, then A*B is entered because it is specified first.

The available stepwise method keywords are:

BACKWARD (keyword),BACKWARD (keyword),BACKWARD (keyword)
NOMREG command,NOMREG command,NOMREG command
FORWARD (keyword),FORWARD (keyword),FORWARD (keyword)
NOMREG command,NOMREG command,NOMREG command
BSTEP (keyword),BSTEP (keyword),BSTEP (keyword)
NOMREG command,NOMREG command,NOMREG command
FSTEP (keyword),FSTEP (keyword),FSTEP (keyword)
NOMREG command,NOMREG command,NOMREG command
BACKWARD | Backward elimination. As a first step, the variables (or interaction effects or nested effects) specified on BACKWARD are entered into the model together and are tested for removal one by one. The variable with the largest significance level of the likelihood-ratio statistic, provided that the value is larger than POUT, is removed, and the model is reestimated. This process continues until no more variables meet the removal criterion or when the current model is the same as a previous model.
FORWARD | Forward entry. The variables (or interaction effects or nested effects) specified on FORWARD are tested for entry into the model one by one, based on the significance level of the likelihood-ratio statistic. The variable with the smallest significance level less than PIN is entered into the model, and the model is reestimated. Model building stops when no more variables meet the entry criteria.
BSTEP | Backward stepwise. As a first step, the variables (or interaction effects or nested effects) specified on BSTEP are entered into the model together and are tested for removal one by one. The variable with the largest significance level of the likelihood-ratio statistic, provided that the value is larger than POUT, is removed, and the model is reestimated. This process continues until no more variables meet the removal criterion. Next, variables not in the model are tested for possible entry, based on the significance level of the likelihood-ratio statistic. The variable with the smallest significance level less than PIN is entered, and the model is reestimated. This process repeats, with variables in the model again evaluated for removal. Model building stops when no more variables meet the removal or entry criteria or when the current model is the same as a previous model.
FSTEP | Forward stepwise. The variables (or interaction effects or nested effects) specified on FSTEP are tested for entry into the model one by one, based on the significance level of the likelihood-ratio statistic. The variable with the smallest significance level less than PIN is entered into the model, and the model is reestimated. Next, variables that are already in the model are tested for removal, based on the significance level of the likelihood-ratio statistic. The variable with the largest probability greater than the specified POUT value is removed, and the model is reestimated. Variables in the model are then evaluated again for removal. Once no more variables satisfy the removal criterion, variables not in the model are evaluated again for entry. Model building stops when no more variables meet the entry or removal criteria or when the current model is the same as a previous one.

Examples

NOMREG y BY a b c
/INTERCEPT = INCLUDE
/MODEL = a b c | BACKWARD = a*b a*c b*c a*b*c.

• The initial model contains the intercept and main effects a, b, and c. Backward elimination is used to select among the two- and three-way interaction effects.

NOMREG y BY a b c
/MODEL = INTERCEPT | FORWARD = a b c.

• The initial model contains the intercept. Forward entry is used to select among the main effects a, b, and c.

NOMREG y BY a b c
/INTERCEPT = INCLUDE
/MODEL = | FORWARD = a b c.

• The initial model contains the intercept. Forward entry is used to select among the main effects a, b, and c.

NOMREG y BY a b c
/INTERCEPT = EXCLUDE
/MODEL = | BSTEP = a b c.

• The initial model is the null model. Backward stepwise is used to select among the main effects a, b, and c.

NOMREG y BY a b c
/MODEL = | FSTEP =.

• This MODEL specification yields a syntax error.

Related Topics

NOMREG
Overview (NOMREG command)
Examples (NOMREG command)
Variable List (NOMREG command)
CRITERIA Subcommand (NOMREG command)
FULLFACTORIAL Subcommand (NOMREG command)
INTERCEPT Subcommand (NOMREG command)
MISSING Subcommand (NOMREG command)
STEPWISE Subcommand (NOMREG command)
OUTFILE Subcommand (NOMREG command)
PRINT Subcommand (NOMREG command)
SAVE Subcommand (NOMREG command)
SCALE Subcommand (NOMREG command)
SUBPOP Subcommand (NOMREG command)
TEST Subcommand (NOMREG command)


STEPWISE Subcommand (NOMREG command)

The STEPWISE subcommand gives you control of the statistical criteria when stepwise methods are used to build a model. This subcommand is ignored if a stepwise method is not specified on the MODEL subcommand.

RULE (keyword),RULE (keyword),RULE (keyword)
NOMREG command,NOMREG command,NOMREG command
MINEFFECT (keyword),MINEFFECT (keyword),MINEFFECT (keyword)
NOMREG command,NOMREG command,NOMREG command
MAXEFFECT (keyword),MAXEFFECT (keyword),MAXEFFECT (keyword)
NOMREG command,NOMREG command,NOMREG command
ENTRYMETHOD (keyword),ENTRYMETHOD (keyword),ENTRYMETHOD (keyword)
NOMREG command,NOMREG command,NOMREG command
LR (keyword),LR (keyword),LR (keyword)
NOMREG command,NOMREG command,NOMREG command
SCORE (keyword),SCORE (keyword),SCORE (keyword)
NOMREG command,NOMREG command,NOMREG command
REMOVALMETHOD (keyword),REMOVALMETHOD (keyword),REMOVALMETHOD (keyword)
NOMREG command,NOMREG command,NOMREG command
LR (keyword),LR (keyword),LR (keyword)
NOMREG command,NOMREG command,NOMREG command
WALD (keyword),WALD (keyword),WALD (keyword)
NOMREG command,NOMREG command,NOMREG command
PIN (keyword),PIN (keyword),PIN (keyword)
NOMREG command,NOMREG command,NOMREG command
POUT (keyword),POUT (keyword),POUT (keyword)
NOMREG command,NOMREG command,NOMREG command
RULE(keyword) | Rule for entering or removing terms in stepwise methods. The default SINGLE indicates that only one effect can be entered or removed at a time, provided that the hierarchy requirement is satisfied for all effects in the model. SFACTOR indicates that only one effect can be entered or removed at a time, provided that the hierarchy requirement is satisfied for all factor-only effects in the model. CONTAINMENT indicates that only one effect can be entered or removed at a time, provided that the containment requirement is satisfied for all effects in the model. NONE indicates that only one effect can be entered or removed at a time, where neither the hierarchy nor the containment requirement need be satisfied for any effects in the model.
MINEFFECT(n) | Minimum number of effects in final model. The default is 0. The intercept, if any, is not counted among the effects. This criterion is ignored unless one of the stepwise methods BACKWARD or BSTEP is specified.
MAXEFFECT(n) | Maximum number of effects in final model. The default value is the total number of effects specified or implied on the NOMREG command. The intercept, if any, is not counted among the effects. This criterion is ignored unless one of the stepwise methods FORWARD or FSTEP is specified.
ENTRYMETHOD(keyword)
 | Method for entering terms in stepwise methods. The default LR indicates that the likelihood ratio test is used to determine whether a term is entered into the model. SCORE indicates that the score test is used. This criterion is ignored unless one of the stepwise methods FORWARD, BSTEP, or FSTEP is specified.
REMOVALMETHOD(keyword)
 | Method for removing terms in stepwise methods. The default LR indicates that the likelihood ratio test is used to determine whether a term is entered into the model. WALD indicates that the Wald test is used. This criterion is ignored unless one of the stepwise methods BACKWARD, BSTEP, or FSTEP is specified.
PIN(a) | Probability of the likelihood-ratio statistic for variable entry. The default is 0.05. The larger the specified probability, the easier it is for a variable to enter the model. This criterion is ignored unless one of the stepwise methods FORWARD, BSTEP, or FSTEP is specified.
POUT(a) | Probability of the likelihood-ratio statistic for variable removal. The default is 0.1. The larger the specified probability, the easier it is for a variable to remain in the model. This criterion is ignored unless one of the stepwise methods BACKWARD, BSTEP, or FSTEP is specified.

The hierarchy requirement stipulates that among the effects specified or implied on the MODEL subcommand, for any effect to be in a model, all lower-order effects that are part of the former effect must also be in the model. For example, if A, X, and A*X are specified, then for A*X to be in a model, the effects A and X must also be in the model.

The containment requirement stipulates that among the effects specified or implied on the MODEL subcommand, for any effect to be in the model, all effects contained in the former effect must also be in the model. For any two effects F and F’, F is contained in F’ if:

• Both effects F and F’ involve the same covariate effect, if any. (Note that effects A*X and A*X*X are not considered to involve the same covariate effect because the first involves covariate effect X and the second involves covariate effect X**2.)

• F’ consists of more factors than F.

• All factors in F also appear in F’.

The following table illustrates how the hierarchy and containment requirements relate to the RULE options. Each row of the table gives a different set of effects specified on the MODEL subcommand. The columns correspond to the RULE options SINGLE, SFACTOR, and CONTAINMENT. The cells contain the order in which effects must occur in the model. For example, unless otherwise noted, all effects numbered 1 must be in the model for any effects numbered 2 to be in the model.

Hierarchy and containment requirements
Effects | SINGLE | SFACTOR | CONTAINMENT
A, B, A*B | 1. A, B | 1. A, B | 1. A, B
 | 2. A*B | 2. A*B | 2. A*B
X, X**2, X**3 | 1. X 2. X**2 3. X**3 | Effects can occur in the model in any order. | Effects can occur in the model in any order.
A, X, X(A) | 1. A, X 2. X(A) | Effects can occur in the model in any order. | 1. X 2. X(A) Effect A can occur in the model in any order.
A, X, X**2(A) | 1. A, X 2. X**2(A) | Effects can occur in the model in any order. | Effects can occur in the model in any order.

Related Topics

NOMREG
Overview (NOMREG command)
Examples (NOMREG command)
Variable List (NOMREG command)
CRITERIA Subcommand (NOMREG command)
FULLFACTORIAL Subcommand (NOMREG command)
INTERCEPT Subcommand (NOMREG command)
MISSING Subcommand (NOMREG command)
MODEL Subcommand (NOMREG command)
OUTFILE Subcommand (NOMREG command)
PRINT Subcommand (NOMREG command)
SAVE Subcommand (NOMREG command)
SCALE Subcommand (NOMREG command)
SUBPOP Subcommand (NOMREG command)
TEST Subcommand (NOMREG command)


OUTFILE Subcommand (NOMREG command)

OUTFILE (subcommand),OUTFILE (subcommand),OUTFILE (subcommand)
NOMREG command,NOMREG command,NOMREG command
NOMREG (command),NOMREG (command),NOMREG (command)
OUTFILE subcommand,OUTFILE subcommand,OUTFILE subcommand

The OUTFILE subcommand allows you to specify files to which output is written.

• Only one OUTFILE subcommand is allowed. If you specify more than one, only the last one is executed.

• You must specify at least one keyword and a valid filename in parentheses. There is no default.

• Neither MODEL nor PARAMETER is honored if split file processing is on (SPLIT FILE command) or if more than one dependent (DEPENDENT subcommand) variable is specified.

MODEL (keyword),MODEL (keyword),MODEL (keyword)
NOMREG command,NOMREG command,NOMREG command
PARAMETER (keyword),PARAMETER (keyword),PARAMETER (keyword)
NOMREG command,NOMREG command,NOMREG command
MODEL(filename) | Write parameter estimates and their covariances to an XML (PMML) file. Specify the filename in full. NOMREG does not supply an extension. SmartScore and PASW Statistics Server (a separate product) can use this model file to apply the model information to other data files for scoring purposes.
PARAMETER(filename) | Write parameter estimates only to an XML (PMML) file. Specify the filename in full. NOMREG does not supply an extension. SmartScore and PASW Statistics Server (a separate product) can use this model file to apply the model information to other data files for scoring purposes.

Related Topics

NOMREG
Overview (NOMREG command)
Examples (NOMREG command)
Variable List (NOMREG command)
CRITERIA Subcommand (NOMREG command)
FULLFACTORIAL Subcommand (NOMREG command)
INTERCEPT Subcommand (NOMREG command)
MISSING Subcommand (NOMREG command)
MODEL Subcommand (NOMREG command)
STEPWISE Subcommand (NOMREG command)
PRINT Subcommand (NOMREG command)
SAVE Subcommand (NOMREG command)
SCALE Subcommand (NOMREG command)
SUBPOP Subcommand (NOMREG command)
TEST Subcommand (NOMREG command)


PRINT Subcommand (NOMREG command)

PRINT (subcommand),PRINT (subcommand),PRINT (subcommand)
NOMREG command,NOMREG command,NOMREG command
NOMREG (command),NOMREG (command),NOMREG (command)
PRINT subcommand,PRINT subcommand,PRINT subcommand

The PRINT subcommand displays optional output. If no PRINT subcommand is specified, the default output includes a factor information table.

CELLPROB (keyword),CELLPROB (keyword),CELLPROB (keyword)
NOMREG command,NOMREG command,NOMREG command
CLASSTABLE (keyword),CLASSTABLE (keyword),CLASSTABLE (keyword)
NOMREG command,NOMREG command,NOMREG command
CORB (keyword),CORB (keyword),CORB (keyword)
NOMREG command,NOMREG command,NOMREG command
COVB (keyword),COVB (keyword),COVB (keyword)
NOMREG command,NOMREG command,NOMREG command
FIT (keyword),FIT (keyword),FIT (keyword)
NOMREG command,NOMREG command,NOMREG command
HISTORY (keyword),HISTORY (keyword),HISTORY (keyword)
NOMREG command,NOMREG command,NOMREG command
IC (keyword),IC (keyword),IC (keyword)
NOMREG command,NOMREG command,NOMREG command
KERNEL (keyword),KERNEL (keyword),KERNEL (keyword)
NOMREG command,NOMREG command,NOMREG command
LRT (keyword),LRT (keyword),LRT (keyword)
NOMREG command,NOMREG command,NOMREG command
PARAMETER (keyword),PARAMETER (keyword),PARAMETER (keyword)
NOMREG command,NOMREG command,NOMREG command
SUMMARY (keyword),SUMMARY (keyword),SUMMARY (keyword)
NOMREG command,NOMREG command,NOMREG command
CPS (keyword),CPS (keyword),CPS (keyword)
NOMREG command,NOMREG command,NOMREG command
STEP (keyword),STEP (keyword),STEP (keyword)
NOMREG command,NOMREG command,NOMREG command
MFI (keyword),MFI (keyword),MFI (keyword)
NOMREG command,NOMREG command,NOMREG command
ASSOCIATION (keyword),ASSOCIATION (keyword),ASSOCIATION (keyword)
NOMREG command,NOMREG command,NOMREG command
NONE (keyword),NONE (keyword),NONE (keyword)
NOMREG command,NOMREG command,NOMREG command
ASSOCIATION | Measures of Monotone Association. Displays a table with information on the number of concordant pairs, discordant pairs, and tied pairs. The Somers' D, Goodman and Kruskal's Gamma, Kendall's tau-a, and Concordance Index C are also displayed in this table.
CELLPROB | Observed proportion, expected probability, and the residual for each covariate pattern and each response category.
CLASSTABLE | Classification table. The square table of frequencies of observed response categories versus the predicted response categories. Each case is classified into the category with the highest predicted probability.
CORB | Asymptotic correlation matrix of the parameter estimates.
COVB | Asymptotic covariance matrix of the parameter estimates.
FIT | Goodness-of-fit statistics. The change in chi-square statistics with respect to a model with intercept terms only (or to a null model when INTERCEPT= EXCLUDE ). The table contains the Pearson chi-square and the likelihood-ratio chi-square statistics. The statistics are computed based on the subpopulation classification specified on the SUBPOP subcommand or the default classification.
HISTORY(n) | Iteration history. The table contains log-likelihood function value and parameter estimates at every nth iteration beginning with the 0th iteration (the initial estimates). The default is to print every iteration (n = 1). The last iteration is always printed if HISTORY is specified, regardless of the value of n.
IC | Information criteria. The Akaike Information Criterion (AIC) and the Schwarz Bayesian Information Criterion (BIC) are displayed.
KERNEL | Kernel of the log-likelihood. Displays the value of the kernel of the –2 log-likelihood. The default is to display the full –2 log-likelihood. Note that this keyword has no effect unless the MFI or LRT keywords are specified.
LRT | Likelihood-ratio tests. The table contains the likelihood-ratio test statistics for the model and model partial effects. If LRT is not specified, just the model test statistic is printed.
PARAMETER | Parameter estimates.
SUMMARY | Model summary. Cox and Snell’s, Nagelkerke’s, and McFadden’s R2 statistics.
CPS | Case processing summary. This table contains information about the specified categorical variables. Displayed by default.
STEP | Step summary. This table summarizes the effects entered or removed at each step in a stepwise method. Displayed by default if a stepwise method is specified. This keyword is ignored if no stepwise method is specified.
MFI | Model fitting information. This table compares the fitted and intercept-only or null models. Displayed by default.
NON | No statistics are displayed. This option overrides all other specifications on the PRINT subcommand.

Related Topics

NOMREG
Overview (NOMREG command)
Examples (NOMREG command)
Variable List (NOMREG command)
CRITERIA Subcommand (NOMREG command)
FULLFACTORIAL Subcommand (NOMREG command)
INTERCEPT Subcommand (NOMREG command)
MISSING Subcommand (NOMREG command)
MODEL Subcommand (NOMREG command)
STEPWISE Subcommand (NOMREG command)
OUTFILE Subcommand (NOMREG command)
SAVE Subcommand (NOMREG command)
SCALE Subcommand (NOMREG command)
SUBPOP Subcommand (NOMREG command)
TEST Subcommand (NOMREG command)


SAVE Subcommand (NOMREG command)

The SAVE subcommand puts casewise post-estimation statistics back into the active file.

• The new names must be valid variable names and not currently used in the active dataset.

• The rootname must be a valid variable name.

• The rootname can be followed by the number of predicted probabilities saved. The number is a positive integer. For example, if the integer is 5, then the first five predicted probabilities across all split files (if applicable) are saved. The default is 25.

• The new variables are saved into the active file in the order in which the keywords are specified on the subcommand.

ACPROB (keyword),ACPROB (keyword),ACPROB (keyword)
NOMREG command,NOMREG command,NOMREG command
ESTPROB (keyword),ESTPROB (keyword),ESTPROB (keyword)
NOMREG command,NOMREG command,NOMREG command
PCPROB (keyword),PCPROB (keyword),PCPROB (keyword)
NOMREG command,NOMREG command,NOMREG command
PREDCAT (keyword),PREDCAT (keyword),PREDCAT (keyword)
NOMREG command,NOMREG command,NOMREG command
ACPROB(newname) | Estimated probability of classifying a factor/covariate pattern into the actual category.
ESTPROB(rootname:n) | Estimated probabilities of classifying a factor/covariate pattern into the response categories. There are as many number of probabilities as the number of response categories. The predicted probabilities of the first n response categories will be saved. The default value for n is 25. To specify n without a rootname, enter a colon before the number.
PCPROB(newname) | Estimated probability of classifying a factor/covariate pattern into the predicted category. This probability is also the maximum of the estimated probabilities of the factor/covariate pattern.
PREDCAT(newname) | The response category that has the maximum expected probability for a factor/covariate pattern.

Related Topics

NOMREG
Overview (NOMREG command)
Examples (NOMREG command)
Variable List (NOMREG command)
CRITERIA Subcommand (NOMREG command)
FULLFACTORIAL Subcommand (NOMREG command)
INTERCEPT Subcommand (NOMREG command)
MISSING Subcommand (NOMREG command)
MODEL Subcommand (NOMREG command)
STEPWISE Subcommand (NOMREG command)
OUTFILE Subcommand (NOMREG command)
PRINT Subcommand (NOMREG command)
SCALE Subcommand (NOMREG command)
SUBPOP Subcommand (NOMREG command)
TEST Subcommand (NOMREG command)


SCALE Subcommand (NOMREG command)

SCALE (subcommand),SCALE (subcommand),SCALE (subcommand)
NOMREG command,NOMREG command,NOMREG command
NOMREG (command),NOMREG (command),NOMREG (command)
SCALE subcommand,SCALE subcommand,SCALE subcommand

The SCALE subcommand specifies the dispersion scaling value. Model estimation is not affected by this scaling value. Only the asymptotic covariance matrix of the parameter estimates is affected.

DEVIANCE (keyword),DEVIANCE (keyword),DEVIANCE (keyword)
NOMREG command,NOMREG command,NOMREG command
PEARSON (keyword),PEARSON (keyword),PEARSON (keyword)
NOMREG command,NOMREG command,NOMREG command
N | A positive number corresponding to the amount of overdispersion or underdispersion. The default scaling value is 1, which corresponds to no overdispersion or underdispersion.
DEVIANCE | Estimates the scaling value by using the deviance function statistic.
PEARSON | Estimates the scaling value by using the Pearson chi-square statistic.

Related Topics

NOMREG
Overview (NOMREG command)
Examples (NOMREG command)
Variable List (NOMREG command)
CRITERIA Subcommand (NOMREG command)
FULLFACTORIAL Subcommand (NOMREG command)
INTERCEPT Subcommand (NOMREG command)
MISSING Subcommand (NOMREG command)
MODEL Subcommand (NOMREG command)
STEPWISE Subcommand (NOMREG command)
OUTFILE Subcommand (NOMREG command)
PRINT Subcommand (NOMREG command)
SAVE Subcommand (NOMREG command)
SUBPOP Subcommand (NOMREG command)
TEST Subcommand (NOMREG command)


SUBPOP Subcommand (NOMREG command)

SUBPOP (subcommand),SUBPOP (subcommand),SUBPOP (subcommand)
NOMREG command,NOMREG command,NOMREG command
NOMREG (command),NOMREG (command),NOMREG (command)
SUBPOP subcommand,SUBPOP subcommand,SUBPOP subcommand

The SUBPOP subcommand allows you to define the subpopulation classification used in computing the goodness-of-fit statistics.

• A variable list is expected if the SUBPOP subcommand is specified. The variables in the list must be a subset of the combined list of factors and covariates specified on the command line.

• Variables specified or implied on the MODEL subcommand must be a subset of the variables specified or implied on the SUBPOP subcommand.

• If the SUBPOP subcommand is omitted, the default classification is based on all of the factors and the covariates specified.

• Missing values are deleted listwise on the subpopulation level.

Example

NOMREG
  movie  BY gender date WITH age
  /CRITERIA = CIN(95) DELTA(0) MXITER(100) MXSTEP(5) LCONVERGE(0)
              PCONVERGE(1.0E-6) SINGULAR(1.0E-8)
  /MODEL = gender
  /SUBPOP = gender date
  /INTERCEPT = EXCLUDE .

• Although the model consists only of gender, the SUBPOP subcommand specifies that goodness-of-fit statistics should be computed based on both gender and date.

Related Topics

NOMREG
Overview (NOMREG command)
Examples (NOMREG command)
Variable List (NOMREG command)
CRITERIA Subcommand (NOMREG command)
FULLFACTORIAL Subcommand (NOMREG command)
INTERCEPT Subcommand (NOMREG command)
MISSING Subcommand (NOMREG command)
MODEL Subcommand (NOMREG command)
STEPWISE Subcommand (NOMREG command)
OUTFILE Subcommand (NOMREG command)
PRINT Subcommand (NOMREG command)
SAVE Subcommand (NOMREG command)
SCALE Subcommand (NOMREG command)
TEST Subcommand (NOMREG command)


TEST Subcommand (NOMREG command)

TEST (subcommand),TEST (subcommand),TEST (subcommand)
NOMREG command,NOMREG command,NOMREG command
NOMREG (command),NOMREG (command),NOMREG (command)
TEST subcommand,TEST subcommand,TEST subcommand

The TEST subcommand allows you to customize your hypothesis tests by directly specifying null hypotheses as linear combinations of parameters.

• TEST is offered only through syntax.

• Multiple TEST subcommands are allowed. Each is handled independently.

• The basic format for the TEST subcommand is an optional list of values enclosed in parentheses, an optional label in quotes, an effect name or the keyword ALL, and a list of values.

• The value list preceding the first effect or the keyword ALL are the constants to which the linear combinations are equated under the null hypotheses. If this value list is omitted, the constants are assumed to be all zeros.

• The label is a string with a maximum length of 255 characters (or 127 double-byte characters). Only one label per linear combination can be specified.

• When ALL is specified, only a list of values can follow. The number of values must equal the number of parameters (including the redundant ones) in the model.

• When effects are specified, only valid effects appearing or implied on the MODEL subcommand can be named. The number of values following an effect name must equal the number of parameters (including the redundant ones) corresponding to that effect. For example, if the effect A*B takes up six parameters, then exactly six values must follow A*B. To specify the coefficient for the intercept, use the keyword INTERCEPT. Only one value is expected to follow INTERCEPT.

• When multiple linear combinations are specified within the same TEST subcommand, use semicolons to separate each hypothesis.

• The linear combinations are first tested separately for each logit and then simultaneously tested for all of the logits.

• A number can be specified as a fraction with a positive denominator. For example, 1/3 or –1/3 are valid, but 1/–3 is invalid.

• Effects appearing or implied on the MODEL subcommand but not specified on the TEST are assumed to take the value 0 for all of their parameters.

Example

NOMREG
  movie  BY gender date
  /CRITERIA = CIN(95) DELTA(0) MXITER(100) MXSTEP(5) LCONVERGE(0)
              PCONVERGE(1.0E-6) SINGULAR(1.0E-8)
  /INTERCEPT = EXCLUDE
  /PRINT = CELLPROB CLASSTABLE FIT CORB COVB HISTORY(1) PARAMETER
           SUMMARY LRT
  /TEST (0 0) = ALL 1 0 0 0;
                ALL 0 1 0 0 .

• TEST specifies two separate tests: one in which the coefficient corresponding to the first category for gender is tested for equality with zero, and one in which the coefficient corresponding to the second category for gender is tested for equality with zero.

Related Topics

NOMREG
Overview (NOMREG command)
Examples (NOMREG command)
Variable List (NOMREG command)
CRITERIA Subcommand (NOMREG command)
FULLFACTORIAL Subcommand (NOMREG command)
INTERCEPT Subcommand (NOMREG command)
MISSING Subcommand (NOMREG command)
MODEL Subcommand (NOMREG command)
STEPWISE Subcommand (NOMREG command)
OUTFILE Subcommand (NOMREG command)
PRINT Subcommand (NOMREG command)
SAVE Subcommand (NOMREG command)
SCALE Subcommand (NOMREG command)
SUBPOP Subcommand (NOMREG command)


NONPAR CORR

rank-order coefficients,rank-order coefficients,rank-order coefficients
NONPAR CORR command,NONPAR CORR command,NONPAR CORR command
NONPAR CORR (command),NONPAR CORR (command),NONPAR CORR (command)
NONPAR CORR (command),NONPAR CORR (command),NONPAR CORR (command)
syntax chart,syntax chart,syntax chart
correlations,correlations,correlations
NONPAR CORR command,NONPAR CORR command,NONPAR CORR command
nonparametric correlation,nonparametric correlation,nonparametric correlation
NONPAR CORR command,NONPAR CORR command,NONPAR CORR command

NONPAR CORR is available in the Statistics Base option.

NONPAR CORR VARIABLES= varlist [WITH varlist] [/varlist...]

 [/PRINT={TWOTAIL**}  {SIG**}  {SPEARMAN**}]
         {ONETAIL  }  {NOSIG}  {KENDALL   }
                               {BOTH      }

 [/SAMPLE]

 [/MISSING=[{PAIRWISE**} [INCLUDE]]
            {LISTWISE  }

 [/MATRIX=OUT({*                  })]
              {'savfile'|'dataset'}

**Default if the subcommand is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See NONPAR CORR Algorithms for computational details for this procedure.

Syntax for the NONPAR CORR command can be generated from the Bivariate Correlations dialog when Kendall's tau-b or Spearman Correlation Coefficients are selected.

Example

NONPAR CORR
  VARIABLES=PRESTIGE SPPRES PAPRES16 DEGREE PADEG MADEG.

Related Topics

Overview (NONPAR CORR command)
Examples (NONPAR CORR command)
VARIABLES Subcommand (NONPAR CORR command)
PRINT Subcommand (NONPAR CORR command)
SAMPLE Subcommand (NONPAR CORR command)
MISSING Subcommand (NONPAR CORR command)


Overview (NONPAR CORR command)

NONPAR CORR (command),NONPAR CORR (command),NONPAR CORR (command)
significance tests,significance tests,significance tests
NONPAR CORR (command),NONPAR CORR (command),NONPAR CORR (command)
random sampling,random sampling,random sampling
NONPAR CORR (command),NONPAR CORR (command),NONPAR CORR (command)
matrix output,matrix output,matrix output
NONPAR CORR (command),NONPAR CORR (command),NONPAR CORR (command)
limitations,limitations,limitations

NONPAR CORR computes two rank-order correlation coefficients, Spearman’s rho and Kendall’s tau-b, with their significance levels. You can obtain one or both coefficients. NONPAR CORR automatically computes the ranks and stores the cases in memory. Therefore, memory requirements are directly proportional to the number of cases that are being analyzed.

Options Collapse Hide details

Options

Coefficients and Significance Levels. By default, NONPAR CORR computes Spearman coefficients and displays the two-tailed significance level. You can request a one-tailed test, and you can display the significance level for each coefficient as an annotation by using the PRINT subcommand.

Random Sampling. You can request a random sample of cases by using the SAMPLE subcommand when there is not enough space to store all cases.

Matrix Output. You can write matrix materials to a matrix data file by using the MATRIX subcommand. The matrix materials include the number of cases that are used to compute each coefficient and the Spearman or Kendall coefficients for each variable. These materials can be read by other procedures.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is VARIABLES and a list of numeric variables. By default, Spearman correlation coefficients are calculated.

Subcommand Order Collapse Hide details

Subcommand Order

• VARIABLES must be specified first.

• The remaining subcommands can be used in any order.

Operations Collapse Hide details

Operations

• NONPAR CORR produces one or more matrices of correlation coefficients. For each coefficient, NONPAR CORR displays the number of used cases and the significance level.

• The number of valid cases is always displayed. Depending on the specification on the MISSING subcommand, the number of valid cases can be displayed for each pair or in a single annotation.

• If all cases have a missing value for a given pair of variables, or if all cases have the same value for a variable, the coefficient cannot be computed. If a correlation cannot be computed, NONPAR CORR displays a decimal point.

• If both Spearman and Kendall coefficients are requested, and MATRIX is used to write matrix materials to a matrix data file, only Spearman’s coefficient will be written with the matrix materials.

Limitations Collapse Hide details

Limitations

• A maximum of 25 variable lists is allowed.

• A maximum of 100 variables total per NONPAR CORR command is allowed.

Related Topics

NONPAR CORR
Examples (NONPAR CORR command)
VARIABLES Subcommand (NONPAR CORR command)
PRINT Subcommand (NONPAR CORR command)
SAMPLE Subcommand (NONPAR CORR command)
MISSING Subcommand (NONPAR CORR command)


Examples (NONPAR CORR command)

NONPAR CORR VARIABLES=PRESTIGE SPPRES PAPRES16 DEGREE PADEG MADEG.

• By default, Spearman correlation coefficients are calculated. The number of cases upon which the correlations are based and the two-tailed significance level are displayed for each correlation.

Related Topics

NONPAR CORR
Overview (NONPAR CORR command)
VARIABLES Subcommand (NONPAR CORR command)
PRINT Subcommand (NONPAR CORR command)
SAMPLE Subcommand (NONPAR CORR command)
MISSING Subcommand (NONPAR CORR command)


VARIABLES Subcommand (NONPAR CORR command)

NONPAR CORR (command),NONPAR CORR (command),NONPAR CORR (command)
VARIABLES subcommand,VARIABLES subcommand,VARIABLES subcommand
VARIABLES (subcommand),VARIABLES (subcommand),VARIABLES (subcommand)
NONPAR CORR command,NONPAR CORR command,NONPAR CORR command

VARIABLES specifies the variable list.

• All variables must be numeric.

• If keyword WITH is not used, NONPAR CORR displays the correlations of each variable with every other variable in the list.

WITH (keyword),WITH (keyword),WITH (keyword)
NONPAR CORR command,NONPAR CORR command,NONPAR CORR command

• To obtain a rectangular matrix, specify two variable lists that are separated by keyword WITH. NONPAR CORR writes a rectangular matrix of variables in the first list correlated with variables in the second list.

• Keyword WITH cannot be used when the MATRIX subcommand is used.

• You can request more than one analysis. Use a slash to separate the specifications for each analysis.

Example

NONPAR CORR
  VARIABLES = PRESTIGE SPPRES PAPRES16 WITH DEGREE PADEG MADEG.

• The three variables that are listed before WITH define the rows; the three variables that are listed after WITH define the columns of the correlation matrix.

• Spearman’s rho is displayed by default.

Example

NONPAR CORR VARIABLES=SPPRES PAPRES16 PRESTIGE
                     /SATCITY WITH SATHOBBY SATFAM.

• NONPAR CORR produces two Correlations tables.

• By default, Spearman’s rho is displayed.

Related Topics

NONPAR CORR
Overview (NONPAR CORR command)
Examples (NONPAR CORR command)
PRINT Subcommand (NONPAR CORR command)
SAMPLE Subcommand (NONPAR CORR command)
MISSING Subcommand (NONPAR CORR command)


PRINT Subcommand (NONPAR CORR command)

NONPAR CORR (command),NONPAR CORR (command),NONPAR CORR (command)
significance tests,significance tests,significance tests
NONPAR CORR (command),NONPAR CORR (command),NONPAR CORR (command)
PRINT subcommand,PRINT subcommand,PRINT subcommand
PRINT (subcommand),PRINT (subcommand),PRINT (subcommand)
NONPAR CORR command,NONPAR CORR command,NONPAR CORR command

By default, NONPAR CORR displays Spearman correlation coefficients. The significance levels are displayed below the coefficients. The significance level is based on a two-tailed test. Use PRINT to change these defaults.

• The Spearman and Kendall coefficients are both based on ranks.

SPEARMAN (keyword),SPEARMAN (keyword),SPEARMAN (keyword)
NONPAR CORR command,NONPAR CORR command,NONPAR CORR command
KENDALL (keyword),KENDALL (keyword),KENDALL (keyword)
NONPAR CORR command,NONPAR CORR command,NONPAR CORR command
BOTH (keyword),BOTH (keyword),BOTH (keyword)
NONPAR CORR command,NONPAR CORR command,NONPAR CORR command
SIG (keyword),SIG (keyword),SIG (keyword)
NONPAR CORR command,NONPAR CORR command,NONPAR CORR command
NOSIG (keyword),NOSIG (keyword),NOSIG (keyword)
NONPAR CORR command,NONPAR CORR command,NONPAR CORR command
TWOTAIL (keyword),TWOTAIL (keyword),TWOTAIL (keyword)
NONPAR CORR command,NONPAR CORR command,NONPAR CORR command
ONETAIL (keyword),ONETAIL (keyword),ONETAIL (keyword)
NONPAR CORR command,NONPAR CORR command,NONPAR CORR command
SPEARMAN | Spearman’s rho. Only Spearman coefficients are displayed. This specification is the default.
KENDALL | Kendall’s tau-b. Only Kendall coefficients are displayed.
BOTH | Kendall and Spearman coefficients. Both coefficients are displayed. If MATRIX is used to write the correlation matrix to a matrix data file, only Spearman coefficients are written with the matrix materials.
SIG | Do not flag significant values. SIG is the default.
NOSIG | Flag significant values. Values significant at the 0.05 level are flagged with a single asterisk; those that are significant at the 0.01 level are flagged with two asterisks.
TWOTAIL | Two-tailed test of significance. This test is appropriate when the direction of the relationship cannot be determined in advance, as is often the case in exploratory data analysis. This specification is the default.
ONETAIL | One-tailed test of significance. This test is appropriate when the direction of the relationship between a pair of variables can be specified in advance of the analysis.

Related Topics

NONPAR CORR
Overview (NONPAR CORR command)
Examples (NONPAR CORR command)
VARIABLES Subcommand (NONPAR CORR command)
SAMPLE Subcommand (NONPAR CORR command)
MISSING Subcommand (NONPAR CORR command)


SAMPLE Subcommand (NONPAR CORR command)

NONPAR CORR (command),NONPAR CORR (command),NONPAR CORR (command)
random sampling,random sampling,random sampling
NONPAR CORR (command),NONPAR CORR (command),NONPAR CORR (command)
SAMPLE subcommand,SAMPLE subcommand,SAMPLE subcommand
SAMPLE (subcommand),SAMPLE (subcommand),SAMPLE (subcommand)
NONPAR CORR command,NONPAR CORR command,NONPAR CORR command

NONPAR CORR must store cases in memory to build matrices. SAMPLE selects a random sample of cases when computer resources are insufficient to store all cases. SAMPLE has no additional specifications.

Related Topics

NONPAR CORR
Overview (NONPAR CORR command)
Examples (NONPAR CORR command)
VARIABLES Subcommand (NONPAR CORR command)
PRINT Subcommand (NONPAR CORR command)
MISSING Subcommand (NONPAR CORR command)


MISSING Subcommand (NONPAR CORR command)

NONPAR CORR (command),NONPAR CORR (command),NONPAR CORR (command)
MISSING subcommand,MISSING subcommand,MISSING subcommand
MISSING (subcommand),MISSING (subcommand),MISSING (subcommand)
NONPAR CORR command,NONPAR CORR command,NONPAR CORR command

MISSING controls the treatment of missing values.

• PAIRWISE and LISTWISE are alternatives. You can specify INCLUDE with either PAIRWISE or LISTWISE.

PAIRWISE (keyword),PAIRWISE (keyword),PAIRWISE (keyword)
NONPAR CORR command,NONPAR CORR command,NONPAR CORR command
LISTWISE (keyword),LISTWISE (keyword),LISTWISE (keyword)
NONPAR CORR command,NONPAR CORR command,NONPAR CORR command
INCLUDE (keyword),INCLUDE (keyword),INCLUDE (keyword)
NONPAR CORR command,NONPAR CORR command,NONPAR CORR command
PAIRWISE | Exclude missing values pairwise. Cases with a missing value for one or both variables for a specific correlation coefficient are excluded from the computation of that coefficient. This process allows the maximum available information to be used in every calculation. This process also results in a set of coefficients based on a varying number of cases. The number is displayed for each pair. This specification is the default.
LISTWISE | Exclude missing values listwise. Cases with a missing value for any variable that is named in a list are excluded from the computation of all coefficients in the Correlations table. The number of used cases is displayed in a single annotation. Each variable list on a command is evaluated separately. Thus, a case that is missing for one matrix might be used in another matrix. This option decreases the amount of required memory and significantly decreases computational time.
INCLUDE | Include user-missing values. User-missing values are treated as valid values.

Related Topics

NONPAR CORR
Overview (NONPAR CORR command)
Examples (NONPAR CORR command)
VARIABLES Subcommand (NONPAR CORR command)
PRINT Subcommand (NONPAR CORR command)
SAMPLE Subcommand (NONPAR CORR command)


MATRIX Subcommand (NONPAR CORR command)

NONPAR CORR (command),NONPAR CORR (command),NONPAR CORR (command)
MATRIX subcommand,MATRIX subcommand,MATRIX subcommand
MATRIX (subcommand),MATRIX (subcommand),MATRIX (subcommand)
NONPAR CORR command,NONPAR CORR command,NONPAR CORR command

MATRIX writes matrix materials to a matrix data file. The matrix materials always include the number of cases that are used to compute each coefficient, and the materials include either the Spearman or the Kendall correlation coefficient for each variable, whichever is requested. See the topic Format of the Matrix Data File (NONPAR CORR command) for more information.

• You cannot write both Spearman’s and Kendall’s coefficients to the same matrix data file. To obtain both Spearman’s and Kendall’s coefficients in matrix format, specify separate NONPAR CORR commands for each coefficient and define different matrix data files for each command.

• If PRINT=BOTH is in effect, NONPAR CORR displays a matrix in the listing file for both coefficients but writes only the Spearman coefficients to the matrix data file.

• NONPAR CORR cannot write matrix materials for rectangular matrices (variable lists containing keyword WITH). If more than one variable list is specified, only the last variable list that does not use keyword WITH is written to the matrix data file.

OUT (keyword),OUT (keyword),OUT (keyword)
NONPAR CORR command,NONPAR CORR command,NONPAR CORR command

• The specification on MATRIX is keyword OUT and a quoted file specification or previously declared dataset name (DATASET DECLARE command), enclosed in parentheses.

RECODE (command),RECODE (command),RECODE (command)
with NONPAR CORR command,with NONPAR CORR command,with NONPAR CORR command
NONPAR CORR (command),NONPAR CORR (command),NONPAR CORR (command)
with RECODE command,with RECODE command,with RECODE command

• If you want to use a correlation matrix that is written by NONPAR CORR in another procedure, change the ROWTYPE_ value RHO or TAUB to CORR by using the RECODE command.

• Any documents that are contained in the active dataset are not transferred to the matrix file.

OUT ('savfile'|'dataset') Write a matrix data file or dataset. Specify either a filename, a previously declared dataset name, or an asterisk, enclosed in parentheses. Filenames should be enclosed in quotes and are stored in the working directory unless a path is included as part of the file specification. If you specify an asterisk (*), the matrix data file replaces the active dataset.

Multiple nonparametric correlation tables

NONPAR CORR
  VARIABLES=PRESTIGE SPPRES PAPRES16 DEGREE PADEG MADEG
  /PRESTIGE TO DEGREE /PRESTIGE WITH DEGREE
  /MATRIX OUT('/data/npmat.sav').

• Only the matrix for PRESTIGE to DEGREE is written to the matrix data file because it is the last variable list that does not use keyword WITH.

Related Topics

Format of the Matrix Data File (NONPAR CORR command)
Split Files (NONPAR CORR command)
Missing Values (NONPAR CORR command)
Examples (NONPAR CORR command)


Format of the Matrix Data File (NONPAR CORR command)

• The matrix data file has two special variables that are created by the program: ROWTYPE_ and VARNAME_.

• ROWTYPE_ is a short string variable with values N and RHO for Spearman’s correlation coefficient. If you specify Kendall’s coefficient, the values are N and TAUB.

• VARNAME_ is a short string variable whose values are the names of the variables that are used to form the correlation matrix. When ROWTYPE_ is RHO (or TAUB), VARNAME_ gives the variable that is associated with that row of the correlation matrix.

• The remaining variables in the file are the variables that are used to form the correlation matrix.

Related Topics

MATRIX Subcommand (NONPAR CORR command)
Split Files (NONPAR CORR command)
Missing Values (NONPAR CORR command)
Examples (NONPAR CORR command)


Split Files (NONPAR CORR command)

• When split-file processing is in effect, the first variables in the matrix data file are the split variables, followed by ROWTYPE_, VARNAME_, and the variables that are used to form the correlation matrix.

• A full set of matrix materials is written for each split-file group that is defined by the split variables.

• A split variable cannot have the same name as any other variable that is written to the matrix data file.

• If split-file processing is in effect when a matrix is written, the same split file must be in effect when that matrix is read by a procedure.

Related Topics

MATRIX Subcommand (NONPAR CORR command)
Format of the Matrix Data File (NONPAR CORR command)
Missing Values (NONPAR CORR command)
Examples (NONPAR CORR command)


Missing Values (NONPAR CORR command)

NONPAR CORR (command),NONPAR CORR (command),NONPAR CORR (command)
missing values,missing values,missing values

• With PAIRWISE treatment of missing values (the default), the matrix of Ns that is used to compute each coefficient is included with the matrix materials.

• With LISTWISE or INCLUDE treatments, a single N that is used to calculate all coefficients is included with the matrix materials.

Related Topics

MATRIX Subcommand (NONPAR CORR command)
Format of the Matrix Data File (NONPAR CORR command)
Split Files (NONPAR CORR command)
Examples (NONPAR CORR command)


Examples (NONPAR CORR command)

Writing results to a matrix data file

GET FILE='/data/GSS80.sav'
  /KEEP PRESTIGE SPPRES PAPRES16 DEGREE PADEG MADEG.
NONPAR CORR VARIABLES=PRESTIGE TO MADEG
  /MATRIX OUT('/data/npmat.sav').

• NONPAR CORR reads data from file GSS80.sav and writes one set of correlation matrix materials to the file npmat.sav.

• The active dataset is still GSS80.sav. Subsequent commands are executed on file GSS80.sav.

Replacing the active dataset with matrix results

GET FILE='/data/GSS80.sav'
  /KEEP PRESTIGE SPPRES PAPRES16 DEGREE PADEG MADEG.
NONPAR CORR VARIABLES=PRESTIGE TO MADEG
  /MATRIX OUT(*).
LIST.
DISPLAY DICTIONARY.

• NONPAR CORR writes the same matrix as in the example above. However, the matrix data file replaces the active dataset. The LIST and DISPLAY commands are executed on the matrix file (not on the original active dataset GSS80.sav).

Related Topics

MATRIX Subcommand (NONPAR CORR command)
Format of the Matrix Data File (NONPAR CORR command)
Split Files (NONPAR CORR command)
Missing Values (NONPAR CORR command)


NPTESTS

NPTESTS (command),NPTESTS (command),NPTESTS (command)
NPTESTS (command),NPTESTS (command),NPTESTS (command)
syntax chart,syntax chart,syntax chart
one-sample nonparametric tests,one-sample nonparametric tests,one-sample nonparametric tests
command syntax,command syntax,command syntax
independent-samples nonparametric tests,independent-samples nonparametric tests,independent-samples nonparametric tests
command syntax,command syntax,command syntax
paired-samples nonparametric tests,paired-samples nonparametric tests,paired-samples nonparametric tests
command syntax,command syntax,command syntax
nonparametric tests,nonparametric tests,nonparametric tests
command syntax,command syntax,command syntax

NPTESTS is available in the Statistics Base option.

NPTESTS
  [/MISSING [SCOPE={ANALYSIS**}] [USERMISSING={EXCLUDE**}]]
                   {LISTWISE  }               {INCLUDE  }
  [/CRITERIA ALPHA={0.05**}] CILEVEL={95** }
                   {value }          {value}

  [/ONESAMPLE TEST(fieldlist)                                   ]
     [CHISQUARE(
         [EXPECTED={EQUAL**                      }]
                   {CUSTOM(FREQUENCIES=valuelist
                           CATEGORIES=valuelist) }
      )]

     [BINOMIAL([TESTVALUE={0.5**}]
                          {value}
         [SUCCESSCATEGORICAL={FIRST**               }]
                             {LIST(valuelist)       }
         [SUCCESSCONTINUOUS=CUTPOINT({MIDPOINT**})]
                                     {value     }
         [CLOPPERPEARSON] [JEFFREYS] [LIKELIHOOD]
      )]

     [KOLMOGOROV_SMIRNOV(
         [NORMAL={SAMPLE**           }]
                 {CUSTOM(MEAN=value
                         SD=value   )}
         [UNIFORM={SAMPLE**            }]
                  {CUSTOM(MIN=value
                          MAX=value   )}
         [EXPONENTIAL={SAMPLE**           }]
                      {CUSTOM(MEAN=value )}
         [POISSON={SAMPLE**           }]
                  {CUSTOM(MEAN=value )}
      )]

     [RUNS([GROUPCATEGORICAL={SAMPLE**                  }]
                             {LIST(valuelist)           }
           [GROUPCONTINUOUS=CUTPOINT({SAMPLEMEDIAN**})]
                                     {SAMPLEMEAN    }
                                     {value         }
      )]

     [WILCOXON(TESTVALUE=value)]

  [/INDEPENDENT TEST(fieldlist)                           ]
                GROUP(fieldname)

     [MANN_WHITNEY] [WALD_WOLFOWITZ] [KOLMOGOROV_SMIRNOV]
     [HODGES_LEHMAN]
     [MOSES([TRIMOUTLIERS={SAMPLE**}])]
                          {integer }

     [KRUSKAL_WALLIS([COMPARE={NONE      }])]
                              {PAIRWISE**}
                              {STEPWISE  }

     [MEDIAN([TESTVALUE={SAMPLE**}]  [COMPARE={NONE      }])]
                        {value   }            {PAIRWISE**}
                                              {STEPWISE  }

     [JONCKHEERE_TERPSTRA(
         [ORDER={ASCENDING**     }]  [COMPARE={NONE      }]
                {DESCENDING      }            {PAIRWISE**}
                                              {STEPWISE  }
      )]

  [/RELATED TEST(fieldlist)                       ]
     [MCNEMAR( [SUCCESS={FIRST**        }])]
                        {LIST(valuelist)}

     [WILCOXON] [SIGN] [MARGINAL_HOMOGENEITY]
     [HODGES_LEHMAN]

     [COCHRAN(
         [SUCCESS={FIRST          }]
                  {LIST(valuelist)}
         [COMPARE={NONE      }]
                  {PAIRWISE**}
                  {STEPWISE  }
      )]

     [FRIEDMAN([COMPARE={NONE      }])]
                        {PAIRWISE**}
                        {STEPWISE  }

     [KENDALL([COMPARE={NONE      }])]
                       {PAIRWISE**}
                       {STEPWISE  }

** Default if the subcommand or keyword is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See Nonparametric Tests Algorithms for computational details for this procedure.

Release History Collapse Hide details

Release History

Release 18

• Command introduced.

Example

NPTESTS
  /ONESAMPLE TEST(field1 TO field10).

Related Topics

Overview (NPTESTS command)
MISSING Subcommand (NPTESTS command)
CRITERIA Subcommand (NPTESTS command)
ONESAMPLE Subcommand (NPTESTS command)
INDEPENDENT Subcommand (NPTESTS command)
RELATED Subcommand (NPTESTS command)


Overview (NPTESTS command)

NPTESTS is a collection of nonparametric tests. These tests make minimal assumptions about the underlying distribution of the data.

The tests that are available in NPTESTS can be grouped into three broad categories based on how the data are organized.

• A one-sample test analyzes one field.

• A test for related samples compares two or more fields for the same set of cases.

• An independent-samples test analyzes one field that is grouped by categories of another field.

Options Collapse Hide details

Options

Automatic test selection. If a test subcommand (ONESAMPLE, INDEPENDENT, or RELATED) is specified without any test specifications, then NPTESTS automatically chooses the "best" tests to perform for each field specified on the subcommand. See the individual subcommands for details.

Multiple comparisons. In addition to the "omnibus" tests for k independent or related samples, the samples can also be tested pairwise, either by all pairwise comparisions or through a stepwise stepdown procedure.

Missing value handling. Records with missing values can be handled listwise or analysis by analysis. User-missing values on categorical fields can be treated as valid or excluded from analysis.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is a single test subcommand (ONESAMPLE, INDEPENDENT, or RELATED) and a TEST keyword with a list of fields to be tested.

Syntax Rules Collapse Hide details

Syntax Rules

• At least one test subcommand must be specified; all other subcommands are optional.

• Subcommands may be specified in any order.

• Only a single instance of each subcommand is allowed.

• An error occurs if a keyword is specified more than once within a subcommand.

• Parentheses, equals signs, and slashes shown in the syntax chart are required.

• The command name, subcommand names, and keywords must be spelled in full.

• Empty subcommands are not allowed.

• Any split field defined on the SPLIT FILE command cannot be used on this command.

• Any field specifed on the WEIGHT command cannot be used on this command.

Related Topics

NPTESTS
MISSING Subcommand (NPTESTS command)
CRITERIA Subcommand (NPTESTS command)
ONESAMPLE Subcommand (NPTESTS command)
INDEPENDENT Subcommand (NPTESTS command)
RELATED Subcommand (NPTESTS command)


MISSING Subcommand (NPTESTS command)

NPTESTS (command),NPTESTS (command),NPTESTS (command)
MISSING subcommand,MISSING subcommand,MISSING subcommand
MISSING (subcommand),MISSING (subcommand),MISSING (subcommand)
NPTESTS command,NPTESTS command,NPTESTS command

The MISSING subcommand controls the treatment of records with missing values.

  [/MISSING [SCOPE={ANALYSIS**}] [USERMISSING={EXCLUDE**}]]
                   {LISTWISE  }               {INCLUDE  }
SCOPE (keyword),SCOPE (keyword),SCOPE (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
ANALYSIS (keyword),ANALYSIS (keyword),ANALYSIS (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
LISTWISE (keyword),LISTWISE (keyword),LISTWISE (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
SCOPE Keyword Collapse Hide details

SCOPE Keyword

The SCOPE keyword specifies how to determine the case basis for tests.

ANALYSIS | Exclude records with missing values on a test-by-test basis. Records with missing values for a field that is used for a specific test are omitted from that test. On subcommands that specify several tests, each test is evaluated separately. This setting is the default.
LISTWISE | Exclude records with missing values listwise. Records with missing values for any field that is named on any subcommand are excluded from all analyses.
USERMISSING (keyword),USERMISSING (keyword),USERMISSING (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
EXCLUDE (keyword),EXCLUDE (keyword),EXCLUDE (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
INCLUDE (keyword),INCLUDE (keyword),INCLUDE (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
USERMISSING Keyword Collapse Hide details

USERMISSING Keyword

The USERMISSING keyword is used to control whether user-missing values for categorical fields are treated as valid values. By default, user-missing values for categorical fields are treated as invalid.

• User-missing values for continuous fields are always treated as invalid.

• System-missing values for any fields are always treated as invalid.

EXCLUDE | User-missing values for categorical fields are treated as invalid. This is the default.
INCLUDE | User-missing values for categorical fields are treated as valid values.

Related Topics

NPTESTS
Overview (NPTESTS command)
CRITERIA Subcommand (NPTESTS command)
ONESAMPLE Subcommand (NPTESTS command)
INDEPENDENT Subcommand (NPTESTS command)
RELATED Subcommand (NPTESTS command)


CRITERIA Subcommand (NPTESTS command)

NPTESTS (command),NPTESTS (command),NPTESTS (command)
CRITERIA subcommand,CRITERIA subcommand,CRITERIA subcommand
CRITERIA (subcommand),CRITERIA (subcommand),CRITERIA (subcommand)
NPTESTS command,NPTESTS command,NPTESTS command

The CRITERIA subcommand controls the significance level used for tests and the confidence level used for intervals.

  [/CRITERIA ALPHA={0.05**}] CILEVEL={95** }
                   {value }          {value}
ALPHA (keyword),ALPHA (keyword),ALPHA (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
ALPHA Keyword Collapse Hide details

ALPHA Keyword

The ALPHA keyword specifies the significance level for all tests specified on the NPTESTS command.

• Specify a numeric value between 0 and 1. 0.05 is the default.

CILEVEL (keyword),CILEVEL (keyword),CILEVEL (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
CILEVEL Keyword Collapse Hide details

CILEVEL Keyword

The CILEVEL keyword specifies the confidence level for all confidence intervals produced by the NPTESTS command.

• Specify a numeric value between 0 and 100. 95 is the default.

Related Topics

NPTESTS
Overview (NPTESTS command)
MISSING Subcommand (NPTESTS command)
ONESAMPLE Subcommand (NPTESTS command)
INDEPENDENT Subcommand (NPTESTS command)
RELATED Subcommand (NPTESTS command)


ONESAMPLE Subcommand (NPTESTS command)

NPTESTS (command),NPTESTS (command),NPTESTS (command)
ONESAMPLE subcommand,ONESAMPLE subcommand,ONESAMPLE subcommand
ONESAMPLE (subcommand),ONESAMPLE (subcommand),ONESAMPLE (subcommand)
NPTESTS command,NPTESTS command,NPTESTS command

The ONESAMPLE subcommand produces one-sample nonparametric tests. The TEST keyword is required, all other keywords are optional. If ONESAMPLE is specified with none of the optional keywords, the following tests are performed automatically:

• Categorical fields with two values are tested using a binomial test.

• Categorical fields with more than two values are tested using a chi-square test with equal frequencies on category values found in the sample.

• Continuous fields are tested using a Kolmogorov-Smirnov test against a normal distribution with the sample mean and standard deviation.

TEST (keyword),TEST (keyword),TEST (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
TEST Keyword Collapse Hide details

TEST Keyword

The TEST keyword lists the fields that you want to test.

• Specify one or more fields. Note that certain tests are not applicable to fields of a particular measurement level; for example, the chi-square test is only performed for categorical fields. NPTESTS automatically determines which tests are applicable to which fields. See the individual keyword descriptions for details.

CHISQUARE (keyword),CHISQUARE (keyword),CHISQUARE (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
EXPECTED (keyword),EXPECTED (keyword),EXPECTED (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
EQUAL (keyword),EQUAL (keyword),EQUAL (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
CUSTOM (keyword),CUSTOM (keyword),CUSTOM (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
FREQUENCIES (keyword),FREQUENCIES (keyword),FREQUENCIES (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
CATEGORIES (keyword),CATEGORIES (keyword),CATEGORIES (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
CHISQUARE Keyword Collapse Hide details

CHISQUARE Keyword

     [CHISQUARE([EXPECTED={EQUAL**                      }])]
                          {CUSTOM(FREQUENCIES=valuelist
                                  CATEGORIES=valuelist) }

The CHISQUARE keyword produces a one-sample test that computes a chi-square statistic based on the differences between the observed and expected frequencies of categories of a field.

• A separate chi-square test is performed for each and every categorical field specified on the TEST keyword.

• The test specifications given on the CHISQUARE keyword apply to all chi-square tests performed.

• If CHISQUARE is specified without any keywords, equal frequencies are expected in each category.

EXPECTED = EQUAL|CUSTOM(FREQUENCIES=valuelist CATEGORIES=valuelist)
 | Expected frequencies. The EXPECTED keyword defines how expected frequencies are derived. The default is EQUAL.
 | EQUAL produces equal frequencies among all categories in the sample. This is the default when CHISQUARE is specified without any other keywords..
 | CUSTOM allows you to specify unequal frequencies for a specified list of categories.
 | On the CATEGORIES keyword, specify a list of string or numeric values. The values in the list do not need to be present in the sample.
 | On the FREQUENCIES keyword, specify a value greater than 0 for each category, and in the same order as the categories, on the CATEGORIES keyword. Custom frequencies are treated as ratios so that, for example, FREQUENCIES=1 2 3 is equivalent to FREQUENCIES=10 20 30, and both specify that 1/6 of the records are expected to fall into the first category on the CATEGORIES keyword, 1/3 into the second, and 1/2 into the third.
 | When CUSTOM is specified, the number of expected frequencies must match the number of category values; otherwise the test is not performed for that field.
BINOMIAL (keyword),BINOMIAL (keyword),BINOMIAL (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
TESTVALUE (keyword),TESTVALUE (keyword),TESTVALUE (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
SUCCESS (keyword),SUCCESS (keyword),SUCCESS (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
FIRST (keyword),FIRST (keyword),FIRST (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
LIST (keyword),LIST (keyword),LIST (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
CUTPOINT (keyword),CUTPOINT (keyword),CUTPOINT (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
MIDPOINT (keyword),MIDPOINT (keyword),MIDPOINT (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
CLOPPERPEARSON (keyword),CLOPPERPEARSON (keyword),CLOPPERPEARSON (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
JEFFREYS (keyword),JEFFREYS (keyword),JEFFREYS (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
LIKELIHOOD (keyword),LIKELIHOOD (keyword),LIKELIHOOD (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
BINOMIAL Keyword Collapse Hide details

BINOMIAL Keyword

     [BINOMIAL([TESTVALUE={0.5**}]
                          {value}
         [SUCCESSCATEGORICAL={FIRST**               }]
                             {LIST(valuelist)       }
         [SUCCESSCONTINUOUS=CUTPOINT({MIDPOINT**})]
                                     {value     }
         [CLOPPERPEARSON] [JEFFREYS] [LIKELIHOOD]
      )]

The BINOMIAL keyword produces a one-sample test of whether the observed distribution of a dichotomous field is the same as what is expected from a specified binomial distribution. In addition, you can request confidence intervals.

• A separate binomial test is performed for each and every field specified on the TEST keyword.

• The test specifications given on the BINOMIAL keyword apply to all binomial tests performed.

• If BINOMIAL is specified without any keywords, each categorical field is assumed to have only two values and each continuous field is dichotomized using the average of the minimum and maximum as a cut point. The distribution of each named field is compared to a binomial distribution with p (the proportion of cases expected in the first category) equal to 0.5.

TESTVALUE
 | Hypothesized proportion. The TESTVALUE keyword specifies the expected proportion of cases in the first category. Specify a value greater than 0 and less than 1. The default is 0.5.
SUCCESSCATEGORICAL=FIRST|LIST(valuelist)
 | The SUCCESSCATEGORICAL keyword specifies how "success", the data value(s) tested against the test value, is defined for categorical fields.
 | FIRST performs the binomial test using the first value found in the sample to define "success". This option is only applicable to nominal or ordinal fields with only two values; all other categorical fields specified on a ONESAMPLE subcommand where FIRST is used will not be tested. This is the default.
 | LIST performs the binomial test using the specified list of values to define "success". Specify a list of string or numeric values. The values in the list do not need to be present in the sample.
SUCCESSCONTINUOUS=CUTPOINT(MIDPOINT|value)
 | Define success for continuous fields. The SUCCESSCONTINUOUS keyword specifies how "success", the data value(s) tested against the test value, is defined for continuous fields.
 | CUTPOINT defines values that are equal to or less than the cut point as "success". MIDPOINT sets the cut point at the average of the minimum and maximum values. Alternatively, specify a value for the cut point. The default is MIDPOINT.
CLOPPERPEARSON
 | Exact interval based on the cumulative binomial distribution.
JEFFREYS
 | Bayesian interval based on the posterior distribution of p using the Jeffreys prior.
LIKELIHOOD
 | Interval based on the likelihood function for p.
KOLMOGOROV_SMIRNOV (keyword),KOLMOGOROV_SMIRNOV (keyword),KOLMOGOROV_SMIRNOV (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
NORMAL (keyword),NORMAL (keyword),NORMAL (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
UNIFORM (keyword),UNIFORM (keyword),UNIFORM (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
POISSON (keyword),POISSON (keyword),POISSON (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
EXPONENTIAL (keyword),EXPONENTIAL (keyword),EXPONENTIAL (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
KOLMOGOROV_SMIRNOV Keyword Collapse Hide details

KOLMOGOROV_SMIRNOV Keyword

     [KOLMOGOROV_SMIRNOV(
         [NORMAL={SAMPLE**           }]
                 {CUSTOM(MEAN=value
                         SD=value   )}
         [UNIFORM={SAMPLE              }]
                  {CUSTOM(MIN=value
                          MAX=value   )}
         [EXPONENTIAL={SAMPLE             }]
                      {CUSTOM(MEAN=value )}
         [POISSON={SAMPLE             }]
                  {CUSTOM(MEAN=value )}
      )]

The KOLMOGOROV_SMIRNOV keyword produces a one-sample test of whether the sample cumulative distribution function for a field is homogenous with a uniform, normal, Poisson, or exponential distribution.

• A separate Kolmogorov-Smirnov test is performed for each and every continuous field specified on the TEST keyword.

• The test specifications given on the KOLMOGOROV_SMIRNOV keyword apply to all Kolmogorov-Smirnov tests performed.

• If KOLMOGOROV_SMIRNOV is specified without any keywords, each field is tested against a normal distribution using its sample mean and sample standard deviation.

NORMAL(SAMPLE|CUSTOM(MEAN=value SD=value))
 | Normal distribution. SAMPLE uses the observed mean and standard deviation, CUSTOM allows you to specify values.
UNIFORM(SAMPLE|CUSTOM(MIN=value MAX=value))
 | Uniform distribution. SAMPLE uses the observed minimum and maximum, CUSTOM allows you to specify values.
POISSON(SAMPLE|CUSTOM(MEAN=value))
 | Poisson distribution. SAMPLE uses the observed mean, CUSTOM allows you to specify a value.
EXPONENTIAL(SAMPLE|CUSTOM(MEAN=value))
 | Exponential distribution. SAMPLE uses the observed mean, CUSTOM allows you to specify a value.
RUNS (keyword),RUNS (keyword),RUNS (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
GROUP (keyword),GROUP (keyword),GROUP (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
SAMPLE (keyword),SAMPLE (keyword),SAMPLE (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
LIST (keyword),LIST (keyword),LIST (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
CUTPOINT (keyword),CUTPOINT (keyword),CUTPOINT (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
SAMPLEMEDIAN (keyword),SAMPLEMEDIAN (keyword),SAMPLEMEDIAN (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
SAMPLEMEAN (keyword),SAMPLEMEAN (keyword),SAMPLEMEAN (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
RUNS Keyword Collapse Hide details

RUNS Keyword

     [RUNS([GROUPCATEGORICAL={SAMPLE**                  }]
                             {LIST(valuelist)           }
           [GROUPCONTINUOUS=CUTPOINT({SAMPLEMEDIAN**})]
                                     {SAMPLEMEAN    }
                                     {value         }
      )]

The RUNS keyword produces a one-sample test of whether the sequence of values of a dichotomized field is random.

• A separate runs test is performed for each and every field specified on the TEST keyword.

• The test specifications given on the RUNS keyword apply to all runs tests performed.

• If RUNS is specified without any keywords, each categorical field is assumed to have only two values and each continuous field is dichotomized using the sample median as a cut point.

GROUPCATEGORICAL=SAMPLE|LIST(valuelist)
 | Determine groups for categorical fields. SAMPLE is the default.
 | SAMPLE performs the runs test using the values found in the sample to define the groups. This option is only applicable to nominal or ordinal fields with only two values; all other categorical fields specified on a ONESAMPLE subcommand where SAMPLE is used will not be tested.
 | LIST performs the runs test using the specified list of values to define one of the groups. All other values in the sample define the other group. The values in the list do not all need to be present in the sample, but at least one record must be in each group.
GROUPCONTINUOUS=CUTPOINT(SAMPLEMEDIAN | SAMPLEMEAN | value)
 | Determine groups for continuous fields. CUTPOINT defines values that are equal to or less than the cut point as the first group; all other values define the other group. SAMPLEMEDIAN sets the cut point at the sample median. SAMPLEMEAN sets the cut point at the sample men. Alternatively, specify a value for the cut point. The default is SAMPLEMEDIAN.
WILCOXON (keyword),WILCOXON (keyword),WILCOXON (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
TESTVALUE (keyword),TESTVALUE (keyword),TESTVALUE (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
WILCOXON Keyword Collapse Hide details

WILCOXON Keyword

     [WILCOXON(TESTVALUE=value)]

The WILCOXON keyword produces a one sample test of median value of a field.

• A separate Wilcoxon test is performed for each and every continuous field specified on the TEST keyword.

• The test specifications given on the WILCOXON keyword apply to all Wilcoxon tests performed.

• The TESTVALUE keyword is required.

TESTVALUE=value
Hypothesized median. The Wilcoxon test is performed using the specified value. The TESTVALUE keyword is required. There is no default.

Related Topics

NPTESTS
Overview (NPTESTS command)
MISSING Subcommand (NPTESTS command)
CRITERIA Subcommand (NPTESTS command)
INDEPENDENT Subcommand (NPTESTS command)
RELATED Subcommand (NPTESTS command)


INDEPENDENT Subcommand (NPTESTS command)

NPTESTS (command),NPTESTS (command),NPTESTS (command)
INDEPENDENT subcommand,INDEPENDENT subcommand,INDEPENDENT subcommand
INDEPENDENT (subcommand),INDEPENDENT (subcommand),INDEPENDENT (subcommand)
NPTESTS command,NPTESTS command,NPTESTS command

The INDEPENDENT subcommand produces independent samples nonparametric tests. The TEST and GROUP keywords are required, all other keywords are optional. If INDEPENDENT is specified with none of the optional keywords, the following tests are performed automatically:

• If the grouping field has only two values, continuous fields are tested using a Mann-Whitney test.

• If the grouping field has more than two values, continuous fields are tested using a Kruskal-Wallis test.

• If there are no continuous fields on the TEST keyword, no tests are performed.

TEST (keyword),TEST (keyword),TEST (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
TEST Keyword Collapse Hide details

TEST Keyword

The TEST keyword lists the fields that you want to test.

• Specify one or more continuous fields. Independent samples tests are only applicable to continuous fields.

GROUP (keyword),GROUP (keyword),GROUP (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
GROUP Keyword Collapse Hide details

GROUP Keyword

The GROUP keyword specifies the field used to determine groups. The test is performed using the values found in the sample to define the groups. Note that certain tests are not applicable when there are more than two groups. NPTESTS automatically determines which tests are applicable. See the individual keyword descriptions for details.

• Specify a categorical field. A grouping field that does not have nominal or ordinal measurement level will cause an error.

• GROUP applies to all fields that are specified on the TEST keyword.

MANN_WHITNEY (keyword),MANN_WHITNEY (keyword),MANN_WHITNEY (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
MANN_WHITNEY Keyword Collapse Hide details

MANN_WHITNEY Keyword

The MANN_WHITNEY keyword produces an independent samples test of whether two samples are from the same population. The test statistic uses the rank of each case to test whether the groups are drawn from the same population.

• A separate test is performed for each and every continuous field specified on the TEST keyword.

• The first value in ascending order of the grouping field defines the first group and the second value defines the second. If the grouping field has more than two values, the test is not performed.

WALD_WOLFOWITZ (keyword),WALD_WOLFOWITZ (keyword),WALD_WOLFOWITZ (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
WALD_WOLFOWITZ Keyword Collapse Hide details

WALD_WOLFOWITZ Keyword

The WALD_WOLFOWITZ keyword produces an independent samples test whether the distribution of a field is the same in two independent samples. A runs test is performed with group membership as the criterion.

• A separate test is performed for each and every continuous field specified on the TEST keyword.

• The first value in ascending order of the grouping field defines the first group and the second value defines the second. If the grouping field has more than two values, the test is not performed.

KOLMOGOROV_SMIRNOV (keyword),KOLMOGOROV_SMIRNOV (keyword),KOLMOGOROV_SMIRNOV (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
KOLMOGOROV_SMIRNOV Keyword Collapse Hide details

KOLMOGOROV_SMIRNOV Keyword

The KOLMOGOROV_SMIRNOV keyword produces an independent samples test of whether the distribution of a field is the same in two independent samples that are defined by a grouping field. The test is sensitive to any difference in median, dispersion, skewness, and so forth, between the two distributions.

• A separate test is performed for each and every continuous field specified on the TEST keyword.

• The first value in ascending order of the grouping field defines the first group and the second value defines the second. If the grouping field has more than two values, the test is not performed.

MOSES (keyword),MOSES (keyword),MOSES (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
TRIMOUTLIERS (keyword),TRIMOUTLIERS (keyword),TRIMOUTLIERS (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
MOSES Keyword Collapse Hide details

MOSES Keyword

     [MOSES([TRIMOUTLIERS={SAMPLE**}])]
                          {integer }

The MOSES keyword produces an independent samples test of whether the range of a continuous field is the same in a control group and a comparison group.

• A separate test is performed for each and every continuous field specified on the TEST keyword.

• The test specifications given on the MOSES keyword apply to all Moses tests performed.

• The first value in ascending order of the grouping field defines the control group and the second defines the comparison group. If the grouping field has more than two values, the test is not performed.

TRIMOUTLIERS=SAMPLE|integer
Records to trim from each end of the range of the control group to remove outliers. SAMPLE trims 5% of the records from each end of the range of the control group to remove outliers, with a minimum of 1 record removed from each end. Specifying an integer causes that exact number of records to be trimmed. SAMPLE is the default.
HODGES_LEHMAN (keyword),HODGES_LEHMAN (keyword),HODGES_LEHMAN (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
CILEVEL (keyword),CILEVEL (keyword),CILEVEL (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
HODGES_LEHMAN Keyword Collapse Hide details

HODGES_LEHMAN Keyword

The HODGES_LEHMAN keyword produces an independent samples estimate and confidence interval for the difference in the medians of two groups.

• A separate confidence interval is computed for each and every continuous field specified on the TEST keyword.

• The first value in ascending order of the grouping field defines the first group and the second value defines the second. If the grouping field has more than two values, the confidence interval is not produced.

KRUSKAL_WALLIS (keyword),KRUSKAL_WALLIS (keyword),KRUSKAL_WALLIS (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
COMPARE (keyword),COMPARE (keyword),COMPARE (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
NONE (keyword),NONE (keyword),NONE (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
PAIRWISE (keyword),PAIRWISE (keyword),PAIRWISE (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
STEPWISE (keyword),STEPWISE (keyword),STEPWISE (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
KRUSKAL_WALLIS Keyword Collapse Hide details

KRUSKAL_WALLIS Keyword

     [KRUSKAL_WALLIS([COMPARE={PAIRWISE**}])]
                              {STEPWISE  }
                              {NONE      }

The KRUSKAL_WALLIS keyword produces an independent samples test of whether k independent samples that are defined by a grouping field are from the same population.

• A separate test is performed for each and every continuous field specified on the TEST keyword.

• The test specifications given on the KRUSKAL_WALLIS keyword apply to all tests performed.

COMPARE=PAIRWISE|STEPWISE|NONE
Multiple comparisons. The COMPARE keyword controls how and whether multiple comparisons should be performed. PAIRWISE produces all pairwise multiple comparisons. STEPWISE produces stepwise stepdown comparisons. NONE turns off multiple comparisons. By default, all pairwise comparisons are produced.
MEDIAN (keyword),MEDIAN (keyword),MEDIAN (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
TESTVALUE (keyword),TESTVALUE (keyword),TESTVALUE (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
SAMPLE (keyword),SAMPLE (keyword),SAMPLE (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
COMPARE (keyword),COMPARE (keyword),COMPARE (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
NONE (keyword),NONE (keyword),NONE (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
PAIRWISE (keyword),PAIRWISE (keyword),PAIRWISE (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
STEPWISE (keyword),STEPWISE (keyword),STEPWISE (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
MEDIAN Keyword Collapse Hide details

MEDIAN Keyword

     [MEDIAN([TESTVALUE={SAMPLE**}]  [COMPARE={PAIRWISE**}])]
                        {value   }            {STEPWISE  }
                                              {NONE      }

The MEDIAN keyword produces an independent samples test of whether k independent samples are drawn from populations with the same median.

• A separate test is performed for each and every continuous field specified on the TEST keyword.

• The test specifications given on the MEDIAN keyword apply to all tests performed.

TESTVALUE=SAMPLE|value
 | Median value to use in the test. SAMPLE causes the test to be performed using the sample median, calculated from all records that are included in the test. Alternatively, you can specify an exact value. SAMPLE is the default.
COMPARE=PAIRWISE|STEPWISE|NONE
 | Multiple comparisons. The COMPARE keyword controls how and whether multiple comparisons should be performed. PAIRWISE produces all pairwise multiple comparisons. STEPWISE produces stepwise stepdown comparisons. NONE turns off multiple comparisons. By default, all pairwise comparisons are produced.
JONCKHEERE_TERPSTRA (keyword),JONCKHEERE_TERPSTRA (keyword),JONCKHEERE_TERPSTRA (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
ORDER (keyword),ORDER (keyword),ORDER (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
ASCENDING (keyword),ASCENDING (keyword),ASCENDING (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
DESCENDING (keyword),DESCENDING (keyword),DESCENDING (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
COMPARE (keyword),COMPARE (keyword),COMPARE (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
NONE (keyword),NONE (keyword),NONE (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
PAIRWISE (keyword),PAIRWISE (keyword),PAIRWISE (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
STEPWISE (keyword),STEPWISE (keyword),STEPWISE (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
JONCKHEERE_TERPSTRA Keyword Collapse Hide details

JONCKHEERE_TERPSTRA Keyword

     [JONCKHEERE_TERPSTRA(
         [ORDER={ASCENDING**      }]  [COMPARE={PAIRWISE**}]
                {DESCENDING       }            {STEPWISE  }
                                               {NONE      }
      )]

The JONCKHEERE-TERPSTRA keyword produces an independent samples test of whether k independent samples that are defined by a grouping field are from the same population. This test is particularly powerful when the k populations have a natural ordering.

• A separate test is performed for each and every continuous field specified on the TEST keyword.

• The test specifications given on the JONCKHEERE_TERPSTRA keyword apply to all tests performed.

ORDER=ASCENDING|DESCENDING
 | Order of the k populations. ASCENDING stipulates an alternative hypothesis that the location parameter of the first group is not equal to the second, which in turn is not equal to the third, and so on. This is the default.
 | DESCENDING stipulates an alternative hypothesis that the location parameter of the last group is not equal to the second-to-last, which in turn is not equal to the third-to-last, and so on.
COMPARE=PAIRWISE|STEPWISE|NONE
 | Multiple comparisons. The COMPARE keyword controls how and whether multiple comparisons should be performed. PAIRWISE produces all pairwise multiple comparisons. STEPWISE produces stepwise stepdown comparisons. NONE turns off multiple comparisons. By default, all pairwise comparisons are produced.

Related Topics

NPTESTS
Overview (NPTESTS command)
MISSING Subcommand (NPTESTS command)
CRITERIA Subcommand (NPTESTS command)
ONESAMPLE Subcommand (NPTESTS command)
RELATED Subcommand (NPTESTS command)


RELATED Subcommand (NPTESTS command)

NPTESTS (command),NPTESTS (command),NPTESTS (command)
RELATED subcommand,RELATED subcommand,RELATED subcommand
RELATED (subcommand),RELATED (subcommand),RELATED (subcommand)
NPTESTS command,NPTESTS command,NPTESTS command

The RELATED subcommand produces related-samples nonparametric tests. The TEST keyword is required, all other keywords are optional. If RELATED is specified with none of the optional keywords, the following tests are performed automatically:

• If two categorical fields are specified and they have only two values, McNemar's test is performed.

• If two continuous fields are specified, a Wilcoxon Matched-Pairs Signed-Rank test is performed.

• If more than two categorical fields are specified and they each have only two values, Cochran's test is performed.

• If more than two continuous fields are specified, Friedman's Two-Way Analysis of Variance by Ranks is performed.

• Otherwise, no tests are performed.

When fields of differing measurement level are specified, they are first separated by measurement level and then the appropriate test is applied to each group. For example, if you specify:

NPTESTS
  /RELATED TEST(c1 n1 o1 c2 o2 n2 o3 c3 o4).

Where x1, x2, and x3 are continuous fields, a1 and a2 are nominal fields, and o1, o2, o3, and o4 are ordinal fields, then Friedman's test is applied to the continuous fields, McNemar's test is applied to the nominal fields, and no test is applied to the ordinal fields.

TEST (keyword),TEST (keyword),TEST (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
TEST Keyword Collapse Hide details

TEST Keyword

The TEST keyword lists the fields that you want to test.

• Specify one or more fields. Note that certain tests are not applicable to fields of a particular measurement level; for example, the McNemar test is only performed for categorical fields. NPTESTS automatically determines which tests are applicable to which fields. See the individual keyword descriptions for details.

MCNEMAR (keyword),MCNEMAR (keyword),MCNEMAR (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
MCNEMAR Keyword Collapse Hide details

MCNEMAR Keyword

     [MCNEMAR( [SUCCESS={FIRST**        }])]
                        {LIST(valuelist)}

The MCNEMAR keyword produces a related samples test of whether combinations of values between two dichotomous fields are equally likely.

• A separate test is performed for all of the nominal fields and for all of the ordinal fields specified on the TEST keyword.

• The test specifications given on the MCNEMAR keyword apply to all tests performed.

• If any test has more than two fields, or any field has more than two values, the test is not performed.

Example

NPTESTS /RELATED TEST(n1 n2 n3 o1 o2) MCNEMAR.

If n1, n2, n3 are nominal fields and o1 and o2 are ordinal fields, then no test is performed for the nominal fields and a test is performed for the ordinal fields so long as o1 and o2 each have only two values.

SUCCESS=FIRST|LIST(valuelist)
 | The SUCCESS keyword specifies how "success" is defined for categorical fields.
 | FIRST performs the test using the first value found in the sample to define "success". This option is only applicable to nominal or ordinal fields with only two values; all other categorical fields specified on a RELATED subcommand where FIRST is used will not be tested. This is the default.
 | LIST performs the test using the specified list of values to define "success". Specify a list of string or numeric values. The values in the list do not need to be present in the sample.
WILCOXON (keyword),WILCOXON (keyword),WILCOXON (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
WILCOXON Keyword Collapse Hide details

WILCOXON Keyword

The WILCOXON keyword produces a related samples test of whether the distribution of two paired fields in two related samples is the same. The test takes into account the magnitude of the differences between two paired fields.

• A single test is performed for all of the continuous fields specified on the TEST keyword.

• If there are more than two continuous fields, the test is not performed.

SIGN (keyword),SIGN (keyword),SIGN (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
SIGN Keyword Collapse Hide details

SIGN Keyword

The SIGN keyword produces a related samples test of whether the distribution of two paired fields in a two-related-samples test is the same.

• A single test is performed for all of the continuous fields specified on the TEST keyword.

• If there are more than two continuous fields, the test is not performed.

MARGINAL_HOMOGENEITY (keyword),MARGINAL_HOMOGENEITY (keyword),MARGINAL_HOMOGENEITY (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
MARGINAL_HOMOGENEITY Keyword Collapse Hide details

MARGINAL_HOMOGENEITY Keyword

The MARGINAL_HOMOGENEITY keyword produces a related samples test of whether combinations of values between two paired ordinal fields are equally likely. The marginal homogeneity test is typically used in repeated measures situations. This test is an extension of the McNemar test from binary response to multinomial response.

• A single test is performed for all of the ordinal fields specified on the TEST keyword.

• If there are more than two ordinal fields, the test is not performed.

HODGES_LEHMAN (keyword),HODGES_LEHMAN (keyword),HODGES_LEHMAN (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
HODGES_LEHMAN (keyword),HODGES_LEHMAN (keyword),HODGES_LEHMAN (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
HODGES_LEHMAN Keyword Collapse Hide details

HODGES_LEHMAN Keyword

The HODGES_LEHMAN keyword produces a related samples estimate and confidence interval for the median difference between two paired continuous fields.

• A single confidence interval is computed for all of the continuous fields specified on the TEST keyword.

• If there are more than two continuous fields, no confidence intervals are created.

COCHRAN (keyword),COCHRAN (keyword),COCHRAN (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
SUCCESS (keyword),SUCCESS (keyword),SUCCESS (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
FIRST (keyword),FIRST (keyword),FIRST (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
LIST (keyword),LIST (keyword),LIST (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
COMPARE (keyword),COMPARE (keyword),COMPARE (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
NONE (keyword),NONE (keyword),NONE (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
PAIRWISE (keyword),PAIRWISE (keyword),PAIRWISE (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
STEPWISE (keyword),STEPWISE (keyword),STEPWISE (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
COCHRAN Keyword Collapse Hide details

COCHRAN Keyword

     [COCHRAN(
         [SUCCESS={FIRST**        }]
                  {LIST(valuelist)}
         [COMPARE={PAIRWISE**}]
                  {STEPWISE  }
                  {NONE      }
      )]

The COCHRAN keyword produces a related samples test of whether the distribution of values is the same for k related dichotomous fields.

• A separate test is performed for all of the nominal fields and for all of the ordinal fields specified on the TEST keyword.

• The test specifications given on the COCHRAN keyword apply to all tests performed.

• If any field has more than two values, the test is not performed.

Example

NPTESTS /RELATED TEST(n1 n2 n3 o1 o2) COCHRAN.

If n1, n2, n3 are nominal fields and o1 and o2 are ordinal fields, then a test is performed for the nominal fields and a test is performed for the ordinal fields so long as each field has only two values.

SUCCESS=FIRST|LIST(valuelist)
 | The SUCCESS keyword specifies how "success" is defined for categorical fields.
 | FIRST performs the test using the first value found in the sample to define "success". This option is only applicable to nominal or ordinal fields with only two values; all other categorical fields specified on a RELATED subcommand where FIRST is used will not be tested. This is the default.
 | LIST performs the test using the specifed list of values to define "success". Specify a list of string or numeric values. The values in the list do not need to be present in the sample.
COMPARE=PAIRWISE|STEPWISE|NONE
 | Multiple comparisons. The COMPARE keyword controls how and whether multiple comparisons should be performed. PAIRWISE produces all pairwise multiple comparisons. STEPWISE produces stepwise stepdown comparisons. NONE turns off multiple comparisons. By default, all pairwise comparisons are produced.
FRIEDMAN (keyword),FRIEDMAN (keyword),FRIEDMAN (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
COMPARE (keyword),COMPARE (keyword),COMPARE (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
NONE (keyword),NONE (keyword),NONE (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
PAIRWISE (keyword),PAIRWISE (keyword),PAIRWISE (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
STEPWISE (keyword),STEPWISE (keyword),STEPWISE (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
FRIEDMAN Keyword Collapse Hide details

FRIEDMAN Keyword

     [FRIEDMAN([COMPARE={PAIRWISE**}])]
                        {STEPWISE  }
                        {NONE      }

The FRIEDMAN subcommand produces a related samples test of whether k related samples have been drawn from the same population.

A single test is performed for all of the continuous fields specified on the TEST keyword.

COMPARE=PAIRWISE|STEPWISE|NONE
Multiple comparisons. The COMPARE keyword controls how and whether multiple comparisons should be performed. PAIRWISE produces all pairwise multiple comparisons. STEPWISE produces stepwise stepdown comparisons. NONE turns off multiple comparisons. By default, all pairwise comparisons are produced.
KENDALL (keyword),KENDALL (keyword),KENDALL (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
COMPARE (keyword),COMPARE (keyword),COMPARE (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
NONE (keyword),NONE (keyword),NONE (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
PAIRWISE (keyword),PAIRWISE (keyword),PAIRWISE (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
STEPWISE (keyword),STEPWISE (keyword),STEPWISE (keyword)
NPTESTS command,NPTESTS command,NPTESTS command
KENDALL Keyword Collapse Hide details

KENDALL Keyword

     [KENDALL([COMPARE={PAIRWISE**}])]
                       {STEPWISE  }
                       {NONE      }

The KENDALL keyword produces a related samples test of whether k related samples are from the same population. Kendall's W is a measure of agreement among judges or raters, where each case is one judge's rating of several items (fields).

A single test is performed for all of the continuous fields specified on the TEST keyword.

COMPARE=PAIRWISE|STEPWISE|NONE
Multiple comparisons. The COMPARE keyword controls how and whether multiple comparisons should be performed. PAIRWISE produces all pairwise multiple comparisons. STEPWISE produces stepwise stepdown comparisons. NONE turns off multiple comparisons. By default, all pairwise comparisons are produced.

Related Topics

NPTESTS
Overview (NPTESTS command)
MISSING Subcommand (NPTESTS command)
CRITERIA Subcommand (NPTESTS command)
ONESAMPLE Subcommand (NPTESTS command)
INDEPENDENT Subcommand (NPTESTS command)


NPAR TESTS

NPAR TESTS (command),NPAR TESTS (command),NPAR TESTS (command)

NPAR TESTS is available in the Statistics Base option.

NPAR TESTS [CHISQUARE=varlist[(lo,hi)]/] [/EXPECTED={EQUAL      }]
                                                    {f1,f2,...fn}

 [/K-S({UNIFORM [min,max]   })=varlist]
       {NORMAL [mean,stddev]}
       {POISSON [mean]      }
       {EXPONENTIAL [mean]  }

 [/RUNS({MEAN  })=varlist]
        {MEDIAN}
        {MODE  }
        {value }

 [/BINOMIAL[({.5})]=varlist[({value1,value2})]]
             { p}            {value        }

 [/MCNEMAR=varlist [WITH varlist [(PAIRED)]]]

 [/SIGN=varlist [WITH varlist [(PAIRED)]]]

 [/WILCOXON=varlist [WITH varlist [(PAIRED)]]]

    |/MH=varlist [WITH varlist [(PAIRED)]]]††

 [/COCHRAN=varlist]

 [/FRIEDMAN=varlist]

 [/KENDALL=varlist]

 [/M-W=varlist BY var (value1,value2)]

 [/K-S=varlist BY var (value1,value2)]

 [/W-W=varlist BY var (value1,value2)]

 [/MOSES[(n)]=varlist BY var (value1,value2)]

 [/K-W=varlist BY var (value1,value2)]

 [/J-T=varlist BY var (value1, value2)]††

 [/MEDIAN[(value)]=varlist BY var (value1,value2)]

 [/MISSING=[{ANALYSIS**}]  [INCLUDE]]
            {LISTWISE  }

 [/SAMPLE]

 [/STATISTICS=[DESCRIPTIVES]  [QUARTILES] [ALL]]

    [/METHOD={MC [CIN({99.0 })] [SAMPLES({10000})] }]††
                      {value}            {value}
          {EXACT [TIMER({5    })]              }
                         {value}

**Default if the subcommand is omitted.

††Available only if the Exact Tests option is installed (available only on Windows operating systems).

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See NPAR TESTS Algorithms for computational details for this procedure.

Syntax for the NPAR TESTS command can be generated from the dialogs accessible from the Nonparametric Tests item on the Analyze menu.

Release History Collapse Hide details

Release History

Release 17.0

• Increased limits on number of variables allowed in the analysis.

Example

NPAR TESTS K-S(UNIFORM)=V1 /K-S(NORMAL,0,1)=V2.

Related Topics

Overview (NPAR TESTS command)
BINOMIAL Subcommand (NPAR TESTS command)
CHISQUARE Subcommand (NPAR TESTS command)
COCHRAN Subcommand (NPAR TESTS command)
FRIEDMAN Subcommand (NPAR TESTS command)
J-T Subcommand (NPAR TESTS command)
K-S Subcommand (One-Sample) (NPAR TESTS command)
K-S Subcommand (Two-Sample) (NPAR TESTS command)
K-W Subcommand (NPAR TESTS command)
KENDALL Subcommand (NPAR TESTS command)
M-W Subcommand (NPAR TESTS command)
MCNEMAR Subcommand (NPAR TESTS command)
MEDIAN Subcommand (NPAR TESTS command)
MH Subcommand (NPAR TESTS command)
MOSES Subcommand (NPAR TESTS command)
RUNS Subcommand (NPAR TESTS command)
SIGN Subcommand (NPAR TESTS command)
W-W Subcommand (NPAR TESTS command)
WILCOXON Subcommand (NPAR TESTS command)
STATISTICS Subcommand (NPAR TESTS command)
MISSING Subcommand (NPAR TESTS command)
SAMPLE Subcommand (NPAR TESTS command)
METHOD Subcommand (NPAR TESTS command)
References (NPAR TESTS command)
Runs Test
NPAR TESTS Command Additional Features (Runs Test)
Runs Test
NPAR TESTS Command Additional Features (Runs Test)
One-Sample Kolmogorov-Smirnov Test
NPAR TESTS Command Additional Features (One-Sample Kolmogorov-Smirnov Test)
One-Sample Kolmogorov-Smirnov Test
NPAR TESTS Command Additional Features (One-Sample Kolmogorov-Smirnov Test)
Tests for Several Related Samples
Tests for Several Related Samples
Tests for Several Independent Samples
NPAR TESTS Command Additional Features (K Independent Samples)
Tests for Several Independent Samples
NPAR TESTS Command Additional Features (K Independent Samples)
Chi-Square Test
NPAR TESTS Command Additional Features (Chi-Square Test)
Binomial Test
NPAR TESTS Command Additional Features (Binomial Test)
Binomial Test
NPAR TESTS Command Additional Features (Binomial Test)
Two-Related-Samples Tests
NPAR TESTS Command Additional Features (Two Related Samples)
Two-Related-Samples Tests
NPAR TESTS Command Additional Features (Two Related Samples)
Two-Independent-Samples Tests
NPAR TESTS Command Additional Features (Two-Independent-Samples Tests)
Two-Independent-Samples Tests
NPAR TESTS Command Additional Features (Two-Independent-Samples Tests)


Overview (NPAR TESTS command)

ALL (keyword),ALL (keyword),ALL (keyword)
NPAR TESTS command,NPAR TESTS command,NPAR TESTS command
WITH (keyword),WITH (keyword),WITH (keyword)
NPAR TESTS command,NPAR TESTS command,NPAR TESTS command
BY (keyword),BY (keyword),BY (keyword)
NPAR TESTS command,NPAR TESTS command,NPAR TESTS command
PAIRED (keyword),PAIRED (keyword),PAIRED (keyword)
NPAR TESTS command,NPAR TESTS command,NPAR TESTS command
NPAR TESTS (command),NPAR TESTS (command),NPAR TESTS (command)
limitations,limitations,limitations

NPAR TESTS is a collection of nonparametric tests. These tests make minimal assumptions about the underlying distribution of the data. (Siegel and Castellan, 1988) In addition to the nonparametric tests that are available in NPAR TESTS, the k-sample chi-square and Fisher’s exact test are available in procedure CROSSTABS.

NPAR TESTS (command),NPAR TESTS (command),NPAR TESTS (command)
related-samples test,related-samples test,related-samples test
NPAR TESTS (command),NPAR TESTS (command),NPAR TESTS (command)
one-sample test,one-sample test,one-sample test
NPAR TESTS (command),NPAR TESTS (command),NPAR TESTS (command)
independent-samples test,independent-samples test,independent-samples test

The tests that are available in NPAR TESTS can be grouped into three broad categories based on how the data are organized: one-sample tests, related-samples tests, and independent-samples tests. A one-sample test analyzes one variable. A test for related samples compares two or more variables for the same set of cases. An independent-samples test analyzes one variable that is grouped by categories of another variable.

The one-sample tests that are available in procedure NPAR TESTS are:

• BINOMIAL

• CHISQUARE

• K-S (Kolmogorov-Smirnov)

• RUNS

Tests for two related samples are:

• MCNEMAR

• SIGN

• WILCOXON

Tests for k related samples are:

• COCHRAN

• FRIEDMAN

• KENDALL

Tests for two independent samples are:

• M-W (Mann-Whitney)

• K-S (Kolmogorov-Smirnov)

• W-W (Wald-Wolfowitz)

• MOSES

Tests for k independent samples are:

• K-W (Kruskal-Wallis)

• MEDIAN

Tests are described below in alphabetical order.

Options Collapse Hide details

Options

Statistical Display. In addition to the tests, you can request univariate statistics, quartiles, and counts for all variables that are specified on the command. You can also control the pairing of variables in tests for two related samples.

Random Sampling. NPAR TESTS must store cases in memory when computing tests that use ranks. You can use random sampling when there is not enough space to store all cases.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is a single test subcommand and a list of variables to be tested. Some tests require additional specifications. CHISQUARE has an optional subcommand.

Subcommand Order Collapse Hide details

Subcommand Order

Subcommands can be used in any order.

Syntax Rules Collapse Hide details

Syntax Rules

• The STATISTICS, SAMPLE, and MISSING subcommands are optional. Each subcommand can be specified only once per NPAR TESTS command.

• You can request any or all tests, and you can specify a test subcommand more than once on a single NPAR TESTS command.

• If you specify a variable more than once on a test subcommand, only the first variable is used.

• Keyword ALL in any variable list refers to all user-defined variables in the active dataset.

• Keyword WITH controls pairing of variables in two-related-samples tests.

• Keyword BY introduces the grouping variable in two- and k-independent-samples tests.

• Keyword PAIRED can be used with keyword WITH on the MCNEMAR, SIGN, and WILCOXON subcommands to obtain sequential pairing of variables for two related samples.

Operations Collapse Hide details

Operations

• If a string variable is specified on any subcommand, NPAR TESTS will stop executing.

• When ALL is used, requests for tests of variables with themselves are ignored and a warning is displayed.

Limitations Collapse Hide details

Limitations

• A maximum of 100 subcommands is allowed.

• A maximum of 48,000 variables total per NPAR TESTS command is allowed.

• A maximum of 200 values for subcommand CHISQUARE is allowed.

Related Topics

NPAR TESTS
BINOMIAL Subcommand (NPAR TESTS command)
CHISQUARE Subcommand (NPAR TESTS command)
COCHRAN Subcommand (NPAR TESTS command)
FRIEDMAN Subcommand (NPAR TESTS command)
J-T Subcommand (NPAR TESTS command)
K-S Subcommand (One-Sample) (NPAR TESTS command)
K-S Subcommand (Two-Sample) (NPAR TESTS command)
K-W Subcommand (NPAR TESTS command)
KENDALL Subcommand (NPAR TESTS command)
M-W Subcommand (NPAR TESTS command)
MCNEMAR Subcommand (NPAR TESTS command)
MEDIAN Subcommand (NPAR TESTS command)
MH Subcommand (NPAR TESTS command)
MOSES Subcommand (NPAR TESTS command)
RUNS Subcommand (NPAR TESTS command)
SIGN Subcommand (NPAR TESTS command)
W-W Subcommand (NPAR TESTS command)
WILCOXON Subcommand (NPAR TESTS command)
STATISTICS Subcommand (NPAR TESTS command)
MISSING Subcommand (NPAR TESTS command)
SAMPLE Subcommand (NPAR TESTS command)
METHOD Subcommand (NPAR TESTS command)
References (NPAR TESTS command)


BINOMIAL Subcommand (NPAR TESTS command)

BINOMIAL (subcommand),BINOMIAL (subcommand),BINOMIAL (subcommand)
NPAR TESTS command,NPAR TESTS command,NPAR TESTS command
NPAR TESTS (command),NPAR TESTS (command),NPAR TESTS (command)
BINOMIAL subcommand,BINOMIAL subcommand,BINOMIAL subcommand
NPAR TESTS BINOMIAL [({.5})]=varlist[({value,value})]
                      {p }            {value      }

BINOMIAL tests whether the observed distribution of a dichotomous variable is the same as what is expected from a specified binomial distribution. By default, each named variable is assumed to have only two values, and the distribution of each named variable is compared to a binomial distribution with p (the proportion of cases expected in the first category) equal to 0.5. The default output includes the number of valid cases in each group, the test proportion, and the two-tailed probability of the observed proportion.

Syntax Collapse Hide details

Syntax

• The minimum specification is a list of variables to be tested.

• To change the default 0.5 test proportion, specify a value in parentheses immediately after keyword BINOMIAL.

• A single value in parentheses following the variable list is used as a cutting point. Cases with values that are equal to or less than the cutting point form the first category; the remaining cases form the second category.

• If two values appear in parentheses after the variable list, cases with values that are equal to the first value form the first category, and cases with values that are equal to the second value form the second category.

• If no values are specified, the variables must be dichotomous. The first value encountered in the dataset defines the first category, and the other value defines the second category.

Operations Collapse Hide details

Operations

• The proportion observed in the first category is compared to the test proportion. The probability of the observed proportion occurring given the test proportion and a binomial distribution is then computed. A test statistic is calculated for each variable specified.

• If the test proportion is the default (0.5), a two-tailed probability is displayed. For any other test proportion, a one-tailed probability is displayed. The direction of the one-tailed test depends on the observed proportion in the first category. If the observed proportion is more than the test proportion, the significance of observing that many or more in the first category is reported. If the observed proportion is less than or equal to the test proportion, the significance of observing that many or fewer in the first category is reported. In other words, the test is always done in the observed direction.

Example Collapse Hide details

Example

NPAR TESTS BINOMIAL(.667)=V1(0,1).

• NPAR TESTS displays the Binomial Test table, showing the number of cases, observed proportion, test proportion (0.667), and the one-tailed significance for each category.

• If more than 0.667 of the cases have value 0 for V1, BINOMIAL gives the probability of observing that many or more values of 0 in a binomial distribution with probability 0.667. If fewer than 0.667 of the cases are 0, the test will be of observing that many or fewer values.

Related Topics

NPAR TESTS
Overview (NPAR TESTS command)
CHISQUARE Subcommand (NPAR TESTS command)
COCHRAN Subcommand (NPAR TESTS command)
FRIEDMAN Subcommand (NPAR TESTS command)
J-T Subcommand (NPAR TESTS command)
K-S Subcommand (One-Sample) (NPAR TESTS command)
K-S Subcommand (Two-Sample) (NPAR TESTS command)
K-W Subcommand (NPAR TESTS command)
KENDALL Subcommand (NPAR TESTS command)
M-W Subcommand (NPAR TESTS command)
MCNEMAR Subcommand (NPAR TESTS command)
MEDIAN Subcommand (NPAR TESTS command)
MH Subcommand (NPAR TESTS command)
MOSES Subcommand (NPAR TESTS command)
RUNS Subcommand (NPAR TESTS command)
SIGN Subcommand (NPAR TESTS command)
W-W Subcommand (NPAR TESTS command)
WILCOXON Subcommand (NPAR TESTS command)
STATISTICS Subcommand (NPAR TESTS command)
MISSING Subcommand (NPAR TESTS command)
SAMPLE Subcommand (NPAR TESTS command)
METHOD Subcommand (NPAR TESTS command)
References (NPAR TESTS command)


CHISQUARE Subcommand (NPAR TESTS command)

NPAR TESTS (command),NPAR TESTS (command),NPAR TESTS (command)
CHISQUARE subcommand,CHISQUARE subcommand,CHISQUARE subcommand
CHISQUARE (subcommand),CHISQUARE (subcommand),CHISQUARE (subcommand)
NPAR TESTS command,NPAR TESTS command,NPAR TESTS command
NPAR TESTS CHISQUARE=varlist [(lo,hi)] [/EXPECTED={EQUAL**     }]
                                                  {f1,f2,..., fn}

The CHISQUARE (alias CHI-SQUARE) one-sample test computes a chi-square statistic based on the differences between the observed and expected frequencies of categories of a variable. By default, equal frequencies are expected in each category. The output includes the frequency distribution, expected frequencies, residuals, chi-square, degrees of freedom, and probability.

Syntax Collapse Hide details

Syntax

• The minimum specification is a list of variables to be tested. Optionally, you can specify a value range in parentheses following the variable list. You can also specify expected proportions with the EXPECTED subcommand.

• If you use the EXPECTED subcommand to specify unequal expected frequencies, you must specify a value greater than 0 for each observed category of the variable. The expected frequencies are specified in ascending order of category value. You can use the notation n*f to indicate that frequency f is expected for n consecutive categories.

• Specifying keyword EQUAL on the EXPECTED subcommand has the same effect as omitting the EXPECTED subcommand.

• EXPECTED applies to all variables that are specified on the CHISQUARE subcommand. Use multiple CHISQUARE and EXPECTED subcommands to specify different expected proportions for variables.

Operations Collapse Hide details

Operations

• If no range is specified for the variables that are to be tested, a separate Chi-Square Frequency table is produced for each variable. Each distinct value defines a category.

• If a range is specified, integer-valued categories are established for each value within the range. Non-integer values are truncated before classification. Cases with values that are outside the specified range are excluded. One combined Chi-Square Frequency table is produced for all specified variables.

• Expected values are interpreted as proportions, not absolute values. Values are summed, and each value is divided by the total to calculate the proportion of cases expected in the corresponding category.

• A test statistic is calculated for each specified variable.

Example Collapse Hide details

Example

NPAR TESTS CHISQUARE=V1 (1,5) /EXPECTED= 12, 3*16, 18.

• This example requests the chi-square test for values 1 through 5 of variable V1.

• The observed frequencies for variable V1 are compared with the hypothetical distribution of 12/78 occurrences of value 1; 16/78 occurrences each of values 2, 3, and 4; and 18/78 occurrences of value 5.

Related Topics

NPAR TESTS
Overview (NPAR TESTS command)
BINOMIAL Subcommand (NPAR TESTS command)
COCHRAN Subcommand (NPAR TESTS command)
FRIEDMAN Subcommand (NPAR TESTS command)
J-T Subcommand (NPAR TESTS command)
K-S Subcommand (One-Sample) (NPAR TESTS command)
K-S Subcommand (Two-Sample) (NPAR TESTS command)
K-W Subcommand (NPAR TESTS command)
KENDALL Subcommand (NPAR TESTS command)
M-W Subcommand (NPAR TESTS command)
MCNEMAR Subcommand (NPAR TESTS command)
MEDIAN Subcommand (NPAR TESTS command)
MH Subcommand (NPAR TESTS command)
MOSES Subcommand (NPAR TESTS command)
RUNS Subcommand (NPAR TESTS command)
SIGN Subcommand (NPAR TESTS command)
W-W Subcommand (NPAR TESTS command)
WILCOXON Subcommand (NPAR TESTS command)
STATISTICS Subcommand (NPAR TESTS command)
MISSING Subcommand (NPAR TESTS command)
SAMPLE Subcommand (NPAR TESTS command)
METHOD Subcommand (NPAR TESTS command)
References (NPAR TESTS command)


COCHRAN Subcommand (NPAR TESTS command)

NPAR TESTS (command),NPAR TESTS (command),NPAR TESTS (command)
COCHRAN subcommand,COCHRAN subcommand,COCHRAN subcommand
COCHRAN (subcommand),COCHRAN (subcommand),COCHRAN (subcommand)
NPAR TESTS command,NPAR TESTS command,NPAR TESTS command
NPAR TESTS COCHRAN=varlist

COCHRAN calculates Cochran’s Q, which tests whether the distribution of values is the same for k related dichotomous variables. The output shows the frequency distribution for each variable in the Cochran Frequencies table and the number of cases, Cochran’s Q, degrees of freedom, and probability in the Test Statistics table.

Syntax Collapse Hide details

Syntax

• The minimum specification is a list of two variables.

• The variables must be dichotomous and must be coded with the same two values.

Operations Collapse Hide details

Operations

• A k × 2 contingency table (variables by categories) is constructed for dichotomous variables, and the proportions for each variable are computed. A single test is calculated, comparing all variables.

• Cochran’s Q statistic has approximately a chi-square distribution.

Example Collapse Hide details

Example

NPAR TESTS COCHRAN=RV1 TO RV3.

• This example tests whether the distribution of values 0 and 1 for RV1, RV2, and RV3 is the same.

Related Topics

NPAR TESTS
Overview (NPAR TESTS command)
BINOMIAL Subcommand (NPAR TESTS command)
CHISQUARE Subcommand (NPAR TESTS command)
FRIEDMAN Subcommand (NPAR TESTS command)
J-T Subcommand (NPAR TESTS command)
K-S Subcommand (One-Sample) (NPAR TESTS command)
K-S Subcommand (Two-Sample) (NPAR TESTS command)
K-W Subcommand (NPAR TESTS command)
KENDALL Subcommand (NPAR TESTS command)
M-W Subcommand (NPAR TESTS command)
MCNEMAR Subcommand (NPAR TESTS command)
MEDIAN Subcommand (NPAR TESTS command)
MH Subcommand (NPAR TESTS command)
MOSES Subcommand (NPAR TESTS command)
RUNS Subcommand (NPAR TESTS command)
SIGN Subcommand (NPAR TESTS command)
W-W Subcommand (NPAR TESTS command)
WILCOXON Subcommand (NPAR TESTS command)
STATISTICS Subcommand (NPAR TESTS command)
MISSING Subcommand (NPAR TESTS command)
SAMPLE Subcommand (NPAR TESTS command)
METHOD Subcommand (NPAR TESTS command)
References (NPAR TESTS command)


FRIEDMAN Subcommand (NPAR TESTS command)

NPAR TESTS (command),NPAR TESTS (command),NPAR TESTS (command)
FRIEDMAN subcommand,FRIEDMAN subcommand,FRIEDMAN subcommand
FRIEDMAN (subcommand),FRIEDMAN (subcommand),FRIEDMAN (subcommand)
NPAR TESTS command,NPAR TESTS command,NPAR TESTS command
NPAR TESTS FRIEDMAN=varlist

FRIEDMAN tests whether k related samples have been drawn from the same population. The output shows the mean rank for each variable in the Friedman Ranks table and the number of valid cases, chi-square, degrees of freedom, and probability in the Test Statistics table.

Syntax Collapse Hide details

Syntax

• The minimum specification is a list of two variables.

• Variables should be at least at the ordinal level of measurement.

Operations Collapse Hide details

Operations

• The values of k variables are ranked from 1 to k for each case, and the mean rank is calculated for each variable over all cases.

• The test statistic has approximately a chi-square distribution. A single test statistic is calculated, comparing all variables.

Example Collapse Hide details

Example

NPAR TESTS FRIEDMAN=V1 V2 V3
  /STATISTICS=DESCRIPTIVES.

• This example tests variables V1, V2, and V3, and the example requests univariate statistics for all three variables.

Related Topics

NPAR TESTS
Overview (NPAR TESTS command)
BINOMIAL Subcommand (NPAR TESTS command)
CHISQUARE Subcommand (NPAR TESTS command)
COCHRAN Subcommand (NPAR TESTS command)
J-T Subcommand (NPAR TESTS command)
K-S Subcommand (One-Sample) (NPAR TESTS command)
K-S Subcommand (Two-Sample) (NPAR TESTS command)
K-W Subcommand (NPAR TESTS command)
KENDALL Subcommand (NPAR TESTS command)
M-W Subcommand (NPAR TESTS command)
MCNEMAR Subcommand (NPAR TESTS command)
MEDIAN Subcommand (NPAR TESTS command)
MH Subcommand (NPAR TESTS command)
MOSES Subcommand (NPAR TESTS command)
RUNS Subcommand (NPAR TESTS command)
SIGN Subcommand (NPAR TESTS command)
W-W Subcommand (NPAR TESTS command)
WILCOXON Subcommand (NPAR TESTS command)
STATISTICS Subcommand (NPAR TESTS command)
MISSING Subcommand (NPAR TESTS command)
SAMPLE Subcommand (NPAR TESTS command)
METHOD Subcommand (NPAR TESTS command)
References (NPAR TESTS command)


J-T Subcommand (NPAR TESTS command)

NPAR TESTS /J-T=varlist BY variable(value1,value2)

J-T (alias JONCKHEERE-TERPSTRA) performs the Jonckheere-Terpstra test, which tests whether k independent samples that are defined by a grouping variable are from the same population. This test is particularly powerful when the k populations have a natural ordering. The output shows the number of levels in the grouping variable; the total number of cases; observed, standardized, mean, and standard deviation of the test statistic; the two-tailed asymptotic significance; and, if a /METHOD subcommand is specified, one-tailed and two-tailed exact or Monte Carlo probabilities. This subcommand is available only if the Exact Tests option is installed.

Syntax Collapse Hide details

Syntax

• The minimum specification is a test variable, the keyword BY, a grouping variable, and a pair of values in parentheses.

• Every value in the range defined by the pair of values for the grouping variable forms a group.

• If the /METHOD subcommand is specified, and the number of populations, k, is greater than 5, the p value is estimated by using the Monte Carlo sampling method. The exact p value is not available when k exceeds 5.

Operations Collapse Hide details

Operations

• Cases from the k groups are ranked in a single series, and the rank sum for each group is computed. A test statistic is calculated for each variable that is specified before BY.

• The Jonckheere-Terpstra statistic has approximately a normal distribution.

• Cases with values other than values in the range that is specified for the grouping variable are excluded.

• The direction of a one-tailed inference is indicated by the sign of the standardized test statistic.

Example Collapse Hide details

Example

NPAR TESTS /J-T=V1 BY V2(0,4)
  /METHOD=EXACT.

• This example performs the Jonckheere-Terpstra test for groups that are defined by values 0 through 4 of V2. The exact p values are calculated.

Related Topics

NPAR TESTS
Overview (NPAR TESTS command)
BINOMIAL Subcommand (NPAR TESTS command)
CHISQUARE Subcommand (NPAR TESTS command)
COCHRAN Subcommand (NPAR TESTS command)
FRIEDMAN Subcommand (NPAR TESTS command)
K-S Subcommand (One-Sample) (NPAR TESTS command)
K-S Subcommand (Two-Sample) (NPAR TESTS command)
K-W Subcommand (NPAR TESTS command)
KENDALL Subcommand (NPAR TESTS command)
M-W Subcommand (NPAR TESTS command)
MCNEMAR Subcommand (NPAR TESTS command)
MEDIAN Subcommand (NPAR TESTS command)
MH Subcommand (NPAR TESTS command)
MOSES Subcommand (NPAR TESTS command)
RUNS Subcommand (NPAR TESTS command)
SIGN Subcommand (NPAR TESTS command)
W-W Subcommand (NPAR TESTS command)
WILCOXON Subcommand (NPAR TESTS command)
STATISTICS Subcommand (NPAR TESTS command)
MISSING Subcommand (NPAR TESTS command)
SAMPLE Subcommand (NPAR TESTS command)
METHOD Subcommand (NPAR TESTS command)
References (NPAR TESTS command)


K-S Subcommand (One-Sample) (NPAR TESTS command)

Kolmogorov-Smirnov Z,Kolmogorov-Smirnov Z,Kolmogorov-Smirnov Z
NPAR TESTS command,NPAR TESTS command,NPAR TESTS command
NPAR TESTS (command),NPAR TESTS (command),NPAR TESTS (command)
K-S subcommand,K-S subcommand,K-S subcommand
K-S (subcommand),K-S (subcommand),K-S (subcommand)
NPAR TESTS command,NPAR TESTS command,NPAR TESTS command
NPAR TESTS K-S({NORMAL [mean,stddev]})=varlist
               {POISSON [mean]      }
               {UNIFORM [min,max]   }
               {EXPONENTIAL [mean]  }

The K-S (alias KOLMOGOROV-SMIRNOV) one-sample test compares the cumulative distribution function for a variable with a uniform, normal, Poisson, or exponential distribution, and the test tests whether the distributions are homogeneous. The parameters of the test distribution can be specified; the defaults are the observed parameters. The output shows the number of valid cases, parameters of the test distribution, most-extreme absolute, positive, and negative differences, Kolmogorov-Smirnov Z, and two-tailed probability for each variable.

Syntax Collapse Hide details

Syntax

The minimum specification is a distribution keyword and a list of variables. The distribution keywords are NORMAL, POISSON, EXPONENTIAL, and UNIFORM.

• The distribution keyword and its optional parameters must be enclosed within parentheses.

• The distribution keyword must be separated from its parameters by blanks or commas.

NORMAL [mean, stdev] | Normal distribution. The default parameters are the observed mean and standard deviation.
POISSON [mean] | Poisson distribution. The default parameter is the observed mean.
UNIFORM [min,max] | Uniform distribution. The default parameters are the observed minimum and maximum values.
EXPONENTIAL [mean] | Exponential distribution. The default parameter is the observed mean.
Operations Collapse Hide details

Operations

• The Kolmogorov-Smirnov Z is computed from the largest difference in absolute value between the observed and test distribution functions.

• The K-S probability levels assume that the test distribution is specified entirely in advance. The distribution of the test statistic and resulting probabilities are different when the parameters of the test distribution are estimated from the sample. No correction is made. The power of the test to detect departures from the hypothesized distribution may be seriously diminished. For testing against a normal distribution with estimated parameters, consider the adjusted K-S Lilliefors test that is available in the EXAMINE procedure.

• For a mean of 100,000 or larger, a normal approximation to the Poisson distribution is used.

• A test statistic is calculated for each specified variable.

Example Collapse Hide details

Example

NPAR TESTS K-S(UNIFORM)=V1 /K-S(NORMAL,0,1)=V2.

• The first K-S subcommand compares the distribution of V1 with a uniform distribution that has the same range as V1.

• The second K-S subcommand compares the distribution of V2 with a normal distribution that has a mean of 0 and a standard deviation of 1.

Related Topics

NPAR TESTS
Overview (NPAR TESTS command)
BINOMIAL Subcommand (NPAR TESTS command)
CHISQUARE Subcommand (NPAR TESTS command)
COCHRAN Subcommand (NPAR TESTS command)
FRIEDMAN Subcommand (NPAR TESTS command)
J-T Subcommand (NPAR TESTS command)
K-S Subcommand (Two-Sample) (NPAR TESTS command)
K-W Subcommand (NPAR TESTS command)
KENDALL Subcommand (NPAR TESTS command)
M-W Subcommand (NPAR TESTS command)
MCNEMAR Subcommand (NPAR TESTS command)
MEDIAN Subcommand (NPAR TESTS command)
MH Subcommand (NPAR TESTS command)
MOSES Subcommand (NPAR TESTS command)
RUNS Subcommand (NPAR TESTS command)
SIGN Subcommand (NPAR TESTS command)
W-W Subcommand (NPAR TESTS command)
WILCOXON Subcommand (NPAR TESTS command)
STATISTICS Subcommand (NPAR TESTS command)
MISSING Subcommand (NPAR TESTS command)
SAMPLE Subcommand (NPAR TESTS command)
METHOD Subcommand (NPAR TESTS command)
References (NPAR TESTS command)


K-S Subcommand (Two-Sample) (NPAR TESTS command)

Kolmogorov-Smirnov Z,Kolmogorov-Smirnov Z,Kolmogorov-Smirnov Z
NPAR TESTS command,NPAR TESTS command,NPAR TESTS command
NPAR TESTS (command),NPAR TESTS (command),NPAR TESTS (command)
K-S subcommand,K-S subcommand,K-S subcommand
K-S (subcommand),K-S (subcommand),K-S (subcommand)
NPAR TESTS command,NPAR TESTS command,NPAR TESTS command
NPAR TESTS K-S=varlist BY variable(value1,value2)

K-S (alias KOLMOGOROV-SMIRNOV) tests whether the distribution of a variable is the same in two independent samples that are defined by a grouping variable. The test is sensitive to any difference in median, dispersion, skewness, and so forth, between the two distributions. The output shows the valid number of cases in each group in the Frequency table. The output also shows the largest absolute, positive, and negative differences between the two groups, the Kolmogorov-Smirnov Z, and the two-tailed probability for each variable in the Test Statistics table.

Syntax Collapse Hide details

Syntax

• The minimum specification is a test variable, the keyword BY, a grouping variable, and a pair of values in parentheses.

• The test variable should be at least at the ordinal level of measurement.

• Cases with the first value form one group, and cases with the second value form the other group. The order in which values are specified determines which difference is the largest positive and which difference is the largest negative.

Operations Collapse Hide details

Operations

• The observed cumulative distributions are computed for both groups, as are the maximum positive, negative, and absolute differences. A test statistic is calculated for each variable that is named before BY.

• Cases with values other than values that are specified for the grouping variable are excluded.

Example Collapse Hide details

Example

NPAR TESTS K-S=V1 V2 BY V3(0,1).

• This example specifies two tests. The first test compares the distribution of V1 for cases with value 0 for V3 with the distribution of V1 for cases with value 1 for V3.

• A parallel test is calculated for V2.

Related Topics

NPAR TESTS
Overview (NPAR TESTS command)
BINOMIAL Subcommand (NPAR TESTS command)
CHISQUARE Subcommand (NPAR TESTS command)
COCHRAN Subcommand (NPAR TESTS command)
FRIEDMAN Subcommand (NPAR TESTS command)
J-T Subcommand (NPAR TESTS command)
K-S Subcommand (One-Sample) (NPAR TESTS command)
K-W Subcommand (NPAR TESTS command)
KENDALL Subcommand (NPAR TESTS command)
M-W Subcommand (NPAR TESTS command)
MCNEMAR Subcommand (NPAR TESTS command)
MEDIAN Subcommand (NPAR TESTS command)
MH Subcommand (NPAR TESTS command)
MOSES Subcommand (NPAR TESTS command)
RUNS Subcommand (NPAR TESTS command)
SIGN Subcommand (NPAR TESTS command)
W-W Subcommand (NPAR TESTS command)
WILCOXON Subcommand (NPAR TESTS command)
STATISTICS Subcommand (NPAR TESTS command)
MISSING Subcommand (NPAR TESTS command)
SAMPLE Subcommand (NPAR TESTS command)
METHOD Subcommand (NPAR TESTS command)
References (NPAR TESTS command)


K-W Subcommand (NPAR TESTS command)

NPAR TESTS K-W=varlist BY variable(value1,value2)

K-W (alias KRUSKAL-WALLIS) tests whether k independent samples that are defined by a grouping variable are from the same population. The output shows the number of valid cases and the mean rank of the variable in each group in the Ranks table. the output also shows the chi-square, degrees of freedom, and probability in the Test Statistics table.

Syntax Collapse Hide details

Syntax

• The minimum specification is a test variable, the keyword BY, a grouping variable, and a pair of values in parentheses.

• Every value in the range defined by the pair of values for the grouping variable forms a group.

Operations Collapse Hide details

Operations

• Cases from the k groups are ranked in a single series, and the rank sum for each group is computed. A test statistic is calculated for each variable that is specified before BY.

• Kruskal-Wallis H has approximately a chi-square distribution.

• Cases with values other than values in the range that is specified for the grouping variable are excluded.

Example Collapse Hide details

Example

NPAR TESTS K-W=V1 BY V2(0,4).

• This example tests V1 for groups that are defined by values 0 through 4 of V2.

Related Topics

NPAR TESTS
Overview (NPAR TESTS command)
BINOMIAL Subcommand (NPAR TESTS command)
CHISQUARE Subcommand (NPAR TESTS command)
COCHRAN Subcommand (NPAR TESTS command)
FRIEDMAN Subcommand (NPAR TESTS command)
J-T Subcommand (NPAR TESTS command)
K-S Subcommand (One-Sample) (NPAR TESTS command)
K-S Subcommand (Two-Sample) (NPAR TESTS command)
KENDALL Subcommand (NPAR TESTS command)
M-W Subcommand (NPAR TESTS command)
MCNEMAR Subcommand (NPAR TESTS command)
MEDIAN Subcommand (NPAR TESTS command)
MH Subcommand (NPAR TESTS command)
MOSES Subcommand (NPAR TESTS command)
RUNS Subcommand (NPAR TESTS command)
SIGN Subcommand (NPAR TESTS command)
W-W Subcommand (NPAR TESTS command)
WILCOXON Subcommand (NPAR TESTS command)
STATISTICS Subcommand (NPAR TESTS command)
MISSING Subcommand (NPAR TESTS command)
SAMPLE Subcommand (NPAR TESTS command)
METHOD Subcommand (NPAR TESTS command)
References (NPAR TESTS command)


KENDALL Subcommand (NPAR TESTS command)

NPAR TESTS (command),NPAR TESTS (command),NPAR TESTS (command)
KENDALL subcommand,KENDALL subcommand,KENDALL subcommand
KENDALL (subcommand),KENDALL (subcommand),KENDALL (subcommand)
NPAR TESTS command,NPAR TESTS command,NPAR TESTS command
NPAR TESTS KENDALL=varlist

KENDALL tests whether k related samples are from the same population. W is a measure of agreement among judges or raters, where each case is one judge’s rating of several items (variables). The output includes the mean rank for each variable in the Ranks table and the valid number of cases, Kendall’s W, chi-square, degrees of freedom, and probability in the Test Statistics table.

Syntax Collapse Hide details

Syntax

The minimum specification is a list of two variables.

Operations Collapse Hide details

Operations

• The values of the k variables are ranked from 1 to k for each case, and the mean rank is calculated for each variable over all cases. Kendall’s W and a corresponding chi-square statistic are calculated, correcting for ties. In addition, a single test statistic is calculated for all variables.

• W ranges between 0 (no agreement) and 1 (complete agreement).

Example Collapse Hide details

Example

DATA LIST /V1 TO V5 1-10.
BEGIN DATA
2 5 4 5 1
3 3 4 5 3
3 4 4 6 2
2 4 3 6 2
END DATA.
NPAR TESTS KENDALL=ALL.

• This example tests four judges (cases) on five items (variables V1 through V5).

Related Topics

NPAR TESTS
Overview (NPAR TESTS command)
BINOMIAL Subcommand (NPAR TESTS command)
CHISQUARE Subcommand (NPAR TESTS command)
COCHRAN Subcommand (NPAR TESTS command)
FRIEDMAN Subcommand (NPAR TESTS command)
J-T Subcommand (NPAR TESTS command)
K-S Subcommand (One-Sample) (NPAR TESTS command)
K-S Subcommand (Two-Sample) (NPAR TESTS command)
K-W Subcommand (NPAR TESTS command)
M-W Subcommand (NPAR TESTS command)
MCNEMAR Subcommand (NPAR TESTS command)
MEDIAN Subcommand (NPAR TESTS command)
MH Subcommand (NPAR TESTS command)
MOSES Subcommand (NPAR TESTS command)
RUNS Subcommand (NPAR TESTS command)
SIGN Subcommand (NPAR TESTS command)
W-W Subcommand (NPAR TESTS command)
WILCOXON Subcommand (NPAR TESTS command)
STATISTICS Subcommand (NPAR TESTS command)
MISSING Subcommand (NPAR TESTS command)
SAMPLE Subcommand (NPAR TESTS command)
METHOD Subcommand (NPAR TESTS command)
References (NPAR TESTS command)


M-W Subcommand (NPAR TESTS command)

NPAR TESTS (command),NPAR TESTS (command),NPAR TESTS (command)
M-W subcommand,M-W subcommand,M-W subcommand
M-W (subcommand),M-W (subcommand),M-W (subcommand)
NPAR TESTS command,NPAR TESTS command,NPAR TESTS command
Mann-Whitney U,Mann-Whitney U,Mann-Whitney U
NPAR TESTS command,NPAR TESTS command,NPAR TESTS command
NPAR TESTS M-W=varlist BY variable(value1,value2)

M-W (alias MANN-WHITNEY) tests whether two independent samples that are defined by a grouping variable are from the same population. The test statistic uses the rank of each case to test whether the groups are drawn from the same population. The output shows the number of valid cases of each group; the mean rank of the variable within each group and the sum of ranks in the Ranks table and the Mann-Whitney U; Wilcoxon W (the rank sum of the smaller group); Z statistic; and probability in the Test Statistics table.

Syntax Collapse Hide details

Syntax

• The minimum specification is a test variable, the keyword BY, a grouping variable, and a pair of values in parentheses.

• Cases with the first value form one group and cases with the second value form the other group. The order in which the values are specified is unimportant.

Operations Collapse Hide details

Operations

• Cases are ranked in order of increasing size, and test statistic U (the number of times that a score from group 1 precedes a score from group 2) is computed.

• An exact significance level is computed if there are 40 or fewer cases. For more than 40 cases, U is transformed into a normally distributed Z statistic, and a normal approximation p value is computed.

• A test statistic is calculated for each variable that is named before BY.

• Cases with values other than values that are specified for the grouping variable are excluded.

Example Collapse Hide details

Example

NPAR TESTS M-W=V1 BY V2(1,2).

• This example tests V1 based on the two groups that are defined by values 1 and 2 of V2.

Related Topics

NPAR TESTS
Overview (NPAR TESTS command)
BINOMIAL Subcommand (NPAR TESTS command)
CHISQUARE Subcommand (NPAR TESTS command)
COCHRAN Subcommand (NPAR TESTS command)
FRIEDMAN Subcommand (NPAR TESTS command)
J-T Subcommand (NPAR TESTS command)
K-S Subcommand (One-Sample) (NPAR TESTS command)
K-S Subcommand (Two-Sample) (NPAR TESTS command)
K-W Subcommand (NPAR TESTS command)
KENDALL Subcommand (NPAR TESTS command)
MCNEMAR Subcommand (NPAR TESTS command)
MEDIAN Subcommand (NPAR TESTS command)
MH Subcommand (NPAR TESTS command)
MOSES Subcommand (NPAR TESTS command)
RUNS Subcommand (NPAR TESTS command)
SIGN Subcommand (NPAR TESTS command)
W-W Subcommand (NPAR TESTS command)
WILCOXON Subcommand (NPAR TESTS command)
STATISTICS Subcommand (NPAR TESTS command)
MISSING Subcommand (NPAR TESTS command)
SAMPLE Subcommand (NPAR TESTS command)
METHOD Subcommand (NPAR TESTS command)
References (NPAR TESTS command)


MCNEMAR Subcommand (NPAR TESTS command)

NPAR TESTS (command),NPAR TESTS (command),NPAR TESTS (command)
MCNEMAR subcommand,MCNEMAR subcommand,MCNEMAR subcommand
MCNEMAR (subcommand),MCNEMAR (subcommand),MCNEMAR (subcommand)
NPAR TESTS command,NPAR TESTS command,NPAR TESTS command
NPAR TESTS MCNEMAR=varlist [WITH varlist [(PAIRED)]]

MCNEMAR tests whether combinations of values between two dichotomous variables are equally likely. The output includes a Crosstabulation table for each pair and a Test Statistics table for all pairs, showing the number of valid cases, chi-square, and probability for each pair.

Syntax Collapse Hide details

Syntax

• The minimum specification is a list of two variables. Variables must be dichotomous and must have the same two values.

• If keyword WITH is not specified, each variable is paired with every other variable in the list.

• If WITH is specified, each variable before WITH is paired with each variable after WITH. If PAIRED is also specified, the first variable before WITH is paired with the first variable after WITH, the second variable before WITH is paired with the second variable after WITH, and so on. PAIRED cannot be specified without WITH.

• With PAIRED, the number of variables that are specified before and after WITH must be the same. PAIRED must be specified in parentheses after the second variable list.

Operations Collapse Hide details

Operations

• For the purposes of computing the test statistics, only combinations for which the values for the two variables are different are considered.

• If fewer than 25 cases change values from the first variable to the second variable, the binomial distribution is used to compute the probability.

Example Collapse Hide details

Example

NPAR TESTS MCNEMAR=V1 V2 V3.

• This example performs the MCNEMAR test on variable pairs V1 and V2, V1 and V3, and V2 and V3.

Related Topics

NPAR TESTS
Overview (NPAR TESTS command)
BINOMIAL Subcommand (NPAR TESTS command)
CHISQUARE Subcommand (NPAR TESTS command)
COCHRAN Subcommand (NPAR TESTS command)
FRIEDMAN Subcommand (NPAR TESTS command)
J-T Subcommand (NPAR TESTS command)
K-S Subcommand (One-Sample) (NPAR TESTS command)
K-S Subcommand (Two-Sample) (NPAR TESTS command)
K-W Subcommand (NPAR TESTS command)
KENDALL Subcommand (NPAR TESTS command)
M-W Subcommand (NPAR TESTS command)
MEDIAN Subcommand (NPAR TESTS command)
MH Subcommand (NPAR TESTS command)
MOSES Subcommand (NPAR TESTS command)
RUNS Subcommand (NPAR TESTS command)
SIGN Subcommand (NPAR TESTS command)
W-W Subcommand (NPAR TESTS command)
WILCOXON Subcommand (NPAR TESTS command)
STATISTICS Subcommand (NPAR TESTS command)
MISSING Subcommand (NPAR TESTS command)
SAMPLE Subcommand (NPAR TESTS command)
METHOD Subcommand (NPAR TESTS command)
References (NPAR TESTS command)


MEDIAN Subcommand (NPAR TESTS command)

NPAR TESTS (command),NPAR TESTS (command),NPAR TESTS (command)
MEDIAN subcommand,MEDIAN subcommand,MEDIAN subcommand
MEDIAN (subcommand),MEDIAN (subcommand),MEDIAN (subcommand)
NPAR TESTS command,NPAR TESTS command,NPAR TESTS command
NPAR TESTS MEDIAN [(value)]=varlist BY variable(value1,value2)

MEDIAN determines whether k independent samples are drawn from populations with the same median. The independent samples are defined by a grouping variable. For each variable, the output shows a table of the number of cases that are greater than and less than or equal to the median in each category in the Frequency table. The output also shows the number of valid cases, the median, chi-square, degrees of freedom, and probability in the Test Statistics table.

Syntax Collapse Hide details

Syntax

• The minimum specification is a single test variable, the keyword BY, a grouping variable, and two values in parentheses.

• If the first grouping value is less than the second value, every value in the range that is defined by the pair of values forms a group, and a k-sample test is performed.

• If the first value is greater than the second value, two groups are formed by using the two values, and a two-sample test is performed.

• By default, the median is calculated from all cases that are included in the test. To override the default, specify a median value in parentheses following the MEDIAN subcommand keyword.

Operations Collapse Hide details

Operations

• A 2 × k contingency table is constructed with counts of the number of cases that are greater than the median and less than or equal to the median for the k groups.

• Test statistics are calculated for each variable that is specified before BY.

• For more than 30 cases, a chi-square statistic is computed. For 30 or fewer cases, Fisher’s exact procedure (two-tailed) is used instead of chi-square.

• For a two-sample test, cases with values other than the two specified values are excluded.

Example Collapse Hide details

Example

NPAR TESTS MEDIAN(8.4)=V1 BY V2(1,2) /MEDIAN=V1 BY V2(1,2)
  /MEDIAN=V1 BY V3(1,4) /MEDIAN=V1 BY V3(4,1).

• The first two MEDIAN subcommands test variable V1 grouped by values 1 and 2 of variable V2. The first test specifies a median of 8.4, and the second test uses the observed median.

• The third MEDIAN subcommand requests a four-samples test, dividing the sample into four groups based on values 1, 2, 3, and 4 of variable V3.

• The last MEDIAN subcommand requests a two-samples test, grouping cases based on values 1 and 4 of V3 and ignoring all other cases.

Related Topics

NPAR TESTS
Overview (NPAR TESTS command)
BINOMIAL Subcommand (NPAR TESTS command)
CHISQUARE Subcommand (NPAR TESTS command)
COCHRAN Subcommand (NPAR TESTS command)
FRIEDMAN Subcommand (NPAR TESTS command)
J-T Subcommand (NPAR TESTS command)
K-S Subcommand (One-Sample) (NPAR TESTS command)
K-S Subcommand (Two-Sample) (NPAR TESTS command)
K-W Subcommand (NPAR TESTS command)
KENDALL Subcommand (NPAR TESTS command)
M-W Subcommand (NPAR TESTS command)
MCNEMAR Subcommand (NPAR TESTS command)
MH Subcommand (NPAR TESTS command)
MOSES Subcommand (NPAR TESTS command)
RUNS Subcommand (NPAR TESTS command)
SIGN Subcommand (NPAR TESTS command)
W-W Subcommand (NPAR TESTS command)
WILCOXON Subcommand (NPAR TESTS command)
STATISTICS Subcommand (NPAR TESTS command)
MISSING Subcommand (NPAR TESTS command)
SAMPLE Subcommand (NPAR TESTS command)
METHOD Subcommand (NPAR TESTS command)
References (NPAR TESTS command)


MH Subcommand (NPAR TESTS command)

marginal homogeneity test,marginal homogeneity test,marginal homogeneity test
NPAR TESTS command,NPAR TESTS command,NPAR TESTS command
NPAR TESTS (command),NPAR TESTS (command),NPAR TESTS (command)
MH subcommand,MH subcommand,MH subcommand
MH (subcommand),MH (subcommand),MH (subcommand)
NPAR TESTS command,NPAR TESTS command,NPAR TESTS command
NPAR TESTS /MH=varlist [WITH varlist [(PAIRED)]]

MH performs the marginal homogeneity test, which tests whether combinations of values between two paired ordinal variables are equally likely. The marginal homogeneity test is typically used in repeated measures situations. This test is an extension of the McNemar test from binary response to multinomial response. The output shows the number of distinct values for all test variables; the number of valid off-diagonal cell counts; mean; standard deviation; observed and standardized values of the test statistics; the asymptotic two-tailed probability for each pair of variables; and, if a /METHOD subcommand is specified, one-tailed and two-tailed exact or Monte Carlo probabilities.

This subcommand is available only if the Exact Tests option is installed (available only on Windows operating systems).

Syntax Collapse Hide details

Syntax

• The minimum specification is a list of two variables. Variables must be polychotomous and must have more than two values. If the variables contain only two values, the McNemar test is performed.

• If keyword WITH is not specified, each variable is paired with every other variable in the list.

• If WITH is specified, each variable before WITH is paired with each variable after WITH. If PAIRED is also specified, the first variable before WITH is paired with the first variable after WITH, the second variable before WITH is paired with the second variable after WITH, and so on. PAIRED cannot be specified without WITH.

• With PAIRED, the number of variables that are specified before and after WITH must be the same. PAIRED must be specified in parentheses after the second variable list.

Operations Collapse Hide details

Operations

• The data consist of paired, dependent responses from two populations. The marginal homogeneity test tests the equality of two multinomial c × 1 tables, and the data can be arranged in the form of a square c × c contingency table. A 2 × c table is constructed for each off-diagonal cell count. The marginal homogeneity test statistic is computed for cases with different values for the two variables. Only combinations for which the values for the two variables are different are considered. The first row of each 2 × c table specifies the category that was chosen by population 1, and the second row specifies the category that was chosen by population 2. The test statistic is calculated by summing the first row scores across all 2 x c tables.

Example Collapse Hide details

Example

NPAR TESTS /MH=V1 V2 V3
  /METHOD=MC.

• This example performs the marginal homogeneity test on variable pairs V1 and V2, V1 and V3, and V2 and V3. The exact p values are estimated by using the Monte Carlo sampling method.

Related Topics

NPAR TESTS
Overview (NPAR TESTS command)
BINOMIAL Subcommand (NPAR TESTS command)
CHISQUARE Subcommand (NPAR TESTS command)
COCHRAN Subcommand (NPAR TESTS command)
FRIEDMAN Subcommand (NPAR TESTS command)
J-T Subcommand (NPAR TESTS command)
K-S Subcommand (One-Sample) (NPAR TESTS command)
K-S Subcommand (Two-Sample) (NPAR TESTS command)
K-W Subcommand (NPAR TESTS command)
KENDALL Subcommand (NPAR TESTS command)
M-W Subcommand (NPAR TESTS command)
MCNEMAR Subcommand (NPAR TESTS command)
MEDIAN Subcommand (NPAR TESTS command)
MOSES Subcommand (NPAR TESTS command)
RUNS Subcommand (NPAR TESTS command)
SIGN Subcommand (NPAR TESTS command)
W-W Subcommand (NPAR TESTS command)
WILCOXON Subcommand (NPAR TESTS command)
STATISTICS Subcommand (NPAR TESTS command)
MISSING Subcommand (NPAR TESTS command)
SAMPLE Subcommand (NPAR TESTS command)
METHOD Subcommand (NPAR TESTS command)
References (NPAR TESTS command)


MOSES Subcommand (NPAR TESTS command)

NPAR TESTS (command),NPAR TESTS (command),NPAR TESTS (command)
MOSES subcommand,MOSES subcommand,MOSES subcommand
MOSES (subcommand),MOSES (subcommand),MOSES (subcommand)
NPAR TESTS command,NPAR TESTS command,NPAR TESTS command
NPAR TESTS MOSES[(n)]=varlist BY variable(value1,value2)

The MOSES test of extreme reactions tests whether the range of an ordinal variable is the same in a control group and a comparison group. The control and comparison groups are defined by a grouping variable. The output includes a Frequency table, showing, for each variable before BY, the total number of cases and the number of cases in each group. The output also includes a Test Statistics table, showing the number of removed outliers, span of the control group before and after outliers are removed, and one-tailed probability of the span with and without outliers.

Syntax Collapse Hide details

Syntax

• The minimum specification is a test variable, the keyword BY, a grouping variable, and two values in parentheses.

• The test variable must be at least at the ordinal level of measurement.

• The first value of the grouping variable defines the control group, and the second value defines the comparison group.

• By default, 5% of the cases are trimmed from each end of the range of the control group to remove outliers. You can override the default by specifying a value in parentheses following the MOSES subcommand keyword. This value represents an actual number of cases, not a percentage.

Operations Collapse Hide details

Operations

• Values from the groups are arranged in a single ascending sequence. The span of the control group is computed as the number of cases in the sequence containing the lowest and highest control values.

• No adjustments are made for tied cases.

• Cases with values other than values that are specified for the grouping variable are excluded.

• Test statistics are calculated for each variable that is named before BY.

Example Collapse Hide details

Example

NPAR TESTS MOSES=V1 BY V3(0,1) /MOSES=V1 BY V3(1,0).

• The first MOSES subcommand tests V1 by using value 0 of V3 to define the control group and value 1 for the comparison group. The second MOSES subcommand reverses the comparison and control groups.

Related Topics

NPAR TESTS
Overview (NPAR TESTS command)
BINOMIAL Subcommand (NPAR TESTS command)
CHISQUARE Subcommand (NPAR TESTS command)
COCHRAN Subcommand (NPAR TESTS command)
FRIEDMAN Subcommand (NPAR TESTS command)
J-T Subcommand (NPAR TESTS command)
K-S Subcommand (One-Sample) (NPAR TESTS command)
K-S Subcommand (Two-Sample) (NPAR TESTS command)
K-W Subcommand (NPAR TESTS command)
KENDALL Subcommand (NPAR TESTS command)
M-W Subcommand (NPAR TESTS command)
MCNEMAR Subcommand (NPAR TESTS command)
MEDIAN Subcommand (NPAR TESTS command)
MH Subcommand (NPAR TESTS command)
RUNS Subcommand (NPAR TESTS command)
SIGN Subcommand (NPAR TESTS command)
W-W Subcommand (NPAR TESTS command)
WILCOXON Subcommand (NPAR TESTS command)
STATISTICS Subcommand (NPAR TESTS command)
MISSING Subcommand (NPAR TESTS command)
SAMPLE Subcommand (NPAR TESTS command)
METHOD Subcommand (NPAR TESTS command)
References (NPAR TESTS command)


RUNS Subcommand (NPAR TESTS command)

NPAR TESTS (command),NPAR TESTS (command),NPAR TESTS (command)
RUNS subcommand,RUNS subcommand,RUNS subcommand
RUNS (subcommand),RUNS (subcommand),RUNS (subcommand)
NPAR TESTS command,NPAR TESTS command,NPAR TESTS command
NPAR TESTS RUNS({MEAN  })=varlist
                {MEDIAN}
                {MODE  }
                {value }

RUNS tests whether the sequence of values of a dichotomized variable is random. The output includes a Run Test table, showing the test value (cut point that is used to dichotomize the variable tested), number of runs, number of cases that are below the cut point, number of cases that are greater than or equal to the cut point, and test statistic Z with its two-tailed probability for each variable.

Syntax Collapse Hide details

Syntax

• The minimum specification is a cut point in parentheses followed by a test variable.

• The cut point can be specified by an exact value or one of the keywords MEAN, MEDIAN, or MODE.

Operations Collapse Hide details

Operations

• All tested variables are treated as dichotomous: cases with values that are less than the cut point form one category, and cases with values that are greater than or equal to the cut point form the other category.

• Test statistics are calculated for each specified variable.

Example Collapse Hide details

Example

NPAR TESTS RUNS(MEDIAN)=V2 /RUNS(24.5)=V2 /RUNS(1)=V3.

• This example performs three runs tests. The first test tests variable V2 by using the median as the cut point. The second test also tests V2 by using 24.5 as the cut point. The third test tests variable V3, with value 1 specified as the cut point.

Related Topics

NPAR TESTS
Overview (NPAR TESTS command)
BINOMIAL Subcommand (NPAR TESTS command)
CHISQUARE Subcommand (NPAR TESTS command)
COCHRAN Subcommand (NPAR TESTS command)
FRIEDMAN Subcommand (NPAR TESTS command)
J-T Subcommand (NPAR TESTS command)
K-S Subcommand (One-Sample) (NPAR TESTS command)
K-S Subcommand (Two-Sample) (NPAR TESTS command)
K-W Subcommand (NPAR TESTS command)
KENDALL Subcommand (NPAR TESTS command)
M-W Subcommand (NPAR TESTS command)
MCNEMAR Subcommand (NPAR TESTS command)
MEDIAN Subcommand (NPAR TESTS command)
MH Subcommand (NPAR TESTS command)
MOSES Subcommand (NPAR TESTS command)
SIGN Subcommand (NPAR TESTS command)
W-W Subcommand (NPAR TESTS command)
WILCOXON Subcommand (NPAR TESTS command)
STATISTICS Subcommand (NPAR TESTS command)
MISSING Subcommand (NPAR TESTS command)
SAMPLE Subcommand (NPAR TESTS command)
METHOD Subcommand (NPAR TESTS command)
References (NPAR TESTS command)


SIGN Subcommand (NPAR TESTS command)

NPAR TESTS (command),NPAR TESTS (command),NPAR TESTS (command)
SIGN subcommand,SIGN subcommand,SIGN subcommand
SIGN (subcommand),SIGN (subcommand),SIGN (subcommand)
NPAR TESTS command,NPAR TESTS command,NPAR TESTS command
NPAR TESTS SIGN=varlist [WITH varlist [(PAIRED)] ]

SIGN tests whether the distribution of two paired variables in a two-related-samples test is the same. The output includes a Frequency table, showing, for each pair, the number of positive differences, number of negative differences, number of ties, and the total number. The output also includes a Test Statistics table, showing the Z statistic and two-tailed probability.

Syntax Collapse Hide details

Syntax

• The minimum specification is a list of two variables.

• Variables should be at least at the ordinal level of measurement.

• If keyword WITH is not specified, each variable in the list is paired with every other variable in the list.

• If keyword WITH is specified, each variable before WITH is paired with each variable after WITH. If PAIRED is also specified, the first variable before WITH is paired with the first variable after WITH, the second variable before WITH is paired with the second variable after WITH, and so on. PAIRED cannot be specified without WITH.

• With PAIRED, the number of variables that are specified before and after WITH must be the same. PAIRED must be specified in parentheses after the second variable list.

Operations Collapse Hide details

Operations

• The positive and negative differences between the pair of variables are counted. Ties are ignored.

• The probability is taken from the binomial distribution if 25 or fewer differences are observed. Otherwise, the probability comes from the Z distribution.

• Under the null hypothesis for large sample sizes, Z is approximately normally distributed with a mean of 0 and a variance of 1.

Example Collapse Hide details

Example

NPAR TESTS SIGN=N1,M1 WITH N2,M2 (PAIRED).

• N1 is tested with N2, and M1 is tested with M2.

Related Topics

NPAR TESTS
Overview (NPAR TESTS command)
BINOMIAL Subcommand (NPAR TESTS command)
CHISQUARE Subcommand (NPAR TESTS command)
COCHRAN Subcommand (NPAR TESTS command)
FRIEDMAN Subcommand (NPAR TESTS command)
J-T Subcommand (NPAR TESTS command)
K-S Subcommand (One-Sample) (NPAR TESTS command)
K-S Subcommand (Two-Sample) (NPAR TESTS command)
K-W Subcommand (NPAR TESTS command)
KENDALL Subcommand (NPAR TESTS command)
M-W Subcommand (NPAR TESTS command)
MCNEMAR Subcommand (NPAR TESTS command)
MEDIAN Subcommand (NPAR TESTS command)
MH Subcommand (NPAR TESTS command)
MOSES Subcommand (NPAR TESTS command)
RUNS Subcommand (NPAR TESTS command)
W-W Subcommand (NPAR TESTS command)
WILCOXON Subcommand (NPAR TESTS command)
STATISTICS Subcommand (NPAR TESTS command)
MISSING Subcommand (NPAR TESTS command)
SAMPLE Subcommand (NPAR TESTS command)
METHOD Subcommand (NPAR TESTS command)
References (NPAR TESTS command)


W-W Subcommand (NPAR TESTS command)

NPAR TESTS (command),NPAR TESTS (command),NPAR TESTS (command)
W-W subcommand,W-W subcommand,W-W subcommand
W-W (subcommand),W-W (subcommand),W-W (subcommand)
NPAR TESTS command,NPAR TESTS command,NPAR TESTS command
Wald-Wolfowitz test,Wald-Wolfowitz test,Wald-Wolfowitz test
NPAR TESTS command,NPAR TESTS command,NPAR TESTS command
NPAR TESTS W-W=varlist BY variable(value1,value2)

W-W (alias WALD-WOLFOWITZ) tests whether the distribution of a variable is the same in two independent samples. A runs test is performed with group membership as the criterion. The output includes a Frequency table, showing the total number of valid cases for each variable that is specified before BY and the number of valid cases in each group. The output also includes a Test Statistics table, showing the number of runs, Z, and one-tailed probability of Z. If ties are present, the minimum and maximum number of possible runs, their Z statistics, and one-tailed probabilities are displayed.

Syntax Collapse Hide details

Syntax

• The minimum specification is a single test variable, the keyword BY, a grouping variable, and two values in parentheses.

• Cases with the first value form one group, and cases with the second value form the other group. The order in which values are specified is unimportant.

Operations Collapse Hide details

Operations

• Cases are combined from both groups and ranked from lowest to highest, and a runs test is performed, using group membership as the criterion. For ties involving cases from both groups, both the minimum and maximum number of possible runs are calculated. Test statistics are calculated for each variable that is specified before BY.

• For a sample size of 30 or less, the exact one-tailed probability is calculated. For a sample size that is greater than 30, the normal approximation is used.

• Cases with values other than values that are specified for the grouping variable are excluded.

Example Collapse Hide details

Example

NPAR TESTS W-W=V1 BY V3(0,1).

• This example ranks cases from lowest to highest based on their values for V1, and a runs test is performed. Cases with value 0 for V3 form one group, and cases with value 1 form the other group.

Related Topics

NPAR TESTS
Overview (NPAR TESTS command)
BINOMIAL Subcommand (NPAR TESTS command)
CHISQUARE Subcommand (NPAR TESTS command)
COCHRAN Subcommand (NPAR TESTS command)
FRIEDMAN Subcommand (NPAR TESTS command)
J-T Subcommand (NPAR TESTS command)
K-S Subcommand (One-Sample) (NPAR TESTS command)
K-S Subcommand (Two-Sample) (NPAR TESTS command)
K-W Subcommand (NPAR TESTS command)
KENDALL Subcommand (NPAR TESTS command)
M-W Subcommand (NPAR TESTS command)
MCNEMAR Subcommand (NPAR TESTS command)
MEDIAN Subcommand (NPAR TESTS command)
MH Subcommand (NPAR TESTS command)
MOSES Subcommand (NPAR TESTS command)
RUNS Subcommand (NPAR TESTS command)
SIGN Subcommand (NPAR TESTS command)
WILCOXON Subcommand (NPAR TESTS command)
STATISTICS Subcommand (NPAR TESTS command)
MISSING Subcommand (NPAR TESTS command)
SAMPLE Subcommand (NPAR TESTS command)
METHOD Subcommand (NPAR TESTS command)
References (NPAR TESTS command)


WILCOXON Subcommand (NPAR TESTS command)

WILCOXON (subcommand),WILCOXON (subcommand),WILCOXON (subcommand)
NPAR TESTS command,NPAR TESTS command,NPAR TESTS command
NPAR TESTS (command),NPAR TESTS (command),NPAR TESTS (command)
WILCOXON subcommand,WILCOXON subcommand,WILCOXON subcommand
NPAR TESTS WILCOXON=varlist [WITH varlist [(PAIRED)] ]

WILCOXON tests whether the distribution of two paired variables in two related samples is the same. This test takes into account the magnitude of the differences between two paired variables. The output includes a Ranks table, showing, for each pair, the number of valid cases, positive and negative differences, their respective mean and sum of ranks, and the number of ties. The output also includes a Test Statistics table, showing Z and probability of Z.

Syntax Collapse Hide details

Syntax

• The minimum specification is a list of two variables.

• If keyword WITH is not specified, each variable is paired with every other variable in the list.

• If keyword WITH is specified, each variable before WITH is paired with each variable after WITH. If PAIRED is also specified, the first variable before WITH is paired with the first variable after WITH, the second variable before WITH is paired with the second variable after WITH, and so on. PAIRED cannot be specified without WITH.

• With PAIRED, the number of variables that are specified before and after WITH must be the same. PAIRED must be specified in parentheses after the second variable list.

Operations Collapse Hide details

Operations

• The differences between the pair of variables are counted, the absolute differences are ranked, the positive and negative ranks are summed, and the test statistic Z is computed from the positive and negative rank sums.

• Under the null hypothesis for large sample sizes, Z is approximately normally distributed with a mean of 0 and a variance of 1.

Example Collapse Hide details

Example

NPAR TESTS WILCOXON=A B WITH C D (PAIRED).

• This example pairs A with C and B with D. If PAIRED were not specified, the example would also pair A with D and B with C.

Related Topics

NPAR TESTS
Overview (NPAR TESTS command)
BINOMIAL Subcommand (NPAR TESTS command)
CHISQUARE Subcommand (NPAR TESTS command)
COCHRAN Subcommand (NPAR TESTS command)
FRIEDMAN Subcommand (NPAR TESTS command)
J-T Subcommand (NPAR TESTS command)
K-S Subcommand (One-Sample) (NPAR TESTS command)
K-S Subcommand (Two-Sample) (NPAR TESTS command)
K-W Subcommand (NPAR TESTS command)
KENDALL Subcommand (NPAR TESTS command)
M-W Subcommand (NPAR TESTS command)
MCNEMAR Subcommand (NPAR TESTS command)
MEDIAN Subcommand (NPAR TESTS command)
MH Subcommand (NPAR TESTS command)
MOSES Subcommand (NPAR TESTS command)
RUNS Subcommand (NPAR TESTS command)
SIGN Subcommand (NPAR TESTS command)
W-W Subcommand (NPAR TESTS command)
STATISTICS Subcommand (NPAR TESTS command)
MISSING Subcommand (NPAR TESTS command)
SAMPLE Subcommand (NPAR TESTS command)
METHOD Subcommand (NPAR TESTS command)
References (NPAR TESTS command)


STATISTICS Subcommand (NPAR TESTS command)

NPAR TESTS (command),NPAR TESTS (command),NPAR TESTS (command)
STATISTICS subcommand,STATISTICS subcommand,STATISTICS subcommand
STATISTICS (subcommand),STATISTICS (subcommand),STATISTICS (subcommand)
NPAR TESTS command,NPAR TESTS command,NPAR TESTS command

STATISTICS requests summary statistics for variables that are named on the NPAR TESTS command. Summary statistics are displayed in the Descriptive Statistics table before all test output.

• If STATISTICS is specified without keywords, univariate statistics (keyword DESCRIPTIVES) are displayed.

DESCRIPTIVES (keyword),DESCRIPTIVES (keyword),DESCRIPTIVES (keyword)
NPAR TESTS command,NPAR TESTS command,NPAR TESTS command
QUARTILES (keyword),QUARTILES (keyword),QUARTILES (keyword)
NPAR TESTS command,NPAR TESTS command,NPAR TESTS command
ALL (keyword),ALL (keyword),ALL (keyword)
NPAR TESTS command,NPAR TESTS command,NPAR TESTS command
DESCRIPTIVES | Univariate statistics. The displayed statistics include the mean, maximum, minimum, standard deviation, and number of valid cases for each variable named on the command.
QUARTILES | Quartiles and number of cases. The 25th, 50th, and 75th percentiles are displayed for each variable that is named on the command.
ALL | All statistics available on NPAR TESTS.

Related Topics

NPAR TESTS
Overview (NPAR TESTS command)
BINOMIAL Subcommand (NPAR TESTS command)
CHISQUARE Subcommand (NPAR TESTS command)
COCHRAN Subcommand (NPAR TESTS command)
FRIEDMAN Subcommand (NPAR TESTS command)
J-T Subcommand (NPAR TESTS command)
K-S Subcommand (One-Sample) (NPAR TESTS command)
K-S Subcommand (Two-Sample) (NPAR TESTS command)
K-W Subcommand (NPAR TESTS command)
KENDALL Subcommand (NPAR TESTS command)
M-W Subcommand (NPAR TESTS command)
MCNEMAR Subcommand (NPAR TESTS command)
MEDIAN Subcommand (NPAR TESTS command)
MH Subcommand (NPAR TESTS command)
MOSES Subcommand (NPAR TESTS command)
RUNS Subcommand (NPAR TESTS command)
SIGN Subcommand (NPAR TESTS command)
W-W Subcommand (NPAR TESTS command)
WILCOXON Subcommand (NPAR TESTS command)
MISSING Subcommand (NPAR TESTS command)
SAMPLE Subcommand (NPAR TESTS command)
METHOD Subcommand (NPAR TESTS command)
References (NPAR TESTS command)


MISSING Subcommand (NPAR TESTS command)

NPAR TESTS (command),NPAR TESTS (command),NPAR TESTS (command)
MISSING subcommand,MISSING subcommand,MISSING subcommand
MISSING (subcommand),MISSING (subcommand),MISSING (subcommand)
NPAR TESTS command,NPAR TESTS command,NPAR TESTS command

MISSING controls the treatment of cases with missing values.

• ANALYSIS and LISTWISE are alternatives. However, each of those commands can be specified with INCLUDE.

ANALYSIS (keyword),ANALYSIS (keyword),ANALYSIS (keyword)
NPAR TESTS command,NPAR TESTS command,NPAR TESTS command
LISTWISE (keyword),LISTWISE (keyword),LISTWISE (keyword)
NPAR TESTS command,NPAR TESTS command,NPAR TESTS command
INCLUDE (keyword),INCLUDE (keyword),INCLUDE (keyword)
NPAR TESTS command,NPAR TESTS command,NPAR TESTS command
ANALYSIS | Exclude cases with missing values on a test-by-test basis. Cases with missing values for a variable that is used for a specific test are omitted from that test. On subcommands that specify several tests, each test is evaluated separately. This setting is the default.
LISTWISE | Exclude cases with missing values listwise. Cases with missing values for any variable that is named on any subcommand are excluded from all analyses.
INCLUDE | Include user-missing values. User-missing values are treated as valid values.

Related Topics

NPAR TESTS
Overview (NPAR TESTS command)
BINOMIAL Subcommand (NPAR TESTS command)
CHISQUARE Subcommand (NPAR TESTS command)
COCHRAN Subcommand (NPAR TESTS command)
FRIEDMAN Subcommand (NPAR TESTS command)
J-T Subcommand (NPAR TESTS command)
K-S Subcommand (One-Sample) (NPAR TESTS command)
K-S Subcommand (Two-Sample) (NPAR TESTS command)
K-W Subcommand (NPAR TESTS command)
KENDALL Subcommand (NPAR TESTS command)
M-W Subcommand (NPAR TESTS command)
MCNEMAR Subcommand (NPAR TESTS command)
MEDIAN Subcommand (NPAR TESTS command)
MH Subcommand (NPAR TESTS command)
MOSES Subcommand (NPAR TESTS command)
RUNS Subcommand (NPAR TESTS command)
SIGN Subcommand (NPAR TESTS command)
W-W Subcommand (NPAR TESTS command)
WILCOXON Subcommand (NPAR TESTS command)
STATISTICS Subcommand (NPAR TESTS command)
SAMPLE Subcommand (NPAR TESTS command)
METHOD Subcommand (NPAR TESTS command)
References (NPAR TESTS command)


SAMPLE Subcommand (NPAR TESTS command)

NPAR TESTS (command),NPAR TESTS (command),NPAR TESTS (command)
SAMPLE subcommand,SAMPLE subcommand,SAMPLE subcommand
SAMPLE (subcommand),SAMPLE (subcommand),SAMPLE (subcommand)
NPAR TESTS command,NPAR TESTS command,NPAR TESTS command
NPAR TESTS (command),NPAR TESTS (command),NPAR TESTS (command)
random sampling,random sampling,random sampling
random sample,random sample,random sample
in nonparametric tests,in nonparametric tests,in nonparametric tests

NPAR TESTS must store cases in memory. SAMPLE allows you to select a random sample of cases when there is not enough space on your computer to store all cases. SAMPLE has no additional specifications.

• Because sampling would invalidate a runs test, this option is ignored when the RUNS subcommand is used.

Related Topics

NPAR TESTS
Overview (NPAR TESTS command)
BINOMIAL Subcommand (NPAR TESTS command)
CHISQUARE Subcommand (NPAR TESTS command)
COCHRAN Subcommand (NPAR TESTS command)
FRIEDMAN Subcommand (NPAR TESTS command)
J-T Subcommand (NPAR TESTS command)
K-S Subcommand (One-Sample) (NPAR TESTS command)
K-S Subcommand (Two-Sample) (NPAR TESTS command)
K-W Subcommand (NPAR TESTS command)
KENDALL Subcommand (NPAR TESTS command)
M-W Subcommand (NPAR TESTS command)
MCNEMAR Subcommand (NPAR TESTS command)
MEDIAN Subcommand (NPAR TESTS command)
MH Subcommand (NPAR TESTS command)
MOSES Subcommand (NPAR TESTS command)
RUNS Subcommand (NPAR TESTS command)
SIGN Subcommand (NPAR TESTS command)
W-W Subcommand (NPAR TESTS command)
WILCOXON Subcommand (NPAR TESTS command)
STATISTICS Subcommand (NPAR TESTS command)
MISSING Subcommand (NPAR TESTS command)
METHOD Subcommand (NPAR TESTS command)
References (NPAR TESTS command)


METHOD Subcommand (NPAR TESTS command)

NPAR TESTS (command),NPAR TESTS (command),NPAR TESTS (command)
METHOD subcommand,METHOD subcommand,METHOD subcommand
METHOD (subcommand),METHOD (subcommand),METHOD (subcommand)
NPAR TESTS command,NPAR TESTS command,NPAR TESTS command

METHOD displays additional results for each requested statistic. If no METHOD subcommand is specified, the standard asymptotic results are displayed. If fractional weights have been specified, results for all methods will be calculated on the weight rounded to the nearest integer. This subcommand is available only if you have the Exact Tests add-on option installed, which is only available on Windows operating systems.

MC (keyword),MC (keyword),MC (keyword)
NPAR TESTS command,NPAR TESTS command,NPAR TESTS command
CIN (keyword),CIN (keyword),CIN (keyword)
NPAR TESTS command,NPAR TESTS command,NPAR TESTS command
SAMPLES (keyword),SAMPLES (keyword),SAMPLES (keyword)
NPAR TESTS command,NPAR TESTS command,NPAR TESTS command
EXACT (keyword),EXACT (keyword),EXACT (keyword)
NPAR TESTS command,NPAR TESTS command,NPAR TESTS command
TIMER (keyword),TIMER (keyword),TIMER (keyword)
NPAR TESTS command,NPAR TESTS command,NPAR TESTS command
MC | Displays an unbiased point estimate and confidence interval, based on the Monte Carlo sampling method, for all statistics. Asymptotic results are also displayed. When exact results can be calculated, they will be provided instead of the Monte Carlo results. See Exact Tests for situations under which exact results are provided instead of Monte Carlo results.
CIN(n) | Controls the confidence level for the Monte Carlo estimate. CIN is available only when /METHOD=MC is specified. CIN has a default value of 99.0. You can specify a confidence interval between 0.01 and 99.9, inclusive.
SAMPLES | Specifies the number of tables that were sampled from the reference set when calculating the Monte Carlo estimate of the exact p value. Larger sample sizes lead to narrower confidence limits but also take longer to calculate. You can specify any integer between 1 and 1,000,000,000 as the sample size. SAMPLES has a default value of 10,000.
EXACT | Computes the exact significance level for all statistics, in addition to the asymptotic results. If both the EXACT and MC keywords are specified, only exact results are provided. Calculating the exact p value can be memory-intensive. If you have specified /METHOD=EXACT and find that you have insufficient memory to calculate results, close any other applications that are currently running. You can also enlarge the size of your swap file (see your Windows manual for more information). If you still cannot obtain exact results, specify /METHOD=MC to obtain the Monte Carlo estimate of the exact p value. An optional TIMER keyword is available if you choose /METHOD=EXACT.
TIMER(n) | Specifies the maximum number of minutes during which the exact analysis for each statistic can run. If the time limit is reached, the test is terminated, no exact results are provided, and the program begins to calculate the next test in the analysis. TIMER is available only when /METHOD=EXACT is specified. You can specify any integer value for TIMER. Specifying a value of 0 for TIMER turns the timer off completely. TIMER has a default value of 5 minutes. If a test exceeds a time limit of 30 minutes, it is recommended that you use the Monte Carlo method, rather than the exact method.

Related Topics

NPAR TESTS
Overview (NPAR TESTS command)
BINOMIAL Subcommand (NPAR TESTS command)
CHISQUARE Subcommand (NPAR TESTS command)
COCHRAN Subcommand (NPAR TESTS command)
FRIEDMAN Subcommand (NPAR TESTS command)
J-T Subcommand (NPAR TESTS command)
K-S Subcommand (One-Sample) (NPAR TESTS command)
K-S Subcommand (Two-Sample) (NPAR TESTS command)
K-W Subcommand (NPAR TESTS command)
KENDALL Subcommand (NPAR TESTS command)
M-W Subcommand (NPAR TESTS command)
MCNEMAR Subcommand (NPAR TESTS command)
MEDIAN Subcommand (NPAR TESTS command)
MH Subcommand (NPAR TESTS command)
MOSES Subcommand (NPAR TESTS command)
RUNS Subcommand (NPAR TESTS command)
SIGN Subcommand (NPAR TESTS command)
W-W Subcommand (NPAR TESTS command)
WILCOXON Subcommand (NPAR TESTS command)
STATISTICS Subcommand (NPAR TESTS command)
MISSING Subcommand (NPAR TESTS command)
SAMPLE Subcommand (NPAR TESTS command)
References (NPAR TESTS command)


References (NPAR TESTS command)

Siegel, S., and N. J. Castellan. 1988. Nonparametric statistics for the behavioral sciences. New York: McGraw-Hill, Inc..

Related Topics

NPAR TESTS
Overview (NPAR TESTS command)
BINOMIAL Subcommand (NPAR TESTS command)
CHISQUARE Subcommand (NPAR TESTS command)
COCHRAN Subcommand (NPAR TESTS command)
FRIEDMAN Subcommand (NPAR TESTS command)
J-T Subcommand (NPAR TESTS command)
K-S Subcommand (One-Sample) (NPAR TESTS command)
K-S Subcommand (Two-Sample) (NPAR TESTS command)
K-W Subcommand (NPAR TESTS command)
KENDALL Subcommand (NPAR TESTS command)
M-W Subcommand (NPAR TESTS command)
MCNEMAR Subcommand (NPAR TESTS command)
MEDIAN Subcommand (NPAR TESTS command)
MH Subcommand (NPAR TESTS command)
MOSES Subcommand (NPAR TESTS command)
RUNS Subcommand (NPAR TESTS command)
SIGN Subcommand (NPAR TESTS command)
W-W Subcommand (NPAR TESTS command)
WILCOXON Subcommand (NPAR TESTS command)
STATISTICS Subcommand (NPAR TESTS command)
MISSING Subcommand (NPAR TESTS command)
SAMPLE Subcommand (NPAR TESTS command)
METHOD Subcommand (NPAR TESTS command)


NUMERIC

initializing variables,initializing variables,initializing variables
initializing variables,initializing variables,initializing variables
numeric variables,numeric variables,numeric variables
variables,variables,variables
defining,defining,defining
NUMERIC (command),NUMERIC (command),NUMERIC (command)
NUMERIC (command),NUMERIC (command),NUMERIC (command)
syntax chart,syntax chart,syntax chart
NUMERIC varlist[(format)] [/varlist...]

This command takes effect immediately. It does not read the active dataset or execute pending transformations. See the topic Command Order for more information.

Example

NUMERIC V1.

Related Topics

Overview (NUMERIC command)
Examples (NUMERIC command)


Overview (NUMERIC command)

initializing variables,initializing variables,initializing variables
formats,formats,formats
NUMERIC (command),NUMERIC (command),NUMERIC (command)
formats,formats,formats
INPUT PROGRAM (command),INPUT PROGRAM (command),INPUT PROGRAM (command)
with NUMERIC command,with NUMERIC command,with NUMERIC command
NUMERIC (command),NUMERIC (command),NUMERIC (command)
with INPUT PROGRAM command,with INPUT PROGRAM command,with INPUT PROGRAM command
SET (command),SET (command),SET (command)
with NUMERIC command,with NUMERIC command,with NUMERIC command
NUMERIC (command),NUMERIC (command),NUMERIC (command)
with SET command,with SET command,with SET command
initializing variables,initializing variables,initializing variables
scratch variables,scratch variables,scratch variables

NUMERIC declares new numeric variables that can be referred to in the transformation language before they are assigned values. Commands such as COMPUTE, IF, RECODE, and COUNT can be used to assign values to the new numeric variables.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is the name of the new variables. By default, variables are assigned a format of F8.2 (or the format that is specified on the SET command).

Syntax Rules Collapse Hide details

Syntax Rules

• A FORTRAN-like format can be specified in parentheses following a variable or variable list. Each specified format applies to all variables in the list. To specify different formats for different groups of variables, separate each format group with a slash.

• Keyword TO can be used to declare multiple numeric variables. The specified format applies to each variable that is named and implied by the TO construction.

• NUMERIC can be used within an input program to predetermine the order of numeric variables in the dictionary of the active dataset. When used for this purpose, NUMERIC must precede DATA LIST in the input program.

Operations Collapse Hide details

Operations

• NUMERIC takes effect as soon as it is encountered in the command sequence. Special attention should be paid to the position of NUMERIC among commands. See the topic Command Order for more information.

• The specified formats (or the defaults) are used as both print and write formats.

• Permanent or temporary variables are initialized to the system-missing value. Scratch variables are initialized to 0.

• Variables that are named on NUMERIC are added to the working file in the order in which they are specified. The order in which they are used in transformations does not affect their order in the active dataset.

Related Topics

NUMERIC
Examples (NUMERIC command)


Examples (NUMERIC command)

NUMERIC (command),NUMERIC (command),NUMERIC (command)
with INPUT PROGRAM command,with INPUT PROGRAM command,with INPUT PROGRAM command
input programs,input programs,input programs
examples,examples,examples
initializing variables,initializing variables,initializing variables
formats,formats,formats
DATA LIST (command),DATA LIST (command),DATA LIST (command)
with NUMERIC command,with NUMERIC command,with NUMERIC command
NUMERIC (command),NUMERIC (command),NUMERIC (command)
with DATA LIST command,with DATA LIST command,with DATA LIST command
NUMERIC (command),NUMERIC (command),NUMERIC (command)
formats,formats,formats

Declaring Multiple Numeric Variables

NUMERIC V1 V2 (F4.0) / V3 (F1.0).

• NUMERIC declares variables V1 and V2 with format F4.0 and declares variable V3 with format F1.0.

NUMERIC V1 TO V6 (F3.1) / V7 V10 (F6.2).

• NUMERIC declares variables V1, V2, V3, V4, V5, and V6 with format F3.1 and declares variables V7 and V10 with format F6.2.

Specifying Variable Order in the Active Dataset

NUMERIC SCALE85 IMPACT85 SCALE86 IMPACT86 SCALE87 IMPACT87
        SCALE88 IMPACT88.

• Variables SCALE85 to IMPACT88 are added to the active dataset in the order that is specified on NUMERIC. The order in which they are used in transformations does not affect their order in the active dataset.

INPUT PROGRAM.
STRING CITY (A24).
NUMERIC POP81 TO POP83 (F9)/ REV81 TO REV83(F10).
DATA LIST FILE=POPDATA RECORDS=3
  /1 POP81 22-30 REV81 31-40
  /2 POP82 22-30 REV82 31-40
  /3 POP83 22-30 REV83 31-40
  /4 CITY 1-24(A).
END INPUT PROGRAM.

• STRING and NUMERIC are specified within an input program to predetermine variable order in the active dataset. Though data in the file are in a different order, the working file dictionary uses the order that is specified on STRING and NUMERIC. Thus, CITY is the first variable in the dictionary, followed by POP81, POP82, POP83, REV81, REV82, and REV83.

• Formats are specified for the variables on NUMERIC. Otherwise, the program uses the default numeric format (F8.2) from the NUMERIC command for the dictionary format, even though it uses the format on DATA LIST to read the data. In other words, the dictionary uses the first formats specified, even though DATA LIST may use different formats to read cases.

Related Topics

NUMERIC
Overview (NUMERIC command)


OLAP CUBES

OLAP CUBES (command),OLAP CUBES (command),OLAP CUBES (command)
OLAP CUBES (command),OLAP CUBES (command),OLAP CUBES (command)
syntax chart,syntax chart,syntax chart

OLAP CUBES is available in the Statistics Base option.

OLAP CUBES {varlist} BY varlist [BY...]

 [/CELLS= [MEAN**] [COUNT**] [STDDEV**]
          [NPCT**] [SPCT**] [SUM** ]
          [MEDIAN] [GMEDIAN] [SEMEAN] [MIN] [MAX] [RANGE]
          [VARIANCE] [KURT] [SEKURT] [SKEW] [SESKEW] [FIRST]
          [LAST] [NPCT(var)][SPCT(var)] [HARMONIC] [GEOMETRIC]
          [DEFAULT] [ALL] [NONE] ]

 [/CREATE [{'catname'}...] =  {GAC    } (gvarname {(gvarvalue gvarvalue)   }
           {DEFAULT  }        {GPC    }          [{(gvarvalue gvarvalue)...}])]
                              {GAC GPC}

                              --or--

                              {VAC    } {(svarname svarname)}
                              {VPC    } {(svarname svarname)...}
                              {VAC VPC}

 [/TITLE =’string’][FOOTNOTE= ’string’]

**Default if the subcommand is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

Syntax for the OLAP CUBES command can be generated from the OLAP Cubes dialog.

Example

OLAP CUBES sales BY quarter by region.

Related Topics

Overview (OLAP CUBES command)
Examples (OLAP CUBES command)
Options (OLAP CUBES command)
TITLE and FOOTNOTE Subcommands (OLAP CUBES command)
CELLS Subcommand (OLAP CUBES command)
CREATE Subcommand (OLAP CUBES command)


Overview (OLAP CUBES command)

OLAP CUBES produces summary statistics for continuous, quantitative variables within categories defined by one or more categorical grouping variables.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is the command name, OLAP CUBES, with a summary variable, the keyword BY, and one or more grouping variables.

• The minimum specification is a summary variable, the keyword BY, and a grouping variable.

• By default, OLAP CUBES displays a Case Processing Summary table showing the number and percentage of cases included, excluded, and their total, and a Layered Report showing means, standard deviations, sums, number of cases for each category, percentage of total N, and percentage of total sum.

Syntax Rules Collapse Hide details

Syntax Rules

• Both numeric and string variables can be specified. String variables can be short or long. Summary variables must be numeric.

• String specifications for TITLE and FOOTNOTE cannot exceed 255 characters. Values must be enclosed in quotes. When the specification breaks on multiple lines, enclose each line in quotes and separate the specifications for each line by at least one blank. To specify line breaks in titles and footnotes, use the \n specification.

• Each subcommand can be specified only once. Multiple use results in a warning, and the last specification is used.

• When a variable is specified more than once, only the first occurrence is honored. The same variables specified after different BY keywords will result in an error.

Limitations Collapse Hide details

Limitations

• Up to 10 BY keywords can be specified.

Operations Collapse Hide details

Operations

• The data are processed sequentially. It is not necessary to sort the cases before processing. If a BY keyword is used, the output is always sorted.

• A Case Processing Summary table is always generated, showing the number and percentage of the cases included, excluded, and the total.

• For each combination of grouping variables specified after different BY keywords, OLAP CUBES produces a group in the report.

Related Topics

OLAP CUBES
Examples (OLAP CUBES command)
Options (OLAP CUBES command)
TITLE and FOOTNOTE Subcommands (OLAP CUBES command)
CELLS Subcommand (OLAP CUBES command)
CREATE Subcommand (OLAP CUBES command)


Examples (OLAP CUBES command)

OLAP CUBES
  tenure age income services monthly BY churn BY region
  /CELLS=COUNT MEAN STDDEV MEDIAN
  /TITLE='Descriptive Statistics' /FOOTNOTE 'By Customer Churn and Geographic Region'.

• The procedure produces summaries of tenure, age, income, services, and monthly, grouped by values of churn and region.

• CELLS requests cell counts, means, standard deviations, and medians.

• TITLE produces the requested title for the OLAP cube and FOOTNOTE produces the specified table footnote.

For discussion of output from this syntax and to place the example in context, see Analyzing Churn Using OLAP Cubes.

Related Topics

OLAP CUBES
Overview (OLAP CUBES command)
Options (OLAP CUBES command)
TITLE and FOOTNOTE Subcommands (OLAP CUBES command)
CELLS Subcommand (OLAP CUBES command)
CREATE Subcommand (OLAP CUBES command)


Options (OLAP CUBES command)

Cell Contents. By default, OLAP CUBES displays means, standard deviations, cell counts, sums, percentage of total N, and percentage of total sum. Optionally, you can request any combination of available statistics.

Group Differences. You can display arithmetic and/or percentage differences between categories of a grouping variable or between different variables with the CREATE subcommand.

Format. You can specify a title and a caption for the report using the TITLE and FOOTNOTE subcommands.

Related Topics

OLAP CUBES
Overview (OLAP CUBES command)
Examples (OLAP CUBES command)
TITLE and FOOTNOTE Subcommands (OLAP CUBES command)
CELLS Subcommand (OLAP CUBES command)
CREATE Subcommand (OLAP CUBES command)


TITLE and FOOTNOTE Subcommands (OLAP CUBES command)

OLAP CUBES (command),OLAP CUBES (command),OLAP CUBES (command)
TITLE subcommand,TITLE subcommand,TITLE subcommand
OLAP CUBES (command),OLAP CUBES (command),OLAP CUBES (command)
FOOTNOTE subcommand,FOOTNOTE subcommand,FOOTNOTE subcommand
FOOTNOTE (subcommand),FOOTNOTE (subcommand),FOOTNOTE (subcommand)
OLAP CUBES command,OLAP CUBES command,OLAP CUBES command
TITLE (subcommand),TITLE (subcommand),TITLE (subcommand)
OLAP CUBES command,OLAP CUBES command,OLAP CUBES command

TITLE and FOOTNOTE provide a title and a caption for the Layered Report.

• TITLE and FOOTNOTE are optional and can be placed anywhere.

• The specification on TITLE or FOOTNOTE is a string within quotes. To specify a multiple-line title or footnote, enclose each line in quotes and separate the specifications for each line by at least one blank.

• To insert line breaks in the displayed title or footnote, use the \n specification.

• The string you specify cannot exceed 255 characters.

Related Topics

OLAP CUBES
Overview (OLAP CUBES command)
Examples (OLAP CUBES command)
Options (OLAP CUBES command)
CELLS Subcommand (OLAP CUBES command)
CREATE Subcommand (OLAP CUBES command)


CELLS Subcommand (OLAP CUBES command)

OLAP CUBES (command),OLAP CUBES (command),OLAP CUBES (command)
CELLS subcommand,CELLS subcommand,CELLS subcommand
CELLS (subcommand),CELLS (subcommand),CELLS (subcommand)
OLAP CUBES command,OLAP CUBES command,OLAP CUBES command

By default, OLAP CUBES displays the means, standard deviations, number of cases, sum, percentage of total cases, and percentage of total sum.

• If CELLS is specified without keywords, OLAP CUBES displays the default statistics.

• If any keywords are specified on CELLS, only the requested information is displayed.

standard deviation,standard deviation,standard deviation
OLAP CUBES command,OLAP CUBES command,OLAP CUBES command
MEAN (keyword),MEAN (keyword),MEAN (keyword)
OLAP CUBES command,OLAP CUBES command,OLAP CUBES command
STDDEV (keyword),STDDEV (keyword),STDDEV (keyword)
OLAP CUBES command,OLAP CUBES command,OLAP CUBES command
COUNT (keyword),COUNT (keyword),COUNT (keyword)
OLAP CUBES command,OLAP CUBES command,OLAP CUBES command
MEDIAN (keyword),MEDIAN (keyword),MEDIAN (keyword)
OLAP CUBES command,OLAP CUBES command,OLAP CUBES command
GMEDIAN (keyword),GMEDIAN (keyword),GMEDIAN (keyword)
OLAP CUBES command,OLAP CUBES command,OLAP CUBES command
SEMEAN (keyword),SEMEAN (keyword),SEMEAN (keyword)
OLAP CUBES command,OLAP CUBES command,OLAP CUBES command
SUM (keyword),SUM (keyword),SUM (keyword)
OLAP CUBES command,OLAP CUBES command,OLAP CUBES command
MIN (keyword),MIN (keyword),MIN (keyword)
OLAP CUBES command,OLAP CUBES command,OLAP CUBES command
variance,variance,variance
OLAP CUBES command,OLAP CUBES command,OLAP CUBES command
SPCT (keyword),SPCT (keyword),SPCT (keyword)
OLAP CUBES command,OLAP CUBES command,OLAP CUBES command
NPCT (keyword),NPCT (keyword),NPCT (keyword)
OLAP CUBES command,OLAP CUBES command,OLAP CUBES command
SPCT (keyword),SPCT (keyword),SPCT (keyword)
OLAP CUBES command,OLAP CUBES command,OLAP CUBES command
NPCT (keyword),NPCT (keyword),NPCT (keyword)
OLAP CUBES command,OLAP CUBES command,OLAP CUBES command
HARMONIC (keyword),HARMONIC (keyword),HARMONIC (keyword)
OLAP CUBES command,OLAP CUBES command,OLAP CUBES command
GEOMETRIC (keyword),GEOMETRIC (keyword),GEOMETRIC (keyword)
OLAP CUBES command,OLAP CUBES command,OLAP CUBES command
DEFAULT | Means, standard deviations, cell counts, sum, percentage of total N, and percentage of total sum. This is the default if CELLS is omitted.
MEAN | Cell means.
STDDEV | Cell standard deviations.
COUNT | Cell counts.
MEDIAN | Cell median.
GMEDIAN | Grouped median.
SEMEAN | Standard error of cell mean.
SUM | Cell sums.
MIN | Cell minimum.
MAX | Cell maximum.
RANGE | Cell range.
VARIANCE | Variances.
KURT | Cell kurtosis.
SEKURT | Standard error of cell kurtosis.
SKEW | Cell skewness.
SESKEW | Standard error of cell skewness.
FIRST | First value.
LAST | Last value.
SPCT | Percentage of total sum.
NPCT | Percentage of total number of cases.
SPCT(var) | Percentage of total sum within specified variable. The specified variable must be one of the grouping variables.
NPCT(var) | Percentage of total number of cases within specified variable. The specified variable must be one of the grouping variables.
HARMONIC | Harmonic mean.
GEOMETRIC | Geometric mean.
ALL | All cell information.

Related Topics

OLAP CUBES
Overview (OLAP CUBES command)
Examples (OLAP CUBES command)
Options (OLAP CUBES command)
TITLE and FOOTNOTE Subcommands (OLAP CUBES command)
CREATE Subcommand (OLAP CUBES command)


CREATE Subcommand (OLAP CUBES command)

difference,difference,difference
arithmetic and percentage differences between groups and variables,arithmetic and percentage differences between groups and variables,arithmetic and percentage differences between groups and variables
change,change,change
arithmetic and percentage change between groups and variables,arithmetic and percentage change between groups and variables,arithmetic and percentage change between groups and variables
percentage change,percentage change,percentage change
between groups and variables,between groups and variables,between groups and variables
CREATE (subcommand),CREATE (subcommand),CREATE (subcommand)
OLAP CUBES command,OLAP CUBES command,OLAP CUBES command
OLAP CUBES (command),OLAP CUBES (command),OLAP CUBES (command)
CREATE subcommand,CREATE subcommand,CREATE subcommand

CREATE allows you to calculate and display arithmetic and percentage differences between groups or between variables. You can also define labels for these difference categories.

GAC (keyword),GAC (keyword),GAC (keyword)
OLAP CUBES command,OLAP CUBES command,OLAP CUBES command
GPC (keyword),GPC (keyword),GPC (keyword)
OLAP CUBES command,OLAP CUBES command,OLAP CUBES command
VAC (keyword),VAC (keyword),VAC (keyword)
OLAP CUBES command,OLAP CUBES command,OLAP CUBES command
VPC (keyword),VPC (keyword),VPC (keyword)
OLAP CUBES command,OLAP CUBES command,OLAP CUBES command
GAC (gvar(cat1 cat2)) | Arithmetic difference (change) in the summary variable(s) statistics between each specified pair of grouping variable categories. The keyword must be followed by a grouping variable name specified in parentheses, and the variable name must be followed by one or more pairs of grouping category values. Each pair of values must be enclosed in parentheses inside the parentheses that contain the grouping variable name. String values must be enclosed in single or double quotation marks. You can specify multiple pairs of category values, but you can only specify one grouping variable, and the grouping variable must be one of the grouping variables specified at the beginning of the OLAP CUBES command, after the BY keyword.
 | The difference calculated is the summary statistic value for the second category specified minus the summary statistic value for the first category specified: cat2 – cat1.
GPC (gvar(cat1 cat2)) | Percentage difference (change) in the summary variable(s) statistics between each specified pair of grouping variable categories. The keyword must be followed by a grouping variable name enclosed in parentheses, and the variable name must be followed by one or more pairs of grouping category values. Each pair of values must be enclosed in parentheses inside the parentheses that contain the grouping variable name. String values must be enclosed in single or double quotation marks. You can specify multiple pairs of category values, but you can only specify one grouping variable, and the grouping variable must be one of the grouping variables specified at the beginning of the OLAP CUBES command, after the BY keyword.
 | The percentage difference calculated is the summary statistic value for the second category specified minus the summary statistic value for the first category specified, divided by the summary statistic value for the first category specified: (cat2 – cat1)/cat1.
VAC(svar1 svar2) | Arithmetic difference (change) in summary statistics between each pair of specified summary variables. Each pair of variables must be enclosed in parentheses, and all specified variables must be specified as summary variables at the beginning of the OLAP CUBES command.
 | The difference calculated is the summary statistic value for the second variable specified minus the summary statistic value for the first variable specified: svar2 – svar1.
VPC(svar1 svar2) | Percentage difference (change) in summary statistics between each pair of specified summary variables. Each pair of variables must be enclosed in parentheses, and all specified variables must be specified as summary variables at the beginning of the OLAP CUBES command.
 | The percentage difference calculated is the summary statistic value for the second variable specified minus the summary statistic value for the first variable specified: (svar2 – svar1)/svar1.
’category label’ | Optional label for each difference category created. These labels must be the first specification in the CREATE subcommand. Each label must be enclosed in single or double quotation marks. If no labels are specified, defined value or variable labels are used. If no labels are defined, data values or variable names are displayed. If multiple differences are created, the order of the labels corresponds to the order the differences are specified. To mix custom labels with default labels, use the keyword DEFAULT for the difference categories without custom labels.

Both arithmetic and percentage differences can be specified in the same command, but you cannot specify both grouping variable differences (GAC/GPC) and summary variable differences (VAC/VPC) in the same command.

Example

OLAP CUBES
 sales96   BY region
 /CELLS=SUM NPCT
 /CREATE GAC GPC (region (1 3) (2 3)).

• Both the arithmetic (GAC) and percentage (GPC) differences will be calculated.

• Differences will be calculated for two different pairs of categories of the grouping variable region.

• The grouping variable specified in the CREATE subcommand, region, is also specified as a grouping variable at the beginning of the OLAP CUBES command.

Example

OLAP CUBES
 sales95 sales96   BY region
 /CELLS=SUM NPCT
 /CREATE VAC VPC (sales95 sales96).

• Both the arithmetic (VAC) and percentage (VPC) differences will be calculated.

• The difference calculated will be sales96 - sales95.

• The percentage difference calculated will be (sales96 - sales95)/sales95.

• The two variables, sales95 and sales96 are also specified as summary variables at the beginning of the OLAP CUBES command.

Example

OLAP CUBES
 sales96   BY region
 /CELLS=SUM NPCT
 /CREATE DEFAULT 'West-East GPC'  DEFAULT 'West-Central % Difference'
 GAC GPC (region (1 3) (2 3)).

• Four labels are specified, corresponding to the four difference categories that will be created: arithmetic and percentage differences between regions 3 and 1 and between regions 3 and 2.

• The two DEFAULT labels will display the defined value labels or values if there aren’t any value labels for the two arithmetic (GAC) difference categories.

Related Topics

OLAP CUBES
Overview (OLAP CUBES command)
Examples (OLAP CUBES command)
Options (OLAP CUBES command)
TITLE and FOOTNOTE Subcommands (OLAP CUBES command)
CELLS Subcommand (OLAP CUBES command)


OMS

exporting output,exporting output,exporting output
output,output,output
exporting,exporting,exporting
output,output,output
saving as data files,saving as data files,saving as data files
data files,data files,data files
saving output as data files,saving output as data files,saving output as data files
OMS (command),OMS (command),OMS (command)
OMS (command),OMS (command),OMS (command)
syntax chart,syntax chart,syntax chart
release history,release history,release history

Note: Square brackets used in the OMS syntax chart are required parts of the syntax and are not used to indicate optional elements. Any equals signs (=) displayed in the syntax chart are required. All subcommands except DESTINATION are optional.

OMS

 /SELECT CHARTS HEADINGS LOGS MODELS
         TABLES TEXTS TREES WARNINGS
 or
 /SELECT ALL EXCEPT = [list]

 /IF  COMMANDS = ["expression" "expression"...]
      SUBTYPES = ["expression" "expression"...]
      LABELS = ["expression" "expression"...]
      INSTANCES = [n n... LAST]

 /EXCEPTIF (same keywords as IF, except for INSTANCES)

 /DESTINATION
  FORMAT=
         {DOC     }
         {HTML    }
         {OXML    }
         {PDF     ]
         {TABTEXT }
         {TEXT    }
         {SAV     }
         {SPV     }
         {SPW     ]
         {XLS     }

 {OUTFILE = "outfile expression"           }
 {XMLWORKSPACE="name"                      }
 {OUTPUTSET = {SUBTYPES} FOLDER = "dirspec"}
              {LABELS  }

  VIEWER={YES|NO}
  NUMBERED = 'varname'
  IMAGES={YES|NO}
  IMAGEFORMAT={PNG|JPG|EMF|BMP|VML}
  IMAGEROOT='rootname'
  CHARTSIZE=percent
  IMAGEMAP={NO|YES}
  TREEFORMAT={XML|IMAGE}
  CHARTFORMAT={XML|IMAGE}
  MODELFORMAT={XML|IMAGE}
  TABLES={PIVOTABLE|STATIC}

 /COLUMNS DIMNAMES = ["dimension1" "dimension2" ...]
or
 /COLUMNS SEQUENCE = [R1 R2 ... RALL C1 C2... CALL L1 L2... LALL]

 /TAG = "string"

 /NOWARN

• NUMBERED only applies to FORMAT=SAV.

• IMAGES applies only to FORMAT=OXML, HTML, and SPV.

• IMAGEFORMAT applies only to FORMAT=OXML, HTML, SPV, and SPW.

• IMAGEROOT and CHARTSIZE only apply to FORMAT=OXML and HTML.

• IMAGEMAP only applies to FORMAT=HTML.

• TREEFORMAT only applies to FORMAT=OXML and SPV.

• CHARTFORMAT only applies to FORMAT=OXML.

• TABLES only applies to FORMAT=SPW files used in PASW Collaboration and Deployment Services.

This command takes effect immediately. It does not read the active dataset or execute pending transformations. See the topic Command Order for more information.

Syntax for the OMS command can be generated from the Output Management System Control Panel dialog.

Release History Collapse Hide details

Release History

Release 13.0

• TREES keyword introduced on SELECT subcommand.

• IMAGES, IMAGEROOT, CHARTSIZE, and IMAGEFORMAT keywords introduced on DESTINATION subcommand.

Release 14.0

• XMLWORKSPACE keyword introduced on DESTINATION subcommand.

Release 16.0

• IMAGEFORMAT=VML introduced for FORMAT=HTML on DESTINATION subcommand.

• IMAGEMAP keyword introduced for FORMAT=HTML on DESTINATION subcommand.

• FORMAT=SPV introduced for saving output in Viewer format.

• CHARTFORMAT keyword introduced.

• TREEFORMAT keyword introduced.

• TABLES keyword introduced.

• FORMAT=SVWSOXML is no longer supported.

Release 17.0

• MODELS keyword introduced on SELECT subcommand.

• FORMAT=DOC, XLS, PDF, and SPW introduced.

• MODELFORMAT keyword introduced.

Example

OMS
 /DESTINATION FORMAT = OXML OUTFILE = '/mydir/myfile.xml'
  VIEWER = NO.
OMS
 /SELECT TABLES
 /IF COMMANDS = ['Regression']
     SUBTYPES = ['Coefficients']
 /DESTINATION FORMAT = SAV
  OUTFILE = '/mydir/regression_coefficients.sav'.
REGRESSION
  /STATISTICS COEFF OUTS R ANOVA
  /DEPENDENT income
  /METHOD=ENTER age address ed employ.
OMSEND.

Related Topics

Overview (OMS command)
Basic Operation (OMS command)
SELECT Subcommand (OMS command)
IF Subcommand (OMS command)
EXCEPTIF Subcommand (OMS command)
DESTINATION Subcommand (OMS command)
COLUMNS Subcommand (OMS command)
TAG Subcommand (OMS command)
NOWARN Subcommand (OMS command)
Routing Output to SAV Files (OMS command)
OXML Table Structure (OMS command)
Command and Subtype Identifiers (OMS command)
OMSEND
OMSINFO
OMSLOG


Overview (OMS command)

The OMS command controls the routing and format of output from PASW Statistics to files and can suppress Viewer output. Output formats include: Word, Excel, PDF, PASW Statistics data file format (SAV), Viewer file format (SPV), web report format (SPW), XML, HTML, and text.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is the command name followed by a DESTINATION subcommand that contains a FORMAT and/or a VIEWER specification. For FORMAT, an OUTFILE or OUTPUTSET specification is also required.

Syntax Rules Collapse Hide details

Syntax Rules

• All subcommands except DESTINATION are optional. No subcommand may occur more than once in each OMS command.

• Multiple OMS commands are allowed. For more information, see Basic Operation (OMS command) below.

• Subcommands can appear in any order.

• If duplicates are found in a list, they are ignored except in /COLUMNS SEQUENCE where they cause an error.

• When a keyword takes a square-bracketed list, the brackets are required even if the list contains only a single item.

Related Topics

OMS
Basic Operation (OMS command)
SELECT Subcommand (OMS command)
IF Subcommand (OMS command)
EXCEPTIF Subcommand (OMS command)
DESTINATION Subcommand (OMS command)
COLUMNS Subcommand (OMS command)
TAG Subcommand (OMS command)
NOWARN Subcommand (OMS command)
Routing Output to SAV Files (OMS command)
OXML Table Structure (OMS command)
Command and Subtype Identifiers (OMS command)


Basic Operation (OMS command)

• Once an OMS command is executed, it remains in effect until the end of the session or until ended by an OMSEND command.

• A destination file specified on an OMS command is unavailable to other commands and other applications until the OMS command is ended by an OMSEND command or the end of the session.

• While an OMS command is in effect, the specified destination files are stored in memory (RAM), so active OMS commands that write a large amount of output to external files may consume a large amount of memory.

• Multiple OMS commands are independent of each other (except as noted below). The same output can be routed to different locations in different formats based on the specifications in different OMS commands.

• Display of output objects in the Viewer is determined by the most recent OMS command that includes the particular output type. For example, if an OMS command includes all tables from the FREQUENCIES command and also contains a VIEWER = YES specification, and a subsequent OMS command includes all tables of the subtype 'Statistics' with VIEWER = NO, Statistics tables for subsequent FREQUENCIES commands will not be displayed in the Viewer.

• The COLUMNS subcommand has no effect on pivot tables displayed in the Viewer.

• The order of the output objects in any particular destination is the order in which they were created, which is determined by the order and operation of the commands that generate the output.

Related Topics

OMS
Overview (OMS command)
SELECT Subcommand (OMS command)
IF Subcommand (OMS command)
EXCEPTIF Subcommand (OMS command)
DESTINATION Subcommand (OMS command)
COLUMNS Subcommand (OMS command)
TAG Subcommand (OMS command)
NOWARN Subcommand (OMS command)
Routing Output to SAV Files (OMS command)
OXML Table Structure (OMS command)
Command and Subtype Identifiers (OMS command)


SELECT Subcommand (OMS command)

OMS (command),OMS (command),OMS (command)
SELECT subcommand,SELECT subcommand,SELECT subcommand
SELECT (subcommand),SELECT (subcommand),SELECT (subcommand)
OMS command,OMS command,OMS command

SELECT specifies the types of output objects to be routed to the specified destination(s). You can select multiple types. You can also specify ALL with EXCEPT to exclude specified types. If there is no SELECT subcommand, all supported output types are selected.

ALL. All output objects. This is the default.

CHARTS. Chart objects. This includes charts created by the commands such as GRAPH and GGRAPH and charts created by statistical procedures (for example, the BARCHART subcommand of the FREQUENCIES command). It does not include tree diagrams produced by the TREE procedure or charts in models displayed in the Model Viewer.

HEADINGS. Text objects labeled Title in the outline pane of the Viewer. For destination format OXML, heading text objects are not included.

LOGS. Log text objects. Log objects contain certain types of error and warning messages. With SET PRINTBACK=ON, log objects also contain the command syntax executed during the session. Log objects are labeled Log in the outline pane of the Viewer.

MODELS. Output objects displayed in the Model Viewer. A single model object can contain multiple views of the model, including both tables and charts.

TABLES. Output objects that are pivot tables in the Viewer. This includes Notes tables. It does not include tables displayed in the Model Viewer. Pivot tables are the only output objects that can be routed to the destination format SAV.

TEXTS. Text objects that aren't logs or headings. This includes objects labeled Text Output in the outline pane of the Viewer.

TREES. Tree model diagrams produced by the TREE procedure (Decision Tree option).

WARNINGS. Warnings objects. Warnings objects contain certain types of error and warning messages.

Example

OMS /SELECT TABLES LOGS TEXTS WARNINGS HEADINGS
    /DESTINATION FORMAT = HTML OUTFILE = '/mypath/myfile1.htm'.
OMS /SELECT ALL EXCEPT = [CHARTS]
    /DESTINATION FORMAT = HTML OUTFILE = '/mypath/myfile2.htm'.

The two SELECT subcommands are functionally equivalent. The first one explicitly lists all types but CHARTS, and the second one explicitly excludes only CHARTS.

Output object types in the Viewer

Notes Table Limitation

An OMS command that selects only tables will not select a Notes table if the Notes tables is the only table produced by a procedure. This can occur if the command contains syntax errors that result in a Notes table and a warning object, but no other tables. For example:

DATA LIST FREE /var1 var2.
BEGIN DATA
1 2
END DATA.
OMS SELECT TABLES
  /DESTINATION FORMAT=HTML
   OUTFILE='/temp/htmltest.htm'.
FREQUENCIES VARIABLES=var1.
DESCRIPTIVES VARIABLES=var02.
OMSEND.

The DESCRIPTIVES command refers to a variable that doesn't exist, causing an error that results in the creation of a Notes table and a warning object, but the HTML file will not include this Notes table. To make sure Notes tables are selected when no other tables are created by a procedure, include WARNINGS in the SELECT subcommand, as in:

OMS SELECT TABLES WARNINGS
  /DESTINATION FORMAT=HTML
   OUTFILE='/temp/htmltest.htm'.

Related Topics

OMS
Overview (OMS command)
Basic Operation (OMS command)
IF Subcommand (OMS command)
EXCEPTIF Subcommand (OMS command)
DESTINATION Subcommand (OMS command)
COLUMNS Subcommand (OMS command)
TAG Subcommand (OMS command)
NOWARN Subcommand (OMS command)
Routing Output to SAV Files (OMS command)
OXML Table Structure (OMS command)
Command and Subtype Identifiers (OMS command)


IF Subcommand (OMS command)

OMS (command),OMS (command),OMS (command)
IF subcommand,IF subcommand,IF subcommand
IF (subcommand),IF (subcommand),IF (subcommand)
OMS command,OMS command,OMS command

The IF subcommand specifies particular output objects of the types determined by SELECT. Without an IF subcommand, all objects of the specified types are selected. If you specify multiple conditions, only those objects that meet all conditions will be selected.

Example

OMS
 /SELECT TABLES
 /IF COMMANDS = ['Regression']
     SUBTYPES = ['Coefficients']
 /DESTINATION FORMAT = SAV
  OUTFILE = '/mydir/regression_coefficients.sav'.

This OMS command specifies that only coefficient tables from the REGRESSION command will be selected.

Related Topics

OMS
Overview (OMS command)
Basic Operation (OMS command)
SELECT Subcommand (OMS command)
EXCEPTIF Subcommand (OMS command)
DESTINATION Subcommand (OMS command)
COLUMNS Subcommand (OMS command)
TAG Subcommand (OMS command)
NOWARN Subcommand (OMS command)
Routing Output to SAV Files (OMS command)
OXML Table Structure (OMS command)
Command and Subtype Identifiers (OMS command)
COMMANDS Keyword (OMS command)
SUBTYPES Keyword (OMS command)
LABELS Keyword (OMS command)
INSTANCES Keyword (OMS command)
Wildcards (OMS command)


COMMANDS Keyword (OMS command)

The COMMANDS keyword restricts the selection to the specified command(s). The keyword COMMANDS must be followed by an equals sign (=) and a list of quoted command identifiers enclosed in square bracket, as in:

OMS
 /SELECT TABLES
 /IF COMMANDS = ['Frequencies' 'Factor Analysis']
 /DESTINATION...

Command identifiers are:

• Unique. No two commands have the same identifier.

• Not case-sensitive.

• Not subject to translation, which means they are the same for all language versions and output languages.

• Often not exactly the same or even similar to the command name. You can obtain the identifier for a particular command from the OMS Control Panel (Utilities menu) or by generating output from the command in the Viewer and then right-clicking the command heading in the outline pane and selecting Copy OMS Command Identifier from the context menu.

Command identifiers are available for all statistical and charting procedures and any other commands that produce blocks of output with their own identifiable heading in the outline pane of the Viewer. For example, CASESTOVARS and VARSTOCASES have corresponding identifiers ('Cases to Variables' and 'Variables to Cases') because they produce their own output blocks (with command headings in the outline pane that happen to match the identifiers), but FLIP does not because any output produced by FLIP is included in a generic Log text object.

Related Topics

IF Subcommand (OMS command)
SUBTYPES Keyword (OMS command)
LABELS Keyword (OMS command)
INSTANCES Keyword (OMS command)
Wildcards (OMS command)


SUBTYPES Keyword (OMS command)

The SUBTYPES keyword restricts the selection to the specified table types The keyword SUBTYPES must be followed by an equals sign (=) and a list of quoted subtype identifiers enclosed in square bracket, as in:

OMS
 /SELECT TABLES
 /IF SUBTYPES = ['Descriptive Statistics' 'Coefficients']
 /DESTINATION...

• Subtypes apply only to tables that would be displayed as pivot tables in the Viewer.

• Like command identifiers, subtype identifiers are not case-sensitive and are not subject to translation.

• Unlike command identifiers, subtype identifiers are not necessarily unique. For example, multiple commands produce a table with the subtype identifier "Descriptive Statistics," but not all of those tables share the same structure. If you want only a particular table type for a particular command, use both the COMMANDS and SUBTYPES keywords.

• The OMS Control Panel (Utilities menu) provides a complete list of subtypes. You can also obtain the identifier for a particular table by generating output from the command in the Viewer and then right-clicking outline item for the Table in the outline pane of the Viewer and selecting Copy OMS Table Subtype from the context menu. The identifiers are generally fairly descriptive of the particular table type.

Related Topics

IF Subcommand (OMS command)
COMMANDS Keyword (OMS command)
LABELS Keyword (OMS command)
INSTANCES Keyword (OMS command)
Wildcards (OMS command)


LABELS Keyword (OMS command)

The LABELS keyword selects particular output objects according to the text displayed in the outline pane of the Viewer. The keyword LABELS must be followed by an equals sign (=) and a list of quoted label text enclosed in square brackets, as in:

OMS
 /SELECT TABLES
 /IF LABELS = ['Job category * Gender Crosstabulation']
 /DESTINATION...

The LABELS keyword is useful for differentiating between multiple graphs or multiple tables of the same type in which the outline text reflects some attribute of the particular output object such as the variable names or labels. There are, however, a number of factors that can affect the label text:

• If split file processing is on, split file group identification may be appended to the label.

• Labels that include information about variables or values are affected by the OVARS and ONUMBERS settings on the SET command.

• Labels are affected by the current output language setting (SET OLANG).

Related Topics

IF Subcommand (OMS command)
COMMANDS Keyword (OMS command)
SUBTYPES Keyword (OMS command)
INSTANCES Keyword (OMS command)
Wildcards (OMS command)


INSTANCES Keyword (OMS command)

The INSTANCES subcommand selects the nth instance of an object matching the other criteria on the IF subcommand within a single command execution. The keyword INSTANCES must be followed by an equals sign (=) and a list of positive integers and/or the keyword LAST enclosed in square brackets.

Example

OMS
 /SELECT TABLES
 /IF COMMANDS = ['Frequencies']
     SUBTYPES = ['Frequencies']
     INSTANCES = [1 LAST]
 /DESTINATION...
OMS
 /SELECT TABLES
 /IF COMMANDS = ['Frequencies']
     INSTANCES = [1 LAST]
 /DESTINATION...

• The first OMS command will select the first and last frequency tables from each FREQUENCIES command.

• The second OMS command, in the absence of a SUBTYPES or LABELS specification, will select the first and last tables of any kind from the selected command. For the FREQUENCIES command (and most other statistical and charting procedures), the first table would be the Notes table.

Related Topics

IF Subcommand (OMS command)
COMMANDS Keyword (OMS command)
SUBTYPES Keyword (OMS command)
LABELS Keyword (OMS command)
Wildcards (OMS command)


Wildcards (OMS command)

For COMMANDS, SUBTYPES, and LABELS, you can use an asterisk (*) as a wildcard indicator at the end of a quoted string to include all commands, tables, and/or charts that start with that quoted string, as in:

OMS
 /SELECT TABLES
 /IF SUBTYPES = ['Correlation*']
 /DESTINATION...

In this example, all table subtypes that begin with "Correlation" will be selected.

The values of LABELS can contain asterisks as part of the value as in "First variable * Second variable Crosstabulation," but only an asterisk as the last character in the quoted string is interpreted as a wildcard, so:

 OMS
 /SELECT TABLES
 /IF LABELS = ['First Variable **']
 /DESTINATION...

will select all tables with labels that start with "First Variable *".

Related Topics

IF Subcommand (OMS command)
COMMANDS Keyword (OMS command)
SUBTYPES Keyword (OMS command)
LABELS Keyword (OMS command)
INSTANCES Keyword (OMS command)


EXCEPTIF Subcommand (OMS command)

OMS (command),OMS (command),OMS (command)
EXCEPTIF subcommand,EXCEPTIF subcommand,EXCEPTIF subcommand
EXCEPTIF (subcommand),EXCEPTIF (subcommand),EXCEPTIF (subcommand)
OMS command,OMS command,OMS command

The EXCEPTIF subcommand excludes specified output object types. It has the same keywords and syntax as IF, with the exception of INSTANCES, which will cause an error if used with EXCEPTIF.

Example

OMS
 /SELECT TABLES
 /IF COMMANDS = ['Regression']
 /EXCEPTIF SUBTYPES = ['Notes' 'Case Summar*']
 /DESTINATION...

Related Topics

OMS
Overview (OMS command)
Basic Operation (OMS command)
SELECT Subcommand (OMS command)
IF Subcommand (OMS command)
DESTINATION Subcommand (OMS command)
COLUMNS Subcommand (OMS command)
TAG Subcommand (OMS command)
NOWARN Subcommand (OMS command)
Routing Output to SAV Files (OMS command)
OXML Table Structure (OMS command)
Command and Subtype Identifiers (OMS command)


DESTINATION Subcommand (OMS command)

OMS (command),OMS (command),OMS (command)
DESTINATION subcommand,DESTINATION subcommand,DESTINATION subcommand
DESTINATION (subcommand),DESTINATION (subcommand),DESTINATION (subcommand)
OMS command,OMS command,OMS command
exporting output,exporting output,exporting output
XML format,XML format,XML format
XML,XML,XML
saving output as XML,saving output as XML,saving output as XML
exporting output,exporting output,exporting output
SAV format,SAV format,SAV format
exporting output,exporting output,exporting output
HTML,HTML,HTML
HTML,HTML,HTML
exporting output as HTML,exporting output as HTML,exporting output as HTML
exporting output,exporting output,exporting output
text format,text format,text format
text,text,text
exporting output as text,exporting output as text,exporting output as text

The DESTINATION subcommand is the only required subcommand. It specifies the format and location for the routed output. You can also use this subcommand to control what output is displayed in the Viewer.

• Output continues to flow to a specified destination until its OMS specification is ended, at which point the file is closed. See the topic Basic Operation (OMS command) for more information.

• Different OMS commands may refer to the same destination file as long as the FORMAT is the same. When a request becomes active, it starts contributing to the appropriate output stream. If the FORMAT differs, an error results. When multiple requests target the same destination, the output is written in the order in which it is created, not the order of OMS commands.

Example

OMS
 /DESTINATION FORMAT = OXML OUTFILE = '/mydir/myfile.xml'.

Related Topics

OMS
Overview (OMS command)
Basic Operation (OMS command)
SELECT Subcommand (OMS command)
IF Subcommand (OMS command)
EXCEPTIF Subcommand (OMS command)
COLUMNS Subcommand (OMS command)
TAG Subcommand (OMS command)
NOWARN Subcommand (OMS command)
Routing Output to SAV Files (OMS command)
OXML Table Structure (OMS command)
Command and Subtype Identifiers (OMS command)
FORMAT Keyword (OMS command)
NUMBERED Keyword (OMS command)
IMAGES and IMAGEFORMAT Keywords (OMS command)
CHARTSIZE and IMAGEROOT Keywords (OMS command)
IMAGEMAP Keyword (OMS command)
TREEFORMAT Keyword (OMS command)
CHARTFORMAT Keyword (OMS command)
MODELFORMAT Keyword (OMS command)
TABLES Keyword (OMS command)
OUTFILE Keyword (OMS command)
XMLWORKSPACE Keyword
OUTPUTSET Keyword (OMS command)
FOLDER Keyword (OMS command)
VIEWER Keyword (OMS command)


FORMAT Keyword (OMS command)

The DESTINATION subcommand must include either a FORMAT or VIEWER specification (or both). The FORMAT keyword specifies the format for the routed output. The keyword must be followed by an equals sign (=) and one of the following alternatives:

DOC. Word/RTF format. Pivot tables are exported as Word tables with all formatting attributes intact--for example, cell borders, font styles, and background colors. Text output is exported as formatted RTF. Charts, tree diagrams, and model views are included in PNG format.

HTML. HTML 4.0. Output objects that would be pivot tables in the Viewer are converted to simple HTML tables. No TableLook attributes (font characteristics, border styles, colors, etc.) are supported. Text output objects are tagged <PRE> in the HTML. Charts, tree diagrams, and model views are exported as separate files in the selected graphics format and are embedded by reference. Image file names use the HTML file name as the root name, followed by a sequential integer, starting with 0.

OXML. Output XML. XML that conforms to the spss-output schema (xml.spss.com/spss/oms). See the topic OXML Table Structure (OMS command) for more information.

PDF. Portable Document Format. Output is exported as it would appear in Print Preview, with all formatting attributes intact. The PDF file includes bookmarks that correspond to the entries in the Viewer outline pane.

SAV. PASW Statistics format data file. This format is a binary file format. All output object types other than tables are excluded. Each column of a table becomes a variable in the data file. To use a data file that is created with OMS in the same session, you must end the active OMS request before you can open the data file. See the topic Routing Output to SAV Files (OMS command) for more information. In Unicode mode, the file encoding is UTF-8; in code page mode, the file encoding is the code page determined by the current locale. See SET command, UNICODE subcommand for more information.

SPV. Viewer file format. This is the same format used when you save the contents of a Viewer window.

SPW. Web report format. This output file format is designed for use with Predictive Enterprise Services. It is essentially the same as the PASW Statistics Viewer format except that tree diagrams are saved as static images.

TEXT. Space-separated text. Output is written as text, with tabular output aligned with spaces for fixed-pitch fonts. Charts, tree diagrams, and model views are excluded. In Unicode mode, the file encoding is UTF-8; in code page mode, the file encoding is the code page determined by the current locale. See SET command, UNICODE subcommand for more information.

TABTEXT. Tab-delimited text. For output that is displayed as pivot tables in the Viewer, tabs delimit table column elements. Text block lines are written as is; no attempt is made to divide them with tabs at useful places. Charts, tree diagrams, and model views are excluded. In Unicode mode, the file encoding is UTF-8; in code page mode, the file encoding is the code page determined by the current locale. See SET command, UNICODE subcommand for more information.

XLS. Excel 97-2003 format. Pivot table rows, columns, and cells are exported as Excel rows, columns, and cells, with all formatting attributes intact -- for example, cell borders, font styles, and background colors. Text output is exported with all font attributes intact. Each line in the text output is a row in the Excel file, with the entire contents of the line contained in a single cell. Charts, tree diagrams, and model views are included in PNG format.

Related Topics

DESTINATION Subcommand (OMS command)
NUMBERED Keyword (OMS command)
IMAGES and IMAGEFORMAT Keywords (OMS command)
CHARTSIZE and IMAGEROOT Keywords (OMS command)
IMAGEMAP Keyword (OMS command)
TREEFORMAT Keyword (OMS command)
CHARTFORMAT Keyword (OMS command)
MODELFORMAT Keyword (OMS command)
TABLES Keyword (OMS command)
OUTFILE Keyword (OMS command)
XMLWORKSPACE Keyword
OUTPUTSET Keyword (OMS command)
FOLDER Keyword (OMS command)
VIEWER Keyword (OMS command)


NUMBERED Keyword (OMS command)

For FORMAT=SAV, you can also specify the NUMBERED keyword to identify the source tables, which can be useful if the data file is constructed from multiple tables. This creates an additional variable in the data file. The value of the variable is a positive integer that indicates the sequential table number. The default variable name is TableNumber_. You can override the default with an equals sign (=) followed by a valid variable name in quotes after the NUMBERED keyword.

Example

OMS
 /SELECT TABLES
 /IF COMMANDS = ['Regression'] SUBTYPES = ['Coefficients']
 /DESTINATION = SAV NUMBERED = 'Table_number'
  OUTFILE = 'data.sav'.

Related Topics

DESTINATION Subcommand (OMS command)
FORMAT Keyword (OMS command)
IMAGES and IMAGEFORMAT Keywords (OMS command)
CHARTSIZE and IMAGEROOT Keywords (OMS command)
IMAGEMAP Keyword (OMS command)
TREEFORMAT Keyword (OMS command)
CHARTFORMAT Keyword (OMS command)
MODELFORMAT Keyword (OMS command)
TABLES Keyword (OMS command)
OUTFILE Keyword (OMS command)
XMLWORKSPACE Keyword
OUTPUTSET Keyword (OMS command)
FOLDER Keyword (OMS command)
VIEWER Keyword (OMS command)


IMAGES and IMAGEFORMAT Keywords (OMS command)

IMAGES (keyword),IMAGES (keyword),IMAGES (keyword)
OMS command,OMS command,OMS command
OMS (command),OMS (command),OMS (command)
IMAGES keyword,IMAGES keyword,IMAGES keyword

For HTML and OXML document format, you can include charts, tree diagrams, and model views in a number of different graphic formats with the IMAGES and IMAGEFORMAT keywords. For SPV and SPW formats, these settings only apply to tree diagrams, not charts or model views.

IMAGES Keyword

• IMAGES=YES produces a separate image file for each chart and/or tree diagram. Image files are saved in a separate subdirectory (folder). The subdirectory name is the name of the destination file without any extension and with "_files" appended to the end. This is the default setting.

• For HTML document format, standard <IMG SRC='filename'> tags are included in the HTML document for each image file.

• For charts in OXML document format, the XML file contains chart elements with an ImageFile attribute of the general form <chart imageFile="filepath/filename"/> for each image file. IMAGES=YES has no effect on FORMAT=OXML unless you also specify CHARTFORMAT=IMAGE. See the topic CHARTFORMAT Keyword (OMS command) for more information.

• For model views in OXML document format, the XML file contains modelview elements with an ImageFile attribute of the general form <modelview imageFile="filepath/filename"/> for each image file. IMAGES=YES has no effect on FORMAT=OXML unless you also specify MODELFORMAT=IMAGE. See the topic MODELFORMAT Keyword (OMS command) for more information.

• For HTML format, IMAGES=NO excludes charts, tree diagrams, and modelviews.

• For OXML format, IMAGES=NO causes charts, tree diagrams, and model views to be included in the document in XML format instead of as separate image files.

IMAGEFORMAT Keyword

• PNG is the default image format.

• For HTML document format, the available image formats are PNG, JPG, EMF, BMP, and VML.

• For OXML document format, the available image formats are PNG, JPG, EMF, and BMP.

• For SPV and SPW document format, the available image formats are PNG, JPG, and BMP.

• EMF (enhanced metafile) format is available only on Windows operating systems.

• VML image format does not create separate image files. The VML code that renders the image is embedded in the HTML.

• VML image format does not include tree diagrams.

Note: Not all browsers support VML.

Example

OMS SELECT TABLES CHARTS
  /DESTINATION FORMAT=HTML
               IMAGES=YES
               IMAGEFORMAT=JPG
               OUTFILE='/htmloutput/julydata.htm'.

Related Topics

DESTINATION Subcommand (OMS command)
FORMAT Keyword (OMS command)
NUMBERED Keyword (OMS command)
CHARTSIZE and IMAGEROOT Keywords (OMS command)
IMAGEMAP Keyword (OMS command)
TREEFORMAT Keyword (OMS command)
CHARTFORMAT Keyword (OMS command)
MODELFORMAT Keyword (OMS command)
TABLES Keyword (OMS command)
OUTFILE Keyword (OMS command)
XMLWORKSPACE Keyword
OUTPUTSET Keyword (OMS command)
FOLDER Keyword (OMS command)
VIEWER Keyword (OMS command)


CHARTSIZE and IMAGEROOT Keywords (OMS command)

OMS (command),OMS (command),OMS (command)
CHARTSIZE keyword,CHARTSIZE keyword,CHARTSIZE keyword
IMAGEROOT keyword,IMAGEROOT keyword,IMAGEROOT keyword
IMAGEROOT (keyword),IMAGEROOT (keyword),IMAGEROOT (keyword)
OMS command,OMS command,OMS command
CHARTSIZE (keyword),CHARTSIZE (keyword),CHARTSIZE (keyword)
OMS command,OMS command,OMS command

For HTML and OXML document formats, you can control the relative size and root name of chart and tree diagram images, if charts and/or tree diagrams are saved as separate image files. See the topic IMAGES and IMAGEFORMAT Keywords (OMS command) for more information.

• CHARTSIZE=n. Specifies the scaling, expressed as a percentage value between 10 and 200. The default is CHARTSIZE=100.

• IMAGEROOT='rootname'. User-specified rootname for image files. Image files are constructed from the rootname, an underscore, and a sequential three-digit number. The rootname should be specified in quotes, as in: IMAGEROOT='julydata'.

Example

OMS SELECT TABLES CHARTS
  /DESTINATION FORMAT=HTML
   IMAGES=YES
   CHARTSIZE=50
   IMAGEROOT='rutabaga'
   OUTFILE='/htmloutput/julydata.htm'.

Related Topics

DESTINATION Subcommand (OMS command)
FORMAT Keyword (OMS command)
NUMBERED Keyword (OMS command)
IMAGES and IMAGEFORMAT Keywords (OMS command)
IMAGEMAP Keyword (OMS command)
TREEFORMAT Keyword (OMS command)
CHARTFORMAT Keyword (OMS command)
MODELFORMAT Keyword (OMS command)
TABLES Keyword (OMS command)
OUTFILE Keyword (OMS command)
XMLWORKSPACE Keyword
OUTPUTSET Keyword (OMS command)
FOLDER Keyword (OMS command)
VIEWER Keyword (OMS command)


IMAGEMAP Keyword (OMS command)

OMS (command),OMS (command),OMS (command)
IMAGEMAP keyword,IMAGEMAP keyword,IMAGEMAP keyword
IMAGEMAP (keyword),IMAGEMAP (keyword),IMAGEMAP (keyword)
OMS command,OMS command,OMS command

For HTML document format, you can use the IMAGEMAP keyword to create image map tooltips that display information for some chart elements, such as the value of the selected point on a line chart or bar on a bar chart. The default is IMAGEMAP=NO. To include image map tooltips, use IMAGEMAP=YES.

IMAGEMAP has no effect on tree diagram images or document formats other than HTML.

Example

OMS SELECT TABLES CHARTS
  /DESTINATION FORMAT=HTML
               IMAGES=YES
               IMAGEFORMAT=PNG
               IMAGEMAP=YES
               OUTFILE='/htmloutput/julydata.htm'.

Related Topics

DESTINATION Subcommand (OMS command)
FORMAT Keyword (OMS command)
NUMBERED Keyword (OMS command)
IMAGES and IMAGEFORMAT Keywords (OMS command)
CHARTSIZE and IMAGEROOT Keywords (OMS command)
TREEFORMAT Keyword (OMS command)
CHARTFORMAT Keyword (OMS command)
MODELFORMAT Keyword (OMS command)
TABLES Keyword (OMS command)
OUTFILE Keyword (OMS command)
XMLWORKSPACE Keyword
OUTPUTSET Keyword (OMS command)
FOLDER Keyword (OMS command)
VIEWER Keyword (OMS command)


TREEFORMAT Keyword (OMS command)

OMS (command),OMS (command),OMS (command)
TREEFORMAT keyword,TREEFORMAT keyword,TREEFORMAT keyword
TREEFORMAT (keyword),TREEFORMAT (keyword),TREEFORMAT (keyword)
OMS command,OMS command,OMS command

For OXML and SPV document formats, TREEFORMAT controls the format of tree diagrams (produced by the TREE command). The keyword is followed by and equals sign and one of the following alternatives:

• XML. Tree diagrams are included as XML that conforms to the pmml schema (www.dmg.org). For SPV format, this is the format required to activate and edit trees in the Viewer window. This is the default.

• IMAGE. For SPV format, tree diagrams are included in the Viewer document as static images in the selected format. For OXML format, image files are saved in a separate folder. See the topic IMAGES and IMAGEFORMAT Keywords (OMS command) for more information.

IMAGES=NO overrides the TREEFORMAT setting and includes tree diagrams in XML format. See the topic IMAGES and IMAGEFORMAT Keywords (OMS command) for more information.

Example

OMS SELECT TABLES TREES
  /DESTINATION FORMAT=SPV
               IMAGES=YES
               IMAGEFORMAT=PNG
               TREEFORMAT=IMAGE
               OUTFILE='/viewerdocs/results.spv'.

Related Topics

DESTINATION Subcommand (OMS command)
FORMAT Keyword (OMS command)
NUMBERED Keyword (OMS command)
IMAGES and IMAGEFORMAT Keywords (OMS command)
CHARTSIZE and IMAGEROOT Keywords (OMS command)
IMAGEMAP Keyword (OMS command)
CHARTFORMAT Keyword (OMS command)
MODELFORMAT Keyword (OMS command)
TABLES Keyword (OMS command)
OUTFILE Keyword (OMS command)
XMLWORKSPACE Keyword
OUTPUTSET Keyword (OMS command)
FOLDER Keyword (OMS command)
VIEWER Keyword (OMS command)


CHARTFORMAT Keyword (OMS command)

OMS (command),OMS (command),OMS (command)
CHARTFORMAT keyword,CHARTFORMAT keyword,CHARTFORMAT keyword
CHARTFORMAT (keyword),CHARTFORMAT (keyword),CHARTFORMAT (keyword)
OMS command,OMS command,OMS command

For OXML document format, CHARTFORMAT controls the format of charts. The keyword is followed by and equals sign and one of the following alternatives:

• XML. Charts are included as XML that conforms to the vizml schema (xml.spss.com/spss/visualization). This is the default.

• IMAGE. For SPV format, charts are included in the Viewer document as static images in the selected format. Image files are saved in the selected format in a separate folder. See the topic IMAGES and IMAGEFORMAT Keywords (OMS command) for more information.

IMAGES=NO overrides the CHARTFORMAT setting and includes charts in XML format. See the topic IMAGES and IMAGEFORMAT Keywords (OMS command) for more information.

Related Topics

DESTINATION Subcommand (OMS command)
FORMAT Keyword (OMS command)
NUMBERED Keyword (OMS command)
IMAGES and IMAGEFORMAT Keywords (OMS command)
CHARTSIZE and IMAGEROOT Keywords (OMS command)
IMAGEMAP Keyword (OMS command)
TREEFORMAT Keyword (OMS command)
MODELFORMAT Keyword (OMS command)
TABLES Keyword (OMS command)
OUTFILE Keyword (OMS command)
XMLWORKSPACE Keyword
OUTPUTSET Keyword (OMS command)
FOLDER Keyword (OMS command)
VIEWER Keyword (OMS command)


MODELFORMAT Keyword (OMS command)

OMS (command),OMS (command),OMS (command)
MODELFORMAT keyword,MODELFORMAT keyword,MODELFORMAT keyword
MODELFORMAT (keyword),MODELFORMAT (keyword),MODELFORMAT (keyword)
OMS command,OMS command,OMS command

For OXML document format, MODELFORMAT controls the format of models. The keyword is followed by and equals sign and one of the following alternatives:

• XML. Models are included as XML that conforms to the PMML schema (www.dmg.org), plus additional XML that specifies data and styles. This is the default.

• IMAGE. The OXML contains modelview elements that specify the image file names. The image files are saved in the selected format in a separate folder. One model may produce multiple image files.See the topic IMAGES and IMAGEFORMAT Keywords (OMS command) for more information.

IMAGES=NO overrides the MODELFORMAT setting and includes models in XML format. See the topic IMAGES and IMAGEFORMAT Keywords (OMS command) for more information.

Related Topics

DESTINATION Subcommand (OMS command)
FORMAT Keyword (OMS command)
NUMBERED Keyword (OMS command)
IMAGES and IMAGEFORMAT Keywords (OMS command)
CHARTSIZE and IMAGEROOT Keywords (OMS command)
IMAGEMAP Keyword (OMS command)
TREEFORMAT Keyword (OMS command)
CHARTFORMAT Keyword (OMS command)
TABLES Keyword (OMS command)
OUTFILE Keyword (OMS command)
XMLWORKSPACE Keyword
OUTPUTSET Keyword (OMS command)
FOLDER Keyword (OMS command)
VIEWER Keyword (OMS command)


TABLES Keyword (OMS command)

OMS (command),OMS (command),OMS (command)
TABLES keyword,TABLES keyword,TABLES keyword
TABLES (keyword),TABLES (keyword),TABLES (keyword)
OMS command,OMS command,OMS command

For SPW format, the TABLES keyword controls the format of pivot tables. The keyword is followed by an equals sign and one of the following alternatives:

• PIVOTABLE. Tables are included as dynamic pivot tables. This is the default.

• STATIC. Tables cannot be pivoted.

Related Topics

DESTINATION Subcommand (OMS command)
FORMAT Keyword (OMS command)
NUMBERED Keyword (OMS command)
IMAGES and IMAGEFORMAT Keywords (OMS command)
CHARTSIZE and IMAGEROOT Keywords (OMS command)
IMAGEMAP Keyword (OMS command)
TREEFORMAT Keyword (OMS command)
CHARTFORMAT Keyword (OMS command)
MODELFORMAT Keyword (OMS command)
OUTFILE Keyword (OMS command)
XMLWORKSPACE Keyword
OUTPUTSET Keyword (OMS command)
FOLDER Keyword (OMS command)
VIEWER Keyword (OMS command)


OUTFILE Keyword (OMS command)

If a FORMAT is specified, the DESTINATION subcommand must also include either an OUTFILE, XMLWORKSPACE, or OUTPUTSET specification. OUTFILE specifies an output file. The keyword must be followed by an equals sign (=) and a file specification in quotes or a previously defined file handle defined with the FILE HANDLE command. With FORMAT=SAV, you can specify a previously defined dataset name instead of a file.

Example

OMS
 /DESTINATION FORMAT = OXML OUTFILE = '/mydir/myfile.xml'.

Related Topics

DESTINATION Subcommand (OMS command)
FORMAT Keyword (OMS command)
NUMBERED Keyword (OMS command)
IMAGES and IMAGEFORMAT Keywords (OMS command)
CHARTSIZE and IMAGEROOT Keywords (OMS command)
IMAGEMAP Keyword (OMS command)
TREEFORMAT Keyword (OMS command)
CHARTFORMAT Keyword (OMS command)
MODELFORMAT Keyword (OMS command)
TABLES Keyword (OMS command)
XMLWORKSPACE Keyword
OUTPUTSET Keyword (OMS command)
FOLDER Keyword (OMS command)
VIEWER Keyword (OMS command)


XMLWORKSPACE Keyword

For FORMAT=OXML, you can route the output to a "workspace," and the output can then be used in flow control and other programming features available with BEGIN PROGRAM-END PROGRAM.

Example

OMS SELECT TABLES
  /IF COMMANDs=['Frequencies'] SUBTYPES=['Frequencies']
 /DESTINATION FORMAT=OXML XMLWORKSPACE='freq_table'.

See the topic BEGIN PROGRAM-END PROGRAM for more information.

Related Topics

DESTINATION Subcommand (OMS command)
FORMAT Keyword (OMS command)
NUMBERED Keyword (OMS command)
IMAGES and IMAGEFORMAT Keywords (OMS command)
CHARTSIZE and IMAGEROOT Keywords (OMS command)
IMAGEMAP Keyword (OMS command)
TREEFORMAT Keyword (OMS command)
CHARTFORMAT Keyword (OMS command)
MODELFORMAT Keyword (OMS command)
TABLES Keyword (OMS command)
OUTFILE Keyword (OMS command)
OUTPUTSET Keyword (OMS command)
FOLDER Keyword (OMS command)
VIEWER Keyword (OMS command)


OUTPUTSET Keyword (OMS command)

OUTPUTSET is an alternative to OUTFILE that allows you to route each output object to a separate file. The keyword must be followed by an equals sign (=) and one of the following alternatives:

LABELS | Output file names based on output object label text. Label text is the text that appears in the outline pane of the Viewer. See the topic LABELS Keyword (OMS command) for more information.
SUBTYPES | Output file names based on subtype identifiers. Subtypes apply only to tables. See the topic SUBTYPES Keyword (OMS command) for more information.

Example

OMS
 /SELECT TABLES
 /DESTINATION FORMAT = OXML OUTPUTSET = SUBTYPES.

• OUTPUTSET will not overwrite existing files. If a specified file name already exists, an underscore and a sequential integer will be appended to the file name.

Related Topics

DESTINATION Subcommand (OMS command)
FORMAT Keyword (OMS command)
NUMBERED Keyword (OMS command)
IMAGES and IMAGEFORMAT Keywords (OMS command)
CHARTSIZE and IMAGEROOT Keywords (OMS command)
IMAGEMAP Keyword (OMS command)
TREEFORMAT Keyword (OMS command)
CHARTFORMAT Keyword (OMS command)
MODELFORMAT Keyword (OMS command)
TABLES Keyword (OMS command)
OUTFILE Keyword (OMS command)
XMLWORKSPACE Keyword
FOLDER Keyword (OMS command)
VIEWER Keyword (OMS command)


FOLDER Keyword (OMS command)

With OUTPUTSET, you can also use the FOLDER keyword to specify the location for the routed output. Since you may not know what is considered to be the "current" directory, it's probably a good idea to explicitly specify the location. The keyword must be followed by an equals sign (=) and a valid location specification in quotes.

Example

OMS
 /SELECT TABLES
 /IF SUBTYPES = ['Frequencies' 'Descriptive Statistics']
 /DESTINATION FORMAT = OXML OUTPUTSET = SUBTYPES
  FOLDER = '/maindir/nextdir/newdir'.

• If the last folder (directory) specified on the path does not exist, it will be created.

• If any folders prior to the last folder on the path do not already exist, the specification is invalid, resulting in an error.

Related Topics

DESTINATION Subcommand (OMS command)
FORMAT Keyword (OMS command)
NUMBERED Keyword (OMS command)
IMAGES and IMAGEFORMAT Keywords (OMS command)
CHARTSIZE and IMAGEROOT Keywords (OMS command)
IMAGEMAP Keyword (OMS command)
TREEFORMAT Keyword (OMS command)
CHARTFORMAT Keyword (OMS command)
MODELFORMAT Keyword (OMS command)
TABLES Keyword (OMS command)
OUTFILE Keyword (OMS command)
XMLWORKSPACE Keyword
OUTPUTSET Keyword (OMS command)
VIEWER Keyword (OMS command)


VIEWER Keyword (OMS command)

By default, output is displayed in the Viewer as well as being routed to other formats and destinations specified with the FORMAT keyword. You can use VIEWER = NO to suppress the Viewer display of output for the specified output types. The VIEWER keyword can be used without the FORMAT keyword (and associated OUTFILE or OUPUTSET keywords) to simply control what output is displayed in the Viewer.

Example

OMS
 /SELECT TABLES
 /IF SUBTYPES = ['Correlations*']
 /DESTINATION FORMAT SAV OUTFILE = '/mydir/myfile.sav'
  VIEWER = NO.
OMS
 /SELECT TABLES
 /IF SUBTYPES = ['NOTES']
 /DESTINATION VIEWER = NO.

• The first OMS command will route tables with subtype names that start with "Correlation" to data file in PASW Statistics format and will not display those tables in the Viewer. All other output will be displayed in the Viewer

• The second OMS command simply suppresses the Viewer display of all Notes tables, without routing the Notes table output anywhere else.

Note: The VIEWER keyword has no effect on OMS output saved to external formats or files, including the Viewer SPV and SPW formats. It also has no effect on output saved to SPV format in a batch job executed with the Batch Facility (available with PASW Statistics Server).

Related Topics

DESTINATION Subcommand (OMS command)
FORMAT Keyword (OMS command)
NUMBERED Keyword (OMS command)
IMAGES and IMAGEFORMAT Keywords (OMS command)
CHARTSIZE and IMAGEROOT Keywords (OMS command)
IMAGEMAP Keyword (OMS command)
TREEFORMAT Keyword (OMS command)
CHARTFORMAT Keyword (OMS command)
MODELFORMAT Keyword (OMS command)
TABLES Keyword (OMS command)
OUTFILE Keyword (OMS command)
XMLWORKSPACE Keyword
OUTPUTSET Keyword (OMS command)
FOLDER Keyword (OMS command)


COLUMNS Subcommand (OMS command)

OMS (command),OMS (command),OMS (command)
COLUMNS subcommand,COLUMNS subcommand,COLUMNS subcommand
COLUMNS (subcommand),COLUMNS (subcommand),COLUMNS (subcommand)
OMS command,OMS command,OMS command

You can use the COLUMNS subcommand to specify the dimension elements that should appear in the columns. All other dimension elements appear in the rows.

• This subcommand applies only to tables that would be displayed as pivot tables in the Viewer and is ignored without warning if the OMS command does not include any tables.

• With DESTINATION FORMAT = SAV, columns become variables in the data file. If you specify multiple dimension elements on the COLUMNS subcommand, then variable names will be constructed by combining nested element and column labels. See the topic Routing Output to SAV Files (OMS command) for more information.

• The COLUMNS subcommand has no effect on pivot tables displayed in the Viewer.

• If you specify multiple dimension elements, they are nested in the columns in the order in which they are listed on the COLUMNS subcommand. For example: COLUMNS DIMNAMES=['Variables' 'Statistics'] will nest statistics within variables in the columns.

• If a table doesn't contain any of the dimension elements listed, then all dimension elements for that table will appear in the rows.

Related Topics

OMS
Overview (OMS command)
Basic Operation (OMS command)
SELECT Subcommand (OMS command)
IF Subcommand (OMS command)
EXCEPTIF Subcommand (OMS command)
DESTINATION Subcommand (OMS command)
TAG Subcommand (OMS command)
NOWARN Subcommand (OMS command)
Routing Output to SAV Files (OMS command)
OXML Table Structure (OMS command)
Command and Subtype Identifiers (OMS command)
DIMNAMES Keyword (OMS command)
SEQUENCE Keyword (OMS command)


DIMNAMES Keyword (OMS command)

The COLUMNS subcommand must be followed by either the DIMNAMES or SEQUENCE keyword. Each dimension of a table may contain zero or more elements. For example, a simple two-dimensional crosstabulation contains a single row dimension element and a single column dimension element, each with labels based on the variables in those dimensions, plus a single layer dimension element labeled Statistics (if English is the output language). These element labels may vary based on the output language (SET OLANG) and/or settings that affect the display of variable names and/or labels in tables (SET TVARS). The keyword DIMNAMES must be followed by an equals sign (=) and a list of quoted dimension element labels enclosed in square brackets.

Example

OMS
 /SELECT TABLES
 /IF COMMANDS = ['Correlations' 'Frequencies']
 /DESTINATION FORMAT = SAV OUTPUTSET = SUBTYPES
 /COLUMNS DIMNAMES = ['Statistics'].

The labels associated with the dimension elements may not always be obvious. To see all the dimension elements and their labels for a particular pivot table:

Activate (double-click) the table in the Viewer.

From the menus choose View > Show All.

and/or

If the pivoting trays aren't displayed, from the menus choose Pivot > Pivoting Trays.

Hover over each icon in the pivoting trays for a ToolTip pop-up that displays the label.

Displaying table dimension element labels

Related Topics

COLUMNS Subcommand (OMS command)
SEQUENCE Keyword (OMS command)


SEQUENCE Keyword (OMS command)

SEQUENCE is an alternative to DIMNAMES that uses positional arguments. These positional arguments do not vary based on output language or output display settings. The SEQUENCE keyword must be followed by an equals sign (=) and a list of positional arguments enclosed in square brackets.

• The general form of a positional argument is a letter indicating the default position of the element--C for column, R for row, or L for layer--followed by a positive integer indicating the default position within that dimension. For example, R1 would indicate the outermost row dimension element.

• A letter indicating the default dimension followed by ALL indicates all elements in that dimension in their default order. For example, RALL would indicate all row dimension elements, and CALL by itself would be unnecessary since it would not alter the default arrangement of the table. ALL cannot be combined with positional sequence numbers in the same dimension.

• SEQUENCE=[CALL RALL LALL] will put all dimension elements in the columns. With FORMAT=SAV, this will result in one case per table in the data file.

Example

OMS
 /SELECT TABLES
 /IF COMMANDS = ['Regression'] SUBTYPES = ['Coefficient Correlations']
 /DESTINATION FORMAT = SAV OUTFILE = '/mydir/myfile.sav'
 /COLUMNS SEQUENCE = [R1 R2].
Positional arguments for dimension elements

Related Topics

COLUMNS Subcommand (OMS command)
DIMNAMES Keyword (OMS command)


TAG Subcommand (OMS command)

OMS (command),OMS (command),OMS (command)
TAG subcommand,TAG subcommand,TAG subcommand
TAG (subcommand),TAG (subcommand),TAG (subcommand)
OMS command,OMS command,OMS command

OMS commands remain in effect until the end of the session or until you explicitly end them with the OMSEND command, and you can have multiple OMS commands in effect at the same time. You can use the TAG subcommand to assign an ID value to each OMS command, which allows you to selectively end particular OMS commands with a corresponding TAG keyword on the OMSEND command. The ID values assigned on the TAG subcommand are also used to identify OMS commands in the log created by the OMSLOG command.

Example

OMS
 /DESTINATION FORMAT = OXML OUTFILE = '/mydir/myfile.xml'
 /TAG = 'oxmlout'.

• The TAG subcommand must be followed by an equals sign (=) and a quoted ID value.

• The ID value cannot start with a dollar sign.

• Multiple active OMS commands cannot use the same TAG value.

See OMSEND and OMSLOG for more information.

Related Topics

OMS
Overview (OMS command)
Basic Operation (OMS command)
SELECT Subcommand (OMS command)
IF Subcommand (OMS command)
EXCEPTIF Subcommand (OMS command)
DESTINATION Subcommand (OMS command)
COLUMNS Subcommand (OMS command)
NOWARN Subcommand (OMS command)
Routing Output to SAV Files (OMS command)
OXML Table Structure (OMS command)
Command and Subtype Identifiers (OMS command)


NOWARN Subcommand (OMS command)

OMS (command),OMS (command),OMS (command)
NOWARN subcommand,NOWARN subcommand,NOWARN subcommand
NOWARN (subcommand),NOWARN (subcommand),NOWARN (subcommand)
OMS command,OMS command,OMS command

The NOWARN subcommand suppresses all warnings from OMS. The NOWARN subcommand applies only to the current OMS command. It has no additional specifications.

Related Topics

OMS
Overview (OMS command)
Basic Operation (OMS command)
SELECT Subcommand (OMS command)
IF Subcommand (OMS command)
EXCEPTIF Subcommand (OMS command)
DESTINATION Subcommand (OMS command)
COLUMNS Subcommand (OMS command)
TAG Subcommand (OMS command)
Routing Output to SAV Files (OMS command)
OXML Table Structure (OMS command)
Command and Subtype Identifiers (OMS command)


Routing Output to SAV Files (OMS command)

exporting output,exporting output,exporting output
SAV format,SAV format,SAV format
data files,data files,data files
saving output as data files,saving output as data files,saving output as data files

PASW Statistics data files consist of variables in the columns and cases in the rows, and that's essentially how pivot tables are converted to data files:

• Columns in the table are variables in the data file. Valid variable names are constructed from the column labels.

• Row labels in the table become variables with generic variable names (Var1, Var2, Var3...) in the data file. The values of these variables are the row labels in the table.

• Three table-identifier variables are automatically included in the data file: Command_, Subtype_, and Label_. All three are string variables. The first two are the command and subtype identifiers. Label_ contains the table title text.

• Rows in the table become cases in the data file.

Related Topics

OMS
Overview (OMS command)
Basic Operation (OMS command)
SELECT Subcommand (OMS command)
IF Subcommand (OMS command)
EXCEPTIF Subcommand (OMS command)
DESTINATION Subcommand (OMS command)
COLUMNS Subcommand (OMS command)
TAG Subcommand (OMS command)
NOWARN Subcommand (OMS command)
OXML Table Structure (OMS command)
Command and Subtype Identifiers (OMS command)
Data File Created from One Table (OMS command)
Data Files Created from Multiple Tables (OMS command)
Data Files Not Created from Multiple Tables (OMS command)
Controlling Column Elements to Control Variables in the Data File (OMS command)
Variable Names (OMS command)


Data File Created from One Table (OMS command)

Data files can be created from one or more tables. There are two basic variations for data files created from a single table:

• Data file created from a two-dimensional table with no layers.

• Data file created from a three-dimension table with one or more layers.

Example

In the simplest case--a single, two-dimensional table--the table columns become variables and the rows become cases in data file.

Single two-dimensional table

• The first three variables identify the source table by command, subtype, and label.

• The two elements that defined the rows in the table--values of the variable Gender and statistical measures--are assigned the generic variable names Var1 and Var2. These are both string variables.

• The column labels from the table are used to create valid variable names. In this case, those variable names are based on the variable labels of the three scale variables summarized in the table. If the variables didn't have defined variable labels or you chose to display variable names instead of variable labels as the column labels in the table, then the variable names in the new data file would be the same as in the source data file.

Example

If the default table display places one or more elements in layers, additional variables are created to identify the layer values.

Table with layers

• In the table, the variable labeled Minority Classification defines the layers. In the data file, this creates two additional variables: one that identifies the layer element, and one that identifies the categories of the layer element.

• As with the variables created from the row elements, the variables created from the layer elements are string variables with generic variable names (the prefix Var followed by a sequential number).

Related Topics

Routing Output to SAV Files (OMS command)
Data Files Created from Multiple Tables (OMS command)
Data Files Not Created from Multiple Tables (OMS command)
Controlling Column Elements to Control Variables in the Data File (OMS command)
Variable Names (OMS command)


Data Files Created from Multiple Tables (OMS command)

When multiple tables are routed to the same data file, each table is added to the data file in a fashion similar to the ADD FILES command.

• Each subsequent table will always add cases to the data file.

• If column labels in the tables differ, each table may also add variables to the data file, with missing values for cases from other tables that don't have an identically labeled column.

Example

Multiple tables that contain the same column labels will typically produce the most immediately useful data files (data files that don't require additional manipulation).

Multiple tables with the same column labels

• The second table contributes additional cases (rows) to the data file but no new variables because the column labels are exactly the same; so there are no large patches of missing data.

• Although the values for Command_ and Subtype_ are the same, the Label_ value identifies the source table for each group of cases because the two frequency tables have different titles.

Example

A new variable is created in the data file for each unique column label in the tables routed to the data file, which will result in blocks of missing values if the tables contain different column labels.

Multiple tables with different column labels

• The first table has columns labeled Beginning Salary and Current Salary, which are not present in the second table, resulting in missing values for those variables for cases from the second table.

• Conversely, the second table has columns labeled Education level and Months since hire, which are not present in the first table, resulting in missing values for those variables for cases from the first table.

• Mismatched variables, such as those in this example, can occur even with tables of the same subtype. In fact, in this example, both tables are of the same subtype.

Related Topics

Routing Output to SAV Files (OMS command)
Data File Created from One Table (OMS command)
Data Files Not Created from Multiple Tables (OMS command)
Controlling Column Elements to Control Variables in the Data File (OMS command)
Variable Names (OMS command)


Data Files Not Created from Multiple Tables (OMS command)

If any tables do not have the same number of row elements as the other tables, no data file will be created. The number of rows doesn't have to be the same; the number of row elements that become variables in the data file must be the same.

For example, a two-variable crosstabulation and a three-variable crosstabulation from CROSSTABS contain different numbers of row elements, since the "layer" variable is actually nested within the row variable in the default three-variable crosstabulation display.

Tables with different numbers of row elements

In general, the less specific the subtype selection in the OMS command, the less likely you are to get sensible data files, or any data files at all. For example:

OMS /SELECT TABLES /DESTINATION FORMAT=SAV OUTFILE='mydata.sav'.

will probably fail to create a data file more often than not, since it will select all tables, including Notes tables, which have a table structure that is incompatible with most other table types.

Related Topics

Routing Output to SAV Files (OMS command)
Data File Created from One Table (OMS command)
Data Files Created from Multiple Tables (OMS command)
Controlling Column Elements to Control Variables in the Data File (OMS command)
Variable Names (OMS command)


Controlling Column Elements to Control Variables in the Data File (OMS command)

You can use the COLUMNS subcommand to specify which dimension elements should be in the columns and therefore are used to create variables in the generated data file. This is equivalent to pivoting the table in the Viewer.

Example

The DESCRIPTIVES command produces a table of descriptive statistics with variables in the rows and statistics in the columns. A data file created from that table would therefore use the statistics as variables and the original variables as cases. If you want the original variables to be variables in the generated data file and the statistics to be cases:

OMS
  /SELECT TABLES
  /IF COMMANDS=['Descriptives'] SUBTYPES=['Descriptive Statistics']
  /DESTINATION FORMAT=SAV OUTFILE='/temp/temp.sav'
  /COLUMNS DIMNAMES=['Variables'].
DESCRIPTIVES VARIABLES=salary salbegin.
OMSEND.

• When you use the COLUMNS subcommand, any dimension elements not listed on the subcommand will become rows (cases) in the generated data file.

• Since the descriptive statistics table has only two dimension elements, the syntax COLUMNS DIMNAMES=['Variables'] will put the variables in the columns and will put the statistics in the row. So this is equivalent to swapping the positions of the original row and column elements.

Default and pivoted table and generated data file

Example

The FREQUENCIES command produces a descriptive statistics table with statistics in the rows, while the DESCRIPTIVES command produces a descriptive statistics table with statistics in the columns. To include both table types in the same data file in a meaningful fashion, you need to change the column dimension for one of them.

OMS
  /SELECT TABLES
  /IF COMMANDS=['Frequencies' 'Descriptives']
   SUBTYPES=['Statistics' 'Descriptive Statistics']
  /DESTINATION FORMAT=SAV OUTFILE='/temp/temp.sav'
  /COLUMNS DIMNAMES=['Statistics'].
FREQUENCIES
  VARIABLES=salbegin salary
  /FORMAT=NOTABLE
  /STATISTICS=MINIMUM MAXIMUM MEAN.
DESCRIPTIVES
  VARIABLES=jobtime prevexp
  /STATISTICS=MEAN MIN MAX.
OMSEND.

• The COLUMNS subcommand will be applied to all selected table types that have a Statistics dimension element.

• Both table types have a Statistics dimension element, but since it's already in the column dimension for the table produced by the DESCRIPTIVES command, the COLUMNS subcommand has no effect on the structure of the data from that table type.

• For the FREQUENCIES statistics table, COLUMNS DIMNAMES=['Statistics'] is equivalent to pivoting the Statistics dimension element into the columns and pivoting the Variables dimension element into the rows.

• Some of the variables will have missing values, since the table structures still aren't exactly the same with statistics in the columns.

Combining different table types in same data file

Related Topics

Routing Output to SAV Files (OMS command)
Data File Created from One Table (OMS command)
Data Files Created from Multiple Tables (OMS command)
Data Files Not Created from Multiple Tables (OMS command)
Variable Names (OMS command)


Variable Names (OMS command)

variable names,variable names,variable names
OMS command,OMS command,OMS command

OMS constructs valid, unique variable names from column labels.

• Row and layer elements are assigned generic variable names: the prefix Var followed by a sequential number.

• Characters that aren't allowed in variable names, such as spaces and parentheses, are removed. For example, "This (Column) Label" would become a variable named ThisColumnLabel.

• If the label begins with a character that is allowed in variable names but not allowed as the first character (for example, a number), "@" is inserted as a prefix. For example "2nd" would become a variable named @2nd.

• Underscores or periods at the end of labels are removed from the resulting variable names. (The underscores at the end of the automatically generated variables Command_, Subtype_, and Label_ are not removed.)

• If more than one element is in the column dimension, variable names are constructed by combining category labels with underscores between category labels. Group labels are not included. For example, if VarB is nested under VarA in the columns, you would get variables like CatA1_CatB1, not VarA_CatA1_VarB_CatB1.

Variable names in SAV files

Related Topics

Routing Output to SAV Files (OMS command)
Data File Created from One Table (OMS command)
Data Files Created from Multiple Tables (OMS command)
Data Files Not Created from Multiple Tables (OMS command)
Controlling Column Elements to Control Variables in the Data File (OMS command)


OXML Table Structure (OMS command)

exporting output,exporting output,exporting output
XML format,XML format,XML format
XML,XML,XML
saving output as XML,saving output as XML,saving output as XML

OXML is XML that conforms to the spss-output schema. An overview of the schema is provided in Output XML Schema.A complete list of all the schema elements, attributes, attribute values, data types, parent/child relationships, etc. is provided in Output Schema Specifications.

• OMS command and subtype identifiers are used as values of the command and subType attributes in OXML. For example:

<command text="Frequencies" command="Frequencies"...>
  <pivotTable text="Gender" label="Gender" subType="Frequencies"...>

These attribute values are not affected by output language (SET OLANG) or display settings for variable names/labels or values/value labels (SET TVARS and SET TNUMBERS).

• XML is case-sensitive. The element name pivotTable is considered a different element from one named "pivottable" or "Pivottable" (the latter two don't exist in OXML).

• Command and subtype identifiers generated by the OMS Control Panel or the OMS Identifiers dialog box (both on the Utilities menu) use the same case as that used for values of the command and subType OXML attributes.

• All of the information displayed in a table is contained in attribute values in OXML. At the individual cell level, OXML consists of "empty" elements that contain attributes but no "content" other than that contained in attribute values.

• Table structure in OXML is represented row by row; elements that represent columns are nested within the rows, and individual cells are nested within the column elements:

<pivotTable...>
 <dimension axis="row"...>
   <dimension axis="column"...>
    <category...>
     <cell text="..." number="..." decimals="..."/>
    </category>
   <category...>
    <cell text="..." number="..." decimals="..."/>
   </category>
  </dimension>
 </dimension>
  ...
</pivotTable>

The preceding example is a simplified representation of the structure that shows the descendant/ancestor relationships of these elements, but not necessarily the parent/child relationships, because there are typically intervening nested element levels. The following figures show a simple table as displayed in the Viewer and the OXML that represents that table.

Simple frequency table
OXML for simple frequency table
<?xml version="1.0" encoding="UTF-8" ?>
<outputTree>
 <command text="Frequencies" command="Frequencies"
  displayTableValues="label" displayOutlineValues="label"
  displayTableVariables="label" displayOutlineVariables="label">
  <pivotTable text="Gender" label="Gender" subType="Frequencies"
   varName="gender" variable="true">
   <dimension axis="row" text="Gender" label="Gender"
    varName="gender" variable="true">
    <group text="Valid">
     <group hide="true" text="Dummy">
      <category text="Female" label="Female" string="f"
       varName="gender">
       <dimension axis="column" text="Statistics">
        <category text="Frequency">
         <cell text="216" number="216"/>
        </category>
        <category text="Percent">
         <cell text="45.6" number="45.569620253165" decimals="1"/>
        </category>
        <category text="Valid Percent">
         <cell text="45.6" number="45.569620253165" decimals="1"/>
        </category>
        <category text="Cumulative Percent">
         <cell text="45.6" number="45.569620253165" decimals="1"/>
        </category>
       </dimension>
      </category>
      <category text="Male" label="Male" string="m" varName="gender">
       <dimension axis="column" text="Statistics">
        <category text="Frequency">
         <cell text="258" number="258"/>
        </category>
        <category text="Percent">
         <cell text="54.4" number="54.430379746835" decimals="1"/>
        </category>
        <category text="Valid Percent">
         <cell text="54.4" number="54.430379746835" decimals="1"/>
        </category>
        <category text="Cumulative Percent">
         <cell text="100.0" number="100" decimals="1"/>
        </category>
       </dimension>
      </category>
     </group>
     <category text="Total">
      <dimension axis="column" text="Statistics">
       <category text="Frequency">
        <cell text="474" number="474"/>
       </category>
       <category text="Percent">
        <cell text="100.0" number="100" decimals="1"/>
       </category>
       <category text="Valid Percent">
        <cell text="100.0" number="100" decimals="1"/>
       </category>
      </dimension>
     </category>
    </group>
   </dimension>
  </pivotTable>
 </command>
</outputTree>

As you may notice, a simple, small table produces a substantial amount of XML. That's partly because the XML contains some information not readily apparent in the original table, some information that might not even be available in the original table, and a certain amount of redundancy.

• The table contents as they are (or would be) displayed in a pivot table in the Viewer are contained in text attributes. For example:

<command text="Frequencies" command="Frequencies"...>

These text attributes can be affected by both output language (SET OLANG) and settings that affect the display of variable names/labels and values/value labels (SET TVARS and SET TNUMBERS). In this example, the text attribute value will differ depending on the output language, whereas the command attribute value remains the same regardless of output language.

• Wherever variables or values of variables are used in row or column labels, the XML will contain a text attribute and one or more additional attribute values. For example:

<dimension axis="row" text="Gender" label="Gender" varName="gender">
 ...
  <category text="Female"label="Female" string="f" varName="gender">

For a numeric variable, there would be a number attribute instead of a string attribute. The label attribute is present only if the variable or values have defined labels.

• The <cell> elements that contain cell values for numbers will contain the text attribute and one or more additional attribute values. For example:

<cell text="45.6" number="45.569620253165" decimals="1"/>

The number attribute is the actual, unrounded numeric value, and the decimals attribute indicates the number of decimal positions displayed in the table.

• Since columns are nested within rows, the category element that identifies each column is repeated for each row. For example, since the statistics are displayed in the columns, the element <category text="Frequency"> appears three times in the XML—once for the male row, once for the female row, and once for the total row.

Examples of using XSLT to transform OXML are provided in the Help system.

Related Topics

OMS
Overview (OMS command)
Basic Operation (OMS command)
SELECT Subcommand (OMS command)
IF Subcommand (OMS command)
EXCEPTIF Subcommand (OMS command)
DESTINATION Subcommand (OMS command)
COLUMNS Subcommand (OMS command)
TAG Subcommand (OMS command)
NOWARN Subcommand (OMS command)
Routing Output to SAV Files (OMS command)
Command and Subtype Identifiers (OMS command)


Command and Subtype Identifiers (OMS command)

The OMS Control Panel (Utilities menu) provides a complete list of command and subtype identifiers. For any command or table displayed in the Viewer, you can find out the command or subtype identifier by right-clicking the item in the Viewer outline pane.

Related Topics

OMS
Overview (OMS command)
Basic Operation (OMS command)
SELECT Subcommand (OMS command)
IF Subcommand (OMS command)
EXCEPTIF Subcommand (OMS command)
DESTINATION Subcommand (OMS command)
COLUMNS Subcommand (OMS command)
TAG Subcommand (OMS command)
NOWARN Subcommand (OMS command)
Routing Output to SAV Files (OMS command)
OXML Table Structure (OMS command)


OMSEND

OMSEND (command),OMSEND (command),OMSEND (command)
OMSEND (command),OMSEND (command),OMSEND (command)
command syntax,command syntax,command syntax

Note: Square brackets used in the OMSEND syntax chart are required parts of the syntax and are not used to indicate optional elements. Any equals signs (=) displayed in the syntax chart are required. All specifications other than the command name OMSEND are optional.

OMSEND
 TAG = {[’idvalue’ ’idvalue’...]}
       {ALL                     }
 FILE = [’filespec’ ’filespec’...]
 LOG

This command takes effect immediately. It does not read the active dataset or execute pending transformations. See the topic Command Order for more information.

Syntax for the OMSEND command can be generated from the Output Management System Control Panel dialog.

Example

OMS
 /DESTINATION FORMAT = OXML OUTFILE = ’/mydir/myfile.xml’.
[some commands that produce output]
OMSEND.
[some more commands that produce output]

Related Topics

Overview (OMSEND command)
TAG Keyword (OMSEND command)
FILE Keyword (OMSEND command)
LOG Keyword (OMSEND command)
OMS
OMSINFO
OMSLOG


Overview (OMSEND command)

OMSEND ends active OMS commands. The minimum specification is the command name OMSEND. In the absence of any other specifications, this ends all active OMS commands and logging.

Related Topics

OMSEND
TAG Keyword (OMSEND command)
FILE Keyword (OMSEND command)
LOG Keyword (OMSEND command)


TAG Keyword (OMSEND command)

The optional TAG keyword identifies specific OMS commands to end, based on the ID value assigned on the OMS TAG subcommand or automatically generated if there is no TAG subcommand. To display the automatically generated ID values for active OMS commands, use the OMSINFO command

The TAG keyword must be followed by an equals sign (=) and a list of quoted ID values or the keyword ALL enclosed in square brackets.

Example

OMSEND TAG = ['reg_tables_to_sav' 'freq_tables_to_html'].

A warning is issued if any of the specified values don’t match any active OMS commands.

Related Topics

OMSEND
Overview (OMSEND command)
FILE Keyword (OMSEND command)
LOG Keyword (OMSEND command)


FILE Keyword (OMSEND command)

The optional FILE keyword ends specific OMS commands based on the filename specified with the OUTFILE keyword of the DESTINATION subcommand of the OMS command. The FILE keyword must be followed by an equals sign (=), and a list of quoted file specifications must be enclosed in square brackets.

Example

OMSEND
 FILE = ['/mydir/mysavfile.sav' '/otherdir/myhtmlfile.htm'].

• If the specified file doesn’t exist or isn’t associated with a currently running OMS command, a warning is issued.

• The FILE keyword specification has no effect on OMS commands that use OUTPUTSET instead of OUTFILE.

Related Topics

OMSEND
Overview (OMSEND command)
TAG Keyword (OMSEND command)
LOG Keyword (OMSEND command)


LOG Keyword (OMSEND command)

IF OMS logging is in effect (OMSLOG command), the LOG keyword ends logging.

Examples

OMSEND LOG.

In this example, the OMSEND command ends logging without ending any active OMS commands.

Related Topics

OMSEND
Overview (OMSEND command)
TAG Keyword (OMSEND command)
FILE Keyword (OMSEND command)


OMSINFO

OMSINFO (command),OMSINFO (command),OMSINFO (command)
OMSINFO (command),OMSINFO (command),OMSINFO (command)
syntax chart,syntax chart,syntax chart
OMSINFO.

This command takes effect immediately. It does not read the active dataset or execute pending transformations. See the topic Command Order for more information.

Example

OMSINFO.

Related Topics

Overview (OMSINFO command)
OMS
OMSEND
OMSLOG


Overview (OMSINFO command)

The OMSINFO command displays a table of all active OMS commands It has no additional specifications.

Related Topics

OMSINFO


OMSLOG

OMSLOG (command),OMSLOG (command),OMSLOG (command)
OMSLOG (command),OMSLOG (command),OMSLOG (command)
syntax chart,syntax chart,syntax chart
OMSLOG FILE = 'filespec'
 [/APPEND = [NO ]]
            [YES]
 [/FORMAT = [XML ]]
            [TEXT]

This command takes effect immediately. It does not read the active dataset or execute pending transformations. See the topic Command Order for more information.

Syntax for the OMSLOG command can be generated from the Output Management System Control Panel dialog.

Example

OMSLOG FILE = '/mydir/mylog.xml'.

Related Topics

Overview (OMSLOG command)
FILE Subcommand (OMSLOG command)
APPEND Subcommand (OMSLOG command)
FORMAT Subcommand (OMSLOG command)
OMS
OMSINFO
OMSEND


Overview (OMSLOG command)

OMSLOG creates a log file in either XML or text form for subsequent OMS commands during a session.

• The log contains one line or main XML element for each destination file and contains the event name, filename, and location, the ID tag value, and a timestamp. The log also contains an entry when an OMS command is started and stopped.

• The log file remains open, and OMS activity is appended to the log, unless logging is turned off by an OMSEND command or the end of the session.

• A subsequent OMSLOG command that specifies a different log file ends logging to the file specified on the previous OMSLOG command.

• A subsequent OMSLOG file that specifies the same log file will overwrite the current log file for the default FORMAT = XML or in the absence of APPEND = YES for FORMAT = TEXT.

• OMS activity for any OMS commands executed before the first OMSLOG command in the session is not recorded in any log file.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is the command name OMSLOG followed by a FILE subcommand that specifies the log filename and location.

Syntax Rules Collapse Hide details

Syntax Rules

• The FILE subcommand is required. All other specifications are optional.

• Equals signs (=) shown in the command syntax chart and examples are required, not optional.

Related Topics

OMSLOG
FILE Subcommand (OMSLOG command)
APPEND Subcommand (OMSLOG command)
FORMAT Subcommand (OMSLOG command)


FILE Subcommand (OMSLOG command)

The FILE subcommand specifies the log filename and location. The subcommand name must be followed by an equals sign (=) and a file specification in quotes. If the file specification includes location information (drive, directory/folder), the location must be a valid, existing location; otherwise an error will result.

Example

OMSLOG FILE = '/mydir/mylog.xml'.

Related Topics

OMSLOG
Overview (OMSLOG command)
APPEND Subcommand (OMSLOG command)
FORMAT Subcommand (OMSLOG command)


APPEND Subcommand (OMSLOG command)

If the FILE subcommand specifies an existing file, by default the file is overwritten. For text format log files, you can use the APPEND subcommand to append new logging information to the file instead of overwriting.

Example

OMSLOG FILE = '/mydir/mylog.txt'
  /APPEND = YES
  /FORMAT = TEXT.

• APPEND = YES is only valid with FORMAT = TEXT. For XML log files, the APPEND subcommand is ignored.

• APPEND = YES with FORMAT = TEXT will append to an existing file, even if the existing file contains XML-format log information. (An XML file is a text file, and OMSLOG does not differentiate based on file extension or content.)

• If the specified file does not exist, APPEND has no effect.

Related Topics

OMSLOG
Overview (OMSLOG command)
FILE Subcommand (OMSLOG command)
FORMAT Subcommand (OMSLOG command)


FORMAT Subcommand (OMSLOG command)

The FORMAT subcommand specifies the format of the log file. The default format is XML. You can use FORMAT = TEXT to write the log in simple text format.

Related Topics

OMSLOG
Overview (OMSLOG command)
FILE Subcommand (OMSLOG command)
APPEND Subcommand (OMSLOG command)


ONEWAY

ONEWAY (command),ONEWAY (command),ONEWAY (command)
ONEWAY (command),ONEWAY (command),ONEWAY (command)
syntax chart,syntax chart,syntax chart

ONEWAY is available in the Statistics Base option.

ONEWAY  varlist BY varname

 [/POLYNOMIAL=n]  [/CONTRAST=coefficient list] [/CONTRAST=... ]

 [/POSTHOC=([SNK] [TUKEY] [BTUKEY] [DUNCAN] [SCHEFFE] [DUNNETT[refcat)]
            [DUNNETTL(refcat)] [DUNNETTR(refcat)] [BONFERRONI] [LSD]
            [SIDAK] [GT2] [GABRIEL] [FREGW] [QREGW] [T2] [T3] [GH] [C]
            [WALLER({100** })]) [ALPHA({0.05**})]
                    {Kratio}           {α     }

 [/RANGES={LSD         }([{0.05**}])] [/RANGES=...]
          {DUNCAN      }  {α     }
          {SNK         }
          {TUKEYB      }
          {TUKEY       }
          {MODLSD      }
          {SCHEFFE     }

 [/STATISTICS=[NONE**] [DESCRIPTIVES]  [EFFECTS]  [HOMOGENEITY]  [ALL]  ]
              [WELCH] [BROWNFORSYTHE]

 [/PLOT MEANS ]

 [/MISSING=[{ANALYSIS**}]  [{EXCLUDE**}] ]
            {LISTWISE  }    {INCLUDE  }

 [/MATRIX =[IN({*                  })] [OUT({*                  })]  [NONE] ]
               {'savfile'|'dataset'}        {'savfile'|'dataset'}

**Default if the subcommand is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See ONEWAY Algorithms for computational details for this procedure.

Syntax for the ONEWAY command can be generated from the One-Way ANOVA dialog.

Example

ONEWAY V1 BY V2.

Related Topics

Overview (ONEWAY command)
Example (ONEWAY command)
Analysis List (ONEWAY command)
POLYNOMIAL Subcommand (ONEWAY command)
CONTRAST Subcommand (ONEWAY command)
POSTHOC Subcommand (ONEWAY command)
RANGES Subcommand (ONEWAY command)
PLOT MEANS Subcommand (ONEWAY command)
STATISTICS Subcommand (ONEWAY command)
MISSING Subcommand (ONEWAY command)
MATRIX Subcommand (ONEWAY command)
Matrix Output (ONEWAY command)
References (ONEWAY command)


Overview (ONEWAY command)

ONEWAY produces a one-way analysis of variance for an interval-level dependent variable by one numeric independent variable that defines the groups for the analysis. Other procedures that perform an analysis of variance are SUMMARIZE, UNIANOVA, and GLM (GLM is available in the Advanced Statistics option). Some tests not included in the other procedures are available as options in ONEWAY.

Options Collapse Hide details

Options

Trend and Contrasts. You can partition the between-groups sums of squares into linear, quadratic, cubic, and higher-order trend components using the POLYNOMIAL subcommand. You can specify up to 10 contrasts to be tested with the t statistic on the CONTRAST subcommand.

Post Hoc Tests. You can specify 20 different post hoc tests for comparisons of all possible pairs of group means or multiple comparisons using the POSTHOC subcommand.

Statistical Display. In addition to the default display, you can obtain means, standard deviations, and other descriptive statistics for each group using the STATISTICS subcommand. Fixed- and random-effects statistics as well as Leven’s test for homogeneity of variance are also available.

Matrix Input and Output. You can write means, standard deviations, and category frequencies to a matrix data file that can be used in subsequent ONEWAY procedures using the MATRIX subcommand. You can also read matrix materials consisting of means, category frequencies, pooled variance, and degrees of freedom for the pooled variance.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is a dependent variable, keyword BY, and an independent variable. ONEWAY produces an ANOVA table displaying the between- and within-groups sums of squares, mean squares, degrees of freedom, the F ratio, and the probability of F for each dependent variable by the independent variable.

Subcommand Order Collapse Hide details

Subcommand Order

• The variable list must be specified first.

• The remaining subcommands can be specified in any order.

Operations Collapse Hide details

Operations

• All values of the independent variable are used. Each different value creates one category.

• If a string variable is specified as an independent or dependent variable, ONEWAY is not executed.

ONEWAY (command),ONEWAY (command),ONEWAY (command)
limitations,limitations,limitations
Limitations Collapse Hide details

Limitations

• Maximum 100 dependent variables and 1 independent variable.

• An unlimited number of categories for the independent variable. However, post hoc tests are not performed if the number of nonempty categories exceeds 50. Contrast tests are not performed if the total of empty and nonempty categories exceeds 50.

• Maximum 1 POLYNOMIAL subcommand.

• Maximum 1 POSTHOC subcommand.

• Maximum 10 CONTRAST subcommands.

Related Topics

ONEWAY
Example (ONEWAY command)
Analysis List (ONEWAY command)
POLYNOMIAL Subcommand (ONEWAY command)
CONTRAST Subcommand (ONEWAY command)
POSTHOC Subcommand (ONEWAY command)
RANGES Subcommand (ONEWAY command)
PLOT MEANS Subcommand (ONEWAY command)
STATISTICS Subcommand (ONEWAY command)
MISSING Subcommand (ONEWAY command)
MATRIX Subcommand (ONEWAY command)
Matrix Output (ONEWAY command)
References (ONEWAY command)


Example (ONEWAY command)

Testing equality of group variances

ONEWAY perform BY group
  /MISSING ANALYSIS
  /STATISTICS HOMOGENEITY.

• The procedure specifies perform as the dependent variable and group as the factor.

• STATISTICS requests the homogeneity of variance test.

• All other options are set to their default values.

For discussion of output from this syntax and to place the example in context, see Testing the Equality of Group Variances.

Related Topics

ONEWAY
Overview (ONEWAY command)
Analysis List (ONEWAY command)
POLYNOMIAL Subcommand (ONEWAY command)
CONTRAST Subcommand (ONEWAY command)
POSTHOC Subcommand (ONEWAY command)
RANGES Subcommand (ONEWAY command)
PLOT MEANS Subcommand (ONEWAY command)
STATISTICS Subcommand (ONEWAY command)
MISSING Subcommand (ONEWAY command)
MATRIX Subcommand (ONEWAY command)
Matrix Output (ONEWAY command)
References (ONEWAY command)


Analysis List (ONEWAY command)

ONEWAY (command),ONEWAY (command),ONEWAY (command)
analysis design,analysis design,analysis design
ONEWAY (command),ONEWAY (command),ONEWAY (command)
defining factor ranges,defining factor ranges,defining factor ranges
ONEWAY (command),ONEWAY (command),ONEWAY (command)
factor variables,factor variables,factor variables

The analysis list consists of a list of dependent variables, keyword BY, and an independent (grouping) variable.

• Only one analysis list is allowed, and it must be specified before any of the optional subcommands.

• All variables named must be numeric.

Related Topics

ONEWAY
Overview (ONEWAY command)
Example (ONEWAY command)
POLYNOMIAL Subcommand (ONEWAY command)
CONTRAST Subcommand (ONEWAY command)
POSTHOC Subcommand (ONEWAY command)
RANGES Subcommand (ONEWAY command)
PLOT MEANS Subcommand (ONEWAY command)
STATISTICS Subcommand (ONEWAY command)
MISSING Subcommand (ONEWAY command)
MATRIX Subcommand (ONEWAY command)
Matrix Output (ONEWAY command)
References (ONEWAY command)


POLYNOMIAL Subcommand (ONEWAY command)

ONEWAY (command),ONEWAY (command),ONEWAY (command)
orthogonal polynomials,orthogonal polynomials,orthogonal polynomials
ONEWAY (command),ONEWAY (command),ONEWAY (command)
POLYNOMIAL subcommand,POLYNOMIAL subcommand,POLYNOMIAL subcommand
POLYNOMIAL (subcommand),POLYNOMIAL (subcommand),POLYNOMIAL (subcommand)
ONEWAY command,ONEWAY command,ONEWAY command
ONEWAY (command),ONEWAY (command),ONEWAY (command)
contrasts,contrasts,contrasts
orthogonal polynomials,orthogonal polynomials,orthogonal polynomials
analysis of variance,analysis of variance,analysis of variance
contrasts,contrasts,contrasts
analysis of variance,analysis of variance,analysis of variance

POLYNOMIAL partitions the between-groups sums of squares into linear, quadratic, cubic, or higher-order trend components. The display is an expanded analysis-of-variance table that provides the degrees of freedom, sums of squares, mean square, F, and probability of F for each partition.

• The value specified on POLYNOMIAL indicates the highest-degree polynomial to be used.

• The polynomial value must be a positive integer less than or equal to 5 and less than the number of groups. If the polynomial specified is greater than the number of groups, the highest-degree polynomial possible is assumed.

• Only one POLYNOMIAL subcommand can be specified per ONEWAY command. If more than one is used, only the last one specified is in effect.

• ONEWAY computes the sums of squares for each order polynomial from weighted polynomial contrasts, using the category of the independent variable as the metric. These contrasts are orthogonal.

• With unbalanced designs and equal spacing between groups, ONEWAY also computes sums of squares using the unweighted polynomial contrasts. These contrasts are not orthogonal.

• The deviation sums of squares are always calculated from the weighted sums of squares(Speed, 1976).

Example

ONEWAY WELL BY EDUC6
  /POLYNOMIAL=2.

• ONEWAY requests an analysis of variance of WELL by EDUC6 with second-order (quadratic) polynomial contrasts.

• The ANOVA table is expanded to include both linear and quadratic terms.

Related Topics

ONEWAY
Overview (ONEWAY command)
Example (ONEWAY command)
Analysis List (ONEWAY command)
CONTRAST Subcommand (ONEWAY command)
POSTHOC Subcommand (ONEWAY command)
RANGES Subcommand (ONEWAY command)
PLOT MEANS Subcommand (ONEWAY command)
STATISTICS Subcommand (ONEWAY command)
MISSING Subcommand (ONEWAY command)
MATRIX Subcommand (ONEWAY command)
Matrix Output (ONEWAY command)
References (ONEWAY command)


CONTRAST Subcommand (ONEWAY command)

ONEWAY (command),ONEWAY (command),ONEWAY (command)
CONTRAST subcommand,CONTRAST subcommand,CONTRAST subcommand
CONTRAST (subcommand),CONTRAST (subcommand),CONTRAST (subcommand)
ONEWAY command,ONEWAY command,ONEWAY command

CONTRAST specifies a priori contrasts to be tested by the t statistic. The specification on CONTRAST is a vector of coefficients, where each coefficient corresponds to a category of the independent variable. The Contrast Coefficients table displays the specified contrasts for each group and the Contrast Tests table displays the value of the contrast and its standard error, the t statistic, and the degrees of freedom and two-tailed probability of t for each variable. Both pooled- and separate-variance estimates are displayed.

• A contrast coefficient must be specified or implied for every group defined for the independent variable. If the number of contrast values is not equal to the number of groups, the contrast test is not performed.

• The contrast coefficients for a set should sum to 0. If they do not, a warning is issued. ONEWAY will still give an estimate of this contrast.

• Coefficients are assigned to groups defined by ascending values of the independent variable.

• The notation n*c can be used to indicate that coefficient c is repeated n times.

Example

ONEWAY V1 BY V2
  /CONTRAST = -1 -1 1 1
  /CONTRAST = -1 0 0 1
  /CONTRAST = -1 0 .5 .5.

• V2 has four levels.

• The first CONTRAST subcommand contrasts the combination of the first two groups with the combination of the last two groups.

• The second CONTRAST subcommand contrasts the first group with the last group.

• The third CONTRAST subcommand contrasts the first group with the combination of the third and fourth groups.

Example

ONEWAY V1 BY V2
  /CONTRAST = -1 1 2*0
  /CONTRAST = -1 1 0 0
  /CONTRAST = -1 1.

• The first two CONTRAST subcommands specify the same contrast coefficients for a four-group analysis. The first group is contrasted with the second group in both cases.

• The first CONTRAST uses the n*c notation.

• The last CONTRAST does not work because only two coefficients are specified for four groups.

Related Topics

ONEWAY
Overview (ONEWAY command)
Example (ONEWAY command)
Analysis List (ONEWAY command)
POLYNOMIAL Subcommand (ONEWAY command)
POSTHOC Subcommand (ONEWAY command)
RANGES Subcommand (ONEWAY command)
PLOT MEANS Subcommand (ONEWAY command)
STATISTICS Subcommand (ONEWAY command)
MISSING Subcommand (ONEWAY command)
MATRIX Subcommand (ONEWAY command)
Matrix Output (ONEWAY command)
References (ONEWAY command)


POSTHOC Subcommand (ONEWAY command)

ONEWAY (command),ONEWAY (command),ONEWAY (command)
multiple comparisons,multiple comparisons,multiple comparisons
multiple comparisons,multiple comparisons,multiple comparisons
analysis of variance,analysis of variance,analysis of variance
ONEWAY (command),ONEWAY (command),ONEWAY (command)
post hoc tests,post hoc tests,post hoc tests
post hoc tests,post hoc tests,post hoc tests
ONEWAY command,ONEWAY command,ONEWAY command

POSTHOC produces post hoc tests for comparisons of all possible pairs of group means or multiple comparisons. In contrast to a priori analyses specified on the CONTRAST subcommand, post hoc analyses are usually not planned at the beginning of the study but are suggested by the data in the course of the study.

• Twenty post hoc tests are available. Some detect homogeneity subsets among the groups of means, some produce pairwise comparisons, and others perform both. POSTHOC produces a Multiple Comparison table showing up to 10 test categories. Nonempty group means are sorted in ascending order, with asterisks indicating significantly different groups. In addition, homogeneous subsets are calculated and displayed in the Homogeneous Subsets table if the test is designed to detect homogeneity subsets.

• When the number of valid cases in the groups varies, the harmonic mean of the group sizes is used as the sample size in the calculation for homogeneity subsets except for QREGW and FREGW. For QREGW and FREGW and tests for pairwise comparison, the sample sizes of individual groups are always used.

• You can specify only one POSTHOC subcommand per ONEWAY command. If more than one is specified, the last specification takes effect.

• You can specify one alpha value used in all POSTHOC tests using keyword ALPHA. The default is 0.05.

Student-Newman-Keuls,Student-Newman-Keuls,Student-Newman-Keuls
post hoc tests,post hoc tests,post hoc tests
Student-Newman-Keuls,Student-Newman-Keuls,Student-Newman-Keuls
SNK (keyword),SNK (keyword),SNK (keyword)
ONEWAY command,ONEWAY command,ONEWAY command
Tukey's honestly significant difference,Tukey's honestly significant difference,Tukey's honestly significant difference
post hoc tests,post hoc tests,post hoc tests
Tukey's honestly significant difference,Tukey's honestly significant difference,Tukey's honestly significant difference
TUKEY (keyword),TUKEY (keyword),TUKEY (keyword)
ONEWAY command,ONEWAY command,ONEWAY command
Tukey's b test,Tukey's b test,Tukey's b test
post hoc tests,post hoc tests,post hoc tests
Tukey's b test,Tukey's b test,Tukey's b test
BTUKEY (keyword),BTUKEY (keyword),BTUKEY (keyword)
ONEWAY command,ONEWAY command,ONEWAY command
DUNCAN (keyword),DUNCAN (keyword),DUNCAN (keyword)
ONEWAY command,ONEWAY command,ONEWAY command
Duncan's multiple range test,Duncan's multiple range test,Duncan's multiple range test
post hoc tests,post hoc tests,post hoc tests
Duncan's multiple comparison procedure,Duncan's multiple comparison procedure,Duncan's multiple comparison procedure
SCHEFFE (keyword),SCHEFFE (keyword),SCHEFFE (keyword)
ONEWAY command,ONEWAY command,ONEWAY command
Scheffé test,Scheffé test,Scheffé test
post hoc tests,post hoc tests,post hoc tests
Scheffé test,Scheffé test,Scheffé test
DUNNETT (keyword),DUNNETT (keyword),DUNNETT (keyword)
ONEWAY command,ONEWAY command,ONEWAY command
Dunnett's t test,Dunnett's t test,Dunnett's t test
DUNNETTL (keyword),DUNNETTL (keyword),DUNNETTL (keyword)
ONEWAY command,ONEWAY command,ONEWAY command
DUNNETTR (keyword),DUNNETTR (keyword),DUNNETTR (keyword)
ONEWAY command,ONEWAY command,ONEWAY command
Bonferroni test,Bonferroni test,Bonferroni test
post hoc tests,post hoc tests,post hoc tests
Bonferroni test,Bonferroni test,Bonferroni test
BONFERRONI (keyword),BONFERRONI (keyword),BONFERRONI (keyword)
ONEWAY command,ONEWAY command,ONEWAY command
least significant difference,least significant difference,least significant difference
post hoc tests,post hoc tests,post hoc tests
least significant difference,least significant difference,least significant difference
LSD (keyword),LSD (keyword),LSD (keyword)
ONEWAY command,ONEWAY command,ONEWAY command
Sidak's t test,Sidak's t test,Sidak's t test
post hoc tests,post hoc tests,post hoc tests
Sidak's t test,Sidak's t test,Sidak's t test
SIDAK (keyword),SIDAK (keyword),SIDAK (keyword)
ONEWAY command,ONEWAY command,ONEWAY command
Hochberg's GT2,Hochberg's GT2,Hochberg's GT2
post hoc tests,post hoc tests,post hoc tests
Hochberg's GT2,Hochberg's GT2,Hochberg's GT2
GT2 (keyword),GT2 (keyword),GT2 (keyword)
ONEWAY command,ONEWAY command,ONEWAY command
GABRIEL (keyword),GABRIEL (keyword),GABRIEL (keyword)
ONEWAY command,ONEWAY command,ONEWAY command
Gabriel's pairwise comparisons test,Gabriel's pairwise comparisons test,Gabriel's pairwise comparisons test
post hoc tests,post hoc tests,post hoc tests
Gabriel's pairwise comparisons test,Gabriel's pairwise comparisons test,Gabriel's pairwise comparisons test
Ryan-Einot-Gabriel-Welsch multiple stepdown procedure,Ryan-Einot-Gabriel-Welsch multiple stepdown procedure,Ryan-Einot-Gabriel-Welsch multiple stepdown procedure
post hoc tests,post hoc tests,post hoc tests
Ryan-Einot-Gabriel-Welsch multiple stepdown procedure,Ryan-Einot-Gabriel-Welsch multiple stepdown procedure,Ryan-Einot-Gabriel-Welsch multiple stepdown procedure
FREGW (keyword),FREGW (keyword),FREGW (keyword)
ONEWAY command,ONEWAY command,ONEWAY command
QREGW (keyword),QREGW (keyword),QREGW (keyword)
ONEWAY command,ONEWAY command,ONEWAY command
Ryan-Einot-Gabriel-Welsch multiple stepdown procedure,Ryan-Einot-Gabriel-Welsch multiple stepdown procedure,Ryan-Einot-Gabriel-Welsch multiple stepdown procedure
post hoc tests,post hoc tests,post hoc tests
Ryan-Einot-Gabriel-Welsch's multiple stepdown procedure,Ryan-Einot-Gabriel-Welsch's multiple stepdown procedure,Ryan-Einot-Gabriel-Welsch's multiple stepdown procedure
Tamhane's T2,Tamhane's T2,Tamhane's T2
post hoc tests,post hoc tests,post hoc tests
Tamhane's T2,Tamhane's T2,Tamhane's T2
T2 (keyword),T2 (keyword),T2 (keyword)
ONEWAY command,ONEWAY command,ONEWAY command
T3 (keyword),T3 (keyword),T3 (keyword)
ONEWAY command,ONEWAY command,ONEWAY command
Tamhane's T3,Tamhane's T3,Tamhane's T3
post hoc tests,post hoc tests,post hoc tests
Tamhane's T3,Tamhane's T3,Tamhane's T3
GH (keyword),GH (keyword),GH (keyword)
ONEWAY command,ONEWAY command,ONEWAY command
Games and Howell's pairwise comparisons test,Games and Howell's pairwise comparisons test,Games and Howell's pairwise comparisons test
post hoc tests,post hoc tests,post hoc tests
Games and Howell's pairwise comparisons test,Games and Howell's pairwise comparisons test,Games and Howell's pairwise comparisons test
Dunnett's C,Dunnett's C,Dunnett's C
post hoc tests,post hoc tests,post hoc tests
Dunnett's C,Dunnett's C,Dunnett's C
C (keyword),C (keyword),C (keyword)
ONEWAY command,ONEWAY command,ONEWAY command
Waller-Duncan t test,Waller-Duncan t test,Waller-Duncan t test
post hoc tests,post hoc tests,post hoc tests
Waller-Duncan test,Waller-Duncan test,Waller-Duncan test
WALLER (keyword),WALLER (keyword),WALLER (keyword)
ONEWAY command,ONEWAY command,ONEWAY command
SNK | Student-Newman-Keuls procedure based on the Studentized range test. Used for detecting homogeneity subsets.
TUKEY | Tukey’s honestly significant difference. This test uses the Studentized range statistic to make all pairwise comparisons between groups. Used for pairwise comparison and for detecting homogeneity subsets.
BTUKEY | Tukey’s b. Multiple comparison procedure based on the average of Studentized range tests. Used for detecting homogeneity subsets.
DUNCAN | Duncan’s multiple comparison procedure based on the Studentized range test. Used for detecting homogeneity subsets.
SCHEFFE | Scheffé’s multiple comparison t test. Used for pairwise comparison and for detecting homogeneity subsets.
DUNNETT(refcat) | Dunnett’s two-tailed t test. Used for pairwise comparison. Each group is compared to a reference category. You can specify a reference category in parentheses. The default is the last category. This keyword must be spelled out in full.
DUNNETTL(refcat) | Dunnett’s one-tailed t test. Used for pairwise comparison. This test indicates whether the mean of each group (except the reference category) is smaller than that of the reference category. You can specify a reference category in parentheses. The default is the last category. This keyword must be spelled out in full.
DUNNETTR(refcat) | Dunnett’s one-tailed t test. Used for pairwise comparison. This test indicates whether the mean of each group (except the reference category) is larger than that of the reference category. You can specify a reference category in parentheses. The default is the last category. This keyword must be spelled out in full.
BONFERRONI | Bonferroni t test. This test is based on Student’s t statistic and adjusts the observed significance level for the fact that multiple comparisons are made. Used for pairwise comparison.
LSD | Least significant difference t test. Equivalent to multiple t tests between all pairs of groups. Used for pairwise comparison. This test does not control the overall probability of rejecting the hypotheses that some pairs of means are different, while in fact they are equal.
SIDAK | Sidak t test. Used for pairwise comparison. This test provides tighter bounds than the Bonferroni test.
GT2 | Hochberg’s GT2. Used for pairwise comparison and for detecting homogeneity subsets. This test is based on the Studentized maximum modulus test. Unless the cell sizes are extremely unbalanced, this test is fairly robust even for unequal variances.
GABRIEL | Gabriel’s pairwise comparisons test based on the Studentized maximum modulus test. Used for pairwise comparison and for detecting homogeneity subsets.
FREGW | Ryan-Einot-Gabriel-Welsch’s multiple stepdown procedure based on an F test. Used for detecting homogeneity subsets.
QREGW | Ryan-Einot-Gabriel-Welsch’s multiple stepdown procedure based on the Studentized range test. Used for detecting homogeneity subsets.
T2 | Tamhane’s T2. Used for pairwise comparison. This test is based on a t test and can be applied in situations where the variances are unequal.
T3 | Tamhane’s T3. Used for pairwise comparison. This test is based on the Studentized maximum modulus test and can be applied in situations where the variances are unequal.
GH | Games and Howell’s pairwise comparisons test based on the Studentized range test. Used for pairwise comparison. This test can be applied in situations where the variances are unequal.
C | Dunnett’s C. Used for pairwise comparison. This test is based on the weighted average of Studentized ranges and can be applied in situations where the variances are unequal.
WALLER(kratio) | Waller-Duncan t test. Used for detecting homogeneity subsets. This test uses a Bayesian approach. The k-ratio is the Type 1/Type 2 error seriousness ratio. The default value is 100. You can specify an integer greater than 1 within parentheses.

Example

ONEWAY WELL BY EDUC6
  /POSTHOC=SNK SCHEFFE ALPHA=.01.

• ONEWAY requests two different post hoc tests. The first uses the Student-Newman-Keuls test and the second uses Scheffé’s test. Both tests use an alpha of 0.01.

Related Topics

ONEWAY
Overview (ONEWAY command)
Example (ONEWAY command)
Analysis List (ONEWAY command)
POLYNOMIAL Subcommand (ONEWAY command)
CONTRAST Subcommand (ONEWAY command)
RANGES Subcommand (ONEWAY command)
PLOT MEANS Subcommand (ONEWAY command)
STATISTICS Subcommand (ONEWAY command)
MISSING Subcommand (ONEWAY command)
MATRIX Subcommand (ONEWAY command)
Matrix Output (ONEWAY command)
References (ONEWAY command)


RANGES Subcommand (ONEWAY command)

ONEWAY (command),ONEWAY (command),ONEWAY (command)
RANGES subcommand,RANGES subcommand,RANGES subcommand
RANGES (subcommand),RANGES (subcommand),RANGES (subcommand)
ONEWAY command,ONEWAY command,ONEWAY command
individual test names,individual test names,individual test names

RANGES produces results for some post hoc tests. It is available only through syntax. You can always produce the same results using the POSTHOC subcommand.

• Up to 10 RANGE subcommands are allowed. The effect is cumulative. If you specify more than one alpha value for different range tests, the last specified value takes effect for all tests. The default is 0.05.

• Keyword MODLSD on the RANGE subcommand is equivalent to keyword BONFERRONI on the POSTHOC subcommand. Keyword LSDMOD is an alias for MODLSD.

Related Topics

ONEWAY
Overview (ONEWAY command)
Example (ONEWAY command)
Analysis List (ONEWAY command)
POLYNOMIAL Subcommand (ONEWAY command)
CONTRAST Subcommand (ONEWAY command)
POSTHOC Subcommand (ONEWAY command)
PLOT MEANS Subcommand (ONEWAY command)
STATISTICS Subcommand (ONEWAY command)
MISSING Subcommand (ONEWAY command)
MATRIX Subcommand (ONEWAY command)
Matrix Output (ONEWAY command)
References (ONEWAY command)


PLOT MEANS Subcommand (ONEWAY command)

ONEWAY (command),ONEWAY (command),ONEWAY (command)
PLOT MEANS subcommand,PLOT MEANS subcommand,PLOT MEANS subcommand
PLOT MEANS (subcommand),PLOT MEANS (subcommand),PLOT MEANS (subcommand)
ONEWAY command,ONEWAY command,ONEWAY command
individual test names,individual test names,individual test names

PLOT MEANS produces a chart that plots the subgroup means (the means for each group defined by values of the factor variable).

Related Topics

ONEWAY
Overview (ONEWAY command)
Example (ONEWAY command)
Analysis List (ONEWAY command)
POLYNOMIAL Subcommand (ONEWAY command)
CONTRAST Subcommand (ONEWAY command)
POSTHOC Subcommand (ONEWAY command)
RANGES Subcommand (ONEWAY command)
STATISTICS Subcommand (ONEWAY command)
MISSING Subcommand (ONEWAY command)
MATRIX Subcommand (ONEWAY command)
Matrix Output (ONEWAY command)
References (ONEWAY command)


STATISTICS Subcommand (ONEWAY command)

ONEWAY (command),ONEWAY (command),ONEWAY (command)
STATISTICS subcommand,STATISTICS subcommand,STATISTICS subcommand
STATISTICS (subcommand),STATISTICS (subcommand),STATISTICS (subcommand)
ONEWAY command,ONEWAY command,ONEWAY command
ONEWAY (command),ONEWAY (command),ONEWAY (command)
statistics,statistics,statistics

By default, ONEWAY displays the ANOVA table showing between- and within-groups sums of squares, mean squares, degrees of freedom, F ratio, and probability of F. Use STATISTICS to obtain additional statistics.

BROWNFORSYTHE (keyword),BROWNFORSYTHE (keyword),BROWNFORSYTHE (keyword)
ONEWAY command,ONEWAY command,ONEWAY command
WELCH (keyword),WELCH (keyword),WELCH (keyword)
ONEWAY command,ONEWAY command,ONEWAY command
DESCRIPTIVES (keyword),DESCRIPTIVES (keyword),DESCRIPTIVES (keyword)
ONEWAY command,ONEWAY command,ONEWAY command
EFFECTS (keyword),EFFECTS (keyword),EFFECTS (keyword)
ONEWAY command,ONEWAY command,ONEWAY command
HOMOGENEITY (keyword),HOMOGENEITY (keyword),HOMOGENEITY (keyword)
ONEWAY command,ONEWAY command,ONEWAY command
BROWNFORSYTHE | Brown-Forsythe statistic. The Brown-Forsythe statistic, degrees of freedom, and the significance level are computed for each dependent variable.
WELCH | Welch statistic. The Welch statistic, degrees of freedom, and the significance level are computed for each dependent variable.
DESCRIPTIVES | Group descriptive statistics. The statistics include the number of cases, mean, standard deviation, standard error, minimum, maximum, and 95% confidence interval for each dependent variable for each group.
EFFECTS | Fixed- and random-effects statistics. The statistics include the standard deviation, standard error, and 95% confidence interval for the fixed-effects model, and the standard error, 95% confidence interval, and estimate of between-components variance for the random-effects model.
HOMOGENEITY | Homogeneity-of-variance tests. The statistics include Levene statistic, degrees of freedom, and the significance level displayed in the Test of Homogeneity-of-Variances table.
NONE | No optional statistics. This is the default.
ALL | All statistics available forONEWAY.

Related Topics

ONEWAY
Overview (ONEWAY command)
Example (ONEWAY command)
Analysis List (ONEWAY command)
POLYNOMIAL Subcommand (ONEWAY command)
CONTRAST Subcommand (ONEWAY command)
POSTHOC Subcommand (ONEWAY command)
RANGES Subcommand (ONEWAY command)
PLOT MEANS Subcommand (ONEWAY command)
MISSING Subcommand (ONEWAY command)
MATRIX Subcommand (ONEWAY command)
Matrix Output (ONEWAY command)
References (ONEWAY command)


MISSING Subcommand (ONEWAY command)

ONEWAY (command),ONEWAY (command),ONEWAY (command)
MISSING subcommand,MISSING subcommand,MISSING subcommand
MISSING (subcommand),MISSING (subcommand),MISSING (subcommand)
ONEWAY command,ONEWAY command,ONEWAY command
ONEWAY (command),ONEWAY (command),ONEWAY (command)
missing values,missing values,missing values

MISSING controls the treatment of missing values.

• Keywords ANALYSIS and LISTWISE are alternatives. Each can be used with INCLUDE or EXCLUDE. The default is ANALYSIS and EXCLUDE.

• A case outside of the range specified for the grouping variable is not used.

ANALYSIS (keyword),ANALYSIS (keyword),ANALYSIS (keyword)
ONEWAY command,ONEWAY command,ONEWAY command
LISTWISE (keyword),LISTWISE (keyword),LISTWISE (keyword)
ONEWAY command,ONEWAY command,ONEWAY command
EXCLUDE (keyword),EXCLUDE (keyword),EXCLUDE (keyword)
ONEWAY command,ONEWAY command,ONEWAY command
INCLUDE (keyword),INCLUDE (keyword),INCLUDE (keyword)
ONEWAY command,ONEWAY command,ONEWAY command
ANALYSIS | Exclude cases with missing values on a pair-by-pair basis. A case with a missing value for the dependent or grouping variable for a given analysis is not used for that analysis. This is the default.
LISTWISE | Exclude cases with missing values listwise. Cases with missing values for any variable named are excluded from all analyses.
EXCLUDE | Exclude cases with user-missing values. User-missing values are treated as missing. This is the default.
INCLUDE | Include user-missing values. User-missing values are treated as valid values.

Related Topics

ONEWAY
Overview (ONEWAY command)
Example (ONEWAY command)
Analysis List (ONEWAY command)
POLYNOMIAL Subcommand (ONEWAY command)
CONTRAST Subcommand (ONEWAY command)
POSTHOC Subcommand (ONEWAY command)
RANGES Subcommand (ONEWAY command)
PLOT MEANS Subcommand (ONEWAY command)
STATISTICS Subcommand (ONEWAY command)
MATRIX Subcommand (ONEWAY command)
Matrix Output (ONEWAY command)
References (ONEWAY command)


MATRIX Subcommand (ONEWAY command)

ONEWAY (command),ONEWAY (command),ONEWAY (command)
matrix output,matrix output,matrix output
ONEWAY (command),ONEWAY (command),ONEWAY (command)
matrix input,matrix input,matrix input
ONEWAY (command),ONEWAY (command),ONEWAY (command)
MATRIX subcommand,MATRIX subcommand,MATRIX subcommand
MATRIX (subcommand),MATRIX (subcommand),MATRIX (subcommand)
ONEWAY command,ONEWAY command,ONEWAY command

MATRIX reads and writes matrix data files.

• Either IN or OUT and a matrix file in parentheses are required.

• You cannot specify both IN and OUT on the same ONEWAY procedure.

• Use MATRIX=NONE to explicitly indicate that a matrix data file is not being written or read.

OUT (keyword),OUT (keyword),OUT (keyword)
ONEWAY command,ONEWAY command,ONEWAY command
IN (keyword),IN (keyword),IN (keyword)
ONEWAY command,ONEWAY command,ONEWAY command
OUT ('savfile'|'dataset') | Write a matrix data file or dataset. Specify either a filename, a previously declared dataset name, or an asterisk, enclosed in parentheses. Filenames should be enclosed in quotes and are stored in the working directory unless a path is included as part of the file specification. If you specify an asterisk (*), the matrix data file replaces the active dataset. If you specify an asterisk or a dataset name, the file is not stored on disk unless you use SAVE or XSAVE.
IN ('savfile'|'dataset') | Read a matrix data file or dataset. Specify either a filename, dataset name created during the current session, or an asterisk enclosed in parentheses. An asterisk reads the matrix data from the active dataset. Filenames should be enclosed in quotes and are read from the working directory unless a path is included as part of the file specification.

Related Topics

ONEWAY
Overview (ONEWAY command)
Example (ONEWAY command)
Analysis List (ONEWAY command)
POLYNOMIAL Subcommand (ONEWAY command)
CONTRAST Subcommand (ONEWAY command)
POSTHOC Subcommand (ONEWAY command)
RANGES Subcommand (ONEWAY command)
PLOT MEANS Subcommand (ONEWAY command)
STATISTICS Subcommand (ONEWAY command)
MISSING Subcommand (ONEWAY command)
Matrix Output (ONEWAY command)
References (ONEWAY command)


Matrix Output (ONEWAY command)

• ONEWAY writes means, standard deviations, and frequencies to a matrix data file that can be used by subsequent ONEWAY procedures. For a description of the file, see Format of the Matrix Data File (ONEWAY command) below.

Related Topics

ONEWAY
Overview (ONEWAY command)
Example (ONEWAY command)
Analysis List (ONEWAY command)
POLYNOMIAL Subcommand (ONEWAY command)
CONTRAST Subcommand (ONEWAY command)
POSTHOC Subcommand (ONEWAY command)
RANGES Subcommand (ONEWAY command)
PLOT MEANS Subcommand (ONEWAY command)
STATISTICS Subcommand (ONEWAY command)
MISSING Subcommand (ONEWAY command)
MATRIX Subcommand (ONEWAY command)
References (ONEWAY command)
Matrix Input (ONEWAY command)
Format of the Matrix Data File (ONEWAY command)
Split Files (ONEWAY command)
Missing Values (ONEWAY command)
Example (ONEWAY command)
Example (ONEWAY command)
Example (ONEWAY command)
Example (ONEWAY command)


Matrix Input (ONEWAY command)

• ONEWAY can read the matrices it writes, and it can also read matrix materials that include the means, category frequencies, pooled variance, and degrees of freedom for the pooled variance. The pooled variance has a ROWTYPE_ value MSE, and the vector of degrees of freedom for the pooled variance has the ROWTYPE_ value DFE.

• The dependent variables named on ONEWAY can be a subset of the dependent variables in the matrix data file.

• MATRIX=IN cannot be specified unless an active dataset has already been defined. To read an existing matrix data file at the beginning of a session, use GET to retrieve the matrix file and then specify IN(*) on MATRIX.

Related Topics

Matrix Output (ONEWAY command)
Format of the Matrix Data File (ONEWAY command)
Split Files (ONEWAY command)
Missing Values (ONEWAY command)
Example (ONEWAY command)
Example (ONEWAY command)
Example (ONEWAY command)
Example (ONEWAY command)


Format of the Matrix Data File (ONEWAY command)

• The matrix data file includes two special variables created by the program: ROWTYPE_ and VARNAME_.

• ROWTYPE_ is a short string variable with values MEAN, STDDEV, and N.

• VARNAME_ is a short string variable that never has values for procedure ONEWAY. VARNAME_ is included with the matrix materials so that matrices written by ONEWAY can be read by procedures that expect to read a VARNAME_ variable.

• The independent variable is between variables ROWTYPE_ and VARNAME_.

• The remaining variables in the matrix file are the dependent variables.

Related Topics

Matrix Output (ONEWAY command)
Matrix Input (ONEWAY command)
Split Files (ONEWAY command)
Missing Values (ONEWAY command)
Example (ONEWAY command)
Example (ONEWAY command)
Example (ONEWAY command)
Example (ONEWAY command)


Split Files (ONEWAY command)

• When split-file processing is in effect, the first variables in the matrix data file are the split variables, followed by ROWTYPE_, the independent variable, VARNAME_, and the dependent variables.

• A full set of matrix materials is written for each split-file group defined by the split variable(s).

• A split variable cannot have the same variable name as any other variable written to the matrix data file.

• If split-file processing is in effect when a matrix is written, the same split file must be in effect when that matrix is read by any procedure.

• Generally, matrix rows, independent variables, and dependent variables can be in any order in the matrix data file read by keyword IN. However, all split-file variables must precede variable ROWTYPE_, and all split-group rows must be consecutive. ONEWAY ignores unrecognized ROWTYPE_ values.

Related Topics

Matrix Output (ONEWAY command)
Matrix Input (ONEWAY command)
Format of the Matrix Data File (ONEWAY command)
Missing Values (ONEWAY command)
Example (ONEWAY command)
Example (ONEWAY command)
Example (ONEWAY command)
Example (ONEWAY command)


Missing Values (ONEWAY command)

ONEWAY (command),ONEWAY (command),ONEWAY (command)
missing values,missing values,missing values

Missing-value treatment affects the values written to an matrix data file. When reading a matrix data file, be sure to specify a missing-value treatment on ONEWAY that is compatible with the treatment that was in effect when the matrix materials were generated.

Related Topics

Matrix Output (ONEWAY command)
Matrix Input (ONEWAY command)
Format of the Matrix Data File (ONEWAY command)
Split Files (ONEWAY command)
Example (ONEWAY command)
Example (ONEWAY command)
Example (ONEWAY command)
Example (ONEWAY command)


Example (ONEWAY command)

GET FILE=GSS80.
ONEWAY  WELL BY EDUC6
  /MATRIX=OUT(ONEMTX).

• ONEWAY reads data from file GSS80 and writes one set of matrix materials to the file ONEMTX.

• The active dataset is still GSS80. Subsequent commands are executed on GSS80.

Related Topics

Matrix Output (ONEWAY command)
Matrix Input (ONEWAY command)
Format of the Matrix Data File (ONEWAY command)
Split Files (ONEWAY command)
Missing Values (ONEWAY command)
Example (ONEWAY command)
Example (ONEWAY command)
Example (ONEWAY command)


Example (ONEWAY command)

GET FILE=GSS80.
ONEWAY  WELL BY EDUC6
  /MATRIX=OUT(*).
LIST.

• ONEWAY writes the same matrix as in the example above. However, the matrix data file replaces the active dataset. The LIST command is executed on the matrix file, not on the GSS80 file.

Related Topics

Matrix Output (ONEWAY command)
Matrix Input (ONEWAY command)
Format of the Matrix Data File (ONEWAY command)
Split Files (ONEWAY command)
Missing Values (ONEWAY command)
Example (ONEWAY command)
Example (ONEWAY command)
Example (ONEWAY command)


Example (ONEWAY command)

GET FILE=PRSNNL.
FREQUENCIES VARIABLE=AGE.
ONEWAY  WELL BY EDUC6
 /MATRIX=IN(ONEMTX).

• This example performs a frequencies analysis on PRSNNL and then uses a different file for ONEWAY. The file is an existing matrix data file.

• MATRIX=IN specifies the matrix data file.

• ONEMTX does not replace PRSNNL as the active dataset.

Related Topics

Matrix Output (ONEWAY command)
Matrix Input (ONEWAY command)
Format of the Matrix Data File (ONEWAY command)
Split Files (ONEWAY command)
Missing Values (ONEWAY command)
Example (ONEWAY command)
Example (ONEWAY command)
Example (ONEWAY command)


Example (ONEWAY command)

GET FILE=ONEMTX.
ONEWAY  WELL BY EDUC6
  /MATRIX=IN(*).

• The GET command retrieves the matrix data file ONEMTX.

• MATRIX=IN specifies an asterisk because the active dataset is the matrix data file ONEMTX. If MATRIX=IN(ONEMTX) is specified, the program issues an error message, since ONEMTX is already open.

• If the GET command is omitted, the program issues an error message.

Related Topics

Matrix Output (ONEWAY command)
Matrix Input (ONEWAY command)
Format of the Matrix Data File (ONEWAY command)
Split Files (ONEWAY command)
Missing Values (ONEWAY command)
Example (ONEWAY command)
Example (ONEWAY command)
Example (ONEWAY command)


References (ONEWAY command)

Speed, M. F. 1976. Response curves in the one way classification with unequal numbers of observations per cell. In: Proceedings of the Statistical Computing Section. Alexandria, VA: American Statistical Association.

Related Topics

ONEWAY
Overview (ONEWAY command)
Example (ONEWAY command)
Analysis List (ONEWAY command)
POLYNOMIAL Subcommand (ONEWAY command)
CONTRAST Subcommand (ONEWAY command)
POSTHOC Subcommand (ONEWAY command)
RANGES Subcommand (ONEWAY command)
PLOT MEANS Subcommand (ONEWAY command)
STATISTICS Subcommand (ONEWAY command)
MISSING Subcommand (ONEWAY command)
MATRIX Subcommand (ONEWAY command)
Matrix Output (ONEWAY command)


OPTIMAL BINNING

OPTIMAL BINNING (command),OPTIMAL BINNING (command),OPTIMAL BINNING (command)
OPTIMAL BINNING (command),OPTIMAL BINNING (command),OPTIMAL BINNING (command)
syntax chart,syntax chart,syntax chart
release history,release history,release history
Optimal Binning,Optimal Binning,Optimal Binning
command syntax,command syntax,command syntax

OPTIMAL BINNING is available in the Data Preparation option.

OPTIMAL BINNING

/VARIABLES [GUIDE = variable] BIN = varlist [SAVE = {NO**                       }]
                                                    {YES [(INTO = new varlist)]}

[/CRITERIA

    [PREPROCESS = {EQUALFREQ**[(BINS = {1000**})]}]
                                      {n     }
                  {NONE                          }

    [METHOD = {MDLP**                     }]
              {EQUALFREQ [(BINS = {10**})]}
                                  {n   }

    [LOWEREND = {UNBOUNDED**}]     [UPPEREND = {UNBOUNDED**}]
                {OBSERVED   }                  {OBSERVED   }

    [LOWERLIMIT = {INCLUSIVE**}]
                  {EXCLUSIVE  }

    [FORCEMERGE = {0**  }]]
                  {value}

[/MISSING  [SCOPE = {PAIRWISE**}]]
                    {LISTWISE  }

[/OUTFILE  RULES = filespec]

[/PRINT  [ENDPOINTS**] [DESCRIPTIVES] [ENTROPY] [NONE]]

** Default if the subcommand or keyword is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See OPTIMAL BINNING Algorithms for computational details for this procedure.

Syntax for the OPTIMAL BINNING command can be generated from the Optimal Binning dialog.

Release History Collapse Hide details

Release History

Release 15.0

• Command introduced.

Example

OPTIMAL BINNING
  /VARIABLES GUIDE = guide-variable BIN = binning-input-variable

Related Topics

Overview (OPTIMAL BINNING command)
Examples (OPTIMAL BINNING command)
VARIABLES Subcommand (OPTIMAL BINNING command)
CRITERIA Subcommand (OPTIMAL BINNING command)
MISSING Subcommand (OPTIMAL BINNING command)
OUTFILE Subcommand (OPTIMAL BINNING command)
PRINT Subcommand (OPTIMAL BINNING command)


Overview (OPTIMAL BINNING command)

The OPTIMAL BINNING procedure discretizes one or more scale variables (referred to henceforth as binning input variables) by distributing the values of each variable into bins. Bins can then be used instead of the original data values of the binning input variables for further analysis. OPTIMAL BINNING is useful for reducing the number of distinct values in the given binning input variables.

Options Collapse Hide details

Options

Methods. The OPTIMAL BINNING procedure offers the following methods of discretizing binning input variables.

• Unsupervised binning via the equal frequency algorithm discretizes the binning input variables. A guide variable is not required.

• Supervised binning via the MDLP (Minimal Description Length Principle) algorithm discretizes the binning input variables without any preprocessing. It is suitable for datasets with a small number of cases. A guide variable is required.

Output. The OPTIMAL BINNING procedure displays every binning input variable’s end point set in pivot table output and offers an option for suppressing this output. In addition, the procedure can save new binned variables corresponding to the binning input variables and can save a command syntax file with commands corresponding to the binning rules.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is the OPTIMAL BINNING command and a VARIABLES subcommand. VARIABLES provides the binning input variables and, if applicable, the guide variable.

• For unsupervised binning via the equal frequency algorithm, a guide variable is not required.

• For supervised binning via the MDLP algorithm and hybrid binning, a guide variable must be specified.

Syntax Rules Collapse Hide details

Syntax Rules

• When a supervised binning method is used, a guide variable must be specified on the VARIABLES subcommand.

• Subcommands may be specified only once.

• An error occurs if a variable or keyword is specified more than once within a subcommand.

• Parentheses, slashes, and equals signs shown in the syntax chart are required.

• Empty subcommands are not honored.

• The command name, subcommand names, and keywords must be spelled in full.

Case Frequency Collapse Hide details

Case Frequency

• If a WEIGHT variable is specified, then its values are used as frequency weights by the OPTIMAL BINNING procedure.

• Weight values are rounded to the nearest whole numbers before use. For example, 0.5 is rounded to 1, and 2.4 is rounded to 2.

• The WEIGHT variable may not be specified on any subcommand in the OPTIMAL BINNING procedure.

• Cases with missing weights or weights less than 0.5 are not used in the analyses.

Limitations Collapse Hide details

Limitations

The number of distinct values in a guide variable should be less than or equal to 256, irrespective of the platform on which PASW Statistics is running. If the number is greater than 256, this results in an error.

Related Topics

OPTIMAL BINNING
Examples (OPTIMAL BINNING command)
VARIABLES Subcommand (OPTIMAL BINNING command)
CRITERIA Subcommand (OPTIMAL BINNING command)
MISSING Subcommand (OPTIMAL BINNING command)
OUTFILE Subcommand (OPTIMAL BINNING command)
PRINT Subcommand (OPTIMAL BINNING command)


Examples (OPTIMAL BINNING command)

* Optimal Binning.
OPTIMAL BINNING
  /VARIABLES GUIDE=default BIN=age employ address income debtinc creddebt
  othdebt SAVE=YES (INTO=age_bin employ_bin address_bin income_bin debtinc_bin
  creddebt_bin othdebt_bin)
  /CRITERIA METHOD=MDLP
   PREPROCESS=EQUALFREQ (BINS=1000)
   FORCEMERGE=0
   LOWERLIMIT=INCLUSIVE
   LOWEREND=UNBOUNDED
   UPPEREND=UNBOUNDED
  /MISSING SCOPE=PAIRWISE
  /OUTFILE RULES='/bankloan_binning-rules.sps'
  /PRINT ENDPOINTS DESCRIPTIVES ENTROPY.

• The procedure will discretize the binning input variables age, employ, address, income, debtinc, creddebt, and othdebt using MDLP binning with the guide variable default.

• The discretized values for these variables will be stored in the new variables age_bin, employ_bin, address_bin, income_bin, debtinc_bin, creddebt_bin, and othdebt_bin.

• If a binning input variable has more than 1000 distinct values, then the equal frequency method will reduce the number to 1000 before performing MDLP binning.

• Command syntax representing the binning rules is saved to the file /bankloan_binning-rules.sps.

• Bin endpoints, descriptive statistics, and model entropy values are requested for binning input variables.

• Other binning criteria are set to their default values.

For discussion of output from this syntax and to place the example in context, see Using Optimal Binning to Discretize Loan Applicant Data.

Related Topics

OPTIMAL BINNING
Overview (OPTIMAL BINNING command)
VARIABLES Subcommand (OPTIMAL BINNING command)
CRITERIA Subcommand (OPTIMAL BINNING command)
MISSING Subcommand (OPTIMAL BINNING command)
OUTFILE Subcommand (OPTIMAL BINNING command)
PRINT Subcommand (OPTIMAL BINNING command)


VARIABLES Subcommand (OPTIMAL BINNING command)

OPTIMAL BINNING (command),OPTIMAL BINNING (command),OPTIMAL BINNING (command)
VARIABLES subcommand,VARIABLES subcommand,VARIABLES subcommand
VARIABLES (subcommand),VARIABLES (subcommand),VARIABLES (subcommand)
OPTIMAL BINNING command,OPTIMAL BINNING command,OPTIMAL BINNING command

The VARIABLES subcommand specifies the guide variable (if applicable) and one or more binning input variables. It can also be used to save new variables containing the binned values.

GUIDE (keyword),GUIDE (keyword),GUIDE (keyword)
OPTIMAL BINNING command,OPTIMAL BINNING command,OPTIMAL BINNING command
BIN (keyword),BIN (keyword),BIN (keyword)
OPTIMAL BINNING command,OPTIMAL BINNING command,OPTIMAL BINNING command
SAVE (keyword),SAVE (keyword),SAVE (keyword)
OPTIMAL BINNING command,OPTIMAL BINNING command,OPTIMAL BINNING command
INTO (keyword),INTO (keyword),INTO (keyword)
OPTIMAL BINNING command,OPTIMAL BINNING command,OPTIMAL BINNING command
GUIDE=variable
 | Guide variable. The bins formed by supervised binning methods are "optimal" with respect to the specified guide variable. You must specify a guide variable to perform MDLP (CRITERIA METHOD = MDLP) or the hybrid method (CRITERIA PREPROCESS = EQUALFREQ METHOD = MDLP). This option is silently ignored if it is specified when the equal frequency method (CRITERIA METHOD = EQUALFREQ) is in effect. The guide variable may be numeric or string.
BIN=varlist
 | Binning input variable list. These are the variables to be binned. The variable list must include at least one variable. Binning input variables must be numeric.
SAVE = NO | YES (INTO = new varlist)
 | Create new variables containing binned values. By default, the procedure does not create any new variables (NO). If YES is specified, variables containing the binned values are saved to the active dataset. Optionally, specify the names of the new variables using the INTO keyword.
 | The number of variables specified on the INTO list must equal the number of variables on the BIN list. All specified names must be valid variable names. Violation of either of these rules results in an error.
 | If INTO is omitted, new variable names are created by concatenating the guide variable name (if applicable) and an underscore '_', followed by the binning input variable name and an underscore, followed by 'bin'. For example, /VARIABLES GUIDE=E BIN=F G SAVE=YES will generate two new variables: E_F_bin and E_G_bin.

Related Topics

OPTIMAL BINNING
Overview (OPTIMAL BINNING command)
Examples (OPTIMAL BINNING command)
CRITERIA Subcommand (OPTIMAL BINNING command)
MISSING Subcommand (OPTIMAL BINNING command)
OUTFILE Subcommand (OPTIMAL BINNING command)
PRINT Subcommand (OPTIMAL BINNING command)


CRITERIA Subcommand (OPTIMAL BINNING command)

OPTIMAL BINNING (command),OPTIMAL BINNING (command),OPTIMAL BINNING (command)
CRITERIA subcommand,CRITERIA subcommand,CRITERIA subcommand
CRITERIA (subcommand),CRITERIA (subcommand),CRITERIA (subcommand)
OPTIMAL BINNING command,OPTIMAL BINNING command,OPTIMAL BINNING command

The CRITERIA subcommand specifies bin creation options.

PREPROCESS (keyword),PREPROCESS (keyword),PREPROCESS (keyword)
OPTIMAL BINNING command,OPTIMAL BINNING command,OPTIMAL BINNING command
METHOD (keyword),METHOD (keyword),METHOD (keyword)
OPTIMAL BINNING command,OPTIMAL BINNING command,OPTIMAL BINNING command
LOWEREND (keyword),LOWEREND (keyword),LOWEREND (keyword)
OPTIMAL BINNING command,OPTIMAL BINNING command,OPTIMAL BINNING command
UPPEREND (keyword),UPPEREND (keyword),UPPEREND (keyword)
OPTIMAL BINNING command,OPTIMAL BINNING command,OPTIMAL BINNING command
LOWERLIMIT (keyword),LOWERLIMIT (keyword),LOWERLIMIT (keyword)
OPTIMAL BINNING command,OPTIMAL BINNING command,OPTIMAL BINNING command
FORCEMERGE (keyword),FORCEMERGE (keyword),FORCEMERGE (keyword)
OPTIMAL BINNING command,OPTIMAL BINNING command,OPTIMAL BINNING command
PREPROCESS=EQUALFREQ(BINS=n) | NONE
Preprocessing method when MDLP binning is used. PREPROCESS = EQUALFREQ creates preliminary bins using the equal frequency method before performing MDLP binning. These preliminary bins—rather than the original data values of the binning input variables—are input to the MDLP binning method.
EQUALFREQ may be followed by parentheses containing the BINS keyword, an equals sign, and an integer greater than 1. The BINS value serves as a preprocessing threshold and specifies the number of bins to create. The default value is EQUALFREQ (BINS = 1000).
If the number of distinct values in a binning input variable is greater than the BINS value, then the number of bins created is no more than the BINS value. Otherwise, no preprocessing is done for the input variable.
NONE requests no preprocessing.
METHOD=MDLP | EQUALFREQ(BINS=n)
Binning method. The MDLP option performs supervised binning via the MDLP algorithm. If METHOD = MDLP is specified, then a guide variable must be specified on the VARIABLES subcommand.
Alternatively, METHOD = EQUALFREQ performs unsupervised binning via the equal frequency algorithm. EQUALFREQ may be followed by parentheses containing the BINS keyword, an equals sign, and an integer greater than 1. The BINS value specifies the number of bins to create. The default value of the BINS argument is 10.
If the number of distinct values in a binning input variable is greater than the BINS value, then the number of bins created is no more than the BINS value. Otherwise, BINS gives an upper bound on the number of bins created. Thus, for example, if BINS = 10 is specified but a binning input variable has at most 10 distinct values, then the number of bins created will equal the number of distinct values in the input variable.
If EQUALFREQ is specified, then the VARIABLES subcommand GUIDE keyword and the CRITERIA subcommand PREPROCESS keyword are silently ignored.
The default METHOD option depends on the presence of a GUIDE specification on the VARIABLES subcommand. If GUIDE is specified, then METHOD = MDLP is the default. If GUIDE is not specified, then METHOD = EQUALFREQ is the default.
LOWEREND = UNBOUNDED | OBSERVED
Specifies how the minimum end point for each binning input variable is defined. Valid option values are UNBOUNDED or OBSERVED. If UNBOUNDED, then the minimum end point extends to negative infinity. If OBSERVED, then the minimum observed data value is used.
UPPEREND = UNBOUNDED | OBSERVED
Specifies how the maximum end point for each binning input variable is defined. Valid option values are UNBOUNDED or OBSERVED. If UNBOUNDED, then the maximum end point extends to positive infinity. If OBSERVED, then the maximum of the observed data is used.
LOWERLIMIT =INCLUSIVE | EXCLUSIVE
Specifies how the lower limit of an interval is defined. Valid option values are INCLUSIVE or EXCLUSIVE. Suppose the start and end points of an interval are p and q, respectively. If LOWERLIMIT = INCLUSIVE, then the interval contains values greater than or equal to p but less than q. If LOWERLIMIT = EXCLUSIVE, then the interval contains values greater than p and less than or equal to q.
FORCEMERGE = value
Small bins threshold. Occasionally, the procedure may produce bins with very few cases. The following strategy deletes these pseudo cut points:

For a given variable, suppose that the algorithm found nfinal cut points, and thus nfinal+1 bins. For bins i = 2, ..., nfinal (the second lowest-valued bin through the second highest-valued bin), compute

sizeof(bi)min(sizeof(bi−1),sizeof(bi+1))

where sizeof(b) is the number of cases in the bin.

When this value is less than the specified merging threshold, bi is considered sparsely populated and is merged with bi−1 or bi+1, whichever has the lower class information entropy. See the topic Class Information Entropy (optimal binning algorithms) for more information.

The procedure makes a single pass through the bins.

The default value of FORCEMERGE is 0; by default, forced merging of very small bins is not performed.

Related Topics

OPTIMAL BINNING
Overview (OPTIMAL BINNING command)
Examples (OPTIMAL BINNING command)
VARIABLES Subcommand (OPTIMAL BINNING command)
MISSING Subcommand (OPTIMAL BINNING command)
OUTFILE Subcommand (OPTIMAL BINNING command)
PRINT Subcommand (OPTIMAL BINNING command)


MISSING Subcommand (OPTIMAL BINNING command)

OPTIMAL BINNING (command),OPTIMAL BINNING (command),OPTIMAL BINNING (command)
MISSING subcommand,MISSING subcommand,MISSING subcommand
MISSING (subcommand),MISSING (subcommand),MISSING (subcommand)
OPTIMAL BINNING command,OPTIMAL BINNING command,OPTIMAL BINNING command

The MISSING subcommand specifies whether missing values are handled using listwise or pairwise deletion.

• User-missing values are always treated as invalid. When recoding the original binning input variable values into a new variable, user-missing values are converted into system-missing values.

SCOPE (keyword),SCOPE (keyword),SCOPE (keyword)
OPTIMAL BINNING command,OPTIMAL BINNING command,OPTIMAL BINNING command
LISTWISE (keyword),LISTWISE (keyword),LISTWISE (keyword)
OPTIMAL BINNING command,OPTIMAL BINNING command,OPTIMAL BINNING command
PAIRWISE (keyword),PAIRWISE (keyword),PAIRWISE (keyword)
OPTIMAL BINNING command,OPTIMAL BINNING command,OPTIMAL BINNING command
SCOPE = PAIRWISE | LISTWISE
 | Missing value handling method. LISTWISE provides a consistent case base. It operates across all variables specified on the VARIABLES subcommand. If any variable is missing for a case, then the entire case is excluded.
 | PAIRWISE makes use of as many valid values as possible. When METHOD = MDLP, it operates on each guide and binning input variable pair. The procedure will make use of all cases with nonmissing values on the guide and binning input variable. When METHOD = EQUALFREQ, it uses all cases with nonmissing values for each binning input variable. PAIRWISE is the default.

Related Topics

OPTIMAL BINNING
Overview (OPTIMAL BINNING command)
Examples (OPTIMAL BINNING command)
VARIABLES Subcommand (OPTIMAL BINNING command)
CRITERIA Subcommand (OPTIMAL BINNING command)
OUTFILE Subcommand (OPTIMAL BINNING command)
PRINT Subcommand (OPTIMAL BINNING command)


OUTFILE Subcommand (OPTIMAL BINNING command)

OPTIMAL BINNING (command),OPTIMAL BINNING (command),OPTIMAL BINNING (command)
OUTFILE subcommand,OUTFILE subcommand,OUTFILE subcommand
OUTFILE (subcommand),OUTFILE (subcommand),OUTFILE (subcommand)
OPTIMAL BINNING command,OPTIMAL BINNING command,OPTIMAL BINNING command

The OUTFILE subcommand writes syntax to an external command syntax file.

RULES (keyword),RULES (keyword),RULES (keyword)
OPTIMAL BINNING command,OPTIMAL BINNING command,OPTIMAL BINNING command
RULES=filespec
 | Rules file specification. The procedure can generate command syntax that can be used to bin other datasets. The recoding rules are based on the end points determined by the binning algorithm. Specify an external file to contain the saved syntax.
 | Note that saved variables (see the SAVE keyword in the VARIABLES subcommand) are generated using end points exactly as computed by the algorithm, while the bins created via saved syntax rules use end points converted to and from a decimal representation. Conversion errors in this process can, in certain cases, cause the end points read from syntax to differ from the original ones. The syntax precision of end points is 17 digits.

Related Topics

OPTIMAL BINNING
Overview (OPTIMAL BINNING command)
Examples (OPTIMAL BINNING command)
VARIABLES Subcommand (OPTIMAL BINNING command)
CRITERIA Subcommand (OPTIMAL BINNING command)
MISSING Subcommand (OPTIMAL BINNING command)
PRINT Subcommand (OPTIMAL BINNING command)


PRINT Subcommand (OPTIMAL BINNING command)

OPTIMAL BINNING (command),OPTIMAL BINNING (command),OPTIMAL BINNING (command)
PRINT subcommand,PRINT subcommand,PRINT subcommand
PRINT (subcommand),PRINT (subcommand),PRINT (subcommand)
OPTIMAL BINNING command,OPTIMAL BINNING command,OPTIMAL BINNING command

The PRINT subcommand controls the display of the output results. If the PRINT subcommand is not specified, then the default output is the end point set for each binning input variable.

ENDPOINTS (keyword),ENDPOINTS (keyword),ENDPOINTS (keyword)
OPTIMAL BINNING command,OPTIMAL BINNING command,OPTIMAL BINNING command
DESCRIPTIVES (keyword),DESCRIPTIVES (keyword),DESCRIPTIVES (keyword)
OPTIMAL BINNING command,OPTIMAL BINNING command,OPTIMAL BINNING command
ENTROPY (keyword),ENTROPY (keyword),ENTROPY (keyword)
OPTIMAL BINNING command,OPTIMAL BINNING command,OPTIMAL BINNING command
NONE (keyword),NONE (keyword),NONE (keyword)
OPTIMAL BINNING command,OPTIMAL BINNING command,OPTIMAL BINNING command
ENDPOINTS
 | Display the binning interval end points for each input variable. This is the default output.
DESCRIPTIVES
 | Display descriptive information for all binning input variables. For each binning input variable, this option displays the number of cases with valid values, the number of cases with missing values, the number of distinct valid values, and the minimum and maximum values. For the guide variable, this option displays the class distribution for each related binning input variable.
ENTROPY
 | Display the model entropy for each binning input variable interval when MDLP binning is used. The ENTROPY keyword is ignored with a warning if METHOD = EQUALFREQ is specified or implied on the CRITERIA subcommand.
NONE
 | Suppress all displayed output except the notes table and any warnings. Specifying NONE with any other keywords results in an error.

Related Topics

OPTIMAL BINNING
Overview (OPTIMAL BINNING command)
Examples (OPTIMAL BINNING command)
VARIABLES Subcommand (OPTIMAL BINNING command)
CRITERIA Subcommand (OPTIMAL BINNING command)
MISSING Subcommand (OPTIMAL BINNING command)
OUTFILE Subcommand (OPTIMAL BINNING command)


ORTHOPLAN

ORTHOPLAN (command),ORTHOPLAN (command),ORTHOPLAN (command)
ORTHOPLAN (command),ORTHOPLAN (command),ORTHOPLAN (command)
syntax chart,syntax chart,syntax chart
Generate Orthogonal Design,Generate Orthogonal Design,Generate Orthogonal Design
command syntax,command syntax,command syntax

ORTHOPLAN is available in the Conjoint option.

ORTHOPLAN [FACTORS=varlist ['labels'] (values ['labels'])...]

 [{/REPLACE     }]
  {/OUTFILE='savfile'|'dataset'}

 [/MINIMUM=value]

 [/HOLDOUT=value]  [/MIXHOLD={YES}]
                             {NO }

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See ORTHOPLAN Algorithms for computational details for this procedure.

Syntax for the ORTHOPLAN command can be generated from the Generate Orthogonal Design dialog.

Example:

ORTHOPLAN FACTORS=SPEED 'Highest possible speed'
   (70 '70 mph' 100 '100 mph' 130 '130mph')
 WARRANTY 'Length of warranty'
   ('1 year' '3 year' '5 year')
 SEATS (2, 4)
 /MINIMUM=9 /HOLDOUT=6.

Related Topics

Overview (ORTHOPLAN command)
Examples (ORTHOPLAN command)
FACTORS Subcommand (ORTHOPLAN command)
REPLACE Subcommand (ORTHOPLAN command)
OUTFILE Subcommand (ORTHOPLAN command)
MINIMUM Subcommand (ORTHOPLAN command)
HOLDOUT Subcommand (ORTHOPLAN command)
MIXHOLD Subcommand (ORTHOPLAN command)


Overview (ORTHOPLAN command)

ORTHOPLAN (command),ORTHOPLAN (command),ORTHOPLAN (command)
STATUS_ variable,STATUS_ variable,STATUS_ variable
ORTHOPLAN (command),ORTHOPLAN (command),ORTHOPLAN (command)
CARD_ variable,CARD_ variable,CARD_ variable
ORTHOPLAN (command),ORTHOPLAN (command),ORTHOPLAN (command)
holdout cases,holdout cases,holdout cases
duplicate cases,duplicate cases,duplicate cases
ORTHOPLAN command,ORTHOPLAN command,ORTHOPLAN command
ORTHOPLAN (command),ORTHOPLAN (command),ORTHOPLAN (command)
duplicate cases,duplicate cases,duplicate cases
ORTHOPLAN (command),ORTHOPLAN (command),ORTHOPLAN (command)
with SET SEED command,with SET SEED command,with SET SEED command

ORTHOPLAN generates an orthogonal main-effects plan for a full-concept conjoint analysis. ORTHOPLAN can append or replace an existing active dataset, or it can build an active dataset (if one does not already exist). The generated plan can be listed in full-concept profile, or card, format using PLANCARDS. The file that is created by ORTHOPLAN can be used as the plan file for CONJOINT.

Options Collapse Hide details

Options

Number of Cases. You can specify the minimum number of cases to be generated in the plan.

Holdout and Simulation Cases. In addition to the experimental main-effects cases, you can generate a specified number of holdout cases and identify input data as simulation cases.

Basic Specification Collapse Hide details

Basic Specification

• The basic specification is ORTHOPLAN followed by FACTORS, a variable list, and a value list in parentheses. ORTHOPLAN will generate cases in the active dataset, with each case representing a profile in the conjoint experimental plan and consisting of a new combination of the factor values. By default, the smallest possible orthogonal plan is generated.

• If you are appending to an existing active dataset that has previously defined values, the FACTORS subcommand is optional.

Subcommand Order Collapse Hide details

Subcommand Order

• Subcommands can be named in any order.

Operations Collapse Hide details

Operations

• ORTHOPLAN builds an active dataset (if one does not already exist) by using the variable and value information on the FACTORS subcommand.

• When ORTHOPLAN appends to an active dataset and FACTORS is not used, the factor levels (values) must be defined on a previous ORTHOPLAN or VALUE LABELS command.

• New variables STATUS_ and CARD_ are created and added to the active dataset by ORTHOPLAN if they do not already exist. STATUS_=0 for experimental cases, 1 for holdout cases, and 2 for simulation cases. Holdout cases are judged by the subjects but are not used when CONJOINT estimates utilities. Instead, the cases are used as a check on the validity of the estimated utilities. Simulation cases are entered by the user. They are factor-level combinations that are not rated by the subjects but are estimated by CONJOINT based on the ratings of the experimental cases. CARD_ contains the case identification numbers in the generated plan.

• Duplication between experimental cases and simulation cases is reported.

• If a user-entered experimental case (STATUS_=0) is duplicated by ORTHOPLAN, only one copy of the case is kept.

• Occasionally, ORTHOPLAN may generate duplicate experimental cases. One way to handle these duplicates is to edit or delete them, in which case the plan is no longer orthogonal. Alternatively, you can try running ORTHOPLAN again. With a different seed, ORTHOPLAN might produce a plan without duplicates. See the SEED subcommand on SET for more information about the random seed generator.

• The SPLIT FILE and WEIGHT commands are ignored by ORTHOPLAN.

Limitations Collapse Hide details

Limitations

• Missing data are not allowed.

• A maximum of 10 factors and 9 levels can be specified per factor.

• A maximum of 81 cases can be generated by ORTHOPLAN.

Related Topics

ORTHOPLAN
Examples (ORTHOPLAN command)
FACTORS Subcommand (ORTHOPLAN command)
REPLACE Subcommand (ORTHOPLAN command)
OUTFILE Subcommand (ORTHOPLAN command)
MINIMUM Subcommand (ORTHOPLAN command)
HOLDOUT Subcommand (ORTHOPLAN command)
MIXHOLD Subcommand (ORTHOPLAN command)


Examples (ORTHOPLAN command)

ORTHOPLAN FACTORS=SPEED 'Highest possible speed'
   (70 '70 mph' 100 '100 mph' 130 '130mph')
  WARRANTY 'Length of warranty'
   ('1 year' '3 year' '5 year')
  SEATS (2, 4) /MINIMUM=9 /HOLDOUT=6 /OUTFILE='CARPLAN.SAV'.

• The FACTORS subcommand defines the factors and levels to be used in building the file. Labels for some of the factors and some of the levels of each factor are also supplied.

• The MINIMUM subcommand specifies that the orthogonal plan should contain at least nine full-concept cases.

• HOLDOUT specifies that six holdout cases should be generated. A new variable, STATUS_, is created by ORTHOPLAN to distinguish these holdout cases from the regular experimental cases. Another variable, CARD_, is created to assign identification numbers to the plan cases.

• The OUTFILE subcommand saves the plan that is generated by ORTHOPLAN as a data file so that it can be used at a later date with CONJOINT.

Example: Appending Plan to the Working File

DATA LIST FREE /SPEED WARRANTY SEATS.
VALUE LABELS speed 70 '70 mph' 100 '100 mph' 130 '130 mph'
 /WARRANTY 1 '1 year' 3 '3 year' 5 '5 year'
 /SEATS 2 '2 seats' 4 '4 seats'.
BEGIN DATA
130 5 2
130 1 4
END DATA.
ORTHOPLAN
 /OUTFILE='CARPLAN.SAV'.

• In this example, ORTHOPLAN appends the plan to the active dataset and uses the variables and values that were previously defined in the active dataset as the factors and levels of the plan.

• The data between BEGIN DATA and END DATA are assumed to be simulation cases and are assigned a value of 2 on the newly created STATUS_ variable.

• The OUTFILE subcommand saves the plan that is generated by ORTHOPLAN as a data file so that it can be used at a later date with CONJOINT.

Related Topics

ORTHOPLAN
Overview (ORTHOPLAN command)
FACTORS Subcommand (ORTHOPLAN command)
REPLACE Subcommand (ORTHOPLAN command)
OUTFILE Subcommand (ORTHOPLAN command)
MINIMUM Subcommand (ORTHOPLAN command)
HOLDOUT Subcommand (ORTHOPLAN command)
MIXHOLD Subcommand (ORTHOPLAN command)


FACTORS Subcommand (ORTHOPLAN command)

ORTHOPLAN (command),ORTHOPLAN (command),ORTHOPLAN (command)
FACTORS subcommand,FACTORS subcommand,FACTORS subcommand
FACTORS (subcommand),FACTORS (subcommand),FACTORS (subcommand)
ORTHOPLAN command,ORTHOPLAN command,ORTHOPLAN command

FACTORS specifies the variables to be used as factors and the values to be used as levels in the plan.

• FACTORS is required for building a new active dataset or replacing an existing one. FACTORS is optional for appending to an existing file.

• The keyword FACTORS is followed by a variable list, an optional label for each variable, a list of values for each variable, and optional value labels.

• The list of values and the value labels are enclosed in parentheses. Values can be numeric or they can be strings enclosed in apostrophes.

ORTHOPLAN (command),ORTHOPLAN (command),ORTHOPLAN (command)
value labels,value labels,value labels
ORTHOPLAN (command),ORTHOPLAN (command),ORTHOPLAN (command)
with VALUE LABELS command,with VALUE LABELS command,with VALUE LABELS command
VALUE LABELS (command),VALUE LABELS (command),VALUE LABELS (command)
with ORTHOPLAN command,with ORTHOPLAN command,with ORTHOPLAN command

• The optional variable and value labels are enclosed in apostrophes.

• If the FACTORS subcommand is not used, every variable in the active dataset (other than STATUS_ and CARD_) is used as a factor, and level information is obtained from the value labels that are defined in the active dataset. ORTHOPLAN must be able to find value information either from a FACTORS subcommand or from a VALUE LABELS command. (See the VALUE LABELS command for more information.)

Example

ORTHOPLAN FACTORS=SPEED 'Highest possible speed'
   (70 '70 mph' 100 '100 mph' 130 '130mph')
  WARRANTY 'Length of warranty'
   (1 '1 year' 3 '3 year' 5 '5 year')
  SEATS 'Number of seats' (2 '2 seats' 4 '4 seats')
  EXCOLOR 'Exterior color'
  INCOLOR 'Interior color' ('RED' 'BLUE' 'SILVER').

• SPEED, WARRANTY, SEATS, EXCOLOR, and INCOLOR are specified as the factors. They are given the labels Highest possible speed, Length of warranty, Number of seats, Exterior color, and Interior color.

• Following each factor and its label are the list of values and the value labels in parentheses. Note that the values for two of the factors, EXCOLOR and INCOLOR, are the same and thus need to be specified only once after both factors are listed.

Related Topics

ORTHOPLAN
Overview (ORTHOPLAN command)
Examples (ORTHOPLAN command)
REPLACE Subcommand (ORTHOPLAN command)
OUTFILE Subcommand (ORTHOPLAN command)
MINIMUM Subcommand (ORTHOPLAN command)
HOLDOUT Subcommand (ORTHOPLAN command)
MIXHOLD Subcommand (ORTHOPLAN command)


REPLACE Subcommand (ORTHOPLAN command)

data files,data files,data files
appending orthogonal designs,appending orthogonal designs,appending orthogonal designs
ORTHOPLAN (command),ORTHOPLAN (command),ORTHOPLAN (command)
appending to active datasets,appending to active datasets,appending to active datasets
active dataset,active dataset,active dataset
appending orthogonal designs,appending orthogonal designs,appending orthogonal designs
ORTHOPLAN (command),ORTHOPLAN (command),ORTHOPLAN (command)
REPLACE subcommand,REPLACE subcommand,REPLACE subcommand
REPLACE (subcommand),REPLACE (subcommand),REPLACE (subcommand)
ORTHOPLAN command,ORTHOPLAN command,ORTHOPLAN command
ORTHOPLAN (command),ORTHOPLAN (command),ORTHOPLAN (command)
replacing active system file,replacing active system file,replacing active system file
REPLACE (subcommand),REPLACE (subcommand),REPLACE (subcommand)
with FACTORS subcommand,with FACTORS subcommand,with FACTORS subcommand
FACTORS (subcommand),FACTORS (subcommand),FACTORS (subcommand)
with REPLACE subcommand,with REPLACE subcommand,with REPLACE subcommand

REPLACE can be specified to indicate that the active dataset, if present, should be replaced by the generated plan. There is no further specification after the REPLACE keyword.

• By default, the active dataset is not replaced. Any new variables that are specified on a FACTORS subcommand plus the variables STATUS_ and CARD_ are appended to the active dataset.

• REPLACE should be used when the current active dataset has nothing to do with the plan file to be built. The active dataset will be replaced with one that has variables STATUS_, CARD_, and any other variables that are specified on the FACTORS subcommand.

• If REPLACE is specified, the FACTORS subcommand is required.

Related Topics

ORTHOPLAN
Overview (ORTHOPLAN command)
Examples (ORTHOPLAN command)
FACTORS Subcommand (ORTHOPLAN command)
OUTFILE Subcommand (ORTHOPLAN command)
MINIMUM Subcommand (ORTHOPLAN command)
HOLDOUT Subcommand (ORTHOPLAN command)
MIXHOLD Subcommand (ORTHOPLAN command)


OUTFILE Subcommand (ORTHOPLAN command)

OUTFILE saves the orthogonal design to an external PASW Statistics data file or previously declared dataset. The only specification is a name for the output file. This specification can be a filename or a previously declared dataset name. Filenames should be enclosed in quotation marks and are stored in the working directory unless a path is included as part of the file specification. Datasets are available during the current session but are not available in subsequent sessions unless you explicitly save them as data files.

• By default, a new data file is not created. Any new variables that are specified on a FACTORS subcommand plus the variables STATUS_ and CARD_ are appended to the active dataset.

• The output data file contains variables STATUS_, CARD_, and any other variables that are specified on the FACTORS subcommand.

• The file that is created by OUTFILE can be used by other syntax commands, such as PLANCARDS and CONJOINT.

• If both OUTFILE and REPLACE are specified, REPLACE is ignored.

Related Topics

ORTHOPLAN
Overview (ORTHOPLAN command)
Examples (ORTHOPLAN command)
FACTORS Subcommand (ORTHOPLAN command)
REPLACE Subcommand (ORTHOPLAN command)
MINIMUM Subcommand (ORTHOPLAN command)
HOLDOUT Subcommand (ORTHOPLAN command)
MIXHOLD Subcommand (ORTHOPLAN command)


MINIMUM Subcommand (ORTHOPLAN command)

ORTHOPLAN (command),ORTHOPLAN (command),ORTHOPLAN (command)
MINIMUM subcommand,MINIMUM subcommand,MINIMUM subcommand
MINIMUM (subcommand),MINIMUM (subcommand),MINIMUM (subcommand)
ORTHOPLAN command,ORTHOPLAN command,ORTHOPLAN command
ORTHOPLAN (command),ORTHOPLAN (command),ORTHOPLAN (command)
minimum number of cases,minimum number of cases,minimum number of cases

MINIMUM specifies a minimum number of cases for the plan.

• By default, the minimum number of cases necessary for the orthogonal plan is generated.

• MINIMUM is followed by a positive integer that is less than or equal to the total number of cases that can be formed from all possible combinations of the factor levels.

• If ORTHOPLAN cannot generate at least the number of cases requested on MINIMUM, it will generate the largest number it can that fits the specified factors and levels.

Related Topics

ORTHOPLAN
Overview (ORTHOPLAN command)
Examples (ORTHOPLAN command)
FACTORS Subcommand (ORTHOPLAN command)
REPLACE Subcommand (ORTHOPLAN command)
OUTFILE Subcommand (ORTHOPLAN command)
HOLDOUT Subcommand (ORTHOPLAN command)
MIXHOLD Subcommand (ORTHOPLAN command)


HOLDOUT Subcommand (ORTHOPLAN command)

ORTHOPLAN (command),ORTHOPLAN (command),ORTHOPLAN (command)
HOLDOUT subcommand,HOLDOUT subcommand,HOLDOUT subcommand
HOLDOUT (subcommand),HOLDOUT (subcommand),HOLDOUT (subcommand)
ORTHOPLAN command,ORTHOPLAN command,ORTHOPLAN command
MIXHOLD (subcommand),MIXHOLD (subcommand),MIXHOLD (subcommand)
with HOLDOUT subcommand,with HOLDOUT subcommand,with HOLDOUT subcommand
HOLDOUT (subcommand),HOLDOUT (subcommand),HOLDOUT (subcommand)
with MIXHOLD subcommand,with MIXHOLD subcommand,with MIXHOLD subcommand

HOLDOUT creates holdout cases in addition to the regular plan cases. Holdout cases are judged by the subjects but are not used when CONJOINT estimates utilities.

• If HOLDOUT is not specified, no holdout cases are produced.

• HOLDOUT is followed by a positive integer that is less than or equal to the total number of cases that can be formed from all possible combinations of factor levels.

• Holdout cases are generated from another random plan, not the main-effects experimental plan. The holdout cases will not duplicate the experimental cases or each other.

• The experimental and holdout cases will be randomly mixed in the generated plan or the holdout cases will be listed after the experimental cases, depending on subcommand MIXHOLD. The value of STATUS_ for holdout cases is 1. Any simulation cases will follow the experimental and holdout cases.

Related Topics

ORTHOPLAN
Overview (ORTHOPLAN command)
Examples (ORTHOPLAN command)
FACTORS Subcommand (ORTHOPLAN command)
REPLACE Subcommand (ORTHOPLAN command)
OUTFILE Subcommand (ORTHOPLAN command)
MINIMUM Subcommand (ORTHOPLAN command)
MIXHOLD Subcommand (ORTHOPLAN command)


MIXHOLD Subcommand (ORTHOPLAN command)

ORTHOPLAN (command),ORTHOPLAN (command),ORTHOPLAN (command)
MIXHOLD subcommand,MIXHOLD subcommand,MIXHOLD subcommand
MIXHOLD (subcommand),MIXHOLD (subcommand),MIXHOLD (subcommand)
ORTHOPLAN command,ORTHOPLAN command,ORTHOPLAN command

MIXHOLD indicates whether holdout cases should be randomly mixed with the experimental cases or should appear separately after the experimental plan in the file.

• If MIXHOLD is not specified, the default is NO, meaning holdout cases will appear after the experimental cases in the file.

• MIXHOLD followed by keyword YES requests that the holdout cases be randomly mixed with the experimental cases.

• MIXHOLD specified without a HOLDOUT subcommand has no effect.

Related Topics

ORTHOPLAN
Overview (ORTHOPLAN command)
Examples (ORTHOPLAN command)
FACTORS Subcommand (ORTHOPLAN command)
REPLACE Subcommand (ORTHOPLAN command)
OUTFILE Subcommand (ORTHOPLAN command)
MINIMUM Subcommand (ORTHOPLAN command)
HOLDOUT Subcommand (ORTHOPLAN command)


OUTPUT ACTIVATE

OUTPUT ACTIVATE (command),OUTPUT ACTIVATE (command),OUTPUT ACTIVATE (command)
OUTPUT ACTIVATE (command),OUTPUT ACTIVATE (command),OUTPUT ACTIVATE (command)
syntax chart,syntax chart,syntax chart
release history,release history,release history
OUTPUT ACTIVATE [NAME=]name

This command takes effect immediately. It does not read the active dataset or execute pending transformations. See the topic Command Order for more information.

Release History Collapse Hide details

Release History

Release 15.0

• Command introduced.

Example

GET FILE='/examples/data/SalaryData2005.sav'.
DESCRIPTIVES salbegin salary.
OUTPUT NAME alleduclevels.

TEMPORARY.
SELECT IF (educ>12).
OUTPUT NEW NAME=over12.
DESCRIPTIVES salbegin salary.

GET FILE='/examples/data/SalaryData2000.sav'.
TEMPORARY.
SELECT IF (educ>12).
DESCRIPTIVES salbegin salary.

OUTPUT ACTIVATE alleduclevels.
DESCRIPTIVES salbegin salary.

Related Topics

Overview (OUTPUT ACTIVATE command)
OUTPUT CLOSE
Overview (OUTPUT CLOSE command)
OUTPUT DISPLAY
Overview (OUTPUT DISPLAY command)
OUTPUT EXPORT
OUTPUT NAME
Overview (OUTPUT NAME command)
OUTPUT NEW
Overview (OUTPUT NEW command)
OUTPUT OPEN
Overview (OUTPUT OPEN command)
OUTPUT SAVE
Overview (OUTPUT SAVE command)


Overview (OUTPUT ACTIVATE command)

OUTPUT ACTIVATE (command),OUTPUT ACTIVATE (command),OUTPUT ACTIVATE (command)

The OUTPUT commands (OUTPUT NEW, OUTPUT NAME, OUTPUT ACTIVATE, OUTPUT OPEN, OUTPUT SAVE, OUTPUT CLOSE) provide the ability to programmatically manage one or many output documents. These functions allow you to:

• Save an output document through syntax.

• Programmatically partition output into separate output documents (for example, results for males in one output document and results for females in a separate one).

• Work with multiple open output documents in a given session, selectively appending new results to the appropriate document.

The OUTPUT ACTIVATE command activates an open output document, making it the designated output document. Subsequent procedure output is directed to this output document until the document is closed or another output document is created, opened, or activated.

Basic Specification

The basic specification for OUTPUT ACTIVATE is the command name followed by the name of an open output document. This is the name assigned by a previous OUTPUT NAME, OUTPUT OPEN, OUTPUT NEW command, or automatically assigned when the document is created or opened in the current session; it is not the file name associated with a saved output document. In the Viewer window title bar, the name is enclosed in square brackets. The NAME keyword is optional, but if it is used it must be followed by an equals sign.

Operations Collapse Hide details

Operations

• The window containing the activated document becomes the designated output window in the user interface.

• An error occurs, but processing continues, if the named output document does not exist. Output continues to be directed to the last designated output document.

Example Collapse Hide details

Example

GET FILE='/examples/data/SurveyData.sav'.

TEMPORARY.
SELECT IF (Sex='Male').
FREQUENCIES VARIABLES=ALL.
OUTPUT NAME males.

TEMPORARY.
SELECT IF (Sex='Female').
OUTPUT NEW NAME=females.
FREQUENCIES VARIABLES=ALL.

GET FILE='/examples/data/Preference.sav'.

TEMPORARY.
SELECT IF (Sex='Female').
DESCRIPTIVES VARIABLES=product1 product2 product3.

TEMPORARY.
SELECT IF (Sex='Male').
OUTPUT ACTIVATE males.
DESCRIPTIVES VARIABLES=product1 product2 product3.

OUTPUT SAVE NAME=males OUTFILE='/examples/output/Males.spv'.
OUTPUT SAVE NAME=females OUTFILE='/examples/output/Females.spv'.

• The first GET command loads survey data for males and females.

• FREQUENCIES output for male respondents is written to the designated output document. The OUTPUT NAME command is used to assign the name males to the designated output document.

• FREQUENCIES output for females is written to a new output document named females.

• The second GET command loads preferences data for males and females.

• After the second GET command, the output document named females is still the designated output document. Descriptive statistics for females are appended to this output document.

• OUTPUT ACTIVATE males activates the output document named males. Descriptive statistics for males are appended to this output document.

• The two open output documents are saved to separate files. Because the operation of saving an output document does not close it, both documents remain open. The output document named males remains the designated output document.

Related Topics

OUTPUT ACTIVATE
OUTPUT CLOSE
Overview (OUTPUT CLOSE command)
OUTPUT DISPLAY
Overview (OUTPUT DISPLAY command)
OUTPUT EXPORT
OUTPUT NAME
Overview (OUTPUT NAME command)
OUTPUT NEW
Overview (OUTPUT NEW command)
OUTPUT OPEN
Overview (OUTPUT OPEN command)
OUTPUT SAVE
Overview (OUTPUT SAVE command)


OUTPUT CLOSE

OUTPUT CLOSE (command),OUTPUT CLOSE (command),OUTPUT CLOSE (command)
OUTPUT CLOSE (command),OUTPUT CLOSE (command),OUTPUT CLOSE (command)
syntax chart,syntax chart,syntax chart
release history,release history,release history
OUTPUT CLOSE [NAME=]{name}
                    {*   }
                    {ALL }

This command takes effect immediately. It does not read the active dataset or execute pending transformations. See the topic Command Order for more information.

Release History Collapse Hide details

Release History

Release 15.0

• Command introduced.

Example

GET FILE='/examples/data/Males.sav'.
FREQUENCIES VARIABLES=ALL.
OUTPUT SAVE OUTFILE='/examples/output/Males.spv'.
OUTPUT CLOSE *.

GET FILE='/examples/data/Females.sav'.
FREQUENCIES VARIABLES=ALL.

Related Topics

OUTPUT ACTIVATE
Overview (OUTPUT ACTIVATE command)
Overview (OUTPUT CLOSE command)
OUTPUT DISPLAY
Overview (OUTPUT DISPLAY command)
OUTPUT EXPORT
OUTPUT NAME
Overview (OUTPUT NAME command)
OUTPUT NEW
Overview (OUTPUT NEW command)
OUTPUT OPEN
Overview (OUTPUT OPEN command)
OUTPUT SAVE
Overview (OUTPUT SAVE command)


Overview (OUTPUT CLOSE command)

OUTPUT CLOSE (command),OUTPUT CLOSE (command),OUTPUT CLOSE (command)

The OUTPUT commands (OUTPUT NEW, OUTPUT NAME, OUTPUT ACTIVATE, OUTPUT OPEN, OUTPUT SAVE, OUTPUT CLOSE) provide the ability to programmatically manage one or many output documents. These functions allow you to:

• Save an output document through syntax.

• Programmatically partition output into separate output documents (for example, results for males in one output document and results for females in a separate one).

• Work with multiple open output documents in a given session, selectively appending new results to the appropriate document.

The OUTPUT CLOSE command closes one or all open output documents.

Basic Specification

The only specification for OUTPUT CLOSE is the command name followed by the name of an open output document, an asterisk (*), or the keyword ALL. The NAME keyword is optional, but if it is used it must be followed by an equals sign.

Operations Collapse Hide details

Operations

• If a name is provided, the specified output document is closed and the association with that name is broken.

• If an asterisk (*) is specified, the designated output document is closed. If the designated output document has a name, the association with that name is broken.

• If ALL is specified, all open output documents are closed and all associations of names with output documents are broken.

• Output documents are not saved automatically when they are closed. Use OUTPUT SAVE to save the contents of an output document.

• OUTPUT CLOSE is ignored if you specify a nonexistent document.

Example Collapse Hide details

Example

GET FILE='/examples/data/Males.sav'.
FREQUENCIES VARIABLES=ALL.
OUTPUT SAVE OUTFILE='/examples/output/Males.spv'.
OUTPUT CLOSE *.

GET FILE='/examples/data/Females.sav'.
FREQUENCIES VARIABLES=ALL.

• FREQUENCIES produces summary statistics for each variable. Procedure output is added to the designated output document (one is created automatically if no output document is currently open).

• OUTPUT SAVE writes contents of the designated output document to the file /examples/output/Males.spv.

• OUTPUT CLOSE closes the designated output document.

• Output from the second FREQUENCIES command is written to a new output document, which was created automatically when the previous designated output document was closed. If OUTPUT CLOSE had not been issued, output for females would have been directed to the output document that contained summaries for males.

Related Topics

OUTPUT ACTIVATE
Overview (OUTPUT ACTIVATE command)
OUTPUT CLOSE
OUTPUT DISPLAY
Overview (OUTPUT DISPLAY command)
OUTPUT EXPORT
OUTPUT NAME
Overview (OUTPUT NAME command)
OUTPUT NEW
Overview (OUTPUT NEW command)
OUTPUT OPEN
Overview (OUTPUT OPEN command)
OUTPUT SAVE
Overview (OUTPUT SAVE command)


OUTPUT DISPLAY

OUTPUT DISPLAY (command),OUTPUT DISPLAY (command),OUTPUT DISPLAY (command)
OUTPUT DISPLAY (command),OUTPUT DISPLAY (command),OUTPUT DISPLAY (command)
syntax chart,syntax chart,syntax chart
release history,release history,release history
OUTPUT DISPLAY

This command takes effect immediately. It does not read the active dataset or execute pending transformations. See the topic Command Order for more information.

Release History Collapse Hide details

Release History

Release 15.0

• Command introduced.

Example

OUTPUT DISPLAY.

Related Topics

OUTPUT ACTIVATE
Overview (OUTPUT ACTIVATE command)
OUTPUT CLOSE
Overview (OUTPUT CLOSE command)
Overview (OUTPUT DISPLAY command)
OUTPUT EXPORT
OUTPUT NAME
Overview (OUTPUT NAME command)
OUTPUT NEW
Overview (OUTPUT NEW command)
OUTPUT OPEN
Overview (OUTPUT OPEN command)
OUTPUT SAVE
Overview (OUTPUT SAVE command)


Overview (OUTPUT DISPLAY command)

OUTPUT DISPLAY (command),OUTPUT DISPLAY (command),OUTPUT DISPLAY (command)

The OUTPUT commands (OUTPUT NEW, OUTPUT NAME, OUTPUT ACTIVATE, OUTPUT OPEN, OUTPUT SAVE, OUTPUT CLOSE) provide the ability to programmatically manage one or many output documents. These functions allow you to:

• Save an output document through syntax.

• Programmatically partition output into separate output documents (for example, results for males in one output document and results for females in a separate one).

• Work with multiple open output documents in a given session, selectively appending new results to the appropriate document.

The OUTPUT DISPLAY command displays a list of open output documents and identifies the one that is currently active, and referred to as the designated output document. The only specification is the command name OUTPUT DISPLAY.

Related Topics

OUTPUT ACTIVATE
Overview (OUTPUT ACTIVATE command)
OUTPUT CLOSE
Overview (OUTPUT CLOSE command)
OUTPUT DISPLAY
OUTPUT EXPORT
OUTPUT NAME
Overview (OUTPUT NAME command)
OUTPUT NEW
Overview (OUTPUT NEW command)
OUTPUT OPEN
Overview (OUTPUT OPEN command)
OUTPUT SAVE
Overview (OUTPUT SAVE command)


OUTPUT EXPORT

OUTPUT EXPORT (command),OUTPUT EXPORT (command),OUTPUT EXPORT (command)
OUTPUT EXPORT (command),OUTPUT EXPORT (command),OUTPUT EXPORT (command)
syntax chart,syntax chart,syntax chart
Export Output,Export Output,Export Output
command syntax,command syntax,command syntax
OUTPUT EXPORT  [NAME = {*   }]
                       {name}

 [/CONTENTS [EXPORT = {ALL**  }]]
                      {VISIBLE}
  [LAYERS = {PRINTSETTING**}]
            {ALL           }
            {VISIBLE       }
  [MODELVIEWS = {PRINTSETTING**}]
                {ALL           }
                {VISIBLE       }

 [/DOC DOCUMENTFILE = 'filespec']
  [NOTESCAPTIONS = {YES**}]
                   {NO   }
  [WIDETABLES = {WRAP**}]
                {SHRINK}
                {ASIS  }
  [PAGESIZE = {INCHES(width,height)}]
              {MM(width,height)    }
  [TOPMARGIN = {INCHES(n)}]
               {MM(n)    }
  [BOTTOMMARGIN = {INCHES(n)}]
                  {MM(n)    }
  [LEFTMARGIN = {INCHES(n)}]
                {MM(n)    }
  [RIGHTMARGIN = {INCHES(n)}]
                 {MM(n)    }

 [/HTML DOCUMENTFILE = 'filespec']
 [NOTESCAPTIONS = {YES**}]
                  {NO   }
  [IMAGEFORMAT = {JPG**}]
                 {BMP  }
                 {EMF  }
                 {EPS  }
                 {PNG  }
                 {TIF  }
 [/PDF DOCUMENTFILE = 'filespec']
  [EMBEDBOOKMARKS = {YES**}]
                    {NO   }
  [EMBEDFONTS = {YES**}]
                {NO   }

 [/PPT DOCUMENTFILE = 'filespec']
  [NOTESCAPTIONS = {YES**}]
                   {NO   }
  [SLIDETITLES = {YES**}]
                 {NO   }
  [WIDETABLES = {WRAP**}]
                {SHRINK}
                {ASIS  }
 [SLIDESIZE = {INCHES(width,height)}]
              {MM(width,height)    }
 [TOPMARGIN = {INCHES(n)}]
              {MM(n)    }
 [BOTTOMMARGIN = {INCHES(n)}]
                 {MM(n)    }
 [LEFTMARGIN = {INCHES(n)}]
               {MM(n)    }
 [RIGHTMARGIN = {INCHES(n)}]
                 {MM(n)    }

[/TEXT DOCUMENTFILE = 'filespec']
 [ENCODING = {LOCALE**}]
             {UTF8    }
             {UTF16   }
 [NOTESCAPTIONS = {YES**}]
                  {NO   }
 [COLUMNWIDTH = {AUTOFIT**}]
                {width    }
 [SEPARATOR = {SPACE**}]
              {TAB    }
 [ROWBORDER = {'-'**      }]
              {'character'}
 [COLUMNBORDER = {'|'**      }]
                 {'character'}
 [IMAGEFORMAT = {JPG**}]
                {BMP  }
                {EMF  }
                {EPS  }
                {PNG  }
                {TIF  }

[/XLS DOCUMENTFILE = 'filespec']
 [OPERATION = {CREATEFILE**}]
              {CREATESHEET }
              {MODIFYSHEET }
 [SHEET = {'sheetname'}]
 [LOCATION = {LASTCOLUMN**        }]
             {LASTROW             }
             {STARTCELL('cellref')}
 [NOTESCAPTIONS = {YES**}]
                  {NO   }

[/BMP IMAGEROOT = 'rootname']
 [PERCENTSIZE = {100**}]
                {n    }
 [COMPRESS = {NO**}]
             {YES }

[/EMF IMAGEROOT = 'rootname']
 [PERCENTSIZE = {100**}]
                {n    }

[/EPS IMAGEROOT = 'rootname']
 [WIDTH = {PERCENT**({100**})}]
                     {n    }
           {CENTIMETERS(n)     }
           {INCHES(n)          }
           {POINTS(n)          }
 [PREVIEW = {YES**}]
            {NO   }
 [FONTHANDLING = {REFERENCES**}]
                 {CURVES      }
[/JPG IMAGEROOT = 'rootname']
 [PERCENTSIZE = {100**}]
                {n    }
 [GRAYSCALE = {NO**}]
              {YES }

[/PNG IMAGEROOT = 'rootname']
 [PERCENTSIZE = {100**}]
                {n    }
 [DEPTH = {SCREEN**  }]
           {BLACKWHITE}
           {GRAYS256  }
           {COLORS16  }
           {COLORS256 }
           {TRUE24BIT }
           {TRUE32BIT }

[/TIF IMAGEROOT = 'rootname']
 [PERCENTSIZE = {100**}]
                {n    }

** Default if the subcommand or keyword is omitted.

This command takes effect immediately. It does not read the active dataset or execute pending transformations. See the topic Command Order for more information.

Syntax for the OUTPUT EXPORT command can be generated from the Export Output dialog.

Release History Collapse Hide details

Release History

Release 17.0

• Command introduced.

Example

OUTPUT EXPORT
  /DOC DOCUMENTFILE='/mydocs/myresults.doc'.

Related Topics

Overview (OUTPUT EXPORT command)
Examples (OUTPUT EXPORT command)
NAME Keyword (OUTPUT EXPORT Command)
CONTENTS Subcommand (OUTPUT EXPORT Command)
DOC Subcommand (OUTPUT EXPORT Command)
HTML Subcommand (OUTPUT EXPORT Command)
PDF Subcommand (OUTPUT EXPORT Command)
PPT Subcommand (OUTPUT EXPORT Command)
TEXT Subcommand (OUTPUT EXPORT Command)
XLS Subcommand (OUTPUT EXPORT Command)
BMP Subcommand (OUTPUT EXPORT Command)
EMF Subcommand (OUTPUT EXPORT Command)
EPS Subcommand (OUTPUT EXPORT Command)
JPG Subcommand (OUTPUT EXPORT Command)
PNG Subcommand (OUTPUT EXPORT Command)
TIF Subcommand (OUTPUT EXPORT Command)
OUTPUT ACTIVATE
Overview (OUTPUT ACTIVATE command)
OUTPUT CLOSE
Overview (OUTPUT CLOSE command)
OUTPUT DISPLAY
Overview (OUTPUT DISPLAY command)
OUTPUT NAME
Overview (OUTPUT NAME command)
OUTPUT NEW
Overview (OUTPUT NEW command)
OUTPUT OPEN
Overview (OUTPUT OPEN command)
OUTPUT SAVE
Overview (OUTPUT SAVE command)


Overview (OUTPUT EXPORT command)

The OUTPUT EXPORT command exports output from an open Viewer document to an external file format. By default, the contents of the designated Viewer document are exported, but a different Viewer document can be specified by name.

Options Collapse Hide details

Options

Options include:

• Export output in Word, Excel, HTML, PDF, PowerPoint, and text format.

• Export all items or only visible items.

• Export graphics only.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is the OUTPUT EXPORT command, followed by one of the document type subcommands with the DOCUMENTFILE keyword or by one of the image type subcommands with the IMAGEROOT keyword.

Syntax Rules Collapse Hide details

Syntax Rules

• The command name, subcommand names, and all keywords must be spelled in full. (Abbreviation is not allowed.)

• Each subcommand must be preceded by a forward slash.

• Equals signs shown in the syntax diagram are required elements.

• Subcommands can be specified in any order.

• Each subcommand can be specified only once.

• Each subcommand must be followed by at least one keyword specification.

• Within a subcommand, each keyword can be specified only once.

Operations Collapse Hide details

Operations

By default, the contents of the designated Viewer document are exported. The designated Viewer document is the one most recently opened (by OUTPUT NEW or OUTPUT OPEN, or from the menus and dialogs), or explicitly designated (by OUTPUT ACTIVATE or by selecting Designate Window from the Utilities menu).

To export an open Viewer document other than the designated one, use the NAME keyword. See the topic NAME Keyword (OUTPUT EXPORT Command) for more information.

Limitations Collapse Hide details

Limitations

• Export of selected Viewer items is not supported in OUTPUT EXPORT. You can only export all items or all visible items. To export selected items, use the Export Output dialog.

• Exporting to PowerPoint (*.ppt) format is supported only on Windows operating systems that have PowerPoint installed.

• EMF graphic format is available only on Windows operating systems.

• OUTPUT EXPORT is not supported in the PASW Statistics Batch Facility (available with PASW Statistics Server). To export output created in the Batch Facility, use OMS.

Related Topics

OUTPUT EXPORT
Examples (OUTPUT EXPORT command)
NAME Keyword (OUTPUT EXPORT Command)
CONTENTS Subcommand (OUTPUT EXPORT Command)
DOC Subcommand (OUTPUT EXPORT Command)
HTML Subcommand (OUTPUT EXPORT Command)
PDF Subcommand (OUTPUT EXPORT Command)
PPT Subcommand (OUTPUT EXPORT Command)
TEXT Subcommand (OUTPUT EXPORT Command)
XLS Subcommand (OUTPUT EXPORT Command)
BMP Subcommand (OUTPUT EXPORT Command)
EMF Subcommand (OUTPUT EXPORT Command)
EPS Subcommand (OUTPUT EXPORT Command)
JPG Subcommand (OUTPUT EXPORT Command)
PNG Subcommand (OUTPUT EXPORT Command)
TIF Subcommand (OUTPUT EXPORT Command)


Examples (OUTPUT EXPORT command)

Export to Word with Minimum Specifications

OUTPUT EXPORT
  /DOC DOCUMENTFILE='/mydocs/myresults.doc'.

All output in the designated Viewer document is exported to the specified file in Word (RTF) format. If the file already exists, the contents are overwritten.

Export Named Viewer Document to New Sheet in Existing Excel Document

OUTPUT EXPORT NAME=Region1Results
  /XLS DOCUMENTFILE='/mydocs/ResultsByRegion.xls'
   OPERATION=CREATESHEET SHEET='Region 1'.

• Contents of the Viewer document named Region1Results are exported to the specified Excel file.

• If the Excel file already exists, a new worksheet named Region 1 is added to the file. If a worksheet with that name already exists in the file, the contents of that worksheet are overwritten.

• If the Excel file does not exist, a file with the specified name is created, and a worksheet named Region 1 is added to the new file.

Related Topics

OUTPUT EXPORT
Overview (OUTPUT EXPORT command)
NAME Keyword (OUTPUT EXPORT Command)
CONTENTS Subcommand (OUTPUT EXPORT Command)
DOC Subcommand (OUTPUT EXPORT Command)
HTML Subcommand (OUTPUT EXPORT Command)
PDF Subcommand (OUTPUT EXPORT Command)
PPT Subcommand (OUTPUT EXPORT Command)
TEXT Subcommand (OUTPUT EXPORT Command)
XLS Subcommand (OUTPUT EXPORT Command)
BMP Subcommand (OUTPUT EXPORT Command)
EMF Subcommand (OUTPUT EXPORT Command)
EPS Subcommand (OUTPUT EXPORT Command)
JPG Subcommand (OUTPUT EXPORT Command)
PNG Subcommand (OUTPUT EXPORT Command)
TIF Subcommand (OUTPUT EXPORT Command)


NAME Keyword (OUTPUT EXPORT Command)

OUTPUT EXPORT (command),OUTPUT EXPORT (command),OUTPUT EXPORT (command)
NAME keyword,NAME keyword,NAME keyword

The optional NAME keyword specifies the Viewer document from which to export output. This is useful when more than one Viewer document is open and you want to ensure that the command operates on the correct document.

NAME=*. Export the contents of the designated output document.The designated Viewer document is the one most recently opened (by OUTPUT NEW or OUTPUT OPEN, or from the menus and dialogs), or explicitly designated (by OUTPUT ACTIVATE or by selecting Designate Window from the Utilities menu). This is the default.

NAME=name. Export the contents of the named output document. This is the name assigned by a previous OUTPUT NAME, OUTPUT OPEN, OUTPUT NEW command, or automatically assigned when the document is created or opened in the current session; it is not the file name associated with a saved output document. In the Viewer window title bar, the name is enclosed in square brackets.

Example

OUTPUT EXPORT NAME=Region1Results
  /XLS DOCUMENTFILE='/mydocs/ResultsByRegion.xls'.

Related Topics

OUTPUT EXPORT
Overview (OUTPUT EXPORT command)
Examples (OUTPUT EXPORT command)
CONTENTS Subcommand (OUTPUT EXPORT Command)
DOC Subcommand (OUTPUT EXPORT Command)
HTML Subcommand (OUTPUT EXPORT Command)
PDF Subcommand (OUTPUT EXPORT Command)
PPT Subcommand (OUTPUT EXPORT Command)
TEXT Subcommand (OUTPUT EXPORT Command)
XLS Subcommand (OUTPUT EXPORT Command)
BMP Subcommand (OUTPUT EXPORT Command)
EMF Subcommand (OUTPUT EXPORT Command)
EPS Subcommand (OUTPUT EXPORT Command)
JPG Subcommand (OUTPUT EXPORT Command)
PNG Subcommand (OUTPUT EXPORT Command)
TIF Subcommand (OUTPUT EXPORT Command)


CONTENTS Subcommand (OUTPUT EXPORT Command)

OUTPUT EXPORT (command),OUTPUT EXPORT (command),OUTPUT EXPORT (command)
CONTENTS subcommand,CONTENTS subcommand,CONTENTS subcommand
CONTENTS (subcommand),CONTENTS (subcommand),CONTENTS (subcommand)
OUTPUT EXPORT command,OUTPUT EXPORT command,OUTPUT EXPORT command
pivot tables,pivot tables,pivot tables
exporting table layers,exporting table layers,exporting table layers
model viewer,model viewer,model viewer
exporting views,exporting views,exporting views

The optional CONTENTS subcommand Viewer controls which contents are exported.

EXPORT Keyword Collapse Hide details

EXPORT Keyword

The EXPORT keyword specifies whether to export all Viewer items or only those that are visible.

ALL. Export all Viewer items. All Viewer items are exported regardless of whether they are visible or hidden. This is the default.

VISIBLE. Export visible items only. Hidden items are not included.

LAYERS Keyword Collapse Hide details

LAYERS Keyword

By default, inclusion or exclusion of pivot table layers is controlled by the table properties for each pivot table. You can override this setting and include all layers or exclude all but the currently visible layer. See the topic Table Properties: Printing for more information.

PRINTSETTING. Export layers as specified for printing in Table Properties. This is the default.

ALL. Export all layers. Each layer is included as a separate table in the exported file.

VISIBLE. Export visible layer only. Only the layer currently displayed in the Viewer window is included in the exported file.

MODELVIEWS Keyword Collapse Hide details

MODELVIEWS Keyword

By default, inclusion or exclusion of model views is controlled by the model properties for each model. You can override this setting and include all views or exclude all but the currently visible view in the Model Viewer. See the topic Model Properties for more information.

PRINTSETTING. Export model views as specified for printing in Model Properties. This is the default.

ALL. Export all model views. Each item is included as a separate image.

VISIBLE. Export visible view only. Only the model view currently displayed in the Viewer window is included.

Note: All model views are exported as images. This includes any tables.

Example Collapse Hide details

Example

OUTPUT EXPORT
  /CONTENTS EXPORT=VISIBLE LAYERS=ALL MODELVIEWS=VISIBLE
  /DOC DOCUMENTFILE='/mydocs/myresults.doc'.

Related Topics

OUTPUT EXPORT
Overview (OUTPUT EXPORT command)
Examples (OUTPUT EXPORT command)
NAME Keyword (OUTPUT EXPORT Command)
DOC Subcommand (OUTPUT EXPORT Command)
HTML Subcommand (OUTPUT EXPORT Command)
PDF Subcommand (OUTPUT EXPORT Command)
PPT Subcommand (OUTPUT EXPORT Command)
TEXT Subcommand (OUTPUT EXPORT Command)
XLS Subcommand (OUTPUT EXPORT Command)
BMP Subcommand (OUTPUT EXPORT Command)
EMF Subcommand (OUTPUT EXPORT Command)
EPS Subcommand (OUTPUT EXPORT Command)
JPG Subcommand (OUTPUT EXPORT Command)
PNG Subcommand (OUTPUT EXPORT Command)
TIF Subcommand (OUTPUT EXPORT Command)


DOC Subcommand (OUTPUT EXPORT Command)

DOC (subcommand),DOC (subcommand),DOC (subcommand)
OUTPUT EXPORT command,OUTPUT EXPORT command,OUTPUT EXPORT command
OUTPUT EXPORT (command),OUTPUT EXPORT (command),OUTPUT EXPORT (command)
DOC subcommand,DOC subcommand,DOC subcommand
Word format,Word format,Word format
exporting output,exporting output,exporting output

The DOC subcommand exports Viewer documents in Word (RTF) format. Pivot tables are exported as Word tables with all formatting attributes intact--for example, cell borders, font styles, and background colors. Text output is exported as formatted RTF. Charts, tree diagrams, and model views are included in PNG format.

DOCUMENTFILE Keyword

The required DOCUMENTFILE keyword specifies the name of the Word document. The keyword is followed by an equals sign and a quoted file specification, as in:

OUTPUT EXPORT
  /DOC DOCUMENTFILE='/mydocs/myresults.doc'.
PAGESIZE Keyword Collapse Hide details

PAGESIZE Keyword

The PAGESIZE keyword controls the page dimensions of the exported document. The keyword is followed by an equals sign and one of the following alternatives:

INCHES(width, height). Height and width specified in inches. Both values are required and both must be positive numbers.

MM(width, height). Height and width specified in millimeters. Both values are required and must be positive numbers.

• The default page dimensions are the default settings for the default printer.

• The orientation of the page is implied by the dimensions. Specifying a width that is less than the height is equivalent to choosing portrait orientation for the page. Specifying a width that is greater than the height is equivalent to choosing landscape orientation.

Note: the page size width setting is ignored if WIDETABLES=ASIS and one or more pivot tables is wider than the specified width. The page width automatically expands to accommodate the widest table.

TOPMARGIN, BOTTOMMARGIN, LEFTMARGIN, and RIGHTMARGIN Keywords Collapse Hide details

TOPMARGIN, BOTTOMMARGIN, LEFTMARGIN, and RIGHTMARGIN Keywords

These keywords control the margins for the exported document. Each keyword is followed by an equals sign and one of the following alternatives:

INCHES(n). Margin specified in inches. The value must be a positive number.

MM(n). Margin specified in millimeters. The value must be a positive number.

NOTESCAPTIONS Keyword Collapse Hide details

NOTESCAPTIONS Keyword

The NOTESCAPTIONS keyword controls the inclusion of pivot table footnotes and captions in the exported document. The keyword is followed by an equals sign and one of the following alternatives:

YES. Include footnotes and captions. This is the default.

NO. Do not include footnotes and captions.

WIDETABLES Keyword Collapse Hide details

WIDETABLES Keyword

The WIDETABLES keyword controls the treatment of pivot tables that are too wide for the document width (the specified page width minus the left and right margins). The keyword is followed by an equals sign and one of the following alternatives:

WRAP. Wrap wide tables. The table is divided into sections that will fit within the defined document width. Row labels are repeated for each section of the table. This is the default. If the row labels are too wide for the defined document width, the table is exported without wrapping and will appear truncated in the document.

SHRINK. Shrink wide tables to fit within the document width. Font size and column width are reduced so that the table fits within the document width.

ASIS. Do not shrink or wrap wide tables. The document width expands to accommodate the widest table.

Example Collapse Hide details

Example

OUTPUT EXPORT
  /DOC DOCUMENTFILE='/mydocs/myresults.doc'
   PAGESIZE=INCHES(11, 8.5)
   TOPMARGIN=INCHES(1)
   BOTTOMMARGIN=INCHES(1)
   LEFTMARGIN=INCHES(1)
   RIGHTMARGIN=INCHES(1)
   NOTESCAPTIONS=NO
   WIDETABLES=SHRINK.

Related Topics

OUTPUT EXPORT
Overview (OUTPUT EXPORT command)
Examples (OUTPUT EXPORT command)
NAME Keyword (OUTPUT EXPORT Command)
CONTENTS Subcommand (OUTPUT EXPORT Command)
HTML Subcommand (OUTPUT EXPORT Command)
PDF Subcommand (OUTPUT EXPORT Command)
PPT Subcommand (OUTPUT EXPORT Command)
TEXT Subcommand (OUTPUT EXPORT Command)
XLS Subcommand (OUTPUT EXPORT Command)
BMP Subcommand (OUTPUT EXPORT Command)
EMF Subcommand (OUTPUT EXPORT Command)
EPS Subcommand (OUTPUT EXPORT Command)
JPG Subcommand (OUTPUT EXPORT Command)
PNG Subcommand (OUTPUT EXPORT Command)
TIF Subcommand (OUTPUT EXPORT Command)


HTML Subcommand (OUTPUT EXPORT Command)

HTML (subcommand),HTML (subcommand),HTML (subcommand)
OUTPUT EXPORT command,OUTPUT EXPORT command,OUTPUT EXPORT command
OUTPUT EXPORT (command),OUTPUT EXPORT (command),OUTPUT EXPORT (command)
HTML subcommand,HTML subcommand,HTML subcommand
HTML format,HTML format,HTML format
exporting output,exporting output,exporting output

The HTML subcommand exports Viewer documents in HTML format. Output objects that would be pivot tables in the Viewer are converted to simple HTML tables. No TableLook attributes (font characteristics, border styles, colors, etc.) are supported. Text output objects are tagged <PRE> in the HTML. Charts, tree diagrams, and model views are exported as separate files in the selected graphics format and are embedded by reference. Image file names use the HTML file name as the root name, followed by a sequential integer, starting with 0.

DOCUMENTFILE Keyword

The required DOCUMENTFILE keyword specifies the name of the HTML document. The keyword is followed by an equals sign and a quoted file specification, as in:

OUTPUT EXPORT
  /HTML DOCUMENTFILE='/mydocs/myresults.htm'.
NOTESCAPTIONS Keyword Collapse Hide details

NOTESCAPTIONS Keyword

The NOTESCAPTIONS keyword controls the inclusion of pivot table footnotes and captions in the exported document. The keyword is followed by an equals sign and one of the following alternatives:

YES. Include footnotes and captions. This is the default.

NO. Do not include footnotes and captions.

IMAGEFORMAT Keyword Collapse Hide details

IMAGEFORMAT Keyword

The IMAGEFORMAT keyword controls the format of the exported graphics. The keyword is followed by an equals sign and one of the following alternatives:

BMP. Bitmap format.

EMF. Enhanced metafile format. A vector graphic format that is available only on Windows operating systems.

EPS. Encapsulated PostScript format. This format is often used when the quality of printed images is important.

JPG. Joint Photographic Experts Group format. This is the default.

PNG. Portable Network Graphics format.

TIF. Tagged image file format.

Note: Graphics includes charts, tree diagrams, and any Model Viewer items, including Model Viewer tables.

Example Collapse Hide details

Example

OUTPUT EXPORT
  /HTML DOCUMENTFILE='/mydocs/myresults.htm'
   NOTESCAPTIONS=NO IMAGEFORMAT=PNG.

Related Topics

OUTPUT EXPORT
Overview (OUTPUT EXPORT command)
Examples (OUTPUT EXPORT command)
NAME Keyword (OUTPUT EXPORT Command)
CONTENTS Subcommand (OUTPUT EXPORT Command)
DOC Subcommand (OUTPUT EXPORT Command)
PDF Subcommand (OUTPUT EXPORT Command)
PPT Subcommand (OUTPUT EXPORT Command)
TEXT Subcommand (OUTPUT EXPORT Command)
XLS Subcommand (OUTPUT EXPORT Command)
BMP Subcommand (OUTPUT EXPORT Command)
EMF Subcommand (OUTPUT EXPORT Command)
EPS Subcommand (OUTPUT EXPORT Command)
JPG Subcommand (OUTPUT EXPORT Command)
PNG Subcommand (OUTPUT EXPORT Command)
TIF Subcommand (OUTPUT EXPORT Command)


PDF Subcommand (OUTPUT EXPORT Command)

PDF (subcommand),PDF (subcommand),PDF (subcommand)
OUTPUT EXPORT command,OUTPUT EXPORT command,OUTPUT EXPORT command
OUTPUT EXPORT (command),OUTPUT EXPORT (command),OUTPUT EXPORT (command)
PDF subcommand,PDF subcommand,PDF subcommand
PDF format,PDF format,PDF format
exporting output,exporting output,exporting output

The PDF subcommand exports output in PDF format. Output is exported as it appears in Print Preview, with all formatting attributes intact.

DOCUMENTFILE Keyword

The required DOCUMENTFILE keyword specifies the name of the PDF document. The keyword is followed by an equals sign and a quoted file specification, as in:

OUTPUT EXPORT
  /PDF DOCUMENTFILE='/mydocs/myresults.pdf'.
EMBEDBOOKMARKS Keyword Collapse Hide details

EMBEDBOOKMARKS Keyword

The EMBEDBOOKMARKS keyword specifies whether to include bookmarks in the PDF document that correspond to the Viewer outline entries. Like the Viewer outline pane, bookmarks can make it much easier to navigate documents with a large number of output objects. The keyword is followed by an equals sign and one of the following alternatives:

YES. Include bookmarks. This is the default.

NO. Do not include bookmarks.

EMBEDFONTS Keyword Collapse Hide details

EMBEDFONTS Keyword

The EMBEDFONTS keyword specifies whether to embed fonts in the exported document. Embedding fonts ensures that the PDF document will look the same on all computers. Otherwise, if some fonts used in the document are not available on the computer being used to view (or print) the PDF document, font substitution may yield suboptimal results. The keyword is followed by an equals sign and one of the following alternatives:

YES. Embed fonts. This is the default.

NO. Do not embed fonts.

Other Settings That Affect PDF Output Collapse Hide details

Other Settings That Affect PDF Output

Page Setup/Page Attributes. Page size, orientation, margins, content and display of page headers and footers, and printed chart size in PDF documents are controlled by page setup and page attribute options.

Table Properties/TableLooks. Scaling of wide and/or long tables and printing of table layers are controlled by table properties for each table. These properties can also be saved in TableLooks. See the topic Table Properties: Printing for more information.

Default/Current Printer. The resolution (DPI) of the PDF document is the current resolution setting for the default or currently selected printer (which can be changed using Page Setup). The maximum resolution is 1200 DPI. If the printer setting is higher, the PDF document resolution will be 1200 DPI.

Note: High-resolution documents may yield poor results when printed on lower-resolution printers.

Example Collapse Hide details

Example

OUTPUT EXPORT
  /PDF DOCUMENTFILE='/mydocs/myresults.pdf'
   EMBEDBOOKMARKS=NO EMBEDFONTS=NO.

Related Topics

OUTPUT EXPORT
Overview (OUTPUT EXPORT command)
Examples (OUTPUT EXPORT command)
NAME Keyword (OUTPUT EXPORT Command)
CONTENTS Subcommand (OUTPUT EXPORT Command)
DOC Subcommand (OUTPUT EXPORT Command)
HTML Subcommand (OUTPUT EXPORT Command)
PPT Subcommand (OUTPUT EXPORT Command)
TEXT Subcommand (OUTPUT EXPORT Command)
XLS Subcommand (OUTPUT EXPORT Command)
BMP Subcommand (OUTPUT EXPORT Command)
EMF Subcommand (OUTPUT EXPORT Command)
EPS Subcommand (OUTPUT EXPORT Command)
JPG Subcommand (OUTPUT EXPORT Command)
PNG Subcommand (OUTPUT EXPORT Command)
TIF Subcommand (OUTPUT EXPORT Command)


PPT Subcommand (OUTPUT EXPORT Command)

PPT (subcommand),PPT (subcommand),PPT (subcommand)
OUTPUT EXPORT command,OUTPUT EXPORT command,OUTPUT EXPORT command
OUTPUT EXPORT (command),OUTPUT EXPORT (command),OUTPUT EXPORT (command)
PPT subcommand,PPT subcommand,PPT subcommand
PowerPoint format,PowerPoint format,PowerPoint format
exporting output,exporting output,exporting output

The PPT subcommand exports output in PowerPoint format. This is available only on Windows operating systems and requires an installed version of PowerPoint 97 or later.

• Pivot tables are exported as Word tables, and each table is a separate slide in the PowerPoint file. All formatting attributes of the pivot table are retained--for example, cell borders, font styles, and background colors.

• Graphics are exported in TIFF format, and each graphic is separate slide in the PowerPoint file. (Note: Graphics includes charts, tree diagrams, and any Model Viewer items, including Model Viewer tables.)

• Text output is not included.

DOCUMENTFILE Keyword

The required DOCUMENTFILE keyword specifies the name of the PowerPoint document. The keyword is followed by an equals sign and a quoted file specification, as in:

OUTPUT EXPORT
  /PPT DOCUMENTFILE='/mydocs/myresults.ppt'.
SLIDESIZE Keyword Collapse Hide details

SLIDESIZE Keyword

The SLIDESIZE keyword controls the slide dimensions of the exported file. The keyword is followed by an equals sign and one of the following alternatives:

INCHES(width, height). Height and width specified in inches. Both values are required and both must be positive numbers.

MM(width, height). Height and width specified in millimeters. Both values are required and must be positive numbers.

TOPMARGIN, BOTTOMMARGIN, LEFTMARGIN, and RIGHTMARGIN Keywords Collapse Hide details

TOPMARGIN, BOTTOMMARGIN, LEFTMARGIN, and RIGHTMARGIN Keywords

These keywords control the margins for the exported document. Each keyword is followed by an equals sign and one of the following alternatives:

INCHES(n). Margin specified in inches. The value must be a positive number.

MM(n). Margin specified in millimeters. The value must be a positive number.

NOTESCAPTIONS Keyword Collapse Hide details

NOTESCAPTIONS Keyword

The NOTESCAPTIONS keyword controls the inclusion of pivot table footnotes and captions in the exported document. The keyword is followed by an equals sign and one of the following alternatives:

YES. Include footnotes and captions. This is the default.

NO. Do not include footnotes and captions.

SLIDETITLES Keyword Collapse Hide details

SLIDETITLES Keyword

The SLIDETITLES keyword controls the inclusion slide titles of the exported file. The title is formed from the outline entry for the item in the outline pane of the Viewer. The keyword is followed by an equals sign and one of the following alternatives:

YES. Include slide titles. This is the default.

NO. Do not include slide titles.

WIDETABLES Keyword Collapse Hide details

WIDETABLES Keyword

The WIDETABLES keyword controls the treatment of pivot tables that are too wide for the document width (the specified page width minus the left and right margins). The keyword is followed by an equals sign and one of the following alternatives:

WRAP. Wrap wide tables. The table is divided into sections that will fit within the defined document width. Row labels are repeated for each section of the table. This is the default. If the row labels are too wide for the defined document width, the table is exported without wrapping and will appear truncated in the document.

SHRINK. Shrink wide tables to fit within the document width. Font size and column width are reduced so that the table fits within the document width.

ASIS. Do not shrink or wrap wide tables. The document width expands to accommodate the widest table.

Example Collapse Hide details

Example

OUTPUT EXPORT
  /PPT DOCUMENTFILE='/mydocs/myresults.ppt'
   SLIDESIZE=INCHES(10, 7.5)
   SLIDETITLES=NO
   WIDETABLES=ASIS.

Related Topics

OUTPUT EXPORT
Overview (OUTPUT EXPORT command)
Examples (OUTPUT EXPORT command)
NAME Keyword (OUTPUT EXPORT Command)
CONTENTS Subcommand (OUTPUT EXPORT Command)
DOC Subcommand (OUTPUT EXPORT Command)
HTML Subcommand (OUTPUT EXPORT Command)
PDF Subcommand (OUTPUT EXPORT Command)
TEXT Subcommand (OUTPUT EXPORT Command)
XLS Subcommand (OUTPUT EXPORT Command)
BMP Subcommand (OUTPUT EXPORT Command)
EMF Subcommand (OUTPUT EXPORT Command)
EPS Subcommand (OUTPUT EXPORT Command)
JPG Subcommand (OUTPUT EXPORT Command)
PNG Subcommand (OUTPUT EXPORT Command)
TIF Subcommand (OUTPUT EXPORT Command)


TEXT Subcommand (OUTPUT EXPORT Command)

TEXT (subcommand),TEXT (subcommand),TEXT (subcommand)
OUTPUT EXPORT command,OUTPUT EXPORT command,OUTPUT EXPORT command
OUTPUT EXPORT (command),OUTPUT EXPORT (command),OUTPUT EXPORT (command)
TEXT subcommand,TEXT subcommand,TEXT subcommand
text format,text format,text format
exporting output,exporting output,exporting output

The TEXT subcommand exports output in text format.

• Text output formats include local encoding, UTF-8, and UTF-16.

• Pivot tables can be exported in tab-separated or space-separated format.

• All text output is exported in space-separated format.

• Graphics are exported as separate files in the selected graphics format. A line is inserted in the text file indicating the file name of each exported image. (Note: Graphics includes charts, tree diagrams, and any Model Viewer items, including Model Viewer tables.)

• Graphics are exported to the same folder as the text document. Image file names use the text file name as the root name, followed by a sequential integer, starting with 0.

DOCUMENTFILE Keyword

The required DOCUMENTFILE keyword specifies the name of the text document. The keyword is followed by an equals sign and a quoted file specification, as in:

OUTPUT EXPORT
  /TEXT DOCUMENTFILE='/mydocs/myresults.txt'.
ENCODING Keyword Collapse Hide details

ENCODING Keyword

The ENCODING keyword specifies the type of text file to create. The keyword is followed by an equals sign and one of the following alternatives:

LOCALE. Export in the character set (code page) of the current locale. This is the default. For more information, see SET Command, LOCALE subcommand.

UTF8. Export as 8-bit Unicode text.

UTF16. Export as 16-bit Unicode text.

NOTESCAPTIONS Keyword Collapse Hide details

NOTESCAPTIONS Keyword

The NOTESCAPTIONS keyword controls the inclusion of pivot table footnotes and captions in the exported document. The keyword is followed by an equals sign and one of the following alternatives:

YES. Include footnotes and captions. This is the default.

NO. Do not include footnotes and captions.

SEPARATOR Keyword Collapse Hide details

SEPARATOR Keyword

Pivot table output can be exported as space-separated or tab-separated text. The SEPARATOR keyword is followed by an equals sign and one of the following alternatives:

SPACE. Use spaces to separate columns. This is the default.

TAB. Use tabs to separate columns.

COLUMNWIDTH Keyword Collapse Hide details

COLUMNWIDTH Keyword

For space-separated pivot table output, the COLUMNWIDTH keyword controls column width. The available alternatives are:

COLUMNWIDTH=AUTOFIT. Make each column as wide as the widest label or value in that column. Column contents will not be wrapped. This is the default.

COLUMNWIDTH=n. Wrap labels or values longer than n characters wide. The value of n must be a positive integer.

Note: This setting affects only pivot tables exported in space-separated format (SEPARATOR=SPACE).

ROWBORDER Keyword Collapse Hide details

ROWBORDER Keyword

For space-separated pivot table output, the ROWBORDER keyword specifies the character used to create row borders. The keyword is followed by an equals sign and a single quoted character. The default is a hyphen (-).

Note: This setting affects only pivot tables exported in space-separated format (SEPARATOR=SPACE).

COLUMNBORDER Keyword Collapse Hide details

COLUMNBORDER Keyword

For space-separated pivot table output, the COLUMNBORDER keyword specifies the character used to create column borders. The keyword is followed by an equals sign and a single quoted character. The default is the vertical bar/pipe symbol (|).

Note: This setting affects only pivot tables exported in space-separated format (SEPARATOR=SPACE).

IMAGEFORMAT Keyword Collapse Hide details

IMAGEFORMAT Keyword

The IMAGEFORMAT keyword controls the format of the exported graphics. The keyword is followed by an equals sign and one of the following alternatives:

BMP. Bitmap format.

EMF. Enhanced metafile format. A vector graphic format that is available only on Windows operating systems.

EPS. Encapsulated PostScript format. This format is often used when the quality of printed images is important.

JPG. Joint Photographic Experts Group format. This is the default.

PNG. Portable Network Graphics format.

TIF. Tagged image file format.

Note: Graphics includes charts, tree diagrams, and any Model Viewer items, including Model Viewer tables.

Example Collapse Hide details

Example

OUTPUT EXPORT
  /TEXT DOCUMENTFILE='/mydocs/myresults.txt'
   ENCODING=UTF8
   SEPARATOR=TAB
   IMAGEFORMAT=PNG.

Related Topics

OUTPUT EXPORT
Overview (OUTPUT EXPORT command)
Examples (OUTPUT EXPORT command)
NAME Keyword (OUTPUT EXPORT Command)
CONTENTS Subcommand (OUTPUT EXPORT Command)
DOC Subcommand (OUTPUT EXPORT Command)
HTML Subcommand (OUTPUT EXPORT Command)
PDF Subcommand (OUTPUT EXPORT Command)
PPT Subcommand (OUTPUT EXPORT Command)
XLS Subcommand (OUTPUT EXPORT Command)
BMP Subcommand (OUTPUT EXPORT Command)
EMF Subcommand (OUTPUT EXPORT Command)
EPS Subcommand (OUTPUT EXPORT Command)
JPG Subcommand (OUTPUT EXPORT Command)
PNG Subcommand (OUTPUT EXPORT Command)
TIF Subcommand (OUTPUT EXPORT Command)


XLS Subcommand (OUTPUT EXPORT Command)

XLS (subcommand),XLS (subcommand),XLS (subcommand)
OUTPUT EXPORT command,OUTPUT EXPORT command,OUTPUT EXPORT command
OUTPUT EXPORT (command),OUTPUT EXPORT (command),OUTPUT EXPORT (command)
XLS subcommand,XLS subcommand,XLS subcommand
Excel format,Excel format,Excel format
exporting output,exporting output,exporting output

The XLS subcommand exports output in Excel 97-2003 format. Pivot table rows, columns, and cells are exported as Excel rows, columns, and cells, with all formatting attributes intact -- for example, cell borders, font styles, and background colors. Text output is exported with all font attributes intact. Each line in the text output is a row in the Excel file, with the entire contents of the line contained in a single cell. Charts, tree diagrams, and model views are included in PNG format.

DOCUMENTFILE Keyword

The required DOCUMENTFILE keyword specifies the name of the Excel document. The keyword is followed by an equals sign and a quoted file specification, as in:

OUTPUT EXPORT
  /XLS DOCUMENTFILE='/mydocs/myresults.xls'.
OPERATION Keyword Collapse Hide details

OPERATION Keyword

The OPERATION keyword specifies the type of operation to be performed by the export. The keyword is followed by an equals sign and one of the following alternatives:

CREATEFILE. Create an Excel file. If a file with the specified name already exists, it is overwritten. This is the default.

CREATESHEET. Create a new worksheet within an Excel file. If a worksheet with the specified name (specified on the SHEET keyword) already exists in the file , that worksheet is overwritten. If the file doesn't already exist, a new file is created with a worksheet with the specified name.

MODIFYSHEET. Modify the contents of the specified worksheet. Content is added to the worksheet based on the specification on the LOCATION keyword. You must specify a sheet name with the SHEET keyword. If you modify an existing worksheet, charts, model views, and tree diagrams are not included in the exported output.

SHEET Keyword Collapse Hide details

SHEET Keyword

The SHEET keyword specifies the name of the worksheet to which items will be exported. The keyword is followed by an equals sign and a sheet name enclosed in quotes.

• Sheet names cannot exceed 31 characters and cannot contain forward or back slashes, square brackets, question marks, or asterisks.

• If the specified worksheet doesn't exist in the Excel file, a new worksheet with that name will be created, regardless of operation method.

• The SHEET keyword is required with OPERATION=MODIFYSHEET. It is optional with the other operation methods.

LOCATION Keyword Collapse Hide details

LOCATION Keyword

The LOCATION keyword specifies the location within the worksheet for the exported items. The keyword is followed by an equals sign and one of the following alternatives:

LASTCOLUMN. Add exported items after the last column. Exported items will be added after the last column, starting in the first row, without modifying any existing contents. This is a good choice for adding new columns to an existing worksheet. This is the default.

LASTROW. Add exported items after the last row. Exported items will be added after the last row, starting in the first column, without modifying any existing contents. This is a good choice for adding new rows to an existing worksheet.

STARTCELL('cell'). Add exported items beginning at a specific cell location. Exported items will be added to the worksheet starting at the specified cell location. Any existing content in the area where the exported items are added will be overwritten. The cell reference is required and must be enclosed in quotes.

NOTESCAPTIONS Keyword Collapse Hide details

NOTESCAPTIONS Keyword

The NOTESCAPTIONS keyword controls the inclusion of pivot table footnotes and captions in the exported document. The keyword is followed by an equals sign and one of the following alternatives:

YES. Include footnotes and captions. This is the default.

NO. Do not include footnotes and captions.

Example Collapse Hide details

Example

OUTPUT EXPORT
  /XLS DOCUMENTFILE='/mydocs/myresults.xls'
   OPERATION=MODIFYSHEET
   SHEET='Region 1'
   LOCATION=STARTCELL('B2').

Related Topics

OUTPUT EXPORT
Overview (OUTPUT EXPORT command)
Examples (OUTPUT EXPORT command)
NAME Keyword (OUTPUT EXPORT Command)
CONTENTS Subcommand (OUTPUT EXPORT Command)
DOC Subcommand (OUTPUT EXPORT Command)
HTML Subcommand (OUTPUT EXPORT Command)
PDF Subcommand (OUTPUT EXPORT Command)
PPT Subcommand (OUTPUT EXPORT Command)
TEXT Subcommand (OUTPUT EXPORT Command)
BMP Subcommand (OUTPUT EXPORT Command)
EMF Subcommand (OUTPUT EXPORT Command)
EPS Subcommand (OUTPUT EXPORT Command)
JPG Subcommand (OUTPUT EXPORT Command)
PNG Subcommand (OUTPUT EXPORT Command)
TIF Subcommand (OUTPUT EXPORT Command)


BMP Subcommand (OUTPUT EXPORT Command)

BMP (subcommand),BMP (subcommand),BMP (subcommand)
OUTPUT EXPORT command,OUTPUT EXPORT command,OUTPUT EXPORT command
OUTPUT EXPORT (command),OUTPUT EXPORT (command),OUTPUT EXPORT (command)
BMP subcommand,BMP subcommand,BMP subcommand

For graphics exported as separate files in BMP format, the BMP subcommand controls settings for those graphic files.

IMAGEROOT Keyword Collapse Hide details

IMAGEROOT Keyword

• The IMAGEROOT keyword is required if you are exporting graphics only, without any document type.

• The keyword is followed by an equals sign and a root name enclosed in quotes. The quoted root name can also include a directory path.

• File names are generated by adding a sequential integer to the root name, starting with 0.

• If any subcommand with a DOCUMENTFILE keyword is specified, IMAGEROOT is ignored.

PERCENTSIZE Keyword Collapse Hide details

PERCENTSIZE Keyword

The PERCENTSIZE keyword specifies the size of graphics as a percentage of the original size. The keyword is followed by an equals sign and a positive number that does not exceed 200. The The default value is 100.

COMPRESS Keyword Collapse Hide details

COMPRESS Keyword

The COMPRESSION keyword controls image compression to reduce file size. The keyword is followed by an equals sign and one of the following alternatives:

YES. Compress images. A lossless technique is used to reduce file size without affecting image quality.

NO. Do not compress images. This is the default.

Example Collapse Hide details

Example

OUTPUT EXPORT
  /BMP IMAGEROOT='/mydocs/mygraphic'
   PERCENT=50 COMPRESS=YES

Related Topics

OUTPUT EXPORT
Overview (OUTPUT EXPORT command)
Examples (OUTPUT EXPORT command)
NAME Keyword (OUTPUT EXPORT Command)
CONTENTS Subcommand (OUTPUT EXPORT Command)
DOC Subcommand (OUTPUT EXPORT Command)
HTML Subcommand (OUTPUT EXPORT Command)
PDF Subcommand (OUTPUT EXPORT Command)
PPT Subcommand (OUTPUT EXPORT Command)
TEXT Subcommand (OUTPUT EXPORT Command)
XLS Subcommand (OUTPUT EXPORT Command)
EMF Subcommand (OUTPUT EXPORT Command)
EPS Subcommand (OUTPUT EXPORT Command)
JPG Subcommand (OUTPUT EXPORT Command)
PNG Subcommand (OUTPUT EXPORT Command)
TIF Subcommand (OUTPUT EXPORT Command)


EMF Subcommand (OUTPUT EXPORT Command)

EMF (subcommand),EMF (subcommand),EMF (subcommand)
OUTPUT EXPORT command,OUTPUT EXPORT command,OUTPUT EXPORT command
OUTPUT EXPORT (command),OUTPUT EXPORT (command),OUTPUT EXPORT (command)
EMF subcommand,EMF subcommand,EMF subcommand
metafiles,metafiles,metafiles
enhanced metafiles,enhanced metafiles,enhanced metafiles

For graphics exported as separate files in enhanced metafile format, the EMF subcommand controls settings for those graphic files. EMF format is available only on Windows operating systems.

IMAGEROOT Keyword Collapse Hide details

IMAGEROOT Keyword

• The IMAGEROOT keyword is required if you are exporting graphics only, without any document type.

• The keyword is followed by an equals sign and a root name enclosed in quotes. The quoted root name can also include a directory path.

• File names are generated by adding a sequential integer to the root name, starting with 0.

• If any subcommand with a DOCUMENTFILE keyword is specified, IMAGEROOT is ignored.

PERCENTSIZE Keyword Collapse Hide details

PERCENTSIZE Keyword

The PERCENTSIZE keyword specifies the size of graphics as a percentage of the original size. The keyword is followed by an equals sign and a positive number that does not exceed 200. The The default value is 100.

Example Collapse Hide details

Example

OUTPUT EXPORT
  /EMF IMAGEROOT='/mydocs/mygraphic'
   PERCENT=50.

Related Topics

OUTPUT EXPORT
Overview (OUTPUT EXPORT command)
Examples (OUTPUT EXPORT command)
NAME Keyword (OUTPUT EXPORT Command)
CONTENTS Subcommand (OUTPUT EXPORT Command)
DOC Subcommand (OUTPUT EXPORT Command)
HTML Subcommand (OUTPUT EXPORT Command)
PDF Subcommand (OUTPUT EXPORT Command)
PPT Subcommand (OUTPUT EXPORT Command)
TEXT Subcommand (OUTPUT EXPORT Command)
XLS Subcommand (OUTPUT EXPORT Command)
BMP Subcommand (OUTPUT EXPORT Command)
EPS Subcommand (OUTPUT EXPORT Command)
JPG Subcommand (OUTPUT EXPORT Command)
PNG Subcommand (OUTPUT EXPORT Command)
TIF Subcommand (OUTPUT EXPORT Command)


EPS Subcommand (OUTPUT EXPORT Command)

EPS (subcommand),EPS (subcommand),EPS (subcommand)
OUTPUT EXPORT command,OUTPUT EXPORT command,OUTPUT EXPORT command
OUTPUT EXPORT (command),OUTPUT EXPORT (command),OUTPUT EXPORT (command)
EPS subcommand,EPS subcommand,EPS subcommand

For graphics exported as separate files in encapuslated PostScript format, the EPS subcommand controls settings for those graphic files.

IMAGEROOT Keyword Collapse Hide details

IMAGEROOT Keyword

• The IMAGEROOT keyword is required if you are exporting graphics only, without any document type.

• The keyword is followed by an equals sign and a root name enclosed in quotes. The quoted root name can also include a directory path.

• File names are generated by adding a sequential integer to the root name, starting with 0.

• If any subcommand with a DOCUMENTFILE keyword is specified, IMAGEROOT is ignored.

WIDTH Keyword Collapse Hide details

WIDTH Keyword

The WIDTH keyword controls the size of the exported image by specifying a value for the width of the image. The original aspect ratio is always maintained. The keyword is followed by an equals sign and one of the following alternatives:

PERCENT(n). Width specified as percentage of the original width. The value enclosed in parentheses must be a positive number that does not exceed 200. The default value is 100.

INCHES(n). Width specified in inches. The value enclosed in parentheses must be a positive number.

CM(n). Width specified in centimeters. The value enclosed in parentheses must be a positive number.

POINTS(n). Width specified in points. The value enclosed in parentheses must be a positive number.

PREVIEW Keyword Collapse Hide details

PREVIEW Keyword

The PREVIEW keyword controls the inclusion of a TIFF preview image along with the EPS image. The preview image will be displayed if the application you are using is unable to display EPS images on the screen. The keyword is followed by an equals sign and one of the following alternatives:

YES. Include a preview imaged. This is the default.

NO. Do not include a preview image.

FONTHANDLING Keyword Collapse Hide details

FONTHANDLING Keyword

The FONTHANDLING keyword controls the treatment of fonts in EPS images. The keyword is followed by an equals sign and one of the following alternatives:

REFERENCE. Use font references. If the fonts that are used in the graphic are available on the output device, those fonts are used. Otherwise, the output device uses alternate fonts. This is the default.

CURVES. Convert fonts to curves. This option turns fonts into PostScript curve data. The text itself is no longer editable as text in applications that can edit EPS graphics. This option is useful if the fonts that are used in the chart are not available on the output device.

Example Collapse Hide details

Example

OUTPUT EXPORT
  /EPS IMAGEROOT='/mydocs/mygraphic'
   WIDTH=PERCENT(50) PREVIEW=NO FONTHANDLING=CURVES.

Related Topics

OUTPUT EXPORT
Overview (OUTPUT EXPORT command)
Examples (OUTPUT EXPORT command)
NAME Keyword (OUTPUT EXPORT Command)
CONTENTS Subcommand (OUTPUT EXPORT Command)
DOC Subcommand (OUTPUT EXPORT Command)
HTML Subcommand (OUTPUT EXPORT Command)
PDF Subcommand (OUTPUT EXPORT Command)
PPT Subcommand (OUTPUT EXPORT Command)
TEXT Subcommand (OUTPUT EXPORT Command)
XLS Subcommand (OUTPUT EXPORT Command)
BMP Subcommand (OUTPUT EXPORT Command)
EMF Subcommand (OUTPUT EXPORT Command)
JPG Subcommand (OUTPUT EXPORT Command)
PNG Subcommand (OUTPUT EXPORT Command)
TIF Subcommand (OUTPUT EXPORT Command)


JPG Subcommand (OUTPUT EXPORT Command)

JPG (subcommand),JPG (subcommand),JPG (subcommand)
OUTPUT EXPORT command,OUTPUT EXPORT command,OUTPUT EXPORT command
OUTPUT EXPORT (command),OUTPUT EXPORT (command),OUTPUT EXPORT (command)
JPG subcommand,JPG subcommand,JPG subcommand

For graphics exported as separate files in JPEG format, the JPG subcommand controls settings for those graphic files.

IMAGEROOT Keyword Collapse Hide details

IMAGEROOT Keyword

• The IMAGEROOT keyword is required if you are exporting graphics only, without any document type.

• The keyword is followed by an equals sign and a root name enclosed in quotes. The quoted root name can also include a directory path.

• File names are generated by adding a sequential integer to the root name, starting with 0.

• If any subcommand with a DOCUMENTFILE keyword is specified, IMAGEROOT is ignored.

PERCENTSIZE Keyword Collapse Hide details

PERCENTSIZE Keyword

The PERCENTSIZE keyword specifies the size of graphics as a percentage of the original size. The keyword is followed by an equals sign and a positive number that does not exceed 200. The The default value is 100.

GRAYSCALE Keyword Collapse Hide details

GRAYSCALE Keyword

The GRAYSCALE keyword controls conversion of color images to grayscale images. The keyword is followed by an equals sign and one of the following alternatives:

YES. Convert images to grayscale. Color are converted to shades of gray.

NO. Do not convert images to grayscale. This is the default.

Example Collapse Hide details

Example

OUTPUT EXPORT
  /JPG IMAGEROOT='/mydocs/mygraphic'
   PERCENT=50 GRAYSCALE=YES.

Related Topics

OUTPUT EXPORT
Overview (OUTPUT EXPORT command)
Examples (OUTPUT EXPORT command)
NAME Keyword (OUTPUT EXPORT Command)
CONTENTS Subcommand (OUTPUT EXPORT Command)
DOC Subcommand (OUTPUT EXPORT Command)
HTML Subcommand (OUTPUT EXPORT Command)
PDF Subcommand (OUTPUT EXPORT Command)
PPT Subcommand (OUTPUT EXPORT Command)
TEXT Subcommand (OUTPUT EXPORT Command)
XLS Subcommand (OUTPUT EXPORT Command)
BMP Subcommand (OUTPUT EXPORT Command)
EMF Subcommand (OUTPUT EXPORT Command)
EPS Subcommand (OUTPUT EXPORT Command)
PNG Subcommand (OUTPUT EXPORT Command)
TIF Subcommand (OUTPUT EXPORT Command)


PNG Subcommand (OUTPUT EXPORT Command)

PNG (subcommand),PNG (subcommand),PNG (subcommand)
OUTPUT EXPORT command,OUTPUT EXPORT command,OUTPUT EXPORT command
OUTPUT EXPORT (command),OUTPUT EXPORT (command),OUTPUT EXPORT (command)
PNG subcommand,PNG subcommand,PNG subcommand

For graphics exported as separate files in PNG format, the PNG subcommand controls settings for those graphic files.

IMAGEROOT Keyword Collapse Hide details

IMAGEROOT Keyword

• The IMAGEROOT keyword is required if you are exporting graphics only, without any document type.

• The keyword is followed by an equals sign and a root name enclosed in quotes. The quoted root name can also include a directory path.

• File names are generated by adding a sequential integer to the root name, starting with 0.

• If any subcommand with a DOCUMENTFILE keyword is specified, IMAGEROOT is ignored.

PERCENTSIZE Keyword Collapse Hide details

PERCENTSIZE Keyword

The PERCENTSIZE keyword specifies the size of graphics as a percentage of the original size. The keyword is followed by an equals sign and a positive number that does not exceed 200. The The default value is 100.

DEPTH Keyword Collapse Hide details

DEPTH Keyword

The DEPTH keyword controls the number of colors in the exported graphics. If the number of colors in the graphic exceeds the number of colors for that depth, the colors will be dithered to replicate the colors in the graphic. The keyword is followed by an equals sign and one of the following alternatives:

SCREEN. Current screen depth. The number of colors currently displayed on your computer monitor. This is the default.

BLACKWHITE. Black and white. Each color is converted to either black or white.

GRAYS256. Grayscale. Colors are converted to shades of gray.

COLORS16. 16 colors.

COLORS256. 256 colors.

TRUE24BIT. 24-bit true color.

TRUE32BIT. 32-bit true color.

Example Collapse Hide details

Example

OUTPUT EXPORT
  /PNG IMAGEROOT='/mydocs/mygraphic'
   PERCENT=50
   DEPTH=COLORS256.

Related Topics

OUTPUT EXPORT
Overview (OUTPUT EXPORT command)
Examples (OUTPUT EXPORT command)
NAME Keyword (OUTPUT EXPORT Command)
CONTENTS Subcommand (OUTPUT EXPORT Command)
DOC Subcommand (OUTPUT EXPORT Command)
HTML Subcommand (OUTPUT EXPORT Command)
PDF Subcommand (OUTPUT EXPORT Command)
PPT Subcommand (OUTPUT EXPORT Command)
TEXT Subcommand (OUTPUT EXPORT Command)
XLS Subcommand (OUTPUT EXPORT Command)
BMP Subcommand (OUTPUT EXPORT Command)
EMF Subcommand (OUTPUT EXPORT Command)
EPS Subcommand (OUTPUT EXPORT Command)
JPG Subcommand (OUTPUT EXPORT Command)
TIF Subcommand (OUTPUT EXPORT Command)


TIF Subcommand (OUTPUT EXPORT Command)

TIF (subcommand),TIF (subcommand),TIF (subcommand)
OUTPUT EXPORT command,OUTPUT EXPORT command,OUTPUT EXPORT command
OUTPUT EXPORT (command),OUTPUT EXPORT (command),OUTPUT EXPORT (command)
TIF subcommand,TIF subcommand,TIF subcommand

For graphics exported as separate files in TIFF, the TIF subcommand controls settings for those graphic files.

IMAGEROOT Keyword Collapse Hide details

IMAGEROOT Keyword

• The IMAGEROOT keyword is required if you are exporting graphics only, without any document type.

• The keyword is followed by an equals sign and a root name enclosed in quotes. The quoted root name can also include a directory path.

• File names are generated by adding a sequential integer to the root name, starting with 0.

• If any subcommand with a DOCUMENTFILE keyword is specified, IMAGEROOT is ignored.

PERCENTSIZE Keyword Collapse Hide details

PERCENTSIZE Keyword

The PERCENTSIZE keyword specifies the size of graphics as a percentage of the original size. The keyword is followed by an equals sign and a positive number that does not exceed 200. The The default value is 100.

Example Collapse Hide details

Example

OUTPUT EXPORT
  /TIF IMAGEROOT='/mydocs/mygraphic'
   PERCENT=50.

Related Topics

OUTPUT EXPORT
Overview (OUTPUT EXPORT command)
Examples (OUTPUT EXPORT command)
NAME Keyword (OUTPUT EXPORT Command)
CONTENTS Subcommand (OUTPUT EXPORT Command)
DOC Subcommand (OUTPUT EXPORT Command)
HTML Subcommand (OUTPUT EXPORT Command)
PDF Subcommand (OUTPUT EXPORT Command)
PPT Subcommand (OUTPUT EXPORT Command)
TEXT Subcommand (OUTPUT EXPORT Command)
XLS Subcommand (OUTPUT EXPORT Command)
BMP Subcommand (OUTPUT EXPORT Command)
EMF Subcommand (OUTPUT EXPORT Command)
EPS Subcommand (OUTPUT EXPORT Command)
JPG Subcommand (OUTPUT EXPORT Command)
PNG Subcommand (OUTPUT EXPORT Command)


OUTPUT NAME

OUTPUT NAME (command),OUTPUT NAME (command),OUTPUT NAME (command)
OUTPUT NAME (command),OUTPUT NAME (command),OUTPUT NAME (command)
syntax chart,syntax chart,syntax chart
release history,release history,release history
OUTPUT NAME [NAME]=name

This command takes effect immediately. It does not read the active dataset or execute pending transformations. See the topic Command Order for more information.

Release History Collapse Hide details

Release History

Release 15.0

• Command introduced.

Example

GET FILE='/examples/data/SalaryData2005.sav'.
DESCRIPTIVES salbegin salary.
OUTPUT NAME alleduclevels.

TEMPORARY.
SELECT IF (educ>12).
OUTPUT NEW NAME=over12.
DESCRIPTIVES salbegin salary.

GET FILE='/examples/data/SalaryData2000.sav'.
TEMPORARY.
SELECT IF (educ>12).
DESCRIPTIVES salbegin salary.

OUTPUT ACTIVATE alleduclevels.
DESCRIPTIVES salbegin salary.

Related Topics

OUTPUT ACTIVATE
Overview (OUTPUT ACTIVATE command)
OUTPUT CLOSE
Overview (OUTPUT CLOSE command)
OUTPUT DISPLAY
Overview (OUTPUT DISPLAY command)
OUTPUT EXPORT
Overview (OUTPUT NAME command)
OUTPUT NEW
Overview (OUTPUT NEW command)
OUTPUT OPEN
Overview (OUTPUT OPEN command)
OUTPUT SAVE
Overview (OUTPUT SAVE command)


Overview (OUTPUT NAME command)

OUTPUT NAME (command),OUTPUT NAME (command),OUTPUT NAME (command)

The OUTPUT commands (OUTPUT NEW, OUTPUT NAME, OUTPUT ACTIVATE, OUTPUT OPEN, OUTPUT SAVE, OUTPUT CLOSE) provide the ability to programmatically manage one or many output documents. These functions allow you to:

• Save an output document through syntax.

• Programmatically partition output into separate output documents (for example, results for males in one output document and results for females in a separate one).

• Work with multiple open output documents in a given session, selectively appending new results to the appropriate document.

The OUTPUT NAME command assigns a name to the designated output document. The designated output document is the one most recently opened (by OUTPUT NEW or OUTPUT OPEN) or activated (by OUTPUT ACTIVATE). The document name is used to reference the document in any subsequent OUTPUT ACTIVATE, OUTPUT SAVE, and OUTPUT CLOSE commands.

Basic Specification

The basic specification for OUTPUT NAME is the command name followed by a name that conforms to variable naming rules. See the topic Variable Names for more information. The NAME keyword is optional, but if it is used it must be followed by an equals sign.

Operations Collapse Hide details

Operations

• The association with the existing name is broken, and the new name is assigned to the document.

• If the specified name is associated with another document, that association is broken and the name is associated with the designated output document. The document previously associated with the specified name is assigned a new unique name.

Example Collapse Hide details

Example

GET FILE='/examples/data/SurveyData.sav'.

TEMPORARY.
SELECT IF (Sex='Male').
FREQUENCIES VARIABLES=ALL.
OUTPUT NAME males.

TEMPORARY.
SELECT IF (Sex='Female').
OUTPUT NEW NAME=females.
FREQUENCIES VARIABLES=ALL.

GET FILE='/examples/data/Preference.sav'.

TEMPORARY.
SELECT IF (Sex='Female').
DESCRIPTIVES VARIABLES=product1 product2 product3.

TEMPORARY.
SELECT IF (Sex='Male').
OUTPUT ACTIVATE males.
DESCRIPTIVES VARIABLES=product1 product2 product3.

OUTPUT SAVE NAME=males OUTFILE='/examples/output/Males.spv'.
OUTPUT SAVE NAME=females OUTFILE='/examples/output/Females.spv'.

• The first GET command loads survey data for males and females.

• FREQUENCIES output for male respondents is written to the designated output document. The OUTPUT NAME command is used to assign the name males to the designated output document.

• FREQUENCIES output for female respondents is written to a new output document named females.

• The second GET command loads preferences data for males and females.

• Descriptive statistics for females are appended to the output document named females and those for males are appended to the output document named males. Each output document now contains both survey and preferences results.

• The two open output documents are saved to separate files. Because the operation of saving an output document does not close it, both documents remain open. The output document named males remains the designated output document.

Related Topics

OUTPUT ACTIVATE
Overview (OUTPUT ACTIVATE command)
OUTPUT CLOSE
Overview (OUTPUT CLOSE command)
OUTPUT DISPLAY
Overview (OUTPUT DISPLAY command)
OUTPUT EXPORT
OUTPUT NAME
OUTPUT NEW
Overview (OUTPUT NEW command)
OUTPUT OPEN
Overview (OUTPUT OPEN command)
OUTPUT SAVE
Overview (OUTPUT SAVE command)


OUTPUT NEW

OUTPUT NEW (command),OUTPUT NEW (command),OUTPUT NEW (command)
OUTPUT NEW (command),OUTPUT NEW (command),OUTPUT NEW (command)
syntax chart,syntax chart,syntax chart
release history,release history,release history
OUTPUT NEW [NAME=name]

This command takes effect immediately. It does not read the active dataset or execute pending transformations. See the topic Command Order for more information.

Release History Collapse Hide details

Release History

Release 15.0

• Command introduced.

Release 16.0

• TYPE keyword is obsolete and is ignored.

Example

GET FILE='/examples/data/Males.sav'.
FREQUENCIES VARIABLES=ALL.
OUTPUT SAVE OUTFILE='/examples/output/Males.spv'.
OUTPUT NEW.

GET FILE='/examples/data/Females.sav'.
FREQUENCIES VARIABLES=ALL.
OUTPUT SAVE OUTFILE='/examples/output/Females.spv'.

Related Topics

OUTPUT ACTIVATE
Overview (OUTPUT ACTIVATE command)
OUTPUT CLOSE
Overview (OUTPUT CLOSE command)
OUTPUT DISPLAY
Overview (OUTPUT DISPLAY command)
OUTPUT EXPORT
OUTPUT NAME
Overview (OUTPUT NAME command)
Overview (OUTPUT NEW command)
OUTPUT OPEN
Overview (OUTPUT OPEN command)
OUTPUT SAVE
Overview (OUTPUT SAVE command)


Overview (OUTPUT NEW command)

OUTPUT NEW (command),OUTPUT NEW (command),OUTPUT NEW (command)

The OUTPUT commands (OUTPUT NEW, OUTPUT NAME, OUTPUT ACTIVATE, OUTPUT OPEN, OUTPUT SAVE, OUTPUT CLOSE) provide the ability to programmatically manage one or many output documents. These functions allow you to:

• Save an output document through syntax.

• Programmatically partition output into separate output documents (for example, results for males in one output document and results for females in a separate one).

• Work with multiple open output documents in a given session, selectively appending new results to the appropriate document.

The OUTPUT NEW command creates a new output document, which becomes the designated output document. Subsequent procedure output is directed to the new output document until the document is closed or another output document is created, opened, or activated.

Basic Specification

The basic specification for OUTPUT NEW is simply the command name.

TYPE Keyword

This keyword is obsolete and is ignored. The only valid output type is Viewer. Draft Viewer format is no longer supported. To produce text output equivalent to Draft Viewer output use OMS. See the topic OMS for more information.

NAME Keyword

By default, the newly created output document is provided with a unique name. You can optionally specify a custom name for the output document, overriding the default name. The document name is used to reference the document in any subsequent OUTPUT ACTIVATE, OUTPUT SAVE, and OUTPUT CLOSE commands.

• The specified name must conform to variable naming rules. See the topic Variable Names for more information.

• If the specified name is associated with another document, that association is broken and the name is associated with the new document. The document previously associated with the specified name is assigned a new unique name.

Syntax Rules Collapse Hide details

Syntax Rules

• An error occurs if a keyword is specified more than once.

• Keywords must be spelled in full.

• Equals signs (=) used in the syntax chart are required elements.

Operations Collapse Hide details

Operations

The new output document is opened in a window in the user interface and becomes the designated output window.

Limitations Collapse Hide details

Limitations

Because each window requires a minimum amount of memory, there is a limit to the number of windows, PASW Statistics or otherwise, that can be concurrently open on a given system. The particular number depends on the specifications of your system and may be independent of total memory due to OS constraints.

Example Collapse Hide details

Example

GET FILE='/examples/data/Males.sav'.
FREQUENCIES VARIABLES=ALL.
OUTPUT SAVE OUTFILE='/examples/output/Males.spv'.
OUTPUT NEW.

GET FILE='/examples/data/Females.sav'.
FREQUENCIES VARIABLES=ALL.
OUTPUT SAVE OUTFILE='/examples/output/Females.spv'.

• FREQUENCIES produces summary statistics for each variable in /examples/data/Males.sav. The output from FREQUENCIES is added to the designated output document (one is created automatically if no output document is currently open).

• OUTPUT SAVE writes the contents of the designated output document to /examples/output/Males.spv.

• OUTPUT NEW creates a new Viewer document, which becomes the designated output document.

• The subsequent FREQUENCIES command produces output for females using the data in /examples/data/Females.sav. OUTPUT SAVE writes this output to /examples/output/Females.spv.

As shown in this example, OUTPUT NEW allows you to direct results to an new output document. If OUTPUT NEW were not specified, /examples/output/Females.spv would contain frequencies for both males and females.

Related Topics

OUTPUT ACTIVATE
Overview (OUTPUT ACTIVATE command)
OUTPUT CLOSE
Overview (OUTPUT CLOSE command)
OUTPUT DISPLAY
Overview (OUTPUT DISPLAY command)
OUTPUT EXPORT
OUTPUT NAME
Overview (OUTPUT NAME command)
OUTPUT NEW
OUTPUT OPEN
Overview (OUTPUT OPEN command)
OUTPUT SAVE
Overview (OUTPUT SAVE command)


OUTPUT OPEN

OUTPUT OPEN (command),OUTPUT OPEN (command),OUTPUT OPEN (command)
OUTPUT OPEN (command),OUTPUT OPEN (command),OUTPUT OPEN (command)
syntax chart,syntax chart,syntax chart
release history,release history,release history
OUTPUT OPEN FILE='file specification' [NAME=name]
   [LOCK={YES**}]
         {NO   }

** Default if the subcommand or keyword is omitted.

This command takes effect immediately. It does not read the active dataset or execute pending transformations. See the topic Command Order for more information.

Release History Collapse Hide details

Release History

Release 15.0

• Command introduced.

Release 17.0

• LOCK keyword introduced.

Example

OUTPUT OPEN FILE='/examples/output/Q1Output.spv'.
GET FILE='/examples/data/March.sav'.
FREQUENCIES VARIABLES=ALL.
OUTPUT SAVE OUTFILE='/examples/output/Q1Output.spv'.

Related Topics

OUTPUT ACTIVATE
Overview (OUTPUT ACTIVATE command)
OUTPUT CLOSE
Overview (OUTPUT CLOSE command)
OUTPUT DISPLAY
Overview (OUTPUT DISPLAY command)
OUTPUT EXPORT
OUTPUT NAME
Overview (OUTPUT NAME command)
OUTPUT NEW
Overview (OUTPUT NEW command)
Overview (OUTPUT OPEN command)
OUTPUT SAVE
Overview (OUTPUT SAVE command)


Overview (OUTPUT OPEN command)

OUTPUT OPEN (command),OUTPUT OPEN (command),OUTPUT OPEN (command)

The OUTPUT commands (OUTPUT NEW, OUTPUT NAME, OUTPUT ACTIVATE, OUTPUT OPEN, OUTPUT SAVE, OUTPUT CLOSE) provide the ability to programmatically manage one or many output documents. These functions allow you to:

• Save an output document through syntax.

• Programmatically partition output into separate output documents (for example, results for males in one output document and results for females in a separate one).

• Work with multiple open output documents in a given session, selectively appending new results to the appropriate document.

The OUTPUT OPEN command opens a Viewer document, which becomes the designated output document. You can use OUTPUT OPEN to append output to an existing output document. Once opened, subsequent procedure output is directed to the document until it is closed or until another output document is created, opened, or activated.

Basic Specification

The basic specification for OUTPUT OPEN is the command name followed by a file specification for the file to open.

NAME Keyword

By default, the newly opened output document is provided with a unique name. You can optionally specify a custom name for the output document, overriding the default name. The document name is used to reference the document in any subsequent OUTPUT ACTIVATE, OUTPUT SAVE, and OUTPUT CLOSE commands.

• The specified name must conform to variable naming rules. See the topic Variable Names for more information.

• If the specified name is associated with another document, that association is broken and the name is associated with the newly opened document. The document previously associated with the specified name is assigned a new unique name.

LOCK Keyword

The LOCK keyword only applies when opening a file from a repository. It specifies whether the file is locked (in the repository) when opened. Locking a file prevents other users from modifying it while you are working with it. Other users can open locked files but they cannot save them back to the repository. The lock is released when the file is closed or when the current session ends.

• By default, files are opened as locked.

• The LOCK keyword is ignored if the specified file does not reside in a repository.

See the topic File Specifications for Repository Objects for more information.

Syntax Rules Collapse Hide details

Syntax Rules

• An error occurs if a keyword is specified more than once.

• Keywords must be spelled in full.

• Equals signs (=) used in the syntax chart are required elements.

Operations Collapse Hide details

Operations

• The output document is opened in a window in the user interface and becomes the designated output window.

• An error occurs, but processing continues, if the specified file is not found. Output continues to be directed to the last designated output document.

• An error occurs, but processing continues, if the specified file is not a Viewer document. Output continues to be directed to the last designated output document.

• OUTPUT OPEN honors file handles and changes to the working directory made with the CD command.

Limitations Collapse Hide details

Limitations

• Because each window requires a minimum amount of memory, there is a limit to the number of windows, PASW Statistics or otherwise, that can be concurrently open on a given system. The particular number depends on the specifications of your system and may be independent of total memory due to OS constraints.

• OUTPUT OPEN is not supported in the PASW Statistics Batch Facility (available with PASW Statistics Server).

Example Collapse Hide details

Example

OUTPUT OPEN FILE='/examples/output/Q1Output.spv'.
GET FILE='/examples/data/March.sav'.
FREQUENCIES VARIABLES=ALL.
OUTPUT SAVE OUTFILE='/examples/output/Q1Output.spv'.

• OUTPUT OPEN opens the Viewer document /examples/output/Q1Output.spv. The document contains summaries for the months of January and February.

• The GET command opens a file containing data for the month of March.

• The FREQUENCIES command produces summaries for March data, which are appended to the designated output document.

• OUTPUT SAVE saves the designated output document to /examples/output/Q1Output.spv. The saved document contains results for each of the three months in the first quarter.

Related Topics

OUTPUT ACTIVATE
Overview (OUTPUT ACTIVATE command)
OUTPUT CLOSE
Overview (OUTPUT CLOSE command)
OUTPUT DISPLAY
Overview (OUTPUT DISPLAY command)
OUTPUT EXPORT
OUTPUT NAME
Overview (OUTPUT NAME command)
OUTPUT NEW
Overview (OUTPUT NEW command)
OUTPUT OPEN
OUTPUT SAVE
Overview (OUTPUT SAVE command)


OUTPUT SAVE

saving output,saving output,saving output
saving output using command syntax,saving output using command syntax,saving output using command syntax
OUTPUT SAVE (command),OUTPUT SAVE (command),OUTPUT SAVE (command)
OUTPUT SAVE (command),OUTPUT SAVE (command),OUTPUT SAVE (command)
syntax chart,syntax chart,syntax chart
release history,release history,release history
OUTPUT SAVE [NAME={*   }]
                  {name}
  OUTFILE='file specification'
  [TYPE={SPV**}]
        (SPW  }
  [LOCK={NO**}
        {YES }

** Default if the keyword is omitted.

This command takes effect immediately. It does not read the active dataset or execute pending transformations. See the topic Command Order for more information.

Release History Collapse Hide details

Release History

Release 15.0

• Command introduced.

Release 16.0

• TYPE keyword introduced.

Release 17.0

• LOCK keyword introduced.

Example

OUTPUT OPEN FILE='/examples/output/Q1Output.spv'.
GET FILE='/examples/data/March.sav'.
FREQUENCIES VARIABLES=ALL.
OUTPUT SAVE OUTFILE='/examples/output/Q1Output.spv'.

Related Topics

OUTPUT ACTIVATE
Overview (OUTPUT ACTIVATE command)
OUTPUT CLOSE
Overview (OUTPUT CLOSE command)
OUTPUT DISPLAY
Overview (OUTPUT DISPLAY command)
OUTPUT EXPORT
OUTPUT NAME
Overview (OUTPUT NAME command)
OUTPUT NEW
Overview (OUTPUT NEW command)
OUTPUT OPEN
Overview (OUTPUT OPEN command)
Overview (OUTPUT SAVE command)


Overview (OUTPUT SAVE command)

OUTPUT SAVE (command),OUTPUT SAVE (command),OUTPUT SAVE (command)

The OUTPUT commands (OUTPUT NEW, OUTPUT NAME, OUTPUT ACTIVATE, OUTPUT OPEN, OUTPUT SAVE, OUTPUT CLOSE) provide the ability to programmatically manage one or many output documents. These functions allow you to:

• Save an output document through syntax.

• Programmatically partition output into separate output documents (for example, results for males in one output document and results for females in a separate one).

• Work with multiple open output documents in a given session, selectively appending new results to the appropriate document.

The OUTPUT SAVE command saves the contents of an open output document to a file.

Basic Specification

The basic specification for OUTPUT SAVE is the command name followed by a file specification for the destination file.

NAME Keyword

Use the NAME keyword to save an output document other than the designated one. Provide the name associated with the document.

TYPE Keyword

Use the TYPE keyword to specify the format of the output file--SPV for standard output files and SPW for the PASW Statistics Web Reports format. Files in the SPW format that are stored in a repository can be viewed and manipulated over the Web, in real time, using a standard browser with release 3.5 or higher of PASW Collaboration and Deployment Services.

• spw files created from OUTPUT SAVE contain all visible objects from the associated Viewer window, and pivot tables are saved as interactive, meaning they can be manipulated when viewed over the Web. If you need greater control over items saved to an spw file, use the OMS command.

LOCK Keyword

Use LOCK=YES to prevent editing of Viewer documents in Smartreader (a separate product for working with Viewer documents). If a Viewer document is locked, you can manipulate pivot tables (swap rows and columns, change the displayed layer, etc.) but you cannot edit any output or save any changes to the Viewer document in Smartreader. This setting has no effect on Viewer documents opened in PASW Statistics. The default is LOCK=NO.

Syntax Rules Collapse Hide details

Syntax Rules

• An error occurs if a keyword is specified more than once.

• Keywords must be spelled in full.

• Equals signs (=) used in the syntax chart are required elements.

Operations Collapse Hide details

Operations

• By default, the designated output document is saved. The designated output document is the one most recently opened (by OUTPUT NEW or OUTPUT OPEN) or activated (by OUTPUT ACTIVATE).

• If the specified file already exists, OUTPUT SAVE overwrites it without warning.

• An error occurs if you specify a nonexistent output document.

• An error occurs if the file specification is invalid.

• OUTPUT SAVE saves the document but does not close it. Use OUTPUT CLOSE to close the document.

• OUTPUT SAVE honors file handles and changes to the working directory made with the CD command.

Limitations Collapse Hide details

Limitations

• OUTPUT SAVE is not supported in the PASW Statistics Batch Facility (available with PASW Statistics Server).

Example Collapse Hide details

Example

OUTPUT OPEN FILE='/examples/output/Q1Output.spv'.
GET FILE='/examples/data/March.sav'.
FREQUENCIES VARIABLES=ALL.
OUTPUT SAVE OUTFILE='/examples/output/Q1Output.spv'.

• OUTPUT OPEN opens the Viewer document /examples/output/Q1Output.spv. The document contains summaries for the months of January and February.

• GET opens a file containing new data for March.

• FREQUENCIES produces frequencies for March data, which are appended to the designated output document.

• OUTPUT SAVE saves the contents of the designated output document to /examples/output/Q1Output.spv, which now contains results for the entire first quarter.

Related Topics

OUTPUT ACTIVATE
Overview (OUTPUT ACTIVATE command)
OUTPUT CLOSE
Overview (OUTPUT CLOSE command)
OUTPUT DISPLAY
Overview (OUTPUT DISPLAY command)
OUTPUT EXPORT
OUTPUT NAME
Overview (OUTPUT NAME command)
OUTPUT NEW
Overview (OUTPUT NEW command)
OUTPUT OPEN
Overview (OUTPUT OPEN command)
OUTPUT SAVE


OVERALS

OVERALS (command),OVERALS (command),OVERALS (command)
OVERALS (command),OVERALS (command),OVERALS (command)
syntax chart,syntax chart,syntax chart
Nonlinear Canonical Correlation Analysis,Nonlinear Canonical Correlation Analysis,Nonlinear Canonical Correlation Analysis
command syntax,command syntax,command syntax

OVERALS is available in the Categories option.

OVERALS VARIABLES=varlist (max)

/ANALYSIS=varlist[({ORDI**})]
                   {SNOM  }
                   {MNOM  }
                   {NUME  }

/SETS= n (# of vars in set 1, ..., # of vars in set n)

[/NOBSERVATIONS=value]

[/DIMENSION={2**  }]
            {value}

[/INITIAL={NUMERICAL**}]
          {RANDOM     }

[/MAXITER={100**}]
          {value}

[/CONVERGENCE={.00001**}]
              {value   }

[/PRINT=[DEFAULT] [FREQ**] [QUANT] [CENTROID**]
        [HISTORY] [WEIGHTS**]
        [OBJECT] [FIT] [NONE]]

[/PLOT=[NDIM=({1    ,2    }**)]
              {value,value}
              {ALL  ,MAX  }
       [DEFAULT[(n)]] [OBJECT**[(varlist)][(n)]]
       [QUANT[(varlist)][(n)]] [LOADINGS**[(n)]]
       [TRANS[(varlist)]] [CENTROID[(varlist)][(n)]]
       [NONE]]

[/SAVE=[rootname][(value)]]

[/MATRIX=OUT({*                  })]
             {'savfile'|'dataset'}

**Default if the subcommand or keyword is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See OVERALS Algorithms for computational details for this procedure.

Syntax for the OVERALS command can be generated from the Nonlinear Canonical Correlation Analysis (OVERALS) dialog.

Example

OVERALS VARIABLES=PRETEST1 PRETEST2 POSTEST1 POSTEST2(20)
SES(5) SCHOOL(3)
/ANALYSIS=PRETEST1 TO POSTEST2 (NUME) SES (ORDI) SCHOOL (SNOM)
/SETS=3(2,2,2).

Related Topics

Overview (OVERALS command)
Examples (OVERALS command)
VARIABLES Subcommand (OVERALS command)
ANALYSIS Subcommand (OVERALS command)
SETS Subcommand (OVERALS command)
NOBSERVATIONS Subcommand (OVERALS command)
DIMENSION Subcommand (OVERALS command)
INITIAL Subcommand (OVERALS command)
MAXITER Subcommand (OVERALS command)
CONVERGENCE Subcommand (OVERALS command)
PRINT Subcommand (OVERALS command)
PLOT Subcommand (OVERALS command)
SAVE Subcommand (OVERALS command)
MATRIX Subcommand (OVERALS command)


Overview (OVERALS command)

OVERALS performs nonlinear canonical correlation analysis on two or more sets of variables. Variables can have different optimal scaling levels, and no assumptions are made about the distribution of the variables or the linearity of the relationships.

Options Collapse Hide details

Options

Optimal Scaling Levels. You can specify the level of optimal scaling at which you want to analyze each variable.

Number of Dimensions. You can specify how many dimensions OVERALS should compute.

Iterations and Convergence. You can specify the maximum number of iterations and the value of a convergence criterion.

Display Output. The output can include all available statistics, only the default statistics, or only the specific statistics that you request. You can also control whether some of these statistics are plotted.

Saving Scores. You can save object scores in the active dataset.

Writing Matrices. You can write a matrix data file containing quantification scores, centroids, weights, and loadings for use in further analyses.

Basic Specification Collapse Hide details

Basic Specification

• The basic specification is command OVERALS, the VARIABLES subcommand, the ANALYSIS subcommand, and the SETS subcommand. By default, OVERALS estimates a two-dimensional solution and displays a table listing optimal scaling levels of each variable by set, eigenvalues and loss values by set, marginal frequencies, centroids and weights for all variables, and plots of the object scores and component loadings.

Subcommand Order Collapse Hide details

Subcommand Order

• The VARIABLES subcommand, ANALYSIS subcommand, and SETS subcommand must appear in that order before all other subcommands.

• Other subcommands can appear in any order.

AUTORECODE (command),AUTORECODE (command),AUTORECODE (command)
with OVERALS command,with OVERALS command,with OVERALS command
OVERALS (command),OVERALS (command),OVERALS (command)
with AUTORECODE command,with AUTORECODE command,with AUTORECODE command
RECODE (command),RECODE (command),RECODE (command)
with OVERALS command,with OVERALS command,with OVERALS command
OVERALS (command),OVERALS (command),OVERALS (command)
with RECODE command,with RECODE command,with RECODE command
Operations Collapse Hide details

Operations

• If the ANALYSIS subcommand is specified more than once, OVERALS is not executed. For all other subcommands, if a subcommand is specified more than once, only the last occurrence is executed.

• OVERALS treats every value in the range 1 to the maximum value that is specified on VARIABLES as a valid category. To avoid unnecessary output, use the AUTORECODE or RECODE command to recode a categorical variable that has nonsequential values or that has a large number of categories. For variables that are treated as numeric, recoding is not recommended because the characteristic of equal intervals in the data will not be maintained (see AUTORECODE and RECODE for more information).

missing values,missing values,missing values
with OVERALS command,with OVERALS command,with OVERALS command
Limitations Collapse Hide details

Limitations

• String variables are not allowed; use AUTORECODE to recode nominal string variables.

• The data must be positive integers. Zeros and negative values are treated as system-missing, which means that they are excluded from the analysis. Fractional values are truncated after the decimal and are included in the analysis. If one of the levels of a categorical variable has been coded 0 or some negative value, and you want to treat it as a valid category, use the AUTORECODE or RECODE command to recode the values of that variable.

• OVERALS ignores user-missing value specifications. Positive user-missing values that are less than the maximum value that is specified on the VARIABLES subcommand are treated as valid category values and are included in the analysis. If you do not want the category to be included, use COMPUTE or RECODE to change the value to a value outside of the valid range. Values outside of the range (less than 1 or greater than the maximum value) are treated as system-missing and are excluded from the analysis.

• If one variable in a set has missing data, all variables in that set are missing for that object (case).

• Each set must have at least three valid (non-missing, non-empty) cases.

Related Topics

OVERALS
Examples (OVERALS command)
VARIABLES Subcommand (OVERALS command)
ANALYSIS Subcommand (OVERALS command)
SETS Subcommand (OVERALS command)
NOBSERVATIONS Subcommand (OVERALS command)
DIMENSION Subcommand (OVERALS command)
INITIAL Subcommand (OVERALS command)
MAXITER Subcommand (OVERALS command)
CONVERGENCE Subcommand (OVERALS command)
PRINT Subcommand (OVERALS command)
PLOT Subcommand (OVERALS command)
SAVE Subcommand (OVERALS command)
MATRIX Subcommand (OVERALS command)


Examples (OVERALS command)

OVERALS VARIABLES=PRETEST1 PRETEST2 POSTEST1 POSTEST2(20)
SES(5) SCHOOL(3)
/ANALYSIS=PRETEST1 TO POSTEST2 (NUME) SES (ORDI) SCHOOL (SNOM)
/SETS=3(2,2,2)
/PRINT=OBJECT FIT
/PLOT=QUANT(PRETEST1 TO SCHOOL).

• VARIABLES defines the variables and their maximum values.

• ANALYSIS specifies that all variables from PRETEST1 to POSTEST2 are to be analyzed at the numeric level of optimal scaling, SES is to be analyzed at the ordinal level, and SCHOOL is to be analyzed as a single nominal. These variables are all of the variables that will be used in the analysis.

• SETS specifies that there are three sets of variables to be analyzed and two variables in each set.

• PRINT lists the object and fit scores.

• PLOT plots the single-category and multiple-category coordinates of all variables in the analysis.

Related Topics

OVERALS
Overview (OVERALS command)
VARIABLES Subcommand (OVERALS command)
ANALYSIS Subcommand (OVERALS command)
SETS Subcommand (OVERALS command)
NOBSERVATIONS Subcommand (OVERALS command)
DIMENSION Subcommand (OVERALS command)
INITIAL Subcommand (OVERALS command)
MAXITER Subcommand (OVERALS command)
CONVERGENCE Subcommand (OVERALS command)
PRINT Subcommand (OVERALS command)
PLOT Subcommand (OVERALS command)
SAVE Subcommand (OVERALS command)
MATRIX Subcommand (OVERALS command)


VARIABLES Subcommand (OVERALS command)

VARIABLES (subcommand),VARIABLES (subcommand),VARIABLES (subcommand)
OVERALS command,OVERALS command,OVERALS command
OVERALS (command),OVERALS (command),OVERALS (command)
VARIABLES subcommand,VARIABLES subcommand,VARIABLES subcommand

VARIABLES specifies all variables in the current OVERALS procedure.

• The VARIABLES subcommand is required and precedes all other subcommands. The actual word VARIABLES can be omitted.

• Each variable or variable list is followed by the maximum value in parentheses.

Related Topics

OVERALS
Overview (OVERALS command)
Examples (OVERALS command)
ANALYSIS Subcommand (OVERALS command)
SETS Subcommand (OVERALS command)
NOBSERVATIONS Subcommand (OVERALS command)
DIMENSION Subcommand (OVERALS command)
INITIAL Subcommand (OVERALS command)
MAXITER Subcommand (OVERALS command)
CONVERGENCE Subcommand (OVERALS command)
PRINT Subcommand (OVERALS command)
PLOT Subcommand (OVERALS command)
SAVE Subcommand (OVERALS command)
MATRIX Subcommand (OVERALS command)


ANALYSIS Subcommand (OVERALS command)

ANALYSIS (subcommand),ANALYSIS (subcommand),ANALYSIS (subcommand)
OVERALS command,OVERALS command,OVERALS command
OVERALS (command),OVERALS (command),OVERALS (command)
ANALYSIS subcommand,ANALYSIS subcommand,ANALYSIS subcommand

ANALYSIS specifies the variables to be used in the analysis and the optimal scaling level at which each variable is to be analyzed.

• The ANALYSIS subcommand is required and follows the VARIABLES subcommand.

ANALYSIS (subcommand),ANALYSIS (subcommand),ANALYSIS (subcommand)
with VARIABLES subcommand,with VARIABLES subcommand,with VARIABLES subcommand
VARIABLES (subcommand),VARIABLES (subcommand),VARIABLES (subcommand)
with ANALYSIS subcommand,with ANALYSIS subcommand,with ANALYSIS subcommand
OVERALS (command),OVERALS (command),OVERALS (command)
passive variables,passive variables,passive variables

• The specification on ANALYSIS is a variable list and an optional keyword in parentheses, indicating the level of optimal scaling.

• The variables on ANALYSIS must also be specified on the VARIABLES subcommand.

OVERALS (command),OVERALS (command),OVERALS (command)
active variables,active variables,active variables

• Only active variables are listed on the ANALYSIS subcommand. Active variables are those variables that are used in the computation of the solution. Passive variables, those variables that are listed on the VARIABLES subcommand but not on the ANALYSIS subcommand, are ignored in the OVERALS solution. Object score plots can still be labeled by passive variables.

OVERALS (command),OVERALS (command),OVERALS (command)
optimal scaling level,optimal scaling level,optimal scaling level
optimal scaling level,optimal scaling level,optimal scaling level
OVERALS command,OVERALS command,OVERALS command

The following keywords can be specified to indicate the optimal scaling level:

MNOM (keyword),MNOM (keyword),MNOM (keyword)
OVERALS command,OVERALS command,OVERALS command
OVERALS (command),OVERALS (command),OVERALS (command)
compared with HOMALS,compared with HOMALS,compared with HOMALS
HOMALS (command),HOMALS (command),HOMALS (command)
compared with OVERALS,compared with OVERALS,compared with OVERALS
SNOM (keyword),SNOM (keyword),SNOM (keyword)
OVERALS command,OVERALS command,OVERALS command
OVERALS (command),OVERALS (command),OVERALS (command)
compared with PRINCALS,compared with PRINCALS,compared with PRINCALS
PRINCALS (command),PRINCALS (command),PRINCALS (command)
compared with OVERALS,compared with OVERALS,compared with OVERALS
ORDI (keyword),ORDI (keyword),ORDI (keyword)
OVERALS command,OVERALS command,OVERALS command
NUME (keyword),NUME (keyword),NUME (keyword)
OVERALS command,OVERALS command,OVERALS command
MNOM | Multiple nominal. The quantifications can be different for each dimension. When all variables are multiple nominal, and there is only one variable in each set, OVERALS gives the same results as HOMALS.
SNOM | Single nominal. OVERALS gives only one quantification for each category. Objects in the same category (cases with the same value on a variable) obtain the same quantification. When all variables are SNOM, ORDI, or NUME, and there is only one variable per set, OVERALS gives the same results as PRINCALS.
ORDI | Ordinal. This setting is the default for variables that are listed without optimal scaling levels. The order of the categories of the observed variable is preserved in the quantified variable.
NUME | Numerical. Interval or ratio scaling level. OVERALS assumes that the observed variable already has numerical values for its categories. When all variables are quantified at the numerical level, and there is only one variable per set, the OVERALS analysis is analogous to classical principal components analysis.

These keywords can apply to a variable list as well as to a single variable. Thus, the default ORDI is not applied to a variable without a keyword if a subsequent variable on the list has a keyword.

Related Topics

OVERALS
Overview (OVERALS command)
Examples (OVERALS command)
VARIABLES Subcommand (OVERALS command)
SETS Subcommand (OVERALS command)
NOBSERVATIONS Subcommand (OVERALS command)
DIMENSION Subcommand (OVERALS command)
INITIAL Subcommand (OVERALS command)
MAXITER Subcommand (OVERALS command)
CONVERGENCE Subcommand (OVERALS command)
PRINT Subcommand (OVERALS command)
PLOT Subcommand (OVERALS command)
SAVE Subcommand (OVERALS command)
MATRIX Subcommand (OVERALS command)


SETS Subcommand (OVERALS command)

SETS (subcommand),SETS (subcommand),SETS (subcommand)
OVERALS command,OVERALS command,OVERALS command
OVERALS (command),OVERALS (command),OVERALS (command)
SETS subcommand,SETS subcommand,SETS subcommand
SETS (subcommand),SETS (subcommand),SETS (subcommand)
with ANALYSIS subcommand,with ANALYSIS subcommand,with ANALYSIS subcommand
ANALYSIS (subcommand),ANALYSIS (subcommand),ANALYSIS (subcommand)
with SETS subcommand,with SETS subcommand,with SETS subcommand

SETS specifies how many sets of variables exist and how many variables are in each set.

• SETS is required and must follow the ANALYSIS subcommand.

• SETS is followed by an integer to indicate the number of variable sets. Following this integer is a list of values in parentheses, indicating the number of variables in each set.

• There must be at least two sets.

• The sum of the values in parentheses must equal the number of variables specified on the ANALYSIS subcommand. The variables in each set are read consecutively from the ANALYSIS subcommand.

An example is as follows:

/SETS=2(2,3)

This specification indicates that there are two sets. The first two variables that are named on ANALYSIS are the first set, and the last three variables that are named on ANALYSIS are the second set.

Related Topics

OVERALS
Overview (OVERALS command)
Examples (OVERALS command)
VARIABLES Subcommand (OVERALS command)
ANALYSIS Subcommand (OVERALS command)
NOBSERVATIONS Subcommand (OVERALS command)
DIMENSION Subcommand (OVERALS command)
INITIAL Subcommand (OVERALS command)
MAXITER Subcommand (OVERALS command)
CONVERGENCE Subcommand (OVERALS command)
PRINT Subcommand (OVERALS command)
PLOT Subcommand (OVERALS command)
SAVE Subcommand (OVERALS command)
MATRIX Subcommand (OVERALS command)


NOBSERVATIONS Subcommand (OVERALS command)

cases,cases,cases
excluding from OVERALS command,excluding from OVERALS command,excluding from OVERALS command
OVERALS (command),OVERALS (command),OVERALS (command)
excluding cases,excluding cases,excluding cases
NOBSERVATIONS (subcommand),NOBSERVATIONS (subcommand),NOBSERVATIONS (subcommand)
OVERALS command,OVERALS command,OVERALS command
OVERALS (command),OVERALS (command),OVERALS (command)
NOBSERVATIONS subcommand,NOBSERVATIONS subcommand,NOBSERVATIONS subcommand

NOBSERVATIONS specifies how many cases are used in the analysis.

• If NOBSERVATIONS is not specified, all available observations in the active dataset are used.

• NOBSERVATIONS is followed by an integer, indicating that the first n cases are to be used.

Related Topics

OVERALS
Overview (OVERALS command)
Examples (OVERALS command)
VARIABLES Subcommand (OVERALS command)
ANALYSIS Subcommand (OVERALS command)
SETS Subcommand (OVERALS command)
DIMENSION Subcommand (OVERALS command)
INITIAL Subcommand (OVERALS command)
MAXITER Subcommand (OVERALS command)
CONVERGENCE Subcommand (OVERALS command)
PRINT Subcommand (OVERALS command)
PLOT Subcommand (OVERALS command)
SAVE Subcommand (OVERALS command)
MATRIX Subcommand (OVERALS command)


DIMENSION Subcommand (OVERALS command)

DIMENSION (subcommand),DIMENSION (subcommand),DIMENSION (subcommand)
OVERALS command,OVERALS command,OVERALS command
OVERALS (command),OVERALS (command),OVERALS (command)
DIMENSION subcommand,DIMENSION subcommand,DIMENSION subcommand

DIMENSION specifies the number of dimensions that you want OVERALS to compute.

• If you do not specify the DIMENSION subcommand, OVERALS computes two dimensions.

• DIMENSION is followed by an integer indicating the number of dimensions.

• If all variables are SNOM (single nominal), ORDI (ordinal), or NUME (numerical), the maximum number of dimensions that you can specify is the total number of variables on the ANALYSIS subcommand.

• If some or all variables are MNOM (multiple nominal), the maximum number of dimensions that you can specify is the number of MNOM variable levels (categories) plus the number of non-MNOM variables, minus the number of MNOM variables.

• The maximum number of dimensions must be less than the number of observations minus 1.

• If the number of sets is 2, and all variables are SNOM, ORDI, or NUME, the number of dimensions should not be more than the number of variables in the smaller set.

• If the specified value is too large, OVERALS tries to adjust the number of dimensions to the allowable maximum. OVERALS might not be able to adjust if there are MNOM variables with missing data.

Related Topics

OVERALS
Overview (OVERALS command)
Examples (OVERALS command)
VARIABLES Subcommand (OVERALS command)
ANALYSIS Subcommand (OVERALS command)
SETS Subcommand (OVERALS command)
NOBSERVATIONS Subcommand (OVERALS command)
INITIAL Subcommand (OVERALS command)
MAXITER Subcommand (OVERALS command)
CONVERGENCE Subcommand (OVERALS command)
PRINT Subcommand (OVERALS command)
PLOT Subcommand (OVERALS command)
SAVE Subcommand (OVERALS command)
MATRIX Subcommand (OVERALS command)


INITIAL Subcommand (OVERALS command)

INITIAL (subcommand),INITIAL (subcommand),INITIAL (subcommand)
OVERALS command,OVERALS command,OVERALS command
OVERALS (command),OVERALS (command),OVERALS (command)
INITIAL subcommand,INITIAL subcommand,INITIAL subcommand

The INITIAL subcommand specifies the method that is used to compute the initial configuration.

• The specification on INITIAL is keyword NUMERICAL or RANDOM. If the INITIAL subcommand is not specified, NUMERICAL is the default.

NUMERICAL (keyword),NUMERICAL (keyword),NUMERICAL (keyword)
OVERALS command,OVERALS command,OVERALS command
RANDOM (keyword),RANDOM (keyword),RANDOM (keyword)
OVERALS command,OVERALS command,OVERALS command
NUMERICAL | Treat all variables except multiple nominal as numerical. This specification is best to use when there are no SNOM variables.
RANDOM | Compute a random initial configuration. This specification should be used only when some or all variables are SNOM.

Related Topics

OVERALS
Overview (OVERALS command)
Examples (OVERALS command)
VARIABLES Subcommand (OVERALS command)
ANALYSIS Subcommand (OVERALS command)
SETS Subcommand (OVERALS command)
NOBSERVATIONS Subcommand (OVERALS command)
DIMENSION Subcommand (OVERALS command)
MAXITER Subcommand (OVERALS command)
CONVERGENCE Subcommand (OVERALS command)
PRINT Subcommand (OVERALS command)
PLOT Subcommand (OVERALS command)
SAVE Subcommand (OVERALS command)
MATRIX Subcommand (OVERALS command)


MAXITER Subcommand (OVERALS command)

MAXITER (subcommand),MAXITER (subcommand),MAXITER (subcommand)
OVERALS command,OVERALS command,OVERALS command
OVERALS (command),OVERALS (command),OVERALS (command)
MAXITER subcommand,MAXITER subcommand,MAXITER subcommand

MAXITER specifies the maximum number of iterations that OVERALS can go through in its computations.

• If MAXITER is not specified, OVERALS will iterate up to 100 times.

• The specification on MAXITER is an integer indicating the maximum number of iterations.

Related Topics

OVERALS
Overview (OVERALS command)
Examples (OVERALS command)
VARIABLES Subcommand (OVERALS command)
ANALYSIS Subcommand (OVERALS command)
SETS Subcommand (OVERALS command)
NOBSERVATIONS Subcommand (OVERALS command)
DIMENSION Subcommand (OVERALS command)
INITIAL Subcommand (OVERALS command)
CONVERGENCE Subcommand (OVERALS command)
PRINT Subcommand (OVERALS command)
PLOT Subcommand (OVERALS command)
SAVE Subcommand (OVERALS command)
MATRIX Subcommand (OVERALS command)


CONVERGENCE Subcommand (OVERALS command)

CONVERGENCE (subcommand),CONVERGENCE (subcommand),CONVERGENCE (subcommand)
OVERALS command,OVERALS command,OVERALS command
OVERALS (command),OVERALS (command),OVERALS (command)
CONVERGENCE subcommand,CONVERGENCE subcommand,CONVERGENCE subcommand

CONVERGENCE specifies a convergence criterion value. OVERALS stops iterating if the difference in fit between the last two iterations is less than the CONVERGENCE value.

• The default CONVERGENCE value is 0.00001.

• The specification on CONVERGENCE is any value that is greater than 0.000001. (Values that are less than this value might seriously affect performance.)

Related Topics

OVERALS
Overview (OVERALS command)
Examples (OVERALS command)
VARIABLES Subcommand (OVERALS command)
ANALYSIS Subcommand (OVERALS command)
SETS Subcommand (OVERALS command)
NOBSERVATIONS Subcommand (OVERALS command)
DIMENSION Subcommand (OVERALS command)
INITIAL Subcommand (OVERALS command)
MAXITER Subcommand (OVERALS command)
PRINT Subcommand (OVERALS command)
PLOT Subcommand (OVERALS command)
SAVE Subcommand (OVERALS command)
MATRIX Subcommand (OVERALS command)


PRINT Subcommand (OVERALS command)

PRINT (subcommand),PRINT (subcommand),PRINT (subcommand)
OVERALS command,OVERALS command,OVERALS command
OVERALS (command),OVERALS (command),OVERALS (command)
PRINT subcommand,PRINT subcommand,PRINT subcommand

PRINT controls which statistics are included in your display output. The default output includes a table that lists optimal scaling levels of each variable by set; eigenvalues and loss values by set by dimension; and the output that is produced by keywords FREQ, CENTROID, and WEIGHTS.

The following keywords are available:

FREQ (keyword),FREQ (keyword),FREQ (keyword)
OVERALS command,OVERALS command,OVERALS command
HISTORY (keyword),HISTORY (keyword),HISTORY (keyword)
OVERALS command,OVERALS command,OVERALS command
FIT (keyword),FIT (keyword),FIT (keyword)
OVERALS command,OVERALS command,OVERALS command
CENTROID (keyword),CENTROID (keyword),CENTROID (keyword)
OVERALS command,OVERALS command,OVERALS command
OBJECT (keyword),OBJECT (keyword),OBJECT (keyword)
OVERALS command,OVERALS command,OVERALS command
QUANT (keyword),QUANT (keyword),QUANT (keyword)
OVERALS command,OVERALS command,OVERALS command
WEIGHTS (keyword),WEIGHTS (keyword),WEIGHTS (keyword)
OVERALS command,OVERALS command,OVERALS command
DEFAULT (keyword),DEFAULT (keyword),DEFAULT (keyword)
OVERALS command,OVERALS command,OVERALS command
NONE (keyword),NONE (keyword),NONE (keyword)
OVERALS command,OVERALS command,OVERALS command
FREQ | Marginal frequencies for the variables in the analysis.
HISTORY | History of the iterations.
FIT | Multiple fit, single fit, and single loss per variable.
CENTROID | Category quantification scores, the projected centroids, and the centroids.
OBJECT | Object scores.
QUANT | Category quantifications and the single and multiple coordinates.
WEIGHTS | Weights and component loadings.
DEFAULT | FREQ, CENTROID, and WEIGHTS.
NONE | Summary loss statistics.

Related Topics

OVERALS
Overview (OVERALS command)
Examples (OVERALS command)
VARIABLES Subcommand (OVERALS command)
ANALYSIS Subcommand (OVERALS command)
SETS Subcommand (OVERALS command)
NOBSERVATIONS Subcommand (OVERALS command)
DIMENSION Subcommand (OVERALS command)
INITIAL Subcommand (OVERALS command)
MAXITER Subcommand (OVERALS command)
CONVERGENCE Subcommand (OVERALS command)
PLOT Subcommand (OVERALS command)
SAVE Subcommand (OVERALS command)
MATRIX Subcommand (OVERALS command)


PLOT Subcommand (OVERALS command)

PLOT (subcommand),PLOT (subcommand),PLOT (subcommand)
OVERALS command,OVERALS command,OVERALS command
OVERALS (command),OVERALS (command),OVERALS (command)
PLOT subcommand,PLOT subcommand,PLOT subcommand

PLOT can be used to produce plots of transformations, object scores, coordinates, centroids, and component loadings.

• If PLOT is not specified, plots of the object scores and component loadings are produced.

The following keywords can be specified on PLOT:

LOADINGS (keyword),LOADINGS (keyword),LOADINGS (keyword)
OVERALS command,OVERALS command,OVERALS command
OBJECT (keyword),OBJECT (keyword),OBJECT (keyword)
OVERALS command,OVERALS command,OVERALS command
TRANS (keyword),TRANS (keyword),TRANS (keyword)
OVERALS command,OVERALS command,OVERALS command
QUANT (keyword),QUANT (keyword),QUANT (keyword)
OVERALS command,OVERALS command,OVERALS command
CENTROID (keyword),CENTROID (keyword),CENTROID (keyword)
OVERALS command,OVERALS command,OVERALS command
DEFAULT (keyword),DEFAULT (keyword),DEFAULT (keyword)
OVERALS command,OVERALS command,OVERALS command
NONE (keyword),NONE (keyword),NONE (keyword)
OVERALS command,OVERALS command,OVERALS command
LOADINGS | Plot of the component loadings.
OBJECT | Plot of the object scores.
TRANS | Plot of category quantifications.
QUANT | Plot of all category coordinates.
CENTROID | Plot of all category centroids.
DEFAULT | OBJECT and LOADINGS.
NONE | No plots.
centroid plots,centroid plots,centroid plots
OVERALS command,OVERALS command,OVERALS command
transformation plots,transformation plots,transformation plots
OVERALS command,OVERALS command,OVERALS command

• Keywords OBJECT, QUANT, and CENTROID can each be followed by a variable list in parentheses to indicate that plots should be labeled with these variables. For QUANT and CENTROID, the variables must be specified on both the VARIABLES and ANALYSIS subcommands. For OBJECT, the variables must be specified on VARIABLES but need not appear on ANALYSIS, meaning that variables that are not used in the computations can still be used to label OBJECT plots. If the variable list is omitted, the default plots are produced.

• Object score plots use category labels corresponding to all categories within the defined range. Objects in a category that is outside the defined range are labeled with the label corresponding to the category immediately following the defined maximum category.

value labels,value labels,value labels
as point labels OVERALS command,as point labels OVERALS command,as point labels OVERALS command
OVERALS (command),OVERALS (command),OVERALS (command)
variable labels,variable labels,variable labels
OVERALS (command),OVERALS (command),OVERALS (command)
value labels,value labels,value labels
variable labels,variable labels,variable labels
as plot labels OVERALS command,as plot labels OVERALS command,as plot labels OVERALS command

• If TRANS is followed by a variable list, only plots for those variables are produced. If a variable list is not specified, plots are produced for each variable.

• All keywords except NONE can be followed by an integer in parentheses to indicate how many characters of the variable or value label are to be used on the plot. (If you specified a variable list after OBJECT, CENTROID, TRANS, or QUANT, you can specify the value in parentheses after the list.) The value can range from 1 to 20. If the value is omitted, 12 characters are used. Spaces between words count as characters.

• If a variable label is missing, the variable name is used for that variable. If a value label is missing, the actual value is used.

• Make sure that your variable and value labels are unique by at least one letter in order to distinguish them on the plots.

• When points overlap, the points are described in a summary following the plot.

In addition to the plot keywords, the following keyword can be specified:

dimensions,dimensions,dimensions
OVERALS command,OVERALS command,OVERALS command
OVERALS (command),OVERALS (command),OVERALS (command)
dimensions,dimensions,dimensions
NDIM (keyword),NDIM (keyword),NDIM (keyword)
OVERALS command,OVERALS command,OVERALS command
NDIM Dimension pairs to be plotted. NDIM is followed by a pair of values in parentheses. If NDIM is not specified, plots are produced for dimension 1 versus dimension 2.

• The first value indicates the dimension that is plotted against all higher dimensions. This value can be any integer from 1 to the number of dimensions minus 1.

ALL (keyword),ALL (keyword),ALL (keyword)
OVERALS command,OVERALS command,OVERALS command

• The second value indicates the highest dimension to be used in plotting the dimension pairs. This value can be any integer from 2 to the number of dimensions.

MAX (keyword),MAX (keyword),MAX (keyword)
OVERALS command,OVERALS command,OVERALS command

• Keyword ALL can be used instead of the first value to indicate that all dimensions are paired with higher dimensions.

• Keyword MAX can be used instead of the second value to indicate that plots should be produced up to and including the highest dimension fit by the procedure.

Example

OVERALS COLA1 COLA2 JUICE1 JUICE2 (4)
/ANALYSIS=COLA1 COLA2 JUICE1 JUICE2 (SNOM)
/SETS=2(2,2)
/PLOT NDIM(1,3) QUANT(5).

• The NDIM(1,3) specification indicates that plots should be produced for two dimension pairs—dimension 1 versus dimension 2 and dimension 1 versus dimension 3.

• QUANT requests plots of the category quantifications. The (5) specification indicates that the first five characters of the value labels are to be used on the plots.

Example

OVERALS COLA1 COLA2 JUICE1 JUICE2 (4)
/ANALYSIS=COLA1 COLA2 JUICE1 JUICE2 (SNOM)
/SETS=2(2,2)
/PLOT NDIM(ALL,3) QUANT(5).

• This plot is the same as above except for the ALL specification following NDIM, which indicates that all possible pairs up to the second value should be plotted. QUANT plots will be produced for dimension 1 versus dimension 2, dimension 2 versus dimension 3, and dimension 1 versus dimension 3.

Related Topics

OVERALS
Overview (OVERALS command)
Examples (OVERALS command)
VARIABLES Subcommand (OVERALS command)
ANALYSIS Subcommand (OVERALS command)
SETS Subcommand (OVERALS command)
NOBSERVATIONS Subcommand (OVERALS command)
DIMENSION Subcommand (OVERALS command)
INITIAL Subcommand (OVERALS command)
MAXITER Subcommand (OVERALS command)
CONVERGENCE Subcommand (OVERALS command)
PRINT Subcommand (OVERALS command)
SAVE Subcommand (OVERALS command)
MATRIX Subcommand (OVERALS command)


SAVE Subcommand (OVERALS command)

object scores,object scores,object scores
saving OVERALS command,saving OVERALS command,saving OVERALS command
dimensions,dimensions,dimensions
saving OVERALS command,saving OVERALS command,saving OVERALS command
SAVE (subcommand),SAVE (subcommand),SAVE (subcommand)
OVERALS command,OVERALS command,OVERALS command
OVERALS (command),OVERALS (command),OVERALS (command)
SAVE subcommand,SAVE subcommand,SAVE subcommand

SAVE lets you add variables containing the object scores that are computed by OVERALS to the active dataset.

SAVE (subcommand),SAVE (subcommand),SAVE (subcommand)
with DIMENSION subcommand,with DIMENSION subcommand,with DIMENSION subcommand
DIMENSION (subcommand),DIMENSION (subcommand),DIMENSION (subcommand)
with SAVE subcommand,with SAVE subcommand,with SAVE subcommand

• If SAVE is not specified, object scores are not added to the active dataset.

• A variable rootname can be specified on the SAVE subcommand, to which OVERALS adds the number of the dimension. Only one rootname can be specified, and it can contain up to six characters.

• If a rootname is not specified, unique variable names are automatically generated. The variable names are OVEn_m, where n is a dimension number and m is a set number. If three dimensions are saved, the first set of names are OVE1_1, OVE2_1, and OVE3_1. If another OVERALS is then run, the variable names for the second set are OVE1_2, OVE2_2, OVE3_2, and so on.

• Following the name, the number of dimensions for which you want object scores saved can be listed in parentheses. The number cannot exceed the value of the DIMENSION subcommand.

• The prefix should be unique for each OVERALS command in the same session. Otherwise,, OVERALS replaces the prefix with DIM, OBJ, or OBSAVE. If all of these prefixes already exist, SAVE is not executed.

SAVE (subcommand),SAVE (subcommand),SAVE (subcommand)
with MATRIX subcommand,with MATRIX subcommand,with MATRIX subcommand
MATRIX (subcommand),MATRIX (subcommand),MATRIX (subcommand)
with SAVE subcommand,with SAVE subcommand,with SAVE subcommand

• If the number of dimensions is not specified, the SAVE subcommand saves object scores for all dimensions.

• If you replace the active dataset by specifying an asterisk (*) on a MATRIX subcommand, the SAVE subcommand is not executed.

Example

OVERALS CAR1 CAR2 CAR3(5) PRICE(10)
/SET=2(3,1)
/ANALYSIS=CAR1 TO CAR3(SNOM) PRICE(NUME)
/DIMENSIONS=3
/SAVE=DIM(2).

• Analyzed items include three single nominal variables, CAR1, CAR2, and CAR3 (each with 5 categories) and one numeric level variable (with 10 categories).

• The DIMENSIONS subcommand requests results for three dimensions.

• SAVE adds the object scores from the first two dimensions to the active dataset. The names of these new variables will be DIM00001 and DIM00002, respectively.

Related Topics

OVERALS
Overview (OVERALS command)
Examples (OVERALS command)
VARIABLES Subcommand (OVERALS command)
ANALYSIS Subcommand (OVERALS command)
SETS Subcommand (OVERALS command)
NOBSERVATIONS Subcommand (OVERALS command)
DIMENSION Subcommand (OVERALS command)
INITIAL Subcommand (OVERALS command)
MAXITER Subcommand (OVERALS command)
CONVERGENCE Subcommand (OVERALS command)
PRINT Subcommand (OVERALS command)
PLOT Subcommand (OVERALS command)
MATRIX Subcommand (OVERALS command)


MATRIX Subcommand (OVERALS command)

matrix output,matrix output,matrix output
OVERALS command,OVERALS command,OVERALS command
OVERALS (command),OVERALS (command),OVERALS (command)
matrix output,matrix output,matrix output
MATRIX (subcommand),MATRIX (subcommand),MATRIX (subcommand)
OVERALS command,OVERALS command,OVERALS command
OVERALS (command),OVERALS (command),OVERALS (command)
MATRIX subcommand,MATRIX subcommand,MATRIX subcommand

The MATRIX subcommand is used to write category quantifications, coordinates, centroids, weights, and component loadings to a matrix data file.

• The specification on MATRIX is keyword OUT and a quoted file specification or previously declared dataset name (DATASET DECLARE command), enclosed in parentheses.

• You can specify an asterisk (*) instead of a file to replace the active dataset.

• All values are written to the same file.

• The matrix data file has one case for each value of each original variable.

The variables of the matrix data file and their values are as follows:

ROWTYPE_ variable,ROWTYPE_ variable,ROWTYPE_ variable
OVERALS command,OVERALS command,OVERALS command
LEVEL variable,LEVEL variable,LEVEL variable
OVERALS command,OVERALS command,OVERALS command
VARNAME_ variable,VARNAME_ variable,VARNAME_ variable
OVERALS command,OVERALS command,OVERALS command
VARTYPE_ variable,VARTYPE_ variable,VARTYPE_ variable
OVERALS command,OVERALS command,OVERALS command
SET_ variable,SET_ variable,SET_ variable
OVERALS command,OVERALS command,OVERALS command
DIM variable,DIM variable,DIM variable
OVERALS command,OVERALS command,OVERALS command
ROWTYPE_ | String variable containing value QUANT for the category quantifications, SCOOR_ for the single-category coordinates, MCOOR_ for multiple-category coordinates, CENTRO_ for centroids, PCENTRO_ for projected centroids, WEIGHT_ for weights, and LOADING_ for the component scores.
LEVEL | String variable containing the values (or value labels, if present) of each original variable for category quantifications. For cases with ROWTYPE_=LOADING_ or WEIGHT_, the value of LEVEL is blank.
VARNAME_ | String variable containing the original variable names.
VARTYPE_ | String variable containing values MULTIPLE, SINGLE N, ORDINAL, or NUMERICAL, depending on the level of optimal scaling that is specified for the variable.
SET_ | The set number of the original variable.
DIM1...DIMn | Numeric variables containing the category quantifications, the single-category coordinates, multiple-category coordinates, weights, centroids, projected centroids, and component loadings for each dimension. Each variable is labeled DIMn, where n represents the dimension number. Any values that cannot be computed are assigned 0 in the file.

Related Topics

OVERALS
Overview (OVERALS command)
Examples (OVERALS command)
VARIABLES Subcommand (OVERALS command)
ANALYSIS Subcommand (OVERALS command)
SETS Subcommand (OVERALS command)
NOBSERVATIONS Subcommand (OVERALS command)
DIMENSION Subcommand (OVERALS command)
INITIAL Subcommand (OVERALS command)
MAXITER Subcommand (OVERALS command)
CONVERGENCE Subcommand (OVERALS command)
PRINT Subcommand (OVERALS command)
PLOT Subcommand (OVERALS command)
SAVE Subcommand (OVERALS command)


PACF

PACF (command),PACF (command),PACF (command)
PACF (command),PACF (command),PACF (command)
syntax chart,syntax chart,syntax chart
autocorrelation,autocorrelation,autocorrelation
partial autocorrelations,partial autocorrelations,partial autocorrelations

PACF is available in the Statistics Base option.

PACF VARIABLES= series names

 [/DIFF={1}]
        {n}

 [/SDIFF={1}]
         {n}

 [/PERIOD=n]

 [/{NOLOG**}]
   {LN     }

 [/SEASONAL]

 [/MXAUTO={16**}]
          {n   }

 [/APPLY [='model name']]

**Default if the subcommand is omitted and there is no corresponding specification on the TSET command.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See ACF/PACF Algorithms for computational details for this procedure.

You can produce PACF syntax with the Autocorrelations dialog.

Example

PACF VARIABLES = TICKETS.

Related Topics

Overview (PACF command)
Example (PACF command)
VARIABLES Subcommand (PACF command)
DIFF Subcommand (PACF command)
SDIFF Subcommand (PACF command)
PERIOD Subcommand (PACF command)
LN and NOLOG Subcommands (PACF command)
SEASONAL Subcommand (PACF command)
MXAUTO Subcommand (PACF command)
APPLY Subcommand (PACF command)
References (PACF command)
MODEL NAME
READ MODEL
SAVE MODEL
TDISPLAY


Overview (PACF command)

PACF displays and plots the sample partial autocorrelation function of one or more time series. You can also display and plot the partial autocorrelations of transformed series by requesting natural log and differencing transformations from within the procedure.

Options Collapse Hide details

Options

Modification of the Series. You can use the LN subcommand to request a natural log transformation of the series, and you can use the SDIFF and DIFF subcommand to request seasonal and nonseasonal differencing to any degree. With seasonal differencing, you can specify the periodicity on the PERIOD subcommand.

Statistical Output. With the MXAUTO subcommand, you can specify the number of lags for which you want values to be displayed and plotted, overriding the maximum value that is specified on TSET. You can also use the SEASONAL subcommand to display and plot values only at periodic lags.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is one or more series names. For each specified series, PACF automatically displays the partial autocorrelation value and standard error value for each lag. PACF also plots the partial autocorrelations and marks the bounds of two standard errors on the plot. By default, PACF displays and plots partial autocorrelations for up to 16 lags (or the number of lags that are specified on TSET).

Subcommand Order Collapse Hide details

Subcommand Order

• Subcommands can be specified in any order.

Syntax Rules Collapse Hide details

Syntax Rules

• VARIABLES can be specified only once.

• Other subcommands can be specified more than once, but only the last specification of each subcommand is executed.

Operations Collapse Hide details

Operations

• Subcommand specifications apply to all series that are named on the PACF command.

• If the LN subcommand is specified, any differencing that is requested on that PACF command is done on log-transformed series.

• Confidence limits are displayed in the plot, marking the bounds of two standard errors at each lag.

Limitations Collapse Hide details

Limitations

• A maximum of one VARIABLES subcommand is allowed. There is no limit on the number of series that are named on the list.

Related Topics

PACF
Example (PACF command)
VARIABLES Subcommand (PACF command)
DIFF Subcommand (PACF command)
SDIFF Subcommand (PACF command)
PERIOD Subcommand (PACF command)
LN and NOLOG Subcommands (PACF command)
SEASONAL Subcommand (PACF command)
MXAUTO Subcommand (PACF command)
APPLY Subcommand (PACF command)
References (PACF command)


Example (PACF command)

PACF VARIABLES = TICKETS
  /LN
  /DIFF=1
  /SDIFF=1
  /PERIOD=12
  /MXAUTO=25.

• This example produces a plot of the partial autocorrelation function for the series TICKETS after a natural log transformation, differencing, and seasonal differencing have been applied to the series. Along with the plot, the partial autocorrelation value and standard error are displayed for each lag.

• LN transforms the data by using the natural logarithm (base e) of the series.

• DIFF differences the series once.

• SDIFF and PERIOD apply one degree of seasonal differencing with a period of 12.

• MXAUTO specifies 25 for the maximum number of lags for which output is to be produced.

Related Topics

PACF
Overview (PACF command)
VARIABLES Subcommand (PACF command)
DIFF Subcommand (PACF command)
SDIFF Subcommand (PACF command)
PERIOD Subcommand (PACF command)
LN and NOLOG Subcommands (PACF command)
SEASONAL Subcommand (PACF command)
MXAUTO Subcommand (PACF command)
APPLY Subcommand (PACF command)
References (PACF command)


VARIABLES Subcommand (PACF command)

PACF (command),PACF (command),PACF (command)
VARIABLES subcommand,VARIABLES subcommand,VARIABLES subcommand
VARIABLES (subcommand),VARIABLES (subcommand),VARIABLES (subcommand)
PACF command,PACF command,PACF command

VARIABLES specifies the series names and is the only required subcommand.

Related Topics

PACF
Overview (PACF command)
Example (PACF command)
DIFF Subcommand (PACF command)
SDIFF Subcommand (PACF command)
PERIOD Subcommand (PACF command)
LN and NOLOG Subcommands (PACF command)
SEASONAL Subcommand (PACF command)
MXAUTO Subcommand (PACF command)
APPLY Subcommand (PACF command)
References (PACF command)


DIFF Subcommand (PACF command)

PACF (command),PACF (command),PACF (command)
DIFF subcommand,DIFF subcommand,DIFF subcommand
DIFF (subcommand),DIFF (subcommand),DIFF (subcommand)
PACF command,PACF command,PACF command
difference transformation,difference transformation,difference transformation
PACF command,PACF command,PACF command
PACF (command),PACF (command),PACF (command)
transforming values,transforming values,transforming values

DIFF specifies the degree of differencing that is used to convert a nonstationary series to a stationary series with a constant mean and variance before the partial autocorrelations are computed.

• You can specify 0 or any positive integer on DIFF.

• If DIFF is specified without a value, the default is 1.

• The number of values that are used in the calculations decreases by 1 for each degree of differencing.

Example

PACF VARIABLES = SALES
  /DIFF=1.

• In this example, the series SALES will be differenced once before the partial autocorrelations are computed and plotted.

Related Topics

PACF
Overview (PACF command)
Example (PACF command)
VARIABLES Subcommand (PACF command)
SDIFF Subcommand (PACF command)
PERIOD Subcommand (PACF command)
LN and NOLOG Subcommands (PACF command)
SEASONAL Subcommand (PACF command)
MXAUTO Subcommand (PACF command)
APPLY Subcommand (PACF command)
References (PACF command)


SDIFF Subcommand (PACF command)

SDIFF (subcommand),SDIFF (subcommand),SDIFF (subcommand)
PACF command,PACF command,PACF command
PACF (command),PACF (command),PACF (command)
SDIFF subcommand,SDIFF subcommand,SDIFF subcommand
seasonal difference transformation,seasonal difference transformation,seasonal difference transformation
PACF command,PACF command,PACF command

If the series exhibits a seasonal or periodic pattern, you can use the SDIFF subcommand to seasonally difference the series before obtaining partial autocorrelations. SDIFF indicates the degree of seasonal differencing.

• The specification on SDIFF can be 0 or any positive integer.

• If SDIFF is specified without a value, the default is 1.

• The number of seasons that are used in the calculations decreases by 1 for each degree of seasonal differencing.

• The length of the period that is used by SDIFF is specified on the PERIOD subcommand. If the PERIOD subcommand is not specified, the periodicity that was established on the TSET or DATE command is used (see the PERIOD subcommand).

Related Topics

PACF
Overview (PACF command)
Example (PACF command)
VARIABLES Subcommand (PACF command)
DIFF Subcommand (PACF command)
PERIOD Subcommand (PACF command)
LN and NOLOG Subcommands (PACF command)
SEASONAL Subcommand (PACF command)
MXAUTO Subcommand (PACF command)
APPLY Subcommand (PACF command)
References (PACF command)


PERIOD Subcommand (PACF command)

PERIOD (subcommand),PERIOD (subcommand),PERIOD (subcommand)
PACF command,PACF command,PACF command
PACF (command),PACF (command),PACF (command)
PERIOD subcommand,PERIOD subcommand,PERIOD subcommand
periodicity,periodicity,periodicity
PACF command,PACF command,PACF command
PACF (command),PACF (command),PACF (command)
specifying periodicity,specifying periodicity,specifying periodicity

PERIOD indicates the length of the period to be used by the SDIFF or SEASONAL subcommand. PERIOD indicates how many observations are in one period or season.

• The specification on PERIOD can be any positive integer that is greater than 1.

• PERIOD is ignored if it is used without the SDIFF or SEASONAL subcommand.

• If PERIOD is not specified, the periodicity that was established on TSET PERIOD is in effect. If TSET PERIOD is not specified, the periodicity that was established on the DATE command is used. If periodicity was not established anywhere, the SDIFF and SEASONAL subcommands are not executed.

Example

PACF VARIABLES = SALES
  /SDIFF=1
  /PERIOD=12.

• This PACF command applies one degree of seasonal differencing with a periodicity of 12 to the series SALES before partial autocorrelations are computed and plotted.

Related Topics

PACF
Overview (PACF command)
Example (PACF command)
VARIABLES Subcommand (PACF command)
DIFF Subcommand (PACF command)
SDIFF Subcommand (PACF command)
LN and NOLOG Subcommands (PACF command)
SEASONAL Subcommand (PACF command)
MXAUTO Subcommand (PACF command)
APPLY Subcommand (PACF command)
References (PACF command)


LN and NOLOG Subcommands (PACF command)

PACF (command),PACF (command),PACF (command)
LN/NOLOG subcommands,LN/NOLOG subcommands,LN/NOLOG subcommands
LN (subcommand),LN (subcommand),LN (subcommand)
PACF command,PACF command,PACF command
NOLOG (subcommand),NOLOG (subcommand),NOLOG (subcommand)
PACF command,PACF command,PACF command
natural log transformation,natural log transformation,natural log transformation
PACF command,PACF command,PACF command

LN transforms the data by using the natural logarithm (base e) of the series and is used to remove varying amplitude over time. NOLOG indicates that the data should not be log transformed. NOLOG is the default.

• If you specify LN on a PACF command, any differencing that is requested on that command is performed on the log-transformed series.

• There are no additional specifications on LN or NOLOG.

• Only the last LN or NOLOG subcommand on a PACF command is executed.

• If a natural log transformation is requested when there are values in the series that are less than or equal to 0, PACF will not be produced for that series because nonpositive values cannot be log-transformed.

• NOLOG is generally used with an APPLY subcommand to turn off a previous LN specification.

Example

PACF VARIABLES = SALES
  /LN.

• This command transforms the series SALES by using the natural log transformation and then computes and plots partial autocorrelations.

Related Topics

PACF
Overview (PACF command)
Example (PACF command)
VARIABLES Subcommand (PACF command)
DIFF Subcommand (PACF command)
SDIFF Subcommand (PACF command)
PERIOD Subcommand (PACF command)
SEASONAL Subcommand (PACF command)
MXAUTO Subcommand (PACF command)
APPLY Subcommand (PACF command)
References (PACF command)


SEASONAL Subcommand (PACF command)

PACF (command),PACF (command),PACF (command)
SEASONAL subcommand,SEASONAL subcommand,SEASONAL subcommand
SEASONAL (subcommand),SEASONAL (subcommand),SEASONAL (subcommand)
PACF command,PACF command,PACF command
periodic lags,periodic lags,periodic lags
PACF command,PACF command,PACF command
PACF (command),PACF (command),PACF (command)
periodic lags,periodic lags,periodic lags

Use SEASONAL to focus attention on the seasonal component by displaying and plotting autocorrelations only at periodic lags.

• There are no additional specifications on SEASONAL.

• If SEASONAL is specified, values are displayed and plotted at the periodic lags that are indicated on the PERIOD subcommand. If PERIOD is not specified, the periodicity that was established on the TSET or DATE command is used (see the PERIOD subcommand).

• If SEASONAL is not specified, partial autocorrelations for all lags (up to the maximum) are displayed and plotted.

Example

PACF VARIABLES = SALES
  /SEASONAL
  /PERIOD=12.

• In this example, partial autocorrelations are displayed and plotted at every 12th lag.

Related Topics

PACF
Overview (PACF command)
Example (PACF command)
VARIABLES Subcommand (PACF command)
DIFF Subcommand (PACF command)
SDIFF Subcommand (PACF command)
PERIOD Subcommand (PACF command)
LN and NOLOG Subcommands (PACF command)
MXAUTO Subcommand (PACF command)
APPLY Subcommand (PACF command)
References (PACF command)


MXAUTO Subcommand (PACF command)

PACF (command),PACF (command),PACF (command)
MXAUTO subcommand,MXAUTO subcommand,MXAUTO subcommand
MXAUTO (subcommand),MXAUTO (subcommand),MXAUTO (subcommand)
PACF command,PACF command,PACF command

MXAUTO specifies the maximum number of lags for a series.

• The specification on MXAUTO must be a positive integer.

• If MXAUTO is not specified, the default number of lags is the value that was set on TSET MXAUTO. If TSET MXAUTO is not specified, the default is 16.

• The value on MXAUTO overrides the value that was set on TSET MXAUTO.

Example

PACF VARIABLES = SALES
  /MXAUTO=14.

• This command specifies 14 for the maximum number of partial autocorrelations that can be displayed and plotted for series SALES.

Related Topics

PACF
Overview (PACF command)
Example (PACF command)
VARIABLES Subcommand (PACF command)
DIFF Subcommand (PACF command)
SDIFF Subcommand (PACF command)
PERIOD Subcommand (PACF command)
LN and NOLOG Subcommands (PACF command)
SEASONAL Subcommand (PACF command)
APPLY Subcommand (PACF command)
References (PACF command)


APPLY Subcommand (PACF command)

APPLY (subcommand),APPLY (subcommand),APPLY (subcommand)
PACF command,PACF command,PACF command
PACF (command),PACF (command),PACF (command)
APPLY subcommand,APPLY subcommand,APPLY subcommand
PACF (command),PACF (command),PACF (command)
using a previously defined model,using a previously defined model,using a previously defined model

APPLY allows you to use a previously defined PACF model without having to repeat the specifications.

• The only specification on APPLY is the name of a previous model enclosed in quotes. If a model name is not specified, the model that was specified on the previous PACF command is used.

• To change one or more model specifications, specify the subcommands of only those portions that you want to change, placing the specifications after the APPLY subcommand.

• If no series are specified on the PACF command, the series that were originally specified with the model that is being reapplied are used.

• To change the series that are used with the model, enter new series names before or after the APPLY subcommand.

Example

PACF VARIABLES = TICKETS
  /LN
  /DIFF=1
  /SDIFF=1
  /PER=12
  /MXAUTO=25.
PACF VARIABLES = ROUNDTRP
  /APPLY.

• The first command specifies a maximum of 25 partial autocorrelations for the series TICKETS after it has been log-transformed, differenced once, and had one degree of seasonal differencing with a periodicity of 12 applied to it. This model is assigned the default name MOD_1.

• The second command displays and plots partial autocorrelations for series ROUNDTRP by using the same model that was specified for series TICKETS.

Related Topics

PACF
Overview (PACF command)
Example (PACF command)
VARIABLES Subcommand (PACF command)
DIFF Subcommand (PACF command)
SDIFF Subcommand (PACF command)
PERIOD Subcommand (PACF command)
LN and NOLOG Subcommands (PACF command)
SEASONAL Subcommand (PACF command)
MXAUTO Subcommand (PACF command)
References (PACF command)


References (PACF command)

Box, G. E. P., and G. M. Jenkins. 1976. Time series analysis: Forecasting and control, Rev. ed. San Francisco: Holden-Day.

Related Topics

PACF
Overview (PACF command)
Example (PACF command)
VARIABLES Subcommand (PACF command)
DIFF Subcommand (PACF command)
SDIFF Subcommand (PACF command)
PERIOD Subcommand (PACF command)
LN and NOLOG Subcommands (PACF command)
SEASONAL Subcommand (PACF command)
MXAUTO Subcommand (PACF command)
APPLY Subcommand (PACF command)


PARTIAL CORR

matrices,matrices,matrices
correlation,correlation,correlation
Partial Correlations,Partial Correlations,Partial Correlations
Bivariate Correlations,Bivariate Correlations,Bivariate Correlations
PARTIAL CORR (command),PARTIAL CORR (command),PARTIAL CORR (command)
PARTIAL CORR (command),PARTIAL CORR (command),PARTIAL CORR (command)
syntax chart,syntax chart,syntax chart

PARTIAL CORR is available in the Statistics Base option.

PARTIAL CORR VARIABLES= varlist [WITH varlist]
    BY varlist [(levels)]

 [/SIGNIFICANCE={TWOTAIL**}]
                {ONETAIL  }

 [/STATISTICS=[NONE**] [CORR] [DESCRIPTIVES] [BADCORR] [ALL]]

 [/FORMAT={MATRIX** }]
          {SERIAL   }
          {CONDENSED}

 [/MISSING=[{LISTWISE**}]  [{EXCLUDE**}]]
            {ANALYSIS  }    {INCLUDE  }

 [/MATRIX= [IN({*                  })] [OUT({*                  })]]
               {'savfile'|'dataset'}        {'savfile'|'dataset'}

**Default if the subcommand is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See PARTIAL CORR Algorithms for computational details for this procedure.

Syntax for the PARTIAL CORR command can be generated from the Partial Correlations dialog.

Release History Collapse Hide details

Release History

Release 16.0

• Added support for SET THREADS and SET MCACHE.

Example

PARTIAL CORR VARIABLES=PUBTRANS MECHANIC BY NETPURSE(1).

Related Topics

Overview (PARTIAL CORR command)
Example (PARTIAL CORR command)
VARIABLES Subcommand (PARTIAL CORR command)
SIGNIFICANCE Subcommand (PARTIAL CORR command)
STATISTICS Subcommand (PARTIAL CORR command)
FORMAT Subcommand (PARTIAL CORR command)
MISSING Subcommand (PARTIAL CORR command)
MATRIX Subcommand (PARTIAL CORR command)


Overview (PARTIAL CORR command)

BY (keyword),BY (keyword),BY (keyword)
PARTIAL CORR command,PARTIAL CORR command,PARTIAL CORR command
PARTIAL CORR (command),PARTIAL CORR (command),PARTIAL CORR (command)
limitations,limitations,limitations

PARTIAL CORR produces partial correlation coefficients that describe the relationship between two variables while adjusting for the effects of one or more additional variables. PARTIAL CORR calculates a matrix of Pearson product-moment correlations. PARTIAL CORR can also read the zero-order correlation matrix as input. Other procedures that produce zero-order correlation matrices that can be read by PARTIAL CORR include CORRELATIONS, REGRESSION, DISCRIMINANT, and FACTOR.

Options Collapse Hide details

Options

Significance Levels. By default, the significance level for each partial correlation coefficient is based on a two-tailed test. Optionally, you can request a one-tailed test using the SIGNIFICANCE subcommand.

Statistics. In addition to the partial correlation coefficient, degrees of freedom, and significance level, you can use the STATISTICS subcommand to obtain the mean, standard deviation, and number of nonmissing cases for each variable, as well as zero-order correlation coefficients for each pair of variables.

Format. You can specify condensed format, which suppresses the degrees of freedom and significance level for each coefficient, and you can print only nonredundant coefficients in serial string format by using the FORMAT subcommand.

Matrix Input and Output. You can read and write zero-order correlation matrices by using the MATRIX subcommand.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is the VARIABLES subcommand, which specifies a list of variables to be correlated, and one or more control variables following keyword BY. PARTIAL CORR calculates the partial correlation of each variable with every other variable that was specified on the correlation variable list.

Subcommand Order Collapse Hide details

Subcommand Order

Subcommands can be specified in any order.

Operations Collapse Hide details

Operations

• PARTIAL CORR produces one matrix of partial correlation coefficients for each of up to five order values. For each coefficient, PARTIAL CORR prints the degrees of freedom and the significance level.

• This procedure uses the multithreaded options specified by SET THREADS and SET MCACHE.

Limitations Collapse Hide details

Limitations

• A maximum of 25 variable lists on a single PARTIAL CORR command is allowed. Each variable list contains a correlation list, a control list, and order values.

• A maximum of 400 variables total can be named or implied per PARTIAL CORR command.

• A maximum of 100 control variables is allowed.

• A maximum of 5 different order values per single list is allowed. The largest order value that can be specified is 100.

Related Topics

PARTIAL CORR
Example (PARTIAL CORR command)
VARIABLES Subcommand (PARTIAL CORR command)
SIGNIFICANCE Subcommand (PARTIAL CORR command)
STATISTICS Subcommand (PARTIAL CORR command)
FORMAT Subcommand (PARTIAL CORR command)
MISSING Subcommand (PARTIAL CORR command)
MATRIX Subcommand (PARTIAL CORR command)


Example (PARTIAL CORR command)

PARTIAL CORR
  /VARIABLES= funding disease BY visits
  /SIGNIFICANCE=TWOTAIL
  /STATISTICS=CORR
  /MISSING=LISTWISE .

• The procedure produces partial correlations funding with disease controlling for visits.

• STATISTICS requests zero-order correlations in addition to partial correlations.

• All other options are set to their default values.

For discussion of output from this syntax and to place the example in context, see Using Partial Correlations to Unravel "Relationships".

Related Topics

PARTIAL CORR
Overview (PARTIAL CORR command)
VARIABLES Subcommand (PARTIAL CORR command)
SIGNIFICANCE Subcommand (PARTIAL CORR command)
STATISTICS Subcommand (PARTIAL CORR command)
FORMAT Subcommand (PARTIAL CORR command)
MISSING Subcommand (PARTIAL CORR command)
MATRIX Subcommand (PARTIAL CORR command)


VARIABLES Subcommand (PARTIAL CORR command)

VARIABLES (subcommand),VARIABLES (subcommand),VARIABLES (subcommand)
PARTIAL CORR command,PARTIAL CORR command,PARTIAL CORR command
PARTIAL CORR (command),PARTIAL CORR (command),PARTIAL CORR (command)
VARIABLES subcommand,VARIABLES subcommand,VARIABLES subcommand

VARIABLES requires a correlation list of one or more pairs of variables for which partial correlations are desired and requires a control list of one or more variables that will be used as controls for the variables in the correlation list, followed by optional order values in parentheses.

PARTIAL CORR (command),PARTIAL CORR (command),PARTIAL CORR (command)
correlation list,correlation list,correlation list

• The correlation list specifies pairs of variables to be correlated while controlling for the variables in the control list.

• To request a square or lower-triangular matrix, do not use keyword WITH in the correlation list. This specification obtains the partial correlation of every variable with every other variable in the list.

WITH (keyword),WITH (keyword),WITH (keyword)
PARTIAL CORR command,PARTIAL CORR command,PARTIAL CORR command

• To request a rectangular matrix, specify a list of correlation variables followed by keyword WITH and a second list of variables. This specification obtains the partial correlation of specific variable pairs. The first variable list defines the rows of the matrix, and the second list defines the columns.

PARTIAL CORR (command),PARTIAL CORR (command),PARTIAL CORR (command)
control variables,control variables,control variables
PARTIAL CORR (command),PARTIAL CORR (command),PARTIAL CORR (command)
order values,order values,order values

• The control list is specified after keyword BY.

• The correlation between a pair of variables is referred to as a zero-order correlation. Controlling for one variable produces a first-order partial correlation, controlling for two variables produces a second-order partial correlation, and so on.

• To indicate the exact partials that are to be computed, you can specify order values in parentheses following the control list. These values also determine the partial correlation matrix or matrices to be printed. Up to five order values can be specified. Separate each value with at least one space or comma. The default order value is the number of control variables.

• One partial is produced for every unique combination of control variables for each order value.

Obtaining the Partial Correlation for Specific Variable Pairs

PARTIAL CORR
  VARIABLES = RENT FOOD PUBTRANS WITH TEACHER MANAGER BY NETSALRY(1).

• PARTIAL CORR produces a rectangular matrix. Variables RENT, FOOD, and PUBTRANS form the matrix rows, and variables TEACHER and MANAGER form the columns.

Specifying Order Values

PARTIAL CORR
  VARIABLES = RENT WITH TEACHER BY NETSALRY, NETPRICE (1).
PARTIAL CORR
  VARIABLES = RENT WITH TEACHER BY NETSALRY, NETPRICE (2).
PARTIAL CORR
  VARIABLES = RENT WITH TEACHER BY NETSALRY, NETPRICE (1,2).
PARTIAL CORR
  VARIABLES = RENT FOOD PUBTRANS BY NETSALRY NETPURSE NETPRICE (1,3).

• The first PARTIAL CORR produces two first-order partials: RENT with TEACHER controlling for NETSALRY, and RENT with TEACHER controlling for NETPRICE.

• The second PARTIAL CORR produces one second-order partial of RENT with TEACHER controlling simultaneously for NETSALRY and NETPRICE.

• The third PARTIAL CORR specifies both sets of partials that were specified by the previous two commands.

• The fourth PARTIAL CORR produces three first-order partials (controlling for NETSALRY, NETPURSE, and NETPRICE individually) and one third-order partial (controlling for all three control variables simultaneously).

Related Topics

PARTIAL CORR
Overview (PARTIAL CORR command)
Example (PARTIAL CORR command)
SIGNIFICANCE Subcommand (PARTIAL CORR command)
STATISTICS Subcommand (PARTIAL CORR command)
FORMAT Subcommand (PARTIAL CORR command)
MISSING Subcommand (PARTIAL CORR command)
MATRIX Subcommand (PARTIAL CORR command)


SIGNIFICANCE Subcommand (PARTIAL CORR command)

SIGNIFICANCE (subcommand),SIGNIFICANCE (subcommand),SIGNIFICANCE (subcommand)
PARTIAL CORR command,PARTIAL CORR command,PARTIAL CORR command
PARTIAL CORR (command),PARTIAL CORR (command),PARTIAL CORR (command)
SIGNIFICANCE subcommand,SIGNIFICANCE subcommand,SIGNIFICANCE subcommand

SIGNIFICANCE determines whether the significance level is based on a one-tailed or two-tailed test.

• By default, the significance level is based on a two-tailed test. This setting is appropriate when the direction of the relationship between a pair of variables cannot be specified in advance of the analysis.

• When the direction of the relationship can be determined in advance, a one-tailed test is appropriate.

TWOTAIL (keyword),TWOTAIL (keyword),TWOTAIL (keyword)
PARTIAL CORR command,PARTIAL CORR command,PARTIAL CORR command
ONETAIL (keyword),ONETAIL (keyword),ONETAIL (keyword)
PARTIAL CORR command,PARTIAL CORR command,PARTIAL CORR command
TWOTAIL | Two-tailed test of significance. This setting is the default.
ONETAIL | One-tailed test of significance.

Related Topics

PARTIAL CORR
Overview (PARTIAL CORR command)
Example (PARTIAL CORR command)
VARIABLES Subcommand (PARTIAL CORR command)
STATISTICS Subcommand (PARTIAL CORR command)
FORMAT Subcommand (PARTIAL CORR command)
MISSING Subcommand (PARTIAL CORR command)
MATRIX Subcommand (PARTIAL CORR command)


STATISTICS Subcommand (PARTIAL CORR command)

STATISTICS (subcommand),STATISTICS (subcommand),STATISTICS (subcommand)
PARTIAL CORR command,PARTIAL CORR command,PARTIAL CORR command
PARTIAL CORR (command),PARTIAL CORR (command),PARTIAL CORR (command)
STATISTICS subcommand,STATISTICS subcommand,STATISTICS subcommand

By default, the partial correlation coefficient, degrees of freedom, and significance level are displayed. Use STATISTICS to obtain additional statistics.

• If both CORR and BADCORR are requested, CORR takes precedence over BADCORR, and the zero-order correlations are displayed.

CORR (keyword),CORR (keyword),CORR (keyword)
PARTIAL CORR command,PARTIAL CORR command,PARTIAL CORR command
DESCRIPTIVES (keyword),DESCRIPTIVES (keyword),DESCRIPTIVES (keyword)
PARTIAL CORR command,PARTIAL CORR command,PARTIAL CORR command
BADCORR (keyword),BADCORR (keyword),BADCORR (keyword)
PARTIAL CORR command,PARTIAL CORR command,PARTIAL CORR command
NONE (keyword),NONE (keyword),NONE (keyword)
PARTIAL CORR command,PARTIAL CORR command,PARTIAL CORR command
ALL (keyword),ALL (keyword),ALL (keyword)
PARTIAL CORR command,PARTIAL CORR command,PARTIAL CORR command
CORR | Zero-order correlations with degrees of freedom and significance level.
DESCRIPTIVES | Mean, standard deviation, and number of nonmissing cases. Descriptive statistics are not available with matrix input.
BADCORR | Zero-order correlation coefficients only if any zero-order correlations cannot be computed. Noncomputable coefficients are displayed as a period.
NONE | No additional statistics. This setting is the default.
ALL | All additional statistics that are available with PARTIAL CORR.

Related Topics

PARTIAL CORR
Overview (PARTIAL CORR command)
Example (PARTIAL CORR command)
VARIABLES Subcommand (PARTIAL CORR command)
SIGNIFICANCE Subcommand (PARTIAL CORR command)
FORMAT Subcommand (PARTIAL CORR command)
MISSING Subcommand (PARTIAL CORR command)
MATRIX Subcommand (PARTIAL CORR command)


FORMAT Subcommand (PARTIAL CORR command)

FORMAT (subcommand),FORMAT (subcommand),FORMAT (subcommand)
PARTIAL CORR command,PARTIAL CORR command,PARTIAL CORR command
PARTIAL CORR (command),PARTIAL CORR (command),PARTIAL CORR (command)
FORMAT subcommand,FORMAT subcommand,FORMAT subcommand

FORMAT determines page format.

• If both CONDENSED and SERIAL are specified, only SERIAL is in effect.

MATRIX (keyword),MATRIX (keyword),MATRIX (keyword)
PARTIAL CORR command,PARTIAL CORR command,PARTIAL CORR command
CONDENSED (keyword),CONDENSED (keyword),CONDENSED (keyword)
PARTIAL CORR command,PARTIAL CORR command,PARTIAL CORR command
SERIAL (keyword),SERIAL (keyword),SERIAL (keyword)
PARTIAL CORR command,PARTIAL CORR command,PARTIAL CORR command
MATRIX | Display degrees of freedom and significance level in matrix format. This format requires four lines per matrix row and displays the degrees of freedom and the significance level. The output includes redundant coefficients. This setting is the default.
CONDENSED | Suppress the degrees of freedom and significance level. This format requires only one line per matrix row and suppresses the degrees of freedom and significance. A single asterisk (*) following a coefficient indicates a significance level of 0.05 or less. Two asterisks (**) following a coefficient indicate a significance level of 0.01 or less.
SERIAL | Display only the nonredundant coefficients in serial string format. The coefficients, degrees of freedom, and significance levels from the first row of the matrix are displayed first, followed by all unique coefficients from the second row and so on for all rows of the matrix.

Related Topics

PARTIAL CORR
Overview (PARTIAL CORR command)
Example (PARTIAL CORR command)
VARIABLES Subcommand (PARTIAL CORR command)
SIGNIFICANCE Subcommand (PARTIAL CORR command)
STATISTICS Subcommand (PARTIAL CORR command)
MISSING Subcommand (PARTIAL CORR command)
MATRIX Subcommand (PARTIAL CORR command)


MISSING Subcommand (PARTIAL CORR command)

MISSING (subcommand),MISSING (subcommand),MISSING (subcommand)
PARTIAL CORR command,PARTIAL CORR command,PARTIAL CORR command
PARTIAL CORR (command),PARTIAL CORR (command),PARTIAL CORR (command)
MISSING subcommand,MISSING subcommand,MISSING subcommand
PARTIAL CORR (command),PARTIAL CORR (command),PARTIAL CORR (command)
missing values,missing values,missing values

MISSING controls the treatment of cases with missing values.

• When pairwise deletion is in effect (keyword ANALYSIS), the degrees of freedom for a particular partial coefficient are based on the smallest number of cases that are used in the calculation of any of the simple correlations.

• LISTWISE and ANALYSIS are alternatives. However, each command can be used with either INCLUDE or EXCLUDE. The default is LISTWISE and EXCLUDE.

LISTWISE (keyword),LISTWISE (keyword),LISTWISE (keyword)
PARTIAL CORR command,PARTIAL CORR command,PARTIAL CORR command
ANALYSIS (keyword),ANALYSIS (keyword),ANALYSIS (keyword)
PARTIAL CORR command,PARTIAL CORR command,PARTIAL CORR command
EXCLUDE (keyword),EXCLUDE (keyword),EXCLUDE (keyword)
PARTIAL CORR command,PARTIAL CORR command,PARTIAL CORR command
INCLUDE (keyword),INCLUDE (keyword),INCLUDE (keyword)
PARTIAL CORR command,PARTIAL CORR command,PARTIAL CORR command
LISTWISE | Exclude cases with missing values listwise. Cases with missing values for any of the variables that are listed for an analysis—including control variables—are not used in the calculation of the zero-order correlation coefficient. This setting is the default.
ANALYSIS | Exclude cases with missing values on a pair-by-pair basis. Cases with missing values for one or both of a pair of variables are not used in the calculation of zero-order correlation coefficients.
EXCLUDE | Exclude user-missing values. User-missing values are treated as missing. This setting is the default.
INCLUDE | Include user-missing values. User-missing values are treated as valid values.

Related Topics

PARTIAL CORR
Overview (PARTIAL CORR command)
Example (PARTIAL CORR command)
VARIABLES Subcommand (PARTIAL CORR command)
SIGNIFICANCE Subcommand (PARTIAL CORR command)
STATISTICS Subcommand (PARTIAL CORR command)
FORMAT Subcommand (PARTIAL CORR command)
MATRIX Subcommand (PARTIAL CORR command)


MATRIX Subcommand (PARTIAL CORR command)

PARTIAL CORR (command),PARTIAL CORR (command),PARTIAL CORR (command)
MATRIX subcommand,MATRIX subcommand,MATRIX subcommand
MATRIX (subcommand),MATRIX (subcommand),MATRIX (subcommand)
PARTIAL CORR command,PARTIAL CORR command,PARTIAL CORR command

MATRIX reads and writes matrix data files.

PARTIAL CORR (command),PARTIAL CORR (command),PARTIAL CORR (command)
matrix output,matrix output,matrix output
PARTIAL CORR (command),PARTIAL CORR (command),PARTIAL CORR (command)
matrix input,matrix input,matrix input
IN (keyword),IN (keyword),IN (keyword)
PARTIAL CORR command,PARTIAL CORR command,PARTIAL CORR command
OUT (keyword),OUT (keyword),OUT (keyword)
PARTIAL CORR command,PARTIAL CORR command,PARTIAL CORR command

• Either IN or OUT and a matrix file in parentheses is required. When both IN and OUT are used on the same PARTIAL CORR procedure, they can be specified on separate MATRIX subcommands or they can both be specified on the same subcommand.

OUT ('savfile'|'dataset') | Write a matrix data file or dataset. Specify either a filename, a previously declared dataset name, or an asterisk, enclosed in parentheses. Filenames should be enclosed in quotes and are stored in the working directory unless a path is included as part of the file specification. If you specify an asterisk (*), the matrix data file replaces the active dataset. If you specify an asterisk or a dataset name, the file is not stored on disk unless you use SAVE or XSAVE.
IN ('savfile'|'dataset') | Read a matrix data file or dataset. Specify either a filename, dataset name created during the current session, or an asterisk enclosed in parentheses. An asterisk reads the matrix data from the active dataset. Filenames should be enclosed in quotes and are read from the working directory unless a path is included as part of the file specification.

Related Topics

PARTIAL CORR
Overview (PARTIAL CORR command)
Example (PARTIAL CORR command)
VARIABLES Subcommand (PARTIAL CORR command)
SIGNIFICANCE Subcommand (PARTIAL CORR command)
STATISTICS Subcommand (PARTIAL CORR command)
FORMAT Subcommand (PARTIAL CORR command)
MISSING Subcommand (PARTIAL CORR command)
Matrix Output (PARTIAL CORR command)
Matrix Input (PARTIAL CORR command)
Format of the Matrix Data File (PARTIAL CORR command)
Split Files (PARTIAL CORR command)
Missing Values (PARTIAL CORR command)
Examples (PARTIAL CORR command)


Matrix Output (PARTIAL CORR command)

• The matrix materials that PARTIAL CORR writes can be used by subsequent PARTIAL CORR procedures or by other procedures that read correlation-type matrices.

• In addition to the partial correlation coefficients, the matrix materials that PARTIAL CORR writes include the mean, standard deviation, and number of cases that are used to compute each coefficient (see Format of the Matrix Data File (PARTIAL CORR command) for a description of the file). If PARTIAL CORR reads matrix data and then writes matrix materials based on those data, the matrix data file that it writes will not include means and standard deviations.

• PARTIAL CORR writes a full square matrix for the analysis that is specified on the VARIABLES subcommand (or the analysis list if keyword VARIABLES is omitted). No matrix is written for subsequent variable lists.

• Any documents that are contained in the active dataset are not transferred to the matrix file.

Related Topics

MATRIX Subcommand (PARTIAL CORR command)
Matrix Input (PARTIAL CORR command)
Format of the Matrix Data File (PARTIAL CORR command)
Split Files (PARTIAL CORR command)
Missing Values (PARTIAL CORR command)
Examples (PARTIAL CORR command)


Matrix Input (PARTIAL CORR command)

• When matrix materials are read from a file other than the active dataset, both the active dataset and the matrix data file that is specified on IN must contain all variables that are specified on the VARIABLES subcommand.

• MATRIX=IN cannot be specified unless a active dataset has already been defined. To read an existing matrix data file at the beginning of a session, use GET to retrieve the matrix file and then specify IN(*) on MATRIX.

• PARTIAL CORR can read correlation-type matrices written by other procedures.

• The program reads variable names, variable and value labels, and print and write formats from the dictionary of the matrix data file.

Related Topics

MATRIX Subcommand (PARTIAL CORR command)
Matrix Output (PARTIAL CORR command)
Format of the Matrix Data File (PARTIAL CORR command)
Split Files (PARTIAL CORR command)
Missing Values (PARTIAL CORR command)
Examples (PARTIAL CORR command)


Format of the Matrix Data File (PARTIAL CORR command)

• The matrix data file includes two special variables that are created by the program: ROWTYPE_ and VARNAME_.

• ROWTYPE_ is a short string variable with values N, MEAN, STDDEV, and PCORR (for the partial correlation coefficient).

• VARNAME_ is a short string variable whose values are the names of the variables that are used to form the correlation matrix. When ROWTYPE_ is PCORR, VARNAME_ gives the variable that is associated with that row of the correlation matrix.

• The remaining variables in the file are the variables that are used to form the correlation matrix.

Related Topics

MATRIX Subcommand (PARTIAL CORR command)
Matrix Output (PARTIAL CORR command)
Matrix Input (PARTIAL CORR command)
Split Files (PARTIAL CORR command)
Missing Values (PARTIAL CORR command)
Examples (PARTIAL CORR command)


Split Files (PARTIAL CORR command)

• When split-file processing is in effect, the first variables in the matrix data file are the split variables, followed by ROWTYPE_, VARNAME_, and the variables that are used to form the correlation matrix.

• A full set of matrix materials is written for each split-file group that is defined by the split variables.

• A split variable cannot have the same variable name as any other variable that is written to the matrix data file.

• If split-file processing is in effect when a matrix is written, the same split file must be in effect when that matrix is read by any procedure.

Related Topics

MATRIX Subcommand (PARTIAL CORR command)
Matrix Output (PARTIAL CORR command)
Matrix Input (PARTIAL CORR command)
Format of the Matrix Data File (PARTIAL CORR command)
Missing Values (PARTIAL CORR command)
Examples (PARTIAL CORR command)


Missing Values (PARTIAL CORR command)

PARTIAL CORR (command),PARTIAL CORR (command),PARTIAL CORR (command)
missing values,missing values,missing values

• With pairwise treatment of missing values (MISSING=ANALYSIS is specified), the matrix of Ns that is used to compute each coefficient is included with the matrix materials.

• With LISTWISE treatment, a single N that is used to calculate all coefficients is included with the matrix materials.

• When reading a matrix data file, be sure to specify a missing-value treatment on PARTIAL CORR that is compatible with the missing-value treatment that was in effect when the matrix materials were produced.

Related Topics

MATRIX Subcommand (PARTIAL CORR command)
Matrix Output (PARTIAL CORR command)
Matrix Input (PARTIAL CORR command)
Format of the Matrix Data File (PARTIAL CORR command)
Split Files (PARTIAL CORR command)
Examples (PARTIAL CORR command)


Examples (PARTIAL CORR command)

Writing Results to a Matrix Data File

GET FILE='/data/city.sav'.
PARTIAL CORR VARIABLES=BUSDRVER MECHANIC ENGINEER TEACHER COOK
                       BY  NETSALRY(1)
  /MATRIX=OUT('/data/partial_matrix.sav').

• PARTIAL CORR reads data from file city.sav and writes one set of matrix materials to file partial_matrix.sav.

• The active dataset is still city.sav. Subsequent commands are executed on city.sav.

Writing Matrix Results That Replace the Active Dataset

GET FILE='/data/city.sav'.
PARTIAL CORR VARIABLES=BUSDRVER MECHANIC ENGINEER TEACHER COOK
  BY  NETSALRY(1)   /MATRIX=OUT(*).
LIST.

• PARTIAL CORR writes the same matrix as in the example above. However, the matrix data file replaces the active dataset. The LIST command is executed on the matrix file, not on the CITY file.

Using a Matrix Data File as Input

GET FILE='/data/personnel.sav'.
FREQUENCIES VARIABLES=AGE.
PARTIAL CORR VARIABLES=BUSDRVER MECHANIC ENGINEER TEACHER COOK
   BY  NETSALRY(1)   /MATRIX=IN('/data/corr_matrix.sav').

• This example performs a frequencies analysis on file personnel.sav and then uses a different file for PARTIAL CORR. The file is an existing matrix data file.

• MATRIX=IN specifies the matrix data file. Both the active dataset and the corr_matrix.sav file must contain all variables that are specified on the VARIABLES subcommand on PARTIAL CORR.

• The corr_matrix.sav file does not replace personnel.sav as the active dataset.

Using an Active Dataset That Contains Matrix Data

GET FILE='/data/corr_matrix.sav'.
PARTIAL CORR VARIABLES=BUSDRVER MECHANIC ENGINEER TEACHER COOK
                       BY NETSALRY(1)
  /MATRIX=IN(*).

• The GET command retrieves the matrix data file corr_matrix.sav.

• MATRIX=IN specifies an asterisk because the active dataset is the matrix file CORMTX. If MATRIX=IN('/data/corr_matrix.sav') is specified, the program issues an error message.

• If the GET command is omitted, the program issues an error message.

GET FILE='/data/city.sav'.
REGRESSION MATRIX=OUT(*)
  /VARIABLES=NETPURSE PUBTRANS MECHANIC BUSDRVER
  /DEPENDENT=NETPURSE /ENTER.
PARTIAL CORR
  VARIABLES = PUBTRANS MECHANIC BUSDRVER BY NETPURSE(1) /MATRIX=IN(*).

• GET retrieves the PASW Statistics data file city.sav.

• REGRESSION computes correlations among the specified variables. MATRIX=OUT(*) writes a matrix data file that replaces the active dataset.

Related Topics

MATRIX Subcommand (PARTIAL CORR command)
Matrix Output (PARTIAL CORR command)
Matrix Input (PARTIAL CORR command)
Format of the Matrix Data File (PARTIAL CORR command)
Split Files (PARTIAL CORR command)
Missing Values (PARTIAL CORR command)


PERMISSIONS

PERMISSIONS (command),PERMISSIONS (command),PERMISSIONS (command)
PERMISSIONS (command),PERMISSIONS (command),PERMISSIONS (command)
syntax chart,syntax chart,syntax chart
PERMISSIONS FILE='filespec'

  /PERMISSIONS {READONLY }
               {WRITEABLE}

Example

This command takes effect immediately. It does not read the active dataset or execute pending transformations. See the topic Command Order for more information.

PERMISSIONS FILE='/mydir/mydata.sav'
  /PERMISSIONS READONLY.

File permissions can also be set from the Mark File Read Only/Mark File Read Write toggle item on the File menu.

Related Topics

Overview (PERMISSIONS command)
PERMISSIONS Subcommand (PERMISSIONS command)


Overview (PERMISSIONS command)

PERMISSIONS changes the read/write permissions for the specified file, using the operating system facilities for changing permissions.

Syntax Rules

• A FILE specification and a PERMISSIONS subcommand are both required.

• The file specification should be enclosed in single quotation marks or double quotation marks.

Related Topics

PERMISSIONS
PERMISSIONS Subcommand (PERMISSIONS command)


PERMISSIONS Subcommand (PERMISSIONS command)

READONLY | File permissions are set to read-only for all users. The file cannot be saved by using the same file name with subsequent changes unless the read/write permissions are changed in the operating system or a subsequent PERMISSIONS command specifies PERMISSIONS=WRITEABLE.
WRITEABLE | File permissions are set to allow writing for the file owner. If file permissions were set to read-only for other users, the file remains read-only for them.

Your ability to change the read/write permissions may be restricted by the operating system.

Related Topics

PERMISSIONS
Overview (PERMISSIONS command)


PLANCARDS

PLANCARDS (command),PLANCARDS (command),PLANCARDS (command)
PLANCARDS (command),PLANCARDS (command),PLANCARDS (command)
syntax chart,syntax chart,syntax chart
release history,release history,release history
Display Design,Display Design,Display Design
command syntax,command syntax,command syntax

PLANCARDS is available in the Conjoint option.

PLANCARDS [FACTORS=varlist]

 [/FORMAT={LIST}]
          {CARD}
          {BOTH}

 [/TITLE='string']

 [/FOOTER='string']

 [/OUTFILE=file]

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

Syntax for the PLANCARDS command can be generated from the Display Design dialog.

Release History Collapse Hide details

Release History

Release 14.0

• PAGINATE subcommand is obsolete and no longer supported.

Example

PLANCARDS /TITLE='Car for Sale'.

Related Topics

Overview (PLANCARDS command)
Examples (PLANCARDS command)
FACTORS Subcommand (PLANCARDS command)
FORMAT Subcommand (PLANCARDS command)
OUTFILE Subcommand (PLANCARDS command)
TITLE Subcommand (PLANCARDS command)
FOOTER Subcommand (PLANCARDS command)


Overview (PLANCARDS command)

PLANCARDS (command),PLANCARDS (command),PLANCARDS (command)
with ORTHOPLAN command,with ORTHOPLAN command,with ORTHOPLAN command
ORTHOPLAN (command),ORTHOPLAN (command),ORTHOPLAN (command)
with PLANCARDS command,with PLANCARDS command,with PLANCARDS command
PLANCARDS (command),PLANCARDS (command),PLANCARDS (command)
with VALUE LABELS command,with VALUE LABELS command,with VALUE LABELS command
VALUE LABELS (command),VALUE LABELS (command),VALUE LABELS (command)
with PLANCARDS command,with PLANCARDS command,with PLANCARDS command
PLANCARDS (command),PLANCARDS (command),PLANCARDS (command)
with VARIABLE LABELS command,with VARIABLE LABELS command,with VARIABLE LABELS command
VARIABLE LABELS (command),VARIABLE LABELS (command),VARIABLE LABELS (command)
with PLANCARDS command,with PLANCARDS command,with PLANCARDS command

PLANCARDS produces profiles, or cards, from a plan file for a conjoint analysis study. The plan file can be generated by ORTHOPLAN or entered by the user. The printed profiles can be used as the experimental stimuli that subjects judge in terms of preference.

Options Collapse Hide details

Options

Format. You can produce profiles in the format of a single list or formatted so that each profile is displayed separately.

Titles and Footers. You can specify title and footer labels that appear at the top and bottom of the output (for single list format) or at the top and bottom of each profile (when the profiles are displayed separately).

Basic Specification Collapse Hide details

Basic Specification

• The basic specification is PLANCARDS, which produces a listing of profiles, using all variables in the active dataset except STATUS_ and CARD_ as factors.

Subcommand Order Collapse Hide details

Subcommand Order

• Subcommands can be named in any order.

Operations Collapse Hide details

Operations

• PLANCARDS assumes that the active dataset represents a plan for a full-profile (full-concept) conjoint study. Each “case” in such a file is one profile in the conjoint experimental plan.

• Factor and factor-level labels in the active dataset—generated by ORTHOPLAN or by the VARIABLE and VALUE LABELS commands—are used in the output.

• The command SPLIT FILE is ignored for single-profile format. In listing format, each subfile represents a different plan, and a new listing begins for each subfile.

• The WEIGHT command is ignored by PLANCARDS.

Limitations Collapse Hide details

Limitations

• Missing values are not recognized as missing and are treated like other values.

Related Topics

PLANCARDS
Examples (PLANCARDS command)
FACTORS Subcommand (PLANCARDS command)
FORMAT Subcommand (PLANCARDS command)
OUTFILE Subcommand (PLANCARDS command)
TITLE Subcommand (PLANCARDS command)
FOOTER Subcommand (PLANCARDS command)


Examples (PLANCARDS command)

ORTHOPLAN FACTORS=SPEED 'Highest possible speed'
   (70 '70 mph' 100 '100 mph' 130 '130 mph')
  WARRANTY 'Length of warranty' ('1 year' '3 year' '5 year')
  SEATS 'Number of seats' (2, 4) /MINIMUM=9 /HOLDOUT=6.
PLANCARDS FORMAT=BOTH
 /TITLE='Car for Sale'.

• ORTHOPLAN generates a set of profiles (cases) for a full-profile conjoint analysis in the active dataset.

• PLANCARDS displays the profiles, along with the title Car for Sale.

Example: User-entered Plan

DATA LIST FREE/ COST NEWNESS EXPER NAME REP
                GUARAN TRIAL TRUST.
VARIABLE LABELS
  COST 'Product cost'
  NEWNESS 'Product newness'
  EXPER 'Brand experience'
  NAME "Manufacturer's Name"
  REP "Distributor's reputation"
  GUARAN 'Money-back Guarantee'
  TRIAL 'Free sample/trial'
  TRUST 'Endorsed by a trusted person'.
VALUE LABELS
  COST 1 'LOW' 2 'HIGH'/
  NEWNESS 1 'NEW' 2 'OLD'/
  EXPER 1 'SOME' 2 'NONE'/
  NAME 1 'ESTABLISHED' 2 'UNKNOWN'/
  REP 1 'GOOD' 2 'UNKNOWN'/
  GUARAN 1 'YES' 2 'NO'/
  TRIAL 1 'YES' 2 'NO'/
  TRUST 1 'YES' 2 'NO'.
BEGIN DATA
 1 2 2 1 2 2 2 1
 2 2 2 1 1 1 2 1
 2 2 1 2 2 1 1 1
 2 1 2 1 2 2 1 2
 2 1 1 2 2 2 2 1
 2 1 2 2 1 1 2 2
 1 1 2 2 1 2 1 1
 1 1 1 1 2 1 2 2
 1 2 1 2 1 2 2 2
 1 1 1 1 1 1 1 1
 2 2 1 1 1 2 1 2
 1 2 2 2 2 1 1 2
END DATA.
PLANCARDS.

• In this example, the plan is entered and defined by the user rather than by ORTHOPLAN.

• PLANCARDS uses the information in the active dataset to produce a set of profiles. Because no format is specified, the default format (single list) is used. The variables and values in this example were taken from Akaah & Korgaonkar (Akaah and Korgaonkar, 1988).

Related Topics

PLANCARDS
Overview (PLANCARDS command)
FACTORS Subcommand (PLANCARDS command)
FORMAT Subcommand (PLANCARDS command)
OUTFILE Subcommand (PLANCARDS command)
TITLE Subcommand (PLANCARDS command)
FOOTER Subcommand (PLANCARDS command)


FACTORS Subcommand (PLANCARDS command)

FACTORS (subcommand),FACTORS (subcommand),FACTORS (subcommand)
PLANCARDS command,PLANCARDS command,PLANCARDS command
PLANCARDS (command),PLANCARDS (command),PLANCARDS (command)
FACTORS subcommand,FACTORS subcommand,FACTORS subcommand

FACTORS identifies the variables to be used as factors and the order in which their labels are to appear in the output. String variables are permitted.

• Keyword FACTORS is followed by a variable list.

• By default, if FACTORS is not specified, all variables in the active dataset (except those variables that are named STATUS_ or CARD_) are used as factors in the order in which they appear in the file. (See the ORTHOPLAN command for information about variables STATUS_ and CARD_.)

Related Topics

PLANCARDS
Overview (PLANCARDS command)
Examples (PLANCARDS command)
FORMAT Subcommand (PLANCARDS command)
OUTFILE Subcommand (PLANCARDS command)
TITLE Subcommand (PLANCARDS command)
FOOTER Subcommand (PLANCARDS command)


FORMAT Subcommand (PLANCARDS command)

FORMAT (subcommand),FORMAT (subcommand),FORMAT (subcommand)
PLANCARDS command,PLANCARDS command,PLANCARDS command
PLANCARDS (command),PLANCARDS (command),PLANCARDS (command)
FORMAT subcommand,FORMAT subcommand,FORMAT subcommand
LIST (keyword),LIST (keyword),LIST (keyword)
PLANCARDS command,PLANCARDS command,PLANCARDS command
CARD (keyword),CARD (keyword),CARD (keyword)
PLANCARDS command,PLANCARDS command,PLANCARDS command
BOTH (keyword),BOTH (keyword),BOTH (keyword)
PLANCARDS command,PLANCARDS command,PLANCARDS command

FORMAT specifies how the profiles should be displayed. The choices are listing format (LIST keyword) and single-profile format (CARD keyword). Listing format displays the profiles in the form of a single list. For single-profile format, output is displayed so that each profile is presented separately.

• The keyword FORMAT is followed by LIST, CARD, or BOTH. (ALL is an alias for BOTH.)

• The default format is LIST.

• With LIST format, holdout profiles are differentiated from experimental profiles, and simulation profiles are listed separately following the experimental and holdout profiles. With CARD format, holdout profiles are not differentiated, and simulation profiles are not produced.

• If FORMAT=LIST is specified along with the OUTFILE subcommand, the OUTFILE subcommand is ignored (OUTFILE only applies to CARD format). Specifying OUTFILE with FORMAT=BOTH is equivalent to OUTFILE with FORMAT=CARD.

Example

PLANCARDS FORMAT=CARD /OUTFILE='DESIGN.FRM'
  /TITLE=' ' 'Profile #)CARD' /FOOTER='RANK:'.

• FORMAT=CARD specifies that the output will be in single-profile format.

• The profiles are written to the file DESIGN.FRM.

• Each profile in DESIGN.FRM will have the title Profile #n at the top and the label RANK: at the bottom, where n is a profile identification number.

The output for the first two profiles is shown below.

Single-profile format

Related Topics

PLANCARDS
Overview (PLANCARDS command)
Examples (PLANCARDS command)
FACTORS Subcommand (PLANCARDS command)
OUTFILE Subcommand (PLANCARDS command)
TITLE Subcommand (PLANCARDS command)
FOOTER Subcommand (PLANCARDS command)


OUTFILE Subcommand (PLANCARDS command)

PLANCARDS (command),PLANCARDS (command),PLANCARDS (command)
saving profiles in data files,saving profiles in data files,saving profiles in data files
data files,data files,data files
saving profiles in PLANCARDS command,saving profiles in PLANCARDS command,saving profiles in PLANCARDS command
profiles,profiles,profiles
saving in data files,saving in data files,saving in data files
OUTFILE (subcommand),OUTFILE (subcommand),OUTFILE (subcommand)
PLANCARDS command,PLANCARDS command,PLANCARDS command
PLANCARDS (command),PLANCARDS (command),PLANCARDS (command)
OUTFILE subcommand,OUTFILE subcommand,OUTFILE subcommand

OUTFILE names an external file where profiles in single-profile format are to be written. Profiles in listing format are not written to an external file.

• By default, no external file is written.

• The OUTFILE keyword is followed by the name of an external file. The file is specified in the usual manner for your system.

• If the OUTFILE subcommand is specified along with FORMAT=LIST, the OUTFILE subcommand is ignored (OUTFILE only applies to FORMAT=CARD ).

Related Topics

PLANCARDS
Overview (PLANCARDS command)
Examples (PLANCARDS command)
FACTORS Subcommand (PLANCARDS command)
FORMAT Subcommand (PLANCARDS command)
TITLE Subcommand (PLANCARDS command)
FOOTER Subcommand (PLANCARDS command)


TITLE Subcommand (PLANCARDS command)

TITLE (subcommand),TITLE (subcommand),TITLE (subcommand)
PLANCARDS command,PLANCARDS command,PLANCARDS command
PLANCARDS (command),PLANCARDS (command),PLANCARDS (command)
TITLE subcommand,TITLE subcommand,TITLE subcommand
)CARD (keyword),)CARD (keyword),)CARD (keyword)
PLANCARDS command,PLANCARDS command,PLANCARDS command

TITLE specifies a string to be used at the top of the output (in listing format) or at the top of each new profile (in single-profile format).

• Default titles are provided, except for output that is directed to an external file with the OUTFILE subcommand.

• The keyword TITLE is followed by a string enclosed in apostrophes.

• Quotation marks can be used to enclose the string instead of apostrophes when you want to use an apostrophe in the title.

• Multiple strings per TITLE subcommand can be specified; each string will appear on a separate line.

• Use an empty string (' ') to cause a blank line.

• Multiple TITLE subcommands can be specified; each subcommand will appear on a separate line.

PLANCARDS (command),PLANCARDS (command),PLANCARDS (command)
sequential profile numbers,sequential profile numbers,sequential profile numbers

• If the special character sequence )CARD is specified anywhere in the title, PLANCARDS will replace it with the sequential profile number in single-profile-formatted output. This character sequence is not translated in listing format.

Related Topics

PLANCARDS
Overview (PLANCARDS command)
Examples (PLANCARDS command)
FACTORS Subcommand (PLANCARDS command)
FORMAT Subcommand (PLANCARDS command)
OUTFILE Subcommand (PLANCARDS command)
FOOTER Subcommand (PLANCARDS command)


FOOTER Subcommand (PLANCARDS command)

FOOTER (subcommand),FOOTER (subcommand),FOOTER (subcommand)
PLANCARDS command,PLANCARDS command,PLANCARDS command
PLANCARDS (command),PLANCARDS (command),PLANCARDS (command)
FOOTER subcommand,FOOTER subcommand,FOOTER subcommand

FOOTER specifies a string to be used at the bottom of the output (in listing format) or at the bottom of each profile (in single-profile format).

• If FOOTER is not used, nothing appears after the last attribute.

• FOOTER is followed by a string enclosed in apostrophes.

• Quotation marks can be used to enclose the string instead of apostrophes when you want to use an apostrophe in the footer.

• Multiple strings per FOOTER subcommand can be specified; each string will appear on a separate line.

• Use an empty string (' ') to cause a blank line.

• Multiple FOOTER subcommands can be specified; each subcommand will appear on a separate line.

• If the special character sequence )CARD is specified anywhere in the footer, PLANCARDS will replace it with the sequential profile number in single-profile-formatted output. This character sequence is not translated in listing format.

Example

PLANCARDS
 TITLE='Profile # )CARD' ' '
   'Circle the number in the scale at the bottom that'
   'indicates how likely you are to purchase this item.' ' '
 /FOOTER= '0   1   2   3   4   5   6   7   8   9  10'
          'Not at all      May or may       Certainly'
          'likely to           not              would'
          'purchase         purchase         purchase'
          '------------------------------------------'
 /FORMAT=CARD
 /OUTFILE='DESIGN.FRM'.

The above example would produce the following output, in DESIGN.FRM, for the first profile:

Footer with multiple strings

Related Topics

PLANCARDS
Overview (PLANCARDS command)
Examples (PLANCARDS command)
FACTORS Subcommand (PLANCARDS command)
FORMAT Subcommand (PLANCARDS command)
OUTFILE Subcommand (PLANCARDS command)
TITLE Subcommand (PLANCARDS command)


PLS

PLS is available in the Statistics Base option.

PLS is an extension command that requires the Python Extension Module to be installed on the system where you plan to run PLS. The PLS Extension Module must be installed separately and the installer can be downloaded from http://www.spss.com/devcentral.

Note: The PLS Extension Module is dependent upon Python software. SPSS Inc. is not the owner or licensor of the Python software. Any user of Python must agree to the terms of the Python license agreement located on the Python Web site. SPSS Inc. is not making any statement about the quality of the Python program. SPSS Inc. fully disclaims all liability associated with your use of the Python program.

PLS (command),PLS (command),PLS (command)
PLS (command),PLS (command),PLS (command)
syntax chart,syntax chart,syntax chart
Partial Least Squares Regression,Partial Least Squares Regression,Partial Least Squares Regression
command syntax,command syntax,command syntax
PLS dependent variable [MLEVEL={N}] [REFERENCE={FIRST }]
                               {O}             {LAST**}
                               {S}             {value }
    [dependent variable...]
    [BY factor list] [WITH covariate list]

[/ID VARIABLE = variable]

[/MODEL effect [...effect]]

[/OUTDATASET [CASES=PASW Statistics dataset]
             [LATENTFACTORS=PASW Statistics dataset]
             [PREDICTORS=PASW Statistics dataset]]

[/CRITERIA  LATENTFACTORS={5**    }]
                          {integer}

** Default if the subcommand or keyword is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See PLS Algorithms for computational details for this procedure.

Syntax for the PLS command can be generated from the Partial Least Squares Regression dialog box.

Release History Collapse Hide details

Release History

Release 16.0

• Command introduced.

Example

PLS Response WITH Price.

Related Topics

Overview (PLS command)
Examples (PLS command)
Variable Lists (PLS command)
ID Subcommand (PLS command)
MODEL Subcommand (PLS command)
OUTDATASET Subcommand (PLS command)
CRITERIA Subcommand (PLS command)
EXTENSION


Overview (PLS command)

The PLS procedure estimates partial least squares regression models. Partial least squares is a predictive technique that is an alternative to ordinary least squares (OLS) regression, canonical correlation, or structural equation modeling for analysis of systems of independent and response variables. It is particularly useful when predictor variables are highly correlated or when the number of predictors exceeds the number of cases.

PLS combines features of principal components analysis and multiple regression. It first extracts a set of latent factors that explains as much of the covariance as possible between the independent and dependent variables. Then a regression step predicts values of the dependent variables using the decomposition of the independent variables.

Partial least squares regression is also known as "Projection to Latent Structure".

Options Collapse Hide details

Options

Response Variables. PLS estimates univariate and multivariate models. If you specify one or more categorical dependent variables, a classification model is estimated. If you specify one or more scale dependent variables, a regression model is estimated. Mixed regression and classification models are supported.

Predictors. Predictors can be categorical or continuous variables. Both main effects and interaction terms can be estimated.

Method. You can specify the maximum number of latent factors to extract. By default, five latent factors are extracted.

Export. You can save casewise, factorwise, and predictorwise model results to PASW Statistics datasets.

Basic Specification Collapse Hide details

Basic Specification

• PLS is an extension command and will not be recognized by the system until you use the EXTENSION command to add PLS to the command table. The syntax diagram for PLS is defined in plscommand.xml, which is installed in the \extensions subdirectory of the main installation directory. See the topic EXTENSION for more information.

• The minimum specification is one or more dependent variables and one or more predictors.

• The procedure displays the following tables: proportion of variance explained (by latent factor), latent factor weights, latent factor loadings, independent variable importance in projection (VIP), and regression parameter estimates (by dependent variable).

Operations Collapse Hide details

Operations

• All model variables are centered and standardized, including indicator variables representing categorical variables.

• If a WEIGHT variable is specified, its values are used as frequency weights. Weight values are rounded to the nearest whole number before use. Cases with missing weights or weights less than 0.5 are not used in the analyses.

• User- and system-missing values are treated as invalid.

• Memory allocated via SET WORKSPACE is unavailable to extension commands; when running PLS on large datasets, you may actually lower the size of your workspace.

Syntax Rules Collapse Hide details

Syntax Rules

• The PLS command is required. All subcommands are optional.

• Only a single instance of each subcommand is allowed.

• An error occurs if an attribute or keyword is specified more than once within a subcommand.

• Equals signs and parentheses shown in the syntax chart are required.

• Subcommand names and keywords must be spelled in full.

• Empty subcommands are not allowed.

Related Topics

PLS
Examples (PLS command)
Variable Lists (PLS command)
ID Subcommand (PLS command)
MODEL Subcommand (PLS command)
OUTDATASET Subcommand (PLS command)
CRITERIA Subcommand (PLS command)
WORKSPACE and MXCELLS Subcommands (SET command)


Examples (PLS command)

PLS Response WITH Price.

• PLS estimates a univariate prediction model that regresses Response on Price.

• Measurement level is not explicitly specified for dependent variable Response. Thus, if Response is categorical (nominal or ordinal), a classification model is estimated; otherwise, if Response is scale, a regression model is estimated.

• Variable Price is treated as a continuous predictor (covariate).

Classification Model (Explicitly Specified)

PLS Response MLEVEL=N REFERENCE=5 BY Region WITH Price.

• PLS estimates a univariate prediction model.

• Since dependent variable Response is specified as nominal (N), a classification model is estimated. Value 5 is used as the reference category.

• Variable Region is treated as a categorical predictor and Price is treated as a continuous predictor (covariate). By default, a main effects model is estimated.

Multivariate Model

PLS Q1 MLEVEL=S Q2 MLEVEL=S BY Region Edlevel
  /MODEL Region Edlevel Region*Edlevel.

• PLS estimates a multivariate regression model.

• Both dependent variables, Q1 and Q2, are treated as scale (continuous) variables.

• Variables Region and Edlevel are treated as categorical predictors.

• MODEL specifies a fully factorial ANOVA model that includes main effects for Region and Edlevel as well as the interaction between the two predictors.

Requesting optional plots

PLS lnsales MLEVEL=S BY type WITH price engine_s horsepow wheelbas width
    length curb_wgt fuel_cap mpg
  /CRITERIA LATENTFACTORS=5
  /OUTDATASET CASES=indvCases LATENTFACTORS=latentFactors
    PREDICTORS=indepVars.

• The procedure fits a partial least squares regression model to the scale variable lnsales, using type as a factor and price through mpg as covariates.

• The OUTDATASET subcommand requests that output variables related to individual cases, latent factors, and predictors be saved to new datasets indvCases, latentFactors, and indepVars, respectively. These selections will also produce plots of latent factor scores, latent factor weights, and variable importance to projection (VIP) by latent factor.

• All other options are set to their default values.

For discussion of output from this syntax and to place the example in context, see Using Partial Least Squares Regression to Model Vehicle Sales.

Related Topics

PLS
Overview (PLS command)
Variable Lists (PLS command)
ID Subcommand (PLS command)
MODEL Subcommand (PLS command)
OUTDATASET Subcommand (PLS command)
CRITERIA Subcommand (PLS command)


Variable Lists (PLS command)

PLS (command),PLS (command),PLS (command)
variable lists,variable lists,variable lists

The command line variable lists specify the dependent variables, any categorical predictors (factors), and any scale predictors (covariates). ALL and TO keywords are supported in all variable lists.

Dependent Variables Collapse Hide details

Dependent Variables

A list of one or more dependent variables must be the first specification on the PLS command.

• Dependent variables can be numeric or string.

• If a dependent variable is specified more than once, only the last specification is honored for the variable.

MLEVEL (keyword),MLEVEL (keyword),MLEVEL (keyword)
PLS command,PLS command,PLS command
MLEVEL Keyword Collapse Hide details

MLEVEL Keyword

By default, the measurement level recorded in the data dictionary is honored for dependent variables.

• The MLEVEL keyword can be specified after the name of any dependent variable to override its dictionary level of measurement. Specify N (nominal), O (ordinal), or S (scale). Note that the PLS procedure does not distinguish between ordinal and nominal dependent variables; it treats both as categorical.

• If MLEVEL is not specified and no setting is recorded in the data dictionary, then a numeric variable is treated as scale and a string variable is treated as categorical.

• A string dependent variable may be defined as ordinal or nominal only.

• MLEVEL applies only to the variable that immediately precedes it in the dependent variable list. For example, Age Income [S] and Age TO Income [S] assign the scale level of measurement to Income only. The keyword ALL followed by a measurement level specification applies that measurement level to all dependent variables.

REFERENCE (keyword),REFERENCE (keyword),REFERENCE (keyword)
PLS command,PLS command,PLS command
REFERENCE Keyword Collapse Hide details

REFERENCE Keyword

The REFERENCE keyword specifies the value of the dependent variable to use as the reference category for parameter estimation. REFERENCE can be specified after the name of any dependent variables but is honored only for categorical dependent variables. It is silently ignored for scale variables.

• Specify FIRST, LAST, or a value. If you specify FIRST, the lowest value is treated as the reference category. LAST (the default) treats highest value of the dependent variable as the reference category.

• If you specify a value it must exist in the data and be consistent with the type and format of the dependent variable. String and formatted (for example, date or time) values must be quoted.

• REFERENCE applies only to the variable that immediately precedes it in the dependent variable list. The keyword ALL followed by a REFERENCE specification applies that reference category to all categorical dependent variables.

Predictor Variables Collapse Hide details

Predictor Variables

• At least one predictor must be specified.

• The names of the categorical predictors, if any, must be preceded by the keyword BY. If keyword BY is specified with no factors, then a warning is issued and BY is ignored.

• The names of the covariates, if any, must be preceded by the keyword WITH. If keyword WITH is specified with no covariates, then a warning is issued and WITH is ignored.

• Categorical predictor variables can be numeric or string.

• Covariates must be numeric.

• If the dependent variable is specified within a categorical predictor list or a covariate list, then it is ignored in the list.

• All variables specified within a categorical predictor or covariate list must be unique. If duplicate variables are specified within a list, then the duplicates are ignored.

• If duplicate variables are specified across the predictor lists, then an error is issued.

Related Topics

PLS
Overview (PLS command)
Examples (PLS command)
ID Subcommand (PLS command)
MODEL Subcommand (PLS command)
OUTDATASET Subcommand (PLS command)
CRITERIA Subcommand (PLS command)


ID Subcommand (PLS command)

PLS (command),PLS (command),PLS (command)
ID subcommand,ID subcommand,ID subcommand
ID (subcommand),ID (subcommand),ID (subcommand)
PLS command,PLS command,PLS command

The ID subcommand specifies a variable that is used as a unique identifier in casewise output and saved datasets (see the OUTDATASET Subcommand). If this option is not specified, case number is used as the identifier.

Specify a string or numeric variable. An error is issued if the identifier variable is specified as a dependent or predictor variable.

Related Topics

PLS
Overview (PLS command)
Examples (PLS command)
Variable Lists (PLS command)
MODEL Subcommand (PLS command)
OUTDATASET Subcommand (PLS command)
CRITERIA Subcommand (PLS command)


MODEL Subcommand (PLS command)

PLS (command),PLS (command),PLS (command)
MODEL subcommand,MODEL subcommand,MODEL subcommand
MODEL (subcommand),MODEL (subcommand),MODEL (subcommand)
PLS command,PLS command,PLS command

The MODEL subcommand is used to specify model effects.

• Specify a list of terms to be included in the model.

• If the MODEL subcommand is not specified, the default model includes main effects for any categorical predictors and covariates.

• To include a term for the main effect of a categorical predictor or covariate, enter the name of the variable.

• To include a term for an interaction among predictors, use the keyword BY or the asterisk (*) to join the variables involved in the interaction. For example, A*B means a two-way interaction effect of A and B. A*A is not allowed because variables inside an interaction effect must be distinct.

• Interactions among covariates are valid, as are interactions between categorical predictors and covariates.

• Nested terms are not supported in the PLS procedure.

Related Topics

PLS
Overview (PLS command)
Examples (PLS command)
Variable Lists (PLS command)
ID Subcommand (PLS command)
OUTDATASET Subcommand (PLS command)
CRITERIA Subcommand (PLS command)


OUTDATASET Subcommand (PLS command)

PLS (command),PLS (command),PLS (command)
OUTDATASET subcommand,OUTDATASET subcommand,OUTDATASET subcommand
OUTDATASET (subcommand),OUTDATASET (subcommand),OUTDATASET (subcommand)
PLS command,PLS command,PLS command

The OUTDATASET subcommand requests output datasets and plots for model estimates. You can obtain casewise, factorwise, and predictorwise results. None are produced by default.

CASES (keyword),CASES (keyword),CASES (keyword)
PLS command,PLS command,PLS command
CASES Keyword Collapse Hide details

CASES Keyword

CASES saves the following caseswise model estimates: predicted values, residuals, distance to latent factor model, and latent factor scores. It also plots latent factor scores.

Specify the name of the PASW Statistics dataset. The dataset name must be unique within an invocation of the PLS procedure. If you specify the name of an existing dataset, its contents are replaced; otherwise, a new dataset is created. An error is generated if an external file is specified.

LATENTFACTORS (keyword),LATENTFACTORS (keyword),LATENTFACTORS (keyword)
PLS command,PLS command,PLS command
LATENTFACTORS Keyword Collapse Hide details

LATENTFACTORS Keyword

LATENTFACTORS saves latent factor loadings and latent factor weights. It also plots latent factor weights.

Specify the name of the PASW Statistics dataset. The dataset name must be unique within an invocation of the PLS procedure. If you specify the name of an existing dataset, its contents are replaced; otherwise, a new dataset is created. An error is generated if an external file is specified.

PREDICTORS (keyword),PREDICTORS (keyword),PREDICTORS (keyword)
PLS command,PLS command,PLS command
PREDICTORS Keyword Collapse Hide details

PREDICTORS Keyword

PREDICTORS saves regression parameter estimates and variable importance to projection (VIP). It also plots VIP by latent factor.

Specify the name of the PASW Statistics dataset. The dataset name must be unique within an invocation of the PLS procedure. If you specify the name of an existing dataset, its contents are replaced; otherwise, a new dataset is created. An error is generated if an external file is specified.

Related Topics

PLS
Overview (PLS command)
Examples (PLS command)
Variable Lists (PLS command)
ID Subcommand (PLS command)
MODEL Subcommand (PLS command)
CRITERIA Subcommand (PLS command)


CRITERIA Subcommand (PLS command)

PLS (command),PLS (command),PLS (command)
CRITERIA subcommand,CRITERIA subcommand,CRITERIA subcommand
CRITERIA (subcommand),CRITERIA (subcommand),CRITERIA (subcommand)
PLS command,PLS command,PLS command

The CRITERIA subcommand specifies model estimation criteria.

LATENTFACTORS (keyword),LATENTFACTORS (keyword),LATENTFACTORS (keyword)
PLS command,PLS command,PLS command
LATENTFACTORS Keyword Collapse Hide details

LATENTFACTORS Keyword

The LATENTFACTORS keyword specifies an upper limit on the number of latent factors that are extracted. By default, a maximum of five factors are extracted. The value must be a positive integer.

The number of latent factors that is actually extracted may be fewer than the number requested. For example, it is limited by the number of cases and predictors (whichever is smaller).

Related Topics

PLS
Overview (PLS command)
Examples (PLS command)
Variable Lists (PLS command)
ID Subcommand (PLS command)
MODEL Subcommand (PLS command)
OUTDATASET Subcommand (PLS command)


PLUM

PLUM (command),PLUM (command),PLUM (command)
PLUM (command),PLUM (command),PLUM (command)
syntax chart,syntax chart,syntax chart
Ordinal Regression,Ordinal Regression,Ordinal Regression
command syntax,command syntax,command syntax

PLUM is available in the Statistics Base option.

PLUM dependent variable [BY factor varlist] [WITH covariate varlist]

[/CRITERIA = [CIN({95** })] [DELTA({0**   })] [MXITER({100**})] [MXSTEP({5**})]
                  {value}          {value }           {n    }           {n  }
             [LCONVERGE({0**  })] [PCONVERGE({1.0E-6**})] [SINGULAR({1.0E-8**})]
                        {value}              {value   }             {value   }
             [BIAS] ]

[/LINK = {CAUCHIT}]
         {CLOGLOG}
         {LOGIT**}
         {NLOGLOG}
         {PROBIT }

[/LOCATION = [effect effect ...] ]

[/MISSING = {EXCLUDE**}]
            {INCLUDE  }

[/PRINT = [CELLINFO] [CORB] [COVB] [FIT] [HISTORY({1})] [KERNEL]
                                                  {n}
          [TPARALLEL] [PARAMETER] [SUMMARY]]

[/SAVE = [ESTPROB [(rootname [:{25**}])] [PREDCAT [(newname)]] [PCPROB [(newname)]]
                               {n   }    [ACPROB [(newname)] ]

[/SCALE = [effect effect ...] ]

[/TEST [(valuelist)] = [‘label’] effect valuelist [effect valuelist] ...;
       [effect valuelist [effect valuelist] ...;] ... ]

[/TEST [(valuelist)] = [‘label’] ALL list; [ALL list;] ... ].

** Default if the subcommand is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See PLUM Algorithms for computational details for this procedure.

Syntax for the PLUM command can be generated from the Ordinal Regression dialog.

Example

PLUM chist.

Related Topics

Overview (PLUM command)
Example (PLUM command)
Variable List (PLUM command)
Weight Variable (PLUM command)
CRITERIA Subcommand (PLUM command)
LINK Subcommand (PLUM command)
LOCATION Subcommand (PLUM command)
MISSING Subcommand (PLUM command)
PRINT Subcommand (PLUM command)
SAVE Subcommand (PLUM command)
SCALE Subcommand (PLUM command)
TEST Subcommand (PLUM command)


Overview (PLUM command)

This procedure makes use of a general class of models to allow you to analyze the relationship between a polytomous ordinal dependent variable and a set of predictors. These models utilize the ordinal nature of the dependent variable and eliminate the need for rescaling.

Options Collapse Hide details

Options

Link Functions. Five link functions are available for specifying the model with the LINK subcommand.

Tuning the Algorithm. You can control the values of algorithm-tuning parameters with the CRITERIA subcommand.

Optional Output. You can request additional output through the PRINT subcommand.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is one dependent variable.

Syntax Rules Collapse Hide details

Syntax Rules

• A minimum of one dependent variable must be specified.

• The variable specification must come first and can be specified only once.

• Subcommands can be specified in any order.

• When subcommands (except the TEST subcommand) are repeated, previous specifications are discarded and the last subcommand is in effect.

• Empty subcommands (except the LOCATION and the SCALE subcommands) are ignored. An empty LOCATION or SCALE subcommand indicates a simple additive model.

• The words BY, WITH, and WITHIN are reserved keywords in this procedure.

Related Topics

PLUM
Example (PLUM command)
Variable List (PLUM command)
Weight Variable (PLUM command)
CRITERIA Subcommand (PLUM command)
LINK Subcommand (PLUM command)
LOCATION Subcommand (PLUM command)
MISSING Subcommand (PLUM command)
PRINT Subcommand (PLUM command)
SAVE Subcommand (PLUM command)
SCALE Subcommand (PLUM command)
TEST Subcommand (PLUM command)


Example (PLUM command)

PLUM
  chist  BY numcred othnstal housng  WITH age duration
  /CRITERIA = CIN(95) DELTA(0) LCONVERGE(0) MXITER(100) MXSTEP(5)
  PCONVERGE(1.0E-6) SINGULAR(1.0E-8)
  /LINK = CLOGLOG
  /PRINT = FIT PARAMETER SUMMARY TPARALLEL
  /SAVE = PREDCAT .

• chist is the dependent variable, numcred, othnstal, and housing are factors, and age and duration are covariates.

• LOCATION is not specified, so by default the location model is based on the main effects of all factors and covariates.

• CRITERIA specifies that the confidence level to use is 95, no delta value should be added to cells with observed zero frequency, and neither the log-likelihood nor parameter estimates convergence criteria should be used. This means that the procedure will stop when either 100 iterations or 5 step-halving operations have been performed.

• LINK specifies that the complementary log-log function should be used.

• PRINT specifies that the goodness-of-fit statistics, parameter statistics, model summary, and test of parallel lines should be displayed.

• SAVE specifies that the predicted category for each case should be saved to the active dataset.

For discussion of output from this syntax and to place the example in context, see Using Ordinal Regression to Build a Credit Scoring Model.

Related Topics

PLUM
Overview (PLUM command)
Variable List (PLUM command)
Weight Variable (PLUM command)
CRITERIA Subcommand (PLUM command)
LINK Subcommand (PLUM command)
LOCATION Subcommand (PLUM command)
MISSING Subcommand (PLUM command)
PRINT Subcommand (PLUM command)
SAVE Subcommand (PLUM command)
SCALE Subcommand (PLUM command)
TEST Subcommand (PLUM command)


Variable List (PLUM command)

The variable list specifies the dependent variable, factors, and covariates in the model.

• The dependent variable must be the first specification on the command line.

• The dependent variable is assumed to be an ordinal variable and can be of any type (numeric versus string). The order is determined by sorting the level of the dependent variable in ascending order. The lowest value defines the first category.

• Factor variables can be of any type (numeric versus string). Factor levels are sorted in ascending order. The lowest value defines the first category.

• Covariate variables must be numeric.

• Names of the factors follow the dependent variable separated by the keyword BY.

• Enter the covariates, if any, following the factors. Use the keyword WITH to separate covariates from factors (if any) and the dependent variable.

Related Topics

PLUM
Overview (PLUM command)
Example (PLUM command)
Weight Variable (PLUM command)
CRITERIA Subcommand (PLUM command)
LINK Subcommand (PLUM command)
LOCATION Subcommand (PLUM command)
MISSING Subcommand (PLUM command)
PRINT Subcommand (PLUM command)
SAVE Subcommand (PLUM command)
SCALE Subcommand (PLUM command)
TEST Subcommand (PLUM command)


Weight Variable (PLUM command)

• If a WEIGHT variable is specified, this procedure will take the non-missing weight values, rounded to the nearest integer, as frequencies.

• Cases with negative frequencies are always excluded.

Related Topics

PLUM
Overview (PLUM command)
Example (PLUM command)
Variable List (PLUM command)
CRITERIA Subcommand (PLUM command)
LINK Subcommand (PLUM command)
LOCATION Subcommand (PLUM command)
MISSING Subcommand (PLUM command)
PRINT Subcommand (PLUM command)
SAVE Subcommand (PLUM command)
SCALE Subcommand (PLUM command)
TEST Subcommand (PLUM command)


CRITERIA Subcommand (PLUM command)

CRITERIA (subcommand),CRITERIA (subcommand),CRITERIA (subcommand)
PLUM command,PLUM command,PLUM command
PLUM (command),PLUM (command),PLUM (command)
CRITERIA subcommand,CRITERIA subcommand,CRITERIA subcommand

The CRITERIA subcommand offers controls on the iterative algorithm used for estimation, specifies numerical tolerance for checking singularity, and offers options to customize your output.

BIAS (keyword),BIAS (keyword),BIAS (keyword)
PLUM command,PLUM command,PLUM command
CIN (keyword),CIN (keyword),CIN (keyword)
PLUM command,PLUM command,PLUM command
DELTA (keyword),DELTA (keyword),DELTA (keyword)
PLUM command,PLUM command,PLUM command
LCONVERGE (keyword),LCONVERGE (keyword),LCONVERGE (keyword)
PLUM command,PLUM command,PLUM command
MXITER (keyword),MXITER (keyword),MXITER (keyword)
PLUM command,PLUM command,PLUM command
MXSTEP (keyword),MXSTEP (keyword),MXSTEP (keyword)
PLUM command,PLUM command,PLUM command
PCONVERGE (keyword),PCONVERGE (keyword),PCONVERGE (keyword)
PLUM command,PLUM command,PLUM command
SINGULAR (keyword),SINGULAR (keyword),SINGULAR (keyword)
PLUM command,PLUM command,PLUM command
BIAS | Bias value added to all observed cell frequencies. Specify a non-negative value less than 1. The default value is 0.0.
CIN | Confidence interval level. Specify a value greater than or equal to 0 and less than 100. The default value is 95.
DELTA | Delta value added to observed zero frequency. Specify a non-negative value less than 1. The default value is 0.0.
LCONVERGE | Log-likelihood function convergence criterion. Convergence is assumed if the absolute change or relative change in the log-likelihood function is less than this value. The criterion is not used if the value is 0. Specify a non-negative value. The default value is 0.
MXITER | Maximum number of iterations. Specify a non-negative integer. The default value is 100. Specifying 0 gives the initial estimates.
MXSTEP | Maximum step-halving allowed. Specify a positive integer. The default value is 5.
PCONVERGE | Parameter estimates convergence criterion. Convergence is assumed if the maximum absolute change in each of the parameter estimates is less than this value. The criterion is not used if the value is 0. Specify a non-negative value. The default value is 10-6.
SINGULAR | Value used as tolerance in checking singularity. Specify a positive value. The default value is 10-8.

Related Topics

PLUM
Overview (PLUM command)
Example (PLUM command)
Variable List (PLUM command)
Weight Variable (PLUM command)
LINK Subcommand (PLUM command)
LOCATION Subcommand (PLUM command)
MISSING Subcommand (PLUM command)
PRINT Subcommand (PLUM command)
SAVE Subcommand (PLUM command)
SCALE Subcommand (PLUM command)
TEST Subcommand (PLUM command)


LINK Subcommand (PLUM command)

LINK (subcommand),LINK (subcommand),LINK (subcommand)
PLUM command,PLUM command,PLUM command
PLUM (command),PLUM (command),PLUM (command)
LINK subcommand,LINK subcommand,LINK subcommand

The LINK subcommand offers five link functions to specify the model.

• If LINK is not specified, LOGIT is the default.

• The five keywords are mutually exclusive. Only one of them can be specified and only once.

CAUCHIT (keyword),CAUCHIT (keyword),CAUCHIT (keyword)
PLUM command,PLUM command,PLUM command
Cauchit link,Cauchit link,Cauchit link
in Ordinal Regression,in Ordinal Regression,in Ordinal Regression
CLOGLOG (keyword),CLOGLOG (keyword),CLOGLOG (keyword)
PLUM command,PLUM command,PLUM command
complementary log-log link,complementary log-log link,complementary log-log link
PLUM command,PLUM command,PLUM command
LOGIT (keyword),LOGIT (keyword),LOGIT (keyword)
PLUM command,PLUM command,PLUM command
logit link,logit link,logit link
PLUM command,PLUM command,PLUM command
NLOGLOG (keyword),NLOGLOG (keyword),NLOGLOG (keyword)
PLUM command,PLUM command,PLUM command
negative log-log link,negative log-log link,negative log-log link
PLUM command,PLUM command,PLUM command
PROBIT (keyword),PROBIT (keyword),PROBIT (keyword)
PLUM command,PLUM command,PLUM command
probit link,probit link,probit link
PLUM command,PLUM command,PLUM command
CAUCHIT | Cauchit function. f(x) = tan(π(x – 0.5)).
CLOGLOG | Complementary log-log function. f(x) = log(– log(1 – x)).
LOGIT | Logit function. f(x) = log(x / (1 – x)). This is the default link function.
NLOGLOG | Negative log-log function. f(x) = –log(– log(x)).
PROBIT | Probit function. f(x) = Φ -1(x), where Φ -1 is the inverse standard normal cumulative distribution function.

Related Topics

PLUM
Overview (PLUM command)
Example (PLUM command)
Variable List (PLUM command)
Weight Variable (PLUM command)
CRITERIA Subcommand (PLUM command)
LOCATION Subcommand (PLUM command)
MISSING Subcommand (PLUM command)
PRINT Subcommand (PLUM command)
SAVE Subcommand (PLUM command)
SCALE Subcommand (PLUM command)
TEST Subcommand (PLUM command)


LOCATION Subcommand (PLUM command)

LOCATION (subcommand),LOCATION (subcommand),LOCATION (subcommand)
PLUM command,PLUM command,PLUM command
PLUM (command),PLUM (command),PLUM (command)
LOCATION subcommand,LOCATION subcommand,LOCATION subcommand

The LOCATION subcommand specifies the location model.

• Specify a list of terms to be included in the location model, separated by commas or spaces.

• The default location model is generated if the subcommand is not specified or empty. The default model contains the intercept, all of the covariates (if specified) in the order in which they are specified, and all of the main factorial effects in the order in which they are specified on the variable list.

• To include the intercept term explicitly, enter the keyword INTERCEPT on the subcommand.

• To include a main effect term, enter the name of the factor on the subcommand.

• To include an interaction effect term among factors, use the keyword BY or the asterisk (*) to join factors involved in the interaction. For example, A*B*C means a three-way interaction effect of A, B, and C, where A, B, and C are factors. The expression A BY B BY C is equivalent to A*B*C. Factors inside an interaction effect must be distinct. Expressions such as A*C*A and A*A are invalid. The keyword INTERCEPT cannot be used to construct an interaction term.

• To include a nested effect term, use the keyword WITHIN or a pair of parentheses on the subcommand. For example, A(B) means that A is nested within B, where A and B are factors. The expression A WITHIN B is equivalent to A(B). Factors inside a nested effect must be distinct. Expressions such as A(A) and A(B*A) are invalid.

• Multiple level nesting is supported. For example, A(B(C)) means that B is nested within C, and A is nested within B(C). When more than one pair of parentheses is present, each pair of parentheses must be enclosed or nested within another pair of parentheses. Thus, A(B)(C) is not valid.

• Nesting within an interaction effect is valid. For example, A(B*C) means that A is nested within B*C.

• Interactions among nested effects are allowed. The correct syntax is the interaction followed by the common nested effect inside the parentheses. For example, interaction between A and B within levels of C should be specified as A*B(C) instead of A(C)*B(C).

• To include a covariate term in the model, enter the name of the covariate on the subcommand.

• Covariates can be connected, but not nested, using the keyword BY or the asterisk (*) operator. For example, X*X is the product of X and itself. This is equivalent to a covariate whose values are the square of those of X. On the contrary, X(Y) is invalid.

• Factor and covariate effects can be connected in many ways. No effects can be nested within a covariate effect. Suppose A and B are factors and X and Y are covariates. Examples of valid combination of factor and covariate effects are A*X, A*B*X, X(A), X(A*B), X*A(B), X*Y(A*B), and A*B*X*Y.

Example

PLUM
  chist  BY numcred othnstal
  /CRITERIA = CIN(95) DELTA(0) LCONVERGE(0) MXITER(100) MXSTEP(5)
              PCONVERGE(0)
  /LOCATION = numcred othnstal numcred*othnstal.

• LOCATION specifies that the location model consists of numcred, othnstal, and their interaction effect.

Related Topics

PLUM
Overview (PLUM command)
Example (PLUM command)
Variable List (PLUM command)
Weight Variable (PLUM command)
CRITERIA Subcommand (PLUM command)
LINK Subcommand (PLUM command)
MISSING Subcommand (PLUM command)
PRINT Subcommand (PLUM command)
SAVE Subcommand (PLUM command)
SCALE Subcommand (PLUM command)
TEST Subcommand (PLUM command)


MISSING Subcommand (PLUM command)

MISSING (subcommand),MISSING (subcommand),MISSING (subcommand)
PLUM command,PLUM command,PLUM command
PLUM (command),PLUM (command),PLUM (command)
MISSING subcommand,MISSING subcommand,MISSING subcommand

By default, cases with missing values for any of the variables on the variable list are excluded from the analysis. The MISSING subcommand allows you to include cases with user-missing values.

• If MISSING is not specified, the default is EXCLUDE.

• Listwise deletion is always used in this procedure.

• Keywords EXCLUDE and INCLUDE are mutually exclusive. Only one of them can be specified and only once.

EXCLUDE (keyword),EXCLUDE (keyword),EXCLUDE (keyword)
PLUM command,PLUM command,PLUM command
INCLUDE (keyword),INCLUDE (keyword),INCLUDE (keyword)
PLUM command,PLUM command,PLUM command
EXCLUDE | Exclude both user-missing and system-missing values. This is the default.
INCLUDE | User-missing values are treated as valid. System-missing values cannot be included in the analysis.

Related Topics

PLUM
Overview (PLUM command)
Example (PLUM command)
Variable List (PLUM command)
Weight Variable (PLUM command)
CRITERIA Subcommand (PLUM command)
LINK Subcommand (PLUM command)
LOCATION Subcommand (PLUM command)
PRINT Subcommand (PLUM command)
SAVE Subcommand (PLUM command)
SCALE Subcommand (PLUM command)
TEST Subcommand (PLUM command)


PRINT Subcommand (PLUM command)

PRINT (subcommand),PRINT (subcommand),PRINT (subcommand)
PLUM command,PLUM command,PLUM command
PLUM (command),PLUM (command),PLUM (command)
PRINT subcommand,PRINT subcommand,PRINT subcommand

The PRINT subcommand controls the display of optional output. If no PRINT subcommand is specified, default output includes a case-processing summary table.

CELLINFO (keyword),CELLINFO (keyword),CELLINFO (keyword)
PLUM command,PLUM command,PLUM command
CORB (keyword),CORB (keyword),CORB (keyword)
PLUM command,PLUM command,PLUM command
COVB (keyword),COVB (keyword),COVB (keyword)
PLUM command,PLUM command,PLUM command
FIT (keyword),FIT (keyword),FIT (keyword)
PLUM command,PLUM command,PLUM command
HISTORY (keyword),HISTORY (keyword),HISTORY (keyword)
PLUM command,PLUM command,PLUM command
KERNEL (keyword),KERNEL (keyword),KERNEL (keyword)
PLUM command,PLUM command,PLUM command
PARALLEL (keyword),PARALLEL (keyword),PARALLEL (keyword)
PLUM command,PLUM command,PLUM command
PARAMETER (keyword),PARAMETER (keyword),PARAMETER (keyword)
PLUM command,PLUM command,PLUM command
SUMMARY (keyword),SUMMARY (keyword),SUMMARY (keyword)
PLUM command,PLUM command,PLUM command
CELLINFO | Cell information. Observed and expected frequencies by category and cumulative, Pearson residual for cumulative and category frequencies, and observed and expected probabilities of each response category separately and cumulatively by covariate pattern combination.
CORB | Asymptotic correlation matrix of the parameter estimates.
COVB | Asymptotic covariance matrix of the parameter estimates.
FIT | Goodness-of-fit statistics. The Pearson chi-square and the likelihood-ratio chi-square statistics. The statistics are computed based on the classification specified on the variable list.
HISTORY | Iteration history. The table contains log-likelihood function value and parameter estimates every n iterations. The default value is n = 1. The first and the last iterations are always printed if HISTORY is specified and regardless of the value of n.
KERNEL | Use the kernel of the log-likelihood function for display instead of the complete log-likelihood function.
TPARALLEL | Test of parallel lines assumption. Produce a chi-squared score test of the parallel lines assumption.
PARAMETER | Parameter statistics. The parameter estimates, the standard errors, the significances, and the confidence interval.
SUMMARY | Model summary. The Cox & Snell’s R2, the Nagelkerke’s R2, and the McFadden’s R2 statistics.

Related Topics

PLUM
Overview (PLUM command)
Example (PLUM command)
Variable List (PLUM command)
Weight Variable (PLUM command)
CRITERIA Subcommand (PLUM command)
LINK Subcommand (PLUM command)
LOCATION Subcommand (PLUM command)
MISSING Subcommand (PLUM command)
SAVE Subcommand (PLUM command)
SCALE Subcommand (PLUM command)
TEST Subcommand (PLUM command)


SAVE Subcommand (PLUM command)

SAVE (subcommand),SAVE (subcommand),SAVE (subcommand)
PLUM command,PLUM command,PLUM command
PLUM (command),PLUM (command),PLUM (command)
SAVE subcommand,SAVE subcommand,SAVE subcommand

The SAVE subcommand puts casewise post-estimation statistics back into the active file.

• The new variables must have valid variable names that are not in use in the working file.

• The rootname must be a valid variable name.

• The new variables are saved to the working file in the order the keywords are specified on the subcommand.

ESTPROB (keyword),ESTPROB (keyword),ESTPROB (keyword)
PLUM command,PLUM command,PLUM command
PREDCAT (keyword),PREDCAT (keyword),PREDCAT (keyword)
PLUM command,PLUM command,PLUM command
PCPROB (keyword),PCPROB (keyword),PCPROB (keyword)
PLUM command,PLUM command,PLUM command
ACPROB (keyword),ACPROB (keyword),ACPROB (keyword)
PLUM command,PLUM command,PLUM command
ESTPROB | Estimated probabilities of classifying a factor/covariate pattern into the response categories. The predicted probabilities of the first n categories are saved. The default number of categories is 25. To specify a number of categories without a rootname, put a colon before the number.
PREDCAT | The response category that has the maximum expected probability for a factor/covariate pattern.
PCPROB | Estimated probability of classifying a factor/covariate pattern into the predicted category. This probability is the maximum of the estimated probabilities of the factor/covariate pattern.
ACPROB | Estimated probability of classifying a factor/covariate pattern into the actual category.

Example

PLUM
  chist  BY numcred othnstal
  /CRITERIA = CIN(95) DELTA(0) LCONVERGE(0) MXITER(100) MXSTEP(5)
              PCONVERGE(0)
  /SAVE = ACPROB(correct) PRPROB.

• SAVE specifies that the estimated probabilities of correctly classifying each case should be saved to the variable correct. The estimated probabilities of classifying each case into the predicted category are saved to the default variable pcp_k, where k is the smallest integer for which pcp_k does not already exist.

Related Topics

PLUM
Overview (PLUM command)
Example (PLUM command)
Variable List (PLUM command)
Weight Variable (PLUM command)
CRITERIA Subcommand (PLUM command)
LINK Subcommand (PLUM command)
LOCATION Subcommand (PLUM command)
MISSING Subcommand (PLUM command)
PRINT Subcommand (PLUM command)
SCALE Subcommand (PLUM command)
TEST Subcommand (PLUM command)


SCALE Subcommand (PLUM command)

SCALE (subcommand),SCALE (subcommand),SCALE (subcommand)
PLUM command,PLUM command,PLUM command
PLUM (command),PLUM (command),PLUM (command)
SCALE subcommand,SCALE subcommand,SCALE subcommand
scale model,scale model,scale model
PLUM command,PLUM command,PLUM command

The SCALE subcommand specifies the scale component in the model.

• Specify a list of terms to be included in the model, separated by commas or spaces.

• The model will have no scale component if the subcommand is omitted.

• No scale component is generated if the subcommand is not specified or empty.

• To include a main effect term, enter the name of the factor on the subcommand.

• The keyword INTERCEPT is not allowed on the subcommand.

• To include an interaction effect term among factors, use the keyword BY or the asterisk (*) to join factors involved in the interaction. For example, A*B*C means a three-way interaction effect of A, B, and C, where A, B, and C are factors. The expression A BY B BY C is equivalent to A*B*C. Factors inside an interaction effect must be distinct. Expressions such as A*C*A and A*A are invalid.

• To include a nested effect term, use the keyword WITHIN or a pair of parentheses on the subcommand. For example, A(B) means that A is nested within B, where A and B are factors. The expression A WITHIN B is equivalent to A(B). Factors inside a nested effect must be distinct. Expressions such as A(A) and A(B*A) are invalid.

• Multiple level nesting is supported. For example, A(B(C)) means that B is nested within C, and A is nested within B(C). When more than one pair of parentheses is present, each pair of parentheses must be enclosed or nested within another pair of parentheses. Thus, A(B)(C) is not valid.

• Nesting within an interaction effect is valid. For example, A(B*C) means that A is nested within B*C.

• Interactions among nested effects are allowed. The correct syntax is the interaction followed by the common nested effect inside the parentheses. For example, interaction between A and B within levels of C should be specified as A*B(C) instead of A(C)*B(C).

• To include a covariate term in the model, enter the name of the covariate on the subcommand.

• Covariates can be connected, but not nested, using the keyword BY or the asterisk (*) operator. For example, X*X is the product of X and itself. This is equivalent to a covariate whose values are the square of those of X. On the contrary, X(Y) is invalid.

• Factor and covariate effects can be connected in many ways. No effects can be nested within a covariate effect. Suppose A and B are factors, and X and Y are covariates. Examples of valid combination of factor and covariate effects are A*X, A*B*X, X(A), X(A*B), X*A(B), X*Y(A*B), and A*B*X*Y.

Related Topics

PLUM
Overview (PLUM command)
Example (PLUM command)
Variable List (PLUM command)
Weight Variable (PLUM command)
CRITERIA Subcommand (PLUM command)
LINK Subcommand (PLUM command)
LOCATION Subcommand (PLUM command)
MISSING Subcommand (PLUM command)
PRINT Subcommand (PLUM command)
SAVE Subcommand (PLUM command)
TEST Subcommand (PLUM command)


TEST Subcommand (PLUM command)

TEST (subcommand),TEST (subcommand),TEST (subcommand)
PLUM command,PLUM command,PLUM command
PLUM (command),PLUM (command),PLUM (command)
TEST subcommand,TEST subcommand,TEST subcommand

The TEST subcommand allows you to customize your hypothesis tests by directly specifying null hypotheses as linear combinations of parameters.

• TEST is offered only through syntax.

• Multiple TEST subcommands are allowed. Each is handled independently.

• The basic format of the TEST subcommand is an optional list of values enclosed in a pair of parentheses, an optional label in quotes, an effect name or the keyword ALL, and a list of values.

• To specify the coefficient for the intercept, use the keyword INTERCEPT. The number of values after INTERCEPT must be equal to the number of response categories minus 1.

• When multiple linear combinations are specified within the same TEST subcommand, a semicolon terminates each linear combination, except the last one.

• The linear combinations are separately tested for each category of the dependent variable and then simultaneously tested for all the categories.

• If specified, the value list that immediately follows the subcommand name is the constant that the linear combinations are equated to under the null hypotheses. If this value list is omitted, the constants are assumed to be all zeros.

• The optional label is a string with a maximum length of 255 bytes. Only one label per TEST subcommand can be specified.

• Only valid effects appearing or implied on the LOCATION or the SCALE subcommands can be specified in a linear combination. If an effect appears in both subcommands, then enter the effect only once on the TEST subcommand.

• To specify coefficient for the intercept, use the keyword INTERCEPT. Only one value is expected to follow INTERCEPT.

• The number of values following an effect name must equal the number of parameters (including the redundant ones) corresponding to that effect. For example, if the effect A*B takes up six parameters, then exactly six values must follow A*B.

• A number can be specified as a fraction with a positive denominator. For example, 1/3 or –1/3 are valid, but 1/–3 is invalid.

• When ALL is specified, only a list of values can follow. The number of values must equal the combined number of LOCATION and SCALE parameters (including the redundant ones).

• Effects appearing or implied on the LOCATION or the SCALE subcommands but not specified on the TEST are assumed to take the value 0 for all their parameters.

• Effect names and the ALL keywords are mutually exclusive within a single TEST subcommand.

• If ALL is specified for the first row in a TEST matrix, then all subsequent rows should begin with the ALL keyword.

• If effects are specified for the first row in a TEST matrix, then all subsequent rows should use effect name (thus ALL is not allowed).

Example

PLUM
  chist  BY housng
  /CRITERIA = CIN(95) DELTA(0) LCONVERGE(0) MXITER(100) MXSTEP(5)
              PCONVERGE(1.0E-6) SINGULAR(1.0E-8)
  /LINK = CLOGLOG
  /PRINT = CELLINFO CORB COVB FIT HISTORY(1) PARAMETER
           SUMMARY TPARALLEL
  /TEST(0 0) =  ALL 1 -1 0 0 0 0 0;
                ALL 0 0 1 -1 0 0 0.

• There are a total of seven parameter coefficients in the model; four for the thresholds, and three for the factor housng. TEST specifies two separate tests: one in which the first and second thresholds are tested for equality, and one in which the third and fourth thresholds are tested for equality.

Related Topics

PLUM
Overview (PLUM command)
Example (PLUM command)
Variable List (PLUM command)
Weight Variable (PLUM command)
CRITERIA Subcommand (PLUM command)
LINK Subcommand (PLUM command)
LOCATION Subcommand (PLUM command)
MISSING Subcommand (PLUM command)
PRINT Subcommand (PLUM command)
SAVE Subcommand (PLUM command)
SCALE Subcommand (PLUM command)


POINT

keyed data files,keyed data files,keyed data files
defining,defining,defining
data files,data files,data files
keyed,keyed,keyed
keyed data files,keyed data files,keyed data files
POINT (command),POINT (command),POINT (command)
POINT (command),POINT (command),POINT (command)
syntax chart,syntax chart,syntax chart
POINT KEY=varname
  [FILE='file'] [ENCODING='encoding specification']
Release History Collapse Hide details

Release History

Release 16.0

• ENCODING subcommand added for Unicode support.

Example

POINT FILE=DRIVERS /KEY=#FRSTAGE.

Related Topics

Overview (POINT command)
Examples (POINT command)
FILE Subcommand (POINT command)
ENCODING Subcommand (POINT command)
KEY Subcommand (POINT command)


Overview (POINT command)

DATA LIST (command),DATA LIST (command),DATA LIST (command)
with POINT command,with POINT command,with POINT command
POINT (command),POINT (command),POINT (command)
with DATA LIST command,with DATA LIST command,with DATA LIST command
keyed data files,keyed data files,keyed data files
file key,file key,file key
keyed data files,keyed data files,keyed data files
file key,file key,file key

POINT establishes the location at which sequential access begins (or resumes) in a keyed file. A keyed file is a file that provides access to information by a record key. An example of a keyed file is a file containing a social security number and other information about a firm's employees. The social security number can be used to identify the records in the file. For additional information about keyed files, see KEYED DATA LIST.

POINT prepares for reading the key-sequenced dataset sequentially from a point that the key value controls. Data selection commands can then be used to limit the file to the portion that you want to analyze. A DATA LIST command is used to read the data. To read keyed files (and also direct-access files), see KEYED DATA LIST.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is the KEY subcommand and a string variable. The value of the string variable is used as the file key for determining where sequential retrieval (via DATA LIST) begins or resumes.

Subcommand Order Collapse Hide details

Subcommand Order

• Subcommands can be named in any order.

• Each POINT command must precede its corresponding DATA LIST command.

Syntax Rules Collapse Hide details

Syntax Rules

• POINT can be used more than once to change the order of retrieval during processing.

• POINT must be specified in an input program and therefore cannot be used to add cases to an existing file.

Operations Collapse Hide details

Operations

• The next DATA LIST command that is executed after the POINT command (for the same file) will read a record whose key value is at least as large as the value of the specified key. To prevent an infinite loop in which the same record is read again and again, the value of the variable that is specified on KEY must change from case to case, or the POINT command must be set up to execute only once.

• If the file contains a record whose key exactly matches the value of the KEY variable, the next execution of DATA LIST will read that record, the second execution of DATA LIST will read the next record, and so on.

• If an exact match between key and variable is not found, the results depend on the operating system. On IBM implementations, reading begins or resumes at the record that has the next higher key. If the value of the key is shorter than the file key, the value of the key variable is logically extended with the lowest character in the collating sequence. For example, if the value of the key variable is the single letter M, retrieval begins or resumes at the first record that has a key (regardless of length) beginning with the letter M or a character that is higher in the collating sequence.

• POINT does not report on whether the file contains a record that exactly matches the specified key. To check for missing records, use LIST to display the data that were read by the subsequent DATA LIST command.

Related Topics

POINT
Examples (POINT command)
FILE Subcommand (POINT command)
ENCODING Subcommand (POINT command)
KEY Subcommand (POINT command)


Examples (POINT command)

input programs,input programs,input programs
examples,examples,examples
POINT (command),POINT (command),POINT (command)
with FILE HANDLE command,with FILE HANDLE command,with FILE HANDLE command
FILE HANDLE (command),FILE HANDLE (command),FILE HANDLE (command)
with POINT command,with POINT command,with POINT command

Basic Example

FILE HANDLE DRIVERS/ file specifications.
POINT FILE=DRIVERS /KEY=#FRSTAGE.

• FILE HANDLE defines the handle for the data file to be read by POINT. The handle is specified on the FILE subcommand on POINT.

• KEY on POINT specifies the key variable. The key variable must be a string, and it must already exist as the result of a prior DATA LIST, KEYED DATA LIST, or transformation command.

Selecting a Subset of Records from a Keyed File

FILE HANDLE    DRIVERS/ file specifications.
INPUT PROGRAM.
STRING         #FRSTAGE(A2).
DO IF          #FRSTAGE = ' '.     /* First case check
+  COMPUTE     #FRSTAGE = '26'.    /* Initial key
+  POINT       FILE=DRIVERS /KEY=#FRSTAGE.
END IF.
DATA LIST      FILE=DRIVERS NOTABLE/
               AGE 19-20(A) SEX 21(A) TICKETS 12-13.
DO IF          AGE > '30'.
+  END FILE.
END IF.
END INPUT PROGRAM.
LIST.

• This example illustrates how to execute POINT for only the first case. The file contains information about traffic violations, and it uses the individual's age as the key. Ages between 26 and 30 are selected.

• FILE HANDLE specifies the file handle DRIVERS.

• The INPUT PROGRAM and END INPUT PROGRAM commands begin and end the block of commands that build cases. POINT must appear in an input program.

• STRING declares the string variable #FRSTAGE, whose value will be used as the key on the POINT command. Because #FRSTAGE is a string variable, it is initialized as blanks.

• The first DO IF-END IF structure is executed only if no records have been read (that is, when #FRSTAGE is blank). When #FRSTAGE is blank, COMPUTE resets #FRSTAGE to 26, which is the initial value. POINT is executed, and it causes the first execution of DATA LIST to read a record whose key is at least 26. Because the value of #FRSTAGE is now 26, the DO IF-END IF structure is not executed again.

• DATA LIST reads the variables AGE, SEX, and TICKETS from the file DRIVERS.

• The second DO IF—END IF structure executes an END FILE command as soon as a record is read that contains a driver's age that is greater than 30. The program does not add this last case to the working file when it ends the file (see END FILE).

Related Topics

POINT
Overview (POINT command)
FILE Subcommand (POINT command)
ENCODING Subcommand (POINT command)
KEY Subcommand (POINT command)


FILE Subcommand (POINT command)

keyed data files,keyed data files,keyed data files
file handle,file handle,file handle
POINT (command),POINT (command),POINT (command)
FILE subcommand,FILE subcommand,FILE subcommand
FILE (subcommand),FILE (subcommand),FILE (subcommand)
POINT command,POINT command,POINT command

FILE specifies a file handle for the keyed data file. The file handle must have been previously defined on a FILE HANDLE command.

• FILE is optional.

• If FILE is omitted, POINT reads from the last file that is specified on an input command, such as DATA LIST.

Example

FILE HANDLE DRIVERS/ file specifications.
POINT FILE=DRIVERS /KEY=#NXTCASE.

• FILE HANDLE specifies DRIVERS as the file handle for the data. The FILE subcommand on POINT specifies file handle DRIVERS.

Related Topics

POINT
Overview (POINT command)
Examples (POINT command)
ENCODING Subcommand (POINT command)
KEY Subcommand (POINT command)


ENCODING Subcommand (POINT command)

ENCODING (subcommand),ENCODING (subcommand),ENCODING (subcommand)
POINT command,POINT command,POINT command
POINT (command),POINT (command),POINT (command)
ENCODING subcommand,ENCODING subcommand,ENCODING subcommand

ENCODING specifies the encoding format of the file. The keyword is followed by an equals sign and a quoted encoding specification.

• In Unicode mode, the default is UTF8. For more information, see SET command, UNICODE subcommand.

• In code page mode, the default is the current locale setting. For more information, see SET command, LOCALE subcommand.

• The quoted encoding value can be: Locale (the current locale setting), UTF8, UTF16, UTF16BE (big endian), UTF16LE (little endian), a numeric Windows code page value (for example, '1252'), or an IANA code page value (for example, 'iso8859-1' or cp1252).

• In Unicode mode, the defined width of string variables is tripled for code page and UTF-16 text data files. Use ALTER TYPE to automatically adjust the defined width of string variables.

Related Topics

POINT
Overview (POINT command)
Examples (POINT command)
FILE Subcommand (POINT command)
KEY Subcommand (POINT command)


KEY Subcommand (POINT command)

keyed data files,keyed data files,keyed data files
file key,file key,file key
KEY (subcommand),KEY (subcommand),KEY (subcommand)
POINT command,POINT command,POINT command
POINT (command),POINT (command),POINT (command)
KEY subcommand,KEY subcommand,KEY subcommand

KEY specifies the variable whose value will be used as the file key for determining where sequential retrieval by DATA LIST will begin or resume. This variable must be a string variable, and it must already exist as the result of a prior DATA LIST, KEYED DATA LIST, or transformation command.

• KEY is required. Its only specification is a single variable. The variable can be a permanent variable or a scratch variable.

• Although the keys on a file are inherently numbers, such as social security numbers, the STRING function can be used to convert the numeric variable to a string. See the topic String/Numeric Conversion Functions for more information.

Example

FILE HANDLE DRIVERS/ file specifications.
POINT FILE=DRIVERS /KEY=#NXTCASE.

• KEY indicates that the value of the existing scratch variable #FRSTAGE will be used as the key to reading each record.

• Variable #FRSTAGE must be an existing string variable.

Related Topics

POINT
Overview (POINT command)
Examples (POINT command)
FILE Subcommand (POINT command)
ENCODING Subcommand (POINT command)


PPLOT

PPLOT (command),PPLOT (command),PPLOT (command)
PPLOT (command),PPLOT (command),PPLOT (command)
syntax chart,syntax chart,syntax chart

PPLOT is available in the Statistics Base option.

PPLOT VARIABLES= varlist

 [/DISTRIBUTION={NORMAL(a,b)** }  ]
                {EXPONENTIAL(a)}
                {WEIBUL(a,b)   }
                {PARETO(a,b)   }
                {LNORMAL(a,b)  }
                {BETA(a,b)     }
                {GAMMA(a,b)    }
                {LOGISTIC(a,b) }
                {LAPLACE(a,b)  }
                {UNIFORM(a,b)  }
                {HNORMAL(a)    }
                {CHI(df)       }
                {STUDENT(df)   }

 [/FRACTION={BLOM**}]
            {RANKIT}
            {TUKEY }
            {VW    }

 [/TIES={MEAN**  }]
        {LOW     }
        {HIGH    }
        {BREAK}

 [/{NOSTANDARDIZE**}]
   {STANDARDIZE    }

 [/TYPE={Q-Q**}]
        {P-P  }

 [/PLOT={BOTH**   }]
        {NORMAL   }
        {DETRENDED}

 [/DIFF={1}]
        {n}

 [/SDIFF={1}]
         {n}

 [/PERIOD=n]

 [/{NOLOG**}]
   {LN     }

 [/APPLY [='model name']]

**Default if the subcommand is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See PPLOT Algorithms for computational details for this procedure.

Syntax for the PPLOT command can be generated from the P-P Plot dialog and from the Q-Q Plot dialog.

Example

PPLOT VARIABLES = VARX
  /FRACTION=TUKEY
  /DIFF=2.

Related Topics

Overview (PPLOT command)
Example (PPLOT command)
VARIABLES Subcommand (PPLOT command)
DISTRIBUTION Subcommand (PPLOT command)
FRACTION Subcommand (PPLOT command)
TIES Subcommand (PPLOT command)
TYPE Subcommand (PPLOT command)
PLOT Subcommand (PPLOT command)
STANDARDIZE and NOSTANDARDIZE Subcommands (PPLOT command)
DIFF Subcommand (PPLOT command)
SDIFF Subcommand (PPLOT command)
PERIOD Subcommand (PPLOT command)
LN and NOLOG Subcommands (PPLOT command)
APPLY Subcommand (PPLOT command)
References (PPLOT command)
MODEL NAME
READ MODEL
SAVE MODEL
TDISPLAY


Overview (PPLOT command)

PPLOT (alias NPPLOT) produces probability plots of one or more sequence or time series variables. The variables can be standardized, differenced, and/or transformed before plotting. Expected normal values or deviations from expected normal values can be plotted.

Options Collapse Hide details

Options

Variable Modification. You can use the LN subcommand to request a natural log transformation of the sequence or time series variables, and you can use the SDIFF and DIFF subcommands to request seasonal and nonseasonal differencing to any degree. With seasonal differencing, you can specify the periodicity on the PERIOD subcommand. You can also plot standardized series by using the STANDARDIZE subcommand.

Plot Type. You can request p-p (proportion-proportion) or q-q (quantile-quantile) plots on the TYPE subcommand. With the PLOT subcommand, you can display normal plots, detrended plots, or both.

Distribution Type. You can specify the distribution type on the DISTRIBUTION subcommand. The cumulative distribution function (CDF) and the inverse distribution function (IDF) for the specified distribution type are used to compute the expected values in the p-p and q-q plots, respectively.

Score Calculations. On the FRACTION subcommand, you can specify one of several fractional rank formulas to use for estimating the empirical distribution in p-p plots and computing expected quantiles in q-q plots. You can specify the treatment of tied values on the TIE subcommand.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is one or more variable names.

• For each specified variable, PPLOT produces two q-q plots of the observed values (one plot versus expected normal values and the other plot versus deviations from normal values. By default, expected normal values are calculated by using Blom’s transformation.

• Observed values define the horizontal axis, and expected normal values or deviations define the vertical axis.

Subcommand Order Collapse Hide details

Subcommand Order

• Subcommands can be specified in any order.

Syntax Rules Collapse Hide details

Syntax Rules

• VARIABLES can be specified only once.

• Other subcommands can be specified more than once, but only the last specification of each subcommand is executed.

Operations Collapse Hide details

Operations

• Subcommand specifications apply to all plots that are produced by PPLOT.

• If the LN subcommand is specified, any differencing or standardization that is requested on that PPLOT is done on the log-transformed series.

• If differencing (DIFF or SDIFF) is specified, any standardization is done on the differenced series.

Limitations Collapse Hide details

Limitations

• A maximum of 1 VARIABLES subcommand is allowed. There is no limit on the number of variables that are named on the list.

Related Topics

PPLOT
Example (PPLOT command)
VARIABLES Subcommand (PPLOT command)
DISTRIBUTION Subcommand (PPLOT command)
FRACTION Subcommand (PPLOT command)
TIES Subcommand (PPLOT command)
TYPE Subcommand (PPLOT command)
PLOT Subcommand (PPLOT command)
STANDARDIZE and NOSTANDARDIZE Subcommands (PPLOT command)
DIFF Subcommand (PPLOT command)
SDIFF Subcommand (PPLOT command)
PERIOD Subcommand (PPLOT command)
LN and NOLOG Subcommands (PPLOT command)
APPLY Subcommand (PPLOT command)
References (PPLOT command)


Example (PPLOT command)

PPLOT VARIABLES = VARX
  /FRACTION=TUKEY
  /DIFF=2.

• This command produces two normal q-q plots of VARX(one plot not detrended and the other plot detrended).

• The expected quantile values are calculated by using Tukey’s transformation.

• The variable is differenced twice before plotting.

Related Topics

PPLOT
Overview (PPLOT command)
VARIABLES Subcommand (PPLOT command)
DISTRIBUTION Subcommand (PPLOT command)
FRACTION Subcommand (PPLOT command)
TIES Subcommand (PPLOT command)
TYPE Subcommand (PPLOT command)
PLOT Subcommand (PPLOT command)
STANDARDIZE and NOSTANDARDIZE Subcommands (PPLOT command)
DIFF Subcommand (PPLOT command)
SDIFF Subcommand (PPLOT command)
PERIOD Subcommand (PPLOT command)
LN and NOLOG Subcommands (PPLOT command)
APPLY Subcommand (PPLOT command)
References (PPLOT command)


VARIABLES Subcommand (PPLOT command)

VARIABLES (subcommand),VARIABLES (subcommand),VARIABLES (subcommand)
PPLOT command,PPLOT command,PPLOT command
PPLOT (command),PPLOT (command),PPLOT (command)
VARIABLES subcommand,VARIABLES subcommand,VARIABLES subcommand

VARIABLES specifies the sequence or time series variables to be plotted and is the only required subcommand.

Related Topics

PPLOT
Overview (PPLOT command)
Example (PPLOT command)
DISTRIBUTION Subcommand (PPLOT command)
FRACTION Subcommand (PPLOT command)
TIES Subcommand (PPLOT command)
TYPE Subcommand (PPLOT command)
PLOT Subcommand (PPLOT command)
STANDARDIZE and NOSTANDARDIZE Subcommands (PPLOT command)
DIFF Subcommand (PPLOT command)
SDIFF Subcommand (PPLOT command)
PERIOD Subcommand (PPLOT command)
LN and NOLOG Subcommands (PPLOT command)
APPLY Subcommand (PPLOT command)
References (PPLOT command)


DISTRIBUTION Subcommand (PPLOT command)

PPLOT (command),PPLOT (command),PPLOT (command)
DISTRIBUTION subcommand,DISTRIBUTION subcommand,DISTRIBUTION subcommand
DISTRIBUTION (subcommand),DISTRIBUTION (subcommand),DISTRIBUTION (subcommand)
PPLOT command,PPLOT command,PPLOT command

DISTRIBUTION specifies the distribution type of your data. The default is NORMAL if the subcommand is not specified or is specified without a keyword. If the parameters of the distribution type are not specified, DISTRIBUTION estimates them from the sample data and displays them with the plots.

NORMAL(a,b) | Normal distribution. The location parameter a can be any numeric value, while the scale parameter b must be positive. If they are not specified, DISTRIBUTION estimates them from the sample mean and sample standard deviation.
EXPONENTIAL(a) | Exponential distribution. The scale parameter a must be positive. If the parameter is not specified, DISTRIBUTION estimates it from the sample mean. Negative observations are not allowed.
WEIBULL(a,b) | Weibull distribution. The scale and shape parameters a and b must be positive. If they are not specified, DISTRIBUTION estimates them using the least square method. Negative observations are not allowed.
PARETO(a,b) | Pareto distribution. The threshold and shape parameters a and b must be positive. If they are not specified, DISTRIBUTION assumes a equals the minimum observation and estimates b by the maximum likelihood method. Negative observations are not allowed.
LNORMAL(a,b) | Lognormal distribution. The scale and shape parameters a and b must be positive. If they are not specified, DISTRIBUTION estimates them from the mean and standard deviation of the natural logarithm of the sample data. Negative observations are not allowed.
BETA(a,b) | Beta distribution. The shape1 and shape2 parameters a and b must be positive. If they are not specified, DISTRIBUTION estimates them from the sample mean and sample standard deviation. All observations must be between 0 and 1, inclusive.
GAMMA(a,b) | Gamma distribution. The shape and scale parameters a and b must be positive. If they are not specified, DISTRIBUTION estimates them from the sample mean and sample standard deviation. Negative observations are not allowed.
LOGISTIC(a,b) | Logistic distribution. LOGISTIC takes a location and a scale parameter (a and b). The scale parameter (b) must be positive. If the parameters are not specified, DISTRIBUTION estimates them from the sample mean and sample standard deviation.
LAPLACE(a,b) | Laplace or double exponential distribution. LAPLACE takes a location and a scale parameter (a and b). The scale parameter (b) must be positive. If the parameters are not specified, DISTRIBUTION estimates them from the sample mean and sample standard deviation.
UNIFORM(a,b) | Uniform distribution. UNIFORM takes a minimum and a maximum parameter (a and b). Parameter a must be equal to or greater than b. If the parameters are not specified, DISTRIBUTION assumes them from the sample data.
HNORMAL(a) | Half-normal distribution. Data are assumed to be location-free or centralized. (Location parameter=0.) You can specify the scale parameter a or let DISTRIBUTION estimate it by using the maximum likelihood method.
CHI(df) | Chi-square distribution. You must specify the degrees of freedom (df). Negative observations are not allowed.
STUDENT(df) | Student’s t distribution. You must specify the degrees of freedom (df).

Related Topics

PPLOT
Overview (PPLOT command)
Example (PPLOT command)
VARIABLES Subcommand (PPLOT command)
FRACTION Subcommand (PPLOT command)
TIES Subcommand (PPLOT command)
TYPE Subcommand (PPLOT command)
PLOT Subcommand (PPLOT command)
STANDARDIZE and NOSTANDARDIZE Subcommands (PPLOT command)
DIFF Subcommand (PPLOT command)
SDIFF Subcommand (PPLOT command)
PERIOD Subcommand (PPLOT command)
LN and NOLOG Subcommands (PPLOT command)
APPLY Subcommand (PPLOT command)
References (PPLOT command)


FRACTION Subcommand (PPLOT command)

PPLOT (command),PPLOT (command),PPLOT (command)
FRACTION subcommand,FRACTION subcommand,FRACTION subcommand
FRACTION (subcommand),FRACTION (subcommand),FRACTION (subcommand)
PPLOT command,PPLOT command,PPLOT command

FRACTION specifies the formula to be used in estimating the empirical distribution in p-p plots and calculating the expected quantile values in q-q plots.

• Only one formula can be specified. If more than one formula is specified, only the first formula is used.

BLOM (keyword),BLOM (keyword),BLOM (keyword)
PPLOT command,PPLOT command,PPLOT command

• If the FRACTION subcommand is not specified, BLOM is used by default.

• These formulas produce noticeable differences for short series only.

Four formulas are available:

RANKIT (keyword),RANKIT (keyword),RANKIT (keyword)
PPLOT command,PPLOT command,PPLOT command
TUKEY (keyword),TUKEY (keyword),TUKEY (keyword)
PPLOT command,PPLOT command,PPLOT command
VW (keyword),VW (keyword),VW (keyword)
PPLOT command,PPLOT command,PPLOT command
BLOM | Blom’s transformation, defined by the formula (r − (3/8)) / (n + (1/4)), where n is the number of observations and r is the rank, ranging from 1 to n(Blom, 1958).
RANKIT | Formula (r − (1/2)) / n, where n is the number of observations and r is the rank, ranging from 1 to n(Chambers, Cleveland, Kleiner, and Tukey, 1983).
TUKEY | Tukey’s transformation, defined by the formula (r − (1/3)) / (n + (1/3)), where n is the number of observations and r is the rank, ranging from 1 to n(Tukey, 1962).
VW | Van der Waerden’s transformation, defined by the formula r / (n +1), where n is the number of observations and r is the rank, ranging from 1 to n(Lehmann, 1975).

Example

PPLOT VARIABLES = VARX
  /FRACTION=VW.

• This PPLOT command uses van der Waerden’s transformation to approximate the proportion estimate p, which is used in the inverse distribution function.

• By default, two q-q plots are produced.

Related Topics

PPLOT
Overview (PPLOT command)
Example (PPLOT command)
VARIABLES Subcommand (PPLOT command)
DISTRIBUTION Subcommand (PPLOT command)
TIES Subcommand (PPLOT command)
TYPE Subcommand (PPLOT command)
PLOT Subcommand (PPLOT command)
STANDARDIZE and NOSTANDARDIZE Subcommands (PPLOT command)
DIFF Subcommand (PPLOT command)
SDIFF Subcommand (PPLOT command)
PERIOD Subcommand (PPLOT command)
LN and NOLOG Subcommands (PPLOT command)
APPLY Subcommand (PPLOT command)
References (PPLOT command)


TIES Subcommand (PPLOT command)

RANK (command),RANK (command),RANK (command)
handling of ties,handling of ties,handling of ties

TIES determines the way that tied values are handled. The default method is MEAN.

MEAN (keyword),MEAN (keyword),MEAN (keyword)
RANK command,RANK command,RANK command
LOW (keyword),LOW (keyword),LOW (keyword)
RANK command,RANK command,RANK command
HIGH (keyword),HIGH (keyword),HIGH (keyword)
RANK command,RANK command,RANK command
MEAN | Mean rank of tied values is used for ties. This setting is the default.
LOW | Lowest rank of tied values is used for ties.
HIGH | Highest rank of tied values is used for ties.
BREAK | Consecutive ranks with ties sharing the same value. Each distinct value of the ranked variable is assigned a consecutive rank. Ties share the same rank.

Related Topics

PPLOT
Overview (PPLOT command)
Example (PPLOT command)
VARIABLES Subcommand (PPLOT command)
DISTRIBUTION Subcommand (PPLOT command)
FRACTION Subcommand (PPLOT command)
TYPE Subcommand (PPLOT command)
PLOT Subcommand (PPLOT command)
STANDARDIZE and NOSTANDARDIZE Subcommands (PPLOT command)
DIFF Subcommand (PPLOT command)
SDIFF Subcommand (PPLOT command)
PERIOD Subcommand (PPLOT command)
LN and NOLOG Subcommands (PPLOT command)
APPLY Subcommand (PPLOT command)
References (PPLOT command)


TYPE Subcommand (PPLOT command)

PPLOT (command),PPLOT (command),PPLOT (command)
TYPE subcommand,TYPE subcommand,TYPE subcommand
TYPE (subcommand),TYPE (subcommand),TYPE (subcommand)
PPLOT command,PPLOT command,PPLOT command

TYPE specifies the type of plot to produce. The default is Q-Q. The plots show a quantile-quantile plot and a proportion-proportion plot using the same data (with a normal distribution).

Q-Q (keyword),Q-Q (keyword),Q-Q (keyword)
PPLOT command,PPLOT command,PPLOT command
P-P (keyword),P-P (keyword),P-P (keyword)
PPLOT command,PPLOT command,PPLOT command
Q-Q | Quantile-quantile plots. The quantiles of the observed values are plotted against the quantiles of the specified distribution.
P-P | Proportion-proportion plots. The observed cumulative proportion is plotted against the expected cumulative proportion if the data were a sample from a specified distribution.
Normal q-q plot of household income
Normal p-p plot of household income

Related Topics

PPLOT
Overview (PPLOT command)
Example (PPLOT command)
VARIABLES Subcommand (PPLOT command)
DISTRIBUTION Subcommand (PPLOT command)
FRACTION Subcommand (PPLOT command)
TIES Subcommand (PPLOT command)
PLOT Subcommand (PPLOT command)
STANDARDIZE and NOSTANDARDIZE Subcommands (PPLOT command)
DIFF Subcommand (PPLOT command)
SDIFF Subcommand (PPLOT command)
PERIOD Subcommand (PPLOT command)
LN and NOLOG Subcommands (PPLOT command)
APPLY Subcommand (PPLOT command)
References (PPLOT command)


PLOT Subcommand (PPLOT command)

PPLOT (command),PPLOT (command),PPLOT (command)
PLOT subcommand,PLOT subcommand,PLOT subcommand
PLOT (subcommand),PLOT (subcommand),PLOT (subcommand)
PPLOT command,PPLOT command,PPLOT command

PLOT specifies whether to produce a plot of observed values versus expected values, a plot of observed values versus deviations from expected values, or both. The plots shown in TYPE Subcommand (PPLOT command) are nondetrended plots. The figure below shows a detrended q-q plot.

BOTH (keyword),BOTH (keyword),BOTH (keyword)
PPLOT command,PPLOT command,PPLOT command
NORMAL (keyword),NORMAL (keyword),NORMAL (keyword)
PPLOT command,PPLOT command,PPLOT command
DETRENDED (keyword),DETRENDED (keyword),DETRENDED (keyword)
PPLOT command,PPLOT command,PPLOT command
BOTH | Display both detrended and nondetrended normal plots. This is the default.
NORMAL | Display nondetrended normal plots. The observed values are plotted against the expected values.
DETRENDED | Display detrended plots. The observed values are plotted against the deviations from the expected values.

• If you specify PLOT more than once, only the last specification is executed.

• Deviations are calculated by subtracting the expected value from the observed value.

• In low resolution, a dash is used in a detrended plot to indicate where the deviation from the expected is 0.

Detrended normal q-q plot of household income

Related Topics

PPLOT
Overview (PPLOT command)
Example (PPLOT command)
VARIABLES Subcommand (PPLOT command)
DISTRIBUTION Subcommand (PPLOT command)
FRACTION Subcommand (PPLOT command)
TIES Subcommand (PPLOT command)
TYPE Subcommand (PPLOT command)
STANDARDIZE and NOSTANDARDIZE Subcommands (PPLOT command)
DIFF Subcommand (PPLOT command)
SDIFF Subcommand (PPLOT command)
PERIOD Subcommand (PPLOT command)
LN and NOLOG Subcommands (PPLOT command)
APPLY Subcommand (PPLOT command)
References (PPLOT command)


STANDARDIZE and NOSTANDARDIZE Subcommands (PPLOT command)

PPLOT (command),PPLOT (command),PPLOT (command)
STANDARDIZE/NOSTANDARDIZE subcommands,STANDARDIZE/NOSTANDARDIZE subcommands,STANDARDIZE/NOSTANDARDIZE subcommands
STANDARDIZE (subcommand),STANDARDIZE (subcommand),STANDARDIZE (subcommand)
PPLOT command,PPLOT command,PPLOT command
NOSTANDARDIZE (subcommand),NOSTANDARDIZE (subcommand),NOSTANDARDIZE (subcommand)
PPLOT command,PPLOT command,PPLOT command

STANDARDIZE transforms the sequence or time series variables into a sample with a mean of 0 and a standard deviation of 1. NOSTANDARDIZE is the default and indicates that the series should not be standardized.

• There are no additional specifications on the STANDARDIZE or NOSTANDARDIZE subcommands.

• Only the last STANDARDIZE or NOSTANDARDIZE subcommand on the PPLOT command is executed.

• The STANDARDIZE and NOSTANDARDIZE subcommands have no effect on expected values, which are always standardized.

• NOSTANDARDIZE is generally used with an APPLY subcommand to turn off a previous STANDARDIZE specification.

Example

PPLOT VARIABLES = VARX
  /STANDARDIZE.

• This example produces two q-q normal-probability plots of VARX with standardized observed values.

Related Topics

PPLOT
Overview (PPLOT command)
Example (PPLOT command)
VARIABLES Subcommand (PPLOT command)
DISTRIBUTION Subcommand (PPLOT command)
FRACTION Subcommand (PPLOT command)
TIES Subcommand (PPLOT command)
TYPE Subcommand (PPLOT command)
PLOT Subcommand (PPLOT command)
DIFF Subcommand (PPLOT command)
SDIFF Subcommand (PPLOT command)
PERIOD Subcommand (PPLOT command)
LN and NOLOG Subcommands (PPLOT command)
APPLY Subcommand (PPLOT command)
References (PPLOT command)


DIFF Subcommand (PPLOT command)

PPLOT (command),PPLOT (command),PPLOT (command)
DIFF subcommand,DIFF subcommand,DIFF subcommand
DIFF (subcommand),DIFF (subcommand),DIFF (subcommand)
PPLOT command,PPLOT command,PPLOT command

DIFF specifies the degree of differencing that is used before plotting to convert a nonstationary variable into a stationary variable with a constant mean and variance.

• You can specify any positive integer on DIFF.

• If DIFF is specified without a value, the default is 1.

• The number of plotted values decreases by 1 for each degree of differencing.

Example

PPLOT VARIABLES = TICKETS
  /DIFF=2.

• In this example, TICKETS is differenced twice before the expected and observed values are plotted.

Related Topics

PPLOT
Overview (PPLOT command)
Example (PPLOT command)
VARIABLES Subcommand (PPLOT command)
DISTRIBUTION Subcommand (PPLOT command)
FRACTION Subcommand (PPLOT command)
TIES Subcommand (PPLOT command)
TYPE Subcommand (PPLOT command)
PLOT Subcommand (PPLOT command)
STANDARDIZE and NOSTANDARDIZE Subcommands (PPLOT command)
SDIFF Subcommand (PPLOT command)
PERIOD Subcommand (PPLOT command)
LN and NOLOG Subcommands (PPLOT command)
APPLY Subcommand (PPLOT command)
References (PPLOT command)


SDIFF Subcommand (PPLOT command)

PPLOT (command),PPLOT (command),PPLOT (command)
SDIFF subcommand,SDIFF subcommand,SDIFF subcommand
SDIFF (subcommand),SDIFF (subcommand),SDIFF (subcommand)
PPLOT command,PPLOT command,PPLOT command

If the variable exhibits a seasonal or periodic pattern, you can use the SDIFF subcommand to seasonally difference the variable before plotting.

• The specification on SDIFF indicates the degree of seasonal differencing and can be any positive integer.

• If SDIFF is specified without a value, the degree of seasonal differencing defaults to 1.

• The number of plotted seasons decreases by 1 for each degree of seasonal differencing.

• The length of the period that is used by SDIFF is specified on the PERIOD subcommand. If the PERIOD subcommand is not specified, the periodicity that is established on the TSET or DATE command is used (see PERIOD Subcommand (PPLOT command)).

Related Topics

PPLOT
Overview (PPLOT command)
Example (PPLOT command)
VARIABLES Subcommand (PPLOT command)
DISTRIBUTION Subcommand (PPLOT command)
FRACTION Subcommand (PPLOT command)
TIES Subcommand (PPLOT command)
TYPE Subcommand (PPLOT command)
PLOT Subcommand (PPLOT command)
STANDARDIZE and NOSTANDARDIZE Subcommands (PPLOT command)
DIFF Subcommand (PPLOT command)
PERIOD Subcommand (PPLOT command)
LN and NOLOG Subcommands (PPLOT command)
APPLY Subcommand (PPLOT command)
References (PPLOT command)


PERIOD Subcommand (PPLOT command)

PERIOD (subcommand),PERIOD (subcommand),PERIOD (subcommand)
PPLOT command,PPLOT command,PPLOT command
PPLOT (command),PPLOT (command),PPLOT (command)
PERIOD subcommand,PERIOD subcommand,PERIOD subcommand

PERIOD indicates the length of the period to be used by the SDIFF subcommand.

• The specification on PERIOD indicates how many observations are in one period or season. You can specify any positive integer on PERIOD.

• The PERIOD subcommand is ignored if it is used without the SDIFF subcommand.

• If PERIOD is not specified, the periodicity that is established on TSET PERIOD is in effect. If TSET PERIOD is not specified either, the periodicity that is established on the DATE command is used. If periodicity was not established anywhere, the SDIFF subcommand will not be executed.

Example

PPLOT VARIABLES = TICKETS
  /SDIFF=1
  /PERIOD=12.

• This command applies 1 degree of seasonal differencing with 12 observations per season to the variable TICKETS.

Related Topics

PPLOT
Overview (PPLOT command)
Example (PPLOT command)
VARIABLES Subcommand (PPLOT command)
DISTRIBUTION Subcommand (PPLOT command)
FRACTION Subcommand (PPLOT command)
TIES Subcommand (PPLOT command)
TYPE Subcommand (PPLOT command)
PLOT Subcommand (PPLOT command)
STANDARDIZE and NOSTANDARDIZE Subcommands (PPLOT command)
DIFF Subcommand (PPLOT command)
SDIFF Subcommand (PPLOT command)
LN and NOLOG Subcommands (PPLOT command)
APPLY Subcommand (PPLOT command)
References (PPLOT command)


LN and NOLOG Subcommands (PPLOT command)

PPLOT (command),PPLOT (command),PPLOT (command)
LN/NOLOG subcommands,LN/NOLOG subcommands,LN/NOLOG subcommands
LN (subcommand),LN (subcommand),LN (subcommand)
PPLOT command,PPLOT command,PPLOT command
NOLOG (subcommand),NOLOG (subcommand),NOLOG (subcommand)
PPLOT command,PPLOT command,PPLOT command

LN transforms the data by using the natural logarithm (base e) to remove varying amplitude. NOLOG indicates that the data should not be log transformed. NOLOG is the default.

• There are no additional specifications on LN or NOLOG.

• Only the last LN or NOLOG subcommand on a PPLOT command is executed.

• If a natural log transformation is requested, cases with values that are less than or equal to 0 will be set to system-missing, because nonpositive values cannot be log-transformed.

• NOLOG is generally used with an APPLY subcommand to turn off a previous LN specification.

Example

PPLOT VARIABLES = TICKETS
  /FRACTION=TUKEY
  /DIFF=1
  /LN.
PPLOT VARIABLES = EARNINGS
  /APPLY
  /NOLOG.

• The first command requests a natural log transformation of variable TICKETS before plotting.

• The second command applies the previous PPLOT specifications to variable EARNINGS. However, EARNINGS is not log-transformed before plotting.

Related Topics

PPLOT
Overview (PPLOT command)
Example (PPLOT command)
VARIABLES Subcommand (PPLOT command)
DISTRIBUTION Subcommand (PPLOT command)
FRACTION Subcommand (PPLOT command)
TIES Subcommand (PPLOT command)
TYPE Subcommand (PPLOT command)
PLOT Subcommand (PPLOT command)
STANDARDIZE and NOSTANDARDIZE Subcommands (PPLOT command)
DIFF Subcommand (PPLOT command)
SDIFF Subcommand (PPLOT command)
PERIOD Subcommand (PPLOT command)
APPLY Subcommand (PPLOT command)
References (PPLOT command)


APPLY Subcommand (PPLOT command)

PPLOT (command),PPLOT (command),PPLOT (command)
APPLY subcommand,APPLY subcommand,APPLY subcommand
APPLY (subcommand),APPLY (subcommand),APPLY (subcommand)
PPLOT command,PPLOT command,PPLOT command

APPLY allows you to produce a plot by using previously defined specifications without having to repeat the PPLOT subcommands.

• The only specification on APPLY is the name of a previous model in quotation marks. If a model name is not specified, the model that is specified on the previous PPLOT command is used.

• To change any plot specifications, specify the subcommands of only those portions that you want to change. Make these entries after the APPLY subcommand.

• If no variables are specified, the variables that were specified for the original plot are used.

• To change the variables that are used with the model, enter new variable names before or after the APPLY subcommand.

• The distribution type is applied, but the parameters are not applied.

Example

PPLOT VARIABLES = X1
  /FRACTION=TUKEY.
PPLOT VARIABLES = Z1
  /APPLY.

• The first command produces two q-q normal-probability plots of X1, using Tukey’s transformation to compute the expected values.

• The second command requests the same plots for variable Z1.

Example

PPLOT VARIABLES = X1 Y1 Z1
  /FRACTION=VW.
PPLOT APPLY
  /FRACTION=BLOM.

• The first command uses van der Waerden’s transformation to calculate expected normal values of X1, Y1, and Z1.

• The second command uses Blom’s transformation for the same three series.

Example

PPLOT VARIABLES = VARX
  /FRACTION=RANKIT
  /DIFF
  /STANDARDIZE.
PPLOT VARIABLES = VARY
  /APPLY
  /NOSTANDARDIZE.

• The first command differences and standardizes series VARX and then produces a normal probability plot by using the RANKIT transformation.

• The second command applies the previous plot specifications to VARY but does not standardize the series.

Related Topics

PPLOT
Overview (PPLOT command)
Example (PPLOT command)
VARIABLES Subcommand (PPLOT command)
DISTRIBUTION Subcommand (PPLOT command)
FRACTION Subcommand (PPLOT command)
TIES Subcommand (PPLOT command)
TYPE Subcommand (PPLOT command)
PLOT Subcommand (PPLOT command)
STANDARDIZE and NOSTANDARDIZE Subcommands (PPLOT command)
DIFF Subcommand (PPLOT command)
SDIFF Subcommand (PPLOT command)
PERIOD Subcommand (PPLOT command)
LN and NOLOG Subcommands (PPLOT command)
References (PPLOT command)


References (PPLOT command)

Blom, G. 1958. Statistical estimates and transformed beta variables. New York: John Wiley and Sons.

Chambers, J. M., W. S. Cleveland, B. Kleiner, and P. A. Tukey. 1983. Graphical methods for data analysis. Boston: Duxbury Press.

Lehmann, E. L. 1975. Nonparametrics: Statistical methods based on ranks. San Francisco: Holden-Day.

Tukey, J. W. 1962. The future of data analysis. Annals of Mathematical Statistics, 33:22, 1-67.

Related Topics

PPLOT
Overview (PPLOT command)
Example (PPLOT command)
VARIABLES Subcommand (PPLOT command)
DISTRIBUTION Subcommand (PPLOT command)
FRACTION Subcommand (PPLOT command)
TIES Subcommand (PPLOT command)
TYPE Subcommand (PPLOT command)
PLOT Subcommand (PPLOT command)
STANDARDIZE and NOSTANDARDIZE Subcommands (PPLOT command)
DIFF Subcommand (PPLOT command)
SDIFF Subcommand (PPLOT command)
PERIOD Subcommand (PPLOT command)
LN and NOLOG Subcommands (PPLOT command)
APPLY Subcommand (PPLOT command)


PREDICT

PREDICT (command),PREDICT (command),PREDICT (command)
PREDICT (command),PREDICT (command),PREDICT (command)
syntax chart,syntax chart,syntax chart
PREDICT  [{start date       }] [THRU [{end date       }]]
          {start case number}         {end case number}
                                      {END            }

Example

PREDICT Y 61 THRU Y 65.

Related Topics

Overview (PREDICT command)
Syntax Rules (PREDICT command)
Examples (PREDICT command)


Overview (PREDICT command)

PREDICT specifies the observations that mark the beginning and end of the forecast period. If the forecast period extends beyond the length of the series, PREDICT extends the series in the active dataset to allow room for the forecast observations.

Basic Specification Collapse Hide details

Basic Specification

The minimum specification on PREDICT is either the start or the end of the range, or it is keyword THRU. PREDICT sets up a forecast period beginning and ending with the specified dates or case numbers. The default starting point is the observation immediately after the end of the series or, if USE is specified, the observation immediately after the end of the use range (the historical period). The default end is the last observation in the series.

Operations Collapse Hide details

Operations

• PREDICT is executed when the data are read for the next forecasting procedure (for example, CURVEFIT in the Core system, and 2SLS in the Regression add-on module).

• PREDICT is ignored by non-forecasting procedures.

• Case number specifications refer to the sequential numbers that are assigned to cases as they are read.

• If the forecast period extends beyond the length of the series, PREDICT extends the series in the active dataset to allow room for the forecast observations.

• New observations that are added to the end of existing series will contain non-missing date variables, forecast values (variable FIT#n), confidence interval limits (variables LCL#n and UCL#n), and, for ARIMA models, standard error of the predicted value (SEP#n). For all other variables, including the original series, the new cases will be system-missing.

• PREDICT cannot forecast beyond the end of the series for ARIMA with regressors and 2SLS. However, PREDICTcan forecast values for the dependent variable if the independent variables have valid values in the predict period.

• If the use and predict periods overlap, the model is still estimated by using all observations in the use period.

• USE and PREDICT can be used together to perform forecasting validation. To do this, specify a use period that ends before the existing end of the series, and specify a predict period starting with the next observation.

• If there is a gap between the end of the use period and the start of the specified predict period, the program uses the first observation after the end of the use period as the start of the predict period. (This setting is the default.)

• The DATE command turns off all existing USE and PREDICT specifications.

• PREDICT remains in effect in a session until it is changed by another PREDICT command or until a new DATE command is issued.

• If more than one forecasting procedure is specified after PREDICT, the USE command should be specified between procedures so that the original series—without any new, system-missing cases—will be used each time. Alternatively, you can specify

TSET NEWVAR = NONE

before the first forecasting procedure so that you can evaluate model statistics without creating new variables or adding new cases with missing values to the original series.

Limitations Collapse Hide details

Limitations

A maximum of one range (one start and/or one end) can be specified per PREDICT command.

Related Topics

PREDICT
Syntax Rules (PREDICT command)
Examples (PREDICT command)


Syntax Rules (PREDICT command)

• You can specify a start, an end, or both.

• The start and end are specified as either date specifications or case (observation) numbers.

• Date specifications and case numbers cannot be mixed on one PREDICT command.

• Keyword THRU is required if the end of the range is specified.

• Keyword THRU by itself defines a PREDICT range starting with the first observation after the use range and ending with the end of the series. If USE has not been specified, PREDICT THRU is meaningless.

Related Topics

PREDICT
Overview (PREDICT command)
Examples (PREDICT command)
Date Specifications (PREDICT command)
Case Specifications (PREDICT command)
Valid Range (PREDICT command)


Date Specifications (PREDICT command)

• A date specification consists of DATE keywords and values (see the DATE command). These specifications must correspond to existing date variables.

• If more than one date variable exists, the highest-order variable must be included in the date specification.

• Values on keyword YEAR must have the same format (two or four digits) as the YEAR specifications on the DATE command.

Related Topics

Syntax Rules (PREDICT command)
Case Specifications (PREDICT command)
Valid Range (PREDICT command)


Case Specifications (PREDICT command)

The case number specification is the sequence number of the case (observation) as it is read by the program.

Related Topics

Syntax Rules (PREDICT command)
Date Specifications (PREDICT command)
Valid Range (PREDICT command)


Valid Range (PREDICT command)

• The start date must precede the end date.

• The start case number must be less than the end case number.

• The start can be any observation ranging from the second observation in the historical period that is specified on USE to the observation immediately following the end of the historical period. If USE is not specified, the start can be any observation ranging from the second observation in the series to the observation immediately following the end of the series.

• For most models, the start of the predict period should not be too close to the start of the use period.

• The predict and use periods should not be exactly the same.

• The start of the predict period should not precede the start of the use period.

Related Topics

Syntax Rules (PREDICT command)
Date Specifications (PREDICT command)
Case Specifications (PREDICT command)


Examples (PREDICT command)

Specifying the Forecast Period as a Date Range

PREDICT Y 61 THRU Y 65.

• This command specifies a forecast period from 1961 to 1965.

• The active dataset must include variable YEAR_, which, in this example, contains only the last two digits of each year.

• If variable MONTH_ also exists, the above command is equivalent to

PREDICT Y 61 M 1 THRU Y 65 M 12.

PREDICT W 28 THRU W 56.

• This command specifies a forecast period from the 28th week to the 56th week.

• The active dataset must include variable WEEK_.

• If variable DAY_ also exists, the above command is equivalent to

PREDICT W 28 D 1 THRU W 56 D 7.

Specifying the Forecast Period as a Case Range

PREDICT 61 THRU 65.

• This command specifies a forecast period from the 61st case (observation) to the 65th case.

Using the Default Start Date

PREDICT THRU Y 65.

• This command uses the default start date, which is the observation immediately following the end of the use period. If USE is not specified, the default start is the observation immediately following the end of the series.

• The forecast period extends from the start date through year 1965.

• The active dataset must include variable YEAR_.

• Keyword THRU is required.

Specifying the Forecast Period by Using Date Variables

PREDICT THRU CYCLE 4 OBS 17.

• This example uses the date variables OBS_ and CYCLE_, which must exist in the active dataset.

• CYCLE, the highest order, must be included on PREDICT.

• Keyword THRU is required.

• The forecast period extends from the default start to the 17th observation of cycle 4.

Related Topics

PREDICT
Overview (PREDICT command)
Syntax Rules (PREDICT command)


PREFSCAL

PREFSCAL (command),PREFSCAL (command),PREFSCAL (command)
PREFSCAL (command),PREFSCAL (command),PREFSCAL (command)
syntax chart,syntax chart,syntax chart
release history,release history,release history
Multidimensional Unfolding,Multidimensional Unfolding,Multidimensional Unfolding
command syntax,command syntax,command syntax

PREFSCAL is available in the Categories option.

PREFSCAL VARIABLES = varlist

   [/INPUT = [ROWS({n    })]
                   {rowid}
             [SOURCES({1**     })]]
                      {n       }
                      {sourceid}

   [/PROXIMITIES = {DISSIMILARITIES**}]
                   {SIMILARITIES     }

   [/WEIGHTS = varlist]

   [/INITIAL = {CLASSICAL[({TRIANGLE**})]}]
                           {SPEARMAN  }
               {CORRESPONDENCE           }
               {ROSSCLIFF                }
               {CENTROIDS[({1})]         }
                           {n}
               {RANDOM[({1})]            }
                        {n}
               {(filespec) [varlist]     }

   [/CONDITION = {ROW** }]
                 {MATRIX}
                 {UNCONDITIONAL    }

   [/TRANSFORMATION = {NONE[(INTERCEPT)]                              }]
                      {LINEAR[(INTERCEPT)]                            }
                      {ORDINAL[({UNTIE   })]                          }
                                {KEEPTIES}**
                      {SMOOTH[({UNTIE   })]                           }
                               {KEEPTIES}
                      {SPLINE[([INTERCEPT] [ORDER={2}] [INKNOT={1}])]}
                                                  {n}          {n}

   [/MODEL = {IDENTITY** }]
             {WEIGHTED   }
             {GENERALIZED}

   [/RESTRICTIONS = {ROW   ({NONE**     } (filespec) [varlist])}]
                            {COORDINATES}
                    {COLUMN({NONE**     } (filespec) [varlist])}
                            {COORDINATES}

   [/PENALTY = [LAMBDA({0.5**})]
                       {value}
               [OMEGA({1.0**})]
                      {value}

   [/CRITERIA = [DIMENSIONS({2**      })]
                            {min[,max]}
                [MAXITER({5000**})]
                         {value }
                [DIFFSTRESS({0.000001**})]
                            {value    }
                [MINSTRESS({0.0001**})]]
                           {value   }

   [/PRINT = [NONE]  [INPUT]  [MULTIPLE]  [INITIAL]
             [HISTORY]  [MEASURES**]  [DECOMPOSITION]
             [COMMON**]  [DISTANCES]  [WEIGHTS**]
             [INDIVIDUAL]  [TRANSFORMATION]]

   [/PLOT = [NONE]  [MULTIPLE]  [INITIAL]  [STRESS]
            [COMMON**]  [WEIGHTS**]
            [INDIVIDUAL[(valuelist) [...]]]
            [TRANSFORMATIONS[(valuelist) [...]]]
            [SHEPARD[(valuelist) [...]]]
            [FIT[(valuelist) [...]]]
            [RESIDUALS[(valuelist) [...]]]]

   [/OPTIONS = [MARKERS(rowid)]
               [COLORS(rowid)]]

   [/OUTFILE = [COMMON('savfile'|'dataset')]
               [WEIGHTS('savfile'|'dataset')]
               [DISTANCES('savfile'|'dataset')]
               [TRANSFORMATIONS('savfile'|'dataset')]]

* Default if the keyword is omitted.

** Default if the subcommand or keyword is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

Syntax for the PREFSCAL command can be generated from the Multidimensional Unfolding (PREFSCAL) dialog.

Release History Collapse Hide details

Release History

Release 14.0

• Command introduced.

Example

PREFSCAL var01 TO var02.

Related Topics

Overview (PREFSCAL command)
Examples (PREFSCAL command)
VARIABLES Subcommand (PREFSCAL command)
INPUT Subcommand (PREFSCAL command)
PROXIMITIES Subcommand (PREFSCAL command)
WEIGHTS Subcommand (PREFSCAL command)
INITIAL Subcommand (PREFSCAL command)
CONDITION Subcommand (PREFSCAL command)
TRANSFORMATION Subcommand (PREFSCAL command)
MODEL Subcommand (PREFSCAL command)
RESTRICTIONS Subcommand (PREFSCAL command)
PENALTY Subcommand (PREFSCAL command)
CRITERIA Subcommand (PREFSCAL command)
PRINT Subcommand (PREFSCAL command)
PLOT Subcommand (PREFSCAL command)
OPTIONS Subcommand (PREFSCAL command)
OUTFILE Subcommand (PREFSCAL command)


Overview (PREFSCAL command)

PREFSCAL performs multidimensional unfolding of proximity data to find a least-squares representation of the row and column objects in a low-dimensional space. Individual differences models are allowed for multiple sources. A majorization algorithm minimizes penalized Stress and guarantees monotone convergence for optionally transformed, metric and nonmetric data under a variety of models and constraints.

Options Collapse Hide details

Options

Data Input. You can read one or more rectangular matrices of proximities. Additionally, you can read weights, an initial configuration, and fixed coordinates.

Methodological Assumptions. On the CONDITION subcommand, you can specify transformations for all sources (unconditional), separate transformations for each source (matrix-conditional), or separate transformations for each row (row-conditional). Using the TRANSFORMATION subcommand, you can treat proximities as nonmetric (ordinal or smooth ordinal), as quasi-metric (splines), or as metric (linear with or without intercept). Ordinal and smooth ordinal transformations can keep tied observations tied (discrete) or untie them (continuous). You can use the PROXIMITIES subcommand to specify whether your proximities are similarities or dissimilarities.

Model Selection. You can specify multidimensional unfolding models by selecting a combination of PREFSCAL subcommands, keywords, and criteria. The subcommand MODEL offers the Identity model and two individual differences models. You can specify other selections on the CRITERIA subcommand.

Penalties. You can specify two penalty parameters in order to avoid degenerate solutions. On the PENALTY subcommand, LAMBDA is specified for the strength, and OMEGA is specified for the range. Penalized Stress penalizes solutions with insufficient variation in the transformed proximities.

Constraints. You can specify fixed coordinates on the RESTRICTIONS subcommand to restrict some or all common space coordinates of either row objects or column objects.

Output. You can produce output that includes the original and transformed proximities, history of iterations, common and individual configurations, individual space weights, distances, and decomposition of the Stress. Plots can be produced of common and individual configurations (biplots), individual space weights, transformations, fit, and residuals.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is PREFSCAL followed by a variable list. By default, PREFSCAL produces a two-dimensional metric Euclidean multidimensional unfolding solution (Identity model). Input is expected to contain one or more rectangular matrices with proximities that are dissimilarities. The transformation of the proximities is row-conditional. The analysis uses a classical scaling start as initial configuration. By default, output includes fit and Stress values, the coordinates of the common space, and a joint plot of the common space configuration.

Syntax Rules Collapse Hide details

Syntax Rules

• If there is only one source, the model is always assumed to be Identity.

• In the case of duplicate or contradicting subcommand specification, only the later subcommand applies.

• There is no constraint with respect to the syntax order.

Limitations Collapse Hide details

Limitations

• PREFSCAL needs at least two objects in each set. At least two variables need to be specified in the variable list (two column objects), and the active data file needs to contain at least two cases (two row objects).

• PREFSCAL does not honor SPLIT FILE.

Related Topics

PREFSCAL
Examples (PREFSCAL command)
VARIABLES Subcommand (PREFSCAL command)
INPUT Subcommand (PREFSCAL command)
PROXIMITIES Subcommand (PREFSCAL command)
WEIGHTS Subcommand (PREFSCAL command)
INITIAL Subcommand (PREFSCAL command)
CONDITION Subcommand (PREFSCAL command)
TRANSFORMATION Subcommand (PREFSCAL command)
MODEL Subcommand (PREFSCAL command)
RESTRICTIONS Subcommand (PREFSCAL command)
PENALTY Subcommand (PREFSCAL command)
CRITERIA Subcommand (PREFSCAL command)
PRINT Subcommand (PREFSCAL command)
PLOT Subcommand (PREFSCAL command)
OPTIONS Subcommand (PREFSCAL command)
OUTFILE Subcommand (PREFSCAL command)


Examples (PREFSCAL command)

PREFSCAL
  VARIABLES=TP BT EMM JD CT BMM HRB TMd BTJ TMn CB DP GD CC CMB
  /INPUT=SOURCES(srcid )
  /INITIAL=CLASSICAL (SPEARMAN)
  /CONDITION=ROW
  /TRANSFORMATION=NONE
  /PROXIMITIES=DISSIMILARITIES
  /MODEL=WEIGHTED
  /CRITERIA=DIMENSIONS(2,2) DIFFSTRESS(.000001) MINSTRESS(.0001)
  MAXITER(5000)
  /PENALTY=LAMBDA(0.5) OMEGA(1.0)
  /PRINT=MEASURES COMMON
  /PLOT=COMMON WEIGHTS INDIVIDUAL ( ALL ) .

• This syntax specifies an analysis on variables tp (Toast pop-up) through cmb (Corn muffin and butter). The variable srcid is used to identify the sources.

• The INITIAL subcommand specifies that the starting values be imputed using Spearman distances.

• The MODEL subcommand specifies a weighted Euclidean model, which allows each individual space to weight the dimensions of the common space differently.

• The PLOT subcommand requests plots of the common space, individual spaces, and individual space weights.

• All other parameters fall back to their default values.

For discussion of output from this syntax and to place the example in context, see Example: Three-Way Unfolding of Breakfast Item Preferences.

Related Topics

PREFSCAL
Overview (PREFSCAL command)
VARIABLES Subcommand (PREFSCAL command)
INPUT Subcommand (PREFSCAL command)
PROXIMITIES Subcommand (PREFSCAL command)
WEIGHTS Subcommand (PREFSCAL command)
INITIAL Subcommand (PREFSCAL command)
CONDITION Subcommand (PREFSCAL command)
TRANSFORMATION Subcommand (PREFSCAL command)
MODEL Subcommand (PREFSCAL command)
RESTRICTIONS Subcommand (PREFSCAL command)
PENALTY Subcommand (PREFSCAL command)
CRITERIA Subcommand (PREFSCAL command)
PRINT Subcommand (PREFSCAL command)
PLOT Subcommand (PREFSCAL command)
OPTIONS Subcommand (PREFSCAL command)
OUTFILE Subcommand (PREFSCAL command)


VARIABLES Subcommand (PREFSCAL command)

PREFSCAL (command),PREFSCAL (command),PREFSCAL (command)
VARIABLES subcommand,VARIABLES subcommand,VARIABLES subcommand
VARIABLES (subcommand),VARIABLES (subcommand),VARIABLES (subcommand)
PREFSCAL command,PREFSCAL command,PREFSCAL command

The variable list identifies the columns in the proximity matrix or matrices that PREFSCAL reads. Each variable identifies one column of the proximity matrix, with each case in the active dataset representing one row.

• Only numeric variables may be specified.

• PREFSCAL reads data row by row, and the columns are represented by the variables on the variable list.

Example

DATA LIST
  /var01 var02.
BEGIN DATA
  1 6
  5 4
  4 2
END DATA.
PREFSCAL var01 TO var02.

• This example specifies an analysis on a 3 × 2 proximity matrix (3 rows and 2 columns).

Related Topics

PREFSCAL
Overview (PREFSCAL command)
Examples (PREFSCAL command)
INPUT Subcommand (PREFSCAL command)
PROXIMITIES Subcommand (PREFSCAL command)
WEIGHTS Subcommand (PREFSCAL command)
INITIAL Subcommand (PREFSCAL command)
CONDITION Subcommand (PREFSCAL command)
TRANSFORMATION Subcommand (PREFSCAL command)
MODEL Subcommand (PREFSCAL command)
RESTRICTIONS Subcommand (PREFSCAL command)
PENALTY Subcommand (PREFSCAL command)
CRITERIA Subcommand (PREFSCAL command)
PRINT Subcommand (PREFSCAL command)
PLOT Subcommand (PREFSCAL command)
OPTIONS Subcommand (PREFSCAL command)
OUTFILE Subcommand (PREFSCAL command)


INPUT Subcommand (PREFSCAL command)

PREFSCAL (command),PREFSCAL (command),PREFSCAL (command)
INPUT subcommand,INPUT subcommand,INPUT subcommand
INPUT (subcommand),INPUT (subcommand),INPUT (subcommand)
PREFSCAL command,PREFSCAL command,PREFSCAL command

The INPUT subcommand specifies the number of rows in one source, the number of sources, or both. Specifying a row identifier, rowid, or a source identifier, sourceid, specifically identifies either the row objects or sources and provides a variable that may contain row object or source labels. Specifying only one keyword computes the number of row objects or sources according to the following formula: C=R × S, where C is the number of cases, R is the number of row objects, and S is the number of sources. By specifying both keywords, PREFSCAL takes the first R × S cases from the active file.

ROWS (keyword),ROWS (keyword),ROWS (keyword)
PREFSCAL command,PREFSCAL command,PREFSCAL command
SOURCES (keyword),SOURCES (keyword),SOURCES (keyword)
PREFSCAL command,PREFSCAL command,PREFSCAL command
ROWS | Number of rows. This specifies the number of row objects in one source. A variable in parentheses specifies a row identifier. The values must be positive nonzero integers. The values of this variable specify the identifier of the rows that contain the proximities. Within one source, the values of this identifier only need to be discriminating. Over sources, the values of the row identifier must be in the same order.
SOURCES | Number of sources. This keyword specifies the number of sources. By default, the number of sources is 1. Otherwise, the number of cases in the active file must be dividable by the number of sources. A variable in parentheses specifically specifies a source identifier. The values of this identifier specify the sources and must be positive nonzero integers. The rows within one source must be consecutive cases in the active data file.

• rowid and sourceid may not be specified on the PREFSCAL variable list.

• Duplicate cell specification is not taken care of. In this case, the final specification applies.

Example

DATA LIST
  /var01 TO var15 rowid sourceid.
BEGIN DATA
  13 12 07 03 05 04 08 11 10 15 02 01 06 09 14   1  1
  15 11 06 03 10 05 14 08 09 12 07 01 04 02 13   2  1
  15 10 12 14 03 02 09 08 07 11 01 06 04 05 13   3  1
  (...)
  10 03 02 14 09 01 08 12 13 04 11 05 15 06 07  41  1
  13 03 01 14 04 10 05 15 06 02 11 07 12 08 09  42  1
  15 03 05 12 02 08 07 13 01 04 06 10 11 09 14   1  2
  15 04 03 11 07 05 14 01 02 06 08 13 09 12 10   2  2
  15 02 07 12 05 06 04 08 01 03 09 10 11 14 13   3  2
  (...)

  (...)
  09 04 07 10 11 02 08 12 13 05 14 06 15 01 03  41  6
  15 10 01 12 02 06 08 14 13 11 09 03 04 05 07  42  6
END DATA.

• The active data file has 252 cases, containing 6 sources with 42 row objects per source and containing 15 column objects. Additionally, 2 identifying variables, rowid and sourceid, are specified to identify the row objects and sources, respectively.

PREFSCAL var01 TO var15
  /INPUT = ROWS(42).

• PREFSCAL reads 15 columns and 42 rows per source—thus, 6 sources in total (252/42).

PREFSCAL var01 TO var15
  /INPUT = SOURCES(6).

• PREFSCAL reads 15 columns and 6 sources, with 42 rows each (252/6).

PREFSCAL var01 TO var15
  /INPUT = ROWS(rowid).

• PREFSCAL reads 15 columns and 42 rows per source. The row objects are specified by rowid, which ranges from 1 to 42, the number of row objects in this case (per source, thus 6 sources). When a lower value is found in the row object identifier variable, a new source is started.

PREFSCAL var01 TO var15
  /INPUT = SOURCES(sourceid).

• PREFSCAL reads 15 columns and 6 sources. The sources are specified by sourceid, which ranges from 1 to the number of sources (in this case, from 1 to 6). When a higher value is found in the source identifier variable, a new source is started.

COMPUTE rowid = 1+MOD($casenum-1,42).
COMPUTE sourceid = 1+TRUNC(($casenum-1)/42).
SORT CASES BY sourceid (A) rowid (A).
VALUE LABELS sourceid 1 ‘overall’  2 ‘bacon’  3 ‘cereal’
                      4 ‘pancakes’ 5 ‘normal’ 6 ‘snack’.
PREFSCAL var01 TO var15
  /INPUT = ROWS(rowid) SOURCES(sourceid).

• First, a row object identifier and a source identifier are computed. The active data file is sorted by rowid and sourceid. The variable sourceid is given value labels. PREFSCAL reads 15 columns and 6 sources per row object, with 42 row objects in total. The first nine case of the active data file look like this:

13 12  7  3  5  4  8 11 10 15  2  1  6  9 14 1 1
15  3  5 12  2  8  7 13  1  4  6 10 11  9 14 1 2
14 10  9  3  7  6 12 15  8 11  5  1  4  2 13 1 3
14  9  7  1 11  6 12 15 13 10  3  4  2  5  8 1 4
10 12  8  4  9  6  7 15 14 13  3  1  5  2 11 1 5
14 11  8  4  9  6  7 15 10 12  3  2  5  1 13 1 6
15 11  6  3 10  5 14  8  9 12  7  1  4  2 13 2 1
15  4  3 11  7  5 14  1  2  6  8 13  9 12 10 2 2
15  8  2  3 10  1 14  5  6  9 11 12  4 13  7 2 3
(...)

Related Topics

PREFSCAL
Overview (PREFSCAL command)
Examples (PREFSCAL command)
VARIABLES Subcommand (PREFSCAL command)
PROXIMITIES Subcommand (PREFSCAL command)
WEIGHTS Subcommand (PREFSCAL command)
INITIAL Subcommand (PREFSCAL command)
CONDITION Subcommand (PREFSCAL command)
TRANSFORMATION Subcommand (PREFSCAL command)
MODEL Subcommand (PREFSCAL command)
RESTRICTIONS Subcommand (PREFSCAL command)
PENALTY Subcommand (PREFSCAL command)
CRITERIA Subcommand (PREFSCAL command)
PRINT Subcommand (PREFSCAL command)
PLOT Subcommand (PREFSCAL command)
OPTIONS Subcommand (PREFSCAL command)
OUTFILE Subcommand (PREFSCAL command)


PROXIMITIES Subcommand (PREFSCAL command)

PREFSCAL (command),PREFSCAL (command),PREFSCAL (command)
PROXIMITIES subcommand,PROXIMITIES subcommand,PROXIMITIES subcommand
PROXIMITIES (subcommand),PROXIMITIES (subcommand),PROXIMITIES (subcommand)
PREFSCAL command,PREFSCAL command,PREFSCAL command

The PROXIMITIES subcommand specifies the type of proximities that are used in the analysis. The term proximity is used for either similarity or dissimilarity data. Internally, PREFSCAL works with dissimilarities. Therefore, PREFSCAL converts similarities into dissimilarities by reflecting the data about its midpoint (depending on the conditionality chosen on the CONDITION subcommand), thus preserving the endpoints and the range.

DISSIMILARITIES (keyword),DISSIMILARITIES (keyword),DISSIMILARITIES (keyword)
PREFSCAL command,PREFSCAL command,PREFSCAL command
SIMILARITIES (keyword),SIMILARITIES (keyword),SIMILARITIES (keyword)
PREFSCAL command,PREFSCAL command,PREFSCAL command
DISSIMILARITIES | Dissimilarity data. This specification is the default when PROXIMITIES is not specified. Small dissimilarities correspond to small distances, and large dissimilarities correspond to large distances.
SIMILARITIES | Similarity data. Small similarities correspond to large distances, and large similarities correspond to small distances.

Example

PREFSCAL var01 TO var09
  /PROXIMITIES = SIMILARITIES.

• In this example, PREFSCAL expects the proximities to be similarities.

Related Topics

PREFSCAL
Overview (PREFSCAL command)
Examples (PREFSCAL command)
VARIABLES Subcommand (PREFSCAL command)
INPUT Subcommand (PREFSCAL command)
WEIGHTS Subcommand (PREFSCAL command)
INITIAL Subcommand (PREFSCAL command)
CONDITION Subcommand (PREFSCAL command)
TRANSFORMATION Subcommand (PREFSCAL command)
MODEL Subcommand (PREFSCAL command)
RESTRICTIONS Subcommand (PREFSCAL command)
PENALTY Subcommand (PREFSCAL command)
CRITERIA Subcommand (PREFSCAL command)
PRINT Subcommand (PREFSCAL command)
PLOT Subcommand (PREFSCAL command)
OPTIONS Subcommand (PREFSCAL command)
OUTFILE Subcommand (PREFSCAL command)


WEIGHTS Subcommand (PREFSCAL command)

PREFSCAL (command),PREFSCAL (command),PREFSCAL (command)
WEIGHTS subcommand,WEIGHTS subcommand,WEIGHTS subcommand
WEIGHTS (subcommand),WEIGHTS (subcommand),WEIGHTS (subcommand)
PREFSCAL command,PREFSCAL command,PREFSCAL command

The WEIGHTS subcommand specifies the variables that contain the nonnegative weights for the proximities that are included in the active dataset.

• The number and order of the variables in the variable list is important. The first variable in the WEIGHTS variable list corresponds to the first variable on the PREFSCAL variable list. This correspondence is repeated for all variables on the variable lists. Every proximity has its own weight. Therefore, the number of variables on the WEIGHTS subcommand must be equal to the number of variables on the PREFSCAL variable list.

• Negative weights are not allowed. If negative weights are specified, an error message is issued, and the procedure aborts.

• The weight variable (set with WEIGHT BY) allows for the weighting of entire rows. The weight variable must contain positive, nonzero values.

Example

DATA LIST FILE = ’breakfast.dat’ FREE
  /var01 TO var15 wgt01 TO wgt15.
PREFSCAL var01 TO var15
  /WEIGHTS = wgt01 TO wgt15.

• In this example, the PREFSCAL variable list indicate that there are 15 column objects, of which the weights can be found in wgt01 to wgt15.

• wgt01 contains the weights for var01, wgt02 contains the weights for var02, and so on.

Related Topics

PREFSCAL
Overview (PREFSCAL command)
Examples (PREFSCAL command)
VARIABLES Subcommand (PREFSCAL command)
INPUT Subcommand (PREFSCAL command)
PROXIMITIES Subcommand (PREFSCAL command)
INITIAL Subcommand (PREFSCAL command)
CONDITION Subcommand (PREFSCAL command)
TRANSFORMATION Subcommand (PREFSCAL command)
MODEL Subcommand (PREFSCAL command)
RESTRICTIONS Subcommand (PREFSCAL command)
PENALTY Subcommand (PREFSCAL command)
CRITERIA Subcommand (PREFSCAL command)
PRINT Subcommand (PREFSCAL command)
PLOT Subcommand (PREFSCAL command)
OPTIONS Subcommand (PREFSCAL command)
OUTFILE Subcommand (PREFSCAL command)


INITIAL Subcommand (PREFSCAL command)

PREFSCAL (command),PREFSCAL (command),PREFSCAL (command)
INITIAL subcommand,INITIAL subcommand,INITIAL subcommand
INITIAL (subcommand),INITIAL (subcommand),INITIAL (subcommand)
PREFSCAL command,PREFSCAL command,PREFSCAL command

INITIAL defines the initial or starting configuration of the common space for the analysis. When a reduction in dimensionality is specified on the CRITERIA subcommand, a derivation of coordinates in the higher dimensionality is used as starting configuration in the lower dimensionality.

• You can specify one of the five keywords that are listed below.

• You can specify a variable list containing the initial configuration.

CLASSICAL (keyword),CLASSICAL (keyword),CLASSICAL (keyword)
PREFSCAL command,PREFSCAL command,PREFSCAL command
SCHOENEMANN (keyword),SCHOENEMANN (keyword),SCHOENEMANN (keyword)
PREFSCAL command,PREFSCAL command,PREFSCAL command
CENTROIDS (keyword),CENTROIDS (keyword),CENTROIDS (keyword)
PREFSCAL command,PREFSCAL command,PREFSCAL command
RANDOM (keyword),RANDOM (keyword),RANDOM (keyword)
PREFSCAL command,PREFSCAL command,PREFSCAL command
CORRESPONDENCE (keyword),CORRESPONDENCE (keyword),CORRESPONDENCE (keyword)
PREFSCAL command,PREFSCAL command,PREFSCAL command
CLASSICAL | Classical scaling start. This specification is the default. The rectangular proximity matrix is used to supplement the intra-blocks (values between rows and between columns) of the complete symmetrical MDS matrix by means of the triangular inequality or Spearman distances. When the complete matrix is formed, a classical scaling solution is used as initial configuration.
ROSSCLIFF | Ross-Cliff start. The Ross-Cliff start uses the results of a singular value decomposition on the double centered and squared proximity matrix as the initial values for the row and column objects.
CORRESPONDENCE | Correspondence start. The correspondence start uses the results of a correspondence analysis on the reversed data (similarities instead of dissimilarities) with symmetric normalization of row and column scores. See the topic CORRESPONDENCE for more information.
CENTROIDS(n) | Centroids start.PREFSCAL starts by positioning the row objects in the configuration by using an eigenvalue decomposition. Then, the column objects are positioned at the centroid of first choices (or second if n=2 or third if n=3, etc.). The number of choices (n) must be a positive integer between 1 and the number of columns. The default is 1.
RANDOM(n) | (Multiple) random start. You can specify the number of random starts (n), where n is any positive integer. The random sequence can be controlled by the SET SEED procedure (thus, not by a subcommand within the PREFSCAL procedure). All n analyses start with a different random configuration. In the output, all n final Stress values are reported, as well as the initial seeds of each analysis (for reproduction purposes), followed by the full output of the analysis with the lowest penalized Stress value. The default number of random starts is 1.
TRIANGLE (keyword),TRIANGLE (keyword),TRIANGLE (keyword)
NAIVEBAYES command,NAIVEBAYES command,NAIVEBAYES command
SPEARMAN (keyword),SPEARMAN (keyword),SPEARMAN (keyword)
NAIVEBAYES command,NAIVEBAYES command,NAIVEBAYES command
CLASSICAL Keyword Collapse Hide details

CLASSICAL Keyword

TRIANGLE | Imputation using the triangle inequality. If TRIANGLE is specified, the intra-blocks are filled by using the triangular inequality.
SPEARMAN | Imputation with Spearman distances. If SPEARMAN is specified, the Spearman distances between all objects are used to create a symmetrical MDS matrix.

Instead of these keywords, a filespec in parentheses can be given to specify the PASW Statistics data file containing the coordinates of the initial configuration. The row and column coordinates are stacked, with the column coordinates following the row coordinates. The closing parenthesis of the filespec can be followed by a variable list. If the variable list is omitted, the procedure automatically selects the first MAXDIM variables in the external file, where MAXDIM is the maximum number of dimensions that are requested for the analysis on /CRITERIA = DIMENSIONS(min, max). Missing values are not allowed as initial coordinates. An error is issued whenever this situation occurs.

Example

PREFSCAL var01 TO var15
  /INITIAL = RANDOM(100).

• This example performs 100 analyses (each analysis starting with a different random configuration). The results of the analysis with the lowest final Stress are displayed in the output.

Related Topics

PREFSCAL
Overview (PREFSCAL command)
Examples (PREFSCAL command)
VARIABLES Subcommand (PREFSCAL command)
INPUT Subcommand (PREFSCAL command)
PROXIMITIES Subcommand (PREFSCAL command)
WEIGHTS Subcommand (PREFSCAL command)
CONDITION Subcommand (PREFSCAL command)
TRANSFORMATION Subcommand (PREFSCAL command)
MODEL Subcommand (PREFSCAL command)
RESTRICTIONS Subcommand (PREFSCAL command)
PENALTY Subcommand (PREFSCAL command)
CRITERIA Subcommand (PREFSCAL command)
PRINT Subcommand (PREFSCAL command)
PLOT Subcommand (PREFSCAL command)
OPTIONS Subcommand (PREFSCAL command)
OUTFILE Subcommand (PREFSCAL command)


CONDITION Subcommand (PREFSCAL command)

PREFSCAL (command),PREFSCAL (command),PREFSCAL (command)
CONDITION subcommand,CONDITION subcommand,CONDITION subcommand
CONDITION (subcommand),CONDITION (subcommand),CONDITION (subcommand)
PREFSCAL command,PREFSCAL command,PREFSCAL command

CONDITION specifies the range of proximities that are compared within one transformation list. The TRANSFORMATION subcommand specifies the type of transformation.

ROW (keyword),ROW (keyword),ROW (keyword)
PREFSCAL command,PREFSCAL command,PREFSCAL command
MATRIX (keyword),MATRIX (keyword),MATRIX (keyword)
PREFSCAL command,PREFSCAL command,PREFSCAL command
UNCONDITIONAL (keyword),UNCONDITIONAL (keyword),UNCONDITIONAL (keyword)
PREFSCAL command,PREFSCAL command,PREFSCAL command
ROW | Row conditional. Only the proximities within each row are compared with each other. The comparison is carried out for each row separately. This setting is the default.
MATRIX | Matrix conditional. Only the proximities within each source are compared with each other. The comparison is carried out for each source separately.
UNCONDITIONAL | Unconditional. This specification is appropriate when the proximities in all sources can be compared with each other, and it results in a single transformation of all sources simultaneously.

• Note that if there is only one source, MATRIX and UNCONDITIONAL yield the same result.

Example

PREFSCAL var01 TO var09
  /CONDITION = UNCONDITIONAL
  /TRANSFORMATION = LINEAR(INTERCEPT).

• In this example, the proximities are linearly transformed, including an intercept. The transformation is carried out over all proximities simultaneously.

Related Topics

PREFSCAL
Overview (PREFSCAL command)
Examples (PREFSCAL command)
VARIABLES Subcommand (PREFSCAL command)
INPUT Subcommand (PREFSCAL command)
PROXIMITIES Subcommand (PREFSCAL command)
WEIGHTS Subcommand (PREFSCAL command)
INITIAL Subcommand (PREFSCAL command)
TRANSFORMATION Subcommand (PREFSCAL command)
MODEL Subcommand (PREFSCAL command)
RESTRICTIONS Subcommand (PREFSCAL command)
PENALTY Subcommand (PREFSCAL command)
CRITERIA Subcommand (PREFSCAL command)
PRINT Subcommand (PREFSCAL command)
PLOT Subcommand (PREFSCAL command)
OPTIONS Subcommand (PREFSCAL command)
OUTFILE Subcommand (PREFSCAL command)


TRANSFORMATION Subcommand (PREFSCAL command)

PREFSCAL (command),PREFSCAL (command),PREFSCAL (command)
TRANSFORMATION subcommand,TRANSFORMATION subcommand,TRANSFORMATION subcommand
TRANSFORMATION (subcommand),TRANSFORMATION (subcommand),TRANSFORMATION (subcommand)
PREFSCAL command,PREFSCAL command,PREFSCAL command

The TRANSFORMATION subcommand offers four different options for optimal transformation of the original proximities. The resulting values are called transformed proximities. The distances between the objects in the configuration should match these transformed proximities as closely as possible. The CONDITION subcommand specifies over which proximities the transformation is computed. The default transformation is ORDINAL with ties kept tied.

INTERCEPT (keyword),INTERCEPT (keyword),INTERCEPT (keyword)
PREFSCAL command,PREFSCAL command,PREFSCAL command
NONE (keyword),NONE (keyword),NONE (keyword)
PREFSCAL command,PREFSCAL command,PREFSCAL command
LINEAR (keyword),LINEAR (keyword),LINEAR (keyword)
PREFSCAL command,PREFSCAL command,PREFSCAL command
ORDINAL (keyword),ORDINAL (keyword),ORDINAL (keyword)
PREFSCAL command,PREFSCAL command,PREFSCAL command
SMOOTH (keyword),SMOOTH (keyword),SMOOTH (keyword)
PREFSCAL command,PREFSCAL command,PREFSCAL command
SPLINE (keyword),SPLINE (keyword),SPLINE (keyword)
PREFSCAL command,PREFSCAL command,PREFSCAL command
NONE | No scale transformation. The INTERCEPT keyword can be specified in parentheses following the NONE keyword. If INTERCEPT is specified, an intercept is estimated in the transformation.
LINEAR | Linear transformation. With this transformation, the transformed proximities are proportional to the original proximities (that is, the transformation function estimates a slope, and the intercept is fixed at 0). The INTERCEPT keyword can be specified in parentheses following the LINEAR keyword. If INTERCEPT is specified, an intercept is estimated in the transformation, resulting in an interval transformation. Without the keyword INTERCEPT, LINEAR only estimates a slope, which coincides with a ratio transformation.
ORDINAL | Ordinal transformation. The transformed proximities have the same order as the original proximities. ORDINAL can be followed by a keyword in parentheses to indicate how to handle tied proximities.
SMOOTH | Smooth ordinal transformation. The transformed proximities have the same order as the original proximities, including a smoothness restriction. This restriction takes the differences between subsequent values into account. Restricting subsequent differences allows for a smooth ordinal transformation. SMOOTH can be followed by a keyword in parentheses to indicate how to handle tied proximities.
SPLINE | Monotone spline transformation. The transformed proximities are a smooth nondecreasing piecewise polynomial transformation of the original proximities of the chosen degree. The pieces are specified by the number and placement of the interior knots, of which the number can be specified with INKNOT.
UNTIE (keyword),UNTIE (keyword),UNTIE (keyword)
PREFSCAL command,PREFSCAL command,PREFSCAL command
KEEPTIES (keyword),KEEPTIES (keyword),KEEPTIES (keyword)
PREFSCAL command,PREFSCAL command,PREFSCAL command
ORDINAL and SMOOTH Keywords Collapse Hide details

ORDINAL and SMOOTH Keywords

UNTIE | Untie ties. Allowing tied proximities to be untied during transformations (also known as the primary approach to ties).
KEEPTIES | Keep ties tied. Keeping tied proximities tied during transformations (also known as secondary approach to ties). This setting is the default.
INTERCEPT (keyword),INTERCEPT (keyword),INTERCEPT (keyword)
PREFSCAL command,PREFSCAL command,PREFSCAL command
DEGREE (keyword),DEGREE (keyword),DEGREE (keyword)
PREFSCAL command,PREFSCAL command,PREFSCAL command
INKNOT (keyword),INKNOT (keyword),INKNOT (keyword)
PREFSCAL command,PREFSCAL command,PREFSCAL command
SPLINE Keyword Collapse Hide details

SPLINE Keyword

INTERCEPT | Include intercept. If INTERCEPT is specified, an intercept is estimated in the transformation. Omitting this keyword sets the lower exterior knot equal to 0.
DEGREE | The degree of the polynomial. If DEGREE is not specified, the degree is assumed to be 2. The integer range of DEGREE is 1, 2, or 3.
INKNOT | The number of interior knots. If INKNOT is not specified, the number of interior knots is assumed to be 1. The integer range of INKNOT is between 0 and the number of different proximities minus 2.

Example

PREFSCAL var01 TO var15
  /TRANSFORMATION = ORDINAL(UNTIE).

• In this example, the proximities are ordinally transformed, where tied proximities are allowed to be untied.

• The CONDITION subcommand is omitted, and thus, the default conditionality ROW is in effect, which implies that the transformation is performed for each row separately.

Related Topics

PREFSCAL
Overview (PREFSCAL command)
Examples (PREFSCAL command)
VARIABLES Subcommand (PREFSCAL command)
INPUT Subcommand (PREFSCAL command)
PROXIMITIES Subcommand (PREFSCAL command)
WEIGHTS Subcommand (PREFSCAL command)
INITIAL Subcommand (PREFSCAL command)
CONDITION Subcommand (PREFSCAL command)
MODEL Subcommand (PREFSCAL command)
RESTRICTIONS Subcommand (PREFSCAL command)
PENALTY Subcommand (PREFSCAL command)
CRITERIA Subcommand (PREFSCAL command)
PRINT Subcommand (PREFSCAL command)
PLOT Subcommand (PREFSCAL command)
OPTIONS Subcommand (PREFSCAL command)
OUTFILE Subcommand (PREFSCAL command)


MODEL Subcommand (PREFSCAL command)

PREFSCAL (command),PREFSCAL (command),PREFSCAL (command)
MODEL subcommand,MODEL subcommand,MODEL subcommand
MODEL (subcommand),MODEL (subcommand),MODEL (subcommand)
PREFSCAL command,PREFSCAL command,PREFSCAL command

MODEL defines the scaling model for the analysis if more than one source is present. IDENTITY is the default model. The other models are individual differences models.

IDENTITY (keyword),IDENTITY (keyword),IDENTITY (keyword)
PREFSCAL command,PREFSCAL command,PREFSCAL command
WEIGHTED (keyword),WEIGHTED (keyword),WEIGHTED (keyword)
PREFSCAL command,PREFSCAL command,PREFSCAL command
GENERALIZED (keyword),GENERALIZED (keyword),GENERALIZED (keyword)
PREFSCAL command,PREFSCAL command,PREFSCAL command
IDENTITY | Identity model. All sources have the same individual configuration. This model is the default model, and it is not an individual differences model.
WEIGHTED | Weighted Euclidean model. This model is an individual differences model (and equivalent to the INDSCAL model). Each source has an individual space, in which every dimension of the common space is weighted differentially.
GENERALIZED | Generalized Euclidean model. This model is an individual differences model (and equivalent to the IDIOSCAL model). Each source has an individual space that is equal to a differential rotation of the common space, followed by a differential weighting of the dimensions.

• If IDENTITY is specified for only one source, this subcommand is silently ignored.

• If an individual differences model is specified for only one source, a warning is issued, and the model is set to IDENTITY.

Example

PREFSCAL var01 TO var15
  /INPUT = SOURCES(6)
  /MODEL = WEIGHTED.

• A weighted Euclidean model is fitted for the six specified sources. As indicated on the INPUT subcommand, the number of cases must be dividable by 6 in this case.

Related Topics

PREFSCAL
Overview (PREFSCAL command)
Examples (PREFSCAL command)
VARIABLES Subcommand (PREFSCAL command)
INPUT Subcommand (PREFSCAL command)
PROXIMITIES Subcommand (PREFSCAL command)
WEIGHTS Subcommand (PREFSCAL command)
INITIAL Subcommand (PREFSCAL command)
CONDITION Subcommand (PREFSCAL command)
TRANSFORMATION Subcommand (PREFSCAL command)
RESTRICTIONS Subcommand (PREFSCAL command)
PENALTY Subcommand (PREFSCAL command)
CRITERIA Subcommand (PREFSCAL command)
PRINT Subcommand (PREFSCAL command)
PLOT Subcommand (PREFSCAL command)
OPTIONS Subcommand (PREFSCAL command)
OUTFILE Subcommand (PREFSCAL command)


RESTRICTIONS Subcommand (PREFSCAL command)

PREFSCAL (command),PREFSCAL (command),PREFSCAL (command)
RESTRICTIONS subcommand,RESTRICTIONS subcommand,RESTRICTIONS subcommand
RESTRICTIONS (subcommand),RESTRICTIONS (subcommand),RESTRICTIONS (subcommand)
PREFSCAL command,PREFSCAL command,PREFSCAL command

PREFSCAL allows (some) coordinates to be fixed in the common space configuration. Fixing an entire set (all row objects or all column objects) corresponds to performing external unfolding.

ROW (keyword),ROW (keyword),ROW (keyword)
PREFSCAL command,PREFSCAL command,PREFSCAL command
COLUMN (keyword),COLUMN (keyword),COLUMN (keyword)
PREFSCAL command,PREFSCAL command,PREFSCAL command
ROW | Row restriction. PREFSCAL allows one row object, multiple row objects, or all row objects to be free (NONE) or fixed to given coordinates (COORDINATES).
COLUMN | Column restriction. PREFSCAL allows one column object, multiple column objects, or all column objects to be free (NONE) or fixed to given coordinates (COORDINATES).
NONE (keyword),NONE (keyword),NONE (keyword)
PREFSCAL command,PREFSCAL command,PREFSCAL command
COORDINATES (keyword),COORDINATES (keyword),COORDINATES (keyword)
PREFSCAL command,PREFSCAL command,PREFSCAL command
ROW or COLUMN Keywords Collapse Hide details

ROW or COLUMN Keywords

NONE | No restriction. The specified set of objects (ROW or COLUMN) has no restriction.
COORDINATES | Coordinates must be followed by a filespec in parentheses to specify the external PASW Statistics data file that contains the fixed coordinates for the specified set of objects. Following the parenthesized filespec, a variable list can be given. If the variable list is omitted, the procedure automatically selects the first MAXDIM variables in the external PASW Statistics data file, where MAXDIM is the maximum number of dimensions that are requested for the analysis on /CRITERIA = DIMENSIONS(min, max).
 | The number of cases for each variable in the external PASW Statistics data file must be equal to the number of objects of the specified set (ROW or COLUMN).
 | A missing value can be used to indicate that the coordinate on that dimension is free. The coordinates of objects with nonmissing values are kept fixed during the analysis.

Example

PREFSCAL var01 TO var15
  /RESTRICTIONS = ROW(NONE)
  /RESTRICTIONS = COLUMN(COORDINATES ("indcol.sav")).

• In this example, there are 15 column objects.

• The coordinates of the row objects are not restricted. Although this specification is the default, it is explicitly stated here in the syntax.

• The column objects have restrictions on the coordinates. The fixed coordinates are specified in the PASW Statistics data file indcol.sav. If indcol.sav contains more than two variables, only the first two variables are taken as fixed coordinates, because the maximum dimensionality is 2, and specific variables on the RESTRICTIONS subcommand are not given.

Related Topics

PREFSCAL
Overview (PREFSCAL command)
Examples (PREFSCAL command)
VARIABLES Subcommand (PREFSCAL command)
INPUT Subcommand (PREFSCAL command)
PROXIMITIES Subcommand (PREFSCAL command)
WEIGHTS Subcommand (PREFSCAL command)
INITIAL Subcommand (PREFSCAL command)
CONDITION Subcommand (PREFSCAL command)
TRANSFORMATION Subcommand (PREFSCAL command)
MODEL Subcommand (PREFSCAL command)
PENALTY Subcommand (PREFSCAL command)
CRITERIA Subcommand (PREFSCAL command)
PRINT Subcommand (PREFSCAL command)
PLOT Subcommand (PREFSCAL command)
OPTIONS Subcommand (PREFSCAL command)
OUTFILE Subcommand (PREFSCAL command)


PENALTY Subcommand (PREFSCAL command)

PREFSCAL (command),PREFSCAL (command),PREFSCAL (command)
PENALTY subcommand,PENALTY subcommand,PENALTY subcommand
PENALTY (subcommand),PENALTY (subcommand),PENALTY (subcommand)
PREFSCAL command,PREFSCAL command,PREFSCAL command

The PENALTY subcommand specifies the values for the penalty parameters. The two keywords can be used to set the strength and the range of the penalty. The penalty itself is based on the coefficient of variation of the transformed proximities.

LAMBDA (keyword),LAMBDA (keyword),LAMBDA (keyword)
PREFSCAL command,PREFSCAL command,PREFSCAL command
OMEGA (keyword),OMEGA (keyword),OMEGA (keyword)
PREFSCAL command,PREFSCAL command,PREFSCAL command
LAMBDA | Strength parameter. This parameter sets the strength of the penalty. The default value is 0.75. The range of this parameter is between 0 (exclusive) and 1 (inclusive). The smaller the values of lambda, the stronger the penalty (and vice versa).
OMEGA | Range parameter. This parameter sets the range of the penalty (that is, the moment the penalty becomes active). The parameter must have a non-negative value. If OMEGA is 0, the penalty is inactive. Increasing OMEGA provides a more active penalty. By default (OMEGA = 1.0), the range is equal to the variation coefficient of the original proximities. If OMEGA is increased, the function will search for a solution with a higher variation of the transformed proximities

Example

PREFSCAL var01 TO var09
  /PENALTY = LAMBDA(0.5)
             OMEGA(2.0).

• In this example, the variation range is increased by setting OMEGA equal to 2.0.

Related Topics

PREFSCAL
Overview (PREFSCAL command)
Examples (PREFSCAL command)
VARIABLES Subcommand (PREFSCAL command)
INPUT Subcommand (PREFSCAL command)
PROXIMITIES Subcommand (PREFSCAL command)
WEIGHTS Subcommand (PREFSCAL command)
INITIAL Subcommand (PREFSCAL command)
CONDITION Subcommand (PREFSCAL command)
TRANSFORMATION Subcommand (PREFSCAL command)
MODEL Subcommand (PREFSCAL command)
RESTRICTIONS Subcommand (PREFSCAL command)
CRITERIA Subcommand (PREFSCAL command)
PRINT Subcommand (PREFSCAL command)
PLOT Subcommand (PREFSCAL command)
OPTIONS Subcommand (PREFSCAL command)
OUTFILE Subcommand (PREFSCAL command)


CRITERIA Subcommand (PREFSCAL command)

PREFSCAL (command),PREFSCAL (command),PREFSCAL (command)
CRITERIA subcommand,CRITERIA subcommand,CRITERIA subcommand
CRITERIA (subcommand),CRITERIA (subcommand),CRITERIA (subcommand)
PREFSCAL command,PREFSCAL command,PREFSCAL command

You can use CRITERIA to set the dimensionality and criteria for terminating the algorithm. You can specify one or more of the following keywords:

DIMENSIONS (keyword),DIMENSIONS (keyword),DIMENSIONS (keyword)
PREFSCAL command,PREFSCAL command,PREFSCAL command
MAXITER (keyword),MAXITER (keyword),MAXITER (keyword)
PREFSCAL command,PREFSCAL command,PREFSCAL command
DIFFSTRESS (keyword),DIFFSTRESS (keyword),DIFFSTRESS (keyword)
PREFSCAL command,PREFSCAL command,PREFSCAL command
MINSTRESS (keyword),MINSTRESS (keyword),MINSTRESS (keyword)
PREFSCAL command,PREFSCAL command,PREFSCAL command
DIMENSIONS(min,max) | Minimum and maximum number of dimensions. By default, PREFSCAL computes a solution in two dimensions. The minimum and maximum number of dimensions can be any integer between 1 and the number of objects minus 1 inclusive, as long as the minimum is less than or equal to the maximum. PREFSCAL starts computing a solution in the largest dimensionality and reduces the dimensionality in steps of one, until the lowest dimensionality is reached. Specifying a single value represents both minimum and maximum number of dimensions; thus, DIMENSIONS(4) is equivalent to DIMENSIONS(4,4).
MAXITER(n) | Maximum number of iterations. By default, n=5000, specifying the maximum number of iterations that are performed while one of the convergence criteria below (DIFFSTRESS and MINSTRESS) is not reached. Decreasing this number might give less accurate results, but will take less time. The value n must have a non-negative integer value.
DIFFSTRESS | Convergence criterion. PREFSCAL minimizes the goodness-of-fit index “penalized Stress.” By default, PREFSCAL stops iterating when the relative difference in consecutive penalized Stress values is less than or equal to 0.000001. To obtain a more accurate solution, you can specify a smaller value. The specified value must be nonnegative.
MINSTRESS | Minimum Stress value. By default, PREFSCAL stops iterating when the penalized Stress value itself is small (that is, less than or equal to 0.001). To obtain a more accurate solution, you can specify a smaller value. The specified value must be nonnegative.

Example

PREFSCAL var01 TO var15
  /CRITERIA = DIMENSIONS(2,4) MAXITER(10000) DIFFSTRESS(1.0E-8).

• The maximum number of dimensions equals 4, and the minimum number of dimensions equals 2. PREFSCAL computes a four-dimensional, three-dimensional, and two-dimensional solution, respectively.

• The maximum number of iterations is set to 10000.

• The relative difference in penalized Stress convergence criterion is sharpened to 1.0E-8.

Related Topics

PREFSCAL
Overview (PREFSCAL command)
Examples (PREFSCAL command)
VARIABLES Subcommand (PREFSCAL command)
INPUT Subcommand (PREFSCAL command)
PROXIMITIES Subcommand (PREFSCAL command)
WEIGHTS Subcommand (PREFSCAL command)
INITIAL Subcommand (PREFSCAL command)
CONDITION Subcommand (PREFSCAL command)
TRANSFORMATION Subcommand (PREFSCAL command)
MODEL Subcommand (PREFSCAL command)
RESTRICTIONS Subcommand (PREFSCAL command)
PENALTY Subcommand (PREFSCAL command)
PRINT Subcommand (PREFSCAL command)
PLOT Subcommand (PREFSCAL command)
OPTIONS Subcommand (PREFSCAL command)
OUTFILE Subcommand (PREFSCAL command)


PRINT Subcommand (PREFSCAL command)

PREFSCAL (command),PREFSCAL (command),PREFSCAL (command)
PRINT subcommand,PRINT subcommand,PRINT subcommand
PRINT (subcommand),PRINT (subcommand),PRINT (subcommand)
PREFSCAL command,PREFSCAL command,PREFSCAL command

The PRINT subcommand controls the display of tables. By default, PREFSCAL displays the Stress and fit values for each analysis, the coordinates of the common space, and, if applicable, the individual space weights.

• Omitting the PRINT subcommand or specifying PRINT without keywords is equivalent to specifying COMMON and WEIGHTS.

• If a keyword(s) is specified, only the output for that particular keyword(s) is displayed.

• Inapplicable keywords are silently ignored. That is, a specified keyword for which no output is available—for example, the keyword INDIVIDUAL with only one source specified—will be silently ignored.

NONE (keyword),NONE (keyword),NONE (keyword)
PREFSCAL command,PREFSCAL command,PREFSCAL command
INPUT (keyword),INPUT (keyword),INPUT (keyword)
PREFSCAL command,PREFSCAL command,PREFSCAL command
MULTIPLE (keyword),MULTIPLE (keyword),MULTIPLE (keyword)
PREFSCAL command,PREFSCAL command,PREFSCAL command
INITIAL (keyword),INITIAL (keyword),INITIAL (keyword)
PREFSCAL command,PREFSCAL command,PREFSCAL command
HISTORY (keyword),HISTORY (keyword),HISTORY (keyword)
PREFSCAL command,PREFSCAL command,PREFSCAL command
MEASURES (keyword),MEASURES (keyword),MEASURES (keyword)
PREFSCAL command,PREFSCAL command,PREFSCAL command
DECOMPOSITION (keyword),DECOMPOSITION (keyword),DECOMPOSITION (keyword)
PREFSCAL command,PREFSCAL command,PREFSCAL command
COMMON (keyword),COMMON (keyword),COMMON (keyword)
PREFSCAL command,PREFSCAL command,PREFSCAL command
DISTANCES (keyword),DISTANCES (keyword),DISTANCES (keyword)
PREFSCAL command,PREFSCAL command,PREFSCAL command
WEIGHTS (keyword),WEIGHTS (keyword),WEIGHTS (keyword)
PREFSCAL command,PREFSCAL command,PREFSCAL command
INDIVIDUAL (keyword),INDIVIDUAL (keyword),INDIVIDUAL (keyword)
PREFSCAL command,PREFSCAL command,PREFSCAL command
TRANSFORMATION (keyword),TRANSFORMATION (keyword),TRANSFORMATION (keyword)
PREFSCAL command,PREFSCAL command,PREFSCAL command
NONE | No optional output. Displays only the penalized Stress and corresponding fit values.
INPUT | Input data. Displays tables of the original proximities and, if present, the data weights, the initial configuration, and the fixed coordinates.
MULTIPLE | Multiple random starts. Displays the random number seed and penalized Stress value of each random start.
INITIAL | Initial common space. Displays the coordinates of the initial common space.
HISTORY | History of iterations. Displays the history of iterations of the main algorithm.
MEASURES | Fit measures. Displays different measures. The table contains several goodness-of-fit, badness-of-fit, Stress, and fit values. This setting is specified by default.
DECOMPOSITION | Decomposition of Stress. Displays a objects, rows, and sources decomposition of penalized Stress, including row, column, and source totals.
COMMON | Common space. Displays the coordinates of the common space. This is specified by default.
DISTANCES | Distances. Displays the distances between the objects in the configuration. This keyword must be used in combination with COMMON or INDIVIDUAL to actually produce a table with distances.
WEIGHTS | Individual space weights. Displays the individual space weights, if applicable (that is, if one of the individual differences models is specified on the MODEL subcommand). Depending on the model, the space weights are decomposed in rotation weights and dimension weights, which are also displayed. This setting is specified by default.
INDIVIDUAL | Individual spaces. The coordinates of the individual spaces are displayed only if one of the individual differences models is specified on the MODEL subcommand.
TRANSFORMATION | Transformed proximities. Displays the transformed proximities.

Example

PREFSCAL var01 TO var15
  /INPUT = ROWS(42)
  /MODEL = WEIGHTED
  /PRINT = HISTORY COMMON MEASURES.

• Here, a weighted Euclidean model is specified with multiple sources.

• The optional output consists of a table with the history of iterations, the coordinates of the common space, and Stress and fit measures.

Related Topics

PREFSCAL
Overview (PREFSCAL command)
Examples (PREFSCAL command)
VARIABLES Subcommand (PREFSCAL command)
INPUT Subcommand (PREFSCAL command)
PROXIMITIES Subcommand (PREFSCAL command)
WEIGHTS Subcommand (PREFSCAL command)
INITIAL Subcommand (PREFSCAL command)
CONDITION Subcommand (PREFSCAL command)
TRANSFORMATION Subcommand (PREFSCAL command)
MODEL Subcommand (PREFSCAL command)
RESTRICTIONS Subcommand (PREFSCAL command)
PENALTY Subcommand (PREFSCAL command)
CRITERIA Subcommand (PREFSCAL command)
PLOT Subcommand (PREFSCAL command)
OPTIONS Subcommand (PREFSCAL command)
OUTFILE Subcommand (PREFSCAL command)


PLOT Subcommand (PREFSCAL command)

PREFSCAL (command),PREFSCAL (command),PREFSCAL (command)
PLOT subcommand,PLOT subcommand,PLOT subcommand
PLOT (subcommand),PLOT (subcommand),PLOT (subcommand)
PREFSCAL command,PREFSCAL command,PREFSCAL command

The PLOT subcommand controls the display of plots. By default, PREFSCAL displays the object points of the common space and, if applicable, the individual space weights.

• Omitting the PLOT subcommand or specifying PLOT without keywords produces the default plots.

• If a keyword(s) is specified, only the plot for that particular keyword(s) is displayed.

• Inapplicable keywords (for example, STRESS with equal minimum and maximum number of dimensions on the CRITERIA subcommand) are silently ignored.

• Multiple value lists are allowed for INDIVIDUAL, TRANSFORMATIONS, SHEPARD, FIT, and RESIDUALS. For each value list, a separate plot will be displayed.

NONE (keyword),NONE (keyword),NONE (keyword)
PREFSCAL command,PREFSCAL command,PREFSCAL command
STRESS (keyword),STRESS (keyword),STRESS (keyword)
PREFSCAL command,PREFSCAL command,PREFSCAL command
COMMON (keyword),COMMON (keyword),COMMON (keyword)
PREFSCAL command,PREFSCAL command,PREFSCAL command
WEIGHTS (keyword),WEIGHTS (keyword),WEIGHTS (keyword)
PREFSCAL command,PREFSCAL command,PREFSCAL command
INDIVIDUAL (keyword),INDIVIDUAL (keyword),INDIVIDUAL (keyword)
PREFSCAL command,PREFSCAL command,PREFSCAL command
TRANSFORMATIONS (keyword),TRANSFORMATIONS (keyword),TRANSFORMATIONS (keyword)
PREFSCAL command,PREFSCAL command,PREFSCAL command
RESIDUALS (keyword),RESIDUALS (keyword),RESIDUALS (keyword)
PREFSCAL command,PREFSCAL command,PREFSCAL command
MULTIPLE (keyword),MULTIPLE (keyword),MULTIPLE (keyword)
PREFSCAL command,PREFSCAL command,PREFSCAL command
INITIAL (keyword),INITIAL (keyword),INITIAL (keyword)
PREFSCAL command,PREFSCAL command,PREFSCAL command
NONE | No plots. PREFSCAL does not produce any plot.
MULTIPLE | Multiple random starts. Displays a stacked histogram of penalized Stress, displaying both Stress and penalty.
INITIAL | Initial common space. Displays a scatterplot matrix of the coordinates of the initial common space.
STRESS | Scree plot. Produces a lineplot of penalized Stress versus dimensions. This plot is only produced if the maximum number of dimensions is larger than the minimum number of dimensions.
COMMON | Common space. A scatterplot matrix of coordinates of the common space is displayed. This setting is the default.
WEIGHTS | Individual space weights. A scatterplot is produced for the individual space weights. This setting is only applicable if one of the individual differences models is specified on the MODEL subcommand. For the weighted Euclidean model, the weights for all sources are displayed in a plot, with one dimension on each axis. For the generalized Euclidean model, one plot is produced per dimension, indicating both rotation and weighting of that dimension for each source.
INDIVIDUAL(valuelist) | Individual spaces. The coordinates of the individual spaces are displayed in scatterplot matrices. This setting is only applicable if one of the individual differences models is specified on the MODEL subcommand. For each source that is specified on the value list, a scatterplot matrix of coordinates of the individual space is displayed. The sources are specified by a number between 1 and the total number of sources or is specified by a value from the sourceid, which is specified on the INPUT subcommand.
TRANSFORMATIONS(valuelist) | Transformation plots. A line plot is produced of the original proximities versus the transformed proximities. On the value list, the names (identifiers) for which the plot is to be produced must be specified. Because the CONDITION subcommand allows for the specification of multiple transformation lists, the value lists depend on the conditionality. In case of row-conditional transformations, the names are row identifiers (either a number between 1 and the total number of rows, or a value from the rowid, which is specified on the INPUT subcommand). In the case of matrix-conditional transformations, the values indicate sources identifiers (either a number between 1 and the total number of sources, or a value from the sourceid, which is specified on the INPUT subcommand). An unconditional transformation only consists of one list and does not allow further specification.
SHEPARD(valuelist) | Shepard plots. The original proximities versus both transformed proximities and distances. The distances are indicated by points, and the transformed proximities are indicated by a line. On the value list, the names (identifiers) for which the plot is to be produced must be specified. Because the CONDITION subcommand allows for the specification of multiple transformation lists, the value lists depend on the conditionality. In case of row-conditional transformations, the names are row identifiers (either a number between 1 and the total number of rows, or a value from the rowid, which is specified on the INPUT subcommand). In the case of matrix-conditional transformations, the values indicate sources identifiers (either a number between 1 and the total number of sources, or a value from the sourceid, which is specified on the INPUT subcommand). An unconditional transformation only consists of one list and does not allow further specification.
FIT(valuelist) | Scatterplots of Fit. The transformed proximities versus the distances are plotted in a scatterplot. On the value list, the names (identifiers) of the sources for which the plot is to be produced must be specified. The sources are specified by a number between 1 and the total number of sources or are specified by a value from the sourceid, which is specified on the INPUT subcommand.
RESIDUALS(valuelist) | Residuals plots. The transformed proximities versus the residuals (transformed proximities minus distances) are plotted in a scatterplot. On the value list, the names (identifiers) of the sources for which the plot is to be produced must be specified. The sources are specified by a number between 1 and the total number of sources or are specified by a value from the sourceid, which is specified on the INPUT subcommand.

Example

PREFSCAL var01 TO var15
  /INPUT = SOURCE(6)
  /MODEL = WEIGHTED
  /CRITERIA = DIMENSIONS(3)
  /PLOT = COMMON
          INDIVIDUAL(2)
          TRANSFORMATIONS(1 TO 42)(1 2)
          FIT(2).

• Here, the syntax specifies a weighted Euclidean model with six sources in three dimensions.

• COMMON produces a scatterplot matrix defined by dimensions 1, 2, and 3.

• A scatterplot matrix with threedimensions is produced only for the source 2.

• Two transformation plots are produced, one plot with all 42 rows and one plot with only row 1 and 2. Rows are specified with the TRANSFORMATIONS keyword because the default value on CONDITION is ROW.

• A scatterplot of fit is produced for the source 2.

Related Topics

PREFSCAL
Overview (PREFSCAL command)
Examples (PREFSCAL command)
VARIABLES Subcommand (PREFSCAL command)
INPUT Subcommand (PREFSCAL command)
PROXIMITIES Subcommand (PREFSCAL command)
WEIGHTS Subcommand (PREFSCAL command)
INITIAL Subcommand (PREFSCAL command)
CONDITION Subcommand (PREFSCAL command)
TRANSFORMATION Subcommand (PREFSCAL command)
MODEL Subcommand (PREFSCAL command)
RESTRICTIONS Subcommand (PREFSCAL command)
PENALTY Subcommand (PREFSCAL command)
CRITERIA Subcommand (PREFSCAL command)
PRINT Subcommand (PREFSCAL command)
OPTIONS Subcommand (PREFSCAL command)
OUTFILE Subcommand (PREFSCAL command)


OPTIONS Subcommand (PREFSCAL command)

PREFSCAL (command),PREFSCAL (command),PREFSCAL (command)
OPTIONS subcommand,OPTIONS subcommand,OPTIONS subcommand
OPTIONS (subcommand),OPTIONS (subcommand),OPTIONS (subcommand)
PREFSCAL command,PREFSCAL command,PREFSCAL command

The OPTIONS subcommand specifies additional markings for the row objects in plots. For this purpose, the values of variables are used to specify markers and colors for the row objects.

MARKERS (keyword),MARKERS (keyword),MARKERS (keyword)
PREFSCAL command,PREFSCAL command,PREFSCAL command
COLORS (keyword),COLORS (keyword),COLORS (keyword)
PREFSCAL command,PREFSCAL command,PREFSCAL command
MARKERS(variable) | Row object markers. The values of the variable are used to cycle through all possible markers.
COLORS(variable) | Row object colors. The values of the variable are used to cycle through all colors.

Example

DATA LIST
  /var01 TO var15 rowid gender age.
PREFSCAL var01 TO var15
  /INPUT   = ROW(rowid)
  /OPTIONS = MARKERS(gender) COLORS(age).

• In the joint plot of the common space configuration, the row objects are labeled with the values or value labels of the variable rowid. Additionally, the points are marked according to the values on the variable gender and are colored depending on the values of the variable age.

Related Topics

PREFSCAL
Overview (PREFSCAL command)
Examples (PREFSCAL command)
VARIABLES Subcommand (PREFSCAL command)
INPUT Subcommand (PREFSCAL command)
PROXIMITIES Subcommand (PREFSCAL command)
WEIGHTS Subcommand (PREFSCAL command)
INITIAL Subcommand (PREFSCAL command)
CONDITION Subcommand (PREFSCAL command)
TRANSFORMATION Subcommand (PREFSCAL command)
MODEL Subcommand (PREFSCAL command)
RESTRICTIONS Subcommand (PREFSCAL command)
PENALTY Subcommand (PREFSCAL command)
CRITERIA Subcommand (PREFSCAL command)
PRINT Subcommand (PREFSCAL command)
PLOT Subcommand (PREFSCAL command)
OUTFILE Subcommand (PREFSCAL command)


OUTFILE Subcommand (PREFSCAL command)

PREFSCAL (command),PREFSCAL (command),PREFSCAL (command)
OUTFILE subcommand,OUTFILE subcommand,OUTFILE subcommand
OUTFILE (subcommand),OUTFILE (subcommand),OUTFILE (subcommand)
PREFSCAL command,PREFSCAL command,PREFSCAL command

OUTFILE saves coordinates of the common space, individual space weights, distances, and transformed proximities to an external PASW Statistics data file or previously declared dataset (DATASET DECLARE command). The data file/dataset name must be different for each keyword.

COMMON (keyword),COMMON (keyword),COMMON (keyword)
PREFSCAL command,PREFSCAL command,PREFSCAL command
WEIGHTS (keyword),WEIGHTS (keyword),WEIGHTS (keyword)
PREFSCAL command,PREFSCAL command,PREFSCAL command
DISTANCES (keyword),DISTANCES (keyword),DISTANCES (keyword)
PREFSCAL command,PREFSCAL command,PREFSCAL command
TRANSFORMATION (keyword),TRANSFORMATION (keyword),TRANSFORMATION (keyword)
PREFSCAL command,PREFSCAL command,PREFSCAL command
COMMON('savfile'|'dataset') | Common space coordinates. The coordinates of the common space. The columns (variables) represent the dimensions DIM_1, DIM_2, ..., DIM_n of the common space. The number of cases in the external file equals the total number of objects (row plus column objects).
WEIGHTS('savfile'|'dataset') | Individual space weights. The individual space weights. The columns represent the dimensions DIM_1, DIM_2, …, DIM_n of the space weights. The number of cases depends on the individual differences model specified on the MODEL subcommand. The weighted Euclidean model uses diagonal weight matrices. Only the diagonals are written to file, and the number of cases is equal to the number of sources. The generalized Euclidean model has full-rank nonsingular weight matrices, one matrix for each source. The matrices are stacked beneath each other in the external PASW Statistics data file. The number of cases equals the number of sources times the number of dimensions.
DISTANCES('savfile'|'dataset') | Distances. The matrices containing the distances between the objects for each source are stacked beneath each other in the external PASW Statistics data file. The number of variables in the data file is equal to the total number of objects (ROW_1, ROW_2, ..., ROW_n, COL_1, COL_2, …, COL_m). The number of cases in the data file is equal to the total number of objects times the number of sources.
TRANSFORMATION('file'|'dataset') | Transformed proximities. The matrices containing the transformed proximities for each source are stacked beneath each other in the external PASW Statistics data file. The number of variables in the external file is equal to the total number of objects (ROW_1, ROW_2, ..., ROW_n, COL_1, COL_2, …, COL_m). The number of cases in the external file is equal to the total number of objects times the number of sources.

Example

PREFSCAL var01 TO var15
  /OUTFILE = COMMON('/data/start.sav').

• Here, the coordinates of the common space are written to the external PASW Statistics data file start.sav.

• Filenames should be enclosed in quotes and are stored in the working directory unless a path is included as part of the file specification. datasets are available during the current session but are not available in subsequent sessions unless you explicitly save them as data files.

Related Topics

PREFSCAL
Overview (PREFSCAL command)
Examples (PREFSCAL command)
VARIABLES Subcommand (PREFSCAL command)
INPUT Subcommand (PREFSCAL command)
PROXIMITIES Subcommand (PREFSCAL command)
WEIGHTS Subcommand (PREFSCAL command)
INITIAL Subcommand (PREFSCAL command)
CONDITION Subcommand (PREFSCAL command)
TRANSFORMATION Subcommand (PREFSCAL command)
MODEL Subcommand (PREFSCAL command)
RESTRICTIONS Subcommand (PREFSCAL command)
PENALTY Subcommand (PREFSCAL command)
CRITERIA Subcommand (PREFSCAL command)
PRINT Subcommand (PREFSCAL command)
PLOT Subcommand (PREFSCAL command)
OPTIONS Subcommand (PREFSCAL command)


PRESERVE

preferences,preferences,preferences
preserving,preserving,preserving
preferences,preferences,preferences
restoring,restoring,restoring
SET (command),SET (command),SET (command)
with RESTORE command,with RESTORE command,with RESTORE command
RESTORE (command),RESTORE (command),RESTORE (command)
PRESERVE (command),PRESERVE (command),PRESERVE (command)
PRESERVE (command),PRESERVE (command),PRESERVE (command)
syntax chart,syntax chart,syntax chart
SET (command),SET (command),SET (command)
with PRESERVE command,with PRESERVE command,with PRESERVE command
PRESERVE

This command takes effect immediately. It does not read the active dataset or execute pending transformations. See the topic Command Order for more information.

Related Topics

Overview (PRESERVE command)
Example (PRESERVE command)


Overview (PRESERVE command)

PRESERVE stores current SET specifications that can later be restored by the RESTORE command. PRESERVE and RESTORE are especially useful with the macro facility. PRESERVE-RESTORE sequences can be nested up to five levels.

Basic Specification

The only specification is the command keyword. PRESERVE has no additional specifications.

Limitations

PRESERVE does not store SET THREADS and SET MCACHE settings.

Related Topics

PRESERVE
Example (PRESERVE command)


Example (PRESERVE command)

PRESERVE.
SET TNUMBERS=BOTH.
FREQUENCIES VARIABLES=DIVISION
RESTORE.
FREQUENCIES VARIABLES=DIVISION.

• PRESERVE stores all current SET specifications.

• SET TNUMBERS=BOTH changes the TNUMBERS setting to display both values and value labels in pivot tables.

• The pivot table results from the first FREQUENCIES command will display both category values and labels.

• RESTORE reestablishes the SET specifications that were in effect prior to when PRESERVE was specified.

• The pivot table results from the second FREQUENCIES command will use the TNUMBERS setting in effect prior to PRESERVE (the default is to display only labels).

Related Topics

PRESERVE
Overview (PRESERVE command)


PRINCALS

PRINCALS (command),PRINCALS (command),PRINCALS (command)
PRINCALS (command),PRINCALS (command),PRINCALS (command)
syntax chart,syntax chart,syntax chart

PRINCALS is available in the Categories option.

PRINCALS VARIABLES=varlist(max)

[/ANALYSIS=varlist[({ORDI**})]]
                    {SNOM  }
                    {MNOM  }
                    {NUME  }

[/NOBSERVATIONS=value]

[/DIMENSION={2**  }]
            {value}

[/MAXITER={100**}]
          {value}

[/CONVERGENCE={.00001**}]
              {value   }

[/PRINT=[DEFAULT] [FREQ**] [EIGEN**] [LOADINGS**] [QUANT]
        [HISTORY] [CORRELATION] [OBJECT] [ALL] [NONE]]

[/PLOT=[NDIM=({1    ,2    }**)]
              {value,value}
              {ALL  ,MAX  }
       [DEFAULT[(n)]] [OBJECT**[(varlist)][(n)]]
       [QUANT**[(varlist)][(n)]] [LOADINGS[(n)]]
       [ALL[(n)]] [NONE]]

[/SAVE=[rootname] [(value}]

[/MATRIX=OUT({*   })]
             {'file'|'dataset'}

**Default if the subcommand or keyword is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See PRINCALS Algorithms for computational details for this procedure.

Related Topics

Overview (PRINCALS command)
Example (PRINCALS command)
VARIABLES Subcommand (PRINCALS command)
ANALYSIS Subcommand (PRINCALS command)
NOBSERVATIONS Subcommand (PRINCALS command)
DIMENSION Subcommand (PRINCALS command)
MAXITER Subcommand (PRINCALS command)
CONVERGENCE Subcommand (PRINCALS command)
PRINT Subcommand (PRINCALS command)
PLOT Subcommand (PRINCALS command)
SAVE Subcommand (PRINCALS command)
MATRIX Subcommand (PRINCALS command)


Overview (PRINCALS command)

AUTORECODE (command),AUTORECODE (command),AUTORECODE (command)
with PRINCALS command,with PRINCALS command,with PRINCALS command
PRINCALS (command),PRINCALS (command),PRINCALS (command)
with AUTORECODE command,with AUTORECODE command,with AUTORECODE command
RECODE (command),RECODE (command),RECODE (command)
with PRINCALS command,with PRINCALS command,with PRINCALS command
PRINCALS (command),PRINCALS (command),PRINCALS (command)
with RECODE command,with RECODE command,with RECODE command
missing values,missing values,missing values
with PRINCALS command,with PRINCALS command,with PRINCALS command

PRINCALS (principal components analysis by means of alternating least squares) analyzes a set of variables for major dimensions of variation. The variables can be of mixed optimal scaling levels, and the relationships among observed variables are not assumed to be linear.

Options Collapse Hide details

Options

Optimal Scaling Level. You can specify the optimal scaling level for each variable to be used in the analysis.

Number of Cases. You can restrict the analysis to the first n observations.

Number of Dimensions. You can specify how many dimensions PRINCALS should compute.

Iterations and Convergence. You can specify the maximum number of iterations and the value of a convergence criterion.

Display Output. The output can include all available statistics, only the default statistics, or only the specific statistics you request. You can also control whether some of these statistics are plotted.

Saving Scores. You can save object scores in the active dataset.

Writing Matrices. You can write a matrix data file containing category quantifications and loadings for use in further analyses.

Basic Specification Collapse Hide details

Basic Specification

• The basic specification is the PRINCALS command and the VARIABLES subcommand. PRINCALS performs the analysis assuming an ordinal level of optimal scaling for all variables and uses all cases to compute a two-dimensional solution. By default, marginal frequencies, eigenvalues, and summary measures of fit and loss are displayed, and quantifications and object scores are plotted.

Subcommand Order Collapse Hide details

Subcommand Order

• The VARIABLES subcommand must precede all others.

• Other subcommands can appear in any order.

Operations Collapse Hide details

Operations

• If the ANALYSIS subcommand is specified more than once, PRINCALS is not executed. For all other subcommands, only the last occurrence of each subcommand is executed.

• PRINCALS treats every value in the range of 1 to the maximum value specified on VARIABLES as a valid category. Use the AUTORECODE or RECODE command if you want to recode a categorical variable with nonsequential values or with a large number of categories to avoid unnecessary output. For variables treated as numeric, recoding is not recommended because the intervals between consecutive categories will not be maintained.

Limitations Collapse Hide details

Limitations

• String variables are not allowed; use AUTORECODE to recode nominal string variables into numeric ones before using PRINCALS.

• The data must be positive integers. Zeros and negative values are treated as system-missing and are excluded from the analysis. Fractional values are truncated after the decimal and are included in the analysis. If one of the levels of a categorical variable has been coded 0 or a negative value and you want to treat it as a valid category, use the AUTORECODE or RECODE command to recode the values of that variable (see AUTORECODE and RECODE for more information).

• PRINCALS ignores user-missing value specifications. Positive user-missing values less than the maximum value on the VARIABLES subcommand are treated as valid category values and are included in the analysis. If you do not want the category included, you can use COMPUTE or RECODE to change the value to something outside of the valid range. Values outside of the range (less than 1 or greater than the maximum value) are treated as system-missing.

Related Topics

PRINCALS
Example (PRINCALS command)
VARIABLES Subcommand (PRINCALS command)
ANALYSIS Subcommand (PRINCALS command)
NOBSERVATIONS Subcommand (PRINCALS command)
DIMENSION Subcommand (PRINCALS command)
MAXITER Subcommand (PRINCALS command)
CONVERGENCE Subcommand (PRINCALS command)
PRINT Subcommand (PRINCALS command)
PLOT Subcommand (PRINCALS command)
SAVE Subcommand (PRINCALS command)
MATRIX Subcommand (PRINCALS command)


Example (PRINCALS command)

PRINCALS VARIABLES=ACOLA BCOLA(2) PRICEA PRICEB(5)
/ANALYSIS=ACOLA BCOLA(SNOM) PRICEA PRICEB(NUME)
/PRINT=QUANT OBJECT.

• VARIABLES defines the variables and their maximum number of levels.

• The ANALYSIS subcommand specifies that variables ACOLA and BCOLA are single nominal (SNOM) and that variables PRICEA and PRICEB are numeric (NUME).

• The PRINT subcommand lists the category quantifications and object scores.

• By default, plots of the category quantifications and the object scores are produced.

Related Topics

PRINCALS
Overview (PRINCALS command)
VARIABLES Subcommand (PRINCALS command)
ANALYSIS Subcommand (PRINCALS command)
NOBSERVATIONS Subcommand (PRINCALS command)
DIMENSION Subcommand (PRINCALS command)
MAXITER Subcommand (PRINCALS command)
CONVERGENCE Subcommand (PRINCALS command)
PRINT Subcommand (PRINCALS command)
PLOT Subcommand (PRINCALS command)
SAVE Subcommand (PRINCALS command)
MATRIX Subcommand (PRINCALS command)


VARIABLES Subcommand (PRINCALS command)

VARIABLES (subcommand),VARIABLES (subcommand),VARIABLES (subcommand)
PRINCALS command,PRINCALS command,PRINCALS command
PRINCALS (command),PRINCALS (command),PRINCALS (command)
VARIABLES subcommand,VARIABLES subcommand,VARIABLES subcommand

VARIABLES specifies all of the variables that will be used in the current PRINCALS procedure.

• The VARIABLES subcommand is required and precedes all other subcommands. The actual word VARIABLES can be omitted.

• Each variable or variable list is followed by the maximum number of categories (levels) in parentheses.

• The number specified in parentheses indicates the number of categories and the maximum category value. For example, VAR1(3) indicates that VAR1 has three categories coded 1, 2, and 3. However, if a variable is not coded with consecutive integers, the number of categories used in the analysis will differ from the number of observed categories. For example, if a three category variable is coded {2, 4, 6}, the maximum category value is 6. The analysis treats the variable as having six categories, three of which are not observed and receive quantifications of 0.

• To avoid unnecessary output, use the AUTORECODE or RECODE command before PRINCALS to recode a categorical variable that was coded with nonsequential values. As noted in “Limitations,” recoding is not recommended with variables treated as numeric (see AUTORECODE and RECODE for more information).

Example

DATA LIST FREE/V1 V2 V3.
BEGIN DATA
3 1 1
6 1 1
3 1 3
3 2 2
3 2 2
6 2 2
6 1 3
6 2 2
3 2 2
6 2 1
END DATA.
AUTORECODE V1 /INTO NEWVAR1.
PRINCALS VARIABLES=NEWVAR1 V2(2) V3(3).

• DATA LIST defines three variables, V1, V2, and V3.

• V1 has two levels, coded 3 and 6, V2 has two levels, coded 1 and 2, and V3 has three levels, coded 1, 2, and 3.

• The AUTORECODE command creates NEWVAR1 containing recoded values of V1. Values of 3 are recoded to 1, and values of 6 are recoded to 2.

• A maximum value of 2 can then be specified on the VARIABLES subcommand as the maximum category value for both NEWVAR1 and V2. A maximum value of 3 is specified for V3.

Related Topics

PRINCALS
Overview (PRINCALS command)
Example (PRINCALS command)
ANALYSIS Subcommand (PRINCALS command)
NOBSERVATIONS Subcommand (PRINCALS command)
DIMENSION Subcommand (PRINCALS command)
MAXITER Subcommand (PRINCALS command)
CONVERGENCE Subcommand (PRINCALS command)
PRINT Subcommand (PRINCALS command)
PLOT Subcommand (PRINCALS command)
SAVE Subcommand (PRINCALS command)
MATRIX Subcommand (PRINCALS command)


ANALYSIS Subcommand (PRINCALS command)

ANALYSIS (subcommand),ANALYSIS (subcommand),ANALYSIS (subcommand)
PRINCALS command,PRINCALS command,PRINCALS command
PRINCALS (command),PRINCALS (command),PRINCALS (command)
ANALYSIS subcommand,ANALYSIS subcommand,ANALYSIS subcommand

ANALYSIS specifies the variables to be used in the computations and the optimal scaling level used by PRINCALS to quantify each variable or variable list.

• If ANALYSIS is not specified, an ordinal level of optimal scaling is assumed for all variables.

• The specification on ANALYSIS is a variable list and an optional keyword in parentheses to indicate the optimal scaling level.

• The variables on the variable list must also be specified on the VARIABLES subcommand.

• Variables listed on the VARIABLES subcommand but not on the ANALYSIS subcommand can still be used to label object scores on the PLOT subcommand.

The following keywords can be specified to indicate the optimal scaling level:

MNOM (keyword),MNOM (keyword),MNOM (keyword)
PRINCALS command,PRINCALS command,PRINCALS command
SNOM (keyword),SNOM (keyword),SNOM (keyword)
PRINCALS command,PRINCALS command,PRINCALS command
ORDI (keyword),ORDI (keyword),ORDI (keyword)
PRINCALS command,PRINCALS command,PRINCALS command
NUME (keyword),NUME (keyword),NUME (keyword)
PRINCALS command,PRINCALS command,PRINCALS command
MNOM | Multiple nominal. The quantifications can be different for each dimension. When all variables are multiple nominal, PRINCALS gives the same results as HOMALS.
SNOM | Single nominal. PRINCALS gives only one quantification for each category. Objects in the same category (cases with the same value on a variable) obtain the same quantification. When DIMENSION=1 and all variables are SNOM, this solution is the same as that of the first HOMALS dimension.
ORDI | Ordinal. This is the default for variables listed without optimal scaling levels and for all variables if the ANALYSIS subcommand is not used. The order of the categories of the observed variable is preserved in the quantified variable.
NUME | Numerical. This is the interval or ratio level of optimal scaling. PRINCALS assumes that the observed variable already has numerical values for its categories. When all variables are at the numerical level, the PRINCALS analysis is analogous to classical principal components analysis.

These keywords can apply to a variable list as well as to a single variable. Thus, the default ORDI is not applied to a variable without a keyword if a subsequent variable on the list has a keyword.

Related Topics

PRINCALS
Overview (PRINCALS command)
Example (PRINCALS command)
VARIABLES Subcommand (PRINCALS command)
NOBSERVATIONS Subcommand (PRINCALS command)
DIMENSION Subcommand (PRINCALS command)
MAXITER Subcommand (PRINCALS command)
CONVERGENCE Subcommand (PRINCALS command)
PRINT Subcommand (PRINCALS command)
PLOT Subcommand (PRINCALS command)
SAVE Subcommand (PRINCALS command)
MATRIX Subcommand (PRINCALS command)


NOBSERVATIONS Subcommand (PRINCALS command)

NOBSERVATIONS (subcommand),NOBSERVATIONS (subcommand),NOBSERVATIONS (subcommand)
PRINCALS command,PRINCALS command,PRINCALS command
PRINCALS (command),PRINCALS (command),PRINCALS (command)
NOBSERVATIONS subcommand,NOBSERVATIONS subcommand,NOBSERVATIONS subcommand

NOBSERVATIONS specifies how many cases are used in the analysis.

• If NOBSERVATIONS is not specified, all available observations in the active dataset are used.

• NOBSERVATIONS is followed by an integer indicating that the first n cases are to be used.

Related Topics

PRINCALS
Overview (PRINCALS command)
Example (PRINCALS command)
VARIABLES Subcommand (PRINCALS command)
ANALYSIS Subcommand (PRINCALS command)
DIMENSION Subcommand (PRINCALS command)
MAXITER Subcommand (PRINCALS command)
CONVERGENCE Subcommand (PRINCALS command)
PRINT Subcommand (PRINCALS command)
PLOT Subcommand (PRINCALS command)
SAVE Subcommand (PRINCALS command)
MATRIX Subcommand (PRINCALS command)


DIMENSION Subcommand (PRINCALS command)

DIMENSION (subcommand),DIMENSION (subcommand),DIMENSION (subcommand)
PRINCALS command,PRINCALS command,PRINCALS command
PRINCALS (command),PRINCALS (command),PRINCALS (command)
DIMENSION subcommand,DIMENSION subcommand,DIMENSION subcommand

DIMENSION specifies the number of dimensions that you want PRINCALS to compute.

• If you do not specify the DIMENSION subcommand, PRINCALS computes two dimensions.

• DIMENSION is followed by an integer indicating the number of dimensions.

• If all of the variables are SNOM (single nominal), ORDI (ordinal), or NUME (numerical), the maximum number of dimensions you can specify is the smaller of the number of observations minus 1 or the total number of variables.

• If some or all of the variables are MNOM (multiple nominal), the maximum number of dimensions is the smaller of the number of observations minus 1 or the total number of valid MNOM variable levels (categories) plus the number of SNOM, ORDI, and NUME variables, minus the number of MNOM variables without missing values.

• PRINCALS adjusts the number of dimensions to the maximum if the specified value is too large.

• The minimum number of dimensions is 1.

Related Topics

PRINCALS
Overview (PRINCALS command)
Example (PRINCALS command)
VARIABLES Subcommand (PRINCALS command)
ANALYSIS Subcommand (PRINCALS command)
NOBSERVATIONS Subcommand (PRINCALS command)
MAXITER Subcommand (PRINCALS command)
CONVERGENCE Subcommand (PRINCALS command)
PRINT Subcommand (PRINCALS command)
PLOT Subcommand (PRINCALS command)
SAVE Subcommand (PRINCALS command)
MATRIX Subcommand (PRINCALS command)


MAXITER Subcommand (PRINCALS command)

MAXITER (subcommand),MAXITER (subcommand),MAXITER (subcommand)
PRINCALS command,PRINCALS command,PRINCALS command
PRINCALS (command),PRINCALS (command),PRINCALS (command)
MAXITER subcommand,MAXITER subcommand,MAXITER subcommand

MAXITER specifies the maximum number of iterations PRINCALS can go through in its computations.

• If MAXITER is not specified, PRINCALS will iterate up to 100 times.

• MAXITER is followed by an integer indicating the maximum number of iterations allowed.

Related Topics

PRINCALS
Overview (PRINCALS command)
Example (PRINCALS command)
VARIABLES Subcommand (PRINCALS command)
ANALYSIS Subcommand (PRINCALS command)
NOBSERVATIONS Subcommand (PRINCALS command)
DIMENSION Subcommand (PRINCALS command)
CONVERGENCE Subcommand (PRINCALS command)
PRINT Subcommand (PRINCALS command)
PLOT Subcommand (PRINCALS command)
SAVE Subcommand (PRINCALS command)
MATRIX Subcommand (PRINCALS command)


CONVERGENCE Subcommand (PRINCALS command)

CONVERGENCE (subcommand),CONVERGENCE (subcommand),CONVERGENCE (subcommand)
PRINCALS command,PRINCALS command,PRINCALS command

CONVERGENCE specifies a convergence criterion value. PRINCALS stops iterating if the difference in total fit between the last two iterations is less than the CONVERGENCE value.

• If CONVERGENCE is not specified, the default value is 0.00001.

• The specification on CONVERGENCE is a convergence criterion value.

Related Topics

PRINCALS
Overview (PRINCALS command)
Example (PRINCALS command)
VARIABLES Subcommand (PRINCALS command)
ANALYSIS Subcommand (PRINCALS command)
NOBSERVATIONS Subcommand (PRINCALS command)
DIMENSION Subcommand (PRINCALS command)
MAXITER Subcommand (PRINCALS command)
PRINT Subcommand (PRINCALS command)
PLOT Subcommand (PRINCALS command)
SAVE Subcommand (PRINCALS command)
MATRIX Subcommand (PRINCALS command)


PRINT Subcommand (PRINCALS command)

PRINT (subcommand),PRINT (subcommand),PRINT (subcommand)
PRINCALS command,PRINCALS command,PRINCALS command
PRINCALS (command),PRINCALS (command),PRINCALS (command)
PRINT subcommand,PRINT subcommand,PRINT subcommand

PRINT controls which statistics are included in your output. The default output includes frequencies, eigenvalues, loadings, and summary measures of fit and loss.

PRINT is followed by one or more of the following keywords:

FREQ (keyword),FREQ (keyword),FREQ (keyword)
PRINCALS command,PRINCALS command,PRINCALS command
HISTORY (keyword),HISTORY (keyword),HISTORY (keyword)
PRINCALS command,PRINCALS command,PRINCALS command
EIGEN (keyword),EIGEN (keyword),EIGEN (keyword)
PRINCALS command,PRINCALS command,PRINCALS command
CORRELATION (keyword),CORRELATION (keyword),CORRELATION (keyword)
PRINCALS command,PRINCALS command,PRINCALS command
OBJECT (keyword),OBJECT (keyword),OBJECT (keyword)
PRINCALS command,PRINCALS command,PRINCALS command
QUANT (keyword),QUANT (keyword),QUANT (keyword)
PRINCALS command,PRINCALS command,PRINCALS command
LOADINGS (keyword),LOADINGS (keyword),LOADINGS (keyword)
PRINCALS command,PRINCALS command,PRINCALS command
DEFAULT (keyword),DEFAULT (keyword),DEFAULT (keyword)
PRINCALS command,PRINCALS command,PRINCALS command
ALL (keyword),ALL (keyword),ALL (keyword)
PRINCALS command,PRINCALS command,PRINCALS command
NONE (keyword),NONE (keyword),NONE (keyword)
PRINCALS command,PRINCALS command,PRINCALS command
FREQ | Marginal frequencies for the variables in the analysis.
HISTORY | History of the iterations.
EIGEN | Eigenvalues.
CORRELATION | Correlation matrix for the transformed variables in the analysis. No correlation matrix is produced if there are any missing data.
OBJECT | Object scores.
QUANT | Category quantifications and category coordinates for SNOM, ORDI, and NUME variables and category quantifications in each dimension for MNOM variables.
LOADINGS | Component loadings for SNOM, ORDI, and NUME variables.
DEFAULT | FREQ, EIGEN, LOADINGS, and QUANT.
ALL | All of the available statistics.
NONE | Summary measures of fit.

Related Topics

PRINCALS
Overview (PRINCALS command)
Example (PRINCALS command)
VARIABLES Subcommand (PRINCALS command)
ANALYSIS Subcommand (PRINCALS command)
NOBSERVATIONS Subcommand (PRINCALS command)
DIMENSION Subcommand (PRINCALS command)
MAXITER Subcommand (PRINCALS command)
CONVERGENCE Subcommand (PRINCALS command)
PLOT Subcommand (PRINCALS command)
SAVE Subcommand (PRINCALS command)
MATRIX Subcommand (PRINCALS command)


PLOT Subcommand (PRINCALS command)

PLOT (subcommand),PLOT (subcommand),PLOT (subcommand)
PRINCALS command,PRINCALS command,PRINCALS command
PRINCALS (command),PRINCALS (command),PRINCALS (command)
PLOT subcommand,PLOT subcommand,PLOT subcommand

PLOT can be used to produce plots of category quantifications, object scores, and component loadings.

• If PLOT is not specified, plots of the object scores and the quantifications are produced.

• No plots are produced for a one-dimensional solution.

PLOT is followed by one or more of the following keywords:

LOADINGS (keyword),LOADINGS (keyword),LOADINGS (keyword)
PRINCALS command,PRINCALS command,PRINCALS command
OBJECT (keyword),OBJECT (keyword),OBJECT (keyword)
PRINCALS command,PRINCALS command,PRINCALS command
QUANT (keyword),QUANT (keyword),QUANT (keyword)
PRINCALS command,PRINCALS command,PRINCALS command
DEFAULT (keyword),DEFAULT (keyword),DEFAULT (keyword)
PRINCALS command,PRINCALS command,PRINCALS command
NONE (keyword),NONE (keyword),NONE (keyword)
PRINCALS command,PRINCALS command,PRINCALS command
LOADINGS | Plots of the component loadings of SNOM, ORDI, and NUME variables.
OBJECT | Plots of the object scores.
QUANT | Plots of the category quantifications for MNOM variables and plots of the single-category coordinates for SNOM, ORDI, and NUME variables.
DEFAULT | QUANT and OBJECT.
ALL | All available plots.
NONE | No plots.
PRINCALS (command),PRINCALS (command),PRINCALS (command)
value labels,value labels,value labels
PRINCALS (command),PRINCALS (command),PRINCALS (command)
variable labels,variable labels,variable labels

• The keywords OBJECT and QUANT can each be followed by a variable list in parentheses to indicate that plots should be labeled with these variables. For QUANT, the variables must be specified on both the VARIABLES and ANALYSIS subcommands. For OBJECT, the variables must be specified on VARIABLES but need not appear on the ANALYSIS subcommand. This means that variables not included in the computations can still be used to label OBJECT plots. If the variable list is omitted, only the default plots are produced.

• Object scores plots labeled with variables that appear on the ANALYSIS subcommand use category labels corresponding to all categories within the defined range. Objects in a category that is outside the defined range are labeled with the label corresponding to the next category greater than the defined maximum category.

• Object scores plots labeled with variables not included on the ANALYSIS subcommand use all category labels, regardless of whether or not the category value is inside the defined range.

• All of the keywords except NONE can be followed by an integer in parentheses to indicate how many characters of the variable or value label are to be used on the plot. (If you specify a variable list after OBJECT or QUANT, you can specify the value in parentheses after the list.) The value can range from 1 to 20. If the value is omitted, 12 characters are used. Spaces between words count as characters.

• The LOADINGS plots and one of the QUANT plots use variable labels; all other plots that use labels use value labels.

• If a variable label is missing, the variable name is used for that variable. If a value label is missing, the actual value is used.

• You should make sure that your variable and value labels are unique by at least one letter in order to distinguish them on the plots.

• When points overlap, the points involved are described in a summary following the plot.

Example

PRINCALS VARIABLES COLA1 (4) COLA2 (4) COLA3 (4) COLA4 (2)
/ANALYSIS COLA1 COLA2 (SNOM) COLA3 (ORDI) COLA4 (ORDI)
/PLOT OBJECT(COLA4).

• Four variables are included in the analysis.

• OBJECT requests a plot of the object scores labeled with the values of COLA4. Any object whose COLA4 value is not 1 or 2 is labeled 3 (or the value label for category 3, if defined).

Example

PRINCALS VARIABLES COLA1 (4) COLA2 (4) COLA3 (4) COLA4 (2)
/ANALYSIS COLA1 COLA2 (SNOM) COLA3 (ORDI)
/PLOT OBJECT(COLA4).

• Three variables are included in the analysis.

• OBJECT requests a plot of the object scores labeled with the values of COLA4, a variable not included in the analysis. Objects are labeled using all values of COLA4.

In addition to the plot keywords, the following can be specified:

NDIM (keyword),NDIM (keyword),NDIM (keyword)
PRINCALS command,PRINCALS command,PRINCALS command
NDIM Dimension pairs to be plotted. NDIM is followed by a pair of values in parentheses. If NDIM is not specified, plots are produced for dimension 1 versus dimension 2.

• The first value indicates the dimension that is plotted against all higher dimensions. This value can be any integer from 1 to the number of dimensions minus 1.

• The second value indicates the highest dimension to be used in plotting the dimension pairs. This value can be any integer from 2 to the number of dimensions.

MAX (keyword),MAX (keyword),MAX (keyword)
PRINCALS command,PRINCALS command,PRINCALS command

• The keyword ALL can be used instead of the first value to indicate that all dimensions are paired with higher dimensions.

• The keyword MAX can be used instead of the second value to indicate that plots should be produced up to, and including, the highest dimension fit by the procedure.

Example

PRINCALS COLA1 COLA2 COLA3 COLA4 (4)
/PLOT NDIM(1,3) QUANT(5).

• The NDIM(1,3) specification indicates that plots should be produced for two dimension pairs—dimension 1 versus dimension 2 and dimension 1 versus dimension 3.

• QUANT requests plots of the category quantifications. The (5) specification indicates that the first five characters of the value labels are to be used on the plots.

Example

PRINCALS COLA1 COLA2 COLA3 COLA4 (4)
/PLOT NDIM(ALL,3) QUANT(5).

• This plot is the same as above except for the ALL specification following NDIM. This indicates that all possible pairs up to the second value should be plotted, so QUANT plots will be produced for dimension 1 versus dimension 2, dimension 2 versus dimension 3, and dimension 1 versus dimension 3.

Related Topics

PRINCALS
Overview (PRINCALS command)
Example (PRINCALS command)
VARIABLES Subcommand (PRINCALS command)
ANALYSIS Subcommand (PRINCALS command)
NOBSERVATIONS Subcommand (PRINCALS command)
DIMENSION Subcommand (PRINCALS command)
MAXITER Subcommand (PRINCALS command)
CONVERGENCE Subcommand (PRINCALS command)
PRINT Subcommand (PRINCALS command)
SAVE Subcommand (PRINCALS command)
MATRIX Subcommand (PRINCALS command)


SAVE Subcommand (PRINCALS command)

SAVE (subcommand),SAVE (subcommand),SAVE (subcommand)
PRINCALS command,PRINCALS command,PRINCALS command
PRINCALS (command),PRINCALS (command),PRINCALS (command)
SAVE subcommand,SAVE subcommand,SAVE subcommand

SAVE lets you add variables containing the object scores computed by PRINCALS to the active dataset.

DIMENSION (subcommand),DIMENSION (subcommand),DIMENSION (subcommand)
with SAVE subcommand,with SAVE subcommand,with SAVE subcommand

• If SAVE is not specified, object scores are not added to the active dataset.

• A variable rootname can be specified on the SAVE subcommand to which PRINCALS adds the number of the dimension. Only one rootname can be specified, and it can contain up to six characters.

• If a rootname is not specified, unique variable names are automatically generated. The variable names are PRIn_m, where n is a dimension number and m is a set number. If three dimensions are saved, the first set of names is PRI1_1, PRI2_1, and PRI3_1. If another PRINCALS is then run, the variable names for the second set are PRI1_2, PRI2_2, PRI3_2, and so on.

SAVE (subcommand),SAVE (subcommand),SAVE (subcommand)
with DIMENSION subcommand,with DIMENSION subcommand,with DIMENSION subcommand

• Following the name, the number of dimensions for which you want to save object scores can be listed in parentheses. The number cannot exceed the value of the DIMENSION subcommand.

SAVE (subcommand),SAVE (subcommand),SAVE (subcommand)
with MATRIX subcommand,with MATRIX subcommand,with MATRIX subcommand
MATRIX (subcommand),MATRIX (subcommand),MATRIX (subcommand)
with SAVE subcommand,with SAVE subcommand,with SAVE subcommand

• If the number of dimensions is not specified, the SAVE subcommand saves object scores for all dimensions.

• If you replace the active dataset by specifying an asterisk (*) on a MATRIX subcommand, the SAVE subcommand is not executed.

• The prefix should be unique for each PRINCALS command in the same session. If it is not, PRINCALS replaces the prefix with DIM, OBJ, or OBSAVE. If all of these already exist, SAVE is not executed.

Example

PRINCALS CAR1 CAR2 CAR3(5) PRICE (10)
/ANALYSIS=CAR1 TO CAR3(SNOM) PRICE(NUM)
/DIMENSIONS=3
/SAVE=DIM(2).

• Three nominal variables, CAR1, CAR2, and CAR3, each with five categories, and one numerical (interval level) variable, with ten categories, are analyzed in this PRINCALS example.

• The DIMENSIONS subcommand requests results for three dimensions.

• SAVE adds the object scores from the first two dimensions to the active dataset. The names of these new variables will be DIM00001 and DIM00002, respectively.

Related Topics

PRINCALS
Overview (PRINCALS command)
Example (PRINCALS command)
VARIABLES Subcommand (PRINCALS command)
ANALYSIS Subcommand (PRINCALS command)
NOBSERVATIONS Subcommand (PRINCALS command)
DIMENSION Subcommand (PRINCALS command)
MAXITER Subcommand (PRINCALS command)
CONVERGENCE Subcommand (PRINCALS command)
PRINT Subcommand (PRINCALS command)
PLOT Subcommand (PRINCALS command)
MATRIX Subcommand (PRINCALS command)


MATRIX Subcommand (PRINCALS command)

MATRIX (subcommand),MATRIX (subcommand),MATRIX (subcommand)
PRINCALS command,PRINCALS command,PRINCALS command
PRINCALS (command),PRINCALS (command),PRINCALS (command)
MATRIX subcommand,MATRIX subcommand,MATRIX subcommand

The MATRIX subcommand is used to write category quantifications, single-category coordinates, and component loadings to a matrix data file.

• The specification on MATRIX is the keyword OUT and a quoted file specification of previously declared dataset name (DATASET DECLARE command), enclosed in parentheses.

• You can specify an asterisk (*) instead of a file to replace the active dataset .

• The category quantifications, coordinates, and component loadings are written to the same file.

• The matrix data file has one case for each value of each original variable.

The variables of the matrix data file and their values are:

ROWTYPE_ variable,ROWTYPE_ variable,ROWTYPE_ variable
PRINCALS command,PRINCALS command,PRINCALS command
LEVEL variable,LEVEL variable,LEVEL variable
PRINCALS command,PRINCALS command,PRINCALS command
VARNAME_ variable,VARNAME_ variable,VARNAME_ variable
PRINCALS command,PRINCALS command,PRINCALS command
VARTYPE_ variable,VARTYPE_ variable,VARTYPE_ variable
PRINCALS command,PRINCALS command,PRINCALS command
DIM variable,DIM variable,DIM variable
PRINCALS command,PRINCALS command,PRINCALS command
ROWTYPE_ | String variable rowtype_ containing value QUANT for the category quantifications, SCOOR_ for single-category coordinates, MCOOR_ for multiple-category coordinates, and LOADING_ for the component scores.
LEVEL | String variable containing the values (or value labels if present) of each original variable for category quantifications. For cases with ROWTYPE_=LOADING_, the value of LEVEL is blank.
VARNAME_ | String variable containing the original variable names.
VARTYPE_ | String variable containing values MULTIPLE, SINGLE N, ORDINAL, or NUMERICAL, depending on the optimal scaling level specified for the variable.
DIM1...DIMn | Numeric variables containing category quantifications, the single-category coordinates, and component loadings for each dimension. Each variable is labeled DIMn, where n represents the dimension number. The single-category coordinates and component loadings are written only for SNOM, ORDI, and NUME variables.

Related Topics

PRINCALS
Overview (PRINCALS command)
Example (PRINCALS command)
VARIABLES Subcommand (PRINCALS command)
ANALYSIS Subcommand (PRINCALS command)
NOBSERVATIONS Subcommand (PRINCALS command)
DIMENSION Subcommand (PRINCALS command)
MAXITER Subcommand (PRINCALS command)
CONVERGENCE Subcommand (PRINCALS command)
PRINT Subcommand (PRINCALS command)
PLOT Subcommand (PRINCALS command)
SAVE Subcommand (PRINCALS command)


PRINT

printing cases,printing cases,printing cases
PRINT (command),PRINT (command),PRINT (command)
PRINT (command),PRINT (command),PRINT (command)
syntax chart,syntax chart,syntax chart
PRINT [OUTFILE=file] [ENCODING='encoding specification']
  [RECORDS={1}] [{NOTABLE}]
           {n}   {TABLE  }

 /{1    } varlist [{col location [(format)]}] [varlist...]
  {rec #}          {(format list)          }
                   {*                      }

 [/{2    }...]
   {rec #}

This command does not read the active dataset. It is stored, pending execution with the next command that reads the dataset. See the topic Command Order for more information.

Release History Collapse Hide details

Release History

Release 16.0

• ENCODING subcommand added for Unicode support.

Example

PRINT / MOHIRED YRHIRED DEPT SALARY NAME.

Related Topics

Overview (PRINT command)
Examples (PRINT command)
Formats (PRINT command)
Strings (PRINT command)
RECORDS Subcommand (PRINT command)
OUTFILE Subcommand (PRINT command)
ENCODING Subcommand (PRINT command)
TABLE Subcommand (PRINT command)


Overview (PRINT command)

PRINT (command),PRINT (command),PRINT (command)
formats,formats,formats
printing cases,printing cases,printing cases
formats,formats,formats
printing cases,printing cases,printing cases
strings,strings,strings
PRINT (command),PRINT (command),PRINT (command)
strings,strings,strings
printing cases,printing cases,printing cases
output file,output file,output file
printing cases,printing cases,printing cases
summary table,summary table,summary table
PRINT (command),PRINT (command),PRINT (command)
variable list,variable list,variable list
ALL (keyword),ALL (keyword),ALL (keyword)
PRINT command,PRINT command,PRINT command
SET (command),SET (command),SET (command)
with PRINT command,with PRINT command,with PRINT command
PRINT (command),PRINT (command),PRINT (command)
with SET command,with SET command,with SET command
PRINT (command),PRINT (command),PRINT (command)
missing values,missing values,missing values
printing cases,printing cases,printing cases
missing values,missing values,missing values

PRINT displays the values of variables for each case in the data. PRINT is simple enough for a quick check on data definitions and transformations and flexible enough for formatting simple reports.

Options Collapse Hide details

Options

Formats. You can specify formats for the variables (see Formats).

Strings. You can specify string values within the variable specifications. The strings can be used to label values or to create extra space between values. Strings can also be used as column headings. (See Strings.)

Output File. You can use the OUTFILE subcommand to direct the output to a specified file.

Summary Table. You can use the TABLE subcommand to display a table that summarizes variable formats.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is a slash followed by a variable list. The output displays values for all variables that are named on the list.

Subcommand Order Collapse Hide details

Subcommand Order

Subcommands can be specified in any order. However, all subcommands must be specified before the slash that precedes the start of the variable specifications.

Syntax Rules Collapse Hide details

Syntax Rules

• A slash must precede the variable specifications. The first slash begins the definition of the first (and possibly only) line per case of the PRINT display.

• Specified variables must already exist, but they can be numeric, string, scratch, temporary, or system variables. Subscripted variable names, such as X(1) for the first element in vector X, cannot be used.

• Keyword ALL can be used to display the values of all user-defined variables in the active dataset.

Operations Collapse Hide details

Operations

• PRINT is executed once for each case that is constructed from the data file.

• PRINT is a transformation and is not executed unless it is followed by a procedure or the EXECUTE command.

• Because PRINT is a transformation command, the output might be mixed with casewise procedure output. Procedures that produce individual case listings (such as LIST) should not be used immediately after PRINT. An intervening EXECUTE or procedure command should be specified.

• Values are displayed with a blank space between them. However, if a format is specified for a variable, the blank space for that variable’s values is suppressed.

• Values are displayed in the output as the data are read. The PRINT output appears before the output from the first procedure.

• If more variables are specified than can be displayed in 132 columns or within the width that is specified on SET WIDTH, the program displays an error message. You must reduce the number of variables or split the output into several records.

• User-missing values are displayed exactly like valid values. System-missing values are represented by a period.

Related Topics

PRINT
Examples (PRINT command)
Formats (PRINT command)
Strings (PRINT command)
RECORDS Subcommand (PRINT command)
OUTFILE Subcommand (PRINT command)
ENCODING Subcommand (PRINT command)
TABLE Subcommand (PRINT command)


Examples (PRINT command)

Displaying Values for a Selected List of Variables

PRINT  / MOHIRED YRHIRED DEPT SALARY NAME.
FREQUENCIES VARIABLES=DEPT.

• PRINT displays values for each variable on the variable list. The FREQUENCIES procedure reads the data and causes PRINT to be executed.

• All variables are displayed by using their dictionary formats. One blank space separates the values of each variable.

Displaying Values for All User-Defined Variables

PRINT /ALL.
EXECUTE.

• PRINT displays values for all user-defined variables in the active dataset. The EXECUTE command executes PRINT.

Related Topics

PRINT
Overview (PRINT command)
Formats (PRINT command)
Strings (PRINT command)
RECORDS Subcommand (PRINT command)
OUTFILE Subcommand (PRINT command)
ENCODING Subcommand (PRINT command)
TABLE Subcommand (PRINT command)


Formats (PRINT command)

PRINT (command),PRINT (command),PRINT (command)
formats,formats,formats
printing cases,printing cases,printing cases
formats,formats,formats

By default, PRINT uses the dictionary print formats. You can specify formats for some or all variables that are specified on PRINT. For a string variable, the specified format must have a width at least as large as the width of the dictionary format. String values are truncated if the specified width is smaller than the width of the dictionary format.

• Format specifications can be either column-style or FORTRAN-like (see DATA LIST). The column location that is specified with column-style formats or that is implied with FORTRAN-like formats refers to the column in which the variable will be displayed.

• A format specification following a list of variables applies to all variables in the list. Use an asterisk to prevent the specified format from applying to variables that precede the asterisk. The specification of column locations implies a default print format, and that format applies to all previous variables if no asterisk is used.

• Printable numeric formats are F, COMMA, DOLLAR, CC, DOT, N, E, PCT, PIBHEX, RBHEX, Z, and the date and time formats. Printable string formats are A and AHEX. Note that hex and binary formats use different widths. For example, the AHEX format must have a width that is twice the width of the corresponding A format. For more information about specifying formats and more information about the available formats, see DATA LIST and Variable Formats.

• Format specifications are in effect only for the PRINT command. The specifications do not change the dictionary print formats.

• When a format is specified for a variable, the automatic blank following the variable in the output is suppressed. To preserve the blank between variables, use a string (see Strings), specify blank columns in the format, or use an X or T format element (see DATA LIST for information about X and T).

Example

PRINT / TENURE (F2.0) ' ' MOHIRED YRHIRED DEPT *
        SALARY85 TO SALARY88 (4(DOLLAR8,1X)) NAME.
EXECUTE.

• Format F2.0 is specified for TENURE. A blank string is specified after TENURE because the automatic blank following the variable is suppressed by the format specification.

• MOHIRED, YRHIRED, and DEPT are displayed with default formats because the asterisk prevents them from receiving the DOLLAR8 format that is specified for SALARY85 to SALARY88. The automatic blank is preserved for MOHIRED, YRHIRED, and DEPT, but the blank is suppressed for SALARY85 to SALARY88 by the format specification. The 1X format element is therefore specified with DOLLAR8 to add one blank after each value of SALARY85 to SALARY88.

• NAME uses the default dictionary format.

Related Topics

PRINT
Overview (PRINT command)
Examples (PRINT command)
Strings (PRINT command)
RECORDS Subcommand (PRINT command)
OUTFILE Subcommand (PRINT command)
ENCODING Subcommand (PRINT command)
TABLE Subcommand (PRINT command)


Strings (PRINT command)

PRINT (command),PRINT (command),PRINT (command)
strings,strings,strings
printing cases,printing cases,printing cases
strings,strings,strings

You can specify string values within the variable list. Strings must be enclosed in quotes.

• If a format is specified for a variable list, the application of the format is interrupted by a specified string. Thus, the string has the same effect within a variable list as an asterisk.

PRINT (command),PRINT (command),PRINT (command)
with DO IF command,with DO IF command,with DO IF command
DO IF (command),DO IF (command),DO IF (command)
with PRINT command,with PRINT command,with PRINT command

• Strings can be used to create column headings for the displayed variables. The PRINT command that specifies the column headings must be used within a DO IF-END IF structure. If you want the column headings to begin a new page in the output, use a PRINT EJECT command (rather than PRINT) to specify the headings (see PRINT EJECT).

Including Strings in the Output

PRINT / NAME 'HIRED=' MOHIRED(F2) '/' YRHIRED
             '  SALARY=' SALARY (DOLLAR8).
EXECUTE.

• Three strings are specified. The strings HIRED= and SALARY= label the values being displayed. The slash that is specified between MOHIRED and YRHIRED creates a composite hiring date. The F2 format is supplied for variable MOHIRED in order to suppress the blank that would follow it if the dictionary format were used.

• NAME and YRHIRED are displayed with default formats. The 'HIRED=' specification prevents the F2 format from applying to NAME, and the 'SALARY=' specification prevents the DOLLAR8 format from applying to YRHIRED.

Setting Up Column Headers

DO IF $CASENUM EQ 1.
PRINT /'   NAME ' 1 'DEPT' 25 'HIRED' 30 '  SALARY' 35.
END IF.
PRINT / NAME DEPT *
        MOHIRED 30-31 '/' YRHIRED *
        SALARY 35-42(DOLLAR).
EXECUTE.

• The first PRINT command specifies strings only. The integer after each string specifies the beginning column number of the string. The strings will be used as column headings for the variables. DO IF $CASENUM EQ 1 causes the first PRINT command to be executed only once, as the first case is processed. END IF closes the structure.

• The second PRINT command specifies the variables to be displayed. This command is executed once for each case in the data. Column locations are specified to align the values with the column headings. In this example, the T format element could also have been used to align the variables and the column headings. For example, MOHIRED (T30,F2) begins the display of values for variable MOHIRED in column 30.

• The asterisk after DEPT prevents the format that is specified for MOHIRED from applying to NAME and DEPT. The asterisk after YRHIRED prevents the format that is specified for SALARY from applying to YRHIRED.

Related Topics

PRINT
Overview (PRINT command)
Examples (PRINT command)
Formats (PRINT command)
RECORDS Subcommand (PRINT command)
OUTFILE Subcommand (PRINT command)
ENCODING Subcommand (PRINT command)
TABLE Subcommand (PRINT command)


RECORDS Subcommand (PRINT command)

RECORDS (subcommand),RECORDS (subcommand),RECORDS (subcommand)
PRINT command,PRINT command,PRINT command
PRINT (command),PRINT (command),PRINT (command)
RECORDS subcommand,RECORDS subcommand,RECORDS subcommand
printing cases,printing cases,printing cases
number of records,number of records,number of records

RECORDS indicates the total number of lines that are displayed per case. The number that is specified on RECORDS is informational only. The actual specification that causes variables to be displayed on a new line is a slash within the variable specifications. Each new line is requested by another slash.

• RECORDS must be specified before the slash that precedes the start of the variable specifications.

• The only specification on RECORDS is an integer to indicate the number of records for the output. If the number does not agree with the actual number of records that are indicated by slashes, the program issues a warning and ignores the specification on RECORDS.

• Specifications for each line of output must begin with a slash. An integer can follow the slash, indicating the line on which values are to be displayed. The integer is informational only and cannot be used to rearrange the order of records in the output. If the integer does not agree with the actual record number that is indicated by the number of slashes in the variable specifications, the integer is ignored.

• A slash that is not followed by a variable list generates a blank line in the output.

Examples

PRINT RECORDS=3 /EMPLOYID NAME DEPT
                /EMPLOYID TENURE SALARY
                /.
EXECUTE.

• PRINT displays the values of an individual’s name and department on one line, displays tenure and salary on the next line, and displays the employee identification number on both lines, followed by a blank third line. Two lines are displayed for each case, and cases in the output are separated by a blank line.

PRINT RECORDS=3 /1 EMPLOYID NAME DEPT
                /2 EMPLOYID TENURE SALARY
                /3.

• This PRINT command is equivalent to the command in the preceding example.

PRINT / EMPLOYID NAME DEPT / EMPLOYID TENURE SALARY /.

• This PRINT command is equivalent to the commands in the two preceding examples.

Related Topics

PRINT
Overview (PRINT command)
Examples (PRINT command)
Formats (PRINT command)
Strings (PRINT command)
OUTFILE Subcommand (PRINT command)
ENCODING Subcommand (PRINT command)
TABLE Subcommand (PRINT command)


OUTFILE Subcommand (PRINT command)

PRINT (command),PRINT (command),PRINT (command)
OUTFILE subcommand,OUTFILE subcommand,OUTFILE subcommand
OUTFILE (subcommand),OUTFILE (subcommand),OUTFILE (subcommand)
PRINT command,PRINT command,PRINT command
printing cases,printing cases,printing cases
output file,output file,output file

OUTFILE specifies a file for the output from the PRINT command. By default, PRINT output is included with the rest of the output from the session.

• OUTFILE must be specified before the slash that precedes the start of the variable specifications.

• The output from PRINT cannot exceed 132 characters, even if the external file is defined with a longer record length.

Example

PRINT OUTFILE=PRINTOUT
   /1 EMPLOYID DEPT SALARY /2 NAME.
EXECUTE.

• OUTFILE specifies PRINTOUT as the file that receives the PRINT output.

Related Topics

PRINT
Overview (PRINT command)
Examples (PRINT command)
Formats (PRINT command)
Strings (PRINT command)
RECORDS Subcommand (PRINT command)
ENCODING Subcommand (PRINT command)
TABLE Subcommand (PRINT command)


ENCODING Subcommand (PRINT command)

PRINT (command),PRINT (command),PRINT (command)
ENCODING subcommand,ENCODING subcommand,ENCODING subcommand
ENCODING (subcommand),ENCODING (subcommand),ENCODING (subcommand)
PRINT command,PRINT command,PRINT command

ENCODING specifies the encoding format of the file. The keyword is followed by an equals sign and a quoted encoding specification.

• In Unicode mode, the default is UTF8. For more information, see SET command, UNICODE subcommand.

• In code page mode, the default is the current locale setting. For more information, see SET command, LOCALE subcommand.

• The quoted encoding value can be: Locale (the current locale setting), UTF8, UTF16, UTF16BE (big endian), UTF16LE (little endian), a numeric Windows code page value (for example, '1252'), or an IANA code page value (for example, 'iso8859-1' or cp1252).

• If there is no OUTFILE subcommand, the ENCODING subcommand is ignored.

Related Topics

PRINT
Overview (PRINT command)
Examples (PRINT command)
Formats (PRINT command)
Strings (PRINT command)
RECORDS Subcommand (PRINT command)
OUTFILE Subcommand (PRINT command)
TABLE Subcommand (PRINT command)


TABLE Subcommand (PRINT command)

PRINT (command),PRINT (command),PRINT (command)
TABLE subcommand,TABLE subcommand,TABLE subcommand
PRINT (command),PRINT (command),PRINT (command)
NOTABLE subcommand,NOTABLE subcommand,NOTABLE subcommand
TABLE (subcommand),TABLE (subcommand),TABLE (subcommand)
PRINT command,PRINT command,PRINT command
NOTABLE (subcommand),NOTABLE (subcommand),NOTABLE (subcommand)
PRINT command,PRINT command,PRINT command
printing cases,printing cases,printing cases
summary table,summary table,summary table

TABLE requests a table that shows how the variable information is formatted. NOTABLE, which suppresses the format table, is the default.

• TABLE must be specified before the slash that precedes the start of the variable specifications.

Example

PRINT TABLE /1 EMPLOYID DEPT SALARY /2  NAME.
EXECUTE.

• TABLE requests a summary table that describes the PRINT specifications. The table is included with the PRINT output.

Related Topics

PRINT
Overview (PRINT command)
Examples (PRINT command)
Formats (PRINT command)
Strings (PRINT command)
RECORDS Subcommand (PRINT command)
OUTFILE Subcommand (PRINT command)
ENCODING Subcommand (PRINT command)


PRINT EJECT

printing cases,printing cases,printing cases
page ejection,page ejection,page ejection
printing cases,printing cases,printing cases
column headings,column headings,column headings
page ejection,page ejection,page ejection
column headings,column headings,column headings
column headings,column headings,column headings
See also page ejection,See also page ejection,See also page ejection
PRINT EJECT (command),PRINT EJECT (command),PRINT EJECT (command)
PRINT EJECT (command),PRINT EJECT (command),PRINT EJECT (command)
syntax chart,syntax chart,syntax chart
PRINT EJECT [OUTFILE='file'] [ENCODING='encoding specification']
  [RECORDS={1}] [{NOTABLE}]
           {n}   {TABLE  }

  /{1    } varlist [{col location [(format)]}] [varlist...]
   {rec #}          {(format list)          }
                    {*                      }

 [/{2    }...]
   {rec #}

This command does not read the active dataset. It is stored, pending execution with the next command that reads the dataset. See the topic Command Order for more information.

Release History Collapse Hide details

Release History

Release 16.0

• ENCODING subcommand added for Unicode support.

Example

DO IF $CASENUM EQ 1.
PRINT EJECT /'   NAME ' 1 'DEPT' 25 'HIRED' 30 '  SALARY' 35.
END IF.
PRINT / NAME DEPT *
        MOHIRED(T30,F2) '/' YRHIRED *
        SALARY (T35,DOLLAR8).
EXECUTE.

Related Topics

Overview (PRINT EJECT command)
Examples (PRINT EJECT command)


Overview (PRINT EJECT command)

page ejection,page ejection,page ejection
variable list,variable list,variable list
SET (command),SET (command),SET (command)
with PRINT EJECT command,with PRINT EJECT command,with PRINT EJECT command
PRINT EJECT (command),PRINT EJECT (command),PRINT EJECT (command)
with SET command,with SET command,with SET command
page ejection,page ejection,page ejection
missing values,missing values,missing values
PRINT EJECT (command),PRINT EJECT (command),PRINT EJECT (command)
missing values,missing values,missing values
DO IF (command),DO IF (command),DO IF (command)
with PRINT EJECT command,with PRINT EJECT command,with PRINT EJECT command
PRINT EJECT (command),PRINT EJECT (command),PRINT EJECT (command)
with DO IF command,with DO IF command,with DO IF command

PRINT EJECT displays specified information at the top of a new page of the output. Each time that it is executed, PRINT EJECT causes a page ejection. If not used in a DO IF-END IF structure, PRINT EJECT is executed for each case in the data, and each case is displayed on a separate page.

PRINT (command),PRINT (command),PRINT (command)
with PRINT EJECT command,with PRINT EJECT command,with PRINT EJECT command
PRINT EJECT (command),PRINT EJECT (command),PRINT EJECT (command)
with PRINT command,with PRINT command,with PRINT command

PRINT EJECT is designed to be used with the PRINT command to insert titles and column headings above the values that are displayed by PRINT. PRINT can also generate titles and headings, but PRINT cannot be used to control page ejections.

PRINT EJECT and PRINT can be used for writing simple reports.

Options Collapse Hide details

Options

The options that are available for PRINT EJECT are identical to the options that are available for PRINT:

• You can specify formats for the variables.

• You can specify string values within the variable specifications. With PRINT EJECT, the strings are usually used as titles or column headings and often include a specification for column location.

• You can use the RECORDS subcommand to display each case on more than one line.

• You can use the OUTFILE subcommand to direct the output to a specified file.

• You can use the TABLE subcommand to display a table that summarizes variable formats.

• You can use ENCODING to specify the file encoding. If there is no OUTFILE subcommand, the ENCODING subcommand is ignored.

For additional information, refer to PRINT.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is a slash followed by a variable list and/or a list of string values that will be used as column headings or titles. The values for each variable or string are displayed on the top line of a new page in the output. PRINT EJECT is usually used within a DO IF-END IF structure to control the page ejections.

Operations Collapse Hide details

Operations

• PRINT EJECT is a transformation and is not executed unless it is followed by a procedure or the EXECUTE command.

• If not used within a DO IF-END IF structure, PRINT EJECT is executed for each case in the data and displays the values for each case on a separate page.

• Values are displayed with a blank space between them. However, if a format is specified for a variable, the blank space for that variable’s values is suppressed.

• Values are displayed in the output as the data are read. The PRINT output appears before the output from the first procedure.

• If more variables are specified than can be displayed in 132 columns or within the width that is specified on SET WIDTH, the program displays an error message. You must reduce the number of variables or split the output into several records.

• User-missing values are displayed exactly like valid values. System-missing values are represented by a period.

Related Topics

PRINT EJECT
Examples (PRINT EJECT command)


Examples (PRINT EJECT command)

PRINT EJECT (command),PRINT EJECT (command),PRINT EJECT (command)
$CASENUM system variable,$CASENUM system variable,$CASENUM system variable
$CASENUM (system variable),$CASENUM (system variable),$CASENUM (system variable)
PRINT EJECT command,PRINT EJECT command,PRINT EJECT command

Displaying Column Headings on the First Output Page Only

DO IF $CASENUM EQ 1.
PRINT EJECT /'   NAME ' 1 'DEPT' 25 'HIRED' 30 '  SALARY' 35.
END IF.
PRINT / NAME DEPT *
        MOHIRED(T30,F2) '/' YRHIRED *
        SALARY (T35,DOLLAR8).
EXECUTE.

• PRINT EJECT specifies strings to be used as column headings and causes a page ejection. DO IF-END IF causes the PRINT EJECT command to be executed only once, when the system variable $CASENUM equals 1 (the value that is assigned to the first case in the file). Thus, column headings are displayed on the first page of the output only. The next example shows how to display column headings at the top of every page of the output.

• If a PRINT command were used in place of PRINT EJECT, the column headings would begin immediately after the command printback.

Displaying Column Headings on Each Output Page

DO IF MOD($CASENUM,50) = 1.
PRINT  EJECT  FILE=OUT /'   NAME ' 1 'DEPT' 25 'HIRED' 30 '  SALARY' 35.
END IF.
PRINT FILE=OUT / NAME DEPT *
        MOHIRED 30-31 '/' YRHIRED *
        SALARY 35-42(DOLLAR).
EXECUTE.

• In this example, DO IF specifies that PRINT EJECT is executed if MOD (the remainder) of $CASENUM divided by 50 equals 1 (see Arithmetic Functions for information about the MOD function). Thus, column headings are displayed on a new page after every 50th case.

• If PRINT were used instead of PRINT EJECT, column headings would be displayed after every 50th case but would not appear at the top of a new page.

• Both PRINT EJECT and PRINT specify the same file for the output. If the FILE subcommands on PRINT EJECT and PRINT do not specify the same file, the column headings and the displayed values end up in different files.

Related Topics

PRINT EJECT
Overview (PRINT EJECT command)


PRINT FORMATS

output formats,output formats,output formats
display formats,display formats,display formats
numeric data,numeric data,numeric data
output formats,output formats,output formats
PRINT FORMATS (command),PRINT FORMATS (command),PRINT FORMATS (command)
PRINT FORMATS (command),PRINT FORMATS (command),PRINT FORMATS (command)
syntax chart,syntax chart,syntax chart
PRINT FORMATS varlist(format) [varlist...]

This command takes effect immediately. It does not read the active dataset or execute pending transformations. See the topic Command Order for more information.

Example

PRINT FORMATS SALARY (DOLLAR8) / HOURLY (DOLLAR7.2)
           / RAISE BONUS (PCT2).

Related Topics

Overview (PRINT FORMATS command)
Examples (PRINT FORMATS command)


Overview (PRINT FORMATS command)

output formats,output formats,output formats
format specification,format specification,format specification
PRINT FORMATS (command),PRINT FORMATS (command),PRINT FORMATS (command)
format specification,format specification,format specification
output formats,output formats,output formats
custom currency,custom currency,custom currency
string variables,string variables,string variables
output formats,output formats,output formats
PRINT FORMATS (command),PRINT FORMATS (command),PRINT FORMATS (command)
string variables,string variables,string variables
output formats,output formats,output formats
displaying,displaying,displaying
PRINT FORMATS (command),PRINT FORMATS (command),PRINT FORMATS (command)
with DISPLAY command,with DISPLAY command,with DISPLAY command
DISPLAY (command),DISPLAY (command),DISPLAY (command)
with PRINT FORMATS command,with PRINT FORMATS command,with PRINT FORMATS command

PRINT FORMATS changes variable print formats. Print formats are output formats and control the form in which values are displayed by a procedure or by the PRINT command.

PRINT FORMATS changes only print formats. To change write formats, use the WRITE FORMATS command. To change both the print and write formats with a single specification, use the FORMATS command. For information about assigning input formats during data definition, see DATA LIST. See the topic Variable Types and Formats for more information.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is a variable list followed by the new format specification in parentheses. All specified variables receive the new format.

Syntax Rules Collapse Hide details

Syntax Rules

• You can specify more than one variable or variable list, followed by a format in parentheses. Only one format can be specified after each variable list. For clarity, each set of specifications can be separated by a slash.

• You can use keyword TO to refer to consecutive variables in the active dataset.

• The specified width of a format must include enough positions to accommodate any punctuation characters, such as decimal points, commas, dollar signs, or date and time delimiters. (This situation differs from assigning an input format on DATA LIST, where the program automatically expands the input format to accommodate punctuation characters in output.)

• Custom currency formats (CCw, CCw.d) must first be defined on the SET command before they can be used on PRINT FORMATS.

• For string variables, you can only use PRINT FORMATS to switch between A and AHEX formats. PRINT FORMATS cannot be used to change the length of string variables. To change the defined length of a string variable, use the ALTER TYPE command.

Operations Collapse Hide details

Operations

• Unlike most transformations, PRINT FORMATS takes effect as soon as it is encountered in the command sequence. Special attention should be paid to the position of PRINT FORMATS among commands.

• Variables that are not specified on PRINT FORMATS retain their current print formats in the active dataset. To see the current formats, use the DISPLAY command.

• The new print formats are changed only in the active dataset and are in effect for the duration of the session or until changed again with a PRINT FORMATS or FORMATS command. Print formats in the original data file (if this file exists) are not changed, unless the file is resaved with the SAVE or XSAVE command.

• New numeric variables that are created with transformation commands are assigned default print formats of F8.2 (or the format that is specified on the FORMAT subcommand of SET). The FORMATS command can be used to change the new variable’s print formats.

• New string variables that are created with transformation commands are assigned the format that is specified on the STRING command that declares the variable. PRINT FORMATS cannot be used to change the format of a new string variable.

• If a numeric data value exceeds its width specification, the program still attempts to display some value. First, the program rounds decimal values, then removes punctuation characters, and then tries scientific notation. Finally, if there is still not enough space, the program produces asterisks indicating that a value is present but cannot be displayed in the assigned width.

Related Topics

PRINT FORMATS
Examples (PRINT FORMATS command)


Examples (PRINT FORMATS command)

Basic Example

PRINT FORMATS SALARY (DOLLAR8) / HOURLY (DOLLAR7.2)
           / RAISE BONUS (PCT2).

• The print format for SALARY is changed to DOLLAR with eight positions, including the dollar sign and comma when appropriate. The value 11550 is displayed as $11,550. An eight-digit number requires a DOLLAR11 format specification: eight characters for digits, two characters for commas, and one character for the dollar sign.

• The print format for HOURLY is changed to DOLLAR with seven positions, including the dollar sign, decimal point, and two decimal places. The number 115 is displayed as $115.00. If DOLLAR6.2 had been specified, the value 115 would be displayed as $115.0. The program would truncate the last 0 because a width of 6 is not enough to display the full value.

• The print format for both RAISE and BONUS is changed to PCT with two positions: one position for the percentage and one position for the percent sign. The value 9 is displayed as 9%. Because the width allows for only two positions, the value 10 is displayed as 10.

Changing Default Formats

COMPUTE V3=V1 + V2.
PRINT FORMATS V3 (F3.1).

• COMPUTE creates the new numeric variable V3. By default, V3 is assigned an F8.2 format (or the default format that is specified on SET).

• PRINT FORMATS changes the print format for V3 to F3.1.

Working With Custom Currency Formats

SET CCA='-/-.Dfl ..-'.
PRINT FORMATS COST (CCA14.2).

• SET defines a European currency format for the custom currency format type CCA.

• PRINT FORMATS assigns the print format CCA to variable COST. With the format defined for CCA on SET, the value 37419 is displayed as Dfl’37.419,00. See the SET command for more information about custom currency formats.

Related Topics

PRINT FORMATS
Overview (PRINT FORMATS command)


PRINT SPACE

blank lines,blank lines,blank lines
displaying,displaying,displaying
printing cases,printing cases,printing cases
displaying blank lines,displaying blank lines,displaying blank lines
printing cases,printing cases,printing cases
PRINT SPACE (command),PRINT SPACE (command),PRINT SPACE (command)
PRINT SPACE (command),PRINT SPACE (command),PRINT SPACE (command)
syntax chart,syntax chart,syntax chart
PRINT SPACE [OUTFILE='file'] [ENCODING='encoding specification']
  [numeric expression]

This command does not read the active dataset. It is stored, pending execution with the next command that reads the dataset. See the topic Command Order for more information.

Release History Collapse Hide details

Release History

Release 16.0

• ENCODING subcommand added for Unicode support.

Example

PRINT SPACE.

Related Topics

Overview (PRINT SPACE command)
Examples (PRINT SPACE command)


Overview (PRINT SPACE command)

PRINT SPACE (command),PRINT SPACE (command),PRINT SPACE (command)
number of lines,number of lines,number of lines
printing cases,printing cases,printing cases
output file,output file,output file
OUTFILE (subcommand),OUTFILE (subcommand),OUTFILE (subcommand)
PRINT SPACE command,PRINT SPACE command,PRINT SPACE command
PRINT SPACE (command),PRINT SPACE (command),PRINT SPACE (command)
OUTFILE subcommand,OUTFILE subcommand,OUTFILE subcommand
DO IF (command),DO IF (command),DO IF (command)
PRINT SPACE command,PRINT SPACE command,PRINT SPACE command
PRINT SPACE (command),PRINT SPACE (command),PRINT SPACE (command)
DO IF command,DO IF command,DO IF command

PRINT SPACE displays blank lines in the output and is generally used with a PRINT or WRITE command. Because PRINT SPACE displays a blank line each time that the command is executed, it is often used in a DO IF-END IF structure.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is the command PRINT SPACE.

Syntax Rules Collapse Hide details

Syntax Rules

• To display more than one blank line, specify a numeric expression after PRINT SPACE. The expression can be an integer or a complex expression.

• OUTFILE directs the output to a specified file. OUTFILE should be specified if an OUTFILE subcommand is specified on the PRINT or WRITE command that is used with PRINT SPACE. The OUTFILE subcommand on PRINT SPACE and PRINT or WRITE should specify the same file.

• ENCODING specifies the encoding for the output file. If there is no OUTFILE subcommand, the ENCODING subcommand is ignored.

Operations Collapse Hide details

Operations

• If not used in a DO IF-END IF structure, PRINT SPACE is executed for each case in the data and displays a blank line for every case.

Related Topics

PRINT SPACE
Examples (PRINT SPACE command)


Examples (PRINT SPACE command)

Inserting a Blank Line after the Output for Each Case

PRINT / NAME DEPT82 *
        MOHIRED(T30,F2) '/' YRHIRED *
        SALARY82 (T35,DOLLAR8).
PRINT SPACE.
EXECUTE.

• Each time that it is executed, PRINT SPACE displays one blank line. Because PRINT SPACE is not used in a DO IF-END IF structure, PRINT SPACE is executed once for each case. In effect, the output is double-spaced.

Using PRINT SPACE Inside a DO IF-END IF Structure

NUMERIC #LINE.
DO IF MOD(#LINE,5) = 0.
PRINT SPACE 2.
END IF.
COMPUTE #LINE=#LINE + 1.
PRINT / NAME DEPT *
        MOHIRED 30-31 '/' YRHIRED *
        SALARY 35-42(DOLLAR).
EXECUTE.

• DO IF specifies that PRINT SPACE will be executed if MOD (the remainder) of #LINE divided by 5 equals 1. Because #LINE is incremented by 1 for each case, PRINT SPACE is executed once for every five cases. (See Arithmetic Functions for information on the MOD function.)

• PRINT SPACE specifies two blank lines. Cases are displayed in groups of five with two blank lines between each group.

Using an Expression to Specify the Number of Blank Lines

* Printing addresses on labels.

COMPUTE #LINES=0.               /*Initiate #LINES to 0
DATA LIST FILE=ADDRESS/RECORD 1-40 (A).  /*Read a record
COMPUTE #LINES=#LINES+1.        /*Bump counter and print
WRITE OUTFILE=LABELS /RECORD.

DO IF RECORD EQ ' '.            /*Blank between addresses
+  PRINT SPACE OUTFILE=LABELS 8 - #LINES.  /*Add extra blank #LINES
+  COMPUTE #LINES=0.
END IF.
EXECUTE.

• PRINT SPACE uses a complex expression for specifying the number of blank lines to display. The data contain a variable number of input records for each name and address, which must be printed in a fixed number of lines for mailing labels. The goal is to know when the last line for each address has been printed, how many lines have printed, and therefore how many blank records must be printed in order for the next address to fit on the next label. The example assumes that there is already one blank line between each address on input and that you want to print eight lines per label.

• The DATA LIST command defines the data. Each line of the address is contained in columns 1–40 of the data file and is assigned the variable name RECORD. For the blank line between each address, RECORD is blank.

• Variable #LINES is initialized to 0 as a scratch variable and is incremented for each record that is written. When the program encounters a blank line (RECORD EQ ' '), PRINT SPACE prints a number of blank lines that is equal to 8 minus the number already printed, and #LINES is then reset to 0.

• OUTFILE on PRINT SPACE specifies the same file that is specified by OUTFILE on WRITE.

Related Topics

PRINT SPACE
Overview (PRINT SPACE command)


PROBIT

PROBIT (command),PROBIT (command),PROBIT (command)
Probit Analysis,Probit Analysis,Probit Analysis
command syntax,command syntax,command syntax
PROBIT (command),PROBIT (command),PROBIT (command)
syntax chart,syntax chart,syntax chart

PROBIT is available in the Regression option.

PROBIT response-count varname OF observation-count varname
        WITH varlist [BY varname(min,max)]

 [/MODEL={PROBIT**}]
         {LOGIT   }
         {BOTH    }

 [/LOG=[{10** }]
        {2.718}
        {value}
        {NONE }

 [/CRITERIA=[{OPTOL   }({epsilon**0.8})][P({0.15**})][STEPLIMIT({0.1**})]
             {CONVERGE} {n           }     {p     }             {n    }

            [ITERATE({max(50,3(p+1)**})]]
                     {n              }

 [/NATRES[=value]]

 [/PRINT={[CI**] [FREQ**] [RMP**]} [PARALL] [NONE] [ALL]]
         {DEFAULT**              }

 [/MISSING=[{EXCLUDE**}]  ]
            {INCLUDE  }

**Default if the subcommand or keyword is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See PROBIT Algorithms for computational details for this procedure.

Syntax for the PROBIT command can be generated from the Probit Analysis dialog.

Example

PROBIT  R OF N BY ROOT(1,2) WITH X
  /MODEL = BOTH.

Related Topics

Overview (PROBIT command)
Examples (PROBIT command)
Variable Specification (PROBIT command)
MODEL Subcommand (PROBIT command)
LOG Subcommand (PROBIT command)
CRITERIA Subcommand (PROBIT command)
NATRES Subcommand (PROBIT command)
PRINT Subcommand (PROBIT command)
MISSING Subcommand (PROBIT command)
References (PROBIT command)


Overview (PROBIT command)

PROBIT (command),PROBIT (command),PROBIT (command)
limitations,limitations,limitations

PROBIT can be used to estimate the effects of one or more independent variables on a dichotomous dependent variable (such as dead or alive, employed or unemployed, product purchased or not). The program is designed for dose-response analyses and related models, but PROBIT can also estimate logistic regression models.

Options Collapse Hide details

Options

The Model. You can request a probit or logit response model, or both, for the observed response proportions with the MODEL subcommand.

Transform Predictors. You can control the base of the log transformation applied to the predictors or request no log transformation with the LOG subcommand.

Natural Response Rates. You can instruct PROBIT to estimate the natural response rate (threshold) of the model or supply a known natural response rate to be used in the solution with the NATRES subcommand.

Algorithm Control Parameters. You can specify values of algorithm control parameters, such as the limit on iterations, using the CRITERIA subcommand.

Statistics. By default, PROBIT calculates frequencies, fiducial confidence intervals, and the relative median potency. It also produces a plot of the observed probits or logits against the values of a single independent variable. Optionally, you can use the PRINT subcommand to request a test of the parallelism of regression lines for different levels of the grouping variable or to suppress any or all of these statistics.

Basic Specification Collapse Hide details

Basic Specification

• The basic specification is the response-count variable, keyword OF, the observation-count variable, keyword WITH, and at least one independent variable.

• PROBIT calculates maximum-likelihood estimates for the parameters of the default probit response model and automatically displays estimates of the regression coefficient and intercept terms, their standard errors, a covariance matrix of parameter estimates, and a Pearson chi-square goodness-of-fit test of the model.

Subcommand Order Collapse Hide details

Subcommand Order

• The variable specification must be first.

• Subcommands can be named in any order.

Syntax Rules Collapse Hide details

Syntax Rules

• The variables must include a response count, an observation count, and at least one predictor. A categorical grouping variable is optional.

• All subcommands are optional and each can appear only once.

• Generally, data should not be entered for individual observations. PROBIT expects predictor values, response counts, and the total number of observations as the input case.

• If the data are available only in a case-by-case form, use AGGREGATE first to compute the required response and observation counts.

Operations Collapse Hide details

Operations

• The transformed response variable is predicted as a linear function of other variables using the nonlinear-optimization method. Note that the previous releases used the iteratively weighted least-squares method, which has a different way of transforming the response variables. See the topic MODEL Subcommand (PROBIT command) for more information.

• If individual cases are entered in the data, PROBIT skips the plot of transformed response proportions and predictor values.

• If individual cases are entered, the chi-square goodness-of-fit statistic and associated degrees of freedom are based on the individual cases. The case-based chi-square goodness-of-fit statistic generally differs from that calculated for the same data in aggregated form.

Limitations Collapse Hide details

Limitations

• Only one prediction model can be tested on a single PROBIT command, although both probit and logit response models can be requested for that prediction.

• Confidence limits, the plot of transformed response proportions and predictor values, and computation of relative median potency are necessarily limited to single-predictor models.

Related Topics

PROBIT
Examples (PROBIT command)
Variable Specification (PROBIT command)
MODEL Subcommand (PROBIT command)
LOG Subcommand (PROBIT command)
CRITERIA Subcommand (PROBIT command)
NATRES Subcommand (PROBIT command)
PRINT Subcommand (PROBIT command)
MISSING Subcommand (PROBIT command)
References (PROBIT command)


Examples (PROBIT command)

PROBIT (command),PROBIT (command),PROBIT (command)
case-by-case form,case-by-case form,case-by-case form
PROBIT
  response  OF nsubj  BY site(1 3)  WITH value
  /LOG
  /MODEL PROBIT
  /PRINT FREQ CI RMP PARALLEL
  /NATRES
  /CRITERIA P(.15) ITERATE(100) STEPLIMIT(.1) .

• The fits a probit model to response given nsubj observations by site and the predictor value.

• The empty LOG subcommand means that the natural logarithm will be used.

• The empty NATRES subcommand asks the procedure to estimate the natural response rate.

• The PRINT subcommand requests the table of observed and expected frequencies, fiducial confidence intervals, relative mean potencies, and parallelism tests.

• All other options are set to their default values.

For discussion of output from this syntax and to place the example in context, see Using Probit Analysis to Test Promotional Effects on Sales.

Example: Using data in a case-by-case form

DATA LIST FREE / PREPARTN DOSE RESPONSE.
BEGIN DATA
1 1.5 0
 ...
4 20.0 1
END DATA.
COMPUTE SUBJECT = 1.
PROBIT RESPONSE OF SUBJECT BY PREPARTN(1,4) WITH DOSE.

• This dose-response model (Finney, 1971) illustrates a case-by-case analysis. A researcher tests four different preparations at varying doses and observes whether each subject responds. The data are individually recorded for each subject, with 1 indicating a response and 0 indicating no response. The number of observations is always 1 and is stored in variable SUBJECT.

• PROBIT warns that the data are in a case-by-case form and that the plot is therefore skipped.

• The goodness-of-fit test and associated degrees of freedom are based on individual cases, not dosage groups.

• PROBIT displays predicted and observed frequencies for all individual input cases.

Example: Aggregating case-by-case data

DATA LIST FREE/PREPARTN DOSE RESPONSE.
BEGIN DATA
     1.00     1.50      .00
     ...
     4.00    20.00     1.00
END DATA.
AGGREGATE OUTFILE=*
  /BREAK=PREPARTN DOSE
  /SUBJECTS=N(RESPONSE)
  /NRESP=SUM(RESPONSE).
PROBIT NRESP OF SUBJECTS BY PREPARTN(1,4) WITH DOSE.

• This example analyzes the same dose-response model as the previous example, but the data are first aggregated.

• AGGREGATE summarizes the data by cases representing all subjects who received the same preparation (PREPARTN) at the same dose (DOSE).

• The number of cases having a nonmissing response is recorded in the aggregated variable SUBJECTS.

• Because RESPONSE is coded 0 for no response and 1 for a response, the sum of the values gives the number of observations with a response.

• PROBIT requests a default analysis.

• The parameter estimates for this analysis are the same as those calculated for individual cases in the example above. The chi-square test, however, is based on the number of dosages.

Related Topics

PROBIT
Overview (PROBIT command)
Variable Specification (PROBIT command)
MODEL Subcommand (PROBIT command)
LOG Subcommand (PROBIT command)
CRITERIA Subcommand (PROBIT command)
NATRES Subcommand (PROBIT command)
PRINT Subcommand (PROBIT command)
MISSING Subcommand (PROBIT command)
References (PROBIT command)


Variable Specification (PROBIT command)

PROBIT (command),PROBIT (command),PROBIT (command)
variable specification,variable specification,variable specification
OF (keyword),OF (keyword),OF (keyword)
PROBIT command,PROBIT command,PROBIT command

The variable specification on PROBIT identifies the variables for response count, observation count, groups, and predictors. The variable specification is required.

PROBIT (command),PROBIT (command),PROBIT (command)
observation frequency variable,observation frequency variable,observation frequency variable
response frequency variable,response frequency variable,response frequency variable
PROBIT command,PROBIT command,PROBIT command
PROBIT (command),PROBIT (command),PROBIT (command)
response frequency variable,response frequency variable,response frequency variable

• The variables must be specified first. The specification must include the response-count variable, followed by the keyword OF and then the observation-count variable.

WITH (keyword),WITH (keyword),WITH (keyword)
PROBIT command,PROBIT command,PROBIT command

• If the value of the response-count variable exceeds that of the observation-count variable, a procedure error occurs and PROBIT is not executed.

PROBIT (command),PROBIT (command),PROBIT (command)
predictor variables,predictor variables,predictor variables
PROBIT (command),PROBIT (command),PROBIT (command)
covariates,covariates,covariates
BY (keyword),BY (keyword),BY (keyword)
PROBIT command,PROBIT command,PROBIT command

• At least one predictor (covariate) must be specified following the keyword WITH. The number of predictors is limited only by available workspace. All predictors must be continuous variables.

PROBIT (command),PROBIT (command),PROBIT (command)
factors,factors,factors
PROBIT (command),PROBIT (command),PROBIT (command)
grouping variable,grouping variable,grouping variable

• You can specify a grouping variable (factor) after the keyword BY. Only one variable can be specified. It must be numeric and can contain only integer values. You must specify, in parentheses, a range indicating the minimum and maximum values for the grouping variable. Each integer value in the specified range defines a group.

• Cases with values for the grouping variable that are outside the specified range are excluded from the analysis.

• Keywords BY and WITH can appear in either order. However, both must follow the response-and-observation-count variables.

Example

PROBIT R OF N WITH X.

• The number of observations having the measured response appears in variable R, and the total number of observations is in N. The predictor is X.

Example

PROBIT  R OF N BY ROOT(1,2) WITH X.

PROBIT  R OF N WITH X BY ROOT(1,2).

• Because keywords BY and WITH can be used in either order, these two commands are equivalent. Each command specifies X as a continuous predictor and ROOT as a categorical grouping variable.

• Groups are identified by the levels of variable ROOT, which may be 1 or 2.

• For each combination of predictor and grouping variables, the variable R contains the number of observations with the response of interest, and N contains the total number of observations.

Related Topics

PROBIT
Overview (PROBIT command)
Examples (PROBIT command)
MODEL Subcommand (PROBIT command)
LOG Subcommand (PROBIT command)
CRITERIA Subcommand (PROBIT command)
NATRES Subcommand (PROBIT command)
PRINT Subcommand (PROBIT command)
MISSING Subcommand (PROBIT command)
References (PROBIT command)


MODEL Subcommand (PROBIT command)

PROBIT (command),PROBIT (command),PROBIT (command)
MODEL subcommand,MODEL subcommand,MODEL subcommand
MODEL (subcommand),MODEL (subcommand),MODEL (subcommand)
PROBIT command,PROBIT command,PROBIT command
PROBIT (command),PROBIT (command),PROBIT (command)
model specification,model specification,model specification
logit,logit,logit
PROBIT command,PROBIT command,PROBIT command

MODEL specifies the form of the dichotomous-response model. Response models can be thought of as transformations (T) of response rates, which are proportions or probabilities (p). Note the difference in the transformations between the current version and the previous versions.

• A probit is the inverse of the cumulative standard normal distribution function. Thus, for any proportion, the probit transformation returns the value below which that proportion of standard normal deviates is found. For the probit response model, the program uses T (p) = PROBIT (p). Hence:

T (0.025) = PROBIT (0.025) = –1.96

T (0.400) = PROBIT (0.400) = –0.25

T (0.500) = PROBIT (0.500) = 0.00

T (0.950) = PROBIT (0.950) = 1.64

• A logit is simply the natural log of the odds ratio, p/(1-p). In the Probit procedure, the response function is given as T (p) = loge(p/(1-p)). Hence:

T (0.025) = LOGIT (0.025) = –3.66

T (0.400) = LOGIT (0.400) = –0.40

T (0.500) = LOGIT (0.500) = 0.00

T (0.950) = LOGIT (0.950) = 2.94

You can request one or both of the models on the MODEL subcommand. The default is PROBIT if the subcommand is not specified or is specified with no keyword.

PROBIT (keyword),PROBIT (keyword),PROBIT (keyword)
PROBIT command,PROBIT command,PROBIT command
LOGIT (keyword),LOGIT (keyword),LOGIT (keyword)
PROBIT command,PROBIT command,PROBIT command
PROBIT | Probit response model. This is the default.
LOGIT | Logit response model.
BOTH | Both probit and logit response models. PROBIT displays all the output for the logit model followed by the output for the probit model.

• If subgroups and multiple-predictor variables are defined, PROBIT estimates a separate intercept, aj, for each subgroup and a regression coefficient, bi, for each predictor.

Related Topics

PROBIT
Overview (PROBIT command)
Examples (PROBIT command)
Variable Specification (PROBIT command)
LOG Subcommand (PROBIT command)
CRITERIA Subcommand (PROBIT command)
NATRES Subcommand (PROBIT command)
PRINT Subcommand (PROBIT command)
MISSING Subcommand (PROBIT command)
References (PROBIT command)


LOG Subcommand (PROBIT command)

PROBIT (command),PROBIT (command),PROBIT (command)
LOG subcommand,LOG subcommand,LOG subcommand
LOG (subcommand),LOG (subcommand),LOG (subcommand)
PROBIT command,PROBIT command,PROBIT command
PROBIT (command),PROBIT (command),PROBIT (command)
log transformation,log transformation,log transformation
log transformation,log transformation,log transformation
PROBIT command,PROBIT command,PROBIT command

LOG specifies the base of the logarithmic transformation of the predictor variables or suppresses the default log transformation.

• LOG applies to all predictors.

• To transform only selected predictors, use COMPUTE commands before the Probit procedure. Then specify NONE on the LOG subcommand.

• If LOG is omitted, a logarithm base of 10 is used.

• If LOG is used without a specification, the natural logarithm base e (2.718) is used.

• If you have a control group in your data and specify NONE on the LOG subcommand, the control group is included in the analysis. See the topic NATRES Subcommand (PROBIT command) for more information.

You can specify one of the following on LOG:

value | Logarithm base to be applied to all predictors.
NONE | No transformation of the predictors.

Example

PROBIT R OF N BY ROOT (1,2) WITH X
  /LOG = 2.

• LOG specifies a base-2 logarithmic transformation.

Related Topics

PROBIT
Overview (PROBIT command)
Examples (PROBIT command)
Variable Specification (PROBIT command)
MODEL Subcommand (PROBIT command)
CRITERIA Subcommand (PROBIT command)
NATRES Subcommand (PROBIT command)
PRINT Subcommand (PROBIT command)
MISSING Subcommand (PROBIT command)
References (PROBIT command)


CRITERIA Subcommand (PROBIT command)

PROBIT (command),PROBIT (command),PROBIT (command)
CRITERIA subcommand,CRITERIA subcommand,CRITERIA subcommand
CRITERIA (subcommand),CRITERIA (subcommand),CRITERIA (subcommand)
PROBIT command,PROBIT command,PROBIT command
CONVERGE (keyword),CONVERGE (keyword),CONVERGE (keyword)
PROBIT command,PROBIT command,PROBIT command

Use CRITERIA to specify the values of control parameters for the PROBIT algorithm. You can specify any or all of the keywords below. Defaults remain in effect for parameters that are not changed.

optimality tolerance,optimality tolerance,optimality tolerance
PROBIT command,PROBIT command,PROBIT command
OPTOL (keyword),OPTOL (keyword),OPTOL (keyword)
PROBIT command,PROBIT command,PROBIT command
ITERATE (keyword),ITERATE (keyword),ITERATE (keyword)
PROBIT command,PROBIT command,PROBIT command
PROBIT (command),PROBIT (command),PROBIT (command)
maximum iterations,maximum iterations,maximum iterations
P (keyword),P (keyword),P (keyword)
PROBIT command,PROBIT command,PROBIT command
heterogeneity factor,heterogeneity factor,heterogeneity factor
PROBIT command,PROBIT command,PROBIT command
PROBIT (command),PROBIT (command),PROBIT (command)
step limit,step limit,step limit
OPTOL(n) | Optimality tolerance. Alias CONVERGE. If an iteration point is a feasible point and the next step will not produce a relative change in either the parameter vector or the log-likelihood function of more than the square root of n, an optimal solution has been found. OPTOL can also be thought of as the number of significant digits in the log-likelihood function at the solution. For example, if OPTOL=10-6, the log-likelihood function should have approximately six significant digits of accuracy. The default value is machine epsilon**0.8.
ITERATE(n) | Iteration limit. Specify the maximum number of iterations. The default is max (50, 3(p + 1)), where p is the number of parameters in the model.
P(p) | Heterogeneity criterion probability. Specify a cutoff value between 0 and 1 for the significance of the goodness-of-fit test. The cutoff value determines whether a heterogeneity factor is included in calculations of confidence levels for effective levels of a predictor. If the significance of chi-square is greater than the cutoff, the heterogeneity factor is not included. If you specify 0, this criterion is disabled; if you specify 1, a heterogeneity factor is automatically included. The default is 0.15.
STEPLIMIT(n) | Step limit. The PROBIT algorithm does not allow changes in the length of the parameter vector to exceed a factor of n. This limit prevents very early steps from going too far from good initial estimates. Specify any positive value. The default value is 0.1.
CONVERGE(n) | Alias of OPTOL.

Related Topics

PROBIT
Overview (PROBIT command)
Examples (PROBIT command)
Variable Specification (PROBIT command)
MODEL Subcommand (PROBIT command)
LOG Subcommand (PROBIT command)
NATRES Subcommand (PROBIT command)
PRINT Subcommand (PROBIT command)
MISSING Subcommand (PROBIT command)
References (PROBIT command)


NATRES Subcommand (PROBIT command)

PROBIT (command),PROBIT (command),PROBIT (command)
NATRES subcommand,NATRES subcommand,NATRES subcommand
NATRES (subcommand),NATRES (subcommand),NATRES (subcommand)
PROBIT command,PROBIT command,PROBIT command
natural response rate,natural response rate,natural response rate
PROBIT command,PROBIT command,PROBIT command
PROBIT (command),PROBIT (command),PROBIT (command)
natural response rate,natural response rate,natural response rate
PROBIT (command),PROBIT (command),PROBIT (command)
response rate,response rate,response rate

You can use NATRES either to supply a known natural response rate to be used in the solution or to instruct PROBIT to estimate the natural (or threshold) response rate of the model.

• To supply a known natural response rate as a constraint on the model solution, specify a value less than 1 on NATRES.

• To instruct PROBIT to estimate the natural response rate of the model, you can indicate a control group by giving a 0 value to any of the predictor variables. PROBIT displays the estimate of the natural response rate and the standard error and includes the estimate in the covariance/correlation matrix as NAT RESP.

• If no control group is indicated and NATRES is specified without a given value, PROBIT estimates the natural response rate from the entire data and informs you that no control group has been provided. The estimate of the natural response rate and the standard error are displayed and NAT RESP is included in the covariance/correlation matrix.

• If you have a control group in your data and specify NONE on the LOG subcommand, the control group is included in the analysis.

Example

DATA LIST FREE / SOLUTION DOSE NOBSN NRESP.
BEGIN DATA
1  5 100 20
1 10  80 30
1  0 100 10
...
END DATA.

PROBIT NRESP OF NOBSN BY SOLUTION(1,4) WITH DOSE
  /NATRES.

• This example reads four variables and requests a default analysis with an estimate of the natural response rate.

• The predictor variable, DOSE, has a value of 0 for the third case.

• The response count (10) and the observation count (100) for this case establish the initial estimate of the natural response rate.

• Because the default log transformation is performed, the control group is not included in the analysis.

Example

DATA LIST FREE / SOLUTION DOSE NOBSN NRESP.
BEGIN DATA
1  5 100 20
1 10  80 30
1  0 100 10
  ...
END DATA.

PROBIT NRESP OF NOBSN BY SOLUTION(1,4) WITH DOSE
  /NATRES = 0.10.

• This example reads four variables and requests an analysis in which the natural response rate is set to 0.10. The values of the control group are ignored.

• The control group is excluded from the analysis because the default log transformation is performed.

Related Topics

PROBIT
Overview (PROBIT command)
Examples (PROBIT command)
Variable Specification (PROBIT command)
MODEL Subcommand (PROBIT command)
LOG Subcommand (PROBIT command)
CRITERIA Subcommand (PROBIT command)
PRINT Subcommand (PROBIT command)
MISSING Subcommand (PROBIT command)
References (PROBIT command)


PRINT Subcommand (PROBIT command)

PROBIT (command),PROBIT (command),PROBIT (command)
PRINT subcommand,PRINT subcommand,PRINT subcommand
PRINT (subcommand),PRINT (subcommand),PRINT (subcommand)
PROBIT command,PROBIT command,PROBIT command

Use PRINT to control the statistics calculated by PROBIT.

• PROBIT always displays the plot (for a single-predictor model) and the parameter estimates and covariances for the probit model.

• If PRINT is used, the requested statistics are calculated and displayed in addition to the parameter estimates and plot.

• If PRINT is not specified or is specified without any keyword, FREQ, CI, and RMP are calculated and displayed in addition to the parameter estimates and plot.

FREQ (keyword),FREQ (keyword),FREQ (keyword)
PROBIT command,PROBIT command,PROBIT command
residuals,residuals,residuals
PROBIT command,PROBIT command,PROBIT command
PROBIT (command),PROBIT (command),PROBIT (command)
residuals,residuals,residuals
PROBIT (command),PROBIT (command),PROBIT (command)
expected frequencies,expected frequencies,expected frequencies
expected frequencies,expected frequencies,expected frequencies
PROBIT command,PROBIT command,PROBIT command
observed frequencies,observed frequencies,observed frequencies
PROBIT command,PROBIT command,PROBIT command
PROBIT (command),PROBIT (command),PROBIT (command)
observed frequencies,observed frequencies,observed frequencies
CI (keyword),CI (keyword),CI (keyword)
PROBIT command,PROBIT command,PROBIT command
confidence intervals,confidence intervals,confidence intervals
PROBIT command,PROBIT command,PROBIT command
PROBIT (command),PROBIT (command),PROBIT (command)
confidence intervals,confidence intervals,confidence intervals
RMP (keyword),RMP (keyword),RMP (keyword)
PROBIT command,PROBIT command,PROBIT command
relative median potency,relative median potency,relative median potency
PROBIT command,PROBIT command,PROBIT command
PARALL (keyword),PARALL (keyword),PARALL (keyword)
PROBIT command,PROBIT command,PROBIT command
parallelism test,parallelism test,parallelism test
PROBIT command,PROBIT command,PROBIT command
DEFAULT | FREQ, CI, and RMP. This is the default if PRINT is not specified or is specified by itself.
FREQ | Frequencies. Display a table of observed and predicted frequencies with their residual values. If observations are entered on a case-by-case basis, this listing can be quite lengthy.
CI | Fiducial confidence intervals. Print fiducial confidence intervals (Finney, 1971) for the levels of the predictor needed to produce each proportion of responses. PROBIT displays this default output for single-predictor models only. If a categorical grouping variable is specified, PROBIT produces a table of confidence intervals for each group. If the Pearson chi-square goodness-of-fit test is significant (p < 0.15 by default), PROBIT uses a heterogeneity factor to calculate the limits.
RMP | Relative median potency. Display the relative median potency (RMP) of each pair of groups defined by the grouping variable. PROBIT displays this default output for single-predictor models only. For any pair of groups, the RMP is the ratio of the stimulus tolerances in those groups. Stimulus tolerance is the value of the predictor necessary to produce a 50% response rate. If the derived model for one predictor and two groups estimates that a predictor value of 21 produces a 50% response rate in the first group, and that a predictor value of 15 produces a 50% response rate in the second group, the relative median potency would be 21/15 = 1.40. In biological assay analyses, RMP measures the comparative strength of preparations.
PARALL | Parallelism test. Produce a test of the parallelism of regression lines for different levels of the grouping variable. This test displays a chi-square value and its associated probability. It requires an additional pass through the data and, thus, additional processing time.
NONE | Display only the unconditional output. This option can be used to override any other specification on the PRINT subcommand for PROBIT.
ALL | All available output. This is the same as requesting FREQ, CI, RMP, and PARALL.

Related Topics

PROBIT
Overview (PROBIT command)
Examples (PROBIT command)
Variable Specification (PROBIT command)
MODEL Subcommand (PROBIT command)
LOG Subcommand (PROBIT command)
CRITERIA Subcommand (PROBIT command)
NATRES Subcommand (PROBIT command)
MISSING Subcommand (PROBIT command)
References (PROBIT command)


MISSING Subcommand (PROBIT command)

PROBIT (command),PROBIT (command),PROBIT (command)
MISSING subcommand,MISSING subcommand,MISSING subcommand
MISSING (subcommand),MISSING (subcommand),MISSING (subcommand)
PROBIT command,PROBIT command,PROBIT command
missing values,missing values,missing values
PROBIT command,PROBIT command,PROBIT command
PROBIT (command),PROBIT (command),PROBIT (command)
missing values,missing values,missing values
LISTWISE (keyword),LISTWISE (keyword),LISTWISE (keyword)
PROBIT command,PROBIT command,PROBIT command

PROBIT always deletes cases having a missing value for any variable. In the output, PROBIT indicates how many cases it rejected because of missing data. This information is displayed with the DATA Information that prints at the beginning of the output. You can use the MISSING subcommand to control the treatment of user-missing values.

INCLUDE (keyword),INCLUDE (keyword),INCLUDE (keyword)
PROBIT command,PROBIT command,PROBIT command
EXCLUDE | Delete cases with user-missing values. This is the default. You can also make it explicit by using the keyword DEFAULT.
INCLUDE | Include user-missing values. PROBIT treats user-missing values as valid. Only cases with system-missing values are rejected.

Related Topics

PROBIT
Overview (PROBIT command)
Examples (PROBIT command)
Variable Specification (PROBIT command)
MODEL Subcommand (PROBIT command)
LOG Subcommand (PROBIT command)
CRITERIA Subcommand (PROBIT command)
NATRES Subcommand (PROBIT command)
PRINT Subcommand (PROBIT command)
References (PROBIT command)


References (PROBIT command)

Finney, D. J. 1971. Probit analysis. Cambridge: Cambridge University Press.

Related Topics

PROBIT
Overview (PROBIT command)
Examples (PROBIT command)
Variable Specification (PROBIT command)
MODEL Subcommand (PROBIT command)
LOG Subcommand (PROBIT command)
CRITERIA Subcommand (PROBIT command)
NATRES Subcommand (PROBIT command)
PRINT Subcommand (PROBIT command)
MISSING Subcommand (PROBIT command)


PROCEDURE OUTPUT

procedure output,procedure output,procedure output
writing to a file,writing to a file,writing to a file
PROCEDURE OUTPUT (command),PROCEDURE OUTPUT (command),PROCEDURE OUTPUT (command)
PROCEDURE OUTPUT (command),PROCEDURE OUTPUT (command),PROCEDURE OUTPUT (command)
syntax chart,syntax chart,syntax chart
crosstabulation,crosstabulation,crosstabulation
writing to a file,writing to a file,writing to a file
frequency tables,frequency tables,frequency tables
writing to a file,writing to a file,writing to a file
survival tables,survival tables,survival tables
writing to a file,writing to a file,writing to a file
PROCEDURE OUTPUT OUTFILE=file.

Example

PROCEDURE OUTPUT OUTFILE=CELLDATA.

Related Topics

Overview (PROCEDURE OUTPUT command)
Examples (PROCEDURE OUTPUT command)


Overview (PROCEDURE OUTPUT command)

procedure output,procedure output,procedure output
output file,output file,output file
PROCEDURE OUTPUT (command),PROCEDURE OUTPUT (command),PROCEDURE OUTPUT (command)
OUTFILE subcommand,OUTFILE subcommand,OUTFILE subcommand
OUTFILE (subcommand),OUTFILE (subcommand),OUTFILE (subcommand)
PROCEDURE OUTPUT command,PROCEDURE OUTPUT command,PROCEDURE OUTPUT command

PROCEDURE OUTPUT specifies the files to which CROSSTABS and SURVIVAL (included in the Advanced Statistics option) can write procedure output. PROCEDURE OUTPUT has no other applications.

Basic Specification Collapse Hide details

Basic Specification

The only specification is OUTFILE and the file specification. PROCEDURE OUTPUT must precede the command to which it applies.

Operations Collapse Hide details

Operations

Commands with the WRITE subcommand or keyword write to the output file that is specified on the most recent PROCEDURE OUTPUT command. If only one output file has been specified, the output from the last such procedure overwrites all previous ones.

Related Topics

PROCEDURE OUTPUT
Examples (PROCEDURE OUTPUT command)


Examples (PROCEDURE OUTPUT command)

CROSSTABS (command),CROSSTABS (command),CROSSTABS (command)
with PROCEDURE OUTPUT command,with PROCEDURE OUTPUT command,with PROCEDURE OUTPUT command
PROCEDURE OUTPUT (command),PROCEDURE OUTPUT (command),PROCEDURE OUTPUT (command)
with CROSSTABS command,with CROSSTABS command,with CROSSTABS command
SURVIVAL (command),SURVIVAL (command),SURVIVAL (command)
with PROCEDURE OUTPUT command,with PROCEDURE OUTPUT command,with PROCEDURE OUTPUT command
PROCEDURE OUTPUT (command),PROCEDURE OUTPUT (command),PROCEDURE OUTPUT (command)
with SURVIVAL command,with SURVIVAL command,with SURVIVAL command

Using PROCEDURE OUTPUT with CROSSTABS

PROCEDURE OUTPUT OUTFILE=CELLDATA.
CROSSTABS VARIABLES=FEAR SEX (1,2)
  /TABLES=FEAR BY SEX
  /WRITE=ALL.

• PROCEDURE OUTPUT precedes CROSSTABS and specifies CELLDATA as the file to receive the cell frequencies.

• The WRITE subcommand on CROSSTABS is required for writing cell frequencies to a procedure output file.

Using PROCEDURE OUTPUT with SURVIVAL

PROCEDURE OUTPUT OUTFILE=SURVTBL.
SURVIVAL  TABLES=ONSSURV,RECSURV BY TREATMNT(1,3)
  /STATUS = RECURSIT(1,9) FOR RECSURV
  /STATUS = STATUS(3,4) FOR ONSSURV
  /INTERVAL=THRU 50 BY 5 THRU 100 BY 10/PLOTS/COMPARE
  /CALCULATE=CONDITIONAL PAIRWISE
  /WRITE=TABLES.

• PROCEDURE OUTPUT precedes SURVIVAL and specifies SURVTBL as the file to receive the survival tables.

• The WRITE subcommand on SURVIVAL is required for writing survival tables to a procedure output file.

Related Topics

PROCEDURE OUTPUT
Overview (PROCEDURE OUTPUT command)


PROXIMITIES

Distances,Distances,Distances
command syntax,command syntax,command syntax
PROXIMITIES (command),PROXIMITIES (command),PROXIMITIES (command)
PROXIMITIES (command),PROXIMITIES (command),PROXIMITIES (command)
syntax chart,syntax chart,syntax chart

PROXIMITIES is available in the Statistics Base option.

PROXIMITIES  varlist  [/VIEW={CASE**  }]
                             {VARIABLE}

 [/STANDARDIZE=[{VARIABLE}] [{NONE** }]]
                {CASE    }   {Z      }
                             {SD     }
                             {RANGE  }
                             {MAX    }
                             {MEAN   }
                             {RESCALE}

 [/MEASURE=[{EUCLID**          }] [ABSOLUTE] [REVERSE] [RESCALE]
            {SEUCLID           }
            {COSINE            }
            {CORRELATION       }
            {BLOCK             }
            {CHEBYCHEV         }
            {POWER(p,r)        }
            {MINKOWSKI(p)      }
            {CHISQ             }
            {PH2               }
            {RR[(p[,np])]      }
            {SM[(p[,np])]      }
            {JACCARD[(p[,np])] }
            {DICE[(p[,np])]    }
            {SS1[(p[,np])]     }
            {RT[(p[,np])]      }
            {SS2[(p[,np])]     }
            {K1[(p[,np])]      }
            {SS3[(p[,np])]     }
            {K2[(p[,np])]      }
            {SS4[(p[,np])]     }
            {HAMANN[(p[,np])]  }
            {OCHIAI[(p[,np])]  }
            {SS5[(p[,np])]     }
            {PHI[(p[,np])]     }
            {LAMBDA[(p[,np])]  }
            {D[(p[,np])]       }
            {Y[(p[,np])]       }
            {Q[(p[,np])]       }
            {BEUCLID[(p[,np])] }
            {SIZE[(p[,np])]    }
            {PATTERN[(p[,np])] }
            {BSEUCLID[(p[,np])]}
            {BSHAPE[(p[,np])]  }
            {DISPER[(p[,np])]  }
            {VARIANCE[(p[,np])]}
            {BLWMN[(p[,np])]   }
            {NONE              }

 [/PRINT=[{PROXIMITIES**}]]  [/ID=varname]
          {NONE         }

 [/MISSING=[EXCLUDE**]  [INCLUDE]]

 [/MATRIX=[IN({'savfile'|'dataset'})] [OUT({'savfile'|'dataset'})]]
              {*                  }        {*                  }

**Default if subcommand or keyword is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See PROXIMITIES Algorithms for computational details for this procedure.

Syntax for the PROXIMITIES command can be generated from the Distances dialog.

Example

PROXIMITIES A B C.

Related Topics

Overview (PROXIMITIES command)
Example (PROXIMITIES command)
Variable Specification (PROXIMITIES command)
STANDARDIZE Subcommand (PROXIMITIES command)
VIEW Subcommand (PROXIMITIES command)
MEASURE Subcommand (PROXIMITIES command)
Measures for Interval Data (PROXIMITIES command)
Measures for Frequency-Count Data (PROXIMITIES command)
Measures for Binary Data (PROXIMITIES command)
Transforming Measures in Proximity Matrix (PROXIMITIES command)
PRINT Subcommand (PROXIMITIES command)
ID Subcommand (PROXIMITIES command)
MISSING Subcommand (PROXIMITIES command)
MATRIX Subcommand (PROXIMITIES command)
Matrix Output (PROXIMITIES command)
Matrix Input (PROXIMITIES command)
Format of the Matrix Data File (PROXIMITIES command)
Split Files (PROXIMITIES command)
Example: Matrix Output to PASW Statistics External File (PROXIMITIES command)
Example: Matrix Output to External File (PROXIMITIES command)
Example: Matrix Output to Working File (PROXIMITIES command)
Example: Matrix Input from External File (PROXIMITIES command)
Example: Matrix Input from Working File (PROXIMITIES command)
Example: Matrix Output to and Then Input from Working File (PROXIMITIES command)
Example: Q-factor Analysis (PROXIMITIES command)
References (PROXIMITIES command)


Overview (PROXIMITIES command)

PROXIMITIES computes a variety of measures of similarity, dissimilarity, or distance between pairs of cases or pairs of variables for moderate-sized datasets (see “Limitations” below). PROXIMITIES matrix output can be used as input to procedures ALSCAL, CLUSTER, and FACTOR.

Options Collapse Hide details

Options

Standardizing Data. With the STANDARDIZE subcommand, you can use several different methods to standardize the values for each variable or for each case.

Proximity Measures. You can use the MEASURE subcommand to compute a variety of similarity, dissimilarity, and distance measures. (Similarity measures increase with greater similarity; dissimilarity and distance measures decrease.) MEASURE can compute measures for interval data, frequency-count data, and binary data. Only one measure can be requested in any one PROXIMITIES procedure. With the VIEW subcommand, you can control whether proximities are computed between variables or between cases.

Output. You can use the PRINT subcommand to display a computed matrix.

Matrix Input and Output. You can use the MATRIX subcommand to write a computed proximities matrix to PASW Statistics data files. This matrix can be used as input to procedures CLUSTER, ALSCAL, and FACTOR. You can also use MATRIX to read a similarity, dissimilarity, or distance matrix. This option lets you rescale or transform existing proximity matrices.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is a variable list, which obtains Euclidean distances between cases based on the values of each specified variable.

Subcommand Order Collapse Hide details

Subcommand Order

• The variable list must be first.

• Subcommands can be named in any order.

Operations Collapse Hide details

Operations

• PROXIMITIES ignores case weights when computing coefficients.

PROXIMITIES (command),PROXIMITIES (command),PROXIMITIES (command)
limitations,limitations,limitations
Limitations Collapse Hide details

Limitations

• PROXIMITIES keeps the raw data for the current split-file group in memory. Storage requirements increase rapidly with the number of cases and the number of items (cases or variables) for which PROXIMITIES computes coefficients.

Related Topics

PROXIMITIES
Example (PROXIMITIES command)
Variable Specification (PROXIMITIES command)
STANDARDIZE Subcommand (PROXIMITIES command)
VIEW Subcommand (PROXIMITIES command)
MEASURE Subcommand (PROXIMITIES command)
Measures for Interval Data (PROXIMITIES command)
Measures for Frequency-Count Data (PROXIMITIES command)
Measures for Binary Data (PROXIMITIES command)
Transforming Measures in Proximity Matrix (PROXIMITIES command)
PRINT Subcommand (PROXIMITIES command)
ID Subcommand (PROXIMITIES command)
MISSING Subcommand (PROXIMITIES command)
MATRIX Subcommand (PROXIMITIES command)
Matrix Output (PROXIMITIES command)
Matrix Input (PROXIMITIES command)
Format of the Matrix Data File (PROXIMITIES command)
Split Files (PROXIMITIES command)
Example: Matrix Output to PASW Statistics External File (PROXIMITIES command)
Example: Matrix Output to External File (PROXIMITIES command)
Example: Matrix Output to Working File (PROXIMITIES command)
Example: Matrix Input from External File (PROXIMITIES command)
Example: Matrix Input from Working File (PROXIMITIES command)
Example: Matrix Output to and Then Input from Working File (PROXIMITIES command)
Example: Q-factor Analysis (PROXIMITIES command)
References (PROXIMITIES command)


Example (PROXIMITIES command)

PROXIMITIES A B C.

• PROXIMITIES computes Euclidean distances between cases based on the values of variables A, B, and C.

Related Topics

PROXIMITIES
Overview (PROXIMITIES command)
Variable Specification (PROXIMITIES command)
STANDARDIZE Subcommand (PROXIMITIES command)
VIEW Subcommand (PROXIMITIES command)
MEASURE Subcommand (PROXIMITIES command)
Measures for Interval Data (PROXIMITIES command)
Measures for Frequency-Count Data (PROXIMITIES command)
Measures for Binary Data (PROXIMITIES command)
Transforming Measures in Proximity Matrix (PROXIMITIES command)
PRINT Subcommand (PROXIMITIES command)
ID Subcommand (PROXIMITIES command)
MISSING Subcommand (PROXIMITIES command)
MATRIX Subcommand (PROXIMITIES command)
Matrix Output (PROXIMITIES command)
Matrix Input (PROXIMITIES command)
Format of the Matrix Data File (PROXIMITIES command)
Split Files (PROXIMITIES command)
Example: Matrix Output to PASW Statistics External File (PROXIMITIES command)
Example: Matrix Output to External File (PROXIMITIES command)
Example: Matrix Output to Working File (PROXIMITIES command)
Example: Matrix Input from External File (PROXIMITIES command)
Example: Matrix Input from Working File (PROXIMITIES command)
Example: Matrix Output to and Then Input from Working File (PROXIMITIES command)
Example: Q-factor Analysis (PROXIMITIES command)
References (PROXIMITIES command)


Variable Specification (PROXIMITIES command)

PROXIMITIES (command),PROXIMITIES (command),PROXIMITIES (command)
variable list,variable list,variable list

• The variable list must be specified first.

• The variable list can be omitted when an input matrix data file is specified. A slash must then be specified before the first subcommand to indicate that the variable list is omitted.

Related Topics

PROXIMITIES
Overview (PROXIMITIES command)
Example (PROXIMITIES command)
STANDARDIZE Subcommand (PROXIMITIES command)
VIEW Subcommand (PROXIMITIES command)
MEASURE Subcommand (PROXIMITIES command)
Measures for Interval Data (PROXIMITIES command)
Measures for Frequency-Count Data (PROXIMITIES command)
Measures for Binary Data (PROXIMITIES command)
Transforming Measures in Proximity Matrix (PROXIMITIES command)
PRINT Subcommand (PROXIMITIES command)
ID Subcommand (PROXIMITIES command)
MISSING Subcommand (PROXIMITIES command)
MATRIX Subcommand (PROXIMITIES command)
Matrix Output (PROXIMITIES command)
Matrix Input (PROXIMITIES command)
Format of the Matrix Data File (PROXIMITIES command)
Split Files (PROXIMITIES command)
Example: Matrix Output to PASW Statistics External File (PROXIMITIES command)
Example: Matrix Output to External File (PROXIMITIES command)
Example: Matrix Output to Working File (PROXIMITIES command)
Example: Matrix Input from External File (PROXIMITIES command)
Example: Matrix Input from Working File (PROXIMITIES command)
Example: Matrix Output to and Then Input from Working File (PROXIMITIES command)
Example: Q-factor Analysis (PROXIMITIES command)
References (PROXIMITIES command)


STANDARDIZE Subcommand (PROXIMITIES command)

PROXIMITIES (command),PROXIMITIES (command),PROXIMITIES (command)
STANDARDIZE subcommand,STANDARDIZE subcommand,STANDARDIZE subcommand
STANDARDIZE (subcommand),STANDARDIZE (subcommand),STANDARDIZE (subcommand)
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
standardization,standardization,standardization
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
PROXIMITIES (command),PROXIMITIES (command),PROXIMITIES (command)
standardization,standardization,standardization
PROXIMITIES (command),PROXIMITIES (command),PROXIMITIES (command)
transforming values,transforming values,transforming values

Use STANDARDIZE to standardize data values for either cases or variables before computing proximities. One of two options can be specified to control the direction of standardization:

VARIABLE (keyword),VARIABLE (keyword),VARIABLE (keyword)
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
CASE (keyword),CASE (keyword),CASE (keyword)
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
VARIABLE | Standardize the values for each variable. This setting is the default.
CASE | Standardize the values within each case.

Several standardization methods are available. These methods allow you to equalize selected properties of the values. All methods can be used with either VARIABLE or CASE. Only one standardization method can be specified.

• If STANDARDIZE is omitted, proximities are computed by using the original values (keyword NONE).

• If STANDARDIZE is used without specifications, proximities are computed by using Z scores (keyword Z).

• STANDARDIZE cannot be used with binary measures.

z scores,z scores,z scores
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
Z (keyword),Z (keyword),Z (keyword)
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
RANGE (keyword),RANGE (keyword),RANGE (keyword)
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
RESCALE (keyword),RESCALE (keyword),RESCALE (keyword)
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
MAX (keyword),MAX (keyword),MAX (keyword)
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
MEAN (keyword),MEAN (keyword),MEAN (keyword)
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
SD (keyword),SD (keyword),SD (keyword)
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
NONE | Do not standardize. Proximities are computed by using the original values. This setting is the default if STANDARDIZE is omitted.
Z | Standardize values to Z scores, with a mean of 0 and a standard deviation of 1. PROXIMITIES subtracts the mean value for the variable or case from each value that is being standardized, and then PROXIMITIES divides by the standard deviation. If the standard deviation is 0, PROXIMITIES sets all values for the case or variable to 0. This setting is the default if STANDARDIZE is used without specifications.
RANGE | Standardize values to have a range of 1. PROXIMITIES divides each value that is being standardized by the range of values for the variable or case. If the range is 0, PROXIMITIES leaves all values unchanged.
RESCALE | Standardize values to have a range from 0 to 1. From each value that is being standardized, PROXIMITIES subtracts the minimum value and then divides by the range for the variable or case. If a range is 0, PROXIMITIES sets all values for the case or variable to 0.50.
MAX | Standardize values to a maximum magnitude of 1. PROXIMITIES divides each value that is being standardized by the maximum value for the variable or case. If the maximum of the values is 0, PROXIMITIES divides each value by the absolute magnitude of the smallest value and adds 1.
MEAN | Standardize values to a mean of 1. PROXIMITIES divides each value that is being standardized by the mean of the values for the variable or case. If the mean is 0, PROXIMITIES adds 1 to all values for the case or variable to produce a mean of 1.
SD | Standardize values to unit standard deviation. PROXIMITIES divides each value that is being standardized by the standard deviation of the values for the variable or case. PROXIMITIES does not change the values if their standard deviation is 0.

Example

PROXIMITIES A B C
  /STANDARDIZE=CASE RANGE.

• Within each case, values are standardized to have ranges of 1.

Related Topics

PROXIMITIES
Overview (PROXIMITIES command)
Example (PROXIMITIES command)
Variable Specification (PROXIMITIES command)
VIEW Subcommand (PROXIMITIES command)
MEASURE Subcommand (PROXIMITIES command)
Measures for Interval Data (PROXIMITIES command)
Measures for Frequency-Count Data (PROXIMITIES command)
Measures for Binary Data (PROXIMITIES command)
Transforming Measures in Proximity Matrix (PROXIMITIES command)
PRINT Subcommand (PROXIMITIES command)
ID Subcommand (PROXIMITIES command)
MISSING Subcommand (PROXIMITIES command)
MATRIX Subcommand (PROXIMITIES command)
Matrix Output (PROXIMITIES command)
Matrix Input (PROXIMITIES command)
Format of the Matrix Data File (PROXIMITIES command)
Split Files (PROXIMITIES command)
Example: Matrix Output to PASW Statistics External File (PROXIMITIES command)
Example: Matrix Output to External File (PROXIMITIES command)
Example: Matrix Output to Working File (PROXIMITIES command)
Example: Matrix Input from External File (PROXIMITIES command)
Example: Matrix Input from Working File (PROXIMITIES command)
Example: Matrix Output to and Then Input from Working File (PROXIMITIES command)
Example: Q-factor Analysis (PROXIMITIES command)
References (PROXIMITIES command)


VIEW Subcommand (PROXIMITIES command)

PROXIMITIES (command),PROXIMITIES (command),PROXIMITIES (command)
VIEW subcommand,VIEW subcommand,VIEW subcommand
VIEW (subcommand),VIEW (subcommand),VIEW (subcommand)
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
PROXIMITIES (command),PROXIMITIES (command),PROXIMITIES (command)
computing distances between variables,computing distances between variables,computing distances between variables
PROXIMITIES (command),PROXIMITIES (command),PROXIMITIES (command)
computing distances between cases,computing distances between cases,computing distances between cases

VIEW indicates whether proximities are computed between cases or between variables.

CASE (keyword),CASE (keyword),CASE (keyword)
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
VARIABLE (keyword),VARIABLE (keyword),VARIABLE (keyword)
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
CASE | Compute proximity values between cases. This is the default.
VARIABLE | Compute proximity values between variables.

Related Topics

PROXIMITIES
Overview (PROXIMITIES command)
Example (PROXIMITIES command)
Variable Specification (PROXIMITIES command)
STANDARDIZE Subcommand (PROXIMITIES command)
MEASURE Subcommand (PROXIMITIES command)
Measures for Interval Data (PROXIMITIES command)
Measures for Frequency-Count Data (PROXIMITIES command)
Measures for Binary Data (PROXIMITIES command)
Transforming Measures in Proximity Matrix (PROXIMITIES command)
PRINT Subcommand (PROXIMITIES command)
ID Subcommand (PROXIMITIES command)
MISSING Subcommand (PROXIMITIES command)
MATRIX Subcommand (PROXIMITIES command)
Matrix Output (PROXIMITIES command)
Matrix Input (PROXIMITIES command)
Format of the Matrix Data File (PROXIMITIES command)
Split Files (PROXIMITIES command)
Example: Matrix Output to PASW Statistics External File (PROXIMITIES command)
Example: Matrix Output to External File (PROXIMITIES command)
Example: Matrix Output to Working File (PROXIMITIES command)
Example: Matrix Input from External File (PROXIMITIES command)
Example: Matrix Input from Working File (PROXIMITIES command)
Example: Matrix Output to and Then Input from Working File (PROXIMITIES command)
Example: Q-factor Analysis (PROXIMITIES command)
References (PROXIMITIES command)


MEASURE Subcommand (PROXIMITIES command)

PROXIMITIES (command),PROXIMITIES (command),PROXIMITIES (command)
MEASURE subcommand,MEASURE subcommand,MEASURE subcommand
MEASURE (subcommand),MEASURE (subcommand),MEASURE (subcommand)
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
PROXIMITIES (command),PROXIMITIES (command),PROXIMITIES (command)
transforming measures,transforming measures,transforming measures

MEASURE specifies the similarity, dissimilarity, or distance measure that PROXIMITIES computes. Three transformations are available:

ABSOLUTE (keyword),ABSOLUTE (keyword),ABSOLUTE (keyword)
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
REVERSE (keyword),REVERSE (keyword),REVERSE (keyword)
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
RESCALE (keyword),RESCALE (keyword),RESCALE (keyword)
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
ABSOLUTE | Take the absolute values of the proximities. Use ABSOLUTE when the sign of the values indicates the direction of the relationship (as with correlation coefficients) but only the magnitude of the relationship is of interest.
REVERSE | Transform similarity values into dissimilarities, or vice versa. Use this specification to reverse the ordering of the proximities by negating the values.
RESCALE | Rescale the proximity values to a range of 0 to 1. RESCALE standardizes the proximities by first subtracting the value of the smallest proximity and then dividing by the range. You would not usually use RESCALE with measures that are already standardized on meaningful scales, as are correlations, cosines, and many binary coefficients.

PROXIMITIES can compute any one of a number of measures between items. You can choose among measures for interval data, frequency-count data, or binary data. Available keywords for each type of measures are defined in the following sections.

• Only one measure can be specified. However, each measure can be specified with any of the transformations ABSOLUTE, REVERSE, or RESCALE. To apply a transformation to an existing matrix of proximity values without computing any measures, use keyword NONE (see Transforming Measures in Proximity Matrix (PROXIMITIES command)).

• If more than one transformation is specified, PROXIMITIES handles them in the order listed above: ABSOLUTE, REVERSE, and then RESCALE (regardless of the order in which they are specified).

• Each entry in the resulting proximity matrix represents a pair of items. The items can be either cases or variables, whichever is specified on the VIEW subcommand.

• When the items are cases, the computation for each pair of cases involves pairs of values for the specified variables.

• When the items are variables, the computation for each pair of variables involves pairs of values for the variables across all cases.

Example

PROXIMITIES A B C
  /MEASURE=EUCLID REVERSE.

• MEASURE specifies a EUCLID measure and a REVERSE transformation.

Related Topics

PROXIMITIES
Overview (PROXIMITIES command)
Example (PROXIMITIES command)
Variable Specification (PROXIMITIES command)
STANDARDIZE Subcommand (PROXIMITIES command)
VIEW Subcommand (PROXIMITIES command)
Measures for Interval Data (PROXIMITIES command)
Measures for Frequency-Count Data (PROXIMITIES command)
Measures for Binary Data (PROXIMITIES command)
Transforming Measures in Proximity Matrix (PROXIMITIES command)
PRINT Subcommand (PROXIMITIES command)
ID Subcommand (PROXIMITIES command)
MISSING Subcommand (PROXIMITIES command)
MATRIX Subcommand (PROXIMITIES command)
Matrix Output (PROXIMITIES command)
Matrix Input (PROXIMITIES command)
Format of the Matrix Data File (PROXIMITIES command)
Split Files (PROXIMITIES command)
Example: Matrix Output to PASW Statistics External File (PROXIMITIES command)
Example: Matrix Output to External File (PROXIMITIES command)
Example: Matrix Output to Working File (PROXIMITIES command)
Example: Matrix Input from External File (PROXIMITIES command)
Example: Matrix Input from Working File (PROXIMITIES command)
Example: Matrix Output to and Then Input from Working File (PROXIMITIES command)
Example: Q-factor Analysis (PROXIMITIES command)
References (PROXIMITIES command)


Measures for Interval Data (PROXIMITIES command)

PROXIMITIES (command),PROXIMITIES (command),PROXIMITIES (command)
measures for interval data,measures for interval data,measures for interval data

To obtain proximities for interval data, use one of the following keywords on MEASURE:

EUCLID (keyword),EUCLID (keyword),EUCLID (keyword)
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
Euclidean distance,Euclidean distance,Euclidean distance
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
SEUCLID (keyword),SEUCLID (keyword),SEUCLID (keyword)
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
squared Euclidean distance,squared Euclidean distance,squared Euclidean distance
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
CORRELATION (keyword),CORRELATION (keyword),CORRELATION (keyword)
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
Pearson correlation,Pearson correlation,Pearson correlation
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
POWER (keyword),POWER (keyword),POWER (keyword)
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
customized distance measures,customized distance measures,customized distance measures
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
COSINE (keyword),COSINE (keyword),COSINE (keyword)
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
cosine,cosine,cosine
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
CHEBYCHEV (keyword),CHEBYCHEV (keyword),CHEBYCHEV (keyword)
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
Chebychev distance,Chebychev distance,Chebychev distance
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
BLOCK (keyword),BLOCK (keyword),BLOCK (keyword)
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
city-block distance,city-block distance,city-block distance
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
MINKOWSKI (keyword),MINKOWSKI (keyword),MINKOWSKI (keyword)
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
Minkowski distance,Minkowski distance,Minkowski distance
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
EUCLID Euclidean distance. The distance between two items, x and y, is the square root of the sum of the squared differences between the values for the items. This setting is the default.

EUCLID(x,y)=
√ Σi(xi−yi)2

SEUCLID Squared Euclidean distance. The distance between two items is the sum of the squared differences between the values for the items.

SEUCLID(x,y)=Σi(xi−yi)2

CORRELATION Correlation between vectors of values. This measure is a pattern-similarity measure.

CORRELATION(x,y)=Σi(ZxiZyi)N−1

where Zxi is the Z-score (standardized) value of x for the ith case or variable, and N is the number of cases or variables.
COSINE Cosine of vectors of values. This measure is a pattern-similarity measure.

COSINE(x,y)=Σi(xiyi)
√ (Σix2i)(Σiy2i)

CHEBYCHEV Chebychev distance metric. The distance between two items is the maximum absolute difference between the values for the items.

CHEBYCHEV(x,y)=maxi|xi−yi|

BLOCK City-block or Manhattan distance. The distance between two items is the sum of the absolute differences between the values for the items.

BLOCK(x,y)=Σi|xi−yi|

MINKOWSKI(p) Distance in an absolute Minkowski power metric. The distance between two items is the pth root of the sum of the absolute differences to the pth power between the values for the items. Appropriate selection of the integer parameter p yields Euclidean and many other distance metrics.

MINKOWSKI(x,y)=(Σi|xi−yi|p)1/p

POWER(p,r) Distance in an absolute power metric. The distance between two items is the rth root of the sum of the absolute differences to the pth power between the values for the items. Appropriate selection of the integer parameters p and r yields Euclidean, squared Euclidean, Minkowski, city-block, and many other distance metrics.

POWER(x,y)=(Σi|xi−yi|p)1/r

Related Topics

PROXIMITIES
Overview (PROXIMITIES command)
Example (PROXIMITIES command)
Variable Specification (PROXIMITIES command)
STANDARDIZE Subcommand (PROXIMITIES command)
VIEW Subcommand (PROXIMITIES command)
MEASURE Subcommand (PROXIMITIES command)
Measures for Frequency-Count Data (PROXIMITIES command)
Measures for Binary Data (PROXIMITIES command)
Transforming Measures in Proximity Matrix (PROXIMITIES command)
PRINT Subcommand (PROXIMITIES command)
ID Subcommand (PROXIMITIES command)
MISSING Subcommand (PROXIMITIES command)
MATRIX Subcommand (PROXIMITIES command)
Matrix Output (PROXIMITIES command)
Matrix Input (PROXIMITIES command)
Format of the Matrix Data File (PROXIMITIES command)
Split Files (PROXIMITIES command)
Example: Matrix Output to PASW Statistics External File (PROXIMITIES command)
Example: Matrix Output to External File (PROXIMITIES command)
Example: Matrix Output to Working File (PROXIMITIES command)
Example: Matrix Input from External File (PROXIMITIES command)
Example: Matrix Input from Working File (PROXIMITIES command)
Example: Matrix Output to and Then Input from Working File (PROXIMITIES command)
Example: Q-factor Analysis (PROXIMITIES command)
References (PROXIMITIES command)


Measures for Frequency-Count Data (PROXIMITIES command)

PROXIMITIES (command),PROXIMITIES (command),PROXIMITIES (command)
measures for frequency-count data,measures for frequency-count data,measures for frequency-count data

To obtain proximities for frequency-count data, use either of the following keywords on MEASURE:

chi-square,chi-square,chi-square
distance measure,distance measure,distance measure
CHISQ (keyword),CHISQ (keyword),CHISQ (keyword)
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
phi-square distance measure,phi-square distance measure,phi-square distance measure
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
PH2 (keyword),PH2 (keyword),PH2 (keyword)
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
CHISQ Based on the chi-square test of equality for two sets of frequencies. The magnitude of this dissimilarity measure depends on the total frequencies of the two cases or variables whose dissimilarity is computed. Expected values are from the model of independence of cases or variables x and y.

CHISQ(x,y)=
√ Σi(xi−E(xi))2E(xi)+Σi(yi−E(yi))2E(yi)

PH2 Phi-square between sets of frequencies. This measure is the CHISQ measure normalized by the square root of the combined frequency. Therefore, its value does not depend on the total frequencies of the two cases or variables whose dissimilarity is computed.

PH2(x,y)=
√ Σi(xi−E(xi))2E(xi)+Σi(yi−E(yi))2E(yi)N

Related Topics

PROXIMITIES
Overview (PROXIMITIES command)
Example (PROXIMITIES command)
Variable Specification (PROXIMITIES command)
STANDARDIZE Subcommand (PROXIMITIES command)
VIEW Subcommand (PROXIMITIES command)
MEASURE Subcommand (PROXIMITIES command)
Measures for Interval Data (PROXIMITIES command)
Measures for Binary Data (PROXIMITIES command)
Transforming Measures in Proximity Matrix (PROXIMITIES command)
PRINT Subcommand (PROXIMITIES command)
ID Subcommand (PROXIMITIES command)
MISSING Subcommand (PROXIMITIES command)
MATRIX Subcommand (PROXIMITIES command)
Matrix Output (PROXIMITIES command)
Matrix Input (PROXIMITIES command)
Format of the Matrix Data File (PROXIMITIES command)
Split Files (PROXIMITIES command)
Example: Matrix Output to PASW Statistics External File (PROXIMITIES command)
Example: Matrix Output to External File (PROXIMITIES command)
Example: Matrix Output to Working File (PROXIMITIES command)
Example: Matrix Input from External File (PROXIMITIES command)
Example: Matrix Input from Working File (PROXIMITIES command)
Example: Matrix Output to and Then Input from Working File (PROXIMITIES command)
Example: Q-factor Analysis (PROXIMITIES command)
References (PROXIMITIES command)


Measures for Binary Data (PROXIMITIES command)

PROXIMITIES (command),PROXIMITIES (command),PROXIMITIES (command)
measures for binary data,measures for binary data,measures for binary data

Different binary measures emphasize different aspects of the relationship between sets of binary values. However, all measures are specified in the same way. Each measure has two optional integer-valued parameters, p (present) and np (not present).

• If both parameters are specified, PROXIMITIES uses the value of the first parameter as an indicator that a characteristic is present, and PROXIMITIES uses the value of the second parameter as an indicator that a characteristic is absent. PROXIMITIES skips all other values.

• If only the first parameter is specified, PROXIMITIES uses that value to indicate presence and uses all other values to indicate absence.

• If no parameters are specified, PROXIMITIES assumes that 1 indicates presence and 0 indicates absence.

Using the indicators for presence and absence within each item (case or variable), PROXIMITIES constructs a 2×2 contingency table for each pair of items and uses this table to compute a proximity measure for the pair.

 | Item 2 characteristics
 | Present | Absent
Item 1 characteristics |  |
Present | a | b
Absent | c | d

PROXIMITIES computes all binary measures from the values of a, b, c, and d. These values are tallied across variables (when the items are cases) or cases (when the items are variables). For example, if variables V, W, X, Y, Z have values 0, 1, 1, 0, 1 for case 1 and have values 0, 1, 1, 0, 0 for case 2 (where 1 indicates presence and 0 indicates absence), the contingency table is as follows:

 | Case 2 characteristics
 | Present | Absent
Case 1 characteristics |  |
Present | 2 | 1
Absent | 0 | 2

The contingency table indicates that both cases are present for two variables (W and X), both cases are absent for two variables (V and Y), and case 1 is present and case 2 is absent for one variable (Z). There are no variables for which case 1 is absent and case 2 is present.

The available binary measures include matching coefficients, conditional probabilities, predictability measures, and other measures.

matching coefficients,matching coefficients,matching coefficients
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command

Matching Coefficients. The following table shows a classification scheme for PROXIMITIES matching coefficients. In this scheme, matches are joint presences (value a in the contingency table) or joint absences (value d). Nonmatches are equal in number to value b plus value c. Matches and nonmatches may be weighted equally or not. The three coefficients JACCARD, DICE, and SS2 are related monotonically, as are SM, SS1, and RT. All coefficients in the table are similarity measures, and all coefficients exceptK1 and SS3 range from 0 to 1. K1 and SS3 have a minimum value of 0 and have no upper limit.

Binary matching coefficients in PROXIMITIES
 | Joint absences excluded from numerator | Joint absences included in numerator
All matches included in denominator |  |
Equal weight for matches and nonmatches | RR | SM
Double weight for matches |  | SS1
Double weight for nonmatches |  | RT
Joint absences excluded from denominator |  |
Equal weight for matches and nonmatches | JACCARD |
Double weight for matches | DICE |
Double weight for nonmatches | SS2 |
All matches excluded from denominator |  |
Equal weight for matches and nonmatches | K1 | SS3
Russell and Rao measure,Russell and Rao measure,Russell and Rao measure
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
RR (keyword),RR (keyword),RR (keyword)
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
simple matching measure,simple matching measure,simple matching measure
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
SM (keyword),SM (keyword),SM (keyword)
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
Jaccard similarity ratio,Jaccard similarity ratio,Jaccard similarity ratio
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
JACCARD (keyword),JACCARD (keyword),JACCARD (keyword)
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
Dice measure,Dice measure,Dice measure
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
Kulczynski measures,Kulczynski measures,Kulczynski measures
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
K1 (keyword),K1 (keyword),K1 (keyword)
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
DICE (keyword),DICE (keyword),DICE (keyword)
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
Sokal and Sneath measures,Sokal and Sneath measures,Sokal and Sneath measures
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
SS1 through SS5 (keywords),SS1 through SS5 (keywords),SS1 through SS5 (keywords)
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
Rogers and Tanimoto measure,Rogers and Tanimoto measure,Rogers and Tanimoto measure
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
RT (keyword),RT (keyword),RT (keyword)
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
RR[(p[,np])] | Russell and Rao similarity measure. This measure is the binary dot product. RR(x,y)=aa+b+c+d
SM[(p[,np])] | Simple matching similarity measure. This measure is the ratio of the number of matches to the total number of characteristics. SM(x,y)=a+da+b+c+d
JACCARD[(p[,np])] | Jaccard similarity measure. This measure is also known as the similarity ratio. JACCARD(x,y)=aa+b+c
DICE[(p[,np])] | Dice (or Czekanowski or Sorenson) similarity measure. DICE(x,y)=2a2a+b+c
SS1[(p[,np])] | Sokal and Sneath similarity measure 1. SS1(x,y)=2(a+d)2(a+d)+b+c+d
RT[(p[,np])] | Rogers and Tanimoto similarity measure. RT(x,y)=a+da+d+2(b+c)
SS2[(p[,np])] | Sokal and Sneath similarity measure 2. SS2(x,y)=aa+2(b+c)
K1[(p[,np])] | Kulczynski similarity measure 1. This measure has a minimum value of 0 and no upper limit. The measure is undefined when there are no nonmatches (b=0 and c=0). K1(x,y)=ab+c
SS3[(p[,np])] | Sokal and Sneath similarity measure 3. This measure has a minimum value of 0 and no upper limit. The measure is undefined when there are no nonmatches (b=0 and c=0). SS3(x,y)=a+db+c
conditional probability,conditional probability,conditional probability
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command

Conditional Probabilities. The following binary measures yield values that can be interpreted in terms of conditional probability. All three measures are similarity measures.

K2 (keyword),K2 (keyword),K2 (keyword)
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
Hamann measure,Hamann measure,Hamann measure
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
HAMANN (keyword),HAMANN (keyword),HAMANN (keyword)
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
K2[(p[,np])] | Kulczynski similarity measure 2. This measure yields the average conditional probability that a characteristic is present in one item given that the characteristic is present in the other item. The measure is an average over both items that are acting as predictors. The measure has a range of 0 to 1. K2(x,y)=a/(a+b)+a/(a+c)2
SS4[(p[,np])] | Sokal and Sneath similarity measure 4. This measure yields the conditional probability that a characteristic of one item is in the same state (presence or absence) as the characteristic of the other item. The measure is an average over both items that are acting as predictors. The measure has a range of 0 to 1. SS4(x,y)=a/(a+b)+a/(a+c)+d/(b+d)+d/(c+d)4
HAMANN[(p[,np])] | Hamann similarity measure. This measure gives the probability that a characteristic has the same state in both items (present in both or absent from both) minus the probability that a characteristic has different states in the two items (present in one and absent from the other). HAMANN has a range of −1 to +1 and is monotonically related to SM, SS1, and RT. HAMANN(x,y)=(a+d)−(b+c)a+b+c+d
predictability measures,predictability measures,predictability measures
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command

Predictability Measures. The following four binary measures assess the association between items as the predictability of one item given the other item. All four measures yield similarities.

lambda,lambda,lambda
Goodman and Kruskal's,Goodman and Kruskal's,Goodman and Kruskal's
Yule's Q,Yule's Q,Yule's Q
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
Q (keyword),Q (keyword),Q (keyword)
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
LAMBDA (keyword),LAMBDA (keyword),LAMBDA (keyword)
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
Anderberg's D,Anderberg's D,Anderberg's D
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
D (keyword),D (keyword),D (keyword)
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
Yule's Y,Yule's Y,Yule's Y
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
Y (keyword),Y (keyword),Y (keyword)
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
LAMBDA[(p[,np])] Goodman and Kruskal’s lambda (similarity). This coefficient assesses the predictability of the state of a characteristic on one item (present or absent) given the state on the other item. Specifically, LAMBDA measures the proportional reduction in error, using one item to predict the other item when the directions of prediction are of equal importance. LAMBDA has a range of 0 to 1.

LAMBDA(x,y)=t1−t22(a+b+c+d)−t2

where

t1 = max(a, b) + max(c, d) + max(a, c) + max(b,d)

t2 = max(a + c, b + d) + max(a + d, c + d).

D[(p[,np])] Anderberg’s D (similarity). This coefficient assesses the predictability of the state of a characteristic on one item (present or absent) given the state on the other item. D measures the actual reduction in the error probability when one item is used to predict the other item. The range of D is 0 to 1.

D(x,y)=t1−t22(a+b+c+d)

where

t1 = max(a, b) + max(c, d) + max(a, c) + max(b,d)

t2 = max(a + c, b + d) + max(a + d, c + d)

Y[(p[,np])] Yule’s Y coefficient of colligation (similarity). This measure is a function of the cross ratio for a 2×2 table and has a range of −1 to +1.

Y(x,y)=
√ ad
−
√ bc
√ ad
+
√ bc

Q[(p[,np])] Yule’s Q (similarity). This measure is the 2×2 version of Goodman and Kruskal’s ordinal measure gamma. Like Yule’s Y, Q is a function of the cross ratio for a 2×2 table and has a range of −1 to +1.

Other Binary Measures. The remaining binary measures that are available in PROXIMITIES are either binary equivalents of association measures for continuous variables or measures of special properties of the relationship between items.

Ochiai measure,Ochiai measure,Ochiai measure
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
OCHIAI (keyword),OCHIAI (keyword),OCHIAI (keyword)
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
binary Euclidean distance,binary Euclidean distance,binary Euclidean distance
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
BEUCLID (keyword),BEUCLID (keyword),BEUCLID (keyword)
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
phi four-point correlation,phi four-point correlation,phi four-point correlation
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
PHI (keyword),PHI (keyword),PHI (keyword)
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
binary squared Euclidean distance,binary squared Euclidean distance,binary squared Euclidean distance
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
BSEUCLID (keyword),BSEUCLID (keyword),BSEUCLID (keyword)
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
size difference measure,size difference measure,size difference measure
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
binary variance measure,binary variance measure,binary variance measure
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
VARIANCE (keyword),VARIANCE (keyword),VARIANCE (keyword)
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
SIZE (keyword),SIZE (keyword),SIZE (keyword)
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
pattern difference measure,pattern difference measure,pattern difference measure
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
Lance and Williams dissimilarity measure,Lance and Williams dissimilarity measure,Lance and Williams dissimilarity measure
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
BLWMN (keyword),BLWMN (keyword),BLWMN (keyword)
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
PATTERN (keyword),PATTERN (keyword),PATTERN (keyword)
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
dispersion,dispersion,dispersion
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
DISPER (keyword),DISPER (keyword),DISPER (keyword)
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
binary shape difference,binary shape difference,binary shape difference
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
BSHAPE (keyword),BSHAPE (keyword),BSHAPE (keyword)
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
OCHIAI[(p[,np])] Ochiai similarity measure. This measure is the binary form of the cosine and has a range of 0 to 1.

OCHIAI(x,y)=
√ aa+baa+c

SS5[(p[,np])] Sokal and Sneath similarity measure 5. The range is 0 to 1.

SS5(x,y)=ad
√ (a+b)(a+c)(b+d)(c+d)

PHI[(p[,np])] Fourfold point correlation (similarity). This measure is the binary form of the Pearson product-moment correlation coefficient.

PHI(x,y)=ad−bc
√ (a+b)(a+c)(b+d)(c+d)

BEUCLID[(p[,np])] Binary Euclidean distance. This measure is a distance measure. Its minimum value is 0, and it has no upper limit.

BEUCLID(x,y)=
√ b+c

BSEUCLID[(p[,np])] Binary squared Euclidean distance. This measure is a distance measure. Its minimum value is 0, and it has no upper limit.

BSEUCLID(x,y)=b+c

SIZE[(p[,np])] Size difference. This measure is a dissimilarity measure with a minimum value of 0 and no upper limit.

SIZE(x,y)=(b−c)2(a+b+c+d)2

PATTERN[(p[,np])] Pattern difference. This measure is a dissimilarity measure. The range is 0 to 1.

PATTERN(x,y)=bc(a+b+c+d)2

BSHAPE[(p[,np])] Binary shape difference. This dissimilarity measure has no upper limit or lower limit.

BSHAPE(x,y)=(a+b+c+d)(b+c)−(b−c)2(a+b+c+d)2

DISPER[(p[,np])] Dispersion similarity measure. The range is −1 to +1.

DISPER(x,y)=ad−bc(a+b+c+d)2

VARIANCE[(p[,np])] Variance dissimilarity measure. This measure has a minimum value of 0 and no upper limit.

VARIANCE(x,y)=b+c4(a+b+c+d)

BLWMN[(p[,np])] Binary Lance-and-Williams nonmetric dissimilarity measure. This measure is also known as the Bray-Curtis nonmetric coefficient. The range is 0 to 1.

BLWMN(x,y)=b+c2a+b+c

Example

PROXIMITIES A B C
  /MEASURE=RR(1,2).

• MEASURE computes Russell and Rao coefficients from data in which 1 indicates the presence of a characteristic and 2 indicates the absence. Other values are ignored.

Example

PROXIMITIES A B C
  /MEASURE=SM(2).

• MEASURE computes simple matching coefficients from data in which 2 indicates presence and all other values indicate absence.

Related Topics

PROXIMITIES
Overview (PROXIMITIES command)
Example (PROXIMITIES command)
Variable Specification (PROXIMITIES command)
STANDARDIZE Subcommand (PROXIMITIES command)
VIEW Subcommand (PROXIMITIES command)
MEASURE Subcommand (PROXIMITIES command)
Measures for Interval Data (PROXIMITIES command)
Measures for Frequency-Count Data (PROXIMITIES command)
Transforming Measures in Proximity Matrix (PROXIMITIES command)
PRINT Subcommand (PROXIMITIES command)
ID Subcommand (PROXIMITIES command)
MISSING Subcommand (PROXIMITIES command)
MATRIX Subcommand (PROXIMITIES command)
Matrix Output (PROXIMITIES command)
Matrix Input (PROXIMITIES command)
Format of the Matrix Data File (PROXIMITIES command)
Split Files (PROXIMITIES command)
Example: Matrix Output to PASW Statistics External File (PROXIMITIES command)
Example: Matrix Output to External File (PROXIMITIES command)
Example: Matrix Output to Working File (PROXIMITIES command)
Example: Matrix Input from External File (PROXIMITIES command)
Example: Matrix Input from Working File (PROXIMITIES command)
Example: Matrix Output to and Then Input from Working File (PROXIMITIES command)
Example: Q-factor Analysis (PROXIMITIES command)
References (PROXIMITIES command)


Transforming Measures in Proximity Matrix (PROXIMITIES command)

Use keyword NONE to apply the ABSOLUTE, REVERSE, and/or RESCALE transformations to an existing matrix of proximity values without computing any proximity measures.

NONE Do not compute proximity measures. Use NONE only if you have specified an existing proximity matrix on keyword IN on the MATRIX subcommand.

Related Topics

PROXIMITIES
Overview (PROXIMITIES command)
Example (PROXIMITIES command)
Variable Specification (PROXIMITIES command)
STANDARDIZE Subcommand (PROXIMITIES command)
VIEW Subcommand (PROXIMITIES command)
MEASURE Subcommand (PROXIMITIES command)
Measures for Interval Data (PROXIMITIES command)
Measures for Frequency-Count Data (PROXIMITIES command)
Measures for Binary Data (PROXIMITIES command)
PRINT Subcommand (PROXIMITIES command)
ID Subcommand (PROXIMITIES command)
MISSING Subcommand (PROXIMITIES command)
MATRIX Subcommand (PROXIMITIES command)
Matrix Output (PROXIMITIES command)
Matrix Input (PROXIMITIES command)
Format of the Matrix Data File (PROXIMITIES command)
Split Files (PROXIMITIES command)
Example: Matrix Output to PASW Statistics External File (PROXIMITIES command)
Example: Matrix Output to External File (PROXIMITIES command)
Example: Matrix Output to Working File (PROXIMITIES command)
Example: Matrix Input from External File (PROXIMITIES command)
Example: Matrix Input from Working File (PROXIMITIES command)
Example: Matrix Output to and Then Input from Working File (PROXIMITIES command)
Example: Q-factor Analysis (PROXIMITIES command)
References (PROXIMITIES command)


PRINT Subcommand (PROXIMITIES command)

PROXIMITIES (command),PROXIMITIES (command),PROXIMITIES (command)
PRINT subcommand,PRINT subcommand,PRINT subcommand
PRINT (subcommand),PRINT (subcommand),PRINT (subcommand)
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
PROXIMITIES (command),PROXIMITIES (command),PROXIMITIES (command)
displaying distance matrix,displaying distance matrix,displaying distance matrix

PROXIMITIES always prints the name of the measure that it computes and the number of cases. Use PRINT to control printing of the proximity matrix.

PROXIMITIES (keyword),PROXIMITIES (keyword),PROXIMITIES (keyword)
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
PROXIMITIES | Print the matrix of the proximities between items. This setting is the default. The matrix may have been either read or computed. When the number of cases or variables is large, this specification produces a large volume of output and uses significant CPU time.
NONE | Do not print the matrix of proximities.

Related Topics

PROXIMITIES
Overview (PROXIMITIES command)
Example (PROXIMITIES command)
Variable Specification (PROXIMITIES command)
STANDARDIZE Subcommand (PROXIMITIES command)
VIEW Subcommand (PROXIMITIES command)
MEASURE Subcommand (PROXIMITIES command)
Measures for Interval Data (PROXIMITIES command)
Measures for Frequency-Count Data (PROXIMITIES command)
Measures for Binary Data (PROXIMITIES command)
Transforming Measures in Proximity Matrix (PROXIMITIES command)
ID Subcommand (PROXIMITIES command)
MISSING Subcommand (PROXIMITIES command)
MATRIX Subcommand (PROXIMITIES command)
Matrix Output (PROXIMITIES command)
Matrix Input (PROXIMITIES command)
Format of the Matrix Data File (PROXIMITIES command)
Split Files (PROXIMITIES command)
Example: Matrix Output to PASW Statistics External File (PROXIMITIES command)
Example: Matrix Output to External File (PROXIMITIES command)
Example: Matrix Output to Working File (PROXIMITIES command)
Example: Matrix Input from External File (PROXIMITIES command)
Example: Matrix Input from Working File (PROXIMITIES command)
Example: Matrix Output to and Then Input from Working File (PROXIMITIES command)
Example: Q-factor Analysis (PROXIMITIES command)
References (PROXIMITIES command)


ID Subcommand (PROXIMITIES command)

PROXIMITIES (command),PROXIMITIES (command),PROXIMITIES (command)
labeling cases,labeling cases,labeling cases
PROXIMITIES (command),PROXIMITIES (command),PROXIMITIES (command)
ID subcommand,ID subcommand,ID subcommand
ID (subcommand),ID (subcommand),ID (subcommand)
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command

By default, PROXIMITIES identifies cases by case number alone. Use ID to specify an identifying string variable for cases.

• Any string variable in the active dataset can be named as the identifier. PROXIMITIES uses the first eight characters of this variable to identify cases in the output.

• When used with the MATRIX IN subcommand, the variable that is specified on the ID subcommand identifies the labeling variable in the matrix file.

Related Topics

PROXIMITIES
Overview (PROXIMITIES command)
Example (PROXIMITIES command)
Variable Specification (PROXIMITIES command)
STANDARDIZE Subcommand (PROXIMITIES command)
VIEW Subcommand (PROXIMITIES command)
MEASURE Subcommand (PROXIMITIES command)
Measures for Interval Data (PROXIMITIES command)
Measures for Frequency-Count Data (PROXIMITIES command)
Measures for Binary Data (PROXIMITIES command)
Transforming Measures in Proximity Matrix (PROXIMITIES command)
PRINT Subcommand (PROXIMITIES command)
MISSING Subcommand (PROXIMITIES command)
MATRIX Subcommand (PROXIMITIES command)
Matrix Output (PROXIMITIES command)
Matrix Input (PROXIMITIES command)
Format of the Matrix Data File (PROXIMITIES command)
Split Files (PROXIMITIES command)
Example: Matrix Output to PASW Statistics External File (PROXIMITIES command)
Example: Matrix Output to External File (PROXIMITIES command)
Example: Matrix Output to Working File (PROXIMITIES command)
Example: Matrix Input from External File (PROXIMITIES command)
Example: Matrix Input from Working File (PROXIMITIES command)
Example: Matrix Output to and Then Input from Working File (PROXIMITIES command)
Example: Q-factor Analysis (PROXIMITIES command)
References (PROXIMITIES command)


MISSING Subcommand (PROXIMITIES command)

PROXIMITIES (command),PROXIMITIES (command),PROXIMITIES (command)
MISSING subcommand,MISSING subcommand,MISSING subcommand
MISSING (subcommand),MISSING (subcommand),MISSING (subcommand)
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
PROXIMITIES (command),PROXIMITIES (command),PROXIMITIES (command)
missing values,missing values,missing values

MISSING controls the treatment of cases with missing values.

• PROXIMITIES deletes cases with missing values listwise. By default, PROXIMITIES excludes user-missing values from the analysis.

EXCLUDE (keyword),EXCLUDE (keyword),EXCLUDE (keyword)
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
INCLUDE (keyword),INCLUDE (keyword),INCLUDE (keyword)
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
EXCLUDE | Exclude cases with user-missing values. This setting is the default.
INCLUDE | Include cases with user-missing values. Only cases with system-missing values are deleted.

Related Topics

PROXIMITIES
Overview (PROXIMITIES command)
Example (PROXIMITIES command)
Variable Specification (PROXIMITIES command)
STANDARDIZE Subcommand (PROXIMITIES command)
VIEW Subcommand (PROXIMITIES command)
MEASURE Subcommand (PROXIMITIES command)
Measures for Interval Data (PROXIMITIES command)
Measures for Frequency-Count Data (PROXIMITIES command)
Measures for Binary Data (PROXIMITIES command)
Transforming Measures in Proximity Matrix (PROXIMITIES command)
PRINT Subcommand (PROXIMITIES command)
ID Subcommand (PROXIMITIES command)
MATRIX Subcommand (PROXIMITIES command)
Matrix Output (PROXIMITIES command)
Matrix Input (PROXIMITIES command)
Format of the Matrix Data File (PROXIMITIES command)
Split Files (PROXIMITIES command)
Example: Matrix Output to PASW Statistics External File (PROXIMITIES command)
Example: Matrix Output to External File (PROXIMITIES command)
Example: Matrix Output to Working File (PROXIMITIES command)
Example: Matrix Input from External File (PROXIMITIES command)
Example: Matrix Input from Working File (PROXIMITIES command)
Example: Matrix Output to and Then Input from Working File (PROXIMITIES command)
Example: Q-factor Analysis (PROXIMITIES command)
References (PROXIMITIES command)


MATRIX Subcommand (PROXIMITIES command)

PROXIMITIES (command),PROXIMITIES (command),PROXIMITIES (command)
MATRIX subcommand,MATRIX subcommand,MATRIX subcommand
MATRIX (subcommand),MATRIX (subcommand),MATRIX (subcommand)
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
PROXIMITIES (command),PROXIMITIES (command),PROXIMITIES (command)
matrix output,matrix output,matrix output
PROXIMITIES (command),PROXIMITIES (command),PROXIMITIES (command)
matrix input,matrix input,matrix input
matrix output,matrix output,matrix output
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
matrix input,matrix input,matrix input
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command

MATRIX reads and writes matrix data files.

IN (keyword),IN (keyword),IN (keyword)
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command
OUT (keyword),OUT (keyword),OUT (keyword)
PROXIMITIES command,PROXIMITIES command,PROXIMITIES command

• Either IN or OUT and the matrix file in parentheses are required. When both IN and OUT are used on the same PROXIMITIES command, they can be specified on separate MATRIX subcommands or on the same subcommand.

OUT ('savfile'|'dataset') | Write a matrix data file or dataset. Specify either a filename, a previously declared dataset name, or an asterisk, enclosed in parentheses. Filenames should be enclosed in quotes and are stored in the working directory unless a path is included as part of the file specification. If you specify an asterisk (*), the matrix data file replaces the active dataset. If you specify an asterisk or a dataset name, the file is not stored on disk unless you use SAVE or XSAVE.
IN ('savfile'|'dataset') | Read a matrix data file or dataset. Specify either a filename, dataset name created during the current session, or an asterisk enclosed in parentheses. An asterisk reads the matrix data from the active dataset. Filenames should be enclosed in quotes and are read from the working directory unless a path is included as part of the file specification.

When a matrix is produced by using the MATRIX OUT subcommand, the matrix corresponds to a unique dataset. All subsequent analyses that are performed on this matrix would match the corresponding analysis on the original data. However, if the data file is altered in any way, this matching process would no longer occur.

For example, if the original file is edited or rearranged it would no longer correspond to the initially produced matrix. You need to make sure that the data match the matrix whenever inferring the results from the matrix analysis. Specifically, when the cluster membership is saved into an active dataset in the CLUSTER procedure, the proximity matrix in the MATRIX IN statement must match the current active dataset.

Related Topics

PROXIMITIES
Overview (PROXIMITIES command)
Example (PROXIMITIES command)
Variable Specification (PROXIMITIES command)
STANDARDIZE Subcommand (PROXIMITIES command)
VIEW Subcommand (PROXIMITIES command)
MEASURE Subcommand (PROXIMITIES command)
Measures for Interval Data (PROXIMITIES command)
Measures for Frequency-Count Data (PROXIMITIES command)
Measures for Binary Data (PROXIMITIES command)
Transforming Measures in Proximity Matrix (PROXIMITIES command)
PRINT Subcommand (PROXIMITIES command)
ID Subcommand (PROXIMITIES command)
MISSING Subcommand (PROXIMITIES command)
Matrix Output (PROXIMITIES command)
Matrix Input (PROXIMITIES command)
Format of the Matrix Data File (PROXIMITIES command)
Split Files (PROXIMITIES command)
Example: Matrix Output to PASW Statistics External File (PROXIMITIES command)
Example: Matrix Output to External File (PROXIMITIES command)
Example: Matrix Output to Working File (PROXIMITIES command)
Example: Matrix Input from External File (PROXIMITIES command)
Example: Matrix Input from Working File (PROXIMITIES command)
Example: Matrix Output to and Then Input from Working File (PROXIMITIES command)
Example: Q-factor Analysis (PROXIMITIES command)
References (PROXIMITIES command)


Matrix Output (PROXIMITIES command)

PROXIMITIES (command),PROXIMITIES (command),PROXIMITIES (command)
matrix output,matrix output,matrix output

• PROXIMITIES writes a variety of proximity matrices, each matrix with ROWTYPE_ values of PROX. PROXIMITIES neither reads nor writes additional statistics with its matrix materials. See Format of the Matrix Data File (PROXIMITIES command) for a description of the file.

• The matrices that PROXIMITIES writes can be used by PROXIMITIES or other procedures. Procedures CLUSTER and ALSCAL can read a proximity matrix directly. Procedure FACTOR can read a correlation matrix that is written by PROXIMITIES, but RECODE must first be used to change the ROWTYPE_ value PROX to ROWTYPE_ value CORR. Also, the ID subcommand cannot be used on PROXIMITIES if the matrix will be used in FACTOR.

• If VIEW=VARIABLE, the variables in the matrix file will have the names and labels of the original variables.

• If VIEW=CASE (the default), the variables in the matrix file are named VAR1, VAR2, ...VARn, where n is the sequential number of the variable in the new file. The numeric suffix n is consecutive and does not necessarily match the number of the actual case. If there are no split files, the case number appears in the variable label in the form CASE m. The numeric suffix m is the actual case number and may not be consecutive (for example, if cases were selected before PROXIMITIES was executed).

• If VIEW=CASE, a numeric variable CASENO_ is added to the matrix file. Values of CASENO_ are the case numbers in the original file.

• The new file preserves the names and values of any split-file variables that are in effect. When split-file processing is in effect, no labels are generated for variables in the new file. The actual case number is retained by the variable ID.

• Any documents that are contained in the active dataset are not transferred to the matrix file.

Related Topics

PROXIMITIES
Overview (PROXIMITIES command)
Example (PROXIMITIES command)
Variable Specification (PROXIMITIES command)
STANDARDIZE Subcommand (PROXIMITIES command)
VIEW Subcommand (PROXIMITIES command)
MEASURE Subcommand (PROXIMITIES command)
Measures for Interval Data (PROXIMITIES command)
Measures for Frequency-Count Data (PROXIMITIES command)
Measures for Binary Data (PROXIMITIES command)
Transforming Measures in Proximity Matrix (PROXIMITIES command)
PRINT Subcommand (PROXIMITIES command)
ID Subcommand (PROXIMITIES command)
MISSING Subcommand (PROXIMITIES command)
MATRIX Subcommand (PROXIMITIES command)
Matrix Input (PROXIMITIES command)
Format of the Matrix Data File (PROXIMITIES command)
Split Files (PROXIMITIES command)
Example: Matrix Output to PASW Statistics External File (PROXIMITIES command)
Example: Matrix Output to External File (PROXIMITIES command)
Example: Matrix Output to Working File (PROXIMITIES command)
Example: Matrix Input from External File (PROXIMITIES command)
Example: Matrix Input from Working File (PROXIMITIES command)
Example: Matrix Output to and Then Input from Working File (PROXIMITIES command)
Example: Q-factor Analysis (PROXIMITIES command)
References (PROXIMITIES command)


Matrix Input (PROXIMITIES command)

PROXIMITIES (command),PROXIMITIES (command),PROXIMITIES (command)
matrix input,matrix input,matrix input

• PROXIMITIES can read a matrix file that is written by a previous PROXIMITIES procedure.

• Values for split-file variables should precede values for ROWTYPE_. CASENO_ and the labeling variable (if present) should come after ROWTYPE_ and before VARNAME_.

• If CASENO_ is of type string rather than numeric, it is considered unavailable and a warning is issued.

• If CASENO_ appears on a variable list, a syntax error results.

• PROXIMITIES ignores unrecognized ROWTYPE_ values. In addition, PROXIMITIES ignores variables that are present in the matrix file that are not specified (or used by default) on the PROXIMITIES variable list.

• The program reads variable names, variable and value labels, and print and write formats from the dictionary of the matrix data file.

• MATRIX=IN cannot be used unless an active dataset has already been defined. To read an existing matrix data file at the beginning of a session, use GET to retrieve the matrix file, and then specify IN(*) on MATRIX.

• When you read a matrix that is created with MATRIX DATA, you should supply a value label for PROX of either SIMILARITY or DISSIMILARITY so that the matrix is correctly identified. If you do not supply a label, PROXIMITIES assumes DISSIMILARITY. See Format of the Matrix Data File (PROXIMITIES command).

• The variable list on PROXIMITIES can be omitted when a matrix file is used as input. When the variable list is omitted, all variables in the matrix data file are used in the analysis. If a variable list is specified, the specified variables can be a subset of the variables in the matrix file.

• With a large number of variables, the matrix data file will wrap when displayed (as with LIST) and will be difficult to read. Nonetheless, the matrix values are accurate and can be used as matrix input.

Related Topics

PROXIMITIES
Overview (PROXIMITIES command)
Example (PROXIMITIES command)
Variable Specification (PROXIMITIES command)
STANDARDIZE Subcommand (PROXIMITIES command)
VIEW Subcommand (PROXIMITIES command)
MEASURE Subcommand (PROXIMITIES command)
Measures for Interval Data (PROXIMITIES command)
Measures for Frequency-Count Data (PROXIMITIES command)
Measures for Binary Data (PROXIMITIES command)
Transforming Measures in Proximity Matrix (PROXIMITIES command)
PRINT Subcommand (PROXIMITIES command)
ID Subcommand (PROXIMITIES command)
MISSING Subcommand (PROXIMITIES command)
MATRIX Subcommand (PROXIMITIES command)
Matrix Output (PROXIMITIES command)
Format of the Matrix Data File (PROXIMITIES command)
Split Files (PROXIMITIES command)
Example: Matrix Output to PASW Statistics External File (PROXIMITIES command)
Example: Matrix Output to External File (PROXIMITIES command)
Example: Matrix Output to Working File (PROXIMITIES command)
Example: Matrix Input from External File (PROXIMITIES command)
Example: Matrix Input from Working File (PROXIMITIES command)
Example: Matrix Output to and Then Input from Working File (PROXIMITIES command)
Example: Q-factor Analysis (PROXIMITIES command)
References (PROXIMITIES command)


Format of the Matrix Data File (PROXIMITIES command)

• The matrix data file includes three special variables created by the program: ROWTYPE_, VARNAME_, and CASENO_. Variable ROWTYPE_ is a short string variable with value PROX (for proximity measure). PROX is assigned value labels containing the distance measure that is used to create the matrix and either SIMILARITY or DISSIMILARITY as an identifier. Variable VARNAME_ is a short string variable whose values are the names of the new variables. Variable CASENO_ is a numeric variable with values equal to the original case numbers.

• The matrix file includes the string variable that is named on the ID subcommand. This variable is used to identify cases. Up to 20 characters can be displayed for the identifier variable; longer values are truncated. The identifier variable is present only when VIEW=CASE (the default) and when the ID subcommand is used.

• The remaining variables in the matrix file are the variables that are used to form the matrix.

Related Topics

PROXIMITIES
Overview (PROXIMITIES command)
Example (PROXIMITIES command)
Variable Specification (PROXIMITIES command)
STANDARDIZE Subcommand (PROXIMITIES command)
VIEW Subcommand (PROXIMITIES command)
MEASURE Subcommand (PROXIMITIES command)
Measures for Interval Data (PROXIMITIES command)
Measures for Frequency-Count Data (PROXIMITIES command)
Measures for Binary Data (PROXIMITIES command)
Transforming Measures in Proximity Matrix (PROXIMITIES command)
PRINT Subcommand (PROXIMITIES command)
ID Subcommand (PROXIMITIES command)
MISSING Subcommand (PROXIMITIES command)
MATRIX Subcommand (PROXIMITIES command)
Matrix Output (PROXIMITIES command)
Matrix Input (PROXIMITIES command)
Split Files (PROXIMITIES command)
Example: Matrix Output to PASW Statistics External File (PROXIMITIES command)
Example: Matrix Output to External File (PROXIMITIES command)
Example: Matrix Output to Working File (PROXIMITIES command)
Example: Matrix Input from External File (PROXIMITIES command)
Example: Matrix Input from Working File (PROXIMITIES command)
Example: Matrix Output to and Then Input from Working File (PROXIMITIES command)
Example: Q-factor Analysis (PROXIMITIES command)
References (PROXIMITIES command)


Split Files (PROXIMITIES command)

• When split-file processing is in effect, the first variables in the matrix system file are the split variables, followed by ROWTYPE_, the case-identifier variable (if VIEW=CASE and ID are used), VARNAME_, and the variables that form the matrix.

• A full set of matrix materials is written for each split-file group that is defined by the split variables.

• A split variable cannot have the same name as any other variable that is written to the matrix data file.

• If split-file processing is in effect when a matrix is written, the same split file must be in effect when that matrix is read by any procedure.

Related Topics

PROXIMITIES
Overview (PROXIMITIES command)
Example (PROXIMITIES command)
Variable Specification (PROXIMITIES command)
STANDARDIZE Subcommand (PROXIMITIES command)
VIEW Subcommand (PROXIMITIES command)
MEASURE Subcommand (PROXIMITIES command)
Measures for Interval Data (PROXIMITIES command)
Measures for Frequency-Count Data (PROXIMITIES command)
Measures for Binary Data (PROXIMITIES command)
Transforming Measures in Proximity Matrix (PROXIMITIES command)
PRINT Subcommand (PROXIMITIES command)
ID Subcommand (PROXIMITIES command)
MISSING Subcommand (PROXIMITIES command)
MATRIX Subcommand (PROXIMITIES command)
Matrix Output (PROXIMITIES command)
Matrix Input (PROXIMITIES command)
Format of the Matrix Data File (PROXIMITIES command)
Example: Matrix Output to PASW Statistics External File (PROXIMITIES command)
Example: Matrix Output to External File (PROXIMITIES command)
Example: Matrix Output to Working File (PROXIMITIES command)
Example: Matrix Input from External File (PROXIMITIES command)
Example: Matrix Input from Working File (PROXIMITIES command)
Example: Matrix Output to and Then Input from Working File (PROXIMITIES command)
Example: Q-factor Analysis (PROXIMITIES command)
References (PROXIMITIES command)


Example: Matrix Output to PASW Statistics External File (PROXIMITIES command)

PROXIMITIES  V1 TO V20
  /MATRIX=OUT(DISTOUT).

• PROXIMITIES produces a default Euclidean distance matrix for cases by using variables V1 through V20 and saves the matrix in the PASW Statistics data file DISTOUT.

• The names of the variables on the matrix file will be VAR1, VAR2, ...VARn.

Related Topics

PROXIMITIES
Overview (PROXIMITIES command)
Example (PROXIMITIES command)
Variable Specification (PROXIMITIES command)
STANDARDIZE Subcommand (PROXIMITIES command)
VIEW Subcommand (PROXIMITIES command)
MEASURE Subcommand (PROXIMITIES command)
Measures for Interval Data (PROXIMITIES command)
Measures for Frequency-Count Data (PROXIMITIES command)
Measures for Binary Data (PROXIMITIES command)
Transforming Measures in Proximity Matrix (PROXIMITIES command)
PRINT Subcommand (PROXIMITIES command)
ID Subcommand (PROXIMITIES command)
MISSING Subcommand (PROXIMITIES command)
MATRIX Subcommand (PROXIMITIES command)
Matrix Output (PROXIMITIES command)
Matrix Input (PROXIMITIES command)
Format of the Matrix Data File (PROXIMITIES command)
Split Files (PROXIMITIES command)
Example: Matrix Output to External File (PROXIMITIES command)
Example: Matrix Output to Working File (PROXIMITIES command)
Example: Matrix Input from External File (PROXIMITIES command)
Example: Matrix Input from Working File (PROXIMITIES command)
Example: Matrix Output to and Then Input from Working File (PROXIMITIES command)
Example: Q-factor Analysis (PROXIMITIES command)
References (PROXIMITIES command)


Example: Matrix Output to External File (PROXIMITIES command)

GET FILE='/data/crime.sav'.
PROXIMITIES MURDER TO MOTOR
  /ID=CITY
  /MEASURE=EUCLID
  /MATRIX=OUT(PROXMTX).

• PROXIMITIES reads data from the PASW Statistics data file crime.sav and writes one set of matrix materials to file PROXMTX.

• The active dataset is still crime.sav. Subsequent commands are executed on this file.

Related Topics

PROXIMITIES
Overview (PROXIMITIES command)
Example (PROXIMITIES command)
Variable Specification (PROXIMITIES command)
STANDARDIZE Subcommand (PROXIMITIES command)
VIEW Subcommand (PROXIMITIES command)
MEASURE Subcommand (PROXIMITIES command)
Measures for Interval Data (PROXIMITIES command)
Measures for Frequency-Count Data (PROXIMITIES command)
Measures for Binary Data (PROXIMITIES command)
Transforming Measures in Proximity Matrix (PROXIMITIES command)
PRINT Subcommand (PROXIMITIES command)
ID Subcommand (PROXIMITIES command)
MISSING Subcommand (PROXIMITIES command)
MATRIX Subcommand (PROXIMITIES command)
Matrix Output (PROXIMITIES command)
Matrix Input (PROXIMITIES command)
Format of the Matrix Data File (PROXIMITIES command)
Split Files (PROXIMITIES command)
Example: Matrix Output to PASW Statistics External File (PROXIMITIES command)
Example: Matrix Output to Working File (PROXIMITIES command)
Example: Matrix Input from External File (PROXIMITIES command)
Example: Matrix Input from Working File (PROXIMITIES command)
Example: Matrix Output to and Then Input from Working File (PROXIMITIES command)
Example: Q-factor Analysis (PROXIMITIES command)
References (PROXIMITIES command)


Example: Matrix Output to Working File (PROXIMITIES command)

GET FILE='/data/crime.sav'.
PROXIMITIES MURDER TO MOTOR
  /ID=CITY
  /MEASURE=EUCLID
  /MATRIX=OUT(*).
LIST.

• PROXIMITIES writes the same matrix as in the example above. However, the matrix data file replaces the active dataset. The LIST command is executed on the matrix file, not on the crime.sav file.

Related Topics

PROXIMITIES
Overview (PROXIMITIES command)
Example (PROXIMITIES command)
Variable Specification (PROXIMITIES command)
STANDARDIZE Subcommand (PROXIMITIES command)
VIEW Subcommand (PROXIMITIES command)
MEASURE Subcommand (PROXIMITIES command)
Measures for Interval Data (PROXIMITIES command)
Measures for Frequency-Count Data (PROXIMITIES command)
Measures for Binary Data (PROXIMITIES command)
Transforming Measures in Proximity Matrix (PROXIMITIES command)
PRINT Subcommand (PROXIMITIES command)
ID Subcommand (PROXIMITIES command)
MISSING Subcommand (PROXIMITIES command)
MATRIX Subcommand (PROXIMITIES command)
Matrix Output (PROXIMITIES command)
Matrix Input (PROXIMITIES command)
Format of the Matrix Data File (PROXIMITIES command)
Split Files (PROXIMITIES command)
Example: Matrix Output to PASW Statistics External File (PROXIMITIES command)
Example: Matrix Output to External File (PROXIMITIES command)
Example: Matrix Input from External File (PROXIMITIES command)
Example: Matrix Input from Working File (PROXIMITIES command)
Example: Matrix Output to and Then Input from Working File (PROXIMITIES command)
Example: Q-factor Analysis (PROXIMITIES command)
References (PROXIMITIES command)


Example: Matrix Input from External File (PROXIMITIES command)

GET FILE PRSNNL.
FREQUENCIES VARIABLE=AGE.

PROXIMITIES CASE1 TO CASE8
  /ID=CITY
  /MATRIX=IN(PROXMTX).

• This example performs a frequencies analysis on file PRSNNL and then uses a different file that contains matrix data for PROXIMITIES.

• MATRIX=IN specifies the matrix data file PROXMTX. PROXMTX does not replace PRSNNL as the active dataset.

Related Topics

PROXIMITIES
Overview (PROXIMITIES command)
Example (PROXIMITIES command)
Variable Specification (PROXIMITIES command)
STANDARDIZE Subcommand (PROXIMITIES command)
VIEW Subcommand (PROXIMITIES command)
MEASURE Subcommand (PROXIMITIES command)
Measures for Interval Data (PROXIMITIES command)
Measures for Frequency-Count Data (PROXIMITIES command)
Measures for Binary Data (PROXIMITIES command)
Transforming Measures in Proximity Matrix (PROXIMITIES command)
PRINT Subcommand (PROXIMITIES command)
ID Subcommand (PROXIMITIES command)
MISSING Subcommand (PROXIMITIES command)
MATRIX Subcommand (PROXIMITIES command)
Matrix Output (PROXIMITIES command)
Matrix Input (PROXIMITIES command)
Format of the Matrix Data File (PROXIMITIES command)
Split Files (PROXIMITIES command)
Example: Matrix Output to PASW Statistics External File (PROXIMITIES command)
Example: Matrix Output to External File (PROXIMITIES command)
Example: Matrix Output to Working File (PROXIMITIES command)
Example: Matrix Input from Working File (PROXIMITIES command)
Example: Matrix Output to and Then Input from Working File (PROXIMITIES command)
Example: Q-factor Analysis (PROXIMITIES command)
References (PROXIMITIES command)


Example: Matrix Input from Working File (PROXIMITIES command)

GET FILE PROXMTX.
PROXIMITIES CASE1 TO CASE8
  /ID=CITY
  /MATRIX=IN(*).

• This example assumes that you are starting a new session and want to read an existing matrix data file. GET retrieves the matrix file PROXMTX.

• MATRIX=IN specifies an asterisk because the matrix data file is the active dataset. If MATRIX=IN(PROXMTX) is specified, the program issues an error message.

• If the GET command is omitted, the program issues an error message.

Related Topics

PROXIMITIES
Overview (PROXIMITIES command)
Example (PROXIMITIES command)
Variable Specification (PROXIMITIES command)
STANDARDIZE Subcommand (PROXIMITIES command)
VIEW Subcommand (PROXIMITIES command)
MEASURE Subcommand (PROXIMITIES command)
Measures for Interval Data (PROXIMITIES command)
Measures for Frequency-Count Data (PROXIMITIES command)
Measures for Binary Data (PROXIMITIES command)
Transforming Measures in Proximity Matrix (PROXIMITIES command)
PRINT Subcommand (PROXIMITIES command)
ID Subcommand (PROXIMITIES command)
MISSING Subcommand (PROXIMITIES command)
MATRIX Subcommand (PROXIMITIES command)
Matrix Output (PROXIMITIES command)
Matrix Input (PROXIMITIES command)
Format of the Matrix Data File (PROXIMITIES command)
Split Files (PROXIMITIES command)
Example: Matrix Output to PASW Statistics External File (PROXIMITIES command)
Example: Matrix Output to External File (PROXIMITIES command)
Example: Matrix Output to Working File (PROXIMITIES command)
Example: Matrix Input from External File (PROXIMITIES command)
Example: Matrix Output to and Then Input from Working File (PROXIMITIES command)
Example: Q-factor Analysis (PROXIMITIES command)
References (PROXIMITIES command)


Example: Matrix Output to and Then Input from Working File (PROXIMITIES command)

GET FILE='/data/crime.sav'.
PROXIMITIES MURDER TO MOTOR
  /ID=CITY
  /MATRIX=OUT(*).
PROXIMITIES
  /MATRIX=IN(*)
  /STANDARDIZE.

• GET retrieves the PASW Statistics data file crime.sav.

• The first PROXIMITIES command specifies variables for the analysis and reads data from file crime.sav. ID specifies CITY as the case identifier. MATRIX writes the resulting matrix to the active dataset.

• The second PROXIMITIES command uses the matrix file that is written by the first PROXIMITIES command as input. The asterisk indicates that the matrix file is the active dataset. The variable list is omitted, indicating that all variables in the matrix are to be used.

• The slash preceding the MATRIX subcommand on the second PROXIMITIES command is required. Without the slash, PROXIMITIES attempts to interpret MATRIX as a variable name rather than as a subcommand.

Related Topics

PROXIMITIES
Overview (PROXIMITIES command)
Example (PROXIMITIES command)
Variable Specification (PROXIMITIES command)
STANDARDIZE Subcommand (PROXIMITIES command)
VIEW Subcommand (PROXIMITIES command)
MEASURE Subcommand (PROXIMITIES command)
Measures for Interval Data (PROXIMITIES command)
Measures for Frequency-Count Data (PROXIMITIES command)
Measures for Binary Data (PROXIMITIES command)
Transforming Measures in Proximity Matrix (PROXIMITIES command)
PRINT Subcommand (PROXIMITIES command)
ID Subcommand (PROXIMITIES command)
MISSING Subcommand (PROXIMITIES command)
MATRIX Subcommand (PROXIMITIES command)
Matrix Output (PROXIMITIES command)
Matrix Input (PROXIMITIES command)
Format of the Matrix Data File (PROXIMITIES command)
Split Files (PROXIMITIES command)
Example: Matrix Output to PASW Statistics External File (PROXIMITIES command)
Example: Matrix Output to External File (PROXIMITIES command)
Example: Matrix Output to Working File (PROXIMITIES command)
Example: Matrix Input from External File (PROXIMITIES command)
Example: Matrix Input from Working File (PROXIMITIES command)
Example: Q-factor Analysis (PROXIMITIES command)
References (PROXIMITIES command)


Example: Q-factor Analysis (PROXIMITIES command)

PROXIMITIES (command),PROXIMITIES (command),PROXIMITIES (command)
with FACTOR command,with FACTOR command,with FACTOR command
FACTOR (command),FACTOR (command),FACTOR (command)
with PROXIMITIES command,with PROXIMITIES command,with PROXIMITIES command

In this example, PROXIMITIES and FACTOR are used for a Q-factor analysis, in which factors account for variance shared among observations rather than among variables. Procedure FACTOR does not perform Q-factor analysis without some preliminary transformation such as what is provided by PROXIMITIES. Because the number of cases exceeds the number of variables, the model is not of full rank, and FACTOR will print a warning. This result is a common occurrence when case-by-case matrices from PROXIMITIES are used as input to FACTOR.

* Recoding a PROXIMITIES matrix for procedure FACTOR.

GET FILE='/data/crime.sav'.
PROXIMITIES   MURDER TO MOTOR
  /MEASURE=CORR
  /MATRIX=OUT('/data/tempfile.sav').
GET FILE='/data/tempfile.sav' /DROP=ID.
RECODE ROWTYPE_ ('PROX' = 'CORR').
FACTOR MATRIX IN(COR=*).

• The MATRIX subcommand on PROXIMITIES writes the correlation matrix to the active dataset. Because the matrix materials will be used in procedure FACTOR, the ID subcommand is not specified.

• RECODE recodes ROWTYPE_ value PROX to CORR so that procedure FACTOR can read the matrix.

• When FACTOR reads matrix materials, it reads all variables in the file. The MATRIX subcommand on FACTOR indicates that the matrix is a correlation matrix and that data are in the active dataset.

Related Topics

PROXIMITIES
Overview (PROXIMITIES command)
Example (PROXIMITIES command)
Variable Specification (PROXIMITIES command)
STANDARDIZE Subcommand (PROXIMITIES command)
VIEW Subcommand (PROXIMITIES command)
MEASURE Subcommand (PROXIMITIES command)
Measures for Interval Data (PROXIMITIES command)
Measures for Frequency-Count Data (PROXIMITIES command)
Measures for Binary Data (PROXIMITIES command)
Transforming Measures in Proximity Matrix (PROXIMITIES command)
PRINT Subcommand (PROXIMITIES command)
ID Subcommand (PROXIMITIES command)
MISSING Subcommand (PROXIMITIES command)
MATRIX Subcommand (PROXIMITIES command)
Matrix Output (PROXIMITIES command)
Matrix Input (PROXIMITIES command)
Format of the Matrix Data File (PROXIMITIES command)
Split Files (PROXIMITIES command)
Example: Matrix Output to PASW Statistics External File (PROXIMITIES command)
Example: Matrix Output to External File (PROXIMITIES command)
Example: Matrix Output to Working File (PROXIMITIES command)
Example: Matrix Input from External File (PROXIMITIES command)
Example: Matrix Input from Working File (PROXIMITIES command)
Example: Matrix Output to and Then Input from Working File (PROXIMITIES command)
References (PROXIMITIES command)


References (PROXIMITIES command)

Anderberg, M. R. 1973. Cluster analysis for applications. New York: Academic Press.

Romesburg, H. C. 1984. Cluster analysis for researchers. Belmont, Calif.: Lifetime Learning Publications.

Related Topics

PROXIMITIES
Overview (PROXIMITIES command)
Example (PROXIMITIES command)
Variable Specification (PROXIMITIES command)
STANDARDIZE Subcommand (PROXIMITIES command)
VIEW Subcommand (PROXIMITIES command)
MEASURE Subcommand (PROXIMITIES command)
Measures for Interval Data (PROXIMITIES command)
Measures for Frequency-Count Data (PROXIMITIES command)
Measures for Binary Data (PROXIMITIES command)
Transforming Measures in Proximity Matrix (PROXIMITIES command)
PRINT Subcommand (PROXIMITIES command)
ID Subcommand (PROXIMITIES command)
MISSING Subcommand (PROXIMITIES command)
MATRIX Subcommand (PROXIMITIES command)
Matrix Output (PROXIMITIES command)
Matrix Input (PROXIMITIES command)
Format of the Matrix Data File (PROXIMITIES command)
Split Files (PROXIMITIES command)
Example: Matrix Output to PASW Statistics External File (PROXIMITIES command)
Example: Matrix Output to External File (PROXIMITIES command)
Example: Matrix Output to Working File (PROXIMITIES command)
Example: Matrix Input from External File (PROXIMITIES command)
Example: Matrix Input from Working File (PROXIMITIES command)
Example: Matrix Output to and Then Input from Working File (PROXIMITIES command)
Example: Q-factor Analysis (PROXIMITIES command)


PROXSCAL

PROXSCAL (command),PROXSCAL (command),PROXSCAL (command)
PROXSCAL (command),PROXSCAL (command),PROXSCAL (command)
syntax chart,syntax chart,syntax chart
Multidimensional Scaling,Multidimensional Scaling,Multidimensional Scaling
command syntax,command syntax,command syntax

PROXSCAL is available in the Categories option.

PROXSCAL varlist

[/TABLE = {rowid BY columnid [BY sourceid]}]
          {sourceid                      }

[/SHAPE = [{LOWER**}]]
           {UPPER  }
           {BOTH   }

[/INITIAL = [{SIMPLEX**        }]]
             {TORGERSON        }
             {RANDOM[({1})]    }
                      {n}
             {[('file'|'dataset')] [varlist] }

[/WEIGHTS = varlist]

[/CONDITION = [{MATRIX**      }]]
               {UNCONDITIONAL }

[/TRANSFORMATION = [{RATIO**                            }]]
                    {INTERVAL                           }
                    {ORDINAL[({UNTIE   })]              }
                              {KEEPTIES}
                    {SPLINE [DEGREE = {2}] [INKNOT = {1}]}
                                      {n}            {n}

[/PROXIMITIES = [{DISSIMILARITIES**}]]
                 {SIMILARITIES     }

[/MODEL = [{IDENTITY**    }]]
           {WEIGHTED      }
           {GENERALIZED   }
           {REDUCED[({2})]}
                     {n}

[/RESTRICTIONS = {COORDINATES('file'|'dataset') [{ALL    }]                                  }]
                                     {varlist}
                 {VARIABLES('file'|'dataset') [{ALL    }][({INTERVAL                      })]}
                                   {varlist}   {NOMINAL                       }
                                               {ORDINAL[({UNTIE   })]         }
                                                         {KEEPTIES}
                                               {SPLINE[DEGREE={2}][INKNOT={1}]}
                                                              {n}         {n}

[/ACCELERATION = NONE]

[/CRITERIA = [DIMENSIONS({2**      })]
                         {min[,max]}
             [MAXITER({100**})]
                      {n    }
             [DIFFSTRESS({0.0001**})]
                         {value   }
             [MINSTRESS({0.0001**}) ]]
                        {value   }

[/PRINT = [NONE][INPUT][RANDOM][HISTORY][STRESS**][DECOMPOSITION]
          [COMMON**][DISTANCES][WEIGHTS**][INDIVIDUAL]
          [TRANSFORMATIONS][VARIABLES**][CORRELATIONS**]]

[/PLOT = [NONE][STRESS][COMMON**][WEIGHTS**][CORRELATIONS**]
         [INDIVIDUAL({varlist})]
                     {ALL    }
         [TRANSFORMATIONS({varlist}) [({varlist})[...]] ]
                          {ALL    }    {ALL    }
         [RESIDUALS({varlist}) [({varlist})[...]] ]
                    {ALL    }    {ALL    }
         [VARIABLES({varlist})]]
                    {ALL    }

[/OUTFILE = [COMMON('file'|'dataset')] [WEIGHTS('file'|'dataset')] [DISTANCES('file'|'dataset')]
            [TRANSFORMATIONS('file'|'dataset')] [VARIABLES('file'|'dataset')] ]

[/MATRIX = IN('file'|'dataset')]].

** Default if the subcommand is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See PROXSCAL Algorithms for computational details for this procedure.

Syntax for the PROXSCAL command can be generated from the Multidimensional Scaling (PROXSCAL) dialog.

Related Topics

Overview (PROXSCAL command)
Variable List Subcommand (PROXSCAL command)
TABLE Subcommand (PROXSCAL command)
SHAPE Subcommand (PROXSCAL command)
INITIAL Subcommand (PROXSCAL command)
WEIGHTS Subcommand (PROXSCAL command)
CONDITION Subcommand (PROXSCAL command)
TRANSFORMATION Subcommand (PROXSCAL command)
SPLINE Keyword (PROXSCAL command)
PROXIMITIES Subcommand (PROXSCAL command)
MODEL Subcommand (PROXSCAL command)
RESTRICTIONS Subcommand (PROXSCAL command)
VARIABLES Keyword (PROXSCAL command)
SPLINE Keyword (PROXSCAL command)
ACCELERATION Subcommand (PROXSCAL command)
CRITERIA Subcommand (PROXSCAL command)
PRINT Subcommand (PROXSCAL command)
PLOT Subcommand (PROXSCAL command)
OUTFILE Subcommand (PROXSCAL command)
MATRIX Subcommand (PROXSCAL command)


Overview (PROXSCAL command)

PROXSCAL (command),PROXSCAL (command),PROXSCAL (command)
options,options,options

PROXSCAL performs multidimensional scaling of proximity data to find a least-squares representation of the objects in a low-dimensional space. Individual differences models are allowed for multiple sources. A majorization algorithm guarantees monotone convergence for optionally transformed metric and nonmetric data under a variety of models and constraints.

Options Collapse Hide details

Options

Data Input. You can read one or more square matrices of proximities that can either be symmetrical or asymmetrical. Alternatively, you can provide specifications with the TABLE subcommand for matrices with proximities in a stacked format. You can read proximity matrices created by PROXIMITIES and CLUSTER with the MATRIX subcommand. Additionally, you can read weights, initial configurations, fixed coordinates, and independent variables.

Methodological Assumptions. You can specify transformations considering all sources (unconditional) or separate transformations for each source (matrix-conditional) on the CONDITION subcommand. You can treat proximities as nonmetric (ordinal) or as metric (numerical or splines) using the TRANSFORMATION subcommand. Ordinal transformations can treat tied observations as tied (discrete) and untied (continuous). You can specify whether your proximities are similarities or dissimilarities on the PROXIMITIES subcommand.

Model Selection. You can specify multidimensional scaling models by selecting a combination of PROXSCAL subcommands, keywords, and criteria. The subcommand MODEL offers, besides the identity model, three individual differences models. You can specify other selections on the CRITERIA subcommand.

Constraints. You can specify fixed coordinates or independent variables to restrict the configuration(s) on the RESTRICTIONS subcommand. You can specify transformations (numerical, nominal, ordinal, and splines) for the independent variables on the same subcommand.

Output. You can produce output that includes the original and transformed proximities, history of iterations, common and individual configurations, individual space weights, distances, and decomposition of the stress. Plots can be produced of common and individual configurations, individual space weights, transformations, and residuals.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is PROXSCAL followed by a variable list. By default, PROXSCAL produces a two-dimensional metric Euclidean multidimensional scaling solution (identity model). Input is expected to contain one or more square matrices with proximities that are dissimilarities. The ratio transformation of the proximities is matrix-conditional. The analysis uses a simplex start as an initial configuration. By default, output includes fit and stress values, the coordinates of the common space, and a chart of the common space configuration.

Syntax Rules Collapse Hide details

Syntax Rules

• The number of dimensions (both minimum and maximum) may not exceed the number of proximities minus one.

• Dimensionality reduction is omitted if combined with multiple random starts.

• If there is only one source, then the model is always assumed to be identity.

PROXSCAL (command),PROXSCAL (command),PROXSCAL (command)
limitations,limitations,limitations
Limitations Collapse Hide details

Limitations

• PROXSCAL needs at least three objects, which means that at least three variables must be specified in the variable list. In the case of the TABLE subcommand, the minimum value for rowid and columnid must be at least three.

• PROXSCAL recognizes data weights created by the WEIGHT command but only in combination with the TABLE subcommand.

• Split-file has no implications for PROXSCAL.

Related Topics

PROXSCAL
Variable List Subcommand (PROXSCAL command)
TABLE Subcommand (PROXSCAL command)
SHAPE Subcommand (PROXSCAL command)
INITIAL Subcommand (PROXSCAL command)
WEIGHTS Subcommand (PROXSCAL command)
CONDITION Subcommand (PROXSCAL command)
TRANSFORMATION Subcommand (PROXSCAL command)
SPLINE Keyword (PROXSCAL command)
PROXIMITIES Subcommand (PROXSCAL command)
MODEL Subcommand (PROXSCAL command)
RESTRICTIONS Subcommand (PROXSCAL command)
VARIABLES Keyword (PROXSCAL command)
SPLINE Keyword (PROXSCAL command)
ACCELERATION Subcommand (PROXSCAL command)
CRITERIA Subcommand (PROXSCAL command)
PRINT Subcommand (PROXSCAL command)
PLOT Subcommand (PROXSCAL command)
OUTFILE Subcommand (PROXSCAL command)
MATRIX Subcommand (PROXSCAL command)


Variable List Subcommand (PROXSCAL command)

The variable list identifies the columns in the proximity matrix or matrices that PROXSCAL reads. Each variable identifies one column of the proximity matrix, with each case in the active dataset representing one row, unless specified otherwise with the TABLE subcommand. In this case, the variable list identifies whole matrices or sources.

• Only numeric variables can be specified.

• The total number of cases must be divisible by the number of variables. This is not applicable when the TABLE subcommand is used.

• PROXSCAL reads data row by row; the columns are represented by the variables on the variable list. The order of the variables on the list is crucial.

Example

DATA LIST
  /object01 object02 object03 object04.

BEGIN DATA
  0 2 6 3
  2 0 5 4
  6 5 0 1
  3 4 1 0
END DATA.

PROXSCAL VARIABLES=object01 TO object04.

• This example specifies an analysis on a 4×4 proximity matrix.

• The total number of cases must be divisible by 4.

Related Topics

PROXSCAL
Overview (PROXSCAL command)
TABLE Subcommand (PROXSCAL command)
SHAPE Subcommand (PROXSCAL command)
INITIAL Subcommand (PROXSCAL command)
WEIGHTS Subcommand (PROXSCAL command)
CONDITION Subcommand (PROXSCAL command)
TRANSFORMATION Subcommand (PROXSCAL command)
SPLINE Keyword (PROXSCAL command)
PROXIMITIES Subcommand (PROXSCAL command)
MODEL Subcommand (PROXSCAL command)
RESTRICTIONS Subcommand (PROXSCAL command)
VARIABLES Keyword (PROXSCAL command)
SPLINE Keyword (PROXSCAL command)
ACCELERATION Subcommand (PROXSCAL command)
CRITERIA Subcommand (PROXSCAL command)
PRINT Subcommand (PROXSCAL command)
PLOT Subcommand (PROXSCAL command)
OUTFILE Subcommand (PROXSCAL command)
MATRIX Subcommand (PROXSCAL command)


TABLE Subcommand (PROXSCAL command)

TABLE (subcommand),TABLE (subcommand),TABLE (subcommand)
PROXSCAL command,PROXSCAL command,PROXSCAL command
PROXSCAL (command),PROXSCAL (command),PROXSCAL (command)
TABLE subcommand,TABLE subcommand,TABLE subcommand

The TABLE subcommand specifies the row identifier rowid and the column identifier columnid. Using TABLE, the proximities of separate sources are given in separate variables on the PROXSCAL variable list.

In the same manner, sources are identified by sourceid. In combination with rowid and columnid, the proximities are stacked in one single variable, containing the proximities of all sources, where sources are distinguished by the values of sourceid.

Using sourceid as the only variable on the TABLE subcommand indicates the use of stacked matrices, where individual stacked matrices are recognized by different values of sourceid.

• Rowid, columnid, and sourceid should not be specified on the variable list.

• When specifying both upper- and lower-triangular parts of the matrix, the SHAPE subcommand will determine the handling of the data.

• If a cell’s value is specified multiple times, the final specification is used.

• Rowid, columnid, and sourceid must appear in that order.

• Omitting sourceid causes PROXSCAL to use the sources specified on the PROXSCAL variable list. Each variable is assumed to contain the proximities of one source.

• Specifying multiple sources on the PROXSCAL variable list in conjunction with specifying rowid, columnid, and sourceid is not possible and causes PROXSCAL to ignore sourceid.

rowid | Row identifying variable. The values of this variable specify the row object of a proximity. The values must be integers between 1 and the number of objects, inclusive.
columnid | Column identifying variable. The values specify the column object of a proximity. The values must be integers between 1 and the number of objects, inclusive.
sourceid | Source identifying variable. The values specify the source number and must be integers between 1 and the number of sources, inclusive. The value labels of this variable are used to identify sources on other subcommands. These value labels must comply with variable name conventions. Omitting a value label causes PROXSCAL to use the default label SRC_n, where n is the number of the source.

Example

DATA LIST
  /r_id c_id men women.

BEGIN DATA
2 1 1.08 1.14
3 1 0.68 1.12
3 2 0.95 0.75
4 1 0.96 0.32
4 2 0.76 0.98
4 3 0.47 0.69
. . .... ....
.. .. .... ....
13 10 0.55 0.86
13 11 0.61 0.97
13 12 0.46 0.83
END DATA.

PROXSCAL men women
  /TABLE=r_id BY c_id
  /PLOT = INDIVIDUAL (women).

• PROXSCAL reads two proximity matrices (men and women), where the row objects are specified by r_id and the column objects by c_id.

• A chart of the individual space for women is plotted.

This is one way to proceed. Another way is to add the proximities of the additional source below the proximities of the first source and specify sourceid on the TABLE subcommand, containing values distinguishing the first and the additional source (see the next example).

Example

DATA LIST
  /r_id c_id s_id prox.

BEGIN DATA
2 1 1 1.08
3 1 1 0.68
3 2 1 0.95
4 1 1 0.96
4 2 1 0.76
4 3 1 0.47
. . . ....
.. .. . ....
13 10 1 0.55
13 11 1 0.61
13 12 1 0.46
2 1 2 1.14
3 1 2 1.12
3 2 2 0.75
4 1 2 0.32
4 2 2 0.98
4 3 2 0.69
. . . ....
.. .. . ....
13 10 2 0.86
13 11 2 0.97
13 12 2 0.83
END DATA.

VALUE LABELS s_id 1 ‘men’ 2 ‘women’.

PROXSCAL prox
  /TABLE=r_id BY c_id BY s_id
  /PLOT = INDIVIDUAL (women).

• PROXSCAL reads two proximity matrices. The row objects are identified by r_id and the column objects, by c_id. The proximity matrices are gathered in one variable, source01, where each source is distinguished by a value of the source identifying variable s_id.

• A chart of the individual space for women is plotted.

Example

DATA LIST LIST
  /obj_1 obj_2 obj_3 obj_4 s_id

BEGIN DATA
0  0  0  0 1
1  0  0  0 1
2  3  0  0 1
4  5  6  0 1
7  0  0  0 2
0  0  0  0 2
8  9  0  0 2
12 11 12 0 2
END DATA.

VALUE LABELS s_id 1 ‘women’ 2 ‘men’.

PROXSCAL obj_1 obj_2 obj_3 obj_4
  /TABLE = s_id
  /MODEL = WEIGHTED
  /PLOT = INDIVIDUAL (women).

• PROXSCAL reads two proximity matrices. The objects are given on the PROXSCAL variable list. Each source is distinguished by a value of the source identifying variable s_id, which is also used for labeling.

• A chart of the individual space for women is plotted.

Related Topics

PROXSCAL
Overview (PROXSCAL command)
Variable List Subcommand (PROXSCAL command)
SHAPE Subcommand (PROXSCAL command)
INITIAL Subcommand (PROXSCAL command)
WEIGHTS Subcommand (PROXSCAL command)
CONDITION Subcommand (PROXSCAL command)
TRANSFORMATION Subcommand (PROXSCAL command)
SPLINE Keyword (PROXSCAL command)
PROXIMITIES Subcommand (PROXSCAL command)
MODEL Subcommand (PROXSCAL command)
RESTRICTIONS Subcommand (PROXSCAL command)
VARIABLES Keyword (PROXSCAL command)
SPLINE Keyword (PROXSCAL command)
ACCELERATION Subcommand (PROXSCAL command)
CRITERIA Subcommand (PROXSCAL command)
PRINT Subcommand (PROXSCAL command)
PLOT Subcommand (PROXSCAL command)
OUTFILE Subcommand (PROXSCAL command)
MATRIX Subcommand (PROXSCAL command)


SHAPE Subcommand (PROXSCAL command)

SHAPE (subcommand),SHAPE (subcommand),SHAPE (subcommand)
PROXSCAL command,PROXSCAL command,PROXSCAL command
PROXSCAL (command),PROXSCAL (command),PROXSCAL (command)
SHAPE subcommand,SHAPE subcommand,SHAPE subcommand

The SHAPE subcommand specifies the structure of the proximity matrix.

LOWER (keyword),LOWER (keyword),LOWER (keyword)
PROXSCAL command,PROXSCAL command,PROXSCAL command
UPPER (keyword),UPPER (keyword),UPPER (keyword)
PROXSCAL command,PROXSCAL command,PROXSCAL command
BOTH (keyword),BOTH (keyword),BOTH (keyword)
PROXSCAL command,PROXSCAL command,PROXSCAL command
LOWER | Lower-triangular data matrix. For a lower-triangular matrix, PROXSCAL expects a square matrix of proximities of which the lower-triangular elements are used under the assumption that the full matrix is symmetric. The diagonal is ignored but must be included.
UPPER | Upper-triangular data matrix. For an upper-triangular matrix, PROXSCAL expects a square matrix of proximities of which the upper-triangular elements are used under the assumption that the full matrix is symmetric. The diagonal is ignored but must be included.
BOTH | Full data matrix. The values in the corresponding cells in the upper and lower triangles may be different. PROXSCAL reads the complete square matrix and, after obtaining symmetry, continues with the lower-triangular elements. The diagonal is ignored but must be included.

• System or other missing values on the (virtual) diagonal are ignored.

Example

PROXSCAL object01 TO object07
  /SHAPE=UPPER.

• PROXSCAL reads square matrices of seven columns per matrix of which the upper-triangular parts are used in computations.

• Although specified, the diagonal and lower-triangular part of the matrix are not used.

Related Topics

PROXSCAL
Overview (PROXSCAL command)
Variable List Subcommand (PROXSCAL command)
TABLE Subcommand (PROXSCAL command)
INITIAL Subcommand (PROXSCAL command)
WEIGHTS Subcommand (PROXSCAL command)
CONDITION Subcommand (PROXSCAL command)
TRANSFORMATION Subcommand (PROXSCAL command)
SPLINE Keyword (PROXSCAL command)
PROXIMITIES Subcommand (PROXSCAL command)
MODEL Subcommand (PROXSCAL command)
RESTRICTIONS Subcommand (PROXSCAL command)
VARIABLES Keyword (PROXSCAL command)
SPLINE Keyword (PROXSCAL command)
ACCELERATION Subcommand (PROXSCAL command)
CRITERIA Subcommand (PROXSCAL command)
PRINT Subcommand (PROXSCAL command)
PLOT Subcommand (PROXSCAL command)
OUTFILE Subcommand (PROXSCAL command)
MATRIX Subcommand (PROXSCAL command)


INITIAL Subcommand (PROXSCAL command)

INITIAL (subcommand),INITIAL (subcommand),INITIAL (subcommand)
PROXSCAL command,PROXSCAL command,PROXSCAL command
PROXSCAL (command),PROXSCAL (command),PROXSCAL (command)
INITIAL subcommand,INITIAL subcommand,INITIAL subcommand

INITIAL defines the initial or starting configuration of the common space for the analysis. When a reduction in dimensionality is specified on the CRITERIA subcommand, a derivation of coordinates in the higher dimensionality is used as a starting configuration in the lower dimensionality.

• You can specify one of the three keywords listed below.

• You can specify a variable list containing the initial configuration.

SIMPLEX (keyword),SIMPLEX (keyword),SIMPLEX (keyword)
PROXSCAL command,PROXSCAL command,PROXSCAL command
TORGERSON (keyword),TORGERSON (keyword),TORGERSON (keyword)
PROXSCAL command,PROXSCAL command,PROXSCAL command
RANDOM (keyword),RANDOM (keyword),RANDOM (keyword)
PROXSCAL command,PROXSCAL command,PROXSCAL command
SIMPLEX | Simplex start. This specification is the default. PROXSCAL starts by placing the objects in the configuration all at the same distance of each other and taking one iteration to improve this high-dimensional configuration, followed by a dimension-reduction operation to obtain the user-provided maximum dimensionality specified in the CRITERIA subcommand with the keyword DIMENSIONS.
TORGERSON | Torgerson start. A classical scaling solution is used as initial configuration.
RANDOM | (Multiple) random start. You can specify the number of random starts (n). n is any positive integer. The random sequence can be controlled by the RANDOM SEED command and not by a subcommand within the PROXSCAL command. Each analysis starts with a different random configuration. In the output, all n final stress values are reported, as well as the initial seeds of each analysis (for reproduction purposes), followed by the full output of the analysis with the lowest stress value. The default number of random starts is 1. Reduction of dimensionality—that is, using a maximum dimensionality that is larger than the minimum dimensionality—is not allowed within this option and the minimum dimensionality is used, if reduction is specified anyway.

Instead of these keywords, a parenthesized PASW Statistics data file can be specified containing the coordinates of the initial configuration. If the variable list is omitted, the first MAXDIM variables are automatically selected, where MAXDIM is the maximum number of dimensions requested for the analysis on the CRITERIA subcommand. Only nonmissing values are allowed as initial coordinates.

Example

PROXSCAL object01 TO object17
  /INITIAL=RANDOM(100).

• This example performs 100 analyses each, starting with different random configurations. The results of the analysis with the lowest final stress are displayed in the output.

Related Topics

PROXSCAL
Overview (PROXSCAL command)
Variable List Subcommand (PROXSCAL command)
TABLE Subcommand (PROXSCAL command)
SHAPE Subcommand (PROXSCAL command)
WEIGHTS Subcommand (PROXSCAL command)
CONDITION Subcommand (PROXSCAL command)
TRANSFORMATION Subcommand (PROXSCAL command)
SPLINE Keyword (PROXSCAL command)
PROXIMITIES Subcommand (PROXSCAL command)
MODEL Subcommand (PROXSCAL command)
RESTRICTIONS Subcommand (PROXSCAL command)
VARIABLES Keyword (PROXSCAL command)
SPLINE Keyword (PROXSCAL command)
ACCELERATION Subcommand (PROXSCAL command)
CRITERIA Subcommand (PROXSCAL command)
PRINT Subcommand (PROXSCAL command)
PLOT Subcommand (PROXSCAL command)
OUTFILE Subcommand (PROXSCAL command)
MATRIX Subcommand (PROXSCAL command)


WEIGHTS Subcommand (PROXSCAL command)

WEIGHTS (subcommand),WEIGHTS (subcommand),WEIGHTS (subcommand)
PROXSCAL command,PROXSCAL command,PROXSCAL command
PROXSCAL (command),PROXSCAL (command),PROXSCAL (command)
WEIGHTS subcommand,WEIGHTS subcommand,WEIGHTS subcommand

The WEIGHTS subcommand specifies non-negative weights on the proximities included in the active dataset.

• The number and order of the variables in the variable list is important. The first variable on the WEIGHTS variable list corresponds to the first variable on the PROXSCAL variable list. This is repeated for all variables on the variable lists. Every proximity has its own weight. The number of variables on the WEIGHTS subcommand must therefore be equal to the number of variables on the PROXSCAL variable list.

• Negative weights are not allowed. If specified, a warning will be issued and the procedure will abort.

Example

DATA LIST FILE=’cola.dat’ FREE
  /object01 TO object14 weight01 TO weight14.

PROXSCAL object01 TO object14
  /WEIGHTS=weight01 TO weight14.

• In this example, the VARIABLES subcommand indicates that there are 14 columns per matrix of which the weights can be found in weight01 to weight14.

• weight01 contains the weights for object01, etc.

Related Topics

PROXSCAL
Overview (PROXSCAL command)
Variable List Subcommand (PROXSCAL command)
TABLE Subcommand (PROXSCAL command)
SHAPE Subcommand (PROXSCAL command)
INITIAL Subcommand (PROXSCAL command)
CONDITION Subcommand (PROXSCAL command)
TRANSFORMATION Subcommand (PROXSCAL command)
SPLINE Keyword (PROXSCAL command)
PROXIMITIES Subcommand (PROXSCAL command)
MODEL Subcommand (PROXSCAL command)
RESTRICTIONS Subcommand (PROXSCAL command)
VARIABLES Keyword (PROXSCAL command)
SPLINE Keyword (PROXSCAL command)
ACCELERATION Subcommand (PROXSCAL command)
CRITERIA Subcommand (PROXSCAL command)
PRINT Subcommand (PROXSCAL command)
PLOT Subcommand (PROXSCAL command)
OUTFILE Subcommand (PROXSCAL command)
MATRIX Subcommand (PROXSCAL command)


CONDITION Subcommand (PROXSCAL command)

CONDITION (subcommand),CONDITION (subcommand),CONDITION (subcommand)
PROXSCAL command,PROXSCAL command,PROXSCAL command
PROXSCAL (command),PROXSCAL (command),PROXSCAL (command)
CONDITION subcommand,CONDITION subcommand,CONDITION subcommand

CONDITION specifies how transformations among sources are compared. The TRANSFORMATION subcommand specifies the type of transformation.

MATRIX (keyword),MATRIX (keyword),MATRIX (keyword)
PROXSCAL command,PROXSCAL command,PROXSCAL command
UNCONDITIONAL (keyword),UNCONDITIONAL (keyword),UNCONDITIONAL (keyword)
PROXSCAL command,PROXSCAL command,PROXSCAL command
MATRIX | Matrix conditional. Only the proximities within each source are compared with each other. This is the default.
UNCONDITIONAL | Unconditional. This specification is appropriate when the proximities in all sources can be compared with each other and result in a single transformation of all sources simultaneously.

• Note that if there is only one source, then MATRIX and UNCONDITIONAL give the same results.

Example

PROXSCAL object01 TO object15
  /CONDITION=UNCONDITIONAL
  /TRANSFORMATION=ORDINAL(UNTIE).

• In this example, the proximities are ordinally transformed, where tied proximities are allowed to be untied. The transformations are performed simultaneously over all possible sources.

Related Topics

PROXSCAL
Overview (PROXSCAL command)
Variable List Subcommand (PROXSCAL command)
TABLE Subcommand (PROXSCAL command)
SHAPE Subcommand (PROXSCAL command)
INITIAL Subcommand (PROXSCAL command)
WEIGHTS Subcommand (PROXSCAL command)
TRANSFORMATION Subcommand (PROXSCAL command)
SPLINE Keyword (PROXSCAL command)
PROXIMITIES Subcommand (PROXSCAL command)
MODEL Subcommand (PROXSCAL command)
RESTRICTIONS Subcommand (PROXSCAL command)
VARIABLES Keyword (PROXSCAL command)
SPLINE Keyword (PROXSCAL command)
ACCELERATION Subcommand (PROXSCAL command)
CRITERIA Subcommand (PROXSCAL command)
PRINT Subcommand (PROXSCAL command)
PLOT Subcommand (PROXSCAL command)
OUTFILE Subcommand (PROXSCAL command)
MATRIX Subcommand (PROXSCAL command)


TRANSFORMATION Subcommand (PROXSCAL command)

TRANSFORMATION (subcommand),TRANSFORMATION (subcommand),TRANSFORMATION (subcommand)
PROXSCAL command,PROXSCAL command,PROXSCAL command
PROXSCAL (command),PROXSCAL (command),PROXSCAL (command)
TRANSFORMATION subcommand,TRANSFORMATION subcommand,TRANSFORMATION subcommand

TRANSFORMATION offers four different options for optimal transformation of the original proximities. The resulting values are called transformed proximities. The distances between the objects in the configuration should match these transformed proximities as closely as possible.

RATIO (keyword),RATIO (keyword),RATIO (keyword)
PROXSCAL command,PROXSCAL command,PROXSCAL command
INTERVAL (keyword),INTERVAL (keyword),INTERVAL (keyword)
PROXSCAL command,PROXSCAL command,PROXSCAL command
numerical scaling level,numerical scaling level,numerical scaling level
PROXSCAL command,PROXSCAL command,PROXSCAL command
optimal scaling level,optimal scaling level,optimal scaling level
numerical,numerical,numerical
ORDINAL (keyword),ORDINAL (keyword),ORDINAL (keyword)
PROXSCAL command,PROXSCAL command,PROXSCAL command
ordinal scaling level,ordinal scaling level,ordinal scaling level
PROXSCAL command,PROXSCAL command,PROXSCAL command
optimal scaling level,optimal scaling level,optimal scaling level
ordinal,ordinal,ordinal
SPLINE (keyword),SPLINE (keyword),SPLINE (keyword)
PROXSCAL command,PROXSCAL command,PROXSCAL command
monotone spline,monotone spline,monotone spline
PROXSCAL command,PROXSCAL command,PROXSCAL command
spline interpolation,spline interpolation,spline interpolation
PROXSCAL command,PROXSCAL command,PROXSCAL command
RATIO | No transformation. Omitting the entire subcommand is equivalent to using this keyword. In both cases, the transformed proximities are proportional to the original proximities. This “transformation” is only allowed for positive dissimilarities. In all other cases, a warning is issued and the transformation is set to INTERVAL.
INTERVAL | Numerical transformation. In this case, the transformed proximities are proportional to the original proximities, including free estimation of the intercept. The inclusion of the intercept assures that all transformed proximities are positive.
ORDINAL | Ordinal transformation. The transformed proximities have the same order as the original proximities. In parentheses, the approach to tied proximities can be specified. Keeping tied proximities tied, also known as secondary approach to ties, is default. Specification may be implicit, ORDINAL, or explicit, ORDINAL(KEEPTIES). Allowing tied proximities to be untied, also known as the primary approach to ties, is specified as ORDINAL (UNTIE).
SPLINE | Monotone spline transformation. The transformed proximities are a smooth nondecreasing piecewise polynomial transformation of the original proximities of the chosen degree. The pieces are specified by the number and placement of the interior knots.

Related Topics

PROXSCAL
Overview (PROXSCAL command)
Variable List Subcommand (PROXSCAL command)
TABLE Subcommand (PROXSCAL command)
SHAPE Subcommand (PROXSCAL command)
INITIAL Subcommand (PROXSCAL command)
WEIGHTS Subcommand (PROXSCAL command)
CONDITION Subcommand (PROXSCAL command)
SPLINE Keyword (PROXSCAL command)
PROXIMITIES Subcommand (PROXSCAL command)
MODEL Subcommand (PROXSCAL command)
RESTRICTIONS Subcommand (PROXSCAL command)
VARIABLES Keyword (PROXSCAL command)
SPLINE Keyword (PROXSCAL command)
ACCELERATION Subcommand (PROXSCAL command)
CRITERIA Subcommand (PROXSCAL command)
PRINT Subcommand (PROXSCAL command)
PLOT Subcommand (PROXSCAL command)
OUTFILE Subcommand (PROXSCAL command)
MATRIX Subcommand (PROXSCAL command)


SPLINE Keyword (PROXSCAL command)

DEGREE (keyword),DEGREE (keyword),DEGREE (keyword)
PROXSCAL command,PROXSCAL command,PROXSCAL command
DEGREE (keyword),DEGREE (keyword),DEGREE (keyword)
with SPLINE keyword,with SPLINE keyword,with SPLINE keyword
INKNOT (keyword),INKNOT (keyword),INKNOT (keyword)
PROXSCAL command,PROXSCAL command,PROXSCAL command
INKNOT (keyword),INKNOT (keyword),INKNOT (keyword)
with SPLINE keyword,with SPLINE keyword,with SPLINE keyword
 | SPLINE has the following keywords:
DEGREE | The degree of the polynomial. If DEGREE is not specified, the degree is assumed to be 2. The range of DEGREE is between 1 and 3 (inclusive).
INKNOT | The number of interior knots. If INKNOT is not specified, the number of interior knots is assumed to be 1. The range of INKNOT is between 1 and the number of different proximities.

Example

PROXSCAL object01 TO object05
  /TRANSFORMATION=ORDINAL(UNTIE).

• In this example, the proximities are ordinally transformed, where tied proximities are allowed to be untied.

• The default conditionality (MATRIX) implies that the transformation is performed for each source separately.

Related Topics

PROXSCAL
Overview (PROXSCAL command)
Variable List Subcommand (PROXSCAL command)
TABLE Subcommand (PROXSCAL command)
SHAPE Subcommand (PROXSCAL command)
INITIAL Subcommand (PROXSCAL command)
WEIGHTS Subcommand (PROXSCAL command)
CONDITION Subcommand (PROXSCAL command)
TRANSFORMATION Subcommand (PROXSCAL command)
PROXIMITIES Subcommand (PROXSCAL command)
MODEL Subcommand (PROXSCAL command)
RESTRICTIONS Subcommand (PROXSCAL command)
VARIABLES Keyword (PROXSCAL command)
SPLINE Keyword (PROXSCAL command)
ACCELERATION Subcommand (PROXSCAL command)
CRITERIA Subcommand (PROXSCAL command)
PRINT Subcommand (PROXSCAL command)
PLOT Subcommand (PROXSCAL command)
OUTFILE Subcommand (PROXSCAL command)
MATRIX Subcommand (PROXSCAL command)


PROXIMITIES Subcommand (PROXSCAL command)

PROXIMITIES (subcommand),PROXIMITIES (subcommand),PROXIMITIES (subcommand)
PROXSCAL command,PROXSCAL command,PROXSCAL command
PROXSCAL (command),PROXSCAL (command),PROXSCAL (command)
PROXIMITIES subcommand,PROXIMITIES subcommand,PROXIMITIES subcommand

The PROXIMITIES subcommand specifies the type of proximities used in the analysis. The term proximity is used for either similarity or dissimilarity data.

DISSIMILARITIES (keyword),DISSIMILARITIES (keyword),DISSIMILARITIES (keyword)
PROXSCAL command,PROXSCAL command,PROXSCAL command
SIMILARITIES (keyword),SIMILARITIES (keyword),SIMILARITIES (keyword)
PROXSCAL command,PROXSCAL command,PROXSCAL command
DISSIMILARITIES | Dissimilarity data. This specification is the default when PROXIMITIES is not specified. Small dissimilarities correspond to small distances, and large dissimilarities correspond to large distances.
SIMILARITIES | Similarity data. Small similarities correspond to large distances and large similarities correspond to small distances.

Example

PROXSCAL object01 TO object12
  /PROXIMITIES=SIMILARITIES.

• In this example, PROXSCAL expects the proximities to be similarities.

Related Topics

PROXSCAL
Overview (PROXSCAL command)
Variable List Subcommand (PROXSCAL command)
TABLE Subcommand (PROXSCAL command)
SHAPE Subcommand (PROXSCAL command)
INITIAL Subcommand (PROXSCAL command)
WEIGHTS Subcommand (PROXSCAL command)
CONDITION Subcommand (PROXSCAL command)
TRANSFORMATION Subcommand (PROXSCAL command)
SPLINE Keyword (PROXSCAL command)
MODEL Subcommand (PROXSCAL command)
RESTRICTIONS Subcommand (PROXSCAL command)
VARIABLES Keyword (PROXSCAL command)
SPLINE Keyword (PROXSCAL command)
ACCELERATION Subcommand (PROXSCAL command)
CRITERIA Subcommand (PROXSCAL command)
PRINT Subcommand (PROXSCAL command)
PLOT Subcommand (PROXSCAL command)
OUTFILE Subcommand (PROXSCAL command)
MATRIX Subcommand (PROXSCAL command)


MODEL Subcommand (PROXSCAL command)

MODEL (subcommand),MODEL (subcommand),MODEL (subcommand)
PROXSCAL command,PROXSCAL command,PROXSCAL command

MODEL defines the scaling model for the analysis if more than one source is present. IDENTITY is the default model. The three other models are individual differences models.

IDENTITY (keyword),IDENTITY (keyword),IDENTITY (keyword)
PROXSCAL command,PROXSCAL command,PROXSCAL command
WEIGHTED (keyword),WEIGHTED (keyword),WEIGHTED (keyword)
PROXSCAL command,PROXSCAL command,PROXSCAL command
GENERALIZED (keyword),GENERALIZED (keyword),GENERALIZED (keyword)
PROXSCAL command,PROXSCAL command,PROXSCAL command
REDUCED (keyword),REDUCED (keyword),REDUCED (keyword)
PROXSCAL command,PROXSCAL command,PROXSCAL command
IDENTITY | Identity model. All sources have the same configuration. This is the default model, and it is not an individual differences model.
WEIGHTED | Weighted Euclidean model. This model is an individual differences model and equivalent to the INDSCAL model in the ALSCAL procedure. Each source has an individual space, in which every dimension of the common space is weighted differentially.
GENERALIZED | Generalized Euclidean model. This model is equivalent to the GEMSCAL model in the ALSCAL procedure. Each source has an individual space that is equal to a rotation of the common space, followed by a differential weighting of the dimensions.
REDUCED | Reduced rank model. This model is similar to GENERALIZED, but the rank of the individual space is equal to n. This number is always smaller than the maximum number of dimensions and equal to or greater than 1. The default is 2.

• If IDENTITY is specified for only one source, this subcommand is silently ignored.

• If an individual differences model is specified for only one source, a warning is issued, and the model is set to IDENTITY.

Example

PROXSCAL object01 TO object07
  /MODEL=WEIGHTED.

• A weighted Euclidean model is fitted, but only when the number of cases in the active dataset is a multiple of 7, starting from 14 (14, 21, 28, and so on). Otherwise, there is only one source, and the model is set to IDENTITY.

Related Topics

PROXSCAL
Overview (PROXSCAL command)
Variable List Subcommand (PROXSCAL command)
TABLE Subcommand (PROXSCAL command)
SHAPE Subcommand (PROXSCAL command)
INITIAL Subcommand (PROXSCAL command)
WEIGHTS Subcommand (PROXSCAL command)
CONDITION Subcommand (PROXSCAL command)
TRANSFORMATION Subcommand (PROXSCAL command)
SPLINE Keyword (PROXSCAL command)
PROXIMITIES Subcommand (PROXSCAL command)
RESTRICTIONS Subcommand (PROXSCAL command)
VARIABLES Keyword (PROXSCAL command)
SPLINE Keyword (PROXSCAL command)
ACCELERATION Subcommand (PROXSCAL command)
CRITERIA Subcommand (PROXSCAL command)
PRINT Subcommand (PROXSCAL command)
PLOT Subcommand (PROXSCAL command)
OUTFILE Subcommand (PROXSCAL command)
MATRIX Subcommand (PROXSCAL command)


RESTRICTIONS Subcommand (PROXSCAL command)

RESTRICTIONS (subcommand),RESTRICTIONS (subcommand),RESTRICTIONS (subcommand)
PROXSCAL command,PROXSCAL command,PROXSCAL command
PROXSCAL (command),PROXSCAL (command),PROXSCAL (command)
RESTRICTIONS subcommand,RESTRICTIONS subcommand,RESTRICTIONS subcommand

PROXSCAL provides two types of restrictions for the user to choose from. The first type fixes (some) coordinates in the configuration. The second type specifies that the common space is a weighted sum of independent variables.

COORDINATES (keyword),COORDINATES (keyword),COORDINATES (keyword)
PROXSCAL command,PROXSCAL command,PROXSCAL command
VARIABLES (keyword),VARIABLES (keyword),VARIABLES (keyword)
PROXSCAL command,PROXSCAL command,PROXSCAL command
FIRST (keyword),FIRST (keyword),FIRST (keyword)
PROXSCAL command,PROXSCAL command,PROXSCAL command
FIRST (keyword),FIRST (keyword),FIRST (keyword)
with VARIABLES keyword,with VARIABLES keyword,with VARIABLES keyword
COORDINATES | Fixed coordinates. A parenthesized PASW Statistics data filename must be specified containing the fixed coordinates for the common space. A variable list may be given, if some specific variables need to be selected from the external file. If the variable list is omitted, the procedure automatically selects the first MAXDIM variables in the external file, where MAXDIM is the maximum number of dimensions requested for the analysis on the CRITERIA subcommand. A missing value indicates that a coordinate on a dimension is free. The coordinates of objects with nonmissing values are kept fixed during the analysis. The number of cases for each variable must be equal to the number of objects.
VARIABLES | Independent variables. The common space is restricted to be a linear combination of the independent variables in the variable list. A parenthesized PASW Statistics data file must be specified containing the independent variables. If the variable list is omitted, the procedure automatically selects all variables in the external file. Instead of the variable list, the user may specify the keyword FIRST(n), where n is a positive integer, to select the first n variables in the external file. The number of cases for each variable must be equal to the number of objects. After the variable selection specification, we may provide a list of keywords (in number equal to the number of the independent variables) indicating the transformations for the independent variables.

Related Topics

PROXSCAL
Overview (PROXSCAL command)
Variable List Subcommand (PROXSCAL command)
TABLE Subcommand (PROXSCAL command)
SHAPE Subcommand (PROXSCAL command)
INITIAL Subcommand (PROXSCAL command)
WEIGHTS Subcommand (PROXSCAL command)
CONDITION Subcommand (PROXSCAL command)
TRANSFORMATION Subcommand (PROXSCAL command)
SPLINE Keyword (PROXSCAL command)
PROXIMITIES Subcommand (PROXSCAL command)
MODEL Subcommand (PROXSCAL command)
VARIABLES Keyword (PROXSCAL command)
SPLINE Keyword (PROXSCAL command)
ACCELERATION Subcommand (PROXSCAL command)
CRITERIA Subcommand (PROXSCAL command)
PRINT Subcommand (PROXSCAL command)
PLOT Subcommand (PROXSCAL command)
OUTFILE Subcommand (PROXSCAL command)
MATRIX Subcommand (PROXSCAL command)


VARIABLES Keyword (PROXSCAL command)

INTERVAL (keyword),INTERVAL (keyword),INTERVAL (keyword)
PROXSCAL command,PROXSCAL command,PROXSCAL command
INTERVAL (keyword),INTERVAL (keyword),INTERVAL (keyword)
with VARIABLES keyword,with VARIABLES keyword,with VARIABLES keyword
NOMINAL (keyword),NOMINAL (keyword),NOMINAL (keyword)
PROXSCAL command,PROXSCAL command,PROXSCAL command
NOMINAL (keyword),NOMINAL (keyword),NOMINAL (keyword)
with VARIABLES keyword,with VARIABLES keyword,with VARIABLES keyword
ORDINAL (keyword),ORDINAL (keyword),ORDINAL (keyword)
PROXSCAL command,PROXSCAL command,PROXSCAL command
ORDINAL (keyword),ORDINAL (keyword),ORDINAL (keyword)
with VARIABLES keyword,with VARIABLES keyword,with VARIABLES keyword
KEEPTIES (keyword),KEEPTIES (keyword),KEEPTIES (keyword)
PROXSCAL command,PROXSCAL command,PROXSCAL command
KEEPTIES (keyword),KEEPTIES (keyword),KEEPTIES (keyword)
with ORDINAL keyword,with ORDINAL keyword,with ORDINAL keyword
UNTIE (keyword),UNTIE (keyword),UNTIE (keyword)
PROXSCAL command,PROXSCAL command,PROXSCAL command
UNTIE (keyword),UNTIE (keyword),UNTIE (keyword)
with ORDINAL keyword,with ORDINAL keyword,with ORDINAL keyword
SPLINE (keyword),SPLINE (keyword),SPLINE (keyword)
PROXSCAL command,PROXSCAL command,PROXSCAL command
SPLINE (keyword),SPLINE (keyword),SPLINE (keyword)
with VARIABLES keyword,with VARIABLES keyword,with VARIABLES keyword

The following keywords may be specified:

INTERVAL | Numerical transformation. In this case, the transformed values of a variable are proportional to the original values of the variable, including free estimation of the intercept.
NOMINAL | Nominal transformation. The values are treated as unordered. The same values will obtain the same transformed values.
ORDINAL | Ordinal transformation. The values of the transformed variable have the same order as the values of the original variable. In parenthesis, the approach to tied values can be specified. Keeping tied values tied, also known as secondary approach to ties, is default. Specification may be implicit, ORDINAL, or explicit, ORDINAL(KEEPTIES). Allowing tied values to be untied, also known as the primary approach to ties, is specified as ORDINAL (UNTIE).
SPLINE | Monotone spline transformation. The transformed values of the variable are a smooth nondecreasing piecewise polynomial transformation of the original values of the chosen degree. The pieces are specified by the number and placement of the interior knots.

Related Topics

PROXSCAL
Overview (PROXSCAL command)
Variable List Subcommand (PROXSCAL command)
TABLE Subcommand (PROXSCAL command)
SHAPE Subcommand (PROXSCAL command)
INITIAL Subcommand (PROXSCAL command)
WEIGHTS Subcommand (PROXSCAL command)
CONDITION Subcommand (PROXSCAL command)
TRANSFORMATION Subcommand (PROXSCAL command)
SPLINE Keyword (PROXSCAL command)
PROXIMITIES Subcommand (PROXSCAL command)
MODEL Subcommand (PROXSCAL command)
RESTRICTIONS Subcommand (PROXSCAL command)
SPLINE Keyword (PROXSCAL command)
ACCELERATION Subcommand (PROXSCAL command)
CRITERIA Subcommand (PROXSCAL command)
PRINT Subcommand (PROXSCAL command)
PLOT Subcommand (PROXSCAL command)
OUTFILE Subcommand (PROXSCAL command)
MATRIX Subcommand (PROXSCAL command)


SPLINE Keyword (PROXSCAL command)

DEGREE (keyword),DEGREE (keyword),DEGREE (keyword)
PROXSCAL command,PROXSCAL command,PROXSCAL command
DEGREE (keyword),DEGREE (keyword),DEGREE (keyword)
with SPLINE keyword,with SPLINE keyword,with SPLINE keyword
INKNOT (keyword),INKNOT (keyword),INKNOT (keyword)
PROXSCAL command,PROXSCAL command,PROXSCAL command
INKNOT (keyword),INKNOT (keyword),INKNOT (keyword)
with SPLINE keyword,with SPLINE keyword,with SPLINE keyword

SPLINE has the following keywords:

DEGREE | The degree of the polynomial. If DEGREE is not specified, the degree is assumed to be 2. The range of DEGREE is between 1 and 3 (inclusive).
INKNOT | The number of interior knots. If INKNOT is not specified, the number of interior knots is assumed to be 1. The range of INKNOT is between 0 and the number of different values of the variable.

Example

PROXSCAL aunt TO uncle
  /RESTRICTIONS=VARIABLES(ivars.sav) degree generation gender
                          (ORDINAL ORDINAL NOMINAL).

• In this example, there are three independent variables specified: degree, generation, and gender.

• The variables are specified in the data file ivars.sav.

• On both degree and generation, ordinal transformations are allowed. By default, tied values in ordinal variables are kept tied. Gender is allowed to be nominally transformed.

Related Topics

PROXSCAL
Overview (PROXSCAL command)
Variable List Subcommand (PROXSCAL command)
TABLE Subcommand (PROXSCAL command)
SHAPE Subcommand (PROXSCAL command)
INITIAL Subcommand (PROXSCAL command)
WEIGHTS Subcommand (PROXSCAL command)
CONDITION Subcommand (PROXSCAL command)
TRANSFORMATION Subcommand (PROXSCAL command)
SPLINE Keyword (PROXSCAL command)
PROXIMITIES Subcommand (PROXSCAL command)
MODEL Subcommand (PROXSCAL command)
RESTRICTIONS Subcommand (PROXSCAL command)
VARIABLES Keyword (PROXSCAL command)
ACCELERATION Subcommand (PROXSCAL command)
CRITERIA Subcommand (PROXSCAL command)
PRINT Subcommand (PROXSCAL command)
PLOT Subcommand (PROXSCAL command)
OUTFILE Subcommand (PROXSCAL command)
MATRIX Subcommand (PROXSCAL command)


ACCELERATION Subcommand (PROXSCAL command)

ACCELERATION (subcommand),ACCELERATION (subcommand),ACCELERATION (subcommand)
PROXSCAL command,PROXSCAL command,PROXSCAL command
PROXSCAL (command),PROXSCAL (command),PROXSCAL (command)
ACCELERATION subcommand,ACCELERATION subcommand,ACCELERATION subcommand

By default, a fast majorization method is used to minimize stress.

NONE (keyword),NONE (keyword),NONE (keyword)
PROXSCAL command,PROXSCAL command,PROXSCAL command
NONE The standard majorization update. This turns off the fast method.

• If the subcommand RESTRICTION is used with fixed coordinates or independent variables, ACCELERATION=NONE is in effect.

• If an individual differences model is specified on the MODEL subcommand, ACCELERATION=NONE is in effect.

Example

PROXSCAL VARIABLES=object01 TO object12
  /ACCELERATION=NONE.

• Here, relaxed updates are switched off through the specification of the keyword NONE after ACCELERATION.

Related Topics

PROXSCAL
Overview (PROXSCAL command)
Variable List Subcommand (PROXSCAL command)
TABLE Subcommand (PROXSCAL command)
SHAPE Subcommand (PROXSCAL command)
INITIAL Subcommand (PROXSCAL command)
WEIGHTS Subcommand (PROXSCAL command)
CONDITION Subcommand (PROXSCAL command)
TRANSFORMATION Subcommand (PROXSCAL command)
SPLINE Keyword (PROXSCAL command)
PROXIMITIES Subcommand (PROXSCAL command)
MODEL Subcommand (PROXSCAL command)
RESTRICTIONS Subcommand (PROXSCAL command)
VARIABLES Keyword (PROXSCAL command)
SPLINE Keyword (PROXSCAL command)
CRITERIA Subcommand (PROXSCAL command)
PRINT Subcommand (PROXSCAL command)
PLOT Subcommand (PROXSCAL command)
OUTFILE Subcommand (PROXSCAL command)
MATRIX Subcommand (PROXSCAL command)


CRITERIA Subcommand (PROXSCAL command)

CRITERIA (subcommand),CRITERIA (subcommand),CRITERIA (subcommand)
PROXSCAL command,PROXSCAL command,PROXSCAL command
PROXSCAL (command),PROXSCAL (command),PROXSCAL (command)
CRITERIA subcommand,CRITERIA subcommand,CRITERIA subcommand

Use CRITERIA to set the dimensionality and criteria for terminating the algorithm, or minimization process. You can specify one or more of the following keywords:

DIMENSIONS (keyword),DIMENSIONS (keyword),DIMENSIONS (keyword)
PROXSCAL command,PROXSCAL command,PROXSCAL command
MAXITER (keyword),MAXITER (keyword),MAXITER (keyword)
PROXSCAL command,PROXSCAL command,PROXSCAL command
DIFFSTRESS (keyword),DIFFSTRESS (keyword),DIFFSTRESS (keyword)
PROXSCAL command,PROXSCAL command,PROXSCAL command
MINSTRESS (keyword),MINSTRESS (keyword),MINSTRESS (keyword)
PROXSCAL command,PROXSCAL command,PROXSCAL command
DIMENSIONS | Minimum and maximum number of dimensions. By default, PROXSCAL computes a solution in two dimensions (min=2 and max=2). The minimum and maximum number of dimensions can be any integers inclusively between 1 and the number of objects minus 1, as long as the minimum is less than or equal to the maximum. PROXSCAL starts computing a solution in the largest dimensionality and reduces the dimensionality in steps, until the lowest dimensionality is reached. Specifying a single value represents both minimum and maximum number of dimensions, thus DIMENSIONS(4) is equivalent to DIMENSIONS(4,4).
MAXITER | Maximum number of iterations. By default, n=100, specifying the maximum number of iterations that is performed while one of the convergence criterion below (CONVERGENCE and STRESSMIN) is not yet reached. Decreasing this number might give less accurate results but will take less time. N must have a positive integer value.
DIFFSTRESS | Convergence criterion. PROXSCAL minimizes the goodness-of-fit index normalized raw stress. By default, PROXSCAL stops iterating when the difference in consecutive stress values is less than 0.0001 (n=0.0001). To obtain a more precise solution, you can specify a smaller value. The value specified must lie between 0.0 and 1.0, inclusively.
MINSTRESS | Minimum stress value. By default, PROXSCAL stops iterating when the stress value itself is small, that is, less than 0.0001 (n=0.0001). To obtain an even more precise solution, you can specify a smaller value. The value specified must lie between 0.0 and 1.0, inclusively.

Example

PROXSCAL VARIABLES=object01 TO object24
  /CRITERIA=DIMENSIONS(2,4) MAXITER(200) DIFFSTRESS(0.00001).

• The maximum number of dimensions equals 4 and the minimum number of dimensions equals 2. PROXSCAL computes a four-, three-, and two-dimensional solution, respectively.

• The maximum number of iteration is raised to 200.

• The convergence criterion is sharpened to 0.00001.

Related Topics

PROXSCAL
Overview (PROXSCAL command)
Variable List Subcommand (PROXSCAL command)
TABLE Subcommand (PROXSCAL command)
SHAPE Subcommand (PROXSCAL command)
INITIAL Subcommand (PROXSCAL command)
WEIGHTS Subcommand (PROXSCAL command)
CONDITION Subcommand (PROXSCAL command)
TRANSFORMATION Subcommand (PROXSCAL command)
SPLINE Keyword (PROXSCAL command)
PROXIMITIES Subcommand (PROXSCAL command)
MODEL Subcommand (PROXSCAL command)
RESTRICTIONS Subcommand (PROXSCAL command)
VARIABLES Keyword (PROXSCAL command)
SPLINE Keyword (PROXSCAL command)
ACCELERATION Subcommand (PROXSCAL command)
PRINT Subcommand (PROXSCAL command)
PLOT Subcommand (PROXSCAL command)
OUTFILE Subcommand (PROXSCAL command)
MATRIX Subcommand (PROXSCAL command)


PRINT Subcommand (PROXSCAL command)

PRINT (subcommand),PRINT (subcommand),PRINT (subcommand)
PROXSCAL command,PROXSCAL command,PROXSCAL command
PROXSCAL (command),PROXSCAL (command),PROXSCAL (command)
PRINT subcommand,PRINT subcommand,PRINT subcommand

PRINT specifies the optional output. By default, PROXSCAL displays the stress and fit values for each analysis, the coordinates of the common space, and, with appropriate specification on corresponding subcommands, the individual space weights and transformed independent variables, corresponding regression weights, and correlations.

• Omitting the PRINT subcommand or specifying PRINT without keywords is equivalent to specifying COMMON, WEIGHTS, and VARIABLES.

• If a keyword(s) is specified, only the output for that particular keyword(s) is displayed.

• In the case of duplicate or contradicting keyword specification, the last keyword applies.

• Inapplicable keywords are silently ignored. That is, specifying a keyword for which no output is available (for example, specifying INDIVIDUAL with only one source) will silently ignore this keyword.

NONE (keyword),NONE (keyword),NONE (keyword)
PROXSCAL command,PROXSCAL command,PROXSCAL command
INPUT (keyword),INPUT (keyword),INPUT (keyword)
PROXSCAL command,PROXSCAL command,PROXSCAL command
RANDOM (keyword),RANDOM (keyword),RANDOM (keyword)
PROXSCAL command,PROXSCAL command,PROXSCAL command
HISTORY (keyword),HISTORY (keyword),HISTORY (keyword)
PROXSCAL command,PROXSCAL command,PROXSCAL command
iteration history,iteration history,iteration history
PROXSCAL command,PROXSCAL command,PROXSCAL command
STRESS (keyword),STRESS (keyword),STRESS (keyword)
PROXSCAL command,PROXSCAL command,PROXSCAL command
stress measures,stress measures,stress measures
PROXSCAL command,PROXSCAL command,PROXSCAL command
normalized raw Stress,normalized raw Stress,normalized raw Stress
PROXSCAL command,PROXSCAL command,PROXSCAL command
dispersion accounted for,dispersion accounted for,dispersion accounted for
PROXSCAL command,PROXSCAL command,PROXSCAL command
Tucker's coefficient of congruence,Tucker's coefficient of congruence,Tucker's coefficient of congruence
PROXSCAL command,PROXSCAL command,PROXSCAL command
DECOMPOSITION (keyword),DECOMPOSITION (keyword),DECOMPOSITION (keyword)
PROXSCAL command,PROXSCAL command,PROXSCAL command
decomposition of stress,decomposition of stress,decomposition of stress
PROXSCAL command,PROXSCAL command,PROXSCAL command
COMMON (keyword),COMMON (keyword),COMMON (keyword)
PROXSCAL command,PROXSCAL command,PROXSCAL command
common space,common space,common space
PROXSCAL command,PROXSCAL command,PROXSCAL command
DISTANCES (keyword),DISTANCES (keyword),DISTANCES (keyword)
PROXSCAL command,PROXSCAL command,PROXSCAL command
WEIGHTS (keyword),WEIGHTS (keyword),WEIGHTS (keyword)
PROXSCAL command,PROXSCAL command,PROXSCAL command
individual space weights,individual space weights,individual space weights
PROXSCAL command,PROXSCAL command,PROXSCAL command
INDIVIDUAL (keyword),INDIVIDUAL (keyword),INDIVIDUAL (keyword)
PROXSCAL command,PROXSCAL command,PROXSCAL command
individual spaces,individual spaces,individual spaces
PROXSCAL command,PROXSCAL command,PROXSCAL command
TRANSFORMATION (keyword),TRANSFORMATION (keyword),TRANSFORMATION (keyword)
PROXSCAL command,PROXSCAL command,PROXSCAL command
transformed proximities,transformed proximities,transformed proximities
PROXSCAL command,PROXSCAL command,PROXSCAL command
VARIABLES (keyword),VARIABLES (keyword),VARIABLES (keyword)
PROXSCAL command,PROXSCAL command,PROXSCAL command
CORRELATIONS (keyword),CORRELATIONS (keyword),CORRELATIONS (keyword)
PROXSCAL command,PROXSCAL command,PROXSCAL command
correlations,correlations,correlations
PROXSCAL command,PROXSCAL command,PROXSCAL command
NONE | No output. Display only the normalized raw stress and corresponding fit values.
INPUT | Input data. The display includes the original proximities, and, if present, the data weights, the initial configuration, and the fixed coordinates or the independent variables.
RANDOM | Multiple random starts. Displays the random number seed and stress value of each random start.
HISTORY | History of iterations. Displays the history of iterations of the main algorithm.
STRESS | Stress measures. Displays different stress values. The table contains values for normalized raw stress, Stress-I, Stress-II, S-Stress, dispersion accounted for (D.A.F.), and Tucker’s coefficient of congruence. This is specified by default.
DECOMPOSITION | Decomposition of stress. Displays an object and source decomposition of stress, including row and column totals.
COMMON | Common space. Displays the coordinates of the common space. This is specified by default.
DISTANCES | Distances. Displays the distances between the objects in the configuration.
WEIGHTS | Individual space weights. Displays the individual space weights, only if one of the individual differences models is specified on the MODEL subcommand. Depending on the model, the space weights are decomposed in rotation weights and dimension weights, which are also displayed. This is specified by default.
INDIVIDUAL | Individual spaces. The coordinates of the individual spaces are displayed, only if one of the individual differences models is specified on the MODEL subcommand.
TRANSFORMATION | Transformed proximities. Displays the transformed proximities between the objects in the configuration.
VARIABLES | Independent variables. If VARIABLES was specified on the RESTRICTIONS subcommand, this keyword triggers the display of the transformed independent variables and the corresponding regression weights. This is specified by default.
CORRELATIONS | Correlations. The correlations between the independent variables and the dimensions of the common space are displayed. This is specified by default.

Example

PROXSCAL VARIABLES=source01 TO source02
  /TABLE=row_id BY col_id
  /MODEL=WEIGHTED
  /PRINT=HISTORY COMMON STRESS.

• Here, a weighted Euclidean model is specified with two sources.

• The output consists of the history of iterations of the main algorithm, the coordinates of the common space, the individual space weights, and several measures of fit.

Related Topics

PROXSCAL
Overview (PROXSCAL command)
Variable List Subcommand (PROXSCAL command)
TABLE Subcommand (PROXSCAL command)
SHAPE Subcommand (PROXSCAL command)
INITIAL Subcommand (PROXSCAL command)
WEIGHTS Subcommand (PROXSCAL command)
CONDITION Subcommand (PROXSCAL command)
TRANSFORMATION Subcommand (PROXSCAL command)
SPLINE Keyword (PROXSCAL command)
PROXIMITIES Subcommand (PROXSCAL command)
MODEL Subcommand (PROXSCAL command)
RESTRICTIONS Subcommand (PROXSCAL command)
VARIABLES Keyword (PROXSCAL command)
SPLINE Keyword (PROXSCAL command)
ACCELERATION Subcommand (PROXSCAL command)
CRITERIA Subcommand (PROXSCAL command)
PLOT Subcommand (PROXSCAL command)
OUTFILE Subcommand (PROXSCAL command)
MATRIX Subcommand (PROXSCAL command)


PLOT Subcommand (PROXSCAL command)

PLOT (subcommand),PLOT (subcommand),PLOT (subcommand)
PROXSCAL command,PROXSCAL command,PROXSCAL command
PROXSCAL (command),PROXSCAL (command),PROXSCAL (command)
PLOT subcommand,PLOT subcommand,PLOT subcommand

PLOT controls the display of plots. By default, PROXSCAL produces a scatterplot of object coordinates of the common space, the individual space weights, and the correlations between the independent variables (that is, equivalent to specifying COMMON, WEIGHTS, and CORRELATIONS).

• Specifying a keyword overrides the default output and only output is generated for that keyword.

• Duplicate keywords are silently ignored.

• In case of contradicting keywords, only the last keyword is considered.

• Inapplicable keywords (for example, stress with equal minimum and maximum number of dimensions on the CRITERIA subcommand) are silently ignored.

• Multiple variable lists are allowed for TRANSFORMATIONS and RESIDUALS. For each variable list, a separate plot will be displayed.

NONE (keyword),NONE (keyword),NONE (keyword)
PROXSCAL command,PROXSCAL command,PROXSCAL command
STRESS (keyword),STRESS (keyword),STRESS (keyword)
PROXSCAL command,PROXSCAL command,PROXSCAL command
stress plots,stress plots,stress plots
PROXSCAL command,PROXSCAL command,PROXSCAL command
COMMON (keyword),COMMON (keyword),COMMON (keyword)
PROXSCAL command,PROXSCAL command,PROXSCAL command
common space plots,common space plots,common space plots
PROXSCAL command,PROXSCAL command,PROXSCAL command
WEIGHTS (keyword),WEIGHTS (keyword),WEIGHTS (keyword)
PROXSCAL command,PROXSCAL command,PROXSCAL command
individual space weights plots,individual space weights plots,individual space weights plots
PROXSCAL command,PROXSCAL command,PROXSCAL command
INDIVIDUAL (keyword),INDIVIDUAL (keyword),INDIVIDUAL (keyword)
PROXSCAL command,PROXSCAL command,PROXSCAL command
individual spaces plots,individual spaces plots,individual spaces plots
PROXSCAL command,PROXSCAL command,PROXSCAL command
TRANSFORMATIONS (keyword),TRANSFORMATIONS (keyword),TRANSFORMATIONS (keyword)
PROXSCAL command,PROXSCAL command,PROXSCAL command
transformation plots,transformation plots,transformation plots
PROXSCAL command,PROXSCAL command,PROXSCAL command
RESIDUALS (keyword),RESIDUALS (keyword),RESIDUALS (keyword)
PROXSCAL command,PROXSCAL command,PROXSCAL command
residual plots,residual plots,residual plots
PROXSCAL command,PROXSCAL command,PROXSCAL command
VARIABLES (keyword),VARIABLES (keyword),VARIABLES (keyword)
PROXSCAL command,PROXSCAL command,PROXSCAL command
CORRELATIONS (keyword),CORRELATIONS (keyword),CORRELATIONS (keyword)
PROXSCAL command,PROXSCAL command,PROXSCAL command
correlations plots,correlations plots,correlations plots
PROXSCAL command,PROXSCAL command,PROXSCAL command
NONE | No plots. PROXSCAL does not produce any plots.
STRESS | Stress plot. A plot is produced of stress versus dimensions. This plot is only produced if the maximum number of dimensions is larger than the minimum number of dimensions.
COMMON | Common space. A scatterplot matrix of coordinates of the common space is displayed.
WEIGHTS | Individual space weights. A scatterplot is produced of the individual space weights. This is only possible if one of the individual differences models is specified on the MODEL subcommand. For the weighted Euclidean model, the weights are printed in plots with one dimension on each axis. For the generalized Euclidean model, one plot is produced per dimension, indicating both rotation and weighting of that dimension. The reduced rank model produces the same plot as the generalized Euclidean model does but reduces the number of dimensions for the individual spaces.
INDIVIDUAL | Individual spaces. For each source specified on the variable list, the coordinates of the individual spaces are displayed in scatterplot matrices. This is only possible if one of the individual differences models is specified on the MODEL subcommand.
TRANSFORMATIONS | Transformation plots. Plots are produced of the original proximities versus the transformed proximities. On the variable list, the sources can be specified of which the plot is to be produced.
RESIDUALS | Residuals plots. The transformed proximities versus the distances are plotted. On the variable list, the sources can be specified of which the plot is to be produced.
VARIABLES | Independent variables. Transformation plots are produced for the independent variables specified on the variable list.
CORRELATIONS | Correlations. A plot of correlations between the independent variables and the dimensions of the common space is displayed.

Example

PROXSCAL VARIABLES=source01 TO source02
  /TABLE=row_id BY col_id
  /MODEL=WEIGHTED
  /CRITERIA=DIMENSIONS(3)
  /PLOT=COMMON INDIVIDUAL(source02).

• Here, the syntax specifies a weighted Euclidean model with two sources in three dimensions.

• COMMON produces a scatterplot matrix defined by dimensions 1, 2, and 3.

• For the individual spaces, a scatterplot matrix with 3 dimensions is only produced for the individual space of source02.

Related Topics

PROXSCAL
Overview (PROXSCAL command)
Variable List Subcommand (PROXSCAL command)
TABLE Subcommand (PROXSCAL command)
SHAPE Subcommand (PROXSCAL command)
INITIAL Subcommand (PROXSCAL command)
WEIGHTS Subcommand (PROXSCAL command)
CONDITION Subcommand (PROXSCAL command)
TRANSFORMATION Subcommand (PROXSCAL command)
SPLINE Keyword (PROXSCAL command)
PROXIMITIES Subcommand (PROXSCAL command)
MODEL Subcommand (PROXSCAL command)
RESTRICTIONS Subcommand (PROXSCAL command)
VARIABLES Keyword (PROXSCAL command)
SPLINE Keyword (PROXSCAL command)
ACCELERATION Subcommand (PROXSCAL command)
CRITERIA Subcommand (PROXSCAL command)
PRINT Subcommand (PROXSCAL command)
OUTFILE Subcommand (PROXSCAL command)
MATRIX Subcommand (PROXSCAL command)


OUTFILE Subcommand (PROXSCAL command)

OUTFILE (subcommand),OUTFILE (subcommand),OUTFILE (subcommand)
PROXSCAL command,PROXSCAL command,PROXSCAL command
PROXSCAL (command),PROXSCAL (command),PROXSCAL (command)
OUTFILE subcommand,OUTFILE subcommand,OUTFILE subcommand

OUTFILE saves coordinates of the common space, individual space weights, distances, transformed proximities, and transformed independent variables to an external PASW Statistics data file or previously declared dataset. The only specification required is a name for the output file.

COMMON (keyword),COMMON (keyword),COMMON (keyword)
PROXSCAL command,PROXSCAL command,PROXSCAL command
WEIGHTS (keyword),WEIGHTS (keyword),WEIGHTS (keyword)
PROXSCAL command,PROXSCAL command,PROXSCAL command
DISTANCES (keyword),DISTANCES (keyword),DISTANCES (keyword)
PROXSCAL command,PROXSCAL command,PROXSCAL command
TRANSFORMATION (keyword),TRANSFORMATION (keyword),TRANSFORMATION (keyword)
PROXSCAL command,PROXSCAL command,PROXSCAL command
VARIABLES (keyword),VARIABLES (keyword),VARIABLES (keyword)
PROXSCAL command,PROXSCAL command,PROXSCAL command
COMMON | Common space coordinates. The coordinates of the common space are written to an external PASW Statistics data file or previously declared dataset. The columns (variables) represent the dimensions DIM_1, DIM_2, ..., DIM_n of the common space. The number of cases (rows) in the PASW Statistics data file equals the number of objects.
WEIGHTS | Individual space weights. The individual space weights are written to an external PASW Statistics data file or previously declared dataset. The columns represent the dimensions DIM_1, DIM_2, ..., DIM_n of the space weights. The number of cases depends on the individual differences model specified on the MODEL subcommand. The weighted Euclidean model uses diagonal weight matrices. Only the diagonals are written to file and the number of cases is equal to the number of dimensions. The generalized Euclidean model uses full-rank nonsingular weight matrices. The matrices are written to the data file row by row. The reduced rank model writes matrices to the data file in the same way as the generalized Euclidean model does but does not write the reduced part.
DISTANCES | Distances. The matrices containing the distances for each source are stacked beneath each other and written to an external PASW Statistics data file or previously declared dataset. The number of variables in the data file are equal to the number of objects (OBJ_1, OBJ_2, ..., OBJ_n) and the number of cases in the data file are equal to the number of objects times the number of sources.
TRANSFORMATION | Transformed proximities. The matrices containing the transformed proximities for each source are stacked beneath each other and written to an external PASW Statistics data file or previously declared dataset. The number of variables in the file are equal to the number of objects (OBJ_1, OBJ_2, ..., OBJ_n) and the number of cases in the data file are equal to the number of objects times the number of sources.
VARIABLES | Independent variables. The transformed independent variables are written to an external PASW Statistics data file or previously declared dataset. The variables are written to the columns (VAR_1, VAR_2, ..., VAR_n). The number of variables in the data file are equal to the number of independent variables and the number of cases are equal to the number of objects.

Example

PROXSCAL VARIABLES=source01 TO source04
  /TABLE=row_id BY col_id
  /OUTFILE=COMMON('/data/start.sav').

• Here, the coordinates of the common space are written to the PASW Statistics data file start.sav.

• Filenames should be enclosed in quotes and are stored in the working directory unless a path is included as part of the file specification. datasets are available during the current session but are not available in subsequent sessions unless you explicitly save them as data files.

Related Topics

PROXSCAL
Overview (PROXSCAL command)
Variable List Subcommand (PROXSCAL command)
TABLE Subcommand (PROXSCAL command)
SHAPE Subcommand (PROXSCAL command)
INITIAL Subcommand (PROXSCAL command)
WEIGHTS Subcommand (PROXSCAL command)
CONDITION Subcommand (PROXSCAL command)
TRANSFORMATION Subcommand (PROXSCAL command)
SPLINE Keyword (PROXSCAL command)
PROXIMITIES Subcommand (PROXSCAL command)
MODEL Subcommand (PROXSCAL command)
RESTRICTIONS Subcommand (PROXSCAL command)
VARIABLES Keyword (PROXSCAL command)
SPLINE Keyword (PROXSCAL command)
ACCELERATION Subcommand (PROXSCAL command)
CRITERIA Subcommand (PROXSCAL command)
PRINT Subcommand (PROXSCAL command)
PLOT Subcommand (PROXSCAL command)
MATRIX Subcommand (PROXSCAL command)


MATRIX Subcommand (PROXSCAL command)

MATRIX (subcommand),MATRIX (subcommand),MATRIX (subcommand)
PROXSCAL command,PROXSCAL command,PROXSCAL command
PROXSCAL (command),PROXSCAL (command),PROXSCAL (command)
MATRIX subcommand,MATRIX subcommand,MATRIX subcommand

MATRIX reads matrix data files. It can read a matrix written by either PROXIMITIES or CLUSTER.

• The specification on MATRIX is the keyword IN and the matrix file in parentheses.

• Generally, data read by PROXSCAL are already in matrix form, whether in square format, or in stacked format using the TABLE subcommand.

• The proximity matrices PROXSCAL reads have ROWTYPE_ values of PROX.

• Using MATRIX=IN, PROXSCAL will ignore variables specified on the main variable list. All numerical variables from the matrix data file are processed.

• PROXSCAL ignores variables specified in the WEIGHTS subcommand in combination with the use of MATRIX=IN.

• With MATRIX=IN, only a source identifying variable can be specified on the TABLE subcommand. The sources are created as a result of a split file action.

IN (keyword),IN (keyword),IN (keyword)
PROXSCAL command,PROXSCAL command,PROXSCAL command
IN('file'|'dataset') Read a matrix data file. Specify a quoted file specification or previously declared dataset name, enclosed in parentheses. Data read through the MATRIX subcommand does not replace the active dataset.

Example

GET FILE = '/data/proxmtx.SAV'.

PROXSCAL
  /MATRIX=IN('/data/matrix.sav').
Multidimensional Scaling,Multidimensional Scaling,Multidimensional Scaling
PROXSCAL (command),PROXSCAL (command),PROXSCAL (command)

• MATRIX=IN specifies an external matrix data file called matrix.sav, of which all numerical variables are used for the current analysis.

Related Topics

PROXSCAL
Overview (PROXSCAL command)
Variable List Subcommand (PROXSCAL command)
TABLE Subcommand (PROXSCAL command)
SHAPE Subcommand (PROXSCAL command)
INITIAL Subcommand (PROXSCAL command)
WEIGHTS Subcommand (PROXSCAL command)
CONDITION Subcommand (PROXSCAL command)
TRANSFORMATION Subcommand (PROXSCAL command)
SPLINE Keyword (PROXSCAL command)
PROXIMITIES Subcommand (PROXSCAL command)
MODEL Subcommand (PROXSCAL command)
RESTRICTIONS Subcommand (PROXSCAL command)
VARIABLES Keyword (PROXSCAL command)
SPLINE Keyword (PROXSCAL command)
ACCELERATION Subcommand (PROXSCAL command)
CRITERIA Subcommand (PROXSCAL command)
PRINT Subcommand (PROXSCAL command)
PLOT Subcommand (PROXSCAL command)
OUTFILE Subcommand (PROXSCAL command)


QUICK CLUSTER

K-Means Cluster Analysis,K-Means Cluster Analysis,K-Means Cluster Analysis
command syntax,command syntax,command syntax
QUICK CLUSTER (command),QUICK CLUSTER (command),QUICK CLUSTER (command)
QUICK CLUSTER (command),QUICK CLUSTER (command),QUICK CLUSTER (command)
syntax chart,syntax chart,syntax chart

QUICK CLUSTER is available in the Statistics Base option.

QUICK CLUSTER {varlist}
              {ALL    }

 [/MISSING=[{LISTWISE**}] [INCLUDE]]
            {PAIRWISE  }
            {DEFAULT   }

 [/FILE='savfile'|'dataset']

 [/INITIAL=(value list)]

 [/CRITERIA=[CLUSTER({2**})][NOINITIAL][MXITER({10**})] [CONVERGE({0**})]]
                     {n  }                     {n   }             {n  }

 [/METHOD=[{KMEANS[(NOUPDATE)]**}]
           {KMEANS(UPDATE)}     }
           {CLASSIFY            }

 [/PRINT=[INITIAL**] [CLUSTER] [ID(varname)] [DISTANCE] [ANOVA] [NONE]]

 [/OUTFILE='savfile'|'dataset']

 [/SAVE=[CLUSTER[(varname)]] [DISTANCE[(varname)]]]

**Default if subcommand or keyword is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See QUICK CLUSTER Algorithms for computational details for this procedure.

Syntax for the QUICK CLUSTER command can be generated from the K-Means Cluster Analysis dialog.

Example

QUICK CLUSTER V1 TO V4
  /CRITERIA=CLUSTER(4)
  /SAVE=CLUSTER(GROUP).

Related Topics

Overview (QUICK CLUSTER command)
Example (QUICK CLUSTER command)
Variable List (QUICK CLUSTER command)
CRITERIA Subcommand (QUICK CLUSTER command)
METHOD Subcommand (QUICK CLUSTER command)
INITIAL Subcommand (QUICK CLUSTER command)
FILE Subcommand (QUICK CLUSTER command)
PRINT Subcommand (QUICK CLUSTER command)
OUTFILE Subcommand (QUICK CLUSTER command)
SAVE Subcommand (QUICK CLUSTER command)
MISSING Subcommand (QUICK CLUSTER command)


Overview (QUICK CLUSTER command)

QUICK CLUSTER (command),QUICK CLUSTER (command),QUICK CLUSTER (command)
clustering method,clustering method,clustering method
QUICK CLUSTER (command),QUICK CLUSTER (command),QUICK CLUSTER (command)
with large number of cases,with large number of cases,with large number of cases
CLUSTER (command),CLUSTER (command),CLUSTER (command)
compared with QUICK CLUSTER command,compared with QUICK CLUSTER command,compared with QUICK CLUSTER command
QUICK CLUSTER (command),QUICK CLUSTER (command),QUICK CLUSTER (command)
compared with CLUSTER command,compared with CLUSTER command,compared with CLUSTER command

When the desired number of clusters is known, QUICK CLUSTER groups cases efficiently into clusters. It is not as flexible as CLUSTER, but it uses considerably less processing time and memory, especially when the number of cases is large.

Options Collapse Hide details

Options

Algorithm Specifications. You can specify the number of clusters to form with the CRITERIA subcommand. You can also use CRITERIA to control initial cluster selection and the criteria for iterating the clustering algorithm. With the METHOD subcommand, you can specify how to update cluster centers, and you can request classification only when working with very large data files.

Initial Cluster Centers. By default, QUICK CLUSTER chooses the initial cluster centers. Alternatively, you can provide initial centers on the INITIAL subcommand. You can also read initial cluster centers from PASW Statistics data files using the FILE subcommand.

Optional Output. With the PRINT subcommand, you can display the cluster membership of each case and the distance of each case from its cluster center. You can also display the distances between the final cluster centers and a univariate analysis of variance between clusters for each clustering variable.

Saving Results. You can write the final cluster centers to a data file using the OUTFILE subcommand. In addition, you can save the cluster membership of each case and the distance from each case to its classification cluster center as new variables in the active dataset using the SAVE subcommand.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is a list of variables. By default, QUICK CLUSTER produces two clusters. The two cases that are farthest apart based on the values of the clustering variables are selected as initial cluster centers and the rest of the cases are assigned to the nearer center. The new cluster centers are calculated as the means of all cases in each cluster, and if neither the minimum change nor the maximum iteration criterion is met, all cases are assigned to the new cluster centers again. When one of the criteria is met, iteration stops, the final cluster centers are updated, and the distance of each case is computed.

Subcommand Order Collapse Hide details

Subcommand Order

• The variable list must be specified first.

• Subcommands can be named in any order.

Operations Collapse Hide details

Operations

The procedure generally involves four steps:

• First, initial cluster centers are selected, either by choosing one case for each cluster requested or by using the specified values.

• Second, each case is assigned to the nearest cluster center, and the mean of each cluster is calculated to obtain the new cluster centers.

• Third, the maximum change between the new cluster centers and the initial cluster centers is computed. If the maximum change is not less than the minimum change value and the maximum iteration number is not reached, the second step is repeated and the cluster centers are updated. The process stops when either the minimum change or maximum iteration criterion is met. The resulting clustering centers are used as classification centers in the last step.

• In the last step, all cases are assigned to the nearest classification center. The final cluster centers are updated and the distance for each case is computed.

When the number of cases is large, directly clustering all cases may be impractical. As an alternative, you can cluster a sample of cases and then use the cluster solution for the sample to classify the entire group. This can be done in two phases:

• The first phase obtains a cluster solution for the sample. This involves all four steps of the QUICK CLUSTER algorithm. OUTFILE then saves the final cluster centers to a data file.

• The second phase requires only one pass through the data. First, the FILE subcommand specifies the file containing the final cluster centers from the first analysis. These final cluster centers are used as the initial cluster centers for the second analysis. CLASSIFY is specified on the METHOD subcommand to skip the second and third steps of the clustering algorithm, and cases are classified using the initial cluster centers. When all cases are assigned, the cluster centers are updated and the distance of each case is computed. This phase can be repeated until final cluster centers are stable.

Related Topics

QUICK CLUSTER
Example (QUICK CLUSTER command)
Variable List (QUICK CLUSTER command)
CRITERIA Subcommand (QUICK CLUSTER command)
METHOD Subcommand (QUICK CLUSTER command)
INITIAL Subcommand (QUICK CLUSTER command)
FILE Subcommand (QUICK CLUSTER command)
PRINT Subcommand (QUICK CLUSTER command)
OUTFILE Subcommand (QUICK CLUSTER command)
SAVE Subcommand (QUICK CLUSTER command)
MISSING Subcommand (QUICK CLUSTER command)


Example (QUICK CLUSTER command)

QUICK CLUSTER
  zlnlong zlntoll zlnequi zlncard zlnwire zmultlin zvoice zpager zinterne
  zcallid zcallwai zforward zconfer zebill
  /MISSING=PAIRWISE
  /CRITERIA= CLUSTER(3) MXITER(20) CONVERGE(0)
  /METHOD=KMEANS(NOUPDATE)
  /PRINT INITIAL ANOVA DISTAN.

• The procedure clusters cases based upon their values for variables zlnlong through zebill.

• The MISSING subcommand specifies that a case is assigned to clusters based upon all clustering variables for which the case has nonmissing values.

• The CRITERIA subcommand specifies that three clusters will be formed, and that 20 iterations are allowed for updating cluster centers.

• The PRINT subcommand specifies that the initial cluster centers, distances between final cluster centers, and an ANOVA table of descriptive F tests for the clustering variables should be displayed.

• All other options are set to their default values.

For discussion of output from this syntax and to place the example in context, see Using K-Means to Classify Customers .

Related Topics

QUICK CLUSTER
Overview (QUICK CLUSTER command)
Variable List (QUICK CLUSTER command)
CRITERIA Subcommand (QUICK CLUSTER command)
METHOD Subcommand (QUICK CLUSTER command)
INITIAL Subcommand (QUICK CLUSTER command)
FILE Subcommand (QUICK CLUSTER command)
PRINT Subcommand (QUICK CLUSTER command)
OUTFILE Subcommand (QUICK CLUSTER command)
SAVE Subcommand (QUICK CLUSTER command)
MISSING Subcommand (QUICK CLUSTER command)


Variable List (QUICK CLUSTER command)

QUICK CLUSTER (command),QUICK CLUSTER (command),QUICK CLUSTER (command)
variable list,variable list,variable list

The variable list identifies the clustering variables.

• The variable list is required and must be the first specification on QUICK CLUSTER.

• You can use keyword ALL to refer to all user-defined variables in the active dataset.

• QUICK CLUSTER uses squared Euclidean distances, which equally weight all clustering variables. If the variables are measured in units that are not comparable, the procedure will give more weight to variables with large variances. Therefore, you should standardize variables measured on different scales using procedure DESCRIPTIVES before performing QUICK CLUSTER.

Related Topics

QUICK CLUSTER
Overview (QUICK CLUSTER command)
Example (QUICK CLUSTER command)
CRITERIA Subcommand (QUICK CLUSTER command)
METHOD Subcommand (QUICK CLUSTER command)
INITIAL Subcommand (QUICK CLUSTER command)
FILE Subcommand (QUICK CLUSTER command)
PRINT Subcommand (QUICK CLUSTER command)
OUTFILE Subcommand (QUICK CLUSTER command)
SAVE Subcommand (QUICK CLUSTER command)
MISSING Subcommand (QUICK CLUSTER command)


CRITERIA Subcommand (QUICK CLUSTER command)

CRITERIA specifies the number of clusters to form and controls options for the clustering algorithm. You can use any or all of the keywords below.

• The NOINITIAL option followed by the remaining steps of the default QUICK CLUSTER algorithm makes QUICK CLUSTER equivalent to MacQueen’s n-means clustering method.

QUICK CLUSTER (command),QUICK CLUSTER (command),QUICK CLUSTER (command)
specifying number of clusters,specifying number of clusters,specifying number of clusters
CLUSTER (keyword),CLUSTER (keyword),CLUSTER (keyword)
QUICK CLUSTER command,QUICK CLUSTER command,QUICK CLUSTER command
NOINITIAL (keyword),NOINITIAL (keyword),NOINITIAL (keyword)
QUICK CLUSTER command,QUICK CLUSTER command,QUICK CLUSTER command
QUICK CLUSTER (command),QUICK CLUSTER (command),QUICK CLUSTER (command)
iterations,iterations,iterations
MXITER (keyword),MXITER (keyword),MXITER (keyword)
QUICK CLUSTER command,QUICK CLUSTER command,QUICK CLUSTER command
convergence criterion,convergence criterion,convergence criterion
QUICK CLUSTER command,QUICK CLUSTER command,QUICK CLUSTER command
CONVERGE (keyword),CONVERGE (keyword),CONVERGE (keyword)
QUICK CLUSTER command,QUICK CLUSTER command,QUICK CLUSTER command
QUICK CLUSTER (command),QUICK CLUSTER (command),QUICK CLUSTER (command)
convergence criteria,convergence criteria,convergence criteria
CLUSTER(n) | Number of clusters. QUICK CLUSTER assigns cases to n clusters. The default is 2.
NOINITIAL | No initial cluster center selection. By default, initial cluster centers are formed by choosing one case (with valid data for the clustering variables) for each cluster requested. The initial selection requires a pass through the data to ensure that the centers are well separated from one another. If NOINITIAL is specified, QUICK CLUSTER selects the first n cases without missing values as initial cluster centers.
MXITER(n) | Maximum number of iterations for updating cluster centers. The default is 10. Iteration stops when the maximum number of iterations has been reached. MXITER is ignored when METHOD=CLASSIFY.
CONVERGE(n) | Convergence criterion controlling minimum change in cluster centers. The default value for n is 0. The minimum change value equals the convergence value (n) times the minimum distance between initial centers. Iteration stops when the largest change of any cluster center is less than or equal to the minimum change value. CONVERGE is ignored when METHOD=CLASSIFY.

Related Topics

QUICK CLUSTER
Overview (QUICK CLUSTER command)
Example (QUICK CLUSTER command)
Variable List (QUICK CLUSTER command)
METHOD Subcommand (QUICK CLUSTER command)
INITIAL Subcommand (QUICK CLUSTER command)
FILE Subcommand (QUICK CLUSTER command)
PRINT Subcommand (QUICK CLUSTER command)
OUTFILE Subcommand (QUICK CLUSTER command)
SAVE Subcommand (QUICK CLUSTER command)
MISSING Subcommand (QUICK CLUSTER command)


METHOD Subcommand (QUICK CLUSTER command)

QUICK CLUSTER (command),QUICK CLUSTER (command),QUICK CLUSTER (command)
METHOD subcommand,METHOD subcommand,METHOD subcommand
METHOD (subcommand),METHOD (subcommand),METHOD (subcommand)
QUICK CLUSTER command,QUICK CLUSTER command,QUICK CLUSTER command
QUICK CLUSTER (command),QUICK CLUSTER (command),QUICK CLUSTER (command)
clustering method,clustering method,clustering method

By default, QUICK CLUSTER recalculates cluster centers after assigning all the cases and repeats the process until one of the criteria is met. You can use the METHOD subcommand to recalculate cluster centers after each case is assigned or to suppress recalculation until after classification is complete. When METHOD=KMEANS is specified, QUICK CLUSTER displays the iteration history table.

KMEANS (keyword),KMEANS (keyword),KMEANS (keyword)
QUICK CLUSTER command,QUICK CLUSTER command,QUICK CLUSTER command
CLASSIFY (keyword),CLASSIFY (keyword),CLASSIFY (keyword)
QUICK CLUSTER command,QUICK CLUSTER command,QUICK CLUSTER command
KMEANS(NOUPDATE) | Recalculate cluster centers after all cases are assigned for each iteration. This is the default.
KMEANS(UPDATE) | Recalculate a cluster center each time a case is assigned. QUICK CLUSTER calculates the mean of cases currently in the cluster and uses this new cluster center in subsequent case assignment.
CLASSIFY | Do not recalculate cluster centers. QUICK CLUSTER uses the initial cluster centers for classification and computes the final cluster centers as the means of all the cases assigned to the same cluster. When CLASSIFY is specified, the CONVERGE or MXITER specifications on CRITERIA are ignored.

Related Topics

QUICK CLUSTER
Overview (QUICK CLUSTER command)
Example (QUICK CLUSTER command)
Variable List (QUICK CLUSTER command)
CRITERIA Subcommand (QUICK CLUSTER command)
INITIAL Subcommand (QUICK CLUSTER command)
FILE Subcommand (QUICK CLUSTER command)
PRINT Subcommand (QUICK CLUSTER command)
OUTFILE Subcommand (QUICK CLUSTER command)
SAVE Subcommand (QUICK CLUSTER command)
MISSING Subcommand (QUICK CLUSTER command)


INITIAL Subcommand (QUICK CLUSTER command)

initial cluster centers,initial cluster centers,initial cluster centers
QUICK CLUSTER command,QUICK CLUSTER command,QUICK CLUSTER command

INITIAL specifies the initial cluster centers. Initial cluster centers can also be read from a data file (see FILE Subcommand (QUICK CLUSTER command)).

• One value for each clustering variable must be included for each cluster requested. Values are specified in parentheses cluster by cluster.

Example

QUICK CLUSTER  A B C D
  /CRITERIA = CLUSTER(3)
  /INITIAL = (13 24  1  8
               7 12  5  9
              10 18 17 16).

• This example specifies four clustering variables and requests three clusters. Thus, twelve values are supplied on INITIAL.

• The initial center of the first cluster has a value of 13 for variable A, 24 for variable B, 1 for C, and 8 for D.

Related Topics

QUICK CLUSTER
Overview (QUICK CLUSTER command)
Example (QUICK CLUSTER command)
Variable List (QUICK CLUSTER command)
CRITERIA Subcommand (QUICK CLUSTER command)
METHOD Subcommand (QUICK CLUSTER command)
FILE Subcommand (QUICK CLUSTER command)
PRINT Subcommand (QUICK CLUSTER command)
OUTFILE Subcommand (QUICK CLUSTER command)
SAVE Subcommand (QUICK CLUSTER command)
MISSING Subcommand (QUICK CLUSTER command)


FILE Subcommand (QUICK CLUSTER command)

Use FILE to obtain initial cluster centers from an external PASW Statistics data file or currently open dataset. (DATASET DECLARE command).

• The only specification is the quoted file specification or dataset name.

Example

QUICK CLUSTER  A B C D
  /FILE='/data/init.sav'
  /CRITERIA = CLUSTER(3).

• In this example, the initial cluster centers are read from file init.sav. The file must contain cluster centers for the same four clustering variables specified (A, B, C, and D).

Related Topics

QUICK CLUSTER
Overview (QUICK CLUSTER command)
Example (QUICK CLUSTER command)
Variable List (QUICK CLUSTER command)
CRITERIA Subcommand (QUICK CLUSTER command)
METHOD Subcommand (QUICK CLUSTER command)
INITIAL Subcommand (QUICK CLUSTER command)
PRINT Subcommand (QUICK CLUSTER command)
OUTFILE Subcommand (QUICK CLUSTER command)
SAVE Subcommand (QUICK CLUSTER command)
MISSING Subcommand (QUICK CLUSTER command)


PRINT Subcommand (QUICK CLUSTER command)

QUICK CLUSTER (command),QUICK CLUSTER (command),QUICK CLUSTER (command)
PRINT subcommand,PRINT subcommand,PRINT subcommand
PRINT (subcommand),PRINT (subcommand),PRINT (subcommand)
QUICK CLUSTER command,QUICK CLUSTER command,QUICK CLUSTER command
QUICK CLUSTER (command),QUICK CLUSTER (command),QUICK CLUSTER (command)
statistics,statistics,statistics

QUICK CLUSTER always displays in a Final Cluster Centers table listing the centers used to classify cases and the mean values of the cases in each cluster and a Number of Cases in Each Cluster table listing the number of weighted (if weighting is on) and unweighted cases in each cluster. Use PRINT to request other types of output.

• If PRINT is not specified or is specified without keywords, the default is INITIAL.

INITIAL (keyword),INITIAL (keyword),INITIAL (keyword)
QUICK CLUSTER command,QUICK CLUSTER command,QUICK CLUSTER command
QUICK CLUSTER (command),QUICK CLUSTER (command),QUICK CLUSTER (command)
cluster membership,cluster membership,cluster membership
CLUSTER (keyword),CLUSTER (keyword),CLUSTER (keyword)
QUICK CLUSTER command,QUICK CLUSTER command,QUICK CLUSTER command
QUICK CLUSTER (command),QUICK CLUSTER (command),QUICK CLUSTER (command)
labeling cases,labeling cases,labeling cases
ID (keyword),ID (keyword),ID (keyword)
QUICK CLUSTER command,QUICK CLUSTER command,QUICK CLUSTER command
QUICK CLUSTER (command),QUICK CLUSTER (command),QUICK CLUSTER (command)
cluster distances,cluster distances,cluster distances
DISTANCE (keyword),DISTANCE (keyword),DISTANCE (keyword)
QUICK CLUSTER command,QUICK CLUSTER command,QUICK CLUSTER command
analysis of variance,analysis of variance,analysis of variance
QUICK CLUSTER command,QUICK CLUSTER command,QUICK CLUSTER command
ANOVA (keyword),ANOVA (keyword),ANOVA (keyword)
QUICK CLUSTER command,QUICK CLUSTER command,QUICK CLUSTER command
NONE (keyword),NONE (keyword),NONE (keyword)
QUICK CLUSTER command,QUICK CLUSTER command,QUICK CLUSTER command
INITIAL | Initial cluster centers. When SPLIT FILES is in effect, the initial cluster center for each split file is displayed. This is the default.
CLUSTER | Cluster membership. Each case displays an identifying number or value, the number of the cluster to which it was assigned, and its distance from the center of that cluster. This output is extensive when the number of cases is large.
ID(varname) | Case identification. The value of the specified variable is used in addition to the case numbers to identify cases in output. Case numbers may not be sequential if cases have been selected.
DISTANCE | Pairwise distances between all final cluster centers. This output can consume a great deal of processing time when the number of clusters requested is large.
ANOVA | Descriptive univariate F tests for the clustering variables. Since cases are systematically assigned to clusters to maximize differences on the clustering variables, these tests are descriptive only and should not be used to test the null hypothesis that there are no differences between clusters. Statistics after clustering are also available through procedure DISCRIMINANT or GLM (GLM is available in the Advanced Statistics option).
NONE | No additional output. Only the default output is displayed. NONE overrides any other specifications on PRINT.

Example

QUICK CLUSTER A B C D E
  /CRITERIA=CLUSTERS(6)
  /PRINT=CLUSTER ID(CASEID) DISTANCE.

• Six clusters are formed on the basis of the five variables A, B, C, D, and E.

• For each case in the file, cluster membership and distance from cluster center are displayed. Cases are identified by the values of the variable CASEID.

• Distances between all cluster centers are printed.

Related Topics

QUICK CLUSTER
Overview (QUICK CLUSTER command)
Example (QUICK CLUSTER command)
Variable List (QUICK CLUSTER command)
CRITERIA Subcommand (QUICK CLUSTER command)
METHOD Subcommand (QUICK CLUSTER command)
INITIAL Subcommand (QUICK CLUSTER command)
FILE Subcommand (QUICK CLUSTER command)
OUTFILE Subcommand (QUICK CLUSTER command)
SAVE Subcommand (QUICK CLUSTER command)
MISSING Subcommand (QUICK CLUSTER command)


OUTFILE Subcommand (QUICK CLUSTER command)

OUTFILE saves the final cluster centers in an external PASW Statistics data file or a previously declared dataset in the current session. You can later use these final cluster centers as initial cluster centers for a different sample of cases that use the same variables. You can also cluster the final cluster centers themselves to obtain clusters of clusters.

• The only specification is a filename or previously declared dataset name for the file. Filenames should be enclosed in quotes and are stored in the working directory unless a path is included as part of the file specification. Datasets are available during the current session but are not available in subsequent sessions unless you explicitly save them as data files.

• The program displays the name of the saved file in the procedure information notes.

Example

QUICK CLUSTER A B C D
  /CRITERIA = CLUSTER(3)
  /OUTFILE = '/data/QC1.sav'.

• QUICK CLUSTER writes the final cluster centers to the file QC1.sav.

Related Topics

QUICK CLUSTER
Overview (QUICK CLUSTER command)
Example (QUICK CLUSTER command)
Variable List (QUICK CLUSTER command)
CRITERIA Subcommand (QUICK CLUSTER command)
METHOD Subcommand (QUICK CLUSTER command)
INITIAL Subcommand (QUICK CLUSTER command)
FILE Subcommand (QUICK CLUSTER command)
PRINT Subcommand (QUICK CLUSTER command)
SAVE Subcommand (QUICK CLUSTER command)
MISSING Subcommand (QUICK CLUSTER command)


SAVE Subcommand (QUICK CLUSTER command)

Use SAVE to save results of cluster analysis as new variables in the active dataset.

• You can specify a variable name in parentheses following either keyword. If no variable name is specified, QUICK CLUSTER forms unique variable names by appending an underscore and a sequential number to the rootname QCL. The number increments with each new variable saved.

• The program displays the new variables and a short description of each in the procedure information notes.

QUICK CLUSTER (command),QUICK CLUSTER (command),QUICK CLUSTER (command)
cluster membership,cluster membership,cluster membership
QUICK CLUSTER (command),QUICK CLUSTER (command),QUICK CLUSTER (command)
cluster distances,cluster distances,cluster distances
CLUSTER[(varname)] | The cluster number of each case. The value of the new variable is set to an integer from 1 to the number of clusters.
DISTANCE[(varname)] | The distance of each case from its classification cluster center.

Example

QUICK CLUSTER A B C D
  /CRITERIA=CLUSTERS(6)
  /SAVE=CLUSTER DISTANCE.

• Six clusters of cases are formed on the basis of the variables A, B, C, and D.

• A new variable QCL_1 is created and set to an integer between 1 and 6 to indicate cluster membership for each case.

• Another new variable QCL_2 is created and set to the Euclidean distance between a case and the center of the cluster to which it is assigned.

Related Topics

QUICK CLUSTER
Overview (QUICK CLUSTER command)
Example (QUICK CLUSTER command)
Variable List (QUICK CLUSTER command)
CRITERIA Subcommand (QUICK CLUSTER command)
METHOD Subcommand (QUICK CLUSTER command)
INITIAL Subcommand (QUICK CLUSTER command)
FILE Subcommand (QUICK CLUSTER command)
PRINT Subcommand (QUICK CLUSTER command)
OUTFILE Subcommand (QUICK CLUSTER command)
MISSING Subcommand (QUICK CLUSTER command)


MISSING Subcommand (QUICK CLUSTER command)

QUICK CLUSTER (command),QUICK CLUSTER (command),QUICK CLUSTER (command)
missing values,missing values,missing values

MISSING controls the treatment of cases with missing values.

• LISTWISE, PAIRWISE, and DEFAULT are alternatives. However, each can be used with INCLUDE.

LISTWISE | Delete cases with missing values listwise. A case with a missing value for any of the clustering variables is deleted from the analysis and will not be assigned to a cluster. This is the default.
PAIRWISE | Assign each case to the nearest cluster on the basis of the clustering variables for which the case has nonmissing values. Only cases with missing values for all clustering variables are deleted.
INCLUDE | Treat user-missing values as valid.
DEFAULT | Same as LISTWISE.

Related Topics

QUICK CLUSTER
Overview (QUICK CLUSTER command)
Example (QUICK CLUSTER command)
Variable List (QUICK CLUSTER command)
CRITERIA Subcommand (QUICK CLUSTER command)
METHOD Subcommand (QUICK CLUSTER command)
INITIAL Subcommand (QUICK CLUSTER command)
FILE Subcommand (QUICK CLUSTER command)
PRINT Subcommand (QUICK CLUSTER command)
OUTFILE Subcommand (QUICK CLUSTER command)
SAVE Subcommand (QUICK CLUSTER command)


RANK

ranking cases,ranking cases,ranking cases
RANK (command),RANK (command),RANK (command)
RANK (command),RANK (command),RANK (command)
syntax chart,syntax chart,syntax chart
RANK VARIABLES= varlist [({A**})] [BY varlist]
                          {D  }

  [/TIES={MEAN**  }]
         {LOW     }
         {HIGH    }
         {CONDENSE}

  [/FRACTION={BLOM**}]
             {TUKEY }
             {VW    }
             {RANKIT}

  [/PRINT={YES**}]
          {NO   }

  [/MISSING={EXCLUDE**}]
            {INCLUDE  }

The following function subcommands can each be specified once:

  [/RANK**] [/NTILES(k)] [/NORMAL] [/PERCENT]

  [/RFRACTION] [/PROPORTION] [/N] [/SAVAGE]

The following keyword can be used with any function subcommand:

  [INTO varname]

**Default if the subcommand is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See RANK Algorithms for computational details for this procedure.

Syntax for the RANK command can be generated from the Rank Cases dialog box.

Example

RANK VARIABLES=SALARY JOBTIME.

Related Topics

Overview (RANK command)
Example (RANK command)
VARIABLES Subcommand (RANK command)
Function Subcommands (RANK command)
TIES Subcommand (RANK command)
FRACTION Subcommand (RANK command)
PRINT Subcommand (RANK command)
MISSING Subcommand (RANK command)
References (RANK command)


Overview (RANK command)

RANK produces new variables containing ranks, normal scores, and Savage and related scores for numeric variables.

Options Collapse Hide details

Options

Methods. You can rank variables in ascending or descending order by specifying A or D on the VARIABLES subcommand. You can compute different rank functions and also name the new variables using the function subcommands. You can specify the method for handling ties on the TIES subcommand, and you can specify how the proportion estimate is computed for the NORMAL and PROPORTIONAL functions on the FRACTION subcommand.

Format. You can suppress the display of the summary table that lists the ranked variables and their associated new variables in the active dataset using the PRINT subcommand.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is VARIABLES and at least one variable from the active dataset. By default, the ranking function is RANK. Direction is ascending, and ties are handled by assigning the mean rank to tied values. A summary table that lists the ranked variables and the new variables into which computed ranks have been stored is displayed.

Subcommand Order Collapse Hide details

Subcommand Order

• VARIABLES must be specified first.

• The remaining subcommands can be specified in any order.

Operations Collapse Hide details

Operations

• RANK does not change the way the active dataset is sorted.

• If new variable names are not specified with the INTO keyword on the function subcommand, RANK creates default names. (Note: The automatically generated new variable names are limited to a maximum length of 8 bytes.)

• RANK automatically assigns variable labels to the new variables. The labels identify the source variables. For example, the label for a new variable with the default name RSALARY is RANK of SALARY.

Related Topics

RANK
Example (RANK command)
VARIABLES Subcommand (RANK command)
Function Subcommands (RANK command)
TIES Subcommand (RANK command)
FRACTION Subcommand (RANK command)
PRINT Subcommand (RANK command)
MISSING Subcommand (RANK command)
References (RANK command)


Example (RANK command)

RANK VARIABLES=SALARY JOBTIME.

• RANK ranks SALARY and JOBTIME and creates two new variables in the active dataset, RSALARY and RJOBTIME, which contain the ranks.

Related Topics

RANK
Overview (RANK command)
VARIABLES Subcommand (RANK command)
Function Subcommands (RANK command)
TIES Subcommand (RANK command)
FRACTION Subcommand (RANK command)
PRINT Subcommand (RANK command)
MISSING Subcommand (RANK command)
References (RANK command)


VARIABLES Subcommand (RANK command)

RANK (command),RANK (command),RANK (command)
ranking order,ranking order,ranking order
VARIABLES (subcommand),VARIABLES (subcommand),VARIABLES (subcommand)
RANK command,RANK command,RANK command
RANK (command),RANK (command),RANK (command)
VARIABLES subcommand,VARIABLES subcommand,VARIABLES subcommand

VARIABLES specifies the variables to be ranked.

• VARIABLES is required and must be the first specification on RANK. The minimum specification is a single numeric variable. To rank more than one variable, specify a variable list.

ranking cases,ranking cases,ranking cases
order,order,order

• After the variable list, you can specify the direction for ranking in parentheses. Specify A for ascending (smallest value gets smallest rank) or D for descending (largest value gets smallest rank). A is the default.

• To rank some variables in ascending order and others in descending order, use both A and D in the same variable list. A or D applies to all preceding variables in the list up to the previous A or D specification.

ranking cases,ranking cases,ranking cases
within subgroups,within subgroups,within subgroups
BY (keyword),BY (keyword),BY (keyword)
RANK command,RANK command,RANK command

• To organize ranks into subgroups, specify keyword BY followed by the variable whose values determine the subgroups. The active dataset does not have to be sorted by this variable.

• String variables cannot be specified. Use AUTORECODE to recode string variables for ranking.

Examples

RANK VARIABLES=MURDERS ROBBERY (D).

• RANK ranks MURDERS and ROBBERY and creates two new variables in the active dataset: RMURDERS and RROBBERY.

• D specifies descending order of rank. D applies to both MURDERS and ROBBERY.

RANK VARIABLES=MURDERS (D) ROBBERY (A) BY ETHNIC.

• Ranks are computed within each group defined by ETHNIC. MURDERS is ranked in descending order and ROBBERY in ascending order within each group of ETHNIC. The active dataset does not have to be sorted by ETHNIC.

Related Topics

RANK
Overview (RANK command)
Example (RANK command)
Function Subcommands (RANK command)
TIES Subcommand (RANK command)
FRACTION Subcommand (RANK command)
PRINT Subcommand (RANK command)
MISSING Subcommand (RANK command)
References (RANK command)


Function Subcommands (RANK command)

ranking cases,ranking cases,ranking cases
method,method,method

The optional function subcommands specify different rank functions. RANK is the default function.

• Any combination of function subcommands can be specified for a RANK procedure, but each function can be specified only once.

• Each function subcommand must be preceded by a slash.

• The functions assign default names to the new variables unless keyword INTO is specified.

RANK (subcommand),RANK (subcommand),RANK (subcommand)
RANK command,RANK command,RANK command
RANK (command),RANK (command),RANK (command)
RANK subcommand,RANK subcommand,RANK subcommand
RFRACTION (subcommand),RFRACTION (subcommand),RFRACTION (subcommand)
RANK command,RANK command,RANK command
RANK (command),RANK (command),RANK (command)
RFRACTION subcommand,RFRACTION subcommand,RFRACTION subcommand
RANK (command),RANK (command),RANK (command)
NORMAL subcommand,NORMAL subcommand,NORMAL subcommand
NORMAL (subcommand),NORMAL (subcommand),NORMAL (subcommand)
RANK command,RANK command,RANK command
PERCENT (subcommand),PERCENT (subcommand),PERCENT (subcommand)
RANK command,RANK command,RANK command
RANK (command),RANK (command),RANK (command)
PERCENT subcommand,PERCENT subcommand,PERCENT subcommand
PROPORTION (subcommand),PROPORTION (subcommand),PROPORTION (subcommand)
RANK command,RANK command,RANK command
RANK (command),RANK (command),RANK (command)
PROPORTION subcommand,PROPORTION subcommand,PROPORTION subcommand
N (subcommand),N (subcommand),N (subcommand)
RANK command,RANK command,RANK command
RANK (command),RANK (command),RANK (command)
N subcommand,N subcommand,N subcommand
SAVAGE (subcommand),SAVAGE (subcommand),SAVAGE (subcommand)
RANK command,RANK command,RANK command
RANK (command),RANK (command),RANK (command)
SAVAGE subcommand,SAVAGE subcommand,SAVAGE subcommand
NTILES(k) (subcommand),NTILES(k) (subcommand),NTILES(k) (subcommand)
RANK command,RANK command,RANK command
RANK (command),RANK (command),RANK (command)
NTILES(k) subcommand,NTILES(k) subcommand,NTILES(k) subcommand
RANK | Simple ranks. The values for the new variable are the ranks. Rank can either be ascending or descending, as indicated on the VARIABLES subcommand. Rank values can be affected by the specification on the TIES subcommand.
RFRACTION | Fractional ranks. The values for the new variable equal the ranks divided by the sum of the weights of the nonmissing cases. If HIGH is specified on TIES, fractional rank values are an empirical cumulative distribution.
NORMAL | Normal scores(Lehmann, 1975). The new variable contains the inverse of the standard normal cumulative distribution of the proportion estimate defined by the FRACTION subcommand. The default for FRACTION is BLOM.
PERCENT | Fractional ranks as a percentage. The new variable contains fractional ranks multiplied by 100.
PROPORTION | Proportion estimates. The estimation method is specified by the FRACTION subcommand. The default for FRACTION is BLOM.
N | Sum of case weights. The new variable is a constant.
SAVAGE | Savage scores(Lehmann, 1975). The new variable contains Savage (exponential) scores.
NTILES(k) | Percentile groups. The new variable contains values from 1 to k, where k is the number of groups to be generated. Each case is assigned a group value, which is the integer part of 1+rk/(w+1), where r is the rank of the case, k is the number of groups specified on NTILES, and w is the sum of the case weights. Group values can be affected by the specification on TIES. There is no default for k.

Related Topics

RANK
Overview (RANK command)
Example (RANK command)
VARIABLES Subcommand (RANK command)
TIES Subcommand (RANK command)
FRACTION Subcommand (RANK command)
PRINT Subcommand (RANK command)
MISSING Subcommand (RANK command)
References (RANK command)
INTO Keyword (RANK command)


INTO Keyword (RANK command)

INTO (keyword),INTO (keyword),INTO (keyword)
RANK command,RANK command,RANK command
RANK (command),RANK (command),RANK (command)
saving rank variables,saving rank variables,saving rank variables
ranking cases,ranking cases,ranking cases
new variable names,new variable names,new variable names

INTO specifies variable names for the new variable(s) added to the active dataset. INTO can be used with any of the function subcommands.

• INTO must follow a function subcommand. You must specify the INTO subcommand to assign names to the new variables created by the function.

• You can specify multiple variable names on INTO. The names are assigned to the new variables in the order they are created (the order the variables are specified on the VARIABLES subcommand).

• If you specify fewer names than the new variables, default names are used for the remaining new variables. If you specify more names, the program issues a message and the command is not executed.

If INTO is not specified on a function, RANK creates default names for the new variables according to the following rules:

• The first letter of the ranking function is added to the first seven characters of the original variable name.

• New variable names cannot duplicate variable names in the active dataset or names specified after INTO or generated by default.

• If a new default name is a duplicate, the scheme XXXnnn is used, where XXX represents the first three characters of the function and nnn is a three-digit number starting with 001 and increased by 1 for each variable. (If the ranking function is N, XXX is simply N.) If this naming scheme generates duplicate names, the duplicates are named RNKXXnn, where XX is the first two characters of the function and nn is a two-digit number starting with 01 and increased by 1 for each variable.

• If it is not possible to generate unique names, an error results.

Example

RANK VARIABLES=SALARY
 /NORMAL INTO SALNORM
 /SAVAGE INTO SALSAV
 /NTILES(4) INTO SALQUART.

• RANK generates three new variables from variable SALARY.

• NORMAL produces the new variable SALNORM. SALNORM contains normal scores for SALARY computed with the default formula BLOM.

• SAVAGE produces the new variable SALSAV. SALSAV contains Savage scores for SALARY.

• NTILES(4) produces the new variable SALQUART. SALQUART contains the value 1, 2, 3, or 4 to represent one of the four percentile groups of SALARY.

Related Topics

Function Subcommands (RANK command)


TIES Subcommand (RANK command)

RANK (command),RANK (command),RANK (command)
handling of ties,handling of ties,handling of ties
ranking cases,ranking cases,ranking cases
tied values,tied values,tied values

TIES determines the way tied values are handled. The default method is MEAN.

MEAN (keyword),MEAN (keyword),MEAN (keyword)
RANK command,RANK command,RANK command
LOW (keyword),LOW (keyword),LOW (keyword)
RANK command,RANK command,RANK command
HIGH (keyword),HIGH (keyword),HIGH (keyword)
RANK command,RANK command,RANK command
CONDENSE (keyword),CONDENSE (keyword),CONDENSE (keyword)
RANK command,RANK command,RANK command
MEAN | Mean rank of tied values is used for ties. This is the default.
LOW | Lowest rank of tied values is used for ties.
HIGH | Highest rank of tied values is used for ties.
CONDENSE | Consecutive ranks with ties sharing the same value. Each distinct value of the ranked variable is assigned a consecutive rank. Ties share the same rank.

Example

RANK VARIABLES=BURGLARY /RANK INTO RMEAN /TIES=MEAN.
RANK VARIABLES=BURGLARY /RANK INTO RCONDS /TIES=CONDENSE.
RANK VARIABLES=BURGLARY /RANK INTO RHIGH /TIES=HIGH.
RANK VARIABLES=BURGLARY /RANK INTO RLOW /TIES=LOW.

• The values of BURGLARY and the four new ranking variables are shown below:

BURGLARY   RMEAN   RCONDS   RHIGH   RLOW
   0          3       1       5       1
   0          3       1       5       1
   0          3       1       5       1
   0          3       1       5       1
   0          3       1       5       1
   1          6.5     2       7       6
   1          6.5     2       7       6
   3          8       3       8       8

Related Topics

RANK
Overview (RANK command)
Example (RANK command)
VARIABLES Subcommand (RANK command)
Function Subcommands (RANK command)
FRACTION Subcommand (RANK command)
PRINT Subcommand (RANK command)
MISSING Subcommand (RANK command)
References (RANK command)


FRACTION Subcommand (RANK command)

ranking cases,ranking cases,ranking cases
proportion estimates,proportion estimates,proportion estimates
RANK (command),RANK (command),RANK (command)
FRACTION subcommand,FRACTION subcommand,FRACTION subcommand
FRACTION (subcommand),FRACTION (subcommand),FRACTION (subcommand)
RANK command,RANK command,RANK command

FRACTION specifies the way to compute a proportion estimate P for the NORMAL and PROPORTION rank functions.

• FRACTION can be used only with function subcommands NORMAL or PROPORTION. If it is used with other function subcommands, FRACTION is ignored and a warning message is displayed.

• Only one formula can be specified for each RANK procedure. If more than one is specified, an error results.

In the following formulas, r is the rank and w is the sum of case weights.

Blom's transformation,Blom's transformation,Blom's transformation
BLOM (keyword),BLOM (keyword),BLOM (keyword)
RANK command,RANK command,RANK command
RANKIT (keyword),RANKIT (keyword),RANKIT (keyword)
RANK command,RANK command,RANK command
Tukey's transformation,Tukey's transformation,Tukey's transformation
TUKEY (keyword),TUKEY (keyword),TUKEY (keyword)
RANK command,RANK command,RANK command
Van der Waerden's transformation,Van der Waerden's transformation,Van der Waerden's transformation
VW (keyword),VW (keyword),VW (keyword)
RANK command,RANK command,RANK command
BLOM | Blom’s transformation, defined by the formula (r – 3/8) / (w + 1/4). (Blom, 1958) This is the default.
RANKIT | The formula is (r – 1/2) / w. (Chambers, Cleveland, Kleiner, and Tukey, 1983)
TUKEY | Tukey’s transformation, defined by the formula (r – 1/3) / (w + 1/3). (Tukey, 1962)
VW | Van der Waerden’s transformation, defined by the formula r / (w +1). (Lehmann, 1975)

Example

RANK VARIABLES=MORTGAGE VALUE /FRACTION=BLOM
  /NORMAL INTO MORTNORM VALNORM.

• RANK generates new variables MORTNORM and VALNORM. MORTNORM contains normal scores for MORTGAGE, and VALNORM contains normal scores for VALUE.

Related Topics

RANK
Overview (RANK command)
Example (RANK command)
VARIABLES Subcommand (RANK command)
Function Subcommands (RANK command)
TIES Subcommand (RANK command)
PRINT Subcommand (RANK command)
MISSING Subcommand (RANK command)
References (RANK command)


PRINT Subcommand (RANK command)

PRINT determines whether the summary tables are displayed. The summary table lists the ranked variables and their associated new variables in the active dataset.

YES | Display the summary tables. This is the default.
NO | Suppress the summary tables.

Related Topics

RANK
Overview (RANK command)
Example (RANK command)
VARIABLES Subcommand (RANK command)
Function Subcommands (RANK command)
TIES Subcommand (RANK command)
FRACTION Subcommand (RANK command)
MISSING Subcommand (RANK command)
References (RANK command)


MISSING Subcommand (RANK command)

ranking cases,ranking cases,ranking cases
missing values,missing values,missing values
RANK (command),RANK (command),RANK (command)
MISSING subcommand,MISSING subcommand,MISSING subcommand
MISSING (subcommand),MISSING (subcommand),MISSING (subcommand)
RANK command,RANK command,RANK command
RANK (command),RANK (command),RANK (command)
missing values,missing values,missing values

MISSING controls the treatment of user-missing values.

INCLUDE (keyword),INCLUDE (keyword),INCLUDE (keyword)
RANK command,RANK command,RANK command
EXCLUDE (keyword),EXCLUDE (keyword),EXCLUDE (keyword)
RANK command,RANK command,RANK command
INCLUDE | Include user-missing values. User-missing values are treated as valid values.
EXCLUDE | Exclude all missing values. User-missing values are treated as missing. This is the default.

Example

MISSING VALUE SALARY (0).
RANK VARIABLES=SALARY /RANK INTO SALRANK /MISSING=INCLUDE.

• RANK generates the new variable SALRANK.

• INCLUDE causes the user-missing value 0 to be included in the ranking process.

Related Topics

RANK
Overview (RANK command)
Example (RANK command)
VARIABLES Subcommand (RANK command)
Function Subcommands (RANK command)
TIES Subcommand (RANK command)
FRACTION Subcommand (RANK command)
PRINT Subcommand (RANK command)
References (RANK command)


References (RANK command)

Blom, G. 1958. Statistical estimates and transformed beta variables. New York: John Wiley and Sons.

Chambers, J. M., W. S. Cleveland, B. Kleiner, and P. A. Tukey. 1983. Graphical methods for data analysis. Boston: Duxbury Press.

Fisher, R. A. 1973. Statistical methods for research workers, 14th ed. New York: Hafner Publishing Company.

Frigge, M., D. C. Hoaglin, and B. Iglewicz. 1987. Some implementations for the boxplot. In: Computer Science and Statistics Proceedings of the 19th Symposium on the Interface, R. M. Heiberger, and M. Martin, eds. Alexandria, Virginia: American Statistical Association.

Lehmann, E. L. 1975. Nonparametrics: Statistical methods based on ranks. San Francisco: Holden-Day.

Tukey, J. W. 1962. The future of data analysis. Annals of Mathematical Statistics, 33:22, 1-67.

Related Topics

RANK
Overview (RANK command)
Example (RANK command)
VARIABLES Subcommand (RANK command)
Function Subcommands (RANK command)
TIES Subcommand (RANK command)
FRACTION Subcommand (RANK command)
PRINT Subcommand (RANK command)
MISSING Subcommand (RANK command)


RATIO STATISTICS

Ratio Statistics,Ratio Statistics,Ratio Statistics
command syntax,command syntax,command syntax
RATIO STATISTICS (command),RATIO STATISTICS (command),RATIO STATISTICS (command)
RATIO STATISTICS (command),RATIO STATISTICS (command),RATIO STATISTICS (command)
syntax chart,syntax chart,syntax chart

RATIO STATISTICS is available in the Statistics Base option.

RATIO STATISTICS numerator varname WITH denominator varname
  [BY group varname[({ASCENDING**})]]
                     {DESCENDING }
                     {NOSORT     }

 [/MISSING = {EXCLUDE**}]
             {INCLUDE  }

  [/OUTFILE('file'|'dataset') = [AAD] [BCOC((low,high) [(low,high)] ...)] [CIN[({95   })]]
                                                                                {value}
                         [COD] [MAX] [MDCOV] [MEAN] [MEDIAN] [MIN] [MNCOV] [PRD]
                         [RANGE] [STDDEV] [WCOC(value list)] [WGTMEAN]]

  [/PRINT = [AAD] [BCOC(low,high)...] [CIN[({95   })]]
                                            {value}
            [COD] [MAX] [MDCOV] [MEAN] [MEDIAN] [MIN] [MNCOV] [PRD]
            [RANGE] [STDDEV] [WCOC(value list)] [WGTMEAN]]

** Default if the subcommand is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See RATIO STATISTICS Algorithms for computational details for this procedure.

Syntax for the RATIO STATISTICS command can be generated from the Ratio Statistics dialog box.

Example

RATIO STATISTICS appraise WITH price
  /PRINT = AAD BCOC((1,2) (3,4)) MEAN.

Related Topics

Overview (RATIO STATISTICS command)
Case Frequency (RATIO STATISTICS command)
Variable List (RATIO STATISTICS command)
MISSING Subcommand (RATIO STATISTICS command)
OUTFILE Subcommand (RATIO STATISTICS command)
PRINT Subcommand (RATIO STATISTICS command)


Overview (RATIO STATISTICS command)

RATIO STATISTICS (command),RATIO STATISTICS (command),RATIO STATISTICS (command)
overview,overview,overview

RATIO STATISTICS provides a variety of descriptive statistics for the ratio between two variables.

Basic Specification Collapse Hide details

Basic Specification

The minimum specification is a numerator variable and a denominator variable, and either an OUTFILE subcommand or a PRINT subcommand.

Subcommand Order Collapse Hide details

Subcommand Order

• The variable list must be specified first.

• Subcommands can be specified in any order.

Syntax Rules Collapse Hide details

Syntax Rules

• Empty subcommands are silently ignored.

• All subcommands should be specified only once. If a subcommand is repeated, only the last specification will be used.

• The following words are reserved as keywords in this procedure: BY and WITH.

Related Topics

RATIO STATISTICS
Case Frequency (RATIO STATISTICS command)
Variable List (RATIO STATISTICS command)
MISSING Subcommand (RATIO STATISTICS command)
OUTFILE Subcommand (RATIO STATISTICS command)
PRINT Subcommand (RATIO STATISTICS command)


Examples (RATIO STATISTICS command)

RATIO STATISTICS lastval  WITH saleval  BY town  (ASCENDING)
  /MISSING = EXCLUDE
  /PRINT =  BCOC(0.8,1.2)  COD MEDIAN WCOC( 20 ) .

• The procedure computes ratios by dividing lastval by saleval. Separate ratio statistics are computed for each category of town, with values displayed in ascending order.

• By default, user-missing values are excluded from the analysis.

• The PRINT subcommand requests the coefficient of concentration for the range 0.8-1.2, the coefficient of dispersion, the median, and the coefficient of concentration for ratios falling within 20 percent of the median.

For discussion of output from this syntax and to place the example in context, see Using Ratio Statistics to Aid Property Value Assessment .


Case Frequency (RATIO STATISTICS command)

• If a WEIGHT variable is specified, its values are used as frequency weights by this procedure.

• Cases with missing or nonpositive weights are not used for computing the ratio statistics.

• The weight values are rounded to the nearest whole numbers before use. For example, 0.5 is rounded to 1, and 2.4 is rounded to 2.

Related Topics

RATIO STATISTICS
Overview (RATIO STATISTICS command)
Variable List (RATIO STATISTICS command)
MISSING Subcommand (RATIO STATISTICS command)
OUTFILE Subcommand (RATIO STATISTICS command)
PRINT Subcommand (RATIO STATISTICS command)


Variable List (RATIO STATISTICS command)

The variable list specifies the numerator variable, denominator variable, and optional group variable.

• The numerator variable must be the first specification after the procedure name.

• The denominator variable must be preceded by the keyword WITH.

• The group variable, if specified, must be preceded by the keyword BY.

• Both the numerator and the denominator variables must be numeric.

• The group variable can be of any type (numeric or string).

ASCENDING (keyword),ASCENDING (keyword),ASCENDING (keyword)
RATIO STATISTICS command,RATIO STATISTICS command,RATIO STATISTICS command
DESCENDING (keyword),DESCENDING (keyword),DESCENDING (keyword)
RATIO STATISTICS command,RATIO STATISTICS command,RATIO STATISTICS command
NOSORT (keyword),NOSORT (keyword),NOSORT (keyword)
RATIO STATISTICS command,RATIO STATISTICS command,RATIO STATISTICS command

• By default or when the keyword ASCENDING is specified, values of the group variable are displayed in ascending order. Specify the keyword DESCENDING to display in descending order. Specify NOSORT to preserve the appearance order in the data.

• Only cases with no (system- or user-) missing values in both the numerator and the denominator variables will be used. Please note that this rule does not apply to the group variable.

Example

RATIO STATISTICS appraise WITH price
  /PRINT = AAD BCOC((1,2) (3,4)) MEAN.

• This is a typical analysis where appraise is the appraised value and price is the transaction price. The ratio is computed by dividing appraise by price.

Example

RATIO STATISTICS appraise WITH price BY county
  /PRINT = CIN(90) MEDIAN.

• The ratio is still computed by dividing appraise by price. However, separate ratio statistics are requested for each category of county.

Related Topics

RATIO STATISTICS
Overview (RATIO STATISTICS command)
Case Frequency (RATIO STATISTICS command)
MISSING Subcommand (RATIO STATISTICS command)
OUTFILE Subcommand (RATIO STATISTICS command)
PRINT Subcommand (RATIO STATISTICS command)


MISSING Subcommand (RATIO STATISTICS command)

RATIO STATISTICS (command),RATIO STATISTICS (command),RATIO STATISTICS (command)
missing values,missing values,missing values
MISSING (subcommand),MISSING (subcommand),MISSING (subcommand)
RATIO STATISTICS command,RATIO STATISTICS command,RATIO STATISTICS command
RATIO STATISTICS (command),RATIO STATISTICS (command),RATIO STATISTICS (command)
MISSING subcommand,MISSING subcommand,MISSING subcommand

MISSING specifies the way to handle cases with user-missing values.

• A case is never used if it contains system-missing values in the numerator and/or the denominator variables.

• If this subcommand is not specified, the default is EXCLUDE.

• Keywords EXCLUDE and INCLUDE are mutually exclusive. Only one of them can be specified once.

EXCLUDE (keyword),EXCLUDE (keyword),EXCLUDE (keyword)
RATIO STATISTICS command,RATIO STATISTICS command,RATIO STATISTICS command
INCLUDE (keyword),INCLUDE (keyword),INCLUDE (keyword)
RATIO STATISTICS command,RATIO STATISTICS command,RATIO STATISTICS command
EXCLUDE | Exclude both user-missing and system-missing values. This is the default.
INCLUDE | User-missing values are treated as valid. System-missing values cannot be included in the analysis.

Related Topics

RATIO STATISTICS
Overview (RATIO STATISTICS command)
Case Frequency (RATIO STATISTICS command)
Variable List (RATIO STATISTICS command)
OUTFILE Subcommand (RATIO STATISTICS command)
PRINT Subcommand (RATIO STATISTICS command)


OUTFILE Subcommand (RATIO STATISTICS command)

RATIO STATISTICS (command),RATIO STATISTICS (command),RATIO STATISTICS (command)
saving to external file,saving to external file,saving to external file
OUTFILE (subcommand),OUTFILE (subcommand),OUTFILE (subcommand)
RATIO STATISTICS command,RATIO STATISTICS command,RATIO STATISTICS command
RATIO STATISTICS (command),RATIO STATISTICS (command),RATIO STATISTICS (command)
OUTFILE subcommand,OUTFILE subcommand,OUTFILE subcommand

OUTFILE saves the requested statistics to an external PASW Statistics data file or a previously declared dataset (DATASET DECLARE command).

• The requested statistics are saved in a single record in the external file.

• If a group variable has been specified, the requested statistics at each category of the group variable will also be saved as additional records in the external file.

• The file specification or dataset name should be quoted and enclosed in quotes.

The following statistics are available.

AAD (keyword),AAD (keyword),AAD (keyword)
RATIO STATISTICS command,RATIO STATISTICS command,RATIO STATISTICS command
average absolute deviation (AAD),average absolute deviation (AAD),average absolute deviation (AAD)
RATIO STATISTICS command,RATIO STATISTICS command,RATIO STATISTICS command
BCOC (keyword),BCOC (keyword),BCOC (keyword)
RATIO STATISTICS command,RATIO STATISTICS command,RATIO STATISTICS command
coefficient of concentration,coefficient of concentration,coefficient of concentration
RATIO STATISTICS command,RATIO STATISTICS command,RATIO STATISTICS command
CIN (keyword),CIN (keyword),CIN (keyword)
RATIO STATISTICS command,RATIO STATISTICS command,RATIO STATISTICS command
confidence intervals,confidence intervals,confidence intervals
RATIO STATISTICS command,RATIO STATISTICS command,RATIO STATISTICS command
COD (keyword),COD (keyword),COD (keyword)
RATIO STATISTICS command,RATIO STATISTICS command,RATIO STATISTICS command
coefficient of dispersion (COD),coefficient of dispersion (COD),coefficient of dispersion (COD)
RATIO STATISTICS command,RATIO STATISTICS command,RATIO STATISTICS command
MAX (keyword),MAX (keyword),MAX (keyword)
RATIO STATISTICS command,RATIO STATISTICS command,RATIO STATISTICS command
maximum,maximum,maximum
RATIO STATISTICS command,RATIO STATISTICS command,RATIO STATISTICS command
MDCOV (keyword),MDCOV (keyword),MDCOV (keyword)
RATIO STATISTICS command,RATIO STATISTICS command,RATIO STATISTICS command
median-centered coefficient of variation,median-centered coefficient of variation,median-centered coefficient of variation
RATIO STATISTICS command,RATIO STATISTICS command,RATIO STATISTICS command
coefficient of variation (COV),coefficient of variation (COV),coefficient of variation (COV)
RATIO STATISTICS command,RATIO STATISTICS command,RATIO STATISTICS command
MEAN (keyword),MEAN (keyword),MEAN (keyword)
RATIO STATISTICS command,RATIO STATISTICS command,RATIO STATISTICS command
mean,mean,mean
RATIO STATISTICS command,RATIO STATISTICS command,RATIO STATISTICS command
MEDIAN (keyword),MEDIAN (keyword),MEDIAN (keyword)
RATIO STATISTICS command,RATIO STATISTICS command,RATIO STATISTICS command
median,median,median
RATIO STATISTICS command,RATIO STATISTICS command,RATIO STATISTICS command
MIN (keyword),MIN (keyword),MIN (keyword)
RATIO STATISTICS command,RATIO STATISTICS command,RATIO STATISTICS command
minimum,minimum,minimum
RATIO STATISTICS command,RATIO STATISTICS command,RATIO STATISTICS command
MNCOV (keyword),MNCOV (keyword),MNCOV (keyword)
RATIO STATISTICS command,RATIO STATISTICS command,RATIO STATISTICS command
mean-centered coefficient of variation,mean-centered coefficient of variation,mean-centered coefficient of variation
RATIO STATISTICS command,RATIO STATISTICS command,RATIO STATISTICS command
coefficient of variation (COV),coefficient of variation (COV),coefficient of variation (COV)
RATIO STATISTICS command,RATIO STATISTICS command,RATIO STATISTICS command
PRD (keyword),PRD (keyword),PRD (keyword)
RATIO STATISTICS command,RATIO STATISTICS command,RATIO STATISTICS command
price-related differential (PRD),price-related differential (PRD),price-related differential (PRD)
RATIO STATISTICS command,RATIO STATISTICS command,RATIO STATISTICS command
index of regressivity,index of regressivity,index of regressivity
RATIO STATISTICS command,RATIO STATISTICS command,RATIO STATISTICS command
RANGE (keyword),RANGE (keyword),RANGE (keyword)
RATIO STATISTICS command,RATIO STATISTICS command,RATIO STATISTICS command
range,range,range
RATIO STATISTICS command,RATIO STATISTICS command,RATIO STATISTICS command
STDDEV (keyword),STDDEV (keyword),STDDEV (keyword)
RATIO STATISTICS command,RATIO STATISTICS command,RATIO STATISTICS command
standard deviation,standard deviation,standard deviation
RATIO STATISTICS command,RATIO STATISTICS command,RATIO STATISTICS command
WCOC (keyword),WCOC (keyword),WCOC (keyword)
RATIO STATISTICS command,RATIO STATISTICS command,RATIO STATISTICS command
coefficient of concentration,coefficient of concentration,coefficient of concentration
RATIO STATISTICS command,RATIO STATISTICS command,RATIO STATISTICS command
WGTMEAN (keyword),WGTMEAN (keyword),WGTMEAN (keyword)
RATIO STATISTICS command,RATIO STATISTICS command,RATIO STATISTICS command
weighted mean,weighted mean,weighted mean
RATIO STATISTICS command,RATIO STATISTICS command,RATIO STATISTICS command
AAD | Average absolute deviation. The result of summing the absolute deviations of the ratios about the median and dividing the result by the total number of ratios.
BCOC (low,high) …) | Coefficient of concentration. The percentage of ratios that fall into an interval. Pairs of low and high values enclosed in parentheses specify the intervals.
CIN(a) | Confidence interval. Specifying this keyword displays confidence intervals for the mean, median, and weighted mean (if those statistics are requested). Specify a value greater than or equal to 0 and less than 100 as the confidence level.
COD | Coefficient of dispersion. The result of expressing the average absolute deviation as a percentage of the median.
MAX | Maximum. The largest ratio.
MDCOV | Median-centered coefficient of variation. The result of expressing the root mean squares of deviation from the median as a percentage of the median.
MEAN | Mean. The result of summing the ratios and dividing the result by the total number ratios.
MEDIAN | Median. The value such that number of ratios less than this value and the number of ratios greater than this value are the same.
MIN | Minimum. The smallest ratio.
MNCOV | Mean-centered coefficient of variation. The result of expressing the standard deviation as a percentage of the mean.
PRD | Price-related differential. Also known as the index of regressivity, the result of dividing the mean by the weighted mean.
RANGE | Range. The result of subtracting the minimum ratio from the maximum ratio.
STDDEV | Standard deviation. The result of summing the squared deviations of the ratios about the mean, dividing the result by the total number of ratios minus one, and taking the positive square root.
WCOC(value list) | Coefficient of concentration. The percentage of ratios that fall within the specified percent of the median. Specify a list of values that are greater than 0 and less than 100.
WGTMEAN | Weighted mean. The result of dividing the mean of the numerator by the mean of the denominator. It is also the mean of the ratios weighted by the denominator.

Example

RATIO STATISTICS appraise WITH price BY county
  /OUTFILE('/PropertyTax/Ratio.sav') = CIN(90) MEDIAN.

• The median ratios and their 90% confidence intervals at each category of county are saved to /PropertyTax/Ratio.sav.

• The overall median ratio and its 90% confidence intervals are also saved.

Related Topics

RATIO STATISTICS
Overview (RATIO STATISTICS command)
Case Frequency (RATIO STATISTICS command)
Variable List (RATIO STATISTICS command)
MISSING Subcommand (RATIO STATISTICS command)
PRINT Subcommand (RATIO STATISTICS command)


PRINT Subcommand (RATIO STATISTICS command)

RATIO STATISTICS (command),RATIO STATISTICS (command),RATIO STATISTICS (command)
output,output,output
PRINT (subcommand),PRINT (subcommand),PRINT (subcommand)
RATIO STATISTICS command,RATIO STATISTICS command,RATIO STATISTICS command
RATIO STATISTICS (command),RATIO STATISTICS (command),RATIO STATISTICS (command)
PRINT subcommand,PRINT subcommand,PRINT subcommand

PRINT displays optional output. If no PRINT subcommand is specified, only a case processing summary table is displayed by default.

AAD (keyword),AAD (keyword),AAD (keyword)
RATIO STATISTICS command,RATIO STATISTICS command,RATIO STATISTICS command
average absolute deviation (AAD),average absolute deviation (AAD),average absolute deviation (AAD)
RATIO STATISTICS command,RATIO STATISTICS command,RATIO STATISTICS command
BCOC (keyword),BCOC (keyword),BCOC (keyword)
RATIO STATISTICS command,RATIO STATISTICS command,RATIO STATISTICS command
coefficient of concentration,coefficient of concentration,coefficient of concentration
RATIO STATISTICS command,RATIO STATISTICS command,RATIO STATISTICS command
CIN (keyword),CIN (keyword),CIN (keyword)
RATIO STATISTICS command,RATIO STATISTICS command,RATIO STATISTICS command
confidence intervals,confidence intervals,confidence intervals
RATIO STATISTICS command,RATIO STATISTICS command,RATIO STATISTICS command
COD (keyword),COD (keyword),COD (keyword)
RATIO STATISTICS command,RATIO STATISTICS command,RATIO STATISTICS command
coefficient of dispersion (COD),coefficient of dispersion (COD),coefficient of dispersion (COD)
RATIO STATISTICS command,RATIO STATISTICS command,RATIO STATISTICS command
MAX (keyword),MAX (keyword),MAX (keyword)
RATIO STATISTICS command,RATIO STATISTICS command,RATIO STATISTICS command
maximum,maximum,maximum
RATIO STATISTICS command,RATIO STATISTICS command,RATIO STATISTICS command
MDCOV (keyword),MDCOV (keyword),MDCOV (keyword)
RATIO STATISTICS command,RATIO STATISTICS command,RATIO STATISTICS command
median-centered coefficient of variation,median-centered coefficient of variation,median-centered coefficient of variation
RATIO STATISTICS command,RATIO STATISTICS command,RATIO STATISTICS command
coefficient of variation (COV),coefficient of variation (COV),coefficient of variation (COV)
RATIO STATISTICS command,RATIO STATISTICS command,RATIO STATISTICS command
MEAN (keyword),MEAN (keyword),MEAN (keyword)
RATIO STATISTICS command,RATIO STATISTICS command,RATIO STATISTICS command
mean,mean,mean
RATIO STATISTICS command,RATIO STATISTICS command,RATIO STATISTICS command
MEDIAN (keyword),MEDIAN (keyword),MEDIAN (keyword)
RATIO STATISTICS command,RATIO STATISTICS command,RATIO STATISTICS command
median,median,median
RATIO STATISTICS command,RATIO STATISTICS command,RATIO STATISTICS command
MIN (keyword),MIN (keyword),MIN (keyword)
RATIO STATISTICS command,RATIO STATISTICS command,RATIO STATISTICS command
minimum,minimum,minimum
RATIO STATISTICS command,RATIO STATISTICS command,RATIO STATISTICS command
MNCOV (keyword),MNCOV (keyword),MNCOV (keyword)
RATIO STATISTICS command,RATIO STATISTICS command,RATIO STATISTICS command
mean-centered coefficient of variation,mean-centered coefficient of variation,mean-centered coefficient of variation
RATIO STATISTICS command,RATIO STATISTICS command,RATIO STATISTICS command
coefficient of variation (COV),coefficient of variation (COV),coefficient of variation (COV)
RATIO STATISTICS command,RATIO STATISTICS command,RATIO STATISTICS command
PRD (keyword),PRD (keyword),PRD (keyword)
RATIO STATISTICS command,RATIO STATISTICS command,RATIO STATISTICS command
price-related differential (PRD),price-related differential (PRD),price-related differential (PRD)
RATIO STATISTICS command,RATIO STATISTICS command,RATIO STATISTICS command
index of regressivity,index of regressivity,index of regressivity
RATIO STATISTICS command,RATIO STATISTICS command,RATIO STATISTICS command
RANGE (keyword),RANGE (keyword),RANGE (keyword)
RATIO STATISTICS command,RATIO STATISTICS command,RATIO STATISTICS command
range,range,range
RATIO STATISTICS command,RATIO STATISTICS command,RATIO STATISTICS command
STDDEV (keyword),STDDEV (keyword),STDDEV (keyword)
RATIO STATISTICS command,RATIO STATISTICS command,RATIO STATISTICS command
standard deviation,standard deviation,standard deviation
RATIO STATISTICS command,RATIO STATISTICS command,RATIO STATISTICS command
WCOC (keyword),WCOC (keyword),WCOC (keyword)
RATIO STATISTICS command,RATIO STATISTICS command,RATIO STATISTICS command
coefficient of concentration,coefficient of concentration,coefficient of concentration
RATIO STATISTICS command,RATIO STATISTICS command,RATIO STATISTICS command
WGTMEAN (keyword),WGTMEAN (keyword),WGTMEAN (keyword)
RATIO STATISTICS command,RATIO STATISTICS command,RATIO STATISTICS command
weighted mean,weighted mean,weighted mean
RATIO STATISTICS command,RATIO STATISTICS command,RATIO STATISTICS command
AAD | Average absolute deviation. The result of summing the absolute deviations of the ratios about the median and dividing the result by the total number of ratios.
BCOC(low,high) …) | Coefficient of concentration. The percentage of ratios that fall into an interval. Pairs of low and high values enclosed in parentheses specify the intervals.
CIN(a) | Confidence interval. Specifying this keyword displays confidence intervals for the mean, median, and weighted mean (if those statistics are requested). Specify a value greater than or equal to 0 and less than 100 as the confidence level.
COD | Coefficient of dispersion. The result of expressing the average absolute deviation as a percentage of the median.
MAX | Maximum. The largest ratio.
MDCOV | Median-centered coefficient of variation. The result of expressing the root mean squares of deviation from the median as a percentage of the median.
MEAN | Mean. The result of summing the ratios and dividing the result by the total number ratios.
MEDIAN | Median. The value such that number of ratios less than this value and the number of ratios greater than this value are the same.
MIN | Minimum. The smallest ratio.
MNCOV | Mean-centered coefficient of variation. The result of expressing the standard deviation as a percentage of the mean.
PRD | Price-related differential. Also known as the index of regressivity, the result of dividing the mean by the weighted mean.
RANGE | Range. The result of subtracting the minimum ratio from the maximum ratio.
STDDEV | Standard deviation. The result of summing the squared deviations of the ratios about the mean, dividing the result by the total number of ratios minus one, and taking the positive square root.
WCOC(value list) | Coefficient of concentration. The percentage of ratios that fall within the specified percentage of the median. Specify a list of values that are greater than 0 and less than 100.
WGTMEAN | Weighted mean. The result of dividing the mean of the numerator by the mean of the denominator. It is also the mean of the ratios weighted by the denominator.

Example

RATIO STATISTICS appraise WITH price BY county
  /PRINT = BCOC((0.5,0.9) (1.3,1.5)) WCOC(15 30 45) MEDIAN PRD.

• The median ratios and priced related differentials at each category of county are displayed. The overall median ratio and the overall price-related differential are also displayed.

• Five coefficients of concentration are also displayed. The first two COC are percentages of ratios that fall into the intervals: (0.5, 0.9) and (1.3, 1.5). The next three COC are percentages of ratios that fall within 15% of the median, 30% of the median, and 45% of the median.

Related Topics

RATIO STATISTICS
Overview (RATIO STATISTICS command)
Case Frequency (RATIO STATISTICS command)
Variable List (RATIO STATISTICS command)
MISSING Subcommand (RATIO STATISTICS command)
OUTFILE Subcommand (RATIO STATISTICS command)


RBF

RBF (command),RBF (command),RBF (command)
RBF (command),RBF (command),RBF (command)
syntax chart,syntax chart,syntax chart
Radial Basis Function,Radial Basis Function,Radial Basis Function
command syntax,command syntax,command syntax

RBF is available in the Neural Networks option.

RBF dependent variable [(MLEVEL = {S})] [dependent variable...]
                                  {O}
                                  {N}

    [BY factor list] [WITH covariate list]

[/EXCEPT VARIABLES = varlist]

[/RESCALE [COVARIATE = {STANDARDIZED**}]   [DEPENDENT = {STANDARDIZED**}]]
                       {NORMALIZED    }                 {NORMALIZED    }
                       {ADJNORMALIZED }                 {ADJNORMALIZED }
                       {NONE          }                 {NONE          }

[/PARTITION {TRAINING = {70**  } TESTING = {30**  } HOLDOUT = {0**   }}]
                        {number}           {number}           {number}
            {VARIABLE = varname                                       }

[/ARCHITECTURE [{[MINUNITS = {AUTO** } MAXUNITS = {AUTO** }]}]
                             {integer}            {integer}
                {NUMUNITS = integer                         }

               [HIDDENFUNCTION = {NRBF**}]]
                                 {ORBF  }

[/CRITERIA OVERLAP = {AUTO**}]
                     {number}

[/MISSING USERMISSING = {EXCLUDE**}]
                        {INCLUDE  }

[/PRINT [CPS**]  [NETWORKINFO**]  [SUMMARY**]  [CLASSIFICATION**]
        [SOLUTION]  [IMPORTANCE] [NONE]]

[/PLOT [NETWORK**]  [PREDICTED]  [RESIDUAL]  [ROC]
       [GAIN]  [LIFT]  [NONE]]

[/SAVE [PREDVAL[(varname [varname...])]]

       [PSEUDOPROB[(rootname[:{25     }] [rootname...])]]]
                              {integer}

[/OUTFILE MODEL = 'file' ['file'...]]

** Default if the subcommand or keyword is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See RBF Algorithms for computational details for this procedure.

Syntax for the RBF command can be generated from the Radial Basis Function dialog.

Release History Collapse Hide details

Release History

Release 16.0

• Command introduced.

Example

RBF dep_var BY A B C WITH X Y Z.

Related Topics

Overview (RBF command)
Examples (RBF command)
Variable Lists (RBF command)
EXCEPT Subcommand (RBF command)
RESCALE Subcommand (RBF command)
PARTITION Subcommand (RBF command)
ARCHITECTURE Subcommand (RBF command)
CRITERIA Subcommand (RBF command)
MISSING Subcommand (RBF command)
PRINT Subcommand (RBF command)
SAVE Subcommand (RBF command)
OUTFILE Subcommand (RBF command)


Overview (RBF command)

Neural networks are a data mining tool for finding unknown patterns in databases. Neural networks can be used to make business decisions by forecasting demand for a product as a function of price and other variables or by categorizing customers based on buying habits and demographic characteristics. The RBF procedure fits a radial basis function neural network, which is a feedforward, supervised learning network with an input layer, a hidden layer called the radial basis function layer, and an output layer. The hidden layer transforms the input vectors into radial basis functions. Like the MLP (multilayer perceptron) procedure, the RBF procedure performs prediction and classification.

The RBF procedure trains the network in two stages:

1. The procedure determines the radial basis functions using clustering methods. The center and width of each radial basis function are determined.

2. The procedure estimates the synaptic weights given the radial basis functions. The sum-of-squares error function with identity activation function for the output layer is used for both prediction and classification. Ordinary least squares regression is used to minimize the sum-of-squares error.

Because of this two-stage training approach, the RBF network is in general trained much faster than MLP.

Options Collapse Hide details

Options

Prediction or classification. One or more dependent variables may be specified, and they may be scale, categorical, or a combination. If a dependent variable has scale measurement level, then the neural network predicts continuous values that approximate the “true” value of some continuous function of the input data. If a dependent variable is categorical, then the neural network is used to classify cases into the “best” category based on the input predictors.

Rescaling. RBF optionally rescales covariates (predictors with scale measurement level) or scale dependent variables before training the neural network. There are three rescaling options: standardization, normalization, and adjusted normalization.

Training, testing, and holdout data. RBF optionally divides the dataset into training, testing, and holdout data. The neural network is trained using the training data. The testing data can be used to determine the “best” number of hidden units for the network. The holdout data is completely excluded from the training process and is used for independent assessment of the final network.

Architecture selection. The RBF procedure creates a neural network with one hidden layer and can perform automatic architecture selection to find the “best” number of hidden units. By default, the procedure automatically computes a reasonable range and finds the “best” number within the range. However, you can override these computations by providing your own range or a specific number of hidden units.

Activation functions. Units in the hidden layer can use the normalized radial basis function or the ordinary radial basis function.

Missing values. The RBF procedure has an option for treating user-missing values of categorical variables as valid. User-missing values of scale variables are always treated as invalid.

Output. RBF displays pivot table output but offers an option for suppressing most such output. Graphical output includes a network diagram (default) and a number of optional charts: predicted by observed values, residual by predicted values, ROC (Receiver Operating Characteristic) curves, cumulative gains, lift, and independent variable importance. The procedure also optionally saves predicted values in the active dataset. Hidden unit center and width vectors and synaptic weight estimates can be saved in XML files.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is the RBF command followed by one or more dependent variables, the BY keyword and one or more factors, and the WITH keyword and one or more covariates.

By default, the RBF procedure standardizes covariates and scale dependent variables and selects a training sample before training the neural network. Automatic architecture selection is used to find the “best” neural network architecture. User-missing values are excluded and default pivot table output is displayed.

Syntax Rules Collapse Hide details

Syntax Rules

• All subcommands are optional.

• Subcommands may be specified in any order.

• Only a single instance of each subcommand is allowed.

• An error occurs if a keyword is specified more than once within a subcommand.

• Parentheses, equals signs, and slashes shown in the syntax chart are required.

• The command name, subcommand names, and keywords must be spelled in full.

• Empty subcommands are not allowed.

• Any split variable defined on the SPLIT FILE command may not be used as a dependent variable, factor, covariate, or partition variable.

Limitations Collapse Hide details

Limitations

Frequency weights specified on the WEIGHT command are ignored with a warning by the RBF procedure.

Categorical Variables Collapse Hide details

Categorical Variables

The RBF procedure temporarily recodes categorical predictors and dependent variables using one-of-c coding for the duration of the procedure. If there are c categories of a variable, then the variable is stored as c vectors, with the first category denoted (1,0,...,0), the next category, (0,1,0,...,0), ..., and the final category, (0,0,...,0,1).

Because of the one-of-c coding, the total number of input units is the number of scale predictors plus the number of categories across all categorical predictors. However, unlike the multilayer perceptron (MLP), this coding scheme does not increase the number of syntaptic weights for categorical predictors and hence should not significantly increase the training time.

All one-of-c coding is based on the training data, even if a testing or holdout sample is defined (see PARTITION Subcommand (RBF command) ). Thus, if the testing or holdout samples contain cases with predictor categories that are not present in the training data, then those cases are not used by the procedure or in scoring. If the testing or holdout samples contain cases with dependent variable categories that are not present in the training data, then those cases are not used by the procedure but they may be scored.

Replicating Results Collapse Hide details

Replicating Results

The RBF procedure uses random number generation during random assignment of partitions. To reproduce the same randomized results in the future, use the SET command to set the initialization value for the random number generator before each run of the RBF procedure.

RBF results are also dependent on data order because the two-step cluster algorithm is used to determine the radial basis functions. To minimize data order effects, randomly order the cases before running the RBF procedure. To verify the stability of a given solution, you may want to obtain several different solutions with cases sorted in different random orders. In situations with extremely large file sizes, multiple runs can be performed with a sample of cases sorted in different random orders.

In summary, if you want to exactly replicate RBF results in the future, use the same initialization value for the random number generator and the same data order, in addition to using the same RBF procedure settings.

Related Topics

RBF
Examples (RBF command)
Variable Lists (RBF command)
EXCEPT Subcommand (RBF command)
RESCALE Subcommand (RBF command)
PARTITION Subcommand (RBF command)
ARCHITECTURE Subcommand (RBF command)
CRITERIA Subcommand (RBF command)
MISSING Subcommand (RBF command)
PRINT Subcommand (RBF command)
SAVE Subcommand (RBF command)
OUTFILE Subcommand (RBF command)
MLP


Examples (RBF command)

Basic specification with default neural network settings

RBF DepVar BY A B C WITH X Y Z.

• The RBF procedure treats DepVar as the dependent variable. Predictors A, B, and C are factors, and X, Y, and Z are covariates.

• By default, covariates and the dependent variable (if it has scale measurement level) are standardized before training. Also, the active dataset is partitioned into training and testing data samples, with 70% going to the training data and 30% to the testing data sample.

• Automatic architecture selection is used to find the “best” neural network architecture.

• User-missing values are excluded and default output is displayed.

User-specified neural network with three hidden units

RBF DepVar BY A B C WITH X Y Z
  /ARCHITECTURE
     NUMUNITS=3
     HIDDENFUNCTION=ORBF.

• The RBF procedure treats DepVar as the dependent variable. Predictors A, B, and C are factors, and X, Y, and Z are covariates.

• By default, covariates and the dependent variable (if it has scale measurement level) are standardized before training. Also, the active dataset is partitioned into training and testing data samples, with 70% going to the training data and 30% to the testing data sample.

• The ARCHITECTURE subcommand specifies a neural network with three hidden units, thereby overriding automatic architecture selection. In addition, the hidden layer uses the ordinary radial basis function.

• User-missing values are excluded and default output is displayed.

Nominal dependent variable; user-specified rescaling and partitions

*Radial Basis Function Network.
RBF custcat (MLEVEL=N) BY marital ed retire gender WITH age address
    income employ reside
  /RESCALE COVARIATE=ADJNORMALIZED
  /PARTITION  TRAINING=6  TESTING=2  HOLDOUT=1
  /ARCHITECTURE MINUNITS=AUTO MAXUNITS=AUTO HIDDENFUNCTION=NRBF
  /CRITERIA OVERLAP=AUTO
  /PRINT CPS NETWORKINFO SUMMARY CLASSIFICATION
  /PLOT ROC GAIN LIFT PREDICTED
  /SAVE PREDVAL PSEUDOPROB
  /MISSING USERMISSING=EXCLUDE .

• The procedure constructs a network to predict the nominal-level variable custcat, using marital, ed, retire, and gender as factors and age, address, income, employ, and reside as covariates.

• The RESCALE subcommand specifies that covariates should be rescaled using the adjusted normalized method.

• The PARTITION subcommand specifies that the relative number of cases assigned to the training:testing:holdout samples should be 6:2:1. This assigned 2/3 of the cases to training, 2/9 to testing, and 1/9 to holdout.

• The PLOT subcommand does not request the default graphical output (the network diagram), but instead an ROC curve, cumulative gains chart, lift chart, and predicted-by-residuals chart will be produced.

• The SAVE subcommand requests that the predicted values and predicted pseudo-probabilities of custcat be saved to the active dataset.

• All other options are set to their default values.

For discussion of output from this syntax and to place the example in context, see Using Radial Basis Function to Classify Telecommunications Customers.

Related Topics

RBF
Overview (RBF command)
Variable Lists (RBF command)
EXCEPT Subcommand (RBF command)
RESCALE Subcommand (RBF command)
PARTITION Subcommand (RBF command)
ARCHITECTURE Subcommand (RBF command)
CRITERIA Subcommand (RBF command)
MISSING Subcommand (RBF command)
PRINT Subcommand (RBF command)
SAVE Subcommand (RBF command)
OUTFILE Subcommand (RBF command)


Variable Lists (RBF command)

RBF (command),RBF (command),RBF (command)
variable lists,variable lists,variable lists

The command line variable lists specify the dependent variables, any categorical predictors (also known as factors), and any scale predictors (also known as covariates).

Dependent Variables

• A list of one or more dependent variables must be the first specification on the RBF command.

• Each dependent variable may be followed by the measurement level specification, which contains, in parentheses, the MLEVEL keyword followed by an equals sign and then S for scale, O for ordinal, or N for nominal. RBF treats ordinal and nominal dependent variables equivalently as categorical.

• If a measurement level is specified, then it temporarily overrides a dependent variable’s setting in the data dictionary.

• If no measurement level is specified, then RBF defaults to the dictionary setting.

• If a measurement level is not specified and no setting is recorded in the data dictionary, then a numeric variable is treated as scale and a string variable is treated as categorical.

• Dependent variables can be numeric or string.

• A string variable may be defined as ordinal or nominal only.

Predictor Variables

• The names of the factors, if any, must be preceded by the keyword BY.

• If the keyword BY is specified with no factors, then a warning is issued and BY is ignored.

• The names of the covariates, if any, must be preceded by the keyword WITH.

• If the keyword WITH is specified with no covariates, then a warning is issued and WITH is ignored.

• If the dependent variable is specified within a factor list or a covariate list, then it is ignored in the list.

• All variables specified within a factor or covariate list must be unique. If duplicate variables are specified within a list, then the duplicates are ignored.

• If duplicate variables are specified across the factor and covariate lists, then an error is issued.

• Factor variables can be numeric or string.

• Covariates must be numeric.

• At least one predictor must be specified.

Related Topics

RBF
Overview (RBF command)
Examples (RBF command)
EXCEPT Subcommand (RBF command)
RESCALE Subcommand (RBF command)
PARTITION Subcommand (RBF command)
ARCHITECTURE Subcommand (RBF command)
CRITERIA Subcommand (RBF command)
MISSING Subcommand (RBF command)
PRINT Subcommand (RBF command)
SAVE Subcommand (RBF command)
OUTFILE Subcommand (RBF command)


EXCEPT Subcommand (RBF command)

RBF (command),RBF (command),RBF (command)
EXCEPT subcommand,EXCEPT subcommand,EXCEPT subcommand
EXCEPT (subcommand),EXCEPT (subcommand),EXCEPT (subcommand)
RBF command,RBF command,RBF command

The EXCEPT subcommand lists any variables that the RBF procedure should exclude from the factor or covariate lists on the command line. This subcommand is useful if the factor or covariate lists contain a large number of variables—specified using the TO or ALL keyword, for example—but there are a few variables (for example, Case ID) that should be excluded.

The EXCEPT subcommand is introduced strictly for the purpose of simplifying syntax. Missing values on factors or covariates specified on EXCEPT do not affect whether a case is included in the analysis. For example, the following two RBF commands are equivalent. In both commands, listwise deletion is based on the dependent variable and factors A, B, and C.

RBF DepVar BY A B C.
RBF DepVar BY A B C D   /EXCEPT VARIABLES=D.

• The EXCEPT subcommand ignores duplicate variables and variables that are not specified on the command line’s factor or covariate lists.

• There is no default variable list on the EXCEPT subcommand.

Related Topics

RBF
Overview (RBF command)
Examples (RBF command)
Variable Lists (RBF command)
RESCALE Subcommand (RBF command)
PARTITION Subcommand (RBF command)
ARCHITECTURE Subcommand (RBF command)
CRITERIA Subcommand (RBF command)
MISSING Subcommand (RBF command)
PRINT Subcommand (RBF command)
SAVE Subcommand (RBF command)
OUTFILE Subcommand (RBF command)


RESCALE Subcommand (RBF command)

RBF (command),RBF (command),RBF (command)
RESCALE subcommand,RESCALE subcommand,RESCALE subcommand
RESCALE (subcommand),RESCALE (subcommand),RESCALE (subcommand)
RBF command,RBF command,RBF command

The RESCALE subcommand is used to rescale covariates or scale dependent variables.

All rescaling is performed based on the training data, even if a testing or holdout sample is defined (see PARTITION Subcommand (RBF command)). That is, depending on the type of rescaling, the mean, standard deviation, minimum value, or maximum value of a covariate or dependent variable is computed using only the training data. It is important that these covariates or dependent variables have similar distributions across the training, testing, and holdout samples. If the data are partitioned by specifying percentages on the PARTITION subcommand, then the RBF procedure attempts to ensure this similarity by random assignment. However, if you use the PARTITION subcommand VARIABLE keyword to assign cases to the training, testing, and holdout samples, then we recommend that you confirm that the distributions are similar across samples before running the RBF procedure.

COVARIATE (keyword),COVARIATE (keyword),COVARIATE (keyword)
RBF command,RBF command,RBF command
STANDARDIZED (keyword),STANDARDIZED (keyword),STANDARDIZED (keyword)
RBF command,RBF command,RBF command
NORMALIZED (keyword),NORMALIZED (keyword),NORMALIZED (keyword)
RBF command,RBF command,RBF command
ADJNORMALIZED (keyword),ADJNORMALIZED (keyword),ADJNORMALIZED (keyword)
RBF command,RBF command,RBF command
NONE (keyword),NONE (keyword),NONE (keyword)
RBF command,RBF command,RBF command
COVARIATE Keyword Collapse Hide details

COVARIATE Keyword

The COVARIATE keyword specifies the rescaling method to use for covariates specified following WITH on the command line.

If no covariates are specified on the command line, then the COVARIATE keyword is ignored.

STANDARDIZED | Subtract the mean and divide by the standard deviation, (x-mean)/s. This is the default rescaling method for covariates.
NORMALIZED | Subtract the minimum and divide by the range, (x-min)/(max-min).
ADJNORMALIZED | Adjusted version of subtracting the minimum and dividing by the range, [2*(x-min)/(max-min)]-1 .
NONE | No rescaling of covariates.
DEPENDENT (keyword),DEPENDENT (keyword),DEPENDENT (keyword)
RBF command,RBF command,RBF command
DEPENDENT Keyword Collapse Hide details

DEPENDENT Keyword

The DEPENDENT keyword specifies the rescaling method to use for the dependent variables.

This keyword is applied only for scale dependent variables; that is, either MLEVEL=S is specified on the command line or the variable has a scale measurement level based on its data dictionary setting. If a dependent variable is not scale, then the DEPENDENT keyword is ignored for that variable.

STANDARDIZED | Subtract the mean and divide by the standard deviation, (x-mean)/s. This is the default rescaling method for scale dependent variables.
NORMALIZED | Subtract the minimum and divide by the range, (x-min)/(max-min).
ADJNORMALIZED | Adjusted version of subtracting the minimum and dividing by the range, [2*(x-min)/(max-min)]-1.
NONE | No rescaling of scale dependent variables.

Related Topics

RBF
Overview (RBF command)
Examples (RBF command)
Variable Lists (RBF command)
EXCEPT Subcommand (RBF command)
PARTITION Subcommand (RBF command)
ARCHITECTURE Subcommand (RBF command)
CRITERIA Subcommand (RBF command)
MISSING Subcommand (RBF command)
PRINT Subcommand (RBF command)
SAVE Subcommand (RBF command)
OUTFILE Subcommand (RBF command)


PARTITION Subcommand (RBF command)

RBF (command),RBF (command),RBF (command)
PARTITION subcommand,PARTITION subcommand,PARTITION subcommand
PARTITION (subcommand),PARTITION (subcommand),PARTITION (subcommand)
RBF command,RBF command,RBF command

The PARTITION subcommand specifies the method of partitioning the active dataset into training, testing, and holdout samples. The training sample comprises the data records used to train the neural network. The testing sample is an independent set of data records used to track prediction error during training in order to prevent overtraining. The holdout sample is another independent set of data records used to assess the final neural network.

• The partition can be defined by specifying the ratio of cases randomly assigned to each sample (training, testing, and holdout) or by a variable that assigns each case to the training, testing, or holdout sample.

• If the PARTITION subcommand is not specified, then the default partition randomly assigns 70% of the cases to the training sample, 30% to the testing sample, and 0% to the holdout sample. If you want to specify a different random assignment, then you must specify new values for the TRAINING, TESTING, and HOLDOUT keywords. The value specified on each keyword gives the relative number of cases in the active dataset to assign to each sample. For example, /PARTITION TRAINING = 50 TESTING = 30 HOLDOUT = 20 is equivalent to /PARTITION TRAINING = 5 TESTING = 3 HOLDOUT = 2; both subcommands randomly assign 50% of the cases to the training sample, 30% to the testing sample, and 20% to the holdout sample.

• If you want to be able to reproduce results based on the TRAINING, TESTING, and HOLDOUT keywords later, use the SET command to set the initialization value for the random number generator before running the RBF procedure.

• Be aware of the relationship between rescaling and partitioning. See the topic RESCALE Subcommand (RBF command) for more information.

• All partitioning is performed after listwise deletion of any cases with invalid data for any variable used by the procedure. See MISSING Subcommand (MLP command) for details about valid and invalid data.

TRAINING (keyword),TRAINING (keyword),TRAINING (keyword)
RBF command,RBF command,RBF command
TRAINING Keyword Collapse Hide details

TRAINING Keyword

The TRAINING keyword specifies the relative number of cases in the active dataset to randomly assign to the training sample. The value must be an integer greater than 0. The default (if the PARTITION subcommand is not specified) is 70.

TESTING (keyword),TESTING (keyword),TESTING (keyword)
RBF command,RBF command,RBF command
TESTING Keyword Collapse Hide details

TESTING Keyword

The TESTING keyword specifies the relative number of cases in the active dataset to randomly assign to the testing sample. The value must be an integer greater than 0. The default (if the PARTITION subcommand is not specified) is 30.

HOLDOUT (keyword),HOLDOUT (keyword),HOLDOUT (keyword)
RBF command,RBF command,RBF command
HOLDOUT Keyword Collapse Hide details

HOLDOUT Keyword

The HOLDOUT keyword specifies the relative number of cases in the active dataset to randomly assign to the holdout sample. The value must be an integer greater than 0. The default (if the PARTITION subcommand is not specified) is 0.

VARIABLE (keyword),VARIABLE (keyword),VARIABLE (keyword)
RBF command,RBF command,RBF command
VARIABLE Keyword Collapse Hide details

VARIABLE Keyword

The VARIABLE keyword specifies a variable that assigns each case in the active dataset to the training, testing, or holdout sample. Cases with a positive value on the variable are assigned to the training sample, cases with a value of 0, to the testing sample, and cases with a negative value, to the holdout sample. Cases with a system-missing value are excluded from the analysis. (Any user-missing values for the partition variable are always treated as valid.)

The variable may not be the dependent variable or any variable specified on the command line factor or covariate lists. The variable must be numeric.

Related Topics

RBF
Overview (RBF command)
Examples (RBF command)
Variable Lists (RBF command)
EXCEPT Subcommand (RBF command)
RESCALE Subcommand (RBF command)
ARCHITECTURE Subcommand (RBF command)
CRITERIA Subcommand (RBF command)
MISSING Subcommand (RBF command)
PRINT Subcommand (RBF command)
SAVE Subcommand (RBF command)
OUTFILE Subcommand (RBF command)


ARCHITECTURE Subcommand (RBF command)

RBF (command),RBF (command),RBF (command)
ARCHITECTURE subcommand,ARCHITECTURE subcommand,ARCHITECTURE subcommand
ARCHITECTURE (subcommand),ARCHITECTURE (subcommand),ARCHITECTURE (subcommand)
RBF command,RBF command,RBF command

The ARCHITECTURE subcommand is used to specify the neural network architecture. RBF creates a neural network with one hidden layer. There are three ways of choosing the number of hidden units:

1. By default, RBF uses automatic architecture selection to find the “best” number of hidden units within a range. The procedure automatically computes the minimum and maximum and finds the best number of hidden units within the range.

If a testing sample is defined; that is, if /PARTITION TESTING is specified with a number greater than zero or via /PARTITION VARIABLE, then the procedure uses the testing data criterion: The best number of hidden units is the one that yields the smallest error in the testing data. If a testing sample is not defined, then the procedure uses the Bayesian information criterion (BIC): The best number of hidden units is the one that yields the smallest BIC based on the training data.

2. You can provide your own range by specifying the MINUNITS and MAXUNITS keywords with integers, and the procedure will find the “best” number of hidden units within that range. It is invalid to specify only MINUNITS or only MAXUNITS; both must be given. The best number of hidden units from the range is determined using the testing data criterion or the BIC.

3. You can override the use of a range and specify a particular number of units directly using the NUMUNITS keyword. It is invalid to specify NUMUNITS with either the MINUNITS or MAXUNITS keyword.

MINUNITS (keyword),MINUNITS (keyword),MINUNITS (keyword)
RBF command,RBF command,RBF command
MINUNITS Keyword Collapse Hide details

MINUNITS Keyword

The MINUNITS keyword specifies the minimum number of units to use in the range. Value AUTO indicates that the number should be computed automatically. Alternatively, a positive integer may be specified. The integer must be less than the number specified on the MAXUNITS keyword.

The default value is AUTO.

MAXUNITS (keyword),MAXUNITS (keyword),MAXUNITS (keyword)
RBF command,RBF command,RBF command
MAXUNITS Keyword Collapse Hide details

MAXUNITS Keyword

The MAXUNITS keyword specifies the maximum number of units to use in the range. Value AUTO indicates that the number should be computed automatically. Alternatively, a positive integer may be specified. The integer must be greater than the number specified on the MINUNITS keyword.

The default value is AUTO.

NUMUNITS (keyword),NUMUNITS (keyword),NUMUNITS (keyword)
RBF command,RBF command,RBF command
NUMUNITS Keyword Collapse Hide details

NUMUNITS Keyword

The NUMUNITS keyword specifies a particular number of hidden units instead of a range. A positive integer may be specified.

• If NUMUNITS is specified when testing data are defined (see PARTITION Subcommand (RBF command)), then the testing data are not used in determining the network architecture and a warning is issued.

• There is no default value.

HIDDENFUNCTION (keyword),HIDDENFUNCTION (keyword),HIDDENFUNCTION (keyword)
RBF command,RBF command,RBF command
NRBF (keyword),NRBF (keyword),NRBF (keyword)
RBF command,RBF command,RBF command
ORBF (keyword),ORBF (keyword),ORBF (keyword)
RBF command,RBF command,RBF command
HIDDENFUNCTION Keyword Collapse Hide details

HIDDENFUNCTION Keyword

The HIDDENFUNCTION keyword specifies the Gaussian radial basis function used in the hidden layer.

NRBF | Normalized radial basis function. Uses the softmax activation function so the activations of all hidden units are normalized to sum to 1. This is the default activation function for all units in the hidden layer.
ORBF | Ordinary radial basis function. Uses the exponential activation function so the activation of the hidden unit is a Gaussian “bump” as a function of the inputs.

Related Topics

RBF
Overview (RBF command)
Examples (RBF command)
Variable Lists (RBF command)
EXCEPT Subcommand (RBF command)
RESCALE Subcommand (RBF command)
PARTITION Subcommand (RBF command)
CRITERIA Subcommand (RBF command)
MISSING Subcommand (RBF command)
PRINT Subcommand (RBF command)
SAVE Subcommand (RBF command)
OUTFILE Subcommand (RBF command)


CRITERIA Subcommand (RBF command)

RBF (command),RBF (command),RBF (command)
CRITERIA subcommand,CRITERIA subcommand,CRITERIA subcommand
CRITERIA (subcommand),CRITERIA (subcommand),CRITERIA (subcommand)
RBF command,RBF command,RBF command

The CRITERIA subcommand specifies computational settings for the RBF procedure.

OVERLAP (keyword),OVERLAP (keyword),OVERLAP (keyword)
RBF command,RBF command,RBF command
OVERLAP Keyword Collapse Hide details

OVERLAP Keyword

The OVERLAP keyword specifies the hidden-unit overlapping factor that controls how much overlap occurs among the hidden units.

• Specify AUTO to automatically compute the overlapping factor 1+0.1d, where d is the number of input units. (The number of input units equals the sum of the number of categories across all factors and the number of covariates.) This is the default.

• Alternatively, specify a number greater than 0 to request a particular overlapping factor.

Related Topics

RBF
Overview (RBF command)
Examples (RBF command)
Variable Lists (RBF command)
EXCEPT Subcommand (RBF command)
RESCALE Subcommand (RBF command)
PARTITION Subcommand (RBF command)
ARCHITECTURE Subcommand (RBF command)
MISSING Subcommand (RBF command)
PRINT Subcommand (RBF command)
SAVE Subcommand (RBF command)
OUTFILE Subcommand (RBF command)


MISSING Subcommand (RBF command)

RBF (command),RBF (command),RBF (command)
MISSING subcommand,MISSING subcommand,MISSING subcommand
MISSING (subcommand),MISSING (subcommand),MISSING (subcommand)
RBF command,RBF command,RBF command

The MISSING subcommand is used to control whether user-missing values for categorical variables; that is, factors and categorical dependent variables, are treated as valid values.

• By default, user-missing values for categorical variables are treated as invalid.

• User-missing values for scale variables are always treated as invalid. System-missing values for any variables are always treated as invalid.

USERMISSING (keyword),USERMISSING (keyword),USERMISSING (keyword)
RBF command,RBF command,RBF command
USERMISSING=EXCLUDE
 | User-missing values for categorical variables are treated as invalid. This is the default.
USERMISSING=INCLUDE
 | User-missing values for categorical variables are treated as valid values.

Related Topics

RBF
Overview (RBF command)
Examples (RBF command)
Variable Lists (RBF command)
EXCEPT Subcommand (RBF command)
RESCALE Subcommand (RBF command)
PARTITION Subcommand (RBF command)
ARCHITECTURE Subcommand (RBF command)
CRITERIA Subcommand (RBF command)
PRINT Subcommand (RBF command)
SAVE Subcommand (RBF command)
OUTFILE Subcommand (RBF command)


PRINT Subcommand (RBF command)

RBF (command),RBF (command),RBF (command)
PRINT subcommand,PRINT subcommand,PRINT subcommand
PRINT (subcommand),PRINT (subcommand),PRINT (subcommand)
RBF command,RBF command,RBF command

The PRINT subcommand indicates the tabular output to display and can be used to request a sensitivity analysis. If PRINT is not specified, then the default tables are displayed. If PRINT is specified, then only the requested PRINT output is displayed.

CPS (keyword),CPS (keyword),CPS (keyword)
RBF command,RBF command,RBF command
CPS Keyword Collapse Hide details

CPS Keyword

The CPS keyword displays the case processing summary table, which summarizes the number of cases included and excluded in the analysis, in total and by training, testing, and holdout samples. This table is shown by default.

NETWORKINFO (keyword),NETWORKINFO (keyword),NETWORKINFO (keyword)
RBF command,RBF command,RBF command
NETWORKINFO Keyword Collapse Hide details

NETWORKINFO Keyword

The NETWORKINFO keyword displays information about the neural network, including the dependent variables, number of input and output units, number of hidden units, and activation functions. This table is shown by default.

SUMMARY (keyword),SUMMARY (keyword),SUMMARY (keyword)
RBF command,RBF command,RBF command
SUMMARY Keyword Collapse Hide details

SUMMARY Keyword

The SUMMARY keyword displays a summary of the neural network results, including the error, the relative error or percentage of incorrect predictions, and the training time.

• The error is the sum-of-squares error. In addition, relative errors or percentages of incorrect predictions are displayed, depending on the dependent variable measurement levels. If any dependent variable has scale measurement level, then the average overall relative error (relative to the mean model) is displayed. If all dependent variables are categorical, then the average percentage of incorrect predictions is displayed. Relative errors or percentages of incorrect predictions are also displayed for individual dependent variables.

• Summary results are given for the training data, and for testing and holdout data if they exist.

• This table is shown by default.

CLASSIFICATION (keyword),CLASSIFICATION (keyword),CLASSIFICATION (keyword)
RBF command,RBF command,RBF command
CLASSIFICATION Keyword Collapse Hide details

CLASSIFICATION Keyword

The CLASSIFICATION keyword displays a classification table for each categorical dependent variable. The table gives the number of cases classified correctly and incorrectly for each dependent variable category.

• In addition to classification tables, the CLASSIFICATION keyword reports the percentage of the total cases that were correctly classified. A case is correctly classified if its highest predicted probabilities correspond to the observed categories for that case.

• Classification results are given for the training data, and for testing and holdout data if they exist.

• Classification results are shown by default.

• The CLASSIFICATION keyword is ignored for scale dependent variables.

SOLUTION (keyword),SOLUTION (keyword),SOLUTION (keyword)
RBF command,RBF command,RBF command
SOLUTION Keyword Collapse Hide details

SOLUTION Keyword

The SOLUTION keyword displays the center and width vectors for each hidden unit, and the synaptic weight estimates (that is, the coefficient estimates) from the hidden units to the output units. These results are based on the training sample even if the active dataset is partitioned into training, testing, and holdout data.

This table is not shown by default because the number of synaptic weight estimates may be large, and these weights are generally not used for interpretation.

IMPORTANCE (keyword),IMPORTANCE (keyword),IMPORTANCE (keyword)
RBF command,RBF command,RBF command
IMPORTANCE Keyword Collapse Hide details

IMPORTANCE Keyword

The IMPORTANCE keyword performs a sensitivity analysis, which computes the importance of each predictor in determining the neural network. The analysis is based on the combined training and testing samples, or only the training sample if there is no testing sample. This keyword creates a table and a chart displaying importance and normalized importance for each predictor.

Sensitivity analysis is not performed by default because it is computationally expensive and time-consuming if there are a large number of predictors or cases.

NONE (keyword),NONE (keyword),NONE (keyword)
RBF command,RBF command,RBF command
NONE Keyword Collapse Hide details

NONE Keyword

The NONE keyword suppresses all PRINT output. This keyword may not be specified with any other PRINT keywords.

Related Topics

RBF
Overview (RBF command)
Examples (RBF command)
Variable Lists (RBF command)
EXCEPT Subcommand (RBF command)
RESCALE Subcommand (RBF command)
PARTITION Subcommand (RBF command)
ARCHITECTURE Subcommand (RBF command)
CRITERIA Subcommand (RBF command)
MISSING Subcommand (RBF command)
SAVE Subcommand (RBF command)
OUTFILE Subcommand (RBF command)


PLOT Subcommand (RBF command)

RBF (command),RBF (command),RBF (command)
PLOT subcommand,PLOT subcommand,PLOT subcommand
PLOT (subcommand),PLOT (subcommand),PLOT (subcommand)
RBF command,RBF command,RBF command

The PLOT subcommand indicates the chart output to display. If PLOT is not specified, then the default chart (the network diagram) is displayed. If PLOT is specified, then only the requested PLOT output is displayed.

NETWORK (keyword),NETWORK (keyword),NETWORK (keyword)
RBF command,RBF command,RBF command
NETWORK Keyword Collapse Hide details

NETWORK Keyword

The NETWORK keyword displays the network diagram. This chart is shown by default.

PREDICTED (keyword),PREDICTED (keyword),PREDICTED (keyword)
RBF command,RBF command,RBF command
PREDICTED Keyword Collapse Hide details

PREDICTED Keyword

The PREDICTED keyword displays a predicted-by-observed-value chart for each dependent variable. For categorical dependent variables, a boxplot of predicted pseudo-probabilities is displayed. For scale dependent variables, a scatterplot is displayed.

• Charts are based on the combined training and testing samples, or only the training sample if there is no testing sample.

RESIDUAL (keyword),RESIDUAL (keyword),RESIDUAL (keyword)
RBF command,RBF command,RBF command
RESIDUAL Keyword Collapse Hide details

RESIDUAL Keyword

The RESIDUAL keyword displays a residual-by-predicted-value chart for each scale dependent variable.

• This chart is available only for scale dependent variables. The RESIDUAL keyword is ignored for categorical dependent variables.

• Charts are based on the combined training and testing samples, or only the training sample if there is no testing sample.

ROC (keyword),ROC (keyword),ROC (keyword)
RBF command,RBF command,RBF command
ROC Keyword Collapse Hide details

ROC Keyword

The ROC keyword displays an ROC (Receiver Operating Characteristic) chart for each categorical dependent variable. It also displays a table giving the area under each curve in the chart.

• For a given dependent variable, the ROC chart displays one curve for each category. If the dependent variable has two categories, then each curve treats the category at issue as the positive state versus the other category. If the dependent variable has more than two categories, then each curve treats the category at issue as the positive state versus the aggregate of all other categories.

• This chart is available only for categorical dependent variables. The ROC keyword is ignored for scale dependent variables.

• Charts are based on the combined training and testing samples, or only the training sample if there is no testing sample.

GAIN (keyword),GAIN (keyword),GAIN (keyword)
RBF command,RBF command,RBF command
GAIN Keyword Collapse Hide details

GAIN Keyword

The GAIN keyword displays a cumulative gains chart for each categorical dependent variable.

• The display of one curve for each dependent variable category is the same as for the ROC keyword.

• This chart is available only for categorical dependent variables. The GAIN keyword is ignored for scale dependent variables.

• Charts are based on the combined training and testing samples, or only the training sample if there is no testing sample.

LIFT (keyword),LIFT (keyword),LIFT (keyword)
RBF command,RBF command,RBF command
LIFT Keyword Collapse Hide details

LIFT Keyword

The LIFT keyword displays a lift chart for each categorical dependent variable.

• The display of one curve for each dependent variable category is the same as for the ROC keyword.

• This chart is available only for categorical dependent variables. The LIFT keyword is ignored for scale dependent variables.

• Charts are based on the combined training and testing samples, or only the training sample if there is no testing sample.

NONE (keyword),NONE (keyword),NONE (keyword)
RBF command,RBF command,RBF command
NONE Keyword Collapse Hide details

NONE Keyword

The NONE keyword suppresses all PLOT output. This keyword may not be specified with any other PLOT keywords.

Related Topics

MLP
Overview (MLP command)
Examples (MLP command)
Variable Lists (MLP command)
EXCEPT Subcommand (MLP command)
RESCALE Subcommand (MLP command)
PARTITION Subcommand (MLP command)
ARCHITECTURE Subcommand (MLP command)
CRITERIA Subcommand (MLP command)
STOPPINGRULES Subcommand (MLP command)
MISSING Subcommand (MLP command)
PRINT Subcommand (MLP command)
PLOT Subcommand (MLP command)
SAVE Subcommand (MLP command)
OUTFILE Subcommand (MLP command)


SAVE Subcommand (RBF command)

RBF (command),RBF (command),RBF (command)
SAVE subcommand,SAVE subcommand,SAVE subcommand
SAVE (subcommand),SAVE (subcommand),SAVE (subcommand)
RBF command,RBF command,RBF command

The SAVE subcommand writes optional temporary variables to the active dataset.

PREDVAL (keyword),PREDVAL (keyword),PREDVAL (keyword)
RBF command,RBF command,RBF command
PSEUDOPROB (keyword),PSEUDOPROB (keyword),PSEUDOPROB (keyword)
RBF command,RBF command,RBF command
PREDVAL(varname varname…)
 | Predicted value or category. If a dependent variable has scale measurement level, then this is the predicted value. If a dependent variable is categorical, then this is the predicted category.
 | Specify one or more unique, valid variable names. There should be as many variable names specified as there are dependent variables, and the names should be listed in the order of the dependent variables on the command line. If you do not specify enough variable names, then default names are used for any remaining variables. If you specify too many variable names, then any remaining names are ignored.
 | If there is only one dependent variable, then the default variable name is RBF_PredictedValue. If there are multiple dependent variables, then the default variable names are RBF_PredictedValue_1, RBF_PredictedValue_2, etc., corresponding to the order of the dependent variables on the command line.
PSEUDOPROB(rootname:n rootname…)
 | Predicted pseudo-probability. If a dependent variable is categorical, then this keyword saves the predicted pseudo-probabilities of the first n categories of that dependent variable.
 | Specify one or more unique, valid variable names. There should be as many variable names specified as there are categorical dependent variables, and the names should be listed in the order of the categorical dependent variables on the command line. The specified names are treated as rootnames. Suffixes are added to each rootname to get a group of variable names corresponding to the categories for a given dependent variable. If you do not specify enough variable names, then default names are used for any remaining categorical dependent variables. If you specify too many variable names, then any remaining names are ignored.
 | A colon and a positive integer giving the number of probabilities to save for a dependent variable can follow the rootname.
 | If there is only one dependent variable, then the default rootname is RBF_PseudoProbability. If there are multiple dependent variables, then the default rootnames are RBF_PseudoProbability_1, RBF_PseudoProbability_2, etc., corresponding to the order of the categorical dependent variables on the command line and taking into account the position of any scale dependent variables.
 | The default n is 25.
 | This keyword is ignored for scale dependent variables.

Probabilities and Pseudo-Probabilities

Predicted pseudo-probabilities cannot be interpreted as probabilities because the RBF procedure uses the sum-of-squares error and identity activation function for the output layer. The SAVE subcommand saves these predicted pseudo-probabilities even if any are less than 0 or greater than 1, or the sum for a given dependent variable is not 1.

The ROC, cumulative gains, and lift charts (see /PLOT ROC, GAIN, and LIFT, respectively) are created based on pseudo-probabilities. In the event that any of the pseudo-probabilities are less than 0 or greater than 1, or the sum for a given variable is not 1, they are first rescaled to be between 0 and 1 and to sum to 1. The SAVE subcommand saves the original pseudo-probabilities, but the charts are based on rescaled pseudo-probabilities.

Pseudo-probabilities are rescaled by dividing by their sum. For example, if a case has predicted pseudo-probabilities of 0.50, 0.60, and 0.40 for a three-category dependent variable, then each pseudo-probability is divided by the sum 1.50 to get 0.33, 0.40, and 0.27.

If any of the pseudo-probabilities are negative, then the absolute value of the lowest is added to all pseudo-probabilities before the above rescaling. For example, if the pseudo-probabilities are –0.30, 0.50, and 1.30, then first add 0.30 to each value to get 0.00, 0.80, and 1.60. Next, divide each new value by the sum 2.40 to get 0.00, 0.33, and 0.67.

Related Topics

RBF
Overview (RBF command)
Examples (RBF command)
Variable Lists (RBF command)
EXCEPT Subcommand (RBF command)
RESCALE Subcommand (RBF command)
PARTITION Subcommand (RBF command)
ARCHITECTURE Subcommand (RBF command)
CRITERIA Subcommand (RBF command)
MISSING Subcommand (RBF command)
PRINT Subcommand (RBF command)
OUTFILE Subcommand (RBF command)


OUTFILE Subcommand (RBF command)

RBF (command),RBF (command),RBF (command)
OUTFILE subcommand,OUTFILE subcommand,OUTFILE subcommand
OUTFILE (subcommand),OUTFILE (subcommand),OUTFILE (subcommand)
RBF command,RBF command,RBF command

The OUTFILE subcommand saves XML-format (PMML) files containing the hidden unit center and width vectors, and the synaptic weight estimates. SmartScore and PASW Statistics Server (a separate product) can use this file to apply the model information to other data files for scoring purposes.

• Filenames must be specified in full. The RBF procedure does not supply extensions.

• The MODEL keyword is not honored if split-file processing is in effect (see SPLIT FILE ). If this keyword is specified when split-file processing is on, then a warning is displayed.

MODEL (keyword),MODEL (keyword),MODEL (keyword)
RBF command,RBF command,RBF command
MODEL = 'file' 'file'…
Writes the hidden unit center and width vectors and synaptic weight estimates to XML (PMML) files. Specify one or more unique, valid filenames. There should be as many filenames as there are dependent variables, and the names should be listed in the order of the dependent variables on the command line. If you do not specify enough filenames, then an error is issued. If you specify too many filenames, then any remaining names are ignored.

If any 'file' specification refers to an existing file, then the file is overwritten. If any 'file' specifications refer to the same file, then only the last instance of this 'file' specification is honored.

Related Topics

RBF
Overview (RBF command)
Examples (RBF command)
Variable Lists (RBF command)
EXCEPT Subcommand (RBF command)
RESCALE Subcommand (RBF command)
PARTITION Subcommand (RBF command)
ARCHITECTURE Subcommand (RBF command)
CRITERIA Subcommand (RBF command)
MISSING Subcommand (RBF command)
PRINT Subcommand (RBF command)
SAVE Subcommand (RBF command)


READ MODEL

READ MODEL (command),READ MODEL (command),READ MODEL (command)
READ MODEL (command),READ MODEL (command),READ MODEL (command)
syntax chart,syntax chart,syntax chart
model file,model file,model file
reading,reading,reading
READ MODEL FILE='filename'

 [/KEEP={ALL**      }]
        {model names}
        {procedures }

 [/DROP={model names}]
        {procedures }

 [/TYPE={MODEL**}]
        {COMMAND}

 [/TSET={CURRENT**}]
        {RESTORE  }

**Default if the subcommand is omitted.

This command takes effect immediately. It does not read the active dataset or execute pending transformations. See the topic Command Order for more information.

Example

READ MODEL FILE='ACFMOD.DAT'.

Related Topics

Overview (READ MODEL command)
Example (READ MODEL command)
FILE Subcommand (READ MODEL command)
KEEP and DROP Subcommands (READ MODEL command)
TYPE Subcommand (READ MODEL command)
TSET Subcommand (READ MODEL command)
MODEL NAME
SAVE MODEL
TDISPLAY


Overview (READ MODEL command)

READ MODEL reads a model file that has been previously saved on the SAVE MODEL command (see SAVE MODEL).

Options Collapse Hide details

Options

You can restore a subset of models from the model file by using the DROP and KEEP subcommands. You can use the TYPE subcommand to control whether models are specified by model name or by the name of the procedure that generated them. With the TSET subcommand, you can restore the TSET settings that were in effect when the model file was created.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is the FILE subcommand, specifying the name of a previously saved model file.

• By default, all models that are contained in the specified file are restored, replacing all models that are currently active. The restored models have their original MOD_n default names or names that are assigned by the MODEL NAME command.

Subcommand Order Collapse Hide details

Subcommand Order

• Subcommands can be specified in any order.

Syntax Rules Collapse Hide details

Syntax Rules

• If a subcommand is specified more than once, only the last subcommand is executed.

Operations Collapse Hide details

Operations

• READ MODEL is executed immediately.

• Models that are currently active are erased when READ MODEL is executed. To save these models for later use, specify the SAVE MODEL command before READ MODEL.

• Model files are designed to be read by specific procedures and should not be edited.

• DATE specifications are not saved in model files. Therefore, the DATE specifications from the current session are applied to the restored models.

• The following procedures can generate models that can be read by the READ MODEL command: AREG, ARIMA, EXSMOOTH, SEASON, and SPECTRA in the Forecasting module; ACF, CASEPLOT, CCF, CURVEFIT, PACF, PPLOT, and TSPLOT in the Core system; and WLS and 2SLS in the Regression module.

Limitations Collapse Hide details

Limitations

• A maximum of one filename can be specified.

• The READ MODEL command can only read models created by a SAVE MODEL command on the same operating system/platform.

Related Topics

READ MODEL
Example (READ MODEL command)
FILE Subcommand (READ MODEL command)
KEEP and DROP Subcommands (READ MODEL command)
TYPE Subcommand (READ MODEL command)
TSET Subcommand (READ MODEL command)


Example (READ MODEL command)

READ MODEL FILE='ACFMOD.DAT'
  /DROP=MOD_1.

• In this example, all models are restored except MOD_1 in the model file ACFMOD.DAT.

Related Topics

READ MODEL
Overview (READ MODEL command)
FILE Subcommand (READ MODEL command)
KEEP and DROP Subcommands (READ MODEL command)
TYPE Subcommand (READ MODEL command)
TSET Subcommand (READ MODEL command)


FILE Subcommand (READ MODEL command)

FILE (subcommand),FILE (subcommand),FILE (subcommand)
READ MODEL command,READ MODEL command,READ MODEL command
READ MODEL (command),READ MODEL (command),READ MODEL (command)
FILE subcommand,FILE subcommand,FILE subcommand

FILE names the model file to be read and is the only required subcommand.

• The only specification on FILE is the name of the model file.

• The filename should be enclosed in quotes.

• Only one filename can be specified.

• Only files that are saved with the SAVE MODEL command can be read.

FILE (subcommand),FILE (subcommand),FILE (subcommand)
READ MODEL command,READ MODEL command,READ MODEL command
READ MODEL (command),READ MODEL (command),READ MODEL (command)
FILE subcommand,FILE subcommand,FILE subcommand

• You can specify files residing in other directories by supplying a fully qualified filename.

Related Topics

READ MODEL
Overview (READ MODEL command)
Example (READ MODEL command)
KEEP and DROP Subcommands (READ MODEL command)
TYPE Subcommand (READ MODEL command)
TSET Subcommand (READ MODEL command)


KEEP and DROP Subcommands (READ MODEL command)

READ MODEL (command),READ MODEL (command),READ MODEL (command)
KEEP subcommand,KEEP subcommand,KEEP subcommand
KEEP (subcommand),KEEP (subcommand),KEEP (subcommand)
READ MODEL command,READ MODEL command,READ MODEL command
DROP (subcommand),DROP (subcommand),DROP (subcommand)
READ MODEL command,READ MODEL command,READ MODEL command
READ MODEL (command),READ MODEL (command),READ MODEL (command)
DROP subcommand,DROP subcommand,DROP subcommand

KEEP and DROP allow you to restore a subset of models. By default, all models in the model file are restored.

• KEEP specifies the models to be restored.

• DROP specifies the models to be excluded.

• Models can be specified by using individual model names or the names of the procedures that created them. To use procedure names, you must specify COMMAND on the TYPE subcommand.

• Model names are either the default MOD_n names or the names that are assigned with MODEL NAME.

• If a procedure name is specified on KEEP, all models that are created by that procedure are restored; on DROP, all models that are created by the procedure are dropped.

• Model names and procedure names cannot be mixed on a single READ MODEL command.

• If more than one KEEP or DROP subcommand is specified, only the last subcommand is executed.

• You can specify the keyword ALL on KEEP to restore all models in the model file. This setting is the default.

• The stored model file is not affected by the KEEP or DROP specification on READ MODEL.

Example

READ MODEL FILE='ACFCCF.DAT'
  /KEEP=ACF1 ACF2.
READ MODEL (command),READ MODEL (command),READ MODEL (command)
KEEP subcommand,KEEP subcommand,KEEP subcommand
KEEP (subcommand),KEEP (subcommand),KEEP (subcommand)
READ MODEL command,READ MODEL command,READ MODEL command
DROP (subcommand),DROP (subcommand),DROP (subcommand)
READ MODEL command,READ MODEL command,READ MODEL command
READ MODEL (command),READ MODEL (command),READ MODEL (command)
DROP subcommand,DROP subcommand,DROP subcommand

• In this example, only models ACF1 and ACF2 are restored from model file ACFCCF.DAT.

Related Topics

READ MODEL
Overview (READ MODEL command)
Example (READ MODEL command)
FILE Subcommand (READ MODEL command)
TYPE Subcommand (READ MODEL command)
TSET Subcommand (READ MODEL command)


TYPE Subcommand (READ MODEL command)

TYPE (subcommand),TYPE (subcommand),TYPE (subcommand)
READ MODEL command,READ MODEL command,READ MODEL command
READ MODEL (command),READ MODEL (command),READ MODEL (command)
TYPE subcommand,TYPE subcommand,TYPE subcommand

TYPE indicates whether models are specified by model name or procedure name on DROP and KEEP.

COMMAND (keyword),COMMAND (keyword),COMMAND (keyword)
READ MODEL command,READ MODEL command,READ MODEL command
MODEL (keyword),MODEL (keyword),MODEL (keyword)
READ MODEL command,READ MODEL command,READ MODEL command

• One keyword, MODEL or COMMAND, can be specified after TYPE.

MODEL (keyword),MODEL (keyword),MODEL (keyword)
READ MODEL command,READ MODEL command,READ MODEL command

• MODEL is the default and indicates that models are specified as model names.

• COMMAND indicates that models are specified by procedure name.

• TYPE has no effect if KEEP or DROP is not specified.

• The TYPE specification applies only to the current READ MODEL command.

Example

READ MODEL FILE='CURVE1.DAT'
  /KEEP=CURVEFIT
  /TYPE=COMMAND.
COMMAND (keyword),COMMAND (keyword),COMMAND (keyword)
READ MODEL command,READ MODEL command,READ MODEL command
TYPE (subcommand),TYPE (subcommand),TYPE (subcommand)
READ MODEL command,READ MODEL command,READ MODEL command
READ MODEL (command),READ MODEL (command),READ MODEL (command)
TYPE subcommand,TYPE subcommand,TYPE subcommand

• In this example, all models that are created by CURVEFIT are restored from model file CURVE1.DAT.

Related Topics

READ MODEL
Overview (READ MODEL command)
Example (READ MODEL command)
FILE Subcommand (READ MODEL command)
KEEP and DROP Subcommands (READ MODEL command)
TSET Subcommand (READ MODEL command)


TSET Subcommand (READ MODEL command)

READ MODEL (command),READ MODEL (command),READ MODEL (command)
TSET subcommand,TSET subcommand,TSET subcommand
TSET (subcommand),TSET (subcommand),TSET (subcommand)
READ MODEL command,READ MODEL command,READ MODEL command

TSET allows you to restore the TSET settings that were in effect when the model was created.

• The specification on TSET is either CURRENT or RESTORE.

• CURRENT (the default) indicates that you want to continue to use the current TSET settings.

TSET (subcommand),TSET (subcommand),TSET (subcommand)
READ MODEL command,READ MODEL command,READ MODEL command
READ MODEL (command),READ MODEL (command),READ MODEL (command)
TSET subcommand,TSET subcommand,TSET subcommand

• RESTORE indicates that you want to restore the TSET settings that were in effect when the model file was saved. The current TSET settings are replaced with the model file settings when the file is restored.

Related Topics

READ MODEL
Overview (READ MODEL command)
Example (READ MODEL command)
FILE Subcommand (READ MODEL command)
KEEP and DROP Subcommands (READ MODEL command)
TYPE Subcommand (READ MODEL command)


RECODE

recoding values,recoding values,recoding values
data transformations,data transformations,data transformations
recoding values,recoding values,recoding values
RECODE (command),RECODE (command),RECODE (command)
RECODE (command),RECODE (command),RECODE (command)
syntax chart,syntax chart,syntax chart

For numeric variables:

RECODE varlist (value list=value)...(value list=value) [INTO varlist]
       [/varlist...]

Input keywords:

LO, LOWEST, HI, HIGHEST, THRU, MISSING, SYSMIS, ELSE

Output keywords:

COPY, SYSMIS

For string variables:

RECODE varlist [('string',['string'...]='string')][INTO varlist]
       [/varlist...]

Input keywords:

CONVERT, ELSE

Output keyword:

COPY

This command does not read the active dataset. It is stored, pending execution with the next command that reads the dataset. See the topic Command Order for more information.

Syntax for the RECODE command can be generated from the Recode into Same Variables dialog or the Recode into Different Variables dialog.

Examples

RECODE V1 TO V3 (0=1) (1=0) (2,3=-1) (9=9) (ELSE=SYSMIS).

RECODE STRNGVAR ('A','B','C'='A')('D','E','F'='B')(ELSE=' ').

Related Topics

Overview (RECODE command)
Syntax Rules (RECODE command)
Operations (RECODE command)
Examples (RECODE command)
INTO Keyword (RECODE command)
CONVERT Keyword (RECODE command)


Overview (RECODE command)

IF (command),IF (command),IF (command)
compared with RECODE command,compared with RECODE command,compared with RECODE command
RECODE (command),RECODE (command),RECODE (command)
compared with IF command,compared with IF command,compared with IF command

RECODE changes, rearranges, or consolidates the values of an existing variable. RECODE can be executed on a value-by-value basis or for a range of values. Where it can be used, RECODE is much more efficient than the series of IF commands that produce the same transformation.

AUTORECODE (command),AUTORECODE (command),AUTORECODE (command)
compared with RECODE command,compared with RECODE command,compared with RECODE command
RECODE (command),RECODE (command),RECODE (command)
compared with AUTORECODE command,compared with AUTORECODE command,compared with AUTORECODE command

With RECODE, you must specify the new values. Use AUTORECODE to automatically recode the values of string or numeric variables to consecutive integers.

Options Collapse Hide details

Options

You can generate a new variable as the recoded version of an existing variable using the keyword INTO. You can also use INTO to recode a string variable into a new numeric variable for more efficient processing, or to recode a numeric variable into a new string variable to provide more descriptive values.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is a variable name and, within parentheses, the original values followed by a required equals sign and a new value. RECODE changes the values to the left of the equals sign into the single value to the right of the equals sign.

Related Topics

RECODE
Syntax Rules (RECODE command)
Operations (RECODE command)
Examples (RECODE command)
INTO Keyword (RECODE command)
CONVERT Keyword (RECODE command)


Syntax Rules (RECODE command)

• The variables to be recoded must already exist and must be specified before the value specifications.

• Value specifications are enclosed in parentheses. The original value or values must be specified to the left of an equals sign. A single new value is specified to the right of the equals sign.

• Multiple values can be consolidated into a single recoded value by specifying, to the left of the equals sign, a list of values separated by blanks or commas. Only one recoded value per set is allowed to the right of the equals sign.

• Multiple sets of value specifications are permitted. Each set must be enclosed in parentheses and can result in only one new value.

• To recode multiple variables using the same set of value specifications, specify a variable list before the value specifications. Each variable in the list is recoded identically.

• To recode variables using different value specifications, separate each variable (or variable list) and its specifications from the others by a slash.

ELSE (keyword),ELSE (keyword),ELSE (keyword)
RECODE command,RECODE command,RECODE command

• Original values that are not specified remain unchanged unless the keyword ELSE or INTO is used to recode into a new variable. ELSE refers to all original values not previously mentioned, including the system-missing value. ELSE should be the last specification for the variable. When recoding INTO another variable, unspecified values are set to system-missing or blank for strings.

• COPY replicates original values without recoding them.

• INTO is required to recode a string variable into a numeric variable or a numeric variable into a string variable.

Related Topics

RECODE
Overview (RECODE command)
Operations (RECODE command)
Examples (RECODE command)
INTO Keyword (RECODE command)
CONVERT Keyword (RECODE command)
Numeric Variables (RECODE command)
String Variables (RECODE command)


Numeric Variables (RECODE command)

recoding values,recoding values,recoding values
numeric variables,numeric variables,numeric variables
RECODE (command),RECODE (command),RECODE (command)
numeric variables,numeric variables,numeric variables

• Keywords that can be used in the list of original values are LO (or LOWEST), HI (or HIGHEST), THRU, MISSING, SYSMIS, and ELSE. Keywords that can be used in place of a new value are COPY and SYSMIS.

THRU (keyword),THRU (keyword),THRU (keyword)
RECODE command,RECODE command,RECODE command

• THRU specifies a value range and includes the specified end values.

RECODE (command),RECODE (command),RECODE (command)
missing values,missing values,missing values
HIGHEST (keyword),HIGHEST (keyword),HIGHEST (keyword)
RECODE command,RECODE command,RECODE command
LOWEST (keyword),LOWEST (keyword),LOWEST (keyword)
RECODE command,RECODE command,RECODE command

• LOWEST and HIGHEST (LO and HI) specify the lowest and highest values encountered in the data. LOWEST and HIGHEST include user-missing values but not the system-missing value.

recoding values,recoding values,recoding values
missing values,missing values,missing values
MISSING (keyword),MISSING (keyword),MISSING (keyword)
RECODE command,RECODE command,RECODE command

• MISSING specifies user-missing and system-missing values for recoding. MISSING can be used in the list of original values only.

SYSMIS (keyword),SYSMIS (keyword),SYSMIS (keyword)
RECODE command,RECODE command,RECODE command

• SYSMIS specifies the system-missing value and can be used as both an original value and a new value.

Related Topics

Syntax Rules (RECODE command)
String Variables (RECODE command)


String Variables (RECODE command)

RECODE (command),RECODE (command),RECODE (command)
string variables,string variables,string variables
recoding values,recoding values,recoding values
string variables,string variables,string variables

• Keywords that can be used in the list of original values are CONVERT and ELSE. The only keyword that can be used in place of a new value is COPY.

• Values must be enclosed in quotes.

• Blanks are significant characters.

Related Topics

Syntax Rules (RECODE command)
Numeric Variables (RECODE command)


Operations (RECODE command)

• Value specifications are scanned left to right.

• A value is recoded only once per RECODE command.

• Invalid specifications on a RECODE command that result in errors stop all processing of that RECODE command. No variables are recoded.

Related Topics

RECODE
Overview (RECODE command)
Syntax Rules (RECODE command)
Examples (RECODE command)
INTO Keyword (RECODE command)
CONVERT Keyword (RECODE command)
Numeric Variables (RECODE command)
String Variables (RECODE command)


Numeric Variables (RECODE command)

• Blank fields for numeric variables are handled according to the SET BLANKS specification prior to recoding.

MISSING VALUES (command),MISSING VALUES (command),MISSING VALUES (command)
with RECODE command,with RECODE command,with RECODE command
RECODE (command),RECODE (command),RECODE (command)
with MISSING VALUES command,with MISSING VALUES command,with MISSING VALUES command

• When you recode a value that was previously defined as user-missing on the MISSING VALUE command, the new value is not missing.

Related Topics

Operations (RECODE command)
String Variables (RECODE command)


String Variables (RECODE command)

• If the original or new value specified is shorter than the format width defined for the variable, the string is right-padded with blanks.

• If the original or recoded value specified is longer than the format width defined for that variable, the program issues an error message and RECODE is not executed.

Related Topics

Operations (RECODE command)
Numeric Variables (RECODE command)


Examples (RECODE command)

Recoding Numeric Variables

RECODE V1 TO V3 (0=1) (1=0) (2,3=-1) (9=9) (ELSE=SYSMIS)
  /QVAR(1 THRU 5=1)(6 THRU 10=2)(11 THRU HI=3)(ELSE=0).

• The numeric variables between and including V1 and V3 are recoded: original values 0 and 1 are switched respectively to 1 and 0; 2 and 3 are changed to −1; 9 remains 9; and any other value is changed to the system-missing value.

• Variable QVAR is also recoded: original values 1 through 5 are changed to 1; 6 through 10 are changed to 2; 11 through the highest value in the data are changed to 3; and any other value, including system-missing, is changed to 0.

Recoding String Variables

RECODE STRNGVAR ('A','B','C'='A')('D','E','F'='B')(ELSE=' ').
RECODE PET ('IGUANA', 'SNAKE ' = 'WILD  ').

• Values A, B, and C are changed to value A. Values D, E, and F are changed to value B. All other values are changed to a blank.

• Values IGUANA and SNAKE are changed to value WILD. The defined width of the variable PET is 6. Thus, values SNAKE and WILD include trailing blanks for a total of six characters. If blanks are not specified, the values are right-padded. In this example, the results will be the same.

• Each string value is enclosed within quotes.

Related Topics

RECODE
Overview (RECODE command)
Syntax Rules (RECODE command)
Operations (RECODE command)
INTO Keyword (RECODE command)
CONVERT Keyword (RECODE command)


INTO Keyword (RECODE command)

INTO (keyword),INTO (keyword),INTO (keyword)
RECODE command,RECODE command,RECODE command
RECODE (command),RECODE (command),RECODE (command)
target variable,target variable,target variable
recoding values,recoding values,recoding values
target variable,target variable,target variable

INTO specifies a target variable to receive recoded values from the original, or source, variable. Source variables remain unchanged after being recoded.

• INTO must follow the value specifications for the source variables that are being recoded into the target variables.

• The number of target variables must equal the number of source variables.

Related Topics

RECODE
Overview (RECODE command)
Syntax Rules (RECODE command)
Operations (RECODE command)
Examples (RECODE command)
CONVERT Keyword (RECODE command)
Numeric Variables (RECODE command)
String Variables (RECODE command)


Numeric Variables (RECODE command)

• Target variables can be existing or new variables. For existing variables, cases with values not mentioned in the value specifications are not changed. For new variables, cases with values not mentioned are assigned the system-missing value.

• New numeric variables have default print and write formats of F8.2 (or the format specified on SET FORMAT).

Recoding a Single Variable Into a Target Variable

RECODE AGE (MISSING=9) (18 THRU HI=1) (0 THRU 18=0) INTO VOTER.

• The recoded AGE values are stored in target variable VOTER, leaving AGE unchanged.

• Value 18 and higher values are changed to value 1. Values between 0 and 18, but not including 18, are recoded to 0. If the specification 0 THRU 18 preceded the specification 18 THRU HI, value 18 would be recoded to 0.

Recording Multiple Variables Into Target Variables

RECODE V1 TO V3 (0=1) (1=0) (2=-1) INTO DEFENSE WELFARE HEALTH.

• Values for V1 through V3 are recoded and stored in DEFENSE, WELFARE, and HEALTH. V1, V2, and V3 are not changed.

Related Topics

INTO Keyword (RECODE command)
String Variables (RECODE command)


String Variables (RECODE command)

• Target variables must already exist. To create a new string variable, declare the variable with the STRING command before specifying it on RECODE.

• The new string values cannot be longer than the defined width of the target variable.

• If the new values are shorter than the defined width of the target variable, the values are right-padded with blanks.

• Multiple target variables are allowed. The target variables must all be the same defined width; the source variables can have different widths.

• If the source and target variables have different widths, the criterion for the width of the original values is the width defined for the source variable; the criterion for the width of the recoded values is the width defined for the target variable.

Using Keyword COPY With Target Variables

STRING STATE1 (A2).
RECODE STATE ('IO'='IA') (ELSE=COPY) INTO STATE1.

• STRING declares the variable STATE1 so that it can be used as a target variable on RECODE.

• RECODE specifies STATE as the source variable and STATE1 as the target variable. The original value IO is recoded to IA. The keywords ELSE and COPY copy all other state codes over unchanged. Thus, STATE and STATE1 are identical except for cases with the original value IO.

Recoding a String Variable Into a Numeric Target

RECODE SEX ('M'=1) ('F'=2) INTO NSEX.

• RECODE recodes the string variable SEX into the numeric variable NSEX. Any value other than M or F becomes system-missing.

• The program can process a large number of cases more efficiently with the numeric variable NSEX than it can with the string variable SEX.

Related Topics

INTO Keyword (RECODE command)
Numeric Variables (RECODE command)


CONVERT Keyword (RECODE command)

CONVERT (keyword),CONVERT (keyword),CONVERT (keyword)
RECODE command,RECODE command,RECODE command
data transformations,data transformations,data transformations
converting strings to numeric,converting strings to numeric,converting strings to numeric
recoding values,recoding values,recoding values
converting strings to numeric,converting strings to numeric,converting strings to numeric

CONVERT recodes the string representation of numbers to their numeric representation.

• If the keyword CONVERT precedes the value specifications, cases with numbers are recoded immediately and blanks are recoded to the system-missing value, even if you specifically recode blanks into a value.

• To recode blanks to a value other than system-missing or to recode a string value to a noncorresponding numeric value (for example, ‘0’ to 10), you must specify a recode specification before the keyword CONVERT.

• RECODE converts numbers as if the variable were being reread using the F format.

• If RECODE encounters a value that cannot be converted, it scans the remaining value specifications. If there is no specific recode specification for that value, the target variable will be system-missing for that case.

Examples

RECODE #JOB (CONVERT) ('-'=11) ('&'=12) INTO JOB.

• RECODE first recodes all numbers in the string variable #JOB to numbers. The target variable is JOB.

• RECODE then specifically recodes the minus sign (the “eleven” punch) to 11 and the ampersand (or “twelve” punch in EBCDIC) to 12. The keyword CONVERT is specified first as an efficiency measure to recode cases with numbers immediately. Blanks are recoded to the system-missing value.

RECODE #JOB (' '=-99) (CONVERT) ('-'=11) ('&'=12) INTO JOB.

• The result is the same as in the above example except that blanks are changed to −99.

Related Topics

RECODE
Overview (RECODE command)
Syntax Rules (RECODE command)
Operations (RECODE command)
Examples (RECODE command)
INTO Keyword (RECODE command)


RECORD TYPE

records,records,records
defining,defining,defining
records,records,records
types,types,types
variables,variables,variables
defining,defining,defining
raw data files,raw data files,raw data files
variable definition,variable definition,variable definition
complex data files,complex data files,complex data files
defining,defining,defining
complex data files,complex data files,complex data files
data files,data files,data files
complex,complex,complex
data records,data records,data records
defining,defining,defining
RECORD TYPE (command),RECORD TYPE (command),RECORD TYPE (command)
RECORD TYPE (command),RECORD TYPE (command),RECORD TYPE (command)
syntax chart,syntax chart,syntax chart

For mixed file types:

RECORD TYPE {value list} [SKIP]
            {OTHER     }

For grouped file types:

RECORD TYPE {value list} [SKIP] [CASE=col loc]
            {OTHER     }

 [DUPLICATE={WARN  }] [MISSING={WARN  }]
            {NOWARN}           {NOWARN}

For nested file types:

RECORD TYPE {value list} [SKIP] [CASE=col loc]
            {OTHER     }

 [SPREAD={YES}] [MISSING={WARN  }]
         {NO }           {NOWARN}

Example

FILE TYPE  MIXED RECORD=RECID 1-2.
RECORD TYPE 23.
DATA LIST   /SEX 5 AGE 6-7 DOSAGE 8-10 RESULT 12.
END FILE TYPE.

Related Topics

Overview (RECORD TYPE command)
Examples (RECORD TYPE command)
OTHER Keyword (RECORD TYPE command)
SKIP Subcommand (RECORD TYPE command)
CASE Subcommand (RECORD TYPE command)
MISSING Subcommand (RECORD TYPE command)
DUPLICATE Subcommand (RECORD TYPE command)
SPREAD Subcommand (RECORD TYPE command)


Overview (RECORD TYPE command)

RECORD TYPE (command),RECORD TYPE (command),RECORD TYPE (command)
with FILE TYPE command,with FILE TYPE command,with FILE TYPE command
FILE TYPE (command),FILE TYPE (command),FILE TYPE (command)
with RECORD TYPE command,with RECORD TYPE command,with RECORD TYPE command
DATA LIST (command),DATA LIST (command),DATA LIST (command)
with RECORD TYPE command,with RECORD TYPE command,with RECORD TYPE command
RECORD TYPE (command),RECORD TYPE (command),RECORD TYPE (command)
with DATA LIST command,with DATA LIST command,with DATA LIST command
mixed files,mixed files,mixed files
complex data files,complex data files,complex data files
mixed files,mixed files,mixed files
data files,data files,data files
mixed,mixed,mixed
data files,data files,data files
nested,nested,nested
nested files,nested files,nested files
complex data files,complex data files,complex data files
nested files,nested files,nested files
data files,data files,data files
grouped,grouped,grouped
grouped files,grouped files,grouped files
complex data files,complex data files,complex data files
grouped files,grouped files,grouped files
repeating data groups,repeating data groups,repeating data groups
data files,data files,data files
repeating data groups,repeating data groups,repeating data groups
complex data files,complex data files,complex data files
repeating groups,repeating groups,repeating groups

RECORD TYPE is used with DATA LIST within a FILE TYPE—END FILE TYPE structure to define any one of the three types of complex raw data files: mixed files, which contain several types of records that define different types of cases; hierarchical or nested files, which contain several types of records with a defined relationship among the record types; or grouped files, which contain several records for each case with some records missing or duplicated (see FILE TYPE for more complete information). A fourth type of complex file, files with repeating groups of information, can be read with the REPEATING DATA command. REPEATING DATA can also be used to read mixed files and the lowest level of nested files.

Each type of complex file has varying types of records. One set of RECORD TYPE and DATA LIST commands is used to define each type of record in the data. The specifications available for RECORD TYPE vary according to whether MIXED, GROUPED, or NESTED is specified on FILE TYPE.

Basic Specification Collapse Hide details

Basic Specification

For each record type being defined, the basic specification is the value of the record type variable defined on the RECORD subcommand on FILE TYPE.

• RECORD TYPE must be followed by a DATA LIST command defining the variables for the specified records, unless SKIP is used.

• One pair of RECORD TYPE and DATA LIST commands must be used for each defined record type.

Syntax Rules Collapse Hide details

Syntax Rules

• A list of values can be specified if a set of different record types has the same variable definitions. Each value must be separated by a space or comma.

• String values must be enclosed in quotes.

• For mixed files, each DATA LIST can specify variables with the same variable name, since each record type defines a separate case. For grouped and nested files, the variable names on each DATA LIST must be unique, since a case is built by combining all record types together onto a single record.

• For mixed files, if the same variable is defined for more than one record type, the format type and width of the variable should be the same on all DATA LIST commands. The program refers to the first DATA LIST command that defines a variable for the print and write formats to include in the dictionary of the active dataset.

• For nested files, the order of the RECORD TYPE commands defines the hierarchical structure of the file. The first RECORD TYPE defines the highest-level record type, the next RECORD TYPE defines the next highest-level record, and so forth. The last RECORD TYPE command defines a case in the active dataset.

Operations Collapse Hide details

Operations

• If a record type is specified on more than one RECORD TYPE command, the program uses the DATA LIST command associated with the first specification and ignores all others.

• For NESTED files, the first record in the file should be the type specified on the first RECORD TYPE command—the highest-level record of the hierarchy. If the first record in the file is not the highest-level type, the program skips all records until it encounters a record of the highest-level type. If the MISSING or DUPLICATE subcommands have been specified on the FILE TYPE command, these records may produce warning messages but will not be used to build a case in the active dataset.

Related Topics

RECORD TYPE
Examples (RECORD TYPE command)
OTHER Keyword (RECORD TYPE command)
SKIP Subcommand (RECORD TYPE command)
CASE Subcommand (RECORD TYPE command)
MISSING Subcommand (RECORD TYPE command)
DUPLICATE Subcommand (RECORD TYPE command)
SPREAD Subcommand (RECORD TYPE command)


Examples (RECORD TYPE command)

Reading a Single Record Type From a Mixed File

FILE TYPE  MIXED RECORD=RECID 1-2.
RECORD TYPE 23.
DATA LIST   /SEX 5 AGE 6-7 DOSAGE 8-10 RESULT 12.
END FILE TYPE.

BEGIN DATA
21  145010 1
22  257200 2
25  235  250  2
35  167          300    3
24  125150 1
23  272075 1
21  149050 2
25  134  035  3
30  138          300    3
32  229          500    3
END DATA.

• FILE TYPE begins the file definition, and END FILE TYPE indicates the end of file definition. FILE TYPE specifies a mixed file type. Since the data are included between BEGIN DATA—END DATA, the FILE subcommand is omitted. The record identification variable RECID is located in columns 1 and 2.

• RECORD TYPE indicates that records with value 23 for variable RECID will be copied into the active dataset. All other records are skipped. The program does not issue a warning when it skips records in mixed files.

• DATA LIST defines variables on records with the value 23 for variable RECID.

Reading Multiple Record Types From a Mixed File

FILE TYPE  MIXED FILE=TREATMNT RECORD=RECID 1-2.
+ RECORD TYPE 21,22,23,24.
+ DATA LIST   /SEX 5 AGE 6-7 DOSAGE 8-10 RESULT 12.
+ RECORD TYPE 25.
+ DATA LIST   /SEX 5 AGE 6-7 DOSAGE 10-12 RESULT 15.
END FILE TYPE.

• Variable DOSAGE is read from columns 8–10 for record types 21, 22, 23, and 24 and from columns 10–12 for record type 25. RESULT is read from column 12 for record types 21, 22, 23, and 24 and from column 15 for record type 25.

• The active dataset contains values for all variables defined on the DATA LIST commands for record types 21 through 25. All other record types are skipped.

Working With Nested Files

* A nested file of accident records.

FILE TYPE NESTED RECORD=6 CASE=ACCID 1-4.
RECORD TYPE 1.
DATA LIST /ACC_ID 9-11 WEATHER 12-13 STATE 15-16 (A) DATE 18-24 (A).
RECORD TYPE 2.
DATA LIST /STYLE 11 MAKE 13 OLD 14 LICENSE 15-16(A) INSURNCE 18-21 (A).
RECORD TYPE 3.
DATA LIST /PSNGR_NO 11 AGE 13-14 SEX 16 (A) INJURY 18 SEAT 20-21 (A)
           COST 23-24.
END FILE TYPE.

BEGIN DATA
0001 1  322 1 IL 3/13/88   /* Type 1:  accident record
0001 2    1 44MI 134M      /* Type 2:    vehicle record
0001 3    1 34 M 1 FR  3   /* Type 3:      person record
0001 2    2 16IL 322F      /*            vehicle record
0001 3    1 22 F 1 FR 11   /*              person record
0001 3    2 35 M 1 FR  5   /*              person record
0001 3    3 59 M 1 BK  7   /*              person record
0001 2    3 21IN 146M      /*            vehicle record
0001 3    1 46 M 0 FR  0   /*              person record
END DATA.

• FILE TYPE specifies a nested file type. The record identifier, located in column 6, is not assigned a variable name, so the default scratch variable name ####RECD is used. The case identification variable ACCID is located in columns 1–4.

• Because there are three record types, there are three RECORD TYPE commands. For each RECORD TYPE, there is a DATA LIST command to define variables on that record type. The order of the RECORD TYPE commands defines the hierarchical structure of the file.

• END FILE TYPE signals the end of file definition.

• The program builds a case for each lowest-level (type 3) record, representing each person in the file. There can be only one type 1 record for each type 2 record, and one type 2 record for each type 3 record. Each vehicle can be in only one accident, and each person can be in only one vehicle. The variables from the type 1 and type 2 records are spread to their corresponding type 3 records.

Related Topics

RECORD TYPE
Overview (RECORD TYPE command)
OTHER Keyword (RECORD TYPE command)
SKIP Subcommand (RECORD TYPE command)
CASE Subcommand (RECORD TYPE command)
MISSING Subcommand (RECORD TYPE command)
DUPLICATE Subcommand (RECORD TYPE command)
SPREAD Subcommand (RECORD TYPE command)


OTHER Keyword (RECORD TYPE command)

OTHER (keyword),OTHER (keyword),OTHER (keyword)
RECORD TYPE command,RECORD TYPE command,RECORD TYPE command
complex data files,complex data files,complex data files
undefined records,undefined records,undefined records

OTHER specifies all record types that have not been mentioned on previous RECORD TYPE commands.

• OTHER can be specified only on the last RECORD TYPE command in the file definition.

• OTHER can be used with SKIP to skip all undefined record types.

• For nested files, OTHER can be used only with SKIP. Neither can be used separately.

• If WILD=WARN is in effect for the FILE TYPE command, OTHER cannot be specified on the RECORD TYPE command.

Using Keyword OTHER With a Mixed File

FILE TYPE  MIXED FILE=TREATMNT RECORD=RECID 1-2.
RECORD TYPE 21,22,23,24.
DATA LIST   /SEX 5 AGE 6-7 DOSAGE 8-10 RESULT 12.
RECORD TYPE 25.
DATA LIST   /SEX 5 AGE 6-7 DOSAGE 10-12 RESULT 15.
RECORD TYPE OTHER.
DATA LIST   /SEX 5 AGE 6-7 DOSAGE 18-20 RESULT 25.
END FILE TYPE.

• The first two RECORD TYPE commands specify record types 21–25. All other record types are specified by the third RECORD TYPE.

Using Keyword OTHER With a Nested File

FILE TYPE NESTED FILE=ACCIDENT RECORD=#RECID 6 CASE=ACCID 1-4.
RECORD TYPE 1.        /* Accident record
DATA LIST   /WEATHER 12-13.
RECORD TYPE 2.        /* Vehicle record
DATA LIST /STYLE 16.
RECORD TYPE OTHER SKIP.
END FILE TYPE.

• The third RECORD TYPE specifies OTHER SKIP. Type 2 records are therefore the lowest-level records included in the active dataset. These commands build one case for each vehicle record. The person records are skipped.

• Because the data are in a nested file, OTHER can be specified only with SKIP.

Related Topics

RECORD TYPE
Overview (RECORD TYPE command)
Examples (RECORD TYPE command)
SKIP Subcommand (RECORD TYPE command)
CASE Subcommand (RECORD TYPE command)
MISSING Subcommand (RECORD TYPE command)
DUPLICATE Subcommand (RECORD TYPE command)
SPREAD Subcommand (RECORD TYPE command)


SKIP Subcommand (RECORD TYPE command)

RECORD TYPE (command),RECORD TYPE (command),RECORD TYPE (command)
SKIP subcommand,SKIP subcommand,SKIP subcommand
SKIP (subcommand),SKIP (subcommand),SKIP (subcommand)
RECORD TYPE command,RECORD TYPE command,RECORD TYPE command
complex data files,complex data files,complex data files
skipping records,skipping records,skipping records
records,records,records
skipping,skipping,skipping

SKIP specifies record types to skip.

• To skip selected record types, specify the values for the types you want to skip and then specify SKIP. To skip all record types other than those specified on previous RECORD TYPE commands, specify OTHER and then SKIP.

• For nested files, SKIP can be used only with OTHER. Neither can be used separately.

• For grouped files, OTHER cannot be specified on SKIP if WILD=WARN (the default) is in effect for FILE TYPE.

• For mixed files, all record types that are not specified on a RECORD TYPE command are skipped by default. No warning is issued (WILD=NOWARN on FILE TYPE is the default for mixed files).

• For grouped files, a warning message is issued by default for all record types not specified on a RECORD TYPE command (WILD=WARN on FILE TYPE is the default for grouped files). If the record types are explicitly specified on SKIP, no warning is issued.

Examples

FILE TYPE GROUPED FILE=HUBDATA RECORD=#RECID 80 CASE=ID 1-5
                               WILD=NOWARN.
RECORD TYPE 1.
DATA LIST   /MOHIRED YRHIRED 12-15 DEPT79 TO DEPT82 SEX 16-20.
RECORD TYPE OTHER SKIP.
END FILE TYPE.

• The program reads variables from type 1 records and skips all other types.

• WILD=NOWARN on the FILE TYPE command suppresses the warning messages that is issued by default for undefined record types for grouped files. Keyword OTHER cannot be used when the default WILD=WARN specification is in effect.

FILE TYPE GROUPED FILE=HUBDATA RECORD=#RECID 80 CASE=ID 1-5.
RECORD TYPE 1.
DATA LIST   /MOHIRED YRHIRED 12-15 DEPT79 TO DEPT82 SEX 16-20.
RECORD TYPE 2,3 SKIP.
END FILE TYPE.

• Record type 1 is defined for each case, and record types 2 and 3 are skipped.

• WILD=WARN (the default) on FILE TYPE GROUPED is in effect. The program therefore issues a warning message for any record types it encounters other than types 1, 2, and 3. No warning is issued for record types 2 and 3 because they are explicitly specified on a RECORD TYPE command.

Related Topics

RECORD TYPE
Overview (RECORD TYPE command)
Examples (RECORD TYPE command)
OTHER Keyword (RECORD TYPE command)
CASE Subcommand (RECORD TYPE command)
MISSING Subcommand (RECORD TYPE command)
DUPLICATE Subcommand (RECORD TYPE command)
SPREAD Subcommand (RECORD TYPE command)


CASE Subcommand (RECORD TYPE command)

RECORD TYPE (command),RECORD TYPE (command),RECORD TYPE (command)
CASE subcommand,CASE subcommand,CASE subcommand
CASE (subcommand),CASE (subcommand),CASE (subcommand)
RECORD TYPE command,RECORD TYPE command,RECORD TYPE command
case identification variable,case identification variable,case identification variable
complex data files,complex data files,complex data files
case identification variable,case identification variable,case identification variable

CASE specifies the column locations of the case identification variable when that variable is not in the location defined by the CASE subcommand on FILE TYPE.

• CASE on RECORD TYPE applies only to those records specified by that RECORD TYPE command. The identifier for record types without CASE on RECORD TYPE must be in the location specified by CASE on FILE TYPE.

• CASE can be used for nested and grouped files only. CASE cannot be used for mixed files.

• CASE can be used on RECORD TYPE only if a CASE subcommand is specified on FILE TYPE.

• The format type of the case identification variable must be the same on all records, and the same format must be assigned on the RECORD TYPE and FILE TYPE commands. For example, if the case identification variable is defined as a string on FILE TYPE, it cannot be defined as a numeric variable on RECORD TYPE.

Example

* Specifying case on the record type command for a grouped file.

FILE TYPE GROUPED FILE=HUBDATA RECORD=#RECID 80 CASE=ID 1-5.
RECORD TYPE 1.
DATA LIST   /MOHIRED YRHIRED 12-15 DEPT79 TO DEPT82 SEX 16-20.
RECORD TYPE 2.
DATA LIST   /SALARY79 TO SALARY82 6-25
             HOURLY81 HOURLY82 40-53 (2)
             PROMO81 72  AGE 54-55 RAISE82 66-70.
RECORD TYPE 3  CASE=75-79.
DATA LIST   /JOBCAT 6 NAME 25-48 (A).
END FILE TYPE.

• CASE on FILE TYPE indicates that the case identification variable is located in columns 1–5. On the third RECORD TYPE command, the CASE subcommand overrides the identifier location for type 3 records. For type 3 records, the case identification variable is located in columns 75–79.

Related Topics

RECORD TYPE
Overview (RECORD TYPE command)
Examples (RECORD TYPE command)
OTHER Keyword (RECORD TYPE command)
SKIP Subcommand (RECORD TYPE command)
MISSING Subcommand (RECORD TYPE command)
DUPLICATE Subcommand (RECORD TYPE command)
SPREAD Subcommand (RECORD TYPE command)


MISSING Subcommand (RECORD TYPE command)

records,records,records
missing,missing,missing
RECORD TYPE (command),RECORD TYPE (command),RECORD TYPE (command)
MISSING subcommand,MISSING subcommand,MISSING subcommand
MISSING (subcommand),MISSING (subcommand),MISSING (subcommand)
RECORD TYPE command,RECORD TYPE command,RECORD TYPE command
complex data files,complex data files,complex data files
missing records,missing records,missing records

MISSING controls whether the program issues a warning when it encounters a missing record type for a case. Regardless of whether the program issues the warning, it builds the case in the active dataset with system-missing values for the variables defined on the missing record.

• The only specification is a single keyword. NOWARN is the default for nested files. WARN is the default for grouped files. MISSING cannot be used with MIXED files.

• MISSING on RECORD TYPE applies only to those records specified by that RECORD TYPE command. The treatment of missing records for record types without the MISSING specification on RECORD TYPE is determined by the MISSING subcommand on FILE TYPE.

• For grouped files, the program checks whether there is a record for each case identification number. For nested files, the program verifies that each defined case includes one record of each type.

WARN (keyword),WARN (keyword),WARN (keyword)
RECORD TYPE command,RECORD TYPE command,RECORD TYPE command
NOWARN (keyword),NOWARN (keyword),NOWARN (keyword)
RECORD TYPE command,RECORD TYPE command,RECORD TYPE command
WARN | Issue a warning message when a record type is missing for a case. This is the default for grouped files.
NOWARN | Suppress the warning message when a record type is missing for a case. This is the default for nested files.

Example

FILE TYPE GROUPED FILE=HUBDATA RECORD=#RECID 80 CASE=ID 1-5.
RECORD TYPE 1.
DATA LIST   /MOHIRED YRHIRED 12-15 DEPT79 TO DEPT82 SEX 16-20.
RECORD TYPE 2  MISSING=NOWARN.
DATA LIST   /SALARY79 TO SALARY82 6-25
  HOURLY81 HOURLY82 40-53 (2) PROMO81 72 AGE 54-55 RAISE82 66-70.
RECORD TYPE 3.
DATA LIST   /JOBCAT 6 NAME 25-48 (A).
END FILE TYPE.

• MISSING is not specified on FILE TYPE. Therefore the default MISSING=WARN is in effect for all record types.

• MISSING=NOWARN is specified on the second RECORD TYPE, overriding the default setting for type 2 records. WARN is still in effect for type 1 and type 3 records.

Related Topics

RECORD TYPE
Overview (RECORD TYPE command)
Examples (RECORD TYPE command)
OTHER Keyword (RECORD TYPE command)
SKIP Subcommand (RECORD TYPE command)
CASE Subcommand (RECORD TYPE command)
DUPLICATE Subcommand (RECORD TYPE command)
SPREAD Subcommand (RECORD TYPE command)


DUPLICATE Subcommand (RECORD TYPE command)

records,records,records
duplicate,duplicate,duplicate
RECORD TYPE (command),RECORD TYPE (command),RECORD TYPE (command)
DUPLICATE subcommand,DUPLICATE subcommand,DUPLICATE subcommand
DUPLICATE (subcommand),DUPLICATE (subcommand),DUPLICATE (subcommand)
RECORD TYPE command,RECORD TYPE command,RECORD TYPE command
complex data files,complex data files,complex data files
duplicate records,duplicate records,duplicate records

DUPLICATE controls whether the program issues a warning when it encounters more than one record of each type for a single case.

• DUPLICATE on RECORD TYPE can be used for grouped files only. DUPLICATE cannot be used for mixed or nested files.

• The only specification is a single keyword. WARN is the default.

• DUPLICATE on RECORD TYPE applies only to those records specified by that RECORD TYPE command. The treatment of duplicate records for record types without DUPLICATE specification is determined by the DUPLICATE subcommand on FILE TYPE.

• Regardless of the specification on DUPLICATE, only the last record from a set of duplicates is included in the active dataset.

WARN | Issue a warning message. The program issues a message and the first 80 characters of the last record of the duplicate set of record types. This is the default.
NOWARN | Suppress the warning message.

Example

* Specifying DUPLICATE on RECORD TYPE for a grouped file.

FILE TYPE GROUPED FILE=HUBDATA RECORD=#RECID 80 CASE=ID 1-5.
RECORD TYPE 1.
DATA LIST   /MOHIRED YRHIRED 12-15 DEPT79 TO DEPT82 SEX 16-20.
RECORD TYPE 2  DUPLICATE=NOWARN.
DATA LIST   /SALARY79 TO SALARY82 6-25
  HOURLY81 HOURLY82 40-53 (2) PROMO81 72  AGE 54-55 RAISE82 66-70.
RECORD TYPE 3.
DATA LIST   /JOBCAT 6 NAME 25-48 (A).
END FILE TYPE.

• DUPLICATE is not specified on FILE TYPE. Therefore the default DUPLICATE=WARN is in effect for all record types.

• DUPLICATE=NOWARN is specified on the second RECORD TYPE, overriding the FILE TYPE setting for type 2 records. WARN is still in effect for type 1 and type 3 records.

Related Topics

RECORD TYPE
Overview (RECORD TYPE command)
Examples (RECORD TYPE command)
OTHER Keyword (RECORD TYPE command)
SKIP Subcommand (RECORD TYPE command)
CASE Subcommand (RECORD TYPE command)
MISSING Subcommand (RECORD TYPE command)
SPREAD Subcommand (RECORD TYPE command)


SPREAD Subcommand (RECORD TYPE command)

complex data files,complex data files,complex data files
spreading values across cases,spreading values across cases,spreading values across cases
RECORD TYPE (command),RECORD TYPE (command),RECORD TYPE (command)
SPREAD subcommand,SPREAD subcommand,SPREAD subcommand
SPREAD (subcommand),SPREAD (subcommand),SPREAD (subcommand)
RECORD TYPE command,RECORD TYPE command,RECORD TYPE command

SPREAD controls whether the values for variables defined for a record type are spread to all related cases.

• SPREAD can be used for nested files only. SPREAD cannot be used for mixed or grouped files.

• The only specification is a single keyword. YES is the default.

• SPREAD=NO applies only to the record type specified on that RECORD TYPE command. The default YES is in effect for all other defined record types.

YES | Spread the values from the specified record type to all related cases. This is the default.
NO | Spread the values from the specified type only to the first related case. All other cases built from the same record are assigned the system-missing value for the variables defined on the record type.

Example

* A nested file.

FILE TYPE NESTED RECORD=#RECID 6 CASE=ACCID 1-4.
RECORD TYPE 1.
DATA LIST   /ACC_NO 9-11 WEATHER 12-13
             STATE 15-16 (A) DATE 18-24 (A).
RECORD TYPE 2  SPREAD=NO.
DATA LIST /STYLE 11 MAKE 13 OLD 14
           LICENSE 15-16 (A) INSURNCE 18-21 (A).
RECORD TYPE 3.
DATA LIST /PSNGR_NO 11 AGE 13-14 SEX 16 (A)
       INJURY 18 SEAT 20-21 (A) COST 23-24.
END FILE TYPE.

BEGIN DATA
0001 1  322 1 IL 3/13/88   /* Type 1:  accident record
0001 2    1 44MI 134M      /* Type 2:    vehicle record
0001 3    1 34 M 1 FR  3   /* Type 3:       person record
0001 2    2 16IL 322F      /*            vehicle record
0001 3    1 22 F 1 FR 11   /*               person record
0001 3    2 35 M 1 FR  5   /*               person record
0001 3    3 59 M 1 BK  7   /*               person record
0001 2    3 21IN 146M      /*            vehicle record
0001 3    1 46 M 0 FR  0   /*               person record
END DATA.

• The accident record (type 1) is spread to all related cases (in this example, all cases).

• The first vehicle record has one related person record. The values for STYLE, MAKE, OLD, LICENSE, and INSURNCE are spread to the case built for the person record.

• The second vehicle record has three related person records. The values for STYLE, MAKE, OLD, LICENSE, and INSURNCE are spread only to the case built from the first person record. The other two cases have the system-missing values for STYLE, MAKE, OLD, LICENSE, and INSURNCE.

• The third vehicle record has one related person record, and the values for type 2 records are spread to that case.

Related Topics

RECORD TYPE
Overview (RECORD TYPE command)
Examples (RECORD TYPE command)
OTHER Keyword (RECORD TYPE command)
SKIP Subcommand (RECORD TYPE command)
CASE Subcommand (RECORD TYPE command)
MISSING Subcommand (RECORD TYPE command)
DUPLICATE Subcommand (RECORD TYPE command)


REFORMAT

This command is no longer supported.


REGRESSION

Linear Regression,Linear Regression,Linear Regression
command syntax,command syntax,command syntax
REGRESSION (command),REGRESSION (command),REGRESSION (command)
REGRESSION (command),REGRESSION (command),REGRESSION (command)
syntax chart,syntax chart,syntax chart
release history,release history,release history

REGRESSION is available in the Statistics Base option.

REGRESSION [MATRIX=[IN({file})]  [OUT({file})]]
                       {*   }         {*   }

  [/VARIABLES={varlist    }]
              {(COLLECT)**}
              {ALL        }

  [/DESCRIPTIVES=[DEFAULTS] [MEAN] [STDDEV] [CORR] [COV]
                 [VARIANCE] [XPROD] [SIG] [N] [BADCORR]
                 [ALL] [NONE**]]

  [/SELECT={varname relation value}

  [/MISSING=[{LISTWISE**      }] [INCLUDE]]
             {PAIRWISE        }
             {MEANSUBSTITUTION}

  [/REGWGT=varname]

  [/STATISTICS=[DEFAULTS**] [R**] [COEFF**] [ANOVA**] [OUTS**]
               [ZPP] [LABEL] [CHANGE] [CI({95   })] [F] [BCOV] [SES]
                                       {value}
               [XTX] [COLLIN] [TOL] [SELECTION] [ALL]]

  [/CRITERIA=[DEFAULTS**] [TOLERANCE({0.0001**})] [MAXSTEPS(n)]
                                     {value   }

             [PIN[({0.05**})]] [POUT[({0.10**})]]
                   {value }           {value }

             [FIN[({3.84 })]] [FOUT[({2.71 })]]
                   {value}           {value}

             [CIN[({ 95**})]]]
                   {value}

 [/{NOORIGIN**}]
   {ORIGIN    }

  /DEPENDENT=varlist

  [/METHOD=]{STEPWISE [varlist]   } [...] [/...]
            {FORWARD [varlist]    }
            {BACKWARD [varlist]   }
            {ENTER [varlist]      }
            {REMOVE varlist       }
            {TEST(varlist)(varlist)...}

 [/RESIDUALS=[DEFAULTS] [DURBIN] [OUTLIERS({ZRESID  })] [ID (varname)]
                                           {tempvars}

       [NORMPROB({ZRESID  })] [HISTOGRAM({ZRESID  })]
                 {tempvars}              {tempvars}

       [SIZE({SEPARATE}]
             {POOLED  }

 [/CASEWISE=[DEFAULTS]  [{OUTLIERS({3    })}] [PLOT({ZRESID })]
                         {         {value} }        {tempvar}
                         {ALL              }

       [{DEPENDENT PRED RESID}]]
        {tempvars            }

 [/SCATTERPLOT [varname,varname]...[

 [/PARTIALPLOT=[{ALL    }]
                {varlist}

 [/OUTFILE={COVB ('savfile'|'dataset')}]  [{MODEL('file')    }]
           {CORB ('savfile'|'dataset')}    {PARAMETER('file')}

 [/SAVE=tempvar[(newname)]  [tempvar[(newname)]...]  [FITS]]

**Default if the subcommand is omitted.

Temporary residual variables are:

PRED, ADJPRED, SRESID, MAHAL, RESID, ZPRED, SDRESID, COOK, DRESID, ZRESID, SEPRED, LEVER, DFBETA, SDBETA, DFFIT, SDFFIT, COVRATIO, MCIN, ICIN

SAVE FITS saves:

DFFIT, SDFIT, DFBETA, SDBETA, COVRATIO

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See REGRESSION Algorithms for computational details for this procedure.

Syntax for the REGRESSION command can be generated from the Linear Regression dialog box.

Release History Collapse Hide details

Release History

Release 13.0

• PARAMETER keyword introduced on OUTFILE subcommand.

Release 16.0

• Added support for SET THREADS and SET MCACHE.

Release 17.0

• Added option to specify confidence level on CI keyword of STATISTICS subcommand.

Example

REGRESSION VARIABLES=POP15,POP75,INCOME,GROWTH,SAVINGS
 /DEPENDENT=SAVINGS
 /METHOD=ENTER POP15,POP75,INCOME
 /METHOD=ENTER GROWTH.

Related Topics

Overview (REGRESSION command)
Examples (REGRESSION command)
VARIABLES Subcommand (REGRESSION command)
DEPENDENT Subcommand (REGRESSION command)
METHOD Subcommand (REGRESSION command)
STATISTICS Subcommand (REGRESSION command)
CRITERIA Subcommand (REGRESSION command)
ORIGIN and NOORIGIN Subcommands (REGRESSION command)
REGWGT Subcommand (REGRESSION command)
DESCRIPTIVES Subcommand (REGRESSION command)
SELECT Subcommand (REGRESSION command)
MATRIX Subcommand (REGRESSION command)
MISSING Subcommand (REGRESSION command)
References (REGRESSION command)


Overview (REGRESSION command)

REGRESSION calculates multiple regression equations and associated statistics and plots. REGRESSION also calculates collinearity diagnostics, predicted values, residuals, measures of fit and influence, and several statistics based on these measures.

Options Collapse Hide details

Options

Input and Output Control Subcommands. DESCRIPTIVES requests descriptive statistics on the variables in the analysis. SELECT estimates the model based on a subset of cases. REGWGT specifies a weight variable for estimating weighted least-squares models. MISSING specifies the treatment of cases with missing values. MATRIX reads and writes matrix data files.

Equation-Control Subcommands. These optional subcommands control the calculation and display of statistics for each equation. STATISTICS controls the statistics displayed for the equation(s) and the independent variable(s), CRITERIA specifies the criteria used by the variable selection method, and ORIGIN specifies whether regression is through the origin.

Analysis of Residuals, Fit, and Influence. REGRESSION creates temporary variables containing predicted values, residuals, measures of fit and influence, and several statistics based on these measures. These temporary variables can be analyzed within REGRESSION in Casewise Diagnostics tables (CASEWISE subcommand), scatterplots (SCATTERPLOT subcommand), histograms and normal probability plots (RESIDUALS subcommand), and partial regression plots (PARTIALPLOT subcommand). Any of the residuals subcommands can be specified to obtain descriptive statistics for the predicted values, residuals, and their standardized versions. Any of the temporary variables can be added to the active dataset with the SAVE subcommand.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is DEPENDENT, which initiates the equation(s) and defines at least one dependent variable, followed by METHOD, which specifies the method for selecting independent variables.

• By default, all variables named on DEPENDENT and METHOD are used in the analysis.

• The default display for each equation includes a Model Summary table showing R2, an ANOVA table, a Coefficients table displaying related statistics for variables in the equation, and an Excluded Variables table displaying related statistics for variables not yet in the equation.

• By default, all cases in the active dataset with valid values for all selected variables are used to compute the correlation matrix on which the regression equations are based. The default equations include a constant (intercept).

• All residuals analysis subcommands are optional. Most have defaults that can be requested by including the subcommand without any further specifications. These defaults are described in the discussion of each subcommand below.

Subcommand Order Collapse Hide details

Subcommand Order

The standard subcommand order for REGRESSION is

REGRESSION MATRIX=...
   /VARIABLES=...
   /DESCRIPTIVES=...
   /SELECT=...
   /MISSING=...
   /REGWGT=...

             --Equation Block--
   /STATISTICS=...
   /CRITERIA=...
   /ORIGIN
   /DEPENDENT=...

             --Method Block(s)--
   /METHOD=...
   [/METHOD=...]

             --Residuals Block--
   /RESIDUALS=...
   /SAVE=...
   /CASEWISE=...
   /SCATTERPLOT=...
   /PARTIALPLOT=...
   /OUTFILE=...

• When used, MATRIX must be specified first.

• Subcommands listed before the equation block must be specified before any subcommands within the block.

• Only one equation block is allowed per REGRESSION command.

• An equation block can contain multiple METHOD subcommands. These methods are applied, one after the other, to the estimation of the equation for that block.

• The STATISTICS, CRITERIA, and ORIGIN/NOORIGIN subcommands must precede the DEPENDENT subcommand.

• The residuals subcommands RESIDUALS, CASEWISE, SCATTERPLOT, and PARTIALPLOT follow the last METHOD subcommand of any equation for which residuals analysis is requested. Statistics are based on this final equation.

• Residuals subcommands can be specified in any order. All residuals subcommands must follow the DEPENDENT and METHOD subcommands.

Syntax Rules Collapse Hide details

Syntax Rules

• VARIABLES can be specified only once. If omitted, VARIABLES defaults to COLLECT.

• The DEPENDENT subcommand can be specified only once and must be followed immediately by one or more METHOD subcommands.

• CRITERIA, STATISTICS, and ORIGIN must be specified before DEPENDENT and METHOD. If any of these subcommands are specified more than once, only the last specified is in effect for all subsequent equations.

• More than one variable can be specified on the DEPENDENT subcommand. An equation is estimated for each.

• If no variables are specified on METHOD, all variables named on VARIABLES but not on DEPENDENT are considered for selection.

Operations Collapse Hide details

Operations

• This procedure uses the multithreaded options specified by SET THREADS and SET MCACHE.

PRED (keyword),PRED (keyword),PRED (keyword)
REGRESSION command,REGRESSION command,REGRESSION command
RESID (keyword),RESID (keyword),RESID (keyword)
REGRESSION command,REGRESSION command,REGRESSION command
DRESID (keyword),DRESID (keyword),DRESID (keyword)
REGRESSION command,REGRESSION command,REGRESSION command
ADJPRED (keyword),ADJPRED (keyword),ADJPRED (keyword)
REGRESSION command,REGRESSION command,REGRESSION command
ZPRED (keyword),ZPRED (keyword),ZPRED (keyword)
REGRESSION command,REGRESSION command,REGRESSION command
ZRESID (keyword),ZRESID (keyword),ZRESID (keyword)
REGRESSION command,REGRESSION command,REGRESSION command
SRESID (keyword),SRESID (keyword),SRESID (keyword)
REGRESSION command,REGRESSION command,REGRESSION command
SDRESID (keyword),SDRESID (keyword),SDRESID (keyword)
REGRESSION command,REGRESSION command,REGRESSION command
SEPRED (keyword),SEPRED (keyword),SEPRED (keyword)
REGRESSION command,REGRESSION command,REGRESSION command
MAHAL (keyword),MAHAL (keyword),MAHAL (keyword)
REGRESSION command,REGRESSION command,REGRESSION command
Mahalanobis distance,Mahalanobis distance,Mahalanobis distance
REGRESSION command,REGRESSION command,REGRESSION command
COOK (keyword),COOK (keyword),COOK (keyword)
REGRESSION command,REGRESSION command,REGRESSION command
Cook's distance,Cook's distance,Cook's distance
REGRESSION command,REGRESSION command,REGRESSION command
LEVER (keyword),LEVER (keyword),LEVER (keyword)
REGRESSION command,REGRESSION command,REGRESSION command
leverage values,leverage values,leverage values
REGRESSION command,REGRESSION command,REGRESSION command
DFBETA (keyword),DFBETA (keyword),DFBETA (keyword)
REGRESSION command,REGRESSION command,REGRESSION command
DfBeta,DfBeta,DfBeta
REGRESSION command,REGRESSION command,REGRESSION command
SDBETA (keyword),SDBETA (keyword),SDBETA (keyword)
REGRESSION command,REGRESSION command,REGRESSION command
DFFIT (keyword),DFFIT (keyword),DFFIT (keyword)
REGRESSION command,REGRESSION command,REGRESSION command
DfFit,DfFit,DfFit
REGRESSION command,REGRESSION command,REGRESSION command
SDFIT (keyword),SDFIT (keyword),SDFIT (keyword)
REGRESSION command,REGRESSION command,REGRESSION command
COVRATIO (keyword),COVRATIO (keyword),COVRATIO (keyword)
REGRESSION command,REGRESSION command,REGRESSION command
covariance ratio,covariance ratio,covariance ratio
REGRESSION command,REGRESSION command,REGRESSION command
MCIN (keyword),MCIN (keyword),MCIN (keyword)
REGRESSION command,REGRESSION command,REGRESSION command
confidence intervals,confidence intervals,confidence intervals
REGRESSION command,REGRESSION command,REGRESSION command
ICIN (keyword),ICIN (keyword),ICIN (keyword)
REGRESSION command,REGRESSION command,REGRESSION command
Operations Collapse Hide details

Operations

• REGRESSION calculates a correlation matrix that includes all variables named on VARIABLES. All equations requested on the REGRESSION command are calculated from the same correlation matrix.

• The MISSING, DESCRIPTIVES, and SELECT subcommands control the calculation of the correlation matrix and associated displays.

• If multiple METHOD subcommands are specified, they operate in sequence on the equations defined by the preceding DEPENDENT subcommand.

• Only independent variables that pass the tolerance criterion are candidates for entry into the equation. See the topic CRITERIA Subcommand (REGRESSION command) for more information.

• The temporary variables PRED (unstandardized predicted value), ZPRED (standardized predicted value), RESID (unstandardized residual), and ZRESID (standardized residual) are calculated and descriptive statistics are displayed whenever any residuals subcommand is specified. If any of the other temporary variables are referred to on the command, they are also calculated.

• Predicted values and statistics based on predicted values are calculated for every observation that has valid values for all variables in the equation. Residuals and statistics based on residuals are calculated for all observations that have a valid predicted value and a valid value for the dependent variable. The missing-values option therefore affects the calculation of residuals and predicted values.

• No residuals or predictors are generated for cases deleted from the active dataset with SELECT IF, a temporary SELECT IF, or SAMPLE.

• All variables are standardized before plotting. If the unstandardized version of a variable is requested, the standardized version is plotted.

• Residuals processing is not available when the active dataset is a matrix file or is replaced by a matrix file with MATRIX OUT(*) on REGRESSION. If RESIDUALS, CASEWISE, SCATTERPLOT, PARTIALPLOT, or SAVE are used when MATRIX IN(*) or MATRIX OUT(*) is specified, the REGRESSION command is not executed.

For each analysis, REGRESSION can calculate the following types of temporary variables:

PRED | Unstandardized predicted values.
RESID | Unstandardized residuals.
DRESID | Deleted residuals.
ADJPRED | Adjusted predicted values.
ZPRED | Standardized predicted values.
ZRESID | Standardized residuals.
SRESID | Studentized residuals.
SDRESID | Studentized deleted residuals. (Hoaglin and Welsch, 1978)
SEPRED | Standard errors of the predicted values.
MAHAL | Mahalanobis distances.
COOK | Cook’s distances. (Cook, 1977)
LEVER | Centered leverage values. (Velleman and Welsch, 1981)
DFBETA | Change in the regression coefficient that results from the deletion of the ith case. A DFBETA value is computed for each case for each regression coefficient generated by a model. (Belsley, Kuh, and Welsch, 1980)
SDBETA | Standardized DFBETA. An SDBETA value is computed for each case for each regression coefficient generated by a model. (Belsley et al., 1980)
DFFIT | Change in the predicted value when the ith case is deleted.(Belsley et al., 1980)
SDFIT | Standardized DFFIT.(Belsley et al., 1980)
COVRATIO | Ratio of the determinant of the covariance matrix with the ith case deleted to the determinant of the covariance matrix with all cases included. (Belsley et al., 1980)
MCIN | Lower and upper bounds for the prediction interval of the mean predicted response. A lowerbound LMCIN and an upperbound UMCIN are generated. The default confidence interval is 95%. The confidence interval can be reset with the CIN subcommand. (Dillon and Goldstein, 1984)
ICIN | Lower and upper bounds for the prediction interval for a single observation. A lowerbound LICIN and an upperbound UICIN are generated. The default confidence interval is 95%. The confidence interval can be reset with the CIN subcommand. (Dillon and Goldstein, 1984)

Related Topics

REGRESSION
Examples (REGRESSION command)
VARIABLES Subcommand (REGRESSION command)
DEPENDENT Subcommand (REGRESSION command)
METHOD Subcommand (REGRESSION command)
STATISTICS Subcommand (REGRESSION command)
CRITERIA Subcommand (REGRESSION command)
ORIGIN and NOORIGIN Subcommands (REGRESSION command)
REGWGT Subcommand (REGRESSION command)
DESCRIPTIVES Subcommand (REGRESSION command)
SELECT Subcommand (REGRESSION command)
MATRIX Subcommand (REGRESSION command)
MISSING Subcommand (REGRESSION command)
References (REGRESSION command)


Examples (REGRESSION command)

Multiple METHOD subcommands

REGRESSION VARIABLES=POP15,POP75,INCOME,GROWTH,SAVINGS
 /DEPENDENT=SAVINGS
 /METHOD=ENTER POP15,POP75,INCOME
 /METHOD=ENTER GROWTH.

• VARIABLES calculates a correlation matrix of five variables for use by REGRESSION.

• DEPENDENT defines a single equation, with SAVINGS as the dependent variable.

• The first METHOD subcommand enters POP15, POP75, and INCOME into the equation.

• The second METHOD subcommand adds GROWTH to the equation containing POP15 to INCOME.

Specifying Residual Output

REGRESSION
  /MISSING LISTWISE
  /DESCRIPTIVES MEAN STDDEV
  /STATISTICS COEFF R ANOVA
  /CRITERIA=PIN(.05) POUT(.10)
  /NOORIGIN
  /DEPENDENT time
  /METHOD=ENTER diam
  /PARTIALPLOT ALL
  /SCATTERPLOT=(*SDRESID ,*ZPRED )
  /RESIDUALS HIST(ZRESID) NORM(ZRESID) ID( type )
  /CASEWISE PLOT(ZRESID) OUTLIERS(2)
  /SAVE ZPRED ZRESID COOK LEVER .

• The procedure creates a model for time using diam as a predictor.

• RESIDUALS requests a histogram and normal probability plot of the standardized residuals. Cases are labeled by values of type. Because residuals processing has been requested, statistics for predicted values, residuals, and standardized versions of predicted values and residuals are displayed in a Residuals Statistics table.

• CASEWISE requests a Casewise Diagnostics table for cases whose absolute value of ZRESID is greater than 2. Values of the studentized residual are listed for each case.

• SCATTERPLOT requests a plot of the standardized predicted value and the studentized residual.

• PARTIALPLOT requests partial regression plots for all independent variables.

• SAVE adds the standardized predicted value, standardized residual, Cook's distance, and leverage to the active dataset as new variables.

• All other options are set to their default values.

For discussion of output from this syntax and to place the example in context, see Using Linear Regression to Predict Polishing Times.

Diagnosing multicollinearity

REGRESSION
  /MISSING LISTWISE
  /STATISTICS COEFF R ANOVA COLLIN ZPP TOL
  /CRITERIA=PIN(.05) POUT(.10)
  /NOORIGIN
  /DEPENDENT lnsales
  /METHOD=ENTER type price engine_s horsepow wheelbas width length curb_wgt
  fuel_cap mpg .

• The procedure creates a model for lnsales using type, price, engine_s, horespow, wheelbas, width, length, curb_wgt, fuel_cap, and mpg as predictors.

• STATISTICS requests coefficient estimates, multiple R statistics, an ANOVA table, collinearity diagnostics, part and partial correlations, and tolerance.

• All other options are set to their default values.

For discussion of output from this syntax and to place the example in context, see Using Linear Regression to Model Vehicle Sales.

Stepwise regression

REGRESSION
  /MISSING LISTWISE
  /STATISTICS COEFF OUTS R ANOVA COLLIN
  /CRITERIA=PIN(.05) POUT(.10)
  /NOORIGIN
  /DEPENDENT lnsales
  /METHOD=STEPWISE ztype zprice zengine_ zhorsepo zwheelba zwidth zlength
  zcurb_wg zfuel_ca zmpg
  /SCATTERPLOT=(*SDRESID ,*ZPRED )
  /RESIDUALS HIST(ZRESID) ID( model )
  /CASEWISE PLOT(ZRESID) OUTLIERS(2.0)
  /SAVE ZPRED ZRESID COOK LEVER .

• The procedure creates a model for lnsales using ztype, zprice, zengine_, zhorespo, zwheelba, zwidth, zlength, zcurb_wg, zfuel_ca, and zmpg as predictors.

• METHOD specifies that predictors should be added to the model using stepwise selection.

• RESIDUALS requests a histogram and normal probability plot of the standardized residuals. Cases are labeled by values of model. Because residuals processing has been requested, statistics for predicted values, residuals, and standardized versions of predicted values and residuals are displayed in a Residuals Statistics table.

• CASEWISE requests a Casewise Diagnostics table for cases whose absolute value of ZRESID is greater than 2. Values of the standardized residual are listed for each case.

• SCATTERPLOT requests a plot of the standardized predicted value and the studentized residual.

• PARTIALPLOT requests partial regression plots for all independent variables.

• SAVE adds the standardized predicted value, standardized residual, Cook's distance, and leverage to the active dataset as new variables.

• All other options are set to their default values.

For discussion of output from this syntax and to place the example in context, see Running a Stepwise Linear Regression.

Related Topics

REGRESSION
Overview (REGRESSION command)
VARIABLES Subcommand (REGRESSION command)
DEPENDENT Subcommand (REGRESSION command)
METHOD Subcommand (REGRESSION command)
STATISTICS Subcommand (REGRESSION command)
CRITERIA Subcommand (REGRESSION command)
ORIGIN and NOORIGIN Subcommands (REGRESSION command)
REGWGT Subcommand (REGRESSION command)
DESCRIPTIVES Subcommand (REGRESSION command)
SELECT Subcommand (REGRESSION command)
MATRIX Subcommand (REGRESSION command)
MISSING Subcommand (REGRESSION command)
References (REGRESSION command)


VARIABLES Subcommand (REGRESSION command)

REGRESSION (command),REGRESSION (command),REGRESSION (command)
VARIABLES subcommand,VARIABLES subcommand,VARIABLES subcommand
VARIABLES (subcommand),VARIABLES (subcommand),VARIABLES (subcommand)
REGRESSION command,REGRESSION command,REGRESSION command

VARIABLES names all the variables to be used in the analysis.

• The minimum specification is a list of two variables or the keyword ALL or COLLECT. COLLECT, which must be specified in parentheses, is the default.

• Only one VARIABLES subcommand is allowed, and it must precede any DEPENDENT or METHOD subcommands.

TO (keyword),TO (keyword),TO (keyword)
REGRESSION command,REGRESSION command,REGRESSION command

• You can use keyword TO to refer to consecutive variables in the active dataset.

COLLECT (keyword),COLLECT (keyword),COLLECT (keyword)
REGRESSION command,REGRESSION command,REGRESSION command

• The order of variables in the correlation matrix constructed by REGRESSION is the same as their order on VARIABLES. If (COLLECT) is used, the order of variables in the correlation matrix is the order in which they are first listed on the DEPENDENT and METHOD subcommands.

ALL | Include all user-defined variables in the active dataset.
(COLLECT) | Include all variables named on the DEPENDENT and METHOD subcommands. COLLECT is the default if the VARIABLES subcommand is omitted. COLLECT must be specified in parentheses. If COLLECT is used, the METHOD subcommands must specify variable lists.

Example

REGRESSION VARIABLES=(COLLECT)
 /DEPENDENT=SAVINGS
 /METHOD=STEP POP15 POP75 INCOME
 /METHOD=ENTER GROWTH.

• COLLECT requests that the correlation matrix include SAVINGS, POP15, POP75, INCOME, and GROWTH. Since COLLECT is the default, the VARIABLES subcommand could have been omitted.

• The DEPENDENT subcommand defines a single equation in which SAVINGS is the dependent variable.

• The first METHOD subcommand requests that the block of variables POP15, POP75, and INCOME be considered for inclusion using a stepwise procedure.

• The second METHOD subcommand adds variable GROWTH to the equation.

Related Topics

REGRESSION
Overview (REGRESSION command)
Examples (REGRESSION command)
DEPENDENT Subcommand (REGRESSION command)
METHOD Subcommand (REGRESSION command)
STATISTICS Subcommand (REGRESSION command)
CRITERIA Subcommand (REGRESSION command)
ORIGIN and NOORIGIN Subcommands (REGRESSION command)
REGWGT Subcommand (REGRESSION command)
DESCRIPTIVES Subcommand (REGRESSION command)
SELECT Subcommand (REGRESSION command)
MATRIX Subcommand (REGRESSION command)
MISSING Subcommand (REGRESSION command)
References (REGRESSION command)


DEPENDENT Subcommand (REGRESSION command)

REGRESSION (command),REGRESSION (command),REGRESSION (command)
dependent variable,dependent variable,dependent variable

DEPENDENT specifies a list of variables and requests that an equation be built for each. DEPENDENT is required.

• The minimum specification is a single variable. There is no default variable list.

• Only one DEPENDENT subcommand can be specified. It must be followed by at least one METHOD subcommand.

• Keyword TO on a DEPENDENT subcommand refers to the order in which variables are specified on the VARIABLES subcommand. If VARIABLES=(COLLECT), TO refers to the order of variables in the active dataset.

• If DEPENDENT names more than one variable, an equation is built for each using the same independent variables and methods.

Related Topics

REGRESSION
Overview (REGRESSION command)
Examples (REGRESSION command)
VARIABLES Subcommand (REGRESSION command)
METHOD Subcommand (REGRESSION command)
STATISTICS Subcommand (REGRESSION command)
CRITERIA Subcommand (REGRESSION command)
ORIGIN and NOORIGIN Subcommands (REGRESSION command)
REGWGT Subcommand (REGRESSION command)
DESCRIPTIVES Subcommand (REGRESSION command)
SELECT Subcommand (REGRESSION command)
MATRIX Subcommand (REGRESSION command)
MISSING Subcommand (REGRESSION command)
References (REGRESSION command)


METHOD Subcommand (REGRESSION command)

REGRESSION (command),REGRESSION (command),REGRESSION (command)
variable selection,variable selection,variable selection
REGRESSION (command),REGRESSION (command),REGRESSION (command)
METHOD subcommand,METHOD subcommand,METHOD subcommand
METHOD (subcommand),METHOD (subcommand),METHOD (subcommand)
REGRESSION command,REGRESSION command,REGRESSION command
REGRESSION (command),REGRESSION (command),REGRESSION (command)
variable selection methods,variable selection methods,variable selection methods

METHOD specifies a variable selection method and names a block of variables to be evaluated using that method. METHOD is required.

• The minimum specification is a method keyword and, for some methods, a list of variables. The actual keyword METHOD can be omitted.

• When more than one METHOD subcommand is specified, each METHOD subcommand is applied to the equation that resulted from the previous METHOD subcommands.

• The default variable list for methods FORWARD, BACKWARD, STEPWISE, and ENTER consists of all variables named on VARIABLES that are not named on the DEPENDENT subcommand. If VARIABLES=(COLLECT), the variables must be specified for these methods.

• There is no default variable list for the REMOVE and TEST methods.

TO (keyword),TO (keyword),TO (keyword)
REGRESSION command,REGRESSION command,REGRESSION command

• Keyword TO in a variable list on METHOD refers to the order in which variables are specified on the VARIABLES subcommand. If VARIABLES=(COLLECT), TO refers to the order of variables in the active dataset.

The available stepwise methods are as follows:

BACKWARD (keyword),BACKWARD (keyword),BACKWARD (keyword)
REGRESSION command,REGRESSION command,REGRESSION command
backward elimination,backward elimination,backward elimination
REGRESSION command,REGRESSION command,REGRESSION command
FORWARD (keyword),FORWARD (keyword),FORWARD (keyword)
REGRESSION command,REGRESSION command,REGRESSION command
forward entry,forward entry,forward entry
REGRESSION command,REGRESSION command,REGRESSION command
STEPWISE (keyword),STEPWISE (keyword),STEPWISE (keyword)
REGRESSION command,REGRESSION command,REGRESSION command
stepwise selection,stepwise selection,stepwise selection
REGRESSION command,REGRESSION command,REGRESSION command
BACKWARD [varlist] | Backward elimination. Variables in the block are considered for removal. At each step, the variable with the largest probability-of-F value is removed, provided that the value is larger than POUT. See the topic CRITERIA Subcommand (REGRESSION command) for more information. If no variables are in the equation when BACKWARD is specified, all independent variables in the block are first entered.
FORWARD [varlist] | Forward entry. Variables in the block are added to the equation one at a time. At each step, the variable not in the equation with the smallest probability of F is entered if the value is smaller than PIN. See the topic CRITERIA Subcommand (REGRESSION command) for more information.
STEPWISE [varlist] | Stepwise selection. If there are independent variables already in the equation, the variable with the largest probability of F is removed if the value is larger than POUT. The equation is recomputed without the variable and the process is repeated until no more independent variables can be removed. Then, the independent variable not in the equation with the smallest probability of F is entered if the value is smaller than PIN. All variables in the equation are again examined for removal. This process continues until no variables in the equation can be removed and no variables not in the equation are eligible for entry, or until the maximum number of steps has been reached. See the topic CRITERIA Subcommand (REGRESSION command) for more information.

The methods that enter or remove the entire variable block in a single step are as follows:

ENTER (keyword),ENTER (keyword),ENTER (keyword)
REGRESSION command,REGRESSION command,REGRESSION command
forced-entry method,forced-entry method,forced-entry method
REGRESSION command,REGRESSION command,REGRESSION command
REMOVE (keyword),REMOVE (keyword),REMOVE (keyword)
REGRESSION command,REGRESSION command,REGRESSION command
forced removal,forced removal,forced removal
REGRESSION command,REGRESSION command,REGRESSION command
TEST (keyword),TEST (keyword),TEST (keyword)
REGRESSION command,REGRESSION command,REGRESSION command
ENTER [varlist] | Forced entry. All variables specified are entered in a single step in order of decreasing tolerance. You can control the order in which variables are entered by specifying the variables on multiple METHOD=ENTER subcommands.
REMOVE varlist | Forced removal. All variables specified are removed in a single step. REMOVE requires a variable list.
TEST (varlist) (varlist) | R2 change and its significance for sets of independent variables. This method first adds all variables specified on TEST to the current equation. It then removes in turn each subset from the equation and displays requested statistics. Specify test subsets in parentheses. A variable can be used in more than one subset, and each subset can include any number of variables. Variables named on TEST remain in the equation when the method is completed.

Example

REGRESSION VARIABLES=POP15 TO GROWTH, SAVINGS
 /DEPENDENT=SAVINGS
 /METHOD=STEPWISE
 /METHOD=ENTER.

• STEPWISE applies the stepwise procedure to variables POP15 to GROWTH.

• All variables not in the equation when the STEPWISE method is completed will be forced into the equation with ENTER.

Example

REGRESSION VARIABLES=(COLLECT)
 /DEPENDENT=SAVINGS
 /METHOD=TEST(MEASURE3 TO MEASURE9)(MEASURE3,INCOME)
 /METHOD=ENTER GROWTH.

• The VARIABLES=(COLLECT) specification assembles a correlation matrix that includes all variables named on the DEPENDENT and METHOD subcommands.

• REGRESSION first builds the full equation of all the variables named on the first METHOD subcommand: SAVINGS regressed on MEASURE3 to MEASURE9 and INCOME. For each set of test variables (MEASURE3 to MEASURE9, and MEASURE3 and INCOME), the R2 change, F, probability, sums of squares, and degrees of freedom are displayed.

• GROWTH is added to the equation by the second METHOD subcommand. Variables MEASURE3 to MEASURE9 and INCOME are still in the equation when this subcommand is executed.

Related Topics

REGRESSION
Overview (REGRESSION command)
Examples (REGRESSION command)
VARIABLES Subcommand (REGRESSION command)
DEPENDENT Subcommand (REGRESSION command)
STATISTICS Subcommand (REGRESSION command)
CRITERIA Subcommand (REGRESSION command)
ORIGIN and NOORIGIN Subcommands (REGRESSION command)
REGWGT Subcommand (REGRESSION command)
DESCRIPTIVES Subcommand (REGRESSION command)
SELECT Subcommand (REGRESSION command)
MATRIX Subcommand (REGRESSION command)
MISSING Subcommand (REGRESSION command)
References (REGRESSION command)


STATISTICS Subcommand (REGRESSION command)

STATISTICS (subcommand),STATISTICS (subcommand),STATISTICS (subcommand)
REGRESSION command,REGRESSION command,REGRESSION command
REGRESSION (command),REGRESSION (command),REGRESSION (command)
STATISTICS subcommand,STATISTICS subcommand,STATISTICS subcommand
REGRESSION (command),REGRESSION (command),REGRESSION (command)
statistics,statistics,statistics

STATISTICS controls the display of statistics for the equation and for the independent variables.

• If STATISTICS is omitted or if it is specified without keywords, R, ANOVA, COEFF, and OUTS are displayed (see below).

• If any statistics are specified on STATISTICS, only those statistics specifically requested are displayed.

• STATISTICS must be specified before DEPENDENT and METHOD subcommands. The last specified STATISTICS affects all equations.

Related Topics

REGRESSION
Overview (REGRESSION command)
Examples (REGRESSION command)
VARIABLES Subcommand (REGRESSION command)
DEPENDENT Subcommand (REGRESSION command)
METHOD Subcommand (REGRESSION command)
CRITERIA Subcommand (REGRESSION command)
ORIGIN and NOORIGIN Subcommands (REGRESSION command)
REGWGT Subcommand (REGRESSION command)
DESCRIPTIVES Subcommand (REGRESSION command)
SELECT Subcommand (REGRESSION command)
MATRIX Subcommand (REGRESSION command)
MISSING Subcommand (REGRESSION command)
References (REGRESSION command)
Global Statistics (REGRESSION command)
Equation Statistics (REGRESSION command)
Statistics for the Independent Variables (REGRESSION command)


Global Statistics (REGRESSION command)

DEFAULTS | R, ANOVA, COEFF, and OUTS. These are displayed if STATISTICS is omitted or if it is specified without keywords.
ALL | All statistics except F.

Related Topics

STATISTICS Subcommand (REGRESSION command)
Equation Statistics (REGRESSION command)
Statistics for the Independent Variables (REGRESSION command)


Equation Statistics (REGRESSION command)

R (keyword),R (keyword),R (keyword)
REGRESSION command,REGRESSION command,REGRESSION command
R2,R2,R2
REGRESSION command,REGRESSION command,REGRESSION command
multiple R,multiple R,multiple R
REGRESSION command,REGRESSION command,REGRESSION command
F ratio,F ratio,F ratio
REGRESSION command,REGRESSION command,REGRESSION command
ANOVA (keyword),ANOVA (keyword),ANOVA (keyword)
REGRESSION command,REGRESSION command,REGRESSION command
analysis of variance,analysis of variance,analysis of variance
REGRESSION command,REGRESSION command,REGRESSION command
CHANGE (keyword),CHANGE (keyword),CHANGE (keyword)
REGRESSION command,REGRESSION command,REGRESSION command
BCOV (keyword),BCOV (keyword),BCOV (keyword)
REGRESSION command,REGRESSION command,REGRESSION command
variance,variance,variance
REGRESSION command,REGRESSION command,REGRESSION command
covariance,covariance,covariance
REGRESSION command,REGRESSION command,REGRESSION command
XTX (keyword),XTX (keyword),XTX (keyword)
REGRESSION command,REGRESSION command,REGRESSION command
sweep matrix,sweep matrix,sweep matrix
REGRESSION command,REGRESSION command,REGRESSION command
COLLIN (keyword),COLLIN (keyword),COLLIN (keyword)
REGRESSION command,REGRESSION command,REGRESSION command
variance inflation factor,variance inflation factor,variance inflation factor
REGRESSION command,REGRESSION command,REGRESSION command
eigenvalues,eigenvalues,eigenvalues
REGRESSION command,REGRESSION command,REGRESSION command
condition index,condition index,condition index
REGRESSION command,REGRESSION command,REGRESSION command
SELECTION (keyword),SELECTION (keyword),SELECTION (keyword)
REGRESSION command,REGRESSION command,REGRESSION command
Akaike information criterion,Akaike information criterion,Akaike information criterion
REGRESSION command,REGRESSION command,REGRESSION command
Ameniya's prediction criterion,Ameniya's prediction criterion,Ameniya's prediction criterion
REGRESSION command,REGRESSION command,REGRESSION command
Mallow's Cp,Mallow's Cp,Mallow's Cp
REGRESSION command,REGRESSION command,REGRESSION command
Cp. See Mallow's Cp,Cp. See Mallow's Cp,Cp. See Mallow's Cp
Schwarz Bayesian criterion,Schwarz Bayesian criterion,Schwarz Bayesian criterion
REGRESSION command,REGRESSION command,REGRESSION command
R | Multiple R. R includes R 2, adjusted R2, and standard error of the estimate displayed in the Model Summary table.
ANOVA | Analysis of variance table. This option includes regression and residual sums of squares, mean square, F, and probability of F displayed in the ANOVA table.
CHANGE | Change in R2. This option includes the change in R2 between steps, along with the corresponding F and its probability, in the Model Summary table. For each equation, F and its probability are also displayed.
BCOV | Variance-covariance matrix for unstandardized regression coefficients. The statistics are displayed in the Coefficient Correlations table.
XTX | Swept correlation matrix.
COLLIN | Collinearity diagnostics(Belsley et al., 1980). COLLIN includes the variance-inflation factors (VIF) displayed in the Coefficients table, and the eigenvalues of the scaled and uncentered cross-products matrix, condition indexes, and variance-decomposition proportions displayed in the Collinearity Diagnostics table.
SELECTION | Selection statistics. This option includes Akaike information criterion (AIK), Ameniya’s prediction criterion (PC), Mallows conditional mean squared error of prediction criterion (Cp), and Schwarz Bayesian criterion (SBC) (Judge, Griffiths, Hill, Lutkepohl, and Lee, 1980). The statistics are displayed in the Model Summary table.

Related Topics

STATISTICS Subcommand (REGRESSION command)
Global Statistics (REGRESSION command)
Statistics for the Independent Variables (REGRESSION command)


Statistics for the Independent Variables (REGRESSION command)

standard error,standard error,standard error
REGRESSION command,REGRESSION command,REGRESSION command
COEFF (keyword),COEFF (keyword),COEFF (keyword)
REGRESSION command,REGRESSION command,REGRESSION command
regression coefficients,regression coefficients,regression coefficients
REGRESSION command,REGRESSION command,REGRESSION command
OUTS (keyword),OUTS (keyword),OUTS (keyword)
REGRESSION command,REGRESSION command,REGRESSION command
ZPP (keyword),ZPP (keyword),ZPP (keyword)
REGRESSION command,REGRESSION command,REGRESSION command
Partial Correlations,Partial Correlations,Partial Correlations
REGRESSION command,REGRESSION command,REGRESSION command
part correlation,part correlation,part correlation
REGRESSION command,REGRESSION command,REGRESSION command
correlations,correlations,correlations
REGRESSION command,REGRESSION command,REGRESSION command
confidence intervals,confidence intervals,confidence intervals
REGRESSION command,REGRESSION command,REGRESSION command
CI (keyword),CI (keyword),CI (keyword)
REGRESSION command,REGRESSION command,REGRESSION command
standard error,standard error,standard error
REGRESSION command,REGRESSION command,REGRESSION command
SES (keyword),SES (keyword),SES (keyword)
REGRESSION command,REGRESSION command,REGRESSION command
REGRESSION (command),REGRESSION (command),REGRESSION (command)
tolerance,tolerance,tolerance
tolerance,tolerance,tolerance
REGRESSION command,REGRESSION command,REGRESSION command
TOLERANCE (keyword),TOLERANCE (keyword),TOLERANCE (keyword)
REGRESSION command,REGRESSION command,REGRESSION command
F (keyword),F (keyword),F (keyword)
REGRESSION command,REGRESSION command,REGRESSION command
F ratio,F ratio,F ratio
REGRESSION command,REGRESSION command,REGRESSION command
COEFF | Regression coefficients. This option includes regression coefficients (B), standard errors of the coefficients, standardized regression coefficients (beta), t, and two-tailed probability of t. The statistics are displayed in the Coefficients table.
OUTS | Statistics for variables not yet in the equation that have been named on METHOD subcommands for the equation.OUTS displays the Excluded Variables table showing beta, t, two-tailed probability of t, and minimum tolerance of the variable if it were the only variable entered next.
ZPP | Zero-order, part, and partial correlation. The statistics are displayed in the Coefficients table.
CI(value) | value% confidence interval for the unstandardized regression coefficients. The statistics are displayed in the Coefficients table. If the optional value is unspecified, it defaults to 95. If specified, the value must be greater than 0 and less than or equal to 100.
SES | Approximate standard error of the standardized regression coefficients.(Meyer and Younger, 1976) The statistics are displayed in the Coefficients table.
TOL | Tolerance. This option displays tolerance for variables in the equation in the Coefficients table. For variables not yet entered into the equation, TOL displays in the Excluded Variables table the tolerance each variable would have if it were the only variable entered next.
F | F value for B and its probability. This is displayed instead of the t value in the Coefficients or Excluded Variables table.

Related Topics

STATISTICS Subcommand (REGRESSION command)
Global Statistics (REGRESSION command)
Equation Statistics (REGRESSION command)


CRITERIA Subcommand (REGRESSION command)

REGRESSION (command),REGRESSION (command),REGRESSION (command)
model criteria,model criteria,model criteria
CRITERIA (subcommand),CRITERIA (subcommand),CRITERIA (subcommand)
REGRESSION command,REGRESSION command,REGRESSION command
REGRESSION (command),REGRESSION (command),REGRESSION (command)
CRITERIA subcommand,CRITERIA subcommand,CRITERIA subcommand
REGRESSION (command),REGRESSION (command),REGRESSION (command)
model criteria,model criteria,model criteria

CRITERIA controls the statistical criteria used to build the regression equations. The way in which these criteria are used depends on the method specified on METHOD. The default criteria are noted in the description of each CRITERIA keyword below.

• The minimum specification is a criterion keyword and its arguments, if any.

• If CRITERIA is omitted or included without specifications, the default criteria are in effect.

• The CRITERIA subcommand must be specified before DEPENDENT and METHOD subcommands. The last specified CRITERIA affects all equations.

Related Topics

REGRESSION
Overview (REGRESSION command)
Examples (REGRESSION command)
VARIABLES Subcommand (REGRESSION command)
DEPENDENT Subcommand (REGRESSION command)
METHOD Subcommand (REGRESSION command)
STATISTICS Subcommand (REGRESSION command)
ORIGIN and NOORIGIN Subcommands (REGRESSION command)
REGWGT Subcommand (REGRESSION command)
DESCRIPTIVES Subcommand (REGRESSION command)
SELECT Subcommand (REGRESSION command)
MATRIX Subcommand (REGRESSION command)
MISSING Subcommand (REGRESSION command)
References (REGRESSION command)
Tolerance and Minimum Tolerance Tests (REGRESSION command)
Criteria for Variable Selection (REGRESSION command)
Confidence Intervals (REGRESSION command)


Tolerance and Minimum Tolerance Tests (REGRESSION command)

REGRESSION (command),REGRESSION (command),REGRESSION (command)
tolerance,tolerance,tolerance

Variables must pass both tolerance and minimum tolerance tests in order to enter and remain in a regression equation. Tolerance is the proportion of the variance of a variable in the equation that is not accounted for by other independent variables in the equation. The minimum tolerance of a variable not in the equation is the smallest tolerance any variable already in the equation would have if the variable being considered were included in the analysis.

If a variable passes the tolerance criteria, it is eligible for inclusion based on the method in effect.

Related Topics

CRITERIA Subcommand (REGRESSION command)
Criteria for Variable Selection (REGRESSION command)
Confidence Intervals (REGRESSION command)


Criteria for Variable Selection (REGRESSION command)

REGRESSION (command),REGRESSION (command),REGRESSION (command)
variable selection,variable selection,variable selection

• The ENTER, REMOVE, and TEST methods use only the TOLERANCE criterion.

• BACKWARD removes variables according to the probability of F-to-remove (keyword POUT). Specify FOUT to use F-to-remove instead.

• FORWARD enters variables according to the probability of F-to-enter (keyword PIN). Specify FIN to use F-to-enter instead.

• STEPWISE uses both PIN and POUT (or FIN and FOUT) as criteria. If the criterion for entry (PIN or FIN) is less stringent than the criterion for removal (POUT or FOUT), the same variable can cycle in and out until the maximum number of steps is reached. Therefore, if PIN is larger than POUT or FIN is smaller than FOUT, REGRESSION adjusts POUT or FOUT and issues a warning.

• The values for these criteria are specified in parentheses. If a value is not specified, the default values are used.

PIN (keyword),PIN (keyword),PIN (keyword)
REGRESSION command,REGRESSION command,REGRESSION command
probability of F-to-enter,probability of F-to-enter,probability of F-to-enter
REGRESSION command,REGRESSION command,REGRESSION command
FIN (keyword),FIN (keyword),FIN (keyword)
REGRESSION command,REGRESSION command,REGRESSION command
F-to-enter,F-to-enter,F-to-enter
REGRESSION command,REGRESSION command,REGRESSION command
POUT (keyword),POUT (keyword),POUT (keyword)
REGRESSION command,REGRESSION command,REGRESSION command
probability of F-to-remove,probability of F-to-remove,probability of F-to-remove
REGRESSION command,REGRESSION command,REGRESSION command
FOUT (keyword),FOUT (keyword),FOUT (keyword)
REGRESSION command,REGRESSION command,REGRESSION command
F-to-remove,F-to-remove,F-to-remove
REGRESSION command,REGRESSION command,REGRESSION command
TOLERANCE (keyword),TOLERANCE (keyword),TOLERANCE (keyword)
REGRESSION command,REGRESSION command,REGRESSION command
REGRESSION (command),REGRESSION (command),REGRESSION (command)
tolerance,tolerance,tolerance
tolerance,tolerance,tolerance
REGRESSION command,REGRESSION command,REGRESSION command
MAXSTEPS (keyword),MAXSTEPS (keyword),MAXSTEPS (keyword)
REGRESSION command,REGRESSION command,REGRESSION command
DEFAULTS | PIN(0.05), POUT(0.10), and TOLERANCE(0.0001). These are the defaults if CRITERIA is omitted. If criteria have been changed, DEFAULTS restores these defaults.
PIN[(value)] | Probability of F-to-enter. The default value is 0.05. Either PIN or FIN can be specified. If more than one is used, the last one specified is in effect.
FIN[(value)] | F-to-enter. The default value is 3.84. Either PIN or FIN can be specified. If more than one is used, the last one specified is in effect.
POUT[(value)] | Probability of F-to-remove. The default value is 0.10. Either POUT or FOUT can be specified. If more than one is used, the last one specified is in effect.
FOUT[(value)] | F-to-remove. The default value is 2.71. Either POUT or FOUT can be specified. If more than one is used, the last one specified is in effect.
TOLERANCE[(value)] | Tolerance. The default value is 0.0001. If the specified tolerance is very low, REGRESSION issues a warning.
MAXSTEPS[(n)] | Maximum number of steps. The value of MAXSTEPS is the sum of the maximum number of steps for each method for the equation. The default values are, for the BACKWARD or FORWARD methods, the number of variables meeting PIN/POUT or FIN/FOUT criteria, and for the STEPWISE method, twice the number of independent variables.

Related Topics

CRITERIA Subcommand (REGRESSION command)
Tolerance and Minimum Tolerance Tests (REGRESSION command)
Confidence Intervals (REGRESSION command)


Confidence Intervals (REGRESSION command)

CIN (keyword),CIN (keyword),CIN (keyword)
REGRESSION command,REGRESSION command,REGRESSION command
confidence intervals,confidence intervals,confidence intervals
REGRESSION command,REGRESSION command,REGRESSION command
CIN[(value)] Reset the value of the percent for confidence intervals. The default is 95%. The specified value sets the percentage interval used in the computation of temporary variable types MCIN and ICIN.

Example

REGRESSION VARIABLES=POP15 TO GROWTH, SAVINGS
 /CRITERIA=PIN(.1) POUT(.15)
 /DEPENDENT=SAVINGS
 /METHOD=FORWARD.

• The CRITERIA subcommand relaxes the default criteria for entry and removal for the FORWARD method. Note that the specified PIN is less than POUT.

Related Topics

CRITERIA Subcommand (REGRESSION command)
Tolerance and Minimum Tolerance Tests (REGRESSION command)
Criteria for Variable Selection (REGRESSION command)


ORIGIN and NOORIGIN Subcommands (REGRESSION command)

REGRESSION (command),REGRESSION (command),REGRESSION (command)
ORIGIN subcommand,ORIGIN subcommand,ORIGIN subcommand
ORIGIN (subcommand),ORIGIN (subcommand),ORIGIN (subcommand)
REGRESSION command,REGRESSION command,REGRESSION command
REGRESSION (command),REGRESSION (command),REGRESSION (command)
NOORIGIN subcommand,NOORIGIN subcommand,NOORIGIN subcommand
NOORIGIN (subcommand),NOORIGIN (subcommand),NOORIGIN (subcommand)
REGRESSION command,REGRESSION command,REGRESSION command
REGRESSION (command),REGRESSION (command),REGRESSION (command)
constant term,constant term,constant term

ORIGIN and NOORIGIN control whether or not the constant is suppressed. By default, the constant is included in the model (NOORIGIN).

• The specification is either the ORIGIN or NOORIGIN subcommand.

• ORIGIN and NOORIGIN must be specified before the DEPENDENT and METHOD subcommands. The last specified remains in effect for all equations.

• ORIGIN requests regression through the origin. The constant term is suppressed.

• If you specify ORIGIN, statistics requested on the DESCRIPTIVES subcommand are computed as if the mean were 0.

• ORIGIN and NOORIGIN affect the way the correlation matrix is built. If matrix materials are used as input to REGRESSION, the keyword that was in effect when the matrix was written should be in effect when that matrix is read.

Example

REGRESSION VAR=(COL)
 /ORIGIN
 /DEP=HOMICIDE
 /METHOD=ENTER POVPCT.

• The REGRESSION command requests an equation that regresses HOMICIDE on POVPCT and suppresses the constant (ORIGIN).

Related Topics

REGRESSION
Overview (REGRESSION command)
Examples (REGRESSION command)
VARIABLES Subcommand (REGRESSION command)
DEPENDENT Subcommand (REGRESSION command)
METHOD Subcommand (REGRESSION command)
STATISTICS Subcommand (REGRESSION command)
CRITERIA Subcommand (REGRESSION command)
REGWGT Subcommand (REGRESSION command)
DESCRIPTIVES Subcommand (REGRESSION command)
SELECT Subcommand (REGRESSION command)
MATRIX Subcommand (REGRESSION command)
MISSING Subcommand (REGRESSION command)
References (REGRESSION command)


REGWGT Subcommand (REGRESSION command)

REGWGT (subcommand),REGWGT (subcommand),REGWGT (subcommand)
REGRESSION command,REGRESSION command,REGRESSION command
REGRESSION (command),REGRESSION (command),REGRESSION (command)
REGWGT subcommand,REGWGT subcommand,REGWGT subcommand
REGRESSION (command),REGRESSION (command),REGRESSION (command)
weighted models,weighted models,weighted models
REGRESSION (command),REGRESSION (command),REGRESSION (command)
weights,weights,weights
weighted least squares,weighted least squares,weighted least squares
REGRESSION command,REGRESSION command,REGRESSION command

The only specification on REGWGT is the name of the variable containing the weights to be used in estimating a weighted least-squares model. With REGWGT, the default display is the usual REGRESSION display.

• REGWGT is a global subcommand.

• If more than one REGWGT subcommand is specified on a REGRESSION procedure, only the last one is in effect.

• REGWGT can be used with MATRIX OUT but not with MATRIX IN.

• Residuals saved from equations using the REGWGT command are not weighted. To obtain weighted residuals, multiply the residuals created with SAVE by the square root of the weighting variable in a COMPUTE statement.

• REGWGT is in effect for all equations and affects the way the correlation matrix is built. Thus, if REGWGT is specified on a REGRESSION procedure that writes matrix materials to a matrix data file, subsequent REGRESSION procedures using that file will be automatically weighted.

Example

REGRESSION VARIABLES=GRADE GPA STARTLEV TREATMNT
 /DEPENDENT=GRADE
 /METHOD=ENTER
 /SAVE PRED(P).
COMPUTE WEIGHT=1/(P*(1-P)).
REGRESSION VAR=GRADE GPA STARTLEV TREATMNT
 /REGWGT=WEIGHT
 /DEP=GRADE
 /METHOD=ENTER.

• VARIABLES builds a correlation matrix that includes GRADE, GPA, STARTLEV, and TREATMNT.

• DEPENDENT identifies GRADE as the dependent variable.

• METHOD regresses GRADE on GPA, STARTLEV, and TREATMNT.

• SAVE saves the predicted values from the regression equation as variable P in the active dataset. See the topic SAVE Subcommand (REGRESSION command) for more information.

• COMPUTE creates the variable WEIGHT as a transformation of P.

• The second REGRESSION procedure performs a weighted regression analysis on the same set of variables using WEIGHT as the weighting variable.

Example

REGRESSION VAR=GRADE GPA STARTLEV TREATMNT
 /REGWGT=WEIGHT
 /DEP=GRADE
 /METHOD=ENTER
 /SAVE RESID(RGRADE).
COMPUTE WRGRADE=RGRADE * SQRT(WEIGHT).

• This example illustrates the use of COMPUTE with SAVE to weight residuals.

• REGRESSION performs a weighted regression analysis of GRADE on GPA, STARTLEV, and TREATMNT, using WEIGHT as the weighting variable.

• SAVE saves the residuals as RGRADE. These residuals are not weighted.

• COMPUTE creates variable WRGRADE, which contains the weighted residuals.

Related Topics

REGRESSION
Overview (REGRESSION command)
Examples (REGRESSION command)
VARIABLES Subcommand (REGRESSION command)
DEPENDENT Subcommand (REGRESSION command)
METHOD Subcommand (REGRESSION command)
STATISTICS Subcommand (REGRESSION command)
CRITERIA Subcommand (REGRESSION command)
ORIGIN and NOORIGIN Subcommands (REGRESSION command)
DESCRIPTIVES Subcommand (REGRESSION command)
SELECT Subcommand (REGRESSION command)
MATRIX Subcommand (REGRESSION command)
MISSING Subcommand (REGRESSION command)
References (REGRESSION command)


DESCRIPTIVES Subcommand (REGRESSION command)

REGRESSION (command),REGRESSION (command),REGRESSION (command)
statistics,statistics,statistics
DESCRIPTIVES (subcommand),DESCRIPTIVES (subcommand),DESCRIPTIVES (subcommand)
REGRESSION command,REGRESSION command,REGRESSION command
REGRESSION (command),REGRESSION (command),REGRESSION (command)
DESCRIPTIVES subcommand,DESCRIPTIVES subcommand,DESCRIPTIVES subcommand

DESCRIPTIVES requests the display of correlations and descriptive statistics. By default, descriptive statistics are not displayed.

• The minimum specification is simply the subcommand keyword DESCRIPTIVES, which obtains MEAN, STDDEV, and CORR.

• If DESCRIPTIVES is specified with keywords, only those statistics specifically requested are displayed.

• Descriptive statistics are displayed only once for all variables named or implied on VARIABLES.

• Descriptive statistics are based on all valid cases for each variable if PAIRWISE or MEANSUBSTITUTION has been specified on MISSING. Otherwise, only cases with valid values for all variables named or implied on the VARIABLES subcommand are included in the calculation of descriptive statistics.

• If regression through the origin has been requested (subcommand ORIGIN), statistics are computed as if the mean were 0.

MEAN (keyword),MEAN (keyword),MEAN (keyword)
REGRESSION command,REGRESSION command,REGRESSION command
mean,mean,mean
REGRESSION command,REGRESSION command,REGRESSION command
STDDEV (keyword),STDDEV (keyword),STDDEV (keyword)
REGRESSION command,REGRESSION command,REGRESSION command
standard deviation,standard deviation,standard deviation
REGRESSION command,REGRESSION command,REGRESSION command
VARIANCE (keyword),VARIANCE (keyword),VARIANCE (keyword)
REGRESSION command,REGRESSION command,REGRESSION command
variance,variance,variance
REGRESSION command,REGRESSION command,REGRESSION command
CORRELATION (keyword),CORRELATION (keyword),CORRELATION (keyword)
REGRESSION command,REGRESSION command,REGRESSION command
correlations,correlations,correlations
REGRESSION command,REGRESSION command,REGRESSION command
SIG (keyword),SIG (keyword),SIG (keyword)
REGRESSION command,REGRESSION command,REGRESSION command
significance level,significance level,significance level
REGRESSION command,REGRESSION command,REGRESSION command
BADCORR (keyword),BADCORR (keyword),BADCORR (keyword)
REGRESSION command,REGRESSION command,REGRESSION command
COV (keyword),COV (keyword),COV (keyword)
REGRESSION command,REGRESSION command,REGRESSION command
covariance,covariance,covariance
REGRESSION command,REGRESSION command,REGRESSION command
XPROD (keyword),XPROD (keyword),XPROD (keyword)
REGRESSION command,REGRESSION command,REGRESSION command
cross-product deviation,cross-product deviation,cross-product deviation
REGRESSION command,REGRESSION command,REGRESSION command
N (keyword),N (keyword),N (keyword)
REGRESSION command,REGRESSION command,REGRESSION command
observed count,observed count,observed count
REGRESSION command,REGRESSION command,REGRESSION command
NONE | No descriptive statistics. This is the default if the subcommand is omitted.
DEFAULTS | MEAN, STDDEV, and CORR. This is the same as specifying DESCRIPTIVES without specifications.
MEAN | Display variable means in the Descriptive Statistics table.
STDDEV | Display variable standard deviations in the Descriptive Statistics table.
VARIANCE | Display variable variances in the Descriptive Statistics table.
CORR | Display Pearson correlation coefficients in the Correlations table.
SIG | Display one-tailed probabilities of the correlation coefficients in the Correlations table.
BADCORR | Display the correlation coefficients only if some coefficients cannot be computed.
COV | Display covariance in the Correlations table.
XPROD | Display sum of squares and cross-product deviations from the mean in the Correlations table.
N | Display numbers of cases used to compute correlation coefficients in the Correlations table.
ALL | All descriptive statistics.

Example

REGRESSION DESCRIPTIVES=DEFAULTS SIG COV
 /VARIABLES=AGE,FEMALE,YRS_JOB,STARTPAY,SALARY
 /DEPENDENT=SALARY
 /METHOD=ENTER STARTPAY
 /METHOD=ENTER YRS_JOB.

• The variable means, standard deviations, and number of cases are displayed in the Descriptive Statistics table and the correlation coefficients, one-tailed probabilities of the correlation coefficients, and covariance are displayed in the Correlations table.

• Statistics are displayed for all variables named on VARIABLES, even though only variables SALARY, STARTPAY, and YRS_JOB are used to build the equations.

• STARTPAY is entered into the equation by the first METHOD subcommand. YRS_JOB is entered by the second METHOD subcommand.

Related Topics

REGRESSION
Overview (REGRESSION command)
Examples (REGRESSION command)
VARIABLES Subcommand (REGRESSION command)
DEPENDENT Subcommand (REGRESSION command)
METHOD Subcommand (REGRESSION command)
STATISTICS Subcommand (REGRESSION command)
CRITERIA Subcommand (REGRESSION command)
ORIGIN and NOORIGIN Subcommands (REGRESSION command)
REGWGT Subcommand (REGRESSION command)
SELECT Subcommand (REGRESSION command)
MATRIX Subcommand (REGRESSION command)
MISSING Subcommand (REGRESSION command)
References (REGRESSION command)


SELECT Subcommand (REGRESSION command)

REGRESSION (command),REGRESSION (command),REGRESSION (command)
case selection,case selection,case selection
SELECT (subcommand),SELECT (subcommand),SELECT (subcommand)
REGRESSION command,REGRESSION command,REGRESSION command
REGRESSION (command),REGRESSION (command),REGRESSION (command)
SELECT subcommand,SELECT subcommand,SELECT subcommand
REGRESSION (command),REGRESSION (command),REGRESSION (command)
case selection,case selection,case selection

By default, all cases in the active dataset are considered for inclusion on REGRESSION. Use SELECT to include a subset of cases in the correlation matrix and resulting regression statistics.

• The required specification on SELECT is a logical expression.

• The syntax for the SELECT subcommand is as follows:

/SELECT=varname relation value

• The variable named on SELECT should not be specified on the VARIABLES subcommand.

• The relation can be EQ, NE, LT, LE, GT, or GE.

• Only cases for which the logical expression on SELECT is true are included in the calculation of the correlation matrix and regression statistics.

• All other cases, including those with missing values for the variable named on SELECT, are not included in the computations.

• If SELECT is specified, residuals and predicted values are calculated and reported separately for both selected and unselected cases by default. See the topic RESIDUALS Subcommand (REGRESSION command) for more information.

REGRESSION (command),REGRESSION (command),REGRESSION (command)
with TEMPORARY command,with TEMPORARY command,with TEMPORARY command
TEMPORARY (command),TEMPORARY (command),TEMPORARY (command)
with REGRESSION command,with REGRESSION command,with REGRESSION command
SAMPLE (command),SAMPLE (command),SAMPLE (command)
with REGRESSION command,with REGRESSION command,with REGRESSION command
REGRESSION (command),REGRESSION (command),REGRESSION (command)
with SAMPLE command,with SAMPLE command,with SAMPLE command
SELECT IF (command),SELECT IF (command),SELECT IF (command)
with REGRESSION command,with REGRESSION command,with REGRESSION command
REGRESSION (command),REGRESSION (command),REGRESSION (command)
with SELECT IF command,with SELECT IF command,with SELECT IF command

• Cases deleted from the active dataset with SELECT IF, a temporary SELECT IF, or SAMPLE are not passed to REGRESSION and are not included among either the selected or unselected cases.

Example

REGRESSION SELECT SEX EQ 'M'
 /VARIABLES=AGE,STARTPAY,YRS_JOB,SALARY
 /DEPENDENT=SALARY
 /METHOD=STEP
 /RESIDUALS=NORMPROB.

• Only cases with the value M for SEX are included in the correlation matrix calculated by REGRESSION.

• Separate normal P_P plots are displayed for cases with SEX equal to M and for other cases. See the topic RESIDUALS Subcommand (REGRESSION command) for more information.

Related Topics

REGRESSION
Overview (REGRESSION command)
Examples (REGRESSION command)
VARIABLES Subcommand (REGRESSION command)
DEPENDENT Subcommand (REGRESSION command)
METHOD Subcommand (REGRESSION command)
STATISTICS Subcommand (REGRESSION command)
CRITERIA Subcommand (REGRESSION command)
ORIGIN and NOORIGIN Subcommands (REGRESSION command)
REGWGT Subcommand (REGRESSION command)
DESCRIPTIVES Subcommand (REGRESSION command)
MATRIX Subcommand (REGRESSION command)
MISSING Subcommand (REGRESSION command)
References (REGRESSION command)


MATRIX Subcommand (REGRESSION command)

REGRESSION (command),REGRESSION (command),REGRESSION (command)
MATRIX subcommand,MATRIX subcommand,MATRIX subcommand
MATRIX (subcommand),MATRIX (subcommand),MATRIX (subcommand)
REGRESSION command,REGRESSION command,REGRESSION command
IN (keyword),IN (keyword),IN (keyword)
REGRESSION command,REGRESSION command,REGRESSION command
OUT (keyword),OUT (keyword),OUT (keyword)
REGRESSION command,REGRESSION command,REGRESSION command
REGRESSION (command),REGRESSION (command),REGRESSION (command)
matrix data,matrix data,matrix data
REGRESSION (command),REGRESSION (command),REGRESSION (command)
matrix output,matrix output,matrix output
REGRESSION (command),REGRESSION (command),REGRESSION (command)
matrix input,matrix input,matrix input
REGRESSION (command),REGRESSION (command),REGRESSION (command)
with CORRELATIONS command,with CORRELATIONS command,with CORRELATIONS command
CORRELATIONS (command),CORRELATIONS (command),CORRELATIONS (command)
with REGRESSION command,with REGRESSION command,with REGRESSION command

MATRIX reads and writes matrix data files. It can read matrix data files or datasets written by previous REGRESSION procedures or data files or datasets written by other procedures such as CORRELATIONS. The matrix materials REGRESSION writes also include the mean, standard deviation, and number of cases used to compute each coefficient. This information immediately precedes the correlation matrix in the matrix file.

• Either IN or OUT and a matrix file or previously declared dataset name in parentheses are required on MATRIX.

• When used, MATRIX must be the first subcommand specified in a REGRESSION procedure.

• ORIGIN and NOORIGIN affect the way the correlation matrix is built. If matrix materials are used as input to REGRESSION, the keyword that was in effect when the matrix was written should be in effect when that matrix is read.

IN (keyword),IN (keyword),IN (keyword)
ONEWAY command,ONEWAY command,ONEWAY command
OUT ('savfile'|'dataset') | Write a matrix data file or dataset. Specify either a filename, a previously declared dataset name, or an asterisk, enclosed in parentheses. Filenames should be enclosed in quotes and are stored in the working directory unless a path is included as part of the file specification. If you specify an asterisk (*), the matrix data file replaces the active dataset. If you specify an asterisk or a dataset name, the file is not stored on disk unless you use SAVE or XSAVE.
IN ('savfile'|'dataset') | Read a matrix data file or dataset. Specify either a filename, dataset name created during the current session, or an asterisk enclosed in parentheses. An asterisk reads the matrix data from the active dataset. Filenames should be enclosed in quotes and are read from the working directory unless a path is included as part of the file specification.

Related Topics

REGRESSION
Overview (REGRESSION command)
Examples (REGRESSION command)
VARIABLES Subcommand (REGRESSION command)
DEPENDENT Subcommand (REGRESSION command)
METHOD Subcommand (REGRESSION command)
STATISTICS Subcommand (REGRESSION command)
CRITERIA Subcommand (REGRESSION command)
ORIGIN and NOORIGIN Subcommands (REGRESSION command)
REGWGT Subcommand (REGRESSION command)
DESCRIPTIVES Subcommand (REGRESSION command)
SELECT Subcommand (REGRESSION command)
MISSING Subcommand (REGRESSION command)
References (REGRESSION command)
Format of the Matrix Data File (REGRESSION command)
Split Files (REGRESSION command)
Missing Values (REGRESSION command)
Example (REGRESSION command)


Format of the Matrix Data File (REGRESSION command)

• The file has two special variables created by the program: ROWTYPE_ and VARNAME_.

• ROWTYPE_ is a short string variable with values MEAN, STDDEV, N, and CORR (for Pearson correlation coefficient).

• VARNAME_ is a short string variable whose values are the names of the variables used to form the correlation matrix. When ROWTYPE_ is CORR, VARNAME_ gives the variable associated with that row of the correlation matrix.

• The remaining variables in the file are the variables used to form the correlation matrix.

• To suppress the constant term when ORIGIN is used in the analysis, value OCORR (rather than value CORR) is written to the matrix system file. OCORR indicates that the regression passes through the origin.

Related Topics

MATRIX Subcommand (REGRESSION command)
Split Files (REGRESSION command)
Missing Values (REGRESSION command)
Example (REGRESSION command)


Split Files (REGRESSION command)

• When split-file processing is in effect, the first variables in the matrix data file are the split variables, followed by ROWTYPE_, the independent variable, VARNAME_, and the dependent variables.

• A full set of matrix materials is written for each subgroup defined by the split variable(s).

• A split variable cannot have the same variable name as any other variable written to the matrix data file.

• If a split file is in effect when a matrix is written, the same split file must be in effect when that matrix is read.

Related Topics

MATRIX Subcommand (REGRESSION command)
Format of the Matrix Data File (REGRESSION command)
Missing Values (REGRESSION command)
Example (REGRESSION command)


Missing Values (REGRESSION command)

REGRESSION (command),REGRESSION (command),REGRESSION (command)
missing values,missing values,missing values
REGRESSION (command),REGRESSION (command),REGRESSION (command)
missing values,missing values,missing values

• With PAIRWISE treatment of missing values, the matrix of N’s used to compute each coefficient is included with the matrix materials.

• With LISTWISE treatment (the default) or MEANSUBSTITUTION, a single N used to calculate all coefficients is included.

Related Topics

MATRIX Subcommand (REGRESSION command)
Format of the Matrix Data File (REGRESSION command)
Split Files (REGRESSION command)
Example (REGRESSION command)


Example (REGRESSION command)

REGRESSION MATRIX IN('/data/pay_data.sav') OUT(*)
 /VARIABLES=AGE,STARTPAY,YRS_JOB,SALARY
 /DEPENDENT=SALARY
 /METHOD=STEP.

• MATRIX IN reads the matrix data file pay_data.sav.

• A stepwise regression analysis of SALARY is performed using AGE, STARTPAY, and YRS_JOB.

• MATRIX OUT replaces the active dataset with the matrix data file that was previously stored in the pay_data.sav file.

Related Topics

MATRIX Subcommand (REGRESSION command)
Format of the Matrix Data File (REGRESSION command)
Split Files (REGRESSION command)
Missing Values (REGRESSION command)


MISSING Subcommand (REGRESSION command)

REGRESSION (command),REGRESSION (command),REGRESSION (command)
MISSING subcommand,MISSING subcommand,MISSING subcommand
MISSING (subcommand),MISSING (subcommand),MISSING (subcommand)
REGRESSION command,REGRESSION command,REGRESSION command

MISSING controls the treatment of cases with missing values. By default, a case that has a user-missing or system-missing value for any variable named or implied on VARIABLES is omitted from the computation of the correlation matrix on which all analyses are based.

• The minimum specification is a keyword specifying a missing-value treatment.

LISTWISE (keyword),LISTWISE (keyword),LISTWISE (keyword)
REGRESSION command,REGRESSION command,REGRESSION command
PAIRWISE (keyword),PAIRWISE (keyword),PAIRWISE (keyword)
REGRESSION command,REGRESSION command,REGRESSION command
MEANSUBSTITUTION (keyword),MEANSUBSTITUTION (keyword),MEANSUBSTITUTION (keyword)
REGRESSION command,REGRESSION command,REGRESSION command
mean substitution,mean substitution,mean substitution
REGRESSION command,REGRESSION command,REGRESSION command
INCLUDE (keyword),INCLUDE (keyword),INCLUDE (keyword)
REGRESSION command,REGRESSION command,REGRESSION command
LISTWISE | Delete cases with missing values listwise. Only cases with valid values for all variables named on the current VARIABLES subcommand are used. If INCLUDE is also specified, only cases with system-missing values are deleted listwise. LISTWISE is the default if the MISSING subcommand is omitted.
PAIRWISE | Delete cases with missing values pairwise. Each correlation coefficient is computed using cases with complete data for the pair of variables correlated. If INCLUDE is also specified, only cases with system-missing values are deleted pairwise.
MEANSUBSTITUTION | Replace missing values with the variable mean. All cases are included and the substitutions are treated as valid observations. If INCLUDE is also specified, user-missing values are treated as valid and are included in the computation of the means.
INCLUDE | Includes cases with user-missing values. All user-missing values are treated as valid values. This keyword can be specified along with the methods LISTWISE, PAIRWISE, or MEANSUBSTITUTION.

Example

REGRESSION  VARIABLES=POP15,POP75,INCOME,GROWTH,SAVINGS
 /DEPENDENT=SAVINGS
 /METHOD=STEP
 /MISSING=MEANSUBSTITUTION.
WIDTH (subcommand),WIDTH (subcommand),WIDTH (subcommand)
REGRESSION command,REGRESSION command,REGRESSION command

• System-missing and user-missing values are replaced with the means of the variables when the correlation matrix is calculated.

Related Topics

REGRESSION
Overview (REGRESSION command)
Examples (REGRESSION command)
VARIABLES Subcommand (REGRESSION command)
DEPENDENT Subcommand (REGRESSION command)
METHOD Subcommand (REGRESSION command)
STATISTICS Subcommand (REGRESSION command)
CRITERIA Subcommand (REGRESSION command)
ORIGIN and NOORIGIN Subcommands (REGRESSION command)
REGWGT Subcommand (REGRESSION command)
DESCRIPTIVES Subcommand (REGRESSION command)
SELECT Subcommand (REGRESSION command)
MATRIX Subcommand (REGRESSION command)
References (REGRESSION command)


RESIDUALS Subcommand (REGRESSION command)

REGRESSION (command),REGRESSION (command),REGRESSION (command)
RESIDUALS subcommand,RESIDUALS subcommand,RESIDUALS subcommand
RESIDUALS (subcommand),RESIDUALS (subcommand),RESIDUALS (subcommand)
REGRESSION command,REGRESSION command,REGRESSION command

RESIDUALS controls the display and labeling of summary information on outliers as well as the display of the Durbin-Watson statistic and histograms and normal probability plots for the temporary variables.

REGRESSION (command),REGRESSION (command),REGRESSION (command)
with SET command,with SET command,with SET command
SET (command),SET (command),SET (command)
with REGRESSION command,with REGRESSION command,with REGRESSION command

• If RESIDUALS is specified without keywords, it displays a histogram of residuals, a normal probability plot of residuals, the values of $CASENUM and ZRESID for the 10 cases with the largest absolute value of ZRESID, and the Durbin-Watson test statistic. The histogram and the normal plot are standardized.

• If any keywords are specified on RESIDUALS, only the requested information and plots are displayed.

HISTOGRAM (keyword),HISTOGRAM (keyword),HISTOGRAM (keyword)
REGRESSION command,REGRESSION command,REGRESSION command
histograms,histograms,histograms
REGRESSION command,REGRESSION command,REGRESSION command
REGRESSION (command),REGRESSION (command),REGRESSION (command)
histograms,histograms,histograms
NORMPROB (keyword),NORMPROB (keyword),NORMPROB (keyword)
REGRESSION command,REGRESSION command,REGRESSION command
normal probability plots,normal probability plots,normal probability plots
REGRESSION command,REGRESSION command,REGRESSION command
REGRESSION (command),REGRESSION (command),REGRESSION (command)
normal probability plots,normal probability plots,normal probability plots
OUTLIERS (keyword),OUTLIERS (keyword),OUTLIERS (keyword)
REGRESSION command,REGRESSION command,REGRESSION command
outliers,outliers,outliers
REGRESSION command,REGRESSION command,REGRESSION command
DURBIN (keyword),DURBIN (keyword),DURBIN (keyword)
REGRESSION command,REGRESSION command,REGRESSION command
Durbin-Watson statistic,Durbin-Watson statistic,Durbin-Watson statistic
REGRESSION command,REGRESSION command,REGRESSION command
ID (keyword),ID (keyword),ID (keyword)
REGRESSION command,REGRESSION command,REGRESSION command
SEPARATE (keyword),SEPARATE (keyword),SEPARATE (keyword)
REGRESSION command,REGRESSION command,REGRESSION command
POOLED (keyword),POOLED (keyword),POOLED (keyword)
REGRESSION command,REGRESSION command,REGRESSION command
DEFAULTS | DURBIN, NORMPROB(ZRESID), HISTOGRAM(ZRESID), OUTLIERS(ZRESID). These are the defaults if RESIDUALS is used without specifications.
HISTOGRAM(tempvars) | Histogram of the temporary variable or variables. The default is ZRESID. You can request histograms for PRED, RESID, ZPRED, DRESID, ADJPRED, SRESID, SDRESID, SEPRED, MAHAL, COOK, and LEVER. The specification of any other temporary variable will result in an error.
NORMPROB(tempvars) | Normal probability (P-P) plot. The default is ZRESID. The other temporary variables for which normal probability plots are available are PRED, RESID, ZPRED, DRESID, SRESID, and SDRESID. The specification of any other temporary variable will result in an error. Normal probability plots are always displayed in standardized form; therefore, when PRED, RESID, or DRESID is requested, the standardized equivalent ZPRED, ZRESID or SDRESID is displayed.
OUTLIERS(tempvars) | The 10 cases with the largest absolute values of the specified temporary variables. The default is ZRESID. The output includes the values of $CASENUM and of the temporary variables for the 10 cases. The other temporary variables available for OUTLIERS are RESID, SRESID, SDRESID, DRESID, MAHAL, and COOK. The specification of any temporary variable other than these will result in an error.
DURBIN | Display Durbin-Watson test statistic in the Model Summary table.
ID(varname) | ID variable providing case labels for use with point selection mode in the Chart Editor. Applicable to scatterplots produced by SCATTERPLOT, PARTIALPLOT, and RESIDUALS. Any variable in the active dataset can be named.
SEPARATE | Separate reporting of residuals statistics and plots for selected and unselected cases. This is the default.
POOLED | Pooled plots and statistics using all cases in the working file when the SELECT subcommand is in effect. This is an alternative to SEPARATE.

Example

 /RESID=DEFAULT ID(SVAR)

• DEFAULT produces the default residuals statistics: Durbin-Watson statistic, a normal probability plot and histogram of ZRESID, and an outlier listing for ZRESID.

• Descriptive statistics for ZRESID, RESID, PRED, and ZPRED are automatically displayed.

• SVAR is specified as the case identifier on the outlier output.

Related Topics

CASEWISE Subcommand (REGRESSION command)
SCATTERPLOT Subcommand (REGRESSION command)
PARTIALPLOT Subcommand (REGRESSION command)
OUTFILE Subcommand (REGRESSION command)
SAVE Subcommand (REGRESSION command)


CASEWISE Subcommand (REGRESSION command)

REGRESSION (command),REGRESSION (command),REGRESSION (command)
casewise plots,casewise plots,casewise plots
CASEWISE (subcommand),CASEWISE (subcommand),CASEWISE (subcommand)
REGRESSION command,REGRESSION command,REGRESSION command
REGRESSION (command),REGRESSION (command),REGRESSION (command)
CASEWISE subcommand,CASEWISE subcommand,CASEWISE subcommand

CASEWISE requests a Casewise Diagnostics table of residuals. You can specify a temporary residual variable for casewise listing (via the PLOT keyword). You can also specify variables to be listed in the table for each case.

• If CASEWISE is used without any additional specifications, it displays a Casewise Diagnostics table of ZRESID for cases whose absolute value of ZRESID is at least 3. By default, the values of the case sequence number, DEPENDENT, PRED, and RESID are listed for each case.

• Defaults remain in effect unless specifically altered.

OUTLIERS (keyword),OUTLIERS (keyword),OUTLIERS (keyword)
REGRESSION command,REGRESSION command,REGRESSION command
outliers,outliers,outliers
REGRESSION command,REGRESSION command,REGRESSION command
PLOT (keyword),PLOT (keyword),PLOT (keyword)
REGRESSION command,REGRESSION command,REGRESSION command
DEFAULTS | OUTLIERS(3), PLOT(ZRESID), DEPENDENT, PRED, and RESID. These are the defaults if the subcommand is used without specifications.
OUTLIERS(value) | List only cases for which the absolute standardized value of the listed variable is at least as large as the specified value. The default value is 3. Keyword OUTLIERS is ignored if keyword ALL is also present.
ALL | Include all cases in the Casewise Diagnostic table. ALL is the alternative to keyword OUTLIERS.
PLOT(tempvar) | List the values of the temporary variable in the Casewise Diagnostics table. The default temporary variable is ZRESID. Other variables that can be listed are RESID, DRESID, SRESID, and SDRESID. The specification of any temporary variable other than these will result in an error. When requested, RESID is standardized and DRESID is Studentized in the output.
tempvars | Display the values of these variables next to the casewise list entry for each case. The default variables are DEPENDENT (the dependent variable), PRED, and RESID. Any of the other temporary variables can be specified. If an ID variable is specified on RESIDUALS, the ID variable is also listed.

Example

 /CASEWISE=DEFAULT ALL SRE MAH COOK SDR

• This example requests a Casewise Diagnostics table of the standardized residuals for all cases.

• ZRESID, the dependent variable, and the temporary variables PRED, RESID, SRESID, MAHAL, COOK, and SDRESID are for all cases.

Related Topics

RESIDUALS Subcommand (REGRESSION command)
SCATTERPLOT Subcommand (REGRESSION command)
PARTIALPLOT Subcommand (REGRESSION command)
OUTFILE Subcommand (REGRESSION command)
SAVE Subcommand (REGRESSION command)


SCATTERPLOT Subcommand (REGRESSION command)

SCATTERPLOT (subcommand),SCATTERPLOT (subcommand),SCATTERPLOT (subcommand)
REGRESSION command,REGRESSION command,REGRESSION command
REGRESSION (command),REGRESSION (command),REGRESSION (command)
SCATTERPLOT subcommand,SCATTERPLOT subcommand,SCATTERPLOT subcommand
REGRESSION (command),REGRESSION (command),REGRESSION (command)
scatterplots,scatterplots,scatterplots

SCATTERPLOT names pairs of variables for scatterplots.

• The minimum specification for SCATTERPLOT is a pair of variables in parentheses. There are no default specifications.

• You can specify as many pairs of variables in parentheses as you want.

• The first variable named in each set of parentheses is plotted along the vertical axis, and the second variable is plotted along the horizontal axis.

• Plotting symbols are used to represent multiple points occurring at the same position.

• You can specify any variable named on the VARIABLES subcommand.

• You can specify PRED, RESID, ZPRED, ZRESID, DRESID, ADJPRED, SRESID, SDRESID, SEPRED, MAHAL, COOK, and LEVER. The specification of any other temporary variables will result in an error.

• Specify an asterisk before temporary variable names to distinguish them from user-defined variables. For example, use *PRED to specify PRED.

Example

/SCATTERPLOT (*RES,*PRE)(*RES,SAVINGS)

• This example specifies two scatterplots: residuals against predicted values and residuals against the values of the variable SAVINGS.

Related Topics

RESIDUALS Subcommand (REGRESSION command)
CASEWISE Subcommand (REGRESSION command)
PARTIALPLOT Subcommand (REGRESSION command)
OUTFILE Subcommand (REGRESSION command)
SAVE Subcommand (REGRESSION command)


PARTIALPLOT Subcommand (REGRESSION command)

PARTIALPLOT (subcommand),PARTIALPLOT (subcommand),PARTIALPLOT (subcommand)
REGRESSION command,REGRESSION command,REGRESSION command
REGRESSION (command),REGRESSION (command),REGRESSION (command)
PARTIALPLOT subcommand,PARTIALPLOT subcommand,PARTIALPLOT subcommand
REGRESSION (command),REGRESSION (command),REGRESSION (command)
partial residual plots,partial residual plots,partial residual plots

PARTIALPLOT requests partial regression plots. Partial regression plots are scatterplots of the residuals of the dependent variable and an independent variable when both of these variables are regressed on the rest of the independent variables.

• If PARTIALPLOT is included without any additional specifications, it produces a partial regression plot for every independent variable in the equation. The plots appear in the order the variables are specified or implied on the VARIABLES subcommand.

• If variables are specified on PARTIALPLOT, only the requested plots are displayed. The plots appear in the order the variables are listed on the PARTIALPLOT subcommand.

• At least two independent variables must be in the equation for partial regression plots to be produced.

ALL | Plot all independent variables in the equation. This is the default.
varlist | Plot the specified variables. Any variable entered into the equation can be specified.

Example

REGRESSION VARS=PLOT15 TO SAVINGS
  /DEP=SAVINGS
  /METH=ENTER
  /RESID=DEFAULTS
  /PARTIAL.

• A partial regression plot is produced for every independent variable in the equation.

Related Topics

RESIDUALS Subcommand (REGRESSION command)
CASEWISE Subcommand (REGRESSION command)
SCATTERPLOT Subcommand (REGRESSION command)
OUTFILE Subcommand (REGRESSION command)
SAVE Subcommand (REGRESSION command)


OUTFILE Subcommand (REGRESSION command)

OUTFILE (subcommand),OUTFILE (subcommand),OUTFILE (subcommand)
REGRESSION command,REGRESSION command,REGRESSION command
REGRESSION (command),REGRESSION (command),REGRESSION (command)
saving files,saving files,saving files

OUTFILE saves the parameter covariance or correlation matrix with parameter estimates, standard errors, significance values, and residual degrees of freedom for each term in the final equation in PASW Statistics format data files. It also saves model information in XML format.

• The OUTFILE subcommand must follow the last METHOD subcommand.

• Only one OUTFILE subcommand is allowed. If you specify more than one, only the last one is executed.

• You must specify at least one keyword and a quoted file specification , enclosed in parentheses. For COVB and CORB, you can specify a previously declared dataset (DATASET DECLARE command) instead of a file.

• You cannot save the parameter statistics as the active dataset.

• COVB and CORB are mutually exclusive.

• MODEL cannot be used if split file processing is on (SPLIT FILE command) or if more than one dependent (DEPENDENT subcommand) variable is specified.

• If you specify an external file name, you should include the .sav extension in the specification. There is no default extension.

PARAMETER (keyword),PARAMETER (keyword),PARAMETER (keyword)
REGRESSION command,REGRESSION command,REGRESSION command
COVB ('savfile'|'dataset') | Write the parameter covariance matrix with other statistics.
CORB ('savfile'|'dataset') | Write the parameter correlation matrix with other statistics.
MODEL ('file') | Write model information to an XML file. SmartScore and PASW Statistics Server (a separate product) can use this model file to apply the model information to other data files for scoring purposes.
PARAMETER('file') | Write parameter estimates only to an XML file. SmartScore and PASW Statistics Server (a separate product) can use this model file to apply the model information to other data files for scoring purposes.

Example

REGRESSION DEPENDENT=Y
 /METHOD=ENTER X1 X2
 /OUTFILE CORB ('/data/covx1x2y.sav').

• The OUTFILE subcommand saves the parameter correlation matrix, and the parameter estimates, standard errors, significance values, and residual degrees of freedom for the constant term, X1 and X2.

Related Topics

RESIDUALS Subcommand (REGRESSION command)
CASEWISE Subcommand (REGRESSION command)
SCATTERPLOT Subcommand (REGRESSION command)
PARTIALPLOT Subcommand (REGRESSION command)
SAVE Subcommand (REGRESSION command)


SAVE Subcommand (REGRESSION command)

REGRESSION (command),REGRESSION (command),REGRESSION (command)
saving variables,saving variables,saving variables
REGRESSION (command),REGRESSION (command),REGRESSION (command)
saving new variables,saving new variables,saving new variables
residuals,residuals,residuals
saving REGRESSION command,saving REGRESSION command,saving REGRESSION command

Use SAVE to add one or more residual or fit variables to the active dataset.

• The specification on SAVE is one or more of the temporary variable types, each followed by an optional name in parentheses for the new variable.

• New variable names must be unique.

• If new names are not specified, REGRESSION generates a rootname using a shortened form of the temporary variable name with a suffix to identify its creation sequence.

• If you specify DFBETA or SDBETA on the SAVE subcommand, the number of new variables saved is the total number of variables in the equation.

FITS (keyword),FITS (keyword),FITS (keyword)
REGRESSION command,REGRESSION command,REGRESSION command
FITS Save all influence statistics. FITS saves DFFIT, SDFIT, DFBETA, SDBETA, and COVRATIO. You cannot specify new variable names when using this keyword. Default names are generated.

Example

 /SAVE=PRED(PREDVAL) RESID(RESIDUAL) COOK(CDISTANC)

• This subcommand adds three variables to the end of the active dataset: PREDVAL, containing the unstandardized predicted value for each case; RESIDUAL, containing the unstandardized residual; and CDISTANC, containing Cook’s distance.

Example

 /SAVE=PRED RESID

• This subcommand adds two variables named PRE_1 and RES_1 to the end of the active dataset.

Example

REGRESSION DEPENDENT=Y
 /METHOD=ENTER X1 X2
 /SAVE DFBETA(DFBVAR).

• The SAVE subcommand creates and saves three new variables with the names DFBVAR0, DFBVAR1, and DFBVAR2.

Example

REGRESSION VARIABLES=SAVINGS INCOME POP15 POP75 GROWTH
 /DEPENDENT=SAVINGS
 /METHOD=ENTER INCOME POP15 POP75
 /SAVE=PRED(PREDV) SDBETA(BETA) ICIN.

• The SAVE subcommand adds seven variables to the end of the file: PREDV, containing the unstandardized predicted value for the case; BETA0, the standardized DFBETA for the intercept; BETA1, BETA2, and BETA3, the standardized DFBETA’s for the three independent variables in the model; LICI_1, the lower bound for the prediction interval for an individual case; and UICI_1, the upper bound for the prediction interval for an individual case.

Related Topics

RESIDUALS Subcommand (REGRESSION command)
CASEWISE Subcommand (REGRESSION command)
SCATTERPLOT Subcommand (REGRESSION command)
PARTIALPLOT Subcommand (REGRESSION command)
OUTFILE Subcommand (REGRESSION command)


References (REGRESSION command)

Belsley, D. A., E. Kuh, and R. E. Welsch. 1980. Regression diagnostics: Identifying influential data and sources of collinearity. New York: John Wiley and Sons.

Berk, K. N. 1977. Tolerance and condition in regression computation. Journal of the American Statistical Association, 72, 863-866.

Cook, R. D. 1977. Detection of influential observations in linear regression. Technometrics, 19, 15-18.

Dillon, W. R., and M. Goldstein. 1984. Multivariate analysis: Methods and applications. New York: John Wiley and Sons.

Hoaglin, D. C., and R. E. Welsch. 1978. The hat matrix in regression and ANOVA. American Statistician, 32, 17-22.

Judge, G. G., W. E. Griffiths, R. C. Hill, H. Lutkepohl, and T. C. Lee. 1980. The theory and practice of econometrics, 2nd ed. New York: John Wiley and Sons.

Meyer, L. S., and M. S. Younger. 1976. Estimation of standardized coefficients. Journal of the American Statistical Association, 71, 154-157.

Velleman, P. F., and R. E. Welsch. 1981. Efficient computing of regression diagnostics. American Statistician, 35, 234-242.

Related Topics

REGRESSION
Overview (REGRESSION command)
Examples (REGRESSION command)
VARIABLES Subcommand (REGRESSION command)
DEPENDENT Subcommand (REGRESSION command)
METHOD Subcommand (REGRESSION command)
STATISTICS Subcommand (REGRESSION command)
CRITERIA Subcommand (REGRESSION command)
ORIGIN and NOORIGIN Subcommands (REGRESSION command)
REGWGT Subcommand (REGRESSION command)
DESCRIPTIVES Subcommand (REGRESSION command)
SELECT Subcommand (REGRESSION command)
MATRIX Subcommand (REGRESSION command)
MISSING Subcommand (REGRESSION command)


RELIABILITY

Reliability Analysis,Reliability Analysis,Reliability Analysis
command syntax,command syntax,command syntax
RELIABILITY (command),RELIABILITY (command),RELIABILITY (command)
RELIABILITY (command),RELIABILITY (command),RELIABILITY (command)
syntax chart,syntax chart,syntax chart

RELIABILITY is available in the Statistics Base option.

RELIABILITY VARIABLES={varlist}
                      {ALL    }

 [/SCALE(scalename)=varlist ]

 [/MODEL={ALPHA         }]
         {SPLIT[(n)]    }
         {GUTTMAN       }
         {PARALLEL      }
         {STRICTPARALLEL}

 [/STATISTICS=[DESCRIPTIVE]   [SCALE]      [{ANOVA         }] [ALL] ]
              [COVARIANCES]   [TUKEY]       {ANOVA FRIEDMAN}
              [CORRELATIONS]  [HOTELLING]   {ANOVA COCHRAN }

 [/SUMMARY=[MEANS] [VARIANCE] [COV] [CORR] [TOTAL] [ALL] ]

 [/ICC=[{MODEL(ONEWAY)                             }]
        {[MODEL({MIXED**})] [TYPE({CONSISTENCY**})]}
                {RANDOM }         {ABSOLUTE     }
         [CIN={95**}] [TESTVAL={0**}]]
              {n   }           {p  }

 [/METHOD=COVARIANCE]

 [/MISSING={EXCLUDE**}]
           {INCLUDE  }

 [/MATRIX =[IN({*                  })] [OUT({*                  })] [NOPRINT]]
               {'savfile'|'dataset'}        {'savfile'|'dataset'}

**Default if the subcommand or keyword is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See RELIABILITY Algorithms for computational details for this procedure.

Syntax for the RELIABILITY command can be generated from the Reliability Analysis dialog box.

Release History Collapse Hide details

Release History

Release 17.0

• Increased limits on numbers of variables allowed on the VARIABLES and SCALE lists.

Example

RELIABILITY  VARIABLES=SCORE1 TO SCORE10
  /SCALE (OVERALL) = ALL
  /MODEL = ALPHA
  /SUMMARY = MEANS TOTAL.

Related Topics

Overview (RELIABILITY command)
Examples (RELIABILITY command)
VARIABLES Subcommand (RELIABILITY command)
SCALE Subcommand (RELIABILITY command)
MODEL Subcommand (RELIABILITY command)
STATISTICS Subcommand (RELIABILITY command)
ICC Subcommand (RELIABILITY command)
SUMMARY Subcommand (RELIABILITY command)
METHOD Subcommand (RELIABILITY command)
MISSING Subcommand (RELIABILITY command)
MATRIX Subcommand (RELIABILITY command)


Overview (RELIABILITY command)

RELIABILITY estimates reliability statistics for the components of multiple-item additive scales. It uses any one of five models for reliability analysis and offers a variety of statistical displays. RELIABILITY can also be used to perform a repeated measures analysis of variance, a two-way factorial analysis of variance with one observation per cell, Tukey’s test for additivity, Hotelling’s T-square test for equality of means in repeated measures designs, and Friedman’s two-way analysis of variance on ranks. For more complex repeated measures designs, use the GLM procedure (available in the Advanced Models option).

Options Collapse Hide details

Options

Model Type. You can specify any one of five models on the MODEL subcommand.

Statistical Display. Statistics available on the STATISTICS subcommand include descriptive statistics, correlation and covariance matrices, a repeated measures analysis of variance table, Hotelling’s T-square, Tukey’s test for additivity, Friedman’s chi-square for the analysis of ranked data, and Cochran’s Q.

Computational Method. You can force RELIABILITY to use the covariance method, even when you are not requesting any output that requires it, by using the METHOD subcommand.

Matrix Input and Output. You can read data in the form of correlation matrices and you can write correlation-type matrix materials to a data file using the MATRIX subcommand.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is VARIABLES and a variable list. By default, RELIABILITY displays the number of cases, number of items, and Cronbach’s alpha. Whenever possible, it uses an algorithm that does not require the calculation of the covariance matrix.

Subcommand Order Collapse Hide details

Subcommand Order

• VARIABLES must be specified first.

• The remaining subcommands can be named in any order.

Operations Collapse Hide details

Operations

• STATISTICS and SUMMARY are cumulative. If you enter them more than once, all requested statistics are produced for each scale.

• If you request output that is not available for your model or for your data, RELIABILITY ignores the request.

• RELIABILITY uses an economical algorithm whenever possible but calculates a covariance matrix when necessary (see METHOD Subcommand (RELIABILITY command)).

RELIABILITY (command),RELIABILITY (command),RELIABILITY (command)
limitations,limitations,limitations
Limitations Collapse Hide details

Limitations

• Maximum 1 VARIABLES subcommand.

• Maximum 1 SCALE subcommand.

• Maximum 10,000 variables on the VARIABLES subcommand.

• Maximum 10,000 variables on the SCALE subcommand.

Related Topics

RELIABILITY
Examples (RELIABILITY command)
VARIABLES Subcommand (RELIABILITY command)
SCALE Subcommand (RELIABILITY command)
MODEL Subcommand (RELIABILITY command)
STATISTICS Subcommand (RELIABILITY command)
ICC Subcommand (RELIABILITY command)
SUMMARY Subcommand (RELIABILITY command)
METHOD Subcommand (RELIABILITY command)
MISSING Subcommand (RELIABILITY command)
MATRIX Subcommand (RELIABILITY command)


Examples (RELIABILITY command)

RELIABILITY  VARIABLES=SCORE1 TO SCORE10.

• This example analyzes a scale (labeled ALL in the display output) that includes all 10 items.

• Because there is no SUMMARY subcommand, no summary statistics are displayed.

Reliability Analysis of Survey Items

RELIABILITY
  /VARIABLES=any bored critics peers writers director cast
  /SCALE(ALPHA)=ALL  /MODEL=ALPHA
  /STATISTICS=DESCRIPTIVE CORR.

• The procedure performs a reliability analysis for variables any, bored, critics, peers, writers, director, and cast.

• The scale specified on the SCALE subcommand is labeled ALPHA and includes all variables specified on the VARIABLES subcommand.

• The MODEL subcommand specifies that the reliability analysis is based on Cronbach's alpha.

• Item means and standard deviations and the inter-item correlation matrix are requested on the STATISTICS subcommand.

Intraclass Correlation Coefficients

RELIABILITY
  /VARIABLES=judge1 judge2 judge3 judge4 judge5 judge6 judge7
  /SCALE(ALPHA)=ALL
  /MODEL=ALPHA
  /STATISTICS=DESCRIPTIVE
  /ICC=MODEL(RANDOM) TYPE(CONSISTENCY) CIN=95 TESTVAL=0 .

• The procedure performs a reliability analysis for variables judge1, judge2, judge3, judge4, judge5, judge6, and judge7.

• The scale specified on the SCALE subcommand is labeled ALPHA and includes all variables specified on the VARIABLES subcommand.

• The MODEL subcommand specifies that the reliability analysis is based on Cronbach's alpha.

• Item means and standard deviations are requested on the STATISTICS subcommand.

• The ICC subcommand requests a two-way random effect model for the intraclass correlation coefficient, using the consistency defintion. 95% confidence intervals will be produced and a 0.05 significance level in testing the ICC against the value 0.

For discussion of output from this syntax and to place the example in context, see Using Reliability Measures to Analyze Inter-Rater Agreement .

Related Topics

RELIABILITY
Overview (RELIABILITY command)
VARIABLES Subcommand (RELIABILITY command)
SCALE Subcommand (RELIABILITY command)
MODEL Subcommand (RELIABILITY command)
STATISTICS Subcommand (RELIABILITY command)
ICC Subcommand (RELIABILITY command)
SUMMARY Subcommand (RELIABILITY command)
METHOD Subcommand (RELIABILITY command)
MISSING Subcommand (RELIABILITY command)
MATRIX Subcommand (RELIABILITY command)


VARIABLES Subcommand (RELIABILITY command)

RELIABILITY (command),RELIABILITY (command),RELIABILITY (command)
variable list,variable list,variable list
RELIABILITY (command),RELIABILITY (command),RELIABILITY (command)
VARIABLES subcommand,VARIABLES subcommand,VARIABLES subcommand
VARIABLES (subcommand),VARIABLES (subcommand),VARIABLES (subcommand)
RELIABILITY command,RELIABILITY command,RELIABILITY command

VARIABLES specifies the variables to be used in the analysis. Only numeric variables can be used.

• VARIABLES is required and must be specified first.

• You can use keyword ALL to refer to all user-defined variables in the active dataset.

Related Topics

RELIABILITY
Overview (RELIABILITY command)
Examples (RELIABILITY command)
SCALE Subcommand (RELIABILITY command)
MODEL Subcommand (RELIABILITY command)
STATISTICS Subcommand (RELIABILITY command)
ICC Subcommand (RELIABILITY command)
SUMMARY Subcommand (RELIABILITY command)
METHOD Subcommand (RELIABILITY command)
MISSING Subcommand (RELIABILITY command)
MATRIX Subcommand (RELIABILITY command)


SCALE Subcommand (RELIABILITY command)

RELIABILITY (command),RELIABILITY (command),RELIABILITY (command)
SCALE subcommand,SCALE subcommand,SCALE subcommand
SCALE (subcommand),SCALE (subcommand),SCALE (subcommand)
RELIABILITY command,RELIABILITY command,RELIABILITY command
RELIABILITY (command),RELIABILITY (command),RELIABILITY (command)
scale definition,scale definition,scale definition

SCALE defines a scale for analysis, providing a label for the scale and specifying its component variables. If SCALE is omitted, all variables named on VARIABLES are used, and the label for the scale is ALL.

• The label is specified in parentheses after SCALE. It can have a maximum of 255 bytes before being truncated.

• RELIABILITY does not add any new variables to the active dataset. The label is used only to identify the output. If the analysis is satisfactory, use COMPUTE to create a new variable containing the sum of the component items.

• Variables named on SCALE must have been named on the VARIABLES subcommand. Use the keyword ALL to refer to all variables named on the VARIABLES subcommand.

Example

RELIABILITY VARIABLES = ITEM1 TO ITEM20
  /SCALE (A) = ITEM1 TO ITEM10.

RELIABILITY VARIABLES = ITEM1 TO ITEM20
  /SCALE (B) = ITEM1 TO ITEM20.

• Analyses for scales A and B both use only cases that have complete data for items 1 through 20.

Related Topics

RELIABILITY
Overview (RELIABILITY command)
Examples (RELIABILITY command)
VARIABLES Subcommand (RELIABILITY command)
MODEL Subcommand (RELIABILITY command)
STATISTICS Subcommand (RELIABILITY command)
ICC Subcommand (RELIABILITY command)
SUMMARY Subcommand (RELIABILITY command)
METHOD Subcommand (RELIABILITY command)
MISSING Subcommand (RELIABILITY command)
MATRIX Subcommand (RELIABILITY command)


MODEL Subcommand (RELIABILITY command)

RELIABILITY (command),RELIABILITY (command),RELIABILITY (command)
MODEL subcommand,MODEL subcommand,MODEL subcommand
MODEL (subcommand),MODEL (subcommand),MODEL (subcommand)
RELIABILITY command,RELIABILITY command,RELIABILITY command
RELIABILITY (command),RELIABILITY (command),RELIABILITY (command)
models,models,models

MODEL specifies the type of reliability analysis for the scale named on the SCALE subcommand.

alpha coefficient,alpha coefficient,alpha coefficient
RELIABILITY command,RELIABILITY command,RELIABILITY command
ALPHA (keyword),ALPHA (keyword),ALPHA (keyword)
RELIABILITY command,RELIABILITY command,RELIABILITY command
KR20,KR20,KR20
RELIABILITY command,RELIABILITY command,RELIABILITY command
split-half model,split-half model,split-half model
RELIABILITY command,RELIABILITY command,RELIABILITY command
SPLIT (keyword),SPLIT (keyword),SPLIT (keyword)
RELIABILITY command,RELIABILITY command,RELIABILITY command
Guttman's lower bounds,Guttman's lower bounds,Guttman's lower bounds
RELIABILITY command,RELIABILITY command,RELIABILITY command
GUTTMAN (keyword),GUTTMAN (keyword),GUTTMAN (keyword)
RELIABILITY command,RELIABILITY command,RELIABILITY command
parallel model,parallel model,parallel model
RELIABILITY command,RELIABILITY command,RELIABILITY command
maximum-likelihood estimation,maximum-likelihood estimation,maximum-likelihood estimation
RELIABILITY command,RELIABILITY command,RELIABILITY command
PARALLEL (keyword),PARALLEL (keyword),PARALLEL (keyword)
RELIABILITY command,RELIABILITY command,RELIABILITY command
strictly parallel model,strictly parallel model,strictly parallel model
RELIABILITY command,RELIABILITY command,RELIABILITY command
STRICTPARALLEL (keyword),STRICTPARALLEL (keyword),STRICTPARALLEL (keyword)
RELIABILITY command,RELIABILITY command,RELIABILITY command
ALPHA | Cronbach’s α. Standardized item α is displayed. This is the default.
SPLIT [(n)] | Split-half coefficients. You can specify a number in parentheses to indicate how many items should be in the second half. For example, MODEL SPLIT (6) uses the last six variables for the second half and all others for the first. By default, each half has an equal number of items, with the odd item, if any, going to the first half.
GUTTMAN | Guttman’s lower bounds for true reliability.
PARALLEL | Maximum-likelihood reliability estimate under parallel assumptions. This model assumes that items have the same variance but not necessarily the same mean.
STRICTPARALLEL | Maximum-likelihood reliability estimate under strictly parallel assumptions. This model assumes that items have the same means, the same true score variances over a set of objects being measured, and the same error variance over replications.

Related Topics

RELIABILITY
Overview (RELIABILITY command)
Examples (RELIABILITY command)
VARIABLES Subcommand (RELIABILITY command)
SCALE Subcommand (RELIABILITY command)
STATISTICS Subcommand (RELIABILITY command)
ICC Subcommand (RELIABILITY command)
SUMMARY Subcommand (RELIABILITY command)
METHOD Subcommand (RELIABILITY command)
MISSING Subcommand (RELIABILITY command)
MATRIX Subcommand (RELIABILITY command)


STATISTICS Subcommand (RELIABILITY command)

RELIABILITY (command),RELIABILITY (command),RELIABILITY (command)
STATISTICS subcommand,STATISTICS subcommand,STATISTICS subcommand
STATISTICS (subcommand),STATISTICS (subcommand),STATISTICS (subcommand)
RELIABILITY command,RELIABILITY command,RELIABILITY command

STATISTICS displays optional statistics. There are no default statistics.

• STATISTICS is cumulative. If you enter it more than once, all requested statistics are produced for each scale.

standard deviation,standard deviation,standard deviation
RELIABILITY command,RELIABILITY command,RELIABILITY command
mean,mean,mean
RELIABILITY command,RELIABILITY command,RELIABILITY command
DESCRIPTIVES (keyword),DESCRIPTIVES (keyword),DESCRIPTIVES (keyword)
RELIABILITY command,RELIABILITY command,RELIABILITY command
covariance,covariance,covariance
RELIABILITY command,RELIABILITY command,RELIABILITY command
COVARIANCES (keyword),COVARIANCES (keyword),COVARIANCES (keyword)
RELIABILITY command,RELIABILITY command,RELIABILITY command
Pearson correlation,Pearson correlation,Pearson correlation
RELIABILITY command,RELIABILITY command,RELIABILITY command
CORRELATIONS (keyword),CORRELATIONS (keyword),CORRELATIONS (keyword)
RELIABILITY command,RELIABILITY command,RELIABILITY command
variance,variance,variance
RELIABILITY command,RELIABILITY command,RELIABILITY command
scale statistics,scale statistics,scale statistics
RELIABILITY command,RELIABILITY command,RELIABILITY command
SCALE (keyword),SCALE (keyword),SCALE (keyword)
RELIABILITY command,RELIABILITY command,RELIABILITY command
Tukey's test of additivity,Tukey's test of additivity,Tukey's test of additivity
RELIABILITY command,RELIABILITY command,RELIABILITY command
TUKEY (keyword),TUKEY (keyword),TUKEY (keyword)
RELIABILITY command,RELIABILITY command,RELIABILITY command
Hotelling's T2,Hotelling's T2,Hotelling's T2
RELIABILITY command,RELIABILITY command,RELIABILITY command
HOTELLING (keyword),HOTELLING (keyword),HOTELLING (keyword)
RELIABILITY command,RELIABILITY command,RELIABILITY command
repeated measures analysis,repeated measures analysis,repeated measures analysis
RELIABILITY command,RELIABILITY command,RELIABILITY command
analysis of variance,analysis of variance,analysis of variance
RELIABILITY command,RELIABILITY command,RELIABILITY command
ANOVA (keyword),ANOVA (keyword),ANOVA (keyword)
RELIABILITY command,RELIABILITY command,RELIABILITY command
Kendall's coefficient of concordance,Kendall's coefficient of concordance,Kendall's coefficient of concordance
RELIABILITY command,RELIABILITY command,RELIABILITY command
chi-square,chi-square,chi-square
Friedman,Friedman,Friedman
FRIEDMAN (keyword),FRIEDMAN (keyword),FRIEDMAN (keyword)
RELIABILITY command,RELIABILITY command,RELIABILITY command
chi-square,chi-square,chi-square
Cochran,Cochran,Cochran
COCHRAN (keyword),COCHRAN (keyword),COCHRAN (keyword)
RELIABILITY command,RELIABILITY command,RELIABILITY command
ALL (keyword),ALL (keyword),ALL (keyword)
RELIABILITY command,RELIABILITY command,RELIABILITY command
DESCRIPTIVES | Item means and standard deviations.
COVARIANCES | Inter-item variance-covariance matrix.
CORRELATIONS | Inter-item correlation matrix.
SCALE | Scale means and scale variances.
TUKEY | Tukey’s test for additivity. This helps determine whether a transformation of the items is needed to reduce nonadditivity. The test displays an estimate of the power to which the items should be raised in order to be additive.
HOTELLING | Hotelling’s T-square. This is a test for equality of means among the items.
ANOVA | Repeated measures analysis of variance table.
FRIEDMAN | Friedman’s chi-square and Kendall’s coefficient of concordance. These apply to ranked data. You must request ANOVA in addition to FRIEDMAN; Friedman’s chi-square appears in place of the usual F test. If the ANOVA keyword is not specified, the FRIEDMAN keyword is silently ignored.
COCHRAN | Cochran’s Q. This applies when all items are dichotomies. You must request ANOVA in addition to COCHRAN; the Q statistic appears in place of the usual F test. If the ANOVA keyword is not specified, the COCHRAN keyword is silently ignored.
ALL | All applicable statistics.

Related Topics

RELIABILITY
Overview (RELIABILITY command)
Examples (RELIABILITY command)
VARIABLES Subcommand (RELIABILITY command)
SCALE Subcommand (RELIABILITY command)
MODEL Subcommand (RELIABILITY command)
ICC Subcommand (RELIABILITY command)
SUMMARY Subcommand (RELIABILITY command)
METHOD Subcommand (RELIABILITY command)
MISSING Subcommand (RELIABILITY command)
MATRIX Subcommand (RELIABILITY command)


ICC Subcommand (RELIABILITY command)

ICC (subcommand),ICC (subcommand),ICC (subcommand)
RELIABILITY command,RELIABILITY command,RELIABILITY command
RELIABILITY (command),RELIABILITY (command),RELIABILITY (command)
ICC subcommand,ICC subcommand,ICC subcommand

ICC displays intraclass correlation coefficients for single measure and average measure. Single measure applies to single measurements—for example, the rating of judges, individual item scores, or the body weights of individuals. Average measure, however, applies to average measurements, for example, the average rating of k judges, or the average score for a k-item test.

MODEL | Model. You can specify the model for the computation of ICC. There are three keywords for this option. ONEWAY is the one-way random effects model (people effects are random). RANDOM is the two-way random effect model (people effects and the item effects are random). MIXED is the two-way mixed (people effects are random and the item effects are fixed). MIXED is the default. Only one model can be specified.
TYPE | Type of definition. When the model is RANDOM or MIXED, one of the two TYPE keywords may be given. CONSISTENCY is the consistency definition and ABSOLUTE is the absolute agreement definition. For the consistency coefficient, the between measures variance is excluded from the denominator variance, and for absolute agreement, it is not.
CIN | The value of the percent for confidence interval and significance level of the hypothesis testing.
TESTVAL | The value with which an estimate of ICC is compared. The value should be between 0 and 1.

Related Topics

RELIABILITY
Overview (RELIABILITY command)
Examples (RELIABILITY command)
VARIABLES Subcommand (RELIABILITY command)
SCALE Subcommand (RELIABILITY command)
MODEL Subcommand (RELIABILITY command)
STATISTICS Subcommand (RELIABILITY command)
SUMMARY Subcommand (RELIABILITY command)
METHOD Subcommand (RELIABILITY command)
MISSING Subcommand (RELIABILITY command)
MATRIX Subcommand (RELIABILITY command)


SUMMARY Subcommand (RELIABILITY command)

RELIABILITY (command),RELIABILITY (command),RELIABILITY (command)
SUMMARY subcommand,SUMMARY subcommand,SUMMARY subcommand
SUMMARY (subcommand),SUMMARY (subcommand),SUMMARY (subcommand)
RELIABILITY command,RELIABILITY command,RELIABILITY command

SUMMARY displays summary statistics for each individual item in the scale.

• SUMMARY is cumulative. If you enter it more than once, all requested statistics are produced for the scale.

• You can specify one or more of the following:

mean,mean,mean
RELIABILITY command,RELIABILITY command,RELIABILITY command
item statistics,item statistics,item statistics
RELIABILITY command,RELIABILITY command,RELIABILITY command
MEANS (keyword),MEANS (keyword),MEANS (keyword)
RELIABILITY command,RELIABILITY command,RELIABILITY command
variance,variance,variance
RELIABILITY command,RELIABILITY command,RELIABILITY command
VARIANCE (keyword),VARIANCE (keyword),VARIANCE (keyword)
RELIABILITY command,RELIABILITY command,RELIABILITY command
covariance,covariance,covariance
RELIABILITY command,RELIABILITY command,RELIABILITY command
COVARIANCES (keyword),COVARIANCES (keyword),COVARIANCES (keyword)
RELIABILITY command,RELIABILITY command,RELIABILITY command
Pearson correlation,Pearson correlation,Pearson correlation
RELIABILITY command,RELIABILITY command,RELIABILITY command
CORRELATIONS (keyword),CORRELATIONS (keyword),CORRELATIONS (keyword)
RELIABILITY command,RELIABILITY command,RELIABILITY command
item-total statistics,item-total statistics,item-total statistics
RELIABILITY command,RELIABILITY command,RELIABILITY command
TOTAL (keyword),TOTAL (keyword),TOTAL (keyword)
RELIABILITY command,RELIABILITY command,RELIABILITY command
MEANS | Statistics on item means. The average, minimum, maximum, range, ratio of maximum to minimum, and variance of the item means.
VARIANCE | Statistics on item variances. This displays the same statistics as for MEANS.
COVARIANCES | Statistics on item covariances. This displays the same statistics as for MEANS.
CORRELATIONS | Statistics on item correlations. This displays the same statistics as for MEANS.
TOTAL | Statistics comparing each individual item to the scale composed of the other items. The output includes the scale mean, variance, and Cronbach’s α without the item, and the correlation between the item and the scale without it.
ALL | All applicable summary statistics.

Related Topics

RELIABILITY
Overview (RELIABILITY command)
Examples (RELIABILITY command)
VARIABLES Subcommand (RELIABILITY command)
SCALE Subcommand (RELIABILITY command)
MODEL Subcommand (RELIABILITY command)
STATISTICS Subcommand (RELIABILITY command)
ICC Subcommand (RELIABILITY command)
METHOD Subcommand (RELIABILITY command)
MISSING Subcommand (RELIABILITY command)
MATRIX Subcommand (RELIABILITY command)


METHOD Subcommand (RELIABILITY command)

RELIABILITY (command),RELIABILITY (command),RELIABILITY (command)
METHOD subcommand,METHOD subcommand,METHOD subcommand
METHOD (subcommand),METHOD (subcommand),METHOD (subcommand)
RELIABILITY command,RELIABILITY command,RELIABILITY command
RELIABILITY (command),RELIABILITY (command),RELIABILITY (command)
computational method,computational method,computational method
covariance method,covariance method,covariance method
RELIABILITY command,RELIABILITY command,RELIABILITY command

By default, RELIABILITY uses a computational method that does not require the calculation of a covariance matrix wherever possible. METHOD forces RELIABILITY to calculate the covariance matrix. Only a single specification applies to METHOD:

COVARIANCE (keyword),COVARIANCE (keyword),COVARIANCE (keyword)
RELIABILITY command,RELIABILITY command,RELIABILITY command
COVARIANCE Calculate and use the covariance matrix, even if it is not needed.

If METHOD is not specified, RELIABILITY computes the covariance matrix for all variables on each VARIABLES subcommand only if any of the following is true:

• You specify a model other than ALPHA or SPLIT.

• You request COV, CORR, FRIEDMAN, or HOTELLING on the STATISTICS subcommand.

• You request anything other than TOTAL on the SUMMARY subcommand.

• You write the matrix to a matrix data file, using the MATRIX subcommand.

Related Topics

RELIABILITY
Overview (RELIABILITY command)
Examples (RELIABILITY command)
VARIABLES Subcommand (RELIABILITY command)
SCALE Subcommand (RELIABILITY command)
MODEL Subcommand (RELIABILITY command)
STATISTICS Subcommand (RELIABILITY command)
ICC Subcommand (RELIABILITY command)
SUMMARY Subcommand (RELIABILITY command)
MISSING Subcommand (RELIABILITY command)
MATRIX Subcommand (RELIABILITY command)


MISSING Subcommand (RELIABILITY command)

RELIABILITY (command),RELIABILITY (command),RELIABILITY (command)
MISSING subcommand,MISSING subcommand,MISSING subcommand
MISSING (subcommand),MISSING (subcommand),MISSING (subcommand)
RELIABILITY command,RELIABILITY command,RELIABILITY command
RELIABILITY (command),RELIABILITY (command),RELIABILITY (command)
missing values,missing values,missing values
RELIABILITY (command),RELIABILITY (command),RELIABILITY (command)
missing values,missing values,missing values

MISSING controls the deletion of cases with user-missing data.

• RELIABILITY deletes cases from analysis if they have a missing value for any variable named on the VARIABLES subcommand. By default, both system-missing and user-missing values are excluded.

EXCLUDE (keyword),EXCLUDE (keyword),EXCLUDE (keyword)
RELIABILITY command,RELIABILITY command,RELIABILITY command
INCLUDE (keyword),INCLUDE (keyword),INCLUDE (keyword)
RELIABILITY command,RELIABILITY command,RELIABILITY command
EXCLUDE | Exclude user-missing and system-missing values. This is the default.
INCLUDE | Treat user-missing values as valid. Only system-missing values are excluded.

Related Topics

RELIABILITY
Overview (RELIABILITY command)
Examples (RELIABILITY command)
VARIABLES Subcommand (RELIABILITY command)
SCALE Subcommand (RELIABILITY command)
MODEL Subcommand (RELIABILITY command)
STATISTICS Subcommand (RELIABILITY command)
ICC Subcommand (RELIABILITY command)
SUMMARY Subcommand (RELIABILITY command)
METHOD Subcommand (RELIABILITY command)
MATRIX Subcommand (RELIABILITY command)


MATRIX Subcommand (RELIABILITY command)

RELIABILITY (command),RELIABILITY (command),RELIABILITY (command)
MATRIX subcommand,MATRIX subcommand,MATRIX subcommand
MATRIX (subcommand),MATRIX (subcommand),MATRIX (subcommand)
RELIABILITY command,RELIABILITY command,RELIABILITY command
RELIABILITY (command),RELIABILITY (command),RELIABILITY (command)
matrix output,matrix output,matrix output
RELIABILITY (command),RELIABILITY (command),RELIABILITY (command)
matrix input,matrix input,matrix input
matrix output,matrix output,matrix output
RELIABILITY command,RELIABILITY command,RELIABILITY command
matrix input,matrix input,matrix input
RELIABILITY command,RELIABILITY command,RELIABILITY command

MATRIX reads and writes PASW Statistics matrix data files.

IN (keyword),IN (keyword),IN (keyword)
RELIABILITY command,RELIABILITY command,RELIABILITY command
OUT (keyword),OUT (keyword),OUT (keyword)
RELIABILITY command,RELIABILITY command,RELIABILITY command

• Either IN or OUT and the matrix file in parentheses are required. When both IN and OUT are used on the same RELIABILITY procedure, they can be specified on separate MATRIX subcommands or on the same subcommand.

• If both IN and OUT are used on the same RELIABILITY command and there are grouping variables in the matrix input file, these variables are treated as if they were split variables. Values of the grouping variables in the input matrix are passed on to the output matrix (see Split Files (RELIABILITY command)).

OUT ('savfile'|'dataset') | Write a matrix data file or dataset. Specify either a filename, a previously declared dataset name, or an asterisk, enclosed in parentheses. Filenames should be enclosed in quotes and are stored in the working directory unless a path is included as part of the file specification. If you specify an asterisk (*), the matrix data file replaces the active dataset. If you specify an asterisk or a dataset name, the file is not stored on disk unless you use SAVE or XSAVE.
IN ('savfile'|'dataset') | Read a matrix data file or dataset. Specify either a filename, dataset name created during the current session, or an asterisk enclosed in parentheses. An asterisk reads the matrix data from the active dataset. Filenames should be enclosed in quotes and are read from the working directory unless a path is included as part of the file specification.

Related Topics

RELIABILITY
Overview (RELIABILITY command)
Examples (RELIABILITY command)
VARIABLES Subcommand (RELIABILITY command)
SCALE Subcommand (RELIABILITY command)
MODEL Subcommand (RELIABILITY command)
STATISTICS Subcommand (RELIABILITY command)
ICC Subcommand (RELIABILITY command)
SUMMARY Subcommand (RELIABILITY command)
METHOD Subcommand (RELIABILITY command)
MISSING Subcommand (RELIABILITY command)
Matrix Output (RELIABILITY command)
Matrix Input (RELIABILITY command)
Format of the Matrix Data File (RELIABILITY command)
Split Files (RELIABILITY command)
Missing Values (RELIABILITY command)
Example: Matrix Output to External File (RELIABILITY command)
Example: Matrix Output to Active Dataset (RELIABILITY command)
Example: Matrix Output to Active Dataset (RELIABILITY command)
Example: Matrix Input from External File (RELIABILITY command)
Example: Matrix Input from Working File (RELIABILITY command)


Matrix Output (RELIABILITY command)

• RELIABILITY writes correlation-type matrices that include the number of cases, means, and standard deviations with the matrix materials (see Format of the Matrix Data File (RELIABILITY command) below for a description of the file). These matrix materials can be used as input to RELIABILITY or other procedures.

• Any documents contained in the active dataset are not transferred to the matrix file.

• RELIABILITY displays the scale analysis when it writes matrix materials. To suppress the display of scale analysis, specify keyword NOPRINT on MATRIX.

Related Topics

MATRIX Subcommand (RELIABILITY command)
Matrix Input (RELIABILITY command)
Format of the Matrix Data File (RELIABILITY command)
Split Files (RELIABILITY command)
Missing Values (RELIABILITY command)
Example: Matrix Output to External File (RELIABILITY command)
Example: Matrix Output to Active Dataset (RELIABILITY command)
Example: Matrix Output to Active Dataset (RELIABILITY command)
Example: Matrix Input from External File (RELIABILITY command)
Example: Matrix Input from Working File (RELIABILITY command)


Matrix Input (RELIABILITY command)

• RELIABILITY can read a matrix data file created by a previous RELIABILITY command or by another procedure. The matrix input file must have records of type N, MEAN, STDDEV, and CORR for each split-file group. For more information, see the Universals section.

• Variable names, variable and value labels, and print and write formats are read from the dictionary of the matrix data file.

• MATRIX=IN cannot be used unless an active dataset has already been defined. To read an existing matrix data file at the beginning of a session, use GET to retrieve the matrix file and then specify IN(*) on MATRIX.

Related Topics

MATRIX Subcommand (RELIABILITY command)
Matrix Output (RELIABILITY command)
Format of the Matrix Data File (RELIABILITY command)
Split Files (RELIABILITY command)
Missing Values (RELIABILITY command)
Example: Matrix Output to External File (RELIABILITY command)
Example: Matrix Output to Active Dataset (RELIABILITY command)
Example: Matrix Output to Active Dataset (RELIABILITY command)
Example: Matrix Input from External File (RELIABILITY command)
Example: Matrix Input from Working File (RELIABILITY command)


Format of the Matrix Data File (RELIABILITY command)

• The matrix data file includes two special variables: ROWTYPE_ and VARNAME_. Variable ROWTYPE_ is a short string variable having values N, MEAN, STDDEV, and CORR. Variable VARNAME_ is a short string variable whose values are the names of the variables used to form the correlation matrix.

• When ROWTYPE_ is CORR, VARNAME_ gives the variable associated with that row of the correlation matrix.

• The remaining variables in the matrix file are the variables used to form the correlation matrix.

Related Topics

MATRIX Subcommand (RELIABILITY command)
Matrix Output (RELIABILITY command)
Matrix Input (RELIABILITY command)
Split Files (RELIABILITY command)
Missing Values (RELIABILITY command)
Example: Matrix Output to External File (RELIABILITY command)
Example: Matrix Output to Active Dataset (RELIABILITY command)
Example: Matrix Output to Active Dataset (RELIABILITY command)
Example: Matrix Input from External File (RELIABILITY command)
Example: Matrix Input from Working File (RELIABILITY command)


Split Files (RELIABILITY command)

• When split-file processing is in effect, the first variables in the matrix data file will be the split variables, followed by ROWTYPE_, VARNAME_, and the dependent variable(s).

• If grouping variables are in the matrix input file, their values are between ROWTYPE_ and VARNAME_. The grouping variables are treated like split-file variables.

• A full set of matrix materials is written for each split-file group defined by the split variables.

• A split variable cannot have the same variable name as any other variable written to the matrix data file.

• If split-file processing is in effect when a matrix is written, the same split file must be in effect when that matrix is read by any procedure.

Related Topics

MATRIX Subcommand (RELIABILITY command)
Matrix Output (RELIABILITY command)
Matrix Input (RELIABILITY command)
Format of the Matrix Data File (RELIABILITY command)
Missing Values (RELIABILITY command)
Example: Matrix Output to External File (RELIABILITY command)
Example: Matrix Output to Active Dataset (RELIABILITY command)
Example: Matrix Output to Active Dataset (RELIABILITY command)
Example: Matrix Input from External File (RELIABILITY command)
Example: Matrix Input from Working File (RELIABILITY command)


Missing Values (RELIABILITY command)

RELIABILITY (command),RELIABILITY (command),RELIABILITY (command)
missing values,missing values,missing values

Missing-value treatment affects the values written to a matrix data file. When reading a matrix data file, be sure to specify a missing-value treatment on RELIABILITY that is compatible with the treatment that was in effect when the matrix materials were generated.

Related Topics

MATRIX Subcommand (RELIABILITY command)
Matrix Output (RELIABILITY command)
Matrix Input (RELIABILITY command)
Format of the Matrix Data File (RELIABILITY command)
Split Files (RELIABILITY command)
Example: Matrix Output to External File (RELIABILITY command)
Example: Matrix Output to Active Dataset (RELIABILITY command)
Example: Matrix Output to Active Dataset (RELIABILITY command)
Example: Matrix Input from External File (RELIABILITY command)
Example: Matrix Input from Working File (RELIABILITY command)


Example: Matrix Output to External File (RELIABILITY command)

DATA LIST / TIME1 TO TIME5 1-10.
BEGIN DATA
 0 0 0 0 0
 0 0 1 1 0
 0 0 1 1 1
 0 1 1 1 1
 0 0 0 0 1
 0 1 0 1 1
 0 0 1 1 1
 1 0 0 1 1
 1 1 1 1 1
 1 1 1 1 1
END DATA.
RELIABILITY  VARIABLES=TIME1 TO TIME5
  /MATRIX=OUT('/data/relmtx.sav').
LIST.

• RELIABILITY reads data from the active dataset and writes one set of matrix materials to file relmtx.sav.

• The active dataset is still the file defined by DATA LIST. Subsequent commands are executed in this file.

Related Topics

MATRIX Subcommand (RELIABILITY command)
Matrix Output (RELIABILITY command)
Matrix Input (RELIABILITY command)
Format of the Matrix Data File (RELIABILITY command)
Split Files (RELIABILITY command)
Missing Values (RELIABILITY command)
Example: Matrix Output to Active Dataset (RELIABILITY command)
Example: Matrix Output to Active Dataset (RELIABILITY command)
Example: Matrix Input from External File (RELIABILITY command)
Example: Matrix Input from Working File (RELIABILITY command)


Example: Matrix Output to Active Dataset (RELIABILITY command)

DATA LIST  / TIME1 TO TIME5 1-10.
BEGIN DATA
 0 0 0 0 0
 0 0 1 1 0
 0 0 1 1 1
 0 1 1 1 1
 0 0 0 0 1
 0 1 0 1 1
 0 0 1 1 1
 1 0 0 1 1
 1 1 1 1 1
 1 1 1 1 1
END DATA.
RELIABILITY  VARIABLES=TIME1 TO TIME5
  /MATRIX=OUT(*) NOPRINT.
LIST.

• RELIABILITY writes the same matrix as in the previous example. However, the matrix data file replaces the active dataset. The LIST command is executed in the matrix file, not in the file defined by DATA LIST.

• Because NOPRINT is specified on MATRIX, scale analyses are not displayed.

Related Topics

MATRIX Subcommand (RELIABILITY command)
Matrix Output (RELIABILITY command)
Matrix Input (RELIABILITY command)
Format of the Matrix Data File (RELIABILITY command)
Split Files (RELIABILITY command)
Missing Values (RELIABILITY command)
Example: Matrix Output to External File (RELIABILITY command)
Example: Matrix Output to Active Dataset (RELIABILITY command)
Example: Matrix Input from External File (RELIABILITY command)
Example: Matrix Input from Working File (RELIABILITY command)


Example: Matrix Output to Active Dataset (RELIABILITY command)

GET FILE='/data/relmtx.sav'.
RELIABILITY VARIABLES=ALL
  /MATRIX=IN(*).

• This example assumes that you are starting a new session and want to read an existing matrix data file. GET retrieves the matrix data file relmtx.sav.

• MATRIX=IN specifies an asterisk because the matrix data file is the active dataset. If MATRIX=IN('/data/relmtx.sav') is specified, an error message is issued.

• If the GET command is omitted, an error message is issued.

Related Topics

MATRIX Subcommand (RELIABILITY command)
Matrix Output (RELIABILITY command)
Matrix Input (RELIABILITY command)
Format of the Matrix Data File (RELIABILITY command)
Split Files (RELIABILITY command)
Missing Values (RELIABILITY command)
Example: Matrix Output to External File (RELIABILITY command)
Example: Matrix Output to Active Dataset (RELIABILITY command)
Example: Matrix Input from External File (RELIABILITY command)
Example: Matrix Input from Working File (RELIABILITY command)


Example: Matrix Input from External File (RELIABILITY command)

GET FILE='/data/personnel.sav'.
FREQUENCIES VARIABLE=AGE.

RELIABILITY VARIABLES=ALL
  /MATRIX=IN('/data/relmtx.sav').

• This example performs a frequencies analysis on file personnel.sav and then uses a different file containing matrix data for RELIABILITY. The file is an existing matrix data file. In order for this to work, the analysis variables named in relmtx.sav must also exist in personnel.sav.

• relmtx.sav must have records of type N, MEAN, STDDEV, and CORR for each split-file group.

• relmtx.sav does not replace personnel.sav as the active dataset.

Related Topics

MATRIX Subcommand (RELIABILITY command)
Matrix Output (RELIABILITY command)
Matrix Input (RELIABILITY command)
Format of the Matrix Data File (RELIABILITY command)
Split Files (RELIABILITY command)
Missing Values (RELIABILITY command)
Example: Matrix Output to External File (RELIABILITY command)
Example: Matrix Output to Active Dataset (RELIABILITY command)
Example: Matrix Output to Active Dataset (RELIABILITY command)
Example: Matrix Input from Working File (RELIABILITY command)


Example: Matrix Input from Working File (RELIABILITY command)

GET FILE='/data/personnel.sav'.
CORRELATIONS VARIABLES=V1 TO V5
  /MATRIX=OUT(*).
RELIABILITY VARIABLES=V1 TO V5
  /MATRIX=IN(*).

• RELIABILITY uses matrix input from procedure CORRELATIONS. An asterisk is used to specify the active dataset for both the matrix output from CORRELATIONS and the matrix input for RELIABILITY.

Related Topics

MATRIX Subcommand (RELIABILITY command)
Matrix Output (RELIABILITY command)
Matrix Input (RELIABILITY command)
Format of the Matrix Data File (RELIABILITY command)
Split Files (RELIABILITY command)
Missing Values (RELIABILITY command)
Example: Matrix Output to External File (RELIABILITY command)
Example: Matrix Output to Active Dataset (RELIABILITY command)
Example: Matrix Output to Active Dataset (RELIABILITY command)
Example: Matrix Input from External File (RELIABILITY command)


RENAME VARIABLES

RENAME VARIABLES (command),RENAME VARIABLES (command),RENAME VARIABLES (command)
RENAME VARIABLES (command),RENAME VARIABLES (command),RENAME VARIABLES (command)
syntax chart,syntax chart,syntax chart
RENAME VARIABLES {(varname=varname)  [(varname ...)]}
                 {(varnames=varnames)               }

This command takes effect immediately. It does not read the active dataset or execute pending transformations. See the topic Command Order for more information.

Example

RENAME VARIABLES (JOBCAT=TITLE).

Variables can also be renamed from the Variable View tab.

Related Topics

Overview (RENAME VARIABLES command)
Examples (RENAME VARIABLES command)
Mixed Case Variable Names (RENAME VARIABLES command)


Overview (RENAME VARIABLES command)

TO (keyword),TO (keyword),TO (keyword)
RENAME VARIABLES command,RENAME VARIABLES command,RENAME VARIABLES command

RENAME VARIABLES changes the names of variables in the active dataset while preserving their original order, values, variable labels, value labels, missing values, and print and write formats.

Basic Specification Collapse Hide details

Basic Specification

• The basic specification is an old variable name, an equals sign, and the new variable name. The equals sign is required.

Syntax Rules Collapse Hide details

Syntax Rules

• Multiple sets of variable specifications are allowed. Each set can be enclosed in parentheses.

• You can specify a list of old variable names followed by an equals sign and a list of new variable names. The same number of variables must be specified on both lists. A single set of parentheses enclosing the entire specification is required for this method.

• Keyword TO can be used on the left side of the equals sign to refer to variables in the active dataset, and on the right side of the equals sign to generate new variable names.

• Old variable names do not need to be specified according to their order in the active dataset.

• Name changes take place in one operation. Therefore, variable names can be exchanged between two variables (see the Examples).

• Multiple RENAME VARIABLES commands are allowed.

• RENAME VARIABLES cannot follow either a TEMPORARY or a MODEL PROGRAM command.

Related Topics

RENAME VARIABLES
Examples (RENAME VARIABLES command)
Mixed Case Variable Names (RENAME VARIABLES command)


Examples (RENAME VARIABLES command)

Renaming Multiple Variables

RENAME VARIABLES (MOHIRED=MOSTART) (YRHIRED=YRSTART).

• MOHIRED is renamed to MOSTART and YRHIRED to YRSTART. The parentheses are optional.

RENAME VARIABLES (MOHIRED YRHIRED=MOSTART YRSTART).

• The same name changes are specified as in the previous example. The parentheses are required, since variable lists are used.

Exchanging Variable Names

RENAME VARIABLES (A=B) (B=A).

• Variable names are exchanged between two variables: A is renamed to B, and B is renamed to A.

Related Topics

RENAME VARIABLES
Overview (RENAME VARIABLES command)
Mixed Case Variable Names (RENAME VARIABLES command)


Mixed Case Variable Names (RENAME VARIABLES command)

You can use the RENAME VARIABLES command to change the case of any characters in a variable name.

Example

RENAME VARIABLES (newvariable = NewVariable).

• For the existing variable name specification, case is ignored. Any combination of upper and lower case will work.

• For the new variable name, case will be preserved as entered for display purposes.

Related Topics

RENAME VARIABLES
Overview (RENAME VARIABLES command)
Examples (RENAME VARIABLES command)


REPEATING DATA

repeating data,repeating data,repeating data
repeating fields. See repeating data,repeating fields. See repeating data,repeating fields. See repeating data
REPEATING DATA (command),REPEATING DATA (command),REPEATING DATA (command)
REPEATING DATA (command),REPEATING DATA (command),REPEATING DATA (command)
syntax chart,syntax chart,syntax chart
REPEATING DATA [FILE=file]

 [/ENCODING='encoding specification']

 /STARTS=beg col[-end col] /OCCURS={value  }
                                   {varname}

 [/LENGTH={value  }] [/CONTINUED[=beg col[-end col]]]
          {varname}

 [/ID={col loc}=varname] [/{TABLE  }]
      {format }            {NOTABLE}

 /DATA=variable specifications
Release History Collapse Hide details

Release History

Release 16.0

• ENCODING subcommand added for Unicode support.

Example

INPUT PROGRAM.
DATA LIST / SEQNUM 2-4 NUMPERS 6-7 NUMVEH 9-10.
REPEATING DATA STARTS=12 /OCCURS=NUMVEH
 /DATA=MAKE 1-8 (A) MODEL 9 (A) NUMCYL 10.
END INPUT PROGRAM.

Related Topics

Overview (REPEATING DATA command)
Operations (REPEATING DATA command)
Examples (REPEATING DATA command)
STARTS Subcommand (REPEATING DATA command)
OCCURS Subcommand (REPEATING DATA command)
DATA Subcommand (REPEATING DATA command)
FILE Subcommand (REPEATING DATA command)
ENCODING Subcommand (REPEATING DATA command)
LENGTH Subcommand (REPEATING DATA command)
CONTINUED Subcommand (REPEATING DATA command)
ID Subcommand (REPEATING DATA command)
TABLE and NOTABLE Subcommands (REPEATING DATA command)


Overview (REPEATING DATA command)

REPEATING DATA (command),REPEATING DATA (command),REPEATING DATA (command)
with FILE TYPE command,with FILE TYPE command,with FILE TYPE command
FILE TYPE (command),FILE TYPE (command),FILE TYPE (command)
with REPEATING DATA command,with REPEATING DATA command,with REPEATING DATA command
INPUT PROGRAM (command),INPUT PROGRAM (command),INPUT PROGRAM (command)
with REPEATING DATA command,with REPEATING DATA command,with REPEATING DATA command
REPEATING DATA (command),REPEATING DATA (command),REPEATING DATA (command)
with INPUT PROGRAM command,with INPUT PROGRAM command,with INPUT PROGRAM command
REPEATING DATA (command),REPEATING DATA (command),REPEATING DATA (command)
with DATA LIST command,with DATA LIST command,with DATA LIST command
DATA LIST (command),DATA LIST (command),DATA LIST (command)
with REPEATING DATA command,with REPEATING DATA command,with REPEATING DATA command

REPEATING DATA reads input cases whose records contain repeating groups of data. For each repeating group, REPEATING DATA builds one output case in the active dataset. All of the repeating groups in the data must contain the same type of information, although the number of groups for each input case may vary. Information common to the repeating groups for each input case can be recorded once for that case and then spread to each resulting output case. In this respect, a file with a repeating data structure is like a hierarchical file with both levels of information recorded on a single record rather than on separate record types. For information on reading hierarchical files, see FILE TYPE—END FILE TYPE.

FILE TYPE (command),FILE TYPE (command),FILE TYPE (command)
with REPEATING DATA command,with REPEATING DATA command,with REPEATING DATA command
REPEATING DATA (command),REPEATING DATA (command),REPEATING DATA (command)
with FILE TYPE command,with FILE TYPE command,with FILE TYPE command
REPEATING DATA (command),REPEATING DATA (command),REPEATING DATA (command)
with INPUT PROGRAM command,with INPUT PROGRAM command,with INPUT PROGRAM command
INPUT PROGRAM (command),INPUT PROGRAM (command),INPUT PROGRAM (command)
with REPEATING DATA command,with REPEATING DATA command,with REPEATING DATA command
DATA LIST (command),DATA LIST (command),DATA LIST (command)
with REPEATING DATA command,with REPEATING DATA command,with REPEATING DATA command
REPEATING DATA (command),REPEATING DATA (command),REPEATING DATA (command)
with DATA LIST command,with DATA LIST command,with DATA LIST command

REPEATING DATA must be used within an INPUT PROGRAM structure or within a FILE TYPE structure with mixed or nested data. In an INPUT PROGRAM structure, REPEATING DATA must be preceded by a DATA LIST command. In a FILE TYPE structure, DATA LIST is needed only if there are variables to be spread to each resulting output case.

Options Collapse Hide details

Options

Length of Repeating Groups. If the length of the repeating groups varies across input cases, you can specify a variable that indicates the length on the LENGTH subcommand. You can also use LENGTH if you do not want to read all the data in each repeating group.

Continuation Records. You can use the CONTINUED subcommand to indicate that the repeating groups for each input case are contained on more than one record. You can check the value of an identification variable across records for the same input case using the ID subcommand.

Summary Tables. You can suppress the display of the table that summarizes the names, locations, and formats of the variables specified on the DATA subcommand using the NOTABLE subcommand.

Basic Specification Collapse Hide details

Basic Specification

The basic specification requires three subcommands: STARTS, OCCURS, and DATA.

• STARTS specifies the beginning column of the repeating data segments. When there are continuation records, STARTS can specify the ending column of the last repeating group on the first record of each input case.

• OCCURS specifies the number of repeating groups on each input case. OCCURS can specify a number if the number of repeating groups is the same for all input cases. Otherwise, OCCURS should specify the name of a variable whose value for each input case indicates the number of repeating groups for that case.

• DATA specifies names, location within the repeating segment, and format for each variable to be read from the repeated groups.

Subcommand Order Collapse Hide details

Subcommand Order

• DATA must be the last subcommand specified on REPEATING DATA.

• The remaining subcommands can be named in any order.

Syntax Rules Collapse Hide details

Syntax Rules

• REPEATING DATA can be specified only within an INPUT PROGRAM structure, or within a FILE TYPE structure with mixed or nested data. DATA LIST, REPEATING DATA, and any transformation commands used to build the output cases must be placed within the INPUT PROGRAM or FILE TYPE structure. Transformations that apply to the output cases should be specified after the END INPUT PROGRAM or END FILE TYPE command.

• LENGTH must be used if the last variable specified on the DATA subcommand is not read from the last position of each repeating group or if the length of the repeating groups varies across input cases.

• CONTINUED must be used if repeating groups for each input case are continued on successive records.

• The DATA LIST command used with REPEATING DATA must define all fixed-format data for the records.

• Repeating groups are usually recorded at the end of the fixed-format records, but fixed-format data may follow the repeating data in data structures such as IBM SMF and RMF records. Use the following sequence in such cases.

DATA LIST .../* Read the fixed-format data before repeating data
REREAD COLUMNS= .../* Skip repeating data
DATA LIST .../* Read the fixed-format data after repeating data
REPEATING DATA ... /*Read repeating data

Related Topics

REPEATING DATA
Operations (REPEATING DATA command)
Examples (REPEATING DATA command)
STARTS Subcommand (REPEATING DATA command)
OCCURS Subcommand (REPEATING DATA command)
DATA Subcommand (REPEATING DATA command)
FILE Subcommand (REPEATING DATA command)
ENCODING Subcommand (REPEATING DATA command)
LENGTH Subcommand (REPEATING DATA command)
CONTINUED Subcommand (REPEATING DATA command)
ID Subcommand (REPEATING DATA command)
TABLE and NOTABLE Subcommands (REPEATING DATA command)


Operations (REPEATING DATA command)

• Fixed-location data specified on the DATA LIST are spread to each output case.

• If LENGTH is not specified, the program uses the default length for repeating data groups, which is determined from specifications on the DATA subcommand. For more information on the default length, see the LENGTH subcommand.

Related Topics

REPEATING DATA
Overview (REPEATING DATA command)
Examples (REPEATING DATA command)
STARTS Subcommand (REPEATING DATA command)
OCCURS Subcommand (REPEATING DATA command)
DATA Subcommand (REPEATING DATA command)
FILE Subcommand (REPEATING DATA command)
ENCODING Subcommand (REPEATING DATA command)
LENGTH Subcommand (REPEATING DATA command)
CONTINUED Subcommand (REPEATING DATA command)
ID Subcommand (REPEATING DATA command)
TABLE and NOTABLE Subcommands (REPEATING DATA command)
Cases Generated (REPEATING DATA command)
Records Read (REPEATING DATA command)
Reading Past End of Record (REPEATING DATA command)


Cases Generated (REPEATING DATA command)

• The number of output cases generated is the number specified on the OCCURS subcommand. Physical record length or whether fields are non-blank does not affect the number of cases generated.

• If the number specified for OCCURS is nonpositive or missing, no cases are generated.

Related Topics

Operations (REPEATING DATA command)
Records Read (REPEATING DATA command)
Reading Past End of Record (REPEATING DATA command)


Records Read (REPEATING DATA command)

• If CONTINUED is not specified, all repeating groups are read from the first record of each input case.

• If CONTINUED is specified, the first continuation record is read when the first record for the input case is exhausted, that is, when the next repeating group would extend past the end of the record. The ending column for the first record is defined on STARTS. If the ending column is not specified on STARTS, the logical record length is used.

• Subsequent continuation records are read when the current continuation record is exhausted. Exhaustion of the current continuation record is detected when the next repeating group would extend past the end of the record. The ending column for continuation records is defined on CONTINUED. If the ending column is not specified on CONTINUED, the logical record length is used.

• For inline data, the record length is always 80. For data stored in a file, the record length is generally whatever was specified on the FILE HANDLE command or the default of 1024. Shorter records are extended with blanks when they are read. For IBM implementations, the physical record length is available and is used.

Related Topics

Operations (REPEATING DATA command)
Cases Generated (REPEATING DATA command)
Reading Past End of Record (REPEATING DATA command)


Reading Past End of Record (REPEATING DATA command)

If one or more fields extend past the end of the actual record, or if CONTINUED is specified and the ending column specified on either STARTS or CONTINUED is beyond the end of the actual record, the program takes the following action:

• For string data with format A, the data record is considered to be extended logically with blanks. If the entire field lies past the end of the record, the resulting value will be all blanks.

• For numeric data, a warning is issued and the resulting value is system-missing.

Related Topics

Operations (REPEATING DATA command)
Cases Generated (REPEATING DATA command)
Records Read (REPEATING DATA command)


Examples (REPEATING DATA command)

REPEATING DATA (command),REPEATING DATA (command),REPEATING DATA (command)
with INPUT PROGRAM command,with INPUT PROGRAM command,with INPUT PROGRAM command
INPUT PROGRAM (command),INPUT PROGRAM (command),INPUT PROGRAM (command)
with REPEATING DATA command,with REPEATING DATA command,with REPEATING DATA command
REPEATING DATA (command),REPEATING DATA (command),REPEATING DATA (command)
with DATA LIST command,with DATA LIST command,with DATA LIST command
DATA LIST (command),DATA LIST (command),DATA LIST (command)
with REPEATING DATA command,with REPEATING DATA command,with REPEATING DATA command
FILE TYPE (command),FILE TYPE (command),FILE TYPE (command)
with REPEATING DATA command,with REPEATING DATA command,with REPEATING DATA command
REPEATING DATA (command),REPEATING DATA (command),REPEATING DATA (command)
with FILE TYPE command,with FILE TYPE command,with FILE TYPE command

Basic Example

* Build a file with each case representing one vehicle and
  spread information about the household to each case.

INPUT PROGRAM.
DATA LIST / SEQNUM 2-4 NUMPERS 6-7 NUMVEH 9-10.
REPEATING DATA STARTS=12 /OCCURS=NUMVEH
 /DATA=MAKE 1-8 (A) MODEL 9 (A) NUMCYL 10.
END INPUT PROGRAM.

BEGIN DATA
1001 02 02 FORD    T8PONTIAC C6
1002 04 01 CHEVY   C4
1003 02 03 CADILAC C8FORD    T6VW      C4
END DATA.
LIST.

• Data are extracted from a file representing household records. Each input case is recorded on a single record; there are no continuation records.

• The total number of persons living in the house and number of vehicles owned by the household is recorded on each record. The first field of numbers (columns 1–4) for each record is an identification number unique to each record. The next two fields of numbers are number of persons in household and number of vehicles. The remainder of the record contains repeating groups of information about each vehicle: the make of vehicle, model, and number of cylinders.

• INPUT PROGRAM indicates the beginning of the input program and END INPUT PROGRAM indicates the end of the input program.

• DATA LIST reads the variables from the household portion of the record. All fixed-format variables are defined on DATA LIST.

• REPEATING DATA reads the information from the repeating groups and builds the output cases. Repeating groups start in column 12. The number of repeating groups for each input case is given by the value of variable NUMVEH. Three variables are defined for each repeating group: MAKE, MODEL, and NUMCYL.

• The first input record contains two repeating groups, producing two output cases in the active dataset. One output case is built from the second input record which contains information on one vehicle, and three output cases are built from the third record. The values of the fixed-format variables defined on DATA LIST are spread to every new case built in the active dataset. Six cases result, as shown below.

SEQNUM NUMPERS NUMVEH MAKE     MODEL NUMCYL

    1      2      2   FORD     T        8
    1      2      2   PONTIAC  C        6
    2      4      1   CHEVY    C        4
    3      2      3   CADILAC  C        8
    3      2      3   FORD     T        6
    3      2      3   VW       C        4

 NUMBER OF CASES READ =       6    NUMBER OF CASES LISTED =       6

Using REPEATING DATA With Mixed File Types

* Use REPEATING DATA with FILE TYPE MIXED: read only type 3 records.

FILE TYPE  MIXED RECORD=#SEQNUM 2-4.
RECORD TYPE 003.
REPEATING DATA STARTS=12 /OCCURS=3
 /DATA=MAKE 1-8(A) MODEL 9(A) NUMCYL 10.
END FILE.
END FILE TYPE.

BEGIN DATA
1001 02 02 FORD    T8PONTIAC C6
1002 04 01 CHEVY   C4
1003 02 03 CADILAC C8FORD    T6VW      C4
END DATA.
LIST.

• The task in this example is to read only the repeating data for records with value 003 for variable #SEQNUM.

• REPEATING DATA is used within a FILE TYPE structure, which specifies a mixed file type. The record identification variable #SEQNUM is located in columns 2–4.

• RECORD TYPE specifies that only records with value 003 for #SEQNUM are copied into the active dataset. All other records are skipped.

• REPEATING DATA indicates that the repeating groups start in column 12. The OCCURS subcommand indicates there are three repeating groups on each input case, and the DATA subcommand specifies names, locations, and formats for the variables in the repeating groups.

• The DATA LIST command is not required in this example, since none of the information on the input case is being spread to the output cases. However, if there were multiple input cases with value 003 for #SEQNUM and they did not all have three repeating groups, DATA LIST would be required to define a variable whose value for each input case indicated the number of repeating groups for that case. This variable would then be specified on the OCCURS subcommand.

Using Transformations With REPEATING DATA

INPUT PROGRAM.
DATA LIST / PARENTID 1 DATE 3-6 NCHILD 8.
REPEATING DATA STARTS=9 /OCCURS=NCHILD
 /DATA=BIRTHDAY 2-5 VACDATE 7-10.
END INPUT PROGRAM.

COMPUTE AGE=DATE - BIRTHDAY.
COMPUTE VACAGE=VACDATE - BIRTHDAY.

DO IF PARENTID NE LAG(PARENTID,1) OR $CASENUM EQ 1.
COMPUTE CHILD=1.
ELSE.
COMPUTE CHILD=LAG(CHILD,1)+1.
END IF.
FORMAT AGE VACAGE CHILD (F2).

BEGIN DATA
1 1987 2 1981 1983 1982 1984
2 1988 1 1979 1984
3 1988 3 1978 1981 1981 1986 1983 1986
4 1988 1 1984 1987
END DATA.
LIST.

• Data are from a file that contains information on parents within a school district. Each input case is recorded on a single record; there are no continuation records.

• Each record identifies the parents by a number and indicates how many children they have. The repeating groups give the year of birth and year of vaccination for each child.

• REPEATING DATA indicates that the repeating groups begin in column 9. The value of NCHILD indicates how many repeating groups there are for each record.

• The first two COMPUTE commands compute the age for each child and age at vaccination. These transformation commands are specified outside the input program.

• Because the repeating groups do not have descriptive values, the DO IF structure computes variable CHILD to distinguish between the first-born child, second-born child, and so forth. The value for CHILD will be 1 for the first-born, 2 for the second-born, and so forth. The LIST output is shown below.

PARENTID DATE NCHILD BIRTHDAY VACDATE AGE VACAGE CHILD

    1    1987    2     1981     1983    6    2      1
    1    1987    2     1982     1984    5    2      2
    2    1988    1     1979     1984    9    5      1
    3    1988    3     1978     1981   10    3      1
    3    1988    3     1981     1986    7    5      2
    3    1988    3     1983     1986    5    3      3
    4    1988    1     1984     1987    4    3      1

NUMBER OF CASES READ =       7    NUMBER OF CASES LISTED =       7

Related Topics

REPEATING DATA
Overview (REPEATING DATA command)
Operations (REPEATING DATA command)
STARTS Subcommand (REPEATING DATA command)
OCCURS Subcommand (REPEATING DATA command)
DATA Subcommand (REPEATING DATA command)
FILE Subcommand (REPEATING DATA command)
ENCODING Subcommand (REPEATING DATA command)
LENGTH Subcommand (REPEATING DATA command)
CONTINUED Subcommand (REPEATING DATA command)
ID Subcommand (REPEATING DATA command)
TABLE and NOTABLE Subcommands (REPEATING DATA command)


STARTS Subcommand (REPEATING DATA command)

STARTS (subcommand),STARTS (subcommand),STARTS (subcommand)
REPEATING DATA command,REPEATING DATA command,REPEATING DATA command
REPEATING DATA (command),REPEATING DATA (command),REPEATING DATA (command)
STARTS subcommand,STARTS subcommand,STARTS subcommand
repeating data,repeating data,repeating data
starting column,starting column,starting column

STARTS indicates the beginning location of the repeating data segment on the first record of each input case. STARTS is required and can specify either a number or a variable name.

• If the repeating groups on the first record of each input case begin in the same column, STARTS specifies a column number.

• If the repeating groups on the first record of each input case do not begin in the same column, STARTS specifies the name of a variable whose value for each input case indicates the beginning location of the repeating groups on the first record. The variable can be defined on DATA LIST or created by transformation commands that precede REPEATING DATA.

• When repeating groups are continued on multiple records for each input case, STARTS must also specify an ending location if there is room on the logical record length for more repeating groups than are contained on the first record of each input case. The ending column applies only to the first record of each input case. See the CONTINUED subcommand for an example.

• The ending column can be specified as a number or a variable name. Specifications for the beginning column and the ending column are separated by a hyphen. The values of the variable used to define the ending column must be valid values and must be larger than the starting value.

• If the variable specified for the ending column is undefined or missing for an input case, the program displays a warning message and builds no output cases from that input case. If the variable specified for the ending column on STARTS has a value that is less than the value specified for the starting column, the program issues a warning and builds output cases only from the continuation records of that input case; it does not build cases from the first record of the case.

• If the ending location is required but not supplied, the program generates output cases with system-missing values for the variables specified on the DATA subcommand and may misread all data after the first or second record in the data file (see the CONTINUED subcommand).

Repeating Groups in the Same Location

INPUT PROGRAM.
DATA LIST FILE=VEHICLE / SEQNUM 2-4 NUMPERS 6-7 NUMVEH 9-10.
REPEATING DATA STARTS=12 /OCCURS=NUMVEH
 /DATA=MAKE 1-8 (A) MODEL 9 (A) NUMCYL 10.
END INPUT PROGRAM.

• STARTS specifies column number 12. The repeating groups must therefore start in column 12 of the first record of each input case.

Repeating Groups in Varying Locations

INPUT PROGRAM.
DATA LIST FILE=VEHICLE / SEQNUM 2-4 NUMPERS 6-7 NUMVEH 9-10.
+    DO IF   (SEQNUM LE 100).
+    COMPUTE FIRST=12.
+    ELSE.
+    COMPUTE FIRST=15.
+    END IF.
REPEATING DATA STARTS=FIRST /OCCURS=NUMVEH
 /DATA=MAKE 1-8 (A) MODEL 9 (A) NUMCYL 10.
END INPUT PROGRAM.

• This example assumes that each input case is recorded on a single record and that there are no continuation records. Repeating groups begin in column 12 for all records with sequence numbers 1 through 100 and in column 15 for all records with sequence numbers greater than 100.

• The sequence number for each record is defined as variable SEQNUM on the DATA LIST command. The DO IF—END IF structure creates the variable FIRST with value 12 for records with sequence numbers through 100 and value 15 for records with sequence numbers greater than 100.

• Variable FIRST is specified on the STARTS subcommand.

Related Topics

REPEATING DATA
Overview (REPEATING DATA command)
Operations (REPEATING DATA command)
Examples (REPEATING DATA command)
OCCURS Subcommand (REPEATING DATA command)
DATA Subcommand (REPEATING DATA command)
FILE Subcommand (REPEATING DATA command)
ENCODING Subcommand (REPEATING DATA command)
LENGTH Subcommand (REPEATING DATA command)
CONTINUED Subcommand (REPEATING DATA command)
ID Subcommand (REPEATING DATA command)
TABLE and NOTABLE Subcommands (REPEATING DATA command)


OCCURS Subcommand (REPEATING DATA command)

OCCURS (subcommand),OCCURS (subcommand),OCCURS (subcommand)
REPEATING DATA command,REPEATING DATA command,REPEATING DATA command
REPEATING DATA (command),REPEATING DATA (command),REPEATING DATA (command)
OCCURS subcommand,OCCURS subcommand,OCCURS subcommand
repeating data,repeating data,repeating data
repeating groups,repeating groups,repeating groups

OCCURS specifies the number of repeating groups for each input case. OCCURS is required and specifies a number if the number of groups is the same for all input cases or a variable if the number of groups varies across input cases. The variable must be defined on a DATA LIST command or created with transformation commands.

Specifying the Number of Repeating Groups Using a Data Field

INPUT PROGRAM.
DATA LIST / SEQNUM 2-4 NUMPERS 6-7 NUMVEH 9-10.
REPEATING DATA STARTS=12 /OCCURS=NUMVEH
 /DATA=MAKE 1-8 (A) MODEL 9 (A) NUMCYL 10.
END INPUT PROGRAM.

BEGIN DATA
1001 02 02 FORD    T8PONTIAC C6
1002 04 01 CHEVY   C4
1003 02 03 CADILAC C8FORD    T6VW      C4
END DATA.
LIST.

• Data for each input case are recorded on a single record; there are no continuation records.

• The value for variable NUMVEH in columns 9 and 10 indicates the number of repeating groups on each record. One output case is built in the active dataset for each occurrence of a repeating group.

• In the data, NUMVEH has the value 2 for the first case, 1 for the second, and 3 for the third. Thus, six cases are built from these records. If the value of NUMVEH is 0, no cases are built from that record.

Specifying a Fixed Number of Repeating Groups

* Read only the first repeating group from each record.

INPUT PROGRAM.
DATA LIST FILE=VEHICLE / SEQNUM 2-4 NUMPERS 6-7 NUMVEH 9-10.
REPEATING DATA STARTS=12 /OCCURS=1
 /DATA=MAKE 1-8 (A) MODEL 9 (A) NUMCYL 10.
END INPUT PROGRAM.
LIST.

• Since OCCURS specifies that there is only one repeating group for each input case, only one output case is built from each input case regardless of the actual number of repeating groups.

Related Topics

REPEATING DATA
Overview (REPEATING DATA command)
Operations (REPEATING DATA command)
Examples (REPEATING DATA command)
STARTS Subcommand (REPEATING DATA command)
DATA Subcommand (REPEATING DATA command)
FILE Subcommand (REPEATING DATA command)
ENCODING Subcommand (REPEATING DATA command)
LENGTH Subcommand (REPEATING DATA command)
CONTINUED Subcommand (REPEATING DATA command)
ID Subcommand (REPEATING DATA command)
TABLE and NOTABLE Subcommands (REPEATING DATA command)


DATA Subcommand (REPEATING DATA command)

DATA (subcommand),DATA (subcommand),DATA (subcommand)
REPEATING DATA command,REPEATING DATA command,REPEATING DATA command
REPEATING DATA (command),REPEATING DATA (command),REPEATING DATA (command)
DATA subcommand,DATA subcommand,DATA subcommand
repeating data,repeating data,repeating data
defining variables,defining variables,defining variables

DATA specifies a name, location within each repeating segment, and format for each variable to be read from the repeating groups. DATA is required and must be the last subcommand on REPEATING DATA.

• The specifications for DATA are the same as for the DATA LIST command.

• The specified location of the variables on DATA is their location within each repeating group—not their location within the record.

• Any input format available on the DATA LIST command can be specified on the DATA subcommand. Both FORTRAN-like and the column-style specifications can be used.

Example

INPUT PROGRAM.
DATA LIST FILE=VEHICLE / SEQNUM 2-4 NUMPERS 6-7 NUMVEH 9-10.
REPEATING DATA STARTS=12 /OCCURS=NUMVEH
 /DATA=MAKE 1-8 (A) MODEL 9 (A) NUMCYL 10.
END INPUT PROGRAM.
LIST.

• Variable MAKE is a string variable read from positions 1 through 8 of each repeating group; MODEL is a single-character string variable read from position 9; and NUMCYL is a one-digit numeric variable read from position 10.

• The DATA LIST command defines variables SEQNUM, NUMPERS, and NUMVEH. These variables are spread to each output case built from the repeating groups.

Related Topics

REPEATING DATA
Overview (REPEATING DATA command)
Operations (REPEATING DATA command)
Examples (REPEATING DATA command)
STARTS Subcommand (REPEATING DATA command)
OCCURS Subcommand (REPEATING DATA command)
FILE Subcommand (REPEATING DATA command)
ENCODING Subcommand (REPEATING DATA command)
LENGTH Subcommand (REPEATING DATA command)
CONTINUED Subcommand (REPEATING DATA command)
ID Subcommand (REPEATING DATA command)
TABLE and NOTABLE Subcommands (REPEATING DATA command)


FILE Subcommand (REPEATING DATA command)

FILE (subcommand),FILE (subcommand),FILE (subcommand)
REPEATING DATA command,REPEATING DATA command,REPEATING DATA command
REPEATING DATA (command),REPEATING DATA (command),REPEATING DATA (command)
FILE subcommand,FILE subcommand,FILE subcommand
repeating data,repeating data,repeating data
input file,input file,input file

REPEATING DATA always reads the file specified on its associated DATA LIST or FILE TYPE command. The FILE subcommand on REPEATING DATA explicitly specifies the name of the file.

• FILE must specify the same file as its associated DATA LIST or FILE TYPE command.

Example

INPUT PROGRAM.
DATA LIST FILE=VEHICLE / SEQNUM 2-4 NUMPERS 6-7 NUMVEH 9-10.
REPEATING DATA FILE=VEHICLE /STARTS=12 /OCCURS=NUMVEH
 /DATA=MAKE 1-8 (A) MODEL 9 (A) NUMCYL 10.
END INPUT PROGRAM.
LIST.

• FILE on REPEATING DATA specifically identifies the VEHICLE file, which is also specified on the DATA LIST command.

Related Topics

REPEATING DATA
Overview (REPEATING DATA command)
Operations (REPEATING DATA command)
Examples (REPEATING DATA command)
STARTS Subcommand (REPEATING DATA command)
OCCURS Subcommand (REPEATING DATA command)
DATA Subcommand (REPEATING DATA command)
ENCODING Subcommand (REPEATING DATA command)
LENGTH Subcommand (REPEATING DATA command)
CONTINUED Subcommand (REPEATING DATA command)
ID Subcommand (REPEATING DATA command)
TABLE and NOTABLE Subcommands (REPEATING DATA command)


ENCODING Subcommand (REPEATING DATA command)

ENCODING (subcommand),ENCODING (subcommand),ENCODING (subcommand)
REPEATING DATA command,REPEATING DATA command,REPEATING DATA command
REPEATING DATA (command),REPEATING DATA (command),REPEATING DATA (command)
ENCODING subcommand,ENCODING subcommand,ENCODING subcommand

ENCODING specifies the encoding format of the file. The keyword is followed by an equals sign and a quoted encoding specification.

• In Unicode mode, the default is UTF8. For more information, see SET command, UNICODE subcommand.

• In code page mode, the default is the current locale setting. For more information, see SET command, LOCALE subcommand.

• The quoted encoding value can be: Locale (the current locale setting), UTF8, UTF16, UTF16BE (big endian), UTF16LE (little endian), a numeric Windows code page value (for example, '1252'), or an IANA code page value (for example, 'iso8859-1' or cp1252).

• In Unicode mode, the defined width of string variables is tripled for code page and UTF-16 text data files. Use ALTER TYPE to automatically adjust the defined width of string variables.

Related Topics

REPEATING DATA
Overview (REPEATING DATA command)
Operations (REPEATING DATA command)
Examples (REPEATING DATA command)
STARTS Subcommand (REPEATING DATA command)
OCCURS Subcommand (REPEATING DATA command)
DATA Subcommand (REPEATING DATA command)
FILE Subcommand (REPEATING DATA command)
LENGTH Subcommand (REPEATING DATA command)
CONTINUED Subcommand (REPEATING DATA command)
ID Subcommand (REPEATING DATA command)
TABLE and NOTABLE Subcommands (REPEATING DATA command)


LENGTH Subcommand (REPEATING DATA command)

LENGTH (subcommand),LENGTH (subcommand),LENGTH (subcommand)
REPEATING DATA command,REPEATING DATA command,REPEATING DATA command
REPEATING DATA (command),REPEATING DATA (command),REPEATING DATA (command)
LENGTH subcommand,LENGTH subcommand,LENGTH subcommand

LENGTH specifies the length of each repeating data group. The default length is the number of columns between the beginning column of the repeating data groups and the ending position of the last variable specified on DATA. (For the first record of each input case, STARTS specifies the beginning column of the repeating groups. For continuation records, repeating groups are read from column 1 by default or from the column specified on CONTINUED.)

• The specification on LENGTH can be a number or the name of a variable.

• LENGTH must be used if the last variable specified on the DATA subcommand is not read from the last position of each repeating group, or if the length of the repeating groups varies across input cases.

• If the length of the repeating groups varies across input cases, the specification must be a variable whose value for each input case is the length of the repeating groups for that case. The variable can be defined on DATA LIST or created with transformation commands.

• If the value of the variable specified on LENGTH is undefined or missing for an input case, the program displays a warning message and builds only one output case for that input case.

Example

* Read only the variable MAKE for each vehicle.

* The data contain two values that are not specified on the
  DATA subcommand.  The first is in position 9 of the repeating
  groups, and the second is in position 10.

INPUT PROGRAM.
DATA LIST FILE=VEHICLE / SEQNUM 2-4 NUMPERS 6-7 NUMVEH 9-10.
REPEATING DATA STARTS=12 /OCCURS=NUMVEH /LENGTH=10
 /DATA=MAKE 1-8 (A).
END INPUT PROGRAM.

• LENGTH indicates that each repeating group is 10 columns long. LENGTH is required because MAKE is not read from the last position of each repeating group. As illustrated in previous examples, each repeating group also includes variable MODEL (position 9) and NUMCYL (position 10).

• DATA specifies that MAKE is in positions 1 through 8 of each repeating group. Positions 9 and 10 of each repeating group are skipped.

Related Topics

REPEATING DATA
Overview (REPEATING DATA command)
Operations (REPEATING DATA command)
Examples (REPEATING DATA command)
STARTS Subcommand (REPEATING DATA command)
OCCURS Subcommand (REPEATING DATA command)
DATA Subcommand (REPEATING DATA command)
FILE Subcommand (REPEATING DATA command)
ENCODING Subcommand (REPEATING DATA command)
CONTINUED Subcommand (REPEATING DATA command)
ID Subcommand (REPEATING DATA command)
TABLE and NOTABLE Subcommands (REPEATING DATA command)


CONTINUED Subcommand (REPEATING DATA command)

CONTINUED (subcommand),CONTINUED (subcommand),CONTINUED (subcommand)
REPEATING DATA command,REPEATING DATA command,REPEATING DATA command
REPEATING DATA (command),REPEATING DATA (command),REPEATING DATA (command)
CONTINUED subcommand,CONTINUED subcommand,CONTINUED subcommand

CONTINUED indicates that the repeating groups are contained on more than one record for each input case.

• Each repeating group must be fully recorded on a single record: a repeating group cannot be split across records.

• The repeating groups must begin in the same column on all continuation records.

• If CONTINUED is specified without beginning and ending columns, the program assumes that the repeating groups begin in column 1 of continuation records and searches for repeating groups by scanning to the end of the record or to the value specified by OCCURS. See the topic Operations (REPEATING DATA command) for more information.

• If the repeating groups on continuation records do not begin in column 1, CONTINUED must specify the column in which the repeating groups begin.

• If there is room on the logical record length for more repeating groups than are contained on the first record of each input case, the STARTS subcommand must indicate an ending column for the records. The ending column on STARTS applies only to the first record of each input case.

• If there is room on the logical record length for more repeating groups than are contained on the continuation records of each input case, the CONTINUED subcommand must indicate an ending column. The ending column on CONTINUED applies to all continuation records.

Basic Example

* This example assumes the logical record length is 80.

INPUT PROGRAM.
DATA LIST / ORDERID 1-5 NITEMS 7-8.
REPEATING DATA STARTS=10 /OCCURS=NITEMS /CONTINUED=7
 /DATA=ITEM 1-9 (A) QUANTITY 11-13 PRICE (DOLLAR7.2,1X).
END INPUT PROGRAM.

BEGIN DATA
10020 07 01-923-89 001  25.99 02-899-56 100 101.99 03-574-54 064  61.29
10020 04-780-32 025  13.95 05-756-90 005  56.75 06-323-47 003  23.74
10020 07-350-95 014  11.46
20030 04 01-781-43 010  10.97 02-236-54 075 105.95 03-655-83 054  22.99
20030 04-569-38 015  75.00
END DATA.
LIST.

• Data are extracted from a mail-order file. Each input case represents one complete order. The data show two complete orders recorded on a total of five records.

• The order number is recorded in columns 1 through 5 of each record. The first three records contain information for order 10020; the next two records contain information for order 20030. The second field of numbers on the first record of each order indicates the total number of items ordered. The repeating groups begin in column 10 on the first record and in column 7 on continuation records. Each repeating data group represents one item ordered and contains three variables—the item inventory number, the quantity ordered, and the price.

• DATA LIST defines variables ORDERID and NITEMS on the first record of each input case.

• STARTS on REPEATING DATA indicates that the repeating groups on the first record of each input case begin in column 10.

• OCCURS indicates that the total number of repeating groups for each input case is the value of NITEMS.

• CONTINUED must be used because the repeating groups are continued on more than one record for each input case. CONTINUED specifies a beginning column because the repeating groups begin in column 7 rather than in column 1 on the continuation records.

• DATA defines variables ITEM, QUANTITY, and PRICE for each repeating data group. ITEM is in positions 1–9, QUANTITY is in positions 11–13, and PRICE is in positions 14–20 and is followed by one blank column. The length of the repeating groups is therefore 21 columns. The LIST output is shown below.

ORDERID NITEMS ITEM      QUANTITY      PRICE

 10020     7   01-923-89      1       $25.99
 10020     7   02-899-56    100      $101.99
 10020     7   03-574-54     64       $61.29
 10020     7   04-780-32     25       $13.95
 10020     7   05-756-90      5       $56.75
 10020     7   06-323-47      3       $23.74
 10020     7   07-350-95     14       $11.46
 20030     4   01-781-43     10       $10.97
 20030     4   02-236-54     75      $105.95
 20030     4   03-655-83     54       $22.99
 20030     4   04-569-38     15       $75.00

NUMBER OF CASES READ =      11    NUMBER OF CASES LISTED =      11

Specifying an Ending Column on the STARTS Subcommand

* This example assumes the logical record length is 80.

INPUT PROGRAM.
DATA LIST / ORDERID 1-5 NITEMS 7-8.
REPEATING DATA STARTS=10-55 /OCCURS=NITEMS /CONTINUED=7
 /DATA=ITEM 1-9 (A) QUANTITY 11-13 PRICE (DOLLAR7.2,1X).
END INPUT PROGRAM.

BEGIN DATA
10020 07 01-923-89 001  25.99 02-899-56 100 101.99
10020 03-574-54 064  61.29 04-780-32 025  13.95 05-756-90 005  56.75
10020 06-323-47 003  23.74 07-350-95 014  11.46
20030 04 01-781-43 010  10.97 02-236-54 075 105.95
20030 03-655-83 054  22.99 04-569-38 015  75.00
END DATA.
LIST.

• Data are the same as in the previous example; however, records are entered differently. The first record for each input case contains only two repeating groups.

• DATA LIST defines variables ORDERID and NITEMS in columns 1–8 on the first record of each input case. Column 9 is blank. DATA defines variables ITEM, QUANTITY, and PRICE in positions 1–20 of each repeating group, followed by a blank. Thus, each repeating group is 21 columns wide. The length of the first record of each input case is therefore 51 columns: 21 columns for each of two repeating groups, plus the eight columns defined on DATA LIST, plus column 9, which is blank. The operating system’s logical record length is 80, which allows room for one more repeating group on the first record of each input case. STARTS must therefore specify an ending column that does not provide enough columns for another repeating group; otherwise, the program creates an output case with missing values for the variables specified on DATA.

• STARTS specifies that the program is to scan only columns 10–55 of the first record of each input case looking for repeating data groups. It will scan continuation records beginning in column 7 until the value specified on the OCCURS subcommand is reached.

Specifying an Ending Column on the CONTINUED Subcommand

* This example assumes the logical record length is 80.

INPUT PROGRAM.
DATA LIST / ORDERID 1-5 NITEMS 7-8.
REPEATING DATA STARTS=10-55 /OCCURS=NITEMS /CONTINUED=7-55
 /DATA=ITEM 1-9 (A) QUANTITY 11-13 PRICE (DOLLAR7.2,1X).
END INPUT PROGRAM.

BEGIN DATA
10020 07 01-923-89 001  25.99 02-899-56 100 101.99
10020 03-574-54 064  61.29 04-780-32 025  13.95
10020 05-756-90 005  56.75 06-323-47 003  23.74
10020 07-350-95 014  11.46
20030 04 01-781-43 010  10.97 89-236-54 075 105.95
20030 03-655-83 054  22.99 04-569-38 015  75.00
END DATA.
LIST.

• The data are the same as in the previous two examples, but records are entered differently. The first record and the continuation records for each input case store only two repeating groups each.

• The operating system’s logical record length is 80, which allows room for more repeating groups on all records.

• STARTS specifies that the program is to scan only columns 10-55 of the first record of each input case looking for repeating data groups.

• CONTINUED specifies that the program is to scan only columns 7–55 of all continuation records.

Related Topics

REPEATING DATA
Overview (REPEATING DATA command)
Operations (REPEATING DATA command)
Examples (REPEATING DATA command)
STARTS Subcommand (REPEATING DATA command)
OCCURS Subcommand (REPEATING DATA command)
DATA Subcommand (REPEATING DATA command)
FILE Subcommand (REPEATING DATA command)
ENCODING Subcommand (REPEATING DATA command)
LENGTH Subcommand (REPEATING DATA command)
ID Subcommand (REPEATING DATA command)
TABLE and NOTABLE Subcommands (REPEATING DATA command)


ID Subcommand (REPEATING DATA command)

ID (subcommand),ID (subcommand),ID (subcommand)
REPEATING DATA command,REPEATING DATA command,REPEATING DATA command
REPEATING DATA (command),REPEATING DATA (command),REPEATING DATA (command)
ID subcommand,ID subcommand,ID subcommand
repeating data,repeating data,repeating data
case identification,case identification,case identification

ID compares the value of an identification variable across records of the same input case. ID can be used only when CONTINUED is specified. The identification variable must be defined on a DATA LIST command and must be recorded on all records in the file.

• The ID subcommand has two specifications: the location of the variable on the continuation records and the name of the variable (as specified on the DATA LIST command). The specifications must be separated from each other by an equals sign.

• The format specified on the ID subcommand must be the same as the format specified for the variable on DATA LIST. However, the location can be different on the continuation records.

• If the values of the identification variable are not the same on all records for a single input case, the program displays an error message and stops reading data.

Example

INPUT PROGRAM.
DATA LIST / ORDERID 1-5 NITEMS 7-8.
REPEATING DATA STARTS=10-50 /OCCURS=NITEMS
 /CONTINUED=7 /ID=1-5=ORDERID
 /DATA=ITEM 1-9 (A) QUANTITY 11-13 PRICE 15-20 (2).
END INPUT PROGRAM.

BEGIN DATA
10020 04 45-923-89 001  25.9923-899-56 100 101.99
10020 63-780-32 025  13.9554-756-90 005  56.75
20030 03 45-781-43 010  10.9789-236-54 075 105.95
20030 32-569-38 015  75.00
END DATA.
LIST.

• The order number in the data is recorded in columns 1–5 of each record.

• ORDERID is defined on the DATA LIST command as a five-column integer variable. The first specification on the ID subcommand must therefore specify a five-column integer variable. The location of the variable can be different on continuation records.

Related Topics

REPEATING DATA
Overview (REPEATING DATA command)
Operations (REPEATING DATA command)
Examples (REPEATING DATA command)
STARTS Subcommand (REPEATING DATA command)
OCCURS Subcommand (REPEATING DATA command)
DATA Subcommand (REPEATING DATA command)
FILE Subcommand (REPEATING DATA command)
ENCODING Subcommand (REPEATING DATA command)
LENGTH Subcommand (REPEATING DATA command)
CONTINUED Subcommand (REPEATING DATA command)
TABLE and NOTABLE Subcommands (REPEATING DATA command)


TABLE and NOTABLE Subcommands (REPEATING DATA command)

NOTABLE (subcommand),NOTABLE (subcommand),NOTABLE (subcommand)
REPEATING DATA command,REPEATING DATA command,REPEATING DATA command
REPEATING DATA (command),REPEATING DATA (command),REPEATING DATA (command)
NOTABLE subcommand,NOTABLE subcommand,NOTABLE subcommand
repeating data,repeating data,repeating data
summary table,summary table,summary table

TABLE displays a table summarizing all variables defined on the DATA subcommand. The summary table lists the names, locations, and formats of the variables and is identical in format to the summary table displayed by the DATA LIST command. NOTABLE suppresses the table. TABLE is the default.

Example

INPUT PROGRAM.
DATA LIST FILE=VEHICLE / SEQNUM 2-4 NUMPERS 6-7 NUMVEH 9-10.
REPEATING DATA STARTS=12 /OCCURS=NUMVEH /NOTABLE
 /DATA=MAKE 1-8 (A) MODEL 9 (A) NUMCYL 10.
END INPUT PROGRAM.

• NOTABLE suppresses the display of the summary table.

Related Topics

REPEATING DATA
Overview (REPEATING DATA command)
Operations (REPEATING DATA command)
Examples (REPEATING DATA command)
STARTS Subcommand (REPEATING DATA command)
OCCURS Subcommand (REPEATING DATA command)
DATA Subcommand (REPEATING DATA command)
FILE Subcommand (REPEATING DATA command)
ENCODING Subcommand (REPEATING DATA command)
LENGTH Subcommand (REPEATING DATA command)
CONTINUED Subcommand (REPEATING DATA command)
ID Subcommand (REPEATING DATA command)


REPORT

REPORT (command),REPORT (command),REPORT (command)
REPORT (command),REPORT (command),REPORT (command)
syntax chart,syntax chart,syntax chart

REPORT is available in the Statistics Base option.

REPORT [/FORMAT=[{MANUAL   }] [{NOLIST   }] [ALIGN({LEFT  })] [TSPACE({1})]
                 {AUTOMATIC}   {LIST[(n)]}         {CENTER}           {n}
                                                   {RIGHT }
        [CHDSPACE({1})] [FTSPACE({1})] [SUMSPACE({1})] [COLSPACE({4})]
                  {n}            {n}             {n}             {n}
        [BRKSPACE({ 1 })][LENGTH({1,length})] [MARGINS({1,width})]
                  { n }          {t,b     }            {l,r    }
                  {-1†}          {*,*     }            {*,*    }
        [CHALIGN({TOP    })] [UNDERSCORE({OFF})] [PAGE1({1})] [MISSING {'.'}]]
                 {BOTTOM†}               {ON†}          {n}            {'s'}
        [ONEBREAKCOLUMN {OFF**}] [INDENT {2**}] [CHWRAP {OFF**}] [PREVIEW {OFF**}]
                        {ON   }          {n  }          {ON   }           {ON   }
 [/OUTFILE=file]
 [/STRING=stringname (varname[(width)] [(BLANK)] ['literal'])
 /VARIABLES=varname ({VALUE}) [+ varname({VALUE})] ['col head'] [option list]
                     {LABEL}             {LABEL}
                     {DUMMY}             {DUMMY}

where option list can contain any of the following:

      (width)   (OFFSET({0      }))   ({LEFT   })
                        {n      }      {CENTER†}
                        {CENTER†}      {RIGHT  }

 [/MISSING={VAR                   }]
           {NONE                  }
           {LIST[([varlist][{1}])]}
                            {n}

 [/TITLE=[{LEFT  }] 'line1' 'line2'...]   [/FOOTNOTE=[{LEFT  }] 'line1' 'line2'...]
          {CENTER}                                   {CENTER}
          {RIGHT }                                   {RIGHT }
         [)PAGE]   [)DATE]   [)var]

 [/BREAK=varlist ['col head'] [option list]]

where option list can contain any of the following:

      (width)   ({VALUE })   ({NOTOTAL})   ({SKIP({1}     }))
                 {LABEL†}     {TOTAL  }          {n}
                                            {PAGE[(RESET)]}
      (OFFSET({0      }))   (UNDERSCORE[(varlist)])   ({LEFT   })   ({NONAME})
              {n      }                                {CENTER†}     {NAME  }
              {CENTER†}                                {RIGHT  }

 [/SUMMARY=function...['summary title'][(break col #)] [SKIP({0})]
                                                             {n}
        or
 [/SUMMARY=PREVIOUS[({1})]]
                     {n}

where function is

 aggregate [(varname[({PLAIN   })][(d)][varname...])]
                      {format††}
      or
 composite(argument)[(report col[({PLAIN   })][(d)])]
                                  {format††}

**Default if the keyword is omitted.

†Default if FORMAT=AUTOMATIC.

††Any printable output format is valid. See FORMATS.

Aggregate functions:

VALIDN | VARIANCE | PLT(n)
SUM | KURTOSIS | PIN(min,max)
MIN | SKEWNESS | FREQUENCY(min,max)
MAX | MEDIAN(min,max) | PERCENT(min,max)
MEAN | MODE(min,max) |
STDDEV | PGT(n) |

Composite functions:

DIVIDE(arg1 arg2 [factor])

MULTIPLY(arg1...argn)

PCT(arg1 arg2)

SUBTRACT(arg1 arg2)

ADD(arg1...argn)

GREAT(arg1...argn)

LEAST(arg1...argn)

AVERAGE(arg1...argn)

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

Syntax for the REPORT command can be generated from the Report: Summaries in Rows and Report: Summaries in Columns dialog boxes.

Example

REPORT FORMAT=LIST
  /VARIABLES=PRODUCT (LABEL) ' ' 'Retail' 'Products'
           SALES 'Annual' 'Sales' '1981'
  /BREAK=DEPT 'Department' (LABEL)
  /SUMMARY=VALIDN (PRODUCT) MEAN (SALES).

Related Topics

Overview (REPORT command)
Examples (REPORT command)
Defaults (REPORT command)
Options (REPORT command)
FORMAT Subcommand (REPORT command)
OUTFILE Subcommand (REPORT command)
VARIABLES Subcommand (REPORT command)
Column Contents (REPORT command)
Column Heading (REPORT command)
Column Heading Alignment (REPORT command)
Column Format (REPORT command)
STRING Subcommand (REPORT command)
BREAK Subcommand (REPORT command)
Column Contents (REPORT command)
Column Heading (REPORT command)
Column Heading Alignment (REPORT command)
Column Format (REPORT command)
SUMMARY Subcommand (REPORT command)
Aggregate Functions (REPORT command)
Composite Functions (REPORT command)
Summary Titles (REPORT command)
Summary Print Formats (REPORT command)
Other Summary Keywords (REPORT command)
TITLE and FOOTNOTE Subcommands (REPORT command)
MISSING Subcommand (REPORT command)


Overview (REPORT command)

REPORT (command),REPORT (command),REPORT (command)
report types,report types,report types
REPORT (command),REPORT (command),REPORT (command)
limitations,limitations,limitations

REPORT produces case listings and summary statistics and gives you considerable control over the appearance of the output. REPORT calculates all the univariate statistics available in DESCRIPTIVES and the statistics and subpopulation means available in MEANS. In addition, REPORT calculates statistics not directly available in any other procedure, such as computations involving aggregated statistics.

REPORT provides complete report format defaults but also lets you customize a variety of table elements, including column widths, titles, footnotes, and spacing. Because REPORT is so flexible and the output has so many components, it is often efficient to preview report output using a small number of cases until you find the format that best suits your needs.

Basic Specification Collapse Hide details

Basic Specification

The basic specification depends on whether you want a listing report or a summary report. A listing report without subgroup classification requires FORMAT and VARIABLES. A listing report with subgroup classification requires FORMAT, VARIABLES, and BREAK. A summary report requires VARIABLES, BREAK, and SUMMARY.

Listing Reports. FORMAT=LIST and VARIABLES with a variable list are required. Case listings are displayed for each variable named on VARIABLES. There are no break groups or summary statistics unless BREAK or SUMMARY is specified.

Summary Reports. VARIABLES, BREAK, and SUMMARY are required. The report is organized according to the values of the variable named on BREAK. The variable named on BREAK must be named on a preceding SORT CASES command. Specified statistics are computed for the variables specified on VARIABLES for each subgroup defined by the break variables.

Subcommand Order Collapse Hide details

Subcommand Order

The following order must be observed among subcommands when they are used:

• FORMAT must precede all other subcommands.

• VARIABLES must precede BREAK.

• OUTFILE must precede BREAK.

• Each SUMMARY subcommand must immediately follow its associated BREAK. Multiple SUMMARY subcommands associated with the same BREAK must be specified consecutively.

• TITLE and FOOTNOTE can appear anywhere after FORMAT except between BREAK and SUMMARY.

• MISSING must follow VARIABLES and precede the first BREAK.

• STRING must precede VARIABLES.

Syntax Rules Collapse Hide details

Syntax Rules

• Only one each of the FORMAT, STRING, VARIABLES, and MISSING subcommands is allowed.

• To obtain multiple break groups, use multiple BREAK subcommands.

• To obtain multiple summaries for a break level, specify multiple SUMMARY subcommands for the associated BREAK.

• Keywords on REPORT subcommands have default specifications that are in effect if the keyword is not specified. Specify keywords only when you wish to change a default.

• Keywords are enclosed in parentheses if the subcommand takes variable names as arguments.

Operations Collapse Hide details

Operations

• REPORT processes cases sequentially. When the value of a break variable changes, REPORT displays a statistical summary for cases processed since the last set of summary statistics was displayed. Thus, the file must be sorted in order on the break variable or variables.

• The maximum width and page length of the report are determined by the SET command.

• If a column is not wide enough to display numeric values, REPORT first rounds decimal digits, then converts to scientific notation if possible, and then displays asterisks. String variables that are wider than the column are truncated.

• The format used to display values in case listings is controlled by the dictionary format of the variable. Each statistical function in REPORT has a default format.

Limitations Collapse Hide details

Limitations

• Maximum 500 variables per VARIABLES subcommand. You can specify more than 500 variables if you stack them. See the topic VARIABLES Subcommand (REPORT command) for more information.

• Maximum 10 dummy variables per VARIABLES subcommand.

• Maximum 20 MODE and MEDIAN requests per SUMMARY subcommand.

• Maximum 20 PGT, PLT, and PIN requests per SUMMARY subcommand.

• Maximum 50 strings per STRING subcommand.

• The length of titles and footnotes cannot exceed the report width.

• The length of string variables created on STRING cannot exceed the page width.

• There is no fixed limit on the number of BREAK and SUMMARY subcommands. However, the page width limits the number of variables that can be displayed and thereby limits the number of break variables.

• The maximum width of a report is 255 characters.

• The number of report variables that can be specified depends upon the width of the report, the width of the variable columns, and the number of BREAK subcommands.

• Maximum 50 variables for the FREQUENCY or PERCENT functions.

• Memory requirements significantly increase if FREQUENCY, PERCENT, MEDIAN, or MODE is requested for variables with a wide range of values. The amount of workspace required is 20 + 8*(max − min + 1) bytes per variable per function per break. If the same range is used for different statistics for the same variable, only one set of cells is collected. For example, FREQUENCY(1,100)(VARA) PERCENT(1,100)(VARA) requires only 820 bytes.

• If TOTAL is in effect, workspace requirements are almost doubled.

• Memory requirements also increase if value labels are displayed for variables with many value labels. The amount of workspace required is 4 + 24*n bytes per variable, where n is the number of value labels specified for the variable.

Related Topics

REPORT
Examples (REPORT command)
Defaults (REPORT command)
Options (REPORT command)
FORMAT Subcommand (REPORT command)
OUTFILE Subcommand (REPORT command)
VARIABLES Subcommand (REPORT command)
Column Contents (REPORT command)
Column Heading (REPORT command)
Column Heading Alignment (REPORT command)
Column Format (REPORT command)
STRING Subcommand (REPORT command)
BREAK Subcommand (REPORT command)
Column Contents (REPORT command)
Column Heading (REPORT command)
Column Heading Alignment (REPORT command)
Column Format (REPORT command)
SUMMARY Subcommand (REPORT command)
Aggregate Functions (REPORT command)
Composite Functions (REPORT command)
Summary Titles (REPORT command)
Summary Print Formats (REPORT command)
Other Summary Keywords (REPORT command)
TITLE and FOOTNOTE Subcommands (REPORT command)
MISSING Subcommand (REPORT command)


Examples (REPORT command)

SORT CASES BY DEPT.
REPORT FORMAT=LIST
  /VARIABLES=PRODUCT (LABEL) ' ' 'Retail' 'Products'
           SALES 'Annual' 'Sales' '1981'
  /BREAK=DEPT 'Department' (LABEL)
  /SUMMARY=VALIDN (PRODUCT) MEAN (SALES) 'No.Sold,Mean Sales'.

• This report is a listing of products and sales by department. A summary of the total number of products sold and the average sales by department is also produced.

• Cases are first sorted by DEPT so that cases are grouped by department for the case listing and for the calculation of statistics.

• FORMAT requests a report that lists individual cases within each break group.

• VARIABLES specifies PRODUCT and SALES as the report variables. Keyword LABEL requests that the case listings for PRODUCT display value labels instead of values. Three-line column headings are provided for each report column. The first line of the column heading is blank for the variable PRODUCT.

• BREAK identifies DEPT as the break variable and provides a one-line column title for the break column. LABEL displays the value label instead of the value itself.

• SUMMARY calculates the valid number of cases for PRODUCT and the mean of SALES for each value of DEPT. A title is provided for the summary line to override the default title, VALIDN.

Related Topics

REPORT
Overview (REPORT command)
Defaults (REPORT command)
Options (REPORT command)
FORMAT Subcommand (REPORT command)
OUTFILE Subcommand (REPORT command)
VARIABLES Subcommand (REPORT command)
Column Contents (REPORT command)
Column Heading (REPORT command)
Column Heading Alignment (REPORT command)
Column Format (REPORT command)
STRING Subcommand (REPORT command)
BREAK Subcommand (REPORT command)
Column Contents (REPORT command)
Column Heading (REPORT command)
Column Heading Alignment (REPORT command)
Column Format (REPORT command)
SUMMARY Subcommand (REPORT command)
Aggregate Functions (REPORT command)
Composite Functions (REPORT command)
Summary Titles (REPORT command)
Summary Print Formats (REPORT command)
Other Summary Keywords (REPORT command)
TITLE and FOOTNOTE Subcommands (REPORT command)
MISSING Subcommand (REPORT command)


Defaults (REPORT command)

REPORT (command),REPORT (command),REPORT (command)
column headings,column headings,column headings

Column Heads. REPORT uses variable labels as default column heads; if no variable labels have been specified, variable names are used. If ONEBREAKCOLUMN is ON, the default head for the first BREAK subcommand is used.

REPORT (command),REPORT (command),REPORT (command)
column width,column width,column width

Column Widths. Default column widths are determined by REPORT, using the maximum of the following for each column:

• The widest print format in the column, whether it is a variable print format or a summary print format.

• The width of any temporary variable defined with the STRING subcommand on REPORT.

• If a column heading is assigned, the length of the longest title line in the heading when CHWRAP is off, and the longest word in the title when CHWRAP is on. Underscores, which are removed on printing, can be used to create longer words in the title.

• When no column heading is specified, the length of the longest word in the variable label, or the length of the variable name.

• If you specify LABEL on VARIABLES or BREAK, the length of the variable’s longest value label. If FORMAT=MANUAL is in effect, 20 is the maximum value used for this criterion.

• The minimum column width is 8 when FORMAT=MANUAL; it can be less when FORMAT=AUTOMATIC.

REPORT (command),REPORT (command),REPORT (command)
column width,column width,column width

Automatic Fit. When the above criteria for column width result in a report that is too wide for the report margins, FORMAT=AUTOMATIC shrinks the report. AUTOMATIC performs the following two steps sequentially, stopping as soon as the report fits within the margins:

REPORT (command),REPORT (command),REPORT (command)
column spacing,column spacing,column spacing

1. AUTOMATIC reduces intercolumn spacing incrementally until it reaches a minimum intercolumn space of 1. It will never reduce it to 0.

2. AUTOMATIC shortens widths for strings specified on the STRING subcommand or for value label strings when the LABEL option is specified. It begins with the longest string if that string is at least 15 characters wide and shortens the column width as much as needed (up to 40% of its length), wrapping the string within the new width. If necessary, it repeats the step, using different defined strings. It will not shorten the column width of the same string twice.

REPORT does not implement the automatic fit unless AUTOMATIC is specified on the FORMAT subcommand.

AUTOMATIC versus MANUAL Defaults. Many default settings depend on whether you specify AUTOMATIC or MANUAL on FORMAT. The following table shows the defaults according to either of the specifications.

Keyword default settings
Subcommand | Keyword | Default for AUTOMATIC | Default for MANUAL
FORMAT | ALIGN | left | left
 | BRKSPACE |  |
 | summary report | 1 | 1
 | listing report | –1 | 1
 | CHALIGN | bottom | top
 | CHDSPACE | 1 | 1
 | COLSPACE | 4 | 4
 | FTSPACE | 1 | 1
 | LENGTH | 1,system length | 1,system length
 | LIST|NOLIST | NOLIST | NOLIST
 | MARGINS | 1,system width | 1,system width
 | MISSING | . | .
 | PAGE1 | 1 | 1
 | SUMSPACE | 1 | 1
 | TSPACE | 1 | 1
 | UNDERSCORE | on | off
 | ONEBREAKCOLUMN | off | off
 | INDENT1 | 2 | 2
 | CHWRAP | off | off
 | PREVIEW | off | off
VARIABLES | LABEL|VALUE|DUMMY | VALUE | VALUE
 | LEFT|CENTER|RIGHT | CENTER2 | RIGHT for numbers
 |  |  | LEFT for strings
 | OFFSET | CENTER | 0
BREAK | LABEL|VALUE | LABEL | VALUE
 | LEFT|CENTER|RIGHT | CENTER2 | RIGHT for numbers
 |  |  | LEFT for strings
 | NAME|NONAME | NONAME | NONAME
 | OFFSET | CENTER3 | 0
 | PAGE | off | off
 | SKIP | 1 | 1
 | TOTAL|NOTOTAL | NOTOTAL | NOTOTAL
 | UNDERSCORE | off | off
SUMMARY | PREVIOUS | 1 | 1
 | SKIP | 0 | 0

1 No effect when ONEBREAKCOLUMN is on.

2 LEFT when ONEBREAKCOLUMN is on.

3 0 when ONEBREAKCOLUMN is on.

Related Topics

REPORT
Overview (REPORT command)
Examples (REPORT command)
Options (REPORT command)
FORMAT Subcommand (REPORT command)
OUTFILE Subcommand (REPORT command)
VARIABLES Subcommand (REPORT command)
Column Contents (REPORT command)
Column Heading (REPORT command)
Column Heading Alignment (REPORT command)
Column Format (REPORT command)
STRING Subcommand (REPORT command)
BREAK Subcommand (REPORT command)
Column Contents (REPORT command)
Column Heading (REPORT command)
Column Heading Alignment (REPORT command)
Column Format (REPORT command)
SUMMARY Subcommand (REPORT command)
Aggregate Functions (REPORT command)
Composite Functions (REPORT command)
Summary Titles (REPORT command)
Summary Print Formats (REPORT command)
Other Summary Keywords (REPORT command)
TITLE and FOOTNOTE Subcommands (REPORT command)
MISSING Subcommand (REPORT command)


Options (REPORT command)

SET (command),SET (command),SET (command)
with REPORT command,with REPORT command,with REPORT command
REPORT (command),REPORT (command),REPORT (command)
with SET command,with SET command,with SET command

Format. REPORT provides full format defaults and offers you optional control over page length, vertical spacing, margin and column widths, page titles, footnotes, and labels for statistics. The maximum width and length of the report are controlled by specifications on the SET command. The FORMAT subcommand on REPORT controls how the report is laid out on a page and whether case listings are displayed. The VARIABLES subcommand specifies the variables that are listed or summarized in the report (report variables) and controls the titles, width, and contents of report columns. The BREAK subcommand specifies the variables that define groups (break variables) and controls the titles, width, and contents of break columns. SUMMARY specifies statistics and controls the titles and spacing of summary lines. The TITLE and FOOTNOTE subcommands control the specification and placement of multiple-line titles and footnotes. STRING concatenates variables to create temporary variables that can be specified on VARIABLES or BREAK.

REPORT (command),REPORT (command),REPORT (command)
output file,output file,output file

Output File. You can direct reports to a file separate from the file used for the rest of the output from your session using the OUTFILE subcommand.

REPORT (command),REPORT (command),REPORT (command)
summary statistics,summary statistics,summary statistics

Statistical Display. The statistical display is controlled by the SUMMARY subcommand. Statistics can be calculated for each category of a break variable and for the group as a whole. Available statistics include mean, variance, standard deviation, skewness, kurtosis, sum, minimum, maximum, mode, median, and percentages. Composite functions perform arithmetic operations using two or more summary statistics calculated on single variables.

REPORT (command),REPORT (command),REPORT (command)
missing values,missing values,missing values

Missing Values. You can override the default to include user-missing values in report statistics and listings with the MISSING subcommand. You can also use FORMAT to define a missing-value symbol to represent missing data.

Related Topics

REPORT
Overview (REPORT command)
Examples (REPORT command)
Defaults (REPORT command)
FORMAT Subcommand (REPORT command)
OUTFILE Subcommand (REPORT command)
VARIABLES Subcommand (REPORT command)
Column Contents (REPORT command)
Column Heading (REPORT command)
Column Heading Alignment (REPORT command)
Column Format (REPORT command)
STRING Subcommand (REPORT command)
BREAK Subcommand (REPORT command)
Column Contents (REPORT command)
Column Heading (REPORT command)
Column Heading Alignment (REPORT command)
Column Format (REPORT command)
SUMMARY Subcommand (REPORT command)
Aggregate Functions (REPORT command)
Composite Functions (REPORT command)
Summary Titles (REPORT command)
Summary Print Formats (REPORT command)
Other Summary Keywords (REPORT command)
TITLE and FOOTNOTE Subcommands (REPORT command)
MISSING Subcommand (REPORT command)


FORMAT Subcommand (REPORT command)

FORMAT (subcommand),FORMAT (subcommand),FORMAT (subcommand)
REPORT command,REPORT command,REPORT command
REPORT (command),REPORT (command),REPORT (command)
FORMAT subcommand,FORMAT subcommand,FORMAT subcommand

FORMAT controls the overall width and length of the report and vertical spacing. Keywords and their arguments can be specified in any order.

• MANUAL and AUTOMATIC are alternatives. The default is MANUAL.

• LIST and NOLIST are alternatives. The default is NOLIST.

MANUAL (keyword),MANUAL (keyword),MANUAL (keyword)
REPORT command,REPORT command,REPORT command
AUTOMATIC (keyword),AUTOMATIC (keyword),AUTOMATIC (keyword)
REPORT command,REPORT command,REPORT command
NOLIST (keyword),NOLIST (keyword),NOLIST (keyword)
REPORT command,REPORT command,REPORT command
LIST (keyword),LIST (keyword),LIST (keyword)
REPORT command,REPORT command,REPORT command
PAGE (keyword),PAGE (keyword),PAGE (keyword)
REPORT command,REPORT command,REPORT command
LENGTH (keyword),LENGTH (keyword),LENGTH (keyword)
REPORT command,REPORT command,REPORT command
MARGINS (keyword),MARGINS (keyword),MARGINS (keyword)
REPORT command,REPORT command,REPORT command
ALIGN (keyword),ALIGN (keyword),ALIGN (keyword)
REPORT command,REPORT command,REPORT command
COLSPACE (keyword),COLSPACE (keyword),COLSPACE (keyword)
REPORT command,REPORT command,REPORT command
CHALIGN (keyword),CHALIGN (keyword),CHALIGN (keyword)
REPORT command,REPORT command,REPORT command
UNDERSCORE (keyword),UNDERSCORE (keyword),UNDERSCORE (keyword)
REPORT command,REPORT command,REPORT command
TSPACE (keyword),TSPACE (keyword),TSPACE (keyword)
REPORT command,REPORT command,REPORT command
CHDSPACE (keyword),CHDSPACE (keyword),CHDSPACE (keyword)
REPORT command,REPORT command,REPORT command
BRKSPACE (keyword),BRKSPACE (keyword),BRKSPACE (keyword)
REPORT command,REPORT command,REPORT command
SUMSPACE (keyword),SUMSPACE (keyword),SUMSPACE (keyword)
REPORT command,REPORT command,REPORT command
FTSPACE (keyword),FTSPACE (keyword),FTSPACE (keyword)
REPORT command,REPORT command,REPORT command
MISSING (keyword),MISSING (keyword),MISSING (keyword)
REPORT command,REPORT command,REPORT command
ONEBREAKCOLUMN (keyword),ONEBREAKCOLUMN (keyword),ONEBREAKCOLUMN (keyword)
REPORT command,REPORT command,REPORT command
REPORT (command),REPORT (command),REPORT (command)
ONEBREAKCOLUMN keyword,ONEBREAKCOLUMN keyword,ONEBREAKCOLUMN keyword
INDENT (keyword),INDENT (keyword),INDENT (keyword)
REPORT command,REPORT command,REPORT command
REPORT (command),REPORT (command),REPORT (command)
INDENT keyword,INDENT keyword,INDENT keyword
CHWRAP (keyword),CHWRAP (keyword),CHWRAP (keyword)
REPORT command,REPORT command,REPORT command
REPORT (command),REPORT (command),REPORT (command)
CHWRAP keyword,CHWRAP keyword,CHWRAP keyword
PREVIEW (keyword),PREVIEW (keyword),PREVIEW (keyword)
REPORT command,REPORT command,REPORT command
REPORT (command),REPORT (command),REPORT (command)
PREVIEW keyword,PREVIEW keyword,PREVIEW keyword
MANUAL | Default settings for manual format. MANUAL displays values for break variables, right-justifies numeric values and their column headings, left-justifies value labels and string values and their column headings, top-aligns and does not underscore column headings, extends column widths to accommodate the variable’s longest value label (but not the longest word in the variable label) up to a width of 20, and generates an error message when a report is too wide for its margins. MANUAL is the default.
AUTOMATIC | Default settings for automatic format. AUTOMATIC displays labels for break variables, centers all data, centers column headings but left-justifies column headings if value labels or string values exceed the width of the longest word in the heading, bottom-aligns and underscores column headings, extends column widths to accommodate the longest word in a variable label or the variable’s longest value label, and shrinks a report that is too wide for its margins.
LIST(n) | Individual case listing. The values of all variables named on VARIABLES are displayed for each case. The optional n inserts a blank line after each n cases. By default, no blank lines are inserted. Values for cases are listed using the default formats for the variables.
NOLIST | No case listing. This is the default.
PAGE(n) | Page number for the first page of the report. The default is 1.
LENGTH(t,b) | Top and bottom line numbers of the report. You can specify any numbers to define the report page length. By default, the top of the report begins at line 1, and the bottom of the report is the last line of the system page. You can use an asterisk for t or b to indicate a default value. If the specified length does not allow even one complete line of information to be displayed, REPORT extends the length specification and displays a warning.
MARGINS(l,r) | Columns for the left and right margins. The right column cannot exceed 255. By default, the left margin is display column 1 and the right margin is the rightmost display column of the system page. You can use an asterisk for l or r to indicate a default value.
ALIGN | Placement of the report relative to its margins. LEFT, CENTER, or RIGHT can be specified in the parentheses following the keyword. LEFT left-justifies the report. CENTER centers the report between its margins. RIGHT right-justifies the report. The default is LEFT.
COLSPACE(n) | Number of spaces between each column. The default is 4 or the average number of spaces that will fit within report margins, whichever is less. When AUTOMATIC is in effect, REPORT overrides the specified column spacing if necessary to fit the report between its margins.
CHALIGN | Alignment of column headings. Either TOP or BOTTOM can be specified in the parentheses following the keyword. TOP aligns all column headings with the first, or top, line of multiple-line headings. BOTTOM aligns headings with the last, or bottom, line of multiple-line headings. When AUTOMATIC is in effect, the default is BOTTOM; when MANUAL is in effect, the default is TOP.
UNDERSCORE | Underscores for column headings. Either ON or OFF can be specified in the parentheses following the keyword. ON underscores the bottom line of each column heading for the full width of the column. OFF does not underscore column headings. The default is ON when AUTOMATIC is in effect and OFF when MANUAL is in effect.
TSPACE(n) | Number of blank lines between the report title and the column heads. The default is 1.
CHDSPACE(n) | Number of blank lines beneath the longest column head. The default is 1.
BRKSPACE(n) | Number of blank lines between the break head and the next line. The next line is a case if LIST is in effect or the first summary line if NOLIST is in effect. BRKSPACE(–1) places the first summary statistic or the first case listing on the same line as the break value. When a summary line is placed on the same line as the break value, the summary title is suppressed. When AUTOMATIC is in effect, the default is −1; when MANUAL is in effect, it is 1.
SUMSPACE(n) | Number of blank lines between the last summary line at the lower break level and the first summary line at the higher break level when they break simultaneously. SUMSPACE also controls spacing between the last listed case and the first summary line if LIST is in effect. The default is 1.
FTSPACE(n) | Minimum number of blank lines between the last listing on the page and the footnote. The default is 1.
MISSING ‘s’ | Missing-value symbol. The symbol can be only one character and represents both system- and user-missing values. The default is a period.
ONEBREAKCOLUMN | Display subgroups defined on multiple BREAK subcommands in a single column. You can specify OFF or ON in parentheses after the keyword. The default is OFF. When ONEBREAKCOLUMN is ON, it applies to all BREAK subcommands. See the topic BREAK Subcommand (REPORT command) for more information.
INDENT(n) | Indention of break values and summary titles of each successive subgroup defined by one BREAK subcommand in a single break column. INDENT is effective only when ONEBREAKCOLUMN is on. Multiple variables specified on one BREAK subcommand are indented as a block. The default specification is 2. When ONEBREAKCOLUMN is OFF, specification on INDENT is ignored.
CHWRAP | Automatically wrap user-specified column heads. You can specify OFF or ON in parentheses after the keyword. The default is OFF. When CHWRAP is ON, user-specified heads for either break or variable columns are wrapped. If multiple lines are specified for a head, each line is wrapped, if necessary, independent of other lines. To prevent wrapping at blanks, use the underscore character (_) to signify a hard blank in your head specification. The underscore serves as a hard blank only in user-specified heads and only when CHWRAP is ON. The underscore does not appear in the printed heading.
PREVIEW | Display the first page of output only. You can specify OFF or ON either in parentheses or with one blank space separating the specification from the keyword. The default is OFF. When PREVIEW is ON, the program stops processing after the first page for you to quickly check the format of your report.

Related Topics

REPORT
Overview (REPORT command)
Examples (REPORT command)
Defaults (REPORT command)
Options (REPORT command)
OUTFILE Subcommand (REPORT command)
VARIABLES Subcommand (REPORT command)
Column Contents (REPORT command)
Column Heading (REPORT command)
Column Heading Alignment (REPORT command)
Column Format (REPORT command)
STRING Subcommand (REPORT command)
BREAK Subcommand (REPORT command)
Column Contents (REPORT command)
Column Heading (REPORT command)
Column Heading Alignment (REPORT command)
Column Format (REPORT command)
SUMMARY Subcommand (REPORT command)
Aggregate Functions (REPORT command)
Composite Functions (REPORT command)
Summary Titles (REPORT command)
Summary Print Formats (REPORT command)
Other Summary Keywords (REPORT command)
TITLE and FOOTNOTE Subcommands (REPORT command)
MISSING Subcommand (REPORT command)


OUTFILE Subcommand (REPORT command)

REPORT (command),REPORT (command),REPORT (command)
OUTFILE subcommand,OUTFILE subcommand,OUTFILE subcommand
OUTFILE (subcommand),OUTFILE (subcommand),OUTFILE (subcommand)
REPORT command,REPORT command,REPORT command
REPORT (command),REPORT (command),REPORT (command)
output file,output file,output file

OUTFILE directs the report to a file separate from the file used for the rest of the output from your session. This allows you to print the report without having to delete the extraneous material that would be present in the output.

• OUTFILE must follow FORMAT and must precede BREAK.

• You can append multiple reports to the same file by naming the same file on the OUTFILE subcommand for each REPORT command.

Example

REPORT FORMAT=AUTOMATIC LIST
  /OUTFILE=PRSNLRPT
  /VARIABLES=LNAME AGE TENURE JTENURE SALARY
  /BREAK=DIVISION
  /SUMMARY=MEAN.

REPORT FORMAT=AUTOMATIC
  /OUTFILE=PRSNLRPT
  /VARIABLES=LNAME AGE TENURE JTENURE SALARY
  /BREAK=DIVISION
  /SUMMARY=MEAN
  /SUMMARY=MIN
  /SUMMARY=MAX.

• Both a listing report and a summary report are written to file PRSNLRPT.

Related Topics

REPORT
Overview (REPORT command)
Examples (REPORT command)
Defaults (REPORT command)
Options (REPORT command)
FORMAT Subcommand (REPORT command)
VARIABLES Subcommand (REPORT command)
Column Contents (REPORT command)
Column Heading (REPORT command)
Column Heading Alignment (REPORT command)
Column Format (REPORT command)
STRING Subcommand (REPORT command)
BREAK Subcommand (REPORT command)
Column Contents (REPORT command)
Column Heading (REPORT command)
Column Heading Alignment (REPORT command)
Column Format (REPORT command)
SUMMARY Subcommand (REPORT command)
Aggregate Functions (REPORT command)
Composite Functions (REPORT command)
Summary Titles (REPORT command)
Summary Print Formats (REPORT command)
Other Summary Keywords (REPORT command)
TITLE and FOOTNOTE Subcommands (REPORT command)
MISSING Subcommand (REPORT command)


VARIABLES Subcommand (REPORT command)

VARIABLES (subcommand),VARIABLES (subcommand),VARIABLES (subcommand)
REPORT command,REPORT command,REPORT command
REPORT (command),REPORT (command),REPORT (command)
VARIABLES subcommand,VARIABLES subcommand,VARIABLES subcommand

The required VARIABLES subcommand names the variables to be listed and summarized in the report. You can also use VARIABLES to control column titles, column widths, and the contents of report columns.

• The minimum specification on VARIABLES is a list of report variables. The number of variables that can be specified is limited by the system page width.

• Each report variable defines a report column. The value of the variable or an aggregate statistic calculated for the variable is displayed in that variable’s report column.

• Variables are assigned to columns in the order in which they are named on VARIABLES.

• Variables named on BREAK can also be named on VARIABLES.

• When FORMAT=LIST, variables can be stacked in a single column by linking them with plus signs (+) on the VARIABLES subcommand. If no column heading is specified, REPORT uses the default heading from the first variable on the list. Only values from the first variable in the column are used to calculate summaries.

• Optional specifications apply only to the immediately preceding variable or list of variables implied by the TO keyword. Options can be specified in any order.

• All optional specifications except column headings must be enclosed in parentheses; column headings must be enclosed in quotes.

Related Topics

REPORT
Overview (REPORT command)
Examples (REPORT command)
Defaults (REPORT command)
Options (REPORT command)
FORMAT Subcommand (REPORT command)
OUTFILE Subcommand (REPORT command)
Column Contents (REPORT command)
Column Heading (REPORT command)
Column Heading Alignment (REPORT command)
Column Format (REPORT command)
STRING Subcommand (REPORT command)
BREAK Subcommand (REPORT command)
Column Contents (REPORT command)
Column Heading (REPORT command)
Column Heading Alignment (REPORT command)
Column Format (REPORT command)
SUMMARY Subcommand (REPORT command)
Aggregate Functions (REPORT command)
Composite Functions (REPORT command)
Summary Titles (REPORT command)
Summary Print Formats (REPORT command)
Other Summary Keywords (REPORT command)
TITLE and FOOTNOTE Subcommands (REPORT command)
MISSING Subcommand (REPORT command)


Column Contents (REPORT command)

The following options can be used to specify the contents of the report column for each variable:

VALUE (keyword),VALUE (keyword),VALUE (keyword)
REPORT command,REPORT command,REPORT command
LABEL (keyword),LABEL (keyword),LABEL (keyword)
REPORT command,REPORT command,REPORT command
DUMMY (keyword),DUMMY (keyword),DUMMY (keyword)
REPORT command,REPORT command,REPORT command
(VALUE) | Display the values of the variable. This is the default.
(LABEL) | Display value labels. If value labels are not defined, values are displayed.
(DUMMY) | Display blank spaces. DUMMY defines a report column for a variable that does not exist in the active dataset. Dummy variables are used to control spacing or to reserve space for statistics computed for other variables. Do not name an existing variable as a dummy variable.

• VALUE and LABEL have no effect unless LIST has been specified on the FORMAT subcommand.

• When AUTOMATIC is in effect, value labels or string values are centered in the column based on the length of the longest string or label; numeric values are centered based on the width of the widest value or summary format. When MANUAL is in effect, value labels or string values are left-justified in the column and numeric values are right-justified. (See the OFFSET keyword.)

Related Topics

REPORT
Overview (REPORT command)
Examples (REPORT command)
Defaults (REPORT command)
Options (REPORT command)
FORMAT Subcommand (REPORT command)
OUTFILE Subcommand (REPORT command)
VARIABLES Subcommand (REPORT command)
Column Heading (REPORT command)
Column Heading Alignment (REPORT command)
Column Format (REPORT command)
STRING Subcommand (REPORT command)
BREAK Subcommand (REPORT command)
Column Contents (REPORT command)
Column Heading (REPORT command)
Column Heading Alignment (REPORT command)
Column Format (REPORT command)
SUMMARY Subcommand (REPORT command)
Aggregate Functions (REPORT command)
Composite Functions (REPORT command)
Summary Titles (REPORT command)
Summary Print Formats (REPORT command)
Other Summary Keywords (REPORT command)
TITLE and FOOTNOTE Subcommands (REPORT command)
MISSING Subcommand (REPORT command)


Column Heading (REPORT command)

REPORT (command),REPORT (command),REPORT (command)
column headings,column headings,column headings

The following option can be used to specify a heading for the report column:

‘column heading’ Column heading for the preceding variable. The heading must be enclosed in quotes. If no column heading is specified, the default is the variable label or, if no variable label has been specified, the variable name.

• To specify multiple-line headings, enclose each line in quotes, using the conventions for strings. The specifications for title lines should be separated by at least one blank.

• Default column headings wrap for as many lines as are required to display the entire label. If AUTOMATIC is in effect, user-specified column headings appear exactly as specified, even if the column width must be extended. If MANUAL is in effect, user-specified titles wrap to fit within the column width.

Related Topics

REPORT
Overview (REPORT command)
Examples (REPORT command)
Defaults (REPORT command)
Options (REPORT command)
FORMAT Subcommand (REPORT command)
OUTFILE Subcommand (REPORT command)
VARIABLES Subcommand (REPORT command)
Column Contents (REPORT command)
Column Heading Alignment (REPORT command)
Column Format (REPORT command)
STRING Subcommand (REPORT command)
BREAK Subcommand (REPORT command)
Column Contents (REPORT command)
Column Heading (REPORT command)
Column Heading Alignment (REPORT command)
Column Format (REPORT command)
SUMMARY Subcommand (REPORT command)
Aggregate Functions (REPORT command)
Composite Functions (REPORT command)
Summary Titles (REPORT command)
Summary Print Formats (REPORT command)
Other Summary Keywords (REPORT command)
TITLE and FOOTNOTE Subcommands (REPORT command)
MISSING Subcommand (REPORT command)


Column Heading Alignment (REPORT command)

The following options can be used to specify how column headings are aligned:

LEFT (keyword),LEFT (keyword),LEFT (keyword)
REPORT command,REPORT command,REPORT command
CENTER (keyword),CENTER (keyword),CENTER (keyword)
REPORT command,REPORT command,REPORT command
RIGHT (keyword),RIGHT (keyword),RIGHT (keyword)
REPORT command,REPORT command,REPORT command
(LEFT) | Left-aligned column heading.
(CENTER) | Centered column heading.
(RIGHT) | Right-aligned column heading.

• If AUTOMATIC is in effect, column headings are centered within their columns by default. If value labels or string values exceed the width of the longest word in the heading, the heading is left-justified.

• If MANUAL is in effect, column headings are left-justified for value labels or string values and right-justified for numeric values by default.

Related Topics

REPORT
Overview (REPORT command)
Examples (REPORT command)
Defaults (REPORT command)
Options (REPORT command)
FORMAT Subcommand (REPORT command)
OUTFILE Subcommand (REPORT command)
VARIABLES Subcommand (REPORT command)
Column Contents (REPORT command)
Column Heading (REPORT command)
Column Format (REPORT command)
STRING Subcommand (REPORT command)
BREAK Subcommand (REPORT command)
Column Contents (REPORT command)
Column Heading (REPORT command)
Column Heading Alignment (REPORT command)
Column Format (REPORT command)
SUMMARY Subcommand (REPORT command)
Aggregate Functions (REPORT command)
Composite Functions (REPORT command)
Summary Titles (REPORT command)
Summary Print Formats (REPORT command)
Other Summary Keywords (REPORT command)
TITLE and FOOTNOTE Subcommands (REPORT command)
MISSING Subcommand (REPORT command)


Column Format (REPORT command)

The following options can be used to specify column width and adjust the position of the column contents:

OFFSET (keyword),OFFSET (keyword),OFFSET (keyword)
REPORT command,REPORT command,REPORT command
(width) | Width for the report column. If no width is specified for a variable, REPORT determines a default width using the criteria described under Defaults. If you specify a width that is not wide enough to display numeric values, REPORT first rounds decimal digits, then converts to scientific notation if possible, and then displays asterisks. Value labels or string values that exceed the width are wrapped.
(OFFSET) | Position of the report column contents. The specification is either n or CENTER specified in parentheses. OFFSET(n) indicates the number of spaces to offset the contents from the left for value labels or string values, and from the right for numeric values. OFFSET(CENTER) centers contents within the center of the column. If AUTOMATIC is in effect, the default is CENTER. If MANUAL is in effect, the default is 0. Value labels and string values are left-justified and numeric values are right-justified.

Example

 /VARIABLES=V1 TO V3(LABEL) (15)
   V4 V5 (LABEL)(OFFSET (2))(10)
   SEP1 (DUMMY) (2) ''
   V6 'Results using' "Lieben's Method" 'of Calculation'

• The width of the columns for variables V1 through V3 is 15 each. Value labels are displayed for these variables in the case listing.

• The column for variable V4 uses the default width. Values are listed in the case listing.

• Value labels are displayed for variable V5. The column width is 10. Column contents are offset two spaces from the left.

• SEP1 is a dummy variable. The column width is 2, and there is at least one space on each side of SEP1. Thus, there are at least four blanks between the columns for V5 and V6. SEP1 is given a null title to override the default column title SEP1.

• V6 has a three-line title. Its column uses the default width, and values are listed in the case listing.

Related Topics

REPORT
Overview (REPORT command)
Examples (REPORT command)
Defaults (REPORT command)
Options (REPORT command)
FORMAT Subcommand (REPORT command)
OUTFILE Subcommand (REPORT command)
VARIABLES Subcommand (REPORT command)
Column Contents (REPORT command)
Column Heading (REPORT command)
Column Heading Alignment (REPORT command)
STRING Subcommand (REPORT command)
BREAK Subcommand (REPORT command)
Column Contents (REPORT command)
Column Heading (REPORT command)
Column Heading Alignment (REPORT command)
Column Format (REPORT command)
SUMMARY Subcommand (REPORT command)
Aggregate Functions (REPORT command)
Composite Functions (REPORT command)
Summary Titles (REPORT command)
Summary Print Formats (REPORT command)
Other Summary Keywords (REPORT command)
TITLE and FOOTNOTE Subcommands (REPORT command)
MISSING Subcommand (REPORT command)


STRING Subcommand (REPORT command)

REPORT (command),REPORT (command),REPORT (command)
string variables,string variables,string variables
REPORT (command),REPORT (command),REPORT (command)
STRING subcommand,STRING subcommand,STRING subcommand
STRING (subcommand),STRING (subcommand),STRING (subcommand)
REPORT command,REPORT command,REPORT command

STRING creates a temporary string variable by concatenating variables and user-specified strings. These variables exist only within the REPORT procedure.

• The minimum specification is a name for the string variable followed by a variable name or a user-specified string enclosed in parentheses.

• The name assigned to the string variable must be unique.

• Any combination of string variables, numeric variables, and user-specified strings can be used in the parentheses to define the string.

• Keyword TO cannot be used within the parentheses to imply a variable list.

• More than one string variable can be defined on STRING.

• If a case has a missing value for a variable within the parentheses, the variable passes the missing value to the temporary variable without affecting other elements specified.

• A string variable defined in REPORT cannot exceed the system page width.

• String variables defined on STRING can be used on VARIABLES or BREAK.

The following options can be used to specify how components are to be concatenated:

BLANK (keyword),BLANK (keyword),BLANK (keyword)
REPORT command,REPORT command,REPORT command
(width) | Width of the preceding variable within the string. The default is the dictionary width of the variable. The maximum width for numeric variables within the string definition is 16. The maximum width for a string variable is the system page width. If the width specified is less than that required by the value, numeric values are displayed as asterisks and string values are truncated. If the width exceeds the width of a value, numeric values are padded with zeros on the left and string values are padded with blanks on the right.
(BLANK) | Left-pad values of the preceding numeric variable with blanks. The default is to left-pad values of numeric variables with zeros. If a numeric variable has a dollar or comma format, it is automatically left-padded with blanks.
‘literal’ | User-specified string. Any combination of characters can be specified within quotes.

Example

 /STRING=JOB1(AVAR NVAR)
         JOB2(AVAR(2) NVAR(3))
         JOB3(AVAR(2) NVAR(BLANK) (4))

• STRING defines three string variables to be used within the report.

• Assume that AVAR is a string variable read from a four-column field using keyword FIXED on DATA LIST and that NVAR is a computed numeric variable with the default format of eight columns with two implied decimal places.

• If a case has value KJ for AVAR and value 241 for NVAR, JOB1 displays the value ‘KJ 00241.00’, JOB2 the value ‘KJ241’, and JOB3 the value ‘KJ 241’. If NVAR has the system-missing value for a case, JOB1 displays the value ‘KJ’.

Example

  /STRING=SOCSEC(S1 '-' S2 '-' S3)

• STRING concatenates the three variables S1, S2, and S3, each of which contains a segment of the social security number.

• Hyphens are inserted between the segments when the values of SOCSEC are displayed.

• This example assumes that the variables S1, S2, and S3 were read from three-column, two-column, and four-column fields respectively, using the keyword FIXED on DATA LIST. These variables would then have default format widths of 3, 2, and 4 columns and would not be left-padded with zeros.

Related Topics

REPORT
Overview (REPORT command)
Examples (REPORT command)
Defaults (REPORT command)
Options (REPORT command)
FORMAT Subcommand (REPORT command)
OUTFILE Subcommand (REPORT command)
VARIABLES Subcommand (REPORT command)
Column Contents (REPORT command)
Column Heading (REPORT command)
Column Heading Alignment (REPORT command)
Column Format (REPORT command)
BREAK Subcommand (REPORT command)
Column Contents (REPORT command)
Column Heading (REPORT command)
Column Heading Alignment (REPORT command)
Column Format (REPORT command)
SUMMARY Subcommand (REPORT command)
Aggregate Functions (REPORT command)
Composite Functions (REPORT command)
Summary Titles (REPORT command)
Summary Print Formats (REPORT command)
Other Summary Keywords (REPORT command)
TITLE and FOOTNOTE Subcommands (REPORT command)
MISSING Subcommand (REPORT command)


BREAK Subcommand (REPORT command)

REPORT (command),REPORT (command),REPORT (command)
BREAK subcommand,BREAK subcommand,BREAK subcommand
BREAK (subcommand),BREAK (subcommand),BREAK (subcommand)
REPORT command,REPORT command,REPORT command
REPORT (command),REPORT (command),REPORT (command)
defining subgroups,defining subgroups,defining subgroups

BREAK specifies the variables that define the subgroups for the report, or it specifies summary totals for reports with no subgroups. BREAK also allows you to control the titles, width, and contents of break columns and to begin a new page for each level of the break variable.

• A break occurs when any one of the variables named on BREAK changes value. Cases must be sorted by the values of all BREAK variables on all BREAK subcommands.

• The BREAK subcommand must precede the SUMMARY subcommand that defines the summary line for the break.

• A break column is reserved for each BREAK subcommand if ONEBREAKCOLUMN is OFF (the default).

• To obtain multiple break levels, specify multiple break variables on a BREAK subcommand.

• If more than one variable is specified on a BREAK subcommand, a single break column is used. The value or value label for each variable is displayed on a separate line in the order in which the variables are specified on BREAK. The first variable specified changes most slowly. The default column width is the longest of the default widths for any of the break variables.

• To obtain summary totals without any break levels, use keyword TOTAL in parentheses on BREAK without listing any variables. TOTAL must be specified on the first BREAK subcommand.

• When MISSING=VAR is specified, user-missing values are displayed in case listings but are not included in summary statistics. When NONE is specified, user-missing values are ignored. System-missing values are displayed as missing in case and break listings.

• Optional specifications apply to all variables in the break column and to the break column as a whole. Options can be specified in any order following the last variable named.

• All optional specifications except column headings must be enclosed in parentheses; column headings must be enclosed in quotes.

Related Topics

REPORT
Overview (REPORT command)
Examples (REPORT command)
Defaults (REPORT command)
Options (REPORT command)
FORMAT Subcommand (REPORT command)
OUTFILE Subcommand (REPORT command)
VARIABLES Subcommand (REPORT command)
Column Contents (REPORT command)
Column Heading (REPORT command)
Column Heading Alignment (REPORT command)
Column Format (REPORT command)
STRING Subcommand (REPORT command)
Column Contents (REPORT command)
Column Heading (REPORT command)
Column Heading Alignment (REPORT command)
Column Format (REPORT command)
SUMMARY Subcommand (REPORT command)
Aggregate Functions (REPORT command)
Composite Functions (REPORT command)
Summary Titles (REPORT command)
Summary Print Formats (REPORT command)
Other Summary Keywords (REPORT command)
TITLE and FOOTNOTE Subcommands (REPORT command)
MISSING Subcommand (REPORT command)


Column Contents (REPORT command)

The following can be used to specify the contents of the break column:

VALUE (keyword),VALUE (keyword),VALUE (keyword)
REPORT command,REPORT command,REPORT command
LABEL (keyword),LABEL (keyword),LABEL (keyword)
REPORT command,REPORT command,REPORT command
(VALUE) | Display values of the break variables.
(LABEL) | Display value labels. If no value labels have been defined, values are displayed.

• The value or label is displayed only once for each break change but it is repeated at the top of the page in a multiple-page break group.

• When AUTOMATIC is in effect, the default is LABEL; when MANUAL is in effect, the default is VALUE.

• When AUTOMATIC is in effect, the value or label is centered in the column. When MANUAL is in effect, value labels and string values are left-justified and numeric values are right-justified. Keywords OFFSET, ONEBREAKCOLUMN, and INDENT can also affect positioning.

Related Topics

REPORT
Overview (REPORT command)
Examples (REPORT command)
Defaults (REPORT command)
Options (REPORT command)
FORMAT Subcommand (REPORT command)
OUTFILE Subcommand (REPORT command)
VARIABLES Subcommand (REPORT command)
Column Contents (REPORT command)
Column Heading (REPORT command)
Column Heading Alignment (REPORT command)
Column Format (REPORT command)
STRING Subcommand (REPORT command)
BREAK Subcommand (REPORT command)
Column Heading (REPORT command)
Column Heading Alignment (REPORT command)
Column Format (REPORT command)
SUMMARY Subcommand (REPORT command)
Aggregate Functions (REPORT command)
Composite Functions (REPORT command)
Summary Titles (REPORT command)
Summary Print Formats (REPORT command)
Other Summary Keywords (REPORT command)
TITLE and FOOTNOTE Subcommands (REPORT command)
MISSING Subcommand (REPORT command)


Column Heading (REPORT command)

The following option specifies headings used for the break column.

‘column heading’ Column heading for the break column. The heading must be included in quotes. The default heading is the variable label of the break variable or, if no label has been defined, the variable name. If the break column is defined by more than one variable, the label or name of the first variable is used. If ONEBREAKCOLUMN is ON, the specified or implied column heading for the first BREAK subcommand is used.

• To specify multiple-line headings, enclose each line in a set of quotes, following the conventions for strings. Separate the specifications for heading lines with at least one blank.

• Default column headings wrap for as many lines as are required to display the entire label.

• User-specified column headings appear exactly as specified if CHWRAP is OFF (the default). If CHWRAP is ON, any user-defined line longer than the specified or default column width is automatically wrapped.

Related Topics

REPORT
Overview (REPORT command)
Examples (REPORT command)
Defaults (REPORT command)
Options (REPORT command)
FORMAT Subcommand (REPORT command)
OUTFILE Subcommand (REPORT command)
VARIABLES Subcommand (REPORT command)
Column Contents (REPORT command)
Column Heading (REPORT command)
Column Heading Alignment (REPORT command)
Column Format (REPORT command)
STRING Subcommand (REPORT command)
BREAK Subcommand (REPORT command)
Column Contents (REPORT command)
Column Heading Alignment (REPORT command)
Column Format (REPORT command)
SUMMARY Subcommand (REPORT command)
Aggregate Functions (REPORT command)
Composite Functions (REPORT command)
Summary Titles (REPORT command)
Summary Print Formats (REPORT command)
Other Summary Keywords (REPORT command)
TITLE and FOOTNOTE Subcommands (REPORT command)
MISSING Subcommand (REPORT command)


Column Heading Alignment (REPORT command)

The following options can be used to specify how column headings are aligned:

LEFT (keyword),LEFT (keyword),LEFT (keyword)
REPORT command,REPORT command,REPORT command
CENTER (keyword),CENTER (keyword),CENTER (keyword)
REPORT command,REPORT command,REPORT command
RIGHT (keyword),RIGHT (keyword),RIGHT (keyword)
REPORT command,REPORT command,REPORT command
(LEFT) | Left-aligned column heading.
(CENTER) | Centered column heading.
(RIGHT) | Right-aligned column heading.

• When AUTOMATIC is in effect, column headings are centered within their columns by default. If value labels or string values exceed the width of the longest word in the heading, the heading is left-justified.

• When MANUAL is in effect, column headings are left-justified for value labels or string values and right-justified for numeric values.

• When ONEBREAKCOLUMN is ON, all column contents are left aligned. Specifications of CENTER and RIGHT on BREAK are ignored.

Related Topics

REPORT
Overview (REPORT command)
Examples (REPORT command)
Defaults (REPORT command)
Options (REPORT command)
FORMAT Subcommand (REPORT command)
OUTFILE Subcommand (REPORT command)
VARIABLES Subcommand (REPORT command)
Column Contents (REPORT command)
Column Heading (REPORT command)
Column Heading Alignment (REPORT command)
Column Format (REPORT command)
STRING Subcommand (REPORT command)
BREAK Subcommand (REPORT command)
Column Contents (REPORT command)
Column Heading (REPORT command)
Column Format (REPORT command)
SUMMARY Subcommand (REPORT command)
Aggregate Functions (REPORT command)
Composite Functions (REPORT command)
Summary Titles (REPORT command)
Summary Print Formats (REPORT command)
Other Summary Keywords (REPORT command)
TITLE and FOOTNOTE Subcommands (REPORT command)
MISSING Subcommand (REPORT command)


Column Format (REPORT command)

The following options can be used to format break columns:

OFFSET (keyword),OFFSET (keyword),OFFSET (keyword)
REPORT command,REPORT command,REPORT command
UNDERSCORE (keyword),UNDERSCORE (keyword),UNDERSCORE (keyword)
REPORT command,REPORT command,REPORT command
TOTAL (keyword),TOTAL (keyword),TOTAL (keyword)
REPORT command,REPORT command,REPORT command
SKIP (keyword),SKIP (keyword),SKIP (keyword)
REPORT command,REPORT command,REPORT command
PAGE (keyword),PAGE (keyword),PAGE (keyword)
REPORT command,REPORT command,REPORT command
NAME (keyword),NAME (keyword),NAME (keyword)
REPORT command,REPORT command,REPORT command
NONAME (keyword),NONAME (keyword),NONAME (keyword)
REPORT command,REPORT command,REPORT command
(width) | Column width for the break column. If no width is specified for a variable, REPORT determines a default width using the criteria described under Defaults. If ONEBREAKCOLUMN is ON, the column width specified or implied by the first BREAK subcommand is used. If you specify a width that is not wide enough to display numeric values, REPORT first rounds decimal digits, then converts them to scientific notation if possible, and then displays asterisks. Value labels or string values that exceed the width are wrapped.
(OFFSET) | Position of the break column contents. The specification is either n or CENTER specified in parentheses. OFFSET(n) indicates the number of spaces to offset the contents from the left for value labels or string values, and from the right for numeric values. OFFSET(CENTER) centers contents within the column. If AUTOMATIC is in effect, the default is CENTER. If MANUAL is in effect, the default is 0: value labels and string values are left-justified and numeric values are right-justified. If ONEBREAKCOLUMN is ON, the offset is applied along with the indentation specified on INDENT, always from the left. The specification of CENTER on OFFSET is ignored.
(UNDERSCORE) | Use underscores below case listings. Case listing columns produced by FORMAT LIST are underscored before summary statistics are displayed. You can optionally specify the names of one or more report variables after UNDERSCORE; only the specified columns are underscored.
(TOTAL) | Display the summary statistics requested on the next SUMMARY subcommand for all the cases in the report. TOTAL must be specified on the first BREAK subcommand and applies only to the next SUMMARY subcommand specified.
(NOTOTAL) | Display summary statistics only for each break. This is the default.
(SKIP(n)) | Skip n lines after the last summary line for a break before beginning the next break. The default for n is 1.
(PAGE) | Begin each break on a new page. If RESET is specified on PAGE, the page counter resets to the PAGE1 setting on the FORMAT subcommand every time the break value changes for the specified variable. PAGE cannot be specified for listing reports with no break levels.
(NAME) | Display the name of the break variable next to each value or value label of the break variable. NAME requires enough space for the length of the variable name plus two additional characters (for a colon and a blank space) in addition to the space needed to display break values or value labels. NAME is ignored if the break column width is insufficient.
(NONAME) | Suppress the display of break variable names. This is the default.

Example

SORT DIVISION BRANCH DEPT.
REPORT FORMAT=AUTOMATIC MARGINS (1,70) BRKSPACE(-1)

  /VARIABLES=SPACE(DUMMY) ' ' (4)
             SALES 'Annual' 'Sales' '1981' (15) (OFFSET(2))
             EXPENSES 'Annual' 'Expenses' '1981' (15) (OFFSET(2))

  /BREAK=DIVISION
         BRANCH (10) (TOTAL) (OFFSET(1))
  /SUMMARY=MEAN

  /BREAK=DEPT 'Department' (10)
  /SUMMARY=MEAN.

• This example creates a report with three break variables. BRANCH breaks within values of DIVISION, and DEPT breaks within values of BRANCH.

• FORMAT sets margins to a maximum of 70 columns and requests that summary lines be displayed on the same line as break values. Because LIST is not specified on FORMAT, only summary statistics are displayed.

• VARIABLES defines three report columns, each occupied by a report variable: SPACE, SALES, and EXPENSES.

• The variable SPACE is a dummy variable that exists only within REPORT. It has a null heading and a width of 4. It is used as a space holder to separate the break columns from the report columns.

• SALES has a three-line heading and a width of 15. The values of SALES are offset two spaces from the right.

• EXPENSES is the third report variable and has the same width and offset specifications as SALES.

• The leftmost column in the report is reserved for the first two break variables, DIVISION and BRANCH. Value labels are displayed, since this is the default for AUTOMATIC. The break column has a width of 10 and the value labels are offset one space from the left. Value labels more than nine characters long are wrapped. The default column heading is used. TOTAL requests a summary line at the end of the report showing the mean of all cases in the report.

• The first SUMMARY subcommand displays the mean of each report variable in its report column. This line is displayed each time the value of DIVISION or BRANCH changes.

• The third break variable, DEPT, occupies the second column from the left in the report. The break column has a width of 10 and has a one-line heading. Value labels are displayed in the break column, and those exceeding 10 characters are wrapped.

• The second SUMMARY subcommand displays the mean for each report variable when the value of DEPT changes.

Related Topics

REPORT
Overview (REPORT command)
Examples (REPORT command)
Defaults (REPORT command)
Options (REPORT command)
FORMAT Subcommand (REPORT command)
OUTFILE Subcommand (REPORT command)
VARIABLES Subcommand (REPORT command)
Column Contents (REPORT command)
Column Heading (REPORT command)
Column Heading Alignment (REPORT command)
Column Format (REPORT command)
STRING Subcommand (REPORT command)
BREAK Subcommand (REPORT command)
Column Contents (REPORT command)
Column Heading (REPORT command)
Column Heading Alignment (REPORT command)
SUMMARY Subcommand (REPORT command)
Aggregate Functions (REPORT command)
Composite Functions (REPORT command)
Summary Titles (REPORT command)
Summary Print Formats (REPORT command)
Other Summary Keywords (REPORT command)
TITLE and FOOTNOTE Subcommands (REPORT command)
MISSING Subcommand (REPORT command)


SUMMARY Subcommand (REPORT command)

SUMMARY (subcommand),SUMMARY (subcommand),SUMMARY (subcommand)
REPORT command,REPORT command,REPORT command
REPORT (command),REPORT (command),REPORT (command)
SUMMARY subcommand,SUMMARY subcommand,SUMMARY subcommand
REPORT (command),REPORT (command),REPORT (command)
summary statistics,summary statistics,summary statistics

SUMMARY calculates a wide range of aggregate and composite statistics.

• SUMMARY must be specified if LIST is not specified on FORMAT.

• The minimum specification is an aggregate or a composite function and its arguments. This must be the first specification on SUMMARY.

• Each SUMMARY subcommand following a BREAK subcommand specifies a new summary line.

• The default location of the summary title is the column of the break variable to which the summary applies. When more than one function is named on SUMMARY, the default summary title is that of the function named first. Both the title and its default column location can be altered. See the topic Summary Titles (REPORT command) for more information.

• The default format can be altered for any function. (See the topic Summary Print Formats (REPORT command) for more information. )

• SUMMARY subcommands apply only to the preceding BREAK subcommand. If there is no SUMMARY subcommand after a BREAK subcommand, no statistics are displayed for that break level.

• To use the summary specifications from a previous BREAK subcommand for the current BREAK subcommand, specify keyword PREVIOUS on SUMMARY. See the topic Other Summary Keywords (REPORT command) for more information.

• Summary statistics are displayed in report columns. With aggregate functions, you can compute summary statistics for all report variables or for a subset. See the topic Aggregate Functions (REPORT command) for more information. With composite functions, you can compute summaries for all or a subset of report variables and you have additional control over the placement of summary statistics in particular report columns. See the topic Composite Functions (REPORT command) for more information.

• Multiple summary statistics requested on one SUMMARY subcommand are all displayed on the same line. More than one function can be specified on SUMMARY as long as you do not attempt to place two results in the same report column (REPORT will not be executed if you do). To place results of more than one function in the same report column, use multiple SUMMARY subcommands.

• Any composite and aggregate functions except FREQUENCY and PERCENT can be specified on the same summary line.

• To insert blank lines between summaries when more than one summary line is requested for a break, use keyword SKIP followed by the number of lines to skip in parentheses. The default is 0. See the topic Other Summary Keywords (REPORT command) for more information.

Related Topics

REPORT
Overview (REPORT command)
Examples (REPORT command)
Defaults (REPORT command)
Options (REPORT command)
FORMAT Subcommand (REPORT command)
OUTFILE Subcommand (REPORT command)
VARIABLES Subcommand (REPORT command)
Column Contents (REPORT command)
Column Heading (REPORT command)
Column Heading Alignment (REPORT command)
Column Format (REPORT command)
STRING Subcommand (REPORT command)
BREAK Subcommand (REPORT command)
Column Contents (REPORT command)
Column Heading (REPORT command)
Column Heading Alignment (REPORT command)
Column Format (REPORT command)
Aggregate Functions (REPORT command)
Composite Functions (REPORT command)
Summary Titles (REPORT command)
Summary Print Formats (REPORT command)
Other Summary Keywords (REPORT command)
TITLE and FOOTNOTE Subcommands (REPORT command)
MISSING Subcommand (REPORT command)


Aggregate Functions (REPORT command)

Use the aggregate functions to request descriptive statistics for report variables.

• If no variable names are specified as arguments to an aggregate function, the statistic is calculated for all variables named on VARIABLES (all report variables).

• To request an aggregate function for a subset of report variables, specify the variables in parentheses after the function keyword.

• All variables specified for an aggregate function must have been named on VARIABLES.

• Keyword TO cannot be used to specify a list of variables for an aggregate function.

• The result of an aggregate function is always displayed in the report column reserved for the variable for which the function was calculated.

• To use several aggregate functions for the same report variable, specify multiple SUMMARY subcommands. The results are displayed on different summary lines.

• The aggregate functions FREQUENCY and PERCENT have special display formats and cannot be placed on the same summary line with other aggregate or composite functions. They can be specified only once per SUMMARY subcommand.

• Aggregate functions use only cases with valid values.

VALIDN (function),VALIDN (function),VALIDN (function)
REPORT command,REPORT command,REPORT command
SUM (function),SUM (function),SUM (function)
REPORT command,REPORT command,REPORT command
MIN (function),MIN (function),MIN (function)
REPORT command,REPORT command,REPORT command
MAX (function),MAX (function),MAX (function)
REPORT command,REPORT command,REPORT command
MEAN (function),MEAN (function),MEAN (function)
REPORT command,REPORT command,REPORT command
standard deviation,standard deviation,standard deviation
REPORT command,REPORT command,REPORT command
STDDEV (function),STDDEV (function),STDDEV (function)
REPORT command,REPORT command,REPORT command
variance,variance,variance
REPORT command,REPORT command,REPORT command
VARIANCE (function),VARIANCE (function),VARIANCE (function)
REPORT command,REPORT command,REPORT command
KURTOSIS (function),KURTOSIS (function),KURTOSIS (function)
REPORT command,REPORT command,REPORT command
SKEWNESS (function),SKEWNESS (function),SKEWNESS (function)
REPORT command,REPORT command,REPORT command
MEDIAN (function),MEDIAN (function),MEDIAN (function)
REPORT command,REPORT command,REPORT command
MODE (function),MODE (function),MODE (function)
REPORT command,REPORT command,REPORT command
PGT (function),PGT (function),PGT (function)
REPORT command,REPORT command,REPORT command
PLT (function),PLT (function),PLT (function)
REPORT command,REPORT command,REPORT command
PIN (function),PIN (function),PIN (function)
REPORT command,REPORT command,REPORT command
FREQUENCY (function),FREQUENCY (function),FREQUENCY (function)
REPORT command,REPORT command,REPORT command
PERCENT (function),PERCENT (function),PERCENT (function)
REPORT command,REPORT command,REPORT command
VALIDN | Valid number of cases. This is the only function available for string variables.
SUM | Sum of values.
MIN | Minimum value.
MAX | Maximum value.
MEAN | Mean.
STDDEV | Standard deviation. Aliases are SD and STDEV.
VARIANCE | Variance.
KURTOSIS | Kurtosis.
SKEWNESS | Skewness.
MEDIAN(min,max) | Median value for values within the range. MEDIAN sets up integer-valued bins for counting all values in the specified range. Noninteger values are truncated when the median is calculated.
MODE(min,max) | Modal value for values within the range. MODE sets up integer-valued bins for counting all values in the specified range. Noninteger values are truncated when the mode is calculated.
PGT(n) | Percentage of cases with values greater than n. Alias PCGT.
PLT(n) | Percentage of cases with values less than n. Alias PCLT.
PIN(min,max) | Percentage of cases within the inclusive value range specified. Alias PCIN.
FREQUENCY(min,max) | Frequency counts for values within the inclusive range. FREQUENCY sets up integer-valued bins for counting all values in the specified range. Noninteger values are truncated when the frequency is computed. FREQUENCY cannot be mixed with other aggregate statistics on a summary line.
PERCENT(min,max) | Percentages for values within the inclusive range. PERCENT sets up integer-valued bins for counting all values in the specified range. Noninteger values are truncated when the percentages are computed. PERCENT cannot be mixed with other aggregate statistics on a summary line.

Example

SORT CASES BY BVAR AVAR.
REPORT FORMAT=AUTOMATIC LIST /VARIABLES=XVAR YVAR ZVAR

  /BREAK=BVAR
    /SUMMARY=SUM
    /SUMMARY=MEAN (XVAR YVAR ZVAR)
    /SUMMARY=VALIDN(XVAR)

  /BREAK=AVAR
    /SUMMARY=PREVIOUS.

• FORMAT requests a case listing, and VARIABLES establishes a report column for variables XVAR, YVAR, and ZVAR. The report columns have default widths and titles.

• Both break variables, BVAR and AVAR, have default widths and headings.

• Every time the value of BVAR changes, three summary lines are displayed. The first line contains the sums for variables XVAR, YVAR, and ZVAR. The second line contains the means of all three variables. The third line displays the number of valid cases for XVAR in the report column for XVAR.

• Every time the value of AVAR changes within each value of BVAR, the three summary lines requested for BVAR are displayed. These summary lines are based on cases with the current values of BVAR and AVAR.

Example

SORT CASES BY DEPT.
REPORT FORMAT=AUTOMATIC
  /VARIABLES=WAGE BONUS TENURE
  /BREAK=DEPT (23)
  /SUMMARY=SUM(WAGE BONUS) MEAN(TENURE) 'Sum Income: Mean Tenure'.

• SUMMARY defines a summary line consisting of the sums of WAGE and BONUS and the mean of TENURE. The result of each aggregate function is displayed in the report column of the variable for which the function is calculated.

• A title is assigned to the summary line. A width of 23 is defined for the break column to accommodate the title for the summary line.

Related Topics

REPORT
Overview (REPORT command)
Examples (REPORT command)
Defaults (REPORT command)
Options (REPORT command)
FORMAT Subcommand (REPORT command)
OUTFILE Subcommand (REPORT command)
VARIABLES Subcommand (REPORT command)
Column Contents (REPORT command)
Column Heading (REPORT command)
Column Heading Alignment (REPORT command)
Column Format (REPORT command)
STRING Subcommand (REPORT command)
BREAK Subcommand (REPORT command)
Column Contents (REPORT command)
Column Heading (REPORT command)
Column Heading Alignment (REPORT command)
Column Format (REPORT command)
SUMMARY Subcommand (REPORT command)
Composite Functions (REPORT command)
Summary Titles (REPORT command)
Summary Print Formats (REPORT command)
Other Summary Keywords (REPORT command)
TITLE and FOOTNOTE Subcommands (REPORT command)
MISSING Subcommand (REPORT command)


Composite Functions (REPORT command)

Use composite functions to obtain statistics based on aggregated statistics, to place a summary statistic in a column other than that of the report variable for which it was calculated, or to manipulate variables not named on VARIABLES.

• Composite functions can be computed for the following aggregate functions: VALIDN, SUM, MIN, MAX, MEAN, STDEV, VARIANCE, KURTOSIS, SKEWNESS, PGT, PLT, and PIN. Constants can also be arguments to composite functions.

• When used within composite functions, aggregate functions can have only one variable as an argument.

• A composite function and its arguments cannot be separated by other SUMMARY specifications.

• The result of a composite function can be placed in any report column, including columns of dummy or string variables, by specifying a target column. To specify a target column, enclose the variable name of the column in parentheses after the composite function and its arguments. By default, the results of a composite function are placed in the report column of the first variable specified on the composite function that is also specified on VARIABLES.

• The format for the result of a composite function can be specified in parentheses after the name of the column location, within the parentheses that enclose the column-location specification.

DIVIDE (function),DIVIDE (function),DIVIDE (function)
REPORT command,REPORT command,REPORT command
MULTIPLY (function),MULTIPLY (function),MULTIPLY (function)
REPORT command,REPORT command,REPORT command
PCT (function),PCT (function),PCT (function)
REPORT command,REPORT command,REPORT command
SUBTRACT (function),SUBTRACT (function),SUBTRACT (function)
REPORT command,REPORT command,REPORT command
ADD (function),ADD (function),ADD (function)
REPORT command,REPORT command,REPORT command
GREAT (function),GREAT (function),GREAT (function)
REPORT command,REPORT command,REPORT command
LEAST (function),LEAST (function),LEAST (function)
REPORT command,REPORT command,REPORT command
AVERAGE (function),AVERAGE (function),AVERAGE (function)
REPORT command,REPORT command,REPORT command
DIVIDE(arg arg | Divide the first argument by the second and then multiply the result by the factor if it is specified.
MULTIPLY(arg | Multiply the arguments.
PCT(arg | The percentage of the first argument over the second.
SUBTRACT(arg | Subtract the second argument from the first.
ADD(arg | Add the arguments.
GREAT(arg | The maximum of the arguments.
LEAST(arg | The minimum of the arguments.
AVERAGE(arg | The average of the arguments.

Example

SORT CASES BY DEPT.
REPORT FORMAT=AUTOMATIC BRKSPACE(-1)
  /VARIABLES=WAGE BONUS SPACE1 (DUMMY) '' BNFT1 BNFT2 SPACE2 (DUMMY)''
  /BREAK=DEPT

  /SUMMARY=MEAN(WAGE BONUS BNFT1 BNFT2)
       ADD(VALIDN(WAGE)) (SPACE2)

  /SUMMARY=ADD(SUM(WAGE) SUM(BONUS))
        ADD(SUM(BNFT1) SUM(BNFT2)) 'Totals' SKIP(1)

  /SUMMARY=DIVIDE(MEAN(WAGE) MEAN(BONUS)) (SPACE1 (COMMA)(2))
        DIVIDE(MEAN(BNFT1) MEAN(BNFT2)) (SPACE2 (COMMA)(2)) 'Ratios'
        SKIP(1).

• VARIABLES defines six report columns. The columns for WAGE, BONUS, BNFT1, and BNFT2 contain aggregate statistics based on those variables. The variables SPACE1 and SPACE2 are dummy variables that are created for use as space holders; each is given a blank heading to suppress the default column heading.

• The first SUMMARY computes the means of the variables WAGE, BONUS, BNFT1, and BNFT2. Because BRKSPACE=–1, this summary line will be placed on the same line as the break value and will have no summary title. The means are displayed in the report column for each variable. SUMMARY also computes the valid number of cases for WAGE and places the result in the SPACE2 column.

• The second SUMMARY adds the sum of WAGE to the sum of BONUS. Since no location is specified, the result is displayed in the WAGE column. In addition, the sum of BNFT1 is added to the sum of BNFT2 and the result is placed in the BNFT1 column. The title for the summary line is Totals. One line is skipped before the summary line requested by this SUMMARY subcommand is displayed.

• The third summary line divides the mean of WAGE by the mean of BONUS and places the result in SPACE1. The ratio of the mean of BNFT1 to the mean of BNFT2 is displayed in the SPACE2 column. The results are displayed with commas and two decimal places. The title for the summary line is Ratios. One line is skipped before the summary line requested by this SUMMARY subcommand is displayed.

Related Topics

REPORT
Overview (REPORT command)
Examples (REPORT command)
Defaults (REPORT command)
Options (REPORT command)
FORMAT Subcommand (REPORT command)
OUTFILE Subcommand (REPORT command)
VARIABLES Subcommand (REPORT command)
Column Contents (REPORT command)
Column Heading (REPORT command)
Column Heading Alignment (REPORT command)
Column Format (REPORT command)
STRING Subcommand (REPORT command)
BREAK Subcommand (REPORT command)
Column Contents (REPORT command)
Column Heading (REPORT command)
Column Heading Alignment (REPORT command)
Column Format (REPORT command)
SUMMARY Subcommand (REPORT command)
Aggregate Functions (REPORT command)
Summary Titles (REPORT command)
Summary Print Formats (REPORT command)
Other Summary Keywords (REPORT command)
TITLE and FOOTNOTE Subcommands (REPORT command)
MISSING Subcommand (REPORT command)


Summary Titles (REPORT command)

• You can specify a summary title enclosed in quotes, following the conventions for strings.

• The summary title must be specified after the first function and its arguments. It cannot separate any function from its arguments.

• A summary title can be only one line long.

• A summary title wider than the break column extends into the next break column to the right. If the title is wider than all of the available break columns, it is truncated.

• Only one summary title can be specified per summary line. If more than one is specified, the last is used.

• The summary title is left- or right-justified depending upon whether the break title is left- or right-justified.

• The default location for the summary title is the column of the BREAK variable to which the summary applies. With multiple breaks, you can override the default placement of the title by specifying, in parentheses following the title, the number of the break column in which you want the summary title to be displayed.

• In a report with no break levels, REPORT displays the summary title above the summary line at the left margin.

Default title for summary lines
Function | Title
VALIDN | N
VARIANCE | Variance
SUM | Sum
MEAN | Mean
STDDEV | StdDev
MIN | Minimum
MAX | Maximum
SKEWNESS | Skewness
KURTOSIS | Kurtosis
PGT(n) | >n
PLT(n) | <n
PIN(min,max) | In n1 to n2
FREQUENCY(min,max) | Total
PERCENT(min,max) | Total
MEDIAN(min,max) | Median
MODE(min,max) | Mode

Related Topics

REPORT
Overview (REPORT command)
Examples (REPORT command)
Defaults (REPORT command)
Options (REPORT command)
FORMAT Subcommand (REPORT command)
OUTFILE Subcommand (REPORT command)
VARIABLES Subcommand (REPORT command)
Column Contents (REPORT command)
Column Heading (REPORT command)
Column Heading Alignment (REPORT command)
Column Format (REPORT command)
STRING Subcommand (REPORT command)
BREAK Subcommand (REPORT command)
Column Contents (REPORT command)
Column Heading (REPORT command)
Column Heading Alignment (REPORT command)
Column Format (REPORT command)
SUMMARY Subcommand (REPORT command)
Aggregate Functions (REPORT command)
Composite Functions (REPORT command)
Summary Print Formats (REPORT command)
Other Summary Keywords (REPORT command)
TITLE and FOOTNOTE Subcommands (REPORT command)
MISSING Subcommand (REPORT command)


Summary Print Formats (REPORT command)

REPORT (command),REPORT (command),REPORT (command)
print formats,print formats,print formats

All functions have default formats that are used to display results. You can override these defaults by specifying a format keyword and/or the number of decimal places.

• Any printable formats or the PLAIN keyword can be specified. Format specifications must be enclosed in parentheses.

• For aggregate functions, the format and/or number of decimal places is specified after the variable name, within the parentheses that enclose the variable name. The variable must be explicitly named as an argument.

• For composite functions, the format and/or number of decimal places is specified after the variable name of the column location, within the parentheses that enclose the variable name. The column location must be explicitly specified.

• If the report column is wide enough, SUM, MEAN, STDDEV, MIN, MAX, MEDIAN, MODE, and VARIANCE use DOLLAR or COMMA format if a DOLLAR or COMMA format has been declared for the variable on either the FORMATS or PRINT FORMATS command.

• If the column is not wide enough to display the decimal digits for a given function, REPORT displays fewer decimal places. If the column is not wide enough to display the integer portion of the number, REPORT uses scientific notation if possible, or, if not, displays asterisks.

• An exact value of 0 is displayed with one 0 to the left of the decimal point and as many 0 digits to the right as specified by the format. A number less than 1 in absolute value is displayed without a 0 to the left of the decimal point, except with DOLLAR and COMMA formats.

PLAIN (keyword),PLAIN (keyword),PLAIN (keyword)
REPORT command,REPORT command,REPORT command
(PLAIN) | Uses the setting on SET DECIMAL for the thousands separator and decimal delimiter. PLAIN overrides dictionary formats. This is the default for all functions except SUM, MEAN, STDDEV, MIN, MAX, MEDIAN, MODE, and VARIANCE. For these functions, the default is the dictionary format of the variable for which the function is computed.
(d) | Number of decimal places.

Example

 /SUMMARY=MEAN(INCOME (DOLLAR)(2))
          ADD(SUM(INCOME)SUM(WEALTH)) (WEALTH(DOLLAR(2))

• SUMMARY displays the mean of INCOME with dollar format and two decimal places. The result is displayed in the INCOME column.

• The sums of INCOME and WEALTH are added, and the result is displayed in the WEALTH column with dollar format and two decimal places.

Default print formats for functions
Function | Format type | Width | Decimal places
VALIDN | F | 5 | 0
SUM | Dictionary | Dictionary + 2 | Dictionary
MEAN | Dictionary | Dictionary | Dictionary
STDDEV | Dictionary | Dictionary | Dictionary
VARIANCE | Dictionary | Dictionary | Dictionary
MIN | Dictionary | Dictionary | Dictionary
MAX | Dictionary | Dictionary | Dictionary
SKEWNESS | F | 5 | 2
KURTOSIS | F | 5 | 2
PGT | PCT | 6 | 1
PLT | PCT | 6 | 1
PIN | PCT | 6 | 1
MEDIAN | Dictionary | Dictionary | Dictionary
MODE | Dictionary | Dictionary | Dictionary
PERCENT | F | 6 | 1
FREQUENCY | F | 5 | 0
DIVIDE | F | Dictionary | 0
PCT | PCT | 6 | 2
SUBTRACT | F | Dictionary | 0
ADD | F | Dictionary | 0
GREAT | F | Dictionary | 0
LEAST | F | Dictionary | 0
AVERAGE | F | Dictionary | 0
MULTIPLY | F | Dictionary | 0

Where DATE formats are specified, functions with the dictionary format type display the DATE formats, using the column width as the display width.

Related Topics

REPORT
Overview (REPORT command)
Examples (REPORT command)
Defaults (REPORT command)
Options (REPORT command)
FORMAT Subcommand (REPORT command)
OUTFILE Subcommand (REPORT command)
VARIABLES Subcommand (REPORT command)
Column Contents (REPORT command)
Column Heading (REPORT command)
Column Heading Alignment (REPORT command)
Column Format (REPORT command)
STRING Subcommand (REPORT command)
BREAK Subcommand (REPORT command)
Column Contents (REPORT command)
Column Heading (REPORT command)
Column Heading Alignment (REPORT command)
Column Format (REPORT command)
SUMMARY Subcommand (REPORT command)
Aggregate Functions (REPORT command)
Composite Functions (REPORT command)
Summary Titles (REPORT command)
Other Summary Keywords (REPORT command)
TITLE and FOOTNOTE Subcommands (REPORT command)
MISSING Subcommand (REPORT command)


Other Summary Keywords (REPORT command)

The following additional keywords can be specified on SUMMARY. These keywords are not enclosed in parentheses.

SKIP (keyword),SKIP (keyword),SKIP (keyword)
REPORT command,REPORT command,REPORT command
PREVIOUS (keyword),PREVIOUS (keyword),PREVIOUS (keyword)
REPORT command,REPORT command,REPORT command
SKIP(n) | Blank lines before the summary line. The default is 0. If SKIP is specified for the first SUMMARY subcommand for a BREAK, it skips the specified lines after skipping the number of lines specified for BRKSPACE on FORMAT. Similarly, with case listings SKIP skips n lines after the blank line at the end of the listing.
PREVIOUS(n) | Use the SUMMARY subcommands specified for the nth BREAK. If n is not specified, PREVIOUS refers to the set of SUMMARY subcommands for the previous BREAK. If an integer is specified, the SUMMARY subcommands from the nth BREAK are used. If PREVIOUS is specified, no other specification can be used on that SUMMARY subcommand.

Related Topics

REPORT
Overview (REPORT command)
Examples (REPORT command)
Defaults (REPORT command)
Options (REPORT command)
FORMAT Subcommand (REPORT command)
OUTFILE Subcommand (REPORT command)
VARIABLES Subcommand (REPORT command)
Column Contents (REPORT command)
Column Heading (REPORT command)
Column Heading Alignment (REPORT command)
Column Format (REPORT command)
STRING Subcommand (REPORT command)
BREAK Subcommand (REPORT command)
Column Contents (REPORT command)
Column Heading (REPORT command)
Column Heading Alignment (REPORT command)
Column Format (REPORT command)
SUMMARY Subcommand (REPORT command)
Aggregate Functions (REPORT command)
Composite Functions (REPORT command)
Summary Titles (REPORT command)
Summary Print Formats (REPORT command)
TITLE and FOOTNOTE Subcommands (REPORT command)
MISSING Subcommand (REPORT command)


TITLE and FOOTNOTE Subcommands (REPORT command)

REPORT (command),REPORT (command),REPORT (command)
footnotes,footnotes,footnotes
REPORT (command),REPORT (command),REPORT (command)
titles,titles,titles
TITLE (subcommand),TITLE (subcommand),TITLE (subcommand)
REPORT command,REPORT command,REPORT command
LEFT (keyword),LEFT (keyword),LEFT (keyword)
REPORT command,REPORT command,REPORT command
RIGHT (keyword),RIGHT (keyword),RIGHT (keyword)
REPORT command,REPORT command,REPORT command
CENTER (keyword),CENTER (keyword),CENTER (keyword)
REPORT command,REPORT command,REPORT command
FOOTNOTE (subcommand),FOOTNOTE (subcommand),FOOTNOTE (subcommand)
REPORT command,REPORT command,REPORT command

TITLE and FOOTNOTE provide titles and footnotes for the report.

• TITLE and FOOTNOTE are optional and can be placed anywhere after FORMAT except between the BREAK and SUMMARY subcommands.

• The specification on TITLE or FOOTNOTE is the title or footnote in quotes. To specify a multiple-line title or footnote, enclose each line in quotes and separate the specifications for each line by at least one blank.

• The default REPORT title is the title specified on the TITLE command. If there is no TITLE command specified in your session, the default REPORT title is the first line of the header.

• Titles begin on the first line of the report page. Footnotes end on the last line of the report page.

• Titles and footnotes are repeated on each page of a multiple-page report.

• The positional keywords LEFT, CENTER, and RIGHT can each be specified once. The default is CENTER.

• If the total width needed for the combined titles or footnotes for a line exceeds the page width, REPORT generates an error message.

LEFT | Left-justify titles or footnotes within the report page margins.
RIGHT | Right-justify titles or footnotes within the report page margins.
CENTER | Center titles and footnotes within the report page width.

The following can be specified as part of the title or footnote.

PAGE (argument),PAGE (argument),PAGE (argument)
REPORT command,REPORT command,REPORT command
DATE (argument),DATE (argument),DATE (argument)
REPORT command,REPORT command,REPORT command
)PAGE | Display the page number right-justified in a five-character field.
)DATE | Display the current date in the form dd/mmm/yy, right-justified in a nine-character field.
)var | Display this variable’s value label at this position. If you specify a variable that has no value label, the value is displayed, formatted according to its print format. You cannot specify a scratch or system variable or a variable created with the STRING subcommand. If you want to use a variable named DATE or PAGE in the file, change the variable’s name with the RENAME VARIABLES command before you use it on the TITLE or FOOTNOTE subcommands, to avoid confusion with the )PAGE and )DATE keywords.

• )PAGE, )DATE, and )var are specified within quotes and can be mixed with string segments within the quotes.

• A variable specified on TITLE or FOOTNOTE must be defined in the active dataset, but does not need to be included as a column on the report.

• One label or value from each variable specified on TITLE or FOOTNOTE is displayed on every page of the report. If a new page starts with a case listing, REPORT takes the value label from the first case listed. If a new page starts with a BREAK line, REPORT takes the value label from the first case of the new break group. If a new page starts with a summary line, REPORT takes the value label from the last case of the break group being summarized.

Example

  /TITLE=LEFT 'Personnel Report' 'Prepared on )DATE'
      RIGHT 'Page: )PAGE'

• TITLE specifies two lines for a left-justified title and one line for a right-justified title. These titles are displayed at the top of each page of the report.

• The second line of the left-justified title contains the date on which the report was processed.

• The right-justified title displays the page number following the string Page: on the same line as the first line of the left-justified title.

Related Topics

REPORT
Overview (REPORT command)
Examples (REPORT command)
Defaults (REPORT command)
Options (REPORT command)
FORMAT Subcommand (REPORT command)
OUTFILE Subcommand (REPORT command)
VARIABLES Subcommand (REPORT command)
Column Contents (REPORT command)
Column Heading (REPORT command)
Column Heading Alignment (REPORT command)
Column Format (REPORT command)
STRING Subcommand (REPORT command)
BREAK Subcommand (REPORT command)
Column Contents (REPORT command)
Column Heading (REPORT command)
Column Heading Alignment (REPORT command)
Column Format (REPORT command)
SUMMARY Subcommand (REPORT command)
Aggregate Functions (REPORT command)
Composite Functions (REPORT command)
Summary Titles (REPORT command)
Summary Print Formats (REPORT command)
Other Summary Keywords (REPORT command)
MISSING Subcommand (REPORT command)


MISSING Subcommand (REPORT command)

REPORT (command),REPORT (command),REPORT (command)
MISSING subcommand,MISSING subcommand,MISSING subcommand
MISSING (subcommand),MISSING (subcommand),MISSING (subcommand)
REPORT command,REPORT command,REPORT command
REPORT (command),REPORT (command),REPORT (command)
missing values,missing values,missing values

MISSING controls the treatment of cases with missing values.

• MISSING specifications apply to variables named on VARIABLES and SUMMARY and to strings created with the STRING subcommand.

• Missing-value specifications are ignored for variables named on BREAK when MISSING=VAR or NONE. There is one break category for system-missing values and one for each user-missing value.

• The character used to indicate missing values is controlled by the FORMAT subcommand.

VAR (keyword),VAR (keyword),VAR (keyword)
REPORT command,REPORT command,REPORT command
NONE (keyword),NONE (keyword),NONE (keyword)
REPORT command,REPORT command,REPORT command
LIST (keyword),LIST (keyword),LIST (keyword)
REPORT command,REPORT command,REPORT command
VAR | Missing values are treated separately for each variable. Missing values are displayed in case listings but are not included in the calculation of summary statistics on a function-by-function basis. This is the default.
NONE | User-missing values are treated as valid values. This applies to all variables named on VARIABLES.
LIST[([varlist][n])] | Cases with the specified number of missing values across the specified list of variables are not used. The variable list and n are specified in parentheses. If n is not specified, the default is 1. If no variables are specified, all variables named on VARIABLES are assumed.

Example

  /MISSING= LIST (XVAR,YVAR,ZVAR 2)

• Any case with two or more missing values across the variables XVAR, YVAR, and ZVAR is omitted from the report.

Related Topics

REPORT
Overview (REPORT command)
Examples (REPORT command)
Defaults (REPORT command)
Options (REPORT command)
FORMAT Subcommand (REPORT command)
OUTFILE Subcommand (REPORT command)
VARIABLES Subcommand (REPORT command)
Column Contents (REPORT command)
Column Heading (REPORT command)
Column Heading Alignment (REPORT command)
Column Format (REPORT command)
STRING Subcommand (REPORT command)
BREAK Subcommand (REPORT command)
Column Contents (REPORT command)
Column Heading (REPORT command)
Column Heading Alignment (REPORT command)
Column Format (REPORT command)
SUMMARY Subcommand (REPORT command)
Aggregate Functions (REPORT command)
Composite Functions (REPORT command)
Summary Titles (REPORT command)
Summary Print Formats (REPORT command)
Other Summary Keywords (REPORT command)
TITLE and FOOTNOTE Subcommands (REPORT command)


REPOSITORY ATTRIBUTES

REPOSITORY ATTRIBUTES (command),REPOSITORY ATTRIBUTES (command),REPOSITORY ATTRIBUTES (command)
REPOSITORY ATTRIBUTES (command),REPOSITORY ATTRIBUTES (command),REPOSITORY ATTRIBUTES (command)
syntax chart,syntax chart,syntax chart
release history,release history,release history

REPOSITORY ATTRIBUTES is available in the Statistics Adapter option.

REPOSITORY ATTRIBUTES FILE=’file specification’
    [DESCRIPTION='description']
    [KEYWORDS='keywords']
    [AUTHOR='author']
    [VERSIONLABEL='label']
    [EXPIRATION=days]
    [TOPICS='topics']
    [/SECURITY ID='id' [PERMISSION= [READ**] [WRITE] [DELETE] [MODIFY] [OWNER] ] ]

** Default if the keyword is omitted.

Release History Collapse Hide details

Release History

Release 16.0

• Command introduced as PER ATTRIBUTES.

Release 17.0

• VERSIONLABEL keyword extended to support multiple labels.

Release 18.0

• PER ATTRIBUTES deprecated. Command name changed to REPOSITORY ATTRIBUTES.

Syntax for the REPOSITORY ATTRIBUTES command can be generated from the Storing an Object to a Repository dialog box when storing an object from the Add a File choice on the Repository submenu (available on the File menu).

Example

REPOSITORY COPY
  FILE='/myscripts/cust_value.py'
  OUTFILE='SPSSCR://scripts/cust_value.py'.
REPOSITORY ATTRIBUTES FILE='SPSSCR://scripts/cust_value.py'
  DESCRIPTION='Customer Value Calculation'
  KEYWORDS='customer;value'.

Related Topics

Overview (REPOSITORY ATTRIBUTES command)
FILE Keyword (REPOSITORY ATTRIBUTES command)
DESCRIPTION Keyword (REPOSITORY ATTRIBUTES command)
KEYWORDS Keyword (REPOSITORY ATTRIBUTES command)
AUTHOR Keyword (REPOSITORY ATTRIBUTES command)
VERSIONLABEL Keyword (REPOSITORY ATTRIBUTES command)
EXPIRATION Keyword (REPOSITORY ATTRIBUTES command)
TOPICS Keyword (REPOSITORY ATTRIBUTES command)
SECURITY Subcommand (REPOSITORY ATTRIBUTES command)


Overview (REPOSITORY ATTRIBUTES command)

The REPOSITORY ATTRIBUTES command allows you to set attributes--such as a version label and security settings--for an object in a repository.

• When copying to a repository with the REPOSITORY COPY command, use the REPOSITORY ATTRIBUTES command (following REPOSITORY COPY) to specify attributes of the object.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is the FILE keyword, which specifies the repository object whose attributes are to be set. All other keywords and subcommands are optional.

Syntax Rules Collapse Hide details

Syntax Rules

• The SECURITY subcommand can be specified multiple times.

• Each keyword can only be specified once.

• Keywords and subcommands can be used in any order.

• Keywords and subcommand names must be spelled in full.

• Equals signs (=) shown in the syntax chart are required.

Operations Collapse Hide details

Operations

• Use of the REPOSITORY ATTRIBUTES command requires a connection to a Prepository. Connections are established with the REPOSITORY CONNECT command.

• REPOSITORY ATTRIBUTES overwrites any existing values of specified attributes.

Related Topics

REPOSITORY ATTRIBUTES
FILE Keyword (REPOSITORY ATTRIBUTES command)
DESCRIPTION Keyword (REPOSITORY ATTRIBUTES command)
KEYWORDS Keyword (REPOSITORY ATTRIBUTES command)
AUTHOR Keyword (REPOSITORY ATTRIBUTES command)
VERSIONLABEL Keyword (REPOSITORY ATTRIBUTES command)
EXPIRATION Keyword (REPOSITORY ATTRIBUTES command)
TOPICS Keyword (REPOSITORY ATTRIBUTES command)
SECURITY Subcommand (REPOSITORY ATTRIBUTES command)


FILE Keyword (REPOSITORY ATTRIBUTES command)

REPOSITORY ATTRIBUTES (command),REPOSITORY ATTRIBUTES (command),REPOSITORY ATTRIBUTES (command)
FILE keyword,FILE keyword,FILE keyword
FILE (keyword),FILE (keyword),FILE (keyword)
REPOSITORY ATTRIBUTES command,REPOSITORY ATTRIBUTES command,REPOSITORY ATTRIBUTES command

The FILE keyword is required and specifies the repository object whose attributes are to be set.

• The form of the file specification for an object in a repository is the scheme name SPSSCR , followed by a colon, either one or two slashes (forward or backward), and a file path, all enclosed in quotes. For example:

'SPSSCR://scripts/myscript.py'

• Paths can be specified with forward slashes (/) or backslashes (\).

• You can define a file handle to a file or a directory in a repository and use that handle in file specifications for repository objects.

• You can use the CD command to set the working directory to a directory in the currently connected repository, allowing you to use relative paths in file specifications for repository objects.

• File specifications for repository objects must specify the filename exactly as provided when the file was stored. If the file was stored with an extension, then you must supply the extension. If the file was stored without an extension then do not include one.

For examples of file specifications, see the examples for the REPOSITORY COPY command.

Related Topics

REPOSITORY ATTRIBUTES
Overview (REPOSITORY ATTRIBUTES command)
DESCRIPTION Keyword (REPOSITORY ATTRIBUTES command)
KEYWORDS Keyword (REPOSITORY ATTRIBUTES command)
AUTHOR Keyword (REPOSITORY ATTRIBUTES command)
VERSIONLABEL Keyword (REPOSITORY ATTRIBUTES command)
EXPIRATION Keyword (REPOSITORY ATTRIBUTES command)
TOPICS Keyword (REPOSITORY ATTRIBUTES command)
SECURITY Subcommand (REPOSITORY ATTRIBUTES command)


DESCRIPTION Keyword (REPOSITORY ATTRIBUTES command)

REPOSITORY ATTRIBUTES (command),REPOSITORY ATTRIBUTES (command),REPOSITORY ATTRIBUTES (command)
DESCRIPTION keyword,DESCRIPTION keyword,DESCRIPTION keyword
DESCRIPTION (keyword),DESCRIPTION (keyword),DESCRIPTION (keyword)
REPOSITORY ATTRIBUTES command,REPOSITORY ATTRIBUTES command,REPOSITORY ATTRIBUTES command

The DESCRIPTION keyword specifies a description for an object in a repository and replaces any existing description for the object. Specify the value as a quoted string.

Example

REPOSITORY ATTRIBUTES FILE='SPSSCR://scripts/cust_value.py'
  DESCRIPTION='Customer Value Calculation'.

Related Topics

REPOSITORY ATTRIBUTES
Overview (REPOSITORY ATTRIBUTES command)
FILE Keyword (REPOSITORY ATTRIBUTES command)
KEYWORDS Keyword (REPOSITORY ATTRIBUTES command)
AUTHOR Keyword (REPOSITORY ATTRIBUTES command)
VERSIONLABEL Keyword (REPOSITORY ATTRIBUTES command)
EXPIRATION Keyword (REPOSITORY ATTRIBUTES command)
TOPICS Keyword (REPOSITORY ATTRIBUTES command)
SECURITY Subcommand (REPOSITORY ATTRIBUTES command)


KEYWORDS Keyword (REPOSITORY ATTRIBUTES command)

REPOSITORY ATTRIBUTES (command),REPOSITORY ATTRIBUTES (command),REPOSITORY ATTRIBUTES (command)
KEYWORDS keyword,KEYWORDS keyword,KEYWORDS keyword
KEYWORDS (keyword),KEYWORDS (keyword),KEYWORDS (keyword)
REPOSITORY ATTRIBUTES command,REPOSITORY ATTRIBUTES command,REPOSITORY ATTRIBUTES command

KEYWORDS specifies one or more keywords to associate with an object in a repository to aid in searching. Specify the value as a quoted string.

• Multiple keywords should be separated by semicolons.

• Blank spaces at the beginning and end of each keyword are ignored, but blank spaces within keywords are honored.

• The specified keywords replace any existing ones for the object.

Example

REPOSITORY ATTRIBUTES FILE='SPSSCR://scripts/cust_value.py'
  KEYWORDS='customer;value'.

Related Topics

REPOSITORY ATTRIBUTES
Overview (REPOSITORY ATTRIBUTES command)
FILE Keyword (REPOSITORY ATTRIBUTES command)
DESCRIPTION Keyword (REPOSITORY ATTRIBUTES command)
AUTHOR Keyword (REPOSITORY ATTRIBUTES command)
VERSIONLABEL Keyword (REPOSITORY ATTRIBUTES command)
EXPIRATION Keyword (REPOSITORY ATTRIBUTES command)
TOPICS Keyword (REPOSITORY ATTRIBUTES command)
SECURITY Subcommand (REPOSITORY ATTRIBUTES command)


AUTHOR Keyword (REPOSITORY ATTRIBUTES command)

REPOSITORY ATTRIBUTES (command),REPOSITORY ATTRIBUTES (command),REPOSITORY ATTRIBUTES (command)
AUTHOR keyword,AUTHOR keyword,AUTHOR keyword
AUTHOR (keyword),AUTHOR (keyword),AUTHOR (keyword)
REPOSITORY ATTRIBUTES command,REPOSITORY ATTRIBUTES command,REPOSITORY ATTRIBUTES command

The AUTHOR keyword specifies the author of an object in a repository. By default, the author is set to the login name of the user who created the object. Specify the value as a quoted string.

Example

REPOSITORY ATTRIBUTES FILE='SPSSCR://scripts/cust_value.py'
  AUTHOR='GSWEET'.

Related Topics

REPOSITORY ATTRIBUTES
Overview (REPOSITORY ATTRIBUTES command)
FILE Keyword (REPOSITORY ATTRIBUTES command)
DESCRIPTION Keyword (REPOSITORY ATTRIBUTES command)
KEYWORDS Keyword (REPOSITORY ATTRIBUTES command)
VERSIONLABEL Keyword (REPOSITORY ATTRIBUTES command)
EXPIRATION Keyword (REPOSITORY ATTRIBUTES command)
TOPICS Keyword (REPOSITORY ATTRIBUTES command)
SECURITY Subcommand (REPOSITORY ATTRIBUTES command)


VERSIONLABEL Keyword (REPOSITORY ATTRIBUTES command)

REPOSITORY ATTRIBUTES (command),REPOSITORY ATTRIBUTES (command),REPOSITORY ATTRIBUTES (command)
VERSIONLABEL keyword,VERSIONLABEL keyword,VERSIONLABEL keyword
VERSIONLABEL (keyword),VERSIONLABEL (keyword),VERSIONLABEL (keyword)
REPOSITORY ATTRIBUTES command,REPOSITORY ATTRIBUTES command,REPOSITORY ATTRIBUTES command

The VERSIONLABEL keyword specifies one or more version labels for an object in a repository--for example, "production" or "development". Two versions of an object cannot have any of the same labels. If you specify a label associated with another version, it will be removed from that version and associated with the one you're modifying. For a single label, specify the value as a quoted string. For multiple labels, specify the value as a blank-separated list of quoted strings--for example, 'label1' 'label2'.

• By default, the specified labels will be applied to the latest version of the object. You can apply labels to a version other than the latest one by specifying the version in the file specification on the FILE keyword. See the topic File Specifications for Repository Objects for more information.

Example

REPOSITORY ATTRIBUTES FILE='SPSSCR://scripts/cust_value.py'
  VERSIONLABEL='development'.

Related Topics

REPOSITORY ATTRIBUTES
Overview (REPOSITORY ATTRIBUTES command)
FILE Keyword (REPOSITORY ATTRIBUTES command)
DESCRIPTION Keyword (REPOSITORY ATTRIBUTES command)
KEYWORDS Keyword (REPOSITORY ATTRIBUTES command)
AUTHOR Keyword (REPOSITORY ATTRIBUTES command)
EXPIRATION Keyword (REPOSITORY ATTRIBUTES command)
TOPICS Keyword (REPOSITORY ATTRIBUTES command)
SECURITY Subcommand (REPOSITORY ATTRIBUTES command)


EXPIRATION Keyword (REPOSITORY ATTRIBUTES command)

REPOSITORY ATTRIBUTES (command),REPOSITORY ATTRIBUTES (command),REPOSITORY ATTRIBUTES (command)
EXPIRATION keyword,EXPIRATION keyword,EXPIRATION keyword
EXPIRATION (keyword),EXPIRATION (keyword),EXPIRATION (keyword)
REPOSITORY ATTRIBUTES command,REPOSITORY ATTRIBUTES command,REPOSITORY ATTRIBUTES command

The EXPIRATION keyword specifies an expiration date for an object in a repository. This provides a mechanism to make sure dated information is not displayed after a certain date. Expired documents are not deleted but are automatically removed to a special category where they can be accessed only by the site administrator, who can delete, archive, or republish them.

• Specify the value as an integer representing the number of days from the current day (inclusive) to the last day (inclusive) that the document will be active.

Example

REPOSITORY ATTRIBUTES FILE='SPSSCR://scripts/cust_value.py'
  EXPIRATION = 366.

Related Topics

REPOSITORY ATTRIBUTES
Overview (REPOSITORY ATTRIBUTES command)
FILE Keyword (REPOSITORY ATTRIBUTES command)
DESCRIPTION Keyword (REPOSITORY ATTRIBUTES command)
KEYWORDS Keyword (REPOSITORY ATTRIBUTES command)
AUTHOR Keyword (REPOSITORY ATTRIBUTES command)
VERSIONLABEL Keyword (REPOSITORY ATTRIBUTES command)
TOPICS Keyword (REPOSITORY ATTRIBUTES command)
SECURITY Subcommand (REPOSITORY ATTRIBUTES command)


TOPICS Keyword (REPOSITORY ATTRIBUTES command)

REPOSITORY ATTRIBUTES (command),REPOSITORY ATTRIBUTES (command),REPOSITORY ATTRIBUTES (command)
TOPICS keyword,TOPICS keyword,TOPICS keyword
TOPICS (keyword),TOPICS (keyword),TOPICS (keyword)
REPOSITORY ATTRIBUTES command,REPOSITORY ATTRIBUTES command,REPOSITORY ATTRIBUTES command

The TOPICS keyword allows you to associate an object in a repository with one or more topics. Topics allow you to organize documents by subject matter and have a hierarchical structure.

• Topics are specified as a quoted path that includes each level of the hierarchy for that topic, with successive levels separated by a forward slash. A forward slash at the beginning of the path is optional.

• Use a semicolon as the delimiter when specifying multiple topics.

• Objects can only be associated with existing topics. REPOSITORY ATTRIBUTES cannot be used to create new topics.

• The specified topics replace any existing ones for the object.

Example

REPOSITORY ATTRIBUTES FILE='SPSSCR://scripts/cust_value.py'
  TOPICS = '/engineering/scripts;/marketing/analyses'.

Related Topics

REPOSITORY ATTRIBUTES
Overview (REPOSITORY ATTRIBUTES command)
FILE Keyword (REPOSITORY ATTRIBUTES command)
DESCRIPTION Keyword (REPOSITORY ATTRIBUTES command)
KEYWORDS Keyword (REPOSITORY ATTRIBUTES command)
AUTHOR Keyword (REPOSITORY ATTRIBUTES command)
VERSIONLABEL Keyword (REPOSITORY ATTRIBUTES command)
EXPIRATION Keyword (REPOSITORY ATTRIBUTES command)
SECURITY Subcommand (REPOSITORY ATTRIBUTES command)


SECURITY Subcommand (REPOSITORY ATTRIBUTES command)

REPOSITORY ATTRIBUTES (command),REPOSITORY ATTRIBUTES (command),REPOSITORY ATTRIBUTES (command)
SECURITY subcommand,SECURITY subcommand,SECURITY subcommand
SECURITY (subcommand),SECURITY (subcommand),SECURITY (subcommand)
REPOSITORY ATTRIBUTES command,REPOSITORY ATTRIBUTES command,REPOSITORY ATTRIBUTES command

The SECURITY subcommand allows you to specify security settings for an object in a repository. Specify the identifier of the user or group with the ID keyword, and specify the access level with the PERMISSION keyword. You can specify settings for multiple users or groups by including multiple instances of the SECURITY subcommand.

ID Keyword

The ID keyword specifies the ID of the user or group for which access is being granted. Specify the value in quotes.

PERMISSION Keyword

The PERMISSION keyword is optional and specifies the access level granted to the specified user or group. One or more of the following access levels can be specified: READ, WRITE, MODIFY (grants ability to modify permissions), DELETE, and OWNER.

• If PERMISSION is omitted, the access level is READ.

• READ access is always granted, whether or not it is specified on the PERMISSION keyword.

• If OWNER is specified, all other values are ignored (an owner has all permissions).

Example

REPOSITORY ATTRIBUTES FILE='SPSSCR://scripts/cust_value.py'
  /SECURITY ID='admin' PERMISSION=OWNER
  /SECURITY ID='--everyone--' PERMISSION=READ WRITE.

Related Topics

REPOSITORY ATTRIBUTES
Overview (REPOSITORY ATTRIBUTES command)
FILE Keyword (REPOSITORY ATTRIBUTES command)
DESCRIPTION Keyword (REPOSITORY ATTRIBUTES command)
KEYWORDS Keyword (REPOSITORY ATTRIBUTES command)
AUTHOR Keyword (REPOSITORY ATTRIBUTES command)
VERSIONLABEL Keyword (REPOSITORY ATTRIBUTES command)
EXPIRATION Keyword (REPOSITORY ATTRIBUTES command)
TOPICS Keyword (REPOSITORY ATTRIBUTES command)


REPOSITORY CONNECT

REPOSITORY CONNECT (command),REPOSITORY CONNECT (command),REPOSITORY CONNECT (command)
REPOSITORY CONNECT (command),REPOSITORY CONNECT (command),REPOSITORY CONNECT (command)
syntax chart,syntax chart,syntax chart
release history,release history,release history
logging in to a repository,logging in to a repository,logging in to a repository
connecting to a repository,connecting to a repository,connecting to a repository

REPOSITORY CONNECT is available in the Statistics Adapter option.

REPOSITORY CONNECT
    /SERVER HOST='host[:{8080**}]' [SSL={NO**}]
                        {port  }        {YES }
    /LOGIN  USER='userid'
            PASSWORD='password'
            [PROVIDER='security provider']
            [ENCRYPTEDPWD={YES**}]
                          {NO   }

** Default if the keyword or value is omitted.

Syntax for the REPOSITORY CONNECT command can be generated from the Repository Server dialog.

Release History Collapse Hide details

Release History

Release 15.0

• Command introduced as PER CONNECT.

Release 17.0

• DOMAIN keyword deprecated on the LOGIN subcommand.

• PROVIDER keyword introduced on the LOGIN subcommand.

Release 18.0

• PER CONNECT deprecated. Command name changed to REPOSITORY CONNECT.

Example

REPOSITORY CONNECT
    /SERVER HOST='PER1'
    /LOGIN  USER='MyUserID'
            PASSWORD='abc12345'
            ENCRYPTEDPWD=NO.

Related Topics

Overview (REPOSITORY CONNECT command)
SERVER Subcommand (REPOSITORY CONNECT command)
LOGIN Subcommand (REPOSITORY CONNECT command)


Overview (REPOSITORY CONNECT command)

The REPOSITORY CONNECT command establishes a connection to a repository and logs in the user. A connection enables you to store objects to, and retrieve objects from, a repository.

Options Collapse Hide details

Options

Server. You can specify a connection port and whether to connect to the specified server using Secure Socket Layer (SSL) technology, if it is enabled on the server.

Login. You can specify whether the password is provided as encrypted or unencrypted (plain text).

Single Sign-On. Single sign-on allows users to connect to a repository without explicitly providing a user ID and password. The necessary authentication is performed with the user's existing credentials on the current machine--obtained, for example, from Windows Active Directory. If your repository supports single sign-on (contact your local system administrator for details), you can omit the LOGIN subcommand.

Basic Specification Collapse Hide details

Basic Specification

The basic specification for REPOSITORY CONNECT is the host server, user name, and password. By default, server port 8080 is used, the connection is established without SSL, and the specified password is assumed to be encrypted. To create an encrypted password, generate (paste) the REPOSITORY CONNECT command syntax from the Connecting to a Repository dialog.

Syntax Rules Collapse Hide details

Syntax Rules

• Each subcommand can be specified only once.

• Subcommands can be used in any order.

• An error occurs if a keyword or attribute is specified more than once within a subcommand.

• Equals signs (=) and forward slashes (/) shown in the syntax chart are required.

• Subcommand names and keywords must be spelled in full.

Operations Collapse Hide details

Operations

• REPOSITORY CONNECT establishes a connection to a repository and logs in the specified user. Any existing repository connection terminates when the new one is established.

• The connection terminates if the PASW Statistics session ends.

• An error occurs if a connection cannot be established to the specified host server.

• An error occurs if the connection cannot be authenticated--for example, if the password is invalid for the specified user.

Example Collapse Hide details

Example

REPOSITORY CONNECT
    /SERVER HOST='PER1:80'
    /LOGIN  USER='MyUserID'
            PASSWORD='abc12345'
            ENCRYPTEDPWD=NO.

• The SERVER subcommand specifies a connection to host 'PER1' on port 80.

• ENCRYPTEDPWD=NO indicates that the password is not encrypted.

Related Topics

REPOSITORY CONNECT
SERVER Subcommand (REPOSITORY CONNECT command)
LOGIN Subcommand (REPOSITORY CONNECT command)


SERVER Subcommand (REPOSITORY CONNECT command)

REPOSITORY CONNECT (command),REPOSITORY CONNECT (command),REPOSITORY CONNECT (command)
SERVER subcommand,SERVER subcommand,SERVER subcommand
SERVER (subcommand),SERVER (subcommand),SERVER (subcommand)
REPOSITORY CONNECT command,REPOSITORY CONNECT command,REPOSITORY CONNECT command

The SERVER subcommand specifies the host server and whether to establish a secure connection.

HOST | Server that hosts the repository. Specify the name of the server in quotes. The default port is 8080. To connect to another port, specify the port number after the host name; for example, ‘PER1:80’. A colon must separate the host name and port.
SSL | Use Secure Socket Layer technology. Specifies whether to establish a secure connection to the host server. The default is NO. SSL is available only if supported on the host server.

Related Topics

REPOSITORY CONNECT
Overview (REPOSITORY CONNECT command)
LOGIN Subcommand (REPOSITORY CONNECT command)


LOGIN Subcommand (REPOSITORY CONNECT command)

REPOSITORY CONNECT (command),REPOSITORY CONNECT (command),REPOSITORY CONNECT (command)
LOGIN subcommand,LOGIN subcommand,LOGIN subcommand
LOGIN (subcommand),LOGIN (subcommand),LOGIN (subcommand)
REPOSITORY CONNECT command,REPOSITORY CONNECT command,REPOSITORY CONNECT command

The LOGIN subcommand specifies login information, including user name and password.

USER | User name. Specify the user name in quotes.
PASSWORD | Password. Specify the password in quotes.
PROVIDER | Security provider. You can optionally specify the security provider against which to validate the user/password combination. Contact your local administrator for details.
ENCRYPTEDPWD | Password encryption. By default, the specified password is treated as encrypted. To indicate that the password is entered as plain text, specify ENCRYPTEDPWD=NO.

Related Topics

REPOSITORY CONNECT
Overview (REPOSITORY CONNECT command)
SERVER Subcommand (REPOSITORY CONNECT command)


REPOSITORY COPY

REPOSITORY COPY (command),REPOSITORY COPY (command),REPOSITORY COPY (command)
REPOSITORY COPY (command),REPOSITORY COPY (command),REPOSITORY COPY (command)
syntax chart,syntax chart,syntax chart
release history,release history,release history
files,files,files
storing to or retrieving from a repository,storing to or retrieving from a repository,storing to or retrieving from a repository
scripts,scripts,scripts
storing to or retrieving from a repository,storing to or retrieving from a repository,storing to or retrieving from a repository

REPOSITORY COPY is available in the Statistics Adapter option.

REPOSITORY COPY
    FILE=’file specification’
    OUTFILE=’file specification’.
Release History Collapse Hide details

Release History

Release 16.0

• Command introduced as PER COPY.

Release 18.0

• PER COPY deprecated. Command name changed to REPOSITORY COPY.

Syntax for the REPOSITORY COPY command can be generated from the Storing an Object to a Repository and Retrieving an Object from a Repository dialog boxes when storing or retrieving an object using the Add a File or Download a File choices on the Repository submenu (available on the File menu).

Example

REPOSITORY COPY
  FILE='/myscripts/demo.py'
  OUTFILE='SPSSCR://scripts/demo.py'.

Related Topics

Overview (REPOSITORY COPY command)
Examples (REPOSITORY COPY command)


Overview (REPOSITORY COPY command)

The REPOSITORY COPY command allows you to copy an arbitrary file from the local file system to a repository or to copy a file from a repository to the local file system.

• When copying to a repository, use the REPOSITORY ATTRIBUTES command--following REPOSITORY COPY--to specify properties such as a description, keywords, and security settings for the object.

Basic Specification Collapse Hide details

Basic Specification

The only specification is the FILE keyword, which specifies the source file, and the OUTFILE keyword, which specifies the target location. Each keyword can specify a location in the local file system or a location in the current repository.

File Specifications for Repository Objects Collapse Hide details

File Specifications for Repository Objects

• The form of the file specification for an object in a repository is the scheme name SPSSCR , followed by a colon, either one or two slashes (forward or backward), and a file path, all enclosed in quotes. For example:

'SPSSCR://scripts/myscript.py'

• Paths can be specified with forward slashes (/) or backslashes (\).

• You can define a file handle to a file or a directory in a repository and use that handle in file specifications for repository objects.

• You can use the CD command to set the working directory to a directory in the currently connected repository, allowing you to use relative paths in file specifications for repository objects.

• File extensions are not added to files stored to a repository. Files are stored to a repository with an automatically determined MIME type that describes the type of file. Including a file extension is not necessary but is recommended.

• When copying a file from a repository you must specify the filename exactly as provided when the file was stored. If the file was stored with an extension, then you must supply the extension. If the file was stored without an extension then do not include one.

• When copying from a repository, the latest version of the specified object is retrieved. To specify a version by label, use SPSSCR://<path>#L.<label>. To specify a version by the version marker (consists of an integer version number followed by a time stamp that uniquely specifies a version), use SPSSCR://<path>#M.<version marker>. See the topic File Specifications for Repository Objects for more information.

Operations Collapse Hide details

Operations

• REPOSITORY COPY will fail if a repository location is specified (for either FILE or OUTFILE) and there is no connection to a repository. Connections are established with the REPOSITORY CONNECT command.

• Specifying an existing repository file on the OUTFILE keyword results in a new version of the file, as opposed to overwriting the latest version.

• The PERMISSIONS, SAVE, and XSAVE commands will generate errors if you attempt to set permissions for repository objects. Permissions for repository objects are set with the REPOSITORY ATTRIBUTES command or using administration tools included with PASW Collaboration and Deployment Services.

• The ERASE FILE command will generate an error if you attempt to delete a repository object.

Related Topics

REPOSITORY COPY
Examples (REPOSITORY COPY command)


Examples (REPOSITORY COPY command)

Copying from the Local File System to a Repository

REPOSITORY COPY
  FILE='/myscripts/cust_value.py'
  OUTFILE='SPSSCR://scripts/cust_value.py'.
REPOSITORY ATTRIBUTES FILE='SPSSCR://scripts/cust_value.py'
  KEYWORDS='customer;value'
  /SECURITY ID='rprime' PERMISSION=OWNER.

• The local file /myscripts/cust_value.py is copied to the location /scripts/cust_value.py in the current repository.

• The REPOSITORY ATTRIBUTES command specifies keywords and security settings for this repository object.

Copying from a Repository to the Local File System

REPOSITORY COPY
  FILE='SPSSCR://scripts/demo.py'
  OUTFILE='/myscripts/demo.py'.

• The repository object /scripts/demo.py is copied to the local file /myscripts/demo.py.

Copying from a Labelled Version in a Repository to the Local File System

REPOSITORY COPY
  FILE='SPSSCR://scripts/demo.py#L.production'
  OUTFILE='/myscripts/demo.py'.

• The version of the repository object /scripts/demo.py with the label production is copied to the local file /myscripts/demo.py.

Using a File Handle to a Repository Location

FILE HANDLE custval /NAME=’SPSSCR://CustomerValue’.
REPOSITORY COPY
  FILE='custval/cust_value.py'
  OUTFILE='/myscripts/cust_value.py'.

• The handle custval is associated with the repository directory /CustomerValue, and the REPOSITORY COPY command retrieves the latest version of the file cust_value.py from this directory in the current repository.

Setting the Working Directory to a Repository Location

CD 'SPSSCR://CustomerValue'.
REPOSITORY COPY
  FILE='cust_value.py'
  OUTFILE='/myscripts/cust_value.py'.

• The working directory is set to the repository directory /CustomerValue, and the REPOSITORY COPY command retrieves the latest version of the file cust_value.py from this directory in the current repository.

Related Topics

REPOSITORY COPY
Overview (REPOSITORY COPY command)


REREAD

rereading records,rereading records,rereading records
REREAD (command),REREAD (command),REREAD (command)
REREAD (command),REREAD (command),REREAD (command)
syntax chart,syntax chart,syntax chart
REREAD [FILE=file]
       [COLUMN=expression]

Example

INPUT PROGRAM.
DATA LIST /KIND 10-14 (A).

DO IF (KIND EQ 'FORD').
REREAD.
DATA LIST /PARTNO 1-2 PRICE 3-6 (DOLLAR,2) QUANTITY 7-9.
END CASE.

ELSE IF (KIND EQ 'CHEVY').
REREAD.
DATA LIST /PARTNO 1-2 PRICE 15-18 (DOLLAR,2) QUANTITY 19-21.
END CASE.
END IF.

END INPUT PROGRAM.

BEGIN DATA
111295100FORD
11       CHEVY 295015
END DATA.

Related Topics

Overview (REREAD command)
Examples (REREAD command)
FILE Subcommand (REREAD command)
COLUMN Subcommand (REREAD command)


Overview (REREAD command)

REREAD (command),REREAD (command),REREAD (command)
with DATA LIST command,with DATA LIST command,with DATA LIST command
DATA LIST (command),DATA LIST (command),DATA LIST (command)
with REREAD command,with REREAD command,with REREAD command
INPUT PROGRAM (command),INPUT PROGRAM (command),INPUT PROGRAM (command)
with REREAD command,with REREAD command,with REREAD command
REREAD (command),REREAD (command),REREAD (command)
with INPUT PROGRAM command,with INPUT PROGRAM command,with INPUT PROGRAM command

REREAD instructs the program to reread a record in the data. It is available only within an INPUT PROGRAM structure and is generally used to define data using information obtained from a previous reading of the record. REREAD is usually specified within a conditional structure, such as DO IF—END IF, and is followed by a DATA LIST command. When it receives control for a case, REREAD places the pointer back to the column specified for the current case and begins reading data as defined by the DATA LIST command that follows.

Options Collapse Hide details

Options

Data Source. You can use inline data or data from an external file specified on the FILE subcommand. Using external files allows you to open multiple files and merge data.

Beginning Column. You can specify a beginning column other than column 1 using the COLUMN subcommand.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is the command keyword REREAD. The program rereads the current case according to the data definitions specified on the following DATA LIST.

Subcommand Order Collapse Hide details

Subcommand Order

Subcommands can be specified in any order.

Syntax Rules Collapse Hide details

Syntax Rules

• REREAD is available only within an INPUT PROGRAM structure.

• Multiple REREAD commands can be used within the input program. Each must be followed by an associated DATA LIST command.

Operations Collapse Hide details

Operations

• REREAD causes the next DATA LIST command to reread the most recently processed record in the specified file.

• When it receives control for a case, REREAD places the pointer back to column 1 for the current case and begins reading data as defined by the DATA LIST that follows. If the COLUMN subcommand is specified, the pointer begins reading in the specified column and uses it as column 1 for data definition.

• REREAD can be used to read part of a record in FIXED format and the remainder in LIST format. Mixing FIXED and FREE formats yields unpredictable results.

• Multiple REREAD commands specified without an intervening DATA LIST do not have a cumulative effect. All but the last are ignored.

Related Topics

REREAD
Examples (REREAD command)
FILE Subcommand (REREAD command)
COLUMN Subcommand (REREAD command)


Examples (REREAD command)

Using REREAD to Process Different Record Formats

INPUT PROGRAM.
DATA LIST /PARTNO 1-2 KIND 10-14 (A).

DO IF (KIND EQ 'FORD').
REREAD.
DATA LIST /PRICE 3-6 (DOLLAR,2) QUANTITY 7-9.
END CASE.

ELSE IF (KIND EQ 'CHEVY').
REREAD.
DATA LIST /PRICE 15-18 (DOLLAR,2) QUANTITY 19-21.
END CASE.
END IF.
END INPUT PROGRAM.

BEGIN DATA
111295100FORD      CHAPMAN AUTO SALES
121199005VW    MIDWEST VOLKSWAGEN SALES
11 395025FORD      BETTER USED CARS
11       CHEVY 195005        HUFFMAN SALES & SERVICE
11       VW    595020        MIDWEST VOLKSWAGEN SALES
11       CHEVY 295015        SAM'S AUTO REPAIR
11       CHEVY 210 20        LONGFELLOW CHEVROLET
 9555032 VW                  HYDE PARK IMPORTS
END DATA.
LIST.

• Data are extracted from an inventory of automobile parts. The automobile part number always appears in columns 1 and 2, and the automobile type always appears in columns 10 through 14. The location of other information such as price and quantity depends on both the part number and the type of automobile.

• The first DATA LIST extracts the part number and type of automobile.

• Depending on the information from the first DATA LIST, the records are reread using one of two DATA LIST commands, pulling the price and quantity from different places.

• The two END CASE commands limit the active dataset to only those cases with part 11 and automobile type Ford or Chevrolet. Without the END CASE commands, cases would be created for other part numbers and automobile types, with missing values for price, quantity, and buyer.

The output from the LIST command is as follows:

PARTNO KIND   PRICE QUANTITY

  11   FORD  $12.95    100
  11   FORD   $3.95     25
  11   CHEVY  $1.95      5
  11   CHEVY  $2.95     15
  11   CHEVY  $2.10     20

Multiple REREAD Commands for the Same Record

INPUT PROGRAM.
DATA LIST      NOTABLE/ CDIMAGE 1-20(A).
REREAD         COLUMN = 6.  /* A, C, and E are in column 6
REREAD         COLUMN = 11. /* B, D, and F are in column 11
DATA LIST      NOTABLE/ INFO 1(A).
END INPUT PROGRAM.
BEGIN DATA
1    A    B
2    C    D
3    E    F
END DATA.
LIST.

• Multiple REREAD commands are used without an intervening DATA LIST. Only the last one is used. Thus, the starting column comes from the last REREAD specified and the pointer is reset to column 11.

The output from the LIST command is as follows:

CDIMAGE              INFO

1    A    B          B
2    C    D          D
3    E    F          F

Related Topics

REREAD
Overview (REREAD command)
FILE Subcommand (REREAD command)
COLUMN Subcommand (REREAD command)


FILE Subcommand (REREAD command)

REREAD (command),REREAD (command),REREAD (command)
FILE subcommand,FILE subcommand,FILE subcommand
FILE (subcommand),FILE (subcommand),FILE (subcommand)
REREAD command,REREAD command,REREAD command
rereading records,rereading records,rereading records
input file,input file,input file

FILE specifies an external raw data file from which the next DATA LIST command reads data.

• The default file is the file specified on the immediately preceding DATA LIST command.

• If the file specified on FILE is not the default file, the same file must be specified on the next DATA LIST. Otherwise, the FILE subcommand is ignored and the DATA LIST command reads the next record from the file specified on it or, if no file is specified, from the file specified on the previous DATA LIST command.

Example

INPUT PROGRAM.
DATA LIST FILE=UPDATE END=#EOF NOTABLE
     /#ID 1-3.                     /*Get rep ID in new sales file.
DATA LIST FILE = SALESREP NOTABLE
     /ID 1-3 SALES 4-11(F,2)
      NEWSALE 12-19(F,2).       /*Get rep record from master file.

LOOP IF #EOF OR (#ID GT ID).  /*If UPDATE ends or no new sales made.
+  COMPUTE NEWSALE = 0.      /*Set NEWSALE to 0
+  END CASE.                 /*Build a case.
+  DATA LIST FILE = SALESREP NOTABLE
     /ID 1-3 SALES 4-11(F,2)
      NEWSALE 12-19(F,2).           /*Continue reading masterfile.
END LOOP

DO IF NOT #EOF.                       /*If new sales made.
+  REREAD FILE=UPDATE COLUMN = 4.      /*Read new sales from UPDATE.
+  DATA LIST FILE=UPDATE
     /NEWSALE 1-8(F,2).
+  COMPUTE SALES=SALES+NEWSALE.      /*Update master file.
END IF.
END CASE.                            /*Build a case.
END INPUT PROGRAM.

LIST.

• This example uses REREAD to merge two raw data files (SALESREP and UPDATE).

• Both files are sorted by sales representative ID number. The UPDATE file contains only records for sales representatives who have made new sales, with variables ID and NEWSALE. The master file SALESREP contains records for all sales representatives, with variables SALES (which contains year-to-date sales) and NEWSALE (which contains the update values each time the file is updated).

• If a sales representative has made no new sales, there is no matching ID in the UPDATE file. When UPDATE is exhausted or when the ID’s in the two files do not match, the loop structure causes the program to build a case with NEWSALE equal to 0 and then continue reading the master file.

• When the ID’s match (and the UPDATE file is not yet exhausted), the REREAD command is executed. The following DATA LIST rereads the record in UPDATE that matches the ID variable. NEWSALE is read from the UPDATE file starting from column 4 and SALES is updated. Note that the following DATA LIST specifies the same file.

• When the updated base is built, the program returns to the first DATA LIST command in the input program and reads the next ID from the UPDATE file. If the UPDATE file is exhausted (#EOF=1), the loop keeps reading records from the master file until it reaches the end of the file.

• The same task can be accomplished using MATCH FILES. With MATCH FILES, the raw data must be read and saved as PASW Statistics data files first.

Related Topics

REREAD
Overview (REREAD command)
Examples (REREAD command)
COLUMN Subcommand (REREAD command)


COLUMN Subcommand (REREAD command)

REREAD (command),REREAD (command),REREAD (command)
COLUMN subcommand,COLUMN subcommand,COLUMN subcommand
COLUMN (subcommand),COLUMN (subcommand),COLUMN (subcommand)
REREAD command,REREAD command,REREAD command
rereading records,rereading records,rereading records
starting column,starting column,starting column

COLUMN specifies a beginning column for the REREAD command to read data. The default is column 1. You can specify a numeric expression for the column.

Specifying a Numeric Expression for the Column

INPUT PROGRAM.
DATA LIST /KIND 10-14 (A).
COMPUTE #COL=1.
IF (KIND EQ 'CHEVY') #COL=13.

DO IF (KIND EQ 'CHEVY' OR KIND EQ 'FORD').
REREAD COLUMN #COL.
DATA LIST /PRICE 3-6 (DOLLAR,2) QUANTITY 7-9.
END CASE.
END IF.
END INPUT PROGRAM.
BEGIN DATA
111295100FORD      CHAPMAN AUTO SALES
121199005VW    MIDWEST VOLKSWAGEN SALES
11 395025FORD      BETTER USED CARS
11       CHEVY 195005        HUFFMAN SALES & SERVICE
11       VW    595020        MIDWEST VOLKSWAGEN SALES
11       CHEVY 295015        SAM'S AUTO REPAIR
12       CHEVY 210 20        LONGFELLOW CHEVROLET
 9555032 VW                  HYDE PARK IMPORTS
END DATA.
LIST.

• The task in this example is to read PRICE and QUANTITY for Chevrolets and Fords only. A scratch variable is created to indicate the starting column positions for PRICE and QUANTITY, and a single DATA LIST command is used to read data for both types of automobiles.

• Scratch variable #COL is set to 13 for Chevrolets and 1 for all other automobiles. For Fords, the data begin in column 1. Variable PRICE is read from columns 3–6 and QUANTITY is read from columns 7–9. When the record is a Chevrolet, the data begins in column 13. Variable PRICE is read from columns 15–18 (15 is 3, 16 is 4, and so forth), and QUANTITY is read from columns 19–21.

Reading Both FIXED and LIST Input With REREAD

INPUT PROGRAM.
DATA LIST    NOTABLE FIXED/ A 1-14(A).  /*Read the FIXED portion
REREAD       COLUMN = 15.
DATA LIST    LIST/ X Y Z.              /*Read the LIST portion
END INPUT PROGRAM.

*  The value 1 on the first record is in column 15.

BEGIN DATA
FIRST RECORD  1 2 3 -1 -2 -3
NUMBER 2      4 5
THE THIRD     6 7 8
#4
FIFTH AND LAST9 10 11
END DATA.
LIST.

• Columns 1–14 are read in FIXED format. REREAD then resets the pointer to column 15. Thus, beginning in column 15, values are read in LIST format.

• The second DATA LIST specifies only three variables. Thus, the values –1, –2, and –3 on the first record are not read.

• The program generates a warning for the missing value on record 2 and a second warning for the three missing values on record 4.

• On the fifth and last record there is no delimiter between value LAST and value 9. REREAD can still read the 9 in LIST format.

Related Topics

REREAD
Overview (REREAD command)
Examples (REREAD command)
FILE Subcommand (REREAD command)


RESPONSE RATE

RESPONSE RATE (command),RESPONSE RATE (command),RESPONSE RATE (command)
RESPONSE RATE (command),RESPONSE RATE (command),RESPONSE RATE (command)
syntax chart,syntax chart,syntax chart

RESPONSE RATE is available in the Direct Marketing option.

RESPONSE RATE
  /VARIABLES
   NUMERATOR=varname
   DENOMINATOR=varname
   GROUP=varname
  [/MINRATE {RATE=NONE**|value     }]
            {FORMULA=value1, value1}
  [/MAXCOUNT {COUNT=ALL**|value}]
             {PERCENT=value    }

**Default if subcommand omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

Release History Collapse Hide details

Release History

Release 18.0

• Command introduced.

Example

RESPONSE RATE
  /VARIABLES
   NUMERATOR=Responses
   DENOMINATOR=Customers
   GROUP=Rank
  /MINRATE RATE=5
  /MAXCOUNT COUNT=6000.

Related Topics

Overview (RESPONSE RATE command)
Examples (RESPONSE RATE command)
VARIABLES Subcommand (RESPONSE RATE command)
MINRATE Subcommand (RESPONSE RATE command)
MAXCOUNT Subcommand (RESPONSE RATE command)


Overview (RESPONSE RATE command)

RESPONSE RATE calculates group response rates and cumulative group response rates, expressed as a percentage, where response rate is calculated as NUMERATOR divided by DENOMINATOR for each category of GROUP, and cumulative response rate is calculated as the cumulative sum of NUMERATOR divided by the cumulative sum of DENOMINATOR for the current and all preceding categories of GROUP.

• Output includes a table of response rates, sum of the DENOMINATOR variable, cumulative response rates, and cumulative sum of the DENOMINATOR variable in ascending order of the GROUP variable, and a line chart of response rates and cumulative sum of the DENOMINATOR variable.

• If MINRATE or MAXCOUNT are specified, the table is color-coded based on the specified cumulative value(s), and the line charts include reference lines at the specified value(s).

Basic Specification Collapse Hide details

Basic Specification

• The basic specification is the command name RESPONSE RATE and a VARIABLES subcommand.

• The MINRATE and MAXCOUNT subcommands are optional.

Operations Collapse Hide details

Operations

• Cases with missing values for any variables specified on the VARIABLES subcommand are excluded from the analysis (listwise deletion).

• If the sum of DENOMINATOR is 0 or negative for a value of GROUP, that group is excluded from the analysis.

Subcommand Order Collapse Hide details

Subcommand Order

Subcommands can be specified in any order.

Syntax Rules Collapse Hide details

Syntax Rules

• The VARIABLES subcommand is required.

• The VARIABLES subcommmand must include NUMERATOR, DENOMINATOR and GROUP variables.

• Equals signs (=) shown in the syntax chart and in examples are required.

• Command, subcommand, and keyword names must be spelled out fully. Abbreviation is not allowed.

Related Topics

RESPONSE RATE
Examples (RESPONSE RATE command)
VARIABLES Subcommand (RESPONSE RATE command)
MINRATE Subcommand (RESPONSE RATE command)
MAXCOUNT Subcommand (RESPONSE RATE command)


Examples (RESPONSE RATE command)

Minimum Specification

RESPONSE RATE
  /VARIABLES
   NUMERATOR=Responses
   DENOMINATOR=Customers
   GROUP=PostalRank.

• Response rates are displayed for each group defined by PostalRank.

• Results are displayed in ascending order of the value of PostalRank.

MINRATE and MAXCOUNT

RESPONSE RATE
  /VARIABLES
   NUMERATOR=Responses
   DENOMINATOR=Customers
   GROUP=PostalRank
  /MINRATE=5
  /MAXCOUNT=6000.

• Rows with a cumulative response rate above 5% and a cumulative customer count below 6,000 are displayed with a green background in the table; those with cumulative response rates below 5% or a cumulative count above 6,000 are displayed with a red background.

• The upper panel of the chart includes a reference line at the 5% response rate level, and the lower panel includes a reference line at a cumulative count of 6,000 customers.

Related Topics

RESPONSE RATE
Overview (RESPONSE RATE command)
VARIABLES Subcommand (RESPONSE RATE command)
MINRATE Subcommand (RESPONSE RATE command)
MAXCOUNT Subcommand (RESPONSE RATE command)


VARIABLES Subcommand (RESPONSE RATE command)

RESPONSE RATE (command),RESPONSE RATE (command),RESPONSE RATE (command)
VARIABLES subcommand,VARIABLES subcommand,VARIABLES subcommand
VARIABLES (subcommand),VARIABLES (subcommand),VARIABLES (subcommand)
RESPONSE RATE command,RESPONSE RATE command,RESPONSE RATE command

The VARIABLES subcommand specifies the variables to use. This subcommand is required and includes three required keywords:

NUMERATOR. The variable used as the numerator to calculate response rates. The variable must be numeric.

DENOMINATOR. The variable used as the denominator to calculate response rates. The variable must be numeric.

GROUP. The grouping variable. Response rates are calculated for each category of the grouping variable. The variable can be string or numeric.

Each keyword must be followed by an equals sign (=) and a variable name.

Response rate is calculated as the NUMERATOR divided by DENOMINATOR for each category of GROUP. Cumulative response rate is calculated as the cumulative sum of NUMERATOR divided by the cumulative sum of DENOMINATOR, where cumulative sum is the sum for the current and all preceding (lower) values of GROUP. Response rates are expressed as percentages.

Example

RESPONSE RATE
  /VARIABLES
   NUMERATOR=Responses
   DENOMINATOR=Customers
   GROUP=PostalRank.

Related Topics

RESPONSE RATE
Overview (RESPONSE RATE command)
Examples (RESPONSE RATE command)
MINRATE Subcommand (RESPONSE RATE command)
MAXCOUNT Subcommand (RESPONSE RATE command)


MINRATE Subcommand (RESPONSE RATE command)

RESPONSE RATE (command),RESPONSE RATE (command),RESPONSE RATE (command)
MINRATE subcommand,MINRATE subcommand,MINRATE subcommand
MINRATE (subcommand),MINRATE (subcommand),MINRATE (subcommand)
RESPONSE RATE command,RESPONSE RATE command,RESPONSE RATE command

The optional MINRATE subcommand specifies a minimum cumulative response rate to use to color-code the output table and to use as a reference line on the response rate line chart. The following alternatives are available for specifying minimum response rate:

RATE=NONE. No minimum response rate. This is the default if the subcommand is omitted.

RATE=value. Use the specified percentage value as the minimum cumulative response rate. Specify a value greater than 0 and less than 100.

FORMULA=value1,value2. Calculate minimum cumulative response rate based on the formula (value1/value2)*100. Both values must be positive numbers. The result should be a value greater than 0 and less than 100. In direct marketing, for example, value1 might be the cost of mailing a package, and value2 might be net revenue per response. If the cost of mailing a package is $0.75 and the net revenue per response is $56, then the minimum response rate is: (0.75/56)*100=1.34%

Each keyword must be followed by an equals sign (=) and a variable name.

• If MINRATE is specified without MAXCOUNT, all rows with a cumulative response rate equal to or greater than the specified minimum are displayed with a green background, and all rows with a cumulative response rate less than the specified minimum are displayed with a red background.

• If MAXCOUNT is also specified, only rows with a cumulative response rate above the specified minimum and rows with a cumulative count below the specified maximum are displayed with a green background. For example, if the response rate is higher than the specified minimum, but the cumulative count is greater than the specified maximum, then the row will have a red background.

Example

RESPONSE RATE
  /VARIABLES
   NUMERATOR=Responses
   DENOMINATOR=Customers
   GROUP=PostalRank
  /MINRATE=5.

Related Topics

RESPONSE RATE
Overview (RESPONSE RATE command)
Examples (RESPONSE RATE command)
VARIABLES Subcommand (RESPONSE RATE command)
MAXCOUNT Subcommand (RESPONSE RATE command)


MAXCOUNT Subcommand (RESPONSE RATE command)

RESPONSE RATE (command),RESPONSE RATE (command),RESPONSE RATE (command)
MAXCOUNT subcommand,MAXCOUNT subcommand,MAXCOUNT subcommand
MAXCOUNT (subcommand),MAXCOUNT (subcommand),MAXCOUNT (subcommand)
RESPONSE RATE command,RESPONSE RATE command,RESPONSE RATE command

The optional MAXCOUNT subcommand specifies the maximum cumulative total of the DENOMINATOR variable to use to color-code the output table and to use as a reference line on the cumulative count line chart. For each category of the GROUP total, the cumulative total is the sum of the DENOMINATOR values for all preceding categories plus the current category. For example, if DENOMINATOR represents number of customers, then the cumulative total for any GROUP category is the total number of customers for all groups up to and including that group.

The following alternatives are available for specifying maximum count:

COUNT=ALL. No maximum. This is the default if the subcommand is omitted.

COUNT=value. Use the specified value as the maximum cumulative total. The value must be a positive integer.

PERCENT=value. Determine the maximum cumulative total based on the specified percentage of the overall total. The value must be greater than 0 and less than 100.

• If MAXCOUNT is specified without MINRATE, all rows with a cumulative total for the DENOMINATOR variable less than or equal to the specified maximum are displayed with a green background, and all subsequent rows are displayed with a red background.

• If MINRATE is also specified, rows are only displayed with a green background if the maximum cumulative total is not exceeded and the cumulative response rate is higher than the specified minimum. For example, if the response rate is less than the specified minimum, the row will be displayed with a red background regardless of the cumulative total.

Example

RESPONSE RATE
  /VARIABLES
   NUMERATOR=Responses
   DENOMINATOR=Customers
   GROUP=PostalRank
 /MAXCOUNT=6000.

Related Topics

RESPONSE RATE
Overview (RESPONSE RATE command)
Examples (RESPONSE RATE command)
VARIABLES Subcommand (RESPONSE RATE command)
MINRATE Subcommand (RESPONSE RATE command)


RESTORE

preferences,preferences,preferences
restoring,restoring,restoring
preferences,preferences,preferences
preserving,preserving,preserving
RESTORE (command),RESTORE (command),RESTORE (command)
RESTORE (command),RESTORE (command),RESTORE (command)
syntax chart,syntax chart,syntax chart
RESTORE (command),RESTORE (command),RESTORE (command)
with PRESERVE command,with PRESERVE command,with PRESERVE command
SET (command),SET (command),SET (command)
with RESTORE command,with RESTORE command,with RESTORE command
RESTORE (command),RESTORE (command),RESTORE (command)
with SET command,with SET command,with SET command
PRESERVE (command),PRESERVE (command),PRESERVE (command)
with RESTORE command,with RESTORE command,with RESTORE command
RESTORE

This command takes effect immediately. It does not read the active dataset or execute pending transformations. See the topic Command Order for more information.

Related Topics

Overview (RESTORE command)
Example (RESTORE command)


Overview (RESTORE command)

RESTORE restores SET specifications that were stored by a previous PRESERVE command. RESTORE and PRESERVE are especially useful when using the macro facility. PRESERVE–RESTORE sequences can be nested up to five levels.

Basic Specification

The only specification is the command keyword. RESTORE has no additional specifications.

Limitations

RESTORE does not restore SET THREADS and SET MCACHE settings.

Related Topics

RESTORE
Example (RESTORE command)


Example (RESTORE command)

PRESERVE.
SET TNUMBERS=BOTH.
FREQUENCIES VARIABLES=DIVISION
RESTORE.
FREQUENCIES VARIABLES=DIVISION.

• PRESERVE stores all current SET specifications.

• SET TNUMBERS=BOTH changes the TNUMBERS setting to display both values and value labels in pivot tables.

• The pivot table results from the first FREQUENCIES command will display both category values and labels.

• RESTORE reestablishes the SET specifications that were in effect prior to when PRESERVE was specified.

• The pivot table results from the second FREQUENCIES command will use the TNUMBERS setting in effect prior to PRESERVE (the default is to display only labels).

Related Topics

RESTORE
Overview (RESTORE command)


RMV

RMV (command),RMV (command),RMV (command)
RMV (command),RMV (command),RMV (command)
syntax chart,syntax chart,syntax chart
RMV new variables={LINT (varlist)          }
                  {MEAN (varlist [{,2 }])  }
                  {               {,n }    }
                  {               {ALL}    }
                  {MEDIAN (varlist [{,2 }])}
                  {                 {,n }  }
                  {                 {ALL}  }
                  {SMEAN (varlist)         }
                  {TREND (varlist)         }

   [/new variables=function (varlist [,span])]
Function keywords
LINT | Linear interpolation
MEAN | Mean of surrounding values
MEDIAN | Median of surrounding values
SMEAN | Variable mean
TREND | Linear trend at that point

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See RMV Algorithms for computational details for this procedure.

Syntax for the RMV command can be generated from the Replace Missing Values dialog box.

Example

RMV NEWVAR1=LINT(OLDVAR1).

Related Topics

Overview (RMV command)
LINT Function (RMV command)
MEAN Function (RMV command)
MEDIAN Function (RMV command)
SMEAN Function (RMV command)
TREND Function (RMV command)


Overview (RMV command)

RMV produces new variables by copying existing variables and replacing any system- or user-missing values with estimates computed by one of several methods. You can also use RMV to replace the values of existing variables. The estimated values are computed from valid data in the existing variables.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is one or more new variable names, an equals sign, a function, and an equal number of existing variables. RMV displays a list of the new variables, the number of missing values replaced, the case numbers of the first and last nonmissing cases, the number of valid cases, and the function used to produce the variables.

Syntax Rules Collapse Hide details

Syntax Rules

• The existing variables (and span, if specified) must be enclosed in parentheses.

• The equals sign is required.

• You can specify more than one equation on RMV.

• Equations are separated by slashes.

• You can specify only one function per equation.

• You can create more than one new variable per equation by specifying more than one new variable name on the left and an equal number of existing variables on the right.

Operations Collapse Hide details

Operations

• Each new variable is added to the active dataset.

• If the new variable named already exists, its values are replaced.

• If the new variable named does not already exist, it is created.

• If the same variable is named on both sides of the equation, the new variable will replace the existing variable. Valid values from the existing variable are copied into the new variable, and missing values are replaced with estimates.

• Variables are created in the order in which they are specified on the RMV command.

• If multiple variables are created on a single equation, the first new variable is based on the first existing variable, the second new variable is based on the second existing variable, and so forth.

• RMV automatically generates a variable label for each new variable describing the function and variable used to create it and the date and time of creation.

• The format of a new variable depends on the function specified and on the format of the existing variable.

• RMV honors the TSET MISSING setting that is currently in effect.

• RMV does not honor the USE command.

Limitations Collapse Hide details

Limitations

• Maximum 1 function per equation.

• There is no limit on the number of variables created by an equation.

• There is no limit on the number of equations per RMV command.

Related Topics

RMV
LINT Function (RMV command)
MEAN Function (RMV command)
MEDIAN Function (RMV command)
SMEAN Function (RMV command)
TREND Function (RMV command)


LINT Function (RMV command)

RMV (command),RMV (command),RMV (command)
LINT function,LINT function,LINT function
LINT (function),LINT (function),LINT (function)
RMV command,RMV command,RMV command
replacing missing values,replacing missing values,replacing missing values
linear interpolation,linear interpolation,linear interpolation

LINT replaces missing values using linear interpolation. The last valid value before the missing value and the first valid value after the missing value are used for the interpolation.

• The only specification on LINT is a variable or variable list in parentheses.

• LINT will not replace missing values at the endpoints of variables.

Example

RMV NEWVAR1=LINT(OLDVAR1).

• This example produces a new variable called NEWVAR1.

• NEWVAR1 will have the same values as OLDVAR1 but with missing values replaced by linear interpolation.

Related Topics

RMV
Overview (RMV command)
MEAN Function (RMV command)
MEDIAN Function (RMV command)
SMEAN Function (RMV command)
TREND Function (RMV command)


MEAN Function (RMV command)

RMV (command),RMV (command),RMV (command)
MEAN function,MEAN function,MEAN function
MEAN (function),MEAN (function),MEAN (function)
RMV command,RMV command,RMV command
replacing missing values,replacing missing values,replacing missing values
mean of nearby points,mean of nearby points,mean of nearby points

MEAN replaces missing values with the mean of valid surrounding values. The number of surrounding values used to compute the mean depends on the span.

• The specification on MEAN is a variable or variable list and a span, in parentheses.

• The span specification is optional and can be any positive integer or keyword ALL.

• A span of n uses n valid cases before and after the missing value.

• If span is not specified, it defaults to 2.

• Keyword ALL computes the mean of all valid values.

• MEAN will not replace missing values if there are not enough valid surrounding cases to satisfy the span specification.

Example

RMV B=MEAN(A,3).

• This example produces a new variable called B.

• B will have the same values as variable A but with missing values replaced by means of valid surrounding values.

• Each mean is based on six values—that is, the three nearest valid values on each side of the missing value.

Related Topics

RMV
Overview (RMV command)
LINT Function (RMV command)
MEDIAN Function (RMV command)
SMEAN Function (RMV command)
TREND Function (RMV command)


MEDIAN Function (RMV command)

RMV (command),RMV (command),RMV (command)
MEDIAN function,MEDIAN function,MEDIAN function
MEDIAN (function),MEDIAN (function),MEDIAN (function)
RMV command,RMV command,RMV command
replacing missing values,replacing missing values,replacing missing values
median of nearby points,median of nearby points,median of nearby points

MEDIAN replaces missing values with the median of valid surrounding values. The number of surrounding values used to compute the median depends on the span.

• The specification on MEDIAN is a variable or variable list and a span, in parentheses.

• The span specification is optional and can be any positive integer or keyword ALL.

• A span of n uses n valid cases before and after the missing value.

• If span is not specified, it defaults to 2.

• Keyword ALL computes the median of all valid values.

• MEDIAN will not replace missing values if there are not enough valid surrounding cases to satisfy the span specification.

Example

RMV B=MEDIAN(A,3).

• This example produces a new variable called B.

• B will have the same values as A but with missing values replaced by medians of valid surrounding values.

• Each median is based on six values—that is, the three nearest valid values on each side of the missing value.

Related Topics

RMV
Overview (RMV command)
LINT Function (RMV command)
MEAN Function (RMV command)
SMEAN Function (RMV command)
TREND Function (RMV command)


SMEAN Function (RMV command)

RMV (command),RMV (command),RMV (command)
SMEAN function,SMEAN function,SMEAN function
SMEAN (function),SMEAN (function),SMEAN (function)
RMV command,RMV command,RMV command
replacing missing values,replacing missing values,replacing missing values
series mean,series mean,series mean

SMEAN replaces missing values in the new variable with the variable mean.

• The only specification on SMEAN is a variable or variable list in parentheses.

• The SMEAN function is equivalent to the MEAN function with a span specification of ALL.

Example

RMV VAR1 TO VAR4=SMEAN(VARA VARB VARC VARD).

• Four new variables (VAR1, VAR2, VAR3, and VAR4) are created.

• VAR1 copies the values of VARA, VAR2 copies VARB, VAR3 copies VARC, and VAR4 copies VARD. Any missing values in an existing variable are replaced with the mean of that variable.

Related Topics

RMV
Overview (RMV command)
LINT Function (RMV command)
MEAN Function (RMV command)
MEDIAN Function (RMV command)
TREND Function (RMV command)


TREND Function (RMV command)

RMV (command),RMV (command),RMV (command)
TREND function,TREND function,TREND function
TREND (function),TREND (function),TREND (function)
RMV command,RMV command,RMV command
replacing missing values,replacing missing values,replacing missing values
linear trend,linear trend,linear trend

TREND replaces missing values in the new variable with the linear trend for that point. The existing variable is regressed on an index variable scaled 1 to n. Missing values are replaced with their predicted values.

• The only specification on TREND is a variable or variable list in parentheses.

Example

RMV YHAT=TREND(VARY).

• This example creates a new variable called YHAT.

• YHAT has the same values as VARY but with missing values replaced by predicted values.

Related Topics

RMV
Overview (RMV command)
LINT Function (RMV command)
MEAN Function (RMV command)
MEDIAN Function (RMV command)
SMEAN Function (RMV command)


ROC

ROC Curve,ROC Curve,ROC Curve
command syntax,command syntax,command syntax
ROC (command),ROC (command),ROC (command)
ROC (command),ROC (command),ROC (command)
syntax chart,syntax chart,syntax chart

ROC is available in the Statistics Base option.

ROC varlist BY varname({varvalue  })
                       {‘varvalue’}

[/MISSING = {EXCLUDE**}]
            {INCLUDE  }

[/CRITERIA = [CUTOFF({INCLUDE**})] [TESTPOS({LARGE**}) [CI({95** })]
                     {EXCLUDE  }            {SMALL  }      {value}

             [DISTRIBUTION({FREE** })]]
                           {NEGEXPO}

[/PLOT = [CURVE**[(REFERENCE)]] [NONE]]

[/PRINT = [SE][(MODELQUALITY)] [COORDINATES]].

** Default if subcommand is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See ROC Algorithms for computational details for this procedure.

Syntax for the ROC command can be generated from the ROC Curve dialog box.

Release History Collapse Hide details

Release History

Release 18.0

• MODELQUALITY keyword introduced.

Example

ROC
  pred  BY default (1).

Related Topics

Overview (ROC command)
Examples (ROC command)
varlist BY varname(varvalue) (ROC command)
MISSING Subcommand (ROC command)
CRITERIA Subcommand (ROC command)
PRINT Subcommand (ROC command)
PLOT Subcommand (ROC command)


Overview (ROC command)

ROC produces a receiver operating characteristic (ROC) curve and an estimate of the area under the curve.

Options Collapse Hide details

Options

Distributional Assumptions. In the CRITERIA subcommand, the user can choose the nonparametric or parametric method to estimate the standard error of the area under the curve. Currently, the bi-negative exponential distribution is the only parametric option.

Optional Output. In addition to an estimate of the area under the ROC curve, the user may request its standard error, a confidence interval, and a p value under the null hypothesis that the area under the curve equals 0.5. A table of cutoff values and coordinates used to plot the ROC curve may also be displayed.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is one variable as the test result variable and one variable as the actual state variable with one of its values. ROC uses the nonparametric (distribution-free) method to calculate the area under the ROC curve. The default and minimum output is a chart of the ROC curve and a table of the area under the curve.

Syntax Rules Collapse Hide details

Syntax Rules

• Minimum syntax: You always need a test result variable and one actual state variable with one of its values in the ROC command line.

• The test result variable must be numeric, but the state variable can be any type with any format.

• Subcommands can be specified in any order.

• When a subcommand is duplicated, only the last one is honored given that all duplicates have no syntax errors. A syntax warning is issued.

• Within a subcommand, if two or more exclusive or contradictory keywords are given, the latter keywords override the earlier ones. A syntax warning is issued.

• If a keyword is duplicated within a subcommand, it is silently ignored.

ROC (command),ROC (command),ROC (command)
limitations,limitations,limitations
Limitations Collapse Hide details

Limitations

• Only the nonparametric method and one parametric method are available as the computational options for the standard error of the area under the curve at this moment. In the future, binormal and bilogistic distributions may be added to the parametric option.

Related Topics

ROC
Examples (ROC command)
varlist BY varname(varvalue) (ROC command)
MISSING Subcommand (ROC command)
CRITERIA Subcommand (ROC command)
PRINT Subcommand (ROC command)
PLOT Subcommand (ROC command)


Examples (ROC command)

ROC
  assay  BY actual (1)
  /PLOT = CURVE(REFERENCE)
  /PRINT = SE COORDINATES
  /CRITERIA = CUTOFF(INCLUDE) TESTPOS(LARGE) DISTRIBUTION(FREE) CI(95)
  /MISSING = EXCLUDE .

• assay is the test result variable, and actual is the actual state variable. The “positive” group is identified by the value 1.

• The PLOT subcommand specifies that the ROC curve chart should be displayed with the diagonal reference line.

• The PRINT subcommand specifies that the standard error of the area estimate should be computed and that the coordinates of the ROC curve should be displayed in a separate table.

• All other options are set to their default values.

For discussion of output from this syntax and to place the example in context, see Using ROC Curve to Evaluate Assay Performance .

Comparing Multiple Curves

ROC
  preddef1 preddef2 preddef3  BY default (1)
  /PLOT = CURVE(REFERENCE)
  /PRINT = SE
  /CRITERIA = CUTOFF(INCLUDE) TESTPOS(LARGE) DISTRIBUTION(FREE) CI(95)
  /MISSING = EXCLUDE .

• preddef1, preddef2, and preddef3 are the test result variables, and default is the actual state variable. The “positive” group is identified by the value 1.

• The PLOT subcommand specifies that the ROC curve chart should be displayed with the diagonal reference line.

• The PRINT subcommand specifies that the standard error of the area estimate should be computed and that the coordinates of the ROC curve should be displayed in a separate table.

• All other options are set to their default values.

For discussion of output from this syntax and to place the example in context, see Using ROC Curves to Choose between Competing Classification Schemes.

Related Topics

ROC
Overview (ROC command)
varlist BY varname(varvalue) (ROC command)
MISSING Subcommand (ROC command)
CRITERIA Subcommand (ROC command)
PRINT Subcommand (ROC command)
PLOT Subcommand (ROC command)


varlist BY varname(varvalue) (ROC command)

BY (keyword),BY (keyword),BY (keyword)
ROC command,ROC command,ROC command

The varlist specifies one or more test result variables. They must be of numeric type.

The varname separated from the varlist by the word BY specifies the actual state variable. It can be of any type and any format. The user must also specify a varvalue in brackets after the second varname to define the “positive” group of the actual state variable. All other valid state values are assumed to indicate the negative group.

Related Topics

ROC
Overview (ROC command)
Examples (ROC command)
MISSING Subcommand (ROC command)
CRITERIA Subcommand (ROC command)
PRINT Subcommand (ROC command)
PLOT Subcommand (ROC command)


MISSING Subcommand (ROC command)

ROC (command),ROC (command),ROC (command)
missing values,missing values,missing values
missing values,missing values,missing values
ROC command,ROC command,ROC command
MISSING (keyword),MISSING (keyword),MISSING (keyword)
ROC command,ROC command,ROC command
ROC (command),ROC (command),ROC (command)
MISSING keyword,MISSING keyword,MISSING keyword

Cases with system-missing values in the test result variable and the actual state variable are always excluded from the analysis. However, the MISSING subcommand allows the user to redefine the user-missing values to be valid.

EXCLUDE (keyword),EXCLUDE (keyword),EXCLUDE (keyword)
ROC command,ROC command,ROC command
INCLUDE (keyword),INCLUDE (keyword),INCLUDE (keyword)
ROC command,ROC command,ROC command
EXCLUDE | Exclude both user-missing and system-missing values. Cases with a system-missing value or a user-missing value in either the test result variable or the actual state variable are excluded from the analysis. This is the active default.
INCLUDE | User-missing values are treated as valid. Cases with a system-missing value in either the test result variable or the actual state variable are excluded from the analysis.

Related Topics

ROC
Overview (ROC command)
Examples (ROC command)
varlist BY varname(varvalue) (ROC command)
CRITERIA Subcommand (ROC command)
PRINT Subcommand (ROC command)
PLOT Subcommand (ROC command)


CRITERIA Subcommand (ROC command)

CRITERIA (subcommand),CRITERIA (subcommand),CRITERIA (subcommand)
ROC command,ROC command,ROC command
ROC (command),ROC (command),ROC (command)
CRITERIA subcommand,CRITERIA subcommand,CRITERIA subcommand

The CRITERIA subcommand allows the user to decide whether or not the cutoff value is included as the positive test result value, whether or not the larger or smaller value direction of the test result variable indicates the positive test result, the confidence level of the asymptotic confidence interval produced by /PRINT = SE, and the estimation method for the standard error of the area under the curve.

CUTOFF (keyword),CUTOFF (keyword),CUTOFF (keyword)
ROC command,ROC command,ROC command
TESTPOS (keyword),TESTPOS (keyword),TESTPOS (keyword)
ROC command,ROC command,ROC command
DISTRIBUTION (keyword),DISTRIBUTION (keyword),DISTRIBUTION (keyword)
ROC command,ROC command,ROC command
CUTOFF(INCLUDE) | Positive classification of test result values includes the cutoff values. Note that the positive test result direction is controlled by the TESTPOS keyword. This is the active default.
CUTOFF(EXCLUDE) | Positive classification of test result values excludes the cutoff values. This distinction leads to the different sets of cutoff values, but none of the output (chart or table) is affected at this moment because the user cannot choose the cutoff values for the classification.
TESTPOS(LARGE) | The user can specify which direction of the test result variable indicates increasing strength of conviction that the subject is test positive. The larger the test result value is, the more positive the test result is. LARGE is the active default.
TESTPOS(SMALL) | The smaller the test result value is, the more positive the test result is.
CI(n) | Confidence level in the (two-sided) asymptotic confidence interval of the area. The user can specify any confidence level in (0, 100) for the asymptotic confidence interval created by /PRINT = SE. The active default parameter value is 95.
DISTRIBUTION(FREE) | The method of calculating the standard error of the area under the curve. When FREE, the standard error of the area under the curve is estimated nonparametrically—that is, without any distributional assumption.
DISTRIBUTION(NEGEXPO) | The standard error is estimated assuming the bi-negative exponential distribution. This latter option is valid only when the number of positive actual state observations equals the number of negative actual state observations.

Related Topics

ROC
Overview (ROC command)
Examples (ROC command)
varlist BY varname(varvalue) (ROC command)
MISSING Subcommand (ROC command)
PRINT Subcommand (ROC command)
PLOT Subcommand (ROC command)


PRINT Subcommand (ROC command)

ROC (command),ROC (command),ROC (command)
output,output,output
PRINT (subcommand),PRINT (subcommand),PRINT (subcommand)
ROC command,ROC command,ROC command
ROC (command),ROC (command),ROC (command)
PRINT subcommand,PRINT subcommand,PRINT subcommand

The PRINT subcommand controls the display of optional table and chart output. Note that the area under the curve is always displayed.

confidence intervals,confidence intervals,confidence intervals
ROC command,ROC command,ROC command
standard error,standard error,standard error
ROC command,ROC command,ROC command
SE (keyword),SE (keyword),SE (keyword)
ROC command,ROC command,ROC command
COORDINATES (keyword),COORDINATES (keyword),COORDINATES (keyword)
ROC command,ROC command,ROC command
SE (MODELQUALITY) | Standard error of the area estimate. In addition to the standard error of the estimated area under the curve, the asymptotic 95% (or other user-specified confidence level) confidence interval as well as the asymptotic p value under the null hypothesis that the true area = 0.5 are calculated. The optional (MODELQUALITY) specification produces a simple bar chart that displays the value of the lower bound of the confidence interval of the area under the curve, expressed as a proportion, on a scale of 0 to 1. Note that the area under the curve statistic is asymptotically normally distributed.
COORDINATES | Coordinate points of the ROC curve along with the cutoff values. Pairs of sensitivity and 1 – specificity values are given with the cutoff values for each curve.

Related Topics

ROC
Overview (ROC command)
Examples (ROC command)
varlist BY varname(varvalue) (ROC command)
MISSING Subcommand (ROC command)
CRITERIA Subcommand (ROC command)
PLOT Subcommand (ROC command)


PLOT Subcommand (ROC command)

ROC (command),ROC (command),ROC (command)
charts,charts,charts
charts,charts,charts
ROC Curve,ROC Curve,ROC Curve
PLOT (subcommand),PLOT (subcommand),PLOT (subcommand)
ROC command,ROC command,ROC command
ROC (command),ROC (command),ROC (command)
PLOT subcommand,PLOT subcommand,PLOT subcommand

The PLOT subcommand controls the display of chart output.

CURVE (keyword),CURVE (keyword),CURVE (keyword)
ROC command,ROC command,ROC command
NONE (keyword),NONE (keyword),NONE (keyword)
ROC command,ROC command,ROC command
CURVE(REFERENCE) | The ROC curve chart is displayed. The keyword CURVE is the active default. In addition, the user has an option to draw the diagonal reference line (sensitivity = 1 – specificity) by the bracketed parameter REFERENCE.
NONE | No charts are displayed.

Related Topics

ROC
Overview (ROC command)
Examples (ROC command)
varlist BY varname(varvalue) (ROC command)
MISSING Subcommand (ROC command)
CRITERIA Subcommand (ROC command)
PRINT Subcommand (ROC command)


SAMPLE

sampling cases,sampling cases,sampling cases
cases,cases,cases
sampling,sampling,sampling
SAMPLE (command),SAMPLE (command),SAMPLE (command)
SAMPLE (command),SAMPLE (command),SAMPLE (command)
syntax chart,syntax chart,syntax chart
SAMPLE {decimal value}
       {n FROM m     }

This command does not read the active dataset. It is stored, pending execution with the next command that reads the dataset. See the topic Command Order for more information.

Syntax for the SAMPLE command can be generated from the Select Cases dialog by selecting Random sample of cases and selecting Deleted for unselected cases.

Example

SAMPLE .25.

Related Topics

Overview (SAMPLE command)
Examples (SAMPLE command)


Overview (SAMPLE command)

subsets of cases,subsets of cases,subsets of cases
exact-size sample,exact-size sample,exact-size sample
subsets of cases,subsets of cases,subsets of cases
proportional sample,proportional sample,proportional sample
FROM (keyword),FROM (keyword),FROM (keyword)
SAMPLE command,SAMPLE command,SAMPLE command
exact-size sample,exact-size sample,exact-size sample
proportional sample,proportional sample,proportional sample
sample,sample,sample
proportional,proportional,proportional
sample,sample,sample
exact-size,exact-size,exact-size
SET (command),SET (command),SET (command)
with SAMPLE command,with SAMPLE command,with SAMPLE command
SAMPLE (command),SAMPLE (command),SAMPLE (command)
with SET command,with SET command,with SET command
SAMPLE (command),SAMPLE (command),SAMPLE (command)
with SELECT IF command,with SELECT IF command,with SELECT IF command
SELECT IF (command),SELECT IF (command),SELECT IF (command)
with SAMPLE command,with SAMPLE command,with SAMPLE command
SAMPLE (command),SAMPLE (command),SAMPLE (command)
with N OF CASES command,with N OF CASES command,with N OF CASES command
N OF CASES (command),N OF CASES (command),N OF CASES (command)
with SAMPLE command,with SAMPLE command,with SAMPLE command
SAMPLE (command),SAMPLE (command),SAMPLE (command)
limitations,limitations,limitations
INPUT PROGRAM (command),INPUT PROGRAM (command),INPUT PROGRAM (command)
with SAMPLE command,with SAMPLE command,with SAMPLE command
SAMPLE (command),SAMPLE (command),SAMPLE (command)
with INPUT PROGRAM command,with INPUT PROGRAM command,with INPUT PROGRAM command
SAMPLE (command),SAMPLE (command),SAMPLE (command)
with FILE TYPE command,with FILE TYPE command,with FILE TYPE command
FILE TYPE (command),FILE TYPE (command),FILE TYPE (command)
with SAMPLE command,with SAMPLE command,with SAMPLE command
subsets of cases,subsets of cases,subsets of cases
temporary sample,temporary sample,temporary sample
TEMPORARY (command),TEMPORARY (command),TEMPORARY (command)
with SAMPLE command,with SAMPLE command,with SAMPLE command
SAMPLE (command),SAMPLE (command),SAMPLE (command)
with TEMPORARY command,with TEMPORARY command,with TEMPORARY command

SAMPLE permanently draws a random sample of cases for processing in all subsequent procedures. For a temporary sample, use a TEMPORARY command before SAMPLE.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is either a decimal value between 0 and 1 or the sample size followed by keyword FROM and the size of the active dataset.

• To select an approximate percentage of cases, specify a decimal value between 0 and 1.

• To select an exact-size random sample, specify a positive integer that is less than the file size, and follow it with keyword FROM and the file size.

Operations Collapse Hide details

Operations

• SAMPLE is a permanent transformation.

• Sampling is based on a pseudo-random-number generator that depends on a seed value that is established by the program. On some implementations of the program, this number defaults to a fixed integer, and a SAMPLE command that specifies n FROM m will generate the identical sample whenever a session is rerun. To generate a different sample each time, use the SET command to reset SEED to a different value for each session. See the SET command for more information.

• If sampling is done by using the n FROM m method, and the TEMPORARY command is specified, successive samples will not be the same because the seed value changes each time that a random-number series is needed within a session.

• A proportional sample (a sample that is based on a decimal value) usually does not produce the exact proportion that is specified.

• If the number that is specified for m following FROM is less than the actual file size, the sample is drawn only from the first m cases.

• If the number following FROM is greater than the actual file size, the program samples an equivalent proportion of cases from the active dataset.

• If SAMPLE follows SELECT IF, SAMPLE samples only cases that are selected by SELECT IF.

• If SAMPLE precedes SELECT IF, cases are selected from the sample.

• If more than one SAMPLE command is specified in a session, each command acts on the sample that was selected by the preceding SAMPLE command.

• If N OF CASES is used with SAMPLE, the program reads as many records as required to build the specified n cases. It makes no difference whether N OF CASES precedes or follows SAMPLE.

Limitations Collapse Hide details

Limitations

SAMPLE cannot be placed in a FILE TYPE-END FILE TYPE or INPUT PROGRAM-END INPUT PROGRAM structure. SAMPLE can be placed nearly anywhere following these commands in a transformation program. See the topic Commands and Program States for more information. .

Related Topics

SAMPLE
Examples (SAMPLE command)


Examples (SAMPLE command)

SAMPLE (command),SAMPLE (command),SAMPLE (command)
with DO IF command,with DO IF command,with DO IF command
DO IF (command),DO IF (command),DO IF (command)
with SAMPLE command,with SAMPLE command,with SAMPLE command

Sampling an Approximate Percentage of Cases

SAMPLE .25.

• This command samples approximately 25% of the cases in the active dataset.

Sampling a Specific Number of Cases

SAMPLE 500 FROM 3420.

• The active dataset must have 3420 or more cases to obtain a random sample of exactly 500 cases.

• If the file contains fewer than 3420 cases, proportionally fewer cases are sampled.

• If the file contains more than 3420 cases, a random sample of 500 cases is drawn from the first 3420 cases.

Sampling Subgroups

DO IF  SEX EQ 'M'.
SAMPLE 1846 FROM 8000.
END IF.

• SAMPLE is placed inside a DO IF-END IF structure to sample subgroups differently. Assume that this survey is for 10,000 people in which 80% of the sample is male, while the known universe is 48% male. To obtain a sample that corresponds to the known universe and that maximizes the size of the sample, 1846 (48/52*2000) males and all females must be sampled. The DO IF structure restricts the sampling process to the males.

Related Topics

SAMPLE
Overview (SAMPLE command)


SAVE

saving files,saving files,saving files
data files,data files,data files
data files,data files,data files
saving,saving,saving
SAVE (command),SAVE (command),SAVE (command)
SAVE (command),SAVE (command),SAVE (command)
syntax chart,syntax chart,syntax chart
SAVE OUTFILE='filespec'

 [/VERSION={3**}]
           {2  }

 [/UNSELECTED=[{RETAIN}]
               {DELETE}

 [/KEEP={ALL**  }] [/DROP=varlist]
        {varlist}

 [/RENAME=(old varlist=new varlist)...]

 [/MAP]  [/{COMPRESSED  }]
           {UNCOMPRESSED}

 [/NAMES]

 [/PERMISSIONS={READONLY }
               {WRITEABLE}

**Default if the subcommand is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

Syntax for the SAVE command can be generated from the Save Data As dialog box.

Example

SAVE OUTFILE='/data/empl.sav'.

Related Topics

Overview (SAVE command)
Examples (SAVE command)
OUTFILE Subcommand (SAVE command)
VERSION Subcommand (SAVE command)
UNSELECTED Subcommand (SAVE command)
DROP and KEEP Subcommands (SAVE command)
RENAME Subcommand (SAVE command)
MAP Subcommand (SAVE command)
COMPRESSED and UNCOMPRESSED Subcommands (SAVE command)
NAMES Subcommand (SAVE command)
PERMISSIONS Subcommand (SAVE command)
Data File Compatibility with Previous Releases


Overview (SAVE command)

SAVE produces a data file in PASW Statistics format, which contains data plus a dictionary. The dictionary contains a name for each variable in the data file plus any assigned variable and value labels, missing-value flags, and variable print and write formats. The dictionary also contains document text that was created with the DOCUMENTS command.

XSAVE (command),XSAVE (command),XSAVE (command)
compared with SAVE command,compared with SAVE command,compared with SAVE command
SAVE (command),SAVE (command),SAVE (command)
compared with XSAVE command,compared with XSAVE command,compared with XSAVE command

XSAVE also creates PASW Statistics data files. The difference is that SAVE causes data to be read, while XSAVE is not executed until data are read for the next procedure.

See SAVE TRANSLATE for information about saving data files that can be used by other programs.

Options Collapse Hide details

Options

Compatibility with Earlier Releases. You can save a data file that can be read by releases prior to 7.5.

Variable Subsets and Order. You can use the DROP and KEEP subcommands to save a subset of variables and reorder the variables that are saved.

Filtered Cases. If filtering is in effect, you use the UNSELECTED subcommand to specify inclusion or exclusion of filtered cases. By default, all cases are included.

Variable Names. You can use the RENAME subcommand to rename variables as they are copied into the PASW Statistics data file.

Variable Map. To confirm the names and order of the variables that are saved in the data file, use the MAP subcommand. MAP displays the variables that are saved in the data file next to their corresponding names in the active dataset.

Data Compression. You can use the COMPRESSED or UNCOMPRESSED subcommand to write the data file in compressed or uncompressed form.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is the OUTFILE subcommand, which specifies a name for the data file to be saved.

Subcommand Order Collapse Hide details

Subcommand Order

• Subcommands can be specified in any order.

Syntax Rules Collapse Hide details

Syntax Rules

• OUTFILE is required and can be specified only once. If OUTFILE is specified more than once, only the last specified OUTFILE is in effect.

• KEEP, DROP, RENAME, and MAP can each be used as many times as needed.

• Only one of the subcommands COMPRESSED or UNCOMPRESSED can be specified per SAVE command.

Operations Collapse Hide details

Operations

• SAVE is executed immediately and causes the data to be read.

• The new data file dictionary is arranged in the same order as the active dataset dictionary, unless variables are reordered with the KEEP subcommand. Documentary text from the active dataset dictionary is always saved unless it is dropped with the DROP DOCUMENTS command before SAVE.

• New variables that were created by transformations and procedures that occurred prior to the SAVE command are included in the new data file, and variables that were altered by transformations are saved in their modified form. Results of any temporary transformations that immediately precede the SAVE command are included in the file; scratch variables are not included.

• The active dataset is still available for transformations and procedures after SAVE is executed.

• SAVE processes the dictionary first and displays a message that indicates how many variables will be saved. After the data are written, SAVE indicates how many cases were saved. If the second message does not appear, the file was probably not completely written.

Related Topics

SAVE
Examples (SAVE command)
OUTFILE Subcommand (SAVE command)
VERSION Subcommand (SAVE command)
UNSELECTED Subcommand (SAVE command)
DROP and KEEP Subcommands (SAVE command)
RENAME Subcommand (SAVE command)
MAP Subcommand (SAVE command)
COMPRESSED and UNCOMPRESSED Subcommands (SAVE command)
NAMES Subcommand (SAVE command)
PERMISSIONS Subcommand (SAVE command)
Data File Compatibility with Previous Releases


Examples (SAVE command)

Renaming Variables for a Saved Version

GET FILE='/hubempl.sav'.
SAVE OUTFILE='/data/empl88.sav' /RENAME=(AGE=AGE88) (JOBCAT=JOBCAT88).

• The GET command retrieves the PASW Statistics data file hubempl.sav.

• The RENAME subcommand renames variable AGE to AGE88 and variable JOBCAT to JOBCAT88.

• SAVE causes the data to be read and saves a new data file with the filename empl88.sav. The original data file hubempl.sav is not changed.

Performing Temporary Transformations Prior to Saving

GET FILE='/data/hubempl.sav'.
TEMPORARY.
RECODE DEPT85 TO DEPT88 (1,2=1) (3,4=2) (ELSE=9).
VALUE LABELS DEPT85 TO DEPT88 1 ‘MANAGEMENT’ 2 ‘OPERATIONS’ 9 ‘UNKNOWN’.
SAVE OUTFILE='/data/hubtemp.sav'.
CROSSTABS DEPT85 TO DEPT88 BY JOBCAT.

• The GET command retrieves the PASW Statistics data file hubempl.sav.

• The TEMPORARY command indicates that RECODE and VALUE LABELS are in effect only for the next command that reads the data (SAVE).

• The RECODE command recodes values for all variables between and including DEPT85 and DEPT88 on the active dataset.

• The VALUE LABELS command specifies new labels for the recoded values.

• The OUTFILE subcommand on SAVE specifies hubtemp.sav as the new data file. The hubtemp.sav file will include the recoded values for DEPT85 to DEPT88 and the new value labels.

• The CROSSTABS command crosstabulates DEPT85 to DEPT88 with JOBCAT. Because the RECODE and VALUE LABELS commands were temporary, the CROSSTABS output does not reflect the recoding and new labels.

• If XSAVE were specified instead of SAVE, the data would be read only once. Both the saved data file and the CROSSTABS output would reflect the temporary recoding and labeling of the department variables.

Related Topics

SAVE
Overview (SAVE command)
OUTFILE Subcommand (SAVE command)
VERSION Subcommand (SAVE command)
UNSELECTED Subcommand (SAVE command)
DROP and KEEP Subcommands (SAVE command)
RENAME Subcommand (SAVE command)
MAP Subcommand (SAVE command)
COMPRESSED and UNCOMPRESSED Subcommands (SAVE command)
NAMES Subcommand (SAVE command)
PERMISSIONS Subcommand (SAVE command)
Data File Compatibility with Previous Releases


OUTFILE Subcommand (SAVE command)

OUTFILE (subcommand),OUTFILE (subcommand),OUTFILE (subcommand)
SAVE command,SAVE command,SAVE command
SAVE (command),SAVE (command),SAVE (command)
OUTFILE subcommand,OUTFILE subcommand,OUTFILE subcommand

OUTFILE specifies the data file to be saved. OUTFILE is required and can be specified only once. If OUTFILE is specified more than once, only the last OUTFILE is in effect.

Related Topics

SAVE
Overview (SAVE command)
Examples (SAVE command)
VERSION Subcommand (SAVE command)
UNSELECTED Subcommand (SAVE command)
DROP and KEEP Subcommands (SAVE command)
RENAME Subcommand (SAVE command)
MAP Subcommand (SAVE command)
COMPRESSED and UNCOMPRESSED Subcommands (SAVE command)
NAMES Subcommand (SAVE command)
PERMISSIONS Subcommand (SAVE command)
Data File Compatibility with Previous Releases


VERSION Subcommand (SAVE command)

VERSION allows you to save a data file that can be opened in releases prior to 7.5. If VERSION is not specified or is specified with no value, the default of 3 is used, which saves the file in a format that cannot be read by releases prior to 7.5. Specify 2 to save a file that is compatible with earlier releases.

Related Topics

SAVE
Overview (SAVE command)
Examples (SAVE command)
OUTFILE Subcommand (SAVE command)
UNSELECTED Subcommand (SAVE command)
DROP and KEEP Subcommands (SAVE command)
RENAME Subcommand (SAVE command)
MAP Subcommand (SAVE command)
COMPRESSED and UNCOMPRESSED Subcommands (SAVE command)
NAMES Subcommand (SAVE command)
PERMISSIONS Subcommand (SAVE command)
Data File Compatibility with Previous Releases
Variable Names (SAVE command)


Variable Names (SAVE command)

For data files with variable names that are longer than eight bytes in version 10.x or 11.x, unique, eight-byte versions of variable names are used (but the original variable names are preserved for use in release 12.0 or later). In releases prior to version 10.0, the original long variable names are lost if you save the data file.

Related Topics

VERSION Subcommand (SAVE command)


UNSELECTED Subcommand (SAVE command)

SAVE (command),SAVE (command),SAVE (command)
UNSELECTED subcommand,UNSELECTED subcommand,UNSELECTED subcommand
UNSELECTED (subcommand),UNSELECTED (subcommand),UNSELECTED (subcommand)
SAVE command,SAVE command,SAVE command

UNSELECTED determines whether cases that were excluded on a previous FILTER or USE command are to be retained or deleted in the saved data file. The default is RETAIN. The UNSELECTED subcommand has no effect when the active dataset does not contain unselected cases.

RETAIN | Retain the unselected cases. All cases in the active dataset are saved. This setting is the default when UNSELECTED is specified by itself.
DELETE | Delete the unselected cases. Only cases that meet the FILTER or USE criteria are saved in the data file.

Related Topics

SAVE
Overview (SAVE command)
Examples (SAVE command)
OUTFILE Subcommand (SAVE command)
VERSION Subcommand (SAVE command)
DROP and KEEP Subcommands (SAVE command)
RENAME Subcommand (SAVE command)
MAP Subcommand (SAVE command)
COMPRESSED and UNCOMPRESSED Subcommands (SAVE command)
NAMES Subcommand (SAVE command)
PERMISSIONS Subcommand (SAVE command)
Data File Compatibility with Previous Releases


DROP and KEEP Subcommands (SAVE command)

SAVE (command),SAVE (command),SAVE (command)
KEEP subcommand,KEEP subcommand,KEEP subcommand
KEEP (subcommand),KEEP (subcommand),KEEP (subcommand)
SAVE command,SAVE command,SAVE command
SAVE (command),SAVE (command),SAVE (command)
DROP command,DROP command,DROP command
DROP (subcommand),DROP (subcommand),DROP (subcommand)
SAVE command,SAVE command,SAVE command
saving files,saving files,saving files
dropping variables,dropping variables,dropping variables
saving files,saving files,saving files
keeping variables,keeping variables,keeping variables

DROP and KEEP are used to save a subset of variables. DROP specifies the variables that are not to be saved in the new data file; KEEP specifies the variables that are to be saved in the new data file; variables that are not named on KEEP are dropped.

• Variables can be specified in any order. The order of variables on KEEP determines the order of variables in the data file. The order on DROP does not affect the order of variables in the data file.

• Keyword ALL on KEEP refers to all remaining variables that were not previously specified on KEEP or DROP. ALL must be the last specification on KEEP.

• If a variable is specified twice on the same subcommand, only the first mention is recognized.

• Multiple DROP and KEEP subcommands are allowed. If a variable is specified that is not in the active dataset, or that has been dropped because of a previous DROP or KEEP subcommand, an error results, and the SAVE command is not executed.

• Keyword TO can be used to specify a group of consecutive variables in the active file.

Example

GET FILE='/data/personnel.sav'.
COMPUTE TENURE=(12-CMONTH +(12*(88-CYEAR)))/12.
COMPUTE JTENURE=(12-JMONTH +(12*(88-JYEAR)))/12.
VARIABLE LABELS       TENURE 'Tenure in Company'
                     JTENURE 'Tenure in Grade'.
SAVE OUTFILE='/data/personnel88.sav' /DROP=GRADE STORE
  /KEEP=LNAME NAME TENURE JTENURE ALL.

• The variables TENURE and JTENURE are created by COMPUTE commands and are assigned variable labels by the VARIABLE LABELS command. TENURE and JTENURE are added to the end of the active dataset.

• DROP excludes variables GRADE and STORE from file personnel88.sav. KEEP specifies that LNAME, NAME, TENURE, and JTENURE are the first four variables in file personnel88.sav, followed by all remaining variables not specified on DROP. These remaining variables are saved in the same sequence as they appear in the original file.

Related Topics

SAVE
Overview (SAVE command)
Examples (SAVE command)
OUTFILE Subcommand (SAVE command)
VERSION Subcommand (SAVE command)
UNSELECTED Subcommand (SAVE command)
RENAME Subcommand (SAVE command)
MAP Subcommand (SAVE command)
COMPRESSED and UNCOMPRESSED Subcommands (SAVE command)
NAMES Subcommand (SAVE command)
PERMISSIONS Subcommand (SAVE command)
Data File Compatibility with Previous Releases


RENAME Subcommand (SAVE command)

saving files,saving files,saving files
renaming variables,renaming variables,renaming variables
SAVE (command),SAVE (command),SAVE (command)
RENAME subcommand,RENAME subcommand,RENAME subcommand
RENAME (subcommand),RENAME (subcommand),RENAME (subcommand)
SAVE command,SAVE command,SAVE command

RENAME changes the names of variables as they are copied into the new data file.

• The specification on RENAME is a list of old variable names followed by an equals sign and a list of new variable names. The same number of variables must be specified on both lists. Keyword TO can be used in the first list to refer to consecutive variables in the active dataset and can be used in the second list to generate new variable names. The entire specification must be enclosed in parentheses.

• Alternatively, you can specify each old variable name individually, followed by an equals sign and the new variable name. Multiple sets of variable specifications are allowed. The parentheses around each set of specifications are optional.

• RENAME does not affect the active dataset. However, if RENAME precedes DROP or KEEP, variables must be referred to by their new names on DROP or KEEP.

• Old variable names do not need to be specified according to their order in the active dataset.

• Name changes take place in one operation. Therefore, variable names can be exchanged between two variables.

• Multiple RENAME subcommands are allowed.

Examples

SAVE OUTFILE='/data/empl88.sav'
  /RENAME AGE=AGE88 JOBCAT=JOBCAT88.

• RENAME specifies two name changes for the file empl88.sav: The variable AGE is renamed to AGE88, and the variable JOBCAT is renamed to JOBCAT88.

SAVE OUTFILE='/data/empl88.sav'
  /RENAME (AGE JOBCAT=AGE88 JOBCAT88).

• The name changes are identical to the changes in the previous example: AGE is renamed to AGE88, and JOBCAT is renamed to JOBCAT88. The parentheses are required with this method.

Related Topics

SAVE
Overview (SAVE command)
Examples (SAVE command)
OUTFILE Subcommand (SAVE command)
VERSION Subcommand (SAVE command)
UNSELECTED Subcommand (SAVE command)
DROP and KEEP Subcommands (SAVE command)
MAP Subcommand (SAVE command)
COMPRESSED and UNCOMPRESSED Subcommands (SAVE command)
NAMES Subcommand (SAVE command)
PERMISSIONS Subcommand (SAVE command)
Data File Compatibility with Previous Releases


MAP Subcommand (SAVE command)

SAVE (command),SAVE (command),SAVE (command)
MAP subcommand,MAP subcommand,MAP subcommand
MAP (subcommand),MAP (subcommand),MAP (subcommand)
SAVE command,SAVE command,SAVE command

MAP displays a list of the variables in the saved data file and their corresponding names in the active dataset.

• The only specification is keyword MAP.

• Multiple MAP subcommands are allowed. Each MAP subcommand maps the results of subcommands that precede it (but not results of subcommands that follow it).

Example

GET FILE='/data/hubempl.sav'.
SAVE OUTFILE='/data/empl88.sav' /RENAME=(AGE=AGE88)(JOBCAT=JOBCAT88)
  /KEEP=LNAME NAME JOBCAT88 ALL /MAP.

• MAP confirms the new names for AGE and JOBCAT and the order of variables in the empl88.sav file (LNAME, NAME, and JOBCAT88, followed by all remaining variables from the active dataset).

Related Topics

SAVE
Overview (SAVE command)
Examples (SAVE command)
OUTFILE Subcommand (SAVE command)
VERSION Subcommand (SAVE command)
UNSELECTED Subcommand (SAVE command)
DROP and KEEP Subcommands (SAVE command)
RENAME Subcommand (SAVE command)
COMPRESSED and UNCOMPRESSED Subcommands (SAVE command)
NAMES Subcommand (SAVE command)
PERMISSIONS Subcommand (SAVE command)
Data File Compatibility with Previous Releases


COMPRESSED and UNCOMPRESSED Subcommands (SAVE command)

SAVE (command),SAVE (command),SAVE (command)
UNCOMPRESSED subcommand,UNCOMPRESSED subcommand,UNCOMPRESSED subcommand
UNCOMPRESSED (subcommand),UNCOMPRESSED (subcommand),UNCOMPRESSED (subcommand)
SAVE command,SAVE command,SAVE command
SAVE (command),SAVE (command),SAVE (command)
COMPRESSED subcommand,COMPRESSED subcommand,COMPRESSED subcommand
COMPRESSED (subcommand),COMPRESSED (subcommand),COMPRESSED (subcommand)
SAVE command,SAVE command,SAVE command
saving files,saving files,saving files
data compression,data compression,data compression

COMPRESSED saves the file in compressed form. UNCOMPRESSED saves the file in uncompressed form. In a compressed file, small integers (from −99 to 155) are stored in one byte instead of the eight bytes that are used in an uncompressed file.

• The only specification is the keyword COMPRESSED or UNCOMPRESSED.

• Compressed data files occupy less disk space than uncompressed data files.

• Compressed data files take longer to read than uncompressed data files.

• The GET command, which reads PASW Statistics data files, does not need to specify whether the files that it reads are compressed or uncompressed.

• Only one of the subcommands COMPRESSED or UNCOMPRESSED can be specified per SAVE command. COMPRESSED is usually the default, though UNCOMPRESSED may be the default on some systems.

Related Topics

SAVE
Overview (SAVE command)
Examples (SAVE command)
OUTFILE Subcommand (SAVE command)
VERSION Subcommand (SAVE command)
UNSELECTED Subcommand (SAVE command)
DROP and KEEP Subcommands (SAVE command)
RENAME Subcommand (SAVE command)
MAP Subcommand (SAVE command)
NAMES Subcommand (SAVE command)
PERMISSIONS Subcommand (SAVE command)
Data File Compatibility with Previous Releases


NAMES Subcommand (SAVE command)

SAVE (command),SAVE (command),SAVE (command)
NAMES subcommand,NAMES subcommand,NAMES subcommand
NAMES (subcommand),NAMES (subcommand),NAMES (subcommand)
SAVE command,SAVE command,SAVE command

For all variable names that are longer than eight bytes, NAMES displays the eight-byte equivalents that will be used if you read the data file into a version prior to release 12.0.

Related Topics

SAVE
Overview (SAVE command)
Examples (SAVE command)
OUTFILE Subcommand (SAVE command)
VERSION Subcommand (SAVE command)
UNSELECTED Subcommand (SAVE command)
DROP and KEEP Subcommands (SAVE command)
RENAME Subcommand (SAVE command)
MAP Subcommand (SAVE command)
COMPRESSED and UNCOMPRESSED Subcommands (SAVE command)
PERMISSIONS Subcommand (SAVE command)
Data File Compatibility with Previous Releases


PERMISSIONS Subcommand (SAVE command)

PERMISSIONS (subcommand),PERMISSIONS (subcommand),PERMISSIONS (subcommand)
SAVE command,SAVE command,SAVE command
SAVE (command),SAVE (command),SAVE (command)
PERMISSIONS subcommand,PERMISSIONS subcommand,PERMISSIONS subcommand

The PERMISSIONS subcommand sets the operating system read/write permissions for the file.

READONLY | File permissions are set to read-only for all users. The file cannot be saved by using the same file name with subsequent changes unless the read/write permissions are changed in the operating system or the subsequent SAVE command specifies PERMISSIONS=WRITEABLE.
WRITEABLE | File permissions are set to allow writing for the file owner. If file permissions were set to read-only for other users, the file remains read-only for them.

Your ability to change the read/write permissions may be restricted by the operating system.

Related Topics

SAVE
Overview (SAVE command)
Examples (SAVE command)
OUTFILE Subcommand (SAVE command)
VERSION Subcommand (SAVE command)
UNSELECTED Subcommand (SAVE command)
DROP and KEEP Subcommands (SAVE command)
RENAME Subcommand (SAVE command)
MAP Subcommand (SAVE command)
COMPRESSED and UNCOMPRESSED Subcommands (SAVE command)
NAMES Subcommand (SAVE command)
Data File Compatibility with Previous Releases


Data File Compatibility with Previous Releases

Unicode,Unicode,Unicode
file compatibility,file compatibility,file compatibility

A data file saved in Unicode mode (see SET command, Unicode subcommand) cannot be read by versions of PASW Statistics prior to 16.0. To save a Unicode data file in a format that can be read by earlier releases, open the file in code page mode and re-save it. The file will be saved in the encoding based on the current locale setting (see SET command, LOCALE subcommand). Some data loss may occur if the file contains characters not recognized by the current locale.

Related Topics

SAVE
Overview (SAVE command)
Examples (SAVE command)
OUTFILE Subcommand (SAVE command)
VERSION Subcommand (SAVE command)
UNSELECTED Subcommand (SAVE command)
DROP and KEEP Subcommands (SAVE command)
RENAME Subcommand (SAVE command)
MAP Subcommand (SAVE command)
COMPRESSED and UNCOMPRESSED Subcommands (SAVE command)
NAMES Subcommand (SAVE command)
PERMISSIONS Subcommand (SAVE command)


SAVE DATA COLLECTION

saving files,saving files,saving files
PASW Data Collection data,PASW Data Collection data,PASW Data Collection data
data files,data files,data files
saving PASW Data Collection data,saving PASW Data Collection data,saving PASW Data Collection data
SAVE DATA COLLECTION (command),SAVE DATA COLLECTION (command),SAVE DATA COLLECTION (command)
SAVE DATA COLLECTION (command),SAVE DATA COLLECTION (command),SAVE DATA COLLECTION (command)
syntax chart,syntax chart,syntax chart
release history,release history,release history
PASW Data Collection data,PASW Data Collection data,PASW Data Collection data
saving,saving,saving

This command is available only on Windows operating systems.

SAVE DATA COLLECTION

  /OUTFILE='filespec'

  /METADATA='filespec'

 [/UNSELECTED=[{RETAIN**}]
               {DELETE}

 [/KEEP={ALL**  }] [/DROP=varlist]
        {varlist}

 [/MAP]

**Default if the subcommand is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

Syntax for the SAVE DATA COLLECTION command can be generated from the Export to PASW Data Collection dialog box.

Release History Collapse Hide details

Release History

Release 15.0

• Command introduced as SAVE DIMENSIONS.

Release 18.0

• SAVE DIMENSIONS deprecated. Command name changed to SAVE DATA COLLECTION.

Example

SAVE DATA COLLECTION
  /OUTFILE='/data/survey.sav'
  /METADATA='/data/survey.mdd'.

Related Topics

Overview (SAVE DATA COLLECTION command)
OUTFILE Subcommand (SAVE DATA COLLECTION command)
METADATA Subcommand (SAVE DATA COLLECTION command)
UNSELECTED Subcommand (SAVE DATA COLLECTION command)
DROP and KEEP Subcommands (SAVE DATA COLLECTION command)
MAP Subcommand (SAVE DATA COLLECTION command)


Overview (SAVE DATA COLLECTION command)

SAVE DATA COLLECTION produces PASW Statistics data files and PASW Data Collection metadata files that you can use to read the PASW Statistics data file into PASW Data Collection applications such as mrTables and mrInterview. This is particularly useful when "roundtripping" data between PASW Statistics and PASW Data Collection applications. For example, you can read an Interviewer Server data source into PASW Statistics, calculate some new variables, and then save the data in a form that can be read by mrTables, without loss of any of the original metadata attributes.

Options Collapse Hide details

Options

Variable Subsets and Order. You can use the DROP and KEEP subcommands to save a subset of variables and reorder the variables that are saved.

Filtered Cases. If filtering is in effect, you use the UNSELECTED subcommand to specify inclusion or exclusion of filtered cases. By default, all cases are included.

Variable Map. To confirm the names and order of the variables that are saved in the PASW Statistics data file, use the MAP subcommand. MAP displays the variables that are saved in the PASW Statistics data file next to their corresponding names in the active dataset.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is the OUTFILE subcommand that specifies a name for the PASW Statistics data file to be saved and the METADATA subcommand that specifies the name for the PASW Data Collection metadata file.

Subcommand Order Collapse Hide details

Subcommand Order

• Subcommands can be specified in any order.

Syntax Rules Collapse Hide details

Syntax Rules

• OUTFILE and METADATA are required and can be specified only once.

• KEEP, DROP, MAP, and UNSELECTED are optional.

Operations Collapse Hide details

Operations

For new variables and datasets not created from PASW Data Collection data sources, PASW Statistics variable attributes are mapped to PASW Data Collection metadata attributes in the metadata file according to the methods described in the SAV DSC documentation in the Data Collection Developer Library.

If the active dataset was created from a PASW Data Collection data source:

• The new metadata file is created by merging the original metadata attributes with metadata attributes for any new variables, plus any changes to original variables that might affect their metadata attributes (for example, addition of, or changes to, value labels).

• For original variables read from the PASW Data Collection data source, any metadata attributes not recognized by PASW Statistics are preserved in their original state. For example, PASW Statistics converts grid variables to regular PASW Statistics variables, but the metadata that defines these grid variables is preserved when you save the new metadata file.

• If any PASW Data Collection variables were automatically renamed to conform to PASW Statistics variable naming rules, the metadata file maps the converted names back to the original PASW Data Collection variable names.

The presence or absence of value labels can affect the metadata attributes of variables and consequently the way those variables are read by PASW Data Collection applications. If value labels have been defined for any nonmissing values of a variable, they should be defined for all nonmissing values of that variable; otherwise, the unlabeled values will be dropped when the data file is read by PASW Data Collection.

Related Topics

SAVE DATA COLLECTION
OUTFILE Subcommand (SAVE DATA COLLECTION command)
METADATA Subcommand (SAVE DATA COLLECTION command)
UNSELECTED Subcommand (SAVE DATA COLLECTION command)
DROP and KEEP Subcommands (SAVE DATA COLLECTION command)
MAP Subcommand (SAVE DATA COLLECTION command)


OUTFILE Subcommand (SAVE DATA COLLECTION command)

OUTFILE (subcommand),OUTFILE (subcommand),OUTFILE (subcommand)
SAVE DATA COLLECTION command,SAVE DATA COLLECTION command,SAVE DATA COLLECTION command
SAVE DATA COLLECTION (command),SAVE DATA COLLECTION (command),SAVE DATA COLLECTION (command)
OUTFILE subcommand,OUTFILE subcommand,OUTFILE subcommand

OUTFILE specifies the PASW Statistics data file to be saved.

• OUTFILE is required and can be specified only once.

• File specifications should be enclosed in quotes.

• The standard extension for PASW Statistics data files is .sav. You should explicitly specify the extension; it will not be automatically appended to the file name.

Related Topics

SAVE DATA COLLECTION
Overview (SAVE DATA COLLECTION command)
METADATA Subcommand (SAVE DATA COLLECTION command)
UNSELECTED Subcommand (SAVE DATA COLLECTION command)
DROP and KEEP Subcommands (SAVE DATA COLLECTION command)
MAP Subcommand (SAVE DATA COLLECTION command)


METADATA Subcommand (SAVE DATA COLLECTION command)

METADATA (subcommand),METADATA (subcommand),METADATA (subcommand)
SAVE DATA COLLECTION command,SAVE DATA COLLECTION command,SAVE DATA COLLECTION command
SAVE DATA COLLECTION (command),SAVE DATA COLLECTION (command),SAVE DATA COLLECTION (command)
METADATA subcommand,METADATA subcommand,METADATA subcommand

METADATA specifies the PASW Data Collection metadata file to be saved. See the Operations section of the Overview for more information.

• METADATA is required and can be specified only once.

• File specifications should be enclosed in quotes.

• The standard extension for a PASW Data Collection metadata file is .mdd. You should explicitly specify the extension; it will not be automatically appended to the file name.

Related Topics

SAVE DATA COLLECTION
Overview (SAVE DATA COLLECTION command)
OUTFILE Subcommand (SAVE DATA COLLECTION command)
UNSELECTED Subcommand (SAVE DATA COLLECTION command)
DROP and KEEP Subcommands (SAVE DATA COLLECTION command)
MAP Subcommand (SAVE DATA COLLECTION command)


UNSELECTED Subcommand (SAVE DATA COLLECTION command)

SAVE DATA COLLECTION (command),SAVE DATA COLLECTION (command),SAVE DATA COLLECTION (command)
UNSELECTED subcommand,UNSELECTED subcommand,UNSELECTED subcommand
UNSELECTED (subcommand),UNSELECTED (subcommand),UNSELECTED (subcommand)
SAVE DATA COLLECTION command,SAVE DATA COLLECTION command,SAVE DATA COLLECTION command

UNSELECTED determines whether cases that were excluded on a previous FILTER or USE command are to be retained or deleted in the PASW Statistics data file. The default is RETAIN. The UNSELECTED subcommand has no effect when the active dataset does not contain unselected cases. Since the metadata file does not contain case data, this subcommand has no effect on the contents of the metadata file.

RETAIN | Retain the unselected cases. All cases in the active dataset are saved. This is the default.
DELETE | Delete the unselected cases. Only cases that meet the FILTER or USE criteria are saved in the PASW Statistics data file.

Related Topics

SAVE DATA COLLECTION
Overview (SAVE DATA COLLECTION command)
OUTFILE Subcommand (SAVE DATA COLLECTION command)
METADATA Subcommand (SAVE DATA COLLECTION command)
DROP and KEEP Subcommands (SAVE DATA COLLECTION command)
MAP Subcommand (SAVE DATA COLLECTION command)


DROP and KEEP Subcommands (SAVE DATA COLLECTION command)

SAVE DATA COLLECTION (command),SAVE DATA COLLECTION (command),SAVE DATA COLLECTION (command)
KEEP subcommand,KEEP subcommand,KEEP subcommand
KEEP (subcommand),KEEP (subcommand),KEEP (subcommand)
SAVE DATA COLLECTION command,SAVE DATA COLLECTION command,SAVE DATA COLLECTION command
SAVE DATA COLLECTION (command),SAVE DATA COLLECTION (command),SAVE DATA COLLECTION (command)
DROP command,DROP command,DROP command
DROP (subcommand),DROP (subcommand),DROP (subcommand)
SAVE DATA COLLECTION command,SAVE DATA COLLECTION command,SAVE DATA COLLECTION command

DROP and KEEP are used to save a subset of variables. DROP specifies the variables that are not to be saved in the new data file; KEEP specifies the variables that are to be saved in the new data file; variables that are not named on KEEP are dropped.

• Variables can be specified in any order. The order of variables on KEEP determines the order of variables in the data file. The order on DROP does not affect the order of variables in the data file.

• Keyword ALL on KEEP refers to all remaining variables that were not previously specified on KEEP or DROP. ALL must be the last specification on KEEP.

• If a variable is specified twice on the same subcommand, only the first mention is recognized.

• Multiple DROP and KEEP subcommands are allowed. If a variable is specified that is not in the active dataset or that has been dropped because of a previous DROP or KEEP subcommand, an error results, and the SAVE DATA COLLECTION command is not executed.

• Keyword TO can be used to specify a group of consecutive variables in the active file.

• If the active dataset was created from a PASW Data Collection data source, any original variables defined as grid or array elements in the PASW Data Collection data source are retained in the metadata file, even if those variables are not included in the PASW Statistics data file. Thus, the original grid or array structure is preserved, but there will be no case data for any variables not included in the PASW Statistics data file.

Example

SAVE DATA COLLECTION
  /OUTFILE='/data/survey.sav'
  /METADATA='/data/survey.mdd'
  /DROP gridVar7
  /KEEP gridVar1 to gridVar8.

Assuming that the order of the variables in the active dataset is gridVar1, gridVar2, gridVar3,...gridVar8 and that all eight variables are grid variables in the original PASW Data Collection data source, gridVar7 will be dropped from survey.sav, but the original metadata for gridVar7 will be preserved in survey.mdd.

Related Topics

SAVE DATA COLLECTION
Overview (SAVE DATA COLLECTION command)
OUTFILE Subcommand (SAVE DATA COLLECTION command)
METADATA Subcommand (SAVE DATA COLLECTION command)
UNSELECTED Subcommand (SAVE DATA COLLECTION command)
MAP Subcommand (SAVE DATA COLLECTION command)


MAP Subcommand (SAVE DATA COLLECTION command)

SAVE DATA COLLECTION (command),SAVE DATA COLLECTION (command),SAVE DATA COLLECTION (command)
MAP subcommand,MAP subcommand,MAP subcommand
MAP (subcommand),MAP (subcommand),MAP (subcommand)
SAVE DATA COLLECTION command,SAVE DATA COLLECTION command,SAVE DATA COLLECTION command

MAP displays a list of the variables in the PASW Statistics data file and their corresponding names in the active dataset.

• The only specification is keyword MAP.

• Multiple MAP subcommands are allowed. Each MAP subcommand maps the results of the DROP and KEEP subcommands that precede it (but not results of subcommands that follow it).

Example

SAVE DATA COLLECTION
  /OUTFILE='/data/survey.sav'
  /METADATA='/data/survey.mdd'
  /DROP var7 /MAP
  /KEEP var1 to var8 /MAP.

Related Topics

SAVE DATA COLLECTION
Overview (SAVE DATA COLLECTION command)
OUTFILE Subcommand (SAVE DATA COLLECTION command)
METADATA Subcommand (SAVE DATA COLLECTION command)
UNSELECTED Subcommand (SAVE DATA COLLECTION command)
DROP and KEEP Subcommands (SAVE DATA COLLECTION command)


SAVE MODEL

SAVE MODEL (command),SAVE MODEL (command),SAVE MODEL (command)
SAVE MODEL (command),SAVE MODEL (command),SAVE MODEL (command)
syntax chart,syntax chart,syntax chart
model file,model file,model file
saving,saving,saving
SAVE MODEL OUTFILE='filename'

 [/KEEP={ALL**      }]
        {model names}
        {procedures }

 [/DROP={model names}]
        {procedures }

 [/TYPE={MODEL**}]
        {COMMAND}

**Default if the subcommand is omitted.

This command takes effect immediately. It does not read the active dataset or execute pending transformations. See the topic Command Order for more information.

Example

SAVE MODEL OUTFILE='ACFMOD.DAT'.

Related Topics

Overview (SAVE MODEL command)
OUTFILE Subcommand (SAVE MODEL command)
KEEP and DROP Subcommands (SAVE MODEL command)
TYPE Subcommand (SAVE MODEL command)
MODEL NAME
READ MODEL
TDISPLAY


Overview (SAVE MODEL command)

SAVE MODEL saves the models that are created by certain procedures in a model file. The saved model file can be read later in the session or in another session with the READ MODEL command.

Options Collapse Hide details

Options

You can save a subset of models into the file using the DROP and KEEP subcommands. You can use the TYPE subcommand to control whether models are specified by model name or by the name of the procedure that generated them.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is the OUTFILE subcommand followed by a filename.

• By default, SAVE MODEL saves all currently active models in the specified file. Each model that is saved in the file includes information such as the procedure that created it, the model name, the specified variable names, subcommands and specifications used, and parameter estimates. The names of the models are either the default MOD_n names or the names that are assigned on the MODEL NAME command. In addition to the model specifications, the TSET settings that are currently in effect are saved.

Subcommand Order Collapse Hide details

Subcommand Order

• Subcommands can be specified in any order.

Syntax Rules Collapse Hide details

Syntax Rules

• If a subcommand is specified more than once, only the last subcommand is executed.

Operations Collapse Hide details

Operations

• SAVE MODEL is executed immediately.

• Model files are designed to be written and read by specific procedures and should not be edited.

• The active models are not affected by the SAVE MODEL command.

• DATE specifications are not saved in the model file.

• Models are not saved in PASW Statistics data files.

• The following procedures can generate models that can be saved with the SAVE MODEL command: AREG, ARIMA, EXSMOOTH, SEASON, and SPECTRA in the Forecasting module; ACF, CASEPLOT, CCF, CURVEFIT, PACF, PPLOT, and TSPLOT in the Core system; and WLS and 2SLS in the Regression module.

Limitations Collapse Hide details

Limitations

• A maximum of one filename can be specified.

• The READ MODEL command can only read models created by a SAVE MODEL command on the same operating system/platform.

Related Topics

SAVE MODEL
OUTFILE Subcommand (SAVE MODEL command)
KEEP and DROP Subcommands (SAVE MODEL command)
TYPE Subcommand (SAVE MODEL command)


OUTFILE Subcommand (SAVE MODEL command)

OUTFILE (subcommand),OUTFILE (subcommand),OUTFILE (subcommand)
SAVE MODEL command,SAVE MODEL command,SAVE MODEL command
SAVE MODEL (command),SAVE MODEL (command),SAVE MODEL (command)
OUTFILE subcommand,OUTFILE subcommand,OUTFILE subcommand

OUTFILE names the file where models will be stored and is the only required subcommand.

• The only specification on OUTFILE is the name of the model file.

• The filename should be enclosed in quotes.

• Only one filename can be specified.

OUTFILE (subcommand),OUTFILE (subcommand),OUTFILE (subcommand)
SAVE MODEL command,SAVE MODEL command,SAVE MODEL command
SAVE MODEL (command),SAVE MODEL (command),SAVE MODEL (command)
OUTFILE subcommand,OUTFILE subcommand,OUTFILE subcommand

• You can store models in other directories by specifying a fully qualified filename.

Related Topics

SAVE MODEL
Overview (SAVE MODEL command)
KEEP and DROP Subcommands (SAVE MODEL command)
TYPE Subcommand (SAVE MODEL command)


KEEP and DROP Subcommands (SAVE MODEL command)

SAVE MODEL (command),SAVE MODEL (command),SAVE MODEL (command)
KEEP subcommand,KEEP subcommand,KEEP subcommand
KEEP (subcommand),KEEP (subcommand),KEEP (subcommand)
SAVE MODEL command,SAVE MODEL command,SAVE MODEL command
DROP (subcommand),DROP (subcommand),DROP (subcommand)
SAVE MODEL command,SAVE MODEL command,SAVE MODEL command
SAVE MODEL (command),SAVE MODEL (command),SAVE MODEL (command)
DROP subcommand,DROP subcommand,DROP subcommand

KEEP and DROP allow you to save a subset of models. By default, all currently active models are saved.

• KEEP specifies models to be saved in the model file.

• DROP specifies models that are not saved in the model file.

• Models can be specified by using individual model names or the names of the procedures that created them. To use procedure names, you must specify COMMAND on the TYPE subcommand.

• Model names are either the default MOD_n names or the names that are assigned with MODEL NAME.

• If you specify a procedure name on KEEP, all models that are created by that procedure are saved; on DROP, any models created by that procedure are not included in the model file.

• Model names and procedure names cannot be mixed on a single SAVE MODEL command.

• If more than one KEEP or DROP subcommand is specified, only the last subcommand is executed.

• You can specify the keyword ALL on KEEP to save all models that are currently active. This setting is the default.

Example

SAVE MODEL OUTFILE='ACFCCF.DAT'
  /KEEP=ACF1 ACF2.
SAVE MODEL (command),SAVE MODEL (command),SAVE MODEL (command)
KEEP subcommand,KEEP subcommand,KEEP subcommand
KEEP (subcommand),KEEP (subcommand),KEEP (subcommand)
SAVE MODEL command,SAVE MODEL command,SAVE MODEL command
DROP (subcommand),DROP (subcommand),DROP (subcommand)
SAVE MODEL command,SAVE MODEL command,SAVE MODEL command
SAVE MODEL (command),SAVE MODEL (command),SAVE MODEL (command)
DROP subcommand,DROP subcommand,DROP subcommand

• In this example, only models ACF1 and ACF2 are saved in model file ACFCCF.DAT.

Related Topics

SAVE MODEL
Overview (SAVE MODEL command)
OUTFILE Subcommand (SAVE MODEL command)
TYPE Subcommand (SAVE MODEL command)


TYPE Subcommand (SAVE MODEL command)

SAVE MODEL (command),SAVE MODEL (command),SAVE MODEL (command)
TYPE subcommand,TYPE subcommand,TYPE subcommand
TYPE (subcommand),TYPE (subcommand),TYPE (subcommand)
SAVE MODEL command,SAVE MODEL command,SAVE MODEL command

TYPE indicates whether models are specified by model name or procedure name on DROP and KEEP.

COMMAND (keyword),COMMAND (keyword),COMMAND (keyword)
SAVE MODEL command,SAVE MODEL command,SAVE MODEL command
MODEL (keyword),MODEL (keyword),MODEL (keyword)
SAVE MODEL command,SAVE MODEL command,SAVE MODEL command

• One keyword, MODEL or COMMAND, can be specified after TYPE.

MODEL (keyword),MODEL (keyword),MODEL (keyword)
SAVE MODEL command,SAVE MODEL command,SAVE MODEL command

• MODEL is the default and indicates that models are specified as model names.

• COMMAND indicates that the models are specified by procedure name.

• TYPE has no effect if KEEP or DROP is not specified.

• The TYPE specification applies only to the current SAVE MODEL command.

Example

SAVE MODEL OUTFILE='CURVE1.DAT'
  /KEEP=CURVEFIT
  /TYPE=COMMAND.
model file,model file,model file
saving,saving,saving
COMMAND (keyword),COMMAND (keyword),COMMAND (keyword)
SAVE MODEL command,SAVE MODEL command,SAVE MODEL command
SAVE MODEL (command),SAVE MODEL (command),SAVE MODEL (command)
TYPE subcommand,TYPE subcommand,TYPE subcommand
TYPE (subcommand),TYPE (subcommand),TYPE (subcommand)
SAVE MODEL command,SAVE MODEL command,SAVE MODEL command

• This command saves all models that were created by the CURVEFIT procedure into the model file CURVE1.DAT.

Related Topics

SAVE MODEL
Overview (SAVE MODEL command)
OUTFILE Subcommand (SAVE MODEL command)
KEEP and DROP Subcommands (SAVE MODEL command)


SAVE TRANSLATE

SAVE TRANSLATE (command),SAVE TRANSLATE (command),SAVE TRANSLATE (command)
SAVE TRANSLATE (command),SAVE TRANSLATE (command),SAVE TRANSLATE (command)
syntax chart,syntax chart,syntax chart
release history,release history,release history
data files,data files,data files
converting,converting,converting
export data,export data,export data
saving files,saving files,saving files
Excel format,Excel format,Excel format
CSV format,CSV format,CSV format
CSV format,CSV format,CSV format
saving data,saving data,saving data
saving files,saving files,saving files
SYLK format,SYLK format,SYLK format
spreadsheet files,spreadsheet files,spreadsheet files
saving,saving,saving
data files,data files,data files
dBASE,dBASE,dBASE
data files,data files,data files
Excel,Excel,Excel
data files,data files,data files
SYLK,SYLK,SYLK
data files,data files,data files
Lotus 1-2-3,Lotus 1-2-3,Lotus 1-2-3
saving files,saving files,saving files
dBASE format,dBASE format,dBASE format
saving files,saving files,saving files
spreadsheet format,spreadsheet format,spreadsheet format
saving files,saving files,saving files
Lotus 1-2-3,Lotus 1-2-3,Lotus 1-2-3
saving files,saving files,saving files
tab-delimited data files,tab-delimited data files,tab-delimited data files
saving files,saving files,saving files
Stata,Stata,Stata
Stata,Stata,Stata
saving data,saving data,saving data

This command is not available on all operating systems.

SAVE TRANSLATE

[{/OUTFILE=file               }]
 {/CONNECT=ODBC connect string}

 [{/UNENCRYPTED}]
  {/ENCRYPTED  }

 [/TYPE={CSV  }]
        {DB2  }
        {DB3  }
        {DB4  }
        {ODBC }
        {PC   }
        {SAS  }
        {STATA}
        {SYM  }
        {SLK  }
        {TAB  }
        {WKS  }
        {WK1  }
        {WK3  }
        {XLS  }

 [/VERSION={1}]
           {2}
           {3}
           {4}
           {5}
           {6}
           {7}
           {9}
           {8}
           {12}
           {X}

 [/FIELDNAMES]

 [/CELLS={VALUES}]
         {LABELS}

 [/TEXTOPTIONS [DELIMITER='char'] [QUALIFIER='char']
               [DECIMAL={DOT  }]
                        {COMMA}
               [FORMAT={PLAIN   }]]
                       {VARIABLE}

 [/EDITION={INTERCOOLED}
           {SE         }

 [/PLATFORM={ALPHA}]
            {WINDOWS}
            {UNIX}

 [{/VALFILE=filename}]

 [/TABLE = 'database table name']

 [/SQL = 'SQL statement' [/SQL = 'SQL statement']]

 [{/APPEND }]
  {/REPLACE}

 [/RENAME=(old varlist=new varlist)[(...)]

 [/KEEP={ALL    }]
        {varlist}

 [/DROP=varlist]

 [/UNSELECTED=[{RETAIN}]
               {DELETE}

 [/MISSING={IGNORE}]
           {RECODE}

 [{/COMPRESSED  }]
  {/UNCOMPRESSED}

 [/MAP]

• OUTFILE is not valid for TYPE=ODBC but is required for all other types.

• CONNECT is required for TYPE=ODBC but is invalid for all other types.

• APPEND, SQL, ENCRYPTED, and TABLE are available only for TYPE=ODBC.

• FIELDNAMES is available for spreadsheet formats and text data formats.

• PLATFORM and VALFILE are available only for TYPE=SAS, and PLATFORM is required.

• CELLS is available for TYPE=XLS /VERSION=8, TYPE=TAB, and TYPE=CSV.

• TEXTOPTIONS is available only for TYPE=TAB and TYPE=CSV.

• EDITION is available only for TYPE=STATA.

• COMPRESSED and UNCOMPRESSED are available only for TYPE=PC.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

Syntax for the SAVE TRANSLATE command can be generated from the Save Data As dialog when selecting one of the file types listed above.

Release History Collapse Hide details

Release History

Release 14.0

• Value STATA added to list for TYPE subcommand.

• EDITION subcommand introduced for TYPE=STATA.

• SQL subcommand introduced.

• MISSING subcommand introduced.

• Field/column names specified on the RENAME subcommand can contain characters (for example, spaces, commas, slashes, plus signs) that are not allowed in PASW Statistics variable names.

• Continuation lines for connection strings on the CONNECT subcommand do not need to begin with a plus sign.

Release 15.0

• ENCRYPTED subcommand introduced.

• Value CSV added to list for TYPE subcommand.

• TEXTOPTIONS subcommand introduced for TYPE=CSV and TYPE=TAB.

Release 16.0

• VERSION=12 introduced for writing data in Excel 2007 XLSX format with TYPE=XLS.

Release 17.0

• UNENCRYPTED subcommand introduced.

Release 18.0

• VERSION=9 introduced for writing SAS 9+ files with TYPE=SAS.

Example

SAVE TRANSLATE OUTFILE='/data/sales.xls'.

Related Topics

Overview (SAVE TRANSLATE command)
Operations (SAVE TRANSLATE command)
TYPE Subcommand (SAVE TRANSLATE command)
VERSION Subcommand (SAVE TRANSLATE command)
OUTFILE Subcommand (SAVE TRANSLATE command)
FIELDNAMES Subcommand (SAVE TRANSLATE command)
CELLS Subcommand (SAVE TRANSLATE command)
TEXTOPTIONS Subcommand (SAVE TRANSLATE command)
EDITION Subcommand (SAVE TRANSLATE command)
PLATFORM Subcommand (SAVE TRANSLATE command)
VALFILE Subcommand (SAVE TRANSLATE command)
ODBC Database Subcommands
REPLACE Subcommand (SAVE TRANSLATE command)
UNSELECTED Subcommand (SAVE TRANSLATE command)
DROP and KEEP Subcommands (SAVE TRANSLATE command)
RENAME Subcommand (SAVE TRANSLATE command)
MISSING Subcommand (SAVE TRANSLATE command)
MAP Subcommand (SAVE TRANSLATE command)


Overview (SAVE TRANSLATE command)

SAVE TRANSLATE translates the active dataset into a file that can be used by other software applications. Supported formats are 1-2-3, Symphony, Multiplan, Excel, dBASE II, dBASE III, dBASE IV, tab-delimited text files, comma-delimited text files, SAS, Stata, SPSS/PC+ data files, and ODBC database sources. For ODBC database sources, it can also manipulate database tables.

Options Collapse Hide details

Options

Variable Subsets. You can use the DROP and KEEP subcommands to specify variables to omit or retain in the resulting file.

Variable Names. You can use the RENAME subcommand to rename variables as they are copied to the external file format. For spreadsheets and text data files, use FIELDNAMES to include the variable names in the file.

Variable Map. To confirm the names and order of the variables that are saved in the resulting file, use the MAP subcommand. MAP displays the variables that are saved in the file next to their corresponding names in the active dataset.

Value Labels. For Excel spreadsheets and tab-delimited and comma-delimited text files, you can use the CELLS subcommand to export value labels rather than values in spreadsheet files. For SAS files, you can use the VALFILE subcommand to create a SAS syntax file containing your data’s value labels. For Stata files, value labels for numeric variables are automatically saved as Stata value labels.

Limitations Collapse Hide details

Limitations

• A maximum of 2,048 cases can be saved to 1-2-3 Release 1A; a maximum of 8,192 cases can be saved to 1-2-3 Release 2.0 or Symphony files.

• A maximum of 16,384 cases can be saved to Excel 2.1. For Excel 95, Excel 97 and Excel 2007, if the number of cases exceeds the single sheet maximum, multiple sheets are created in the workbook.

• A maximum of 256 variables can be saved to Excel 2.1 Excel 95, and Excel 97; a maximum of 16,000 variables can be saved to Excel 2007.

• A maximum of 65,535 cases and 32 variables can be saved to dBASE II, a maximum of one billion cases (subject to disk space availability) and 128 variables can be saved to dBASE III, and a maximum of one billion cases (subject to disk space availability) and 255 variables can be saved to dBASE IV.

• A maximum of 2,047 variables can be saved to Stata 5–6 and Intercooled Stata 7–8. A maximum of 32,767 variables can be saved to Stata SE 7–8.

• A maximum of 32,767 variables can be saved to SAS 6-8.

Related Topics

SAVE TRANSLATE
Operations (SAVE TRANSLATE command)
TYPE Subcommand (SAVE TRANSLATE command)
VERSION Subcommand (SAVE TRANSLATE command)
OUTFILE Subcommand (SAVE TRANSLATE command)
FIELDNAMES Subcommand (SAVE TRANSLATE command)
CELLS Subcommand (SAVE TRANSLATE command)
TEXTOPTIONS Subcommand (SAVE TRANSLATE command)
EDITION Subcommand (SAVE TRANSLATE command)
PLATFORM Subcommand (SAVE TRANSLATE command)
VALFILE Subcommand (SAVE TRANSLATE command)
ODBC Database Subcommands
REPLACE Subcommand (SAVE TRANSLATE command)
UNSELECTED Subcommand (SAVE TRANSLATE command)
DROP and KEEP Subcommands (SAVE TRANSLATE command)
RENAME Subcommand (SAVE TRANSLATE command)
MISSING Subcommand (SAVE TRANSLATE command)
MAP Subcommand (SAVE TRANSLATE command)


Operations (SAVE TRANSLATE command)

• The active dataset remains available after SAVE TRANSLATE is executed.

SAVE TRANSLATE (command),SAVE TRANSLATE (command),SAVE TRANSLATE (command)
missing values,missing values,missing values

• If the active dataset contains more variables than the file can receive, SAVE TRANSLATE writes the maximum number of variables that the file can receive.

Related Topics

SAVE TRANSLATE
Overview (SAVE TRANSLATE command)
TYPE Subcommand (SAVE TRANSLATE command)
VERSION Subcommand (SAVE TRANSLATE command)
OUTFILE Subcommand (SAVE TRANSLATE command)
FIELDNAMES Subcommand (SAVE TRANSLATE command)
CELLS Subcommand (SAVE TRANSLATE command)
TEXTOPTIONS Subcommand (SAVE TRANSLATE command)
EDITION Subcommand (SAVE TRANSLATE command)
PLATFORM Subcommand (SAVE TRANSLATE command)
VALFILE Subcommand (SAVE TRANSLATE command)
ODBC Database Subcommands
REPLACE Subcommand (SAVE TRANSLATE command)
UNSELECTED Subcommand (SAVE TRANSLATE command)
DROP and KEEP Subcommands (SAVE TRANSLATE command)
RENAME Subcommand (SAVE TRANSLATE command)
MISSING Subcommand (SAVE TRANSLATE command)
MAP Subcommand (SAVE TRANSLATE command)
Spreadsheets (SAVE TRANSLATE command)
dBASE (SAVE TRANSLATE command)
Comma-Delimited (CSV) Text Files (SAVE TRANSLATE command)
Tab-Delimited Text Files (SAVE TRANSLATE command)
SAS Files (SAVE TRANSLATE command)
Stata Files (SAVE TRANSLATE command)
SPSS/PC+ System Files (SAVE TRANSLATE command)


Spreadsheets (SAVE TRANSLATE command)

data files,data files,data files
spreadsheet,spreadsheet,spreadsheet

Variables in the active dataset become columns, and cases become rows in the spreadsheet file.

• If you specify FIELDNAMES, variable names become the first row.

• To save value labels instead of data values, use the CELLS subcommand. See the topic CELLS Subcommand (SAVE TRANSLATE command) for more information.

• System-missing values are translated to #NULL! in Excel files.

PASW Statistics formats are translated as follows:

PASW Statistics | 1-2-3/Symphony | Excel
Number | Fixed | 0.00;#,##0.00;...
COMMA | Comma | 0.00;#,##0.00;...
DOLLAR | Currency | $#,##0_);...
DATE | Date | d-mmm-yy
TIME | Time | hh:mm:ss
String | Label | General

Related Topics

Operations (SAVE TRANSLATE command)
dBASE (SAVE TRANSLATE command)
Comma-Delimited (CSV) Text Files (SAVE TRANSLATE command)
Tab-Delimited Text Files (SAVE TRANSLATE command)
SAS Files (SAVE TRANSLATE command)
Stata Files (SAVE TRANSLATE command)
SPSS/PC+ System Files (SAVE TRANSLATE command)


dBASE (SAVE TRANSLATE command)

dBASE files,dBASE files,dBASE files
saving,saving,saving

Variables in the active dataset become fields, and cases become records in the database file.

• Characters that are allowed in variable names, but not in dBASE field names, are translated to colons in dBASE II and underscores in dBASE III and dBASE IV.

• Numeric variables containing the system-missing value are translated to **** in dBASE III and dBASE IV and 0 in dBASE II.

• The width and precision of translated numeric variables are taken from the print format—the total number of characters for the number is taken from the width of the print format, and the number of digits to the right of the decimal point is taken from the decimals in the print format. To adjust the width and precision, use the PRINT FORMATS command before using SAVE TRANSLATE. Values that cannot be converted to the given width and precision are converted to missing values.

• A maximum of 65,535 cases and 32 variables can be saved to dBASE II, a maximum of one billion cases (subject to disk space availability) and 128 variables can be saved to dBASE III, and a maximum of one billion cases (subject to disk space availability) and 255 variables can be saved to dBASE IV.

Variable formats are translated to dBASE formats as follows:

PASW Statistics | dBASE
Number | Numeric
String | Character
Dollar | Numeric
Comma | Numeric

Related Topics

Operations (SAVE TRANSLATE command)
Spreadsheets (SAVE TRANSLATE command)
Comma-Delimited (CSV) Text Files (SAVE TRANSLATE command)
Tab-Delimited Text Files (SAVE TRANSLATE command)
SAS Files (SAVE TRANSLATE command)
Stata Files (SAVE TRANSLATE command)
SPSS/PC+ System Files (SAVE TRANSLATE command)


Comma-Delimited (CSV) Text Files (SAVE TRANSLATE command)

data files,data files,data files
comma-delimited,comma-delimited,comma-delimited
comma-delimited files,comma-delimited files,comma-delimited files
CSV format,CSV format,CSV format
saving data,saving data,saving data

Variables in the active dataset become columns, and cases become rows in the text file.

• If you specify FIELDNAMES, variable names are written in the first row.

• To save value labels instead of data values, use the CELLS subcommand. See the topic CELLS Subcommand (SAVE TRANSLATE command) for more information.

• Use the TEXTOPTIONS subcommand to override the default delimiter, qualifier, decimal indicator, or data value formatting. See the topic TEXTOPTIONS Subcommand (SAVE TRANSLATE command) for more information.

• System-missing values are translated to a blank space in text files.

Note: Tab characters embedded in string values are preserved as tab characters in the tab-delimited file. No distinction is made between tab characters embedded in values and tab characters that separate values.

Related Topics

Operations (SAVE TRANSLATE command)
Spreadsheets (SAVE TRANSLATE command)
dBASE (SAVE TRANSLATE command)
Tab-Delimited Text Files (SAVE TRANSLATE command)
SAS Files (SAVE TRANSLATE command)
Stata Files (SAVE TRANSLATE command)
SPSS/PC+ System Files (SAVE TRANSLATE command)


Tab-Delimited Text Files (SAVE TRANSLATE command)

data files,data files,data files
tab-delimited,tab-delimited,tab-delimited
tab-delimited files,tab-delimited files,tab-delimited files
saving,saving,saving

Variables in the active dataset become columns, and cases become rows in the text file.

• If you specify FIELDNAMES, variable names are written to the first row.

• To save value labels instead of data values, use the CELLS subcommand. See the topic CELLS Subcommand (SAVE TRANSLATE command) for more information.

• Use the TEXTOPTIONS subcommand to override the default decimal indicator or data value formatting. See the topic TEXTOPTIONS Subcommand (SAVE TRANSLATE command) for more information.

• System-missing values are translated to a blank space in text files.

Related Topics

Operations (SAVE TRANSLATE command)
Spreadsheets (SAVE TRANSLATE command)
dBASE (SAVE TRANSLATE command)
Comma-Delimited (CSV) Text Files (SAVE TRANSLATE command)
SAS Files (SAVE TRANSLATE command)
Stata Files (SAVE TRANSLATE command)
SPSS/PC+ System Files (SAVE TRANSLATE command)


SAS Files (SAVE TRANSLATE command)

Data can be saved in numerous SAS data file formats. A SAS transport file is a sequential file that is written in SAS transport format and can be read by SAS with the XPORT engine and PROC COPY or the DATA step.

• Certain characters that are allowed in PASW Statistics variable names are not valid in SAS, such as @, #, and $. These illegal characters are replaced with an underscore when the data are exported.

• PASW Statistics variable names that contain multibyte characters (e.g., Japanese or Chinese characters) are converted to variable names of the general form Vnnn, where nnn is an integer value.

• PASW Statistics variable labels containing more than 40 characters are truncated when exported to a SAS v6 file.

• Where they exist, PASW Statistics variable labels are mapped to the SAS variable labels. If no variable label exists in the PASW Statistics data, the variable name is mapped to the SAS variable label.

• SAS allows only one value for missing, whereas PASW Statistics allows the definition of numerous missing values. As a result, all missing values in PASW Statistics are mapped to a single missing value in the SAS file.

• SAS 6-8 data files are saved in the current PASW Statistics locale encoding, regardless of current mode (Unicode or code page). In Unicode mode, SAS 9 files are saved in UTF-8 format. In code page mode, SAS 9 files are saved in the current locale encoding. For more information on locale, see SET LOCALE. For more information on Unicode mode, see SET UNICODE.

The following table shows the variable type matching between the original data in PASW Statistics and the exported data in SAS.

PASW Statistics Variable Type | SAS Variable Type | SAS Data Format
Numeric | Numeric | 12
Comma | Numeric | 12
Dot | Numeric | 12
Scientific Notation | Numeric | 12
Date | Numeric | Date
Date (Time) | Numeric | Time
Date (Date-Time) | Numeric | DateTime
Dollar | Numeric | 12
Custom Currency | Numeric | 12
String | Character | $8

Related Topics

Operations (SAVE TRANSLATE command)
Spreadsheets (SAVE TRANSLATE command)
dBASE (SAVE TRANSLATE command)
Comma-Delimited (CSV) Text Files (SAVE TRANSLATE command)
Tab-Delimited Text Files (SAVE TRANSLATE command)
Stata Files (SAVE TRANSLATE command)
SPSS/PC+ System Files (SAVE TRANSLATE command)


Stata Files (SAVE TRANSLATE command)

Stata files,Stata files,Stata files
saving,saving,saving

• Data can be written in Stata 5–8 format and in both Intercooled and SE format (versions 7 and 8 only).

• Data files that are saved in Stata 5 format can be read by Stata 4.

• The first 80 bytes of variable labels are saved as Stata variable labels.

• For numeric variables, the first 80 bytes of value labels are saved as Stata value labels. Value labels are dropped for string variables, non-integer numeric values, and numeric values greater than an absolute value of 2,147,483,647.

• For versions 7 and 8, the first 32 bytes of variable names in case-sensitive form are saved as Stata variable names. For earlier versions, the first eight bytes of variable names are saved as Stata variable names. Any characters other than letters, numbers, and underscores are converted to underscores.

• PASW Statistics variable names that contain multibyte characters (for example, Japanese or Chinese characters) are converted to variable names of the general form Vnnn, where nnn is an integer value.

• For versions 5–6 and Intercooled versions 7–8, the first 80 bytes of string values are saved. For Stata SE 7–8, the first 244 bytes of string values are saved.

• For versions 5–6 and Intercooled versions 7–8, only the first 2,047 variables are saved. For Stata SE 7–8, only the first 32,767 variables are saved.

PASW Statistics Variable Type | Stata Variable Type | Stata Data Format
Numeric | Numeric | g
Comma | Numeric | g
Dot | Numeric | g
Scientific Notation | Numeric | g
Date*, Datetime | Numeric | D_m_Y
Time, DTime | Numeric | g (number of seconds)
Wkday | Numeric | g (1–7)
Month | Numeric | g (1–12)
Dollar | Numeric | g
Custom Currency | Numeric | g
String | String | s

*Date, Adate, Edate, SDate, Jdate, Qyr, Moyr, Wkyr

Related Topics

Operations (SAVE TRANSLATE command)
Spreadsheets (SAVE TRANSLATE command)
dBASE (SAVE TRANSLATE command)
Comma-Delimited (CSV) Text Files (SAVE TRANSLATE command)
Tab-Delimited Text Files (SAVE TRANSLATE command)
SAS Files (SAVE TRANSLATE command)
SPSS/PC+ System Files (SAVE TRANSLATE command)


SPSS/PC+ System Files (SAVE TRANSLATE command)

Variables are saved as they are defined. The resulting file is given the extension .sys if no extension is explicitly specified. The dictionary is saved so that labels, formats, missing value specifications, and other dictionary information are preserved. This format is available only on Windows operating systems.

Related Topics

Operations (SAVE TRANSLATE command)
Spreadsheets (SAVE TRANSLATE command)
dBASE (SAVE TRANSLATE command)
Comma-Delimited (CSV) Text Files (SAVE TRANSLATE command)
Tab-Delimited Text Files (SAVE TRANSLATE command)
SAS Files (SAVE TRANSLATE command)
Stata Files (SAVE TRANSLATE command)


ODBC Database Sources (SAVE TRANSLATE command)

databases,databases,databases
saving,saving,saving

The following rules apply when writing to a database with TYPE=ODBC:

• If you specify a table name that does not exist in the database, a new table with that name is created.

• If any case cannot be stored in the database for any reason, an error is returned. Therefore, either all cases are stored or no cases are stored.

• At insert time, a check is performed to see whether the value that is being stored in a column is likely to cause an overflow. If so, the user is warned about the overflow and is informed that a SYSMIS is stored instead.

• If any variable names in the active dataset contain characters that are not allowed by the database, they are replaced by an underscore. If this process causes a duplicate variable name, a new variable name is generated.

By default, PASW Statistics variable formats are mapped to database field types based on the following general scheme. Actual database field types may vary, depending on the database.

PASW Statistics Variable Format | Database Field Type
Numeric | Float or Double
Comma | Float or Double
Dot | Float or Double
Scientific Notation | Float or Double
Date | Date or Datetime or Timestamp
Datetime | Datetime or Timestamp
Time, DTime | Float or Double (number of seconds)
Wkday | Integer (1–7)
Month | Integer (1–12)
Dollar | Float or Double
Custom Currency | Float or Double
String | Char or Varchar

• For database Datetime/Timestamp formats that don't allow fractional seconds, fraction seconds in PASW Statistics Datetime values are truncated.

• The default width of Char database data types for PASW Statistics string variables is the defined width of the string variable. If the defined width of the string exceeds the maximum width allowed by the database, the values are truncated to the maximum width, and a warning is issued.

• You can override the default settings by using the SQL subcommand to create or update tables. See the topic SQL Subcommand (SAVE TRANSLATE command) for more information.

Related Topics

TYPE Subcommand (SAVE TRANSLATE command)


TYPE Subcommand (SAVE TRANSLATE command)

SAVE TRANSLATE (command),SAVE TRANSLATE (command),SAVE TRANSLATE (command)
TYPE subcommand,TYPE subcommand,TYPE subcommand
TYPE (subcommand),TYPE (subcommand),TYPE (subcommand)
SAVE TRANSLATE command,SAVE TRANSLATE command,SAVE TRANSLATE command

TYPE indicates the format of the resulting file.

• TYPE can be omitted for spreadsheet files if the file extension that is named on OUTFILE is the default for the type of file that you are saving.

• TYPE with the keyword DB2, DB3, or DB4 is required for translating to dBASE files.

• TYPE takes precedence over the file extension.

STATA (keyword),STATA (keyword),STATA (keyword)
SAVE TRANSLATE command,SAVE TRANSLATE command,SAVE TRANSLATE command
Lotus 1-2-3 files,Lotus 1-2-3 files,Lotus 1-2-3 files
WK1 (keyword),WK1 (keyword),WK1 (keyword)
SAVE TRANSLATE command,SAVE TRANSLATE command,SAVE TRANSLATE command
WKS (keyword),WKS (keyword),WKS (keyword)
SAVE TRANSLATE command,SAVE TRANSLATE command,SAVE TRANSLATE command
SYM (keyword),SYM (keyword),SYM (keyword)
SAVE TRANSLATE command,SAVE TRANSLATE command,SAVE TRANSLATE command
Multiplan files,Multiplan files,Multiplan files
saving,saving,saving
SYLK files,SYLK files,SYLK files
saving,saving,saving
SLK (keyword),SLK (keyword),SLK (keyword)
SAVE TRANSLATE command,SAVE TRANSLATE command,SAVE TRANSLATE command
Excel files,Excel files,Excel files
saving,saving,saving
XLS (keyword),XLS (keyword),XLS (keyword)
SAVE TRANSLATE command,SAVE TRANSLATE command,SAVE TRANSLATE command
dBASE files,dBASE files,dBASE files
saving,saving,saving
DB2 (keyword),DB2 (keyword),DB2 (keyword)
SAVE TRANSLATE command,SAVE TRANSLATE command,SAVE TRANSLATE command
DB3 (keyword),DB3 (keyword),DB3 (keyword)
SAVE TRANSLATE command,SAVE TRANSLATE command,SAVE TRANSLATE command
DB4 (keyword),DB4 (keyword),DB4 (keyword)
SAVE TRANSLATE command,SAVE TRANSLATE command,SAVE TRANSLATE command
tab-delimited files,tab-delimited files,tab-delimited files
saving,saving,saving
TAB (keyword),TAB (keyword),TAB (keyword)
SAVE TRANSLATE command,SAVE TRANSLATE command,SAVE TRANSLATE command
SPSS/PC+ files,SPSS/PC+ files,SPSS/PC+ files
saving,saving,saving
SAS (keyword),SAS (keyword),SAS (keyword)
SAVE TRANSLATE command,SAVE TRANSLATE command,SAVE TRANSLATE command
ODBC | Database accessed via ODBC.See the topic ODBC Database Sources (SAVE TRANSLATE command) for more information.
XLS | Excel.See the topic Spreadsheets (SAVE TRANSLATE command) for more information.
CSV | Comma-delimited text data files.See the topic Comma-Delimited (CSV) Text Files (SAVE TRANSLATE command) for more information.
TAB | Tab-delimited text data files.See the topic Tab-Delimited Text Files (SAVE TRANSLATE command) for more information.
SAS | SAS data files and SAS transport files.See the topic SAS Files (SAVE TRANSLATE command) for more information.
STATA | Stata data files.See the topic Stata Files (SAVE TRANSLATE command) for more information.
DB2 | dBASE II.See the topic dBASE (SAVE TRANSLATE command) for more information.
DB3 | dBASE III or dBASE III PLUS.See the topic dBASE (SAVE TRANSLATE command) for more information.
DB4 | dBASE IV.See the topic dBASE (SAVE TRANSLATE command) for more information.
WK1 | 1-2-3 Release 2.0.See the topic Spreadsheets (SAVE TRANSLATE command) for more information.
WKS | 1-2-3 Release 1.4.See the topic Spreadsheets (SAVE TRANSLATE command) for more information.
SYM | Symphony releases.See the topic Spreadsheets (SAVE TRANSLATE command) for more information.
SLK | Multiplan (symbolic format).See the topic Spreadsheets (SAVE TRANSLATE command) for more information.
PC | SPSS/PC+ system files. This format is available only on Windows operating systems. See the topic SPSS/PC+ System Files (SAVE TRANSLATE command) for more information.

Example

SAVE TRANSLATE OUTFILE='PROJECT.XLS' /TYPE=XLS (/VERSION=8).

• SAVE TRANSLATE translates the active dataset into the Excel workbook file named PROJECT.XLS.

Related Topics

SAVE TRANSLATE
Overview (SAVE TRANSLATE command)
Operations (SAVE TRANSLATE command)
VERSION Subcommand (SAVE TRANSLATE command)
OUTFILE Subcommand (SAVE TRANSLATE command)
FIELDNAMES Subcommand (SAVE TRANSLATE command)
CELLS Subcommand (SAVE TRANSLATE command)
TEXTOPTIONS Subcommand (SAVE TRANSLATE command)
EDITION Subcommand (SAVE TRANSLATE command)
PLATFORM Subcommand (SAVE TRANSLATE command)
VALFILE Subcommand (SAVE TRANSLATE command)
ODBC Database Subcommands
REPLACE Subcommand (SAVE TRANSLATE command)
UNSELECTED Subcommand (SAVE TRANSLATE command)
DROP and KEEP Subcommands (SAVE TRANSLATE command)
RENAME Subcommand (SAVE TRANSLATE command)
MISSING Subcommand (SAVE TRANSLATE command)
MAP Subcommand (SAVE TRANSLATE command)
ODBC Database Sources (SAVE TRANSLATE command)


VERSION Subcommand (SAVE TRANSLATE command)

SAVE TRANSLATE (command),SAVE TRANSLATE (command),SAVE TRANSLATE (command)
VERSION subcommand,VERSION subcommand,VERSION subcommand

VERSION specifies the file version for multiversion applications. For example, this subcommand is necessary to differentiate between different versions of Excel.

• VERSION is required for all applications listed below, except Excel.

• If VERSION is not specified with TYPE=XLS, the Excel file is saved in version 2.1 format.

Version | Application
1 | Symphony Release 1.0
2 | Excel 2.1, Symphony Release 2.0, dBASE II
3 | dBASE III or dBASE III PLUS
4 | dBASE IV
5 | Excel 95 Workbook, Stata 4–5
6 | SAS v6, Stata 6
7 | SAS v7–8, Stata 7
8 | Excel 97–2003 Workbook, Stata 8
9 | SAS 9
12 | Excel 2007 Workbook
X | SAS transport file

Example

SAVE TRANSLATE OUTFILE='STAFF.XLS' /TYPE=XLS /VERSION=8.

• SAVE TRANSLATE creates an Excel workbook file in the version 97 format.

Related Topics

SAVE TRANSLATE
Overview (SAVE TRANSLATE command)
Operations (SAVE TRANSLATE command)
TYPE Subcommand (SAVE TRANSLATE command)
OUTFILE Subcommand (SAVE TRANSLATE command)
FIELDNAMES Subcommand (SAVE TRANSLATE command)
CELLS Subcommand (SAVE TRANSLATE command)
TEXTOPTIONS Subcommand (SAVE TRANSLATE command)
EDITION Subcommand (SAVE TRANSLATE command)
PLATFORM Subcommand (SAVE TRANSLATE command)
VALFILE Subcommand (SAVE TRANSLATE command)
ODBC Database Subcommands
REPLACE Subcommand (SAVE TRANSLATE command)
UNSELECTED Subcommand (SAVE TRANSLATE command)
DROP and KEEP Subcommands (SAVE TRANSLATE command)
RENAME Subcommand (SAVE TRANSLATE command)
MISSING Subcommand (SAVE TRANSLATE command)
MAP Subcommand (SAVE TRANSLATE command)


OUTFILE Subcommand (SAVE TRANSLATE command)

SAVE TRANSLATE (command),SAVE TRANSLATE (command),SAVE TRANSLATE (command)
OUTFILE subcommand,OUTFILE subcommand,OUTFILE subcommand
OUTFILE (subcommand),OUTFILE (subcommand),OUTFILE (subcommand)
SAVE TRANSLATE command,SAVE TRANSLATE command,SAVE TRANSLATE command

OUTFILE assigns a name to the file to be saved. The only specification is the name of the file. On some operating systems, file specifications should be enclosed in quotes.

Example

SAVE TRANSLATE OUTFILE='STAFF.DBF'/TYPE=DB3.

• SAVE TRANSLATE creates a dBASE III file called STAFF.DBF. The TYPE subcommand is required to specify the type of dBASE file to save.

Related Topics

SAVE TRANSLATE
Overview (SAVE TRANSLATE command)
Operations (SAVE TRANSLATE command)
TYPE Subcommand (SAVE TRANSLATE command)
VERSION Subcommand (SAVE TRANSLATE command)
FIELDNAMES Subcommand (SAVE TRANSLATE command)
CELLS Subcommand (SAVE TRANSLATE command)
TEXTOPTIONS Subcommand (SAVE TRANSLATE command)
EDITION Subcommand (SAVE TRANSLATE command)
PLATFORM Subcommand (SAVE TRANSLATE command)
VALFILE Subcommand (SAVE TRANSLATE command)
ODBC Database Subcommands
REPLACE Subcommand (SAVE TRANSLATE command)
UNSELECTED Subcommand (SAVE TRANSLATE command)
DROP and KEEP Subcommands (SAVE TRANSLATE command)
RENAME Subcommand (SAVE TRANSLATE command)
MISSING Subcommand (SAVE TRANSLATE command)
MAP Subcommand (SAVE TRANSLATE command)


FIELDNAMES Subcommand (SAVE TRANSLATE command)

SAVE TRANSLATE (command),SAVE TRANSLATE (command),SAVE TRANSLATE (command)
FIELDNAMES subcommand,FIELDNAMES subcommand,FIELDNAMES subcommand
FIELDNAMES (subcommand),FIELDNAMES (subcommand),FIELDNAMES (subcommand)
SAVE TRANSLATE command,SAVE TRANSLATE command,SAVE TRANSLATE command

FIELDNAMES writes variable names to the first row in spreadsheets and tab-delimited and comma-delimited text files.

Example

SAVE TRANSLATE OUTFILE='/data/csvfile.csv' /TYPE=CSV /FIELDNAMES.

Related Topics

SAVE TRANSLATE
Overview (SAVE TRANSLATE command)
Operations (SAVE TRANSLATE command)
TYPE Subcommand (SAVE TRANSLATE command)
VERSION Subcommand (SAVE TRANSLATE command)
OUTFILE Subcommand (SAVE TRANSLATE command)
CELLS Subcommand (SAVE TRANSLATE command)
TEXTOPTIONS Subcommand (SAVE TRANSLATE command)
EDITION Subcommand (SAVE TRANSLATE command)
PLATFORM Subcommand (SAVE TRANSLATE command)
VALFILE Subcommand (SAVE TRANSLATE command)
ODBC Database Subcommands
REPLACE Subcommand (SAVE TRANSLATE command)
UNSELECTED Subcommand (SAVE TRANSLATE command)
DROP and KEEP Subcommands (SAVE TRANSLATE command)
RENAME Subcommand (SAVE TRANSLATE command)
MISSING Subcommand (SAVE TRANSLATE command)
MAP Subcommand (SAVE TRANSLATE command)


CELLS Subcommand (SAVE TRANSLATE command)

SAVE TRANSLATE (command),SAVE TRANSLATE (command),SAVE TRANSLATE (command)
CELLS subcommand,CELLS subcommand,CELLS subcommand
Excel files,Excel files,Excel files
saving,saving,saving
saving value labels instead of values,saving value labels instead of values,saving value labels instead of values
value labels,value labels,value labels
saving in Excel files,saving in Excel files,saving in Excel files

For TYPE=XLS (/VERSION=8), TYPE=TAB, and TYPE=CSV, the CELLS subcommand specifies whether data values or value labels are saved.

CELLS=VALUES. Saves data values. This is the default.

CELLS=LABELS. Saves value labels instead of values. For values with no corresponding value label, the value is saved.

Example

SAVE TRANSLATE OUTFILE='/data/sales.xls'
  /TYPE=XLS /VERSION=8
  /CELLS=LABELS.

Related Topics

SAVE TRANSLATE
Overview (SAVE TRANSLATE command)
Operations (SAVE TRANSLATE command)
TYPE Subcommand (SAVE TRANSLATE command)
VERSION Subcommand (SAVE TRANSLATE command)
OUTFILE Subcommand (SAVE TRANSLATE command)
FIELDNAMES Subcommand (SAVE TRANSLATE command)
TEXTOPTIONS Subcommand (SAVE TRANSLATE command)
EDITION Subcommand (SAVE TRANSLATE command)
PLATFORM Subcommand (SAVE TRANSLATE command)
VALFILE Subcommand (SAVE TRANSLATE command)
ODBC Database Subcommands
REPLACE Subcommand (SAVE TRANSLATE command)
UNSELECTED Subcommand (SAVE TRANSLATE command)
DROP and KEEP Subcommands (SAVE TRANSLATE command)
RENAME Subcommand (SAVE TRANSLATE command)
MISSING Subcommand (SAVE TRANSLATE command)
MAP Subcommand (SAVE TRANSLATE command)


TEXTOPTIONS Subcommand (SAVE TRANSLATE command)

SAVE TRANSLATE (command),SAVE TRANSLATE (command),SAVE TRANSLATE (command)
TEXTOPTIONS subcommand,TEXTOPTIONS subcommand,TEXTOPTIONS subcommand
CSV format,CSV format,CSV format
saving data,saving data,saving data

For TYPE=CSV, the TEXTOPTIONS subcommand controls the delimiter and qualifier. For TYPE=CSV and TYPE=TAB, it controls the decimal indicator and the data value formatting. For all other types, this subcommand is ignored.

DELIMITER="char". Specifies the delimiter (separator) between values. The value must be a single character (single byte), enclosed in quotes (single or double quotes). The default is either a comma or semicolon, based on the decimal indicator. If the decimal indicator is a period, then the default separator is a comma. If the decimal indicator is a comma, then the default separator is a semicolon. The value cannot be the same as the QUALIFIER or DECIMAL value. This setting only applies for TYPE=CSV. For other types, it is ignored.

QUALIFIER="char". Specifies the qualifier to use to enclose values that contain the delimiter character. The default is a double quote. The value must be a single character (single byte), enclosed in quotes (single or double quotes). Values that contain the qualifier character will also be enclosed by the qualifier and qualifiers within the value will be doubled. The value cannot be the same as the DELIMITER or DECIMAL value. This setting only applies for TYPE=CSV. For other types, it is ignored.

DECIMAL=DOT|COMMA. Specifies the value to use as the decimal indicator for numeric values. The default is the current PASW Statistics decimal indicator. This setting has no effect on the decimal indicator used with FORMAT=VARIABLE for comma, dollar, custom currency, and dot formats. (Comma, dollar, and custom currency always use the period as the decimal indicator; dot always uses the comma as the decimal indicator.) The value cannot be the same as the DELIMITER or QUALIFER value. (If DECIMAL=DOT, the default delimiter is a comma; if DECIMAL=COMMA, the default delimiter is a semicolon.)

• DOT. Use a period (.) as the decimal indicator.

• COMMA. Use a comma (,) as the decimal indicator.

The default decimal indicator is the current PASW Statistics decimal indicator. The current PASW Statistics decimal indicator can be set with SET LOCALE (which uses the OS locale decimal indicator) or SET DECIMAL and can be shown with SHOW DECIMAL. The TEXTOPTIONS DECIMAL setting overrides the default decimal indicator in the current SAVE TRANSLATE command but does not change the default/current PASW Statistics decimal indicator, and it has no effect on the determination of the default delimiter for TYPE=CSV.

FORMAT=PLAIN|VARIABLE. Specifies the data formats to use when writing out data values.

• PLAIN. Remove all "extraneous" formatting from numeric values. This is the default. For example, a dollar format value of $12,345.67 is written simply as 12345.67 (or 12345,67, depending on the decimal indicator). The number of decimal positions for each value is the number of decimal positions necessary to preserve the entire value (and different values of the same variable may have a different number of decimal positions). Dates are written in the general format mm/dd/yyyy. Times are written in the general format hh:mm:ss.

• VARIABLE. Use the print format for each variable to write data values. For example, a value of 12345.67 with a print format of DOLLAR10.2 is written as $12,345.67 (and is qualified with double quotes or the user-specified qualifier if a comma is the value delimiter).

Print formats can be set with the PRINT FORMATS or FORMATS commands and displayed with DISPLAY DICTIONARY.

Related Topics

SAVE TRANSLATE
Overview (SAVE TRANSLATE command)
Operations (SAVE TRANSLATE command)
TYPE Subcommand (SAVE TRANSLATE command)
VERSION Subcommand (SAVE TRANSLATE command)
OUTFILE Subcommand (SAVE TRANSLATE command)
FIELDNAMES Subcommand (SAVE TRANSLATE command)
CELLS Subcommand (SAVE TRANSLATE command)
EDITION Subcommand (SAVE TRANSLATE command)
PLATFORM Subcommand (SAVE TRANSLATE command)
VALFILE Subcommand (SAVE TRANSLATE command)
ODBC Database Subcommands
REPLACE Subcommand (SAVE TRANSLATE command)
UNSELECTED Subcommand (SAVE TRANSLATE command)
DROP and KEEP Subcommands (SAVE TRANSLATE command)
RENAME Subcommand (SAVE TRANSLATE command)
MISSING Subcommand (SAVE TRANSLATE command)
MAP Subcommand (SAVE TRANSLATE command)


EDITION Subcommand (SAVE TRANSLATE command)

SAVE TRANSLATE (command),SAVE TRANSLATE (command),SAVE TRANSLATE (command)
EDITION subcommand,EDITION subcommand,EDITION subcommand
EDITION (subcommand),EDITION (subcommand),EDITION (subcommand)
SAVE TRANSLATE command,SAVE TRANSLATE command,SAVE TRANSLATE command
INTERCOOLED (keyword),INTERCOOLED (keyword),INTERCOOLED (keyword)
SAVE TRANSLATE command,SAVE TRANSLATE command,SAVE TRANSLATE command
SE (keyword),SE (keyword),SE (keyword)
SAVE TRANSLATE command,SAVE TRANSLATE command,SAVE TRANSLATE command

The EDITION subcommand specifies the edition for Stata files. EDITION only applies to Stata version 7 or later.

INTERCOOLED | Saves the data file in Stata Intercooled format. This setting is the default. Only the first 2,047 variables are saved, and only the first 80 bytes of string values are saved.
SE | Saves the data file in Stata SE format. The first 32,767 variables are saved, and the first 244 bytes of string values are saved.

Example

SAVE TRANSLATE OUTFILE='/data/newdata.dta' /TYPE=STATA
  /VERSION=8 /EDITION=SE.

This subcommand is ignored for any file types other than Stata version 7 or later.

Related Topics

SAVE TRANSLATE
Overview (SAVE TRANSLATE command)
Operations (SAVE TRANSLATE command)
TYPE Subcommand (SAVE TRANSLATE command)
VERSION Subcommand (SAVE TRANSLATE command)
OUTFILE Subcommand (SAVE TRANSLATE command)
FIELDNAMES Subcommand (SAVE TRANSLATE command)
CELLS Subcommand (SAVE TRANSLATE command)
TEXTOPTIONS Subcommand (SAVE TRANSLATE command)
PLATFORM Subcommand (SAVE TRANSLATE command)
VALFILE Subcommand (SAVE TRANSLATE command)
ODBC Database Subcommands
REPLACE Subcommand (SAVE TRANSLATE command)
UNSELECTED Subcommand (SAVE TRANSLATE command)
DROP and KEEP Subcommands (SAVE TRANSLATE command)
RENAME Subcommand (SAVE TRANSLATE command)
MISSING Subcommand (SAVE TRANSLATE command)
MAP Subcommand (SAVE TRANSLATE command)


PLATFORM Subcommand (SAVE TRANSLATE command)

SAVE TRANSLATE (command),SAVE TRANSLATE (command),SAVE TRANSLATE (command)
PLATFORM subcommand,PLATFORM subcommand,PLATFORM subcommand

The PLATFORM subcommand is required for all SAS file types, with the exception of SAS transport files. Enter the keyword corresponding to the platform for which the target SAS file is intended. There is no default value for this command. Choose from the following keywords: WINDOWS, ALPHA, UNIX.

Example

SAVE TRANSLATE OUTFILE='STAFF.SD7' /TYPE=SAS /VERSION=7
/PLATFORM=WINDOWS /VALFILE='LABELS.SAS'.

Related Topics

SAVE TRANSLATE
Overview (SAVE TRANSLATE command)
Operations (SAVE TRANSLATE command)
TYPE Subcommand (SAVE TRANSLATE command)
VERSION Subcommand (SAVE TRANSLATE command)
OUTFILE Subcommand (SAVE TRANSLATE command)
FIELDNAMES Subcommand (SAVE TRANSLATE command)
CELLS Subcommand (SAVE TRANSLATE command)
TEXTOPTIONS Subcommand (SAVE TRANSLATE command)
EDITION Subcommand (SAVE TRANSLATE command)
VALFILE Subcommand (SAVE TRANSLATE command)
ODBC Database Subcommands
REPLACE Subcommand (SAVE TRANSLATE command)
UNSELECTED Subcommand (SAVE TRANSLATE command)
DROP and KEEP Subcommands (SAVE TRANSLATE command)
RENAME Subcommand (SAVE TRANSLATE command)
MISSING Subcommand (SAVE TRANSLATE command)
MAP Subcommand (SAVE TRANSLATE command)


VALFILE Subcommand (SAVE TRANSLATE command)

SAVE TRANSLATE (command),SAVE TRANSLATE (command),SAVE TRANSLATE (command)
VALFILE subcommand,VALFILE subcommand,VALFILE subcommand

The VALFILE subcommand, which is available only for SAS file formats, excluding the SAS transport file format, saves value labels to a SAS syntax file. This syntax file is used in conjunction with the saved SAS data file to re-create value labels in SAS.

• The syntax file has an .sas file extension.

Example

SAVE TRANSLATE OUTFILE='STAFF.SD7' /TYPE=SAS /VERSION=7
/PLATFORM=WINDOWS /VALFILE='LABELS.SAS'.

• SAVE TRANSLATE saves the current data as a SAS v7 file and creates a SAS syntax file named LABELS.SAS, which contains the value labels for the data.

Related Topics

SAVE TRANSLATE
Overview (SAVE TRANSLATE command)
Operations (SAVE TRANSLATE command)
TYPE Subcommand (SAVE TRANSLATE command)
VERSION Subcommand (SAVE TRANSLATE command)
OUTFILE Subcommand (SAVE TRANSLATE command)
FIELDNAMES Subcommand (SAVE TRANSLATE command)
CELLS Subcommand (SAVE TRANSLATE command)
TEXTOPTIONS Subcommand (SAVE TRANSLATE command)
EDITION Subcommand (SAVE TRANSLATE command)
PLATFORM Subcommand (SAVE TRANSLATE command)
ODBC Database Subcommands
REPLACE Subcommand (SAVE TRANSLATE command)
UNSELECTED Subcommand (SAVE TRANSLATE command)
DROP and KEEP Subcommands (SAVE TRANSLATE command)
RENAME Subcommand (SAVE TRANSLATE command)
MISSING Subcommand (SAVE TRANSLATE command)
MAP Subcommand (SAVE TRANSLATE command)


ODBC Database Subcommands

The CONNECT, ENCRYPTED, TABLE, SQL, and APPEND subcommands are used with TYPE=ODBC.

Related Topics

CONNECT Subcommand (SAVE TRANSLATE command)
ENCRYPTED and UNENCRYPTED Subcommands
TABLE Subcommand (SAVE TRANSLATE command)
SQL Subcommand (SAVE TRANSLATE command)
APPEND Subcommand (SAVE TRANSLATE command)
SAVE TRANSLATE
Overview (SAVE TRANSLATE command)
Operations (SAVE TRANSLATE command)
TYPE Subcommand (SAVE TRANSLATE command)
VERSION Subcommand (SAVE TRANSLATE command)
OUTFILE Subcommand (SAVE TRANSLATE command)
FIELDNAMES Subcommand (SAVE TRANSLATE command)
CELLS Subcommand (SAVE TRANSLATE command)
TEXTOPTIONS Subcommand (SAVE TRANSLATE command)
EDITION Subcommand (SAVE TRANSLATE command)
PLATFORM Subcommand (SAVE TRANSLATE command)
VALFILE Subcommand (SAVE TRANSLATE command)
REPLACE Subcommand (SAVE TRANSLATE command)
UNSELECTED Subcommand (SAVE TRANSLATE command)
DROP and KEEP Subcommands (SAVE TRANSLATE command)
RENAME Subcommand (SAVE TRANSLATE command)
MISSING Subcommand (SAVE TRANSLATE command)
MAP Subcommand (SAVE TRANSLATE command)


CONNECT Subcommand (SAVE TRANSLATE command)

SAVE TRANSLATE (command),SAVE TRANSLATE (command),SAVE TRANSLATE (command)
CONNECT subcommand,CONNECT subcommand,CONNECT subcommand
CONNECT (subcommand),CONNECT (subcommand),CONNECT (subcommand)
SAVE TRANSLATE command,SAVE TRANSLATE command,SAVE TRANSLATE command

CONNECT identifies the database name and other parameters for TYPE=ODBC.

• The database must already exist. You cannot create a new database with SAVE TRANSLATE (although you can create new tables in an existing database).

• If you are unsure what the connect string should be, you can use the Export to Database Wizard to generate SAVE TRANSLATE command syntax. (See Export to Database Wizard for more information.) If the connection string is specified on multiple lines, each line must be enclosed in quotes.

Example

SAVE TRANSLATE
   /TYPE=ODBC
   /CONNECT
   'DSN=MS Access Database;DBQ=C:\examples\data\dm_demo.mdb;'
   'DriverId=25;FIL=MS Access;MaxBufferSize=2048;PageTimeout=5;'
   /TABLE='mytable'.

Related Topics

ODBC Database Subcommands
ENCRYPTED and UNENCRYPTED Subcommands
TABLE Subcommand (SAVE TRANSLATE command)
SQL Subcommand (SAVE TRANSLATE command)
APPEND Subcommand (SAVE TRANSLATE command)


ENCRYPTED and UNENCRYPTED Subcommands

password encryption,password encryption,password encryption
databases,databases,databases
databases,databases,databases
password encryption,password encryption,password encryption
SAVE TRANSLATE (command),SAVE TRANSLATE (command),SAVE TRANSLATE (command)
ENCRYPTED subcommand,ENCRYPTED subcommand,ENCRYPTED subcommand
UNENCRYPTED subcommand,UNENCRYPTED subcommand,UNENCRYPTED subcommand
ENCRYPTED (subcommand),ENCRYPTED (subcommand),ENCRYPTED (subcommand)
SAVE TRANSLATE command,SAVE TRANSLATE command,SAVE TRANSLATE command
UNENCRYPTED (subcommand),UNENCRYPTED (subcommand),UNENCRYPTED (subcommand)
SAVE TRANSLATE command,SAVE TRANSLATE command,SAVE TRANSLATE command

The ENCRYPTED subcommand indicates that the password in the CONNECT string is encrypted. The default is UNENCRYPTED. (Both the Database Wizard and Export to Database Wizard generate encrypted passwords.)

The ENCRYPTED and UNENCRYPTED subcommands have no additional specifications.

Related Topics

ODBC Database Subcommands
CONNECT Subcommand (SAVE TRANSLATE command)
TABLE Subcommand (SAVE TRANSLATE command)
SQL Subcommand (SAVE TRANSLATE command)
APPEND Subcommand (SAVE TRANSLATE command)


TABLE Subcommand (SAVE TRANSLATE command)

SAVE TRANSLATE (command),SAVE TRANSLATE (command),SAVE TRANSLATE (command)
TABLE subcommand,TABLE subcommand,TABLE subcommand
TABLE (subcommand),TABLE (subcommand),TABLE (subcommand)
SAVE TRANSLATE command,SAVE TRANSLATE command,SAVE TRANSLATE command

TABLE identifies the table name for TYPE=ODBC.

• Table names should be enclosed in quotes.

• You can replace an existing table or append new records to an existing table.

• You can create a new table in the database by specifying a table name that does not currently exist in the database.

Example

SAVE TRANSLATE
   /TYPE=ODBC
   /CONNECT
   'DSN=MS Access Database;DBQ=C:\examples\data\dm_demo.mdb;'
   'DriverId=25;FIL=MS Access;MaxBufferSize=2048;PageTimeout=5;'
   /TABLE='mytable'.

Related Topics

ODBC Database Subcommands
CONNECT Subcommand (SAVE TRANSLATE command)
ENCRYPTED and UNENCRYPTED Subcommands
SQL Subcommand (SAVE TRANSLATE command)
APPEND Subcommand (SAVE TRANSLATE command)


SQL Subcommand (SAVE TRANSLATE command)

SAVE TRANSLATE (command),SAVE TRANSLATE (command),SAVE TRANSLATE (command)
SQL subcommand,SQL subcommand,SQL subcommand
SQL (subcommand),SQL (subcommand),SQL (subcommand)
SAVE TRANSLATE command,SAVE TRANSLATE command,SAVE TRANSLATE command
databases,databases,databases
updating,updating,updating
saving,saving,saving
adding columns to database tables,adding columns to database tables,adding columns to database tables
updating database tables,updating database tables,updating database tables

The SQL subcommand provides the ability to issue any SQL directives that are needed in the target database. It can be used, for example, to define joins or alter table properties in the database to include new columns or modify column properties.

• Each SQL statement must be enclosed in quotes.

• You can use multiple lines for a single SQL statement by using multiple quoted strings connected with plus signs (the standard string concatenation symbol).

• Each quoted line cannot exceed 256 characters.

• Multiple SQL statements can be included by using multiple SQL subcommands.

• Table and field specifications in SQL statements refer to tables and fields available in the database, not datasets and variables available in the PASW Statistics session (although in many cases the names may be the same).

• Regardless of the position of the SQL subcommand, the SQL statements are executed last, after all other actions executed by the SAVE TRANSLATE command.

Example: Adding New Columns to an Existing Table

SAVE TRANSLATE /TYPE=ODBC
 /CONNECT=
 'DSN=MS Access Database;DBQ=C:\examples\data\dm_demo.mdb;'
 'DriverId=25;FIL=MS Access;MaxBufferSize=2048;PageTimeout=5;'
  /TABLE = 'NewColumn'
  /KEEP ID income_score
  /REPLACE
  /SQL='ALTER TABLE CombinedTable ADD COLUMN income_score REAL'
  /SQL='UPDATE CombinedTable INNER JOIN NewColumn ON ' +
  'CombinedTable.ID=NewColumn.ID SET ' +
  'CombinedTable.income_score=NewColumn.income_score'.

• The TABLE, KEEP, and REPLACE subcommands create or replace a table named NewColumn that contains two variables: a key variable (ID) and a computed score (income_score).

• The first SQL subcommand, specified on a single line, adds a column to an existing table that will contain values of the computed variable income_score. At this point, all we have done is create an empty column in the existing database table, and the fact that both database tables and the active dataset use the same name for that column is merely a convenience for simplicity and clarity.

• The second SQL subcommand, specified on multiple lines with the quoted strings concatenated with plus signs, adds the income_score values from the new table to the existing table, matching rows (cases) based on the value of the key variable ID.

The end result is that an existing table is modified to include a new column containing the values of the computed variable.

Example: Specifying Data Types for a New Table

SAVE TRANSLATE /TYPE=ODBC
  /CONNECT='DSN=MS Access Database;DBQ=c:\temp\temp.mdb;DriverId=25;FIL=MS'+
  ' Access;MaxBufferSize=2048;PageTimeout=5;'
  /TABLE=tempTable    /REPLACE
  /SQL='CREATE TABLE NewTable(numVar double, intVar integer, dollarVar currency)'
  /SQL='INSERT INTO NewTable(numVar, intVar, dollarVar) SELECT * FROM tempTable'
  /SQL='DROP TABLE tempTable'.

• The TABLE subcommand creates a new table that contains variables in the active dataset with the default database data types. In this example, the original variables have PASW Statistics variable formats of F8.2, F4.0, and Dollar10.2 respectively, but the default database type for all three is double.

• The first SQL subcommand creates another new table with data types explicitly defined for each field. At this point, this new table contains no data.

• The second SQL subcommand inserts the data from the tempTable into NewTable. This does not affect the data types previously defined for NewTable, so intVar will have a data type of integer and dollarVar will have a data type of currency.

• The last SQL subcommand deletes tempTable, since it is no longer needed.

Related Topics

ODBC Database Subcommands
CONNECT Subcommand (SAVE TRANSLATE command)
ENCRYPTED and UNENCRYPTED Subcommands
TABLE Subcommand (SAVE TRANSLATE command)
APPEND Subcommand (SAVE TRANSLATE command)


APPEND Subcommand (SAVE TRANSLATE command)

APPEND (subcommand),APPEND (subcommand),APPEND (subcommand)
SAVE TRANSLATE command,SAVE TRANSLATE command,SAVE TRANSLATE command
SAVE TRANSLATE (command),SAVE TRANSLATE (command),SAVE TRANSLATE (command)
APPEND subcommand,APPEND subcommand,APPEND subcommand

APPEND appends rows (cases) to an existing database table after type and variable name validations. There must be a matching column in the table for each PASW Statistics variable. If a column that can correctly store a variable is not found, a failure is returned. If the table contains more columns than the number of PASW Statistics variables, the command still stores the data in the table. The variable names and column names must match exactly. A variable can be stored in a column as long as the column type is a type that can store values of the variable type. A column of any numeric type (short integer, integer, float, double, etc.) is valid for a numeric variable, and a column of any character type is valid for a string variable.

• APPEND is valid only for TYPE=ODBC.

• APPEND and REPLACE are mutually exclusive.

Note: APPEND can only add rows to a table, not columns. If you want to add columns (fields) to a database table, see the SQL subcommand.

Related Topics

ODBC Database Subcommands
CONNECT Subcommand (SAVE TRANSLATE command)
ENCRYPTED and UNENCRYPTED Subcommands
TABLE Subcommand (SAVE TRANSLATE command)
SQL Subcommand (SAVE TRANSLATE command)


REPLACE Subcommand (SAVE TRANSLATE command)

REPLACE (subcommand),REPLACE (subcommand),REPLACE (subcommand)
SAVE TRANSLATE command,SAVE TRANSLATE command,SAVE TRANSLATE command
SAVE TRANSLATE (command),SAVE TRANSLATE (command),SAVE TRANSLATE (command)
REPLACE subcommand,REPLACE subcommand,REPLACE subcommand

REPLACE gives permission to overwrite an existing file (or database table) of the same name. REPLACE takes no further specifications.

• SAVE TRANSLATE will not overwrite an existing file without an explicit REPLACE subcommand. The default behavior is to not overwrite.

• For database tables (TYPE=ODBC), APPEND and REPLACE are mutually exclusive.

Note: For database tables, REPLACE destroys an existing table and replaces it with the data written by the SAVE TRANSLATE command, which may lead to loss of database-specific information, such as the designation of key variables (fields) and data formats. If you want to update an existing table with new values in some existing rows or by adding additional fields to the table, see the SQL subcommand.

Related Topics

SAVE TRANSLATE
Overview (SAVE TRANSLATE command)
Operations (SAVE TRANSLATE command)
TYPE Subcommand (SAVE TRANSLATE command)
VERSION Subcommand (SAVE TRANSLATE command)
OUTFILE Subcommand (SAVE TRANSLATE command)
FIELDNAMES Subcommand (SAVE TRANSLATE command)
CELLS Subcommand (SAVE TRANSLATE command)
TEXTOPTIONS Subcommand (SAVE TRANSLATE command)
EDITION Subcommand (SAVE TRANSLATE command)
PLATFORM Subcommand (SAVE TRANSLATE command)
VALFILE Subcommand (SAVE TRANSLATE command)
ODBC Database Subcommands
UNSELECTED Subcommand (SAVE TRANSLATE command)
DROP and KEEP Subcommands (SAVE TRANSLATE command)
RENAME Subcommand (SAVE TRANSLATE command)
MISSING Subcommand (SAVE TRANSLATE command)
MAP Subcommand (SAVE TRANSLATE command)


UNSELECTED Subcommand (SAVE TRANSLATE command)

SAVE TRANSLATE (command),SAVE TRANSLATE (command),SAVE TRANSLATE (command)
UNSELECTED subcommand,UNSELECTED subcommand,UNSELECTED subcommand
UNSELECTED (subcommand),UNSELECTED (subcommand),UNSELECTED (subcommand)
SAVE TRANSLATE command,SAVE TRANSLATE command,SAVE TRANSLATE command

UNSELECTED determines whether cases that were excluded on a previous FILTER or USE command are to be retained or deleted. The default is RETAIN. The UNSELECTED subcommand has no effect when the active dataset does not contain unselected cases.

RETAIN | Retain the unselected cases. All cases in the active dataset are saved. This setting is the default when UNSELECTED is specified by itself.
DELETE | Delete the unselected cases. Only cases that meet the FILTER or USE criteria are saved.

Related Topics

SAVE TRANSLATE
Overview (SAVE TRANSLATE command)
Operations (SAVE TRANSLATE command)
TYPE Subcommand (SAVE TRANSLATE command)
VERSION Subcommand (SAVE TRANSLATE command)
OUTFILE Subcommand (SAVE TRANSLATE command)
FIELDNAMES Subcommand (SAVE TRANSLATE command)
CELLS Subcommand (SAVE TRANSLATE command)
TEXTOPTIONS Subcommand (SAVE TRANSLATE command)
EDITION Subcommand (SAVE TRANSLATE command)
PLATFORM Subcommand (SAVE TRANSLATE command)
VALFILE Subcommand (SAVE TRANSLATE command)
ODBC Database Subcommands
REPLACE Subcommand (SAVE TRANSLATE command)
DROP and KEEP Subcommands (SAVE TRANSLATE command)
RENAME Subcommand (SAVE TRANSLATE command)
MISSING Subcommand (SAVE TRANSLATE command)
MAP Subcommand (SAVE TRANSLATE command)


DROP and KEEP Subcommands (SAVE TRANSLATE command)

SAVE TRANSLATE (command),SAVE TRANSLATE (command),SAVE TRANSLATE (command)
DROP subcommand,DROP subcommand,DROP subcommand
SAVE TRANSLATE (command),SAVE TRANSLATE (command),SAVE TRANSLATE (command)
KEEP subcommand,KEEP subcommand,KEEP subcommand
DROP (subcommand),DROP (subcommand),DROP (subcommand)
SAVE TRANSLATE command,SAVE TRANSLATE command,SAVE TRANSLATE command
KEEP (subcommand),KEEP (subcommand),KEEP (subcommand)
SAVE TRANSLATE command,SAVE TRANSLATE command,SAVE TRANSLATE command

Use DROP or KEEP to include only a subset of variables in the resulting file. DROP specifies a set of variables to exclude. KEEP specifies a set of variables to retain. Variables that are not specified on KEEP are dropped.

• Specify a list of variable, column, or field names separated by commas or spaces.

• KEEP does not affect the order of variables in the resulting file. Variables are kept in their original order.

• Specifying a variable that is not in the active dataset or that has been dropped because of a previous DROP or KEEP subcommand results in an error, and the SAVE command is not executed.

Example

SAVE TRANSLATE OUTFILE='ADDRESS.DBF' /TYPE=DB4 /DROP=PHONENO, ENTRY.

• SAVE TRANSLATE creates a dBASE IV file named ADDRESS.DBF, dropping the variables PHONENO and ENTRY.

Related Topics

SAVE TRANSLATE
Overview (SAVE TRANSLATE command)
Operations (SAVE TRANSLATE command)
TYPE Subcommand (SAVE TRANSLATE command)
VERSION Subcommand (SAVE TRANSLATE command)
OUTFILE Subcommand (SAVE TRANSLATE command)
FIELDNAMES Subcommand (SAVE TRANSLATE command)
CELLS Subcommand (SAVE TRANSLATE command)
TEXTOPTIONS Subcommand (SAVE TRANSLATE command)
EDITION Subcommand (SAVE TRANSLATE command)
PLATFORM Subcommand (SAVE TRANSLATE command)
VALFILE Subcommand (SAVE TRANSLATE command)
ODBC Database Subcommands
REPLACE Subcommand (SAVE TRANSLATE command)
UNSELECTED Subcommand (SAVE TRANSLATE command)
RENAME Subcommand (SAVE TRANSLATE command)
MISSING Subcommand (SAVE TRANSLATE command)
MAP Subcommand (SAVE TRANSLATE command)


RENAME Subcommand (SAVE TRANSLATE command)

RENAME (command),RENAME (command),RENAME (command)
SAVE TRANSLATE command,SAVE TRANSLATE command,SAVE TRANSLATE command
SAVE TRANSLATE (command),SAVE TRANSLATE (command),SAVE TRANSLATE (command)
RENAME subcommand,RENAME subcommand,RENAME subcommand

RENAME changes the names of variables as they are copied into the resulting file.

• The specification on RENAME is a list of old variable names followed by an equals sign and a list of new variable names. The same number of variables must be specified on both lists. The keyword TO can be used in the first list to refer to consecutive variables in the active dataset and can be in the second list to generate new variable names. The entire specification must be enclosed in parentheses.

• Alternatively, you can specify each old variable name individually, followed by an equals sign and the new variable name. Multiple sets of variable specifications are allowed. The parentheses around each set of specifications are optional.

• New names cannot exceed 64 bytes. Characters not allowed in PASW Statistics variable names can be used in new names for the target file, but if the name contains special characters (e.g., spaces, commas, slashes, plus signs) the name must be enclosed in quotes.

• RENAME does not affect the active dataset. However, if RENAME precedes DROP or KEEP, variables must be referred to by their new names on DROP or KEEP.

• Old variable names do not need to be specified according to their order in the active dataset.

• Name changes take place in one operation. Therefore, variable names can be exchanged between two variables.

• Multiple RENAME subcommands are allowed.

Examples

SAVE TRANSLATE OUTFILE='STAFF.SYM' VERSION=2 /FIELDNAMES
  /RENAME AGE=AGE88 JOBCAT=JOBCAT88.

• RENAME renames the variable AGE to AGE88 and renames JOBCAT to JOBCAT88 before they are copied to the first row of the spreadsheet.

SAVE TRANSLATE OUTFILE='STAFF.SYM' VERSION=2 /FIELDNAMES
  /RENAME (AGE JOBCAT=AGE88 JOBCAT88).

• The name changes are identical to the changes in the previous example: AGE is renamed to AGE88, and JOBCAT is renamed to JOBCAT88. The parentheses are required with this method.

Related Topics

SAVE TRANSLATE
Overview (SAVE TRANSLATE command)
Operations (SAVE TRANSLATE command)
TYPE Subcommand (SAVE TRANSLATE command)
VERSION Subcommand (SAVE TRANSLATE command)
OUTFILE Subcommand (SAVE TRANSLATE command)
FIELDNAMES Subcommand (SAVE TRANSLATE command)
CELLS Subcommand (SAVE TRANSLATE command)
TEXTOPTIONS Subcommand (SAVE TRANSLATE command)
EDITION Subcommand (SAVE TRANSLATE command)
PLATFORM Subcommand (SAVE TRANSLATE command)
VALFILE Subcommand (SAVE TRANSLATE command)
ODBC Database Subcommands
REPLACE Subcommand (SAVE TRANSLATE command)
UNSELECTED Subcommand (SAVE TRANSLATE command)
DROP and KEEP Subcommands (SAVE TRANSLATE command)
MISSING Subcommand (SAVE TRANSLATE command)
MAP Subcommand (SAVE TRANSLATE command)


MISSING Subcommand (SAVE TRANSLATE command)

SAVE TRANSLATE (command),SAVE TRANSLATE (command),SAVE TRANSLATE (command)
MISSING subcommand,MISSING subcommand,MISSING subcommand
MISSING (subcommand),MISSING (subcommand),MISSING (subcommand)
SAVE TRANSLATE command,SAVE TRANSLATE command,SAVE TRANSLATE command

The MISSING subcommand controls the treatment of user-missing values. By default, user-missing values are treated as regular valid values in the target file.

IGNORE | Treat user-missing values as regular valid values. This setting is the default.
RECODE | Recode numeric user-missing values to system-missing, and recode string user-missing values to blank spaces.

Related Topics

SAVE TRANSLATE
Overview (SAVE TRANSLATE command)
Operations (SAVE TRANSLATE command)
TYPE Subcommand (SAVE TRANSLATE command)
VERSION Subcommand (SAVE TRANSLATE command)
OUTFILE Subcommand (SAVE TRANSLATE command)
FIELDNAMES Subcommand (SAVE TRANSLATE command)
CELLS Subcommand (SAVE TRANSLATE command)
TEXTOPTIONS Subcommand (SAVE TRANSLATE command)
EDITION Subcommand (SAVE TRANSLATE command)
PLATFORM Subcommand (SAVE TRANSLATE command)
VALFILE Subcommand (SAVE TRANSLATE command)
ODBC Database Subcommands
REPLACE Subcommand (SAVE TRANSLATE command)
UNSELECTED Subcommand (SAVE TRANSLATE command)
DROP and KEEP Subcommands (SAVE TRANSLATE command)
RENAME Subcommand (SAVE TRANSLATE command)
MAP Subcommand (SAVE TRANSLATE command)


MAP Subcommand (SAVE TRANSLATE command)

SAVE TRANSLATE (command),SAVE TRANSLATE (command),SAVE TRANSLATE (command)
MAP subcommand,MAP subcommand,MAP subcommand
MAP (subcommand),MAP (subcommand),MAP (subcommand)
SAVE TRANSLATE command,SAVE TRANSLATE command,SAVE TRANSLATE command

MAP displays a list of the variables in the resulting file and their corresponding names in the active dataset.

• The only specification is the keyword MAP.

• Multiple MAP subcommands are allowed. Each MAP subcommand maps the results of subcommands that precede it but not the results of subcommands that follow it.

Example

GET FILE=HUBEMPL.
SAVE TRANSLATE OUTFILE='STAFF.SYM' /VERSION=2 /FIELDNAMES
  /RENAME=(AGE=AGE88)(JOBCAT=JOBCAT88).

• MAP is specified to confirm that the variable AGE is renamed to AGE88 and JOBCAT is renamed to JOBCAT88.

Related Topics

SAVE TRANSLATE
Overview (SAVE TRANSLATE command)
Operations (SAVE TRANSLATE command)
TYPE Subcommand (SAVE TRANSLATE command)
VERSION Subcommand (SAVE TRANSLATE command)
OUTFILE Subcommand (SAVE TRANSLATE command)
FIELDNAMES Subcommand (SAVE TRANSLATE command)
CELLS Subcommand (SAVE TRANSLATE command)
TEXTOPTIONS Subcommand (SAVE TRANSLATE command)
EDITION Subcommand (SAVE TRANSLATE command)
PLATFORM Subcommand (SAVE TRANSLATE command)
VALFILE Subcommand (SAVE TRANSLATE command)
ODBC Database Subcommands
REPLACE Subcommand (SAVE TRANSLATE command)
UNSELECTED Subcommand (SAVE TRANSLATE command)
DROP and KEEP Subcommands (SAVE TRANSLATE command)
RENAME Subcommand (SAVE TRANSLATE command)
MISSING Subcommand (SAVE TRANSLATE command)


SCRIPT

SCRIPT (command),SCRIPT (command),SCRIPT (command)
SCRIPT (command),SCRIPT (command),SCRIPT (command)
syntax chart,syntax chart,syntax chart
release history,release history,release history
SCRIPT 'filename' [(quoted string)]

This command takes effect immediately. It does not read the active dataset or execute pending transformations. See the topic Command Order for more information.

Release History Collapse Hide details

Release History

Release 16.0

• Scripts run from the SCRIPT command now run synchronously with the command syntax stream.

Release 17.0

• Ability to run Python scripts introduced.

Related Topics

Overview (SCRIPT command)
Running Basic Scripts That Contain Syntax Commands (SCRIPT command)


Overview (SCRIPT command)

SCRIPT runs a script to customize the program or automate regularly performed tasks. You can run a Basic script or a Python script.

Basic Specification

The basic specification is keyword SCRIPT with a filename. The filename is required. The optional quoted string, enclosed in parentheses, can be passed to the script.

Operations

• SCRIPT runs the specified script, and works in both local and distributed mode. The effect is the same as opening the script file in the script editor (Basic or Python) and running it from there.

Limitations

• Python scripts run from the SCRIPT command cannot execute command syntax.

• The SCRIPT command is not supported in the PASW Statistics Batch Facility (available with PASW Statistics Server).

Related Topics

SCRIPT
Running Basic Scripts That Contain Syntax Commands (SCRIPT command)


Running Basic Scripts That Contain Syntax Commands (SCRIPT command)

If a Basic script that is run via the SCRIPT command contains syntax commands, those commands must be run asynchronously. To run commands asynchronously, set the bSync parameter of the ExecuteCommands method to False, as in:

Dim objSpssApp As spsswinLib.Application16
Dim strCommands As String
Set objSpssApp=CreateObject("SPSS.Application16")

' Construct and execute syntax commands:

strCommands = "GET FILE = '/data/bank.sav'. " & vbCr
strCommands = strCommands & "Display Dictionary."
objSpssApp.ExecuteCommands strCommands, False

Related Topics

SCRIPT
Overview (SCRIPT command)


SEASON

SEASON (command),SEASON (command),SEASON (command)
SEASON (command),SEASON (command),SEASON (command)
syntax chart,syntax chart,syntax chart
Seasonal Decomposition,Seasonal Decomposition,Seasonal Decomposition
command syntax,command syntax,command syntax
seasonal factor estimates,seasonal factor estimates,seasonal factor estimates

SEASON is available in the Forecasting option.

SEASON VARIABLES= series names

 [/MODEL={MULTIPLICATIVE**}]
         {ADDITIVE        }

 [/MA={EQUAL   }]
      {CENTERED}

 [/PERIOD=n]

 [/APPLY [='model name']]

**Default if the subcommand is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See SEASON Algorithms for computational details for this procedure.

Syntax for the SEASON command can be generated from the Seasonal Decomposition dialog.

Example

SEASON VARIABLES = VARX
  /MODEL=ADDITIVE.

Related Topics

Overview (SEASON command)
VARIABLES Subcommand (SEASON command)
MODEL Subcommand (SEASON command)
MA Subcommand (SEASON command)
PERIOD Subcommand (SEASON command)
APPLY Subcommand (SEASON command)
References (SEASON command)
AREG
ARIMA
EXSMOOTH
FIT
SPECTRA
TSET
TSHOW
MODEL NAME
READ MODEL
SAVE MODEL
TDISPLAY


Overview (SEASON command)

SEASON estimates multiplicative or additive seasonal factors for time series by using any specified periodicity. SEASON is an implementation of the Census Method I, otherwise known as the ratio-to-moving-average method. See (Makridakis, Wheelwright, and McGee, 1983) and (McLaughlin, 1984).

Options Collapse Hide details

Options

Model Specification. You can specify either a multiplicative or additive model on the MODEL subcommand. You can specify the periodicity of the series on the PERIOD subcommand.

Computation Method. Two methods of computing moving averages are available on the MA subcommand for handling series with even periodicities.

Statistical Output. Specify TSET PRINT=BRIEF to display only the initial seasonal factor estimates. TSET PRINT=DETAILED produces the same output as the default.

New Variables. To evaluate the displayed averages, ratios, factors, adjusted series, trend-cycle, and error components without creating new variables, specify TSET NEWVAR=NONE prior to SEASON. This can result in faster processing time. To add new variables without erasing the values of previous Forecasting-generated variables, specify TSET NEWVAR=ALL. This saves all new variables that are generated during the current session to the active dataset and may require extra processing time. When the default (TSET NEWVAR=CURRENT) is in effect, only variables from the current procedure are saved to the active dataset, and the suffix #n is used to distinguish variables that are generated by different series. TSET MXNEWVAR specifies the maximum number of new variables that can be generated by a procedure. The default is 60. The order in which new variables are added to the active dataset's dictionary is ERR, SAS, SAF, and STC.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is one or more series names.

• By default, SEASON uses a multiplicative model to compute and display moving averages, ratios, seasonal factors, the seasonally adjusted series, the smoothed trend-cycle components, and the irregular (error) component for each specified series (variable). The default periodicity is the periodicity that is established with TSET PERIOD or DATE.

• Unless the default on TSET NEWVAR is changed prior to the procedure, SEASON creates four new variables, with the following prefixes, for each specified series (these variables are automatically named, labeled, and added to the active dataset):

SAF. Seasonal adjustment factors. These values indicate the effect of each period on the level of the series.

SAS. Seasonally adjusted series. These values are the values that are obtained after removing the seasonal variation of a series.

STC. Smoothed trend-cycle components. These values show the trend and cyclical behavior that are present in the series.

ERR. Residual or "error" values. These values are the values that remain after the seasonal, trend, and cycle components have been removed from the series.

Subcommand Order Collapse Hide details

Subcommand Order

• Subcommands can be specified in any order.

Syntax Rules Collapse Hide details

Syntax Rules

• VARIABLES can be specified only once.

• Other subcommands can be specified more than once, but only the last specification of each one is executed.

Operations Collapse Hide details

Operations

• The endpoints of the moving averages and ratios are displayed as system-missing in the output.

• Missing values are not allowed anywhere in the series. (You can use the RMV command to replace missing values, use TSET MISSING=INCLUDE to include user-missing values, and use USE to ignore missing observations at the beginning or end of a series. See RMV and USE for more information.)

Limitations Collapse Hide details

Limitations

• A maximum of one VARIABLES subcommand is allowed. There is no limit on the number of series that are named on the list.

Related Topics

SEASON
VARIABLES Subcommand (SEASON command)
MODEL Subcommand (SEASON command)
MA Subcommand (SEASON command)
PERIOD Subcommand (SEASON command)
APPLY Subcommand (SEASON command)
References (SEASON command)


VARIABLES Subcommand (SEASON command)

SEASON (command),SEASON (command),SEASON (command)
VARIABLES subcommand,VARIABLES subcommand,VARIABLES subcommand
VARIABLES (subcommand),VARIABLES (subcommand),VARIABLES (subcommand)
SEASON command,SEASON command,SEASON command
SEASON (command),SEASON (command),SEASON (command)
VARIABLES subcommand,VARIABLES subcommand,VARIABLES subcommand
VARIABLES (subcommand),VARIABLES (subcommand),VARIABLES (subcommand)
SEASON command,SEASON command,SEASON command

VARIABLES specifies the series names and is the only required subcommand.

• Each specified series must contain at least four full seasons of data.

Related Topics

SEASON
Overview (SEASON command)
MODEL Subcommand (SEASON command)
MA Subcommand (SEASON command)
PERIOD Subcommand (SEASON command)
APPLY Subcommand (SEASON command)
References (SEASON command)


MODEL Subcommand (SEASON command)

SEASON (command),SEASON (command),SEASON (command)
MODEL subcommand,MODEL subcommand,MODEL subcommand
MODEL (subcommand),MODEL (subcommand),MODEL (subcommand)
SEASON command,SEASON command,SEASON command
multiplicative model,multiplicative model,multiplicative model
SEASON command,SEASON command,SEASON command
additive model,additive model,additive model
SEASON command,SEASON command,SEASON command

MODEL specifies whether the seasonal decomposition model is multiplicative or additive.

MULTIPLICATIVE (keyword),MULTIPLICATIVE (keyword),MULTIPLICATIVE (keyword)
SEASON command,SEASON command,SEASON command
ADDITIVE (keyword),ADDITIVE (keyword),ADDITIVE (keyword)
SEASON command,SEASON command,SEASON command

• The specification on MODEL is the keyword MULTIPLICATIVE or ADDITIVE.

• If more than one keyword is specified, only the first keyword is used.

MULTIPLICATIVE (keyword),MULTIPLICATIVE (keyword),MULTIPLICATIVE (keyword)
SEASON command,SEASON command,SEASON command

• MULTIPLICATIVE is the default if the MODEL subcommand is not specified or if MODEL is specified without any keywords.

Example

SEASON VARIABLES = VARX
  /MODEL=ADDITIVE.

• This example uses an additive model for the seasonal decomposition of VARX.

Related Topics

SEASON
Overview (SEASON command)
VARIABLES Subcommand (SEASON command)
MA Subcommand (SEASON command)
PERIOD Subcommand (SEASON command)
APPLY Subcommand (SEASON command)
References (SEASON command)


MA Subcommand (SEASON command)

SEASON (command),SEASON (command),SEASON (command)
MA subcommand,MA subcommand,MA subcommand
MA (subcommand),MA (subcommand),MA (subcommand)
SEASON command,SEASON command,SEASON command
SEASON (command),SEASON (command),SEASON (command)
computing moving averages,computing moving averages,computing moving averages
moving averages,moving averages,moving averages
SEASON command,SEASON command,SEASON command

MA specifies how to treat an even-periodicity series when computing moving averages.

EQUAL (keyword),EQUAL (keyword),EQUAL (keyword)
SEASON command,SEASON command,SEASON command

• MA should be specified only when the periodicity is even. When periodicity is odd, the EQUAL method is always used.

CENTERED (keyword),CENTERED (keyword),CENTERED (keyword)
SEASON command,SEASON command,SEASON command

• For even-periodicity series, the keyword EQUAL or CENTERED can be specified. CENTERED is the default.

EQUAL (keyword),EQUAL (keyword),EQUAL (keyword)
SEASON command,SEASON command,SEASON command

• EQUAL calculates moving averages with a span (number of terms) equal to the periodicity and all points weighted equally.

• CENTERED calculates moving averages with a span (number of terms) equal to the periodicity plus 1 and endpoints weighted by 0.5.

• The periodicity is specified on the PERIOD subcommand.

Example

SEASON VARIABLES = VARY
  /MA=CENTERED
  /PERIOD=12.

• In this example, moving averages are computed with spans of 13 terms and endpoints weighted by 0.5.

Related Topics

SEASON
Overview (SEASON command)
VARIABLES Subcommand (SEASON command)
MODEL Subcommand (SEASON command)
PERIOD Subcommand (SEASON command)
APPLY Subcommand (SEASON command)
References (SEASON command)


PERIOD Subcommand (SEASON command)

PERIOD (subcommand),PERIOD (subcommand),PERIOD (subcommand)
SEASON command,SEASON command,SEASON command
SEASON (command),SEASON (command),SEASON (command)
PERIOD subcommand,PERIOD subcommand,PERIOD subcommand
periodicity,periodicity,periodicity
SEASON command,SEASON command,SEASON command
SEASON (command),SEASON (command),SEASON (command)
specifying periodicity,specifying periodicity,specifying periodicity

PERIOD indicates the size of the period.

• The specification on PERIOD indicates how many observations are in one period or season and can be any positive integer.

• If PERIOD is not specified, the periodicity that is established on TSET PERIOD is in effect. If TSET PERIOD is not specified, the periodicity that is established on the DATE command is used. If periodicity was not established anywhere, the SEASON command will not be executed.

Example

SEASON VARIABLES = SALES
  /PERIOD=12.
PERIOD (subcommand),PERIOD (subcommand),PERIOD (subcommand)
SEASON command,SEASON command,SEASON command
SEASON (command),SEASON (command),SEASON (command)
PERIOD subcommand,PERIOD subcommand,PERIOD subcommand

• In this example, a periodicity of 12 is specified for SALES.

Related Topics

SEASON
Overview (SEASON command)
VARIABLES Subcommand (SEASON command)
MODEL Subcommand (SEASON command)
MA Subcommand (SEASON command)
APPLY Subcommand (SEASON command)
References (SEASON command)


APPLY Subcommand (SEASON command)

APPLY (subcommand),APPLY (subcommand),APPLY (subcommand)
SEASON command,SEASON command,SEASON command
SEASON (command),SEASON (command),SEASON (command)
APPLY subcommand,APPLY subcommand,APPLY subcommand
SEASON (command),SEASON (command),SEASON (command)
using a previously defined model,using a previously defined model,using a previously defined model

APPLY allows you to use a previously defined SEASON model without having to repeat the specifications.

• The only specification on APPLY is the name of a previous model in quotation marks. If a model name is not specified, the model that was specified on the previous SEASON command is used. Model names are either the default MOD_n names or the names that are assigned on the MODEL NAME command.

• To change one or more model specifications, specify the subcommands of only those portions that you want to change after the APPLY subcommand.

• If no series are specified on the command, the series that were originally specified with the model that is being reapplied are used.

• To change the series used with the model, enter new series names before or after the APPLY subcommand. If a series name is specified before APPLY, the slash before the subcommand is required.

Example

SEASON VARIABLES = X1
  /MODEL=ADDITIVE.
SEASON VARIABLES = Z1
  /APPLY.

• The first command specifies an additive model for the seasonal decomposition of X1.

• The second command applies the same type of model to series Z1.

Example

SEASON X1 Y1 Z1
  /MODEL=MULTIPLICATIVE.
SEASON APPLY
  /MODEL=ADDITIVE.

• The first command specifies a multiplicative model for the seasonal decomposition of X1, Y1, and Z1.

seasonal factor estimates,seasonal factor estimates,seasonal factor estimates
APPLY (subcommand),APPLY (subcommand),APPLY (subcommand)
SEASON command,SEASON command,SEASON command
SEASON (command),SEASON (command),SEASON (command)
APPLY subcommand,APPLY subcommand,APPLY subcommand

• The second command applies an additive model to the same three variables.

Related Topics

SEASON
Overview (SEASON command)
VARIABLES Subcommand (SEASON command)
MODEL Subcommand (SEASON command)
MA Subcommand (SEASON command)
PERIOD Subcommand (SEASON command)
References (SEASON command)


References (SEASON command)

Makridakis, S., S. C. Wheelwright, and V. E. McGee. 1983. Forecasting: Methods and applications. New York: John Wiley and Sons.

McLaughlin, R. L. 1984. Forecasting techniques for decision making. Rockville, Md.: Control Data Management Institute.

Related Topics

SEASON
Overview (SEASON command)
VARIABLES Subcommand (SEASON command)
MODEL Subcommand (SEASON command)
MA Subcommand (SEASON command)
PERIOD Subcommand (SEASON command)
APPLY Subcommand (SEASON command)


SELECT IF

subsets of cases,subsets of cases,subsets of cases
if condition is satisfied,if condition is satisfied,if condition is satisfied
cases,cases,cases
selecting subsets,selecting subsets,selecting subsets
file transformations,file transformations,file transformations
subsets of cases,subsets of cases,subsets of cases
subsets of cases,subsets of cases,subsets of cases
selecting,selecting,selecting
data files,data files,data files
subsets of cases,subsets of cases,subsets of cases
SELECT IF (command),SELECT IF (command),SELECT IF (command)
SELECT IF (command),SELECT IF (command),SELECT IF (command)
syntax chart,syntax chart,syntax chart
select cases,select cases,select cases
SELECT IF [(]logical expression[)]
relational operators,relational operators,relational operators

The following relational operators can be used in logical expressions:

Symbol | Definition
EQ or = | Equal to
NE or ~= or ¬ = or <> | Not equal to
LT or < | Less than
LE or <= | Less than or equal to
GT or > | Greater than
GE or >= | Greater than or equal to
logical operators,logical operators,logical operators

The following logical operators can be used in logical expressions:

Symbol | Definition
AND or & | Both relations must be true
OR or | | Either relation can be true
NOT | Reverses the outcome of an expression

This command does not read the active dataset. It is stored, pending execution with the next command that reads the dataset. See the topic Command Order for more information.

Syntax for the SELECT IF command can be generated from the Select Cases dialog by selecting If condition is satisfied and selecting Deleted for unselected cases.

Example

SELECT IF (SEX EQ 'MALE').

Related Topics

Overview (SELECT IF command)
Examples (SELECT IF command)


Overview (SELECT IF command)

SELECT IF (command),SELECT IF (command),SELECT IF (command)
logical expressions,logical expressions,logical expressions
logical expressions,logical expressions,logical expressions
selecting cases,selecting cases,selecting cases
subsets of cases,subsets of cases,subsets of cases
conditional expressions,conditional expressions,conditional expressions
TEMPORARY (command),TEMPORARY (command),TEMPORARY (command)
with SELECT IF command,with SELECT IF command,with SELECT IF command
SELECT IF (command),SELECT IF (command),SELECT IF (command)
with TEMPORARY command,with TEMPORARY command,with TEMPORARY command
SELECT IF (command),SELECT IF (command),SELECT IF (command)
with $CASENUM,with $CASENUM,with $CASENUM
$CASENUM,$CASENUM,$CASENUM
with SELECT IF command,with SELECT IF command,with SELECT IF command
SELECT IF (command),SELECT IF (command),SELECT IF (command)
with N OF CASES command,with N OF CASES command,with N OF CASES command
N OF CASES (command),N OF CASES (command),N OF CASES (command)
with SELECT IF command,with SELECT IF command,with SELECT IF command
SELECT IF (command),SELECT IF (command),SELECT IF (command)
missing values,missing values,missing values
SELECT IF (command),SELECT IF (command),SELECT IF (command)
limitations,limitations,limitations

SELECT IF permanently selects cases for analysis based on logical conditions that are found in the data. These conditions are specified in a logical expression. The logical expression can contain relational operators, logical operators, arithmetic operations, and any functions that are allowed in COMPUTE transformations. For temporary case selection, specify a TEMPORARY command before SELECT IF.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is simply a logical expression.

Syntax Rules Collapse Hide details

Syntax Rules

• Logical expressions can be simple logical variables or relations, or these expressions can be complex logical tests involving variables, constants, functions, relational operators, and logical operators. The logical expression can use any of the numeric or string functions that are allowed in COMPUTE transformations (see COMPUTE and see Transformation Expressions).

• Parentheses can be used to enclose the logical expression. Parentheses can also be used within the logical expression to specify the order of operations. Extra blanks or parentheses can be used to make the expression easier to read.

• A relation can compare variables, constants, or more complicated arithmetic expressions. Relations cannot be abbreviated. For example, (A EQ 2 OR A EQ 5) is valid while (A EQ 2 OR 5) is not valid. Blanks (not commas) must be used to separate relational operators from the expressions that are being compared.

• A relation cannot compare a string variable to a numeric value or variable, or vice versa. A relation cannot compare the result of the logical functions SYSMIS, MISSING, ANY, or RANGE to a number.

• String values that are used in expressions must be specified in quotation marks and must include any leading or trailing blanks. Lowercase letters are considered distinct from uppercase letters.

Operations Collapse Hide details

Operations

• SELECT IF permanently selects cases. Cases that are not selected are dropped from the active dataset.

• The logical expression is evaluated as true, false, or missing. If a logical expression is true, the case is selected; if it is false or missing, the case is not selected.

• Multiple SELECT IF commands that are issued prior to a procedure command must all be true for a case to be selected.

• SELECT IF should be placed before other transformations for efficiency.

• Logical expressions are evaluated in the following order: numeric functions, exponentiation, arithmetic operators, relational operators, and logical operators. Use parentheses to change the order of evaluation.

• If N OF CASES is used with SELECT IF, the program reads as many records as required to build the specified n cases. It makes no difference whether N OF CASES precedes or follows SELECT IF.

• System variable $CASENUM is the sequence number of a case in the active dataset. Although it is syntactically correct to use $CASENUM on SELECT IF, it does not produce the expected results. To select a set of cases based on their sequence in a file, create your own sequence variable with the transformation language prior to making the selection (see the Examples).

Missing Values Collapse Hide details

Missing Values

• If the logical expression is indeterminate because of missing values, the case is not selected. In a simple relational expression, a logical expression is indeterminate if the expression on either side of the relational operator is missing.

• If a compound expression is used in which relations are joined by the logical operator OR, the case is selected if either relation is true, even if the other relation is missing.

• To select cases with missing values for the variables within the expression, use the missing-value functions. To include cases with values that have been declared user-missing, along with other cases, use the VALUE function.

Limitations Collapse Hide details

Limitations

SELECT IF cannot be placed within a FILE TYPE-END FILE TYPE or INPUT PROGRAM-END INPUT PROGRAM structure. SELECT IF can be placed nearly anywhere following these commands in a transformation program. See the topic Commands and Program States for more information.

Related Topics

SELECT IF
Examples (SELECT IF command)


Examples (SELECT IF command)

SELECT IF (command),SELECT IF (command),SELECT IF (command)
with DO IF command,with DO IF command,with DO IF command
DO IF (command),DO IF (command),DO IF (command)
with SELECT IF command,with SELECT IF command,with SELECT IF command
SELECT IF (command),SELECT IF (command),SELECT IF (command)
missing values,missing values,missing values

Working With Simple Logical Expressions

SELECT IF (SEX EQ 'MALE').

• All subsequent procedures will use only cases in which the value of SEX is MALE.

• Because uppercase and lowercase are treated differently in comparisons of string variables, cases for which the value of SEX is male are not selected.

SELECT IF (INCOME GT 75000 OR INCOME LE 10000).

• The logical expression tests whether a case has a value that is either greater than 75,000 or less than or equal to 10,000. If either relation is true, the case is used in subsequent analyses.

SELECT IF (V1 GE V2).

• This example selects cases where variable V1 is greater than or equal to V2. If either V1 or V2 is missing, the logical expression is indeterminate, and the case is not selected.

SELECT IF (SEX = 'F' & INCOME <= 10000).

• The logical expression tests whether string variable SEX is equal to F and whether numeric variable INCOME is less than or equal to 10,000. Cases that meet both conditions are included in subsequent analyses. If either SEX or INCOME is missing for a case, the case is not selected.

SELECT IF (SYSMIS(V1)).

• The logical expression tests whether V1 is system-missing. If it is system-missing, the case is selected for subsequent analyses.

SELECT IF (VALUE(V1) GT 0).

• Cases are selected if V1 is greater than 0, even if the value of V1 has been declared user-missing.

SELECT IF (V1 GT 0).

• Cases are not selected if V1 is user-missing, even if the user-missing value is greater than 0.

SELECT IF ((V1-15) LE (V2*(-0.001))).

• The logical expression compares whether V1 minus 15 is less than or equal to V2 multiplied by −0.001. If it is true, the case is selected.

SELECT IF ((YRMODA(88,13,0) - YRMODA(YVAR,MVAR,DVAR)) LE 30).

• The logical expression subtracts the number of days representing the date (YVAR, MVAR, and DVAR) from the number of days representing the last day in 1988. If the difference is less than or equal to 30, the case is selected.

Understanding and Changing the Order of Evaluation

SELECT IF (RECEIV GT DUE AND (REVNUS GE EXPNS OR BALNCE GT 0)).

• By default, AND is executed before OR. This expression uses parentheses to change the order of evaluation.

• The program first tests whether variable REVNUS is greater than or equal to variable EXPNS, or variable BALNCE is greater than 0. Second, the program tests whether RECEIV is greater than DUE. If one of the expressions in parentheses is true and RECEIV is greater than DUE, the case is selected.

• Without the parentheses, the program would first test whether RECEIV is greater than DUE and REVNUS is greater than or equal to EXPNS. Second, the program would test whether BALNCE is greater than 0. If the first two expressions are true or if the third expression is true, the case is selected.

Selecting Cases Based on Their Sequence in a File

COMPUTE  #CASESEQ=#CASESEQ+1.
SELECT IF (MOD(#CASESEQ,2)=0).

• This example computes a scratch variable, #CASESEQ, containing the sequence numbers for each case. Every other case is selected, beginning with the second case.

• #CASESEQ must be a scratch variable so that it is not reinitialized for every case. An alternative is to use the LEAVE command.

Using SELECT IF within a DO IF Structure

DO IF  SEX EQ 'M'.
+   SELECT IF PRESTIGE GT 50.
ELSE IF  SEX EQ 'F'.
+   SELECT IF PRESTIGE GT 45.
END IF.

• The SELECT IF commands within the DO IF structure select males with prestige scores above 50 and females with prestige scores above 45.

Related Topics

SELECT IF
Overview (SELECT IF command)


SELECTPRED

SELECTPRED (command),SELECTPRED (command),SELECTPRED (command)
SELECTPRED (command),SELECTPRED (command),SELECTPRED (command)
syntax chart,syntax chart,syntax chart
release history,release history,release history
Predictor Selection,Predictor Selection,Predictor Selection
command syntax,command syntax,command syntax

SELECTPRED is available in PASW Statistics Server.

SELECTPRED dependent variable [(MLEVEL={S})]
                                       {O}
                                       {N}
           [BY factor list] [WITH covariate list]

[/EXCEPT VARIABLES=varlist]

[/SCREENING [STATUS={ON**}]  [PCTMISSING={70**  }]
                    {OFF }               {number}
            [PCTEQUAL={95**  }]  [PCTUNEQUAL={90**  }]
                      {number}               {number}
            [STDDEV={0**   }
                    {number}
            [CV={0.001** }]]
                {number}

[/CRITERIA [SIZE={AUTO** }]  [PCUTOFF={0.05**}]
                 {integer}            {number}
           [RANKING={PEARSONCHISQ**}]  [TIMER={5**   }]
                    {LRCHISQ       }          {number}
                    {CRAMERSV      }
                    {LAMBDA        }
           [SHOWUNSELECTED={0**    }]
                           {integer}

[/MISSING USERMISSING={EXCLUDE**}]
                      {INCLUDE  }

[/PRINT [CPS**]  [EXCLUDED**] [SELECTED**]  [NONE]]
        [SUMMARY**[([PEARSONCHISQ] [LRCHISQ] [CRAMERSV] [LAMBDA])]]

[/PLOT SUMMARY]

** Default if the subcommand or keyword is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See SELECTPRED Algorithms for computational details for this procedure.

Release History Collapse Hide details

Release History

Release 14.0

• Command introduced.

Example

SELECTPRED response_01.

Related Topics

Overview (SELECTPRED command)
Examples (SELECTPRED command)
Variable Lists (SELECTPRED command)
EXCEPT Subcommand (SELECTPRED command)
SCREENING Subcommand (SELECTPRED command)
CRITERIA Subcommand (SELECTPRED command)
MISSING Subcommand (SELECTPRED command)
PRINT Subcommand (SELECTPRED command)
PLOT Subcommand (SELECTPRED command)


Overview (SELECTPRED command)

The SELECTPRED procedure submits a large number of predictor variables and selects a smaller subset for use in predictive modeling procedures. This procedure uses a univariable method that considers each predictor in isolation, as opposed to the multivariable method of selecting procedures that is used by the NAIVEBAYES procedure. The SELECTPRED procedure supports both categorical and scale dependent variables and accepts very large sets of predictors. SELECTPRED is useful when rapid computing is required.

Options Collapse Hide details

Options

Methods. The SELECTPRED procedure includes a screening step as well as the univariable predictor selection method.

Missing Values. Cases with missing values for the dependent variable or for all predictors are excluded. The SELECTPRED procedure has an option for treating user-missing values of categorical variables as valid. User-missing values of scale variables are always treated as invalid.

Output. SELECTPRED displays pivot table output by default but offers an option for suppressing most such output. The procedure optionally displays lists of categorical and scale predictors—not a model—by way of global macro variables. These global macro variables can be used to represent the subset of selected predictors in subsequent procedures.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is the SELECTPRED command followed by a dependent variable.

By default, SELECTPRED determines the measurement level of the dependent variable based on its dictionary setting. All other variables in the dataset — except the weight variable if it is defined — are treated as predictors, with the dictionary setting of each predictor determining its measurement level. SELECTPRED performs the screening step and then selects a subset of predictors by using a univariable method. User-missing values are excluded, and default pivot table output is displayed.

Syntax Rules Collapse Hide details

Syntax Rules

• All subcommands are optional.

• Only a single instance of each subcommand is allowed.

• An error occurs if a keyword is specified more than once within a subcommand.

• Parentheses, equals signs, and slashes that are shown in the syntax chart are required.

• The command name, subcommand names, and keywords must be spelled in full.

• Empty subcommands are not honored.

Operations Collapse Hide details

Operations

The SELECTPRED procedure begins by excluding the following types of cases and predictors.

• Cases with a missing value for the dependent variable.

• Cases with missing values for all predictors.

• Predictors with missing values for all cases.

• Predictors with the same value for all cases.

A further screening step can be used to exclude the following types of predictors:

• Predictors with a large percentage of missing values.

• Categorical predictors with a large percentage of cases representing a single category.

• Categorical predictors with a large percentage of categories containing one case.

• Scale predictors with a small coefficient of variation (standard deviation divided by mean).

The univariable predictor selection method also ranks each predictor based on its association with the dependent variable and selects the top subset of predictors to use in subsequent modeling procedures. The ranking criterion that is used for any given predictor depends on the measurement level of the dependent variable as well as the measurement level of the predictor.

Categorical Dependent Variable.

• For categorical predictors, the ranking criterion can be the Pearson chi-square p-value, likelihood ratio chi-square p-value, Cramér's V, or Lambda.

• For scale predictors, the F p-value from a one-way ANOVA is always used as the criterion.

• For mixed predictors, the categorical predictors use the chi-square p-value or the likelihood ratio chi-square p-value, and the scale predictors use the F p-value from a one-way ANOVA.

Scale Dependent Variable.

• For categorical predictors, the F p-value from a one-way ANOVA is always used as the criterion.

• For scale predictors, the p-value for a Pearson correlation coefficient is always used.

• For mixed predictors, both types of p-values are used, depending on the predictor type.

Frequency Weight Collapse Hide details

Frequency Weight

If a WEIGHT variable is specified, its values are used as frequency weights by the SELECTPRED procedure.

• Cases with missing weights or weights that are less than 0.5 are not used in the analyses.

• The weight values are rounded to the nearest whole numbers before use. For example, 0.5 is rounded to 1, and 2.4 is rounded to 2.

Limitations Collapse Hide details

Limitations

SPLIT FILE settings are ignored by the SELECTPRED procedure.

Related Topics

SELECTPRED
Examples (SELECTPRED command)
Variable Lists (SELECTPRED command)
EXCEPT Subcommand (SELECTPRED command)
SCREENING Subcommand (SELECTPRED command)
CRITERIA Subcommand (SELECTPRED command)
MISSING Subcommand (SELECTPRED command)
PRINT Subcommand (SELECTPRED command)
PLOT Subcommand (SELECTPRED command)


Examples (SELECTPRED command)

SELECTPRED response_01
  /EXCEPT VARIABLES=custid response_02 response_03
  /MISSING USERMISSING=INCLUDE.

• This analysis specifies response_01 as the dependent variable.

• All other variables are to be considered as possible predictors, with the exception of custid, response_02, and response_03.

• User-missing values of categorical variables are treated as valid for the purpose of selecting predictors.

• All other settings fall back to their default values.

For discussion of output from this syntax and to place the example in context, see Using Select Predictors to Mine a Customer Database

Related Topics

SELECTPRED
Overview (SELECTPRED command)
Variable Lists (SELECTPRED command)
EXCEPT Subcommand (SELECTPRED command)
SCREENING Subcommand (SELECTPRED command)
CRITERIA Subcommand (SELECTPRED command)
MISSING Subcommand (SELECTPRED command)
PRINT Subcommand (SELECTPRED command)
PLOT Subcommand (SELECTPRED command)


Variable Lists (SELECTPRED command)

The variable lists specify the dependent variable, any categorical predictors (also known as factors), and any scale predictors (also known as covariates).

• The dependent variable must be the first specification on SELECTPRED.

• The dependent variable may not be the weight variable.

• The dependent variable may be followed by the measurement-level specification, which contains, in parentheses, the MLEVEL keyword followed by an equals sign and then S for scale, O for ordinal, or N for nominal. SELECTPRED treats ordinal and nominal dependent variables equivalently as categorical.

• If a measurement level is specified, it temporarily overrides the dependent variable's setting in the data dictionary.

• If no measurement level is specified, SELECTPRED defaults to the dictionary setting.

• If a measurement level is not specified, and no setting is recorded in the data dictionary, a numeric variable is treated as scale and a string variable is treated as categorical.

• A string variable may be defined as ordinal or nominal only.

• The names of the factors, if any, must be preceded by the keyword BY. If BY is specified with no factors, a warning is issued, and the keyword is ignored.

• The names of the covariates, if any, must be preceded by the keyword WITH. If WITH is specified without covariates, a warning is issued, and the keyword is ignored.

• If the dependent variable or the weight variable is specified within a factor list or a covariate list, the variable is ignored in the list.

• All variables that are specified within a factor or covariate list must be unique. If duplicate variables are specified within a list, the duplicates are ignored.

• If duplicate variables are specified across the factor and covariate lists, an error is issued.

• The universal keywords TO and ALL may be specified in the factor and covariate lists.

• If neither BY nor WITH is specified, all variables in the active dataset except the dependent variable, the weight variable, and any variables that are specified on the EXCEPT subcommand, are treated as predictors. If the dictionary setting of a predictor is nominal or ordinal, the predictor is treated as a factor. If the dictionary setting is scale, the predictor is treated as a covariate.

• The dependent variable and factor variables can be numeric or string.

• The covariates must be numeric.

Related Topics

SELECTPRED
Overview (SELECTPRED command)
Examples (SELECTPRED command)
EXCEPT Subcommand (SELECTPRED command)
SCREENING Subcommand (SELECTPRED command)
CRITERIA Subcommand (SELECTPRED command)
MISSING Subcommand (SELECTPRED command)
PRINT Subcommand (SELECTPRED command)
PLOT Subcommand (SELECTPRED command)


EXCEPT Subcommand (SELECTPRED command)

SELECTPRED (command),SELECTPRED (command),SELECTPRED (command)
EXCEPT subcommand,EXCEPT subcommand,EXCEPT subcommand
EXCEPT (subcommand),EXCEPT (subcommand),EXCEPT (subcommand)
SELECTPRED command,SELECTPRED command,SELECTPRED command

The EXCEPT subcommand lists any variables that the SELECTPRED procedure should exclude from the factor or covariate lists on the command line. This subcommand is useful if the factor or covariate lists contain a large number of variables—specified by using the TO or ALL keyword, for example—but there are a few variables (for example, Case ID) that should be excluded.

• The EXCEPT subcommand ignores duplicate variables, the dependent variable, and variables that are not specified on the command line's factor or covariate lists.

• There is no default variable list on the EXCEPT subcommand.

Related Topics

SELECTPRED
Overview (SELECTPRED command)
Examples (SELECTPRED command)
Variable Lists (SELECTPRED command)
SCREENING Subcommand (SELECTPRED command)
CRITERIA Subcommand (SELECTPRED command)
MISSING Subcommand (SELECTPRED command)
PRINT Subcommand (SELECTPRED command)
PLOT Subcommand (SELECTPRED command)


SCREENING Subcommand (SELECTPRED command)

SELECTPRED (command),SELECTPRED (command),SELECTPRED (command)
SCREENING subcommand,SCREENING subcommand,SCREENING subcommand
SCREENING (subcommand),SCREENING (subcommand),SCREENING (subcommand)
SELECTPRED command,SELECTPRED command,SELECTPRED command

The SCREENING subcommand specifies settings for the screening step, which excludes unsuitable predictors.

STATUS (keyword),STATUS (keyword),STATUS (keyword)
SELECTPRED command,SELECTPRED command,SELECTPRED command
PCTMISSING (keyword),PCTMISSING (keyword),PCTMISSING (keyword)
SELECTPRED command,SELECTPRED command,SELECTPRED command
PCTEQUAL (keyword),PCTEQUAL (keyword),PCTEQUAL (keyword)
SELECTPRED command,SELECTPRED command,SELECTPRED command
PCTONECASE (keyword),PCTONECASE (keyword),PCTONECASE (keyword)
SELECTPRED command,SELECTPRED command,SELECTPRED command
CV (keyword),CV (keyword),CV (keyword)
SELECTPRED command,SELECTPRED command,SELECTPRED command
STATUS=option | Perform the screening step. Valid options are ON or OFF. If OFF is specified, any other SCREENING specifications are ignored. The default value is ON.
PCTMISSING=number | Percentage of missing values in a predictor. If the percentage of cases representing a single category in a predictor is greater than the specified value, the predictor is excluded. The specified value must be a positive number that is less than or equal to 100. The default value is 70.
PCTEQUAL=number | Percentage of cases representing a single category in a categorical predictor. If the percentage of cases representing a single category in a predictor is greater than the specified value, the predictor is excluded. This setting applies only to categorical predictors. The specified value must be a positive number that is less than or equal to 100. The default value is 95.
PCTUNEQUAL=number | Percentage of categories containing one case in a categorical predictor. If the percentage of a predictor's categories containing only one case is greater than the specified value, the predictor is excluded. This setting applies only to categorical predictors. The specified value must be a positive number that is less than or equal to 100. The default value is 90.
STDDEV=number | Minimum standard deviation for a scale predictor. If the standard deviation is less than the specified value, the predictor is excluded. This setting applies only to scale predictors. The specified value must be a non-negative number. The default value is 0, which turns off the standard deviation check.
CV=number | Coefficient of variation for a scale predictor. A predictor's coefficient of variation is defined as its standard deviation divided by its mean. If the absolute value of the coefficient of variation is less than the specified value, the predictor is excluded. This setting applies only to scale predictors and applies only if the mean is not equal to 0. The specified value must be a positive number. The default value is 0.001.

Related Topics

SELECTPRED
Overview (SELECTPRED command)
Examples (SELECTPRED command)
Variable Lists (SELECTPRED command)
EXCEPT Subcommand (SELECTPRED command)
CRITERIA Subcommand (SELECTPRED command)
MISSING Subcommand (SELECTPRED command)
PRINT Subcommand (SELECTPRED command)
PLOT Subcommand (SELECTPRED command)


CRITERIA Subcommand (SELECTPRED command)

SELECTPRED (command),SELECTPRED (command),SELECTPRED (command)
CRITERIA subcommand,CRITERIA subcommand,CRITERIA subcommand
CRITERIA (subcommand),CRITERIA (subcommand),CRITERIA (subcommand)
SELECTPRED command,SELECTPRED command,SELECTPRED command

The CRITERIA subcommand specifies computational settings for the SELECTPRED procedure.

SIZE (keyword),SIZE (keyword),SIZE (keyword)
SELECTPRED command,SELECTPRED command,SELECTPRED command
SIZE Keyword Collapse Hide details

SIZE Keyword

The SIZE keyword specifies the number of predictors to select. Value AUTO indicates that the number should be computed automatically. Alternatively, a positive integer less than the number of unique predictors on the SELECTPRED command may be specified. AUTO is the default.

RANKING (keyword),RANKING (keyword),RANKING (keyword)
SELECTPRED command,SELECTPRED command,SELECTPRED command
PEARSONCHISQ (keyword),PEARSONCHISQ (keyword),PEARSONCHISQ (keyword)
SELECTPRED command,SELECTPRED command,SELECTPRED command
LRCHISQ (keyword),LRCHISQ (keyword),LRCHISQ (keyword)
SELECTPRED command,SELECTPRED command,SELECTPRED command
CRAMERSV (keyword),CRAMERSV (keyword),CRAMERSV (keyword)
SELECTPRED command,SELECTPRED command,SELECTPRED command
LAMBDA (keyword),LAMBDA (keyword),LAMBDA (keyword)
SELECTPRED command,SELECTPRED command,SELECTPRED command
RANKING Keyword Collapse Hide details

RANKING Keyword

The RANKING keyword specifies the ranking criterion that is used for categorical predictors if the target is categorical.

PEARSONCHISQ | Rank predictors based on Pearson chi-square p-value. Predictors are sorted in ascending order of Pearson chi-square p-values. This criterion is the default.
LRCHISQ | Rank predictors based on likelihood ratio chi-square p-value. Predictors are sorted in ascending order of likelihood ratio chi-square p-values.
CRAMERSV | Rank predictors based on Cramer's V. Predictors are sorted in descending order of Cramer's V. If this criterion is used when the target is categorical but predictors are mixed (that is, some categorical, some scale), the PEARSONCHISQ default is used instead.
LAMBDA | Rank predictors based on Lambda (asymmetric). Predictors are sorted in descending order of Lambda. If this criterion is used when the target is categorical but predictors are mixed; that is, some categorical, some scale, then the PEARSONCHISQ default is used instead.
SIZE (keyword),SIZE (keyword),SIZE (keyword)
PCUTOFF command,PCUTOFF command,PCUTOFF command
PCUTOFF Keyword Collapse Hide details

PCUTOFF Keyword

The PCUTOFF keyword specifies the cutoff whenever a p-value is used as a ranking criterion. More particularly, if p-values are used to rank predictors, only those predictors for which the p-value is less than the PCUTOFF value may be selected. A positive number that is less than or equal to 1 may be specified. Specifying 1 turns off the limit on p-values. The default is 0.05.

SHOWUNSELECTED (keyword),SHOWUNSELECTED (keyword),SHOWUNSELECTED (keyword)
SELECTPRED command,SELECTPRED command,SELECTPRED command
SHOWUNSELECTED Keyword Collapse Hide details

SHOWUNSELECTED Keyword

The SHOWUNSELECTED keyword specifies a limit on the number of unselected predictors to display in tables and charts. If the specified number n is greater than 0, the top n unselected predictors are displayed. A non-negative integer may be specified. The default is 0.

TIMER (keyword),TIMER (keyword),TIMER (keyword)
SELECTPRED command,SELECTPRED command,SELECTPRED command
TIMER Keyword Collapse Hide details

TIMER Keyword

The TIMER keyword specifies the maximum number of minutes during which the SELECTPRED procedure can be run. If the time limit is exceeded, the procedure is terminated, and no results are given. Any number that is greater than or equal to 0 may be specified. Specifying 0 turns the timer off completely. The default is 5.

Related Topics

SELECTPRED
Overview (SELECTPRED command)
Examples (SELECTPRED command)
Variable Lists (SELECTPRED command)
EXCEPT Subcommand (SELECTPRED command)
SCREENING Subcommand (SELECTPRED command)
MISSING Subcommand (SELECTPRED command)
PRINT Subcommand (SELECTPRED command)
PLOT Subcommand (SELECTPRED command)


MISSING Subcommand (SELECTPRED command)

SELECTPRED (command),SELECTPRED (command),SELECTPRED (command)
MISSING subcommand,MISSING subcommand,MISSING subcommand
MISSING (subcommand),MISSING (subcommand),MISSING (subcommand)
SELECTPRED command,SELECTPRED command,SELECTPRED command

The MISSING subcommand controls whether user-missing values for categorical variables are treated as valid values. By default, user-missing values for categorical variables are treated as invalid.

• User-missing values for scale variables are always treated as invalid.

• System-missing values for any variables are always treated as invalid.

USERMISSING (keyword),USERMISSING (keyword),USERMISSING (keyword)
SELECTPRED command,SELECTPRED command,SELECTPRED command
USERMISSING=EXCLUDE | User-missing values for categorical variables are treated as invalid. This setting is the default.
USERMISSING=INCLUDE | User-missing values for categorical variables are treated as valid values.

Related Topics

SELECTPRED
Overview (SELECTPRED command)
Examples (SELECTPRED command)
Variable Lists (SELECTPRED command)
EXCEPT Subcommand (SELECTPRED command)
SCREENING Subcommand (SELECTPRED command)
CRITERIA Subcommand (SELECTPRED command)
PRINT Subcommand (SELECTPRED command)
PLOT Subcommand (SELECTPRED command)


PRINT Subcommand (SELECTPRED command)

SELECTPRED (command),SELECTPRED (command),SELECTPRED (command)
PRINT subcommand,PRINT subcommand,PRINT subcommand
PRINT (subcommand),PRINT (subcommand),PRINT (subcommand)
SELECTPRED command,SELECTPRED command,SELECTPRED command

The PRINT subcommand indicates the tabular output to display. If PRINT is not specified, the default tables are displayed. If PRINT is specified, only the requested tables are displayed.

CPS (keyword),CPS (keyword),CPS (keyword)
SELECTPRED command,SELECTPRED command,SELECTPRED command
CPS Keyword Collapse Hide details

CPS Keyword

The CPS keyword displays the case processing summary table, which summarizes the number of cases that are included and excluded in the analysis.

EXCLUDED (keyword),EXCLUDED (keyword),EXCLUDED (keyword)
SELECTPRED command,SELECTPRED command,SELECTPRED command
EXCLUDED Keyword Collapse Hide details

EXCLUDED Keyword

The EXCLUDED keyword displays a table of screened predictors. The table lists screened predictors by type (categorical or scale) and reason for being screened. The table includes predictors that are screened due to missing or constant values for all cases, as well as any additional screening that is requested on the SCREENING subcommand.

SUMMARY (keyword),SUMMARY (keyword),SUMMARY (keyword)
SELECTPRED command,SELECTPRED command,SELECTPRED command
PEARSONCHISQ (keyword),PEARSONCHISQ (keyword),PEARSONCHISQ (keyword)
SELECTPRED command,SELECTPRED command,SELECTPRED command
LRCHISQ (keyword),LRCHISQ (keyword),LRCHISQ (keyword)
SELECTPRED command,SELECTPRED command,SELECTPRED command
CRAMERSV (keyword),CRAMERSV (keyword),CRAMERSV (keyword)
SELECTPRED command,SELECTPRED command,SELECTPRED command
LAMBDA (keyword),LAMBDA (keyword),LAMBDA (keyword)
SELECTPRED command,SELECTPRED command,SELECTPRED command
SUMMARY Keyword Collapse Hide details

SUMMARY Keyword

The SUMMARY keyword displays a statistical summary of selected and unselected predictors. Selected predictors are always displayed. The maximum number of unselected predictors that can be displayed is determined by the SHOWUNSELECTED option on the CRITERIA subcommand.

The SUMMARY keyword may be followed, optionally, by one or more ranking criterion keywords in parentheses. When the target is categorical, and predictors are categorical or of mixed type, the RANKING option on the CRITERIA subcommand specifies the ranking criterion actually used by the algorithm to select predictors. The parenthesized list that follows the SUMMARY keyword displays additional ranking criteria for comparative purposes. The criterion that is actually used is always displayed, irrespective of whether it is specified following SUMMARY.

If a parenthesized list follows SUMMARY, then keywords in the list may be given in any order. If a specified keyword is inapplicable, it is ignored, and a warning is issued.

PEARSONCHISQ | Display the Pearson chi-square statistics.
LRCHISQ | Display the likelihood ratio chi-square statistics.
CRAMERSV | Display the Cramer's V statistics.
LAMBDA | Display the Lambda statistics.
SELECTED (keyword),SELECTED (keyword),SELECTED (keyword)
PCUTOFF command,PCUTOFF command,PCUTOFF command
SELECTED Keyword Collapse Hide details

SELECTED Keyword

The SELECTED keyword displays a table of selected predictors by type (categorical or scale).

NONE (keyword),NONE (keyword),NONE (keyword)
SELECTPRED command,SELECTPRED command,SELECTPRED command
NONE Keyword Collapse Hide details

NONE Keyword

The NONE keyword suppresses all tabular output except the Notes table and any warnings. This keyword may not be specified with any other keywords.

Related Topics

SELECTPRED
Overview (SELECTPRED command)
Examples (SELECTPRED command)
Variable Lists (SELECTPRED command)
EXCEPT Subcommand (SELECTPRED command)
SCREENING Subcommand (SELECTPRED command)
CRITERIA Subcommand (SELECTPRED command)
MISSING Subcommand (SELECTPRED command)
PLOT Subcommand (SELECTPRED command)


PLOT Subcommand (SELECTPRED command)

SELECTPRED (command),SELECTPRED (command),SELECTPRED (command)
PLOT subcommand,PLOT subcommand,PLOT subcommand
PLOT (subcommand),PLOT (subcommand),PLOT (subcommand)
SELECTPRED command,SELECTPRED command,SELECTPRED command
SUMMARY (keyword),SUMMARY (keyword),SUMMARY (keyword)
SELECTPRED command,SELECTPRED command,SELECTPRED command

The PLOT subcommand and SUMMARY keyword display a chart that summarizes the selected and unselected predictors. Selected predictors are always displayed. The maximum number of unselected predictors that can be displayed is determined by the SHOWUNSELECTED option on the CRITERIA subcommand.

Related Topics

SELECTPRED
Overview (SELECTPRED command)
Examples (SELECTPRED command)
Variable Lists (SELECTPRED command)
EXCEPT Subcommand (SELECTPRED command)
SCREENING Subcommand (SELECTPRED command)
CRITERIA Subcommand (SELECTPRED command)
MISSING Subcommand (SELECTPRED command)
PRINT Subcommand (SELECTPRED command)


SET

options,options,options
preferences,preferences,preferences
settings,settings,settings
SET (command),SET (command),SET (command)
SET (command),SET (command),SET (command)
syntax chart,syntax chart,syntax chart
release history,release history,release history

Note: Square brackets used in the SET syntax chart are required parts of the syntax and are not used to indicate optional elements. All subcommands are optional.

SET  WORKSPACE={6148**}  MXCELLS={AUTOMATIC**}
               {n     }          {n               }

  FORMAT={F8.2**} CTEMPLATE {NONE**              }
         {Fw.d  }           {'full path and name'}

   TLOOK={NONE**              }
             {'full path and name'}

   ONUMBERS={LABELS**}  OVARS={LABELS**}
           {VALUES  }        {NAMES   }
           {BOTH    }        {BOTH    }

   TFIT={BOTHLARGE**}  TNUMBERS={LABELS**}  TVARS={LABELS**}
       {LABELS     }           {VALUES  }        {NAMES   }
       {BOTH       }           {BOTH    }        {BOTH    }

  RNG={MC**}
      {MT  }

  SEED={2000000**}
       {RANDOM   }
       {n        }

  MTINDEX={2000000**}
          {RANDOM   }
          {n        }

  EPOCH={AUTOMATIC }
        {begin year}

  {ERRORS   } =  {LISTING**}
  {RESULTS  }    {NONE     }

  {PRINTBACK} = {NONE** }
  {MESSAGES }    {LISTING}

  MEXPAND={ON**} MPRINT={OFF**} MNEST={50**} MITERATE={1000**}
          {OFF }        {ON   }       {n    }          {n     }

  BLANKS={SYSMIS**}     UNDEFINED={WARN**}
         {value   }               {NOWARN}

   MXWARNS={10**}    MXLOOPS={40**}  MXERRS={100**}
          {n    }            {n   }         {n    }

  BLOCK={X'2A'**    }
        {X'hexchar' }
        {'character'}

  BOX={X'2D7C2B2B2B2B2B2B2B2B2B'**}
      {X'hexstring'                }
      {'character'                      }

  CCA={'-,,,'  } CCB={'-,,,'  } CCC={'-,,,'  }
     {'format'}     {'format’}     {'format'}

  CCD={'-,,,'  } CCE={'-,,,'  }
      {'format’}     {'format'}

  DECIMAL={COMMA}
          {DOT  }

  CACHE={20**}
        {n   }

   HEADER={NO** }
         {YES  }
         {BLANK}

  LENGTH={59**} WIDTH={80**}
         {n   }       {255 }
         {NONE}       {n   }

  SMALL=n

  OLANG=output language

  DEFOLANG=default output language

  SCALEMIN=n

  SORT={EXTERNAL**}
       {INTERNAL  }
       {SS        }

  LOCALE='localeid'

  THREADS=n

  MCACHE=n

  UNICODE={OFF**}
          {ON   }

  FUZZBITS={6**}
           {n  }

  MIOUTPUT = [OBSERVED** IMPUTED** POOLED** DIAGNOSTICS**]

  ROWSBREAK={100**}            {n    }
            {NONE }

  CELLSBREAK={10000**}
             {n      }

  TOLERANCE={1**}
            {n }

  ZCOMPRESSION={YES}
               {NO }

** Default setting at installation.

This command takes effect immediately. It does not read the active dataset or execute pending transformations. See the topic Command Order for more information.

Release History Collapse Hide details

Release History

Release 13.0

• RNG and MTINDEX subcommands introduced.

• Default for MXERRS subcommand increased to 100.

• SORT subcommand introduced.

• LOCALE subcommand introduced.

Release 14.0

• Default for WORKSPACE subcommand increased to 6148.

Release 15.0

• LABELS replaces VALUES as the default for the TNUMBERS subcommand.

• JOURNAL subcommand is obsolete and no longer supported.

• Value EXTERNAL added to list for SORT subcommand, replacing the value INTERNAL as the default. Value SS is deprecated.

Release 16.0

• MCACHE subcommand introduced.

• THREADS subcommand introduced.

• UNICODE subcommand introduced.

Release 16.0.1

• BOTHLARGE keyword introduced for the TFIT subcommand.

Release 17.0

• FUZZBITS subcommand introduced.

• MIOUTPUT subcommand introduced.

Release 18.0

• ROWSBREAK, CELLSBREAK, and TOLERANCE subcommands introduced for controlling display of large pivot tables.

• ZCOMPRESSION subcommand introduced.

• COMPRESSION subcommand is obsolete and ignored.

Many of the settings available with the SET command can also be specified from the Options dialog.

Related Topics

Overview (SET command)
Example (SET command)
WORKSPACE and MXCELLS Subcommands (SET command)
FORMAT Subcommand (SET command)
TLOOK and CTEMPLATE Subcommands (SET command)
ONUMBERS, OVARS, TNUMBERS, and TVARS Subcommands (SET command)
TFIT Subcommand (SET command)
RNG, SEED, and MTINDEX Subcommands (SET command)
EPOCH Subcommand (SET command)
ERRORS, MESSAGES, RESULTS, and PRINTBACK Subcommands (SET command)
JOURNAL Subcommand (SET command)
MEXPAND and MPRINT Subcommands (SET command)
MITERATE and MNEST Subcommands (SET command)
BLANKS Subcommand (SET command)
UNDEFINED Subcommand (SET command)
MXERRS Subcommand (SET command)
MXWARNS Subcommand (SET command)
MXLOOPS Subcommand (SET command)
EXTENSIONS Subcommand (SET command)
BLOCK Subcommand (SET command)
BOX Subcommand (SET command)
LENGTH and WIDTH Subcommands (SET command)
HEADER Subcommand (SET command)
CCA, CCB, CCC, CCD, and CCE Subcommands (SET command)
DECIMAL Subcommand (SET command)
CACHE Subcommand (SET command)
SMALL Subcommand (SET command)
OLANG Subcommand (SET command)
DEFOLANG Subcommand (SET command)
SCALEMIN Subcommand (SET command)
SORT Subcommand (SET command)
LOCALE Subcommand (SET command)
THREADS Subcommand (SET command)
MCACHE Subcommand (SET command)
UNICODE Subcommand
FUZZBITS Subcommand (SET command)
MIOUTPUT Subcommand (SET command)
ROWSBREAK, CELLSBREAK, and TOLERANCE Subcommands (SET command)
ZCOMPRESSION Subcommand (SET command)


Overview (SET command)

YES (keyword),YES (keyword),YES (keyword)
SET command,SET command,SET command
NO (keyword),NO (keyword),NO (keyword)
SET command,SET command,SET command
SHOW (command),SHOW (command),SHOW (command)
with SET command,with SET command,with SET command
SET (command),SET (command),SET (command)
with SHOW command,with SHOW command,with SHOW command
PRESERVE (command),PRESERVE (command),PRESERVE (command)
with SET command,with SET command,with SET command
RESTORE (command),RESTORE (command),RESTORE (command)
with SET command,with SET command,with SET command
SET (command),SET (command),SET (command)
with RESTORE command,with RESTORE command,with RESTORE command
SET (command),SET (command),SET (command)
with PRESERVE command,with PRESERVE command,with PRESERVE command

Many of the running options in the program can be tailored to your own preferences with the SET command. The default settings for these options vary from system to system. To display the current settings, use the SHOW command. A setting that is changed by SET remains in effect for the entire working session unless changed again by another SET command. The PRESERVE command saves the current settings so that you can return to them later in the session by using the RESTORE command. PRESERVE and RESTORE are especially useful with the macro facility.

Options Collapse Hide details

Options

Memory Management. Use the WORKSPACE subcommand to dynamically allocate memory when some procedures indicate memory shortage. Use the MXCELLS subcommand to increase maximum cell numbers for a pivot table.

Output Format. Use the FORMAT subcommand to change the default (F8.2) print and write formats used for numeric variables. Use the TLOOK and CTEMPLATE subcommands to specify a TableLook file and/or a chart template file. (Note: TableLooks created in earlier versions of PASW Statistics cannot be used in version 16.0 or later.) Use the ONUMBERS, OVARS, TNUMBERS, and TVARS subcommands to define default display of variables in the outline or pivot tables. Use the TFIT subcommand to specify default column widths.

Samples and Random Numbers. You can use the RNG, SEED, and MTINDEX subcommands to change the random number generator and initialization value.

Output Destination. You can use the ERRORS, MESSAGES, PRINTBACK, and RESULTS subcommands to send error messages, resource-utilization messages, command printback, and the output from your commands to your screen and/or to a file. You can also suppress each of these items by using the keyword NONE.

Journal Files. You can use the JOURNAL subcommand to determine whether the program keeps a journal file during a session. A journal file records the commands that you have entered along with any error or warning messages that are generated by the commands. A modified journal file can be used as a command file in subsequent sessions.

Macro Displays. You can use the MEXPAND, MITERATE, and MNEST subcommands to control macro expansion, the maximum number of loop iterations, and nesting levels within a macro. You can also use the MPRINT subcommands to control the display of the variables, commands, and parameters that a macro uses.

Blanks and Undefined Input Data. You can use the BLANKS subcommand to specify the value that the program should use when it encounters a completely blank field for a numeric variable. You can also use UNDEFINED to turn off the warning message that the program issues when it encounters an invalid value for a numeric variable.

Maximum Warnings. You can use MXWARNS to limit the warning messages for each set of commands that read the data, after which further warnings are suppressed.

Maximum Loops. You can use MXLOOPS to raise or lower the maximum number of iterations that are allowed for the LOOP-END LOOP structure.

Scratch File Compression. You can specify whether scratch files are kept in compressed or uncompressed form using the ZCOMPRESSION subcommand.

Custom Currency Formats. You can customize currency formats for your own applications using the CCA, CCB, CCC, CCD, and CCE subcommands. For example, you can display currency as French francs rather than American dollars.

Cache File. The CACHE subcommand creates a complete copy of the active data file in temporary disk space after a specified number of changes in the active data file. Caching the active data file can improve performance.

Large Pivot Table Display. The ROWSBREAK, CELLSBREAK, and TOLERANCE subcommands control the display of large pivot tables in the Viewer. By default, tables with many rows are displayed in sections of 100 rows. To turn off this feature and always display the complete table regardless of size, specify ROWSBREAK=NONE. See the topic ROWSBREAK, CELLSBREAK, and TOLERANCE Subcommands (SET command) for more information.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is at least one subcommand.

Subcommand Order Collapse Hide details

Subcommand Order

Subcommands can be specified in any order.

Syntax Rules Collapse Hide details

Syntax Rules

• You can specify as many subcommands as needed. Subcommands must be separated by at least one space or slash.

• Only one keyword or argument can be specified for each subcommand.

• SET can be used more than once in the command sequence.

• YES and ON are aliases for each other. NO and OFF are aliases for each other.

Operations Collapse Hide details

Operations

• Settings that are specified on SET remain in effect until they are changed by another SET command or until the current session is ended.

• Each time that SET is used, only the specified settings are changed. All other settings remain at their previous settings or the default.

• Where filenames are specified, they must include the full path. Relative file specifications, file handles, and filenames without a path are not allowed.

Related Topics

SET
Example (SET command)
WORKSPACE and MXCELLS Subcommands (SET command)
FORMAT Subcommand (SET command)
TLOOK and CTEMPLATE Subcommands (SET command)
ONUMBERS, OVARS, TNUMBERS, and TVARS Subcommands (SET command)
TFIT Subcommand (SET command)
RNG, SEED, and MTINDEX Subcommands (SET command)
EPOCH Subcommand (SET command)
ERRORS, MESSAGES, RESULTS, and PRINTBACK Subcommands (SET command)
JOURNAL Subcommand (SET command)
MEXPAND and MPRINT Subcommands (SET command)
MITERATE and MNEST Subcommands (SET command)
BLANKS Subcommand (SET command)
UNDEFINED Subcommand (SET command)
MXERRS Subcommand (SET command)
MXWARNS Subcommand (SET command)
MXLOOPS Subcommand (SET command)
EXTENSIONS Subcommand (SET command)
BLOCK Subcommand (SET command)
BOX Subcommand (SET command)
LENGTH and WIDTH Subcommands (SET command)
HEADER Subcommand (SET command)
CCA, CCB, CCC, CCD, and CCE Subcommands (SET command)
DECIMAL Subcommand (SET command)
CACHE Subcommand (SET command)
SMALL Subcommand (SET command)
OLANG Subcommand (SET command)
DEFOLANG Subcommand (SET command)
SCALEMIN Subcommand (SET command)
SORT Subcommand (SET command)
LOCALE Subcommand (SET command)
THREADS Subcommand (SET command)
MCACHE Subcommand (SET command)
UNICODE Subcommand
FUZZBITS Subcommand (SET command)
MIOUTPUT Subcommand (SET command)
ROWSBREAK, CELLSBREAK, and TOLERANCE Subcommands (SET command)
ZCOMPRESSION Subcommand (SET command)


Example (SET command)

SET BLANKS=0/UNDEFINED=NOWARN.

• BLANKS specifies 0 as the value that the program should use when it encounters a completely blank field for a numeric variable.

• UNDEFINED=NOWARN suppresses the message that is displayed whenever anything other than a number or a blank is encountered as the value for a numeric variable.

Related Topics

SET
Overview (SET command)
WORKSPACE and MXCELLS Subcommands (SET command)
FORMAT Subcommand (SET command)
TLOOK and CTEMPLATE Subcommands (SET command)
ONUMBERS, OVARS, TNUMBERS, and TVARS Subcommands (SET command)
TFIT Subcommand (SET command)
RNG, SEED, and MTINDEX Subcommands (SET command)
EPOCH Subcommand (SET command)
ERRORS, MESSAGES, RESULTS, and PRINTBACK Subcommands (SET command)
JOURNAL Subcommand (SET command)
MEXPAND and MPRINT Subcommands (SET command)
MITERATE and MNEST Subcommands (SET command)
BLANKS Subcommand (SET command)
UNDEFINED Subcommand (SET command)
MXERRS Subcommand (SET command)
MXWARNS Subcommand (SET command)
MXLOOPS Subcommand (SET command)
EXTENSIONS Subcommand (SET command)
BLOCK Subcommand (SET command)
BOX Subcommand (SET command)
LENGTH and WIDTH Subcommands (SET command)
HEADER Subcommand (SET command)
CCA, CCB, CCC, CCD, and CCE Subcommands (SET command)
DECIMAL Subcommand (SET command)
CACHE Subcommand (SET command)
SMALL Subcommand (SET command)
OLANG Subcommand (SET command)
DEFOLANG Subcommand (SET command)
SCALEMIN Subcommand (SET command)
SORT Subcommand (SET command)
LOCALE Subcommand (SET command)
THREADS Subcommand (SET command)
MCACHE Subcommand (SET command)
UNICODE Subcommand
FUZZBITS Subcommand (SET command)
MIOUTPUT Subcommand (SET command)
ROWSBREAK, CELLSBREAK, and TOLERANCE Subcommands (SET command)
ZCOMPRESSION Subcommand (SET command)


WORKSPACE and MXCELLS Subcommands (SET command)

SET (command),SET (command),SET (command)
WORKSPACE subcommand,WORKSPACE subcommand,WORKSPACE subcommand
WORKSPACE (subcommand),WORKSPACE (subcommand),WORKSPACE (subcommand)
SHOW command,SHOW command,SHOW command
SET (command),SET (command),SET (command)
MXMEMORY subcommand,MXMEMORY subcommand,MXMEMORY subcommand
MXMEMORY (subcommand),MXMEMORY (subcommand),MXMEMORY (subcommand)
SHOW command,SHOW command,SHOW command
SET (command),SET (command),SET (command)
MXCELLS subcommand,MXCELLS subcommand,MXCELLS subcommand
MXCELLS (subcommand),MXCELLS (subcommand),MXCELLS (subcommand)
SHOW command,SHOW command,SHOW command

WORKSPACE allocates more memory for some procedures when you receive a message indicating that the available memory has been used up or indicating that only a given number of variables can be processed. MXCELLS increases the maximum number of cells you can create for a new pivot table when you receive a warning that a pivot table cannot be created because it exceeds the maximum number of cells that are allowed.

• WORKSPACE allocates workspace memory in kilobytes for some procedures that allocate only one block of memory. The default is 6148.

• Do not increase the workspace memory allocation unless the program issues a message that there is not enough memory to complete a procedure.

• Use MXCELLS with caution. Set MXCELLS at a number higher than the limit indicated in the warning message that you receive. After the table is created, restore the number to the default.

• The memory-allocation or cell maximum number increase takes effect as soon as you run the SET command.

Note: The MXMEMORY subcommand is no longer supported.

Related Topics

SET
Overview (SET command)
Example (SET command)
FORMAT Subcommand (SET command)
TLOOK and CTEMPLATE Subcommands (SET command)
ONUMBERS, OVARS, TNUMBERS, and TVARS Subcommands (SET command)
TFIT Subcommand (SET command)
RNG, SEED, and MTINDEX Subcommands (SET command)
EPOCH Subcommand (SET command)
ERRORS, MESSAGES, RESULTS, and PRINTBACK Subcommands (SET command)
JOURNAL Subcommand (SET command)
MEXPAND and MPRINT Subcommands (SET command)
MITERATE and MNEST Subcommands (SET command)
BLANKS Subcommand (SET command)
UNDEFINED Subcommand (SET command)
MXERRS Subcommand (SET command)
MXWARNS Subcommand (SET command)
MXLOOPS Subcommand (SET command)
EXTENSIONS Subcommand (SET command)
BLOCK Subcommand (SET command)
BOX Subcommand (SET command)
LENGTH and WIDTH Subcommands (SET command)
HEADER Subcommand (SET command)
CCA, CCB, CCC, CCD, and CCE Subcommands (SET command)
DECIMAL Subcommand (SET command)
CACHE Subcommand (SET command)
SMALL Subcommand (SET command)
OLANG Subcommand (SET command)
DEFOLANG Subcommand (SET command)
SCALEMIN Subcommand (SET command)
SORT Subcommand (SET command)
LOCALE Subcommand (SET command)
THREADS Subcommand (SET command)
MCACHE Subcommand (SET command)
UNICODE Subcommand
FUZZBITS Subcommand (SET command)
MIOUTPUT Subcommand (SET command)
ROWSBREAK, CELLSBREAK, and TOLERANCE Subcommands (SET command)
ZCOMPRESSION Subcommand (SET command)


FORMAT Subcommand (SET command)

FORMAT (subcommand),FORMAT (subcommand),FORMAT (subcommand)
SET command,SET command,SET command
SET (command),SET (command),SET (command)
FORMAT subcommand,FORMAT subcommand,FORMAT subcommand
preferences,preferences,preferences
default variable format,default variable format,default variable format
variables,variables,variables
controlling default format,controlling default format,controlling default format

FORMAT specifies the default print and write formats for numeric variables. This default format applies to numeric variables that are defined on DATA LIST in freefield format and to all numeric variables that are created by transformation commands (unless a format is explicitly specified).

• The specification must be a simple F format. The default is F8.2.

• You can use the PRINT FORMATS, WRITE FORMATS, and FORMATS commands to change print and write formats.

• Format specifications on FORMAT are output formats. When specifying the width, enough positions must be allowed so that any punctuation characters, such as decimal points, commas, and dollar signs, can be included.

• If a numeric data value exceeds its width specification, the program still attempts to display some value. The program rounds decimal values, removes punctuation characters, tries scientific notation, and finally, if there is still not enough space, produces asterisks indicating that a value is present but cannot be displayed in the assigned width.

Related Topics

SET
Overview (SET command)
Example (SET command)
WORKSPACE and MXCELLS Subcommands (SET command)
TLOOK and CTEMPLATE Subcommands (SET command)
ONUMBERS, OVARS, TNUMBERS, and TVARS Subcommands (SET command)
TFIT Subcommand (SET command)
RNG, SEED, and MTINDEX Subcommands (SET command)
EPOCH Subcommand (SET command)
ERRORS, MESSAGES, RESULTS, and PRINTBACK Subcommands (SET command)
JOURNAL Subcommand (SET command)
MEXPAND and MPRINT Subcommands (SET command)
MITERATE and MNEST Subcommands (SET command)
BLANKS Subcommand (SET command)
UNDEFINED Subcommand (SET command)
MXERRS Subcommand (SET command)
MXWARNS Subcommand (SET command)
MXLOOPS Subcommand (SET command)
EXTENSIONS Subcommand (SET command)
BLOCK Subcommand (SET command)
BOX Subcommand (SET command)
LENGTH and WIDTH Subcommands (SET command)
HEADER Subcommand (SET command)
CCA, CCB, CCC, CCD, and CCE Subcommands (SET command)
DECIMAL Subcommand (SET command)
CACHE Subcommand (SET command)
SMALL Subcommand (SET command)
OLANG Subcommand (SET command)
DEFOLANG Subcommand (SET command)
SCALEMIN Subcommand (SET command)
SORT Subcommand (SET command)
LOCALE Subcommand (SET command)
THREADS Subcommand (SET command)
MCACHE Subcommand (SET command)
UNICODE Subcommand
FUZZBITS Subcommand (SET command)
MIOUTPUT Subcommand (SET command)
ROWSBREAK, CELLSBREAK, and TOLERANCE Subcommands (SET command)
ZCOMPRESSION Subcommand (SET command)


TLOOK and CTEMPLATE Subcommands (SET command)

SET (command),SET (command),SET (command)
TLOOK subcommand,TLOOK subcommand,TLOOK subcommand
SET (command),SET (command),SET (command)
CTEMPLATE subcommand,CTEMPLATE subcommand,CTEMPLATE subcommand
TLOOK (subcommand),TLOOK (subcommand),TLOOK (subcommand)
SET command,SET command,SET command
CTEMPLATE (subcommand),CTEMPLATE (subcommand),CTEMPLATE (subcommand)
SET command,SET command,SET command
TableLooks,TableLooks,TableLooks
chart templates,chart templates,chart templates

TLOOK and CTEMPLATE specify a file that is used to define the table and chart appearance in the output. The default for either command is NONE, which produces tables and charts that use the system defaults.

• TLOOK determines the properties of output tables that are produced. The properties include the borders, placement of titles, column and row labels, text font, and column and cell formats. (Note: TableLooks created in earlier versions of PASW Statistics cannot be used in version 16.0 or later.)

• CTEMPLATE determines the properties of output charts and plots. The properties include line style, color, fill pattern, and text font of relevant chart elements (such as frames, titles, labels, and legends).

• The specification on TLOOK or CTEMPLATE remains in effect until a new TLOOK or CTEMPLATE is specified.

NONE | Use the system defaults. The tables and charts in the output do not use customized properties.
filename | Use the specified file as a template for tables/charts in the output. You should specify a full path, enclosed in quotes (Directory settings on the CD and INSERT commands do not apply to the template file location).

Related Topics

SET
Overview (SET command)
Example (SET command)
WORKSPACE and MXCELLS Subcommands (SET command)
FORMAT Subcommand (SET command)
ONUMBERS, OVARS, TNUMBERS, and TVARS Subcommands (SET command)
TFIT Subcommand (SET command)
RNG, SEED, and MTINDEX Subcommands (SET command)
EPOCH Subcommand (SET command)
ERRORS, MESSAGES, RESULTS, and PRINTBACK Subcommands (SET command)
JOURNAL Subcommand (SET command)
MEXPAND and MPRINT Subcommands (SET command)
MITERATE and MNEST Subcommands (SET command)
BLANKS Subcommand (SET command)
UNDEFINED Subcommand (SET command)
MXERRS Subcommand (SET command)
MXWARNS Subcommand (SET command)
MXLOOPS Subcommand (SET command)
EXTENSIONS Subcommand (SET command)
BLOCK Subcommand (SET command)
BOX Subcommand (SET command)
LENGTH and WIDTH Subcommands (SET command)
HEADER Subcommand (SET command)
CCA, CCB, CCC, CCD, and CCE Subcommands (SET command)
DECIMAL Subcommand (SET command)
CACHE Subcommand (SET command)
SMALL Subcommand (SET command)
OLANG Subcommand (SET command)
DEFOLANG Subcommand (SET command)
SCALEMIN Subcommand (SET command)
SORT Subcommand (SET command)
LOCALE Subcommand (SET command)
THREADS Subcommand (SET command)
MCACHE Subcommand (SET command)
UNICODE Subcommand
FUZZBITS Subcommand (SET command)
MIOUTPUT Subcommand (SET command)
ROWSBREAK, CELLSBREAK, and TOLERANCE Subcommands (SET command)
ZCOMPRESSION Subcommand (SET command)


ONUMBERS, OVARS, TNUMBERS, and TVARS Subcommands (SET command)

SET (command),SET (command),SET (command)
TNUMBERS subcommand,TNUMBERS subcommand,TNUMBERS subcommand
TNUMBERS (subcommand),TNUMBERS (subcommand),TNUMBERS (subcommand)
SET command,SET command,SET command
SET (command),SET (command),SET (command)
OVARS subcommand,OVARS subcommand,OVARS subcommand
OVARS (subcommand),OVARS (subcommand),OVARS (subcommand)
SET command,SET command,SET command
SET (command),SET (command),SET (command)
TVARS subcommand,TVARS subcommand,TVARS subcommand
TVARS (subcommand),TVARS (subcommand),TVARS (subcommand)
SET command,SET command,SET command
SET (command),SET (command),SET (command)
ONUMBERS subcommand,ONUMBERS subcommand,ONUMBERS subcommand
ONUMBERS (subcommand),ONUMBERS (subcommand),ONUMBERS (subcommand)
SET command,SET command,SET command

ONUMBERS, OVARS, TNUMBERS, and TVARS control how variables are displayed in the outline for pivot table output and in the pivot tables.

• ONUMBERS controls the display of variable values in the outline for pivot tables. The default is LABELS.

• OVARS controls the display of variables in the outline for pivot tables. The default is LABELS.

• TNUMBERS controls the display of variable values and/or value labels in the pivot tables. The default is LABELS.

• TVARS controls the display of variable names and/or variable labels in the pivot tables. The default is LABELS.

NAMES | Display variable names.
VALUES | Display variable values.
LABELS | Display variable labels.
BOTH | Display both labels and values for variables or both names and labels for variables.

Related Topics

SET
Overview (SET command)
Example (SET command)
WORKSPACE and MXCELLS Subcommands (SET command)
FORMAT Subcommand (SET command)
TLOOK and CTEMPLATE Subcommands (SET command)
TFIT Subcommand (SET command)
RNG, SEED, and MTINDEX Subcommands (SET command)
EPOCH Subcommand (SET command)
ERRORS, MESSAGES, RESULTS, and PRINTBACK Subcommands (SET command)
JOURNAL Subcommand (SET command)
MEXPAND and MPRINT Subcommands (SET command)
MITERATE and MNEST Subcommands (SET command)
BLANKS Subcommand (SET command)
UNDEFINED Subcommand (SET command)
MXERRS Subcommand (SET command)
MXWARNS Subcommand (SET command)
MXLOOPS Subcommand (SET command)
EXTENSIONS Subcommand (SET command)
BLOCK Subcommand (SET command)
BOX Subcommand (SET command)
LENGTH and WIDTH Subcommands (SET command)
HEADER Subcommand (SET command)
CCA, CCB, CCC, CCD, and CCE Subcommands (SET command)
DECIMAL Subcommand (SET command)
CACHE Subcommand (SET command)
SMALL Subcommand (SET command)
OLANG Subcommand (SET command)
DEFOLANG Subcommand (SET command)
SCALEMIN Subcommand (SET command)
SORT Subcommand (SET command)
LOCALE Subcommand (SET command)
THREADS Subcommand (SET command)
MCACHE Subcommand (SET command)
UNICODE Subcommand
FUZZBITS Subcommand (SET command)
MIOUTPUT Subcommand (SET command)
ROWSBREAK, CELLSBREAK, and TOLERANCE Subcommands (SET command)
ZCOMPRESSION Subcommand (SET command)


TFIT Subcommand (SET command)

TFIT controls the default column widths of the pivot tables. The default at installation is BOTHLARGE.

BOTHLARGE | Adjust column widths to accommodate both labels and data, except for very large tables. For very large tables (more than 10,000 cells), column widths are adjusted to accomodate labels only, and data values that are wider than the column labels may be truncated.
BOTH | Adjust column widths to accommodate both labels and data.
LABELS | Adjust column widths to accommodate labels only. This setting produces compact tables, but data values that are wider than labels may be truncated.

Related Topics

SET
Overview (SET command)
Example (SET command)
WORKSPACE and MXCELLS Subcommands (SET command)
FORMAT Subcommand (SET command)
TLOOK and CTEMPLATE Subcommands (SET command)
ONUMBERS, OVARS, TNUMBERS, and TVARS Subcommands (SET command)
RNG, SEED, and MTINDEX Subcommands (SET command)
EPOCH Subcommand (SET command)
ERRORS, MESSAGES, RESULTS, and PRINTBACK Subcommands (SET command)
JOURNAL Subcommand (SET command)
MEXPAND and MPRINT Subcommands (SET command)
MITERATE and MNEST Subcommands (SET command)
BLANKS Subcommand (SET command)
UNDEFINED Subcommand (SET command)
MXERRS Subcommand (SET command)
MXWARNS Subcommand (SET command)
MXLOOPS Subcommand (SET command)
EXTENSIONS Subcommand (SET command)
BLOCK Subcommand (SET command)
BOX Subcommand (SET command)
LENGTH and WIDTH Subcommands (SET command)
HEADER Subcommand (SET command)
CCA, CCB, CCC, CCD, and CCE Subcommands (SET command)
DECIMAL Subcommand (SET command)
CACHE Subcommand (SET command)
SMALL Subcommand (SET command)
OLANG Subcommand (SET command)
DEFOLANG Subcommand (SET command)
SCALEMIN Subcommand (SET command)
SORT Subcommand (SET command)
LOCALE Subcommand (SET command)
THREADS Subcommand (SET command)
MCACHE Subcommand (SET command)
UNICODE Subcommand
FUZZBITS Subcommand (SET command)
MIOUTPUT Subcommand (SET command)
ROWSBREAK, CELLSBREAK, and TOLERANCE Subcommands (SET command)
ZCOMPRESSION Subcommand (SET command)


RNG, SEED, and MTINDEX Subcommands (SET command)

SET (command),SET (command),SET (command)
RNG subcommand,RNG subcommand,RNG subcommand
RNG (subcommand),RNG (subcommand),RNG (subcommand)
SET command,SET command,SET command
SET (command),SET (command),SET (command)
MTINDEX subcommand,MTINDEX subcommand,MTINDEX subcommand
MTINDEX (subcommand),MTINDEX (subcommand),MTINDEX (subcommand)
SET command,SET command,SET command
SET (command),SET (command),SET (command)
SEED subcommand,SEED subcommand,SEED subcommand
SEED (subcommand),SEED (subcommand),SEED (subcommand)
SET command,SET command,SET command
preferences,preferences,preferences
random number seed,random number seed,random number seed
random number seed,random number seed,random number seed
specifying,specifying,specifying
seed,seed,seed

Two random number generators are available. The generator that is currently in effect is set by the RNG subcommand:

RNG=MC | The random number generator that is used in version 12 and previous releases. If you need to reproduce randomized results that were generated in previous releases based on a specified seed value, use this random number generator. This setting is the default.
RNG=MT | Mersenne Twister random number generator. This generator is a newer random number generator that is more reliable for simulation purposes. If reproducing randomized results from version 12 or earlier is not an issue, use this random number generator.

If you need to reproduce the same randomized results in the future, you can set the initialization value for the random number generator. The initialization value applies to the current session only. It is automatically reset to the default at the start of each new session.

SEED={integer | RANDOM} | Initialization value for MC random number generator. The value must be a positive integer that is less than 2,000,000,000 or the keyword RANDOM, which randomly sets the initialization value. The default is 2,000,000.
MTINDEX={value | RANDOM} | Initialization value for the MT random number generator. The value can be any positive or negative value, including fractional values (expressed as decimals), or the keyword RANDOM. The default is 2,000,000.

Example

SET RNG=MT MTINDEX=-12345.678.

Related Topics

SET
Overview (SET command)
Example (SET command)
WORKSPACE and MXCELLS Subcommands (SET command)
FORMAT Subcommand (SET command)
TLOOK and CTEMPLATE Subcommands (SET command)
ONUMBERS, OVARS, TNUMBERS, and TVARS Subcommands (SET command)
TFIT Subcommand (SET command)
EPOCH Subcommand (SET command)
ERRORS, MESSAGES, RESULTS, and PRINTBACK Subcommands (SET command)
JOURNAL Subcommand (SET command)
MEXPAND and MPRINT Subcommands (SET command)
MITERATE and MNEST Subcommands (SET command)
BLANKS Subcommand (SET command)
UNDEFINED Subcommand (SET command)
MXERRS Subcommand (SET command)
MXWARNS Subcommand (SET command)
MXLOOPS Subcommand (SET command)
EXTENSIONS Subcommand (SET command)
BLOCK Subcommand (SET command)
BOX Subcommand (SET command)
LENGTH and WIDTH Subcommands (SET command)
HEADER Subcommand (SET command)
CCA, CCB, CCC, CCD, and CCE Subcommands (SET command)
DECIMAL Subcommand (SET command)
CACHE Subcommand (SET command)
SMALL Subcommand (SET command)
OLANG Subcommand (SET command)
DEFOLANG Subcommand (SET command)
SCALEMIN Subcommand (SET command)
SORT Subcommand (SET command)
LOCALE Subcommand (SET command)
THREADS Subcommand (SET command)
MCACHE Subcommand (SET command)
UNICODE Subcommand
FUZZBITS Subcommand (SET command)
MIOUTPUT Subcommand (SET command)
ROWSBREAK, CELLSBREAK, and TOLERANCE Subcommands (SET command)
ZCOMPRESSION Subcommand (SET command)


EPOCH Subcommand (SET command)

EPOCH (subcommand),EPOCH (subcommand),EPOCH (subcommand)
SET (command),SET (command),SET (command)
SET (command),SET (command),SET (command)
EPOCH subcommand,EPOCH subcommand,EPOCH subcommand

EPOCH defines the 100-year-span dates that are entered with two-digit years and date functions with a two-digit year specification.

AUTOMATIC | 100-year span beginning 69 years prior to the current date and ending 30 years after the current date.
begin year | First year of the 100-year span.

Examples

SET EPOCH=1900.

• All dates that are entered with two-digit year values are read as years between 1900 and 1999. For example, a date that is entered as 10/29/87 is read as 10/29/1987.

SET EPOCH=1980.

• Dates that are entered with two-digit year values between 80 and 99 are read as years between 1980 and 1999.

• Dates that are entered with two-digit year values between 00 and 79 are read as years between 2000 and 2079.

Related Topics

SET
Overview (SET command)
Example (SET command)
WORKSPACE and MXCELLS Subcommands (SET command)
FORMAT Subcommand (SET command)
TLOOK and CTEMPLATE Subcommands (SET command)
ONUMBERS, OVARS, TNUMBERS, and TVARS Subcommands (SET command)
TFIT Subcommand (SET command)
RNG, SEED, and MTINDEX Subcommands (SET command)
ERRORS, MESSAGES, RESULTS, and PRINTBACK Subcommands (SET command)
JOURNAL Subcommand (SET command)
MEXPAND and MPRINT Subcommands (SET command)
MITERATE and MNEST Subcommands (SET command)
BLANKS Subcommand (SET command)
UNDEFINED Subcommand (SET command)
MXERRS Subcommand (SET command)
MXWARNS Subcommand (SET command)
MXLOOPS Subcommand (SET command)
EXTENSIONS Subcommand (SET command)
BLOCK Subcommand (SET command)
BOX Subcommand (SET command)
LENGTH and WIDTH Subcommands (SET command)
HEADER Subcommand (SET command)
CCA, CCB, CCC, CCD, and CCE Subcommands (SET command)
DECIMAL Subcommand (SET command)
CACHE Subcommand (SET command)
SMALL Subcommand (SET command)
OLANG Subcommand (SET command)
DEFOLANG Subcommand (SET command)
SCALEMIN Subcommand (SET command)
SORT Subcommand (SET command)
LOCALE Subcommand (SET command)
THREADS Subcommand (SET command)
MCACHE Subcommand (SET command)
UNICODE Subcommand
FUZZBITS Subcommand (SET command)
MIOUTPUT Subcommand (SET command)
ROWSBREAK, CELLSBREAK, and TOLERANCE Subcommands (SET command)
ZCOMPRESSION Subcommand (SET command)


ERRORS, MESSAGES, RESULTS, and PRINTBACK Subcommands (SET command)

SET (command),SET (command),SET (command)
PRINTBACK subcommand,PRINTBACK subcommand,PRINTBACK subcommand
ERRORS (subcommand),ERRORS (subcommand),ERRORS (subcommand)
SET command,SET command,SET command
SET (command),SET (command),SET (command)
ERRORS subcommand,ERRORS subcommand,ERRORS subcommand
RESULTS (subcommand),RESULTS (subcommand),RESULTS (subcommand)
SET command,SET command,SET command
SET (command),SET (command),SET (command)
RESULTS subcommand,RESULTS subcommand,RESULTS subcommand
MESSAGES (subcommand),MESSAGES (subcommand),MESSAGES (subcommand)
SET command,SET command,SET command
SET (command),SET (command),SET (command)
MESSAGES subcommand,MESSAGES subcommand,MESSAGES subcommand
PRINTBACK (subcommand),PRINTBACK (subcommand),PRINTBACK (subcommand)
SET command,SET command,SET command
preferences,preferences,preferences
output,output,output
output files,output files,output files
display command syntax,display command syntax,display command syntax
warnings,warnings,warnings
displaying,displaying,displaying
errors,errors,errors
displaying,displaying,displaying
output files,output files,output files
destination of,destination of,destination of
preferences,preferences,preferences
display resource messages,display resource messages,display resource messages
preferences,preferences,preferences
display errors,display errors,display errors
preferences,preferences,preferences
display warnings,display warnings,display warnings
preferences,preferences,preferences
display statistical results,display statistical results,display statistical results

ERRORS, MESSAGES, RESULTS, and PRINTBACK are used with keywords LISTING and NONE to route program output. ERRORS, MESSAGES, and RESULTS apply only to text output. PRINTBACK applies to all commands that are entered in a syntax window or generated from a dialog box during a session.

• ERRORS refers to both error messages and warning messages for text output.

• MESSAGES refers to resource-utilization messages that are displayed with text output, including the heading and the summaries (such as the amount of memory that is used by a command).

• RESULTS refers to the text output that is generated by program commands.

• PRINTBACK refers to command printback in the journal file. Syntax is always displayed as part of the Notes in the syntax window.

LISTING (keyword),LISTING (keyword),LISTING (keyword)
SET command,SET command,SET command
NONE (keyword),NONE (keyword),NONE (keyword)
SET command,SET command,SET command
LISTING | Display output in the designated output window. This alias is ON or YES. For PRINTBACK, the alias is BOTH. The executed commands are printed back in the journal and displayed in the log in the output window. You can either display an icon only or list all commands.
NONE | Suppress the output. The alias is NO or OFF.

The default routes vary from operating system to operating system and vary according to the way commands are executed. In windowed environments, the typical defaults are:

Subcommand | Windowed Environments
ERRORS | LISTING
MESSAGES | NONE
PRINTBACK | BOTH
RESULTS | LISTING

Related Topics

SET
Overview (SET command)
Example (SET command)
WORKSPACE and MXCELLS Subcommands (SET command)
FORMAT Subcommand (SET command)
TLOOK and CTEMPLATE Subcommands (SET command)
ONUMBERS, OVARS, TNUMBERS, and TVARS Subcommands (SET command)
TFIT Subcommand (SET command)
RNG, SEED, and MTINDEX Subcommands (SET command)
EPOCH Subcommand (SET command)
JOURNAL Subcommand (SET command)
MEXPAND and MPRINT Subcommands (SET command)
MITERATE and MNEST Subcommands (SET command)
BLANKS Subcommand (SET command)
UNDEFINED Subcommand (SET command)
MXERRS Subcommand (SET command)
MXWARNS Subcommand (SET command)
MXLOOPS Subcommand (SET command)
EXTENSIONS Subcommand (SET command)
BLOCK Subcommand (SET command)
BOX Subcommand (SET command)
LENGTH and WIDTH Subcommands (SET command)
HEADER Subcommand (SET command)
CCA, CCB, CCC, CCD, and CCE Subcommands (SET command)
DECIMAL Subcommand (SET command)
CACHE Subcommand (SET command)
SMALL Subcommand (SET command)
OLANG Subcommand (SET command)
DEFOLANG Subcommand (SET command)
SCALEMIN Subcommand (SET command)
SORT Subcommand (SET command)
LOCALE Subcommand (SET command)
THREADS Subcommand (SET command)
MCACHE Subcommand (SET command)
UNICODE Subcommand
FUZZBITS Subcommand (SET command)
MIOUTPUT Subcommand (SET command)
ROWSBREAK, CELLSBREAK, and TOLERANCE Subcommands (SET command)
ZCOMPRESSION Subcommand (SET command)


JOURNAL Subcommand (SET command)

JOURNAL (subcommand),JOURNAL (subcommand),JOURNAL (subcommand)
SET command,SET command,SET command
SET (command,SET (command,SET (command
JOURNAL subcommand,JOURNAL subcommand,JOURNAL subcommand

This subcommand is obsolete and no longer supported. To set the location of the journal file, which contains a log of submitted commands and error and warning messages that are generated during a session, and turn the journal on and off:

From the menus in any PASW Statistics window, choose:

Edit
Options

On the File Locations tab, specify the journal location and select journal options.

Related Topics

SET
Overview (SET command)
Example (SET command)
WORKSPACE and MXCELLS Subcommands (SET command)
FORMAT Subcommand (SET command)
TLOOK and CTEMPLATE Subcommands (SET command)
ONUMBERS, OVARS, TNUMBERS, and TVARS Subcommands (SET command)
TFIT Subcommand (SET command)
RNG, SEED, and MTINDEX Subcommands (SET command)
EPOCH Subcommand (SET command)
ERRORS, MESSAGES, RESULTS, and PRINTBACK Subcommands (SET command)
MEXPAND and MPRINT Subcommands (SET command)
MITERATE and MNEST Subcommands (SET command)
BLANKS Subcommand (SET command)
UNDEFINED Subcommand (SET command)
MXERRS Subcommand (SET command)
MXWARNS Subcommand (SET command)
MXLOOPS Subcommand (SET command)
EXTENSIONS Subcommand (SET command)
BLOCK Subcommand (SET command)
BOX Subcommand (SET command)
LENGTH and WIDTH Subcommands (SET command)
HEADER Subcommand (SET command)
CCA, CCB, CCC, CCD, and CCE Subcommands (SET command)
DECIMAL Subcommand (SET command)
CACHE Subcommand (SET command)
SMALL Subcommand (SET command)
OLANG Subcommand (SET command)
DEFOLANG Subcommand (SET command)
SCALEMIN Subcommand (SET command)
SORT Subcommand (SET command)
LOCALE Subcommand (SET command)
THREADS Subcommand (SET command)
MCACHE Subcommand (SET command)
UNICODE Subcommand
FUZZBITS Subcommand (SET command)
MIOUTPUT Subcommand (SET command)
ROWSBREAK, CELLSBREAK, and TOLERANCE Subcommands (SET command)
ZCOMPRESSION Subcommand (SET command)


MEXPAND and MPRINT Subcommands (SET command)

preferences,preferences,preferences
display macro commands,display macro commands,display macro commands
preferences,preferences,preferences
macro expansion,macro expansion,macro expansion
macro facility,macro facility,macro facility
display macro commands,display macro commands,display macro commands
macro facility,macro facility,macro facility
macro expansion,macro expansion,macro expansion
SET (command),SET (command),SET (command)
MPRINT subcommand,MPRINT subcommand,MPRINT subcommand
SET (command),SET (command),SET (command)
MEXPAND subcommand,MEXPAND subcommand,MEXPAND subcommand
MEXPAND (subcommand),MEXPAND (subcommand),MEXPAND (subcommand)
SET command,SET command,SET command
MPRINT (subcommand),MPRINT (subcommand),MPRINT (subcommand)
SET command,SET command,SET command

MEXPAND and MPRINT control whether macros are expanded and whether the expanded macros are displayed. For more information about macros, see the DEFINE command and Using the Macro Facility.

The specifications for MEXPAND are:

ON | Expand macros. This setting is the default.
OFF | Do not expand macros. The command line that calls the macro is treated like any other command line. If the macro call is a command, it will be executed; otherwise, it will trigger an error message.

The specifications for MPRINT are:

ON | Include expanded macro commands in the output.
OFF | Exclude expanded macro commands from the output. This is the default.

• MPRINT is effective only when MEXPAND is ON and is independent of the PRINTBACK subcommand.

Related Topics

SET
Overview (SET command)
Example (SET command)
WORKSPACE and MXCELLS Subcommands (SET command)
FORMAT Subcommand (SET command)
TLOOK and CTEMPLATE Subcommands (SET command)
ONUMBERS, OVARS, TNUMBERS, and TVARS Subcommands (SET command)
TFIT Subcommand (SET command)
RNG, SEED, and MTINDEX Subcommands (SET command)
EPOCH Subcommand (SET command)
ERRORS, MESSAGES, RESULTS, and PRINTBACK Subcommands (SET command)
JOURNAL Subcommand (SET command)
MITERATE and MNEST Subcommands (SET command)
BLANKS Subcommand (SET command)
UNDEFINED Subcommand (SET command)
MXERRS Subcommand (SET command)
MXWARNS Subcommand (SET command)
MXLOOPS Subcommand (SET command)
EXTENSIONS Subcommand (SET command)
BLOCK Subcommand (SET command)
BOX Subcommand (SET command)
LENGTH and WIDTH Subcommands (SET command)
HEADER Subcommand (SET command)
CCA, CCB, CCC, CCD, and CCE Subcommands (SET command)
DECIMAL Subcommand (SET command)
CACHE Subcommand (SET command)
SMALL Subcommand (SET command)
OLANG Subcommand (SET command)
DEFOLANG Subcommand (SET command)
SCALEMIN Subcommand (SET command)
SORT Subcommand (SET command)
LOCALE Subcommand (SET command)
THREADS Subcommand (SET command)
MCACHE Subcommand (SET command)
UNICODE Subcommand
FUZZBITS Subcommand (SET command)
MIOUTPUT Subcommand (SET command)
ROWSBREAK, CELLSBREAK, and TOLERANCE Subcommands (SET command)
ZCOMPRESSION Subcommand (SET command)


MITERATE and MNEST Subcommands (SET command)

MNEST (subcommand),MNEST (subcommand),MNEST (subcommand)
SET command,SET command,SET command
MITERATE (subcommand),MITERATE (subcommand),MITERATE (subcommand)
SET command,SET command,SET command
SET (command),SET (command),SET (command)
MNEST subcommand,MNEST subcommand,MNEST subcommand
SET (command),SET (command),SET (command)
MITERATE subcommand,MITERATE subcommand,MITERATE subcommand

MITERATE and MNEST control the maximum loop traversals and the maximum nesting levels permitted in macro expansions, respectively.

• The specification on MITERATE or MNEST is a positive integer. The default for MITERATE is 1000. The default for MNEST is 50.

Related Topics

SET
Overview (SET command)
Example (SET command)
WORKSPACE and MXCELLS Subcommands (SET command)
FORMAT Subcommand (SET command)
TLOOK and CTEMPLATE Subcommands (SET command)
ONUMBERS, OVARS, TNUMBERS, and TVARS Subcommands (SET command)
TFIT Subcommand (SET command)
RNG, SEED, and MTINDEX Subcommands (SET command)
EPOCH Subcommand (SET command)
ERRORS, MESSAGES, RESULTS, and PRINTBACK Subcommands (SET command)
JOURNAL Subcommand (SET command)
MEXPAND and MPRINT Subcommands (SET command)
BLANKS Subcommand (SET command)
UNDEFINED Subcommand (SET command)
MXERRS Subcommand (SET command)
MXWARNS Subcommand (SET command)
MXLOOPS Subcommand (SET command)
EXTENSIONS Subcommand (SET command)
BLOCK Subcommand (SET command)
BOX Subcommand (SET command)
LENGTH and WIDTH Subcommands (SET command)
HEADER Subcommand (SET command)
CCA, CCB, CCC, CCD, and CCE Subcommands (SET command)
DECIMAL Subcommand (SET command)
CACHE Subcommand (SET command)
SMALL Subcommand (SET command)
OLANG Subcommand (SET command)
DEFOLANG Subcommand (SET command)
SCALEMIN Subcommand (SET command)
SORT Subcommand (SET command)
LOCALE Subcommand (SET command)
THREADS Subcommand (SET command)
MCACHE Subcommand (SET command)
UNICODE Subcommand
FUZZBITS Subcommand (SET command)
MIOUTPUT Subcommand (SET command)
ROWSBREAK, CELLSBREAK, and TOLERANCE Subcommands (SET command)
ZCOMPRESSION Subcommand (SET command)


BLANKS Subcommand (SET command)

BLANKS (subcommand),BLANKS (subcommand),BLANKS (subcommand)
SET command,SET command,SET command
SET (command),SET (command),SET (command)
BLANKS subcommand,BLANKS subcommand,BLANKS subcommand
preferences,preferences,preferences
blank data fields,blank data fields,blank data fields
blank data fields,blank data fields,blank data fields
treatment of,treatment of,treatment of

BLANKS specifies the value that the program should use when it encounters a completely blank field for a numeric variable. By default, the program uses the system-missing value.

• BLANKS controls only the translation of numeric fields. If a blank field is read with a string format, the resulting value is a blank.

• The value that is specified on BLANKS is not automatically defined as a missing value.

• The BLANKS specification applies to all numeric variables. You cannot use different specifications for different variables.

• BLANKS must be specified before data are read. Otherwise, blanks in numeric fields are converted to the system-missing value (the default) as they are read.

Related Topics

SET
Overview (SET command)
Example (SET command)
WORKSPACE and MXCELLS Subcommands (SET command)
FORMAT Subcommand (SET command)
TLOOK and CTEMPLATE Subcommands (SET command)
ONUMBERS, OVARS, TNUMBERS, and TVARS Subcommands (SET command)
TFIT Subcommand (SET command)
RNG, SEED, and MTINDEX Subcommands (SET command)
EPOCH Subcommand (SET command)
ERRORS, MESSAGES, RESULTS, and PRINTBACK Subcommands (SET command)
JOURNAL Subcommand (SET command)
MEXPAND and MPRINT Subcommands (SET command)
MITERATE and MNEST Subcommands (SET command)
UNDEFINED Subcommand (SET command)
MXERRS Subcommand (SET command)
MXWARNS Subcommand (SET command)
MXLOOPS Subcommand (SET command)
EXTENSIONS Subcommand (SET command)
BLOCK Subcommand (SET command)
BOX Subcommand (SET command)
LENGTH and WIDTH Subcommands (SET command)
HEADER Subcommand (SET command)
CCA, CCB, CCC, CCD, and CCE Subcommands (SET command)
DECIMAL Subcommand (SET command)
CACHE Subcommand (SET command)
SMALL Subcommand (SET command)
OLANG Subcommand (SET command)
DEFOLANG Subcommand (SET command)
SCALEMIN Subcommand (SET command)
SORT Subcommand (SET command)
LOCALE Subcommand (SET command)
THREADS Subcommand (SET command)
MCACHE Subcommand (SET command)
UNICODE Subcommand
FUZZBITS Subcommand (SET command)
MIOUTPUT Subcommand (SET command)
ROWSBREAK, CELLSBREAK, and TOLERANCE Subcommands (SET command)
ZCOMPRESSION Subcommand (SET command)


UNDEFINED Subcommand (SET command)

data,data,data
invalid,invalid,invalid
UNDEFINED (subcommand),UNDEFINED (subcommand),UNDEFINED (subcommand)
SET command,SET command,SET command
SET (command),SET (command),SET (command)
UNDEFINED subcommand,UNDEFINED subcommand,UNDEFINED subcommand
preferences,preferences,preferences
invalid data,invalid data,invalid data
invalid data,invalid data,invalid data
treatment of,treatment of,treatment of

UNDEFINED controls whether the program displays a warning message when it encounters anything other than a number or a blank as the value for a numeric variable. The default is WARN.

WARN (keyword),WARN (keyword),WARN (keyword)
SET command,SET command,SET command
NOWARN (keyword),NOWARN (keyword),NOWARN (keyword)
SET command,SET command,SET command
WARN | Display a warning message when an invalid value is encountered for a numeric variable. This setting is the default.
NOWARN | Suppress warning messages for invalid values.

Related Topics

SET
Overview (SET command)
Example (SET command)
WORKSPACE and MXCELLS Subcommands (SET command)
FORMAT Subcommand (SET command)
TLOOK and CTEMPLATE Subcommands (SET command)
ONUMBERS, OVARS, TNUMBERS, and TVARS Subcommands (SET command)
TFIT Subcommand (SET command)
RNG, SEED, and MTINDEX Subcommands (SET command)
EPOCH Subcommand (SET command)
ERRORS, MESSAGES, RESULTS, and PRINTBACK Subcommands (SET command)
JOURNAL Subcommand (SET command)
MEXPAND and MPRINT Subcommands (SET command)
MITERATE and MNEST Subcommands (SET command)
BLANKS Subcommand (SET command)
MXERRS Subcommand (SET command)
MXWARNS Subcommand (SET command)
MXLOOPS Subcommand (SET command)
EXTENSIONS Subcommand (SET command)
BLOCK Subcommand (SET command)
BOX Subcommand (SET command)
LENGTH and WIDTH Subcommands (SET command)
HEADER Subcommand (SET command)
CCA, CCB, CCC, CCD, and CCE Subcommands (SET command)
DECIMAL Subcommand (SET command)
CACHE Subcommand (SET command)
SMALL Subcommand (SET command)
OLANG Subcommand (SET command)
DEFOLANG Subcommand (SET command)
SCALEMIN Subcommand (SET command)
SORT Subcommand (SET command)
LOCALE Subcommand (SET command)
THREADS Subcommand (SET command)
MCACHE Subcommand (SET command)
UNICODE Subcommand
FUZZBITS Subcommand (SET command)
MIOUTPUT Subcommand (SET command)
ROWSBREAK, CELLSBREAK, and TOLERANCE Subcommands (SET command)
ZCOMPRESSION Subcommand (SET command)


MXERRS Subcommand (SET command)

MXERRS (subcommand),MXERRS (subcommand),MXERRS (subcommand)
SET command,SET command,SET command
SET (command),SET (command),SET (command)
MXERRS subcommand,MXERRS subcommand,MXERRS subcommand
preferences,preferences,preferences
errors,errors,errors
errors,errors,errors
maximum number,maximum number,maximum number
warnings,warnings,warnings
maximum number,maximum number,maximum number

MXERRS controls the maximum number of errors that are allowed in a session. The default is 100.

• MXERRS applies only to command files that are submitted for execution through PASW Statistics Batch Facility (available with PASW Statistics Server).

• Eligible errors are errors that stop execution of a command but continue the session.

• When the MXERRS limit is exceeded, PASW Statistics stops processing commands but continues to scan for additional errors.

• In interactive mode or in PASW Statistics and other windowed environments, MXERRS does not apply.

Related Topics

SET
Overview (SET command)
Example (SET command)
WORKSPACE and MXCELLS Subcommands (SET command)
FORMAT Subcommand (SET command)
TLOOK and CTEMPLATE Subcommands (SET command)
ONUMBERS, OVARS, TNUMBERS, and TVARS Subcommands (SET command)
TFIT Subcommand (SET command)
RNG, SEED, and MTINDEX Subcommands (SET command)
EPOCH Subcommand (SET command)
ERRORS, MESSAGES, RESULTS, and PRINTBACK Subcommands (SET command)
JOURNAL Subcommand (SET command)
MEXPAND and MPRINT Subcommands (SET command)
MITERATE and MNEST Subcommands (SET command)
BLANKS Subcommand (SET command)
UNDEFINED Subcommand (SET command)
MXWARNS Subcommand (SET command)
MXLOOPS Subcommand (SET command)
EXTENSIONS Subcommand (SET command)
BLOCK Subcommand (SET command)
BOX Subcommand (SET command)
LENGTH and WIDTH Subcommands (SET command)
HEADER Subcommand (SET command)
CCA, CCB, CCC, CCD, and CCE Subcommands (SET command)
DECIMAL Subcommand (SET command)
CACHE Subcommand (SET command)
SMALL Subcommand (SET command)
OLANG Subcommand (SET command)
DEFOLANG Subcommand (SET command)
SCALEMIN Subcommand (SET command)
SORT Subcommand (SET command)
LOCALE Subcommand (SET command)
THREADS Subcommand (SET command)
MCACHE Subcommand (SET command)
UNICODE Subcommand
FUZZBITS Subcommand (SET command)
MIOUTPUT Subcommand (SET command)
ROWSBREAK, CELLSBREAK, and TOLERANCE Subcommands (SET command)
ZCOMPRESSION Subcommand (SET command)


MXWARNS Subcommand (SET command)

MXWARNS (subcommand),MXWARNS (subcommand),MXWARNS (subcommand)
SET command,SET command,SET command
SET (command),SET (command),SET (command)
MXWARNS subcommand,MXWARNS subcommand,MXWARNS subcommand

MXWARNS controls the number of warnings that are issued. The default is 10. The behavior of this setting depends on mode of operation: interactive or PASW Statistics Batch Facility. In this context, "interactive" includes any mode of operation other than PASW Statistics Batch Facility.

Interactive. In interactive mode, MXWARNS limits the number of warnings that are issued for each set of commands that read the data (for example, a group of transformation commands followed by a statistical procedure).

• Exceeding the limit does not halt execution of commands; it simply suppresses further warnings.

• MXWARNS=0 suppresses all warnings except a warning that further warnings have been suppressed.

• MXWARNS does not affect the display of error messages, and errors do not count toward the warning limit.

Batch Facility. In the Batch Facility (available with PASW Statistics Server), MXWARNS limits the total number of warnings that are allowed in a job.

• When the MXWARNS limit is exceeded, PASW Statistics stops processing commands but continues to scan for errors.

• When the combined total number of warnings and errors exceeds the MXWARNS limit, PASW Statistics stops processing commands but continues to scan for errors.

Related Topics

SET
Overview (SET command)
Example (SET command)
WORKSPACE and MXCELLS Subcommands (SET command)
FORMAT Subcommand (SET command)
TLOOK and CTEMPLATE Subcommands (SET command)
ONUMBERS, OVARS, TNUMBERS, and TVARS Subcommands (SET command)
TFIT Subcommand (SET command)
RNG, SEED, and MTINDEX Subcommands (SET command)
EPOCH Subcommand (SET command)
ERRORS, MESSAGES, RESULTS, and PRINTBACK Subcommands (SET command)
JOURNAL Subcommand (SET command)
MEXPAND and MPRINT Subcommands (SET command)
MITERATE and MNEST Subcommands (SET command)
BLANKS Subcommand (SET command)
UNDEFINED Subcommand (SET command)
MXERRS Subcommand (SET command)
MXLOOPS Subcommand (SET command)
EXTENSIONS Subcommand (SET command)
BLOCK Subcommand (SET command)
BOX Subcommand (SET command)
LENGTH and WIDTH Subcommands (SET command)
HEADER Subcommand (SET command)
CCA, CCB, CCC, CCD, and CCE Subcommands (SET command)
DECIMAL Subcommand (SET command)
CACHE Subcommand (SET command)
SMALL Subcommand (SET command)
OLANG Subcommand (SET command)
DEFOLANG Subcommand (SET command)
SCALEMIN Subcommand (SET command)
SORT Subcommand (SET command)
LOCALE Subcommand (SET command)
THREADS Subcommand (SET command)
MCACHE Subcommand (SET command)
UNICODE Subcommand
FUZZBITS Subcommand (SET command)
MIOUTPUT Subcommand (SET command)
ROWSBREAK, CELLSBREAK, and TOLERANCE Subcommands (SET command)
ZCOMPRESSION Subcommand (SET command)


MXLOOPS Subcommand (SET command)

preferences,preferences,preferences
maximum loops,maximum loops,maximum loops
MXLOOPS (subcommand),MXLOOPS (subcommand),MXLOOPS (subcommand)
SET command,SET command,SET command
LOOP (command),LOOP (command),LOOP (command)
with SET command,with SET command,with SET command
SET (command),SET (command),SET (command)
MXLOOPS subcommand,MXLOOPS subcommand,MXLOOPS subcommand
SET (command),SET (command),SET (command)
with LOOP command,with LOOP command,with LOOP command
loops,loops,loops
maximum number,maximum number,maximum number

MXLOOPS specifies the maximum number of times that a loop that is defined by the LOOP-END LOOP structure is executed for a single case or input record. The default is 40.

• MXLOOPS prevents infinite loops, which may occur if no cutoff is specified for the loop structure (see LOOP-END LOOP).

• MXLOOPS will limit the number of loops for any loop structure that doesn't have an indexing clause, including loops with conditional IF clauses. If a loop has an indexing clause (e.g., LOOP #i=1 to 1000), the indexing clause overrides the MXLOOPS setting.

• When a loop is terminated, control passes to the command immediately following the END LOOP command, even if the END LOOP condition is not yet met.

Related Topics

SET
Overview (SET command)
Example (SET command)
WORKSPACE and MXCELLS Subcommands (SET command)
FORMAT Subcommand (SET command)
TLOOK and CTEMPLATE Subcommands (SET command)
ONUMBERS, OVARS, TNUMBERS, and TVARS Subcommands (SET command)
TFIT Subcommand (SET command)
RNG, SEED, and MTINDEX Subcommands (SET command)
EPOCH Subcommand (SET command)
ERRORS, MESSAGES, RESULTS, and PRINTBACK Subcommands (SET command)
JOURNAL Subcommand (SET command)
MEXPAND and MPRINT Subcommands (SET command)
MITERATE and MNEST Subcommands (SET command)
BLANKS Subcommand (SET command)
UNDEFINED Subcommand (SET command)
MXERRS Subcommand (SET command)
MXWARNS Subcommand (SET command)
EXTENSIONS Subcommand (SET command)
BLOCK Subcommand (SET command)
BOX Subcommand (SET command)
LENGTH and WIDTH Subcommands (SET command)
HEADER Subcommand (SET command)
CCA, CCB, CCC, CCD, and CCE Subcommands (SET command)
DECIMAL Subcommand (SET command)
CACHE Subcommand (SET command)
SMALL Subcommand (SET command)
OLANG Subcommand (SET command)
DEFOLANG Subcommand (SET command)
SCALEMIN Subcommand (SET command)
SORT Subcommand (SET command)
LOCALE Subcommand (SET command)
THREADS Subcommand (SET command)
MCACHE Subcommand (SET command)
UNICODE Subcommand
FUZZBITS Subcommand (SET command)
MIOUTPUT Subcommand (SET command)
ROWSBREAK, CELLSBREAK, and TOLERANCE Subcommands (SET command)
ZCOMPRESSION Subcommand (SET command)


EXTENSIONS Subcommand (SET command)

EXTENSIONS (subcommand),EXTENSIONS (subcommand),EXTENSIONS (subcommand)
SET command,SET command,SET command
SET (command),SET (command),SET (command)
EXTENSIONS subcommand,EXTENSIONS subcommand,EXTENSIONS subcommand
preferences,preferences,preferences
default file extension,default file extension,default file extension
data files,data files,data files
default file extension,default file extension,default file extension

This subcommand is no longer supported.

Related Topics

SET
Overview (SET command)
Example (SET command)
WORKSPACE and MXCELLS Subcommands (SET command)
FORMAT Subcommand (SET command)
TLOOK and CTEMPLATE Subcommands (SET command)
ONUMBERS, OVARS, TNUMBERS, and TVARS Subcommands (SET command)
TFIT Subcommand (SET command)
RNG, SEED, and MTINDEX Subcommands (SET command)
EPOCH Subcommand (SET command)
ERRORS, MESSAGES, RESULTS, and PRINTBACK Subcommands (SET command)
JOURNAL Subcommand (SET command)
MEXPAND and MPRINT Subcommands (SET command)
MITERATE and MNEST Subcommands (SET command)
BLANKS Subcommand (SET command)
UNDEFINED Subcommand (SET command)
MXERRS Subcommand (SET command)
MXWARNS Subcommand (SET command)
MXLOOPS Subcommand (SET command)
BLOCK Subcommand (SET command)
BOX Subcommand (SET command)
LENGTH and WIDTH Subcommands (SET command)
HEADER Subcommand (SET command)
CCA, CCB, CCC, CCD, and CCE Subcommands (SET command)
DECIMAL Subcommand (SET command)
CACHE Subcommand (SET command)
SMALL Subcommand (SET command)
OLANG Subcommand (SET command)
DEFOLANG Subcommand (SET command)
SCALEMIN Subcommand (SET command)
SORT Subcommand (SET command)
LOCALE Subcommand (SET command)
THREADS Subcommand (SET command)
MCACHE Subcommand (SET command)
UNICODE Subcommand
FUZZBITS Subcommand (SET command)
MIOUTPUT Subcommand (SET command)
ROWSBREAK, CELLSBREAK, and TOLERANCE Subcommands (SET command)
ZCOMPRESSION Subcommand (SET command)


BLOCK Subcommand (SET command)

SET (command),SET (command),SET (command)
BLOCK subcommand,BLOCK subcommand,BLOCK subcommand
BLOCK (subcommand),BLOCK (subcommand),BLOCK (subcommand)
SET command,SET command,SET command
preferences,preferences,preferences
charts,charts,charts
output files,output files,output files
chart characters,chart characters,chart characters

BLOCK specifies the character that is used for drawing icicle plots.

• You can specify any single character either as a quoted string or as a quoted hexadecimal pair preceded by the character X.

• The default is X'2A'.

Example

SET BLOCK='#'.

• This command specifies a pound sign (#) as the character to be used for drawing bar charts. The character is specified as a quoted string.

Related Topics

SET
Overview (SET command)
Example (SET command)
WORKSPACE and MXCELLS Subcommands (SET command)
FORMAT Subcommand (SET command)
TLOOK and CTEMPLATE Subcommands (SET command)
ONUMBERS, OVARS, TNUMBERS, and TVARS Subcommands (SET command)
TFIT Subcommand (SET command)
RNG, SEED, and MTINDEX Subcommands (SET command)
EPOCH Subcommand (SET command)
ERRORS, MESSAGES, RESULTS, and PRINTBACK Subcommands (SET command)
JOURNAL Subcommand (SET command)
MEXPAND and MPRINT Subcommands (SET command)
MITERATE and MNEST Subcommands (SET command)
BLANKS Subcommand (SET command)
UNDEFINED Subcommand (SET command)
MXERRS Subcommand (SET command)
MXWARNS Subcommand (SET command)
MXLOOPS Subcommand (SET command)
EXTENSIONS Subcommand (SET command)
BOX Subcommand (SET command)
LENGTH and WIDTH Subcommands (SET command)
HEADER Subcommand (SET command)
CCA, CCB, CCC, CCD, and CCE Subcommands (SET command)
DECIMAL Subcommand (SET command)
CACHE Subcommand (SET command)
SMALL Subcommand (SET command)
OLANG Subcommand (SET command)
DEFOLANG Subcommand (SET command)
SCALEMIN Subcommand (SET command)
SORT Subcommand (SET command)
LOCALE Subcommand (SET command)
THREADS Subcommand (SET command)
MCACHE Subcommand (SET command)
UNICODE Subcommand
FUZZBITS Subcommand (SET command)
MIOUTPUT Subcommand (SET command)
ROWSBREAK, CELLSBREAK, and TOLERANCE Subcommands (SET command)
ZCOMPRESSION Subcommand (SET command)


BOX Subcommand (SET command)

BOX (subcommand),BOX (subcommand),BOX (subcommand)
SET command,SET command,SET command
SET (command),SET (command),SET (command)
BOX subcommand,BOX subcommand,BOX subcommand
preferences,preferences,preferences
borders for tables,borders for tables,borders for tables
output files,output files,output files
borders for tables,borders for tables,borders for tables

BOX specifies the characters that are used to draw table borders in text output. The specification is either a 3-character or 11-character quoted string, in which the characters have the following representations:

1 | horizontal line | 7 | upper right corner
2 | vertical line | 8 | left T
3 | middle (cross) | 9 | right T
4 | lower left corner | 10 | top T
5 | upper left corner | 11 | bottom T
6 | lower right corner |  |

• The characters can be specified either as a quoted string or hexadecimal pairs. Specify an X before the quoted hexadecimal pairs.

• The defaults vary from system to system. To display the current settings, use the SHOW command.

Related Topics

SET
Overview (SET command)
Example (SET command)
WORKSPACE and MXCELLS Subcommands (SET command)
FORMAT Subcommand (SET command)
TLOOK and CTEMPLATE Subcommands (SET command)
ONUMBERS, OVARS, TNUMBERS, and TVARS Subcommands (SET command)
TFIT Subcommand (SET command)
RNG, SEED, and MTINDEX Subcommands (SET command)
EPOCH Subcommand (SET command)
ERRORS, MESSAGES, RESULTS, and PRINTBACK Subcommands (SET command)
JOURNAL Subcommand (SET command)
MEXPAND and MPRINT Subcommands (SET command)
MITERATE and MNEST Subcommands (SET command)
BLANKS Subcommand (SET command)
UNDEFINED Subcommand (SET command)
MXERRS Subcommand (SET command)
MXWARNS Subcommand (SET command)
MXLOOPS Subcommand (SET command)
EXTENSIONS Subcommand (SET command)
BLOCK Subcommand (SET command)
LENGTH and WIDTH Subcommands (SET command)
HEADER Subcommand (SET command)
CCA, CCB, CCC, CCD, and CCE Subcommands (SET command)
DECIMAL Subcommand (SET command)
CACHE Subcommand (SET command)
SMALL Subcommand (SET command)
OLANG Subcommand (SET command)
DEFOLANG Subcommand (SET command)
SCALEMIN Subcommand (SET command)
SORT Subcommand (SET command)
LOCALE Subcommand (SET command)
THREADS Subcommand (SET command)
MCACHE Subcommand (SET command)
UNICODE Subcommand
FUZZBITS Subcommand (SET command)
MIOUTPUT Subcommand (SET command)
ROWSBREAK, CELLSBREAK, and TOLERANCE Subcommands (SET command)
ZCOMPRESSION Subcommand (SET command)


LENGTH and WIDTH Subcommands (SET command)

LENGTH and WIDTH specify the maximum page length and width for the text output, respectively. These two subcommands apply only to text output.

• Length represents number of lines, and width represents number of characters.

• You can specify any length from 40 through 999,999 lines. If a long page length is specified, the program continues to provide page ejects and titles at the start of each procedure and at logical points in the display, such as between crosstabulations.

• To suppress page ejects, use keyword NONE on LENGTH. The program will insert titles at logical points in the display but will not supply page ejects.

• You can specify any number of characters from 80 through 255 for WIDTH.

Related Topics

SET
Overview (SET command)
Example (SET command)
WORKSPACE and MXCELLS Subcommands (SET command)
FORMAT Subcommand (SET command)
TLOOK and CTEMPLATE Subcommands (SET command)
ONUMBERS, OVARS, TNUMBERS, and TVARS Subcommands (SET command)
TFIT Subcommand (SET command)
RNG, SEED, and MTINDEX Subcommands (SET command)
EPOCH Subcommand (SET command)
ERRORS, MESSAGES, RESULTS, and PRINTBACK Subcommands (SET command)
JOURNAL Subcommand (SET command)
MEXPAND and MPRINT Subcommands (SET command)
MITERATE and MNEST Subcommands (SET command)
BLANKS Subcommand (SET command)
UNDEFINED Subcommand (SET command)
MXERRS Subcommand (SET command)
MXWARNS Subcommand (SET command)
MXLOOPS Subcommand (SET command)
EXTENSIONS Subcommand (SET command)
BLOCK Subcommand (SET command)
BOX Subcommand (SET command)
HEADER Subcommand (SET command)
CCA, CCB, CCC, CCD, and CCE Subcommands (SET command)
DECIMAL Subcommand (SET command)
CACHE Subcommand (SET command)
SMALL Subcommand (SET command)
OLANG Subcommand (SET command)
DEFOLANG Subcommand (SET command)
SCALEMIN Subcommand (SET command)
SORT Subcommand (SET command)
LOCALE Subcommand (SET command)
THREADS Subcommand (SET command)
MCACHE Subcommand (SET command)
UNICODE Subcommand
FUZZBITS Subcommand (SET command)
MIOUTPUT Subcommand (SET command)
ROWSBREAK, CELLSBREAK, and TOLERANCE Subcommands (SET command)
ZCOMPRESSION Subcommand (SET command)


HEADER Subcommand (SET command)

HEADER (subcommand),HEADER (subcommand),HEADER (subcommand)
SET command,SET command,SET command
SET (command),SET (command),SET (command)
HEADER subcommand,HEADER subcommand,HEADER subcommand
preferences,preferences,preferences
output,output,output
output files,output files,output files
display output page titles,display output page titles,display output page titles
titles,titles,titles
displaying,displaying,displaying

HEADER controls whether the output includes headings. The HEADER subcommand applies to both default headings and headings that are specified on the TITLE and SUBTITLE commands. This command applies only to text output from this program. The default is NO.

NO | Suppress headings in text output. All general headings, including pagination, are replaced by a single blank line.
YES | Display headings in text output.
BLANK | Suppress headings but start a new page.

Related Topics

SET
Overview (SET command)
Example (SET command)
WORKSPACE and MXCELLS Subcommands (SET command)
FORMAT Subcommand (SET command)
TLOOK and CTEMPLATE Subcommands (SET command)
ONUMBERS, OVARS, TNUMBERS, and TVARS Subcommands (SET command)
TFIT Subcommand (SET command)
RNG, SEED, and MTINDEX Subcommands (SET command)
EPOCH Subcommand (SET command)
ERRORS, MESSAGES, RESULTS, and PRINTBACK Subcommands (SET command)
JOURNAL Subcommand (SET command)
MEXPAND and MPRINT Subcommands (SET command)
MITERATE and MNEST Subcommands (SET command)
BLANKS Subcommand (SET command)
UNDEFINED Subcommand (SET command)
MXERRS Subcommand (SET command)
MXWARNS Subcommand (SET command)
MXLOOPS Subcommand (SET command)
EXTENSIONS Subcommand (SET command)
BLOCK Subcommand (SET command)
BOX Subcommand (SET command)
LENGTH and WIDTH Subcommands (SET command)
CCA, CCB, CCC, CCD, and CCE Subcommands (SET command)
DECIMAL Subcommand (SET command)
CACHE Subcommand (SET command)
SMALL Subcommand (SET command)
OLANG Subcommand (SET command)
DEFOLANG Subcommand (SET command)
SCALEMIN Subcommand (SET command)
SORT Subcommand (SET command)
LOCALE Subcommand (SET command)
THREADS Subcommand (SET command)
MCACHE Subcommand (SET command)
UNICODE Subcommand
FUZZBITS Subcommand (SET command)
MIOUTPUT Subcommand (SET command)
ROWSBREAK, CELLSBREAK, and TOLERANCE Subcommands (SET command)
ZCOMPRESSION Subcommand (SET command)


CCA, CCB, CCC, CCD, and CCE Subcommands (SET command)

CC (subcommand),CC (subcommand),CC (subcommand)
SET command,SET command,SET command
SET (command),SET (command),SET (command)
CC subcommand,CC subcommand,CC subcommand
preferences,preferences,preferences
custom currency formats,custom currency formats,custom currency formats
custom currency formats,custom currency formats,custom currency formats
creating,creating,creating
data types,data types,data types
custom currency,custom currency,custom currency

You can use the subcommands CCA, CCB, CCC, CCD, and CCE to specify up to five custom currency formats.

• Each custom currency subcommand defines one custom format and can include four specifications in the following order: a negative prefix, a prefix, a suffix, and a negative suffix.

• The specifications are delimited by either periods or commas, whichever you do not want to use as a decimal point in the format.

• If your custom currency format includes periods or commas that you need to distinguish from delimiters, use a single quotation mark as an escape character before the period or comma that is part of the custom currency format. For example, if the format includes a period but the decimal indicator is a comma, the period must also be used as the delimiter.

• Each currency specification must always contain three commas or three periods. All other specifications are optional.

• Use blanks in the specification only where you want blanks in the format.

• The entire specification must be enclosed in single or double quotation marks. If the format includes a single quotation mark as an escape character, the entire specification must be enclosed in double quotation marks.

• A specification cannot exceed 16 characters (excluding the apostrophes).

• Custom currency formats cannot be specified as input formats on DATA LIST. Use them only as output formats in the FORMATS, WRITE FORMATS, PRINT FORMATS, WRITE, and PRINT commands.

Specifying a Custom Currency Format

SET CCA='-,$,,'.

• A minus sign (-) preceding the first command is used as the negative prefix.

• A dollar sign is specified for the prefix.

• No suffixes are specified (there are two consecutive commas before the closing apostrophe).

• Because commas are used as separators in the specification, the decimal point is represented by a period.

Specifying Multiple Custom Currency Formats

SET CCA='(,,,-)'  CCB=',,%,' CCC='(,$,,)' CCD='-/-.Dfl ..-'.
FORMATS VARA(CCA9.0)/ VARB(CCB6.1)/ VARC(CCC8.0)/ VARD(CCD14.2).

• SET defines four custom currency formats.

• FORMATS assigns these formats to specific variables.

Custom currency examples
 | CCA | CCB | CCC | CCD
negative prefix | ( | none | ( | –/–
prefix | none | none | $ | Dfl
suffix | none | % | none | none
negative suffix | –) | none | ) | –
separator | , | , | , | .
sample positive number | 23,456 | 13.7% | $352 | Dfl 37.419,00
sample negative number | (19,423–) | 13.7% | ($189) | –/–Dfl 135,19–

Related Topics

SET
Overview (SET command)
Example (SET command)
WORKSPACE and MXCELLS Subcommands (SET command)
FORMAT Subcommand (SET command)
TLOOK and CTEMPLATE Subcommands (SET command)
ONUMBERS, OVARS, TNUMBERS, and TVARS Subcommands (SET command)
TFIT Subcommand (SET command)
RNG, SEED, and MTINDEX Subcommands (SET command)
EPOCH Subcommand (SET command)
ERRORS, MESSAGES, RESULTS, and PRINTBACK Subcommands (SET command)
JOURNAL Subcommand (SET command)
MEXPAND and MPRINT Subcommands (SET command)
MITERATE and MNEST Subcommands (SET command)
BLANKS Subcommand (SET command)
UNDEFINED Subcommand (SET command)
MXERRS Subcommand (SET command)
MXWARNS Subcommand (SET command)
MXLOOPS Subcommand (SET command)
EXTENSIONS Subcommand (SET command)
BLOCK Subcommand (SET command)
BOX Subcommand (SET command)
LENGTH and WIDTH Subcommands (SET command)
HEADER Subcommand (SET command)
DECIMAL Subcommand (SET command)
CACHE Subcommand (SET command)
SMALL Subcommand (SET command)
OLANG Subcommand (SET command)
DEFOLANG Subcommand (SET command)
SCALEMIN Subcommand (SET command)
SORT Subcommand (SET command)
LOCALE Subcommand (SET command)
THREADS Subcommand (SET command)
MCACHE Subcommand (SET command)
UNICODE Subcommand
FUZZBITS Subcommand (SET command)
MIOUTPUT Subcommand (SET command)
ROWSBREAK, CELLSBREAK, and TOLERANCE Subcommands (SET command)
ZCOMPRESSION Subcommand (SET command)


DECIMAL Subcommand (SET command)

SET (command),SET (command),SET (command)
DECIMAL subcommand,DECIMAL subcommand,DECIMAL subcommand
DECIMAL (subcommand),DECIMAL (subcommand),DECIMAL (subcommand)
SET command,SET command,SET command

DECIMAL can be used to override the default decimal indicator for reading and writing text data. The default decimal indicator is the OS locale decimal indicator or the decimal indicator for the locale specified on the LOCALE subcommand.

DOT. The decimal indicator is a period.

COMMA. The decimal indicator is a comma.

• A subsequent LOCALE subcommand—either on the same or separate SET command—will override the DECIMAL setting. See the topic LOCALE Subcommand (SET command) for more information.

• This setting only affects reading and writing text data. It has no effect on how data values are displayed in the Data Editor or in results displayed in the Viewer.

Related Topics

SET
Overview (SET command)
Example (SET command)
WORKSPACE and MXCELLS Subcommands (SET command)
FORMAT Subcommand (SET command)
TLOOK and CTEMPLATE Subcommands (SET command)
ONUMBERS, OVARS, TNUMBERS, and TVARS Subcommands (SET command)
TFIT Subcommand (SET command)
RNG, SEED, and MTINDEX Subcommands (SET command)
EPOCH Subcommand (SET command)
ERRORS, MESSAGES, RESULTS, and PRINTBACK Subcommands (SET command)
JOURNAL Subcommand (SET command)
MEXPAND and MPRINT Subcommands (SET command)
MITERATE and MNEST Subcommands (SET command)
BLANKS Subcommand (SET command)
UNDEFINED Subcommand (SET command)
MXERRS Subcommand (SET command)
MXWARNS Subcommand (SET command)
MXLOOPS Subcommand (SET command)
EXTENSIONS Subcommand (SET command)
BLOCK Subcommand (SET command)
BOX Subcommand (SET command)
LENGTH and WIDTH Subcommands (SET command)
HEADER Subcommand (SET command)
CCA, CCB, CCC, CCD, and CCE Subcommands (SET command)
CACHE Subcommand (SET command)
SMALL Subcommand (SET command)
OLANG Subcommand (SET command)
DEFOLANG Subcommand (SET command)
SCALEMIN Subcommand (SET command)
SORT Subcommand (SET command)
LOCALE Subcommand (SET command)
THREADS Subcommand (SET command)
MCACHE Subcommand (SET command)
UNICODE Subcommand
FUZZBITS Subcommand (SET command)
MIOUTPUT Subcommand (SET command)
ROWSBREAK, CELLSBREAK, and TOLERANCE Subcommands (SET command)
ZCOMPRESSION Subcommand (SET command)


CACHE Subcommand (SET command)

active file,active file,active file
caching,caching,caching
active dataset,active dataset,active dataset
caching,caching,caching
data files,data files,data files
caching,caching,caching
caching,caching,caching
active file,active file,active file
CACHE (subcommand),CACHE (subcommand),CACHE (subcommand)
SET command,SET command,SET command
SET (command),SET (command),SET (command)
CACHE (subcommand),CACHE (subcommand),CACHE (subcommand)

The CACHE subcommand creates a complete copy of the active data file in temporary disk space after a specified number of changes in the active data file. If you have the available disk space, this feature can improve performance. The default number of changes that can occur before the active file is cached is 20.

Example

SET CACHE 10.

Related Topics

SET
Overview (SET command)
Example (SET command)
WORKSPACE and MXCELLS Subcommands (SET command)
FORMAT Subcommand (SET command)
TLOOK and CTEMPLATE Subcommands (SET command)
ONUMBERS, OVARS, TNUMBERS, and TVARS Subcommands (SET command)
TFIT Subcommand (SET command)
RNG, SEED, and MTINDEX Subcommands (SET command)
EPOCH Subcommand (SET command)
ERRORS, MESSAGES, RESULTS, and PRINTBACK Subcommands (SET command)
JOURNAL Subcommand (SET command)
MEXPAND and MPRINT Subcommands (SET command)
MITERATE and MNEST Subcommands (SET command)
BLANKS Subcommand (SET command)
UNDEFINED Subcommand (SET command)
MXERRS Subcommand (SET command)
MXWARNS Subcommand (SET command)
MXLOOPS Subcommand (SET command)
EXTENSIONS Subcommand (SET command)
BLOCK Subcommand (SET command)
BOX Subcommand (SET command)
LENGTH and WIDTH Subcommands (SET command)
HEADER Subcommand (SET command)
CCA, CCB, CCC, CCD, and CCE Subcommands (SET command)
DECIMAL Subcommand (SET command)
SMALL Subcommand (SET command)
OLANG Subcommand (SET command)
DEFOLANG Subcommand (SET command)
SCALEMIN Subcommand (SET command)
SORT Subcommand (SET command)
LOCALE Subcommand (SET command)
THREADS Subcommand (SET command)
MCACHE Subcommand (SET command)
UNICODE Subcommand
FUZZBITS Subcommand (SET command)
MIOUTPUT Subcommand (SET command)
ROWSBREAK, CELLSBREAK, and TOLERANCE Subcommands (SET command)
ZCOMPRESSION Subcommand (SET command)


SMALL Subcommand (SET command)

SET (command),SET (command),SET (command)
SMALL subcommand,SMALL subcommand,SMALL subcommand
SMALL (subcommand),SMALL (subcommand),SMALL (subcommand)
SET command,SET command,SET command
scientific notation,scientific notation,scientific notation
controlling display in output,controlling display in output,controlling display in output

The SMALL subcommand controls the display of numbers in scientific notation in output for small decimal values.

Example

SET SMALL = 0.

SET SMALL = .001.

• The first SET SMALL command suppresses the display of scientific notation in all output.

• The second SET SMALL command will only display scientific notation for values that are less than 0.001.

Related Topics

SET
Overview (SET command)
Example (SET command)
WORKSPACE and MXCELLS Subcommands (SET command)
FORMAT Subcommand (SET command)
TLOOK and CTEMPLATE Subcommands (SET command)
ONUMBERS, OVARS, TNUMBERS, and TVARS Subcommands (SET command)
TFIT Subcommand (SET command)
RNG, SEED, and MTINDEX Subcommands (SET command)
EPOCH Subcommand (SET command)
ERRORS, MESSAGES, RESULTS, and PRINTBACK Subcommands (SET command)
JOURNAL Subcommand (SET command)
MEXPAND and MPRINT Subcommands (SET command)
MITERATE and MNEST Subcommands (SET command)
BLANKS Subcommand (SET command)
UNDEFINED Subcommand (SET command)
MXERRS Subcommand (SET command)
MXWARNS Subcommand (SET command)
MXLOOPS Subcommand (SET command)
EXTENSIONS Subcommand (SET command)
BLOCK Subcommand (SET command)
BOX Subcommand (SET command)
LENGTH and WIDTH Subcommands (SET command)
HEADER Subcommand (SET command)
CCA, CCB, CCC, CCD, and CCE Subcommands (SET command)
DECIMAL Subcommand (SET command)
CACHE Subcommand (SET command)
OLANG Subcommand (SET command)
DEFOLANG Subcommand (SET command)
SCALEMIN Subcommand (SET command)
SORT Subcommand (SET command)
LOCALE Subcommand (SET command)
THREADS Subcommand (SET command)
MCACHE Subcommand (SET command)
UNICODE Subcommand
FUZZBITS Subcommand (SET command)
MIOUTPUT Subcommand (SET command)
ROWSBREAK, CELLSBREAK, and TOLERANCE Subcommands (SET command)
ZCOMPRESSION Subcommand (SET command)


OLANG Subcommand (SET command)

SET (command),SET (command),SET (command)
OLANG subcommand,OLANG subcommand,OLANG subcommand
OLANG (subcommand),OLANG (subcommand),OLANG (subcommand)
SET command,SET command,SET command
language,language,language
changing output language,changing output language,changing output language
output,output,output
changing output language,changing output language,changing output language

The OLANG subcommand controls the language that is used in output. OLANG does not apply to simple text output. Available languages may vary. (The General tab in the Options dialog box displays a list of available output languages.) Valid language keywords include English, French, German, Spanish, Italian, Japanese, Korean, TChinese (traditional Chinese), SChinese (simplified Chinese), Polish, and Russian.

Output that is produced after the command is executed will be in the specified language (if that language is available). Additional language materials may be available for downloading from the SPSS Inc. web site.

Depending on the language, you may also need to switch to UNICODE mode or change the LOCALE setting to match the output language for characters to render properly.

Example

SET OLANG = German.

• The language keyword is not case-sensitive.

• Do not enclose the language keyword in quotation marks or other string delimiters.

Related Topics

SET
Overview (SET command)
Example (SET command)
WORKSPACE and MXCELLS Subcommands (SET command)
FORMAT Subcommand (SET command)
TLOOK and CTEMPLATE Subcommands (SET command)
ONUMBERS, OVARS, TNUMBERS, and TVARS Subcommands (SET command)
TFIT Subcommand (SET command)
RNG, SEED, and MTINDEX Subcommands (SET command)
EPOCH Subcommand (SET command)
ERRORS, MESSAGES, RESULTS, and PRINTBACK Subcommands (SET command)
JOURNAL Subcommand (SET command)
MEXPAND and MPRINT Subcommands (SET command)
MITERATE and MNEST Subcommands (SET command)
BLANKS Subcommand (SET command)
UNDEFINED Subcommand (SET command)
MXERRS Subcommand (SET command)
MXWARNS Subcommand (SET command)
MXLOOPS Subcommand (SET command)
EXTENSIONS Subcommand (SET command)
BLOCK Subcommand (SET command)
BOX Subcommand (SET command)
LENGTH and WIDTH Subcommands (SET command)
HEADER Subcommand (SET command)
CCA, CCB, CCC, CCD, and CCE Subcommands (SET command)
DECIMAL Subcommand (SET command)
CACHE Subcommand (SET command)
SMALL Subcommand (SET command)
DEFOLANG Subcommand (SET command)
SCALEMIN Subcommand (SET command)
SORT Subcommand (SET command)
LOCALE Subcommand (SET command)
THREADS Subcommand (SET command)
MCACHE Subcommand (SET command)
UNICODE Subcommand
FUZZBITS Subcommand (SET command)
MIOUTPUT Subcommand (SET command)
ROWSBREAK, CELLSBREAK, and TOLERANCE Subcommands (SET command)
ZCOMPRESSION Subcommand (SET command)


DEFOLANG Subcommand (SET command)

SET (command),SET (command),SET (command)
DEFOLANG subcommand,DEFOLANG subcommand,DEFOLANG subcommand
DEFOLANG (subcommand),DEFOLANG (subcommand),DEFOLANG (subcommand)
SET command,SET command,SET command

The DEFOLANG subcommand specifies the default output language (if the language that is specified on the OLANG subcommand is not available). The initial default setting is the language of the installed software version. For example, if you install the English version of the software on a Japanese operating system, the default output language is English.

Example

SET DEFOLANG = JAPANESE.

• The language keyword is not case-sensitive.

• Do not enclose the language keyword in quotation marks or other string delimiters.

Related Topics

SET
Overview (SET command)
Example (SET command)
WORKSPACE and MXCELLS Subcommands (SET command)
FORMAT Subcommand (SET command)
TLOOK and CTEMPLATE Subcommands (SET command)
ONUMBERS, OVARS, TNUMBERS, and TVARS Subcommands (SET command)
TFIT Subcommand (SET command)
RNG, SEED, and MTINDEX Subcommands (SET command)
EPOCH Subcommand (SET command)
ERRORS, MESSAGES, RESULTS, and PRINTBACK Subcommands (SET command)
JOURNAL Subcommand (SET command)
MEXPAND and MPRINT Subcommands (SET command)
MITERATE and MNEST Subcommands (SET command)
BLANKS Subcommand (SET command)
UNDEFINED Subcommand (SET command)
MXERRS Subcommand (SET command)
MXWARNS Subcommand (SET command)
MXLOOPS Subcommand (SET command)
EXTENSIONS Subcommand (SET command)
BLOCK Subcommand (SET command)
BOX Subcommand (SET command)
LENGTH and WIDTH Subcommands (SET command)
HEADER Subcommand (SET command)
CCA, CCB, CCC, CCD, and CCE Subcommands (SET command)
DECIMAL Subcommand (SET command)
CACHE Subcommand (SET command)
SMALL Subcommand (SET command)
OLANG Subcommand (SET command)
SCALEMIN Subcommand (SET command)
SORT Subcommand (SET command)
LOCALE Subcommand (SET command)
THREADS Subcommand (SET command)
MCACHE Subcommand (SET command)
UNICODE Subcommand
FUZZBITS Subcommand (SET command)
MIOUTPUT Subcommand (SET command)
ROWSBREAK, CELLSBREAK, and TOLERANCE Subcommands (SET command)
ZCOMPRESSION Subcommand (SET command)


SCALEMIN Subcommand (SET command)

SET (command),SET (command),SET (command)
SCALEMIN subcommand,SCALEMIN subcommand,SCALEMIN subcommand
SCALEMIN (subcommand),SCALEMIN (subcommand),SCALEMIN (subcommand)
SET command,SET command,SET command

For PASW Statistics data files that were created prior to release 8.0 and data read from text data files or database tables, you can specify the minimum number of data values for a numeric variable that is used to classify the variable as scale or nominal. Variables with fewer than the specified number of unique values are classified as nominal. All string variables and any variables with defined value labels are classified as nominal, regardless of the number of unique values. This setting has no effect on default measurement level for data read from SAS, Stata, or Excel files.

Related Topics

SET
Overview (SET command)
Example (SET command)
WORKSPACE and MXCELLS Subcommands (SET command)
FORMAT Subcommand (SET command)
TLOOK and CTEMPLATE Subcommands (SET command)
ONUMBERS, OVARS, TNUMBERS, and TVARS Subcommands (SET command)
TFIT Subcommand (SET command)
RNG, SEED, and MTINDEX Subcommands (SET command)
EPOCH Subcommand (SET command)
ERRORS, MESSAGES, RESULTS, and PRINTBACK Subcommands (SET command)
JOURNAL Subcommand (SET command)
MEXPAND and MPRINT Subcommands (SET command)
MITERATE and MNEST Subcommands (SET command)
BLANKS Subcommand (SET command)
UNDEFINED Subcommand (SET command)
MXERRS Subcommand (SET command)
MXWARNS Subcommand (SET command)
MXLOOPS Subcommand (SET command)
EXTENSIONS Subcommand (SET command)
BLOCK Subcommand (SET command)
BOX Subcommand (SET command)
LENGTH and WIDTH Subcommands (SET command)
HEADER Subcommand (SET command)
CCA, CCB, CCC, CCD, and CCE Subcommands (SET command)
DECIMAL Subcommand (SET command)
CACHE Subcommand (SET command)
SMALL Subcommand (SET command)
OLANG Subcommand (SET command)
DEFOLANG Subcommand (SET command)
SORT Subcommand (SET command)
LOCALE Subcommand (SET command)
THREADS Subcommand (SET command)
MCACHE Subcommand (SET command)
UNICODE Subcommand
FUZZBITS Subcommand (SET command)
MIOUTPUT Subcommand (SET command)
ROWSBREAK, CELLSBREAK, and TOLERANCE Subcommands (SET command)
ZCOMPRESSION Subcommand (SET command)


SORT Subcommand (SET command)

SET (command),SET (command),SET (command)
SORT subcommand,SORT subcommand,SORT subcommand
SORT (subcommand),SORT (subcommand),SORT (subcommand)
SET command,SET command,SET command
SyncSort,SyncSort,SyncSort
sorting,sorting,sorting
using a third-party sort engine,using a third-party sort engine,using a third-party sort engine

By default, PASW Statistics tries to use an external, third-party sorting mechanism, which may reduce processing time with large data sources. The third-party sorting option is available only if you have PASW Statistics Server. The specific sorting engine is defined by your server administrator. If you are not connected to the PASW Statistics Server or the PASW Statistics Server cannot find the third-party sort engine, the built-in sorting mechanism is used.

EXTERNAL | Use the external, third-party sort engine if available. This setting is the default. If the third-party sort engine is not available, this setting is ignored, and the built-in sorting mechanism is used. COXREG and CURVEFIT use built-in sorting regardless of the SORT setting.
INTERNAL | Use the built-in sorting mechanism.
SS | This setting is deprecated. It has the same effect as EXTERNAL.

Related Topics

SET
Overview (SET command)
Example (SET command)
WORKSPACE and MXCELLS Subcommands (SET command)
FORMAT Subcommand (SET command)
TLOOK and CTEMPLATE Subcommands (SET command)
ONUMBERS, OVARS, TNUMBERS, and TVARS Subcommands (SET command)
TFIT Subcommand (SET command)
RNG, SEED, and MTINDEX Subcommands (SET command)
EPOCH Subcommand (SET command)
ERRORS, MESSAGES, RESULTS, and PRINTBACK Subcommands (SET command)
JOURNAL Subcommand (SET command)
MEXPAND and MPRINT Subcommands (SET command)
MITERATE and MNEST Subcommands (SET command)
BLANKS Subcommand (SET command)
UNDEFINED Subcommand (SET command)
MXERRS Subcommand (SET command)
MXWARNS Subcommand (SET command)
MXLOOPS Subcommand (SET command)
EXTENSIONS Subcommand (SET command)
BLOCK Subcommand (SET command)
BOX Subcommand (SET command)
LENGTH and WIDTH Subcommands (SET command)
HEADER Subcommand (SET command)
CCA, CCB, CCC, CCD, and CCE Subcommands (SET command)
DECIMAL Subcommand (SET command)
CACHE Subcommand (SET command)
SMALL Subcommand (SET command)
OLANG Subcommand (SET command)
DEFOLANG Subcommand (SET command)
SCALEMIN Subcommand (SET command)
LOCALE Subcommand (SET command)
THREADS Subcommand (SET command)
MCACHE Subcommand (SET command)
UNICODE Subcommand
FUZZBITS Subcommand (SET command)
MIOUTPUT Subcommand (SET command)
ROWSBREAK, CELLSBREAK, and TOLERANCE Subcommands (SET command)
ZCOMPRESSION Subcommand (SET command)


LOCALE Subcommand (SET command)

SET (command),SET (command),SET (command)
LOCALE subcommand,LOCALE subcommand,LOCALE subcommand
LOCALE (subcommand),LOCALE (subcommand),LOCALE (subcommand)
SET command,SET command,SET command

The LOCALE subcommand allows you to change the locale used for data analysis. By default, the locale is set to the computer’s system locale if possible. With the LOCALE subcommand, you can override the default behavior and process data files in other locales without changing your computer’s system or user locale.

• The default locale is the current operating system locale.

• The LOCALE subcommand persists. The next time that PASW Statistics is started on your computer, PASW Statistics will run in that locale.

• If the locale ID does not match the system locale, not all output will be rendered correctly.

• In code page mode, locale changes that also change the encoding can only be made when there are no open datasets. For information on code page mode and Unicode mode, see UNICODE Subcommand.

• You can use SHOW LOCALE to view the current PASW Statistics locale.

Example

SET LOCALE='Japanese'.

• When you are connecting to a server, the relevant locale ID is defined in the loclmap.xml file, which is located on the server computer. Check with your server administrator for available locale IDs.

• Locale ID values of the general form Language_Country.codepage#, which were valid in previous releases, are not valid in release 16.0 or later. In most instances, the "Language" portion of the old locale specification should be a valid locale ID in release 16.0 or later. For example, instead of 'Japanese_Japan.932', you could specify simply 'Japanese'. For a complete list of names and aliases that can be used to specify locale, go to http://www.iana.org/assignments/character-sets

Two-letter language abbreviations adhere to the ISO 639-1 standard: http://www.loc.gov/standards/iso639-2/php/code_list.php

Two-letter country codes adhere to the ISO 3166 standard: http://en.wikipedia.org/wiki/ISO_3166-1

Example

SET LOCALE='ja_JP.Shift_JIS'

• "ja" is the two-letter language code for Japanese.

• "JP" is the two-letter country code for Japan.

• "Shift_JIS" is the name of the character set.

Related Topics

SET
Overview (SET command)
Example (SET command)
WORKSPACE and MXCELLS Subcommands (SET command)
FORMAT Subcommand (SET command)
TLOOK and CTEMPLATE Subcommands (SET command)
ONUMBERS, OVARS, TNUMBERS, and TVARS Subcommands (SET command)
TFIT Subcommand (SET command)
RNG, SEED, and MTINDEX Subcommands (SET command)
EPOCH Subcommand (SET command)
ERRORS, MESSAGES, RESULTS, and PRINTBACK Subcommands (SET command)
JOURNAL Subcommand (SET command)
MEXPAND and MPRINT Subcommands (SET command)
MITERATE and MNEST Subcommands (SET command)
BLANKS Subcommand (SET command)
UNDEFINED Subcommand (SET command)
MXERRS Subcommand (SET command)
MXWARNS Subcommand (SET command)
MXLOOPS Subcommand (SET command)
EXTENSIONS Subcommand (SET command)
BLOCK Subcommand (SET command)
BOX Subcommand (SET command)
LENGTH and WIDTH Subcommands (SET command)
HEADER Subcommand (SET command)
CCA, CCB, CCC, CCD, and CCE Subcommands (SET command)
DECIMAL Subcommand (SET command)
CACHE Subcommand (SET command)
SMALL Subcommand (SET command)
OLANG Subcommand (SET command)
DEFOLANG Subcommand (SET command)
SCALEMIN Subcommand (SET command)
SORT Subcommand (SET command)
THREADS Subcommand (SET command)
MCACHE Subcommand (SET command)
UNICODE Subcommand
FUZZBITS Subcommand (SET command)
MIOUTPUT Subcommand (SET command)
ROWSBREAK, CELLSBREAK, and TOLERANCE Subcommands (SET command)
ZCOMPRESSION Subcommand (SET command)


THREADS Subcommand (SET command)

SET (command),SET (command),SET (command)
THREADS subcommand,THREADS subcommand,THREADS subcommand
THREADS (subcommand),THREADS (subcommand),THREADS (subcommand)
SET command,SET command,SET command
multithreading,multithreading,multithreading

The THREADS subcommand specifies the number of threads that multithreaded procedures use when calculating results. By default, PASW Statistics uses an internal algorithm to determine the number of threads for a particular computer. You can change this setting, but the default will often provide the best performance. The default also appears as the recommended setting when you run the SHOW command.

Using more than one thread is relevant only if your computer has multiple processors or each processor has multiple cores. Also, this setting affects only selected procedures that take advantage of it. These are:

• CORRELATIONS

• CSCOXREG

• CSLOGISTIC

• CSORDINAL

• CSSELECT

• DISCRIMINANT

• FACTOR

• NOMREG

• PARTIAL CORR

• REGRESSION

• SORT CASES

Note: PRESERVE and RESTORE do not operate on this subcommand.

Related Topics

SET
Overview (SET command)
Example (SET command)
WORKSPACE and MXCELLS Subcommands (SET command)
FORMAT Subcommand (SET command)
TLOOK and CTEMPLATE Subcommands (SET command)
ONUMBERS, OVARS, TNUMBERS, and TVARS Subcommands (SET command)
TFIT Subcommand (SET command)
RNG, SEED, and MTINDEX Subcommands (SET command)
EPOCH Subcommand (SET command)
ERRORS, MESSAGES, RESULTS, and PRINTBACK Subcommands (SET command)
JOURNAL Subcommand (SET command)
MEXPAND and MPRINT Subcommands (SET command)
MITERATE and MNEST Subcommands (SET command)
BLANKS Subcommand (SET command)
UNDEFINED Subcommand (SET command)
MXERRS Subcommand (SET command)
MXWARNS Subcommand (SET command)
MXLOOPS Subcommand (SET command)
EXTENSIONS Subcommand (SET command)
BLOCK Subcommand (SET command)
BOX Subcommand (SET command)
LENGTH and WIDTH Subcommands (SET command)
HEADER Subcommand (SET command)
CCA, CCB, CCC, CCD, and CCE Subcommands (SET command)
DECIMAL Subcommand (SET command)
CACHE Subcommand (SET command)
SMALL Subcommand (SET command)
OLANG Subcommand (SET command)
DEFOLANG Subcommand (SET command)
SCALEMIN Subcommand (SET command)
SORT Subcommand (SET command)
LOCALE Subcommand (SET command)
MCACHE Subcommand (SET command)
UNICODE Subcommand
FUZZBITS Subcommand (SET command)
MIOUTPUT Subcommand (SET command)
ROWSBREAK, CELLSBREAK, and TOLERANCE Subcommands (SET command)
ZCOMPRESSION Subcommand (SET command)


MCACHE Subcommand (SET command)

SET (command),SET (command),SET (command)
MCACHE subcommand,MCACHE subcommand,MCACHE subcommand
MCACHE (subcommand),MCACHE (subcommand),MCACHE (subcommand)
SET command,SET command,SET command
multithreading,multithreading,multithreading

The MCACHE subcommand specifies the memory cache (in kilobytes) that multithreaded procedures use when calculating results. By default, PASW Statistics uses an internal algorithm to determine the memory cache for a particular computer. You can change this setting, but the default will often provide the best performance. The default also appears as the recommended setting when you run the SHOW command.

Using the memory cache is relevant only if your computer has multiple processors or each processor has multiple cores. Also, this setting affects only selected procedures that take advantage of it. These are:

• CORRELATIONS

• DISCRIMINANT

• FACTOR

• NOMREG

• PARTIAL CORR

• REGRESSION

Note: PRESERVE and RESTORE do not operate on this subcommand.

Related Topics

SET
Overview (SET command)
Example (SET command)
WORKSPACE and MXCELLS Subcommands (SET command)
FORMAT Subcommand (SET command)
TLOOK and CTEMPLATE Subcommands (SET command)
ONUMBERS, OVARS, TNUMBERS, and TVARS Subcommands (SET command)
TFIT Subcommand (SET command)
RNG, SEED, and MTINDEX Subcommands (SET command)
EPOCH Subcommand (SET command)
ERRORS, MESSAGES, RESULTS, and PRINTBACK Subcommands (SET command)
JOURNAL Subcommand (SET command)
MEXPAND and MPRINT Subcommands (SET command)
MITERATE and MNEST Subcommands (SET command)
BLANKS Subcommand (SET command)
UNDEFINED Subcommand (SET command)
MXERRS Subcommand (SET command)
MXWARNS Subcommand (SET command)
MXLOOPS Subcommand (SET command)
EXTENSIONS Subcommand (SET command)
BLOCK Subcommand (SET command)
BOX Subcommand (SET command)
LENGTH and WIDTH Subcommands (SET command)
HEADER Subcommand (SET command)
CCA, CCB, CCC, CCD, and CCE Subcommands (SET command)
DECIMAL Subcommand (SET command)
CACHE Subcommand (SET command)
SMALL Subcommand (SET command)
OLANG Subcommand (SET command)
DEFOLANG Subcommand (SET command)
SCALEMIN Subcommand (SET command)
SORT Subcommand (SET command)
LOCALE Subcommand (SET command)
THREADS Subcommand (SET command)
UNICODE Subcommand
FUZZBITS Subcommand (SET command)
MIOUTPUT Subcommand (SET command)
ROWSBREAK, CELLSBREAK, and TOLERANCE Subcommands (SET command)
ZCOMPRESSION Subcommand (SET command)


UNICODE Subcommand

UNICODE (subcommand),UNICODE (subcommand),UNICODE (subcommand)
SET command,SET command,SET command
SET (command),SET (command),SET (command)
UNICODE subcommand,UNICODE subcommand,UNICODE subcommand

SET UNICODE NO|YES controls the default behavior for determining the encoding for reading and writing data files and syntax files.

NO. Use the current locale setting to determine the encoding for reading and writing data and command syntax files. This is referred to as code page mode. This is the default. The alias is OFF. For information on the current locale setting, see LOCALE Subcommand (SET command).

YES. Use Unicode encoding (UTF-8) for reading and writing data and command syntax files. This is referred to as Unicode mode. The alias is ON.

• You can change the UNICODE setting only when there are no open data sources.

• The UNICODE setting persists across sessions and remains in effect until it is explicitly changed.

There are a number of important implications regarding Unicode mode and Unicode files:

• Data and syntax files saved in Unicode encoding should not be used in releases prior to 16.0. For syntax files, you can specify local encoding when you save the file. For data files, you should open the data file in code page mode and then resave it if you want to read the file with earlier versions.

• When code page data files are read in Unicode mode, the defined width of all string variables is tripled. You can use ALTER TYPE to automatically adjust the width of all string variables.

• The GET command determines the file encoding for PASW Statistics data files from the file itself, regardless of the current mode setting (and defined string variable widths in code page files are tripled in Unicode mode).See the topic GET for more information.

• For text data files read with DATA LIST and related commands (for example, REPEATING DATA and FILE TYPE) or written with PRINT or WRITE, you can override the default encoding with the ENCODING subcommand.

• GET DATA uses the default encoding for reading text data files (TYPE=TXT), which is UTF-8 in Unicode mode or the code page determined by the current locale in code page mode.

• OMS uses default encoding for writing text files (FORMAT=TEXT and FORMAT=TABTEXT) and for writing PASW Statistics data files (FORMAT=SAV).

• GET STATA, GET TRANSLATE, and SAVE TRANSLATE (with the exception of saving SAS 9 format files) read and write data in the current locale code page, regardless of mode.

• SAVE TRANSLATE saves SAS 9 files in UTF-8 format in Unicode mode and in the current locale code page in code page mode.

• For syntax files run via INCLUDE or INSERT, you can override the default encoding with the ENCODING subcommand.

• For syntax files, the encoding is set to Unicode after execution of the block of commands that includes SET UNICODE=YES. You must run SET UNICODE=YES separately from subsequent commands that contain Unicode characters not recognized by the local encoding in effect prior to switching to Unicode.

Related Topics

SET
Overview (SET command)
Example (SET command)
WORKSPACE and MXCELLS Subcommands (SET command)
FORMAT Subcommand (SET command)
TLOOK and CTEMPLATE Subcommands (SET command)
ONUMBERS, OVARS, TNUMBERS, and TVARS Subcommands (SET command)
TFIT Subcommand (SET command)
RNG, SEED, and MTINDEX Subcommands (SET command)
EPOCH Subcommand (SET command)
ERRORS, MESSAGES, RESULTS, and PRINTBACK Subcommands (SET command)
JOURNAL Subcommand (SET command)
MEXPAND and MPRINT Subcommands (SET command)
MITERATE and MNEST Subcommands (SET command)
BLANKS Subcommand (SET command)
UNDEFINED Subcommand (SET command)
MXERRS Subcommand (SET command)
MXWARNS Subcommand (SET command)
MXLOOPS Subcommand (SET command)
EXTENSIONS Subcommand (SET command)
BLOCK Subcommand (SET command)
BOX Subcommand (SET command)
LENGTH and WIDTH Subcommands (SET command)
HEADER Subcommand (SET command)
CCA, CCB, CCC, CCD, and CCE Subcommands (SET command)
DECIMAL Subcommand (SET command)
CACHE Subcommand (SET command)
SMALL Subcommand (SET command)
OLANG Subcommand (SET command)
DEFOLANG Subcommand (SET command)
SCALEMIN Subcommand (SET command)
SORT Subcommand (SET command)
LOCALE Subcommand (SET command)
THREADS Subcommand (SET command)
MCACHE Subcommand (SET command)
FUZZBITS Subcommand (SET command)
MIOUTPUT Subcommand (SET command)
ROWSBREAK, CELLSBREAK, and TOLERANCE Subcommands (SET command)
ZCOMPRESSION Subcommand (SET command)


FUZZBITS Subcommand (SET command)

FUZZBITS (subcommand),FUZZBITS (subcommand),FUZZBITS (subcommand)
SET command,SET command,SET command
SET (command),SET (command),SET (command)
FUZZBITS subcommand,FUZZBITS subcommand,FUZZBITS subcommand

FUZZBITS specifies the default setting of the fuzzbits argument for the RND and TRUNC functions. The value controls the number of least-significant bits by which the internal representation of the value to be rounded or truncated (expressed as a 64-bit floating point binary) may fall short of the nearest rounding boundary and be rounded up. See the topic Arithmetic Functions for more information.

• The value must be an integer between 0 and 20. The default is 6, which should be sufficient for most applications.

• A value of 0 produces the same results as in release 10. A value of 10 produces the same results as in releases 11 and 12.

• The FUZZBITS setting persists across sessions.

Related Topics

SET
Overview (SET command)
Example (SET command)
WORKSPACE and MXCELLS Subcommands (SET command)
FORMAT Subcommand (SET command)
TLOOK and CTEMPLATE Subcommands (SET command)
ONUMBERS, OVARS, TNUMBERS, and TVARS Subcommands (SET command)
TFIT Subcommand (SET command)
RNG, SEED, and MTINDEX Subcommands (SET command)
EPOCH Subcommand (SET command)
ERRORS, MESSAGES, RESULTS, and PRINTBACK Subcommands (SET command)
JOURNAL Subcommand (SET command)
MEXPAND and MPRINT Subcommands (SET command)
MITERATE and MNEST Subcommands (SET command)
BLANKS Subcommand (SET command)
UNDEFINED Subcommand (SET command)
MXERRS Subcommand (SET command)
MXWARNS Subcommand (SET command)
MXLOOPS Subcommand (SET command)
EXTENSIONS Subcommand (SET command)
BLOCK Subcommand (SET command)
BOX Subcommand (SET command)
LENGTH and WIDTH Subcommands (SET command)
HEADER Subcommand (SET command)
CCA, CCB, CCC, CCD, and CCE Subcommands (SET command)
DECIMAL Subcommand (SET command)
CACHE Subcommand (SET command)
SMALL Subcommand (SET command)
OLANG Subcommand (SET command)
DEFOLANG Subcommand (SET command)
SCALEMIN Subcommand (SET command)
SORT Subcommand (SET command)
LOCALE Subcommand (SET command)
THREADS Subcommand (SET command)
MCACHE Subcommand (SET command)
UNICODE Subcommand
MIOUTPUT Subcommand (SET command)
ROWSBREAK, CELLSBREAK, and TOLERANCE Subcommands (SET command)
ZCOMPRESSION Subcommand (SET command)


MIOUTPUT Subcommand (SET command)

MIOUTPUT (subcommand),MIOUTPUT (subcommand),MIOUTPUT (subcommand)
SET command,SET command,SET command
SET (command),SET (command),SET (command)
MIOUTPUT subcommand,MIOUTPUT subcommand,MIOUTPUT subcommand

This feature requires the Missing Values option.

MIOUTPUT specifies the display of pooled output when a multiply imputed dataset is analyzed.

OBSERVED | Show results for observed data.
IMPUTED | Show results for each imputed dataset.
POOLED | Show final pooled statistics.
DIAGNOSTICS | Display pooling diagnostics for parameters pooled by the univariate method.

• At least one keyword must be specified in square brackets. If a keyword is not specified the corresponding output is suppressed.

• DIAGNOSTICS is ignored with a warning if POOLED is not specified.

• Default setting depend on licensing. If the Missing Values option is licensed, all options are on by default. If the Missing Values option is not licensed, the defaults are OBSERVED and IMPUTED, and specifying POOLED and DIAGNOSTICS keywords are ignored with a warning. That is, without the Missing Values option you can suppress results for original data and imputations, but cannot obtain pooled results.

• The MIOUTPUT setting persists across sessions. It is ignored by tables that do not support splits. It is also ignored when analysis is performed without variable Imputation_ defined as a split variable.

• MIOUTPUT has no effect on charts or PMML.

See the topic Multiple Imputation for more information.

Related Topics

SET
Overview (SET command)
Example (SET command)
WORKSPACE and MXCELLS Subcommands (SET command)
FORMAT Subcommand (SET command)
TLOOK and CTEMPLATE Subcommands (SET command)
ONUMBERS, OVARS, TNUMBERS, and TVARS Subcommands (SET command)
TFIT Subcommand (SET command)
RNG, SEED, and MTINDEX Subcommands (SET command)
EPOCH Subcommand (SET command)
ERRORS, MESSAGES, RESULTS, and PRINTBACK Subcommands (SET command)
JOURNAL Subcommand (SET command)
MEXPAND and MPRINT Subcommands (SET command)
MITERATE and MNEST Subcommands (SET command)
BLANKS Subcommand (SET command)
UNDEFINED Subcommand (SET command)
MXERRS Subcommand (SET command)
MXWARNS Subcommand (SET command)
MXLOOPS Subcommand (SET command)
EXTENSIONS Subcommand (SET command)
BLOCK Subcommand (SET command)
BOX Subcommand (SET command)
LENGTH and WIDTH Subcommands (SET command)
HEADER Subcommand (SET command)
CCA, CCB, CCC, CCD, and CCE Subcommands (SET command)
DECIMAL Subcommand (SET command)
CACHE Subcommand (SET command)
SMALL Subcommand (SET command)
OLANG Subcommand (SET command)
DEFOLANG Subcommand (SET command)
SCALEMIN Subcommand (SET command)
SORT Subcommand (SET command)
LOCALE Subcommand (SET command)
THREADS Subcommand (SET command)
MCACHE Subcommand (SET command)
UNICODE Subcommand
FUZZBITS Subcommand (SET command)
ROWSBREAK, CELLSBREAK, and TOLERANCE Subcommands (SET command)
ZCOMPRESSION Subcommand (SET command)


ROWSBREAK, CELLSBREAK, and TOLERANCE Subcommands (SET command)

SET (command),SET (command),SET (command)
ROWSBREAK subcommand,ROWSBREAK subcommand,ROWSBREAK subcommand
CELLSBREAK subcommand,CELLSBREAK subcommand,CELLSBREAK subcommand
TOLERANCE subcommand,TOLERANCE subcommand,TOLERANCE subcommand
ROWSBREAK (subcommand),ROWSBREAK (subcommand),ROWSBREAK (subcommand)
SET command,SET command,SET command
CELLSBREAK (subcommand),CELLSBREAK (subcommand),CELLSBREAK (subcommand)
SET command,SET command,SET command
TOLERANCE (subcommand),TOLERANCE (subcommand),TOLERANCE (subcommand)
SET command,SET command,SET command
pivot tables,pivot tables,pivot tables
controlling number of rows to display,controlling number of rows to display,controlling number of rows to display

These subcommands control the display of large pivot tables in the Viewer. These settings have no effect on printing large pivot tables or exporting output to external formats with command such as OUTPUT EXPORT or OMS.

ROWSBREAK=n|NONE. Sets the number of rows to display. The default is 100. The value must be an integer between 10 and 1000 or the keyword NONE, which turns off this feature and displays the entire table, regardless of size. When the feature is on and large tables are displayed in sections, navigation controls allow you to view different sections of the table.

CELLSBREAK=n. Sets the maximum number of cells to display. The default is 10000. The value must an integer between 1000 and 100000. If ROWSBREAK=NONE, this setting is ignored.

TOLERANCE=n. Controls the maximum number of rows of the inner most row dimension of the table to split across displayed views of the table. For example, if there are six categories in each group of the inner most row dimension, specifying a value of six would prevent any group from splitting across displayed views. The value must be an integer and cannot be greater than the ROWSBREAK value. If ROWSBREAK=NONE, this setting is ignored.

Several factors can affect the actual number of rows displayed, including:

• If the CELLSBREAK value is reached before the ROWSBREAK value, then the table is split at that point. For example, if ROWSBREAK=1000 and CELLSBREAK=10000, a table with 20 columns will be displayed in blocks of 500 rows.

• The TOLERANCE setting can cause fewer or more rows than the ROWSBREAK value to be displayed.

Related Topics

SET
Overview (SET command)
Example (SET command)
WORKSPACE and MXCELLS Subcommands (SET command)
FORMAT Subcommand (SET command)
TLOOK and CTEMPLATE Subcommands (SET command)
ONUMBERS, OVARS, TNUMBERS, and TVARS Subcommands (SET command)
TFIT Subcommand (SET command)
RNG, SEED, and MTINDEX Subcommands (SET command)
EPOCH Subcommand (SET command)
ERRORS, MESSAGES, RESULTS, and PRINTBACK Subcommands (SET command)
JOURNAL Subcommand (SET command)
MEXPAND and MPRINT Subcommands (SET command)
MITERATE and MNEST Subcommands (SET command)
BLANKS Subcommand (SET command)
UNDEFINED Subcommand (SET command)
MXERRS Subcommand (SET command)
MXWARNS Subcommand (SET command)
MXLOOPS Subcommand (SET command)
EXTENSIONS Subcommand (SET command)
BLOCK Subcommand (SET command)
BOX Subcommand (SET command)
LENGTH and WIDTH Subcommands (SET command)
HEADER Subcommand (SET command)
CCA, CCB, CCC, CCD, and CCE Subcommands (SET command)
DECIMAL Subcommand (SET command)
CACHE Subcommand (SET command)
SMALL Subcommand (SET command)
OLANG Subcommand (SET command)
DEFOLANG Subcommand (SET command)
SCALEMIN Subcommand (SET command)
SORT Subcommand (SET command)
LOCALE Subcommand (SET command)
THREADS Subcommand (SET command)
MCACHE Subcommand (SET command)
UNICODE Subcommand
FUZZBITS Subcommand (SET command)
MIOUTPUT Subcommand (SET command)
ZCOMPRESSION Subcommand (SET command)


ZCOMPRESSION Subcommand (SET command)

SET (command),SET (command),SET (command)
ZCOMPRESSION subcommand,ZCOMPRESSION subcommand,ZCOMPRESSION subcommand
ZCOMPRESSION (subcommand),ZCOMPRESSION (subcommand),ZCOMPRESSION (subcommand)
SET command,SET command,SET command

Note: This command works only if you are connected to the PASW Statistics Server.

ZCOMPRESSION is an override mechanism that works with a setting on the PASW Statistics Server to determine whether scratch files that are created during a session are in compressed or uncompressed form. Scratch files are created by CACHE, SORT, AGGREGATE, transformations, and any other procedure that adds columns to the data file.

• The administrator of the PASW Statistics Server must give you permission to override the Server setting. If you don't have permission, a warning message is displayed and the command is ignored.

• A compressed scratch file reduces the amount of disk I/O compared to an uncompressed scratch file but requires more processing on the Server.

• The extra overhead associated with compression is considerably greater when writing than reading a file. Consider using a higher value for SET CACHE to reduce the frequency of writing new scratch files containing the entire data set. A higher SET CACHE value will also increase the number of times a scratch file is read.

• If you are working with a very large data file (larger than half of the Server's RAM) and compression is on, you may consider issuing an explicit CACHE command before running other procedures. Doing this will ensure the procedures take full advantage of the disk I/O benefits.

• The override specification takes effect the next time that a scratch file is written and stays in effect until SET ZCOMPRESSION is specified again or until the end of the session.

• The default setting for compressing scratch files is set on the PASW Statistics Server. There is no syntax default.

YES | Compress scratch files.
NO | Do not compress scratch files.

Related Topics

SET
Overview (SET command)
Example (SET command)
WORKSPACE and MXCELLS Subcommands (SET command)
FORMAT Subcommand (SET command)
TLOOK and CTEMPLATE Subcommands (SET command)
ONUMBERS, OVARS, TNUMBERS, and TVARS Subcommands (SET command)
TFIT Subcommand (SET command)
RNG, SEED, and MTINDEX Subcommands (SET command)
EPOCH Subcommand (SET command)
ERRORS, MESSAGES, RESULTS, and PRINTBACK Subcommands (SET command)
JOURNAL Subcommand (SET command)
MEXPAND and MPRINT Subcommands (SET command)
MITERATE and MNEST Subcommands (SET command)
BLANKS Subcommand (SET command)
UNDEFINED Subcommand (SET command)
MXERRS Subcommand (SET command)
MXWARNS Subcommand (SET command)
MXLOOPS Subcommand (SET command)
EXTENSIONS Subcommand (SET command)
BLOCK Subcommand (SET command)
BOX Subcommand (SET command)
LENGTH and WIDTH Subcommands (SET command)
HEADER Subcommand (SET command)
CCA, CCB, CCC, CCD, and CCE Subcommands (SET command)
DECIMAL Subcommand (SET command)
CACHE Subcommand (SET command)
SMALL Subcommand (SET command)
OLANG Subcommand (SET command)
DEFOLANG Subcommand (SET command)
SCALEMIN Subcommand (SET command)
SORT Subcommand (SET command)
LOCALE Subcommand (SET command)
THREADS Subcommand (SET command)
MCACHE Subcommand (SET command)
UNICODE Subcommand
FUZZBITS Subcommand (SET command)
MIOUTPUT Subcommand (SET command)
ROWSBREAK, CELLSBREAK, and TOLERANCE Subcommands (SET command)


SHIFT VALUES

SHIFT VALUES (command),SHIFT VALUES (command),SHIFT VALUES (command)
SHIFT VALUES (command),SHIFT VALUES (command),SHIFT VALUES (command)
syntax chart,syntax chart,syntax chart
Shift Values,Shift Values,Shift Values
command syntax,command syntax,command syntax
lag function,lag function,lag function
lead function,lead function,lead function
SHIFT VALUES VARIABLE=varname RESULT=varname {LEAD=non-negative integer}
                                             {LAG=non-negative integer }
                                             {SHIFT=integer            }
  [/VARIABLE=varname...]

Syntax for the SHIFT VALUES command can be generated from the Shift Values dialog.

Release History Collapse Hide details

Release History

Release 17.0

• Command introduced.

Example

SHIFT VALUES VARIABLE=OldVar RESULT=NewVar LEAD=1.

Related Topics

Overview (SHIFT VALUES command)
Shift Values


Overview (SHIFT VALUES command)

SHIFT VALUES (command),SHIFT VALUES (command),SHIFT VALUES (command)

The SHIFT VALUES command creates new variables that contain the values of existing variables from preceding or subsequent cases.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is the command name followed by:

VARIABLE=varname. This must be a variable that already exists in the active dataset.

RESULT=newname. This must be a variable that does not currently exist in the active dataset.

One of the following alternative shift methods:

• LEAD=n. Get the value from a subsequent case in the dataset. The value must be a non-negative integer that indicates the number of cases. For example, LEAD=1 returns the value of the existing variable from the case immediately following the current case.

• LAG=n. Get the value from a preceding case in the dataset. The value must be a non-negative integer that indicates the number of cases. For example, LAG=1 returns the value of the existing variable from the case immediately before the current case.

• SHIFT=n. Get the value from a preceding or subsequent case. The value must be an integer that indicates the number of cases. For example, SHIFT=1 returns the value of the existing variable from the case immediately following the current case, and SHIFT=-1 returns the value of the existing variable from the case immediately before the current case.

To specify more than one variable on the same command, use a forward slash (/) to separate the full specification for each subsequent variable.

Syntax Rules Collapse Hide details

Syntax Rules

• The RESULT keyword must specify a new variable name. The name cannot be a variable that already exists in the active dataset.For information on variable naming rules, see Variable Names.

• Each keyword must be followed by an equals sign (=) before the value. For example, RESULT=NewVar.

Operations Collapse Hide details

Operations

• If split file processing is on, the scope of the shift is limited to each split group. A shift value cannot be obtained from a case in a preceding or subsequent split group.

• Filter status is ignored.

• The value of the result variable is set to system-missing for the first or last n cases in the dataset or split group, where n is the number of cases specified on LEAD, LAG, or SHIFT. For example, LAG=1 would set the result variable to system-missing for the first case in the dataset (or first case in each split group).

• A value of 0 for number of cases will copy the value of the original value to the same case for the new variable.

• User-missing values are preserved.

• Dictionary information from the original variable, including defined value labels and user-missing value assignments, is applied to the new variable. (Note: Custom variable attributes are not included.)

• A variable label is automatically generated for the new variable that describes the shift operation that created the variable.

Example Collapse Hide details

Example

DATA LIST FREE /Var1 (F1).
BEGIN DATA
0 1 9 0 1
END DATA.
VARIABLE LABEL Var1 'Original Variable'.
VALUE LABELS Var1 0 'No' 1 'Yes' 9 'Missing'.
MISSING VALUES Var1(9).
SHIFT VALUES VARIABLE=Var1 RESULT=Var1_Lead LEAD=1
    /VARIABLE=Var1 RESULT=Var1_Lag LAG=1
    /VARIABLE=Var1 RESULT=Var1_Shift SHIFT=-1.
Results displayed in Data View
Dictionary information displayed in Variable View

Related Topics

SHIFT VALUES


SHOW

SHOW (command),SHOW (command),SHOW (command)
SHOW (command),SHOW (command),SHOW (command)
syntax chart,syntax chart,syntax chart
release history,release history,release history
options,options,options
displaying,displaying,displaying
settings,settings,settings
displaying,displaying,displaying
preferences,preferences,preferences
displaying,displaying,displaying
SHOW [ALL] [BLANKS] [BOX] [BLOCK] [CC] [CCA] [CCB]

 [CCC] [CCD] [CCE] [CACHE] [CTEMPLATE] [DECIMAL] [DEFOLANG]

 [DIRECTORY] [ENVIRONMENT] [EPOCH] [ERRORS] [EXTPATHS] [FILTER] [FORMAT] [FUZZBITS]

 [HANDLES] [HEADER] [LENGTH] [LICENSE] [LOCALE] [MESSAGES] [MEXPAND] [MIOUTPUT]

 [MITERATE] [MNEST] [MPRINT] [MXCELLS] [MXERRS] [MXLOOPS] [MXWARNS]

 [N] [OLANG] [ONUMBERS] [OVARS] [PRINTBACK] [RESULTS] [RNG] [SCALEMIN]

 [SCOMPRESSION] [SEED] [SMALL] [SORT] [SPLIT] [SYSMIS] [TFIT] [TLOOK]

 [TMSRECORDING] [TNUMBERS] [TVARS] [UNDEFINED] [UNICODE] [VERSION]

 [WEIGHT] [WIDTH] [WORKSPACE] [ZCOMPRESSION] [$VARS]

This command takes effect immediately. It does not read the active dataset or execute pending transformations. See the topic Command Order for more information.

Release History Collapse Hide details

Release History

Release 13.0

• BLKSIZE and BUFNO subcommands are obsolete and no longer supported.

• HANDLES subcommand introduced.

• SORT subcommand introduced.

Release 15.0

• TMSRECORDING subcommand introduced.

Release 16.0

• UNICODE subcommand introduced.

• MCACHE subcommand introduced.

• THREADS subcommand introduced.

Release 17.0

• FUZZBITS subcommand introduced.

Release 18.0

• EXTPATHS subcommand introduced.

• ZCOMPRESSION subcommand introduced.

• COMPRESSION subcommand removed because it is obsolete.

Example

SHOW.

Related Topics

Overview (SHOW command)
Example (SHOW command)
Subcommands (SHOW command)


Overview (SHOW command)

SHOW displays current settings for running options. Most of these settings can be changed by using the SET command.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is simply the command keyword, which displays important current settings (keyword ALL). Some displayed option settings are applicable only when you have options such as Tables and Categories.

Subcommand Order Collapse Hide details

Subcommand Order

Subcommands can be named in any order.

Syntax Collapse Hide details

Syntax

• If any subcommands are specified, only the requested settings are displayed.

• SHOW can be specified more than once.

Related Topics

SHOW
Example (SHOW command)
Subcommands (SHOW command)


Example (SHOW command)

SHOW BLANKS /UNDEFINED /MXWARNS.

• BLANKS shows the value to which a completely blank field for a numeric variable is translated.

• UNDEFINED indicates whether a message is displayed whenever the program encounters anything other than a number or a blank as the value for a numeric variable.

• MXWARNS displays the maximum number of warnings that are allowed before a session is terminated.

Related Topics

SHOW
Overview (SHOW command)
Subcommands (SHOW command)


Subcommands (SHOW command)

The following alphabetical list shows the available subcommands.

SHOW (command),SHOW (command),SHOW (command)
BLANKS subcommand,BLANKS subcommand,BLANKS subcommand
BLANKS (subcommand),BLANKS (subcommand),BLANKS (subcommand)
SHOW command,SHOW command,SHOW command
BOX (subcommand),BOX (subcommand),BOX (subcommand)
SHOW command,SHOW command,SHOW command
SHOW (command),SHOW (command),SHOW (command)
BOX subcommand,BOX subcommand,BOX subcommand
SHOW (command),SHOW (command),SHOW (command)
BLOCK subcommand,BLOCK subcommand,BLOCK subcommand
BLOCK (subcommand),BLOCK (subcommand),BLOCK (subcommand)
SHOW command,SHOW command,SHOW command
SHOW (command),SHOW (command),SHOW (command)
CC subcommand,CC subcommand,CC subcommand
CC (subcommand),CC (subcommand),CC (subcommand)
SHOW command,SHOW command,SHOW command
SHOW (command),SHOW (command),SHOW (command)
CACHE subcommand,CACHE subcommand,CACHE subcommand
CACHE (subcommand),CACHE (subcommand),CACHE (subcommand)
SHOW command,SHOW command,SHOW command
ZCOMPRESSION (subcommand),ZCOMPRESSION (subcommand),ZCOMPRESSION (subcommand)
SHOW command,SHOW command,SHOW command
SHOW (command),SHOW (command),SHOW (command)
ZCOMPRESSION subcommand,ZCOMPRESSION subcommand,ZCOMPRESSION subcommand
SHOW (command),SHOW (command),SHOW (command)
CTEMPLATE subcommand,CTEMPLATE subcommand,CTEMPLATE subcommand
CTEMPLATE (subcommand),CTEMPLATE (subcommand),CTEMPLATE (subcommand)
SHOW command,SHOW command,SHOW command
SHOW (command),SHOW (command),SHOW (command)
DEFOLANG subcommand,DEFOLANG subcommand,DEFOLANG subcommand
DEFOLANG (subcommand),DEFOLANG (subcommand),DEFOLANG (subcommand)
SHOW command,SHOW command,SHOW command
SHOW (command),SHOW (command),SHOW (command)
DIRECTORY subcommand,DIRECTORY subcommand,DIRECTORY subcommand
SHOW (command),SHOW (command),SHOW (command)
ENVIRONMENT subcommand,ENVIRONMENT subcommand,ENVIRONMENT subcommand
SHOW (command),SHOW (command),SHOW (command)
EPOCH subcommand,EPOCH subcommand,EPOCH subcommand
SHOW (command),SHOW (command),SHOW (command)
ERRORS subcommand,ERRORS subcommand,ERRORS subcommand
ERRORS (subcommand),ERRORS (subcommand),ERRORS (subcommand)
SHOW command,SHOW command,SHOW command
SHOW (command),SHOW (command),SHOW (command)
EXTENSIONS subcommand,EXTENSIONS subcommand,EXTENSIONS subcommand
EXTENSIONS (subcommand),EXTENSIONS (subcommand),EXTENSIONS (subcommand)
SHOW command,SHOW command,SHOW command
SHOW (command),SHOW (command),SHOW (command)
FILTER subcommand,FILTER subcommand,FILTER subcommand
SHOW (command),SHOW (command),SHOW (command)
FORMAT subcommand,FORMAT subcommand,FORMAT subcommand
FORMAT (subcommand),FORMAT (subcommand),FORMAT (subcommand)
SHOW command,SHOW command,SHOW command
HEADER (subcommand),HEADER (subcommand),HEADER (subcommand)
SHOW command,SHOW command,SHOW command
SHOW (command),SHOW (command),SHOW (command)
HEADER subcommand,HEADER subcommand,HEADER subcommand
JOURNAL (subcommand),JOURNAL (subcommand),JOURNAL (subcommand)
SHOW command,SHOW command,SHOW command
SHOW (command),SHOW (command),SHOW (command)
JOURNAL subcommand,JOURNAL subcommand,JOURNAL subcommand
SHOW (command),SHOW (command),SHOW (command)
LENGTH subcommand,LENGTH subcommand,LENGTH subcommand
LENGTH (subcommand),LENGTH (subcommand),LENGTH (subcommand)
SHOW command,SHOW command,SHOW command
SHOW (command),SHOW (command),SHOW (command)
LICENSE subcommand,LICENSE subcommand,LICENSE subcommand
SHOW (command),SHOW (command),SHOW (command)
LOCALE subcommand,LOCALE subcommand,LOCALE subcommand
SHOW (command),SHOW (command),SHOW (command)
MESSAGES subcommand,MESSAGES subcommand,MESSAGES subcommand
MESSAGES (subcommand),MESSAGES (subcommand),MESSAGES (subcommand)
SHOW command,SHOW command,SHOW command
SHOW (command),SHOW (command),SHOW (command)
MXERRS subcommand,MXERRS subcommand,MXERRS subcommand
SHOW (command),SHOW (command),SHOW (command)
MEXPAND subcommand,MEXPAND subcommand,MEXPAND subcommand
MEXPAND (subcommand),MEXPAND (subcommand),MEXPAND (subcommand)
SHOW command,SHOW command,SHOW command
SHOW (command),SHOW (command),SHOW (command)
MITERATE subcommand,MITERATE subcommand,MITERATE subcommand
MITERATE (subcommand),MITERATE (subcommand),MITERATE (subcommand)
SHOW command,SHOW command,SHOW command
SHOW (command),SHOW (command),SHOW (command)
MNEST subcommand,MNEST subcommand,MNEST subcommand
MNEST (subcommand),MNEST (subcommand),MNEST (subcommand)
SHOW command,SHOW command,SHOW command
SHOW (command),SHOW (command),SHOW (command)
MPRINT subcommand,MPRINT subcommand,MPRINT subcommand
MPRINT (subcommand),MPRINT (subcommand),MPRINT (subcommand)
SHOW command,SHOW command,SHOW command
SHOW (command),SHOW (command),SHOW (command)
MXCELLS subcommand,MXCELLS subcommand,MXCELLS subcommand
MXCELLS (subcommand),MXCELLS (subcommand),MXCELLS (subcommand)
SHOW command,SHOW command,SHOW command
SHOW (command),SHOW (command),SHOW (command)
MXLOOPS subcommand,MXLOOPS subcommand,MXLOOPS subcommand
MXLOOPS (subcommand),MXLOOPS (subcommand),MXLOOPS (subcommand)
SHOW command,SHOW command,SHOW command
SHOW (command),SHOW (command),SHOW (command)
MXMEMORY subcommand,MXMEMORY subcommand,MXMEMORY subcommand
MXMEMORY (subcommand),MXMEMORY (subcommand),MXMEMORY (subcommand)
SHOW command,SHOW command,SHOW command
SHOW (command),SHOW (command),SHOW (command)
MXWARNS subcommand,MXWARNS subcommand,MXWARNS subcommand
MXWARNS (subcommand),MXWARNS (subcommand),MXWARNS (subcommand)
SHOW command,SHOW command,SHOW command
SHOW (command),SHOW (command),SHOW (command)
N subcommand,N subcommand,N subcommand
N (subcommand),N (subcommand),N (subcommand)
SHOW command,SHOW command,SHOW command
SHOW (command),SHOW (command),SHOW (command)
ONLANG subcommand,ONLANG subcommand,ONLANG subcommand
OLANG (subcommand),OLANG (subcommand),OLANG (subcommand)
SHOW command,SHOW command,SHOW command
SHOW (command),SHOW (command),SHOW (command)
ONUMBERS subcommand,ONUMBERS subcommand,ONUMBERS subcommand
ONUMBERS (subcommand),ONUMBERS (subcommand),ONUMBERS (subcommand)
SHOW command,SHOW command,SHOW command
SHOW (command),SHOW (command),SHOW (command)
OVARS subcommand,OVARS subcommand,OVARS subcommand
OVARS (subcommand),OVARS (subcommand),OVARS (subcommand)
SHOW command,SHOW command,SHOW command
SHOW (command),SHOW (command),SHOW (command)
PRINTBACK subcommand,PRINTBACK subcommand,PRINTBACK subcommand
PRINTBACK (subcommand),PRINTBACK (subcommand),PRINTBACK (subcommand)
SHOW command,SHOW command,SHOW command
RESULTS (subcommand),RESULTS (subcommand),RESULTS (subcommand)
SHOW command,SHOW command,SHOW command
SHOW (command),SHOW (command),SHOW (command)
RESULTS subcommand,RESULTS subcommand,RESULTS subcommand
RNG (subcommand),RNG (subcommand),RNG (subcommand)
SHOW command,SHOW command,SHOW command
SHOW (command),SHOW (command),SHOW (command)
RNG subcommand,RNG subcommand,RNG subcommand
SHOW (command),SHOW (command),SHOW (command)
SCALEMIN subcommand,SCALEMIN subcommand,SCALEMIN subcommand
SCOMPRESSION (subcommand),SCOMPRESSION (subcommand),SCOMPRESSION (subcommand)
SHOW command,SHOW command,SHOW command
SHOW (command),SHOW (command),SHOW (command)
SCOMPRESSION subcommand,SCOMPRESSION subcommand,SCOMPRESSION subcommand
SHOW (command),SHOW (command),SHOW (command)
SEED subcommand,SEED subcommand,SEED subcommand
SEED (subcommand),SEED (subcommand),SEED (subcommand)
SHOW command,SHOW command,SHOW command
SHOW (command),SHOW (command),SHOW (command)
SMALL subcommand,SMALL subcommand,SMALL subcommand
SMALL (subcommand),SMALL (subcommand),SMALL (subcommand)
SHOW command,SHOW command,SHOW command
SHOW (command),SHOW (command),SHOW (command)
SPLIT subcommand,SPLIT subcommand,SPLIT subcommand
SPLIT (subcommand),SPLIT (subcommand),SPLIT (subcommand)
SHOW command,SHOW command,SHOW command
SHOW (command),SHOW (command),SHOW (command)
SYSMIS subcommand,SYSMIS subcommand,SYSMIS subcommand
SYSMIS (subcommand),SYSMIS (subcommand),SYSMIS (subcommand)
SHOW command,SHOW command,SHOW command
SHOW (command),SHOW (command),SHOW (command)
TFIT subcommand,TFIT subcommand,TFIT subcommand
TIFT (subcommand),TIFT (subcommand),TIFT (subcommand)
SHOW command,SHOW command,SHOW command
SHOW (command),SHOW (command),SHOW (command)
TLOOK subcommand,TLOOK subcommand,TLOOK subcommand
TLOOK (subcommand),TLOOK (subcommand),TLOOK (subcommand)
SHOW command,SHOW command,SHOW command
SHOW (command),SHOW (command),SHOW (command)
TNUMBERS subcommand,TNUMBERS subcommand,TNUMBERS subcommand
TNUMBERS (subcommand),TNUMBERS (subcommand),TNUMBERS (subcommand)
SHOW command,SHOW command,SHOW command
SHOW (command),SHOW (command),SHOW (command)
TVARS subcommand,TVARS subcommand,TVARS subcommand
TVARS (subcommand),TVARS (subcommand),TVARS (subcommand)
SHOW command,SHOW command,SHOW command
SHOW (command),SHOW (command),SHOW (command)
UNDEFINED subcommand,UNDEFINED subcommand,UNDEFINED subcommand
UNDEFINED (subcommand),UNDEFINED (subcommand),UNDEFINED (subcommand)
SHOW command,SHOW command,SHOW command
SHOW (command),SHOW (command),SHOW (command)
VERSION (subcommand),VERSION (subcommand),VERSION (subcommand)
VERSION (subcommand),VERSION (subcommand),VERSION (subcommand)
SHOW command,SHOW command,SHOW command
SHOW (command),SHOW (command),SHOW (command)
WEIGHT subcommand,WEIGHT subcommand,WEIGHT subcommand
WEIGHT (subcommand),WEIGHT (subcommand),WEIGHT (subcommand)
SHOW command,SHOW command,SHOW command
WIDTH (subcommand),WIDTH (subcommand),WIDTH (subcommand)
SHOW command,SHOW command,SHOW command
SHOW (command),SHOW (command),SHOW (command)
WIDTH subcommand,WIDTH subcommand,WIDTH subcommand
SHOW (command),SHOW (command),SHOW (command)
WORKSPACE subcommand,WORKSPACE subcommand,WORKSPACE subcommand
WORKSPACE (subcommand),WORKSPACE (subcommand),WORKSPACE (subcommand)
SHOW command,SHOW command,SHOW command
SHOW (command),SHOW (command),SHOW (command)
$VARS subcommand,$VARS subcommand,$VARS subcommand
$VARS (subcommand),$VARS (subcommand),$VARS (subcommand)
SHOW command,SHOW command,SHOW command
SHOW (command),SHOW (command),SHOW (command)
DECIMAL subcommand,DECIMAL subcommand,DECIMAL subcommand
TMSRECORDING (subcommand),TMSRECORDING (subcommand),TMSRECORDING (subcommand)
SHOW command,SHOW command,SHOW command
SHOW (command),SHOW (command),SHOW (command)
TMSRECORDING subcommand,TMSRECORDING subcommand,TMSRECORDING subcommand
DECIMAL (subcommand),DECIMAL (subcommand),DECIMAL (subcommand)
SHOW command,SHOW command,SHOW command
THREADS (subcommand),THREADS (subcommand),THREADS (subcommand)
SHOW command,SHOW command,SHOW command
SHOW (command),SHOW (command),SHOW (command)
THREADS subcommand,THREADS subcommand,THREADS subcommand
MCACHE (subcommand),MCACHE (subcommand),MCACHE (subcommand)
SHOW command,SHOW command,SHOW command
SHOW (command),SHOW (command),SHOW (command)
MCACHE subcommand,MCACHE subcommand,MCACHE subcommand
SHOW (command),SHOW (command),SHOW (command)
UNICODE subcommand,UNICODE subcommand,UNICODE subcommand
UNICODE (subcommand),UNICODE (subcommand),UNICODE (subcommand)
SHOW command,SHOW command,SHOW command
SHOW (command),SHOW (command),SHOW (command)
FUZZBITS subcommand,FUZZBITS subcommand,FUZZBITS subcommand
FUZZBITS (subcommand),FUZZBITS (subcommand),FUZZBITS (subcommand)
SHOW command,SHOW command,SHOW command
HANDLES (subcommand),HANDLES (subcommand),HANDLES (subcommand)
SHOW command,SHOW command,SHOW command
SHOW (command),SHOW (command),SHOW (command)
HANDLES subcommand,HANDLES subcommand,HANDLES subcommand
SHOW (command),SHOW (command),SHOW (command)
EXTPATHS subcommand,EXTPATHS subcommand,EXTPATHS subcommand
EXTPATHS (subcommand),EXTPATHS (subcommand),EXTPATHS (subcommand)
SHOW command,SHOW command,SHOW command
ALL | Display important settings that are applicable to your system. This setting is the default.
BLANKS | Value to which a completely blank field for a numeric variable is translated. The default is the system-missing value.
BOX | Characters used to draw boxes. Both character and hexadecimal representations are displayed. The default is X’2D7C2B2B2B2B2B2B2B2B2B’. This setting applies only to text output from the program.
BLOCK | Character used to draw bar charts. Both character and hexadecimal representations are displayed. The default is X’2A’. This setting applies only to the text output from the program.
CC | Custom currency formats. CC shows the current custom currency formats that have been defined for CCA, CCB, CCC, CCD, and CCE on SET. In Windows environments, the formats reflect the Regional Settings Properties. You can also request any of these keywords individually.
CACHE | Cache active data file. This setting shows the number of changes in the active data file before a cache file is created. The default is 20.
CTEMPLATE | Chart template file. The setting is either NONE or a filename.
DECIMAL | Decimal indicator. This setting indicates the current character used as the decimal indicator. DOT indicates that a period is the decimal indicator; COMMA indicates that a comma is the decimal indicator.
DEFOLANG | Default output language. This setting indicates the default output language to use if the language that is specified on the OLANG subcommand is not available. The initial default setting is the language version of the installed software.
DIRECTORY | Default directory. This setting indicates the root directory that is used to determine the locations of files that are specified with no paths or relative paths. A wide variety of actions can change the current default directory during a session.
ENVIRONMENT | Operating system and computer information. This setting includes information about environment variables, defined paths, domain, etc.
EPOCH | Range of years for date-format variables and date functions entered with a two-digit year value. AUTOMATIC indicates a 100-year range beginning 69 years before the current year and 30 years after the current year.
ERRORS | Error messages for text output. The setting can be LISTING (alias YES or ON) or NONE (alias NO or OFF).
EXTENSIONS | No longer supported.
EXTPATHS | Displays the locations for installing and searching for custom dialogs, extension commands, and R packages. When more than one location exists, location 1 takes precedence over location 2, etc. The location R_HOME (in R_HOME\library) specifies the directory where R is installed.
FILTER | Filter status. This setting indicates whether filtering is currently in effect (FILTER command) and indicates the filter variable that is in use (if any).
FORMAT | Default print and write formats for numeric variables that are defined on DATA LIST in freefield format and all numeric variables created by transformation commands. The default is F8.2.
FUZZBITS | Default setting of the fuzzbits argument for the RND and TRUNC functions. The default is 6.
HANDLES | Displays a list of all file handles currently in effect. File handles are created with the FILE HANDLE command.
HEADER | Headings for text output. The setting is YES, NO, or BLANK. The default is NO.
JOURNAL | No longer supported.
LENGTH | Maximum page length for output. The default is 59. This setting applies only to the text output from the program.
LICENSE | Licensed components, expiration date, release number, and maximum number of users permitted by the license.
LOCALE | Operating system locale setting and codepage. In Windows operating systems, locale is set in the Regional Options of the Control Panel.
MCACHE | Memory cache size in kilobytes. The default and recommended setting are based on your specific hardware.
MESSAGES | Resource-utilization messages for text output. The setting can be LISTING (alias YES or ON) or NONE (alias NO or OFF).
MEXPAND | Macro expansion. The setting is either ON (alias YES) or OFF (alias NO). The default is ON.
MIOUTPUT | Displays the settings for pooled output when a multiply imputed dataset is analyzed.
MITERATE | Maximum loop iterations permitted in macro expansions. The default is 1000.
MNEST | Maximum nesting level for macros. The default is 50.
MPRINT | Inclusion of expanded macros in the output. The setting is either ON (alias YES) or OFF (alias NO). The default is OFF.
MXCELLS | Maximum number of cells that are allowed for a new pivot table. The default is AUTOMATIC, which allows the number to be determined by the available memory.
MXERRS | Maximum number of errors allowed and number of errors so far in current session. In most implementations of PASW Statistics, the maximum number of errors defined on SET MXERRS is ignored. However, the information that SHOW MXERRS provides about number of errors in the current session can be useful.
MXLOOPS | Maximum executions of a loop on a single case. The default is 40.
MXMEMORY | No longer supported.
MXWARNS | Maximum number of warnings and errors that are shown for text output. The default is 10.
N | Unweighted number of cases in the active dataset. N displays UNKNOWN if a active dataset has not yet been created. N cannot be changed with SET.
OLANG | Output language for pivot tables.
ONUMBERS | Display of variable values in the outline for pivot tables. The settings can be LABELS, VALUES, and BOTH.
OVARS | Display of variables as headings. The settings can be LABELS, NAMES, and BOTH.
PRINTBACK | Command printback. The setting can be BOTH (alias LISTING, YES, or ON) or NONE (alias NO or OFF). The default is BOTH at system installation.
RESULTS | Output from commands. This setting is not applicable to output that is displayed in pivot tables. The setting can be LISTING (alias YES or ON) or NONE (alias NO or OFF).
RNG | Random number generator. Indicates which random number generator is currently begin used.
SCALEMIN | For data files that were created in versions prior to version 8.0, the minimum number of unique values for a numeric variable that is used to classify the variable as scale. This setting affects only pre-8.0 data files that are opened in later versions.
SCOMPRESSION | Compression of PASW Statistics data files. This setting can be overridden by the COMPRESSED or UNCOMPRESSED subcommands on the SAVE or XSAVE commands. The default setting varies by system. SCOMPRESSION cannot be changed with SET.
SEED | Seed for the random-number generator. The default is generally 2,000,000 but may vary by system.
SMALL | Decimal value to control display of scientific notation in output.
SORT | Sorting mechanism that is currently in effect: PASW Statistics or external, third-party (if available).
SPLIT | Split file status.
SYSMIS | The system-missing value. SYSMIS cannot be changed with SET.
TFIT | Adjust column widths in pivot tables. The settings can be BOTH (label and data) and LABELS.
THREADS | Number of threads. The default and recommended setting are based on your specific hardware.
TLOOK | Pivot table template file. The setting can be either NONE or a filename.
TMSRECORDING | TMS recording status. Yes indicates that a TMS block for writing transformations to PMML is currently in effect. No indicates that TMS is not currently in effect. See the topic TMS BEGIN for more information.
TNUMBERS | Display of variable values in pivot tables. The settings can be VALUES, LABELS, and BOTH.
TVARS | Display of variables as headings. The settings can be NAMES, LABELS, and BOTH.
UNDEFINED | Warning message for undefined data. WARN is the default. NOWARN suppresses messages but does not alter the count of warnings toward the MXWARNS total.
UNICODE | Unicode mode status. The setting is either YES (alias ON) or NO (alias OFF).
VERSION | Version number and creation date.
WEIGHT | Variable that is used to weight cases. WEIGHT can be specified for SHOW only and cannot be changed with SET.
WIDTH | Maximum page width for the output. The default is 132 columns for batch mode and 80 for interactive mode. This setting applies only to text output from the program.
WORKSPACE | Special workspace memory limit in kilobytes. The default is 6148.
ZCOMPRESSION | Override Server setting for compression of scratch files. The setting is either ON or OFF (alias YES or NO). There is no default because the default behavior is determined by the PASW Statistics Server.
$VARS | Values of system variables. $VARS cannot be changed with SET.

Related Topics

SHOW
Overview (SHOW command)
Example (SHOW command)


SORT CASES

cases,cases,cases
sorting,sorting,sorting
sorting cases,sorting cases,sorting cases
SORT CASES (command),SORT CASES (command),SORT CASES (command)
SORT CASES (command),SORT CASES (command),SORT CASES (command)
syntax chart,syntax chart,syntax chart
SORT CASES [BY] varlist[({A})] [varlist...]
                         {D}

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

Syntax for the SORT CASES command can be generated from the Sort Cases dialog.

Release History Collapse Hide details

Release History

Release 17.0

• Added support for SET THREADS.

Example

SORT CASES BY DIVISION (A) STORE (D).

Related Topics

Overview (SORT CASES command)
Examples (SORT CASES command)
SORT CASES with Other Procedures (SORT CASES command)


Overview (SORT CASES command)

BY (keyword),BY (keyword),BY (keyword)
SORT CASES command,SORT CASES command,SORT CASES command
D (keyword),D (keyword),D (keyword)
SORT CASES command,SORT CASES command,SORT CASES command
UP (keyword),UP (keyword),UP (keyword)
SORT CASES command,SORT CASES command,SORT CASES command
A (keyword),A (keyword),A (keyword)
SORT CASES command,SORT CASES command,SORT CASES command
sorting cases,sorting cases,sorting cases
sort order,sort order,sort order
DOWN (keyword),DOWN (keyword),DOWN (keyword)
SORT CASES command,SORT CASES command,SORT CASES command
sorting cases,sorting cases,sorting cases
sort keys,sort keys,sort keys

SORT CASES reorders the sequence of cases in the active dataset based on the values of one or more variables. You can optionally sort cases in ascending or descending order, or you can use combinations of ascending and descending order for different variables.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is a variable or list of variables that are used as sort keys. By default, cases are sorted in ascending order of each variable, starting with the first variable that is named. For each subsequent variable, cases are sorted in ascending order within categories of the previously named variables.

Syntax Rules Collapse Hide details

Syntax Rules

• Keyword BY is optional.

• BY variables can be numeric or string but not scratch, system, or temporary variables.

• You can explicitly request the default sort order (ascending) by specifying A or UP in parentheses after the variable name. To sort cases in descending order, specify D or DOWN.

• An order specification (A or D) applies to all variables in the list, up to the previous order specification. If you combine ascending and descending order on the same SORT CASES command, you may need to specify the default A explicitly.

Operations [image] Limitations Collapse Hide details

Operations

Limitations

• SORT CASES first sorts the file according to the first variable that is named. For subsequent variables, cases are sorted within categories of the previously named variables.

• The sort sequence is based on the locale-defined order (and is not necessarily the same as the numerical order of the character codes). The default locale is the operating system locale. You can change the locale with SET LOCALE. Use SHOW LOCALE to display the current locale.

• This procedure uses the multithreaded options specified by SET THREADS.

• You cannot specify more than 64 sort variables.

Related Topics

SORT CASES
Examples (SORT CASES command)
SORT CASES with Other Procedures (SORT CASES command)


Examples (SORT CASES command)

SORT CASES BY DIVISION (A) STORE (D).

• Cases are sorted in ascending order of variable DIVISION. Cases are further sorted in descending order of STORE within categories of DIVISION. A must be specified so that D applies to STORE only.

SORT CASES DIVISION STORE (A) AGE (D).

• Cases are sorted in ascending order of DIVISION. Keyword BY is not used in this example.

• Cases are further sorted in ascending order of STORE within values of DIVISION. Specification A applies to both DIVISION and STORE.

• Cases are further sorted in descending order of AGE within values of STORE and DIVISION.

Related Topics

SORT CASES
Overview (SORT CASES command)
SORT CASES with Other Procedures (SORT CASES command)


SORT CASES with Other Procedures (SORT CASES command)

REPORT (command),REPORT (command),REPORT (command)
with SORT CASES command,with SORT CASES command,with SORT CASES command
SORT CASES (command),SORT CASES (command),SORT CASES (command)
with REPORT command,with REPORT command,with REPORT command
SORT CASES (command),SORT CASES (command),SORT CASES (command)
with AGGREGATE command,with AGGREGATE command,with AGGREGATE command
AGGREGATE (command),AGGREGATE (command),AGGREGATE (command)
with SORT CASES command,with SORT CASES command,with SORT CASES command
SORT CASES (command),SORT CASES (command),SORT CASES (command)
with ADD FILES command,with ADD FILES command,with ADD FILES command

• In AGGREGATE, cases are sorted in order of the break variable or variables. You do not have to use SORT CASES prior to running AGGREGATE, because the procedure does its own sorting.

ADD FILES (command),ADD FILES (command),ADD FILES (command)
with SORT CASES command,with SORT CASES command,with SORT CASES command

• You can use SORT CASES in conjunction with the BY keyword in ADD FILES to interleave cases with the same variables but from different files.

SORT CASES (command),SORT CASES (command),SORT CASES (command)
with MATCH FILES command,with MATCH FILES command,with MATCH FILES command
MATCH FILES (command),MATCH FILES (command),MATCH FILES (command)
with SORT CASES command,with SORT CASES command,with SORT CASES command

• With MATCH FILES, cases must be sorted in the same order for all files that you combine.

UPDATE (command),UPDATE (command),UPDATE (command)
with SORT CASES command,with SORT CASES command,with SORT CASES command
SORT CASES (command),SORT CASES (command),SORT CASES (command)
with UPDATE command,with UPDATE command,with UPDATE command

• With UPDATE, cases must be sorted in ascending order of the key variable or variables in both the master file and all transaction files.

PRINT (command),PRINT (command),PRINT (command)
with SORT CASES command,with SORT CASES command,with SORT CASES command
SORT CASES (command),SORT CASES (command),SORT CASES (command)
with PRINT command,with PRINT command,with PRINT command

• You can use the PRINT command to check the results of a SORT CASES command. To be executed, PRINT must be followed by a procedure or EXECUTE.

Related Topics

SORT CASES
Overview (SORT CASES command)
Examples (SORT CASES command)


SORT VARIABLES

SORT VARIABLES (command),SORT VARIABLES (command),SORT VARIABLES (command)
SORT VARIABLES (command),SORT VARIABLES (command),SORT VARIABLES (command)
syntax chart,syntax chart,syntax chart
sorting,sorting,sorting
variables,variables,variables
variables,variables,variables
sorting,sorting,sorting
SORT VARIABLES [BY] {NAME          } [({A})}
                    {TYPE          }   {D}
                    {FORMAT        }
                    {LABEL         }
                    {VALUES        }
                    {MISSING       }
                    {MEASURE       }
                    {ROLE          }
                    {COLUMNS       }
                    {ALIGNMENT     }
                    {ATTRIBUTE name}

If there are any pending transformations, this command reads the active dataset and causes execution of any pending commands. Otherwise, it takes effect immediately without reading the active dataset.

Release History

Release 16.0.

• Command introduced.

Release 18.0.

• ROLE keyword introduced.

Example

SORT VARIABLES BY NAME (A).

Related Topics

Overview (SORT VARIABLES command)


Overview (SORT VARIABLES command)

SORT VARIABLES sorts the variables in the active dataset based on the values of the selected dictionary attribute.

Basic Specification

The basic specification is the command name SORT VARIABLES followed by the name of a single dictionary attribute.

Syntax Rules

• Only one dictionary attribute can be specified.

• The BY keyword is optional.

• You can explicitly request the default sort order (ascending) by specifying A or UP in parentheses after the attribute name. To sort variables in descending order, specify D or DOWN.

Sorting Options

Variables can be sorted based on the values of any one of the following dictionary attributes:

NAME. Sort variables by variable names. The primary sort is alphabetical, but trailing digits are sorted numerically within ties on the preceding part. For example, V2 comes before V10 in ascending order.

TYPE. Group variables by type (numeric or string) and sort string variables by defined width. In default ascending order, numeric variables come before string variables, and shorter string variables come before longer string variables.

FORMAT. Group variables by format (for example, Date, Dollar, String).

LABEL. Sort variables in alphabetical order by variable labels. In default ascending order, all variables without defined variable labels come before variables with defined variable labels. See the topic VARIABLE LABELS for more information.

VALUES. Sort variables by value labels. In default ascending order, all variables without defined value labels come before variables with defined value labels. See the topic VALUE LABELS for more information.

MISSING. Group variables by defined missing values. In default ascending order, all variables without defined missing values come before variables with defined missing values. See the topic MISSING VALUES for more information.

MEASURE. Sort variables by measurement level. The default ascending order is: nominal, ordinal, scale. See the topic VARIABLE LEVEL for more information.

ROLE. Sort variables by role. Some dialogs support predefined roles that can be used to pre-select variables for analysis. See the topic Overview (VARIABLE ROLE command) for more information.

COLUMNS. Sort variables by column width. Column width is the width of the column that displays the variable in Data View of the Data Editor. See the topic VARIABLE WIDTH for more information.

ALIGNMENT. Group variables by alignment. The default ascending order is: left, right, center. See the topic VARIABLE ALIGNMENT for more information.

ATTRIBUTE name. Sort variables by values of the specified custom variable attribute name. In default ascending order, all variables without values for the named attribute come before variables with values for the named attribute. See the topic VARIABLE ATTRIBUTE for more information.

Related Topics

SORT VARIABLES


SPCHART

SPCHART (command),SPCHART (command),SPCHART (command)
SPCHART (command),SPCHART (command),SPCHART (command)
syntax chart,syntax chart,syntax chart
release history,release history,release history
control charts,control charts,control charts
command syntax,command syntax,command syntax

SPCHART is available in the Statistics Base option.

SPCHART
 [/TEMPLATE='filename']

 [/TITLE='line 1' ['line 2']]
 [/SUBTITLE='line 1']
 [/FOOTNOTE='line 1' ['line 2']]

 {[/XR=]{var BY var                  } }
        {var var [var var...][BY var]} [(XBARONLY)]
 { /XS= {var BY var                  } }
        {var var [var var...][BY var]} [(XBARONLY)]
 { /IR= var [BY var]                   }
 { /I= var [BY var]                    }
 { /NP= {var BY var                   }}
        {COUNT(var) N({var }) [BY var]}
        {value                        }
 { /P= {var BY var                   } }
       {COUNT(var) N({var }) [BY var]}
       {value                        }
 { /C= {var BY var                   } }
       {COUNT(var) N({var }) [BY var]}
       {value                        }
 { /U= {var BY var                    }}
       {COUNT(var) N({var  }) [BY var]}
                     {value}

 [/STATISTICS = [CP] [CPL] [CPU] [K] [CPK] [CR] [CPM]
                [CZL] [CZU] [CZMIN] [CZMAX] [CZOUT]
                [PP] [PPL] [PPU] [PPK] [PR] [PPM]
                [PZL] [PZU] [PZMIN] [PZMAX] [PZOUT]
                [AZOUT] ]

 [/RULES = [ALL] [UCL] [R2UPPER] [R4UPPER] [R8UPPER]
           [R8LOWER] [R4LOWER] [R2LOWER] [LCL] [TRUP] [TRDOWN] [ALTERNATING] ]

 [/ID=var]

 [/CAPSIGMA = [{RBAR  }]]
               {SBAR  }
               {MRBAR }
               {WITHIN}

 [/SPAN={2**}]
        {n  }

 [{/CONFORM  }=value]
  {/NONCONFORM}

 [/SIGMAS={3**}]
          {n  }

 [/MINSAMPLE={2**}]
             {n  }

 [/LSL=value]    [/USL=value]

 [TARGET = value]

 [/MISSING=[{NOREPORT**}] [{EXCLUDE**}]
            {REPORT    }   {INCLUDE  }

**Default if the subcommand is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See SPCHART Algorithms for computational details for this procedure.

Syntax for the SPCHART command can be generated from the Control Charts dialog.

Release History Collapse Hide details

Release History

Release 15.0

• (XBARONLY) keyword introduced on XR and XS subcommands.

• RULES subcommand introduced.

• ID subcommand introduced.

Example

SPCHART  /TEMPLATE='CNTR.CHT'
  /IR=SUBSIZE.

Related Topics

Overview (SPCHART command)
Example (SPCHART command)
TITLE, SUBTITLE, and FOOTNOTE Subcommands (SPCHART command)
XR and XS Subcommands (SPCHART command)
I and IR Subcommands (SPCHART command)
Data Organization (SPCHART command)
Variable Specification (SPCHART command)
P and NP Subcommands (SPCHART command)
Data Organization (SPCHART command)
Variable Specification (SPCHART command)
C and U Subcommands (SPCHART command)
Data Organization (SPCHART command)
Variable Specification (SPCHART command)
STATISTICS Subcommand (SPCHART command)
The Process Capability Indices (SPCHART command)
The Process Performance Indices (SPCHART command)
Measure(s) for Assessing Normality (SPCHART command)
RULES Subcommand (SPCHART command)
ID Subcommand (SPCHART command)
CAPSIGMA Subcommand (SPCHART command)
SPAN Subcommand (SPCHART command)
CONFORM and NONCONFORM Subcommands (SPCHART command)
SIGMAS Subcommand (SPCHART command)
MINSAMPLE Subcommand (SPCHART command)
LSL and USL Subcommand (SPCHART command)
TARGET Subcommand (SPCHART command)
MISSING Subcommand (SPCHART command)


Overview (SPCHART command)

SPCHART generates several types of high-resolution control charts. A control chart plots a quality characteristic that is measured or computed from a sample versus the sample number or time. This technique is a widely used process-control technique for testing the hypothesis that the process is in a state of statistical control. All control charts display four series:

• The process line representing the quality characteristic for each sample.

• The center line indicating the average value of the quality characteristic that corresponds to the in-control state.

• Two horizontal lines showing the upper control limit and lower control limit.

Control charts are used for improving productivity, preventing defects and unnecessary process adjustments, and gathering information about process capability.

SPCHART produces X-bar, R, s, individuals, and moving range charts as well as np, p, c, and u charts. You may need to transform your data to conform to the required data organization that is described under each chart type subcommand.

Control charts are available only on systems where high-resolution display is available.

Options Collapse Hide details

Options

Titles and Footnotes. You can use the TITLE, SUBTITLE, and FOOTNOTE subcommands to specify a title, subtitle, and footnote for the control chart.

Chart Type. You can request a specific type of control chart by using the XR, XS, IR, I, NP, P, C, or U subcommand.

Templates. You can specify a template, using the TEMPLATE subcommand, to override the default chart attribute settings on your system.

Control Limits. You can specify a sigma value on the SIGMAS subcommand to modify the calculated upper and lower control limits. You can also use the USL and LSL subcommands to specify fixed limits. The upper and lower limits that you specify will be displayed simultaneously with the calculated control limits.

Control Rules. You can specify control rules that help you quickly identify out-of-control points.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is a chart type subcommand. By default, the title of the generated chart is Control Chart followed by the label of the process variable. The subtitle provides split-file information if split-file processing is in effect, and the one-line footnote provides the sigma value.

Subcommand Order Collapse Hide details

Subcommand Order

Subcommands can be specified in any order.

Syntax Rules Collapse Hide details

Syntax Rules

• Only one chart type subcommand can be specified.

• Keyword SPAN is used only with IR and I subcommands.

• Keyword CONFORM or NONCONFORM is used only with NP and P subcommands.

Operations Collapse Hide details

Operations

• SPCHART plots four basic series: the process, the center line, the upper control line, and the lower control line.

• The chart title, subtitle, and footnote are assigned as they are specified on TITLE, SUBTITLE, and FOOTNOTE subcommands. If you do not use these subcommands, the chart title is Control Chart, followed by the label of the process variable, and a one-line footnote displays the sigma level.

• The category variable label is used as the title for the category axis. If no variable label is defined, the variable name is used. If no category variable is defined, the title is null.

• The category variable value labels are used as the category axis labels. If no value labels are defined, values are used. If no category variable is defined, integer values from 1 to n are used, where n is the number of subgroups or units plotted.

• All series are plotted as lines. When a series has a constant value across all samples, the value is reported in the legend entry for the series.

• Case weights are not honored for control charts when each case is a subgroup. Case weights are honored when each case is a unit and when the weights are integers. When weighted data are used in an individuals chart, replicated cases are plotted on the control chart.

• The calculated control limits are always displayed and can be suppressed only by editing the chart in a chart window.

• You can specify preset control limits for an X-bar or I chart, as some industries often do. The specified control limits are displayed simultaneously with the calculated limits.

Limitations Collapse Hide details

Limitations

• Control charts cannot have fewer than 2 points or more than 3000 points.

• The subgroup size in X-bar and range charts cannot exceed 100.

• The span for individual charts is limited to 100.

Related Topics

SPCHART
Example (SPCHART command)
TITLE, SUBTITLE, and FOOTNOTE Subcommands (SPCHART command)
XR and XS Subcommands (SPCHART command)
I and IR Subcommands (SPCHART command)
Data Organization (SPCHART command)
Variable Specification (SPCHART command)
P and NP Subcommands (SPCHART command)
Data Organization (SPCHART command)
Variable Specification (SPCHART command)
C and U Subcommands (SPCHART command)
Data Organization (SPCHART command)
Variable Specification (SPCHART command)
STATISTICS Subcommand (SPCHART command)
The Process Capability Indices (SPCHART command)
The Process Performance Indices (SPCHART command)
Measure(s) for Assessing Normality (SPCHART command)
RULES Subcommand (SPCHART command)
ID Subcommand (SPCHART command)
CAPSIGMA Subcommand (SPCHART command)
SPAN Subcommand (SPCHART command)
CONFORM and NONCONFORM Subcommands (SPCHART command)
SIGMAS Subcommand (SPCHART command)
MINSAMPLE Subcommand (SPCHART command)
LSL and USL Subcommand (SPCHART command)
TARGET Subcommand (SPCHART command)
MISSING Subcommand (SPCHART command)


Example (SPCHART command)

SPCHART  /TEMPLATE='CNTR.CHT'
  /IR=SUBSIZE.

• This command generates an individuals chart and a moving range chart. The process variable SUBSIZE is a numeric variable that measures the size variation of the product.

• Both charts use the attributes that are defined for the template that is saved in CNTR.CHT.

• The default span (2) and sigma value (3) are used.

• Because no BY variable is specified, the x axis is labeled by sequence numbers.

X-bar and R-charts

SPCHART
  /XR=ph BY time
  /STATISTICS=CP CPU CPL K CPM CZOUT PP PPU PPL PPM PZOUT AZOUT
  /RULES=All
  /CAPSIGMA=RBAR
  /SIGMAS=3
  /USL=5.5
  /LSL=4.5
  /TARGET=5.0
  /MINSAMPLE=2.

• The procedure produces an x-bar and R chart for ph by time.

• The RULES subcommand specifies that all rules for identifying out-of-control points should be used.

• The STATISTICS subcommand requests various process capability and process performance indices, in addition to measures for assessing normality.

• The USL and LSL subcommands specify upper and lower control limits of 5.5 and 4.5, respectively.

• The TARGET subcommand defines the target value that is used in computing CpM and PpM.

• All other options are set to their default values.

For discussion of output from this syntax and to place the example in context, see Using X-bar and R Charts to Monitor Shampoo pH .

Descriptive Heading for First Example

SPCHART
  /P=COUNT( defects ) N( sampled )BY lot
  /RULES=ALL
  /SIGMAS=3.

• The procedure produces a p chart using the variable lot to define subgroups, sampled to define the number of items sampled per lot, and defects to define the number of defective units per sample.

• The RULES subcommand specifies that all rules for identifying out-of-control points should be used.

• All other options are set to their default values.

For discussion of output from this syntax and to place the example in context, see Using p Charts to Track the Proportion of Defective Units .

Related Topics

SPCHART
Overview (SPCHART command)
TITLE, SUBTITLE, and FOOTNOTE Subcommands (SPCHART command)
XR and XS Subcommands (SPCHART command)
I and IR Subcommands (SPCHART command)
Data Organization (SPCHART command)
Variable Specification (SPCHART command)
P and NP Subcommands (SPCHART command)
Data Organization (SPCHART command)
Variable Specification (SPCHART command)
C and U Subcommands (SPCHART command)
Data Organization (SPCHART command)
Variable Specification (SPCHART command)
STATISTICS Subcommand (SPCHART command)
The Process Capability Indices (SPCHART command)
The Process Performance Indices (SPCHART command)
Measure(s) for Assessing Normality (SPCHART command)
RULES Subcommand (SPCHART command)
ID Subcommand (SPCHART command)
CAPSIGMA Subcommand (SPCHART command)
SPAN Subcommand (SPCHART command)
CONFORM and NONCONFORM Subcommands (SPCHART command)
SIGMAS Subcommand (SPCHART command)
MINSAMPLE Subcommand (SPCHART command)
LSL and USL Subcommand (SPCHART command)
TARGET Subcommand (SPCHART command)
MISSING Subcommand (SPCHART command)


TITLE, SUBTITLE, and FOOTNOTE Subcommands (SPCHART command)

SPCHART (command),SPCHART (command),SPCHART (command)
FOOTNOTE subcommand,FOOTNOTE subcommand,FOOTNOTE subcommand
FOOTNOTE (subcommand),FOOTNOTE (subcommand),FOOTNOTE (subcommand)
SPCHART command,SPCHART command,SPCHART command
SPCHART (command),SPCHART (command),SPCHART (command)
SUBTITLE subcommand,SUBTITLE subcommand,SUBTITLE subcommand
SUBTITLE (subcommand),SUBTITLE (subcommand),SUBTITLE (subcommand)
SPCHART command,SPCHART command,SPCHART command
SPCHART (command),SPCHART (command),SPCHART (command)
TITLE subcommand,TITLE subcommand,TITLE subcommand
TITLE (subcommand),TITLE (subcommand),TITLE (subcommand)
SPCHART command,SPCHART command,SPCHART command

TITLE, SUBTITLE, and FOOTNOTE specify lines of text that are placed at the top or bottom of the control chart.

• One or two lines of text can be specified for TITLE or FOOTNOTE, and one line of text can be specified for SUBTITLE.

• Each line of text must be enclosed in quotes. The maximum length of any line is 72 characters.

• The default font sizes and types are used for the title, subtitle, and footnote.

• By default, the title, subtitle, and footnote are left-aligned with the y axis.

• If you do not specify TITLE, the default title is Control Chart followed by the label of the process variable.

• If you do not specify SUBTITLE, the subtitle provides the split-file information if split-file processing is in effect; otherwise, it is null, which leaves more space for the chart.

• If you do not specify FOOTNOTE, the sigma level is identified as the first line of the footnote.

Example

SPCHART TITLE = 'Wheel Production'
  /SUBTITLE = 'Process Control'
  /IR=SUBSIZE.

Related Topics

SPCHART
Overview (SPCHART command)
Example (SPCHART command)
XR and XS Subcommands (SPCHART command)
I and IR Subcommands (SPCHART command)
Data Organization (SPCHART command)
Variable Specification (SPCHART command)
P and NP Subcommands (SPCHART command)
Data Organization (SPCHART command)
Variable Specification (SPCHART command)
C and U Subcommands (SPCHART command)
Data Organization (SPCHART command)
Variable Specification (SPCHART command)
STATISTICS Subcommand (SPCHART command)
The Process Capability Indices (SPCHART command)
The Process Performance Indices (SPCHART command)
Measure(s) for Assessing Normality (SPCHART command)
RULES Subcommand (SPCHART command)
ID Subcommand (SPCHART command)
CAPSIGMA Subcommand (SPCHART command)
SPAN Subcommand (SPCHART command)
CONFORM and NONCONFORM Subcommands (SPCHART command)
SIGMAS Subcommand (SPCHART command)
MINSAMPLE Subcommand (SPCHART command)
LSL and USL Subcommand (SPCHART command)
TARGET Subcommand (SPCHART command)
MISSING Subcommand (SPCHART command)


XR and XS Subcommands (SPCHART command)

SPCHART (command),SPCHART (command),SPCHART (command)
XS subcommand,XS subcommand,XS subcommand
XS (subcommand),XS (subcommand),XS (subcommand)
SPCHART command,SPCHART command,SPCHART command
SPCHART (command),SPCHART (command),SPCHART (command)
XR subcommand,XR subcommand,XR subcommand
XR (subcommand),XR (subcommand),XR (subcommand)
SPCHART command,SPCHART command,SPCHART command
SPCHART (command),SPCHART (command),SPCHART (command)
s charts,s charts,s charts
s charts,s charts,s charts
SPCHART command,SPCHART command,SPCHART command
SPCHART (command),SPCHART (command),SPCHART (command)
R charts,R charts,R charts
R charts,R charts,R charts
SPCHART command,SPCHART command,SPCHART command
SPCHART (command),SPCHART (command),SPCHART (command)
X-bar charts,X-bar charts,X-bar charts
X-bar charts,X-bar charts,X-bar charts
SPCHART command,SPCHART command,SPCHART command

XR produces an X-bar chart and an R chart. XS produces an X-bar chart and an s chart. X-bar, R, and s charts are control charts for continuous variables, such as size, weight, length, and temperature.

An X-bar chart plots the mean of each subgroup. The center line indicates the mean of subgroup means. The control limits are calculated from subgroup means, numbers, standard deviations, and the user-specified SIGMAS value. The following figure shows an X-bar chart.

X-bar chart

An R chart plots range values (maximum-minimum) of successive subgroups. The center line indicates the mean of subgroup ranges. The control limits are calculated from subgroup ranges, numbers, and the user-specified SIGMAS value. The R chart tests whether the process variability is in control. When the subgroup size is relatively small (4, 5, or 6), the range method yields almost as good an estimator of the variance as does the subgroup variance. The following figure shows an R chart.

R chart

An s chart plots subgroup standard deviations. The center line indicates the mean of subgroup standard deviations. The control limits are calculated from subgroup standard deviations, numbers, and the user-specified SIGMAS value. The s chart tests whether the process variability is in control, especially when the subgroup size is moderate to large. The following figure shows an s chart.

An s chart

Related Topics

SPCHART
Overview (SPCHART command)
Example (SPCHART command)
TITLE, SUBTITLE, and FOOTNOTE Subcommands (SPCHART command)
I and IR Subcommands (SPCHART command)
Data Organization (SPCHART command)
Variable Specification (SPCHART command)
P and NP Subcommands (SPCHART command)
Data Organization (SPCHART command)
Variable Specification (SPCHART command)
C and U Subcommands (SPCHART command)
Data Organization (SPCHART command)
Variable Specification (SPCHART command)
STATISTICS Subcommand (SPCHART command)
The Process Capability Indices (SPCHART command)
The Process Performance Indices (SPCHART command)
Measure(s) for Assessing Normality (SPCHART command)
RULES Subcommand (SPCHART command)
ID Subcommand (SPCHART command)
CAPSIGMA Subcommand (SPCHART command)
SPAN Subcommand (SPCHART command)
CONFORM and NONCONFORM Subcommands (SPCHART command)
SIGMAS Subcommand (SPCHART command)
MINSAMPLE Subcommand (SPCHART command)
LSL and USL Subcommand (SPCHART command)
TARGET Subcommand (SPCHART command)
MISSING Subcommand (SPCHART command)
Data Organization (SPCHART command)
Variable Specification (SPCHART command)
(XBARONLY) Keyword (SPCHART command)


Data Organization (SPCHART command)

XR (subcommand),XR (subcommand),XR (subcommand)
data organization,data organization,data organization
XS (subcommand),XS (subcommand),XS (subcommand)
data organization,data organization,data organization

For X-bar, R, or s charts, data can be organized where each case is a unit or where each case is a subgroup.

• If each case is a unit with a subgroup identifier, cases are assigned to a category according to the value of the identifier. Table is an example of this type of data organization. The data do not have to be sorted by subgroup. A BY variable (the subgroup identifier) is required to sort and aggregate data and label the process variable.

• If each case is a subgroup, there are as many variables as individuals within one sample. A sample identifier is not required. When there is a sample identifier, it is used for labeling. Table shows this type of organization.

Each case is a unit for X-bar, R, and s charts
Subgroup | Length
8:50 | 6.35
11:30 | 6.39
8:50 | 6.40
11:30 | 6.46
8:50 | 6.32
11:30 | 6.37
8:50 | 6.39
11:30 | 6.36
... | ...
Each case is a subgroup for X-bar, R, and s charts
Subgroup | N1 | N2 | N3 | N4
8:50 | 6.35 | 6.40 | 6.32 | 6.39
11:30 | 6.39 | 6.46 | 6.37 | 6.36
... | ... | ... | ... | ...

Related Topics

XR and XS Subcommands (SPCHART command)
Variable Specification (SPCHART command)
(XBARONLY) Keyword (SPCHART command)


Variable Specification (SPCHART command)

XR (subcommand),XR (subcommand),XR (subcommand)
variable specification,variable specification,variable specification
XS (subcommand),XS (subcommand),XS (subcommand)
variable specification,variable specification,variable specification

If data are organized as shown in Table , the variable specifications on XR and XS subcommands are

VAR BY VAR

The variable that is specified before BY is the process variable, which is the variable that contains values for all instances to be plotted (for example, LENGTH in Table ). The variable that is specified after BY is the category variable or the BY variable, which is the subgroup identifier (for example, SUBGROUP in Table ). The process variable must be numeric, while the category variable can be of any type. The chart is sorted by the category variable.

If data are organized as shown in Table , the variable specifications on XR and XS subcommands are

VAR VAR [VAR...] [BY VAR]

Each of the variables that is specified before BY represents an instance to be plotted (for example, N1 to N3 in Table ). At least two variables are required, and each variable must be numeric. Keyword BY and the category variable (for example, SUBGROUP in Table ) are optional; if specified, the category variable provides labels for the category axis and can be any type of variable. If omitted, the category axis is labeled from 1 to the number of variables that are specified before keyword BY.

Example

SPCHART /TEMPLATE='CTRL.CHT'
 /XR SUBSIZE BY SHIFT.

• The data are organized as shown in Table . SUBSIZE is a numeric variable that measures the part size. SHIFT contains the subgroup identifier (work shift number).

• The chart template is stored in the chart file CTRL.CHT.

Related Topics

XR and XS Subcommands (SPCHART command)
Data Organization (SPCHART command)
(XBARONLY) Keyword (SPCHART command)


(XBARONLY) Keyword (SPCHART command)

(XBARONLY) (keyword),(XBARONLY) (keyword),(XBARONLY) (keyword)
SPCHART command,SPCHART command,SPCHART command
SPCHART (command),SPCHART (command),SPCHART (command)
(XBARONLY) keyword,(XBARONLY) keyword,(XBARONLY) keyword

(XBARONLY) suppresses the R or s secondary charts. If this keyword is omitted, the R or s chart will be generated with the X-bar chart.

Example

SPCHART
  /XR=ph BY time (XBARONLY)
  /CAPSIGMA=RBAR
  /SIGMAS=3
  /MINSAMPLE=2.

Related Topics

XR and XS Subcommands (SPCHART command)
Data Organization (SPCHART command)
Variable Specification (SPCHART command)


I and IR Subcommands (SPCHART command)

SPCHART (command),SPCHART (command),SPCHART (command)
IR subcommand,IR subcommand,IR subcommand
IR (subcommand),IR (subcommand),IR (subcommand)
SPCHART command,SPCHART command,SPCHART command
SPCHART (command),SPCHART (command),SPCHART (command)
I subcommand,I subcommand,I subcommand
I (subcommand),I (subcommand),I (subcommand)
SPCHART command,SPCHART command,SPCHART command
SPCHART (command),SPCHART (command),SPCHART (command)
moving range charts,moving range charts,moving range charts
moving range charts,moving range charts,moving range charts
SPCHART command,SPCHART command,SPCHART command
SPCHART (command),SPCHART (command),SPCHART (command)
individuals charts,individuals charts,individuals charts
individuals charts,individuals charts,individuals charts
SPCHART command,SPCHART command,SPCHART command

I produces an individuals chart, and IR produces an individuals chart and a moving range chart. Both types are control charts for continuous variables, such as size, weight, length, and temperature.

An individuals chart plots each individual observation on a control chart. The center line indicates the mean of all individual values, and the control limits are calculated from the mean of the moving ranges, the span, and the user-specified SIGMAS value. Individuals charts are often used with moving range charts to test process variability when the subgroup size is 1. This situation occurs frequently when automated inspection and measurement technology is used and every manufactured unit is analyzed. The situation also occurs when the process is so slow that a larger subgroup size becomes impractical. The following figure shows an individuals chart.

Individuals chart

A moving range chart plots moving ranges of n successive observations on a control chart, where n is the specified span (see SPAN Subcommand (SPCHART command)). The center line is the mean of moving ranges, and the control limits are calculated from the ranges, the span, and the user-specified SIGMAS value (see SIGMAS Subcommand (SPCHART command)). The following figure shows a moving range chart.

Moving range chart

Related Topics

SPCHART
Overview (SPCHART command)
Example (SPCHART command)
TITLE, SUBTITLE, and FOOTNOTE Subcommands (SPCHART command)
XR and XS Subcommands (SPCHART command)
Data Organization (SPCHART command)
Variable Specification (SPCHART command)
P and NP Subcommands (SPCHART command)
Data Organization (SPCHART command)
Variable Specification (SPCHART command)
C and U Subcommands (SPCHART command)
Data Organization (SPCHART command)
Variable Specification (SPCHART command)
STATISTICS Subcommand (SPCHART command)
The Process Capability Indices (SPCHART command)
The Process Performance Indices (SPCHART command)
Measure(s) for Assessing Normality (SPCHART command)
RULES Subcommand (SPCHART command)
ID Subcommand (SPCHART command)
CAPSIGMA Subcommand (SPCHART command)
SPAN Subcommand (SPCHART command)
CONFORM and NONCONFORM Subcommands (SPCHART command)
SIGMAS Subcommand (SPCHART command)
MINSAMPLE Subcommand (SPCHART command)
LSL and USL Subcommand (SPCHART command)
TARGET Subcommand (SPCHART command)
MISSING Subcommand (SPCHART command)


Data Organization (SPCHART command)

I (subcommand),I (subcommand),I (subcommand)
data organization,data organization,data organization
IR (subcommand),IR (subcommand),IR (subcommand)
data organization,data organization,data organization

For individuals charts and moving range charts, data must be organized so that each case is a unit. Cases are not sorted or aggregated before plotting.

Related Topics

SPCHART
Overview (SPCHART command)
Example (SPCHART command)
TITLE, SUBTITLE, and FOOTNOTE Subcommands (SPCHART command)
XR and XS Subcommands (SPCHART command)
I and IR Subcommands (SPCHART command)
Variable Specification (SPCHART command)
P and NP Subcommands (SPCHART command)
Data Organization (SPCHART command)
Variable Specification (SPCHART command)
C and U Subcommands (SPCHART command)
Data Organization (SPCHART command)
Variable Specification (SPCHART command)
STATISTICS Subcommand (SPCHART command)
The Process Capability Indices (SPCHART command)
The Process Performance Indices (SPCHART command)
Measure(s) for Assessing Normality (SPCHART command)
RULES Subcommand (SPCHART command)
ID Subcommand (SPCHART command)
CAPSIGMA Subcommand (SPCHART command)
SPAN Subcommand (SPCHART command)
CONFORM and NONCONFORM Subcommands (SPCHART command)
SIGMAS Subcommand (SPCHART command)
MINSAMPLE Subcommand (SPCHART command)
LSL and USL Subcommand (SPCHART command)
TARGET Subcommand (SPCHART command)
MISSING Subcommand (SPCHART command)


Variable Specification (SPCHART command)

I (subcommand),I (subcommand),I (subcommand)
variable specification,variable specification,variable specification
IR (subcommand),IR (subcommand),IR (subcommand)
variable specification,variable specification,variable specification

The variable specification for I or IR subcommand is

VAR [BY VAR]

You must specify the process variable that contains the value for each individual observation. Each observation is plotted for the individuals chart. The range of n consecutive observations (where n is the value that is specified on the SPAN subcommand) is calculated and plotted for the moving range chart. The range data for the first n-1 cases are missing, but the mean and the limit series are not missing.

Keyword BY and the category variable are optional. When specified, the category variable is used for labeling the category axis and can be any type of variable. If omitted, the category axis is labeled 1 to the number of individual observations in the process variable.

Example

SPCHART /TEMPLATE='CTRL.CHT'
  /IR=SUBSIZE.

• This command requests an individuals chart and a moving range chart.

• The default span (2) and sigma value (3) are used.

Related Topics

SPCHART
Overview (SPCHART command)
Example (SPCHART command)
TITLE, SUBTITLE, and FOOTNOTE Subcommands (SPCHART command)
XR and XS Subcommands (SPCHART command)
I and IR Subcommands (SPCHART command)
Data Organization (SPCHART command)
P and NP Subcommands (SPCHART command)
Data Organization (SPCHART command)
Variable Specification (SPCHART command)
C and U Subcommands (SPCHART command)
Data Organization (SPCHART command)
Variable Specification (SPCHART command)
STATISTICS Subcommand (SPCHART command)
The Process Capability Indices (SPCHART command)
The Process Performance Indices (SPCHART command)
Measure(s) for Assessing Normality (SPCHART command)
RULES Subcommand (SPCHART command)
ID Subcommand (SPCHART command)
CAPSIGMA Subcommand (SPCHART command)
SPAN Subcommand (SPCHART command)
CONFORM and NONCONFORM Subcommands (SPCHART command)
SIGMAS Subcommand (SPCHART command)
MINSAMPLE Subcommand (SPCHART command)
LSL and USL Subcommand (SPCHART command)
TARGET Subcommand (SPCHART command)
MISSING Subcommand (SPCHART command)


P and NP Subcommands (SPCHART command)

SPCHART (command),SPCHART (command),SPCHART (command)
NP subcommand,NP subcommand,NP subcommand
NP (subcommand),NP (subcommand),NP (subcommand)
SPCHART command,SPCHART command,SPCHART command
SPCHART (command),SPCHART (command),SPCHART (command)
P subcommand,P subcommand,P subcommand
P (subcommand),P (subcommand),P (subcommand)
SPCHART command,SPCHART command,SPCHART command
SPCHART (command),SPCHART (command),SPCHART (command)
np charts,np charts,np charts
np charts,np charts,np charts
SPCHART command,SPCHART command,SPCHART command
p charts,p charts,p charts
SPCHART command,SPCHART command,SPCHART command
SPCHART (command),SPCHART (command),SPCHART (command)
p charts,p charts,p charts

P produces a p chart and NP produces an np chart. Both charts are control charts for attributes. That is, these charts use data that can be counted, such as the number of nonconformities and the percentage of defects.

A p chart plots the fraction nonconforming on a control chart. Fraction nonconforming is the proportion of nonconforming or defective items in a subgroup to the total number of items in that subgroup. This measurement is expressed as a decimal or, occasionally, as a percentage. The center line of the control chart is the mean of the subgroup fractions, and the control limits are based on a binomial distribution and can be controlled by the user-specified SIGMAS value.

A p chart

An np chart plots the number nonconforming rather than the fraction nonconforming. The center line is the mean of the numbers of nonconforming or defective items. The control limits are based on the binomial distribution and can be controlled by the user-specified SIGMAS value. When the subgroup sizes are unequal, np charts are not recommended.

A np chart

Related Topics

SPCHART
Overview (SPCHART command)
Example (SPCHART command)
TITLE, SUBTITLE, and FOOTNOTE Subcommands (SPCHART command)
XR and XS Subcommands (SPCHART command)
I and IR Subcommands (SPCHART command)
Data Organization (SPCHART command)
Variable Specification (SPCHART command)
Data Organization (SPCHART command)
Variable Specification (SPCHART command)
C and U Subcommands (SPCHART command)
Data Organization (SPCHART command)
Variable Specification (SPCHART command)
STATISTICS Subcommand (SPCHART command)
The Process Capability Indices (SPCHART command)
The Process Performance Indices (SPCHART command)
Measure(s) for Assessing Normality (SPCHART command)
RULES Subcommand (SPCHART command)
ID Subcommand (SPCHART command)
CAPSIGMA Subcommand (SPCHART command)
SPAN Subcommand (SPCHART command)
CONFORM and NONCONFORM Subcommands (SPCHART command)
SIGMAS Subcommand (SPCHART command)
MINSAMPLE Subcommand (SPCHART command)
LSL and USL Subcommand (SPCHART command)
TARGET Subcommand (SPCHART command)
MISSING Subcommand (SPCHART command)


Data Organization (SPCHART command)

P (subcommand),P (subcommand),P (subcommand)
data organization,data organization,data organization
NP (subcommand),NP (subcommand),NP (subcommand)
data organization,data organization,data organization

Data for p and np charts can be organized where each case is a unit or where each case is a subgroup.

• If each case is a unit with a conformity status variable and a subgroup identifier, cases are assigned to a category by the value of the subgroup identifier. Table is an example of this type of data organization. The data do not have to be sorted. A BY variable (the subgroup identifier) is required to sort and aggregate data and label the category axis.

• If each case is a subgroup, one variable contains the total number of items within a subgroup, and one variable contains the total number of nonconforming or defective items in the subgroup. The subgroup identifier is optional. If specified, the subgroup identifier is used for labeling purposes. Table is an example of this type of data organization. The data are the same as the data that are used in Table .

Each case is a unit for p and np charts
Subgroup | Outcome
January | Cured
January | Cured
January | Cured
January | Relapse
February | Relapse
February | Cured
February | Relapse
February | Relapse
... | ...
Each case is a subgroup for p and np charts
Subgroup | Relapse | N
January | 1 | 4
February | 3 | 4
... | ... | ...

Related Topics

SPCHART
Overview (SPCHART command)
Example (SPCHART command)
TITLE, SUBTITLE, and FOOTNOTE Subcommands (SPCHART command)
XR and XS Subcommands (SPCHART command)
I and IR Subcommands (SPCHART command)
Data Organization (SPCHART command)
Variable Specification (SPCHART command)
P and NP Subcommands (SPCHART command)
Variable Specification (SPCHART command)
C and U Subcommands (SPCHART command)
Data Organization (SPCHART command)
Variable Specification (SPCHART command)
STATISTICS Subcommand (SPCHART command)
The Process Capability Indices (SPCHART command)
The Process Performance Indices (SPCHART command)
Measure(s) for Assessing Normality (SPCHART command)
RULES Subcommand (SPCHART command)
ID Subcommand (SPCHART command)
CAPSIGMA Subcommand (SPCHART command)
SPAN Subcommand (SPCHART command)
CONFORM and NONCONFORM Subcommands (SPCHART command)
SIGMAS Subcommand (SPCHART command)
MINSAMPLE Subcommand (SPCHART command)
LSL and USL Subcommand (SPCHART command)
TARGET Subcommand (SPCHART command)
MISSING Subcommand (SPCHART command)


Variable Specification (SPCHART command)

P (subcommand),P (subcommand),P (subcommand)
variable specification,variable specification,variable specification
NP (subcommand),NP (subcommand),NP (subcommand)
variable specification,variable specification,variable specification

If data are organized as illustrated in Table , the variable specification on P or NP subcommands is

VAR BY VAR

The variable that is specified before BY is the status variable (for example, OUTCOME in Table ). The value of this variable determines whether an item is considered conforming or nonconforming. The status variable can be any type, but if it is a string, the value that is specified on CONFORM (or NONCONFORM) must be enclosed in quotes (see CONFORM and NONCONFORM Subcommands (SPCHART command)). The variable that is specified after BY is the category variable and can be any type of variable. The chart is sorted by values of the category variable.

If data are organized as shown in Table , the variable specification on P or NP is

COUNT(VAR) N({VAR}) [BY VAR]
             {VAL}

The variable that is specified on keyword COUNT is the variable that contains the number of nonconforming or defective items (for example, RELAPSE in Table ). The specification on keyword N is either the variable that contains the sample size or a positive integer for a constant size across samples (for example, N in Table ). The COUNT variable cannot be larger than the N variable for any given subgroup; if it is larger, the subgroup is dropped from calculation and plotting. Keyword BY and the category variable are optional. When specified, the category variable is used for category axis labels; otherwise, the category axis is labeled 1 to the number of subgroups. Cases are unsorted for the control chart.

Related Topics

SPCHART
Overview (SPCHART command)
Example (SPCHART command)
TITLE, SUBTITLE, and FOOTNOTE Subcommands (SPCHART command)
XR and XS Subcommands (SPCHART command)
I and IR Subcommands (SPCHART command)
Data Organization (SPCHART command)
Variable Specification (SPCHART command)
P and NP Subcommands (SPCHART command)
Data Organization (SPCHART command)
C and U Subcommands (SPCHART command)
Data Organization (SPCHART command)
Variable Specification (SPCHART command)
STATISTICS Subcommand (SPCHART command)
The Process Capability Indices (SPCHART command)
The Process Performance Indices (SPCHART command)
Measure(s) for Assessing Normality (SPCHART command)
RULES Subcommand (SPCHART command)
ID Subcommand (SPCHART command)
CAPSIGMA Subcommand (SPCHART command)
SPAN Subcommand (SPCHART command)
CONFORM and NONCONFORM Subcommands (SPCHART command)
SIGMAS Subcommand (SPCHART command)
MINSAMPLE Subcommand (SPCHART command)
LSL and USL Subcommand (SPCHART command)
TARGET Subcommand (SPCHART command)
MISSING Subcommand (SPCHART command)


C and U Subcommands (SPCHART command)

SPCHART (command),SPCHART (command),SPCHART (command)
U subcommand,U subcommand,U subcommand
U (subcommand),U (subcommand),U (subcommand)
SPCHART command,SPCHART command,SPCHART command
SPCHART (command),SPCHART (command),SPCHART (command)
C subcommand,C subcommand,C subcommand
C (subcommand),C (subcommand),C (subcommand)
SPCHART command,SPCHART command,SPCHART command
SPCHART (command),SPCHART (command),SPCHART (command)
u charts,u charts,u charts
u charts,u charts,u charts
SPCHART command,SPCHART command,SPCHART command
SPCHART (command),SPCHART (command),SPCHART (command)
c charts,c charts,c charts
c charts,c charts,c charts
SPCHART command,SPCHART command,SPCHART command

C produces a c chart and U produces a u chart. Both charts are control charts for attributes. That is, the charts use data that can be counted.

A c chart plots the total number of defects or nonconformities in each subgroup. A defect or nonconformity is one specification that an item fails to satisfy. Each nonconforming item has at least one defect, but any nonconforming item may have more than one defect. The center line of the c chart indicates the mean of the defect numbers of all subgroups. The control limits are based on the Poisson distribution and can be controlled by the user-specified SIGMAS value. When the sample sizes are not equal, c charts are not recommended.

A c chart

A u chart plots the average number of defects or nonconformities per inspection unit within a subgroup. Each subgroup contains more than one inspection unit. The center line of the u chart indicates the average number of defects per unit of all subgroups. The control limits are based on Poisson distribution and can be controlled by the user-specified SIGMAS value.

A u chart

Related Topics

SPCHART
Overview (SPCHART command)
Example (SPCHART command)
TITLE, SUBTITLE, and FOOTNOTE Subcommands (SPCHART command)
XR and XS Subcommands (SPCHART command)
I and IR Subcommands (SPCHART command)
Data Organization (SPCHART command)
Variable Specification (SPCHART command)
P and NP Subcommands (SPCHART command)
Data Organization (SPCHART command)
Variable Specification (SPCHART command)
Data Organization (SPCHART command)
Variable Specification (SPCHART command)
STATISTICS Subcommand (SPCHART command)
The Process Capability Indices (SPCHART command)
The Process Performance Indices (SPCHART command)
Measure(s) for Assessing Normality (SPCHART command)
RULES Subcommand (SPCHART command)
ID Subcommand (SPCHART command)
CAPSIGMA Subcommand (SPCHART command)
SPAN Subcommand (SPCHART command)
CONFORM and NONCONFORM Subcommands (SPCHART command)
SIGMAS Subcommand (SPCHART command)
MINSAMPLE Subcommand (SPCHART command)
LSL and USL Subcommand (SPCHART command)
TARGET Subcommand (SPCHART command)
MISSING Subcommand (SPCHART command)


Data Organization (SPCHART command)

C (subcommand),C (subcommand),C (subcommand)
data organization,data organization,data organization
U (subcommand),U (subcommand),U (subcommand)
data organization,data organization,data organization

Data for c and u charts can be organized where each case is a unit or where each case is a subgroup.

• If each case is a unit with a variable containing the number of defects for that unit and a subgroup identifier, cases are assigned to each subgroup by the value of the identifier. Table is an example of this type of data organization. Data do not have to be sorted by subgroup. A BY variable (the subgroup identifier) is required to sort and aggregate data and to label the category axis.

• If each case is a subgroup, one variable contains the total number of units within the subgroup, and one variable contains the total number of defects for all units within the subgroup. The subgroup identifier is optional. When specified, the subgroup identifier is used as category axis labels; otherwise, the number 1 to the number of subgroups are used to label the category axis. Table is an example of this method of data organization. The data are the same as the data in Table .

Each case is a unit for c and u charts
ID | Subgroup | Count
1 | January | 0
2 | January | 2
3 | January | 0
4 | January | 0
5 | February | 5
6 | February | 1
7 | February | 0
8 | February | 0
... | ... | ...
Each case is a subgroup for c and u charts
Subgroup | Relapses | N
JANUARY | 1 | 4
FEBRUARY | 3 | 4
... | ... | ...

Related Topics

SPCHART
Overview (SPCHART command)
Example (SPCHART command)
TITLE, SUBTITLE, and FOOTNOTE Subcommands (SPCHART command)
XR and XS Subcommands (SPCHART command)
I and IR Subcommands (SPCHART command)
Data Organization (SPCHART command)
Variable Specification (SPCHART command)
P and NP Subcommands (SPCHART command)
Data Organization (SPCHART command)
Variable Specification (SPCHART command)
C and U Subcommands (SPCHART command)
Variable Specification (SPCHART command)
STATISTICS Subcommand (SPCHART command)
The Process Capability Indices (SPCHART command)
The Process Performance Indices (SPCHART command)
Measure(s) for Assessing Normality (SPCHART command)
RULES Subcommand (SPCHART command)
ID Subcommand (SPCHART command)
CAPSIGMA Subcommand (SPCHART command)
SPAN Subcommand (SPCHART command)
CONFORM and NONCONFORM Subcommands (SPCHART command)
SIGMAS Subcommand (SPCHART command)
MINSAMPLE Subcommand (SPCHART command)
LSL and USL Subcommand (SPCHART command)
TARGET Subcommand (SPCHART command)
MISSING Subcommand (SPCHART command)


Variable Specification (SPCHART command)

C (subcommand),C (subcommand),C (subcommand)
variable specification,variable specification,variable specification
U (subcommand),U (subcommand),U (subcommand)
variable specification,variable specification,variable specification

If data are organized as shown in Table , the variable specification on C and U subcommands is

VAR BY VAR

The variable that is specified before keyword BY contains the number of defects in each unit (for example, COUNT in Table ). The variable must be numeric. The variable that is specified after keyword BY is the subgroup identifier (for example, SUBGROUP in Table ). This variable can be any type of variable. The chart is sorted by values of the subgroup identifier.

If data are organized as shown in Table , the variable specification on C and U subcommands is

COUNT(VAR) N({VAR}) [BY VAR]
             {VAL}

The specification is the same as the specification for p and np charts.

Related Topics

SPCHART
Overview (SPCHART command)
Example (SPCHART command)
TITLE, SUBTITLE, and FOOTNOTE Subcommands (SPCHART command)
XR and XS Subcommands (SPCHART command)
I and IR Subcommands (SPCHART command)
Data Organization (SPCHART command)
Variable Specification (SPCHART command)
P and NP Subcommands (SPCHART command)
Data Organization (SPCHART command)
Variable Specification (SPCHART command)
C and U Subcommands (SPCHART command)
Data Organization (SPCHART command)
STATISTICS Subcommand (SPCHART command)
The Process Capability Indices (SPCHART command)
The Process Performance Indices (SPCHART command)
Measure(s) for Assessing Normality (SPCHART command)
RULES Subcommand (SPCHART command)
ID Subcommand (SPCHART command)
CAPSIGMA Subcommand (SPCHART command)
SPAN Subcommand (SPCHART command)
CONFORM and NONCONFORM Subcommands (SPCHART command)
SIGMAS Subcommand (SPCHART command)
MINSAMPLE Subcommand (SPCHART command)
LSL and USL Subcommand (SPCHART command)
TARGET Subcommand (SPCHART command)
MISSING Subcommand (SPCHART command)


STATISTICS Subcommand (SPCHART command)

STATISTICS (subcommand),STATISTICS (subcommand),STATISTICS (subcommand)
SPCHART command,SPCHART command,SPCHART command
SPCHART (command),SPCHART (command),SPCHART (command)
STATISTICS subcommand,STATISTICS subcommand,STATISTICS subcommand

Any keyword may be specified in any place in the subcommand, but for conceptual clarity, the keywords are organized as follows: the Process Capability Indices, the Process Performance Indices, and the Measure(s) for Assessing Normality.

• This subcommand is silently ignored if the chart is not an XR, XS, IR, and I chart.

• A duplicated subcommand name causes a syntax error.

• A duplicated keyword is silently ignored.

• There is no default keyword or parameter value.

Related Topics

SPCHART
Overview (SPCHART command)
Example (SPCHART command)
TITLE, SUBTITLE, and FOOTNOTE Subcommands (SPCHART command)
XR and XS Subcommands (SPCHART command)
I and IR Subcommands (SPCHART command)
Data Organization (SPCHART command)
Variable Specification (SPCHART command)
P and NP Subcommands (SPCHART command)
Data Organization (SPCHART command)
Variable Specification (SPCHART command)
C and U Subcommands (SPCHART command)
Data Organization (SPCHART command)
Variable Specification (SPCHART command)
The Process Capability Indices (SPCHART command)
The Process Performance Indices (SPCHART command)
Measure(s) for Assessing Normality (SPCHART command)
RULES Subcommand (SPCHART command)
ID Subcommand (SPCHART command)
CAPSIGMA Subcommand (SPCHART command)
SPAN Subcommand (SPCHART command)
CONFORM and NONCONFORM Subcommands (SPCHART command)
SIGMAS Subcommand (SPCHART command)
MINSAMPLE Subcommand (SPCHART command)
LSL and USL Subcommand (SPCHART command)
TARGET Subcommand (SPCHART command)
MISSING Subcommand (SPCHART command)


The Process Capability Indices (SPCHART command)

process capability indices,process capability indices,process capability indices
SPCHART (command),SPCHART (command),SPCHART (command)
CP (keyword),CP (keyword),CP (keyword)
SPCHART command,SPCHART command,SPCHART command
CPU (keyword),CPU (keyword),CPU (keyword)
SPCHART command,SPCHART command,SPCHART command
CPL (keyword),CPL (keyword),CPL (keyword)
SPCHART command,SPCHART command,SPCHART command
N (keyword),N (keyword),N (keyword)
SPCHART command,SPCHART command,SPCHART command
CPN (keyword),CPN (keyword),CPN (keyword)
SPCHART command,SPCHART command,SPCHART command
CR (keyword),CR (keyword),CR (keyword)
SPCHART command,SPCHART command,SPCHART command
CPM (keyword),CPM (keyword),CPM (keyword)
SPCHART command,SPCHART command,SPCHART command
CZU (keyword),CZU (keyword),CZU (keyword)
SPCHART command,SPCHART command,SPCHART command
CZL (keyword),CZL (keyword),CZL (keyword)
SPCHART command,SPCHART command,SPCHART command
CZMIN (keyword),CZMIN (keyword),CZMIN (keyword)
SPCHART command,SPCHART command,SPCHART command
CZMAX (keyword),CZMAX (keyword),CZMAX (keyword)
SPCHART command,SPCHART command,SPCHART command
CP (keyword),CP (keyword),CP (keyword)
SPCHART command,SPCHART command,SPCHART command
CP | Capability of the process.
CPU | The distance between the process mean and the upper specification limit scaled by capability sigma.
CPL | The distance between the process mean and the lower specification limit scaled by capability sigma.
K | The deviation of the process mean from the midpoint of the specification limits. This measurement is computed independently of the estimated capability sigma.
CPK | Capability of the process related to both dispersion and centeredness. It is the minimum of CpU and CpL. If only one specification limit is provided, we compute and report a unilateral CpK instead of taking the minimum.
CR | The reciprocal of CP.
CPM | An index relating capability sigma and the difference between the process mean and the target value. A target value must be specified on the TARGET subcommand by the user.
CZU | The number of capability sigmas between the process mean and the upper specification limit.
CZL | The number of capability sigmas between the process mean and the lower specification limit.
CZMIN | The minimum number of capability sigmas between the process mean and the specification limits.
CZMAX | The maximum number of capability sigmas between the process mean and the specification limits.
CZOUT | The estimated percentage outside the specification limits. The standard normal approximation is based on the CZ U and CZ L.

• For each of the keywords (other than CPK), both the LSL subcommand and the USL subcommand must be specified. Otherwise, the keyword(s) are ignored, and a syntax warning is issued. For CPK, at least one of the LSL and USL subcommands must be specified.

• If the TARGET subcommand is not specified, the keyword CPM is ignored, and a syntax warning is issued.

Related Topics

SPCHART
Overview (SPCHART command)
Example (SPCHART command)
TITLE, SUBTITLE, and FOOTNOTE Subcommands (SPCHART command)
XR and XS Subcommands (SPCHART command)
I and IR Subcommands (SPCHART command)
Data Organization (SPCHART command)
Variable Specification (SPCHART command)
P and NP Subcommands (SPCHART command)
Data Organization (SPCHART command)
Variable Specification (SPCHART command)
C and U Subcommands (SPCHART command)
Data Organization (SPCHART command)
Variable Specification (SPCHART command)
STATISTICS Subcommand (SPCHART command)
The Process Performance Indices (SPCHART command)
Measure(s) for Assessing Normality (SPCHART command)
RULES Subcommand (SPCHART command)
ID Subcommand (SPCHART command)
CAPSIGMA Subcommand (SPCHART command)
SPAN Subcommand (SPCHART command)
CONFORM and NONCONFORM Subcommands (SPCHART command)
SIGMAS Subcommand (SPCHART command)
MINSAMPLE Subcommand (SPCHART command)
LSL and USL Subcommand (SPCHART command)
TARGET Subcommand (SPCHART command)
MISSING Subcommand (SPCHART command)


The Process Performance Indices (SPCHART command)

PP (keyword),PP (keyword),PP (keyword)
SPCHART command,SPCHART command,SPCHART command
PPU (keyword),PPU (keyword),PPU (keyword)
SPCHART command,SPCHART command,SPCHART command
PPL (keyword),PPL (keyword),PPL (keyword)
SPCHART command,SPCHART command,SPCHART command
PPK (keyword),PPK (keyword),PPK (keyword)
SPCHART command,SPCHART command,SPCHART command
PR (keyword),PR (keyword),PR (keyword)
SPCHART command,SPCHART command,SPCHART command
PPM (keyword),PPM (keyword),PPM (keyword)
SPCHART command,SPCHART command,SPCHART command
PZU (keyword),PZU (keyword),PZU (keyword)
SPCHART command,SPCHART command,SPCHART command
PZL (keyword),PZL (keyword),PZL (keyword)
SPCHART command,SPCHART command,SPCHART command
PZMIN (keyword),PZMIN (keyword),PZMIN (keyword)
SPCHART command,SPCHART command,SPCHART command
PZMAX (keyword),PZMAX (keyword),PZMAX (keyword)
SPCHART command,SPCHART command,SPCHART command
PZOUT (keyword),PZOUT (keyword),PZOUT (keyword)
SPCHART command,SPCHART command,SPCHART command
PP | Performance of the process.
PPU | The distance between the process mean and the upper specification limit scaled by process standard deviation.
PPL | The distance between the process mean and the lower specification limit scaled by process standard deviation.
PPK | Performance of the process related to both dispersion and centeredness. It is the minimum of PpU and PpL. If only one specification limit is provided, we compute and report a unilateral PpK instead of taking the minimum.
PR | The reciprocal of PP.
PPM | An index relating process variance and the difference between the process mean and the target value. A target value must be specified on the TARGET subcommand by the user.
PZU | The number of standard deviations between the process mean and the upper specification limit.
PZL | The number of standard deviations between the process mean and the lower specification limit.
PZMIN | The minimum number of standard deviations between the process mean and the specification limits.
PZMAX | The maximum number of standard deviations between the process mean and the specification limits.
PZOUT | The estimated percentage outside the specification limits. The standard normal approximation is based on the PZ U and PZ L.

• For each of the keywords (other than PPK), both the LSL subcommand and the USL subcommand must be specified. Otherwise, we ignore the keyword(s) and issue a syntax warning. For PPK, at least one of the LSL and USL subcommands must be specified.

• If the TARGET subcommand is not specified, the keyword PPM is ignored, and a syntax warning is issued.

Related Topics

SPCHART
Overview (SPCHART command)
Example (SPCHART command)
TITLE, SUBTITLE, and FOOTNOTE Subcommands (SPCHART command)
XR and XS Subcommands (SPCHART command)
I and IR Subcommands (SPCHART command)
Data Organization (SPCHART command)
Variable Specification (SPCHART command)
P and NP Subcommands (SPCHART command)
Data Organization (SPCHART command)
Variable Specification (SPCHART command)
C and U Subcommands (SPCHART command)
Data Organization (SPCHART command)
Variable Specification (SPCHART command)
STATISTICS Subcommand (SPCHART command)
The Process Capability Indices (SPCHART command)
Measure(s) for Assessing Normality (SPCHART command)
RULES Subcommand (SPCHART command)
ID Subcommand (SPCHART command)
CAPSIGMA Subcommand (SPCHART command)
SPAN Subcommand (SPCHART command)
CONFORM and NONCONFORM Subcommands (SPCHART command)
SIGMAS Subcommand (SPCHART command)
MINSAMPLE Subcommand (SPCHART command)
LSL and USL Subcommand (SPCHART command)
TARGET Subcommand (SPCHART command)
MISSING Subcommand (SPCHART command)


Measure(s) for Assessing Normality (SPCHART command)

AZOUT (keyword),AZOUT (keyword),AZOUT (keyword)
SPCHART command,SPCHART command,SPCHART command
AZOUT The observed percentage outside the specification limits. A point is defined outside the specification limits when its value is greater than or equal to the upper specification limit or is less than or equal to the lower specification limit.

• For AZOUT, both the LSL subcommand and the USL subcommand must be specified. Otherwise, we ignore the keyword and issue a syntax warning.

Related Topics

SPCHART
Overview (SPCHART command)
Example (SPCHART command)
TITLE, SUBTITLE, and FOOTNOTE Subcommands (SPCHART command)
XR and XS Subcommands (SPCHART command)
I and IR Subcommands (SPCHART command)
Data Organization (SPCHART command)
Variable Specification (SPCHART command)
P and NP Subcommands (SPCHART command)
Data Organization (SPCHART command)
Variable Specification (SPCHART command)
C and U Subcommands (SPCHART command)
Data Organization (SPCHART command)
Variable Specification (SPCHART command)
STATISTICS Subcommand (SPCHART command)
The Process Capability Indices (SPCHART command)
The Process Performance Indices (SPCHART command)
RULES Subcommand (SPCHART command)
ID Subcommand (SPCHART command)
CAPSIGMA Subcommand (SPCHART command)
SPAN Subcommand (SPCHART command)
CONFORM and NONCONFORM Subcommands (SPCHART command)
SIGMAS Subcommand (SPCHART command)
MINSAMPLE Subcommand (SPCHART command)
LSL and USL Subcommand (SPCHART command)
TARGET Subcommand (SPCHART command)
MISSING Subcommand (SPCHART command)


RULES Subcommand (SPCHART command)

RULES (subcommand),RULES (subcommand),RULES (subcommand)
SPCHART command,SPCHART command,SPCHART command
SPCHART (command),SPCHART (command),SPCHART (command)
RULES subcommand,RULES subcommand,RULES subcommand

RULES specifies the rules for identifying out-of-control points. If a point violates any rule, it appears in the primary chart with a different shape and color compared to in-control points. Note that only the last point in a discovered pattern shall be marked for a rule violation, and any and all overlapping patterns are treated as separate patterns. A table of rule violations is also included in the output that displays the points marked in the control chart. If desired, use the ID keyword to specify the variable that identifies points in this table.

• Any keyword may be specified in any place in the subcommand.

• A duplicated subcommand name causes a syntax error.

• A duplicated keyword is silently ignored.

• The default keyword is ALL.

• If the subcommand is omitted, no control rules are used.

ALL | All rules.
UCL | Greater than +3 sigma.
R2UPPER | 2 points out of the last 3 greater than +2 sigma.
R4UPPER | 4 points out of the last 5 greater than +1 sigma.
R8UPPER | 8 consecutive points above the center line.
R8LOWER | 8 consecutive points below the center line.
R4LOWER | 4 points out of the last 5 less than -1 sigma.
R2LOWER | 2 points out of the last 3 less than -2 sigma.
LCL | Less than -3 sigma.
TRUP | 6 consecutive points trending up.
TRDOWN | 6 consecutive points trending down.
ALTERNATING | 14 consecutive points alternating.

Related Topics

SPCHART
Overview (SPCHART command)
Example (SPCHART command)
TITLE, SUBTITLE, and FOOTNOTE Subcommands (SPCHART command)
XR and XS Subcommands (SPCHART command)
I and IR Subcommands (SPCHART command)
Data Organization (SPCHART command)
Variable Specification (SPCHART command)
P and NP Subcommands (SPCHART command)
Data Organization (SPCHART command)
Variable Specification (SPCHART command)
C and U Subcommands (SPCHART command)
Data Organization (SPCHART command)
Variable Specification (SPCHART command)
STATISTICS Subcommand (SPCHART command)
The Process Capability Indices (SPCHART command)
The Process Performance Indices (SPCHART command)
Measure(s) for Assessing Normality (SPCHART command)
ID Subcommand (SPCHART command)
CAPSIGMA Subcommand (SPCHART command)
SPAN Subcommand (SPCHART command)
CONFORM and NONCONFORM Subcommands (SPCHART command)
SIGMAS Subcommand (SPCHART command)
MINSAMPLE Subcommand (SPCHART command)
LSL and USL Subcommand (SPCHART command)
TARGET Subcommand (SPCHART command)
MISSING Subcommand (SPCHART command)


ID Subcommand (SPCHART command)

ID (subcommand),ID (subcommand),ID (subcommand)
SPCHART command,SPCHART command,SPCHART command
SPCHART (command),SPCHART (command),SPCHART (command)
ID subcommand,ID subcommand,ID subcommand

ID specifies a variable that identifies points in the table of rule violations. If this subcommand is omitted, the BY variable is used. Without the RULES subcommand, ID has no effect.

Related Topics

SPCHART
Overview (SPCHART command)
Example (SPCHART command)
TITLE, SUBTITLE, and FOOTNOTE Subcommands (SPCHART command)
XR and XS Subcommands (SPCHART command)
I and IR Subcommands (SPCHART command)
Data Organization (SPCHART command)
Variable Specification (SPCHART command)
P and NP Subcommands (SPCHART command)
Data Organization (SPCHART command)
Variable Specification (SPCHART command)
C and U Subcommands (SPCHART command)
Data Organization (SPCHART command)
Variable Specification (SPCHART command)
STATISTICS Subcommand (SPCHART command)
The Process Capability Indices (SPCHART command)
The Process Performance Indices (SPCHART command)
Measure(s) for Assessing Normality (SPCHART command)
RULES Subcommand (SPCHART command)
CAPSIGMA Subcommand (SPCHART command)
SPAN Subcommand (SPCHART command)
CONFORM and NONCONFORM Subcommands (SPCHART command)
SIGMAS Subcommand (SPCHART command)
MINSAMPLE Subcommand (SPCHART command)
LSL and USL Subcommand (SPCHART command)
TARGET Subcommand (SPCHART command)
MISSING Subcommand (SPCHART command)


CAPSIGMA Subcommand (SPCHART command)

CAPSIGMA (subcommand),CAPSIGMA (subcommand),CAPSIGMA (subcommand)
SPCHART command,SPCHART command,SPCHART command
SPCHART (command),SPCHART (command),SPCHART (command)
CAPSIGMA subcommand,CAPSIGMA subcommand,CAPSIGMA subcommand

This subcommand defines the capability sigma estimator, which is required in computing all the Process Capability Indices (except K that is requested by the STATISTICS subcommand, which applies to /XR, /XS, /I, or /IR only). There are four options:

RBAR (keyword),RBAR (keyword),RBAR (keyword)
SPCHART command,SPCHART command,SPCHART command
SBAR (keyword),SBAR (keyword),SBAR (keyword)
SPCHART command,SPCHART command,SPCHART command
MRBAR (keyword),MRBAR (keyword),MRBAR (keyword)
SPCHART command,SPCHART command,SPCHART command
WITHIN (keyword),WITHIN (keyword),WITHIN (keyword)
SPCHART command,SPCHART command,SPCHART command
RBAR | Mean sample range. The estimated capability sigma is based on the mean of the sample group ranges.
SBAR | Mean sample standard deviation. The estimated capability sigma is based on the mean of the sample group standard deviations.
MRBAR | Mean sample moving range. The estimated capability sigma is based on the mean of the sample moving ranges. The span that is defined by the SPAN subcommand is used. (Recall that its passive default value is 2.)
WITHIN | Sample within-group variance. The estimated capability sigma is the square root of the sample within-group variance.

The validity of specification depends on the chart specification (i.e., /XR, /XS, /I, or /IR).

Valid CAPSIGMA options by chart specification
Chart Specification | Valid CAPSIGMA Options
XR | RBAR (default) SBAR WITHIN
XS | RBAR SBAR (default) WITHIN
I | MRBAR (default)
IR | MRBAR (default)

• When this subcommand is omitted or specified without a keyword by the user, the default conditional on the chart specification is implicitly assumed (see the table above).

• The user specification of an invalid combination (e.g., /I and /CAPSIGMA = RBAR) causes a syntax error, if this subcommand is relevant (i.e., an applicable STATISTICS keyword is specified). Otherwise, we issue a syntax warning. When the chart specification is not /XR, /XS, /I, or /IR, the CAPSIGMA subcommand is silently ignored.

• The user specification of this subcommand, when valid with respect to the chart specification, is silently ignored, unless an applicable STATISTICS keyword is specified.

• A duplicated subcommand name causes a syntax error.

• A duplicated keyword is silently ignored, but if two or more keywords are specified and they do not have identical meanings, a syntax error message is issued.

Related Topics

SPCHART
Overview (SPCHART command)
Example (SPCHART command)
TITLE, SUBTITLE, and FOOTNOTE Subcommands (SPCHART command)
XR and XS Subcommands (SPCHART command)
I and IR Subcommands (SPCHART command)
Data Organization (SPCHART command)
Variable Specification (SPCHART command)
P and NP Subcommands (SPCHART command)
Data Organization (SPCHART command)
Variable Specification (SPCHART command)
C and U Subcommands (SPCHART command)
Data Organization (SPCHART command)
Variable Specification (SPCHART command)
STATISTICS Subcommand (SPCHART command)
The Process Capability Indices (SPCHART command)
The Process Performance Indices (SPCHART command)
Measure(s) for Assessing Normality (SPCHART command)
RULES Subcommand (SPCHART command)
ID Subcommand (SPCHART command)
SPAN Subcommand (SPCHART command)
CONFORM and NONCONFORM Subcommands (SPCHART command)
SIGMAS Subcommand (SPCHART command)
MINSAMPLE Subcommand (SPCHART command)
LSL and USL Subcommand (SPCHART command)
TARGET Subcommand (SPCHART command)
MISSING Subcommand (SPCHART command)


SPAN Subcommand (SPCHART command)

SPCHART (command),SPCHART (command),SPCHART (command)
SPAN subcommand,SPAN subcommand,SPAN subcommand
SPAN (subcommand),SPAN (subcommand),SPAN (subcommand)
SPCHART command,SPCHART command,SPCHART command

SPAN specifies the span from which the moving range for an individuals chart is calculated. The specification must be an integer value that is greater than 1. The default is 2. SPAN applies only to I and IR chart specifications.

Example

SPCHART /IR=SUBSIZE /SPAN=5.

• The SPAN subcommand specifies that the moving ranges are computed from every five individual samples.

Related Topics

SPCHART
Overview (SPCHART command)
Example (SPCHART command)
TITLE, SUBTITLE, and FOOTNOTE Subcommands (SPCHART command)
XR and XS Subcommands (SPCHART command)
I and IR Subcommands (SPCHART command)
Data Organization (SPCHART command)
Variable Specification (SPCHART command)
P and NP Subcommands (SPCHART command)
Data Organization (SPCHART command)
Variable Specification (SPCHART command)
C and U Subcommands (SPCHART command)
Data Organization (SPCHART command)
Variable Specification (SPCHART command)
STATISTICS Subcommand (SPCHART command)
The Process Capability Indices (SPCHART command)
The Process Performance Indices (SPCHART command)
Measure(s) for Assessing Normality (SPCHART command)
RULES Subcommand (SPCHART command)
ID Subcommand (SPCHART command)
CAPSIGMA Subcommand (SPCHART command)
CONFORM and NONCONFORM Subcommands (SPCHART command)
SIGMAS Subcommand (SPCHART command)
MINSAMPLE Subcommand (SPCHART command)
LSL and USL Subcommand (SPCHART command)
TARGET Subcommand (SPCHART command)
MISSING Subcommand (SPCHART command)


CONFORM and NONCONFORM Subcommands (SPCHART command)

SPCHART (command),SPCHART (command),SPCHART (command)
NOCONFORM subcommand,NOCONFORM subcommand,NOCONFORM subcommand
NOCONFORM (subcommand),NOCONFORM (subcommand),NOCONFORM (subcommand)
SPCHART command,SPCHART command,SPCHART command
SPCHART (command),SPCHART (command),SPCHART (command)
CONFORM subcommand,CONFORM subcommand,CONFORM subcommand
CONFORM (subcommand),CONFORM (subcommand),CONFORM (subcommand)
SPCHART command,SPCHART command,SPCHART command

Either CONFORM or NONCONFORM is required when you specify a status variable on the P or NP subcommand. You make that specification when data are organized so that each case is an inspection unit (see P and NP Subcommands (SPCHART command)).

• Either subcommand requires a value specification. The value can be numeric or string. String values must be enclosed within quotes.

• If CONFORM is specified, all values for the status variable (other than the specified value) are tabulated as nonconformities. If NONCONFORM is specified, only the specified value is tabulated as a nonconformity.

• CONFORM and NONCONFORM apply only to P and NP chart specifications.

Related Topics

SPCHART
Overview (SPCHART command)
Example (SPCHART command)
TITLE, SUBTITLE, and FOOTNOTE Subcommands (SPCHART command)
XR and XS Subcommands (SPCHART command)
I and IR Subcommands (SPCHART command)
Data Organization (SPCHART command)
Variable Specification (SPCHART command)
P and NP Subcommands (SPCHART command)
Data Organization (SPCHART command)
Variable Specification (SPCHART command)
C and U Subcommands (SPCHART command)
Data Organization (SPCHART command)
Variable Specification (SPCHART command)
STATISTICS Subcommand (SPCHART command)
The Process Capability Indices (SPCHART command)
The Process Performance Indices (SPCHART command)
Measure(s) for Assessing Normality (SPCHART command)
RULES Subcommand (SPCHART command)
ID Subcommand (SPCHART command)
CAPSIGMA Subcommand (SPCHART command)
SPAN Subcommand (SPCHART command)
SIGMAS Subcommand (SPCHART command)
MINSAMPLE Subcommand (SPCHART command)
LSL and USL Subcommand (SPCHART command)
TARGET Subcommand (SPCHART command)
MISSING Subcommand (SPCHART command)


SIGMAS Subcommand (SPCHART command)

SPCHART (command),SPCHART (command),SPCHART (command)
SIGMAS subcommand,SIGMAS subcommand,SIGMAS subcommand
SIGMAS (subcommand),SIGMAS (subcommand),SIGMAS (subcommand)
SPCHART command,SPCHART command,SPCHART command

SIGMAS allows you to define the sigma level for a control chart. The value specified on SIGMAS is used in calculating the upper and lower control limits on the chart. You can specify a number larger than 1 but less than or equal to 10. A larger SIGMAS value means a greater range between the upper and the lower control limits. The default is 3.

Related Topics

SPCHART
Overview (SPCHART command)
Example (SPCHART command)
TITLE, SUBTITLE, and FOOTNOTE Subcommands (SPCHART command)
XR and XS Subcommands (SPCHART command)
I and IR Subcommands (SPCHART command)
Data Organization (SPCHART command)
Variable Specification (SPCHART command)
P and NP Subcommands (SPCHART command)
Data Organization (SPCHART command)
Variable Specification (SPCHART command)
C and U Subcommands (SPCHART command)
Data Organization (SPCHART command)
Variable Specification (SPCHART command)
STATISTICS Subcommand (SPCHART command)
The Process Capability Indices (SPCHART command)
The Process Performance Indices (SPCHART command)
Measure(s) for Assessing Normality (SPCHART command)
RULES Subcommand (SPCHART command)
ID Subcommand (SPCHART command)
CAPSIGMA Subcommand (SPCHART command)
SPAN Subcommand (SPCHART command)
CONFORM and NONCONFORM Subcommands (SPCHART command)
MINSAMPLE Subcommand (SPCHART command)
LSL and USL Subcommand (SPCHART command)
TARGET Subcommand (SPCHART command)
MISSING Subcommand (SPCHART command)


MINSAMPLE Subcommand (SPCHART command)

SPCHART (command),SPCHART (command),SPCHART (command)
MINSAMPLE subcommand,MINSAMPLE subcommand,MINSAMPLE subcommand
MINSAMPLE (subcommand),MINSAMPLE (subcommand),MINSAMPLE (subcommand)
SPCHART command,SPCHART command,SPCHART command

MINSAMPLE specifies the minimum sample size for X-bar, R, or s charts. When you specify XR or XS on SPCHART, any subgroup with a size that is smaller than the size that is specified on MINSAMPLE is excluded from the chart and from all computations. If each case is a subgroup, there must be at least as many variables named as the number that is specified on MINSAMPLE. The default is 2.

Related Topics

SPCHART
Overview (SPCHART command)
Example (SPCHART command)
TITLE, SUBTITLE, and FOOTNOTE Subcommands (SPCHART command)
XR and XS Subcommands (SPCHART command)
I and IR Subcommands (SPCHART command)
Data Organization (SPCHART command)
Variable Specification (SPCHART command)
P and NP Subcommands (SPCHART command)
Data Organization (SPCHART command)
Variable Specification (SPCHART command)
C and U Subcommands (SPCHART command)
Data Organization (SPCHART command)
Variable Specification (SPCHART command)
STATISTICS Subcommand (SPCHART command)
The Process Capability Indices (SPCHART command)
The Process Performance Indices (SPCHART command)
Measure(s) for Assessing Normality (SPCHART command)
RULES Subcommand (SPCHART command)
ID Subcommand (SPCHART command)
CAPSIGMA Subcommand (SPCHART command)
SPAN Subcommand (SPCHART command)
CONFORM and NONCONFORM Subcommands (SPCHART command)
SIGMAS Subcommand (SPCHART command)
LSL and USL Subcommand (SPCHART command)
TARGET Subcommand (SPCHART command)
MISSING Subcommand (SPCHART command)


LSL and USL Subcommand (SPCHART command)

SPCHART (command),SPCHART (command),SPCHART (command)
USL subcommand,USL subcommand,USL subcommand
USL (subcommand),USL (subcommand),USL (subcommand)
SPCHART command,SPCHART command,SPCHART command
SPCHART (command),SPCHART (command),SPCHART (command)
LSL subcommand,LSL subcommand,LSL subcommand
LSL (subcommand),LSL (subcommand),LSL (subcommand)
SPCHART command,SPCHART command,SPCHART command

LSL and USL allow you to specify fixed lower and upper control limits. Fixed control limits are often used in manufacturing processes as designer-specified limits. These limits are displayed on the chart, along with the calculated limits. If you do not specify LSL and USL, no fixed control limits are displayed. However, if you want only the specified control limits, you must edit the chart in a chart window to suppress the calculated series.

Example

SPCHART /TEMPLATE='CTRL.CHT'
  /XS=SUBSIZE
  /USL=74.50
  /LSL=73.50.

• The USL and LSL subcommands specify the control limits according to the designing engineer. The center line is probably at 74.00.

• The specified upper and lower limits are displayed together with the control limits that are calculated from the observed standard deviation and the sigma value.

Related Topics

SPCHART
Overview (SPCHART command)
Example (SPCHART command)
TITLE, SUBTITLE, and FOOTNOTE Subcommands (SPCHART command)
XR and XS Subcommands (SPCHART command)
I and IR Subcommands (SPCHART command)
Data Organization (SPCHART command)
Variable Specification (SPCHART command)
P and NP Subcommands (SPCHART command)
Data Organization (SPCHART command)
Variable Specification (SPCHART command)
C and U Subcommands (SPCHART command)
Data Organization (SPCHART command)
Variable Specification (SPCHART command)
STATISTICS Subcommand (SPCHART command)
The Process Capability Indices (SPCHART command)
The Process Performance Indices (SPCHART command)
Measure(s) for Assessing Normality (SPCHART command)
RULES Subcommand (SPCHART command)
ID Subcommand (SPCHART command)
CAPSIGMA Subcommand (SPCHART command)
SPAN Subcommand (SPCHART command)
CONFORM and NONCONFORM Subcommands (SPCHART command)
SIGMAS Subcommand (SPCHART command)
MINSAMPLE Subcommand (SPCHART command)
TARGET Subcommand (SPCHART command)
MISSING Subcommand (SPCHART command)


TARGET Subcommand (SPCHART command)

TARGET (subcommand),TARGET (subcommand),TARGET (subcommand)
SPCHART command,SPCHART command,SPCHART command
SPCHART (command),SPCHART (command),SPCHART (command)
TARGET subcommand,TARGET subcommand,TARGET subcommand

This subcommand defines the target value that is used in computing CpM and PpM requested by the STATISTICS subcommand. The value may be any real number that is less than or equal to the USL value and greater than or equal to the LSL value.

• If no applicable STATISTICS keyword is specified, this subcommand is silently ignored.

• If the value is numeric but out of the valid range, we issue a warning and ignore the CPM and/or PPM keyword(s), if any, in the STATISTICS subcommand.

Related Topics

SPCHART
Overview (SPCHART command)
Example (SPCHART command)
TITLE, SUBTITLE, and FOOTNOTE Subcommands (SPCHART command)
XR and XS Subcommands (SPCHART command)
I and IR Subcommands (SPCHART command)
Data Organization (SPCHART command)
Variable Specification (SPCHART command)
P and NP Subcommands (SPCHART command)
Data Organization (SPCHART command)
Variable Specification (SPCHART command)
C and U Subcommands (SPCHART command)
Data Organization (SPCHART command)
Variable Specification (SPCHART command)
STATISTICS Subcommand (SPCHART command)
The Process Capability Indices (SPCHART command)
The Process Performance Indices (SPCHART command)
Measure(s) for Assessing Normality (SPCHART command)
RULES Subcommand (SPCHART command)
ID Subcommand (SPCHART command)
CAPSIGMA Subcommand (SPCHART command)
SPAN Subcommand (SPCHART command)
CONFORM and NONCONFORM Subcommands (SPCHART command)
SIGMAS Subcommand (SPCHART command)
MINSAMPLE Subcommand (SPCHART command)
LSL and USL Subcommand (SPCHART command)
MISSING Subcommand (SPCHART command)


MISSING Subcommand (SPCHART command)

SPCHART (command),SPCHART (command),SPCHART (command)
MISSING subcommand,MISSING subcommand,MISSING subcommand
MISSING (subcommand),MISSING (subcommand),MISSING (subcommand)
SPCHART command,SPCHART command,SPCHART command
missing values,missing values,missing values
SPCHART (command),SPCHART (command),SPCHART (command)
SPCHART (command),SPCHART (command),SPCHART (command)
missing values,missing values,missing values

MISSING controls the treatment of missing values in the control chart.

• The default is NOREPORT and EXCLUDE.

• REPORT and NOREPORT are alternatives and apply only to category variables. REPORT and NOREPORT control whether categories (subgroups) with missing values are created.

• INCLUDE and EXCLUDE are alternatives and apply to process variables.

NOREPORT | Suppress missing-value categories. This setting is the default.
REPORT | Report and plot missing-value categories.
EXCLUDE | Exclude user-missing values. Both user-missing and system-missing values for the process variable are excluded from computation and plotting. This setting is the default.
INCLUDE | Include user-missing values. Only system-missing values for the process variable are excluded from computation and plotting.

Related Topics

SPCHART
Overview (SPCHART command)
Example (SPCHART command)
TITLE, SUBTITLE, and FOOTNOTE Subcommands (SPCHART command)
XR and XS Subcommands (SPCHART command)
I and IR Subcommands (SPCHART command)
Data Organization (SPCHART command)
Variable Specification (SPCHART command)
P and NP Subcommands (SPCHART command)
Data Organization (SPCHART command)
Variable Specification (SPCHART command)
C and U Subcommands (SPCHART command)
Data Organization (SPCHART command)
Variable Specification (SPCHART command)
STATISTICS Subcommand (SPCHART command)
The Process Capability Indices (SPCHART command)
The Process Performance Indices (SPCHART command)
Measure(s) for Assessing Normality (SPCHART command)
RULES Subcommand (SPCHART command)
ID Subcommand (SPCHART command)
CAPSIGMA Subcommand (SPCHART command)
SPAN Subcommand (SPCHART command)
CONFORM and NONCONFORM Subcommands (SPCHART command)
SIGMAS Subcommand (SPCHART command)
MINSAMPLE Subcommand (SPCHART command)
LSL and USL Subcommand (SPCHART command)
TARGET Subcommand (SPCHART command)


SPECTRA

SPECTRA (command),SPECTRA (command),SPECTRA (command)
SPECTRA (command),SPECTRA (command),SPECTRA (command)
syntax chart,syntax chart,syntax chart
spectral analysis,spectral analysis,spectral analysis

SPECTRA is available in the Forecasting option.

SPECTRA VARIABLES= series names

 [/{CENTER NO**}]
   {CENTER     }

 [/{CROSS NO**}]
   {CROSS     }

 [/WINDOW={HAMMING** [({5   })]    }]
          {            {span}      }
          {BARTLETT [(span)]       }
          {PARZEN [(span)]         }
          {TUKEY [(span)]          }
          {UNIT or DANIELL [(span)]}
          {NONE                    }
          {w-p, ..., w0, ..., wp   }

 [/PLOT= [P] [S] [CS] [QS] [PH] [A]
         [G] [K] [ALL] [NONE]
         [BY {FREQ  }]]
             {PERIOD}

 [/SAVE = [FREQ (name)] [PER (name)] [SIN (name)]
          [COS (name)]  [P (name)]   [S (name)]
          [RC (name)]   [IC (name)]  [CS (name)]
          [QS (name)]   [PH (name)]  [A (name)]
          [G (name)]    [K (name)]]

 [/APPLY [='model name']]

**Default if the subcommand is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See SPECTRA Algorithms for computational details for this procedure.

Syntax for the SPECTRA command can be generated from the Spectral Plots dialog.

Example

SPECTRA VARIABLES = HSTARTS.

Related Topics

Overview (SPECTRA command)
Example (SPECTRA command)
VARIABLES Subcommand (SPECTRA command)
CENTER Subcommand (SPECTRA command)
WINDOW Subcommand (SPECTRA command)
PLOT Subcommand (SPECTRA command)
CROSS Subcommand (SPECTRA command)
SAVE Subcommand (SPECTRA command)
APPLY Subcommand (SPECTRA command)
References (SPECTRA command)
AREG
ARIMA
EXSMOOTH
FIT
SEASON
TSET
TSHOW
MODEL NAME
READ MODEL
SAVE MODEL
TDISPLAY


Overview (SPECTRA command)

SPECTRA plots the periodogram and spectral density function estimates for one or more series. You can also request bivariate spectral analysis. Moving averages, termed windows, can be used for smoothing the periodogram values to produce spectral densities.

Options Collapse Hide details

Options

Output. In addition to the periodogram, you can use the PLOT subcommand to produce a plot of the estimated spectral density. You can use the keyword BY on PLOT to suppress the display of the plot by frequency or the plot by period. To reduce the range of values that are displayed in the plots, you can center the data by using the CENTER subcommand.

Cross-Spectral Analysis. You can specify cross-spectral (bivariate) analysis with the CROSS subcommand and select which bivariate plots are produced by using PLOT.

New Variables. Variables that are computed by SPECTRA can be saved to the active dataset for use in subsequent analyses with the SAVE subcommand. TSET MXNEWVAR specifies the maximum number of new variables that can be generated by a procedure. The default is 60.

Spectral Windows. You can specify a spectral window and its span for calculation of the spectral density estimates.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is one or more series names.

• By default, SPECTRA plots the periodogram for each specified series. The periodogram is shown first by frequency and then by period. No new variables are saved by default.

Subcommand Order Collapse Hide details

Subcommand Order

• Subcommands can be specified in any order.

Syntax Rules Collapse Hide details

Syntax Rules

• VARIABLES can be specified only once.

• Other subcommands can be specified more than once, but only the last specification of each subcommand is executed.

Operations Collapse Hide details

Operations

• SPECTRA cannot process series with missing observations. (You can use the RMV command to replace missing values, use TSET MISSING=INCLUDE to include user-missing values, and use USE to ignore missing observations at the beginning or end of a series. See RMV and USE for more information.)

• If the number of observations in the series is odd, the first case is ignored.

• If the SAVE subcommand is specified, new variables are created for each specified series. For bivariate analyses, new variables are created for each series pair.

• SPECTRA requires memory both to compute variables and to build plots. Requesting fewer plots may enable you to analyze larger series.

Limitations Collapse Hide details

Limitations

• A maximum of one VARIABLES subcommand is allowed. There is no limit on the number of series named on the list.

Related Topics

SPECTRA
Example (SPECTRA command)
VARIABLES Subcommand (SPECTRA command)
CENTER Subcommand (SPECTRA command)
WINDOW Subcommand (SPECTRA command)
PLOT Subcommand (SPECTRA command)
CROSS Subcommand (SPECTRA command)
SAVE Subcommand (SPECTRA command)
APPLY Subcommand (SPECTRA command)
References (SPECTRA command)


Example (SPECTRA command)

SPECTRA VARIABLES = HSTARTS
  /CENTER
  /PLOT P S BY FREQ.

• This example produces a plot of the periodogram and spectral density estimate for series HSTARTS.

• CENTER adjusts the series to have a mean of 0.

• PLOT specifies that the periodogram (P) and the spectral density estimate (S) should be plotted against frequency (BY FREQ).

Related Topics

SPECTRA
Overview (SPECTRA command)
VARIABLES Subcommand (SPECTRA command)
CENTER Subcommand (SPECTRA command)
WINDOW Subcommand (SPECTRA command)
PLOT Subcommand (SPECTRA command)
CROSS Subcommand (SPECTRA command)
SAVE Subcommand (SPECTRA command)
APPLY Subcommand (SPECTRA command)
References (SPECTRA command)


VARIABLES Subcommand (SPECTRA command)

SPECTRA (command),SPECTRA (command),SPECTRA (command)
VARIABLES subcommand,VARIABLES subcommand,VARIABLES subcommand
VARIABLES (subcommand),VARIABLES (subcommand),VARIABLES (subcommand)
SPECTRA command,SPECTRA command,SPECTRA command

VARIABLES specifies the series names and is the only required subcommand.

• VARIABLES must be specified before the other subcommands.

• Each specified series is analyzed separately unless the CROSS subcommand is specified.

• The series must contain at least six cases.

Example

SPECTRA VARIABLES = VARX VARY.
SPECTRA (command),SPECTRA (command),SPECTRA (command)
VARIABLES subcommand,VARIABLES subcommand,VARIABLES subcommand
VARIABLES (subcommand),VARIABLES (subcommand),VARIABLES (subcommand)
SPECTRA command,SPECTRA command,SPECTRA command

• This command produces the default display for two series, VARX and VARY.

Related Topics

SPECTRA
Overview (SPECTRA command)
Example (SPECTRA command)
CENTER Subcommand (SPECTRA command)
WINDOW Subcommand (SPECTRA command)
PLOT Subcommand (SPECTRA command)
CROSS Subcommand (SPECTRA command)
SAVE Subcommand (SPECTRA command)
APPLY Subcommand (SPECTRA command)
References (SPECTRA command)


CENTER Subcommand (SPECTRA command)

CENTER (subcommand),CENTER (subcommand),CENTER (subcommand)
SPECTRA command,SPECTRA command,SPECTRA command
SPECTRA (command),SPECTRA (command),SPECTRA (command)
CENTER subcommand,CENTER subcommand,CENTER subcommand
SPECTRA (command),SPECTRA (command),SPECTRA (command)
centering transformation,centering transformation,centering transformation
centering transformation,centering transformation,centering transformation
SPECTRA command,SPECTRA command,SPECTRA command

CENTER adjusts the series to have a mean of 0. This process reduces the range of values that are displayed in the plots.

• If CENTER is not specified, the ordinate of the first periodogram value is 2n times the square of the mean of the series, where n is the number of cases.

• You can specify CENTER NO to suppress centering when applying a previous model with APPLY.

Example

SPECTRA VARIABLES = VARX VARY
  /CENTER.

• This example produces the default display for VARX and VARY. The plots are based on the series after their means have been adjusted to 0.

Related Topics

SPECTRA
Overview (SPECTRA command)
Example (SPECTRA command)
VARIABLES Subcommand (SPECTRA command)
WINDOW Subcommand (SPECTRA command)
PLOT Subcommand (SPECTRA command)
CROSS Subcommand (SPECTRA command)
SAVE Subcommand (SPECTRA command)
APPLY Subcommand (SPECTRA command)
References (SPECTRA command)


WINDOW Subcommand (SPECTRA command)

windows,windows,windows
SPECTRA (command),SPECTRA (command),SPECTRA (command)
SPECTRA (command),SPECTRA (command),SPECTRA (command)
windows,windows,windows
WINDOW (subcommand),WINDOW (subcommand),WINDOW (subcommand)
SPECTRA command,SPECTRA command,SPECTRA command
SPECTRA (command),SPECTRA (command),SPECTRA (command)
WINDOW subcommand,WINDOW subcommand,WINDOW subcommand

WINDOW specifies a spectral window to use when the periodogram is smoothed to obtain the spectral density estimate. If WINDOW is not specified, the Tukey-Hamming window with a span of 5 is used.

• The specification on WINDOW is a window name and a span in parentheses, or a sequence of user-specified weights.

• The window name can be any one of the keywords listed below.

• Only one window keyword is accepted. If more than one keyword is specified, the first keyword is used.

• The span is the number of periodogram values in the moving average and can be any integer. If an even number is specified, it is decreased by 1.

• Smoothing near the end of series is accomplished via reflection. For example, if the span is 5, the second periodogram value is smoothed by averaging the first, third, and fourth values and twice the second value.

The following data windows can be specified. Each formula defines the upper half of the window. The lower half is symmetric with the upper half. In all formulas, p is the integer part of the number of spans divided by 2, Dp is the Dirichlet kernel of order p, and Fp is the Fejer kernel of order p(Priestley, 1981).

Tukey-Hamming window,Tukey-Hamming window,Tukey-Hamming window
SPECTRA command,SPECTRA command,SPECTRA command
HAMMING (keyword),HAMMING (keyword),HAMMING (keyword)
SPECTRA command,SPECTRA command,SPECTRA command
HAMMING | Tukey-Hamming window. The weights are
 | Wk=0.54Dp(2πfk)+0.23Dp(2πfk+πp)+0.23Dp(2πfk−πp)
 | where k=0, ... p. This is the default.
TUKEY | Tukey-Hanning window. The weights are
 | Wk=0.5Dp(2πfk)+0.25Dp(2πfk+πp)+0.25Dp(2πfk−πp)
 | where k=0, ... p.
PARZEN | Parzen window. The weights are
 | Wk=1p(2+cos(2πfk))(Fp/2(2πfk))2
 | where k=0, ... p.
BARTLETT | Bartlett window. The weights are
 | Wk=Fp(2πfk)
 | where k=0, ... p.
UNIT | Equal-weight window. The weights are wk = 1 where k=0, ... p. DANIELL is an alias for UNIT.
NONE | No smoothing. If NONE is specified, the spectral density estimate is the same as the periodogram.
w | User-specified weights. W0 is applied to the periodogram value that is being smoothed, and the weights on either side are applied to preceding and following values. If the number of weights is even, it is assumed that wp is not supplied. The weight after the middle one is applied to the periodogram value being smoothed. W0 must be positive.
HAMMING (keyword),HAMMING (keyword),HAMMING (keyword)
SPECTRA command,SPECTRA command,SPECTRA command
TUKEY (keyword),TUKEY (keyword),TUKEY (keyword)
SPECTRA command,SPECTRA command,SPECTRA command
TUKEY (keyword),TUKEY (keyword),TUKEY (keyword)
SPECTRA command,SPECTRA command,SPECTRA command
PARZEN (keyword),PARZEN (keyword),PARZEN (keyword)
SPECTRA command,SPECTRA command,SPECTRA command
Parzen window,Parzen window,Parzen window
SPECTRA command,SPECTRA command,SPECTRA command
PARZEN (keyword),PARZEN (keyword),PARZEN (keyword)
SPECTRA command,SPECTRA command,SPECTRA command
Bartlett window,Bartlett window,Bartlett window
SPECTRA command,SPECTRA command,SPECTRA command
BARTLETT (keyword),BARTLETT (keyword),BARTLETT (keyword)
SPECTRA command,SPECTRA command,SPECTRA command
DANIELL (keyword),DANIELL (keyword),DANIELL (keyword)
SPECTRA command,SPECTRA command,SPECTRA command
UNIT (keyword),UNIT (keyword),UNIT (keyword)
SPECTRA command,SPECTRA command,SPECTRA command
equal-weight window,equal-weight window,equal-weight window
SPECTRA command,SPECTRA command,SPECTRA command
DANIELL (keyword),DANIELL (keyword),DANIELL (keyword)
SPECTRA command,SPECTRA command,SPECTRA command
UNIT (keyword),UNIT (keyword),UNIT (keyword)
SPECTRA command,SPECTRA command,SPECTRA command
NONE (keyword),NONE (keyword),NONE (keyword)
SPECTRA command,SPECTRA command,SPECTRA command
NONE (keyword),NONE (keyword),NONE (keyword)
SPECTRA command,SPECTRA command,SPECTRA command

Example

SPECTRA VARIABLES = VAR01
  /WINDOW=TUKEY(3)
  /PLOT=P S.

• In this example, the Tukey window weights with a span of 3 are used.

WINDOW (subcommand),WINDOW (subcommand),WINDOW (subcommand)
SPECTRA command,SPECTRA command,SPECTRA command
SPECTRA (command),SPECTRA (command),SPECTRA (command)
WINDOW subcommand,WINDOW subcommand,WINDOW subcommand

• The PLOT subcommand plots both the periodogram and the spectral density estimate, both by frequency and period.

Related Topics

SPECTRA
Overview (SPECTRA command)
Example (SPECTRA command)
VARIABLES Subcommand (SPECTRA command)
CENTER Subcommand (SPECTRA command)
PLOT Subcommand (SPECTRA command)
CROSS Subcommand (SPECTRA command)
SAVE Subcommand (SPECTRA command)
APPLY Subcommand (SPECTRA command)
References (SPECTRA command)


PLOT Subcommand (SPECTRA command)

SPECTRA (command),SPECTRA (command),SPECTRA (command)
PLOT subcommand,PLOT subcommand,PLOT subcommand
PLOT (subcommand),PLOT (subcommand),PLOT (subcommand)
SPECTRA command,SPECTRA command,SPECTRA command
SPECTRA (command),SPECTRA (command),SPECTRA (command)
plots,plots,plots

PLOT specifies which plots are displayed.

periodogram,periodogram,periodogram
SPECTRA command,SPECTRA command,SPECTRA command

• If PLOT is not specified, only the periodogram is plotted for each specified series. Each periodogram is shown both by frequency and by period.

• You can specify more than one plot keyword.

• Keywords can be specified in any order.

• The plot keywords K, CS, QS, PH, A, and G apply only to bivariate analyses. If the subcommand CROSS is not specified, these keywords are ignored.

• The period (horizontal) axis on a plot by period (BY PERIOD) is scaled in natural logarithms from 0.69 to ln(n), where n is the number of cases.

• The frequency (horizontal) axis on a plot by frequency (BY FREQ) is scaled from 0 to 0.5, expressing the frequency as a fraction of the length of the series.

• The periodogram and estimated spectrum (vertical axis) are scaled in natural logs.

The following plot keywords are available:

P (keyword),P (keyword),P (keyword)
SPECTRA command,SPECTRA command,SPECTRA command
S (keyword),S (keyword),S (keyword)
SPECTRA command,SPECTRA command,SPECTRA command
spectral density estimate plot,spectral density estimate plot,spectral density estimate plot
SPECTRA command,SPECTRA command,SPECTRA command
squared coherency plot,squared coherency plot,squared coherency plot
SPECTRA command,SPECTRA command,SPECTRA command
K (keyword),K (keyword),K (keyword)
SPECTRA command,SPECTRA command,SPECTRA command
CS (keyword),CS (keyword),CS (keyword)
SPECTRA command,SPECTRA command,SPECTRA command
cospectral density estimate plot,cospectral density estimate plot,cospectral density estimate plot
SPECTRA command,SPECTRA command,SPECTRA command
quadratic spectrum estimate plot,quadratic spectrum estimate plot,quadratic spectrum estimate plot
SPECTRA command,SPECTRA command,SPECTRA command
QS (keyword),QS (keyword),QS (keyword)
SPECTRA command,SPECTRA command,SPECTRA command
phase spectrum plot,phase spectrum plot,phase spectrum plot
SPECTRA command,SPECTRA command,SPECTRA command
PH (keyword),PH (keyword),PH (keyword)
SPECTRA command,SPECTRA command,SPECTRA command
cross-amplitude plot,cross-amplitude plot,cross-amplitude plot
SPECTRA command,SPECTRA command,SPECTRA command
A (keyword),A (keyword),A (keyword)
SPECTRA command,SPECTRA command,SPECTRA command
G (keyword),G (keyword),G (keyword)
SPECTRA command,SPECTRA command,SPECTRA command
gain chart,gain chart,gain chart
SPECTRA command,SPECTRA command,SPECTRA command
P | Periodogram. This setting is the default.
S | Spectral density estimate.
K | Squared coherency. Applies only to bivariate analyses.
CS | Cospectral density estimate. Applies only to bivariate analyses.
QS | Quadrature spectrum estimate. Applies only to bivariate analyses.
PH | Phase spectrum. Applies only to bivariate analyses.
A | Cross amplitude. Applies only to bivariate analyses.
G | Gain. Applies only to bivariate analyses.
ALL | All plots. For bivariate analyses, this setting includes all plots listed above. For univariate analyses, this setting includes the periodogram and the spectral density estimate.

Related Topics

SPECTRA
Overview (SPECTRA command)
Example (SPECTRA command)
VARIABLES Subcommand (SPECTRA command)
CENTER Subcommand (SPECTRA command)
WINDOW Subcommand (SPECTRA command)
CROSS Subcommand (SPECTRA command)
SAVE Subcommand (SPECTRA command)
APPLY Subcommand (SPECTRA command)
References (SPECTRA command)
BY Keyword (SPECTRA command)


BY Keyword (SPECTRA command)

BY (keyword),BY (keyword),BY (keyword)
SPECTRA command,SPECTRA command,SPECTRA command
SPECTRA (command),SPECTRA (command),SPECTRA (command)
BY keyword,BY keyword,BY keyword

By default, SPECTRA displays both frequency and period plots. You can use BY to produce only frequency plots or only period plots.

• BY FREQ indicates that all plots are plotted by frequency only. Plots by period are not produced.

• BY PERIOD indicates that all plots are plotted by period only. Plots by frequency are not produced.

Example

SPECTRA VARIABLES = SER01
  /PLOT=P S BY FREQ.
SPECTRA (command),SPECTRA (command),SPECTRA (command)
PLOT subcommand,PLOT subcommand,PLOT subcommand
PLOT (subcommand),PLOT (subcommand),PLOT (subcommand)
SPECTRA command,SPECTRA command,SPECTRA command
SPECTRA (command),SPECTRA (command),SPECTRA (command)
BY keyword,BY keyword,BY keyword
BY (keyword),BY (keyword),BY (keyword)
SPECTRA command,SPECTRA command,SPECTRA command
SPECTRA (command),SPECTRA (command),SPECTRA (command)
plots,plots,plots

• This command plots both the periodogram and the spectral density estimate for SER01. The plots are shown by frequency only.

Related Topics

PLOT Subcommand (SPECTRA command)


CROSS Subcommand (SPECTRA command)

SPECTRA (command),SPECTRA (command),SPECTRA (command)
CROSS subcommand,CROSS subcommand,CROSS subcommand
CROSS (subcommand),CROSS (subcommand),CROSS (subcommand)
SPECTRA command,SPECTRA command,SPECTRA command
bivariate spectral analysis,bivariate spectral analysis,bivariate spectral analysis
SPECTRA command,SPECTRA command,SPECTRA command
SPECTRA (command),SPECTRA (command),SPECTRA (command)
bivariate spectral analysis,bivariate spectral analysis,bivariate spectral analysis

CROSS is used to specify bivariate spectral analysis.

• When CROSS is specified, the first series named on the VARIABLES subcommand is the independent variable. All remaining variables are dependent.

• Each series after the first series is analyzed with the first series independently of other series that is named.

• Univariate analysis of each specified series is still performed.

• You can specify CROSS NO to turn off bivariate analysis when applying a previous model with APPLY.

Example

SPECTRA VARIABLES = VARX VARY VARZ
  /CROSS.
SPECTRA (command),SPECTRA (command),SPECTRA (command)
CROSS subcommand,CROSS subcommand,CROSS subcommand
CROSS (subcommand),CROSS (subcommand),CROSS (subcommand)
SPECTRA command,SPECTRA command,SPECTRA command

• In this example, bivariate spectral analyses of series VARX with VARY and VARX with VARZ are requested in addition to the usual univariate analyses of VARX, VARY, and VARZ.

Related Topics

SPECTRA
Overview (SPECTRA command)
Example (SPECTRA command)
VARIABLES Subcommand (SPECTRA command)
CENTER Subcommand (SPECTRA command)
WINDOW Subcommand (SPECTRA command)
PLOT Subcommand (SPECTRA command)
SAVE Subcommand (SPECTRA command)
APPLY Subcommand (SPECTRA command)
References (SPECTRA command)


SAVE Subcommand (SPECTRA command)

SPECTRA (command),SPECTRA (command),SPECTRA (command)
saving spectral variables,saving spectral variables,saving spectral variables
SPECTRA (command),SPECTRA (command),SPECTRA (command)
SAVE subcommand,SAVE subcommand,SAVE subcommand
SAVE (subcommand),SAVE (subcommand),SAVE (subcommand)
SPECTRA command,SPECTRA command,SPECTRA command

SAVE saves computed SPECTRA variables to the active dataset for later use. SPECTRA displays a list of the new variables and their labels, showing the type and source of those variables.

• You can specify any or all of the output keywords listed below.

• A name to be used for generating variable names must follow each output keyword. The name must be enclosed in parentheses.

• For each output keyword, one variable is created for each series named on SPECTRA and for each bivariate pair.

• The keywords RC, IC, CS, QS, PH, A, G, and K apply only to bivariate analyses. If CROSS is not specified, these keywords are ignored.

• SAVE specifications are not used when models are reapplied by using APPLY. They must be specified each time variables are to be saved.

• The output variables correspond to the Fourier frequencies. They do not correspond to the original series.

• Because each output variable has only (n/2 + 1) cases (where n is the number of cases), the values for the second half of the series are set to system-missing.

• Variable names are generated by adding _n to the specified name, where n ranges from 1 to the number of series specified.

• For bivariate variables, the suffix is _n_n, where the ns indicate the two variables that are used in the analysis.

• The frequency (FREQ) and period (PER) variable names are constant across all series and do not have a numeric suffix.

• If the generated variable name is longer than the maximum variable name length, or if the specified name already exists, the variable is not saved.

The following output keywords are available:

FREQ (keyword),FREQ (keyword),FREQ (keyword)
SPECTRA command,SPECTRA command,SPECTRA command
Fourier frequencies,Fourier frequencies,Fourier frequencies
saving with SPECTRA command,saving with SPECTRA command,saving with SPECTRA command
PER (keyword),PER (keyword),PER (keyword)
SPECTRA command,SPECTRA command,SPECTRA command
Fourier periods,Fourier periods,Fourier periods
saving with SPECTRA command,saving with SPECTRA command,saving with SPECTRA command
sine function values,sine function values,sine function values
saving with SPECTRA command,saving with SPECTRA command,saving with SPECTRA command
SIN (keyword),SIN (keyword),SIN (keyword)
SPECTRA command,SPECTRA command,SPECTRA command
COS (keyword),COS (keyword),COS (keyword)
SPECTRA command,SPECTRA command,SPECTRA command
cosine function values,cosine function values,cosine function values
saving with SPECTRA command,saving with SPECTRA command,saving with SPECTRA command
P (keyword),P (keyword),P (keyword)
SPECTRA command,SPECTRA command,SPECTRA command
periodogram values,periodogram values,periodogram values
saving with SPECTRA command,saving with SPECTRA command,saving with SPECTRA command
S (keyword),S (keyword),S (keyword)
SPECTRA command,SPECTRA command,SPECTRA command
spectral density estimates,spectral density estimates,spectral density estimates
saving with SPECTRA command,saving with SPECTRA command,saving with SPECTRA command
cross-periodogram values,cross-periodogram values,cross-periodogram values
saving with SPECTRA command,saving with SPECTRA command,saving with SPECTRA command
RC (keyword),RC (keyword),RC (keyword)
SPECTRA command,SPECTRA command,SPECTRA command
IC (keyword),IC (keyword),IC (keyword)
SPECTRA command,SPECTRA command,SPECTRA command
cross-periodogram values,cross-periodogram values,cross-periodogram values
saving with SPECTRA command,saving with SPECTRA command,saving with SPECTRA command
IC (keyword),IC (keyword),IC (keyword)
SPECTRA command,SPECTRA command,SPECTRA command
cospectral density estimates,cospectral density estimates,cospectral density estimates
saving with SPECTRA command,saving with SPECTRA command,saving with SPECTRA command
CS (keyword),CS (keyword),CS (keyword)
SPECTRA command,SPECTRA command,SPECTRA command
QS (keyword),QS (keyword),QS (keyword)
SPECTRA command,SPECTRA command,SPECTRA command
quadrature spectrum estimates,quadrature spectrum estimates,quadrature spectrum estimates
saving with SPECTRA command,saving with SPECTRA command,saving with SPECTRA command
phase spectrum estimates,phase spectrum estimates,phase spectrum estimates
saving with SPECTRA command,saving with SPECTRA command,saving with SPECTRA command
PH (keyword),PH (keyword),PH (keyword)
SPECTRA command,SPECTRA command,SPECTRA command
cross-amplitude values,cross-amplitude values,cross-amplitude values
saving with SPECTRA command,saving with SPECTRA command,saving with SPECTRA command
A (keyword),A (keyword),A (keyword)
SPECTRA command,SPECTRA command,SPECTRA command
G (keyword),G (keyword),G (keyword)
SPECTRA command,SPECTRA command,SPECTRA command
gain values,gain values,gain values
saving with SPECTRA command,saving with SPECTRA command,saving with SPECTRA command
K (keyword),K (keyword),K (keyword)
SPECTRA command,SPECTRA command,SPECTRA command
squared coherency values,squared coherency values,squared coherency values
saving with SPECTRA command,saving with SPECTRA command,saving with SPECTRA command
FREQ | Fourier frequencies.
PER | Fourier periods.
SIN | Value of a sine function at the Fourier frequencies.
COS | Value of a cosine function at the Fourier frequencies.
P | Periodogram values.
S | Spectral density estimate values.
RC | Real part values of the cross-periodogram. Applies only to bivariate analyses.
IC | Imaginary part values of the cross-periodogram. Applies only to bivariate analyses.
CS | Cospectral density estimate values. Applies only to bivariate analyses.
QS | Quadrature spectrum estimate values. Applies only to bivariate analyses.
PH | Phase spectrum estimate values. Applies only to bivariate analyses.
A | Cross-amplitude values. Applies only to bivariate analyses.
G | Gain values. Applies only to bivariate analyses.
K | Squared coherency values. Applies only to bivariate analyses.

Example

SPECTRA VARIABLES=STRIKES RUNS
   /SAVE= FREQ (FREQ) P (PGRAM) S (SPEC).
SAVE (subcommand),SAVE (subcommand),SAVE (subcommand)
SPECTRA command,SPECTRA command,SPECTRA command
SPECTRA (command),SPECTRA (command),SPECTRA (command)
saving spectral variables,saving spectral variables,saving spectral variables
SPECTRA (command),SPECTRA (command),SPECTRA (command)
SAVE subcommand,SAVE subcommand,SAVE subcommand

• This example creates five variables: FREQ, PGRAM_1, PGRAM_2, SPEC_1, and SPEC_2.

Related Topics

SPECTRA
Overview (SPECTRA command)
Example (SPECTRA command)
VARIABLES Subcommand (SPECTRA command)
CENTER Subcommand (SPECTRA command)
WINDOW Subcommand (SPECTRA command)
PLOT Subcommand (SPECTRA command)
CROSS Subcommand (SPECTRA command)
APPLY Subcommand (SPECTRA command)
References (SPECTRA command)


APPLY Subcommand (SPECTRA command)

SPECTRA (command),SPECTRA (command),SPECTRA (command)
using a previously defined model,using a previously defined model,using a previously defined model
APPLY (subcommand),APPLY (subcommand),APPLY (subcommand)
SPECTRA command,SPECTRA command,SPECTRA command
SPECTRA (command),SPECTRA (command),SPECTRA (command)
APPLY subcommand,APPLY subcommand,APPLY subcommand

APPLY allows you to use a previously defined SPECTRA model without having to repeat the specifications.

• The only specification on APPLY is the name of a previous model in quotation marks. If a model name is not specified, the model that was specified on the previous SPECTRA command is used. Model names are either the default MOD_n names that are assigned by Forecasting or the names that are assigned on the MODEL NAME command.

• To change one or more model specifications, specify the subcommands of only those portions you want to change after the APPLY subcommand.

• If no series are specified on the command, the series that were originally specified with the model that is being reapplied are used.

• To change the series that are used with the model, enter new series names before or after the APPLY subcommand. If a variable name is specified before APPLY, the slash before the subcommand is required.

• The SAVE specifications from the previous model are not reused by APPLY. They must be specified each time that variables are to be saved.

Examples

SPECTRA VARIABLES = VAR01
  /WINDOW=DANIELL (3)
  /CENTER
  /PLOT P S BY FREQ.
SPECTRA APPLY
  /PLOT P S.

• The first command plots both the periodogram and the spectral density estimate for VAR01. The plots are shown by frequency only.

APPLY (subcommand),APPLY (subcommand),APPLY (subcommand)
SPECTRA command,SPECTRA command,SPECTRA command
SPECTRA (command),SPECTRA (command),SPECTRA (command)
APPLY subcommand,APPLY subcommand,APPLY subcommand
SPECTRA (command),SPECTRA (command),SPECTRA (command)
using a previously defined model,using a previously defined model,using a previously defined model

• Because the PLOT subcommand is respecified, the second command produces plots by both frequency and period. All other specifications remain the same as in the first command.

Related Topics

SPECTRA
Overview (SPECTRA command)
Example (SPECTRA command)
VARIABLES Subcommand (SPECTRA command)
CENTER Subcommand (SPECTRA command)
WINDOW Subcommand (SPECTRA command)
PLOT Subcommand (SPECTRA command)
CROSS Subcommand (SPECTRA command)
SAVE Subcommand (SPECTRA command)
References (SPECTRA command)


References (SPECTRA command)

Bloomfield, P. 1976. Fourier analysis of time series. New York: John Wiley and Sons.

Fuller, W. A. 1976. Introduction to statistical time series. New York: John Wiley and Sons.

Gottman, J. M. 1981. Time-series analysis: A comprehensive introduction for social scientists. Cambridge: Cambridge University Press.

Priestley, M. B. 1981. Spectral analysis and time series, volumes 1 and 2. London: Academic Press.

Related Topics

SPECTRA
Overview (SPECTRA command)
Example (SPECTRA command)
VARIABLES Subcommand (SPECTRA command)
CENTER Subcommand (SPECTRA command)
WINDOW Subcommand (SPECTRA command)
PLOT Subcommand (SPECTRA command)
CROSS Subcommand (SPECTRA command)
SAVE Subcommand (SPECTRA command)
APPLY Subcommand (SPECTRA command)


SPLIT FILE

SPLIT FILE (command),SPLIT FILE (command),SPLIT FILE (command)
SPLIT FILE (command),SPLIT FILE (command),SPLIT FILE (command)
syntax chart,syntax chart,syntax chart
subgroups,subgroups,subgroups
splitting data files into,splitting data files into,splitting data files into
data files,data files,data files
split-file processing,split-file processing,split-file processing
split-file processing,split-file processing,split-file processing
SPLIT FILE              {OFF       }
           [{LAYERED }] {BY varlist}
            {SEPARATE}

This command takes effect immediately. It does not read the active dataset or execute pending transformations. See the topic Command Order for more information.

Syntax for the SPLIT FILE command can be generated from the Split File dialog.

Example

SPLIT FILE BY SEX.

Related Topics

Overview (SPLIT FILE command)
LAYERED and SEPARATE Subcommands (SPLIT FILE command)
Examples (SPLIT FILE command)


Overview (SPLIT FILE command)

BY (keyword),BY (keyword),BY (keyword)
SPLIT FILE command,SPLIT FILE command,SPLIT FILE command
OFF (keyword),OFF (keyword),OFF (keyword)
SPLIT FILE command,SPLIT FILE command,SPLIT FILE command
split-file processing,split-file processing,split-file processing
break variables,break variables,break variables
split-file processing,split-file processing,split-file processing
system variables,system variables,system variables
split-file processing,split-file processing,split-file processing
scratch variables,scratch variables,scratch variables
TEMPORARY (command),TEMPORARY (command),TEMPORARY (command)
with SPLIT FILE command,with SPLIT FILE command,with SPLIT FILE command
SPLIT FILE (command),SPLIT FILE (command),SPLIT FILE (command)
with TEMPORARY command,with TEMPORARY command,with TEMPORARY command
SPLIT FILE (command),SPLIT FILE (command),SPLIT FILE (command)
with AGGREGATE command,with AGGREGATE command,with AGGREGATE command
AGGREGATE (command),AGGREGATE (command),AGGREGATE (command)
with SPLIT FILE command,with SPLIT FILE command,with SPLIT FILE command
matrices,matrices,matrices
split-file processing,split-file processing,split-file processing
split-file processing,split-file processing,split-file processing
matrices,matrices,matrices
SPLIT FILE (command),SPLIT FILE (command),SPLIT FILE (command)
limitations,limitations,limitations
SORT CASES (command),SORT CASES (command),SORT CASES (command)
with SPLIT FILE command,with SPLIT FILE command,with SPLIT FILE command
SPLIT FILE (command),SPLIT FILE (command),SPLIT FILE (command)
with SORT CASES command,with SORT CASES command,with SORT CASES command

SPLIT FILE splits the active dataset into subgroups that can be analyzed separately. These subgroups are sets of adjacent cases in the file that have the same values for the specified split variables. Each value of each split variable is considered a break group, and cases within a break group must be grouped together in the active dataset. If they are not grouped together, the SORT CASES command must be used before SPLIT FILE to sort cases in the proper order.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is keyword BY followed by the variable or variables that define the split-file groups.

• By default, the split-file groups are compared within the same table(s).

• You can turn off split-file processing by using keyword OFF.

Syntax Rules Collapse Hide details

Syntax Rules

• SPLIT FILE can specify both numeric and string split variables, including variables that are created by temporary transformations. SPLIT FILE cannot specify scratch or system variables.

• SPLIT FILE is in effect for all procedures in a session unless you limit it with a TEMPORARY command, turn it off, or override it with a new SPLIT FILE or SORT CASES command.

Operations Collapse Hide details

Operations

• SPLIT FILE takes effect as soon as it is encountered in the command sequence. Therefore, pay special attention to the position of SPLIT FILE among commands. See the topic Command Order for more information.

• The file is processed sequentially. A change or break in values on any one of the split variables signals the end of one break group and the beginning of the next break group.

• AGGREGATE ignores the SPLIT FILE command. To split files by using AGGREGATE, name the variables that are used to split the file as break variables ahead of any other break variables on AGGREGATE. AGGREGATE still produces one file, but the aggregated cases are in the same order as the split-file groups.

• If SPLIT FILE is in effect when a procedure writes matrix materials, the program writes one set of matrix materials for every split group. If a procedure reads a file that contains multiple sets of matrix materials, the procedure automatically detects the presence of multiple sets.

• If SPLIT FILE names any variable that was defined by the NUMERIC command, the program prints page headings that indicate the split-file grouping.

Limitations Collapse Hide details

Limitations

• SPLIT FILE can specify or imply up to eight variables.

• Each eight bytes of a string variable counts as a variable toward the limit of eight variables. So a string variable with a defined width of greater than 64 bytes cannot be used as a split file variable.

Related Topics

SPLIT FILE
LAYERED and SEPARATE Subcommands (SPLIT FILE command)
Examples (SPLIT FILE command)


LAYERED and SEPARATE Subcommands (SPLIT FILE command)

LAYERED and SEPARATE specify how split-file groups are displayed in the output.

• Only one of these subcommands can be specified. If neither subcommand is specified with the BY variable list, LAYERED is the default.

• LAYERED and SEPARATE do not apply to the text output.

LAYERED | Display split-file groups in the same table in the outermost column.
SEPARATE | Display split-file groups as separate tables.

Related Topics

SPLIT FILE
Overview (SPLIT FILE command)
Examples (SPLIT FILE command)


Examples (SPLIT FILE command)

Sorting and Splitting a File

SORT CASES BY SEX.
SPLIT FILE BY SEX.
FREQUENCIES VARS=INCOME /STATISTICS=MEDIAN.

• SORT CASES arranges cases in the file according to the values of variable SEX.

• SPLIT FILE splits the file according to the values of variable SEX, and FREQUENCIES generates separate median income tables for men and women.

• By default, the two groups (men and women) are compared in the same Frequency and Statistics tables.

Applying a Temporary Split File

SORT CASES BY SEX.
TEMPORARY.
SPLIT FILE SEPARATE BY SEX.
FREQUENCIES VARS=INCOME /STATISTICS=MEDIAN.
FREQUENCIES VARS=INCOME /STATISTICS=MEDIAN.

• Because of the TEMPORARY command, SPLIT FILE applies to the first procedure only. Thus, the first FREQUENCIES procedure generates separate tables for men and women. The second FREQUENCIES procedure generates tables that include both sexes.

Turning Off a Split File

SORT CASES BY SEX.
SPLIT FILE SEPARATE BY SEX.
FREQUENCIES VARS=INCOME /STATISTICS=MEDIAN.
SPLIT FILE OFF.
FREQUENCIES VARS=INCOME /STATISTICS=MEDIAN.

• SPLIT FILE does not apply to the second FREQUENCIES procedure because it is turned off after the first FREQUENCIES procedure. This example produces the same results as the example above.

Overriding a Previous Split File

SORT CASES BY SEX RACE.
SPLIT FILE BY SEX.
FREQUENCIES VARS=INCOME /STATISTICS=MEDIAN.
SPLIT FILE BY SEX RACE.
FREQUENCIES VARS=INCOME /STATISTICS=MEDIAN.

• The first SPLIT FILE command applies to the first FREQUENCIES procedure. The second SPLIT FILE command overrides the first command and splits the file by sex and race. This split is in effect for the second FREQUENCIES procedure.

Related Topics

SPLIT FILE
Overview (SPLIT FILE command)
LAYERED and SEPARATE Subcommands (SPLIT FILE command)


STRING

initializing variables,initializing variables,initializing variables
string variables,string variables,string variables
initializing variables,initializing variables,initializing variables
variables,variables,variables
defining,defining,defining
STRING (command),STRING (command),STRING (command)
STRING (command),STRING (command),STRING (command)
syntax chart,syntax chart,syntax chart
STRING varlist (An) [/varlist...]

This command takes effect immediately. It does not read the active dataset or execute pending transformations. See the topic Command Order for more information.

Example

STRING STATE1 (A2).

Related Topics

Overview (STRING command)
Examples (STRING command)


Overview (STRING command)

TO (keyword),TO (keyword),TO (keyword)
STRING command,STRING command,STRING command
initializing variables,initializing variables,initializing variables
formats,formats,formats
STRING (command),STRING (command),STRING (command)
with INPUT PROGRAM command,with INPUT PROGRAM command,with INPUT PROGRAM command
INPUT PROGRAM (command),INPUT PROGRAM (command),INPUT PROGRAM (command)
with STRING command,with STRING command,with STRING command

STRING declares new string variables that can be used as target variables in data transformations.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is the name of the new variables and, in parentheses, the variable format.

Syntax Rules Collapse Hide details

Syntax Rules

• If keyword TO is used to create multiple string variables, the specified format applies to each variable that is named and implied by TO.

• To declare variables with different formats, separate each format group with a slash.

• STRING can be used within an input program to determine the order of string variables in the dictionary of the active dataset. When used for this purpose, STRING must precede DATA LIST in the input program. See the examples for the NUMERIC command.

• STRING cannot be used to redefine an existing variable.

• String variables cannot have zero length; A0 is an illegal format.

• All implementations of the program allow the A format. Other string formats may be available on some systems. In addition, the definition of a long string depends on your operating system. Use keyword LOCAL on the INFO command to obtain documentation for your operating system.

Operations Collapse Hide details

Operations

• STRING takes effect as soon as it is encountered in the command sequence. Therefore, pay special attention to the position of STRING among commands. See the topic Command Order for more information.

• New string variables are initialized as blanks.

• Variables that are declared on STRING are added to the active dataset in the order in which they are specified. This order is not changed by the order in which the variables are used in the transformation language.

• To change the defined width of a string variable use the ALTER TYPE command. See the topic ALTER TYPE for more information.

Related Topics

STRING
Examples (STRING command)


Examples (STRING command)

STRING STATE1 (A2).
RECODE STATE ('IO'='IA') (ELSE=COPY) INTO STATE1.

• STRING declares variable STATE1 with an A2 format.

• RECODE specifies STATE as the source variable and specifies STATE1 as the target variable. The original value IO is recoded to IA. Keywords ELSE and COPY copy all other state codes unchanged. Thus, STATE and STATE1 are identical except for cases with the original value IO.

STRING V1 TO V6 (A8) / V7 V10 (A16).

• STRING declares variables V1, V2, V3, V4, V5, and V6, each with an A8 format, and variables V7 and V10, each with an A16 format.

Related Topics

STRING
Overview (STRING command)


SUBTITLE

SUBTITLE (command),SUBTITLE (command),SUBTITLE (command)
SUBTITLE (command),SUBTITLE (command),SUBTITLE (command)
syntax chart,syntax chart,syntax chart
SUBTITLE  [']text[']

This command takes effect immediately. It does not read the active dataset or execute pending transformations. See the topic Command Order for more information.

Example

SUBTITLE "Children's Training Shoes Only".

Related Topics

Overview (SUBTITLE command)
Examples (SUBTITLE command)
TITLE


Overview (SUBTITLE command)

BEGIN DATA (command),BEGIN DATA (command),BEGIN DATA (command)
with SUBTITLE command,with SUBTITLE command,with SUBTITLE command
SUBTITLE (command),SUBTITLE (command),SUBTITLE (command)
with BEGIN DATA command,with BEGIN DATA command,with BEGIN DATA command
TITLE (command),TITLE (command),TITLE (command)
with SUBTITLE command,with SUBTITLE command,with SUBTITLE command
SUBTITLE (command),SUBTITLE (command),SUBTITLE (command)
with TITLE command,with TITLE command,with TITLE command
SUBTITLE (command),SUBTITLE (command),SUBTITLE (command)
with SET command,with SET command,with SET command
SET (command),SET (command),SET (command)
with SUBTITLE (command),with SUBTITLE (command),with SUBTITLE (command)

SUBTITLE inserts a left-justified subtitle on the second line from the top of each page of the output. The default subtitle contains the installation name and information about the hardware and operating system.

Basic Specification Collapse Hide details

Basic Specification

The only specification is the subtitle itself.

Syntax Rules Collapse Hide details

Syntax Rules

• The subtitle can include any characters. To specify a blank subtitle, enclose a blank within quotes.

• The subtitle can be up to 60 characters. Subtitles that are longer than 60 characters are truncated.

• The quotes enclosing the subtitle are optional; using them allows you to include single or double quotes in the subtitle.

• More than one SUBTITLE command is allowed in a single session.

• A subtitle cannot be placed between a procedure command and BEGIN DATA-END DATA or within data records when the data are inline.

Operations Collapse Hide details

Operations

• Each SUBTITLE command overrides the previous command and takes effect on the next output page.

• SUBTITLE is independent of TITLE and each command can be changed separately.

• The subtitle will not be displayed if HEADER=NO is specified on SET.

Related Topics

SUBTITLE
Examples (SUBTITLE command)


Examples (SUBTITLE command)

Using Single and Double Quotes

TITLE 'Running Shoe Study from Runner''s World Data'.
SUBTITLE "Children's Training Shoes Only".

• The title is enclosed in single quotes, so the single quote (apostrophe) in Runner’s must be specified as a two single quotes.

• The subtitle is enclosed in double quotes, so the apostrophe in Children’s is simply specified as a single quote.

Suppressing the Default Subtitle

TITLE 'Running Shoe Study from Runner''s World Data'.
SUBTITLE ' '.

• This subtitle is specified as a blank, which suppresses the default subtitle.

Related Topics

SUBTITLE
Overview (SUBTITLE command)


SUMMARIZE

SUMMARIZE (command),SUMMARIZE (command),SUMMARIZE (command)
SUMMARIZE (command),SUMMARIZE (command),SUMMARIZE (command)
syntax chart,syntax chart,syntax chart

SUMMARIZE is available in the Statistics Base option.

SUMMARIZE [TABLES=]{varlist} [BY varlist] [BY...] [/varlist...]
                   {ALL    }

 [/TITLE ='string']     [/FOOTNOTE= 'string']

 [/CELLS= [COUNT**] [MEAN ] [STDDEV]
                  [MEDIAN] [GMEDIAN] [SEMEAN]  [SUM ]
                  [MIN] [MAX] [RANGE] [VARIANCE]
                  [KURT] [SEKURT] [SKEW] [SESKEW]
                  [FIRST] [LAST]
                  [NPCT] [SPCT] [NPCT(var)] [SPCT(var)]
                  [HARMONIC] [GEOMETRIC]
                  [DEFAULT]
                  [ALL] [NONE]  ]

 [/MISSING=[{EXCLUDE**}][{VARIABLE**  }]
            {INCLUDE  }  {TABLE       }
            {DEPENDENT}

 [FORMAT=[{NOLIST**      }] [{CASENUM   }] [{TOTAL**}]  [MISSING='string']
          {LIST [LIMIT=n]}   {NOCASENUM }   {NOTOTAL}
          {VALIDLIST     }

 [/STATISTICS=[ANOVA] [{LINEARITY}] [NONE**] ]
                       {ALL      }

**Default if the subcommand is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

Syntax for the SUMMARIZE command can be generated from the Summarize Cases dialog.

Example

SUMMARIZE SALES.

Related Topics

Overview (SUMMARIZE command)
Example (SUMMARIZE command)
TABLES Subcommand (SUMMARIZE command)
TITLE and FOOTNOTE Subcommands (SUMMARIZE command)
CELLS Subcommand (SUMMARIZE command)
MISSING Subcommand (SUMMARIZE command)
FORMAT Subcommand (SUMMARIZE command)
STATISTICS Subcommand (SUMMARIZE command)


Overview (SUMMARIZE command)

SUMMARIZE produces univariate statistics for specified variables. You can break the variables into groups defined by one or more control (independent) variables. Another procedure that displays univariate statistics is FREQUENCIES.

Options Collapse Hide details

Options

Cell Contents. By default, SUMMARIZE displays means, standard deviations, and cell counts. You can also use the CELLS subcommand to display aggregated statistics, including sums, variances, median, range, kurtosis, skewness, and their standard error.

Statistics. In addition to the statistics that are displayed for each cell of the table, you can use the STATISTICS subcommand to obtain a one-way analysis of variance and test of linearity.

Format. By default, SUMMARIZE produces a Summary Report with a total category for each group that is defined by the control variables. You can use the FORMAT subcommand to request a Listing Report with or without case numbers. You can also remove the total category from each group. You can use the TITLE and FOOTNOTE subcommands to specify a title and a caption for the Summary or Listing Report.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is TABLES with a variable list. Each variable creates a category. The actual keyword TABLES can be omitted.

• The minimum specification is a dependent variable.

• By default, SUMMARIZE displays a Case Processing Summary table, showing the number and percentage of cases included, excluded, and their total. SUMMARIZE also displays a Summary Report, showing means, standard deviations, and number of cases for each category.

Syntax Rules Collapse Hide details

Syntax Rules

• Both numeric and string variables can be specified. String variables can be short or long.

• If there is more than one TABLES subcommand, FORMAT=LIST or VALIDLIST results in an error.

• String specifications for TITLE and FOOTNOTE must be enclosed in quotes and cannot exceed 255 bytes. When the specification breaks on multiple lines, enclose each line in quotes, and separate the specifications for each line by at least one blank.

• Each subcommand (except TABLES) can be specified only once. If a subcommand is specified multiple times, a warning results, and the last specification is used.

• Multiple TABLES subcommands are allowed, but multiple specifications use a lot of computer resources and time.

• There is no limit on the number of variables that you can specify on each TABLES subcommand.

• When a variable is specified more than once, only the first occurrence is honored. If the same variables are specified after different BY keywords, an error results.

Limitations Collapse Hide details

Limitations

• Only 10 BY keywords can be specified.

Operations Collapse Hide details

Operations

• The data are processed sequentially. It is not necessary to sort the cases before processing. If a BY keyword is used, the output is always sorted.

• A Case Processing Summary table is always generated, showing the number and percentage of the cases included, excluded, and the total.

• For each combination of control variables specified after different BY keywords, SUMMARIZE produces a group in the Summary Report (depending on the specification on the FORMAT subcommand). By default, mean, standard deviation, and number of cases are displayed for each group and for the total.

• An ANOVA table and a Measure of Association table are produced if additional statistics are requested.

Related Topics

SUMMARIZE
Example (SUMMARIZE command)
TABLES Subcommand (SUMMARIZE command)
TITLE and FOOTNOTE Subcommands (SUMMARIZE command)
CELLS Subcommand (SUMMARIZE command)
MISSING Subcommand (SUMMARIZE command)
FORMAT Subcommand (SUMMARIZE command)
STATISTICS Subcommand (SUMMARIZE command)


Example (SUMMARIZE command)

Creating a Grouped Summary Report

SUMMARIZE
  /TABLES=value  BY street
  /FORMAT=NOLIST TOTAL
  /TITLE='Home Sale Statistics' /FOOTNOTE 'Grouped by Street'
  /MISSING=VARIABLE
  /CELLS=COUNT MEAN MEDIAN MIN MAX .

• The procedure produces summaries of value by values of street.

• FORMAT specifies that no case listing should be produced but that summary statistics should be produced.

• TITLE produces the requested title for the summary report and FOOTNOTE produces the specified table footnote.

• CELLS requests the cell counts, means, medians, minimums, and maximums.

• All other options are set to their default values.

For discussion of output from this syntax and to place the example in context, see Creating a Grouped Summary Report.

Displaying Individual Cases

SUMMARIZE
  /TABLES=address value marktime
  /FORMAT=VALIDLIST NOCASENUM MISSING='Unavailable' TOTAL
  /TITLE='Case Listing' /FOOTNOTE 'Only homes selling for $335,000 or more'
  /MISSING=VARIABLE
  /CELLS=COUNT MEAN MEDIAN .

• The procedure produces summaries of address, value, and marktime.

• FORMAT specifies that the case listing report should contain only valid cases, without the case numbers, and with system-missing values displayed with the label Unavailable.

• TITLE produces the requested title for the summary report and FOOTNOTE produces the specified table footnote.

• CELLS requests the cell counts, means, and medians.

• All other options are set to their default values.

For discussion of output from this syntax and to place the example in context, see Displaying Individual Cases.

Related Topics

SUMMARIZE
Overview (SUMMARIZE command)
TABLES Subcommand (SUMMARIZE command)
TITLE and FOOTNOTE Subcommands (SUMMARIZE command)
CELLS Subcommand (SUMMARIZE command)
MISSING Subcommand (SUMMARIZE command)
FORMAT Subcommand (SUMMARIZE command)
STATISTICS Subcommand (SUMMARIZE command)


TABLES Subcommand (SUMMARIZE command)

TABLES (subcommand),TABLES (subcommand),TABLES (subcommand)
SUMMARIZE command,SUMMARIZE command,SUMMARIZE command
SUMMARIZE (command),SUMMARIZE (command),SUMMARIZE (command)
TABLES subcommand,TABLES subcommand,TABLES subcommand

TABLES specifies the dependent and control variables.

• You can specify multiple TABLES subcommands on a single SUMMARIZE command.

• For FORMAT=LIST or VALIDLIST, only one TABLES subcommand is allowed. Multiple dependent and control variables add more breaks to the Listing Report. Total statistics are displayed at the end for each combination that is defined by different values of the control variables.

• For FORMAT=NOLIST, which is the default, each use of keyword BY adds a dimension to the requested table. Total statistics are displayed with each group.

• The order in which control variables are displayed is the same as the order in which they are specified on TABLES. The values of the first control variable that is defined for the table appear in the leftmost column of the table and change the most slowly in the definition of groups.

• Statistics are displayed for each dependent variable in the same report.

BY (keyword),BY (keyword),BY (keyword)
SUMMARIZE command,SUMMARIZE command,SUMMARIZE command

• More than one dependent variable can be specified in a table list, and more than one control variable can be specified in each dimension of a table list.

Related Topics

SUMMARIZE
Overview (SUMMARIZE command)
Example (SUMMARIZE command)
TITLE and FOOTNOTE Subcommands (SUMMARIZE command)
CELLS Subcommand (SUMMARIZE command)
MISSING Subcommand (SUMMARIZE command)
FORMAT Subcommand (SUMMARIZE command)
STATISTICS Subcommand (SUMMARIZE command)


TITLE and FOOTNOTE Subcommands (SUMMARIZE command)

SUMMARIZE (command),SUMMARIZE (command),SUMMARIZE (command)
FOOTNOTE subcommand,FOOTNOTE subcommand,FOOTNOTE subcommand
SUMMARIZE (command),SUMMARIZE (command),SUMMARIZE (command)
TITLE subcommand,TITLE subcommand,TITLE subcommand
TITLE (subcommand),TITLE (subcommand),TITLE (subcommand)
SUMMARIZE command,SUMMARIZE command,SUMMARIZE command
FOOTNOTE (subcommand),FOOTNOTE (subcommand),FOOTNOTE (subcommand)
SUMMARIZE command,SUMMARIZE command,SUMMARIZE command

TITLE and FOOTNOTE provide a title and a caption for the Summary or Listing Report.

• TITLE and FOOTNOTE are optional and can be placed anywhere.

• The specification on TITLE or FOOTNOTE is a string enclosed in quotes. To specify a multiple-line title or footnote, enclose each line in quotes and separate the specifications for each line by at least one blank.

• The string that you specify cannot exceed 255 characters.

Related Topics

SUMMARIZE
Overview (SUMMARIZE command)
Example (SUMMARIZE command)
TABLES Subcommand (SUMMARIZE command)
CELLS Subcommand (SUMMARIZE command)
MISSING Subcommand (SUMMARIZE command)
FORMAT Subcommand (SUMMARIZE command)
STATISTICS Subcommand (SUMMARIZE command)


CELLS Subcommand (SUMMARIZE command)

SUMMARIZE (command),SUMMARIZE (command),SUMMARIZE (command)
statistics,statistics,statistics
CELLS (subcommand),CELLS (subcommand),CELLS (subcommand)
SUMMARIZE command,SUMMARIZE command,SUMMARIZE command
SUMMARIZE (command),SUMMARIZE (command),SUMMARIZE (command)
CELLS subcommand,CELLS subcommand,CELLS subcommand

By default, SUMMARIZE displays the means, standard deviations, and cell counts in each cell. Use CELLS to modify cell information.

• If CELLS is specified without keywords, SUMMARIZE displays the default statistics.

• If any keywords are specified on CELLS, only the requested information is displayed.

• MEDIAN and GMEDIAN use a lot of computer resources and time. Requesting these statistics (via these keywords or ALL) may slow down performance.

standard deviation,standard deviation,standard deviation
SUMMARIZE command,SUMMARIZE command,SUMMARIZE command
mean,mean,mean
SUMMARIZE command,SUMMARIZE command,SUMMARIZE command
DEFAULT (keyword),DEFAULT (keyword),DEFAULT (keyword)
SUMMARIZE command,SUMMARIZE command,SUMMARIZE command
MEAN (keyword),MEAN (keyword),MEAN (keyword)
SUMMARIZE command,SUMMARIZE command,SUMMARIZE command
STDDEV (keyword),STDDEV (keyword),STDDEV (keyword)
SUMMARIZE command,SUMMARIZE command,SUMMARIZE command
COUNT (keyword),COUNT (keyword),COUNT (keyword)
SUMMARIZE command,SUMMARIZE command,SUMMARIZE command
MEDIAN (keyword),MEDIAN (keyword),MEDIAN (keyword)
SUMMARIZE command,SUMMARIZE command,SUMMARIZE command
GMEDIAN (keyword),GMEDIAN (keyword),GMEDIAN (keyword)
SUMMARIZE command,SUMMARIZE command,SUMMARIZE command
SEMEAN (keyword),SEMEAN (keyword),SEMEAN (keyword)
SUMMARIZE command,SUMMARIZE command,SUMMARIZE command
SUM (keyword),SUM (keyword),SUM (keyword)
SUMMARIZE command,SUMMARIZE command,SUMMARIZE command
MIN (keyword),MIN (keyword),MIN (keyword)
SUMMARIZE command,SUMMARIZE command,SUMMARIZE command
MAX (keyword),MAX (keyword),MAX (keyword)
SUMMARIZE command,SUMMARIZE command,SUMMARIZE command
RANGE (keyword),RANGE (keyword),RANGE (keyword)
SUMMARIZE command,SUMMARIZE command,SUMMARIZE command
variance,variance,variance
SUMMARIZE command,SUMMARIZE command,SUMMARIZE command
VARIANCE (keyword),VARIANCE (keyword),VARIANCE (keyword)
SUMMARIZE command,SUMMARIZE command,SUMMARIZE command
KURT (keyword),KURT (keyword),KURT (keyword)
SUMMARIZE command,SUMMARIZE command,SUMMARIZE command
SELIRT (keyword),SELIRT (keyword),SELIRT (keyword)
SUMMARIZE command,SUMMARIZE command,SUMMARIZE command
SKEW (keyword),SKEW (keyword),SKEW (keyword)
SUMMARIZE command,SUMMARIZE command,SUMMARIZE command
SESKEW (keyword),SESKEW (keyword),SESKEW (keyword)
SUMMARIZE command,SUMMARIZE command,SUMMARIZE command
FIRST (keyword),FIRST (keyword),FIRST (keyword)
SUMMARIZE command,SUMMARIZE command,SUMMARIZE command
LAST (keyword),LAST (keyword),LAST (keyword)
SUMMARIZE command,SUMMARIZE command,SUMMARIZE command
SPCT (keyword),SPCT (keyword),SPCT (keyword)
SUMMARIZE command,SUMMARIZE command,SUMMARIZE command
NPCT (keyword),NPCT (keyword),NPCT (keyword)
LAYERED REPORTS command,LAYERED REPORTS command,LAYERED REPORTS command
SPCT (keyword),SPCT (keyword),SPCT (keyword)
SUMMARIZE command,SUMMARIZE command,SUMMARIZE command
NPCT (keyword),NPCT (keyword),NPCT (keyword)
LAYERED REPORTS command,LAYERED REPORTS command,LAYERED REPORTS command
HARMONIC (keyword),HARMONIC (keyword),HARMONIC (keyword)
SUMMARIZE command,SUMMARIZE command,SUMMARIZE command
GEOMETRIC (keyword),GEOMETRIC (keyword),GEOMETRIC (keyword)
SUMMARIZE command,SUMMARIZE command,SUMMARIZE command
ALL (keyword),ALL (keyword),ALL (keyword)
SUMMARIZE command,SUMMARIZE command,SUMMARIZE command
DEFAULT | Means, standard deviations, and cell counts. This setting is the default if CELLS is omitted.
MEAN | Cell means.
STDDEV | Cell standard deviations.
COUNT | Cell counts.
MEDIAN | Cell median.
GMEDIAN | Grouped median.
SEMEAN | Standard error of cell mean.
SUM | Cell sums.
MIN | Cell minimum.
MAX | Cell maximum.
RANGE | Cell range.
VARIANCE | Variances.
KURT | Cell kurtosis.
SEKURT | Standard error of cell kurtosis.
SKEW | Cell skewness.
SESKEW | Standard error of cell skewness.
FIRST | First value.
LAST | Last value.
SPCT | Percentage of total sum.
NPCT | Percentage of total number of cases.
SPCT(var) | Percentage of total sum within specified variable. The specified variable must be one of the control variables.
NPCT(var) | Percentage of total number of cases within specified variable. The specified variable must be one of the control variables.
HARMONIC | Harmonic mean.
GEOMETRIC | Geometric mean.
ALL | All cell information.

Related Topics

SUMMARIZE
Overview (SUMMARIZE command)
Example (SUMMARIZE command)
TABLES Subcommand (SUMMARIZE command)
TITLE and FOOTNOTE Subcommands (SUMMARIZE command)
MISSING Subcommand (SUMMARIZE command)
FORMAT Subcommand (SUMMARIZE command)
STATISTICS Subcommand (SUMMARIZE command)


MISSING Subcommand (SUMMARIZE command)

SUMMARIZE (command),SUMMARIZE (command),SUMMARIZE (command)
MISSING subcommand,MISSING subcommand,MISSING subcommand
MISSING (subcommand),MISSING (subcommand),MISSING (subcommand)
SUMMARIZE command,SUMMARIZE command,SUMMARIZE command

MISSING controls the treatment of cases with missing values. There are two groups of keywords.

• EXCLUDE, INCLUDE, and DEPENDENT specify the treatment of user-missing values. The default is EXCLUDE.

EXCLUDE (keyword),EXCLUDE (keyword),EXCLUDE (keyword)
SUMMARIZE command,SUMMARIZE command,SUMMARIZE command
INCLUDE (keyword),INCLUDE (keyword),INCLUDE (keyword)
SUMMARIZE command,SUMMARIZE command,SUMMARIZE command
DEPENDENT (keyword),DEPENDENT (keyword),DEPENDENT (keyword)
SUMMARIZE command,SUMMARIZE command,SUMMARIZE command
EXCLUDE | All user-missing values are excluded. This setting is the default.
INCLUDE | User-missing values are treated as valid values.
DEPENDENT | User-missing values are considered missing in a dependent variable and valid in a grouping variable (variables that are specified after a BY keyword).

• VARIABLE and TABLE specify how cases with missing values for dependent variables are excluded. The default is VARIABLE.

• Cases with missing values for any control variables are always excluded.

VARIABLE (keyword),VARIABLE (keyword),VARIABLE (keyword)
SUMMARIZE command,SUMMARIZE command,SUMMARIZE command
TABLE (keyword),TABLE (keyword),TABLE (keyword)
SUMMARIZE command,SUMMARIZE command,SUMMARIZE command
VARIABLE | A case is excluded when all values for variables in that table are missing. This setting is the default.
TABLE | A case is excluded when any value is missing within a table.

Related Topics

SUMMARIZE
Overview (SUMMARIZE command)
Example (SUMMARIZE command)
TABLES Subcommand (SUMMARIZE command)
TITLE and FOOTNOTE Subcommands (SUMMARIZE command)
CELLS Subcommand (SUMMARIZE command)
FORMAT Subcommand (SUMMARIZE command)
STATISTICS Subcommand (SUMMARIZE command)


FORMAT Subcommand (SUMMARIZE command)

SUMMARIZE (command),SUMMARIZE (command),SUMMARIZE (command)
FORMAT subcommand,FORMAT subcommand,FORMAT subcommand
FORMAT (subcommand),FORMAT (subcommand),FORMAT (subcommand)
SUMMARIZE command,SUMMARIZE command,SUMMARIZE command

FORMAT specifies whether you want a case listing for your report and whether you want case numbers displayed for the listing. FORMAT also determines whether your reports will display a total category for each group and how the reports will indicate missing values.

NOLIST (keyword),NOLIST (keyword),NOLIST (keyword)
SUMMARIZE command,SUMMARIZE command,SUMMARIZE command
LIST (subcommand),LIST (subcommand),LIST (subcommand)
SUMMARIZE command,SUMMARIZE command,SUMMARIZE command
VALIDLIST (subcommand),VALIDLIST (subcommand),VALIDLIST (subcommand)
SUMMARIZE command,SUMMARIZE command,SUMMARIZE command
CASENUM (keyword),CASENUM (keyword),CASENUM (keyword)
SUMMARIZE command,SUMMARIZE command,SUMMARIZE command
NOCASENUM (keyword),NOCASENUM (keyword),NOCASENUM (keyword)
SUMMARIZE command,SUMMARIZE command,SUMMARIZE command
TOTAL (keyword),TOTAL (keyword),TOTAL (keyword)
SUMMARIZE command,SUMMARIZE command,SUMMARIZE command
NOTOTAL (keyword),NOTOTAL (keyword),NOTOTAL (keyword)
SUMMARIZE command,SUMMARIZE command,SUMMARIZE command
MISSING (keyword),MISSING (keyword),MISSING (keyword)
SUMMARIZE command,SUMMARIZE command,SUMMARIZE command
NOLIST | Display a Summary Report without a case listing. This setting is the default.
LIST | Display a Listing Report. By default, LIST shows all cases. It can be followed by the optional keyword LIMIT, an equals sign, and a positive integer to limit the number of cases in the report. For example, /FORMAT LIST LIMIT=10 will limit the report to the first 10 cases.
VALIDLIST | Display a Listing Report showing only valid cases.
CASENUM | Display case numbers as a category in the Listing Reports. This setting is the default when FORMAT=LIST or VALIDLIST.
NOCASENUM | Do not display case numbers.
TOTAL | Display the summary statistics for the total of each group with the label Total. This is the default.
NOTOTAL | Display the total category without a label.
MISSING='string' | Display system-missing values as a specified string.

Related Topics

SUMMARIZE
Overview (SUMMARIZE command)
Example (SUMMARIZE command)
TABLES Subcommand (SUMMARIZE command)
TITLE and FOOTNOTE Subcommands (SUMMARIZE command)
CELLS Subcommand (SUMMARIZE command)
MISSING Subcommand (SUMMARIZE command)
STATISTICS Subcommand (SUMMARIZE command)


STATISTICS Subcommand (SUMMARIZE command)

SUMMARIZE (command),SUMMARIZE (command),SUMMARIZE (command)
STATISTICS subcommand,STATISTICS subcommand,STATISTICS subcommand
STATISTICS (subcommand),STATISTICS (subcommand),STATISTICS (subcommand)
SUMMARIZE command,SUMMARIZE command,SUMMARIZE command

Use STATISTICS to request a one-way analysis of variance and a test of linearity for each table list.

• Statistics that are requested on STATISTICS are computed in addition to the statistics that are displayed in the Group Statistics table.

• If STATISTICS is specified without keywords, SUMMARIZE computes ANOVA.

• If two or more dimensions are specified, the second and subsequent dimensions are ignored in the analysis-of-variance table.

ANOVA (keyword),ANOVA (keyword),ANOVA (keyword)
SUMMARIZE command,SUMMARIZE command,SUMMARIZE command
eta,eta,eta
SUMMARIZE command,SUMMARIZE command,SUMMARIZE command
analysis of variance,analysis of variance,analysis of variance
SUMMARIZE command,SUMMARIZE command,SUMMARIZE command
linearity test,linearity test,linearity test
SUMMARIZE command,SUMMARIZE command,SUMMARIZE command
LINEARITY (keyword),LINEARITY (keyword),LINEARITY (keyword)
SUMMARIZE command,SUMMARIZE command,SUMMARIZE command
F ratio,F ratio,F ratio
SUMMARIZE command,SUMMARIZE command,SUMMARIZE command
R statistic,R statistic,R statistic
SUMMARIZE command,SUMMARIZE command,SUMMARIZE command
NONE (keyword),NONE (keyword),NONE (keyword)
SUMMARIZE command,SUMMARIZE command,SUMMARIZE command
ANOVA | Analysis of variance. ANOVA displays a standard analysis-of-variance table and calculates eta and eta squared (displayed in the Measures of Association table). This setting is the default if STATISTICS is specified without keywords.
LINEARITY | Test of linearity. LINEARITY (alias ALL) displays additional statistics to the tables that are created by the ANOVA keyword—the sums of squares, degrees of freedom, and mean square associated with linear and nonlinear components, the F ratio, and the significance level for the ANOVA table and Pearson’s r and r2 for the Measures of Association table. LINEARITY is ignored if the control variable is a string.
NONE | No additional statistics. This setting is the default if STATISTICS is omitted.

Example

SUMMARIZE TABLES=INCOME BY SEX BY RACE
  /STATISTICS=ANOVA.

• SUMMARIZE produces a Group Statistics table of INCOME by RACE within SEX and computes an analysis of variance only for INCOME by SEX.

Related Topics

SUMMARIZE
Overview (SUMMARIZE command)
Example (SUMMARIZE command)
TABLES Subcommand (SUMMARIZE command)
TITLE and FOOTNOTE Subcommands (SUMMARIZE command)
CELLS Subcommand (SUMMARIZE command)
MISSING Subcommand (SUMMARIZE command)
FORMAT Subcommand (SUMMARIZE command)


SURVIVAL

Life Tables,Life Tables,Life Tables
command syntax,command syntax,command syntax
SURVIVAL (command),SURVIVAL (command),SURVIVAL (command)
SURVIVAL (command),SURVIVAL (command),SURVIVAL (command)
syntax chart,syntax chart,syntax chart

SURVIVAL is available in the Advanced Statistics option.

SURVIVAL TABLE=survival varlist
                [BY varlist (min, max)...][BY varlist (min, max)...]

  /INTERVAL=THRU n BY a [THRU m BY b ...]

  /STATUS=status variable({min, max}) FOR {ALL             }
                          {value   }      {survival varlist}
 [/STATUS=...]

 [/PLOTS  ({ALL     })={ALL            } BY {ALL    }     BY {ALL    }]
           {LOGSURV }  {survival varlis}    {varlist}        {varlist}
           {SURVIVAL}
           {HAZARD  }
           {DENSITY }
           {OMS     }

 [/PRINT={TABLE**}]
         {NOTABLE}

 [/COMPARE={ALL**           } BY {ALL**  }   BY {ALL**  }]
           {survival varlist}    {varlist}      {varlist}

 [/CALCULATE=[{EXACT**    }] [PAIRWISE] [COMPARE] ]
              {CONDITIONAL}
              {APPROXIMATE}

 [/MISSING={GROUPWISE**}  [INCLUDE] ]
           {LISTWISE   }

 [/WRITE=[{NONE**}] ]
          {TABLES}
          {BOTH  }

**Default if the subcommand or keyword is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See SURVIVAL Algorithms for computational details for this procedure.

Syntax for the SURVIVAL command can be generated from the Life Tables dialog.

Example

SURVIVAL TABLE=MOSFREE BY TREATMNT(1,3)
  /STATUS = PRISON (1) FOR MOSFREE
  /INTERVAL=THRU 24 BY 3.

Related Topics

Overview (SURVIVAL command)
Examples (SURVIVAL command)
TABLE Subcommand (SURVIVAL command)
INTERVAL Subcommand (SURVIVAL command)
STATUS Subcommand (SURVIVAL command)
PLOTS Subcommand (SURVIVAL command)
PRINT Subcommand (SURVIVAL command)
COMPARE Subcommand (SURVIVAL command)
CALCULATE Subcommand (SURVIVAL command)
Using Aggregated Data (SURVIVAL command)
MISSING Subcommand (SURVIVAL command)
WRITE Subcommand (SURVIVAL command)


Overview (SURVIVAL command)

SURVIVAL (command),SURVIVAL (command),SURVIVAL (command)
limitations,limitations,limitations

SURVIVAL produces actuarial life tables, plots, and related statistics for examining the length of time to the occurrence of an event, often known as survival time. Cases can be classified into groups for separate analyses and comparisons. Time intervals can be calculated with the PASW Statistics date- and time-conversion functions—for example, CTIME.DAYS or YRMODA. For a closely related alternative nonparametric analysis of survival times using the product-limit Kaplan-Meier estimator, see the KM command. For an analysis of survival times with covariates, including time-dependent covariates, see the COXREG command.

Options Collapse Hide details

Options

Life Tables. You can list the variables to be used in the analysis, including any control variables on the TABLE subcommand. You can also suppress the life tables in the output with the PRINT subcommand.

Intervals. SURVIVAL reports the percentage alive at various times after the initial event. You can select the time points for reporting with the INTERVAL subcommand.

Plots. You can plot the survival functions for all cases or separately for various subgroups with the PLOTS subcommand.

Comparisons. When control variables are listed on the TABLE subcommand, you can compare groups based on the Wilcoxon (Gehan) statistic using the COMPARE subcommand. You can request pairwise or approximate comparisons with the CALCULATE subcommand.

Writing a File. You can write the life tables, including the labeling information, to a file with the WRITE subcommand.

Basic Specification Collapse Hide details

Basic Specification

• The basic specification requires three subcommands: TABLE, INTERVAL, and STATUS. TABLE identifies at least one survival variable from the active dataset, INTERVAL divides the time period into intervals, and STATUS names a variable that indicates whether the event occurred.

• The basic specification prints one or more life tables, depending on the number of survival and control variables specified.

Subcommand Order Collapse Hide details

Subcommand Order

• TABLE must be first.

• Remaining subcommands can be named in any order.

Syntax Rules Collapse Hide details

Syntax Rules

• Only one TABLE subcommand can be specified, but multiple survival variables can be named. A survival variable cannot be specified as a control variable on any subcommands.

• Only one INTERVAL subcommand can be in effect on a SURVIVAL command. The interval specifications apply to all of the survival variables listed on TABLE. If multiple INTERVAL subcommands are used, the last specification supersedes all previous ones.

• Only one status variable can be listed on each STATUS subcommand. To specify multiple status variables, use multiple STATUS subcommands.

• You can specify multiple control variables on one BY keyword. Use a second BY keyword to specify second-order control variables to interact with the first-order control variables.

• All variables, including survival variables, control variables, and status variables, must be numeric. SURVIVAL does not process string variables.

Operations Collapse Hide details

Operations

• SURVIVAL computes time intervals according to specified interval widths, calculates the survival functions for each interval, and builds one life table for each group of survival variables. The life table is displayed unless explicitly suppressed.

• When the PLOTS subcommand is specified, SURVIVAL plots the survival functions for all cases or separately for various groups.

• When the COMPARE subcommand is specified, SURVIVAL compares survival-time distributions of different groups based on the Wilcoxon (Gehan) statistic.

Limitations Collapse Hide details

Limitations

• Maximum 20 survival variables.

• Maximum 100 control variables total on the first- and second-order control-variable lists combined.

• Maximum 20 THRU and BY specifications on INTERVAL.

• Maximum 35 values can appear on a plot.

Related Topics

SURVIVAL
Examples (SURVIVAL command)
TABLE Subcommand (SURVIVAL command)
INTERVAL Subcommand (SURVIVAL command)
STATUS Subcommand (SURVIVAL command)
PLOTS Subcommand (SURVIVAL command)
PRINT Subcommand (SURVIVAL command)
COMPARE Subcommand (SURVIVAL command)
CALCULATE Subcommand (SURVIVAL command)
Using Aggregated Data (SURVIVAL command)
MISSING Subcommand (SURVIVAL command)
WRITE Subcommand (SURVIVAL command)


Examples (SURVIVAL command)

SURVIVAL TABLE=MOSFREE BY TREATMNT(1,3)
  /STATUS = PRISON (1) FOR MOSFREE
  /INTERVAL = THRU 24 BY 3.

• The survival analysis is used to examine the length of time between release from prison and return to prison for prisoners in three treatment programs. The variable MOSFREE is the length of time in months a prisoner stayed out of prison. The variable TREATMNT indicates the treatment group for each case.

• A value of 1 on the variable PRISON indicates a terminal outcome—that is, cases coded as 1 have returned to prison. Cases with other non-negative values for PRISON have not returned. Because we don’t know their final outcome, such cases are called censored.

• Life tables are produced for each of the three subgroups. INTERVAL specifies that the survival experience be described every three months for the first two years.

Using Life Tables to Examine Customer Time to Churn

SURVIVAL
  TABLE=tenure  BY custcat(1 4)
  /INTERVAL=THRU 60 BY 3
  /STATUS=churn(1)
  /PRINT=TABLE
  /PLOTS ( SURVIVAL )=tenure  BY custcat
  /COMPARE=tenure  BY custcat  /CALCULATE PAIRWISE .

• The survival analysis is used to examine the number of months before a customer churns. The variable tenure is the length of time in months a person was a customer. The variable custcat indicates the customer category for each case.

• A value of 1 on the variable churn indicates a terminal outcome—that is, cases coded as 1 have churned. Cases with other non-negative values for churn have not returned. Because we don’t know their final outcome, such cases are called censored.

• Life tables are produced for each of the four subgroups. The INTERVAL subcommand specifies that the survival experience be described every three months for the first five years.

• The PLOTS subcommand produces plots of the cumulative survival distribution for tenure for the four values of custcat.

• The COMPARE and CALCULATE subcommands produce pairwise comparisons of the survival curves for tenure by the values of custcat.

For discussion of output from this syntax and to place the example in context, see Using Life Tables to Examine Customer Time to Churn .

Related Topics

SURVIVAL
Overview (SURVIVAL command)
TABLE Subcommand (SURVIVAL command)
INTERVAL Subcommand (SURVIVAL command)
STATUS Subcommand (SURVIVAL command)
PLOTS Subcommand (SURVIVAL command)
PRINT Subcommand (SURVIVAL command)
COMPARE Subcommand (SURVIVAL command)
CALCULATE Subcommand (SURVIVAL command)
Using Aggregated Data (SURVIVAL command)
MISSING Subcommand (SURVIVAL command)
WRITE Subcommand (SURVIVAL command)


TABLE Subcommand (SURVIVAL command)

SURVIVAL (command),SURVIVAL (command),SURVIVAL (command)
TABLE subcommand,TABLE subcommand,TABLE subcommand
TABLE (subcommand),TABLE (subcommand),TABLE (subcommand)
SURVIVAL command,SURVIVAL command,SURVIVAL command
SURVIVAL (command),SURVIVAL (command),SURVIVAL (command)
factor variables,factor variables,factor variables
SURVIVAL (command),SURVIVAL (command),SURVIVAL (command)
control variables,control variables,control variables
SURVIVAL (command),SURVIVAL (command),SURVIVAL (command)
survival time variable,survival time variable,survival time variable

TABLE identifies the survival and control variables to be included in the analysis.

BY (keyword),BY (keyword),BY (keyword)
SURVIVAL command,SURVIVAL command,SURVIVAL command

• The minimum specification is one or more survival variables.

• To specify one or more first-order control (or factor) variables, use the keyword BY followed by the control variable(s). First-order control variables are processed in sequence. For example, BY A(1,3) B(1,2) results in five groups (A=1, A=2, A=3, B=1, and B=2).

• You can specify one or more second-order control variables following a second BY keyword. Separate life tables are generated for each combination of values of the first-order and second-order controls. For example, BY A(1,3) BY B(1,2) results in six groups (A=1 B=1, A=1 B=2, A=2 B=1, A=2 B=2, A=3 B=1, and A=3, B=2).

• Each control variable must be followed by a value range in parentheses. These values must be integers separated by a comma or a blank. Non-integer values in the data are truncated, and the case is assigned to a subgroup based on the integer portion of its value on the variable. To specify only one value for a control variable, use the same value for the minimum and maximum.

• To generate life tables for all cases combined, as well as for control variables, use COMPUTE to create a variable that has the same value for all cases. With this variable as a control, tables for the entire set of cases, as well as for the control variables, will be produced.

Example

SURVIVAL TABLE = MOSFREE BY TREATMNT(1,3) BY RACE(1,2)
  /STATUS = PRISON(1)
  /INTERVAL = THRU 24 BY 3.

• MOSFREE is the survival variable, and TREATMNT is the first-order control variable. The second BY defines RACE as a second-order control group having a value of 1 or 2.

• Six life tables with the median survival time are produced, one for each pair of values for the two control variables.

Related Topics

SURVIVAL
Overview (SURVIVAL command)
Examples (SURVIVAL command)
INTERVAL Subcommand (SURVIVAL command)
STATUS Subcommand (SURVIVAL command)
PLOTS Subcommand (SURVIVAL command)
PRINT Subcommand (SURVIVAL command)
COMPARE Subcommand (SURVIVAL command)
CALCULATE Subcommand (SURVIVAL command)
Using Aggregated Data (SURVIVAL command)
MISSING Subcommand (SURVIVAL command)
WRITE Subcommand (SURVIVAL command)


INTERVAL Subcommand (SURVIVAL command)

SURVIVAL (command),SURVIVAL (command),SURVIVAL (command)
INTERVAL subcommand,INTERVAL subcommand,INTERVAL subcommand
INTERVAL (subcommand),INTERVAL (subcommand),INTERVAL (subcommand)
SURVIVAL command,SURVIVAL command,SURVIVAL command
SURVIVAL (command),SURVIVAL (command),SURVIVAL (command)
time intervals,time intervals,time intervals
THRU (keyword),THRU (keyword),THRU (keyword)
SURVIVAL command,SURVIVAL command,SURVIVAL command

INTERVAL determines the period of time to be examined and how the time will be grouped for the analysis. The interval specifications apply to all of the survival variables listed on TABLE.

• SURVIVAL always uses 0 as the starting point for the first interval. Do not specify the 0. The INTERVAL specification must begin with the keyword THRU.

• Specify the terminal value of the time period after the keyword THRU. The final interval includes any observations that exceed the specified terminal value.

• The grouping increment, which follows the keyword BY, must be in the same units as the survival variable.

• The period to be examined can be divided into intervals of varying lengths by repeating the THRU and BY keywords. The period must be divided in ascending order. If the time period is not a multiple of the increment, the endpoint of the period is adjusted upward to the next even multiple of the grouping increment.

• When the period is divided into intervals of varying lengths by repeating the THRU and BY specifications, the adjustment of one period to produce even intervals changes the starting point of subsequent periods. If the upward adjustment of one period completely overlaps the next period, no adjustment is made and the procedure terminates with an error.

Example

SURVIVAL TABLE = MOSFREE BY TREATMNT(1,3)
  /STATUS = PRISON(1) FOR MOSFREE
  /INTERVAL = THRU 12 BY 1 THRU 24 BY 3.

• INTERVAL produces life tables computed from 0 to 12 months at one-month intervals and from 13 to 24 months at three-month intervals.

Example

SURVIVAL  ONSSURV BY TREATMNT (1,3)
  /STATUS = OUTCOME (3,4) FOR ONSSURV
  /INTERVAL = THRU 50 BY 6.

• On the INTERVAL subcommand, the value following BY (6) does not divide evenly into the period to which it applies (50). Thus, the endpoint of the period is adjusted upward to the next even multiple of the BY value, resulting in a period of 54 with 9 intervals of 6 units each.

Example

SURVIVAL  ONSSURV BY TREATMNT (1,3)
  /STATUS = OUTCOME (3,4) FOR ONSSURV
  /INTERVAL = THRU 50 BY 6 THRU 100 BY 10 THRU 200 BY 20.

• Multiple THRU and BY specifications are used on the INTERVAL subcommand to divide the period of time under examination into intervals of different lengths.

• The first THRU and BY specifications are adjusted to produce even intervals as in the previous example. As a result, the following THRU and BY specifications are automatically readjusted to generate 5 intervals of 10 units (through 104), followed by 5 intervals of 20 units (through 204).

Related Topics

SURVIVAL
Overview (SURVIVAL command)
Examples (SURVIVAL command)
TABLE Subcommand (SURVIVAL command)
STATUS Subcommand (SURVIVAL command)
PLOTS Subcommand (SURVIVAL command)
PRINT Subcommand (SURVIVAL command)
COMPARE Subcommand (SURVIVAL command)
CALCULATE Subcommand (SURVIVAL command)
Using Aggregated Data (SURVIVAL command)
MISSING Subcommand (SURVIVAL command)
WRITE Subcommand (SURVIVAL command)


STATUS Subcommand (SURVIVAL command)

SURVIVAL (command),SURVIVAL (command),SURVIVAL (command)
STATUS subcommand,STATUS subcommand,STATUS subcommand
STATUS (subcommand),STATUS (subcommand),STATUS (subcommand)
SURVIVAL command,SURVIVAL command,SURVIVAL command

To determine whether the terminal event has occurred for a particular observation, SURVIVAL checks the value of a status variable. STATUS lists the status variable associated with each survival variable and the codes that indicate that a terminal event occurred.

FOR (keyword),FOR (keyword),FOR (keyword)
SURVIVAL command,SURVIVAL command,SURVIVAL command

• Specify a status variable followed by a value range enclosed in parentheses. The value range identifies the codes that indicate that the terminal event has taken place. All cases with non-negative times that do not have a code in the value range are classified as censored cases, which are cases for which the terminal event has not yet occurred.

• If the status variable does not apply to all the survival variables, specify FOR and the name of the survival variable(s) to which the status variable applies.

• Each survival variable on TABLE must have an associated status variable identified by a STATUS subcommand.

• Only one status variable can be listed on each STATUS subcommand. To specify multiple status variables, use multiple STATUS subcommands.

• If FOR is omitted on the STATUS specification, the status-variable specification applies to all of the survival variables not named on another STATUS subcommand.

• If more than one STATUS subcommand omits the keyword FOR, the final STATUS subcommand without FOR applies to all survival variables not specified by FOR on other STATUS subcommands. No warning is printed.

Example

SURVIVAL  ONSSURV BY TREATMNT (1,3)
  /INTERVAL = THRU 50 BY 5, THRU 100 BY 10
  /STATUS = OUTCOME (3,4) FOR ONSSURV.

• STATUS specifies that a code of 3 or 4 on OUTCOME means that the terminal event for the survival variable ONSSURV occurred.

Example

SURVIVAL TABLE = NOARREST MOSFREE BY TREATMNT(1,3)
  /STATUS = ARREST (1) FOR NOARREST
  /STATUS = PRISON (1)
  /INTERVAL=THRU 24 BY 3.

• STATUS defines the terminal event for NOARREST as a value of 1 for ARREST. Any other value for ARREST is considered censored.

• The second STATUS subcommand defines the value of 1 for PRISON as the terminal event. The keyword FOR is omitted. Thus, the status-variable specification applies to MOSFREE, which is the only survival variable not named on another STATUS subcommand.

Related Topics

SURVIVAL
Overview (SURVIVAL command)
Examples (SURVIVAL command)
TABLE Subcommand (SURVIVAL command)
INTERVAL Subcommand (SURVIVAL command)
PLOTS Subcommand (SURVIVAL command)
PRINT Subcommand (SURVIVAL command)
COMPARE Subcommand (SURVIVAL command)
CALCULATE Subcommand (SURVIVAL command)
Using Aggregated Data (SURVIVAL command)
MISSING Subcommand (SURVIVAL command)
WRITE Subcommand (SURVIVAL command)


PLOTS Subcommand (SURVIVAL command)

SURVIVAL (command),SURVIVAL (command),SURVIVAL (command)
PLOTS subcommand,PLOTS subcommand,PLOTS subcommand
PLOTS (subcommand),PLOTS (subcommand),PLOTS (subcommand)
SURVIVAL command,SURVIVAL command,SURVIVAL command

PLOTS produces plots of the cumulative survival distribution, the hazard function, and the probability density function. The PLOTS subcommand can plot only the survival functions generated by the TABLE subcommand; PLOTS cannot eliminate control variables.

• When specified by itself, the PLOTS subcommand produces all available plots for each survival variable. Points on each plot are identified by values of the first-order control variables. If second-order controls are used, a separate plot is generated for every value of the second-order control variables.

• To request specific plots, specify, in parentheses following PLOTS, any combination of the keywords defined below.

• Optionally, generate plots for only a subset of the requested life tables. Use the same syntax as used on the TABLE subcommand for specifying survival and control variables, omitting the value ranges. Each survival variable named on PLOTS must have as many control levels as were specified for that variable on TABLE. However, only one control variable needs to be present for each level. If a required control level is missing on the PLOTS specification, the default BY ALL is used for that level. The keyword ALL can be used to refer to an entire set of survival or control variables.

• To determine the number of plots that will be produced, multiply the number of functions plotted by the number of survival variables times the number of first-order controls times the number of distinct values represented in all of the second-order controls.

survival plots,survival plots,survival plots
SURVIVAL command,SURVIVAL command,SURVIVAL command
LOGSURV (keyword),LOGSURV (keyword),LOGSURV (keyword)
SURVIVAL command,SURVIVAL command,SURVIVAL command
SURVIVAL (keyword),SURVIVAL (keyword),SURVIVAL (keyword)
SURVIVAL command,SURVIVAL command,SURVIVAL command
hazard plots,hazard plots,hazard plots
SURVIVAL command,SURVIVAL command,SURVIVAL command
HAZARD (keyword),HAZARD (keyword),HAZARD (keyword)
SURVIVAL command,SURVIVAL command,SURVIVAL command
density function plots,density function plots,density function plots
SURVIVAL command,SURVIVAL command,SURVIVAL command
DENSITY (keyword),DENSITY (keyword),DENSITY (keyword)
SURVIVAL command,SURVIVAL command,SURVIVAL command
OMS (keyword),OMS (keyword),OMS (keyword)
SURVIVAL command,SURVIVAL command,SURVIVAL command
one-minus-survival plots,one-minus-survival plots,one-minus-survival plots
SURVIVAL command,SURVIVAL command,SURVIVAL command
ALL | Plot all available functions. ALL is the default if PLOTS is used without specifications.
LOGSURV | Plot the cumulative survival distribution on a logarithmic scale.
SURVIVAL | Plot the cumulative survival distribution on a linear scale.
HAZARD | Plot the hazard function.
DENSITY | Plot the density function.
OMS | Plot the one-minus-survival function.

Example

SURVIVAL TABLE = NOARREST MOSFREE BY TREATMNT(1,3)
  /STATUS = ARREST (1) FOR NOARREST
  /STATUS = PRISON (1) FOR MOSFREE
  /INTERVAL = THRU 24 BY 3
  /PLOTS (SURVIVAL,HAZARD) = MOSFREE.

• Separate life tables are produced for each of the survival variables (NOARREST and MOSFREE) for each of the three values of the control variable TREATMNT.

• PLOTS produces plots of the cumulative survival distribution and the hazard rate for MOSFREE for the three values of TREATMNT (even though TREATMNT is not included on the PLOTS specification).

• Because plots are requested only for the survival variable MOSFREE, no plots are generated for the variable NOARREST.

Related Topics

SURVIVAL
Overview (SURVIVAL command)
Examples (SURVIVAL command)
TABLE Subcommand (SURVIVAL command)
INTERVAL Subcommand (SURVIVAL command)
STATUS Subcommand (SURVIVAL command)
PRINT Subcommand (SURVIVAL command)
COMPARE Subcommand (SURVIVAL command)
CALCULATE Subcommand (SURVIVAL command)
Using Aggregated Data (SURVIVAL command)
MISSING Subcommand (SURVIVAL command)
WRITE Subcommand (SURVIVAL command)


PRINT Subcommand (SURVIVAL command)

PRINT (subcommand),PRINT (subcommand),PRINT (subcommand)
SURVIVAL command,SURVIVAL command,SURVIVAL command
SURVIVAL (command),SURVIVAL (command),SURVIVAL (command)
PRINT subcommand,PRINT subcommand,PRINT subcommand

By default, SURVIVAL prints life tables. PRINT can be used to suppress the life tables.

TABLE (keyword),TABLE (keyword),TABLE (keyword)
SURVIVAL command,SURVIVAL command,SURVIVAL command
NOTABLE (keyword),NOTABLE (keyword),NOTABLE (keyword)
SURVIVAL command,SURVIVAL command,SURVIVAL command
TABLE | Print the life tables. This is the default.
NOTABLE | Suppress the life tables. Only plots and comparisons are printed. The WRITE subcommand, which is used to write the life tables to a file, can be used when NOTABLE is in effect.

Example

SURVIVAL TABLE = MOSFREE BY TREATMNT(1,3)
  /STATUS = PRISON (1) FOR MOSFREE
  /INTERVAL = THRU 24 BY 3
  /PLOTS (ALL)
  /PRINT = NOTABLE.

• PRINT NOTABLE suppresses the printing of life tables.

Related Topics

SURVIVAL
Overview (SURVIVAL command)
Examples (SURVIVAL command)
TABLE Subcommand (SURVIVAL command)
INTERVAL Subcommand (SURVIVAL command)
STATUS Subcommand (SURVIVAL command)
PLOTS Subcommand (SURVIVAL command)
COMPARE Subcommand (SURVIVAL command)
CALCULATE Subcommand (SURVIVAL command)
Using Aggregated Data (SURVIVAL command)
MISSING Subcommand (SURVIVAL command)
WRITE Subcommand (SURVIVAL command)


COMPARE Subcommand (SURVIVAL command)

SURVIVAL (command),SURVIVAL (command),SURVIVAL (command)
COMPARE subcommand,COMPARE subcommand,COMPARE subcommand
COMPARE (subcommand),COMPARE (subcommand),COMPARE (subcommand)
SURVIVAL command,SURVIVAL command,SURVIVAL command

COMPARE compares the survival experience of subgroups defined by the control variables. At least one first-order control variable is required for calculating comparisons.

• When specified by itself, the COMPARE subcommand produces comparisons using the TABLE variable list.

• Alternatively, specify the survival and control variables for the comparisons. Use the same syntax as used on the TABLE subcommand for specifying survival and control variables, omitting the value ranges. Only variables that appear on the TABLE subcommand can be listed on COMPARE, and their role as survival, first-order, and second-order control variables cannot be altered. The keyword TO can be used to refer to a group of variables, and the keyword ALL can be used to refer to an entire set of survival or control variables.

• By default, COMPARE calculates exact comparisons between subgroups. Use the CALCULATE subcommand to obtain pairwise comparisons or approximate comparisons.

Example

SURVIVAL TABLE = MOSFREE BY TREATMNT(1,3)
  /STATUS = PRISON (1) FOR MOSFREE
  /INTERVAL = THRU 24 BY 3
  /COMPARE.

• COMPARE computes the Wilcoxon (Gehan) statistic, degrees of freedom, and observed significance level for the hypothesis that the three survival curves based on the values of TREATMNT are identical.

Example

SURVIVAL TABLE=ONSSURV,RECSURV BY TREATMNT(1,3)
  /STATUS = RECURSIT(1,9) FOR RECSURV
  /STATUS = STATUS(3,4) FOR ONSSURV
  /INTERVAL = THRU 50 BY 5 THRU 100 BY 10
  /COMPARE = ONSSURV BY TREATMNT.

• COMPARE requests a comparison of ONSSURV by TREATMNT. No comparison is made of RECSURV by TREATMNT.

Related Topics

SURVIVAL
Overview (SURVIVAL command)
Examples (SURVIVAL command)
TABLE Subcommand (SURVIVAL command)
INTERVAL Subcommand (SURVIVAL command)
STATUS Subcommand (SURVIVAL command)
PLOTS Subcommand (SURVIVAL command)
PRINT Subcommand (SURVIVAL command)
CALCULATE Subcommand (SURVIVAL command)
Using Aggregated Data (SURVIVAL command)
MISSING Subcommand (SURVIVAL command)
WRITE Subcommand (SURVIVAL command)


CALCULATE Subcommand (SURVIVAL command)

CALCULATE (subcommand),CALCULATE (subcommand),CALCULATE (subcommand)
SURVIVAL command,SURVIVAL command,SURVIVAL command
SURVIVAL (command),SURVIVAL (command),SURVIVAL (command)
CALCULATE subcommand,CALCULATE subcommand,CALCULATE subcommand

CALCULATE controls the comparisons of survival for subgroups specified on the COMPARE subcommand.

• The minimum specification is the subcommand keyword by itself. EXACT is the default.

• Only one of the keywords EXACT, APPROXIMATE, and CONDITIONAL can be specified. If more than one keyword is used, only one is in effect. The order of precedence is APPROXIMATE, CONDITIONAL, and EXACT.

• The keywords PAIRWISE and COMPARE can be used with any of the EXACT, APPROXIMATE, or CONDITIONAL keywords.

• If CALCULATE is used without the COMPARE subcommand, CALCULATE is ignored. However, if the keyword COMPARE is specified on CALCULATE and the COMPARE subcommand is omitted, an error message is generated.

• Data can be entered into SURVIVAL for each individual case or aggregated for all cases in an interval. The way in which data are entered determines whether an exact or an approximate comparison is most appropriate. See the topic Using Aggregated Data (SURVIVAL command) for more information. .

EXACT (keyword),EXACT (keyword),EXACT (keyword)
SURVIVAL command,SURVIVAL command,SURVIVAL command
APPROXIMATE (keyword),APPROXIMATE (keyword),APPROXIMATE (keyword)
SURVIVAL command,SURVIVAL command,SURVIVAL command
CONDITIONAL (keyword),CONDITIONAL (keyword),CONDITIONAL (keyword)
SURVIVAL command,SURVIVAL command,SURVIVAL command
PAIRWISE (keyword),PAIRWISE (keyword),PAIRWISE (keyword)
SURVIVAL command,SURVIVAL command,SURVIVAL command
COMPARE (keyword),COMPARE (keyword),COMPARE (keyword)
SURVIVAL command,SURVIVAL command,SURVIVAL command
EXACT | Calculate exact comparisons. This is the default. You can obtain exact comparisons based on the survival experience of each observation with individual data. While this method is the most accurate, it requires that all of the data be in memory simultaneously. Thus, exact comparisons may be impractical for large samples. It is also inappropriate when individual data are not available and data aggregated by interval must be used.
APPROXIMATE | Calculate approximate comparisons only. Approximate comparisons are appropriate for aggregated data. The approximate-comparison approach assumes that all events occur at the midpoint of the interval. With exact comparisons, some of these midpoint ties can be resolved. However, if interval widths are not too great, the difference between exact and approximate comparisons should be small.
CONDITIONAL | Calculate approximate comparisons if memory is insufficient. Approximate comparisons are produced only if there is insufficient memory available for exact comparisons.
PAIRWISE | Perform pairwise comparisons. Comparisons of all pairs of values of the first-order control variable are produced along with the overall comparison.
COMPARE | Produce comparisons only. Survival tables specified on the TABLE subcommand are not computed, and requests for plots are ignored. This allows all available workspace to be used for comparisons. The WRITE subcommand cannot be used when this specification is in effect.

Example

SURVIVAL TABLE = MOSFREE BY TREATMNT(1,3)
  /STATUS = PRISON (1) FOR MOSFREE
  /INTERVAL = THRU 24 BY 3
  /COMPARE /CALCULATE = PAIRWISE.

• PAIRWISE on CALCULATE computes the Wilcoxon (Gehan) statistic, degrees of freedom, and observed significance levels for each pair of values of TREATMNT, as well as for an overall comparison of survival across all three TREATMNT subgroups: group 1 with group 2, group 1 with group 3, and group 2 with group 3.

• All comparisons are exact comparisons.

Example

SURVIVAL TABLE = MOSFREE BY TREATMNT(1,3)
  /STATUS = PRISON (1) FOR MOSFREE
  /INTERVAL = THRU 24 BY 3
  /COMPARE /CALCULATE = APPROXIMATE COMPARE.

• APPROXIMATE on CALCULATE computes the Wilcoxon (Gehan) statistic, degrees of freedom, and probability for the overall comparison of survival across all three TREATMNT subgroups using the approximate method.

• Because the keyword COMPARE is specified on CALCULATE, survival tables are not computed.

Related Topics

SURVIVAL
Overview (SURVIVAL command)
Examples (SURVIVAL command)
TABLE Subcommand (SURVIVAL command)
INTERVAL Subcommand (SURVIVAL command)
STATUS Subcommand (SURVIVAL command)
PLOTS Subcommand (SURVIVAL command)
PRINT Subcommand (SURVIVAL command)
COMPARE Subcommand (SURVIVAL command)
Using Aggregated Data (SURVIVAL command)
MISSING Subcommand (SURVIVAL command)
WRITE Subcommand (SURVIVAL command)


Using Aggregated Data (SURVIVAL command)

SURVIVAL (command),SURVIVAL (command),SURVIVAL (command)
aggregated data,aggregated data,aggregated data
aggregated data,aggregated data,aggregated data
SURVIVAL command,SURVIVAL command,SURVIVAL command

When aggregated survival information is available, the number of censored and uncensored cases at each time point must be entered. Up to two records can be entered for each interval, one for censored cases and one for uncensored cases. The number of cases included on each record is used as the weight factor. If control variables are used, there will be up to two records (one for censored and one for uncensored cases) for each value of the control variable in each interval. These records must contain the value of the control variable and the number of cases that belong in the particular category as well as values for survival time and status.

Example

DATA LIST  / SURVEVAR 1-2 STATVAR 4 SEX 6 COUNT 8.
VALUE LABELS  STATVAR 1 'DECEASED' 2 'ALIVE'
              /SEX 1 'FEMALE' 2 'MALE'.
BEGIN DATA
 1 1 1 6
 1 1 1 1
 1 2 2 2
 1 1 2 1
 2 2 1 1
 2 1 1 2
 2 2 2 1
 2 1 2 3
   ...
END DATA.
WEIGHT COUNT.
SURVIVAL TABLE = SURVEVAR BY SEX (1,2)
  /INTERVAL = THRU 10 BY 1
  /STATUS = STATVAR (1) FOR SURVEVAR.

• This example reads aggregated data and performs a SURVIVAL analysis when a control variable with two values is used.

• The first data record has a code of 1 on the status variable STATVAR, indicating that it is an uncensored case, and a code of 1 on SEX, the control variable. The number of cases for this interval is 6, the value of the variable COUNT. Intervals with weights of 0 do not have to be included.

• COUNT is not used in SURVIVAL but is the weight variable. In this example, each interval requires four records to provide all of the data for each SURVEVAR interval.

Related Topics

SURVIVAL
Overview (SURVIVAL command)
Examples (SURVIVAL command)
TABLE Subcommand (SURVIVAL command)
INTERVAL Subcommand (SURVIVAL command)
STATUS Subcommand (SURVIVAL command)
PLOTS Subcommand (SURVIVAL command)
PRINT Subcommand (SURVIVAL command)
COMPARE Subcommand (SURVIVAL command)
CALCULATE Subcommand (SURVIVAL command)
MISSING Subcommand (SURVIVAL command)
WRITE Subcommand (SURVIVAL command)


MISSING Subcommand (SURVIVAL command)

SURVIVAL (command),SURVIVAL (command),SURVIVAL (command)
MISSING subcommand,MISSING subcommand,MISSING subcommand
MISSING (subcommand),MISSING (subcommand),MISSING (subcommand)
SURVIVAL command,SURVIVAL command,SURVIVAL command
SURVIVAL (command),SURVIVAL (command),SURVIVAL (command)
missing values,missing values,missing values
missing values,missing values,missing values
SURVIVAL command,SURVIVAL command,SURVIVAL command

MISSING controls missing-value treatments. The default is GROUPWISE.

• Negative values on the survival variables are automatically treated as missing data. In addition, cases outside of the value range on a control variable are excluded.

• GROUPWISE and LISTWISE are mutually exclusive. However, each can be used with INCLUDE.

GROUPWISE (keyword),GROUPWISE (keyword),GROUPWISE (keyword)
SURVIVAL command,SURVIVAL command,SURVIVAL command
LISTWISE (keyword),LISTWISE (keyword),LISTWISE (keyword)
SURVIVAL command,SURVIVAL command,SURVIVAL command
INCLUDE (keyword),INCLUDE (keyword),INCLUDE (keyword)
SURVIVAL command,SURVIVAL command,SURVIVAL command
GROUPWISE | Exclude missing values groupwise. Cases with missing values on a variable are excluded from any calculation involving that variable. This is the default.
LISTWISE | Exclude missing values listwise. Cases missing on any variables named on TABLE are excluded from the analysis.
INCLUDE | Include user-missing values. User-missing values are included in the analysis.

Related Topics

SURVIVAL
Overview (SURVIVAL command)
Examples (SURVIVAL command)
TABLE Subcommand (SURVIVAL command)
INTERVAL Subcommand (SURVIVAL command)
STATUS Subcommand (SURVIVAL command)
PLOTS Subcommand (SURVIVAL command)
PRINT Subcommand (SURVIVAL command)
COMPARE Subcommand (SURVIVAL command)
CALCULATE Subcommand (SURVIVAL command)
Using Aggregated Data (SURVIVAL command)
WRITE Subcommand (SURVIVAL command)


WRITE Subcommand (SURVIVAL command)

SURVIVAL (command),SURVIVAL (command),SURVIVAL (command)
output file,output file,output file
SURVIVAL (command),SURVIVAL (command),SURVIVAL (command)
WRITE subcommand,WRITE subcommand,WRITE subcommand
WRITE (subcommand),WRITE (subcommand),WRITE (subcommand)
SURVIVAL command,SURVIVAL command,SURVIVAL command

WRITE writes data in the survival tables to a file. This file can be used for further analyses or to produce graphics displays.

• When WRITE is omitted, the default is NONE. No output file is created.

• When WRITE is used, a PROCEDURE OUTPUT command must precede the SURVIVAL command. The OUTFILE subcommand on PROCEDURE OUTPUT specifies the output file.

• When WRITE is specified without a keyword, the default is TABLES.

NONE (keyword),NONE (keyword),NONE (keyword)
SURVIVAL command,SURVIVAL command,SURVIVAL command
SURVIVAL (command),SURVIVAL (command),SURVIVAL (command)
saving survival table data,saving survival table data,saving survival table data
TABLES (keyword),TABLES (keyword),TABLES (keyword)
SURVIVAL command,SURVIVAL command,SURVIVAL command
BOTH (keyword),BOTH (keyword),BOTH (keyword)
SURVIVAL command,SURVIVAL command,SURVIVAL command
NONE | Do not write procedure output to a file. This is the default when WRITE is omitted.
TABLES | Write survival-table data records. All survival-table statistics are written to a file.
BOTH | Write out survival-table data and label records. Variable names, variable labels, and value labels are written out along with the survival table statistics.

Related Topics

SURVIVAL
Overview (SURVIVAL command)
Examples (SURVIVAL command)
TABLE Subcommand (SURVIVAL command)
INTERVAL Subcommand (SURVIVAL command)
STATUS Subcommand (SURVIVAL command)
PLOTS Subcommand (SURVIVAL command)
PRINT Subcommand (SURVIVAL command)
COMPARE Subcommand (SURVIVAL command)
CALCULATE Subcommand (SURVIVAL command)
Using Aggregated Data (SURVIVAL command)
MISSING Subcommand (SURVIVAL command)
Format (SURVIVAL command)
Record Order (SURVIVAL command)


Format (SURVIVAL command)

WRITE writes five types of records. The keyword TABLES writes record types 30, 31, and 40. The keyword BOTH writes record types 10, 20, 30, 31, and 40. The format of each record type is described in the following tables.

Record type 10, produced only by keyword BOTH
Columns | Content | Format
1–2 | Record type (10) | F2.0
3–7 | Table number | F5.0
8–15 | Name of survival variable | A8
16–55 | Variable label of survival variable | A40
56 | Number of BY’s (0, 1, or 2) | F1.0
57–60 | Number of rows in current survival table | F4.0

• One type-10 record is produced for each life table.

• Column 56 specifies the number of orders of control variables (0, 1, or 2) that have been applied to the life table.

• Columns 57–60 specify the number of rows in the life table. This number is the number of intervals in the analysis that show subjects entering; intervals in which no subjects enter are not noted in the life tables.

Record type 20, produced by keyword BOTH
Columns | Content | Format
1–2 | Record type (20) | F2.0
3–7 | Table number | F5.0
8–15 | Name of control variable | A8
16–55 | Variable label of control variable | A40
56–60 | Value of control variable | F5.0
61–80 | Value label for this value | A20

• One type-20 record is produced for each control variable in each life table.

• If only first-order controls have been placed in the survival analysis, one type-20 record will be produced for each table. If second-order controls have also been applied, two type-20 records will be produced per table.

Record type 30, produced by both keywords TABLES and BOTH
Columns | Content | Format
1–2 | Record type (30) | F2.0
3–7 | Table number | F5.0
8–13 | Beginning of interval | F6.2
14–21 | Number entering interval | F8.2
22–29 | Number withdrawn in interval | F8.2
30–37 | Number exposed to risk | F8.2
38–45 | Number of terminal events | F8.2

• Information on record type 30 continues on record type 31. Each pair of type-30 and type-31 records contains the information from one line of the life table.

Record type 31, continuation of record type 30
Columns | Content | Format
1–2 | Record type (31) | F2.0
3–7 | Table number | F5.0
8–15 | Proportion terminating | F8.6
16–23 | Proportion surviving | F8.6
24–31 | Cumulative proportion surviving | F8.6
32–39 | Probability density | F8.6
40–47 | Hazard rate | F8.6
48–54 | S.E. of cumulative proportion surviving | F7.4
55–61 | S.E. of probability density | F7.4
62–68 | S.E. of hazard rate | F7.4

• Record type 31 is a continuation of record type 30.

• As many type-30 and type-31 record pairs are output for a table as it has lines (this number is noted in columns 57–60 of the type-10 record for the table).

Record type 40, produced by both keywords TABLES and BOTH
Columns | Content | Format
1–2 | Record type (40) | F2.0

• Type-40 records indicate the completion of the series of records for one life table.

Related Topics

WRITE Subcommand (SURVIVAL command)
Record Order (SURVIVAL command)


Record Order (SURVIVAL command)

The SURVIVAL output file contains records for each of the life tables specified on the TABLE subcommand. All records for a given table are produced together in sequence. The records for the life tables are produced in the same order as the tables themselves. All life tables for the first survival variable are written first. The values of the first- and second-order control variables rotate, with the values of the first-order controls changing more rapidly.

Example

PROCEDURE OUTPUT OUTFILE = SURVTBL.
SURVIVAL TABLE = MOSFREE BY TREATMNT(1,3)
  /STATUS = PRISON (1) FOR MOSFREE
  /INTERVAL = THRU 24 BY 3
  /WRITE = BOTH.

• WRITE generates a procedure output file called SURVTBL, containing life tables, variable names and labels, and value labels stored as record types 10, 20, 30, 31, and 40.

Related Topics

WRITE Subcommand (SURVIVAL command)
Format (SURVIVAL command)


SYSFILE INFO

SYSFILE INFO (command),SYSFILE INFO (command),SYSFILE INFO (command)
SYSFILE INFO (command),SYSFILE INFO (command),SYSFILE INFO (command)
syntax chart,syntax chart,syntax chart
data files,data files,data files
file information,file information,file information
file information,file information,file information
PASW Statistics data files,PASW Statistics data files,PASW Statistics data files
SYSFILE INFO [FILE=] 'file specification'

This command takes effect immediately. It does not read the active dataset or execute pending transformations. See the topic Command Order for more information.

Syntax for the SYSFILE INFO command can be generated from the File menu by choosing Display Data File Information and External File.

Example

SYSFILE INFO FILE='PERSNL.SAV'.

Related Topics

Overview (SYSFILE INFO command)


Overview (SYSFILE INFO command)

FILE (keyword),FILE (keyword),FILE (keyword)
SYSFILE INFO command,SYSFILE INFO command,SYSFILE INFO command

SYSFILE INFO displays complete dictionary information for all variables in an external PASW Statistics data file. You do not have to retrieve the file withGET to use SYSFILE INFO. If the file has already been retrieved, use DISPLAY DICTIONARY to display dictionary information.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is the command keyword and a complete file specification that is enclosed in quotes.

Syntax Rules Collapse Hide details

Syntax Rules

• Only one file specification is allowed per command. To display dictionary information for more than one PASW Statistics data file, use multiple SYSFILE INFO commands.

• The file extension, if there is one, must be specified, even if it is the default.

• The subcommand keyword FILE is optional. When FILE is specified, the equals sign is required.

Operations Collapse Hide details

Operations

• No procedure is needed to execute SYSFILE INFO, because SYSFILE INFO obtains information from the dictionary alone.

• SYSFILE INFO displays file and variable information. File information includes number of variables and cases in the file; file label; file documents; defined multiple response sets; variable sets; and information that is used by other applications (such as PASW Modeler, Data Entry for Windows, and TextSmart). Variable information includes the variable name; label; sequential position in the file; print and write format; missing values; and value labels for each variable in the specified file.

Related Topics

SYSFILE INFO


TABLES Command Syntax

Tables,Tables,Tables
command syntax,command syntax,command syntax

The TABLES procedure requires a special license that is not available to all users.

TABLES
Global subcommands:
 /AUTOLABEL {DEFAULT}
            {ON     }
            {OFF    }
for customized boxes use:
 /FORMAT=[{BLANK}][MISSING ({'.'    })]
          {ZERO }           {'chars'}
 /TITLE=['line'...]
 /CAPTION=['line'...]
  where 'line' can include )DATE
 /OBSERVATION=varlist
 /MDGROUP=varname['label'] varlist[{value   ]
                                   {'chars'}
 /MRGROUP=varname['label'] varlist
 /PTOTAL = varname ['label'] varname ...
 /FTOTAL = varname ['label'] varname ...
 /MISSING = {EXCLUDE}
            {INCLUDE}
 /BASE = {ANSWERING} /GBASE = {CASES    }
         {QUALIFIED}          {RESPONSES}
         {ALL      }
Local subcommands:
 /TABLE = rows [BY columns [BY layers]]
 /STATISTICS = [{UNWEIGHTED}]
                {U         }
   function[([varname][(fmt)]['label'] varname...]
   function...
 for function, use:
  COUNT, SUM, MINIMUM, MAXIMUM,
  MEAN, STDDEV, RANGE, SEMEAN,
  VARIANCE, MEDIAN*, MODE*, PTILE value*,
  VALIDN, CASES, and RESPONSES
      *Not available with /SORT.
 for percentage functions, use:
  {CPCT}[([varname][(fmt)]['label']..[:basevarlist])]
  {RPCT}
  {SPCT}
  {VPCT}
 for format, use:
   Fw.d, DOLLARw.d, COMMAw.d, PCTw.d,
   PARENw.d, PCTPARENw.d,
   NEGPARENw.d, and NEQUALw.d
 /SORT=[{DESCENDING}] varname [(function[(vrname)])] [varname..]
        {ASCENDING }
 /TITLE   =[ 'line' 'line'...]
 /CORNER = ['line' 'line'...]


TDISPLAY

TDISPLAY (command),TDISPLAY (command),TDISPLAY (command)
TDISPLAY (command),TDISPLAY (command),TDISPLAY (command)
syntax chart,syntax chart,syntax chart
model file,model file,model file
displaying information,displaying information,displaying information
TDISPLAY  [{ALL          }]
           {model names  }
           {command names}

[/TYPE={MODEL**}]
       {COMMAND}

**Default if the subcommand is omitted.

This command takes effect immediately. It does not read the active dataset or execute pending transformations. See the topic Command Order for more information.

Example

TDISPLAY.

Related Topics

Overview (TDISPLAY command)
TYPE Subcommand (TDISPLAY command)
MODEL NAME
READ MODEL
SAVE MODEL


Overview (TDISPLAY command)

TDISPLAY displays information about currently active models. These models are automatically generated by a number of procedures for use with the APPLY subcommand.

Options Collapse Hide details

Options

If models are specified on TDISPLAY, information about only those models is displayed. You can use the TYPE subcommand to control whether models are specified by model name or by the name of the procedure that generated them.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is simply the command keyword TDISPLAY.

• By default, TDISPLAY produces a list of all currently active models. The list includes the model names, the commands that created each model, model labels (if specified), and creation dates and times.

Syntax Rules Collapse Hide details

Syntax Rules

• To display information about a subset of active models, specify those models after TDISPLAY.

• Models can be specified by using individual model names or the names of the procedures that created them. To use procedure names, you must specify the TYPE subcommand with the keyword COMMAND.

• Model names are either the default MOD_n names or the names that are assigned with MODEL NAME.

• If procedure names are specified, all models that are created by those procedures are displayed.

• Model names and procedure names cannot be mixed on the same TDISPLAY command.

• You can specify the keyword ALL after TDISPLAY to display all models that are currently active. This setting is the default.

Operations Collapse Hide details

Operations

• Only currently active models are displayed.

• The following procedures can generate models that can be displayed with the TDISPLAY command: AREG, ARIMA, EXSMOOTH, SEASON, and SPECTRA in the Forecasting add-on module; ACF, CASEPLOT, CCF, CURVEFIT, PACF, PPLOT, and TSPLOT in the Core system; and WLS and 2SLS in the Regression add-on module.

Related Topics

TDISPLAY
TYPE Subcommand (TDISPLAY command)


TYPE Subcommand (TDISPLAY command)

TYPE (subcommand),TYPE (subcommand),TYPE (subcommand)
TDISPLAY command,TDISPLAY command,TDISPLAY command
TDISPLAY (command),TDISPLAY (command),TDISPLAY (command)
TYPE subcommand,TYPE subcommand,TYPE subcommand
MODEL (keyword),MODEL (keyword),MODEL (keyword)
TDISPLAY command,TDISPLAY command,TDISPLAY command
COMMAND (keyword),COMMAND (keyword),COMMAND (keyword)
TDISPLAY command,TDISPLAY command,TDISPLAY command

TYPE indicates whether models are specified by model name or procedure name.

• One keyword, MODEL or COMMAND, can be specified after TYPE.

• MODEL is the default and indicates that models are specified as model names.

• COMMAND specifies that models are specified by procedure name.

• TYPE has no effect if model names or command names are not listed after TDISPLAY.

• If more than one TYPE subcommand is specified, only the last subcommand is used.

• The TYPE specification applies only to the current TDISPLAY command.

Example

TDISPLAY ACF CURVEFIT
  /TYPE=COMMAND.
model file,model file,model file
displaying information,displaying information,displaying information
TYPE (subcommand),TYPE (subcommand),TYPE (subcommand)
TDISPLAY command,TDISPLAY command,TDISPLAY command
TDISPLAY (command),TDISPLAY (command),TDISPLAY (command)
TYPE subcommand,TYPE subcommand,TYPE subcommand
MODEL (keyword),MODEL (keyword),MODEL (keyword)
TDISPLAY command,TDISPLAY command,TDISPLAY command
COMMAND (keyword),COMMAND (keyword),COMMAND (keyword)
TDISPLAY command,TDISPLAY command,TDISPLAY command

• This command displays all currently active models that were created by procedures ACF and CURVEFIT.

Related Topics

TDISPLAY
Overview (TDISPLAY command)


TEMPORARY

temporary transformations,temporary transformations,temporary transformations
transformations,transformations,transformations
temporary,temporary,temporary
split-file processing,split-file processing,split-file processing
temporary,temporary,temporary
TEMPORARY (command),TEMPORARY (command),TEMPORARY (command)
TEMPORARY (command),TEMPORARY (command),TEMPORARY (command)
syntax chart,syntax chart,syntax chart
TEMPORARY

This command does not read the active dataset. It is stored, pending execution with the next command that reads the dataset. See the topic Command Order for more information.

Related Topics

Overview (TEMPORARY command)
Examples (TEMPORARY command)


Overview (TEMPORARY command)

temporary variables,temporary variables,temporary variables
variables,variables,variables
temporary,temporary,temporary

TEMPORARY signals the beginning of temporary transformations that are in effect only for the next procedure. With the exception of variables created or modified by the next procedure (for example, residual values saved as variables by REGRESSION), numeric or string variables created while the TEMPORARY command is in effect are temporary variables, and any modifications made to existing variables while the TEMPORARY command is in effect are also temporary. Any variables created or modified by the next procedure are permanent.

With TEMPORARY, you can perform separate analyses for subgroups in the data and then repeat the analysis for the file as a whole. You can also use TEMPORARY to transform data for one analysis but not for other subsequent analyses.

TEMPORARY can be applied to the following commands:

• Transformation commands COMPUTE, RECODE, IF, and COUNT, and the DO REPEAT utility.

• The LOOP and DO IF structures.

• Format commands PRINT FORMATS, WRITE FORMATS, and FORMATS.

• Data selection commands SELECT IF, SAMPLE, FILTER, and WEIGHT.

• Variable declarations NUMERIC, STRING, and VECTOR.

• Labeling commands VARIABLE LABELS and VALUE LABELS, and the MISSING VALUES command.

• SPLIT FILE.

• XSAVE.

Basic Specification Collapse Hide details

Basic Specification

The only specification is the keyword TEMPORARY. There are no additional specifications.

Operations Collapse Hide details

Operations

• Once TEMPORARY is specified, you cannot refer to previously existing scratch variables.

• Temporary transformations apply to the next command that reads the data. Once the data are read, the temporary transformations are no longer in effect.

• The XSAVE command leaves temporary transformations in effect. SAVE, however, reads the data and turns temporary transformations off after the file is written. (See Examples.)

• TEMPORARY cannot be used with SORT CASES, MATCH FILES, ADD FILES, or COMPUTE with a LAG function. If any of these commands follows TEMPORARY in the command sequence, there must be an intervening procedure or command that reads the data to first execute the TEMPORARY command.

• TEMPORARY cannot be used within the DO IF—END IF or LOOP—END LOOP structures.

Related Topics

TEMPORARY
Examples (TEMPORARY command)


Examples (TEMPORARY command)

SPLIT FILE (command),SPLIT FILE (command),SPLIT FILE (command)
with TEMPORARY command,with TEMPORARY command,with TEMPORARY command
TEMPORARY (command),TEMPORARY (command),TEMPORARY (command)
with SPLIT FILE command,with SPLIT FILE command,with SPLIT FILE command
TEMPORARY (command),TEMPORARY (command),TEMPORARY (command)
with SAVE command,with SAVE command,with SAVE command
SAVE (command),SAVE (command),SAVE (command)
with TEMPORARY command,with TEMPORARY command,with TEMPORARY command
TEMPORARY (command),TEMPORARY (command),TEMPORARY (command)
with XSAVE command,with XSAVE command,with XSAVE command
XSAVE (command),XSAVE (command),XSAVE (command)
with TEMPORARY command,with TEMPORARY command,with TEMPORARY command

Basic Example

SORT CASES BY SEX.
TEMPORARY.
SPLIT FILE BY SEX.
FREQUENCIES VARS=INCOME /STATISTICS=MEDIAN.
FREQUENCIES VARS=INCOME /STATISTICS=MEDIAN.

• SPLIT FILE applies to the first FREQUENCIES procedure, which generates separate median income tables for men and women.

• SPLIT FILE is not in effect for the second FREQUENCIES procedure, which generates a single median income table that includes both men and women.

Temporary Transformations for a New Variable

DATA LIST FILE=HUBDATA RECORDS=3
  /1 #MOBIRTH #DABIRTH #YRBIRTH 6-11 DEPT88 19.
COMPUTE    AGE=($JDATE - YRMODA(#YRBIRTH,#MOBIRTH,#DABIRTH))/365.25.
VARIABLE LABELS AGE 'EMPLOYEE''S AGE'
           DEPT88 'DEPARTMENT CODE IN 1988'.

TEMPORARY.
RECODE AGE (LO THRU 20=1)(20 THRU 25=2)(25 THRU 30=3)(30 THRU 35=4)
       (35 THRU 40=5)(40 THRU 45=6)(45 THRU 50=7)(50 THRU 55=8)
       (55 THRU 60=9)(60 THRU 65=10)(65 THRU HI=11).
VARIABLE LABELS AGE 'EMPLOYEE AGE CATEGORIES'.
VALUE LABELS AGE 1 'Up to 20' 2 '20 to 25' 3 '25 to 30' 4 '30 to 35'
       5 '35 to 40' 6 '40 to 45' 7 '45 to 50' 8 '50 to 55'
       9 '55 to 60' 10 '60 to 65' 11 '65 and older'.

FREQUENCIES VARIABLES=AGE.
MEANS AGE BY DEPT88.

• COMPUTE creates variable AGE from the dates in the data.

• FREQUENCIES uses the temporary version of variable AGE with temporary variable and value labels.

• MEANS uses the unrecoded values of AGE and the permanent variable label.

Using XSAVE With Temporary

GET FILE='/data/hub.sav'.
TEMPORARY.
RECODE DEPT85 TO DEPT88 (1,2=1) (3,4=2) (ELSE=9).
VALUE LABELS DEPT85 TO DEPT88 1 'MANAGEMENT'
                             2 'OPERATIONS'
                             3 'UNKNOWN'.
XSAVE OUTFILE='/temp/hubtemp.sav'.
CROSSTABS DEPT85 TO DEPT88 BY JOBCAT.

• Both the saved data file and the CROSSTABS output will reflect the temporary recoding and labeling of the department variables.

• If XSAVE is replaced with SAVE, the saved data file will reflect the temporary recoding and labeling but the CROSSTABS output will not.

Related Topics

TEMPORARY
Overview (TEMPORARY command)


TIME PROGRAM

TIME PROGRAM (command),TIME PROGRAM (command),TIME PROGRAM (command)
TIME PROGRAM (command),TIME PROGRAM (command),TIME PROGRAM (command)
syntax chart,syntax chart,syntax chart
TIME PROGRAM.
[commands to compute time dependent covariates]

This command does not read the active dataset. It is stored, pending execution with the next command that reads the dataset. See the topic Command Order for more information.

Syntax for the TIME PROGRAM command can be generated from the Cox Regression Analysis dialog.

Syntax for the TIME PROGRAM command can be generated from the Complex Samples Cox Regression dialog.

Related Topics

Overview (TIME PROGRAM command)
Example (TIME PROGRAM command)
CLEAR TIME PROGRAM
COXREG
CSCOXREG


Overview (TIME PROGRAM command)

TIME PROGRAM is required to define time-dependent covariates. These are covariates whose values change during the course of the study.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is the TIME PROGRAM command followed by one or more commands that define time-dependent covariates.

Syntax Rules Collapse Hide details

Syntax Rules

• TIME PROGRAM and the transformations that define the time-dependent covariate(s) must precede the command that analyzes the time-dependent covariate(s).

• A time-dependent covariate is a function of the current time, which is represented by the special variable T_.

• The active dataset must not have a variable named T_. If it does, rename the variable. Otherwise, you will trigger an error.

• T_ cannot be specified as a covariate. Any other variable in the TIME PROGRAM can be specified on the covariate list.

• For every time-dependent covariate, values are generated for each valid case for all uncensored times in the same stratum that occur before the observed time. If no STRATA subcommand is specified, all cases are considered to belong to one stratum.

• If any function defined by the time program results in a missing value for a case that has no missing values for any other variable used in the procedure, this causes an error.

Related Topics

TIME PROGRAM
Example (TIME PROGRAM command)


Example (TIME PROGRAM command)

TIME PROGRAM.
COMPUTE Z=AGE + T_.

COXREG VARIABLES = SURVIVAL WITH Z
  /STATUS SURVSTA EVENT (1).

• TIME PROGRAM defines the time-dependent covariate Z as the current age. Z is then specified as a covariate in COXREG.

Related Topics

TIME PROGRAM
Overview (TIME PROGRAM command)


TITLE

titles,titles,titles
page,page,page
TITLE (command),TITLE (command),TITLE (command)
TITLE (command),TITLE (command),TITLE (command)
syntax chart,syntax chart,syntax chart
TITLE [']text[']

This command takes effect immediately. It does not read the active dataset or execute pending transformations. See the topic Command Order for more information.

Example

TITLE "Running Shoe Study from Runner's World Data".

Related Topics

Overview (TITLE command)
Examples (TITLE command)
SUBTITLE


Overview (TITLE command)

TITLE (command),TITLE (command),TITLE (command)
with BEGIN DATA command,with BEGIN DATA command,with BEGIN DATA command
BEGIN DATA (command),BEGIN DATA (command),BEGIN DATA (command)
with TITLE command,with TITLE command,with TITLE command
TITLE (command),TITLE (command),TITLE (command)
with SET command,with SET command,with SET command
SET (command),SET (command),SET (command)
with TITLE command,with TITLE command,with TITLE command
SUBTITLE (command),SUBTITLE (command),SUBTITLE (command)
with TITLE command,with TITLE command,with TITLE command
TITLE (command),TITLE (command),TITLE (command)
with SUBTITLE command,with SUBTITLE command,with SUBTITLE command

TITLE inserts a left-justified title on the top line of each page of output. The default title indicates the version of the system being used.

Basic Specification Collapse Hide details

Basic Specification

The only specification is the title.

Syntax Rules Collapse Hide details

Syntax Rules

• The title can include any characters. To specify a blank title, enclose a blank in quotes (" ").

• The title can be up to 60 bytes long. Titles longer than 60 bytes are truncated.

• The quotes enclosing the title are optional; using them allows you to include apostrophes or quotation marks in the title. See the topic String Values in Command Specifications for more information.

• More than one TITLE command is allowed in a single session.

• A title cannot be placed between a procedure command and BEGIN DATA—END DATA or within data records when the data are inline.

Operations Collapse Hide details

Operations

• The title is displayed as part of the output heading, which also includes the date and page number. If HEADER=NO is specified on SET, the heading, including the title and subtitle, will not be displayed.

• Each TITLE command overrides the previous one and takes effect on the next output page.

• Only the title portion of the heading changes. The date and page number are still displayed.

• TITLE is independent of SUBTITLE, and each can be changed separately.

Related Topics

TITLE
Examples (TITLE command)


Examples (TITLE command)

TITLE My Title.
TITLE "Fred's Title".
TITLE 'Fred''s "Quoted" Title'.

• The first title doesn't need to be enclosed in quotes because it doesn't contain any quotes or apostrophes.

• The second title is enclosed in double quotes because it contains an apostrophe (single quote).

• The last title is enclosed in single quotes since it contains double quotes, and two single quotes are used to specify the apostrophe.

Related Topics

TITLE
Overview (TITLE command)


TMS BEGIN

TMS BEGIN (command),TMS BEGIN (command),TMS BEGIN (command)
TMS BEGIN (command),TMS BEGIN (command),TMS BEGIN (command)
syntax chart,syntax chart,syntax chart
release history,release history,release history
TMS BEGIN
   /DESTINATION OUTFILE=’file specification’
Release History Collapse Hide details

Release History

Release 15.0

• Command introduced.

Release 16.0

• Added support for new string functions CHAR.CONCAT, CHAR.LENGTH, and CHAR.SUBSTR within TMS blocks.

Example

TMS BEGIN
 /DESTINATION OUTFILE='/mydir/mytransformations.xml'.
COMPUTE modelvar=ln(var).
TMS END.

Related Topics

Overview (TMS BEGIN command)
EXAMPLES (TMS BEGIN command)
DESTINATION Subcommand (TMS BEGIN command)
TMS END
TMS MERGE


Overview (TMS BEGIN command)

transformation expressions,transformation expressions,transformation expressions
exporting to PMML,exporting to PMML,exporting to PMML
models,models,models
exporting transformations to PMML,exporting transformations to PMML,exporting transformations to PMML
PMML,PMML,PMML
exporting transformations to PMML,exporting transformations to PMML,exporting transformations to PMML

The TMS BEGIN command indicates the beginning of a block of transformations to be exported to a file in PMML format--specifically, PMML 3.1 with PASW Statistics extensions. The exported transformations can be merged (using TMS MERGE) with a PMML model file in order to include any transformations of the raw data required to create the variables used in the model. The merged PMML file can be used to score data with SmartScore, PASW Statistics Server (a separate product), or PASW Modeler. When you score data with a model file containing transformations, the transformations will be applied to the data before scoring. The transformations are carried out as part of the internal scoring process and have no effect on the active dataset. The TMS END command is used to end the block.

From the point of view of the active dataset, transformations in a TMS BEGIN-TMS END block are no different than transformations outside a TMS block--they are pending and will be executed with the next command that reads the active dataset. Source variables used in transformation expressions in TMS blocks must exist in the active dataset. In a typical scenario, you would run TMS BEGIN-TMS END command syntax on the raw dataset used to build the associated model, assuming it contains the source variables used in any transformation expressions.

Commands within a TMS block are categorized as belonging to one of four types: exported, tolerated, invalid, and those causing an implicit TMS END.

Exported. These are commands that produce export to PMML. Commands in this category include the supported transformations--for example, RECODE. Many transformations are expressed with functions included on a COMPUTE command. Export to PMML is supported for a limited set of such functions. The set of commands that produce export to PMML, as well as the set of supported functions, are provided at the end of this topic.

Tolerated. These are commands that can be included in a TMS BEGIN-TMS END block, are executed in normal fashion, but do not produce export to PMML. Examples include NUMERIC, STRING, USE, INCLUDE, and INSERT. In the case of INCLUDE or INSERT, supported transformations from the inserted file will be exported to PMML.

Invalid. These are commands that cannot be processed within a TMS block and will give rise to an error. The list of invalid commands is provided at the end of this topic.

Implicit TMS END. These commands are executed in normal fashion but cause an implicit end to the current block, which then causes the output PMML file to be written. Transformations (in the current block) occurring after one of these commands are not exported to the output PMML file. Commands in this category include all of the statistical procedures--for example, ANOVA and REGRESSION--as well as the EXECUTE command. ADD FILES and MATCH FILES belong to this category as well as any command that causes a different dataset to become active--for example, DATASET ACTIVATE, GET, and GET DATA.

Basic Specification Collapse Hide details

Basic Specification

The basic specification for TMS BEGIN is the command name followed by a DESTINATION subcommand that contains an OUTFILE specification.

Syntax Rules Collapse Hide details

Syntax Rules

• The DESTINATION subcommand is required.

• An error occurs if the DESTINATION subcommand is specified more than once.

• An error occurs if the OUTFILE keyword is specified more than once.

• Equal signs (=) shown in the syntax chart are required.

• Subcommand names and keywords must be spelled in full.

Operations Collapse Hide details

Operations

• Once a TMS BEGIN command is executed, it remains in effect until the end of the session, until explicitly ended by a TMS END command, or until a command that implicitly ends a TMS block--for example, any statistical procedure--is encountered.

• TMS commands (for example, TMS MERGE) are not allowed within a TMS block.

• TMS BEGIN verifies that the path specified for the destination file is valid. If the path is invalid, the commands in the block will be processed in the normal manner but no PMML will be exported.

• The following conditions will cause the destination file to be written: a command that causes an implicit end of the block is executed; the TMS block ends explicitly with TMS END; the current session ends before the block ends (either explicitly or implicitly). The destination file is unavailable to other commands until after it is written. TMS END has no effect if the block is ended implicitly.

• An error occurs if a transformation in the block is not supported. The command containing the invalid transformation is not executed. This type of error does not cause an implicit end to the TMS block and has no effect on when the destination file is written.

• The order of the transformations in the destination file may not be the order in which they were specified in the TMS block.

• Transformations specified in a TMS block are processed in the normal manner--that is, pending and to be executed with the next command that reads the active dataset.

Exported Commands Collapse Hide details

Exported Commands

The following commands produce export to PMML.

ADD VALUE LABELS
COMPUTE
DO REPEAT - END REPEAT
MISSING VALUES
RECODE
VALUE LABELS
VARIABLE LABELS
VARIABLE LEVEL

• For COMPUTE, the target variable must be a variable that has not already been assigned a value or otherwise used in the associated TMS block. For example, the following is invalid:

COMPUTE var = var + 1.

• For RECODE, all input and output keywords are supported except CONVERT. In addition, you must always recode INTO a variable that has not already been assigned a value or otherwise used in the associated TMS block. When a recoding transformation is carried out on a dataset to be scored, the results depend on whether the target variable exists in the dataset. If the target variable already exists, cases with values (of the source variable) not mentioned in the value specifications for the recode are not changed. If the target variable does not already exist, cases with values not mentioned are assigned the system-missing value.

Invalid Commands Collapse Hide details

Invalid Commands

The following commands are invalid inside a TMS block.

AGGREGATE
BREAK
COUNT
DO IF - END IF
ELSE
ELSE IF
END CASE
END FILE
FILE TYPE - END FILE TYPE
FILTER
IF
INPUT PROGRAM - END INPUT PROGRAM
KEYED DATA LIST
LEAVE
LOOP - END LOOP
N OF CASES
POINT
RECORD TYPE
REPEATING DATA
REREAD
SAMPLE
SELECT IF
VECTOR
WEIGHT
WRITE
Supported Functions, Operations, and System Variables Collapse Hide details

Supported Functions, Operations, and System Variables

The following functions, operations, and system variables are supported for use with the COMPUTE command in TMS blocks. In a few cases--for example, CHAR.SUBSTR--multiple forms (differing in the number of parameters) exist, but only a single form is supported. The parameters available in the supported form are shown.

+ Addition
- Subtraction
* Multiplication
/ Division
** Exponentiation
ABS
CDF.NORMAL
CDFNORM
CHAR.CONCAT
CHAR.LENGTH
CHAR.SUBSTR(strexpr,pos)
CONCAT
EXP
IDF.NORMAL
LG10
LENGTH
LN
LOWER
LTRIM(strexpr)
MAX
MEAN
MIN
MOD
PDF.NORMAL
RND
RTRIM(strexpr)
SD
SQRT
SUBSTR(strexpr,pos)
SUM
SYSMIS
TRUNC
UPCASE
VALUE
VARIANCE

Notes

• The relational operators EQ, NE, LT, LE, GT, and GE are not supported.

• Within a TMS block it is recommended to use CHAR.CONCAT, CHAR.LENGTH, and CHAR.SUBSTR in place of CONCAT, LENGTH, and SUBSTR.

• SmartScore does not support string arguments for the MAX and MIN functions.

Related Topics

TMS BEGIN
EXAMPLES (TMS BEGIN command)
DESTINATION Subcommand (TMS BEGIN command)


EXAMPLES (TMS BEGIN command)

TMS BEGIN
 /DESTINATION OUTFILE='/mydir/mytransformations.xml'.
COMPUTE modelvar=ln(var).
TMS END.

• TMS BEGIN marks the beginning of a block of transformation commands that will be evaluated for export to PMML.

• The variable var is transformed with a log function to create the variable modelvar, which is to be used in a model. The details of this transformation will be included as PMML in the file /mydir/mytransformations.xml.

• TMS END marks the end of the block and causes the output file to be written, but has no effect on the state of the transformations contained in the block. In the present example, the transformation to create modelvar is still pending after the completion of the block.

Tolerated Commands in a TMS Block

TMS BEGIN
 /DESTINATION OUTFILE='/mydir/mytransformations.xml'.
STRING new_strvar (A1).
RECODE strvar ('A','B','C'='A') ('D','E','F'='B') (ELSE=' ')
   INTO new_strvar.
TMS END.

• The STRING command is used to create a new string variable that is to be the target of a recode transformation of an existing string variable. STRING is a tolerated command so it is executed in the normal manner, without generating an error or implicitly ending the TMS block.

Commands that Cause an Implicit TMS END

TMS BEGIN
 /DESTINATION OUTFILE='/mydir/mytransformations.xml'.
RECODE numvar1 (0=1) (1=0) (ELSE=SYSMIS) INTO new_numvar1.
FREQUENCIES new_numvar1.
RECODE numvar2 (1 THRU 5=1)(6 THRU 10=2)(11 THRU HI=3)(ELSE=0)
   INTO new_numvar2.
TMS END.

• The FREQUENCIES command causes an implicit end to the TMS block, causing the output PMML file to be written. The output file only contains the recode transformation for numvar1--that is, the transformations prior to the command causing the implicit TMS END.

• Although the FREQUENCIES command implicitly ends the block, the recode transformation for numvar2 is processed in the normal manner and remains pending until the next command that reads the active dataset.

• Although we have included it in this example, the TMS END command is not needed when there is a command that implicitly ends the TMS block. In this example, execution of the TMS END command generates a warning indicating that there is no current TMS command in effect.

Using EXECUTE in a TMS Block

TMS BEGIN
 /DESTINATION OUTFILE='/mydir/mytransformations.xml'.
RECODE numvar1 (0=1) (1=0) (ELSE=SYSMIS) INTO new_numvar1.
RECODE numvar2 (1 THRU 5=1)(6 THRU 10=2)(11 THRU HI=3)(ELSE=0)
   INTO new_numvar2.
EXECUTE.

• You can include EXECUTE in a TMS block. In its usual manner, it will cause all pending transformations to be executed. In addition, it causes an implicit end to the block which then causes the output PMML file to be written.

• In the current example, we have omitted the TMS END command since the block is implicitly ended by the EXECUTE command.

Related Topics

TMS BEGIN
Overview (TMS BEGIN command)
DESTINATION Subcommand (TMS BEGIN command)


DESTINATION Subcommand (TMS BEGIN command)

TMS BEGIN (command),TMS BEGIN (command),TMS BEGIN (command)
DESTINATION subcommand,DESTINATION subcommand,DESTINATION subcommand
DESTINATION (subcommand),DESTINATION (subcommand),DESTINATION (subcommand)
TMS BEGIN command,TMS BEGIN command,TMS BEGIN command

The DESTINATION subcommand is required. It must include the OUTFILE keyword followed by an equals sign (=) and a file specification in quotes or a previously defined file handle defined with the FILE HANDLE command. It is recommended to include the extension .xml in the file specification.

Related Topics

TMS BEGIN
Overview (TMS BEGIN command)
EXAMPLES (TMS BEGIN command)


TMS END

TMS END (command),TMS END (command),TMS END (command)
TMS END (command),TMS END (command),TMS END (command)
syntax chart,syntax chart,syntax chart
release history,release history,release history
TMS END
   [/PRINT RESULTS={SUMMARY**}]
                   {NONE}

** Default if the subcommand or keyword is omitted.

Release History Collapse Hide details

Release History

Release 15.0

• Command introduced.

Example

TMS BEGIN
 /DESTINATION OUTFILE='/mydir/mytransformation.xml'.
COMPUTE mymodelvar=ln(var).
TMS END
 /PRINT RESULTS=NONE.

Related Topics

Overview (TMS END command)
PRINT Subcommand (TMS END command)
TMS BEGIN
TMS MERGE


Overview (TMS END command)

The TMS END command is used to indicate the end of a block of transformations to be exported to a file in PMML format--specifically, PMML 3.1 with PASW Statistics extensions. The exported transformations can be merged (using TMS MERGE) with a PMML model file in order to include any transformations of the raw data required to create the variables used in the model. The merged PMML file can be used to score data with SmartScore, PASW Statistics Server (a separate product), or PASW Modeler. When you score data with a model file containing transformations, the transformations will be applied to the data before scoring. The transformations are carried out as part of the internal scoring process and have no effect on the active dataset. The TMS BEGIN command is used to indicate the beginning of the block.

Basic Specification Collapse Hide details

Basic Specification

The basic specification for TMS END is the command name. For examples of TMS BEGIN-TMS END blocks, see the TMS BEGIN command.

Syntax Rules Collapse Hide details

Syntax Rules

• An error occurs if the PRINT subcommand is specified more than once.

• An error occurs if the RESULTS keyword is specified more than once.

• Equal signs (=) shown in the syntax chart are required.

• Subcommand names and keywords must be spelled in full.

Operations Collapse Hide details

Operations

• TMS END will generate a warning if there is no TMS BEGIN command in effect. This condition occurs in the obvious case that there is no prior TMS BEGIN command, but will also occur if there is a TMS BEGIN command followed by a command that implicitly ends a TMS block--for instance, any statistical procedure or the EXECUTE command--followed by TMS END.

• TMS END causes the destination file to be written, unless the associated TMS block ended implicitly (see previous bullet), thus causing the file to be written before execution of TMS END. For more information, see the Examples for the TMS BEGIN command.

• TMS END does not cause transformations in the associated TMS block to be executed. In normal fashion, they are pending and will be executed with the next command that reads the active dataset.

Related Topics

TMS END
PRINT Subcommand (TMS END command)


PRINT Subcommand (TMS END command)

TMS END (command),TMS END (command),TMS END (command)
PRINT subcommand,PRINT subcommand,PRINT subcommand
PRINT (subcommand),PRINT (subcommand),PRINT (subcommand)
TMS END command,TMS END command,TMS END command

The PRINT subcommand is optional and specifies whether or not to print a table summarizing the derived variables defined by the transformations in the block.

SUMMARY | Print a summary of the derived variables. This is the default.
NONE | Do not print a summary.

Related Topics

TMS END
Overview (TMS END command)


TMS IMPORT

TMS IMPORT (command),TMS IMPORT (command),TMS IMPORT (command)
syntax chart,syntax chart,syntax chart
ProcedureName,ProcedureName,ProcedureName
command syntax,command syntax,command syntax
TMS IMPORT
  /INFILE TRANSFORMATIONS='filespec'
     [MODE={FORWARD**(ROLES={UPDATE**})        }]
                            {LEAVE   }
           {BACK(PREDICTED=fieldname
                 SUFFIX={'_backtransformed'}
                        {suffixname        }  )}
  [/SAVE TRANSFORMED={YES**}]
                     {NO   }
  [/OUTFILE SYNTAX='filespec'].

This command takes effect immediately. It does not read the active dataset or execute pending transformations. See the topic Command Order for more information.

Release History Collapse Hide details

Release History

Release 18

• Command introduced.

Example

TMS IMPORT
  /INFILE TRANSFORMATIONS='file.xml'.

Related Topics

Overview (TMS IMPORT command)
Examples (TMS IMPORT command)
INFILE Subcommand (TMS IMPORT command)
SAVE Subcommand (TMS IMPORT command)
OUTFILE Subcommand (TMS IMPORT command)


Overview (TMS IMPORT command)

TMS IMPORT converts transformations contained in an XML file created by ADP (transformations files created by TMS BEGIN-END are not currently "reversible") into command syntax and applies the converted transformations to the active dataset or saves them to a syntax file.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is the TMS IMPORT command and an INFILE subcommand with a transformations file specification.

Syntax Rules Collapse Hide details

Syntax Rules

• The INFILE subcommand is required. All other subcommands are optional.

• Each subcommand can be specified only once.

• Subcommands may be used in any order.

• An error occurs if a keyword is specified more than once within a subcommand.

• Equal signs (=) shown in the syntax chart are required.

• Subcommand names and keywords must be spelled in full.

Related Topics

TMS IMPORT
Examples (TMS IMPORT command)
INFILE Subcommand (TMS IMPORT command)
SAVE Subcommand (TMS IMPORT command)
OUTFILE Subcommand (TMS IMPORT command)


Examples (TMS IMPORT command)

TMS IMPORT
  /INFILE TRANSFORMATIONS='file.xml'.

• TMS IMPORT reads the file file.xml, converts the transformations from XML to command syntax, and applies them to the active dataset.

Using Backtransformations

TMS IMPORT
  /INFILE TRANSFORMATIONS='workingDirectory/car_sales_transformations.xml'
    MODE=BACK (PREDICTED=PRE_2 SUFFIX='_backtransformed').
EXECUTE.

• The TMS IMPORT command reads the transformations in car_sales_transformations.xml and applies the backtransformation to PRE_2.

• The new field containing the backtransformed values is named PRE_2_backtransformed.

• The EXECUTE command causes the transformations to be processed. When using this as part of a longer stream of syntax, you may be able to remove the EXECUTE command to save some processing time.

For discussion of output from this syntax and to place the example in context, see Using Automated Data Preparation Automatically.

Related Topics

TMS IMPORT
Overview (TMS IMPORT command)
INFILE Subcommand (TMS IMPORT command)
SAVE Subcommand (TMS IMPORT command)
OUTFILE Subcommand (TMS IMPORT command)


INFILE Subcommand (TMS IMPORT command)

TMS IMPORT (command),TMS IMPORT (command),TMS IMPORT (command)
INFILE subcommand,INFILE subcommand,INFILE subcommand
INFILE (subcommand),INFILE (subcommand),INFILE (subcommand)
TMS IMPORT command,TMS IMPORT command,TMS IMPORT command

The INFILE subcommand specifies the location of the XML file containing the transformations.

TRANSFORMATIONS (keyword),TRANSFORMATIONS (keyword),TRANSFORMATIONS (keyword)
TMS IMPORT command,TMS IMPORT command,TMS IMPORT command
TRANSFORMATIONS Keyword Collapse Hide details

TRANSFORMATIONS Keyword

The TRANSFORMATIONS keyword specifies the location of the XML file containing the transformations. Specify a filename in quotation marks. The filename must be specified in full.

MODE (keyword),MODE (keyword),MODE (keyword)
TMS IMPORT command,TMS IMPORT command,TMS IMPORT command
FORWARD (keyword),FORWARD (keyword),FORWARD (keyword)
TMS IMPORT command,TMS IMPORT command,TMS IMPORT command
ROLES (keyword),ROLES (keyword),ROLES (keyword)
TMS IMPORT command,TMS IMPORT command,TMS IMPORT command
BACK (keyword),BACK (keyword),BACK (keyword)
TMS IMPORT command,TMS IMPORT command,TMS IMPORT command
PREDICTED (keyword),PREDICTED (keyword),PREDICTED (keyword)
TMS IMPORT command,TMS IMPORT command,TMS IMPORT command
SUFFIX (keyword),SUFFIX (keyword),SUFFIX (keyword)
TMS IMPORT command,TMS IMPORT command,TMS IMPORT command
MODE Keyword Collapse Hide details

MODE Keyword

The MODE keyword specifies the direction of the transformations.

FORWARD(ROLES=UPDATE|LEAVE)
 | Convert the "forward" transformations from XML to command syntax. These are the transformations from the original fields into fields that are used in modeling. ROLES determines whether to update field roles based upon transformations in the file. UPDATE will set the role of any "obsolete" field to None. LEAVE will leave the roles of existing fields as they currently are. See the topic VARIABLE ROLE for more information.
 | FORWARD is the default mode.
BACK(PREDICTED=fieldname SUFFIX=suffixname)
 | Convert the backtransformation of target values into command syntax and apply to the field specified on the PREDICTED keyword. The backtransformed values are saved to a field with the name on the PREDICTED keyword and suffix on the SUFFIX keyword. _backtransformed is the default suffix.

Example

TMS IMPORT
  /INFILE TRANSFORMATIONS='file.xml'.
REGRESSION VARIABLES=target_transformed input_transformed
 /DEPENDENT=target_transformed
 /METHOD=ENTER input_transformed
 /SAVE=PRED(predicted) SDBETA(BETA) ICIN.
TMS IMPORT
  /INFILE TRANSFORMATIONS='file.xml' MODE=BACK(PREDICTED=predicted).

• The first TMS IMPORT reads the file file.xml, converts the transformations from XML to command syntax, and applies them to the active dataset. The fields target_transformed and input_transformed result.

• The REGRESSION command builds a model for target_transformed using input_transformed, and adds predicted to the active dataset, containing the predicted values.

• The second TMS IMPORT reads the file file.xml, converts the backtransformations from XML to command syntax, and applies them to the active dataset. The field predicted_backtransformed results, and contains predicted values in the original scale of the target field.

Related Topics

TMS IMPORT
Overview (TMS IMPORT command)
Examples (TMS IMPORT command)
SAVE Subcommand (TMS IMPORT command)
OUTFILE Subcommand (TMS IMPORT command)


SAVE Subcommand (TMS IMPORT command)

TMS IMPORT (command),TMS IMPORT (command),TMS IMPORT (command)
SAVE subcommand,SAVE subcommand,SAVE subcommand
SAVE (subcommand),SAVE (subcommand),SAVE (subcommand)
TMS IMPORT command,TMS IMPORT command,TMS IMPORT command

The SAVE subcommand adds the prepared fields to the active dataset.

PREPAREDDATA (keyword),PREPAREDDATA (keyword),PREPAREDDATA (keyword)
TMS IMPORT command,TMS IMPORT command,TMS IMPORT command
TRANSFORMED
Transformed data. The transformed fields are added to the active dataset. The values are not computed immediately; instead the transformations are stored, pending execution with the next command that reads the dataset.

Related Topics

TMS IMPORT
Overview (TMS IMPORT command)
Examples (TMS IMPORT command)
INFILE Subcommand (TMS IMPORT command)
OUTFILE Subcommand (TMS IMPORT command)


OUTFILE Subcommand (TMS IMPORT command)

TMS IMPORT (command),TMS IMPORT (command),TMS IMPORT (command)
OUTFILE subcommand,OUTFILE subcommand,OUTFILE subcommand
OUTFILE (subcommand),OUTFILE (subcommand),OUTFILE (subcommand)
TMS IMPORT command,TMS IMPORT command,TMS IMPORT command

The OUTFILE subcommand specifies the location of the file to which command syntax should be saved.

SYNTAX (keyword),SYNTAX (keyword),SYNTAX (keyword)
TMS IMPORT command,TMS IMPORT command,TMS IMPORT command
SYNTAX=filename
Syntax file. Specify a filename in quotation marks. The filename must be specified in full; no extension is supplied. It is recommended to include the extension .sps in the file specification.

Related Topics

TMS IMPORT
Overview (TMS IMPORT command)
Examples (TMS IMPORT command)
INFILE Subcommand (TMS IMPORT command)
SAVE Subcommand (TMS IMPORT command)


TMS MERGE

TMS MERGE (command),TMS MERGE (command),TMS MERGE (command)
TMS MERGE (command),TMS MERGE (command),TMS MERGE (command)
syntax chart,syntax chart,syntax chart
release history,release history,release history
TMS MERGE
   /DESTINATION OUTFILE=’file specification’
   /TRANSFORMATIONS INFILE=’file specification’
   /MODEL INFILE=’file specification’
   [/PRINT RESULTS={SUMMARY**}]
                   {NONE}

** Default if the subcommand or keyword is omitted.

This command takes effect immediately. It does not read the active dataset or execute pending transformations. See the topic Command Order for more information.

Release History Collapse Hide details

Release History

Release 15.0

• Command introduced.

Example

TMS MERGE
   /DESTINATION OUTFILE=’/mydir/mymergedmodel.xml’
   /TRANSFORMATIONS INFILE=’/mydir/mytransformations.xml’
   /MODEL INFILE=’/mydir/mymodel.xml’.

Related Topics

Overview (TMS MERGE command)
TRANSFORMATIONS, MODEL, and DESTINATION Subcommands (TMS MERGE command)
PRINT Subcommand (TMS MERGE command)
TMS BEGIN
TMS END


Overview (TMS MERGE command)

transformation expressions,transformation expressions,transformation expressions
merging transformation PMML with model XML,merging transformation PMML with model XML,merging transformation PMML with model XML
models,models,models
merging transformation PMML with model XML,merging transformation PMML with model XML,merging transformation PMML with model XML
PMML,PMML,PMML
merging transformation PMML with model XML,merging transformation PMML with model XML,merging transformation PMML with model XML

The TMS MERGE command is used to merge a PMML file containing transformations with a PMML model file containing variables whose derivations are expressed by those transformations. The merged file can be used to score data with SmartScore, PASW Statistics Server (a separate product), or PASW Modeler. When you score data with a model file containing transformations, the transformations will be applied to the data before scoring. The transformations are carried out as part of the internal scoring process and have no effect on the active dataset. Transformations are exported as PMML using the TMS BEGIN and TMS END commands. See the topic TMS BEGIN for more information.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is the command name followed by DESTINATION, TRANSFORMATIONS, and MODEL subcommands that contain file specifications.

Syntax Rules Collapse Hide details

Syntax Rules

• Each subcommand can be specified only once.

• Subcommands may be used in any order.

• An error occurs if a keyword is specified more than once within a subcommand.

• Equal signs (=) shown in the syntax chart are required.

• Subcommand names and keywords must be spelled in full.

Operations Collapse Hide details

Operations

• TMS MERGE has no effect on the active dataset. It relies completely on the information contained in the transformations and model files.

• TMS MERGE verifies that the paths specified for the input files and destination file are valid. The destination file is unavailable to other commands until the TMS MERGE command is ended.

• An error occurs if properties of derived variables in the transformations file do not match the properties for those same variables in the model file--for example, conflicting definitions of missing values.

Related Topics

TMS MERGE
TRANSFORMATIONS, MODEL, and DESTINATION Subcommands (TMS MERGE command)
PRINT Subcommand (TMS MERGE command)


TRANSFORMATIONS, MODEL, and DESTINATION Subcommands (TMS MERGE command)

TMS MERGE (command),TMS MERGE (command),TMS MERGE (command)
DESTINATION subcommand,DESTINATION subcommand,DESTINATION subcommand
TMS MERGE (command),TMS MERGE (command),TMS MERGE (command)
TRANSFORMATIONS subcommand,TRANSFORMATIONS subcommand,TRANSFORMATIONS subcommand
TMS MERGE (command),TMS MERGE (command),TMS MERGE (command)
MODEL subcommand,MODEL subcommand,MODEL subcommand
DESTINATION (subcommand),DESTINATION (subcommand),DESTINATION (subcommand)
TMS MERGE command,TMS MERGE command,TMS MERGE command
TRANSFORMATIONS (subcommand),TRANSFORMATIONS (subcommand),TRANSFORMATIONS (subcommand)
TMS MERGE command,TMS MERGE command,TMS MERGE command
MODEL (subcommand),MODEL (subcommand),MODEL (subcommand)
TMS MERGE command,TMS MERGE command,TMS MERGE command

The TRANSFORMATIONS, MODEL, and DESTINATION subcommands specify the file containing the transformations (created from a TMS BEGIN-TMS END block), the file containing the model specifications, and the destination for the merged file. All three of these subcommands are required.

• File specifications should be enclosed in quotation marks.

• The filename must be specified in full. No extension is supplied.

• It is recommended to include the extension .xml in the specification for the destination file.

Related Topics

TMS MERGE
Overview (TMS MERGE command)
PRINT Subcommand (TMS MERGE command)


PRINT Subcommand (TMS MERGE command)

TMS MERGE (command),TMS MERGE (command),TMS MERGE (command)
PRINT subcommand,PRINT subcommand,PRINT subcommand
PRINT (subcommand),PRINT (subcommand),PRINT (subcommand)
TMS MERGE command,TMS MERGE command,TMS MERGE command

The PRINT subcommand is optional and specifies whether or not to print tables summarizing the variables in the merged XML file.

SUMMARY | Print summary tables. This is the default.
NONE | Do not print summary tables.

Related Topics

TMS MERGE
Overview (TMS MERGE command)
TRANSFORMATIONS, MODEL, and DESTINATION Subcommands (TMS MERGE command)


TREE

TREE (command),TREE (command),TREE (command)
TREE (command),TREE (command),TREE (command)
syntax chart,syntax chart,syntax chart
release history,release history,release history

TREE is available in the Decision Trees option.

Note: Square brackets used in the TREE syntax chart are required parts of the syntax and are not used to indicate optional elements. Equals signs (=) used in the syntax chart are required elements. All subcommands are optional.

TREE dependent_variable [level]
     BY variable [level] variable [level]...
     FORCE = variable [level]

  /TREE DISPLAY ={TOPDOWN**  } NODES = {STATISTICS**}
                 {LEFTTORIGHT}         {CHART       }
                 {RIGHTTOLEFT}         {BOTH        }
                 {NONE       }
        BRANCHSTATISTICS ={YES**} NODEDEFS = {YES**}
                          {NO   }            {NO   }
        SCALE={AUTO**       }
              {percent value}

  /DEPCATEGORIES USEVALUES=[VALID** value, value...MISSING]
                 TARGET=[value value...]

  /PRINT MODELSUMMARY** CLASSIFICATION** RISK** CPS** IMPORTANCE SURROGATES
         TREETABLE CATEGORYSPECS NONE

  /GAIN SUMMARYTABLE = {YES**} CATEGORYTABLE = {YES**}
                       {NO   }                 {NO   }
        TYPE = [NODE** PTILE] SORT = {DESCENDING**}
                                     {ASCENDING   }
        INCREMENT = {10** } CUMULATIVE = {YES**}
                    {value}              {NO   }

  /PLOT GAIN RESPONSE INDEX MEAN PROFIT ROI IMPORTANCE INCREMENT = {10   }
                                                                   {value}

  /RULES NODES = {TERMINAL**     } SYNTAX = {INTERNAL** }
                 {ALL            }          {SQL        }
                 {TOPN(value)    }          {GENERIC    }
                 {TOPPCT(value)  }
                 {MININDEX(value)}
         TYPE = {SCORING**} SURROGATES = {EXCLUDE**} LABELS = {YES**}
                {SELECTION}              {INCLUDE  }          {NO   }
         OUTFILE = ’filespec’

  /SAVE NODEID(varname) PREDVAL(varname) PREDPROB(rootname) ASSIGNMENT(varname)

 /METHOD TYPE = {CHAID**        }
                {EXHAUSTIVECHAID}
                {CRT            }
                {QUEST          }
         MAXSURROGATES = {AUTO**} PRUNE = {NONE**     }
                         {value }         {SE({1    })}
                                              {value}

 /GROWTHLIMIT MAXDEPTH = {AUTO**} MINPARENTSIZE = {100**}
                         {value }                 {value}

              MINCHILDSIZE = {50** }
                             {value}

 /VALIDATION  TYPE = {NONE**                  } OUTPUT = {BOTHSAMPLES}
                     {SPLITSAMPLE({50       })}          {TESTSAMPLE }
                                  {percent  }
                                  {varname}
                     {CROSSVALIDATION({10   })}
                                      {value}

 /CHAID  ALPHASPLIT = {.05**}  ALPHAMERGE = {.05**}
                      {value}               {value}
         SPLITMERGED = {NO**} CHISQUARE = {PEARSON**}
                       {YES }             {LR       }
         CONVERGE = {.001**}  MAXITERATIONS = {100**}
                    {value }                  {value}
         ADJUST = {BONFERRONI**}
                  {NONE        }
         INTERVALS = {10**                           }
                     {value                          }
                     {varlist(value) varlist(value) …}

  /CRT IMPURITY = {GINI**       } MINIMPROVEMENT = {.0001**}
                  {TWOING       }                  {value  }
                  {ORDEREDTWOING}

  /QUEST ALPHASPLIT = {.05**}
                      {value}

 /COSTS {EQUAL**                                                     }
        {CUSTOM = actcat, predcat [value] actcat, predcat [value] ...}

 /PRIORS {FROMDATA**                          } ADJUST = {NO**}
         {EQUAL                               }          {YES }
         {CUSTOM = cat [value] cat [value] ...}

 /SCORES {EQUALINCREMENTS**                   }
         {CUSTOM = cat [value] cat [value] ...}

 /PROFITS CUSTOM = cat [revenue, expense] cat [revenue, expense] ...

 /INFLUENCE varname

 /OUTFILE TRAININGMODEL = ’filespec’ TESTMODEL = ’filespec’

 /MISSING  NOMINALMISSING = {MISSING**}
                            {VALID    }

 /TARGETRESPONSE RATE = {NONE   }
                        {value  }

** Default if subcommand is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See TREE Algorithms for computational details for this procedure.

Syntax for the TREE command can be generated from the Decision Tree dialog.

Release History Collapse Hide details

Release History

Release 13.0

• Command introduced.

Release 18.0

• TARGETRESPONSE subcommand introduced.

Example

TREE risk BY income age creditscore employment.

Related Topics

Overview (TREE command)
Model Variables (TREE command)
Measurement Level (TREE command)
FORCE Keyword (TREE command)
DEPCATEGORIES Subcommand (TREE command)
TREE Subcommand (TREE command)
PRINT Subcommand (TREE command)
GAIN Subcommand (TREE command)
PLOT Subcommand (TREE command)
RULES Subcommand (TREE command)
SAVE Subcommand (TREE command)
METHOD Subcommand (TREE command)
GROWTHLIMIT Subcommand (TREE command)
VALIDATION Subcommand (TREE command)
CHAID Subcommand (TREE command)
CRT Subcommand (TREE command)
QUEST Subcommand (TREE command)
COSTS Subcommand (TREE command)
Custom Costs (TREE command)
PRIORS Subcommand (TREE command)
SCORES Subcommand (TREE command)
PROFITS Subcommand (TREE command)
INFLUENCE Subcommand (TREE command)
OUTFILE Subcommand (TREE command)
MISSING Subcommand (TREE command)
TARGETRESPONSE Subcommand (TREE command)


Overview (TREE command)

TREE (command),TREE (command),TREE (command)
minimum specifications,minimum specifications,minimum specifications
limitations,limitations,limitations

The TREE procedure creates a tree-based model. It classifies cases into groups or predicts values of a dependent variable based on values of predictor variables. The procedure provides validation tools for exploratory and confirmatory classification analysis.

Options Collapse Hide details

Options

Model. You can specify the dependent (target) variable and one or more independent (predictor) variables. Optionally you can force one independent variable into the model as the first variable.

Growing Method. Four growing algorithms are available: CHAID (the default), Exhaustive CHAID, CRT, and QUEST. Each performs a type of recursive splitting. First, all predictors are examined to find the one that gives the best classification or prediction by splitting the sample into subgroups (nodes). The process is applied recursively, dividing the subgroups into smaller and smaller groups. It stops when one or more stopping criteria are met.

The four growing methods have different performance characteristics and features:

• CHAID chooses predictors that have the strongest interaction with the dependent variable. Predictor categories are merged if they are not significantly different with respect to the dependent variable (Kass, 1980).

• Exhaustive CHAID is a modification of CHAID that examines all possible splits for each predictor (Biggs et al., 1991).

• CRT is a family of methods that maximizes within-node homogeneity (Breiman et al., 1984).

• QUEST trees are computed rapidly, but the method is available only if the dependent variable is nominal. (Loh and Shih, 1997).

Stopping Criteria. You can set parameters that limit the size of the tree and control the minimum number of cases in each node.

Validation. You can assess how well your tree structure generalizes to a larger sample. Split-sample partitioning and cross-validation are supported. Partitioning divides your data into a training sample, from which the tree is grown, and a testing sample, on which the tree is tested. Cross-validation involves dividing the sample into a number of smaller samples. Trees are generated excluding the data from each subsample in turn. For each tree, misclassification risk is estimated using data for the subsample that was excluded in generating it. A cross-validated risk estimate is calculated as the average risk across trees.

Output. Default output includes a tree diagram and risk statistics. Classification accuracy is reported if the dependent variable is categorical. Optionally, you can obtain charts of gain- and profit-related measures as well as classification rules that can be used to select or score new cases. You can also save the model’s predictions to the active dataset, including assigned segment (node), predicted class/value, and predicted probability.

Basic Specification Collapse Hide details

Basic Specification

• The basic specification is a dependent variable and one or more independent variables.

Operations Collapse Hide details

Operations

• The tree is grown until one or more stopping criteria are met. The default growing method is CHAID.

• The type of model depends on the measurement level of the dependent variable. If the dependent variable is scale (continuous), a prediction model is computed. If it is categorical (nominal or ordinal), a classification model is generated.

• Measurement level determines allowable combinations of predictor values within a node. For ordinal and scale predictors, only adjacent categories/values may occur in a node. There are no restrictions on grouping of nominal categories.

• TREE honors the SET SEED value if split-sample model validation is requested.

• SPLIT FILE is ignored by the TREE procedure.

• If a WEIGHT variable is defined the weights are treated as replication weights. Fractional weights are rounded.

Syntax Rules Collapse Hide details

Syntax Rules

• The minimum specification is a dependent variable, the keyword BY and one or more independent variables.

• All subcommands are optional.

• Only a single instance of each subcommand is allowed.

• A keyword may be specified only once within a subcommand.

• Equals signs (=) shown in the syntax chart are required.

• Subcommand names and keywords must be spelled in full.

• Subcommands may be used in any order.

Limitations Collapse Hide details

Limitations

• SPLIT FILE is ignored by the TREE procedure.

• CHAID and Exhaustive CHAID: A categorical dependent variable may not have more than 126 categories. If the dependent variable categorical, then the limit for a categorical predictor is also 126 categories.

• CRT: A nominal predictor may not have more than 25 categories.

• QUEST: If a predictor is nominal, then the limit for the dependent variable (which must be nominal) is 127 categories. A nominal predictor may not have more than 25 categories.

Examples

TREE risk BY income age creditscore employment.

• A tree model is computed that estimates credit risk using an individual’s income, age, credit score, and employment category as predictor variables.

• The default method, CHAID, is used to grow the tree.

• Since measurement level is not specified, it is obtained from the data dictionary for each model variable. If no measurement levels have been defined, numeric variables are treated as scale and string variables are treated as nominal.

TREE risk [o] BY income [o] age [s] creditscore [s] employment [n]
  /METHOD TYPE=CRT
  /VALIDATION TYPE=SPLITSAMPLE
  /SAVE NODEID PREDVAL.

• A tree model is computed that estimates credit risk using an individual’s income, age, credit score, and employment category as predictor variables.

• Age and credit score will be treated as scale variables, risk and income as ordinal, and employment category as nominal.

• The CRT method, which performs binary splits, is used to grow the tree.

• Split-sample validation is requested. By default, 50% of cases are assigned to the training sample. Remaining cases are used to validate the tree.

• Two variables are saved to the active dataset: node (segment) identifier and predicted value.

Related Topics

TREE
Model Variables (TREE command)
Measurement Level (TREE command)
FORCE Keyword (TREE command)
DEPCATEGORIES Subcommand (TREE command)
TREE Subcommand (TREE command)
PRINT Subcommand (TREE command)
GAIN Subcommand (TREE command)
PLOT Subcommand (TREE command)
RULES Subcommand (TREE command)
SAVE Subcommand (TREE command)
METHOD Subcommand (TREE command)
GROWTHLIMIT Subcommand (TREE command)
VALIDATION Subcommand (TREE command)
CHAID Subcommand (TREE command)
CRT Subcommand (TREE command)
QUEST Subcommand (TREE command)
COSTS Subcommand (TREE command)
Custom Costs (TREE command)
PRIORS Subcommand (TREE command)
SCORES Subcommand (TREE command)
PROFITS Subcommand (TREE command)
INFLUENCE Subcommand (TREE command)
OUTFILE Subcommand (TREE command)
MISSING Subcommand (TREE command)
TARGETRESPONSE Subcommand (TREE command)


Model Variables (TREE command)

TREE (command),TREE (command),TREE (command)
model variables,model variables,model variables

The command name TREE is followed by the dependent variable, the keyword BY, and one or more independent variables.

Dependent Variable Collapse Hide details

Dependent Variable

The dependent (target) variable must be the first specification on the TREE command.

• Only one dependent variable can be specified.

• The dependent variable cannot be the WEIGHT variable.

Independent Variables Collapse Hide details

Independent Variables

You can specify one or more independent (predictor) variables.

• ALL and TO can be used in the independent variable list. ALL represents all variables in the active dataset. TO refers to a range of variables in the active dataset.

• In general, if the independent variable list refers to the WEIGHT variable or a variable that is used elsewhere in the tree specification (e.g., dependent variable or cell weight variable), the variable is not used as an independent variable. The exception is that scale variables used both in the independent variable list and the INTERVAL subcommand are not dropped from the independent variable list.

• Repeated instances of the same independent variable are filtered out of the list. For example, a b a c a is equivalent to a b c. Assuming that the active dataset contains variables a, b, and c, a ALL is also equivalent to a b c.

Related Topics

TREE
Overview (TREE command)
Measurement Level (TREE command)
FORCE Keyword (TREE command)
DEPCATEGORIES Subcommand (TREE command)
TREE Subcommand (TREE command)
PRINT Subcommand (TREE command)
GAIN Subcommand (TREE command)
PLOT Subcommand (TREE command)
RULES Subcommand (TREE command)
SAVE Subcommand (TREE command)
METHOD Subcommand (TREE command)
GROWTHLIMIT Subcommand (TREE command)
VALIDATION Subcommand (TREE command)
CHAID Subcommand (TREE command)
CRT Subcommand (TREE command)
QUEST Subcommand (TREE command)
COSTS Subcommand (TREE command)
Custom Costs (TREE command)
PRIORS Subcommand (TREE command)
SCORES Subcommand (TREE command)
PROFITS Subcommand (TREE command)
INFLUENCE Subcommand (TREE command)
OUTFILE Subcommand (TREE command)
MISSING Subcommand (TREE command)
TARGETRESPONSE Subcommand (TREE command)


Measurement Level (TREE command)

TREE (command),TREE (command),TREE (command)
measurement level,measurement level,measurement level

Optionally, a measurement level can be specified in square brackets following any model variable. The measurement level can be defined as scale ([S]), ordinal ([O]), or nominal ([N]). Categorical ([C]) is accepted as a synonym for nominal.

• If a measurement level is specified, it temporarily overrides the setting recorded in the data dictionary. If a measurement level is not specified for a variable, the dictionary setting is used.

• If a measurement level is not specified and no setting is recorded in the data dictionary, a numeric variable is treated as scale and a string variable is treated as nominal.

• If a string variable is defined as scale, a warning is issued and the variable is treated as nominal.

• A measurement level applies only to the variable that immediately precedes it in the variable list. For example, age income [S] and age TO income [S] assign the scale level of measurement to income only.

• The keyword ALL followed by a measurement level specification will apply that measurement level to all independent variables.

• If a variable appears more than once in the independent variable list and the measurement level varies across instances, the measurement level specified for the last instance of the variable is used. For example, if ALL [S] z [N] is specified, z is treated as a nominal predictor.

Related Topics

TREE
Overview (TREE command)
Model Variables (TREE command)
FORCE Keyword (TREE command)
DEPCATEGORIES Subcommand (TREE command)
TREE Subcommand (TREE command)
PRINT Subcommand (TREE command)
GAIN Subcommand (TREE command)
PLOT Subcommand (TREE command)
RULES Subcommand (TREE command)
SAVE Subcommand (TREE command)
METHOD Subcommand (TREE command)
GROWTHLIMIT Subcommand (TREE command)
VALIDATION Subcommand (TREE command)
CHAID Subcommand (TREE command)
CRT Subcommand (TREE command)
QUEST Subcommand (TREE command)
COSTS Subcommand (TREE command)
Custom Costs (TREE command)
PRIORS Subcommand (TREE command)
SCORES Subcommand (TREE command)
PROFITS Subcommand (TREE command)
INFLUENCE Subcommand (TREE command)
OUTFILE Subcommand (TREE command)
MISSING Subcommand (TREE command)
TARGETRESPONSE Subcommand (TREE command)


FORCE Keyword (TREE command)

TREE (command),TREE (command),TREE (command)
forcing a variable into the model,forcing a variable into the model,forcing a variable into the model

• By default, the procedure evaluates each predictor variable for inclusion in the model. The optional FORCE keyword forces an independent variable into the model as the first split variable (the first variable used to split the root node into child nodes).

• The FORCE keyword must be followed by an equals sign (=) and a single variable.

• A measurement level may be specified in square brackets following the variable name. If the variable is also included in the independent variable list, the measurement level specified for the FORCE variable is used. If the variable has a specified measurement level in the independent list but no explicit measurement level on the FORCE specification, the defined measurement level for the variable is used.

• The variable cannot be the dependent variable or the WEIGHT variable.

Example

TREE risk [o] BY income [o] age [s] creditscore [s] FORCE = gender [n].

• The independent variables income, age, and creditscore may or may not be included in the model, depending on how strongly they interact with the dependent variable risk.

• The independent variable gender will be included in the model regardless of the level of interaction with the dependent variable, and the root node will first be split into nodes for male and female before any other independent variables are considered.

Related Topics

TREE
Overview (TREE command)
Model Variables (TREE command)
Measurement Level (TREE command)
DEPCATEGORIES Subcommand (TREE command)
TREE Subcommand (TREE command)
PRINT Subcommand (TREE command)
GAIN Subcommand (TREE command)
PLOT Subcommand (TREE command)
RULES Subcommand (TREE command)
SAVE Subcommand (TREE command)
METHOD Subcommand (TREE command)
GROWTHLIMIT Subcommand (TREE command)
VALIDATION Subcommand (TREE command)
CHAID Subcommand (TREE command)
CRT Subcommand (TREE command)
QUEST Subcommand (TREE command)
COSTS Subcommand (TREE command)
Custom Costs (TREE command)
PRIORS Subcommand (TREE command)
SCORES Subcommand (TREE command)
PROFITS Subcommand (TREE command)
INFLUENCE Subcommand (TREE command)
OUTFILE Subcommand (TREE command)
MISSING Subcommand (TREE command)
TARGETRESPONSE Subcommand (TREE command)


DEPCATEGORIES Subcommand (TREE command)

missing values,missing values,missing values
TREE command,TREE command,TREE command
TREE (command),TREE (command),TREE (command)
DEPCATEGORIES subcommand,DEPCATEGORIES subcommand,DEPCATEGORIES subcommand
missing values,missing values,missing values
DEPCATEGORIES (subcommand),DEPCATEGORIES (subcommand),DEPCATEGORIES (subcommand)
TREE command,TREE command,TREE command

For categorical dependent variables, the DEPCATEGORIES subcommand controls the categories of the dependent variable included in the model and/or specifies target categories.

• By default, all valid categories are used in the analysis and user-missing values are excluded.

• There is no default target category.

• DEPCATEGORIES applies only to categorical dependent variables. If the dependent variable is scale, the subcommand is ignored and a warning is issued.

Example

TREE risk [n] BY income [o] age [s] creditscore [s] employment [n]
  /DEPCATEGORIES USEVALUES=[VALID 99] TARGET=[1].
USEVALUES keyword Collapse Hide details

USEVALUES keyword

USEVALUES controls the categories of the dependent variable included in the model.

• The keyword is followed by an equals sign (=) and a list of values enclosed in square brackets, as in: USEVALUES=[1 2 3].

• At least two values must be specified.

• Any cases with dependent variable values not included in the list are excluded from the analysis.

• Values can be string or numeric but must be consistent with the data type of the dependent variable. String and date values must be quoted. Date values must be consistent with the variable’s print format.

• If the dependent variable is nominal, the list can include user-missing values. If the dependent variable is ordinal, any user-missing values in the list are excluded and a warning is issued.

• The keywords VALID and MISSING can be used to specify all valid values and all user-missing values respectively. For example, USEVALUES=[VALID MISSING] will include all cases with valid or user-missing values for the dependent variable.

• A warning is issued if a specified category does not exist in the data or in the training sample if split-sample validation is in effect. See the topic VALIDATION Subcommand (TREE command) for more information.

TARGET Keyword Collapse Hide details

TARGET Keyword

The TARGET keyword specifies categories of the dependent variable that are of primary interest in the analysis. For example, if you are trying to predict mortality, "death" would be defined as the target category. If you are trying to identify individuals with high or medium credit risk, you would define both "high credit risk" and "medium credit risk" as target categories.

• The keyword is followed by an equals sign (=) and a list of values enclosed in square brackets, as in: TARGET=[1].

• There is no default target category. If not specified, some classification rule options and gains-related output are not available.

• Values can be string or numeric but must be consistent with the data type of the dependent variable. String and date values must be quoted. Date values must be consistent with the variable’s print format.

• If USEVALUES is also specified, the target categories must also be included (either implicitly or explicitly) in the USEVALUES list.

• If a target category is user-missing and the dependent variable is not nominal, the target category is ignored and a warning is issued.

Related Topics

TREE
Overview (TREE command)
Model Variables (TREE command)
Measurement Level (TREE command)
FORCE Keyword (TREE command)
TREE Subcommand (TREE command)
PRINT Subcommand (TREE command)
GAIN Subcommand (TREE command)
PLOT Subcommand (TREE command)
RULES Subcommand (TREE command)
SAVE Subcommand (TREE command)
METHOD Subcommand (TREE command)
GROWTHLIMIT Subcommand (TREE command)
VALIDATION Subcommand (TREE command)
CHAID Subcommand (TREE command)
CRT Subcommand (TREE command)
QUEST Subcommand (TREE command)
COSTS Subcommand (TREE command)
Custom Costs (TREE command)
PRIORS Subcommand (TREE command)
SCORES Subcommand (TREE command)
PROFITS Subcommand (TREE command)
INFLUENCE Subcommand (TREE command)
OUTFILE Subcommand (TREE command)
MISSING Subcommand (TREE command)
TARGETRESPONSE Subcommand (TREE command)


TREE Subcommand (TREE command)

TREE (command),TREE (command),TREE (command)
TREE subcommand,TREE subcommand,TREE subcommand
TREE (subcommand),TREE (subcommand),TREE (subcommand)
TREE command,TREE command,TREE command

The TREE subcommand allows you to specify the appearance of the tree or suppress it altogether. You can control its orientation, node contents, and the labeling of splits and nodes. Each keyword is followed by an equals sign (=) and the value for that keyword.

Example

TREE risk BY income age creditscore
  /TREE DISPLAY=LEFTTORIGHT NODES=BOTH BRANCHSTATISTICS=NO.
DISPLAY Keyword Collapse Hide details

DISPLAY Keyword

The DISPLAY keyword controls the orientation the tree and can also be used to suppress the display of the tree. The following alternatives are available:

TOPDOWN | Tree grows top down. The root node appears at the top of the diagram. The tree grows downward. This is the default.
LEFTTORIGHT | Tree grows from left to right.
RIGHTTOLEFT | Tree grows from right to left.
NONE | Tree diagram is not generated.
NODES Keyword Collapse Hide details

NODES Keyword

The NODES keyword controls the contents of tree nodes.

STATISTICS | Nodes display summary statistics. This is the default. For a categorical dependent variable, percentages and counts are shown for each category as well as the total count and percentage. (Total percentage is the percentage of cases in the sample assigned to the node. If you specify prior probabilities, the total percentage is adjusted to account for those priors.)
 | For a scale dependent variable, nodes display mean, standard deviation, number of cases, and predicted value.
CHART | Nodes display a summary chart. For a categorical dependent variable, nodes display a bar chart of percentages for each category. For a scale dependent variable a histogram is shown that summarizes the distribution of the dependent variable.
BOTH | Statistics and chart are shown.
BRANCHSTATISTICS Keyword Collapse Hide details

BRANCHSTATISTICS Keyword

The BRANCHSTATISTICS keyword controls whether branch (split) statistics are shown in the tree.

• For CHAID and Exhaustive CHAID, branch statistics include F value (for scale dependent variables) or chi-square value (for categorical dependent variables), as well as the significance value and degrees of freedom.

• For CRT, the improvement value is shown.

• For QUEST, F, the significance value, and degrees of freedom are shown for scale and ordinal independent variables. For nominal independent variables, chi-square, the significance value, and degrees of freedom are shown.

YES | Branch statistics are displayed. This is the default.
NO | Branch statistics are not displayed.
NODEDEFS Keyword Collapse Hide details

NODEDEFS Keyword

The NODEDEFS keyword controls whether descriptive labels are shown for each node. Node labels show the independent variable (predictor) values assigned to each node.

YES | Node labels are displayed. This is the default.
NO | Node labels are not displayed.
SCALE Keyword Collapse Hide details

SCALE Keyword

The SCALE keyword controls the initial scale of the tree diagram.

AUTO | Adjust the scale according to the number of nodes and levels of tree growth. The scale is reduced automatically for large trees. This is the default.
value | User-specified percentage value. The value can be between 5 and 200, inclusive.

Related Topics

TREE
Overview (TREE command)
Model Variables (TREE command)
Measurement Level (TREE command)
FORCE Keyword (TREE command)
DEPCATEGORIES Subcommand (TREE command)
PRINT Subcommand (TREE command)
GAIN Subcommand (TREE command)
PLOT Subcommand (TREE command)
RULES Subcommand (TREE command)
SAVE Subcommand (TREE command)
METHOD Subcommand (TREE command)
GROWTHLIMIT Subcommand (TREE command)
VALIDATION Subcommand (TREE command)
CHAID Subcommand (TREE command)
CRT Subcommand (TREE command)
QUEST Subcommand (TREE command)
COSTS Subcommand (TREE command)
Custom Costs (TREE command)
PRIORS Subcommand (TREE command)
SCORES Subcommand (TREE command)
PROFITS Subcommand (TREE command)
INFLUENCE Subcommand (TREE command)
OUTFILE Subcommand (TREE command)
MISSING Subcommand (TREE command)
TARGETRESPONSE Subcommand (TREE command)


PRINT Subcommand (TREE command)

TREE (command),TREE (command),TREE (command)
PRINT subcommand,PRINT subcommand,PRINT subcommand
PRINT (subcommand),PRINT (subcommand),PRINT (subcommand)
TREE command,TREE command,TREE command

The PRINT subcommand controls the display of optional tabular output. If the PRINT subcommand is specified, only the output explicitly requested will be produced. The subcommand name is followed by an equals sign (=) and one or more of the following options:

surrogate predictors,surrogate predictors,surrogate predictors
TREE command,TREE command,TREE command
classification tables,classification tables,classification tables
TREE command,TREE command,TREE command
risk estimates,risk estimates,risk estimates
TREE command,TREE command,TREE command
TREE (command),TREE (command),TREE (command)
tree model in table format,tree model in table format,tree model in table format
MODELSUMMARY | Model summary. The summary includes the method used, variables included in the model, and variables specified but not included in the model. Shown by default if subcommand omitted.
IMPORTANCE | Predictor importance. Ranks each independent (predictor) variable according to its importance to the model. IMPORTANCE can be specified only for the CRT method; otherwise it is ignored, and a warning is issued.
SURROGATES | Surrogate predictors. Lists surrogate predictors for each split in the tree. Each node is split based on an independent (predictor) variable; for cases in which the value for that predictor is missing, other predictors having high associations with the original predictor are used for classification. These alternative predictors are called surrogates. SURROGATES can be specified only for the CRT and QUEST methods. If surrogates are not computed, this keyword is ignored, and a warning is issued.
CLASSIFICATION | Classification table. Shows the number of cases classified correctly and incorrectly for each category of the dependent variable. A warning is issued if CLASSIFICATION is specified for a scale dependent variable. Shown by default for categorical dependent variables if subcommand omitted.
RISK | Risk estimate and its standard error. A measure of the tree’s predictive accuracy. For categorical dependent variables, the risk estimate is the proportion of cases correctly classified after adjustment for prior probabilities and misclassification costs. For scale dependent variables, the risk estimate is within-node variance. Shown by default if subcommand omitted.
CATEGORYSPECS | Cost, prior probability, score, and profit values used in the analysis. This keyword is ignored if the dependent variable is a scale variable.
TREETABLE | Tree model in tabular format. Summary information for each node in the tree, including parent node number, branch statistics, independent variable value(s) for the node, mean and standard deviation for scale dependent variables or counts and percents for categorical dependent variables.
CPS | Case processing summary. Shown by default if subcommand omitted.
NONE | None of the output controlled by the PRINT subcommand is generated. An error occurs if any other PRINT keyword is specified with NONE.

Related Topics

TREE
Overview (TREE command)
Model Variables (TREE command)
Measurement Level (TREE command)
FORCE Keyword (TREE command)
DEPCATEGORIES Subcommand (TREE command)
TREE Subcommand (TREE command)
GAIN Subcommand (TREE command)
PLOT Subcommand (TREE command)
RULES Subcommand (TREE command)
SAVE Subcommand (TREE command)
METHOD Subcommand (TREE command)
GROWTHLIMIT Subcommand (TREE command)
VALIDATION Subcommand (TREE command)
CHAID Subcommand (TREE command)
CRT Subcommand (TREE command)
QUEST Subcommand (TREE command)
COSTS Subcommand (TREE command)
Custom Costs (TREE command)
PRIORS Subcommand (TREE command)
SCORES Subcommand (TREE command)
PROFITS Subcommand (TREE command)
INFLUENCE Subcommand (TREE command)
OUTFILE Subcommand (TREE command)
MISSING Subcommand (TREE command)
TARGETRESPONSE Subcommand (TREE command)


GAIN Subcommand (TREE command)

TREE (command),TREE (command),TREE (command)
GAIN subcommand,GAIN subcommand,GAIN subcommand
GAIN (subcommand),GAIN (subcommand),GAIN (subcommand)
TREE command,TREE command,TREE command

The GAIN subcommand controls the display of tables that summarize gain and index values and other measures that indicate the relative performance of nodes in the tree. You can obtain tables that summarize results by node, percentile group, or both. Each keyword is followed by an equals sign (=) and the value for that keyword.

Example

TREE risk BY income age creditscore
  /GAIN SUMMARYTABLE=YES TYPE=[NODE, PTILE].
SUMMARYTABLE Keyword Collapse Hide details

SUMMARYTABLE Keyword

The SUMMARYTABLE keyword controls whether a summary table of index values is shown.

• For scale dependent variables, the table includes node number, number of cases, and mean value of the dependent variable.

• For categorical dependent variables, the table includes node number, number of cases, average profit, and ROI (return on investment) values.

• For categorical dependent variables, the summary table is not displayed unless profits have been specified on the PROFITS subcommand.

YES | Display summary table. This is the default for scale dependent variables if the subcommand is omitted or SUMMARYTABLE=NO is not included on the subcommand.
NO | The summary table is not displayed.
CATEGORYTABLE Keyword Collapse Hide details

CATEGORYTABLE Keyword

The CATEGORYTABLE keyword displays gain and index values for target categories of the dependent variable.

• The dependent variable must be categorical.

• Target categories must be specified on the DEPCATEGORIES subcommand.

• A separate table is generated for each target category.

• If the dependent variable is scale or no target categories are specified, the keyword is ignored and a warning is issued.

YES | Display a table of gain statistics for each target category of the dependent variable. The table includes percentage gain, response percent, and index percent (lift) by node or percentile group. This is the default.
NO | No category table is shown.
TYPE Keyword Collapse Hide details

TYPE Keyword

The TYPE keyword specifies the type of gain table(s) that are produced. The keyword is followed by an equals sign (=) and one or both of the following types enclosed in square brackets:

NODE | Terminal nodes. Rows of the table represent terminal nodes. This is the default.
PTILE | Percentile. Each row of the table summarizes a percentile group.
SORT Keyword Collapse Hide details

SORT Keyword

The SORT keyword specifies how rows are sorted in all gain tables.

DESCENDING | Rows are sorted in descending order of index value. This is the default.
ASCENDING | Rows are sorted in ascending order of index value.
INCREMENT Keyword Collapse Hide details

INCREMENT Keyword

The INCREMENT keyword controls the width of percentile groupings for a percentile gain table (TYPE=[PTILE]).

• The default increment is 10, which gives decile intervals.

• You can specify one of the following percentage increments: 1, 2, 5, 10, 20, or 25. If a different value is specified, a warning is issued and the default increment is used.

• INCREMENT is ignored for node-by-node gain tables.

CUMULATIVE Keyword Collapse Hide details

CUMULATIVE Keyword

The CUMULATIVE keyword specifies whether node-by-node tables (TYPE=[NODE]) include cumulative statistics. It is ignored for percentile gain tables, which are always cumulative.

YES | Cumulative statistics are displayed. This is the default.
NO | Cumulative statistics are not displayed.

Related Topics

TREE
Overview (TREE command)
Model Variables (TREE command)
Measurement Level (TREE command)
FORCE Keyword (TREE command)
DEPCATEGORIES Subcommand (TREE command)
TREE Subcommand (TREE command)
PRINT Subcommand (TREE command)
PLOT Subcommand (TREE command)
RULES Subcommand (TREE command)
SAVE Subcommand (TREE command)
METHOD Subcommand (TREE command)
GROWTHLIMIT Subcommand (TREE command)
VALIDATION Subcommand (TREE command)
CHAID Subcommand (TREE command)
CRT Subcommand (TREE command)
QUEST Subcommand (TREE command)
COSTS Subcommand (TREE command)
Custom Costs (TREE command)
PRIORS Subcommand (TREE command)
SCORES Subcommand (TREE command)
PROFITS Subcommand (TREE command)
INFLUENCE Subcommand (TREE command)
OUTFILE Subcommand (TREE command)
MISSING Subcommand (TREE command)
TARGETRESPONSE Subcommand (TREE command)


PLOT Subcommand (TREE command)

TREE (command),TREE (command),TREE (command)
PLOT subcommand,PLOT subcommand,PLOT subcommand
PLOT (subcommand),PLOT (subcommand),PLOT (subcommand)
TREE command,TREE command,TREE command

The PLOT subcommand generates charts that may help you evaluate your tree model. The subcommand name is followed by an equals sign (=) and any or all of the following chart types:

gain chart,gain chart,gain chart
TREE command,TREE command,TREE command
response chart,response chart,response chart
TREE command,TREE command,TREE command
index chart,index chart,index chart
TREE command,TREE command,TREE command
profit chart,profit chart,profit chart
TREE command,TREE command,TREE command
ROI chart,ROI chart,ROI chart
TREE command,TREE command,TREE command
importance chart,importance chart,importance chart
TREE command,TREE command,TREE command
GAIN | Line chart of percentage gain. The chart shows percentage gain for each target category of the dependent variable. GAIN is available only for categorical dependent variables with target categories defined on the DEPCATEGORIES subcommand.
RESPONSE | Line chart of response. The chart shows percentage of responses for each target category of the dependent variable. RESPONSE is available only for categorical dependent variables with target categories defined on the DEPCATEGORIES subcommand.
INDEX | Line chart of index percent. The chart shows index percent (lift). INDEX is available only for categorical dependent variables with target categories defined on the DEPCATEGORIES subcommand.
MEAN | Line chart of mean value for scale dependent variables. If the dependent variable is categorical, this keyword is ignored and a warning is issued.
PROFIT | Line chart of average profit for categorical dependent variables. If profits are not defined or the dependent variable is scale, this keyword is ignored and a warning is issued. See the topic PROFITS Subcommand (TREE command) for more information.
ROI | Line chart of ROI (return on investment). ROI is computed as the ratio of profits to expenses. If profits are not defined or the dependent variable is scale, this keyword is ignored and a warning is issued.
IMPORTANCE | Bar chart of model importance by predictor. IMPORTANCE is available for CRT models only; otherwise the keyword is ignored and a warning is issued.

Example

TREE risk [o] BY income age creditscore
 /METHOD TYPE=CRT
 /DEPCATEGORIES TARGET=[1]
 /PLOT=IMPORTANCE GAIN INDEX INCREMENT=5.
INCREMENT Keyword Collapse Hide details

INCREMENT Keyword

The INCREMENT keyword controls the width of percentile group charts.

• The keyword is followed by an equals sign (=) and one of the following values: 1, 2, 5, 10, 20, or 25. If a different value is specified a warning is issued and the default increment is used.

• INCREMENT is ignored for the predictor importance chart.

Related Topics

TREE
Overview (TREE command)
Model Variables (TREE command)
Measurement Level (TREE command)
FORCE Keyword (TREE command)
DEPCATEGORIES Subcommand (TREE command)
TREE Subcommand (TREE command)
PRINT Subcommand (TREE command)
GAIN Subcommand (TREE command)
RULES Subcommand (TREE command)
SAVE Subcommand (TREE command)
METHOD Subcommand (TREE command)
GROWTHLIMIT Subcommand (TREE command)
VALIDATION Subcommand (TREE command)
CHAID Subcommand (TREE command)
CRT Subcommand (TREE command)
QUEST Subcommand (TREE command)
COSTS Subcommand (TREE command)
Custom Costs (TREE command)
PRIORS Subcommand (TREE command)
SCORES Subcommand (TREE command)
PROFITS Subcommand (TREE command)
INFLUENCE Subcommand (TREE command)
OUTFILE Subcommand (TREE command)
MISSING Subcommand (TREE command)
TARGETRESPONSE Subcommand (TREE command)


RULES Subcommand (TREE command)

TREE (command),TREE (command),TREE (command)
selection and scoring rules,selection and scoring rules,selection and scoring rules
scoring rules,scoring rules,scoring rules
TREE command,TREE command,TREE command
selection rules,selection rules,selection rules
TREE command,TREE command,TREE command
TREE (command),TREE (command),TREE (command)
RULES subcommand,RULES subcommand,RULES subcommand
RULES (subcommand),RULES (subcommand),RULES (subcommand)
TREE command,TREE command,TREE command

The RULES subcommand generates syntax that can be used to select or classify cases based on values of independent (predictor) variables.

• You can generate rules for all nodes, all terminal nodes, the top n terminal nodes, terminal nodes that correspond to the top n percent of cases, or nodes with index values that meet or exceed a cutoff value.

• Rules are available in three different forms: internal command syntax format, SQL, and generic (plain English pseudocode).

• You can specify an external destination file for the rules.

• Each keyword is followed by an equals sign (=) and the value for that keyword.

Example

TREE risk [o] BY income age creditscore
 /RULES NODES=TERMINAL SYNTAX=INTERNAL TYPE=SCORING
  OUTFILE='/jobfiles/treescores.sps'.
NODES Keyword Collapse Hide details

NODES Keyword

The NODES keyword specifies the scope of generated rules. Specify one of the following alternatives:

TERMINAL | Generates rules for each terminal node. This is the default.
ALL | Generates rules for all nodes. Rules are shown for all parent and terminal nodes.

For categorical dependent variables with defined target categories, the following additional alternatives are available:

TOPN(value) | Generates rules for the top n terminal nodes based on index values. The number must be a positive integer, enclosed in parentheses. If the number exceeds the number of nodes in the tree, a warning is issued and rules are generated for all terminal nodes.
TOPPCT(value) | Generates rules for terminal nodes for the top n percent of cases based on index values. The percent value must be a positive number greater than zero and less than 100, enclosed in parentheses.
MININDEX(value) | Generates rules for all terminal nodes with an index value greater than or equal to the specified value. The value be a positive number, enclosed in parentheses.
SYNTAX Keyword Collapse Hide details

SYNTAX Keyword

The SYNTAX keyword specifies the syntax of generated rules. It determines the form of the selection rules in both output displayed in the Viewer and selection rules saved to an external file.

INTERNAL | Command syntax language. Rules are expressed as a set of commands that define a filter condition that can be used to select subsets of cases (this is the default) or as COMPUTE statements that can be used to score cases (with TYPE=SCORING).
SQL | SQL. Standard SQL rules are generated to select/extract records from a database or assign values to those records. The generated SQL rules do not include any table names or other data source information.
GENERIC | Plain English pseudocode. Rules are expressed as a set of logical "if...then" statements that describe the model’s classifications or predictions for each node.
TYPE Keyword Collapse Hide details

TYPE Keyword

The TYPE keyword specifies the type of SQL or internal command syntax rules to generate. It is ignored if generic rules are requested.

SCORING | Scoring of cases. The rules can be used to assign the model’s predictions to cases that meet node membership criteria. A separate rule is generated for each node within the scope specified on the NODES keyword. This is the default.
SELECTION | Selection of cases. The rules can be used to select cases that meet node membership criteria. For internal command syntax and SQL rules, a single rule is generated to select all cases within the scope specified on the NODES keyword.
 | Note: For internal command syntax or SQL rules with NODES=TERMINAL and NODES=ALL, TYPE=SELECTION will produce a rule that effectively selects every case included in the analysis.
SURROGATES Keyword Collapse Hide details

SURROGATES Keyword

For CRT and QUEST, the SURROGATES keyword controls whether rules use surrogate predictors to classify cases that have missing predictor values. The keyword is ignored if the method is not CRT or QUEST or if generic rules are requested.

Rules that include surrogates can be quite complex. In general, if you just want to derive conceptual information about your tree, exclude surrogates. If some cases have incomplete predictor data and you want rules that mimic your tree, include surrogates.

INCLUDE | Include surrogates. Surrogate predictors are used in generated rules. This is the default.
EXCLUDE | Exclude surrogates. Rules exclude surrogate predictors.
LABELS Keyword Collapse Hide details

LABELS Keyword

The LABELS keyword specifies whether value and variable labels are used in generic decision rules.

• By default, any defined value and variable labels are used. When labels aren’t available, values and variable names are used.

• LABELS is ignored for SQL and internal command syntax rules.

YES | Any defined value and variable labels are used in generic rules. This is the default.
NO | Values and variable names are used instead of labels.
OUTFILE Keyword Collapse Hide details

OUTFILE Keyword

OUTFILE writes the rules to an external text file.

• The keyword is followed by an equals sign (=) and a file specification enclosed in quotes.

• If the file specification includes a path, an error will result if the specified directory/folder location doesn’t exist.

• For command syntax, the file can be used as a command syntax file in both interactive and batch modes.

• For SQL syntax, the generated SQL does not include any table names or other data source information.

• OUTFILE is ignored if NODES=NONE, and a warning is issued.

Related Topics

TREE
Overview (TREE command)
Model Variables (TREE command)
Measurement Level (TREE command)
FORCE Keyword (TREE command)
DEPCATEGORIES Subcommand (TREE command)
TREE Subcommand (TREE command)
PRINT Subcommand (TREE command)
GAIN Subcommand (TREE command)
PLOT Subcommand (TREE command)
SAVE Subcommand (TREE command)
METHOD Subcommand (TREE command)
GROWTHLIMIT Subcommand (TREE command)
VALIDATION Subcommand (TREE command)
CHAID Subcommand (TREE command)
CRT Subcommand (TREE command)
QUEST Subcommand (TREE command)
COSTS Subcommand (TREE command)
Custom Costs (TREE command)
PRIORS Subcommand (TREE command)
SCORES Subcommand (TREE command)
PROFITS Subcommand (TREE command)
INFLUENCE Subcommand (TREE command)
OUTFILE Subcommand (TREE command)
MISSING Subcommand (TREE command)
TARGETRESPONSE Subcommand (TREE command)


SAVE Subcommand (TREE command)

TREE (command),TREE (command),TREE (command)
SAVE subcommand,SAVE subcommand,SAVE subcommand
SAVE (subcommand),SAVE (subcommand),SAVE (subcommand)
TREE command,TREE command,TREE command

The SAVE subcommand writes optional model variables to the active dataset.

• Specify one or more model variables.

• Optionally, you can specify new variable names in parentheses after each model variable name. The names must be unique, valid variable names.

• If new names are not specified, or if specified names are not valid variable names, unique variable names are automatically generated using the model variable name with a suffix.

TREE (command),TREE (command),TREE (command)
saving terminal node number as variable,saving terminal node number as variable,saving terminal node number as variable
terminal nodes,terminal nodes,terminal nodes
saving terminal node number as variable,saving terminal node number as variable,saving terminal node number as variable
nodes,nodes,nodes
saving terminal node number as variable,saving terminal node number as variable,saving terminal node number as variable
TREE (command),TREE (command),TREE (command)
saving predicted value as variable,saving predicted value as variable,saving predicted value as variable
predicted values,predicted values,predicted values
saving as variable in Tree command,saving as variable in Tree command,saving as variable in Tree command
TREE (command),TREE (command),TREE (command)
saving predicted probability as variable,saving predicted probability as variable,saving predicted probability as variable
NODEID | Node identifier. The terminal node to which a case is assigned. The value is the tree node number.
PREDVAL | Predicted value. The class or value predicted by the model.
PREDPROB | Predicted probability. The probability associated with the model’s prediction. One variable is saved for each category of the dependent variable. If you specify an optional variable name, it is used as a root for generated variable names. PREDPROB is ignored if the dependent variable is a scale variable. Probabilities are saved only for the first 126 categories of the dependent variable when the CRT or QUEST algorithms are used.
ASSIGNMENT | Sample assignment. The variable indicates whether a case was used in the training or testing sample. Cases in the training sample have a value of 1, and cases in the testing sample have a value of 0. ASSIGNMENT is ignored if split-sample validation is not specified.

Example

TREE risk [o] BY income age creditscore
 /SAVE NODEID(node_number) PREDVAL(predicted_value).

Related Topics

TREE
Overview (TREE command)
Model Variables (TREE command)
Measurement Level (TREE command)
FORCE Keyword (TREE command)
DEPCATEGORIES Subcommand (TREE command)
TREE Subcommand (TREE command)
PRINT Subcommand (TREE command)
GAIN Subcommand (TREE command)
PLOT Subcommand (TREE command)
RULES Subcommand (TREE command)
METHOD Subcommand (TREE command)
GROWTHLIMIT Subcommand (TREE command)
VALIDATION Subcommand (TREE command)
CHAID Subcommand (TREE command)
CRT Subcommand (TREE command)
QUEST Subcommand (TREE command)
COSTS Subcommand (TREE command)
Custom Costs (TREE command)
PRIORS Subcommand (TREE command)
SCORES Subcommand (TREE command)
PROFITS Subcommand (TREE command)
INFLUENCE Subcommand (TREE command)
OUTFILE Subcommand (TREE command)
MISSING Subcommand (TREE command)
TARGETRESPONSE Subcommand (TREE command)


METHOD Subcommand (TREE command)

TREE (command),TREE (command),TREE (command)
METHOD subcommand,METHOD subcommand,METHOD subcommand
METHOD (subcommand),METHOD (subcommand),METHOD (subcommand)
TREE command,TREE command,TREE command

The METHOD subcommand specifies the growing method and optional parameters. Each keyword is followed by an equals sign (=) and the value for that keyword.

Example

TREE risk [o] BY income age creditscore
 /METHOD TYPE=CRT MAXSURROGATES=2 PRUNE=SE(0).
TYPE Keyword Collapse Hide details

TYPE Keyword

TYPE specifies the growing method. For CRT and QUEST, splits are always binary. CHAID and Exhaustive CHAID allow multiway splits.

CHAID | Chi-squared Automatic Interaction Detection. At each step, CHAID chooses the independent (predictor) variable that has the strongest interaction with the dependent variable. Categories of each predictor are merged if they are not significantly different with respect to the dependent variable. This is the default method.
EXHAUSTIVECHAID | Exhaustive CHAID. A modification of CHAID that examines all possible ways of merging predictor categories.
CRT | Classification and Regression Trees. CRT splits the data into segments that are as homogeneous as possible with respect to the dependent variable.
QUEST | Quick, Unbiased, Efficient Statistical Tree. A method that is fast and avoids other methods' bias in favor of predictors with many categories. QUEST can be specified only if the dependent variable is nominal. An error occurs if the dependent variable is ordinal or scale.
MAXSURROGATES Keyword Collapse Hide details

MAXSURROGATES Keyword

CRT and QUEST can use surrogates for independent (predictor) variables. For cases in which the value for that predictor is missing, other predictors having high associations with the original predictor are used for classification. These alternative predictors are called surrogates. The MAXSURROGATES keyword specifies the maximum number of surrogate predictors to compute.

If the growing method is CHAID or EXHAUSTIVECHAID, this keyword is ignored and a warning is issued.

AUTO | The maximum is the number of independent variables minus one. This is the default.
value | User-specified value. The value must be a non-negative integer that is less than the number of independent variables in the model. If you don’t want to use surrogates in the model, specify MAXSURROGATES=0. If the value equals or exceeds the number of independent variables, the setting is ignored and a warning is issued.
PRUNE Keyword Collapse Hide details

PRUNE Keyword

For CRT and QUEST, the tree can be automatically pruned. Pruning can help avoid creating a tree that overfits the data. If you request pruning, the tree is grown until stopping criteria are met. Then it is trimmed automatically according to the specified criterion.

If the growing method is CHAID or EXHAUSTIVECHAID, PRUNE is ignored and a warning is issued.

NONE | The tree is not pruned. This is the default.
SE(value) | Prune tree using standard error criterion. The procedure prunes down to the smallest subtree with a risk value within a specified number of standard errors of that of the subtree with the minimum risk. You can specify the number of standard errors in parentheses. The default is 1. The value must be nonnegative. To obtain the subtree with the minimum risk, specify 0.

Related Topics

TREE
Overview (TREE command)
Model Variables (TREE command)
Measurement Level (TREE command)
FORCE Keyword (TREE command)
DEPCATEGORIES Subcommand (TREE command)
TREE Subcommand (TREE command)
PRINT Subcommand (TREE command)
GAIN Subcommand (TREE command)
PLOT Subcommand (TREE command)
RULES Subcommand (TREE command)
SAVE Subcommand (TREE command)
GROWTHLIMIT Subcommand (TREE command)
VALIDATION Subcommand (TREE command)
CHAID Subcommand (TREE command)
CRT Subcommand (TREE command)
QUEST Subcommand (TREE command)
COSTS Subcommand (TREE command)
Custom Costs (TREE command)
PRIORS Subcommand (TREE command)
SCORES Subcommand (TREE command)
PROFITS Subcommand (TREE command)
INFLUENCE Subcommand (TREE command)
OUTFILE Subcommand (TREE command)
MISSING Subcommand (TREE command)
TARGETRESPONSE Subcommand (TREE command)


GROWTHLIMIT Subcommand (TREE command)

TREE (command),TREE (command),TREE (command)
GROWTHLIMIT subcommand,GROWTHLIMIT subcommand,GROWTHLIMIT subcommand
GROWTHLIMIT (subcommand),GROWTHLIMIT (subcommand),GROWTHLIMIT (subcommand)
TREE command,TREE command,TREE command

The GROWTHLIMIT subcommand specifies stopping criteria that limit the size of the tree. Each keyword is followed by an equals sign (=) and the value for that keyword.

Example

TREE risk [o] BY income age creditscore
 /METHOD TYPE=CRT
 /GROWTHLIMIT MAXDEPTH=4 MINCHILDSIZE=10.
MAXDEPTH Keyword Collapse Hide details

MAXDEPTH Keyword

MAXDEPTH specifies the maximum number of levels of growth beneath the root node. You can change the maximum depth to adjust the size of the tree.

AUTO | Three levels for CHAID and Exhaustive CHAID, five levels for CRT and QUEST. This is the default.
value | User-specified value. The value must be a positive integer.
MINPARENTSIZE Keyword Collapse Hide details

MINPARENTSIZE Keyword

MINPARENTSIZE specifies the minimum number of cases required to split a node. Nodes with fewer cases are not split. You can use this setting to avoid splitting nodes that have few cases.

• The size value must be a positive integer. The default is 100.

• MINPARENTSIZE must be greater than MINCHILDSIZE.

MINCHILDSIZE Keyword Collapse Hide details

MINCHILDSIZE Keyword

MINCHILDSIZE specifies the minimum number of cases in any child node. A node will not be split if any of the resulting child nodes would have fewer cases than the specified value.

• The size value must be a positive integer. The default is 50.

• MINCHILDSIZE must be less than MINPARENTSIZE.

MINIMPROVEMENT Keyword Collapse Hide details

MINIMPROVEMENT Keyword

For CRT, you can use MINIMPROVEMENT to specify the minimum decrease in impurity. The CRT growing method attempts to maximize within-node homogeneity. In other words, a terminal node in which all cases have the same value for the dependent variable is a homogeneous, "pure" node. A node is not split if impurity would decrease less than the specified value.

The improvement value must be positive value. The default is 0.0001. As the value increases, the number of nodes in the tree tends to decrease.

Related Topics

TREE
Overview (TREE command)
Model Variables (TREE command)
Measurement Level (TREE command)
FORCE Keyword (TREE command)
DEPCATEGORIES Subcommand (TREE command)
TREE Subcommand (TREE command)
PRINT Subcommand (TREE command)
GAIN Subcommand (TREE command)
PLOT Subcommand (TREE command)
RULES Subcommand (TREE command)
SAVE Subcommand (TREE command)
METHOD Subcommand (TREE command)
VALIDATION Subcommand (TREE command)
CHAID Subcommand (TREE command)
CRT Subcommand (TREE command)
QUEST Subcommand (TREE command)
COSTS Subcommand (TREE command)
Custom Costs (TREE command)
PRIORS Subcommand (TREE command)
SCORES Subcommand (TREE command)
PROFITS Subcommand (TREE command)
INFLUENCE Subcommand (TREE command)
OUTFILE Subcommand (TREE command)
MISSING Subcommand (TREE command)
TARGETRESPONSE Subcommand (TREE command)


VALIDATION Subcommand (TREE command)

TREE (command),TREE (command),TREE (command)
VALIDATION subcommand,VALIDATION subcommand,VALIDATION subcommand
VALIDATION (subcommand),VALIDATION (subcommand),VALIDATION (subcommand)
TREE command,TREE command,TREE command

The VALIDATION subcommand allows you to assess how well your tree structure generalizes to a larger population.

• Split-sample validation and cross-validation are available.

• By default, validation is not performed.

• If you want to be able to reproduce validated results later, use SET SEED before the TREE procedure to initial the random number seed.

Each keyword in the subcommand is followed by an equals sign (=) and the value for that keyword.

Example

TREE risk [o] BY income age creditscore
 /VALIDATION TYPE=SPLITSAMPLE(25) OUTPUT=TESTSAMPLE.
TYPE Keyword Collapse Hide details

TYPE Keyword

NONE | The tree model is not validated. This is the default.
SPLITSAMPLE(percent) | Split-sample validation. The model is generated using a training sample and tested on a hold-out sample. The value or variable specified in parentheses determines the training sample size. Enter a percent value greater than 0 and less than 100, or a numeric variable, the values of which determine how cases are assigned to the training or testing samples: cases with a value of 1 for the variable are assigned to the training sample, and all other cases are assigned to the testing sample. The variable cannot be the dependent variable, weight variable, influence variable or a forced independent variable. See the topic INFLUENCE Subcommand (TREE command) for more information. Note: Split-sample validation should be used with caution on small data files (data files with a small number of cases). Small training sample sizes may yield poor models since there may not be enough cases in some categories to adequately grow the tree.
CROSSVALIDATION (value) | Crossvalidate the tree model. The sample is divided into a number of subsamples, or folds. Tree models are then generated excluding the data from each subsample in turn. The first tree is based on all of the cases except those in the first sample fold, the second tree is based on all of the cases except those in the second sample fold, and so on. For each tree, misclassification risk is estimated by applying the tree to the subsample excluded in generating it. Specify a positive integer between 2 and 25 in parentheses. The higher the value, the fewer the number of cases excluded for each tree model. Crossvalidation produces a single, final tree model. The cross-validated risk estimate for the final tree is calculated as the average of the risks for all of the trees. CROSSVALIDATION is ignored with a warning if FORCE is also specified.
OUTPUT Keyword Collapse Hide details

OUTPUT Keyword

With split-sample validation, the OUTPUT keyword controls the output generated. This setting is ignored if SPLITSAMPLE is not specified.

BOTHSAMPLES | Output is produced for training and test samples. This is the default. Choose this option if you want to compare results for each partition.
TESTSAMPLE | Output is produced for the test sample only. Choose this option if you want validated results only.

Related Topics

TREE
Overview (TREE command)
Model Variables (TREE command)
Measurement Level (TREE command)
FORCE Keyword (TREE command)
DEPCATEGORIES Subcommand (TREE command)
TREE Subcommand (TREE command)
PRINT Subcommand (TREE command)
GAIN Subcommand (TREE command)
PLOT Subcommand (TREE command)
RULES Subcommand (TREE command)
SAVE Subcommand (TREE command)
METHOD Subcommand (TREE command)
GROWTHLIMIT Subcommand (TREE command)
CHAID Subcommand (TREE command)
CRT Subcommand (TREE command)
QUEST Subcommand (TREE command)
COSTS Subcommand (TREE command)
Custom Costs (TREE command)
PRIORS Subcommand (TREE command)
SCORES Subcommand (TREE command)
PROFITS Subcommand (TREE command)
INFLUENCE Subcommand (TREE command)
OUTFILE Subcommand (TREE command)
MISSING Subcommand (TREE command)
TARGETRESPONSE Subcommand (TREE command)


CHAID Subcommand (TREE command)

TREE (command),TREE (command),TREE (command)
significance levels for node splitting and merging,significance levels for node splitting and merging,significance levels for node splitting and merging
TREE (command),TREE (command),TREE (command)
CHAID subcommand,CHAID subcommand,CHAID subcommand
CHAID (subcommand),CHAID (subcommand),CHAID (subcommand)
TREE command,TREE command,TREE command

The CHAID subcommand sets parameters for a CHAID tree. Except where noted, all parameters also apply to Exhaustive CHAID. It is ignored for CRT and QUEST trees, and an warning is issued.

Each keyword in the subcommand is followed by an equals sign (=) and the value for that keyword.

Example

TREE risk [o] BY income age creditscore
 /METHOD TYPE=CHAID
 /CHAID ALPHASPLIT=.01 INTERVALS=age income (10) creditscore (5).
ALPHASPLIT Keyword Collapse Hide details

ALPHASPLIT Keyword

The ALPHASPLIT keyword specifies the significance level for splitting of nodes. An independent variable will not be used in the tree if significance level for the split statistic (chi-square or F) is less than or equal to specified value.

• Specify a value greater than zero and less than 1.

• The default value is 0.05.

ALPHAMERGE Keyword Collapse Hide details

ALPHAMERGE Keyword

The ALPHAMERGE keyword specifies the significance level for merging of predictor categories. Small values tend to result in a greater degree of merging.

• Specify a value greater than zero and less than or equal to 1.

• The default value is 0.05.

• If you specify a value of 1, predictor categories are not merged.

• ALPHAMERGE is available only for the CHAID method. For Exhaustive CHAID, the keyword is ignored, and a warning is issued.

SPLITMERGED Keyword Collapse Hide details

SPLITMERGED Keyword

The SPLITMERGED keyword specifies whether predictor categories that are merged in a CHAID analysis are allowed to be resplit.

NO | Merged predictor categories cannot be resplit. This is the default.
YES | Merged predictor categories can be resplit.
CHISQUARE Keyword Collapse Hide details

CHISQUARE Keyword

For nominal dependent variables, the CHISQUARE keyword specifies the chi-square measure used in CHAID analysis. For ordinal and scale dependent variables, the keyword is ignored and a warning is issued.

PEARSON | Pearson chi-square. This is the default.
LR | Likelihood-ratio chi-square.
CONVERGE Keyword Collapse Hide details

CONVERGE Keyword

For nominal and ordinal dependent variables, the CONVERGE keyword specifies the convergence value for estimation of the CHAID model.

• Specify a value greater than zero and less than 1.

• The default value is 0.05.

• If the dependent variable is nominal or scale, this keyword is ignored, and a warning is issued.

MAXITERATIONS Keyword Collapse Hide details

MAXITERATIONS Keyword

For nominal and ordinal dependent variables, the MAXITERATIONS keyword specifies the maximum number of iterations for estimation of the CHAID model.

• Specify a positive integer value.

• The default value is 100.

• If the dependent variable is nominal or scale, this keyword is ignored, and a warning is issued.

ADJUST Keyword Collapse Hide details

ADJUST Keyword

The ADJUST keyword specifies how to adjust significance values for multiple comparisons.

BONFERRONI | Significance values are adjusted using the Bonferroni method. This is the default.
NONE | Significance values are not adjusted.
INTERVALS Keyword Collapse Hide details

INTERVALS Keyword

In CHAID analysis, scale independent (predictor) variables are always banded into discrete groups (for example, 0-10, 11-20, 21-30, and so on) prior to analysis. You can use the INTERVALS keyword to control the number of discrete intervals for scale predictors.

• By default, each scale predictor is divided into 10 intervals that have approximately equal numbers of cases.

• The INTERVALS keyword is ignored if the model contains no scale independent variables.

value | The specified value applies to all scale predictors. For example: INTERVALS=5. The value must be a positive integer less than or equal to 64.
varlist (value) | The specified value applies to the preceding variable list only. Specify a list of variables followed by the number of intervals in parentheses. Multiple lists can be specified. For example: INTERVALS=age income (10) creditscore (5). The value must be a positive integer less than or equal to 64.

For the varlist (value) form:

• If a variable in the list is not a scale variable and/or the variable is not specified as an independent variable, the interval specification is ignored for that variable, and a warning is issued.

• If a variable appears in more than one list, the last specification is used.

• For any scale variables not include in the list(s), the default number of intervals (10) is used.

Related Topics

TREE
Overview (TREE command)
Model Variables (TREE command)
Measurement Level (TREE command)
FORCE Keyword (TREE command)
DEPCATEGORIES Subcommand (TREE command)
TREE Subcommand (TREE command)
PRINT Subcommand (TREE command)
GAIN Subcommand (TREE command)
PLOT Subcommand (TREE command)
RULES Subcommand (TREE command)
SAVE Subcommand (TREE command)
METHOD Subcommand (TREE command)
GROWTHLIMIT Subcommand (TREE command)
VALIDATION Subcommand (TREE command)
CRT Subcommand (TREE command)
QUEST Subcommand (TREE command)
COSTS Subcommand (TREE command)
Custom Costs (TREE command)
PRIORS Subcommand (TREE command)
SCORES Subcommand (TREE command)
PROFITS Subcommand (TREE command)
INFLUENCE Subcommand (TREE command)
OUTFILE Subcommand (TREE command)
MISSING Subcommand (TREE command)
TARGETRESPONSE Subcommand (TREE command)


CRT Subcommand (TREE command)

TREE (command),TREE (command),TREE (command)
CRT subcommand,CRT subcommand,CRT subcommand
CRT (subcommand),CRT (subcommand),CRT (subcommand)
TREE command,TREE command,TREE command

The CRT subcommand sets parameters for the CRT method. For other tree growing methods, the subcommand is ignored, and a warning is issued.

Each keyword in the subcommand is followed by an equals sign (=) and the value for that keyword.

Example

TREE risk [o] BY income age creditscore
 /METHOD TYPE=CRT
 /CRT IMPURITY=TWOING MINIMPROVEMENT=.001.
IMPURITY Keyword Collapse Hide details

IMPURITY Keyword

For categorical dependent variables, the IMPURITY keyword specifies the impurity measure used.

GINI | Gini is based on squared probabilities of membership for each category of the dependent variable. It reaches its minimum (zero) when all cases in a node fall into a single category. This is the default.
TWOING | Twoing groups categories of the dependent variable into the two best subclasses and computes the variance of the binary variable indicating the subclass to which each case belongs.
ORDEREDTWOING | A variant of twoing for ordinal dependent variables in which only adjacent classes can be combined. This method is available only for ordinal dependent variables only.

For scale dependent variables the least squared deviation (LSD) measure of impurity is used. It is computed as the within-node variance, adjusted for any frequency weights or influence values.

MINIMPROVEMENT Keyword Collapse Hide details

MINIMPROVEMENT Keyword

MINIMPROVEMENT specifies the minimum decrease in impurity for CRT trees. A node is not split if impurity would decrease less than the specified value.

• The default value is 0.0001.

• Specify a positive value. Large improvement values tend to result in smaller trees.

Related Topics

TREE
Overview (TREE command)
Model Variables (TREE command)
Measurement Level (TREE command)
FORCE Keyword (TREE command)
DEPCATEGORIES Subcommand (TREE command)
TREE Subcommand (TREE command)
PRINT Subcommand (TREE command)
GAIN Subcommand (TREE command)
PLOT Subcommand (TREE command)
RULES Subcommand (TREE command)
SAVE Subcommand (TREE command)
METHOD Subcommand (TREE command)
GROWTHLIMIT Subcommand (TREE command)
VALIDATION Subcommand (TREE command)
CHAID Subcommand (TREE command)
QUEST Subcommand (TREE command)
COSTS Subcommand (TREE command)
Custom Costs (TREE command)
PRIORS Subcommand (TREE command)
SCORES Subcommand (TREE command)
PROFITS Subcommand (TREE command)
INFLUENCE Subcommand (TREE command)
OUTFILE Subcommand (TREE command)
MISSING Subcommand (TREE command)
TARGETRESPONSE Subcommand (TREE command)


QUEST Subcommand (TREE command)

TREE (command),TREE (command),TREE (command)
QUEST subcommand,QUEST subcommand,QUEST subcommand
QUEST (subcommand),QUEST (subcommand),QUEST (subcommand)
TREE command,TREE command,TREE command

The ALPHASPLIT keyword on the QUEST subcommand sets the alpha criterion for selection of independent (predictor) variables. Specify a value greater than 0 and less than 1. The default is 0.05.

Example

TREE risk [n] BY income age creditscore
 /METHOD TYPE=QUEST
 /QUEST ALPHASPLIT=.01.

Related Topics

TREE
Overview (TREE command)
Model Variables (TREE command)
Measurement Level (TREE command)
FORCE Keyword (TREE command)
DEPCATEGORIES Subcommand (TREE command)
TREE Subcommand (TREE command)
PRINT Subcommand (TREE command)
GAIN Subcommand (TREE command)
PLOT Subcommand (TREE command)
RULES Subcommand (TREE command)
SAVE Subcommand (TREE command)
METHOD Subcommand (TREE command)
GROWTHLIMIT Subcommand (TREE command)
VALIDATION Subcommand (TREE command)
CHAID Subcommand (TREE command)
CRT Subcommand (TREE command)
COSTS Subcommand (TREE command)
Custom Costs (TREE command)
PRIORS Subcommand (TREE command)
SCORES Subcommand (TREE command)
PROFITS Subcommand (TREE command)
INFLUENCE Subcommand (TREE command)
OUTFILE Subcommand (TREE command)
MISSING Subcommand (TREE command)
TARGETRESPONSE Subcommand (TREE command)


COSTS Subcommand (TREE command)

TREE (command),TREE (command),TREE (command)
COSTS subcommand,COSTS subcommand,COSTS subcommand
COSTS (subcommand),COSTS (subcommand),COSTS (subcommand)
TREE command,TREE command,TREE command

For categorical dependent variables, the COSTS subcommand allows you to specify penalties for misclassifying cases.

• Costs are used in node assignment and risk estimation for all trees.

• They also affect the tree-growing process for all trees except QUEST trees and CRT trees that use a twoing measure. To include cost information in the tree-growing process for such trees, use adjusted priors. See the topic PRIORS Subcommand (TREE command) for more information.

• The COST subcommand is ignored if the dependent variable is scale, and a warning is issued.

The subcommand name is followed by an equals sign (=) and one of the following alternatives:

EQUAL | Misclassification costs are equal across categories of the dependent variable. Cost is set to 1 for all possible misclassifications. This is the default.
CUSTOM | User-specified costs. Use this to specify costs for one or more combinations of actual and predicted categories. Any combination for which a cost is not specified defaults to 1.

Related Topics

TREE
Overview (TREE command)
Model Variables (TREE command)
Measurement Level (TREE command)
FORCE Keyword (TREE command)
DEPCATEGORIES Subcommand (TREE command)
TREE Subcommand (TREE command)
PRINT Subcommand (TREE command)
GAIN Subcommand (TREE command)
PLOT Subcommand (TREE command)
RULES Subcommand (TREE command)
SAVE Subcommand (TREE command)
METHOD Subcommand (TREE command)
GROWTHLIMIT Subcommand (TREE command)
VALIDATION Subcommand (TREE command)
CHAID Subcommand (TREE command)
CRT Subcommand (TREE command)
QUEST Subcommand (TREE command)
Custom Costs (TREE command)
PRIORS Subcommand (TREE command)
SCORES Subcommand (TREE command)
PROFITS Subcommand (TREE command)
INFLUENCE Subcommand (TREE command)
OUTFILE Subcommand (TREE command)
MISSING Subcommand (TREE command)
TARGETRESPONSE Subcommand (TREE command)


Custom Costs (TREE command)

For each combination of dependent variable categories:

• Specify the actual category, predicted category, and misclassification cost, in that order.

• The cost value must be enclosed in square brackets.

• At least one cost specification must be provided, but you don’t have to specify all possible combinations. Any combination for which a cost is not specified defaults to 1.

• If multiple cost specifications are provided for a particular combination of predicted and actual categories, the last one is used.

• Costs specified for categories that do not exist in the data are ignored, and a warning is issued.

• Cost values must be non-negative.

• Category values must be consistent with the data type of the dependent variable. String and date values must be quoted. Date values must be consistent with the variable’s print format.

• Correct classifications, where the predicted category and the actual category match, are always assigned a cost of zero. A warning is issued if a nonzero cost is specified for a correct classification. For example, COSTS CUSTOM=1 1 [3] would be ignored and the cost would be set to 0.

Example Collapse Hide details

Example

TREE risk [o] BY age income employment
 /COSTS CUSTOM=3 2 [2]
                3 1 [8].

• Assuming that the dependent variable is coded 1=low, 2=medium, and 3=high, the cost of misclassifying a high-risk individual as medium risk is 2.

• The cost of misclassifying a high-risk individual as low risk is 8.

• All other misclassifications, such as classifying a medium-risk individual as high risk, are assigned the default cost, 1.

• Correct classifications such as classifying a high-risk individual as high risk are always assigned a cost of 0.

Related Topics

TREE
Overview (TREE command)
Model Variables (TREE command)
Measurement Level (TREE command)
FORCE Keyword (TREE command)
DEPCATEGORIES Subcommand (TREE command)
TREE Subcommand (TREE command)
PRINT Subcommand (TREE command)
GAIN Subcommand (TREE command)
PLOT Subcommand (TREE command)
RULES Subcommand (TREE command)
SAVE Subcommand (TREE command)
METHOD Subcommand (TREE command)
GROWTHLIMIT Subcommand (TREE command)
VALIDATION Subcommand (TREE command)
CHAID Subcommand (TREE command)
CRT Subcommand (TREE command)
QUEST Subcommand (TREE command)
COSTS Subcommand (TREE command)
PRIORS Subcommand (TREE command)
SCORES Subcommand (TREE command)
PROFITS Subcommand (TREE command)
INFLUENCE Subcommand (TREE command)
OUTFILE Subcommand (TREE command)
MISSING Subcommand (TREE command)
TARGETRESPONSE Subcommand (TREE command)


PRIORS Subcommand (TREE command)

TREE (command),TREE (command),TREE (command)
prior probability,prior probability,prior probability
prior probability,prior probability,prior probability
TREE command,TREE command,TREE command
TREE (command),TREE (command),TREE (command)
PRIORS subcommand,PRIORS subcommand,PRIORS subcommand
PRIORS (subcommand),PRIORS (subcommand),PRIORS (subcommand)
TREE command,TREE command,TREE command

For CRT and QUEST trees with categorical dependent variables, the PRIORS subcommand allows you to specify prior probabilities of group membership. Prior probabilities are estimates of the overall relative frequency for each target category of the dependent variable prior to knowing anything about the values of the independent (predictor) variables. Using prior probabilities helps correct any tree growth caused by data in the sample that is not representative of the entire population.

• If the growing method is CHAID or Exhaustive CHAID, this subcommand is ignored and a warning is issued.

• If the dependent variable is scale, this subcommand is ignored and a warning is issued.

FROMDATA | Obtain priors from the training sample. Use this setting if the distribution of groups in the training sample is representative of the population distribution. This is the default. If you have not specified a training sample using the VALIDATION subcommand, then the distribution of values in the entire data file is used.
EQUAL | Equal priors across categories. Use this if categories of the dependent variable are represented equally in the population. For example, if there are four categories, approximately 25% of the cases are in each category.
CUSTOM | User-specified prior probabilities. For each category of the dependent variable, specify the category followed by a non-negative prior probability value enclosed in square brackets.
Custom Prior Probabilities Collapse Hide details

Custom Prior Probabilities

• Prior probabilities must be specified for all values of the dependent variable included in the analysis (either all non-missing values found in the data or all values defined on the DEPCATEGORIES subcommand).

• The values must be non-negative.

• The specified category values must be consistent with the data type of the dependent variable. String and date values must be quoted. Date values must be consistent with the variable’s print format.

• If you specify the same category more than once, the last one is used.

• A warning is issued if you specify a prior probability for a category that does not exist in the data or in the training sample if split-sample validation is in effect. See the topic VALIDATION Subcommand (TREE command) for more information.

• Prior probability values are "normalized" to relative proportions before the tree is grown.

Example

TREE risk [o] BY age income employment
 /METHOD TYPE=CRT
 /PRIORS CUSTOM= 1 [30] 2 [75] 3 [45].

The prior probabilities of 30, 75, and 45 are normalized to proportions of 0.2, 0.5, and 0.3, respectively.

ADJUST Keyword Collapse Hide details

ADJUST Keyword

The ADJUST keyword specifies whether prior probabilities are adjusted to take into account misclassification costs.

NO | Priors are unadjusted. This is the default.
YES | Priors are adjusted to take into account misclassification costs.

Related Topics

TREE
Overview (TREE command)
Model Variables (TREE command)
Measurement Level (TREE command)
FORCE Keyword (TREE command)
DEPCATEGORIES Subcommand (TREE command)
TREE Subcommand (TREE command)
PRINT Subcommand (TREE command)
GAIN Subcommand (TREE command)
PLOT Subcommand (TREE command)
RULES Subcommand (TREE command)
SAVE Subcommand (TREE command)
METHOD Subcommand (TREE command)
GROWTHLIMIT Subcommand (TREE command)
VALIDATION Subcommand (TREE command)
CHAID Subcommand (TREE command)
CRT Subcommand (TREE command)
QUEST Subcommand (TREE command)
COSTS Subcommand (TREE command)
Custom Costs (TREE command)
SCORES Subcommand (TREE command)
PROFITS Subcommand (TREE command)
INFLUENCE Subcommand (TREE command)
OUTFILE Subcommand (TREE command)
MISSING Subcommand (TREE command)
TARGETRESPONSE Subcommand (TREE command)


SCORES Subcommand (TREE command)

TREE (command),TREE (command),TREE (command)
SCORES subcommand,SCORES subcommand,SCORES subcommand
SCORES (subcommand),SCORES (subcommand),SCORES (subcommand)
TREE command,TREE command,TREE command

For CHAID or Exhaustive CHAID trees with ordinal dependent variables, the SCORES subcommand allows you to specify scores that are used to scale the dependent variable. By default, scores are assigned in sorted value order: the first category is assigned a score of 1, the second category is assigned a score of 2, and so forth.

• If the growing method is CRT or QUEST, this subcommand is ignored, and a warning is issued.

• If the dependent variable is nominal or scale, this subcommand is ignored, and a warning is issued.

The subcommand name is followed by an equals sign (=) and one of the two following alternatives:

EQUALINCREMENTS | Scores are ordinal ranks. The lowest category of the dependent variable is assigned a score of 1, the next highest category is assigned a score of 2, and so on. This is the default.
CUSTOM | User-specified scores. For each category of the dependent variable, specify the category value followed by a score in square brackets.
Custom Scores Collapse Hide details

Custom Scores

• Scores must be numeric and unique. You cannot assign the same score to more than one category.

• Scores must be specified for all values of the dependent variable included in the analysis (either all non-missing values found in the data or all values defined on the DEPCATEGORIES subcommand).

• Category values must be consistent with the data type of the dependent variable. String and date values must be quoted. Date values must be consistent with the variable’s print format.

• If you specify multiple score values for the same category value, the last one is used.

• A warning is issued if you specify a score for a category that does not exist in the data or in the training sample if split-sample validation is in effect. See the topic VALIDATION Subcommand (TREE command) for more information.

Example

TREE income [o] BY age employment gender region
 /SCORES CUSTOM=1 [1] 2 [2.5] 3 [8].

• By default, the CHAID method is used to grow the tree.

• CUSTOM contains one score specification for each category of the ordinal dependent variable.

• Category 1 is assigned a score of 1; category 2 is assigned a score of 2.5; and category 3 is assigned a score of 8. In other words, scores are used to rescale income so there is a smaller gap between categories 1 and 2 than between 2 and 3.

Related Topics

TREE
Overview (TREE command)
Model Variables (TREE command)
Measurement Level (TREE command)
FORCE Keyword (TREE command)
DEPCATEGORIES Subcommand (TREE command)
TREE Subcommand (TREE command)
PRINT Subcommand (TREE command)
GAIN Subcommand (TREE command)
PLOT Subcommand (TREE command)
RULES Subcommand (TREE command)
SAVE Subcommand (TREE command)
METHOD Subcommand (TREE command)
GROWTHLIMIT Subcommand (TREE command)
VALIDATION Subcommand (TREE command)
CHAID Subcommand (TREE command)
CRT Subcommand (TREE command)
QUEST Subcommand (TREE command)
COSTS Subcommand (TREE command)
Custom Costs (TREE command)
PRIORS Subcommand (TREE command)
PROFITS Subcommand (TREE command)
INFLUENCE Subcommand (TREE command)
OUTFILE Subcommand (TREE command)
MISSING Subcommand (TREE command)
TARGETRESPONSE Subcommand (TREE command)


PROFITS Subcommand (TREE command)

TREE (command),TREE (command),TREE (command)
PROFITS (subcommand),PROFITS (subcommand),PROFITS (subcommand)
PROFITS (subcommand),PROFITS (subcommand),PROFITS (subcommand)
TREE command,TREE command,TREE command

For categorical dependent variables, the PROFITS subcommand allows you to assign revenue and expense values to levels of the dependent variable. Revenues and expenses are used in tables and charts that summarize expected profits and return on investment (ROI). Profit is computed as revenue minus expense.

If the dependent variable is scale, this subcommand is ignored and warning is issued.

• The subcommand name is followed by an equals sign (=), the keyword CUSTOM, and a list of dependent variable values, each followed by a pair of values, representing revenues and expenses respectively, enclosed in square brackets.

• Revenue and expense values must be numeric and must be specified for all values of the dependent variable included in the analysis (either all non-missing values found in the data or all values defined on the DEPCATEGORIES subcommand).

• Category values must be consistent with the data type of the dependent variable. String and date values must be quoted. Date values must be consistent with the variable’s print format.

• If you specify the same category value more than once, the expense and revenue values for the last one are used.

• A warning is issued if you specify a category of the dependent variable that does not exist in the data or in the training sample if split-sample validation is in effect. See the topic VALIDATION Subcommand (TREE command) for more information.

Example Collapse Hide details

Example

TREE income [o] BY age employment gender region
 /PROFITS CUSTOM=1 [.1 .25]
                 2 [.5 .25]
                  3 [15 .25].

• Expected revenue and expense values are defined for each income category.

• Revenues vary across groups. For group 1, the lowest income group, expected revenue is 0.10 per individual. For group 2, the middle income group, expected revenue is 0.50 per individual. For group 3, the high income group, expected revenue is 15 per individual.

• The matrix specifies a fixed expense for each group. For each group, expected expense is 0.25 per person.

Related Topics

TREE
Overview (TREE command)
Model Variables (TREE command)
Measurement Level (TREE command)
FORCE Keyword (TREE command)
DEPCATEGORIES Subcommand (TREE command)
TREE Subcommand (TREE command)
PRINT Subcommand (TREE command)
GAIN Subcommand (TREE command)
PLOT Subcommand (TREE command)
RULES Subcommand (TREE command)
SAVE Subcommand (TREE command)
METHOD Subcommand (TREE command)
GROWTHLIMIT Subcommand (TREE command)
VALIDATION Subcommand (TREE command)
CHAID Subcommand (TREE command)
CRT Subcommand (TREE command)
QUEST Subcommand (TREE command)
COSTS Subcommand (TREE command)
Custom Costs (TREE command)
PRIORS Subcommand (TREE command)
SCORES Subcommand (TREE command)
INFLUENCE Subcommand (TREE command)
OUTFILE Subcommand (TREE command)
MISSING Subcommand (TREE command)
TARGETRESPONSE Subcommand (TREE command)


INFLUENCE Subcommand (TREE command)

TREE (command),TREE (command),TREE (command)
INFLUENCE subcommand,INFLUENCE subcommand,INFLUENCE subcommand
INFLUENCE (subcommand),INFLUENCE (subcommand),INFLUENCE (subcommand)
TREE command,TREE command,TREE command

The INFLUENCE subcommand defines an optional influence variable that defines how much influence a case has on the tree-growing process. Cases with lower influence values have less influence, cases with higher values have more.

• The variable must be numeric.

• The dependent variable cannot be used as the influence variable.

• The weight variable (see the WEIGHT command) cannot be used as the influence variable.

• For QUEST, this subcommand is ignored and a warning is issued.

Related Topics

TREE
Overview (TREE command)
Model Variables (TREE command)
Measurement Level (TREE command)
FORCE Keyword (TREE command)
DEPCATEGORIES Subcommand (TREE command)
TREE Subcommand (TREE command)
PRINT Subcommand (TREE command)
GAIN Subcommand (TREE command)
PLOT Subcommand (TREE command)
RULES Subcommand (TREE command)
SAVE Subcommand (TREE command)
METHOD Subcommand (TREE command)
GROWTHLIMIT Subcommand (TREE command)
VALIDATION Subcommand (TREE command)
CHAID Subcommand (TREE command)
CRT Subcommand (TREE command)
QUEST Subcommand (TREE command)
COSTS Subcommand (TREE command)
Custom Costs (TREE command)
PRIORS Subcommand (TREE command)
SCORES Subcommand (TREE command)
PROFITS Subcommand (TREE command)
OUTFILE Subcommand (TREE command)
MISSING Subcommand (TREE command)
TARGETRESPONSE Subcommand (TREE command)


OUTFILE Subcommand (TREE command)

TREE (command),TREE (command),TREE (command)
saving model PMML file,saving model PMML file,saving model PMML file
model PMML file,model PMML file,model PMML file
TREE command,TREE command,TREE command

The OUTFILE subcommand writes the tree model to an XML file.

TRAININGMODEL=’filespec’ | Writes the model to the specified file. For split-sample validated trees, this is the model for the training sample.
TESTMODEL=’filespec’ | Writes the model for the test sample to the specified file. Available only with /VALIDATION TYPE=SPLITSAMPLE. Ignored for unvalidated and cross-validated models.

Example

TREE income [o] BY age employment gender region
 /OUTFILE TRAININGMODEL='/myfolder/model.xml'.

Related Topics

TREE
Overview (TREE command)
Model Variables (TREE command)
Measurement Level (TREE command)
FORCE Keyword (TREE command)
DEPCATEGORIES Subcommand (TREE command)
TREE Subcommand (TREE command)
PRINT Subcommand (TREE command)
GAIN Subcommand (TREE command)
PLOT Subcommand (TREE command)
RULES Subcommand (TREE command)
SAVE Subcommand (TREE command)
METHOD Subcommand (TREE command)
GROWTHLIMIT Subcommand (TREE command)
VALIDATION Subcommand (TREE command)
CHAID Subcommand (TREE command)
CRT Subcommand (TREE command)
QUEST Subcommand (TREE command)
COSTS Subcommand (TREE command)
Custom Costs (TREE command)
PRIORS Subcommand (TREE command)
SCORES Subcommand (TREE command)
PROFITS Subcommand (TREE command)
INFLUENCE Subcommand (TREE command)
MISSING Subcommand (TREE command)
TARGETRESPONSE Subcommand (TREE command)


MISSING Subcommand (TREE command)

TREE (command),TREE (command),TREE (command)
MISSING (subcommand),MISSING (subcommand),MISSING (subcommand)
MISSING (subcommand),MISSING (subcommand),MISSING (subcommand)
TREE command,TREE command,TREE command

The MISSING subcommand controls the handling of nominal, user-missing, independent (predictor) variable values.

• Handling of ordinal and scale user-missing independent variable values varies between growing methods.

• By default, if the values of all independent variables are system- or user-missing, the case is excluded.

• Handling of nominal dependent variables is controlled by the DEPCATEGORIES subcommand.

• For the dependent variable, cases with system-missing or user-missing ordinal or scale values are always excluded.

NOMINALMISSING Keyword Collapse Hide details

NOMINALMISSING Keyword

The NOMINALMISSING keyword controls the treatment of user-missing values of nominal independent (predictor) variables.

MISSING | Handling of user-missing values of nominal predictor variables depends on the growing method. This is the default.
VALID | Treat user-missing values of nominal independent variables as valid values. User-missing values of nominal independent variables are treated as ordinary values in tree growing and classification.
Method-Dependent Rules Collapse Hide details

Method-Dependent Rules

If some, but not all independent variable values are system-or user-missing:

• For CHAID and Exhaustive CHAID, system- and user-missing scale and ordinal independent variable values are included in the tree-growing process as a "floating" category that is allowed to merge with other categories in tree nodes. By default, nominal user-missing values are also handled in this fashion.

• For CRT and QUEST, cases with missing independent variable values are excluded from the tree-growing process but are classified using surrogate predictors, if surrogates are included in the method. By default, nominal user-missing values are also handled in this fashion.

Weight Variables Collapse Hide details

Weight Variables

If the analysis uses frequency weights or an influence variable, all cases with zero, negative, system-missing, or user-missing values of either variable are excluded from the analysis.

Related Topics

TREE
Overview (TREE command)
Model Variables (TREE command)
Measurement Level (TREE command)
FORCE Keyword (TREE command)
DEPCATEGORIES Subcommand (TREE command)
TREE Subcommand (TREE command)
PRINT Subcommand (TREE command)
GAIN Subcommand (TREE command)
PLOT Subcommand (TREE command)
RULES Subcommand (TREE command)
SAVE Subcommand (TREE command)
METHOD Subcommand (TREE command)
GROWTHLIMIT Subcommand (TREE command)
VALIDATION Subcommand (TREE command)
CHAID Subcommand (TREE command)
CRT Subcommand (TREE command)
QUEST Subcommand (TREE command)
COSTS Subcommand (TREE command)
Custom Costs (TREE command)
PRIORS Subcommand (TREE command)
SCORES Subcommand (TREE command)
PROFITS Subcommand (TREE command)
INFLUENCE Subcommand (TREE command)
OUTFILE Subcommand (TREE command)
TARGETRESPONSE Subcommand (TREE command)


TARGETRESPONSE Subcommand (TREE command)

TREE (command),TREE (command),TREE (command)
TARGETRESPONSE (subcommand),TARGETRESPONSE (subcommand),TARGETRESPONSE (subcommand)
MISSING (subcommand),MISSING (subcommand),MISSING (subcommand)
TARGETRESPONSE command,TARGETRESPONSE command,TARGETRESPONSE command

The TARGETRESPONSE subcommand displays a description of the attributes of each terminal node and the percentage of cases in that node with the specified target value. The output includes a table of percentages and cumulative percentages of the target value in each terminal node and a chart of cumulative response rates.

The TARGETRESPONSE subcommand is only executed under the following conditions:

• The subcommand must be explicitly specified. There is no default setting.

• The target variable must be nominal or ordinal.

• Target values must be specified on the DEPCATEGORIES subcommand. See the topic DEPCATEGORIES Subcommand (TREE command) for more information.

The results are sorted in descending order of percentages. The table can be color-coded based on a specified cumulative minimum percentage, with rows at or above the minimum colored green and rows below the minimum colored red. The minimum value is also displayed as a reference line on the chart. If more than one target value is specified, a separate table and chart are displayed for each target value.

You must specify one of the following alternatives:

RATE=NONE | No minimum percentage. The table is not color-coded, and there is no reference line on the chart.
RATE=value | Use the specified percentage value as the minimum. The value must be greater than 0 and less than 100.

Special Considerations

• The terminal node attributes displayed in the table represent a general description. They are not a substitute for precise rules. See the topic RULES Subcommand (TREE command) for more information.

• For the CHAID and Exhaustive CHAID methods, the attributes displayed in the table do not include any missing data conditions, and terminal nodes that represent the missing categories of a predictor are not included in the output. See the topic MISSING Subcommand (TREE command) for more information.

• For the CRT and QUEST methods, surrogate values are not included in the list of attribute conditions. See the topic METHOD Subcommand (TREE command) for more information.

Related Topics

TREE
Overview (TREE command)
Model Variables (TREE command)
Measurement Level (TREE command)
FORCE Keyword (TREE command)
DEPCATEGORIES Subcommand (TREE command)
TREE Subcommand (TREE command)
PRINT Subcommand (TREE command)
GAIN Subcommand (TREE command)
PLOT Subcommand (TREE command)
RULES Subcommand (TREE command)
SAVE Subcommand (TREE command)
METHOD Subcommand (TREE command)
GROWTHLIMIT Subcommand (TREE command)
VALIDATION Subcommand (TREE command)
CHAID Subcommand (TREE command)
CRT Subcommand (TREE command)
QUEST Subcommand (TREE command)
COSTS Subcommand (TREE command)
Custom Costs (TREE command)
PRIORS Subcommand (TREE command)
SCORES Subcommand (TREE command)
PROFITS Subcommand (TREE command)
INFLUENCE Subcommand (TREE command)
OUTFILE Subcommand (TREE command)
MISSING Subcommand (TREE command)


TSAPPLY

TSAPPLY (command),TSAPPLY (command),TSAPPLY (command)
TSAPPLY (command),TSAPPLY (command),TSAPPLY (command)
syntax chart,syntax chart,syntax chart
release history,release history,release history
Apply Time Series Models,Apply Time Series Models,Apply Time Series Models
command syntax,command syntax,command syntax

TSAPPLY is available in the Forecasting option.

Note: Square brackets that are shown in the TSAPPLY syntax chart are not used to indicate optional elements. Where indicated, they are required parts of syntax when a list of values is specified, but they may be omitted when a single value is specified. Equals signs (=) that are used in the syntax chart are required elements. The MODEL subcommand is required. All other subcommands are optional.

TSAPPLY

Global subcommands:

/MODELSUMMARY  PRINT=[MODELFIT** RESIDACF RESIDPACF NONE]
               PLOT=[SRSQUARE RSQUARE RMSE MAPE MAE MAXAPE
                     MAXAE NORMBIC RESIDACF RESIDPACF]

/MODELSTATISTICS DISPLAY={YES**}
                         {NO   }
                 MODELFIT=[SRSQUARE** RSQUARE RMSE MAPE MAE
                           MAXAPE MAXAE NORMBIC]

/MODELDETAILS    PRINT=[PARAMETERS RESIDACF RESIDPACF FORECASTS]
                 PLOT=[RESIDACF RESIDPACF]

/SERIESPLOT      OBSERVED FORECAST FIT FORECASTCI FITCI

/OUTPUTFILTER DISPLAY={ALLMODELS**                                     }
                      {[BESTFIT({N=integer  }) WORSTFIT({N=integer  })]}
                                {PCT=percent}           {PCT=percent}
              MODELFIT={SRSQUARE**}
                       {RSQUARE   }
                       {RMSE      }
                       {MAPE      }
                       {MAE       }
                       {MAXAPE    }
                       {MAXAE     }
                       {NORMBIC   }

/SAVE  PREDICTED(rootname)
       LCL(rootname)
       UCL(rootname)
       NRESIDUAL(rootname)

/AUXILIARY REESTIMATE={NO**}  CILEVEL={95**  }  MAXACFLAGS={24**   }
                      {YES }          {number}             {integer}
           SEASONLENGTH=integer

/MISSING USERMISSING={EXCLUDE**}
                     {INCLUDE  }

MODEL (local subcommand):

/MODEL  FILE=file   {DROP=['ModelID' 'ModelID' ...]}
                    {KEEP=['ModelID' 'ModelID' ...]}
        OUTFILE=file

**Default if the subcommand or keyword is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

Syntax for the TSAPPLY command can be generated from the Apply Time Series Models dialog.

Release History Collapse Hide details

Release History

Release 14.0

• Command introduced.

Example

PREDICT THRU YEAR 2006 MONTH 6.
TSAPPLY
  /MODELDETAILS PRINT=FORECASTS
  /MODEL FILE='/models/models.xml'.

Related Topics

Overview (TSAPPLY command)
Examples (TSAPPLY command)
Goodness-of-Fit Measures (TSAPPLY command)
MODELSUMMARY Subcommand (TSAPPLY command)
MODELSTATISTICS Subcommand (TSAPPLY command)
MODELDETAILS Subcommand (TSAPPLY command)
SERIESPLOT Subcommand (TSAPPLY command)
OUTPUTFILTER Subcommand (TSAPPLY command)
SAVE Subcommand (TSAPPLY command)
AUXILIARY Subcommand (TSAPPLY command)
MISSING Subcommand (TSAPPLY command)
MODEL Subcommand (TSAPPLY command)
TSMODEL


Overview (TSAPPLY command)

The TSAPPLY procedure loads existing time series models from an external file and applies them to data. Models are generated by using the TSMODEL procedure. You can use TSAPPLY to obtain forecasts for series for which new or revised data are available.

Options Collapse Hide details

Options

Models. By default, parameter estimates saved in the model file are used to produce forecasts. Optionally, model parameters can be reestimated. Reestimation of model parameters has no effect on the model structure. For example, an ARIMA(1,0,1) model will remain so, but the autoregressive and moving-average parameters will be reestimated by using the data in the active dataset. Outliers, if any, are always taken from the model file.

Output. TSAPPLY offers the same output as the TSMODEL procedure. However, autocorrelations and partial autocorrelations are available only if model parameters are reestimated.

Saved Variables. You can save forecasts and their confidence intervals to the active dataset. Fit values and noise residuals are available if model parameters are reestimated.

Missing Values. You can control whether user-missing values are treated as valid or invalid values.

Basic Specification Collapse Hide details

Basic Specification

• The basic specification is a MODEL subcommand that specifies a model file. By default, all models in the file are loaded.

• Default output includes a summary of the distribution of goodness of fit across loaded models and a table of stationary R-square, Ljung-Box Q, and number of outliers by model.

Syntax Rules Collapse Hide details

Syntax Rules

• The following subcommands are global: MODELSUMMARY, MODELSTATISTICS, MODELDETAILS, SERIESPLOT, OUTPUTFILTER, SAVE, AUXILIARY, and MISSING.

• Each global subcommand is optional, may be used only once, and must appear before any MODEL subcommand.

• The MODEL subcommand must be used at least once.

• An error occurs if a keyword or attribute is specified more than once within a subcommand.

• All subcommands other than MODEL are optional.

• Subcommand names and keywords must be spelled in full.

• Equals signs (=) that are shown in the syntax chart are required.

• An error is issued if any subcommand is empty.

Operations Collapse Hide details

Operations

• Models are applied to variables in the active dataset with the same names as the variables that are specified in the model.

• TSAPPLY honors time intervals and periodicity specified with the DATE command.

• The procedure verifies that date variables that are implied by the current date specification exist and that their values coincide with the date specification within the estimation period. If the data are filtered, values of date variables are verified within the filtered subset of data.

• If you choose to reestimate model parameters, reestimation happens within the currently active USE period. If the model has outliers, the outlier periods must be inside the effective USE period. The USE period is ignored if model parameters are not reestimated.

• The PREDICT command defines the end of the forecast period for tables, charts, and model variables that are produced by TSAPPLY.

• TSAPPLY does not honor the following commands: MODEL NAME, SAVE MODEL, and READ MODEL.

• TSAPPLY does not honor TSET. It does, however, provide options for missing-value handling, setting the width of confidence intervals, and setting the maximum number of lags displayed for autocorrelations.

• The TDISPLAY command does not display models that are saved by using TSAPPLY.

Limitations Collapse Hide details

Limitations

• An error occurs if SPLIT FILE is in effect.

• WEIGHT is ignored with a warning.

Related Topics

TSAPPLY
Examples (TSAPPLY command)
Goodness-of-Fit Measures (TSAPPLY command)
MODELSUMMARY Subcommand (TSAPPLY command)
MODELSTATISTICS Subcommand (TSAPPLY command)
MODELDETAILS Subcommand (TSAPPLY command)
SERIESPLOT Subcommand (TSAPPLY command)
OUTPUTFILTER Subcommand (TSAPPLY command)
SAVE Subcommand (TSAPPLY command)
AUXILIARY Subcommand (TSAPPLY command)
MISSING Subcommand (TSAPPLY command)
MODEL Subcommand (TSAPPLY command)


Examples (TSAPPLY command)

forecasting,forecasting,forecasting
TSAPPLY command,TSAPPLY command,TSAPPLY command
TSAPPLY (command),TSAPPLY (command),TSAPPLY (command)
forecasting,forecasting,forecasting

This section provides simple examples that are designed to get you started with the TSAPPLY procedure. Further examples that are specific to each subcommand are provided in the subcommand topics.

Forecasting

PREDICT THRU YEAR 2006 MONTH 6.
TSAPPLY
  /MODELDETAILS PRINT=FORECASTS
  /MODEL FILE='/models/models.xml'.

• The PREDICT command is used to specify the forecast period for the TSAPPLY procedure.

• The MODELDETAILS subcommand specifies that the output includes a table containing the forecasts.

• The MODEL subcommand specifies that all models in the file /models/models.xml will be applied to the active dataset. Models are applied to variables in the active dataset with the same names as the variables that are specified in the model.

• Forecasts are created by using the model parameters from models.xml, without reestimating any of those parameters. This behavior is the default behavior.

reestimate model parameters,reestimate model parameters,reestimate model parameters
TSAPPLY command,TSAPPLY command,TSAPPLY command
TSAPPLY (command),TSAPPLY (command),TSAPPLY (command)
reestimate model parameters,reestimate model parameters,reestimate model parameters
TSAPPLY (command),TSAPPLY (command),TSAPPLY (command)
save updated models,save updated models,save updated models

Forecasting with Reestimated Model Parameters

PREDICT THRU YEAR 2006 MONTH 6.
TSAPPLY
  /MODELDETAILS PRINT=FORECASTS
  /AUXILIARY REESTIMATE=YES
  /MODEL FILE='/models/models.xml'
         OUTFILE='/models/models_updated.xml'.

• The AUXILIARY subcommand specifies that model parameters for all models in /models/models.xml will be reestimated prior to forecasting. Model parameters are reestimated by using the data in the active dataset.

• Reestimation of model parameters has no effect on the model structure. For example, an ARIMA(1,0,1) model will remain so, but the autoregressive and moving-average parameters will be reestimated.

• The OUTFILE keyword specifies that the reestimated models will be saved to the file /models/models_updated.xml.

Applying a Selected Subset of Models

TSAPPLY (command),TSAPPLY (command),TSAPPLY (command)
keep selected models,keep selected models,keep selected models
drop selected models,drop selected models,drop selected models
PREDICT THRU YEAR 2006 MONTH 6.
TSAPPLY
  /MODELDETAILS PRINT=FORECASTS
  /MODEL FILE='/models/models.xml' KEEP=['CustomArima_1'].

• The KEEP keyword specifies that only the model named CustomArima_1 will be applied to the active dataset. All other models in /models/models.xml will be excluded.

PREDICT THRU YEAR 2006 MONTH 6.
TSAPPLY
  /MODELDETAILS PRINT=FORECASTS
  /MODEL FILE='/models/models.xml' DROP=['Expert_1' 'Expert_2'].

• The DROP keyword specifies that the models named Expert_1 and Expert_2 will be excluded. All other models in /models/models.xml will be applied to the active dataset.

Related Topics

TSAPPLY
Overview (TSAPPLY command)
Goodness-of-Fit Measures (TSAPPLY command)
MODELSUMMARY Subcommand (TSAPPLY command)
MODELSTATISTICS Subcommand (TSAPPLY command)
MODELDETAILS Subcommand (TSAPPLY command)
SERIESPLOT Subcommand (TSAPPLY command)
OUTPUTFILTER Subcommand (TSAPPLY command)
SAVE Subcommand (TSAPPLY command)
AUXILIARY Subcommand (TSAPPLY command)
MISSING Subcommand (TSAPPLY command)
MODEL Subcommand (TSAPPLY command)


Goodness-of-Fit Measures (TSAPPLY command)

TSAPPLY (command),TSAPPLY (command),TSAPPLY (command)
goodness of fit,goodness of fit,goodness of fit
goodness of fit,goodness of fit,goodness of fit
TSAPPLY command,TSAPPLY command,TSAPPLY command

The following model goodness-of-fit measures are available in TSAPPLY:

SRSQUARE | Stationary R-squared. A measure that compares the stationary part of the model to a simple mean model. This measure is preferable to ordinary R-squared when there is a trend or seasonal pattern. Stationary R-squared can be negative with a range of negative infinity to 1. Negative values mean that the model under consideration is worse than the baseline model. Positive values mean that the model under consideration is better than the baseline model.
RSQUARE | R-squared. An estimate of the proportion of the total variation in the series that is explained by the model. This measure is most useful when the series is stationary. R-squared can be negative with a range of negative infinity to 1. Negative values mean that the model under consideration is worse than the baseline model. Positive values mean that the model under consideration is better than the baseline model.
RMSE | RMSE. Root Mean Square Error. The square root of mean square error. A measure of how much a dependent series varies from its model-predicted level, expressed in the same units as the dependent series.
MAPE | MAPE. Mean Absolute Percentage Error. A measure of how much a dependent series varies from its model-predicted level. It is independent of the units used and can therefore be used to compare series with different units.
MAE | MAE. Mean absolute error. Measures how much the series varies from its model-predicted level. MAE is reported in the original series units.
MAXAPE | MaxAPE. Maximum Absolute Percentage Error. The largest forecasted error, expressed as a percentage. This measure is useful for imagining a worst-case scenario for your forecasts.
MAXAE | MaxAE. Maximum Absolute Error. The largest forecasted error, expressed in the same units as the dependent series. Like MaxAPE, it is useful for imagining the worst-case scenario for your forecasts. Maximum absolute error and maximum absolute percentage error may occur at different series points--for example, when the absolute error for a large series value is slightly larger than the absolute error for a small series value. In that case, the maximum absolute error will occur at the larger series value and the maximum absolute percentage error will occur at the smaller series value.
NORMBIC | Normalized BIC. Normalized Bayesian Information Criterion. A general measure of the overall fit of a model that attempts to account for model complexity. It is a score based upon the mean square error and includes a penalty for the number of parameters in the model and the length of the series. The penalty removes the advantage of models with more parameters, making the statistic easy to compare across different models for the same series.

Related Topics

TSAPPLY
Overview (TSAPPLY command)
Examples (TSAPPLY command)
MODELSUMMARY Subcommand (TSAPPLY command)
MODELSTATISTICS Subcommand (TSAPPLY command)
MODELDETAILS Subcommand (TSAPPLY command)
SERIESPLOT Subcommand (TSAPPLY command)
OUTPUTFILTER Subcommand (TSAPPLY command)
SAVE Subcommand (TSAPPLY command)
AUXILIARY Subcommand (TSAPPLY command)
MISSING Subcommand (TSAPPLY command)
MODEL Subcommand (TSAPPLY command)


MODELSUMMARY Subcommand (TSAPPLY command)

TSAPPLY (command),TSAPPLY (command),TSAPPLY (command)
MODELSUMMARY subcommand,MODELSUMMARY subcommand,MODELSUMMARY subcommand
MODELSUMMARY (subcommand),MODELSUMMARY (subcommand),MODELSUMMARY (subcommand)
TSAPPLY command,TSAPPLY command,TSAPPLY command

The MODELSUMMARY subcommand controls the display of tables and charts that summarize goodness of fit, residual autocorrelations, and residual partial autocorrelations across estimated models. Each keyword is followed by an equals sign (=) and one or more of the available options enclosed in square brackets.

Example

PREDICT THRU YEAR 2006 MONTH 6.
TSAPPLY
  /MODELDETAILS PRINT=FORECASTS
  /AUXILIARY REESTIMATE=YES
  /MODELSUMMARY PLOT=[SRSQUARE MAXAPE]
  /MODEL FILE='/models/models.xml'.

• The output includes two histograms: one histogram for stationary R-squared and one histogram for the maximum absolute percentage error. Each histogram consists of results across all models.

PRINT Keyword Collapse Hide details

PRINT Keyword

The PRINT keyword controls the display of model summary tables.

MODELFIT | Goodness of fit. Table of summary statistics and percentiles for stationary R-square, R-square, root mean square error, mean absolute percentage error, mean absolute error, maximum absolute percentage error, maximum absolute error, and normalized Bayesian Information Criterion. Note that if models are not reestimated, model fit statistics are loaded from the model file. This table is displayed by default.
RESIDACF | Residual autocorrelation function. Table of summary statistics and percentiles for autocorrelations of the residuals. RESIDACF is ignored with a warning if REESTIMATE=NO.
RESIDPACF | Residual partial autocorrelation function. Table of summary statistics and percentiles for partial autocorrelations of the residuals. RESIDPACF is ignored with a warning if REESTIMATE=NO.
NONE | No tables are shown. An error occurs if NONE is used in combination with any other PRINT option.
PLOT Keyword Collapse Hide details

PLOT Keyword

The PLOT keyword controls the display of model summary charts. By default no charts are shown. (For detailed definitions of the following terms, see Goodness-of-Fit Measures (TSAPPLY command).)

SRSQUARE | Histogram of Stationary R-Square.
RSQUARE | Histogram of R-Square.
RMSE | Histogram of Root Mean Square Error.
MAPE | Histogram of Mean Absolute Percentage Error.
MAE | Histogram of Mean Absolute Error.
MAXAPE | Histogram of Maximum Absolute Percentage Error.
MAXAE | Histogram of Maximum Absolute Error.
NORMBIC | Histogram of Normalized Bayesian Information Criterion (BIC).
RESIDACF | Boxplot of Residual Autocorrelation Function by Lag. RESIDACF is ignored with a warning if REESTIMATE=NO.
RESIDPACF | Boxplot of Residual Partial Autocorrelation Function by Lag. RESIDPACF is ignored with a warning if REESTIMATE=NO.

Related Topics

TSAPPLY
Overview (TSAPPLY command)
Examples (TSAPPLY command)
Goodness-of-Fit Measures (TSAPPLY command)
MODELSTATISTICS Subcommand (TSAPPLY command)
MODELDETAILS Subcommand (TSAPPLY command)
SERIESPLOT Subcommand (TSAPPLY command)
OUTPUTFILTER Subcommand (TSAPPLY command)
SAVE Subcommand (TSAPPLY command)
AUXILIARY Subcommand (TSAPPLY command)
MISSING Subcommand (TSAPPLY command)
MODEL Subcommand (TSAPPLY command)


MODELSTATISTICS Subcommand (TSAPPLY command)

TSAPPLY (command),TSAPPLY (command),TSAPPLY (command)
MODELSTATISTICS subcommand,MODELSTATISTICS subcommand,MODELSTATISTICS subcommand
MODELSTATISTICS (subcommand),MODELSTATISTICS (subcommand),MODELSTATISTICS (subcommand)
TSAPPLY command,TSAPPLY command,TSAPPLY command

The MODELSTATISTICS subcommand controls display of a table listing all models along with chosen goodness-of-fit statistics. Note that if models are not reestimated, model fit statistics are loaded from the model file.

Example

PREDICT THRU YEAR 2006 MONTH 6.
TSAPPLY
  /MODELDETAILS PRINT=FORECASTS
  /AUXILIARY REESTIMATE=YES
  /MODELSTATISTICS DISPLAY=YES MODELFIT=RSQUARE
  /MODEL FILE='/models/models.xml'.

• The output includes a table displaying the value of R-squared for each model.

DISPLAY Keyword Collapse Hide details

DISPLAY Keyword

The DISPLAY keyword controls whether the model statistics table is shown.

YES | Model statistics table is shown. Table of model goodness of fit, Ljung-Box Q statistic, and number of outliers by model. This setting is the default. The Q statistic measures the degree of pattern in the residuals. Large values of Q in relation to its degrees of freedom indicate that model residuals are not randomly distributed.
NO | Model statistics table is not shown.
MODELFIT Keyword Collapse Hide details

MODELFIT Keyword

The MODELFIT keyword controls which fit statistics are shown in the model statistics table, and this keyword is ignored if DISPLAY=NO. The keyword is followed by an equals sign (=) and one or more of the following options enclosed in square brackets. (For detailed definitions of the following terms, see Goodness-of-Fit Measures (TSAPPLY command).)

SRSQUARE | Stationary R-square. This setting is the default.
RSQUARE | R-Square.
RMSE | Root Mean Square Error.
MAPE | Mean Absolute Percentage Error.
MAE | Mean Absolute Error.
MAXAPE | Maximum Absolute Percentage Error.
MAXAE | Maximum Absolute Error.
NORMBIC | Normalized Bayesian Information Criterion (BIC).

Related Topics

TSAPPLY
Overview (TSAPPLY command)
Examples (TSAPPLY command)
Goodness-of-Fit Measures (TSAPPLY command)
MODELSUMMARY Subcommand (TSAPPLY command)
MODELDETAILS Subcommand (TSAPPLY command)
SERIESPLOT Subcommand (TSAPPLY command)
OUTPUTFILTER Subcommand (TSAPPLY command)
SAVE Subcommand (TSAPPLY command)
AUXILIARY Subcommand (TSAPPLY command)
MISSING Subcommand (TSAPPLY command)
MODEL Subcommand (TSAPPLY command)


MODELDETAILS Subcommand (TSAPPLY command)

TSAPPLY (command),TSAPPLY (command),TSAPPLY (command)
MODELDETAILS subcommand,MODELDETAILS subcommand,MODELDETAILS subcommand
MODELDETAILS (subcommand),MODELDETAILS (subcommand),MODELDETAILS (subcommand)
TSAPPLY command,TSAPPLY command,TSAPPLY command

The MODELDETAILS subcommand controls the display of model parameters, model forecasts, and autocorrelations of noise residuals for individual models. Each keyword is followed by an equals sign (=) and one or more of the available options enclosed in square brackets.

Example

PREDICT THRU YEAR 2006 MONTH 6.
TSAPPLY
  /AUXILIARY REESTIMATE=YES
  /MODELDETAILS PRINT=[PARAMETERS FORECASTS]
  /MODEL FILE='/models/models.xml'.

• The output includes tables displaying the model parameters and forecasts for each model.

PRINT Keyword Collapse Hide details

PRINT Keyword

The PRINT keyword controls display of tables for individual models. By default, no tables are shown.

PARAMETERS | Model parameter estimates. Shows separate tables for ARIMA and exponential smoothing models. If outliers exist, parameter estimates for outliers are also displayed. Note that if models are not reestimated, parameter estimates are loaded from the model file.
RESIDACF | Residual autocorrelation function. Shows residual autocorrelations by lag. RESIDACF is ignored with a warning if REESTIMATE=NO.
RESIDPACF | Residual partial autocorrelation function. Shows residual partial autocorrelations by lag. RESIDPACF is ignored with a warning if REESTIMATE=NO.
FORECASTS | Forecasts and confidence intervals. Shows model forecasts and confidence intervals.
PLOT Keyword Collapse Hide details

PLOT Keyword

The PLOT keyword controls display of charts for individual models. By default no charts are shown. PLOT is ignored with a warning if REESTIMATE=NO.

RESIDACF | Residual autocorrelation function. Shows residual autocorrelations by lag.
RESIDPACF | Residual partial autocorrelation function. Shows residual partial autocorrelations by lag.

Related Topics

TSAPPLY
Overview (TSAPPLY command)
Examples (TSAPPLY command)
Goodness-of-Fit Measures (TSAPPLY command)
MODELSUMMARY Subcommand (TSAPPLY command)
MODELSTATISTICS Subcommand (TSAPPLY command)
SERIESPLOT Subcommand (TSAPPLY command)
OUTPUTFILTER Subcommand (TSAPPLY command)
SAVE Subcommand (TSAPPLY command)
AUXILIARY Subcommand (TSAPPLY command)
MISSING Subcommand (TSAPPLY command)
MODEL Subcommand (TSAPPLY command)


SERIESPLOT Subcommand (TSAPPLY command)

TSAPPLY (command),TSAPPLY (command),TSAPPLY (command)
SERIESPLOT subcommand,SERIESPLOT subcommand,SERIESPLOT subcommand
SERIESPLOT (subcommand),SERIESPLOT (subcommand),SERIESPLOT (subcommand)
TSAPPLY command,TSAPPLY command,TSAPPLY command
plots,plots,plots
TSAPPLY command,TSAPPLY command,TSAPPLY command

The SERIESPLOT subcommand allows you to obtain plots of predicted values, observed values, and confidence intervals for each model. By default, no plots are shown. The subcommand is followed by one or more of the following keywords:

OBSERVED | Displays all observed values of the dependent series. OBSERVED is ignored with a warning if REESTIMATE=NO.
FORECAST | Displays model-predicted values within the forecast period.
FIT | Displays model-predicted values within the estimation period. FIT is ignored with a warning if REESTIMATE=NO.
FORECASTCI | Displays upper and lower confidence limits within the forecast period.
FITCI | Displays upper and lower confidence limits within the estimation period. FITCI is ignored with a warning if REESTIMATE=NO.

Example

PREDICT THRU YEAR 2006 MONTH 6.
TSAPPLY
  /MODELDETAILS PRINT=FORECASTS
  /AUXILIARY REESTIMATE=YES
  /SERIESPLOT OBSERVED FORECAST
  /MODEL FILE='/models/models.xml'.

• The output includes plots of the model-predicted values in the forecast period, as well as all observed values, for each model.

Related Topics

TSAPPLY
Overview (TSAPPLY command)
Examples (TSAPPLY command)
Goodness-of-Fit Measures (TSAPPLY command)
MODELSUMMARY Subcommand (TSAPPLY command)
MODELSTATISTICS Subcommand (TSAPPLY command)
MODELDETAILS Subcommand (TSAPPLY command)
OUTPUTFILTER Subcommand (TSAPPLY command)
SAVE Subcommand (TSAPPLY command)
AUXILIARY Subcommand (TSAPPLY command)
MISSING Subcommand (TSAPPLY command)
MODEL Subcommand (TSAPPLY command)


OUTPUTFILTER Subcommand (TSAPPLY command)

TSAPPLY (command),TSAPPLY (command),TSAPPLY (command)
OUTPUTFILTER subcommand,OUTPUTFILTER subcommand,OUTPUTFILTER subcommand
OUTPUTFILTER (subcommand),OUTPUTFILTER (subcommand),OUTPUTFILTER (subcommand)
TSAPPLY command,TSAPPLY command,TSAPPLY command

The OUTPUTFILTER subcommand controls which models are included in the model statistics table (MODELSTATISTICS subcommand), detailed model output (MODELDETAILS subcommand), and time series plots (SERIESPLOT subcommand).

• By default, all models are included in the output. OUTPUTFILTER can be used to display only the best-fitting or worst-fitting models (or both). If you request both, two sets of output are displayed.

• If model parameters are not reestimated, models are selected based on goodness-of-fit statistics that are loaded from the model file.

• OUTPUTFILTER is ignored if no output is requested on the MODELSTATISTICS, MODELDETAILS, or SERIESPLOT subcommands.

• OUTPUTFILTER has no effect on output from the MODELSUMMARY subcommand.

Example

PREDICT THRU YEAR 2006 MONTH 6.
TSAPPLY
  /MODELDETAILS PRINT=FORECASTS
  /OUTPUTFILTER DISPLAY=[BESTFIT(N=5) WORSTFIT(PCT=10)]
  /MODEL FILE='/models/models.xml'.

• The output consists of two sets of results: those results for the 5 best-fitting models and those results for models with fit values in the bottom 10%. The stationary R-squared value is used as the goodness-of-fit measure.

DISPLAY Keyword Collapse Hide details

DISPLAY Keyword

The DISPLAY keyword controls which models are included in MODELSTATISTICS, MODELDETAILS, and SERIESPLOT output.

• By default, all models are displayed (DISPLAY=ALLMODELS).

• To display only those models with extreme goodness-of-fit values, specify BESTFIT, WORSTFIT, or both, in square brackets. One or both keywords must be specified.

ALLMODELS | All models are displayed. All models that could be loaded (REESTIMATE=NO) or computed (REESTIMATE=YES) are shown. This setting is the default.
BESTFIT | Models having the highest fit values are shown. To display the models with the N highest fit values, specify BESTFIT followed by N=count in parentheses—for example, BESTFIT(N=5). The count must be a positive integer. If the count exceeds the number of estimated models, all models are shown. To display the models with fit values in the top N%, specify PCT=percent in parentheses. For example, BESTFIT(PCT=5) displays models with fit values in the top 5% among estimated models. The percentage value must be greater than zero and less than 100.
WORSTFIT | Models having the lowest fit values are shown. To display the models with the N lowest fit values, specify WORSTFIT followed by N=count in parentheses—for example, WORSTFIT(N=5). The count must be a positive integer. If the count exceeds the number of models estimated, all models are shown. To display the models with fit values in the lowest N%, specify PCT=percent in parentheses. For example, WORSTFIT(PCT=5) displays models with fit values in the bottom 5% among estimated models. The percentage value must be greater than zero and less than 100.
MODELFIT Keyword Collapse Hide details

MODELFIT Keyword

The MODELFIT keyword specifies the fit measure that is used to filter models. MODELFIT is ignored if DISPLAY=ALLMODELS.

Specify one of the following options. (For detailed definitions of the following terms, see Goodness-of-Fit Measures (TSAPPLY command).)

SRSQUARE | Stationary R-Square. This setting is the default.
RSQUARE | R-Square.
RMSE | Root Mean Square Error.
MAPE | Mean Absolute Percentage Error.
MAE | Mean Absolute Error.
MAXAPE | Maximum Absolute Percentage Error.
MAXAE | Maximum Absolute Error.
NORMBIC | Normalized Bayesian Information Criterion (BIC).

Related Topics

TSAPPLY
Overview (TSAPPLY command)
Examples (TSAPPLY command)
Goodness-of-Fit Measures (TSAPPLY command)
MODELSUMMARY Subcommand (TSAPPLY command)
MODELSTATISTICS Subcommand (TSAPPLY command)
MODELDETAILS Subcommand (TSAPPLY command)
SERIESPLOT Subcommand (TSAPPLY command)
SAVE Subcommand (TSAPPLY command)
AUXILIARY Subcommand (TSAPPLY command)
MISSING Subcommand (TSAPPLY command)
MODEL Subcommand (TSAPPLY command)


SAVE Subcommand (TSAPPLY command)

TSAPPLY (command),TSAPPLY (command),TSAPPLY (command)
SAVE subcommand,SAVE subcommand,SAVE subcommand
SAVE (subcommand),SAVE (subcommand),SAVE (subcommand)
TSAPPLY command,TSAPPLY command,TSAPPLY command

The SAVE subcommand is used to save new variables representing predicted values, residuals, and confidence intervals to the active dataset. By default, no new variables are saved to the active dataset.

• Specify one or more keywords, each keyword followed by an optional rootname to be used as the prefix for new variable names. Enclose the root name in parentheses. Each keyword gives rise to one new variable for each dependent variable.

• The root name, if specified, must conform to the rules for valid variable names.

• If no root name is specified, TSAPPLY uses a default name.

• The full variable name is the concatenation of the root name, the name of the associated dependent variable, and a model identifier. The variable name is extended if necessary to avoid variable naming conflicts.

• The PREDICT command controls whether new cases are added to the file when new variables are saved. New cases are added if PREDICT specifies a forecast period that extends beyond the length of the dependent-variable series.

• SAVE is ignored with a warning if temporary transformations are in effect.

Example

PREDICT THRU YEAR 2006 MONTH 6.
TSAPPLY
  /AUXILIARY REESTIMATE=YES
  /SAVE PREDICTED(ApplyPred) NRESIDUAL
  /MODEL FILE='/models/models.xml'.

• Two new variables are created for each of the models: one variable contains the model predictions, and the other variable contains the noise residuals.

• The root name (prefix) for the variables containing model predictions is ApplyPred.

• The root name for the variables containing noise residuals is NResidual (the default).

PREDICTED(rootname) | Model fit and forecast values. The default root name is Predicted. If REESTIMATE=NO, only forecasts are produced.
LCL(rootname) | Lower confidence limits. The default root name is LCL. If REESTIMATE=NO, lower confidence limits are only produced for forecasts.
UCL(rootname) | Upper confidence limits. The default root name is UCL. If REESTIMATE=NO, upper confidence limits are only produced for forecasts.
NRESIDUAL(rootname) | Noise residuals. The default rootname is NResidual. When transformations of the dependent variable are performed (for example, natural log), these residuals are the residuals for the transformed series. NRESIDUAL is ignored with a warning if REESTIMATE=NO.

Related Topics

TSAPPLY
Overview (TSAPPLY command)
Examples (TSAPPLY command)
Goodness-of-Fit Measures (TSAPPLY command)
MODELSUMMARY Subcommand (TSAPPLY command)
MODELSTATISTICS Subcommand (TSAPPLY command)
MODELDETAILS Subcommand (TSAPPLY command)
SERIESPLOT Subcommand (TSAPPLY command)
OUTPUTFILTER Subcommand (TSAPPLY command)
AUXILIARY Subcommand (TSAPPLY command)
MISSING Subcommand (TSAPPLY command)
MODEL Subcommand (TSAPPLY command)


AUXILIARY Subcommand (TSAPPLY command)

TSAPPLY (command),TSAPPLY (command),TSAPPLY (command)
AUXILIARY subcommand,AUXILIARY subcommand,AUXILIARY subcommand
AUXILIARY (subcommand),AUXILIARY (subcommand),AUXILIARY (subcommand)
TSAPPLY command,TSAPPLY command,TSAPPLY command

The AUXILIARY subcommand is used to specify whether model parameters are reestimated, set the confidence interval level for forecasts, set the maximum number of lags for autocorrelation and partial autocorrelation plots and tables, and specify the season length.

Example

PREDICT THRU YEAR 2006 MONTH 6.
TSAPPLY
  /MODELDETAILS PRINT=[PARAMETERS FORECASTS]
                PLOT=[RESIDACF RESIDPACF]
  /AUXILIARY REESTIMATE=YES MAXACFLAGS=36
  /MODEL FILE='/models/models.xml'.

REESTIMATE Keyword

reestimate model parameters,reestimate model parameters,reestimate model parameters
TSAPPLY command,TSAPPLY command,TSAPPLY command
TSAPPLY (command),TSAPPLY (command),TSAPPLY (command)
reestimate model parameters,reestimate model parameters,reestimate model parameters

REESTIMATE controls whether model parameters are reestimated. If REESTIMATE=NO (the default), parameter estimates that are recorded in the model file are used to produce forecasts. If REESTIMATE=YES, forecasts reflect reestimated model parameters. Outliers, if any, are always taken from the model file.

Note that if REESTIMATE=NO, any parameter estimates or goodness-of-fit statistics that are displayed in output are loaded from the model file and reflect the data that were used when each model was developed (or last updated). And if you use the OUTPUTFILTER subcommand, models will be selected on the basis of goodness-of-fit statistics that are recorded in the model file. In addition, forecasts will not take into account historical data--for either dependent or independent variables--in the active dataset. You must set REESTIMATE=YES if you want historical data to impact the forecasts. Finally, forecasts do not take into account values of the dependent series in the forecast period--but the forecasts do take into account values of independent variables in the forecast period. If you have more current values of the dependent series and want them to be included in the forecasts, you need to reestimate, adjusting the estimation period to include these values.

CILEVEL Keyword

confidence intervals,confidence intervals,confidence intervals
TSAPPLY command,TSAPPLY command,TSAPPLY command
TSAPPLY (command),TSAPPLY (command),TSAPPLY (command)
confidence intervals,confidence intervals,confidence intervals

The CILEVEL keyword sets the confidence level.

• Specify a positive number that is less than 100.

• The default is 95.

MAXACFLAGS Keyword

TSAPPLY (command),TSAPPLY (command),TSAPPLY (command)
lags displayed,lags displayed,lags displayed

The MAXACFLAGS keyword sets the maximum number of lags displayed in residual autocorrelation and partial autocorrelation tables and plots. MAXACFLAGS is ignored if REESTIMATE=NO.

• Specify a positive integer.

• The default is 24.

SEASONLENGTH Keyword

periodicity,periodicity,periodicity
TSAPPLY command,TSAPPLY command,TSAPPLY command
seasonality,seasonality,seasonality
TSAPPLY command,TSAPPLY command,TSAPPLY command
TSAPPLY (command),TSAPPLY (command),TSAPPLY (command)
seasonality,seasonality,seasonality
periodicity,periodicity,periodicity

The SEASONLENGTH keyword specifies the length of the seasonal period (the number of observations in one period or season) for the data.

• To adjust the season length, specify a positive integer.

• If SEASONLENGTH is not specified, the periodicity that is specified by using the DATE command defines the season length.

• Note that SEASONLENGTH is used to override the date specification for the active dataset to make it consistent with the date specification from the model file. An error occurs if these two specifications are not consistent.

Related Topics

TSAPPLY
Overview (TSAPPLY command)
Examples (TSAPPLY command)
Goodness-of-Fit Measures (TSAPPLY command)
MODELSUMMARY Subcommand (TSAPPLY command)
MODELSTATISTICS Subcommand (TSAPPLY command)
MODELDETAILS Subcommand (TSAPPLY command)
SERIESPLOT Subcommand (TSAPPLY command)
OUTPUTFILTER Subcommand (TSAPPLY command)
SAVE Subcommand (TSAPPLY command)
MISSING Subcommand (TSAPPLY command)
MODEL Subcommand (TSAPPLY command)


MISSING Subcommand (TSAPPLY command)

TSAPPLY (command),TSAPPLY (command),TSAPPLY (command)
MISSING subcommand,MISSING subcommand,MISSING subcommand
MISSING (subcommand),MISSING (subcommand),MISSING (subcommand)
TSAPPLY command,TSAPPLY command,TSAPPLY command
missing values,missing values,missing values
TSAPPLY command,TSAPPLY command,TSAPPLY command

The MISSING subcommand controls the handling of user-missing values.

• By default, user-missing values are treated as missing (invalid) data.

• System-missing values are always treated as invalid.

• Cases with missing values of a dependent variable that occur within the estimation period are included in the model. The specific handling of the missing value depends on the estimation method.

• For ARIMA models, a warning is issued if a predictor has any missing values within the estimation period. Any models involving the predictor are not reestimated.

• If any predictor has missing values within the forecast period, the procedure issues a warning and forecasts as far as it can.

Example

PREDICT THRU YEAR 2006 MONTH 6.
TSAPPLY
  /MODELDETAILS PRINT=FORECASTS
  /AUXILIARY REESTIMATE=YES
  /MISSING USERMISSING=INCLUDE
  /MODEL FILE='/models/models.xml'.

USERMISSING Keyword

The USERMISSING keyword controls the treatment of user-missing values and is required.

EXCLUDE | Exclude user-missing values. User-missing values are treated as missing. This setting is the default.
INCLUDE | Include user-missing values. User-missing values are treated as valid data.

Related Topics

TSAPPLY
Overview (TSAPPLY command)
Examples (TSAPPLY command)
Goodness-of-Fit Measures (TSAPPLY command)
MODELSUMMARY Subcommand (TSAPPLY command)
MODELSTATISTICS Subcommand (TSAPPLY command)
MODELDETAILS Subcommand (TSAPPLY command)
SERIESPLOT Subcommand (TSAPPLY command)
OUTPUTFILTER Subcommand (TSAPPLY command)
SAVE Subcommand (TSAPPLY command)
AUXILIARY Subcommand (TSAPPLY command)
MODEL Subcommand (TSAPPLY command)


MODEL Subcommand (TSAPPLY command)

TSAPPLY (command),TSAPPLY (command),TSAPPLY (command)
MODEL subcommand,MODEL subcommand,MODEL subcommand
MODEL (subcommand),MODEL (subcommand),MODEL (subcommand)
TSAPPLY command,TSAPPLY command,TSAPPLY command

The MODEL subcommand is required and specifies an external file, referred to as a model file, containing models that are developed by using TSMODEL. A model file specifies lag structure, parameters, outliers, and variables for each model.

• TSAPPLY assumes that the variables that are specified in the model file exist in the active dataset.

• You can use multiple MODEL subcommands to apply two or more sets of models to your data. Each MODEL subcommand is used to load models from a different model file. For example, one model file might contain models for series that represent unit sales, and another model file might contain models for series that represent revenue.

FILE Keyword Collapse Hide details

FILE Keyword

The FILE keyword is used to specify an external file containing models, and the keyword is required.

• A warning is issued if a model variable that is specified in the file does not exist in the active dataset or is not numeric. Models that refer to the variable are ignored.

• A warning is issued if a model specifies a variable transformation (square root or natural log) and one or more model variables to be transformed contain values that are invalid for the specified transformation--for example, negative values. Any such models will not be applied.

• An error occurs if the date interval or cycle length that is specified in the file is inconsistent with the date specification for the active dataset. The SEASONLENGTH keyword on the AUXILIARY subcommand can be used to override the date specification for the active dataset.

• An error occurs if the file cannot be read or is invalid.

• An error occurs if two or more MODEL subcommands specify the same file.

• When multiple MODEL subcommands are used, a warning occurs if the same model ID occurs in more than one model file. The first model with that ID is loaded. The check for duplicate model IDs takes place after DROP and KEEP are applied to each model file.

• A warning is issued, and forecasts are not available for a model, if REESTIMATE=NO and the model's forecast period is inconsistent with the current USE or PREDICT interval. Specifically, forecasts are not available if model forecasts would start before the beginning of the USE period or after the end of the PREDICT interval.

TSAPPLY (command),TSAPPLY (command),TSAPPLY (command)
drop selected models,drop selected models,drop selected models
DROP Keyword Collapse Hide details

DROP Keyword

The DROP keyword is used to exclude models.

• Specify one or more quoted model identifiers, enclosed in square brackets—for example, [’Model_1’ ’Model_2’]. All other models in the file are loaded and applied to the data.

• Redundant items in the DROP list are ignored.

• An error occurs if all models are dropped.

• Model identifiers that do not exist in the file are ignored.

TSAPPLY (command),TSAPPLY (command),TSAPPLY (command)
keep selected models,keep selected models,keep selected models
KEEP Keyword Collapse Hide details

KEEP Keyword

The KEEP keyword specifies models to be applied.

• Specify one or more quoted model identifiers, enclosed in square brackets—for example, [’Model_1’ ’Model_2’]. All other models in the file are excluded.

• Redundant items in the KEEP list are ignored.

• Model identifiers that do not exist in the file are ignored.

• DROP and KEEP are mutually exclusive. An error occurs if both are specified.

TSAPPLY (command),TSAPPLY (command),TSAPPLY (command)
save updated models,save updated models,save updated models
OUTFILE Keyword Collapse Hide details

OUTFILE Keyword

The OUTFILE keyword specifies an external file to which updated models are written.

• You can use OUTFILE to save models whose parameters are reestimated. OUTFILE is ignored with a warning if REESTIMATE=NO.

• The filename must be specified in full. No extension is supplied.

• Models that are excluded by using DROP or KEEP are not saved.

• You can specify the same external file on multiple MODEL subcommands. Models from the different subcommands are then saved to that single file.

Related Topics

TSAPPLY
Overview (TSAPPLY command)
Examples (TSAPPLY command)
Goodness-of-Fit Measures (TSAPPLY command)
MODELSUMMARY Subcommand (TSAPPLY command)
MODELSTATISTICS Subcommand (TSAPPLY command)
MODELDETAILS Subcommand (TSAPPLY command)
SERIESPLOT Subcommand (TSAPPLY command)
OUTPUTFILTER Subcommand (TSAPPLY command)
SAVE Subcommand (TSAPPLY command)
AUXILIARY Subcommand (TSAPPLY command)
MISSING Subcommand (TSAPPLY command)


TSET

TSET (command),TSET (command),TSET (command)
TSET (command),TSET (command),TSET (command)
syntax chart,syntax chart,syntax chart
TSET
 [PRINT={DEFAULT**}]  [/NEWVAR={CURRENT**}] [/MXAUTO={16**}]
        {BRIEF    }            {NONE     }           {lags}
        {DETAILED }            {ALL      }

 [/MXCROSS={7** }]  [/MXNEWVARS={60**}] [/MXPREDICT={60**}]
           {lags}               {n   }              {n   }

 [/MISSING={EXCLUDE**}]  [/CIN={95** }] [/TOLER={0.0001**}]
           {INCLUDE  }         {value}          {value   }

 [/CNVERGE={0.001**}]  [/ACFSE={IND**}]
           {value  }           {MA   }

 [/PERIOD=n]    [/ID=varname]

 [/{CONSTANT**}]
   {NOCONSTANT}

 [/DEFAULT]

**Default if the subcommand is omitted.

This command takes effect immediately. It does not read the active dataset or execute pending transformations. See the topic Command Order for more information.

Example

TSET PERIOD 6 NEWVAR NONE MXAUTO 25.

Related Topics

Overview (TSET command)
DEFAULT Subcommand (TSET command)
ID Subcommand (TSET command)
MISSING Subcommand (TSET command)
MXNEWVARS Subcommand (TSET command)
MXPREDICT Subcommand (TSET command)
NEWVAR Subcommand (TSET command)
PERIOD Subcommand (TSET command)
PRINT Subcommand (TSET command)
AREG
ARIMA
EXSMOOTH
FIT
SEASON
SPECTRA
TSHOW


Overview (TSET command)

TSET sets global parameters to be used by procedures that analyze time series and sequence variables. To display the current settings of these parameters, use the TSHOW command.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is at least one subcommand.

Subcommand Order Collapse Hide details

Subcommand Order

• Subcommands can be specified in any order.

Syntax Rules Collapse Hide details

Syntax Rules

• The slash between subcommands is optional.

• You can specify DEFAULT on any subcommand to restore the default setting for that subcommand.

• Subcommand DEFAULT restores all TSET subcommands to their defaults.

Operations Collapse Hide details

Operations

• TSET takes effect immediately.

• Only the settings specified are affected. All others remain at their previous settings or the default.

• Subcommands on other procedures that perform the same function as subcommands on TSET override the TSET specifications for those procedures.

• Procedures that are affected by TSET specifications are CURVEFIT, CASEPLOT, NPPLOT, and TSPLOT.

Related Topics

TSET
DEFAULT Subcommand (TSET command)
ID Subcommand (TSET command)
MISSING Subcommand (TSET command)
MXNEWVARS Subcommand (TSET command)
MXPREDICT Subcommand (TSET command)
NEWVAR Subcommand (TSET command)
PERIOD Subcommand (TSET command)
PRINT Subcommand (TSET command)


DEFAULT Subcommand (TSET command)

TSET (command),TSET (command),TSET (command)
DEFAULT subcommand,DEFAULT subcommand,DEFAULT subcommand
DEFAULT (subcommand),DEFAULT (subcommand),DEFAULT (subcommand)
TSET command,TSET command,TSET command

DEFAULT resets all TSET settings back to their defaults. There are no additional specifications on DEFAULT.

Related Topics

TSET
Overview (TSET command)
ID Subcommand (TSET command)
MISSING Subcommand (TSET command)
MXNEWVARS Subcommand (TSET command)
MXPREDICT Subcommand (TSET command)
NEWVAR Subcommand (TSET command)
PERIOD Subcommand (TSET command)
PRINT Subcommand (TSET command)


ID Subcommand (TSET command)

TSET (command),TSET (command),TSET (command)
ID subcommand,ID subcommand,ID subcommand
ID (subcommand),ID (subcommand),ID (subcommand)
TSET command,TSET command,TSET command

ID specifies a variable whose values are used to label observations in plots.

• The only specification on ID is the name of a variable in the active dataset.

• If ID is not specified, the DATE_ variable is used to label observations.

• If ID is specified within the procedure, it overrides the TSET specification for that procedure.

Related Topics

TSET
Overview (TSET command)
DEFAULT Subcommand (TSET command)
MISSING Subcommand (TSET command)
MXNEWVARS Subcommand (TSET command)
MXPREDICT Subcommand (TSET command)
NEWVAR Subcommand (TSET command)
PERIOD Subcommand (TSET command)
PRINT Subcommand (TSET command)


MISSING Subcommand (TSET command)

TSET (command),TSET (command),TSET (command)
MISSING subcommand,MISSING subcommand,MISSING subcommand
MISSING (subcommand),MISSING (subcommand),MISSING (subcommand)
TSET command,TSET command,TSET command
EXCLUDE (keyword),EXCLUDE (keyword),EXCLUDE (keyword)
TSET command,TSET command,TSET command
INCLUDE (keyword),INCLUDE (keyword),INCLUDE (keyword)
TSET command,TSET command,TSET command
missing values,missing values,missing values
time series settings,time series settings,time series settings

MISSING controls the treatment of user-missing values.

• The specification on MISSING is keyword INCLUDE or EXCLUDE. The default is EXCLUDE.

• INCLUDE indicates that observations with user-missing values should be treated as valid values and included in analyses.

• EXCLUDE indicates that observations with user-missing values should be excluded from analyses.

Related Topics

TSET
Overview (TSET command)
DEFAULT Subcommand (TSET command)
ID Subcommand (TSET command)
MXNEWVARS Subcommand (TSET command)
MXPREDICT Subcommand (TSET command)
NEWVAR Subcommand (TSET command)
PERIOD Subcommand (TSET command)
PRINT Subcommand (TSET command)


MXNEWVARS Subcommand (TSET command)

TSET (command),TSET (command),TSET (command)
MXNEWVAR subcommand,MXNEWVAR subcommand,MXNEWVAR subcommand
MXNEWVAR (subcommand),MXNEWVAR (subcommand),MXNEWVAR (subcommand)
TSET command,TSET command,TSET command

MXNEWVARS indicates the maximum number of new variables that can be generated by a procedure.

• The specification on MXNEWVARS indicates the maximum and can be any positive integer.

• The default maximum number is 60 new variables per procedure.

Related Topics

TSET
Overview (TSET command)
DEFAULT Subcommand (TSET command)
ID Subcommand (TSET command)
MISSING Subcommand (TSET command)
MXPREDICT Subcommand (TSET command)
NEWVAR Subcommand (TSET command)
PERIOD Subcommand (TSET command)
PRINT Subcommand (TSET command)


MXPREDICT Subcommand (TSET command)

TSET (command),TSET (command),TSET (command)
MXPREDICT subcommand,MXPREDICT subcommand,MXPREDICT subcommand
MXPREDICT (subcommand),MXPREDICT (subcommand),MXPREDICT (subcommand)
TSET command,TSET command,TSET command

MXPREDICT indicates the maximum number of new cases that can be added to the active dataset per procedure when the PREDICT command is used.

• The specification on MXPREDICT can be any positive integer.

• The default maximum number of new cases is 60 per procedure.

Related Topics

TSET
Overview (TSET command)
DEFAULT Subcommand (TSET command)
ID Subcommand (TSET command)
MISSING Subcommand (TSET command)
MXNEWVARS Subcommand (TSET command)
NEWVAR Subcommand (TSET command)
PERIOD Subcommand (TSET command)
PRINT Subcommand (TSET command)


NEWVAR Subcommand (TSET command)

TSET (command),TSET (command),TSET (command)
NEWVAR subcommand,NEWVAR subcommand,NEWVAR subcommand
NEWVAR (subcommand),NEWVAR (subcommand),NEWVAR (subcommand)
TSET command,TSET command,TSET command
CURRENT (keyword),CURRENT (keyword),CURRENT (keyword)
TSET command,TSET command,TSET command
NONE (keyword),NONE (keyword),NONE (keyword)
TSET command,TSET command,TSET command
ALL (keyword),ALL (keyword),ALL (keyword)
TSET command,TSET command,TSET command

NEWVAR controls the creation of new variables in the active dataset.

• The specification on NEWVAR can be CURRENT, NONE, or ALL. The default is CURRENT.

• CURRENT specifies to save new variables and replace any existing variables of the same name.

• ALL specifies to save new variables without replacing existing ones.

• NONE specifies that no new variables are saved.

Related Topics

TSET
Overview (TSET command)
DEFAULT Subcommand (TSET command)
ID Subcommand (TSET command)
MISSING Subcommand (TSET command)
MXNEWVARS Subcommand (TSET command)
MXPREDICT Subcommand (TSET command)
PERIOD Subcommand (TSET command)
PRINT Subcommand (TSET command)


PERIOD Subcommand (TSET command)

TSET (command),TSET (command),TSET (command)
PERIOD subcommand,PERIOD subcommand,PERIOD subcommand
PERIOD (subcommand),PERIOD (subcommand),PERIOD (subcommand)
TSET command,TSET command,TSET command
periodicity,periodicity,periodicity
time series settings,time series settings,time series settings

PERIOD indicates the size of the period to be used for seasonal differencing.

• The specification on PERIOD indicates how many observations are in one season or period and can be any positive integer.

• There is no default for the PERIOD subcommand.

• The specification on TSET PERIOD overrides the periodicity of DATE variables.

• If a period is specified within an individual procedure, it overrides the TSET PERIOD specification for that procedure.

Related Topics

TSET
Overview (TSET command)
DEFAULT Subcommand (TSET command)
ID Subcommand (TSET command)
MISSING Subcommand (TSET command)
MXNEWVARS Subcommand (TSET command)
MXPREDICT Subcommand (TSET command)
NEWVAR Subcommand (TSET command)
PRINT Subcommand (TSET command)


PRINT Subcommand (TSET command)

TSET (command),TSET (command),TSET (command)
PRINT subcommand,PRINT subcommand,PRINT subcommand
PRINT (subcommand),PRINT (subcommand),PRINT (subcommand)
TSET command,TSET command,TSET command
DEFAULT (keyword),DEFAULT (keyword),DEFAULT (keyword)
TSET command,TSET command,TSET command
BRIEF (keyword),BRIEF (keyword),BRIEF (keyword)
TSET command,TSET command,TSET command
DETAILED (keyword),DETAILED (keyword),DETAILED (keyword)
TSET command,TSET command,TSET command

PRINT controls how much output is produced.

• The specification on PRINT can be BRIEF, DETAILED, or DEFAULT. The amount of output produced by DEFAULT is generally between the amount produced by BRIEF and DETAILED.

• For procedures with multiple iterations, BRIEF generally means that final statistics are displayed with no iteration history. DEFAULT provides a one-line summary at each iteration in addition to the final statistics. DETAILED provides a complete summary of each iteration (where necessary) plus the final statistics.

• For some procedures, the DEFAULT and DETAILED output is the same. For many of the simpler procedures, BRIEF, DEFAULT, and DETAILED are all the same.

Related Topics

TSET
Overview (TSET command)
DEFAULT Subcommand (TSET command)
ID Subcommand (TSET command)
MISSING Subcommand (TSET command)
MXNEWVARS Subcommand (TSET command)
MXPREDICT Subcommand (TSET command)
NEWVAR Subcommand (TSET command)
PERIOD Subcommand (TSET command)


TSHOW

TSHOW (command),TSHOW (command),TSHOW (command)
TSHOW (command),TSHOW (command),TSHOW (command)
syntax chart,syntax chart,syntax chart
TSHOW

This command takes effect immediately. It does not read the active dataset or execute pending transformations. See the topic Command Order for more information.

Related Topics

Overview (TSHOW command)
Example (TSHOW command)
AREG
ARIMA
EXSMOOTH
FIT
SEASON
SPECTRA
TSET


Overview (TSHOW command)

TSHOW displays a list of all the current specifications on the TSET, USE, PREDICT, and DATE commands.

Basic Specification Collapse Hide details

Basic Specification

The command keyword TSHOW is the only specification.

Operations Collapse Hide details

Operations

• TSHOW is executed immediately.

• TSHOW lists every current specification for the TSET, USE, PREDICT, and DATE commands, as well as the default settings.

Related Topics

TSHOW
Example (TSHOW command)


Example (TSHOW command)

TSHOW.

• The TSHOW command produces a list of the current settings on the TSET, USE, PREDICT, and DATE commands.

Related Topics

TSHOW
Overview (TSHOW command)


TSMODEL

TSMODEL (command),TSMODEL (command),TSMODEL (command)
TSMODEL (command),TSMODEL (command),TSMODEL (command)
syntax chart,syntax chart,syntax chart
release history,release history,release history
Time Series Modeler,Time Series Modeler,Time Series Modeler
command syntax,command syntax,command syntax

TSMODEL is available in the Forecasting option.

Note: Square brackets that are shown in the TSMODEL syntax chart are not used to indicate optional elements. Where indicated, they are required parts of syntax when a list of values is specified, but they may be omitted when a single value is specified. Equals signs (=) that are used in the syntax chart are required elements. The MODEL subcommand is required. All other subcommands are optional.

TSMODEL

Global subcommands:

/MODELSUMMARY  PRINT=[MODELFIT** RESIDACF RESIDPACF NONE]
               PLOT=[SRSQUARE RSQUARE RMSE MAPE MAE MAXAPE
                     MAXAE NORMBIC RESIDACF RESIDPACF]

/MODELSTATISTICS DISPLAY={YES**}
                         {NO   }
                 MODELFIT=[SRSQUARE** RSQUARE RMSE MAPE MAE
                           MAXAPE MAXAE NORMBIC]

/MODELDETAILS    PRINT=[PARAMETERS RESIDACF RESIDPACF FORECASTS]
                 PLOT=[RESIDACF RESIDPACF]

/SERIESPLOT      OBSERVED FORECAST FIT FORECASTCI FITCI

/OUTPUTFILTER DISPLAY={ALLMODELS**                                     }
                      {[BESTFIT({N=integer  }) WORSTFIT({N=integer  })]}
                                {PCT=percent}           {PCT=percent}
              MODELFIT={SRSQUARE**}
                       {RSQUARE   }
                       {RMSE      }
                       {MAPE      }
                       {MAE       }
                       {MAXAPE    }
                       {MAXAE     }
                       {NORMBIC   }

/SAVE  PREDICTED(rootname)
       LCL(rootname)
       UCL(rootname)
       NRESIDUAL(rootname)

/AUXILIARY CILEVEL={95**  }  MAXACFLAGS={24**   }  SEASONLENGTH=integer
                   {number}             {integer}

/MISSING USERMISSING={EXCLUDE**}
                     {INCLUDE  }

Model block subcommands:

/MODEL  DEPENDENT=varlist
        INDEPENDENT=varspec list
        OUTFILE=model file
        PREFIX=’prefix’

 {   /EXPERTMODELER TYPE=[ARIMA** EXSMOOTH**]   }
                    TRYSEASONAL={YES**}
                                {NO   }

 {   /EXSMOOTH TYPE={SIMPLE               }     }
                    {SIMPLESEASONAL       }
                    {HOLT                 }
                    {BROWN                }
                    {DAMPEDTREND          }
                    {WINTERSADDITIVE      }
                    {WINTERSMULTIPLICATIVE}
               TRANSFORM={NONE**}
                         {SQRT  }
                         {LN    }

 {   /ARIMA   AR={[integer integer...]}         }
              ARSEASONAL={[0**]               }
                         {[integer integer...]}
              MA={[integer integer...]}
              MASEASONAL={[0**]               }
                         {[integer integer...]}
              DIFF={0**    }
                   {integer}
              DIFFSEASONAL={0**    }
                           {integer}
              CONSTANT={YES**}
                       {NO   }
              TRANSFORM={NONE**}
                        {SQRT  }
                        {LN    }

 /TRANSFERFUNCTION VARIABLES={ALL**  }
                             {varlist}
           NUM={[0**]               }
               {[integer integer...]}
           NUMSEASONAL={[0**]               }
                       {[integer integer...]}
           DENOM={[0**]               }
                 {[integer integer...]}
           DENOMSEASONAL={[0**]               }
                         {[integer integer...]}
           DIFF={0**    }
                {integer}
           DIFFSEASONAL={0**    }
                        {integer}
           DELAY={0**    }
                 {integer}
           TRANSFORM={NONE**}
                     {SQRT  }
                     {LN    }

/AUTOOUTLIER   DETECT={OFF**}
                      {ON   }
               TYPE=[ADDITIVE** LEVELSHIFT** INNOVATIONAL TRANSIENT
                     SEASONALADDITIVE LOCALTREND ADDITIVEPATCH]

/OUTLIER LOCATION=[date specification] TYPE={ADDITIVE        }
                                            {LEVELSHIFT      }
                                            {INNOVATIONAL    }
                                            {TRANSIENT       }
                                            {SEASONALADDITIVE}
                                            {LOCALTREND      }

**Default if the subcommand or keyword is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See TSMODEL Algorithms for computational details for this procedure.

Syntax for the TSMODEL command can be generated from the Time Series Modeler dialog.

Release History Collapse Hide details

Release History

Release 14.0

• Command introduced.

Example

TSMODEL
  /MODEL DEPENDENT=sku1 TO sku10.

Related Topics

Overview (TSMODEL command)
Examples (TSMODEL command)
Goodness-of-Fit Measures (TSMODEL command)
MODELSUMMARY Subcommand (TSMODEL command)
MODELSTATISTICS Subcommand (TSMODEL command)
MODELDETAILS Subcommand (TSMODEL command)
SERIESPLOT Subcommand (TSMODEL command)
OUTPUTFILTER Subcommand (TSMODEL command)
SAVE Subcommand (TSMODEL command)
AUXILIARY Subcommand (TSMODEL command)
MISSING Subcommand (TSMODEL command)
MODEL Subcommand (TSMODEL command)
EXPERTMODELER Subcommand (TSMODEL command)
EXSMOOTH Subcommand (TSMODEL command)
ARIMA Subcommand (TSMODEL command)
TRANSFERFUNCTION Subcommand (TSMODEL command)
AUTOOUTLIER Subcommand (TSMODEL command)
OUTLIER Subcommand (TSMODEL command)
TSAPPLY


Overview (TSMODEL command)

forecasting,forecasting,forecasting
TSMODEL command,TSMODEL command,TSMODEL command

The TSMODEL procedure estimates exponential smoothing, univariate Autoregressive Integrated Moving Average (ARIMA), and multivariate ARIMA (or transfer function models) models for time series, and the procedure produces forecasts. The procedure includes an Expert Modeler that identifies and estimates an appropriate ARIMA or exponential smoothing model for each dependent-variable series. Alternatively, you can specify a custom ARIMA or exponential smoothing model.

Options Collapse Hide details

Options

Automatic Model Identification. The Expert Modeler can identify an appropriate seasonal or nonseasonal ARIMA or exponential smoothing model for each dependent-variable series. If predictor variables are specified, the Expert Modeler selects, for inclusion in ARIMA models, those variables that have a statistically significant relationship with the dependent series. Model variables are transformed where appropriate by using differencing and/or a square root or natural log transformation. You can limit the set of candidate models to ARIMA models only or exponential smoothing models only.

Custom Models. You can specify a custom exponential smoothing or ARIMA model for one or more series. Seven exponential smoothing methods are available: simple, simple seasonal, Holt’s linear trend, Brown’s linear trend, damped trend, Winters’ additive, and Winters’ multiplicative. For ARIMA models, you can specify seasonal and nonseasonal autoregressive and moving average orders, differencing, as well as transfer functions for predictor variables. For exponential smoothing and ARIMA models, you can request that model variables be transformed prior to model estimation.

Outliers. If you use the Expert Modeler or specify a custom ARIMA model, TSMODEL can detect and model outlier time points automatically. The following outlier types can be identified: additive, additive patch, innovational, level shift, transient, seasonal additive, and local trend. Alternatively, if you request a custom ARIMA model, you can specify that one or more time points be modeled as outliers.

Output. Available output includes plots and tables that summarize the distribution of model goodness of fit, residual autocorrelations, and residual partial autocorrelations across models. In addition, you can obtain a table of model goodness of fit, Ljung-Box Q, and number of outliers by model. You can also obtain details for each model, including parameter estimates, forecasts, as well as autocorrelation and partial autocorrelation functions. Output can be restricted to the best-fitting or worst-fitting models based on goodness-of fit-values.

Saved Variables. You can save fit and forecast values to the active dataset as well as confidence intervals and noise residuals.

Missing Values. You can control whether user-missing values are treated as valid or invalid values.

Basic Specification Collapse Hide details

Basic Specification

• The basic specification is a MODEL subcommand that specifies one or more dependent-variable series.

• By default, TSMODEL uses the Expert Modeler to identify and estimate the best ARIMA or exponential smoothing model for each series.

• Default output includes a summary of the distribution of goodness of fit across estimated models and a table of stationary R-square, Ljung-Box Q, and number of outliers by model.

Syntax Rules Collapse Hide details

Syntax Rules

• The following subcommands are global and apply to all models specified in a single instance of the TSMODEL command: MODELSUMMARY, MODELSTATISTICS, MODELDETAILS, SERIESPLOT, OUTPUTFILTER, SAVE, AUXILIARY, and MISSING.

• Each global subcommand is optional, may be used only once, and must appear before any MODEL subcommand.

• Models are specified in blocks. The MODEL subcommand indicates the start of a block. The MODEL subcommand must be used at least once.

• The following subcommands apply to the preceding MODEL subcommand and constitute--along with a MODEL subcommand--a MODEL block: EXPERTMODELER, EXSMOOTH, ARIMA, TRANSFERFUNCTION, AUTOOUTLIER, and OUTLIER. An error occurs if any of these subcommands precedes the first MODEL subcommand.

• The EXPERTMODELER, EXSMOOTH, and ARIMA subcommands are used within a MODEL block to specify the estimation method. If none of these subcommands is specified, the implicit default is EXPERTMODELER. An error occurs if more than one of these subcommands is specified within a MODEL block.

• AUTOOUTLIER may be used only once within a MODEL block.

• TRANSFERFUNCTION and OUTLIER may be used more than once within a MODEL block.

• Each keyword may be specified only once within a subcommand.

• Empty subcommands are not allowed; all subcommands must be specified with options.

• All subcommands other than MODEL are optional.

• Subcommand names and keywords must be spelled in full.

• Subcommands can be specified in any order, with the exception that global subcommands must precede the first MODEL subcommand.

• Equals signs (=) that are shown in the syntax chart are required.

Operations Collapse Hide details

Operations

• TSMODEL honors time intervals and periodicity specified with the DATE command.

• The procedure verifies that date variables that are implied by the current date specification exist and that their values coincide with the date specification within the estimation period. If SPLIT FILE is in effect, the check is done for each split. A split is skipped and a warning is issued if verification fails for that split. If the verification fails when SPLIT FILE is not in effect, an error occurs and processing terminates. If the data are filtered, values of date variables are verified within the filtered subset of data.

• The procedure honors the estimation (historical) period that is defined with the USE command. However, depending on available data, the actual use period may vary by dependent variable. For a given dependent variable, the estimation period is the period left after eliminating contiguous missing values of the dependent variable at the beginning and end of the USE period.

• If SPLIT FILE is in effect, and a split has fewer cases than implied by the USE period, a warning is issued and all available cases are used. If there are no cases in the USE period, the split is skipped altogether with a warning.

• The PREDICT command defines the end of the forecast period for tables, charts, and model variables that are produced by TSMODEL. The forecast period always starts after the end of the estimation (USE) period. Like the estimation period, the forecast period can vary by model, depending on available data. If a PREDICT specification ends on or before the effective end of the USE period, the forecast period is empty.

• The procedure does not honor the following commands: MODEL NAME or SAVE MODEL. Options for naming and saving models are provided with the TSMODEL procedure.

• The procedure does not honor TSET. The TSMODEL procedure provides options for handling missing values, setting the width of confidence intervals, setting the maximum number of lags displayed for autocorrelations, and setting season length.

• The TDISPLAY command does not display models that are saved by using TSMODEL.

Limitations Collapse Hide details

Limitations

• WEIGHT is ignored with a warning.

Related Topics

TSMODEL
Examples (TSMODEL command)
Goodness-of-Fit Measures (TSMODEL command)
MODELSUMMARY Subcommand (TSMODEL command)
MODELSTATISTICS Subcommand (TSMODEL command)
MODELDETAILS Subcommand (TSMODEL command)
SERIESPLOT Subcommand (TSMODEL command)
OUTPUTFILTER Subcommand (TSMODEL command)
SAVE Subcommand (TSMODEL command)
AUXILIARY Subcommand (TSMODEL command)
MISSING Subcommand (TSMODEL command)
MODEL Subcommand (TSMODEL command)
EXPERTMODELER Subcommand (TSMODEL command)
EXSMOOTH Subcommand (TSMODEL command)
ARIMA Subcommand (TSMODEL command)
TRANSFERFUNCTION Subcommand (TSMODEL command)
AUTOOUTLIER Subcommand (TSMODEL command)
OUTLIER Subcommand (TSMODEL command)


Examples (TSMODEL command)

This section provides simple examples that are designed to get you started with using the Expert Modeler, producing forecasts, saving results to the active dataset, and saving your model for later use. Further examples that are specific to each subcommand are provided in the subcommand topics.

Using the Expert Modeler

TSMODEL
  /MODEL DEPENDENT=sku1 TO sku10.

• The Expert Modeler is used to find the best-fitting exponential smoothing or ARIMA model for each of the dependent series sku1 thru sku10.

• The procedure invokes the Expert Modeler because the MODEL subcommand is not followed by one of the model type subcommands (i.e., EXSMOOTH or ARIMA). The absence of a model type subcommand is equivalent to specifying /EXPERTMODELER TYPE=[ARIMA EXSMOOTH] TRYSEASONAL=YES.

forecasting,forecasting,forecasting
TSMODEL command,TSMODEL command,TSMODEL command
TSMODEL (command),TSMODEL (command),TSMODEL (command)
forecasting,forecasting,forecasting

Obtaining Model Forecasts

PREDICT THRU YEAR 2006 MONTH 6.
TSMODEL
  /SERIESPLOT FORECAST
  /MODELDETAILS PRINT=FORECASTS
  /MODEL DEPENDENT=revenue.

• The PREDICT command is used to specify the forecast period for the TSMODEL procedure.

• The SERIESPLOT subcommand specifies that the output contains a plot of the predicted values within the forecast period.

• The MODELDETAILS subcommand specifies that the output includes a table containing the predicted values within the forecast period.

Saving Models to an External File

TSMODEL
  /MODEL DEPENDENT=sku1 TO sku50 OUTFILE='/models/models_sku1TOsku50.xml'.

• The OUTFILE keyword specifies that each of the resulting models is to be saved to the file /models/models_sku1TOsku50.xml.

• The saved models can be used to produce new forecasts with the TSAPPLY command when new data are available. See the topic TSAPPLY for more information.

Saving Model Predictions, Residuals, and Confidence Intervals as New Variables

TSMODEL
  /SAVE PREDICTED LCL UCL NRESIDUAL
  /MODEL DEPENDENT=revenue.

• The SAVE subcommand specifies that new variables containing the model predictions, noise residuals, and confidence intervals are saved to the active dataset.

Specifying Multiple Model Types

TSMODEL
  /MODEL DEPENDENT=sku1 TO sku10 INDEPENDENT=adspending
  /EXPERTMODELER TYPE=[ARIMA]
  /MODEL DEPENDENT=sku11 TO sku15
  /EXSMOOTH TYPE=WINTERSMULTIPLICATIVE.

• The first MODEL block specifies that the Expert Modeler is used to find the best-fitting ARIMA model for each of the dependent series sku1 thru sku10, using the predictor variable adspending.

• The second MODEL block specifies that the Winters' multiplicative method is used to model each of the dependent series sku11 thru sku15.

• In this example, different model types were used for different dependent variables. You can also specify multiple model types for the same dependent variable, thereby obtaining multiple models for the variable.

Related Topics

TSMODEL
Overview (TSMODEL command)
Goodness-of-Fit Measures (TSMODEL command)
MODELSUMMARY Subcommand (TSMODEL command)
MODELSTATISTICS Subcommand (TSMODEL command)
MODELDETAILS Subcommand (TSMODEL command)
SERIESPLOT Subcommand (TSMODEL command)
OUTPUTFILTER Subcommand (TSMODEL command)
SAVE Subcommand (TSMODEL command)
AUXILIARY Subcommand (TSMODEL command)
MISSING Subcommand (TSMODEL command)
MODEL Subcommand (TSMODEL command)
EXPERTMODELER Subcommand (TSMODEL command)
EXSMOOTH Subcommand (TSMODEL command)
ARIMA Subcommand (TSMODEL command)
TRANSFERFUNCTION Subcommand (TSMODEL command)
AUTOOUTLIER Subcommand (TSMODEL command)
OUTLIER Subcommand (TSMODEL command)


Goodness-of-Fit Measures (TSMODEL command)

TSMODEL (command),TSMODEL (command),TSMODEL (command)
goodness of fit,goodness of fit,goodness of fit
goodness of fit,goodness of fit,goodness of fit
TSMODEL command,TSMODEL command,TSMODEL command

The following model goodness-of-fit measures are available in TSMODEL:

SRSQUARE | Stationary R-squared. A measure that compares the stationary part of the model to a simple mean model. This measure is preferable to ordinary R-squared when there is a trend or seasonal pattern. Stationary R-squared can be negative with a range of negative infinity to 1. Negative values mean that the model under consideration is worse than the baseline model. Positive values mean that the model under consideration is better than the baseline model.
RSQUARE | R-squared. An estimate of the proportion of the total variation in the series that is explained by the model. This measure is most useful when the series is stationary. R-squared can be negative with a range of negative infinity to 1. Negative values mean that the model under consideration is worse than the baseline model. Positive values mean that the model under consideration is better than the baseline model.
RMSE | RMSE. Root Mean Square Error. The square root of mean square error. A measure of how much a dependent series varies from its model-predicted level, expressed in the same units as the dependent series.
MAPE | MAPE. Mean Absolute Percentage Error. A measure of how much a dependent series varies from its model-predicted level. It is independent of the units used and can therefore be used to compare series with different units.
MAE | MAE. Mean absolute error. Measures how much the series varies from its model-predicted level. MAE is reported in the original series units.
MAXAPE | MaxAPE. Maximum Absolute Percentage Error. The largest forecasted error, expressed as a percentage. This measure is useful for imagining a worst-case scenario for your forecasts.
MAXAE | MaxAE. Maximum Absolute Error. The largest forecasted error, expressed in the same units as the dependent series. Like MaxAPE, it is useful for imagining the worst-case scenario for your forecasts. Maximum absolute error and maximum absolute percentage error may occur at different series points--for example, when the absolute error for a large series value is slightly larger than the absolute error for a small series value. In that case, the maximum absolute error will occur at the larger series value and the maximum absolute percentage error will occur at the smaller series value.
NORMBIC | Normalized BIC. Normalized Bayesian Information Criterion. A general measure of the overall fit of a model that attempts to account for model complexity. It is a score based upon the mean square error and includes a penalty for the number of parameters in the model and the length of the series. The penalty removes the advantage of models with more parameters, making the statistic easy to compare across different models for the same series.

Related Topics

TSMODEL
Overview (TSMODEL command)
Examples (TSMODEL command)
MODELSUMMARY Subcommand (TSMODEL command)
MODELSTATISTICS Subcommand (TSMODEL command)
MODELDETAILS Subcommand (TSMODEL command)
SERIESPLOT Subcommand (TSMODEL command)
OUTPUTFILTER Subcommand (TSMODEL command)
SAVE Subcommand (TSMODEL command)
AUXILIARY Subcommand (TSMODEL command)
MISSING Subcommand (TSMODEL command)
MODEL Subcommand (TSMODEL command)
EXPERTMODELER Subcommand (TSMODEL command)
EXSMOOTH Subcommand (TSMODEL command)
ARIMA Subcommand (TSMODEL command)
TRANSFERFUNCTION Subcommand (TSMODEL command)
AUTOOUTLIER Subcommand (TSMODEL command)
OUTLIER Subcommand (TSMODEL command)


MODELSUMMARY Subcommand (TSMODEL command)

TSMODEL (command),TSMODEL (command),TSMODEL (command)
MODELSUMMARY subcommand,MODELSUMMARY subcommand,MODELSUMMARY subcommand
MODELSUMMARY (subcommand),MODELSUMMARY (subcommand),MODELSUMMARY (subcommand)
TSMODEL command,TSMODEL command,TSMODEL command

The MODELSUMMARY subcommand controls the display of tables and charts that summarize goodness of fit, residual autocorrelations, and residual partial autocorrelations across estimated models. Each keyword is followed by an equals sign (=) and one or more of the available options enclosed in square brackets.

Example

TSMODEL
  /MODELSUMMARY PLOT=[SRSQUARE MAXAPE]
  /MODEL DEPENDENT=sku1 TO sku100.

• The output includes two histograms: one histogram for stationary R-squared and one histogram for the maximum absolute percentage error. Each histogram consists of results across all models (one model for each dependent variable).

PRINT Keyword Collapse Hide details

PRINT Keyword

The PRINT keyword controls the display of model summary tables.

MODELFIT | Goodness of fit. Table of summary statistics and percentiles for stationary R-square, R-square, root mean square error, mean absolute percentage error, mean absolute error, maximum absolute percentage error, maximum absolute error, and normalized Bayesian Information Criterion.
RESIDACF | Residual autocorrelation function. Table of summary statistics and percentiles for autocorrelations of the residuals.
RESIDPACF | Residual partial autocorrelation function. Table of summary statistics and percentiles for partial autocorrelations of the residuals.
NONE | No tables are shown. An error occurs if NONE is used in combination with any other PRINT option.
PLOT Keyword Collapse Hide details

PLOT Keyword

The PLOT keyword controls the display of model summary charts. By default, no charts are shown. (For detailed definitions of the following terms, see Goodness-of-Fit Measures (TSMODEL command).)

SRSQUARE | Histogram of Stationary R-Square.
RSQUARE | Histogram of R-Square.
RMSE | Histogram of Root Mean Square Error.
MAPE | Histogram of Mean Absolute Percentage Error.
MAE | Histogram of Mean Absolute Error.
MAXAPE | Histogram of Maximum Absolute Percentage Error.
MAXAE | Histogram of Maximum Absolute Error.
NORMBIC | Histogram of Normalized Bayesian Information Criterion (BIC).
RESIDACF | Boxplot of Residual Autocorrelation Function by Lag.
RESIDPACF | Boxplot of Residual Partial Autocorrelation Function by Lag.

Related Topics

TSMODEL
Overview (TSMODEL command)
Examples (TSMODEL command)
Goodness-of-Fit Measures (TSMODEL command)
MODELSTATISTICS Subcommand (TSMODEL command)
MODELDETAILS Subcommand (TSMODEL command)
SERIESPLOT Subcommand (TSMODEL command)
OUTPUTFILTER Subcommand (TSMODEL command)
SAVE Subcommand (TSMODEL command)
AUXILIARY Subcommand (TSMODEL command)
MISSING Subcommand (TSMODEL command)
MODEL Subcommand (TSMODEL command)
EXPERTMODELER Subcommand (TSMODEL command)
EXSMOOTH Subcommand (TSMODEL command)
ARIMA Subcommand (TSMODEL command)
TRANSFERFUNCTION Subcommand (TSMODEL command)
AUTOOUTLIER Subcommand (TSMODEL command)
OUTLIER Subcommand (TSMODEL command)


MODELSTATISTICS Subcommand (TSMODEL command)

TSMODEL (command),TSMODEL (command),TSMODEL (command)
MODELSTATISTICS subcommand,MODELSTATISTICS subcommand,MODELSTATISTICS subcommand
MODELSTATISTICS (subcommand),MODELSTATISTICS (subcommand),MODELSTATISTICS (subcommand)
TSMODEL command,TSMODEL command,TSMODEL command

The MODELSTATISTICS subcommand controls display of a table that lists all models, along with chosen goodness-of-fit statistics.

Example

TSMODEL
  /MODELSTATISTICS DISPLAY=YES MODELFIT=[RSQUARE]
  /MODEL DEPENDENT=sku1 TO sku25.

• The output includes a table displaying the value of R-squared for each model.

DISPLAY Keyword Collapse Hide details

DISPLAY Keyword

The DISPLAY keyword controls whether the model statistics table is shown.

YES | Model statistics table is shown. Table of model goodness of fit, Ljung-Box Q statistic, and number of outliers detected by model. This setting is the default. The Q statistic measures the degree of pattern in the residuals. Large values of Q in relation to its degrees of freedom indicate that model residuals are not randomly distributed.
NO | Model statistics table is not shown.
MODELFIT Keyword Collapse Hide details

MODELFIT Keyword

The MODELFIT keyword controls which fit statistics are shown in the model statistics table, and the keyword is ignored if DISPLAY=NO. The keyword is followed by an equals sign (=) and one or more of the following options enclosed in square brackets. (For detailed definitions of the following terms, see Goodness-of-Fit Measures (TSMODEL command).)

SRSQUARE | Stationary R -Square. This setting is the default.
RSQUARE | R-Square.
RMSE | Root Mean Square Error.
MAPE | Mean Absolute Percentage Error.
MAE | Mean Absolute Error.
MAXAPE | Maximum Absolute Percentage Error.
MAXAE | Maximum Absolute Error.
NORMBIC | Normalized Bayesian Information Criterion (BIC).

Related Topics

TSMODEL
Overview (TSMODEL command)
Examples (TSMODEL command)
Goodness-of-Fit Measures (TSMODEL command)
MODELSUMMARY Subcommand (TSMODEL command)
MODELDETAILS Subcommand (TSMODEL command)
SERIESPLOT Subcommand (TSMODEL command)
OUTPUTFILTER Subcommand (TSMODEL command)
SAVE Subcommand (TSMODEL command)
AUXILIARY Subcommand (TSMODEL command)
MISSING Subcommand (TSMODEL command)
MODEL Subcommand (TSMODEL command)
EXPERTMODELER Subcommand (TSMODEL command)
EXSMOOTH Subcommand (TSMODEL command)
ARIMA Subcommand (TSMODEL command)
TRANSFERFUNCTION Subcommand (TSMODEL command)
AUTOOUTLIER Subcommand (TSMODEL command)
OUTLIER Subcommand (TSMODEL command)


MODELDETAILS Subcommand (TSMODEL command)

TSMODEL (command),TSMODEL (command),TSMODEL (command)
MODELDETAILS subcommand,MODELDETAILS subcommand,MODELDETAILS subcommand
MODELDETAILS (subcommand),MODELDETAILS (subcommand),MODELDETAILS (subcommand)
TSMODEL command,TSMODEL command,TSMODEL command

The MODELDETAILS subcommand controls the display of model parameters, model forecasts, and autocorrelations of noise residuals for individual models. Each keyword is followed by an equals sign (=) and one or more of the available options enclosed in square brackets.

Example

TSMODEL
  /MODELDETAILS PRINT=[PARAMETERS FORECASTS]
  /MODEL DEPENDENT=sku1 TO sku50.

• The output includes tables displaying the model parameters and forecasts for each model (one model for each dependent variable).

PRINT Keyword Collapse Hide details

PRINT Keyword

The PRINT keyword controls display of tables for individual models. By default, no tables are shown.

PARAMETERS | Model parameter estimates. Shows separate tables for ARIMA and exponential smoothing models. If outliers exist, parameter estimates for outliers are also displayed.
RESIDACF | Residual autocorrelation function. Shows residual autocorrelations by lag.
RESIDPACF | Residual partial autocorrelation function. Shows residual partial autocorrelations by lag.
FORECASTS | Forecasts and confidence intervals. Shows model forecasts and confidence intervals.
PLOT Keyword Collapse Hide details

PLOT Keyword

The PLOT keyword controls display of charts for individual models. By default, no charts are shown.

RESIDACF | Residual autocorrelation function. Shows residual autocorrelations by lag.
RESIDPACF | Residual partial autocorrelation function. Shows residual partial autocorrelations by lag.

Related Topics

TSMODEL
Overview (TSMODEL command)
Examples (TSMODEL command)
Goodness-of-Fit Measures (TSMODEL command)
MODELSUMMARY Subcommand (TSMODEL command)
MODELSTATISTICS Subcommand (TSMODEL command)
SERIESPLOT Subcommand (TSMODEL command)
OUTPUTFILTER Subcommand (TSMODEL command)
SAVE Subcommand (TSMODEL command)
AUXILIARY Subcommand (TSMODEL command)
MISSING Subcommand (TSMODEL command)
MODEL Subcommand (TSMODEL command)
EXPERTMODELER Subcommand (TSMODEL command)
EXSMOOTH Subcommand (TSMODEL command)
ARIMA Subcommand (TSMODEL command)
TRANSFERFUNCTION Subcommand (TSMODEL command)
AUTOOUTLIER Subcommand (TSMODEL command)
OUTLIER Subcommand (TSMODEL command)


SERIESPLOT Subcommand (TSMODEL command)

TSMODEL (command),TSMODEL (command),TSMODEL (command)
SERIESPLOT subcommand,SERIESPLOT subcommand,SERIESPLOT subcommand
SERIESPLOT (subcommand),SERIESPLOT (subcommand),SERIESPLOT (subcommand)
TSMODEL command,TSMODEL command,TSMODEL command
plots,plots,plots
TSMODEL command,TSMODEL command,TSMODEL command

The SERIESPLOT subcommand allows you to obtain plots of predicted values, observed values, and confidence intervals for each estimated model. By default, no plots are shown. The subcommand is followed by one or more of the following keywords:

OBSERVED | Displays all observed values of the dependent series.
FORECAST | Displays model-predicted values within the forecast period.
FIT | Displays model-predicted values within the estimation period.
FORECASTCI | Displays upper and lower confidence limits within the forecast period.
FITCI | Displays upper and lower confidence limits within the estimation period.

Example

TSMODEL
  /SERIESPLOT OBSERVED FORECAST
  /MODEL DEPENDENT=sku1 TO sku5
  /MODEL DEPENDENT=revenue INDEPENDENT=adspending.

• The plot includes the model-predicted values in the forecast period as well as all observed values for each of the dependent series.

Related Topics

TSMODEL
Overview (TSMODEL command)
Examples (TSMODEL command)
Goodness-of-Fit Measures (TSMODEL command)
MODELSUMMARY Subcommand (TSMODEL command)
MODELSTATISTICS Subcommand (TSMODEL command)
MODELDETAILS Subcommand (TSMODEL command)
OUTPUTFILTER Subcommand (TSMODEL command)
SAVE Subcommand (TSMODEL command)
AUXILIARY Subcommand (TSMODEL command)
MISSING Subcommand (TSMODEL command)
MODEL Subcommand (TSMODEL command)
EXPERTMODELER Subcommand (TSMODEL command)
EXSMOOTH Subcommand (TSMODEL command)
ARIMA Subcommand (TSMODEL command)
TRANSFERFUNCTION Subcommand (TSMODEL command)
AUTOOUTLIER Subcommand (TSMODEL command)
OUTLIER Subcommand (TSMODEL command)


OUTPUTFILTER Subcommand (TSMODEL command)

TSMODEL (command),TSMODEL (command),TSMODEL (command)
OUTPUTFILTER subcommand,OUTPUTFILTER subcommand,OUTPUTFILTER subcommand
OUTPUTFILTER (subcommand),OUTPUTFILTER (subcommand),OUTPUTFILTER (subcommand)
TSMODEL command,TSMODEL command,TSMODEL command

The OUTPUTFILTER subcommand controls which models are included in the model statistics table (MODELSTATISTICS subcommand), detailed model output (MODELDETAILS subcommand), and time series plots (SERIESPLOT subcommand).

• By default, all models are included in the output. OUTPUTFILTER can be used to display only the best-fitting or worst-fitting models (or both). If you request both, two sets of output are displayed.

• OUTPUTFILTER is ignored if no output is requested on the MODELSTATISTICS, MODELDETAILS, or SERIESPLOT subcommands.

• OUTPUTFILTER has no effect on output from the MODELSUMMARY subcommand.

Example

TSMODEL
  /MODELSTATISTICS DISPLAY=YES MODELFIT=[SRSQUARE MAXAPE NORMBIC]
  /OUTPUTFILTER DISPLAY=[BESTFIT(N=5) WORSTFIT(PCT=10)]
  /MODEL DEPENDENT=sku1 TO sku200.

• The output consists of two sets of results: those results for the 5 best-fitting models and those results for models with fit values in the bottom 10%. The stationary R-squared value is used as the goodness-of-fit measure.

DISPLAY Keyword Collapse Hide details

DISPLAY Keyword

The DISPLAY keyword controls which models are included in MODELSTATISTICS, MODELDETAILS, and SERIESPLOT output.

• By default, all models are displayed (DISPLAY=ALLMODELS).

• To display only those models with extreme goodness-of-fit values, specify BESTFIT, WORSTFIT, or both, in square brackets. One or both keywords must be specified.

ALLMODELS | All models are displayed. All models that could be computed are shown. This setting is the default.
BESTFIT | Models having the highest fit values are shown. To display the models with the N highest fit values, specify BESTFIT followed by N=count in parentheses—for example, BESTFIT(N=5). The count must be a positive integer. If the count exceeds the number of estimated models, all models are shown. To display the models with fit values in the top N%, specify PCT=percent in parentheses. For example, BESTFIT(PCT=5) displays models with fit values in the top 5% among estimated models. The percentage value must be greater than zero and less than 100.
WORSTFIT | Models having the lowest fit values are shown. To display the models with the N lowest fit values, specify WORSTFIT followed by N=count in parentheses—for example, WORSTFIT(N=5). The count must be a positive integer. If the count exceeds the number of estimated models, all models are shown. To display the models with fit values in the lowest N%, specify PCT=percent in parentheses. For example, WORSTFIT(PCT=5) displays models with fit values in the bottom 5% among estimated models. The percentage value must be greater than zero and less than 100.
MODELFIT Keyword Collapse Hide details

MODELFIT Keyword

The MODELFIT keyword specifies the fit measure that is used to filter models. MODELFIT is ignored if DISPLAY=ALLMODELS.

Specify one of the following options. (For detailed definitions of the following terms, see Goodness-of-Fit Measures (TSMODEL command).)

SRSQUARE | Stationary R-Square. This setting is the default.
RSQUARE | R-Square.
RMSE | Root Mean Square Error.
MAPE | Mean Absolute Percentage Error.
MAE | Mean Absolute Error.
MAXAPE | Maximum Absolute Percentage Error.
MAXAE | Maximum Absolute Error.
NORMBIC | Normalized Bayesian Information Criterion (BIC).

Related Topics

TSMODEL
Overview (TSMODEL command)
Examples (TSMODEL command)
Goodness-of-Fit Measures (TSMODEL command)
MODELSUMMARY Subcommand (TSMODEL command)
MODELSTATISTICS Subcommand (TSMODEL command)
MODELDETAILS Subcommand (TSMODEL command)
SERIESPLOT Subcommand (TSMODEL command)
SAVE Subcommand (TSMODEL command)
AUXILIARY Subcommand (TSMODEL command)
MISSING Subcommand (TSMODEL command)
MODEL Subcommand (TSMODEL command)
EXPERTMODELER Subcommand (TSMODEL command)
EXSMOOTH Subcommand (TSMODEL command)
ARIMA Subcommand (TSMODEL command)
TRANSFERFUNCTION Subcommand (TSMODEL command)
AUTOOUTLIER Subcommand (TSMODEL command)
OUTLIER Subcommand (TSMODEL command)


SAVE Subcommand (TSMODEL command)

TSMODEL (command),TSMODEL (command),TSMODEL (command)
SAVE subcommand,SAVE subcommand,SAVE subcommand
SAVE (subcommand),SAVE (subcommand),SAVE (subcommand)
TSMODEL command,TSMODEL command,TSMODEL command

The SAVE subcommand is used to save new variables representing predicted values, residuals, and confidence intervals to the active dataset. By default, no new variables are saved to the active dataset.

• Specify one or more keywords, each keyword followed by an optional rootname to be used as the prefix for new variable names. Enclose the rootname in parentheses. Each keyword gives rise to one new variable for each dependent variable.

• The rootname, if specified, must conform to the rules for valid variable names.

• If no rootname is specified, TSMODEL uses a default name.

• The full variable name is the concatenation of the rootname, the name of the associated dependent variable, and a model identifier. The variable name is extended if necessary to avoid variable naming conflicts.

• The PREDICT command controls whether new cases are added to the file when new variables are saved. New cases are added if PREDICT specifies a forecast period that extends beyond the length of the dependent-variable series.

• SAVE is ignored with a warning if temporary transformations are in effect.

Example

TSMODEL
  /SAVE PREDICTED(Pred) NRESIDUAL
  /MODEL DEPENDENT=sku1 TO sku10.

• Two new variables are created for each of the dependent variables sku1 thru sku10: one variable contains the model predictions, and the other variable contains the noise residuals.

• The rootname (prefix) for the variables containing model predictions is Pred.

• The rootname for the variables containing noise residuals is NResidual (the default).

PREDICTED(rootname) | Model fit and forecast values. The default rootname is Predicted.
LCL(rootname) | Lower confidence limits. The default rootname is LCL.
UCL(rootname) | Upper confidence limits. The default rootname is UCL.
NRESIDUAL(rootname) | Noise residuals. The default rootname is NResidual. When transformations of the dependent variable are performed (for example, natural log), these residuals are the residuals for the transformed series.

Related Topics

TSMODEL
Overview (TSMODEL command)
Examples (TSMODEL command)
Goodness-of-Fit Measures (TSMODEL command)
MODELSUMMARY Subcommand (TSMODEL command)
MODELSTATISTICS Subcommand (TSMODEL command)
MODELDETAILS Subcommand (TSMODEL command)
SERIESPLOT Subcommand (TSMODEL command)
OUTPUTFILTER Subcommand (TSMODEL command)
AUXILIARY Subcommand (TSMODEL command)
MISSING Subcommand (TSMODEL command)
MODEL Subcommand (TSMODEL command)
EXPERTMODELER Subcommand (TSMODEL command)
EXSMOOTH Subcommand (TSMODEL command)
ARIMA Subcommand (TSMODEL command)
TRANSFERFUNCTION Subcommand (TSMODEL command)
AUTOOUTLIER Subcommand (TSMODEL command)
OUTLIER Subcommand (TSMODEL command)


AUXILIARY Subcommand (TSMODEL command)

TSMODEL (command),TSMODEL (command),TSMODEL (command)
AUXILIARY subcommand,AUXILIARY subcommand,AUXILIARY subcommand
AUXILIARY (subcommand),AUXILIARY (subcommand),AUXILIARY (subcommand)
TSMODEL command,TSMODEL command,TSMODEL command

The AUXILIARY subcommand is used to set the confidence interval level for forecasts, set the maximum number of lags for autocorrelation and partial autocorrelation plots and tables, and set the season length.

Example

TSMODEL
  /MODELDETAILS PLOT=[RESIDACF RESIDPACF]
  /AUXILIARY MAXACFLAGS=36 SEASONLENGTH=6
  /MODEL DEPENDENT=sku1 TO sku20.

CILEVEL Keyword

confidence intervals,confidence intervals,confidence intervals
TSMODEL command,TSMODEL command,TSMODEL command
TSMODEL (command),TSMODEL (command),TSMODEL (command)
confidence intervals,confidence intervals,confidence intervals

The CILEVEL keyword sets the confidence level.

• Specify a positive number that is less than 100.

• The default is 95.

MAXACFLAGS Keyword

TSMODEL (command),TSMODEL (command),TSMODEL (command)
lags displayed,lags displayed,lags displayed

The MAXACFLAGS keyword sets the maximum number of lags displayed in residual autocorrelation and partial autocorrelation tables and plots.

• Specify a positive integer.

• The default is 24.

periodicity,periodicity,periodicity
TSMODEL command,TSMODEL command,TSMODEL command
seasonality,seasonality,seasonality
TSMODEL command,TSMODEL command,TSMODEL command
TSMODEL (command),TSMODEL (command),TSMODEL (command)
seasonality,seasonality,seasonality
periodicity,periodicity,periodicity

SEASONLENGTH Keyword

The SEASONLENGTH keyword is used to specify the length of the seasonal period (the number of observations in one period or season).

• The season length must be a positive integer.

• If SEASONLENGTH is not specified, the periodicity that is specified by using the DATE command defines the season length.

• If the Expert Modeler is used, a warning occurs and the season length is treated as 1 for any splits for which there are gaps in the data. If a custom model is specified, a warning is issued and the model is not estimated for any such splits.

• For custom ARIMA or exponential smoothing models, SEASONLENGTH is ignored if the specified model has no seasonal component.

Related Topics

TSMODEL
Overview (TSMODEL command)
Examples (TSMODEL command)
Goodness-of-Fit Measures (TSMODEL command)
MODELSUMMARY Subcommand (TSMODEL command)
MODELSTATISTICS Subcommand (TSMODEL command)
MODELDETAILS Subcommand (TSMODEL command)
SERIESPLOT Subcommand (TSMODEL command)
OUTPUTFILTER Subcommand (TSMODEL command)
SAVE Subcommand (TSMODEL command)
MISSING Subcommand (TSMODEL command)
MODEL Subcommand (TSMODEL command)
EXPERTMODELER Subcommand (TSMODEL command)
EXSMOOTH Subcommand (TSMODEL command)
ARIMA Subcommand (TSMODEL command)
TRANSFERFUNCTION Subcommand (TSMODEL command)
AUTOOUTLIER Subcommand (TSMODEL command)
OUTLIER Subcommand (TSMODEL command)


MISSING Subcommand (TSMODEL command)

TSMODEL (command),TSMODEL (command),TSMODEL (command)
MISSING subcommand,MISSING subcommand,MISSING subcommand
MISSING (subcommand),MISSING (subcommand),MISSING (subcommand)
TSMODEL command,TSMODEL command,TSMODEL command
missing values,missing values,missing values
TSMODEL command,TSMODEL command,TSMODEL command

The MISSING subcommand controls the handling of user-missing values.

• By default, user-missing values are treated as missing (invalid) data.

• System-missing values are always treated as invalid.

• Cases with missing values of a dependent variable that occur within the estimation period are included in the model. The specific handling of the missing value depends on the estimation method.

• A warning is issued if a predictor has missing values within the estimation period. For the Expert Modeler, models involving the predictor are estimated without the predictor. For custom ARIMA, models involving the predictor are not estimated.

• If any predictor has missing values within the forecast period, the procedure issues a warning and forecasts as far as it can.

Example

TSMODEL
  /MISSING USERMISSING=INCLUDE
  /MODEL DEPENDENT=revenue INDEPENDENT=adspending.

USERMISSING Keyword

The USERMISSING keyword controls the treatment of user-missing values and is required.

EXCLUDE | Exclude user-missing values. User-missing values are treated as missing. This setting is the default.
INCLUDE | Include user-missing values. User-missing values are treated as valid data.

Related Topics

TSMODEL
Overview (TSMODEL command)
Examples (TSMODEL command)
Goodness-of-Fit Measures (TSMODEL command)
MODELSUMMARY Subcommand (TSMODEL command)
MODELSTATISTICS Subcommand (TSMODEL command)
MODELDETAILS Subcommand (TSMODEL command)
SERIESPLOT Subcommand (TSMODEL command)
OUTPUTFILTER Subcommand (TSMODEL command)
SAVE Subcommand (TSMODEL command)
AUXILIARY Subcommand (TSMODEL command)
MODEL Subcommand (TSMODEL command)
EXPERTMODELER Subcommand (TSMODEL command)
EXSMOOTH Subcommand (TSMODEL command)
ARIMA Subcommand (TSMODEL command)
TRANSFERFUNCTION Subcommand (TSMODEL command)
AUTOOUTLIER Subcommand (TSMODEL command)
OUTLIER Subcommand (TSMODEL command)


MODEL Subcommand (TSMODEL command)

TSMODEL (command),TSMODEL (command),TSMODEL (command)
MODEL subcommand,MODEL subcommand,MODEL subcommand
MODEL (subcommand),MODEL (subcommand),MODEL (subcommand)
TSMODEL command,TSMODEL command,TSMODEL command

The MODEL subcommand is required and is used to signal the start of a model specification, as well as to specify model variable(s).

• All variables must be numeric. Any string variables are filtered out, with a warning.

• Variables that define split-file groups are filtered out of all variable lists, with a warning.

• ALL and TO can be used in dependent and independent variable lists. ALL represents all variables in the active dataset. TO refers to a range of variables in the active dataset.

Note: Specification of the model type is optional and is accomplished by including an EXPERTMODELER, EXSMOOTH, or ARIMA subcommand following the MODEL subcommand. If the model type is not specified, the best-fitting ARIMA or exponential smoothing model will automatically be selected by the Expert Modeler, which is equivalent to specifying /EXPERTMODELER TYPE=[ARIMA EXSMOOTH]. If you are unsure of which type of model to choose, or you want Expert Modeler to choose for you, use the MODEL subcommand without a model type subcommand.

Example

TSMODEL
  /MODEL DEPENDENT=store1 TO store100
         INDEPENDENT=adspending
         OUTFILE='/models/stores.xml'
         PREFIX='Expert'.

• DEPENDENT specifies that variables store1 thru store100 are to be modeled. The keyword TO refers to the order of the variables in the active dataset.

• The INDEPENDENT keyword specifies that the variable adspending is to be considered as a predictor variable.

• OUTFILE specifies that the resulting models are to be stored in the file /models/stores.xml.

• PREFIX specifies that the models will be named Expert_1 (the model for store1), Expert_2 (the model for store2), etc.

• The absence of a model type subcommand (EXPERTMODELER, ARIMA, or EXSMOOTH) means that the Expert Modeler will be used to find the best-fitting exponential smoothing or ARIMA model.

DEPENDENT Keyword Collapse Hide details

DEPENDENT Keyword

The DEPENDENT keyword is used to specify one or more dependent variables and is required.

• At least one dependent variable must be specified.

• Repeated instances of the same variable are filtered out of the list.

• A separate model is generated for each dependent variable in each MODEL block. Identical dependent variables in separate MODEL blocks generate separate models.

INDEPENDENT Keyword Collapse Hide details

INDEPENDENT Keyword

The INDEPENDENT keyword is used to specify one or more optional independent variables.

• Order of variables within the independent variable list matters when the Expert Modeler is used. The Expert Modeler drops nonsignificant independent variables one at a time, starting with the last variable in the list.

• In the case of custom ARIMA models, all independent variables are included in the model.

• Repeated instances of an independent variable are filtered out of the list. For example, a b a c a is equivalent to a b c. Assuming that the active dataset contains variables a, b, and c, ALL is also equivalent to a b c.

• An independent variable that also appears in the dependent variable list is treated solely as a dependent variable and is excluded from consideration as an independent variable for the model involving that particular dependent variable. For example, if you specify DEPENDENT=a b and INDEPENDENT=a c, then c is the only independent variable when modeling a, but a and c are both used as independent variables when modeling b.

events,events,events
TSMODEL command,TSMODEL command,TSMODEL command
TSMODEL (command),TSMODEL (command),TSMODEL (command)
events,events,events
Events Collapse Hide details

Events

• Event variables are special independent variables that are used to model effects of occurrences such as a flood, strike, or introduction of a new product line. Any abrupt shift in the level of the dependent series can be modeled by using event variables.

• To designate an independent variable as an event variable, specify [E] following the name of the variable. For example, INDEPENDENT=strike [E] indicates that the variable strike is an event variable.

• When the Expert Modeler is used, event variables enter the model with linear terms only (as opposed to transfer functions). Thus, event designation can save processing time and guard against overfitting when using the Expert Modeler.

• Custom ARIMA models ignore event designation.

• For event variables, the presence of an effect is indicated by cases with a value of 1. Cases with values other than 1 are treated as indicating no effect.

• The effect of an event can last a single time period or several periods. If the effect lasts several periods, the corresponding event variable should contain a series of consecutive 1s.

• Event designation applies only to the variable that immediately precedes the designation in the independent variable list. For example, x1 x2 x3 [E] and x1 TO x3 [E] designate x3 (only) as an event variable. If event designation follows ALL, it applies to all independent variables.

• If a variable appears more than once in the independent variable list, the event specification for the last instance of the variable is honored. For example, if ALL x1 [E] is specified, x1 is treated as an event variable; if ALL [E] X1 is specified, x1 is treated as an ordinary predictor.

OUTFILE Keyword Collapse Hide details

OUTFILE Keyword

The OUTFILE keyword is used to save models to an external file. Saved models can be used to obtain updated forecasts, based on more current data, using the TSAPPLY command. See the topic TSAPPLY for more information.

• Models are written to an XML file. Each model is assigned a unique name and a description that includes the name of the dependent variable and the model type.

• The filename must be specified in full. No extension is supplied.

• If two or more MODEL subcommands (within a single invocation of TSMODEL) specify the same external file, all models that are created by those MODEL subcommands are saved to that file.

• OUTFILE is ignored with a warning if SPLIT FILE is in effect.

model names,model names,model names
TSMODEL command,TSMODEL command,TSMODEL command
TSMODEL (command),TSMODEL (command),TSMODEL (command)
model names,model names,model names
PREFIX Keyword Collapse Hide details

PREFIX Keyword

Models are assigned unique names consisting of a customizable prefix, along with an integer suffix. The PREFIX keyword is used to specify a custom prefix.

• Custom prefixes must be specified in quotes—for example, PREFIX='ExpertArima'. The default prefix is ‘Model’.

• Integer suffixes are unique across the set of models that have the same prefix; for example, Model_1, Model_2. Models with different prefixes, however, can have the same integer suffix—for example, CustomArima_1, ExpertArima_1.

Related Topics

TSMODEL
Overview (TSMODEL command)
Examples (TSMODEL command)
Goodness-of-Fit Measures (TSMODEL command)
MODELSUMMARY Subcommand (TSMODEL command)
MODELSTATISTICS Subcommand (TSMODEL command)
MODELDETAILS Subcommand (TSMODEL command)
SERIESPLOT Subcommand (TSMODEL command)
OUTPUTFILTER Subcommand (TSMODEL command)
SAVE Subcommand (TSMODEL command)
AUXILIARY Subcommand (TSMODEL command)
MISSING Subcommand (TSMODEL command)
EXPERTMODELER Subcommand (TSMODEL command)
EXSMOOTH Subcommand (TSMODEL command)
ARIMA Subcommand (TSMODEL command)
TRANSFERFUNCTION Subcommand (TSMODEL command)
AUTOOUTLIER Subcommand (TSMODEL command)
OUTLIER Subcommand (TSMODEL command)


EXPERTMODELER Subcommand (TSMODEL command)

TSMODEL (command),TSMODEL (command),TSMODEL (command)
EXPERTMODELER subcommand,EXPERTMODELER subcommand,EXPERTMODELER subcommand
EXPERTMODELER (subcommand),EXPERTMODELER (subcommand),EXPERTMODELER (subcommand)
TSMODEL command,TSMODEL command,TSMODEL command
Expert Modeler,Expert Modeler,Expert Modeler
TSMODEL command,TSMODEL command,TSMODEL command

The EXPERTMODELER subcommand controls options for automatic model identification that is performed by the Expert Modeler.

Example

TSMODEL
  /MODEL DEPENDENT=store1 TO store100
         INDEPENDENT=adspending
  /EXPERTMODELER TYPE=[ARIMA].

• The keyword ARIMA specifies that the Expert Modeler is to limit the model search to the best-fitting ARIMA model.

TYPE Keyword

The TYPE keyword is required and is used to specify the model types that are evaluated: ARIMA, exponential smoothing, or both.

• By default, both ARIMA and exponential smoothing models are considered.

• Either ARIMA, EXSMOOTH, or both must be specified in square brackets.

• An error occurs if you specify the EXSMOOTH keyword by itself and the model contains independent variables.

The keyword is followed by an equals sign (=) and one or both of the following options enclosed in square brackets:

ARIMA | ARIMA models are considered.
EXSMOOTH | Exponential smoothing models are considered.

TRYSEASONAL Keyword

The TRYSEASONAL keyword specifies whether seasonal models are considered by the Expert Modeler.

• TRYSEASONAL is ignored if the data are nonperiodic (that is, season length is 1).

YES | The Expert Modeler considers seasonal models. This setting is the default.
NO | The Expert Modeler does not consider seasonal models. Only nonseasonal models are considered.

Related Topics

TSMODEL
Overview (TSMODEL command)
Examples (TSMODEL command)
Goodness-of-Fit Measures (TSMODEL command)
MODELSUMMARY Subcommand (TSMODEL command)
MODELSTATISTICS Subcommand (TSMODEL command)
MODELDETAILS Subcommand (TSMODEL command)
SERIESPLOT Subcommand (TSMODEL command)
OUTPUTFILTER Subcommand (TSMODEL command)
SAVE Subcommand (TSMODEL command)
AUXILIARY Subcommand (TSMODEL command)
MISSING Subcommand (TSMODEL command)
MODEL Subcommand (TSMODEL command)
EXSMOOTH Subcommand (TSMODEL command)
ARIMA Subcommand (TSMODEL command)
TRANSFERFUNCTION Subcommand (TSMODEL command)
AUTOOUTLIER Subcommand (TSMODEL command)
OUTLIER Subcommand (TSMODEL command)


EXSMOOTH Subcommand (TSMODEL command)

TSMODEL (command),TSMODEL (command),TSMODEL (command)
EXSMOOTH subcommand,EXSMOOTH subcommand,EXSMOOTH subcommand
EXSMOOTH (subcommand),EXSMOOTH (subcommand),EXSMOOTH (subcommand)
TSMODEL command,TSMODEL command,TSMODEL command
exponential smoothing,exponential smoothing,exponential smoothing
TSMODEL command,TSMODEL command,TSMODEL command

The EXSMOOTH subcommand controls options for custom exponential smoothing models.

• Using EXSMOOTH generates an error if independent variables are defined.

• For seasonal models (SIMPLESEASONAL, WINTERSADDITIVE, and WINTERSMULTIPLICATIVE), an error is generated if the season length has not been defined via the DATE command or the SEASONLENGTH keyword.

Example

TSMODEL
  /AUXILIARY SEASONLENGTH=12
  /MODEL DEPENDENT=store1 TO store100
  /EXSMOOTH TYPE=WINTERSMULTIPLICATIVE.
TYPE Keyword Collapse Hide details

TYPE Keyword

The TYPE keyword is required and is used to specify the type of exponential smoothing model. There is no default method.

SIMPLE | Simple exponential smoothing model. This model is appropriate for series in which there is no trend or seasonality. Its only smoothing parameter is level. Simple exponential smoothing is most similar to an ARIMA model with zero orders of autoregression, one order of differencing, one order of moving average, and no constant.
SIMPLESEASONAL | Simple seasonal exponential smoothing model. This model is appropriate for series with no trend and a seasonal effect that is constant over time. Its smoothing parameters are level and season. Simple seasonal exponential smoothing is most similar to an ARIMA model with zero orders of autoregression, one order of differencing, one order of seasonal differencing, and orders 1, p, and p + 1 of moving average, where p is the number of periods in a seasonal interval (for monthly data, p = 12).
HOLT | Holt’s method. This model is appropriate for series in which there is a linear trend and no seasonality. Its smoothing parameters are level and trend, which are not constrained by each other's values. Holt's model is more general than Brown's model but may take longer to compute for large series. Holt's exponential smoothing is most similar to an ARIMA model with zero orders of autoregression, two orders of differencing, and two orders of moving average.
BROWN | Brown’s method. This model is appropriate for series in which there is a linear trend and no seasonality. Its smoothing parameters are level and trend, which are assumed to be equal. Brown's model is therefore a special case of Holt's model. Brown's exponential smoothing is most similar to an ARIMA model with zero orders of autoregression, two orders of differencing, and two orders of moving average, with the coefficient for the second order of moving average equal to the square of one-half of the coefficient for the first order.
DAMPEDTREND | Damped trend method. This model is appropriate for series with a linear trend that is dying out and with no seasonality. Its smoothing parameters are level, trend, and damping trend. Damped exponential smoothing is most similar to an ARIMA model with 1 order of autoregression, 1 order of differencing, and 2 orders of moving average.
WINTERSADDITIVE | Winters’ additive method. This model is appropriate for series with a linear trend and a seasonal effect that does not depend on the level of the series. Its smoothing parameters are level, trend, and season. Winters' additive exponential smoothing is most similar to an ARIMA model with zero orders of autoregression, one order of differencing, one order of seasonal differencing, and p + 1 orders of moving average, where p is the number of periods in a seasonal interval (for monthly data, p = 12).
WINTERSMULTIPLICATIVE
 | Winters’ multiplicative method. This model is appropriate for series with a linear trend and a seasonal effect that depends on the level of the series. Its smoothing parameters are level, trend, and season. Winters' multiplicative exponential smoothing is not similar to any ARIMA model.
square root transformation,square root transformation,square root transformation
TSMODEL command,TSMODEL command,TSMODEL command
natural log transformation,natural log transformation,natural log transformation
TSMODEL command,TSMODEL command,TSMODEL command
TSMODEL (command),TSMODEL (command),TSMODEL (command)
square root transformation,square root transformation,square root transformation
TSMODEL (command),TSMODEL (command),TSMODEL (command)
natural log transformation,natural log transformation,natural log transformation
TRANSFORM Keyword Collapse Hide details

TRANSFORM Keyword

The TRANSFORM keyword specifies a transformation that is performed on each dependent variable before it is modeled. By default, dependent variables are not transformed.

NONE | Dependent variable series are not transformed. This setting is the default.
SQRT | A square root transformation is performed.
LN | A natural log transformation is performed.

Related Topics

TSMODEL
Overview (TSMODEL command)
Examples (TSMODEL command)
Goodness-of-Fit Measures (TSMODEL command)
MODELSUMMARY Subcommand (TSMODEL command)
MODELSTATISTICS Subcommand (TSMODEL command)
MODELDETAILS Subcommand (TSMODEL command)
SERIESPLOT Subcommand (TSMODEL command)
OUTPUTFILTER Subcommand (TSMODEL command)
SAVE Subcommand (TSMODEL command)
AUXILIARY Subcommand (TSMODEL command)
MISSING Subcommand (TSMODEL command)
MODEL Subcommand (TSMODEL command)
EXPERTMODELER Subcommand (TSMODEL command)
ARIMA Subcommand (TSMODEL command)
TRANSFERFUNCTION Subcommand (TSMODEL command)
AUTOOUTLIER Subcommand (TSMODEL command)
OUTLIER Subcommand (TSMODEL command)


ARIMA Subcommand (TSMODEL command)

TSMODEL (command),TSMODEL (command),TSMODEL (command)
ARIMA subcommand,ARIMA subcommand,ARIMA subcommand
ARIMA (subcommand),ARIMA (subcommand),ARIMA (subcommand)
TSMODEL command,TSMODEL command,TSMODEL command
ARIMA,ARIMA,ARIMA
TSMODEL command,TSMODEL command,TSMODEL command

The ARIMA subcommand controls options for custom ARIMA models. The model must contain at least one parameter. An error occurs if the model has no autoregressive component, moving average component, outlier, or constant term, unless independent variables are selected.

Example: Basic Custom Seasonal ARIMA Model

TSMODEL
  /AUXILIARY SEASONLENGTH=12
  /MODEL DEPENDENT=passengers
  /ARIMA AR=[0] ARSEASONAL=[0] MA=[1] MASEASONAL=[1]
         DIFF=1 DIFFSEASONAL=1 TRANSFORM=LN.

• A custom ARIMA(0,1,1)(0,1,1) model is specified, including a natural log transformation of the dependent variable. The seasonal length is 12.

Example: Including Specific Lags in a Custom ARIMA Model

TSMODEL
  /MODEL DEPENDENT=revenue
  /ARIMA AR=0 MA=[1 3].

• A moving average model is specified. Moving average lags of orders 1 and 3 are included.

AR Keyword Collapse Hide details

AR Keyword

The AR keyword specifies the nonseasonal autoregressive order of the model and is required.

• You can specify a single value or a list of values in square brackets. All values must be nonnegative integers.

• If you specify a single value, square brackets are optional. The specified lag will be included in the model.

• If you specify a list of positive integer values--for example, [1 3]--the specified lags are included in the model. Duplicate lags are ignored.

ARSEASONAL Keyword Collapse Hide details

ARSEASONAL Keyword

The ARSEASONAL keyword specifies the seasonal autoregressive order of the model.

• You can specify a single value or a list of values in square brackets. All values must be nonnegative integers. The default order is zero.

• If you specify a single value, square brackets are optional. The specified lag will be included in the model.

• If you specify a list of positive integer values--for example, [1 3]--the specified lags are included in the model. Duplicate lags are ignored.

• An error occurs if ARSEASONAL specifies a nonzero value and the season length has not been defined via the DATE command or the SEASONLENGTH keyword.

MA Keyword Collapse Hide details

MA Keyword

The MA keyword specifies the nonseasonal moving average order of the model and is required.

• You can specify a single value or a list of values in square brackets. All values must be nonnegative integers.

• If you specify a single value, square brackets are optional. The specified lag will be included in the model.

• If you specify a list of positive integer values--for example, [1 3]--the specified lags are included in the model. Duplicate lags are ignored.

MASEASONAL Keyword Collapse Hide details

MASEASONAL Keyword

The MASEASONAL keyword specifies the seasonal moving average order of the model.

• You can specify a single value or a list of values in square brackets. All values must be nonnegative integers. The default order is zero.

• If you specify a single value, square brackets are optional. The specified lag will be included in the model.

• If you specify a list of positive integer values--for example, [1 3]--the specified lags are included in the model. Duplicate lags are ignored.

• An error occurs if MASEASONAL specifies a nonzero value and the season length has not been defined via the DATE command or the SEASONLENGTH keyword.

CONSTANT Keyword Collapse Hide details

CONSTANT Keyword

The CONSTANT keyword controls whether the model for each dependent variable includes a constant term.

YES | The model includes a constant term. This setting is the default.
NO | No constant term is included in the model.
square root transformation,square root transformation,square root transformation
TSMODEL command,TSMODEL command,TSMODEL command
natural log transformation,natural log transformation,natural log transformation
TSMODEL command,TSMODEL command,TSMODEL command
TSMODEL (command),TSMODEL (command),TSMODEL (command)
square root transformation,square root transformation,square root transformation
TSMODEL (command),TSMODEL (command),TSMODEL (command)
natural log transformation,natural log transformation,natural log transformation
TRANSFORM Keyword Collapse Hide details

TRANSFORM Keyword

The TRANSFORM keyword specifies a transformation that is performed on each dependent variable before it is modeled. By default, the variables are not transformed.

NONE | Dependent-variable series are not transformed. This setting is the default.
SQRT | A square root transformation is performed.
LN | A natural log transformation is performed.
difference transformation,difference transformation,difference transformation
TSMODEL command,TSMODEL command,TSMODEL command
TSMODEL (command),TSMODEL (command),TSMODEL (command)
difference transformation,difference transformation,difference transformation
DIFF Keyword Collapse Hide details

DIFF Keyword

The DIFF keyword specifies the order of nonseasonal differencing.

• The order of nonseasonal differencing must be a nonnegative integer. The default order is zero.

seasonal difference transformation,seasonal difference transformation,seasonal difference transformation
TSMODEL command,TSMODEL command,TSMODEL command
TSMODEL (command),TSMODEL (command),TSMODEL (command)
seasonal difference transformation,seasonal difference transformation,seasonal difference transformation
DIFFSEASONAL Keyword Collapse Hide details

DIFFSEASONAL Keyword

The DIFFSEASONAL keyword specifies the order of seasonal differencing.

• The order of seasonal differencing must be a nonnegative integer. The default order is zero.

• An error occurs if DIFFSEASONAL specifies a nonzero value and the season length has not been defined via the DATE command or the SEASONLENGTH keyword.

Related Topics

TSMODEL
Overview (TSMODEL command)
Examples (TSMODEL command)
Goodness-of-Fit Measures (TSMODEL command)
MODELSUMMARY Subcommand (TSMODEL command)
MODELSTATISTICS Subcommand (TSMODEL command)
MODELDETAILS Subcommand (TSMODEL command)
SERIESPLOT Subcommand (TSMODEL command)
OUTPUTFILTER Subcommand (TSMODEL command)
SAVE Subcommand (TSMODEL command)
AUXILIARY Subcommand (TSMODEL command)
MISSING Subcommand (TSMODEL command)
MODEL Subcommand (TSMODEL command)
EXPERTMODELER Subcommand (TSMODEL command)
EXSMOOTH Subcommand (TSMODEL command)
TRANSFERFUNCTION Subcommand (TSMODEL command)
AUTOOUTLIER Subcommand (TSMODEL command)
OUTLIER Subcommand (TSMODEL command)


TRANSFERFUNCTION Subcommand (TSMODEL command)

TSMODEL (command),TSMODEL (command),TSMODEL (command)
TRANSFERFUNCTION subcommand,TRANSFERFUNCTION subcommand,TRANSFERFUNCTION subcommand
TRANSFERFUNCTION (subcommand),TRANSFERFUNCTION (subcommand),TRANSFERFUNCTION (subcommand)
TSMODEL command,TSMODEL command,TSMODEL command
transfer function,transfer function,transfer function
TSMODEL command,TSMODEL command,TSMODEL command

The TRANSFERFUNCTION subcommand specifies a transfer function and transformations for predictor variables in an ARIMA model.

• By default, for each predictor in an ARIMA model, the numerator and denominator orders of the transfer function (both seasonal and nonseasonal) are set to zero. The predictors are neither transformed nor differenced by default.

• The TRANSFERFUNCTION subcommand may be used more than once in a MODEL block to specify different transfer functions and/or transformations for different independent variables.

• If there are multiple TRANSFERFUNCTION subcommands that refer to the same predictor variable within a MODEL block, the last set of specifications is honored for that variable.

• The TRANSFERFUNCTION subcommand is ignored if the EXPERTMODELER or EXSMOOTH subcommand is used.

Example

TSMODEL
  /MODEL DEPENDENT=revenue INDEPENDENT=adspending
  /ARIMA AR=[1] MA=[0]
  /TRANSFERFUNCTION VARIABLES=adspending NUM=[1] DENOM=[1].

• A custom ARIMA(1,0,0) model is specified and includes the independent variable adspending.

• The TRANSFERFUNCTION subcommand specifies that adspending is to be modeled with numerator and denominator lags of order 1.

VARIABLES Keyword Collapse Hide details

VARIABLES Keyword

The VARIABLES keyword is used to specify a list of predictors.

• Repeated instances of the same variable are filtered out of the list.

• Variables that have not been specified as independent (with the INDEPENDENT keyword) in the preceding MODEL subcommand are ignored.

• Use ALL to specify all independent variables. This setting is the default.

NUM Keyword Collapse Hide details

NUM Keyword

The NUM keyword specifies the numerator order of the transfer function for nonseasonal models.

• You can specify a single value or a list of values in square brackets. All values must be nonnegative integers. The default order is zero.

• The model always includes an implicit zero, even if not specified via the NUM keyword.

• If you specify a single value, square brackets are optional. The specified lag will be included in the model.

• If you specify a list of positive integer values--for example, [1 3]--the specified lags are included in the model. Duplicate lags are ignored.

NUMSEASONAL Keyword Collapse Hide details

NUMSEASONAL Keyword

The NUMSEASONAL keyword specifies the numerator order of the transfer function for seasonal models.

• You can specify a single value or a list of values in square brackets. All values must be nonnegative integers. The default order is zero.

• If you specify a single value, square brackets are optional. The specified lag will be included in the model.

• If you specify a list of positive integer values--for example, [1 3]--the specified lags are included in the model. Duplicate lags are ignored.

• An error occurs if NUMSEASONAL specifies a nonzero value and the season length has not been defined via the DATE command or the SEASONLENGTH keyword.

DENOM Keyword Collapse Hide details

DENOM Keyword

The DENOM keyword specifies the denominator order of the transfer function for nonseasonal models.

• You can specify a single value or a list of values in square brackets. All values must be nonnegative integers. The default order is zero.

• If you specify a single value, square brackets are optional. The specified lag will be included in the model.

• If you specify a list of positive integer values--for example, [1 3]--the specified lags are included in the model. Duplicate lags are ignored.

DENOMSEASONAL Keyword Collapse Hide details

DENOMSEASONAL Keyword

The DENOMSEASONAL keyword specifies the denominator order of the transfer function for seasonal models.

• You can specify a single value or a list of values in square brackets. All values must be nonnegative integers. The default order is zero.

• If you specify a single value, square brackets are optional. The specified lag will be included in the model.

• If you specify a list of positive integer values--for example, [1 3]--the specified lags are included in the model. Duplicate lags are ignored.

• An error occurs if DENOMSEASONAL specifies a nonzero value and the season length has not been defined via the DATE command or the SEASONLENGTH keyword.

square root transformation,square root transformation,square root transformation
TSMODEL command,TSMODEL command,TSMODEL command
natural log transformation,natural log transformation,natural log transformation
TSMODEL command,TSMODEL command,TSMODEL command
TSMODEL (command),TSMODEL (command),TSMODEL (command)
square root transformation,square root transformation,square root transformation
TSMODEL (command),TSMODEL (command),TSMODEL (command)
natural log transformation,natural log transformation,natural log transformation
TRANSFORM Keyword Collapse Hide details

TRANSFORM Keyword

The TRANSFORM keyword specifies a transformation that is performed on all predictor variables. By default, predictor variables are not transformed.

NONE | Predictor variables are not transformed. This setting is the default.
SQRT | A square root transformation is performed.
LN | A natural log transformation is performed.
difference transformation,difference transformation,difference transformation
TSMODEL command,TSMODEL command,TSMODEL command
DIFF Keyword Collapse Hide details

DIFF Keyword

The DIFF keyword specifies the order of nonseasonal differencing for predictor variables.

• The order of nonseasonal differencing must be a nonnegative integer. The default order is zero.

seasonal difference transformation,seasonal difference transformation,seasonal difference transformation
TSMODEL command,TSMODEL command,TSMODEL command
DIFFSEASONAL Keyword Collapse Hide details

DIFFSEASONAL Keyword

The DIFFSEASONAL keyword specifies the order of seasonal differencing for predictor variables.

• The order of seasonal differencing must be a nonnegative integer. The default order is zero.

• DIFFSEASONAL generates an error if the season length has not been defined via the DATE command or the SEASONLENGTH keyword.

DELAY Keyword Collapse Hide details

DELAY Keyword

The DELAY keyword specifies the delay order for predictor variables.

• The delay order must be a nonnegative integer. The default order is zero.

Related Topics

TSMODEL
Overview (TSMODEL command)
Examples (TSMODEL command)
Goodness-of-Fit Measures (TSMODEL command)
MODELSUMMARY Subcommand (TSMODEL command)
MODELSTATISTICS Subcommand (TSMODEL command)
MODELDETAILS Subcommand (TSMODEL command)
SERIESPLOT Subcommand (TSMODEL command)
OUTPUTFILTER Subcommand (TSMODEL command)
SAVE Subcommand (TSMODEL command)
AUXILIARY Subcommand (TSMODEL command)
MISSING Subcommand (TSMODEL command)
MODEL Subcommand (TSMODEL command)
EXPERTMODELER Subcommand (TSMODEL command)
EXSMOOTH Subcommand (TSMODEL command)
ARIMA Subcommand (TSMODEL command)
AUTOOUTLIER Subcommand (TSMODEL command)
OUTLIER Subcommand (TSMODEL command)


AUTOOUTLIER Subcommand (TSMODEL command)

TSMODEL (command),TSMODEL (command),TSMODEL (command)
AUTOOUTLIER subcommand,AUTOOUTLIER subcommand,AUTOOUTLIER subcommand
AUTOOUTLIER (subcommand),AUTOOUTLIER (subcommand),AUTOOUTLIER (subcommand)
TSMODEL command,TSMODEL command,TSMODEL command
outliers,outliers,outliers
TSMODEL command,TSMODEL command,TSMODEL command

The AUTOOUTLIER subcommand specifies whether outlier time points are identified automatically.

• By default, outliers are not identified.

• If identified, outliers are not discarded but are incorporated in the model.

• The AUTOOUTLIER subcommand is ignored with a warning if it is part of a MODEL block that contains an EXSMOOTH subcommand.

Example

TSMODEL
  /MODELDETAILS PRINT=PARAMETERS
  /MODEL DEPENDENT=revenue
  /EXPERTMODELER TYPE=[ARIMA]
  /AUTOOUTLIER DETECT=ON.
DETECT Keyword Collapse Hide details

DETECT Keyword

The DETECT keyword controls whether automatic outlier detection is performed.

OFF | Outliers are not identified. This setting is the default.
ON | Outliers are identified. ON is ignored with a warning if the model type is EXSMOOTH.
TYPE Keyword Collapse Hide details

TYPE Keyword

The optional TYPE keyword specifies the types of outliers that are identified when DETECT=ON. TYPE is ignored if DETECT=OFF.

• Additive and level shift outliers are identified by default.

• The specification of outlier types overrides the default. That is, if you specify a list of outlier types, additive and level shift outliers are not included unless explicitly requested.

The keyword is followed by an equals sign (=) and one or more of the following options enclosed in square brackets:

ADDITIVE | Additive. An outlier that affects a single observation. For example, a data coding error might be identified as an additive outlier. Default if DETECT=ON.
LEVELSHIFT | Level shift. An outlier that shifts all observations by a constant, starting at a particular series point. A level shift could result from a change in policy. Default if DETECT=ON.
INNOVATIONAL | Innovational. An outlier that acts as an addition to the noise term at a particular series point. For stationary series, an innovational outlier affects several observations. For nonstationary series, it may affect every observation starting at a particular series point.
TRANSIENT | Transient. An outlier whose impact decays exponentially to 0.
SEASONALADDITIVE | Seasonal additive. An outlier that affects a particular observation and all subsequent observations separated from it by one or more seasonal periods. All such observations are affected equally. A seasonal additive outlier might occur if, beginning in a certain year, sales are higher every January. The keyword generates an error if the season length has not been defined via the DATE command or the SEASONLENGTH keyword.
LOCALTREND | Local trend. An outlier that starts a local trend at a particular series point.
ADDITIVEPATCH | Additive patch. A group of two or more consecutive additive outliers. Selecting this outlier type results in the detection of individual additive outliers in addition to patches of them.

Related Topics

TSMODEL
Overview (TSMODEL command)
Examples (TSMODEL command)
Goodness-of-Fit Measures (TSMODEL command)
MODELSUMMARY Subcommand (TSMODEL command)
MODELSTATISTICS Subcommand (TSMODEL command)
MODELDETAILS Subcommand (TSMODEL command)
SERIESPLOT Subcommand (TSMODEL command)
OUTPUTFILTER Subcommand (TSMODEL command)
SAVE Subcommand (TSMODEL command)
AUXILIARY Subcommand (TSMODEL command)
MISSING Subcommand (TSMODEL command)
MODEL Subcommand (TSMODEL command)
EXPERTMODELER Subcommand (TSMODEL command)
EXSMOOTH Subcommand (TSMODEL command)
ARIMA Subcommand (TSMODEL command)
TRANSFERFUNCTION Subcommand (TSMODEL command)
OUTLIER Subcommand (TSMODEL command)


OUTLIER Subcommand (TSMODEL command)

TSMODEL (command),TSMODEL (command),TSMODEL (command)
OUTLIER subcommand,OUTLIER subcommand,OUTLIER subcommand
OUTLIER (subcommand),OUTLIER (subcommand),OUTLIER (subcommand)
TSMODEL command,TSMODEL command,TSMODEL command
outliers,outliers,outliers
TSMODEL command,TSMODEL command,TSMODEL command

The OUTLIER subcommand specifies outlier time points to be included in an ARIMA model.

• By default, no time points are modeled as outliers.

• For each outlier, you must specify its time point (location) and type.

• Multiple OUTLIER subcommands can be used to define two or more outliers for an ARIMA model. Duplicate specifications (same location and type) are ignored and a warning is issued.

• A warning occurs and the OUTLIER subcommand is ignored if the subcommand is part of a MODEL block that contains an EXPERTMODELER or EXSMOOTH subcommand.

• If the AUTOOUTLIER and OUTLIER subcommands are both included in a MODEL block containing an ARIMA subcommand, a warning is issued and the OUTLIER specification takes precedence.

Example

TSMODEL
  /MODELDETAILS PRINT=PARAMETERS
  /MODEL DEPENDENT=revenue
  /ARIMA AR=[1] MA=[1]
  /OUTLIER LOCATION=[YEAR 2000 MONTH 8] TYPE=LOCALTREND.

• A custom ARIMA(1,0,1) model is specified with an outlier of type Local Trend for August, 2000.

LOCATION Keyword Collapse Hide details

LOCATION Keyword

The LOCATION keyword specifies the time point to be treated as an outlier and is required.

• Specify a date in square brackets. If the data are undated, you must specify a case number. Otherwise, specify the outlier location using date keywords and values. For example, LOCATION=[YEAR 2000 MONTH 8] specifies that August, 2000 be treated as an outlier. The following date keywords may be used: CYCLE, YEAR, QUARTER, MONTH, WEEK, DAY, HOUR, MINUTE, SECOND, and OBS. Every keyword in the PASW Statistics date specification must appear in LOCATION. Only keywords that correspond to system date variables may be used, and no date keyword may be used more than once. See the topic DATE for more information.

• A warning is issued if you specify an outlier location that is outside the estimation period or corresponds to a gap in the data. Any such models are ignored.

TYPE Keyword Collapse Hide details

TYPE Keyword

The TYPE keyword specifies the type of outlier and is required. Specify one of the following types:

ADDITIVE | Additive. An outlier that affects a single observation. For example, a data coding error might be identified as an additive outlier.
LEVELSHIFT | Level shift. An outlier that shifts all observations by a constant, starting at a particular series point. A level shift could result from a change in policy.
INNOVATIONAL | Innovational. An outlier that acts as an addition to the noise term at a particular series point. For stationary series, an innovational outlier affects several observations. For nonstationary series, it may affect every observation starting at a particular series point.
TRANSIENT | Transient. An outlier whose impact decays exponentially to 0.
SEASONALADDITIVE | Seasonal additive. An outlier that affects a particular observation and all subsequent observations separated from it by one or more seasonal periods. All such observations are affected equally. A seasonal additive outlier might occur if, beginning in a certain year, sales are higher every January. The keyword generates an error if the season length has not been defined via the DATE command or the SEASONLENGTH keyword.
LOCALTREND | Local trend. An outlier that starts a local trend at a particular series point.

Related Topics

TSMODEL
Overview (TSMODEL command)
Examples (TSMODEL command)
Goodness-of-Fit Measures (TSMODEL command)
MODELSUMMARY Subcommand (TSMODEL command)
MODELSTATISTICS Subcommand (TSMODEL command)
MODELDETAILS Subcommand (TSMODEL command)
SERIESPLOT Subcommand (TSMODEL command)
OUTPUTFILTER Subcommand (TSMODEL command)
SAVE Subcommand (TSMODEL command)
AUXILIARY Subcommand (TSMODEL command)
MISSING Subcommand (TSMODEL command)
MODEL Subcommand (TSMODEL command)
EXPERTMODELER Subcommand (TSMODEL command)
EXSMOOTH Subcommand (TSMODEL command)
ARIMA Subcommand (TSMODEL command)
TRANSFERFUNCTION Subcommand (TSMODEL command)
AUTOOUTLIER Subcommand (TSMODEL command)


TSPLOT

TSPLOT (command),TSPLOT (command),TSPLOT (command)
TSPLOT (command),TSPLOT (command),TSPLOT (command)
syntax chart,syntax chart,syntax chart
release history,release history,release history
sequence charts,sequence charts,sequence charts
command syntax,command syntax,command syntax

TSPLOT is available in the Statistics Base option.

TSPLOT VARIABLES= variable names

 [/DIFF={1}]
        {n}

 [/SDIFF={1}]
         {n}

 [/PERIOD=n]

 [/{NOLOG**}]
   {LN     }

 [/ID=varname]

 [/MARK={varname} ]
        {date   }

 [/SPLIT {UNIFORM**}]
         {SCALE    }

 [/APPLY [='model name']]

For plots with one variable:

[/FORMAT=[{NOFILL**}]  [{NOREFERENCE**     }]]
          {BOTTOM  }    {REFERENCE[(value)]}

For plots with multiple variables:

[/FORMAT={NOJOIN**}]
         {JOIN    }
         {HILO    }

**Default if the subcommand is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

Syntax for the TSPLOT command can be generated from the Sequence Charts dialog box.

Release History Collapse Hide details

Release History

Release 14.0

• For plots with one variable, REFERENCE keyword modified to allow specification of a value.

Example

TSPLOT VARIABLES = TICKETS.

Related Topics

Overview (TSPLOT command)
Basic Specification (TSPLOT command)
Example (TSPLOT command)
VARIABLES Subcommand (TSPLOT command)
DIFF Subcommand (TSPLOT command)
SDIFF Subcommand (TSPLOT command)
PERIOD Subcommand (TSPLOT command)
LN and NOLOG Subcommands (TSPLOT command)
ID Subcommand (TSPLOT command)
FORMAT Subcommand (TSPLOT command)
MARK Subcommand (TSPLOT command)
SPLIT Subcommand (TSPLOT command)
APPLY Subcommand (TSPLOT command)
MODEL NAME
READ MODEL
SAVE MODEL
TDISPLAY


Overview (TSPLOT command)

TSPLOT produces a plot of one or more time series or sequence variables. You can request natural log and differencing transformations to produce plots of transformed variables. Several plot formats are available.

Options Collapse Hide details

Options

Modifying the Variables. You can request a natural log transformation of the variables using the LN subcommand and seasonal and nonseasonal differencing to any degree using the SDIFF and DIFF subcommands. With seasonal differencing, you can also specify the periodicity on the PERIOD subcommand.

Plot Format. With the FORMAT subcommand, you can fill in the space on one side of the plotted values on plots with one variable. You can also plot a reference line indicating the variable mean. For plots with two or more variables, you can specify whether you want to join the values for each observation with a vertical line. With the ID subcommand, you can label the horizontal axis with the values of a specified variable. You can mark the onset of an intervention variable on the plot with the MARK subcommand.

Split-File Processing. You can control how data that have been divided into subgroups by a SPLIT FILE command should be plotted using the SPLIT subcommand.

Subcommand Order Collapse Hide details

Subcommand Order

• Subcommands can be specified in any order.

Syntax Rules Collapse Hide details

Syntax Rules

• VARIABLES can be specified only once.

• Other subcommands can be specified more than once, but only the last specification of each one is executed.

Operations Collapse Hide details

Operations

• Subcommand specifications apply to all variables named on the TSPLOT command.

• If the LN subcommand is specified, any differencing requested on that TSPLOT command is done on the log-transformed variables.

• Split-file information is displayed as part of the subtitle, and transformation information is displayed as part of the footnote.

Limitations Collapse Hide details

Limitations

• Maximum of one VARIABLES subcommand. There is no limit on the number of variables named on the list.

Related Topics

TSPLOT
Basic Specification (TSPLOT command)
Example (TSPLOT command)
VARIABLES Subcommand (TSPLOT command)
DIFF Subcommand (TSPLOT command)
SDIFF Subcommand (TSPLOT command)
PERIOD Subcommand (TSPLOT command)
LN and NOLOG Subcommands (TSPLOT command)
ID Subcommand (TSPLOT command)
FORMAT Subcommand (TSPLOT command)
MARK Subcommand (TSPLOT command)
SPLIT Subcommand (TSPLOT command)
APPLY Subcommand (TSPLOT command)


Basic Specification (TSPLOT command)

The basic specification is one or more variable names.

• If the DATE command has been specified, the horizontal axis is labeled with the DATE_ variable at periodic intervals. Otherwise, sequence numbers are used. The vertical axis is labeled with the value scale of the plotted variable(s).

The following figure shows a default plot with DATE YEAR 1995 MONTH.

TSPLOT VARIABLES=SHARE

Related Topics

TSPLOT
Overview (TSPLOT command)
Example (TSPLOT command)
VARIABLES Subcommand (TSPLOT command)
DIFF Subcommand (TSPLOT command)
SDIFF Subcommand (TSPLOT command)
PERIOD Subcommand (TSPLOT command)
LN and NOLOG Subcommands (TSPLOT command)
ID Subcommand (TSPLOT command)
FORMAT Subcommand (TSPLOT command)
MARK Subcommand (TSPLOT command)
SPLIT Subcommand (TSPLOT command)
APPLY Subcommand (TSPLOT command)


Example (TSPLOT command)

TSPLOT VARIABLES = TICKETS
  /LN
  /DIFF
  /SDIFF
  /PERIOD=12
  /FORMAT=REFERENCE
  /MARK=Y 55 M 6.

• This command produces a plot of TICKETS after a natural log transformation, differencing, and seasonal differencing have been applied.

• LN transforms the data using the natural logarithm (base e) of TICKETS.

• DIFF differences the logged variable once.

• SDIFF and PERIOD apply one degree of seasonal differencing with a period of 12.

• FORMAT=REFERENCE adds a reference line representing the variable mean.

• MARK provides a marker on the plot at June 1955. The marker is displayed as a vertical reference line.

Related Topics

TSPLOT
Overview (TSPLOT command)
Basic Specification (TSPLOT command)
VARIABLES Subcommand (TSPLOT command)
DIFF Subcommand (TSPLOT command)
SDIFF Subcommand (TSPLOT command)
PERIOD Subcommand (TSPLOT command)
LN and NOLOG Subcommands (TSPLOT command)
ID Subcommand (TSPLOT command)
FORMAT Subcommand (TSPLOT command)
MARK Subcommand (TSPLOT command)
SPLIT Subcommand (TSPLOT command)
APPLY Subcommand (TSPLOT command)


VARIABLES Subcommand (TSPLOT command)

TSPLOT (command),TSPLOT (command),TSPLOT (command)
VARIABLES subcommand,VARIABLES subcommand,VARIABLES subcommand
VARIABLES (subcommand),VARIABLES (subcommand),VARIABLES (subcommand)
TSPLOT command,TSPLOT command,TSPLOT command

VARIABLES specifies the names of the variables to be plotted and is the only required subcommand.

Related Topics

TSPLOT
Overview (TSPLOT command)
Basic Specification (TSPLOT command)
Example (TSPLOT command)
DIFF Subcommand (TSPLOT command)
SDIFF Subcommand (TSPLOT command)
PERIOD Subcommand (TSPLOT command)
LN and NOLOG Subcommands (TSPLOT command)
ID Subcommand (TSPLOT command)
FORMAT Subcommand (TSPLOT command)
MARK Subcommand (TSPLOT command)
SPLIT Subcommand (TSPLOT command)
APPLY Subcommand (TSPLOT command)


DIFF Subcommand (TSPLOT command)

TSPLOT (command),TSPLOT (command),TSPLOT (command)
DIFF subcommand,DIFF subcommand,DIFF subcommand
DIFF (subcommand),DIFF (subcommand),DIFF (subcommand)
TSPLOT command,TSPLOT command,TSPLOT command
sequence charts,sequence charts,sequence charts
transforming values,transforming values,transforming values
difference transformation,difference transformation,difference transformation
in sequence charts,in sequence charts,in sequence charts

DIFF specifies the degree of differencing used to convert a nonstationary variable to a stationary one with a constant mean and variance before plotting.

• You can specify any positive integer on DIFF.

• If DIFF is specified without a value, the default is 1.

• The number of values plotted decreases by 1 for each degree of differencing.

Example

TSPLOT VARIABLES = TICKETS
  /DIFF=2.

• In this example, TICKETS is differenced twice before plotting.

Related Topics

TSPLOT
Overview (TSPLOT command)
Basic Specification (TSPLOT command)
Example (TSPLOT command)
VARIABLES Subcommand (TSPLOT command)
SDIFF Subcommand (TSPLOT command)
PERIOD Subcommand (TSPLOT command)
LN and NOLOG Subcommands (TSPLOT command)
ID Subcommand (TSPLOT command)
FORMAT Subcommand (TSPLOT command)
MARK Subcommand (TSPLOT command)
SPLIT Subcommand (TSPLOT command)
APPLY Subcommand (TSPLOT command)


SDIFF Subcommand (TSPLOT command)

TSPLOT (command),TSPLOT (command),TSPLOT (command)
SDIFF subcommand,SDIFF subcommand,SDIFF subcommand
SDIFF (subcommand),SDIFF (subcommand),SDIFF (subcommand)
TSPLOT command,TSPLOT command,TSPLOT command

If the variable exhibits a seasonal or periodic pattern, you can use the SDIFF subcommand to seasonally difference the variable before plotting.

• The specification on SDIFF indicates the degree of seasonal differencing and can be any positive integer.

• If SDIFF is specified without a value, the degree of seasonal differencing defaults to 1.

• The number of seasons plotted decreases by 1 for each degree of seasonal differencing.

• The length of the period used by SDIFF is specified on the PERIOD subcommand. If the PERIOD subcommand is not specified, the periodicity established on the TSET or DATE command is used (see the PERIOD subcommand).

Related Topics

TSPLOT
Overview (TSPLOT command)
Basic Specification (TSPLOT command)
Example (TSPLOT command)
VARIABLES Subcommand (TSPLOT command)
DIFF Subcommand (TSPLOT command)
PERIOD Subcommand (TSPLOT command)
LN and NOLOG Subcommands (TSPLOT command)
ID Subcommand (TSPLOT command)
FORMAT Subcommand (TSPLOT command)
MARK Subcommand (TSPLOT command)
SPLIT Subcommand (TSPLOT command)
APPLY Subcommand (TSPLOT command)


PERIOD Subcommand (TSPLOT command)

TSPLOT (command),TSPLOT (command),TSPLOT (command)
PERIOD subcommand,PERIOD subcommand,PERIOD subcommand
PERIOD (subcommand),PERIOD (subcommand),PERIOD (subcommand)
TSPLOT command,TSPLOT command,TSPLOT command
sequence charts,sequence charts,sequence charts
specifying periodicity,specifying periodicity,specifying periodicity
periodicity,periodicity,periodicity
in sequence charts,in sequence charts,in sequence charts

PERIOD indicates the length of the period to be used by the SDIFF subcommand.

• The specification on PERIOD indicates how many observations are in one period or season and can be any positive integer.

• If PERIOD is not specified, the periodicity established on TSET PERIOD is in effect. If TSET PERIOD is not specified, the periodicity established on the DATE command is used. If periodicity was not established anywhere, the SDIFF subcommand will not be executed.

Example

TSPLOT VARIABLES = TICKETS
  /SDIFF=1
  /PERIOD=12.

• This command applies one degree of seasonal differencing with 12 observations per season to TICKETS before plotting.

Related Topics

TSPLOT
Overview (TSPLOT command)
Basic Specification (TSPLOT command)
Example (TSPLOT command)
VARIABLES Subcommand (TSPLOT command)
DIFF Subcommand (TSPLOT command)
SDIFF Subcommand (TSPLOT command)
LN and NOLOG Subcommands (TSPLOT command)
ID Subcommand (TSPLOT command)
FORMAT Subcommand (TSPLOT command)
MARK Subcommand (TSPLOT command)
SPLIT Subcommand (TSPLOT command)
APPLY Subcommand (TSPLOT command)


LN and NOLOG Subcommands (TSPLOT command)

TSPLOT (command),TSPLOT (command),TSPLOT (command)
LN/NOLOG subcommands,LN/NOLOG subcommands,LN/NOLOG subcommands
LN (subcommand),LN (subcommand),LN (subcommand)
TSPLOT command,TSPLOT command,TSPLOT command
NOLOG (subcommand),NOLOG (subcommand),NOLOG (subcommand)
TSPLOT command,TSPLOT command,TSPLOT command
natural log transformation,natural log transformation,natural log transformation
in sequence charts,in sequence charts,in sequence charts

LN transforms the data using the natural logarithm (base e) of the variable and is used to remove varying amplitude over time. NOLOG indicates that the data should not be log transformed. NOLOG is the default.

• If you specify LN on TSPLOT, any differencing requested on that command will be done on the log-transformed variables.

• There are no additional specifications on LN or NOLOG.

• Only the last LN or NOLOG subcommand on a TSPLOT command is executed.

• If a natural log transformation is requested, any value less than or equal to zero is set to system-missing.

• NOLOG is generally used with an APPLY subcommand to turn off a previous LN specification.

Example

TSPLOT VARIABLES = TICKETS
  /LN.

• In this example, TICKETS is transformed using the natural logarithm before plotting.

Related Topics

TSPLOT
Overview (TSPLOT command)
Basic Specification (TSPLOT command)
Example (TSPLOT command)
VARIABLES Subcommand (TSPLOT command)
DIFF Subcommand (TSPLOT command)
SDIFF Subcommand (TSPLOT command)
PERIOD Subcommand (TSPLOT command)
ID Subcommand (TSPLOT command)
FORMAT Subcommand (TSPLOT command)
MARK Subcommand (TSPLOT command)
SPLIT Subcommand (TSPLOT command)
APPLY Subcommand (TSPLOT command)


ID Subcommand (TSPLOT command)

TSPLOT (command),TSPLOT (command),TSPLOT (command)
ID subcommand,ID subcommand,ID subcommand
ID (subcommand),ID (subcommand),ID (subcommand)
TSPLOT command,TSPLOT command,TSPLOT command

ID names a variable whose values will be used as labels for the horizontal axis.

• The only specification on ID is a variable name. If you have a variable named ID in your active dataset, the equals sign (=) after the subcommand is required.

• If the ID subcommand is not used and TSET ID has not been specified, the axis is labeled with the DATE_ variable created by the DATE command. If the DATE command has not been specified, the observation number is used as the label.

Example

TSPLOT VARIABLES = VARA
  /ID=VARB.

• In this example, the values of VARB will be used to label the horizontal axis of VARA at periodic intervals.

Related Topics

TSPLOT
Overview (TSPLOT command)
Basic Specification (TSPLOT command)
Example (TSPLOT command)
VARIABLES Subcommand (TSPLOT command)
DIFF Subcommand (TSPLOT command)
SDIFF Subcommand (TSPLOT command)
PERIOD Subcommand (TSPLOT command)
LN and NOLOG Subcommands (TSPLOT command)
FORMAT Subcommand (TSPLOT command)
MARK Subcommand (TSPLOT command)
SPLIT Subcommand (TSPLOT command)
APPLY Subcommand (TSPLOT command)


FORMAT Subcommand (TSPLOT command)

NOREFERENCE (keyword),NOREFERENCE (keyword),NOREFERENCE (keyword)
TSPLOT command,TSPLOT command,TSPLOT command
TSPLOT (command),TSPLOT (command),TSPLOT (command)
FORMAT subcommand,FORMAT subcommand,FORMAT subcommand
FORMAT (subcommand),FORMAT (subcommand),FORMAT (subcommand)
TSPLOT command,TSPLOT command,TSPLOT command
NOFILL (keyword),NOFILL (keyword),NOFILL (keyword)
TSPLOT command,TSPLOT command,TSPLOT command
REFERENCE (keyword),REFERENCE (keyword),REFERENCE (keyword)
TSPLOT command,TSPLOT command,TSPLOT command
NOJOIN (keyword),NOJOIN (keyword),NOJOIN (keyword)
TSPLOT command,TSPLOT command,TSPLOT command
JOIN (keyword),JOIN (keyword),JOIN (keyword)
TSPLOT command,TSPLOT command,TSPLOT command
HILO (keyword),HILO (keyword),HILO (keyword)
TSPLOT command,TSPLOT command,TSPLOT command
BOTTOM (keyword),BOTTOM (keyword),BOTTOM (keyword)
TSPLOT command,TSPLOT command,TSPLOT command
TOP (keyword),TOP (keyword),TOP (keyword)
TSPLOT command,TSPLOT command,TSPLOT command

FORMAT controls the plot format.

• The specification on FORMAT is one of the keywords listed below.

• Keywords NOFILL, BOTTOM, REFERENCE, and NOREFERENCE apply to plots with one variable. NOFILL and BOTTOM are alternatives that indicate how the plot is filled. NOREFERENCE and REFERENCE are alternatives that specify whether a reference line is displayed.

• Keywords JOIN, NOJOIN, and HILO apply to plots with multiple variables and are alternatives. NOJOIN is the default. Only one keyword can be specified on a FORMAT subcommand for plots with multiple variables.

The following formats are available for plots with one variable:

sequence charts,sequence charts,sequence charts
line charts,line charts,line charts
line charts,line charts,line charts
sequence,sequence,sequence
sequence charts,sequence charts,sequence charts
area charts,area charts,area charts
area charts,area charts,area charts
sequence,sequence,sequence
NOFILL | Plot only the values for the variable with no fill. NOFILL produces a plot with no fill above or below the plotted values. This is the default format when one variable is specified.
BOTTOM | Plot the values for the variable and fill in the area below the curve. If the plotted variable has missing or negative values, BOTTOM is ignored and the default NOFILL is used instead.
reference lines,reference lines,reference lines
in sequence charts,in sequence charts,in sequence charts
sequence charts,sequence charts,sequence charts
scale axis reference line,scale axis reference line,scale axis reference line
NOREFERENCE | Do not plot a reference line. This is the default when one variable is specified.
REFERENCE(value) | Plot a reference line at the specified value or at the variable mean if no value is specified. A fill chart is displayed as an area chart with a reference line and a non-fill chart is displayed as a line chart with a reference line.
FORMAT=BOTTOM
FORMAT=REFERENCE

The following formats are available for plots with multiple variables:

sequence charts,sequence charts,sequence charts
multiple variables,multiple variables,multiple variables
sequence charts,sequence charts,sequence charts
connecting cases between variables,connecting cases between variables,connecting cases between variables
sequence charts,sequence charts,sequence charts
plotting highest and lowest values,plotting highest and lowest values,plotting highest and lowest values
NOJOIN | Plot the values of each variable named. Different colors or line patterns are used for multiple variables. Multiple occurrences of the same value for a single observation are plotted using a dollar sign ($). This is the default format for plots with multiple variables.
JOIN | Plot the values of each variable and join the values for each observation. Values are plotted as described for NOJOIN, and the values for each observation are joined together by a line.
HILO | Plot the highest and lowest values across variables for each observation and join the two values together. The high and low values are plotted as a horizontal bar and are joined with a line. If more than three variables are specified, HILO is ignored and the default NOJOIN is used.
FORMAT=HILO

Related Topics

TSPLOT
Overview (TSPLOT command)
Basic Specification (TSPLOT command)
Example (TSPLOT command)
VARIABLES Subcommand (TSPLOT command)
DIFF Subcommand (TSPLOT command)
SDIFF Subcommand (TSPLOT command)
PERIOD Subcommand (TSPLOT command)
LN and NOLOG Subcommands (TSPLOT command)
ID Subcommand (TSPLOT command)
MARK Subcommand (TSPLOT command)
SPLIT Subcommand (TSPLOT command)
APPLY Subcommand (TSPLOT command)


MARK Subcommand (TSPLOT command)

TSPLOT (command),TSPLOT (command),TSPLOT (command)
MARK subcommand,MARK subcommand,MARK subcommand
MARK (subcommand),MARK (subcommand),MARK (subcommand)
TSPLOT command,TSPLOT command,TSPLOT command
sequence charts,sequence charts,sequence charts
time axis reference lines,time axis reference lines,time axis reference lines
reference lines,reference lines,reference lines
in sequence charts,in sequence charts,in sequence charts

MARK indicates the onset of an intervention variable.

• The onset date is indicated by a vertical reference line.

• The specification on MARK can be either a variable name or an onset date if the DATE_ variable exists.

• If a variable is named, the plot indicates where the values of that variable change.

• A date specification follows the same format as the DATE command; that is, a keyword followed by a value. For example, the specification for June 1955 is Y 1955 M 6 (or Y 55 M 6 if only the last two digits of the year are used on DATE).

The following figure shows a plot with January 2001 marked as the onset date.

MARK=Y 2001 M 1

Related Topics

TSPLOT
Overview (TSPLOT command)
Basic Specification (TSPLOT command)
Example (TSPLOT command)
VARIABLES Subcommand (TSPLOT command)
DIFF Subcommand (TSPLOT command)
SDIFF Subcommand (TSPLOT command)
PERIOD Subcommand (TSPLOT command)
LN and NOLOG Subcommands (TSPLOT command)
ID Subcommand (TSPLOT command)
FORMAT Subcommand (TSPLOT command)
SPLIT Subcommand (TSPLOT command)
APPLY Subcommand (TSPLOT command)


SPLIT Subcommand (TSPLOT command)

TSPLOT (command),TSPLOT (command),TSPLOT (command)
SPLIT subcommand,SPLIT subcommand,SPLIT subcommand
SPLIT (subcommand),SPLIT (subcommand),SPLIT (subcommand)
TSPLOT command,TSPLOT command,TSPLOT command
sequence charts,sequence charts,sequence charts
split-file scaling,split-file scaling,split-file scaling

SPLIT specifies how to plot data that have been divided into subgroups by a SPLIT FILE command. The default is UNIFORM.

UNIFORM | Scale uniformly. The vertical axis is scaled according to the values of the entire dataset.
SCALE | Scale individually. The vertical axis is scaled according to the values of each individual subgroup.

• If FORMAT=REFERENCE is specified when SPLIT=SCALE, the reference line is placed at the mean of the subgroup. If FORMAT=REFERENCE is specified when SPLIT=UNIFORM, the reference line is placed at the overall mean.

Example

SPLIT FILE BY REGION.
TSPLOT VARIABLES = TICKETS / SPLIT=SCALE.

• In this example, the data have been split into subgroups by REGION. The plots produced with the SCALE subcommand have vertical axes that are individually scaled according to the values of each particular region.

Related Topics

TSPLOT
Overview (TSPLOT command)
Basic Specification (TSPLOT command)
Example (TSPLOT command)
VARIABLES Subcommand (TSPLOT command)
DIFF Subcommand (TSPLOT command)
SDIFF Subcommand (TSPLOT command)
PERIOD Subcommand (TSPLOT command)
LN and NOLOG Subcommands (TSPLOT command)
ID Subcommand (TSPLOT command)
FORMAT Subcommand (TSPLOT command)
MARK Subcommand (TSPLOT command)
APPLY Subcommand (TSPLOT command)


APPLY Subcommand (TSPLOT command)

TSPLOT (command),TSPLOT (command),TSPLOT (command)
APPLY subcommand,APPLY subcommand,APPLY subcommand
APPLY (subcommand),APPLY (subcommand),APPLY (subcommand)
TSPLOT command,TSPLOT command,TSPLOT command
sequence charts,sequence charts,sequence charts
using previously defined specifications,using previously defined specifications,using previously defined specifications

APPLY allows you to produce a plot using previously defined specifications without having to repeat the TSPLOT subcommands.

• The only specification on APPLY is the name of a previous model enclosed in quotes. If a model name is not specified, the specifications from the previous TSPLOT command are used.

• To change one or more specifications of the plot, specify the subcommands of only those portions you want to change after the subcommand APPLY.

• If no variables are specified, the variables that were specified for the original plot are used.

• To plot different variables, enter new variable names before or after the APPLY subcommand.

Example

TSPLOT VARIABLES = TICKETS
  /LN
  /DIFF=1
  /SDIFF=1
  /PERIOD=12.
TSPLOT VARIABLES = ROUNDTRP
  /APPLY.
TSPLOT APPLY
  /NOLOG.

• The first command produces a plot of TICKETS after a natural log transformation, differencing, and seasonal differencing have been applied.

• The second command plots the values for ROUNDTRP using the same subcommands specified for TICKETS.

• The third command produces another plot of ROUNDTRP but this time without a log transformation. ROUNDTRP is still differenced once and seasonally differenced with a periodicity of 12.

Related Topics

TSPLOT
Overview (TSPLOT command)
Basic Specification (TSPLOT command)
Example (TSPLOT command)
VARIABLES Subcommand (TSPLOT command)
DIFF Subcommand (TSPLOT command)
SDIFF Subcommand (TSPLOT command)
PERIOD Subcommand (TSPLOT command)
LN and NOLOG Subcommands (TSPLOT command)
ID Subcommand (TSPLOT command)
FORMAT Subcommand (TSPLOT command)
MARK Subcommand (TSPLOT command)
SPLIT Subcommand (TSPLOT command)


T-TEST

T-TEST (command),T-TEST (command),T-TEST (command)
T-TEST (command),T-TEST (command),T-TEST (command)
syntax chart,syntax chart,syntax chart
T-TEST (command),T-TEST (command),T-TEST (command)
independent samples,independent samples,independent samples
T-TEST (command),T-TEST (command),T-TEST (command)
paired samples,paired samples,paired samples

T-TEST is available in the Statistics Base option.

One-sample tests:

T-TEST TESTVAL n /VARIABLE=varlist

Independent-samples tests:

T-TEST GROUPS=varname ({1,2**      }) /VARIABLES=varlist
                       {value      }
                       {value,value}

Paired-samples tests:

T-TEST PAIRS=varlist [WITH varlist [(PAIRED)]] [/varlist ...]

All types of tests:

[/MISSING={ANALYSIS**}  [INCLUDE]]
          {LISTWISE  }

[/CRITERIA=CI({0.95**})
              {value }

**Default if the subcommand is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See T Test Algorithms for computational details for this procedure.

Syntax for the T-TEST command can be generated from the One-Sample T Test, Independent-Samples T Test, or Paired-Samples T Test dialog boxes.

Examples

T-TEST GROUPS=WORLD(1,3) /VARIABLES=NTCPRI NTCSAL NTCPUR.

T-TEST PAIRS=TEACHER CONSTRUC MANAGER.

Related Topics

Overview (T-TEST command)
Examples (T-TEST command)
VARIABLES Subcommand (T-TEST command)
TESTVAL Subcommand (T-TEST command)
GROUPS Subcommand (T-TEST command)
PAIRS Subcommand (T-TEST command)
CRITERIA Subcommand (T-TEST command)
MISSING Subcommand (T-TEST command)


Overview (T-TEST command)

T-TEST (command),T-TEST (command),T-TEST (command)
one sample,one sample,one sample
T-TEST (command),T-TEST (command),T-TEST (command)
independent samples,independent samples,independent samples
T-TEST (command),T-TEST (command),T-TEST (command)
paired samples,paired samples,paired samples
T-TEST (command),T-TEST (command),T-TEST (command)
limitations,limitations,limitations

T-TEST compares sample means by calculating Student’s t and displays the two-tailed probability of the difference between the means. Statistics are available for one-sample (tested against a specified value), independent samples (different groups of cases), or paired samples (different variables). Other procedures that compare group means are ANOVA, ONEWAY, UNIANOVA, GLM, and MANOVA (GLM and MANOVA are available in the Advanced Statistics option).

Options Collapse Hide details

Options

Statistics. There are no optional statistics. All statistics available are displayed by default.

Basic Specification Collapse Hide details

Basic Specification

The basic specification depends on whether you want a one-sample test, an independent-samples test or a paired-samples test. For all types of tests, T-TEST displays Student’s t, degrees of freedom, and two-tailed probabilities, as well as the mean, standard deviation, standard error, and count for each group or variable.

• To request a one-sample test, use the TESTVAL and VARIABLES subcommands. The output includes a One-Sample Statistics table showing univariate statistics and a One-Sample Test table showing the test value, the difference between the sample mean and the test value, and the two-tailed probability level.

• To request an independent-samples test, use the GROUPS and VARIABLES subcommands. The output includes a Group Statistics table showing summary statistics by group for each dependent variable and an Independent-Samples Test table showing both pooled- and separate-variance estimates, along with the F value used to test homogeneity of variance and its probability. The two-tailed probability is displayed for the t value.

• To request a paired-samples test, use the PAIRS subcommand. The output includes a Paired Statistics table showing univariate statistics by pairs, a Paired Samples Correlations table showing correlation coefficients and two-tailed probability level for a test of the coefficient for each pair, and a Paired Samples Test table showing the paired differences between the means and two-tailed probability levels for a test of the differences.

Subcommand Order Collapse Hide details

Subcommand Order

Subcommands can be named in any order.

Operations Collapse Hide details

Operations

• If a variable specified on GROUPS is a long string, only the short-string portion is used to identify groups in the analysis.

• Probability levels are two-tailed. To obtain the one-tailed probability, divide the two-tailed probability by 2.

Limitations Collapse Hide details

Limitations

• Maximum of one TESTVAL and one VARIABLES subcommand per one-sample t test.

• Maximum of one GROUPS and one VARIABLES subcommand per independent-samples t test.

Related Topics

T-TEST
Examples (T-TEST command)
VARIABLES Subcommand (T-TEST command)
TESTVAL Subcommand (T-TEST command)
GROUPS Subcommand (T-TEST command)
PAIRS Subcommand (T-TEST command)
CRITERIA Subcommand (T-TEST command)
MISSING Subcommand (T-TEST command)


Examples (T-TEST command)

One-Sample Test

T-TEST
  /TESTVAL=322
  /VARIABLES=brake
  /CRITERIA=CIN (.90).

• The procedure compares the mean of brake with the test value 322.

• CRITERIA requests a 90% confidence interval for the mean difference.

For discussion of output from this syntax and to place the example in context, see A Production-Line Problem.

Independent-Samples Test, using specific values

T-TEST GROUPS=insert(0 1)
  /MISSING=ANALYSIS
  /VARIABLES=dollars
  /CRITERIA=CIN(.95).

• The procedure compares the means of the two groups defined by values 0 and 1 of insert for variable dollars.

• All other options are set to their default values.

For discussion of output from this syntax and to place the example in context, see Testing Two Independent Sample Means.

Independent-Samples Test, using a cut point

T-TEST GROUPS=score(50)
  /MISSING=ANALYSIS
  /VARIABLES=minutes
  /CRITERIA=CIN(.95).

• The procedure compares the means of the two groups defined by values greater than or equal to 50 (versus all other values) of score for variable minutes.

• All other options are set to their default values.

For discussion of output from this syntax and to place the example in context, see Using a Cut Point to Define the Samples.

Paired-Samples Test

T-TEST PAIRS=TEACHER CONSTRUC MANAGER.

• This paired-samples t test compares the means of TEACHER with CONSTRUC, TEACHER with MANAGER, and CONSTRUC with MANAGER.

Paired-Samples Test, special pairing

T-TEST
  PAIRS= tg0 wgt0  WITH tg4 wgt4 (PAIRED)
  /CRITERIA=CIN(.95)
  /MISSING=ANALYSIS.

• The procedure compares the means of tg0 with tg4 and wgt0 with wgt4.

• All other options are set to their default values.

For discussion of output from this syntax and to place the example in context, see Does Diet Make a Difference?.

Related Topics

T-TEST
Overview (T-TEST command)
VARIABLES Subcommand (T-TEST command)
TESTVAL Subcommand (T-TEST command)
GROUPS Subcommand (T-TEST command)
PAIRS Subcommand (T-TEST command)
CRITERIA Subcommand (T-TEST command)
MISSING Subcommand (T-TEST command)


VARIABLES Subcommand (T-TEST command)

T-TEST (command),T-TEST (command),T-TEST (command)
dependent variables,dependent variables,dependent variables
T-TEST (command),T-TEST (command),T-TEST (command)
independent samples,independent samples,independent samples
T-TEST (command),T-TEST (command),T-TEST (command)
one sample,one sample,one sample
T-TEST (command),T-TEST (command),T-TEST (command)
VARIABLES subcommand,VARIABLES subcommand,VARIABLES subcommand
VARIABLES (subcommand),VARIABLES (subcommand),VARIABLES (subcommand)
T-TEST command,T-TEST command,T-TEST command

VARIABLES specifies the dependent variables to be tested in a one-sample or an independent-samples t test.

• VARIABLES can specify multiple variables, all of which must be numeric.

• When specified along with TESTVAL, the mean of all cases for each variable is compared with the specified value.

• When specified along with GROUPS, the means of two groups of cases defined by the GROUPS subcommand are compared.

• If both TESTVAL and GROUPS are specified, a one-sample test and an independent-samples test are performed on each variable.

Related Topics

T-TEST
Overview (T-TEST command)
Examples (T-TEST command)
TESTVAL Subcommand (T-TEST command)
GROUPS Subcommand (T-TEST command)
PAIRS Subcommand (T-TEST command)
CRITERIA Subcommand (T-TEST command)
MISSING Subcommand (T-TEST command)


TESTVAL Subcommand (T-TEST command)

T-TEST (command),T-TEST (command),T-TEST (command)
test value,test value,test value
T-TEST (command),T-TEST (command),T-TEST (command)
TESTVAL subcommand,TESTVAL subcommand,TESTVAL subcommand
TESTVAL (subcommand),TESTVAL (subcommand),TESTVAL (subcommand)
T-TEST command,T-TEST command,T-TEST command

TESTVAL specifies the value with which a sample mean is compared.

• Only one TESTVAL subcommand is allowed.

• Only one value can be specified on the TESTVAL subcommand.

Related Topics

T-TEST
Overview (T-TEST command)
Examples (T-TEST command)
VARIABLES Subcommand (T-TEST command)
GROUPS Subcommand (T-TEST command)
PAIRS Subcommand (T-TEST command)
CRITERIA Subcommand (T-TEST command)
MISSING Subcommand (T-TEST command)


GROUPS Subcommand (T-TEST command)

T-TEST (command),T-TEST (command),T-TEST (command)
GROUPS subcommand,GROUPS subcommand,GROUPS subcommand
GROUPS (subcommand),GROUPS (subcommand),GROUPS (subcommand)
T-TEST command,T-TEST command,T-TEST command
T-TEST (command),T-TEST (command),T-TEST (command)
grouping variables,grouping variables,grouping variables

GROUPS specifies a variable used to group cases for independent-samples t tests.

• GROUPS can specify only one variable, which can be numeric or string.

Any one of three methods can be used to define the two groups for the variable specified on GROUPS:

• Specify a single value in parentheses to group all cases with a value equal to or greater than the specified value into one group and the remaining cases into the other group.

• Specify two values in parentheses to include cases with the first value in one group and cases with the second value in the other group. Cases with other values are excluded.

• If no values are specified on GROUP, T-TEST uses 1 and 2 as default values for numeric variables. There is no default for string variables.

Related Topics

T-TEST
Overview (T-TEST command)
Examples (T-TEST command)
VARIABLES Subcommand (T-TEST command)
TESTVAL Subcommand (T-TEST command)
PAIRS Subcommand (T-TEST command)
CRITERIA Subcommand (T-TEST command)
MISSING Subcommand (T-TEST command)


PAIRS Subcommand (T-TEST command)

T-TEST (command),T-TEST (command),T-TEST (command)
variable list,variable list,variable list
T-TEST (command),T-TEST (command),T-TEST (command)
paired samples,paired samples,paired samples
T-TEST (command),T-TEST (command),T-TEST (command)
PAIRS subcommand,PAIRS subcommand,PAIRS subcommand
PAIRS (subcommand),PAIRS (subcommand),PAIRS (subcommand)
T-TEST command,T-TEST command,T-TEST command

PAIRS requests paired-samples t tests.

• The minimum specification for a paired-samples test is PAIRS with an analysis list. Only numeric variables can be specified on the analysis list. The minimum analysis list is two variables.

WITH (keyword),WITH (keyword),WITH (keyword)
T-TEST command,T-TEST command,T-TEST command

• If keyword WITH is not specified, each variable in the list is compared with every other variable on the list.

• If keyword WITH is specified, every variable to the left of WITH is compared with every variable to the right of WITH. WITH can be used with PAIRED to obtain special pairing.

• To specify multiple analysis lists, use multiple PAIRS subcommands, each separated by a slash. Keyword PAIRS is required only for the first analysis list; a slash can be used to separate each additional analysis list.

PAIRED (keyword),PAIRED (keyword),PAIRED (keyword)
T-TEST command,T-TEST command,T-TEST command
(PAIRED) Special pairing for paired-samples test. PAIRED must be enclosed in parentheses and must be used with keyword WITH. When PAIRED is specified, the first variable before WITH is compared with the first variable after WITH, the second variable before WITH is compared with the second variable after WITH, and so forth. The same number of variables should be specified before and after WITH; unmatched variables are ignored and a warning message is issued. PAIRED generates an error message if keyword WITH is not specified on PAIRS.

Example

T-TEST  PAIRS=TEACHER CONSTRUC MANAGER.
T-TEST  PAIRS=TEACHER MANAGER WITH CONSTRUC ENGINEER.
T-TEST  PAIRS=TEACHER MANAGER WITH CONSTRUC ENGINEER (PAIRED).

• The first T-TEST compares TEACHER with CONSTRUC, TEACHER with MANAGER, and CONSTRUC with MANAGER.

• The second T-TEST compares TEACHER with CONSTRUC, TEACHER with ENGINEER, MANAGER with CONSTRUC, and MANAGER with ENGINEER. TEACHER is not compared with MANAGER, and CONSTRUC is not compared with ENGINEER.

• The third T-TEST compares TEACHER with CONSTRUC and MANAGER with ENGINEER.

Related Topics

T-TEST
Overview (T-TEST command)
Examples (T-TEST command)
VARIABLES Subcommand (T-TEST command)
TESTVAL Subcommand (T-TEST command)
GROUPS Subcommand (T-TEST command)
CRITERIA Subcommand (T-TEST command)
MISSING Subcommand (T-TEST command)


CRITERIA Subcommand (T-TEST command)

CRITERIA resets the value of the confidence interval. Keyword CI is required. You can specify a value between 0 and 1 in the parentheses. The default is 0.95.

Related Topics

T-TEST
Overview (T-TEST command)
Examples (T-TEST command)
VARIABLES Subcommand (T-TEST command)
TESTVAL Subcommand (T-TEST command)
GROUPS Subcommand (T-TEST command)
PAIRS Subcommand (T-TEST command)
MISSING Subcommand (T-TEST command)


MISSING Subcommand (T-TEST command)

T-TEST (command),T-TEST (command),T-TEST (command)
MISSING subcommand,MISSING subcommand,MISSING subcommand
MISSING (subcommand),MISSING (subcommand),MISSING (subcommand)
T-TEST command,T-TEST command,T-TEST command
T-TEST (command),T-TEST (command),T-TEST (command)
missing values,missing values,missing values

MISSING controls the treatment of missing values. The default is ANALYSIS.

• ANALYSIS and LISTWISE are alternatives; however, each can be specified with INCLUDE.

ANALYSIS (keyword),ANALYSIS (keyword),ANALYSIS (keyword)
T-TEST command,T-TEST command,T-TEST command
LISTWISE (keyword),LISTWISE (keyword),LISTWISE (keyword)
T-TEST command,T-TEST command,T-TEST command
INCLUDE (keyword),INCLUDE (keyword),INCLUDE (keyword)
T-TEST command,T-TEST command,T-TEST command
ANALYSIS | Delete cases with missing values on an analysis-by-analysis or pair-by-pair basis. For independent-samples tests, cases with missing values for either the grouping variable or the dependent variable are excluded from the analysis of that dependent variable. For paired-samples tests, a case with a missing value for either of the variables in a given pair is excluded from the analysis of that pair. This is the default.
LISTWISE | Exclude cases with missing values listwise. A case with a missing value for any variable specified on either GROUPS or VARIABLES is excluded from any independent-samples test. A case with a missing value for any variable specified on PAIRS is excluded from any paired-samples test.
INCLUDE | Include user-missing values. User-missing values are treated as valid values.

Related Topics

T-TEST
Overview (T-TEST command)
Examples (T-TEST command)
VARIABLES Subcommand (T-TEST command)
TESTVAL Subcommand (T-TEST command)
GROUPS Subcommand (T-TEST command)
PAIRS Subcommand (T-TEST command)
CRITERIA Subcommand (T-TEST command)


TWOSTEP CLUSTER

TWOSTEP CLUSTER (command),TWOSTEP CLUSTER (command),TWOSTEP CLUSTER (command)
TWOSTEP CLUSTER (command),TWOSTEP CLUSTER (command),TWOSTEP CLUSTER (command)
syntax chart,syntax chart,syntax chart

TWOSTEP CLUSTER is available in the Statistics Base option.

TWOSTEP CLUSTER

  [/CATEGORICAL VARIABLES = varlist]

  [/CONTINUOUS VARIABLES = varlist]

  [/CRITERIA [INITHRESHOLD({0**  })] [MXBRANCH({8**})]
                           {value}             {n  }
             [MXLEVEL({3**})] ]
                      {n  }

  [/DISTANCE {EUCLIDEAN   }]
             {LIKELIHOOD**}

  [/HANDLENOISE {0**}]
                {n  }

  [/INFILE FILE = filename]

  [/MEMALLOCATE {64**}]
                {n   }

  [/MISSING {EXCLUDE**}]
            {INCLUDE  }

  [/NOSTANDARDIZE [VARIABLES = varlist]]

  [/NUMCLUSTERS {AUTO** {15**} [{AIC  }]}]
                        {n   }  {BIC**}
                {FIXED = n              }

  [/OUTFILE [MODEL = 'file'] [STATE = 'file']]

  [/PRINT [IC] [COUNT] [SUMMARY]]

  [/VIEWMODEL [DISPLAY = {YES**}]
                         {NO   }
              [EVALUATIONFIELDS = varlist]]

  [/SAVE CLUSTER [VARIABLE = varname]]

**Default if the subcommand is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See TWOSTEP CLUSTER Algorithms for computational details for this procedure.

Syntax for the TWOSTEP CLUSTER command can be generated from the TwoStep Cluster Analysis dialog box.

Example

TWOSTEP CLUSTER
  /CONTINUOUS VARIABLES = INCOME
  /CATEGORICAL VARIABLES = GENDER RACE
  /PRINT SUMMARY.

Related Topics

Overview (TWOSTEP CLUSTER command)
Variable List (TWOSTEP CLUSTER command)
CATEGORICAL Subcommand (TWOSTEP CLUSTER command)
CONTINUOUS Subcommand (TWOSTEP CLUSTER command)
CRITERIA Subcommand (TWOSTEP CLUSTER command)
DISTANCE Subcommand (TWOSTEP CLUSTER command)
HANDLENOISE Subcommand (TWOSTEP CLUSTER command)
INFILE Subcommand (TWOSTEP CLUSTER command)
MEMALLOCATE Subcommand (TWOSTEP CLUSTER command)
MISSING Subcommand (TWOSTEP CLUSTER command)
NOSTANDARDIZE Subcommand (TWOSTEP CLUSTER command)
NUMCLUSTERS Subcommand (TWOSTEP CLUSTER command)
OUTFILE Subcommand (TWOSTEP CLUSTER command)
PRINT Subcommand (TWOSTEP CLUSTER command)
VIEWMODEL Subcommand (TWOSTEP CLUSTER command)
SAVE Subcommand (TWOSTEP CLUSTER command)


Overview (TWOSTEP CLUSTER command)

TWOSTEP CLUSTER groups observations into clusters based on a nearness criterion. The procedure uses a hierarchical agglomerative clustering procedure in which individual cases are successively combined to form clusters whose centers are far apart. This algorithm is designed to cluster large numbers of cases. It passes the data once to find the cluster centers and again to assign cluster memberships. In addition to the benefit of few data passes, the procedure allows the user to set the amount of memory used by the clustering algorithm.

Basic Features Collapse Hide details

Basic Features

Cluster Features (CF) Tree. TWOSTEP CLUSTER clusters observations by building a data structure called the CF tree, which contains the cluster centers. The CF tree is grown during the first stage of clustering and values are added to its leaves if they are close to the cluster center of a particular leaf.

Distance Measure. Two types of distance measures are offered—the traditional Euclidean distance and the likelihood distance. The former is available when no categorical variables are specified. The latter is especially useful when categorical variables are used. The likelihood function is computed using the normal density for continuous variables and the multinomial probability mass function for categorical variables. All variables are treated as independent.

Tuning the Algorithm. You can control the values of algorithm-tuning parameters with the CRITERIA subcommand.

Noise Handling. The clustering algorithm can optionally retain any outliers that do not fit in the CF tree. If possible, these values will be placed in the CF tree after it is completed. Otherwise, TWOSTEP CLUSTER will discard them after preclustering.

Missing Values. TWOSTEP CLUSTER will delete listwise any records with missing fields.

Numclusters. This subcommand specifies the number of clusters into which the data will be partitioned. The user may tell TWOSTEP CLUSTER to automatically select the number of clusters.

Optional Output. You can specify output to an XML file with the OUTFILE subcommand. The cluster membership for each case used can be saved to the active dataset with the SAVE subcommand.

Weights. TWOSTEP CLUSTER ignores specification on the WEIGHT command.

Basic Specification Collapse Hide details

Basic Specification

• The minimum specification is a list of variables, either categorical or continuous, to be clustered and at least one of the following subcommands: OUTFILE, PRINT, or SAVE.

• The number of clusters may be specified with the NUMCLUSTERS subcommand.

• Unless the NOSTANDARDIZE subcommand is given, TWOSTEP CLUSTER will standardize all continuous variables.

• If DISTANCE is Euclidean, TWOSTEP CLUSTER will accept only continuous variables.

Subcommand Order Collapse Hide details

Subcommand Order

• The subcommands can be specified in any order.

Syntax Rules Collapse Hide details

Syntax Rules

• Minimum syntax: a variable must be specified.

• Empty subcommands are silently ignored.

• Variables listed in the CONTINUOUS subcommand must be numeric.

• If a subcommand is issued more than once, TWOSTEP CLUSTER will ignore all but the last issue.

Related Topics

TWOSTEP CLUSTER
Variable List (TWOSTEP CLUSTER command)
CATEGORICAL Subcommand (TWOSTEP CLUSTER command)
CONTINUOUS Subcommand (TWOSTEP CLUSTER command)
CRITERIA Subcommand (TWOSTEP CLUSTER command)
DISTANCE Subcommand (TWOSTEP CLUSTER command)
HANDLENOISE Subcommand (TWOSTEP CLUSTER command)
INFILE Subcommand (TWOSTEP CLUSTER command)
MEMALLOCATE Subcommand (TWOSTEP CLUSTER command)
MISSING Subcommand (TWOSTEP CLUSTER command)
NOSTANDARDIZE Subcommand (TWOSTEP CLUSTER command)
NUMCLUSTERS Subcommand (TWOSTEP CLUSTER command)
OUTFILE Subcommand (TWOSTEP CLUSTER command)
PRINT Subcommand (TWOSTEP CLUSTER command)
VIEWMODEL Subcommand (TWOSTEP CLUSTER command)
SAVE Subcommand (TWOSTEP CLUSTER command)


Variable List (TWOSTEP CLUSTER command)

The variable lists specify those variables to be clustered. The first variable list specifies only continuous variables, and the second list specifies only categorical variables (that is, the two lists are disjoint).

Related Topics

TWOSTEP CLUSTER
Overview (TWOSTEP CLUSTER command)
CATEGORICAL Subcommand (TWOSTEP CLUSTER command)
CONTINUOUS Subcommand (TWOSTEP CLUSTER command)
CRITERIA Subcommand (TWOSTEP CLUSTER command)
DISTANCE Subcommand (TWOSTEP CLUSTER command)
HANDLENOISE Subcommand (TWOSTEP CLUSTER command)
INFILE Subcommand (TWOSTEP CLUSTER command)
MEMALLOCATE Subcommand (TWOSTEP CLUSTER command)
MISSING Subcommand (TWOSTEP CLUSTER command)
NOSTANDARDIZE Subcommand (TWOSTEP CLUSTER command)
NUMCLUSTERS Subcommand (TWOSTEP CLUSTER command)
OUTFILE Subcommand (TWOSTEP CLUSTER command)
PRINT Subcommand (TWOSTEP CLUSTER command)
VIEWMODEL Subcommand (TWOSTEP CLUSTER command)
SAVE Subcommand (TWOSTEP CLUSTER command)


CATEGORICAL Subcommand (TWOSTEP CLUSTER command)

TWOSTEP CLUSTER (command),TWOSTEP CLUSTER (command),TWOSTEP CLUSTER (command)
CATEGORICAL subcommand,CATEGORICAL subcommand,CATEGORICAL subcommand
CATEGORICAL (subcommand),CATEGORICAL (subcommand),CATEGORICAL (subcommand)
TWOSTEP CLUSTER command,TWOSTEP CLUSTER command,TWOSTEP CLUSTER command

The CATEGORICAL subcommand specifies a list of categorical variables.

Example

TWOSTEP CLUSTER
  /CATEGORICAL VARIABLES = RACE GENDER CITIZEN
  /PRINT SUMMARY COUNT.

This tells TWOSTEP CLUSTER to cluster the categorical variables RACE, GENDER, and CITIZEN. Summary statistics by cluster and cluster frequencies are output in tables.

Related Topics

TWOSTEP CLUSTER
Overview (TWOSTEP CLUSTER command)
Variable List (TWOSTEP CLUSTER command)
CONTINUOUS Subcommand (TWOSTEP CLUSTER command)
CRITERIA Subcommand (TWOSTEP CLUSTER command)
DISTANCE Subcommand (TWOSTEP CLUSTER command)
HANDLENOISE Subcommand (TWOSTEP CLUSTER command)
INFILE Subcommand (TWOSTEP CLUSTER command)
MEMALLOCATE Subcommand (TWOSTEP CLUSTER command)
MISSING Subcommand (TWOSTEP CLUSTER command)
NOSTANDARDIZE Subcommand (TWOSTEP CLUSTER command)
NUMCLUSTERS Subcommand (TWOSTEP CLUSTER command)
OUTFILE Subcommand (TWOSTEP CLUSTER command)
PRINT Subcommand (TWOSTEP CLUSTER command)
VIEWMODEL Subcommand (TWOSTEP CLUSTER command)
SAVE Subcommand (TWOSTEP CLUSTER command)


CONTINUOUS Subcommand (TWOSTEP CLUSTER command)

TWOSTEP CLUSTER (command),TWOSTEP CLUSTER (command),TWOSTEP CLUSTER (command)
CONTINUOUS subcommand,CONTINUOUS subcommand,CONTINUOUS subcommand
CONTINUOUS (subcommand),CONTINUOUS (subcommand),CONTINUOUS (subcommand)
TWOSTEP CLUSTER command,TWOSTEP CLUSTER command,TWOSTEP CLUSTER command

The CONTINUOUS subcommand specifies a list of scale variables.

Example

TWOSTEP CLUSTER
  /CATEGORICAL VARIABLES = RACE GENDER CITIZEN
  /CONTINUOUS VARIABLES = INCOME
  /PRINT SUMMARY COUNT.

This tells TWOSTEP CLUSTER to cluster the categorical variables RACE, GENDER, and CITIZEN, and the numeric variable INCOME. Summary statistics by cluster and cluster frequencies are output in tables.

Related Topics

TWOSTEP CLUSTER
Overview (TWOSTEP CLUSTER command)
Variable List (TWOSTEP CLUSTER command)
CATEGORICAL Subcommand (TWOSTEP CLUSTER command)
CRITERIA Subcommand (TWOSTEP CLUSTER command)
DISTANCE Subcommand (TWOSTEP CLUSTER command)
HANDLENOISE Subcommand (TWOSTEP CLUSTER command)
INFILE Subcommand (TWOSTEP CLUSTER command)
MEMALLOCATE Subcommand (TWOSTEP CLUSTER command)
MISSING Subcommand (TWOSTEP CLUSTER command)
NOSTANDARDIZE Subcommand (TWOSTEP CLUSTER command)
NUMCLUSTERS Subcommand (TWOSTEP CLUSTER command)
OUTFILE Subcommand (TWOSTEP CLUSTER command)
PRINT Subcommand (TWOSTEP CLUSTER command)
VIEWMODEL Subcommand (TWOSTEP CLUSTER command)
SAVE Subcommand (TWOSTEP CLUSTER command)


CRITERIA Subcommand (TWOSTEP CLUSTER command)

TWOSTEP CLUSTER (command),TWOSTEP CLUSTER (command),TWOSTEP CLUSTER (command)
CRITERIA subcommand,CRITERIA subcommand,CRITERIA subcommand
CRITERIA (subcommand),CRITERIA (subcommand),CRITERIA (subcommand)
TWOSTEP CLUSTER command,TWOSTEP CLUSTER command,TWOSTEP CLUSTER command

The CRITERIA subcommand specifies the following settings for the clustering algorithm:

INITTHRESHOLD (keyword),INITTHRESHOLD (keyword),INITTHRESHOLD (keyword)
TWOSTEP CLUSTER command,TWOSTEP CLUSTER command,TWOSTEP CLUSTER command
MXBRANCH (keyword),MXBRANCH (keyword),MXBRANCH (keyword)
TWOSTEP CLUSTER command,TWOSTEP CLUSTER command,TWOSTEP CLUSTER command
MXLEVEL (keyword),MXLEVEL (keyword),MXLEVEL (keyword)
TWOSTEP CLUSTER command,TWOSTEP CLUSTER command,TWOSTEP CLUSTER command
INITTHRESHOLD | The initial threshold used to grow the CF tree. The default is 0. If inserting a specific case into a leaf of the CF tree would yield tightness less than the threshold, the leaf is not split. If the tightness exceeds the threshold, the leaf is split.
MXBRANCH | The maximum number of child nodes that a leaf node can have. The default is 8.
MXLEVEL | The maximum number of levels that the CF tree can have. The default is 3.

Related Topics

TWOSTEP CLUSTER
Overview (TWOSTEP CLUSTER command)
Variable List (TWOSTEP CLUSTER command)
CATEGORICAL Subcommand (TWOSTEP CLUSTER command)
CONTINUOUS Subcommand (TWOSTEP CLUSTER command)
DISTANCE Subcommand (TWOSTEP CLUSTER command)
HANDLENOISE Subcommand (TWOSTEP CLUSTER command)
INFILE Subcommand (TWOSTEP CLUSTER command)
MEMALLOCATE Subcommand (TWOSTEP CLUSTER command)
MISSING Subcommand (TWOSTEP CLUSTER command)
NOSTANDARDIZE Subcommand (TWOSTEP CLUSTER command)
NUMCLUSTERS Subcommand (TWOSTEP CLUSTER command)
OUTFILE Subcommand (TWOSTEP CLUSTER command)
PRINT Subcommand (TWOSTEP CLUSTER command)
VIEWMODEL Subcommand (TWOSTEP CLUSTER command)
SAVE Subcommand (TWOSTEP CLUSTER command)


DISTANCE Subcommand (TWOSTEP CLUSTER command)

TWOSTEP CLUSTER (command),TWOSTEP CLUSTER (command),TWOSTEP CLUSTER (command)
DISTANCE subcommand,DISTANCE subcommand,DISTANCE subcommand
DISTANCE (subcommand),DISTANCE (subcommand),DISTANCE (subcommand)
TWOSTEP CLUSTER command,TWOSTEP CLUSTER command,TWOSTEP CLUSTER command

The distance subcommand determines how distances will be computed between clusters.

EUCLIDEAN (keyword),EUCLIDEAN (keyword),EUCLIDEAN (keyword)
TWOSTEP CLUSTER command,TWOSTEP CLUSTER command,TWOSTEP CLUSTER command
Euclidean distance,Euclidean distance,Euclidean distance
TWOSTEP CLUSTER command,TWOSTEP CLUSTER command,TWOSTEP CLUSTER command
LIKELIHOOD (keyword),LIKELIHOOD (keyword),LIKELIHOOD (keyword)
TWOSTEP CLUSTER command,TWOSTEP CLUSTER command,TWOSTEP CLUSTER command
log-likelihood distance measure,log-likelihood distance measure,log-likelihood distance measure
TWOSTEP CLUSTER command,TWOSTEP CLUSTER command,TWOSTEP CLUSTER command
EUCLIDEAN | Use the Euclidean distance to compute distances between clusters. You may select Euclidean distance if all variables are continuous. TWOSTEP CLUSTER will return a syntax error if you specify Euclidean distance with non-numeric variables.
LIKELIHOOD | Use the minus log-likelihood to compute distances between clusters. This is the default. The likelihood function is computed assuming all variables are independent. Continuous variables are assumed to be normally distributed, and categorical variables are assumed to be multinomially distributed.

Related Topics

TWOSTEP CLUSTER
Overview (TWOSTEP CLUSTER command)
Variable List (TWOSTEP CLUSTER command)
CATEGORICAL Subcommand (TWOSTEP CLUSTER command)
CONTINUOUS Subcommand (TWOSTEP CLUSTER command)
CRITERIA Subcommand (TWOSTEP CLUSTER command)
HANDLENOISE Subcommand (TWOSTEP CLUSTER command)
INFILE Subcommand (TWOSTEP CLUSTER command)
MEMALLOCATE Subcommand (TWOSTEP CLUSTER command)
MISSING Subcommand (TWOSTEP CLUSTER command)
NOSTANDARDIZE Subcommand (TWOSTEP CLUSTER command)
NUMCLUSTERS Subcommand (TWOSTEP CLUSTER command)
OUTFILE Subcommand (TWOSTEP CLUSTER command)
PRINT Subcommand (TWOSTEP CLUSTER command)
VIEWMODEL Subcommand (TWOSTEP CLUSTER command)
SAVE Subcommand (TWOSTEP CLUSTER command)


HANDLENOISE Subcommand (TWOSTEP CLUSTER command)

TWOSTEP CLUSTER (command),TWOSTEP CLUSTER (command),TWOSTEP CLUSTER (command)
HANDLENOISE subcommand,HANDLENOISE subcommand,HANDLENOISE subcommand
HANDLENOISE (subcommand),HANDLENOISE (subcommand),HANDLENOISE (subcommand)
TWOSTEP CLUSTER command,TWOSTEP CLUSTER command,TWOSTEP CLUSTER command

The HANDLENOISE subcommand tells TWOSTEP CLUSTER to treat outliers specially during clustering. During growth of the CF tree, this subcommand is relevant only if the CF tree fills. The CF tree is full if it cannot accept any more cases in a leaf node and no leaf node can be split. The default value of HANDLENOISE is 0, equivalent to no noise handling.

• If the CF tree fills and HANDLENOISE is greater than 0, the CF tree will be regrown after placing any data in sparse leaves into their own noise leaf. A leaf is considered sparse if the ratio of the number of cases in the sparse leaf to the number of cases in the largest leaf is less than HANDLENOISE. After the tree is grown, the outliers will be placed in the CF tree, if possible. If not, the outliers are discarded for the second phase of clustering.

• If the CF tree fills and HANDLENOISE is equal to 0, the threshold will be increased and CF tree regrown with all cases. After final clustering, values that cannot be assigned to a cluster are labeled outliers. The outlier cluster is given an identification number of –1. The outlier cluster is not included in the count of the number of clusters; that is, if you specify n clusters and noise handling, TWOSTEP CLUSTER will output n clusters and one noise cluster.

Example

TWOSTEP CLUSTER
  /CATEGORICAL VARIABLES = RACE GENDER CITIZEN
  /CONTINUOUS VARIABLES = INCOME
  /HANDLENOISE 25
  /PRINT SUMMARY COUNT.

This tells TWOSTEP CLUSTER to cluster the categorical variables RACE, GENDER and CITIZEN, and the numeric variable INCOME. If the CF tree fills, a noise leaf is constructed from cases whose leaves contain fewer than 25 percent of the cases contained by the largest leaf. The CF tree is then regrown, ignoring the noise leaf. After the tree is regrown, cases from the noise leaf are checked to see if they fit any of the leaves in the new tree. Any cases that still do not fit are discarded as outliers. Summary statistics by cluster and cluster frequencies are output in tables.

Related Topics

TWOSTEP CLUSTER
Overview (TWOSTEP CLUSTER command)
Variable List (TWOSTEP CLUSTER command)
CATEGORICAL Subcommand (TWOSTEP CLUSTER command)
CONTINUOUS Subcommand (TWOSTEP CLUSTER command)
CRITERIA Subcommand (TWOSTEP CLUSTER command)
DISTANCE Subcommand (TWOSTEP CLUSTER command)
INFILE Subcommand (TWOSTEP CLUSTER command)
MEMALLOCATE Subcommand (TWOSTEP CLUSTER command)
MISSING Subcommand (TWOSTEP CLUSTER command)
NOSTANDARDIZE Subcommand (TWOSTEP CLUSTER command)
NUMCLUSTERS Subcommand (TWOSTEP CLUSTER command)
OUTFILE Subcommand (TWOSTEP CLUSTER command)
PRINT Subcommand (TWOSTEP CLUSTER command)
VIEWMODEL Subcommand (TWOSTEP CLUSTER command)
SAVE Subcommand (TWOSTEP CLUSTER command)


INFILE Subcommand (TWOSTEP CLUSTER command)

TWOSTEP CLUSTER (command),TWOSTEP CLUSTER (command),TWOSTEP CLUSTER (command)
INFILE subcommand,INFILE subcommand,INFILE subcommand
INFILE (subcommand),INFILE (subcommand),INFILE (subcommand)
TWOSTEP CLUSTER command,TWOSTEP CLUSTER command,TWOSTEP CLUSTER command

The INFILE subcommand causes TWOSTEP CLUSTER to update a cluster model whose CF Tree has been saved as an XML file with the OUTFILE subcommand and STATE keyword. The model will be updated with the data in the active file. The user must supply variable names in the active file in the order they are stored in the XML file. TWOSTEP CLUSTER will update the cluster model in memory only, leaving unaltered the XML file.

• If the INFILE subcommand is given, TWOSTEP CLUSTER will ignore the CRITERIA, DISTANCE, HANDLENOISE and MEMALLOCATE subcommands, if given.

Related Topics

TWOSTEP CLUSTER
Overview (TWOSTEP CLUSTER command)
Variable List (TWOSTEP CLUSTER command)
CATEGORICAL Subcommand (TWOSTEP CLUSTER command)
CONTINUOUS Subcommand (TWOSTEP CLUSTER command)
CRITERIA Subcommand (TWOSTEP CLUSTER command)
DISTANCE Subcommand (TWOSTEP CLUSTER command)
HANDLENOISE Subcommand (TWOSTEP CLUSTER command)
MEMALLOCATE Subcommand (TWOSTEP CLUSTER command)
MISSING Subcommand (TWOSTEP CLUSTER command)
NOSTANDARDIZE Subcommand (TWOSTEP CLUSTER command)
NUMCLUSTERS Subcommand (TWOSTEP CLUSTER command)
OUTFILE Subcommand (TWOSTEP CLUSTER command)
PRINT Subcommand (TWOSTEP CLUSTER command)
VIEWMODEL Subcommand (TWOSTEP CLUSTER command)
SAVE Subcommand (TWOSTEP CLUSTER command)


MEMALLOCATE Subcommand (TWOSTEP CLUSTER command)

TWOSTEP CLUSTER (command),TWOSTEP CLUSTER (command),TWOSTEP CLUSTER (command)
MEMALLOCATE subcommand,MEMALLOCATE subcommand,MEMALLOCATE subcommand
MEMALLOCATE (subcommand),MEMALLOCATE (subcommand),MEMALLOCATE (subcommand)
TWOSTEP CLUSTER command,TWOSTEP CLUSTER command,TWOSTEP CLUSTER command

The MEMALLOCATE subcommand specifies the maximum amount of memory in megabytes (MB) that the cluster algorithm should use. If the procedure exceeds this maximum, it will use the disk to store information that will not fit in memory.

• The minimum value that you can specify is 4. If this subcommand is not specified, the default value is 64 MB.

• Consult your system administrator for the largest value you can specify on your system.

Related Topics

TWOSTEP CLUSTER
Overview (TWOSTEP CLUSTER command)
Variable List (TWOSTEP CLUSTER command)
CATEGORICAL Subcommand (TWOSTEP CLUSTER command)
CONTINUOUS Subcommand (TWOSTEP CLUSTER command)
CRITERIA Subcommand (TWOSTEP CLUSTER command)
DISTANCE Subcommand (TWOSTEP CLUSTER command)
HANDLENOISE Subcommand (TWOSTEP CLUSTER command)
INFILE Subcommand (TWOSTEP CLUSTER command)
MISSING Subcommand (TWOSTEP CLUSTER command)
NOSTANDARDIZE Subcommand (TWOSTEP CLUSTER command)
NUMCLUSTERS Subcommand (TWOSTEP CLUSTER command)
OUTFILE Subcommand (TWOSTEP CLUSTER command)
PRINT Subcommand (TWOSTEP CLUSTER command)
VIEWMODEL Subcommand (TWOSTEP CLUSTER command)
SAVE Subcommand (TWOSTEP CLUSTER command)


MISSING Subcommand (TWOSTEP CLUSTER command)

TWOSTEP CLUSTER (command),TWOSTEP CLUSTER (command),TWOSTEP CLUSTER (command)
MISSING subcommand,MISSING subcommand,MISSING subcommand
MISSING (subcommand),MISSING (subcommand),MISSING (subcommand)
TWOSTEP CLUSTER command,TWOSTEP CLUSTER command,TWOSTEP CLUSTER command

The MISSING subcommand specifies how to handle cases with user-missing values.

• If this subcommand is not specified, the default is EXCLUDE.

• TWOSTEP CLUSTER deletes any case with a system-missing value.

• Keywords EXCLUDE and INCLUDE are mutually exclusive. Only one of them can be specified.

EXCLUDE (keyword),EXCLUDE (keyword),EXCLUDE (keyword)
TWOSTEP CLUSTER command,TWOSTEP CLUSTER command,TWOSTEP CLUSTER command
INCLUDE (keyword),INCLUDE (keyword),INCLUDE (keyword)
TWOSTEP CLUSTER command,TWOSTEP CLUSTER command,TWOSTEP CLUSTER command
EXCLUDE | Exclude both user-missing and system-missing values. This is the default.
INCLUDE | User-missing values are treated as valid. System-missing values cannot be included in the analysis.

Related Topics

TWOSTEP CLUSTER
Overview (TWOSTEP CLUSTER command)
Variable List (TWOSTEP CLUSTER command)
CATEGORICAL Subcommand (TWOSTEP CLUSTER command)
CONTINUOUS Subcommand (TWOSTEP CLUSTER command)
CRITERIA Subcommand (TWOSTEP CLUSTER command)
DISTANCE Subcommand (TWOSTEP CLUSTER command)
HANDLENOISE Subcommand (TWOSTEP CLUSTER command)
INFILE Subcommand (TWOSTEP CLUSTER command)
MEMALLOCATE Subcommand (TWOSTEP CLUSTER command)
NOSTANDARDIZE Subcommand (TWOSTEP CLUSTER command)
NUMCLUSTERS Subcommand (TWOSTEP CLUSTER command)
OUTFILE Subcommand (TWOSTEP CLUSTER command)
PRINT Subcommand (TWOSTEP CLUSTER command)
VIEWMODEL Subcommand (TWOSTEP CLUSTER command)
SAVE Subcommand (TWOSTEP CLUSTER command)


NOSTANDARDIZE Subcommand (TWOSTEP CLUSTER command)

TWOSTEP CLUSTER (command),TWOSTEP CLUSTER (command),TWOSTEP CLUSTER (command)
NOSTANDARDIZE subcommand,NOSTANDARDIZE subcommand,NOSTANDARDIZE subcommand
NOSTANDARDIZE (subcommand),NOSTANDARDIZE (subcommand),NOSTANDARDIZE (subcommand)
TWOSTEP CLUSTER command,TWOSTEP CLUSTER command,TWOSTEP CLUSTER command

The NOSTANDARDIZE subcommand will prevent TWOSTEP CLUSTER from standardizing the continuous variables specified with the VARIABLES keyword. If this subcommand is not specified, or given without a variable list, TWOSTEP CLUSTER will standardize all continuous variables by subtracting the mean and dividing by the standard deviation.

Related Topics

TWOSTEP CLUSTER
Overview (TWOSTEP CLUSTER command)
Variable List (TWOSTEP CLUSTER command)
CATEGORICAL Subcommand (TWOSTEP CLUSTER command)
CONTINUOUS Subcommand (TWOSTEP CLUSTER command)
CRITERIA Subcommand (TWOSTEP CLUSTER command)
DISTANCE Subcommand (TWOSTEP CLUSTER command)
HANDLENOISE Subcommand (TWOSTEP CLUSTER command)
INFILE Subcommand (TWOSTEP CLUSTER command)
MEMALLOCATE Subcommand (TWOSTEP CLUSTER command)
MISSING Subcommand (TWOSTEP CLUSTER command)
NUMCLUSTERS Subcommand (TWOSTEP CLUSTER command)
OUTFILE Subcommand (TWOSTEP CLUSTER command)
PRINT Subcommand (TWOSTEP CLUSTER command)
VIEWMODEL Subcommand (TWOSTEP CLUSTER command)
SAVE Subcommand (TWOSTEP CLUSTER command)


NUMCLUSTERS Subcommand (TWOSTEP CLUSTER command)

TWOSTEP CLUSTER (command),TWOSTEP CLUSTER (command),TWOSTEP CLUSTER (command)
NUMCLUSTERS subcommand,NUMCLUSTERS subcommand,NUMCLUSTERS subcommand
NUMCLUSTERS (subcommand),NUMCLUSTERS (subcommand),NUMCLUSTERS (subcommand)
TWOSTEP CLUSTER command,TWOSTEP CLUSTER command,TWOSTEP CLUSTER command

The NUMCLUSTERS subcommand specifies the number of clusters into which the data will be partitioned.

AUTO (keyword),AUTO (keyword),AUTO (keyword)
TWOSTEP CLUSTER command,TWOSTEP CLUSTER command,TWOSTEP CLUSTER command
TWOSTEP CLUSTER (command),TWOSTEP CLUSTER (command),TWOSTEP CLUSTER (command)
automatic cluster selection,automatic cluster selection,automatic cluster selection
BIC (keyword),BIC (keyword),BIC (keyword)
TWOSTEP CLUSTER command,TWOSTEP CLUSTER command,TWOSTEP CLUSTER command
AIC (keyword),AIC (keyword),AIC (keyword)
TWOSTEP CLUSTER command,TWOSTEP CLUSTER command,TWOSTEP CLUSTER command
FIXED (keyword),FIXED (keyword),FIXED (keyword)
TWOSTEP CLUSTER command,TWOSTEP CLUSTER command,TWOSTEP CLUSTER command
AUTO | Automatic selection of the number of clusters. Under AUTO, you may specify a maximum number of possible clusters. TWOSTEP CLUSTER will search for the best number of clusters between 1 and the maximum using the criterion that you specify. The criterion for deciding the number of clusters can be either the Bayesian Information Criterion (BIC) or Akaike Information Criterion (AIC). TWOSTEP CLUSTER will find at least one cluster if the AUTO keyword is given.
FIXED | User-specified number of clusters. Specify a positive integer.

Examples

TWOSTEP CLUSTER
  /CONTINUOUS VARIABLES = INCOME
  /CATEGORICAL VARIABLES = GENDER RACE
  /NUMCLUSTERS AUTO 10 AIC
  /PRINT SUMMARY COUNT.

TWOSTEP CLUSTER uses the variables RACE, GENDER and INCOME for clustering. Specifications on the NUMCLUSTERS subcommand will instruct the procedure to automatically search for the number of clusters using the Akaike Information Criterion and require the answer to lie between 1 and 10.

TWOSTEP CLUSTER
  /CONTINUOUS VARIABLES = INCOME
  /CATEGORICAL VARIABLES = RACE GENDER
  /NUMCLUSTERS FIXED 7
  /PRINT SUMMARY COUNT.

Here the procedure will find exactly seven clusters.

Related Topics

TWOSTEP CLUSTER
Overview (TWOSTEP CLUSTER command)
Variable List (TWOSTEP CLUSTER command)
CATEGORICAL Subcommand (TWOSTEP CLUSTER command)
CONTINUOUS Subcommand (TWOSTEP CLUSTER command)
CRITERIA Subcommand (TWOSTEP CLUSTER command)
DISTANCE Subcommand (TWOSTEP CLUSTER command)
HANDLENOISE Subcommand (TWOSTEP CLUSTER command)
INFILE Subcommand (TWOSTEP CLUSTER command)
MEMALLOCATE Subcommand (TWOSTEP CLUSTER command)
MISSING Subcommand (TWOSTEP CLUSTER command)
NOSTANDARDIZE Subcommand (TWOSTEP CLUSTER command)
OUTFILE Subcommand (TWOSTEP CLUSTER command)
PRINT Subcommand (TWOSTEP CLUSTER command)
VIEWMODEL Subcommand (TWOSTEP CLUSTER command)
SAVE Subcommand (TWOSTEP CLUSTER command)


OUTFILE Subcommand (TWOSTEP CLUSTER command)

TWOSTEP CLUSTER (command),TWOSTEP CLUSTER (command),TWOSTEP CLUSTER (command)
OUTFILE subcommand,OUTFILE subcommand,OUTFILE subcommand
OUTFILE (subcommand),OUTFILE (subcommand),OUTFILE (subcommand)
TWOSTEP CLUSTER command,TWOSTEP CLUSTER command,TWOSTEP CLUSTER command

The OUTFILE subcommand directs TWOSTEP CLUSTER to write its output to the specified filename as XML.

MODEL (keyword),MODEL (keyword),MODEL (keyword)
TWOSTEP CLUSTER command,TWOSTEP CLUSTER command,TWOSTEP CLUSTER command
STATE (keyword),STATE (keyword),STATE (keyword)
TWOSTEP CLUSTER command,TWOSTEP CLUSTER command,TWOSTEP CLUSTER command
MODEL | Save the final model output.
STATE | Save the CF tree. Use the STATE keyword if you want to update the model later.

You must supply a valid filename on your operating system. We recommend specifying the full path of the filename.

Related Topics

TWOSTEP CLUSTER
Overview (TWOSTEP CLUSTER command)
Variable List (TWOSTEP CLUSTER command)
CATEGORICAL Subcommand (TWOSTEP CLUSTER command)
CONTINUOUS Subcommand (TWOSTEP CLUSTER command)
CRITERIA Subcommand (TWOSTEP CLUSTER command)
DISTANCE Subcommand (TWOSTEP CLUSTER command)
HANDLENOISE Subcommand (TWOSTEP CLUSTER command)
INFILE Subcommand (TWOSTEP CLUSTER command)
MEMALLOCATE Subcommand (TWOSTEP CLUSTER command)
MISSING Subcommand (TWOSTEP CLUSTER command)
NOSTANDARDIZE Subcommand (TWOSTEP CLUSTER command)
NUMCLUSTERS Subcommand (TWOSTEP CLUSTER command)
PRINT Subcommand (TWOSTEP CLUSTER command)
VIEWMODEL Subcommand (TWOSTEP CLUSTER command)
SAVE Subcommand (TWOSTEP CLUSTER command)


PRINT Subcommand (TWOSTEP CLUSTER command)

TWOSTEP CLUSTER (command),TWOSTEP CLUSTER (command),TWOSTEP CLUSTER (command)
PRINT subcommand,PRINT subcommand,PRINT subcommand
PRINT (subcommand),PRINT (subcommand),PRINT (subcommand)
TWOSTEP CLUSTER command,TWOSTEP CLUSTER command,TWOSTEP CLUSTER command

The PRINT subcommand causes TWOSTEP CLUSTER to print tables related to each cluster.

IC (keyword),IC (keyword),IC (keyword)
TWOSTEP CLUSTER command,TWOSTEP CLUSTER command,TWOSTEP CLUSTER command
SUMMARY (keyword),SUMMARY (keyword),SUMMARY (keyword)
TWOSTEP CLUSTER command,TWOSTEP CLUSTER command,TWOSTEP CLUSTER command
COUNT (keyword),COUNT (keyword),COUNT (keyword)
TWOSTEP CLUSTER command,TWOSTEP CLUSTER command,TWOSTEP CLUSTER command
IC | Information criterion. Prints the chosen information criterion (AIC or BIC) for different numbers of clusters. If this keyword is specified when the AUTO keyword is not used with the NUMCLUSTERS subcommand, TWOSTEP CLUSTER will skip this keyword and issue a warning. TWOSTEP CLUSTER will ignore this keyword if AUTO 1 is specified in the NUMCLUSTERS subcommand.
SUMMARY | Descriptive statistics by cluster. This option prints two tables describing the variables in each cluster. In one table, means and standard deviations are reported for continuous variables. The other table reports frequencies of categorical variables. All values are separated by cluster.
COUNT | Cluster frequencies. This option prints a table containing a list of clusters and how many observations are in each cluster.

Related Topics

TWOSTEP CLUSTER
Overview (TWOSTEP CLUSTER command)
Variable List (TWOSTEP CLUSTER command)
CATEGORICAL Subcommand (TWOSTEP CLUSTER command)
CONTINUOUS Subcommand (TWOSTEP CLUSTER command)
CRITERIA Subcommand (TWOSTEP CLUSTER command)
DISTANCE Subcommand (TWOSTEP CLUSTER command)
HANDLENOISE Subcommand (TWOSTEP CLUSTER command)
INFILE Subcommand (TWOSTEP CLUSTER command)
MEMALLOCATE Subcommand (TWOSTEP CLUSTER command)
MISSING Subcommand (TWOSTEP CLUSTER command)
NOSTANDARDIZE Subcommand (TWOSTEP CLUSTER command)
NUMCLUSTERS Subcommand (TWOSTEP CLUSTER command)
OUTFILE Subcommand (TWOSTEP CLUSTER command)
VIEWMODEL Subcommand (TWOSTEP CLUSTER command)
SAVE Subcommand (TWOSTEP CLUSTER command)


VIEWMODEL Subcommand (TWOSTEP CLUSTER command)

TWOSTEP CLUSTER (command),TWOSTEP CLUSTER (command),TWOSTEP CLUSTER (command)
VIEWMODEL subcommand,VIEWMODEL subcommand,VIEWMODEL subcommand
VIEWMODEL (subcommand),VIEWMODEL (subcommand),VIEWMODEL (subcommand)
TWOSTEP CLUSTER command,TWOSTEP CLUSTER command,TWOSTEP CLUSTER command

The VIEWMODEL subcommand controls options for display of model-related output, including tables and charts. Tables in the model view include a model summary and cluster-by-features grid. Graphical output in the model view includes a cluster quality chart, cluster sizes, variable importance, cluster comparison grid, and cell information.

DISPLAY (keyword),DISPLAY (keyword),DISPLAY (keyword)
TWOSTEP CLUSTER command,TWOSTEP CLUSTER command,TWOSTEP CLUSTER command
DISPLAY Keyword Collapse Hide details

DISPLAY Keyword

The DISPLAY keyword specifies whether to display the model view in the output.

YES | Display the model view. This is the default.
NO | Do not display the model view.
EVALUATIONFIELDS (keyword),EVALUATIONFIELDS (keyword),EVALUATIONFIELDS (keyword)
TWOSTEP CLUSTER command,TWOSTEP CLUSTER command,TWOSTEP CLUSTER command
EVALUATIONFIELDS Keyword Collapse Hide details

EVALUATIONFIELDS Keyword

The EVALUATIONFIELDS keyword calculates cluster data for variables that were not used in cluster creation. Evaluation fields can be displayed along with the input features in the model viewer by selecting them in the Display subdialog. The EVALUATIONFIELDS keyword is optional and its varlist can include fields (variables) in the dataset that are not used to create the cluster. Fields that are used to create clusters will be ignored. Fields with missing values are ignored.

TWOSTEP CLUSTER
  /CATEGORICAL VARIABLES=var1 var2 var3
  /CONTINUOUS VARIABLES=var4 var5
  /VIEWMODEL DISPLAY=YES EVALUATIONFIELDS=var1 var2 var8 var9

• The procedure creates a cluster model using var1, var2, var3 as categorical variables and var4 and var5 as continuous variables, and produces a model viewer with var8 and var9 available as evaluation fields.

Related Topics

TWOSTEP CLUSTER
Overview (TWOSTEP CLUSTER command)
Variable List (TWOSTEP CLUSTER command)
CATEGORICAL Subcommand (TWOSTEP CLUSTER command)
CONTINUOUS Subcommand (TWOSTEP CLUSTER command)
CRITERIA Subcommand (TWOSTEP CLUSTER command)
DISTANCE Subcommand (TWOSTEP CLUSTER command)
HANDLENOISE Subcommand (TWOSTEP CLUSTER command)
INFILE Subcommand (TWOSTEP CLUSTER command)
MEMALLOCATE Subcommand (TWOSTEP CLUSTER command)
MISSING Subcommand (TWOSTEP CLUSTER command)
NOSTANDARDIZE Subcommand (TWOSTEP CLUSTER command)
NUMCLUSTERS Subcommand (TWOSTEP CLUSTER command)
OUTFILE Subcommand (TWOSTEP CLUSTER command)
PRINT Subcommand (TWOSTEP CLUSTER command)
SAVE Subcommand (TWOSTEP CLUSTER command)


SAVE Subcommand (TWOSTEP CLUSTER command)

TWOSTEP CLUSTER (command),TWOSTEP CLUSTER (command),TWOSTEP CLUSTER (command)
SAVE subcommand,SAVE subcommand,SAVE subcommand
SAVE (subcommand),SAVE (subcommand),SAVE (subcommand)
TWOSTEP CLUSTER command,TWOSTEP CLUSTER command,TWOSTEP CLUSTER command

The SAVE subcommand allows you to save cluster output to the active dataset.

CLUSTER (keyword),CLUSTER (keyword),CLUSTER (keyword)
TWOSTEP CLUSTER command,TWOSTEP CLUSTER command,TWOSTEP CLUSTER command
CLUSTER Save the cluster identification. The cluster number for each case is saved; the user may specify a variable name using the VARIABLE keyword, otherwise, it is saved to TSC_n, where n is a positive integer indicating the ordinal of the SAVE operation completed by this procedure in a given session.

Related Topics

TWOSTEP CLUSTER
Overview (TWOSTEP CLUSTER command)
Variable List (TWOSTEP CLUSTER command)
CATEGORICAL Subcommand (TWOSTEP CLUSTER command)
CONTINUOUS Subcommand (TWOSTEP CLUSTER command)
CRITERIA Subcommand (TWOSTEP CLUSTER command)
DISTANCE Subcommand (TWOSTEP CLUSTER command)
HANDLENOISE Subcommand (TWOSTEP CLUSTER command)
INFILE Subcommand (TWOSTEP CLUSTER command)
MEMALLOCATE Subcommand (TWOSTEP CLUSTER command)
MISSING Subcommand (TWOSTEP CLUSTER command)
NOSTANDARDIZE Subcommand (TWOSTEP CLUSTER command)
NUMCLUSTERS Subcommand (TWOSTEP CLUSTER command)
OUTFILE Subcommand (TWOSTEP CLUSTER command)
PRINT Subcommand (TWOSTEP CLUSTER command)
VIEWMODEL Subcommand (TWOSTEP CLUSTER command)


UNIANOVA

GLM Univariate,GLM Univariate,GLM Univariate
command syntax,command syntax,command syntax
UNIANOVA (command),UNIANOVA (command),UNIANOVA (command)
univariate,univariate,univariate
UNIANOVA (command),UNIANOVA (command),UNIANOVA (command)

UNIANOVA is available in the Statistics Base option.

UNIANOVA dependent var [BY factor list [WITH covariate list]]

[/RANDOM=factor factor...]

[/REGWGT=varname]

[/METHOD=SSTYPE({1  })]
                {2  }
                {3**}
                {4  }

[/INTERCEPT=[INCLUDE**] [EXCLUDE]]

[/MISSING=[INCLUDE] [EXCLUDE**]]

[/CRITERIA=[EPS({1E-8**})][ALPHA({0.05**})]
                {a     }         {a     }

[/PRINT = [DESCRIPTIVE] [HOMOGENEITY] [PARAMETER][ETASQ]
          [GEF] [LOF] [OPOWER] [TEST(LMATRIX)]]

[/PLOT=[SPREADLEVEL] [RESIDUALS]
       [PROFILE (factor factor*factor factor*factor*factor ...)
                [WITH(covariate={value} [...])]]
                                {MEAN }

[/TEST=effect VS {linear combination [DF(df)]}]
                 {value DF (df)              }

[/LMATRIX={["label"] effect list effect list ...;...}]
          {["label"] effect list effect list ...    }
          {["label"] ALL list; ALL...               }
          {["label"] ALL list                       }

[/KMATRIX= {number    }]
           {number;...}

[/CONTRAST (factor name)={DEVIATION[(refcat)]**     }]
                         {SIMPLE [(refcat)]         }
                         {DIFFERENCE                }
                         {HELMERT                   }
                         {REPEATED                  }
                         {POLYNOMIAL  [({1,2,3...})]}
                                        {metric  }
                         {SPECIAL (matrix)          }

[/POSTHOC =effect [effect...]
          ([SNK] [TUKEY] [BTUKEY][DUNCAN]
           [SCHEFFE] [DUNNETT(refcat)] [DUNNETTL(refcat)]
           [DUNNETTR(refcat)] [BONFERRONI] [LSD] [SIDAK]
           [GT2] [GABRIEL] [FREGW] [QREGW]  [T2] [T3] [GH] [C]
           [WALLER ({100** })])]
                    {kratio}
           [VS effect]

[/EMMEANS=TABLES({OVERALL         }) [WITH(covariate={value} [...])]]
                 {factor          }                  {MEAN }
                 {factor*factor...}

          [COMPARE ADJ(LSD) (BONFERRONI) (SIDAK)]

 [/SAVE=[tempvar [(name)]] [tempvar [(name)]]...]

 [/OUTFILE=[{COVB ('savfile'|'dataset')}]
            {CORB ('savfile'|'dataset')}
           [EFFECT('savfile'|'dataset')] [DESIGN('savfile'|'dataset')]

 [/DESIGN={[INTERCEPT...]    }]
          {[effect effect...]}

** Default if the subcommand or keyword is omitted.

Temporary variables (tempvar) are:

PRED, WPRED, RESID, WRESID, DRESID, ZRESID, SRESID, SEPRED, COOK, LEVER

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

Syntax for the UNIANOVA command can be generated from the GLM Univariate Analysis dialog.

Release History Collapse Hide details

Release History

Release 17.0

• POSTHOC subcommand: T2, T3, GH, and C keywords are not valid when multiple factors in the model.

Example

UNIANOVA YIELD BY SEED FERT
  /DESIGN.

Related Topics

Overview (UNIANOVA command)
Example (UNIANOVA command)
UNIANOVA Variable List (UNIANOVA command)
RANDOM Subcommand (UNIANOVA command)
REGWGT Subcommand (UNIANOVA command)
METHOD Subcommand (UNIANOVA command)
INTERCEPT Subcommand (UNIANOVA command)
MISSING Subcommand (UNIANOVA command)
CRITERIA Subcommand (UNIANOVA command)
PRINT Subcommand (UNIANOVA command)
PLOT Subcommand (UNIANOVA command)
TEST Subcommand (UNIANOVA command)
LMATRIX Subcommand (UNIANOVA command)
KMATRIX Subcommand (UNIANOVA command)
CONTRAST Subcommand (UNIANOVA command)
POSTHOC Subcommand (UNIANOVA command)
EMMEANS Subcommand (UNIANOVA command)
SAVE Subcommand (UNIANOVA command)
OUTFILE Subcommand (UNIANOVA command)
DESIGN Subcommand (UNIANOVA command)


Overview (UNIANOVA command)

This section describes the use of UNIANOVA for univariate analyses. The UNIANOVA procedure provides regression analysis and analysis of variance for one dependent variable by one or more factors and/or variables.

Options Collapse Hide details

Options

Design Specification. You can specify which terms to include in the design on the DESIGN subcommand. This allows you to estimate a model other than the default full factorial model, incorporate factor-by-covariate interactions or covariate-by-covariate interactions, and indicate nesting of effects.

Contrast Types. You can specify contrasts other than the default deviation contrasts on the CONTRAST subcommand.

Optional Output. You can choose from a wide variety of optional output on the PRINT subcommand. Output appropriate to univariate designs includes descriptive statistics for each cell, parameter estimates, Levene’s test for equality of variance across cells, partial eta-squared for each effect and each parameter estimate, the general estimable function matrix, and a contrast coefficients table (L' matrix). The OUTFILE subcommand allows you to write out the covariance or correlation matrix, the design matrix, or the statistics from the between-subjects ANOVA table into a separate data file.

Using the EMMEANS subcommand, you can request tables of estimated marginal means of the dependent variable and their standard deviations. The SAVE subcommand allows you to save predicted values and residuals in weighted or unweighted and standardized or unstandardized forms. You can specify different means comparison tests for comparing all possible pairs of cell means using the POSTHOC subcommand. In addition, you can specify your own hypothesis tests by specifying an L matrix and a K matrix to test the univariate hypothesis LB = K.

Basic Specification Collapse Hide details

Basic Specification

• The basic specification is a variable list identifying the dependent variable, the factors (if any), and the covariates (if any).

• By default, UNIANOVA uses a model that includes the intercept term, the covariate (if any), and the full factorial model, which includes all main effects and all possible interactions among factors. The intercept term is excluded if it is excluded in the model by specifying the keyword EXCLUDE on the INTERCEPT subcommand. Sums of squares are calculated and hypothesis tests are performed using type-specific estimable functions. Parameters are estimated using the normal equation and a generalized inverse of the SSCP matrix.

Subcommand Order Collapse Hide details

Subcommand Order

• The variable list must be specified first.

• Subcommands can be used in any order.

Syntax Rules Collapse Hide details

Syntax Rules

• For many analyses, the UNIANOVA variable list and the DESIGN subcommand are the only specifications needed.

• If you do not enter a DESIGN subcommand, UNIANOVA will use a full factorial model, with main effects of covariates, if any.

• At least one dependent variable must be specified, and at least one of the following must be specified: INTERCEPT, a factor, or a covariate. The design contains the intercept by default.

• If more than one DESIGN subcommand is specified, only the last one is in effect.

• Dependent variables and covariates must be numeric, but factors can be numeric or string variables.

• If a string variable is specified as a factor, only the first eight characters of each value are used in distinguishing among values.

• If more than one MISSING subcommand is specified, only the last one is in effect.

• The following words are reserved as keywords or internal commands in the UNIANOVA procedure:

INTERCEPT, BY, WITH, ALL, OVERALL, WITHIN

Variable names that duplicate these words should be changed before you run UNIANOVA.

Limitations Collapse Hide details

Limitations

• Any number of factors can be specified, but if the number of factors plus the number of split variables exceeds 18, the Descriptive Statistics table is not printed even when you request it.

• Memory requirements depend primarily on the number of cells in the design. For the default full factorial model, this equals the product of the number of levels or categories in each factor.

Related Topics

UNIANOVA
Example (UNIANOVA command)
UNIANOVA Variable List (UNIANOVA command)
RANDOM Subcommand (UNIANOVA command)
REGWGT Subcommand (UNIANOVA command)
METHOD Subcommand (UNIANOVA command)
INTERCEPT Subcommand (UNIANOVA command)
MISSING Subcommand (UNIANOVA command)
CRITERIA Subcommand (UNIANOVA command)
PRINT Subcommand (UNIANOVA command)
PLOT Subcommand (UNIANOVA command)
TEST Subcommand (UNIANOVA command)
LMATRIX Subcommand (UNIANOVA command)
KMATRIX Subcommand (UNIANOVA command)
CONTRAST Subcommand (UNIANOVA command)
POSTHOC Subcommand (UNIANOVA command)
EMMEANS Subcommand (UNIANOVA command)
SAVE Subcommand (UNIANOVA command)
OUTFILE Subcommand (UNIANOVA command)
DESIGN Subcommand (UNIANOVA command)


Example (UNIANOVA command)

UNIANOVA YIELD BY SEED FERT WITH RAINFALL
  /PRINT=DESCRIPTIVE PARAMETER
  /DESIGN.

• YIELD is the dependent variable; SEED and FERT are factors; RAINFALL is a covariate.

• The PRINT subcommand requests the descriptive statistics for the dependent variable for each cell and the parameter estimates, in addition to the default tables Between-Subjects Factors and Univariate Tests.

• The DESIGN subcommand requests the default design, a full factorial model with a covariate. This subcommand could have been omitted or could have been specified in full as

/DESIGN = INTERCEPT RAINFALL, SEED, FERT, SEED BY FERT.

Two-Factor analysis of variance

UNIANOVA amtspent BY gender style
  /METHOD=SSTYPE(3)
  /INTERCEPT=INCLUDE
  /POSTHOC=style(TUKEY)
  /PLOT=PROFILE(style*gender)
  /EMMEANS = TABLES(gender*style)
  /PRINT=ETASQ HOMOGENEITY DESCRIPTIVE
  /PLOT=SPREADLEVEL
  /CRITERIA=ALPHA(.05)
  /DESIGN=gender style gender*style.

• The procedure specifies amtspent as the target variable and gender and style as factors.

• POSTHOC requests Tukey tests for style.

• The two PLOT subcommands request a profile plot for style*gender and a spread vs. level plot.

• EMMEANS requests estimated marginal means for gender*style

• PRINT requests descriptive statistics, estimates of effect size, and homogeneity tests.

• DESIGN specifies gender, style, and gender*style as effects in the model.

• All other options are set to their default values.

For discussion of output from this syntax and to place the example in context, see Using GLM Univariate to Perform a Two-Factor Analysis of Variance.

Analysis of covariance

UNIANOVA
  incaft  BY prog  WITH incbef
  /METHOD = SSTYPE(3)
  /INTERCEPT = INCLUDE
  /PRINT = DESCRIPTIVE ETASQ PARAMETER HOMOGENEITY
  /PLOT = SPREADLEVEL
  /CRITERIA = ALPHA(.05)
  /DESIGN = incbef prog .

• The procedure specifies incaft as the target variable, prog as a factor, and incbef as a covariate.

• PRINT requests descriptive statistics, estimates of effect size, parameter estimates, and homogeneity tests.

• PLOT requests a spread vs. level plot.

• DESIGN specifies incbef and prog as effects in the model.

• All other options are set to their default values.

For discussion of output from this syntax and to place the example in context, see Using GLM Univariate to Perform an Analysis of Covariance .

Random effects

UNIANOVA
  amtspent  BY usecoup shopfor storeid
  /RANDOM = storeid
  /METHOD = SSTYPE(3)
  /INTERCEPT = INCLUDE
  /PRINT = ETASQ
  /CRITERIA = ALPHA(.05)
  /DESIGN = usecoup shopfor shopfor*usecoup storeid .

• The procedure specifies amtspent as the target variable and usecoup, shopfor, and storeid as factors.

• RANDOM specifies that storeid is a random effect.

• PRINT requests estimates of effect size.

• DESIGN specifies usecoup, shopfor, shopfor*usecoup, and storeid as effects in the model.

• All other options are set to their default values.

For discussion of output from this syntax and to place the example in context, see Using GLM Univariate to Account for Random Effects .

Related Topics

UNIANOVA
Overview (UNIANOVA command)
UNIANOVA Variable List (UNIANOVA command)
RANDOM Subcommand (UNIANOVA command)
REGWGT Subcommand (UNIANOVA command)
METHOD Subcommand (UNIANOVA command)
INTERCEPT Subcommand (UNIANOVA command)
MISSING Subcommand (UNIANOVA command)
CRITERIA Subcommand (UNIANOVA command)
PRINT Subcommand (UNIANOVA command)
PLOT Subcommand (UNIANOVA command)
TEST Subcommand (UNIANOVA command)
LMATRIX Subcommand (UNIANOVA command)
KMATRIX Subcommand (UNIANOVA command)
CONTRAST Subcommand (UNIANOVA command)
POSTHOC Subcommand (UNIANOVA command)
EMMEANS Subcommand (UNIANOVA command)
SAVE Subcommand (UNIANOVA command)
OUTFILE Subcommand (UNIANOVA command)
DESIGN Subcommand (UNIANOVA command)


UNIANOVA Variable List (UNIANOVA command)

The variable list specifies the dependent variable, the factors, and the covariates in the model.

• The dependent variable must be the first specification on UNIANOVA.

• The names of the factors follow the dependent variable. Use the keyword BY to separate the factors from the dependent variable.

• Enter the covariates, if any, following the factors. Use the keyword WITH to separate covariates from factors (if any) and the dependent variable.

Example

UNIANOVA DEPENDNT BY FACTOR1 FACTOR2, FACTOR3.

• In this example, three factors are specified.

• A default full factorial model is used for the analysis.

Example

UNIANOVA Y BY A WITH X
  /DESIGN.

• In this example, the DESIGN subcommand requests the default design, which includes the intercept term, the covariate X, and the factor A.

Related Topics

UNIANOVA
Overview (UNIANOVA command)
Example (UNIANOVA command)
RANDOM Subcommand (UNIANOVA command)
REGWGT Subcommand (UNIANOVA command)
METHOD Subcommand (UNIANOVA command)
INTERCEPT Subcommand (UNIANOVA command)
MISSING Subcommand (UNIANOVA command)
CRITERIA Subcommand (UNIANOVA command)
PRINT Subcommand (UNIANOVA command)
PLOT Subcommand (UNIANOVA command)
TEST Subcommand (UNIANOVA command)
LMATRIX Subcommand (UNIANOVA command)
KMATRIX Subcommand (UNIANOVA command)
CONTRAST Subcommand (UNIANOVA command)
POSTHOC Subcommand (UNIANOVA command)
EMMEANS Subcommand (UNIANOVA command)
SAVE Subcommand (UNIANOVA command)
OUTFILE Subcommand (UNIANOVA command)
DESIGN Subcommand (UNIANOVA command)


RANDOM Subcommand (UNIANOVA command)

RANDOM (subcommand),RANDOM (subcommand),RANDOM (subcommand)
UNIANOVA command,UNIANOVA command,UNIANOVA command
UNIANOVA (command),UNIANOVA (command),UNIANOVA (command)
RANDOM subcommand,RANDOM subcommand,RANDOM subcommand
random effects,random effects,random effects
effects,effects,effects
random,random,random

RANDOM allows you to specify which effects in your design are random. When the RANDOM subcommand is used, a table of expected mean squares for all effects in the design is displayed, and an appropriate error term for testing each effect is calculated and used automatically.

• Random always implies a univariate mixed-model analysis.

• If you specify an effect on RANDOM, higher-order effects containing the specified effect (excluding any effects containing covariates) are automatically treated as random effects.

• The keyword INTERCEPT and effects containing covariates are not allowed on this subcommand.

• When the RANDOM subcommand is used, the appropriate error terms for the hypothesis testing of all effects in the model are automatically computed and used.

• More than one RANDOM subcommand is allowed. The specifications are accumulated.

Example

UNIANOVA DEP BY A B
  /RANDOM = B
  /DESIGN = A,B, A*B.

• In the example, effects B and A*B are considered as random effects. Notice that if only effect B is specified in the RANDOM subcommand, A*B is automatically considered as a random effect.

• The hypothesis testing for each effect (A, B, and A*B) in the design will be carried out using the appropriate error term, which is calculated automatically.

Related Topics

UNIANOVA
Overview (UNIANOVA command)
Example (UNIANOVA command)
UNIANOVA Variable List (UNIANOVA command)
REGWGT Subcommand (UNIANOVA command)
METHOD Subcommand (UNIANOVA command)
INTERCEPT Subcommand (UNIANOVA command)
MISSING Subcommand (UNIANOVA command)
CRITERIA Subcommand (UNIANOVA command)
PRINT Subcommand (UNIANOVA command)
PLOT Subcommand (UNIANOVA command)
TEST Subcommand (UNIANOVA command)
LMATRIX Subcommand (UNIANOVA command)
KMATRIX Subcommand (UNIANOVA command)
CONTRAST Subcommand (UNIANOVA command)
POSTHOC Subcommand (UNIANOVA command)
EMMEANS Subcommand (UNIANOVA command)
SAVE Subcommand (UNIANOVA command)
OUTFILE Subcommand (UNIANOVA command)
DESIGN Subcommand (UNIANOVA command)


REGWGT Subcommand (UNIANOVA command)

REGWGT (subcommand),REGWGT (subcommand),REGWGT (subcommand)
UNIANOVA command,UNIANOVA command,UNIANOVA command
UNIANOVA (command),UNIANOVA (command),UNIANOVA (command)
REGWGT subcommand,REGWGT subcommand,REGWGT subcommand

The only specification on REGWGT is the name of the variable containing the weights to be used in estimating a weighted least-squares model.

• Specify a numeric weight variable name following the REGWGT subcommand. Only observations with positive values in the weight variable will be used in the analysis.

• If more than one REGWGT subcommand is specified, only the last one is in effect.

Example

UNIANOVA OUTCOME BY TREATMNT
  /REGWGT WT.

• The procedure performs a weighted least-squares analysis. The variable WT is used as the weight variable.

Related Topics

UNIANOVA
Overview (UNIANOVA command)
Example (UNIANOVA command)
UNIANOVA Variable List (UNIANOVA command)
RANDOM Subcommand (UNIANOVA command)
METHOD Subcommand (UNIANOVA command)
INTERCEPT Subcommand (UNIANOVA command)
MISSING Subcommand (UNIANOVA command)
CRITERIA Subcommand (UNIANOVA command)
PRINT Subcommand (UNIANOVA command)
PLOT Subcommand (UNIANOVA command)
TEST Subcommand (UNIANOVA command)
LMATRIX Subcommand (UNIANOVA command)
KMATRIX Subcommand (UNIANOVA command)
CONTRAST Subcommand (UNIANOVA command)
POSTHOC Subcommand (UNIANOVA command)
EMMEANS Subcommand (UNIANOVA command)
SAVE Subcommand (UNIANOVA command)
OUTFILE Subcommand (UNIANOVA command)
DESIGN Subcommand (UNIANOVA command)


METHOD Subcommand (UNIANOVA command)

METHOD (subcommand),METHOD (subcommand),METHOD (subcommand)
UNIANOVA command,UNIANOVA command,UNIANOVA command
UNIANOVA (command),UNIANOVA (command),UNIANOVA (command)
METHOD subcommand,METHOD subcommand,METHOD subcommand

METHOD controls the computational aspects of the UNIANOVA analysis. You can specify one of four different methods for partitioning the sums of squares. If more than one METHOD subcommand is specified, only the last one is in effect.

SSTYPE (keyword),SSTYPE (keyword),SSTYPE (keyword)
UNIANOVA command,UNIANOVA command,UNIANOVA command
sum of squares,sum of squares,sum of squares
Type I,Type I,Type I
UNIANOVA (command),UNIANOVA (command),UNIANOVA (command)
Type I sum-of-squares method,Type I sum-of-squares method,Type I sum-of-squares method
sum of squares,sum of squares,sum of squares
Type II,Type II,Type II
UNIANOVA (command),UNIANOVA (command),UNIANOVA (command)
Type II sum-of-squares method,Type II sum-of-squares method,Type II sum-of-squares method
contained effects,contained effects,contained effects
UNIANOVA command,UNIANOVA command,UNIANOVA command
UNIANOVA (command),UNIANOVA (command),UNIANOVA (command)
contained effects,contained effects,contained effects
sum of squares,sum of squares,sum of squares
Type III,Type III,Type III
UNIANOVA (command),UNIANOVA (command),UNIANOVA (command)
Type III sum-of-squares method,Type III sum-of-squares method,Type III sum-of-squares method
sum of squares,sum of squares,sum of squares
Type IV,Type IV,Type IV
UNIANOVA (command),UNIANOVA (command),UNIANOVA (command)
Type IV sum-of-squares method,Type IV sum-of-squares method,Type IV sum-of-squares method
SSTYPE(1) | Type I sum-of-squares method. The Type I sum-of-squares method is also known as the hierarchical decomposition of the sum-of-squares method. Each term is adjusted only for the terms that precede it on the DESIGN subcommand. Under a balanced design, it is an orthogonal decomposition, and the sums of squares in the model add up to the total sum of squares.
SSTYPE(2) | Type II sum-of-squares method. This method calculates the sum of squares of an effect in the model adjusted for all other “appropriate” effects. An appropriate effect is one that corresponds to all effects that do not contain the effect being examined.
 | For any two effects F1 and F2 in the model, F1 is said to be contained in F2 under the following three conditions: 1) both effects F1 and F2 have the same covariate, if any, 2) F2 consists of more factors than F1, and 3) all factors in F1 also appear in F2. The intercept effect is treated as contained in all of the pure factor effects. However, it is not contained in any effect involving a covariate. No effect is contained in the intercept effect. Thus, for any one effect F of interest, all other effects in the model can be classified as in one of the following two groups: the effects that do not contain F or the effects that contain F.
 | If the model is a main-effects design (that is, only main effects are in the model), the Type II sum-of-squares method is equivalent to the regression approach sums of squares. This means that each main effect is adjusted for every other term in the model.
SSTYPE(3) | Type III sum-of-squares method. This is the default. This method calculates the sum of squares of an effect F in the design as the sum of squares adjusted for any other effects that do not contain it, and orthogonal to any effects (if any) that contain it. The Type III sums of squares have one major advantage—they are invariant with respect to the cell frequencies as long as the general form of estimability remains constant. Hence, this type of sums of squares is often used for an unbalanced model with no missing cells. In a factorial design with no missing cells, this method is equivalent to the Yates’ weighted squares of means technique, and it also coincides with the overparameterized ∑-restricted model.
SSTYPE(4) | Type IV sum-of-squares method. This method is designed for a situation in which there are missing cells. For any effect F in the design, if F is not contained in any other effect, then Type IV = Type III = Type II. When F is contained in other effects, then Type IV distributes the contrasts being made among the parameters in F to all higher-level effects equitably.

Example

UNIANOVA DEP BY A B C
  /METHOD=SSTYPE(3)
  /DESIGN=A, B, C.

• The design is a main-effects model.

• The METHOD subcommand requests that the model be fitted with Type III sums of squares.

Related Topics

UNIANOVA
Overview (UNIANOVA command)
Example (UNIANOVA command)
UNIANOVA Variable List (UNIANOVA command)
RANDOM Subcommand (UNIANOVA command)
REGWGT Subcommand (UNIANOVA command)
INTERCEPT Subcommand (UNIANOVA command)
MISSING Subcommand (UNIANOVA command)
CRITERIA Subcommand (UNIANOVA command)
PRINT Subcommand (UNIANOVA command)
PLOT Subcommand (UNIANOVA command)
TEST Subcommand (UNIANOVA command)
LMATRIX Subcommand (UNIANOVA command)
KMATRIX Subcommand (UNIANOVA command)
CONTRAST Subcommand (UNIANOVA command)
POSTHOC Subcommand (UNIANOVA command)
EMMEANS Subcommand (UNIANOVA command)
SAVE Subcommand (UNIANOVA command)
OUTFILE Subcommand (UNIANOVA command)
DESIGN Subcommand (UNIANOVA command)


INTERCEPT Subcommand (UNIANOVA command)

INTERCEPT (subcommand),INTERCEPT (subcommand),INTERCEPT (subcommand)
UNIANOVA command,UNIANOVA command,UNIANOVA command
UNIANOVA (command),UNIANOVA (command),UNIANOVA (command)
INTERCEPT subcommand,INTERCEPT subcommand,INTERCEPT subcommand
intercept,intercept,intercept
include or exclude,include or exclude,include or exclude

INTERCEPT controls whether an intercept term is included in the model. If more than one INTERCEPT subcommand is specified, only the last one is in effect.

INCLUDE (keyword),INCLUDE (keyword),INCLUDE (keyword)
UNIANOVA command,UNIANOVA command,UNIANOVA command
EXCLUDE (keyword),EXCLUDE (keyword),EXCLUDE (keyword)
UNIANOVA command,UNIANOVA command,UNIANOVA command
INCLUDE | Include the intercept term. The intercept (constant) term is included in the model. This is the default.
EXCLUDE | Exclude the intercept term. The intercept term is excluded from the model. Specification of the keyword INTERCEPT on the DESIGN subcommand overrides INTERCEPT = EXCLUDE.

Related Topics

UNIANOVA
Overview (UNIANOVA command)
Example (UNIANOVA command)
UNIANOVA Variable List (UNIANOVA command)
RANDOM Subcommand (UNIANOVA command)
REGWGT Subcommand (UNIANOVA command)
METHOD Subcommand (UNIANOVA command)
MISSING Subcommand (UNIANOVA command)
CRITERIA Subcommand (UNIANOVA command)
PRINT Subcommand (UNIANOVA command)
PLOT Subcommand (UNIANOVA command)
TEST Subcommand (UNIANOVA command)
LMATRIX Subcommand (UNIANOVA command)
KMATRIX Subcommand (UNIANOVA command)
CONTRAST Subcommand (UNIANOVA command)
POSTHOC Subcommand (UNIANOVA command)
EMMEANS Subcommand (UNIANOVA command)
SAVE Subcommand (UNIANOVA command)
OUTFILE Subcommand (UNIANOVA command)
DESIGN Subcommand (UNIANOVA command)


MISSING Subcommand (UNIANOVA command)

MISSING (subcommand),MISSING (subcommand),MISSING (subcommand)
UNIANOVA command,UNIANOVA command,UNIANOVA command
UNIANOVA (command),UNIANOVA (command),UNIANOVA (command)
MISSING subcommand,MISSING subcommand,MISSING subcommand

By default, cases with missing values for any of the variables on the UNIANOVA variable list are excluded from the analysis. The MISSING subcommand allows you to include cases with user-missing values.

• If MISSING is not specified, the default is EXCLUDE.

• Pairwise deletion of missing data is not available in UNIANOVA.

• Keywords INCLUDE and EXCLUDE are mutually exclusive.

• If more than one MISSING subcommand is specified, only the last one is in effect.

EXCLUDE (keyword),EXCLUDE (keyword),EXCLUDE (keyword)
UNIANOVA command,UNIANOVA command,UNIANOVA command
INCLUDE (keyword),INCLUDE (keyword),INCLUDE (keyword)
UNIANOVA command,UNIANOVA command,UNIANOVA command
EXCLUDE | Exclude both user-missing and system-missing values. This is the default when MISSING is not specified.
INCLUDE | User-missing values are treated as valid. System-missing values cannot be included in the analysis.

Related Topics

UNIANOVA
Overview (UNIANOVA command)
Example (UNIANOVA command)
UNIANOVA Variable List (UNIANOVA command)
RANDOM Subcommand (UNIANOVA command)
REGWGT Subcommand (UNIANOVA command)
METHOD Subcommand (UNIANOVA command)
INTERCEPT Subcommand (UNIANOVA command)
CRITERIA Subcommand (UNIANOVA command)
PRINT Subcommand (UNIANOVA command)
PLOT Subcommand (UNIANOVA command)
TEST Subcommand (UNIANOVA command)
LMATRIX Subcommand (UNIANOVA command)
KMATRIX Subcommand (UNIANOVA command)
CONTRAST Subcommand (UNIANOVA command)
POSTHOC Subcommand (UNIANOVA command)
EMMEANS Subcommand (UNIANOVA command)
SAVE Subcommand (UNIANOVA command)
OUTFILE Subcommand (UNIANOVA command)
DESIGN Subcommand (UNIANOVA command)


CRITERIA Subcommand (UNIANOVA command)

CRITERIA (subcommand),CRITERIA (subcommand),CRITERIA (subcommand)
UNIANOVA command,UNIANOVA command,UNIANOVA command
UNIANOVA (command),UNIANOVA (command),UNIANOVA (command)
CRITERIA subcommand,CRITERIA subcommand,CRITERIA subcommand

CRITERIA controls the statistical criteria used to build the models.

• More than one CRITERIA subcommand is allowed. The specifications are accumulated. Conflicts across CRITERIA subcommands are resolved using the conflicting specification given on the last CRITERIA subcommand.

• The keyword must be followed by a positive number in parentheses.

EPS (keyword),EPS (keyword),EPS (keyword)
UNIANOVA command,UNIANOVA command,UNIANOVA command
tolerance level,tolerance level,tolerance level
UNIANOVA command,UNIANOVA command,UNIANOVA command
ALPHA (keyword),ALPHA (keyword),ALPHA (keyword)
UNIANOVA command,UNIANOVA command,UNIANOVA command
alpha level,alpha level,alpha level
UNIANOVA command,UNIANOVA command,UNIANOVA command
power,power,power
UNIANOVA command,UNIANOVA command,UNIANOVA command
alternative hypothesis,alternative hypothesis,alternative hypothesis
UNIANOVA command,UNIANOVA command,UNIANOVA command
confidence intervals,confidence intervals,confidence intervals
UNIANOVA command,UNIANOVA command,UNIANOVA command
EPS(n) | The tolerance level in redundancy detection. This value is used for redundancy checking in the design matrix. The default value is 1E–8.
ALPHA(n) | The alpha level. This keyword has two functions. First, it gives the alpha level at which the power is calculated for the F test. Once the noncentrality parameter for the alternative hypothesis is estimated from the data, then the power is the probability that the test statistic is greater than the critical value under the alternative hypothesis. The second function of alpha is to specify the level of the confidence interval. If the alpha level specified is n, the value (1−n)×100 indicates the level of confidence for all individual and simultaneous confidence intervals generated for the specified model. The value of n must be between 0 and 1, exclusive. The default value of alpha is 0.05. This means that the default power calculation is at the 0.05 level, and the default level of the confidence intervals is 95%, since (1−0.05)×100=95.

Related Topics

UNIANOVA
Overview (UNIANOVA command)
Example (UNIANOVA command)
UNIANOVA Variable List (UNIANOVA command)
RANDOM Subcommand (UNIANOVA command)
REGWGT Subcommand (UNIANOVA command)
METHOD Subcommand (UNIANOVA command)
INTERCEPT Subcommand (UNIANOVA command)
MISSING Subcommand (UNIANOVA command)
PRINT Subcommand (UNIANOVA command)
PLOT Subcommand (UNIANOVA command)
TEST Subcommand (UNIANOVA command)
LMATRIX Subcommand (UNIANOVA command)
KMATRIX Subcommand (UNIANOVA command)
CONTRAST Subcommand (UNIANOVA command)
POSTHOC Subcommand (UNIANOVA command)
EMMEANS Subcommand (UNIANOVA command)
SAVE Subcommand (UNIANOVA command)
OUTFILE Subcommand (UNIANOVA command)
DESIGN Subcommand (UNIANOVA command)


PRINT Subcommand (UNIANOVA command)

PRINT (subcommand),PRINT (subcommand),PRINT (subcommand)
UNIANOVA command,UNIANOVA command,UNIANOVA command
UNIANOVA (command),UNIANOVA (command),UNIANOVA (command)
PRINT subcommand,PRINT subcommand,PRINT subcommand

PRINT controls the display of optional output.

• Some PRINT output applies to the entire UNIANOVA procedure and is displayed only once.

• Additional output can be obtained on the EMMEANS, PLOT, and SAVE subcommands.

• Some optional output may greatly increase the processing time. Request only the output you want to see.

• If no PRINT command is specified, default output for a univariate analysis includes a factor information table and a Univariate Tests table (ANOVA) for all effects in the model.

• If more than one PRINT subcommand is specified, only the last one is in effect.

The following keywords are available for UNIANOVA univariate analyses.

DESCRIPTIVES (keyword),DESCRIPTIVES (keyword),DESCRIPTIVES (keyword)
UNIANOVA command,UNIANOVA command,UNIANOVA command
HOMOGENEITY (keyword),HOMOGENEITY (keyword),HOMOGENEITY (keyword)
UNIANOVA command,UNIANOVA command,UNIANOVA command
homogeneity of variance,homogeneity of variance,homogeneity of variance
UNIANOVA command,UNIANOVA command,UNIANOVA command
Levene test,Levene test,Levene test
UNIANOVA command,UNIANOVA command,UNIANOVA command
PARAMETER (keyword),PARAMETER (keyword),PARAMETER (keyword)
UNIANOVA command,UNIANOVA command,UNIANOVA command
parameter estimates,parameter estimates,parameter estimates
UNIANOVA command,UNIANOVA command,UNIANOVA command
OPOWER (keyword),OPOWER (keyword),OPOWER (keyword)
UNIANOVA command,UNIANOVA command,UNIANOVA command
observed power,observed power,observed power
UNIANOVA command,UNIANOVA command,UNIANOVA command
LOF (keyword),LOF (keyword),LOF (keyword)
UNIANOVA command,UNIANOVA command,UNIANOVA command
lack of fit,lack of fit,lack of fit
UNIANOVA command,UNIANOVA command,UNIANOVA command
ETASQ (keyword),ETASQ (keyword),ETASQ (keyword)
UNIANOVA command,UNIANOVA command,UNIANOVA command
partial eta-squared,partial eta-squared,partial eta-squared
UNIANOVA command,UNIANOVA command,UNIANOVA command
EFSIZE (keyword),EFSIZE (keyword),EFSIZE (keyword)
UNIANOVA command,UNIANOVA command,UNIANOVA command
GEF (keyword),GEF (keyword),GEF (keyword)
UNIANOVA command,UNIANOVA command,UNIANOVA command
general estimable function,general estimable function,general estimable function
UNIANOVA command,UNIANOVA command,UNIANOVA command
estimable functions,estimable functions,estimable functions
UNIANOVA command,UNIANOVA command,UNIANOVA command
TEST(LMATRIX) (keyword),TEST(LMATRIX) (keyword),TEST(LMATRIX) (keyword)
UNIANOVA command,UNIANOVA command,UNIANOVA command
contrast coefficients,contrast coefficients,contrast coefficients
UNIANOVA command,UNIANOVA command,UNIANOVA command
L matrix,L matrix,L matrix
UNIANOVA command,UNIANOVA command,UNIANOVA command
TEST(ESTIMABLE) (keyword),TEST(ESTIMABLE) (keyword),TEST(ESTIMABLE) (keyword)
UNIANOVA command,UNIANOVA command,UNIANOVA command
DESCRIPTIVES | Basic information about each cell in the design. Observed means, standard deviations, and counts for the dependent variable in all cells. The cells are constructed from the highest-order crossing of the factors. If the number of factors plus the number of split variables exceeds 18, the Descriptive Statistics table is not printed.
HOMOGENEITY | Tests of homogeneity of variance. Levene’s test for equality of variances for the dependent variable across all level combinations of the factors. If there are no factors, this keyword is not valid.
PARAMETER | Parameter estimates. Parameter estimates, standard errors, t tests, and confidence intervals for each test.
OPOWER | Observed power. The observed power for each test.
LOF | Lack of fit. Lack of fit test that allows you to determine if the current model adequately accounts for the relationship between the response variable and the predictors.
ETASQ | Partial eta-squared (η2). This value is an overestimate of the actual effect size in an F test. It is defined as η2=dfh×Fdfh×F+dfe where F is the test statistic and dfh and dfe are its degrees of freedom and degrees of freedom for error. The keyword EFSIZE can be used in place of ETASQ.
GEF | General estimable function table. This table shows the general form of the estimable functions.
TEST(LMATRIX) | Set of contrast coefficients (L) matrices. The transpose of the L matrix (L') is displayed. This set always includes one matrix displaying the estimable function for each effect appearing or implied in the DESIGN subcommand. Also, any L matrices generated by the LMATRIX or CONTRAST subcommands are displayed. TEST(ESTIMABLE) can be used in place of TEST(LMATRIX).

Example

UNIANOVA DEP BY A B WITH COV
  /PRINT=DESCRIPTIVE, TEST(LMATRIX), PARAMETER
  /DESIGN.

• Since the design in the DESIGN subcommand is not specified, the default design is used. In this case, the design includes the intercept term, the covariate COV, and the full factorial terms of A and B, which are A, B, and A*B.

• For each combination of levels of A and B, the descriptive statistics of DEP are displayed.

• The set of L matrices that generates the sums of squares for testing each effect in the design is displayed.

• The parameter estimates, their standard errors, t tests, confidence intervals, and the observed power for each test are displayed.

Related Topics

UNIANOVA
Overview (UNIANOVA command)
Example (UNIANOVA command)
UNIANOVA Variable List (UNIANOVA command)
RANDOM Subcommand (UNIANOVA command)
REGWGT Subcommand (UNIANOVA command)
METHOD Subcommand (UNIANOVA command)
INTERCEPT Subcommand (UNIANOVA command)
MISSING Subcommand (UNIANOVA command)
CRITERIA Subcommand (UNIANOVA command)
PLOT Subcommand (UNIANOVA command)
TEST Subcommand (UNIANOVA command)
LMATRIX Subcommand (UNIANOVA command)
KMATRIX Subcommand (UNIANOVA command)
CONTRAST Subcommand (UNIANOVA command)
POSTHOC Subcommand (UNIANOVA command)
EMMEANS Subcommand (UNIANOVA command)
SAVE Subcommand (UNIANOVA command)
OUTFILE Subcommand (UNIANOVA command)
DESIGN Subcommand (UNIANOVA command)


PLOT Subcommand (UNIANOVA command)

PLOT (subcommand),PLOT (subcommand),PLOT (subcommand)
UNIANOVA command,UNIANOVA command,UNIANOVA command
UNIANOVA (command),UNIANOVA (command),UNIANOVA (command)
PLOT subcommand,PLOT subcommand,PLOT subcommand

PLOT provides a variety of plots useful in checking the assumptions needed in the analysis. The PLOT subcommand can be specified more than once. All of the plots requested on each PLOT subcommand are produced.

Use the following keywords on the PLOT subcommand to request plots:

SPREADLEVEL (keyword),SPREADLEVEL (keyword),SPREADLEVEL (keyword)
UNIANOVA command,UNIANOVA command,UNIANOVA command
spread-versus-level plots,spread-versus-level plots,spread-versus-level plots
UNIANOVA command,UNIANOVA command,UNIANOVA command
RESIDUALS (keyword),RESIDUALS (keyword),RESIDUALS (keyword)
UNIANOVA command,UNIANOVA command,UNIANOVA command
residual plots,residual plots,residual plots
UNIANOVA command,UNIANOVA command,UNIANOVA command
PROFILE (keyword),PROFILE (keyword),PROFILE (keyword)
UNIANOVA command,UNIANOVA command,UNIANOVA command
profile plots,profile plots,profile plots
UNIANOVA command,UNIANOVA command,UNIANOVA command
estimated means plots,estimated means plots,estimated means plots
UNIANOVA command,UNIANOVA command,UNIANOVA command
SPREADLEVEL | Spread-versus-level plots. Plots of observed cell means versus standard deviations, and versus variances.
RESIDUALS | Observed by predicted by standardized residuals plot. A plot is produced for each dependent variable. In a univariate analysis, a plot is produced for the single dependent variable.
PROFILE | Line plots of dependent variable means for one-way, two-way, or three-way crossed factors. The PROFILE keyword must be followed by parentheses containing a list of one or more factor combinations. All factors specified (either individual or crossed) must be made up of only valid factors on the factor list. Factor combinations on the PROFILE keyword may use an asterisk (*) or the keyword BY to specify crossed factors. A factor cannot occur in a single factor combination more than once.
 | The order of factors in a factor combination is important, and there is no restriction on the order of factors. If a single factor is specified after the PROFILE keyword, a line plot of estimated means at each level of the factor is produced. If a two-way crossed factor combination is specified, the output includes a multiple-line plot of estimated means at each level of the first specified factor, with a separate line drawn for each level of the second specified factor. If a three-way crossed factor combination is specified, the output includes multiple-line plots of estimated means at each level of the first specified factor, with separate lines for each level of the second factor, and separate plots for each level of the third factor.
 | The PROFILE keyword may be followed by the WITH keyword and a parenthesized list of covariates and values. Plots are produced with the values of the covariates fixed at the specified values. The keyword MEAN causes the covariate to be fixed at its observed mean value.

Example

UNIANOVA DEP BY A B
  /PLOT = SPREADLEVEL PROFILE(A A*B A*B*C) WITH(X=1.0)
  /DESIGN.

Assume each of the factors A, B, and C has three levels.

• Spread-versus-level plots are produced showing observed cell means versus standard deviations and observed cell means versus variances.

• Five profile plots are produced. For factor A, a line plot of estimated means at each level of A is produced (one plot). For the two-way crossed factor combination A*B, a multiple-line plot of estimated means at each level of A, with a separate line for each level of B, is produced (one plot). For the three-way crossed factor combination A*B*C, a multiple-line plot of estimated means at each level of A, with a separate line for each level of B, is produced for each of the three levels of C (three plots). Plots are produced with the value of the covariate X fixed at 1.0.

Related Topics

UNIANOVA
Overview (UNIANOVA command)
Example (UNIANOVA command)
UNIANOVA Variable List (UNIANOVA command)
RANDOM Subcommand (UNIANOVA command)
REGWGT Subcommand (UNIANOVA command)
METHOD Subcommand (UNIANOVA command)
INTERCEPT Subcommand (UNIANOVA command)
MISSING Subcommand (UNIANOVA command)
CRITERIA Subcommand (UNIANOVA command)
PRINT Subcommand (UNIANOVA command)
TEST Subcommand (UNIANOVA command)
LMATRIX Subcommand (UNIANOVA command)
KMATRIX Subcommand (UNIANOVA command)
CONTRAST Subcommand (UNIANOVA command)
POSTHOC Subcommand (UNIANOVA command)
EMMEANS Subcommand (UNIANOVA command)
SAVE Subcommand (UNIANOVA command)
OUTFILE Subcommand (UNIANOVA command)
DESIGN Subcommand (UNIANOVA command)


TEST Subcommand (UNIANOVA command)

The TEST subcommand allows you to test a hypothesis term against a specified error term.

• TEST is valid only for univariate analyses. Multiple TEST subcommands are allowed, each executed independently.

• You must specify both the hypothesis term and the error term. There is no default.

• The hypothesis term is specified before the keyword VS. It must be a valid effect specified or implied on the DESIGN subcommand.

• The error term is specified after the keyword VS. You can specify either a linear combination or a value. The linear combination of effects takes the general form: coefficient*effect +/– coefficient*effect ....

• All effects in the linear combination must be specified or implied on the DESIGN subcommand. Effects specified or implied on DESIGN but not listed after VS are assumed to have a coefficient of 0.

• Duplicate effects are allowed. UNIANOVA adds coefficients associated with the same effect before performing the text. For example, the linear combination 5*A–0.9*B–A will be combined to 4*A–0.9B.

• A coefficient can be specified as a fraction with a positive denominator—for example, 1/3 or –1/3, but 1/–3 is invalid.

• If you specify a value for the error term, you must specify the degrees of freedom after the keyword DF. The degrees of freedom must be a positive real number. DF and the degrees of freedom are optional for a linear combination.

Example

UNIANOVA DEP BY A B
  /TEST = A VS B + A*B
  /DESIGN = A, B, A*B.

• A is tested against the pooled effect of B + A*B.

Related Topics

UNIANOVA
Overview (UNIANOVA command)
Example (UNIANOVA command)
UNIANOVA Variable List (UNIANOVA command)
RANDOM Subcommand (UNIANOVA command)
REGWGT Subcommand (UNIANOVA command)
METHOD Subcommand (UNIANOVA command)
INTERCEPT Subcommand (UNIANOVA command)
MISSING Subcommand (UNIANOVA command)
CRITERIA Subcommand (UNIANOVA command)
PRINT Subcommand (UNIANOVA command)
PLOT Subcommand (UNIANOVA command)
LMATRIX Subcommand (UNIANOVA command)
KMATRIX Subcommand (UNIANOVA command)
CONTRAST Subcommand (UNIANOVA command)
POSTHOC Subcommand (UNIANOVA command)
EMMEANS Subcommand (UNIANOVA command)
SAVE Subcommand (UNIANOVA command)
OUTFILE Subcommand (UNIANOVA command)
DESIGN Subcommand (UNIANOVA command)


LMATRIX Subcommand (UNIANOVA command)

LMATRIX (subcommand),LMATRIX (subcommand),LMATRIX (subcommand)
UNIANOVA command,UNIANOVA command,UNIANOVA command
UNIANOVA (command),UNIANOVA (command),UNIANOVA (command)
LMATRIX subcommand,LMATRIX subcommand,LMATRIX subcommand
L matrix,L matrix,L matrix
UNIANOVA command,UNIANOVA command,UNIANOVA command
contrast coefficients matrix,contrast coefficients matrix,contrast coefficients matrix
UNIANOVA command,UNIANOVA command,UNIANOVA command

The LMATRIX subcommand allows you to customize your hypotheses tests by specifying the L matrix (contrast coefficients matrix) in the general form of the linear hypothesis LB = K, where K = 0 if it is not specified on the KMATRIX subcommand. The vector B is the parameter vector in the linear model.

• The basic format for the LMATRIX subcommand is an optional label in quotation marks, an effect name or the keyword ALL, and a list of real numbers. There can be multiple effect names (or the keyword ALL) and number lists.

• The optional label is a string with a maximum length of 255 characters. Only one label can be specified.

• Only valid effects appearing or implied on the DESIGN subcommand can be specified on the LMATRIX subcommand.

• The length of the list of real numbers must be equal to the number of parameters (including the redundant ones) corresponding to that effect. For example, if the effect A*B takes up six columns in the design matrix, then the list after A*B must contain exactly six numbers.

• A number can be specified as a fraction with a positive denominator—for example, 1/3 or –1/3, but 1/–3 is invalid.

• A semicolon (;) indicates the end of a row in the L matrix.

• When ALL is specified, the length of the list that follows ALL is equal to the total number of parameters (including the redundant ones) in the model.

• Effects appearing or implied on the DESIGN subcommand must be explicitly specified here.

• Multiple LMATRIX subcommands are allowed. Each is treated independently.

Example

UNIANOVA DEP BY A B
  /LMATRIX = "B1 vs B2 at A1"
              B 1 -1 0 A*B 1 -1 0 0 0 0 0 0 0
  /LMATRIX = "Effect A"
              A 1 0 -1
              A*B 1/3  1/3  1/3
                   0    0    0
                 -1/3 -1/3 -1/3;
              A 0 1 -1
              A*B  0    0    0
                  1/3  1/3  1/3
                 -1/3 -1/3 -1/3
  /LMATRIX = "B1 vs B2 at A2"
             ALL  0
                  0  0  0
                  1 -1  0
                  0  0  0  1 -1  0 0  0  0
  /DESIGN = A, B, A*B.

Assume that factors A and B each have three levels. There are three LMATRIX subcommands; each is treated independently.

• B1 versus B2 at A1. In the first LMATRIX subcommand, the difference is tested between levels 1 and 2 of effect B when effect A is fixed at level 1. Since there are three levels each in effects A and B, the interaction effect A*B takes up nine columns in the design matrix.

• Effect A. In the second LMATRIX subcommand, effect A is tested. Since there are three levels in effect A, at most two independent contrasts can be formed; thus, there are two rows in the L matrix, which are separated by a semicolon (;). The first row tests the difference between levels 1 and 3 of effect A, while the second row tests the difference between levels 2 and 3 of effect A.

• B1 versus B2 at A2. In the last LMATRIX subcommand, the keyword ALL is used. The first 0 corresponds to the intercept effect; the next three zeros correspond to effect A.

Related Topics

UNIANOVA
Overview (UNIANOVA command)
Example (UNIANOVA command)
UNIANOVA Variable List (UNIANOVA command)
RANDOM Subcommand (UNIANOVA command)
REGWGT Subcommand (UNIANOVA command)
METHOD Subcommand (UNIANOVA command)
INTERCEPT Subcommand (UNIANOVA command)
MISSING Subcommand (UNIANOVA command)
CRITERIA Subcommand (UNIANOVA command)
PRINT Subcommand (UNIANOVA command)
PLOT Subcommand (UNIANOVA command)
TEST Subcommand (UNIANOVA command)
KMATRIX Subcommand (UNIANOVA command)
CONTRAST Subcommand (UNIANOVA command)
POSTHOC Subcommand (UNIANOVA command)
EMMEANS Subcommand (UNIANOVA command)
SAVE Subcommand (UNIANOVA command)
OUTFILE Subcommand (UNIANOVA command)
DESIGN Subcommand (UNIANOVA command)


KMATRIX Subcommand (UNIANOVA command)

KMATRIX (subcommand),KMATRIX (subcommand),KMATRIX (subcommand)
UNIANOVA command,UNIANOVA command,UNIANOVA command
UNIANOVA (command),UNIANOVA (command),UNIANOVA (command)
KMATRIX subcommand,KMATRIX subcommand,KMATRIX subcommand
K matrix,K matrix,K matrix
UNIANOVA command,UNIANOVA command,UNIANOVA command
contrast results matrix,contrast results matrix,contrast results matrix

The KMATRIX subcommand allows you to customize your hypothesis tests by specifying the K matrix (contrast results matrix) in the general form of the linear hypothesis LB = K. The vector B is the parameter vector in the linear model.

• The default K matrix is a zero matrix; that is, LB = 0 is assumed.

• For the KMATRIX subcommand to be valid, at least one of the following subcommands must be specified: the LMATRIX subcommand or the INTERCEPT = INCLUDE subcommand.

• If KMATRIX is specified but LMATRIX is not specified, the LMATRIX is assumed to take the row vector corresponding to the intercept in the estimable function, provided the subcommand INTERCEPT = INCLUDE is specified. In this case, the K matrix can be only a scalar matrix.

• If KMATRIX and LMATRIX are specified, then the number of rows in the requested K and L matrices must be equal. If there are multiple LMATRIX subcommands, then all requested L matrices must have the same number of rows, and K must have the same number of rows as these L matrices.

• A semicolon (;) can be used to indicate the end of a row in the K matrix.

• If more than one KMATRIX subcommand is specified, only the last one is in effect.

Example

UNIANOVA DEP BY A B
  /LMATRIX = “Effect A”
              A 1  0 -1; A 1 -1  0
  /LMATRIX = “Effect B”
              B 1  0 -1; B 1 -1  0
  /KMATRIX = 0; 0
  /DESIGN = A B.

In this example, assume that factors A and B each have three levels.

• There are two LMATRIX subcommands; both have two rows.

• The first LMATRIX subcommand tests whether the effect of A is 0, while the second LMATRIX subcommand tests whether the effect of B is 0.

• The KMATRIX subcommand specifies that the K matrix also has two rows, each with value 0.

Related Topics

UNIANOVA
Overview (UNIANOVA command)
Example (UNIANOVA command)
UNIANOVA Variable List (UNIANOVA command)
RANDOM Subcommand (UNIANOVA command)
REGWGT Subcommand (UNIANOVA command)
METHOD Subcommand (UNIANOVA command)
INTERCEPT Subcommand (UNIANOVA command)
MISSING Subcommand (UNIANOVA command)
CRITERIA Subcommand (UNIANOVA command)
PRINT Subcommand (UNIANOVA command)
PLOT Subcommand (UNIANOVA command)
TEST Subcommand (UNIANOVA command)
LMATRIX Subcommand (UNIANOVA command)
CONTRAST Subcommand (UNIANOVA command)
POSTHOC Subcommand (UNIANOVA command)
EMMEANS Subcommand (UNIANOVA command)
SAVE Subcommand (UNIANOVA command)
OUTFILE Subcommand (UNIANOVA command)
DESIGN Subcommand (UNIANOVA command)


CONTRAST Subcommand (UNIANOVA command)

CONTRAST (subcommand),CONTRAST (subcommand),CONTRAST (subcommand)
UNIANOVA command,UNIANOVA command,UNIANOVA command
UNIANOVA (command),UNIANOVA (command),UNIANOVA (command)
CONTRAST subcommand,CONTRAST subcommand,CONTRAST subcommand
contrasts,contrasts,contrasts
UNIANOVA command,UNIANOVA command,UNIANOVA command

CONTRAST specifies the type of contrast desired among the levels of a factor. For a factor with k levels or values, the contrast type determines the meaning of its k−1 degrees of freedom.

• Specify the factor name in parentheses following the subcommand CONTRAST.

• You can specify only one factor per CONTRAST subcommand, but you can enter multiple CONTRAST subcommands.

• After closing the parentheses, enter an equals sign followed by one of the contrast keywords.

• This subcommand creates an L matrix such that the columns corresponding to the factor match the contrast given. The other columns are adjusted so that the L matrix is estimable.

The following contrast types are available:

DEVIATION (keyword),DEVIATION (keyword),DEVIATION (keyword)
UNIANOVA command,UNIANOVA command,UNIANOVA command
deviation contrasts,deviation contrasts,deviation contrasts
UNIANOVA command,UNIANOVA command,UNIANOVA command
POLYNOMIAL (keyword),POLYNOMIAL (keyword),POLYNOMIAL (keyword)
UNIANOVA command,UNIANOVA command,UNIANOVA command
polynomial contrasts,polynomial contrasts,polynomial contrasts
UNIANOVA command,UNIANOVA command,UNIANOVA command
difference contrasts,difference contrasts,difference contrasts
UNIANOVA command,UNIANOVA command,UNIANOVA command
reverse Helmert contrasts,reverse Helmert contrasts,reverse Helmert contrasts
UNIANOVA command,UNIANOVA command,UNIANOVA command
DIFFERENCE (keyword),DIFFERENCE (keyword),DIFFERENCE (keyword)
UNIANOVA command,UNIANOVA command,UNIANOVA command
HELMERT (keyword),HELMERT (keyword),HELMERT (keyword)
UNIANOVA command,UNIANOVA command,UNIANOVA command
Helmert contrasts,Helmert contrasts,Helmert contrasts
UNIANOVA command,UNIANOVA command,UNIANOVA command
SIMPLE (keyword),SIMPLE (keyword),SIMPLE (keyword)
UNIANOVA command,UNIANOVA command,UNIANOVA command
simple contrasts,simple contrasts,simple contrasts
UNIANOVA command,UNIANOVA command,UNIANOVA command
repeated contrasts,repeated contrasts,repeated contrasts
UNIANOVA command,UNIANOVA command,UNIANOVA command
REPEATED (keyword),REPEATED (keyword),REPEATED (keyword)
UNIANOVA command,UNIANOVA command,UNIANOVA command
special contrasts,special contrasts,special contrasts
UNIANOVA command,UNIANOVA command,UNIANOVA command
SPECIAL (keyword),SPECIAL (keyword),SPECIAL (keyword)
UNIANOVA command,UNIANOVA command,UNIANOVA command
DEVIATION | Deviations from the grand mean. This is the default for factors. Each level of the factor except one is compared to the grand mean. One category (by default, the last) must be omitted so that the effects will be independent of one another. To omit a category other than the last, specify the number of the omitted category (which is not necessarily the same as its value) in parentheses after the keyword DEVIATION. For example,
 | UNIANOVA Y BY B /CONTRAST(B)=DEVIATION(1).
 | Suppose factor B has three levels, with values 2, 4, and 6. The specified contrast omits the first category, in which B has the value 2. Deviation contrasts are not orthogonal.
POLYNOMIAL | Polynomial contrasts. This is the default for within-subjects factors. The first degree of freedom contains the linear effect across the levels of the factor, the second contains the quadratic effect, and so on. In a balanced design, polynomial contrasts are orthogonal. By default, the levels are assumed to be equally spaced; you can specify unequal spacing by entering a metric consisting of one integer for each level of the factor in parentheses after the keyword POLYNOMIAL. (All metrics specified cannot be equal; thus, (1, 1, . . . 1) is not valid.) For example,
 | UNIANOVA RESPONSE BY STIMULUS /CONTRAST(STIMULUS) = POLYNOMIAL(1,2,4).
 | Suppose that factor STIMULUS has three levels. The specified contrast indicates that the three levels of STIMULUS are actually in the proportion 1:2:4. The default metric is always (1, 2, . . . k), where k levels are involved. Only the relative differences between the terms of the metric matter; (1, 2, 4) is the same metric as (2, 3, 5) or (20, 30, 50) because, in each instance, the difference between the second and third numbers is twice the difference between the first and second.
DIFFERENCE | Difference or reverse Helmert contrasts. Each level of the factor except the first is compared to the mean of the previous levels. In a balanced design, difference contrasts are orthogonal.
HELMERT | Helmert contrasts. Each level of the factor except the last is compared to the mean of subsequent levels. In a balanced design, Helmert contrasts are orthogonal.
SIMPLE | Each level of the factor except the last is compared to the last level. To use a category other than the last as the omitted reference category, specify its number (which is not necessarily the same as its value) in parentheses following the keyword SIMPLE. For example,
 | UNIANOVA Y BY B /CONTRAST(B)=SIMPLE(1).
 | Suppose that factor B has three levels with values 2, 4, and 6. The specified contrast compares the other levels to the first level of B, in which B has the value 2. Simple contrasts are not orthogonal.
REPEATED | Comparison of adjacent levels. Each level of the factor except the first is compared to the previous level. Repeated contrasts are not orthogonal.
SPECIAL | A user-defined contrast. Values specified after this keyword are stored in a matrix in column major order. For example, if factor A has three levels, then CONTRAST(A)=SPECIAL(1 1 1 1 -1 0 0 1 -1) produces the following contrast matrix:
 | 1 1 0 1 –1 1 1 0 –1
orthogonal contrasts,orthogonal contrasts,orthogonal contrasts
contrasts,contrasts,contrasts
orthogonal,orthogonal,orthogonal

Orthogonal contrasts are particularly useful. In a balanced design, contrasts are orthogonal if the sum of the coefficients in each contrast row is 0 and if, for any pair of contrast rows, the products of corresponding coefficients sum to 0. DIFFERENCE, HELMERT, and POLYNOMIAL contrasts always meet these criteria in balanced designs.

Example

UNIANOVA DEP BY FAC
  /CONTRAST(FAC)=DIFFERENCE
  /DESIGN.

• Suppose that the factor FAC has five categories and therefore four degrees of freedom.

• CONTRAST requests DIFFERENCE contrasts, which compare each level (except the first) with the mean of the previous levels.

Related Topics

UNIANOVA
Overview (UNIANOVA command)
Example (UNIANOVA command)
UNIANOVA Variable List (UNIANOVA command)
RANDOM Subcommand (UNIANOVA command)
REGWGT Subcommand (UNIANOVA command)
METHOD Subcommand (UNIANOVA command)
INTERCEPT Subcommand (UNIANOVA command)
MISSING Subcommand (UNIANOVA command)
CRITERIA Subcommand (UNIANOVA command)
PRINT Subcommand (UNIANOVA command)
PLOT Subcommand (UNIANOVA command)
TEST Subcommand (UNIANOVA command)
LMATRIX Subcommand (UNIANOVA command)
KMATRIX Subcommand (UNIANOVA command)
POSTHOC Subcommand (UNIANOVA command)
EMMEANS Subcommand (UNIANOVA command)
SAVE Subcommand (UNIANOVA command)
OUTFILE Subcommand (UNIANOVA command)
DESIGN Subcommand (UNIANOVA command)


POSTHOC Subcommand (UNIANOVA command)

POSTHOC (subcommand),POSTHOC (subcommand),POSTHOC (subcommand)
UNIANOVA command,UNIANOVA command,UNIANOVA command
UNIANOVA (command),UNIANOVA (command),UNIANOVA (command)
POSTHOC subcommand,POSTHOC subcommand,POSTHOC subcommand
post hoc tests,post hoc tests,post hoc tests
UNIANOVA command,UNIANOVA command,UNIANOVA command
multiple comparisons,multiple comparisons,multiple comparisons
UNIANOVA command,UNIANOVA command,UNIANOVA command

POSTHOC allows you to produce multiple comparisons between means of a factor. These comparisons are usually not planned at the beginning of the study but are suggested by the data in the course of study.

• Post hoc tests are computed for the dependent variable. The alpha value used in the tests can be specified by using the keyword ALPHA on the CRITERIA subcommand. The default alpha value is 0.05. The confidence level for any confidence interval constructed is (1−α) × 100. The default confidence level is 95.

• Only factors appearing in the factor list are valid in this subcommand. Individual factors can be specified.

• You can specify one or more effects to be tested. Only fixed main effects appearing or implied on the DESIGN subcommand are valid test effects.

• Optionally, you can specify an effect defining the error term following the keyword VS after the test specification. The error effect can be any single effect in the design that is not the intercept or a main effect named on a POSTHOC subcommand.

• A variety of multiple comparison tests are available. Some tests are designed for detecting homogeneity subsets among the groups of means, some are designed for pairwise comparisons among all means, and some can be used for both purposes.

• For tests that are used for detecting homogeneity subsets of means, non-empty group means are sorted in ascending order. Means that are not significantly different are included together to form a homogeneity subset. The significance for each homogeneity subset of means is displayed. In a case where the numbers of valid cases are not equal in all groups, for most post hoc tests, the harmonic mean of the group sizes is used as the sample size in the calculation. For QREGW or FREGW, individual sample sizes are used.

• For tests that are used for pairwise comparisons, the display includes the difference between each pair of compared means, the confidence interval for the difference, and the significance. The sample sizes of the two groups being compared are used in the calculation.

• Output for tests specified on the POSTHOC subcommand are available according to their statistical purposes. The following table illustrates the statistical purpose of the post hoc tests:

Sidak's t test,Sidak's t test,Sidak's t test
UNIANOVA command,UNIANOVA command,UNIANOVA command
Bonferroni test,Bonferroni test,Bonferroni test
UNIANOVA command,UNIANOVA command,UNIANOVA command
Games and Howell's pairwise comparisons test,Games and Howell's pairwise comparisons test,Games and Howell's pairwise comparisons test
UNIANOVA command,UNIANOVA command,UNIANOVA command
Tamhane's T2,Tamhane's T2,Tamhane's T2
UNIANOVA command,UNIANOVA command,UNIANOVA command
Tamhane's T3,Tamhane's T3,Tamhane's T3
UNIANOVA command,UNIANOVA command,UNIANOVA command
Dunnett's C,Dunnett's C,Dunnett's C
UNIANOVA command,UNIANOVA command,UNIANOVA command
Dunnett's t test,Dunnett's t test,Dunnett's t test
UNIANOVA command,UNIANOVA command,UNIANOVA command
Dunnett's t test,Dunnett's t test,Dunnett's t test
UNIANOVA command,UNIANOVA command,UNIANOVA command
Student-Newman-Keuls,Student-Newman-Keuls,Student-Newman-Keuls
UNIANOVA command,UNIANOVA command,UNIANOVA command
Tukey's b test,Tukey's b test,Tukey's b test
UNIANOVA command,UNIANOVA command,UNIANOVA command
Duncan's multiple range test,Duncan's multiple range test,Duncan's multiple range test
UNIANOVA command,UNIANOVA command,UNIANOVA command
Ryan-Einot-Gabriel-Welsch multiple stepdown procedure,Ryan-Einot-Gabriel-Welsch multiple stepdown procedure,Ryan-Einot-Gabriel-Welsch multiple stepdown procedure
UNIANOVA command,UNIANOVA command,UNIANOVA command
Ryan-Einot-Gabriel-Welsch multiple stepdown procedure,Ryan-Einot-Gabriel-Welsch multiple stepdown procedure,Ryan-Einot-Gabriel-Welsch multiple stepdown procedure
UNIANOVA command,UNIANOVA command,UNIANOVA command
Waller-Duncan t test,Waller-Duncan t test,Waller-Duncan t test
UNIANOVA command,UNIANOVA command,UNIANOVA command
Tukey's honestly significant difference,Tukey's honestly significant difference,Tukey's honestly significant difference
UNIANOVA command,UNIANOVA command,UNIANOVA command
Scheffé test,Scheffé test,Scheffé test
UNIANOVA command,UNIANOVA command,UNIANOVA command
Hochberg's GT2,Hochberg's GT2,Hochberg's GT2
UNIANOVA command,UNIANOVA command,UNIANOVA command
Gabriel's pairwise comparisons test,Gabriel's pairwise comparisons test,Gabriel's pairwise comparisons test
UNIANOVA command,UNIANOVA command,UNIANOVA command
Post Hoc Tests | Statistical Purpose
Keyword | Homogeneity Subsets Detection | Pairwise Comparison and Confidence Interval
LSD |  | Yes
SIDAK |  | Yes
BONFERRONI |  | Yes
GH |  | Yes
T2 |  | Yes
T3 |  | Yes
C |  | Yes
DUNNETT |  | Yes*
DUNNETTL |  | Yes*
DUNNETTR |  | Yes*
SNK | Yes |
BTUKEY | Yes |
DUNCAN | Yes |
QREGW | Yes |
FREGW | Yes |
WALLER | Yes† |
TUKEY | Yes | Yes
SCHEFFE | Yes | Yes
GT2 | Yes | Yes
GABRIEL | Yes | Yes

* Only CIs for differences between test group means and control group means are given.

† No significance for Waller test is given.

• Tests that are designed for homogeneity subset detection display the detected homogeneity subsets and their corresponding significances.

• Tests that are designed for both homogeneity subset detection and pairwise comparison display both kinds of output.

• For the DUNNETT, DUNNETTL, and DUNNETTR keywords, only individual factors can be specified.

• The default reference category for DUNNETT, DUNNETTL, and DUNNETTR is the last category. An integer greater than 0 within parentheses can be used to specify a different reference category. For example, POSTHOC = A (DUNNETT(2)) requests a DUNNETT test for factor A, using the second level of A as the reference category.

• The keywords DUNCAN, DUNNETT, DUNNETTL, and DUNNETTR must be spelled out in full; using the first three characters alone is not sufficient.

• If the REGWT subcommand is specified, weighted means are used in performing post hoc tests.

• Multiple POSTHOC subcommands are allowed. Each specification is executed independently so that you can test different effects against different error terms.

SNK (keyword),SNK (keyword),SNK (keyword)
UNIANOVA command,UNIANOVA command,UNIANOVA command
TUKEY (keyword),TUKEY (keyword),TUKEY (keyword)
UNIANOVA command,UNIANOVA command,UNIANOVA command
BTUKEY (keyword),BTUKEY (keyword),BTUKEY (keyword)
UNIANOVA command,UNIANOVA command,UNIANOVA command
DUNCAN (keyword),DUNCAN (keyword),DUNCAN (keyword)
UNIANOVA command,UNIANOVA command,UNIANOVA command
SCHEFFE (keyword),SCHEFFE (keyword),SCHEFFE (keyword)
UNIANOVA command,UNIANOVA command,UNIANOVA command
DUNNETT (keyword),DUNNETT (keyword),DUNNETT (keyword)
UNIANOVA command,UNIANOVA command,UNIANOVA command
DUNNETTL (keyword),DUNNETTL (keyword),DUNNETTL (keyword)
UNIANOVA command,UNIANOVA command,UNIANOVA command
DUNNETTR (keyword),DUNNETTR (keyword),DUNNETTR (keyword)
UNIANOVA command,UNIANOVA command,UNIANOVA command
BONFERRONI (keyword),BONFERRONI (keyword),BONFERRONI (keyword)
UNIANOVA command,UNIANOVA command,UNIANOVA command
LSD (keyword),LSD (keyword),LSD (keyword)
UNIANOVA command,UNIANOVA command,UNIANOVA command
SIDAK (keyword),SIDAK (keyword),SIDAK (keyword)
UNIANOVA command,UNIANOVA command,UNIANOVA command
GT2 (keyword),GT2 (keyword),GT2 (keyword)
UNIANOVA command,UNIANOVA command,UNIANOVA command
GABRIEL (keyword),GABRIEL (keyword),GABRIEL (keyword)
UNIANOVA command,UNIANOVA command,UNIANOVA command
FREGW (keyword),FREGW (keyword),FREGW (keyword)
UNIANOVA command,UNIANOVA command,UNIANOVA command
QREGW (keyword),QREGW (keyword),QREGW (keyword)
UNIANOVA command,UNIANOVA command,UNIANOVA command
T2 (keyword),T2 (keyword),T2 (keyword)
UNIANOVA command,UNIANOVA command,UNIANOVA command
T3 (keyword),T3 (keyword),T3 (keyword)
UNIANOVA command,UNIANOVA command,UNIANOVA command
GH (keyword),GH (keyword),GH (keyword)
UNIANOVA command,UNIANOVA command,UNIANOVA command
C (keyword),C (keyword),C (keyword)
UNIANOVA command,UNIANOVA command,UNIANOVA command
WALLER (keyword),WALLER (keyword),WALLER (keyword)
UNIANOVA command,UNIANOVA command,UNIANOVA command
SNK | Student-Newman-Keuls procedure based on the Studentized range test.
TUKEY | Tukey’s honestly significant difference. This test uses the Studentized range statistic to make all pairwise comparisons between groups.
BTUKEY | Tukey’s b. Multiple comparison procedure based on the average of Studentized range tests.
DUNCAN | Duncan’s multiple comparison procedure based on the Studentized range test.
SCHEFFE | Scheffé’s multiple comparison t test.
DUNNETT(refcat) | Dunnett’s two-tailed t test. Each level of the factor is compared to a reference category. A reference category can be specified in parentheses. The default reference category is the last category. This keyword must be spelled out in full.
DUNNETTL(refcat) | Dunnett’s one-tailed t test. This test indicates whether the mean at any level (except the reference category) of the factor is smaller than that of the reference category. A reference category can be specified in parentheses. The default reference category is the last category. This keyword must be spelled out in full.
DUNNETTR(refcat) | Dunnett’s one-tailed t test. This test indicates whether the mean at any level (except the reference category) of the factor is larger than that of the reference category. A reference category can be specified in parentheses. The default reference category is the last category. This keyword must be spelled out in full.
BONFERRONI | Bonferroni t test. This test is based on Student’s t statistic and adjusts the observed significance level for the fact that multiple comparisons are made.
LSD | Least significant difference t test. Equivalent to multiple t tests between all pairs of groups. This test does not control the overall probability of rejecting the hypotheses that some pairs of means are different, while in fact they are equal.
SIDAK | Sidak t test. This test provides tighter bounds than the Bonferroni test.
GT2 | Hochberg’s GT2. Pairwise comparisons test based on the Studentized maximum modulus test. Unless the cell sizes are extremely unbalanced, this test is fairly robust even for unequal variances.
GABRIEL | Gabriel’s pairwise comparisons test based on the Studentized maximum modulus test.
FREGW | Ryan-Einot-Gabriel-Welsch’s multiple stepdown procedure based on an F test.
QREGW | Ryan-Einot-Gabriel-Welsch’s multiple stepdown procedure based on the Studentized range test.
T2 | Tamhane’s T2. Tamhane’s pairwise comparisons test based on a t test. This test can be applied in situations where the variances are unequal. This test is invalid when there are multiple factors in the model, and the keyword is ignored with a warning in such cases.
T3 | Dunnett’s T3. Pairwise comparisons test based on the Studentized maximum modulus. This test is appropriate when the variances are unequal. This test is invalid when there are multiple factors in the model, and the keyword is ignored with a warning in such cases.
GH | Games and Howell’s pairwise comparisons test based on the Studentized range test. This test can be applied in situations where the variances are unequal. This test is invalid when there are multiple factors in the model, and the keyword is ignored with a warning in such cases.
C | Dunnett’s C. Pairwise comparisons based on the weighted average of Studentized ranges. This test can be applied in situations where the variances are unequal. This test is invalid when there are multiple factors in the model, and the keyword is ignored with a warning in such cases.
WALLER(kratio) | Waller-Duncan t test. This test uses a Bayesian approach. It is restricted to cases with equal sample sizes. For cases with unequal sample sizes, the harmonic mean of the sample size is used. The k-ratio is the Type 1/Type 2 error seriousness ratio. The default value is 100. You can specify an integer greater than 1 within parentheses.

Related Topics

UNIANOVA
Overview (UNIANOVA command)
Example (UNIANOVA command)
UNIANOVA Variable List (UNIANOVA command)
RANDOM Subcommand (UNIANOVA command)
REGWGT Subcommand (UNIANOVA command)
METHOD Subcommand (UNIANOVA command)
INTERCEPT Subcommand (UNIANOVA command)
MISSING Subcommand (UNIANOVA command)
CRITERIA Subcommand (UNIANOVA command)
PRINT Subcommand (UNIANOVA command)
PLOT Subcommand (UNIANOVA command)
TEST Subcommand (UNIANOVA command)
LMATRIX Subcommand (UNIANOVA command)
KMATRIX Subcommand (UNIANOVA command)
CONTRAST Subcommand (UNIANOVA command)
EMMEANS Subcommand (UNIANOVA command)
SAVE Subcommand (UNIANOVA command)
OUTFILE Subcommand (UNIANOVA command)
DESIGN Subcommand (UNIANOVA command)


EMMEANS Subcommand (UNIANOVA command)

estimated marginal means,estimated marginal means,estimated marginal means
UNIANOVA command,UNIANOVA command,UNIANOVA command
EMMEANS (subcommand),EMMEANS (subcommand),EMMEANS (subcommand)
UNIANOVA command,UNIANOVA command,UNIANOVA command
UNIANOVA (command),UNIANOVA (command),UNIANOVA (command)
EMMEANS subcommand,EMMEANS subcommand,EMMEANS subcommand
UNIANOVA (command),UNIANOVA (command),UNIANOVA (command)
estimated marginal means,estimated marginal means,estimated marginal means

EMMEANS displays estimated marginal means of the dependent variable in the cells (with covariates held at their overall mean value) and their standard errors for the specified factors. Note that these are predicted, not observed, means. The estimated marginal means are calculated using a modified definition by Searle, Speed, and Milliken (1980).

• TABLES, followed by an option in parentheses, is required. COMPARE is optional; if specified, it must follow TABLES.

• Multiple EMMEANS subcommands are allowed. Each is treated independently.

• If identical EMMEANS subcommands are specified, only the last identical subcommand is in effect. EMMEANS subcommands that are redundant but not identical (for example, crossed factor combinations such as A*B and B*A) are all processed.

TABLES (keyword),TABLES (keyword),TABLES (keyword)
UNIANOVA command,UNIANOVA command,UNIANOVA command
table specifications,table specifications,table specifications
UNIANOVA command,UNIANOVA command,UNIANOVA command
TABLES(option) | Table specification. Valid options are the keyword OVERALL, factors appearing on the factor list, and crossed factors constructed of factors on the factor list. Crossed factors can be specified using an asterisk (*) or the keyword BY. All factors in a crossed factor specification must be unique.
 | If OVERALL is specified, the estimated marginal means of the dependent variable are displayed, collapsing over factors.
 | If a factor, or a crossing of factors, is specified on the TABLES keyword, UNIANOVA collapses over any other factors before computing the estimated marginal means for the dependent variable.
 | The TABLES keyword may be followed by the WITH keyword and a parenthesized list of covariates and values. Tables are produced with the values of the covariates fixed at the specified values. The keyword MEAN causes the covariate to be fixed at its observed mean value.
COMPARE(factor) ADJ(method) | Main- or simple-main-effects omnibus tests and pairwise comparisons of the dependent variable. This option gives the mean difference, standard error, significance, and confidence interval for each pair of levels for the effect specified in the TABLES command, as well as an omnibus test for that effect. If only one factor is specified on TABLES, COMPARE can be specified by itself; otherwise, the factor specification is required. In this case, levels of the specified factor are compared with each other for each level of the other factors in the interaction.
 | The optional ADJ keyword allows you to apply an adjustment to the confidence intervals and significance values to account for multiple comparisons. Methods available are LSD (no adjustment), BONFERRONI, or SIDAK.
 | If OVERALL is specified on TABLES, COMPARE is invalid.

Example

UNIANOVA DEP BY A B
  /EMMEANS = TABLES(A*B) WITH(X=1.0) COMPARE(A) ADJ(LSD)
  /DESIGN.

• The output of this analysis includes a pairwise comparisons table for the dependent variable DEP.

• Assume that A has three levels and B has two levels. The first level of A is compared with the second and third levels, the second level with the first and third levels, and the third level with the first and second levels, with the value of the covariate X fixed at 1.0. The pairwise comparison is repeated for the two levels of B.

Related Topics

UNIANOVA
Overview (UNIANOVA command)
Example (UNIANOVA command)
UNIANOVA Variable List (UNIANOVA command)
RANDOM Subcommand (UNIANOVA command)
REGWGT Subcommand (UNIANOVA command)
METHOD Subcommand (UNIANOVA command)
INTERCEPT Subcommand (UNIANOVA command)
MISSING Subcommand (UNIANOVA command)
CRITERIA Subcommand (UNIANOVA command)
PRINT Subcommand (UNIANOVA command)
PLOT Subcommand (UNIANOVA command)
TEST Subcommand (UNIANOVA command)
LMATRIX Subcommand (UNIANOVA command)
KMATRIX Subcommand (UNIANOVA command)
CONTRAST Subcommand (UNIANOVA command)
POSTHOC Subcommand (UNIANOVA command)
SAVE Subcommand (UNIANOVA command)
OUTFILE Subcommand (UNIANOVA command)
DESIGN Subcommand (UNIANOVA command)


SAVE Subcommand (UNIANOVA command)

SAVE (subcommand),SAVE (subcommand),SAVE (subcommand)
UNIANOVA command,UNIANOVA command,UNIANOVA command
UNIANOVA (command),UNIANOVA (command),UNIANOVA (command)
SAVE subcommand,SAVE subcommand,SAVE subcommand

Use SAVE to add one or more residual or fit values to the active dataset.

• Specify one or more temporary variables, each followed by an optional new name in parentheses.

• WPRED and WRESID can be saved only if REGWGT has been specified.

• Specifying a temporary variable on this subcommand results in a variable being added to the active data file for each dependent variable.

• You can specify variable names for the temporary variables. These names must be unique, valid variable names.

• If new names are not specified, UNIANOVA generates a rootname using a shortened form of the temporary variable name with a suffix.

• If more than one SAVE subcommand is specified, only the last one is in effect.

PRED (keyword),PRED (keyword),PRED (keyword)
UNIANOVA command,UNIANOVA command,UNIANOVA command
unstandardized predicted values,unstandardized predicted values,unstandardized predicted values
UNIANOVA command,UNIANOVA command,UNIANOVA command
WPRED (keyword),WPRED (keyword),WPRED (keyword)
UNIANOVA command,UNIANOVA command,UNIANOVA command
weighted unstandardized predicted values,weighted unstandardized predicted values,weighted unstandardized predicted values
UNIANOVA command,UNIANOVA command,UNIANOVA command
RESID (keyword),RESID (keyword),RESID (keyword)
UNIANOVA command,UNIANOVA command,UNIANOVA command
unstandardized residuals,unstandardized residuals,unstandardized residuals
UNIANOVA command,UNIANOVA command,UNIANOVA command
WRESID (keyword),WRESID (keyword),WRESID (keyword)
UNIANOVA command,UNIANOVA command,UNIANOVA command
weighted unstandardized residuals,weighted unstandardized residuals,weighted unstandardized residuals
UNIANOVA command,UNIANOVA command,UNIANOVA command
DRESID (keyword),DRESID (keyword),DRESID (keyword)
UNIANOVA command,UNIANOVA command,UNIANOVA command
deleted residuals,deleted residuals,deleted residuals
UNIANOVA command,UNIANOVA command,UNIANOVA command
ZRESID (keyword),ZRESID (keyword),ZRESID (keyword)
UNIANOVA command,UNIANOVA command,UNIANOVA command
standardized residuals,standardized residuals,standardized residuals
UNIANOVA command,UNIANOVA command,UNIANOVA command
SRESID (keyword),SRESID (keyword),SRESID (keyword)
UNIANOVA command,UNIANOVA command,UNIANOVA command
Studentized residuals,Studentized residuals,Studentized residuals
UNIANOVA command,UNIANOVA command,UNIANOVA command
SEPRED (keyword),SEPRED (keyword),SEPRED (keyword)
UNIANOVA command,UNIANOVA command,UNIANOVA command
standard errors,standard errors,standard errors
UNIANOVA command,UNIANOVA command,UNIANOVA command
COOK (keyword),COOK (keyword),COOK (keyword)
UNIANOVA command,UNIANOVA command,UNIANOVA command
Cook's distance,Cook's distance,Cook's distance
UNIANOVA command,UNIANOVA command,UNIANOVA command
LEVER (keyword),LEVER (keyword),LEVER (keyword)
UNIANOVA command,UNIANOVA command,UNIANOVA command
uncentered leverage values,uncentered leverage values,uncentered leverage values
UNIANOVA command,UNIANOVA command,UNIANOVA command
PRED | Unstandardized predicted values.
WPRED | Weighted unstandardized predicted values. Available only if REGWGT has been specified.
RESID | Unstandardized residuals.
WRESID | Weighted unstandardized residuals. Available only if REGWGT has been specified.
DRESID | Deleted residuals.
ZRESID | Standardized residuals.
SRESID | Studentized residuals.
SEPRED | Standard errors of predicted value.
COOK | Cook’s distances.
LEVER | Uncentered leverage values.

Related Topics

UNIANOVA
Overview (UNIANOVA command)
Example (UNIANOVA command)
UNIANOVA Variable List (UNIANOVA command)
RANDOM Subcommand (UNIANOVA command)
REGWGT Subcommand (UNIANOVA command)
METHOD Subcommand (UNIANOVA command)
INTERCEPT Subcommand (UNIANOVA command)
MISSING Subcommand (UNIANOVA command)
CRITERIA Subcommand (UNIANOVA command)
PRINT Subcommand (UNIANOVA command)
PLOT Subcommand (UNIANOVA command)
TEST Subcommand (UNIANOVA command)
LMATRIX Subcommand (UNIANOVA command)
KMATRIX Subcommand (UNIANOVA command)
CONTRAST Subcommand (UNIANOVA command)
POSTHOC Subcommand (UNIANOVA command)
EMMEANS Subcommand (UNIANOVA command)
OUTFILE Subcommand (UNIANOVA command)
DESIGN Subcommand (UNIANOVA command)


OUTFILE Subcommand (UNIANOVA command)

OUTFILE (subcommand),OUTFILE (subcommand),OUTFILE (subcommand)
UNIANOVA command,UNIANOVA command,UNIANOVA command
UNIANOVA (command),UNIANOVA (command),UNIANOVA (command)
OUTFILE subcommand,OUTFILE subcommand,OUTFILE subcommand

The OUTFILE subcommand writes PASW Statistics data files that can be used in other procedures.

• You must specify a keyword on OUTFILE. There is no default.

• You must specify a quoted file specification or a previously declared dataset name (DATASET DECLARE command), enclosed in quotes. The asterisk (*) is not allowed.

• If you specify more than one keyword, a different file specification is required for each.

• If more than one OUTFILE subcommand is specified, only the last one is in effect.

• For COVB or CORB, the output will contain, in addition to the covariance or correlation matrix, three rows for each dependent variable: a row of parameter estimates, a row of residual degrees of freedom, and a row of significance values for the t statistics corresponding to the parameter estimates. All statistics are displayed separately by split.

COVB ('savfile'|'dataset') | Writes the parameter covariance matrix.
CORB ('savfile'|'dataset') | Writes the parameter correlation matrix.
EFFECT ('savfile'|'dataset') | Writes the statistics from the between-subjects ANOVA table.
DESIGN ('savfile'|'dataset') | Writes the design matrix. The number of rows equals the number of cases, and the number of columns equals the number of parameters. The variable names are DES_1, DES_2, ..., DES_p, where p is the number of the parameters.

Related Topics

UNIANOVA
Overview (UNIANOVA command)
Example (UNIANOVA command)
UNIANOVA Variable List (UNIANOVA command)
RANDOM Subcommand (UNIANOVA command)
REGWGT Subcommand (UNIANOVA command)
METHOD Subcommand (UNIANOVA command)
INTERCEPT Subcommand (UNIANOVA command)
MISSING Subcommand (UNIANOVA command)
CRITERIA Subcommand (UNIANOVA command)
PRINT Subcommand (UNIANOVA command)
PLOT Subcommand (UNIANOVA command)
TEST Subcommand (UNIANOVA command)
LMATRIX Subcommand (UNIANOVA command)
KMATRIX Subcommand (UNIANOVA command)
CONTRAST Subcommand (UNIANOVA command)
POSTHOC Subcommand (UNIANOVA command)
EMMEANS Subcommand (UNIANOVA command)
SAVE Subcommand (UNIANOVA command)
DESIGN Subcommand (UNIANOVA command)


DESIGN Subcommand (UNIANOVA command)

balanced designs,balanced designs,balanced designs
UNIANOVA command,UNIANOVA command,UNIANOVA command

DESIGN specifies the effects included in a specific model. The cells in a design are defined by all of the possible combinations of levels of the factors in that design. The number of cells equals the product of the number of levels of all the factors. A design is balanced if each cell contains the same number of cases. UNIANOVA can analyze both balanced and unbalanced designs.

• Specify a list of terms to be included in the model, separated by spaces or commas.

• The default design, if the DESIGN subcommand is omitted or is specified by itself, is a design consisting of the following terms in order: the intercept term (if INTERCEPT=INCLUDE is specified), next the covariates given in the covariate list, and then the full factorial model defined by all factors on the factor list and excluding the intercept.

• To include a term for the main effect of a factor, enter the name of the factor on the DESIGN subcommand.

• To include the intercept term in the design, use the keyword INTERCEPT on the DESIGN subcommand. If INTERCEPT is specified on the DESIGN subcommand, the subcommand INTERCEPT=EXCLUDE is overridden.

interactions,interactions,interactions
UNIANOVA command,UNIANOVA command,UNIANOVA command

• To include a term for an interaction between factors, use the keyword BY or the asterisk (*) to join the factors involved in the interaction. For example, A*B means a two-way interaction effect of A and B, where A and B are factors. A*A is not allowed because factors inside an interaction effect must be distinct.

nested design,nested design,nested design
UNIANOVA command,UNIANOVA command,UNIANOVA command

• To include a term for nesting one effect within another, use the keyword WITHIN or a pair of parentheses on the DESIGN subcommand. For example, A(B) means that A is nested within B. The expression A(B) is equivalent to the expression A WITHIN B. When more than one pair of parentheses is present, each pair of parentheses must be enclosed or nested within another pair of parentheses. Thus, A(B)(C) is not valid.

• Multiple nesting is allowed. For example, A(B(C)) means that B is nested within C, and A is nested within B(C).

• Interactions between nested effects are not valid. For example, neither A(C)*B(C) nor A(C)*B(D) is valid.

• To include a covariate term in the design, enter the name of the covariate on the DESIGN subcommand.

• Covariates can be connected, but not nested, through the * operator to form another covariate effect. Therefore, interactions among covariates such as X1*X1 and X1*X2 are valid, but not X1(X2). Using covariate effects such as X1*X1, X1*X1*X1, X1*X2, and X1*X1*X2*X2 makes fitting a polynomial regression model easy in UNIANOVA.

• Factor and covariate effects can be connected only by the * operator. Suppose A and B are factors, and X1 and X2 are covariates. Examples of valid factor-by-covariate interaction effects are A*X1, A*B*X1, X1*A(B), A*X1*X1, and B*X1*X2.

• If more than one DESIGN subcommand is specified, only the last one is in effect.

Example

UNIANOVA Y BY A B C WITH X
  /DESIGN A B(A) X*A.

• In this example, the design consists of a main effect A, a nested effect B within A, and an interaction effect of a covariate X with a factor A.

Related Topics

UNIANOVA
Overview (UNIANOVA command)
Example (UNIANOVA command)
UNIANOVA Variable List (UNIANOVA command)
RANDOM Subcommand (UNIANOVA command)
REGWGT Subcommand (UNIANOVA command)
METHOD Subcommand (UNIANOVA command)
INTERCEPT Subcommand (UNIANOVA command)
MISSING Subcommand (UNIANOVA command)
CRITERIA Subcommand (UNIANOVA command)
PRINT Subcommand (UNIANOVA command)
PLOT Subcommand (UNIANOVA command)
TEST Subcommand (UNIANOVA command)
LMATRIX Subcommand (UNIANOVA command)
KMATRIX Subcommand (UNIANOVA command)
CONTRAST Subcommand (UNIANOVA command)
POSTHOC Subcommand (UNIANOVA command)
EMMEANS Subcommand (UNIANOVA command)
SAVE Subcommand (UNIANOVA command)
OUTFILE Subcommand (UNIANOVA command)


UPDATE

file transformations,file transformations,file transformations
updating data files,updating data files,updating data files
data files,data files,data files
updating,updating,updating
UPDATE (command),UPDATE (command),UPDATE (command)
UPDATE (command),UPDATE (command),UPDATE (command)
syntax chart,syntax chart,syntax chart
UPDATE FILE={master file}
            {*          }

 [/RENAME=(old varnames=new varnames)...]

 [/IN=varname]

  /FILE={transaction file1}
        {*                }

 [/FILE=transaction file2]

  /BY key variables

 [/MAP]

 [/KEEP={ALL**  }] [/DROP=varlist]
        {varlist}

**Default if the subcommand is omitted.

Example

UPDATE FILE='/data/maillist.sav'
  /FILE='/data/newlist.sav'
  /BY=ID.

Related Topics

Overview (UPDATE command)
Examples (UPDATE command)
FILE Subcommand (UPDATE command)
BY Subcommand (UPDATE command)
RENAME Subcommand (UPDATE command)
DROP and KEEP Subcommands (UPDATE command)
IN Subcommand (UPDATE command)
MAP Subcommand (UPDATE command)


Overview (UPDATE command)

DROP DOCUMENTS (command),DROP DOCUMENTS (command),DROP DOCUMENTS (command)
with UPDATE command,with UPDATE command,with UPDATE command
UPDATE (command),UPDATE (command),UPDATE (command)
with DROP DOCUMENTS command,with DROP DOCUMENTS command,with DROP DOCUMENTS command
UPDATE (command),UPDATE (command),UPDATE (command)
limitations,limitations,limitations
updating data files,updating data files,updating data files
limitations,limitations,limitations
data files,data files,data files
transaction files,transaction files,transaction files
data files,data files,data files
master files,master files,master files
updating data files,updating data files,updating data files
key variables,key variables,key variables
updating data files,updating data files,updating data files
transaction files,transaction files,transaction files
updating data files,updating data files,updating data files
master files,master files,master files
key variables,key variables,key variables
master files,master files,master files
transaction files,transaction files,transaction files

UPDATE replaces values in a master file with updated values recorded in one or more files called transaction files. Cases in the master file and transaction file are matched according to a key variable.

The master file and the transaction files must be PASW Statistics data files or datasets available in the current session, including the active dataset. UPDATE replaces values and creates a new active dataset, which replaces the original active dataset.

UPDATE is designed to update values of existing variables for existing cases. Use MATCH FILES to add new variables to a data file and ADD FILES to add new cases.

Options Collapse Hide details

Options

Variable Selection. You can specify which variables from each input file are included in the new active dataset using the DROP and KEEP subcommands.

Variable Names. You can rename variables in each input file before combining the files using the RENAME subcommand. This permits you to combine variables that are the same but whose names differ in different input files, or to separate variables that are different but have the same name.

Variable Flag. You can create a variable that indicates whether a case came from a particular input file using IN. You can use the FIRST or LAST subcommand to create a variable that flags the first or last case of a group of cases with the same value for the key variable.

Variable Map. You can request a map showing all variables in the new active dataset, their order, and the input files from which they came using the MAP subcommand.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is two or more FILE subcommands and a BY subcommand.

• The first FILE subcommand must specify the master file. All other FILE subcommands identify the transaction files.

• BY specifies the key variables.

• All files must be sorted in ascending order by the key variables.

• By default, all variables from all input files are included in the new active dataset.

Subcommand Order Collapse Hide details

Subcommand Order

• The master file must be specified first.

• RENAME and IN must immediately follow the FILE subcommand to which they apply.

• BY must follow the FILE subcommands and any associated RENAME and IN subcommands.

• MAP, DROP, and KEEP must be specified after all FILE and RENAME subcommands.

Syntax Rules Collapse Hide details

Syntax Rules

• BY can be specified only once. However, multiple variables can be specified on BY. All files must be sorted in ascending order by the key variables named on BY.

• The master file cannot contain duplicate values for the key variables.

• RENAME can be repeated after each FILE subcommand and applies only to variables in the file named on the immediately preceding FILE subcommand.

• MAP can be repeated as often as needed.

Operations Collapse Hide details

Operations

• UPDATE reads all input files named on FILE and builds a new active dataset that replaces active dataset. The new active dataset is built when the data are read by one of the procedure commands or the EXECUTE, SAVE, or SORT CASES command.

• The new active dataset contains complete dictionary information from the input files, including variable names, labels, print and write formats, and missing-value indicators. The new active dataset also contains the documents from each input file, unless the DROP DOCUMENTS command is used.

• UPDATE copies all variables in order from the master file, then all variables in order from the first transaction file, then all variables in order from the second transaction file, and so on.

• Cases are updated when they are matched on the BY variable(s). If the master and transaction files contain common variables for matched cases, the values for those variables are taken from the transaction file, provided that the values are not missing or blanks. Missing or blank values in the transaction files are not used to update values in the master file.

• When UPDATE encounters duplicate keys within a transaction file, it applies each transaction sequentially to that case to produce one case per key value in the resulting file. If more than one transaction file is specified, the value for a variable comes from the last transaction file with a nonmissing value for that variable.

• Variables that are in the transaction files but not in the master file are added to the master file. Cases that do not contain those variables are assigned the system-missing value (for numerics) or blanks (for strings).

• Cases that are in the transaction files but not in the master file are added to the master file and are interleaved according to their values for the key variables.

• If the active dataset is named as an input file, any N and SAMPLE commands that have been specified are applied to the active dataset before files are combined.

• The TEMPORARY command cannot be in effect if the active dataset is used as an input file.

Limitations Collapse Hide details

Limitations

• A maximum of one BY subcommand. However, BY can specify multiple variables.

Related Topics

UPDATE
Examples (UPDATE command)
FILE Subcommand (UPDATE command)
BY Subcommand (UPDATE command)
RENAME Subcommand (UPDATE command)
DROP and KEEP Subcommands (UPDATE command)
IN Subcommand (UPDATE command)
MAP Subcommand (UPDATE command)


Examples (UPDATE command)

SORT CASES (command),SORT CASES (command),SORT CASES (command)
with UPDATE command,with UPDATE command,with UPDATE command
UPDATE (command),UPDATE (command),UPDATE (command)
with SORT CASES command,with SORT CASES command,with SORT CASES command

Basic Example

UPDATE FILE='/data/mailist.sav'
  /FILE='/data/newlist.sav'
  /BY=ID.

• mailist.sav is specified as the master file. newlist.sav is the transaction file. ID is the key variable.

• Both mailist.sav and newlist.sav must be sorted in ascending order of ID.

• If newlist.sav has cases or nonmissing variables that are not in mailist.sav, the new cases or variables are added to the resulting file.

Using Multiple Key Variables

SORT CASES BY LOCATN DEPT.
UPDATE  FILE='/data/master.sav' /FILE=* /BY LOCATN DEPT
  /KEEP AVGHOUR AVGRAISE LOCATN DEPT SEX HOURLY RAISE /MAP.
SAVE OUTFILE='/data/personnel.sav'.

• SORT CASES sorts the active dataset in ascending order of the variables to be named as key variables on UPDATE.

• UPDATE specifies master.sav as the master file and the sorted active dataset as the transaction file. The file master.sav must also be sorted by LOCATN and DEPT.

• BY specifies the key variables LOCATN and DEPT.

• KEEP specifies the subset and order of variables to be retained in the resulting file.

• MAP provides a list of the variables in the resulting file and the two input files.

• SAVE saves the resulting file as a data file in PASW Statistics format.

Related Topics

UPDATE
Overview (UPDATE command)
FILE Subcommand (UPDATE command)
BY Subcommand (UPDATE command)
RENAME Subcommand (UPDATE command)
DROP and KEEP Subcommands (UPDATE command)
IN Subcommand (UPDATE command)
MAP Subcommand (UPDATE command)


FILE Subcommand (UPDATE command)

FILE (subcommand),FILE (subcommand),FILE (subcommand)
UPDATE command,UPDATE command,UPDATE command
UPDATE (command),UPDATE (command),UPDATE (command)
FILE subcommand,FILE subcommand,FILE subcommand
updating data files,updating data files,updating data files
input files,input files,input files

FILE identifies each input file. At least two FILE subcommands are required on UPDATE: one specifies the master file and the other a transaction file. A separate FILE subcommand must be used to specify each transaction file.

• The first FILE subcommand must specify the master file.

• An asterisk on FILE refers to the active dataset.

• The files must be PASW Statistics data files or datasets available in the current session. File specifications should be enclosed in quotes.

• All files must be sorted in ascending order according to the variables specified on BY.

• The master file cannot contain duplicate values for the key variables. However, transaction files can and often do contain cases with duplicate keys (see Operations).

Related Topics

UPDATE
Overview (UPDATE command)
Examples (UPDATE command)
BY Subcommand (UPDATE command)
RENAME Subcommand (UPDATE command)
DROP and KEEP Subcommands (UPDATE command)
IN Subcommand (UPDATE command)
MAP Subcommand (UPDATE command)
Text Data Files (UPDATE command)


Text Data Files (UPDATE command)

DATA LIST (command),DATA LIST (command),DATA LIST (command)
with UPDATE command,with UPDATE command,with UPDATE command
UPDATE (command),UPDATE (command),UPDATE (command)
with DATA LIST command,with DATA LIST command,with DATA LIST command
updating data files,updating data files,updating data files
raw data files,raw data files,raw data files

You can update data from text data files -- or from any data format that PASW Statistics can read -- using defined datasets.

Example

DATA LIST FILE='/data/update.txt'
  ID 1-3 NAME 5-17 (A) ADDRESS 19-28 (A) ZIP 30-34.
SORT CASES BY ID.
DATASET NAME updatefile.
GET FILE='/maillist.sav'.
SORT CASES BY ID.
DATASET NAME=masterfile.
UPDATE FILE='masterfile'
 /RENAME=(STREET=ADDRESS)
 /FILE='updatefile'
 /BY=ID /MAP.

Related Topics

FILE Subcommand (UPDATE command)


BY Subcommand (UPDATE command)

UPDATE (command),UPDATE (command),UPDATE (command)
BY subcommand,BY subcommand,BY subcommand
BY (subcommand),BY (subcommand),BY (subcommand)
UPDATE command,UPDATE command,UPDATE command

BY specifies one or more identification, or key, variables that are used to match cases between files.

• BY must follow the FILE subcommands and any associated RENAME and IN subcommands.

• BY specifies the names of one or more key variables. The key variables must exist in all input files and have the same names in all of the files. The key variables can be string variables (long strings are allowed).

• All input files must be sorted in ascending order of the key variables. If necessary, use SORT CASES before UPDATE.

• Missing values for key variables are handled like any other values.

• The key variables in the master file must identify unique cases. If duplicate cases are found, the program issues an error and UPDATE is not executed. The system-missing value is treated as one single value.

Related Topics

UPDATE
Overview (UPDATE command)
Examples (UPDATE command)
FILE Subcommand (UPDATE command)
RENAME Subcommand (UPDATE command)
DROP and KEEP Subcommands (UPDATE command)
IN Subcommand (UPDATE command)
MAP Subcommand (UPDATE command)


RENAME Subcommand (UPDATE command)

UPDATE (command),UPDATE (command),UPDATE (command)
RENAME subcommand,RENAME subcommand,RENAME subcommand
RENAME (subcommand),RENAME (subcommand),RENAME (subcommand)
UPDATE command,UPDATE command,UPDATE command
updating data files,updating data files,updating data files
renaming variables,renaming variables,renaming variables

RENAME renames variables on the input files before they are processed by UPDATE. RENAME must follow the FILE subcommand that contains the variables to be renamed.

• RENAME applies only to the immediately preceding FILE subcommand. To rename variables from more than one input file, specify a RENAME subcommand after each FILE subcommand.

• Specifications for RENAME consist of a left parenthesis, a list of old variable names, an equals sign, a list of new variable names, and a right parenthesis. The two variable lists must name or imply the same number of variables. If only one variable is renamed, the parentheses are optional.

• More than one rename specification can be specified on a single RENAME subcommand, each enclosed in parentheses.

• The TO keyword can be used to refer to consecutive variables in the file and to generate new variable names.

• RENAME takes effect immediately. Any KEEP and DROP subcommands entered prior to a RENAME must use the old names, while KEEP and DROP subcommands entered after a RENAME must use the new names.

• All specifications within a single set of parentheses take effect simultaneously. For example, the specification RENAME (A,B = B,A) swaps the names of the two variables.

• Variables cannot be renamed to scratch variables.

Example

UPDATE FILE='/data/master.sav' /FILE=CLIENTS
  /RENAME=(TEL_NO, ID_NO = PHONE, ID)
  /BY ID.

• UPDATE updates the master phone list by using current information from the file CLIENTS.

• Two variables on CLIENTS are renamed prior to the match. TEL_NO is renamed PHONE to match the name used for phone numbers in the master file. ID_NO is renamed ID so that it will have the same name as the identification variable in the master file and can be used on the BY subcommand.

• The old variable names are listed before the equals sign, and the new variable names are listed in the same order after the equals sign. The parentheses are required.

• The BY subcommand matches cases according to client ID numbers.

Related Topics

UPDATE
Overview (UPDATE command)
Examples (UPDATE command)
FILE Subcommand (UPDATE command)
BY Subcommand (UPDATE command)
DROP and KEEP Subcommands (UPDATE command)
IN Subcommand (UPDATE command)
MAP Subcommand (UPDATE command)


DROP and KEEP Subcommands (UPDATE command)

UPDATE (command),UPDATE (command),UPDATE (command)
KEEP subcommand,KEEP subcommand,KEEP subcommand
KEEP (subcommand),KEEP (subcommand),KEEP (subcommand)
UPDATE command,UPDATE command,UPDATE command
UPDATE (command),UPDATE (command),UPDATE (command)
DROP subcommand,DROP subcommand,DROP subcommand
DROP (subcommand),DROP (subcommand),DROP (subcommand)
UPDATE command,UPDATE command,UPDATE command
updating data files,updating data files,updating data files
keeping variables,keeping variables,keeping variables
updating data files,updating data files,updating data files
dropping variables,dropping variables,dropping variables

DROP and KEEP are used to include a subset of variables in the resulting file. DROP specifies a set of variables to exclude, and KEEP specifies a set of variables to retain.

• DROP and KEEP do not affect the input files on disk.

• DROP and KEEP must follow all FILE and RENAME subcommands.

• DROP and KEEP must specify one or more variables. If RENAME is used to rename variables, specify the new names on DROP and KEEP.

• DROP cannot be used with variables created by the IN subcommand.

• The keyword ALL can be specified on KEEP. ALL must be the last specification on KEEP, and it refers to all variables not previously named on KEEP.

• KEEP can be used to change the order of variables in the resulting file. With KEEP, variables are kept in the order in which they are listed on the subcommand. If a variable is named more than once on KEEP, only the first mention of the variable is in effect; all subsequent references to that variable name are ignored.

• Multiple DROP and KEEP subcommands are allowed. Specifying a variable that is not in the active dataset or that has been dropped because of a previous DROP or KEEP subcommand results in an error and the UPDATE command is not executed.

Example

UPDATE FILE='/data/mailist.sav' /FILE='/data/newlist.sav' /RENAME=(STREET=ADDRESS)
  /BY ID /KEEP=NAME ADDRESS CITY STATE ZIP ID.

• KEEP specifies the variables to keep in the result file. The variables are stored in the order specified on KEEP.

Related Topics

UPDATE
Overview (UPDATE command)
Examples (UPDATE command)
FILE Subcommand (UPDATE command)
BY Subcommand (UPDATE command)
RENAME Subcommand (UPDATE command)
IN Subcommand (UPDATE command)
MAP Subcommand (UPDATE command)


IN Subcommand (UPDATE command)

IN (subcommand),IN (subcommand),IN (subcommand)
UPDATE command,UPDATE command,UPDATE command
UPDATE (command),UPDATE (command),UPDATE (command)
IN subcommand,IN subcommand,IN subcommand
updating data files,updating data files,updating data files
flag variables,flag variables,flag variables

IN creates a new variable in the resulting file that indicates whether a case came from the input file named on the preceding FILE subcommand. IN applies only to the file specified on the immediately preceding FILE subcommand.

• IN has only one specification, the name of the flag variable.

• The variable created by IN has the value 1 for every case that came from the associated input file and the value 0 if the case came from a different input file.

• Variables created by IN are automatically attached to the end of the resulting file and cannot be dropped.

Example

UPDATE  FILE=WEEK10 /FILE=WEEK11 /IN=INWEEK11 /BY=EMPID.

• IN creates the variable INWEEK11, which has the value 1 for all cases in the resulting file that came from the input file WEEK11 and the value 0 for those cases that were not in file WEEK11.

Related Topics

UPDATE
Overview (UPDATE command)
Examples (UPDATE command)
FILE Subcommand (UPDATE command)
BY Subcommand (UPDATE command)
RENAME Subcommand (UPDATE command)
DROP and KEEP Subcommands (UPDATE command)
MAP Subcommand (UPDATE command)


MAP Subcommand (UPDATE command)

updating data files,updating data files,updating data files
variable map,variable map,variable map
UPDATE (command),UPDATE (command),UPDATE (command)
MAP subcommand,MAP subcommand,MAP subcommand
MAP (subcommand),MAP (subcommand),MAP (subcommand)
UPDATE command,UPDATE command,UPDATE command

MAP produces a list of the variables in the new active dataset and the file or files from which they came. Variables are listed in the order in which they appear in the resulting file. MAP has no specifications and must be placed after all FILE, RENAME, and IN subcommands.

• Multiple MAP subcommands can be used. Each MAP shows the current status of the active dataset and reflects only the subcommands that precede the MAP subcommand.

• To obtain a map of the resulting file in its final state, specify MAP last.

• If a variable is renamed, its original and new names are listed. Variables created by IN are not included in the map, since they are automatically attached to the end of the file and cannot be dropped.

Related Topics

UPDATE
Overview (UPDATE command)
Examples (UPDATE command)
FILE Subcommand (UPDATE command)
BY Subcommand (UPDATE command)
RENAME Subcommand (UPDATE command)
DROP and KEEP Subcommands (UPDATE command)
IN Subcommand (UPDATE command)


USE

USE (command),USE (command),USE (command)
USE (command),USE (command),USE (command)
syntax chart,syntax chart,syntax chart
USE [{start date       }] [THRU [{end date       }]]
     {start case number}         {end case number}
     {FIRST            }         {LAST           }

    [ALL]

  /PERMANENT

This command takes effect immediately. It does not read the active dataset or execute pending transformations. See the topic Command Order for more information.

Example

USE Y 1960.

Related Topics

Overview (USE command)
Syntax Rules (USE command)
Examples (USE command)


Overview (USE command)

USE designates a range of observations to be used with time series procedures. Cases outside the defined range are filtered but not deleted from the active dataset unless the /PERMANENT subcommand is specified.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is either the start of the range, the end of the range, or both. You can also simply specify the keyword THRU or ALL.

• The default start is the first observation in the file, and the default end is the last observation.

• The keyword THRU is required if the end of the range is specified.

• The keyword ALL defines a USE range starting with the first observation and ending with the last observation in the series. It can be specified to restore processing to the entire series.

• The keyword THRU by itself is the same as specifying the keyword ALL.

Operations Collapse Hide details

Operations

• USE is ignored by the utility procedures CREATE and RMV. These procedures process all of the available data.

• The DATE command turns off all existing USE and PREDICT specifications.

• FILTER and USE are mutually exclusive. USE automatically turns off any previous FILTER command, and FILTER automatically turns off any previous USE command.

• USE remains in effect in a session until it is changed by another USE command or until a new DATE or FILTER command is issued.

• Any data selection specified on USE is in effect until the next USE command, the next DATE command, or the end of the session.

Limitations Collapse Hide details

Limitations

• A maximum of one range (one start and/or one end) can be specified.

Related Topics

USE
Syntax Rules (USE command)
Examples (USE command)


Syntax Rules (USE command)

USE (command),USE (command),USE (command)
DATE specifications,DATE specifications,DATE specifications
USE (command),USE (command),USE (command)
case specifications,case specifications,case specifications
USE (command),USE (command),USE (command)
FIRST and LAST keywords,FIRST and LAST keywords,FIRST and LAST keywords
FIRST (keyword),FIRST (keyword),FIRST (keyword)
USE command,USE command,USE command
LAST (keyword),LAST (keyword),LAST (keyword)
USE command,USE command,USE command
THRU (keyword),THRU (keyword),THRU (keyword)
USE command,USE command,USE command
ALL (keyword),ALL (keyword),ALL (keyword)
USE command,USE command,USE command

• The start and end can be specified as either DATE specifications or case (observation) numbers.

• DATE specifications and case numbers cannot be mixed on a USE command.

• Any observation within the file can be used as the start or end as long as the starting observation comes before the end observation.

Related Topics

USE
Overview (USE command)
Examples (USE command)
DATE Specifications (USE command)
Case Specifications (USE command)
Keywords FIRST and LAST (USE command)


DATE Specifications (USE command)

• A DATE specification consists of DATE keywords and values (see DATE). These specifications must correspond to existing DATE variables.

• If more than one DATE variable exists, the highest-order one must be used in the specification.

• Values on the keyword YEAR must have the same format (two or four digits) as the YEAR specifications on the DATE command.

Related Topics

Syntax Rules (USE command)
Case Specifications (USE command)
Keywords FIRST and LAST (USE command)


Case Specifications (USE command)

• The case number specification is the sequence number of the case (observation) as it is read by the program.

Related Topics

Syntax Rules (USE command)
DATE Specifications (USE command)
Keywords FIRST and LAST (USE command)


Keywords FIRST and LAST (USE command)

• The start can also be specified with the keyword FIRST, and the end, with the keyword LAST. These keywords designate the first and last cases in the file, respectively.

• The keywords FIRST and LAST can be used along with either DATE or case specifications.

Related Topics

Syntax Rules (USE command)
DATE Specifications (USE command)
Case Specifications (USE command)


PERMANENT Subcommand (USE command)

USE (commmand),USE (commmand),USE (commmand)
PERMANENT subcommand,PERMANENT subcommand,PERMANENT subcommand
PERMANENT (subcommand),PERMANENT (subcommand),PERMANENT (subcommand)
USE command,USE command,USE command

The PERMANENT subcommand deletes cases outside the defined range from the active dataset.


Examples (USE command)

USE (command),USE (command),USE (command)
examples,examples,examples
USE ALL.

• This command includes all observations in the file in the USE range.

• This specification is the same as USE THRU or USE FIRST THRU LAST.

USE Y 1960.

• This command selects observations starting with a YEAR_ value of 1960 through the last observation in the file. It is equivalent to USE Y 1960 THRU LAST.

USE THRU D 5.

• This command selects all cases from the first case in the file to the last one with a DAY_ value of 5. It is equivalent to USE FIRST THRU D 5.

USE THRU 5.

• This command selects cases starting with the first case and ending with the fifth case.

USE Y 1955 M 6 THRU Y 1960 M 6.

• This selects cases from June, 1955, through June, 1960.

USE W 16 D 3 THRU W 48 D 3.

• This example selects cases from day 3 of week 16 through day 3 of week 48.

USE CYCLE 2 OBS 4 THRU CYCLE 2 OBS 17.

• This example selects observations 4 through 17 of the second cycle.

Related Topics

USE
Overview (USE command)
Syntax Rules (USE command)


VALIDATEDATA

VALIDATEDATA (command),VALIDATEDATA (command),VALIDATEDATA (command)
VALIDATEDATA (command),VALIDATEDATA (command),VALIDATEDATA (command)
syntax chart,syntax chart,syntax chart
release history,release history,release history
Validate Data,Validate Data,Validate Data
command syntax,command syntax,command syntax

VALIDATEDATA is available in the Data Preparation option.

VALIDATEDATA       [VARIABLES=varlist]
                   [ID=varlist]
                   [CROSSVARRULES=rulelist]
 [/VARCHECKS       [STATUS={ON**}]
                           {OFF }
                   [PCTMISSING={70**   }]
                               {number }
                   [PCTEQUAL={95**  }]
                             {number}
                   [PCTUNEQUAL={90**  }]
                               {number}
                   [CV={0.001**}]
                       {number }
                   [STDDEV={0**   }]]
                           {number}
 [/IDCHECKS        [INCOMPLETE**] [DUPLICATE**] [NONE]]
 [/CASECHECKS      [REPORTEMPTY={YES**}] [SCOPE={ANALYSISVARS}]]
                                {NO   }         {ALLVARS     }
 [/RULESUMMARIES   [BYVARIABLE**] [BYRULE] [NONE]]
 [/CASEREPORT      DISPLAY={YES**}
                           {NO   }
                   [MINVIOLATIONS={1**    }]
                                  {integer}
                   [CASELIMIT={FIRSTN({500**  })}]]
                                      {integer}
                              {NONE             }
 [/SAVE            [EMPTYCASE[(varname)]]
                   [INCOMPLETEID[(varname)]]
                   [DUPLICATEID[(varname)]]
                   [RULEVIOLATIONS[(varname)]]]

** Default if the subcommand or keyword is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

Syntax for the VALIDATEDATA command can be generated from the Validate Data dialog.

Release History Collapse Hide details

Release History

Release 14.0

• Command introduced.

Example

VALIDATEDATA VARIABLES=ALL.

Related Topics

Overview (VALIDATEDATA command)
Examples (VALIDATEDATA command)
Variable Lists (VALIDATEDATA command)
VARCHECKS Subcommand (VALIDATEDATA command)
IDCHECKS Subcommand (VALIDATEDATA command)
CASECHECKS Subcommand (VALIDATEDATA command)
RULESUMMARIES Subcommand (VALIDATEDATA command)
CASEREPORT Subcommand (VALIDATEDATA command)
SAVE Subcommand (VALIDATEDATA command)


Overview (VALIDATEDATA command)

The VALIDATEDATA procedure identifies suspicious and invalid cases, variables, and data values in the active dataset.

The procedure can summarize two types of validation rules. Single-variable rules consist of a fixed set of checks that are applied to individual data values, such as range checks. Cross-variable rules are user-specified rules that typically examine combinations of data values for two or more variables.

Options Collapse Hide details

Options

Analysis Variables. The procedure can identify variables that have a high proportion of missing values as well as variables that are constant (or nearly so). You can set the maximum acceptable percentage of missing values as well as thresholds for considering categorical and scale variables as constants.

Case Identifiers. The procedure can identify incomplete and duplicate case identifiers. A single variable or a combination of variables can be treated as the identifier for a case.

Cases. The procedure can identify empty cases. A case can be regarded as empty if all analysis variables are blank or missing or all non-ID variables are blank or missing.

Single-Variable Rules. Single-variable validation rules can be summarized by variable and rule. Single-variable rules are defined using the DATAFILE ATTRIBUTE command and are linked to analysis variables using the VARIABLE ATTRIBUTE command.

Cross-Variable Rules. The procedure can summarize violations of cross-variable validation rules. Cross-variable rules are defined using the DATAFILE ATTRIBUTE command.

Saved Variables. You can save variables that identify suspicious cases and values in the active dataset.

Basic Specification Collapse Hide details

Basic Specification

• The minimum specification is a list of analysis variables, case identifier variables, or cross-variable rules.

• By default, if you specify analysis variables, the procedure reports all analysis variables that have a high proportion of missing values, as well as analysis variables that are constant or nearly so. If single-variable validation rules are defined for analysis variables, the procedure reports rule violations for each variable.

• By default, if case identifier variables are specified, the procedure reports all incomplete and duplicate case identifiers.

• If you specify cross-variable rules, the procedure reports the total number of cases that violated each rule.

• If you specify single-variable or cross-variable rules, a casewise report is shown that lists the first 500 cases that violated at least one validation rule.

• Empty cases are identified by default.

Syntax Rules Collapse Hide details

Syntax Rules

• Each subcommand is global and can be used only once.

• Subcommands can be used in any order.

• An error occurs if a keyword or attribute is specified more than once within a subcommand.

• Equals signs and slashes shown in the syntax chart are required.

• Subcommand names and keywords must be spelled out in full.

• Empty subcommands generate a procedure error.

Operations Collapse Hide details

Operations

• The procedure honors SPLIT FILE specifications. Split variables are filtered out of all variable lists.

• The procedure treats user- and system-missing values as missing values.

• An error occurs if no procedure output is requested.

Limitations Collapse Hide details

Limitations

• The weight variable, if specified, is ignored with a warning.

Validation Rules Collapse Hide details

Validation Rules

• VALIDATEDATA ignores invalid rules and links with a warning.

• If an analysis variable is linked to multiple rules, VALIDATEDATA applies the rules independently; it does not check for conflicts or redundancies among the constituent rules.

• A rule outcome variable must be associated with each rule that indicates which cases violated the rule. Outcome variables are created outside the VALIDATEDATA procedure and should be coded such that 1 indicates an invalid value or combination of values and 0 indicates a valid value.

• An error occurs if the same outcome variable is referenced by two or more rules.

• Values of all outcome variables are assumed to be current with respect to the active dataset.

Related Topics

VALIDATEDATA
Examples (VALIDATEDATA command)
Variable Lists (VALIDATEDATA command)
VARCHECKS Subcommand (VALIDATEDATA command)
IDCHECKS Subcommand (VALIDATEDATA command)
CASECHECKS Subcommand (VALIDATEDATA command)
RULESUMMARIES Subcommand (VALIDATEDATA command)
CASEREPORT Subcommand (VALIDATEDATA command)
SAVE Subcommand (VALIDATEDATA command)


Examples (VALIDATEDATA command)

Default Analysis Variable Validation

VALIDATEDATA VARIABLES=ALL.

• The only specification is a list of analysis variables (all variables in the active dataset).

• The procedure reports all variables with a high proportion of missing values, as well as variables that are constant or nearly so.

• In addition, empty cases are identified.

Default Case Identifier Variable Validation

VALIDATEDATA ID=Firstname Lastname.

• Two case identifier variables are specified.

• By default, the procedure reports cases having incomplete or duplicate case identifiers. The combination of Firstname and Lastname values is treated as a case identifier.

• In addition, empty cases are identified.

Non-Default Analysis and Case Identifier Variable Validation

VALIDATEDATA VARIABLES=Satis1 Satis2 Satis3
            ID=Firstname Lastname
 /VARCHECKS STATUS=ON PCTMISSING=30
 /IDCHECKS DUPLICATE
 /SAVE EMPTYCASE.

• Three ordinal satisfaction variables (Satis1, Satis2, Satis3) are specified as analysis variables.

• ID specifies two case identifier variables, Firstname and Lastname.

• VARCHECKS reports analysis variables with more than 30% missing values. By default, the procedure also reports categorical analysis variables if more than 95% of their cases fall into a single category.

• IDCHECKS reports cases that have duplicate case identifiers and turns off the default check for incomplete case identifiers.

• Empty cases are identified by default.

• SAVE saves a variable to the active dataset that indicates which cases are empty.

Using Single-Variable Validation Rules

DATAFILE ATTRIBUTE
 ATTRIBUTE=$VD.SRule[1] ("Label='Likert 1 to 5',"+
                         "Description='Likert 5-point scale',"+
                         "Type='Numeric',"+
                         "Domain='Range',"+
                         "FlagUserMissing='No',"+
                         "FlagSystemMissing='No',"+
                         "FlagBlank='No',"+
                         "Minimum='1',"+
                         "Maximum='5',"+
                         "FlagNoninteger='Yes'").

COMPUTE Likert1to5_Satis_=NOT(Satis LE 5 AND Satis GE 1 AND
                              Satis=TRUNC(Satis)).
VARIABLE ATTRIBUTE
  VARIABLES= Likert1to5_Satis_
  ATTRIBUTE=$VD.RuleOutcomeVar("Yes").

VARIABLE ATTRIBUTE
  VARIABLES=Satis
  ATTRIBUTE=$VD.SRuleRef[1]("Rule='$VD.SRule[1]',"+
                            "OutcomeVar='Likert1to5_Satis_'").

VALIDATEDATA VARIABLES=Satis
 /CASEREPORT DISPLAY=YES CASELIMIT=NONE
 /SAVE RULEVIOLATIONS.

• DATAFILE ATTRIBUTE defines a single-variable validation rule named $VD.SRule[1]. The rule flags any value that is not an integer within the range 1 to 5.

• The first VARIABLE ATTRIBUTE command links the rule to the variable Satis. It also references an outcome variable where 1 indicates an invalid value for the variable Satis.

• COMPUTE creates the rule outcome variable.

• The second VARIABLE ATTRIBUTE command marks Likert1to5_Satis_ as an outcome variable in the data dictionary.

• VALIDATEDATA specifies Satis as an analysis variable. In addition to performing default checks for constants, variables with a large proportion of missing values, and empty cases, the procedure summarizes violations of single-variable validation rules defined for Satis.

• CASEREPORT reports all cases having a rule violation.

• SAVE saves a variable to the active dataset that indicates the total number of validation rule violations per case.

Using Cross-Variable Validation Rules

DATAFILE ATTRIBUTE
 ATTRIBUTE=$VD.CRule[1]("Label='Pregnant Male',"+
                        "Expression='Sex =''Male'' AND Pregnant ''Yes''',"+
                        "OutcomeVar='PregnantMale_'").

COMPUTE PregnantMale_= Sex ='Male' AND Pregnant = 'Yes'.
VARIABLE ATTRIBUTE
  VARIABLES=PregnantMale_
  ATTRIBUTE=$VD.RuleOutcomeVar("Yes").

VALIDATEDATA CROSSVARRULES=$VD.CRule[1]
 /CASECHECKS REPORTEMPTY=NO.

• DATAFILE ATTRIBUTE defines the cross-variable rule $VD.CRule[1].

• COMPUTE creates the outcome variable PregnantMale_ referenced by the cross-variable rule. For PregnantMale_ , values of 1 identify cases containing males coded as being pregnant.

• VARIABLE ATTRIBUTE marks PregnantMale_ as an outcome variable in the data dictionary.

• VALIDATEDATA specifies $VD.CRule[1] as a cross-variable rule to be summarized. The procedure reports the total number of pregnant males in the active dataset.

• CASECHECKS turns off the default check for empty cases.

• By default, the first 500 cases that violated at least one validation rule are listed.

Related Topics

VALIDATEDATA
Overview (VALIDATEDATA command)
Variable Lists (VALIDATEDATA command)
VARCHECKS Subcommand (VALIDATEDATA command)
IDCHECKS Subcommand (VALIDATEDATA command)
CASECHECKS Subcommand (VALIDATEDATA command)
RULESUMMARIES Subcommand (VALIDATEDATA command)
CASEREPORT Subcommand (VALIDATEDATA command)
SAVE Subcommand (VALIDATEDATA command)


Variable Lists (VALIDATEDATA command)

You must specify VARIABLES, ID, or CROSSVARRULES.

VARIABLES (keyword),VARIABLES (keyword),VARIABLES (keyword)
VALIDATEDATA command,VALIDATEDATA command,VALIDATEDATA command
VARIABLES Keyword Collapse Hide details

VARIABLES Keyword

The VARIABLES list specifies analysis variables to be validated.

• Specify one or more analysis variables. ALL and TO can be used to refer to all variables or a range of variables, respectively.

• Repeated instances of the same variable are filtered out of the list.

• Rule outcome variables are filtered out of the list.

ID (keyword),ID (keyword),ID (keyword)
VALIDATEDATA command,VALIDATEDATA command,VALIDATEDATA command
ID Keyword Collapse Hide details

ID Keyword

The ID list specifies case ID variables to be validated. ID variables are also used to label casewise output.

• Specify one or more variables. If two or more ID variables are specified, the combination of their values is treated as a case identifier.

• Repeated instances of the same variable are filtered out of the list.

• Rule outcome variables are filtered out of the list.

CROSSVARRULES (keyword),CROSSVARRULES (keyword),CROSSVARRULES (keyword)
VALIDATEDATA command,VALIDATEDATA command,VALIDATEDATA command
CROSSVARRULES Keyword Collapse Hide details

CROSSVARRULES Keyword

The CROSSVARRULES keyword specifies cross-variable rules to be summarized.

• Specify one or more cross-variable rules of the form $VD.CRule[n], where n is a positive integer. Alternatively, you can provide a list of integers, where 1 means $VD.CRule[1], 2 means $VD.CRule[2], etc.

• The list accepts the keyword ALL, which signifies all cross-variable rules recorded in the data dictionary.

• Repeated instances of the same rule are filtered out of the list.

• A warning occurs if a specified rule does not exist. The rule is ignored.

Related Topics

VALIDATEDATA
Overview (VALIDATEDATA command)
Examples (VALIDATEDATA command)
VARCHECKS Subcommand (VALIDATEDATA command)
IDCHECKS Subcommand (VALIDATEDATA command)
CASECHECKS Subcommand (VALIDATEDATA command)
RULESUMMARIES Subcommand (VALIDATEDATA command)
CASEREPORT Subcommand (VALIDATEDATA command)
SAVE Subcommand (VALIDATEDATA command)


VARCHECKS Subcommand (VALIDATEDATA command)

VALIDATEDATA (command),VALIDATEDATA (command),VALIDATEDATA (command)
VARCHECKS subcommand,VARCHECKS subcommand,VARCHECKS subcommand
VARCHECKS (subcommand),VARCHECKS (subcommand),VARCHECKS (subcommand)
VALIDATEDATA command,VALIDATEDATA command,VALIDATEDATA command

The VARCHECKS subcommand specifies checks to be performed on analysis variables. The subcommand is ignored if no analysis variables are defined.

PCTMISSING (keyword),PCTMISSING (keyword),PCTMISSING (keyword)
VALIDATEDATA command,VALIDATEDATA command,VALIDATEDATA command
PCTEQUAL (keyword),PCTEQUAL (keyword),PCTEQUAL (keyword)
VALIDATEDATA command,VALIDATEDATA command,VALIDATEDATA command
PCTUNEQUAL (keyword),PCTUNEQUAL (keyword),PCTUNEQUAL (keyword)
VALIDATEDATA command,VALIDATEDATA command,VALIDATEDATA command
CV (keyword),CV (keyword),CV (keyword)
VALIDATEDATA command,VALIDATEDATA command,VALIDATEDATA command
STDDEV (keyword),STDDEV (keyword),STDDEV (keyword)
VALIDATEDATA command,VALIDATEDATA command,VALIDATEDATA command
STATUS (keyword),STATUS (keyword),STATUS (keyword)
VALIDATEDATA command,VALIDATEDATA command,VALIDATEDATA command
STATUS | Perform variable checks. By default, variable checks are performed. To turn off variable checks, specify STATUS=NO; any other VARCHECKS keywords are then ignored.
PCTMISSING | Maximum percentage of missing values. Reports analysis variables with a percentage of missing values greater than the specified value. The specified value must be a positive number less than or equal to 100. The default value is 70.
PCTEQUAL | Maximum percentage of cases representing a single category. Reports categorical analysis variables with a percentage of cases representing a single nonmissing category greater than the specified value. The specified value must be a positive number less than or equal to 100. The default value is 95. The percentage is based on cases with nonmissing values of the variable. PCTEQUAL is ignored if no categorical analysis variables are specified.
PCTUNEQUAL | Percentage of categories containing only one case in a categorical variable. If the percentage of an analysis variable's categories containing only one case is greater than the specified value, the variable is reported. The specified value must be a positive number less than or equal to 100. The default value is 90. PCTUNEQUAL is ignored if no categorical analysis variables are specified.
CV | Minimum absolute coefficient of variation. A variable's coefficient of variation is defined as its standard deviation divided by its mean. If the absolute value of the coefficient of variation is less than the specified value, the variable is reported.
 | This setting applies only to continuous predictors and only if the mean is non-zero. The specified value must be a non-negative number. Specifying 0 turns off the coefficient of variation check. The default value is 0.001. CV is ignored if no scale analysis variables are specified.
STDDEV | Minimum standard deviation. Reports variables whose standard deviation is less than the specified value. This setting applies only to scale analysis variables. The specified value must be a non-negative number. The default value is 0, which, in effect, turns off the standard deviation check. STDDEV is ignored if no scale analysis variables are specified.

Related Topics

VALIDATEDATA
Overview (VALIDATEDATA command)
Examples (VALIDATEDATA command)
Variable Lists (VALIDATEDATA command)
IDCHECKS Subcommand (VALIDATEDATA command)
CASECHECKS Subcommand (VALIDATEDATA command)
RULESUMMARIES Subcommand (VALIDATEDATA command)
CASEREPORT Subcommand (VALIDATEDATA command)
SAVE Subcommand (VALIDATEDATA command)


IDCHECKS Subcommand (VALIDATEDATA command)

VALIDATEDATA (command),VALIDATEDATA (command),VALIDATEDATA (command)
IDCHECKS subcommand,IDCHECKS subcommand,IDCHECKS subcommand
IDCHECKS (subcommand),IDCHECKS (subcommand),IDCHECKS (subcommand)
VALIDATEDATA command,VALIDATEDATA command,VALIDATEDATA command

The IDCHECKS subcommand specifies checks to be performed on case identifiers. The subcommand is ignored if no ID variables are specified.

INCOMPLETE (keyword),INCOMPLETE (keyword),INCOMPLETE (keyword)
VALIDATEDATA command,VALIDATEDATA command,VALIDATEDATA command
DUPLICATE (keyword),DUPLICATE (keyword),DUPLICATE (keyword)
VALIDATEDATA command,VALIDATEDATA command,VALIDATEDATA command
NONE (keyword),NONE (keyword),NONE (keyword)
VALIDATEDATA command,VALIDATEDATA command,VALIDATEDATA command
INCOMPLETE | Incomplete case identifiers. Reports cases with incomplete case identifiers. For a particular case, an identifier is considered incomplete if the value of any ID variable is blank or missing. Default.
DUPLICATE | Duplicate case identifiers. Reports cases with duplicate case identifiers. Incomplete identifiers are excluded from the set of possible duplicates. Default.
NONE | Case identifiers are not validated.

Related Topics

VALIDATEDATA
Overview (VALIDATEDATA command)
Examples (VALIDATEDATA command)
Variable Lists (VALIDATEDATA command)
VARCHECKS Subcommand (VALIDATEDATA command)
CASECHECKS Subcommand (VALIDATEDATA command)
RULESUMMARIES Subcommand (VALIDATEDATA command)
CASEREPORT Subcommand (VALIDATEDATA command)
SAVE Subcommand (VALIDATEDATA command)


CASECHECKS Subcommand (VALIDATEDATA command)

VALIDATEDATA (command),VALIDATEDATA (command),VALIDATEDATA (command)
CASECHECKS subcommand,CASECHECKS subcommand,CASECHECKS subcommand
CASECHECKS (subcommand),CASECHECKS (subcommand),CASECHECKS (subcommand)
VALIDATEDATA command,VALIDATEDATA command,VALIDATEDATA command

The CASECHECKS subcommand specifies checks to be performed on cases in the active dataset.

REPORTEMPTY (keyword),REPORTEMPTY (keyword),REPORTEMPTY (keyword)
VALIDATEDATA command,VALIDATEDATA command,VALIDATEDATA command
REPORTEMPTY Keyword Collapse Hide details

REPORTEMPTY Keyword

Empty cases are identified by default. To turn off the check for empty cases, specify REPORTEMPTY=NO.

SCOPE (keyword),SCOPE (keyword),SCOPE (keyword)
VALIDATEDATA command,VALIDATEDATA command,VALIDATEDATA command
ANALYSISVARS (keyword),ANALYSISVARS (keyword),ANALYSISVARS (keyword)
VALIDATEDATA command,VALIDATEDATA command,VALIDATEDATA command
ALLVARS (keyword),ALLVARS (keyword),ALLVARS (keyword)
VALIDATEDATA command,VALIDATEDATA command,VALIDATEDATA command
SCOPE Keyword Collapse Hide details

SCOPE Keyword

The SCOPE keyword controls which variables are considered when the procedure determines whether a case is empty. SCOPE is ignored if REPORTEMPTY=NO.

ANALYSISVARS | Procedure considers analysis variables only. A case is considered empty if values of all analysis variables are blank or missing. This is the default if analysis variables are specified. ANALYSISVARS is ignored if no analysis variables are specified.
ALLVARS | Procedure considers all variables. A case is regarded as empty if all variables in the active dataset are blank or missing. This is the default if no analysis variables are specified. ID variables, split file variables, and rule outcome variables are always disregarded when determining whether a case is empty.

Related Topics

VALIDATEDATA
Overview (VALIDATEDATA command)
Examples (VALIDATEDATA command)
Variable Lists (VALIDATEDATA command)
VARCHECKS Subcommand (VALIDATEDATA command)
IDCHECKS Subcommand (VALIDATEDATA command)
RULESUMMARIES Subcommand (VALIDATEDATA command)
CASEREPORT Subcommand (VALIDATEDATA command)
SAVE Subcommand (VALIDATEDATA command)


RULESUMMARIES Subcommand (VALIDATEDATA command)

VALIDATEDATA (command),VALIDATEDATA (command),VALIDATEDATA (command)
RULESUMMARIES subcommand,RULESUMMARIES subcommand,RULESUMMARIES subcommand
RULESUMMARIES (subcommand),RULESUMMARIES (subcommand),RULESUMMARIES (subcommand)
VALIDATEDATA command,VALIDATEDATA command,VALIDATEDATA command

The RULESUMMARIES subcommand is used to summarize violations of single-variable validation rules.

• By default, single-variable rule violations are summarized by analysis variable.

• Cross-variable validation rules are always summarized by rule.

• RULESUMMARIES generates a warning if summaries are requested but single-variable validation rules are not defined for at least one analysis variable.

BYVARIABLE (keyword),BYVARIABLE (keyword),BYVARIABLE (keyword)
VALIDATEDATA command,VALIDATEDATA command,VALIDATEDATA command
BYRULE (keyword),BYRULE (keyword),BYRULE (keyword)
VALIDATEDATA command,VALIDATEDATA command,VALIDATEDATA command
NONE (keyword),NONE (keyword),NONE (keyword)
VALIDATEDATA command,VALIDATEDATA command,VALIDATEDATA command
BYVARIABLE | Summarize by variable. For each analysis variable, shows all single-variable validation rules that were violated and the number of values that violated each rule. Also reports the total number of single-variable rule violations for each variable. This is the default.
BYRULE | Summarize by rule. For each single-variable validation rule, reports variables that violated the rule and the number of invalid values per variable. Also reports the total number of values that violated each rule across variables.
NONE | No summaries are produced for single-variable rules. An error occurs if NONE is specified along with any other RULESUMMARIES keyword.

Related Topics

VALIDATEDATA
Overview (VALIDATEDATA command)
Examples (VALIDATEDATA command)
Variable Lists (VALIDATEDATA command)
VARCHECKS Subcommand (VALIDATEDATA command)
IDCHECKS Subcommand (VALIDATEDATA command)
CASECHECKS Subcommand (VALIDATEDATA command)
CASEREPORT Subcommand (VALIDATEDATA command)
SAVE Subcommand (VALIDATEDATA command)


CASEREPORT Subcommand (VALIDATEDATA command)

VALIDATEDATA (command),VALIDATEDATA (command),VALIDATEDATA (command)
CASEREPORT subcommand,CASEREPORT subcommand,CASEREPORT subcommand
CASEREPORT (subcommand),CASEREPORT (subcommand),CASEREPORT (subcommand)
VALIDATEDATA command,VALIDATEDATA command,VALIDATEDATA command

The CASEREPORT subcommand is used to obtain a report that lists validation rule violations for individual cases.

• The case report includes violations of single-variable and cross-variable rules.

• CASEREPORT is ignored if no single-variable or cross-variable rules are applied.

DISPLAY (keyword),DISPLAY (keyword),DISPLAY (keyword)
VALIDATEDATA command,VALIDATEDATA command,VALIDATEDATA command
DISPLAY Keyword Collapse Hide details

DISPLAY Keyword

• The case report is shown by default. To turn off the report, specify DISPLAY=NO.

• If you specify a case identifier, it is used to label cases in the report. Cases are also identified by case number.

MINVIOLATIONS (keyword),MINVIOLATIONS (keyword),MINVIOLATIONS (keyword)
VALIDATEDATA command,VALIDATEDATA command,VALIDATEDATA command
MINVIOLATIONS Keyword Collapse Hide details

MINVIOLATIONS Keyword

• MINVIOLATIONS specifies the minimum number of rule violations required for a case to be included in the report. Specify a positive integer.

• The default is 1 violation.

• MINVIOLATIONS is ignored if DISPLAY=NO.

CASELIMIT (keyword),CASELIMIT (keyword),CASELIMIT (keyword)
VALIDATEDATA command,VALIDATEDATA command,VALIDATEDATA command
CASELIMIT Keyword Collapse Hide details

CASELIMIT Keyword

• The CASELIMIT keyword specifies the maximum number of cases included in the case report. By default the maximum is 500.

• To change the maximum number of cases in the report, specify FIRSTN followed by a positive integer in parentheses.

• NONE turns off the case limit. All cases that meet the MINVIOLATIONS threshold are reported.

• CASELIMIT is ignored if DISPLAY=NO.

Related Topics

VALIDATEDATA
Overview (VALIDATEDATA command)
Examples (VALIDATEDATA command)
Variable Lists (VALIDATEDATA command)
VARCHECKS Subcommand (VALIDATEDATA command)
IDCHECKS Subcommand (VALIDATEDATA command)
CASECHECKS Subcommand (VALIDATEDATA command)
RULESUMMARIES Subcommand (VALIDATEDATA command)
SAVE Subcommand (VALIDATEDATA command)


SAVE Subcommand (VALIDATEDATA command)

VALIDATEDATA (command),VALIDATEDATA (command),VALIDATEDATA (command)
SAVE subcommand,SAVE subcommand,SAVE subcommand
SAVE (subcommand),SAVE (subcommand),SAVE (subcommand)
VALIDATEDATA command,VALIDATEDATA command,VALIDATEDATA command

The SAVE subcommand specifies optional variables to save. Specify one or more keywords, each followed by an optional variable name.

• The name, if specified, must be enclosed in parentheses—for example, EMPTYCASE(Empty)—and must be a valid variable name.

• If you do not specify a variable name, the procedure uses a default name.

• If the default name is used and it conflicts with that of an existing variable, a suffix is added to make the name unique.

• If you specify a name and it conflicts with that of an existing variable, an error occurs.

EMPTYCASE (keyword),EMPTYCASE (keyword),EMPTYCASE (keyword)
VALIDATEDATA command,VALIDATEDATA command,VALIDATEDATA command
INCOMPLETEID (keyword),INCOMPLETEID (keyword),INCOMPLETEID (keyword)
VALIDATEDATA command,VALIDATEDATA command,VALIDATEDATA command
DUPLICATEID (keyword),DUPLICATEID (keyword),DUPLICATEID (keyword)
VALIDATEDATA command,VALIDATEDATA command,VALIDATEDATA command
RULEVIOLATIONS (keyword),RULEVIOLATIONS (keyword),RULEVIOLATIONS (keyword)
VALIDATEDATA command,VALIDATEDATA command,VALIDATEDATA command
EMPTYCASE | Empty case indicator. Empty cases are assigned the value 1. All other cases are coded 0. The default rootname is EmptyCase. Values of EMPTYCASE reflect the scope specified via the CASECHECKS subcommand.
INCOMPLETEID | Incomplete ID indicator. Cases with empty or incomplete case identifiers are assigned a value 1. All other cases are coded 0. The default rootname is IncompleteID.
DUPLICATEID | Duplicate ID group. Cases that have the same case identifier (other than cases with incomplete identifiers) are assigned the same group number. Cases with unique or incomplete identifiers are coded 0. The default rootname is DuplicateIDGroup.
RULEVIOLATIONS | Total count of single-variable and cross-variable validation rule violations. The default rootname is ValidationRuleViolations. Ignored if no single-variable or cross-variable validation rules are applied.

Related Topics

VALIDATEDATA
Overview (VALIDATEDATA command)
Examples (VALIDATEDATA command)
Variable Lists (VALIDATEDATA command)
VARCHECKS Subcommand (VALIDATEDATA command)
IDCHECKS Subcommand (VALIDATEDATA command)
CASECHECKS Subcommand (VALIDATEDATA command)
RULESUMMARIES Subcommand (VALIDATEDATA command)
CASEREPORT Subcommand (VALIDATEDATA command)


Single-Variable Validation Rules

single-variable rules,single-variable rules,single-variable rules
defining,defining,defining
DATAFILE ATTRIBUTE (command),DATAFILE ATTRIBUTE (command),DATAFILE ATTRIBUTE (command)
defining single-variable rules,defining single-variable rules,defining single-variable rules

To use a single-variable validation rule with the VALIDATEDATA procedure requires:

1. A rule definition (using the DATAFILE ATTRIBUTE command).

Defining a Single-Variable Validation Rule Collapse Hide details

Defining a Single-Variable Validation Rule

Single-variable validation rules are attributes of the data file and are generally defined according to the following syntax diagram:

DATAFILE ATTRIBUTE
  ATTRIBUTE=$VD.SRule[n]("Label='value',"+
                         "Description='value',"+
                         "Type='{Numeric}',"+
                                {String }
                                {Date   }
                         "Format='dateformat'"+
                         "Domain='{Range}',"+
                                  {List }
                         "FlagUserMissing='{Yes}'"+
                                           {No }
                         "FlagSystemMissing='{Yes}'"+
                                             {No }
                         "FlagBlank='{Yes}'"+
                                     {No }

  -- when Domain='Range' --
                         "Minimum='value',"+
                         "Maximum='value',"+
                         "FlagUnlabeled='{Yes}'"+
                                         {No }
                         "FlagNoninteger='{Yes}'"+
                                          {No }

  -- when Domain='List' --
                         "List='value1' 'value2' ... 'valuen'"+
                         "CaseSensitive='{Yes}'"+
                                         {No }
                         ").

• Single-variable rule attribute names must be of the form $VD.SRule[n], where n is a positive integer.

• Each rule specification includes a comma-separated list of properties that define the rule. Except where noted in the following table, each property is required. The order in which properties appear does not matter. Unrecognized rule properties are ignored. If the same property appears more than once in a rule specification, the value for the last one is honored.

Properties for single-variable rule attributes
Label | The label is text that uniquely identifies the rule among single-variable and cross-variable rules. It cannot be the null string. Leading and trailing blanks are trimmed for the purpose of determining the uniqueness of the label.
Description | Any text (optional).
Type | This is the type of variable to which the rule can be applied. Select from Numeric, String, and Date. It is used by VALIDATEDATA to ensure that the rule is internally consistent and appropriate for the variable to which it is applied.
Format | This allows you to select the date format for rules that can be applied to date variables. Specify any PASW Statistics date or time format. See the topic Date and Time Formats for more information. This property is not required if Type is not Date.
FlagUserMissing | Controls whether user-missing values are flagged as invalid. Specify Yes or No.
FlagSystemMissing | Controls whether system-missing values are flagged as invalid. This does not apply to string rule types. Specify Yes or No.
FlagBlank | Controls whether blank—that is, completely empty—string values are flagged as invalid. This does not apply to non-string rule types. Specify Yes or No.
Domain | You can specify the valid values either as a Range or a List of values. "Range" properties are ignored if Domain='List', and "List" properties are ignored if Domain='Range'.
Minimum | This property is optional**. Its value must be consistent with the rule type and format and be less than or equal to Maximum. The value is ignored if null. It cannot have a noninteger value if FlagNoninteger='Yes'.
Maximum | This property is optional**. Its value must be consistent with the rule type and format and be greater than or equal to Minimum. The value is ignored if null. It cannot have a non-integer value if FlagNoninteger='Yes'.
FlagUnlabeled | Controls whether unlabeled values are flagged as invalid. Specify Yes or No.
FlagNoninteger | Controls whether non-integer values are flagged as invalid. Specify Yes or No.
List | Specify one or more values consistent with the rule type and format. Null strings are ignored. Each item in the list must be quoted.
CaseSensitive | Controls whether case matters when string data values are checked against the list of acceptable values. Specify Yes or No.

** Range properties are optional if Domain='Range'. However, if Domain='Range' and FlagUserMissing, FlagSystemMissing, and FlagBlank are all set to No, then Minimum or Maximum must be specified or FlagUnlabeled or FlagNoninteger must be Yes. Otherwise, no values would be validated when the rule is applied.

VARIABLE ATTRIBUTE (command),VARIABLE ATTRIBUTE (command),VARIABLE ATTRIBUTE (command)
defining single-variable rules,defining single-variable rules,defining single-variable rules
COMPUTE (command),COMPUTE (command),COMPUTE (command)
defining single-variable rules,defining single-variable rules,defining single-variable rules
rule outcome variable,rule outcome variable,rule outcome variable
defining single-variable rules,defining single-variable rules,defining single-variable rules

2. A rule outcome variable (using COMPUTE and VARIABLE ATTRIBUTE).

Creating a Rule Outcome Variable Collapse Hide details

Creating a Rule Outcome Variable

Rule outcome variables are generated to validate values of variables and are generally defined according to the following syntax diagram:

COMPUTE outcomevar1=expression for analysisvar1.
COMPUTE outcomevar2=...

VARIABLE ATTRIBUTE
  VARIABLES=outcomevarlist
  ATTRIBUTE=$VD.RuleOutcomeVar("Yes").

• The COMPUTE expression for each outcome variable should generate the value 1 for invalid cases of a variable, according to the associated single-variable rule definition.

• The rule outcome variable is marked as such using the VARIABLE ATTRIBUTE command. Rule outcome variable attribute names must be $VD.RuleOutcomeVar with the property Yes.

3. A link between the analysis and outcome variable (using VARIABLE ATTRIBUTE).

Linking Analysis and Outcome Variables Collapse Hide details

Linking Analysis and Outcome Variables

Single-variable rule links are attributes of the analysis variables and are generally defined according to the following syntax diagram:

VARIABLE ATTRIBUTE
  VARIABLES=analysisvar1
  ATTRIBUTE=$VD.SRuleRef[n]("Rule='$VD.SRule[n]',"+
                            "OutcomeVar='outcomevar1'")
  /VARIABLES=analysisvar2...

• Single-variable rule link attribute names must be of the form $VD.SRuleRef[n], where n is a positive integer.

• The Rule and OutcomeVar properties are required. The order in which they appear does not matter. Unrecognized rule properties are ignored. If the same property appears more than once in a rule specification, the value for the last one is honored.

Properties for single-variable rule link attributes
Rule | An existing single-variable validation rule whose Type property is consistent with that of the variable to which it is linked. String rules can be applied to string variables.
Outcomevar | A rule outcome variable associated with the analysis variable.

Related Topics

Define Validation Rules
Cross-Variable Validation Rules
VALIDATEDATA


Cross-Variable Validation Rules

cross-variable rules,cross-variable rules,cross-variable rules
defining,defining,defining

To use a cross-variable validation rule with the VALIDATEDATA procedure requires:

DATAFILE ATTRIBUTE (command),DATAFILE ATTRIBUTE (command),DATAFILE ATTRIBUTE (command)
defining cross-variable rules,defining cross-variable rules,defining cross-variable rules

1. A rule definition (using the DATAFILE ATTRIBUTE command).

Creating a Rule Definition Collapse Hide details

Creating a Rule Definition

Cross-variable validation rules are attributes of the data file and are generally defined according to the following syntax diagram:

DATAFILE ATTRIBUTE
 ATTRIBUTE=$VD.CRule[1]("Label='value',"+
                        "Expression='value'."+
                        "OutcomeVar='outcomevar'").

Cross-variable rule attribute names must be of the form $VD.CRule[n], where n is a positive integer.

• Each rule specification includes a list of properties that define the rule. Each property is required. The order in which properties appear does not matter. Unrecognized rule properties are ignored. If the same property appears more than once in a rule specification, the value for the last one is honored.

Properties for cross-variable rule attributes
Label | The label is text that uniquely identifies the rule among single-variable and cross-variable rules. It cannot be the null string. Leading and trailing blanks are trimmed for the purpose of determining the uniqueness of the label.
Expression | The expression must be valid command syntax for the right side of a COMPUTE statement. Any variables used in the expression must exist in the data file.
OutcomeVar | A rule outcome variable associated with the cross-variable rule.
rule outcome variable,rule outcome variable,rule outcome variable
defining cross-variable rules,defining cross-variable rules,defining cross-variable rules
COMPUTE (command),COMPUTE (command),COMPUTE (command)
defining cross-variable rules,defining cross-variable rules,defining cross-variable rules
VARIABLE ATTRIBUTE (command),VARIABLE ATTRIBUTE (command),VARIABLE ATTRIBUTE (command)
defining cross-variable rules,defining cross-variable rules,defining cross-variable rules

2. A rule outcome variable (using COMPUTE and VARIABLE ATTRIBUTE).

Creating a Rule Outcome Variable Collapse Hide details

Creating a Rule Outcome Variable

COMPUTE outcomevar = expression.

VARIABLE ATTRIBUTE
  VARIABLES=outcomevar
  ATTRIBUTE=$VD.RuleOutcomeVar("Yes").

• The COMPUTE expression for each outcome variable should generate the value 1 for invalid cases. It should be equivalent to the Expression in the cross-variable rule definition.

• The rule outcome variable is marked as such using the VARIABLE ATTRIBUTE command. Rule outcome variable attribute names must be $VD.RuleOutcomeVar with the property Yes.

Related Topics

Define Validation Rules
Single-Variable Validation Rules
VALIDATEDATA


VALUE LABELS

value labels,value labels,value labels
adding,adding,adding
value labels,value labels,value labels
VALUE LABELS (command),VALUE LABELS (command),VALUE LABELS (command)
VALUE LABELS (command),VALUE LABELS (command),VALUE LABELS (command)
syntax chart,syntax chart,syntax chart
release history,release history,release history
VALUE LABELS varlist value 'label' value 'label'... [/varlist...]
             [/datevarlist ’value’ ’label’...]

This command takes effect immediately. It does not read the active dataset or execute pending transformations. See the topic Command Order for more information.

Value labels can also be set from the Variable View tab.

Release History Collapse Hide details

Release History

Release 14.0

• The maximum length of a value label is extended to 120 bytes (previous limit was 60 bytes).

Release 16.0

• Limitation preventing assignment of missing values to strings with a defined width greater than eight bytes removed.

Example

VALUE LABELS JOBGRADE 'P' 'Parttime Employee' 'C' 'Customer Support'.

Related Topics

Overview (VALUE LABELS command)
Examples (VALUE LABELS command)


Overview (VALUE LABELS command)

string variables,string variables,string variables
value labels,value labels,value labels
value labels,value labels,value labels
string variables,string variables,string variables
date format variables,date format variables,date format variables
value labels,value labels,value labels
value labels,value labels,value labels
date format variables,date format variables,date format variables
value labels,value labels,value labels
apostrophes in,apostrophes in,apostrophes in
value labels,value labels,value labels
length,length,length
value labels,value labels,value labels
concatenating strings,concatenating strings,concatenating strings
line breaks,line breaks,line breaks
in value labels,in value labels,in value labels
value labels,value labels,value labels
controlling wrapping,controlling wrapping,controlling wrapping
wrapping,wrapping,wrapping
value labels,value labels,value labels
ADD VALUE LABELS (command),ADD VALUE LABELS (command),ADD VALUE LABELS (command)
compared with VALUE LABELS command,compared with VALUE LABELS command,compared with VALUE LABELS command
VALUE LABELS (command),VALUE LABELS (command),VALUE LABELS (command)
compared with ADD VALUE LABELS command,compared with ADD VALUE LABELS command,compared with ADD VALUE LABELS command

VALUE LABELS deletes all existing value labels for the specified variable(s) and assigns new value labels. ADD VALUE LABELS can be used to add new labels or alter labels for specified values without deleting other existing labels.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is a variable name and the individual values with their assigned labels.

Syntax Rules Collapse Hide details

Syntax Rules

• Labels can be assigned to any previously defined variables.

• It is not necessary to enter value labels for all values for a variable.

• Each value label must be enclosed in quotes. For string variables, the values themselves must also be quotes.

• For date format variables (for example, DATE, ADATE), values expressed in date formats must be enclosed in quotes, and values must be expressed in the same date format as the defined date format for the variable.

• Value labels can contain any characters, including blanks. To enter an apostrophe as part of a label, enclose the label in double quotes or enter two apostrophes (two single quotes). See the topic String Values in Command Specifications for more information.

• Each value label can be up to 120 bytes long.

• The same labels can be assigned to the values of different variables by specifying a list of variable names. For string variables, the variables specified must be of equal length.

• Multiple sets of variable names and value labels can be specified on one VALUE LABELS command as long as the sets are separated by slashes.

• To continue a label from one command line to the next, specify a plus (+) sign before the continuation of the label. Each string segment of the label must be enclosed in quotes. To insert a blank between the strings, the blank must be included in the label specification.

• To control line wrapping of labels in pivot tables and charts, insert \n as part of the label wherever you want a line break. The \n is not displayed in output; it is interpreted as a line-break character. (Note: Labels will always wrap wherever \n appears in the defined label even if there is enough space to display the label without wrapping.)

Operations Collapse Hide details

Operations

• Unlike most transformations, VALUE LABELS takes effect as soon as it is encountered in the command sequence. Thus, special attention should be paid to its position among commands. See the topic Command Order for more information.

• VALUE LABELS deletes all previously assigned value labels for the specified variables.

• The value labels assigned are stored in the dictionary of the working file and are automatically displayed on the output from many procedures.

• If a specified value is longer than the format of the variable, the program will be unable to read the full value and may not be able to assign the value label correctly.

• If the value specified for a string variable is shorter than the format of the variable, the value specification is right-padded without warning.

Related Topics

VALUE LABELS
Examples (VALUE LABELS command)


Examples (VALUE LABELS command)

value labels,value labels,value labels
concatenating strings,concatenating strings,concatenating strings

Assigning Value Labels to Multiple Variables

VALUE LABELS V1 TO V3 1 'Officials & Managers'
                      6 'Service Workers'
                /V4 'N' 'New Employee'.

• Labels are assigned to the values 1 and 6 for the variables between and including V1 and V3 in the active dataset.

• Following the required slash, a label for the value N of V4 is specified. N is a string value and must be enclosed in quotes.

• If labels exist for the values 1 and 6 on V1 to V3 and the value N on V4, they are changed in the dictionary of the working file. If labels do not exist for these values, new labels are added to the dictionary.

• Existing labels for values other than 1 and 6 on V1 to V3 and the value N on V4 are deleted.

Combining Strings to Construct Value Labels

VALUE LABELS  OFFICE88 1 "EMPLOYEE'S OFFICE ASSIGNMENT PRIOR"
   + " TO 1988".

• The label for OFFICE88 is created by combining two strings with the plus sign. The blank between PRIOR and TO must be included in the first or second string to be included in the label.

Value Labels for String Variables

VALUE LABELS=STATE REGION 'U' "UNKNOWN".

• The label UNKNOWN is assigned to the value U for both STATE and REGION.

• STATE and REGION must be string variables of equal length. If STATE and REGION have unequal lengths, a separate specification must be made for each, as in

VALUE LABELS STATE 'U' "UNKNOWN" / REGION 'U' "UNKNOWN".

Using Value Labels with DATA LIST

DATA LIST / CITY 1-8(A) STATE 10-12(A).
VALUE LABELS  STATE 'TEX' "TEXAS" 'TEN' "TENNESSEE"
                    'MIN' "MINNESOTA".
BEGIN DATA
AUSTIN   TEX
MEMPHIS  TEN
ST. PAUL MIN
END DATA.
FREQUENCIES VARIABLES=STATE.

• The DATA LIST command defines two variables. CITY is eight characters wide and STATE is three characters. The values are included between the BEGIN DATA and END DATA commands.

• The VALUE LABELS command assigns labels to three values of variable STATE. Each value and each label is specified in quotes.

• The format for the variable STATE must be at least three characters wide because the specified values, TEX, TEN, and MIN, are three characters. If the format for STATE were two characters, the program would issue a warning. This would occur even though the values named on VALUE LABELS and the values after BEGIN DATA agree.

Forcing Value Labels to Wrap

VALUE LABELS myvar 1 "A long value label \n that always wraps".
FREQUENCIES myvar.
Using \n to wrap value labels

Related Topics

VALUE LABELS
Overview (VALUE LABELS command)


VARCOMP

Variance Components,Variance Components,Variance Components
command syntax,command syntax,command syntax
VARCOMP (command),VARCOMP (command),VARCOMP (command)
VARCOMP (command),VARCOMP (command),VARCOMP (command)
syntax chart,syntax chart,syntax chart
mixed models,mixed models,mixed models
VARCOMP command,VARCOMP command,VARCOMP command
random effects,random effects,random effects
VARCOMP command,VARCOMP command,VARCOMP command

VARCOMP is available in the Advanced Statistics option.

VARCOMP dependent variable BY factor list [WITH covariate list]

  /RANDOM = factor [factor ...]

 [/METHOD = {MINQUE({1})**}]
                    {0}
            {ML           }
            {REML         }
            {SSTYPE({3})  }
                    {1}

 [/INTERCEPT = {INCLUDE**}]
               {EXCLUDE    }

 [/MISSING = {EXCLUDE**}]
             {INCLUDE  }

 [/REGWGT = varname]

 [/CRITERIA = [CONVERGE({1.0E-8**})] [EPS({1.0E-8**})] [ITERATE({50**})]]
                        {n       }        {n       }            {n   }

 [/PRINT = [EMS] [HISTORY({1**})] [SS]]
                          {n  }

 [/OUTFILE = [VAREST] [{COVB}] ('savfile'|'dataset') ]
                       {CORB}

 [/DESIGN = {[INTERCEPT] [effect effect ...]}]

** Default if the subcommand or keyword is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See VARCOMP Algorithms for computational details for this procedure.

Syntax for the VARCOMP command can be generated from the Variance Components Analysis dialog.

Example

VARCOMP Y1 BY B C WITH X1 X2
 /RANDOM = C.

Related Topics

Overview (VARCOMP command)
Example
Variable List (VARCOMP command)
RANDOM Subcommand (VARCOMP command)
METHOD Subcommand (VARCOMP command)
INTERCEPT Subcommand (VARCOMP command)
MISSING Subcommand (VARCOMP command)
REGWGT Subcommand (VARCOMP command)
CRITERIA Subcommand (VARCOMP command)
PRINT Subcommand (VARCOMP command)
OUTFILE Subcommand (VARCOMP command)
DESIGN Subcommand (VARCOMP command)


Overview (VARCOMP command)

The VARCOMP procedure estimates variance components for mixed models. Following the general linear model approach, VARCOMP uses indicator variable coding to construct a design matrix and then uses one of the four available methods to estimate the contribution of each random effect to the variance of the dependent variable.

Options Collapse Hide details

Options

Regression Weights. You can use the REGWGT subcommand to specify regression weights for the model.

Estimation Methods. You can use the METHOD subcommand to use one of the four methods that are available for estimating variance components.

Tuning the Algorithm. You can control the values of algorithm-tuning parameters with the CRITERIA subcommand.

Optional Output. You can request additional output using the PRINT subcommand.

Saving the Results. You can save the variance component estimates and their asymptotic covariance matrix (if produced) to an external data file.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is one dependent variable and one or more factor variables (that define the crosstabulation) and one or more factor variables on the RANDOM subcommand (to classify factors into either fixed or random factors). By default, VARCOMP uses the minimum norm quadratic unbiased estimator with unit prior weights to estimate variance components. Default output includes a factor-level information table and a variance component estimates table.

Subcommand Order Collapse Hide details

Subcommand Order

• The variable specification must come first.

• Other subcommands can be specified in any order.

Syntax Rules Collapse Hide details

Syntax Rules

• Only one dependent variable can be specified.

• At least one factor must be specified after BY.

• At least one factor must be specified on the RANDOM subcommand.

Related Topics

VARCOMP
Example
Variable List (VARCOMP command)
RANDOM Subcommand (VARCOMP command)
METHOD Subcommand (VARCOMP command)
INTERCEPT Subcommand (VARCOMP command)
MISSING Subcommand (VARCOMP command)
REGWGT Subcommand (VARCOMP command)
CRITERIA Subcommand (VARCOMP command)
PRINT Subcommand (VARCOMP command)
OUTFILE Subcommand (VARCOMP command)
DESIGN Subcommand (VARCOMP command)


Example

VARCOMP
  amtspent  BY storeid   shopfor usecoup
  /RANDOM = storeid
  /METHOD = SSTYPE (3)
  /PRINT = SS
  /PRINT = EMS
  /DESIGN = shopfor usecoup shopfor*usecoup storeid
  /INTERCEPT = INCLUDE .

• The procedure fits a model to amtspent using storeid, shopfor, and usecoup as factors.

• RANDOM identifies storeid as a random effect.

• METHOD specifies ANOVA estimation using Type III sums of squares.

• PRINT requests tabular display of the sums of squares and expected mean squares.

• DESIGN indicates that the model fit is a factorial model for the fixed effects, plus a main-effects term for the random effect. The intercept is included.

For discussion of output from this syntax and to place the example in context, see Using Variance Components to Assess a Random Effect.

Related Topics

VARCOMP
Overview (VARCOMP command)
Variable List (VARCOMP command)
RANDOM Subcommand (VARCOMP command)
METHOD Subcommand (VARCOMP command)
INTERCEPT Subcommand (VARCOMP command)
MISSING Subcommand (VARCOMP command)
REGWGT Subcommand (VARCOMP command)
CRITERIA Subcommand (VARCOMP command)
PRINT Subcommand (VARCOMP command)
OUTFILE Subcommand (VARCOMP command)
DESIGN Subcommand (VARCOMP command)


Variable List (VARCOMP command)

The variable list specifies the dependent variable and the factors in the model.

• The dependent variable must be the first specification on VARCOMP.

• The factors follow the dependent variable and are separated from it by the keyword BY.

• The covariates, if any, follow the factors and are separated from the dependent variable and the factors by the keyword WITH.

• The dependent variable and the covariates must be numeric, but the factor variables can be either numeric or string.

Related Topics

VARCOMP
Overview (VARCOMP command)
Example
RANDOM Subcommand (VARCOMP command)
METHOD Subcommand (VARCOMP command)
INTERCEPT Subcommand (VARCOMP command)
MISSING Subcommand (VARCOMP command)
REGWGT Subcommand (VARCOMP command)
CRITERIA Subcommand (VARCOMP command)
PRINT Subcommand (VARCOMP command)
OUTFILE Subcommand (VARCOMP command)
DESIGN Subcommand (VARCOMP command)


RANDOM Subcommand (VARCOMP command)

VARCOMP (command),VARCOMP (command),VARCOMP (command)
RANDOM subcommand,RANDOM subcommand,RANDOM subcommand
RANDOM (subcommand),RANDOM (subcommand),RANDOM (subcommand)
VARCOMP command,VARCOMP command,VARCOMP command
random effects,random effects,random effects

The RANDOM subcommand allows you to specify random factors.

• You must specify at least one RANDOM subcommand with one random factor.

• You can specify multiple random factors on a RANDOM subcommand. You can also use multiple RANDOM subcommands. Specifications are accumulative.

• Only factors that are listed after the keyword BY in the variable list are allowed on the RANDOM subcommand.

• If you specify a factor on RANDOM, all effects containing the factor are automatically declared as random effects.

Example

VARCOM Y BY DRUG SUBJECT
 /RANDOM = SUBJECT
 /DESIGN = DRUG DRUG*SUBJECT.

• This example specifies a mixed model where DRUG is the fixed factor and SUBJECT is a random factor.

• The default method MINQUE(1) is used to estimate the contribution of the random effect DRUG*SUBJECT to the variance of the dependent variable.

Related Topics

VARCOMP
Overview (VARCOMP command)
Example
Variable List (VARCOMP command)
METHOD Subcommand (VARCOMP command)
INTERCEPT Subcommand (VARCOMP command)
MISSING Subcommand (VARCOMP command)
REGWGT Subcommand (VARCOMP command)
CRITERIA Subcommand (VARCOMP command)
PRINT Subcommand (VARCOMP command)
OUTFILE Subcommand (VARCOMP command)
DESIGN Subcommand (VARCOMP command)


METHOD Subcommand (VARCOMP command)

VARCOMP (command),VARCOMP (command),VARCOMP (command)
METHOD subcommand,METHOD subcommand,METHOD subcommand
METHOD (subcommand),METHOD (subcommand),METHOD (subcommand)
VARCOMP command,VARCOMP command,VARCOMP command

The METHOD subcommand offers four different methods for estimating the variances of the random effects. If more than one METHOD subcommand is specified, only the last subcommand is in effect. If the subcommand is not specified, the default method MINQUE(1) is used. METHOD cannot be specified without a keyword.

minimum norm quadratic unbiased estimator,minimum norm quadratic unbiased estimator,minimum norm quadratic unbiased estimator
VARCOMP command,VARCOMP command,VARCOMP command
VARCOMP (command),VARCOMP (command),VARCOMP (command)
minimum norm quadratic unbiased estimator,minimum norm quadratic unbiased estimator,minimum norm quadratic unbiased estimator
VARCOMP (command),VARCOMP (command),VARCOMP (command)
MINQUE keyword,MINQUE keyword,MINQUE keyword
MINQUE (keyword),MINQUE (keyword),MINQUE (keyword)
VARCOMP command,VARCOMP command,VARCOMP command
restricted maximum likelihood estimation,restricted maximum likelihood estimation,restricted maximum likelihood estimation
VARCOMP command,VARCOMP command,VARCOMP command
VARCOMP (command),VARCOMP (command),VARCOMP (command)
restricted maximum likelihood estimation,restricted maximum likelihood estimation,restricted maximum likelihood estimation
maximum-likelihood method,maximum-likelihood method,maximum-likelihood method
VARCOMP command,VARCOMP command,VARCOMP command
VARCOMP (command),VARCOMP (command),VARCOMP (command)
maximum-likelihood method,maximum-likelihood method,maximum-likelihood method
ML (keyword),ML (keyword),ML (keyword)
VARCOMP command,VARCOMP command,VARCOMP command
REML (keyword),REML (keyword),REML (keyword)
VARCOMP command,VARCOMP command,VARCOMP command
VARCOMP (command),VARCOMP (command),VARCOMP (command)
sum-of-squares method,sum-of-squares method,sum-of-squares method
Type I sum-of-squares method,Type I sum-of-squares method,Type I sum-of-squares method
VARCOMP command,VARCOMP command,VARCOMP command
Type III sum-of-squares method,Type III sum-of-squares method,Type III sum-of-squares method
VARCOMP command,VARCOMP command,VARCOMP command
sum of squares,sum of squares,sum of squares
Type I,Type I,Type I
sum of squares,sum of squares,sum of squares
Type III,Type III,Type III
SSTYPE (keyword),SSTYPE (keyword),SSTYPE (keyword)
VARCOMP command,VARCOMP command,VARCOMP command
MINQUE(n) | Minimum norm quadratic unbiased estimator. This method is the default method. When n = 0, zero weight is assigned to the random effects and unit weight is assigned to the residual term. When n = 1, unit weight is assigned to both the random effects and the residual term. By default, n = 1.
ML | Maximum likelihood method. Parameters of the fixed effects and variances of the random effects are estimated simultaneously. However, only the variances are reported.
REML | Restricted maximum likelihood method. Variances of the random effects are estimated based on residuals of the model after adjusting for the fixed effects.
SSTYPE(n) | ANOVA method. The ANOVA method equates the expected mean squares of the random effects to their observed mean squares. Their variances are then estimated by solving a system of linear equations. The expected mean squares are computed based on the chosen type of sum of squares. Two types are available in VARCOMP: Type I (n = 1) and Type III (n = 3). Type III is the default option for this method.

Related Topics

VARCOMP
Overview (VARCOMP command)
Example
Variable List (VARCOMP command)
RANDOM Subcommand (VARCOMP command)
INTERCEPT Subcommand (VARCOMP command)
MISSING Subcommand (VARCOMP command)
REGWGT Subcommand (VARCOMP command)
CRITERIA Subcommand (VARCOMP command)
PRINT Subcommand (VARCOMP command)
OUTFILE Subcommand (VARCOMP command)
DESIGN Subcommand (VARCOMP command)


INTERCEPT Subcommand (VARCOMP command)

VARCOMP (command),VARCOMP (command),VARCOMP (command)
INTERCEPT subcommand,INTERCEPT subcommand,INTERCEPT subcommand
INTERCEPT (subcommand),INTERCEPT (subcommand),INTERCEPT (subcommand)
VARCOMP command,VARCOMP command,VARCOMP command
intercept,intercept,intercept
include or exclude,include or exclude,include or exclude

The INTERCEPT subcommand controls whether an intercept term is included in the model. If more than one INTERCEPT subcommand is specified, only the last subcommand is in effect.

INCLUDE (keyword),INCLUDE (keyword),INCLUDE (keyword)
VARCOMP command,VARCOMP command,VARCOMP command
EXCLUDE (keyword),EXCLUDE (keyword),EXCLUDE (keyword)
VARCOMP command,VARCOMP command,VARCOMP command
INCLUDE | Include the intercept term. The intercept (constant) term is included in the model. This setting is the default when INTERCEPT is not specified.
EXCLUDE | Exclude the intercept term. The intercept (constant) term is excluded from the model. EXCLUDE is ignored if you specify the keyword INTERCEPT on the DESIGN subcommand.

Related Topics

VARCOMP
Overview (VARCOMP command)
Example
Variable List (VARCOMP command)
RANDOM Subcommand (VARCOMP command)
METHOD Subcommand (VARCOMP command)
MISSING Subcommand (VARCOMP command)
REGWGT Subcommand (VARCOMP command)
CRITERIA Subcommand (VARCOMP command)
PRINT Subcommand (VARCOMP command)
OUTFILE Subcommand (VARCOMP command)
DESIGN Subcommand (VARCOMP command)


MISSING Subcommand (VARCOMP command)

VARCOMP (command),VARCOMP (command),VARCOMP (command)
MISSING subcommand,MISSING subcommand,MISSING subcommand
MISSING (subcommand),MISSING (subcommand),MISSING (subcommand)
VARCOMP command,VARCOMP command,VARCOMP command

By default, cases with missing values for any of the variables on the VARCOMP variable list are excluded from the analyses. The MISSING subcommand allows you to include cases with user-missing values.

• Pairwise deletion of missing data is not available in VARCOMP.

• If more than one MISSING subcommand is specified, only the last subcommand is in effect.

EXCLUDE (keyword),EXCLUDE (keyword),EXCLUDE (keyword)
VARCOMP command,VARCOMP command,VARCOMP command
INCLUDE (keyword),INCLUDE (keyword),INCLUDE (keyword)
VARCOMP command,VARCOMP command,VARCOMP command
EXCLUDE | Exclude both user-missing and system-missing values. This setting is the default when MISSING is not specified.
INCLUDE | Treat user-missing values as valid. System-missing values cannot be included in the analysis.

Related Topics

VARCOMP
Overview (VARCOMP command)
Example
Variable List (VARCOMP command)
RANDOM Subcommand (VARCOMP command)
METHOD Subcommand (VARCOMP command)
INTERCEPT Subcommand (VARCOMP command)
REGWGT Subcommand (VARCOMP command)
CRITERIA Subcommand (VARCOMP command)
PRINT Subcommand (VARCOMP command)
OUTFILE Subcommand (VARCOMP command)
DESIGN Subcommand (VARCOMP command)


REGWGT Subcommand (VARCOMP command)

VARCOMP (command),VARCOMP (command),VARCOMP (command)
REGWGT subcommand,REGWGT subcommand,REGWGT subcommand
REGWGT (subcommand),REGWGT (subcommand),REGWGT (subcommand)
VARCOMP command,VARCOMP command,VARCOMP command

REGWGT specifies the weight variable. Values of this variable are used as regression weights in a weighted least squares model.

• Specify one numeric variable name on the REGWGT subcommand.

• Cases with nonpositive values in the regression weight variable are excluded from the analyses.

• If more than one variable is specified on the same REGWGT subcommand, only the last variable is in effect.

• If more than one REGWGT subcommand is specified, only the last subcommand is in effect.

Related Topics

VARCOMP
Overview (VARCOMP command)
Example
Variable List (VARCOMP command)
RANDOM Subcommand (VARCOMP command)
METHOD Subcommand (VARCOMP command)
INTERCEPT Subcommand (VARCOMP command)
MISSING Subcommand (VARCOMP command)
CRITERIA Subcommand (VARCOMP command)
PRINT Subcommand (VARCOMP command)
OUTFILE Subcommand (VARCOMP command)
DESIGN Subcommand (VARCOMP command)


CRITERIA Subcommand (VARCOMP command)

VARCOMP (command),VARCOMP (command),VARCOMP (command)
CRITERIA subcommand,CRITERIA subcommand,CRITERIA subcommand
CRITERIA (subcommand),CRITERIA (subcommand),CRITERIA (subcommand)
VARCOMP command,VARCOMP command,VARCOMP command

The CRITERIA subcommand specifies numerical tolerance for checking singularity and offers control of the iterative algorithm that is used for ML or REML estimation.

• Multiple CRITERIA subcommands are allowed.

• The last specified value for any keyword takes effect. If no value is specified, the default is used.

EPS (keyword),EPS (keyword),EPS (keyword)
VARCOMP command,VARCOMP command,VARCOMP command
CONVERGE (keyword),CONVERGE (keyword),CONVERGE (keyword)
VARCOMP command,VARCOMP command,VARCOMP command
ITERATE (keyword),ITERATE (keyword),ITERATE (keyword)
VARCOMP command,VARCOMP command,VARCOMP command
EPS(n) | Epsilon value that is used as tolerance in checking singularity. The value for n must be a positive value. The default is 1.0E-8.
CONVERGE(n) | Convergence criterion. Convergence is assumed if the relative change in the objective function is less than the specified value. The value for n must be a positive value. The default is 1.0E-8. This process is available only if you specify ML or REML on the METHOD subcommand.
ITERATE(n) | Maximum number of iterations. The value for n must be a positive integer. The default is 50. This process is available only if you specify ML or REML on the METHOD subcommand.

Related Topics

VARCOMP
Overview (VARCOMP command)
Example
Variable List (VARCOMP command)
RANDOM Subcommand (VARCOMP command)
METHOD Subcommand (VARCOMP command)
INTERCEPT Subcommand (VARCOMP command)
MISSING Subcommand (VARCOMP command)
REGWGT Subcommand (VARCOMP command)
PRINT Subcommand (VARCOMP command)
OUTFILE Subcommand (VARCOMP command)
DESIGN Subcommand (VARCOMP command)


PRINT Subcommand (VARCOMP command)

VARCOMP (command),VARCOMP (command),VARCOMP (command)
PRINT subcommand,PRINT subcommand,PRINT subcommand
PRINT (subcommand),PRINT (subcommand),PRINT (subcommand)
VARCOMP command,VARCOMP command,VARCOMP command

The PRINT subcommand controls the display of optional output. If PRINT is not specified, the default output includes a factor information table and a variance component estimates table.

• For the maximum likelihood (ML) and restricted maximum likelihood (REML) methods, an asymptotic covariance matrix of the variance estimates table is also displayed.

• If more than one PRINT subcommand is specified, the specifications are accumulated. However, if you specify the keyword HISTORY more than once but with different values for n, the last specification is in effect.

EMS (keyword),EMS (keyword),EMS (keyword)
VARCOMP command,VARCOMP command,VARCOMP command
HISTORY (keyword),HISTORY (keyword),HISTORY (keyword)
VARCOMP command,VARCOMP command,VARCOMP command
SS (keyword),SS (keyword),SS (keyword)
VARCOMP command,VARCOMP command,VARCOMP command
EMS | Expected mean squares. This output shows expected mean squares of all of the effects. This process is available only if you specify SSTYPE(n) on the METHOD subcommand.
HISTORY(n) | Iteration history. The table contains the objective function value and variance component estimates at every n iteration. The value for n must be a positive integer. The default is 1. The last iteration is always printed if HISTORY is specified on PRINT. This process is available only if you specify ML or REML on the METHOD subcommand.
SS | Sums of squares. The table contains sums of squares, degrees of freedom, and mean squares for each source of variation. This process is available only if you specify SSTYPE(n) on the METHOD subcommand.

Related Topics

VARCOMP
Overview (VARCOMP command)
Example
Variable List (VARCOMP command)
RANDOM Subcommand (VARCOMP command)
METHOD Subcommand (VARCOMP command)
INTERCEPT Subcommand (VARCOMP command)
MISSING Subcommand (VARCOMP command)
REGWGT Subcommand (VARCOMP command)
CRITERIA Subcommand (VARCOMP command)
OUTFILE Subcommand (VARCOMP command)
DESIGN Subcommand (VARCOMP command)


OUTFILE Subcommand (VARCOMP command)

VARCOMP (command),VARCOMP (command),VARCOMP (command)
OUTFILE subcommand,OUTFILE subcommand,OUTFILE subcommand
OUTFILE (subcommand),OUTFILE (subcommand),OUTFILE (subcommand)
VARCOMP command,VARCOMP command,VARCOMP command

The OUTFILE subcommand writes the variance component estimates to a data file or a previously declared dataset (DATASET DECLARE command) that can be used in other procedures. For the ML and REML methods, OUTFILE can also write the asymptotic covariance or correlation matrix. If more than one OUTFILE subcommand is specified, the last specification is in effect.

• OUTFILE writes to an external data file or previously declared dataset. You must specify a quoted file specification or dataset name in parentheses.

• COVB and CORB are available only if you specify ML or REML on the METHOD subcommand.

• COVB and CORB are mutually exclusive; only one of them can be specified on an OUTFILE subcommand.

VAREST (keyword),VAREST (keyword),VAREST (keyword)
VARCOMP command,VARCOMP command,VARCOMP command
COVB (keyword),COVB (keyword),COVB (keyword)
VARCOMP command,VARCOMP command,VARCOMP command
CORB (keyword),CORB (keyword),CORB (keyword)
VARCOMP command,VARCOMP command,VARCOMP command
VAREST | Variance component estimates. A variable will be created to contain the estimates, and another variable will be created to hold the labels of the variance components.
COVB | Covariance matrix. This matrix is the asymptotic covariance matrix of the variance component estimates. One variable is created for each variance component.
CORB | Correlation matrix. This matrix is the asymptotic correlation matrix of the variance component estimates. One variable is created for each variance component.
('savfile'|'dataset') | Output file specification or previously declared dataset name. Specify a quoted file specification or dataset name, enclosed in parentheses. The variance component estimates and the asymptotic covariance or correlation matrix (if requested) are written to the same file.

Related Topics

VARCOMP
Overview (VARCOMP command)
Example
Variable List (VARCOMP command)
RANDOM Subcommand (VARCOMP command)
METHOD Subcommand (VARCOMP command)
INTERCEPT Subcommand (VARCOMP command)
MISSING Subcommand (VARCOMP command)
REGWGT Subcommand (VARCOMP command)
CRITERIA Subcommand (VARCOMP command)
PRINT Subcommand (VARCOMP command)
DESIGN Subcommand (VARCOMP command)


DESIGN Subcommand (VARCOMP command)

VARCOMP (command),VARCOMP (command),VARCOMP (command)
DESIGN subcommand,DESIGN subcommand,DESIGN subcommand
DESIGN (subcommand),DESIGN (subcommand),DESIGN (subcommand)
VARCOMP command,VARCOMP command,VARCOMP command

The DESIGN subcommand specifies the effects in a model. DESIGN can be specified anywhere after the variable list. If more than one DESIGN subcommand is specified, only the last subcommand is in effect.

• Specify a list of effect terms to be included in the design. Each term must be separated from the next term by a comma or a space. Valid specifications include the keyword INTERCEPT, factors, covariates, and interaction or nested terms.

• The factors and covariates must have been specified on the variable list.

• If a factor is specified on the RANDOM subcommand, all effects that include that factor are random effects.

• If the DESIGN subcommand is omitted or specified without any term, the default design is generated. The default design includes the intercept term (if INTERCEPT=EXCLUDE is not specified), the covariates (if any) in the order in which they are specified on the variable list, the main factorial effects, and all orders of factor-by-factor interaction.

INTERCEPT (keyword),INTERCEPT (keyword),INTERCEPT (keyword)
VARCOMP command,VARCOMP command,VARCOMP command
interactions,interactions,interactions
VARCOMP command,VARCOMP command,VARCOMP command
VARCOMP (command),VARCOMP (command),VARCOMP (command)
interactions,interactions,interactions
BY (keyword),BY (keyword),BY (keyword)
VARCOMP command,VARCOMP command,VARCOMP command
VARCOMP (command),VARCOMP (command),VARCOMP (command)
nested design,nested design,nested design
nested design,nested design,nested design
VARCOMP command,VARCOMP command,VARCOMP command
WITHIN (keyword),WITHIN (keyword),WITHIN (keyword)
VARCOMP command,VARCOMP command,VARCOMP command
INTERCEPT | Include the intercept term. Specifying INTERCEPT on DESIGN explicitly includes the intercept term, regardless of the specification on the INTERCEPT subcommand.
BY | Interaction. You can also use the asterisk (*). Interaction terms can be formed among factors, among covariates, and between factors and covariates.
 | Factors inside an interaction effect must be distinct. For factors A, B, and C, expressions like A*C*A or A*A are invalid.
 | Covariates inside an interaction effect do not have to be distinct. For covariate X, X*X is the product of X and itself. This is equivalent to a covariate whose values are the square of the values of X.
WITHIN | Nesting. You can also use a pair of parentheses. Factors and covariates can be nested within factors, but no effects can be nested within covariates. Suppose that A and B are factors and X and Y are covariates. Both A(B) and X(B) are valid, but X(Y) is not valid.
 | Factors inside a nested effect must be distinct. Expressions like A(A) are invalid.
 | Multiple-level nesting is supported. For example, A(B(C)) or A WITHIN B WITHIN C means that factor B is nested within factor C, and factor A is nested within B(C). The expression A(B)(C) is invalid.
 | Nesting within an interaction effect is valid. For example, A(B*C) means that factor A is nested within B*C while X(A*B) means that covariate X is nested within A*B.
 | Interactions among nested effects are allowed. For example, A*B(C) means interaction between A and B within levels of C. X*Y(A) means the product of X and Y nested within levels of C. The expression A(C)*B(C) is invalid.

Example

VARCOM Y BY DRUG SUBJECT WITH X
 /RANDOM = SUBJECT
 /DESIGN = DRUG SUBJECT DRUG*SUBJECT X*SUBJECT.

• The DESIGN subcommand specifies two main effects and two interaction terms.

• All effects that involve the factor SUBJECT are assumed to be random.

Related Topics

VARCOMP
Overview (VARCOMP command)
Example
Variable List (VARCOMP command)
RANDOM Subcommand (VARCOMP command)
METHOD Subcommand (VARCOMP command)
INTERCEPT Subcommand (VARCOMP command)
MISSING Subcommand (VARCOMP command)
REGWGT Subcommand (VARCOMP command)
CRITERIA Subcommand (VARCOMP command)
PRINT Subcommand (VARCOMP command)
OUTFILE Subcommand (VARCOMP command)


VARIABLE ALIGNMENT

VARIABLE ALIGNMENT (command),VARIABLE ALIGNMENT (command),VARIABLE ALIGNMENT (command)
VARIABLE ALIGNMENT (command),VARIABLE ALIGNMENT (command),VARIABLE ALIGNMENT (command)
syntax chart,syntax chart,syntax chart
VARIABLE ALIGNMENT varlist ({LEFT  }) ... [/varlist...]
                            {CENTER}
                            {RIGHT }

This command takes effect immediately. It does not read the active dataset or execute pending transformations. See the topic Command Order for more information.

Example

VARIABLE ALIGNMENT sales95 sales96 (LEFT)
  /id gender (RIGHT).

Variable alignment can also be specified from the Variable View tab.

Related Topics

Overview (VARIABLE ALIGNMENT command)


Overview (VARIABLE ALIGNMENT command)

VARIABLE ALIGNMENT specifies the alignment of data values in the Data Editor. It has no effect on the format of the variables or the display of the variables or values in other windows or printed results.

Basic Specification

The basic specification is a variable name and the keyword LEFT, RIGHT, or CENTER in parentheses.

Related Topics

VARIABLE ALIGNMENT


VARIABLE ATTRIBUTE

custom variable attributes,custom variable attributes,custom variable attributes
variable attributes,variable attributes,variable attributes
adding and deleting custom attributes,adding and deleting custom attributes,adding and deleting custom attributes
attributes,attributes,attributes
adding and deleting custom variable attributes,adding and deleting custom variable attributes,adding and deleting custom variable attributes
custom attributes,custom attributes,custom attributes
adding and deleting,adding and deleting,adding and deleting
deleting custom attributes,deleting custom attributes,deleting custom attributes
VARIABLE ATTRIBUTE (command),VARIABLE ATTRIBUTE (command),VARIABLE ATTRIBUTE (command)
VARIABLE ATTRIBUTE (command),VARIABLE ATTRIBUTE (command),VARIABLE ATTRIBUTE (command)
syntax chart,syntax chart,syntax chart
release history,release history,release history
VARIABLE ATTRIBUTE
         VARIABLES=varlist
         ATTRIBUTE=name('value') name('value')...
                   arrayname[1]('value') arrayname[2]('value')...
         DELETE=name name...
                arrayname[n] arrayname...
         /VARIABLES...

This command takes effect immediately. It does not read the active dataset or execute pending transformations. See the topic Command Order for more information.

Release History Collapse Hide details

Release History

Release 14.0

• Command introduced.

Example

VARIABLE ATTRIBUTE VARIABLES=Age Gender Region
  ATTRIBUTE=DemographicVars ('1').

Related Topics

Overview (VARIABLE ATTRIBUTE command)
DATAFILE ATTRIBUTE


Overview (VARIABLE ATTRIBUTE command)

VARIABLE ATTRIBUTE provides you with the ability to define your own variable attributes and assign attribute values to variables in the active dataset. For example, you could create a variable attribute that identifies the type of response for survey questions (e.g., single selection, multiple selection, fill-in-the-blank) or the formulas used for computed variables.

• User-defined variable attributes are saved with the data file in the data dictionary.

• The VARIABLE ATTRIBUTE command takes effect immediately, updating the data dictionary without requiring a data pass.

• You can display a list of data file and variable attributes with DISPLAY ATTRIBUTES. See the topic DISPLAY for more information.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is:

• The VARIABLES subcommand followed by an equals sign (=) and a list of valid variables.

• The ATTRIBUTE keyword followed by an equals sign (=) and one or more attribute names that follow variable naming rules, with each attribute name followed by a quoted attribute value enclosed in parentheses.

or

• The DELETE keyword followed by an equals sign (=) and a list of defined attribute names or attribute arrays.

Syntax Rules Collapse Hide details

Syntax Rules

• The VARIABLES subcommand is required.

• All subcommands and keywords (VARIABLES, ATTRIBUTE, DELETE) must be followed by an equals sign (=).

• Each ATTRIBUTE keyword must be followed by a name that follows variable naming rules and a single, quoted attribute value enclosed in parentheses. See the topic Variable Names for more information.

• Attribute names that begin with @ cannot be displayed in Variable View of the Data Editor and are not displayed by DISPLAY DICTIONARY or DISPLAY ATTRIBUTES. They can only be displayed with DISPLAY @ATTRIBUTES.

• Attribute names that begin with a dollar sign ($) are reserved for internal PASW Statistics use.

• All attribute values must be quoted (single or double quotes), even if the values are numbers.

• Attribute values can be up to 32,767 bytes in length.

Attribute Arrays Collapse Hide details

Attribute Arrays

If you append an integer enclosed in square brackets to the end of an attribute name, the attribute is interpreted as an array of attributes. For example,

VARIABLE ATTRIBUTE VARIABLES=Age
  ATTRIBUTE=MyAttribute[99]('not quite 100').

will create 99 attributes--MyAttribute[01] through MyAttribute[99]--and will assign the value "not quite 100" to the last one.

• Array subscripts (the value enclosed in square brackets) must be integers greater than 0. (Array subscript numbering starts with 1, not 0.)

• If the root name of an attribute array is the same as an existing attribute name for any variables specified on the VARIABLES subcommand, the attribute array replaces the existing attribute for those variables (and vice versa). If no value is assigned to the first element in the array (subscript [1]), the original attribute value is used for that element value.

With the DELETE keyword, the following rules apply to attribute arrays:

• If you specify DELETE followed by an array rootname and no value in square brackets, all attributes in the array are deleted.

• If you specify DELETE with an array name followed by an integer value in square brackets, the specified array element is deleted and the integer values for all subsequent attributes in the array (in numeric order) are changed to reflect the new order of array elements.

Related Topics

VARIABLE ATTRIBUTE


Example (VARIABLE ATTRIBUTE Command)

VARIABLE ATTRIBUTE
  VARIABLES=Age Income1 Income2 Income3
  ATTRIBUTE=AnswerFormat('Fill-in')
  /VARIABLES=Gender OwnHome MortgageType
  ATTRIBUTE=AnswerFormat('Single select')
  /VARIABLES=AvgIncome
  ATTRIBUTE=AnswerFormat('Computed value')
  /VARIABLES=AvgIncome
   ATTRIBUTE=Formula('mean(Income1, Income2, Income3)')
   /VARIABLES=AvgIncome
   ATTRIBUTE=DerivedFrom[1]('Income1')
   DerivedFrom[2]('Income2')
   DerivedFrom[3]('Income3').
DISPLAY ATTRIBUTES.

• The variables Age, Income1, Income2, and Income3 are assigned the variable attribute AnswerFormat with a value of Fill-in.

• The variables Gender, OwnHome, and MortgageType are assigned the variable attribute AnswerFormat with a value of Single select.

• The variable AvgIncome is assigned the variable attribute AnswerFormat with a value of Computed value.

• The variable AvgIncome is assigned the variable attribute Formula, with a value the describes the formula used to calculate the value of this variable.

• The variable AvgIncome is assigned the variable attribute array DerivedFrom, and each array value identifies one of the variables used to calculate the value of AvgIncome.

• DISPLAY ATTRIBUTES lists the variable attributes for each variable in the active dataset.

Variable attributes


VARIABLE LABELS

variable labels,variable labels,variable labels
VARIABLE LABELS (command),VARIABLE LABELS (command),VARIABLE LABELS (command)
VARIABLE LABELS (command),VARIABLE LABELS (command),VARIABLE LABELS (command)
syntax chart,syntax chart,syntax chart
VARIABLE LABELS varname 'label' [/varname...]

Example

VARIABLE LABELS YRHIRED 'YEAR OF FIRST HIRING'.

This command takes effect immediately. It does not read the active dataset or execute pending transformations. See the topic Command Order for more information.

Variable labels can also be specified from the Variable View tab.

Related Topics

Overview (VARIABLE LABELS command)
Examples (VARIABLE LABELS command)


Overview (VARIABLE LABELS command)

variable labels,variable labels,variable labels
apostrophes in,apostrophes in,apostrophes in
variable labels,variable labels,variable labels
concatenating strings,concatenating strings,concatenating strings
line breaks,line breaks,line breaks
in variable labels,in variable labels,in variable labels
variable labels,variable labels,variable labels
controlling wrapping,controlling wrapping,controlling wrapping
wrapping,wrapping,wrapping
variable labels,variable labels,variable labels

VARIABLE LABELS assigns descriptive labels to variables in the active dataset.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is a variable name and the associated label in quotes.

Syntax Rules Collapse Hide details

Syntax Rules

• Labels can be added to any previously defined variable. It is not necessary to enter labels for all variables in the active dataset.

• Each variable label must be enclosed in quotes.

• Variable labels can contain any characters, including blanks. To enter an apostrophe as part of a label, enclose the label in double quotes or enter a two apostrophes (two single quotes). See the topic String Values in Command Specifications for more information.

• Each variable label can be up to 255 bytes long, although some procedures print fewer than the 255 bytes. All statistical procedures display at least 40 bytes.

• Multiple variables can be assigned labels on a single VARIABLE LABELS command. Only one label can be assigned to each variable, and each label can apply to only one variable.

• To continue a label from one command line to the next, specify a plus (+) sign before the continuation of the label. Each string segment of the label must be enclosed in quotes. To insert a blank between the strings, the blank must be included in the label specification.

• To control line wrapping of labels in pivot tables and charts, insert \n as part of the label wherever you want a line break. The \n is not displayed in output; it is interpreted as a line-break character. (Note: Labels will always wrap wherever \n appears in the defined label, even if there is enough space to display the label without wrapping.)

Operations Collapse Hide details

Operations

• Unlike most transformations, VARIABLE LABELS takes effect as soon as it is encountered in the command sequence. Thus, special attention should be paid to its position among commands. See the topic Command Order for more information.

• Variable labels are automatically displayed in the output from many procedures and are stored in the dictionary of the active dataset.

• VARIABLE LABELS can be used for variables that have no previously assigned variable labels. If a variable has a previously assigned variable label, the new label replaces the old label.

Related Topics

VARIABLE LABELS
Examples (VARIABLE LABELS command)


Examples (VARIABLE LABELS command)

variable labels,variable labels,variable labels
concatenating strings,concatenating strings,concatenating strings

Assigning Variable Labels to Multiple Variables

VARIABLE LABELS  YRHIRED 'YEAR OF FIRST HIRING'
  DEPT88 'DEPARTMENT OF EMPLOYMENT IN 1988'
  SALARY88 'YEARLY SALARY IN 1988'
  JOBCAT 'JOB CATEGORIES'.

• Variable labels are assigned to the variables YRHIRED, DEPT88, SALARY88, and JOBCAT.

Combining Strings to Construct Variable Labels

VARIABLE LABELS  OLDSAL "EMPLOYEE'S GROSS SALARY PRIOR"
   + " TO 1988".

• The label for OLDSAL is created by combining two strings with the plus sign. The blank between PRIOR and TO must be included in the first or second string to be included in the label.

Forcing Variable Labels to Wrap

VARIABLE LABELS myvar "A Fairly Long Label \n That Always Wraps".
FREQUENCIES myvar.
Using \n to wrap variable labels

Related Topics

VARIABLE LABELS
Overview (VARIABLE LABELS command)


VARIABLE LEVEL

measurement level,measurement level,measurement level
specifying,specifying,specifying
level of measurement,level of measurement,level of measurement
specifying,specifying,specifying
VARIABLE LEVEL (command),VARIABLE LEVEL (command),VARIABLE LEVEL (command)
VARIABLE LEVEL (command),VARIABLE LEVEL (command),VARIABLE LEVEL (command)
syntax chart,syntax chart,syntax chart
VARIABLE LEVEL varlist ({SCALE  }) ... [/varlist...]
                        {ORDINAL}
                        {NOMINAL}

This command takes effect immediately. It does not read the active dataset or execute pending transformations. See the topic Command Order for more information.

Example

VARIABLE LEVEL sales95 sales96 (SCALE)
    /region division (NOMINAL)
    /expense (ORDINAL).

Variable levels can also be specified from the Variable View tab.

Related Topics

Overview (VARIABLE LEVEL command)


Overview (VARIABLE LEVEL command)

VARIABLE LEVEL specifies the level of measurement for variables.

Basic Specification

The basic specification is a variable name, followed by a measurement level enclosed in parentheses. The measurement level can be:

NOMINAL | A variable can be treated as nominal when its values represent categories with no intrinsic ranking; for example, the department of the company in which an employee works. Examples of nominal variables include region, zip code, or religious affiliation.
ORDINAL | A variable can be treated as ordinal when its values represent categories with some intrinsic ranking; for example, levels of service satisfaction from highly dissatisfied to highly satisfied. Examples of ordinal variables include attitude scores representing degree of satisfaction or confidence and preference rating scores.
SCALE | A variable can be treated as scale when its values represent ordered categories with a meaningful metric, so that distance comparisons between values are appropriate. Examples of scale variables include age in years and income in thousands of dollars.

Related Topics

VARIABLE LEVEL


VARIABLE ROLE

VARIABLE ROLE (command),VARIABLE ROLE (command),VARIABLE ROLE (command)
VARIABLE ROLE (command),VARIABLE ROLE (command),VARIABLE ROLE (command)
syntax chart,syntax chart,syntax chart
INPUT (subcommand,INPUT (subcommand,INPUT (subcommand
VARIABLE ROLE command,VARIABLE ROLE command,VARIABLE ROLE command
TARGET (subcommand,TARGET (subcommand,TARGET (subcommand
VARIABLE ROLE command,VARIABLE ROLE command,VARIABLE ROLE command
BOTH (subcommand,BOTH (subcommand,BOTH (subcommand
VARIABLE ROLE command,VARIABLE ROLE command,VARIABLE ROLE command
NONE (subcommand,NONE (subcommand,NONE (subcommand
VARIABLE ROLE command,VARIABLE ROLE command,VARIABLE ROLE command
PARTITION (subcommand,PARTITION (subcommand,PARTITION (subcommand
VARIABLE ROLE command,VARIABLE ROLE command,VARIABLE ROLE command
SPLIT (subcommand,SPLIT (subcommand,SPLIT (subcommand
VARIABLE ROLE command,VARIABLE ROLE command,VARIABLE ROLE command
VARIABLE ROLE
  [/INPUT varlist]
  [/TARGET varlist]
  [/BOTH varlist]
  [/NONE varlist]
  [/PARTITION varlist]
  [/SPLIT varlist]

This command takes effect immediately. It does not read the active dataset or execute pending transformations. See the topic Command Order for more information.

Release History Collapse Hide details

Release History

Release 18.0

• Command introduced.

Example

VARIABLE ROLE
  /INPUT Age Income Gender Education Debt
  /TARGET Credit_rating  /NONE Customer_ID.

Related Topics

Overview (VARIABLE ROLE command)


Overview (VARIABLE ROLE command)

Some dialogs support predefined roles that can be used to pre-select variables for analysis. When you open one of these dialogs, variables that meet the role requirements will be automatically displayed in the destination list(s). Available role subcommands are:

Input. The variable will be used as an input (e.g., predictor, independent variable).

Target. The variable will be used as an output or target (e.g., dependent variable).

Both. The variable will be used as both input and output.

None. The variable has no role assignment.

Partition. The variable will be used to partition the data into separate samples for training, testing, and validation.

Split. Included for round-trip compatibility with PASW Modeler. Variables with this role are not used as split-file variables in PASW Statistics.

• By default, all variables are assigned the Input role. This includes data from external file formats and data files from versions of PASW Statistics prior to version 18.

• Role assignment only affects dialogs that support role assignment. It has no effect on command syntax.

Basic Specification

The basis specification is the command name, at least one subcommand, and at least one variable specified on that subcommand.

Syntax Rules Collapse Hide details

Syntax Rules

• At least one subcommand must be specified.

• Only a single instance of each subcommand is allowed.

• Each subcommand must be preceded by a forward slash.

• Each subcommand must specify at least one variable.

• The command name and subcommand names must be spelled in full.

• Keyword ALL can be used to specify all variables in the active dataset, and keyword TO can be used to specify a list of variables (in file order).

Operations Collapse Hide details

Operations

• If a variable is specified more than once, the last role assignment is used.

• This command takes effect immediately. It does not read the active dataset or execute pending transformations.

Example Collapse Hide details

Example

VARIABLE ROLE
  /INPUT Age Income Gender Education Debt
  /TARGET Credit_rating  /NONE Customer_ID.

Related Topics

VARIABLE ROLE


VARIABLE WIDTH

VARIABLE WIDTH (command),VARIABLE WIDTH (command),VARIABLE WIDTH (command)
VARIABLE WIDTH (command),VARIABLE WIDTH (command),VARIABLE WIDTH (command)
syntax chart,syntax chart,syntax chart
width,width,width
controlling column width in Data View,controlling column width in Data View,controlling column width in Data View
VARIABLE WIDTH command,VARIABLE WIDTH command,VARIABLE WIDTH command
VARIABLE WIDTH varlist (n) ... [/varlist...]

Example

VARIABLE WIDTH sales95 sales96 (10)
  /id gender (2).

This command takes effect immediately. It does not read the active dataset or execute pending transformations. See the topic Command Order for more information.

Variable width can also be specified from the Variable View tab.

Related Topics

Overview (VARIABLE WIDTH command)


Overview (VARIABLE WIDTH command)

VARIABLE WIDTH specifies the column width for the display of variables in the Data Editor. It has no effect on the format of the variable or the display of the variable or values in other windows or printed results.

Basic Specification

The basic specification is a variable name and a positive integer in parentheses for the column width. Column width for proportional fonts is based on average character width. Depending on the characters used in the value, more or fewer characters may be displayed in the specified width.

Related Topics

VARIABLE WIDTH


VARSTOCASES

VARSTOCASES (command),VARSTOCASES (command),VARSTOCASES (command)
VARSTOCASES (command),VARSTOCASES (command),VARSTOCASES (command)
syntax chart,syntax chart,syntax chart
VARSTOCASES

/MAKE new variable ["label"] [FROM] varlist [/MAKE ...]

[/INDEX = {new variable ["label"]                                  }]
          {new variable ["label"] (make variable name)             }
          {new variable ["label"] (n) new variable ["label"](n) ...}

[/ID = new variable ["label"]]

[/NULL = {DROP**}]
         {KEEP  }

[/COUNT=new variable ["label"]]

[/KEEP={ALL**  }] [/DROP=varlist]
       {varlist}

**Default if the subcommand is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

Syntax for the VARSTOCASES command can be generated from the Restructure Data Wizard by selecting Restructure selected variables into cases.

Example

VARSTOCASES /MAKE newvar FROM var1 TO var4.

Related Topics

Overview (VARSTOCASES command)
Example (VARSTOCASES command)
MAKE Subcommand (VARSTOCASES command)
ID Subcommand (VARSTOCASES command)
INDEX Subcommand (VARSTOCASES command)
NULL Subcommand (VARSTOCASES command)
COUNT Subcommand (VARSTOCASES command)
DROP and KEEP Subcommands (VARSTOCASES command)


Overview (VARSTOCASES command)

VARSTOCASES (command),VARSTOCASES (command),VARSTOCASES (command)
limitations,limitations,limitations
overview,overview,overview

A variable contains information that you want to analyze, such as a measurement or a test score. A case is an observation, such as an individual or an institution. In a simple data structure, each variable is a single column in your data. So if you are measuring test scores, for example, all test score values would appear in only one column. In a simple data structure, each case is a single row in your data. So if you were measuring scores for all students in a class, there would be a row for each student.

VARSTOCASES restructures complex data structures (in which information about a variable is stored in more than one column) into a data file in which those measurements are organized into separate rows of a single column. It replaces the active dataset.

You can use VARSTOCASES to restructure data files in which repeated measurements of a single case were recorded in one row into a new data file in which each measurement for a case appears in a new row.

Options Collapse Hide details

Options

Creating New Variables. You can create an identification variable that identifies the row in the original data file that was used to create a group of new rows, a count variable that contains the number of new rows generated by a row in the original data, and one or more index variables that identify the original variable from which the new row was created.

Variable Selection. You can use the DROP and KEEP subcommands to specify which variables from the original data file are included in the new data file.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is one or more MAKE subcommands, each of which specifies a list of variables to be combined into a single variable in which each value is displayed on a separate row.

Subcommand Order Collapse Hide details

Subcommand Order

Subcommands can be specified in any order.

Syntax Rules Collapse Hide details

Syntax Rules

• The MAKE subcommand is required and can be specified as many times as needed.

• The rest of the subcommands can be specified only once.

Operations Collapse Hide details

Operations

• Row order. New rows are created in the order in which the variables are specified on the FROM list.

• Propagated variables. Variables that are not named on the MAKE or DROP subcommands are kept in the new data file. Their values are propagated for each new row.

• Split file processing. The SPLIT FILE command does not affect the results of VARSTOCASES. If split file processing is in effect, it will remain in effect in the new data file unless a variable that is used to split the file is named on the MAKE or DROP subcommands.

• Weighted files. The WEIGHT command does not affect the results of VARSTOCASES. If original data are weighted, the new data will be weighted unless the variable that is used to split the file is named on the MAKE or DROP subcommands.

• Selected cases. The FILTER and USE commands do not affect the results of VARSTOCASES. It processes all cases.

Limitations Collapse Hide details

Limitations

The TEMPORARY command cannot be in effect when VARSTOCASES is executed.

Related Topics

VARSTOCASES
Example (VARSTOCASES command)
MAKE Subcommand (VARSTOCASES command)
ID Subcommand (VARSTOCASES command)
INDEX Subcommand (VARSTOCASES command)
NULL Subcommand (VARSTOCASES command)
COUNT Subcommand (VARSTOCASES command)
DROP and KEEP Subcommands (VARSTOCASES command)


Example (VARSTOCASES command)

SORT CASES (command),SORT CASES (command),SORT CASES (command)
with ADD FILES command,with ADD FILES command,with ADD FILES command
VARSTOCASES (command),VARSTOCASES (command),VARSTOCASES (command)
with SORT CASES command,with SORT CASES command,with SORT CASES command

The following is the LIST output for a data file where repeated measurements for the same case are stored in variables on a single row:

caseid          var1         var2         var3    var4

001              .00          .05         5.00    3.00
002             7.00         1.00         5.00    4.00
003             6.00         3.00         6.00    2.00

The command:

VARSTOCASES
    /MAKE newvar FROM var1 TO var4.

creates a new variable, newvar, using the values of var1 through var4. The LIST output for the new active dataset is as follows:

caseid      newvar

001            .00
001            .05
001           5.00
001           3.00
002           7.00
002           1.00
002           5.00
002           4.00
003           6.00
003           3.00
003           6.00
003           2.00

The values for the new variable newvar are the values from var1 through var4 from the original data. There are now four rows for each case—one row for each variable that was named on the FROM list.

Related Topics

VARSTOCASES
Overview (VARSTOCASES command)
MAKE Subcommand (VARSTOCASES command)
ID Subcommand (VARSTOCASES command)
INDEX Subcommand (VARSTOCASES command)
NULL Subcommand (VARSTOCASES command)
COUNT Subcommand (VARSTOCASES command)
DROP and KEEP Subcommands (VARSTOCASES command)


MAKE Subcommand (VARSTOCASES command)

MAKE (subcommand),MAKE (subcommand),MAKE (subcommand)
VARSTOCASES command,VARSTOCASES command,VARSTOCASES command
VARSTOCASES (command),VARSTOCASES (command),VARSTOCASES (command)
MAKE subcommand,MAKE subcommand,MAKE subcommand

The MAKE subcommand names, and optionally labels, the new variable to be created from the variables on the FROM list.

• One new variable is required on each MAKE subcommand. It must have a unique name.

• The label for the new variable is optional and, if specified, must be enclosed in quotes.

• The new variable will have the values of the variables listed on the FROM list. For each case in the original data, one new row will be created for each variable on the FROM list.

• All of the variables on the FROM list are required to be of the same type. For example, they must all be numeric or they must all be string.

• The dictionary information for the new variable (for example, value labels and format) is taken from the first variable in the FROM list. If string variables of different lengths are specified, the longest length is used.

• Rows are created in the order in which variables appear on the FROM list.

• Variables that appear on the FROM list will not appear in the new data file.

• Variables that are kept in the new data file and not named on the FROM list will have their values propagated for each new row.

• When multiple MAKE subcommands are used, a variable may not appear on more than one FROM list.

• A variable may be listed more than once on a FROM list. Its values are repeated.

• When multiple MAKE subcommands are used, the FROM lists must all contain the same number of variables (variables that are listed more than once must be included in the count).

Related Topics

VARSTOCASES
Overview (VARSTOCASES command)
Example (VARSTOCASES command)
ID Subcommand (VARSTOCASES command)
INDEX Subcommand (VARSTOCASES command)
NULL Subcommand (VARSTOCASES command)
COUNT Subcommand (VARSTOCASES command)
DROP and KEEP Subcommands (VARSTOCASES command)


ID Subcommand (VARSTOCASES command)

ID (subcommand),ID (subcommand),ID (subcommand)
VARSTOCASES command,VARSTOCASES command,VARSTOCASES command
VARSTOCASES (command),VARSTOCASES (command),VARSTOCASES (command)
ID subcommand,ID subcommand,ID subcommand

The ID subcommand creates a new variable that identifies the permanent case sequence number ($casenum) of the original row that was used to create the new rows. Use the ID subcommand when the original data file does not contain a variable that identifies cases.

• One new variable is named on the ID subcommand. It must have a unique name.

• The label for the new variable is optional and, if specified, must be enclosed in quotes.

• The format of the new variable is F8.0.

Related Topics

VARSTOCASES
Overview (VARSTOCASES command)
Example (VARSTOCASES command)
MAKE Subcommand (VARSTOCASES command)
INDEX Subcommand (VARSTOCASES command)
NULL Subcommand (VARSTOCASES command)
COUNT Subcommand (VARSTOCASES command)
DROP and KEEP Subcommands (VARSTOCASES command)


INDEX Subcommand (VARSTOCASES command)

INDEX (subcommand),INDEX (subcommand),INDEX (subcommand)
VARSTOCASES command,VARSTOCASES command,VARSTOCASES command
VARSTOCASES (command),VARSTOCASES (command),VARSTOCASES (command)
INDEX subcommand,INDEX subcommand,INDEX subcommand

In the original data file, a case appears on a single row. In the new data file, that case will appear on multiple rows. The INDEX subcommand creates a new variable that sequentially identifies a group of new rows based on the original variables from which it was created.

• You can choose among three types of indices—a simple numeric index, an index that lists the variables on a FROM list, or multiple numeric indices.

• New variable(s) are named on the INDEX subcommand. A new variable must have a unique name.

• The label for the new variable is optional and, if specified, must be enclosed in quotes.

Related Topics

VARSTOCASES
Overview (VARSTOCASES command)
Example (VARSTOCASES command)
MAKE Subcommand (VARSTOCASES command)
ID Subcommand (VARSTOCASES command)
NULL Subcommand (VARSTOCASES command)
COUNT Subcommand (VARSTOCASES command)
DROP and KEEP Subcommands (VARSTOCASES command)
Simple Numeric Index (VARSTOCASES command)
Variable Name Index (VARSTOCASES command)
Multiple Numeric Indices (VARSTOCASES command)


Simple Numeric Index (VARSTOCASES command)

A simple numeric index numbers the rows sequentially within a new group.

• The basic specification is /INDEX=ivar, where ivar is a name for the new index variable.

• The new index variable starts with 1 and increments each time a FROM variable is encountered in a row in the original file. After the last FROM variable is encountered, the index restarts at 1.

• Gaps in the index sequence can occur if null data are dropped.

Example

VARSTOCASES
    /MAKE newvar FROM var1 TO var4
    /INDEX=ivar.
caseid      ivar    newvar

001            1       .00
001            2       .05
001            3      5.00
001            4      3.00
002            1      7.00
002            2      1.00
002            3      5.00
002            4      4.00
003            1      6.00
003            2      3.00
003            3      6.00
003            4      2.00

Related Topics

INDEX Subcommand (VARSTOCASES command)
Variable Name Index (VARSTOCASES command)
Multiple Numeric Indices (VARSTOCASES command)


Variable Name Index (VARSTOCASES command)

A variable name index works like the simple numeric index, except that it lists the name of the original FROM variable instead of a sequential number.

• The basic specification is /INDEX=ivar (make variable name), where ivar is the name for the new index variable and make variable name is the name of a variable on the MAKE subcommand from which the index is to be constructed.

• The new index variable is a string that lists the name of the FROM variable from which the new row was created.

Example

VARSTOCASES
    /MAKE newvar FROM var1 TO var4
    /INDEX=ivar (newvar).
caseid      ivar    newvar

001         VAR1       .00
001         VAR2       .05
001         VAR3      5.00
001         VAR4      3.00
002         VAR1      7.00
002         VAR2      1.00
002         VAR3      5.00
002         VAR4      4.00
003         VAR1      6.00
003         VAR2      3.00
003         VAR3      6.00
003         VAR4      2.00

Related Topics

INDEX Subcommand (VARSTOCASES command)
Simple Numeric Index (VARSTOCASES command)
Multiple Numeric Indices (VARSTOCASES command)


Multiple Numeric Indices (VARSTOCASES command)

Multiple numeric indices are used to identify groups of new rows that share a particular combination of factors. You can create multiple numeric indices if the original variables are ordered so that levels of a given factor are grouped together.

• The basic specification is /INDEX=ivar(n) ivar(n) ..., where ivar is the name of the new index for a factor and n is the number of factor levels represented in the variable group for which the index is being constructed.

• The last index specified varies the fastest.

Example

       B1      B2

A1    .00     .05

A2   5.00    3.00

• Data were collected for a designed experiment with two levels of factor A and two levels of factor B. The table shows the data for the first case.

caseid     v_a1b1    v_a1b2    v_a2b1    v_a2b2
001           .00       .05      5.00      3.00

• The original data file is structured so that each case has one variable for each combination of factors. Note that factor B varies fastest.

VARSTOCASES
    /MAKE newvar FROM v_a1b1 TO v_a2b2
    /INDEX=a(2) b(2).
caseid      a     b    newvar

001         1     1       .00
001         1     2       .05
001         2     1      5.00
001         2     2      3.00

• The command restructures the data file and creates two indices, A and B.

Related Topics

INDEX Subcommand (VARSTOCASES command)
Simple Numeric Index (VARSTOCASES command)
Variable Name Index (VARSTOCASES command)


NULL Subcommand (VARSTOCASES command)

The NULL subcommand checks each potential new row for null values. A null value is a system-missing or blank value. By default, VARSTOCASES does not add a new row that contains null values for all variables created by MAKE subcommands. You can change the default null-value treatment with the NULL subcommand.

DROP (keyword),DROP (keyword),DROP (keyword)
VARSTOCASES command,VARSTOCASES command,VARSTOCASES command
KEEP (keyword),KEEP (keyword),KEEP (keyword)
VARSTOCASES command,VARSTOCASES command,VARSTOCASES command
DROP | Do not include a new row when all MAKE variables are null. A potential new row with null values for all of the variables created by MAKE subcommands is excluded from the new data file. This is the default. With this option, you may want to create a count variable to keep track of new rows because cases in the original data file are not guaranteed to appear in the new data file.
KEEP | Include a new row when all MAKE variables are null. A potential new row with null values for all of the variables created by the MAKE subcommand is included in the new data. With this option, you may not need a count variable to keep track of cases because each row in the original data will result in a consistent number of rows in the new data file.

Related Topics

VARSTOCASES
Overview (VARSTOCASES command)
Example (VARSTOCASES command)
MAKE Subcommand (VARSTOCASES command)
ID Subcommand (VARSTOCASES command)
INDEX Subcommand (VARSTOCASES command)
COUNT Subcommand (VARSTOCASES command)
DROP and KEEP Subcommands (VARSTOCASES command)


COUNT Subcommand (VARSTOCASES command)

COUNT (subcommand),COUNT (subcommand),COUNT (subcommand)
VARSTOCASES command,VARSTOCASES command,VARSTOCASES command
VARSTOCASES (command),VARSTOCASES (command),VARSTOCASES (command)
COUNT subcommand,COUNT subcommand,COUNT subcommand

When there are no null data, VARSTOCASES generates n new rows for each row in the original data file, where n is the number of variables on the FROM list(s). When the original data file contains null values and you drop them, it is possible to generate a different number of rows for a given subject in the original data file. The COUNT subcommand creates a new variable that contains the number of new rows generated by the original subject.

• One new variable is named on the COUNT subcommand. It must have a unique name.

• The label for the new variable is optional and, if specified, must be enclosed in quotes.

• The format of the new variable is F4.0.

Related Topics

VARSTOCASES
Overview (VARSTOCASES command)
Example (VARSTOCASES command)
MAKE Subcommand (VARSTOCASES command)
ID Subcommand (VARSTOCASES command)
INDEX Subcommand (VARSTOCASES command)
NULL Subcommand (VARSTOCASES command)
DROP and KEEP Subcommands (VARSTOCASES command)


DROP and KEEP Subcommands (VARSTOCASES command)

DROP (subcommand),DROP (subcommand),DROP (subcommand)
VARSTOCASES command,VARSTOCASES command,VARSTOCASES command
VARSTOCASES (command),VARSTOCASES (command),VARSTOCASES (command)
DROP subcommand,DROP subcommand,DROP subcommand
KEEP (subcommand),KEEP (subcommand),KEEP (subcommand)
VARSTOCASES command,VARSTOCASES command,VARSTOCASES command
VARSTOCASES (command),VARSTOCASES (command),VARSTOCASES (command)
KEEP subcommand,KEEP subcommand,KEEP subcommand

The DROP and KEEP subcommands are used to include only a subset of variables in the new active dataset. The DROP subcommand specifies a set of variables to exclude and the KEEP subcommand specifies a set of variables to retain. Variables not specified on the KEEP subcommand are dropped.

• DROP and KEEP cannot be used with variables that appear on a FROM list.

• DROP and KEEP are mutually exclusive. Only one DROP or one KEEP subcommand can be used on the VARSTOCASES command.

• KEEP affects the order of variables in the new data file. The order of the variables kept in the new data file is the order in which they are named on the KEEP subcommand.

Example

VARSTOCASES
    /MAKE newvar FROM var1 to var4
    /DROP caseid.

• Caseid is dropped from the new data file. The new data file contains one variable, newvar.

Related Topics

VARSTOCASES
Overview (VARSTOCASES command)
Example (VARSTOCASES command)
MAKE Subcommand (VARSTOCASES command)
ID Subcommand (VARSTOCASES command)
INDEX Subcommand (VARSTOCASES command)
NULL Subcommand (VARSTOCASES command)
COUNT Subcommand (VARSTOCASES command)


VECTOR

vectors,vectors,vectors
VECTOR (command),VECTOR (command),VECTOR (command)
VECTOR (command),VECTOR (command),VECTOR (command)
syntax chart,syntax chart,syntax chart
arrays. See vectors,arrays. See vectors,arrays. See vectors
VECTOR  {vector  name=varname TO varname}  [/vector  name...]
        {vector  name(n  [format])      }

Example

VECTOR V=V1 TO V6.

Related Topics

Overview (VECTOR command)
Examples (VECTOR command)
VECTOR: Short Form (VECTOR command)
VECTOR outside a Loop Structure (VECTOR command)


Overview (VECTOR command)

vectors,vectors,vectors
variable list,variable list,variable list
TO (keyword),TO (keyword),TO (keyword)
VECTOR command,VECTOR command,VECTOR command
VECTOR (command),VECTOR (command),VECTOR (command)
TO keyword,TO keyword,TO keyword
VECTOR (command),VECTOR (command),VECTOR (command)
variable list,variable list,variable list
vectors,vectors,vectors
index,index,index
VECTOR (command),VECTOR (command),VECTOR (command)
index,index,index
VECTOR (command),VECTOR (command),VECTOR (command)
with LOOP command,with LOOP command,with LOOP command
LOOP (command),LOOP (command),LOOP (command)
with VECTOR command,with VECTOR command,with VECTOR command

VECTOR associates a vector name with a set of existing variables or defines a vector of new variables. A vector is a set of variables that can be referred to using an index. The vector can refer to either string or numeric variables, and the variables can be permanent or temporary.

For each variable in the reference list, VECTOR generates an element. Element names are formed by adding a subscript in parentheses to the end of the vector name. For example, if the vector AGES has three elements, the element names are AGES(1), AGES(2), and AGES(3). Although the VECTOR command has other uses within the transformation language, it is most often used with LOOP structures because the indexing variable on LOOP can be used to refer to successive vector elements.

Options Collapse Hide details

Options

File Structures. VECTOR can be used with the END CASE command to restructure data files. You can build a single case from several cases or, conversely, you can build several cases from a single case (see the examples for the END CASE command).

Short-Form Vectors. VECTOR can be used to create a list of new variables and the vector that refers to them simultaneously. VECTOR in the short form can be used to establish the dictionary order of a group of variables before they are defined on a DATA LIST command (see VECTOR: Short Form).

Basic Specification Collapse Hide details

Basic Specification

• The basic specification is VECTOR, a vector name, a required equals sign, and the list of variables that the vector refers to. The TO keyword must be used to specify the variable list, and it defines a variable list based on file order.

• For the short form of VECTOR, the basic specification is VECTOR, an alphabetical prefix, and, in parentheses, the number of variables to be created.

Syntax Rules Collapse Hide details

Syntax Rules

• Multiple vectors can be created on the same command by using a slash to separate each set of specifications.

• Variables specified on VECTOR must already be defined unless the short form of VECTOR is used to create variables (see VECTOR: Short Form).

• The TO convention must be used to specify the variable list. Thus, variables specified must be consecutive and must be from the same dictionary, permanent or scratch.

• A single vector must comprise all numeric variables or all string variables. The string variables must have the same length.

• A scalar (a variable named on NUMERIC), a function, and a vector can all have the same name, for example MINI. The scalar can be identified by the lack of a left parenthesis following the name. Where a vector has the same name as a function (or the abbreviation of a function), the vector name takes precedence (see the example on name conflicts in VECTOR: Short Form).

• Vector element names must always be specified with a subscript in parentheses.

Operations Collapse Hide details

Operations

• VECTOR takes effect as soon as it is encountered in the command sequence, unlike most transformations, which do not take effect until the data are read. Thus, special attention should be paid to its position among commands. See the topic Command Order for more information.

• VECTOR is in effect only until the first procedure that follows it. The vector must be redeclared to be reused.

Limitations Collapse Hide details

Limitations

• A vector element is an expression and can be used wherever an expression can be used in transformation commands. It can also be the target of an assignment in a COMPUTE or IF command. It cannot be used in other transformation commands where a variable name is required. Specifically, vector elements cannot be used instead of variable names in RECODE, COUNT, XSAVE, DO REPEAT, or other transformation commands that require variable names but not expressions.

• Vectors cannot be used in procedure commands (for example, statistical or charting procedures).

• Vector names (for the whole vector rather than elements) cannot be used anywhere but in the VECTOR command itself.

Related Topics

VECTOR
Examples (VECTOR command)
VECTOR: Short Form (VECTOR command)
VECTOR outside a Loop Structure (VECTOR command)


Examples (VECTOR command)

VECTOR (command),VECTOR (command),VECTOR (command)
with LOOP command,with LOOP command,with LOOP command
LOOP (command),LOOP (command),LOOP (command)
with VECTOR command,with VECTOR command,with VECTOR command

Example

DATA LIST FREE /height age weight.
BEGIN DATA
1 2 3
END DATA.
VECTOR x=height TO weight.
VECTOR y=age TO weight.
VECTOR z=age TO height.

• The list of variables specified with TO defines a list of variables in file order.

• Vector x contains the variables height, age, and weight.

• Vector y contains the variables age and weight.

• The last VECTOR command generates an error because height comes before age in file order.

Example

* Replace a case's missing values with the mean of all
  nonmissing values for that case.

DATA LIST FREE /V1 V2 V3 V4 V5 V6 V7 V8.
MISSING VALUES V1 TO V8 (99).
COMPUTE MEANSUB=MEAN(V1 TO V8).

VECTOR V=V1 TO V8.
LOOP #I=1 TO 8.
+  DO IF MISSING (V(#I)).
+  COMPUTE V(#I)=MEANSUB.
+  END IF.
END LOOP.

BEGIN DATA
1 99 2 3 5 6 7  8
2  3 4 5 6 7 8  9
2  3 5 5 6 7 8 99
END DATA.
LIST.

• The first COMPUTE command calculates the variable MEANSUB as the mean of all nonmissing values for each case.

• VECTOR defines the vector V with the original variables as its elements.

• For each case, the loop is executed once for each variable. The COMPUTE command within the loop is executed only when the variable has a missing value for that case. COMPUTE replaces the missing value with the value of MEANSUB.

• For the first case, the missing value for the variable V2 is changed to the value of MEANSUB for that case. The missing value for the variable V8 for the third case is changed to the value of MEANSUB for that case.

For additional examples of VECTOR, see the examples for the END CASE command and the IF command.

Related Topics

VECTOR
Overview (VECTOR command)
VECTOR: Short Form (VECTOR command)
VECTOR outside a Loop Structure (VECTOR command)


VECTOR: Short Form (VECTOR command)

VECTOR (command),VECTOR (command),VECTOR (command)
short form,short form,short form

VECTOR can be used to create a list of new variables and the vector that refers to them simultaneously. The short form of VECTOR specifies a prefix of alphanumeric characters followed, in parentheses, by the length of the vector (the number of variables to be created).

• The new variable names must not conflict with existing variables. If the prefix starts with the # character, the new variables are created according to the rules for scratch variables.

• More than one vector of the same length can be created by naming two or more prefixes before the length specification.

• By default, variables created with VECTOR receive F8.2 formats. Alternative formats for the variables can be specified by including a format specification with the length specification within the parentheses. The format and length can be specified in either order and must be separated by at least one space or comma. If multiple vectors are created, the assigned format applies to all of them unless you specify otherwise.

Creating a Vector from a Set of New Scratch Variables

VECTOR #WORK(10).

• The program creates the vector #WORK, which refers to 10 scratch variables: #WORK1, #WORK2, and so on, through #WORK10. Thus, the element #WORK(5) of the vector is the variable #WORK5.

Creating Multiple Vectors of the Same Length

VECTOR X,Y(5).

• VECTOR creates the vectors X and Y, which refer to the new variables X1 through X5 and Y1 through Y5, respectively.

Specifying the Format of Vector Variables

VECTOR X(6,A5).

• VECTOR assigns an A5 format to the variables X1 through X6.

Creating Multiple Vectors of Different Lengths and Formats

VECTOR X,Y(A5,6) Z(3,F2).

• VECTOR assigns A5 formats to the variables X1 to X6 and Y1 to Y6, and F2 formats to the variables Z1 to Z3. It doesn’t matter whether the format or the length is specified first within the parentheses.

INPUT PROGRAM (command),INPUT PROGRAM (command),INPUT PROGRAM (command)
with VECTOR command,with VECTOR command,with VECTOR command
VECTOR (command),VECTOR (command),VECTOR (command)
with INPUT PROGRAM command,with INPUT PROGRAM command,with INPUT PROGRAM command
input programs,input programs,input programs
examples,examples,examples

Predetermining Variable Order Using the Short Form of VECTOR

INPUT PROGRAM.
VECTOR X Y (4,F8.2).
DATA LIST / X4 Y4 X3 Y3 X2 Y2 X1 Y1 1-8.
END INPUT PROGRAM.

PRINT /X1 TO X4  Y1 TO Y4.
BEGIN DATA
49382716
49382716
49382716
END DATA.

• The short form of VECTOR is used to establish the dictionary order of a group of variables before they are defined on a DATA LIST command. To predetermine variable order, both VECTOR and DATA LIST must be enclosed within the INPUT PROGRAM and END INPUT PROGRAM commands.

• The order of the variables in the active dataset will be X1, X2, X3, and X4, and Y1, Y2, Y3, and Y4, even though they are defined in a different order on DATA LIST.

• The program reads the variables with the F1 format specified on DATA LIST. It writes the variables with the output format assigned on VECTOR (F8.2).

• Another method for predetermining variable order is to use NUMERIC (or STRING if the variables are string variables) before the DATA LIST command (see the example on variable order for the NUMERIC command). The advantage of using NUMERIC or STRING is that you can assign mnemonic names to the variables.

Name Conflicts in Vector Assignments

INPUT PROGRAM.
NUMERIC MIN MINI_A MINI_B MINIM(F2).
COMPUTE MINI_A = MINI(2).  /*MINI is function MINIMUM.
VECTOR MINI(3,F2).
DO REPEAT I = 1 TO 3.
+  COMPUTE MINI(I) = -I.
END REPEAT.
COMPUTE MIN = MIN(1).     /*The second MIN is function MINIMUM.
COMPUTE MINI_B = MINI(2). /*MINI now references vector MINI
COMPUTE MINIM = MINIM(3). /*The second MINIM is function MINIMUM.
END CASE.
END FILE.
END INPUT PROGRAM.

• In this example, there are potential name conflicts between the scalars (the variables named on NUMERIC), the vectors (named on VECTOR), and the statistical function MINIMUM.

• A name that is not followed by a left parenthesis is treated as a scalar.

• When a name followed by a left parenthesis may refer to a vector element or a function, precedence is given to the vector.

Related Topics

VECTOR
Overview (VECTOR command)
Examples (VECTOR command)
VECTOR outside a Loop Structure (VECTOR command)


VECTOR outside a Loop Structure (VECTOR command)

VECTOR (command),VECTOR (command),VECTOR (command)
index,index,index
vectors,vectors,vectors
index,index,index

VECTOR is most commonly associated with the loop structure, since the index variable for LOOP can be used as the subscript. However, the subscript can come from elsewhere, including from the data.

Example

* Create a single case for each of students 1, 2, and 3.

DATA LIST /STUDENT 1 SCORE 3-4 TESTNUM 6.
BEGIN DATA
1 10 1
1 20 2
1 30 3
1 40 4
2 15 2
2 25 3
3 40 1
3 55 3
3 60 4
END DATA.

VECTOR RESULT(4).
COMPUTE RESULT(TESTNUM)=SCORE.

AGGREGATE OUTFILE=*/BREAK=STUDENT
        /RESULT1 TO RESULT4=MAX(RESULT1 TO RESULT4).

PRINT FORMATS RESULT1 TO RESULT4 (F2.0).
PRINT /STUDENT RESULT1 TO RESULT4.
EXECUTE.

• Data are scores on tests recorded in separate cases along with a student identification number and a test number. In this example, there are four possible tests for three students. Not all students took every test.

• The vector RESULT creates the variables RESULT1 through RESULT4.

• For each case, COMPUTE assigns the SCORE value to one of the four vector variables, depending on the value of TESTNUM. The other three vector variables for each case keep the system-missing value they were initialized to.

• Aggregating by the variable STUDENT creates new cases, as shown by the output from the PRINT command. The MAX function in AGGREGATE returns the maximum value across cases with the same value for STUDENT. If a student has taken a particular test, the one valid value is returned as the value for the variable RESULT1, RESULT2, RESULT3, or RESULT4.

PRINT output after aggregating

Related Topics

VECTOR
Overview (VECTOR command)
Examples (VECTOR command)
VECTOR: Short Form (VECTOR command)


VERIFY

VERIFY (command),VERIFY (command),VERIFY (command)
VERIFY (command),VERIFY (command),VERIFY (command)
syntax chart,syntax chart,syntax chart
VERIFY [VARIABLES=series name]

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

Example

VERIFY.

Related Topics

Overview (VERIFY command)
VARIABLES Subcommand (VERIFY command)
Examples (VERIFY command)


Overview (VERIFY command)

date variables,date variables,date variables
current status,current status,current status
forecasting,forecasting,forecasting
current forecast period,current forecast period,current forecast period

VERIFY produces a report on the status of the most current DATE, USE, and PREDICT specifications. The report lists the first and last observations in the active dataset, the current USE and PREDICT ranges, and any anomalies in the DATE variables. The number of missing values and the values of the first and last observations in the file and in the USE and PREDICT ranges can also be displayed for a specified series.

VERIFY should be used before a time series procedure whenever there is a possibility that DATE variables or USE and PREDICT ranges have been invalidated. In particular, the active dataset should be verified after you have modified the file structure with commands such as SELECT IF, SORT CASES, and AGGREGATE.

Options Collapse Hide details

Options

If a series is specified after VERIFY, the values of the first and last observations in the file and in the USE and PREDICT periods are reported for that series. In addition, the number of observations in the active dataset that have missing values for that series is displayed. This can be useful for determining the USE ranges that do not include any missing values.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is the command keyword VERIFY.

• VERIFY displays the first and last observations in the active dataset and in the USE and PREDICT ranges. This information is presented by case number and by the values of the DATE variables.

• For DATE variables, VERIFY reports the number of missing or invalid values. In addition, DATE variables that are not properly nested within the next higher-level DATE variable, that have start or end values other than those expected at the beginning or end of a cycle, or that increment by more than the expected increment are flagged with an asterisk next to the problem. An explanation of the problem is given.

Operations Collapse Hide details

Operations

• VERIFY reports on cases remaining after any preceding SELECT IF commands.

• The USE and PREDICT ranges are defined by the last USE and PREDICT commands specified before the VERIFY command. If USE and PREDICT have not been specified, the USE range is the entire series, and the PREDICT range does not exist.

Limitations Collapse Hide details

Limitations

• A maximum of 1 VARIABLES subcommand. Only one series can be specified on VARIABLES.

Related Topics

VERIFY
VARIABLES Subcommand (VERIFY command)
Examples (VERIFY command)


VARIABLES Subcommand (VERIFY command)

VERIFY (command),VERIFY (command),VERIFY (command)
VARIABLES subcommand,VARIABLES subcommand,VARIABLES subcommand
VARIABLES (subcommand),VARIABLES (subcommand),VARIABLES (subcommand)
VERIFY command,VERIFY command,VERIFY command

VARIABLES names a series to include in the report and is optional. The actual keyword VARIABLES can be omitted.

• The series named on VARIABLES must be numeric. The DATE_ series is non-numeric and cannot be specified.

• Only one VARIABLES subcommand can be specified, and it can name only one series.

Related Topics

VERIFY
Overview (VERIFY command)
Examples (VERIFY command)


Examples (VERIFY command)

VERIFY.

• This command produces a report on the status of the most recent DATE, USE, and PREDICT specifications, as well as the first and last valid cases in the file.

VERIFY VARIABLE=STOCK.

• In addition to the default VERIFY information, this command displays information on the series STOCK, including the values of the first and last cases and how many values in that series are missing.

Related Topics

VERIFY
Overview (VERIFY command)
VARIABLES Subcommand (VERIFY command)


WEIGHT

cases,cases,cases
weighting,weighting,weighting
weighting cases,weighting cases,weighting cases
WEIGHT (command),WEIGHT (command),WEIGHT (command)
WEIGHT (command),WEIGHT (command),WEIGHT (command)
syntax chart,syntax chart,syntax chart
WEIGHT  {BY  varname}
        {OFF        }

This command takes effect immediately. It does not read the active dataset or execute pending transformations. See the topic Command Order for more information.

Syntax for the WEIGHT command can be generated from the Weight Cases dialog.

Example

WEIGHT BY V1.

Related Topics

Overview (WEIGHT command)
Examples (WEIGHT command)


Overview (WEIGHT command)

BY (keyword),BY (keyword),BY (keyword)
WEIGHT command,WEIGHT command,WEIGHT command
WEIGHT (command),WEIGHT (command),WEIGHT (command)
weight variable,weight variable,weight variable
WEIGHT (command),WEIGHT (command),WEIGHT (command)
with TEMPORARY command,with TEMPORARY command,with TEMPORARY command
TEMPORARY (command),TEMPORARY (command),TEMPORARY (command)
with WEIGHT command,with WEIGHT command,with WEIGHT command
WEIGHT (command),WEIGHT (command),WEIGHT (command)
missing values,missing values,missing values
WEIGHT (command),WEIGHT (command),WEIGHT (command)
non-positive values,non-positive values,non-positive values

WEIGHT gives cases different weights (by simulated replication) for statistical analysis. WEIGHT can be used to weight a sample up to population size for reporting purposes or to replicate an example from a table or other aggregated data. With WEIGHT, you can arithmetically alter the sample size or its distribution.

To apply weights resulting from your sampling design, see the Complex Samples option.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is keyword BY followed by the name of the weight variable. Cases are weighted according to the values of the specified variable.

Syntax Rules Collapse Hide details

Syntax Rules

• Only one numeric variable can be specified. The variable can be a precoded weighting variable, or it can be computed with the transformation language.

• WEIGHT cannot be placed within a FILE TYPE—END FILE TYPE or INPUT PROGRAM—END INPUT PROGRAM structure. It can be placed nearly anywhere following these commands in a transformation program. See the topic Commands and Program States for more information.

Operations Collapse Hide details

Operations

• Unlike most transformations, WEIGHT takes effect as soon as it is encountered in the command sequence. Thus, special attention should be paid to its position among commands. See the topic Command Order for more information.

• Weighting is permanent during a session unless it is preceded by a TEMPORARY command, changed by another WEIGHT command, or turned off with the WEIGHT OFF specification.

• Each WEIGHT command overrides the previous one.

• WEIGHT uses the value of the specified variable to arithmetically replicate cases for subsequent procedures. Cases are not physically replicated.

• Weight values do not need to be integer, and some procedures, such as FREQUENCIES, CROSSTABS, and CTABLES, will use fractional values on the WEIGHT variable. However, most procedures treat the WEIGHT variable as a replication weight and will simply round fractional weights to the nearest integer. Some procedures ignore the WEIGHT variable completely, and this limitation is noted in the procedure-specific documentation.

• Cases with missing or nonpositive values for the weighting variable are treated as having a weight of 0 and are thus invisible to statistical procedures. They are not used in calculations even where unweighted counts are specified. These cases do remain in the file, however, and are included in case listings and saved when the file is saved.

• A file saved when weighting is in effect maintains the weighting.

• If the weighted number of cases exceeds the sample size, tests of significance are inflated; if it is smaller, they are deflated.

Related Topics

WEIGHT
Examples (WEIGHT command)


Examples (WEIGHT command)

WEIGHT BY V1.
FREQ VAR=V2.

• The frequency counts for the values of variable V2 will be weighted by the values of variable V1.

COMPUTE WVAR=1.
IF (GROUP EQ 1) WVAR=.5.
WEIGHT BY WVAR.

• Variable WVAR is initialized to 1 with the COMPUTE command. The IF command changes the value of WVAR to 0.5 for cases where GROUP equals 1.

• Subsequent procedures will use a case base in which cases from group 1 count only half as much as other cases.

Related Topics

WEIGHT
Overview (WEIGHT command)


WLS

Weight Estimation,Weight Estimation,Weight Estimation
command syntax,command syntax,command syntax
WLS (command),WLS (command),WLS (command)
WLS (command),WLS (command),WLS (command)
syntax chart,syntax chart,syntax chart

WLS is available in the Regression option.

WLS VARIABLES= dependent varname WITH independent varnames

 [/SOURCE=varname]

 [/DELTA=[{1.0**                  }]]
          {value list             }
          {value TO value BY value}

 [/WEIGHT=varname]

 [/{CONSTANT**}
   {NOCONSTANT}

 [/PRINT={BEST}]
         {ALL }

 [/SAVE = WEIGHT]

 [/APPLY[='model name']]

**Default if the subcommand or keyword is omitted.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

See WLS Algorithms for computational details for this procedure.

Syntax for the WLS command can be generated from the Weight Estimation dialog.

Example

WLS VARIABLES = VARY WITH VARX VARZ
  /SOURCE=VARZ
  /DELTA=2.

Related Topics

Overview (WLS command)
Example (WLS command)
VARIABLES Subcommand (WLS command)
SOURCE Subcommand (WLS command)
DELTA Subcommand (WLS command)
WEIGHT Subcommand (WLS command)
CONSTANT and NOCONSTANT Subcommands (WLS command)
SAVE Subcommand (WLS command)
PRINT Subcommand (WLS command)
APPLY Subcommand (WLS command)
MODEL NAME
READ MODEL
SAVE MODEL
TDISPLAY


Overview (WLS command)

WLS (command),WLS (command),WLS (command)
limitations,limitations,limitations

WLS (weighted least squares) estimates regression models with different weights for different cases. Weighted least squares should be used when errors from an ordinary regression are heteroscedastic—that is, when the size of the residual is a function of the magnitude of some variable, termed the source.

The WLS model is a simple regression model in which the residual variance is a function of the source variable, up to some power transform indicated by a delta value. For fuller regression results, save the weights produced by WLS and specify that weight variable on the REGWGT subcommand in REGRESSION.

Options Collapse Hide details

Options

Calculated and Specified Weights. WLS can calculate the weights based on a source variable and delta values (subcommands SOURCE and DELTA), or it can apply existing weights contained in a series (subcommand WEIGHT). If weights are calculated, each weight value is calculated as the source series value raised to the negative delta value.

New Variables. You can change NEWVAR settings on the TSET command prior to WLS to evaluate the regression coefficients and log-likelihood function without saving the weight variable, or save the new values to replace the values saved earlier, or save the new values without erasing values saved earlier (see the TSET command). You can also use the SAVE subcommand on WLS to override the NONE or the default CURRENT settings on NEWVAR for the current procedure.

Statistical Output. You can change the PRINT setting on the TSET command prior to WLS to display regression coefficients or the list of log-likelihood functions at each delta value, or to limit the output to only the regression statistics for the delta value at which the log-likelihood function is maximized (see the TSET command). You can also use the PRINT subcommand to override the PRINT setting on the TSET command for the current procedure and obtain regression coefficients at each value of delta in addition to the default output.

Basic Specification Collapse Hide details

Basic Specification

• The basic specification is the VARIABLES subcommand specifying one dependent variable, the keyword WITH, and one or more independent variables. Weights are calculated using the first independent variable as the source variable and a default delta value of 1.

• The default output for calculated weights displays the log-likelihood function for each value of delta. For the value of delta at which the log-likelihood function is maximized, the displayed summary regression statistics include R, R2, adjusted R2, standard errors, analysis of variance, and t tests of the individual coefficients. A variable named WGT#1 containing the calculated weights is automatically created, labeled, and added to the active dataset.

Syntax Rules Collapse Hide details

Syntax Rules

• VARIABLES can be specified only once.

• DELTA can be specified more than once. Each specification will be executed.

• If other subcommands are specified more than once, only the last specification of each one is executed.

• You can specify either SOURCE and DELTA, or just the WEIGHT subcommand. You cannot specify all three, and you cannot specify WEIGHT with SOURCE or with DELTA.

Subcommand Order Collapse Hide details

Subcommand Order

• Subcommands can be specified in any order.

Operations Collapse Hide details

Operations

• If neither the WEIGHT subcommand nor the SOURCE and DELTA subcommands are specified, a warning is issued and weights are calculated using the default source and delta value.

• Only one WGT#1 variable is created per procedure. If more than one delta value is specified, the weights used when the log-likelihood function is maximized are the ones saved as WGT#1.

• WGT#1 is not created when the WEIGHT subcommand is used.

• The WEIGHT command specifies case replication weights, which are not the same as the weights used in weighted least squares. If the WEIGHT command and WLS WEIGHT subcommand are both specified, both types of weights are incorporated in WLS.

• WLS uses listwise deletion of missing values. Whenever one variable is missing a value for a particular observation, that observation will not be included in any computations.

Limitations Collapse Hide details

Limitations

• Maximum one VARIABLES subcommand.

• Maximum one dependent variable on the VARIABLES subcommand. There is no limit on the number of independent variables.

• Maximum 150 values specified on the DELTA subcommand.

Related Topics

WLS
Example (WLS command)
VARIABLES Subcommand (WLS command)
SOURCE Subcommand (WLS command)
DELTA Subcommand (WLS command)
WEIGHT Subcommand (WLS command)
CONSTANT and NOCONSTANT Subcommands (WLS command)
SAVE Subcommand (WLS command)
PRINT Subcommand (WLS command)
APPLY Subcommand (WLS command)


Example (WLS command)

WLS cost  WITH sqft inorout yrexp
  /SOURCE sqft
  /POWER 0 TO 5 BY 0.5
  /CONSTANT
  /SAVE WEIGHT
  /PRINT BEST.

• This command specifies a weighted least-squares regression in which cost is the dependent variable and sqft, inorout, and yrexp are the independent variables.

• The SOURCE subcommand identifies sqft as the source of heteroscedasticity.

• The POWER subcommand specifies that several equations will be fit, one for each value from 0 to 5, incrementing by 0.5. Weights will be calculated using sqft.

• The SAVE subcommand requests that the weights that maximize the log-likelihood function be saved to the active dataset.

• All other options are set to their default values.

For discussion of output from this syntax and to place the example in context, see Using Weight Estimation to Model the Cost of Mall Construction.

Related Topics

WLS
Overview (WLS command)
VARIABLES Subcommand (WLS command)
SOURCE Subcommand (WLS command)
DELTA Subcommand (WLS command)
WEIGHT Subcommand (WLS command)
CONSTANT and NOCONSTANT Subcommands (WLS command)
SAVE Subcommand (WLS command)
PRINT Subcommand (WLS command)
APPLY Subcommand (WLS command)


VARIABLES Subcommand (WLS command)

WLS (command),WLS (command),WLS (command)
VARIABLES subcommand,VARIABLES subcommand,VARIABLES subcommand
VARIABLES (subcommand),VARIABLES (subcommand),VARIABLES (subcommand)
WLS command,WLS command,WLS command

VARIABLES specifies the variable list and is the only required subcommand.

Related Topics

WLS
Overview (WLS command)
Example (WLS command)
SOURCE Subcommand (WLS command)
DELTA Subcommand (WLS command)
WEIGHT Subcommand (WLS command)
CONSTANT and NOCONSTANT Subcommands (WLS command)
SAVE Subcommand (WLS command)
PRINT Subcommand (WLS command)
APPLY Subcommand (WLS command)


SOURCE Subcommand (WLS command)

WLS (command),WLS (command),WLS (command)
SOURCE subcommand,SOURCE subcommand,SOURCE subcommand
SOURCE (subcommand),SOURCE (subcommand),SOURCE (subcommand)
WLS command,WLS command,WLS command
heteroscedasticity,heteroscedasticity,heteroscedasticity
WLS command,WLS command,WLS command

SOURCE is used in conjunction with the DELTA subcommand to compute weights. SOURCE names the variable that is the source of heteroscedasticity.

• The only specification on SOURCE is the name of a variable to be used as the source of heteroscedasticity.

• Only one source variable can be specified.

• If neither SOURCE nor WEIGHT is specified, the first independent variable specified on the VARIABLES subcommand is assumed to be the source variable.

Related Topics

WLS
Overview (WLS command)
Example (WLS command)
VARIABLES Subcommand (WLS command)
DELTA Subcommand (WLS command)
WEIGHT Subcommand (WLS command)
CONSTANT and NOCONSTANT Subcommands (WLS command)
SAVE Subcommand (WLS command)
PRINT Subcommand (WLS command)
APPLY Subcommand (WLS command)


DELTA Subcommand (WLS command)

WLS (command),WLS (command),WLS (command)
DELTA subcommand,DELTA subcommand,DELTA subcommand
DELTA (subcommand),DELTA (subcommand),DELTA (subcommand)
WLS command,WLS command,WLS command
power range,power range,power range
WLS command,WLS command,WLS command
WLS (command),WLS (command),WLS (command)
power range,power range,power range
WLS (command),WLS (command),WLS (command)
POWER subcommand,POWER subcommand,POWER subcommand
POWER (subcommand),POWER (subcommand),POWER (subcommand)
WLS command,WLS command,WLS command

DELTA, alias POWER, is used in conjunction with the SOURCE subcommand to compute weights. DELTA specifies the values to use in computing weights. The weights are equal to 1/(SOURCE raised to the DELTA power).

• The specification on DELTA is a list of possible delta values and/or value grids.

• Multiple values and grids can be specified on one DELTA subcommand.

• Delta values can be any value in the range of –6.5 to +7.5. Values below this range are assigned the minimum (–6.5), and values above are assigned the maximum (7.5).

• A grid is specified by naming the starting value, the keyword TO, an ending value, the keyword BY, and an increment value. Alternatively, the keyword BY and the increment value can be specified after the starting value.

• More than one DELTA subcommand can be specified; each subcommand will be executed.

• If DELTA is not specified, the delta value defaults to 1.0.

Example

WLS VARIABLES = X1 WITH Y1 Z1
  /SOURCE=Z1
  /DELTA=0.5.

• In this example, weights are calculated using the source variable Z1 and a delta value of 0.5. Thus, the weights are 1/(SQRT (Z1)).

Example

WLS VARIABLES = SHARES WITH PRICE
  /DELTA=0.5 TO 2.5 BY 0.5.

• In this example, several regression equations will be fit, one for each value of delta.

• Weights are calculated using the source variable PRICE (the default).

• The delta values start at 0.5 and go up to 2.5, incrementing by 0.5. This specification is equivalent to 0.5 BY 0.5 TO 2.5.

• The weights that maximize the log-likelihood function will be saved as variable WGT#1.

Related Topics

WLS
Overview (WLS command)
Example (WLS command)
VARIABLES Subcommand (WLS command)
SOURCE Subcommand (WLS command)
WEIGHT Subcommand (WLS command)
CONSTANT and NOCONSTANT Subcommands (WLS command)
SAVE Subcommand (WLS command)
PRINT Subcommand (WLS command)
APPLY Subcommand (WLS command)


WEIGHT Subcommand (WLS command)

WLS (command),WLS (command),WLS (command)
WEIGHT subcommand,WEIGHT subcommand,WEIGHT subcommand
WEIGHT (subcommand),WEIGHT (subcommand),WEIGHT (subcommand)
WLS command,WLS command,WLS command
weights,weights,weights
WLS command,WLS command,WLS command

WEIGHT specifies the variable containing the weights to be used in weighting the cases. WEIGHT is an alternative to computing the weights using the SOURCE and DELTA subcommands. If a variable containing weights is specified, the output includes the regression coefficients, log-likelihood function, and summary regression statistics such as R, R2, adjusted R2, standard errors, analysis of variance, and t tests of the coefficients. Since no new weights are computed, no new variable is created.

• The only specification on WEIGHT is the name of the variable containing the weights. Typically, WGT variables from previous WLS procedures are used.

• Only one variable can be specified.

Example

WLS VARIABLES = SHARES WITH PRICE
  /WEIGHT=WGT_1.

• This WLS command uses the weights contained in variable WGT_1 to weight cases.

Related Topics

WLS
Overview (WLS command)
Example (WLS command)
VARIABLES Subcommand (WLS command)
SOURCE Subcommand (WLS command)
DELTA Subcommand (WLS command)
CONSTANT and NOCONSTANT Subcommands (WLS command)
SAVE Subcommand (WLS command)
PRINT Subcommand (WLS command)
APPLY Subcommand (WLS command)


CONSTANT and NOCONSTANT Subcommands (WLS command)

WLS (command),WLS (command),WLS (command)
NOCONSTANT subcommand,NOCONSTANT subcommand,NOCONSTANT subcommand
NOCONSTANT (subcommand),NOCONSTANT (subcommand),NOCONSTANT (subcommand)
WLS command,WLS command,WLS command
WLS (command),WLS (command),WLS (command)
CONSTANT subcommand,CONSTANT subcommand,CONSTANT subcommand
CONSTANT (subcommand),CONSTANT (subcommand),CONSTANT (subcommand)
WLS command,WLS command,WLS command
WLS (command),WLS (command),WLS (command)
including constant,including constant,including constant

Specify CONSTANT or NOCONSTANT to indicate whether a constant term should be estimated in the regression equation. The specification of either subcommand overrides the CONSTANT setting on the TSET command for the current procedure.

• CONSTANT is the default and specifies that the constant term is used as an instrument.

• NOCONSTANT eliminates the constant term.

Related Topics

WLS
Overview (WLS command)
Example (WLS command)
VARIABLES Subcommand (WLS command)
SOURCE Subcommand (WLS command)
DELTA Subcommand (WLS command)
WEIGHT Subcommand (WLS command)
SAVE Subcommand (WLS command)
PRINT Subcommand (WLS command)
APPLY Subcommand (WLS command)


SAVE Subcommand (WLS command)

WLS (command),WLS (command),WLS (command)
SAVE subcommand,SAVE subcommand,SAVE subcommand
SAVE (subcommand),SAVE (subcommand),SAVE (subcommand)
WLS command,WLS command,WLS command
weight variables,weight variables,weight variables
saving WLS command,saving WLS command,saving WLS command
WLS (command),WLS (command),WLS (command)
saving weight variables,saving weight variables,saving weight variables

SAVE saves the weight variable generated during the current session to the end of the active dataset. The default name WGT_n will be generated, where n increments to make the variable name unique. The only specification on SAVE is WEIGHT. The specification overrides the NONE or the default CURRENT setting on NEWVAR for the current procedure.

Related Topics

WLS
Overview (WLS command)
Example (WLS command)
VARIABLES Subcommand (WLS command)
SOURCE Subcommand (WLS command)
DELTA Subcommand (WLS command)
WEIGHT Subcommand (WLS command)
CONSTANT and NOCONSTANT Subcommands (WLS command)
PRINT Subcommand (WLS command)
APPLY Subcommand (WLS command)


PRINT Subcommand (WLS command)

WLS (command),WLS (command),WLS (command)
PRINT subcommand,PRINT subcommand,PRINT subcommand
PRINT (subcommand),PRINT (subcommand),PRINT (subcommand)
WLS command,WLS command,WLS command

PRINT can be used to override the PRINT setting on the TSET command for the current procedure. Two keywords are available.

BEST | Display coefficients for the best weight only. This is the default.
ALL | Display coefficients for all weights.

Related Topics

WLS
Overview (WLS command)
Example (WLS command)
VARIABLES Subcommand (WLS command)
SOURCE Subcommand (WLS command)
DELTA Subcommand (WLS command)
WEIGHT Subcommand (WLS command)
CONSTANT and NOCONSTANT Subcommands (WLS command)
SAVE Subcommand (WLS command)
APPLY Subcommand (WLS command)


APPLY Subcommand (WLS command)

APPLY (subcommand),APPLY (subcommand),APPLY (subcommand)
WLS command,WLS command,WLS command
WLS (command),WLS (command),WLS (command)
APPLY subcommand,APPLY subcommand,APPLY subcommand
WLS (command),WLS (command),WLS (command)
using previous model,using previous model,using previous model

• The APPLY subcommand allows you to use a previously defined WLS model without having to repeat the specifications.

• The only specification on APPLY is the name of a previous model in quotes. If a model name is not specified, the model specified on the previous WLS command is used.

• To change one or more model specifications, specify the subcommands of only those portions you want to change after the APPLY subcommand.

• If no variables are specified on the command, the variables that were originally specified with the model being reapplied are used.

Example

WLS VARIABLES = X1 WITH Y1
  /SOURCE=Y1
  /DELTA=1.5.
WLS APPLY
  /DELTA=2.

• The first command produces a weighted least-squares regression of X1, with Y1 as the source variable and delta equal to 1.5.

• The second command uses the same variable and source but changes the delta value to 2.

Example

WLS VARIABLES = X1 WITH Y1 Z1
  /SOURCE=Z1
  /DELTA=1 TO 3 BY 0.5
WLS APPLY
  /WEIGHT=WGT#1.

• The first command regresses X1 on Y1 and Z1, using Z1 as the source variable. The delta values range from 1 to 3, incrementing by 0.5.

• The second command again regresses X1 on Y1 and Z1, but this time applies the values of WGT#1 as the weights.

Related Topics

WLS
Overview (WLS command)
Example (WLS command)
VARIABLES Subcommand (WLS command)
SOURCE Subcommand (WLS command)
DELTA Subcommand (WLS command)
WEIGHT Subcommand (WLS command)
CONSTANT and NOCONSTANT Subcommands (WLS command)
SAVE Subcommand (WLS command)
PRINT Subcommand (WLS command)


WRITE

WRITE (command),WRITE (command),WRITE (command)
WRITE (command),WRITE (command),WRITE (command)
syntax chart,syntax chart,syntax chart
writing cases,writing cases,writing cases
WRITE [OUTFILE='file'] [ENCODING='encoding specification']
  [RECORDS={1}] [{NOTABLE}]
                              {n}   {TABLE  }

 /{1    } varlist [{col location [(format)]}] [varlist...]
  {rec #}          {(format list)          }
                   {*                      }

 [/{2    }...]
   {rec #}

This command does not read the active dataset. It is stored, pending execution with the next command that reads the dataset. See the topic Command Order for more information.

Release History Collapse Hide details

Release History

Release 16.0

• ENCODING subcommand added for Unicode support.

Example

WRITE OUTFILE="/data/personnel.txt' / MOHIRED YRHIRED DEPT SALARY NAME.
EXECUTE.

Related Topics

Overview (WRITE command)
Examples (WRITE command)
Formats (WRITE command)
Strings (WRITE command)
RECORDS Subcommand (WRITE command)
OUTFILE Subcommand (WRITE command)
ENCODING Subcommand (PRINT command)
TABLE Subcommand (WRITE command)


Overview (WRITE command)

WRITE (command),WRITE (command),WRITE (command)
variable list,variable list,variable list
ALL (keyword),ALL (keyword),ALL (keyword)
WRITE command,WRITE command,WRITE command
SET (command),SET (command),SET (command)
with WRITE command,with WRITE command,with WRITE command
WRITE (command),WRITE (command),WRITE (command)
with SET command,with SET command,with SET command
WRITE (command),WRITE (command),WRITE (command)
missing values,missing values,missing values

WRITE writes files in a machine-readable format that can be used by other software applications. When used for this purpose, the OUTFILE subcommand is required. If OUTFILE is not specified, the output from WRITE that can be displayed is included with the output from your session in a format similar to that used by the PRINT command.

Options Collapse Hide details

Options

Formats. You can specify formats for the variables.

Strings. You can include strings within the variable specifications. The strings can be used to label values or to add extra space between values.

Multiple Lines per Case. You can write variables on more than one line for each case. See the RECORDS subcommand.

Output File. You can direct the output to a specified file using the OUTFILE subcommand.

Summary Table. You can display a table that summarizes the variable formats with the TABLE subcommand.

Subcommand Order Collapse Hide details

Subcommand Order

Subcommands can be specified in any order. However, all subcommands must be used before the slash that precedes the first variable list.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is a slash followed by a variable list. The values for all of the variables specified on the list are included with the rest of the output from your session.

Syntax Rules Collapse Hide details

Syntax Rules

• A slash must precede the variable specifications. The first slash begins the definition of the first (and possibly only) line per case of the WRITE output.

• Specified variables must already exist, but they can be numeric, string, scratch, temporary, or system variables. Subscripted variable names, such as X(1) for the first element in vector X cannot be used.

• Keyword ALL can be used to write the values of all user-defined variables in the active dataset.

Operations Collapse Hide details

Operations

• WRITE is executed once for each case constructed from the data file.

• Values are written to the file as the data are read.

• WRITE is a transformation and will not be executed unless it is followed by a procedure or the EXECUTE command.

• When writing to an external file with the OUTFILE subcommand, line/record width can be up to 2.1 billion bytes. When writing to the Viewer, however (when there is no OUTFILE subcommand), if a line width exceeds the line width defined by SET WIDTH, an error results and the WRITE command is not executed. The maximum line width you can specify with SET WIDTH is 255 bytes.

• There are no carriage control characters in the output file generated by WRITE.

• User-missing values are written just like valid values. System-missing values are represented by blanks.

• If you are writing a file to be used on another system, you should take into account that some data types cannot be read by all computers.

• If long records are less convenient than short records with multiple records per case, you can write out a case identifier and insert a string as a record identification number. The receiving system can then check for missing record numbers (see Strings for an example).

Related Topics

WRITE
Examples (WRITE command)
Formats (WRITE command)
Strings (WRITE command)
RECORDS Subcommand (WRITE command)
OUTFILE Subcommand (WRITE command)
ENCODING Subcommand (PRINT command)
TABLE Subcommand (WRITE command)


Examples (WRITE command)

Writing a Specific Set of Variables

WRITE OUTFILE="/data/personnel.txt' / MOHIRED YRHIRED DEPT SALARY NAME.
FREQUENCIES VARIABLES=DEPT.

• WRITE writes values for each variable on the variable list to file personnel.txt. The FREQUENCIES procedure reads the data and causes WRITE to be executed.

• All variables are written with their dictionary formats.

Writing All Variables

WRITE OUTFILE='/data/personnel.txt' /ALL.
EXECUTE.

• WRITE writes values for all user-defined variables in the active dataset to file personnel.txt. The EXECUTE command executes WRITE.

Related Topics

WRITE
Overview (WRITE command)
Formats (WRITE command)
Strings (WRITE command)
RECORDS Subcommand (WRITE command)
OUTFILE Subcommand (WRITE command)
ENCODING Subcommand (PRINT command)
TABLE Subcommand (WRITE command)


Formats (WRITE command)

WRITE (command),WRITE (command),WRITE (command)
formats,formats,formats
printing cases,printing cases,printing cases
formats,formats,formats

By default, WRITE uses the dictionary write formats. You can specify formats for some or all variables specified on WRITE. For a string variable, the specified format must have the same width as that of the dictionary format.

• Format specifications can be either column-style or FORTRAN-like (see DATA LIST). The column location specified with column-style formats or implied with FORTRAN-like formats refers to the column in which the variable will be written.

• A format specification following a list of variables applies to all the variables in the list. Use an asterisk to prevent the specified format from applying to variables preceding the asterisk. The specification of column locations implies a default print format, and that format will apply to all previous variables if no asterisk is used.

• All available formats can be specified on WRITE. Note that hex and binary formats use different widths. For example, the AHEX format must have a width twice that of the corresponding A format. For more information on specifying formats and on the formats available, see DATA LIST and Variable Formats.

• Format specifications are in effect only for the WRITE command. They do not change the dictionary write formats.

• To specify a blank between variables in the output, use a string (see Strings), specify blank columns in the format, or use an X or T format element in the WRITE specifications (see DATA LIST for information on X and T).

Example

WRITE OUTFILE='/data/personnel.txt' / TENURE (F2.0) ' ' MOHIRED YRHIRED DEPT *
        SALARY85 TO SALARY88 (4(DOLLAR8,1X)) NAME.
EXECUTE.

• Format F2.0 is specified for TENURE. A blank between quotes is specified as a string after TENURE to separate values of TENURE from those of MOHIRED.

• MOHIRED, YRHIRED, and DEPT are written with default formats because the asterisk prevents them from receiving the DOLLAR8 format specified for SALARY85 to SALARY88. The 1X format element is specified with DOLLAR8 to add one blank after each value of SALARY85 to SALARY88.

• NAME uses the default dictionary format.

Related Topics

WRITE
Overview (WRITE command)
Examples (WRITE command)
Strings (WRITE command)
RECORDS Subcommand (WRITE command)
OUTFILE Subcommand (WRITE command)
ENCODING Subcommand (PRINT command)
TABLE Subcommand (WRITE command)


Strings (WRITE command)

WRITE (command),WRITE (command),WRITE (command)
strings,strings,strings

You can specify strings within the variable list. Strings must be enclosed in quotes.

• If a format is specified for a variable list, the application of the format is interrupted by a specified string. Thus, the string has the same effect within a variable list as an asterisk.

Example

WRITE OUTFILE='/data/personnel.txt'
  /EMPLOYID '1' MOHIRED YRHIRED SEX AGE JOBCAT NAME
  /EMPLOYID '2' DEPT86 TO DEPT88 SALARY86 TO SALARY88.
EXECUTE.

• Strings are used to assign the constant 1 to record 1 of each case, and 2 to record 2 to provide record identifiers in addition to the case identifier EMPLOYID.

Related Topics

WRITE
Overview (WRITE command)
Examples (WRITE command)
Formats (WRITE command)
RECORDS Subcommand (WRITE command)
OUTFILE Subcommand (WRITE command)
ENCODING Subcommand (PRINT command)
TABLE Subcommand (WRITE command)


RECORDS Subcommand (WRITE command)

RECORDS (subcommand),RECORDS (subcommand),RECORDS (subcommand)
WRITE command,WRITE command,WRITE command
WRITE (command),WRITE (command),WRITE (command)
RECORDS subcommand,RECORDS subcommand,RECORDS subcommand

RECORDS indicates the total number of lines written per case. The number specified on RECORDS is informational only. The actual specification that causes variables to be written on a new line is a slash within the variable specifications. Each new line is requested by another slash.

• RECORDS must be specified before the slash that precedes the start of the variable specifications.

• The only specification on RECORDS is an integer to indicate the number of records for the output. If the number does not agree with the actual number of records indicated by slashes, the program issues a warning and ignores the specification on RECORDS.

• Specifications for each line of output must begin with a slash. An integer can follow the slash, indicating the line on which values are to be written. The integer is informational only. It cannot be used to rearrange the order of records in the output. If the integer does not agree with the actual record number indicated by the number of slashes in the variable specifications, the integer is ignored.

• A slash that is not followed by a variable list generates a blank line in the output.

Examples

WRITE OUTFILE='/data/personnel.txt' RECORDS=2
  /EMPLOYID NAME DEPT
  /EMPLOYID TENURE SALARY.
EXECUTE.

• WRITE writes the values of an individual’s name and department on one line, tenure and salary on the next line, and the employee identification number on both lines.

WRITE OUTFILE='/data/personnel.txt' RECORDS=2
  /1 EMPLOYID NAME DEPT
  /2 EMPLOYID TENURE SALARY.
EXECUTE.

• This command is equivalent to the command in the preceding example.

WRITE OUTFILE='/data/personnel.txt' / EMPLOYID NAME DEPT / EMPLOYID TENURE SALARY.
EXECUTE.

• This command is equivalent to the commands in both preceding examples.

Related Topics

WRITE
Overview (WRITE command)
Examples (WRITE command)
Formats (WRITE command)
Strings (WRITE command)
OUTFILE Subcommand (WRITE command)
ENCODING Subcommand (PRINT command)
TABLE Subcommand (WRITE command)


OUTFILE Subcommand (WRITE command)

WRITE (command),WRITE (command),WRITE (command)
OUTFILE subcommand,OUTFILE subcommand,OUTFILE subcommand
OUTFILE (subcommand),OUTFILE (subcommand),OUTFILE (subcommand)
WRITE command,WRITE command,WRITE command

OUTFILE specifies the target file for the output from the WRITE command. By default, the output is included with the rest of the output from the session.

• OUTFILE must be specified before the slash that precedes the start of the variable specifications.

Example

WRITE OUTFILE='/data/writeout.txt'
   /1 EMPLOYID DEPT SALARY /2 NAME.
EXECUTE.

• OUTFILE specifies writeout.txt as the file that receives the WRITE output.

Related Topics

WRITE
Overview (WRITE command)
Examples (WRITE command)
Formats (WRITE command)
Strings (WRITE command)
RECORDS Subcommand (WRITE command)
ENCODING Subcommand (PRINT command)
TABLE Subcommand (WRITE command)


ENCODING Subcommand (PRINT command)

WRITE (command),WRITE (command),WRITE (command)
ENCODING subcommand,ENCODING subcommand,ENCODING subcommand
ENCODING (subcommand),ENCODING (subcommand),ENCODING (subcommand)
WRITE command,WRITE command,WRITE command

ENCODING specifies the encoding format of the file. The keyword is followed by an equals sign and a quoted encoding specification.

• In Unicode mode, the default is UTF8. For more information, see SET command, UNICODE subcommand.

• In code page mode, the default is the current locale setting. For more information, see SET command, LOCALE subcommand.

• The quoted encoding value can be: Locale (the current locale setting), UTF8, UTF16, UTF16BE (big endian), UTF16LE (little endian), a numeric Windows code page value (for example, '1252'), or an IANA code page value (for example, 'iso8859-1' or cp1252).

• If there is no OUTFILE subcommand, the ENCODING subcommand is ignored.

Related Topics

WRITE
Overview (WRITE command)
Examples (WRITE command)
Formats (WRITE command)
Strings (WRITE command)
RECORDS Subcommand (WRITE command)
OUTFILE Subcommand (WRITE command)
TABLE Subcommand (WRITE command)


TABLE Subcommand (WRITE command)

WRITE (command),WRITE (command),WRITE (command)
TABLE subcommand,TABLE subcommand,TABLE subcommand
WRITE (command),WRITE (command),WRITE (command)
NOTABLE subcommand,NOTABLE subcommand,NOTABLE subcommand
TABLE (subcommand),TABLE (subcommand),TABLE (subcommand)
WRITE command,WRITE command,WRITE command
NOTABLE (subcommand),NOTABLE (subcommand),NOTABLE (subcommand)
WRITE command,WRITE command,WRITE command

TABLE requests a table showing how the variable information is formatted. NOTABLE is the default.

• TABLE must be specified before the slash that precedes the start of the variable specifications.

Example

WRITE OUTFILE='/data/personnel.txt' TABLE
  /1 EMPLOYID DEPT SALARY /2  NAME.
EXECUTE.

• TABLE requests a summary table describing the WRITE specifications.

Related Topics

WRITE
Overview (WRITE command)
Examples (WRITE command)
Formats (WRITE command)
Strings (WRITE command)
RECORDS Subcommand (WRITE command)
OUTFILE Subcommand (WRITE command)
ENCODING Subcommand (PRINT command)


WRITE FORMATS

output formats,output formats,output formats
write,write,write
write formats,write formats,write formats
output formats,output formats,output formats
numeric data,numeric data,numeric data
output formats,output formats,output formats
WRITE FORMATS (command),WRITE FORMATS (command),WRITE FORMATS (command)
WRITE FORMATS (command),WRITE FORMATS (command),WRITE FORMATS (command)
syntax chart,syntax chart,syntax chart
WRITE FORMATS varlist (format) [varlist...]

This command takes effect immediately. It does not read the active dataset or execute pending transformations. See the topic Command Order for more information.

Example

WRITE FORMATS SALARY (DOLLAR8)
            / HOURLY (DOLLAR7.2)
            / RAISE BONUS (PCT2).

Related Topics

Overview (WRITE FORMATS command)
Examples (WRITE FORMATS command)


Overview (WRITE FORMATS command)

output formats,output formats,output formats
format specification,format specification,format specification
WRITE FORMATS (command),WRITE FORMATS (command),WRITE FORMATS (command)
format specification,format specification,format specification
output formats,output formats,output formats
custom currency,custom currency,custom currency
string variables,string variables,string variables
output formats,output formats,output formats
WRITE FORMATS (command),WRITE FORMATS (command),WRITE FORMATS (command)
string variables,string variables,string variables
output formats,output formats,output formats
displaying,displaying,displaying
WRITE FORMATS (command),WRITE FORMATS (command),WRITE FORMATS (command)
with DISPLAY command,with DISPLAY command,with DISPLAY command
DISPLAY (command),DISPLAY (command),DISPLAY (command)
with WRITE FORMATS command,with WRITE FORMATS command,with WRITE FORMATS command

WRITE FORMATS changes variable write formats. Write formats are output formats and control the form in which values are written by the WRITE command.

WRITE FORMATS changes only write formats. To change print formats, use the PRINT FORMATS command. To change both the print and write formats with a single specification, use the FORMATS command. For information on assigning input formats during data definition, see DATA LIST. For detailed information on available formats and specifications, see Variable Types and Formats.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is a variable list followed by the new format specification in parentheses. All specified variables receive the new format.

Syntax Rules Collapse Hide details

Syntax Rules

• You can specify more than one variable or variable list, followed by a format in parentheses. Only one format can be specified after each variable list. For clarity, each set of specifications can be separated by a slash.

• You can use keyword TO to refer to consecutive variables in the active dataset.

• The specified width of a format must include enough positions to accommodate any punctuation characters such as decimal points, commas, dollar signs, or date and time delimiters. (This differs from assigning an input format on DATA LIST, where the program automatically expands the input format to accommodate punctuation characters in output.)

• Custom currency formats (CCw, CCw.d) must first be defined on the SET command before they can be used on WRITE FORMATS.

• For string variables, you can only use WRITE FORMATS to switch between A and AHEX formats. WRITE FORMATS cannot be used to change the length of string variables. To change the length of a string variable, declare a new variable of the desired length with the STRING command and then use COMPUTE to copy values from the existing string into the new variable.

Operations Collapse Hide details

Operations

• Unlike most transformations, WRITE FORMATS takes effect as soon as it is encountered in the command sequence. Special attention should be paid to its position among commands. See the topic Command Order for more information.

• Variables not specified on WRITE FORMATS retain their current formats in the active dataset. To see the current formats, use the DISPLAY command.

• The new write formats are changed only in the active dataset and are in effect for the duration of the session or until changed again with a WRITE FORMATS or FORMATS command. Write formats in the original data file (if one exists) are not changed, unless the file is resaved with the SAVE or XSAVE command.

• New numeric variables created with transformation commands are assigned default print and write formats of F8.2 (or the format specified on the FORMAT subcommand of SET). The WRITE FORMATS command can be used to change the new variable’s write formats.

• New string variables created with transformation commands are assigned the format specified on the STRING command that declares the variable. WRITE FORMATS cannot be used to change the format of a new string variable.

• Date and time formats are effective only with the LIST and TABLES procedures and the PRINT and WRITE transformation commands. All other procedures use F format regardless of the date and time formats specified. See the topic Date and Time Formats for more information.

• If a numeric data value exceeds its width specification, the program attempts to write some value nevertheless. First the program rounds decimal values, then removes punctuation characters, then tries scientific notation, and finally, if there is still not enough space, produces asterisks indicating that a value is present but cannot be written in the assigned width.

Related Topics

WRITE FORMATS
Examples (WRITE FORMATS command)


Examples (WRITE FORMATS command)

SET (command),SET (command),SET (command)
with WRITE FORMATS command,with WRITE FORMATS command,with WRITE FORMATS command
WRITE FORMATS (command),WRITE FORMATS (command),WRITE FORMATS (command)
with SET command,with SET command,with SET command

Specifying Write Formats for Multiple Variables

WRITE FORMATS SALARY (DOLLAR8)
            / HOURLY (DOLLAR7.2)
            / RAISE BONUS (PCT2).

• The write format for SALARY is changed to DOLLAR with eight positions, including the dollar sign and comma when appropriate. An eight-digit number would require a DOLLAR11 format specification: eight characters for the digits, two characters for commas, and one character for the dollar sign.

• The write format for HOURLY is changed to DOLLAR with seven positions, including the dollar sign, decimal point, and two decimal places.

• The write format for both RAISE and BONUS is changed to PCT with two positions: one for the percentage and one for the percent sign.

Changing the Default Format of a New Variable

COMPUTE V3=V1 + V2.
WRITE FORMATS V3 (F3.1).

• COMPUTE creates the new numeric variable V3. By default, V3 is assigned an F8.2 format.

• WRITE FORMATS changes the write format for V3 to F3.1.

Working With Custom Currency Formats

SET CCA='-/-.Dfl ..-'.
WRITE FORMATS COST (CCA14.2).

• SET defines a European currency format for the custom currency format type CCA.

• WRITE FORMATS assigns the write format CCA to variable COST. See the SET command for more information on custom currency formats.

Related Topics

WRITE FORMATS
Overview (WRITE FORMATS command)


XGRAPH

XGRAPH (command),XGRAPH (command),XGRAPH (command)
XGRAPH (command),XGRAPH (command),XGRAPH (command)
syntax chart,syntax chart,syntax chart
release history,release history,release history
charts,charts,charts

XGRAPH is available in the Statistics Base option.

XGRAPH is available only on systems with high-resolution graphics capabilities.

Note: Square brackets used in the XGRAPH syntax chart are required parts of the syntax and are not used to indicate optional elements. Any equals signs (=) displayed in the syntax chart are required. All subcommands except the chart expression in the first line are optional.

XGRAPH CHART=yvars BY xvars BY zvars

  /BIN START={AUTO**} SIZE={AUTO**   }
             {x     }      {WIDTH (x)}
                           {COUNT (n)}

  /DISPLAY DOT={ASYMMETRIC**}
               {SYMMETRIC   }
               {FLAT        }

  /DISTRIBUTION TYPE=NORMAL

  /COORDINATE SPLIT={NO**}
                    {YES }

  /ERRORBAR {CI     {(95)}}
                    {(n) }
            {STDDEV {(2) }}
                    {(n) }
            {SE     {(2) }}
                    {(n) }

  /MISSING USE={LISTWISE**  } REPORT={NO**}
               {VARIABLEWISE}        {YES }

  /PANEL COLVAR=varlist COLOP={CROSS**} ROWVAR=varlist ROWOP={CROSS**}
                              {NEST   }                      {NEST   }

  /TEMPLATE FILE='filespec'

  /TITLES TITLE='line' 'line2' SUBTITLE='line1'
          FOOTNOTE='line1' 'line2'

** Default if the subcommand is omitted.

yvars defines the y dimension and has the general form:

(varname [function] [data_element_type] + ...) > {varname {[COLOR]  }}
                                                          {[PATTERN]}
                                                 {1       {[COLOR]  }}
                                                          {[PATTERN]}

xvars and zvars define the x and z dimensions and have the general form:

{varname {[c]}              } > varname {[COLOR]  }
         {[s]}}                         {[PATTERN]}
{$CASENUM [LABEL=varname]   }
{1                          }

The + operator blends the y-axis to accommodate all the y-axis variables. It is used when separate variables are displayed on the same axis. The number 1 is a placeholder for the variables on the axis. The > operator stacks data elements on the y-axis and clusters data elements on the x-axis and z-axis. [c] or [s] indicates whether the variable should be treated as categorical or scale. $CASENUM is used when individual cases are displayed on the same axis.

Summary functions available for yvars: VALUE, COUNT, PCT, CUPCT, CUFREQ, MINIMUM, MAXIMUM, VALIDN, SUM, CSUM, MEAN, STDDEV, VARIANCE, MEDIAN, GMEDIAN, MODE, PTILE(x), GPTILE(x), PLT(x), PGT(x), NLT(x), NGT(x), PIN(x1,x2), and NIN(x1,x2).

Data element types available for yvars: BAR, HISTOBAR, and POINT.

This command reads the active dataset and causes execution of any pending commands. See the topic Command Order for more information.

Syntax for the XGRAPH command can be generated from a number of dialogs accessible from the Graphs menu.

Release History Collapse Hide details

Release History

Release 13.0

• Command introduced.

Example

XGRAPH CHART=([COUNT] [BAR]) BY jobcat [c] BY gender [c].

Related Topics

Overview (XGRAPH command)
CHART Expression (XGRAPH command)
BIN Subcommand (XGRAPH command)
DISPLAY Subcommand (XGRAPH command)
DISTRIBUTION Subcommand (XGRAPH command)
COORDINATE Subcommand (XGRAPH command)
ERRORBAR Subcommand (XGRAPH command)
MISSING Subcommand (XGRAPH command)
PANEL Subcommand (XGRAPH command)
TEMPLATE Subcommand (XGRAPH command)
TITLES Subcommand (XGRAPH command)


Overview (XGRAPH command)

XGRAPH generates a high-resolution chart by computing statistics from variables in the active dataset and constructing the chart according to your specification. The chart can be a 3-D bar chart, population pyramid, or dot plot. The chart is displayed where high-resolution display is available and can be edited with the Chart Editor and saved in an Output file.

Note: Although you can create other charts with XGRAPH, these are not currently supported.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is the command name followed by a chart expression. The chart expression must identify one or more variables and a data element for the chart.

Syntax Rules Collapse Hide details

Syntax Rules

• The chart expression is required and must appear first. It can optionally be preceded by CHART=. If CHART is used, the = must be present. All other subcommands are optional.

• After the chart expression, subcommands can appear in any order.

• Only a single instance of each subcommand is allowed.

• Subcommand names and keywords must be spelled in full.

• Required square brackets cannot be merged for different types of specifications. For example, when a summary function and a data element are adjacent, they cannot be merged. That is, [VALUE] [BAR] cannot be written as [VALUE BAR].

Limitations Collapse Hide details

Limitations

• XGRAPH does not produce charts with more than 1,000,000 data values.

• When a weight is in effect and the ERRORBAR subcommand is used on a chart that displays medians, counts, or percentages, the case weights must be integers.

Related Topics

XGRAPH
CHART Expression (XGRAPH command)
BIN Subcommand (XGRAPH command)
DISPLAY Subcommand (XGRAPH command)
DISTRIBUTION Subcommand (XGRAPH command)
COORDINATE Subcommand (XGRAPH command)
ERRORBAR Subcommand (XGRAPH command)
MISSING Subcommand (XGRAPH command)
PANEL Subcommand (XGRAPH command)
TEMPLATE Subcommand (XGRAPH command)
TITLES Subcommand (XGRAPH command)


CHART Expression (XGRAPH command)

XGRAPH (command),XGRAPH (command),XGRAPH (command)
CHART subcommand,CHART subcommand,CHART subcommand
CHART (subcommand),CHART (subcommand),CHART (subcommand)
XGRAPH command,XGRAPH command,XGRAPH command

The chart expression defines the data and the role of that data in the chart. It also specifies the data element type and any clustering and stacking. For clustered and stacked charts, the chart expression specifies whether color or patterns are used to distinguish the clustered and stacked groups. For charts of individual cases (that is, when $CASENUM defines a categorical axis), the chart expression can also specify a label variable.

• The CHART keyword is optional. If it is used, it must be followed by an equals sign (=).

• The order within the chart expression matters. The yvars (the y dimension) must be first, followed by xvars and then zvars.

• The final BY variable is used as the splitter variable in a population pyramid when the COORDINATE subcommand specifies SPLIT.

• There is a limit to the number of stack and cluster specifications. There can be two clusters, or one stack and one cluster.

Related Topics

XGRAPH
Overview (XGRAPH command)
BIN Subcommand (XGRAPH command)
DISPLAY Subcommand (XGRAPH command)
DISTRIBUTION Subcommand (XGRAPH command)
COORDINATE Subcommand (XGRAPH command)
ERRORBAR Subcommand (XGRAPH command)
MISSING Subcommand (XGRAPH command)
PANEL Subcommand (XGRAPH command)
TEMPLATE Subcommand (XGRAPH command)
TITLES Subcommand (XGRAPH command)
Functions (XGRAPH command)
Data Element Types (XGRAPH command)
Measurement Level (XGRAPH command)
Variable Placeholder (XGRAPH command)
Case Numbers (XGRAPH command)
Blending, Clustering, and Stacking (XGRAPH command)
Labels (XGRAPH command)


Functions (XGRAPH command)

Functions must be enclosed in square brackets.

Value function:

VALUE (function),VALUE (function),VALUE (function)
XGRAPH command,XGRAPH command,XGRAPH command

The VALUE function yields the value of the specified y-axis variable for each case. It always produces one data element for each case.

Aggregation functions:

Two groups of aggregation functions are available: count functions and summary functions.

charts,charts,charts
count functions,count functions,count functions

Count functions:

COUNT (function),COUNT (function),COUNT (function)
XGRAPH command,XGRAPH command,XGRAPH command
PCT (function),PCT (function),PCT (function)
XGRAPH command,XGRAPH command,XGRAPH command
CUPCT (function),CUPCT (function),CUPCT (function)
XGRAPH command,XGRAPH command,XGRAPH command
CUFREQ (function),CUFREQ (function),CUFREQ (function)
XGRAPH command,XGRAPH command,XGRAPH command
COUNT | Frequency of cases in each category.
PCT | Frequency of cases in each category expressed as a percentage of the whole.
CUPCT | Cumulative percentage sorted by category value.
CUFREQ | Cumulative frequency sorted by category value.

• Count functions yield the count or percentage of valid cases within categories determined by the xvars and the zvars, as in:

XGRAPH ([PCT] [BAR]) BY jobcat [c] BY gender [c].

• Count functions do not operate on a variable.

• Count functions do not have any arguments.

charts,charts,charts
summary functions,summary functions,summary functions

Summary functions:

MINIMUM (function),MINIMUM (function),MINIMUM (function)
XGRAPH command,XGRAPH command,XGRAPH command
MAXIMUM (function),MAXIMUM (function),MAXIMUM (function)
XGRAPH command,XGRAPH command,XGRAPH command
VALIDN (function),VALIDN (function),VALIDN (function)
XGRAPH command,XGRAPH command,XGRAPH command
COUNT (function),COUNT (function),COUNT (function)
XGRAPH command,XGRAPH command,XGRAPH command
CUSUM (function),CUSUM (function),CUSUM (function)
XGRAPH command,XGRAPH command,XGRAPH command
MEAN (function),MEAN (function),MEAN (function)
XGRAPH command,XGRAPH command,XGRAPH command
STDDEV (function),STDDEV (function),STDDEV (function)
XGRAPH command,XGRAPH command,XGRAPH command
VARIANCE (function),VARIANCE (function),VARIANCE (function)
XGRAPH command,XGRAPH command,XGRAPH command
MEDIAN (function),MEDIAN (function),MEDIAN (function)
XGRAPH command,XGRAPH command,XGRAPH command
GMEDIAN (function),GMEDIAN (function),GMEDIAN (function)
XGRAPH command,XGRAPH command,XGRAPH command
MODE (function),MODE (function),MODE (function)
XGRAPH command,XGRAPH command,XGRAPH command
PTILE (function),PTILE (function),PTILE (function)
XGRAPH command,XGRAPH command,XGRAPH command
PLT (function),PLT (function),PLT (function)
XGRAPH command,XGRAPH command,XGRAPH command
PGT (function),PGT (function),PGT (function)
XGRAPH command,XGRAPH command,XGRAPH command
NLT (function),NLT (function),NLT (function)
XGRAPH command,XGRAPH command,XGRAPH command
NGT (function),NGT (function),NGT (function)
XGRAPH command,XGRAPH command,XGRAPH command
PIN (function),PIN (function),PIN (function)
XGRAPH command,XGRAPH command,XGRAPH command
NIN (function),NIN (function),NIN (function)
XGRAPH command,XGRAPH command,XGRAPH command
MINIMUM | Minimum value of the variable.
MAXIMUM | Maximum value of the variable.
VALIDN | Number of cases for which the variable has a nonmissing value.
SUM | Sum of the values of the variable.
CUSUM | Sum of the summary variable accumulated across values of the category variable.
MEAN | Mean.
STDDEV | Standard deviation.
VARIANCE | Variance.
MEDIAN | Median.
GMEDIAN | Group median.
MODE | Mode.
PTILE(x) | Xth percentile value of the variable. X must be greater than 0 and less than 100.
PLT(x) | Percentage of cases for which the value of the variable is less than x.
PGT(x) | Percentage of cases for which the value of the variable is greater than x.
NLT(x) | Number of cases for which the value of the variable is less than x.
NGT(x) | Number of cases for which the value of the variable is greater than x.
PIN(x1,x2) | Percentage of cases for which the value of the variable is greater than or equal to x1 and less than or equal to x2. x1 cannot exceed x2.
NIN(x1,x2) | Number of cases for which the value of the variable is greater than or equal to x1 and less than or equal to x2. x1 cannot exceed x2.

• Summary functions operate on summary variables (variables that record continuous values, like age or expenses). To use a summary function, specify the name of one or more variables before the name of the function and the data element type, both of which are in square brackets, as in:

XGRAPH (salary [SUM] [BAR]) BY jobcat[c] BY gender[c].

• You can specify a list of variables on which the function operates, as in:

XGRAPH ((salary + salbegin) [SUM] [BAR]) BY jobcat[c] BY gender[c].

This syntax is equivalent to:

XGRAPH (salary [SUM] [BAR] + salbegin [SUM] [BAR]) BY jobcat[c] BY gender[c].

Related Topics

CHART Expression (XGRAPH command)
Data Element Types (XGRAPH command)
Measurement Level (XGRAPH command)
Variable Placeholder (XGRAPH command)
Case Numbers (XGRAPH command)
Blending, Clustering, and Stacking (XGRAPH command)
Labels (XGRAPH command)


Data Element Types (XGRAPH command)

charts,charts,charts
data element types,data element types,data element types

The data element type is a basic description of how the data are represented on the chart.

BAR | Draws a bar data element. Bars show the results of a summary function. Used for 3-D bar charts and population pyramids that show the distribution of a categorical variable.
HISTOBAR | Draws a histogram data element. Histogram data elements show the counts in a range of cases. A range of cases is called a bin. Used for population pyramids.
POINT | Draws a point marker. A point marker shows a case with a specific x-axis value. Used for dot plots.

Related Topics

CHART Expression (XGRAPH command)
Functions (XGRAPH command)
Measurement Level (XGRAPH command)
Variable Placeholder (XGRAPH command)
Case Numbers (XGRAPH command)
Blending, Clustering, and Stacking (XGRAPH command)
Labels (XGRAPH command)


Measurement Level (XGRAPH command)

charts,charts,charts
measurement level,measurement level,measurement level

The chart expression allows the user to specify a measurement level for BY variables. If measurement level is not specified, the following occurs:

• In a chart of BAR elements, xvars and zvars are treated as categorical.

• In a chart of HISTOBAR elements, xvars is treated as scale. zvars is treated as categorical, because the COORDINATE subcommand and SPLIT keyword are always used.

• In charts of POINT elements, the measurement level is obtained from the PASW Statistics data dictionary for each variable. If no measurement levels have been defined, numeric variables are treated as scale and string variables are treated as categorical.

[c] | Specifies that the variable is treated as a categorical variable.
[s] | Specifies that the variable is treated as a scale variable.

Related Topics

CHART Expression (XGRAPH command)
Functions (XGRAPH command)
Data Element Types (XGRAPH command)
Variable Placeholder (XGRAPH command)
Case Numbers (XGRAPH command)
Blending, Clustering, and Stacking (XGRAPH command)
Labels (XGRAPH command)


Variable Placeholder (XGRAPH command)

When summaries of separate variables are used to define a categorical axis, clustering, or stacking, 1 must be used as a variable placeholder.

1 Uses the separate variables specified in yvars as categories on the axis, cluster categories, or stack categories. Must be defined as an integer (no decimal places).

Examples

XGRAPH CHART=((salary + salbegin) [MEAN] [BAR]) BY 1 BY gender[c].

• Separate variables appear on the y-axis.

XGRAPH CHART=((salary + salbegin) [MEAN] [BAR]) BY gender[c] BY 1.

• Separate variables appear on the z-axis.

Related Topics

CHART Expression (XGRAPH command)
Functions (XGRAPH command)
Data Element Types (XGRAPH command)
Measurement Level (XGRAPH command)
Case Numbers (XGRAPH command)
Blending, Clustering, and Stacking (XGRAPH command)
Labels (XGRAPH command)


Case Numbers (XGRAPH command)

Whenever the VALUE function is used, one categorical axis consists of cases, which are identified by a sequential number.

$CASENUM Uses the sequential numbering of selected cases as the categories on the axis. This is not the actual case number.

Example

XGRAPH CHART=(salary [VALUE]) BY gender[c] BY $CASENUM.

Related Topics

CHART Expression (XGRAPH command)
Functions (XGRAPH command)
Data Element Types (XGRAPH command)
Measurement Level (XGRAPH command)
Variable Placeholder (XGRAPH command)
Blending, Clustering, and Stacking (XGRAPH command)
Labels (XGRAPH command)


Blending, Clustering, and Stacking (XGRAPH command)

charts,charts,charts
stacking,stacking,stacking
charts,charts,charts
clustering,clustering,clustering

Blending on an axis is indicated by +. This is used when separate variables are displayed on the same axis.

Clustering and stacking are indicated by >. On the x- or z-axis, this indicates clustering. On the y-axis, this indicates stacking. Stacking is allowed with one clustering variable; or two clustering variables are allowed, one on the x-axis and one on the z-axis.

+ | Scales the axis to accommodate all of the variables on that dimension.
> | Stacks groups on the y-axis, and clusters groups on the x- and z-axes.

Stacking Example

XGRAPH CHART=(salary [MEAN] [BAR]) > educ BY jobcat[c] by gender[c].

Clustering Example

XGRAPH CHART=(salary [MEAN] [BAR]) BY jobcat[c] > educ by gender[c].

When you use clustering or stacking, you can specify how the clusters and stacks are differentiated in the chart.

[COLOR] | Uses color to differentiate the clusters or stacks.
[PATTERN] | Uses pattern to differentiate the clusters or stacks.

[COLOR] and [PATTERN] follow these rules:

• The actual colors and patterns are specified in the Options. You can access these by choosing Options from the Edit menu. Then click the Charts tab.

• [COLOR] and [PATTERN] follow the stacking or clustering variable in the chart expression.

• If the specification is omitted, color is used to differentiate the clusters or stacks. The color cycle starts over for each dimension.

• If neither [COLOR] nor [PATTERN] is specified, XGRAPH uses the Style Cycle Preference specified by the Options.

• If [COLOR] or [PATTERN] is specified for both dimensions, these specifications are honored. The color or pattern cycle starts over for each dimension.

• If [COLOR] or [PATTERN] is specified for only one dimension, the specification is honored, and the other dimension uses the other specification.

Example

XGRAPH CHART=(salary [MEAN] [BAR]) BY jobcat[c] > educ[PATTERN]
by gender[c].

Related Topics

CHART Expression (XGRAPH command)
Functions (XGRAPH command)
Data Element Types (XGRAPH command)
Measurement Level (XGRAPH command)
Variable Placeholder (XGRAPH command)
Case Numbers (XGRAPH command)
Labels (XGRAPH command)


Labels (XGRAPH command)

LABEL (keyword),LABEL (keyword),LABEL (keyword)
XGRAPH command,XGRAPH command,XGRAPH command

On categorical charts of individual cases, you can specify a labeling variable by using [LABEL=varname] in the chart expression. [LABEL=varname] follows $CASENUM in the chart expression.

[LABEL=varname] The variable whose values are used as the tick labels instead of the case number.

Example

XGRAPH CHART=(salary [VALUE] [BAR]) BY $CASENUM[LABEL=gender]
> jobcat BY educ.

Related Topics

CHART Expression (XGRAPH command)
Functions (XGRAPH command)
Data Element Types (XGRAPH command)
Measurement Level (XGRAPH command)
Variable Placeholder (XGRAPH command)
Case Numbers (XGRAPH command)
Blending, Clustering, and Stacking (XGRAPH command)


BIN Subcommand (XGRAPH command)

BIN (subcommand),BIN (subcommand),BIN (subcommand)
XGRAPH command,XGRAPH command,XGRAPH command
XGRAPH (command),XGRAPH (command),XGRAPH (command)
BIN subcommand,BIN subcommand,BIN subcommand

For population pyramids, the BIN subcommand controls the starting point and size of the bins. The bins are the bars in the chart and represent a group of data values. For example, if there are four bins in a chart and the values range from 0-100, the bin width is 25. Therefore, all points with values of 0-24 would be in the first bin, those with values of 25-49 would be in the second bin, and so on. Each keyword is followed by an equals sign (=) and the value for that keyword.

Example

XGRAPH CHART=([HISTOBAR]) BY age[s] BY gender[c]
  /COORDINATE SPLIT=YES
  /BIN START=30 SIZE=WIDTH(5).

• The first bin begins at age 30.

• Each bin includes cases with age values that span 5 years.

• So the first bin contains the cases with ages 30-34, the second bin contains the cases with ages 35-39, and so on.

Related Topics

XGRAPH
Overview (XGRAPH command)
CHART Expression (XGRAPH command)
DISPLAY Subcommand (XGRAPH command)
DISTRIBUTION Subcommand (XGRAPH command)
COORDINATE Subcommand (XGRAPH command)
ERRORBAR Subcommand (XGRAPH command)
MISSING Subcommand (XGRAPH command)
PANEL Subcommand (XGRAPH command)
TEMPLATE Subcommand (XGRAPH command)
TITLES Subcommand (XGRAPH command)
START Keyword (XGRAPH command)
SIZE Keyword (XGRAPH command)


START Keyword (XGRAPH command)

The START keyword specifies the starting value of the first bin in the chart.

AUTO | Adjust the starting value of the first bin according to the data values. The starting value is set so the first bin includes the lowest data value and the bin boundaries are at good values. This is the default.
value | User-specified starting value. The value can be set lower than the lowest data value so the first bin includes values that are not in the dataset. For example, if the lowest value in the dataset is 6, the starting value can be set to 0 so the values of 0–5 are included in the first bin.
 | Note: If the variable being binned is a date, the starting value must be a data literal in quotes and in the date format specified for the variable in the PASW Statistics data dictionary (for example, 'January 1, 2001').

Related Topics

BIN Subcommand (XGRAPH command)
SIZE Keyword (XGRAPH command)


SIZE Keyword (XGRAPH command)

The SIZE keyword specifies the width of the bins. The width can be determined by an exact value or by the number of bins (fewer bins result in wider bins).

AUTO | Adjust bin width according to the data values. The size is set so the bins are neither too few nor too narrow. This is the default.
WIDTH (value) | User-specified value for the bin width.
 | Note: If the variable being binned is a date, the width must be specified in quotes and in the duration format ddd hh:mm (for example, '30 12:00' for bin widths of 30 days and 12 hours). The hh:mm portion of the duration format is optional.
COUNT (value) | User-specified value for the number of bins.

Related Topics

BIN Subcommand (XGRAPH command)
START Keyword (XGRAPH command)


DISPLAY Subcommand (XGRAPH command)

DISPLAY (subcommand),DISPLAY (subcommand),DISPLAY (subcommand)
XGRAPH command,XGRAPH command,XGRAPH command
XGRAPH (command),XGRAPH (command),XGRAPH (command)
DISPLAY subcommand,DISPLAY subcommand,DISPLAY subcommand

DISPLAY controls how the data elements are displayed. Currently this subcommand applies to dot plots.

Related Topics

XGRAPH
Overview (XGRAPH command)
CHART Expression (XGRAPH command)
BIN Subcommand (XGRAPH command)
DISTRIBUTION Subcommand (XGRAPH command)
COORDINATE Subcommand (XGRAPH command)
ERRORBAR Subcommand (XGRAPH command)
MISSING Subcommand (XGRAPH command)
PANEL Subcommand (XGRAPH command)
TEMPLATE Subcommand (XGRAPH command)
TITLES Subcommand (XGRAPH command)
DOT Keyword (XGRAPH command)


DOT Keyword (XGRAPH command)

The DOT keyword controls the display of points in a dot plot.

ASYMMETRIC | Stack the points on the x-axis. This is the default.
SYMMETRIC | Arrange the points symmetrically across a central horizontal line in the chart. In other words, the point stacks are vertically centered.
FLAT | Do not stack the points.

Related Topics

DISPLAY Subcommand (XGRAPH command)


DISTRIBUTION Subcommand (XGRAPH command)

DISTRIBUTION (subcommand),DISTRIBUTION (subcommand),DISTRIBUTION (subcommand)
XGRAPH command,XGRAPH command,XGRAPH command
XGRAPH (command),XGRAPH (command),XGRAPH (command)
DISTRIBUTION subcommand,DISTRIBUTION subcommand,DISTRIBUTION subcommand

The DISTRIBUTION subcommand adds distribution curves to the chart. This subcommand applies to population pyramids.

Example

XGRAPH CHART=([HISTOBAR]) BY age[s] BY gender[c]
  /DISTRIBUTION TYPE=NORMAL
  /COORDINATE SPLIT=YES.

Related Topics

XGRAPH
Overview (XGRAPH command)
CHART Expression (XGRAPH command)
BIN Subcommand (XGRAPH command)
DISPLAY Subcommand (XGRAPH command)
COORDINATE Subcommand (XGRAPH command)
ERRORBAR Subcommand (XGRAPH command)
MISSING Subcommand (XGRAPH command)
PANEL Subcommand (XGRAPH command)
TEMPLATE Subcommand (XGRAPH command)
TITLES Subcommand (XGRAPH command)
TYPE Keyword (XGRAPH command)


TYPE Keyword (XGRAPH command)

TYPE (keyword),TYPE (keyword),TYPE (keyword)
XGRAPH command,XGRAPH command,XGRAPH command

The TYPE keyword specifies the type of distribution to draw on the chart. The keyword is followed by an equals sign (=) and the value for that keyword.

NORMAL Display a normal curve on the chart. The normal curve uses the data mean and standard deviation as parameters. This is the default.

Related Topics

DISTRIBUTION Subcommand (XGRAPH command)


COORDINATE Subcommand (XGRAPH command)

COORDINATE (subcommand),COORDINATE (subcommand),COORDINATE (subcommand)
XGRAPH command,XGRAPH command,XGRAPH command
XGRAPH (command),XGRAPH (command),XGRAPH (command)
COORDINATE subcommand,COORDINATE subcommand,COORDINATE subcommand

The COORDINATE subcommand specifies the coordinate system for the chart. Currently this subcommand is used to create population pyramids.

Related Topics

XGRAPH
Overview (XGRAPH command)
CHART Expression (XGRAPH command)
BIN Subcommand (XGRAPH command)
DISPLAY Subcommand (XGRAPH command)
DISTRIBUTION Subcommand (XGRAPH command)
ERRORBAR Subcommand (XGRAPH command)
MISSING Subcommand (XGRAPH command)
PANEL Subcommand (XGRAPH command)
TEMPLATE Subcommand (XGRAPH command)
TITLES Subcommand (XGRAPH command)
SPLIT Keyword (XGRAPH command)


SPLIT Keyword (XGRAPH command)

SPLIT (keyword),SPLIT (keyword),SPLIT (keyword)
XGRAPH command,XGRAPH command,XGRAPH command
graphs,graphs,graphs
population pyramid,population pyramid,population pyramid

The SPLIT keyword specifies whether zvars (the variable after the last BY in the chart expression) is used to split the chart and create a population pyramid. The keyword is followed by an equals sign (=) and the value for that keyword.

Note: The SPLIT keyword is not the same as the PANEL subcommand. The keyword splits the chart before it is paneled.

NO | Do not split the chart. This is the default.
YES | Split the chart and create a population pyramid.

Related Topics

COORDINATE Subcommand (XGRAPH command)


ERRORBAR Subcommand (XGRAPH command)

ERRORBAR (subcommand),ERRORBAR (subcommand),ERRORBAR (subcommand)
XGRAPH command,XGRAPH command,XGRAPH command
XGRAPH (command),XGRAPH (command),XGRAPH (command)
ERRORBAR subcommand,ERRORBAR subcommand,ERRORBAR subcommand
charts,charts,charts
error bars,error bars,error bars

The ERRORBAR subcommand adds errors bars to the chart. Error bars indicate the variability of the summary statistic being displayed. The length of the error bar on either side of the summary statistic represents a confidence interval or a specified number of standard errors or standard deviations. Currently, XGRAPH supports error bars for COUNT and population pyramids.

The keywords are not followed by an equals sign (=). They are followed by a value in parentheses.

Example

XGRAPH CHART=([COUNT] [BAR]) BY agecat[c] BY gender[c]
  /COORDINATE SPLIT=YES
  /ERRORBAR CI(95).

Related Topics

XGRAPH
Overview (XGRAPH command)
CHART Expression (XGRAPH command)
BIN Subcommand (XGRAPH command)
DISPLAY Subcommand (XGRAPH command)
DISTRIBUTION Subcommand (XGRAPH command)
COORDINATE Subcommand (XGRAPH command)
MISSING Subcommand (XGRAPH command)
PANEL Subcommand (XGRAPH command)
TEMPLATE Subcommand (XGRAPH command)
TITLES Subcommand (XGRAPH command)
CI Keyword (XGRAPH command)
STDDEV Keyword (XGRAPH command)
SE Keyword (XGRAPH command)


CI Keyword (XGRAPH command)

CI (keyword),CI (keyword),CI (keyword)
XGRAPH command,XGRAPH command,XGRAPH command
(value) The percentage of the confidence interval to use as the length of the error bars.

Related Topics

ERRORBAR Subcommand (XGRAPH command)
STDDEV Keyword (XGRAPH command)
SE Keyword (XGRAPH command)


STDDEV Keyword (XGRAPH command)

STDDEV (keyword),STDDEV (keyword),STDDEV (keyword)
XGRAPH command,XGRAPH command,XGRAPH command
(value) A multiplier indicating the number of standard deviations to use as the length of the error bars.

Related Topics

ERRORBAR Subcommand (XGRAPH command)
CI Keyword (XGRAPH command)
SE Keyword (XGRAPH command)


SE Keyword (XGRAPH command)

SE (keyword),SE (keyword),SE (keyword)
XGRAPH command,XGRAPH command,XGRAPH command
(value) A multiplier indicating the number of standard errors to use as the length of the error bars.

Related Topics

ERRORBAR Subcommand (XGRAPH command)
CI Keyword (XGRAPH command)
STDDEV Keyword (XGRAPH command)


MISSING Subcommand (XGRAPH command)

MISSING (subcommand),MISSING (subcommand),MISSING (subcommand)
XGRAPH command,XGRAPH command,XGRAPH command
XGRAPH (command),XGRAPH (command),XGRAPH (command)
MISSING subcommand,MISSING subcommand,MISSING subcommand

MISSING controls the treatment of missing values in the chart drawn by XGRAPH.

• For an aggregated categorical chart, if every aggregated series is empty in a category, the empty category is excluded.

Each keyword in the subcommand is followed by an equals sign (=) and the value for that keyword.

Related Topics

XGRAPH
Overview (XGRAPH command)
CHART Expression (XGRAPH command)
BIN Subcommand (XGRAPH command)
DISPLAY Subcommand (XGRAPH command)
DISTRIBUTION Subcommand (XGRAPH command)
COORDINATE Subcommand (XGRAPH command)
ERRORBAR Subcommand (XGRAPH command)
PANEL Subcommand (XGRAPH command)
TEMPLATE Subcommand (XGRAPH command)
TITLES Subcommand (XGRAPH command)
USE Keyword (XGRAPH command)
REPORT Keyword (XGRAPH command)


USE Keyword (XGRAPH command)

USE (keyword),USE (keyword),USE (keyword)
XGRAPH command,XGRAPH command,XGRAPH command

The USE keyword controls the exclusion of cases with missing values. Excluded cases are excluded from computations and charts. USE applies to variables used in summary functions for a chart.

LISTWISE | Exclude a case with a missing value for any dependent variable. This is the default.
VARIABLEWISE | Exclude a case with a missing value for the dependent variable being analyzed.

Related Topics

MISSING Subcommand (XGRAPH command)
REPORT Keyword (XGRAPH command)


REPORT Keyword (XGRAPH command)

REPORT (keyword),REPORT (keyword),REPORT (keyword)
XGRAPH command,XGRAPH command,XGRAPH command

The REPORT keyword specifies whether to report on missing values by creating missing-values categories in the chart. REPORT applies only to categorical variables, including paneling variables and the splitter variable in a population pyramid.

NO | Do not create a missing-values categories. This is the default.
YES | Create a missing-values categories.

Related Topics

MISSING Subcommand (XGRAPH command)
USE Keyword (XGRAPH command)


PANEL Subcommand (XGRAPH command)

PANEL (subcommand),PANEL (subcommand),PANEL (subcommand)
XGRAPH command,XGRAPH command,XGRAPH command
XGRAPH (command),XGRAPH (command),XGRAPH (command)
PANEL subcommand,PANEL subcommand,PANEL subcommand
charts,charts,charts
paneled charts,paneled charts,paneled charts
paneled charts,paneled charts,paneled charts

The PANEL subcommand specifies the variables and method used for paneling.

Each keyword in the subcommand is followed by an equals sign (=) and the value for that keyword.

Related Topics

XGRAPH
Overview (XGRAPH command)
CHART Expression (XGRAPH command)
BIN Subcommand (XGRAPH command)
DISPLAY Subcommand (XGRAPH command)
DISTRIBUTION Subcommand (XGRAPH command)
COORDINATE Subcommand (XGRAPH command)
ERRORBAR Subcommand (XGRAPH command)
MISSING Subcommand (XGRAPH command)
TEMPLATE Subcommand (XGRAPH command)
TITLES Subcommand (XGRAPH command)
COLVAR and ROWVAR Keywords (XGRAPH command)
COLOP and ROWOP Keywords (XGRAPH command)


COLVAR and ROWVAR Keywords (XGRAPH command)

COLVAR (keyword),COLVAR (keyword),COLVAR (keyword)
XGRAPH command,XGRAPH command,XGRAPH command
ROWVAR (keyword),ROWVAR (keyword),ROWVAR (keyword)
XGRAPH command,XGRAPH command,XGRAPH command

The COLVAR and ROWVAR keywords identify the column and row variables, respectively. Each category in a column variable appears as a vertical column in the resulting chart. Each category in a row variable appears as a horizontal row in the resulting chart.

• If multiple variables are specified for a keyword, the COLOP and ROWOP keywords can be used to change the way in which variable categories are rendered in the chart.

• The ROWVAR keyword is not available for population pyramids.

varlist The list of variables used for paneling.

Examples

XGRAPH CHART=([COUNT] [BAR]) BY educ [c] BY gender [c]
  /PANEL COLVAR=minority.

• There are two columns in the resulting paneled chart, one for minorities and one for non-minorities.

• Because there is only one paneling variable, there are only as many panels as there are variable values. Therefore, there are two panels.

XGRAPH CHART=([COUNT] [BAR]) BY educ [c] BY gender [c]
  /PANEL COLVAR=minority ROWVAR=jobcat.

• There are two columns in the resulting paneled chart (for the minority variable values) and three rows (for the jobcat variable values).

Related Topics

PANEL Subcommand (XGRAPH command)
COLOP and ROWOP Keywords (XGRAPH command)


COLOP and ROWOP Keywords (XGRAPH command)

COLOP (keyword),COLOP (keyword),COLOP (keyword)
XGRAPH command,XGRAPH command,XGRAPH command
ROWOP (keyword),ROWOP (keyword),ROWOP (keyword)
XGRAPH command,XGRAPH command,XGRAPH command

The COLOP and ROWOP keywords specify the paneling method for the column and row variables, respectively. These keywords have no effect on the chart if there is only one variable in the rows and/or columns. They also have no effect if the data are not nested.

CROSS | Cross variables in the rows or columns. When the variables are crossed, a panel is created for every combination of categories in the variables. For example, if the categories in one variable are A and B and the categories in another variable are 1 and 2, the resulting chart will display a panel for the combinations of A and 1; A and 2; B and 1; and B and 2. A panel can be empty if the categories in that panel do not cross (for example, if there are no cases in the B category and the 1 category). This is the default.
NEST | Nest variables in the rows or columns. When the variables are nested, a panel is created for each category that is nested in the parent category. For example, if the data contain variables for states and cities, a panel is created for each city and the relevant state. However, panels are not created for cities that are not in certain states, as would happen with CROSS. See the following example. When nesting, make sure the variables specified for ROWVAR or COLVAR are in the correct order. Parent variables precede the child variables.

Example

Assume data like the following data:

Nested data
state | city | temperature
NJ | Springfield | 70
MA | Springfield | 60
IL | Springfield | 50
NJ | Trenton | 70
MA | Boston | 60

You can create a paneled chart from this data with the following syntax:

XGRAPH ([POINT]) BY temperature
  /PANEL COLVAR=state city COLOP=CROSS.

The command crosses every variable value to create the panels. Because not every state contains every city, the resulting paneled chart will contain blank panels. For example, there will be a blank panel for Springfield and New Jersey. In this dataset, the city variable is really nested in the state variable. To nest the variables in the panels and eliminate any blank panels, use the following syntax:

XGRAPH ([POINT]) BY temperature
  /PANEL COLVAR=state city COLOP=NEST.

Related Topics

PANEL Subcommand (XGRAPH command)
COLVAR and ROWVAR Keywords (XGRAPH command)


TEMPLATE Subcommand (XGRAPH command)

TEMPLATE (subcommand),TEMPLATE (subcommand),TEMPLATE (subcommand)
XGRAPH command,XGRAPH command,XGRAPH command
XGRAPH (command),XGRAPH (command),XGRAPH (command)
TEMPLATE subcommand,TEMPLATE subcommand,TEMPLATE subcommand
charts,charts,charts
templates,templates,templates
templates,templates,templates
in charts,in charts,in charts

TEMPLATE uses an existing file as a template and applies it to the chart requested by the current XGRAPH command. The template overrides the default settings that are used to create any chart, and the specifications on the current XGRAPH command override the template. Templates are created in the Chart Editor by saving an existing chart as a template.

Example

XGRAPH CHART=([COUNT] [BAR]) BY jobcat [c] BY gender [c].
  /TEMPLATE FILE='mytemplate.sgt'.

Related Topics

XGRAPH
Overview (XGRAPH command)
CHART Expression (XGRAPH command)
BIN Subcommand (XGRAPH command)
DISPLAY Subcommand (XGRAPH command)
DISTRIBUTION Subcommand (XGRAPH command)
COORDINATE Subcommand (XGRAPH command)
ERRORBAR Subcommand (XGRAPH command)
MISSING Subcommand (XGRAPH command)
PANEL Subcommand (XGRAPH command)
TITLES Subcommand (XGRAPH command)
FILE Keyword (XGRAPH command)


FILE Keyword (XGRAPH command)

FILE (keyword),FILE (keyword),FILE (keyword)
XGRAPH command,XGRAPH command,XGRAPH command

The FILE keyword specifies the template file. The keyword is followed by an equals sign (=) and a file specification enclosed in quotes.

filespec Applies the specified template file to the chart being created.

Related Topics

TEMPLATE Subcommand (XGRAPH command)


TITLES Subcommand (XGRAPH command)

TITLES (subcommand),TITLES (subcommand),TITLES (subcommand)
XGRAPH command,XGRAPH command,XGRAPH command
XGRAPH (command),XGRAPH (command),XGRAPH (command)
TITLES subcommand,TITLES subcommand,TITLES subcommand

The TITLES subcommand specifies the titles, subtitles, and footnotes. These are lines of text at the top or bottom of the chart.

• At least one keyword should be specified if the TITLES subcommand is used; otherwise the subcommand is treated as blank.

• If the subcommand is blank, an error is issued.

• Each line of text must be enclosed in quotes. The maximum length of any line is 255 bytes.

• When a keyword is specified with no text, an error is issued.

The following symbols can be used within the lines of text. Each must be specified using an opening right parenthesis and uppercase letters.

)DATE | Displays the current date as a locale-appropriate date stamp that includes the year, month, and day.
)TIME | Displays the current time as a locale-appropriate time stamp.
)CHART | Displays the chart expression used to create the chart, stripped of measurement levels, statistics specifications, and CHART=. If variable labels are available, they are used instead of the variable names in the chart expression.

Example

XGRAPH CHART=([COUNT] [BAR]) BY jobcat [c] BY gender [c]
  /TITLES TITLE='Counts by Job Category and Gender' 'Date: )DATE'.

Related Topics

XGRAPH
Overview (XGRAPH command)
CHART Expression (XGRAPH command)
BIN Subcommand (XGRAPH command)
DISPLAY Subcommand (XGRAPH command)
DISTRIBUTION Subcommand (XGRAPH command)
COORDINATE Subcommand (XGRAPH command)
ERRORBAR Subcommand (XGRAPH command)
MISSING Subcommand (XGRAPH command)
PANEL Subcommand (XGRAPH command)
TEMPLATE Subcommand (XGRAPH command)
TITLE Keyword (XGRAPH command)
SUBTITLE Keyword (XGRAPH command)
FOOTNOTE Keyword (XGRAPH command)


TITLE Keyword (XGRAPH command)

TITLE (keyword),TITLE (keyword),TITLE (keyword)
XGRAPH command,XGRAPH command,XGRAPH command
’line1’ ’line2’ The lines of text in the title. The title appears above the chart. Up to two lines can be specified.

Related Topics

TITLES Subcommand (XGRAPH command)
SUBTITLE Keyword (XGRAPH command)
FOOTNOTE Keyword (XGRAPH command)


SUBTITLE Keyword (XGRAPH command)

SUBTITLE (keyword),SUBTITLE (keyword),SUBTITLE (keyword)
XGRAPH command,XGRAPH command,XGRAPH command
’line1’ The line of text in the subtitle. The subtitle appears below the title. Only one line can be specified.

Related Topics

TITLES Subcommand (XGRAPH command)
TITLE Keyword (XGRAPH command)
FOOTNOTE Keyword (XGRAPH command)


FOOTNOTE Keyword (XGRAPH command)

FOOTNOTE (keyword),FOOTNOTE (keyword),FOOTNOTE (keyword)
XGRAPH command,XGRAPH command,XGRAPH command
’line1’ ’line2’ The lines of text in the footnote. The footnote appears below the chart. Up to two lines can be specified.

Related Topics

TITLES Subcommand (XGRAPH command)
TITLE Keyword (XGRAPH command)
SUBTITLE Keyword (XGRAPH command)


3-D Bar Examples (XGRAPH command)

charts,charts,charts
3-D bar,3-D bar,3-D bar
bar charts,bar charts,bar charts
3-D,3-D,3-D

A 3-D bar chart is a bar chart with two categorical axes (x and z). The height of the bars is determined by a summary function. The categories on the x- and z-axes can be values of categorical variables, separate variables, or individual cases.

Examples of Summaries for Groups of Cases

XGRAPH CHART=([COUNT] [BAR]) BY jobcat[c] by gender[c].

• The bars in the chart represent counts for males and females in each job category.

XGRAPH CHART=(salary [MEAN] [BAR])> educ[PATTERN] BY jobcat[c] >
minority[COLOR] by gender[c].

• The bars in the chart represent the mean salary for males and females in each job category clustered by minority membership.

• The bars are also stacked by education level.

• Clusters are distinguished by color, and stacks are distinguished by pattern.

Example of Summaries of Separate Variables by Group

XGRAPH CHART=((salary + salbegin) [MEAN] [BAR]) BY 1 BY gender[c].

• The bars in the chart represent the mean current salary and mean beginning salary for males and females.

• The blending operator (+) indicates that the chart is for separate variables.

• The 1 placeholder indicates the axis on which the separate variables appear.

• The variables appear on the x-axis, and the gender categories are on the z-axis.

Examples of Individual Cases in Groups

XGRAPH CHART=(salary [VALUE] [BAR]) BY gender[c] BY $CASENUM.

• The bars in the chart represent the current salary for each case with the cases grouped by gender.

• VALUE is the only function available when creating charts of individual cases.

Examples for Values of Individual Cases for Separate Variables

XGRAPH CHART=((salary + salbegin) [VALUE] [BAR]) BY $CASENUM BY 1.

• The bars in the chart represent the value of the current salary and the value of the beginning salary for every case.

• The cases are on the x-axis, and the variables are on the z-axis.

XGRAPH CHART=((salary + salbegin) [VALUE] [BAR]) BY
$CASENUM[LABEL=gender] BY 1.

• This is the same as the previous example except that the bars are labeled by gender.

Related Topics

Population Pyramid Examples (XGRAPH command)
Dot Plot Examples (XGRAPH command)


Population Pyramid Examples (XGRAPH command)

charts,charts,charts
population pyramids,population pyramids,population pyramids
population pyramids,population pyramids,population pyramids

A population pyramid uses bars to show the shape of a distribution split by a categorical variable. The variable used for the distribution can be a scale or categorical. When the variable is scale, the data element type must be HISTOBAR. When the variable is categorical, the data element type is BAR.

Example Using Continuous Data

XGRAPH CHART=([HISTOBAR]) BY age[s] BY gender[c]
  /COORDINATE SPLIT=YES.

• The bars in the chart represent the number of cases in each age bin.

• The population pyramid is split by gender.

Example Using Categorical Data

XGRAPH CHART=([COUNT] [BAR]) BY agecat[c] BY gender[c]
  /COORDINATE SPLIT=YES.

• The agecat variable has categories for different age groups.

• The bars in the chart represent the number of cases in each agecat category. This is not necessarily the same as the previous example because the size of the bins and the size of the categories might not match.

Example Using Pre-Aggregated Data

XGRAPH CHART=(population [SUM] [BAR]) BY agecat[c] BY gender[c]
  /COORDINATE SPLIT=YES.

• The bars in the chart represent the number of cases in each agecat category.

• The data include a population variable that specifies the count for each agecat category for each gender. In other words, the data are pre-aggregated.

Example Using Pre-Aggregated Data Without a Categorical Splitter Variable

In the previous example, there was a categorical variable to use as the splitter variable. In some census data, the data are not organized in this manner. Instead of a splitter variable, there is one variable for each split value. An example follows:

Pre-aggregated data without a categorical splitter variable
agecat | malepop | femalepop
1 | 247 | 228
2 | 306 | 300
3 | 311 | 303

Data in this format needs to be restructured by using the VARSTOCASES command:

VARSTOCASES /ID = id
  /MAKE population FROM malepop femalepop
  /INDEX = gender(2)
  /KEEP = agecat
  /NULL = KEEP.

Running this command results in the following. The splitter variable is gender.

Pre-aggregated data with a categorical splitter variable
id | agecat | gender | population
1 | 1 | 1 | 247
1 | 1 | 2 | 228
2 | 2 | 1 | 306
2 | 2 | 2 | 300
3 | 3 | 1 | 311
3 | 3 | 2 | 303

Now a population pyramid can be created using the categorical splitter variable:

XGRAPH (population [SUM] [BAR]) BY agecat[c] BY gender[c]
  /COORDINATE SPLIT=YES.

Related Topics

3-D Bar Examples (XGRAPH command)
Dot Plot Examples (XGRAPH command)


Dot Plot Examples (XGRAPH command)

charts,charts,charts
dot plots,dot plots,dot plots
dot plots,dot plots,dot plots

A dot plot shows the value in one dimension (the x-axis) of each selected case. The variable on the x-axis can be scale or categorical.

XGRAPH CHART=([POINT]) BY jobcat[c].

• The chart shows cases represented as points.

• Cases are stacked at each jobcat value. So, if there are three categories for jobcat, there are only three stacks.

XGRAPH CHART=([POINT]) BY salary[s].

• Cases are stacked at each salary value. The x-axis is a continuous range of values.

XGRAPH CHART=([POINT]) BY salary[s]
  /DISPLAY DOT=SYMMETRIC.

• Same as the previous example except the stacked dots are centered vertically in the chart.

Related Topics

3-D Bar Examples (XGRAPH command)
Population Pyramid Examples (XGRAPH command)


XSAVE

data files,data files,data files
saving,saving,saving
saving files,saving files,saving files
data files,data files,data files
XSAVE (command),XSAVE (command),XSAVE (command)
XSAVE (command),XSAVE (command),XSAVE (command)
syntax chart,syntax chart,syntax chart
XSAVE OUTFILE=’filespec’

 [/KEEP={ALL**  }] [/DROP=varlist]
        {varlist}

 [/RENAME=(old varlist=new varlist)...]

 [/MAP] [/{COMPRESSED  }]
          {UNCOMPRESSED}

 [/PERMISSIONS={READONLY }
               {WRITEABLE}

**Default if the subcommand is omitted.

This command does not read the active dataset. It is stored, pending execution with the next command that reads the dataset. See the topic Command Order for more information.

Example

XSAVE OUTFILE='/data/empl.sav'.

Related Topics

Overview (XSAVE command)
Examples (XSAVE command)
OUTFILE Subcommand (XSAVE command)
DROP and KEEP Subcommands (XSAVE command)
RENAME Subcommand (XSAVE command)
MAP Subcommand (XSAVE command)
COMPRESSED and UNCOMPRESSED Subcommands (XSAVE command)
PERMISSIONS Subcommand (XSAVE command)


Overview (XSAVE command)

DO REPEAT command,DO REPEAT command,DO REPEAT command
with XSAVE command,with XSAVE command,with XSAVE command
XSAVE (command),XSAVE (command),XSAVE (command)
with DO REPEAT command,with DO REPEAT command,with DO REPEAT command
XSAVE (command),XSAVE (command),XSAVE (command)
limitations,limitations,limitations

XSAVE produces PASW Statistics data files. PASW Statistics data files contain data plus a dictionary. The dictionary contains a name for each variable in the data file plus any assigned variable and value labels, missing-value flags, and variable print and write formats. The dictionary also contains document text created with the DOCUMENTS command.

XSAVE (command),XSAVE (command),XSAVE (command)
compared with SAVE command,compared with SAVE command,compared with SAVE command
SAVE (command),SAVE (command),SAVE (command)
compared with XSAVE command,compared with XSAVE command,compared with XSAVE command

SAVE also creates PASW Statistics data files. The principal difference is that XSAVE is not executed until data are read for the next procedure, while SAVE is executed by itself. Thus, XSAVE can reduce processing time by consolidating two data passes into one.

See SAVE TRANSLATE for information on saving data files that can be used by other programs.

Options Collapse Hide details

Options

Variable Subsets and Order. You can save a subset of variables and reorder the variables that are saved using the DROP and KEEP subcommands.

Variable Names. You can rename variables as they are copied into the data file using the RENAME subcommand.

Variable Map. To confirm the names and order of the variables saved in the data file, use the MAP subcommand. MAP displays the variables saved in the data file next to their corresponding names in the active dataset.

Data Compression. You can write the data file in compressed or uncompressed form using the COMPRESSED or UNCOMPRESSED subcommand.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is the OUTFILE subcommand, which specifies a name for the data file to be saved.

Subcommand Order Collapse Hide details

Subcommand Order

• Subcommands can be specified in any order.

Syntax Rules Collapse Hide details

Syntax Rules

• OUTFILE is required and can be specified only once. If OUTFILE is specified more than once, only the last OUTFILE specification is in effect.

• KEEP, DROP, RENAME, and MAP can be used as many times as needed.

• Only one of the subcommands COMPRESSED or UNCOMPRESSED can be specified per XSAVE command.

• Documentary text can be dropped from the active dataset with the DROP DOCUMENTS command.

• XSAVE cannot appear within a DO REPEAT—END REPEAT structure.

• Multiple XSAVE commands writing to the same file are not permitted.

Operations Collapse Hide details

Operations

• Unlike the SAVE command, XSAVE is a transformation command and is executed when the data are read for the next procedure.

• The new data file dictionary is arranged in the same order as the active dataset dictionary unless variables are reordered with the KEEP subcommand. Documentary text from the active dataset dictionary is always saved unless it is dropped with the DROP DOCUMENTS command before XSAVE.

• New variables created by transformations and procedures previous to the XSAVE command are included in the new data file, and variables altered by transformations are saved in their modified form. Results of any temporary transformations immediately preceding the XSAVE command are included in the file; scratch variables are not.

• PASW Statistics data files are binary files designed to be read and written by PASW Statistics only.

• The active dataset is still available for transformations and procedures after XSAVE is executed.

• XSAVE processes the dictionary first and displays a message that indicates how many variables will be saved. Once the data are written, XSAVE indicates how many cases were saved. If the second message does not appear, the file was probably not completely written.

Limitations Collapse Hide details

Limitations

• Maximum of 64 XSAVE commands are allowed within a single set of transformations.

Related Topics

XSAVE
Examples (XSAVE command)
OUTFILE Subcommand (XSAVE command)
DROP and KEEP Subcommands (XSAVE command)
RENAME Subcommand (XSAVE command)
MAP Subcommand (XSAVE command)
COMPRESSED and UNCOMPRESSED Subcommands (XSAVE command)
PERMISSIONS Subcommand (XSAVE command)


Examples (XSAVE command)

Using XSAVE to Consolidate Two Data Passes Into One

GET FILE='/data/hubempl.sav'.
XSAVE OUTFILE='/data/empl88.sav'
  /RENAME=(AGE=AGE88) (JOBCAT=JOBCAT88).
MEANS RAISE88 BY DEPT88.

• The GET command retrieves the PASW Statistics data file hubempl.sav.

• The RENAME subcommand renames variable AGE to AGE88 and variable JOBCAT to JOBCAT88.

• XSAVE is not executed until the program reads the data for procedure MEANS. The program saves file empl88.sav and generates a MEANS table in a single data pass.

• After MEANS is executed, the hubempl.sav file is still the active dataset. Variables AGE and JOBCAT retain their original names in the active dataset.

Using Temporary Transformations With XSAVE

GET FILE=hubempl.sav.
TEMPORARY.
RECODE DEPT85 TO DEPT88 (1,2=1) (3,4=2) (ELSE=9).
VALUE LABELS DEPT85 TO DEPT88 1 'MANAGEMENT' 2 'OPERATIONS' 3 'UNKNOWN'.
XSAVE OUTFILE='/data/hubtemp.sav'.
CROSSTABS DEPT85 TO DEPT88 BY JOBCAT.

• Both the saved data file and the CROSSTABS output will reflect the temporary recoding and labeling of the department variables.

• If SAVE were specified instead of XSAVE, the data would be read twice instead of once and the CROSSTABS output would not reflect the recoding.

Related Topics

XSAVE
Overview (XSAVE command)
OUTFILE Subcommand (XSAVE command)
DROP and KEEP Subcommands (XSAVE command)
RENAME Subcommand (XSAVE command)
MAP Subcommand (XSAVE command)
COMPRESSED and UNCOMPRESSED Subcommands (XSAVE command)
PERMISSIONS Subcommand (XSAVE command)


OUTFILE Subcommand (XSAVE command)

OUTFILE (subcommand),OUTFILE (subcommand),OUTFILE (subcommand)
XSAVE command,XSAVE command,XSAVE command
XSAVE (command),XSAVE (command),XSAVE (command)
OUTFILE subcommand,OUTFILE subcommand,OUTFILE subcommand

OUTFILE specifies the PASW Statistics data file to be saved. OUTFILE is required and can be specified only once. If OUTFILE is specified more than once, only the last OUTFILE is in effect. The file specification should be enclosed in quotes.

Related Topics

XSAVE
Overview (XSAVE command)
Examples (XSAVE command)
DROP and KEEP Subcommands (XSAVE command)
RENAME Subcommand (XSAVE command)
MAP Subcommand (XSAVE command)
COMPRESSED and UNCOMPRESSED Subcommands (XSAVE command)
PERMISSIONS Subcommand (XSAVE command)


DROP and KEEP Subcommands (XSAVE command)

saving files,saving files,saving files
keeping variables,keeping variables,keeping variables
saving files,saving files,saving files
dropping variables,dropping variables,dropping variables
DROP (subcommand),DROP (subcommand),DROP (subcommand)
XSAVE command,XSAVE command,XSAVE command
XSAVE (command),XSAVE (command),XSAVE (command)
DROP subcommand,DROP subcommand,DROP subcommand
KEEP (subcommand),KEEP (subcommand),KEEP (subcommand)
XSAVE command,XSAVE command,XSAVE command
XSAVE (command),XSAVE (command),XSAVE (command)
KEEP subcommand,KEEP subcommand,KEEP subcommand

DROP and KEEP are used to save a subset of variables. DROP specifies the variables not to save in the new data file, while KEEP specifies the variables to save in the new data file; variables not named on KEEP are dropped.

• Variables can be specified in any order. The order of variables on KEEP determines the order of variables in the data file. The order on DROP does not affect the order of variables in the data file.

• Keyword ALL on KEEP refers to all remaining variables not previously specified on KEEP. ALL must be the last specification on KEEP.

• If a variable is specified twice on the same subcommand, only the first mention is recognized.

• Multiple DROP and KEEP subcommands are allowed. Specifying a variable that is not in the active dataset or that has been dropped because of a previous DROP or KEEP subcommand results in an error, and the XSAVE command is not executed.

• Keyword TO can be used to specify a group of consecutive variables in the data file.

Dropping a Range of Variables

XSAVE OUTFILE='/data/hubtemp.sav'
  /DROP=DEPT79 TO DEPT84 SALARY79.
CROSSTABS DEPT85 TO DEPT88 BY JOBCAT.

• The data file is saved as hubtemp.sav. All variables between and including DEPT79 and DEPT84, as well as SALARY79, are excluded from the data file. All other variables are saved.

Specifying Variable Order With XSAVE

GET FILE='/data/prsnl.sav'.
COMPUTE  TENURE=(12-CMONTH +(12*(88-CYEAR)))/12.
COMPUTE  JTENURE=(12-JMONTH +(12*(88-JYEAR)))/12.
VARIABLE LABELS   TENURE 'Tenure in Company'
                  JTENURE 'Tenure in Grade'.
XSAVE OUTFILE='/data/prsnl88.sav' /DROP=GRADE STORE
 /KEEP=LNAME NAME TENURE JTENURE ALL.
REPORT FORMAT=AUTO /VARS=AGE TENURE JTENURE SALARY
 /BREAK=DIVISION /SUMMARY=MEAN.

• Variables TENURE and JTENURE are created by COMPUTE commands and assigned variable labels by the VARIABLE LABELS command. TENURE and JTENURE are added to the end of the active dataset.

• DROP excludes variables GRADE and STORE from file PRSNL88. KEEP specifies that LNAME, NAME, TENURE, and JTENURE are the first four variables in file prsnl88.sav, followed by all remaining variables not specified on DROP. These remaining variables are saved in the same sequence as they appear in the original file.

Related Topics

XSAVE
Overview (XSAVE command)
Examples (XSAVE command)
OUTFILE Subcommand (XSAVE command)
RENAME Subcommand (XSAVE command)
MAP Subcommand (XSAVE command)
COMPRESSED and UNCOMPRESSED Subcommands (XSAVE command)
PERMISSIONS Subcommand (XSAVE command)


RENAME Subcommand (XSAVE command)

RENAME (subcommand),RENAME (subcommand),RENAME (subcommand)
XSAVE command,XSAVE command,XSAVE command
XSAVE (command),XSAVE (command),XSAVE (command)
RENAME subcommand,RENAME subcommand,RENAME subcommand
saving files,saving files,saving files
renaming variables,renaming variables,renaming variables

RENAME changes the names of variables as they are copied into the new data file.

• The specification on RENAME is a list of old variable names followed by an equals sign and a list of new variable names. The same number of variables must be specified on both lists. Keyword TO can be used on the first list to refer to consecutive variables in the active dataset and on the second list to generate new variable names. The entire specification must be enclosed in parentheses.

• Alternatively, you can specify each old variable name individually, followed by an equals sign and the new variable name. Multiple sets of variable specifications are allowed. The parentheses around each set of specifications are optional.

• RENAME does not affect the active dataset. However, if RENAME precedes DROP or KEEP, variables must be referred to by their new names on DROP or KEEP.

• Old variable names do not need to be specified according to their order in the active dataset.

• Name changes take place in one operation. Therefore, variable names can be exchanged between two variables.

• Multiple RENAME subcommands are allowed.

Examples

XSAVE OUTFILE='/data/empl88.sav'
  /RENAME  AGE=AGE88 JOBCAT=JOBCAT88.
CROSSTABS DEPT85 TO DEPT88 BY JOBCAT.

• RENAME specifies two name changes for file empl88.sav: AGE is renamed to AGE88 and JOBCAT is renamed to JOBCAT88.

XSAVE OUTFILE='/data/empl88.sav'
  /RENAME (AGE JOBCAT=AGE88 JOBCAT88).
CROSSTABS DEPT85 TO DEPT88 BY JOBCAT.

• The name changes are identical to those in the previous example: AGE is renamed to AGE88 and JOBCAT is renamed to JOBCAT88. The parentheses are required with this method.

Related Topics

XSAVE
Overview (XSAVE command)
Examples (XSAVE command)
OUTFILE Subcommand (XSAVE command)
DROP and KEEP Subcommands (XSAVE command)
MAP Subcommand (XSAVE command)
COMPRESSED and UNCOMPRESSED Subcommands (XSAVE command)
PERMISSIONS Subcommand (XSAVE command)


MAP Subcommand (XSAVE command)

saving files,saving files,saving files
variable map,variable map,variable map
MAP (subcommand),MAP (subcommand),MAP (subcommand)
XSAVE command,XSAVE command,XSAVE command
XSAVE (command),XSAVE (command),XSAVE (command)
MAP subcommand,MAP subcommand,MAP subcommand

MAP displays a list of the variables in the data file and their corresponding names in the active dataset.

• The only specification is keyword MAP. There are no additional specifications.

• Multiple MAP subcommands are allowed. Each MAP subcommand maps the results of subcommands that precede it, but not results of subcommands that follow it.

Example

GET FILE='/data/hubempl.sav'.
XSAVE OUTFILE='/data/empl88.sav'
 /RENAME=(AGE=AGE88) (JOBCAT=JOBCAT88)
 /KEEP=LNAME NAME JOBCAT88 ALL /MAP.
MEANS RAISE88 BY DEPT88.

• MAP is used to confirm the new names for AGE and JOBCAT and the order of variables in the empl88.sav file (LNAME, NAME, and JOBCAT88, followed by all remaining variables from the active dataset).

Related Topics

XSAVE
Overview (XSAVE command)
Examples (XSAVE command)
OUTFILE Subcommand (XSAVE command)
DROP and KEEP Subcommands (XSAVE command)
RENAME Subcommand (XSAVE command)
COMPRESSED and UNCOMPRESSED Subcommands (XSAVE command)
PERMISSIONS Subcommand (XSAVE command)


COMPRESSED and UNCOMPRESSED Subcommands (XSAVE command)

COMPRESSED (subcommand),COMPRESSED (subcommand),COMPRESSED (subcommand)
XSAVE command,XSAVE command,XSAVE command
XSAVE (command),XSAVE (command),XSAVE (command)
COMPRESSED subcommand,COMPRESSED subcommand,COMPRESSED subcommand
UNCOMPRESSED (subcommand),UNCOMPRESSED (subcommand),UNCOMPRESSED (subcommand)
XSAVE command,XSAVE command,XSAVE command
XSAVE (command),XSAVE (command),XSAVE (command)
UNCOMPRESSED subcommand,UNCOMPRESSED subcommand,UNCOMPRESSED subcommand
saving files,saving files,saving files
data compression,data compression,data compression

COMPRESSED saves the file in compressed form. UNCOMPRESSED saves the file in uncompressed form. In a compressed file, small integers (from –99 to 155) are stored in one byte instead of the eight bytes used in an uncompressed file.

• The only specification is the keyword COMPRESSED or UNCOMPRESSED. There are no additional specifications.

• Compressed data files occupy less disk space than do uncompressed data files.

• Compressed data files take longer to read than do uncompressed data files.

• The GET command, which reads PASW Statistics data files, does not need to specify whether the files it reads are compressed or uncompressed.

Only one COMPRESSED or UNCOMPRESSED subcommand can be specified per XSAVE command. COMPRESSED is usually the default, though UNCOMPRESSED may be the default on some systems.

Related Topics

XSAVE
Overview (XSAVE command)
Examples (XSAVE command)
OUTFILE Subcommand (XSAVE command)
DROP and KEEP Subcommands (XSAVE command)
RENAME Subcommand (XSAVE command)
MAP Subcommand (XSAVE command)
PERMISSIONS Subcommand (XSAVE command)


PERMISSIONS Subcommand (XSAVE command)

PERMISSIONS (subcommand),PERMISSIONS (subcommand),PERMISSIONS (subcommand)
XSAVE (command),XSAVE (command),XSAVE (command)
XSAVE (command),XSAVE (command),XSAVE (command)
PERMISSIONS subcommand,PERMISSIONS subcommand,PERMISSIONS subcommand

The PERMISSIONS subcommand sets the operating system read/write permissions for the file.

READONLY | File permissions are set to read-only for all users. The file cannot be saved using the same file name with subsequent changes unless the read/write permissions are changed in the operating system or the subsequent XSAVE command specifies PERMISSIONS=WRITEABLE.
WRITEABLE | File permissions are set to allow writing for the file owner. If file permissions were set to read-only for other users, the file remains read-only for them.

Your ability to change the read/write permissions may be restricted by the operating system.

Related Topics

XSAVE
Overview (XSAVE command)
Examples (XSAVE command)
OUTFILE Subcommand (XSAVE command)
DROP and KEEP Subcommands (XSAVE command)
RENAME Subcommand (XSAVE command)
MAP Subcommand (XSAVE command)
COMPRESSED and UNCOMPRESSED Subcommands (XSAVE command)


IMPORT/EXPORT Character Sets

character sets,character sets,character sets

Communication-formatted portable files do not use positions 1–63 in the following table. Tape-formatted portable files use the complete table. See the EXPORT command for a description of the two types of files.

Position | Graphic | Macintosh | Microsoft Code Page 850 | ANSI/ISO Latin 1 | IBM EBCDIC | ASCII 7-BIT
0 | NUL | 0 | 0 | 0 | 0 | 0
1 | SOH | 1 | 1 | 1 | 1 | 1
2 | STX | 2 | 2 | 2 | 2 | 2
3 | ETX | 3 | 3 | 3 | 3 | 3
4 | SEL |  |  | 156 | 4 |
5 | HT | 9 | 9 | 9 | 5 | 9
6 | RNL |  |  | 134 | 6 |
7 | DEL | 127 | 127 | 127 | 7 | 127
8 | GE |  |  | 151 | 8 |
9 | SPS |  |  | 141 | 9 |
10 | RPT |  |  | 142 | 10 |
11 | VT | 11 | 11 | 11 | 11 | 11
12 | FF | 12 | 12 | 12 | 12 | 12
13 | CR | 13 | 13 | 13 | 13 | 13
14 | SO | 14 | 14 | 14 | 14 | 14
15 | SI | 15 | 15 | 15 | 15 | 15
16 | DLE | 16 | 16 | 16 | 16 | 16
17 | DC1 | 17 | 17 | 17 | 17 | 17
18 | DC2 | 18 | 18 | 18 | 18 | 18
19 | DC3 | 19 | 19 | 19 | 19 | 19
20 | DC4 | 20 | 20 | 20 | 60 | 20
21 | NL |  |  | 133 | 21 |
22 | BS | 8 | 8 | 8 | 22 | 8
23 | DOC |  |  | 135 | 23 |
24 | CAN | 24 | 24 | 24 | 24 | 24
25 | EM | 25 | 25 | 25 | 25 | 25
26 | UBS |  |  | 146 | 26 |
27 | CU1 |  |  | 143 | 27 |
28 | (I)FS1 | 28 | 28 | 28 | 28 | 28
29 | (I)GS | 29 | 29 | 29 | 29 | 29
30 | (I)RS | 30 | 30 | 30 | 30 | 30
31 | SM,SW |  |  | 138 | 42 |
32 | DS |  |  | 128 | 32 |
33 | SOS |  |  | 129 | 33 |
34 | FS2 |  |  | 130 | 34 |
35 | WUS |  |  | 131 | 35 |
36 | CSP |  |  | 139 | 43 |
37 | LF | 10 | 10 | 10 | 37 | 10
38 | ETB | 23 | 23 | 23 | 38 | 23
39 | ESC | 27 | 27 | 27 | 39 | 27
40 | (I)US | 31 | 31 | 31 | 31 | 31
41 | BYP |  |  | 132 | 36 |
42 | RES |  |  | 157 | 20 |
43 | ENQ | 5 | 5 | 5 | 45 | 5
44 | ACK | 6 | 6 | 6 | 46 | 6
45 | BEL | 7 | 7 | 7 | 47 | 7
46 | SYN | 22 | 22 | 22 | 50 | 22
47 | IR |  |  | 147 | 51 |
48 | PP |  |  | 148 | 52 |
49 | TRN |  |  | 149 | 53 |
50 | NBS |  |  | 150 | 54 |
51 | EOT | 4 | 4 | 4 | 55 | 4
52 | SBS |  |  | 152 | 56 |
53 | IT |  |  | 153 | 57 |
54 | RFF |  |  | 154 | 58 |
55 | CU3 |  |  | 155 | 59 |
56 | NAK | 21 | 21 | 21 | 61 | 21
57 | SUB | 26 | 26 | 26 | 63 | 26
58 | SA |  |  | 136 | 40 |
59 | SFE |  |  | 137 | 41 |
60 | MFA |  |  | 140 | 44 |
61 | reserved |  |  |  |  |
62 | reserved |  |  |  |  |
63 | reserved |  |  |  |  |
64 | 0 | 48 | 48 | 48 | 240 | 48
65 | 1 | 49 | 49 | 49 | 241 | 49
66 | 2 | 50 | 50 | 50 | 242 | 50
67 | 3 | 51 | 51 | 51 | 243 | 51
68 | 4 | 52 | 52 | 52 | 244 | 52
69 | 5 | 53 | 53 | 53 | 245 | 53
70 | 6 | 54 | 54 | 54 | 246 | 54
71 | 7 | 55 | 55 | 55 | 247 | 55
72 | 8 | 56 | 56 | 56 | 248 | 56
73 | 9 | 57 | 57 | 57 | 249 | 57
74 | A | 65 | 65 | 65 | 193 | 65
75 | B | 66 | 66 | 66 | 194 | 66
76 | C | 67 | 67 | 67 | 195 | 67
77 | D | 68 | 68 | 68 | 196 | 68
78 | E | 69 | 69 | 69 | 197 | 69
79 | F | 98 | 98 | 70 | 198 | 98
80 | G | 71 | 71 | 71 | 199 | 71
81 | H | 72 | 72 | 72 | 200 | 72
82 | I | 73 | 73 | 73 | 201 | 73
83 | J | 74 | 74 | 74 | 209 | 74
84 | K | 75 | 75 | 75 | 210 | 75
85 | L | 76 | 76 | 76 | 211 | 76
86 | M | 77 | 77 | 77 | 212 | 77
87 | N | 78 | 78 | 78 | 213 | 78
88 | O | 79 | 79 | 79 | 214 | 79
89 | P | 80 | 80 | 80 | 215 | 80
90 | Q | 81 | 81 | 81 | 216 | 81
91 | R | 82 | 82 | 82 | 217 | 82
92 | S | 83 | 83 | 83 | 226 | 83
93 | T | 84 | 84 | 84 | 227 | 84
94 | U | 85 | 85 | 85 | 228 | 85
95 | V | 86 | 86 | 86 | 229 | 86
96 | W | 87 | 87 | 87 | 230 | 87
97 | X | 88 | 88 | 88 | 231 | 88
98 | Y | 89 | 89 | 89 | 232 | 89
99 | Z | 90 | 90 | 90 | 233 | 90
100 | a | 97 | 97 | 97 | 129 | 97
101 | b | 98 | 98 | 98 | 130 | 98
102 | c | 99 | 99 | 99 | 131 | 99
103 | d | 100 | 100 | 100 | 132 | 100
104 | e | 101 | 101 | 101 | 133 | 101
105 | f | 102 | 102 | 102 | 134 | 102
106 | g | 103 | 103 | 103 | 135 | 103
107 | h | 104 | 104 | 104 | 136 | 104
108 | i | 105 | 105 | 105 | 137 | 105
109 | j | 106 | 106 | 106 | 145 | 106
110 | k | 107 | 107 | 107 | 146 | 107
111 | l | 108 | 108 | 108 | 147 | 108
112 | m | 109 | 109 | 109 | 148 | 109
113 | n | 110 | 110 | 110 | 149 | 110
114 | o | 111 | 111 | 111 | 150 | 111
115 | p | 112 | 112 | 112 | 151 | 112
116 | q | 113 | 113 | 113 | 152 | 113
117 | r | 114 | 114 | 114 | 153 | 114
118 | s | 115 | 115 | 115 | 162 | 115
119 | t | 116 | 116 | 116 | 163 | 116
120 | u | 117 | 117 | 117 | 164 | 117
121 | v | 118 | 118 | 118 | 165 | 118
122 | w | 119 | 119 | 119 | 166 | 119
123 | x | 120 | 120 | 120 | 167 | 120
124 | y | 121 | 121 | 121 | 168 | 121
125 | z | 122 | 122 | 122 | 169 | 122
126 | space | 32 | 32 | 32 | 64 | 32
127 | . | 46 | 46 | 46 | 75 | 46
128 | < | 60 | 60 | 60 | 76 | 60
129 | ( | 40 | 40 | 40 | 77 | 40
130 | + | 43 | 43 | 43 | 78 | 43
131 | | |  |  |  | 79 |
132 | & | 38 | 38 | 38 | 80 | 38
133 | [ | 91 | 91 | 91 | 173 | 91
134 | ] | 93 | 93 | 93 | 189 | 93
135 | ! | 33 | 33 | 33 | 90 | 33
136 | $ | 36 | 36 | 36 | 91 | 36
137 | * | 42 | 42 | 42 | 92 | 42
138 | ) | 41 | 41 | 41 | 93 | 41
139 | ; | 59 | 59 | 59 | 94 | 59
140 | ¬ or ∧ or ↑ | 94 | 94 | 94 | 95 | 94
141 | - | 45 | 45 | 45 | 96 | 45
142 | / | 47 | 47 | 47 | 97 | 47
143 | = | 124 | 124 | 124 | 106 | 124
144 | , | 44 | 44 | 44 | 107 | 44
145 | % | 37 | 37 | 37 | 108 | 37
146 | __ | 95 | 95 | 95 | 109 | 95
147 | > | 62 | 62 | 62 | 110 | 62
148 | ? | 63 | 63 | 63 | 111 | 63
149 | ` | 96 | 96 | 96 | 121 | 96
150 | : | 58 | 58 | 58 | 122 | 58
151 | # | 35 | 35 | 35 | 123 | 35
152 | @ | 64 | 64 | 64 | 124 | 64
153 | ´ | 39 | 39 | 39 | 125 | 39
154 | = | 61 | 61 | 61 | 126 | 61
155 | “ | 34 | 34 | 34 | 127 | 34
156 | ≤ | 178 |  |  | 140 |
157 | □ | 255 |  |  | 156 |
158 | ± | 177 | 241 | 177 | 158 |
159 | n |  |  |  | 159 |
160 | Â | 251 | 248 | 176 |  |
161 | † |  |  |  | 143 |
162 | ˜ | 126 | 126 | 126 | 161 | 126
163 | _ | 209 | 196 |  | 160 |
164 | └ |  | 192 |  | 171 |
165 | ┌ |  | 218 |  | 172 |
166 | ≥ | 179 |  |  | 174 |
167 | 0 |  |  |  | 176 |
168 | 1 |  | 251 | 185 | 177 |
169 | 2 |  | 253 | 178 | 178 |
170 | 3 |  | 252 | 179 | 179 |
171 | 4 |  |  |  | 180 |
172 | 5 |  |  |  | 181 |
173 | 6 |  |  |  | 182 |
174 | 7 |  |  |  | 183 |
175 | 8 |  |  |  | 184 |
176 | 9 |  |  |  | 185 |
177 | ┘ |  | 217 |  | 187 |
178 | ┐ |  | 191 |  | 188 |
179 | ≠ | 173 |  |  | 190 |
180 | — |  |  |  | 191 |
181 | ( |  |  |  | 141 |
182 | ) |  |  |  | 157 |
183 | + 3 |  |  |  | 142 |
184 | { | 123 | 123 | 123 | 192 | 123
185 | } | 125 | 125 | 125 | 208 | 125
186 | \ | 92 | 92 | 92 | 224 | 92
187 | ¢ | 162 | 189 | 162 | 74 |
188 | • | 165 |  | 183 | 175 |
189 | À | 203 | 183 | 192 |  |
190 | Á | 231 | 181 | 193 |  |
191 | Â | 229 | 182 | 194 |  |
192 | Ã | 204 | 199 | 195 |  |
193 | Ä | 128 | 142 | 196 |  |
194 | Å | 129 | 143 | 197 |  |
195 | Æ | 174 |  | 198 |  |
196 | Ç | 130 | 128 | 199 |  |
197 | È | 233 | 212 | 200 |  |
198 | É | 131 | 144 | 201 |  |
199 | Ê | 230 | 210 | 202 |  |
200 | Ë | 232 | 211 | 203 |  |
201 | Ì | 237 | 222 | 204 |  |
202 | Í | 234 | 214 | 205 |  |
203 | Î | 235 | 215 | 206 |  |
204 | Ï | 236 | 216 | 207 |  |
205 | Ð |  | 209 | 208 |  |
206 | Ñ | 132 | 165 | 209 |  |
207 | Ò | 241 | 227 | 210 |  |
208 | Ó | 238 | 224 | 211 |  |
209 | Ô | 239 | 226 | 212 |  |
210 | Õ | 205 | 229 | 213 |  |
211 | Ö | 133 | 153 | 214 |  |
212 | Ø | 175 | 157 | 216 |  |
213 | Ù | 244 | 235 | 217 |  |
214 | Ú | 242 | 233 | 218 |  |
215 | Û | 243 | 234 | 219 |  |
216 | Ü | 134 | 154 | 220 |  |
217 | Ý |  | 237 | 221 |  |
218 | Þ |  | 232 | 222 |  |
219 | ß | 167 | 225 | 223 |  |
220 | à | 136 | 133 | 224 |  |
221 | á | 135 | 160 | 225 |  |
222 | â | 137 | 131 | 226 |  |
223 | ã | 139 | 198 | 227 |  |
224 | ä | 138 | 132 | 228 |  |
225 | å | 140 | 134 | 229 |  |
226 | æ | 190 | 145 | 230 |  |
227 | ç | 141 | 135 | 231 |  |
228 | è | 143 | 138 | 232 |  |
229 | é | 142 | 130 | 233 |  |
230 | ê | 144 | 136 | 234 |  |
231 | ë | 145 | 137 | 235 |  |
232 | ì | 147 | 141 | 236 |  |
233 | í | 146 | 161 | 237 |  |
234 | î | 148 | 140 | 238 |  |
235 | ï | 149 | 139 | 239 |  |
236 | ð |  | 208 | 240 |  |
237 | ñ | 150 | 164 | 241 |  |
238 | ò | 152 | 149 | 242 |  |
239 | ó | 151 | 162 | 243 |  |
240 | ô | 153 | 147 | 244 |  |
241 | õ | 155 | 228 | 245 |  |
242 | ö | 154 | 148 | 246 |  |
243 | ø | 191 | 155 | 248 |  |
244 | ù | 157 | 151 | 249 |  |
245 | ú | 156 | 163 | 250 |  |
246 | û | 158 | 150 | 251 |  |
247 | ü | 159 | 129 | 252 |  |
248 | ý |  | 236 | 253 |  |
249 | ÿ | 216 | 152 | 255 |  |
250 | þ |  | 231 | 254 |  |
251 | ¡ | 193 | 173 | 161 |  |
252 | ¿ | 192 | 168 | 191 |  |
253 | ≪ | 199 | 174 | 171 |  |
254 | ≫ | 200 | 175 | 187 |  |
255 | reserved |  |  |  |  |

1 file separator

2 field separator

3 not the plus sign


Commands and Program States

command order,command order,command order
program states,program states,program states

Command order is determined only by the system’s need to know and do certain things in logical sequence. You cannot label a variable before the variable exists in the file. Similarly, you cannot transform or analyze data before a active dataset is defined. This appendix briefly describes how the program handles various tasks in a logical sequence. It is not necessary to understand the program states in order to construct a command file, but some knowledge of how the program works will help you considerably when you encounter a problem or try to determine why the program doesn’t seem to want to accept your commands or seems to be carrying out your instructions incorrectly.


Program States

To run a program session, you need to define your active dataset, transform the data, and then analyze it. This order conforms very closely to the order the program must follow as it processes your commands. Specifically, the program checks command order according to the program state through which it passes. The program state is a characteristic of the program before and after a command is encountered. There are four program states. Each session starts in the initial state, followed by the input program state, the transformation state, and the procedure state. The four program states in turn enable the program to set up the environment, read data, modify data, and execute a procedure. The figure shows how the program moves through these states. The program determines the current state from the commands that it has already encountered and then identifies which commands are allowed in that state.

Program States

A session must go through initial, input program, and procedure states to be a complete session. Since all sessions start in the initial state, you need to be concerned primarily with what commands you need to define your active dataset and to analyze the data. The following commands define a very minimal session:

GET FILE=DATAIN.
FREQUENCIES VARIABLES=ALL.

The GET command defines the active dataset and the FREQUENCIES command reads the data file and analyzes it. Thus, the program goes through the required three states: initial, input, and procedure.

Typically, a session also goes through the transformation state, but it can be skipped as shown in the example above and in the diagram in the preceding figure. Consider the following example:

TITLE 'PLOT FOR COLLEGE SURVEY'.

DATA LIST FILE=TESTDATA
 /AGE 1-3 ITEM1 TO ITEM3 5-10.

VARIABLE LABELS ITEM1 'Opinion on level of defense spending'
  ITEM2 'Opinion on level of welfare spending'
  ITEM3 'Opinion on level of health spending'.
VALUE LABELS ITEM1 TO ITEM3 -1 'Disagree' 0 'No opinion' 1 'Agree'.
MISSING VALUES AGE(-99,-98) ITEM1 TO ITEM3 (9).
RECODE ITEM1 TO ITEM3 (0=1) (1=0) (2=-1) (9=9) (ELSE=SYSMIS).
RECODE AGE (MISSING=9) (18 THRU HI=1) (LO THRU 18=0) INTO VOTER.
PRINT /$CASENUM 1-2 AGE 4-6 VOTER 8-10.
VALUE LABELS VOTER 0 'Under 18' 1 '18 or over'.
MISSING VALUES VOTER (9).
PRINT FORMATS VOTER (F1.0).

FREQUENCIES VARIABLES=VOTER, ITEM1 TO ITEM3.

The program starts in the initial state, where it processes the TITLE command. It then moves into the input state upon encountering the DATA LIST command. The program can then move into either the transformation or procedure state once the DATA LIST command has been processed.

In this example, the program remains in the transformation state after processing each of the commands from VARIABLE LABELS through PRINT FORMATS. The program then moves into the procedure state to process the FREQUENCIES command. As shown in the preceding figure, the program can repeat the procedure state if it encounters a second procedure. The program can return to the transformation state if it encounters additional transformation commands following the first procedure. Finally, in some sessions the program can return to the input program state when it encounters commands such as FILE TYPE or MATCH FILES.

Related Topics

Determining Command Order


Determining Command Order

The table “Commands and program states” shows where specific commands can be placed in the command file in terms of program states and what happens when the program encounters a command in each of the four program states. If a column contains a dash, the command is accepted in that program state and it leaves the program in that state. If one of the words INIT, INPUT, TRANS, or PROC appears in the column, the command is accepted in the program state indicated by the column heading, but it moves the program into the state indicated by INIT, INPUT, TRANS, or PROC. Asterisks in a column indicate errors when the program encounters the command in that program state. Commands marked with the dagger (†) in the column for the procedure state clear the active dataset.

The table shows six groups of commands: utility, file definition, input program, data transformation, restricted transformation, and procedure commands. These groups are discussed in the following sections.

To read the table, first locate the command. If you simply want to know where in the command stream it can go, look for columns without asterisks. For example, the COMPUTE command can be used when the program is in the input program state, the transformation state, or the procedure state, but it will cause an error if you try to use it in the initial state. If you want to know what can follow a command, look at each of the four columns next to the command. If the column is dashed, any commands not showing asterisks in the column for that program state can follow the command. If the column contains one of the words INIT, INPUT, TRANS, or PROC, any command not showing asterisks in the column for the program state indicated by that word can follow the command.

For example, if you want to know what commands can follow the INPUT PROGRAM command, note first that it is allowed only in the initial or procedure states. Then note that INPUT PROGRAM puts the program into the input program state wherever it occurs legally. This means that commands with dashes or words in the INPUT column can follow the INPUT PROGRAM command. This includes all the utility commands, the DATA LIST command, input program commands, and transformation commands like COMPUTE. Commands that are not allowed after the INPUT PROGRAM command are most of the file definition commands that are their own input program (such as GET), restricted transformations (such as SELECT IF), and procedures.

Commands and program states
 |  | INIT | INPUT | TRANS | PROC
Utility commands |  |  |  |  |
 | CLEAR TRANSFORMATIONS | ** | PROC | PROC | —
 | COMMENT | — | — | — | —
 | DISPLAY | ** | — | — | —
 | DOCUMENT | ** | — | — | —
 | DROP DOCUMENTS | ** | — | — | —
 | END DATA | — | — | — | —
 | ERASE | — | — | — | —
 | FILE HANDLE | — | — | — | —
 | FILE LABEL | — | — | — | —
 | FINISH | — | — | — | —
 | INCLUDE | — | — | — | —
 | INFO | — | — | — | —
 | DEFINE—!ENDDEFINE | — | — | — | —
 | N OF CASES | — | — | — | TRANS
 | NEW FILE | — | INIT | INIT | INIT†
 | PROCEDURE OUTPUT | — | — | — | —
 | SET, SHOW | — | — | — | —
 | TITLE, SUBTITLE | — | — | — | —
File definition commands |  |  |  |  |
 | ADD FILES | TRANS | ** | — | TRANS
 | DATA LIST | TRANS | — | INPUT | TRANS†
 | FILE TYPE | INPUT | ** | INPUT | INPUT†
 | GET | TRANS | ** | — | TRANS†
 | GET BMDP | TRANS | ** | — | TRANS†
 | GET CAPTURE | TRANS | ** | — | TRANS†
 | GET OSIRIS | TRANS | ** | — | TRANS†
 | GET SAS | TRANS | ** | — | TRANS†
 | GET SCSS | TRANS | ** | — | TRANS†
 | GET TRANSLATE | TRANS | ** | — | TRANS†
 | IMPORT | TRANS | ** | — | TRANS†
 | INPUT PROGRAM | TRANS | ** | — | TRANS†
 | KEYED DATA LIST | TRANS | — | — | TRANS
 | MATCH FILES | TRANS | ** | — | TRANS
 | MATRIX DATA | TRANS | ** | — | TRANS†
 | RENAME VARIABLES | ** | — | — | TRANS
 | UPDATE | TRANS | ** | — | TRANS
Input program commands |  |  |  |  |
 | END CASE | ** | — | ** | **
 | END FILE | ** | — | ** | **
 | END FILE TYPE | ** | TRANS | ** | **
 | END INPUT PROGRAM | ** | TRANS | ** | **
 | POINT | ** | — | ** | **
 | RECORD TYPE | ** | — | ** | **
 | REPEATING DATA | ** | — | ** | **
 | REREAD | ** | — | ** | **
Transformation commands |  |  |  |  |
 | ADD VALUE LABELS | ** | — | — | TRANS
 | APPLY DICTIONARY | ** | — | — | TRANS
 | COMPUTE | ** | — | — | TRANS
 | COUNT | ** | — | — | TRANS
 | DO IF—END IF | ** | — | — | TRANS
 | DO REPEAT—END REPEAT | ** | — | — | TRANS
 | ELSE | ** | — | — | TRANS
 | ELSE IF | ** | — | — | TRANS
 | FORMATS | ** | — | — | TRANS
 | IF | ** | — | — | TRANS
 | LEAVE | ** | — | — | TRANS
 | LOOP—END LOOP, BREAK | ** | — | — | TRANS
 | MISSING VALUES | ** | — | — | TRANS
 | NUMERIC | ** | — | — | TRANS
 | PRINT | ** | — | — | TRANS
 | PRINT EJECT | ** | — | — | TRANS
 | PRINT FORMATS | ** | — | — | TRANS
 | PRINT SPACE | ** | — | — | TRANS
 | RECODE | ** | — | — | TRANS
 | SPLIT FILE | ** | — | — | TRANS
 | STRING | ** | — | — | TRANS
 | VALUE LABELS | ** | — | — | TRANS
 | VARIABLE LABELS | ** | — | — | TRANS
 | VECTOR | ** | — | — | TRANS
 | WEIGHT | ** | — | — | TRANS
 | WRITE | ** | — | — | TRANS
 | WRITE FPR,ATS | ** | — | — | TRANS
 | XSAVE | ** | — | — | TRANS
Restricted transformations |  |  |  |  |
 | FILTER | ** | ** | — | TRANS
 | REFORMAT | ** | ** | — | TRANS
 | SAMPLE | ** | ** | — | TRANS
 | SELECT IF | ** | ** | — | TRANS
 | TEMPORARY | ** | ** | — | TRANS
Procedures |  |  |  |  |
 | BEGIN DATA | ** | ** | PROC | —
 | EXECUTE | ** | ** | PROC | —
 | EXPORT | ** | ** | PROC | —
 | GRAPH | ** | ** | PROC | —
 | LIST | ** | ** | PROC | —
 | SAVE | ** | ** | PROC | —
 | SAVE TRANSLATE | ** | ** | PROC | —
 | SORT CASES | ** | ** | PROC | —
 | other procedures | ** | ** | PROC | —

Related Topics

Program States
Unrestricted Utility Commands
File Definition Commands
Input Program Commands
Transformation Commands
Restricted Transformations
Procedures


Unrestricted Utility Commands

Most utility commands can appear in any state. The table “Commands and program states” shows this by the absence of asterisks in the columns.

The dashed lines indicate that after a utility command is processed, the program remains in the same state it was in before the command execution. INIT, TRANS, or PROC indicates that the command moves the program to that state. For example, if the program is in the procedure state, N OF CASES moves the program to the transformation state. The FINISH command terminates command processing wherever it appears. Any commands appearing after FINISH will not be read and therefore will not cause an error.

Related Topics

Determining Command Order
File Definition Commands
Input Program Commands
Transformation Commands
Restricted Transformations
Procedures


File Definition Commands

You can use most of the file definition commands in the initial state, the transformation state, and the procedure state. Most of these commands cause errors if you try to use them in the input program state. However, DATA LIST and KEYED DATA LIST can be and often are used in input programs.

After they are used in the initial state, most file definition commands move the program directly to the transformation state, since these commands are the entire input program. FILE TYPE and INPUT PROGRAM move the program into the input program state and require input program commands to complete the input program. Commands in the table “Commands and program states” marked with a dagger (†) clear the active dataset.

Related Topics

Determining Command Order
Unrestricted Utility Commands
Input Program Commands
Transformation Commands
Restricted Transformations
Procedures


Input Program Commands

The commands associated with the complex file facility (FILE TYPE, RECORD TYPE, and REPEATING DATA) and commands associated with the INPUT PROGRAM command are allowed only in the input program state.

The END CASE, END FILE, POINT, RECORD TYPE, REPEATING DATA, and REREAD commands leave the program in the input program state. The two that move the program on to the transformation state are END FILE TYPE for input programs initiated with FILE TYPE and END INPUT PROGRAM for those initiated with INPUT PROGRAM.

Related Topics

Determining Command Order
Unrestricted Utility Commands
File Definition Commands
Transformation Commands
Restricted Transformations
Procedures


Transformation Commands

The entire set of transformation commands from ADD VALUE LABELS to XSAVE can appear in the input program state as part of an input program, in the transformation state, or in the procedure state. When you use transformation commands in the input program state or the transformation state, the program remains in the same state it was in before the command. When the program is in the procedure state, these commands move the program back to the transformation state.

Transformation commands and some file definition and input program commands can be categorized according to whether they are declarative, status-switching, or executable. Declarative commands alter the active dataset dictionary but do not affect the data. Status-switching commands change the program state but do not affect the data. Executable commands alter the data. The following table lists these commands and indicates which of the three categories applies.

Taxonomy of transformation commands
Command | Type | Command | Type
ADD FILES | Exec* | LEAVE | Decl
ADD VALUE LABELS | Decl | LOOP | Exec
APPLY DICTIONARY | Decl | MATCH FILES | Exec*
BREAK | Exec | MISSING VALUES | Decl
COMPUTE | Exec | N OF CASES | Decl
COUNT | Exec | NUMERIC | Decl
DATA LIST | Exec* | POINT | Exec
DO IF | Exec | PRINT, PRINT EJECT | Exec
DO REPEAT | Decl† | PRINT FORMATS | Decl
ELSE | Exec | PRINT SPACE | Exec
ELSE IF | Exec | RECODE | Exec
END CASE | Exec | RECORD TYPE | Exec
END FILE | Exec | REFORMAT | Exec
END FILE TYPE | Stat | REPEATING DATA | Exec*
END IF | Exec | REREAD | Exec
END INPUT PROGRAM | Stat | SAMPLE | Exec
END LOOP | Exec | SELECT IF | Exec
END REPEAT | Decl† | SPLIT FILE | Decl
FILE TYPE | Stat** | STRING | Decl
FILTER | Exec | TEMPORARY | Stat
FORMATS | Decl | VALUE LABELS | Decl
GET | Exec* | VARIABLE LABELS | Decl
GET CAPTURE | Exec* | VECTOR | Decl
GET OSIRIS | Exec* | WEIGHT | Decl
IF | Exec | WRITE | Exec
INPUT PROGRAM | Stat | WRITE FORMATS | Decl
KEYED DATA LIST | Exec* | XSAVE | Exec

* This command is also declarative.

**This command is also executable and declarative.

†This command does not fit into these categories; however, it is neither executable nor status-switching, so it is classified as declarative.

Related Topics

Determining Command Order
Unrestricted Utility Commands
File Definition Commands
Input Program Commands
Restricted Transformations
Procedures


Restricted Transformations

Commands REFORMAT, SAMPLE, SELECT IF, and TEMPORARY are restricted transformation commands because they are allowed in either the transformation state or the procedure state but cannot be used in the input program state.

If you use restricted transformation commands in the transformation state, the program remains in the transformation state. If you use them in the procedure state, they move the program back to the transformation state.

Related Topics

Determining Command Order
Unrestricted Utility Commands
File Definition Commands
Input Program Commands
Transformation Commands
Procedures


Procedures

The procedures and the BEGIN DATA, EXECUTE, EXPORT, LIST, SAVE, SAVE SCSS, SAVE TRANSLATE, and SORT CASES commands cause the data to be read. These commands are allowed in either the transformation state or the procedure state.

When the program is in the transformation state, these commands move the program to the procedure state. When you use these commands in the procedure state, the program remains in that state.

Related Topics

Determining Command Order
Unrestricted Utility Commands
File Definition Commands
Input Program Commands
Transformation Commands
Restricted Transformations


Defining Complex Files

data files,data files,data files
complex,complex,complex
complex raw data files,complex raw data files,complex raw data files

Most data files have a rectangular, case-ordered structure and can be read with the DATA LIST command. This chapter illustrates the use of commands for defining complex, nonrectangular files.

• Nested files contain several types of records with a hierarchical relationship among the record types. You can define nested files with the FILE TYPE NESTED command.

• Grouped files have several records per case, and a case’s records are grouped together in a file. You can use DATA LIST and FILE TYPE GROUPED to define grouped files.

• In a mixed file, different types of cases have different kinds of records. You can define mixed files with the FILE TYPE MIXED command.

• A record in a repeating data file contains information for several cases. You can use the REPEATING DATA command to define files with repeating data.

It is a good idea to read the descriptions of the FILE TYPE and REPEATING DATA commands before proceeding.


Rectangular File

The following figure shows contents of data file RECTANG.DAT, which contains 1988 sales data for salespeople working in different territories. Year, region, and unit sales are recorded for each salesperson. Like most data files, the sales data file has a rectangular format, since information on a record applies only to one case.

File RECTANG.DAT
1988 CHICAGO     JONES      900
1988 CHICAGO     GREGORY    400
1988 BATON ROUGE RODRIGUEZ  300
1988 BATON ROUGE SMITH      333
1988 BATON ROUGE GRAU       100

Since the sales data are rectangular, you can use the DATA LIST command to define these data:

DATA LIST FILE='RECTANG.DAT'
 / YEAR     1-4
   REGION   6-16(A)
   SALESPER 18-26(A)
   SALES    29-31.

• DATA LIST defines the variable YEAR in columns 1 through 4 and string variable REGION in columns 6 through 16 in file RECTANG.DAT. The program also reads variables SALESPER and SALES on each record.

• The LIST output below shows the contents of each variable.

LIST output for RECTANG.DAT
YEAR REGION      SALESPER  SALES

1988 CHICAGO     JONES      900
1988 CHICAGO     GREGORY    400
1988 BATON ROUGE RODRIGUEZ  300
1988 BATON ROUGE SMITH      333
1988 BATON ROUGE GRAU       100

Related Topics

Nested Files
Nested Files with Missing Records
Grouped Data
Using DATA LIST
Using FILE TYPE GROUPED
Mixed Files
Reading Each Record in a Mixed File
Reading a Subset of Records in a Mixed File
Repeating Data
Fixed Number of Repeating Groups
Varying Number of Repeating Groups


Nested Files

In a nested file, information on some records applies to several cases. The 1988 sales data are arranged in nested format in the figure below. The data contain three kinds of records. A code in the first column indicates whether a record is a year (Y), region (R), or person record (P).

File NESTED.DAT
Y   1988
R   CHICAGO
P   JONES      900
P   GREGORY    400
R   BATON ROUGE
P   RODRIGUEZ  300
P   SMITH      333
P   GRAU       100

The record types are related to each other hierarchically. Year records represent the highest level in the hierarchy, since the year value 1988 applies to each salesperson in the file (only one year record is used in this example). Region records are intermediate-level records; region names apply to salesperson records that occur before the next region record in the file. For example, Chicago applies to salespersons Jones and Gregory. Baton Rouge applies to Rodriguez, Smith, and Grau. Person records represent the lowest level in the hierarchy. The information they contain—salesperson and unit sales—defines a case. Nested file structures minimize redundant information in a data file. For example, 1988 and Baton Rouge appear several times in the rectangular file, but only once in the nested file.

Since each record in the nested file has a code that indicates record type, you can use the FILE TYPE and RECORD TYPE commands to define the nested sales data:

FILE  TYPE  NESTED  FILE='NESTED.DAT' RECORD=#TYPE 1 (A)

RECORD TYPE 'Y'.
DATA LIST /  YEAR 5-8.

RECORD TYPE 'R'.
DATA LIST  / REGION 5-15 (A).

RECORD TYPE 'P'.
DATA LIST / SALESPER 5-15 (A) SALES 20-23

END FILE TYPE.

• FILE TYPE indicates that data are in nested form in the file NESTED.DAT.

• RECORD defines the record type variable as string variable #TYPE in column 1. #TYPE is defined as scratch variable so it won’t be saved in the active dataset.

• One pair of RECORD TYPE and DATA LIST statements is specified for each record type in the file. The first pair of RECORD TYPE and DATA LIST statements defines the variable YEAR in columns 5 through 8 on every year record. The second pair defines the string variable REGION on region records. The final pair defines SALESPER and SALES on person records.

• The order of RECORD TYPE statements defines the hierarchical relationship among the records. The first RECORD TYPE defines the highest-level record type. The next RECORD TYPE defines the next highest level, and so forth. The last RECORD TYPE defines a case in the active dataset.

• END FILE TYPE signals the end of file definition.

• In processing nested data, the program reads each record type you define. Information on the highest and intermediate-level records is spread to cases to which the information applies. The output from the LIST command is identical to that for the rectangular file.

Related Topics

Rectangular File
Nested Files with Missing Records
Grouped Data
Using DATA LIST
Using FILE TYPE GROUPED
Mixed Files
Reading Each Record in a Mixed File
Reading a Subset of Records in a Mixed File
Repeating Data
Fixed Number of Repeating Groups
Varying Number of Repeating Groups


Nested Files with Missing Records

In a nested file, some cases may be missing one or more record types defined in RECORD TYPE commands. For example, in the figure below the region record for salespersons Jones and Gregory is missing.

File NESTED.DAT with missing records
Y   1988
P   JONES      900
P   GREGORY    400
R   BATON ROUGE
P   RODRIGUEZ  300
P   SMITH      333
P   GRAU       100

The program assigns missing values to variables that are not present for a case. Using the modified NESTED.DAT file, the commands in the previous example produce the output shown below. You can see that the program assigned missing values to REGION for Jones and Gregory.

LIST output for nested data with missing records
YEAR REGION      SALESPER  SALES

1988             JONES      900
1988             GREGORY    400
1988 BATON ROUGE RODRIGUEZ  300
1988 BATON ROUGE SMITH      333
1988 BATON ROUGE GRAU       100

You may want to examine cases with missing records, since these cases may indicate data errors. If you add the MISSING=WARN subcommand to your FILE TYPE command, the program prints a warning message when a case is missing a defined record type. For example, the program would print two warnings when processing data in NESTED.DAT with missing records. When MISSING is set to WARN, cases are built in the same way as when the default setting (NOWARN) is in effect.

Related Topics

Rectangular File
Nested Files
Grouped Data
Using DATA LIST
Using FILE TYPE GROUPED
Mixed Files
Reading Each Record in a Mixed File
Reading a Subset of Records in a Mixed File
Repeating Data
Fixed Number of Repeating Groups
Varying Number of Repeating Groups


Grouped Data

In a grouped file, a case has several records that are grouped together in the file. You can use DATA LIST to define a grouped file if each case has the same number of records and records appear in the same order for each case. You can use FILE TYPE GROUPED whether the number of records per case and record order are fixed or vary. However, FILE TYPE GROUPED requires that each record have a case identifier and a record code.

Related Topics

Rectangular File
Nested Files
Nested Files with Missing Records
Using DATA LIST
Using FILE TYPE GROUPED
Mixed Files
Reading Each Record in a Mixed File
Reading a Subset of Records in a Mixed File
Repeating Data
Fixed Number of Repeating Groups
Varying Number of Repeating Groups


Using DATA LIST

The following table shows the organization of a grouped data file containing school subject scores for three students. Each student has three data records, and each record contains a score. The first record for each student also contains a case identifier. Records for each case are grouped together. Student 1 records appear first, followed by records for student 2 and student 3.

Record order determines whether a score is a reading, math, or science score. The reading score appears on the first record for a case, the math score appears on the second record, and the science score appears on the third record.

Data for GROUPED.DAT
Student | Score
1 | 58
 | 59
 | 97
2 | 43
 | 88
 | 45
3 | 67
 | 75
 | 90

Since each case has the same number of records and record order is fixed across cases, you can use DATA LIST to define the student data:

DATA LIST FILE='GROUPED.DAT' RECORDS=3
 /STUDENT 1 READING 5-6
 /MATH    5-6
 /SCIENCE 5-6.

LIST.

• DATA LIST indicates that data are in file GROUPED.DAT.

• RECORDS defines three records per case. The program reads student ID number (STUDENT) and reading score (READING) in the first record for a case. Math and science scores are read in the second and third records.

• The output from the LIST command is shown below.

LIST output for GROUPED.DAT
STUDENT READING MATH SCIENCE

   1       58    59     97
   2       43    88     45
   3       67    75     90

Related Topics

Rectangular File
Nested Files
Nested Files with Missing Records
Grouped Data
Using FILE TYPE GROUPED
Mixed Files
Reading Each Record in a Mixed File
Reading a Subset of Records in a Mixed File
Repeating Data
Fixed Number of Repeating Groups
Varying Number of Repeating Groups


Using FILE TYPE GROUPED

To use FILE TYPE GROUPED to define a grouped file, each record must have a case identifier and a record code. In the following commands, each data record contains a student ID number coded 1, 2, or 3 and a code indicating whether the score on that record is a reading (R), math (M), or science (S) score:

FILE TYPE GROUPED RECORD=#REC 3(A)  CASE=STUDENT 1.

RECORD TYPE 'R'.
DATA LIST / READING 5-6.

RECORD TYPE 'M'.
DATA LIST / MATH 5-6.

RECORD TYPE 'S'.
DATA LIST / SCIENCE 5-6.

END FILE TYPE.

BEGIN DATA
1 R 58
1 M 59
1 S 97
2 R 43
2 M 88
2 S 45
3 R 67
3 M 75
3 S 90
END DATA.

LIST.

• FILE TYPE indicates that data are in grouped format. RECORD defines the variable containing record codes as string variable #REC in column 3. CASE defines the case identifier variable STUDENT in the first column of each record.

• One pair of RECORD TYPE and DATA LIST statements appears for each record type in the file. The program reads reading score in every R record, math score in M records, and science score in S records.

• END FILE TYPE signals the end of file definition.

• BEGIN DATA and END DATA indicate that data are inline.

• The output from LIST is identical to the output using DATA LIST.

FILE TYPE GROUPED is most useful when record order varies across cases and when cases have missing or duplicate records. In the modified data shown below, only case 1 has all three record types. Also, record order varies across cases. For example, the first record for case 1 is a science record, whereas the first record for cases 2 and 3 is a reading record.

Modified grouped data file
Student | Subject | Score
1 | S | 97
1 | R | 58
1 | M | 59
2 | R | 43
3 | R | 67
3 | M | 75

You can use the same FILE TYPE commands as above to read the modified file. As shown in the output from LIST below, the program assigns missing values to variables that are missing for a case.

LIST output for GROUPED.DAT
STUDENT READING MATH SCIENCE

   1       58    59     97
   2       43     .      .
   3       67    75      .

By default, the program generates a warning message when a case is missing a defined record type in a grouped file or when a record is not in the same order as in RECORD TYPE commands. Thus, four warnings are generated when the commands for the previous example are used to read the modified GROUPED.DAT file. You can suppress these warnings if you add the optional specifications MISSING=NOWARN and ORDERED=NO on your FILE TYPE command.

In the modified GROUPED.DAT file, the case identifier STUDENT appears in the same column position in each record. When the location of the case identifier varies for different types of records, you can use the CASE option of the RECORD TYPE command to specify different column positions for different records. For example, suppose the case identifier appears in first column position on reading and science records and in column 2 in math records. You could use the following commands to define the data:

FILE TYPE GROUPED RECORD=#REC 3(A)  CASE=STUDENT 1.

RECORD TYPE 'R'.
DATA LIST / READING 5-6.

RECORD TYPE 'M' CASE=2.
DATA LIST / MATH 5-6.

RECORD TYPE 'S'.
DATA LIST / SCIENCE 5-6.

END FILE TYPE.

BEGIN DATA
1 S 97
1 R 58
 1M 59
2 R 43
3 R 67
 3M 75
END DATA.

LIST.

• FILE TYPE indicates that the data are in grouped format. RECORD defines the variable containing record codes as string variable #REC. CASE defines the case identifier variable as STUDENT in the first column of each record.

• One pair of RECORD TYPE and DATA LIST statements is coded for each record type in the file.

• The CASE specification on the RECORD TYPE statement for math records overrides the CASE value defined on FILE TYPE. Thus, the program reads STUDENT in column 2 in math records and column 1 in other records.

• END FILE TYPE signals the end of file definition.

• BEGIN DATA and END DATA indicate that data are inline.

• The output from LIST is identical to the output above.

Related Topics

Rectangular File
Nested Files
Nested Files with Missing Records
Grouped Data
Using DATA LIST
Mixed Files
Reading Each Record in a Mixed File
Reading a Subset of Records in a Mixed File
Repeating Data
Fixed Number of Repeating Groups
Varying Number of Repeating Groups


Mixed Files

In a mixed file, different types of cases have different kinds of records. You can use FILE TYPE MIXED to read each record or a subset of records in a mixed file.

Related Topics

Rectangular File
Nested Files
Nested Files with Missing Records
Grouped Data
Using DATA LIST
Using FILE TYPE GROUPED
Reading Each Record in a Mixed File
Reading a Subset of Records in a Mixed File
Repeating Data
Fixed Number of Repeating Groups
Varying Number of Repeating Groups


Reading Each Record in a Mixed File

The following table shows test data for two hypothetical elementary school students referred to a remedial education teacher. Student 1, who was thought to need special reading attention, took reading tests (word identification and comprehension tests). The second student completed writing tests (handwriting, spelling, vocabulary, and grammar tests). Test code (READING or WRITING) indicates whether the record contains reading or writing scores.

Academic test data for two students
Student 1 |  |  |  |  |  |
Test | ID | Grade | Word | Compre |  |
READING | 1 | 04 | 65 | 35 |  |
Student 2 |  |  |  |  |  |
Test | ID | Grade | Handwrit | Spelling | Vocab | Grammar
WRITING | 2 | 03 | 50 | 55 | 30 | 25

The following commands define the test data:

FILE TYPE MIXED RECORD=TEST 1-7(A).

RECORD TYPE 'READING'.
DATA LIST / ID  9-10 GRADE  12-13 WORD 15-16 COMPRE 18-19.

RECORD TYPE 'WRITING'.
DATA LIST / ID  9-10 GRADE 12-13 HANDWRIT 15-16 SPELLING 18-19
            VOCAB 21-22 GRAMMAR  24-25.
END FILE TYPE.

BEGIN DATA
READING 1  04 65 35
WRITING 2  03 50 55 30 25
END DATA.

LIST.

• FILE TYPE specifies that the data contain mixed record types. RECORD reads the record identifier (variable TEST) in columns 1 through 7.

• One pair of RECORD TYPE and DATA LIST statements is coded for each record type in the file. The program reads variables ID, GRADE, WORD, and COMPRE in the record in which the value of TEST is READING, and ID, GRADE, HANDWRIT, SPELLING, VOCAB, and GRAMMAR in the WRITING record.

• END FILE TYPE signals the end of file definition.

• BEGIN DATA and END DATA indicate that data are inline. Data are mixed, since some column positions contain different variables for the two cases. For example, word identification score is recorded in columns 15 and 16 for student 1. For student 2, handwriting score is recorded in these columns.

• The following figure shows the output from LIST. Missing values are assigned for variables that are not recorded for a case.

LIST output for mixed file
TEST    ID GRADE WORD COMPRE HANDWRIT SPELLING VOCAB GRAMMAR

READING  1    4   65    35       .        .       .      .
WRITING  2    3    .     .      50       55      30     25

Related Topics

Rectangular File
Nested Files
Nested Files with Missing Records
Grouped Data
Using DATA LIST
Using FILE TYPE GROUPED
Mixed Files
Reading a Subset of Records in a Mixed File
Repeating Data
Fixed Number of Repeating Groups
Varying Number of Repeating Groups


Reading a Subset of Records in a Mixed File

You may want to process a subset of records in a mixed file. The following commands read only the data for the student who took reading tests:

FILE TYPE MIXED RECORD=TEST 1-7(A).

RECORD TYPE 'READING'.
DATA LIST / ID      9-10
            GRADE  12-13
            WORD   15-16
            COMPRE 18-19.

RECORD TYPE 'WRITING'.
DATA LIST / ID        9-10
            GRADE    12-13
            HANDWRIT 15-16
            SPELLING 18-19
            VOCAB    21-22
            GRAMMAR  24-25.

END FILE TYPE.

BEGIN DATA
READING 1  04 65 35
WRITING 2  03 50 55 30 25
END DATA.

LIST.

• FILE TYPE specifies that data contain mixed record types. RECORD defines the record identification variable as TEST in columns 1 through 7.

• RECORD TYPE defines variables on reading records. Since the program skips all record types that are not defined by default, the case with writing scores is not read.

• END FILE TYPE signals the end of file definition.

• BEGIN DATA and END DATA indicate that data are inline. Data are identical to those in the previous example.

• The following figure shows the output from LIST.

LIST output for reading record
TEST    ID GRADE WORD COMPRE

READING  1    4   65    35

Related Topics

Rectangular File
Nested Files
Nested Files with Missing Records
Grouped Data
Using DATA LIST
Using FILE TYPE GROUPED
Mixed Files
Reading Each Record in a Mixed File
Repeating Data
Fixed Number of Repeating Groups
Varying Number of Repeating Groups


Repeating Data

You can use the REPEATING DATA command to read files in which each record contains repeating groups of variables that define several cases. Command syntax depends on whether the number of repeating groups is fixed across records.

Related Topics

Rectangular File
Nested Files
Nested Files with Missing Records
Grouped Data
Using DATA LIST
Using FILE TYPE GROUPED
Mixed Files
Reading Each Record in a Mixed File
Reading a Subset of Records in a Mixed File
Fixed Number of Repeating Groups
Varying Number of Repeating Groups


Fixed Number of Repeating Groups

The following table shows test score data for students in three classrooms. Each record contains a classroom number and two pairs of student ID and test score variables. For example, in class 101, student 182 has a score of 12 and student 134 has a score of 53. In class 103, student 15 has a score of 87 and student 203 has a score of 69. Each pair of ID and score variables is a repeating group, since these variables appear twice on each record.

Data in REPEAT.DAT file
Class | ID | Score | ID | Score
101 | 182 | 12 | 134 | 53
102 | 99 | 112 | 200 | 150
103 | 15 | 87 | 203 | 69

The following commands generate a active dataset in which one case is built for each occurrence of SCORE and ID, and classroom number is spread to each case on a record.

INPUT PROGRAM.
DATA LIST /  CLASS 3-5.
REPEATING DATA STARTS=6 / OCCURS=2
 /DATA STUDENT 1-4 SCORE 5-8.
END INPUT PROGRAM.

BEGIN DATA
  101 182  12 134  53
  102  99 112 200 150
  103  15  87 203  69
END DATA.

LIST.

• INPUT PROGRAM signals the beginning of data definition.

• DATA LIST defines variable CLASS, which is spread to each student on a classroom record.

• REPEATING DATA specifies that the input file contains repeating data. STARTS indicates that repeating data begin in column 6. OCCURS specifies that the repeating data group occurs twice in each record.

• DATA defines variables that are repeated (STUDENT and SCORE). The program begins reading the first repeating data group in column 6 (the value of STARTS). Since the value of OCCURS is 2, the program reads the repeating variables a second time, beginning in the next available column (column 14).

• END INPUT PROGRAM signals the end of data definition.

• BEGIN DATA and END DATA specify that data are inline.

• The output from LIST is shown below. Each student is a separate case.

LIST output for repeating data
CLASS STUDENT SCORE
 101     182     12
 101     134     53
 102      99    112
 102     200    150
 103      15     87
 103     203     69

Related Topics

Rectangular File
Nested Files
Nested Files with Missing Records
Grouped Data
Using DATA LIST
Using FILE TYPE GROUPED
Mixed Files
Reading Each Record in a Mixed File
Reading a Subset of Records in a Mixed File
Repeating Data
Varying Number of Repeating Groups


Varying Number of Repeating Groups

To use REPEATING DATA to define a file in which the number of repeating data groups varies across records, your data must contain a variable indicating the number of repeating data groups on a record. The following commands define such a file:

INPUT PROGRAM.
DATA LIST /  #NUM 1 CLASS 3-5.
REPEATING DATA STARTS=6 / OCCURS=#NUM
 /DATA STUDENT 1-4 SCORE 5-8.
END INPUT PROGRAM.

BEGIN DATA
3 101 182  12 134  53 199  30
2 102  99 112 200 150
1 103  15  87
END DATA.

LIST.

• INPUT PROGRAM signals the beginning of data definition.

• DATA LIST defines variables CLASS in columns 3 through 5 and #NUM, a scratch variable in column 1 that contains the number of repeating data groups in a record.

• REPEATING DATA specifies that the input file contains repeating data. STARTS indicates that repeating data begin in column 6. OCCURS sets the number of repeating groups on a record equal to the value of #NUM.

• DATA defines variables that are repeated. Since #NUM is 3 in the first and third records, the program reads three sets of STUDENT and SCORE variables in these records. STUDENT and SCORE are read twice in record 2.

• END INPUT PROGRAM signals the end of data definition.

• Data appear between BEGIN DATA and END DATA.

• The following figure shows the output from LIST.

LIST output
CLASS STUDENT SCORE
 101     182     12
 101     134     53
 101     199     30
 102      99    112
 103      15     87

If your data file does not have a variable indicating the number of repeating data groups per record, you can use the LOOP and REREAD commands to read the data, as in:

INPUT PROGRAM.
DATA LIST /   CLASS 3-5 #ALL 6-29 (A).
LEAVE CLASS.

LOOP #I = 1 TO 17  BY 8 IF SUBSTR(#ALL, #I, 8) NE ''.
-  REREAD COLUMN = #I + 5.
-  DATA LIST / STUDENT 1-4 SCORE 5-8.
-  END CASE.
END LOOP.
END INPUT PROGRAM.

BEGIN DATA
  101 182  12 134  53 199  30
  102  99 112 200 150
  103  15  87
END DATA.

LIST.

• INPUT PROGRAM signals the beginning of data definition.

• DATA LIST reads CLASS and #ALL, a temporary string variable that contains all of the repeating data groups for a classroom record. The column specifications for #ALL (6 through 29) are wide enough to accommodate the classroom record with the most repeating data groups (record 1).

• LOOP and END LOOP define an index loop. As the loop iterates, the program successively reads eight-character segments of #ALL, each of which contains a repeating data group or an empty field. The program reads the first eight characters of #ALL in the first iteration, the second eight characters in the second iteration, and so forth. The loop terminates when the program encounters an empty segment, which means that there are no more repeating data groups on a record.

• In each iteration of the loop in which an #ALL segment is not empty, DATA LIST reads STUDENT and SCORE in a classroom record. The program begins reading these variables in the first record, in the starting column specified by REREAD COLUMN. For example, in the first iteration, the program reads STUDENT and SCORE beginning in column 6. In the second iteration, the program reads STUDENT and SCORE starting in column 14 of the same record. When all repeating groups have been read for a record, loop processing begins on the following record.

• END CASE creates a new case for each repeating group.

• REREAD causes DATA LIST to read repeating data groups in the same record in which it last read CLASS. Without REREAD, each execution of DATA LIST would begin on a different record.

• LEAVE preserves the value of CLASS across the repeating data groups on a record. Thus, the same class number is read for each student on a classroom record.

• INPUT PROGRAM signals the beginning of data definition.

• BEGIN DATA and END DATA indicate that the data are inline. The data are identical to those in the previous example except that they do not contain a variable indicating the number of repeating groups per record.

• These commands generate the same output as shown in the figure above.

Related Topics

Rectangular File
Nested Files
Nested Files with Missing Records
Grouped Data
Using DATA LIST
Using FILE TYPE GROUPED
Mixed Files
Reading Each Record in a Mixed File
Reading a Subset of Records in a Mixed File
Repeating Data
Fixed Number of Repeating Groups


Using the Macro Facility

macro facility,macro facility,macro facility
examples,examples,examples

A macro is a set of commands that generates customized command syntax. Using macros can reduce the time and effort needed to perform complex and repetitive data analysis tasks.

Macros have two parts: a macro definition, which indicates the beginning and end of the macro and gives a name to the macro, and a macro body, which contains regular commands or macro commands that build command syntax. When a macro is invoked by the macro call, syntax is generated in a process called macro expansion. Then the generated syntax is executed as part of the normal command sequence.

This chapter shows how to construct macros that perform three data analysis tasks. In the first example, macros facilitate a file-matching task. In Example 2, macros automate a specialized statistical operation (testing a sample correlation coefficient against a nonzero population correlation coefficient). Macros in Example 3 generate random data. As shown in the following table, each example demonstrates various features of the macro facility. For information on specific macro commands, see the DEFINE command.

Macro features
 | Example 1 | Example 2 | Example 3
Macro argument |  |  |
Keyword | x | x | x
Default values | x |  | x
None | x |  | x
String manipulation | x |  | x
Looping |  |  |
Index | x |  | x
List processing |  | x |
Direct assignment | x |  | x


Example 1: Automating a File-Matching Task

The following figure shows a listing of 1988 sales data for salespeople working in different regions. The listing shows that salesperson Jones sold 900 units in the Chicago sales territory, while Rodriguez sold 300 units in Baton Rouge.

Listing of data file SALES88.SAV
YEAR REGION      SALESPER  SALES

1988 CHICAGO     JONES      900
1988 CHICAGO     GREGORY    400
1988 BATON ROUGE RODRIGUEZ  300
1988 BATON ROUGE SMITH      333
1988 BATON ROUGE GRAU       100

You can use command syntax shown below to obtain each salesperson’s percentage of total sales for their region.

Commands for obtaining sales percentages
GET FILE = ’SALES88.SAV’.

SORT CASES BY REGION.

AGGREGATE OUTFILE = ’TOTALS.SAV’
  /PRESORTED
  /BREAK = REGION
  /TOTAL@ = SUM(SALES).

MATCH FILES FILE=*
  /TABLE = ’TOTALS.SAV’
  /BY REGION.

COMPUTE PCT = 100 * SALES / TOTAL@.

TITLE 1988 DATA.
LIST.

• The GET command opens SALES88.SAV. This file becomes the active dataset.

• SORT CASES sorts the active dataset in ascending alphabetical order by REGION.

• The AGGREGATE command saves total sales (variable TOTAL@) for each region in file TOTALS.SAV.

• MATCH FILES appends the regional totals to each salesperson’s record in the active dataset. (See the MATCH FILES command for more information on matching files.)

• COMPUTE obtains the percentage of regional sales (PCT) for each salesperson.

• The LIST command output displayed below shows that Rodriguez sold 41% of the products sold in Baton Rouge. Gregory accounted for 31% of sales in the Chicago area.

Listing of data file SALES88.SAV
YEAR REGION      SALESPER  SALES  TOTAL@     PCT

1988 BATON ROUGE RODRIGUEZ  300   733.00   41.00
1988 BATON ROUGE SMITH      333   733.00   45.00
1988 BATON ROUGE GRAU       100   733.00   14.00
1988 CHICAGO     JONES      900  1300.00   69.00
1988 CHICAGO     GREGORY    400  1300.00   69.00

The following figure shows a macro that issues the commands for obtaining sales percentages. The macro consists of the commands that produce sales percentages imbedded between macro definition commands DEFINE and !ENDDEFINE.

!TOTMAC macro
DEFINE !TOTMAC ().

GET FILE = ’SALES88.SAV’.

SORT CASES BY REGION.

AGGREGATE OUTFILE = ’TOTALS.SAV’
  /PRESORTED
  /BREAK = REGION
  /TOTAL@ = SUM(SALES).

MATCH FILES FILE = *
  /TABLE = ’TOTALS.SAV’
  /BY REGION.

COMPUTE PCT = 100 * SALES / TOTAL@.

TITLE 1988 DATA.
LIST.

!ENDDEFINE.

!TOTMAC.

• Macro definition commands DEFINE and !ENDDEFINE signal the beginning and end of macro processing. DEFINE also assigns the name !TOTMAC to the macro (the parentheses following the name of the macro are required). The macro name begins with an exclamation point so that the macro does not conflict with that of an existing variable or command. Otherwise, if the macro name matched a variable name, the variable name would invoke the macro whenever the variable name appeared in the command stream.

• Commands between DEFINE and !ENDDEFINE constitute the macro body. These commands, which produce sales percentages, are identical to the commands in Figure .

• The final statement, !TOTMAC, is the macro call, which invokes the macro. When the program reads the macro call, it issues the commands in the macro body. Then these commands are executed, generating identical output.

While the macro shows you how to construct a simple macro, it doesn’t reduce the number of commands needed to calculate regional percentages. However, you can use macro features such as looping to minimize coding in more complicated tasks. For example, let’s say that in addition to the 1988 data, you have sales data for 1989 (SALES89.SAV), and each file contains the variables REGION, SALESPER, and SALES. The modified !TOTMAC macro below calculates regional sales percentages for each salesperson for 1988 and 1989.

!TOTMAC macro with index loop
DEFINE !TOTMAC ().

!DO !I = 88 !TO 89.

- GET FILE = !CONCAT(’SALES’, !I, ’.SAV’).
- SORT CASES BY REGION.
- AGGREGATE OUTFILE = ’TOTALS.SAV’
      /PRESORTED
      /BREAK = REGION
      /TOTAL@ = SUM(SALES).
- MATCH FILES FILE = *
      /TABLE = ’TOTALS.SAV’
      /BY REGION.
- COMPUTE PCT= 100 * SALES / TOTAL@.
- !LET !YEAR = !CONCAT(’19’,!I).
- TITLE !YEAR DATA.
- LIST.
!DOEND.

!ENDDEFINE.

!TOTMAC.

• DEFINE and !ENDDEFINE signal the beginning and end of macro processing.

• Commands !DO and !DOEND define an index loop. Commands between !DO and !DOEND are issued once in each iteration of the loop. The value of index variable !I, which changes in each iteration, is 88 in the first iteration and 89 in the second (final) iteration.

• In each iteration of the loop, the GET command opens a data file. The name of the file is constructed using the string manipulation function !CONCAT, which creates a string that is the concatenation of SALES, the value of the index variable, and .sav. Thus the file SALES88.SAV is opened in the first iteration.

• Commands between AGGREGATE and COMPUTE calculate percentages on the active dataset. These commands are identical to those in Figure .

• Next, a customized title is created. In the first iteration, the direct assignment command !LET assigns a value of 1988 to the macro variable !YEAR. This variable is used in the TITLE command on the following line to specify a title of 1988 DATA.

• The LIST command displays the contents of each variable.

• In the second iteration of the loop, commands display percentages for the 1989 data file. The output from the !TOTMAC macro is shown below. Note that the listing for 1988 data is the same as before.

Regional sales percentages for 1988 and 1989
1988 DATA

YEAR REGION      SALESPER  SALES  TOTAL@     PCT

1988 BATON ROUGE RODRIGUEZ  300   733.00   41.00
1988 BATON ROUGE SMITH      333   733.00   45.00
1988 BATON ROUGE GRAU       100   733.00   14.00
1988 CHICAGO     JONES      900  1300.00   69.00
1988 CHICAGO     GREGORY    400  1300.00   69.00

1989 DATA
YEAR REGION      SALESPER SALES   TOTAL@     PCT
1989 BATON ROUGE GRAU      320   1459.00   22.00
1989 BATON ROUGE SMITH     800   1459.00   55.00
1989 BATON ROUGE RODRIGUEZ 339   1459.00   23.00
1989 CHICAGO     JONES     300   1439.00   21.00
1989 CHICAGO     STEEL     899   1439.00   62.00
1989 CHICAGO     GREGORY   240   1439.00   17.00

Let’s look at another application of the !TOTMAC macro, one that uses keyword arguments to make the application more flexible. The following figure shows the number of absences for students in two classrooms. Let’s say you want to calculate deviation scores indicating how many more (or fewer) times a student was absent than the average student in his or her classroom. The first step in obtaining deviation scores is to compute the average number of absences per classroom. We can use the !TOTMAC macro to compute classroom means by modifying the macro so that it computes means and uses the absences data file (SCHOOL.SAV) as input.

Listing of file SCHOOL.SAV
CLASS STUDENT ABSENT
 101  BARRY G    3
 101  JENNI W    1
 101  ED F       2
 101  JOHN 0     8
 102  PAUL Y     2
 102  AMY G      3
 102  JOHN D    12
 102  RICH H     4

The !TOTMAC macro below can produce a variety of group summary statistics such as sum, mean, and standard deviation for any PASW Statistics data file. In the macro call you specify values of keyword arguments indicating the data file (FILE), the break (grouping) variable (BREAKVR), the summary function (FUNC), and the variable to be used as input to the summary function (INVAR). For example, to obtain mean absences for each classroom, we specify SCHOOL.SAV as the data file, CLASS as the break variable, MEAN as the summary function, and ABSENT as the variable whose values are to be averaged.

!TOTMAC macro with keyword arguments
DEFINE !TOTMAC ( BREAKVR = !TOKENS(1)
                /FUNC = !TOKENS(1)
                /INVAR = !TOKENS(1)
                /TEMP = !TOKENS(1) !DEFAULT(TOTALS.SAV)
                /FILE = !CMDEND).
GET FILE = !FILE.
SORT CASES BY !BREAKVR.
AGGREGATE OUTFILE = ’!TEMP’
   /PRESORTED
   /BREAK = !BREAKVR
   /!CONCAT(!FUNC,’@’) = !FUNC(!INVAR).

MATCH FILES FILE = *
   /TABLE = ’!TEMP’
   /BY !BREAKVR.

!ENDDEFINE.

!TOTMAC BREAKVR=CLASS FUNC=MEAN INVAR=ABSENT FILE=SCHOOL.SAV.

COMPUTE DIFF = ABSENT-MEAN@.

LIST.

!TOTMAC BREAKVR=REGION FUNC=SUM INVAR=SALES FILE=SALES89.SAV.

COMPUTE PCT = 100 * SALES / SUM@.

LIST.

• The syntax for declaring keyword arguments follows the name of the macro in DEFINE.

• !TOKENS(1) specifies that the value of an argument is a string following the name of the argument in the macro call. Thus the first macro call specifies CLASS as the value of BREAKVR, MEAN as the value of FUNC, and ABSENT as the value of INVAR.

• !CMDEND indicates that the value for FILE is the remaining text in the macro call (SCHOOL.SAV).

• TEMP is an optional argument that names an intermediate file to contain the summary statistics. Since TEMP is not assigned a value in the macro call, summary statistics are written to the default intermediate file (TOTALS.SAV).

• In the body of the macro, GET FILE opens SCHOOL.SAV.

• SORT CASES sorts the file by CLASS.

• AGGREGATE computes the mean number of absences for each class. The name of the variable containing the means (MEAN@) is constructed using the !CONCAT function, which concatenates the value of FUNC and the @ symbol.

• MATCH FILES appends the means to student records.

• COMPUTE calculates the deviation from the classroom mean for each student (variable DIFF).

• LIST displays the deviation scores, as shown in the output below. For example, John D., who was absent 12 times, had 6.75 more absences than the average student in classroom 102. Rich H., who was absent 4 times, had 1.25 fewer absences than the average student in classroom 102.

• The second macro call and remaining commands generate regional sales percentages for the 1989 sales data. As shown below, percentages are identical to those displayed in the bottom half of Figure .

Student absences and 1989 sales percentages
CLASS STUDENT ABSENT MEAN@    DIFF
 101  BARRY G    3    3.50    -.50
 101  JENNI W    1    3.50   -2.50
 101  ED F       2    3.50   -1.50
 101  JOHN 0     8    3.50    4.50
 102  PAUL Y     2    5.25   -3.25
 102  AMY G      3    5.25   -2.25
 102  JOHN D    12    5.25    6.75
 102  RICH H     4    5.25   -1.25

1989 DATA
YEAR REGION      SALESPER SALES   TOTAL@     PCT
1989 BATON ROUGE GRAU      320   1459.00   22.00
1989 BATON ROUGE SMITH     800   1459.00   55.00
1989 BATON ROUGE RODRIGUEZ 339   1459.00   23.00
1989 CHICAGO     JONES     300   1439.00   21.00
1989 CHICAGO     STEEL     899   1439.00   62.00
1989 CHICAGO     GREGORY   240   1439.00   17.00

You can modify the macro call to specify a different data file, input variable, break variable, or summary statistic. To get a different summary statistic (such as standard deviation), change the value of FUNC (see the AGGREGATE command for more information on summary functions available in the AGGREGATE procedure).

Related Topics

Example 2: Testing Correlation Coefficients
Example 3: Generating Random Data


Example 2: Testing Correlation Coefficients

While the program provides a large variety of statistical procedures, some specialized operations require the use of COMPUTE statements. For example, you may want to test a sample correlation coefficient against a population correlation coefficient. When the population coefficient is nonzero, you can compute a Z statistic to test the hypothesis that the sample and population values are equal. The formula for Z is

Z=0.5ln[1+r1−r]−0.5ln[1+p01−p0]1/(
√ n−3
)

where r is the sample correlation coefficient, p0 is the population coefficient, n is the size of the sample from which r is obtained, and ln signifies the natural logarithm function. Z has approximately the standard normal distribution.

Let’s say you want to test an r of 0.66 obtained from a sample of 30 cases against a population coefficient of 0.85. The following figure shows commands for displaying Z and its two-tailed probability.

Commands for computing Z statistic
DATA LIST FREE / R N P.

BEGIN DATA
.66 30 .85
END DATA.

COMPUTE #ZR = .5* (LN ((1 + R) / (1 - R))).
COMPUTE #ZP = .5* (LN ((1 + P) / (1 - P))).

COMPUTE Z = (#ZR-#ZP)/(1/(SQRT(N-3))).
COMPUTE PROB = 2*(1-CDFNORM(ABS(Z))).

FORMAT PROB (F8.3).
LIST.

• DATA LIST defines variables containing the sample correlation coefficient (R), sample size (N), and population correlation coefficient (P).

• BEGIN DATA and END DATA indicate that data are inline.

• COMPUTE statements calculate Z and its probability. Variables #ZR and #ZP are scratch variables used in the intermediate steps of the calculation.

• The LIST command output is shown below. Since the absolute value of Z is large and the probability is small, we reject the hypothesis that the sample was drawn from a population having a correlation coefficient of 0.85.

Z statistic and its probability
  R       N     P       Z   PROB
.66   30.00   .85   -2.41   .016

If you use the Z test frequently, you may want to construct a macro like that shown below. The !CORRTST macro computes Z and probability values for a sample correlation coefficient, sample size, and population coefficient specified as values of keyword arguments.

!CORRTST macro
DEFINE !CORRTST ( R = !TOKENS(1)
                  /N = !TOKENS(1)
                  /P = !TOKENS(1)).
INPUT PROGRAM.
- END CASE.
- END FILE.
END INPUT PROGRAM.

COMPUTE #ZR = .5* (LN ((1 + !R) / (1 - !R))).
COMPUTE #ZP = .5* (LN ((1 + !P) / (1 - !P))).

COMPUTE Z = (#ZR-#ZP) / (1/(SQRT(!N-3))).
COMPUTE PROB = 2*(1-CDFNORM(ABS(Z))).
FORMAT PROB(F8.3).

TITLE SAMPLE R=!R, N=!N, POPULATION COEFFICIENT=!P.

LIST.

!ENDDEFINE.

!CORRTST R=.66 N=30 P=.85.
!CORRTST R=.50 N=50 P=.85.

• DEFINE names the macro as !CORRTST and declares arguments for the sample correlation coefficient (R), the sample size (N), and the population correlation coefficient (P).

• !TOKENS(1) specifies that the value of an argument is a string that follows the name of the argument in the macro call. Thus the first macro call specifies values of 0.66, 30, and 0.85 for R, N, and P.

• Commands between INPUT PROGRAM and END INPUT PROGRAM create an active dataset with one case. COMPUTE statements calculate the Z statistic and its probability using the values of macro arguments R, N, and P. (INPUT PROGRAM commands would not be needed if COMPUTE statements operated on values in an existing file or inline data, rather than macro arguments.)

• A customized TITLE shows displays the values of macro arguments used in computing Z.

• The LIST command displays Z and its probability.

• The !CORRTST macro is called twice. The first invocation tests an r of 0.66 from a sample of 30 cases against a population coefficient of 0.85 (this generates the same Z value and probability as shown earlier). The second macro call tests an r of 0.50 from a sample of 50 cases against the same population correlation coefficient. The output from these macro calls is shown below.

Output from !CORRTST
SAMPLE R= .66 , N= 30 , POPULATION COEFFICIENT= .85

       Z     PROB
   -2.41     .016

SAMPLE R= .50 , N= 50 , POPULATION COEFFICIENT= .85

       Z     PROB
   -4.85      .000

The following figure shows a modified !CORRTST macro that you can use to test a sample r against each coefficient in a list of population coefficients.

!CORRTST macro with list-processing loop
DEFINE !CORRTST (R = !TOKENS(1)
                 /N = !TOKENS(1)
                 /P = !CMDEND).
- INPUT PROGRAM.
-   END CASE.
-   END FILE.
- END INPUT PROGRAM.

!DO !I !IN (!P).
- COMPUTE #ZR = .5* (LN ((1 + !R) / (1 - !R))).
- COMPUTE #ZP = .5* (LN ((1 + !I) / (1 - !I))).

- COMPUTE Z = (#ZR-#ZP)/(1/(SQRT(!N-3))).

- COMPUTE PROB=2*(1-CDFNORM(ABS(Z))).
- FORMAT PROB(F8.3).
- TITLE SAMPLE R=!R, N=!N, POPULATION COEFFICIENT=!I.
- LIST.
!DOEND.

!ENDDEFINE.

!CORRTST R=.66 N=30 P=.20 .40 .60 .80 .85 .90.

• DEFINE names the macro as !CORRTST and declares arguments for the sample correlation coefficient (R), the sample size (N), and the population correlation coefficient (P).

• !TOKENS(1) specifies that the value of an argument is a string that follows the name of the argument in the macro call. Thus, the macro call specifies the value of R as 0.66 and N as 0.30.

• !CMDEND indicates that the value for P is the remaining text in the macro call. Thus the value of P is a list containing the elements 0.20, 0.40, 0.60, 0.80, 0.85, and 0.90.

• Commands !DO !IN and !DOEND define a list-processing loop. Commands in the loop compute one Z statistic for each element in the list of population coefficients. For example, in the first iteration Z is computed using 0.20 as the population coefficient. In the second iteration 0.40 is used. The same sample size (30) and r value (0.66) are used for each Z statistic.

• The output from the macro call is shown below. One Z statistic is displayed for each population coefficient.

Output from modified !CORRTST macro
SAMPLE R= .66 , N= 30 , POPULATION COEFFICIENT= .20

       Z     PROB
    3.07     .002

SAMPLE R= .66 , N= 30 , POPULATION COEFFICIENT= .40

       Z     PROB
    1.92     .055

SAMPLE R= .66 , N= 30 , POPULATION COEFFICIENT= .60

       Z     PROB
     .52     .605

SAMPLE R= .66 , N= 30 , POPULATION COEFFICIENT= .80

       Z     PROB
   -1.59     .112

SAMPLE R= .66 , N= 30 , POPULATION COEFFICIENT= .85

       Z     PROB
   -2.41     .016

SAMPLE R= .66 , N= 30 , POPULATION COEFFICIENT= .90

       Z     PROB
   -3.53     .000

Related Topics

Example 1: Automating a File-Matching Task
Example 3: Generating Random Data


Example 3: Generating Random Data

You can use command syntax to generate variables that have approximately a normal distribution. Commands for generating five standard normal variables (X1 through X5) for 1000 cases are shown in the following figure. As shown in the output below, each variable has a mean of approximately 0 and a standard deviation of approximately 1.

Data-generating commands
INPUT PROGRAM.
-   VECTOR X(5).
-       LOOP #I = 1 TO 1000.
-           LOOP #J = 1 TO 5.
-             COMPUTE X(#J) = NORMAL(1).
-           END LOOP.
-           END CASE.
-       END LOOP.
-       END FILE.
END INPUT PROGRAM.

DESCRIPTIVES VARIABLES X1 TO X5.
Descriptive statistics for generated data
                                           Valid
Variable  Mean  Std Dev  Minimum  Maximum      N  Label
X1        -.01     1.02    -3.11     4.15   1000
X2         .08     1.03    -3.19     3.22   1000
X3         .02     1.00    -3.01     3.51   1000
X4         .03     1.00    -3.35     3.19   1000
X5        -.01      .96    -3.34     2.91   1000

The !DATAGEN macro below issues the data-generating commands shown above.

!DATAGEN macro
DEFINE !DATAGEN ().

INPUT PROGRAM.
-    VECTOR X(5).
-        LOOP #I = 1 TO 1000.
-            LOOP #J = 1 TO 5.
-                COMPUTE X(#J) = NORMAL(1).
-            END LOOP.
-            END CASE.
-        END LOOP.
-        END FILE.
END INPUT PROGRAM.

DESCRIPTIVES VARIABLES X1 TO X5.

!ENDDEFINE.

!DATAGEN.

The data-generating commands are imbedded between macro definition commands. The macro produces the same data and descriptive statistics as shown above.

You can tailor the generation of normally distributed variables if you modify the !DATAGEN macro so it will accept keyword arguments, as shown in the following figure. The macro allows you to specify the number of variables and cases to be generated and the approximate standard deviation.

!DATAGEN macro with keyword arguments
DEFINE !DATAGEN ( OBS =!TOKENS(1) !DEFAULT(1000)
                  /VARS =!TOKENS(1) !DEFAULT(5)
                  /SD =!CMDEND !DEFAULT(1)).
INPUT PROGRAM.
-   VECTOR X(!VARS).
-       LOOP #I = 1 TO !OBS.
-           LOOP #J = 1 TO !VARS.
-               COMPUTE X(#J) = NORMAL(!SD).
-           END LOOP.
-           END CASE.
-       END LOOP.
-       END FILE.
END INPUT PROGRAM.

!LET !LIST = !NULL.
!DO  !I = 1 !TO !VARS.
-   !LET !LIST = !CONCAT(!LIST, ‘ ‘, X, !I).
!DOEND.

DESCRIPTIVES VARIABLES !LIST.

!ENDDEFINE.

!DATAGEN OBS=500 VARS=2 SD=1.
!DATAGEN.

• The DEFINE statement declares arguments that specify the number of cases (OBS), variables (VARS), and standard deviation (SD). By default, the macro creates 1000 cases with 5 variables that have a standard deviation of 1.

• Commands between INPUT PROGRAM and END INPUT PROGRAM generate the new data using values of the macro arguments.

• Commands !LET and !DO/!DOEND construct a variable list (!LIST) that is used in DESCRIPTIVES. The first !LET command initializes the list to a null (blank) string value. For each new variable, the index loop adds to the list a string of the form X1, X2, X3, and so forth. Thus, DESCRIPTIVES requests means and standard deviations for each new variable.

• The first macro call generates 500 cases with two standard normal variables. The second call requests the default number of variables, cases, and standard deviation. Descriptive statistics (not shown) are also computed for each variable.

As shown in the following figure, you can declare additional keyword arguments that allow you to specify the distribution (normal or uniform) of the generated data and a parameter value that is used as the standard deviation (for normally distributed data) or a range (for uniformly distributed data).

!DATAGEN macro with additional keyword arguments
DEFINE !DATAGEN (OBS    =!TOKENS(1) !DEFAULT(1000)
                 /VARS  =!TOKENS(1) !DEFAULT(5)
                 /DIST  =!TOKENS(1) !DEFAULT(NORMAL)
                 /PARAM =!TOKENS(1) !DEFAULT(1)).
INPUT PROGRAM.
-   VECTOR X(!VARS).
-       LOOP #I = 1 TO !OBS.
-           LOOP #J = 1 TO !VARS.
-               COMPUTE X(#J) = !DIST(!PARAM).
-           END LOOP.
-           END CASE.
-       END LOOP.
-       END FILE.
END INPUT PROGRAM.

!LET !LIST = !NULL.
!DO  !I = 1 !TO !VARS.
-   !LET !LIST = !CONCAT(!LIST, ’ ’, X, !I).
!DOEND.

DESCRIPTIVES VARIABLES !LIST.
!ENDDEFINE.

!DATAGEN OBS=500 VARS=2 DIST=UNIFORM PARAM=2.

• The DEFINE statement declares arguments OBS, VARS, DIST, and PARAM. OBS and VARS represent the number of observations and cases to be generated. Arguments DIST and PARAM specify the shape and parameter of the distribution of generated data. By default, the macro generates 1000 observations with 5 standard normal variables.

• Statements between INPUT PROGRAM and END INPUT PROGRAM generate the new data using values of macro arguments.

• Remaining commands in the body of the macro obtain descriptive statistics for generated variables.

• The macro call in creates two approximately uniformly distributed variables with a range of 2. The output from the macro call is shown below.

Descriptive statistics for uniform variables
                                           Valid
Variable  Mean  Std Dev  Minimum  Maximum      N  Label
X1         .99      .57      .00     2.00    500
X2        1.00      .57      .00     2.00    500

Related Topics

Example 1: Automating a File-Matching Task
Example 2: Testing Correlation Coefficients


Canonical Correlation and Ridge Regression Macros

Macro,Macro,Macro
cautions,cautions,cautions

Two macro routines are installed with for performing canonical correlation and ridge regression. Macros are inherently less robust than regular commands. Error checking is minimal, and small errors produce large numbers of uninformative messages, giving little clue to the real cause of the problem. Syntax must be entered exactly as documented:

• Enter subcommands in the order shown.

• Do not include a slash before the first subcommand.

• Enter keywords exactly as shown. Do not abbreviate them, and do not extend them (even if they look like abbreviations).

• Do not omit equal signs, but do not add them if none are displayed in the syntax diagram.

• Remember that these "command names" are actually macro calls, which are expanded into (lengthy) sequences of commands and Matrix language statements. The command name should not appear anywhere within the specifications of the command, for example within a variable name.

• These macros create new files in the current directory. If you do not have write permission to the current directory (this can happen if you are running the program on a network), change the current directory. You can do this by opening or saving a file on your own hard disk.

• You cannot run these macros if split-file processing is in effect.

Related Topics

Canonical Correlation Macro
Ridge Regression Macro


Canonical Correlation Macro

macro,macro,macro
canonical correlation macro,canonical correlation macro,canonical correlation macro
canonical correlation macro,canonical correlation macro,canonical correlation macro
INCLUDE '[installdir]/Samples/English/Canonical correlation.sps'.
CANCORR SET1=varlist1 /
        SET2=varlist2 / .
The two variable lists must be separated with a slash.
[installdir] is the installation directory.

Related Topics

Canonical Correlation and Ridge Regression Macros
Ridge Regression Macro


Ridge Regression Macro

macro,macro,macro
ridge regression macro,ridge regression macro,ridge regression macro
ridge regression macro,ridge regression macro,ridge regression macro
INCLUDE '[installdir]/Samples/English/Ridge regression.sps'.
RIDGEREG DEP=varname /ENTER = varlist
 [/START={0**}] [/STOP={1**}] [/INC={0.05**}]
         {value}         {value}        {value   }
 [ /K=value] .
[installdir] is the installation directory.

Related Topics

Canonical Correlation and Ridge Regression Macros
Canonical Correlation Macro


File Specifications for Repository Objects

repository,repository,repository
file specifications,file specifications,file specifications

Access to a repository is available with the Statistics Adapter option. Once a connection to a repository has been established, you can use a file specification for a repository object on nearly any keyword or subcommand where a file specification can be provided (including, but not limited to FILE, INFILE, or OUTFILE ). File specifications for repository objects can also be used in procedure dialog boxes that allow manual entry of a file specification—for example, XML model files or plan files for complex samples analyses.

A repository file specification has the following form:

SPSSCR://{directory path and/or file specification}

         [{#M.versionmarker}]
          {#L.versionlabel }

Note: Specification of descriptions (#D) and keywords (#K) is obsolete for release 17.0 and higher.

Basic Specification Collapse Hide details

Basic Specification

The basic specification is the scheme name SPSSCR , followed by a colon, one or two slashes (forward or backward), and a directory path or file: for example:

GET FILE='SPSSCR://data/mydata.sav'.

• A repository file specification is included on a GET command. The latest version of the file /data/mydata.sav will be retrieved from the currently connected repository.

Syntax Rules Collapse Hide details

Syntax Rules

• Paths can be specified with forward slashes (/) or backslashes (\).

• The optional components of a file specification--version marker (#M) and version label (#L)--can be specified in any order.

• When including an optional component, the character sequence that specifies the component--for example, #L--must be followed by a period (.).

File Extensions Collapse Hide details

File Extensions

Files are stored to the repository with an associated MIME type that specifies the type of file; for example, PASW Statistics format data, or viewer output. Including a file extension, such as .sav or .spv, is not necessary in order for the correct MIME type to be determined; however, it is recommended.

• File extensions are not added to filenames when storing to a repository. For example, the following SAVE command results in the creation of a repository object with a MIME type of PASW Statistics-format data, and a fully qualified path of /data/mydata, but no sav extension.

SAVE OUTFILE='SPSSCR://data/mydata'.

• When retrieving repository objects, you must specify the filename exactly as provided when the file was stored. If the file was stored with an extension, then you must supply the extension. If the file was stored without an extension then do not include one.

Permissions Collapse Hide details

Permissions

• The PERMISSIONS, SAVE, and XSAVE commands will generate errors if you attempt to set permissions for repository objects. Permissions for repository objects are set with the REPOSITORY ATTRIBUTES command or using administration tools included with PASW Collaboration and Deployment Services.

• The ERASE FILE command will generate an error if you attempt to delete a repository object.

Related Topics

Introduction to the Statistics Adapter
Connecting to a Repository
Storing an Object to a Repository
Retrieving an Object from a Repository
Publish to Web
Accessing Dialog Boxes to Store or Retrieve Repository Objects
Versions
Using File Handles for Repository Locations
Setting the Working Directory to a Repository Location


Versions

By default, the latest version is returned when a file is retrieved. You can optionally specify a particular version to retrieve by including the version marker or version label, if one exists, for the desired version. Version markers and labels are always ignored if the specification describes a directory path, as opposed to a specific file.

Version label (#L). A label is used to easily identify a version; for example, production or development.

• The version label, if provided, is displayed in the Label column in the Select Version dialog box. See the topic Selecting a Version of a Repository Object for more information.

Version marker (#M). The version marker consists of an integer version number followed by a time stamp that uniquely specifies a version—for example, 1:2006-07-26 15:19:49.237.

• The version marker is displayed in the Version column in the Select Version dialog box. See the topic Selecting a Version of a Repository Object for more information.

Examples

*Retrieve a labelled version.
GET FILE='SPSSCR://data/mydata.sav#L.development'.

• The version of /data/mydata.sav with the label development is retrieved from the current repository.

*Retrieve a version using its version marker.
OUTPUT OPEN FILE=
   'SPSSCR://output/myoutput.spv#M.0:2006-07-26 15:18:15.862'.

• The version of the output file /output/myoutput.spv with version marker 0:2006-07-26 15:18:15.862 is retrieved.

Related Topics

File Specifications for Repository Objects
Using File Handles for Repository Locations
Setting the Working Directory to a Repository Location


Using File Handles for Repository Locations

You can define a file handle to a file or a directory in a repository and use that file handle when storing or retrieving.

*Define and use a file handle for a directory.
FILE HANDLE cust /NAME='SPSSCR://CustomerValue'.
GET FILE='cust/data2002.sav'.

• The handle cust is associated with the repository directory /CustomerValue, and the GET command retrieves the latest version of the file data2002.sav from this directory in the current repository.

*Define and use a file handle for a specific file.
FILE HANDLE cust /NAME='SPSSCR://CustomerValue/data2002.sav'.
GET FILE='cust'.

• The handle cust is associated with the repository file /CustomerValue/data2002.sav, and the GET command retrieves the latest version of this file from the current repository.

Related Topics

File Specifications for Repository Objects
Versions
Setting the Working Directory to a Repository Location


Setting the Working Directory to a Repository Location

You can use the CD command to set the working directory to a directory in the currently connected repository.

CD 'SPSSCR://CustomerValue'.
GET FILE='data2002.sav'.

• The working directory is set to the repository directory /CustomerValue, and the GET command retrieves the latest version of the file data2002.sav from this directory in the current repository.

Related Topics

File Specifications for Repository Objects
Versions
Using File Handles for Repository Locations


Introduction to Python Programs

BEGIN PROGRAM (command),BEGIN PROGRAM (command),BEGIN PROGRAM (command)
Python,Python,Python
using Python within PASW Statistics,using Python within PASW Statistics,using Python within PASW Statistics
Python,Python,Python
programs,programs,programs

The PASW Statistics-Python® Integration Package allows you to create Python programs that control the flow of command syntax jobs, read and write data, and create custom procedures that generate their own pivot table output. This feature requires the PASW Statistics-Python Integration Plug-in.

A companion interface is available for creating Python scripts that operate on the PASW Statistics user interface and manipulate output objects. See the topic Introduction to Python Scripts for more information.

Python programming features described here are available inside BEGIN PROGRAM-END PROGRAM program blocks in command syntax. A program block provides access to all the functionality of the Python programming language, including the functions specific to PASW Statistics and provided in the PASW Statistics-Python package. You can use program blocks to combine the programmability features of Python with all the capabilities of PASW Statistics by building strings of command syntax that are then executed by PASW Statistics.

You can also run PASW Statistics from an external Python process, such as a Python IDE or the Python interpreter. See the topic Running PASW Statistics from an External Python Process for more information.

Note: SPSS Inc. is not the owner or licensor of the Python software. Any user of Python must agree to the terms of the Python license agreement located on the Python web site. SPSS Inc. is not making any statement about the quality of the Python program. SPSS Inc. fully disclaims all liability associated with your use of the Python program.

Within a program block, Python is in control, and it knows nothing about PASW Statistics commands. When the PASW Statistics-Python package is loaded, Python knows about the functions provided in the package, but standard PASW Statistics commands are basically invalid within a program block. For example:

BEGIN PROGRAM PYTHON.
FREQUENCIES VARIABLES=var1, var2, var3.
END PROGRAM.

will generate an error, because FREQUENCIES is not recognized by Python. But since the goal of a program block is typically to generate some command syntax that PASW Statistics can understand, there must be a way to specify command syntax within a program block. This is done by expressing syntax commands, or parts of commands, as character strings, as in:

spss.Submit("FREQUENCIES VARIABLES=var1, var2, var3.")

The real power of program blocks comes from the ability to dynamically build strings of command syntax, as in:

BEGIN PROGRAM PYTHON.
import spss
string1="DESCRIPTIVES VARIABLES="
N=spss.GetVariableCount()
scaleVarList=[]
for i in xrange(N):
  if spss.GetVariableMeasurementLevel(i)=='scale':
    scaleVarList.append(spss.GetVariableName(i))
string2="."
spss.Submit([string1, ' '.join(scaleVarList), string2])
END PROGRAM.

• spss.GetVariableCount returns the number of variables in the active dataset.

• if spss.GetVariableMeasurementLevel(i)=="scale" is true only for variables with a scale measurement level.

• scaleVarList.append(spss.GetVariableName(i)) builds a list of variable names that includes only those variables with a scale measurement level.

• spss.Submit submits a DESCRIPTIVES command to PASW Statistics that looks something like this:

DESCRIPTIVES VARIABLES=
scalevar1 scalevar2 scalevar3...etc.
.

Related Topics

Python Functions and Classes
How to Get Integration Plug-ins
Working with Python Program Blocks
Python Syntax Rules
Running PASW Statistics from an External Python Process
Python and PASW Statistics Working Directories
Working with Multiple Versions of PASW Statistics (Python)


Working with Python Program Blocks

Use SET PRINTBACK ON MPRINT ON to display the syntax generated by program blocks.

Example

SET PRINTBACK ON MPRINT ON.
GET FILE='/examples/data/Employee data.sav'.
BEGIN PROGRAM PYTHON.
import spss
scaleVarList=[]
catVarList=[]
varcount=spss.GetVariableCount()
for i in xrange(varcount):
  if spss.GetVariableMeasurementLevel(i)=='scale':
    scaleVarList.append(spss.GetVariableName(i))
  else:
    catVarList.append(spss.GetVariableName(i))
spss.Submit("""
FREQUENCIES
 /VARIABLES=%s.
DESCRIPTIVES
   /VARIABLES=%s.
""" %(' '.join(catVarList), ' '.join(scaleVarList)))
END PROGRAM.

The generated command syntax is displayed in the log in the PASW Statistics Viewer:

225 M>  FREQUENCIES
226 M>    /VARIABLES=gender educ jobcat minority.
227 M>  DESCRIPTIVES
228 M>    /VARIABLES=id bdate salary salbegin jobtime prevexp.

Related Topics

Basic Specification for a Python Program Block
Nested Program Blocks (Python)
Unicode Mode (Python)
Localizing Output from Python Programs


Basic Specification for a Python Program Block

The basic specification for a Python program block is BEGIN PROGRAM PYTHON (the keyword PYTHON can be omitted) followed by one or more Python statements, followed by END PROGRAM.

Note: The Python function sys.exit() is not supported for use within a program block.

• The first program block in a session should start with the Python function import spss, which imports the spss module, providing access to the functions in the PASW Statistics-Python package. See the topic Python Functions and Classes for more information.

• Subsequent program blocks in the same session do not require import spss, and it is silently ignored if the module has already been imported.

Example Collapse Hide details

Example

DATA LIST FREE /var1.
BEGIN DATA
1
END DATA.
DATASET NAME File1.
BEGIN PROGRAM PYTHON.
import spss
File1N=spss.GetVariableCount()
END PROGRAM.
DATA LIST FREE /var1 var2 var3.
BEGIN DATA
1 2 3
END DATA.
DATASET NAME File2.
BEGIN PROGRAM PYTHON.
File2N=spss.GetVariableCount()
if File2N > File1N:
    message="File2 has more variables than File1."
elif File1N > File2N:
    message="File1 has more variables than File2."
else:
    message="Both files have the same number of variables."
print message
END PROGRAM.

• The first program block contains the import spss statement. This statement is not required in the second program block.

• The first program block defines a programmatic variable, File1N, with a value set to the number of variables in the active dataset.

• Prior to the second program block, a different dataset becomes the active dataset, and the second program block defines a programmatic variable, File2N, with a value set to the number of variables in that dataset.

• Since the value of File1N persists from the first program block, the two variable counts can be compared in the second program block.

Syntax Rules Collapse Hide details

Syntax Rules

• Within a program block, only statements recognized by the specified programming language are allowed.

• Command syntax generated within a program block must follow interactive syntax rules. See the topic Running Commands for more information.

• Within a program block, each line should not exceed 251 bytes (although syntax generated by those lines can be longer).

• With the PASW Statistics Batch Facility (available only with PASW Statistics Server), use the -i switch when submitting command files that contain program blocks. All command syntax (not just the program blocks) in the file must adhere to interactive syntax rules.

Within a program block, the programming language is in control, and the syntax rules for that programming language apply. Command syntax generated from within program blocks must always follow interactive syntax rules. For most practical purposes this means command strings you build in a programming block must contain a period (.) at the end of each command.

Scope and Limitations Collapse Hide details

Scope and Limitations

• Programmatic variables created in a program block cannot be used outside of program blocks.

• Program blocks cannot be contained within DEFINE-!ENDDEFINE macro definitions.

• Program blocks can be contained in command syntax files run via the INSERT command, with the default SYNTAX=INTERACTIVE setting.

• Program blocks cannot be contained within command syntax files run via the INCLUDE command.

• Python variables specified in a given program block persist to subsequent program blocks.

• Python programs (.py, .pyc) utilizing the spss module cannot be run as autoscripts, nor are they intended to be run from Utilities>Run Script.

More information about Python programs and Python scripts is available from the topic Scripting Facility in this help system.

Related Topics

Working with Python Program Blocks
Nested Program Blocks (Python)
Unicode Mode (Python)
Localizing Output from Python Programs


Nested Program Blocks (Python)

Python,Python,Python
nested program blocks,nested program blocks,nested program blocks

From within Python, you can submit command syntax containing a BEGIN PROGRAM block, thus allowing you to nest program blocks. This can be done by including the nested program block in a separate command syntax file and submitting an INSERT command to read in the block. It can also be done by submitting the nested program block from within a user-defined Python function.

Example: Nesting Program Blocks Using the INSERT Command

import spss
spss.Submit("INSERT FILE='/myprograms/nested_block.sps'.")

The file /myprograms/nested_block.sps would contain a BEGIN PROGRAM block, as in:

BEGIN PROGRAM PYTHON.
import spss
<Python code>
END PROGRAM.

Note: You cannot import a Python module containing code that nests a program block, such as the above code that uses the INSERT command to insert a file containing a program block. If you wish to encapsulate nested program blocks in a Python module that can be imported, then embed the nesting code in a user-defined function as shown in the following example.

Example: Nesting Program Blocks With a User-Defined Python Function

import spss, myfuncs
myfuncs.demo()

• myfuncs is a user-defined Python module containing the function (demo) that will submit the nested program block.

A Python module is simply a text file containing Python definitions and statements. You can create a module with a Python IDE, or with any text editor, by saving a file with an extension of .py. The name of the file, without the .py extension, is then the name of the module.

• The import statement includes myfuncs so that it is loaded along with the spss module. To be sure that Python can find your module, you may want to save it to your Python "site-packages" directory, typically /Python26/Lib/site-packages.

• The code myfuncs.demo() calls the function demo in the myfuncs module.

Following is a sample of the contents of myfuncs.

import spss
def demo():
   spss.Submit("""
BEGIN PROGRAM PYTHON.
<Python code>
END PROGRAM.""")

• The sample myfuncs module includes an import spss statement. This is necessary since a function in the module makes use of a function from the spss module--specifically, the Submit function.

• The nested program block is contained within a Python triple-quoted string. Triple-quoted strings allow you to specify a block of commands on multiple lines, resembling the way you might normally write command syntax.

• Notice that spss.Submit is indented but the BEGIN PROGRAM block is not. Python statements that form the body of a user-defined Python function must be indented. The level of indentation is arbitrary but must be the same for all statements in the function body. The BEGIN PROGRAM block is passed as a string argument to the Submit function and is processed by PASW Statistics as a block of Python statements. Python statements are not indented unless they are part of a group of statements, as in a function or class definition, a conditional expression, or a looping structure.

Notes

• You can nest program blocks within nested program blocks, up to five levels of nesting.

• Python variables specified in a nested program block are local to that block unless they are specified as global variables. In addition, Python variables specified in a program block that invokes a nested block can be read, but not modified, in the nested block.

• Nested program blocks are not restricted to being Python program blocks, but you can only submit a nested block from Python. For example, you can nest an R program block in a Python program block, but you cannot nest a Python program block in an R program block.

• If a Submit function containing a triple quoted string nests a Python program block containing another triple quoted string, use a different type of triple quotes in the nested block. For example, if the outer block uses triple double quotes, then use triple single quotes in the nested block.

Related Topics

Working with Python Program Blocks
Basic Specification for a Python Program Block
Unicode Mode (Python)
Localizing Output from Python Programs


Unicode Mode (Python)

Unicode,Unicode,Unicode
Python programs,Python programs,Python programs
Python,Python,Python
Unicode,Unicode,Unicode

When PASW Statistics is in Unicode mode (controlled by the UNICODE subcommand of the SET command) the following conversions are automatically done when passing and receiving strings through the functions available with the spss module:

• Strings received by Python from PASW Statistics are converted from UTF-8 to Python Unicode, which is UTF-16.

• Strings passed from Python to PASW Statistics are converted from UTF-16 to UTF-8.

Note: Changing the locale and/or the unicode setting during an OMS request may result in incorrectly transcoded text.

Command Syntax Files

Special care must be taken when working in Unicode mode with command syntax files. Specifically, Python string literals used in command syntax files need to be explicitly expressed as UTF-16 strings. This is best done by using the u() function from the spssaux module (installed with the PASW Statistics-Python Integration Plug-in). The function has the following behavior:

• If PASW Statistics is in Unicode mode, the input string is converted to UTF-16.

• If PASW Statistics is not in Unicode mode, the input string is returned unchanged.

Note: If the string literals in a command syntax file only consist of plain roman characters (7-bit ascii), the u() function is not needed.

The following example demonstrates some of this behavior and the usage of the u() function.

set unicode on locale=english.
BEGIN PROGRAM.
import spss, spssaux
from spssaux import u
literal = "âbc"
try:
   print "literal without conversion:", literal
except:
   print "can't print literal"
try:
   print "literal converted to utf-16:", u(literal)
except:
   print "can't print literal"
END PROGRAM.

Following are the results:

literal without conversion: can't print literal
literal converted to utf-16: âbc

Truncating Unicode Strings

When working in Unicode mode, use the truncatestring function from the spssaux module (installed with the PASW Statistics-Python Integration Plug-in) to correctly truncate a string to a specified maximum length in bytes. This is especially useful for truncating strings to be used as PASW Statistics variable names, which have a maximum allowed length of 64 bytes.

The truncatestring function takes two arguments--the string to truncate, and the maximum number of bytes, which is optional and defaults to 64. For example:

import spss, spssaux
newstring = spssaux.truncatestring(string,8)

Related Topics

Working with Python Program Blocks
Basic Specification for a Python Program Block
Nested Program Blocks (Python)
Localizing Output from Python Programs


Localizing Output from Python Programs

Python,Python,Python
localizing output,localizing output,localizing output

If you are interested in localizing output from Python programs, such as messages and pivot table strings, it is recommended to use the Python standard module gettext. Briefly, you create a directory containing compiled versions of translation (.mo) files--one for each desired language. Each file consists of pairs of strings--an untranslated string and the translated version of the string. In your Python program, you call an API to point to the location of this directory. You then call an API each time you need translated text, passing the untranslated text as a key.

• The gettext module provides implementations of functionality in the GNU gettext facility. Please consult the documentation for GNU gettext (http://www.gnu.org/software/gettext/) for details about creating the translation files.

• The gettext functions attempt to determine the language in which to return results by querying the LANGUAGE environment variable. As an aid to using gettext, PASW Statistics sets the LANGUAGE environment variable--accessed within Python programs and within implementation code for extension commands--to the current output language.

Compiled translation files should be stored in the following structure:

<dir>/<language>/LC_MESSAGES/<domain>.mo

• <dir> is the name of the top level directory where translation files are stored and is arbitrary.

• <language> is the identifier for a particular language. Identifiers for the languages supported by PASW Statistics are shown in the Language Identifiers table.

• <domain> is the name of the compiled translation files--the same name for all languages.

Distributing Localized Versions of Custom Dialogs and/or Extension Commands

If you are localizing output for a custom dialog or extension command that you intend to distribute to other users, then you should create an extension bundle to package your translation files with your custom components. Specifically, you add the directory containing your compiled translation files to the extension bundle during the creation of the bundle. When an end user installs the extension bundle, the directory containing the translation files is installed in the extensions/<extension bundle name> directory under the PASW Statistics installation location, and where <extension bundle name> is the name of the extension bundle with spaces replaced by underscores.

• If the SPSS_EXTENSIONS_PATH environment variable has been set, then the extensions directory (in extensions/<extension bundle name>) is replaced by the first writable directory in the environment variable.

• For information on creating extension bundles, see Working with Extension Bundles.

Example

You create an extension bundle named MY EXTENSION and include the directory po (a common name for the directory containing translation files), containing translation files for an extension command contained in the bundle. The following is an example of code for handling translations within your extension command. It does not, however, deal with the case where the SPSS_EXTENSIONS_PATH environment variable has been set.

import gettext
t = gettext.translation("MY_EXTENSION",fallback=True,
    localedir=spssaux.getSpssInstallDir().replace("\\", "/")+"/extensions/MY_EXTENSION/po")
spss.StartProcedure(t.ugettext("My Model Output"))

• You first import the standard module gettext, which provides Python's implementation of GNU gettext.

• The gettext.translation function returns a Translations instance, which is then used to retrieve translated strings. The first argument is the domain name, which must be the name used for the translation (.mo) files. fallback=True specifies that if a translation file for the current language is not found then simply return the original string when translated strings are requested. The argument localedir specifies the path to the directory containing the translation files. The spssaux.getSpssInstallDir function is used to get the path to the PASW Statistics installation directory.

• The spss.StartProcedure function signals the beginning of a block of output. The argument specifies the name that appears in the outline pane of the Viewer associated with the output. The argument is a string whose localized value is obtained by calling the ugettext method of the Translations object. The argument to ugettext is the untranslated string and the value returned from ugettext is a Unicode string.

Language Identifiers Collapse Hide details

Language Identifiers

de | German
en | English
es | Spanish
fr | French
it | Italian
ja | Japanese
ko | Korean
pl | Polish
ru | Russian
zh_CN | Simplified Chinese
zh_TW | Traditional Chinese

Related Topics

Working with Python Program Blocks
Basic Specification for a Python Program Block
Nested Program Blocks (Python)
Unicode Mode (Python)
spss.SetOutputLanguage Function (Python)


Python Syntax Rules

Python,Python,Python
syntax rules,syntax rules,syntax rules
file specifications,file specifications,file specifications

Within a Python program block, only statements and functions recognized by Python are allowed. Python syntax rules differ from PASW Statistics command syntax rules in a number of ways:

Python is case-sensitive. This includes variable names, function names, and pretty much anything else you can think of. A variable name of myvariable is not the same as MyVariable, and the function spss.GetVariableCount cannot be written as SPSS.getvariablecount.

Python uses UNIX-style path specifications, with forward slashes. This applies even for PASW Statistics command syntax generated within a Python program block. For example:

spss.Submit("GET FILE '/data/somedata.sav'.")

Alternatively, you can escape each backslash with another backslash, as in:

spss.Submit("GET FILE '\\data\\somedata.sav'.")

There is no command terminator in Python, and continuation lines come in two flavors:

• Implicit. Expressions enclosed in parentheses, square brackets, or curly braces can continue across multiple lines without any continuation character. The expression continues implicitly until the closing character for the expression.

• Explicit. All other expression require a backslash at the end of each line to explicitly denote continuation.

Line indentation indicates grouping of statements. Groups of statements contained in conditional processing and looping structures are identified by indentation, as is the body of a user-defined Python function. There is no statement or character that indicates the end of the structure. Instead, the indentation level of the statements defines the structure, as in:

for i in xrange(varcount):
  if spss.GetVariableMeasurementLevel(i)=="scale":
      ScaleVarList=ScaleVarList + " " + spss.GetVariableName(i)
  else:
     CatVarList=CatVarList + " " + spss.GetVariableName(i)
print CatVarList

Note: You should avoid the use of tab characters in Python code within BEGIN PROGRAM-END PROGRAM blocks. For line indentation, use spaces.


Working with Multiple Versions of PASW Statistics (Python)

Python,Python,Python
managing multiple versions,managing multiple versions,managing multiple versions

Multiple versions of the PASW Statistics-Python Integration Plug-in can be used on the same machine, each associated with a major version of PASW Statistics, such as 17.0 or 18.

Running Python Programs from Within PASW Statistics

• For versions 14.0 and 15.0, Python programs run from within PASW Statistics will automatically use the appropriate version of the plug-in.

• For versions 16.0 and higher, and by default, Python programs run from within the last installed version of PASW Statistics will automatically use the appropriate version of the plug-in. To run Python programs from within a different version of PASW Statistics, use the spss.SetDefaultPlugInVersion function to set the default to a different version (the setting persists across sessions). You can then run Python programs from within the other version. If you are attempting to change the default version from 16.0 to 17.0, additional configuration is required; please see the Notes below.

Running Python Programs from an External Python Process

When driving the PASW Statistics backend from a separate Python process, such as the Python interpreter or a Python IDE, the plug-in will drive the version of the PASW Statistics backend that matches the default plug-in version specified for that version of Python. Unless you change it, the default plug-in version for a given version of Python (such as Python 2.6) is the last one installed. You can view the default version using the spss.GetDefaultPlugInVersion function and you can change the default version using the spss.SetDefaultPlugInVersion function. The setting persists across sessions. If you are attempting to change the default version from 16.0 to 17.0 please see the Notes below.

Notes

• If you are using the spss.SetDefaultPlugInVersion function to change the default from version 16.0 to version 17.0, you should also manually modify the file SpssClient.pth located in the Python 2.5 site-packages directory. Change the order of entries in the file so that the first line is SpssClient170.

Windows. The site-packages directory is located in the Lib directory under the Python 2.5 installation directory—for example, C:\Python25\Lib\site-packages.

Mac OS X 10.4 (Tiger). The site-packages directory is located at /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages.

Mac OS X 10.5 (Leopard). The site-packages directory is typically located at /Library/Python/2.5/site-packages.

Linux. The site-packages directory is located in the /lib/python2.5/ directory under the Python 2.5 installation directory—for example, /usr/local/python25/lib/python2.5/site-packages.

• Beginning with version 15.0, a restructuring of the PASW Statistics-Python Integration Plug-in installation directory and changes to some class structures may affect Python code written for an earlier version and used with a 15.0 or higher version. Specifically, the type of an object, as given by the Python type function, may return a different result. For example:

cur=spss.Cursor()

print type(cur)

will return spss.cursors.Cursor when run with version 14.0, spss.spss150.cursors.ReadCursor when run with version 15.0, and spss.cursors.ReadCursor when run with a version higher than 15.0.

Related Topics

spss.GetDefaultPlugInVersion Function (Python)
spss.SetDefaultPlugInVersion Function (Python)


Python and PASW Statistics Working Directories

When running Python code that is within a BEGIN PROGRAM-END PROGRAM block and that contains relative paths in file specifications, you will need to understand the notions of working directories, both for Python and PASW Statistics. You may want to avoid the subtleties involved with working directories by avoiding the use of relative paths and using full paths for file specifications.

• Relative paths used for file specifications in command syntax submitted from Python (with spss.Submit) are relative to the PASW Statistics backend working directory. The PASW Statistics backend working directory determines the full path used for file specifications in command syntax in the case where only a relative path is provided. It can be changed with the CD command, but is not affected by actions involving the file open dialogs, and it is private to the PASW Statistics backend.

• Relative paths used when reading and writing files with built-in Python functions--such as open--are relative to the Python current working directory. You can get the Python current working directory from the getcwd function in the os module.


Running PASW Statistics from an External Python Process

You can run Python programs utilizing the spss module from any external Python process, such as a Python IDE or the Python interpreter. In this mode, the Python program starts up a new instance of the PASW Statistics processor without an associated instance of the PASW Statistics client. You can use this mode to debug your Python programs using the Python IDE of your choice.

To drive the PASW Statistics processor from a Python IDE, simply include an import spss statement in the IDE's code window. You can follow the import statement with calls to any of the functions in the spss module, just like with program blocks in command syntax jobs, but you don't need to wrap your Python code in BEGIN PROGRAM-END PROGRAM statements.

Mac Users

To drive the PASW Statistics processor from an external Python process on Mac, launch the Programmability External Python Process application, installed with the PASW Statistics-Python Integration Plug-in and located in the directory where PASW Statistics is installed. The application launches IDLE (the default IDE provided with Python) and sets environment variables necessary for driving PASW Statistics.


Python Functions and Classes

The PASW Statistics-Python package contains functions and classes that facilitate the process of using Python programming features with PASW Statistics, including those that:

Build and run command syntax Collapse Hide details

Build and run command syntax

• spss.Submit

Get information about data files in the current PASW Statistics session Collapse Hide details

Get information about data files in the current PASW Statistics session

• spss.GetCaseCount

• spss.GetDataFileAttributes

• spss.GetFileHandles

• spss.GetMultiResponseSet

• spss.GetSplitVariableNames

• spss.GetVarAttributes

• spss.GetVariableCount

• spss.GetVariableFormat

• spss.GetVariableLabel

• spss.GetVariableMeasurementLevel

• spss.GetVariableName

• spss.GetVariableType

• spss.GetVarMissingValues

• spss.GetWeightVar

Get data, add new variables, and append cases to the active dataset Collapse Hide details

Get data, add new variables, and append cases to the active dataset

• spss.Cursor

Access and manage multiple datasets Collapse Hide details

Access and manage multiple datasets

• spss.ActiveDataset

• spss.Dataset

• spss.GetDatasets

• spss.GetFileHandles

• spss.IsActive

• spss.SetActive

Get output results Collapse Hide details

Get output results

• spss.EvaluateXPath

• spss.GetXmlUtf16

Create custom pivot tables and text blocks Collapse Hide details

Create custom pivot tables and text blocks

• spss.BasePivotTable

• spss.TextBlock

Create macro variables Collapse Hide details

Create macro variables

• spss.SetMacroValue

Get error information Collapse Hide details

Get error information

• spss.GetLastErrorLevel

• spss.GetLastErrorMessage

Manage multiple versions of the PASW Statistics-Python Integration Plug-in Collapse Hide details

Manage multiple versions of the PASW Statistics-Python Integration Plug-in

• spss.GetDefaultPlugInVersion

• spss.SetDefaultPlugInVersion

• spss.ShowInstalledPlugInVersions

Locale and Output Language Settings Collapse Hide details

Locale and Output Language Settings

• spss.GetSPSSLocale

• spss.SetOutputLanguage

Brief descriptions of each function are available using the Python help function, as in:

BEGIN PROGRAM.
import spss
help(spss.Submit)
END PROGRAM.

Related Topics

Introduction to Python Programs


spss.ActiveDataset Function (Python)

ActiveDataset,ActiveDataset,ActiveDataset
active dataset,active dataset,active dataset
name,name,name

spss.ActiveDataset(). Returns the name of the active dataset.

• If the active dataset is unnamed, '*' is returned.

Example

import spss
name = spss.ActiveDataset()

Related Topics

spss.IsActive Function (Python)
spss.SetActive Function (Python)


spss.AddProcedureFootnotes Function (Python)

AddProcedureFootnotes,AddProcedureFootnotes,AddProcedureFootnotes

spss.AddProcedureFootnotes(footnote). Adds a footnote to all tables generated by a procedure. The argument footnote is a string specifying the footnote.

• The AddProcedureFootnotes function can only be used within a StartProcedure-EndProcedure block or within a custom procedure class based on the spss.BaseProcedure class.

Example

import spss
spss.StartProcedure("mycompany.com.demoProc")
spss.AddProcedureFootnotes("A footnote")
table = spss.BasePivotTable("Table Title",
                            "OMS table subtype")
table.SimplePivotTable(cells = [1,2,3,4])
spss.EndProcedure()

Related Topics

spss.BaseProcedure Class (Python)
spss.StartProcedure Function (Python)
CategoryFootnotes Method (Python)
DimensionFootnotes Method (Python)
Footnotes Method (Python)
TitleFootnotes Method (Python)


spss.BasePivotTable Class (Python)

BasePivotTable class,BasePivotTable class,BasePivotTable class
pivot tables,pivot tables,pivot tables

spss.BasePivotTable(title,templateName,outline,isSplit,caption). Provides the ability to create custom pivot tables that can be displayed in the PASW Statistics Viewer or written to an external file using the PASW Statistics Output Management System.

• The argument title is a string that specifies the title that appears with the table. Each table associated with a set of output (as specified in a StartProcedure-EndProcedure block) should have a unique title. Multiple tables within a given procedure can, however, have the same value of the title argument as long as they have different values of the outline argument.

• The argument templateName is a string that specifies the OMS (Output Management System) table subtype for this table. It must begin with a letter and have a maximum of 64 characters. Unless you are routing this pivot table with OMS or need to write an autoscript for this table, you will not need to keep track of this value, although you do have to provide a value that meets the stated requirements.

• The optional argument outline is a string that specifies a title, for the pivot table, that appears in the outline pane of the Viewer. The item for the table itself will be placed one level deeper than the item for the outline title. If omitted, the Viewer item for the table will be placed one level deeper than the root item for the output containing the table.

• The optional Boolean argument isSplit specifies whether to enable split processing when creating pivot tables from data that have splits. By default, split processing is enabled. To disable split processing for pivot tables, specify isSplit=False. If you are creating a pivot table from data that has splits and you want separate results displayed for each split group, you will want to make use of the spss.SplitChange function. In the absence of calls to spss.SplitChange, isSplit has no effect.

• The optional argument caption is a string that specifies a table caption.

An instance of the BasePivotTable class can only be used within a StartProcedure-EndProcedure block or within a custom procedure class based on the spss.BaseProcedure class. For an example of creating a pivot table using spss.StartProcedure-spss.EndProcedure, see Creating Pivot Tables with the SimplePivotTable Method (Python). For an example of creating a pivot table using a class based on the spss.BaseProcedure class, see spss.BaseProcedure Class (Python).

Figure shows the basic structural components of a pivot table. Pivot tables consists of one or more dimensions, each of which can be of the type row, column, or layer. In this example, there is one dimension of each type. Each dimension contains a set of categories that label the elements of the dimension--for instance, row labels for a row dimension. A layer dimension allows you to display a separate two-dimensional table for each category in the layered dimension--for example, a separate table for each value of minority classification, as shown here. When layers are present, the pivot table can be thought of as stacked in layers, with only the top layer visible.

Each cell in the table can be specified by a combination of category values. In the example shown here, the indicated cell is specified by a category value of Male for the Gender dimension, Custodial for the Employment Category dimension, and No for the Minority Classification dimension.

Pivot table structure

Related Topics

spss.Procedure Class (Python)
spss.StartProcedure Function (Python)
spss.TextBlock Class (Python)
General Approach to Creating Pivot Tables (Python)
Creating Pivot Tables with the SimplePivotTable Method (Python)


Creating Pivot Tables with the SimplePivotTable Method (Python)

BasePivotTable class,BasePivotTable class,BasePivotTable class
SimplePivotTable method,SimplePivotTable method,SimplePivotTable method
SimplePivotTable method,SimplePivotTable method,SimplePivotTable method

For creating a pivot table with a single row dimension and a single column dimension, the BasePivotTable class provides the SimplePivotTable method. The arguments to the method provide the dimensions, categories, and cell values. No other methods are necessary in order to create the table structure and populate the cells. If you require more functionality than the SimplePivotTable method provides, there are a variety of methods to create the table structure and populate the cells. See the topic General Approach to Creating Pivot Tables (Python) for more information.

Example

import spss
spss.StartProcedure("mycompany.com.demoProc")
table = spss.BasePivotTable("Table Title",
                            "OMS table subtype")

table.SimplePivotTable(rowdim = "row dimension",
                       rowlabels = ["first row","second row"],
                       coldim = "column dimension",
                       collabels = ["first column","second column"],
                       cells = [11,12,21,22])
spss.EndProcedure()

Result

Simple pivot table

• This example shows how to generate a pivot table within a spss.StartProcedure-spss.EndProcedure block. The argument to the StartProcedure function specifies a name to associate with the output. This is the name that appears in the outline pane of the Viewer associated with the output--in this case, mycompany.com.demoProc. It is also the command name associated with this output when routing output with OMS, as well as the name associated with this output for use with autoscripts.

Note: In order that names associated with output do not conflict with names of existing PASW Statistics commands (when working with OMS or autoscripts), it is recommended that they have the form yourcompanyname.com.procedurename. See the topic spss.StartProcedure Function (Python) for more information.

• You create a pivot table by first creating an instance of the BasePivotTable class and storing it to a variable--in this case, the variable table.

• The SimplePivotTable method of the BasePivotTable instance is called to create the structure of the table and populate its cells. Row and column labels and cell values can be specified as character strings or numeric values. They can also be specified as a CellText object. CellText objects allow you to specify that category labels be treated as variable names or variable values, or that cell values be displayed in one of the numeric formats used in PASW Statistics pivot tables, such as the format for a mean. When you specify a category as a variable name or variable value, pivot table display options such as display variable labels or display value labels are honored.

• Numeric values specified for cell values, row labels, or column labels, are displayed using the default format for the pivot table. Instances of the BasePivotTable class have an implicit default format of GeneralStat. You can change the default format using the SetDefaultFormatSpec method.

• spss.EndProcedure marks the end of output creation.

Related Topics

SimplePivotTable Method (Python)


General Approach to Creating Pivot Tables (Python)

The BasePivotTable class provides a variety of methods for creating pivot tables that cannot be created with the SimplePivotTable method. The basic steps for creating a pivot table are:

Create an instance of the BasePivotTable class.

Add dimensions.

Define categories.

Set cell values.

Once a cell value has been set, you can access its value. This is convenient for cell values that depend on the value of another cell. See the topic Using Cell Values in Expressions (Python) for more information.

Related Topics

Step 1: Adding Dimensions (Python)
Step 2: Defining Categories (Python)
Step 3: Setting Cell Values (Python)


Step 1: Adding Dimensions (Python)

BasePivotTable class,BasePivotTable class,BasePivotTable class
Append method,Append method,Append method
Insert method,Insert method,Insert method
Append method,Append method,Append method
Insert method,Insert method,Insert method

You add dimensions to a pivot table with the Append or Insert method.

Example: Using the Append Method

table = spss.BasePivotTable("Table Title",
                            "OMS table subtype")
coldim=table.Append(spss.Dimension.Place.column,"coldim")
rowdim1=table.Append(spss.Dimension.Place.row,"rowdim-1")
rowdim2=table.Append(spss.Dimension.Place.row,"rowdim-2")

• The first argument to the Append method specifies the type of dimension, using one member from a set of built-in object properties: spss.Dimension.Place.row for a row dimension, spss.Dimension.Place.column for a column dimension, and spss.Dimension.Place.layer for a layer dimension.

• The second argument to Append is a string that specifies the name used to label this dimension in the displayed table.

• Although not required to append a dimension, it's good practice to store a reference to the newly created dimension object in a variable. For instance, the variable rowdim1 holds a reference to the object for the row dimension named rowdim-1. Depending on which approach you use for setting categories, you may need this object reference.

Resulting table structure

The order in which the dimensions are appended determines how they are displayed in the table. Each newly appended dimension of a particular type (row, column, or layer) becomes the current innermost dimension in the displayed table. In the example above, rowdim-2 is the innermost row dimension since it is the last one to be appended. Had rowdim-2 been appended first, followed by rowdim-1, rowdim-1 would be the innermost dimension.

Note: Generation of the resulting table requires more code than is shown here.

Example: Using the Insert Method

table = spss.BasePivotTable("Table Title",
                            "OMS table subtype")
rowdim1=table.Append(spss.Dimension.Place.row,"rowdim-1")
rowdim2=table.Append(spss.Dimension.Place.row,"rowdim-2")
rowdim3=table.Insert(2,spss.Dimension.Place.row,"rowdim-3")
coldim=table.Append(spss.Dimension.Place.column,"coldim")

• The first argument to the Insert method specifies the position within the dimensions of that type (row, column, or layer). The first position has index 1 (unlike typical Python indexing that starts with 0) and defines the innermost dimension of that type in the displayed table. Successive integers specify the next innermost dimension and so on. In the current example, rowdim-3 is inserted at position 2 and rowdim-1 is moved from position 2 to position 3.

• The second argument to Insert specifies the type of dimension, using one member from a set of built-in object properties: spss.Dimension.Place.row for a row dimension, spss.Dimension.Place.column for a column dimension, and spss.Dimension.Place.layer for a layer dimension.

• The third argument to Insert is a string that specifies the name used to label this dimension in the displayed table.

• Although not required to insert a dimension, it is good practice to store a reference to the newly created dimension object to a variable. For instance, the variable rowdim3 holds a reference to the object for the row dimension named rowdim-3. Depending on which approach you use for setting categories, you may need this object reference.

Resulting table structure

Note: Generation of the resulting table requires more code than is shown here.

Related Topics

General Approach to Creating Pivot Tables (Python)
Step 2: Defining Categories (Python)
Step 3: Setting Cell Values (Python)
Append Method (Python)
Insert Method (Python)


Step 2: Defining Categories (Python)

BasePivotTable class,BasePivotTable class,BasePivotTable class
SetCategories method,SetCategories method,SetCategories method
SetCategories method,SetCategories method,SetCategories method

There are two ways to define categories for each dimension: explicitly, using the SetCategories method, or implicitly when setting values. The explicit method is shown here. The implicit method is shown in Step 3: Setting Cell Values (Python).

Example

from spss import CellText
table = spss.BasePivotTable("Table Title",
                            "OMS table subtype")

coldim=table.Append(spss.Dimension.Place.column,"coldim")
rowdim1=table.Append(spss.Dimension.Place.row,"rowdim-1")
rowdim2=table.Append(spss.Dimension.Place.row,"rowdim-2")

cat1=CellText.String("A1")
cat2=CellText.String("B1")
cat3=CellText.String("A2")
cat4=CellText.String("B2")
cat5=CellText.String("C")
cat6=CellText.String("D")
cat7=CellText.String("E")

table.SetCategories(rowdim1,[cat1,cat2])
table.SetCategories(rowdim2,[cat3,cat4])
table.SetCategories(coldim,[cat5,cat6,cat7])

• The statement from spss import CellText allows you to omit the spss prefix when specifying CellText objects (discussed below), once you have imported the spss module.

• You set categories after you add dimensions, so the SetCategories method calls follow the Append or Insert method calls.

• The first argument to SetCategories is an object reference to the dimension for which the categories are being defined. This underscores the need to save references to the dimensions you create with Append or Insert, as discussed in the previous topic.

• The second argument to SetCategories is a single category or a sequence of unique category values, each expressed as a CellText object (one of CellText.Number, CellText.String, CellText.VarName, or CellText.VarValue). When you specify a category as a variable name or variable value, pivot table display options such as display variable labels or display value labels are honored. In the present example, we use string objects whose single argument is the string specifying the category.

• It is a good practice to assign variables to the CellText objects representing the category names, since each category will often need to be referenced more than once when setting cell values.

Resulting table structure

Note: Generation of the resulting table requires more code than is shown here.

Related Topics

SetCategories Method (Python)
General Approach to Creating Pivot Tables (Python)
Step 1: Adding Dimensions (Python)
Step 3: Setting Cell Values (Python)


Step 3: Setting Cell Values (Python)

BasePivotTable class,BasePivotTable class,BasePivotTable class
SetCellsByColumn method,SetCellsByColumn method,SetCellsByColumn method
SetCellsByRow method,SetCellsByRow method,SetCellsByRow method
SetCellsByColumn method,SetCellsByColumn method,SetCellsByColumn method
SetCellsByRow method,SetCellsByRow method,SetCellsByRow method

There are two primary methods for setting cell values: setting values one cell at a time by specifying the categories that define the cell, or using the SetCellsByRow or SetCellsByColumn method.

Example: Specifying Cells by Their Category Values

This example reproduces the table created in the SimplePivotTable example.

from spss import CellText
table = spss.BasePivotTable("Table Title",
                            "OMS table subtype")

table.Append(spss.Dimension.Place.row,"row dimension")
table.Append(spss.Dimension.Place.column,"column dimension")

row_cat1 = CellText.String("first row")
row_cat2 = CellText.String("second row")
col_cat1 = CellText.String("first column")
col_cat2 = CellText.String("second column")

table[(row_cat1,col_cat1)] = CellText.Number(11)
table[(row_cat1,col_cat2)] = CellText.Number(12)
table[(row_cat2,col_cat1)] = CellText.Number(21)
table[(row_cat2,col_cat2)] = CellText.Number(22)

• The Append method is used to add a row dimension and then a column dimension to the structure of the table. The table specified in this example has one row dimension and one column dimension. Notice that references to the dimension objects created by the Append method are not saved to variables, contrary to the recommendations in the topic on adding dimensions. When setting cells using the current approach, these object references are not needed.

• For convenience, variables consisting of CellText objects are created for each of the categories in the two dimensions.

• Cells are specified by their category values in each dimension. In the tuple (or list) that specifies the category values--for example, (row_cat1,col_cat1)--the first element corresponds to the first appended dimension (what we have named "row dimension") and the second element to the second appended dimension (what we have named "column dimension"). The tuple (row_cat1,col_cat1) then specifies the cell whose "row dimension" category is "first row" and "column dimension" category is "first column."

• You may notice that the example does not make use of the SetCategories method to define the row and column dimension category values. When you assign cell values in the manner done here--table[(category1,category2)]--the values provided to specify the categories for a given cell are used by the BasePivotTable object to build the set of categories for the table. Values provided in the first element of the tuple (or list) become the categories in the dimension created by the first method call to Append or Insert. Values in the second element become the categories in the dimension created by the second method call to Append or Insert, and so on. Within a given dimension, the specified category values must be unique. The order of the categories, as displayed in the table, is the order in which they are created from table[(category1,category2)]. In the example shown above, the row categories will be displayed in the order "first row," "second row."

• Cell values must be specified as CellText objects (one of CellText.Number, CellText.String, CellText.VarName, or CellText.VarValue).

• In this example, Number objects are used to specify numeric values for the cells. Values will be formatted using the table's default format. Instances of the BasePivotTable class have an implicit default format of GeneralStat. You can change the default format using the SetDefaultFormatSpec method, or you can override the default by explicitly specifying the format, as in: CellText.Number(22,spss.FormatSpec.Correlation). See the topic Number Class (Python) for more information.

Example: Setting Cell Values by Row or Column

The SetCellsByRow and SetCellsByColumn methods allow you to set cell values for entire rows or columns with one method call. To illustrate the approach, we will use the SetCellsByRow method to reproduce the table created in the SimplePivotTable example. It is a simple matter to rewrite the example to set cells by column.

Note: You can only use the SetCellsByRow method with pivot tables that have one column dimension and you can only use the SetCellsByColumn method with pivot tables that have one row dimension.

from spss import CellText
table = spss.BasePivotTable("Table Title",
                            "OMS table subtype")

rowdim = table.Append(spss.Dimension.Place.row,"row dimension")
coldim = table.Append(spss.Dimension.Place.column,"column dimension")

row_cat1 = CellText.String("first row")
row_cat2 = CellText.String("second row")
col_cat1 = CellText.String("first column")
col_cat2 = CellText.String("second column")

table.SetCategories(rowdim,[row_cat1,row_cat2])
table.SetCategories(coldim,[col_cat1,col_cat2])

table.SetCellsByRow(row_cat1,[CellText.Number(11),
                              CellText.Number(12)])
table.SetCellsByRow(row_cat2,[CellText.Number(21),
                              CellText.Number(22)])

• The SetCellsByRow method is called for each of the two categories in the row dimension.

• The first argument to the SetCellsByRow method is the row category for which values are to be set. The argument must be specified as a CellText object (one of CellText.Number, CellText.String, CellText.VarName, or CellText.VarValue). When setting row values for a pivot table with multiple row dimensions, you specify a list of category values for the first argument to SetCellsByRow, where each element in the list is a category value for a different row dimension.

• The second argument to the SetCellsByRow method is a list or tuple of CellText objects (one of CellText.Number, CellText.String, CellText.VarName, or CellText.VarValue) that specify the elements of the row, one element for each column category in the single column dimension. The first element in the list or tuple will populate the first column category (in this case, col_cat1), the second will populate the second column category, and so on.

• In this example, Number objects are used to specify numeric values for the cells. Values will be formatted using the table's default format. Instances of the BasePivotTable class have an implicit default format of GeneralStat. You can change the default format using the SetDefaultFormatSpec method, or you can override the default by explicitly specifying the format, as in: CellText.Number(22,spss.FormatSpec.Correlation). See the topic Number Class (Python) for more information.

Related Topics

SetCellsByColumn Method (Python)
SetCellsByRow Method (Python)
General Approach to Creating Pivot Tables (Python)
Step 1: Adding Dimensions (Python)
Step 2: Defining Categories (Python)


Using Cell Values in Expressions (Python)

Once a cell's value has been set, it can be accessed and used to specify the value for another cell. Cell values are stored as CellText.Number or CellText.String objects. To use a cell value in an expression, you obtain a string or numeric representation of the value using the toString or toNumber method.

Example: Numeric Representations of Cell Values

from spss import CellText
table = spss.BasePivotTable("Table Title",
                            "OMS table subtype")

table.Append(spss.Dimension.Place.row,"row dimension")
table.Append(spss.Dimension.Place.column,"column dimension")

row_cat1 = CellText.String("first row")
row_cat2 = CellText.String("second row")
col_cat1 = CellText.String("first column")
col_cat2 = CellText.String("second column")

table[(row_cat1,col_cat1)] = CellText.Number(11)
cellValue = table[(row_cat1,col_cat1)].toNumber()
table[(row_cat2,col_cat2)] = CellText.Number(2*cellValue)

• The toNumber method is used to obtain a numeric representation of the cell with category values ("first row","first column"). The numeric value is stored in the variable cellValue and used to specify the value of another cell.

• Character representations of numeric values stored as CellText.String objects, such as CellText.String("11"), are converted to a numeric value by the toNumber method.

Example: String Representations of Cell Values

from spss import CellText
table = spss.BasePivotTable("Table Title",
                            "OMS table subtype")

table.Append(spss.Dimension.Place.row,"row dimension")
table.Append(spss.Dimension.Place.column,"column dimension")

row_cat1 = CellText.String("first row")
row_cat2 = CellText.String("second row")
col_cat1 = CellText.String("first column")
col_cat2 = CellText.String("second column")

table[(row_cat1,col_cat1)] = CellText.String("abc")
cellValue = table[(row_cat1,col_cat1)].toString()
table[(row_cat2,col_cat2)] = CellText.String(cellValue + "d")

• The toString method is used to obtain a string representation of the cell with category values ("first row","first column"). The string value is stored in the variable cellValue and used to specify the value of another cell.

• Numeric values stored as CellText.Number objects are converted to a string value by the toString method.

Related Topics

toNumber Method (Python)
toString Method (Python)


spss.BasePivotTable Methods (Python)

The BasePivotTable class has methods that allow you to build complex pivot tables. If you only need to create a pivot table with a single row and a single column dimension then consider using the SimplePivotTable method.

Related Topics

Creating Pivot Tables with the SimplePivotTable Method (Python)
General Approach to Creating Pivot Tables (Python)


Append Method (Python)

BasePivotTable class,BasePivotTable class,BasePivotTable class
Append method,Append method,Append method
Append method (BasePivotTable class),Append method (BasePivotTable class),Append method (BasePivotTable class)

.Append(place,dimName,hideName, hideLabels). Appends row, column, and layer dimensions to a pivot table. You use this method, or the Insert method, to create the dimensions associated with a custom pivot table. The argument place specifies the type of dimension: spss.Dimension.Place.row for a row dimension, spss.Dimension.Place.column for a column dimension, and spss.Dimension.Place.layer for a layer dimension. The argument dimName is a string that specifies the name used to label this dimension in the displayed table. Each dimension must have a unique name. The argument hideName specifies whether the dimension name is hidden--by default, it is displayed. Use hideName=True to hide the name. The argument hideLabels specifies whether category labels for this dimension are hidden--by default, they are displayed. Use hideLabels=True to hide category labels.

• The order in which dimensions are appended affects how they are displayed in the resulting table. Each newly appended dimension of a particular type (row, column, or layer) becomes the current innermost dimension in the displayed table, as shown in the example below.

• The order in which dimensions are created (with the Append or Insert method) determines the order in which categories should be specified when providing the dimension coordinates for a particular cell (used when Setting Cell Values or adding Footnotes). For example, when specifying coordinates using an expression such as (category1,category2), category1 refers to the dimension created by the first call to Append or Insert, and category2 refers to the dimension created by the second call to Append or Insert.

Example

table = spss.BasePivotTable("Table Title",
                            "OMS table subtype")
coldim=table.Append(spss.Dimension.Place.column,"coldim")
rowdim1=table.Append(spss.Dimension.Place.row,"rowdim-1")
rowdim2=table.Append(spss.Dimension.Place.row,"rowdim-2")
Resulting table structure

Examples of using the Append method are most easily understood in the context of going through the steps to create a pivot table. See the topic General Approach to Creating Pivot Tables (Python) for more information.

Related Topics

Step 1: Adding Dimensions (Python)
Insert Method (Python)


Caption Method (Python)

BasePivotTable class,BasePivotTable class,BasePivotTable class
Caption method,Caption method,Caption method
Caption method,Caption method,Caption method

.Caption(caption). Adds a caption to the pivot table. The argument caption is a string specifying the caption.

Example

table = spss.BasePivotTable("Table Title",
                            "OMS table subtype")
table.Caption("A sample caption")


CategoryFootnotes Method (Python)

BasePivotTable class,BasePivotTable class,BasePivotTable class
CategoryFootnotes method,CategoryFootnotes method,CategoryFootnotes method
CategoryFootnotes method,CategoryFootnotes method,CategoryFootnotes method

.CategoryFootnotes(dimPlace,dimName,category,footnote). Used to add a footnote to a specified category.

• The argument dimPlace specifies the dimension type associated with the category, using one member from a set of built-in object properties: spss.Dimension.Place.row for a row dimension, spss.Dimension.Place.column for a column dimension, and spss.Dimension.Place.layer for a layer dimension.

• The argument dimName is the string that specifies the dimension name associated with the category. This is the name specified when the dimension was created by the Append or Insert method.

• The argument category specifies the category and must be a CellText object (one of CellText.Number, CellText.String, CellText.VarName, or CellText.VarValue).

• The argument footnote is a string specifying the footnote.

Example

from spss import CellText
table = spss.BasePivotTable("Table Title",
                            "OMS table subtype")

table.Append(spss.Dimension.Place.row,"row dimension")
table.Append(spss.Dimension.Place.column,"column dimension")

row_cat1 = CellText.String("first row")
row_cat2 = CellText.String("second row")
col_cat1 = CellText.String("first column")
col_cat2 = CellText.String("second column")

table.CategoryFootnotes(spss.Dimension.Place.row,"row dimension",
                        row_cat1,"A category footnote")

Related Topics

spss.AddProcedureFootnotes Function (Python)
DimensionFootnotes Method (Python)
Footnotes Method (Python)
TitleFootnotes Method (Python)


DimensionFootnotes Method (Python)

BasePivotTable class,BasePivotTable class,BasePivotTable class
DimensionFootnotes method,DimensionFootnotes method,DimensionFootnotes method
DimensionFootnotes method,DimensionFootnotes method,DimensionFootnotes method

.DimensionFootnotes(dimPlace,dimName,footnote). Used to add a footnote to a dimension.

• The argument dimPlace specifies the type of dimension, using one member from a set of built-in object properties: spss.Dimension.Place.row for a row dimension, spss.Dimension.Place.column for a column dimension, and spss.Dimension.Place.layer for a layer dimension.

• The argument dimName is the string that specifies the name given to this dimension when it was created by the Append or Insert method.

• The argument footnote is a string specifying the footnote.

Example

table = spss.BasePivotTable("Table Title",
                            "OMS table subtype")

table.Append(spss.Dimension.Place.row,"row dimension")
table.Append(spss.Dimension.Place.column,"column dimension")
table.DimensionFootnotes(spss.Dimension.Place.column,
                         "column dimension","A dimension footnote")

Related Topics

Append Method (Python)
Insert Method (Python)
spss.AddProcedureFootnotes Function (Python)
CategoryFootnotes Method (Python)
Footnotes Method (Python)
TitleFootnotes Method (Python)


Footnotes Method (Python)

BasePivotTable class,BasePivotTable class,BasePivotTable class
Footnotes method,Footnotes method,Footnotes method
Footnotes method,Footnotes method,Footnotes method

.Footnotes(categories,footnote). Used to add a footnote to a table cell. The argument categories is a list or tuple of categories specifying the cell for which a footnote is to be added. Each element in the list or tuple must be a CellText object (one of CellText.Number, CellText.String, CellText.VarName, or CellText.VarValue). The argument footnote is a string specifying the footnote.

Example

table = spss.BasePivotTable("Table Title",
                            "OMS table subtype")

rowdim=table.Append(spss.Dimension.Place.row,"rowdim")
coldim=table.Append(spss.Dimension.Place.column,"coldim")

table.SetCategories(rowdim,spss.CellText.String("row1"))
table.SetCategories(coldim,spss.CellText.String("column1"))

table[(spss.CellText.String("row1"),spss.CellText.String("column1"))] = \
       spss.CellText.String("cell value")
table.Footnotes((spss.CellText.String("row1"),
                 spss.CellText.String("column1")),
     "Footnote for the cell specified by the categories row1 and column1")

• The order in which dimensions are added to the table, either through a call to Append or to Insert, determines the order in which categories should be specified when providing the dimension coordinates for a particular cell. In the present example, the dimension rowdim is added first and coldim second, so the first element of (spss.CellText.String("row1"),spss.CellText.String("column1")) specifies a category of rowdim and the second element specifies a category of coldim.

Related Topics

spss.AddProcedureFootnotes Function (Python)
CategoryFootnotes Method (Python)
DimensionFootnotes Method (Python)
TitleFootnotes Method (Python)


GetDefaultFormatSpec Method (Python)

BasePivotTable class,BasePivotTable class,BasePivotTable class
GetDefaultFormatSpec method,GetDefaultFormatSpec method,GetDefaultFormatSpec method
GetDefaultFormatSpec method,GetDefaultFormatSpec method,GetDefaultFormatSpec method

.GetDefaultFormatSpec(). Returns the default format for CellText.Number objects. The returned value is a list with two elements. The first element is the integer code associated with the format. Codes and associated formats are listed in Table . For formats with codes 5 (Mean), 12 (Variable), 13 (StdDev), 14 (Difference), and 15 (Sum), the second element of the returned value is the index of the variable in the active dataset whose format is used to determine details of the resulting format. For all other formats, the second element is the Python data type None. You can set the default format with the SetDefaultFormatSpec method.

• Instances of the BasePivotTable class have an implicit default format of GeneralStat.

Example

table = spss.BasePivotTable("Table Title",
                            "OMS table subtype")
print "Default format: ", table.GetDefaultFormatSpec()

Related Topics

SetDefaultFormatSpec Method (Python)
Number Class (Python)


HideTitle Method (Python)

BasePivotTable class,BasePivotTable class,BasePivotTable class
HideTitle method,HideTitle method,HideTitle method
HideTitle method,HideTitle method,HideTitle method

.HideTitle(). Used to hide the title of a pivot table. By default, the title is shown.

Example

table = spss.BasePivotTable("Table Title",
                            "OMS table subtype")
table.HideTitle()


Insert Method (Python)

BasePivotTable class,BasePivotTable class,BasePivotTable class
Insert method,Insert method,Insert method
Insert method,Insert method,Insert method

.Insert(i,place,dimName,hideName, hideLabels). Inserts row, column, and layer dimensions into a pivot table. You use this method, or the Append method, to create the dimensions associated with a custom pivot table. The argument i specifies the position within the dimensions of that type (row, column, or layer). The first position has index 1 and defines the innermost dimension of that type in the displayed table. Successive integers specify the next innermost dimension and so on. The argument place specifies the type of dimension: spss.Dimension.Place.row for a row dimension, spss.Dimension.Place.column for a column dimension, and spss.Dimension.Place.layer for a layer dimension. The argument dimName is a string that specifies the name used to label this dimension in the displayed table. Each dimension must have a unique name. The argument hideName specifies whether the dimension name is hidden--by default, it is displayed. Use hideName=True to hide the name. The argument hideLabels specifies whether category labels for this dimension are hidden--by default, they are displayed. Use hideLabels=True to hide category labels.

• The argument i can take on the values 1, 2, ... , n+1 where n is the position of the outermost dimension (of the type specified by place) created by any previous calls to Append or Insert. For example, after appending two row dimensions, you can insert a row dimension at positions 1, 2, or 3. You cannot, however, insert a row dimension at position 3 if only one row dimension has been created.

• The order in which dimensions are created (with the Append or Insert method) determines the order in which categories should be specified when providing the dimension coordinates for a particular cell (used when Setting Cell Values or adding Footnotes). For example, when specifying coordinates using an expression such as (category1,category2), category1 refers to the dimension created by the first call to Append or Insert, and category2 refers to the dimension created by the second call to Append or Insert.

Note: The order in which categories should be specified is not determined by dimension positions as specified by the argument i.

Example

table = spss.BasePivotTable("Table Title",
                            "OMS table subtype")
rowdim1=table.Append(spss.Dimension.Place.row,"rowdim-1")
rowdim2=table.Append(spss.Dimension.Place.row,"rowdim-2")
rowdim3=table.Insert(2,spss.Dimension.Place.row,"rowdim-3")
coldim=table.Append(spss.Dimension.Place.column,"coldim")
Resulting table structure

Examples of using the Insert method are most easily understood in the context of going through the steps to create a pivot table. See the topic General Approach to Creating Pivot Tables (Python) for more information.

Related Topics

Step 1: Adding Dimensions (Python)
Append Method (Python)


SetCategories Method (Python)

BasePivotTable class,BasePivotTable class,BasePivotTable class
SetCategories method,SetCategories method,SetCategories method
SetCategories method,SetCategories method,SetCategories method

.SetCategories(dim,categories). Sets categories for the specified dimension. The argument dim is a reference to the dimension object for which categories are to be set. Dimensions are created with the Append or Insert method. The argument categories is a single value or a sequence of unique values, each of which is a CellText object (one of CellText.Number, CellText.String, CellText.VarName, or CellText.VarValue).

• In addition to defining category values for a specified dimension, SetCategories sets the pivot table object's value of the currently selected category for the specified dimension. In other words, calling SetCategories also sets a pointer to a category in the pivot table. When a sequence of values is provided, the currently selected category (for the specified dimension) is the last value in the sequence. For an example of using currently selected dimension categories to specify a cell, see the SetCell method.

• Once a category has been defined, a subsequent call to SetCategories (for that category) will set that category as the currently selected one for the specified dimension.

Example

table = spss.BasePivotTable("Table Title",
                            "OMS table subtype")

rowdim=table.Append(spss.Dimension.Place.row,"rowdim")
coldim=table.Append(spss.Dimension.Place.column,"coldim")

table.SetCategories(rowdim,[spss.CellText.String("row1"),
                            spss.CellText.String("row2")])
table.SetCategories(coldim,[spss.CellText.String("column1"),
                            spss.CellText.String("column2")])

Examples of using the SetCategories method are most easily understood in the context of going through the steps to create a pivot table. See the topic General Approach to Creating Pivot Tables (Python) for more information.

Related Topics

Step 2: Defining Categories (Python)


SetCell Method (Python)

BasePivotTable class,BasePivotTable class,BasePivotTable class
SetCell method,SetCell method,SetCell method
SetCell method,SetCell method,SetCell method

.SetCell(cell). Sets the value for the cell specified by the currently selected set of category values. The argument cell is the value, specified as a CellText object (one of CellText.Number, CellText.String, CellText.VarName, or CellText.VarValue). Category values are selected using the SetCategories method as shown in the following example.

Example

table = spss.BasePivotTable("Table Title",
                            "OMS table subtype")

rowdim = table.Append(spss.Dimension.Place.row,"rowdim")
coldim = table.Append(spss.Dimension.Place.column,"coldim")

# Define category values and set the currently selected set of
# category values to "row1" for rowdim and "column1" for coldim.
table.SetCategories(rowdim,spss.CellText.String("row1"))
table.SetCategories(coldim,spss.CellText.String("column1"))

# Set the value for the current cell specified by the currently
# selected set of category values.
table.SetCell(spss.CellText.Number(11))

table.SetCategories(rowdim,spss.CellText.String("row2"))
table.SetCategories(coldim,spss.CellText.String("column2"))

# Set the value for the current cell. Its category values are "row2"
# for rowdim and "column2" for coldim.
table.SetCell(spss.CellText.Number(22))

# Set the currently selected category to "row1" for rowdim.
table.SetCategories(rowdim,spss.CellText.String("row1"))

# Set the value for the current cell. Its category values are "row1"
# for rowdim and "column2" for coldim.

table.SetCell(spss.CellText.Number(12))

• In this example, Number objects are used to specify numeric values for the cells. Values will be formatted using the table's default format. Instances of the BasePivotTable class have an implicit default format of GeneralStat. You can change the default format using the SetDefaultFormatSpec method, or you can override the default by explicitly specifying the format, as in: CellText.Number(22,spss.FormatSpec.Correlation). See the topic Number Class (Python) for more information.

Resulting table


SetCellsByColumn Method (Python)

BasePivotTable class,BasePivotTable class,BasePivotTable class
SetCellsByColumn method,SetCellsByColumn method,SetCellsByColumn method
SetCellsByColumn method,SetCellsByColumn method,SetCellsByColumn method

.SetCellsByColumn(collabels,cells). Sets cell values for the column specified by a set of categories, one for each column dimension. The argument collabels specifies the set of categories that defines the column--a single value, or a list or tuple. The argument cells is a tuple or list of cell values. Column categories and cell values must be specified as CellText objects (one of CellText.Number, CellText.String, CellText.VarName, or CellText.VarValue).

• For tables with multiple column dimensions, the order of categories in the collabels argument is the order in which their respective dimensions were added (appended or inserted) to the table. For example, given two column dimensions coldim1 and coldim2 added in the order coldim1 and coldim2, the first element in collabels should be the category for coldim1 and the second the category for coldim2.

• You can only use the SetCellsByColumn method with pivot tables that have one row dimension.

Example

from spss import CellText
table = spss.BasePivotTable("Table Title",
                            "OMS table subtype")
rowdim=table.Append(spss.Dimension.Place.row,"rowdim")
coldim1=table.Append(spss.Dimension.Place.column,"coldim-1")
coldim2=table.Append(spss.Dimension.Place.column,"coldim-2")

cat1=CellText.String("coldim1:A")
cat2=CellText.String("coldim1:B")
cat3=CellText.String("coldim2:A")
cat4=CellText.String("coldim2:B")
cat5=CellText.String("C")
cat6=CellText.String("D")

table.SetCategories(coldim1,[cat1,cat2])
table.SetCategories(coldim2,[cat3,cat4])
table.SetCategories(rowdim,[cat5,cat6])

table.SetCellsByColumn((cat1,cat3),
                    [CellText.Number(11),
                     CellText.Number(21)])
table.SetCellsByColumn((cat1,cat4),
                    [CellText.Number(12),
                     CellText.Number(22)])
table.SetCellsByColumn((cat2,cat3),
                    [CellText.Number(13),
                     CellText.Number(23)])
table.SetCellsByColumn((cat2,cat4),
                    [CellText.Number(14),
                     CellText.Number(24)])

• In this example, Number objects are used to specify numeric values for the cells. Values will be formatted using the table's default format. Instances of the BasePivotTable class have an implicit default format of GeneralStat. You can change the default format using the SetDefaultFormatSpec method, or you can override the default by explicitly specifying the format, as in: CellText.Number(22,spss.FormatSpec.Correlation). See the topic Number Class (Python) for more information.

Resulting table structure

Examples of using the SetCellsByColumn method are most easily understood in the context of going through the steps to create a pivot table. See the topic General Approach to Creating Pivot Tables (Python) for more information.

Related Topics

Step 3: Setting Cell Values (Python)
SetCellsByRow Method (Python)


SetCellsByRow Method (Python)

BasePivotTable class,BasePivotTable class,BasePivotTable class
SetCellsByRow method,SetCellsByRow method,SetCellsByRow method
SetCellsByRow method,SetCellsByRow method,SetCellsByRow method

.SetCellsByRow(rowlabels,cells). Sets cell values for the row specified by a set of categories, one for each row dimension. The argument rowlabels specifies the set of categories that defines the row--a single value, or a list or tuple. The argument cells is a tuple or list of cell values. Row categories and cell values must be specified as CellText objects (one of CellText.Number, CellText.String, CellText.VarName, or CellText.VarValue).

• For tables with multiple row dimensions, the order of categories in the rowlabels argument is the order in which their respective dimensions were added (appended or inserted) to the table. For example, given two row dimensions rowdim1 and rowdim2 added in the order rowdim1 and rowdim2, the first element in rowlabels should be the category for rowdim1 and the second the category for rowdim2.

• You can only use the SetCellsByRow method with pivot tables that have one column dimension.

Example

from spss import CellText

table = spss.BasePivotTable("Table Title",
                            "OMS table subtype")

coldim=table.Append(spss.Dimension.Place.column,"coldim")
rowdim1=table.Append(spss.Dimension.Place.row,"rowdim-1")
rowdim2=table.Append(spss.Dimension.Place.row,"rowdim-2")

cat1=CellText.String("rowdim1:A")
cat2=CellText.String("rowdim1:B")
cat3=CellText.String("rowdim2:A")
cat4=CellText.String("rowdim2:B")
cat5=CellText.String("C")
cat6=CellText.String("D")

table.SetCategories(rowdim1,[cat1,cat2])
table.SetCategories(rowdim2,[cat3,cat4])
table.SetCategories(coldim,[cat5,cat6])

table.SetCellsByRow((cat1,cat3),
                    [CellText.Number(11),
                     CellText.Number(12)])
table.SetCellsByRow((cat1,cat4),
                    [CellText.Number(21),
                     CellText.Number(22)])
table.SetCellsByRow((cat2,cat3),
                    [CellText.Number(31),
                     CellText.Number(32)])
table.SetCellsByRow((cat2,cat4),
                    [CellText.Number(41),
                     CellText.Number(42)])

• In this example, Number objects are used to specify numeric values for the cells. Values will be formatted using the table's default format. Instances of the BasePivotTable class have an implicit default format of GeneralStat. You can change the default format using the SetDefaultFormatSpec method, or you can override the default by explicitly specifying the format, as in: CellText.Number(22,spss.FormatSpec.Correlation). See the topic Number Class (Python) for more information.

Resulting table

Examples of using the SetCellsByRow method are most easily understood in the context of going through the steps to create a pivot table. See the topic General Approach to Creating Pivot Tables (Python) for more information.

Related Topics

Step 3: Setting Cell Values (Python)
SetCellsByColumn Method (Python)


SetDefaultFormatSpec Method (Python)

BasePivotTable class,BasePivotTable class,BasePivotTable class
SetDefaultFormatSpec method,SetDefaultFormatSpec method,SetDefaultFormatSpec method
SetDefaultFormatSpec method,SetDefaultFormatSpec method,SetDefaultFormatSpec method

.SetDefaultFormatSpec(formatSpec,varIndex). Sets the default format for CellText.Number objects. The argument formatspec is of the form spss.FormatSpec.format where format is one of those listed in Table --for example, spss.FormatSpec.Mean. The argument varIndex is the index of a variable in the active dataset whose format is used to determine details of the resulting format. varIndex is only used for, and required by, the following subset of formats: Mean, Variable, StdDev, Difference, and Sum. Index values represent position in the active dataset, starting with 0 for the first variable in file order. The default format can be retrieved with the GetDefaultFormatSpec method.

• Instances of the BasePivotTable class have an implicit default format of GeneralStat.

Example

from spss import CellText
table = spss.BasePivotTable("Table Title",
                            "OMS table subtype")
table.SetDefaultFormatSpec(spss.FormatSpec.Mean,2)
table.Append(spss.Dimension.Place.row,"rowdim")
table.Append(spss.Dimension.Place.column,"coldim")

table[(CellText.String("row1"),CellText.String("col1"))] = \
       CellText.Number(2.37)
table[(CellText.String("row2"),CellText.String("col1"))] = \
       CellText.Number(4.34)

• The call to SetDefaultFormatSpec specifies that the format for mean values is to be used as the default, and that it will be based on the format for the variable with index value 2 in the active dataset. Subsequent instances of CellText.Number will use this default, so the cell values 2.37 and 4.34 will be formatted as mean values.

Related Topics

GetDefaultFormatSpec Method (Python)
Number Class (Python)


SimplePivotTable Method (Python)

BasePivotTable class,BasePivotTable class,BasePivotTable class
SimplePivotTable method,SimplePivotTable method,SimplePivotTable method
SimplePivotTable method,SimplePivotTable method,SimplePivotTable method

.SimplePivotTable(rowdim,rowlabels,coldim,collabels,cells). Creates a pivot table with one row dimension and one column dimension.

• rowdim. An optional label for the row dimension, given as a string. If empty, the row dimension label is hidden. If specified, it must be distinct from the value, if any, of the coldim argument.

• rowlabels. An optional list of items to label the rows. Each item must be unique and can be a character string, a numeric value, or a CellText object (one of CellText.Number, CellText.String, CellText.VarName, or CellText.VarValue). If provided, the length of this list determines the number of rows in the table. If omitted, the number of rows is equal to the number of elements in the argument cells.

• coldim. An optional label for the column dimension, given as a string. If empty, the column dimension label is hidden. If specified, it must be distinct from the value, if any, of the rowdim argument.

• collabels. An optional list of items to label the columns. Each item must be unique and can be a character string, a numeric value, or a CellText object (one of CellText.Number, CellText.String, CellText.VarName, or CellText.VarValue). If provided, the length of this list determines the number of columns in the table. If omitted, the number of columns is equal to the length of the first element of cells. If cells is one-dimensional, this implies a table with one column and as many rows as there are elements in cells. See the examples below for the case where cells is two-dimensional and collabels is omitted.

• cells. This argument specifies the values for the cells of the pivot table. It consists of a one- or two-dimensional sequence of items that can be indexed as cells[i] or cells[i][j]. For example, [1,2,3,4] is a one-dimensional sequence, and [[1,2],[3,4]] is a two-dimensional sequence. Each element in cells can be a character string, a numeric value, a CellText object (one of CellText.Number, CellText.String, CellText.VarName, or CellText.VarValue), a Python time.struct_time object, or a Python datetime.datetime object. Examples showing how the rows and columns of the pivot table are populated from cells are provided below.

• The number of elements in cells must equal the product of the number of rows and the number of columns.

• Elements in the pivot table are populated in row-wise fashion from the elements of cells. For example, if you specify a table with two rows and two columns and provide cells=[1,2,3,4], the first row will consist of the first two elements and the second row will consist of the last two elements.

• Numeric values specified in cells, rowlabels, or collabels will be converted to CellText.Number objects with a format given by the default. The default format can be set with the SetDefaultFormatSpec method and retrieved with the GetDefaultFormatSpec method. Instances of the BasePivotTable class have an implicit default format of GeneralStat.

• String values specified in cells, rowlabels, or collabels will be converted to CellText.String objects.

• When specifying cell values with Python time.struct_time or datetime.datetime objects, the value will be displayed in seconds--specifically, the number of seconds from October 14, 1582. You can change the format of a cell to a datetime format using the SetNumericFormatAt method (Python) Python Scripting method. This requires embedding Python Scripting code within your Python program.

Example: Creating a Table with One Column

import spss
spss.StartProcedure("mycompany.com.demoProc")

table = spss.BasePivotTable("Table Title",
                            "OMS table subtype")
table.SimplePivotTable(rowdim="row dimension",
                       rowlabels=["row 1","row 2","row 3","row 4"],
                       collabels=["column 1"],
                       cells = [1,2,3,4])
spss.EndProcedure()

Result

Pivot table with a single column

Example: Using a Two-Dimensional Sequence for Cells

import spss
spss.StartProcedure("mycompany.com.demoProc")

table = spss.BasePivotTable("Table Title",
                            "OMS table subtype")
table.SimplePivotTable(rowdim="row dimension",
                       coldim="column dimension",
                       rowlabels=["row 1","row 2","row 3","row 4"],
                       collabels=["column 1","column 2"],
                       cells = [[1,2],[3,4],[5,6],[7,8]])
spss.EndProcedure()

Result

Table populated from two-dimensional sequence

Example: Using a Two-Dimensional Sequence for Cells and Omitting Column Labels

import spss
spss.StartProcedure("mycompany.com.demoProc")

table = spss.BasePivotTable("Table Title",
                            "OMS table subtype")
table.SimplePivotTable(rowdim="row dimension",
                       coldim="column dimension",
                       rowlabels=["row 1","row 2","row 3","row 4"],
                       cells = [[1,2,3],[4,5,6],[7,8,9],[10,11,12]])
spss.EndProcedure()

Result

Table populated from two-dimensional sequence without specifying column labels

Related Topics

Creating Pivot Tables with the SimplePivotTable Method (Python)


TitleFootnotes Method (Python)

BasePivotTable class,BasePivotTable class,BasePivotTable class
TitleFootnotes method,TitleFootnotes method,TitleFootnotes method
TitleFootnotes method,TitleFootnotes method,TitleFootnotes method

.TitleFootnotes(footnote). Used to add a footnote to the table title. The argument footnote is a string specifying the footnote.

Example

table = spss.BasePivotTable("Table Title",
                            "OMS table subtype")

table.TitleFootnotes("A title footnote")

Related Topics

spss.AddProcedureFootnotes Function (Python)
CategoryFootnotes Method (Python)
DimensionFootnotes Method (Python)
Footnotes Method (Python)


spss.CellText Class (Python)

BasePivotTable class,BasePivotTable class,BasePivotTable class
CellText class,CellText class,CellText class
CellText class,CellText class,CellText class

spss.CellText. A class of objects used to create a dimension category or a cell in a pivot table. This class is only for use with the spss.BasePivotTable class. The CellText class is used to create the following object types:

• CellText.Number: Used to specify a numeric value.

• CellText.String: Used to specify a string value.

• CellText.VarName: Used to specify a variable name. Use of this object means that settings for the display of variable names in pivot tables (names, labels, or both) are honored.

• CellText.VarValue: Used to specify a variable value. Use of this object means that settings for the display of variable values in pivot tables (values, labels, or both) are honored.

Related Topics

Number Class (Python)
String Class (Python)
VarName Class (Python)
VarValue Class (Python)


Number Class (Python)

CellText class,CellText class,CellText class
Number class,Number class,Number class
Number class,Number class,Number class

spss.CellText.Number(value,formatspec,varIndex). Used to specify a numeric value for a category or a cell in a pivot table. The argument value specifies the numeric value. You can pass a Python time.struct_time or datetime.datetime object to this argument. The optional argument formatspec is of the form spss.FormatSpec.format where format is one of those listed in the table below--for example, spss.FormatSpec.Mean. You can also specify an integer code for formatspec, as in the value 5 for Mean. The argument varIndex is the index of a variable in the active dataset whose format is used to determine details of the resulting format. varIndex is only used in conjunction with formatspec and is required when specifying one of the following formats: Mean, Variable, StdDev, Difference, and Sum. Index values represent position in the active dataset, starting with 0 for the first variable in file order.

• When formatspec is omitted, the default format is used. You can set the default format with the SetDefaultFormatSpec method and retrieve the default with the GetDefaultFormatSpec method. Instances of the BasePivotTable class have an implicit default format of GeneralStat.

• You can obtain a numeric representation of a CellText.Number object using the toNumber method, and you can use the toString method to obtain a string representation.

• When specifying cell values with Python time.struct_time or datetime.datetime objects, the value will be displayed in seconds--specifically, the number of seconds from October 14, 1582. You can change the format of a cell to a datetime format using the SetNumericFormatAt method (Python) Python Scripting method. This requires embedding Python Scripting code within your Python program.

Example

from spss import CellText
from spss import FormatSpec
table = spss.BasePivotTable("Table Title",
                            "OMS table subtype")

table.Append(spss.Dimension.Place.row,"rowdim")
table.Append(spss.Dimension.Place.column,"coldim")

table[(CellText.String("row1"),CellText.String("col1"))] = \
       CellText.Number(25.632,FormatSpec.Mean,2)
table[(CellText.String("row2"),CellText.String("col1"))] = \
       CellText.Number(23.785,FormatSpec.Mean,2)

In this example, cell values are displayed in the format used for mean values. The format of the variable with index 2 in the active dataset is used to determine the details of the resulting format.

Numeric formats for use with FormatSpec
Format name | Code
Coefficient | 0
CoefficientSE | 1
CoefficientVar | 2
Correlation | 3
GeneralStat | 4
Mean | 5
Count | 6
Percent | 7
PercentNoSign | 8
Proportion | 9
Significance | 10
Residual | 11
Variable | 12
StdDev | 13
Difference | 14
Sum | 15
Suggestions for Choosing a Format Collapse Hide details

Suggestions for Choosing a Format

• Consider using Coefficient for unbounded, unstandardized statistics; for instance, beta coefficients in regression.

• Correlation is appropriate for statistics bounded by –1 and 1 (typically correlations or measures of association).

• Consider using GeneralStat for unbounded, scale-free statistics; for instance, beta coefficients in regression.

• Mean is appropriate for the mean of a single variable, or the mean across multiple variables.

• Count is appropriate for counts and other integers such as integer degrees of freedom.

• Percent and PercentNoSign are both appropriate for percentages. PercentNoSign results in a value without a percentage symbol (%).

• Significance is appropriate for statistics bounded by 0 and 1 (for example, significance levels).

• Consider using Residual for residuals from cell counts.

• Variable refers to a variable’s print format as given in the data dictionary and is appropriate for statistics whose values are taken directly from the observed data (for instance, minimum, maximum, and mode).

• StdDev is appropriate for the standard deviation of a single variable, or the standard deviation across multiple variables.

• Sum is appropriate for sums of single variables. Results are displayed using the specified variable’s print format.

Related Topics

spss.CellText Class (Python)
String Class (Python)
VarName Class (Python)
VarValue Class (Python)


String Class (Python)

CellText class,CellText class,CellText class
String class,String class,String class
String class,String class,String class

spss.CellText.String(value). Used to specify a string value for a category or a cell in a pivot table. The argument is the string value.

• You can obtain a string representation of a CellText.String object using the toString method. For character representations of numeric values stored as CellText.String objects, such as CellText.String("11"), you can obtain the numeric value using the toNumber method.

Example

from spss import CellText
table = spss.BasePivotTable("Table Title",
                            "OMS table subtype")

table.Append(spss.Dimension.Place.row,"rowdim")
table.Append(spss.Dimension.Place.column,"coldim")

table[(CellText.String("row1"),CellText.String("col1"))] = \
       CellText.String("1")
table[(CellText.String("row2"),CellText.String("col1"))] = \
       CellText.String("2")

Related Topics

spss.CellText Class (Python)
Number Class (Python)
VarName Class (Python)
VarValue Class (Python)


VarName Class (Python)

CellText class,CellText class,CellText class
VarName class,VarName class,VarName class
VarName class,VarName class,VarName class

spss.CellText.VarName(index). Used to specify that a category or cell in a pivot table is to be treated as a variable name. CellText.VarName objects honor display settings for variable names in pivot tables (names, labels, or both). The argument is the index value of the variable. Index values represent position in the active dataset, starting with 0 for the first variable in file order.

Example

from spss import CellText
table = spss.BasePivotTable("Table Title",
                            "OMS table subtype")
coldim=table.Append(spss.Dimension.Place.column,"coldim")
rowdim=table.Append(spss.Dimension.Place.row,"rowdim")
table.SetCategories(rowdim,[CellText.VarName(0),CellText.VarName(1)])
table.SetCategories(coldim,CellText.String("Column Heading"))

In this example, row categories are specified as the names of the variables with index values 0 and 1 in the active dataset. Depending on the setting of pivot table labeling for variables in labels, the variable names, labels, or both will be displayed.

Related Topics

spss.CellText Class (Python)
Number Class (Python)
String Class (Python)
VarValue Class (Python)


VarValue Class (Python)

CellText class,CellText class,CellText class
VarValue class,VarValue class,VarValue class
VarValue class,VarValue class,VarValue class

spss.CellText.VarValue(index,value). Used to specify that a category or cell in a pivot table is to be treated as a variable value. CellText.VarValue objects honor display settings for variable values in pivot tables (values, labels, or both). The argument index is the index value of the variable. Index values represent position in the active dataset, starting with 0 for the first variable in file order. The argument value is a number (for a numeric variable) or string (for a string variable) representing the value of the CellText object.

Example

from spss import CellText
table = spss.BasePivotTable("Table Title",
                            "OMS table subtype")
coldim=table.Append(spss.Dimension.Place.column,"coldim")
rowdim=table.Append(spss.Dimension.Place.row,"rowdim")
table.SetCategories(rowdim,[CellText.VarValue(0,1),CellText.VarValue(0,2)])
table.SetCategories(coldim,CellText.String("Column Heading"))

In this example, row categories are specified as the values 1 and 2 of the variable with index value 0 in the active dataset. Depending on the setting of pivot table labeling for variable values in labels, the values, value labels, or both will be displayed.

Related Topics

spss.CellText Class (Python)
Number Class (Python)
String Class (Python)
VarName Class (Python)


toNumber Method (Python)

CellText class,CellText class,CellText class
toNumber method,toNumber method,toNumber method
toNumber method,toNumber method,toNumber method

This method is used to obtain a numeric representation of a CellText.Number object or a CellText.String object that stores a character representation of a numeric value, as in CellText.String("123"). Values obtained from this method can be used in arithmetic expressions. You call this method on a CellText.Number or CellText.String object.

Example

from spss import CellText
table = spss.BasePivotTable("Table Title",
                            "OMS table subtype")

table.Append(spss.Dimension.Place.row,"row dimension")
table.Append(spss.Dimension.Place.column,"column dimension")

row_cat1 = CellText.String("first row")
row_cat2 = CellText.String("second row")
col_cat1 = CellText.String("first column")
col_cat2 = CellText.String("second column")

table[(row_cat1,col_cat1)] = CellText.Number(11)
cellValue = table[(row_cat1,col_cat1)].toNumber()
table[(row_cat2,col_cat2)] = CellText.Number(2*cellValue)

• table[(row_cat1,col_cat1)].toNumber() returns a numeric representation of the CellText object (recall that table cells are stored as CellText objects) for the cell with category values ("first row","first column").

Related Topics

Using Cell Values in Expressions (Python)


toString Method (Python)

CellText class,CellText class,CellText class
toString method,toString method,toString method
toString method,toString method,toString method

This method is used to obtain a string representation of a CellText.String or CellText.Number object. Values obtained from this method can be used in string expressions. You call this method on a CellText.String or CellText.Number object.

Example

from spss import CellText
table = spss.BasePivotTable("Table Title",
                            "OMS table subtype")

table.Append(spss.Dimension.Place.row,"row dimension")
table.Append(spss.Dimension.Place.column,"column dimension")

row_cat1 = CellText.String("first row")
row_cat2 = CellText.String("second row")
col_cat1 = CellText.String("first column")
col_cat2 = CellText.String("second column")

table[(row_cat1,col_cat1)] = CellText.String("abc")
cellValue = table[(row_cat1,col_cat1)].toString()
table[(row_cat2,col_cat2)] = CellText.String(cellValue + "d")

• table[(row_cat1,col_cat1)].toString() returns a string representation of the CellText object (recall that table cells are stored as CellText objects) for the cell with category values ("first row","first column").

Related Topics

Using Cell Values in Expressions (Python)


spss.BaseProcedure Class (Python)

BaseProcedure class,BaseProcedure class,BaseProcedure class

The spss.BaseProcedure class is used to create classes that encapsulate procedures. Procedures can read the data, perform computations, add new variables and/or new cases to the active dataset, and produce pivot table output and text blocks in the PASW Statistics Viewer. Procedures have almost the same capabilities as built-in PASW Statistics procedures, such as DESCRIPTIVES and REGRESSION, but they are written in Python by users. Use of the spss.BaseProcedure class provides an alternative to encapsulating procedure code within a Python function and explicitly using an spss.StartProcedure-spss.EndProcedure block for the procedure output. All classes that encapsulate procedures must inherit from the BaseProcedure class.

The spss.BaseProcedure class has three methods: __init__, execProcedure, and execUserProcedure. When creating procedure classes you always override the execUserProcedure method, replacing it with the body of your procedure. You override the __init__ method if you need to provide arguments other than the procedure name. You never override the execProcedure method. It is responsible for calling execUserProcedure to run your procedure as well as automatically making the necessary calls to spss.StartProcedure and spss.EndProcedure.

The rules governing procedure code contained within the execUserProcedure method are the same as those for StartProcedure-EndProcedure blocks. See the topic spss.StartProcedure Function (Python) for more information.

Example

As an example, we will create a procedure class that calculates group means for a selected variable using a specified categorical variable to define the groups. The output of the procedure is a pivot table displaying the group means. For an alternative approach to creating the same procedure, but making explicit use of spss.StartProcedure-spss.EndProcedure and without the use of the BaseProcedure class, see the example for the spss.StartProcedure function.

class groupMeans(spss.BaseProcedure):

    #Overrides __init__ method to pass arguments
    def __init__(self, procName, groupVar, sumVar):
        self.procName = procName
        self.groupVar = groupVar
        self.sumVar = sumVar

    #Overrides execUserProcedure method of BaseProcedure
    def execUserProcedure(self):
        #Determine variable indexes from variable names
        varCount = spss.GetVariableCount()
        groupIndex = 0
        sumIndex = 0
        for i in range(varCount):
            varName = spss.GetVariableName(i)
            if varName == self.groupVar:
                groupIndex = i
                continue
            elif varName == self.sumVar:
                sumIndex = i
                continue

        varIndex = [groupIndex,sumIndex]
        cur = spss.Cursor(varIndex)
        Counts={};Totals={}

        #Calculate group sums
        for i in range(cur.GetCaseCount()):
            row = cur.fetchone()
            cat=int(row[0])
            Counts[cat]=Counts.get(cat,0) + 1
            Totals[cat]=Totals.get(cat,0) + row[1]

        cur.close()

        #Create a pivot table
        table = spss.BasePivotTable("Group Means",
                                    "OMS table subtype")
        table.Append(spss.Dimension.Place.row,
                     spss.GetVariableLabel(groupIndex))
        table.Append(spss.Dimension.Place.column,
                     spss.GetVariableLabel(sumIndex))

        category2 = spss.CellText.String("Mean")
        for cat in sorted(Counts):
            category1 = spss.CellText.Number(cat)
            table[(category1,category2)] = \
                   spss.CellText.Number(Totals[cat]/Counts[cat])

• groupMeans is a class based on the spss.BaseProcedure class.

• The procedure defined by the class requires two arguments, the name of the grouping variable (groupVar) and the name of the variable for which group means are desired (sumVar). Passing these values requires overriding the __init__ method of spss.BaseProcedure. The values of the parameters are stored to the properties groupVar and sumVar of the class instance. The value passed in as the procedure name is stored to the procName property.

• The body of the procedure is contained within the execUserProcedure method, which overrides that method in spss.BaseProcedure. The procedure reads the data to calculate group sums and group case counts and creates a pivot table populated with the group means.

• The necessary calls to spss.StartProcedure and spss.EndProcedure are handled by spss.BaseProcedure.

Saving and Running Procedure Classes

Once you have written a procedure class, you will want to save it in a Python module on the Python search path so that you can call it. A Python module is simply a text file containing Python definitions and statements. You can create a module with a Python IDE, or with any text editor, by saving a file with an extension of .py. The name of the file, without the .py extension, is then the name of the module. You can have many classes in a single module. To be sure that Python can find your new module, you may want to save it to your Python "site-packages" directory, typically /Python26/Lib/site-packages.

For the example procedure class described above, you might choose to save the class definition to a Python module named myprocs.py. And be sure to include an import spss statement in the module. Sample command syntax to instantiate this class and run the procedure is:

import spss, myprocs
spss.Submit("GET FILE='/examples/data/Employee data.sav'.")
proc = myprocs.groupMeans("mycompany.com.groupMeans","educ","salary")
proc.execProcedure()

• The import statement containing myprocs makes the contents of the Python module myprocs.py available to the current session (assuming that the module is on the Python search path).

• The call to myprocs.groupMeans creates an instance of the groupMeans class. The variables educ and salary in /examples/data/Employee data.sav are used as the grouping variable and the variable for which means are calculated.

• Output from the procedure is associated with the name mycompany.com.groupMeans. This is the name that appears in the outline pane of the Viewer associated with output produced by the procedure. It is also the command name associated with this procedure when routing output from this procedure with OMS (Output Management System), as well as the name associated with this procedure for use with autoscripts. In order that names associated with procedure output not conflict with names of existing PASW Statistics commands (when working with OMS or autoscripts), it is recommended that they have the form yourcompanyname.com.procedurename. See the topic spss.StartProcedure Function (Python) for more information.

Result

Output from the groupMeans procedure

Related Topics

spss.StartProcedure Function (Python)


spss.CreateXPathDictionary Function (Python)

CreateXPathDictionary,CreateXPathDictionary,CreateXPathDictionary
dictionary,dictionary,dictionary
CreateXPathDictionary,CreateXPathDictionary,CreateXPathDictionary

spss.CreateXPathDictionary(handle). Creates an XPath dictionary DOM for the active dataset that can be accessed with XPath expressions. The argument is a handle name, used to identify this DOM in subsequent spss.EvaluateXPath and spss.DeleteXPathHandle functions.

Example

handle='demo'
spss.CreateXPathDictionary(handle)

• The XPath dictionary DOM for the current active dataset is assigned the handle name demo. Any subsequent spss.EvaluateXPath or spss.DeleteXPathHandle functions that reference this dictionary DOM must use this handle name.

Related Topics

spss.DeleteXPathHandle Function (Python)
spss.EvaluateXPath Function (Python)
spss.GetHandleList Function (Python)
spss.GetXmlUtf16 Function (Python)


spss.Cursor Class (Python)

Cursor class,Cursor class,Cursor class
data,data,data
reading active dataset into Python,reading active dataset into Python,reading active dataset into Python
creating new variables,creating new variables,creating new variables
appending cases,appending cases,appending cases
fetching data in Python,fetching data in Python,fetching data in Python
active dataset,active dataset,active dataset
reading into Python,reading into Python,reading into Python
creating new variables,creating new variables,creating new variables
appending cases,appending cases,appending cases
fetching data in Python,fetching data in Python,fetching data in Python

spss.Cursor(n, accessType). Provides the ability to read cases, append cases, and add new variables to the active dataset.

• The optional argument accessType specifies one of three usage modes: read ('r'), write ('w'), and append ('a'). The default is read mode.

• The optional argument n specifies a tuple or a list of variable index values representing position in the active dataset, starting with 0 for the first variable in file order. This argument is used in read or write mode to specify a subset of variables to return when reading case data from the active dataset. If the argument is omitted, all variables are returned. The argument has no effect if used in append mode.

• You cannot use the spss.Submit function while a data cursor is open. You must close or delete the cursor first.

• Only one data cursor can be open at any point in the program block. To define a new data cursor, you must first close or delete the previous one. If you need to concurrently work with the data from multiple datasets, consider using the Dataset class.

• Instances of the Cursor class are implicitly deleted at the end of a BEGIN PROGRAM-END PROGRAM block, and therefore they do not persist across BEGIN PROGRAM-END PROGRAM blocks.

Related Topics

spss.Dataset Class (Python)
Read Mode (Python)
Write Mode (Python)
Append Mode (Python)
spss.Cursor Methods (Python)


Read Mode (Python)

Cursor class,Cursor class,Cursor class
read mode,read mode,read mode
data,data,data
reading active dataset into Python,reading active dataset into Python,reading active dataset into Python
fetching data in Python,fetching data in Python,fetching data in Python
active dataset,active dataset,active dataset
reading into Python,reading into Python,reading into Python
fetching data in Python,fetching data in Python,fetching data in Python

This is the default for the Cursor class and provides the ability to read case data from the active dataset. Read mode is specified with spss.Cursor(accessType='r') or simply spss.Cursor().

Note: For users of a 14.0.x version of the plug-in who are upgrading to a newer version, this mode is equivalent to spss.Cursor(n) in 14.0.x versions. No changes to your 14.0.x code for the Cursor class are required to run the code with a newer version.

The Cursor methods fetchone, fetchmany, and fetchall are used to retrieve cases from the active dataset.

Example Collapse Hide details

Example

*python_cursor.sps.
DATA LIST FREE /var1 (F) var2 (A2)  var3 (F).
BEGIN DATA
11 ab 13
21 cd 23
31 ef  33
END DATA.
BEGIN PROGRAM.
import spss
dataCursor=spss.Cursor()
oneRow=dataCursor.fetchone()
dataCursor.close()
i=[0]
dataCursor=spss.Cursor(i)
oneVar=dataCursor.fetchall()
dataCursor.close()
print "One row (case): ", oneRow
print "One column (variable): ", oneVar
END PROGRAM.

Result

One row (case):  (11.0, 'ab', 13.0)
One column (variable):  ((11.0,), (21.0,), (31.0,))

• Cases from the active dataset are returned as a single tuple for fetchone and a list of tuples for fetchall.

• Each tuple represents the data for one case. For fetchall the tuples are arranged in the same order as the cases in the active dataset.

• Each element in a tuple contains the data value for a specific variable. The order of variable values within a tuple is the order specified by the optional argument n to the Cursor class, or file order if n is omittted.

missing values,missing values,missing values
when reading data into Python,when reading data into Python,when reading data into Python
Example: Missing Values Collapse Hide details

Example: Missing Values

*python_cursor_sysmis.sps.
*System- and user-missing values.
DATA LIST LIST (',') /numVar (f) stringVar (a4).
BEGIN DATA
1,a
,b
3,,
4,d
END DATA.
MISSING VALUES stringVar (' ').
BEGIN PROGRAM.
import spss
dataCursor=spss.Cursor()
print dataCursor.fetchall()
dataCursor.close()
END PROGRAM.

Result

((1.0, 'a   '), (None, 'b   '), (3.0, None), (4.0, 'd   '))

• String values are right-padded to the defined width of the string variable.

• System-missing values are always converted to the Python data type None.

• By default, user-missing values are converted to the Python data type None. You can use the SetUserMissingInclude method to specify that user-missing values be treated as valid.

Related Topics

spss.Cursor Class (Python)
Write Mode (Python)
Append Mode (Python)
spss.Cursor Methods (Python)


Write Mode (Python)

active dataset,active dataset,active dataset
creating new variables,creating new variables,creating new variables
Cursor class,Cursor class,Cursor class
write mode,write mode,write mode
data,data,data
creating new variables,creating new variables,creating new variables

This mode is used to add new variables, along with their case values, to an existing dataset. It cannot be used to append cases to the active dataset. Write mode is specified with spss.Cursor(accessType='w').

• All of the methods available in read mode are also available in write mode.

• When adding new variables, the CommitDictionary method must be called after the statements defining the new variables and prior to setting case values for those variables. You cannot add new variables to an empty dataset.

• When setting case values for new variables, the CommitCase method must be called for each case that is modified. The fetchone method is used to advance the record pointer by one case, or you can use the fetchmany method to advance the record pointer by a specified number of cases.

• Changes to the active dataset do not take effect until the cursor is closed.

• Write mode supports multiple data passes and allows you to add new variables on each pass. In the case of multiple data passes where you need to add variables on a data pass other than the first, you must call the AllocNewVarsBuffer method to allocate the buffer size for the new variables. When used, AllocNewVarsBuffer must be called before reading any data with fetchone, fetchmany, or fetchall.

• The Cursor methods SetVarNameAndType and SetOneVarNameAndType are used to add new variables to the active dataset, and the methods SetValueChar and SetValueNumeric are used to set case values.

Example Collapse Hide details

Example

In this example, we create a new numeric variable and a new string variable and set their values for all cases.

*python_cursor_create_var.sps.
DATA LIST FREE /var1 (F) var2 (A2)  var3 (F).
BEGIN DATA
11 ab 13
21 cd 23
31 ef  33
END DATA.
BEGIN PROGRAM.
import spss
cur=spss.Cursor(accessType='w')
cur.SetVarNameAndType(['var4','strvar'],[0,8])
cur.SetVarFormat('var4',5,2,0)
cur.CommitDictionary()
for i in range(cur.GetCaseCount()):
   cur.fetchone()
   cur.SetValueNumeric('var4',4+10*(i+1))
   cur.SetValueChar('strvar','row' + str(i+1))
   cur.CommitCase()
cur.close()
END PROGRAM.

• An instance of the Cursor class in write mode is created and assigned to the variable cur.

• The SetVarNameAndType method is used to add two new variables to the active dataset. var4 is a numeric variable and strvar is a string variable of width 8.

• SetVarFormat sets the display format for var4. The integers 5, 2, and 0 specify the format type (5 is standard numeric), the defined width, and the number of decimal digits respectively.

• The CommitDictionary method is called to commit the new variables to the cursor before populating their case values.

• The SetValueNumeric and SetValueChar methods are used to set the case values of the new variables. The CommitCase method is called to commit the changes for each modified case.

• fetchone advances the record pointer to the next case.

Example: Setting Values for Specific Cases Collapse Hide details

Example: Setting Values for Specific Cases

In this example, we create new variables and set their values for specific cases. The fetchone method is used to advance the record pointer to the desired cases.

*python_cursor_move_pointer.sps.
DATA LIST FREE /code (A1) loc (A3) emp (F) dtop (F) ltop (F).
BEGIN DATA
H NY 151 127 24
W CHI 17 4 0
S CHI 9 3 6
W ATL 12 3 0
W SDG 13 4 0
S ATL 10 3 7
S SDG 11 3 8
END DATA.
BEGIN PROGRAM.
import spss
cur=spss.Cursor(accessType='w')
cur.SetVarNameAndType(['emp_est','dtop_est','ltop_est'],[0,0,0])
cur.SetVarFormat('emp_est',5,2,0)
cur.SetVarFormat('dtop_est',5,2,0)
cur.SetVarFormat('ltop_est',5,2,0)
cur.CommitDictionary()
for i in range(cur.GetCaseCount()):
   row=cur.fetchone()
   if (row[0].lower()=='s'):
      cur.SetValueNumeric('emp_est',1.2*row[2])
      cur.SetValueNumeric('dtop_est',1.2*row[3])
      cur.SetValueNumeric('ltop_est',1.2*row[4])
      cur.CommitCase()
cur.close()
END PROGRAM.
Example: Multiple Data Passes Collapse Hide details

Example: Multiple Data Passes

In this example, we read the data, calculate a summary statistic, and use a second data pass to add a summary variable to the active dataset.

*python_cursor_multipass.sps.
DATA LIST FREE /var (F).
BEGIN DATA
57000
40200
21450
21900
END DATA.
BEGIN PROGRAM.
import spss
cur=spss.Cursor(accessType='w')
cur.AllocNewVarsBuffer(8)
total=0
for i in range(spss.GetCaseCount()):
   total+=cur.fetchone()[0]
meanVal=total/spss.GetCaseCount()
cur.reset()
cur.SetOneVarNameAndType('mean',0)
cur.CommitDictionary()
for i in range(spss.GetCaseCount()):
   row=cur.fetchone()
   cur.SetValueNumeric('mean',meanVal)
   cur.CommitCase()
cur.close()
END PROGRAM.

• Because we will be adding a new variable on the second data pass, the AllocNewVarsBuffer method is called to allocate the required space. In the current example, we are creating a single numeric variable, which requires eight bytes.

• The first for loop is used to read the data and total the case values.

• After the data pass, the reset method must be called prior to defining new variables.

• The second data pass (second for loop) is used to add the mean value of the data as a new variable.

Related Topics

spss.Cursor Class (Python)
Read Mode (Python)
Append Mode (Python)
spss.Cursor Methods (Python)


Append Mode (Python)

active dataset,active dataset,active dataset
appending cases,appending cases,appending cases
Cursor class,Cursor class,Cursor class
append mode,append mode,append mode
data,data,data
appending cases,appending cases,appending cases

This mode is used to append new cases to the active dataset. It cannot be used to add new variables or read case data from the active dataset. A dataset must contain at least one variable in order to append cases to it, but it need not contain any cases. Append mode is specified with spss.Cursor(accessType='a').

• The CommitCase method must be called for each case that is added.

• The EndChanges method must be called before the cursor is closed.

• Changes to the active dataset do not take effect until the cursor is closed.

• A numeric variable whose value is not specified (for a new case) is set to the system-missing value.

• A string variable whose value is not specified (for a new case) will have a blank value. The value will be valid unless you explicitly define the blank value to be missing for that variable.

• The Cursor methods SetValueChar and SetValueNumeric are used to set variable values for new cases.

Example Collapse Hide details

Example

*python_cursor_append_cases.sps.
DATA LIST FREE /var1 (F) var2 (A2)  var3 (F).
BEGIN DATA
11 ab 13
21 cd 23
31 ef 33
END DATA.
BEGIN PROGRAM.
import spss
cur=spss.Cursor(accessType='a')
ncases=cur.GetCaseCount()
newcases=2
for i in range(newcases):
   cur.SetValueNumeric('var1',1+10*(ncases+i+1))
   cur.SetValueNumeric('var3',3+10*(ncases+i+1))
   cur.CommitCase()
cur.EndChanges()
cur.close()
END PROGRAM.

• An instance of the Cursor class in append mode is created and assigned to the variable cur.

• The SetValueNumeric method is used to set the case values of var1 and var3 for two new cases. No value is specified for var2. The CommitCase method is called to commit the values for each case.

• The EndChanges method is called to commit the new cases to the cursor.

Related Topics

spss.Cursor Class (Python)
Read Mode (Python)
Write Mode (Python)
spss.Cursor Methods (Python)


spss.Cursor Methods (Python)

Cursor class,Cursor class,Cursor class

Each usage mode of the Cursor class supports its own set of methods, as shown in the table below. Descriptions of each method follow.

Method | Read mode | Write mode | Append mode
AllocNewVarsBuffer |  | X |
close | X | X | X
CommitCase |  | X | X
CommitDictionary |  | X |
EndChanges |  |  | X
fetchall | X | X** |
fetchmany | X | X** |
fetchone | X | X |
GetCaseCount | X | X | X
GetDataFileAttributeNames | X | X | X
GetDataFileAttributes | X | X | X
GetMultiResponseSetNames | X | X | X
GetMultiResponseSet | X | X | X
GetVarAttributeNames | X | X | X
GetVarAttributes | X | X | X
GetVariableCount | X | X | X
GetVariableFormat | X | X | X
GetVariableLabel | X | X | X
GetVariableMeasurementLevel | X | X | X
GetVariableName | X | X | X
GetVariableType | X | X | X
GetVarMissingValues | X | X | X
IsEndSplit | X | X |
reset | X | X | X
SetFetchVarList | X | X |
SetOneVarNameAndType |  | X |
SetUserMissingInclude | X | X |
SetValueChar |  | X | X
SetValueNumeric |  | X | X
SetVarAlignment |  | X |
SetVarAttributes |  | X |
SetVarCMissingValues |  | X |
SetVarCValueLabel |  | X |
SetVarFormat |  | X |
SetVarLabel |  | X |
SetVarMeasureLevel |  | X |
SetVarNameAndType |  | X |
SetVarNMissingValues |  | X |
SetVarNValueLabel |  | X |

** This method is primarily for use in read mode.

Note

The Cursor class Get methods (for instance, GetCaseCount, GetVariableCount, and so on) listed above have the same specifications as the functions in the spss module of the same name. For example, the specifications for the Cursor method GetCaseCount are the same as those for the spss.GetCaseCount function. While a cursor is open, both sets of functions return information about the current cursor and give identical results. In the absence of a cursor, the spss module functions retrieve information about the active dataset. Refer to the entries for the corresponding spss module functions for specifications of these Cursor methods.

Related Topics

spss.Cursor Class (Python)
Read Mode (Python)
Write Mode (Python)
Append Mode (Python)


AllocNewVarsBuffer Method (Python)

Cursor class,Cursor class,Cursor class
AllocNewVarsBuffer method,AllocNewVarsBuffer method,AllocNewVarsBuffer method
AllocNewVarsBuffer method,AllocNewVarsBuffer method,AllocNewVarsBuffer method

.AllocNewVarsBuffer(bufSize). Specifies the buffer size, in bytes, to use when adding new variables in the context of multiple data passes. The argument bufSize is a positive integer large enough to accommodate all new variables to be created by a given write cursor. Each numeric variable requires eight bytes. For each string variable, you should allocate a size that is an integer multiple of eight bytes, and large enough to store the defined length of the string (one byte per character). For example, you would allocate eight bytes for strings of length 1–8 and 16 bytes for strings of length 9–16.

• This method is only available in write mode.

• AllocNewVarsBuffer is required in the case of multiple data passes when you need to add variables on a data pass other than the first. When used, it must be called before reading any data with fetchone, fetchmany, or fetchall.

• AllocNewVarsBuffer can only be called once for a given write cursor instance.

• Specifying a larger buffer size than is required has no effect on the result.

Example Collapse Hide details

Example

In this example, two data passes are executed. The first data pass is used to read the data and compute a summary statistic. The second data pass is used to add a summary variable to the active dataset.

*python_cursor_multipass.sps.
DATA LIST FREE /var (F).
BEGIN DATA
57000
40200
21450
21900
END DATA.
BEGIN PROGRAM.
import spss
cur=spss.Cursor(accessType='w')
cur.AllocNewVarsBuffer(8)
total=0
for i in range(spss.GetCaseCount()):
   total+=cur.fetchone()[0]
meanVal=total/spss.GetCaseCount()
cur.reset()
cur.SetOneVarNameAndType('mean',0)
cur.CommitDictionary()
for i in range(spss.GetCaseCount()):
   row=cur.fetchone()
   cur.SetValueNumeric('mean',meanVal)
   cur.CommitCase()
cur.close()
END PROGRAM.


close Method (Python)

Cursor class,Cursor class,Cursor class
close method,close method,close method
close method,close method,close method

.close(). Closes the cursor. You cannot use the spss.Submit function while a data cursor is open. You must close or delete the cursor first.

• This method is available in read, write, or append mode.

• When appending cases, you must call the EndChanges method before the close method.

• Cursors are implicitly closed at the end of a BEGIN PROGRAM-END PROGRAM block.

Example Collapse Hide details

Example

cur=spss.Cursor()
data=cur.fetchall()
cur.close()


CommitCase Method (Python)

Cursor class,Cursor class,Cursor class
CommitCase method,CommitCase method,CommitCase method
CommitCase method,CommitCase method,CommitCase method

.CommitCase(). Commits changes to the current case in the current cursor. This method must be called for each case that is modified, including existing cases modified in write mode and new cases created in append mode.

• This method is available in write or append mode.

• When working in write mode, you advance the record pointer by calling the fetchone method. To modify the first case, you must first call fetchone.

• When working in append mode, the cursor is ready to accept values for a new record (using SetValueNumeric and SetValueChar) once CommitCase has been called for the previous record.

• Changes to the active dataset take effect when the cursor is closed.

For an example of using CommitCase in write mode, see the topic on write mode . For an example of using CommitCase in append mode, see the topic on append mode .


CommitDictionary Method (Python)

Cursor class,Cursor class,Cursor class
CommitDictionary method,CommitDictionary method,CommitDictionary method
CommitDictionary method,CommitDictionary method,CommitDictionary method

.CommitDictionary(). Commits new variables to the current cursor.

• This method is only available in write mode.

• When adding new variables, you must call this method before setting case values for the new variables.

• Changes to the active dataset take effect when the cursor is closed.

Example Collapse Hide details

Example

*python_cursor_CommitDictionary.sps.
DATA LIST FREE /var1 (F) var2 (A2)  var3 (F).
BEGIN DATA
11 ab 13
21 cd 23
31 ef  33
END DATA.
BEGIN PROGRAM.
import spss
cur=spss.Cursor(accessType='w')
cur.SetVarNameAndType(['numvar'],[0])
cur.SetVarLabel('numvar','New numeric variable')
cur.SetVarFormat('numvar',5,2,0)
cur.CommitDictionary()
for i in range(cur.GetCaseCount()):
   cur.fetchone()
   cur.SetValueNumeric('numvar',4+10*(i+1))
   cur.CommitCase()
cur.close()
END PROGRAM.


EndChanges Method (Python)

Cursor class,Cursor class,Cursor class
EndChanges method,EndChanges method,EndChanges method
EndChanges method,EndChanges method,EndChanges method

.EndChanges(). Specifies the end of appending new cases. This method must be called before the cursor is closed.

• This method can only be called once for a given Cursor instance and is only available in append mode.

• Changes to the active dataset take effect when the cursor is closed.

For an example of using EndChanges, see the topic on append mode .


fetchall Method (Python)

Cursor class,Cursor class,Cursor class
fetchall method,fetchall method,fetchall method
fetchall method,fetchall method,fetchall method

.fetchall(). Fetches all (remaining) cases from the active dataset, or if there are splits, the remaining cases in the current split. If there are no remaining rows, the result is an empty tuple.

• This method is available in read or write mode.

• When used in write mode, calling fetchall will position the record pointer at the last case of the active dataset, or if there are splits, the last case of the current split.

• Cases from the active dataset are returned as a list of tuples. Each tuple represents the data for one case, and the tuples are arranged in the same order as the cases in the active dataset. Each element in a tuple contains the data value for a specific variable. The order of variable values within a tuple is the order specified by the variable index values in the optional argument n to the Cursor class, or file order if n is omitted. For example, if n=[5,2,7] the first tuple element is the value of the variable with index value 5, the second is the variable with index value 2, and the third is the variable with index value 7.

• String values are right-padded to the defined width of the string variable.

• System-missing values are always converted to the Python data type None.

• By default, user-missing values are converted to the Python data type None. You can use the SetUserMissingInclude method to specify that user-missing values be treated as valid.

• Values of variables with date or datetime formats are returned as integers representing the number of seconds from October 14, 1582. Values of variables with time formats are returned as integers representing the number of seconds from midnight. You can convert from a datetime value to a Python datetime object using the CvtSpssDatetime function from the spssdata module, a supplementary Python module included with the plug-in.

Examples Collapse Hide details

Examples

*python_cursor_fetchall.sps.
DATA LIST FREE /var1 (F) var2 (A2)  var3 (F).
BEGIN DATA
11 ab 13
21 cd 23
31 ef  33
END DATA.
BEGIN PROGRAM.
import spss
dataCursor=spss.Cursor()
dataFile=dataCursor.fetchall()
for i in enumerate(dataFile):
  print i
print dataCursor.fetchall()
dataCursor.close()
END PROGRAM.

Result

(0, (11.0, 'ab', 13.0))
(1, (21.0, 'cd', 23.0))
(2, (31.0, 'ef', 33.0))
()

fetchall with Variable Index

*python_cursor_fetchall_index.sps.
DATA LIST FREE /var1 var2 var3.
BEGIN DATA
1 2 3
1 4 5
2 5 7
END DATA.
BEGIN PROGRAM.
import spss
i=[0]
dataCursor=spss.Cursor(i)
oneVar=dataCursor.fetchall()
uniqueCount=len(set(oneVar))
print oneVar
print spss.GetVariableName(0), " has ", uniqueCount, " unique values."
dataCursor.close()
END PROGRAM.

Result

((1.0,), (1.0,), (2.0,))
var1  has  2  unique values.


fetchmany Method (Python)

Cursor class,Cursor class,Cursor class
fetchmany method,fetchmany method,fetchmany method
fetchmany method,fetchmany method,fetchmany method

.fetchmany(n). Fetches the next n cases from the active dataset, where n is a positive integer. If the value of n is greater than the number of remaining cases (and the dataset does not contain splits), it returns the value of all the remaining cases. In the case that the active dataset has splits, if n is greater than the number of remaining cases in the current split, it returns the value of the remaining cases in the split. If there are no remaining cases, the result is an empty tuple.

• This method is available in read or write mode.

• When used in write mode, calling fetchmany(n) will position the record pointer at case n of the active dataset. In the case that the dataset has splits and n is greater than the number of remaining cases in the current split, fetchmany(n) will position the record pointer at the end of the current split.

• Cases from the active dataset are returned as a list of tuples. Each tuple represents the data for one case, and the tuples are arranged in the same order as the cases in the active dataset. Each element in a tuple contains the data value for a specific variable. The order of variable values within a tuple is the order specified by the variable index values in the optional argument n to the Cursor class, or file order if n is omitted. For example, if n=[5,2,7] the first tuple element is the value of the variable with index value 5, the second is the variable with index value 2, and the third is the variable with index value 7.

• String values are right-padded to the defined width of the string variable.

• System-missing values are always converted to the Python data type None.

• By default, user-missing values are converted to the Python data type None. You can use the SetUserMissingInclude method to specify that user-missing values be treated as valid.

• Values of variables with date or datetime formats are returned as integers representing the number of seconds from October 14, 1582. Values of variables with time formats are returned as integers representing the number of seconds from midnight. You can convert from a datetime value to a Python datetime object using the CvtSpssDatetime function from the spssdata module, a supplementary Python module included with the plug-in.

Example Collapse Hide details

Example

*python_cursor_fetchmany.sps.
DATA LIST FREE /var1 (F) var2 (A2)  var3 (F).
BEGIN DATA
11 ab 13
21 cd 23
31 ef  33
END DATA.
BEGIN PROGRAM.
import spss
dataCursor=spss.Cursor()
n=2
print dataCursor.fetchmany(n)
print dataCursor.fetchmany(n)
print dataCursor.fetchmany(n)
dataCursor.close()
END PROGRAM.

Result

((11.0, 'ab', 13.0), (21.0, 'cd', 23.0))
((31.0, 'ef', 33.0),)
()


fetchone Method (Python)

Cursor class,Cursor class,Cursor class
fetchone method,fetchone method,fetchone method
fetchone method,fetchone method,fetchone method

.fetchone(). Fetches the next row (case) from the active dataset. The result is a single tuple or the Python data type None after the last row has been read. A value of None is also returned at a split boundary. In this case, a subsequent call to fetchone will retrieve the first case of the next split group.

• This method is available in read or write mode.

• Each element in the returned tuple contains the data value for a specific variable. The order of variable values in the tuple is the order specified by the variable index values in the optional argument n to the Cursor class, or file order if n is omitted. For example, if n=[5,2,7] the first tuple element is the value of the variable with index value 5, the second is the variable with index value 2, and the third is the variable with index value 7.

• String values are right-padded to the defined width of the string variable.

• System-missing values are always converted to the Python data type None.

• By default, user-missing values are converted to the Python data type None. You can use the SetUserMissingInclude method to specify that user-missing values be treated as valid.

• Values of variables with date or datetime formats are returned as integers representing the number of seconds from October 14, 1582. Values of variables with time formats are returned as integers representing the number of seconds from midnight. You can convert from a datetime value to a Python datetime object using the CvtSpssDatetime function from the spssdata module, a supplementary Python module included with the plug-in.

Example Collapse Hide details

Example

*python_cursor_fetchone.sps.
DATA LIST FREE /var1 var2 var3.
BEGIN DATA
1 2 3
4 5 6
END DATA.
BEGIN PROGRAM.
import spss
dataCursor=spss.Cursor()
firstRow=dataCursor.fetchone()
secondRow=dataCursor.fetchone()
thirdRow=dataCursor.fetchone()
print "First row: ",firstRow
print "Second row ",secondRow
print "Third row...there is NO third row: ",thirdRow
dataCursor.close()
END PROGRAM.

Result

First row:  (1.0, 2.0, 3.0)
Second row  (4.0, 5.0, 6.0)
Third row...there is NO third row:  None


IsEndSplit Method (Python)

Cursor class,Cursor class,Cursor class
IsEndSplit method,IsEndSplit method,IsEndSplit method
IsEndSplit method,IsEndSplit method,IsEndSplit method
split-file processing,split-file processing,split-file processing
reading datasets with splits in Python,reading datasets with splits in Python,reading datasets with splits in Python

.IsEndSplit(). Indicates if the cursor position has crossed a split boundary. The result is Boolean—true if a split boundary has been crossed, otherwise false. This method is used in conjunction with the SplitChange function when creating custom pivot tables from data with splits.

• This method is available in read or write mode.

• The value returned from the fetchone method is None at a split boundary. Once a split has been detected, you will need to call fetchone again to retrieve the first case of the next split group.

• IsEndSplit returns true when the end of the dataset has been reached. Although a split boundary and the end of the dataset both result in a return value of true from IsEndSplit, the end of the dataset is identified by a return value of None from a subsequent call to fetchone, as shown in the following example.

Example Collapse Hide details

Example

*python_cursor_IsEndSplit.sps.
GET FILE='/examples/data/employee data.sav'.
SORT CASES BY GENDER.
SPLIT FILE LAYERED BY GENDER.

BEGIN PROGRAM.
import spss
i=0
cur=spss.Cursor()
while True:
   cur.fetchone()
   i+=1
   if cur.IsEndSplit():
      # Try to fetch the first case of the next split group
      if not None==cur.fetchone():
         print "Found split end. New split begins at case: ", i
      else:
         #There are no more cases, so quit
         break
cur.close()
END PROGRAM.


reset Method (Python)

Cursor class,Cursor class,Cursor class
reset method,reset method,reset method
reset method,reset method,reset method

.reset(). Resets the cursor.

• This method is available in read, write, or append mode.

• In read and write modes, reset moves the record pointer to the first case, allowing multiple data passes. In append mode, it deletes the current cursor instance and creates a new one.

• When executing multiple data passes, the reset method must be called prior to defining new variables on subsequent passes. For an example, see the topic on write mode.

Example Collapse Hide details

Example

import spss
cur=spss.Cursor()
data=cur.fetchall()
cur.reset()
data10=cur.fetchmany(10)
cur.close()


SetFetchVarList (Python)

Cursor class,Cursor class,Cursor class
SetFetchVarList method,SetFetchVarList method,SetFetchVarList method
SetFetchVarList method,SetFetchVarList method,SetFetchVarList method

.SetFetchVarList(var). Resets the list of variables to return when reading case data from the active dataset. The argument var is a list or tuple of variable index values representing position in the active dataset, starting with 0 for the first variable in file order.

• This method is available in read or write mode.

Example Collapse Hide details

Example

*python_cursor_reset_varlist.sps.
DATA LIST FREE /var1 (F) var2 (A2)  var3 (F).
BEGIN DATA
11 ab 13
21 cd 23
31 ef  33
END DATA.
BEGIN PROGRAM.
import spss
cur=spss.Cursor()
oneRow=cur.fetchone()
cur.SetFetchVarList([0])
cur.reset()
oneVar=cur.fetchall()
cur.close()
print "One row (case): ", oneRow
print "One column (variable): ", oneVar
END PROGRAM.


SetOneVarNameAndType Method (Python)

Cursor class,Cursor class,Cursor class
SetOneVarNameAndType method,SetOneVarNameAndType method,SetOneVarNameAndType method
SetOneVarNameAndType method,SetOneVarNameAndType method,SetOneVarNameAndType method
active dataset,active dataset,active dataset
creating new variables,creating new variables,creating new variables

.SetOneVarNameAndType(varName,varType). Creates one new variable in the active dataset. The argument varName is a string that specifies the name of the new variable. The argument varType is an integer specifying the variable type of the new variable. You can create multiple variables with a single call using the SetVarNameAndType method.

• This method is only available in write mode.

• Numeric variables are specified by a value of 0 for the variable type. String variables are specified with a type equal to the defined length of the string (maximum of 32767).

• Use of the SetOneVarNameAndType method requires the AllocNewVarsBuffer method to allocate space for the variable.

Example Collapse Hide details

Example

*python_cursor_create_onevar.sps.
DATA LIST FREE /var1 (F) var2 (A2)  var3 (F).
BEGIN DATA
11 ab 13
21 cd 23
31 ef  33
END DATA.
BEGIN PROGRAM.
import spss
cur=spss.Cursor(accessType='w')
cur.AllocNewVarsBuffer(8)
cur.SetOneVarNameAndType('var4',0)
cur.SetVarFormat('var4',5,2,0)
cur.CommitDictionary()
for i in range(cur.GetCaseCount()):
   cur.fetchone()
   cur.SetValueNumeric('var4',4+10*(i+1))
   cur.CommitCase()
cur.close()
END PROGRAM.

Related Topics

SetVarNameAndType Method (Python)


SetUserMissingInclude Method (Python)

Cursor class,Cursor class,Cursor class
SetUserMissingInclude method,SetUserMissingInclude method,SetUserMissingInclude method
SetUserMissingInclude method,SetUserMissingInclude method,SetUserMissingInclude method

.SetUserMissingInclude(incMissing). Specifies the treatment of user-missing values read from the active dataset. The argument is a Boolean with true specifying that user-missing values be treated as valid. A value of false specifies that user-missing values should be converted to the Python data type None.

• By default, user-missing values are converted to the Python data type None.

• System-missing values are always converted to None.

• This method is available in read or write mode.

Example Collapse Hide details

Example

In this example, we will use the following data to demonstrate both the default behavior and the behavior when user missing values are treated as valid.

DATA LIST LIST (',') /numVar (f) stringVar (a4).
BEGIN DATA
1,a
,b
3,,
0,d
END DATA.
MISSING VALUES stringVar (' ') numVar(0).

This first BEGIN PROGRAM block demonstrates the default behavior.

BEGIN PROGRAM.
import spss
cur=spss.Cursor()
print cur.fetchall()
cur.close()
END PROGRAM.

Result

((1.0, 'a   '), (None, 'b   '), (3.0, None), (None, 'd   '))

This second BEGIN PROGRAM block demonstrates the behavior when user-missing values are treated as valid.

BEGIN PROGRAM.
import spss
cur=spss.Cursor()
cur.SetUserMissingInclude(True)
print cur.fetchall()
cur.close()
END PROGRAM.

Result

((1.0, 'a   '), (None, 'b   '), (3.0, '    '), (0.0, 'd   '))


SetValueChar Method (Python)

Cursor class,Cursor class,Cursor class
SetValueChar method,SetValueChar method,SetValueChar method
SetValueChar method,SetValueChar method,SetValueChar method

.SetValueChar(varName,varValue). Sets the value for the current case for a string variable. The argument varName is a string specifying the name of a string variable. The argument varValue is a string specifying the value of this variable for the current case.

• This method is available in write or append mode.

• The CommitCase method must called for each case that is modified. This includes new cases created in append mode.

Example Collapse Hide details

Example

*python_cursor_SetValueChar.sps.
DATA LIST FREE /var1 (F) var2(F).
BEGIN DATA
11 12
21 22
31 32
END DATA.
BEGIN PROGRAM.
import spss
cur=spss.Cursor(accessType='w')
cur.SetVarNameAndType(['strvar'],[8])
cur.CommitDictionary()
for i in range(cur.GetCaseCount()):
   cur.fetchone()
   cur.SetValueChar('strvar','row' + str(i+1))
   cur.CommitCase()
cur.close()
END PROGRAM.

Related Topics

SetValueNumeric Method (Python)


SetValueNumeric Method (Python)

Cursor class,Cursor class,Cursor class
SetValueNumeric method,SetValueNumeric method,SetValueNumeric method
SetValueNumeric method,SetValueNumeric method,SetValueNumeric method

.SetValueNumeric(varName,varValue). Sets the value for the current case for a numeric variable. The argument varName is a string specifying the name of a numeric variable. The argument varValue specifies the numeric value of this variable for the current case.

• This method is available in write or append mode.

• The CommitCase method must be called for each case that is modified. This includes new cases created in append mode.

• The Python data type None specifies a missing value for a numeric variable.

• Values of numeric variables with a date or datetime format should be specified as Python time.struct_time or datetime.datetime objects, which are then converted to the appropriate PASW Statistics value. Values of variables with TIME and DTIME formats should be specified as the number of seconds in the time interval.

Example Collapse Hide details

Example

*python_cursor_SetValueNumeric.sps.
DATA LIST FREE /var1 (F) var2 (F).
BEGIN DATA
11 12
21 22
31 32
END DATA.
BEGIN PROGRAM.
import spss
cur=spss.Cursor(accessType='w')
cur.SetVarNameAndType(['var3'],[0])
cur.SetVarFormat('var3',5,2,0)
cur.CommitDictionary()
for i in range(cur.GetCaseCount()):
   cur.fetchone()
   cur.SetValueNumeric('var3',3+10*(i+1))
   cur.CommitCase()
cur.close()
END PROGRAM.

Related Topics

SetValueChar Method (Python)


SetVarAlignment Method (Python)

Cursor class,Cursor class,Cursor class
SetVarAlignment method,SetVarAlignment method,SetVarAlignment method
SetVarAlignment method,SetVarAlignment method,SetVarAlignment method
variable alignment,variable alignment,variable alignment

.SetVarAlignment(varName,alignment). Sets the alignment of data values in the Data Editor for a new variable. It has no effect on the format of the variables or the display of the variables or values in other windows or printed results. The argument varName is a string specifying the name of a new variable. The argument alignment is an integer and can take on one of the following values: 0 (left), 1 (right), 2 (center).

• This method is only available in write mode.

Example Collapse Hide details

Example

cur=spss.Cursor(accessType='w')
cur.SetVarNameAndType(['numvar'],[0])
cur.SetVarAlignment('numvar',0)
cur.CommitDictionary()
cur.close()


SetVarAttributes Method (Python)

Cursor class,Cursor class,Cursor class
SetVarAttributes method,SetVarAttributes method,SetVarAttributes method
SetVarAttributes method,SetVarAttributes method,SetVarAttributes method
variable attributes,variable attributes,variable attributes
setting,setting,setting

.SetVarAttributes(varName,attrName,attrValue,index). Sets a value in an attribute array for a new variable. The argument varName is a string specifying the name of a new variable. The argument attrName is a string specifying the name of the attribute array. The argument attrValue is a string specifying the attribute value, and index is the index position in the array, starting with the index 0 for the first element in the array.

• This method is only available in write mode.

• An attribute array with one element is equivalent to an attribute that is not specified as an array.

Example Collapse Hide details

Example

cur=spss.Cursor(accessType='w')
cur.SetVarNameAndType(['numvar'],[0])
cur.SetVarAttributes('numvar','myattribute','first element',0)
cur.SetVarAttributes('numvar','myattribute','second element',1)
cur.CommitDictionary()
cur.close()


SetVarCMissingValues Method (Python)

Cursor class,Cursor class,Cursor class
SetVarCMissingValues method,SetVarCMissingValues method,SetVarCMissingValues method
SetVarCMissingValues method,SetVarCMissingValues method,SetVarCMissingValues method
missing values,missing values,missing values
setting missing values from Python,setting missing values from Python,setting missing values from Python

.SetVarCMissingValues(varName,missingVal1,missingVal2,missingVal3). Sets user-missing values for a new string variable. The argument varName is a string specifying the name of a new string variable. The optional arguments missingVal1, missingVal2, and missingVal3 are strings, each of which can specify one user-missing value. Use the SetVarNMissingValues method to set missing values for new numeric variables.

• This method is only available in write mode.

Example Collapse Hide details

Example

cur=spss.Cursor(accessType='w')
cur.SetVarNameAndType(['strvar'],[8])
cur.SetVarCMissingValues('strvar',' ','NA')
cur.CommitDictionary()
cur.close()

Related Topics

SetVarNMissingValues Method (Python)


SetVarCValueLabel Method (Python)

Cursor class,Cursor class,Cursor class
SetVarCValueLabel method,SetVarCValueLabel method,SetVarCValueLabel method
SetVarCValueLabel method,SetVarCValueLabel method,SetVarCValueLabel method
value labels,value labels,value labels

.SetVarCValueLabel(varName,value,label). Sets the value label of a single value for a new string variable. The argument varName is a string specifying the name of a new string variable. The arguments value and label are strings specifying the value and the associated label. Use the SetVarNValueLabel method to set value labels for new numeric variables.

• This method is only available in write mode.

Example Collapse Hide details

Example

cur=spss.Cursor(accessType='w')
cur.SetVarNameAndType(['strvar'],[8])
cur.SetVarCValueLabel('strvar','f','female')
cur.CommitDictionary()
cur.close()

Related Topics

SetVarNValueLabel Method (Python)


SetVarFormat Method (Python)

Cursor class,Cursor class,Cursor class
SetVarFormat method,SetVarFormat method,SetVarFormat method
SetVarFormat method,SetVarFormat method,SetVarFormat method
variable format,variable format,variable format

.SetVarFormat(varName,type,width,decimals). Sets the display format for a new variable. The argument varName is a string specifying the name of a new variable. The argument type is an integer that specifies one of the available format types (see Variable Format Types). The argument width is an integer specifying the defined width, which must include enough positions to accommodate any punctuation characters such as decimal points, commas, dollar signs, or date and time delimiters. The optional argument decimals is an integer specifying the number of decimal digits for numeric formats.

Allowable settings for decimal and width depend on the specified type. For a list of the minimum and maximum widths and maximum decimal places for commonly used format types, see Variable Types and Formats.

• This method is only available in write mode.

• Setting the argument width for a string variable will not change the defined length of the string. If the specified value does not match the defined length, it is forced to be the defined length.

Example Collapse Hide details

Example

cur=spss.Cursor(accessType='w')
cur.SetVarNameAndType(['numvar'],[0])
cur.SetVarFormat('numvar',5,2,0)
cur.CommitDictionary()
cur.close()


SetVarLabel Method (Python)

Cursor class,Cursor class,Cursor class
SetVarLabel method,SetVarLabel method,SetVarLabel method
SetVarLabel method,SetVarLabel method,SetVarLabel method
variable label,variable label,variable label

.SetVarLabel(varName,varLabel). Sets the variable label for a new variable. The argument varName is a string specifying the name of a new variable. The argument varLabel is a string specifying the label.

• This method is only available in write mode.

Example Collapse Hide details

Example

cur=spss.Cursor(accessType='w')
cur.SetVarNameAndType(['numvar'],[0])
cur.SetVarLabel('numvar','New numeric variable')
cur.CommitDictionary()
cur.close()


SetVarMeasureLevel Method (Python)

Cursor class,Cursor class,Cursor class
SetVarMeasureLevel method,SetVarMeasureLevel method,SetVarMeasureLevel method
SetVarMeasureLevel method,SetVarMeasureLevel method,SetVarMeasureLevel method
measurement level,measurement level,measurement level

.SetVarMeasureLevel(varName,measureLevel). Sets the measurement level for a new variable. The argument varName is a string specifying the name of a new variable. The argument measureLevel is an integer specifying the measurement level: 2 (nominal), 3 (ordinal), 4 (scale).

• This method is only available in write mode.

Example Collapse Hide details

Example

cur=spss.Cursor(accessType='w')
cur.SetVarNameAndType(['numvar'],[0])
cur.SetVarMeasureLevel('numvar',3)
cur.CommitDictionary()
cur.close()


SetVarNameAndType Method (Python)

Cursor class,Cursor class,Cursor class
SetVarNameAndType method,SetVarNameAndType method,SetVarNameAndType method
SetVarNameAndType method,SetVarNameAndType method,SetVarNameAndType method
active dataset,active dataset,active dataset
creating new variables,creating new variables,creating new variables

.SetVarNameAndType(varName,varType). Creates one or more new variables in the active dataset. The argument varName is a list or tuple of strings that specifies the name of each new variable. The argument varType is a list or tuple of integers specifying the variable type of each variable named in varName. varName and varType must be the same length. For creating a single variable you can also use the SetOneVarNameAndType method.

• This method is only available in write mode.

• Numeric variables are specified by a value of 0 for the variable type. String variables are specified with a type equal to the defined length of the string (maximum of 32767).

Example Collapse Hide details

Example

*python_cursor_create_var.sps.
DATA LIST FREE /var1 (F) var2 (A2)  var3 (F).
BEGIN DATA
11 ab 13
21 cd 23
31 ef  33
END DATA.
BEGIN PROGRAM.
import spss
cur=spss.Cursor(accessType='w')
cur.SetVarNameAndType(['var4','strvar'],[0,8])
cur.SetVarFormat('var4',5,2,0)
cur.CommitDictionary()
for i in range(cur.GetCaseCount()):
   cur.fetchone()
   cur.SetValueNumeric('var4',4+10*(i+1))
   cur.SetValueChar('strvar','row' + str(i+1))
   cur.CommitCase()
cur.close()
END PROGRAM.

Related Topics

SetOneVarNameAndType Method (Python)


SetVarNMissingValues Method (Python)

Cursor class,Cursor class,Cursor class
SetVarNMissingValues method,SetVarNMissingValues method,SetVarNMissingValues method
SetVarNMissingValues method,SetVarNMissingValues method,SetVarNMissingValues method
missing values,missing values,missing values
setting missing values from Python,setting missing values from Python,setting missing values from Python

.SetVarNMissingValues(varName,missingFormat,missingVal1,missingVal2,missingVal3). Sets user-missing values for a new numeric variable. The argument varName is a string specifying the name of a new numeric variable. The argument missingFormat has the value 1 for a discrete list of missing values (for example, 0, 9, 99), the value 2 for a range of missing values (for example, 9–99), and the value 3 for a combination of a discrete value and a range (for example, 0 and 9–99). Use the SetVarCMissingValues method to set missing values for new string variables.

• This method is only available in write mode.

• To specify LO and HI in missing value ranges, use the values returned by the spss.GetSPSSLowHigh function.

The meaning of the arguments missingVal1, missingVal2, and missingVal3 depends on the value of missingFormat as shown in the following table.

missingFormat | missingVal1 | missingVal2 | missingVal3
0 | Discrete value (optional) | Discrete value (optional) | Discrete value (optional)
1 | Start point of range | End point of range | Not applicable
2 | Start point of range | End point of range | Discrete value
Examples Collapse Hide details

Examples

Specify the three discrete missing values 0, 9, and 99 for a new variable.

cur=spss.Cursor(accessType='w')
cur.SetVarNameAndType(['numvar'],[0])
cur.SetVarNMissingValues('numvar',0,0,9,99)
cur.CommitDictionary()
cur.close()

Specify the range of missing values 9–99 for a new variable.

cur=spss.Cursor(accessType='w')
cur.SetVarNameAndType(['numvar'],[0])
cur.SetVarNMissingValues('numvar',1,9,99)
cur.CommitDictionary()
cur.close()

Specify the range of missing values 9–99 and the discrete missing value 0 for a new variable.

cur=spss.Cursor(accessType='w')
cur.SetVarNameAndType(['numvar'],[0])
cur.SetVarNMissingValues('numvar',2,9,99,0)
cur.CommitDictionary()
cur.close()

Related Topics

SetVarCMissingValues Method (Python)


SetVarNValueLabel Method (Python)

Cursor class,Cursor class,Cursor class
SetVarNValueLabel method,SetVarNValueLabel method,SetVarNValueLabel method
SetVarNValueLabel method,SetVarNValueLabel method,SetVarNValueLabel method
value labels,value labels,value labels

.SetVarNValueLabel(varName,value,label). Sets the value label of a single value for a new variable. The argument varName is a string specifying the name of a new numeric variable. The argument value is a numeric value and label is the string specifying the label for this value. Use the SetVarCValueLabel method to set value labels for new string variables.

• This method is only available in write mode.

Example Collapse Hide details

Example

cur=spss.Cursor(accessType='w')
cur.SetVarNameAndType(['numvar'],[0])
cur.SetVarNValueLabel('numvar',1,'female')
cur.CommitDictionary()
cur.close()

Related Topics

SetVarCValueLabel Method (Python)


spss.Dataset Class (Python)

Dataset class,Dataset class,Dataset class
data step,data step,data step
accessing existing datasets,accessing existing datasets,accessing existing datasets
creating new datasets,creating new datasets,creating new datasets

spss.Dataset(name,hidden). Provides the ability to create new datasets, read from existing datasets, and modify existing datasets. A Dataset object provides access to the case data and variable information contained in a dataset, and allows you to read from the dataset, add new cases, modify existing cases, add new variables, and modify properties of existing variables.

An instance of the Dataset class can only be created within a data step or StartProcedure-EndProcedure block, and cannot be used outside of the data step or procedure block in which it was created. Data steps are initiated with the spss.StartDataStep function. You can also use the spss.DataStep class to implicitly start and end a data step without the need to check for pending transformations. See the topic spss.DataStep Class (Python) for more information.

• The argument name is optional and specifies the name of an open dataset for which a Dataset object will be created. Note that this is the name as assigned by PASW Statistics or as specified with DATASET NAME. Specifying name="*" or omitting the argument will create a Dataset object for the active dataset. If the active dataset is unnamed, a name is automatically generated.

• If the Python data type None or the empty string '' is specified for name, then a new empty dataset is created. The name of the dataset is automatically generated and can be retrieved from the name property of the resulting Dataset object. The name cannot be changed from within the data step. To change the name, use the DATASET NAME command following spss.EndDataStep.

A new dataset created with the Dataset class is not set to be the active dataset. To make the dataset the active one, use the spss.SetActive function.

• The optional argument hidden specifies whether the Data Editor window associated with the dataset is hidden--by default, it is displayed. Use hidden=True to hide the associated Data Editor window.

• Instances of the Dataset class created within StartProcedure-EndProcedure blocks cannot be set as the active dataset.

The number of variables in the dataset associated with a Dataset instance is available using the len function, as in:

len(datasetObj)

Note: Datasets that are not required outside of the data step or procedure in which they were accessed or created should be closed prior to ending the data step or procedure in order to free the resources allocated to the dataset. This is accomplished by calling the close method of the Dataset object.

Example: Creating a New Dataset

*python_dataset_new.sps.
BEGIN PROGRAM.
import spss
spss.StartDataStep()
datasetObj = spss.Dataset(name=None)
datasetObj.varlist.append('numvar',0)
datasetObj.varlist.append('strvar',1)
datasetObj.varlist['numvar'].label = 'Sample numeric variable'
datasetObj.varlist['strvar'].label = 'Sample string variable'
datasetObj.cases.append([1,'a'])
datasetObj.cases.append([2,'b'])
spss.EndDataStep()
END PROGRAM.

• You add variables to a dataset using the append (or insert) method of the VariableList object associated with the dataset. The VariableList object is accessed from the varlist property of the Dataset object, as in datasetObj.varlist. See the topic VariableList Class (Python) for more information.

• Variable properties, such as the variable label and measurement level, are set through properties of the associated Variable object, accessible from the VariableList object. For example, datasetObj.varlist['numvar'] accesses the Variable object associated with the variable numvar. See the topic Variable Class (Python) for more information.

• You add cases to a dataset using the append (or insert) method of the CaseList object associated with the dataset. The CaseList object is accessed from the cases property of the Dataset object, as in datasetObj.cases. See the topic CaseList Class (Python) for more information.

Example: Saving New Datasets

When creating new datasets that you intend to save, you'll want to keep track of the dataset names since the save operation is done outside of the associated data step.

*python_dataset_save.sps.
DATA LIST FREE /dept (F2) empid (F4) salary (F6).
BEGIN DATA
7  57  57000
5  23  40200
3  62  21450
3  18  21900
5  21  45000
5  29  32100
7  38  36000
3  42  21900
7  11  27900
END DATA.
DATASET NAME saldata.
SORT CASES BY dept.
BEGIN PROGRAM.
from __future__ import with_statement
import spss
with spss.DataStep():
   ds = spss.Dataset()
   # Create a new dataset for each value of the variable 'dept'
   newds = spss.Dataset(name=None)
   newds.varlist.append('dept')
   newds.varlist.append('empid')
   newds.varlist.append('salary')
   dept = ds.cases[0,0][0]
   dsNames = {newds.name:dept}
   for row in ds.cases:
      if (row[0] != dept):
         newds = spss.Dataset(name=None)
         newds.varlist.append('dept')
         newds.varlist.append('empid')
         newds.varlist.append('salary')
         dept = row[0]
         dsNames[newds.name] = dept
      newds.cases.append(row)
# Save the new datasets
for name,dept in dsNames.iteritems():
   strdept = str(dept)
   spss.Submit(r"""
   DATASET ACTIVATE %(name)s.
   SAVE OUTFILE='/mydata/saldata_%(strdept)s.sav'.
   """ %locals())
spss.Submit(r"""
DATASET ACTIVATE saldata.
DATASET CLOSE ALL.
""" %locals())
END PROGRAM.

• The code newdsObj = spss.Dataset(name=None) creates a new dataset. The name of the dataset is available from the name property, as in newdsObj.name. In this example, the names of the new datasets are stored to the Python dictionary dsNames.

• To save new datasets created with the Dataset class, use the SAVE command after calling spss.EndDataStep. In this example, DATASET ACTIVATE is used to activate each new dataset, using the dataset names stored in dsNames.

Example: Modifying Case Values

*python_dataset_modify_cases.sps.
DATA LIST FREE /cust (F2) amt (F5).
BEGIN DATA
210 4500
242 6900
370 32500
END DATA.
BEGIN PROGRAM.
import spss
spss.StartDataStep()
datasetObj = spss.Dataset()
for i in range(len(datasetObj.cases)):
   # Multiply the value of amt by 1.05 for each case
   datasetObj.cases[i,1] = 1.05*datasetObj.cases[i,1][0]
spss.EndDataStep()
END PROGRAM.

• The CaseList object, accessed from the cases property of a Dataset object, allows you to read or modify case data. To access the value for a given variable within a particular case you specify the case number and the index of the variable (index values represent position in the active dataset, starting with 0 for the first variable in file order, and case numbers start from 0). For example, datasetObj.cases[i,1] specifies the value of the variable with index 1 for case number i.

• When reading case values, results are returned as a list. In the present example we're accessing a single value within each case so the list has one element.

See the topic CaseList Class (Python) for more information.

Example: Comparing Datasets

Dataset objects allow you to concurrently work with the case data from multiple datasets. As a simple example, we'll compare the cases in two datasets and indicate identical cases with a new variable added to one of the datasets.

*python_dataset_compare.sps.
DATA LIST FREE /id (F2) salary (DOLLAR8) jobcat (F1).
BEGIN DATA
1 57000 3
3 40200 1
2 21450 1
END DATA.
SORT CASES BY id.
DATASET NAME empdata1.
DATA LIST FREE /id (F2) salary (DOLLAR8) jobcat (F1).
BEGIN DATA
3 41000 1
1 59280 3
2 21450 1
END DATA.
SORT CASES BY id.
DATASET NAME empdata2.
BEGIN PROGRAM.
import spss
spss.StartDataStep()
datasetObj1 = spss.Dataset(name="empdata1")
datasetObj2 = spss.Dataset(name="empdata2")
nvars = len(datasetObj1)
datasetObj2.varlist.append('match')
for i in range(len(datasetObj1.cases)):
   if datasetObj1.cases[i] == datasetObj2.cases[i,0:nvars]:
      datasetObj2.cases[i,nvars] = 1
   else:
      datasetObj2.cases[i,nvars] = 0
spss.EndDataStep()
END PROGRAM.

• The two datasets are first sorted by the variable id which is common to both datasets.

• Since DATA LIST creates unnamed datasets (the same is true for GET), the datasets are named using DATASET NAME so that you can refer to them when calling spss.Dataset.

• datasetObj1 and datasetObj2 are Dataset objects associated with the two datasets empdata1 and empdata2 to be compared.

• The code datasetObj1.cases[i] returns case number i from empdata1. The code datasetObj2.cases[i,0:nvars] returns the slice of case number i from empdata2 that includes the variables with indexes 0,1,...,nvars-1.

• The new variable match, added to empdata2, is set to 1 for cases that are identical and 0 otherwise.

Related Topics

spss.DataStep Class (Python)
spss.StartDataStep Function (Python)
spss.SetActive Function (Python)
spss.GetDatasets Function (Python)


cases Property (Python)

Dataset class,Dataset class,Dataset class
cases property,cases property,cases property
cases property,cases property,cases property
Dataset class,Dataset class,Dataset class

The cases property of a Dataset object returns an instance of the CaseList class. The CaseList class provides access to the cases in the associated dataset, allowing you to read existing cases, modify case values, and add new cases. See the topic CaseList Class (Python) for more information.

Example

import spss
spss.StartDataStep()
datasetObj = spss.Dataset('data1')
caseListObj = datasetObj.cases
spss.EndDataStep()

Related Topics

CaseList Class (Python)


name Property (Python)

Dataset class,Dataset class,Dataset class
name property,name property,name property
name property,name property,name property
Dataset class,Dataset class,Dataset class

The name property of a Dataset object gets the name of the associated dataset. The name cannot be changed from within the data step. To change the name, use the DATASET NAME command following spss.EndDataStep.

Example

import spss
spss.StartDataStep()
datasetObj = spss.Dataset('data1')
datasetName = datasetObj.name
spss.EndDataStep()


varlist Property (Python)

Dataset class,Dataset class,Dataset class
varlist property,varlist property,varlist property
varlist property,varlist property,varlist property
Dataset class,Dataset class,Dataset class

The varlist property of a Dataset object returns an instance of the VariableList class. The VariableList class provides access to the variables in the associated dataset, allowing you to retrieve the properties of existing variables, modify variable properties, and add new variables to the dataset. See the topic VariableList Class (Python) for more information.

Example

import spss
spss.StartDataStep()
datasetObj = spss.Dataset('data1')
varListObj = datasetObj.varlist
spss.EndDataStep()

Related Topics

VariableList Class (Python)


dataFileAttributes Property (Python)

Dataset class,Dataset class,Dataset class
dataFileAttributes property,dataFileAttributes property,dataFileAttributes property
dataFileAttributes property,dataFileAttributes property,dataFileAttributes property
Dataset class,Dataset class,Dataset class
datafile attributes,datafile attributes,datafile attributes
setting,setting,setting
retrieving,retrieving,retrieving

The dataFileAttributes property of a Dataset object gets or sets datafile attributes for the dataset. The dataFileAttributes property behaves like a Python dictionary in terms of getting, setting, and deleting values. A Python dictionary consists of a set of keys, each of which has an associated value that can be accessed simply by specifying the key. In the case of datafile attributes, each key is the name of an attribute and the associated value is the value of the attribute, which can be a single value or a list or tuple of values. A list or tuple of values specifies an attribute array.

• When setting attributes, attribute names and values must be given as quoted strings.

Retrieving Datafile Attributes. You retrieve datafile attributes for a dataset from the dataFileAttributes property of the associated Dataset object. You can retrieve the value of a particular attribute by specifying the attribute name, as in:

dsObj = spss.Dataset()
attr = dsObj.dataFileAttributes['attrName']

Attribute values are always returned as a tuple.

You can iterate through the set of datafile attributes using the data property, as in:

dsObj = spss.Dataset()
for attrName, attrValue in dsObj.dataFileAttributes.data.iteritems():
   print attrName, attrValue

Adding and Modifying Datafile Attributes. You can add new datafile attributes and modify existing ones. For example:

dsObj.dataFileAttributes['attrName'] = 'value'

• If the attribute attrName exists, it is updated with the specified value. If the attribute attrName doesn't exist, it is added to any existing ones for the dataset.

Resetting Datafile Attributes. You can reset the datafile attributes associated with a dataset. For example:

dsObj.dataFileAttributes = {'attr1':'value','attr2':['val1','val2']}

• You reset the datafile attributes by setting the dataFileAttributes property to a new Python dictionary. Any existing datafile attributes are cleared and replaced with the specified ones.

Deleting Datafile Attributes. You can delete a particular datafile attribute or all of them. For example:

#Delete a specified attribute
del dsObj.dataFileAttributes['attrName']
#Delete all attributes
del dsObj.dataFileAttributes


multiResponseSet Property (Python)

Dataset class,Dataset class,Dataset class
multiResponseSet property,multiResponseSet property,multiResponseSet property
multiResponseSet property,multiResponseSet property,multiResponseSet property
Dataset class,Dataset class,Dataset class
multiple response sets,multiple response sets,multiple response sets
setting,setting,setting
retrieving,retrieving,retrieving

The multiResponseSet property of a Dataset object gets or sets multiple response sets for the dataset. The multiResponseSet property behaves like a Python dictionary in terms of getting, setting, and deleting values. A Python dictionary consists of a set of keys, each of which has an associated value that can be accessed simply by specifying the key. In the case of multiple response sets, each key is the name of a set and the associated value specifies the details of the set.

• The multiple response set name is a string of maximum length 63 bytes that must follow PASW Statistics variable naming conventions. If the specified name does not begin with a dollar sign ($), then one is added. If the name refers to an existing set, the set definition is overwritten.

• When setting a multiple response set, the details of the set are specified as a list or tuple with the following elements in the presented order.

mrsetLabel. A string specifying a label for the set. The value cannot be wider than the limit for PASW Statistics variable labels.

mrsetCodeAs. An integer or string specifying the variable coding: 1 or "Categories" for multiple category sets, 2 or "Dichotomies" for multiple dichotomy sets.

mrsetCountedValue. A string specifying the value that indicates the presence of a response for a multiple dichotomy set. This is also referred to as the “counted” value. If the set type is numeric, the value must be a string representation of an integer. If the set type is string, the counted value, after trimming trailing blanks, cannot be wider than the narrowest elementary variable.

varNames. A tuple or list of strings specifying the names of the elementary variables that define the set (the list must include at least two variables).

• When getting a multiple response set, the result is a tuple of 5 elements. The first element is the label, if any, for the set. The second element specifies the variable coding--'Categories' or 'Dichotomies'. The third element specifies the counted value and only applies to multiple dichotomy sets. The fourth element specifies the data type--'Numeric' or 'String'. The fifth element is a list of the elementary variables that define the set.

Retrieving Multiple Response Sets. You retrieve multiple response sets for a dataset from the multiResponseSet property of the associated Dataset object. You retrieve the value of a particular set by specifying the set name, as in:

dsObj = spss.Dataset()
mrset = dsObj.multiResponseSet['setName']

You can iterate through the multiple response sets using the data property, as in:

dsObj = spss.Dataset()
for name, set in dsObj.multiResponseSet.data.iteritems():
   print name, set

Adding and Modifying Multiple Response Sets. You can add new multiple response sets and modify details of existing ones. For example:

dsObj.multiResponseSet['$mltnews'] = \
                       ["News Sources",2,"1",["Newspaper","TV","Web"]]

• If the set $mltnews exists, it is updated with the specified values. If the set $mltnews doesn't exist, it is added to any existing ones for the dataset.

Resetting Multiple Response Sets. You can reset the multiple response sets associated with a dataset. For example:

dsObj.multiResponseSet = \
{'$mltnews':["News Sources",2,"1",["Newspaper","TV","Web"]],
 '$mltent':["Entertainment Sources",2,"1",["TV","Movies","Theatre","Music"]]}

• You reset the multiple response sets by setting the multiResponseSet property to a new Python dictionary. Any existing multiple response sets are cleared and replaced with the specified ones.

Deleting Multiple Response Sets. You can delete a particular multiple response set or all sets. For example:

#Delete a specified set
del dsObj.multiResponseSet['setName']
#Delete all sets
del dsObj.multiResponseSet


close Method (Python)

Dataset class,Dataset class,Dataset class
close method,close method,close method
close method,close method,close method
Dataset class,Dataset class,Dataset class

.close(). Closes the dataset. This method closes a dataset accessed through or created by the Dataset class. It cannot be used to close an arbitrary open dataset. When used, it must be called prior to EndDataStep or EndProcedure.

• If the associated dataset is not the active dataset, that dataset is closed and no longer available in the session. The associated dataset will, however, remain open outside of the data step or procedure in which it was created if the close method is not called.

• If the associated dataset is the active dataset, the association with the dataset's name is broken. The active dataset remains active but has no name.

Note: Datasets that are not required outside of the data step or procedure in which they were accessed or created should be closed prior to ending the data step or procedure in order to free the resources allocated to the dataset.

Example

import spss
spss.StartDataStep()
datasetObj1 = spss.Dataset()
datasetObj2 = datasetObj1.deepCopy(name="copy1")
datasetObj1.close()
spss.EndDataStep()


deepCopy Method (Python)

Dataset class,Dataset class,Dataset class
deepCopy method,deepCopy method,deepCopy method
deepCopy method,deepCopy method,deepCopy method
Dataset class,Dataset class,Dataset class
data,data,data
copying datasets,copying datasets,copying datasets
data step,data step,data step
copying datasets,copying datasets,copying datasets

.deepCopy(name). Creates a copy of the Dataset instance as well as a copy of the dataset associated with the instance. The argument is required and specifies the name of the new dataset, as a quoted string. The name cannot be the name of the dataset being copied or a blank string. If '*' is specified the copy becomes the active dataset with a name that is automatically generated. You can retrieve the dataset name from the name property of the new Dataset instance.

Example

import spss
spss.StartDataStep()
datasetObj1 = spss.Dataset()
# Make a copy of the active dataset and assign it the name "copy1"
datasetObj2 = datasetObj1.deepCopy(name="copy1")
spss.EndDataStep()


CaseList Class (Python)

CaseList class,CaseList class,CaseList class
data step,data step,data step
reading case data,reading case data,reading case data
modifying cases,modifying cases,modifying cases
data,data,data
reading case data,reading case data,reading case data
modifying cases,modifying cases,modifying cases

The CaseList class provides access to the cases in a dataset, allowing you to read existing cases, modify case values, and add new cases. You get an instance of the CaseList class from the cases property of the Dataset class, as in:

datasetObj = spss.Dataset('data1')
caseListObj = datasetObj.cases

The number of cases in a CaseList instance, which is also the number of cases in the associated dataset, is available using the len function, as in:

len(caseListObj)

Note: An instance of the CaseList class can only be created within a data step, and cannot be used outside of the data step in which it was created. Data steps are initiated with the spss.StartDataStep function.

Looping through the cases in an instance of CaseList. You can loop through the cases in an instance of the CaseList class. For example:

for row in datasetObj.cases:
   print row

• On each iteration of the loop, row is a case from the associated dataset.

Note: The CaseList class does not provide any special handling for datasets with split groups--it simply returns all cases in the dataset. If you need to differentiate the data in separate split groups, consider using the Cursor class to read your data, or you may want to use the spss.GetSplitVariableNames function to manually process the split groups.

Accessing specific cases and case values. You can access a specific case or a range of cases, and you can specify a variable or a range of variables within those cases.

• System-missing values are returned as the Python data type None.

• Values of variables with date or datetime formats are returned as integers representing the number of seconds from October 14, 1582. Values of variables with TIME and DTIME formats are returned as integers representing the number of seconds in the time interval. You can convert from a datetime value to a Python datetime object using the CvtSpssDatetime function from the spssdata module, a supplementary Python module included with the plug-in.

Example: Accessing a Single Case

Case values are accessed by specifying the case number, starting with 0, as in:

oneCase = datasetObj.cases[0]

Case values are returned as a list where each element of the list is the value of the associated variable.

Example: Accessing a Single Value Within a Case

You can access the value for a single variable within a case by specifying the case number and the index of the variable (index values represent position in the active dataset, starting with 0 for the first variable in file order). The following gets the value of the variable with index 1 for case number 0.

oneValue = datasetObj.cases[0,1]

Example: Accessing a Range of Values

You can use the Python slice notation to specify ranges of cases and ranges of variables within a case. Values for multiple cases are returned as a list of elements, each of which is a list of values for a single case.

# Get the values for cases 0,1, and 2
data = datasetObj.cases[0:3]
# Get the values for variables with index values 0,1, and 2
# for case number 0
data = datasetObj.cases[0,0:3]
# Get the value for the variable with index 1 for case numbers 0,1, and 2
data = datasetObj.cases[0:3,1]
# Get the values for the variables with index values 1,2 and 3
# for case numbers 4,5, and 6
data = datasetObj.cases[4:7,1:4]

Example: Negative Index Values

Case indexing supports the use of negative indices, both for the case number and the variable index. The following gets the value of the second to last variable (in file order) for the last case.

value = datasetObj.cases[-1,-2]

Modifying case values. You can modify the values for a specific case or a range of cases, and you can set the value of a particular variable or a range of variables within those cases.

• Values of None are converted to system-missing for numeric variables and blanks for string variables.

• Values of numeric variables with a date or datetime format should be specified as Python time.struct_time or datetime.datetime objects, which are then converted to the appropriate PASW Statistics value. Values of variables with TIME and DTIME formats should be specified as the number of seconds in the time interval.

Example: Setting Values for a Single Case

Values for a single case are provided as a list or tuple of values. The first element corresponds to the first variable in file order, the second element corresponds to the second variable in file order, and so on. Case numbers start from 0.

datasetObj.cases[1] = [35,150,100,2110,19,2006,3,4]

Example: Setting a Single Value Within a Case

You can set the value for a single variable within a case by specifying the case number and the index of the variable (index values represent position in the active dataset, starting with 0 for the first variable in file order). The following sets the value of the variable with index 0 for case number 12 (case numbers start from 0).

datasetObj.cases[12,0] = 14

Example: Setting Ranges of Values

You can use the Python slice notation to specify ranges of cases and ranges of variables within a case. Values for multiple cases are specified as a list or tuple of elements, each of which is a list or tuple of values for a single case.

# Set the values for cases 0,1, and 2
datasetObj.cases[0:3] = ([172,'m',27,34500],[67,'f',32,32500],
                         [121,'f',37,23000])
# Set the values for variables with index values 5,6, and 7 for
# case number 34
datasetObj.cases[34,5:8] = [70,1,4]
# Set the value for the variable with index 5 for case numbers 0,1, and 2
datasetObj.cases[0:3,5] = [70,72,71]
# Set the values for the variables with index values 5 and 6 for
# case numbers 4,5, and 6
datasetObj.cases[4:7,5:7] = ([70,1],[71,2],[72,2])

Example: Negative Index Values

Case indexing supports the use of negative indices, both for the case number and the variable index. The following specifies the value of the second to last variable (in file order) for the last case.

datasetObj.cases[-1,-2] = 8

Deleting cases. You can delete a specified case from the CaseList object, which results in deleting that case from the associated dataset. For example:

del datasetObj.cases[0]

Related Topics

cases Property (Python)


append Method (Python)

CaseList class,CaseList class,CaseList class
append method,append method,append method
append method,append method,append method
CaseList class,CaseList class,CaseList class
data,data,data
appending cases,appending cases,appending cases
data step,data step,data step
appending cases,appending cases,appending cases

.append(case). Appends a new case to the associated dataset and appends an element representing the case to the corresponding CaseList instance. The argument case is a tuple or list specifying the case values. The first element in the tuple or list is the value for the first variable in file order, the second is the value of the second variable in file order and so on.

• The elements of case can be numeric or string values and must match the variable type of the associated variable. Values of None are converted to system-missing for numeric variables and blanks for string variables.

• Values of numeric variables with a date or datetime format should be specified as Python time.struct_time or datetime.datetime objects, which are then converted to the appropriate PASW Statistics value. Values of variables with TIME and DTIME formats should be specified as the number of seconds in the time interval.

Example

*python_dataset_append_case.sps.
DATA LIST FREE/numvar (F2) strvar (A1).
BEGIN DATA.
1 a
END DATA.
BEGIN PROGRAM.
import spss
spss.StartDataStep()
datasetObj = spss.Dataset()
# Append a single case to the active dataset
datasetObj.cases.append([2,'b'])
spss.EndDataStep()
END PROGRAM.

Related Topics

insert Method (Python)


insert Method (Python)

CaseList class,CaseList class,CaseList class
insert method,insert method,insert method
insert method,insert method,insert method
CaseList class,CaseList class,CaseList class
data,data,data
inserting cases,inserting cases,inserting cases
data step,data step,data step
inserting cases,inserting cases,inserting cases

.insert(case, caseNumber). Inserts a new case into the associated dataset and inserts an element representing the case into the corresponding CaseList instance. The argument case is a tuple or list specifying the case values. The first element in the tuple or list is the value for the first variable in file order, the second is the value of the second variable in file order and so on. The optional argument caseNumber specifies the location at which the case is inserted (case numbers start from 0) and can take on the values 0,1,...,n where n is the number of cases in the dataset. If caseNumber is omitted or equal to n, the case is appended.

• The elements of case can be numeric or string values and must match the variable type of the associated variable. Values of None are converted to system-missing for numeric variables and blanks for string variables.

• Values of numeric variables with a date or datetime format should be specified as Python time.struct_time or datetime.datetime objects, which are then converted to the appropriate PASW Statistics value. Values of variables with TIME and DTIME formats should be specified as the number of seconds in the time interval.

Example

*python_dataset_insert_case.sps.
DATA LIST FREE/numvar (F2) strvar (A1).
BEGIN DATA.
1 a
3 c
END DATA.
BEGIN PROGRAM.
import spss
spss.StartDataStep()
datasetObj = spss.Dataset()
# Insert a single case into the active dataset at case number 1
datasetObj.cases.insert([2,'b'],1)
spss.EndDataStep()
END PROGRAM.

Related Topics

append Method (Python)


VariableList Class (Python)

VariableList class,VariableList class,VariableList class
data,data,data
accessing variable properties,accessing variable properties,accessing variable properties
data step,data step,data step
accessing variable properties,accessing variable properties,accessing variable properties

The VariableList class provides access to the variables in a dataset, allowing you to get and set properties of existing variables, as well as add new variables to the dataset. You get an instance of the VariableList class from the varlist property of the Dataset class, as in:

datasetObj = spss.Dataset('data1')
varListObj = datasetObj.varlist

The number of variables in a VariableList instance, which is also the number of variables in the associated dataset, is available using the len function, as in:

len(varListObj)

Note: An instance of the VariableList class can only be created within a data step, and cannot be used outside of the data step in which it was created. Data steps are initiated with the spss.StartDataStep function.

Looping through the variables in an instance of VariableList. You can loop through the variables in an instance of the VariableList class, obtaining a Variable object (representing the properties of a single variable) on each iteration. For example:

for var in datasetObj.varlist:
   print var.name

• On each iteration of the loop, var is an instance of the Variable class, representing a particular variable in the VariableList instance. The Variable class allows you to get and set variable properties, like the measurement level and missing values. See the topic Variable Class (Python) for more information.

Accessing a variable by name or index. You can obtain a Variable object for a specified variable in the VariableList instance. The desired variable can be specified by name or index. For example:

#Get variable by name
varObj = datasetObj.varlist['salary']
#Get variable by index
varObj = datasetObj.varlist[5]

Deleting a variable. You can delete a specified variable from the VariableList instance, which results in deleting it from the associated dataset. The variable to be deleted can be specified by name or index. For example:

#Delete variable by name
del datasetObj.varlist['salary']
#Delete variable by index
del datasetObj.varlist[5]

Related Topics

varlist Property (Python)


append Method (Python)

VariableList class,VariableList class,VariableList class
append method,append method,append method
append method,append method,append method
VariableList class,VariableList class,VariableList class
data,data,data
appending new variables,appending new variables,appending new variables
data step,data step,data step
appending new variables,appending new variables,appending new variables

.append(name,type). Appends a new variable to the associated dataset and appends a corresponding Variable object to the associated VariableList instance. The argument name specifies the variable name. The argument type is optional and specifies the variable type--numeric or string. The default is numeric.

• Numeric variables are specified by a value of 0 for the variable type. String variables are specified with a type equal to the defined length of the string (maximum of 32767).

• The properties of the new variable are set using the Variable object created by the append method. See the topic Variable Class (Python) for more information.

Example

*python_dataset_append_variable.sps.
DATA LIST FREE/numvar (F2).
BEGIN DATA.
1
END DATA.
BEGIN PROGRAM.
import spss
spss.StartDataStep()
datasetObj = spss.Dataset()
# Append a string variable of length 1 to the active dataset
datasetObj.varlist.append('strvar',1)
spss.EndDataStep()
END PROGRAM.

Related Topics

insert Method (Python)


insert Method (Python)

VariableList class,VariableList class,VariableList class
insert method,insert method,insert method
insert method,insert method,insert method
VariableList class,VariableList class,VariableList class
data,data,data
inserting new variables,inserting new variables,inserting new variables
data step,data step,data step
inserting new variables,inserting new variables,inserting new variables

.insert(name,type,index). Inserts a new variable into the associated dataset and inserts a corresponding Variable object into the associated VariableList instance. The argument name specifies the variable name. The optional argument type specifies the variable type--numeric or string. If type is omitted, the variable is numeric. The optional argument index specifies the position for the inserted variable and Variable object (the first position has an index value of 0) and can take on the values 0,1,...,n where n is the number of variables in the dataset. If index is omitted or equal to n, the variable is appended to the end of the list.

• Numeric variables are specified by a value of 0 for the variable type. String variables are specified with a type equal to the defined length of the string (maximum of 32767).

• The properties of the new variable are set using the Variable object created by the insert method. See the topic Variable Class (Python) for more information.

Example

*python_dataset_insert_variable.sps.
DATA LIST FREE/var1 (F2) var3 (A1).
BEGIN DATA.
1 a
END DATA.
BEGIN PROGRAM.
import spss
spss.StartDataStep()
datasetObj = spss.Dataset()
# Insert a numeric variable at index position 1 in the active dataset
datasetObj.varlist.insert('var2',0,1)
spss.EndDataStep()
END PROGRAM.

Related Topics

append Method (Python)


Variable Class (Python)

Variable class,Variable class,Variable class

The Variable class allows you to get and set the properties of a variable. Instances of the Variable class for each variable in the associated dataset are generated when the VariableList class is instantiated. In addition, the append and insert methods of a VariableList object create associated instances of the Variable class for appended and inserted variables. Specific variables can be accessed by name or index (index values represent position in the dataset, starting with 0 for the first variable in file order).

datasetObj = spss.Dataset('data1')
# Create a Variable object, specifying the variable by name
varObj = datasetObj.varlist['bdate']
# Create a Variable object, specifying the variable by index
varObj = datasetObj.varlist[3]

Note: An instance of the Variable class can only be created within a data step, and cannot be used outside of the data step in which it was created. Data steps are initiated with the spss.StartDataStep function.


alignment Property (Python)

Variable class,Variable class,Variable class
alignment property,alignment property,alignment property
alignment property,alignment property,alignment property
Variable class,Variable class,Variable class
variable alignment,variable alignment,variable alignment
getting and setting,getting and setting,getting and setting

The alignment property of a Variable object gets or sets the alignment of data values displayed in the Data Editor. It has no effect on the format of the variables or the display of the variables or values in other windows or printed results. The variable alignment is specified as an integer with one of the following values: 0 (left), 1 (right), 2 (center).

Example

varObj = datasetObj.varlist['gender']
#Get the variable alignment
align = varObj.alignment
#Set the variable alignment
varObj.alignment = 1


attributes Property (Python)

Variable class,Variable class,Variable class
attributes property,attributes property,attributes property
attributes property,attributes property,attributes property
Variable class,Variable class,Variable class
variable attributes,variable attributes,variable attributes
retrieving,retrieving,retrieving
setting,setting,setting

The attributes property of a Variable object gets or sets custom variable attributes. It can also be used to clear any custom attributes. The attributes property behaves like a Python dictionary in terms of getting, setting, and deleting values. A Python dictionary consists of a set of keys, each of which has an associated value that can be accessed simply by specifying the key. In the case of variable attributes, each key is the name of an attribute and the associated value is the value of the attribute, which can be a single value or a list or tuple of values. A list or tuple of values specifies an attribute array.

• When setting attributes, attribute names and values must be given as quoted strings.

Retrieving Variable Attributes. You retrieve custom variable attributes for a specified variable from the attributes property of the associated Variable object. You retrieve the value of a particular attribute by specifying the attribute name, as in:

varObj = datasetObj.varlist['gender']
attrValue = varObj.attributes['attrName']

Attribute values are always returned as a tuple.

You can iterate through the set of variable attributes using the data property, as in:

varObj = datasetObj.varlist['gender']
for attrName, attrValue in varObj.attributes.data.iteritems():
   print attrName, attrValue

Adding and Modifying Attributes. You can add new attributes and modify values of existing ones. For example:

varObj = datasetObj.varlist['age']
varObj.attributes['AnswerFormat'] = 'Fill-in'

• If the attribute AnswerFormat exists, its value is updated to 'Fill-in'. If the attribute AnswerFormat doesn't exist, it is added to any existing ones for the variable age.

Resetting Attributes. You can reset the attributes to a new specified set. For example:

varObj = datasetObj.varlist['gender']
varObj.attributes = {'DemographicVars':'1','Binary':'Yes'}

• You reset the attributes by setting the attributes property to a new Python dictionary. Any existing attributes for the variable are cleared and replaced with the specified set.

Deleting Attributes. You can delete a particular attribute or the entire set of attributes for a specified variable. For example:

varObj = datasetObj.varlist['gender']
#Delete the attribute Binary
del varObj.attributes['Binary']
#Delete all attributes
del varObj.attributes


columnWidth Property (Python)

Variable class,Variable class,Variable class
columnWidth property,columnWidth property,columnWidth property
columnWidth property,columnWidth property,columnWidth property
Variable class,Variable class,Variable class
column width,column width,column width
getting and setting,getting and setting,getting and setting

The columnWidth property of a Variable object gets or sets the column width of data values displayed in the Data Editor. Changing the column width does not change the defined width of a variable. When setting the column width, the specified value must be a positive integer.

Example

varObj = datasetObj.varlist['prevexp']
#Get the column width
width = varObj.columnWidth
#Set the column width
varObj.columnWidth = 3


format Property (Python)

Variable class,Variable class,Variable class
format property,format property,format property
format property,format property,format property
Variable class,Variable class,Variable class
variable format,variable format,variable format
getting and setting,getting and setting,getting and setting
format of variables,format of variables,format of variables

The format property of a Variable object gets or sets the display format of a variable.

Example

varObj = datasetObj.varlist['id']
#Get the variable format
format = varObj.format
#Set the variable format
varObj.format = (5,5,0)

• When getting the format, the returned value is a string consisting of a character portion (in upper case) that specifies the format type, followed by a numeric component that indicates the defined width, followed by a component that specifies the number of decimal positions and is only included for numeric formats. For example, A4 is a string format with a maximum width of four, and F8.2 is a standard numeric format with a display format of eight digits, including two decimal positions and a decimal indicator.

• When setting the format, you provide a tuple or list of three integers specifying the format type, width, and the number of decimal digits (for numeric formats) in that order. The width must include enough positions to accommodate any punctuation characters such as decimal points, commas, dollar signs, or date and time delimiters. If decimal digits do not apply, use 0 for the third element of the list or tuple. The available format types are listed in Variable Format Types.

Notes

• Allowable settings for decimal and width depend on the specified type. For a list of the minimum and maximum widths and maximum decimal places for commonly used format types, see Variable Types and Formats.

• Setting the width for a string variable will not change the defined length of the string. If the specified value does not match the defined length, it is forced to be the defined length.


index Property (Python)

Variable class,Variable class,Variable class
index property,index property,index property
index property,index property,index property
Variable class,Variable class,Variable class

The index property of a Variable object gets the variable index. The index value represents position in the dataset starting with 0 for the first variable in file order.

Example

varObj = datasetObj.varlist['bdate']
index = varObj.index


label Property (Python)

Variable class,Variable class,Variable class
label property,label property,label property
label property,label property,label property
Variable class,Variable class,Variable class
variable label,variable label,variable label
getting and setting,getting and setting,getting and setting
labels,labels,labels
variable,variable,variable

The label property of a Variable object gets or sets the variable label.

Example

varObj = datasetObj.varlist['bdate']
#Get the variable label
label = varObj.label
#Set the variable label
varObj.label = 'Birth Date'


measurementLevel Property (Python)

Variable class,Variable class,Variable class
measurementLevel property,measurementLevel property,measurementLevel property
measurementLevel property,measurementLevel property,measurementLevel property
Variable class,Variable class,Variable class
measurement level,measurement level,measurement level
getting and setting,getting and setting,getting and setting

The measurementLevel property of a Variable object gets or sets the measurement level of a variable. The measurement level is specified as a string. When setting the measurement level the allowed values are: "NOMINAL", "ORDINAL", and "SCALE". When getting the measurement level the additional value "UNKNOWN" may be returned for numeric variables prior to the first data pass when the measurement level has not been explicitly set, such as data read from an external source or newly created variables. The measurement level for string variables is always known.

Example

varObj = datasetObj.varlist['minority']
#Get the measurement level
level = varObj.measurementLevel
#Set the measurement level
varObj.measurementLevel = "NOMINAL"


missingValues Property (Python)

Variable class,Variable class,Variable class
missingValues property,missingValues property,missingValues property
missingValues property,missingValues property,missingValues property
Variable class,Variable class,Variable class
missing values,missing values,missing values
getting and setting,getting and setting,getting and setting

The missingValues property of a Variable object gets or sets user-missing values. The missing values are specified as a tuple or list of four elements where the first element specifies the missing value type: 0,1,2, or 3 for that number of discrete values, -2 for a range of values, and -3 for a range of values and a single discrete value. The remaining three elements specify the missing values. When getting missing values, the result is returned as a tuple with this same structure.

• For string variables, returned values are right-padded to the defined width of the string variable.

• To specify LO and HI in missing value ranges, use the values returned by the spss.GetSPSSLowHigh function.

The structure of the tuple or list that specifies the missing values is shown in the following table.

missingVals[0] | missingVals[1] | missingVals[2] | missingVals[3]
-3 | Start point of range | End point of range | Discrete value
-2 | Start point of range | End point of range | None
0 | None | None | None
1 | Discrete value | None | None
2 | Discrete value | Discrete value | None
3 | Discrete value | Discrete value | Discrete value

Examples

In the following examples, varObj is an instance of the Variable class.

Get the user-missing values.

missingVals = varObj.missingValues

Specify the discrete missing values 0 and 9 for a numeric variable.

varObj.missingValues = [2,0,9,None]

Specify the range of missing values 9–99 for a numeric variable.

varObj.missingValues = [-2,9,99,None]

Specify the range of missing values 9–99 and the discrete missing value 0 for a numeric variable.

varObj.missingValues = [-3,9,99,0]

Specify two missing values for a string variable.

varObj.missingValues = [2,' ','NA',None]

Clear all missing values

varObj.missingValues = [0,None,None,None]


name Property (Python)

Variable class,Variable class,Variable class
name property,name property,name property
name property,name property,name property
Variable class,Variable class,Variable class
variable names,variable names,variable names
getting and setting,getting and setting,getting and setting
names of variables,names of variables,names of variables

The name property of a Variable object gets or sets the variable name.

Example

varObj = datasetObj.varlist['bdate']
#Get the variable name
name = varObj.name
#Set the variable name
varObj.name = 'birthdate'


type Property (Python)

Variable class,Variable class,Variable class
type property,type property,type property
type property,type property,type property
Variable class,Variable class,Variable class
variable type,variable type,variable type
getting and setting,getting and setting,getting and setting
string variables,string variables,string variables
numeric variables,numeric variables,numeric variables
data types,data types,data types

The type property of a Variable object gets or sets the variable type--numeric or string. The variable type for numeric variables is 0. The variable type for string variables is an integer equal to the defined length of the string (maximum of 32767).

Example

varObj = datasetObj.varlist['strvar']
#Get the variable type
type = varObj.type
#Set the variable type to a string of length 10
varObj.type = 10


valueLabels Property (Python)

Variable class,Variable class,Variable class
valueLabels property,valueLabels property,valueLabels property
valueLabels property,valueLabels property,valueLabels property
Variable class,Variable class,Variable class
value labels,value labels,value labels
getting and setting,getting and setting,getting and setting

The valueLabels property of a Variable object gets or sets value labels. It can also be used to clear any value labels. The valueLabels property behaves like a Python dictionary in terms of getting, setting, and deleting values. A Python dictionary consists of a set of keys, each of which has an associated value that can be accessed simply by specifying the key. In the case of value labels, each key is a value and the associated value is the label.

• When setting value labels for string variables, values must be specified as quoted strings.

Retrieving Value Labels. You retrieve value labels for a specified variable from the valueLabels property of the associated Variable object. You retrieve the label for a particular value by specifying the value, as in the following, which retrieves the label for the value 1:

varObj = datasetObj.varlist['origin']
valLab = varObj.valueLabels[1]

You can iterate through the set of value labels for a variable using the data property, as in:

varObj = datasetObj.varlist['origin']
for val, valLab in varObj.valueLabels.data.iteritems():
   print val, valLab

Adding and Modifying Value Labels. You can add new value labels and modify existing ones. For example:

varObj = datasetObj.varlist['origin']
varObj.valueLabels[4] = 'Korean'

• If a label for the value 4 exists, its value is updated to 'Korean'. If a label for the value 4 doesn't exist, it is added to any existing value labels for the variable origin.

Resetting Value Labels. You can reset the value labels to a new specified set. For example:

varObj = datasetObj.varlist['origin']
varObj.valueLabels = {1:'American',2:'Japanese',3:'European',
                      4:'Korean',5:'Chinese'}

• You reset the value labels by setting the valueLabels property to a new Python dictionary. Any existing value labels for the variable are cleared and replaced with the specified set.

Deleting Value Labels. You can delete a particular value label or the entire set of value labels for a specified variable. For example:

varObj = datasetObj.varlist['origin']
#Delete the value label for the value 1
del varObj.valueLabels[1]
#Delete all value labels
del varObj.valueLabels


spss.DataStep Class (Python)

DataStep class,DataStep class,DataStep class
data step,data step,data step

The DataStep class implicitly starts and ends a data step without the need to explicitly call StartDataStep and EndDataStep. In addition, it executes any pending transformations, eliminating the need to check for them prior to starting a data step. The DataStep class is designed to be used with the Python with statement as shown in the following example.

Example

*python_DataStep.sps.
BEGIN PROGRAM.
from __future__ import with_statement
import spss
with spss.DataStep():
   datasetObj = spss.Dataset(name=None)
   datasetObj.varlist.append('numvar')
   datasetObj.varlist.append('strvar',1)
   datasetObj.varlist['numvar'].label = 'Sample numeric variable'
   datasetObj.varlist['strvar'].label = 'Sample string variable'
   datasetObj.cases.append([1,'a'])
   datasetObj.cases.append([2,'b'])
END PROGRAM.

• The code from __future__ import with_statement makes the Python with statement available to the program block.

• with spss.DataStep(): initiates a block of code associated with a data step. The data step is implicitly started after executing any pending transformations. All code associated with the data step should reside in the block as shown here. When the block completes, the data step is implicitly ended.

Related Topics

spss.Dataset Class (Python)
spss.StartDataStep Function (Python)


spss.DeleteXPathHandle Function (Python)

DeleteXPathHandle,DeleteXPathHandle,DeleteXPathHandle

spss.DeleteXPathHandle(handle). Deletes the XPath dictionary DOM or output DOM with the specified handle name. The argument is a handle name that was defined with a previous spss.CreateXPathDictionary function or an PASW StatisticsOMS command.

Example

handle = 'demo'
spss.DeleteXPathHandle(handle)

Related Topics

spss.CreateXPathDictionary Function (Python)
spss.EvaluateXPath Function (Python)
spss.GetHandleList Function (Python)
spss.GetXmlUtf16 Function (Python)


spss.EndDataStep Function (Python)

EndDataStep,EndDataStep,EndDataStep
data step,data step,data step
ending,ending,ending

spss.EndDataStep(). Signals the end of a data step.

• EndDataStep must be called to end a data step initiated with StartDataStep.

For an example that uses EndDataStep, see the topic on the Dataset class.

Related Topics

spss.StartDataStep Function (Python)


spss.EndProcedure Function (Python)

EndProcedure,EndProcedure,EndProcedure

spss.EndProcedure(). Signals the end of pivot table or text block output.

• spss.EndProcedure must be called to end output initiated with spss.StartProcedure.

Related Topics

spss.StartProcedure Function (Python)


spss.EvaluateXPath Function (Python)

EvaluateXPath,EvaluateXPath,EvaluateXPath
dictionary,dictionary,dictionary
reading dictionary information from Python,reading dictionary information from Python,reading dictionary information from Python
output,output,output
reading output results from Python,reading output results from Python,reading output results from Python
OXML,OXML,OXML
reading output XML in Python,reading output XML in Python,reading output XML in Python
XPath expressions,XPath expressions,XPath expressions

spss.EvaluateXPath(handle,context,xpath). Evaluates an XPath expression against a specified XPath DOM and returns the result as a list. The argument handle specifies the particular XPath DOM and must be a valid handle name defined by a previous spss.CreateXPathDictionary function or PASW StatisticsOMS command. The argument context defines the XPath context for the expression and should be set to "/dictionary" for a dictionary DOM or "/outputTree" for an output XML DOM created by the OMS command. The argument xpath specifies the remainder of the XPath expression and must be quoted.

Example Collapse Hide details

Example

#retrieve a list of all variable names for the active dataset.
handle='demo'
spss.CreateXPathDictionary(handle)
context = "/dictionary"
xpath = "variable/@name"
varnames = spss.EvaluateXPath(handle,context,xpath)
Example Collapse Hide details

Example

*python_EvaluateXPath.sps.
*Use OMS and a Python program to determine the number of uniques values
  for a specific variable.
OMS SELECT TABLES
  /IF COMMANDs=['Frequencies'] SUBTYPES=['Frequencies']
 /DESTINATION FORMAT=OXML XMLWORKSPACE='freq_table'.
FREQUENCIES VARIABLES=var1.
OMSEND.

BEGIN PROGRAM.
import spss
handle='freq_table'
context="/outputTree"
#get rows that are totals by looking for varName attribute
#use the group element to skip split file category text attributes
xpath="//group/category[@varName]/@text"
values=spss.EvaluateXPath(handle,context,xpath)
#the "set" of values is the list of unique values
#and the length of that set is the number of unique values
uniqueValuesCount=len(set(values))
END PROGRAM.

Note: In the PASW Statistics documentation, XPath examples for the OMS command use a namespace prefix in front of each element name (the prefix oms: is used in the OMS examples). Namespace prefixes are not valid for EvaluateXPath.

Documentation for the output schema and the dictionary schema is available from the Help system.

Related Topics

spss.CreateXPathDictionary Function (Python)
spss.DeleteXPathHandle Function (Python)
spss.GetHandleList Function (Python)
spss.GetXmlUtf16 Function (Python)


spss.GetCaseCount Function (Python)

GetCaseCount,GetCaseCount,GetCaseCount
case count,case count,case count
number of cases (rows),number of cases (rows),number of cases (rows)
row count,row count,row count

spss.GetCaseCount(). Returns the number of cases (rows) in the active dataset.

Example

#python_GetCaseCount.sps
#build SAMPLE syntax of the general form:
#SAMPLE [NCases] FROM [TotalCases]
#Where Ncases = 10% truncated to integer
TotalCases=spss.GetCaseCount()
NCases=int(TotalCases/10)
command1="SAMPLE " + str(NCases) + " FROM " + str(TotalCases) +  "."
command2="Execute."
spss.Submit([command1, command2])


spss.GetDataFileAttributeNames Function (Python)

GetDataFileAttributeNames,GetDataFileAttributeNames,GetDataFileAttributeNames
datafile attributes,datafile attributes,datafile attributes
retrieving,retrieving,retrieving

spss.GetDataFileAttributeNames(). Returns the names of any datafile attributes, as a tuple, for the active dataset.

Example

import spss
fileattrs = spss.GetDataFileAttributeNames()


spss.GetDataFileAttributes Function (Python)

GetDataFileAttributes,GetDataFileAttributes,GetDataFileAttributes
datafile attributes,datafile attributes,datafile attributes
retrieving,retrieving,retrieving

spss.GetDataFileAttributes(attrName). Returns the attribute values, as a tuple, for the specified datafile attribute. The argument attrName is a string that specifies the name of the attribute--for instance, a name returned by GetDataFileAttributeNames.

Example

# Build a Python dictionary of the datafile attributes
import spss
attrDict = {}
for name in spss.GetDataFileAttributeNames():
   attrDict[name] = spss.GetDataFileAttributes(name)


spss.GetDatasets Function (Python)

GetDatasets,GetDatasets,GetDatasets

spss.GetDatasets(). Returns a list of the available Dataset objects. Each object in the list is an instance of the Dataset class. The GetDatasets function is intended for use within a data step or a StartProcedure-EndProcedure block and will return an empty list if used elsewhere. Data steps are initiated with the spss.StartDataStep function and are used to create and manage multiple datasets.

Example

import spss
spss.StartDataStep()
# Create a Dataset object for the active dataset
datasetObj1 = spss.Dataset()
# Create a new and empty dataset
datasetObj2 = spss.Dataset(name=None)
datasetNames = [item.name for item in spss.GetDatasets()]
spss.EndDataStep()

Related Topics

spss.Dataset Class (Python)


spss.GetDefaultPlugInVersion Function (Python)

GetDefaultPlugInVersion,GetDefaultPlugInVersion,GetDefaultPlugInVersion
versions,versions,versions
managing multiple versions,managing multiple versions,managing multiple versions

spss.GetDefaultPlugInVersion(). Returns the default version of the PASW Statistics-Python Integration Plug-in used for Python programs. The result is a string specifying a version--for example, "spss170" for version 17.0--and is useful when working with multiple versions of the plug-in on a given machine (see Note below). You can change the default using the spss.SetDefaultPlugInVersion function.

Example

import spss
version = spss.GetDefaultPlugInVersion()

Note: The functions for managing multiple versions of the plug-in (spss.GetDefaultPlugInVersion, spss.SetDefaultPlugInVersion, and spss.ShowInstalledPlugInVersions) operate within a given Python version, not across Python versions. For example, if you are driving PASW Statistics from a Python IDE installed for Python 2.6 then you can view and control the versions of the plug-in installed for Python 2.6.

See the topic Working with Multiple Versions of PASW Statistics (Python) for more information.

Related Topics

spss.SetDefaultPlugInVersion Function (Python)
spss.ShowInstalledPlugInVersions Function (Python)


spss.GetFileHandles Function (Python)

GetFileHandles,GetFileHandles,GetFileHandles
file handles,file handles,file handles

spss.GetFileHandles(). Returns a list of currently defined file handles. Each item in the list consists of the following three elements: the name of the file handle; the path associated with the file handle; and the encoding, if any, specified for the file handle. File handles are created with the FILE HANDLE command.


spss.GetHandleList Function (Python)

GetHandleList,GetHandleList,GetHandleList

spss.GetHandleList(). Returns a list of currently defined dictionary and output XML DOMs available for use with spss.EvaluateXpath.

Related Topics

spss.CreateXPathDictionary Function (Python)
spss.DeleteXPathHandle Function (Python)
spss.EvaluateXPath Function (Python)
spss.GetXmlUtf16 Function (Python)


spss.GetLastErrorLevel and spss.GetLastErrorMessage Functions (Python)

GetLastErrorlevel,GetLastErrorlevel,GetLastErrorlevel
GetLastErrorMessage,GetLastErrorMessage,GetLastErrorMessage
error messages,error messages,error messages

spss.GetLastErrorLevel(). Returns a number corresponding to an error in the preceding PASW Statistics-Python package function.

• For the spss.Submit function, it returns the maximum PASW Statistics error level for the submitted command syntax. PASW Statistics error levels range from 1 to 5. An error level of 3 or higher causes an exception in Python.

• For other functions, it returns an error code with a value greater than 5.

• Error codes from 6 to 99 are from the PASW Statistics XD API.

• Error codes from 1000 to 1064 are from the PASW Statistics-Python integration package.

PASW Statistics error levels (return codes), their meanings, and any associated behaviors are shown in the following table.

PASW Statistics error levels
Value | Definition | Behavior
0 | None | Command runs
1 | Comment | Command runs
2 | Warning | Command runs
3 | Serious error | Command does not run, subsequent commands are processed
4 | Fatal error | Command does not run, subsequent commands are not processed, and the current job terminates
5 | Catastrophic error | Command does not run, subsequent commands are not processed, and the PASW Statistics processor terminates

spss.GetLastErrorMessage(). Returns a text message corresponding to an error in the preceding PASW Statistics-Python package function.

• For the spss.Submit function, it returns text associated with the highest level error for the submitted command syntax.

• For other functions in the PASW Statistics-Python package, it returns the error message text from the PASW Statistics XD API or from Python.

Example Collapse Hide details

Example

*python_GetLastErrorLevel.sps.
DATA LIST FREE/var1 var2.
BEGIN DATA
1 2 3 4
END DATA.
BEGIN PROGRAM.
try:
  spss.Submit("""
COMPUTE newvar=var1*10.
COMPUTE badvar=nonvar/4.
FREQUENCIES VARIABLES=ALL.
""")
except:
  errorLevel=str(spss.GetLastErrorLevel())
  errorMsg=spss.GetLastErrorMessage()
  print("Error level " + errorLevel + ": " + errorMsg)
  print("At least one command did not run.")
END PROGRAM.

• The first COMPUTE command and the FREQUENCIES command will run without errors, generating error values of 0.

• The second COMPUTE command will generate a level 3 error, triggering the exception handling in the except clause.


spss.GetMultiResponseSetNames Function (Python)

GetMultiResponseSetNames,GetMultiResponseSetNames,GetMultiResponseSetNames
multiple response sets,multiple response sets,multiple response sets
retrieving,retrieving,retrieving

spss.GetMultiResponseSetNames(). Returns the names of any multiple response sets for the active dataset.

Example

import spss
names = spss.GetMultiResponseSetNames()

Related Topics

spss.GetMultiResponseSet Function (Python)


spss.GetMultiResponseSet Function (Python)

GetMultiResponseSet,GetMultiResponseSet,GetMultiResponseSet
multiple response sets,multiple response sets,multiple response sets
retrieving,retrieving,retrieving

spss.GetMultiResponseSet(mrsetName). Returns the details of the specified multiple response set. The argument mrsetName is a string that specifies the name of the multiple response set--for instance, a name returned by GetMultiResponseSetNames.

• The result is a tuple of 5 elements. The first element is the label, if any, for the set. The second element specifies the variable coding--'Categories' or 'Dichotomies'. The third element specifies the counted value and only applies to multiple dichotomy sets. The fourth element specifies the data type--'Numeric' or 'String'. The fifth element is a list of the elementary variables that define the set.

Example

# Build a Python dictionary of the multiple response sets
import spss
dict = {}
for name in spss.GetMultiResponseSetNames():
  dict[name]=spss.GetMultiResponseSet(name)

Related Topics

spss.GetMultiResponseSetNames Function (Python)


spss.GetSplitVariableNames Function (Python)

GetSplitVariableNames,GetSplitVariableNames,GetSplitVariableNames
split-file processing,split-file processing,split-file processing
split variables,split variables,split variables

spss.GetSplitVariableNames(). Returns the names of the split variables, if any, in the active dataset.

Example

import spss
splitvars = spss.GetSplitVariableNames()


spss.GetSPSSLocale Function (Python)

GetSPSSLocale,GetSPSSLocale,GetSPSSLocale

spss.GetSPSSLocale(). Returns the current PASW Statistics locale.

Example

import spss
locale = spss.GetSPSSLocale()

Related Topics

spss.PyInvokeSpss.IsUTF8mode Function (Python)
spss.SetOutputLanguage Function (Python)


spss.GetSPSSLowHigh Function (Python)

GetSPSSLowHigh,GetSPSSLowHigh,GetSPSSLowHigh

spss.GetSPSSLowHigh(). Returns the values PASW Statistics uses for LO and HI as a tuple of two values. The first element in the tuple is the value for LO and the second is the value for HI. These values can used to specify missing value ranges for new numeric variables with the SetVarNMissingValues method.

Example

import spss
spsslow, spsshigh = spss.GetSPSSLowHigh()


spss.GetVarAttributeNames Function (Python)

GetVarAttributeNames,GetVarAttributeNames,GetVarAttributeNames
variable attributes,variable attributes,variable attributes
retrieving,retrieving,retrieving

spss.GetVarAttributeNames(index). Returns the names of any variable attributes, as a tuple, for the variable in the active dataset indicated by the index value. The argument is the index value. Index values represent position in the active dataset, starting with 0 for the first variable in file order.

Example

#Create a list of variables that have a specified attribute
import spss
varList=[]
attribute='demographicvars'
for i in range(spss.GetVariableCount()):
   if (attribute in spss.GetVarAttributeNames(i)):
      varList.append(spss.GetVariableName(i))
if varList:
   print "Variables with attribute " + attribute + ":"
   print '\n'.join(varList)
else:
   print "No variables have the attribute " + attribute

Related Topics

spss.GetVarAttributes Function (Python)


spss.GetVarAttributes Function (Python)

GetVarAttributes,GetVarAttributes,GetVarAttributes
variable attributes,variable attributes,variable attributes
retrieving,retrieving,retrieving

spss.GetVarAttributes(index,attrName). Returns the attribute values, as a tuple, for the specified attribute of the variable in the active dataset indicated by the index value. The argument index is the index value. Index values represent position in the active dataset, starting with 0 for the first variable in file order. The argument attrName is a string that specifies the name of the attribute--for instance, a name returned by GetVarAttributeNames.

Example

#Create a list of variables whose attribute array contains
#a specified value
import spss
varList=[]
attrName='demographicvartypes'
attrVal='2'
for i in range(spss.GetVariableCount()):
   try:
      if(attrVal in spss.GetVarAttributes(i,attrName)):
         varList.append(spss.GetVariableName(i))
   except:
      pass
if varList:
   print "Variables with attribute value " + attrVal + \
         " for attribute " + attrName + ":"
   print '\n'.join(varList)
else:
   print "No variables have the attribute value " + attrVal + \
         " for attribute " + attrName

Related Topics

spss.GetVarAttributeNames Function (Python)


spss.GetVariableCount Function (Python)

GetVariableCount,GetVariableCount,GetVariableCount
variable count,variable count,variable count
number of variables,number of variables,number of variables

spss.GetVariableCount(). Returns the number of variables in the active dataset.

Example

#python_GetVariableCount.sps
#build a list of all variables by using the value of
#spssGetVariableCount to set the number of for loop interations
varcount=spss.GetVariableCount()
varlist=[]
for i in xrange(varcount):
    varlist.append(spss.GetVariableName(i))


spss.GetVariableFormat Function (Python)

GetVariableFormat,GetVariableFormat,GetVariableFormat
variable format,variable format,variable format
format of variables,format of variables,format of variables

GetVariableFormat(index). Returns a string containing the display format for the variable in the active dataset indicated by the index value. The argument is the index value. Index values represent position in the active dataset, starting with 0 for the first variable in file order.

• The character portion of the format string is always returned in all upper case.

• Each format string contains a numeric component after the format name that indicates the defined width, and optionally, the number of decimal positions for numeric formats. For example, A4 is a string format with a maximum width of four bytes, and F8.2 is a standard numeric format with a display format of eight digits, including two decimal positions and a decimal indicator. The supported format types are listed in Variable Format Types (the type code shown in the table does not apply to the GetVariableFormat function).

Example Collapse Hide details

Example

*python_GetVariableFormat.sps.
DATA LIST FREE
  /numvar (F4) timevar1 (TIME5) stringvar (A2) timevar2 (TIME12.2).
BEGIN DATA
1 10:05 a 11:15:33.27
END DATA.

BEGIN PROGRAM.
import spss
#create a list of all formats and a list of time format variables
varcount=spss.GetVariableCount()
formatList=[]
timeVarList=[]
for i in xrange(varcount):
  formatList.append(spss.GetVariableFormat(i))
  #check to see if it's a time format
  if spss.GetVariableFormat(i).find("TIME")==0:
     timeVarList.append(spss.GetVariableName(i))
print formatList
print timeVarList
END PROGRAM.


spss.GetVariableLabel Function (Python)

GetVariableLabel,GetVariableLabel,GetVariableLabel
variable label,variable label,variable label
labels,labels,labels
variable,variable,variable

spss.GetVariableLabel(index). Returns a character string containing the variable label for the variable in the active dataset indicated by the index value. The argument is the index value. Index values represent position in the active dataset, starting with 0 for the first variable in file order. If the variable does not have a defined variable label, a null string is returned.

Example

#create a list of all variable labels
varcount=spss.GetVariableCount()
labellist=[]
for i in xrange(varcount):
  labellist.append(spss.GetVariableLabel(i))


spss.GetVariableMeasurementLevel Function (Python)

GetVariableMeasurementLevel,GetVariableMeasurementLevel,GetVariableMeasurementLevel
measurement level,measurement level,measurement level
unknown measurement level,unknown measurement level,unknown measurement level

spss.GetVariableMeasurementLevel(index). Returns a string value that indicates the measurement level for the variable in the active dataset indicated by the index value. The argument is the index value. Index values represent position in the active dataset, starting with 0 for the first variable in file order. The value returned can be: "nominal", "ordinal", "scale", or "unknown".

• "Unknown" occurs only for numeric variables prior to the first data pass when the measurement level has not been explicitly set, such as data read from an external source or newly created variables. The measurement level for string variables is always known.

Example

#build a string containing  scale variable names
varcount=spss.GetVariableCount()
ScaleVarList=''
for i in xrange(varcount):
  if spss.GetVariableMeasurementLevel(i)=="scale":
    ScaleVarList=ScaleVarList + " " + spss.GetVariableName(i)


spss.GetVariableName Function (Python)

GetVariableName,GetVariableName,GetVariableName
variable names,variable names,variable names
names of variables,names of variables,names of variables

GetVariableName(index). Returns a character string containing the variable name for the variable in the active dataset indicated by the index value. The argument is the index value. Index values represent position in the active dataset, starting with 0 for the first variable in file order.

Example Collapse Hide details

Example

#python_GetVariableName.sps
#get names of first and last variables in the file
#last variable is index value N-1 because index values start at 0
firstVar=spss.GetVariableName(0)
lastVar=spss.GetVariableName(spss.GetVariableCount()-1)
print firstVar, lastVar
#sort the data file in alphabetic order of variable names
varlist=[]
varcount=spss.GetVariableCount()
for i in xrange(varcount):
  varlist.append(spss.GetVariableName(i))
sortedlist=' '.join(sorted(varlist))
spss.Submit(
  ["ADD FILES FILE=* /KEEP ",sortedlist, ".", "EXECUTE."])


spss.GetVariableType Function (Python)

GetVariableType,GetVariableType,GetVariableType
string variables,string variables,string variables
numeric variables,numeric variables,numeric variables
data types,data types,data types

GetVariableType(index). Returns 0 for numeric variables or the defined length for string variables for the variable in the active dataset indicated by the index value. The argument is the index value. Index values represent position in the active dataset, starting with 0 for the first variable in file order.

Example

#python_GetVariableType.sps
#create separate strings of numeric and string variables
numericvars=''
stringvars=''
varcount=spss.GetVariableCount()
for i in xrange(varcount):
  if spss.GetVariableType(i) > 0:
    stringvars=stringvars + " " + spss.GetVariableName(i)
  else:
    numericvars=numericvars + " " + spss.GetVariableName(i)


spss.GetVarMissingValues Function (Python)

GetVarMissingValues,GetVarMissingValues,GetVarMissingValues
missing values,missing values,missing values
retrieving user missing value definitions,retrieving user missing value definitions,retrieving user missing value definitions

spss.GetVarMissingValues(index). Returns the user-missing values for the variable in the active dataset indicated by the index value. The argument is the index value. Index values represent position in the active dataset, starting with 0 for the first variable in file order.

• The result is a tuple of four elements where the first element specifies the missing value type: 0 for discrete values, 1 for a range of values, and 2 for a range of values and a single discrete value. The remaining three elements in the result specify the missing values.

• For string variables, the missing value type is always 0 since only discrete missing values are allowed. Returned values are right-padded to the defined width of the string variable.

• If there are no missing values, the result is (0,None,None,None).

Structure of the result
tuple[0] | tuple[1] | tuple[2] | tuple[3]
0 | Discrete value or None | Discrete value or None | Discrete value or None
1 | Start point of range | End point of range | None
2 | Start point of range | End point of range | Discrete value

Example

#List all variables without user-missing values
nomissList=[]
for i in range(spss.GetVariableCount()):
   missing=spss.GetVarMissingValues(i)
   if (missing[0]==0 and missing[1]==None):
      nomissList.append(spss.GetVariableName(i))
if nomissList:
   print "Variables without user-missing values:"
   print '\n'.join(nomissList)
else:
   print "All variables have user-missing values"


spss.GetWeightVar Function (Python)

GetWeightVar,GetWeightVar,GetWeightVar
weight variable,weight variable,weight variable

spss.GetWeightVar(). Returns the name of the weight variable, or None if unweighted.

Example

import spss
weightVar = spss.GetWeightVar()


spss.GetXmlUtf16 Function (Python)

GetXmlUtf16,GetXmlUtf16,GetXmlUtf16
dictionary,dictionary,dictionary
writing to an XML file,writing to an XML file,writing to an XML file

spss.GetXmlUtf16(handle, filespec). Writes the XML for the specified handle (dictionary or output XML) to a file or returns the XML if no filename is specified. When writing and debugging XPath expressions, it is often useful to have a sample file that shows the XML structure. This function is particularly useful for dictionary DOMs, since there are not any alternative methods for writing and viewing the XML structure. (For output XML, the OMS command can also write XML to a file.) You can also use this function to retrieve the XML for a specified handle, enabling you to process it with third-party utilities like XML parsers.

Example

handle = "activedataset"
spss.CreateXPathDictionary(handle)
spss.GetXmlUtf16(handle,'/temp/temp.xml')

Related Topics

spss.CreateXPathDictionary Function (Python)
spss.DeleteXPathHandle Function (Python)
spss.EvaluateXPath Function (Python)
spss.GetHandleList Function (Python)


spss.HasCursor Function (Python)

HasCursor,HasCursor,HasCursor

spss.HasCursor(). Returns an integer indicating whether there is an open cursor. A value of 0 indicates there is no open cursor, and a value of 1 indicates there is an open cursor. Cursors allow you to read data from the active dataset, create new variables in the active dataset, and append cases to the active dataset. For information on working with cursors, see the topic on the Cursor class.

Related Topics

spss.Cursor Class (Python)


spss.IsActive Function (Python)

IsActive,IsActive,IsActive

spss.IsActive(datasetObj). Indicates whether the specified dataset is the active one. The result is Boolean—True if the specified dataset is active, False otherwise. The argument must be an instance of the Dataset class. The IsActive function is intended for use within a data step. Data steps are initiated with the spss.StartDataStep function and are used to create and manage multiple datasets.

Example

import spss
spss.StartDataStep()
datasetObj = spss.Dataset(name="file1")
if not spss.IsActive(datasetObj):
   spss.SetActive(datasetObj)
spss.EndDataStep()

Related Topics

spss.Dataset Class (Python)
spss.ActiveDataset Function (Python)
spss.SetActive Function (Python)


spss.IsOutputOn Function (Python)

IsOutputOn,IsOutputOn,IsOutputOn

spss.IsOutputOn(). Returns the status of PASW Statistics output display in Python. The result is Boolean—true if output display is on in Python, false if it is off. See the topic spss.SetOutput Function (Python) for more information.

Example

import spss
spss.SetOutput("on")
if spss.IsOutputOn():
    print "The current PASW Statistics output setting is 'on'."
else:
    print "The current PASW Statistics output setting is 'off'."

Related Topics

spss.SetOutput Function (Python)


spss.Procedure Class (Python)

Procedure class,Procedure class,Procedure class

spss.Procedure(outputName). The Procedure class implicitly starts and ends a user procedure without the need to explicitly call StartProcedure and EndProcedure. The argument outputName is a string and is the name that appears in the outline pane of the Viewer associated with the output from the procedure. It has the same specifications as the argument to the StartProcedure function.

The Procedure class is designed to be used with the Python with statement as shown in the following example.

Example

*python_Procedure.sps.
BEGIN PROGRAM.
from __future__ import with_statement
import spss
with spss.Procedure("demoProc"):
   table = spss.BasePivotTable("Table Title",
                                "OMS table subtype")

   table.SimplePivotTable(rowdim = "row dimension",
                          rowlabels = ["first row","second row"],
                          coldim = "column dimension",
                          collabels = ["first column","second column"],
                          cells = [11,12,21,22])
END PROGRAM.

• The code from __future__ import with_statement makes the Python with statement available to the program block.

• with spss.Procedure("demoProc"): initiates a block of code associated with a procedure named demoProc and implicitly starts the procedure. All code associated with the procedure should reside in the block as shown here. When the block completes, the procedure is implicitly ended.

Related Topics

spss.BasePivotTable Class (Python)
spss.StartProcedure Function (Python)
spss.TextBlock Class (Python)


spss.PyInvokeSpss.IsUTF8mode Function (Python)

PyInvokeSpss.IsUTF8mode,PyInvokeSpss.IsUTF8mode,PyInvokeSpss.IsUTF8mode
Unicode,Unicode,Unicode
Python programs,Python programs,Python programs
Python,Python,Python
Unicode,Unicode,Unicode

spss.PyInvokeSpss.IsUTF8mode(). Indicates whether PASW Statistics is running in Unicode mode or code page mode. The result is 1 if PASW Statistics is in Unicode mode, 0 if PASW Statistics is in code page mode.

Example

import spss
isUTF8 = spss.PyInvokeSpss.IsUTF8mode()
if isUTF8==1:
  print "PASW Statistics is running in Unicode mode."
else:
  print "PASW Statistics is running in code page mode."

Related Topics

spss.GetSPSSLocale Function (Python)
spss.SetOutputLanguage Function (Python)


spss.PyInvokeSpss.IsXDriven Function (Python)

PyInvokeSpss.IsXDriven,PyInvokeSpss.IsXDriven,PyInvokeSpss.IsXDriven

spss.PyInvokeSpss.IsXDriven(). Checks to see how the PASW Statistics backend is being run. The result is 1 if Python is controlling the PASW Statistics backend or 0 if PASW Statistics is controlling the backend.

Example

import spss
spss.Submit("""
GET FILE
 '/examples/data/employee data.sav'.
""")
isxd = spss.PyInvokeSpss.IsXDriven()
if isxd==1:
  print "Python is driving PASW Statistics."
else:
  print "PASW Statistics is driving Python."


spss.SetActive Function (Python)

SetActive,SetActive,SetActive
active dataset,active dataset,active dataset
setting,setting,setting

spss.SetActive(datasetObj). Sets the specified dataset as the active one. The argument must be an instance of the Dataset class. The SetActive function can only be used within a data step. Data steps are initiated with the spss.StartDataStep function and are used to create and manage multiple datasets.

Example

# Set a newly created dataset to be active
spss.StartDataStep()
ds1 = spss.Dataset(name=None)
spss.SetActive(ds1)
spss.EndDataStep()

Related Topics

spss.Dataset Class (Python)
spss.ActiveDataset Function (Python)
spss.IsActive Function (Python)


spss.SetDefaultPlugInVersion Function (Python)

SetDefaultPlugInVersion,SetDefaultPlugInVersion,SetDefaultPlugInVersion
versions,versions,versions
managing multiple versions,managing multiple versions,managing multiple versions

spss.SetDefaultPlugInVersion(value). Sets the default version of the PASW Statistics-Python Integration Plug-in used for Python programs. This function is useful when working with multiple versions of the plug-in on a given machine (see Note below). The value of the argument is a quoted string or an integer specifying a plug-in version--for example, "spss160" or 160 for version 16.0. The strings representing the installed versions of the plug-in are available from the function spss.ShowInstalledPlugInVersions.

• For version 17.0 and higher, SetDefaultPlugInVersion also sets the default version of the PASW Statistics-Python Integration Plug-in used for Python scripts (Python code that utilizes the SpssClient module).

Example

import spss
spss.SetDefaultPlugInVersion("spss160")

Note: The functions for managing multiple versions of the plug-in (spss.GetDefaultPlugInVersion, spss.SetDefaultPlugInVersion, and spss.ShowInstalledPlugInVersions) operate within a given Python version, not across Python versions. For example, if you are driving PASW Statistics from a Python IDE installed for Python 2.6 then you can view and control the versions of the plug-in installed for Python 2.6.

See the topic Working with Multiple Versions of PASW Statistics (Python) for more information.

Related Topics

spss.GetDefaultPlugInVersion Function (Python)
spss.ShowInstalledPlugInVersions Function (Python)


spss.SetMacroValue Function (Python)

SetMacroValue,SetMacroValue,SetMacroValue
macro variables in Python,macro variables in Python,macro variables in Python

spss.SetMacroValue(name, value). Defines a macro variable that can be used outside a program block in command syntax. The first argument is the macro name, and the second argument is the macro value. Both arguments must resolve to strings.

Example

*python_SetMacroValue.sps.
DATA LIST FREE /var1 var2 var3 var4.
begin data
1 2 3 4
end data.
VARIABLE LEVEL var1 var3 (scale) var2 var4 (nominal).

BEGIN PROGRAM.
import spss
macroValue=[]
macroName="!NominalVars"
varcount=spss.GetVariableCount()
for i in xrange(varcount):
  if spss.GetVariableMeasurementLevel(i)=="nominal":
    macroValue.append(spss.GetVariableName(i))
spss.SetMacroValue(macroName, macroValue)
END PROGRAM.
FREQUENCIES VARIABLES=!NominalVars.


spss.SetOutput Function (Python)

SetOutput,SetOutput,SetOutput

spss.SetOutput("value"). Controls the display of PASW Statistics output in Python when running PASW Statistics from Python. Output is displayed as standard output, and charts and classification trees are not included. When running Python from PASW Statistics within program blocks (BEGIN PROGRAM-END PROGRAM), this function has no effect. The value of the argument is a quoted string:

• "on". Display PASW Statistics output in Python.

• "off". Do not display PASW Statistics output in Python.

Example

import spss
spss.SetOutput("on")

Related Topics

spss.IsOutputOn Function (Python)


spss.SetOutputLanguage Function (Python)

SetOutputLanguage,SetOutputLanguage,SetOutputLanguage

spss.SetOutputLanguage("language"). Sets the language that is used in PASW Statistics output. The argument is a quoted string specifying one of the following languages: "English", "French", "German", "Italian", "Japanese", "Korean", "Polish", "Russian", "Simplified Chinese", "Spanish", or "Traditional Chinese". The setting does not apply to simple text output.

Example

import spss
spss.SetOutputLanguage("German")

Related Topics

spss.GetSPSSLocale Function (Python)
spss.PyInvokeSpss.IsUTF8mode Function (Python)


spss.ShowInstalledPlugInVersions Function (Python)

ShowInstalledPlugInVersions,ShowInstalledPlugInVersions,ShowInstalledPlugInVersions
versions,versions,versions
managing multiple versions,managing multiple versions,managing multiple versions

spss.ShowInstalledPlugInVersions(). Returns the installed versions of the PASW Statistics-Python Integration Plug-in. This function returns a list of string identifiers for the installed versions of the plug-in--for example, ["spss160","spss170"] for versions 16.0 and 17.0--and is useful when working with multiple versions of the plug-in on a given machine (see Note below). Use an identifier from this list as the argument to the spss.SetDefaultPlugInVersion function.

Example

import spss
versionList = spss.ShowInstalledPlugInVersions()

Note: The functions for managing multiple versions of the plug-in (spss.GetDefaultPlugInVersion, spss.SetDefaultPlugInVersion, and spss.ShowInstalledPlugInVersions) operate within a given Python version, not across Python versions. For example, if you are driving PASW Statistics from a Python IDE installed for Python 2.6 then you can view and control the versions of the plug-in installed for Python 2.6.

See the topic Working with Multiple Versions of PASW Statistics (Python) for more information.

Related Topics

spss.GetDefaultPlugInVersion Function (Python)
spss.SetDefaultPlugInVersion Function (Python)


spss.SplitChange Function (Python)

SplitChange,SplitChange,SplitChange
split-file processing,split-file processing,split-file processing
creating pivot tables from data with splits,creating pivot tables from data with splits,creating pivot tables from data with splits

spss.SplitChange(outputName). Used to process splits when creating pivot tables from data that have splits. The argument outputName is the name associated with the output, as specified on the associated call to the StartProcedure function. See the topic spss.StartProcedure Function (Python) for more information.

• This function should be called after detecting a split and reading the first case of the new split. It should also be called after reading the first case in the active dataset.

• The creation of pivot table output does not support operations involving data in different split groups. When working with splits, each split should be treated as a separate set of data.

• Use the SPLIT FILE command to control whether split-file groups will be displayed in the same table or in separate tables. The SPLIT FILE command should be called before the StartProcedure function.

• The IsEndSplit method from the Cursor class is used to detect a split change.

Example

In this example, a split is created and separate averages are calculated for the split groups. Results for different split groups are shown in a single pivot table. In order to understand the example, you will need to be familiar with creating pivot tables using the BasePivotTable class and creating output with the spss.StartProcedure function.

import spss
from spss import CellText
from spss import FormatSpec

spss.Submit(r"""
GET FILE="/examples/data/employee data.sav".
SORT CASES BY GENDER.
SPLIT FILE LAYERED BY GENDER.
""")

spss.StartProcedure("spss.com.demo")

table = spss.BasePivotTable("Table Title","OMS table subtype")
table.Append(spss.Dimension.Place.row,"Minority Classification")
table.Append(spss.Dimension.Place.column,"coldim",hideName=True)

cur=spss.Cursor()
salary = 0; salarym = 0; n = 0; m = 0
minorityIndex = 9
salaryIndex = 5

row = cur.fetchone()
spss.SplitChange("spss.com.demo")
while True:
   if cur.IsEndSplit():
      if n>0:
         salary=salary/n
      if m>0:
         salarym=salarym/m
      # Populate the pivot table with values for the previous split group
      table[(CellText.String("No"),CellText.String("Average Salary"))] = \
             CellText.Number(salary,FormatSpec.Count)
      table[(CellText.String("Yes"),CellText.String("Average Salary"))] = \
             CellText.Number(salarym,FormatSpec.Count)
      salary=0; salarym=0; n = 0; m = 0
      # Try to fetch the first case of the next split group
      row=cur.fetchone()
      if not None==row:
         spss.SplitChange("spss.com.demo")
      else:
         #There are no more cases, so quit
         break
   if row[minorityIndex]==1:
      salarym += row[salaryIndex]
      m += 1
   elif row[minorityIndex]==0:
      salary += row[salaryIndex]
      n += 1
   row=cur.fetchone()

cur.close()
spss.EndProcedure()

• The spss.Submit function is used to submit command syntax to create a split on a gender variable. The LAYERED subcommand on the SPLIT FILE command indicates that results for different split groups are to be displayed in the same table. Notice that the command syntax is executed before calling spss.StartProcedure.

• The spss.SplitChange function is called after fetching the first case from the active dataset. This is required so that the pivot table output for the first split group is handled correctly.

• Split changes are detected using the IsEndSplit method from the Cursor class. Once a split change is detected, the pivot table is populated with the results from the previous split.

• The value returned from the fetchone method is None at a split boundary. Once a split has been detected, you will need to call fetchone again to retrieve the first case of the new split group, followed by spss.SplitChange. Note: IsEndSplit returns true when the end of the dataset has been reached. Although a split boundary and the end of the dataset both result in a return value of true from IsEndSplit, the end of the dataset is identified by a return value of None from a subsequent call to fetchone, as shown in this example.


spss.StartDataStep Function (Python)

StartDataStep,StartDataStep,StartDataStep
data step,data step,data step
starting,starting,starting

spss.StartDataStep(). Signals the beginning of a data step. A data step allows you to create and manage multiple datasets.

• You cannot use the following classes and functions within a data step: the Cursor class, the BasePivotTable class, the BaseProcedure class, the TextBlock class, the StartProcedure function, the Submit function, and the StartDataStep function (data steps cannot be nested).

• The StartDataStep function cannot be used if there are pending transformations. If you need to access case data in the presence of pending transformations, use the Cursor class.

• To end a data step, use the EndDataStep function.

For an example of using StartDataStep, see the topic on the Dataset class.

To avoid the need to check for pending transformations before starting a data step, use the DataStep class. It implicitly starts and ends a data step and executes any pending transformations.

Related Topics

spss.DataStep Class (Python)
spss.Dataset Class (Python)
spss.EndDataStep Function (Python)


spss.StartProcedure Function (Python)

StartProcedure,StartProcedure,StartProcedure

spss.StartProcedure(outputName). Signals the beginning of pivot table or text block output. Pivot table and text block output is typically associated with procedures. Procedures are user-defined Python functions or custom Python classes that can read the data, perform computations, add new variables and/or new cases to the active dataset, create new datasets, and produce pivot table output and text blocks in the PASW Statistics Viewer. Procedures have almost the same capabilities as built-in PASW Statistics procedures, such as DESCRIPTIVES and REGRESSION, but they are written in Python by users. You read the data and create new variables and/or new cases in the active dataset using the Cursor class, or create new datasets with the Dataset class. Pivot tables are created using the BasePivotTable class. Text blocks are created using the TextBlock class.

• The argument outputName is a string and is the name that appears in the outline pane of the Viewer associated with the output. It is also the command name associated with this output when routing it with OMS (Output Management System), as used in the COMMANDS keyword of the OMS command. And finally it is the name associated with this output for use with autoscripts.

• In order that names associated with output not conflict with names of existing PASW Statistics commands (when working with OMS or autoscripts), it is recommended that they have the form yourcompanyname.com.procedurename. When working with autoscripts, note that periods (.) contained in an output name are replaced with zeros (0), dashes are replaced with underscores, and spaces are removed in the associated autoscript's name. Avoid any other punctuation characters that might create illegal names in a programming language. For instance, output associated with the name Smith & Jones, Ltd generates an associated autoscript named Smith&Jones,Ltd, which would be illegal as part of a subroutine name in Sax Basic.

• Within a StartProcedure-EndProcedure block you cannot use the spss.Submit function. You cannot nest StartProcedure-EndProcedure blocks.

• Within a StartProcedure-EndProcedure block, you can create a single cursor instance.

• Instances of the Dataset class created within StartProcedure-EndProcedure blocks cannot be set as the active dataset.

• Output from StartProcedure-EndProcedure blocks does not support operations involving data in different split groups. When working with splits, each split should be treated as a separate set of data. To cause results from different split groups to display properly in custom pivot tables, use the SplitChange function. Use the IsEndSplit method from the Cursor class to determine a split change.

• spss.StartProcedure must be followed by spss.EndProcedure.

Note: You can use the spss.Procedure class to implicitly start and end a procedure without the need to call StartProcedure and EndProcedure. See the topic spss.Procedure Class (Python) for more information.

Example

As an example, we will create a procedure that calculates group means for a selected variable using a specified categorical variable to define the groups. The output of the procedure is a pivot table displaying the group means. For an alternative approach to creating the same procedure, but with a custom class, see the example for the spss.BaseProcedure class.

def groupMeans(groupVar,sumVar):

    #Determine variable indexes from variable names
    varCount = spss.GetVariableCount()
    groupIndex = 0
    sumIndex = 0
    for i in range(varCount):
        varName = spss.GetVariableName(i)
        if varName == groupVar:
            groupIndex = i
            continue
        elif varName == sumVar:
            sumIndex = i
            continue

    varIndex = [groupIndex,sumIndex]
    cur = spss.Cursor(varIndex)
    Counts={};Statistic={}

    #Calculate group sums
    for i in range(cur.GetCaseCount()):
        row = cur.fetchone()
        cat=int(row[0])
        Counts[cat]=Counts.get(cat,0) + 1
        Statistic[cat]=Statistic.get(cat,0) + row[1]

    cur.close()

    #Call StartProcedure
    spss.StartProcedure("mycompany.com.groupMeans")

    #Create a pivot table
    table = spss.BasePivotTable("Group Means","OMS table subtype")
    table.Append(spss.Dimension.Place.row,
                 spss.GetVariableLabel(groupIndex))
    table.Append(spss.Dimension.Place.column,
                 spss.GetVariableLabel(sumIndex))

    category2 = spss.CellText.String("Mean")
    for cat in sorted(Counts):
        category1 = spss.CellText.Number(cat)
        table[(category1,category2)] = \
        spss.CellText.Number(Statistic[cat]/Counts[cat])

    #Call EndProcedure
    spss.EndProcedure()

• groupMeans is a Python user-defined function containing the procedure that calculates the group means.

• The arguments required by the procedure are the names of the grouping variable (groupVar) and the variable for which group means are desired (sumVar).

• The name associated with output from this procedure is mycompany.com.groupMeans. The output consists of a pivot table populated with the group means.

• spss.EndProcedure marks the end of output creation.

Saving and Running Procedures

To use a procedure you have written, you save it in a Python module on the Python search path so that you can call it. A Python module is simply a text file containing Python definitions and statements. You can create a module with a Python IDE, or with any text editor, by saving a file with an extension of .py. The name of the file, without the .py extension, is then the name of the module. You can have many functions in a single module. To be sure that Python can find your new module, you may want to save it to your Python "site-packages" directory, typically /Python26/Lib/site-packages.

For the example procedure described above, you might choose to save the definition of the groupMeans function to a Python module named myprocs.py. And be sure to include an import spss statement in the module. Sample command syntax to run the function is:

import spss, myprocs
spss.Submit("get file='/examples/data/Employee data.sav'.")
myprocs.groupMeans("educ","salary")

• The import statement containing myprocs makes the contents of the Python module myprocs.py available to the current session (assuming that the module is on the Python search path).

• myprocs.groupMeans("educ","salary") runs the groupMeans function for the variables educ and salary in /examples/data/Employee data.sav.

Result

Output from the groupMeans procedure

Related Topics

spss.BasePivotTable Class (Python)
spss.Procedure Class (Python)
spss.TextBlock Class (Python)
spss.EndProcedure Function (Python)


spss.StartSPSS Function (Python)

StartSPSS,StartSPSS,StartSPSS

spss.StartSPSS(). Starts a session of PASW Statistics.

• This function starts a session of PASW Statistics, for use when driving PASW Statistics from Python. The function has no effect if a session is already running. Note: The spss.Submit function automatically starts a session of PASW Statistics.

• This function has no effect when running Python from PASW Statistics (within program blocks defined by BEGIN PROGRAM-END PROGRAM).

Related Topics

spss.StopSPSS Function (Python)


spss.StopSPSS Function (Python)

StopSPSS,StopSPSS,StopSPSS

spss.StopSPSS(). Stops PASW Statistics, ending the session.

• This function is ignored when running Python from PASW Statistics (within program blocks defined by BEGIN PROGRAM-END PROGRAM).

• When running PASW Statistics from Python, this function ends the PASW Statistics session, and any subsequent spss.Submit functions that restart PASW Statistics will not have access to the active dataset or to any other session-specific settings (for example, OMS output routing commands) from the previous session. See the topic spss.Submit Function (Python) for more information.

Example: Running PASW Statistics from Python

#RunSpssFromPython.py
import spss
#start a session and run some commands
#including one that defines an active dataset
spss.Submit("""
GET FILE '/examples/data/employee data.sav'.
FREQUENCIES VARIABLES=gender jobcat.
""")
#shutdown the session
spss.StopSPSS()
#insert a bunch of Python statements
#starting a new session and running some commands without defining
#an active dataset results in an error
spss.Submit("""
FREQUENCIES VARIABLES=gender jobcat.
""")

Example: Running Python from PASW Statistics

*run_python_from_spss.sps.
BEGIN PROGRAM.
import spss
#start a session and run some commands
#including one that defines an active dataset
spss.Submit("""
GET FILE '/examples/data/employee data.sav'.
FREQUENCIES VARIABLES=gender jobcat.
""")
#following function is ignored
spss.StopSPSS()
#active dataset still exists and subsequent spss.Submit functions
#will work with that active dataset.
spss.Submit("""
FREQUENCIES VARIABLES=gender jobcat.
""")
END PROGRAM.

Related Topics

spss.StartSPSS Function (Python)


spss.Submit Function (Python)

Submit,Submit,Submit
running command syntax from Python,running command syntax from Python,running command syntax from Python
executing command syntax from Python,executing command syntax from Python,executing command syntax from Python

spss.Submit(command text). Submits the command text to PASW Statistics for processing. The argument can be a quoted string, a list, or a tuple.

• The argument should resolve to one or more complete PASW Statistics commands.

• For lists and tuples, each element must resolve to a string.

• You can also use the Python triple-quoted string convention to specify blocks of PASW Statistics commands on multiple lines that more closely resemble the way you might normally write command syntax.

• If PASW Statistics is not currently running (when driving PASW Statistics from Python), spss.Submit will start the PASW Statistics backend processor.

• Submitted syntax for MATRIX-END MATRIX and BEGIN DATA-END DATA blocks cannot be split across BEGIN PROGRAM-END PROGRAM blocks.

• The following commands are not supported by Submit when driving PASW Statistics from Python: OUTPUT EXPORT, OUTPUT OPEN and OUTPUT SAVE.

Example Collapse Hide details

Example

*python_Submit.sps.
BEGIN PROGRAM.
import spss
#run a single command
spss.Submit("DISPLAY NAMES.")
#run two commands
spss.Submit(["DISPLAY NAMES.", "SHOW $VARS."])

#build and run two commands
command1="FREQUENCIES VARIABLES=var1."
command2="DESCRIPTIVES VARIABLES=var3."
spss.Submit([command1, command2])
END PROGRAM.
Example: Triple-Quoted Strings Collapse Hide details

Example: Triple-Quoted Strings

*python_Submit_triple_quote.sps.
BEGIN PROGRAM.
import spss
file="/examples/data/demo.sav"
varlist="marital gender inccat"
spss.Submit("""
GET FILE='%s'.
FREQUENCIES VARIABLES=%s
  /STATISTICS NONE
  /BARCHART.
""" %(file,varlist))
END PROGRAM.

Within the triple-quoted string, %s is used for string substitution; thus, you can insert Python variables that resolve to strings in the quoted block of commands.


spss.TextBlock Class (Python)

TextBlock class,TextBlock class,TextBlock class

spss.TextBlock(name,content,outline). Creates and populates a text block item in the Viewer. The argument name is a string that specifies the name of this item in the outline pane of the Viewer. The argument content is a string that specifies the text, which may include the escape sequence \n to specify line breaks. You can also add lines using the append method. The optional argument outline is a string that specifies a title for this item that appears in the outline pane of the Viewer. The item for the text block itself will be placed one level deeper than the item for the outline title. If outline is omitted, the Viewer item for the text block will be placed one level deeper than the root item for the output containing the text block.

An instance of the TextBlock class can only be used within a StartProcedure-EndProcedure block or within a custom procedure class based on the spss.BaseProcedure class.

Example

import spss
spss.StartProcedure("mycompany.com.demo")
textBlock = spss.TextBlock("Text block name",
                           "A single line of text.")
spss.EndProcedure()
Sample text block

• This example shows how to generate a text block within a spss.StartProcedure-spss.EndProcedure block. The output will be contained under an item named mycompany.com.demo in the outline pane of the Viewer.

• The variable textBlock stores a reference to the instance of the text block object. You will need this object reference if you intend to append additional lines to the text block with the append method.

Related Topics

spss.BasePivotTable Class (Python)
spss.Procedure Class (Python)
spss.StartProcedure Function (Python)
append Method (Python)


append Method (Python)

TextBlock class,TextBlock class,TextBlock class
append method,append method,append method
append method,append method,append method
TextBlock class,TextBlock class,TextBlock class

.append(line,skip). Appends lines to an existing text block. The argument line is a string that specifies the text, which may include the escape sequence \n to specify line breaks. The optional argument skip specifies the number of new lines to create when appending the specified line. The default is 1 and results in appending the single specified line. Integers greater than 1 will result in blank lines preceding the appended line. For example, specifying skip=3 will result in two blank lines before the appended line.

Example

import spss
spss.StartProcedure("mycompany.com.demo")
textBlock = spss.TextBlock("Text block name",
                           "A single line of text.")
textBlock.append("A second line of text.")
textBlock.append("A third line of text preceded by a blank line.",skip=2)
spss.EndProcedure()


Variable Format Types (Python)

Type | Description
1 | A. Standard characters.
2 | AHEX. Hexadecimal characters.
3 | COMMA. Numbers with commas as the grouping symbol and a period as the decimal indicator. For example: 1,234,567.89.
4 | DOLLAR. Numbers with a leading dollar sign ($), commas as the grouping symbol, and a period as the decimal indicator. For example: $1,234,567.89.
5 | F. Standard numeric.
6 | IB. Integer binary.
7 | PIBHEX. Hexadecimal of PIB (positive integer binary).
8 | P. Packed decimal.
9 | PIB. Positive integer binary.
10 | PK. Unsigned packed decimal.
11 | RB. Real binary.
12 | RBHEX. Hexadecimal of RB (real binary).
15 | Z. Zoned decimal.
16 | N. Restricted numeric.
17 | E. Scientific notation.
20 | DATE. International date of the general form dd-mmm-yyyy.
21 | TIME. Time of the general form hh:mm:ss.ss.
22 | DATETIME. Date and time of the general form dd-mmm-yyyy hh:mm:ss.ss.
23 | ADATE. American date of the general form mm/dd/yyyy.
24 | JDATE. Julian date of the general form yyyyddd.
25 | DTIME. Days and time of the general form dd hh:mm:ss.ss.
26 | WKDAY. Day of the week.
27 | MONTH. Month.
28 | MOYR. Month and year.
29 | QYR. Quarter and year of the general form qQyyyy.
30 | WKYR. Week and year.
31 | PCT. Percentage sign after numbers.
32 | DOT. Numbers with periods as the grouping symbol and a comma as the decimal indicator. For example: 1.234.567,89.
33 | CCA. Custom currency format 1.
34 | CCB. Custom currency format 2.
35 | CCC. Custom currency format 3.
36 | CCD. Custom currency format 4.
37 | CCE. Custom currency format 5.
38 | EDATE. European date of the general form dd.mm.yyyy.
39 | SDATE. Sortable date of the general form yyyy/mm/dd.


Introduction to Python Scripts

Python,Python,Python
using Python within PASW Statistics,using Python within PASW Statistics,using Python within PASW Statistics
Python,Python,Python
scripts,scripts,scripts

The PASW Statistics Scripting Facility provides the ability to create Python®scripts that operate on the PASW Statistics user interface, manipulate output objects, and run command syntax. This feature requires the PASW Statistics-Python Integration Plug-in.

A companion interface is available for creating Python programs that enable you to control the flow of command syntax jobs, read and write data, and create custom procedures. See the topic Introduction to Python Programs for more information.

Scope

You can run Python scripts directly from within PASW Statistics, from within Python programs, or from an external Python process, such as a Python IDE or the Python interpreter.

Python Script Run from PASW Statistics. You can run a Python script from Utilities>Run Script or from the Python script editor which is launched when opening a Python file (.py) from File>Open>Script. Scripts run from the Python editor that is launched from PASW Statistics operate on the PASW Statistics client that launched the editor. This allows you to debug your Python code from a Python editor.

Python Script Run from an External Python Process. You can run a Python script from any external Python process, such as a Python IDE that is not launched from PASW Statistics, or the Python interpreter. The script will attempt to connect to an existing PASW Statistics client. If more than one client is found, a connection is made to the most recently launched one. If an existing client is not found, the Python script starts up a new instance of the PASW Statistics client. By default, the Data Editor and Viewer are invisible for the new client. You can choose to make them visible or work in invisible mode with datasets and output documents.

• Mac. To run a Python script from an external Python process on Mac, launch the Programmability External Python Process application, installed with the PASW Statistics-Python Integration Plug-in and located in the directory where PASW Statistics is installed. The application launches IDLE (the default IDE provided with Python) and sets environment variables necessary for driving PASW Statistics.

Python Script Run from Python Program. You can run a Python script from a Python program by importing the Python module containing the script and calling the function in the module that implements the script. You can also call Python script methods directly from within a Python program. See the topic Running Python Scripts from Python Programs for more information. These features are not available in distributed mode or when running a Python program from an external Python process. To programmatically invoke a Python script in distributed mode, use the SCRIPT command.

Limitations

• The interfaces exposed by the spss module (the module used for Python programs) cannot be used in a Python script.

• Calling methods in the SpssClient module with keyword arguments--in other words, keyword = value--is not supported.

Help

Additional information is available in Scripting with the Python Programming Language.

Note: SPSS Inc. is not the owner or licensor of the Python software. Any user of Python must agree to the terms of the Python license agreement located on the Python Web site. SPSS Inc. does not make any statement about the quality of the Python program. SPSS Inc. fully disclaims all liability associated with your use of the Python program.

Related Topics

SpssClient Class (Python)
SpssDataDoc Class (Python)
SpssOutputDoc Class (Python)
SpssSyntaxDoc Class (Python)
SpssOutputItem Class (Python)
MenuTableList Class (Python)
Pivot Tables (Python)
SpssServerConf Class (Python)
Export Options (Python)
Preference Options (Python)


Working with Multiple Versions of PASW Statistics (Python)

Python,Python,Python
managing multiple versions,managing multiple versions,managing multiple versions

Multiple versions of the PASW Statistics-Python Integration Plug-in can be used on the same machine, each associated with a major version of PASW Statistics, such as 17.0 or 18.

Running Python Scripts from Within PASW Statistics

By default, Python scripts run from within the last installed version of PASW Statistics will automatically use the appropriate version of the plug-in. To run Python scripts from within a different version of PASW Statistics, use the SpssClient.SetDefaultJCVersion method to set the default to a different version (the setting persists across sessions). You can then run Python scripts from within the other version. If you are attempting to change the default version from 16.0 to 17.0, additional configuration is required; please see the Notes below.

Running Python Scripts from an External Python Process

When running Python scripts from a separate Python process, such as the Python interpreter or a Python IDE, the plug-in will drive the version of PASW Statistics that matches the default plug-in version specified for that version of Python. Unless you change it, the default plug-in version for a given version of Python (such as Python 2.6) is the last one installed. You can view the default version using the SpssClient.GetDefaultJCVersion method and you can change the default version using the SpssClient.SetDefaultJCVersion method. The setting persists across sessions. If you are attempting to change the default version from 16.0 to 17.0, additional configuration is required; please see the Notes below.

Notes

To change the default version from 16.0 to 17.0, you will need to manually modify the file SpssClient.pth located in the Python 2.5 site-packages directory. Change the order of entries in the file so that the first line is SpssClient170. You should also ensure that the first line in spss.pth (also located in site-packages) is spss170.

• Windows. The site-packages directory is located in the Lib directory under the Python 2.5 installation directory—for example, C:\Python25\Lib\site-packages.

• Mac OS X 10.4 (Tiger). The site-packages directory is located at /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages.

• Mac OS X 10.5 (Leopard). The site-packages directory is located at /Library/Python/2.5/site-packages.

• Linux and UNIX Server. The site-packages directory is located in the /lib/python2.5/ directory under the Python 2.5 installation directory—for example, /usr/local/python25/lib/python2.5/site-packages.


Class Hierarchy for Scripting Facility (Python)

The following diagram shows the hierarchy of classes available to Python scripts.


SpssClient Class (Python)

SpssClient class,SpssClient class,SpssClient class

The SpssClient class is the top level class for the PASW Statistics Python scripting interface. From an SpssClient object you can:

• Access the current data, syntax, or output document.

• Open and access a saved data, syntax, or output document.

• Create and access a new data, syntax, or output document.

• Obtain a list of all open data, syntax, or output documents.

• Run command syntax.

• Get and set options available from Edit>Options in the user interface.

• Get and set export options for exporting output.

• Get values pertinent to an autoscript, such as the output item that triggered the autoscript.

• Obtain information about configured instances of PASW Statistics Server and configure new instances.

The SpssClient object is always available to a script, but you must call SpssClient.StartClient to establish a connection to the PASW Statistics client before you can use any of the other methods in the class.

Example

This example shows the basic structure of a Python script that interacts with the PASW Statistics client. It accesses the designated output document and sets each of the pivot tables as selected.

import SpssClient
SpssClient.StartClient()

OutputDoc = SpssClient.GetDesignatedOutputDoc()
OutputItems = OutputDoc.GetOutputItems()

for index in range(OutputItems.Size()):
   OutputItem = OutputItems.GetItemAt(index)
   if OutputItem.GetType() == SpssClient.OutputItemType.PIVOT:
        OutputItem.SetSelected(True)
SpssClient.StopClient()

• The import SpssClient statement imports the Python module containing the PASW Statistics classes and methods available in the Python scripting interface.

• SpssClient.StartClient() provides a connection to the associated PASW Statistics client, enabling the script to retrieve information from the client and to perform operations on objects managed by the client, such as pivot tables. Whether the script connects to an existing client or starts up a new client depends on how the script was invoked. See the topic StartClient Method (Python) for more information.

• SpssClient.StopClient() terminates the connection to the PASW Statistics client and should be called at the completion of each Python script. If the script is being run from an external Python process that starts up a new client, call SpssClient.Exit() before SpssClient.StopClient().


CreateNewServer Method (Python)

SpssClient class,SpssClient class,SpssClient class
CreateNewServer method,CreateNewServer method,CreateNewServer method
CreateNewServer method,CreateNewServer method,CreateNewServer method
SpssClient class,SpssClient class,SpssClient class

Creates a new server configuration and returns an SpssServerConf object. To add this server to the list of configured servers, use the Add method in the SpssServerConfList class. You can obtain an instance of SpssServerConfList from the GetConfiguredServers method in the SpssClient class.

Syntax

SpssServerConf=SpssClient.CreateNewServer(serverName,port,desc)

Parameters

serverName | The machine name or IP address of the PASW Statistics Server machine
port | Port number for PASW Statistics Server
desc | Textual description of the server

Related Topics

GetConfiguredServers Method (Python)
GetCurrentServer Method (Python)
GetDefaultServer Method (Python)
GetLocalServer Method (Python)
SaveServers Method (Python)
SpssServerConf Class (Python)


Exit Method (Python)

SpssClient class,SpssClient class,SpssClient class
Exit method,Exit method,Exit method
Exit method,Exit method,Exit method
SpssClient class,SpssClient class,SpssClient class

Terminates the instance of the PASW Statistics client associated with the current script. This method is intended for use when running a script from an external Python process (such as a Python IDE or the Python interpreter), and will terminate the instance of the PASW Statistics client associated with the script. The method has no effect when called from a script that is run from within the PASW Statistics client, either through Utilities>Run Script or from a Python IDE launched from File>Open>Script or File>New>Script.

Syntax

SpssClient.Exit()

Related Topics

StartClient Method (Python)
StopClient Method (Python)


GetActiveDataDoc Method (Python)

SpssClient class,SpssClient class,SpssClient class
GetActiveDataDoc method,GetActiveDataDoc method,GetActiveDataDoc method
GetActiveDataDoc method,GetActiveDataDoc method,GetActiveDataDoc method
SpssClient class,SpssClient class,SpssClient class

Returns the active dataset as an SpssDataDoc object.

Syntax

SpssDataDoc=SpssClient.GetActiveDataDoc()

Related Topics

IsActiveDataDoc Method (Python)
GetDataDocuments Method (Python)


GetConfiguredServers Method (Python)

SpssClient class,SpssClient class,SpssClient class
GetConfiguredServers method,GetConfiguredServers method,GetConfiguredServers method
GetConfiguredServers method,GetConfiguredServers method,GetConfiguredServers method
SpssClient class,SpssClient class,SpssClient class

Returns the list of configured servers as an SpssServerConfList object. The list consists of SpssServerConf objects for each of the configured servers, including the local computer.

Syntax

SpssServerConfList=SpssClient.GetConfiguredServers()

Related Topics

CreateNewServer Method (Python)
GetCurrentServer Method (Python)
GetDefaultServer Method (Python)
GetLocalServer Method (Python)
SaveServers Method (Python)
SpssServerConf Class (Python)


GetCurrentDirectory Method (Python)

SpssClient class,SpssClient class,SpssClient class
GetCurrentDirectory method,GetCurrentDirectory method,GetCurrentDirectory method
GetCurrentDirectory method,GetCurrentDirectory method,GetCurrentDirectory method
SpssClient class,SpssClient class,SpssClient class

Returns the current working directory of the PASW Statistics client.

Syntax

SpssClient.GetCurrentDirectory()

Related Topics

SetCurrentDirectory Method (Python)


GetCurrentServer Method (Python)

SpssClient class,SpssClient class,SpssClient class
GetCurrentServer method,GetCurrentServer method,GetCurrentServer method
GetCurrentServer method,GetCurrentServer method,GetCurrentServer method
SpssClient class,SpssClient class,SpssClient class

Returns an SpssServerConf object representing the current server (may be an instance of PASW Statistics Server or the local computer).

Syntax

SpssServerConf=SpssClient.GetCurrentServer()

Related Topics

CreateNewServer Method (Python)
GetConfiguredServers Method (Python)
GetDefaultServer Method (Python)
GetLocalServer Method (Python)
SaveServers Method (Python)
SpssServerConf Class (Python)


GetDataDocuments Method (Python)

SpssClient class,SpssClient class,SpssClient class
GetDataDocuments method,GetDataDocuments method,GetDataDocuments method
GetDataDocuments method,GetDataDocuments method,GetDataDocuments method
SpssClient class,SpssClient class,SpssClient class

Returns the list of open datasets as a DataDocsList object. Each item in the list is an SpssDataDoc object.

Syntax

DataDocsList=SpssClient.GetDataDocuments()

Related Topics

DataDocsList Class (Python)
GetActiveDataDoc Method (Python)


GetDefaultJCVersion Method (Python)

SpssClient class,SpssClient class,SpssClient class
GetDefaultJCVersion method,GetDefaultJCVersion method,GetDefaultJCVersion method
GetDefaultJCVersion method,GetDefaultJCVersion method,GetDefaultJCVersion method
SpssClient class,SpssClient class,SpssClient class
versions,versions,versions
managing multiple versions,managing multiple versions,managing multiple versions

Returns a string specifying the default version of the PASW Statistics-Python Integration Plug-in used for Python scripts--for example, "SpssClient170" for version 17.0. This method is useful when working with multiple versions of the plug-in on a given machine (see Note below). You can change the default using the SetDefaultJCVersion method.

Syntax

SpssClient.GetDefaultJCVersion()

Note: The methods for managing multiple versions of the plug-in (SpssClient.GetDefaultJCVersion, and SpssClient.SetDefaultJCVersion) operate within a given Python version, not across Python versions. For example, if you are driving PASW Statistics from a Python IDE installed for Python 2.6 then you can view and control the versions of the plug-in installed for Python 2.6.

See the topic Working with Multiple Versions of PASW Statistics (Python) for more information.

Related Topics

SetDefaultJCVersion Method (Python)


GetDefaultServer Method (Python)

SpssClient class,SpssClient class,SpssClient class
GetDefaultServer method,GetDefaultServer method,GetDefaultServer method
GetDefaultServer method,GetDefaultServer method,GetDefaultServer method
SpssClient class,SpssClient class,SpssClient class

Returns an SpssServerConf object representing the default server (may be an instance of PASW Statistics Server or the local computer).

Syntax

SpssServerConf=SpssClient.GetDefaultServer()

Related Topics

CreateNewServer Method (Python)
GetConfiguredServers Method (Python)
GetCurrentServer Method (Python)
GetLocalServer Method (Python)
SaveServers Method (Python)
SpssServerConf Class (Python)


GetDesignatedOutputDoc Method (Python)

SpssClient class,SpssClient class,SpssClient class
GetDesignatedOutputDoc method,GetDesignatedOutputDoc method,GetDesignatedOutputDoc method
GetDesignatedOutputDoc method,GetDesignatedOutputDoc method,GetDesignatedOutputDoc method
SpssClient class,SpssClient class,SpssClient class

Returns an SpssOutputDoc object representing the designated output document.

• If you have more than one open output document, output is routed to the designated one.

Syntax

SpssOutputDoc=SpssClient.GetDesignatedOutputDoc()

Related Topics

GetOutputDocuments Method (Python)


GetDesignatedSyntaxDoc Method (Python)

SpssClient class,SpssClient class,SpssClient class
GetDesignatedSyntaxDoc method,GetDesignatedSyntaxDoc method,GetDesignatedSyntaxDoc method
GetDesignatedSyntaxDoc method,GetDesignatedSyntaxDoc method,GetDesignatedSyntaxDoc method
SpssClient class,SpssClient class,SpssClient class

Returns an SpssSyntaxDoc object representing the designated syntax document.

• If you have more than one open syntax document, command syntax is pasted into the designated one.

Syntax

SpssSyntaxDoc=SpssClient.GetDesignatedSyntaxDoc()

Related Topics

GetSyntaxDocuments Method (Python)


GetExportOption Method (Python)

SpssClient class,SpssClient class,SpssClient class
GetExportOption method,GetExportOption method,GetExportOption method
GetExportOption method,GetExportOption method,GetExportOption method
SpssClient class,SpssClient class,SpssClient class

Returns the value of the specified export option, as a string.

Syntax

SpssClient.GetExportOption(option)

Parameters

The value of option is the identifier SpssClient.ExportOptions, followed by a period (.) and the name of the option--for example, SpssClient.ExportOptions.GraphExportType. See Export Options for the available list of options.

Related Topics

SetExportOption Method (Python)


GetLocale Method (Python)

SpssClient class,SpssClient class,SpssClient class
GetLocale method,GetLocale method,GetLocale method
GetLocale method,GetLocale method,GetLocale method
SpssClient class,SpssClient class,SpssClient class

Returns a string specifying the current locale. The locale consists of the language, country and char set information.

Syntax

SpssClient.GetLocale()


GetLocalServer Method (Python)

SpssClient class,SpssClient class,SpssClient class
GetLocalServer method,GetLocalServer method,GetLocalServer method
GetLocalServer method,GetLocalServer method,GetLocalServer method
SpssClient class,SpssClient class,SpssClient class

Returns an SpssServerConf object representing the local computer.

Syntax

SpssServerConf=SpssClient.GetLocalServer()

Related Topics

CreateNewServer Method (Python)
GetConfiguredServers Method (Python)
GetCurrentServer Method (Python)
GetDefaultServer Method (Python)
SaveServers Method (Python)
SpssServerConf Class (Python)


GetOutputDocuments Method (Python)

SpssClient class,SpssClient class,SpssClient class
GetOutputDocuments method,GetOutputDocuments method,GetOutputDocuments method
GetOutputDocuments method,GetOutputDocuments method,GetOutputDocuments method
SpssClient class,SpssClient class,SpssClient class

Returns the list of open output documents as an OutputDocsList object. Each item in the list is an SpssOutputDoc object.

Syntax

OutputDocsList=SpssClient.GetOutputDocuments()

Related Topics

OutputDocsList Class (Python)
GetDesignatedOutputDoc Method (Python)


GetPreference Method (Python)

SpssClient class,SpssClient class,SpssClient class
GetPreference method,GetPreference method,GetPreference method
GetPreference method,GetPreference method,GetPreference method
SpssClient class,SpssClient class,SpssClient class

Returns the value of the specified preference option, as a string.

Syntax

SpssClient.GetPreference(option)

The value of option is the identifier SpssClient.PreferenceOptions, followed by a period (.) and the name of the option--for example, SpssClient.PreferenceOptions.VariableListDisplay. See Preference Options for the available list of options.

Related Topics

SetPreference Method (Python)


GetScriptContext Method (Python)

SpssClient class,SpssClient class,SpssClient class
GetScriptContext method,GetScriptContext method,GetScriptContext method
GetScriptContext method,GetScriptContext method,GetScriptContext method
SpssClient class,SpssClient class,SpssClient class

Returns an SpssScriptContext object that allows you to determine the context in which a script is being run--as an autoscript, or not.

• When the script is being run as an autoscript, the returned SpssScriptContext object provides access to the output item that triggered the autoscript as well as the associated output document.

• When the script is not being run as an autoscript, GetScriptContext returns None.

Syntax

SpssScriptContext=SpssClient.GetScriptContext()

Related Topics

SpssScriptContext Class (Python)


GetSPSSOptions Method (Python)

SpssClient class,SpssClient class,SpssClient class
GetSPSSOptions method,GetSPSSOptions method,GetSPSSOptions method
GetSPSSOptions method,GetSPSSOptions method,GetSPSSOptions method
SpssClient class,SpssClient class,SpssClient class

Returns a string which is a concatenation of three-letter abbreviations for each of the licensed options. You can determine if a specified option is available from the IsOptionAvailable method.

Syntax

options=SpssClient.GetSPSSOptions()

The options and associated three-letter abbreviations are as follows:

Bas | Base
Pro | Regression
Adv | Advanced Statistics
Cyt | Exact Test
Cat | Categories
Mva | Missing Values
Con | Conjoint
Msa | Custom Tables
Csp | Complex Samples
Tre | Decision Trees
Vld | Data Preparation
Trd | Forecasting
Pes | Statistics Adaptor
Neu | Neural Networks
Rfm | RFM

Related Topics

IsOptionAvailable Method (Python)


GetSPSSPath Method (Python)

SpssClient class,SpssClient class,SpssClient class
GetSPSSPath method,GetSPSSPath method,GetSPSSPath method
GetSPSSPath method,GetSPSSPath method,GetSPSSPath method
SpssClient class,SpssClient class,SpssClient class

Returns a string specifying the path to the PASW Statistics installation directory.

Syntax

path=SpssClient.GetSPSSPath()


GetSPSSVersion Method (Python)

SpssClient class,SpssClient class,SpssClient class
GetSPSSVersion method,GetSPSSVersion method,GetSPSSVersion method
GetSPSSVersion method,GetSPSSVersion method,GetSPSSVersion method
SpssClient class,SpssClient class,SpssClient class

Returns a string specifying the PASW Statistics version.

Syntax

version=SpssClient.GetSPSSVersion()


GetSyntaxDocuments Method (Python)

SpssClient class,SpssClient class,SpssClient class
GetSyntaxDocuments method,GetSyntaxDocuments method,GetSyntaxDocuments method
GetSyntaxDocuments method,GetSyntaxDocuments method,GetSyntaxDocuments method
SpssClient class,SpssClient class,SpssClient class

Returns the list of open syntax documents as a SyntaxDocsList object. Each item in the list is an SpssSyntaxDoc object.

Syntax

SyntaxDocsList=SpssClient.GetSyntaxDocuments()

Related Topics

SyntaxDocsList Class (Python)
GetDesignatedSyntaxDoc Method (Python)


GetUIAlerts Method (Python)

SpssClient class,SpssClient class,SpssClient class
GetUIAlerts method,GetUIAlerts method,GetUIAlerts method
GetUIAlerts method,GetUIAlerts method,GetUIAlerts method
SpssClient class,SpssClient class,SpssClient class

Returns the current setting of UI alerts for the client. The result is Boolean.

Syntax

SpssClient.GetUIAlerts()

Returns

True | Alerts are displayed in the UI
False | UI alerts are suppressed

Related Topics

SetUIAlerts Method (Python)


IsDataDocInUse Method (Python)

SpssClient class,SpssClient class,SpssClient class
IsDataDocInUse method,IsDataDocInUse method,IsDataDocInUse method
IsDataDocInUse method,IsDataDocInUse method,IsDataDocInUse method
SpssClient class,SpssClient class,SpssClient class

Indicates whether a specified data file is in use by another instance of PASW Statistics. The result is Boolean. The argument is a string specifying the path to the data file. Note: This method is not supported on Mac and Linux.

Syntax

SpssClient.IsDataDocInUse(fileName)


IsOptionAvailable Method (Python)

SpssClient class,SpssClient class,SpssClient class
IsOptionAvailable method,IsOptionAvailable method,IsOptionAvailable method
IsOptionAvailable method,IsOptionAvailable method,IsOptionAvailable method
SpssClient class,SpssClient class,SpssClient class

Checks if the PASW Statistics client is licensed for a specified optional component. The result is Boolean. You can obtain a list of all available options from the GetSPSSOptions method.

Syntax

SpssClient.IsOptionAvailable(licOption)

Parameters

The parameter licOption specifies the option. The available values are:

SpssClient.LicenseOption.BASE | Base
SpssClient.LicenseOption.PRO_STATS | Regression
SpssClient.LicenseOption.ADVANCED_STATS | Advanced Statistics
SpssClient.LicenseOption.CYTEL | Exact Test
SpssClient.LicenseOption.MARKET_RESEARCH | Categories
SpssClient.LicenseOption.MISSING_VALUES | Missing Values
SpssClient.LicenseOption.CONJOINT | Conjoint
SpssClient.LicenseOption.CUSTOM_TABLES | Custom Tables
SpssClient.LicenseOption.COMPLEX_SAMPLE | Complex Samples
SpssClient.LicenseOption.TREEVIEW | Decision Trees
SpssClient.LicenseOption.VALIDATEDATA | Data Preparation
SpssClient.LicenseOption.TRENDS | Forecasting
SpssClient.LicenseOption.PES | Statistics Adaptor
SpssClient.LicenseOption.NEURAL_NETWORK | Neural Networks
SpssClient.LicenseOption.RFM | RFM

Returns

True | The option is available.
False | The option is not available or the license for the option has expired.

Related Topics

GetSPSSOptions Method (Python)


LogToViewer Method (Python)

SpssClient class,SpssClient class,SpssClient class
LogToViewer method,LogToViewer method,LogToViewer method
LogToViewer method,LogToViewer method,LogToViewer method
SpssClient class,SpssClient class,SpssClient class

Writes the specified content to the designated output document as a log item. The content is appended to the last log item in the output document.

Syntax

SpssClient.LogToViewer(content)

Parameters

content A string


NewDataDoc Method (Python)

SpssClient class,SpssClient class,SpssClient class
NewDataDoc method,NewDataDoc method,NewDataDoc method
NewDataDoc method,NewDataDoc method,NewDataDoc method
SpssClient class,SpssClient class,SpssClient class

Creates a new dataset and makes it the active dataset. The method returns an SpssDataDoc object associated with the new dataset.

Syntax

SpssDataDoc=SpssClient.NewDataDoc()

Related Topics

SpssDataDoc Class (Python)
OpenDataDoc Method (Python)


NewOutputDoc Method (Python)

SpssClient class,SpssClient class,SpssClient class
NewOutputDoc method,NewOutputDoc method,NewOutputDoc method
NewOutputDoc method,NewOutputDoc method,NewOutputDoc method
SpssClient class,SpssClient class,SpssClient class

Creates a new output document and makes it the designated output document. The method returns an SpssOutputDoc object associated with the new output document.

Syntax

SpssOutputDoc=SpssClient.NewOutputDoc()

Related Topics

SpssOutputDoc Class (Python)
OpenOutputDoc Method (Python)


NewSyntaxDoc Method (Python)

SpssClient class,SpssClient class,SpssClient class
NewSyntaxDoc method,NewSyntaxDoc method,NewSyntaxDoc method
NewSyntaxDoc method,NewSyntaxDoc method,NewSyntaxDoc method
SpssClient class,SpssClient class,SpssClient class

Creates a new syntax document and makes it the designated syntax document. The method returns an SpssSyntaxDoc object associated with the new syntax document.

Syntax

SpssSyntaxDoc=SpssClient.NewSyntaxDoc()

Related Topics

SpssSyntaxDoc Class (Python)
OpenSyntaxDoc Method (Python)


OpenDataDoc Method (Python)

SpssClient class,SpssClient class,SpssClient class
OpenDataDoc method,OpenDataDoc method,OpenDataDoc method
OpenDataDoc method,OpenDataDoc method,OpenDataDoc method
SpssClient class,SpssClient class,SpssClient class

Opens the specified data document and makes it the active dataset. The method returns an SpssDataDoc object.

Syntax

SpssDataDoc=SpssClient.OpenDataDoc(fileName)

Parameters

fileName The path and file name of the data document, as a string.

On Windows, it is recommended to use raw strings for file paths, or replace backslashes with forward slashes (PASW Statistics accepts a forward slash for any backslash in a file specification). Raw strings are specified by prefacing the string with r, as in r'c:\examples\mydata.sav'. In raw mode, Python treats all backslashes in the string as the backslash character and not as the start of an escape sequence.

Related Topics

SpssDataDoc Class (Python)
NewDataDoc Method (Python)


OpenOutputDoc Method (Python)

SpssClient class,SpssClient class,SpssClient class
OpenOutputDoc method,OpenOutputDoc method,OpenOutputDoc method
OpenOutputDoc method,OpenOutputDoc method,OpenOutputDoc method
SpssClient class,SpssClient class,SpssClient class

Opens the specified output document and makes it the designated output document. The method returns an SpssOutputDoc object. By default, the associated Viewer window is invisible. Use the SetVisible method from the SpssOutputUI class to make the Viewer window visible. You get an SpssOutputUI object using the GetOutputUI method of the SpssOutputDoc object.

Syntax

SpssOutputDoc=SpssClient.OpenOutputDoc(fileName)

Parameters

fileName The path and file name of the output document, as a string.

On Windows, it is recommended to use raw strings for file paths, or replace backslashes with forward slashes (PASW Statistics accepts a forward slash for any backslash in a file specification). Raw strings are specified by prefacing the string with r, as in r'c:\examples\mydata.sav'. In raw mode, Python treats all backslashes in the string as the backslash character and not as the start of an escape sequence.

Related Topics

SpssOutputDoc Class (Python)
NewOutputDoc Method (Python)


OpenSyntaxDoc Method (Python)

SpssClient class,SpssClient class,SpssClient class
OpenSyntaxDoc method,OpenSyntaxDoc method,OpenSyntaxDoc method
OpenSyntaxDoc method,OpenSyntaxDoc method,OpenSyntaxDoc method
SpssClient class,SpssClient class,SpssClient class

Opens the specified syntax document and makes it the designated syntax document. The method returns an SpssSyntaxDoc object. By default, the associated Syntax Editor window is invisible. Use the SetVisible method from the SpssSyntaxUI class to make the Syntax Editor window visible. You get an SpssSyntaxUI object using the GetSyntaxUI method of the SpssSyntaxDoc object.

Syntax

SpssSyntaxDoc=SpssClient.OpenSyntaxDoc(fileName)

Parameters

fileName The path and file name of the syntax document, as a string.

On Windows, it is recommended to use raw strings for file paths, or replace backslashes with forward slashes (PASW Statistics accepts a forward slash for any backslash in a file specification). Raw strings are specified by prefacing the string with r, as in r'c:\examples\mydata.sav'. In raw mode, Python treats all backslashes in the string as the backslash character and not as the start of an escape sequence.

Related Topics

SpssSyntaxDoc Class (Python)
NewSyntaxDoc Method (Python)


RunSyntax Method (Python)

SpssClient class,SpssClient class,SpssClient class
RunSyntax method,RunSyntax method,RunSyntax method
RunSyntax method,RunSyntax method,RunSyntax method
SpssClient class,SpssClient class,SpssClient class

Executes a set of syntax commands.

• The submitted commands are executed synchronously with any other submitted command syntax.

• This method cannot be called within a script that is run from the SCRIPT command.

Syntax

SpssClient.RunSyntax(syntaxCommands)

Parameters

syntaxCommands A string specifying command syntax. If the string is empty, no error is returned and the script continues. Commands must end in a period (command terminator).

Example

SpssClient.RunSyntax("GET FILE='/examples/data/Employee data.sav'.")

To specify multiple commands, separate each command by the escape sequence for a linefeed, "\n", or enclose the set of commands in a triple-quoted string, as in:

SpssClient.RunSyntax(r"""
GET FILE='/examples/data/Employee data.sav'.
SORT CASES BY gender.
SPLIT FILE
  LAYERED BY gender.
DESCRIPTIVES
  VARIABLES=salary salbegin jobtime prevexp
  /STATISTICS=MEAN STDDEV MIN MAX.
SPLIT FILE OFF.
""")

• The triple double quotes enclose a block of command syntax that is submitted for processing, retaining the line breaks. You can use either triple single quotes or triple double quotes, but you must use the same type (single or double) on both sides of the command syntax block.

• Notice that the triple-quoted expression is prefixed with the letter r. The r prefix to a string specifies Python's raw mode. In raw mode, Python treats all backslashes in the string as the backslash character and not as the start of an escape sequence.

Related Topics

RunSyntax Method (Python)


SaveServers Method (Python)

SpssClient class,SpssClient class,SpssClient class
SaveServers method,SaveServers method,SaveServers method
SaveServers method,SaveServers method,SaveServers method
SpssClient class,SpssClient class,SpssClient class

Saves the set of configured servers so that new server configurations added during the current session will persist across sessions.

Syntax

SpssClient.SaveServers()

Related Topics

CreateNewServer Method (Python)
GetConfiguredServers Method (Python)
GetCurrentServer Method (Python)
GetDefaultServer Method (Python)
GetLocalServer Method (Python)
SpssServerConf Class (Python)


ScriptParameter Method (Python)

SpssClient class,SpssClient class,SpssClient class
ScriptParameter method,ScriptParameter method,ScriptParameter method
ScriptParameter method,ScriptParameter method,ScriptParameter method
SpssClient class,SpssClient class,SpssClient class

Retrieves a parameter passed to the script when calling the script from a SCRIPT command within command syntax. Only a single parameter can be passed and it must be a quoted string.

Syntax

SpssClient.ScriptParameter(0)


SetCurrentDirectory Method (Python)

SpssClient class,SpssClient class,SpssClient class
SetCurrentDirectory method,SetCurrentDirectory method,SetCurrentDirectory method
SetCurrentDirectory method,SetCurrentDirectory method,SetCurrentDirectory method
SpssClient class,SpssClient class,SpssClient class

Sets the current working directory of the PASW Statistics client to a specified value.

Syntax

SpssClient.SetCurrentDirectory(newDir)

Parameters

newDir The absolute path to the new working directory, as a string.

Related Topics

GetCurrentDirectory Method (Python)


SetDefaultJCVersion Method (Python)

SpssClient class,SpssClient class,SpssClient class
SetDefaultJCVersion method,SetDefaultJCVersion method,SetDefaultJCVersion method
SetDefaultJCVersion method,SetDefaultJCVersion method,SetDefaultJCVersion method
SpssClient class,SpssClient class,SpssClient class
versions,versions,versions
managing multiple versions,managing multiple versions,managing multiple versions

Sets the default version of the PASW Statistics-Python Integration Plug-in used for Python scripts. This method is useful when working with multiple versions of the plug-in on a given machine (see Note below). The value of the argument is a quoted string or an integer specifying a plug-in version--for example, "SpssClient160" or 160 for version 16.0. You can view the default using the GetDefaultJCVersion method.

• SetDefaultJCVersion also sets the default version of the PASW Statistics-Python Integration Plug-in used for Python programs (Python code that utilizes the spss module).

Syntax

SpssClient.SetDefaultJCVersion(version)

Note: The methods for managing multiple versions of the plug-in (SpssClient.GetDefaultJCVersion, and SpssClient.SetDefaultJCVersion) operate within a given Python version, not across Python versions. For example, if you are driving PASW Statistics from a Python IDE installed for Python 2.6 then you can view and control the versions of the plug-in installed for Python 2.6.

See the topic Working with Multiple Versions of PASW Statistics (Python) for more information.

Related Topics

GetDefaultJCVersion Method (Python)


SetExportOption Method (Python)

SpssClient class,SpssClient class,SpssClient class
SetExportOption method,SetExportOption method,SetExportOption method
SetExportOption method,SetExportOption method,SetExportOption method
SpssClient class,SpssClient class,SpssClient class

Sets the value of the specified export option to the value provided.

Syntax

SpssClient.SetExportOption(option,value)

Parameters

value A string

For a list of the available export options and associated settings, see Export Options. The value of option is the identifier SpssClient.ExportOptions, followed by a period (.) and the name of the option--for example, SpssClient.ExportOptions.GraphExportType.

Related Topics

GetExportOption Method (Python)


SetPreference Method (Python)

SpssClient class,SpssClient class,SpssClient class
SetPreference method,SetPreference method,SetPreference method
SetPreference method,SetPreference method,SetPreference method
SpssClient class,SpssClient class,SpssClient class

Sets the value of the specified preference option to the value provided.

Syntax

SpssClient.SetPreference(option,value)

Parameters

value A string

For a list of the available preference options and settings, see Preference Options. The value of option is the identifier SpssClient.PreferenceOptions, followed by a period (.) and the name of the option--for example, SpssClient.PreferenceOptions.VariableListDisplay.

Related Topics

GetPreference Method (Python)


SetUIAlerts Method (Python)

SpssClient class,SpssClient class,SpssClient class
SetUIAlerts method,SetUIAlerts method,SetUIAlerts method
SetUIAlerts method,SetUIAlerts method,SetUIAlerts method
SpssClient class,SpssClient class,SpssClient class

Specifies the setting of UI alerts for the PASW Statistics client.

Syntax

SpssClient.SetUIAlerts(showUIAlerts)

Parameters

showUIAlerts True if alerts are to be displayed in the UI and False if UI alerts are to be suppressed.

If False is specified, any alerts triggered by script operations are propagated to the script as an exception.

Related Topics

GetUIAlerts Method (Python)


StartClient Method (Python)

SpssClient class,SpssClient class,SpssClient class
StartClient method,StartClient method,StartClient method
StartClient method,StartClient method,StartClient method
SpssClient class,SpssClient class,SpssClient class

Establishes a connection to the PASW Statistics client and is required for every Python script.

• If the script is run from an external Python process (such as a Python IDE or the Python interpreter), an attempt is made to connect to an existing PASW Statistics client. If more than one client is found, a connection is made to the most recently launched one. If an existing client is not found, a new and invisible instance of the PASW Statistics client is started and a connection to it is established.

• SpssClient.StopClient() should be called at the completion of the script. If the script is being run from an external Python process that starts up a new client, call SpssClient.Exit() before SpssClient.StopClient().

Syntax

SpssClient.StartClient()

Related Topics

Exit Method (Python)
StopClient Method (Python)


StopClient Method (Python)

SpssClient class,SpssClient class,SpssClient class
StopClient method,StopClient method,StopClient method
StopClient method,StopClient method,StopClient method
SpssClient class,SpssClient class,SpssClient class

Terminates the connection to the PASW Statistics client. This method should be called at the completion of each Python script.

Syntax

SpssClient.StopClient()

Related Topics

Exit Method (Python)
StartClient Method (Python)


SpssDataDoc Class (Python)

SpssDataDoc class,SpssDataDoc class,SpssDataDoc class

The SpssDataDoc class represents an open dataset.

Example: Obtaining the Active Dataset

import SpssClient
SpssClient.StartClient()
ActiveDataDoc = SpssClient.GetActiveDataDoc()

• The variable ActiveDataDoc is an SpssDataDoc object for the active dataset.

Example: Obtaining the First Opened Dataset

import SpssClient
SpssClient.StartClient()
DataDocsList = SpssClient.GetDataDocuments()
FirstDataDoc = DataDocsList.GetItemAt(0)

• SpssClient.GetDataDocuments() returns a DataDocsList object, which provides access to all open datasets.

• The GetItemAt method from the DataDocsList class is used to get the dataset with index 0 (the first opened dataset) from the list of open datasets. The variable FirstDataDoc is an SpssDataDoc object for this dataset.

Related Topics

SpssOutputDoc Class (Python)
SpssSyntaxDoc Class (Python)
SpssDataUI Class (Python)


CloseDocument Method (Python)

SpssDataDoc class,SpssDataDoc class,SpssDataDoc class
CloseDocument method,CloseDocument method,CloseDocument method
CloseDocument method,CloseDocument method,CloseDocument method
SpssDataDoc class,SpssDataDoc class,SpssDataDoc class

Closes the dataset. If the dataset is the last open dataset then the instance of the PASW Statistics client associated with the current script is terminated.

Syntax

SpssDataDoc.CloseDocument()


GetCaseCount Method (Python)

SpssDataDoc class,SpssDataDoc class,SpssDataDoc class
GetCaseCount method,GetCaseCount method,GetCaseCount method
GetCaseCount method,GetCaseCount method,GetCaseCount method
SpssDataDoc class,SpssDataDoc class,SpssDataDoc class

Returns the number of cases in the dataset.

Syntax

SpssDataDoc.GetCaseCount()

Related Topics

GetDatasetName Method (Python)
GetVariableCount Method (Python)


GetDatasetName Method (Python)

SpssDataDoc class,SpssDataDoc class,SpssDataDoc class
GetDatasetName method,GetDatasetName method,GetDatasetName method
GetDatasetName method,GetDatasetName method,GetDatasetName method
SpssDataDoc class,SpssDataDoc class,SpssDataDoc class

Returns the dataset name. If the dataset is unnamed, an empty string is returned.

Syntax

SpssDataDoc.GetDatasetName()

Related Topics

GetCaseCount Method (Python)
GetVariableCount Method (Python)
SetDatasetName Method (Python)


GetDataUI Method (Python)

SpssDataDoc class,SpssDataDoc class,SpssDataDoc class
GetDataUI method,GetDataUI method,GetDataUI method
GetDataUI method,GetDataUI method,GetDataUI method
SpssDataDoc class,SpssDataDoc class,SpssDataDoc class

Returns an SpssDataUI object representing the Data Editor window of the associated dataset, if one exists.

Syntax

SpssDataUI=SpssDataDoc.GetDataUI()

Related Topics

SpssDataUI Class (Python)


GetDocumentPath Method (Python)

SpssDataDoc class,SpssDataDoc class,SpssDataDoc class
GetDocumentPath method,GetDocumentPath method,GetDocumentPath method
GetDocumentPath method,GetDocumentPath method,GetDocumentPath method
SpssDataDoc class,SpssDataDoc class,SpssDataDoc class

Returns the path and file name of the data file associated with this dataset object, or the empty string if the dataset is not associated with a file.

Syntax

SpssDataDoc.GetDocumentPath()


GetMenuTable Method (Python)

SpssDataDoc class,SpssDataDoc class,SpssDataDoc class
GetMenuTable method,GetMenuTable method,GetMenuTable method
GetMenuTable method,GetMenuTable method,GetMenuTable method
SpssDataDoc class,SpssDataDoc class,SpssDataDoc class

Returns a MenuTableList object containing the list of available menu items for the data document.

Syntax

MenuTableList = SpssDataDoc.GetMenuTable()


GetVariableCount Method (Python)

SpssDataDoc class,SpssDataDoc class,SpssDataDoc class
GetVariableCount method,GetVariableCount method,GetVariableCount method
GetVariableCount method,GetVariableCount method,GetVariableCount method
SpssDataDoc class,SpssDataDoc class,SpssDataDoc class

Returns the number of variables in the associated dataset.

Syntax

SpssDataDoc.GetVariableCount()

Related Topics

GetCaseCount Method (Python)
GetDatasetName Method (Python)


IsActiveDataDoc Method (Python)

SpssDataDoc class,SpssDataDoc class,SpssDataDoc class
IsActiveDataDoc method,IsActiveDataDoc method,IsActiveDataDoc method
IsActiveDataDoc method,IsActiveDataDoc method,IsActiveDataDoc method
SpssDataDoc class,SpssDataDoc class,SpssDataDoc class

Indicates if this dataset is the active one. The result is Boolean--True if the dataset is the active one, False otherwise.

Syntax

SpssDataDoc.IsActiveDataDoc()

Related Topics

SetAsActiveDataDoc Method (Python)
GetActiveDataDoc Method (Python)


IsEqualTo Method (Python)

SpssDataDoc class,SpssDataDoc class,SpssDataDoc class
IsEqualTo method,IsEqualTo method,IsEqualTo method
IsEqualTo method,IsEqualTo method,IsEqualTo method
SpssDataDoc class,SpssDataDoc class,SpssDataDoc class

Indicates if this dataset object is the same object as a specified dataset object. The result is Boolean--True if the two objects are identical, False otherwise.

Syntax

SpssDataDoc.IsEqualTo(dataDoc)

Parameters

dataDoc An SpssDataDoc object


IsModified Method (Python)

SpssDataDoc class,SpssDataDoc class,SpssDataDoc class
IsModified method,IsModified method,IsModified method
IsModified method,IsModified method,IsModified method
SpssDataDoc class,SpssDataDoc class,SpssDataDoc class

Indicates whether the dataset has been modified. The result is Boolean--True if the dataset has been modified, False otherwise.

Syntax

SpssDataDoc.IsModified()

Related Topics

SetModified Method (Python)


IsPromptToSave Method (Python)

SpssDataDoc class,SpssDataDoc class,SpssDataDoc class
IsPromptToSave method,IsPromptToSave method,IsPromptToSave method
IsPromptToSave method,IsPromptToSave method,IsPromptToSave method
SpssDataDoc class,SpssDataDoc class,SpssDataDoc class

Indicates if the 'prompt to save' flag is set for this dataset object. The result is Boolean--True if the 'prompt to save' flag has been set, False otherwise.

Syntax

SpssDataDoc.IsPromptToSave()

Related Topics

SetPromptToSave Method (Python)


SaveAs Method (Python)

SpssDataDoc class,SpssDataDoc class,SpssDataDoc class
SaveAs method,SaveAs method,SaveAs method
SaveAs method,SaveAs method,SaveAs method
SpssDataDoc class,SpssDataDoc class,SpssDataDoc class

Saves the dataset to the specified file.

Syntax

SpssDataDoc.SaveAs(fileName)

Note: The save operation is carried out asynchronously, which means that execution continues without waiting for the save operation to complete. If you require subsequent access to the saved file using the Python open function, you can attempt to open the file from a try block within a while loop, continuing to loop until the open operation succeeds.


SetAsActiveDataDoc Method (Python)

SpssDataDoc class,SpssDataDoc class,SpssDataDoc class
SetAsActiveDataDoc method,SetAsActiveDataDoc method,SetAsActiveDataDoc method
SetAsActiveDataDoc method,SetAsActiveDataDoc method,SetAsActiveDataDoc method
SpssDataDoc class,SpssDataDoc class,SpssDataDoc class

Sets this dataset as the active one.

Syntax

SpssDataDoc.SetAsActiveDataDoc()

Related Topics

IsActiveDataDoc Method (Python)


SetDatasetName Method (Python)

SpssDataDoc class,SpssDataDoc class,SpssDataDoc class
SetDatasetName method,SetDatasetName method,SetDatasetName method
SetDatasetName method,SetDatasetName method,SetDatasetName method
SpssDataDoc class,SpssDataDoc class,SpssDataDoc class

Sets the dataset name. The argument is a string.

Syntax

SpssDataDoc.SetDatasetName(name)

Related Topics

GetDatasetName Method (Python)


SetModified Method (Python)

SpssDataDoc class,SpssDataDoc class,SpssDataDoc class
SetModified method,SetModified method,SetModified method
SetModified method,SetModified method,SetModified method
SpssDataDoc class,SpssDataDoc class,SpssDataDoc class

Sets the modified status of the dataset.

Syntax

SpssDataDoc.SetModified(modified)

Parameters

modified True to set the status to modified, False otherwise.

Related Topics

IsModified Method (Python)


SetPromptToSave Method (Python)

SpssDataDoc class,SpssDataDoc class,SpssDataDoc class
SetPromptToSave method,SetPromptToSave method,SetPromptToSave method
SetPromptToSave method,SetPromptToSave method,SetPromptToSave method
SpssDataDoc class,SpssDataDoc class,SpssDataDoc class

Sets the 'prompt to save' flag for this dataset object.

Syntax

SpssDataDoc.SetPromptToSave(promptToSave)

Parameters

promptToSave True to set the prompt to save flag, False otherwise.

Related Topics

IsPromptToSave Method (Python)


DataDocsList Class (Python)

DataDocsList class,DataDocsList class,DataDocsList class

The DataDocsList class provides access to the list of open datasets. You obtain a DataDocsList object from the GetDataDocuments method of the SpssClient class.

A DataDocsList object is not an iterable Python object. In order to iterate over the items in the list, use a for loop, as in:

for index in range(DataDocsList.Size()):

For an example that uses the DataDocsList class, see the examples for the SpssDataDoc class.


GetItemAt Method (Python)

DataDocsList class,DataDocsList class,DataDocsList class
GetItemAt method,GetItemAt method,GetItemAt method
GetItemAt method,GetItemAt method,GetItemAt method
DataDocsList class,DataDocsList class,DataDocsList class

Returns an SpssDataDoc object representing the dataset with the specified index. The index corresponds to the order in which the datasets were opened, with the first opened document having an index of 0.

Syntax

SpssDataDoc=DataDocsList.GetItemAt(index)


Size Method (Python)

DataDocsList class,DataDocsList class,DataDocsList class
Size method,Size method,Size method
Size method,Size method,Size method
DataDocsList class,DataDocsList class,DataDocsList class

Returns the number of open datasets.

Syntax

DataDocsList.Size()


SpssDataUI Class (Python)

SpssDataUI class,SpssDataUI class,SpssDataUI class

The SpssDataUI class represents the Data Editor window associated with an open dataset. You obtain an SpssDataUI object from the GetDataUI method of an SpssDataDoc object.

Example: Get the SpssDataUI Object Associated with the Active Dataset

import SpssClient
SpssClient.StartClient()
ActiveDataDoc = SpssClient.GetActiveDataDoc()
DataUI = ActiveDataDoc.GetDataUI()

• The variable DataUI is an SpssDataUI object for the Data Editor window associated with the active dataset.

Related Topics

SpssDataDoc Class (Python)


GetHeight Method (Python)

SpssDataUI class,SpssDataUI class,SpssDataUI class
GetHeight method,GetHeight method,GetHeight method
GetHeight method,GetHeight method,GetHeight method
SpssDataUI class,SpssDataUI class,SpssDataUI class

Returns the height of the associated Data Editor window in units of pixels.

Syntax

SpssDataUI.GetHeight()

Related Topics

SetHeight Method (Python)


GetLeft Method (Python)

SpssDataUI class,SpssDataUI class,SpssDataUI class
GetLeft method,GetLeft method,GetLeft method
GetLeft method,GetLeft method,GetLeft method
SpssDataUI class,SpssDataUI class,SpssDataUI class

Returns the horizontal screen position of the associated Data Editor window's upper left corner. The result is in units of pixels.

Syntax

SpssDataUI.GetLeft()

Related Topics

SetLeft Method (Python)


GetShowGridLines Method (Python)

SpssDataUI class,SpssDataUI class,SpssDataUI class
GetShowGridLines method,GetShowGridLines method,GetShowGridLines method
GetShowGridLines method,GetShowGridLines method,GetShowGridLines method
SpssDataUI class,SpssDataUI class,SpssDataUI class

Return the setting for showing grid lines in the associated Data Editor window. The result is Boolean--True if grid lines are visible, False otherwise.

Syntax

SpssDataUI.GetShowGridLines()

Related Topics

SetShowGridLines Method (Python)


GetShowValueLabels Method (Python)

SpssDataUI class,SpssDataUI class,SpssDataUI class
GetShowValueLabels method,GetShowValueLabels method,GetShowValueLabels method
GetShowValueLabels method,GetShowValueLabels method,GetShowValueLabels method
SpssDataUI class,SpssDataUI class,SpssDataUI class

Return the setting for displaying value labels in the associated Data Editor window. The result is Boolean--True if value labels are displayed, False otherwise.

Syntax

SpssDataUI.GetShowValueLabels()

Related Topics

SetShowValueLabels Method (Python)


GetTitleText Method (Python)

SpssDataUI class,SpssDataUI class,SpssDataUI class
GetTitleText method,GetTitleText method,GetTitleText method
GetTitleText method,GetTitleText method,GetTitleText method
SpssDataUI class,SpssDataUI class,SpssDataUI class

Returns the title bar text of the associated Data Editor window.

Syntax

SpssDataUI.GetTitleText()


GetTop Method (Python)

SpssDataUI class,SpssDataUI class,SpssDataUI class
GetTop method,GetTop method,GetTop method
GetTop method,GetTop method,GetTop method
SpssDataUI class,SpssDataUI class,SpssDataUI class

Returns the vertical screen position of the associated Data Editor window's upper left corner. The result is in units of pixels.

Syntax

SpssDataUI.GetTop()

Related Topics

SetTop Method (Python)


GetVisible Method (Python)

SpssDataUI class,SpssDataUI class,SpssDataUI class
GetVisible method,GetVisible method,GetVisible method
GetVisible method,GetVisible method,GetVisible method
SpssDataUI class,SpssDataUI class,SpssDataUI class

Indicates if the associated Data Editor window is visible. The result is Boolean--True if the Data Editor window is visible, False otherwise.

Syntax

SpssDataUI.GetVisible()

Related Topics

SetVisible Method (Python)


GetWidth Method (Python)

SpssDataUI class,SpssDataUI class,SpssDataUI class
GetWidth method,GetWidth method,GetWidth method
GetWidth method,GetWidth method,GetWidth method
SpssDataUI class,SpssDataUI class,SpssDataUI class

Returns the width of the associated Data Editor window in units of pixels.

Syntax

SpssDataUI.GetWidth()

Related Topics

SetWidth Method (Python)


GetWindowState Method (Python)

SpssDataUI class,SpssDataUI class,SpssDataUI class
GetWindowState method,GetWindowState method,GetWindowState method
GetWindowState method,GetWindowState method,GetWindowState method
SpssDataUI class,SpssDataUI class,SpssDataUI class

Returns the state of the associated Data Editor window.

Syntax

SpssDataUI.GetWindowState()

Returns

SpssClient.SpssWindowStates.SpssMinimized | Minimized
SpssClient.SpssWindowStates.SpssMaximized | Maximized
SpssClient.SpssWindowStates.SpssNormal | Normal

Related Topics

SetWindowState Method (Python)


InvokeDialog Method (Python)

SpssDataUI class,SpssDataUI class,SpssDataUI class
InvokeDialog method,InvokeDialog method,InvokeDialog method
InvokeDialog method,InvokeDialog method,InvokeDialog method
SpssDataUI class,SpssDataUI class,SpssDataUI class

Invokes a dialog and returns the syntax generated from that dialog.

Syntax

SpssDataUI.InvokeDialog(menuItemPath,desktopParent,bSync)

Parameters

menuItemPath | Menu or menu item with path of the dialog to invoke. See below for detailed description.
desktopParent | True if the dialog is to be parented off the desktop, False otherwise.
bSync | True if the process is to wait until the dialog has been dismissed, False otherwise.

Specifying The Menu Item Path

The value of the menuItemPath parameter is a string specifying the menu path to the desired dialog--for example "analyze>survival>life tables". The greater-than sign (>) is used to separate a menu, its submenus and the menu item. The menu string must correspond exactly to the text on the menus, submenus, and menu items, and is language specific.

Related Topics

InvokeDialog Method (Python)
InvokeDialog Method (Python)


PrintDataDoc Method (Python)

SpssDataUI class,SpssDataUI class,SpssDataUI class
PrintDataDoc method,PrintDataDoc method,PrintDataDoc method
PrintDataDoc method,PrintDataDoc method,PrintDataDoc method
SpssDataUI class,SpssDataUI class,SpssDataUI class

Prints the document.

Syntax

SpssDataUI.PrintDataDoc()

Related Topics

PrintOutputDoc Method (Python)
PrintSyntaxDoc Method (Python)


SetHeight Method (Python)

SpssDataUI class,SpssDataUI class,SpssDataUI class
SetHeight method,SetHeight method,SetHeight method
SetHeight method,SetHeight method,SetHeight method
SpssDataUI class,SpssDataUI class,SpssDataUI class

Sets the height of the associated Data Editor window.

Syntax

SpssDataUI.SetHeight(height)

Parameters

height An integer representing the height in pixels.

Related Topics

GetHeight Method (Python)


SetLeft Method (Python)

SpssDataUI class,SpssDataUI class,SpssDataUI class
SetLeft method,SetLeft method,SetLeft method
SetLeft method,SetLeft method,SetLeft method
SpssDataUI class,SpssDataUI class,SpssDataUI class

Sets the horizontal screen position of the associated Data Editor window's upper left corner.

Syntax

SpssDataUI.SetLeft(leftPosition)

Parameters

leftPosition An integer representing the position in pixels.

Related Topics

GetLeft Method (Python)


SetShowGridLines Method (Python)

SpssDataUI class,SpssDataUI class,SpssDataUI class
SetShowGridLines method,SetShowGridLines method,SetShowGridLines method
SetShowGridLines method,SetShowGridLines method,SetShowGridLines method
SpssDataUI class,SpssDataUI class,SpssDataUI class

Specify the setting for showing grid lines in the associated Data Editor window.

Syntax

SpssDataUI.SetShowGridLines(isGridLines)

Parameters

isGridLines True if grid lines are to be displayed, False otherwise.

Related Topics

GetShowGridLines Method (Python)


SetShowValueLabels Method (Python)

SpssDataUI class,SpssDataUI class,SpssDataUI class
SetShowValueLabels method,SetShowValueLabels method,SetShowValueLabels method
SetShowValueLabels method,SetShowValueLabels method,SetShowValueLabels method
SpssDataUI class,SpssDataUI class,SpssDataUI class

Specify the setting for displaying value labels in the Data Editor window.

Syntax

SpssDataUI.SetShowValueLabels(isValueLabels)

Parameters

isValueLabels True if value labels are to be displayed, False otherwise.

Related Topics

GetShowValueLabels Method (Python)


SetTop Method (Python)

SpssDataUI class,SpssDataUI class,SpssDataUI class
SetTop method,SetTop method,SetTop method
SetTop method,SetTop method,SetTop method
SpssDataUI class,SpssDataUI class,SpssDataUI class

Sets the vertical screen position of the associated Data Editor window's upper left corner.

Syntax

SpssDataUI.SetTop(topPosition)

Parameters

topPosition An integer representing the position in pixels.

Related Topics

GetTop Method (Python)


SetVisible Method (Python)

SpssDataUI class,SpssDataUI class,SpssDataUI class
SetVisible method,SetVisible method,SetVisible method
SetVisible method,SetVisible method,SetVisible method
SpssDataUI class,SpssDataUI class,SpssDataUI class

Sets the visibility of the associated Data Editor window.

Syntax

SpssDataUI.SetVisible(isVisible)

Parameters

isVisible True to set the Data Editor window as visible, False otherwise.

Related Topics

GetVisible Method (Python)


SetWidth Method (Python)

SpssDataUI class,SpssDataUI class,SpssDataUI class
SetWidth method,SetWidth method,SetWidth method
SetWidth method,SetWidth method,SetWidth method
SpssDataUI class,SpssDataUI class,SpssDataUI class

Sets the width of the associated Data Editor window.

Syntax

SpssDataUI.SetWidth(width)

Parameters

width An integer representing the width in pixels.

Related Topics

GetWidth Method (Python)


SetWindowState Method (Python)

SpssDataUI class,SpssDataUI class,SpssDataUI class
SetWindowState method,SetWindowState method,SetWindowState method
SetWindowState method,SetWindowState method,SetWindowState method
SpssDataUI class,SpssDataUI class,SpssDataUI class

Set the state of the associated Data Editor window.

Syntax

SpssDataUI.SetWindowState(newState)

Parameters

Set the value of newState to one of the following:

SpssClient.SpssWindowStates.SpssMinimized | Minimized
SpssClient.SpssWindowStates.SpssMaximized | Maximized
SpssClient.SpssWindowStates.SpssNormal | Normal

Related Topics

GetWindowState Method (Python)


SpssOutputDoc Class (Python)

SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class

The SpssOutputDoc class represents an open output document.

Example: Obtaining the Designated Output Document

import SpssClient
SpssClient.StartClient()
DesignatedOutputDoc = SpssClient.GetDesignatedOutputDoc()

• The variable DesignatedOutputDoc is an SpssOutputDoc object for the designated output document.

Example: Obtaining the First Opened Output Document

import SpssClient
SpssClient.StartClient()
OutputDocsList = SpssClient.GetOutputDocuments()
FirstOutputDoc = OutputDocsList.GetItemAt(0)

• SpssClient.GetOutputDocuments() returns an OutputDocsList object, which provides access to all open output documents.

• The GetItemAt method from the OutputDocsList class is used to get the output document with index 0 (the first opened output document) from the list of open output documents. The variable FirstOutputDoc is an SpssOutputDoc object for this output document.

Example: Create a New Output Document and Set it as the Designated One

import SpssClient
SpssClient.StartClient()
NewOutputDoc = SpssClient.NewOutputDoc()
NewOutputDoc.SetAsDesignatedOutputDoc()

• The variable NewOutputDoc is an SpssOutputDoc object for the new output document.

Accessing Output Items in an Output Document

You access individual output items, within an output document, from an OutputItemList object. You obtain an OutputItemList object from the GetOutputItems method of the SpssOutputDoc class. See the topic SpssOutputItem Class (Python) for more information.

Related Topics

SpssDataDoc Class (Python)
SpssSyntaxDoc Class (Python)
SpssOutputUI Class (Python)


ClearSelection Method (Python)

SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class
ClearSelection method,ClearSelection method,ClearSelection method
ClearSelection method,ClearSelection method,ClearSelection method
SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class

Deselects all selected output items or pivot table elements.

Syntax

SpssOutputDoc.ClearSelection()


CloseDocument Method (Python)

SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class
CloseDocument method,CloseDocument method,CloseDocument method
CloseDocument method,CloseDocument method,CloseDocument method
SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class

Closes the output document.

Syntax

SpssOutputDoc.CloseDocument()


Copy Method (Python)

SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class
Copy method,Copy method,Copy method
Copy method,Copy method,Copy method
SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class

Copies selected items to the clipboard. Use this method with caution because it overwrites clipboard content.

Syntax

SpssOutputDoc.Copy()

Related Topics

Cut Method (Python)
Delete Method (Python)
Paste Method (Python)
PasteBefore Method (Python)


CreateHeaderItem Method (Python)

SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class
CreateHeaderItem method,CreateHeaderItem method,CreateHeaderItem method
CreateHeaderItem method,CreateHeaderItem method,CreateHeaderItem method
SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class

Returns an SpssOutputItem object for a new header item. To insert the header item into the output document, use the InsertChildItem method in the SpssHeaderItem class.

Syntax

SpssOutputItem=SpssOutputDoc.CreateHeaderItem(label)

Parameters

label A string specifying the label for the header item. The value can be specified as plain text, HTML, or rich text format. For HTML, embed markup in a <html></html> block. For rich text format, specify the string as a raw string to avoid unintentional escape sequences.

Related Topics

CreateImageChartItem Method (Python)
CreateTextItem Method (Python)
CreateTitleItem Method (Python)


CreateImageChartItem Method (Python)

SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class
CreateImageChartItem method,CreateImageChartItem method,CreateImageChartItem method
CreateImageChartItem method,CreateImageChartItem method,CreateImageChartItem method
SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class

Returns an SpssOutputItem object for a new chart item associated with an external image. This allows you to insert an external image of type png, jpg, or gif into an output document. To insert the chart item into the output document, use theInsertChildItem method in the SpssHeaderItem class.

Syntax

SpssOutputItem=SpssOutputDoc.CreateImageChartItem(fileName,label)

Parameters

fileName | Full path and file name for the file containing the exported items.
label | A string specifying the label for the chart item. The value can be specified as plain text, HTML, or rich text format. For HTML, embed markup in a <html></html> block. For rich text format, specify the string as a raw string to avoid unintentional escape sequences.

Related Topics

CreateHeaderItem Method (Python)
CreateTextItem Method (Python)
CreateTitleItem Method (Python)


CreateTextItem Method (Python)

SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class
CreateTextItem method,CreateTextItem method,CreateTextItem method
CreateTextItem method,CreateTextItem method,CreateTextItem method
SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class

Returns an SpssOutputItem object for a new text item. To insert the text item into the output document, use the InsertChildItem method in the SpssHeaderItem class.

Syntax

SpssOutputItem=SpssOutputDoc.CreateTextItem(content)

Parameters

content A string specifying the content of the text item. The value can be specified as plain text, HTML, or rich text format. For HTML, embed markup in a <html></html> block. For rich text format, specify the string as a raw string to avoid unintentional escape sequences.

Related Topics

CreateHeaderItem Method (Python)
CreateImageChartItem Method (Python)
CreateTitleItem Method (Python)


CreateTitleItem Method (Python)

SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class
CreateTitleItem method,CreateTitleItem method,CreateTitleItem method
CreateTitleItem method,CreateTitleItem method,CreateTitleItem method
SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class

Returns an SpssOutputItem object for a new title item. To insert the title item into the output document, use the InsertChildItem method in the SpssHeaderItem class.

Syntax

SpssOutputItem=SpssOutputDoc.CreateTitleItem(title,pageBreak)

Parameters

title | A string specifying the title. The value can be specified as plain text, HTML, or rich text format. For HTML, embed markup in a <html></html> block. For rich text format, specify the string as a raw string to avoid unintentional escape sequences.
pageBreak | True if this title item is to be a page title item, False otherwise.

Related Topics

CreateHeaderItem Method (Python)
CreateImageChartItem Method (Python)
CreateTextItem Method (Python)


Cut Method (Python)

SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class
Cut method,Cut method,Cut method
Cut method,Cut method,Cut method
SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class

Removes the selected data or text and places them on the clipboard. Use this method with caution because it overwrites clipboard content.

Syntax

SpssOutputDoc.Cut()

Related Topics

Copy Method (Python)
Delete Method (Python)
Paste Method (Python)
PasteBefore Method (Python)


Delete Method (Python)

SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class
Delete method,Delete method,Delete method
Delete method,Delete method,Delete method
SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class

Deletes the selected items.

Syntax

SpssOutputDoc.Delete()

Related Topics

Copy Method (Python)
Cut Method (Python)
Paste Method (Python)
PasteBefore Method (Python)


Demote Method (Python)

SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class
Demote method,Demote method,Demote method
Demote method,Demote method,Demote method
SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class

Demotes selected output items down one level within the hierarchy of the output tree.

• You cannot demote an item that is at the deepest level in the output tree and you cannot demote an item if there are unselected items at the same level immediately preceding it in the output tree.

• If the item has children, the children are also demoted.

• You cannot demote the root item.

Syntax

SpssOutputDoc.Demote()

You can promote items up one level with the Promote method.

Related Topics

Promote Method (Python)


ExportCharts Method (Python)

SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class
ExportCharts method,ExportCharts method,ExportCharts method
ExportCharts method,ExportCharts method,ExportCharts method
SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class

Exports charts from this output document.

Syntax

SpssOutputDoc.ExportCharts(subSet,filePrefix,format)

Parameters

subSet | Specifies whether all charts, all visible charts, or all selected charts are exported. See available choices below.
filePrefix | Full path and file name prefix for the files containing the exported charts. Each chart is exported to a separate file.
format | Specifies the export format. See available choices below.

Set the value of subSet to one of the following:

SpssClient.SpssExportSubset.SpssSelected | All selected charts
SpssClient.SpssExportSubset.SpssVisible | All visible charts
SpssClient.SpssExportSubset.SpssAll | All charts

Set the value of format to one of the following:

SpssClient.ChartExportFormat.bmp | Windows bitmap
SpssClient.ChartExportFormat.emf | Enhanced metafile
SpssClient.ChartExportFormat.eps | Enhanced postscript
SpssClient.ChartExportFormat.jpg | JPG file
SpssClient.ChartExportFormat.png | PNG file
SpssClient.ChartExportFormat.tiff | Tagged image file


ExportDocument Method (Python)

SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class
ExportDocument method,ExportDocument method,ExportDocument method
ExportDocument method,ExportDocument method,ExportDocument method
SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class

Exports items from this output document.

• If the items to be exported include charts, then they are exported in the last selected graphics format. The graph export type can be set from the SetExportOption method in the SpssClient class.

• Use the SetOutputOptions method to set export options for export to Word, Excel, or PowerPoint.

Syntax

SpssOutputDoc.ExportDocument(subSet,fileName,format)

Parameters

subSet | Specifies whether all items, all visible items, or all selected items are exported. See available choices below.
fileName | Full path and file name for the file containing the exported items.
format | Specifies the export format. See available choices below.

Set the value of subSet to one of the following:

SpssClient.SpssExportSubset.SpssSelected | All selected items
SpssClient.SpssExportSubset.SpssVisible | All visible items
SpssClient.SpssExportSubset.SpssAll | All items

Set the value of format to one of the following:

SpssClient.DocExportFormat.SpssFormatHtml | Html
SpssClient.DocExportFormat.SpssFormatDoc | Word
SpssClient.DocExportFormat.SpssFormatXls | Excel
SpssClient.DocExportFormat.SpssFormatText | Text
SpssClient.DocExportFormat.SpssFormatPdf | PDF
SpssClient.DocExportFormat.SpssFormatPpt | PowerPoint


GetCurrentItem Method (Python)

SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class
GetCurrentItem method,GetCurrentItem method,GetCurrentItem method
GetCurrentItem method,GetCurrentItem method,GetCurrentItem method
SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class

Returns an SpssOutputItem object for the current output item--as indicated by a red arrow next to the item in the outline pane.

Syntax

SpssOutputItem=SpssOutputDoc.GetCurrentItem()


GetDocumentPath Method (Python)

SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class
GetDocumentPath method,GetDocumentPath method,GetDocumentPath method
GetDocumentPath method,GetDocumentPath method,GetDocumentPath method
SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class

Returns the path and file name of the output file associated with this output document object, or the empty string if the output document is not associated with a file.

Syntax

SpssOutputDoc.GetDocumentPath()


GetFooterText Method (Python)

SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class
GetFooterText method,GetFooterText method,GetFooterText method
GetFooterText method,GetFooterText method,GetFooterText method
SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class

Returns the footer text for printed pages. The value is returned as plain text.

Syntax

SpssOutputDoc.GetFooterText()

Related Topics

SetFooterText Method (Python)


GetHeaderText Method (Python)

SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class
GetHeaderText method,GetHeaderText method,GetHeaderText method
GetHeaderText method,GetHeaderText method,GetHeaderText method
SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class

Returns the header text for printed pages. The value is returned as plain text.

Syntax

SpssOutputDoc.GetHeaderText()

Related Topics

SetHeaderText Method (Python)


GetMenuTable Method (Python)

SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class
GetMenuTable method,GetMenuTable method,GetMenuTable method
GetMenuTable method,GetMenuTable method,GetMenuTable method
SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class

Returns a MenuTableList object containing the list of available menu items for the output document.

Syntax

MenuTableList = SpssOutputDoc.GetMenuTable()


GetOutputItems Method (Python)

SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class
GetOutputItems method,GetOutputItems method,GetOutputItems method
GetOutputItems method,GetOutputItems method,GetOutputItems method
SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class

Returns a list of items in the output document as an OutputItemList object. Each item in the list is an SpssOutputItem object.

Syntax

OutputItemList=SpssOutputDoc.GetOutputItems()


GetOutputOptions Method (Python)

SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class
GetOutputOptions method,GetOutputOptions method,GetOutputOptions method
GetOutputOptions method,GetOutputOptions method,GetOutputOptions method
SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class

Returns the value of the specified export option for this output document, as a string.

Syntax

SpssOutputDoc.GetOutputOptions(option)

Parameters

The available values for the option parameter are (specify the value without quotes):

SpssClient.DocExportOption.ExcelSheetNames. Specifies the name of the sheet to which items will be exported. This option only applies when exporting to Excel.

SpssClient.DocExportOption.ExcelStartingCell. Specifies the starting cell for exporting to Excel. Applies when SpssClient.DocExportOption.ExcelLocationOptions is set to “OverwriteAtCellRef”.

SpssClient.DocExportOption.ExcelOperationOptions. Specifies whether a new workbook is created, a new worksheet is created, or an existing worksheet is modified. This option only applies when exporting to Excel.

• "CreateWorkbook". A new workbook is created. If the specified file exists, it is overwritten.

• "CreateWorksheet". A new worksheet is created within the specified workbook. The name of the sheet is given by the setting of SpssClient.DocExportOption.ExcelSheetNames. If a worksheet with the specified name already exists, that worksheet is overwritten. If the specified file does not exist, a new file is created with a worksheet with the specified name.

• "ModifyWorksheet". Modifies the contents of an existing worksheet. The name of the sheet is given by the setting of SpssClient.DocExportOption.ExcelSheetNames. Export of charts, model views, and tree diagrams is not supported with "ModifyWorksheet".

SpssClient.DocExportOption.ExcelLocationOptions. Specifies how items will be added to a worksheet. This option only applies when exporting to Excel.

• "AddColumns". Specifies that items will be added after the last column, starting in the first row, without modifying any existing contents.

• "AddRows". Specifies that items will be added after the last row, starting in the first column, without modifying any existing contents.

• "OverwriteAtCellRef". Specifies that items will be written to the location specified in SpssClient.DocExportOption.ExcelStartingCell. Any existing content in the area where the exported items are added will be overwritten.

SpssClient.DocExportOption.WideTablesOptions. Specifies the treatment of pivot tables that are too wide for the document width (the specified page width minus the left and right margins). This option only applies when exporting to Word or PowerPoint.

• "WT_Wrap". Specifies that tables are divided into sections that will fit within the defined document width. Row labels are repeated for each section of the table. If the row labels are too wide for the defined document width, the table is exported without wrapping and will appear truncated in the document.

• "WT_Shrink". Specifies that font size and column width are reduced so that tables fit within the document width.

• "WT_Extend". Specifies that tables that are too wide for the document width will appear truncated. All of the table content, however, is retained so expanding the document width will display additional table content.

The following options apply when exporting to Word or PowerPoint.

SpssClient.DocExportOption.ItemsPageHeight. A character representation of a positive number representing the page height, in units specified by SpssClient.DocExportOption.ItemsMeasurementUnits.

SpssClient.DocExportOption.ItemsPageWidth. A character representation of a positive number representing the page width, in units specified by SpssClient.DocExportOption.ItemsMeasurementUnits.

SpssClient.DocExportOption.ItemsTopMargin. A character representation of a positive number representing the top margin, in units specified by SpssClient.DocExportOption.ItemsMeasurementUnits.

SpssClient.DocExportOption.ItemsBottomMargin. A character representation of a positive number representing the bottom margin, in units specified by SpssClient.DocExportOption.ItemsMeasurementUnits.

SpssClient.DocExportOption.ItemsRightMargin. A character representation of a positive number representing the right margin, in units specified by SpssClient.DocExportOption.ItemsMeasurementUnits.

SpssClient.DocExportOption.ItemsLeftMargin. A character representation of a positive number representing the left margin, in units specified by SpssClient.DocExportOption.ItemsMeasurementUnits.

SpssClient.DocExportOption.ItemsMeasurementUnits. The units for specifying page dimensions and margins: "IExportOptions.MeasurementUnits.Inches", "IExportOptions.MeasurementUnits.Millimeters", "IExportOptions.MeasurementUnits.Centimeters", and "IExportOptions.MeasurementUnits.PrintPoints" (1/72 inch).

Related Topics

SetOutputOptions Method (Python)


GetOutputUI Method (Python)

SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class
GetOutputUI method,GetOutputUI method,GetOutputUI method
GetOutputUI method,GetOutputUI method,GetOutputUI method
SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class

Returns an SpssOutputUI object representing the Viewer window associated with the output document, if one exists.

Syntax

SpssOutputUI=SpssOutputDoc.GetOutputUI()


GetPrintOptions Method (Python)

SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class
GetPrintOptions method,GetPrintOptions method,GetPrintOptions method
GetPrintOptions method,GetPrintOptions method,GetPrintOptions method
SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class

Returns the value of the specified print option, as a string.

Syntax

SpssOutputDoc.GetPrintOptions(printOption)

Parameters

The available settings for printOption are:

SpssClient.PrintOptions.LeftMargin | Left margin
SpssClient.PrintOptions.TopMargin | Top margin
SpssClient.PrintOptions.RightMargin | Right margin
SpssClient.PrintOptions.BottomMargin | Bottom margin
SpssClient.PrintOptions.Orientation | Orientation (portrait or landscape)
SpssClient.PrintOptions.StartingPageNumber | Starting page number
SpssClient.PrintOptions.SpaceBetweenItems | Space between items
SpssClient.PrintOptions.PrintedChartSize | Printed chart size (as is, full page, half page, or quarter page)

• All margin settings and Space Between Items are in units of points (1/72 inch).

• For Orientation, 1 corresponds to Portrait and 2 corresponds to Landscape.

• For Printed Chart Size, 0 corresponds to As Is, 1 to Full Page, 2 to Half Page, and 3 to Quarter Page.

Related Topics

SetPrintOptions Method (Python)


IsDesignatedOutputDoc Method (Python)

SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class
IsDesignatedOutputDoc method,IsDesignatedOutputDoc method,IsDesignatedOutputDoc method
IsDesignatedOutputDoc method,IsDesignatedOutputDoc method,IsDesignatedOutputDoc method
SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class

Indicates if this output document is the designated one. The result is Boolean--True if the output document is the designated one, False otherwise.

• If you have more than one open output document, output is routed to the designated one.

Syntax

SpssOutputDoc.IsDesignatedOutputDoc()

Related Topics

SetAsDesignatedOutputDoc Method (Python)


IsEqualTo Method (Python)

SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class
IsEqualTo method,IsEqualTo method,IsEqualTo method
IsEqualTo method,IsEqualTo method,IsEqualTo method
SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class

Indicates if this output document object is the same object as a specified output document object. The result is Boolean--True if the two objects are identical, False otherwise.

Syntax

SpssOutputDoc.IsEqualTo(outputDoc)

Parameters

outputDoc An SpssOutputDoc object


IsModified Method (Python)

SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class
IsModified method,IsModified method,IsModified method
IsModified method,IsModified method,IsModified method
SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class

Indicates whether the output document has been modified. The result is Boolean--True if the output document has been modified, False otherwise.

Syntax

SpssOutputDoc.IsModified()

Related Topics

SetModified Method (Python)


IsPromptToSave Method (Python)

SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class
IsPromptToSave method,IsPromptToSave method,IsPromptToSave method
IsPromptToSave method,IsPromptToSave method,IsPromptToSave method
SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class

Indicates if the 'prompt to save' flag is set for this output document object. The result is Boolean--True if the 'prompt to save' flag has been set, False otherwise.

Syntax

SpssOutputDoc.IsPromptToSave()

Related Topics

SetPromptToSave Method (Python)


Paste Method (Python)

SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class
Paste method,Paste method,Paste method
Paste method,Paste method,Paste method
SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class

Pastes the clipboard content after the current item.

Syntax

SpssOutputDoc.Paste()

Related Topics

Copy Method (Python)
Cut Method (Python)
Delete Method (Python)
PasteBefore Method (Python)


PasteBefore Method (Python)

SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class
PasteBefore method,PasteBefore method,PasteBefore method
PasteBefore method,PasteBefore method,PasteBefore method
SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class

Pastes the clipboard content before the current item.

Syntax

SpssOutputDoc.PasteBefore()

Related Topics

Copy Method (Python)
Cut Method (Python)
Delete Method (Python)
Paste Method (Python)


PrintRange Method (Python)

SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class
PrintRange method,PrintRange method,PrintRange method
PrintRange method,PrintRange method,PrintRange method
SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class

Sets the print range for the output document.

Syntax

SpssOutputDoc.PrintRange(range)

Parameters

range An integer specifying the print range: 0 for all expanded output, 1 for all selected items.

You can specify print options using the SetPrintOptions method. You print an output document using the PrintOutputDoc method from the SpssOutputUI class.


Promote Method (Python)

SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class
Promote method,Promote method,Promote method
Promote method,Promote method,Promote method
SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class

Promotes selected output items up one level within the hierarchy of the output tree.

• You cannot promote an item to the root level and you cannot promote an item if there are unselected items at the same level immediately following it in the output tree.

• If the item has children, the children are also promoted.

Syntax

SpssOutputDoc.Promote()

You can demote items down one level with the Demote method.

Related Topics

Demote Method (Python)


SaveAs Method (Python)

SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class
SaveAs method,SaveAs method,SaveAs method
SaveAs method,SaveAs method,SaveAs method
SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class

Saves the output document to the specified file.

Syntax

SpssOutputDoc.SaveAs(fileName)


SelectAll Method (Python)

SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class
SelectAll method,SelectAll method,SelectAll method
SelectAll method,SelectAll method,SelectAll method
SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class

Selects all items in the output document.

Syntax

SpssOutputDoc.SelectAll()

Related Topics

SelectAllCharts Method (Python)
SelectAllLogs Method (Python)
SelectAllModels Method (Python)
SelectAllNotes Method (Python)
SelectAllOther Method (Python)
SelectAllTables Method (Python)
SelectAllText Method (Python)
SelectAllTitles Method (Python)
SelectAllWarnings Method (Python)
SelectLastOutput Method (Python)


SelectAllCharts Method (Python)

SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class
SelectAllCharts method,SelectAllCharts method,SelectAllCharts method
SelectAllCharts method,SelectAllCharts method,SelectAllCharts method
SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class
graphboard chart,graphboard chart,graphboard chart
R,R,R
graphics,graphics,graphics

Selects all chart items in the output document. This includes standard charts, graphboard charts, and R graphics.

Syntax

SpssOutputDoc.SelectAllCharts()

Related Topics

SelectAll Method (Python)
SelectAllLogs Method (Python)
SelectAllModels Method (Python)
SelectAllNotes Method (Python)
SelectAllOther Method (Python)
SelectAllTables Method (Python)
SelectAllText Method (Python)
SelectAllTitles Method (Python)
SelectAllWarnings Method (Python)
SelectLastOutput Method (Python)


SelectAllLogs Method (Python)

SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class
SelectAllLogs method,SelectAllLogs method,SelectAllLogs method
SelectAllLogs method,SelectAllLogs method,SelectAllLogs method
SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class

Selects all log items in the output document.

Syntax

SpssOutputDoc.SelectAllLogs()

Related Topics

SelectAll Method (Python)
SelectAllCharts Method (Python)
SelectAllModels Method (Python)
SelectAllNotes Method (Python)
SelectAllOther Method (Python)
SelectAllTables Method (Python)
SelectAllText Method (Python)
SelectAllTitles Method (Python)
SelectAllWarnings Method (Python)
SelectLastOutput Method (Python)


SelectAllModels Method (Python)

SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class
SelectAllModels method,SelectAllModels method,SelectAllModels method
SelectAllModels method,SelectAllModels method,SelectAllModels method
SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class
Model Viewer item,Model Viewer item,Model Viewer item

Selects all Model Viewer items in the output document.

Syntax

SpssOutputDoc.SelectAllModels()

Related Topics

SelectAll Method (Python)
SelectAllCharts Method (Python)
SelectAllLogs Method (Python)
SelectAllNotes Method (Python)
SelectAllOther Method (Python)
SelectAllTables Method (Python)
SelectAllText Method (Python)
SelectAllTitles Method (Python)
SelectAllWarnings Method (Python)
SelectLastOutput Method (Python)


SelectAllNotes Method (Python)

SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class
SelectAllNotes method,SelectAllNotes method,SelectAllNotes method
SelectAllNotes method,SelectAllNotes method,SelectAllNotes method
SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class

Selects all note items in the output document.

Syntax

SpssOutputDoc.SelectAllNotes()

Related Topics

SelectAll Method (Python)
SelectAllCharts Method (Python)
SelectAllLogs Method (Python)
SelectAllModels Method (Python)
SelectAllOther Method (Python)
SelectAllTables Method (Python)
SelectAllText Method (Python)
SelectAllTitles Method (Python)
SelectAllWarnings Method (Python)
SelectLastOutput Method (Python)


SelectAllOther Method (Python)

SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class
SelectAllOther method,SelectAllOther method,SelectAllOther method
SelectAllOther method,SelectAllOther method,SelectAllOther method
SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class

Selects all non-PASW Statistics items in the output document.

Syntax

SpssOutputDoc.SelectAllOther()

Related Topics

SelectAll Method (Python)
SelectAllCharts Method (Python)
SelectAllLogs Method (Python)
SelectAllModels Method (Python)
SelectAllNotes Method (Python)
SelectAllTables Method (Python)
SelectAllText Method (Python)
SelectAllTitles Method (Python)
SelectAllWarnings Method (Python)
SelectLastOutput Method (Python)


SelectAllTables Method (Python)

SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class
SelectAllTables method,SelectAllTables method,SelectAllTables method
SelectAllTables method,SelectAllTables method,SelectAllTables method
SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class

Selects all pivot tables in the output document.

Syntax

SpssOutputDoc.SelectAllTables()

Related Topics

SelectAll Method (Python)
SelectAllCharts Method (Python)
SelectAllLogs Method (Python)
SelectAllModels Method (Python)
SelectAllNotes Method (Python)
SelectAllOther Method (Python)
SelectAllText Method (Python)
SelectAllTitles Method (Python)
SelectAllWarnings Method (Python)
SelectLastOutput Method (Python)


SelectAllText Method (Python)

SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class
SelectAllText method,SelectAllText method,SelectAllText method
SelectAllText method,SelectAllText method,SelectAllText method
SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class

Selects all text items in the output document.

Syntax

SpssOutputDoc.SelectAllText()

Related Topics

SelectAll Method (Python)
SelectAllCharts Method (Python)
SelectAllLogs Method (Python)
SelectAllModels Method (Python)
SelectAllNotes Method (Python)
SelectAllOther Method (Python)
SelectAllTables Method (Python)
SelectAllTitles Method (Python)
SelectAllWarnings Method (Python)
SelectLastOutput Method (Python)


SelectAllTitles Method (Python)

SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class
SelectAllTitles method,SelectAllTitles method,SelectAllTitles method
SelectAllTitles method,SelectAllTitles method,SelectAllTitles method
SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class

Selects all title items in the output document.

Syntax

SpssOutputDoc.SelectAllTitles()

Related Topics

SelectAll Method (Python)
SelectAllCharts Method (Python)
SelectAllLogs Method (Python)
SelectAllModels Method (Python)
SelectAllNotes Method (Python)
SelectAllOther Method (Python)
SelectAllTables Method (Python)
SelectAllText Method (Python)
SelectAllWarnings Method (Python)
SelectLastOutput Method (Python)


SelectAllWarnings Method (Python)

SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class
SelectAllWarnings method,SelectAllWarnings method,SelectAllWarnings method
SelectAllWarnings method,SelectAllWarnings method,SelectAllWarnings method
SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class

Selects all warnings in the output document.

Syntax

SpssOutputDoc.SelectAllWarnings()

Related Topics

SelectAll Method (Python)
SelectAllCharts Method (Python)
SelectAllLogs Method (Python)
SelectAllModels Method (Python)
SelectAllNotes Method (Python)
SelectAllOther Method (Python)
SelectAllTables Method (Python)
SelectAllText Method (Python)
SelectAllTitles Method (Python)
SelectLastOutput Method (Python)


SelectLastOutput Method (Python)

SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class
SelectLastOutput method,SelectLastOutput method,SelectLastOutput method
SelectLastOutput method,SelectLastOutput method,SelectLastOutput method
SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class

Selects all items generated by the last executed procedure.

Syntax

SpssOutputDoc.SelectLastOutput()

Related Topics

SelectAll Method (Python)
SelectAllCharts Method (Python)
SelectAllLogs Method (Python)
SelectAllModels Method (Python)
SelectAllNotes Method (Python)
SelectAllOther Method (Python)
SelectAllTables Method (Python)
SelectAllText Method (Python)
SelectAllTitles Method (Python)
SelectAllWarnings Method (Python)


SetAsDesignatedOutputDoc Method (Python)

SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class
SetAsDesignatedOutputDoc method,SetAsDesignatedOutputDoc method,SetAsDesignatedOutputDoc method
SetAsDesignatedOutputDoc method,SetAsDesignatedOutputDoc method,SetAsDesignatedOutputDoc method
SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class

Sets this output document as the designated output document.

• If you have more than one open output document, output is routed to the designated one.

Syntax

SpssOutputDoc.SetAsDesignatedOutputDoc()

Related Topics

IsDesignatedOutputDoc Method (Python)


SetFooterText Method (Python)

SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class
SetFooterText method,SetFooterText method,SetFooterText method
SetFooterText method,SetFooterText method,SetFooterText method
SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class

Sets the footer text for printed pages. The value can be specified as plain text, HTML, or rich text format. For HTML, embed markup in a <html></html> block. For rich text format, specify the string as a raw string to avoid unintentional escape sequences.

Syntax

SpssOutputDoc.SetFooterText(text)

Related Topics

GetFooterText Method (Python)


SetHeaderText Method (Python)

SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class
SetHeaderText method,SetHeaderText method,SetHeaderText method
SetHeaderText method,SetHeaderText method,SetHeaderText method
SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class

Sets the header text for printed pages. The value can be specified as plain text, HTML, or rich text format. For HTML, embed markup in a <html></html> block. For rich text format, specify the string as a raw string to avoid unintentional escape sequences.

Syntax

SpssOutputDoc.SetHeaderText(text)

Related Topics

GetHeaderText Method (Python)


SetModified Method (Python)

SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class
SetModified method,SetModified method,SetModified method
SetModified method,SetModified method,SetModified method
SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class

Sets the modified status of the output document.

Syntax

SpssOutputDoc.SetModified(modified)

Parameters

modified True to set the status to modified, False otherwise.

Related Topics

IsModified Method (Python)


SetOutputOptions Method (Python)

SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class
SetOutputOptions method,SetOutputOptions method,SetOutputOptions method
SetOutputOptions method,SetOutputOptions method,SetOutputOptions method
SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class

Sets export options for this output document. These options apply when exporting with the ExportDocument method from the SpssOutputDoc class as well as the ExportToDocument method from the SpssOutputItem class.

Syntax

SpssOutputDoc.SetOutputOptions(option,setting)

Parameters

The available values for the option parameter as well as the allowed values of the associated setting are (specify the name of the option without quotes):

SpssClient.DocExportOption.ExcelSheetNames. The setting is a string specifying the name of the sheet to which items will be exported. Sheet names cannot exceed 31 characters and cannot contain forward or back slashes, square brackets, question marks, or asterisks. If the specified worksheet doesn't exist in the Excel file, a new worksheet with that name will be created. This option only applies when exporting to Excel. The default worksheet is "Sheet1".

SpssClient.DocExportOption.ExcelStartingCell. The setting is a string specifying the starting cell, as in "B3". Applies when SpssClient.DocExportOption.ExcelLocationOptions is set to "OverwriteAtCellRef". Only applies when exporting to Excel. The default starting cell is A1.

SpssClient.DocExportOption.ExcelOperationOptions. The setting is a string specifying whether a new workbook is created, a new worksheet is created, or an existing worksheet is modified. This option only applies when exporting to Excel.

• "CreateWorkbook". A new workbook is created. This is the default. If the specified file exists, it is overwritten.

• "CreateWorksheet". A new worksheet is created within the specified workbook. The name of the sheet is given by the setting of SpssClient.DocExportOption.ExcelSheetNames. If a worksheet with the specified name already exists, that worksheet is overwritten. If the specified file does not exist, a new file is created with a worksheet with the specified name.

• "ModifyWorksheet". Modifies the contents of an existing worksheet. The name of the sheet is given by the setting of SpssClient.DocExportOption.ExcelSheetNames. Use SpssClient.DocExportOption.ExcelLocationOptions and SpssClient.DocExportOption.ExcelStartingCell to specify location in the sheet. Export of charts, model views, and tree diagrams is not supported with "ModifyWorksheet".

SpssClient.DocExportOption.ExcelLocationOptions. A string specifying how items will be added to a worksheet. This option only applies when exporting to Excel.

• "AddColumns". Specifies that items will be added after the last column, starting in the first row, without modifying any existing contents. This is the default.

• "AddRows". Specifies that items will be added after the last row, starting in the first column, without modifying any existing contents.

• "OverwriteAtCellRef". Specifies that items will be written to the location specified in SpssClient.DocExportOption.ExcelStartingCell. Any existing content in the area where the exported items are added will be overwritten.

SpssClient.DocExportOption.WideTablesOptions. A string specifying the treatment of pivot tables that are too wide for the document width (the specified page width minus the left and right margins). This option only applies when exporting to Word or PowerPoint.

• "WT_Wrap". Specifies that tables are divided into sections that will fit within the defined document width. This is the default. Row labels are repeated for each section of the table. If the row labels are too wide for the defined document width, the table is exported without wrapping and will appear truncated in the document.

• "WT_Shrink". Specifies that font size and column width are reduced so that tables fit within the document width.

• "WT_Extend". Specifies that tables that are too wide for the document width will appear truncated. All of the table content, however, is retained so expanding the document width will display additional table content.

The following options apply when exporting to Word or PowerPoint.

SpssClient.DocExportOption.ItemsPageHeight. A character representation of a positive number representing the page height, in units specified by SpssClient.DocExportOption.ItemsMeasurementUnits.

SpssClient.DocExportOption.ItemsPageWidth. A character representation of a positive number representing the page width, in units specified by SpssClient.DocExportOption.ItemsMeasurementUnits.

SpssClient.DocExportOption.ItemsTopMargin. A character representation of a positive number representing the top margin, in units specified by SpssClient.DocExportOption.ItemsMeasurementUnits.

SpssClient.DocExportOption.ItemsBottomMargin. A character representation of a positive number representing the bottom margin, in units specified by SpssClient.DocExportOption.ItemsMeasurementUnits.

SpssClient.DocExportOption.ItemsRightMargin. A character representation of a positive number representing the right margin, in units specified by SpssClient.DocExportOption.ItemsMeasurementUnits.

SpssClient.DocExportOption.ItemsLeftMargin. A character representation of a positive number representing the left margin, in units specified by SpssClient.DocExportOption.ItemsMeasurementUnits.

SpssClient.DocExportOption.ItemsMeasurementUnits. A string specifying the units for page dimensions and margins: "IExportOptions.MeasurementUnits.Inches", "IExportOptions.MeasurementUnits.Millimeters", "IExportOptions.MeasurementUnits.Centimeters", and "IExportOptions.MeasurementUnits.PrintPoints" (1/72 inch). The default is "IExportOptions.MeasurementUnits.Inches".

Example

This example assumes that OutputDoc is an SpssOutputDoc object and exports all pivot tables to an existing Excel worksheet beginning at a specified location.

OutputDoc = SpssClient.GetDesignatedOutputDoc()
OutputDoc.SetOutputOptions(SpssClient.DocExportOption.ExcelSheetNames,"mysheet")
OutputDoc.SetOutputOptions(SpssClient.DocExportOption.ExcelStartingCell,"B6")
OutputDoc.SetOutputOptions(SpssClient.DocExportOption.ExcelLocationOptions,
                            "OverwriteAtCellRef")
OutputDoc.SetOutputOptions(SpssClient.DocExportOption.ExcelOperationOptions,
                            "ModifyWorksheet")
OutputItems = OutputDoc.GetOutputItems()
for index in range(OutputItems.Size()):
    OutputItem = OutputItems.GetItemAt(index)
    if OutputItem.GetType() == SpssClient.OutputItemType.PIVOT:
        OutputItem.SetSelected(True)
OutputDoc.ExportDocument(SpssClient.SpssExportSubset.SpssSelected,
                         "/output/myexport.xls",
                         SpssClient.DocExportFormat.SpssFormatXls)

Related Topics

GetOutputOptions Method (Python)


SetPrintOptions Method (Python)

SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class
SetPrintOptions method,SetPrintOptions method,SetPrintOptions method
SetPrintOptions method,SetPrintOptions method,SetPrintOptions method
SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class

Sets the value of the specified print option.

Syntax

SpssOutputDoc.SetPrintOptions(printOption,value)

Parameters

The available settings for printOption are:

SpssClient.PrintOptions.LeftMargin | Left margin
SpssClient.PrintOptions.TopMargin | Top margin
SpssClient.PrintOptions.RightMargin | Right margin
SpssClient.PrintOptions.BottomMargin | Bottom margin
SpssClient.PrintOptions.Orientation | Orientation (portrait or landscape)
SpssClient.PrintOptions.StartingPageNumber | Starting page number
SpssClient.PrintOptions.SpaceBetweenItems | Space between items
SpssClient.PrintOptions.PrintedChartSize | Printed chart size (as is, full page, half page, or quarter page)

The parameter value is a string. Following are the available settings:

• All margin settings and Space Between Items are in units of points (1/72 inch).

• For Orientation, 1 corresponds to Portrait and 2 corresponds to Landscape.

• For Printed Chart Size, 0 corresponds to As Is, 1 to Full Page, 2 to Half Page, and 3 to Quarter Page.

You can specify the print range using the PrintRange method. You print an output document using the PrintOutputDoc method from the SpssOutputUI class.

Related Topics

GetPrintOptions Method (Python)


SetPromptToSave Method (Python)

SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class
SetPromptToSave method,SetPromptToSave method,SetPromptToSave method
SetPromptToSave method,SetPromptToSave method,SetPromptToSave method
SpssOutputDoc class,SpssOutputDoc class,SpssOutputDoc class

Sets the 'prompt to save' flag for this output document object.

Syntax

SpssOutputDoc.SetPromptToSave(promptToSave)

Parameters

promptToSave True to set the prompt to save flag, False otherwise.

Related Topics

IsPromptToSave Method (Python)


OutputDocsList Class (Python)

OutputDocsList class,OutputDocsList class,OutputDocsList class

The OutputDocsList class provides access to the list of open output documents. You obtain an OutputDocsList object from the GetOutputDocuments method of the SpssClient class.

An OutputDocsList object is not an iterable Python object. In order to iterate over the items in the list, use a for loop, as in:

for index in range(OutputDocsList.Size()):

For an example that uses the OutputDocsList class, see the examples for the SpssOutputDoc class.


GetItemAt Method (Python)

OutputDocsList class,OutputDocsList class,OutputDocsList class
GetItemAt method,GetItemAt method,GetItemAt method
GetItemAt method,GetItemAt method,GetItemAt method
OutputDocsList class,OutputDocsList class,OutputDocsList class

Returns an SpssOutputDoc object representing the output document with the specified index. The index corresponds to the order in which the output documents were opened, with the first opened document having an index of 0.

Syntax

SpssOutputDoc=OutputDocsList.GetItemAt(index)


Size Method (Python)

OutputDocsList class,OutputDocsList class,OutputDocsList class
Size method,Size method,Size method
Size method,Size method,Size method
OutputDocsList class,OutputDocsList class,OutputDocsList class

Returns the number of open output documents.

Syntax

OutputDocsList.Size()


OutputItemList Class (Python)

OutputItemList class,OutputItemList class,OutputItemList class

The OutputItemList class provides access to the list of items in an open output document. You obtain an OutputItemList object from the GetOutputItems method of an SpssOutputDoc object.

An OutputItemList object is not an iterable Python object. In order to iterate over the items in the list, use a for loop, as in:

for index in range(OutputItemList.Size()):

For an example that uses the OutputItemList class, see the example for the SpssOutputItem class.


GetItemAt Method (Python)

OutputItemList class,OutputItemList class,OutputItemList class
GetItemAt method,GetItemAt method,GetItemAt method
GetItemAt method,GetItemAt method,GetItemAt method
OutputItemList class,OutputItemList class,OutputItemList class

Returns an SpssOutputItem object corresponding to the output item with the specified index. The index corresponds to the order of the items in the output document, starting with 0 for the root item.

Syntax

SpssOutputItem=OutputItemList.GetItemAt(index)


Size Method (Python)

OutputItemList class,OutputItemList class,OutputItemList class
Size method,Size method,Size method
Size method,Size method,Size method
OutputItemList class,OutputItemList class,OutputItemList class

Returns the number of items in the associated output document.

Syntax

OutputItemList.Size()


SpssOutputUI Class (Python)

SpssOutputUI class,SpssOutputUI class,SpssOutputUI class

The SpssOutputUI class represents the Viewer window associated with an open output document. You obtain an SpssOutputUI object from the GetOutputUI method of an SpssOutputDoc object.

Example: Get the SpssOutputUI Object Associated with the Designated Output Document

import SpssClient
SpssClient.StartClient()
DesignatedOutputDoc = SpssClient.GetDesignatedOutputDoc()
OutputUI = DesignatedOutputDoc.GetOutputUI()

• The variable OutputUI is an SpssOutputUI object for the Viewer window associated with the designated output document.

Related Topics

SpssOutputDoc Class (Python)


GetHeight Method (Python)

SpssOutputUI class,SpssOutputUI class,SpssOutputUI class
GetHeight method,GetHeight method,GetHeight method
GetHeight method,GetHeight method,GetHeight method
SpssOutputUI class,SpssOutputUI class,SpssOutputUI class

Returns the height of the associated Viewer window in units of pixels.

Syntax

SpssOutputUI.GetHeight()

Related Topics

SetHeight Method (Python)


GetLeft Method (Python)

SpssOutputUI class,SpssOutputUI class,SpssOutputUI class
GetLeft method,GetLeft method,GetLeft method
GetLeft method,GetLeft method,GetLeft method
SpssOutputUI class,SpssOutputUI class,SpssOutputUI class

Returns the horizontal screen position of the associated Viewer window's upper left corner. The result is in units of pixels.

Syntax

SpssOutputUI.GetLeft()

Related Topics

SetLeft Method (Python)


GetSplitterPosition Method (Python)

SpssOutputUI class,SpssOutputUI class,SpssOutputUI class
GetSplitterPosition method,GetSplitterPosition method,GetSplitterPosition method
GetSplitterPosition method,GetSplitterPosition method,GetSplitterPosition method
SpssOutputUI class,SpssOutputUI class,SpssOutputUI class

Returns the position of the splitter bar in the associated Viewer window. The result is in units of pixels. The splitter bar determines how large the outline area is.

Syntax

SpssOutputUI.GetSplitterPosition()

Related Topics

SetSplitterPosition Method (Python)


GetTitleText Method (Python)

SpssOutputUI class,SpssOutputUI class,SpssOutputUI class
GetTitleText method,GetTitleText method,GetTitleText method
GetTitleText method,GetTitleText method,GetTitleText method
SpssOutputUI class,SpssOutputUI class,SpssOutputUI class

Returns the title bar text of the associated Viewer window.

Syntax

SpssOutputUI.GetTitleText()


GetTop Method (Python)

SpssOutputUI class,SpssOutputUI class,SpssOutputUI class
GetTop method,GetTop method,GetTop method
GetTop method,GetTop method,GetTop method
SpssOutputUI class,SpssOutputUI class,SpssOutputUI class

Returns the vertical screen position of the associated Viewer window's upper left corner. The result is in units of pixels.

Syntax

SpssOutputUI.GetTop()

Related Topics

SetTop Method (Python)


GetVisible Method (Python)

SpssOutputUI class,SpssOutputUI class,SpssOutputUI class
GetVisible method,GetVisible method,GetVisible method
GetVisible method,GetVisible method,GetVisible method
SpssOutputUI class,SpssOutputUI class,SpssOutputUI class

Indicates if the associated Viewer window is visible. The result is Boolean--True if the Viewer window is visible, False otherwise.

Syntax

SpssOutputUI.GetVisible()

Related Topics

SetVisible Method (Python)


GetWidth Method (Python)

SpssOutputUI class,SpssOutputUI class,SpssOutputUI class
GetWidth method,GetWidth method,GetWidth method
GetWidth method,GetWidth method,GetWidth method
SpssOutputUI class,SpssOutputUI class,SpssOutputUI class

Returns the width of the associated Viewer window in units of pixels.

Syntax

SpssOutputUI.GetWidth()

Related Topics

SetWidth Method (Python)


GetWindowState Method (Python)

SpssOutputUI class,SpssOutputUI class,SpssOutputUI class
GetWindowState method,GetWindowState method,GetWindowState method
GetWindowState method,GetWindowState method,GetWindowState method
SpssOutputUI class,SpssOutputUI class,SpssOutputUI class

Returns the state of the associated Viewer window.

Syntax

SpssOutputUI.GetWindowState()

Returns

SpssClient.SpssWindowStates.SpssMinimized | Minimized
SpssClient.SpssWindowStates.SpssMaximized | Maximized
SpssClient.SpssWindowStates.SpssNormal | Normal

Related Topics

SetWindowState Method (Python)


InvokeDialog Method (Python)

SpssOutputUI class,SpssOutputUI class,SpssOutputUI class
InvokeDialog method,InvokeDialog method,InvokeDialog method
InvokeDialog method,InvokeDialog method,InvokeDialog method
SpssOutputUI class,SpssOutputUI class,SpssOutputUI class

Invokes a dialog and returns the syntax generated from that dialog.

Syntax

SpssOutputUI.InvokeDialog(menuItemPath,showOnDesktop,bSync)

Parameters

menuItemPath | Menu or menu item with path of the dialog to invoke. See below for detailed description.
showOnDesktop | True if the dialog is to be shown on the desktop, False otherwise.
bSync | True if the process is to wait until the dialog has been dismissed, False otherwise.

Specifying The Menu Item Path

The value of the menuItemPath parameter is a string specifying the menu path to the desired dialog--for example "analyze>survival>life tables". The greater-than sign (>) is used to separate a menu, its submenus and the menu item. The menu string must correspond exactly to the text on the menus, submenus, and menu items, and is language specific.

Related Topics

InvokeDialog Method (Python)
InvokeDialog Method (Python)


PrintOutputDoc Method (Python)

SpssOutputUI class,SpssOutputUI class,SpssOutputUI class
PrintOutputDoc method,PrintOutputDoc method,PrintOutputDoc method
PrintOutputDoc method,PrintOutputDoc method,PrintOutputDoc method
SpssOutputUI class,SpssOutputUI class,SpssOutputUI class

Prints the document.

Syntax

SpssOutputUI.PrintOutputDoc()

You can specify the print range using the PrintRange method. You can specify print options using the SetPrintOptions method.

Related Topics

PrintDataDoc Method (Python)
PrintSyntaxDoc Method (Python)


SetHeight Method (Python)

SpssOutputUI class,SpssOutputUI class,SpssOutputUI class
SetHeight method,SetHeight method,SetHeight method
SetHeight method,SetHeight method,SetHeight method
SpssOutputUI class,SpssOutputUI class,SpssOutputUI class

Sets the height of the associated Viewer window.

Syntax

SpssOutputUI.SetHeight(height)

Parameters

height An integer representing the height in pixels.

Related Topics

GetHeight Method (Python)


SetLeft Method (Python)

SpssOutputUI class,SpssOutputUI class,SpssOutputUI class
SetLeft method,SetLeft method,SetLeft method
SetLeft method,SetLeft method,SetLeft method
SpssOutputUI class,SpssOutputUI class,SpssOutputUI class

Sets the horizontal screen position of the associated Viewer window's upper left corner.

Syntax

SpssOutputUI.SetLeft(leftPosition)

Parameters

leftPosition An integer representing the position in pixels.

Related Topics

GetLeft Method (Python)


SetSplitterPosition Method (Python)

SpssOutputUI class,SpssOutputUI class,SpssOutputUI class
SetSplitterPosition method,SetSplitterPosition method,SetSplitterPosition method
SetSplitterPosition method,SetSplitterPosition method,SetSplitterPosition method
SpssOutputUI class,SpssOutputUI class,SpssOutputUI class

Sets the position of the splitter bar in the associated Viewer window. The splitter bar determines how large the outline area is.

Syntax

SpssOutputUI.SetSplitterPosition(position)

Parameters

position An integer representing the position in pixels.

Related Topics

GetSplitterPosition Method (Python)


SetTop Method (Python)

SpssOutputUI class,SpssOutputUI class,SpssOutputUI class
SetTop method,SetTop method,SetTop method
SetTop method,SetTop method,SetTop method
SpssOutputUI class,SpssOutputUI class,SpssOutputUI class

Sets the vertical screen position of the associated Viewer window's upper left corner.

Syntax

SpssOutputUI.SetTop(topPosition)

Parameters

topPosition An integer representing the position in pixels.

Related Topics

GetTop Method (Python)


SetVisible Method (Python)

SpssOutputUI class,SpssOutputUI class,SpssOutputUI class
SetVisible method,SetVisible method,SetVisible method
SetVisible method,SetVisible method,SetVisible method
SpssOutputUI class,SpssOutputUI class,SpssOutputUI class

Sets the visibility of the associated Viewer window.

Syntax

SpssOutputUI.SetVisible(isVisible)

Parameters

isVisible True to set the Viewer window as visible, False otherwise.

Related Topics

GetVisible Method (Python)


SetWidth Method (Python)

SpssOutputUI class,SpssOutputUI class,SpssOutputUI class
SetWidth method,SetWidth method,SetWidth method
SetWidth method,SetWidth method,SetWidth method
SpssOutputUI class,SpssOutputUI class,SpssOutputUI class

Sets the width of the associated Viewer window.

Syntax

SpssOutputUI.SetWidth(width)

Parameters

width An integer representing the width in pixels.

Related Topics

GetWidth Method (Python)


SetWindowState Method (Python)

SpssOutputUI class,SpssOutputUI class,SpssOutputUI class
SetWindowState method,SetWindowState method,SetWindowState method
SetWindowState method,SetWindowState method,SetWindowState method
SpssOutputUI class,SpssOutputUI class,SpssOutputUI class

Sets the state of the associated Viewer window.

Syntax

SpssOutputUI.SetWindowState(newState)

Parameters

Set the value of newState to one of the following:

SpssClient.SpssWindowStates.SpssMinimized | Minimized
SpssClient.SpssWindowStates.SpssMaximized | Maximized
SpssClient.SpssWindowStates.SpssNormal | Normal

Related Topics

GetWindowState Method (Python)


SpssSyntaxDoc Class (Python)

SpssSyntaxDoc class,SpssSyntaxDoc class,SpssSyntaxDoc class

The SpssSyntaxDoc class represents an open syntax document.

Example: Obtaining the Designated Syntax Document

import SpssClient
SpssClient.StartClient()
DesignatedSyntaxDoc = SpssClient.GetDesignatedSyntaxDoc()

• The variable DesignatedSyntaxDoc is an SpssSyntaxDoc object for the designated syntax document.

Example: Obtaining the First Opened Syntax Document

import SpssClient
SpssClient.StartClient()
SyntaxDocsList = SpssClient.GetSyntaxDocuments()
FirstSyntaxDoc = SyntaxDocsList.GetItemAt(0)

• SpssClient.GetSyntaxDocuments() returns a SyntaxDocsList object, which provides access to all open syntax documents.

• The GetItemAt method from the SyntaxDocsList class is used to get the syntax document with index 0 (the first opened syntax document) from the list of open syntax documents. The variable FirstSyntaxDoc is an SpssSyntaxDoc object for this syntax document.

Example: Create a New Syntax Document and Set it as the Designated One

import SpssClient
SpssClient.StartClient()
NewSyntaxDoc = SpssClient.NewSyntaxDoc()
NewSyntaxDoc.SetAsDesignatedSyntaxDoc()

• The variable NewSyntaxDoc is an SpssSyntaxDoc object for the new syntax document.

Related Topics

SpssDataDoc Class (Python)
SpssOutputDoc Class (Python)
SpssSyntaxUI Class (Python)


CloseDocument Method (Python)

SpssSyntaxDoc class,SpssSyntaxDoc class,SpssSyntaxDoc class
CloseDocument method,CloseDocument method,CloseDocument method
CloseDocument method,CloseDocument method,CloseDocument method
SpssSyntaxDoc class,SpssSyntaxDoc class,SpssSyntaxDoc class

Closes the syntax document.

Syntax

SpssSyntaxDoc.CloseDocument()


GetDocumentPath Method (Python)

SpssSyntaxDoc class,SpssSyntaxDoc class,SpssSyntaxDoc class
GetDocumentPath method,GetDocumentPath method,GetDocumentPath method
GetDocumentPath method,GetDocumentPath method,GetDocumentPath method
SpssSyntaxDoc class,SpssSyntaxDoc class,SpssSyntaxDoc class

Returns the path and file name of the syntax file associated with this syntax document object, or the empty string if the syntax document is not associated with a file.

Syntax

SpssSyntaxDoc.GetDocumentPath()


GetMenuTable Method (Python)

SpssSyntaxDoc class,SpssSyntaxDoc class,SpssSyntaxDoc class
GetMenuTable method,GetMenuTable method,GetMenuTable method
GetMenuTable method,GetMenuTable method,GetMenuTable method
SpssSyntaxDoc class,SpssSyntaxDoc class,SpssSyntaxDoc class

Returns a MenuTableList object containing the list of available menu items for the syntax document.

Syntax

MenuTableList = SpssSyntaxDoc.GetMenuTable()


GetSyntax Method (Python)

SpssSyntaxDoc class,SpssSyntaxDoc class,SpssSyntaxDoc class
GetSyntax method,GetSyntax method,GetSyntax method
GetSyntax method,GetSyntax method,GetSyntax method
SpssSyntaxDoc class,SpssSyntaxDoc class,SpssSyntaxDoc class

Returns the syntax contained in the associated syntax document, as a unicode string.

Syntax

SpssSyntaxDoc.GetSyntax()


GetSyntaxUI Method (Python)

SpssSyntaxDoc class,SpssSyntaxDoc class,SpssSyntaxDoc class
GetSyntaxUI method,GetSyntaxUI method,GetSyntaxUI method
GetSyntaxUI method,GetSyntaxUI method,GetSyntaxUI method
SpssSyntaxDoc class,SpssSyntaxDoc class,SpssSyntaxDoc class

Returns an SpssSyntaxUI object representing the syntax window associated with the syntax document.

Syntax

SpssSyntaxUI=SpssSyntaxDoc.GetSyntaxUI()


IsDesignatedSyntaxDoc Method (Python)

SpssSyntaxDoc class,SpssSyntaxDoc class,SpssSyntaxDoc class
IsDesignatedSyntaxDoc method,IsDesignatedSyntaxDoc method,IsDesignatedSyntaxDoc method
IsDesignatedSyntaxDoc method,IsDesignatedSyntaxDoc method,IsDesignatedSyntaxDoc method
SpssSyntaxDoc class,SpssSyntaxDoc class,SpssSyntaxDoc class

Indicates if this syntax document is the designated one. The result is Boolean--True if the syntax document is the designated one, False otherwise.

• If you have more than one open syntax document, command syntax is pasted into the designated one.

Syntax

SpssSyntaxDoc.IsDesignatedSyntaxDoc()

Related Topics

SetAsDesignatedSyntaxDoc Method (Python)


IsEqualTo Method (Python)

SpssSyntaxDoc class,SpssSyntaxDoc class,SpssSyntaxDoc class
IsEqualTo method,IsEqualTo method,IsEqualTo method
IsEqualTo method,IsEqualTo method,IsEqualTo method
SpssSyntaxDoc class,SpssSyntaxDoc class,SpssSyntaxDoc class

Indicates if this syntax document object is the same object as a specified syntax document object. The result is Boolean--True if the two objects are identical, False otherwise.

Syntax

SpssSyntaxDoc.IsEqualTo(syntaxDoc)

Parameters

syntaxDoc An SpssSyntaxDoc object


IsModified Method (Python)

SpssSyntaxDoc class,SpssSyntaxDoc class,SpssSyntaxDoc class
IsModified method,IsModified method,IsModified method
IsModified method,IsModified method,IsModified method
SpssSyntaxDoc class,SpssSyntaxDoc class,SpssSyntaxDoc class

Indicates whether the syntax document has been modified. The result is Boolean--True if the syntax document has been modified, False otherwise.

Syntax

SpssSyntaxDoc.IsModified()

Related Topics

SetModified Method (Python)


IsPromptToSave Method (Python)

SpssSyntaxDoc class,SpssSyntaxDoc class,SpssSyntaxDoc class
IsPromptToSave method,IsPromptToSave method,IsPromptToSave method
IsPromptToSave method,IsPromptToSave method,IsPromptToSave method
SpssSyntaxDoc class,SpssSyntaxDoc class,SpssSyntaxDoc class

Indicates if the 'prompt to save' flag is set for this syntax document object. The result is Boolean--True if the 'prompt to save' flag has been set, False otherwise.

Syntax

SpssSyntaxDoc.IsPromptToSave()

Related Topics

SetPromptToSave Method (Python)


RunSyntax Method (Python)

SpssSyntaxDoc class,SpssSyntaxDoc class,SpssSyntaxDoc class
RunSyntax method,RunSyntax method,RunSyntax method
RunSyntax method,RunSyntax method,RunSyntax method
SpssSyntaxDoc class,SpssSyntaxDoc class,SpssSyntaxDoc class

Runs all of the syntax in the associated syntax document.

Syntax

SpssSyntaxDoc.RunSyntax()

Related Topics

RunSyntax Method (Python)


SaveAs Method (Python)

SpssSyntaxDoc class,SpssSyntaxDoc class,SpssSyntaxDoc class
SaveAs method,SaveAs method,SaveAs method
SaveAs method,SaveAs method,SaveAs method
SpssSyntaxDoc class,SpssSyntaxDoc class,SpssSyntaxDoc class

Saves the syntax document to the specified file.

Syntax

SpssSyntaxDoc.SaveAs(fileName)


SetAsDesignatedSyntaxDoc Method (Python)

SpssSyntaxDoc class,SpssSyntaxDoc class,SpssSyntaxDoc class
SetAsDesignatedSyntaxDoc method,SetAsDesignatedSyntaxDoc method,SetAsDesignatedSyntaxDoc method
SetAsDesignatedSyntaxDoc method,SetAsDesignatedSyntaxDoc method,SetAsDesignatedSyntaxDoc method
SpssSyntaxDoc class,SpssSyntaxDoc class,SpssSyntaxDoc class

Sets this syntax document as the designated syntax document.

• If you have more than one open syntax document, command syntax is pasted into the designated one.

Syntax

SpssSyntaxDoc.SetAsDesignatedSyntaxDoc()

Related Topics

IsDesignatedSyntaxDoc Method (Python)


SetModified Method (Python)

SpssSyntaxDoc class,SpssSyntaxDoc class,SpssSyntaxDoc class
SetModified method,SetModified method,SetModified method
SetModified method,SetModified method,SetModified method
SpssSyntaxDoc class,SpssSyntaxDoc class,SpssSyntaxDoc class

Sets the modified status of the syntax document.

Syntax

SpssSyntaxDoc.SetModified(modified)

Parameters

modified True to set the status to modified, False otherwise.

Related Topics

IsModified Method (Python)


SetPromptToSave Method (Python)

SpssSyntaxDoc class,SpssSyntaxDoc class,SpssSyntaxDoc class
SetPromptToSave method,SetPromptToSave method,SetPromptToSave method
SetPromptToSave method,SetPromptToSave method,SetPromptToSave method
SpssSyntaxDoc class,SpssSyntaxDoc class,SpssSyntaxDoc class

Sets the 'prompt to save' flag for this syntax document object.

Syntax

SpssSyntaxDoc.SetPromptToSave(promptToSave)

Parameters

promptToSave True to set the prompt to save flag, False otherwise.

Related Topics

IsPromptToSave Method (Python)


SetSyntax Method (Python)

SpssSyntaxDoc class,SpssSyntaxDoc class,SpssSyntaxDoc class
SetSyntax method,SetSyntax method,SetSyntax method
SetSyntax method,SetSyntax method,SetSyntax method
SpssSyntaxDoc class,SpssSyntaxDoc class,SpssSyntaxDoc class

Specifies the content of the associated syntax document and replaces any existing content.

Syntax

SpssSyntaxDoc.SetSyntax(syntax)

Parameters

syntax A string specifying the syntax. You can include line breaks using the escape sequence "\n", and you can use a triple-quoted string as shown in the example.

Example

SpssSyntaxDoc.SetSyntax(r"""DESCRIPTIVES
  VARIABLES=salary salbegin jobtime prevexp
  /STATISTICS=MEAN STDDEV MIN MAX.""")

• Using a triple-quoted string--as in this example--allows you to specify a block of syntax commands on multiple lines. You can use either triple single quotes or triple double quotes, but you must use the same type (single or double) on both sides of the specified string.

• Notice that the triple-quoted expression is prefixed with the letter r. The r prefix to a string specifies Python's raw mode. In raw mode, Python treats all backslashes in the string as the backslash character and not as the start of an escape sequence.


SyntaxDocsList Class (Python)

SyntaxDocsList class,SyntaxDocsList class,SyntaxDocsList class

The SyntaxDocsList class provides access to the list of open syntax documents. You obtain a SyntaxDocsList object from the GetSyntaxDocuments method of the SpssClient class.

A SyntaxDocsList object is not an iterable Python object. In order to iterate over the items in the list, use a for loop, as in:

for index in range(SyntaxDocsList.Size()):

For an example that uses the SyntaxDocsList class, see the examples for the SpssSyntaxDoc class.


GetItemAt Method (Python)

SyntaxDocsList class,SyntaxDocsList class,SyntaxDocsList class
GetItemAt method,GetItemAt method,GetItemAt method
GetItemAt method,GetItemAt method,GetItemAt method
SyntaxDocsList class,SyntaxDocsList class,SyntaxDocsList class

Returns an SpssSyntaxDoc object representing the syntax document with the specified index. The index corresponds to the order in which the syntax documents were opened, with the first opened document having an index of 0.

Syntax

SpssSyntaxDoc=SyntaxDocsList.GetItemAt(index)


Size Method (Python)

SyntaxDocsList class,SyntaxDocsList class,SyntaxDocsList class
Size method,Size method,Size method
Size method,Size method,Size method
SyntaxDocsList class,SyntaxDocsList class,SyntaxDocsList class

Returns the number of open syntax documents.

Syntax

SyntaxDocsList.Size()


SpssSyntaxUI Class (Python)

SpssSyntaxUI class,SpssSyntaxUI class,SpssSyntaxUI class

The SpssSyntaxUI class represents the Syntax Editor window associated with an open syntax document. You obtain an SpssSyntaxUI object from the GetSyntaxUI method of an SpssSyntaxDoc object.

Example: Get the SpssSyntaxUI Object Associated with the Designated Syntax Document

import SpssClient
SpssClient.StartClient()
DesignatedSyntaxDoc = SpssClient.GetDesignatedSyntaxDoc()
SyntaxUI = DesignatedSyntaxDoc.GetSyntaxUI()

• The variable SyntaxUI is an SpssSyntaxUI object for the Syntax Editor window associated with the designated syntax document.

Related Topics

SpssSyntaxDoc Class (Python)


GetHeight Method (Python)

SpssSyntaxUI class,SpssSyntaxUI class,SpssSyntaxUI class
GetHeight method,GetHeight method,GetHeight method
GetHeight method,GetHeight method,GetHeight method
SpssSyntaxUI class,SpssSyntaxUI class,SpssSyntaxUI class

Returns the height of the associated Syntax Editor window in units of pixels.

Syntax

SpssSyntaxUI.GetHeight()

Related Topics

SetHeight Method (Python)


GetLeft Method (Python)

SpssSyntaxUI class,SpssSyntaxUI class,SpssSyntaxUI class
GetLeft method,GetLeft method,GetLeft method
GetLeft method,GetLeft method,GetLeft method
SpssSyntaxUI class,SpssSyntaxUI class,SpssSyntaxUI class

Returns the horizontal screen position of the associated Syntax Editor window's upper left corner. The result is in units of pixels.

Syntax

SpssSyntaxUI.GetLeft()

Related Topics

SetLeft Method (Python)


GetTitleText Method (Python)

SpssSyntaxUI class,SpssSyntaxUI class,SpssSyntaxUI class
GetTitleText method,GetTitleText method,GetTitleText method
GetTitleText method,GetTitleText method,GetTitleText method
SpssSyntaxUI class,SpssSyntaxUI class,SpssSyntaxUI class

Returns the title bar text of the associated Syntax Editor window.

Syntax

SpssSyntaxUI.GetTitleText()


GetTop Method (Python)

SpssSyntaxUI class,SpssSyntaxUI class,SpssSyntaxUI class
GetTop method,GetTop method,GetTop method
GetTop method,GetTop method,GetTop method
SpssSyntaxUI class,SpssSyntaxUI class,SpssSyntaxUI class

Returns the vertical screen position of the associated Syntax Editor window's upper left corner. The result is in units of pixels.

Syntax

SpssSyntaxUI.GetTop()

Related Topics

SetTop Method (Python)


GetVisible Method (Python)

SpssSyntaxUI class,SpssSyntaxUI class,SpssSyntaxUI class
GetVisible method,GetVisible method,GetVisible method
GetVisible method,GetVisible method,GetVisible method
SpssSyntaxUI class,SpssSyntaxUI class,SpssSyntaxUI class

Indicates if the associated Syntax Editor window is visible. The result is Boolean--True if the Syntax Editor window is visible, False otherwise.

Syntax

SpssSyntaxUI.GetVisible()

Related Topics

SetVisible Method (Python)


GetWidth Method (Python)

SpssSyntaxUI class,SpssSyntaxUI class,SpssSyntaxUI class
GetWidth method,GetWidth method,GetWidth method
GetWidth method,GetWidth method,GetWidth method
SpssSyntaxUI class,SpssSyntaxUI class,SpssSyntaxUI class

Returns the width of the associated Syntax Editor window in units of pixels.

Syntax

SpssSyntaxUI.GetWidth()

Related Topics

SetWidth Method (Python)


GetWindowState Method (Python)

SpssSyntaxUI class,SpssSyntaxUI class,SpssSyntaxUI class
GetWindowState method,GetWindowState method,GetWindowState method
GetWindowState method,GetWindowState method,GetWindowState method
SpssSyntaxUI class,SpssSyntaxUI class,SpssSyntaxUI class

Returns the state of the associated Syntax Editor window.

Syntax

SpssSyntaxUI.GetWindowState()

Returns

SpssClient.SpssWindowStates.SpssMinimized | Minimized
SpssClient.SpssWindowStates.SpssMaximized | Maximized
SpssClient.SpssWindowStates.SpssNormal | Normal

Related Topics

SetWindowState Method (Python)


InvokeDialog Method (Python)

SpssSyntaxUI class,SpssSyntaxUI class,SpssSyntaxUI class
InvokeDialog method,InvokeDialog method,InvokeDialog method
InvokeDialog method,InvokeDialog method,InvokeDialog method
SpssSyntaxUI class,SpssSyntaxUI class,SpssSyntaxUI class

Invokes a dialog and returns the syntax generated from that dialog.

Syntax

SpssSyntaxUI.InvokeDialog(menuItemPath,desktopParent,bSync)

Parameters

menuItemPath | Menu or menu item with path of the dialog to invoke. See below for detailed description.
desktopParent | True if the dialog is to be parented off the desktop, False otherwise.
bSync | True if the process is to wait until the dialog has been dismissed, False otherwise.

Specifying The Menu Item Path

The value of the menuItemPath parameter is a string specifying the menu path to the desired dialog--for example "analyze>survival>life tables". The greater-than sign (>) is used to separate a menu, its submenus and the menu item. The menu string must correspond exactly to the text on the menus, submenus, and menu items, and is language specific.

Related Topics

InvokeDialog Method (Python)
InvokeDialog Method (Python)


PrintSyntaxDoc Method (Python)

SpssSyntaxUI class,SpssSyntaxUI class,SpssSyntaxUI class
PrintSyntaxDoc method,PrintSyntaxDoc method,PrintSyntaxDoc method
PrintSyntaxDoc method,PrintSyntaxDoc method,PrintSyntaxDoc method
SpssSyntaxUI class,SpssSyntaxUI class,SpssSyntaxUI class

Prints the document.

Syntax

SpssSyntaxUI.PrintSyntaxDoc()

Related Topics

PrintDataDoc Method (Python)
PrintOutputDoc Method (Python)


SetHeight Method (Python)

SpssSyntaxUI class,SpssSyntaxUI class,SpssSyntaxUI class
SetHeight method,SetHeight method,SetHeight method
SetHeight method,SetHeight method,SetHeight method
SpssSyntaxUI class,SpssSyntaxUI class,SpssSyntaxUI class

Sets the height of the associated Syntax Editor window.

Syntax

SpssSyntaxUI.SetHeight(height)

Parameters

height An integer representing the height in pixels.

Related Topics

GetHeight Method (Python)


SetLeft Method (Python)

SpssSyntaxUI class,SpssSyntaxUI class,SpssSyntaxUI class
SetLeft method,SetLeft method,SetLeft method
SetLeft method,SetLeft method,SetLeft method
SpssSyntaxUI class,SpssSyntaxUI class,SpssSyntaxUI class

Sets the horizontal screen position of the associated Syntax Editor window's upper left corner.

Syntax

SpssSyntaxUI.SetLeft(leftPosition)

Parameters

leftPosition An integer representing the position in pixels.

Related Topics

GetLeft Method (Python)


SetTop Method (Python)

SpssSyntaxUI class,SpssSyntaxUI class,SpssSyntaxUI class
SetTop method,SetTop method,SetTop method
SetTop method,SetTop method,SetTop method
SpssSyntaxUI class,SpssSyntaxUI class,SpssSyntaxUI class

Sets the vertical screen position of the associated Syntax Editor window's upper left corner.

Syntax

SpssSyntaxUI.SetTop(topPosition)

Parameters

topPosition An integer representing the position in pixels.

Related Topics

GetTop Method (Python)


SetVisible Method (Python)

SpssSyntaxUI class,SpssSyntaxUI class,SpssSyntaxUI class
SetVisible method,SetVisible method,SetVisible method
SetVisible method,SetVisible method,SetVisible method
SpssSyntaxUI class,SpssSyntaxUI class,SpssSyntaxUI class

Sets the visibility of the associated Syntax Editor window.

Syntax

SpssSyntaxUI.SetVisible(isVisible)

Parameters

isVisible True to set the Syntax Editor window as visible, False otherwise.

Related Topics

GetVisible Method (Python)


SetWidth Method (Python)

SpssSyntaxUI class,SpssSyntaxUI class,SpssSyntaxUI class
SetWidth method,SetWidth method,SetWidth method
SetWidth method,SetWidth method,SetWidth method
SpssSyntaxUI class,SpssSyntaxUI class,SpssSyntaxUI class

Sets the width of the associated Syntax Editor window.

Syntax

SpssSyntaxUI.SetWidth(width)

Parameters

width An integer representing the width in pixels.

Related Topics

GetWidth Method (Python)


SetWindowState Method (Python)

SpssSyntaxUI class,SpssSyntaxUI class,SpssSyntaxUI class
SetWindowState method,SetWindowState method,SetWindowState method
SetWindowState method,SetWindowState method,SetWindowState method
SpssSyntaxUI class,SpssSyntaxUI class,SpssSyntaxUI class

Set the state of the associated Syntax Editor window.

Syntax

SpssSyntaxUI.SetWindowState(newState)

Parameters

Set the value of newState to one of the following:

SpssClient.SpssWindowStates.SpssMinimized | Minimized
SpssClient.SpssWindowStates.SpssMaximized | Maximized
SpssClient.SpssWindowStates.SpssNormal | Normal

Related Topics

GetWindowState Method (Python)


SpssOutputItem Class (Python)

SpssOutputItem class,SpssOutputItem class,SpssOutputItem class

The SpssOutputItem class represents any item in an output document. You get an SpssOutputItem object from an OutputItemList object.

Example: Exporting the First Pivot Table to HTML

import SpssClient
SpssClient.StartClient()

OutputDoc = SpssClient.GetDesignatedOutputDoc()
OutputItemList = OutputDoc.GetOutputItems()

for index in range(OutputItemList.Size()):
   OutputItem = OutputItemList.GetItemAt(index)
   if OutputItem.GetType() == SpssClient.OutputItemType.PIVOT:
        OutputItem.ExportToDocument("/myfiles/mypivot",
                      SpssClient.DocExportFormat.SpssFormatHtml)
        break
SpssClient.StopClient()

• SpssClient.GetDesignatedOutputDoc() gets an SpssOutputDoc object for the designated output document. In this example, the variable OutputDoc is an SpssOutputDoc object.

• The GetOutputItems method of an SpssOutputDoc object returns an OutputItemList object. In this example, the variable OutputItemList is an OutputItemList object.

• The for loop iterates through all of the objects in the OutputItemList object--one object for each item in the output document. On each iteration of the loop, the variable OutputItem is an SpssOutputItem object.

• The GetType method from the SpssOutputItem class returns the type of the output item. Pivot tables have an output item type of SpssClient.OutputItemType.PIVOT.

• You export the pivot table using the ExportToDocument method from the SpssOutputItem class.

• The break statement terminates the loop if a pivot table is found.


ExportToDocument Method (Python)

SpssOutputItem class,SpssOutputItem class,SpssOutputItem class
ExportToDocument method,ExportToDocument method,ExportToDocument method
ExportToDocument method,ExportToDocument method,ExportToDocument method
SpssOutputItem class,SpssOutputItem class,SpssOutputItem class

Exports this output item in the specified document format.

• This method cannot be used for exporting chart items. To export a chart item, use the ExportToImage method.

• See SetOutputOptions for options available when exporting to Word, Excel, or PowerPoint.

Syntax

SpssOutputItem.ExportToDocument(fileName,format)

Parameters

Set the value of format to one of the following:

SpssClient.DocExportFormat.SpssFormatHtml | Html
SpssClient.DocExportFormat.SpssFormatDoc | Word
SpssClient.DocExportFormat.SpssFormatXls | Excel
SpssClient.DocExportFormat.SpssFormatText | Text
SpssClient.DocExportFormat.SpssFormatPdf | PDF
SpssClient.DocExportFormat.SpssFormatPpt | PowerPoint


ExportToImage Method (Python)

SpssOutputItem class,SpssOutputItem class,SpssOutputItem class
ExportToImage method,ExportToImage method,ExportToImage method
ExportToImage method,ExportToImage method,ExportToImage method
SpssOutputItem class,SpssOutputItem class,SpssOutputItem class

Exports this output item in the specified image format.

• This method can only be used for exporting charts, trees, and Model Viewer items. To export other item types, use the ExportToDocument method.

• When used for a Model Viewer item, the method exports the view displayed in the Viewer. You can export all views using the ExportAllViews Method (Python).

Syntax

SpssOutputItem.ExportToImage(fileName,format)

Parameters

Set the value of format to one of the following:

SpssClient.ChartExportFormat.bmp | Windows bitmap
SpssClient.ChartExportFormat.emf | Enhanced metafile
SpssClient.ChartExportFormat.eps | Enhanced postscript
SpssClient.ChartExportFormat.jpg | JPG file
SpssClient.ChartExportFormat.png | PNG file
SpssClient.ChartExportFormat.tiff | Tagged image file


GetAlignment Method (Python)

SpssOutputItem class,SpssOutputItem class,SpssOutputItem class
GetAlignment method,GetAlignment method,GetAlignment method
GetAlignment method,GetAlignment method,GetAlignment method
SpssOutputItem class,SpssOutputItem class,SpssOutputItem class

Returns the alignment for this output item.

Syntax

SpssOutputItem.GetAlignment()

Returns

SpssClient.OutputItemAlignment.Left | Left
SpssClient.OutputItemAlignment.Center | Center
SpssClient.OutputItemAlignment.Right | Right

When testing for a particular alignment type with the return value from GetAlignment, you can also use the following integer type codes: 0 (Left), 1 (Center), 2 (Right). For example:

if SpssOutputItem.GetAlignment() == 0:

Related Topics

SetAlignment Method (Python)


GetDescription Method (Python)

SpssOutputItem class,SpssOutputItem class,SpssOutputItem class
GetDescription method,GetDescription method,GetDescription method
GetDescription method,GetDescription method,GetDescription method
SpssOutputItem class,SpssOutputItem class,SpssOutputItem class

Returns the name of this output item as it appears in the outline pane of the Viewer.

Syntax

SpssOutputItem.GetDescription()

Related Topics

SetDescription Method (Python)


GetHeight Method (Python)

SpssOutputItem class,SpssOutputItem class,SpssOutputItem class
GetHeight method,GetHeight method,GetHeight method
GetHeight method,GetHeight method,GetHeight method
SpssOutputItem class,SpssOutputItem class,SpssOutputItem class

Returns the height of this output item in units of points (1/72 inch).

• This method is not available for header items or root items.

Syntax

SpssOutputItem.GetHeight()

Related Topics

SetHeight Method (Python)


GetPageBreak Method (Python)

SpssOutputItem class,SpssOutputItem class,SpssOutputItem class
GetPageBreak method,GetPageBreak method,GetPageBreak method
GetPageBreak method,GetPageBreak method,GetPageBreak method
SpssOutputItem class,SpssOutputItem class,SpssOutputItem class

Indicates whether a page break is set before this item. The result is Boolean--True if the page break is set, False otherwise.

Syntax

SpssOutputItem.GetPageBreak()

Related Topics

SetPageBreak Method (Python)


GetParentItem Method (Python)

SpssOutputItem class,SpssOutputItem class,SpssOutputItem class
GetParentItem method,GetParentItem method,GetParentItem method
GetParentItem method,GetParentItem method,GetParentItem method
SpssOutputItem class,SpssOutputItem class,SpssOutputItem class

Returns an SpssOutputItem object representing the parent item of this output item.

Syntax

SpssOutputItem.GetParentItem()


GetProcedureName Method (Python)

SpssOutputItem class,SpssOutputItem class,SpssOutputItem class
GetProcedureName method,GetProcedureName method,GetProcedureName method
GetProcedureName method,GetProcedureName method,GetProcedureName method
SpssOutputItem class,SpssOutputItem class,SpssOutputItem class

Returns the name of the PASW Statistics procedure that generated this output item. The value is the OMS command identifier associated with the procedure.

Syntax

SpssOutputItem.GetProcedureName()


GetSpecificType Method (Python)

SpssOutputItem class,SpssOutputItem class,SpssOutputItem class
GetSpecificType method,GetSpecificType method,GetSpecificType method
GetSpecificType method,GetSpecificType method,GetSpecificType method
SpssOutputItem class,SpssOutputItem class,SpssOutputItem class

Returns an object of a specific output type, such as a pivot table or header item. You will need to call this method before using methods specific to that type of output item. For example, before you can use the methods available for a pivot table, you must call GetSpecificType on the associated SpssOutputItem object. The set of output types is listed in the description of the GetType method.

Syntax

object=SpssOutputItem.GetSpecificType()

For an example of using the GetSpecificType method, see SpssPivotTable Class (Python).


GetSubType Method (Python)

SpssOutputItem class,SpssOutputItem class,SpssOutputItem class
GetSubType method,GetSubType method,GetSubType method
GetSubType method,GetSubType method,GetSubType method
SpssOutputItem class,SpssOutputItem class,SpssOutputItem class

Returns the OMS (Output Management System) sub type identifier, if any, of this output item.

Syntax

SpssOutputItem.GetSubType()

Related Topics

SetSubType Method (Python)


GetTreeLevel Method (Python)

SpssOutputItem class,SpssOutputItem class,SpssOutputItem class
GetTreeLevel method,GetTreeLevel method,GetTreeLevel method
GetTreeLevel method,GetTreeLevel method,GetTreeLevel method
SpssOutputItem class,SpssOutputItem class,SpssOutputItem class

Returns the level of this item within the hierarchy of the output tree. For instance, the root item is at level 0, and header items beneath the root are at level 1.

Syntax

SpssOutputItem.GetTreeLevel()

Related Topics

SetTreeLevel Method (Python)


GetType Method (Python)

SpssOutputItem class,SpssOutputItem class,SpssOutputItem class
GetType method,GetType method,GetType method
GetType method,GetType method,GetType method
SpssOutputItem class,SpssOutputItem class,SpssOutputItem class
Model Viewer item,Model Viewer item,Model Viewer item
graphboard chart,graphboard chart,graphboard chart
R,R,R
graphics,graphics,graphics

Returns the type associated with this output item.

Syntax

SpssOutputItem.GetType()

Returns

Type | Type Code
SpssClient.OutputItemType.UNKNOWN | 0
SpssClient.OutputItemType.CHART | 1
SpssClient.OutputItemType.HEAD | 2
SpssClient.OutputItemType.LOG | 3
SpssClient.OutputItemType.NOTE | 4
SpssClient.OutputItemType.PIVOT | 5
SpssClient.OutputItemType.ROOT | 6
SpssClient.OutputItemType.TEXT | 7
SpssClient.OutputItemType.WARNING | 8
SpssClient.OutputItemType.TITLE | 9
SpssClient.OutputItemType.PAGETITLE | 11
SpssClient.OutputItemType.TREEMODEL | 13
SpssClient.OutputItemType.GENERIC | 14
SpssClient.OutputItemType.MODEL | 15

When testing for a particular output type with the return value from GetType, you can use the integer type code or the textual specification of the type. For an example of using the GetType method, see SpssPivotTable Class (Python).

Notes

• Standard charts, graphboard charts, and R graphics all have the type SpssClient.OutputItemType.CHART. To distinguish between these chart types, use the SPSSSubtype method on the associated SpssChartItem object.

• Objects of type SpssClient.OutputItemType.ROOT (the root object in an output document) or SpssClient.OutputItemType.HEAD are SpssHeaderItem objects.

• Objects of type SpssClient.OutputItemType.TREEMODEL are SpssChartItem objects.


GetTypeString Method (Python)

SpssOutputItem class,SpssOutputItem class,SpssOutputItem class
GetTypeString method,GetTypeString method,GetTypeString method
GetTypeString method,GetTypeString method,GetTypeString method
SpssOutputItem class,SpssOutputItem class,SpssOutputItem class
Model Viewer item,Model Viewer item,Model Viewer item
graphboard chart,graphboard chart,graphboard chart
R,R,R
graphics,graphics,graphics

Returns the type string of this output item. The returned value is not translated.

Syntax

SpssOutputItem.GetTypeString()

Returns

Chart
Log
Notes
Table
Text
Warning
Title
PageTitle
TreeDiagram
Model

Note: Standard charts, graphboard charts, and R graphics all have the type string 'Chart'. To distinguish between these chart types, use the SPSSSubtype method on the associated SpssChartItem object.


GetWidth Method (Python)

SpssOutputItem class,SpssOutputItem class,SpssOutputItem class
GetWidth method,GetWidth method,GetWidth method
GetWidth method,GetWidth method,GetWidth method
SpssOutputItem class,SpssOutputItem class,SpssOutputItem class

Returns the width of this output item in units of points (1/72 inch).

• This method is not available for header items or root items.

Syntax

SpssOutputItem.GetWidth()

Related Topics

SetWidth Method (Python)


GetXML Method (Python)

SpssOutputItem class,SpssOutputItem class,SpssOutputItem class
GetXML method,GetXML method,GetXML method
GetXML method,GetXML method,GetXML method
SpssOutputItem class,SpssOutputItem class,SpssOutputItem class

Returns the XML representation for this output item as a UTF-8 (Unicode Transformation Format, 8 bit) string.

Syntax

SpssOutputItem.GetXML()

You can set the XML for a chart item using the SetXML method from the SpssChartItem class. You can set the XML for a Model Viewer item using the SetXML method from the SpssModelItem class.

Related Topics

SetXML Method (Python)
SetXML Method (Python)


IsCurrentItem Method (Python)

SpssOutputItem class,SpssOutputItem class,SpssOutputItem class
IsCurrentItem method,IsCurrentItem method,IsCurrentItem method
IsCurrentItem method,IsCurrentItem method,IsCurrentItem method
SpssOutputItem class,SpssOutputItem class,SpssOutputItem class

Indicates if this output item is the current item--as indicated by a red arrow next to the item in the outline pane. The result is Boolean--True if the item is the current item, False otherwise.

Syntax

SpssOutputItem.IsCurrentItem()


IsEditable Method (Python)

SpssOutputItem class,SpssOutputItem class,SpssOutputItem class
IsEditable method,IsEditable method,IsEditable method
IsEditable method,IsEditable method,IsEditable method
SpssOutputItem class,SpssOutputItem class,SpssOutputItem class

Indicates whether this output item can be edited. The result is Boolean--True if the item can be edited, False otherwise.

Syntax

SpssOutputItem.IsEditable()


IsEqualTo Method (Python)

SpssOutputItem class,SpssOutputItem class,SpssOutputItem class
IsEqualTo method,IsEqualTo method,IsEqualTo method
IsEqualTo method,IsEqualTo method,IsEqualTo method
SpssOutputItem class,SpssOutputItem class,SpssOutputItem class

Indicates if this output item object is the same object as a specified output item object. The result is Boolean--True if the two objects are identical, False otherwise.

Syntax

SpssOutputItem.IsEqualTo(outputItem)

Parameters

outputItem An SpssOutputItem object


IsSelected Method (Python)

SpssOutputItem class,SpssOutputItem class,SpssOutputItem class
IsSelected method,IsSelected method,IsSelected method
IsSelected method,IsSelected method,IsSelected method
SpssOutputItem class,SpssOutputItem class,SpssOutputItem class

Indicates whether the current output item is selected. The result is Boolean--True if the item is currently selected, False otherwise. Use the SetSelected method to select an item.

Syntax

SpssHeaderItem.IsSelected()


IsVisible Method (Python)

SpssOutputItem class,SpssOutputItem class,SpssOutputItem class
IsVisible method,IsVisible method,IsVisible method
IsVisible method,IsVisible method,IsVisible method
SpssOutputItem class,SpssOutputItem class,SpssOutputItem class

Indicates if this output item is visible. The result is Boolean--True if the item is visible, False if it is hidden.

Syntax

SpssOutputItem.IsVisible()


SetAlignment Method (Python)

SpssOutputItem class,SpssOutputItem class,SpssOutputItem class
SetAlignment method,SetAlignment method,SetAlignment method
SetAlignment method,SetAlignment method,SetAlignment method
SpssOutputItem class,SpssOutputItem class,SpssOutputItem class

Sets the alignment for this output item.

Syntax

SpssOutputItem.SetAlignment(alignment)

Parameters

Set the value of alignment to one of the following:

SpssClient.OutputItemAlignment.Left | Left
SpssClient.OutputItemAlignment.Center | Center
SpssClient.OutputItemAlignment.Right | Right

Related Topics

GetAlignment Method (Python)


SetCurrentItem Method (Python)

SpssOutputItem class,SpssOutputItem class,SpssOutputItem class
SetCurrentItem method,SetCurrentItem method,SetCurrentItem method
SetCurrentItem method,SetCurrentItem method,SetCurrentItem method
SpssOutputItem class,SpssOutputItem class,SpssOutputItem class

Sets the item as the current item--as indicated by a red arrow next to the item in the outline pane.

Syntax

SpssOutputItem.SetCurrentItem()


SetDescription Method (Python)

SpssOutputItem class,SpssOutputItem class,SpssOutputItem class
SetDescription method,SetDescription method,SetDescription method
SetDescription method,SetDescription method,SetDescription method
SpssOutputItem class,SpssOutputItem class,SpssOutputItem class

Sets the name of this output item. This is the name that is displayed in the outline pane of the Viewer. The value can be specified as plain text, HTML, or rich text format. For HTML, embed markup in a <html></html> block. For rich text format, specify the string as a raw string to avoid unintentional escape sequences.

Syntax

SpssOutputItem.SetDescription(desc)

Related Topics

GetDescription Method (Python)


SetHeight Method (Python)

SpssOutputItem class,SpssOutputItem class,SpssOutputItem class
SetHeight method,SetHeight method,SetHeight method
SetHeight method,SetHeight method,SetHeight method
SpssOutputItem class,SpssOutputItem class,SpssOutputItem class

Sets the height of this output item in units of points (1/72 inch).

• This method is not available for pivot tables, header items, or the root item.

Syntax

SpssOutputItem.SetHeight(height)

Related Topics

GetHeight Method (Python)


SetPageBreak Method (Python)

SpssOutputItem class,SpssOutputItem class,SpssOutputItem class
SetPageBreak method,SetPageBreak method,SetPageBreak method
SetPageBreak method,SetPageBreak method,SetPageBreak method
SpssOutputItem class,SpssOutputItem class,SpssOutputItem class

Sets or clears a page break before this item.

Syntax

SpssOutputItem.SetPageBreak(pageBreak)

Parameters

pageBreak True to set a page break, False to clear a page break.

Related Topics

GetPageBreak Method (Python)


SetProcedureName Method (Python)

SpssOutputItem class,SpssOutputItem class,SpssOutputItem class
SetProcedureName method,SetProcedureName method,SetProcedureName method
SetProcedureName method,SetProcedureName method,SetProcedureName method
SpssOutputItem class,SpssOutputItem class,SpssOutputItem class

Sets the procedure name associated with this output item. The argument is a string and is not translated.

Syntax

SpssOutputItem.SetProcedureName(procName)


SetSelected Method (Python)

SpssOutputItem class,SpssOutputItem class,SpssOutputItem class
SetSelected method,SetSelected method,SetSelected method
SetSelected method,SetSelected method,SetSelected method
SpssOutputItem class,SpssOutputItem class,SpssOutputItem class

Specifies whether the current output item is set as selected. You can use the IsSelected method to determine if a given item is already selected.

Syntax

SpssOutputItem.SetSelected(selected)

Parameters

selected True to set this item as selected, False to set it as not selected.


SetSubType Method (Python)

SpssOutputItem class,SpssOutputItem class,SpssOutputItem class
SetSubType method,SetSubType method,SetSubType method
SetSubType method,SetSubType method,SetSubType method
SpssOutputItem class,SpssOutputItem class,SpssOutputItem class

Sets the OMS (Output Management System) sub-type identifier of this output item.

Syntax

SpssOutputItem.SetSubType(subType)

Parameters

subType A string

Related Topics

GetSubType Method (Python)


SetTreeLevel Method (Python)

SpssOutputItem class,SpssOutputItem class,SpssOutputItem class
SetTreeLevel method,SetTreeLevel method,SetTreeLevel method
SetTreeLevel method,SetTreeLevel method,SetTreeLevel method
SpssOutputItem class,SpssOutputItem class,SpssOutputItem class

Sets the level of this item within the hierarchy of the output tree. For instance, the root item is at level 0, and header items beneath the root are at level 1.

Syntax

SpssOutputItem.SetTreeLevel(level)

Parameters

level An integer

Related Topics

GetTreeLevel Method (Python)


SetVisible Method (Python)

SpssOutputItem class,SpssOutputItem class,SpssOutputItem class
SetVisible method,SetVisible method,SetVisible method
SetVisible method,SetVisible method,SetVisible method
SpssOutputItem class,SpssOutputItem class,SpssOutputItem class

Specifies whether this output item is visible.

Syntax

SpssOutputItem.SetVisible(visible)

Parameters

visible True to set the item as visible, False to set it as hidden.


SetWidth Method (Python)

SpssOutputItem class,SpssOutputItem class,SpssOutputItem class
SetWidth method,SetWidth method,SetWidth method
SetWidth method,SetWidth method,SetWidth method
SpssOutputItem class,SpssOutputItem class,SpssOutputItem class

Sets the width of this output item in units of points (1/72 inch).

• This method is not available for pivot tables, header items, or the root item.

Syntax

SpssOutputItem.SetWidth(width)

Related Topics

GetWidth Method (Python)


SpssChartItem Class (Python)

SpssChartItem class,SpssChartItem class,SpssChartItem class

The SpssChartItem class represents a chart item in an output document. You get an SpssChartItem object from the collection of output items in an output document.

Example: Getting Chart Items

import SpssClient
SpssClient.StartClient()

OutputDoc = SpssClient.GetDesignatedOutputDoc()
OutputItems = OutputDoc.GetOutputItems()

for index in range(OutputItems.Size()):
   OutputItem = OutputItems.GetItemAt(index)
   if OutputItem.GetType() == SpssClient.OutputItemType.CHART:
        ChartItem = OutputItem.GetSpecificType()

• Chart items have an output item type of SpssClient.OutputItemType.CHART.

• Once an output item has been identified as a chart item, you get an SpssChartItem object by calling the GetSpecificType method on the output item object. In this example, ChartItem is an SpssChartItem object.


SetXML Method (Python)

SpssChartItem class,SpssChartItem class,SpssChartItem class
SetXML method,SetXML method,SetXML method
SetXML method,SetXML method,SetXML method
SpssChartItem class,SpssChartItem class,SpssChartItem class

Sets the chart XML from a UTF-8 (Unicode Transformation Format, 8 bit) string.

Syntax

SpssChartItem.SetXML(xml)

You can get the XML for a chart item using the GetXML method from the SpssOutputItem class. You can also use chart XML (OXML) created by the OMS command as the source for SetXML. To do so, extract the visualization element from the OXML, decode the resulting string to "utf-8" (i.e., with the Python decode string method), and use the decoded string as the argument to SetXML.

Related Topics

GetXML Method (Python)


SPSSSubtype Method (Python)

SpssChartItem class,SpssChartItem class,SpssChartItem class
SPSSSubtype method,SPSSSubtype method,SPSSSubtype method
SPSSSubtype method,SPSSSubtype method,SPSSSubtype method
SpssChartItem class,SpssChartItem class,SpssChartItem class
graphboard chart,graphboard chart,graphboard chart
R,R,R
graphics,graphics,graphics

Returns a string specifying the type of chart.

Syntax

SpssChartItem.SPSSSubtype()

Returns

CHART | Standard chart
GRAPHBOARD | Graphboard chart
IMAGE | R graphic
TREEMODEL | Tree model


SpssModelItem Class (Python)

SpssModelItem class,SpssModelItem class,SpssModelItem class

The SpssModelItem class represents a Model Viewer item in an output document. You get an SpssModelItem object from the collection of output items in an output document.

Example: Getting Model Viewer Items

import SpssClient
SpssClient.StartClient()

OutputDoc = SpssClient.GetDesignatedOutputDoc()
OutputItems = OutputDoc.GetOutputItems()

for index in range(OutputItems.Size()):
   OutputItem = OutputItems.GetItemAt(index)
   if OutputItem.GetType() == SpssClient.OutputItemType.MODEL:
        ModelItem = OutputItem.GetSpecificType()

• Model Viewer items have an output item type of SpssClient.OutputItemType.MODEL.

• Once an output item has been identified as a Model Viewer item, you get an SpssModelItem object by calling the GetSpecificType method on the output item object. In this example, ModelItem is an SpssModelItem object.


ExportAllViews Method (Python)

SpssModelItem class,SpssModelItem class,SpssModelItem class
ExportAllViews method,ExportAllViews method,ExportAllViews method
ExportAllViews method,ExportAllViews method,ExportAllViews method
SpssModelItem class,SpssModelItem class,SpssModelItem class

Exports all views of this Model Viewer item in the specified image format.

Syntax

SpssModelItem.ExportAllViews(filePrefix,format)

Parameters

The argument filePrefix is the full path and file name prefix for the files containing the exported views. Each view is exported to a separate file. Set the value of format to one of the following:

SpssClient.ChartExportFormat.bmp | Windows bitmap
SpssClient.ChartExportFormat.emf | Enhanced metafile
SpssClient.ChartExportFormat.eps | Enhanced postscript
SpssClient.ChartExportFormat.jpg | JPG file
SpssClient.ChartExportFormat.png | PNG file
SpssClient.ChartExportFormat.tiff | Tagged image file

You can export the view displayed in the Viewer using the ExportToImage Method (Python).


SetXML Method (Python)

SpssModelItem class,SpssModelItem class,SpssModelItem class
SetXML method,SetXML method,SetXML method
SetXML method,SetXML method,SetXML method
SpssModelItem class,SpssModelItem class,SpssModelItem class

Sets the XML for the Model Viewer item from a UTF-8 (Unicode Transformation Format, 8 bit) string.

Syntax

SpssModelItem.SetXML(xml)

You can get the XML for a Model Viewer item using the GetXML method from the SpssOutputItem class. You can also use model XML (OXML) created by the OMS command as the source for SetXML.

Related Topics

GetXML Method (Python)


SpssHeaderItem Class (Python)

SpssHeaderItem class,SpssHeaderItem class,SpssHeaderItem class

The SpssHeaderItem class represents a header item in an output document. You get an SpssHeaderItem object from the collection of output items in an output document.

Example: Getting Header Items

import SpssClient
SpssClient.StartClient()

OutputDoc = SpssClient.GetDesignatedOutputDoc()
OutputItems = OutputDoc.GetOutputItems()

for index in range(OutputItems.Size()):
   OutputItem = OutputItems.GetItemAt(index)
   if OutputItem.GetType() == SpssClient.OutputItemType.HEAD:
        HeaderItem = OutputItem.GetSpecificType()

• Header items have an output item type of SpssClient.OutputItemType.HEAD.

• Once an output item has been identified as a header item, you get an SpssHeaderItem object by calling the GetSpecificType method on the output item object. In this example, HeaderItem is an SpssHeaderItem object.

Note: The root item is an SpssHeaderItem object.


GetChildCount Method (Python)

SpssHeaderItem class,SpssHeaderItem class,SpssHeaderItem class
GetChildCount method,GetChildCount method,GetChildCount method
GetChildCount method,GetChildCount method,GetChildCount method
SpssHeaderItem class,SpssHeaderItem class,SpssHeaderItem class

Returns the child item count for this header item.

Syntax

SpssHeaderItem.GetChildCount()


GetChildItem Method (Python)

SpssHeaderItem class,SpssHeaderItem class,SpssHeaderItem class
GetChildItem method,GetChildItem method,GetChildItem method
GetChildItem method,GetChildItem method,GetChildItem method
SpssHeaderItem class,SpssHeaderItem class,SpssHeaderItem class

Returns an SpssOutputItem object for the child item at the specified index. Index values start from 0.

Syntax

SpssOutputItem=SpssHeaderItem.GetChildItem(index)


InsertChildItem Method (Python)

SpssHeaderItem class,SpssHeaderItem class,SpssHeaderItem class
InsertChildItem method,InsertChildItem method,InsertChildItem method
InsertChildItem method,InsertChildItem method,InsertChildItem method
SpssHeaderItem class,SpssHeaderItem class,SpssHeaderItem class

Inserts a child item--at the specified index--under the current header item in the associated output document.

• Use this method to insert header items, text items, and title items created with the CreateHeaderItem, CreateTextItem, and CreateTitleItem methods from the SpssOutputDoc class.

Syntax

SpssHeaderItem.InsertChildItem(item,index)

Parameters

item | An SpssOutputItem object
index | The index position of the new child item in the header item's child list. Index values start from 0.


IsExpanded Method (Python)

SpssHeaderItem class,SpssHeaderItem class,SpssHeaderItem class
IsExpanded method,IsExpanded method,IsExpanded method
IsExpanded method,IsExpanded method,IsExpanded method
SpssHeaderItem class,SpssHeaderItem class,SpssHeaderItem class

Indicates whether the associated header item is expanded. The result is Boolean--True if the header item is expanded, False otherwise.

Syntax

SpssHeaderItem.IsExpanded()


RemoveChildItem Method (Python)

SpssHeaderItem class,SpssHeaderItem class,SpssHeaderItem class
RemoveChildItem method,RemoveChildItem method,RemoveChildItem method
RemoveChildItem method,RemoveChildItem method,RemoveChildItem method
SpssHeaderItem class,SpssHeaderItem class,SpssHeaderItem class

Removes the child item at the specified index. Index values start from 0.

Syntax

SpssHeaderItem.RemoveChildItem(index)


SetExpanded Method (Python)

SpssHeaderItem class,SpssHeaderItem class,SpssHeaderItem class
SetExpanded method,SetExpanded method,SetExpanded method
SetExpanded method,SetExpanded method,SetExpanded method
SpssHeaderItem class,SpssHeaderItem class,SpssHeaderItem class

Sets whether the associated header item is expanded.

Syntax

SpssHeaderItem.SetExpanded(expand)

Parameters

expand True to expand the item, False to collapse the item.


SpssLogItem Class (Python)

SpssLogItem class,SpssLogItem class,SpssLogItem class

The SpssLogItem class represents a log item in an output document. You get an SpssLogItem object from the collection of output items in an output document.

Example: Getting Log Items

import SpssClient
SpssClient.StartClient()

OutputDoc = SpssClient.GetDesignatedOutputDoc()
OutputItems = OutputDoc.GetOutputItems()

for index in range(OutputItems.Size()):
   OutputItem = OutputItems.GetItemAt(index)
   if OutputItem.GetType() == SpssClient.OutputItemType.LOG:
        LogItem = OutputItem.GetSpecificType()

• Log items have an output item type of SpssClient.OutputItemType.LOG.

• Once an output item has been identified as a log item, you get an SpssLogItem object by calling the GetSpecificType method on the output item object. In this example, LogItem is an SpssLogItem object.


Append Method (Python)

SpssLogItem class,SpssLogItem class,SpssLogItem class
Append method,Append method,Append method
Append method,Append method,Append method
SpssLogItem class,SpssLogItem class,SpssLogItem class

Appends the specified text to the contents of the associated log output item.

Syntax

SpssLogItem.Append(text)


GetTextContents Method (Python)

SpssLogItem class,SpssLogItem class,SpssLogItem class
GetTextContents method,GetTextContents method,GetTextContents method
GetTextContents method,GetTextContents method,GetTextContents method
SpssLogItem class,SpssLogItem class,SpssLogItem class

Returns the contents of the associated log output item. The value is returned as plain text.

Syntax

SpssLogItem.GetTextContents()

Related Topics

SetTextContents Method (Python)


SetTextContents Method (Python)

SpssLogItem class,SpssLogItem class,SpssLogItem class
SetTextContents method,SetTextContents method,SetTextContents method
SetTextContents method,SetTextContents method,SetTextContents method
SpssLogItem class,SpssLogItem class,SpssLogItem class

Sets the contents of the associated log output item, replacing any existing content. The value can be specified as plain text, HTML, or rich text format. For HTML, embed markup in a <html></html> block. For rich text format, specify the string as a raw string to avoid unintentional escape sequences. For multiple lines, use "\n" to specify line breaks.

Syntax

SpssLogItem.SetTextContents(contents)

Related Topics

GetTextContents Method (Python)


SpssTextItem Class (Python)

SpssTextItem class,SpssTextItem class,SpssTextItem class

The SpssTextItem class represents a text item in an output document. You get an SpssTextItem object from the collection of output items in an output document.

Example: Getting Text Items

import SpssClient
SpssClient.StartClient()

OutputDoc = SpssClient.GetDesignatedOutputDoc()
OutputItems = OutputDoc.GetOutputItems()

for index in range(OutputItems.Size()):
   OutputItem = OutputItems.GetItemAt(index)
   if OutputItem.GetType() == SpssClient.OutputItemType.TEXT:
        TextItem = OutputItem.GetSpecificType()

• Text items have an output item type of SpssClient.OutputItemType.TEXT.

• Once an output item has been identified as a text item, you get an SpssTextItem object by calling the GetSpecificType method on the output item object. In this example, TextItem is an SpssTextItem object.

Related Topics

GetTextContents Method (Python)


GetTextContents Method (Python)

SpssTextItem class,SpssTextItem class,SpssTextItem class
GetTextContents method,GetTextContents method,GetTextContents method
GetTextContents method,GetTextContents method,GetTextContents method
SpssTextItem class,SpssTextItem class,SpssTextItem class

Returns the contents of the associated text output item. The value is returned as plain text.

Syntax

SpssTextItem.GetTextContents()

Related Topics

SetTextContents Method (Python)


SetTextContents Method (Python)

SpssTextItem class,SpssTextItem class,SpssTextItem class
SetTextContents method,SetTextContents method,SetTextContents method
SetTextContents method,SetTextContents method,SetTextContents method
SpssTextItem class,SpssTextItem class,SpssTextItem class

Sets the contents of the associated text output item, replacing any existing content. The value can be specified as plain text, HTML, or rich text format. For HTML, embed markup in a <html></html> block. For rich text format, specify the string as a raw string to avoid unintentional escape sequences. For multiple lines, use "\n" to specify line breaks.

Syntax

SpssTextItem.SetTextContents(contents)

Related Topics

GetTextContents Method (Python)


SpssTitleItem Class (Python)

SpssTitleItem class,SpssTitleItem class,SpssTitleItem class

The SpssTitleItem class represents a title item in an output document. You get an SpssTitleItem object from the collection of output items in an output document.

Example: Getting Title Items

import SpssClient
SpssClient.StartClient()

OutputDoc = SpssClient.GetDesignatedOutputDoc()
OutputItems = OutputDoc.GetOutputItems()

for index in range(OutputItems.Size()):
   OutputItem = OutputItems.GetItemAt(index)
   if OutputItem.GetType() == SpssClient.OutputItemType.TITLE:
        TitleItem = OutputItem.GetSpecificType()

• Title items have an output item type of SpssClient.OutputItemType.TITLE.

• Once an output item has been identified as a title item, you get an SpssTitleItem object by calling the GetSpecificType method on the output item object. In this example, TitleItem is an SpssTitleItem object.


GetTextContents Method (Python)

SpssTitleItem class,SpssTitleItem class,SpssTitleItem class
GetTextContents method,GetTextContents method,GetTextContents method
GetTextContents method,GetTextContents method,GetTextContents method
SpssTitleItem class,SpssTitleItem class,SpssTitleItem class

Returns the contents of the associated title output item. The value is returned as plain text.

Syntax

SpssTitleItem.GetTextContents()

Related Topics

SetTextContents Method (Python)


SetTextContents Method (Python)

SpssTitleItem class,SpssTitleItem class,SpssTitleItem class
SetTextContents method,SetTextContents method,SetTextContents method
SetTextContents method,SetTextContents method,SetTextContents method
SpssTitleItem class,SpssTitleItem class,SpssTitleItem class

Sets the contents of the associated title output item, replacing any existing content. The value can be specified as plain text, HTML, or rich text format. For HTML, embed markup in a <html></html> block. For rich text format, specify the string as a raw string to avoid unintentional escape sequences.

Syntax

SpssTitleItem.SetTextContents(contents)

Related Topics

GetTextContents Method (Python)


MenuTableList Class (Python)

MenuTableList class,MenuTableList class,MenuTableList class

The MenuTableList class provides access to the list of available menu items for a data, output, or syntax document. You obtain a MenuTableList object from the GetMenuTable method of an SpssDataDoc, SpssOutputDoc, or SpssSyntaxDoc object.

A MenuTableList object is not an iterable Python object. In order to iterate over the items in the list, use a for loop, as in:

for index in range(MenuTableList.Size()):

For an example that uses the MenuTableList class, see the example for the SpssMenuItem class.


GetItemAt Method (Python)

MenuTableList class,MenuTableList class,MenuTableList class
GetItemAt method,GetItemAt method,GetItemAt method
GetItemAt method,GetItemAt method,GetItemAt method
MenuTableList class,MenuTableList class,MenuTableList class

Returns an SpssMenuItem object representing the menu item with the specified index.

Syntax

SpssMenuItem=MenuTableList.GetItemAt(index)


Size Method (Python)

MenuTableList class,MenuTableList class,MenuTableList class
Size method,Size method,Size method
Size method,Size method,Size method
MenuTableList class,MenuTableList class,MenuTableList class

Returns the number of items in a MenuTableList object.

Syntax

MenuTableList.Size()


SpssMenuItem Class (Python)

SpssMenuItem class,SpssMenuItem class,SpssMenuItem class

The SpssMenuItem class represents a menu item in a data, output, or syntax document. You get an SpssMenuItem object from the GetItemAt method of a MenuTableList object.

Example: Getting a List of Menu Items

import SpssClient
SpssClient.StartClient()

OutputDoc = SpssClient.GetDesignatedOutputDoc()
MenuTableList = OutputDoc.GetMenuTable()
strMenuItemList = []
for i in range(MenuTableList.Size()):
    item = MenuTableList.GetItemAt(i)
    strMenuItemList.append(item.GetTextContents())


GetTextContents Method (Python)

SpssMenuItem class,SpssMenuItem class,SpssMenuItem class
GetTextContents method,GetTextContents method,GetTextContents method
GetTextContents method,GetTextContents method,GetTextContents method
SpssMenuItem class,SpssMenuItem class,SpssMenuItem class

Returns the name of the menu item (as a string) associated with an SpssMenuItem object.

Syntax

SpssMenuItem.GetTextContents()

Related Topics

SpssTextItem Class (Python)


Pivot Tables (Python)

The scripting facility allows you to do most of the things you can do in the pivot table editor, through use of the SpssPivotTable class. There are two general approaches for working with pivot tables from scripting:

• Select groups of cells (results or labels) or other elements (such as footnotes) and apply methods that modify the entire selection. For example, you can change the foreground color for selected cells.

• Access a subset of the pivot table, such as its data cells or row labels, and modify a particular element in the subset. For example, you can access the data cells and call a method to set the foreground color for a specified cell.

Generally speaking, if you want to modify a number of elements in the same manner, the first approach is faster.

Areas of a Pivot Table

(Red labels indicate accessible objects.)

Available Objects

The SpssPivotTable object provides access to the following objects:

• SpssDataCells Provides access to the data cells.

• SpssLabels Provides access to the row and column labels.

• SpssFootnotes Provides access to all of the table's footnotes.

• SpssLayerLabels Provides access to labels in any layer dimensions.

• SpssPivotMgr Provides access to row, column, and layer dimensions.

• SpssDimension Provides access to the properties of a particular dimension.


SpssPivotTable Class (Python)

SpssPivotTable class,SpssPivotTable class,SpssPivotTable class

The SpssPivotTable class allows you to operate on the table as a whole as well as providing access to objects for working with the footnotes, data cells, row or column labels, and layer labels associated with the table. Pivot tables are output items and are accessed from the list of output items associated with an output document.

Example: Getting Pivot Tables

import SpssClient
SpssClient.StartClient()

OutputDoc = SpssClient.GetDesignatedOutputDoc()
OutputItems = OutputDoc.GetOutputItems()

for index in range(OutputItems.Size()):
   OutputItem = OutputItems.GetItemAt(index)
   if OutputItem.GetType() == SpssClient.OutputItemType.PIVOT:
        PivotTable = OutputItem.GetSpecificType()

• Pivot tables have an output item type of SpssClient.OutputItemType.PIVOT.

• Once an output item has been identified as a pivot table, you get an SpssPivotTable object by calling the GetSpecificType method on the output item object. In this example, PivotTable is an SpssPivotTable object.

Example: Getting the First Selected Pivot Table

import SpssClient
SpssClient.StartClient()

OutputDoc = SpssClient.GetDesignatedOutputDoc()
OutputItems = OutputDoc.GetOutputItems()

for index in range(OutputItems.Size()):
   OutputItem = OutputItems.GetItemAt(index)
   if OutputItem.GetType() == SpssClient.OutputItemType.PIVOT \
      and OutputItem.IsSelected():
        PivotTable = OutputItem.GetSpecificType()

Example: Getting the First Pivot Table Labeled "Statistics"

import SpssClient
SpssClient.StartClient()

OutputDoc = SpssClient.GetDesignatedOutputDoc()
OutputItems = OutputDoc.GetOutputItems()

for index in range(OutputItems.Size()):
   OutputItem = OutputItems.GetItemAt(index)
   if OutputItem.GetType() == SpssClient.OutputItemType.PIVOT \
      and OutputItem.GetDescription() == "Statistics":
        PivotTable = OutputItem.GetSpecificType()


Autofit Method (Python)

Autofit method,Autofit method,Autofit method
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
Autofit method,Autofit method,Autofit method

Recalculates the size of all cells in the entire table to accommodate label lengths or the lengths of both labels and data values.

• To specify how the cells are to be recalculated (labels only or labels and data), use the SetPreference method from the SpssClient class and specify SpssClient.PreferenceOptions.ColumnWidth as the option.

Syntax

SpssPivotTable.Autofit()

Related Topics

SetDataCellWidths Method (Python)
ReSizeColumn Method (Python)
GetColumnLabelWidthAt Method (Python)
GetRowLabelWidthAt Method (Python)
GetTextWidthAt Method (Python)
SetColumnLabelWidthAt Method (Python)
SetRowLabelWidthAt Method (Python)


ClearSelection Method (Python)

ClearSelection method,ClearSelection method,ClearSelection method
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
ClearSelection method,ClearSelection method,ClearSelection method

Deselects all selected output items or pivot table elements.

• All Select methods add the current item(s)/element(s) to what has been previously selected. Always clear selections before you start selecting output items or table elements.

Syntax

SpssPivotTable.ClearSelection()


ColumnLabelArray Method (Python)

ColumnLabelArray method,ColumnLabelArray method,ColumnLabelArray method
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
ColumnLabelArray method,ColumnLabelArray method,ColumnLabelArray method

Returns an SpssLabels object representing the column labels.

Syntax

SpssLabels=SpssPivotTable.ColumnLabelArray()

Related Topics

SpssLabels Class (Python)


DataCellArray Method (Python)

DataCellArray method,DataCellArray method,DataCellArray method
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
DataCellArray method,DataCellArray method,DataCellArray method

Returns an SpssDataCells object representing the data cells of the pivot table.

Syntax

SpssDataCells=SpssPivotTable.DataCellArray()

Related Topics

SpssDataCells Class (Python)


DisplayTableByRows Method (Python)

DisplayTableByRows method,DisplayTableByRows method,DisplayTableByRows method
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
DisplayTableByRows method,DisplayTableByRows method,DisplayTableByRows method

Specifies whether to display the table n rows at a time, where n is set with the SetRowsToDisplayRowCount method. The argument is Boolean--True to display the table n rows at a time, False otherwise.

Syntax

SpssPivotTable.DisplayTableByRows(boolean)

Related Topics

IsDisplayTableByRows Method (Python)
NavigateToFirstRow Method (Python)
NavigateToLastRow Method (Python)
NavigateToNextRows Method (Python)
NavigateToPreviousRows Method (Python)
SetRowsToDisplayRowCount Method (Python)
SetRowsToDisplayTolerance Method (Python)


FootnotesArray Method (Python)

FootnotesArray method,FootnotesArray method,FootnotesArray method
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
FootnotesArray method,FootnotesArray method,FootnotesArray method

Returns an SpssFootnotes object representing the table footnotes.

Syntax

SpssFootnotes=SpssPivotTable.FootnotesArray()

Related Topics

SpssFootnotes Class (Python)


GetCaptionText Method (Python)

GetCaptionText method,GetCaptionText method,GetCaptionText method
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
GetCaptionText method,GetCaptionText method,GetCaptionText method

Returns the caption text for the current table.

Syntax

SpssPivotTable.GetCaptionText()

Related Topics

SetCaptionText Method (Python)


GetFootnoteMarkersPosition Method (Python)

GetFootnoteMarkersPosition method,GetFootnoteMarkersPosition method,GetFootnoteMarkersPosition method
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
GetFootnoteMarkersPosition method,GetFootnoteMarkersPosition method,GetFootnoteMarkersPosition method

Gets the current position--superscript or subscript--for footnote markers for the pivot table.

Syntax

SpssPivotTable.GetFootnoteMarkersPosition()

The returned value is one of:

SpssClient.SpssFootnoteMarkerTypes.SpssFtSuperscript | Superscript
SpssClient.SpssFootnoteMarkerTypes.SpssFtSubscript | Subscript

Related Topics

GetFootnoteMarkersStyle Method (Python)
ChangeMarkerToRegular Method (Python)
ChangeMarkerToSpecial Method (Python)
GetCount Method (Python)
RenumberFootnotes Method (Python)


GetFootnoteMarkersStyle Method (Python)

GetFootnoteMarkersStyle method,GetFootnoteMarkersStyle method,GetFootnoteMarkersStyle method
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
GetFootnoteMarkersStyle method,GetFootnoteMarkersStyle method,GetFootnoteMarkersStyle method

Gets the current style--alphabetic or numeric--for footnote markers for the pivot table.

Syntax

SpssPivotTable.GetFootnoteMarkersStyle()

The returned value is one of:

SpssClient.SpssFootnoteMarkerTypes.SpssFtAlphabetic | Alphabetic
SpssClient.SpssFootnoteMarkerTypes.SpssFtNumeric | Numeric

Related Topics

GetFootnoteMarkersPosition Method (Python)
ChangeMarkerToRegular Method (Python)
ChangeMarkerToSpecial Method (Python)
GetCount Method (Python)
RenumberFootnotes Method (Python)


GetHeight Method (Python)

GetHeight method,GetHeight method,GetHeight method
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
GetHeight method,GetHeight method,GetHeight method
data regions,data regions,data regions
data regions,data regions,data regions
height and width,height and width,height and width

Returns the height of the pivot table. The unit is the point (1/72 inch).

Syntax

SpssPivotTable.GetHeight()


GetRotateColumnLabels Method (Python)

GetRotateColumnLabels method,GetRotateColumnLabels method,GetRotateColumnLabels method
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
GetRotateColumnLabels method,GetRotateColumnLabels method,GetRotateColumnLabels method

Indicates if category labels closest to the data (that is, categories of the column dimension with the largest index) are rotated. The result is Boolean.

Syntax

SpssPivotTable.GetRotateColumnLabels()

Returns

True | The column labels closest to the data are displayed vertically
False | The column labels closest to the data are displayed horizontally

Related Topics

GetRotateRowLabels Method (Python)
SetRotateColumnLabels Method (Python)
SetRotateRowLabels Method (Python)


GetRotateRowLabels Method (Python)

GetRotateRowLabels method,GetRotateRowLabels method,GetRotateRowLabels method
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
GetRotateRowLabels method,GetRotateRowLabels method,GetRotateRowLabels method

Indicates if the labels of all but the last row dimension (that is, the row dimension with the largest index) are rotated. The result is Boolean.

Syntax

SpssPivotTable.GetRotateRowLabels()

Returns

True | The outer row labels are displayed vertically
False | The outer row labels are displayed horizontally

Related Topics

GetRotateColumnLabels Method (Python)
SetRotateColumnLabels Method (Python)
SetRotateRowLabels Method (Python)


GetTitleText Method (Python)

GetTitleText method,GetTitleText method,GetTitleText method
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
GetTitleText method,GetTitleText method,GetTitleText method

Returns the text of the title for the table.

Syntax

SpssPivotTable.GetTitleText()

Related Topics

SetTitleText Method (Python)


GetUpdateScreen Method (Python)

GetUpdateScreen method,GetUpdateScreen method,GetUpdateScreen method
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
GetUpdateScreen method,GetUpdateScreen method,GetUpdateScreen method

Returns whether changes in the pivot table are refreshed immediately. The result is Boolean--True if changes are refreshed immediately, False otherwise.

• By default, changes are refreshed immediately. Use the SetUpdateScreen method to specify that changes are not to be refreshed immediately.

Syntax

SpssPivotTable.GetUpdateScreen()

Related Topics

SetUpdateScreen Method (Python)


GetWidowOrphanLines Method (Python)

GetWidoworphanLines method,GetWidoworphanLines method,GetWidoworphanLines method
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
GetWidoworphanLines method,GetWidoworphanLines method,GetWidoworphanLines method

Returns the number of allowable widow/orphan lines when pivot tables are printed.

• Widow lines are the last few lines of a paragraph printed at the top of the next page; orphan lines are the first few lines of a paragraph printed at the bottom of the previous page.

Syntax

SpssPivotTable.GetWidowOrphanLines()

Related Topics

SetBottomMargin Method (Python)
SetLeftMargin Method (Python)
SetRightMargin Method (Python)
SetTopMargin Method (Python)
SetWidowOrphanLines Method (Python)


GetWidth Method (Python)

GetWidth method,GetWidth method,GetWidth method
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
GetWidth method,GetWidth method,GetWidth method
data regions,data regions,data regions
data regions,data regions,data regions
height and width,height and width,height and width

Returns the width of the pivot table. The unit is the point (1/72 inch).

Syntax

SpssPivotTable.GetWidth()


Group Method (Python)

Group method,Group method,Group method
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
Group method,Group method,Group method

Groups selected category labels or group labels, creates a grouping level, and inserts a grouping label.

• The selection must be category or group labels.

• After the execution of this method, the inserted grouping label is selected and has the default label of Group Label.

• If a new group level is inserted, labels on the same and lower levels are demoted one level. (For column labels, the row index increases by one; for row labels, the column index increases by one.)

Syntax

SpssPivotTable.Group()

Example

This example assumes that PivotTable is an SpssPivotTable object, selects category column labels Clerical and Custodial, and groups them under the label of Non-Managerial.

ColumnLabels = PivotTable.ColumnLabelArray()

#Select the category column labels Clerical and Custodial:
PivotTable.ClearSelection()
for i in range(ColumnLabels.GetNumRows()):
   for j in range(ColumnLabels.GetNumColumns()):
           if ColumnLabels.GetValueAt(i,j) in ["Clerical","Custodial"]:
               ColumnLabels.SelectLabelAt(i,j)

#Group the categories and assign a group label:
PivotTable.Group()
for i in range(ColumnLabels.GetNumRows()):
   for j in range(ColumnLabels.GetNumColumns()):
           if ColumnLabels.GetValueAt(i,j)=="Group Label":
               ColumnLabels.SetValueAt(i,j,"Non-Managerial")

Related Topics

Ungroup Method (Python)


HideCaption Method (Python)

HideCaption method,HideCaption method,HideCaption method
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
HideCaption method,HideCaption method,HideCaption method

Hides the caption of the current table.

Syntax

SpssPivotTable.HideCaption()

Related Topics

HideFootnote Method (Python)
HideTitle Method (Python)
HideFootnotesAt Method (Python)
HideLabel Method (Python)
HideAllLabelsInDimensionAt Method (Python)
HideFootnotesAt Method (Python)
HideLabelsInDimensionAt Method (Python)
HideLabelsWithDataAt Method (Python)
HideFootnotesAt Method (Python)


HideFootnote Method (Python)

HideFootnote method,HideFootnote method,HideFootnote method
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
HideFootnote method,HideFootnote method,HideFootnote method

Hides the selected footnotes or all the footnotes referenced by the selected cell.

Syntax

SpssPivotTable.HideFootnote()

Related Topics

HideCaption Method (Python)
HideTitle Method (Python)
HideFootnotesAt Method (Python)
HideLabel Method (Python)
HideAllLabelsInDimensionAt Method (Python)
HideFootnotesAt Method (Python)
HideLabelsInDimensionAt Method (Python)
HideLabelsWithDataAt Method (Python)
HideFootnotesAt Method (Python)


HideTitle Method (Python)

HideTitle method,HideTitle method,HideTitle method
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
HideTitle method,HideTitle method,HideTitle method

Hides the title of a pivot table.

Syntax

SpssPivotTable.HideTitle()

Related Topics

HideCaption Method (Python)
HideFootnote Method (Python)
HideFootnotesAt Method (Python)
HideLabel Method (Python)
HideAllLabelsInDimensionAt Method (Python)
HideFootnotesAt Method (Python)
HideLabelsInDimensionAt Method (Python)
HideLabelsWithDataAt Method (Python)
HideFootnotesAt Method (Python)


InsertFootnote Method (Python)

InsertFootnote method,InsertFootnote method,InsertFootnote method
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
InsertFootnote method,InsertFootnote method,InsertFootnote method

Inserts a footnote to the selected data or label cell.

• If multiple data cells or labels are selected, the footnote is attached to the first selected item.

Syntax

SpssPivotTable.InsertFootnote(string)

Parameters

string Text of the footnote


IsDisplayTableByRows Method (Python)

IsDisplayTableByRows method,IsDisplayTableByRows method,IsDisplayTableByRows method
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
IsDisplayTableByRows method,IsDisplayTableByRows method,IsDisplayTableByRows method

Indicates whether the table is being displayed a fixed number of rows at a time. The result is Boolean--True if the table is being displayed a fixed number of rows at a time, False otherwise. Use the DisplayTableByRows method to change the setting.

Syntax

SpssPivotTable.IsDisplayTableByRows()

Related Topics

DisplayTableByRows Method (Python)
NavigateToFirstRow Method (Python)
NavigateToLastRow Method (Python)
NavigateToNextRows Method (Python)
NavigateToPreviousRows Method (Python)
SetRowsToDisplayRowCount Method (Python)
SetRowsToDisplayTolerance Method (Python)


LayerLabelArray Method (Python)

LayerLabelArray method,LayerLabelArray method,LayerLabelArray method
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
LayerLabelArray method,LayerLabelArray method,LayerLabelArray method

Returns an SpssLayerLabels object representing all layer labels.

Syntax

SpssLayerLabels=SpssPivotTable.LayerLabelArray()

Related Topics

SpssLayerLabels Class (Python)


NavigateToFirstRow Method (Python)

NavigateToFirstRow method,NavigateToFirstRow method,NavigateToFirstRow method
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
NavigateToFirstRow method,NavigateToFirstRow method,NavigateToFirstRow method

Displays the first block of rows of the table when displaying the table a fixed number of rows at a time. Use the DisplayTableByRows method to display the table a fixed number of rows at a time.

Syntax

SpssPivotTable.NavigateToFirstRow()

Related Topics

DisplayTableByRows Method (Python)
IsDisplayTableByRows Method (Python)
NavigateToLastRow Method (Python)
NavigateToNextRows Method (Python)
NavigateToPreviousRows Method (Python)
SetRowsToDisplayRowCount Method (Python)
SetRowsToDisplayTolerance Method (Python)


NavigateToLastRow Method (Python)

NavigateToLastRow method,NavigateToLastRow method,NavigateToLastRow method
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
NavigateToLastRow method,NavigateToLastRow method,NavigateToLastRow method

Displays the last block of rows of the table when displaying the table a fixed number of rows at a time. Use the DisplayTableByRows method to display the table a fixed number of rows at a time.

Syntax

SpssPivotTable.NavigateToLastRow()

Related Topics

DisplayTableByRows Method (Python)
IsDisplayTableByRows Method (Python)
NavigateToFirstRow Method (Python)
NavigateToNextRows Method (Python)
NavigateToPreviousRows Method (Python)
SetRowsToDisplayRowCount Method (Python)
SetRowsToDisplayTolerance Method (Python)


NavigateToNextRows Method (Python)

NavigateToNextRows method,NavigateToNextRows method,NavigateToNextRows method
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
NavigateToNextRows method,NavigateToNextRows method,NavigateToNextRows method

Displays the next block of rows of the table when displaying the table a fixed number of rows at a time. Use the DisplayTableByRows method to display the table a fixed number of rows at a time.

Syntax

SpssPivotTable.NavigateToNextRows()

Related Topics

DisplayTableByRows Method (Python)
IsDisplayTableByRows Method (Python)
NavigateToFirstRow Method (Python)
NavigateToLastRow Method (Python)
NavigateToPreviousRows Method (Python)
SetRowsToDisplayRowCount Method (Python)
SetRowsToDisplayTolerance Method (Python)


NavigateToPreviousRows Method (Python)

NavigateToPreviousRows method,NavigateToPreviousRows method,NavigateToPreviousRows method
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
NavigateToPreviousRows method,NavigateToPreviousRows method,NavigateToPreviousRows method

Displays the previous block of rows of the table when displaying the table a fixed number of rows at a time. Use the DisplayTableByRows method to display the table a fixed number of rows at a time.

Syntax

SpssPivotTable.NavigateToPreviousRows()

Related Topics

DisplayTableByRows Method (Python)
IsDisplayTableByRows Method (Python)
NavigateToFirstRow Method (Python)
NavigateToLastRow Method (Python)
NavigateToNextRows Method (Python)
SetRowsToDisplayRowCount Method (Python)
SetRowsToDisplayTolerance Method (Python)


NumericFormat Method (Python)

NumericFormat method,NumericFormat method,NumericFormat method
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
NumericFormat method,NumericFormat method,NumericFormat method

Sets the display format for numeric values in the selected cells of the current table.

SpssPivotTable.NumericFormat(format,decimal)

Parameters

format | The string description of the format.
decimal | Number of decimal places.

For a listing of the format types, see String Description of Numeric Formats.


PivotManager Method (Python)

PivotManager method,PivotManager method,PivotManager method
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
PivotManager method,PivotManager method,PivotManager method

Returns an SpssPivotMgr object, providing access to the Pivot Manager.

Syntax

SpssPivotMgr=SpssPivotTable.PivotManager()

Related Topics

SpssPivotMgr Class (Python)


RowLabelArray Method (Python)

RowLabelArray method,RowLabelArray method,RowLabelArray method
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
RowLabelArray method,RowLabelArray method,RowLabelArray method

Returns an SpssLabels object representing the row labels.

Syntax

SpssLabels=SpssPivotTable.RowLabelArray()

Related Topics

SpssLabels Class (Python)


SelectAllFootnotes Method (Python)

SelectAllFootnotes method,SelectAllFootnotes method,SelectAllFootnotes method
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SelectAllFootnotes method,SelectAllFootnotes method,SelectAllFootnotes method

Selects all footnotes in the pivot table, in addition to what has already been selected.

Syntax

SpssPivotTable.SelectAllFootnotes()

Related Topics

SelectCaption Method (Python)
SelectCorner Method (Python)
SelectTable Method (Python)
SelectTableBody Method (Python)
SelectTitle Method (Python)


SelectCaption Method (Python)

SelectCaption method,SelectCaption method,SelectCaption method
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SelectCaption method,SelectCaption method,SelectCaption method

Selects the caption of the pivot table, in addition to all previously selected elements.

Syntax

SpssPivotTable.SelectCaption()

Related Topics

SelectAllFootnotes Method (Python)
SelectCorner Method (Python)
SelectTable Method (Python)
SelectTableBody Method (Python)
SelectTitle Method (Python)


SelectCorner Method (Python)

SelectCorner method,SelectCorner method,SelectCorner method
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SelectCorner method,SelectCorner method,SelectCorner method

Selects the corner of the pivot table, in addition to all previously selected elements.

Syntax

SpssPivotTable.SelectCorner()

Related Topics

SelectAllFootnotes Method (Python)
SelectCaption Method (Python)
SelectTable Method (Python)
SelectTableBody Method (Python)
SelectTitle Method (Python)


SelectTable Method (Python)

SelectTable method,SelectTable method,SelectTable method
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SelectTable method,SelectTable method,SelectTable method

Selects all the elements of a pivot table for modification.

Syntax

SpssPivotTable.SelectTable()

Related Topics

SelectAllFootnotes Method (Python)
SelectCaption Method (Python)
SelectCorner Method (Python)
SelectTableBody Method (Python)
SelectTitle Method (Python)


SelectTableBody Method (Python)

SelectTableBody method,SelectTableBody method,SelectTableBody method
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SelectTableBody method,SelectTableBody method,SelectTableBody method

Selects the body of the pivot table (labels and data cells) for modification.

Syntax

SpssPivotTable.SelectTableBody()

Related Topics

SelectAllFootnotes Method (Python)
SelectCaption Method (Python)
SelectCorner Method (Python)
SelectTable Method (Python)
SelectTitle Method (Python)


SelectTitle Method (Python)

SelectTitle method,SelectTitle method,SelectTitle method
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SelectTitle method,SelectTitle method,SelectTitle method

Selects the title of the pivot table for modification.

Syntax

SpssPivotTable.SelectTitle()

Related Topics

SelectAllFootnotes Method (Python)
SelectCaption Method (Python)
SelectCorner Method (Python)
SelectTable Method (Python)
SelectTableBody Method (Python)


SetBackgroundColor Method (Python)

SetBackgroundColor method,SetBackgroundColor method,SetBackgroundColor method
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SetBackgroundColor method,SetBackgroundColor method,SetBackgroundColor method
areas,areas,areas
areas,areas,areas
background color,background color,background color
frames,frames,frames
frames,frames,frames
background color,background color,background color

Sets the background color of the selected element(s) in the current pivot table.

Syntax

SpssPivotTable.SetBackgroundColor(color)

Parameters

color Integer representation of the color

For information on setting color values, see Setting Color Values.


SetBottomMargin Method (Python)

SetBottomMargin method,SetBottomMargin method,SetBottomMargin method
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SetBottomMargin method,SetBottomMargin method,SetBottomMargin method

Sets the bottom margin of the selected cells in the current pivot table.

Syntax

SpssPivotTable.SetBottomMargin(margin)

Parameters

margin An integer. The unit is the point (1/72 inch).

Related Topics

GetWidowOrphanLines Method (Python)
SetLeftMargin Method (Python)
SetRightMargin Method (Python)
SetTopMargin Method (Python)
SetWidowOrphanLines Method (Python)


SetCaptionText Method (Python)

SetCaptionText method,SetCaptionText method,SetCaptionText method
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SetCaptionText method,SetCaptionText method,SetCaptionText method

Sets the caption text for the current table.

Syntax

SpssPivotTable.SetCaptionText(string)

Parameters

string Caption text

Related Topics

GetCaptionText Method (Python)


SetCornerText Method (Python)

SetCornerText method,SetCornerText method,SetCornerText method
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SetCornerText method,SetCornerText method,SetCornerText method

Sets the corner text when the row dimension labels are displayed nested.

Syntax

SpssPivotTable.SetCornerText(string)

Parameters

string Corner text


SetDataCellWidths Method (Python)

DataCellWidths method,DataCellWidths method,DataCellWidths method
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
DataCellWidths method,DataCellWidths method,DataCellWidths method

Sets the width of all data cells of the current table.

Syntax

SpssPivotTable.SetDataCellWidths(width)

Parameters

width An integer. The unit is the point (1/72 inch).

Related Topics

Autofit Method (Python)
ReSizeColumn Method (Python)
GetColumnLabelWidthAt Method (Python)
GetRowLabelWidthAt Method (Python)
GetTextWidthAt Method (Python)
SetColumnLabelWidthAt Method (Python)
SetRowLabelWidthAt Method (Python)


SetFootnoteMarkers Method (Python)

SetFootnoteMarkers method,SetFootnoteMarkers method,SetFootnoteMarkers method
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SetFootnoteMarkers method,SetFootnoteMarkers method,SetFootnoteMarkers method

Sets the style of footnote markers for the entire table.

Syntax

SpssPivotTable.SetFootnoteMarkers(type)

Parameters

Set the value of type to one of the following:

SpssClient.SpssFootnoteMarkerTypes.SpssFtSuperscript | Superscript
SpssClient.SpssFootnoteMarkerTypes.SpssFtSubscript | Subscript
SpssClient.SpssFootnoteMarkerTypes.SpssFtAlphabetic | Alphabetic
SpssClient.SpssFootnoteMarkerTypes.SpssFtNumeric | Numeric


SetForegroundColor Method (Python)

SetForegroundColor method,SetForegroundColor method,SetForegroundColor method
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SetForegroundColor method,SetForegroundColor method,SetForegroundColor method

This method is deprecated in release 17.0. Use the SetTextColor method instead.


SetHAlign Method (Python)

SetHAlign method,SetHAlign method,SetHAlign method
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SetHAlign method,SetHAlign method,SetHAlign method
alignment,alignment,alignment
cells,cells,cells
alignment,alignment,alignment

Sets the horizontal alignment of the selected elements in the current table.

Syntax

SpssPivotTable.SetHAlign(alignment)

Parameters

Set the value of alignment to one of the following:

SpssClient.SpssHAlignTypes.SpssHAlLeft | Left
SpssClient.SpssHAlignTypes.SpssHAlRight | Right
SpssClient.SpssHAlignTypes.SpssHAlCenter | Center
SpssClient.SpssHAlignTypes.SpssHAlMixed | Mixed
SpssClient.SpssHAlignTypes.SpssHAlDecimal | Decimal


SetHDecDigits Method (Python)

SetHDecDigits method,SetHDecDigits method,SetHDecDigits method
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SetHDecDigits method,SetHDecDigits method,SetHDecDigits method
alignment,alignment,alignment
decimal,decimal,decimal
alignment,alignment,alignment

Sets the number of decimal digits for the selected cells of the pivot table.

Syntax

SpssPivotTable.SetHDecDigits(number)

Parameters

number Number of decimal digits


SetLeftMargin Method (Python)

SetLeftMargin method,SetLeftMargin method,SetLeftMargin method
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SetLeftMargin method,SetLeftMargin method,SetLeftMargin method

Sets the left margin of the selected cells in the pivot table.

Syntax

SpssPivotTable.SetLeftMargin(margin)

Parameters

margin An integer. The unit is the point (1/72 inch).

Related Topics

GetWidowOrphanLines Method (Python)
SetBottomMargin Method (Python)
SetRightMargin Method (Python)
SetTopMargin Method (Python)
SetWidowOrphanLines Method (Python)


SetRightMargin Method (Python)

SetRightMargin method,SetRightMargin method,SetRightMargin method
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SetRightMargin method,SetRightMargin method,SetRightMargin method

Sets the right margin for the selected cells in the pivot table.

Syntax

SpssPivotTable.SetRightMargin(margin)

Parameters

margin An integer. The unit is the point (1/72 inch).

Related Topics

GetWidowOrphanLines Method (Python)
SetBottomMargin Method (Python)
SetLeftMargin Method (Python)
SetTopMargin Method (Python)
SetWidowOrphanLines Method (Python)


SetRotateColumnLabels Method (Python)

SetRotateColumnLabels method,SetRotateColumnLabels method,SetRotateColumnLabels method
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SetRotateColumnLabels method,SetRotateColumnLabels method,SetRotateColumnLabels method

Rotates the category labels closest to the data (that is, categories of the column dimension with the largest index).

Syntax

SpssPivotTable.SetRotateColumnLabels(boolean)

Parameters

True | The column labels closest to the data are displayed vertically
False | The column labels closest to the data are displayed horizontally

Related Topics

GetRotateColumnLabels Method (Python)
GetRotateRowLabels Method (Python)
SetRotateRowLabels Method (Python)


SetRotateRowLabels Method (Python)

SetRotateRowLabels method,SetRotateRowLabels method,SetRotateRowLabels method
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SetRotateRowLabels method,SetRotateRowLabels method,SetRotateRowLabels method

Rotates the labels of all but the last row dimension (that is, the row dimension with the largest index).

Syntax

SpssPivotTable.SetRotateRowLabels(boolean)

Parameters

True | The outer row labels are displayed vertically
False | The outer row labels are displayed horizontally

Related Topics

GetRotateColumnLabels Method (Python)
GetRotateRowLabels Method (Python)
SetRotateColumnLabels Method (Python)


SetRowsToDisplayRowCount Method (Python)

SetRowsToDisplayRowCount method,SetRowsToDisplayRowCount method,SetRowsToDisplayRowCount method
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SetRowsToDisplayRowCount method,SetRowsToDisplayRowCount method,SetRowsToDisplayRowCount method

Sets the number of rows to be displayed at a time for the current pivot table. Note that you must also call the DisplayTableByRows method with an argument of True to specify that the table is to be displayed a fixed number of rows at a time.

Syntax

SpssPivotTable.SetRowsToDisplayRowCount(number)

Parameters

number An integer specifying the number of rows to display at a time.

Related Topics

DisplayTableByRows Method (Python)
IsDisplayTableByRows Method (Python)
NavigateToFirstRow Method (Python)
NavigateToLastRow Method (Python)
NavigateToNextRows Method (Python)
NavigateToPreviousRows Method (Python)
SetRowsToDisplayTolerance Method (Python)


SetRowsToDisplayTolerance Method (Python)

SetRowsToDisplayTolerance method,SetRowsToDisplayTolerance method,SetRowsToDisplayTolerance method
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SetRowsToDisplayTolerance method,SetRowsToDisplayTolerance method,SetRowsToDisplayTolerance method

Sets the widow/orphan tolerance to be used when displaying the table a fixed number of rows at a time (as set by the DisplayTableByRows method). The default is 0.

• If a break between blocks of rows leaves widow rows equal to or less than the specified tolerance, then the break point is shifted up in the table to display those rows in the next block.

• If a break between blocks of rows leaves orphan rows equal to or less than the specified tolerance, then the break point is shifted down in the table to display those rows in the previous block.

• If a break between blocks of rows leaves both widow and orphan rows equal to or less than the specified tolerance, then the break point is shifted up in the table to display the widow rows in the next block.

Syntax

SpssPivotTable.SetRowsToDisplayTolerance(number)

Parameters

number An integer specifying the widow/orphan tolerance.

Related Topics

DisplayTableByRows Method (Python)
IsDisplayTableByRows Method (Python)
NavigateToFirstRow Method (Python)
NavigateToLastRow Method (Python)
NavigateToNextRows Method (Python)
NavigateToPreviousRows Method (Python)
SetRowsToDisplayRowCount Method (Python)


SetTableLook Method (Python)

SetTableLook method,SetTableLook method,SetTableLook method
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SetTableLook method,SetTableLook method,SetTableLook method

Applies a predefined table look.

Syntax

SpssPivotTable.SetTableLook(filename)

Parameters

filename Path to the TableLook (.stt) file


SetTextColor Method (Python)

SetTextColor method,SetTextColor method,SetTextColor method
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SetTextColor method,SetTextColor method,SetTextColor method

Sets the color of the text in the selected cells of the pivot table.

Syntax

SpssPivotTable.SetTextColor(color)

Parameters

color Integer representation of the color

For information on setting color values, see Setting Color Values.


SetTextFont Method (Python)

SetTextFont method,SetTextFont method,SetTextFont method
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SetTextFont method,SetTextFont method,SetTextFont method

Sets the font of the text in the selected cells of the pivot table.

Syntax

SpssPivotTable.SetTextFont(fontname)

Parameters

fontname Name of the font family, as a string. Available fonts are accessed from Format>Table Properties in the pivot table editor.


SetTextHidden Method (Python)

SetTextHidden method,SetTextHidden method,SetTextHidden method
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SetTextHidden method,SetTextHidden method,SetTextHidden method

Sets the hidden effect of the text in the selected cells of the pivot table.

Syntax

SpssPivotTable.SetTextHidden(boolean)

Parameters

True | Hidden
False | Not hidden


SetTextSize Method (Python)

SetTextSize method,SetTextSize method,SetTextSize method
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SetTextSize method,SetTextSize method,SetTextSize method

Sets the font size of the text in the selected cells of the pivot table.

Syntax

SpssPivotTable.SetTextSize(size)

Parameters

size Size in points (integer)


SetTextStyle Method (Python)

SetTextStyle method,SetTextStyle method,SetTextStyle method
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SetTextStyle method,SetTextStyle method,SetTextStyle method

Sets the bold or italic style of the text in the selected cells of the pivot table.

Syntax

SpssPivotTable.SetTextStyle(style)

Parameters

Set the value of style to one of the following:

SpssClient.SpssTextStyleTypes.SpssTSRegular | Regular
SpssClient.SpssTextStyleTypes.SpssTSItalic | Italic
SpssClient.SpssTextStyleTypes.SpssTSBold | Bold
SpssClient.SpssTextStyleTypes.SpssTSBoldItalic | Bold Italic


SetTextUnderlined Method (Python)

SetTextUnderlined method,SetTextUnderlined method,SetTextUnderlined method
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SetTextUnderlined method,SetTextUnderlined method,SetTextUnderlined method

Sets the underlined effect of the text in the selected cells of the pivot table.

Syntax

SpssPivotTable.SetTextUnderlined(boolean)

Parameters

True | Underlined
False | Not underlined


SetTitleText Method (Python)

SetTitleText method,SetTitleText method,SetTitleText method
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SetTitleText method,SetTitleText method,SetTitleText method

Sets the text of the title for the pivot table.

Syntax

SpssPivotTable.SetTitleText(title)

Parameters

title Text of the title

Related Topics

GetTitleText Method (Python)


SetTopMargin Method (Python)

SetTopMargin method,SetTopMargin method,SetTopMargin method
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SetTopMargin method,SetTopMargin method,SetTopMargin method

Sets the top margin of the selected cells in the pivot table.

Syntax

SpssPivotTable.SetTopMargin(margin)

Parameters

margin An integer. The unit is the point (1/72 inch).

Related Topics

GetWidowOrphanLines Method (Python)
SetBottomMargin Method (Python)
SetLeftMargin Method (Python)
SetRightMargin Method (Python)
SetWidowOrphanLines Method (Python)


SetUpdateScreen Method (Python)

SetUpdateScreen method,SetUpdateScreen method,SetUpdateScreen method
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SetUpdateScreen method,SetUpdateScreen method,SetUpdateScreen method

Sets whether changes in the pivot table are refreshed immediately. The argument is Boolean--True if changes are refreshed immediately, False otherwise.

• By default, changes are refreshed immediately.

Syntax

SpssPivotTable.SetUpdateScreen(boolean)

Example

This example assumes that PivotTable is an SpssPivotTable object, and stops refreshing while looping through the row labels and making changes.

PivotTable.SetUpdateScreen(False)
rowlabels = PivotTable.RowLabelArray()
for i in range(rowlabels.GetNumRows()):
   for j in range(rowlabels.GetNumColumns()):
      if rowlabels.GetValueAt(i,j)=="Female":
         rowlabels.SetValueAt(i,j,"Women")
PivotTable.SetUpdateScreen(True)

Note: Setting the immediate refresh off (parameter set to False) prevents flashing when you make changes to individual cells in a loop (in internal scripting), but it may also prevent you assessing the results immediately. A better way is to avoid making changes cell by cell but select the cells and change the selection using a method on the pivot table object. This is also a faster way.

Related Topics

GetUpdateScreen Method (Python)


SetVAlign Method (Python)

SetVAlign method,SetVAlign method,SetVAlign method
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SetVAlign method,SetVAlign method,SetVAlign method
alignment,alignment,alignment
vertical,vertical,vertical
alignment,alignment,alignment

Sets or returns the vertical alignment of the text in the selected cells of the pivot table.

Syntax

SpssPivotTable.SetVAlign(alignment)

Parameters

Set the value of alignment to one of the following:

SpssClient.SpssVAlignTypes.SpssVAlTop | Top
SpssClient.SpssVAlignTypes.SpssVAlBottom | Bottom
SpssClient.SpssVAlignTypes.SpssVAlCenter | Center


SetWidowOrphanLines Method (Python)

SetWidoworphanLines method,SetWidoworphanLines method,SetWidoworphanLines method
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SetWidoworphanLines method,SetWidoworphanLines method,SetWidoworphanLines method

Sets the number of allowable widow/orphan lines when pivot tables are printed.

• Widow lines are the last few lines of a paragraph printed at the top of the next page; orphan lines are the first few lines of a paragraph printed at the bottom of the previous page.

Syntax

SpssPivotTable.SetWidowOrphanLines(number)

Parameters

number Line limit (integer). The valid range is 1 to 100.

Related Topics

GetWidowOrphanLines Method (Python)
SetBottomMargin Method (Python)
SetLeftMargin Method (Python)
SetRightMargin Method (Python)
SetTopMargin Method (Python)


ShowAll Method (Python)

ShowAll method,ShowAll method,ShowAll method
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
ShowAll method,ShowAll method,ShowAll method

Shows all labels and data.

Syntax

SpssPivotTable.ShowAll()

Related Topics

ShowAllFootnotes Method (Python)
ShowCaption Method (Python)
ShowFootnote Method (Python)
ShowTitle Method (Python)
ShowFootnotesAt Method (Python)
ShowAllLabelsAndDataInDimensionAt Method (Python)
ShowAllLabelsInDimensionAt Method (Python)
ShowFootnotesAt Method (Python)
ShowHiddenDimensionLabelAt Method (Python)
ShowFootnotesAt Method (Python)


ShowAllFootnotes Method (Python)

ShowAllFootnote method,ShowAllFootnote method,ShowAllFootnote method
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
ShowAllFootnote method,ShowAllFootnote method,ShowAllFootnote method

Shows all footnotes associated with the pivot table.

Syntax

SpssPivotTable.ShowAllFootnotes()

Related Topics

ShowAll Method (Python)
ShowCaption Method (Python)
ShowFootnote Method (Python)
ShowTitle Method (Python)
ShowFootnotesAt Method (Python)
ShowAllLabelsAndDataInDimensionAt Method (Python)
ShowAllLabelsInDimensionAt Method (Python)
ShowFootnotesAt Method (Python)
ShowHiddenDimensionLabelAt Method (Python)
ShowFootnotesAt Method (Python)


ShowCaption Method (Python)

ShowCaption method,ShowCaption method,ShowCaption method
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
ShowCaption method,ShowCaption method,ShowCaption method

Shows the caption of the pivot table.

Syntax

SpssPivotTable.ShowCaption()

Related Topics

ShowAll Method (Python)
ShowAllFootnotes Method (Python)
ShowFootnote Method (Python)
ShowTitle Method (Python)
ShowFootnotesAt Method (Python)
ShowAllLabelsAndDataInDimensionAt Method (Python)
ShowAllLabelsInDimensionAt Method (Python)
ShowFootnotesAt Method (Python)
ShowHiddenDimensionLabelAt Method (Python)
ShowFootnotesAt Method (Python)


ShowFootnote Method (Python)

ShowFootnote method,ShowFootnote method,ShowFootnote method
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
ShowFootnote method,ShowFootnote method,ShowFootnote method

Shows the hidden footnote(s) referenced by the selected label(s), data cell(s) or title.

• Ignored if no hidden footnote is referenced.

Syntax

SpssPivotTable.ShowFootnote()

Related Topics

ShowAll Method (Python)
ShowAllFootnotes Method (Python)
ShowCaption Method (Python)
ShowTitle Method (Python)
ShowFootnotesAt Method (Python)
ShowAllLabelsAndDataInDimensionAt Method (Python)
ShowAllLabelsInDimensionAt Method (Python)
ShowFootnotesAt Method (Python)
ShowHiddenDimensionLabelAt Method (Python)
ShowFootnotesAt Method (Python)


ShowTitle Method (Python)

ShowTitle method,ShowTitle method,ShowTitle method
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
ShowTitle method,ShowTitle method,ShowTitle method

Shows the title of the pivot table.

Syntax

SpssPivotTable.ShowTitle()

Related Topics

ShowAll Method (Python)
ShowAllFootnotes Method (Python)
ShowCaption Method (Python)
ShowFootnote Method (Python)
ShowFootnotesAt Method (Python)
ShowAllLabelsAndDataInDimensionAt Method (Python)
ShowAllLabelsInDimensionAt Method (Python)
ShowFootnotesAt Method (Python)
ShowHiddenDimensionLabelAt Method (Python)
ShowFootnotesAt Method (Python)


Ungroup Method (Python)

Ungroup method,Ungroup method,Ungroup method
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
SpssPivotTable class,SpssPivotTable class,SpssPivotTable class
Ungroup method,Ungroup method,Ungroup method

Deletes selected group labels and ungroups the category or group labels in the deleted group(s).

• If all group labels on one level are removed, labels on the lower levels are promoted one level. (For column labels, the row index increases by one; for row labels, the column index increases by one.)

• Selection must be group labels.

Syntax

SpssPivotTable.Ungroup()

Related Topics

Group Method (Python)


SpssDataCells Class (Python)

SpssDataCells class,SpssDataCells class,SpssDataCells class

The SpssDataCells object provides access to the data cells of a pivot table. In most pivot tables, the data cells contain the results of the statistical analysis. You need to use the SpssDataCells object if you want to highlight significant values in the output (for example, making bold all correlation coefficients that are greater than a specified value) or to retrieve specific statistics from the output (for example, the means and standard deviations of each group or variable).

The SpssDataCells object represents a 2-dimensional array of the data cells you can view in a pivot table. If there are no layer dimensions, all of the cells will be accessible; otherwise, the table must be pivoted in order to fully access the data currently in layer dimensions.

The data cells array has the same number of rows as the row labels array and the same number of columns as the column labels array. That is to say, row indexes for the row labels and column indexes for the column labels respectively correspond to the row and column indexes for the data cells.

You get an SpssDataCells object from the DataCellArray method of an SpssPivotTable object, as in:

SpssDataCells = SpssPivotTable.DataCellArray()

Example: Modifying Specific Cells

This example assumes that PivotTable is an SpssPivotTable object, and sets the background color to red for all data cells containing a value below 0.01.

DataCells = PivotTable.DataCellArray()
for i in range(DataCells.GetNumRows()):
   for j in range(DataCells.GetNumColumns()):
      try:
         val = float(DataCells.GetValueAt(i,j))
         if  val < 0.01:
            DataCells.SetBackgroundColorAt(i,j,255)
      except:
         pass

• The value returned from GetValueAt is a unicode string. If the value is a representation of a numeric value, it is converted to a float, otherwise an exception is raised and control passes to the except clause. Since the except clause only contains a pass statement, execution continues.


GetBackgroundColorAt Method (Python)

GetBackgroundColorAt method,GetBackgroundColorAt method,GetBackgroundColorAt method
SpssDataCells class,SpssDataCells class,SpssDataCells class
SpssDataCells class,SpssDataCells class,SpssDataCells class
GetBackgroundColorAt method,GetBackgroundColorAt method,GetBackgroundColorAt method

Returns the background color of the specified data cell.

Syntax

SpssDataCells.GetBackgroundColorAt(row,column)

Parameters

row | Row index
column | Column index

Returns

The color is returned as an integer. See the topic Setting Color Values (Python) for more information.

Related Topics

GetForegroundColorAt Method (Python)
GetTextColorAt Method (Python)
SetBackgroundColorAt Method (Python)
SetForegroundColorAt Method (Python)
SetTextColorAt Method (Python)


GetBottomMarginAt Method (Python)

GetBottomMarginAt method,GetBottomMarginAt method,GetBottomMarginAt method
SpssDataCells class,SpssDataCells class,SpssDataCells class
SpssDataCells class,SpssDataCells class,SpssDataCells class
GetBottomMarginAt method,GetBottomMarginAt method,GetBottomMarginAt method

Returns the bottom margin of the specified data cell. The unit is the point (1/72 inch).

Syntax

SpssDataCells.GetBottomMarginAt(row,column)

Parameters

row | Row index
column | Column index

Related Topics

GetLeftMarginAt Method (Python)
GetRightMarginAt Method (Python)
GetTopMarginAt Method (Python)
SetBottomMarginAt Method (Python)
SetLeftMarginAt Method (Python)
SetRightMarginAt Method (Python)
SetTopMarginAt Method (Python)


GetForegroundColorAt Method (Python)

GetForegroundColorAt method,GetForegroundColorAt method,GetForegroundColorAt method
SpssDataCells class,SpssDataCells class,SpssDataCells class
SpssDataCells class,SpssDataCells class,SpssDataCells class
GetForegroundColorAt method,GetForegroundColorAt method,GetForegroundColorAt method

This method is deprecated in release 17.0. Use the GetTextColorAt method instead.

Related Topics

GetBackgroundColorAt Method (Python)
GetTextColorAt Method (Python)
SetBackgroundColorAt Method (Python)
SetForegroundColorAt Method (Python)
SetTextColorAt Method (Python)


GetHAlignAt Method (Python)

GetHAlignAt method,GetHAlignAt method,GetHAlignAt method
SpssDataCells class,SpssDataCells class,SpssDataCells class
SpssDataCells class,SpssDataCells class,SpssDataCells class
GetHAlignAt method,GetHAlignAt method,GetHAlignAt method
alignment,alignment,alignment
cells,cells,cells
alignment,alignment,alignment
labels,labels,labels
alignment,alignment,alignment

Returns the horizontal alignment of the specified data cell.

Syntax

SpssDataCells.GetHAlignAt(row,column)

Parameters

row | Row index
column | Column index

Returns

SpssClient.SpssHAlignTypes.SpssHAlLeft | Left
SpssClient.SpssHAlignTypes.SpssHAlRight | Right
SpssClient.SpssHAlignTypes.SpssHAlCenter | Center
SpssClient.SpssHAlignTypes.SpssHAlMixed | Mixed
SpssClient.SpssHAlignTypes.SpssHAlDecimal | Decimal

Related Topics

GetHDecDigitsAt Method (Python)
GetVAlignAt Method (Python)
SetHAlignAt Method (Python)
SetHDecDigitsAt Method (Python)
SetVAlignAt Method (Python)


GetHDecDigitsAt Method (Python)

GetHDecDigitsAt method,GetHDecDigitsAt method,GetHDecDigitsAt method
SpssDataCells class,SpssDataCells class,SpssDataCells class
SpssDataCells class,SpssDataCells class,SpssDataCells class
GetHDecDigitsAt method,GetHDecDigitsAt method,GetHDecDigitsAt method
alignment,alignment,alignment
decimal,decimal,decimal
alignment,alignment,alignment

Returns the number of decimal digits allowed in decimal alignment for the specified data cell.

Syntax

SpssDataCells.GetHDecDigitsAt(row,column)

Parameters

row | Row index
column | Column index

Related Topics

GetHAlignAt Method (Python)
GetVAlignAt Method (Python)
SetHAlignAt Method (Python)
SetHDecDigitsAt Method (Python)
SetVAlignAt Method (Python)


GetLeftMarginAt Method (Python)

GetLeftMarginAt method,GetLeftMarginAt method,GetLeftMarginAt method
SpssDataCells class,SpssDataCells class,SpssDataCells class
SpssDataCells class,SpssDataCells class,SpssDataCells class
GetLeftMarginAt method,GetLeftMarginAt method,GetLeftMarginAt method

Returns the left margin of the specified data cell. The unit is the point (1/72 inch).

Syntax

SpssDataCells.GetLeftMarginAt(row,column)

Parameters

row | Row index
column | Column index

Related Topics

GetBottomMarginAt Method (Python)
GetRightMarginAt Method (Python)
GetTopMarginAt Method (Python)
SetBottomMarginAt Method (Python)
SetLeftMarginAt Method (Python)
SetRightMarginAt Method (Python)
SetTopMarginAt Method (Python)


GetNumColumns Method (Python)

GetNumColumns method,GetNumColumns method,GetNumColumns method
SpssDataCells class,SpssDataCells class,SpssDataCells class
SpssDataCells class,SpssDataCells class,SpssDataCells class
GetNumColumns method,GetNumColumns method,GetNumColumns method

Returns the number of columns in the SpssDataCells object.

Syntax

SpssDataCells.GetNumColumns()

Related Topics

GetNumRows Method (Python)


GetNumericFormatAt method (Python)

GetNumericFormatAt method,GetNumericFormatAt method,GetNumericFormatAt method
SpssDataCells class,SpssDataCells class,SpssDataCells class
SpssDataCells class,SpssDataCells class,SpssDataCells class
GetNumericFormatAt method,GetNumericFormatAt method,GetNumericFormatAt method

Returns the display format for the numeric value in the specified data cell.

SpssDataCells.GetNumericFormatAt(row,column)

Parameters

row | Row index
column | Column index

Return Value

The string description of the format. For a listing of the format types, see String Description of Numeric Formats.

Note: To obtain detailed format information for custom currency formats use the GetNumericFormatAtEx method.

Related Topics

GetNumericFormatAtEx method (Python)
SetNumericFormatAt method (Python)
SetNumericFormatAtWithDecimal method (Python)


GetNumericFormatAtEx method (Python)

GetNumericFormatAtEx method,GetNumericFormatAtEx method,GetNumericFormatAtEx method
SpssDataCells class,SpssDataCells class,SpssDataCells class
SpssDataCells class,SpssDataCells class,SpssDataCells class
GetNumericFormatAtEx method,GetNumericFormatAtEx method,GetNumericFormatAtEx method

Returns an SpssNumericFormat object from which you can obtain detailed formatting information for a specified data cell, such as the prefix, separator, and suffix for a cell with a custom currency format.

SpssNumericFormat=SpssDataCells.GetNumericFormatAtEx(row,column)

Parameters

row | Row index
column | Column index

The SpssNumericFormat object supports two methods. GetFormatListSize indicates the number of format items available for retrieval--3 if the current cell has a custom currency format, and 1 otherwise. GetFormatStringAt retrieves a specified format item. It takes an integer (zero based) that specifies the index of the format item to retrieve. The following table describes the values retrieved by GetFormatStringAt.

GetFormatStringAt(0) | If the list size is 3 then the returned value is the prefix of the value in the associated data cell; otherwise the returned value is the same as that returned from the GetNumericFormatAt method.
GetFormatStringAt(1) | Returns the separator character of the format for the value in the associated data cell. Only available when the list size is greater than 1.
GetFormatStringAt(2) | Returns the suffix of the value in the associated data cell. Only available when the list size is greater than 2.

Related Topics

GetNumericFormatAt method (Python)
SetNumericFormatAt method (Python)
SetNumericFormatAtWithDecimal method (Python)


GetNumRows Method (Python)

GetNumRows method,GetNumRows method,GetNumRows method
SpssDataCells class,SpssDataCells class,SpssDataCells class
SpssDataCells class,SpssDataCells class,SpssDataCells class
GetNumRows method,GetNumRows method,GetNumRows method

Returns the number of rows in the SpssDataCells object.

Syntax

SpssDataCells.GetNumRows()

Related Topics

GetNumColumns Method (Python)


GetReferredFootnotesAt Method (Python)

GetReferredFootnotesAt method,GetReferredFootnotesAt method,GetReferredFootnotesAt method
SpssDataCells class,SpssDataCells class,SpssDataCells class
SpssDataCells class,SpssDataCells class,SpssDataCells class
GetReferredFootnotesAt method,GetReferredFootnotesAt method,GetReferredFootnotesAt method

Returns an SpssFootnotes object, which allows access to all the footnotes referred to by the specified data cell.

• The footnotes array is a subset of the Footnotes object you can get from the pivot table. You can manipulate the subset using the same properties and methods, but the index of a footnote in this array is in no way related to the index of the same footnote when accessed from the pivot table.

Syntax

SpssFootnotes=SpssDataCells.GetReferredFootnotesAt(row,column)

Parameters

row | Row index
column | Column index


GetRightMarginAt Method (Python)

GetRightMarginAt method,GetRightMarginAt method,GetRightMarginAt method
SpssDataCells class,SpssDataCells class,SpssDataCells class
SpssDataCells class,SpssDataCells class,SpssDataCells class
GetRightMarginAt method,GetRightMarginAt method,GetRightMarginAt method

Returns the right margin of the specified data cell. The unit is the point (1/72 inch).

Syntax

SpssDataCells.GetRightMarginAt(row,column)

Parameters

row | Row index
column | Column index

Related Topics

GetBottomMarginAt Method (Python)
GetLeftMarginAt Method (Python)
GetTopMarginAt Method (Python)
SetBottomMarginAt Method (Python)
SetLeftMarginAt Method (Python)
SetRightMarginAt Method (Python)
SetTopMarginAt Method (Python)


GetTextColorAt Method (Python)

GetTextColorAt method,GetTextColorAt method,GetTextColorAt method
SpssDataCells class,SpssDataCells class,SpssDataCells class
SpssDataCells class,SpssDataCells class,SpssDataCells class
GetTextColorAt method,GetTextColorAt method,GetTextColorAt method

Returns the color of the text in the specified data cell.

Syntax

SpssDataCells.GetTextColorAt(row,column)

Parameters

row | Row index
column | Column index

Returns

The color is returned as an integer. See the topic Setting Color Values (Python) for more information.

Related Topics

GetBackgroundColorAt Method (Python)
GetForegroundColorAt Method (Python)
SetBackgroundColorAt Method (Python)
SetForegroundColorAt Method (Python)
SetTextColorAt Method (Python)
GetTextFontAt Method (Python)
GetTextHiddenAt Method (Python)
GetTextSizeAt Method (Python)
GetTextStyleAt Method (Python)
GetTextUnderlinedAt Method (Python)
SetTextFontAt Method (Python)
SetTextHiddenAt Method (Python)
SetTextSizeAt Method (Python)
SetTextStyleAt Method (Python)
SetTextUnderlinedAt Method (Python)


GetTextFontAt Method (Python)

GetTextFontAt method,GetTextFontAt method,GetTextFontAt method
SpssDataCells class,SpssDataCells class,SpssDataCells class
SpssDataCells class,SpssDataCells class,SpssDataCells class
GetTextFontAt method,GetTextFontAt method,GetTextFontAt method

Returns the font of the text in the specified data cell, as a string.

Syntax

SpssDataCells.GetTextFontAt(row,column)

Parameters

row | Row index
column | Column index

Related Topics

GetTextColorAt Method (Python)
GetTextHiddenAt Method (Python)
GetTextSizeAt Method (Python)
GetTextStyleAt Method (Python)
GetTextUnderlinedAt Method (Python)
SetTextColorAt Method (Python)
SetTextFontAt Method (Python)
SetTextHiddenAt Method (Python)
SetTextSizeAt Method (Python)
SetTextStyleAt Method (Python)
SetTextUnderlinedAt Method (Python)


GetTextHiddenAt Method (Python)

GetTextHiddenAt method,GetTextHiddenAt method,GetTextHiddenAt method
SpssDataCells class,SpssDataCells class,SpssDataCells class
SpssDataCells class,SpssDataCells class,SpssDataCells class
GetTextHiddenAt method,GetTextHiddenAt method,GetTextHiddenAt method

Returns the hidden effect of the text in the specified data cell. The result is Boolean.

Syntax

SpssDataCells.GetTextHiddenAt(row,column)

Parameters

row | Row index
column | Column index

Returns

True | Hidden
False | Not hidden

Related Topics

GetTextColorAt Method (Python)
GetTextFontAt Method (Python)
GetTextSizeAt Method (Python)
GetTextStyleAt Method (Python)
GetTextUnderlinedAt Method (Python)
SetTextColorAt Method (Python)
SetTextFontAt Method (Python)
SetTextHiddenAt Method (Python)
SetTextSizeAt Method (Python)
SetTextStyleAt Method (Python)
SetTextUnderlinedAt Method (Python)


GetTextSizeAt Method (Python)

GetTextSizeAt method,GetTextSizeAt method,GetTextSizeAt method
SpssDataCells class,SpssDataCells class,SpssDataCells class
SpssDataCells class,SpssDataCells class,SpssDataCells class
GetTextSizeAt method,GetTextSizeAt method,GetTextSizeAt method

Returns the font size of the text in the specified data cell.

Syntax

SpssDataCells.GetTextSizeAt(row,column)

Parameters

row | Row index
column | Column index

Related Topics

GetTextColorAt Method (Python)
GetTextFontAt Method (Python)
GetTextHiddenAt Method (Python)
GetTextStyleAt Method (Python)
GetTextUnderlinedAt Method (Python)
SetTextColorAt Method (Python)
SetTextFontAt Method (Python)
SetTextHiddenAt Method (Python)
SetTextSizeAt Method (Python)
SetTextStyleAt Method (Python)
SetTextUnderlinedAt Method (Python)


GetTextStyleAt Method (Python)

GetTextStyleAt method,GetTextStyleAt method,GetTextStyleAt method
SpssDataCells class,SpssDataCells class,SpssDataCells class
SpssDataCells class,SpssDataCells class,SpssDataCells class
GetTextStyleAt method,GetTextStyleAt method,GetTextStyleAt method

Returns the bold or italic style of the text in the specified data cell.

Syntax

SpssDataCells.GetTextStyleAt(row,column)

Parameters

row | Row index
column | Column index

Returns

SpssClient.SpssTextStyleTypes.SpssTSRegular | Regular
SpssClient.SpssTextStyleTypes.SpssTSItalic | Italic
SpssClient.SpssTextStyleTypes.SpssTSBold | Bold
SpssClient.SpssTextStyleTypes.SpssTSBoldItalic | Bold Italic

Related Topics

GetTextColorAt Method (Python)
GetTextFontAt Method (Python)
GetTextHiddenAt Method (Python)
GetTextSizeAt Method (Python)
GetTextUnderlinedAt Method (Python)
SetTextColorAt Method (Python)
SetTextFontAt Method (Python)
SetTextHiddenAt Method (Python)
SetTextSizeAt Method (Python)
SetTextStyleAt Method (Python)
SetTextUnderlinedAt Method (Python)


GetTextUnderlinedAt Method (Python)

GetTextUnderlinedAt method,GetTextUnderlinedAt method,GetTextUnderlinedAt method
SpssDataCells class,SpssDataCells class,SpssDataCells class
SpssDataCells class,SpssDataCells class,SpssDataCells class
GetTextUnderlinedAt method,GetTextUnderlinedAt method,GetTextUnderlinedAt method

Returns the underlined effect of the text in the specified data cell. The result is Boolean.

Syntax

SpssDataCells.GetTextUnderlinedAt(row,column)

Parameters

row | Row index
column | Column index

Returns

True | Underlined
False | Not underlined

Related Topics

GetTextColorAt Method (Python)
GetTextFontAt Method (Python)
GetTextHiddenAt Method (Python)
GetTextSizeAt Method (Python)
GetTextStyleAt Method (Python)
SetTextColorAt Method (Python)
SetTextFontAt Method (Python)
SetTextHiddenAt Method (Python)
SetTextSizeAt Method (Python)
SetTextStyleAt Method (Python)
SetTextUnderlinedAt Method (Python)


GetTopMarginAt Method (Python)

GetTopMarginAt method,GetTopMarginAt method,GetTopMarginAt method
SpssDataCells class,SpssDataCells class,SpssDataCells class
SpssDataCells class,SpssDataCells class,SpssDataCells class
GetTopMarginAt method,GetTopMarginAt method,GetTopMarginAt method

Returns the top margin of the specified data cell. The unit is the point (1/72 inch).

Syntax

SpssDataCells.GetTopMarginAt(row,column)

Parameters

row | Row index
column | Column index

Related Topics

GetBottomMarginAt Method (Python)
GetLeftMarginAt Method (Python)
GetRightMarginAt Method (Python)
SetBottomMarginAt Method (Python)
SetLeftMarginAt Method (Python)
SetRightMarginAt Method (Python)
SetTopMarginAt Method (Python)


GetVAlignAt Method (Python)

GetVAlignAt method,GetVAlignAt method,GetVAlignAt method
SpssDataCells class,SpssDataCells class,SpssDataCells class
SpssDataCells class,SpssDataCells class,SpssDataCells class
GetVAlignAt method,GetVAlignAt method,GetVAlignAt method
alignment,alignment,alignment
vertical,vertical,vertical
alignment,alignment,alignment

Returns the vertical alignment of the specified data cell.

Syntax

SpssDataCells.GetVAlignAt(row,column)

Parameters

row | Row index
column | Column index

Returns

SpssClient.SpssVAlignTypes.SpssVAlTop | Top
SpssClient.SpssVAlignTypes.SpssVAlBottom | Bottom
SpssClient.SpssVAlignTypes.SpssVAlCenter | Center

Related Topics

GetHAlignAt Method (Python)
GetHDecDigitsAt Method (Python)
SetHAlignAt Method (Python)
SetHDecDigitsAt Method (Python)
SetVAlignAt Method (Python)


GetUnformattedValueAt Method (Python)

GetUnformattedValueAt method,GetUnformattedValueAt method,GetUnformattedValueAt method
SpssDataCells class,SpssDataCells class,SpssDataCells class
SpssDataCells class,SpssDataCells class,SpssDataCells class
GetUnformattedValueAt method,GetUnformattedValueAt method,GetUnformattedValueAt method

Returns the unformatted value of the specified data cell, as a unicode string. This allows you to obtain all available digits for a cell that contains a numeric value.

Syntax

SpssDataCells.GetUnformattedValueAt(row,column)

Parameters

row | Row index
column | Column index

Related Topics

GetValueAt Method (Python)
SetValueAt Method (Python)


GetValueAt Method (Python)

GetValueAt method,GetValueAt method,GetValueAt method
SpssDataCells class,SpssDataCells class,SpssDataCells class
SpssDataCells class,SpssDataCells class,SpssDataCells class
GetValueAt method,GetValueAt method,GetValueAt method

Returns the value of the specified data cell, as a unicode string.

Syntax

SpssDataCells.GetValueAt(row,column)

Parameters

row | Row index
column | Column index

Related Topics

GetUnformattedValueAt Method (Python)
SetValueAt Method (Python)


HideFootnotesAt Method (Python)

HideFootnotesAt method,HideFootnotesAt method,HideFootnotesAt method
SpssDataCells class,SpssDataCells class,SpssDataCells class
SpssDataCells class,SpssDataCells class,SpssDataCells class
HideFootnotesAt method,HideFootnotesAt method,HideFootnotesAt method

Hides all footnotes referenced by the specified data cell.

Syntax

SpssDataCells.HideFootnotesAt(row,column)

Parameters

row | Row index
column | Column index

Related Topics

HideCaption Method (Python)
HideFootnote Method (Python)
HideTitle Method (Python)
HideLabel Method (Python)
HideAllLabelsInDimensionAt Method (Python)
HideFootnotesAt Method (Python)
HideLabelsInDimensionAt Method (Python)
HideLabelsWithDataAt Method (Python)
HideFootnotesAt Method (Python)


InsertNewFootnoteAt Method (Python)

InsertNewFootnoteAt method,InsertNewFootnoteAt method,InsertNewFootnoteAt method
SpssDataCells class,SpssDataCells class,SpssDataCells class
SpssDataCells class,SpssDataCells class,SpssDataCells class
InsertNewFootnoteAt method,InsertNewFootnoteAt method,InsertNewFootnoteAt method

Inserts a new footnote for the specified data cell.

Syntax

index=SpssDataCells.InsertNewFootnoteAt(row,column,string)

Parameters

row | Row index
column | Column index
string | New footnote text

Return Value

index Integer (to be used to insert the footnote in other cells if it is a shared footnote)


InsertSharedFootnoteAt Method (Python)

InsertSharedFootnoteAt method,InsertSharedFootnoteAt method,InsertSharedFootnoteAt method
SpssDataCells class,SpssDataCells class,SpssDataCells class
SpssDataCells class,SpssDataCells class,SpssDataCells class
InsertSharedFootnoteAt method,InsertSharedFootnoteAt method,InsertSharedFootnoteAt method

Inserts a shared footnote for the specified data cell.

Syntax

SpssDataCells.InsertSharedFootnoteAt(row,column,index)

Parameters

row | Row index.
column | Column index
index | Index of the footnote

The index is the value returned by the InsertNewFootnoteAt method, and corresponds to the footnote marker.


ReSizeColumn Method (Python)

ReSizeColumn method,ReSizeColumn method,ReSizeColumn method
SpssDataCells class,SpssDataCells class,SpssDataCells class
SpssDataCells class,SpssDataCells class,SpssDataCells class
ReSizeColumn method,ReSizeColumn method,ReSizeColumn method

Resets the width of the current column.

Syntax

SpssDataCells.ReSizeColumn(column,width)

Parameters

column | Column index
width | An integer. The unit is the point (1/72 inch).

Related Topics

Autofit Method (Python)
SetDataCellWidths Method (Python)
GetColumnLabelWidthAt Method (Python)
GetRowLabelWidthAt Method (Python)
GetTextWidthAt Method (Python)
SetColumnLabelWidthAt Method (Python)
SetRowLabelWidthAt Method (Python)


SelectCellAt Method (Python)

SelectCellAt method,SelectCellAt method,SelectCellAt method
SpssDataCells class,SpssDataCells class,SpssDataCells class
SpssDataCells class,SpssDataCells class,SpssDataCells class
SelectCellAt method,SelectCellAt method,SelectCellAt method

Selects the specified data cell, in addition to previously selected elements.

Syntax

SpssDataCells.SelectCellAt(row,column)

Parameters

row | Row index
column | Column index


SelectReferredFootnotesAt Method (Python)

SelectReferredFootnotesAt method,SelectReferredFootnotesAt method,SelectReferredFootnotesAt method
SpssDataCells class,SpssDataCells class,SpssDataCells class
SpssDataCells class,SpssDataCells class,SpssDataCells class
SelectReferredFootnotesAt method,SelectReferredFootnotesAt method,SelectReferredFootnotesAt method

Selects all the footnotes referenced by the specified data cell, in addition to previously selected elements.

Syntax

SpssDataCells.SelectReferredFootnotesAt(row,column)

Parameters

row | Row index
column | Column index


SetBackgroundColorAt Method (Python)

SetBackgroundColorAt method,SetBackgroundColorAt method,SetBackgroundColorAt method
SpssDataCells class,SpssDataCells class,SpssDataCells class
SpssDataCells class,SpssDataCells class,SpssDataCells class
SetBackgroundColorAt method,SetBackgroundColorAt method,SetBackgroundColorAt method

Sets the background color of the specified data cell.

Syntax

SpssDataCells.SetBackgroundColorAt(row,column,color)

Parameters

row | Row index
column | Column index
color | Integer representation of the color

For information on setting color values, see Setting Color Values.

Related Topics

GetBackgroundColorAt Method (Python)
GetForegroundColorAt Method (Python)
GetTextColorAt Method (Python)
SetForegroundColorAt Method (Python)
SetTextColorAt Method (Python)


SetBottomMarginAt Method (Python)

SetBottomMarginAt method,SetBottomMarginAt method,SetBottomMarginAt method
SpssDataCells class,SpssDataCells class,SpssDataCells class
SpssDataCells class,SpssDataCells class,SpssDataCells class
SetBottomMarginAt method,SetBottomMarginAt method,SetBottomMarginAt method

Sets the bottom margin of the specified data cell.

Syntax

SpssDataCells.SetBottomMarginAt(row,column,margin)

Parameters

row | Row index
column | Column index
margin | An integer. The unit is the point (1/72 inch).

Related Topics

GetBottomMarginAt Method (Python)
GetLeftMarginAt Method (Python)
GetRightMarginAt Method (Python)
GetTopMarginAt Method (Python)
SetLeftMarginAt Method (Python)
SetRightMarginAt Method (Python)
SetTopMarginAt Method (Python)


SetForegroundColorAt Method (Python)

SetForegroundColorAt method,SetForegroundColorAt method,SetForegroundColorAt method
SpssDataCells class,SpssDataCells class,SpssDataCells class
SpssDataCells class,SpssDataCells class,SpssDataCells class
SetForegroundColorAt method,SetForegroundColorAt method,SetForegroundColorAt method

This method is deprecated in release 17.0. Use the SetTextColorAt method instead.

Related Topics

GetBackgroundColorAt Method (Python)
GetForegroundColorAt Method (Python)
GetTextColorAt Method (Python)
SetBackgroundColorAt Method (Python)
SetTextColorAt Method (Python)


SetHAlignAt Method (Python)

SetHAlignAt method,SetHAlignAt method,SetHAlignAt method
SpssDataCells class,SpssDataCells class,SpssDataCells class
SpssDataCells class,SpssDataCells class,SpssDataCells class
SetHAlignAt method,SetHAlignAt method,SetHAlignAt method
alignment,alignment,alignment
cells,cells,cells
alignment,alignment,alignment
labels,labels,labels
alignment,alignment,alignment

Sets the horizontal alignment of the specified data cell.

Syntax

SpssDataCells.SetHAlignAt(row,column,alignment)

Parameters

row | Row index
column | Column index

Set the value of alignment to one of the following:

SpssClient.SpssHAlignTypes.SpssHAlLeft | Left
SpssClient.SpssHAlignTypes.SpssHAlRight | Right
SpssClient.SpssHAlignTypes.SpssHAlCenter | Center
SpssClient.SpssHAlignTypes.SpssHAlMixed | Mixed
SpssClient.SpssHAlignTypes.SpssHAlDecimal | Decimal

Related Topics

GetHAlignAt Method (Python)
GetHDecDigitsAt Method (Python)
GetVAlignAt Method (Python)
SetHDecDigitsAt Method (Python)
SetVAlignAt Method (Python)


SetHDecDigitsAt Method (Python)

SetHDecDigitsAt method,SetHDecDigitsAt method,SetHDecDigitsAt method
SpssDataCells class,SpssDataCells class,SpssDataCells class
SpssDataCells class,SpssDataCells class,SpssDataCells class
SetHDecDigitsAt method,SetHDecDigitsAt method,SetHDecDigitsAt method
alignment,alignment,alignment
decimal,decimal,decimal
alignment,alignment,alignment

Sets the number of decimal digits for the specified data cell.

Syntax

SpssDataCells.SetHDecDigitsAt(row,column,number)

Parameters

row | Row index
column | Column index
number | Number of decimal digits

Related Topics

GetHAlignAt Method (Python)
GetHDecDigitsAt Method (Python)
GetVAlignAt Method (Python)
SetHAlignAt Method (Python)
SetVAlignAt Method (Python)


SetLeftMarginAt Method (Python)

SetLeftMarginAt method,SetLeftMarginAt method,SetLeftMarginAt method
SpssDataCells class,SpssDataCells class,SpssDataCells class
SpssDataCells class,SpssDataCells class,SpssDataCells class
SetLeftMarginAt method,SetLeftMarginAt method,SetLeftMarginAt method

Sets the left margin of the specified data cell.

Syntax

SpssDataCells.SetLeftMarginAt(row,column,margin)

Parameters

row | Row index
column | Column index
margin | An integer. The unit is the point (1/72 inch).

Related Topics

GetBottomMarginAt Method (Python)
GetLeftMarginAt Method (Python)
GetRightMarginAt Method (Python)
GetTopMarginAt Method (Python)
SetBottomMarginAt Method (Python)
SetRightMarginAt Method (Python)
SetTopMarginAt Method (Python)


SetNumericFormatAt method (Python)

SetNumericFormatAt method,SetNumericFormatAt method,SetNumericFormatAt method
SpssDataCells class,SpssDataCells class,SpssDataCells class
SpssDataCells class,SpssDataCells class,SpssDataCells class
SetNumericFormatAt method,SetNumericFormatAt method,SetNumericFormatAt method

Sets the display format for the numeric value in the current cell.

SpssDataCells.SetNumericFormatAt(row,column,format)

Parameters

row | Row index
column | Column index
format | The string description of the format.

For a listing of the format types, see String Description of Numeric Formats.

Related Topics

GetNumericFormatAt method (Python)
GetNumericFormatAtEx method (Python)
SetNumericFormatAtWithDecimal method (Python)


SetNumericFormatAtWithDecimal method (Python)

SetNumericFormatAtWithDecimal method,SetNumericFormatAtWithDecimal method,SetNumericFormatAtWithDecimal method
SpssDataCells class,SpssDataCells class,SpssDataCells class
SpssDataCells class,SpssDataCells class,SpssDataCells class
SetNumericFormatAtWithDecimal method,SetNumericFormatAtWithDecimal method,SetNumericFormatAtWithDecimal method

Sets the display format for the numeric value in the current cell.

SpssDataCells.SetNumericFormatAtWithDecimal(row,column,format,decimal)

Parameters

row | Row index
column | Column index
format | The string description of the format.
decimal | Number of decimal places. The default is 0.

For a listing of the format types, see String Description of Numeric Formats.

Related Topics

GetNumericFormatAt method (Python)
GetNumericFormatAtEx method (Python)
SetNumericFormatAt method (Python)


SetRightMarginAt Method (Python)

SetRightMarginAt method,SetRightMarginAt method,SetRightMarginAt method
SpssDataCells class,SpssDataCells class,SpssDataCells class
SpssDataCells class,SpssDataCells class,SpssDataCells class
SetRightMarginAt method,SetRightMarginAt method,SetRightMarginAt method

Sets the right margin of the specified data cell.

Syntax

SpssDataCells.SetRightMarginAt(row,column,margin)

Parameters

row | Row index
column | Column index
margin | An integer. The unit is the point (1/72 inch).

Related Topics

GetBottomMarginAt Method (Python)
GetLeftMarginAt Method (Python)
GetRightMarginAt Method (Python)
GetTopMarginAt Method (Python)
SetBottomMarginAt Method (Python)
SetLeftMarginAt Method (Python)
SetTopMarginAt Method (Python)


SetTextColorAt Method (Python)

SetTextColorAt method,SetTextColorAt method,SetTextColorAt method
SpssDataCells class,SpssDataCells class,SpssDataCells class
SpssDataCells class,SpssDataCells class,SpssDataCells class
SetTextColorAt method,SetTextColorAt method,SetTextColorAt method

Sets the color of the text in the specified data cell.

Syntax

SpssDataCells.SetTextColorAt(row,column,color)

Parameters

row | Row index
column | Column index
color | Integer representation of the color

For information on setting color values, see Setting Color Values.

Related Topics

GetBackgroundColorAt Method (Python)
GetForegroundColorAt Method (Python)
GetTextColorAt Method (Python)
SetBackgroundColorAt Method (Python)
SetForegroundColorAt Method (Python)
GetTextFontAt Method (Python)
GetTextHiddenAt Method (Python)
GetTextSizeAt Method (Python)
GetTextStyleAt Method (Python)
GetTextUnderlinedAt Method (Python)
SetTextFontAt Method (Python)
SetTextHiddenAt Method (Python)
SetTextSizeAt Method (Python)
SetTextStyleAt Method (Python)
SetTextUnderlinedAt Method (Python)


SetTextFontAt Method (Python)

SetTextFontAt method,SetTextFontAt method,SetTextFontAt method
SpssDataCells class,SpssDataCells class,SpssDataCells class
SpssDataCells class,SpssDataCells class,SpssDataCells class
SetTextFontAt method,SetTextFontAt method,SetTextFontAt method

Sets the font of the text in the specified data cell.

Syntax

SpssDataCells.SetTextFontAt(row,column,fontname)

Parameters

row | Row index
column | Column index
fontname | Name of the font family, as a string. Available fonts are accessed from Format>Cell Properties in the pivot table editor.

Related Topics

GetTextColorAt Method (Python)
GetTextFontAt Method (Python)
GetTextHiddenAt Method (Python)
GetTextSizeAt Method (Python)
GetTextStyleAt Method (Python)
GetTextUnderlinedAt Method (Python)
SetTextColorAt Method (Python)
SetTextHiddenAt Method (Python)
SetTextSizeAt Method (Python)
SetTextStyleAt Method (Python)
SetTextUnderlinedAt Method (Python)


SetTextHiddenAt Method (Python)

SetTextHiddenAt method,SetTextHiddenAt method,SetTextHiddenAt method
SpssDataCells class,SpssDataCells class,SpssDataCells class
SpssDataCells class,SpssDataCells class,SpssDataCells class
SetTextHiddenAt method,SetTextHiddenAt method,SetTextHiddenAt method

Sets the hidden effect of the text in the specified data cell.

Syntax

SpssDataCells.SetTextHiddenAt(row,column,boolean)

Parameters

row | Row index
column | Column index
boolean | True for hidden, False for not hidden

Related Topics

GetTextColorAt Method (Python)
GetTextFontAt Method (Python)
GetTextHiddenAt Method (Python)
GetTextSizeAt Method (Python)
GetTextStyleAt Method (Python)
GetTextUnderlinedAt Method (Python)
SetTextColorAt Method (Python)
SetTextFontAt Method (Python)
SetTextSizeAt Method (Python)
SetTextStyleAt Method (Python)
SetTextUnderlinedAt Method (Python)


SetTextSizeAt Method (Python)

SetTextSizeAt method,SetTextSizeAt method,SetTextSizeAt method
SpssDataCells class,SpssDataCells class,SpssDataCells class
SpssDataCells class,SpssDataCells class,SpssDataCells class
SetTextSizeAt method,SetTextSizeAt method,SetTextSizeAt method

Sets the font size of the text in the specified data cell.

Syntax

SpssDataCells.SetTextSizeAt(row,column,size)

Parameters

row | Row index
column | Column index
size | Size in points (integer)

Related Topics

GetTextColorAt Method (Python)
GetTextFontAt Method (Python)
GetTextHiddenAt Method (Python)
GetTextSizeAt Method (Python)
GetTextStyleAt Method (Python)
GetTextUnderlinedAt Method (Python)
SetTextColorAt Method (Python)
SetTextFontAt Method (Python)
SetTextHiddenAt Method (Python)
SetTextStyleAt Method (Python)
SetTextUnderlinedAt Method (Python)


SetTextStyleAt Method (Python)

SetTextStyleAt method,SetTextStyleAt method,SetTextStyleAt method
SpssDataCells class,SpssDataCells class,SpssDataCells class
SpssDataCells class,SpssDataCells class,SpssDataCells class
SetTextStyleAt method,SetTextStyleAt method,SetTextStyleAt method

Sets the bold or italic style of the text in the specified data cell.

Syntax

SpssDataCells.SetTextStyleAt(row,column,style)

Parameters

row | Row index
column | Column index

Set the value of style to one of the following:

SpssClient.SpssTextStyleTypes.SpssTSRegular | Regular
SpssClient.SpssTextStyleTypes.SpssTSItalic | Italic
SpssClient.SpssTextStyleTypes.SpssTSBold | Bold
SpssClient.SpssTextStyleTypes.SpssTSBoldItalic | Bold Italic

Related Topics

GetTextColorAt Method (Python)
GetTextFontAt Method (Python)
GetTextHiddenAt Method (Python)
GetTextSizeAt Method (Python)
GetTextStyleAt Method (Python)
GetTextUnderlinedAt Method (Python)
SetTextColorAt Method (Python)
SetTextFontAt Method (Python)
SetTextHiddenAt Method (Python)
SetTextSizeAt Method (Python)
SetTextUnderlinedAt Method (Python)


SetTextUnderlinedAt Method (Python)

SetTextUnderlinedAt method,SetTextUnderlinedAt method,SetTextUnderlinedAt method
SpssDataCells class,SpssDataCells class,SpssDataCells class
SpssDataCells class,SpssDataCells class,SpssDataCells class
SetTextUnderlinedAt method,SetTextUnderlinedAt method,SetTextUnderlinedAt method

Sets the underlined effect of the text in the specified data cell.

Syntax

SpssDataCells.SetTextUnderlinedAt(row,column,boolean)

Parameters

row | Row index
column | Column index
boolean | True for underlined, False for not underlined

Related Topics

GetTextColorAt Method (Python)
GetTextFontAt Method (Python)
GetTextHiddenAt Method (Python)
GetTextSizeAt Method (Python)
GetTextStyleAt Method (Python)
GetTextUnderlinedAt Method (Python)
SetTextColorAt Method (Python)
SetTextFontAt Method (Python)
SetTextHiddenAt Method (Python)
SetTextSizeAt Method (Python)
SetTextStyleAt Method (Python)


SetTopMarginAt Method (Python)

SetTopMarginAt method,SetTopMarginAt method,SetTopMarginAt method
SpssDataCells class,SpssDataCells class,SpssDataCells class
SpssDataCells class,SpssDataCells class,SpssDataCells class
SetTopMarginAt method,SetTopMarginAt method,SetTopMarginAt method

Sets the top margin of the specified data cell.

Syntax

SpssDataCells.SetTopMarginAt(row,column,margin)

Parameters

row | Row index
column | Column index
margin | An integer. The unit is the point (1/72 inch).

Related Topics

GetBottomMarginAt Method (Python)
GetLeftMarginAt Method (Python)
GetRightMarginAt Method (Python)
GetTopMarginAt Method (Python)
SetBottomMarginAt Method (Python)
SetLeftMarginAt Method (Python)
SetRightMarginAt Method (Python)


SetVAlignAt Method (Python)

SetVAlignAt method,SetVAlignAt method,SetVAlignAt method
SpssDataCells class,SpssDataCells class,SpssDataCells class
SpssDataCells class,SpssDataCells class,SpssDataCells class
SetVAlignAt method,SetVAlignAt method,SetVAlignAt method
alignment,alignment,alignment
vertical,vertical,vertical
alignment,alignment,alignment

Sets the vertical alignment of the specified data cell.

Syntax

SpssDataCells.SetVAlignAt(row,column,alignment)

Parameters

row | Row index
column | Column index

Set the value of alignment to one of the following:

SpssClient.SpssVAlignTypes.SpssVAlTop | Top
SpssClient.SpssVAlignTypes.SpssVAlBottom | Bottom
SpssClient.SpssVAlignTypes.SpssVAlCenter | Center

Related Topics

GetHAlignAt Method (Python)
GetHDecDigitsAt Method (Python)
GetVAlignAt Method (Python)
SetHAlignAt Method (Python)
SetHDecDigitsAt Method (Python)


SetValueAt Method (Python)

SetValueAt method,SetValueAt method,SetValueAt method
SpssDataCells class,SpssDataCells class,SpssDataCells class
SpssDataCells class,SpssDataCells class,SpssDataCells class
SetValueAt method,SetValueAt method,SetValueAt method

Sets the value of the specified data cell.

Syntax

SpssDataCells.SetValueAt(row,column,value)

Parameters

row | Row index
column | Column index
value | Value as a string

Related Topics

GetUnformattedValueAt Method (Python)
GetValueAt Method (Python)


ShowFootnotesAt Method (Python)

ShowFootnotesAt method,ShowFootnotesAt method,ShowFootnotesAt method
SpssDataCells class,SpssDataCells class,SpssDataCells class
SpssDataCells class,SpssDataCells class,SpssDataCells class
ShowFootnotesAt method,ShowFootnotesAt method,ShowFootnotesAt method

Displays all the footnotes referenced by the specified data cell.

Syntax

SpssDataCells.ShowFootnotesAt(row,column)

Parameters

row | Row index
column | Column index

Related Topics

ShowAll Method (Python)
ShowAllFootnotes Method (Python)
ShowCaption Method (Python)
ShowFootnote Method (Python)
ShowTitle Method (Python)
ShowAllLabelsAndDataInDimensionAt Method (Python)
ShowAllLabelsInDimensionAt Method (Python)
ShowFootnotesAt Method (Python)
ShowHiddenDimensionLabelAt Method (Python)
ShowFootnotesAt Method (Python)


SpssDimension Class (Python)

SpssDimension class,SpssDimension class,SpssDimension class

The SpssDimension class provides access to a pivot table's dimensions. A pivot table can have three types of dimensions: column dimensions, row dimensions, and layer dimensions. Using an SpssDimension object you can obtain the name of a dimension, change the current category, or pivot the dimension.

Table Dimensions

The following is an illustration of the three types of dimension in a pivot table. To see the pivot table with all its labels (as shown in the figure), double-click it and select View>Show All from the menus in the pivot table editor.

To display the pivot trays (if they are not on the screen), select Pivot >Pivoting Trays from the menus.

Getting an SpssDimension Object

You get an SpssDimension object from the GetColumnDimension, GetLayerDimension, or GetRowDimension method of an SpssPivotMgr object. The SpssPivotMgr object is obtained from the SpssPivotTable object. For example, the following gets an SpssDimension object for the row dimension with index 1:

SpssPivotMgr = SpssPivotTable.PivotManager()
SpssDimension = SpssPivotMgr.GetRowDimension(1)

Example

This example assumes that PivotTable is an SpssPivotTable object and moves the "Statistics" row dimension to the first column dimension.

PivotManager = PivotTable.PivotManager()
# Search for the row dimension named "Statistics" and pivot it to
# the first column dimension.
for i in range(PivotManager.GetNumRowDimensions()):
    RowDim = PivotManager.GetRowDimension(i)
    if RowDim.GetDimensionName()  == "Statistics":
        RowDim.MoveToColumn(0)
        break


GetCategoryValueAt Method (Python)

GetCategoryValueAt method,GetCategoryValueAt method,GetCategoryValueAt method
SpssDimension class,SpssDimension class,SpssDimension class
SpssDimension class,SpssDimension class,SpssDimension class
GetCategoryValueAt method,GetCategoryValueAt method,GetCategoryValueAt method

Returns the label associated with the current category.

Syntax

SpssDimension.GetCategoryValueAt(index)

Parameters

index Category index within the column or row dimension


GetCurrentCategory Method (Python)

GetCurrentCategory method,GetCurrentCategory method,GetCurrentCategory method
SpssDimension class,SpssDimension class,SpssDimension class
SpssDimension class,SpssDimension class,SpssDimension class
GetCurrentCategory method,GetCurrentCategory method,GetCurrentCategory method

Returns the index for the current category.

Syntax

SpssDimension.GetCurrentCategory()

Related Topics

SetCurrentCategory Method (Python)


GetDimensionName Method (Python)

GetDimensionName method,GetDimensionName method,GetDimensionName method
SpssDimension class,SpssDimension class,SpssDimension class
SpssDimension class,SpssDimension class,SpssDimension class
GetDimensionName method,GetDimensionName method,GetDimensionName method

Returns the dimension name.

Syntax

SpssDimension.GetDimensionName()

Related Topics

SetDimensionName Method (Python)


GetFullDimensionLabel Method (Python)

GetFullDimensionLabel method,GetFullDimensionLabel method,GetFullDimensionLabel method
SpssDimension class,SpssDimension class,SpssDimension class
SpssDimension class,SpssDimension class,SpssDimension class
GetFullDimensionLabel method,GetFullDimensionLabel method,GetFullDimensionLabel method

Returns the value of the label for the dimension, which is a concatenation of the dimension name, all the group labels (if any), and the label for the current category.

Syntax

SpssDimension.GetFullDimensionLabel()


GetNumCategories Method (Python)

GetNumCategories method,GetNumCategories method,GetNumCategories method
SpssDimension class,SpssDimension class,SpssDimension class
SpssDimension class,SpssDimension class,SpssDimension class
GetNumCategories method,GetNumCategories method,GetNumCategories method

Returns the number of categories in the dimension.

Syntax

SpssDimension.GetNumCategories()


HideLabel Method (Python)

HideLabel method,HideLabel method,HideLabel method
SpssDimension class,SpssDimension class,SpssDimension class
SpssDimension class,SpssDimension class,SpssDimension class
HideLabel method,HideLabel method,HideLabel method

Hides the dimension label.

Syntax

SpssDimension.HideLabel()

Related Topics

HideCaption Method (Python)
HideFootnote Method (Python)
HideTitle Method (Python)
HideFootnotesAt Method (Python)
HideAllLabelsInDimensionAt Method (Python)
HideFootnotesAt Method (Python)
HideLabelsInDimensionAt Method (Python)
HideLabelsWithDataAt Method (Python)
HideFootnotesAt Method (Python)


MoveToColumn Method (Python)

MoveToColumn method,MoveToColumn method,MoveToColumn method
SpssDimension class,SpssDimension class,SpssDimension class
SpssDimension class,SpssDimension class,SpssDimension class
MoveToColumn method,MoveToColumn method,MoveToColumn method

Pivots the dimension to the column, placing it before the specified column dimension.

Syntax

SpssDimension.MoveToColumn(index)

Parameters

index Column dimension index

Related Topics

MoveToLayer Method (Python)
MoveToRow Method (Python)


MoveToLayer Method (Python)

MoveToLayer method,MoveToLayer method,MoveToLayer method
SpssDimension class,SpssDimension class,SpssDimension class
SpssDimension class,SpssDimension class,SpssDimension class
MoveToLayer method,MoveToLayer method,MoveToLayer method

Pivots the dimension to the layer, placing it before the specified layer dimension.

Syntax

SpssDimension.MoveToLayer(index)

Parameters

index Layer dimension index

Related Topics

MoveToColumn Method (Python)
MoveToRow Method (Python)


MoveToRow Method (Python)

MoveToRow method,MoveToRow method,MoveToRow method
SpssDimension class,SpssDimension class,SpssDimension class
SpssDimension class,SpssDimension class,SpssDimension class
MoveToRow method,MoveToRow method,MoveToRow method

Pivots the dimension to the row, placing it before the specified row dimension.

Syntax

SpssDimension.MoveToRow(index)

Parameters

index Row dimension index

Related Topics

MoveToColumn Method (Python)
MoveToLayer Method (Python)


SetCurrentCategory Method (Python)

SetCurrentCategory method,SetCurrentCategory method,SetCurrentCategory method
SpssDimension class,SpssDimension class,SpssDimension class
SpssDimension class,SpssDimension class,SpssDimension class
SetCurrentCategory method,SetCurrentCategory method,SetCurrentCategory method

Sets the specified category as current.

Syntax

SpssDimension.SetCurrentCategory(index)

Parameters

index Category index

Related Topics

GetCurrentCategory Method (Python)


SetDimensionName Method (Python)

SetDimensionName method,SetDimensionName method,SetDimensionName method
SpssDimension class,SpssDimension class,SpssDimension class
SpssDimension class,SpssDimension class,SpssDimension class
SetDimensionName method,SetDimensionName method,SetDimensionName method

Sets the dimension name.

Syntax

SpssDimension.SetDimensionName(name)

Related Topics

GetDimensionName Method (Python)


SpssFootnotes Class (Python)

SpssFootnotes class,SpssFootnotes class,SpssFootnotes class

The SpssFootnotes class provides access to all of the footnotes contained in a pivot table. The index of a footnote does not correspond to the footnote marker but to the order of their references in the table. The index is returned when you insert a new footnote.

You get an SpssFootnotes object from the FootnotesArray method of an SpssPivotTable object, as in:

SpssFootnotes = SpssPivotTable.FootnotesArray()

An SpssFootnotes object is also returned by the GetReferredFootnotesAt method of an SpssDataCells or SpssLabels object. The footnote collection thus returned contains only the footnotes referred to by the specified data cell or label. The indexes for the returned collection are in the ordinal order of the references in the referring cell. PASW Statistics does not provide a method to go from a footnote referred to by a cell to the same footnote contained in the footnote array of the table.

Example

This example assumes that PivotTable is an SpssPivotTable object and sets the background color to yellow for all footnotes.

Footnotes = PivotTable.FootnotesArray()
PivotTable.ClearSelection()
for i in range(Footnotes.GetCount()):
    Footnotes.SelectCellAt(i)
PivotTable.SetBackgroundColor(65535)


ChangeMarkerToRegular Method (Python)

ChangeMarkerToRegular method,ChangeMarkerToRegular method,ChangeMarkerToRegular method
SpssFootnotes class,SpssFootnotes class,SpssFootnotes class
SpssFootnotes class,SpssFootnotes class,SpssFootnotes class
ChangeMarkerToRegular method,ChangeMarkerToRegular method,ChangeMarkerToRegular method

Changes the marker of the current footnote to the regular marker. The marker is either alphabetic or numeric. The footnote marker type is set from the SetFootnoteMarkers method in the SpssPivotTable class.

Syntax

SpssFootnotes.ChangeMarkerToRegular(index)

Parameters

index Index of the footnote

The index of a footnote does not correspond to the footnote marker but to the order of their references in the table.

Related Topics

GetFootnoteMarkersPosition Method (Python)
GetFootnoteMarkersStyle Method (Python)
ChangeMarkerToSpecial Method (Python)
GetCount Method (Python)
RenumberFootnotes Method (Python)


ChangeMarkerToSpecial Method (Python)

ChangeMarkerToSpecial method,ChangeMarkerToSpecial method,ChangeMarkerToSpecial method
SpssFootnotes class,SpssFootnotes class,SpssFootnotes class
SpssFootnotes class,SpssFootnotes class,SpssFootnotes class
ChangeMarkerToSpecial method,ChangeMarkerToSpecial method,ChangeMarkerToSpecial method

Changes the marker of the current footnote to the special marker.

Syntax

SpssFootnotes.ChangeMarkerToSpecial(index,newmarker)

Parameters

index | Index of the footnote
newmarker | Special marker for the footnote (string)

The index of a footnote does not correspond to the footnote marker but to the order of their references in the table.

Related Topics

GetFootnoteMarkersPosition Method (Python)
GetFootnoteMarkersStyle Method (Python)
ChangeMarkerToRegular Method (Python)
GetCount Method (Python)
RenumberFootnotes Method (Python)


GetBackgroundColorAt Method (Python)

GetBackgroundColorAt method,GetBackgroundColorAt method,GetBackgroundColorAt method
SpssFootnotes class,SpssFootnotes class,SpssFootnotes class
SpssFootnotes class,SpssFootnotes class,SpssFootnotes class
GetBackgroundColorAt method,GetBackgroundColorAt method,GetBackgroundColorAt method

Returns the background color of the specified footnote.

Syntax

SpssFootnotes.GetBackgroundColorAt(index)

Parameters

index Index of the footnote

The index of a footnote does not correspond to the footnote marker but to the order of their references in the table.

Returns

The color is returned as an integer. See the topic Setting Color Values (Python) for more information.

Related Topics

GetForegroundColorAt Method (Python)
GetTextColorAt Method (Python)
SetBackgroundColorAt Method (Python)
SetForegroundColorAt Method (Python)
SetTextColorAt Method (Python)


GetBottomMarginAt Method (Python)

GetBottomMarginAt method,GetBottomMarginAt method,GetBottomMarginAt method
SpssFootnotes class,SpssFootnotes class,SpssFootnotes class
SpssFootnotes class,SpssFootnotes class,SpssFootnotes class
GetBottomMarginAt method,GetBottomMarginAt method,GetBottomMarginAt method

Returns the bottom margin of the specified footnote. The unit is the point (1/72 inch).

Syntax

SpssFootnotes.GetBottomMarginAt(index)

Parameters

index Index of the footnote

The index of a footnote does not correspond to the footnote marker but to the order of their references in the table.

Related Topics

GetLeftMarginAt Method (Python)
GetRightMarginAt Method (Python)
GetTopMarginAt Method (Python)
SetBottomMarginAt Method (Python)
SetLeftMarginAt Method (Python)
SetRightMarginAt Method (Python)
SetTopMarginAt Method (Python)


GetCount Method (Python)

GetCount method,GetCount method,GetCount method
SpssFootnotes class,SpssFootnotes class,SpssFootnotes class
SpssFootnotes class,SpssFootnotes class,SpssFootnotes class
GetCount method,GetCount method,GetCount method

Returns the number of footnotes associated with the current pivot table.

Syntax

SpssFootnotes.GetCount()

Related Topics

GetFootnoteMarkersPosition Method (Python)
GetFootnoteMarkersStyle Method (Python)
ChangeMarkerToRegular Method (Python)
ChangeMarkerToSpecial Method (Python)
RenumberFootnotes Method (Python)


GetForegroundColorAt Method (Python)

GetForegroundColorAt method,GetForegroundColorAt method,GetForegroundColorAt method
SpssFootnotes class,SpssFootnotes class,SpssFootnotes class
SpssFootnotes class,SpssFootnotes class,SpssFootnotes class
GetForegroundColorAt method,GetForegroundColorAt method,GetForegroundColorAt method

This method is deprecated in release 17.0. Use the GetTextColorAt method instead.

Related Topics

GetBackgroundColorAt Method (Python)
GetTextColorAt Method (Python)
SetBackgroundColorAt Method (Python)
SetForegroundColorAt Method (Python)
SetTextColorAt Method (Python)


GetHAlignAt Method (Python)

GetHAlignAt method,GetHAlignAt method,GetHAlignAt method
SpssFootnotes class,SpssFootnotes class,SpssFootnotes class
SpssFootnotes class,SpssFootnotes class,SpssFootnotes class
GetHAlignAt method,GetHAlignAt method,GetHAlignAt method
alignment,alignment,alignment
labels,labels,labels
alignment,alignment,alignment
foonotes,foonotes,foonotes
alignment,alignment,alignment

Returns the horizontal alignment of the specified footnote.

Syntax

SpssFootnotes.GetHAlignAt(index)

Parameters

index Index of the footnote

The index of a footnote does not correspond to the footnote marker but to the order of their references in the table.

Returns

SpssClient.SpssHAlignTypes.SpssHAlLeft | Left
SpssClient.SpssHAlignTypes.SpssHAlRight | Right
SpssClient.SpssHAlignTypes.SpssHAlCenter | Center
SpssClient.SpssHAlignTypes.SpssHAlMixed | Mixed
SpssClient.SpssHAlignTypes.SpssHAlDecimal | Decimal

Related Topics

GetVAlignAt Method (Python)
SetHAlignAt Method (Python)
SetVAlignAt Method (Python)


GetLeftMarginAt Method (Python)

GetLeftMarginAt method,GetLeftMarginAt method,GetLeftMarginAt method
SpssFootnotes class,SpssFootnotes class,SpssFootnotes class
SpssFootnotes class,SpssFootnotes class,SpssFootnotes class
GetLeftMarginAt method,GetLeftMarginAt method,GetLeftMarginAt method

Returns the left margin for the specified footnote. The unit is the point (1/72 inch).

Syntax

SpssFootnotes.GetLeftMarginAt(index)

Parameters

index Index of the footnote.

The index of a footnote does not correspond to the footnote marker but to the order of their references in the table.

Related Topics

GetBottomMarginAt Method (Python)
GetRightMarginAt Method (Python)
GetTopMarginAt Method (Python)
SetBottomMarginAt Method (Python)
SetLeftMarginAt Method (Python)
SetRightMarginAt Method (Python)
SetTopMarginAt Method (Python)


GetRightMarginAt Method (Python)

GetRightMarginAt method,GetRightMarginAt method,GetRightMarginAt method
SpssFootnotes class,SpssFootnotes class,SpssFootnotes class
SpssFootnotes class,SpssFootnotes class,SpssFootnotes class
GetRightMarginAt method,GetRightMarginAt method,GetRightMarginAt method

Returns the right margin of the specified footnote. The unit is the point (1/72 inch).

Syntax

SpssFootnotes.GetRightMarginAt(index)

Parameters

index Index of the footnote

The index of a footnote does not correspond to the footnote marker but to the order of their references in the table.

Related Topics

GetBottomMarginAt Method (Python)
GetLeftMarginAt Method (Python)
GetTopMarginAt Method (Python)
SetBottomMarginAt Method (Python)
SetLeftMarginAt Method (Python)
SetRightMarginAt Method (Python)
SetTopMarginAt Method (Python)


GetTextColorAt Method (Python)

GetTextColorAt method,GetTextColorAt method,GetTextColorAt method
SpssFootnotes class,SpssFootnotes class,SpssFootnotes class
SpssFootnotes class,SpssFootnotes class,SpssFootnotes class
GetTextColorAt method,GetTextColorAt method,GetTextColorAt method

Returns the color of the text of the specified footnote.

Syntax

SpssFootnotes.GetTextColorAt(index)

Parameters

index Index of the footnote

The index of a footnote does not correspond to the footnote marker but to the order of their references in the table.

Returns

The color is returned as an integer. See the topic Setting Color Values (Python) for more information.

Related Topics

GetBackgroundColorAt Method (Python)
GetForegroundColorAt Method (Python)
SetBackgroundColorAt Method (Python)
SetForegroundColorAt Method (Python)
SetTextColorAt Method (Python)
GetTextFontAt Method (Python)
GetTextHiddenAt Method (Python)
GetTextSizeAt Method (Python)
GetTextStyleAt Method (Python)
GetTextUnderlinedAt Method (Python)
SetTextFontAt Method (Python)
SetTextHiddenAt Method (Python)
SetTextSizeAt Method (Python)
SetTextStyleAt Method (Python)
SetTextUnderlinedAt Method (Python)


GetTextFontAt Method (Python)

GetTextFontAt method,GetTextFontAt method,GetTextFontAt method
SpssFootnotes class,SpssFootnotes class,SpssFootnotes class
SpssFootnotes class,SpssFootnotes class,SpssFootnotes class
GetTextFontAt method,GetTextFontAt method,GetTextFontAt method

Returns the font of the text in the specified footnote, as a string.

Syntax

SpssFootnotes.GetTextFontAt(index)

Parameters

index Index of the footnote

The index of a footnote does not correspond to the footnote marker but to the order of their references in the table.

Related Topics

GetTextColorAt Method (Python)
GetTextHiddenAt Method (Python)
GetTextSizeAt Method (Python)
GetTextStyleAt Method (Python)
GetTextUnderlinedAt Method (Python)
SetTextColorAt Method (Python)
SetTextFontAt Method (Python)
SetTextHiddenAt Method (Python)
SetTextSizeAt Method (Python)
SetTextStyleAt Method (Python)
SetTextUnderlinedAt Method (Python)


GetTextHiddenAt Method (Python)

GetTextHiddenAt method,GetTextHiddenAt method,GetTextHiddenAt method
SpssFootnotes class,SpssFootnotes class,SpssFootnotes class
SpssFootnotes class,SpssFootnotes class,SpssFootnotes class
GetTextHiddenAt method,GetTextHiddenAt method,GetTextHiddenAt method

Returns the hidden effect of the specified footnote. The result is a Boolean.

Syntax

SpssFootnotes.GetTextHiddenAt(index)

Parameters

index Index of the footnote

The index of a footnote does not correspond to the footnote marker but to the order of their references in the table.

Returns

True | Hidden
False | Not hidden

Related Topics

GetTextColorAt Method (Python)
GetTextFontAt Method (Python)
GetTextSizeAt Method (Python)
GetTextStyleAt Method (Python)
GetTextUnderlinedAt Method (Python)
SetTextColorAt Method (Python)
SetTextFontAt Method (Python)
SetTextHiddenAt Method (Python)
SetTextSizeAt Method (Python)
SetTextStyleAt Method (Python)
SetTextUnderlinedAt Method (Python)


GetTextSizeAt Method (Python)

GetTextSizeAt method,GetTextSizeAt method,GetTextSizeAt method
SpssFootnotes class,SpssFootnotes class,SpssFootnotes class
SpssFootnotes class,SpssFootnotes class,SpssFootnotes class
GetTextSizeAt method,GetTextSizeAt method,GetTextSizeAt method

Returns the font size of the specified footnote.

Syntax

SpssFootnotes.GetTextSizeAt(index)

Parameters

index Index of the footnote

The index of a footnote does not correspond to the footnote marker but to the order of their references in the table.

Related Topics

GetTextColorAt Method (Python)
GetTextFontAt Method (Python)
GetTextHiddenAt Method (Python)
GetTextStyleAt Method (Python)
GetTextUnderlinedAt Method (Python)
SetTextColorAt Method (Python)
SetTextFontAt Method (Python)
SetTextHiddenAt Method (Python)
SetTextSizeAt Method (Python)
SetTextStyleAt Method (Python)
SetTextUnderlinedAt Method (Python)


GetTextStyleAt Method (Python)

GetTextStyleAt method,GetTextStyleAt method,GetTextStyleAt method
SpssFootnotes class,SpssFootnotes class,SpssFootnotes class
SpssFootnotes class,SpssFootnotes class,SpssFootnotes class
GetTextStyleAt method,GetTextStyleAt method,GetTextStyleAt method

Returns the bold or italic style of the text for specified footnote.

Syntax

SpssFootnotes.GetTextStyleAt(index)

Parameters

index Index of the footnote

The index of a footnote does not correspond to the footnote marker but to the order of their references in the table.

Returns

SpssClient.SpssTextStyleTypes.SpssTSRegular | Regular
SpssClient.SpssTextStyleTypes.SpssTSItalic | Italic
SpssClient.SpssTextStyleTypes.SpssTSBold | Bold
SpssClient.SpssTextStyleTypes.SpssTSBoldItalic | Bold Italic

Related Topics

GetTextColorAt Method (Python)
GetTextFontAt Method (Python)
GetTextHiddenAt Method (Python)
GetTextSizeAt Method (Python)
GetTextUnderlinedAt Method (Python)
SetTextColorAt Method (Python)
SetTextFontAt Method (Python)
SetTextHiddenAt Method (Python)
SetTextSizeAt Method (Python)
SetTextStyleAt Method (Python)
SetTextUnderlinedAt Method (Python)


GetTextUnderlinedAt Method (Python)

SpssFootnotes class,SpssFootnotes class,SpssFootnotes class
GetTextUnderlinedAt method,GetTextUnderlinedAt method,GetTextUnderlinedAt method
GetTextUnderlinedAt method,GetTextUnderlinedAt method,GetTextUnderlinedAt method
SpssFootnotes class,SpssFootnotes class,SpssFootnotes class

Returns the underlined effect of the specified footnote. The result is a Boolean.

Syntax

SpssFootnotes.GetTextUnderlinedAt(index)

Parameters

index Index of the footnote

The index of a footnote does not correspond to the footnote marker but to the order of their references in the table.

Returns

True | Underlined
False | Not underlined

Related Topics

GetTextColorAt Method (Python)
GetTextFontAt Method (Python)
GetTextHiddenAt Method (Python)
GetTextSizeAt Method (Python)
GetTextStyleAt Method (Python)
SetTextColorAt Method (Python)
SetTextFontAt Method (Python)
SetTextHiddenAt Method (Python)
SetTextSizeAt Method (Python)
SetTextStyleAt Method (Python)
SetTextUnderlinedAt Method (Python)


GetTopMarginAt Method (Python)

GetTopMarginAt method,GetTopMarginAt method,GetTopMarginAt method
SpssFootnotes class,SpssFootnotes class,SpssFootnotes class
SpssFootnotes class,SpssFootnotes class,SpssFootnotes class
GetTopMarginAt method,GetTopMarginAt method,GetTopMarginAt method

Returns the top margin of the specified footnote. The unit is the point (1/72 inch).

Syntax

SpssFootnotes.GetTopMarginAt(index)

Parameters

index Index of the footnote

The index of a footnote does not correspond to the footnote marker but to the order of their references in the table.

Related Topics

GetBottomMarginAt Method (Python)
GetLeftMarginAt Method (Python)
GetRightMarginAt Method (Python)
SetBottomMarginAt Method (Python)
SetLeftMarginAt Method (Python)
SetRightMarginAt Method (Python)
SetTopMarginAt Method (Python)


GetVAlignAt Method (Python)

GetVAlignAt method,GetVAlignAt method,GetVAlignAt method
SpssFootnotes class,SpssFootnotes class,SpssFootnotes class
SpssFootnotes class,SpssFootnotes class,SpssFootnotes class
GetVAlignAt method,GetVAlignAt method,GetVAlignAt method
alignment,alignment,alignment
vertical,vertical,vertical
alignment,alignment,alignment

Returns the vertical alignment of the specified footnote.

Syntax

SpssFootnotes.GetVAlignAt(index)

Parameters

index Index of the footnote

The index of a footnote does not correspond to the footnote marker but to the order of their references in the table.

Returns

SpssClient.SpssVAlignTypes.SpssVAlTop | Top
SpssClient.SpssVAlignTypes.SpssVAlBottom | Bottom
SpssClient.SpssVAlignTypes.SpssVAlCenter | Center

Related Topics

GetHAlignAt Method (Python)
SetHAlignAt Method (Python)
SetVAlignAt Method (Python)


GetValueAt Method (Python)

GetValueAt method,GetValueAt method,GetValueAt method
SpssFootnotes class,SpssFootnotes class,SpssFootnotes class
SpssFootnotes class,SpssFootnotes class,SpssFootnotes class
GetValueAt method,GetValueAt method,GetValueAt method

Returns the value associated with the specified footnote, as a unicode string.

Syntax

SpssFootnotes.GetValueAt(index)

Parameters

index Index of the footnote

The index of a footnote does not correspond to the footnote marker but to the order of their references in the table.

Related Topics

SetValueAt Method (Python)


RenumberFootnotes Method (Python)

RenumberFootnotes method,RenumberFootnotes method,RenumberFootnotes method
SpssFootnotes class,SpssFootnotes class,SpssFootnotes class
SpssFootnotes class,SpssFootnotes class,SpssFootnotes class
RenumberFootnotes method,RenumberFootnotes method,RenumberFootnotes method

Renumbers all footnotes.

Syntax

SpssFootnotes.RenumberFootnotes()

Related Topics

GetFootnoteMarkersPosition Method (Python)
GetFootnoteMarkersStyle Method (Python)
ChangeMarkerToRegular Method (Python)
ChangeMarkerToSpecial Method (Python)
GetCount Method (Python)


SelectCellAt Method (Python)

SelectCellAt method,SelectCellAt method,SelectCellAt method
SpssFootnotes class,SpssFootnotes class,SpssFootnotes class
SpssFootnotes class,SpssFootnotes class,SpssFootnotes class
SelectCellAt method,SelectCellAt method,SelectCellAt method

Selects the cell associated with the specified footnote, in addition to previously selected elements.

Syntax

SpssFootnotes.SelectCellAt(index)

Parameters

index Index of the footnote

The index of a footnote does not correspond to the footnote marker but to the order of their references in the table.


SetBackgroundColorAt Method (Python)

SetBackgroundColorAt method,SetBackgroundColorAt method,SetBackgroundColorAt method
SpssFootnotes class,SpssFootnotes class,SpssFootnotes class
SpssFootnotes class,SpssFootnotes class,SpssFootnotes class
SetBackgroundColorAt method,SetBackgroundColorAt method,SetBackgroundColorAt method

Sets the background color of the specified footnote.

Syntax

SpssFootnotes.SetBackgroundColorAt(index,color)

Parameters

index | Index of the footnote
color | Integer representation of the color

The index of a footnote does not correspond to the footnote marker but to the order of their references in the table.

For information on setting color values, see Setting Color Values.

Related Topics

GetBackgroundColorAt Method (Python)
GetForegroundColorAt Method (Python)
GetTextColorAt Method (Python)
SetForegroundColorAt Method (Python)
SetTextColorAt Method (Python)


SetBottomMarginAt Method (Python)

SetBottomMarginAt method,SetBottomMarginAt method,SetBottomMarginAt method
SpssFootnotes class,SpssFootnotes class,SpssFootnotes class
SpssFootnotes class,SpssFootnotes class,SpssFootnotes class
SetBottomMarginAt method,SetBottomMarginAt method,SetBottomMarginAt method

Sets the bottom margin of the specified footnote.

Syntax

SpssFootnotes.SetBottomMarginAt(index,margin)

Parameters

index | Index of the footnote
margin | An integer. The unit is the point (1/72 inch).

The index of a footnote does not correspond to the footnote marker but to the order of their references in the table.

Related Topics

GetBottomMarginAt Method (Python)
GetLeftMarginAt Method (Python)
GetRightMarginAt Method (Python)
GetTopMarginAt Method (Python)
SetLeftMarginAt Method (Python)
SetRightMarginAt Method (Python)
SetTopMarginAt Method (Python)


SetForegroundColorAt Method (Python)

SetForegroundColorAt method,SetForegroundColorAt method,SetForegroundColorAt method
SpssFootnotes class,SpssFootnotes class,SpssFootnotes class
SpssFootnotes class,SpssFootnotes class,SpssFootnotes class
SetForegroundColorAt method,SetForegroundColorAt method,SetForegroundColorAt method

This method is deprecated in release 17.0. Use the SetTextColorAt method instead.

Related Topics

GetBackgroundColorAt Method (Python)
GetForegroundColorAt Method (Python)
GetTextColorAt Method (Python)
SetBackgroundColorAt Method (Python)
SetTextColorAt Method (Python)


SetHAlignAt Method (Python)

SetHAlignAt method,SetHAlignAt method,SetHAlignAt method
SpssFootnotes class,SpssFootnotes class,SpssFootnotes class
SpssFootnotes class,SpssFootnotes class,SpssFootnotes class
SetHAlignAt method,SetHAlignAt method,SetHAlignAt method
alignment,alignment,alignment
labels,labels,labels
alignment,alignment,alignment
foonotes,foonotes,foonotes
alignment,alignment,alignment

Sets the horizontal alignment of the specified footnote.

Syntax

SpssFootnotes.SetHAlignAt(index,alignment)

Parameters

index Index of the footnote

The index of a footnote does not correspond to the footnote marker but to the order of their references in the table.

Set the value of alignment to one of the following:

SpssClient.SpssHAlignTypes.SpssHAlLeft | Left
SpssClient.SpssHAlignTypes.SpssHAlRight | Right
SpssClient.SpssHAlignTypes.SpssHAlCenter | Center
SpssClient.SpssHAlignTypes.SpssHAlMixed | Mixed
SpssClient.SpssHAlignTypes.SpssHAlDecimal | Decimal

Related Topics

GetHAlignAt Method (Python)
GetVAlignAt Method (Python)
SetVAlignAt Method (Python)


SetLeftMarginAt Method (Python)

SetLeftMarginAt method,SetLeftMarginAt method,SetLeftMarginAt method
SpssFootnotes class,SpssFootnotes class,SpssFootnotes class
SpssFootnotes class,SpssFootnotes class,SpssFootnotes class
SetLeftMarginAt method,SetLeftMarginAt method,SetLeftMarginAt method

Sets the left margin for the specified footnote.

Syntax

SpssFootnotes.SetLeftMarginAt(index,margin)

Parameters

index | Index of the footnote.
margin | An integer. The unit is the point (1/72 inch).

The index of a footnote does not correspond to the footnote marker but to the order of their references in the table.

Related Topics

GetBottomMarginAt Method (Python)
GetLeftMarginAt Method (Python)
GetRightMarginAt Method (Python)
GetTopMarginAt Method (Python)
SetBottomMarginAt Method (Python)
SetRightMarginAt Method (Python)
SetTopMarginAt Method (Python)


SetRightMarginAt Method (Python)

SetRightMarginAt method,SetRightMarginAt method,SetRightMarginAt method
SpssFootnotes class,SpssFootnotes class,SpssFootnotes class
SpssFootnotes class,SpssFootnotes class,SpssFootnotes class
SetRightMarginAt method,SetRightMarginAt method,SetRightMarginAt method

Sets the right margin of specified footnote.

Syntax

SpssFootnotes.SetRightMarginAt(index,margin)

Parameters

index | Index of the footnote
margin | An integer. The unit is the point (1/72 inch).

The index of a footnote does not correspond to the footnote marker but to the order of their references in the table.

Related Topics

GetBottomMarginAt Method (Python)
GetLeftMarginAt Method (Python)
GetRightMarginAt Method (Python)
GetTopMarginAt Method (Python)
SetBottomMarginAt Method (Python)
SetLeftMarginAt Method (Python)
SetTopMarginAt Method (Python)


SetTextColorAt Method (Python)

SetTextColorAt method,SetTextColorAt method,SetTextColorAt method
SpssFootnotes class,SpssFootnotes class,SpssFootnotes class
SpssFootnotes class,SpssFootnotes class,SpssFootnotes class
SetTextColorAt method,SetTextColorAt method,SetTextColorAt method

Sets the color of the text of the specified footnote.

Syntax

SpssFootnotes.SetTextColorAt(index,color)

Parameters

index | Index of the footnote
color | Integer representation of the color

The index of a footnote does not correspond to the footnote marker but to the order of their references in the table.

For information on setting color values, see Setting Color Values.

Related Topics

GetBackgroundColorAt Method (Python)
GetForegroundColorAt Method (Python)
GetTextColorAt Method (Python)
SetBackgroundColorAt Method (Python)
SetForegroundColorAt Method (Python)
GetTextFontAt Method (Python)
GetTextHiddenAt Method (Python)
GetTextSizeAt Method (Python)
GetTextStyleAt Method (Python)
GetTextUnderlinedAt Method (Python)
SetTextFontAt Method (Python)
SetTextHiddenAt Method (Python)
SetTextSizeAt Method (Python)
SetTextStyleAt Method (Python)
SetTextUnderlinedAt Method (Python)


SetTextFontAt Method (Python)

SetTextFontAt method,SetTextFontAt method,SetTextFontAt method
SpssFootnotes class,SpssFootnotes class,SpssFootnotes class
SpssFootnotes class,SpssFootnotes class,SpssFootnotes class
SetTextFontAt method,SetTextFontAt method,SetTextFontAt method

Sets the font of the text in the specified footnote.

Syntax

SpssFootnotes.SetTextFontAt(index,fontname)

Parameters

index | Index of the footnote
fontname | Name of the font family, as a string. Available fonts are accessed from Format>Cell Properties in the pivot table editor.

The index of a footnote does not correspond to the footnote marker but to the order of their references in the table.

Related Topics

GetTextColorAt Method (Python)
GetTextFontAt Method (Python)
GetTextHiddenAt Method (Python)
GetTextSizeAt Method (Python)
GetTextStyleAt Method (Python)
GetTextUnderlinedAt Method (Python)
SetTextColorAt Method (Python)
SetTextHiddenAt Method (Python)
SetTextSizeAt Method (Python)
SetTextStyleAt Method (Python)
SetTextUnderlinedAt Method (Python)


SetTextHiddenAt Method (Python)

SetTextHiddenAt method,SetTextHiddenAt method,SetTextHiddenAt method
SpssFootnotes class,SpssFootnotes class,SpssFootnotes class
SpssFootnotes class,SpssFootnotes class,SpssFootnotes class
SetTextHiddenAt method,SetTextHiddenAt method,SetTextHiddenAt method

Sets the hidden effect of the specified footnote.

Syntax

SpssFootnotes.SetTextHiddenAt(index,boolean)

Parameters

index | Index of the footnote
boolean | True for hidden, False for not hidden

The index of a footnote does not correspond to the footnote marker but to the order of their references in the table.

Related Topics

GetTextColorAt Method (Python)
GetTextFontAt Method (Python)
GetTextHiddenAt Method (Python)
GetTextSizeAt Method (Python)
GetTextStyleAt Method (Python)
GetTextUnderlinedAt Method (Python)
SetTextColorAt Method (Python)
SetTextFontAt Method (Python)
SetTextSizeAt Method (Python)
SetTextStyleAt Method (Python)
SetTextUnderlinedAt Method (Python)


SetTextSizeAt Method (Python)

SetTextSizeAt method,SetTextSizeAt method,SetTextSizeAt method
SpssFootnotes class,SpssFootnotes class,SpssFootnotes class
SpssFootnotes class,SpssFootnotes class,SpssFootnotes class
SetTextSizeAt method,SetTextSizeAt method,SetTextSizeAt method

Sets the font size of the specified footnote.

Syntax

SpssFootnotes.SetTextSizeAt(index,size)

Parameters

index | Index of the footnote
size | Size in points (integer)

The index of a footnote does not correspond to the footnote marker but to the order of their references in the table.

Related Topics

GetTextColorAt Method (Python)
GetTextFontAt Method (Python)
GetTextHiddenAt Method (Python)
GetTextSizeAt Method (Python)
GetTextStyleAt Method (Python)
GetTextUnderlinedAt Method (Python)
SetTextColorAt Method (Python)
SetTextFontAt Method (Python)
SetTextHiddenAt Method (Python)
SetTextStyleAt Method (Python)
SetTextUnderlinedAt Method (Python)


SetTextStyleAt Method (Python)

SetTextStyleAt method,SetTextStyleAt method,SetTextStyleAt method
SpssFootnotes class,SpssFootnotes class,SpssFootnotes class
SpssFootnotes class,SpssFootnotes class,SpssFootnotes class
SetTextStyleAt method,SetTextStyleAt method,SetTextStyleAt method

Sets the bold or italic style of the text for the specified footnote.

Syntax

SpssFootnotes.SetTextStyleAt(index,style)

Parameters

index Index of the footnote

The index of a footnote does not correspond to the footnote marker but to the order of their references in the table.

Set the value of style to one of the following:

SpssClient.SpssTextStyleTypes.SpssTSRegular | Regular
SpssClient.SpssTextStyleTypes.SpssTSItalic | Italic
SpssClient.SpssTextStyleTypes.SpssTSBold | Bold
SpssClient.SpssTextStyleTypes.SpssTSBoldItalic | Bold Italic

Related Topics

GetTextColorAt Method (Python)
GetTextFontAt Method (Python)
GetTextHiddenAt Method (Python)
GetTextSizeAt Method (Python)
GetTextStyleAt Method (Python)
GetTextUnderlinedAt Method (Python)
SetTextColorAt Method (Python)
SetTextFontAt Method (Python)
SetTextHiddenAt Method (Python)
SetTextSizeAt Method (Python)
SetTextUnderlinedAt Method (Python)


SetTextUnderlinedAt Method (Python)

SpssFootnotes class,SpssFootnotes class,SpssFootnotes class
SetTextUnderlinedAt method,SetTextUnderlinedAt method,SetTextUnderlinedAt method
SetTextUnderlinedAt method,SetTextUnderlinedAt method,SetTextUnderlinedAt method
SpssFootnotes class,SpssFootnotes class,SpssFootnotes class

Sets the underlined effect of the specified footnote.

Syntax

SpssFootnotes.SetTextUnderlinedAt(index,boolean)

Parameters

index | Index of the footnote
boolean | True for underlined, False for not underlined

The index of a footnote does not correspond to the footnote marker but to the order of their references in the table.

Related Topics

GetTextColorAt Method (Python)
GetTextFontAt Method (Python)
GetTextHiddenAt Method (Python)
GetTextSizeAt Method (Python)
GetTextStyleAt Method (Python)
GetTextUnderlinedAt Method (Python)
SetTextColorAt Method (Python)
SetTextFontAt Method (Python)
SetTextHiddenAt Method (Python)
SetTextSizeAt Method (Python)
SetTextStyleAt Method (Python)


SetTopMarginAt Method (Python)

SetTopMarginAt method,SetTopMarginAt method,SetTopMarginAt method
SpssFootnotes class,SpssFootnotes class,SpssFootnotes class
SpssFootnotes class,SpssFootnotes class,SpssFootnotes class
SetTopMarginAt method,SetTopMarginAt method,SetTopMarginAt method

Sets the top margin of the specified footnote.

Syntax

SpssFootnotes.SetTopMarginAt(index,margin)

Parameters

index | Index of the footnote
margin | An integer. The unit is the point (1/72 inch).

The index of a footnote does not correspond to the footnote marker but to the order of their references in the table.

Related Topics

GetBottomMarginAt Method (Python)
GetLeftMarginAt Method (Python)
GetRightMarginAt Method (Python)
GetTopMarginAt Method (Python)
SetBottomMarginAt Method (Python)
SetLeftMarginAt Method (Python)
SetRightMarginAt Method (Python)


SetVAlignAt Method (Python)

SetVAlignAt method,SetVAlignAt method,SetVAlignAt method
SpssFootnotes class,SpssFootnotes class,SpssFootnotes class
SpssFootnotes class,SpssFootnotes class,SpssFootnotes class
SetVAlignAt method,SetVAlignAt method,SetVAlignAt method
alignment,alignment,alignment
vertical,vertical,vertical
alignment,alignment,alignment

Sets the vertical alignment of the specified footnote.

Syntax

SpssFootnotes.SetVAlignAt(index,alignment)

Parameters

index Index of the footnote

The index of a footnote does not correspond to the footnote marker but to the order of their references in the table.

Set the value of alignment to one of the following:

SpssClient.SpssVAlignTypes.SpssVAlTop | Top
SpssClient.SpssVAlignTypes.SpssVAlBottom | Bottom
SpssClient.SpssVAlignTypes.SpssVAlCenter | Center

Related Topics

GetHAlignAt Method (Python)
GetVAlignAt Method (Python)
SetHAlignAt Method (Python)


SetValueAt Method (Python)

SetValueAt method,SetValueAt method,SetValueAt method
SpssFootnotes class,SpssFootnotes class,SpssFootnotes class
SpssFootnotes class,SpssFootnotes class,SpssFootnotes class
SetValueAt method,SetValueAt method,SetValueAt method

Sets the value associated with the specified footnote.

Syntax

SpssFootnotes.SetValueAt(index,value)

Parameters

index | Index of the footnote
value | String

The index of a footnote does not correspond to the footnote marker but to the order of their references in the table.

Related Topics

GetValueAt Method (Python)


SpssLabels Class (Python)

SpssLabels class,SpssLabels class,SpssLabels class

The SpssLabels class provides access to the row labels and column labels contained in a pivot table. You need to use this object to format column or row labels (for example, making all "Total" labels bold) or to change labels (for example, changing the "Column %", "Row %" or "Total %" label). Generally speaking, you need to get the specified column or row label in order to locate specific statistics in an SpssDataCells object.

The row and column labels are represented as 2-dimensional arrays, referred to as the row labels array and column labels array. The arrays contain all row and column labels for the pivot table, including hidden labels. The row labels array has the same number of rows as the data cells array and the column labels array has the same number of columns as the data cells array. Row indexes for the row labels and column indexes for the column labels respectively correspond to the row and column indexes for the data cells.

Column Labels Array

The following diagrams illustrate how the column labels array is indexed. Note that where you see only one label (such as the dimension name Statistics) in the pivot table, the label can be accessed in all cells corresponding to the categories under it. In the case of Statistics, you can access it using (0,0), (0,1), (0,2), (0,3), (0,4) or (0,5) and any change you make to one cell is reflected in all these cells.

Column labels (after Showing All)
Column labels array indexing

Each column dimension in the column labels array is represented by a set of levels. The first level is the dimension label, the last level contains the category labels, and all the levels in between (if any) contain group labels.

Row Labels Array

The following diagrams illustrate how the row labels array is indexed. Note that where you see only one label (such as the dimension name Statistics) in the pivot table, the label can be accessed in all cells corresponding to the categories under it. In the case of Statistics, you can access it using (0,0), (1,0), (2,0), (3,0), (4,0) and (5,0) and any change you make to one cell is reflected in all these cells.

Row labels (after showing all)
Row labels array indexing

Each row dimension in the row labels array is represented by a set of levels. The first level is the dimension label, the last level contains the category labels, and all the levels in between (if any) contain group labels.

Notes

• To see all row and column labels in a pivot table, double-click on it and select View>Show All in the pivot table editor.

• Blank cells in the row label or column label arrays indicate that some categories (or subgroups) are not grouped.

Getting an SpssLabels Object

You get an SpssLabels object from the RowLabelArray or ColumnLabelArray method of an SpssPivotTable object, as in:

SpssLabels = SpssPivotTable.RowLabelArray()

Examples

This example assumes that PivotTable is an SpssPivotTable object, selects all row labels and bolds the text.

RowLabels = PivotTable.RowLabelArray()
for i in range(RowLabels.GetNumRows()):
   for j in range(1,RowLabels.GetNumColumns()):
      RowLabels.SetTextStyleAt(i,j,
         SpssClient.SpssTextStyleTypes.SpssTSBold)

This example assumes that PivotTable is an SpssPivotTable object, selects all column labels and bolds the text.

ColLabels = PivotTable.ColumnLabelArray()
for i in range(1,ColLabels.GetNumRows()):
   for j in range(ColLabels.GetNumColumns()):
      ColLabels.SetTextStyleAt(i,j,
         SpssClient.SpssTextStyleTypes.SpssTSBold)


BreakHere Method (Python)

BreakHere method,BreakHere method,BreakHere method
SpssLabels class,SpssLabels class,SpssLabels class
SpssLabels class,SpssLabels class,SpssLabels class
BreakHere method,BreakHere method,BreakHere method

Sets the break location for printing large pivot tables. The break occurs after the specified category.

Syntax

SpssLabels.BreakHere(breakcat)

Parameters

breakcat Index of category to break on


GetBackgroundColorAt Method (Python)

GetBackgroundColorAt method,GetBackgroundColorAt method,GetBackgroundColorAt method
SpssLabels class,SpssLabels class,SpssLabels class
SpssLabels class,SpssLabels class,SpssLabels class
GetBackgroundColorAt method,GetBackgroundColorAt method,GetBackgroundColorAt method

Returns the background color of the specified row/column label.

Syntax

SpssLabels.GetBackgroundColorAt(row,column)

Parameters

row | Row index in the label array
column | Column index in the label array

Returns

The color is returned as an integer. See the topic Setting Color Values (Python) for more information.

Related Topics

GetForegroundColorAt Method (Python)
GetTextColorAt Method (Python)
SetBackgroundColorAt Method (Python)
SetForegroundColorAt Method (Python)
SetTextColorAt Method (Python)


GetBottomMarginAt Method (Python)

GetBottomMarginAt method,GetBottomMarginAt method,GetBottomMarginAt method
SpssLabels class,SpssLabels class,SpssLabels class
SpssLabels class,SpssLabels class,SpssLabels class
GetBottomMarginAt method,GetBottomMarginAt method,GetBottomMarginAt method

Returns the bottom margin of the specified row/column label. The unit is the point (1/72 inch).

Syntax

SpssLabels.GetBottomMarginAt(row,column)

Parameters

row | Row index in the label array
column | Column index in the label array

Related Topics

GetLeftMarginAt Method (Python)
GetRightMarginAt Method (Python)
GetTopMarginAt Method (Python)
SetBottomMarginAt Method (Python)
SetLeftMarginAt Method (Python)
SetRightMarginAt Method (Python)
SetTopMarginAt Method (Python)


GetColumnLabelWidthAt Method (Python)

GetColumnLabelWidthAt method,GetColumnLabelWidthAt method,GetColumnLabelWidthAt method
SpssLabels class,SpssLabels class,SpssLabels class
SpssLabels class,SpssLabels class,SpssLabels class
GetColumnLabelWidthAt method,GetColumnLabelWidthAt method,GetColumnLabelWidthAt method

Returns the width of the column labels for the level containing the current label. The unit is the point (1/72 inch).

Syntax

SpssLabels.GetColumnLabelWidthAt(row,column)

Parameters

row | Row index in the label array
column | Column index in the label array

Related Topics

Autofit Method (Python)
SetDataCellWidths Method (Python)
ReSizeColumn Method (Python)
GetRowLabelWidthAt Method (Python)
GetTextWidthAt Method (Python)
SetColumnLabelWidthAt Method (Python)
SetRowLabelWidthAt Method (Python)


GetForegroundColorAt Method (Python)

GetForegroundColorAt method,GetForegroundColorAt method,GetForegroundColorAt method
SpssLabels class,SpssLabels class,SpssLabels class
SpssLabels class,SpssLabels class,SpssLabels class
GetForegroundColorAt method,GetForegroundColorAt method,GetForegroundColorAt method

This method is deprecated in release 17.0. Use the GetTextColorAt method instead.

Related Topics

GetBackgroundColorAt Method (Python)
GetTextColorAt Method (Python)
SetBackgroundColorAt Method (Python)
SetForegroundColorAt Method (Python)
SetTextColorAt Method (Python)


GetHAlignAt Method (Python)

GetHAlignAt method,GetHAlignAt method,GetHAlignAt method
SpssLabels class,SpssLabels class,SpssLabels class
SpssLabels class,SpssLabels class,SpssLabels class
GetHAlignAt method,GetHAlignAt method,GetHAlignAt method
alignment,alignment,alignment
cells,cells,cells
alignment,alignment,alignment
labels,labels,labels
alignment,alignment,alignment

Returns the horizontal alignment of the specified row/column label.

Syntax

SpssLabels.GetHAlignAt(row,column)

Parameters

row | Row index in the label array
column | Column index in the label array

Returns

SpssClient.SpssHAlignTypes.SpssHAlLeft | Left
SpssClient.SpssHAlignTypes.SpssHAlRight | Right
SpssClient.SpssHAlignTypes.SpssHAlCenter | Center
SpssClient.SpssHAlignTypes.SpssHAlMixed | Mixed
SpssClient.SpssHAlignTypes.SpssHAlDecimal | Decimal

Related Topics

GetVAlignAt Method (Python)
SetHAlignAt Method (Python)
SetVAlignAt Method (Python)


GetLeftMarginAt Method (Python)

GetLeftMarginAt method,GetLeftMarginAt method,GetLeftMarginAt method
SpssLabels class,SpssLabels class,SpssLabels class
SpssLabels class,SpssLabels class,SpssLabels class
GetLeftMarginAt method,GetLeftMarginAt method,GetLeftMarginAt method

Returns the left margin of the specified row/column label. The unit is the point (1/72 inch).

Syntax

SpssLabels.GetLeftMarginAt(row,column)

Parameters

row | Row index in the label array
column | Column index in the label array

Related Topics

GetBottomMarginAt Method (Python)
GetRightMarginAt Method (Python)
GetTopMarginAt Method (Python)
SetBottomMarginAt Method (Python)
SetLeftMarginAt Method (Python)
SetRightMarginAt Method (Python)
SetTopMarginAt Method (Python)


GetNumColumns Method (Python)

GetNumColumns method,GetNumColumns method,GetNumColumns method
SpssLabels class,SpssLabels class,SpssLabels class
SpssLabels class,SpssLabels class,SpssLabels class
GetNumColumns method,GetNumColumns method,GetNumColumns method

Returns the number of columns in the row/column labels object.

Syntax

SpssLabels.GetNumColumns()

Related Topics

GetNumRows Method (Python)


GetNumRows Method (Python)

GetNumRows method,GetNumRows method,GetNumRows method
SpssLabels class,SpssLabels class,SpssLabels class
SpssLabels class,SpssLabels class,SpssLabels class
GetNumRows method,GetNumRows method,GetNumRows method

Returns the number of rows in the row/column labels object.

Syntax

SpssLabels.GetNumRows()

Related Topics

GetNumColumns Method (Python)


GetReferredFootnotesAt Method (Python)

GetReferredFootnotesAt method,GetReferredFootnotesAt method,GetReferredFootnotesAt method
SpssLabels class,SpssLabels class,SpssLabels class
SpssLabels class,SpssLabels class,SpssLabels class
GetReferredFootnotesAt method,GetReferredFootnotesAt method,GetReferredFootnotesAt method

Returns an SpssFootnotes object, which allows access to all the footnotes referred to by the specified label cell.

• The returned footnotes array is a subset of the array returned by the FootnotesArray method of the SpssPivotTable class. You can manipulate the subset using the same properties and methods, but the index of a footnote in this array is in no way related to the index of the same footnote when accessed from the pivot table.

Syntax

SpssFootnotes=SpssLabels.GetReferredFootnotesAt(row,column)

Parameters

row | Row index in the label array
column | Column index in the label array


GetRightMarginAt Method (Python)

GetRightMarginAt method,GetRightMarginAt method,GetRightMarginAt method
SpssLabels class,SpssLabels class,SpssLabels class
SpssLabels class,SpssLabels class,SpssLabels class
GetRightMarginAt method,GetRightMarginAt method,GetRightMarginAt method

Returns the right margin of the specified row/column label. The unit is the point (1/72 inch).

Syntax

SpssLabels.GetRightMarginAt(row,column)

Parameters

row | Row index in the label array
column | Column index in the label array

Related Topics

GetBottomMarginAt Method (Python)
GetLeftMarginAt Method (Python)
GetTopMarginAt Method (Python)
SetBottomMarginAt Method (Python)
SetLeftMarginAt Method (Python)
SetRightMarginAt Method (Python)
SetTopMarginAt Method (Python)


GetRowLabelWidthAt Method (Python)

GetRowLabelWidthAt method,GetRowLabelWidthAt method,GetRowLabelWidthAt method
SpssLabels class,SpssLabels class,SpssLabels class
SpssLabels class,SpssLabels class,SpssLabels class
GetRowLabelWidthAt method,GetRowLabelWidthAt method,GetRowLabelWidthAt method

Returns the width of the row labels for the level containing the current label. The unit is the point (1/72 inch).

Syntax

SpssLabels.GetRowLabelWidthAt(row,column)

Parameters

row | Row index in the label array
column | Column index in the label array

Related Topics

Autofit Method (Python)
SetDataCellWidths Method (Python)
ReSizeColumn Method (Python)
GetColumnLabelWidthAt Method (Python)
GetTextWidthAt Method (Python)
SetColumnLabelWidthAt Method (Python)
SetRowLabelWidthAt Method (Python)


GetTextColorAt Method (Python)

GetTextColorAt method,GetTextColorAt method,GetTextColorAt method
SpssLabels class,SpssLabels class,SpssLabels class
SpssLabels class,SpssLabels class,SpssLabels class
GetTextColorAt method,GetTextColorAt method,GetTextColorAt method

Returns the color of the text in the specified row/column label.

Syntax

SpssLabels.GetTextColorAt(row,column)

Parameters

row | Row index in the label array
column | Column index in the label array

Returns

The color is returned as an integer. See the topic Setting Color Values (Python) for more information.

Related Topics

GetBackgroundColorAt Method (Python)
GetForegroundColorAt Method (Python)
SetBackgroundColorAt Method (Python)
SetForegroundColorAt Method (Python)
SetTextColorAt Method (Python)
GetTextFontAt Method (Python)
GetTextHiddenAt Method (Python)
GetTextSizeAt Method (Python)
GetTextStyleAt Method (Python)
GetTextUnderlinedAt Method (Python)
GetTextWidthAt Method (Python)
SetTextFontAt Method (Python)
SetTextHiddenAt Method (Python)
SetTextSizeAt Method (Python)
SetTextStyleAt Method (Python)
SetTextUnderlinedAt Method (Python)


GetTextFontAt Method (Python)

GetTextFontAt method,GetTextFontAt method,GetTextFontAt method
SpssLabels class,SpssLabels class,SpssLabels class
SpssLabels class,SpssLabels class,SpssLabels class
GetTextFontAt method,GetTextFontAt method,GetTextFontAt method

Returns the font of the text in the specified row/column label, as a string.

Syntax

SpssLabels.GetTextFontAt(row,column)

Parameters

row | Row index in the label array
column | Column index in the label array

Related Topics

GetTextColorAt Method (Python)
GetTextHiddenAt Method (Python)
GetTextSizeAt Method (Python)
GetTextStyleAt Method (Python)
GetTextUnderlinedAt Method (Python)
GetTextWidthAt Method (Python)
SetTextColorAt Method (Python)
SetTextFontAt Method (Python)
SetTextHiddenAt Method (Python)
SetTextSizeAt Method (Python)
SetTextStyleAt Method (Python)
SetTextUnderlinedAt Method (Python)


GetTextHiddenAt Method (Python)

GetTextHiddenAt method,GetTextHiddenAt method,GetTextHiddenAt method
SpssLabels class,SpssLabels class,SpssLabels class
SpssLabels class,SpssLabels class,SpssLabels class
GetTextHiddenAt method,GetTextHiddenAt method,GetTextHiddenAt method

Returns the hidden effect of the text for the specified row/column label. The result is a Boolean.

Syntax

SpssLabels.GetTextHiddenAt(row,column)

Parameters

row | Row index in the label array
column | Column index in the label array

Returns

True | Hidden
False | Not hidden

Related Topics

GetTextColorAt Method (Python)
GetTextFontAt Method (Python)
GetTextSizeAt Method (Python)
GetTextStyleAt Method (Python)
GetTextUnderlinedAt Method (Python)
GetTextWidthAt Method (Python)
SetTextColorAt Method (Python)
SetTextFontAt Method (Python)
SetTextHiddenAt Method (Python)
SetTextSizeAt Method (Python)
SetTextStyleAt Method (Python)
SetTextUnderlinedAt Method (Python)


GetTextSizeAt Method (Python)

GetTextSizeAt method,GetTextSizeAt method,GetTextSizeAt method
SpssLabels class,SpssLabels class,SpssLabels class
SpssLabels class,SpssLabels class,SpssLabels class
GetTextSizeAt method,GetTextSizeAt method,GetTextSizeAt method

Returns the font size of the text for the specified row/column label.

Syntax

SpssLabels.GetTextSizeAt(row,column)

Parameters

row | Row index in the label array
column | Column index in the label array

Related Topics

GetTextColorAt Method (Python)
GetTextFontAt Method (Python)
GetTextHiddenAt Method (Python)
GetTextStyleAt Method (Python)
GetTextUnderlinedAt Method (Python)
GetTextWidthAt Method (Python)
SetTextColorAt Method (Python)
SetTextFontAt Method (Python)
SetTextHiddenAt Method (Python)
SetTextSizeAt Method (Python)
SetTextStyleAt Method (Python)
SetTextUnderlinedAt Method (Python)


GetTextStyleAt Method (Python)

GetTextStyleAt method,GetTextStyleAt method,GetTextStyleAt method
SpssLabels class,SpssLabels class,SpssLabels class
SpssLabels class,SpssLabels class,SpssLabels class
GetTextStyleAt method,GetTextStyleAt method,GetTextStyleAt method

Returns the bold or italic style of the text in the specified row/column label.

Syntax

SpssLabels.GetTextStyleAt(row,column)

Parameters

row | Row index in the label array
column | Column index in the label array

Returns

SpssClient.SpssTextStyleTypes.SpssTSRegular | Regular
SpssClient.SpssTextStyleTypes.SpssTSItalic | Italic
SpssClient.SpssTextStyleTypes.SpssTSBold | Bold
SpssClient.SpssTextStyleTypes.SpssTSBoldItalic | Bold Italic

Related Topics

GetTextColorAt Method (Python)
GetTextFontAt Method (Python)
GetTextHiddenAt Method (Python)
GetTextSizeAt Method (Python)
GetTextUnderlinedAt Method (Python)
GetTextWidthAt Method (Python)
SetTextColorAt Method (Python)
SetTextFontAt Method (Python)
SetTextHiddenAt Method (Python)
SetTextSizeAt Method (Python)
SetTextStyleAt Method (Python)
SetTextUnderlinedAt Method (Python)


GetTextUnderlinedAt Method (Python)

GetTextUnderlinedAt method,GetTextUnderlinedAt method,GetTextUnderlinedAt method
SpssLabels class,SpssLabels class,SpssLabels class
SpssLabels class,SpssLabels class,SpssLabels class
GetTextUnderlinedAt method,GetTextUnderlinedAt method,GetTextUnderlinedAt method

Returns the underlined effect of the text in the specified row/column label. The result is a Boolean.

Syntax

SpssLabels.GetTextUnderlinedAt(row,column)

Parameters

row | Row index in the label array
column | Column index in the label array

Returns

True | Underlined
False | Not underlined

Related Topics

GetTextColorAt Method (Python)
GetTextFontAt Method (Python)
GetTextHiddenAt Method (Python)
GetTextSizeAt Method (Python)
GetTextStyleAt Method (Python)
GetTextWidthAt Method (Python)
SetTextColorAt Method (Python)
SetTextFontAt Method (Python)
SetTextHiddenAt Method (Python)
SetTextSizeAt Method (Python)
SetTextStyleAt Method (Python)
SetTextUnderlinedAt Method (Python)


GetTextWidthAt Method (Python)

GetTextWidthAt method,GetTextWidthAt method,GetTextWidthAt method
SpssLabels class,SpssLabels class,SpssLabels class
SpssLabels class,SpssLabels class,SpssLabels class
GetTextWidthAt method,GetTextWidthAt method,GetTextWidthAt method

Returns the width of the text in the indexed row/column label, as if the text were unwrapped. The unit is the point (1/72 inch).

Syntax

SpssLabels.GetTextWidthAt(row,column)

Parameters

row | Row index in the label array
column | Column index in the label array

Related Topics

Autofit Method (Python)
SetDataCellWidths Method (Python)
ReSizeColumn Method (Python)
GetColumnLabelWidthAt Method (Python)
GetRowLabelWidthAt Method (Python)
SetColumnLabelWidthAt Method (Python)
SetRowLabelWidthAt Method (Python)
GetTextColorAt Method (Python)
GetTextFontAt Method (Python)
GetTextHiddenAt Method (Python)
GetTextSizeAt Method (Python)
GetTextStyleAt Method (Python)
GetTextUnderlinedAt Method (Python)
SetTextColorAt Method (Python)
SetTextFontAt Method (Python)
SetTextHiddenAt Method (Python)
SetTextSizeAt Method (Python)
SetTextStyleAt Method (Python)
SetTextUnderlinedAt Method (Python)


GetTopMarginAt Method (Python)

GetTopMarginAt method,GetTopMarginAt method,GetTopMarginAt method
SpssLabels class,SpssLabels class,SpssLabels class
SpssLabels class,SpssLabels class,SpssLabels class
GetTopMarginAt method,GetTopMarginAt method,GetTopMarginAt method

Returns the top margin of the specified row/column label. The unit is the point (1/72 inch).

Syntax

SpssLabels.GetTopMarginAt(row,column)

Parameters

row | Row index in the label array
column | Column index in the label array

Related Topics

GetBottomMarginAt Method (Python)
GetLeftMarginAt Method (Python)
GetRightMarginAt Method (Python)
SetBottomMarginAt Method (Python)
SetLeftMarginAt Method (Python)
SetRightMarginAt Method (Python)
SetTopMarginAt Method (Python)


GetVAlignAt Method (Python)

GetVAlignAt method,GetVAlignAt method,GetVAlignAt method
SpssLabels class,SpssLabels class,SpssLabels class
SpssLabels class,SpssLabels class,SpssLabels class
GetVAlignAt method,GetVAlignAt method,GetVAlignAt method
alignment,alignment,alignment
vertical,vertical,vertical
alignment,alignment,alignment

Returns the vertical alignment of the specified row/column label.

Syntax

SpssLabels.GetVAlignAt(row,column)

Parameters

row | Row index in the label array
column | Column index in the label array

Returns

SpssClient.SpssVAlignTypes.SpssVAlTop | Top
SpssClient.SpssVAlignTypes.SpssVAlBottom | Bottom
SpssClient.SpssVAlignTypes.SpssVAlCenter | Center

Related Topics

GetHAlignAt Method (Python)
SetHAlignAt Method (Python)
SetVAlignAt Method (Python)


GetValueAt Method (Python)

GetValueAt method,GetValueAt method,GetValueAt method
SpssLabels class,SpssLabels class,SpssLabels class
SpssLabels class,SpssLabels class,SpssLabels class
GetValueAt method,GetValueAt method,GetValueAt method

Returns the value of the specified row/column label, as a unicode string.

Syntax

SpssLabels.GetValueAt(row,column)

Parameters

row | Row index in the label array
column | Column index in the label array

Related Topics

SetValueAt Method (Python)


HideAllLabelsInDimensionAt Method (Python)

HideAllLabelsInDimensionAt method,HideAllLabelsInDimensionAt method,HideAllLabelsInDimensionAt method
SpssLabels class,SpssLabels class,SpssLabels class
SpssLabels class,SpssLabels class,SpssLabels class
HideAllLabelsInDimensionAt method,HideAllLabelsInDimensionAt method,HideAllLabelsInDimensionAt method

Hides all labels in the same dimension as the specified label.

Syntax

SpssLabels.HideAllLabelsInDimensionAt(row,column)

Parameters

row | Row index in the label array
column | Column index in the label array

Related Topics

HideCaption Method (Python)
HideFootnote Method (Python)
HideTitle Method (Python)
HideFootnotesAt Method (Python)
HideLabel Method (Python)
HideFootnotesAt Method (Python)
HideLabelsInDimensionAt Method (Python)
HideLabelsWithDataAt Method (Python)
HideFootnotesAt Method (Python)


HideFootnotesAt Method (Python)

HideFootnotesAt method,HideFootnotesAt method,HideFootnotesAt method
SpssLabels class,SpssLabels class,SpssLabels class
SpssLabels class,SpssLabels class,SpssLabels class
HideFootnotesAt method,HideFootnotesAt method,HideFootnotesAt method

Hides all footnotes referenced by the specified row/column label.

Syntax

SpssLabels.HideFootnotesAt(row,column)

Parameters

row | Row index in the label array
column | Column index in the label array

Related Topics

HideCaption Method (Python)
HideFootnote Method (Python)
HideTitle Method (Python)
HideFootnotesAt Method (Python)
HideLabel Method (Python)
HideAllLabelsInDimensionAt Method (Python)
HideLabelsInDimensionAt Method (Python)
HideLabelsWithDataAt Method (Python)
HideFootnotesAt Method (Python)


HideLabelsInDimensionAt Method (Python)

HideLabelsInDimensionAt method,HideLabelsInDimensionAt method,HideLabelsInDimensionAt method
SpssLabels class,SpssLabels class,SpssLabels class
SpssLabels class,SpssLabels class,SpssLabels class
HideLabelsInDimensionAt method,HideLabelsInDimensionAt method,HideLabelsInDimensionAt method

For row labels, this method finds all instances of the specified label (within the dimension containing the label) in the labels array and hides all associated rows of the array. For column labels, this method finds all instances of the specified label (within the dimension containing the label) in the labels array and hides all associated columns of the array.

Syntax

SpssLabels.HideLabelsInDimensionAt(row,column)

Parameters

row | Row index in the label array
column | Column index in the label array

Related Topics

HideCaption Method (Python)
HideFootnote Method (Python)
HideTitle Method (Python)
HideFootnotesAt Method (Python)
HideLabel Method (Python)
HideAllLabelsInDimensionAt Method (Python)
HideFootnotesAt Method (Python)
HideLabelsWithDataAt Method (Python)
HideFootnotesAt Method (Python)


HideLabelsWithDataAt Method (Python)

HideLabelsWithDataAt method,HideLabelsWithDataAt method,HideLabelsWithDataAt method
SpssLabels class,SpssLabels class,SpssLabels class
SpssLabels class,SpssLabels class,SpssLabels class
HideLabelsWithDataAt method,HideLabelsWithDataAt method,HideLabelsWithDataAt method

Hides the specified label and all data associated with it.

Syntax

SpssLabels.HideLabelsWithDataAt(row,column)

Parameters

row | Row index in the label array
column | Column index in the label array

Related Topics

HideCaption Method (Python)
HideFootnote Method (Python)
HideTitle Method (Python)
HideFootnotesAt Method (Python)
HideLabel Method (Python)
HideAllLabelsInDimensionAt Method (Python)
HideFootnotesAt Method (Python)
HideLabelsInDimensionAt Method (Python)
HideFootnotesAt Method (Python)


InsertBefore Method (Python)

InsertBefore method,InsertBefore method,InsertBefore method
SpssLabels class,SpssLabels class,SpssLabels class
SpssLabels class,SpssLabels class,SpssLabels class
InsertBefore method,InsertBefore method,InsertBefore method

Moves the selected column(s) or rows before a specified column or row. (The data are moved together with the labels.)

• The selected and specified labels must be in the same dimension and must be either category or group labels. (That is, they cannot be dimension names.)

• If no labels in the same dimenison are selected, the method is ignored.

Syntax

SpssLabels.InsertBefore(row,column)

Parameters

row | Row index in the label array
column | Column index in the label array

Related Topics

Swap Method (Python)


InsertNewFootnoteAt Method (Python)

InsertNewFootnoteAt method,InsertNewFootnoteAt method,InsertNewFootnoteAt method
SpssLabels class,SpssLabels class,SpssLabels class
SpssLabels class,SpssLabels class,SpssLabels class
InsertNewFootnoteAt method,InsertNewFootnoteAt method,InsertNewFootnoteAt method

Inserts a new footnote for the specified row/column label.

Syntax

index=SpssLabels.InsertNewFootnoteAt(row,column,string)

Parameters

row | Row index in the label array
column | Column index in the label array
string | New footnote text

Return Value

index Integer (to be used to insert the footnote in other cells if it is a shared footnote)


InsertSharedFootnoteAt Method (Python)

InsertSharedFootnoteAt method,InsertSharedFootnoteAt method,InsertSharedFootnoteAt method
SpssLabels class,SpssLabels class,SpssLabels class
SpssLabels class,SpssLabels class,SpssLabels class
InsertSharedFootnoteAt method,InsertSharedFootnoteAt method,InsertSharedFootnoteAt method

Inserts a shared footnote for the specified row/column label.

Syntax

SpssLabels.InsertSharedFootnoteAt(row,column,index)

Parameters

row | Row index in the label array.
column | Column index in the label array
index | Index of the footnote

The index is the value returned by the InsertNewFootnoteAt method and corresponds to the footnote marker.


KeepTogether Method (Python)

KeepTogether method,KeepTogether method,KeepTogether method
SpssLabels class,SpssLabels class,SpssLabels class
SpssLabels class,SpssLabels class,SpssLabels class
KeepTogether method,KeepTogether method,KeepTogether method

Prevents a page break from occurring within the range specified when printing large pivot tables.

Syntax

SpssLabels.KeepTogether(from,to)

Parameters

from | Index of starting category
to | Index of ending category


RemoveBreakHere Method (Python)

RemoveBreakHere method,RemoveBreakHere method,RemoveBreakHere method
SpssLabels class,SpssLabels class,SpssLabels class
SpssLabels class,SpssLabels class,SpssLabels class
RemoveBreakHere method,RemoveBreakHere method,RemoveBreakHere method

Clears a previously set break location.

Syntax

SpssLabels.RemoveBreakHere(breakcat)

Parameters

breakcat Index of category to break on


RemoveKeepTogether Method (Python)

RemoveKeepTogether method,RemoveKeepTogether method,RemoveKeepTogether method
SpssLabels class,SpssLabels class,SpssLabels class
SpssLabels class,SpssLabels class,SpssLabels class
RemoveKeepTogether method,RemoveKeepTogether method,RemoveKeepTogether method

Negates the effects of a previous call to KeepTogether.

Syntax

SpssLabels.RemoveKeepTogether(from,to)

Parameters

from | Index of starting category
to | Index of ending category


SelectDataUnderLabelAt Method (Python)

SelectDataUnderLabelAt method,SelectDataUnderLabelAt method,SelectDataUnderLabelAt method
SpssLabels class,SpssLabels class,SpssLabels class
SpssLabels class,SpssLabels class,SpssLabels class
SelectDataUnderLabelAt method,SelectDataUnderLabelAt method,SelectDataUnderLabelAt method

Selects the data under the indexed label (but not the label), in addition to whatever has been selected previously.

Syntax

SpssLabels.SelectDataUnderLabelAt(row,column)

Parameters

row | Row index in the label array
column | Column index in the label array


SelectLabelAt Method (Python)

SelectLabelAt method,SelectLabelAt method,SelectLabelAt method
SpssLabels class,SpssLabels class,SpssLabels class
SpssLabels class,SpssLabels class,SpssLabels class
SelectLabelAt method,SelectLabelAt method,SelectLabelAt method

Selects the indexed label, in addition to previously selected elements.

Syntax

SpssLabels.SelectLabelAt(row,column)

Parameters

row | Row index in the label array
column | Column index in the label array


SelectLabelDataAt Method (Python)

SelectLabelDataAt method,SelectLabelDataAt method,SelectLabelDataAt method
SpssLabels,SpssLabels,SpssLabels
SpssLabels,SpssLabels,SpssLabels
SelectLabelDataAt method,SelectLabelDataAt method,SelectLabelDataAt method

Selects the indexed label and all corresponding data in the category, in addition to whatever has been selected previously.

Syntax

SpssLabels.SelectLabelDataAt(row,column)

Parameters

row | Row index in the label array
column | Column index in the label array


SelectReferredFootnotesAt Method (Python)

SelectReferredFootnotesAt method,SelectReferredFootnotesAt method,SelectReferredFootnotesAt method
SpssLabels class,SpssLabels class,SpssLabels class
SpssLabels class,SpssLabels class,SpssLabels class
SelectReferredFootnotesAt method,SelectReferredFootnotesAt method,SelectReferredFootnotesAt method

Selects all the footnotes referenced by the specified label cell, in addition to previously selected elements.

Syntax

SpssLabels.SelectReferredFootnotesAt(row,column)

Parameters

row | Row index in the label array
column | Column index in the label array


SetBackgroundColorAt Method (Python)

SetBackgroundColorAt method,SetBackgroundColorAt method,SetBackgroundColorAt method
SpssLabels class,SpssLabels class,SpssLabels class
SpssLabels class,SpssLabels class,SpssLabels class
SetBackgroundColorAt method,SetBackgroundColorAt method,SetBackgroundColorAt method

Sets the background color of the specified row/column label.

Syntax

SpssLabels.SetBackgroundColorAt(row,column,color)

Parameters

row | Row index in the label array
column | Column index in the label array
color | Integer representation of the color

For information on setting color values, see Setting Color Values.

Related Topics

GetBackgroundColorAt Method (Python)
GetForegroundColorAt Method (Python)
GetTextColorAt Method (Python)
SetForegroundColorAt Method (Python)
SetTextColorAt Method (Python)


SetBottomMarginAt Method (Python)

SetBottomMarginAt method,SetBottomMarginAt method,SetBottomMarginAt method
SpssLabels class,SpssLabels class,SpssLabels class
SpssLabels class,SpssLabels class,SpssLabels class
SetBottomMarginAt method,SetBottomMarginAt method,SetBottomMarginAt method

Sets the bottom margin of the specified row/column label.

Syntax

SpssLabels.SetBottomMarginAt(row,column,margin)

Parameters

row | Row index in the label array
column | Column index in the label array
margin | An integer. The unit is the point (1/72 inch).

Related Topics

GetBottomMarginAt Method (Python)
GetLeftMarginAt Method (Python)
GetRightMarginAt Method (Python)
GetTopMarginAt Method (Python)
SetLeftMarginAt Method (Python)
SetRightMarginAt Method (Python)
SetTopMarginAt Method (Python)


SetColumnLabelWidthAt Method (Python)

SetColumnLabelWidthAt method,SetColumnLabelWidthAt method,SetColumnLabelWidthAt method
SpssLabels class,SpssLabels class,SpssLabels class
SpssLabels class,SpssLabels class,SpssLabels class
SetColumnLabelWidthAt method,SetColumnLabelWidthAt method,SetColumnLabelWidthAt method

Sets the width of the specified column label. This property will also set the widths of all column labels and data cells that are in the same column of the table as the specified label. To set column widths independently, use the ReSizeColumn method in the SpssDataCells class.

Syntax

SpssLabels.SetColumnLabelWidthAt(row,column,width)

Parameters

row | Row index in the label array
column | Column index in the label array
width | An integer. The unit is the point (1/72 inch).

Related Topics

Autofit Method (Python)
SetDataCellWidths Method (Python)
ReSizeColumn Method (Python)
GetColumnLabelWidthAt Method (Python)
GetRowLabelWidthAt Method (Python)
GetTextWidthAt Method (Python)
SetRowLabelWidthAt Method (Python)


SetForegroundColorAt Method (Python)

SetForegroundColorAt method,SetForegroundColorAt method,SetForegroundColorAt method
SpssLabels class,SpssLabels class,SpssLabels class
SpssLabels class,SpssLabels class,SpssLabels class
SetForegroundColorAt method,SetForegroundColorAt method,SetForegroundColorAt method

This method is deprecated in release 17.0. Use the SetTextColorAt method instead.

Related Topics

GetBackgroundColorAt Method (Python)
GetForegroundColorAt Method (Python)
GetTextColorAt Method (Python)
SetBackgroundColorAt Method (Python)
SetTextColorAt Method (Python)


SetHAlignAt Method (Python)

SetHAlignAt method,SetHAlignAt method,SetHAlignAt method
SpssLabels class,SpssLabels class,SpssLabels class
SpssLabels class,SpssLabels class,SpssLabels class
SetHAlignAt method,SetHAlignAt method,SetHAlignAt method
alignment,alignment,alignment
cells,cells,cells
alignment,alignment,alignment
labels,labels,labels
alignment,alignment,alignment

Sets the horizontal alignment of the specified row/column label.

Syntax

SpssLabels.SetHAlignAt(row,column,alignment)

Parameters

row | Row index in the label array
column | Column index in the label array

Set the value of alignment to one of the following:

SpssClient.SpssHAlignTypes.SpssHAlLeft | Left
SpssClient.SpssHAlignTypes.SpssHAlRight | Right
SpssClient.SpssHAlignTypes.SpssHAlCenter | Center
SpssClient.SpssHAlignTypes.SpssHAlMixed | Mixed
SpssClient.SpssHAlignTypes.SpssHAlDecimal | Decimal

Related Topics

GetHAlignAt Method (Python)
GetVAlignAt Method (Python)
SetVAlignAt Method (Python)


SetLeftMarginAt Method (Python)

SetLeftMarginAt method,SetLeftMarginAt method,SetLeftMarginAt method
SpssLabels class,SpssLabels class,SpssLabels class
SpssLabels class,SpssLabels class,SpssLabels class
SetLeftMarginAt method,SetLeftMarginAt method,SetLeftMarginAt method

Sets the left margin of the specified row/column label.

Syntax

SpssLabels.SetLeftMarginAt(row,column,margin)

Parameters

row | Row index in the label array
column | Column index in the label array
margin | An integer. The unit is the point (1/72 inch).

Related Topics

GetBottomMarginAt Method (Python)
GetLeftMarginAt Method (Python)
GetRightMarginAt Method (Python)
GetTopMarginAt Method (Python)
SetBottomMarginAt Method (Python)
SetRightMarginAt Method (Python)
SetTopMarginAt Method (Python)


SetRightMarginAt Method (Python)

SetRightMarginAt method,SetRightMarginAt method,SetRightMarginAt method
SpssLabels class,SpssLabels class,SpssLabels class
SpssLabels class,SpssLabels class,SpssLabels class
SetRightMarginAt method,SetRightMarginAt method,SetRightMarginAt method

Sets the right margin of the specified row/column label.

Syntax

SpssLabels.SetRightMarginAt(row,column,margin)

Parameters

row | Row index in the label array
column | Column index in the label array
margin | An integer. The unit is the point (1/72 inch).

Related Topics

GetBottomMarginAt Method (Python)
GetLeftMarginAt Method (Python)
GetRightMarginAt Method (Python)
GetTopMarginAt Method (Python)
SetBottomMarginAt Method (Python)
SetLeftMarginAt Method (Python)
SetTopMarginAt Method (Python)


SetRowLabelWidthAt Method (Python)

SetRowLabelWidthAt method,SetRowLabelWidthAt method,SetRowLabelWidthAt method
SpssLabels class,SpssLabels class,SpssLabels class
SpssLabels class,SpssLabels class,SpssLabels class
SetRowLabelWidthAt method,SetRowLabelWidthAt method,SetRowLabelWidthAt method

Sets the width of the specified row label. This method will also set the widths of all row labels that are in the same column of the row label array as the specified label.

Syntax

SpssLabels.SetRowLabelWidthAt(row,column,width)

Parameters

row | Row index in the label array
column | Column index in the label array
width | An integer. The unit is the point (1/72 inch).

Related Topics

Autofit Method (Python)
SetDataCellWidths Method (Python)
ReSizeColumn Method (Python)
GetColumnLabelWidthAt Method (Python)
GetRowLabelWidthAt Method (Python)
GetTextWidthAt Method (Python)
SetColumnLabelWidthAt Method (Python)


SetTextColorAt Method (Python)

SetTextColorAt method,SetTextColorAt method,SetTextColorAt method
SpssLabels class,SpssLabels class,SpssLabels class
SpssLabels class,SpssLabels class,SpssLabels class
SetTextColorAt method,SetTextColorAt method,SetTextColorAt method

Sets the color of the text in the specified row/column label.

Syntax

SpssLabels.SetTextColorAt(row,column,color)

Parameters

row | Row index in the label array
column | Column index in the label array
color | Integer representation of the color

For information on setting color values, see Setting Color Values.

Related Topics

GetBackgroundColorAt Method (Python)
GetForegroundColorAt Method (Python)
GetTextColorAt Method (Python)
SetBackgroundColorAt Method (Python)
SetForegroundColorAt Method (Python)
GetTextFontAt Method (Python)
GetTextHiddenAt Method (Python)
GetTextSizeAt Method (Python)
GetTextStyleAt Method (Python)
GetTextUnderlinedAt Method (Python)
GetTextWidthAt Method (Python)
SetTextFontAt Method (Python)
SetTextHiddenAt Method (Python)
SetTextSizeAt Method (Python)
SetTextStyleAt Method (Python)
SetTextUnderlinedAt Method (Python)


SetTextFontAt Method (Python)

SetTextFontAt method,SetTextFontAt method,SetTextFontAt method
SpssLabels class,SpssLabels class,SpssLabels class
SpssLabels class,SpssLabels class,SpssLabels class
SetTextFontAt method,SetTextFontAt method,SetTextFontAt method

Sets the font of the text in the specified row/column label.

Syntax

SpssLabels.SetTextFontAt(row,column,fontname)

Parameters

row | Row index in the label array
column | Column index in the label array
fontname | Name of the font family, as a string. Available fonts are accessed from Format>Cell Properties in the pivot table editor.

Related Topics

GetTextColorAt Method (Python)
GetTextFontAt Method (Python)
GetTextHiddenAt Method (Python)
GetTextSizeAt Method (Python)
GetTextStyleAt Method (Python)
GetTextUnderlinedAt Method (Python)
GetTextWidthAt Method (Python)
SetTextColorAt Method (Python)
SetTextHiddenAt Method (Python)
SetTextSizeAt Method (Python)
SetTextStyleAt Method (Python)
SetTextUnderlinedAt Method (Python)


SetTextHiddenAt Method (Python)

SetTextHiddenAt method,SetTextHiddenAt method,SetTextHiddenAt method
SpssLabels class,SpssLabels class,SpssLabels class
SpssLabels class,SpssLabels class,SpssLabels class
SetTextHiddenAt method,SetTextHiddenAt method,SetTextHiddenAt method

Sets the hidden effect of the text for the specified row/column label.

Syntax

SpssLabels.SetTextHiddenAt(row,column,boolean)

Parameters

row | Row index in the label array
column | Column index in the label array
boolean | True for hidden, False for not hidden. True hides the cell associated with the label.

Related Topics

GetTextColorAt Method (Python)
GetTextFontAt Method (Python)
GetTextHiddenAt Method (Python)
GetTextSizeAt Method (Python)
GetTextStyleAt Method (Python)
GetTextUnderlinedAt Method (Python)
GetTextWidthAt Method (Python)
SetTextColorAt Method (Python)
SetTextFontAt Method (Python)
SetTextSizeAt Method (Python)
SetTextStyleAt Method (Python)
SetTextUnderlinedAt Method (Python)


SetTextSizeAt Method (Python)

SetTextSizeAt method,SetTextSizeAt method,SetTextSizeAt method
SpssLabels class,SpssLabels class,SpssLabels class
SpssLabels class,SpssLabels class,SpssLabels class
SetTextSizeAt method,SetTextSizeAt method,SetTextSizeAt method

Sets the font size of the text for the specified row/column label.

Syntax

SpssLabels.SetTextSizeAt(row,column,size)

Parameters

row | Row index in the label array
column | Column index in the label array
size | Size in points (integer)

Related Topics

GetTextColorAt Method (Python)
GetTextFontAt Method (Python)
GetTextHiddenAt Method (Python)
GetTextSizeAt Method (Python)
GetTextStyleAt Method (Python)
GetTextUnderlinedAt Method (Python)
GetTextWidthAt Method (Python)
SetTextColorAt Method (Python)
SetTextFontAt Method (Python)
SetTextHiddenAt Method (Python)
SetTextStyleAt Method (Python)
SetTextUnderlinedAt Method (Python)


SetTextStyleAt Method (Python)

SetTextStyleAt method,SetTextStyleAt method,SetTextStyleAt method
SpssLabels class,SpssLabels class,SpssLabels class
SpssLabels class,SpssLabels class,SpssLabels class
SetTextStyleAt method,SetTextStyleAt method,SetTextStyleAt method

Sets the bold or italic style of the text in the specified row/column label.

Syntax

SpssLabels.SetTextStyleAt(row,column,style)

Parameters

row | Row index in the label array
column | Column index in the label array

Set the value of style to one of the following:

SpssClient.SpssTextStyleTypes.SpssTSRegular | Regular
SpssClient.SpssTextStyleTypes.SpssTSItalic | Italic
SpssClient.SpssTextStyleTypes.SpssTSBold | Bold
SpssClient.SpssTextStyleTypes.SpssTSBoldItalic | Bold Italic

Related Topics

GetTextColorAt Method (Python)
GetTextFontAt Method (Python)
GetTextHiddenAt Method (Python)
GetTextSizeAt Method (Python)
GetTextStyleAt Method (Python)
GetTextUnderlinedAt Method (Python)
GetTextWidthAt Method (Python)
SetTextColorAt Method (Python)
SetTextFontAt Method (Python)
SetTextHiddenAt Method (Python)
SetTextSizeAt Method (Python)
SetTextUnderlinedAt Method (Python)


SetTextUnderlinedAt Method (Python)

SetTextUnderlinedAt method,SetTextUnderlinedAt method,SetTextUnderlinedAt method
SpssLabels class,SpssLabels class,SpssLabels class
SpssLabels class,SpssLabels class,SpssLabels class
SetTextUnderlinedAt method,SetTextUnderlinedAt method,SetTextUnderlinedAt method

Sets the underlined effect of the text in the specified row/column label.

Syntax

SpssLabels.SetTextUnderlinedAt(row,column,boolean)

Parameters

row | Row index in the label array
column | Column index in the label array
boolean | True for underlined, False for not underlined.

Related Topics

GetTextColorAt Method (Python)
GetTextFontAt Method (Python)
GetTextHiddenAt Method (Python)
GetTextSizeAt Method (Python)
GetTextStyleAt Method (Python)
GetTextUnderlinedAt Method (Python)
GetTextWidthAt Method (Python)
SetTextColorAt Method (Python)
SetTextFontAt Method (Python)
SetTextHiddenAt Method (Python)
SetTextSizeAt Method (Python)
SetTextStyleAt Method (Python)


SetTopMarginAt Method (Python)

SetTopMarginAt method,SetTopMarginAt method,SetTopMarginAt method
SpssLabels class,SpssLabels class,SpssLabels class
SpssLabels class,SpssLabels class,SpssLabels class
SetTopMarginAt method,SetTopMarginAt method,SetTopMarginAt method

Sets the top margin of the specified row/column label.

Syntax

SpssLabels.SetTopMarginAt(row,column,margin)

Parameters

row | Row index in the label array
column | Column index in the label array
margin | An integer. The unit is the point (1/72 inch).

Related Topics

GetBottomMarginAt Method (Python)
GetLeftMarginAt Method (Python)
GetRightMarginAt Method (Python)
GetTopMarginAt Method (Python)
SetBottomMarginAt Method (Python)
SetLeftMarginAt Method (Python)
SetRightMarginAt Method (Python)


SetVAlignAt Method (Python)

SetVAlignAt method,SetVAlignAt method,SetVAlignAt method
SpssLabels class,SpssLabels class,SpssLabels class
SpssLabels class,SpssLabels class,SpssLabels class
SetVAlignAt method,SetVAlignAt method,SetVAlignAt method
alignment,alignment,alignment
vertical,vertical,vertical
alignment,alignment,alignment

Sets the vertical alignment of the specified row/column label.

Syntax

SpssLabels.SetVAlignAt(row,column,alignment)

Parameters

row | Row index in the label array
column | Column index in the label array

Set the value of alignment to one of the following:

SpssClient.SpssVAlignTypes.SpssVAlTop | Top
SpssClient.SpssVAlignTypes.SpssVAlBottom | Bottom
SpssClient.SpssVAlignTypes.SpssVAlCenter | Center

Related Topics

GetHAlignAt Method (Python)
GetVAlignAt Method (Python)
SetHAlignAt Method (Python)


SetValueAt Method (Python)

SetValueAt method,SetValueAt method,SetValueAt method
SpssLabels class,SpssLabels class,SpssLabels class
SpssLabels class,SpssLabels class,SpssLabels class
SetValueAt method,SetValueAt method,SetValueAt method

Sets the value of the specified row/column label.

Syntax

SpssLabels.SetValueAt(row,column,value)

Parameters

row | Row index in the label array
column | Column index in the label array
value | String

Related Topics

GetValueAt Method (Python)


ShowAllLabelsAndDataInDimensionAt Method (Python)

ShowAllLabelsAndDataInDimensionAt method,ShowAllLabelsAndDataInDimensionAt method,ShowAllLabelsAndDataInDimensionAt method
SpssLabels class,SpssLabels class,SpssLabels class
SpssLabels class,SpssLabels class,SpssLabels class
ShowAllLabelsAndDataInDimensionAt method,ShowAllLabelsAndDataInDimensionAt method,ShowAllLabelsAndDataInDimensionAt method

Shows all labels and data in the dimension that contains the specified label.

Syntax

SpssLabels.ShowAllLabelsAndDataInDimensionAt(row,column)

Parameters

row | Row index in the label array
column | Column index in the label array

Related Topics

ShowAll Method (Python)
ShowAllFootnotes Method (Python)
ShowCaption Method (Python)
ShowFootnote Method (Python)
ShowTitle Method (Python)
ShowFootnotesAt Method (Python)
ShowAllLabelsInDimensionAt Method (Python)
ShowFootnotesAt Method (Python)
ShowHiddenDimensionLabelAt Method (Python)
ShowFootnotesAt Method (Python)


ShowAllLabelsInDimensionAt Method (Python)

ShowAllLabelsInDimensionAt method,ShowAllLabelsInDimensionAt method,ShowAllLabelsInDimensionAt method
SpssLabels class,SpssLabels class,SpssLabels class
SpssLabels class,SpssLabels class,SpssLabels class
ShowAllLabelsInDimensionAt method,ShowAllLabelsInDimensionAt method,ShowAllLabelsInDimensionAt method

Shows all labels in the dimension that contains the specified label.

Syntax

SpssLabels.ShowAllLabelsInDimensionAt(row,column)

Parameters

row | Row index in the label array
column | Column index in the label array

Related Topics

ShowAll Method (Python)
ShowAllFootnotes Method (Python)
ShowCaption Method (Python)
ShowFootnote Method (Python)
ShowTitle Method (Python)
ShowFootnotesAt Method (Python)
ShowAllLabelsAndDataInDimensionAt Method (Python)
ShowFootnotesAt Method (Python)
ShowHiddenDimensionLabelAt Method (Python)
ShowFootnotesAt Method (Python)


ShowFootnotesAt Method (Python)

ShowFootnotesAt method,ShowFootnotesAt method,ShowFootnotesAt method
SpssLabels class,SpssLabels class,SpssLabels class
SpssLabels class,SpssLabels class,SpssLabels class
ShowFootnotesAt method,ShowFootnotesAt method,ShowFootnotesAt method

Displays all the footnotes referenced by the specified row/column label.

Syntax

SpssLabels.ShowFootnotesAt(row,column)

Parameters

row | Row index in the label array
column | Column index in the label array

Related Topics

ShowAll Method (Python)
ShowAllFootnotes Method (Python)
ShowCaption Method (Python)
ShowFootnote Method (Python)
ShowTitle Method (Python)
ShowFootnotesAt Method (Python)
ShowAllLabelsAndDataInDimensionAt Method (Python)
ShowAllLabelsInDimensionAt Method (Python)
ShowHiddenDimensionLabelAt Method (Python)
ShowFootnotesAt Method (Python)


ShowHiddenDimensionLabelAt Method (Python)

ShowHiddenDimensionLabelAt method,ShowHiddenDimensionLabelAt method,ShowHiddenDimensionLabelAt method
SpssLabels class,SpssLabels class,SpssLabels class
SpssLabels class,SpssLabels class,SpssLabels class
ShowHiddenDimensionLabelAt method,ShowHiddenDimensionLabelAt method,ShowHiddenDimensionLabelAt method

Shows the hidden dimension label for the dimension that contains the specified label.

Syntax

SpssLabels.ShowHiddenDimensionLabelAt(row,column)

Parameters

row | Row index in the label array
column | Column index in the label array

Related Topics

ShowAll Method (Python)
ShowAllFootnotes Method (Python)
ShowCaption Method (Python)
ShowFootnote Method (Python)
ShowTitle Method (Python)
ShowFootnotesAt Method (Python)
ShowAllLabelsAndDataInDimensionAt Method (Python)
ShowAllLabelsInDimensionAt Method (Python)
ShowFootnotesAt Method (Python)
ShowFootnotesAt Method (Python)


Swap Method (Python)

Swap method,Swap method,Swap method
SpssLabels class,SpssLabels class,SpssLabels class
SpssLabels class,SpssLabels class,SpssLabels class
Swap method,Swap method,Swap method
reordering labels,reordering labels,reordering labels

Swaps the selected column(s) or rows with a specified column or row. The data are swapped together with the labels.

• The selected and specified labels must be in the same dimension and must be either category or group labels. (That is, they cannot be dimension names.)

• If no labels in the same dimenison are selected, the method is ignored.

Syntax

SpssLabels.Swap(row,column)

Parameters

row | Row index in the label array
column | Column index in the label array

Related Topics

InsertBefore Method (Python)


SpssLayerLabels Class (Python)

The SpssLayerLabels class provides access to the layer labels contained in a pivot table. You need to use this object to format or change layer labels.

Layer Labels Array

The layer labels are represented as a 2-dimensional array, referred to as the layer labels array. Each row corresponds to the current category of one layer dimension. The first column is a concatenation of all the labels in the row, the second column is the dimension name, and the last column is the category label. Any columns between the second and last are group labels. You access other categories of the dimension from the SpssDimension object.

Layer labels displayed in a pivot table
Layer labels array indexing

Each layer dimension in the layer labels array is represented by a set of levels. The first level is the dimension name, the last level contains the current category label, and all the levels in between (if any) contain group labels. Blank cells in the layer labels array indicate that there are different numbers of levels in different layer dimensions.

Getting an SpssLayerLabels Object

You get an SpssLayerLabels object from the LayerLabelArray method of an SpssPivotTable object, as in:

SpssLayerLabels = SpssPivotTable.LayerLabelArray()

Example

This example assumes that PivotTable is an SpssPivotTable object and sets the background color of the label for the first layer dimension to yellow.

LayerLabels = PivotTable.LayerLabelArray()
LayerLabels.SetBackgroundColorAt(0,65535)


GetBackgroundColorAt Method (Python)

GetBackgroundColorAt method,GetBackgroundColorAt method,GetBackgroundColorAt method
SpssLayerLabels class,SpssLayerLabels class,SpssLayerLabels class
SpssLayerLabels class,SpssLayerLabels class,SpssLayerLabels class
GetBackgroundColorAt method,GetBackgroundColorAt method,GetBackgroundColorAt method

Returns the background color of the specified layer label.

Syntax

SpssLayerLabels.GetBackgroundColorAt(index)

Parameters

index Index of the layer dimension

Returns

The color is returned as an integer. See the topic Setting Color Values (Python) for more information.

Related Topics

GetForegroundColorAt Method (Python)
GetTextColorAt Method (Python)
SetBackgroundColorAt Method (Python)
SetForegroundColorAt Method (Python)
SetTextColorAt Method (Python)


GetBottomMarginAt Method (Python)

GetBottomMarginAt method,GetBottomMarginAt method,GetBottomMarginAt method
SpssLayerLabels class,SpssLayerLabels class,SpssLayerLabels class
SpssLayerLabels class,SpssLayerLabels class,SpssLayerLabels class
GetBottomMarginAt method,GetBottomMarginAt method,GetBottomMarginAt method

Returns the bottom margin of the specified layer label. The unit is the point (1/72 inch).

Syntax

SpssLayerLabels.GetBottomMarginAt(index)

Parameters

index Index of the layer dimension

Related Topics

GetLeftMarginAt Method (Python)
GetRightMarginAt Method (Python)
GetTopMarginAt Method (Python)
SetBottomMarginAt Method (Python)
SetLeftMarginAt Method (Python)
SetRightMarginAt Method (Python)
SetTopMarginAt Method (Python)


GetForegroundColorAt Method (Python)

GetForegroundColorAt method,GetForegroundColorAt method,GetForegroundColorAt method
SpssLayerLabels class,SpssLayerLabels class,SpssLayerLabels class
SpssLayerLabels class,SpssLayerLabels class,SpssLayerLabels class
GetForegroundColorAt method,GetForegroundColorAt method,GetForegroundColorAt method

This method is deprecated in release 17.0. Use the GetTextColorAt method instead.

Related Topics

GetBackgroundColorAt Method (Python)
GetTextColorAt Method (Python)
SetBackgroundColorAt Method (Python)
SetForegroundColorAt Method (Python)
SetTextColorAt Method (Python)


GetHAlignAt Method (Python)

GetHAlignAt method,GetHAlignAt method,GetHAlignAt method
SpssLayerLabels class,SpssLayerLabels class,SpssLayerLabels class
SpssLayerLabels class,SpssLayerLabels class,SpssLayerLabels class
GetHAlignAt method,GetHAlignAt method,GetHAlignAt method
alignment,alignment,alignment
labels,labels,labels
alignment,alignment,alignment
foonotes,foonotes,foonotes
alignment,alignment,alignment

Returns the horizontal alignment of the specified layer label.

Syntax

SpssLayerLabels.GetHAlignAt(index)

Parameters

index Index of the layer dimension

Returns

SpssClient.SpssHAlignTypes.SpssHAlLeft | Left
SpssClient.SpssHAlignTypes.SpssHAlRight | Right
SpssClient.SpssHAlignTypes.SpssHAlCenter | Center
SpssClient.SpssHAlignTypes.SpssHAlMixed | Mixed
SpssClient.SpssHAlignTypes.SpssHAlDecimal | Decimal

Related Topics

GetVAlignAt Method (Python)
SetHAlignAt Method (Python)
SetVAlignAt Method (Python)


GetLeftMarginAt Method (Python)

GetLeftMarginAt method,GetLeftMarginAt method,GetLeftMarginAt method
SpssLayerLabels class,SpssLayerLabels class,SpssLayerLabels class
SpssLayerLabels class,SpssLayerLabels class,SpssLayerLabels class
GetLeftMarginAt method,GetLeftMarginAt method,GetLeftMarginAt method

Returns the left margin of the label for the specified layer dimension. The unit is the point (1/72 inch).

Syntax

SpssLayerLabels.GetLeftMarginAt(index)

Parameters

index Index of the layer dimension

Related Topics

GetBottomMarginAt Method (Python)
GetRightMarginAt Method (Python)
GetTopMarginAt Method (Python)
SetBottomMarginAt Method (Python)
SetLeftMarginAt Method (Python)
SetRightMarginAt Method (Python)
SetTopMarginAt Method (Python)


GetNumDimensions Method (Python)

GetNumDimensions method,GetNumDimensions method,GetNumDimensions method
SpssLayerLabels class,SpssLayerLabels class,SpssLayerLabels class
SpssLayerLabels class,SpssLayerLabels class,SpssLayerLabels class
GetNumDimensions method,GetNumDimensions method,GetNumDimensions method

Returns the number of labels in the Layers (equal to the number of dimensions in the layers).

Syntax

SpssLayerLabels.GetNumDimensions()

Related Topics

GetNumLabelsWide Method (Python)


GetNumLabelsWide Method (Python)

GetNumLabelsWide method,GetNumLabelsWide method,GetNumLabelsWide method
SpssLayerLabels class,SpssLayerLabels class,SpssLayerLabels class
SpssLayerLabels class,SpssLayerLabels class,SpssLayerLabels class
GetNumLabelsWide method,GetNumLabelsWide method,GetNumLabelsWide method

Returns the width (number of columns) of the Layer Labels array. The width equals the maximum depth of layer dimensions plus one.

Syntax

SpssLayerLabels.GetNumLabelsWide()

Related Topics

GetNumDimensions Method (Python)


GetRightMarginAt Method (Python)

GetRightMarginAt method,GetRightMarginAt method,GetRightMarginAt method
SpssLayerLabels class,SpssLayerLabels class,SpssLayerLabels class
SpssLayerLabels class,SpssLayerLabels class,SpssLayerLabels class
GetRightMarginAt method,GetRightMarginAt method,GetRightMarginAt method

Returns the right margin of the label for the specified layer dimension. The unit is the point (1/72 inch).

Syntax

SpssLayerLabels.GetRightMarginAt(index)

Parameters

index Index of the layer dimension

Related Topics

GetBottomMarginAt Method (Python)
GetLeftMarginAt Method (Python)
GetTopMarginAt Method (Python)
SetBottomMarginAt Method (Python)
SetLeftMarginAt Method (Python)
SetRightMarginAt Method (Python)
SetTopMarginAt Method (Python)


GetTextColorAt Method (Python)

GetTextColorAt method,GetTextColorAt method,GetTextColorAt method
SpssLayerLabels class,SpssLayerLabels class,SpssLayerLabels class
SpssLayerLabels class,SpssLayerLabels class,SpssLayerLabels class
GetTextColorAt method,GetTextColorAt method,GetTextColorAt method

Returns the color of the text in the label of the specified layer dimension.

Syntax

SpssLayerLabels.GetTextColorAt(index)

Parameters

index Index of the layer dimension

Returns

The color is returned as an integer. See the topic Setting Color Values (Python) for more information.

Related Topics

GetBackgroundColorAt Method (Python)
GetForegroundColorAt Method (Python)
SetBackgroundColorAt Method (Python)
SetForegroundColorAt Method (Python)
SetTextColorAt Method (Python)
GetTextFontAt Method (Python)
GetTextHiddenAt Method (Python)
GetTextSizeAt Method (Python)
GetTextStyleAt Method (Python)
GetTextUnderlinedAt Method (Python)
SetTextFontAt Method (Python)
SetTextHiddenAt Method (Python)
SetTextSizeAt Method (Python)
SetTextStyleAt Method (Python)
SetTextUnderlinedAt Method (Python)


GetTextFontAt Method (Python)

GetTextFontAt method,GetTextFontAt method,GetTextFontAt method
SpssLayerLabels class,SpssLayerLabels class,SpssLayerLabels class
SpssLayerLabels class,SpssLayerLabels class,SpssLayerLabels class
GetTextFontAt method,GetTextFontAt method,GetTextFontAt method

Returns the font of the text in the specified layer dimension, as a string.

Syntax

SpssLayerLabels.GetTextFontAt(index)

Parameters

index Index of the layer dimension

Related Topics

GetTextColorAt Method (Python)
GetTextHiddenAt Method (Python)
GetTextSizeAt Method (Python)
GetTextStyleAt Method (Python)
GetTextUnderlinedAt Method (Python)
SetTextColorAt Method (Python)
SetTextFontAt Method (Python)
SetTextHiddenAt Method (Python)
SetTextSizeAt Method (Python)
SetTextStyleAt Method (Python)
SetTextUnderlinedAt Method (Python)


GetTextHiddenAt Method (Python)

GetTextHiddenAt method,GetTextHiddenAt method,GetTextHiddenAt method
SpssLayerLabels class,SpssLayerLabels class,SpssLayerLabels class
SpssLayerLabels class,SpssLayerLabels class,SpssLayerLabels class
GetTextHiddenAt method,GetTextHiddenAt method,GetTextHiddenAt method

Returns the hidden effect of the specified layer dimension. The result is a Boolean.

Syntax

SpssLayerLabels.GetTextHiddenAt(index)

Parameters

index Index of the layer dimension

Returns

True | Hidden
False | Not hidden

Related Topics

GetTextColorAt Method (Python)
GetTextFontAt Method (Python)
GetTextSizeAt Method (Python)
GetTextStyleAt Method (Python)
GetTextUnderlinedAt Method (Python)
SetTextColorAt Method (Python)
SetTextFontAt Method (Python)
SetTextHiddenAt Method (Python)
SetTextSizeAt Method (Python)
SetTextStyleAt Method (Python)
SetTextUnderlinedAt Method (Python)


GetTextSizeAt Method (Python)

GetTextSizeAt method,GetTextSizeAt method,GetTextSizeAt method
SpssLayerLabels class,SpssLayerLabels class,SpssLayerLabels class
SpssLayerLabels class,SpssLayerLabels class,SpssLayerLabels class
GetTextSizeAt method,GetTextSizeAt method,GetTextSizeAt method

Returns the font size of the label for the specified layer dimension.

Syntax

SpssLayerLabels.GetTextSizeAt(index)

Parameters

index Index of the layer dimension

Related Topics

GetTextColorAt Method (Python)
GetTextFontAt Method (Python)
GetTextHiddenAt Method (Python)
GetTextStyleAt Method (Python)
GetTextUnderlinedAt Method (Python)
SetTextColorAt Method (Python)
SetTextFontAt Method (Python)
SetTextHiddenAt Method (Python)
SetTextSizeAt Method (Python)
SetTextStyleAt Method (Python)
SetTextUnderlinedAt Method (Python)


GetTextStyleAt Method (Python)

GetTextStyleAt method,GetTextStyleAt method,GetTextStyleAt method
SpssLayerLabels class,SpssLayerLabels class,SpssLayerLabels class
SpssLayerLabels class,SpssLayerLabels class,SpssLayerLabels class
GetTextStyleAt method,GetTextStyleAt method,GetTextStyleAt method

Returns the bold or italic style of the text for the specified layer dimension.

Syntax

SpssLayerLabels.GetTextStyleAt(index)

Parameters

index Index of the layer dimension

Returns

SpssClient.SpssTextStyleTypes.SpssTSRegular | Regular
SpssClient.SpssTextStyleTypes.SpssTSItalic | Italic
SpssClient.SpssTextStyleTypes.SpssTSBold | Bold
SpssClient.SpssTextStyleTypes.SpssTSBoldItalic | Bold Italic

Related Topics

GetTextColorAt Method (Python)
GetTextFontAt Method (Python)
GetTextHiddenAt Method (Python)
GetTextSizeAt Method (Python)
GetTextUnderlinedAt Method (Python)
SetTextColorAt Method (Python)
SetTextFontAt Method (Python)
SetTextHiddenAt Method (Python)
SetTextSizeAt Method (Python)
SetTextStyleAt Method (Python)
SetTextUnderlinedAt Method (Python)


GetTextUnderlinedAt Method (Python)

SpssLayerLabels class,SpssLayerLabels class,SpssLayerLabels class
GetTextUnderlinedAt method,GetTextUnderlinedAt method,GetTextUnderlinedAt method
GetTextUnderlinedAt method,GetTextUnderlinedAt method,GetTextUnderlinedAt method
SpssLayerLabels class,SpssLayerLabels class,SpssLayerLabels class

Returns the underlined effect of the specified layer dimension. The result is a Boolean.

Syntax

SpssLayerLabels.GetTextUnderlinedAt(index)

Parameters

index Index of the layer dimension

Returns

True | Underlined
False | Not underlined

Related Topics

GetTextColorAt Method (Python)
GetTextFontAt Method (Python)
GetTextHiddenAt Method (Python)
GetTextSizeAt Method (Python)
GetTextStyleAt Method (Python)
SetTextColorAt Method (Python)
SetTextFontAt Method (Python)
SetTextHiddenAt Method (Python)
SetTextSizeAt Method (Python)
SetTextStyleAt Method (Python)
SetTextUnderlinedAt Method (Python)


GetTopMarginAt Method (Python)

GetTopMarginAt method,GetTopMarginAt method,GetTopMarginAt method
SpssLayerLabels class,SpssLayerLabels class,SpssLayerLabels class
SpssLayerLabels class,SpssLayerLabels class,SpssLayerLabels class
GetTopMarginAt method,GetTopMarginAt method,GetTopMarginAt method

Returns the top margin of the label for the specified layer dimension. The unit is the point (1/72 inch).

Syntax

SpssLayerLabels.GetTopMarginAt(index)

Parameters

index Index of the layer dimension

Related Topics

GetBottomMarginAt Method (Python)
GetLeftMarginAt Method (Python)
GetRightMarginAt Method (Python)
SetBottomMarginAt Method (Python)
SetLeftMarginAt Method (Python)
SetRightMarginAt Method (Python)
SetTopMarginAt Method (Python)


GetVAlignAt Method (Python)

GetVAlignAt method,GetVAlignAt method,GetVAlignAt method
SpssLayerLabels class,SpssLayerLabels class,SpssLayerLabels class
SpssLayerLabels class,SpssLayerLabels class,SpssLayerLabels class
GetVAlignAt method,GetVAlignAt method,GetVAlignAt method
alignment,alignment,alignment
vertical,vertical,vertical
alignment,alignment,alignment

Returns the vertical alignment of the label for the specified layer dimension.

Syntax

SpssLayerLabels.GetVAlignAt(index)

Parameters

index Index of the layer dimension

Returns

SpssClient.SpssVAlignTypes.SpssVAlTop | Top
SpssClient.SpssVAlignTypes.SpssVAlBottom | Bottom
SpssClient.SpssVAlignTypes.SpssVAlCenter | Center

Related Topics

GetHAlignAt Method (Python)
SetHAlignAt Method (Python)
SetVAlignAt Method (Python)


GetValueAt Method (Python)

GetValueAt method,GetValueAt method,GetValueAt method
SpssLayerLabels class,SpssLayerLabels class,SpssLayerLabels class
SpssLayerLabels class,SpssLayerLabels class,SpssLayerLabels class
GetValueAt method,GetValueAt method,GetValueAt method

Returns the value associated with the specified layer and column from the layer labels array, as a unicode string.

Syntax

SpssLayerLabels.GetValueAt(index,column)

Parameters

index | Index of the layer dimension
column | Column index of the cell in the layer labels array

Related Topics

SetValueAt Method (Python)


HideFootnotesAt Method (Python)

HideFootnotesAt method,HideFootnotesAt method,HideFootnotesAt method
SpssLayerLabels class,SpssLayerLabels class,SpssLayerLabels class
SpssLayerLabels class,SpssLayerLabels class,SpssLayerLabels class
HideFootnotesAt method,HideFootnotesAt method,HideFootnotesAt method

Hides all footnotes referenced by the specified layer label.

Syntax

SpssLayerLabels.HideFootnotesAt(index)

Parameters

index Index of the layer dimension

Related Topics

HideCaption Method (Python)
HideFootnote Method (Python)
HideTitle Method (Python)
HideFootnotesAt Method (Python)
HideLabel Method (Python)
HideAllLabelsInDimensionAt Method (Python)
HideFootnotesAt Method (Python)
HideLabelsInDimensionAt Method (Python)
HideLabelsWithDataAt Method (Python)


InsertNewFootnoteAt Method (Python)

InsertNewFootnoteAt method,InsertNewFootnoteAt method,InsertNewFootnoteAt method
SpssLayerLabels class,SpssLayerLabels class,SpssLayerLabels class
SpssLayerLabels class,SpssLayerLabels class,SpssLayerLabels class
InsertNewFootnoteAt method,InsertNewFootnoteAt method,InsertNewFootnoteAt method

Inserts a new footnote for the specified layer dimension.

Syntax

index=SpssLayerLabels.InsertNewFootnoteAt(index,string)

Parameters

index | Index of the layer dimension
string | New footnote text

Return Value

index Integer (to be used to insert the footnote in other cells if it is a shared footnote)


InsertSharedFootnoteAt Method (Python)

InsertSharedFootnoteAt method,InsertSharedFootnoteAt method,InsertSharedFootnoteAt method
SpssLayerLabels class,SpssLayerLabels class,SpssLayerLabels class
SpssLayerLabels class,SpssLayerLabels class,SpssLayerLabels class
InsertSharedFootnoteAt method,InsertSharedFootnoteAt method,InsertSharedFootnoteAt method

Inserts a shared footnote for the specified layer dimension.

Syntax

SpssLayerLabels.InsertSharedFootnoteAt(dim,index)

Parameters

dim | Index of the layer dimension
index | Index of the footnote

The footnote index is the value returned by the InsertNewFootnoteAt method and corresponds to the footnote marker.


SelectLabelAt Method (Python)

SelectLabelAt method,SelectLabelAt method,SelectLabelAt method
SpssLayerLabels class,SpssLayerLabels class,SpssLayerLabels class
SpssLayerLabels class,SpssLayerLabels class,SpssLayerLabels class
SelectLabelAt method,SelectLabelAt method,SelectLabelAt method

Selects the specified label, in addition to previously selected elements.

Syntax

SpssLayerLabels.SelectLabelAt(index)

Parameters

index Index of the layer dimension


SelectReferredFootnotesAt Method (Python)

SelectReferredFootnotesAt method,SelectReferredFootnotesAt method,SelectReferredFootnotesAt method
SpssLayerLabels class,SpssLayerLabels class,SpssLayerLabels class
SpssLayerLabels class,SpssLayerLabels class,SpssLayerLabels class
SelectReferredFootnotesAt method,SelectReferredFootnotesAt method,SelectReferredFootnotesAt method

Selects all the footnotes referenced by the current layer label, in addition to previously selected elements.

Syntax

SpssLayerLabels.SelectReferredFootnotesAt(index)

Parameters

index Index of the layer dimension


SetBackgroundColorAt Method (Python)

SetBackgroundColorAt method,SetBackgroundColorAt method,SetBackgroundColorAt method
SpssLayerLabels class,SpssLayerLabels class,SpssLayerLabels class
SpssLayerLabels class,SpssLayerLabels class,SpssLayerLabels class
SetBackgroundColorAt method,SetBackgroundColorAt method,SetBackgroundColorAt method

Sets the background color of the specified layer label.

Syntax

SpssLayerLabels.SetBackgroundColorAt(index,color)

Parameters

index | Index of the layer dimension
color | Integer representation of the color

For information on setting color values, see Setting Color Values.

Related Topics

GetBackgroundColorAt Method (Python)
GetForegroundColorAt Method (Python)
GetTextColorAt Method (Python)
SetForegroundColorAt Method (Python)
SetTextColorAt Method (Python)


SetBottomMarginAt Method (Python)

SetBottomMarginAt method,SetBottomMarginAt method,SetBottomMarginAt method
SpssLayerLabels class,SpssLayerLabels class,SpssLayerLabels class
SpssLayerLabels class,SpssLayerLabels class,SpssLayerLabels class
SetBottomMarginAt method,SetBottomMarginAt method,SetBottomMarginAt method

Sets the bottom margin of the specified layer label.

Syntax

SpssLayerLabels.SetBottomMarginAt(index,margin)

Parameters

index | Index of the layer dimension
margin | An integer. The unit is the point (1/72 inch).

Related Topics

GetBottomMarginAt Method (Python)
GetLeftMarginAt Method (Python)
GetRightMarginAt Method (Python)
GetTopMarginAt Method (Python)
SetLeftMarginAt Method (Python)
SetRightMarginAt Method (Python)
SetTopMarginAt Method (Python)


SetForegroundColorAt Method (Python)

SetForegroundColorAt method,SetForegroundColorAt method,SetForegroundColorAt method
SpssLayerLabels class,SpssLayerLabels class,SpssLayerLabels class
SpssLayerLabels class,SpssLayerLabels class,SpssLayerLabels class
SetForegroundColorAt method,SetForegroundColorAt method,SetForegroundColorAt method

This method is deprecated in release 17.0. Use the SetTextColorAt method instead.

Related Topics

GetBackgroundColorAt Method (Python)
GetForegroundColorAt Method (Python)
GetTextColorAt Method (Python)
SetBackgroundColorAt Method (Python)
SetTextColorAt Method (Python)


SetHAlignAt Method (Python)

SetHAlignAt method,SetHAlignAt method,SetHAlignAt method
SpssLayerLabels class,SpssLayerLabels class,SpssLayerLabels class
SpssLayerLabels class,SpssLayerLabels class,SpssLayerLabels class
SetHAlignAt method,SetHAlignAt method,SetHAlignAt method
alignment,alignment,alignment
labels,labels,labels
alignment,alignment,alignment
foonotes,foonotes,foonotes
alignment,alignment,alignment

Sets the horizontal alignment of the specified layer label.

Syntax

SpssLayerLabels.SetHAlignAt(index,alignment)

Parameters

index Index of the layer dimension

Set the value of alignment to one of the following:

SpssClient.SpssHAlignTypes.SpssHAlLeft | Left
SpssClient.SpssHAlignTypes.SpssHAlRight | Right
SpssClient.SpssHAlignTypes.SpssHAlCenter | Center
SpssClient.SpssHAlignTypes.SpssHAlMixed | Mixed
SpssClient.SpssHAlignTypes.SpssHAlDecimal | Decimal

Related Topics

GetHAlignAt Method (Python)
GetVAlignAt Method (Python)
SetVAlignAt Method (Python)


SetLeftMarginAt Method (Python)

SetLeftMarginAt method,SetLeftMarginAt method,SetLeftMarginAt method
SpssLayerLabels class,SpssLayerLabels class,SpssLayerLabels class
SpssLayerLabels class,SpssLayerLabels class,SpssLayerLabels class
SetLeftMarginAt method,SetLeftMarginAt method,SetLeftMarginAt method

Sets the left margin of the label for the specified layer dimension.

Syntax

SpssLayerLabels.SetLeftMarginAt(index,margin)

Parameters

index | Index of the layer dimension
margin | An integer. The unit is the point (1/72 inch).

Related Topics

GetBottomMarginAt Method (Python)
GetLeftMarginAt Method (Python)
GetRightMarginAt Method (Python)
GetTopMarginAt Method (Python)
SetBottomMarginAt Method (Python)
SetRightMarginAt Method (Python)
SetTopMarginAt Method (Python)


SetRightMarginAt Method (Python)

SetRightMarginAt method,SetRightMarginAt method,SetRightMarginAt method
SpssLayerLabels class,SpssLayerLabels class,SpssLayerLabels class
SpssLayerLabels class,SpssLayerLabels class,SpssLayerLabels class
SetRightMarginAt method,SetRightMarginAt method,SetRightMarginAt method

Sets the right margin of the label for the specified layer dimension.

Syntax

SpssLayerLabels.SetRightMarginAt(index,margin)

Parameters

index | Index of the layer dimension
margin | An integer. The unit is the point (1/72 inch)

Related Topics

GetBottomMarginAt Method (Python)
GetLeftMarginAt Method (Python)
GetRightMarginAt Method (Python)
GetTopMarginAt Method (Python)
SetBottomMarginAt Method (Python)
SetLeftMarginAt Method (Python)
SetTopMarginAt Method (Python)


SetTextColorAt Method (Python)

SetTextColorAt method,SetTextColorAt method,SetTextColorAt method
SpssLayerLabels class,SpssLayerLabels class,SpssLayerLabels class
SpssLayerLabels class,SpssLayerLabels class,SpssLayerLabels class
SetTextColorAt method,SetTextColorAt method,SetTextColorAt method

Sets the color of the text in the label of the specified layer dimension.

Syntax

SpssLayerLabels.SetTextColorAt(index,color)

Parameters

index | Index of the layer dimension
color | Integer representation of the color

For information on setting color values, see Setting Color Values.

Related Topics

GetBackgroundColorAt Method (Python)
GetForegroundColorAt Method (Python)
GetTextColorAt Method (Python)
SetBackgroundColorAt Method (Python)
SetForegroundColorAt Method (Python)
GetTextFontAt Method (Python)
GetTextHiddenAt Method (Python)
GetTextSizeAt Method (Python)
GetTextStyleAt Method (Python)
GetTextUnderlinedAt Method (Python)
SetTextFontAt Method (Python)
SetTextHiddenAt Method (Python)
SetTextSizeAt Method (Python)
SetTextStyleAt Method (Python)
SetTextUnderlinedAt Method (Python)


SetTextFontAt Method (Python)

SetTextFontAt method,SetTextFontAt method,SetTextFontAt method
SpssLayerLabels class,SpssLayerLabels class,SpssLayerLabels class
SpssLayerLabels class,SpssLayerLabels class,SpssLayerLabels class
SetTextFontAt method,SetTextFontAt method,SetTextFontAt method

Sets the font of the text in the specified layer dimension.

Syntax

SpssLayerLabels.SetTextFontAt(index,fontname)

Parameters

index | Index of the layer dimension
fontname | Name of the font family, as a string. Available fonts are accessed from Format>Cell Properties in the pivot table editor.

Related Topics

GetTextColorAt Method (Python)
GetTextFontAt Method (Python)
GetTextHiddenAt Method (Python)
GetTextSizeAt Method (Python)
GetTextStyleAt Method (Python)
GetTextUnderlinedAt Method (Python)
SetTextColorAt Method (Python)
SetTextHiddenAt Method (Python)
SetTextSizeAt Method (Python)
SetTextStyleAt Method (Python)
SetTextUnderlinedAt Method (Python)


SetTextHiddenAt Method (Python)

SetTextHiddenAt method,SetTextHiddenAt method,SetTextHiddenAt method
SpssLayerLabels class,SpssLayerLabels class,SpssLayerLabels class
SpssLayerLabels class,SpssLayerLabels class,SpssLayerLabels class
SetTextHiddenAt method,SetTextHiddenAt method,SetTextHiddenAt method

Sets the hidden effect of the label for the specified layer dimension.

Syntax

SpssLayerLabels.SetTextHiddenAt(index,boolean)

Parameters

index | Index of the layer dimension
boolean | True for hidden, False for not hidden

Related Topics

GetTextColorAt Method (Python)
GetTextFontAt Method (Python)
GetTextHiddenAt Method (Python)
GetTextSizeAt Method (Python)
GetTextStyleAt Method (Python)
GetTextUnderlinedAt Method (Python)
SetTextColorAt Method (Python)
SetTextFontAt Method (Python)
SetTextSizeAt Method (Python)
SetTextStyleAt Method (Python)
SetTextUnderlinedAt Method (Python)


SetTextSizeAt Method (Python)

SetTextSizeAt method,SetTextSizeAt method,SetTextSizeAt method
SpssLayerLabels class,SpssLayerLabels class,SpssLayerLabels class
SpssLayerLabels class,SpssLayerLabels class,SpssLayerLabels class
SetTextSizeAt method,SetTextSizeAt method,SetTextSizeAt method

Sets the font size of the label of the specified layer dimension.

Syntax

SpssLayerLabels.SetTextSizeAt(index,size)

Parameters

index | Index of the layer dimension
size | Size in points (integer)

Related Topics

GetTextColorAt Method (Python)
GetTextFontAt Method (Python)
GetTextHiddenAt Method (Python)
GetTextSizeAt Method (Python)
GetTextStyleAt Method (Python)
GetTextUnderlinedAt Method (Python)
SetTextColorAt Method (Python)
SetTextFontAt Method (Python)
SetTextHiddenAt Method (Python)
SetTextStyleAt Method (Python)
SetTextUnderlinedAt Method (Python)


SetTextStyleAt Method (Python)

SetTextStyleAt method,SetTextStyleAt method,SetTextStyleAt method
SpssLayerLabels class,SpssLayerLabels class,SpssLayerLabels class
SpssLayerLabels class,SpssLayerLabels class,SpssLayerLabels class
SetTextStyleAt method,SetTextStyleAt method,SetTextStyleAt method

Sets the bold or italic style of the text for the specified layer dimension.

Syntax

SpssLayerLabels.SetTextStyleAt(index,style)

Parameters

index Index of the layer dimension

Set the value of style to one of the following:

SpssClient.SpssTextStyleTypes.SpssTSRegular | Regular
SpssClient.SpssTextStyleTypes.SpssTSItalic | Italic
SpssClient.SpssTextStyleTypes.SpssTSBold | Bold
SpssClient.SpssTextStyleTypes.SpssTSBoldItalic | Bold Italic

Related Topics

GetTextColorAt Method (Python)
GetTextFontAt Method (Python)
GetTextHiddenAt Method (Python)
GetTextSizeAt Method (Python)
GetTextStyleAt Method (Python)
GetTextUnderlinedAt Method (Python)
SetTextColorAt Method (Python)
SetTextFontAt Method (Python)
SetTextHiddenAt Method (Python)
SetTextSizeAt Method (Python)
SetTextUnderlinedAt Method (Python)


SetTextUnderlinedAt Method (Python)

SpssLayerLabels class,SpssLayerLabels class,SpssLayerLabels class
SetTextUnderlinedAt method,SetTextUnderlinedAt method,SetTextUnderlinedAt method
SetTextUnderlinedAt method,SetTextUnderlinedAt method,SetTextUnderlinedAt method
SpssLayerLabels class,SpssLayerLabels class,SpssLayerLabels class

Sets the underlined effect of the label for the specified layer dimension.

Syntax

SpssLayerLabels.SetTextUnderlinedAt(index,boolean)

Parameters

index | Index of the layer dimension
boolean | True for underlined, False for not underlined.

Related Topics

GetTextColorAt Method (Python)
GetTextFontAt Method (Python)
GetTextHiddenAt Method (Python)
GetTextSizeAt Method (Python)
GetTextStyleAt Method (Python)
GetTextUnderlinedAt Method (Python)
SetTextColorAt Method (Python)
SetTextFontAt Method (Python)
SetTextHiddenAt Method (Python)
SetTextSizeAt Method (Python)
SetTextStyleAt Method (Python)


SetTopMarginAt Method (Python)

SetTopMarginAt method,SetTopMarginAt method,SetTopMarginAt method
SpssLayerLabels class,SpssLayerLabels class,SpssLayerLabels class
SpssLayerLabels class,SpssLayerLabels class,SpssLayerLabels class
SetTopMarginAt method,SetTopMarginAt method,SetTopMarginAt method

Sets the top margin of the label for the specified layer dimension.

Syntax

SpssLayerLabels.SetTopMarginAt(index,margin)

Parameters

index | Index of the layer dimension
margin | An integer. The unit is the point (1/72 inch).

Related Topics

GetBottomMarginAt Method (Python)
GetLeftMarginAt Method (Python)
GetRightMarginAt Method (Python)
GetTopMarginAt Method (Python)
SetBottomMarginAt Method (Python)
SetLeftMarginAt Method (Python)
SetRightMarginAt Method (Python)


SetVAlignAt Method (Python)

SetVAlignAt method,SetVAlignAt method,SetVAlignAt method
SpssLayerLabels class,SpssLayerLabels class,SpssLayerLabels class
SpssLayerLabels class,SpssLayerLabels class,SpssLayerLabels class
SetVAlignAt method,SetVAlignAt method,SetVAlignAt method
alignment,alignment,alignment
vertical,vertical,vertical
alignment,alignment,alignment

Sets the vertical alignment of the label for the specified layer dimension.

Syntax

SpssLayerLabels.SetVAlignAt(index,alignment)

Parameters

index Index of the layer dimension

Set the value of alignment to one of the following:

SpssClient.SpssVAlignTypes.SpssVAlTop | Top
SpssClient.SpssVAlignTypes.SpssVAlBottom | Bottom
SpssClient.SpssVAlignTypes.SpssVAlCenter | Center

Related Topics

GetHAlignAt Method (Python)
GetVAlignAt Method (Python)
SetHAlignAt Method (Python)


SetValueAt Method (Python)

SetValueAt method,SetValueAt method,SetValueAt method
SpssLayerLabels class,SpssLayerLabels class,SpssLayerLabels class
SpssLayerLabels class,SpssLayerLabels class,SpssLayerLabels class
SetValueAt method,SetValueAt method,SetValueAt method

Sets the value associated with the specified layer and column in the layer labels array.

Syntax

SpssLayerLabels.SetValueAt(index,column,value)

Parameters

index | Index of the layer dimension
column | Column index of the cell in the layer labels array
value | String

Related Topics

GetValueAt Method (Python)


ShowFootnotesAt Method (Python)

ShowFootnotesAt method,ShowFootnotesAt method,ShowFootnotesAt method
SpssLayerLabels class,SpssLayerLabels class,SpssLayerLabels class
SpssLayerLabels class,SpssLayerLabels class,SpssLayerLabels class
ShowFootnotesAt method,ShowFootnotesAt method,ShowFootnotesAt method

Displays all the footnotes referenced by the label of the specified layer dimension.

Syntax

SpssLayerLabels.ShowFootnotesAt(index)

Parameters

index Index of the layer dimension

Related Topics

ShowAll Method (Python)
ShowAllFootnotes Method (Python)
ShowCaption Method (Python)
ShowFootnote Method (Python)
ShowTitle Method (Python)
ShowFootnotesAt Method (Python)
ShowAllLabelsAndDataInDimensionAt Method (Python)
ShowAllLabelsInDimensionAt Method (Python)
ShowFootnotesAt Method (Python)
ShowHiddenDimensionLabelAt Method (Python)


SpssPivotMgr Class (Python)

The SpssPivotMgr class provides access to the row, column, and layer dimensions contained in a pivot table. By pivoting row dimensions to column dimensions, or column dimensions to layer dimensions, you can find the best way to present the results of the statistical analyses.

You get an SpssPivotMgr object from the PivotManager method of an SpssPivotTable object, as in:

SpssPivotMgr = SpssPivotTable.PivotManager()

For an example of using the SpssPivotMgr class, see SpssDimension Class (Python).


GetColumnDimension Method (Python)

GetColumnDimension method,GetColumnDimension method,GetColumnDimension method
SpssPivotMgr class,SpssPivotMgr class,SpssPivotMgr class
SpssPivotMgr class,SpssPivotMgr class,SpssPivotMgr class
GetColumnDimension method,GetColumnDimension method,GetColumnDimension method

Returns an SpssDimension object for the specified column dimension.

Syntax

SpssDimension=SpssPivotMgr.GetColumnDimension(index)

Parameters

index Index of the column dimension, where the value 0 refers to the innermost column dimension.

Related Topics

GetLayerDimension Method (Python)
GetNumLayerDimensions Method (Python)
GetNumRowDimensions Method (Python)
GetRowDimension Method (Python)


GetLayerDimension Method (Python)

LayerDimension method,LayerDimension method,LayerDimension method
Dimension class,Dimension class,Dimension class
Dimension class,Dimension class,Dimension class
LayerDimension method,LayerDimension method,LayerDimension method

Returns an SpssDimension object for the specified layer dimension.

Syntax

SpssDimension=SpssPivotMgr.LayerDimension(index)

Parameters

index Index of the layer dimension

Related Topics

GetColumnDimension Method (Python)
GetNumLayerDimensions Method (Python)
GetNumRowDimensions Method (Python)
GetRowDimension Method (Python)


GetNumColumnDimensions Method (Python)

GetNumColumnDimensions method,GetNumColumnDimensions method,GetNumColumnDimensions method
SpssPivotMgr class,SpssPivotMgr class,SpssPivotMgr class
SpssPivotMgr class,SpssPivotMgr class,SpssPivotMgr class
GetNumColumnDimensions method,GetNumColumnDimensions method,GetNumColumnDimensions method

Returns the number of column dimensions.

Syntax

SpssPivotMgr.GetNumColumnDimensions()


GetNumLayerDimensions Method (Python)

GetNumLayerDimensions method,GetNumLayerDimensions method,GetNumLayerDimensions method
SpssPivotMgr class,SpssPivotMgr class,SpssPivotMgr class
SpssPivotMgr class,SpssPivotMgr class,SpssPivotMgr class
GetNumLayerDimensions method,GetNumLayerDimensions method,GetNumLayerDimensions method

Returns the number of layer dimensions.

Syntax

SpssPivotMgr.GetNumLayerDimensions()

Related Topics

GetColumnDimension Method (Python)
GetLayerDimension Method (Python)
GetNumRowDimensions Method (Python)
GetRowDimension Method (Python)


GetNumRowDimensions Method (Python)

GetNumRowDimensions method,GetNumRowDimensions method,GetNumRowDimensions method
SpssPivotMgr class,SpssPivotMgr class,SpssPivotMgr class
SpssPivotMgr class,SpssPivotMgr class,SpssPivotMgr class
GetNumRowDimensions method,GetNumRowDimensions method,GetNumRowDimensions method

Returns the number of row dimensions.

Syntax

SpssPivotMgr.GetNumRowDimensions()

Related Topics

GetColumnDimension Method (Python)
GetLayerDimension Method (Python)
GetNumLayerDimensions Method (Python)
GetRowDimension Method (Python)


GetRowDimension Method (Python)

GetRowDimension method,GetRowDimension method,GetRowDimension method
SpssPivotMgr class,SpssPivotMgr class,SpssPivotMgr class
SpssPivotMgr class,SpssPivotMgr class,SpssPivotMgr class
GetRowDimension method,GetRowDimension method,GetRowDimension method

Returns an SpssDimension object for the specified row dimension.

Syntax

SpssDimension=SpssPivotMgr.GetRowDimension(index)

Parameters

index Index of the row dimension, where the value 0 refers to the innermost row dimension.

Related Topics

GetColumnDimension Method (Python)
GetLayerDimension Method (Python)
GetNumLayerDimensions Method (Python)
GetNumRowDimensions Method (Python)


MoveLayersToColumns Method (Python)

MoveLayersToColumns method,MoveLayersToColumns method,MoveLayersToColumns method
SpssPivotMgr class,SpssPivotMgr class,SpssPivotMgr class
SpssPivotMgr class,SpssPivotMgr class,SpssPivotMgr class
MoveLayersToColumns method,MoveLayersToColumns method,MoveLayersToColumns method

Moves all the dimensions in layers to columns.

Syntax

SpssPivotMgr.MoveLayersToColumns()

Related Topics

MoveLayersToRows Method (Python)


MoveLayersToRows Method (Python)

MoveLayersToRows method,MoveLayersToRows method,MoveLayersToRows method
SpssPivotMgr class,SpssPivotMgr class,SpssPivotMgr class
SpssPivotMgr class,SpssPivotMgr class,SpssPivotMgr class
MoveLayersToRows method,MoveLayersToRows method,MoveLayersToRows method

Moves all dimensions in layers to rows.

Syntax

SpssPivotMgr.MoveLayersToRows()

Related Topics

MoveLayersToColumns Method (Python)


TransposeRowsWithColumns Method (Python)

TransposeRowsWithColumns method,TransposeRowsWithColumns method,TransposeRowsWithColumns method
SpssPivotMgr class,SpssPivotMgr class,SpssPivotMgr class
SpssPivotMgr class,SpssPivotMgr class,SpssPivotMgr class
TransposeRowsWithColumns method,TransposeRowsWithColumns method,TransposeRowsWithColumns method

Moves all dimensions in the rows to the columns and moves all dimensions in the columns to the rows.

Syntax

SpssPivotMgr.TransposeRowsWithColumns()


SpssServerConf Class (Python)

SpssServerConf class,SpssServerConf class,SpssServerConf class

The SpssServerConf class represents the configuration information for a server machine (may be an instance of PASW Statistics Server or the local computer). From the SpssClient object you can get an SpssServerConf object for the current server, the default server, the local computer, or you can get a list of SpssServerConf objects for all configured servers (includes the local computer).

Example: Connecting to a Server

import SpssClient
SpssClient.StartClient()
SpssServerConf = SpssClient.CreateNewServer("myservername",3016,"")
SpssServerConf.Connect("","myuserID","mypassword")
SpssClient.StopClient()

• The CreateNewServer method from the SpssClient class creates a new server configuration object for a server with a specified name (or IP address) on a specified port. It returns an SpssServerConf object.

• The Connect method of an SpssServerConf object establishes a connection to the server using the specified domain, user ID, and password.

Example: Configuring a New Server and Saving the Configuration

import SpssClient
SpssClient.StartClient()
ServerConfList = SpssClient.GetConfiguredServers()
SpssServerConf = SpssClient.CreateNewServer("myservername",3016,"")
ServerConfList.Add(SpssServerConf)
SpssServerConf = ServerConfList.GetItemAt(ServerConfList.Size()-1)
SpssServerConf.SetUserId("myuserID")
SpssServerConf.SetPassword("mypassword")
SpssServerConf.SetUserDomain("mydomain")
SpssServerConf.SetPasswordSaved(True)
SpssClient.SaveServers()
SpssClient.StopClient()

• SpssClient.GetConfiguredServers() gets an SpssServerConfList object that allows you to manage the list of configured servers.

• The CreateNewServer method from the SpssClient class creates a new server configuration object. The variable SpssServerConf is an SpssServerConf object.

• To add a new server configuration to the list, you use the Add method of the SpssServerConfList object.

• The user ID, password, and domain are set using the SetUserId, SetPassword, and SetUserDomain methods of the SpssServerConf object. The SetPasswordSaved method specifies that the password is to be saved for future use.

• The SaveServers method from the SpssClient class saves all server configurations so that they are available in future sessions.

Example: Connecting to a Server Using a Saved Configuration

import SpssClient
SpssClient.StartClient()
ServerConfList = SpssClient.GetConfiguredServers()
for i in range(ServerConfList.Size()):
    server = ServerConfList.GetItemAt(i)
    if server.GetServerName()=="myservername":
       server.ConnectWithSavedPassword()
SpssClient.StopClient()

• SpssClient.GetConfiguredServers() gets an SpssServerConfList object that provides access to the list of configured servers.

• The GetItemAt method of an SpssServerConfList object returns the SpssServerConf object at the specified index. Index values start from 0 and represent the order in which the servers were added to the list.

• The ConnectWithSavedPassword method uses the connection information (domain, user ID, and password) to connect to the server.

Related Topics

CreateNewServer Method (Python)
GetConfiguredServers Method (Python)
GetCurrentServer Method (Python)
GetDefaultServer Method (Python)
GetLocalServer Method (Python)
SaveServers Method (Python)


Connect Method (Python)

SpssServerConf class,SpssServerConf class,SpssServerConf class
Connect method,Connect method,Connect method
Connect method,Connect method,Connect method
SpssServerConf class,SpssServerConf class,SpssServerConf class

Attempts to connect to the associated instance of PASW Statistics Server using the provided domain, user ID, and password. Any existing connection to an instance of PASW Statistics Server is terminated.

Syntax

SpssServerConf.Connect(domain,userID,password)

Parameters

domain | A string specifying the domain of the user ID. Enter a blank string if the domain is not required.
userID | A string specifying the user ID.
password | A string specifying the password.

Related Topics

ConnectWithSavedPassword Method (Python)
Disconnect Method (Python)


ConnectWithSavedPassword Method (Python)

SpssServerConf class,SpssServerConf class,SpssServerConf class
ConnectWithSavedPassword method,ConnectWithSavedPassword method,ConnectWithSavedPassword method
ConnectWithSavedPassword method,ConnectWithSavedPassword method,ConnectWithSavedPassword method
SpssServerConf class,SpssServerConf class,SpssServerConf class

Attempts to connect to the associated instance of PASW Statistics Server using the stored user domain, user ID, and password.

Syntax

SpssServerConf.ConnectWithSavedPassword()

Related Topics

Connect Method (Python)
Disconnect Method (Python)


Disconnect Method (Python)

SpssServerConf class,SpssServerConf class,SpssServerConf class
Disconnect method,Disconnect method,Disconnect method
Disconnect method,Disconnect method,Disconnect method
SpssServerConf class,SpssServerConf class,SpssServerConf class

Disconnects from the associated instance of PASW Statistics Server.

• The method has no effect when called on the local server.

• After calling the Disconnect method, you must connect to another server before calling other methods in the SpssClient module.

• It is not necessary to disconnect before connecting to a new server.

Syntax

SpssServerConf.Disconnect()

Related Topics

Connect Method (Python)
ConnectWithSavedPassword Method (Python)


GetDescription Method (Python)

SpssServerConf class,SpssServerConf class,SpssServerConf class
GetDescription method,GetDescription method,GetDescription method
GetDescription method,GetDescription method,GetDescription method
SpssServerConf class,SpssServerConf class,SpssServerConf class

Returns the description text for the associated server.

Syntax

SpssServerConf.GetDescription()

Related Topics

SetDescription Method (Python)


GetServerName Method (Python)

SpssServerConf class,SpssServerConf class,SpssServerConf class
GetServerName method,GetServerName method,GetServerName method
GetServerName method,GetServerName method,GetServerName method
SpssServerConf class,SpssServerConf class,SpssServerConf class

Returns the machine name or IP address for the associated instance of PASW Statistics Server.

Syntax

SpssServerConf.GetServerName()

Related Topics

SetServerName Method (Python)


GetServerPort Method (Python)

SpssServerConf class,SpssServerConf class,SpssServerConf class
GetServerPort method,GetServerPort method,GetServerPort method
GetServerPort method,GetServerPort method,GetServerPort method
SpssServerConf class,SpssServerConf class,SpssServerConf class

Returns the port number for the associated instance of PASW Statistics Server.

Syntax

SpssServerConf.GetServerPort()

Related Topics

SetServerPort Method (Python)


GetUserDomain Method (Python)

SpssServerConf class,SpssServerConf class,SpssServerConf class
GetUserDomain method,GetUserDomain method,GetUserDomain method
GetUserDomain method,GetUserDomain method,GetUserDomain method
SpssServerConf class,SpssServerConf class,SpssServerConf class

Returns the domain for the current user ID.

Syntax

SpssServerConf.GetUserDomain()

Related Topics

SetUserDomain Method (Python)


GetUserId Method (Python)

SpssServerConf class,SpssServerConf class,SpssServerConf class
GetUserId method,GetUserId method,GetUserId method
GetUserId method,GetUserId method,GetUserId method
SpssServerConf class,SpssServerConf class,SpssServerConf class

Returns the user ID if it is saved as part of the associated server configuration.

Syntax

SpssServerConf.GetUserId()

Related Topics

SetUserId Method (Python)


GetUseSSL Method (Python)

SpssServerConf class,SpssServerConf class,SpssServerConf class
GetUseSSL method,GetUseSSL method,GetUseSSL method
GetUseSSL method,GetUseSSL method,GetUseSSL method
SpssServerConf class,SpssServerConf class,SpssServerConf class

Indicates if SSL (Secure Sockets Layer) is in use for the associated instance of PASW Statistics Server. SSL is a commonly used protocol for managing the security of message transmission on the Internet. The result is Boolean--True if SSL is in use, False otherwise.

Syntax

SpssServerConf.GetUseSSL()

Related Topics

SetUseSSL Method (Python)


IsDefaultServer Method (Python)

SpssServerConf class,SpssServerConf class,SpssServerConf class
IsDefaultServer method,IsDefaultServer method,IsDefaultServer method
IsDefaultServer method,IsDefaultServer method,IsDefaultServer method
SpssServerConf class,SpssServerConf class,SpssServerConf class

Indicates whether the associated instance of PASW Statistics Server is set as the default server. The result is Boolean--True if this is the default server, False otherwise.

Syntax

SpssServerConf.IsDefaultServer()

Related Topics

SetDefaultServer Method (Python)


IsEqualTo Method (Python)

SpssServerConf class,SpssServerConf class,SpssServerConf class
IsEqualTo method,IsEqualTo method,IsEqualTo method
IsEqualTo method,IsEqualTo method,IsEqualTo method
SpssServerConf class,SpssServerConf class,SpssServerConf class

Indicates if this server configuration object is the same object as a specified server configuration object. The result is Boolean--True if the two objects are identical, False otherwise.

Syntax

SpssServerConf.IsEqualTo(serverConf)

Parameters

serverConf An SpssServerConf object


IsLocalServer Method (Python)

SpssServerConf class,SpssServerConf class,SpssServerConf class
IsLocalServer method,IsLocalServer method,IsLocalServer method
IsLocalServer method,IsLocalServer method,IsLocalServer method
SpssServerConf class,SpssServerConf class,SpssServerConf class

Indicates whether the associated instance of PASW Statistics Server represents the local server. The result is Boolean--True if this server is the local server, False otherwise.

Syntax

SpssServerConf.IsLocalServer()


IsPasswordSaved Method (Python)

SpssServerConf class,SpssServerConf class,SpssServerConf class
IsPasswordSaved method,IsPasswordSaved method,IsPasswordSaved method
IsPasswordSaved method,IsPasswordSaved method,IsPasswordSaved method
SpssServerConf class,SpssServerConf class,SpssServerConf class

Indicates whether the password is saved in the server configuration. The result is Boolean--True if the password is saved, False otherwise.

Syntax

SpssServerConf.IsPasswordSaved()

Related Topics

SetPasswordSaved Method (Python)


SetDefaultServer Method (Python)

SpssServerConf class,SpssServerConf class,SpssServerConf class
SetDefaultServer method,SetDefaultServer method,SetDefaultServer method
SetDefaultServer method,SetDefaultServer method,SetDefaultServer method
SpssServerConf class,SpssServerConf class,SpssServerConf class

Specifies whether the associated instance of PASW Statistics Server is set as the default server.

Syntax

SpssServerConf.SetDefaultServer(defaultServerFlag)

Parameters

defaultServerFlag True to set as the default server, False otherwise.

Related Topics

IsDefaultServer Method (Python)


SetDescription Method (Python)

SpssServerConf class,SpssServerConf class,SpssServerConf class
SetDescription method,SetDescription method,SetDescription method
SetDescription method,SetDescription method,SetDescription method
SpssServerConf class,SpssServerConf class,SpssServerConf class

Sets the description text for the associated server configuration.

Syntax

SpssServerConf.SetDescription(description)

Related Topics

GetDescription Method (Python)


SetPassword Method (Python)

SpssServerConf class,SpssServerConf class,SpssServerConf class
SetPassword method,SetPassword method,SetPassword method
SetPassword method,SetPassword method,SetPassword method
SpssServerConf class,SpssServerConf class,SpssServerConf class

Sets the password to be used by this server configuration.

Syntax

SpssServerConf.SetPassword(password)


SetPasswordSaved Method (Python)

SpssServerConf class,SpssServerConf class,SpssServerConf class
SetPasswordSaved method,SetPasswordSaved method,SetPasswordSaved method
SetPasswordSaved method,SetPasswordSaved method,SetPasswordSaved method
SpssServerConf class,SpssServerConf class,SpssServerConf class

Specifies whether the password is saved in the server configuration.

Syntax

SpssServerConf.SetPasswordSaved(savePassword)

Parameters

savePassword True if the password is to be saved for future use, False otherwise.

Related Topics

IsPasswordSaved Method (Python)


SetServerName Method (Python)

SpssServerConf class,SpssServerConf class,SpssServerConf class
SetServerName method,SetServerName method,SetServerName method
SetServerName method,SetServerName method,SetServerName method
SpssServerConf class,SpssServerConf class,SpssServerConf class

Sets the machine name or IP address for the associated instance of PASW Statistics Server.

Syntax

SpssServerConf.SetServerName(serverName)

Related Topics

GetServerName Method (Python)


SetServerPort Method (Python)

SpssServerConf class,SpssServerConf class,SpssServerConf class
SetServerPort method,SetServerPort method,SetServerPort method
SetServerPort method,SetServerPort method,SetServerPort method
SpssServerConf class,SpssServerConf class,SpssServerConf class

Sets the port number for the associated instance of PASW Statistics Server.

Syntax

SpssServerConf.SetServerPort(port)

Parameters

port An integer

Related Topics

GetServerPort Method (Python)


SetUserDomain Method (Python)

SpssServerConf class,SpssServerConf class,SpssServerConf class
SetUserDomain method,SetUserDomain method,SetUserDomain method
SetUserDomain method,SetUserDomain method,SetUserDomain method
SpssServerConf class,SpssServerConf class,SpssServerConf class

Sets the domain for the current user ID.

Syntax

SpssServerConf.SetUserDomain(domain)

domain A string

Related Topics

GetUserDomain Method (Python)


SetUserId Method (Python)

SpssServerConf class,SpssServerConf class,SpssServerConf class
SetUserId method,SetUserId method,SetUserId method
SetUserId method,SetUserId method,SetUserId method
SpssServerConf class,SpssServerConf class,SpssServerConf class

Sets the user ID for the associated server configuration.

Syntax

SpssServerConf.SetUserId(userId)

Related Topics

GetUserId Method (Python)


SetUseSSL Method (Python)

SpssServerConf class,SpssServerConf class,SpssServerConf class
SetUseSSL method,SetUseSSL method,SetUseSSL method
SetUseSSL method,SetUseSSL method,SetUseSSL method
SpssServerConf class,SpssServerConf class,SpssServerConf class

Specifies the setting for using SSL (Secure Sockets Layer) with the associated instance of PASW Statistics Server. SSL is a commonly used protocol for managing the security of message transmission on the Internet.

Syntax

SpssServerConf.SetUseSSL(useSSL)

Parameters

useSSL True to use SSL, False otherwise.

Related Topics

GetUseSSL Method (Python)


SpssServerConfList Class (Python)

SpssServerConfList class,SpssServerConfList class,SpssServerConfList class

The SpssServerConfList class allows you to manage the list of configured servers, which includes the local computer. You obtain an SpssServerConfList object from the GetConfiguredServers method of the SpssClient class.

An SpssServerConfList object is not an iterable Python object. In order to iterate over the items in the list, use a for loop, as in:

for index in range(SpssServerConfList.Size()):

For an example that uses the SpssServerConfList class, see the example for the SpssServerConf class.


Add Method (Python)

SpssServerConfList class,SpssServerConfList class,SpssServerConfList class
Add method,Add method,Add method
Add method,Add method,Add method
SpssServerConfList class,SpssServerConfList class,SpssServerConfList class

Adds a server configuration to the list of available servers.

Syntax

SpssServerConfList.Add(serverConf)

Parameters

serverConf An SpssServerConf object.

Server configuration objects are created with the CreateNewServer method in the SpssClient class.


Clear Method (Python)

SpssServerConfList class,SpssServerConfList class,SpssServerConfList class
Clear method,Clear method,Clear method
Clear method,Clear method,Clear method
SpssServerConfList class,SpssServerConfList class,SpssServerConfList class

Clears the list of server configurations, including the local computer.

Syntax

SpssServerConfList.Clear()


Contains Method (Python)

SpssServerConfList class,SpssServerConfList class,SpssServerConfList class
Contains method,Contains method,Contains method
Contains method,Contains method,Contains method
SpssServerConfList class,SpssServerConfList class,SpssServerConfList class

Indicates if the specified server configuration is a member of the list of available server configurations. The result is a Boolean--True if the specified server configuration object is equal to a member of the list of available server configuration objects, False otherwise.

Syntax

SpssServerConfList.Contains(serverConf)

Parameters

serverConf An SpssServerConf object


GetItemAt Method (Python)

SpssServerConfList class,SpssServerConfList class,SpssServerConfList class
GetItemAt method,GetItemAt method,GetItemAt method
GetItemAt method,GetItemAt method,GetItemAt method
SpssServerConfList class,SpssServerConfList class,SpssServerConfList class

Returns an SpssServerConf object corresponding to the server configuration with the specified index. The index corresponds to the order in which the server configurations were created.

Syntax

SpssServerConf=SpssServerConfList.GetItemAt(index)


Remove Method (Python)

SpssServerConfList class,SpssServerConfList class,SpssServerConfList class
Remove method,Remove method,Remove method
Remove method,Remove method,Remove method
SpssServerConfList class,SpssServerConfList class,SpssServerConfList class

Removes the first occurrence of the specified server configuration from the list of available server configurations. There is no effect if the list does not contain the specified server configuration object.

Syntax

SpssServerConfList.Remove(serverConf)

Parameters

serverConf An SpssServerConf object


RemoveItemAt Method (Python)

SpssServerConfList class,SpssServerConfList class,SpssServerConfList class
RemoveItemAt method,RemoveItemAt method,RemoveItemAt method
RemoveItemAt method,RemoveItemAt method,RemoveItemAt method
SpssServerConfList class,SpssServerConfList class,SpssServerConfList class

Removes the server configuration with the specified index from the list of available server configurations. The index corresponds to the order in which the server configurations were created.

Syntax

SpssServerConfList.RemoveItemAt(index)


Size Method (Python)

SpssServerConfList class,SpssServerConfList class,SpssServerConfList class
Size method,Size method,Size method
Size method,Size method,Size method
SpssServerConfList class,SpssServerConfList class,SpssServerConfList class

Returns the number of configured servers, including the local computer.

Syntax

SpssServerConfList.Size()


SpssScriptContext Class (Python)

SpssScriptContext class,SpssScriptContext class,SpssScriptContext class

The SpssScriptContext class provides access to the object that triggers an autoscript as well as the associated output document object. Autoscripts are scripts that run automatically when triggered by the creation of specific pieces of output from selected procedures. Scripts are specified as autoscripts and associated with output items (that trigger them) from the Scripts tab of the Options dialog.

SpssScriptContext objects are only for use when writing a script that will be used as an autoscript. They have a value of None if referenced by a script that is not being run as an autoscript.

You get an SpssScriptContext object from the GetScriptContext method of the SpssClient object.

Example: Get the Output Item that Triggered an Autoscript

import SpssClient
SpssClient.StartClient()
SpssScriptContext = SpssClient.GetScriptContext()
SpssOutputItem = SpssScriptContext.GetOutputItem()

The GetOutputItem method of the SpssScriptContext object returns the output item (SpssOutputItem object) that triggered the current autoscript.


GetOutputDoc Method (Python)

SpssScriptContext class,SpssScriptContext class,SpssScriptContext class
GetOutputDoc method,GetOutputDoc method,GetOutputDoc method
GetOutputDoc method,GetOutputDoc method,GetOutputDoc method
SpssScriptContext class,SpssScriptContext class,SpssScriptContext class

Returns an SpssOutputDoc object representing the output document associated with the current autoscript.

Syntax

SpssOutputDoc=SpssScriptContext.GetOutputDoc()


GetOutputItem Method (Python)

SpssScriptContext class,SpssScriptContext class,SpssScriptContext class
GetOutputItem method,GetOutputItem method,GetOutputItem method
GetOutputItem method,GetOutputItem method,GetOutputItem method
SpssScriptContext class,SpssScriptContext class,SpssScriptContext class

Returns an SpssOutputItem object representing the output item that triggered the current autoscript.

Syntax

SpssOutputItem=SpssScriptContext.GetOutputItem()

Note: To obtain an object of a specific output type, such as a pivot table or header item, from an SpssOutputItem object, call the GetSpecificType method of the SpssOutputItem object.


GetOutputItemIndex Method (Python)

SpssScriptContext class,SpssScriptContext class,SpssScriptContext class
GetOutputItemIndex method,GetOutputItemIndex method,GetOutputItemIndex method
GetOutputItemIndex method,GetOutputItemIndex method,GetOutputItemIndex method
SpssScriptContext class,SpssScriptContext class,SpssScriptContext class

Returns the index, in the associated output document, of the output item that triggered the current autoscript. The index corresponds to the order of the items in the output document, starting with 0 for the root item.

Syntax

SpssScriptContext.GetOutputItemIndex()


Setting Color Values (Python)

colors,colors,colors
colors,colors,colors
setting color values,setting color values,setting color values

Color values are expressed as integers. If you're accustomed to specifying colors in RGB format, you can convert to the associated integer using the following:

integer color value = R + G*(256) + B*(256^2)

where R, G, and B are the RGB values. For reference, following are some of the most common colors and their integer values:

Color | Integer Value
Black | 0
Blue | 16711680
Cyan | 16776960
Green | 65280
Magenta | 16711935
Red | 255
White | 16777215
Yellow | 65535


Export Options (Python)

Export options are retrieved from the GetExportOption method of the SpssClient class and set from the SetExportOption method of that class. The option identifiers have the form SpssClient.ExportOptions.<option>, where the available option values are listed below--for example, SpssClient.ExportOptions.GraphExportType. All of the settings are strings.

Option | Valid Settings
ObjectsToExport | "all", "visible", "selected"
DocExportType | "excel", "html", "pdf", "plain", "utf8", "utf16", "word_rtf", "none" (graphics only)
DocFilePath | Export document file path
GraphExportType | "bmp", "emf", "eps", "jpg", "png", "tiff"
GraphFilePath | Export graph file path
XLSLayers | "all", "honor" (honors print layer setting), "visible"
XLSFootnotes | "No", "Yes"
HTMLayers | "all", "honor" (honors print layer setting), "visible"
HTMFootnotes | "No", "Yes"
WordRTFLayers | "all", "honor" (honors print layer setting), "visible"
WordRTFFootnotes | "No", "Yes"
TXTPlainTabsOrSpaces | "tabs", "spaces"
TXTPlainColumnWidthType | "autofit", "custom"
TXTPlainNoOfChars | Character representation of integer
TXTPlainRowBorderChar | Row border character
TXTPlainColBorderChar | Column border character
TxtPlainLayersInPivotTable | "all", "honor" (honors print layer setting), "visible"
TXTPlainFootnoteCaption | "No", "Yes"
TXTPlainInsertPageBreak | "No", "Yes"
TXTUTF8TabsOrSpaces | "tabs", "spaces"
TXTUTF8ColumnWidthType | "autofit", "custom"
TXTUTF8NoOfChars | Character representation of integer
TXTUTF8RowBorderChar | Row border character
TXTUTF8ColBorderChar | Column border character
TxtUTF8LayersInPivotTable | "all", "honor" (honors print layer setting), "visible"
TXTUTF8FootnoteCaption | "No", "Yes"
TXTUTF8InsertPageBreak | "No", "Yes"
TXTUTF16TabsOrSpaces | "tabs", "spaces"
TXTUTF16ColumnWidthType | "autofit", "custom"
TXTUTF16NoOfChars | Character representation of integer
TXTUTF16RowBorderChar | Row border character
TXTUTF16ColBorderChar | Column border character
TxtUTF16LayersInPivotTable | "all", "honor" (honors print layer setting), "visible"
TXTUTF16FootnoteCaption | "No", "Yes"
TXTUTF16InsertPageBreak | "No", "Yes"
PDFOptimize | "No", "Yes"
PDFEmbedBookmarks | "No", "Yes"
PDFEmbedFonts | "No", "Yes"
PDFLayers | "all", "honor" (honors print layer setting), "visible"
JPEGSize | Character representation of image size in percent
JPEGGreyScale | "No", "Yes"
BMPSize | Character representation of image size in percent
BMPCompressImage | "no", "yes"
PNGSize | Character representation of image size in percent
PNGColorDepth | "current" (current screen depth), "bw" (black and white), "256gray", "16color", "256color", "24bit" (true color), "32bit" (true color)
TIFSize | Character representation of image size in percent
EPSSize | "physical_size" (same aspect ratio), "current_size"
EPSPercent | Character representation of image size in percent. Applies to "current_size".
EPSWidthPoints | Character representation of image width in points. Applies to "physical_size".
EPSPreviewImage | "no", "yes"
EPSFont | "replace_font", "use_font_ref"


String Description of Numeric Formats (Python)

If you are using a localized version of PASW Statistics, use the strings displayed in the Format list box on the Format Value tab (accessed from Format>Cell Properties in the pivot table editor).

String | Example / Description
#.# | 1234.567
#.#;#.##E-# | 1234.567(scientific notation if the cell is not wide enough)
#,###.## | 1,234.567
#.###,## | 1.234,567
#.##E+## | 1.23E+03
##.#% | 56.7%
dd.mmm.yy | 28-OCT-94
dd-mmm-yyyy | 28-OCT-1994
mm/dd/yy | 10/28/94
mm/dd/yyyy | 10/28/1994
dd.mm.yy | 28.10.94
dd.mm.yyyy | 28.10.1994
yy/mm/dd | 94/10/28
yyyy/mm/dd | 1994/10/28
yyddd | 94301 (Julian date)
yyyyddd | 1994301 (Julian date)
q Q yy | 4 Q 94
q Q yyyy | 4 Q 1994
mmm yy | OCT 94
mmm yyyy | OCT 1994
ww WK yy | 43 WK 94
ww WK yyyy | 43 WK 1994
dd-mmm-yyyy hh:mm | 28-OCT-1994 08:03
dd-mmm-yyyy hh:mm:ss | 28-OCT-1994 08:03:00
ddd.hh.mm | 301 20:03
ddd.hh/mm.ss.## | 301 20:03:00.04
Monday, Tuesday... | Friday
January, February... | October
hh:mm | 08:03
hh:mm:ss.## | 08:03:00.04
$#,###.## | $1,234.56

You can create up to five custom currency display formats that can include special prefix and suffix characters and special treatment for negative values. The five custom currency format names are CCA, CCB, CCC, CCD, and CCE. The string can be used to specify the currency formats.


Preference Options (Python)

Preference options are retrieved from the GetPreference method of the SpssClient class and set from the SetPreference method of that class. The option identifiers have the form SpssClient.PreferenceOptions.<option>, where the available option values are listed below--for example, SpssClient.PreferenceOptions.VariableListDisplay. All of the settings are strings.

General Options

Option | Valid Settings
VariableListDisplay | "labels", "names"
VariableListSort | "alphabetical", "file", "measurement"
MeasurementSystem | "points", "inches", "centimeters"
Language | "Russian", "French", "German", "English", "Italian", "Japanese", "Korean", "Polish", "SChinese", "Spanish", "TChinese",
AutoRaise | "true", "false"
OutputScroll | "true", "false"
OutputSound | "system_beep", "none", "sound"
OutputSoundFile | Path to a custom sound file
ScientificNotation | "true", "false"
OpenSyntaxAtStartup | "true", "false"
OnlyOneDataset | "true", "false"

Viewer Options

Option | Valid Settings
TitleFont | Font name, e.g. "Serif"
TitleFontSize | Character representation of integer
TitleFontBold | "true", "false"
TitleFontItalic | "true", "false"
TitleFontUnderline | "true", "false"
TitleFontColor | Character representation of integer color
PageTitleFont | Font name, e.g. "Serif"
PageTitleFontSize | Character representation of integer
PageTitleFontBold | "true", "false"
PageTitleFontItalic | "true", "false"
PageTitleFontUnderline | "true", "false"
PageTitleFontColor | Character representation of integer color
TextOutputFont | Font name, e.g. "Serif"
TextOutputFontSize | Character representation of integer
TextOutputFontBold | "true", "false"
TextOutputFontItalic | "true", "false"
TextOutputFontUnderline | "true", "false"
TextOutputFontColor | Character representation of integer color
DisplayCommandsLog | "Off", "On"
LogContents | "hidden", "shown"
WarningsContents | "hidden", "shown"
WarningsJustification | "align_left", "align_center", "align_right"
NotesContents | "hidden", "shown"
NotesJustification | "align_left", "align_center", "align_right"
TitleContents | "hidden", "shown"
TitleJustification | "align_left", "align_center", "align_right"
PageTitleContents | "hidden", "shown"
PageTitleJustification | "align_left", "align_center", "align_right"
PivotTableContents | "hidden", "shown"
PivotTableJustification | "align_left", "align_center", "align_right"
ChartContents | "hidden", "shown"
ChartJustification | "align_left", "align_center", "align_right"
TextOutputContents | "hidden", "shown"
TreeModelContents | "hidden", "shown"
GenericJustification | "align_left", "align_center", "align_right"

Data Options

Option | Valid Settings
TransformationMergeOptions | "calculate_before_used", "calculate_immediately"
RandomNumberGenerator | "MC" (compatible with SPSS 12 and earlier), "MT" (Mersenne Twister)
DisplayFormatWidth | Character representation of integer between 1 and 40.
DisplayFormatDecimal | Character representation of integer between 0and 15.
ReadingExternalData | Character representation of integer between 1 and 40.
CenturyRangeValue | "Automatic", "custom"
CenturyRangeBeginYear | Character representation of integer between 1582 and 9900.

File Locations

Option | Valid Settings
RecordSyntax | "false", "true"
RecordMode | "append", "overwrite"
SessionJournalFile | Path to journal file
TempDir | Path to temp directory
RecentFiles | Recently used file list. Character representation of integer between 0 and 9.
DataFiles | Path to startup folder for data files on Open and Save dialogs
OtherFiles | Path to startup folder for other files on Open and Save dialogs
SpecifiedAndLastFolder | "true" (last folder used), "false" (specified folder)

Currency Options

Option | Valid Settings
CustomOutputFormat | "CCA", "CCB", "CCC", "CCD", "CCE"
AllValuesPrefix | All values prefix
AllValuesSuffix | All values suffix
NegativeValuesPrefix | Negative values prefix
NegativeValuesSuffix | Negative values suffix
DecimalSeparator | "comma", "period"

Output Labels

Option | Valid Settings
OutlineVariables | "Names", "Labels", "Both"
OutlineVariableValues | "Values", "Labels", "Both"
PivotTableVariables | "Names", "Labels", "Both"
PivotTableVariableValues | "Values", "Labels", "Both"

Chart Options

Option | Valid Settings
ChartTemplate | "On", "Off"
ChartTemplateFile | Path to chart template file
ChartAspectRatio | Chart aspect ratio
ChartFont | Font name, e.g. "Arial"
ChartFrameInner | "true", "false"
ChartFrameOuter | "true", "false"
GridLineScale | "true", "false"
GridLineCategory | "true", "false"
StyleCyclePref | "ColorsOnly", "PatternsOnly"

Pivot Table Options

Option | Valid Settings
ColumnWidth | "Labels", "Both" (labels and data)
EditingMode | "all_tables", "large_tables", "open_tables_window"


Using the PASW Statistics-R Integration Package

R,R,R
using R within PASW Statistics,using R within PASW Statistics,using R within PASW Statistics

The PASW Statistics-R package provides the ability to use R programming features within PASW Statistics. This feature requires the PASW Statistics-R Integration Plug-in.

Within PASW Statistics, R programming features are available inside BEGIN PROGRAM R-END PROGRAM program blocks in command syntax, as well as from implementation code for extension commands implemented in R. Within these structures, you have access to both the R programming language and the functions specific to PASW Statistics, provided in the PASW Statistics-R package. These functions allow you to:

• Read case data from the active dataset into R.

• Get information about data in the active dataset.

• Get output results from syntax commands.

• Write results from R back to PASW Statistics.

With these tools you have everything you need to create custom procedures in R. Tutorials are available by choosing Help>Working with R.

Show me

Note: SPSS Inc. is not the owner or licensor of the R software. Any user of the R programming language must agree to the terms of the R license agreement located on the web site for the R Project for Statistical Computing. SPSS Inc. is not making any statement about the quality of the R program. SPSS Inc. fully disclaims all liability associated with your use of the R program.

Related Topics

How to Get Integration Plug-ins
Working with R Program Blocks
Retrieving Output from Syntax Commands (R)
Displaying Graphical Output from R
Creating Pivot Table Output (R)
Writing Results to a New PASW Statistics Dataset (R)
Reading Case Data from PASW Statistics (R)
Retrieving Variable Dictionary Information (R)


Working with R Program Blocks

BEGIN PROGRAM (command),BEGIN PROGRAM (command),BEGIN PROGRAM (command)

The keyword R on the BEGIN PROGRAM command identifies a block of R programming statements, which are processed by R.

The basic specification is BEGIN PROGRAM R followed by one or more R statements, followed by END PROGRAM.

Example Collapse Hide details

Example

*R_multiple_program_blocks.sps.
DATA LIST FREE /var1.
BEGIN DATA
1
END DATA.
DATASET NAME File1.
BEGIN PROGRAM R.
File1N <- spssdata.GetCaseCount()
END PROGRAM.
DATA LIST FREE /var1.
BEGIN DATA
1
2
END DATA.
DATASET NAME File2.
BEGIN PROGRAM R.
File2N <- spssdata.GetCaseCount()
{if (File2N > File1N)
  message <- "File2 has more cases than File1."
else if (File1N > File2N)
  message <- "File1 has more cases than File2."
else
  message <- "Both files have the same number of cases."
}
cat(message)
END PROGRAM.

• The first program block defines a programmatic variable, File1N, with a value set to the number of cases in the active dataset.

• The first program block is followed by command syntax that creates and names a new active dataset. Although you cannot execute PASW Statistics command syntax from within an R program block, you can have multiple R program blocks separated by command syntax that performs any necessary actions. Values of R variables assigned in a given program block are available in subsequent program blocks.

• The second program block defines a programmatic variable, File2N, with a value set to the number of cases in the PASW Statistics dataset named File2. The value of File1N persists from the first program block, so the two case counts can be compared in the second program block.

• The R function cat is used to display the value of the R variable message. Output written to R's standard output--for instance, with the cat or print function--is directed to a log item in the PASW Statistics Viewer.

Note: To minimize R memory usage, you may want to delete large objects such as PASW Statistics datasets at the end of your R program block--for example, rm(data).

Displaying Output from R Collapse Hide details

Displaying Output from R

For PASW Statistics version 18 and higher, and by default, all output from R is redirected to the PASW Statistics Viewer. This includes implicit output from R functions that would be generated when running those functions from within an R console--for example, the model coefficients and various statistics displayed by the glm function, or the mean value displayed by the mean function. You can toggle the display of output from R with the spsspkg.SetOutput function.

Accessing R Help Within PASW Statistics Collapse Hide details

Accessing R Help Within PASW Statistics

You can access help for R functions from within PASW Statistics. Simply include a call to the R help function in a BEGIN PROGRAM R-END PROGRAM block and run the block. For example:

BEGIN PROGRAM R
help(paste)
END PROGRAM.

to obtain help for the R paste function.

You can access R's main html help page with:

BEGIN PROGRAM R
help.start()
END PROGRAM.
R,R,R
debugging,debugging,debugging
browser function in R,browser function in R,browser function in R
debug function in R,debug function in R,debug function in R
Debugging Collapse Hide details

Debugging

For PASW Statistics version 18 and higher, you can use the R browser, debug, and undebug functions within BEGIN PROGRAM R-END PROGRAM blocks, as well as from within implementation code for extension commands implemented in R. This allows you to use some of the same debugging tools available in an R console. Briefly, the browser function interrupts execution and displays a console window that allows you to inspect objects in the associated environment, such as variable values and expressions. The debug function is used to flag a specific R function--for instance, an R function that implements an extension command--for debugging. When the function is called, a console window is displayed and you can step through the function one statement at a time, inspecting variable values and expressions.

• Results displayed in a console window associated with use of the browser or debug function are displayed in the PASW Statistics Viewer after the completion of the program block or extension command containing the function call.

Note: When a call to a function that generates explicit output--such as the R print function--precedes a call to browser or debug, the resulting output is displayed in the PASW Statistics Viewer after the completion of the program block or extension command containing the function call. You can cause such output to be displayed in the R console window associated with browser or debug by ensuring that the call to browser or debug precedes the function that generates the output and then stepping through the call to the output function.

• Use of the debug and browser functions is not supported in distributed mode.

For more information on the use of the debug and browser functions, see the R help for those functions.

R Functions that Read from stdin Collapse Hide details

R Functions that Read from stdin

Some R functions take input data from an external file or from the standard input connection stdin. For example, by default, the scan function reads from stdin but can also read from an external file specified by the file argument. When working with R functions within BEGIN PROGRAM R-END PROGRAM blocks, reading data from stdin is not supported, due to the fact that R is embedded within PASW Statistics. For such functions, you will need to read data from an external file. For example:

BEGIN PROGRAM R.
data <- scan(file="/Rdata.txt")
END PROGRAM.
Versions Collapse Hide details

Versions

BEGIN PROGRAM R-END PROGRAM blocks do not need and, in general, should not contain an R library command for loading the PASW Statistics-R package. The correct version of the package is automatically loaded for you. If necessary, you can explicitly specify the version of the PASW Statistics-R package using the R library command, as in:

BEGIN PROGRAM R.
library(spss,version="18.0")
END PROGRAM.

The specified version of the PASW Statistics-R package must be equal to or earlier than the version of PASW Statistics from which the program block is run.

Syntax Rules Collapse Hide details

Syntax Rules

• Within a program block, only statements recognized by the specified programming language are allowed.

• Within a program block, each line should not exceed 251 bytes.

• With the PASW Statistics Batch Facility (available only with PASW Statistics Server), use the -i switch when submitting command files that contain program blocks. All command syntax (not just the program blocks) in the file must adhere to interactive syntax rules.

Operations Collapse Hide details

Operations

• Within a BEGIN PROGRAM R block, the R functions quit() and q() will terminate the PASW Statistics session.

Scope and Limitations Collapse Hide details

Scope and Limitations

• Programmatic variables created in a program block cannot be used outside of program blocks.

• Program blocks cannot be contained within DEFINE-!ENDDEFINE macro definitions.

• Program blocks can be contained in command syntax files run via the INSERT command, with the default SYNTAX=INTERACTIVE setting.

• Program blocks cannot be contained within command syntax files run via the INCLUDE command.

• R variables specified in a given program block persist to subsequent program blocks.

• You can nest a BEGIN PROGRAM R block in a BEGIN PROGRAM PYTHON block, but you cannot nest a Python program block in an R program block. See the topic Nested Program Blocks (Python) for more information.

Related Topics

R Syntax Rules
Localizing Output from R


R Syntax Rules

R,R,R
syntax rules,syntax rules,syntax rules
file specifications,file specifications,file specifications

Within an R program block, only statements and functions recognized by R are allowed. R syntax rules differ from PASW Statistics syntax rules in a number of ways:

R is case-sensitive.

This includes variable names, function names, and pretty much anything else you can think of. A variable name of myRvariable is not the same as MyRVariable, and the function GetCaseCount() cannot be written as getcasecount().

R uses a less than sign followed by a dash (<-) for assignment.

For example:

var1 <- var2+1

R commands are terminated with a semi-colon or new line; continuation lines do not require special characters or indentation.

For example:

var1 <- var2+
3

is read as var1<-var2+3, since R continues to read input until a command is syntactically complete. However:

var1 <- var2
+3

will be read as two separate commands, and var1 will be set to the value of var2.

Groupings of statements are indicated by braces. Groups of statements in structures such as loops, conditional expressions, and functions are indicated by enclosing the statements in braces, as in:

while (!spssdata.IsLastSplit()){
   data <- spssdata.GetSplitDataFromSPSS()
   cat("\nCases in Split: ",length(data[,1]))
}

R Quoting Conventions

• Strings in the R programming language can be enclosed in matching single quotes (') or double quotes ("), as in PASW Statistics.

• To specify an apostrophe (single quote) within a string, enclose the string in double quotes. For example,

"Joe's Bar and Grille"

is treated as

Joe's Bar and Grille

• To specify quotation marks (double quote) within a string, use single quotes to enclose the string, as in

'Categories Labeled "UNSTANDARD" in the Report'

• In the R programming language, doubled quotes of the same type as the outer quotes are not allowed. For example,

'Joe''s Bar and Grille'

results in an error.

File Specifications. Since escape sequences in the R programming language begin with a backslash (\)--such as \n for newline and \t for tab--it is recommended to use forward slashes (/) in file specifications on Windows. In this regard, PASW Statistics always accepts a forward slash in file specifications.

spssRGraphics.Submit("/temp/R_graphic.jpg")

Alternatively, you can escape each backslash with another backslash, as in:

spssRGraphics.Submit("\\temp\\R_graphic.jpg")

Related Topics

Working with R Program Blocks
Localizing Output from R


Localizing Output from R

R,R,R
localizing output,localizing output,localizing output

If you are interested in localizing output from R, such as messages and pivot table strings, it is recommended to use the R gettext function in conjunction with the R bindtextdomain function. Briefly, you create a directory containing compiled versions of translation (.mo) files--one for each desired language. Each file consists of pairs of strings--an untranslated string and the translated version of the string. In your R code, you call bindtextdomain with the location of this directory. You then call gettext each time you need translated text, passing the untranslated text as a key.

• The R gettext and bindtextdomain functions are implementations of functionality in the GNU gettext facility. Please consult the documentation for GNU gettext (http://www.gnu.org/software/gettext/) for details about creating the translation files.

• The gettext function attempts to determine the language in which to return results by querying the LANGUAGE environment variable. As an aid to using gettext, PASW Statistics sets the LANGUAGE environment variable--accessed within program blocks and implementation code for extension commands--to the current output language.

Compiled translation files should be stored in the following structure:

<dir>/<language>/LC_MESSAGES/<domain>.mo

• <dir> is the name of the top level directory where translation files are stored and is arbitrary.

• <language> is the identifier for a particular language. Identifiers for the languages supported by PASW Statistics are shown in the Language Identifiers table.

• <domain> is the name of the compiled translation files--the same name for all languages.

Distributing Localized Versions of Custom Dialogs and/or Extension Commands

If you are localizing output for a custom dialog or extension command that you intend to distribute to other users, then you should create an extension bundle to package your translation files with your custom components. Specifically, you add the directory containing your compiled translation files to the extension bundle during the creation of the bundle. When an end user installs the extension bundle, the directory containing the translation files is installed in the extensions/<extension bundle name> directory under the PASW Statistics installation location, and where <extension bundle name> is the name of the extension bundle with spaces replaced by underscores.

• If the SPSS_EXTENSIONS_PATH environment variable has been set, then the extensions directory (in extensions/<extension bundle name>) is replaced by the first writable directory in the environment variable.

• For information on creating extension bundles, see Working with Extension Bundles.

Example

You create an extension bundle named MY EXTENSION and include the directory po (the conventional name used by R for the directory containing translation files), containing translation files for an extension command contained in the bundle. The following is an example of code for handling translations within your extension command. It does not, however, deal with the case where the SPSS_EXTENSIONS_PATH environment variable has been set.

domain<-"MY_EXTENSION"
res<-bindtextdomain(domain,dirname=paste(spsspkg.GetStatisticsPath(),
                                         "extensions/MY_EXTENSION/po",sep=""))
spsspkg.StartProcedure(gettext("My Model Output",domain=domain))

• The first argument to the bindtextdomain function is the domain name, which must be the name used for the translation (.mo) files. In this example, the domain is "MY_EXTENSION". The dirname argument specifies the path to the directory containing the translation files. The spsspkg.GetStatisticsPath() function is used to get the path to the PASW Statistics installation directory.

• The spsspkg.StartProcedure function signals the beginning of a block of output. The argument specifies the name that appears in the outline pane of the Viewer associated with the output. The argument is a string whose localized value is obtained by calling the gettext function. The arguments to gettext are the untranslated string and the domain name specified in the bindtextdomain function.

Language Identifiers Collapse Hide details

Language Identifiers

de | German
en | English
es | Spanish
fr | French
it | Italian
ja | Japanese
ko | Korean
pl | Polish
ru | Russian
zh_CN | Simplified Chinese
zh_TW | Traditional Chinese

Related Topics

Working with R Program Blocks
R Syntax Rules
spsspkg.SetOutputLanguage Function (R)


Retrieving Variable Dictionary Information (R)

You can retrieve variable dictionary information from the active dataset using functions specific to each type of information (such as the variable label or the measurement level) or you can use the spssdictionary.GetDictionaryFromSPSS function to return results for a number of dictionary properties as an R data frame. For information on functions that retrieve specific dictionary properties, see the topic on spssdictionary functions.

Example

DATA LIST FREE /id (F4) gender (A1) training (F1).
VARIABLE LABELS id 'Employee ID'
   /training 'Training Level'.
VARIABLE LEVEL id (SCALE)
   /gender (NOMINAL)
   /training (ORDINAL).
VALUE LABELS training 1 'Beginning' 2 'Intermediate' 3 'Advanced'
   /gender 'f' 'Female' 'm' 'Male'.
BEGIN DATA
18 m 1
37 f 2
10 f 3
END DATA.
BEGIN PROGRAM R.
vardict <- spssdictionary.GetDictionaryFromSPSS()
print(vardict)
END PROGRAM.

Result

                             X1        X2             X3
varName                      id    gender       training
varLabel            Employee ID           Training Level
varType                       0         1              0
varFormat                    F4        A1             F1
varMeasurementLevel       scale   nominal        ordinal

Each column of the returned data frame contains the information for a single variable from the active dataset. The information for each variable consists of the variable name, the variable label, the variable type (0 for numeric variables, and an integer equal to the defined length for string variables), the display format, and the measurement level.

Working wth the Data Frame Representation of a Dictionary

The data frame returned by the GetDictionaryFromSPSS function contains the row labels varName, varLabel, varType, varFormat, and varMeasurementLevel. You can use these labels to specify the corresponding row. For example, the following code extracts the variable names:

varNames <- vardict["varName",]

It is often convenient to obtain separate lists of categorical and scale variables. The following code shows how to do this using the data frame representation of the PASW Statistics dictionary. The results are stored in the two R vectors scaleVars and catVars.

scaleVars<-vardict["varName",][vardict["varMeasurementLevel",]=="scale"]
catVars<-vardict["varName",][vardict["varMeasurementLevel",]=="nominal" |
                             vardict["varMeasurementLevel",]=="ordinal"]


Reading Case Data from PASW Statistics (R)

spssdata functions,spssdata functions,spssdata functions
GetDataFromSPSS,GetDataFromSPSS,GetDataFromSPSS
GetDataFromSPSS,GetDataFromSPSS,GetDataFromSPSS
data,data,data
reading active dataset into R,reading active dataset into R,reading active dataset into R
active dataset,active dataset,active dataset
reading into R,reading into R,reading into R

The spssdata.GetDataFromSPSS function reads case data from the PASW Statistics active dataset and, by default, stores it to an R data frame. You can choose to retrieve the cases for all variables or a selected subset of the variables in the active dataset. Variables are specified by name or by an index value representing position in the active dataset, starting with 0 for the first variable in file order.

Example: Retrieving Cases for All Variables

*R_get_all_cases.sps.
DATA LIST FREE /mpg (F4) engine (F5) horse (F5) weight (F4) year(F2).
BEGIN DATA.
18  307  130  3504 70
15  350  165  3693 73
18  318  150  3436 71
END DATA.
BEGIN PROGRAM R.
casedata <- spssdata.GetDataFromSPSS()
print(casedata)
END PROGRAM.

Result

  mpg engine horse weight year
1  18    307   130   3504   70
2  15    350   165   3693   73
3  18    318   150   3436   71

Each column of the returned data frame contains the case data for a single variable from the active dataset. The column name is the variable name and can be used to extract the data for that variable, as in:

engine <- casedata$engine

Each row of the returned data frame contains the data for a single case. By default, the rows are labeled with consecutive integers. When calling GetDataFromSPSS, you can include the optional argument row.label to specify a variable from the active dataset whose case values will be the row labels of the resulting data frame.

Example: Retrieving Cases for Selected Variables

*R_get_specified_variables.sps.
DATA LIST FREE /mpg (F4) engine (F5) horse (F5) weight (F4) year(F2).
BEGIN DATA.
18  307  130  3504 70
15  350  165  3693 73
18  318  150  3436 71
END DATA.
BEGIN PROGRAM R.
casedata <- spssdata.GetDataFromSPSS(variables=c("mpg","engine",
                                                 "weight"))
END PROGRAM.

The argument variables is an R vector specifying a subset of variables for which case data will be retrieved. In this example, the R function c() is used to create a character vector of variable names. The resulting R data frame (casedata) will contain the three columns labeled mpg, engine, and weight.

You can use the TO keyword to specify a range of variables as you can in PASW Statistics--for example, variables=c("mpg TO weight"). If you prefer to work with variable index values (index values represent position in the dataset, starting with 0 for the first variable in file order), you can specify a range of variables with an expression such as variables=c(0:3). The R code c(0:3) creates a vector consisting of the integers between 0 and 3 inclusive.

Example: Retrieving Categorical Variables

The analogue of a categorical variable in PASW Statistics is a factor in R. You can specify that categorical variables are converted to factors, although by default they are not. To convert categorical variables to R factors, use the factorMode argument of the GetDataFromSPSS function.

*R_handle_catvars.sps.
DATA LIST FREE /id (F4) gender (A1) training (F1).
VARIABLE LABELS id 'Employee ID'
   /training 'Training Level'.
VARIABLE LEVEL id (SCALE)
   /gender (NOMINAL)
   /training (ORDINAL).
VALUE LABELS training 1 'Beginning' 2 'Intermediate' 3 'Advanced'
   /gender 'f' 'Female' 'm' 'Male'.
BEGIN DATA
18 m 1
37 f 2
10 f 3
22 m 2
END DATA.
BEGIN PROGRAM R.
casedata <- spssdata.GetDataFromSPSS(factorMode="labels")
print(casedata)
END PROGRAM.

• The value "labels" for factorMode, used in this example, specifies that categorical variables are converted to factors whose levels are the value labels of the variables. The alternate value "levels" specifies that categorical variables are converted to factors whose levels are the values of the variables. See the topic spssdata.GetDataFromSPSS Function (R) for more information.

Result

  id gender     training
1 18   Male    Beginning
2 37 Female Intermediate
3 10 Female     Advanced
4 22   Male Intermediate

Note: If you intend to write factors retrieved with factorMode="labels" to a new PASW Statistics dataset, special handling is required. See the topic Writing Results to a New PASW Statistics Dataset (R) for more information.

Example: Handling PASW Statistics Datetime Values

dates,dates,dates
reading datetime values into R,reading datetime values into R,reading datetime values into R

When retrieving values of PASW Statistics variables with date or datetime formats, you'll most likely want to convert the values to R date/time (POSIXt) objects. By default, such variables are not converted and are simply returned in the internal representation used by PASW Statistics (floating point numbers representing some number of seconds and fractional seconds from an initial date and time). To convert variables with date or datetime formats to R date/time objects, you use the rDate argument of the GetDataFromSPSS function.

*R_retrieve_datetime_values.sps.
DATA LIST FREE /bdate (ADATE10).
BEGIN DATA
05/02/2009
END DATA.
BEGIN PROGRAM R.
data<-spssdata.GetDataFromSPSS(rDate="POSIXct")
print(data)
END PROGRAM.

Result

       bdate
1 2009-05-02

Example: Missing Data

missing values,missing values,missing values
reading data into R,reading data into R,reading data into R

By default, missing values for numeric variables (user-missing and system-missing) are converted to the R NaN value and user-missing values of string variables are converted to the R NA value.

*R_get_missing_data.sps.
DATA LIST LIST (',') /numVar (f) stringVar (a4).
BEGIN DATA
1,a
,b
3,,
9,d
END DATA.
MISSING VALUES numVar (9) stringVar (' ').
BEGIN PROGRAM R.
data <- spssdata.GetDataFromSPSS()
cat("Case data with missing values:\n")
print(data)
END PROGRAM.

Result

Case data with missing values:

  numVar stringVar
1      1         a
2    NaN         b
3      3       <NA>
4    NaN         d

Note: You can specify that missing values of numeric variables be converted to the R NA value, with the missingValueToNA argument, as in:

data<-spssdata.GetDataFromSPSS(missingValueToNA=TRUE)

You can specify that user-missing values be treated as valid data by setting the optional argument keepUserMissing to TRUE, as shown in the following reworking of the previous example.

DATA LIST LIST (',') /numVar (f) stringVar (a4).
BEGIN DATA
1,a
,b
3,,
9,d
END DATA.
MISSING VALUES numVar (9) stringVar (' ').
BEGIN PROGRAM R.
data <- spssdata.GetDataFromSPSS(keepUserMissing=TRUE)
cat("Case data with user-missing values treated as valid:\n")
print(data)
END PROGRAM.

Result

Case data with user-missing values treated as valid:

  numVar stringVar
1      1         a
2    NaN         b
3      3
4      9         d

Example: Handling Data with Splits

split-file processing,split-file processing,split-file processing
reading datasets with splits in R,reading datasets with splits in R,reading datasets with splits in R

When reading from PASW Statistics datasets with split groups, use the GetSplitDataFromSPSS function to retrieve each split separately, as shown in this example.

*R_get_split_groups.sps.
DATA LIST FREE /salary (F6) jobcat (F2).
BEGIN DATA
21450 1
45000 1
30000 2
30750 2
103750 3
72500 3
57000 3
END DATA.

SORT CASES BY jobcat.
SPLIT FILE BY jobcat.
BEGIN PROGRAM R.
varnames <- spssdata.GetSplitVariableNames()
if(length(varnames) > 0)
{
   while (!spssdata.IsLastSplit()){
      data <- spssdata.GetSplitDataFromSPSS()
      cat("\n\nSplit variable values:")
      for (name in varnames) cat("\n",name,":",
                                 as.character(data[1,name]))
      cat("\nCases in Split: ",length(data[,1]))
   }
   spssdata.CloseDataConnection()
}
END PROGRAM.

Result

Split variable values:
 jobcat : 1
Cases in Split:  2

Split variable values:
 jobcat : 2
Cases in Split:  2

Split variable values:
 jobcat : 3
Cases in Split:  3

• The GetSplitVariableNames function returns the names of the split variables, if any, from the active dataset.

• The GetSplitDataFromSPSS function retrieves the case data for the next split group from the active dataset, and returns it as an R data frame.

• The IsLastSplit function returns TRUE if the current split group is the last one in the active dataset.

• The CloseDataConnection function should be called when the necessary split groups have been read. In particular, GetSplitDataFromSPSS implicitly starts a data connection for reading from split files and this data connection must be closed with CloseDataConnection.

Related Topics

spssdata Functions (R)
spssdata.GetDataFromSPSS Function (R)
spssdata.GetSplitDataFromSPSS Function (R)


Writing Results to a New PASW Statistics Dataset (R)

The PASW Statistics-R Integration Plug-in provides the ability to write results from R to a new PASW Statistics dataset. The steps to create a new dataset are:

Create the dataset's dictionary using the SetDictionaryToSPSS function. The function requires a data frame representation of the dictionary as created by the GetDictionaryFromSPSS function or the CreateSPSSDictionary function.

Populate the case data using the SetDataToSPSS function.

Note: When setting values for a PASW Statistics variable with a date or datetime format, specify the values as R POSIXt objects, which will then be correctly converted to the values appropriate for PASW Statistics. Also note that PASW Statistics variables with a time format are stored as the number of seconds from midnight.

Example

This example shows how to create a new dataset that is a copy of the active dataset with the addition of a single new variable.

dict <- spssdictionary.GetDictionaryFromSPSS()
casedata <- spssdata.GetDataFromSPSS()
varSpec <- c("meansal","Mean Salary",0,"F8","scale")
dict <- data.frame(dict,varSpec)
spssdictionary.SetDictionaryToSPSS("results",dict)
casedata <- data.frame(casedata,mean(casedata$salary))
spssdata.SetDataToSPSS("results",casedata)
spssdictionary.EndDataStep()

• The GetDictionaryFromSPSS function returns an R data frame representation of the active dataset's dictionary. The GetDataFromSPSS function returns an R data frame representation of the case data from the active dataset.

• New variables are specified as an R vector--in this example, varSpec--whose components are the properties of the variable in the following required order: variable name, variable label, variable type, variable format, measurement level. See the topic spssdictionary.CreateSPSSDictionary Function (R) for more information.

• The code data.frame(dict,varSpec) creates a data frame representation of the new dictionary, consisting of the original dictionary and the new variable.

You can also use CreateSPSSDictionary to create a dictionary from scratch without building onto one retrieved with GetDictionaryFromSPSS. In that case, you create R vectors specifying each of your variables, as done with varSpec, and include those vectors in the call to CreateSPSSDictionary. The order of the arguments to CreateSPSSDictionary is the order of the associated variables in the new dataset.

• The SetDictionaryToSPSS function creates a new dataset named results from the data frame representation of the dictionary.

• The code data.frame(casedata,mean(casedata$salary)) creates a new data frame consisting of the data retrieved from the active dataset and the data for the new variable. In this example, the new variable is the mean of the variable salary from the active dataset. You can build data frames from existing data frames, as done here, or from vectors representing each of the columns. For example, data.frame(var1,var2,var2) creates a data frame whose columns are specified by the vectors var1, var2, and var3. The vectors must be of equal length and in the same order as the associated variables in the new dataset.

• The SetDataToSPSS function populates the case data of the new dataset. Its arguments are the name of the dataset to populate and a data frame representation of the case data.

• The EndDataStep function should be called after completing the steps for creating the new dataset.

Note: Missing values, value labels, custom variable attributes, datafile attributes, and multiple response sets are set with the spssdictionary.SetUserMissing, spssdictionary.SetValueLabel, spssdictionary.SetVariableAttributes, spssdictionary.SetDataFileAttributes, and spssdictionary.SetMultiResponseSet functions. When used, these functions must be called after the SetDictionaryToSPSS function and prior to the EndDataStep function.

Writing Categorical Variables Back to PASW Statistics

When reading categorical variables from PASW Statistics with factorMode="labels" and writing the associated R factors to a new PASW Statistics dataset, special handling is required because labeled factors in R do not preserve the original values. In this example, we read data containing categorical variables from PASW Statistics and create a new dataset containing the original data with the addition of a single new variable.

*R_read_write_catvars.sps.
DATA LIST FREE /id (F4) gender (A1) training (F1) salary (DOLLAR).
VARIABLE LABELS id 'Employee ID'
/training 'Training Level'.
VARIABLE LEVEL id (SCALE)
/gender (NOMINAL)
/training (ORDINAL)
/salary (SCALE).
VALUE LABELS training 1 'Beginning' 2 'Intermediate' 3 'Advanced'
/gender 'm' 'Male' 'f' 'Female'.
BEGIN DATA
18 m 3 57000
37 f 2 30750
10 f 1 22000
22 m 2 31950
END DATA.

BEGIN PROGRAM  R.
dict <- spssdictionary.GetDictionaryFromSPSS()
casedata <- spssdata.GetDataFromSPSS(factorMode="labels")
catdict <- spssdictionary.GetCategoricalDictionaryFromSPSS()
varSpec <- c("meansal","Mean Salary",0,"DOLLAR8","scale")
dict<-data.frame(dict,varSpec)
casedata<-data.frame(casedata,mean(casedata$salary))
spssdictionary.SetDictionaryToSPSS("results",dict,categoryDictionary=catdict)
spssdata.SetDataToSPSS("results",casedata,categoryDictionary=catdict)
spssdictionary.EndDataStep()
END PROGRAM.

• The GetCategoricalDictionaryFromSPSS function returns a structure (referred to as a category dictionary) containing the values and value labels of the categorical variables from the active dataset.

• The category dictionary stored in catdict is used when creating the new dataset with the SetDictionaryToSPSS function and when writing the data to the new dataset with the SetDataToSPSS function. The value labels of the categorical variables are automatically added to the new dataset and the case values of those variables (in the new dataset) are the values from the original dataset.

If you rename categorical variables when writing them back to PASW Statistics, you must use the EditCategoricalDictionary function to change the name in the associated category dictionary.

Saving New Datasets

To save a new dataset created from within an R program block, you include command syntax--such as SAVE or SAVE TRANSLATE--following the program block that created the dataset. Note, however, that a dataset created in an R program block is NOT set as the active dataset. To make a new dataset the active one, use the spssdictionary.SetActive function from within the program block or the DATASET ACTIVATE command outside of the program block. If you choose to use the SetActive function, it must be called prior to calling spssdictionary.EndDataStep.

Related Topics

spssdictionary.SetDictionaryToSPSS Function (R)
spssdata.SetDataToSPSS Function (R)
spssdictionary.EditCategoricalDictionary Function (R)
spssdictionary.GetCategoricalDictionaryFromSPSS Function (R)


Creating Pivot Table Output (R)

pivot tables,pivot tables,pivot tables

The PASW Statistics-R Integration Plug-in provides the ability to render tabular output from R as a pivot table that can be displayed in the PASW Statistics Viewer or written to an external file using the PASW Statistics Output Management System.

Typically, the output from an R analysis--such as a generalized linear model--is an object whose attributes contain the results of the analysis. You can extract the results of interest and render them as pivot tables in PASW Statistics using the spsspivottable.Display function.

Example

In this example, we read the case data from the active dataset, create a generalized linear model, and write summary results of the model coefficients back to the PASW Statistics Viewer as a pivot table.

casedata <- spssdata.GetDataFromSPSS()
model <- glm(mpg~engine+horse+weight,data=casedata)
res <- summary(model)
spsspivottable.Display(res$coefficients,
                       title="Model Coefficients",
                       format=formatSpec.GeneralStat)

Result

Model Coefficients

• The R variable model contains the results of the generalized linear model analysis.

• The R summary function takes the results of the glm analysis and produces an R object with a number of attributes that summarize the model. In particular, the coefficients attribute contains a table of the model coefficients and associated statistics.

Note: You can obtain a list of the attributes available for an object using attributes(object).

• The spsspivottable.Display function creates the pivot table. The first and only required argument is the data to be displayed as a pivot table. This can be a data frame, matrix, table, or any R object that can be converted to a data frame. In the present example, the coefficients attribute of the summary object is a matrix.

• The format argument specifies the format to be used for displaying numeric values, including cell values, row labels, and column labels. The argument is of the form formatSpec.format, as in formatSpec.GeneralStat. A list of available formats as well as a brief guide to choosing a format is provided in the topic on the spsspivottable.Display function.

Optional arguments to the spsspivottable.Display function allow you to customize the pivot table.

By default, the name that appears in the outline pane of the Viewer associated with the pivot table is R. You can customize the name and nest multiple pivot tables under a common heading by wrapping the pivot table generation in a StartProcedure-EndProcedure block. See the topic spsspkg.StartProcedure Function (R) for more information.

The spsspivottable.Display is limited to pivot tables with one row dimension and one column dimension. To create more complex pivot tables, use the BasePivotTable class.

Related Topics

spsspivottable.Display Function (R)
BasePivotTable Class (R)


Displaying Graphical Output from R

R,R,R
graphics,graphics,graphics

By default, graphical output from R--for instance, from the R plot function--is displayed in the PASW Statistics Viewer. You can display a specified R graphics file, from disk, in the PASW Statistics Viewer using the spssRGraphics.Submit function, and you can turn display of R graphics on or off using the spssRGraphics.SetOutput function. R graphics displayed in the PASW Statistics Viewer cannot be edited and do not use the graphics preference settings in PASW Statistics.

Example

This example makes use of the default behavior for rendering graphical output from R in the Viewer. It produces a scatterplot, along with fit lines computed from a linear model and separately from a smoothing algorithm. Descriptive text is also added to the plot. The example uses cars.sav, which is a hypothetical data file that contains information about cars.

COMPUTE filter_$=(nvalid(accel, horse) = 2).
FILTER BY filter_$.
BEGIN PROGRAM R.
cars <- spssdata.GetDataFromSPSS()
plot(cars$horse, cars$accel, col="blue", pch=19)
abline(lm(cars$accel ~ cars$horse), lwd=3 )
lines(lowess(cars$accel ~ cars$horse), lwd=3, lty=2)
text(80,10, expression(hat(beta) == (X^t * X)^{-1} * X^t * Y), font=2)
END PROGRAM.

Result

R graphic displayed in the Viewer

Note on Generating Multiple Graphics

When invoking a graphics command that generates multiple graphics, you will need to add the parameter ask=FALSE, as in: plot(result,ask=FALSE).

Related Topics

spssRGraphics.Submit Function (R)
spssRGraphics.SetOutput Function (R)


Retrieving Output from Syntax Commands (R)

EvaluateXPath,EvaluateXPath,EvaluateXPath
XML workspace,XML workspace,XML workspace
XPath expressions,XPath expressions,XPath expressions

Functionality provided with the PASW Statistics-R Integration Plug-In allows you to access output from PASW Statistics syntax commands in a programmatic fashion. To retrieve command output, you first route it via the Output Management System (OMS) to an area in memory referred to as the XML workspace where it is stored as an XPath DOM that conforms to the Output XML Schema (xml.spss.com/spss/oms). Output is retrieved from this workspace with functions that employ XPath expressions.

Constructing the correct XPath expression (PASW Statistics currently supports XPath 1.0) requires an understanding of the Output XML schema. See the topic Output XML Schema for more information.

Example

In this example, we'll use output from the DESCRIPTIVES command to determine the percentage of valid cases for a specified variable.

*Route output to the XML workspace.
OMS SELECT TABLES
 /IF COMMANDS=['Descriptives'] SUBTYPES=['Descriptive Statistics']
 /DESTINATION FORMAT=OXML XMLWORKSPACE='desc_table'
 /TAG='desc_out'.
DESCRIPTIVES VARIABLES=mpg.
OMSEND TAG='desc_out'.
*Get output from the XML workspace using XPath.
BEGIN PROGRAM R.
handle <- "desc_table"
context <- "/outputTree"
xpath <- paste("//pivotTable[@subType='Descriptive Statistics']",
               "/dimension[@axis='row']",
               "/category[@varName='mpg']",
               "/dimension[@axis='column']",
               "/category[@text='N']",
               "/cell/@number")
res <- spssxmlworkspace.EvaluateXPath(handle,context,xpath)
ncases <- spssdata.GetCaseCount()
cat("Percentage of valid cases for variable mpg: ",
     round(100*as.integer(res)/ncases),"%")
spssxmlworkspace.DeleteXmlWorkspaceObject(handle)
END PROGRAM.

• The OMS command is used to direct output from a syntax command to the XML workspace. The XMLWORKSPACE keyword on the DESTINATION subcommand, along with FORMAT=OXML, specifies the XML workspace as the output destination. It is a good practice to use the TAG subcommand, as done here, so as not to interfere with any other OMS requests that may be operating. The identifiers used for the COMMANDS and SUBTYPES keywords on the IF subcommand can be found in the OMS Identifiers dialog box, available from the Utilities menu in PASW Statistics.

• The XMLWORKSPACE keyword is used to associate a name with this XPath DOM in the workspace. In the current example, output from the DESCRIPTIVES command will be identified with the name desc_table. You can have many XPath DOM's in the XML workspace, each with its own unique name.

• The OMSEND command terminates active OMS commands, causing the output to be written to the specified destination--in this case, the XML workspace.

• You retrieve values from the XML workspace with the spssxmlworkspace.EvaluateXPath function. The function takes an explicit XPath expression, evaluates it against a specified XPath DOM in the XML workspace, and returns the result as a vector of character strings.

• The first argument to the EvaluateXPath function specifies the XPath DOM to which an XPath expression will be applied. This argument is referred to as the handle name for the XPath DOM and is simply the name given on the XMLWORKSPACE keyword on the associated OMS command. In this case the handle name is desc_table.

• The second argument to EvaluateXPath defines the XPath context for the expression and should be set to "/outputTree" for items routed to the XML workspace by the OMS command.

• The third argument to EvaluateXPath specifies the remainder of the XPath expression (the context is the first part) and must be quoted. Since XPath expressions almost always contain quoted strings, you'll need to use a different quote type from that used to enclose the expression. For users familiar with XSLT for OXML and accustomed to including a namespace prefix, note that XPath expressions for the EvaluateXPath function should not contain the oms: namespace prefix.

• The XPath expression in this example is specified by the variable xpath. It is not the minimal expression needed to select the value of interest but is used for illustration purposes and serves to highlight the structure of the XML output.

//pivotTable[@subType='Descriptive Statistics'] selects the Descriptives Statistics table.

/dimension[@axis='row']/category[@varName='mpg'] selects the row for the variable mpg.

/dimension[@axis='column']/category[@text='N'] selects the column labeled N (the number of valid cases), thus specifying a single cell in the pivot table.

/cell/@text selects the textual representation of the cell contents.

• When you have finished with a particular output item, it is a good idea to delete it from the XML workspace. This is done with the DeleteXmlWorkspaceObject function, whose single argument is the name of the handle associated with the item.

If you're familiar with XPath, you might want to convince yourself that the number of valid cases for mpg can also be selected with the following simpler XPath expression:

//category[@varName='mpg']//category[@text='N']/cell/@text

Note: To the extent possible, construct your XPath expressions using language-independent attributes, such as the variable name rather than the variable label. That will help reduce the translation effort if you need to deploy your code in multiple languages. Also consider factoring out language-dependent identifiers, such as the name of a statistic, into constants. You can obtain the current language used for pivot table output with the spsspkg.GetOutputLanguage function.

Related Topics

spssxmlworkspace.EvaluateXPath Function (R)


PASW Statistics-R Package: Functions and Classes

The PASW Statistics-R package contains functions that facilitate the process of using R programming features with command syntax, including functions that:

Get information about data files in the current PASW Statistics session Collapse Hide details

Get information about data files in the current PASW Statistics session

• spssdata.GetCaseCount

• spssdata.GetDataSetList

• spssdata.GetFileHandles

• spssdata.GetSplitVariableNames

• spssdictionary.GetDataFileAttributes

• spssdictionary.GetMultiResponseSet

• spssdictionary.GetUserMissingValues

• spssdictionary.GetValueLabels

• spssdictionary.GetVariableAttributes

• spssdictionary.GetVariableCount

• spssdictionary.GetVariableFormat

• spssdictionary.GetVariableLabel

• spssdictionary.GetVariableMeasurementLevel

• spssdictionary.GetVariableName

• spssdictionary.GetVariableType

• spssdictionary.GetWeightVariable

Get data from the active dataset and create new datasets Collapse Hide details

Get data from the active dataset and create new datasets

• spssdata.GetDataFromSPSS

• spssdata.GetSplitDataFromSPSS

• spssdata.SetDataToSPSS

• spssdictionary.CreateSPSSDictionary

• spssdictionary.SetDictionaryToSPSS

• spssdictionary.SetUserMissing

• spssdictionary.SetValueLabel

• spssdictionary.SetVariableAttributes

• spssdictionary.SetMultiResponseSet

• spssdictionary.SetDataFileAttributes

Create custom pivot tables and text blocks Collapse Hide details

Create custom pivot tables and text blocks

• spss.BasePivotTable

• spss.TextBlock

• spsspivottable.Display

Get output results Collapse Hide details

Get output results

• spssxmlworkspace.EvaluateXPath

Control display of R graphics and output Collapse Hide details

Control display of R graphics and output

• spssRGRaphics.Submit

• spssRGRaphics.SetOutput

• spsspkg.SetOutput

Get version information Collapse Hide details

Get version information

• spsspkg.GetSPSSPlugInVersion

• spsspkg.GetSPSSVersion

• spsspkg.Version

Locale and output language settings Collapse Hide details

Locale and output language settings

• spsspkg.GetOutputLanguage

• spsspkg.GetSPSSLocale

• spsspkg.SetOutputLanguage

Utility functions for extension commands Collapse Hide details

Utility functions for extension commands

• spsspkg.processcmd

• spsspkg.Syntax

• spsspkg.Template


BasePivotTable Class (R)

BasePivotTable class,BasePivotTable class,BasePivotTable class
pivot tables,pivot tables,pivot tables

spss.BasePivotTable(title,templateName,outline,isSplit,caption). Provides the ability to create custom pivot tables that can be displayed in the PASW Statistics Viewer or written to an external file using the PASW Statistics Output Management System.

Note: If you only need a pivot table with a single column dimension and a single row dimension, you may want to use the much simpler spsspivottable.Display function.

• The argument title is a string that specifies the title that appears with the table. Each table associated with a set of output (as specified in a StartProcedure-EndProcedure block) should have a unique title. Multiple tables within a given procedure can, however, have the same value of the title argument as long as they have different values of the outline argument.

• The argument templateName is a string that specifies the OMS (Output Management System) table subtype for this table. It must begin with a letter and have a maximum of 64 characters. Unless you are routing this pivot table with OMS, you will not need to keep track of this value, although you do have to provide a value that meets the stated requirements.

• The optional argument outline is a string that specifies a title, for the pivot table, that appears in the outline pane of the Viewer. The item for the table itself will be placed one level deeper than the item for the outline title. If omitted, the Viewer item for the table will be placed one level deeper than the root item for the output containing the table.

• The optional Boolean argument isSplit specifies whether to enable split processing when creating pivot tables from data that have splits. Split file processing refers to whether results from different split groups are displayed in separate tables or in the same table but grouped by split, and is controlled by the SPLIT FILE command. By default, split processing is enabled. To disable split processing for pivot tables, specify isSplit=FALSE.

When retrieving data with spssdata.GetSplitDataFromSPSS, simply repopulate the pivot table cells with the results for each new split group. The results from each split group are accumulated and the subsequent table(s) are displayed when spssdata.CloseDataConnection is called.

• The optional argument caption is a string that specifies a table caption.

Note: An instance of the BasePivotTable class can only be used within an spsspkg.StartProcedure-spsspkg.EndProcedure block. See Setting Cell Values for an example.

Figure shows the basic structural components of a pivot table. Pivot tables consists of one or more dimensions, each of which can be of the type row, column, or layer. In this example, there is one dimension of each type. Each dimension contains a set of categories that label the elements of the dimension--for instance, row labels for a row dimension. A layer dimension allows you to display a separate two-dimensional table for each category in the layered dimension--for example, a separate table for each value of minority classification, as shown here. When layers are present, the pivot table can be thought of as stacked in layers, with only the top layer visible.

Each cell in the table can be specified by a combination of category values. In the example shown here, the indicated cell is specified by a category value of Male for the Gender dimension, Custodial for the Employment Category dimension, and No for the Minority Classification dimension.

Pivot table structure

Related Topics

spsspivottable.Display Function (R)
spsspkg.StartProcedure Function (R)
TextBlock Class (R)
General Approach to Creating Pivot Tables (R)


General Approach to Creating Pivot Tables (R)

The BasePivotTable class provides the means for creating pivot tables that cannot be created with the spsspivottable.Display function. The basic steps for creating a pivot table are:

Create an instance of the BasePivotTable class.

Add dimensions.

Define categories.

Set cell values.

Once a cell value has been set, you can access its value. This is convenient for cell values that depend on the value of another cell. See the topic Using Cell Values in Expressions (Python) for more information.

Related Topics

Step 1: Adding Dimensions (R)
Step 2: Defining Categories (R)
Step 3: Setting Cell Values (R)


Step 1: Adding Dimensions (R)

BasePivotTable class,BasePivotTable class,BasePivotTable class
Append method,Append method,Append method
Insert method,Insert method,Insert method
Append method,Append method,Append method
Insert method,Insert method,Insert method

You add dimensions to a pivot table with the Append or Insert method.

Example: Using the Append Method

table = spss.BasePivotTable("Table Title",
                            "OMS table subtype")
coldim=BasePivotTable.Append(table,Dimension.Place.column,"coldim")
rowdim1=BasePivotTable.Append(table,Dimension.Place.row,"rowdim-1")
rowdim2=BasePivotTable.Append(table,Dimension.Place.row,"rowdim-2")

• The first argument to Append is a reference to the BasePivotTable object--in this example, the R variable table.

• The second argument to the Append method specifies the type of dimension, using one member from a set of built-in object properties: Dimension.Place.row for a row dimension, Dimension.Place.column for a column dimension, and Dimension.Place.layer for a layer dimension.

• The third argument to Append is a string that specifies the name used to label this dimension in the displayed table.

• A reference to each newly created dimension object is stored in a variable. For instance, the variable rowdim1 holds a reference to the object for the row dimension named rowdim-1.

Resulting table structure

The order in which the dimensions are appended determines how they are displayed in the table. Each newly appended dimension of a particular type (row, column, or layer) becomes the current innermost dimension in the displayed table. In the example above, rowdim-2 is the innermost row dimension since it is the last one to be appended. Had rowdim-2 been appended first, followed by rowdim-1, rowdim-1 would be the innermost dimension.

Note: Generation of the resulting table requires more code than is shown here.

Example: Using the Insert Method

table = spss.BasePivotTable("Table Title",
                            "OMS table subtype")
rowdim1=BasePivotTable.Append(table,Dimension.Place.row,"rowdim-1")
rowdim2=BasePivotTable.Append(table,Dimension.Place.row,"rowdim-2")
rowdim3=BasePivotTable.Insert(table,2,Dimension.Place.row,"rowdim-3")
coldim=BasePivotTable.Append(table,Dimension.Place.column,"coldim")

• The first argument to Insert is a reference to the BasePivotTable object--in this example, the R variable table.

• The second argument to the Insert method specifies the position within the dimensions of that type (row, column, or layer). The first position has index 1 and defines the innermost dimension of that type in the displayed table. Successive integers specify the next innermost dimension and so on. In the current example, rowdim-3 is inserted at position 2 and rowdim-1 is moved from position 2 to position 3.

• The third argument to Insert specifies the type of dimension, using one member from a set of built-in object properties: Dimension.Place.row for a row dimension, Dimension.Place.column for a column dimension, and Dimension.Place.layer for a layer dimension.

• The fourth argument to Insert is a string that specifies the name used to label this dimension in the displayed table.

• A reference to each newly created dimension object is stored in a variable. For instance, the variable rowdim3 holds a reference to the object for the row dimension named rowdim-3.

Resulting table structure

Note: Generation of the resulting table requires more code than is shown here.

Related Topics

General Approach to Creating Pivot Tables (R)
Step 2: Defining Categories (R)
Step 3: Setting Cell Values (R)
Append Method (R)
Insert Method (R)


Step 2: Defining Categories (R)

BasePivotTable class,BasePivotTable class,BasePivotTable class
SetCategories method,SetCategories method,SetCategories method
SetCategories method,SetCategories method,SetCategories method

You define categories for each dimension using the SetCategories method.

Example

table = spss.BasePivotTable("Table Title",
                            "OMS table subtype")

coldim=BasePivotTable.Append(table,Dimension.Place.column,"coldim")
rowdim1=BasePivotTable.Append(table,Dimension.Place.row,"rowdim-1")
rowdim2=BasePivotTable.Append(table,Dimension.Place.row,"rowdim-2")

cat1=spss.CellText.String("A1")
cat2=spss.CellText.String("B1")
cat3=spss.CellText.String("A2")
cat4=spss.CellText.String("B2")
cat5=spss.CellText.String("C")
cat6=spss.CellText.String("D")
cat7=spss.CellText.String("E")

BasePivotTable.SetCategories(table,rowdim1,list(cat1,cat2))
BasePivotTable.SetCategories(table,rowdim2,list(cat3,cat4))
BasePivotTable.SetCategories(table,coldim,list(cat5,cat6,cat7))

• You set categories after you add dimensions, so the SetCategories method calls follow the Append or Insert method calls.

• The first argument to SetCategories is a reference to the BasePivotTable object--in this example, the R variable table.

• The second argument to SetCategories is an object reference to the dimension for which the categories are being defined.

• The third argument to SetCategories is a single category or a list of unique category values, each expressed as a CellText object (one of CellText.Number, CellText.String, CellText.VarName, or CellText.VarValue). When you specify a category as a variable name or variable value, pivot table display options such as display variable labels or display value labels are honored. In the present example, we use string objects whose single argument is the string specifying the category.

• It is a good practice to assign variables to the CellText objects representing the category names, since each category will often need to be referenced more than once when setting cell values.

Resulting table structure

Note: Generation of the resulting table requires more code than is shown here.

Related Topics

General Approach to Creating Pivot Tables (R)
Step 1: Adding Dimensions (R)
Step 3: Setting Cell Values (R)
SetCategories Method (R)


Step 3: Setting Cell Values (R)

BasePivotTable class,BasePivotTable class,BasePivotTable class
SetCellsByColumn method,SetCellsByColumn method,SetCellsByColumn method
SetCellsByRow method,SetCellsByRow method,SetCellsByRow method
SetCellsByColumn method,SetCellsByColumn method,SetCellsByColumn method
SetCellsByRow method,SetCellsByRow method,SetCellsByRow method

You can set cell values by row or by column using the SetCellsByRow or SetCellsByColumn method respectively. The SetCellsByRow method is limited to pivot tables with one column dimension and the SetCellsByColumn method is limited to pivot tables with one row dimension. To set cells for pivot tables with multiple row and column dimensions, use the SetCellValue method.

Example: Setting Cell Values by Row

spsspkg.StartProcedure("MyProcedure")
table = spss.BasePivotTable("Table Title",
                            "OMS table subtype")

rowdim=BasePivotTable.Append(table,Dimension.Place.row,"row dimension")
coldim=BasePivotTable.Append(table,Dimension.Place.column,"column dimension")

row_cat1=spss.CellText.String("first row")
row_cat2=spss.CellText.String("second row")
col_cat1=spss.CellText.String("first column")
col_cat2=spss.CellText.String("second column")

BasePivotTable.SetCategories(table,rowdim,list(row_cat1,row_cat2))
BasePivotTable.SetCategories(table,coldim,list(col_cat1,col_cat2))

BasePivotTable.SetCellsByRow(table,row_cat1,list(spss.CellText.Number(11),
                              spss.CellText.Number(12)))
BasePivotTable.SetCellsByRow(table,row_cat2,list(spss.CellText.Number(21),
                              spss.CellText.Number(22)))
spsspkg.EndProcedure()

• This example also shows how to wrap the code for creating a pivot table in an spsspkg.StartProcedure-spsspkg.EndProcedure block. When creating a pivot table with the BasePivotTable class, you must always wrap the associated code in an spsspkg.StartProcedure-spsspkg.EndProcedure block. You can copy the code for this example to a syntax editor window, enclose it in a BEGIN PROGRAM R-END PROGRAM block and run it to produce a pivot table.

• The SetCellsByRow method is called for each of the two categories in the row dimension.

• The first argument to SetCellsByRow is a reference to the BasePivotTable object--in this example, the R variable table.

• The second argument to the SetCellsByRow method is the row category for which values are to be set. The argument must be specified as a CellText object (one of CellText.Number, CellText.String, CellText.VarName, or CellText.VarValue). When setting row values for a pivot table with multiple row dimensions, you specify a list of category values for the first argument to SetCellsByRow, where each element in the list is a category value for a different row dimension.

• The third argument to the SetCellsByRow method is a list of CellText objects (one of CellText.Number, CellText.String, CellText.VarName, or CellText.VarValue) that specify the elements of the row, one element for each column category in the single column dimension. The first element in the list will populate the first column category (in this case, col_cat1), the second will populate the second column category, and so on.

• In this example, Number objects are used to specify numeric values for the cells. Values will be formatted using the table's default format. Instances of the BasePivotTable class have an implicit default format of GeneralStat. You can change the default format using the SetDefaultFormatSpec method, or you can override the default by explicitly specifying the format, as in: spss.CellText.Number(22,formatSpec.Correlation). See the topic CellText.Number Class (R) for more information.

Related Topics

General Approach to Creating Pivot Tables (R)
Step 1: Adding Dimensions (R)
Step 2: Defining Categories (R)
SetCellsByRow Method (R)
SetCellsByColumn Method (R)


Using Cell Values in Expressions (R)

Once a cell's value has been set, it can be accessed and used to specify the value for another cell. Cell values are stored as CellText.Number or CellText.String objects. To use a cell value in an expression, you obtain a string or numeric representation of the value using the toString or toNumber method.

Example: Numeric Representations of Cell Values

table = spss.BasePivotTable("Table Title",
                            "OMS table subtype")

rowdim=BasePivotTable.Append(table,Dimension.Place.row,"row dimension")
coldim=BasePivotTable.Append(table,Dimension.Place.column,"column dimension")

row_cat1 = spss.CellText.String("first row")
row_cat2 = spss.CellText.String("second row")
col_cat1 = spss.CellText.String("first column")
col_cat2 = spss.CellText.String("second column")

BasePivotTable.SetCategories(table,rowdim,list(row_cat1,row_cat2))
BasePivotTable.SetCategories(table,coldim,list(col_cat1,col_cat2))

BasePivotTable.SetCellValue(table,list(row_cat1,col_cat1),spss.CellText.Number(11))
cellValue = CellText.toNumber(BasePivotTable.GetCellValue(table,list(row_cat1,col_cat1)))
BasePivotTable.SetCellValue(table,list(row_cat2,col_cat2),spss.CellText.Number(2*cellValue))

• The toNumber method is used to obtain a numeric representation of the cell with category values ("first row","first column"). The numeric value is stored in the variable cellValue and used to specify the value of another cell.

• Character representations of numeric values stored as CellText.String objects, such as CellText.String("11"), are converted to a numeric value by the toNumber method.

Example: String Representations of Cell Values

table = spss.BasePivotTable("Table Title",
                            "OMS table subtype")

rowdim=BasePivotTable.Append(table,Dimension.Place.row,"row dimension")
coldim=BasePivotTable.Append(table,Dimension.Place.column,"column dimension")

row_cat1 = spss.CellText.String("first row")
row_cat2 = spss.CellText.String("second row")
col_cat1 = spss.CellText.String("first column")
col_cat2 = spss.CellText.String("second column")

BasePivotTable.SetCategories(table,rowdim,list(row_cat1,row_cat2))
BasePivotTable.SetCategories(table,coldim,list(col_cat1,col_cat2))

BasePivotTable.SetCellValue(table,list(row_cat1,col_cat1),spss.CellText.String("abc"))
cellValue = CellText.toString(BasePivotTable.GetCellValue(table,list(row_cat1,col_cat1)))
BasePivotTable.SetCellValue(table,list(row_cat2,col_cat2),
                            spss.CellText.String(paste(cellValue,"d",sep="")))

• The toString method is used to obtain a string representation of the cell with category values ("first row","first column"). The string value is stored in the variable cellValue and used to specify the value of another cell.

• Numeric values stored as CellText.Number objects are converted to a string value by the toString method.

Related Topics

CellText.toNumber Method (R)
CellText.toString Method (R)


BasePivotTable Methods (R)

The BasePivotTable class has methods that allow you to build complex pivot tables. If you only need to create a pivot table with a single row and a single column dimension then consider using the much simpler spsspivottable.Display function.

Related Topics

spsspivottable.Display Function (R)
General Approach to Creating Pivot Tables (R)


Append Method (R)

BasePivotTable class,BasePivotTable class,BasePivotTable class
Append method,Append method,Append method
Append method (BasePivotTable class),Append method (BasePivotTable class),Append method (BasePivotTable class)

.Append(object,place,dimName,hideName,hideLabels). Appends row, column, and layer dimensions to a pivot table. You use this method, or the Insert method, to create the dimensions associated with a custom pivot table. The argument object is a reference to the associated BasePivotTable object. The argument place specifies the type of dimension: Dimension.Place.row for a row dimension, Dimension.Place.column for a column dimension, and Dimension.Place.layer for a layer dimension. The argument dimName is a string that specifies the name used to label this dimension in the displayed table. Each dimension must have a unique name. The argument hideName specifies whether the dimension name is hidden--by default, it is displayed. Use hideName=TRUE to hide the name. The argument hideLabels specifies whether category labels for this dimension are hidden--by default, they are displayed. Use hideLabels=TRUE to hide category labels.

• The order in which dimensions are appended affects how they are displayed in the resulting table. Each newly appended dimension of a particular type (row, column, or layer) becomes the current innermost dimension in the displayed table, as shown in the example below.

• The order in which dimensions are created (with the Append or Insert method) determines the order in which categories should be specified when providing the dimension coordinates for a particular cell (used when Setting Cell Values or adding Footnotes). For example, when specifying coordinates using an expression such as (category1,category2), category1 refers to the dimension created by the first call to Append or Insert, and category2 refers to the dimension created by the second call to Append or Insert.

Example

table = spss.BasePivotTable("Table Title",
                            "OMS table subtype")
coldim=BasePivotTable.Append(table,Dimension.Place.column,"coldim")
rowdim1=BasePivotTable.Append(table,Dimension.Place.row,"rowdim-1")
rowdim2=BasePivotTable.Append(table,Dimension.Place.row,"rowdim-2")
Resulting table structure

Examples of using the Append method are most easily understood in the context of going through the steps to create a pivot table. See the topic General Approach to Creating Pivot Tables (R) for more information.

Related Topics

Step 1: Adding Dimensions (R)
Insert Method (R)


Caption Method (R)

BasePivotTable class,BasePivotTable class,BasePivotTable class
Caption method,Caption method,Caption method
Caption method,Caption method,Caption method

.Caption(object,caption). Adds a caption to the pivot table. The argument object is a reference to the associated BasePivotTable object. The argument caption is a string specifying the caption.

Example

table = spss.BasePivotTable("Table Title",
                            "OMS table subtype")
BasePivotTable.Caption(table,"A sample caption")


CategoryFootnotes Method (R)

BasePivotTable class,BasePivotTable class,BasePivotTable class
CategoryFootnotes method,CategoryFootnotes method,CategoryFootnotes method
CategoryFootnotes method,CategoryFootnotes method,CategoryFootnotes method

.CategoryFootnotes(object,dimPlace,dimName,category,footnotes). Used to add a footnote to a specified category.

• The argument object is a reference to the associated BasePivotTable object.

• The argument dimPlace specifies the dimension type associated with the category, using one member from a set of built-in object properties: Dimension.Place.row for a row dimension, Dimension.Place.column for a column dimension, and Dimension.Place.layer for a layer dimension.

• The argument dimName is the string that specifies the dimension name associated with the category. This is the name specified when the dimension was created by the Append or Insert method.

• The argument category specifies the category and must be a CellText object (one of CellText.Number, CellText.String, CellText.VarName, or CellText.VarValue).

• The argument footnotes is a string specifying the footnote.

Example

table = spss.BasePivotTable("Table Title",
                            "OMS table subtype")

rowdim=BasePivotTable.Append(table,Dimension.Place.row,"row dimension")
coldim=BasePivotTable.Append(table,Dimension.Place.column,"column dimension")

row_cat1 = spss.CellText.String("first row")
row_cat2 = spss.CellText.String("second row")
col_cat1 = spss.CellText.String("first column")
col_cat2 = spss.CellText.String("second column")

BasePivotTable.SetCategories(table,rowdim,list(row_cat1,row_cat2))
BasePivotTable.SetCategories(table,coldim,list(col_cat1,col_cat2))

BasePivotTable.CategoryFootnotes(table,Dimension.Place.row,"row dimension",
                                 row_cat1,"A category footnote")

Related Topics

DimensionFootnotes Method (R)
Footnotes Method (R)
TitleFootnotes Method (R)


DimensionFootnotes Method (R)

BasePivotTable class,BasePivotTable class,BasePivotTable class
DimensionFootnotes method,DimensionFootnotes method,DimensionFootnotes method
DimensionFootnotes method,DimensionFootnotes method,DimensionFootnotes method

.DimensionFootnotes(object,dimPlace,dimName,footnotes). Used to add a footnote to a dimension.

• The argument object is a reference to the associated BasePivotTable object.

• The argument dimPlace specifies the type of dimension, using one member from a set of built-in object properties: Dimension.Place.row for a row dimension, Dimension.Place.column for a column dimension, and Dimension.Place.layer for a layer dimension.

• The argument dimName is the string that specifies the name given to this dimension when it was created by the Append or Insert method.

• The argument footnotes is a string specifying the footnote.

Example

table = spss.BasePivotTable("Table Title",
                            "OMS table subtype")

BasePivotTable.Append(table,Dimension.Place.row,"row dimension")
BasePivotTable.Append(table,Dimension.Place.column,"column dimension")
BasePivotTable.DimensionFootnotes(table,Dimension.Place.column,
                                  "column dimension","A dimension footnote")

Related Topics

Append Method (R)
Insert Method (R)
CategoryFootnotes Method (R)
Footnotes Method (R)
TitleFootnotes Method (R)


Footnotes Method (R)

BasePivotTable class,BasePivotTable class,BasePivotTable class
Footnotes method,Footnotes method,Footnotes method
Footnotes method,Footnotes method,Footnotes method

.Footnotes(object,categories,footnotes). Used to add a footnote to a table cell. The argument object is a reference to the associated BasePivotTable object. The argument categories is a list of categories specifying the cell for which a footnote is to be added. Each element in the list must be a CellText object (one of CellText.Number, CellText.String, CellText.VarName, or CellText.VarValue). The argument footnotes is a string specifying the footnote.

Example

table = spss.BasePivotTable("Table Title",
                            "OMS table subtype")

rowdim=BasePivotTable.Append(table,Dimension.Place.row,"rowdim")
coldim=BasePivotTable.Append(table,Dimension.Place.column,"coldim")

BasePivotTable.SetCategories(table,rowdim,spss.CellText.String("row1"))
BasePivotTable.SetCategories(table,coldim,spss.CellText.String("column1"))

BasePivotTable.SetCellValue(table,list(spss.CellText.String("row1"),
                                       spss.CellText.String("column1")),
                                       spss.CellText.String("cell value"))
BasePivotTable.Footnotes(table,list(spss.CellText.String("row1"),
                                    spss.CellText.String("column1")),
                         "Footnote for the cell specified by the categories row1 and column1")

• The order in which dimensions are added to the table, either through a call to Append or to Insert, determines the order in which categories should be specified when providing the dimension coordinates for a particular cell. In the present example, the dimension rowdim is added first and coldim second, so the first element of list(spss.CellText.String("row1"),spss.CellText.String("column1")) specifies a category of rowdim and the second element specifies a category of coldim.

Related Topics

CategoryFootnotes Method (R)
DimensionFootnotes Method (R)
TitleFootnotes Method (R)


GetCellValue Method (R)

BasePivotTable class,BasePivotTable class,BasePivotTable class
GetCellValue method,GetCellValue method,GetCellValue method
GetCellValue method,GetCellValue method,GetCellValue method

.GetCellValue(object,categories). Gets the value of the specified cell. The argument object is a reference to the associated BasePivotTable object. The argument categories is the list of the category values that specifies the cell--one value for each of the dimensions in the pivot table. Category values must be specified as CellText objects (one of CellText.Number, CellText.String, CellText.VarName, or CellText.VarValue).

• In the list that specifies the category values, the first element corresponds to the first appended dimension, the second element to the second appended dimension, and so on. For example, if the pivot table has two row dimensions and one column dimension and the row dimensions are appended before the column dimension, then:

list(rowdim1_cat1,rowdim2_cat3,coldim_cat1)

specifies the cell whose category values are rowdim1_cat1 in the first appended row dimension, rowdim2_cat3 in the second appended row dimension, and coldim_cat1 in the column dimension.

For an example of using the GetCellValue method, see the CellText.toNumber method.

Related Topics

SetCellValue Method (R)


GetDefaultFormatSpec Method (R)

BasePivotTable class,BasePivotTable class,BasePivotTable class
GetDefaultFormatSpec method,GetDefaultFormatSpec method,GetDefaultFormatSpec method
GetDefaultFormatSpec method,GetDefaultFormatSpec method,GetDefaultFormatSpec method

.GetDefaultFormatSpec(object). Returns the default format for CellText.Number objects. The argument object is a reference to the associated BasePivotTable object. The function returns a single value or a vector with two elements depending on the type of format. When a single value is returned, it is the integer code associated with the format. Codes and associated formats are listed in Table . For formats with codes 5 (Mean), 12 (Variable), 13 (StdDev), 14 (Difference), and 15 (Sum), the result is a 2-element vector whose first element is the integer code and whose second element is the index of the variable in the active dataset used to determine details of the resulting format. You can set the default format with the SetDefaultFormatSpec method.

• Instances of the BasePivotTable class have an implicit default format of GeneralStat.

Example

table = spss.BasePivotTable("Table Title",
                            "OMS table subtype")
cat("Default format: ", BasePivotTable.GetDefaultFormatSpec(table))

Related Topics

SetDefaultFormatSpec Method (R)
CellText.Number Class (R)


HideTitle Method (R)

BasePivotTable class,BasePivotTable class,BasePivotTable class
HideTitle method,HideTitle method,HideTitle method
HideTitle method,HideTitle method,HideTitle method

.HideTitle(object). Used to hide the title of a pivot table. By default, the title is shown. The argument object is a reference to the associated BasePivotTable object.

Example

table = spss.BasePivotTable("Table Title",
                            "OMS table subtype")
BasePivotTable.HideTitle(table)


Insert Method (R)

BasePivotTable class,BasePivotTable class,BasePivotTable class
Insert method,Insert method,Insert method
Insert method,Insert method,Insert method

.Insert(object,i,place,dimName,hideName, hideLabels). Inserts row, column, and layer dimensions into a pivot table. You use this method, or the Append method, to create the dimensions associated with a custom pivot table. The argument object is a reference to the associated BasePivotTable object. The argument i specifies the position within the dimensions of that type (row, column, or layer). The first position has index 1 and defines the innermost dimension of that type in the displayed table. Successive integers specify the next innermost dimension and so on. The argument place specifies the type of dimension: Dimension.Place.row for a row dimension, Dimension.Place.column for a column dimension, and Dimension.Place.layer for a layer dimension. The argument dimName is a string that specifies the name used to label this dimension in the displayed table. Each dimension must have a unique name. The argument hideName specifies whether the dimension name is hidden--by default, it is displayed. Use hideName=TRUE to hide the name. The argument hideLabels specifies whether category labels for this dimension are hidden--by default, they are displayed. Use hideLabels=TRUE to hide category labels.

• The argument i can take on the values 1, 2, ... , n+1 where n is the position of the outermost dimension (of the type specified by place) created by any previous calls to Append or Insert. For example, after appending two row dimensions, you can insert a row dimension at positions 1, 2, or 3. You cannot, however, insert a row dimension at position 3 if only one row dimension has been created.

• The order in which dimensions are created (with the Append or Insert method) determines the order in which categories should be specified when providing the dimension coordinates for a particular cell (used when Setting Cell Values or adding Footnotes). For example, when specifying coordinates using an expression such as (category1,category2), category1 refers to the dimension created by the first call to Append or Insert, and category2 refers to the dimension created by the second call to Append or Insert.

Note: The order in which categories should be specified is not determined by dimension positions as specified by the argument i.

Example

table = spss.BasePivotTable("Table Title",
                            "OMS table subtype")
rowdim1=BasePivotTable.Append(table,Dimension.Place.row,"rowdim-1")
rowdim2=BasePivotTable.Append(table,Dimension.Place.row,"rowdim-2")
rowdim3=BasePivotTable.Insert(table,2,Dimension.Place.row,"rowdim-3")
coldim=BasePivotTable.Append(table,Dimension.Place.column,"coldim")
Resulting table structure

Examples of using the Insert method are most easily understood in the context of going through the steps to create a pivot table. See the topic General Approach to Creating Pivot Tables (R) for more information.

Related Topics

Step 1: Adding Dimensions (R)
Append Method (R)


SetCategories Method (R)

BasePivotTable class,BasePivotTable class,BasePivotTable class
SetCategories method,SetCategories method,SetCategories method
SetCategories method,SetCategories method,SetCategories method

.SetCategories(object,dim,categories). Sets categories for the specified dimension. The argument object is a reference to the associated BasePivotTable object. The argument dim is a reference to the dimension object for which categories are to be set. Dimensions are created with the Append or Insert method. The argument categories is a single value or a list of unique values, each of which is a CellText object (one of CellText.Number, CellText.String, CellText.VarName, or CellText.VarValue).

Example

table = spss.BasePivotTable("Table Title",
                            "OMS table subtype")

rowdim=BasePivotTable.Append(table,Dimension.Place.row,"rowdim")
coldim=BasePivotTable.Append(table,Dimension.Place.column,"coldim")

BasePivotTable.SetCategories(table,rowdim,list(spss.CellText.String("row1"),
                             spss.CellText.String("row2")))
BasePivotTable.SetCategories(table,coldim,list(spss.CellText.String("column1"),
                             spss.CellText.String("column2")))

Examples of using the SetCategories method are most easily understood in the context of going through the steps to create a pivot table. See the topic General Approach to Creating Pivot Tables (R) for more information.

Related Topics

Step 2: Defining Categories (R)


SetCellsByColumn Method (R)

BasePivotTable class,BasePivotTable class,BasePivotTable class
SetCellsByColumn method,SetCellsByColumn method,SetCellsByColumn method
SetCellsByColumn method,SetCellsByColumn method,SetCellsByColumn method

.SetCellsByColumn(object,collabels,cells). Sets cell values for the column specified by a set of categories, one for each column dimension. The argument object is a reference to the associated BasePivotTable object. The argument collabels specifies the set of categories that defines the column--a single value or a list. The argument cells is a list of cell values. Column categories and cell values must be specified as CellText objects (one of CellText.Number, CellText.String, CellText.VarName, or CellText.VarValue).

• For tables with multiple column dimensions, the order of categories in the collabels argument is the order in which their respective dimensions were added (appended or inserted) to the table. For example, given two column dimensions coldim1 and coldim2 added in the order coldim1 and coldim2, the first element in collabels should be the category for coldim1 and the second the category for coldim2.

• You can only use the SetCellsByColumn method with pivot tables that have one row dimension.

Example

table = spss.BasePivotTable("Table Title",
                            "OMS table subtype")
rowdim=BasePivotTable.Append(table,Dimension.Place.row,"rowdim")
coldim1=BasePivotTable.Append(table,Dimension.Place.column,"coldim-1")
coldim2=BasePivotTable.Append(table,Dimension.Place.column,"coldim-2")

cat1=spss.CellText.String("coldim1:A")
cat2=spss.CellText.String("coldim1:B")
cat3=spss.CellText.String("coldim2:A")
cat4=spss.CellText.String("coldim2:B")
cat5=spss.CellText.String("C")
cat6=spss.CellText.String("D")

BasePivotTable.SetCategories(table,coldim1,list(cat1,cat2))
BasePivotTable.SetCategories(table,coldim2,list(cat3,cat4))
BasePivotTable.SetCategories(table,rowdim,list(cat5,cat6))

BasePivotTable.SetCellsByColumn(table,list(cat1,cat3),
                    list(spss.CellText.Number(11),
                     spss.CellText.Number(21)))
BasePivotTable.SetCellsByColumn(table,list(cat1,cat4),
                    list(spss.CellText.Number(12),
                     spss.CellText.Number(22)))
BasePivotTable.SetCellsByColumn(table,list(cat2,cat3),
                    list(spss.CellText.Number(13),
                     spss.CellText.Number(23)))
BasePivotTable.SetCellsByColumn(table,list(cat2,cat4),
                   list(spss.CellText.Number(14),
                     spss.CellText.Number(24)))

• In this example, Number objects are used to specify numeric values for the cells. Values will be formatted using the table's default format. Instances of the BasePivotTable class have an implicit default format of GeneralStat. You can change the default format using the SetDefaultFormatSpec method, or you can override the default by explicitly specifying the format, as in: spss.CellText.Number(22,formatSpec.Correlation). See the topic CellText.Number Class (R) for more information.

Resulting table structure

Examples of using the SetCellsByColumn method are most easily understood in the context of going through the steps to create a pivot table. See the topic General Approach to Creating Pivot Tables (R) for more information.

Related Topics

Step 3: Setting Cell Values (R)
SetCellsByRow Method (R)


SetCellsByRow Method (R)

BasePivotTable class,BasePivotTable class,BasePivotTable class
SetCellsByRow method,SetCellsByRow method,SetCellsByRow method
SetCellsByRow method,SetCellsByRow method,SetCellsByRow method

.SetCellsByRow(object,rowlabels,cells). Sets cell values for the row specified by a set of categories, one for each row dimension. The argument object is a reference to the associated BasePivotTable object. The argument rowlabels specifies the set of categories that defines the row--a single value or a list. The argument cells is a list of cell values. Row categories and cell values must be specified as CellText objects (one of CellText.Number, CellText.String, CellText.VarName, or CellText.VarValue).

• For tables with multiple row dimensions, the order of categories in the rowlabels argument is the order in which their respective dimensions were added (appended or inserted) to the table. For example, given two row dimensions rowdim1 and rowdim2 added in the order rowdim1 and rowdim2, the first element in rowlabels should be the category for rowdim1 and the second the category for rowdim2.

• You can only use the SetCellsByRow method with pivot tables that have one column dimension.

Example

table = spss.BasePivotTable("Table Title",
                            "OMS table subtype")

coldim=BasePivotTable.Append(table,Dimension.Place.column,"coldim")
rowdim1=BasePivotTable.Append(table,Dimension.Place.row,"rowdim-1")
rowdim2=BasePivotTable.Append(table,Dimension.Place.row,"rowdim-2")

cat1=spss.CellText.String("rowdim1:A")
cat2=spss.CellText.String("rowdim1:B")
cat3=spss.CellText.String("rowdim2:A")
cat4=spss.CellText.String("rowdim2:B")
cat5=spss.CellText.String("C")
cat6=spss.CellText.String("D")

BasePivotTable.SetCategories(table,rowdim1,list(cat1,cat2))
BasePivotTable.SetCategories(table,rowdim2,list(cat3,cat4))
BasePivotTable.SetCategories(table,coldim,list(cat5,cat6))

BasePivotTable.SetCellsByRow(table,list(cat1,cat3),
                    list(spss.CellText.Number(11),
                         spss.CellText.Number(12)))
BasePivotTable.SetCellsByRow(table,list(cat1,cat4),
                    list(spss.CellText.Number(21),
                         spss.CellText.Number(22)))
BasePivotTable.SetCellsByRow(table,list(cat2,cat3),
                    list(spss.CellText.Number(31),
                         spss.CellText.Number(32)))
BasePivotTable.SetCellsByRow(table,list(cat2,cat4),
                    list(spss.CellText.Number(41),
                         spss.CellText.Number(42)))

• In this example, Number objects are used to specify numeric values for the cells. Values will be formatted using the table's default format. Instances of the BasePivotTable class have an implicit default format of GeneralStat. You can change the default format using the SetDefaultFormatSpec method, or you can override the default by explicitly specifying the format, as in: spss.CellText.Number(22,formatSpec.Correlation). See the topic CellText.Number Class (R) for more information.

Resulting table

Examples of using the SetCellsByRow method are most easily understood in the context of going through the steps to create a pivot table. See the topic General Approach to Creating Pivot Tables (R) for more information.

Related Topics

Step 3: Setting Cell Values (R)
SetCellsByColumn Method (R)


SetCellValue Method (R)

BasePivotTable class,BasePivotTable class,BasePivotTable class
SetCellValue method,SetCellValue method,SetCellValue method
SetCellValue method,SetCellValue method,SetCellValue method

.SetCellValue(object,categories,cell). Sets the value of the specified cell. The argument object is a reference to the associated BasePivotTable object. The argument categories is the list of the category values that specifies the cell--one value for each of the dimensions in the pivot table. The argument cell is the cell value. Category values and the cell value must be specified as CellText objects (one of CellText.Number, CellText.String, CellText.VarName, or CellText.VarValue).

• In the list that specifies the category values, the first element corresponds to the first appended dimension, the second element to the second appended dimension, and so on. For example, if the pivot table has two row dimensions and one column dimension and the row dimensions are appended before the column dimension, then:

list(rowdim1_cat1,rowdim2_cat3,coldim_cat1)

specifies the cell whose category values are rowdim1_cat1 in the first appended row dimension, rowdim2_cat3 in the second appended row dimension, and coldim_cat1 in the column dimension.

For an example of using the SetCellValue method, see the CellText.toNumber method.

Related Topics

GetCellValue Method (R)


SetDefaultFormatSpec Method (R)

BasePivotTable class,BasePivotTable class,BasePivotTable class
SetDefaultFormatSpec method,SetDefaultFormatSpec method,SetDefaultFormatSpec method
SetDefaultFormatSpec method,SetDefaultFormatSpec method,SetDefaultFormatSpec method

.SetDefaultFormatSpec(object,formatSpec,varIndex). Sets the default format for CellText.Number objects. The argument object is a reference to the associated BasePivotTable object. The argument formatSpec is of the form formatSpec.format where format is one of those listed in Table --for example, formatSpec.Mean. The argument varIndex is the index of a variable in the active dataset whose format is used to determine details of the resulting format. varIndex is only used for, and required by, the following subset of formats: Mean, Variable, StdDev, Difference, and Sum. Index values represent position in the active dataset, starting with 0 for the first variable in file order. The default format can be retrieved with the GetDefaultFormatSpec method.

• Instances of the BasePivotTable class have an implicit default format of GeneralStat.

Example

table = spss.BasePivotTable("Table Title",
                            "OMS table subtype")
BasePivotTable.SetDefaultFormatSpec(table,formatSpec.Mean,2)
rowdim=BasePivotTable.Append(table,Dimension.Place.row,"rowdim")
coldim=BasePivotTable.Append(table,Dimension.Place.column,"coldim")

BasePivotTable.SetCategories(table,rowdim,list(spss.CellText.String("row1"),
                                               spss.CellText.String("row2")))
BasePivotTable.SetCategories(table,coldim,spss.CellText.String("col1"))

BasePivotTable.SetCellValue(table,list(spss.CellText.String("row1"),
                                       spss.CellText.String("col1")),
                                       spss.CellText.Number(2.37))
BasePivotTable.SetCellValue(table,list(spss.CellText.String("row2"),
                                       spss.CellText.String("col1")),
                                       spss.CellText.Number(4.34))

• The call to SetDefaultFormatSpec specifies that the format for mean values is to be used as the default, and that it will be based on the format for the variable with index value 2 in the active dataset. Subsequent instances of CellText.Number will use this default, so the cell values 2.37 and 4.34 will be formatted as mean values.

Related Topics

GetDefaultFormatSpec Method (R)
CellText.Number Class (R)


TitleFootnotes Method (R)

BasePivotTable class,BasePivotTable class,BasePivotTable class
TitleFootnotes method,TitleFootnotes method,TitleFootnotes method
TitleFootnotes method,TitleFootnotes method,TitleFootnotes method

.TitleFootnotes(object,footnotes). Used to add a footnote to the table title. The argument object is a reference to the associated BasePivotTable object. The argument footnotes is a string specifying the footnote.

Example

table = spss.BasePivotTable("Table Title",
                            "OMS table subtype")

BasePivotTable.TitleFootnotes(table,"A title footnote")

Related Topics

CategoryFootnotes Method (R)
DimensionFootnotes Method (R)
Footnotes Method (R)


CellText Objects (R)

BasePivotTable class,BasePivotTable class,BasePivotTable class
CellText objects,CellText objects,CellText objects
CellText objects,CellText objects,CellText objects

CellText objects are used to create a dimension category or a cell in a pivot table and are only for use with the BasePivotTable class. The following object types are available:

• CellText.Number: Used to specify a numeric value.

• CellText.String: Used to specify a string value.

• CellText.VarName: Used to specify a variable name. Use of this object means that settings for the display of variable names in pivot tables (names, labels, or both) are honored.

• CellText.VarValue: Used to specify a variable value. Use of this object means that settings for the display of variable values in pivot tables (values, labels, or both) are honored.

Related Topics

CellText.Number Class (R)
CellText.String Class (R)
CellText.VarName Class (R)
CellText.VarValue Class (R)


CellText.Number Class (R)

CellText.Number class,CellText.Number class,CellText.Number class

spss.CellText.Number(value,formatspec,varIndex). Used to specify a numeric value for a category or a cell in a pivot table. The argument value specifies the numeric value. You can pass an R POSIXt date/time object to this argument. The optional argument formatspec is of the form formatSpec.format where format is one of those listed in the table below--for example, formatSpec.Mean. You can also specify an integer code for formatspec, as in the value 5 for Mean. The argument varIndex is the index of a variable in the active dataset whose format is used to determine details of the resulting format. varIndex is only used in conjunction with formatspec and is required when specifying one of the following formats: Mean, Variable, StdDev, Difference, and Sum. Index values represent position in the active dataset, starting with 0 for the first variable in file order.

• When formatspec is omitted, the default format is used. You can set the default format with the SetDefaultFormatSpec method and retrieve the default with the GetDefaultFormatSpec method. Instances of the BasePivotTable class have an implicit default format of GeneralStat.

• You can obtain a numeric representation of a CellText.Number object using the toNumber method, and you can use the toString method to obtain a string representation.

Example

table = spss.BasePivotTable("Table Title",
                            "OMS table subtype")

rowdim=BasePivotTable.Append(table,Dimension.Place.row,"rowdim")
coldim=BasePivotTable.Append(table,Dimension.Place.column,"coldim")

BasePivotTable.SetCategories(table,rowdim,list(spss.CellText.String("row1"),
                                               spss.CellText.String("row2")))
BasePivotTable.SetCategories(table,coldim,spss.CellText.String("col1"))

BasePivotTable.SetCellValue(table,list(spss.CellText.String("row1"),
                                       spss.CellText.String("col1")),
                                       spss.CellText.Number(25.632,formatSpec.Mean,2))
BasePivotTable.SetCellValue(table,list(spss.CellText.String("row2"),
                                       spss.CellText.String("col1")),
                                       spss.CellText.Number(23.785,formatSpec.Mean,2))

In this example, cell values are displayed in the format used for mean values. The format of the variable with index 2 in the active dataset is used to determine the details of the resulting format.

Numeric formats for use with FormatSpec
Format name | Code
Coefficient | 0
CoefficientSE | 1
CoefficientVar | 2
Correlation | 3
GeneralStat | 4
Mean | 5
Count | 6
Percent | 7
PercentNoSign | 8
Proportion | 9
Significance | 10
Residual | 11
Variable | 12
StdDev | 13
Difference | 14
Sum | 15
Suggestions for Choosing a Format Collapse Hide details

Suggestions for Choosing a Format

• Consider using Coefficient for unbounded, unstandardized statistics; for instance, beta coefficients in regression.

• Correlation is appropriate for statistics bounded by –1 and 1 (typically correlations or measures of association).

• Consider using GeneralStat for unbounded, scale-free statistics; for instance, beta coefficients in regression.

• Mean is appropriate for the mean of a single variable, or the mean across multiple variables.

• Count is appropriate for counts and other integers such as integer degrees of freedom.

• Percent and PercentNoSign are both appropriate for percentages. PercentNoSign results in a value without a percentage symbol (%).

• Significance is appropriate for statistics bounded by 0 and 1 (for example, significance levels).

• Consider using Residual for residuals from cell counts.

• Variable refers to a variable’s print format as given in the data dictionary and is appropriate for statistics whose values are taken directly from the observed data (for instance, minimum, maximum, and mode).

• StdDev is appropriate for the standard deviation of a single variable, or the standard deviation across multiple variables.

• Sum is appropriate for sums of single variables. Results are displayed using the specified variable’s print format.

Related Topics

CellText Objects (R)
CellText.String Class (R)
CellText.VarName Class (R)
CellText.VarValue Class (R)


CellText.String Class (R)

CellText.String class,CellText.String class,CellText.String class

spss.CellText.String(value). Used to specify a string value for a category or a cell in a pivot table. The argument is the string value.

• You can obtain a string representation of a CellText.String object using the toString method. For character representations of numeric values stored as CellText.String objects, such as CellText.String("11"), you can obtain the numeric value using the toNumber method.

Example

table = spss.BasePivotTable("Table Title",
                            "OMS table subtype")

rowdim=BasePivotTable.Append(table,Dimension.Place.row,"rowdim")
coldim=BasePivotTable.Append(table,Dimension.Place.column,"coldim")

BasePivotTable.SetCategories(table,rowdim,list(spss.CellText.String("row1"),
                                               spss.CellText.String("row2")))
BasePivotTable.SetCategories(table,coldim,spss.CellText.String("col1"))

BasePivotTable.SetCellValue(table,list(spss.CellText.String("row1"),
                                       spss.CellText.String("col1")),
                                       spss.CellText.String("1"))
BasePivotTable.SetCellValue(table,list(spss.CellText.String("row2"),
                                       spss.CellText.String("col1")),
                                       spss.CellText.String("2"))

Related Topics

CellText Objects (R)
CellText.Number Class (R)
CellText.VarName Class (R)
CellText.VarValue Class (R)


CellText.VarName Class (R)

CellText.VarName class,CellText.VarName class,CellText.VarName class

spss.CellText.VarName(index). Used to specify that a category or cell in a pivot table is to be treated as a variable name. CellText.VarName objects honor display settings for variable names in pivot tables (names, labels, or both). The argument is the index value of the variable. Index values represent position in the active dataset, starting with 0 for the first variable in file order.

Example

table = spss.BasePivotTable("Table Title",
                            "OMS table subtype")
coldim=BasePivotTable.Append(table,Dimension.Place.column,"coldim")
rowdim=BasePivotTable.Append(table,Dimension.Place.row,"rowdim")
BasePivotTable.SetCategories(table,rowdim,list(spss.CellText.VarName(0),
                                               spss.CellText.VarName(1)))
BasePivotTable.SetCategories(table,coldim,spss.CellText.String("Column Heading"))

In this example, row categories are specified as the names of the variables with index values 0 and 1 in the active dataset. Depending on the setting of pivot table labeling for variables in labels, the variable names, labels, or both will be displayed.

Related Topics

CellText Objects (R)
CellText.Number Class (R)
CellText.String Class (R)
CellText.VarValue Class (R)


CellText.VarValue Class (R)

CellText.VarValue class,CellText.VarValue class,CellText.VarValue class

spss.CellText.VarValue(index,value). Used to specify that a category or cell in a pivot table is to be treated as a variable value. CellText.VarValue objects honor display settings for variable values in pivot tables (values, labels, or both). The argument index is the index value of the variable. Index values represent position in the active dataset, starting with 0 for the first variable in file order. The argument value is a number (for a numeric variable) or string (for a string variable) representing the value of the CellText object.

Example

table = spss.BasePivotTable("Table Title",
                            "OMS table subtype")
coldim=BasePivotTable.Append(table,Dimension.Place.column,"coldim")
rowdim=BasePivotTable.Append(table,Dimension.Place.row,"rowdim")
BasePivotTable.SetCategories(table,rowdim,list(spss.CellText.VarValue(0,1),
                                               spss.CellText.VarValue(0,2)))
BasePivotTable.SetCategories(table,coldim,spss.CellText.String("Column Heading"))

In this example, row categories are specified as the values 1 and 2 of the variable with index value 0 in the active dataset. Depending on the setting of pivot table labeling for variable values in labels, the values, value labels, or both will be displayed.

Related Topics

CellText Objects (R)
CellText.Number Class (R)
CellText.String Class (R)
CellText.VarName Class (R)


CellText.toNumber Method (R)

toNumber method,toNumber method,toNumber method

CellText.toNumber(object). This method is used to obtain a numeric representation of a CellText.Number object or a CellText.String object that stores a character representation of a numeric value, as in CellText.String("123"). Values obtained from this method can be used in arithmetic expressions. You call this method on a CellText.Number or CellText.String object.

Example

table = spss.BasePivotTable("Table Title",
                            "OMS table subtype")

rowdim=BasePivotTable.Append(table,Dimension.Place.row,"row dimension")
coldim=BasePivotTable.Append(table,Dimension.Place.column,"column dimension")

row_cat1 = spss.CellText.String("first row")
row_cat2 = spss.CellText.String("second row")
col_cat1 = spss.CellText.String("first column")
col_cat2 = spss.CellText.String("second column")

BasePivotTable.SetCategories(table,rowdim,list(row_cat1,row_cat2))
BasePivotTable.SetCategories(table,coldim,list(col_cat1,col_cat2))

BasePivotTable.SetCellValue(table,list(row_cat1,col_cat1),spss.CellText.Number(11))
cellValue = CellText.toNumber(BasePivotTable.GetCellValue(table,list(row_cat1,col_cat1)))
BasePivotTable.SetCellValue(table,list(row_cat2,col_cat2),spss.CellText.Number(2*cellValue))

Related Topics

Using Cell Values in Expressions (R)


CellText.toString Method (R)

toString method,toString method,toString method

CellText.toString(object). This method is used to obtain a string representation of a CellText.String or CellText.Number object. Values obtained from this method can be used in string expressions. You call this method on a CellText.String or CellText.Number object.

Example

table = spss.BasePivotTable("Table Title",
                            "OMS table subtype")

BasePivotTable.Append(table,Dimension.Place.row,"row dimension")
BasePivotTable.Append(table,Dimension.Place.column,"column dimension")

row_cat1 = spss.CellText.String("first row")
row_cat2 = spss.CellText.String("second row")
col_cat1 = spss.CellText.String("first column")
col_cat2 = spss.CellText.String("second column")

BasePivotTable.SetCategories(table,rowdim,list(row_cat1,row_cat2))
BasePivotTable.SetCategories(table,coldim,list(col_cat1,col_cat2))

BasePivotTable.SetCellValue(table,list(row_cat1,col_cat1),spss.CellText.String("abc"))
cellValue = CellText.toString(BasePivotTable.GetCellValue(table,list(row_cat1,col_cat1)))
BasePivotTable.SetCellValue(table,list(row_cat2,col_cat2),
                            spss.CellText.String(paste(cellValue,"d",sep="")))

Related Topics

Using Cell Values in Expressions (R)


GetSPSSPlugInVersion Function (R)

This function is deprecated for release 18 and higher. Please use the spsspkg.GetSPSSPlugInVersion function instead.


GetSPSSVersion Function (R)

This function is deprecated for release 18 and higher. Please use the spsspkg.GetSPSSVersion function instead.


spssdata Functions (R)

spssdata functions,spssdata functions,spssdata functions
data,data,data
reading active dataset into R,reading active dataset into R,reading active dataset into R
writing data from R to PASW Statistics,writing data from R to PASW Statistics,writing data from R to PASW Statistics
active dataset,active dataset,active dataset
reading into R,reading into R,reading into R

The spssdata group of functions enables R programs to exchange data with PASW Statistics. It includes functions to read cases from the PASW Statistics active dataset into an R data frame and to create a new PASW Statistics dataset from an R data frame.

Related Topics

spssdata.SetDataToSPSS Function (R)
spssdata.IsLastSplit Function (R)
spssdata.GetSplitVariableNames Function (R)
spssdata.GetSplitDataFromSPSS Function (R)
spssdata.GetFileHandles Function (R)
spssdata.GetDataSetList Function (R)
spssdata.GetDataFromSPSS Function (R)
spssdata.GetCaseCount Function (R)


spssdata.CloseDataConnection Function (R)

spssdata functions,spssdata functions,spssdata functions
CloseDataConnection,CloseDataConnection,CloseDataConnection
CloseDataConnection,CloseDataConnection,CloseDataConnection

spssdata.CloseDataConnection(). Closes a data connection created by the GetSplitDataFromSPSS function. This function only applies to data connections created to handle PASW Statistics datasets containing split groups. CloseDataConnection should be called when done reading from such datasets.

• Data connections are implicitly closed at the end of a BEGIN PROGRAM R-END PROGRAM block.

For an example of using CloseDataConnection see the topic on the GetSplitDataFromSPSS function.

Related Topics

spssdata.GetSplitDataFromSPSS Function (R)


spssdata.GetCaseCount Function (R)

spssdata functions,spssdata functions,spssdata functions
GetCaseCount,GetCaseCount,GetCaseCount
GetCaseCount,GetCaseCount,GetCaseCount
case count,case count,case count
number of cases (rows),number of cases (rows),number of cases (rows)
row count,row count,row count

spssdata.GetCaseCount(). Returns the number of cases (rows) in the active PASW Statistics dataset.

Example

ncases <- spssdata.GetCaseCount()
casedata <- spssdata.GetDataFromSPSS()
sampledata <- casedata[sample(1:ncases,0.1*ncases),]


spssdata.GetDataFromSPSS Function (R)

spssdata functions,spssdata functions,spssdata functions
GetDataFromSPSS,GetDataFromSPSS,GetDataFromSPSS
GetDataFromSPSS,GetDataFromSPSS,GetDataFromSPSS

spssdata.GetDataFromSPSS(variables,cases,row.label,keepUserMissing,missingValueToNA,factorMode, rDate,dateVar,asList,orderedContrast) Retrieves case data from the active dataset and returns it as an R data frame or optionally as a list. All of the arguments are optional. If no arguments are provided and the active dataset does not have split groups, the function retrieves all cases for all variables in the active dataset. If the active dataset has split groups and no arguments are provided, the function retrieves all cases in the first split group. For the default of returning an R data frame, each retrieved case is stored as a row in the data frame. The option of returning the data as a list is most useful when retrieving large datasets since the list structure requires less memory than the data frame structure.

• The argument variables specifies the set of variables whose case values will be retrieved. The argument can be a character vector or list specifying the variable names, a character string consisting of variable names separated by blanks, or a numeric vector or list of integers specifying the index values of the variables (index values represent position in the dataset, starting with 0 for the first variable in file order). Variable names must match case with the names as they exist in the active dataset's dictionary. If the argument is omitted, all variables will be retrieved.

When specifying variable names, you can use TO to indicate a range of variables. For example, variables=c("mpg TO weight") specifies mpg, weight, and all variables between them in the active dataset's dictionary. You can also specify a range of values using index values, as in variables=c(2:4), which specifies the variables with index values 2 through 4.

• The argument cases is an integer specifying the number of cases to retrieve, beginning with the first case in the active dataset. If the argument is omitted and the active dataset has no split groups, all cases will be retrieved. If the active dataset has split groups and the argument is either omitted or greater than or equal to the number of cases in the first split group, then all cases in the first split group are retrieved.

• The argument row.label specifies a variable from the active dataset whose case values will be the row labels of the resulting data frame. The argument is either the variable name or the index value of the variable (index values represent position in the dataset, starting with 0 for the first variable in file order). If the argument is omitted, the row labels will be the default used by R. The argument has no effect if asList=TRUE.

• The argument keepUserMissing specifies whether user-missing values should be treated as valid data. The argument is boolean and the default is FALSE, meaning that user-missing values are treated as missing. With keepUserMissing set to FALSE (or omitted), user-missing values of string variables are converted to the R NA value. The handling of missing values of numeric variables depends on the argument missingValueToNA described below.

• The argument missingValueToNA specifies whether missing values of numeric variables are converted to the R NA value. The argument is boolean and the default is FALSE, which specifies that missing values (system and user) of numeric variables are converted to the R NaN.

• The argument factorMode specifies whether categorical variables from PASW Statistics(variables with a measurement level of nominal or ordinal) are converted to R factors. The value "none" is the default and specifies that categorical variables are not converted to factors. The value "levels" specifies that categorical variables are converted to factors whose levels are the values of the variables. The value "labels" specifies that categorical variables are converted to factors whose levels are the value labels of the variables. Values for which value labels do not exist have a level equal to the value itself. Ordinal variables are converted to ordered factors and nominal variables are converted to unordered factors.

• The argument rDate specifies how variables in dateVar, with date or datetime formats, are converted to R date/time objects. The value "none" is the default and specifies that no conversion will be done. The value "POSIXct" specifies to convert to R POSIXct objects and "POSIXlt" specifies to convert to R POSIXlt objects.

• The argument dateVar specifies a set of PASW Statistics variables with date or datetime formats to convert to R date/time objects. The argument supports the same options for specifying variables as described for the variables argument. If the argument is omitted and rDate specifies a POSIXt object, then all variables with date or datetime formats are converted.

• The argument asList specifies whether the result from GetDataFromSPSS is a list. The argument is boolean with a default of FALSE, which specifies that the result is returned as a data frame. If asList is TRUE the result is a list with an element for each retrieved variable. Setting asList to TRUE is most useful when retrieving large datasets since the list structure requires less memory than the default data frame structure.

• The argument orderedContrast specifies a contrast function to associate with the ordered factors created from any ordinal variables retrieved from PASW Statistics. It only applies (to ordinal variables) in the case that factorMode is set to "levels" or "labels". You can specify any valid contrast function, as a quoted string, such as "contr.helmert". The default is "contr.treatment".

• If the active dataset has split groups, GetDataFromSPSS will only return data from the first split group. To get data from PASW Statistics datasets with split groups, use the GetSplitDataFromSPSS function.

• String values are right-padded to the defined width of the string variable.

• The default value of FALSE for asList results in strings being returned as R factors. Set asList to TRUE if you don't want strings to be returned as factors. Note, however, that with asList set to TRUE, the result from GetDataFromSPSS is a list, not a data frame.

• Values retrieved from PASW Statistics variables with time formats are returned as integers representing the number of seconds from midnight.

Example

DATA LIST FREE /var1 (F2) var2 (A2) var3 (F2) var4 (F2).
BEGIN DATA
11 ab 13 14
21 cd 23 24
31 ef 33 34
END DATA.
BEGIN PROGRAM R.
casedata <- spssdata.GetDataFromSPSS()
print(casedata)
END PROGRAM.

Result

  var1 var2 var3 var4
1   11   ab   13   14
2   21   cd   23   24
3   31   ef   33   34

• Since the argument row.label was not specified, the row labels are the default provided by R.

• The column labels of the resulting data frame are the names of the variables retrieved from the active dataset.

Related Topics

Reading Case Data from PASW Statistics (R)
spssdata.GetSplitDataFromSPSS Function (R)
spssdata.SetDataToSPSS Function (R)


spssdata.GetDataSetList Function (R)

spssdata functions,spssdata functions,spssdata functions
GetDataSetList,GetDataSetList,GetDataSetList
GetDataSetList,GetDataSetList,GetDataSetList

spssdata.GetDataSetList(). Returns the names of all defined PASW Statistics datasets in the current session. The function returns '*' for the active dataset if it is unnamed.

• Datasets that have been declared (with DATASET DECLARE) but not yet opened are included in the list. To obtain only the list of open datasets, use the GetOpenedDataSetList function.

Example

datasets <- spssdata.GetDataSetList()

Related Topics

spssdata.GetFileHandles Function (R)
spssdata.GetOpenedDataSetList Function (R)


spssdata.GetFileHandles Function (R)

spssdata functions,spssdata functions,spssdata functions
GetFileHandles,GetFileHandles,GetFileHandles
GetFileHandles,GetFileHandles,GetFileHandles
file handles,file handles,file handles

spssdata.GetFileHandles(). Returns a list of currently defined file handles. Each item in the list consists of the following three elements: the name of the file handle; the path associated with the file handle; and the encoding, if any, specified for the file handle. The string value "None" is returned for the encoding if no encoding is specified. File handles are created with the FILE HANDLE command.

Example

handles <- spssdata.GetFileHandles()

Related Topics

spssdata.GetDataSetList Function (R)
spssdata.GetOpenedDataSetList Function (R)


spssdata.GetOpenedDataSetList Function (R)

spssdata functions,spssdata functions,spssdata functions
GetOpenedDataSetList,GetOpenedDataSetList,GetOpenedDataSetList
GetOpenedDataSetList,GetOpenedDataSetList,GetOpenedDataSetList

spssdata.GetOpenedDataSetList(). Returns the names of the open PASW Statistics datasets in the current session.The function returns '*' for the active dataset if it is unnamed.

• Datasets that have been declared (with DATASET DECLARE) but not yet opened are NOT included in the list. To obtain the list of all defined datasets, use the GetDataSetList function.

Example

datasets <- spssdata.GetOpenedDataSetList()

Related Topics

spssdata.GetDataSetList Function (R)
spssdata.GetFileHandles Function (R)


spssdata.GetSplitDataFromSPSS Function (R)

spssdata functions,spssdata functions,spssdata functions
GetSplitDataFromSPSS,GetSplitDataFromSPSS,GetSplitDataFromSPSS
GetSplitDataFromSPSS,GetSplitDataFromSPSS,GetSplitDataFromSPSS
split-file processing,split-file processing,split-file processing
reading datasets with splits in R,reading datasets with splits in R,reading datasets with splits in R

spssdata.GetSplitDataFromSPSS(variables,row.label,keepUserMissing,missingValueToNA,factorMode, rDate,dateVar,orderedContrast). Retrieves the case data for a split group from the active dataset, and returns it as an R data frame. Each retrieved case is stored as a row in the resulting R data frame.

• The argument variables specifies the set of variables whose case values will be retrieved. The argument can be a character vector or list specifying the variable names, a character string consisting of variable names separated by blanks, or a numeric vector or list of integers specifying the index values of the variables (index values represent position in the dataset, starting with 0 for the first variable in file order). Variable names must match case with the names as they exist in the active dataset's dictionary. If the argument is omitted, all variables will be retrieved.

When specifying variable names, you can use TO to indicate a range of variables. For example, variables=c("mpg TO weight") specifies mpg, weight, and all variables between them in the active dataset's dictionary. You can also specify a range of values using index values, as in variables=c(2:4), which specifies the variables with index values 2 through 4.

• The argument row.label specifies a variable from the active dataset whose case values will be the row labels of the resulting data frame. The argument is either the variable name or the index value of the variable (index values represent position in the dataset, starting with 0 for the first variable in file order). If the argument is omitted, the row labels will be the default used by R.

• The argument keepUserMissing specifies whether user-missing values should be treated as valid data. The argument is boolean and the default is FALSE, meaning that user-missing values are treated as missing. With keepUserMissing set to FALSE (or omitted), user-missing values of string variables are converted to the R NA value. The handling of missing values of numeric variables depends on the argument missingValueToNA described below.

• The argument missingValueToNA specifies whether missing values of numeric variables are converted to the R NA value. The argument is boolean and the default is FALSE, which specifies that missing values (system and user) of numeric variables are converted to the R NaN.

• The argument factorMode specifies whether categorical variables from PASW Statistics(variables with a measurement level of nominal or ordinal) are converted to R factors. The value "none" is the default and specifies that categorical variables are not converted to factors. The value "levels" specifies that categorical variables are converted to factors whose levels are the values of the variables. The value "labels" specifies that categorical variables are converted to factors whose levels are the value labels of the variables. Values for which value labels do not exist have a level equal to the value itself. Ordinal variables are converted to ordered factors and nominal variables are converted to unordered factors.

• The argument rDate specifies how variables in dateVar, with date or datetime formats, are converted to R date/time objects. The value "none" is the default and specifies that no conversion will be done. The value "POSIXct" specifies to convert to R POSIXct objects and "POSIXlt" specifies to convert to R POSIXlt objects.

• The argument dateVar specifies a set of PASW Statistics variables with date or datetime formats to convert to R date/time objects. The argument supports the same options for specifying variables as described for the variables argument. If the argument is omitted and rDate specifies a POSIXt object, then all variables with date or datetime formats are converted.

• The argument orderedContrast specifies a contrast function to associate with the ordered factors created from any ordinal variables retrieved from PASW Statistics. It only applies (to ordinal variables) in the case that factorMode is set to "levels" or "labels". You can specify any valid contrast function, as a quoted string, such as "contr.helmert". The default is "contr.treatment".

• Each call to GetSplitDataFromSPSS returns the case data for the next split group from the active dataset. For example, the first call to GetSplitDataFromSPSS returns the data for the first split group, the second call returns the data for the second split group, and so on. In the case that the active dataset has no split groups, GetSplitDataFromSPSS returns all cases on its first call.

• GetSplitDataFromSPSS returns NULL if there are no more split groups in the active dataset.

Example

varnames <- spssdata.GetSplitVariableNames()
if(length(varnames) > 0)
{
   while (!spssdata.IsLastSplit()){
      data <- spssdata.GetSplitDataFromSPSS()
      cat("\n\nSplit variable values:")
      for (name in varnames) cat("\n",name,":",data[1,name])
      cat("\nCases in Split: ",length(data[,1]))
   }
   spssdata.CloseDataConnection()
}

Related Topics

Reading Case Data from PASW Statistics (R)
spssdata.GetDataFromSPSS Function (R)
spssdata.GetSplitVariableNames Function (R)
spssdata.IsLastSplit Function (R)


spssdata.GetSplitVariableNames Function (R)

spssdata functions,spssdata functions,spssdata functions
GetSplitVariableNames,GetSplitVariableNames,GetSplitVariableNames
GetSplitVariableNames,GetSplitVariableNames,GetSplitVariableNames
split-file processing,split-file processing,split-file processing
split variables,split variables,split variables

spssdata.GetSplitVariableNames(). Returns the names of the split variables, if any, in the active dataset.

For an example of using GetSplitVariableNames, see the topic on the GetSplitDataFromSPSS function.

Related Topics

Reading Case Data from PASW Statistics (R)
spssdata.GetSplitDataFromSPSS Function (R)
spssdata.IsLastSplit Function (R)


spssdata.IsLastSplit Function (R)

spssdata functions,spssdata functions,spssdata functions
IsLastSplit,IsLastSplit,IsLastSplit
IsLastSplit,IsLastSplit,IsLastSplit
split-file processing,split-file processing,split-file processing

spssdata.IsLastSplit(). Indicates if the current split group is the last one in the active dataset, for datasets with splits. The result is a logical value--TRUE if the current split group is the last one, otherwise FALSE.

For an example of using IsLastSplit see the topic on the GetSplitDataFromSPSS function.

Related Topics

Reading Case Data from PASW Statistics (R)
spssdata.GetSplitDataFromSPSS Function (R)
spssdata.GetSplitVariableNames Function (R)


spssdata.SetDataToSPSS Function (R)

spssdata functions,spssdata functions,spssdata functions
SetDataToSPSS,SetDataToSPSS,SetDataToSPSS
SetDataToSPSS,SetDataToSPSS,SetDataToSPSS

spssdata.SetDataToSPSS(datasetName,x,categoryDictionary). Populates the case data for a new PASW Statistics dataset.

• The argument datasetName is the name of the PASW Statistics dataset as specified on the call to the SetDictionaryToSPSS function used to create the dataset.

• The argument x is an R data frame whose rows represent cases and whose columns represent the variables of the resulting PASW Statistics dataset. Values in the first column of the data frame populate the first variable in the dataset, values in the second column of the data frame populate the second variable in the dataset, and so on.

• The optional argument categoryDictionary specifies the name of a category dictionary created with the GetCategoricalDictionaryFromSPSS function. Category dictionaries are for use when retrieving categorical variables (variables with a measurement level of "nominal" or "ordinal") into labelled R factors, with the intention of writing those factors to a new dataset.

• The SetDictionaryToSPSS function must be called prior to calling SetDataToSPSS in order to specify the dictionary for the new dataset.

• Logical, integer, and double values from R are mapped to numeric values in PASW Statistics.

• For numeric variables, the R NaN and NA values are converted to the system-missing value in PASW Statistics.

• When setting values for a PASW Statistics variable with a date or datetime format, specify the values as R POSIXt objects, which will then be correctly converted to the values appropriate for PASW Statistics. Also note that PASW Statistics variables with a time format are stored as the number of seconds from midnight.

Examples of using the SetDataToSPSS function are best understood in the context of creating a new dataset. See the topic Writing Results to a New PASW Statistics Dataset (R) for more information.

Related Topics

Writing Results to a New PASW Statistics Dataset (R)
spssdictionary.EditCategoricalDictionary Function (R)
spssdictionary.GetCategoricalDictionaryFromSPSS Function (R)
spssdictionary.SetDictionaryToSPSS Function (R)
spssdata.GetDataFromSPSS Function (R)


spssdictionary Functions (R)

spssdictionary functions,spssdictionary functions,spssdictionary functions
data,data,data
creating PASW Statistics datasets,creating PASW Statistics datasets,creating PASW Statistics datasets

The spssdictionary group of functions provides tools for working with the dictionaries of PASW Statistics datasets. It includes functions to read dictionary information from the active dataset and to create the dictionary for a new PASW Statistics dataset.

Related Topics

spssdictionary.GetVariableAttributes Function (R)
spssdictionary.GetValueLabels Function (R)
spssdictionary.GetUserMissingValues Function (R)
spssdictionary.GetMultiResponseSet Function (R)
spssdictionary.GetDictionaryFromSPSS Function (R)
spssdictionary.GetDataFileAttributes Function (R)
spssdictionary.GetWeightVariable Function (R)
spssdictionary.GetVariableName Function (R)
spssdictionary.GetVariableType Function (R)
spssdictionary.GetVariableMeasurementLevel Function (R)
spssdictionary.GetVariableLabel Function (R)
spssdictionary.GetVariableFormat Function (R)
spssdictionary.GetVariableCount Function (R)


spssdictionary.CloseDataset Function (R)

spssdictionary functions,spssdictionary functions,spssdictionary functions
CloseDataset,CloseDataset,CloseDataset
CloseDataset,CloseDataset,CloseDataset

spssdictionary.CloseDataset(datasetName). Closes the specified dataset. This function closes a dataset created by the SetDictionaryToSPSS function. It cannot be used to close an arbitrary open dataset, only datasets created from R. When used, it must be called prior to EndDataStep.


spssdictionary.CreateSPSSDictionary Function (R)

spssdictionary functions,spssdictionary functions,spssdictionary functions
CreateSPSSDictionary,CreateSPSSDictionary,CreateSPSSDictionary
CreateSPSSDictionary,CreateSPSSDictionary,CreateSPSSDictionary

spssdictionary.CreateSPSSDictionary(var1,...,varN). Creates an R data frame representation of a dictionary for use with the SetDictionaryToSPSS function.

• The arguments var1,...,varN specify the variables. Each argument is specified as a vector consisting of the following components (component names are optional), and in the presented order:

varName. The variable name.

varLabel. The variable label.

varType. The variable type; 0 for numeric variables, and an integer equal to the defined length for string variables.

varFormat. The display format of the variable, as a character string. Formats for string variables consisting of standard characters are specified as Aw where w is the defined length of the string--for example, A4. Formats for standard numeric variables are specified as Fw.d, where w is an integer specifying the defined width (which must include enough positions to accommodate any punctuation characters such as decimal points, commas, dollar signs, or date and time delimiters) and d is an optional integer specifying the number of decimal digits. For example, a format of F5.2 represents a numeric value with a total width of 5, including two decimal positions and a decimal indicator. A listing of the available formats is shown in the table .See the topic Variable Types and Formats for more information.

varMeasurementLevel. The measurement level of the variable. Possible values are "nominal", "ordinal", and "scale".

Note: Missing values, value labels, and custom variable attributes are set with the SetUserMissing, SetValueLabel, and SetVariableAttributes functions from the spssdictionary group of functions.

Example

In this example, we create a new dataset but do not populate the case data. To populate the case data, use the SetDataToSPSS function.

resp <- c("response","",8,"A8","nominal")
int <- c("intercept","",0,"F8.2","scale")
pred <- c("predictor","",0,"F8.2","scale")
dict <- spssdictionary.CreateSPSSDictionary(resp,int,pred)
spssdictionary.SetDictionaryToSPSS("results",dict)

For more information on creating new datasets, see Writing Results to a New PASW Statistics Dataset (R).

Format Types Collapse Hide details

Format Types

A. Standard characters.
AHEX. Hexadecimal characters.
COMMA. Numbers with commas as the grouping symbol and a period as the decimal indicator. For example: 1,234,567.89.
DOLLAR. Numbers with a leading dollar sign ($), commas as the grouping symbol, and a period as the decimal indicator. For example: $1,234,567.89.
F. Standard numeric.
IB. Integer binary.
PIBHEX. Hexadecimal of PIB (positive integer binary).
P. Packed decimal.
PIB. Positive integer binary.
PK. Unsigned packed decimal.
RB. Real binary.
RBHEX. Hexadecimal of RB (real binary).
Z. Zoned decimal.
N. Restricted numeric.
E. Scientific notation.
DATE. International date of the general form dd-mmm-yyyy.
TIME. Time of the general form hh:mm:ss.ss.
DATETIME. Date and time of the general form dd-mmm-yyyy hh:mm:ss.ss.
ADATE. American date of the general form mm/dd/yyyy.
JDATE. Julian date of the general form yyyyddd.
DTIME. Days and time of the general form dd hh:mm:ss.ss.
WKDAY. Day of the week.
MONTH. Month.
MOYR. Month and year.
QYR. Quarter and year of the general form qQyyyy.
WKYR. Week and year.
PCT. Percentage sign after numbers.
DOT. Numbers with periods as the grouping symbol and a comma as the decimal indicator. For example: 1.234.567,89.
CCA. Custom currency format 1.
CCB. Custom currency format 2.
CCC. Custom currency format 3.
CCD. Custom currency format 4.
CCE. Custom currency format 5.
EDATE. European date of the general form dd.mm.yyyy.
SDATE. Sortable date of the general form yyyy/mm/dd.

Related Topics

spssdictionary.SetDictionaryToSPSS Function (R)


spssdictionary.EditCategoricalDictionary Function (R)

spssdictionary functions,spssdictionary functions,spssdictionary functions
EditCategoricalDictionary,EditCategoricalDictionary,EditCategoricalDictionary
EditCategoricalDictionary,EditCategoricalDictionary,EditCategoricalDictionary

spssdictionary.EditCategoricalDictionary(categoryDictionary,newNames). Changes the names of one or more variables in a category dictionary. This is a utility function for use with category dictionaries. Category dictionaries are for use when retrieving categorical variables (variables with a measurement level of "nominal" or "ordinal") into labelled R factors, with the intention of writing those factors to a new dataset. If you rename categorical variables when writing them back to PASW Statistics, you must use this function to change the name in the associated category dictionary.

• The argument categoryDictionary specifies the name of a category dictionary created with the GetCategoricalDictionaryFromSPSS function.

• The argument newNames is a vector specifying the names of the variables in the category dictionary. It replaces the existing names, which are defined in the name attribute of the category dictionary, and must be the same length as the name attribute. The first element of newNames replaces the first element in the name attribute of the category dictionary, and so on.

Example

In this example, we change the name of the variable oldname to newname in the category dictionary catdict.

catdict <- spssdictionary.GetCategoricalDictionaryFromSPSS()
names<-replace(catdict$name,match("oldname",catdict$name),"newname")
catdict<-spssdictionary.EditCategoricalDictionary(catdict, names)

Related Topics

Writing Results to a New PASW Statistics Dataset (R)
spssdata.SetDataToSPSS Function (R)
spssdictionary.GetCategoricalDictionaryFromSPSS Function (R)
spssdictionary.SetDictionaryToSPSS Function (R)


spssdictionary.EndDataStep Function (R)

spssdictionary functions,spssdictionary functions,spssdictionary functions
EndDataStep,EndDataStep,EndDataStep
EndDataStep,EndDataStep,EndDataStep

spssdictionary.EndDataStep(). Specifies the end of creating a new PASW Statistics dataset. This function should be called after completing the steps to create a new PASW Statistics dataset.

Examples of using the EndDataStep function are best understood in the context of creating a new dataset. See the topic Writing Results to a New PASW Statistics Dataset (R) for more information.


spssdictionary.GetCategoricalDictionaryFromSPSS Function (R)

spssdictionary functions,spssdictionary functions,spssdictionary functions
GetCategoricalDictionaryFromSPSS,GetCategoricalDictionaryFromSPSS,GetCategoricalDictionaryFromSPSS
GetCategoricalDictionaryFromSPSS,GetCategoricalDictionaryFromSPSS,GetCategoricalDictionaryFromSPSS

spssdictionary.GetCategoricalDictionaryFromSPSS(variables). Returns a structure containing the values and value labels of the specified categorical variables from the active dataset. This is a utility function for use when retrieving categorical variables (variables with a measurement level of "nominal" or "ordinal") into labeled R factors (factorMode="labels" in GetDataFromSPSS), with the intention of writing those factors to a new dataset. This is necessary because labeled factors in R do not preserve the original values. The structure returned by this function is referred to as a category dictionary.

• The argument variables specifies the set of categorical variables. The argument can be a character vector or list specifying the variable names, a character string consisting of variable names separated by blanks, or a numeric vector or list of integers specifying the index values of the variables (index values represent position in the dataset, starting with 0 for the first variable in file order). Variable names must match case with the names as they exist in the active dataset's dictionary. If the argument is omitted, all categorical variables will be retrieved.

When specifying variable names, you can use TO to indicate a range of variables. For example, variables=c("year TO cylinder") specifies all categorical variables between year and cylinder in the active dataset's dictionary. You can also specify a range of values using index values, as in variables=c(2:4), which specifies the categorical variables with index values in the range 2 through 4.

Note: Any scale variables in the specified set of variables are ignored.

Example

categoryDictionary <- spssdictionary.GetCategoricalDictionaryFromSPSS()

Related Topics

Writing Results to a New PASW Statistics Dataset (R)
spssdata.SetDataToSPSS Function (R)
spssdictionary.EditCategoricalDictionary Function (R)
spssdictionary.SetDictionaryToSPSS Function (R)


spssdictionary.GetDataFileAttributeNames Function (R)

spssdictionary functions,spssdictionary functions,spssdictionary functions
GetDataFileAttributeNames,GetDataFileAttributeNames,GetDataFileAttributeNames
GetDataFileAttributeNames,GetDataFileAttributeNames,GetDataFileAttributeNames

spssdictionary.GetDataFileAttributeNames(). Returns the names of any datafile attributes for the active dataset.

• The result is a vector of the attribute names.

• If there are no datafile attributes for the active dataset, NULL is returned.

Example

names <- spssdictionary.GetDataFileAttributeNames()

Related Topics

spssdictionary.GetDataFileAttributes Function (R)


spssdictionary.GetDataFileAttributes Function (R)

spssdictionary functions,spssdictionary functions,spssdictionary functions
GetDataFileAttributes,GetDataFileAttributes,GetDataFileAttributes
GetDataFileAttributes,GetDataFileAttributes,GetDataFileAttributes

spssdictionary.GetDataFileAttributes(attrName). Returns the attribute values for the specified datafile attribute. The argument attrName is a string that specifies the name of the attribute--for instance, a name returned by GetDataFileAttributeNames.

• The result is a vector of the attribute values.

• If there are no values for the specified attribute NULL is returned.

Example

names <- spssdictionary.GetDataFileAttributeNames()
for(attr in names)
{
    y <- spssdictionary.GetDataFileAttributes(attrName = attr)
    print(y)
}

Related Topics

spssdictionary.GetDataFileAttributeNames Function (R)


spssdictionary.GetDictionaryFromSPSS Function (R)

spssdictionary functions,spssdictionary functions,spssdictionary functions
GetDictionaryFromSPSS,GetDictionaryFromSPSS,GetDictionaryFromSPSS
GetDictionaryFromSPSS,GetDictionaryFromSPSS,GetDictionaryFromSPSS

spssdictionary.GetDictionaryFromSPSS(variables). Retrieves variable dictionary information from the active dataset and stores it in an R data frame. The optional argument variables specifies the set of variables whose dictionary information will be retrieved. If the argument is omitted, dictionary information for all variables in the active dataset will be retrieved.

• The argument variables can be a character vector or list specifying the variable names, a character string consisting of variable names separated by blanks, or a numeric vector or list of integers specifying the index values of the variables (index values represent position in the dataset, starting with 0 for the first variable in file order). Variable names must match case with the names as they exist in the active dataset's dictionary.

When specifying variable names, you can use TO to indicate a range of variables. For example, variables=c("mpg TO weight") specifies mpg, weight, and all variables between them in the active dataset's dictionary. You can also specify a range of values using index values, as in variables=c(2:4), which specifies the variables with index values 2 through 4.

• Each column of the returned data frame contains dictionary information for a single variable. The data frame has the following row labels:

varName. The variable name.

varLabel. The variable label.

varType. The variable type; 0 for numeric variables, and an integer equal to the defined length for string variables.

varFormat. The display format of the variable, as a character string. The character portion of the format string is always returned in all upper case. Each format string contains a numeric component after the format name that indicates the defined width, and optionally, the number of decimal positions for numeric formats. For example, A4 is a string format with a maximum width of four bytes, and F8.2 is a standard numeric format with a display format of eight digits, including two decimal positions and a decimal indicator.

varMeasurementLevel. The measurement level of the variable. Possible values are "nominal", "ordinal", "scale", and "unknown". The value "unknown" occurs only for numeric variables prior to the first data pass when the measurement level has not been explicitly set, such as data read from an external source or newly created variables. The measurement level for string variables is always known.

Example

DATA LIST FREE /id (F4) gender (A1) training (F1).
VARIABLE LABELS id 'Employee ID'
   /training 'Training Level'.
VARIABLE LEVEL id (SCALE)
   /gender (NOMINAL)
   /training (ORDINAL).
VALUE LABELS training 1 'Beginning' 2 'Intermediate' 3 'Advanced'
   /gender 'f' 'Female' 'm' 'Male'.
BEGIN DATA
18 m 1
37 f 2
10 f 3
END DATA.
BEGIN PROGRAM R.
dict <- spssdictionary.GetDictionaryFromSPSS()
print(dict)
END PROGRAM.

Result

                             X1        X2             X3
varName                      id    gender       training
varLabel            Employee ID           Training Level
varType                       0         1              0
varFormat                    F4        A1             F1
varMeasurementLevel       scale   nominal        ordinal

Related Topics

Retrieving Variable Dictionary Information (R)
spssdictionary.GetVariableAttributes Function (R)
spssdictionary.GetValueLabels Function (R)
spssdictionary.GetUserMissingValues Function (R)
spssdictionary.GetMultiResponseSet Function (R)
spssdictionary.GetDataFileAttributes Function (R)
spssdictionary.GetWeightVariable Function (R)
spssdictionary.GetVariableName Function (R)
spssdictionary.GetVariableType Function (R)
spssdictionary.GetVariableMeasurementLevel Function (R)
spssdictionary.GetVariableLabel Function (R)
spssdictionary.GetVariableFormat Function (R)
spssdictionary.GetVariableCount Function (R)


spssdictionary.GetMultiResponseSetNames Function (R)

spssdictionary functions,spssdictionary functions,spssdictionary functions
GetMultiResponseSetNames,GetMultiResponseSetNames,GetMultiResponseSetNames
GetMultiResponseSetNames,GetMultiResponseSetNames,GetMultiResponseSetNames

spssdictionary.GetMultiResponseSetNames(). Returns the names of any multiple response sets for the active dataset.

• The result is a vector of names of multiple response sets.

• If there are no multiple response sets for the active dataset, NULL is returned.

Example

names <- spssdictionary.GetMultiResponseSetNames()

Related Topics

spssdictionary.GetMultiResponseSet Function (R)


spssdictionary.GetMultiResponseSet Function (R)

spssdictionary functions,spssdictionary functions,spssdictionary functions
GetMultiResponseSet,GetMultiResponseSet,GetMultiResponseSet
GetMultiResponseSet,GetMultiResponseSet,GetMultiResponseSet

spssdictionary.GetMultiResponseSet(mrsetName). Returns the details of the specified multiple response set. The argument mrsetName is a string that specifies the name of the multiple response set--for instance, a name returned by GetMultiResponseSetNames. If the specified name does not begin with a dollar sign ($), then one is added.

• The result is a list with the following named components: label (the label, if any, for the set), codeAs ("Dichotomies" or "Categories"), countedValue (the counted value--applies only to multiple dichotomy sets), type ("Numeric" or "String"), and vars (a vector of the elementary variables that define the set).

• If the specified response set does not exist, an exception is thrown.

Example

names <- spssdictionary.GetMultiResponseSetNames()
for(set in names)
{
    y <- spssdictionary.GetMultiResponseSet(mrsetName = set)
    print(y)
}

Related Topics

spssdictionary.GetMultiResponseSetNames Function (R)


spssdictionary.GetUserMissingValues Function (R)

spssdictionary functions,spssdictionary functions,spssdictionary functions
GetUserMissingValues,GetUserMissingValues,GetUserMissingValues
GetUserMissingValues,GetUserMissingValues,GetUserMissingValues
missing values,missing values,missing values
retrieving user missing value definitions,retrieving user missing value definitions,retrieving user missing value definitions

spssdictionary.GetUserMissingValues(variable). Returns the user-missing values for the specified variable in the active dataset. The argument can be a character string specifying the variable name or an integer specifying the index value of the variable (index values represent position in the dataset, starting with 0 for the first variable in file order). Variable names must match case with the names as they exist in the active dataset's dictionary.

• The result is a list. The first element of the list has the name type and is a character string specifying the missing value type: 'Discrete' for discrete numeric values, 'Range' for a range of values, 'Range Discrete' for a range of values and a single discrete value, and NULL for missing values of a string variable. The second element of the list has the name missing and is a vector containing the missing values. The content of the vector for the different missing value types is shown in the following table.

result$type | result$missing[1] | result$missing[2] | result$missing[3]
'Discrete' | Discrete value or NaN | Discrete value or NaN | Discrete value or NaN
'Range' | Start point of range | End point of range | NaN
'Range Discrete' | Start point of range | End point of range | Discrete value
NULL | Discrete value or NA | Discrete value or NA | Discrete value or NA

• For string variables, returned values are right-padded to the defined width of the string variable.

Example

#List all variables without user-missing values
nomissList <- vector()
dict <- spssdictionary.GetDictionaryFromSPSS()
varnames <- dict["varName",]
for (name in varnames){
   vals <- spssdictionary.GetUserMissingValues(name)
   if (is.nan(vals$missing[1]) | is.na(vals$missing[1]))
      nomissList <- c(nomissList,name)
}
{if (length(nomissList) > 0) {
   cat("Variables without user-missing values:\n")
   cat(nomissList,sep="\n")}
else
   cat("All variables have user-missing values")
}


spssdictionary.GetValueLabels Function (R)

spssdictionary functions,spssdictionary functions,spssdictionary functions
GetValueLabels,GetValueLabels,GetValueLabels
GetValueLabels,GetValueLabels,GetValueLabels
value labels,value labels,value labels
retrieving,retrieving,retrieving

spssdictionary.GetValueLabels(variable). Returns the value labels for the specified variable in the active dataset. The argument can be a character string specifying the variable name or an integer specifying the index value of the variable (index values represent position in the dataset, starting with 0 for the first variable in file order). Variable names must match case with the names as they exist in the active dataset's dictionary.

• The result is a list. The first element of the list is a vector of values that have associated labels. The second element of the list is a vector with the associated labels.

• If there are no value labels, the list contains empty vectors.

Example

List all variables without value labels.

*R_vars_no_value_labels.sps.
BEGIN PROGRAM R.
novallabelList <- vector()
dict <- spssdictionary.GetDictionaryFromSPSS()
varnames <- dict["varName",]
for (name in varnames){
   if (length(spssdictionary.GetValueLabels(name)$values)==0)
       novallabelList <- append(novallabelList,name)
}
{if (length(novallabelList) > 0) {
   cat("Variables without value labels:\n")
   cat(novallabelList,sep="\n")}
else
   cat("All variables have value labels")
}
END PROGRAM.


spssdictionary.GetVariableAttributeNames Function (R)

spssdictionary functions,spssdictionary functions,spssdictionary functions
GetVariableAttributeNames,GetVariableAttributeNames,GetVariableAttributeNames
GetVariableAttributeNames,GetVariableAttributeNames,GetVariableAttributeNames
variable attributes,variable attributes,variable attributes
retrieving,retrieving,retrieving

spssdictionary.GetVariableAttributeNames(variable). Returns the names of any variable attributes for the specified variable in the active dataset. The argument can be a character string specifying the variable name or an integer specifying the index value of the variable (index values represent position in the dataset, starting with 0 for the first variable in file order). Variable names must match case with the names as they exist in the active dataset's dictionary.

• The result is a vector of the attribute names.

• If there are no attributes for the specified variable, NULL is returned.

Example

#Create a list of variables that have a specified attribute
varList <- vector()
attribute <- "demographicvars"
dict <- spssdictionary.GetDictionaryFromSPSS()
varnames <- dict["varName",]
for (name in varnames){
   if (any(attribute==spssdictionary.GetVariableAttributeNames(name)))
       varList <- c(varList,name)
}
{if (length(varList) > 0){
   cat(paste("Variables with attribute ",attribute,":\n"))
   cat(varList,sep="\n")}
else
   cat(paste("No variables have the attribute ",attribute))
}

Related Topics

spssdictionary.GetVariableAttributes Function (R)


spssdictionary.GetVariableAttributes Function (R)

spssdictionary functions,spssdictionary functions,spssdictionary functions
GetVariableAttributes,GetVariableAttributes,GetVariableAttributes
GetVariableAttributes,GetVariableAttributes,GetVariableAttributes
variable attributes,variable attributes,variable attributes
retrieving,retrieving,retrieving

spssdictionary.GetVariableAttributes(variable,attrName). Returns the value(s) for the specified variable and attribute in the active dataset. The argument variable can be a character string specifying the variable name or an integer specifying the index value of the variable (index values represent position in the dataset, starting with 0 for the first variable in file order). Variable names must match case with the names as they exist in the active dataset's dictionary. The argument attrName is a character string that specifies the name of the attribute--for instance, a name returned by GetVariableAttributeNames.

• In the case that the specified attribute is an array, the returned value is a vector containing the attribute values.

Example

#Create a list of variables with a specified attribute and value
varList <- vector()
dict <- spssdictionary.GetDictionaryFromSPSS()
varnames <- dict["varName",]
attr <- "demographicvartypes"
val <- "2"
for (name in varnames){
   attrNames <- spssdictionary.GetVariableAttributeNames(name)
   if(any(attr==attrNames)){
      if(any(val==spssdictionary.GetVariableAttributes(name,attr)))
         varList <- c(varList,name)
   }
}
{if (length(varList) > 0){
   cat(paste("Variables with attribute value ",val,
             " for attribute ",attr,":\n"))
   cat(varList,sep="\n")}
else
   cat(paste("No variables have the attribute value ",val,
             " for attribute ",attr))
}

Related Topics

spssdictionary.GetVariableAttributeNames Function (R)


spssdictionary.GetVariableCount Function (R)

spssdictionary functions,spssdictionary functions,spssdictionary functions
GetVariableCount,GetVariableCount,GetVariableCount
GetVariableCount,GetVariableCount,GetVariableCount
variable count,variable count,variable count
number of variables,number of variables,number of variables

spssdictionary.GetVariableCount(). Returns the number of variables in the active dataset.

Example

nvars <- spssdictionary.GetVariableCount()


spssdictionary.GetVariableFormat Function (R)

spssdictionary functions,spssdictionary functions,spssdictionary functions
GetVariableFormat,GetVariableFormat,GetVariableFormat
GetVariableFormat,GetVariableFormat,GetVariableFormat
variable format,variable format,variable format
format of variables,format of variables,format of variables

spssdictionary.GetVariableFormat(variable). Returns a string containing the display format for the specified variable in the active dataset. The argument is the name of the variable in quotes or the index value of the variable. Index values represent position in the active dataset, starting with 0 for the first variable in file order.

• The character portion of the format string is always returned in all upper case.

• Each format string contains a numeric component after the format name that indicates the defined width, and optionally, the number of decimal positions for numeric formats. For example, A4 is a string format with a maximum width of four bytes, and F8.2 is a standard numeric format with a display format of eight digits, including two decimal positions and a decimal indicator.

The supported format types are listed in Variable Format Types. To obtain the type code shown in the table, use the GetVariableFormatType function.

Example

varformat <- spssdictionary.GetVariableFormat(0)

Related Topics

spssdictionary.GetVariableFormatType Function (R)


spssdictionary.GetVariableFormatType Function (R)

spssdictionary functions,spssdictionary functions,spssdictionary functions
GetVariableFormatType,GetVariableFormatType,GetVariableFormatType
GetVariableFormatType,GetVariableFormatType,GetVariableFormatType
variable format,variable format,variable format
format of variables,format of variables,format of variables

spssdictionary.GetVariableFormatType(variable). Returns the integer type code associated with the display format for the specified variable in the active dataset. The argument is the name of the variable in quotes or the index value of the variable. Index values represent position in the active dataset, starting with 0 for the first variable in file order.

• The supported format types are listed in Variable Format Types. To obtain the string associated with the type code shown in the table, use the GetVariableFormat function.

Example

varformat <- spssdictionary.GetVariableFormat(0)

Related Topics

spssdictionary.GetVariableFormat Function (R)


spssdictionary.GetVariableLabel Function (R)

spssdictionary functions,spssdictionary functions,spssdictionary functions
GetVariableLabel,GetVariableLabel,GetVariableLabel
GetVariableLabel,GetVariableLabel,GetVariableLabel
variable label,variable label,variable label
labels,labels,labels
variable,variable,variable

spssdictionary.GetVariableLabel(variable). Returns a character string containing the variable label for the specified variable in the active dataset . The argument is the name of the variable in quotes or the index value of the variable. Index values represent position in the active dataset, starting with 0 for the first variable in file order. If the variable does not have a defined variable label, a null string is returned.

Example

varlabel <- spssdictionary.GetVariableLabel("mpg")


spssdictionary.GetVariableMeasurementLevel Function (R)

spssdictionary functions,spssdictionary functions,spssdictionary functions
GetVariableMeasurementLevel,GetVariableMeasurementLevel,GetVariableMeasurementLevel
GetVariableMeasurementLevel,GetVariableMeasurementLevel,GetVariableMeasurementLevel
measurement level,measurement level,measurement level
unknown measurement level,unknown measurement level,unknown measurement level

spssdictionary.GetVariableMeasurementLevel(variable). Returns a string value that indicates the measurement level for the specified variable in the active dataset. The argument is the name of the variable in quotes or the index value of the variable. Index values represent position in the active dataset, starting with 0 for the first variable in file order. The value returned can be: "nominal", "ordinal", "scale", or "unknown".

• "Unknown" occurs only for numeric variables prior to the first data pass when the measurement level has not been explicitly set, such as data read from an external source or newly created variables. The measurement level for string variables is always known.

Example

varlevel <- spssdictionary.GetVariableMeasurementLevel(0)


spssdictionary.GetVariableName Function (R)

spssdictionary functions,spssdictionary functions,spssdictionary functions
GetVariableName,GetVariableName,GetVariableName
GetVariableName,GetVariableName,GetVariableName
variable names,variable names,variable names
names of variables,names of variables,names of variables

spssdictionary.GetVariableName(index). Returns a character string containing the variable name for the variable in the active dataset indicated by the index value. The argument is the index value of the variable. Index values represent position in the active dataset, starting with 0 for the first variable in file order.

Example

firstvar <- spssdictionary.GetVariableName(0)


spssdictionary.GetVariableType Function (R)

spssdictionary functions,spssdictionary functions,spssdictionary functions
GetVariableType,GetVariableType,GetVariableType
GetVariableType,GetVariableType,GetVariableType
string variables,string variables,string variables
numeric variables,numeric variables,numeric variables
data types,data types,data types

spssdictionary.GetVariableType(variable). Returns 0 for numeric variables or the defined length for string variables for the specified variable in the active dataset. The argument is the name of the variable in quotes or the index value of the variable. Index values represent position in the active dataset, starting with 0 for the first variable in file order.

Example

vartype <- spssdictionary.GetVariableType(0)


spssdictionary.GetWeightVariable Function (R)

spssdictionary functions,spssdictionary functions,spssdictionary functions
GetWeightVariable,GetWeightVariable,GetWeightVariable
GetWeightVariable,GetWeightVariable,GetWeightVariable
weight variable,weight variable,weight variable

spssdictionary.GetWeightVariable(). Returns the name of the weight variable, or NULL if unweighted.

Example

{if (spssdictionary.IsWeighting())
   cat(paste("The weight variable is: ",spssdictionary.GetWeightVariable()))
else
   cat("Weighting is not in effect")}

Related Topics

spssdictionary.IsWeighting Function (R)


spssdictionary.IsWeighting Function (R)

spssdictionary functions,spssdictionary functions,spssdictionary functions
IsWeighting,IsWeighting,IsWeighting
IsWeighting,IsWeighting,IsWeighting
weight variable,weight variable,weight variable

spssdictionary.IsWeighting(). Indicates if weighting is in effect for the active dataset. The result is a logical value--TRUE if weighting is in effect, otherwise FALSE.

Example

{if (spssdictionary.IsWeighting())
   cat("Weighting is in effect")
else
   cat("Weighting is not in effect")
}

Related Topics

spssdictionary.GetWeightVariable Function (R)


spssdictionary.SetActive Function (R)

spssdictionary functions,spssdictionary functions,spssdictionary functions
SetActive,SetActive,SetActive
SetActive,SetActive,SetActive

spssdictionary.SetActive(datasetName). Sets the specified dataset as the active dataset. This function can only be called during the process of creating a new PASW Statistics dataset. When used, this function must be called prior to calling EndDataStep.

Related Topics

Writing Results to a New PASW Statistics Dataset (R)
spssdictionary.SetDictionaryToSPSS Function (R)


spssdictionary.SetDataFileAttributes Function (R)

spssdictionary functions,spssdictionary functions,spssdictionary functions
SetDataFileAttributes,SetDataFileAttributes,SetDataFileAttributes
SetDataFileAttributes,SetDataFileAttributes,SetDataFileAttributes
datafile attributes,datafile attributes,datafile attributes
adding,adding,adding

spssdictionary.SetDataFileAttributes(datasetName,attr1,...,attrN). Sets datafile attributes. This function is used to define datafile attributes for new PASW Statistics datasets created with the SetDictionaryToSPSS function.

• The argument datasetName is the name of the PASW Statistics dataset as specified on the call to the SetDictionaryToSPSS function used to create the dataset.

• The arguments attr1,...,attrN specify the attributes and are of the form attrName=attrValue, where attrName is the name of the attribute and attrValue is either a single character value or a character vector. Specifying a vector results in an attribute array.

• The SetDataFileAttributes function should be called after SetDictionaryToSPSS and before calling EndDataStep.

Example

spssdictionary.SetDataFileAttributes("results",ver="1",Date="7/20/2007")


spssdictionary.SetDictionaryToSPSS Function (R)

spssdictionary functions,spssdictionary functions,spssdictionary functions
SetDictionaryToSPSS,SetDictionaryToSPSS,SetDictionaryToSPSS
SetDictionaryToSPSS,SetDictionaryToSPSS,SetDictionaryToSPSS
data,data,data
creating PASW Statistics datasets,creating PASW Statistics datasets,creating PASW Statistics datasets

spssdictionary.SetDictionaryToSPSS(datasetName,x,categoryDictionary,hidden). Creates a new PASW Statistics dataset with a specified dictionary.

• The argument datasetName specifies the name of the PASW Statistics dataset to be created, and cannot be the name of an existing dataset.

• The argument x is a data frame representing the dictionary and must be an object created by either the CreateSPSSDictionary function or the GetDictionaryFromSPSS function.

• The optional argument categoryDictionary specifies the name of a category dictionary created with the GetCategoricalDictionaryFromSPSS function. Category dictionaries are for use when retrieving categorical variables (variables with a measurement level of "nominal" or "ordinal") into labeled R factors (factorMode="labels" in GetDataFromSPSS), with the intention of writing those factors to a new dataset. The value labels of the original categorical variables are automatically added to the new dataset.

• The optional argument hidden specifies whether the Data Editor window associated with the new dataset is hidden--by default, it is displayed. Use hidden=TRUE to hide the associated Data Editor window.

• The resulting PASW Statistics dataset is NOT set to be the active dataset. To make a new dataset the active one, use the SetActive function or the DATASET ACTIVATE command (outside of the program block that calls SetDictionaryToSPSS).

Examples of using the SetDictionaryToSPSS function are best understood in the context of creating a new dataset. See the topic Writing Results to a New PASW Statistics Dataset (R) for more information.

Related Topics

Writing Results to a New PASW Statistics Dataset (R)
spssdata.SetDataToSPSS Function (R)
spssdictionary.EditCategoricalDictionary Function (R)
spssdictionary.GetCategoricalDictionaryFromSPSS Function (R)
spssdictionary.CreateSPSSDictionary Function (R)


spssdictionary.SetMultiResponseSet Function (R)

spssdictionary functions,spssdictionary functions,spssdictionary functions
SetMultiResponseSet,SetMultiResponseSet,SetMultiResponseSet
SetMultiResponseSet,SetMultiResponseSet,SetMultiResponseSet

spssdictionary.SetMultiResponseSet(datasetName,mrsetName,mrsetLabel,codeAs,countedValue,elementaryVars). Defines multiple response sets. This function is used to define multiple response sets for new PASW Statistics datasets created with the SetDictionaryToSPSS function.

• The argument datasetName is the name of the PASW Statistics dataset as specified on the call to the SetDictionaryToSPSS function used to create the dataset.

• The argument mrsetName is the name of the multiple response set and is a string of maximum length 63 bytes that must follow PASW Statistics variable naming conventions. If the specified name does not begin with a dollar sign ($), then one is added. If the name refers to an existing set, the set definition is overwritten.

• The optional argument mrsetLabel is a string specifying a label for the set, and cannot be wider than the limit for PASW Statistics variable labels.

• The argument codeAs specifies the variable coding and must be "Dichotomies" (multiple dichotomy set) or "Categories" (multiple category set).

• The argument countedValue specifies the value that indicates the presence of a response for a multiple dichotomy set. This is also referred to as the “counted” value. If the set type is numeric, the value can be an integer or a string respresentation of an integer. If the set type is string, the value, after trimming trailing blanks, cannot be wider than the narrowest elementary variable. countedValue is required if codeAs has the value "Dichotomies" and is ignored otherwise.

• The argument elementaryVars is a character vector specifying the list of elementary variables that define the set (the list must include at least two variables). Variables can be specified by name or index value (index values represent position in the dataset, starting with 0 for the first variable in file order). When specifying variable names, you can use TO to indicate a range of variables--for example, elementaryVars=c("mpg TO weight") specifies mpg, weight, and all variables between them in the active dataset's dictionary. Variable names must match case with the names as they exist in the active dataset's dictionary. All specified variables must be of the same type (numeric or string).

• The SetMultiResponseSet function should be called after SetDictionaryToSPSS and before calling EndDataStep.

Example

var1 <- c("Newspaper","",0,"F1","scale")
var2 <- c("TV","",0,"F1","scale")
var3 <- c("Web","",0,"F1","scale")
dict <- spssdictionary.CreateSPSSDictionary(var1,var2,var3)
spssdictionary.SetDictionaryToSPSS("results",dict)
spssdictionary.SetMultiResponseSet(datasetName="results",
                                   mrsetName="$mltnews",
                                   mrsetLabel="News Sources",
                                   codeAs="Dichotomies",
                                   countedValue=1,
                                   elementaryVars=c("Newspaper","TV","Web"))
spssdictionary.EndDataStep()


spssdictionary.SetUserMissing Function (R)

spssdictionary functions,spssdictionary functions,spssdictionary functions
SetUserMissing,SetUserMissing,SetUserMissing
SetUserMissing,SetUserMissing,SetUserMissing
missing values,missing values,missing values
setting missing values,setting missing values,setting missing values

spssdictionary.SetUserMissing(datasetName,variable,format,missings). Sets user-missing values for a specified variable. This function is used to define user-missing values for new PASW Statistics datasets created with the SetDictionaryToSPSS function.

• The argument datasetName is the name of the PASW Statistics dataset as specified on the call to the SetDictionaryToSPSS function used to create the dataset.

• The argument variable can be a character string specifying the variable name or an integer specifying the index value of the variable (index values represent position in the dataset, starting with 0 for the first variable in file order). Variable names must match case with the names as they exist in the active dataset's dictionary.

• The argument format specifies the missing value type: missingFormat['Discrete'] for discrete values, missingFormat['Range'] for a range of numeric values, and missingFormat['Range Discrete'] for a range of numeric values and a single discrete numeric value.

• The argument missings is a vector specifying the missing values. The content of the vector for the different missing value types is shown in the following table.

format | missingvals[1] | missingvals[2] | missingvals[3]
missingFormat['Discrete'] | Discrete value (optional) | Discrete value (optional) | Discrete value (optional)
missingFormat['Range'] | Start point of range | End point of range | Not applicable
missingFormat['Range Discrete'] | Start point of range | End point of range | Discrete value

• Missing values for string variables cannot exceed 8 bytes. (There is no limit on the defined width of the string variable, but defined missing values cannot exceed 8 bytes.)

• The SetUserMissing function should be called after SetDictionaryToSPSS and before calling EndDataStep.

Examples

Specify the three discrete missing values 0, 9, and 99 for a new numeric variable.

spssdictionary.SetUserMissing("results","newvar",
                               missingFormat["Discrete"],c(0,9,99))

Specify the range of missing values 9–99 for a new numeric variable.

spssdictionary.SetUserMissing("results","newvar",
                               missingFormat["Range"],c(9,99))

Specify the range of missing values 9–99 and the discrete missing value 0 for a new numeric variable.

spssdictionary.SetUserMissing("results","newvar",
                               missingFormat["Range Discrete"],c(9,99,0))

Specify missing values for a new string variable.

spssdictionary.SetUserMissing("results","newvar",
                               missingFormat["Discrete"],c(' ','NA'))


spssdictionary.SetValueLabel Function (R)

spssdictionary functions,spssdictionary functions,spssdictionary functions
SetValueLabel,SetValueLabel,SetValueLabel
SetValueLabel,SetValueLabel,SetValueLabel
value labels,value labels,value labels
adding,adding,adding

spssdictionary.SetValueLabel(datasetName,variable,values,labels). Sets the value labels for a specified variable. This function is used to define value labels for new PASW Statistics datasets created with the SetDictionaryToSPSS function.

• The argument datasetName is the name of the PASW Statistics dataset as specified on the call to the SetDictionaryToSPSS function used to create the dataset.

• The argument variable can be a character string specifying the variable name or an integer specifying the index value of the variable (index values represent position in the dataset, starting with 0 for the first variable in file order). Variable names must match case with the names as they exist in the active dataset's dictionary.

• The argument values is a vector specifying the values for which labels will be set.

• The argument labels is a vector specifying the labels corresponding to the elements of values.

• The SetValueLabel function should be called after SetDictionaryToSPSS and before calling EndDataStep.

Example

values <- c(0,1)
labels <- c("m","f")
spssdictionary.SetValueLabel("results","newvar",values,labels)


spssdictionary.SetVariableAttributes Function (R)

spssdictionary functions,spssdictionary functions,spssdictionary functions
SetVariableAttributes,SetVariableAttributes,SetVariableAttributes
SetVariableAttributes,SetVariableAttributes,SetVariableAttributes
variable attributes,variable attributes,variable attributes
adding,adding,adding

spssdictionary.SetVariableAttributes(datasetName,variable.attr1,...,attrN). Sets the variable attributes for a specified variable. This function is used to define custom variable attributes for new PASW Statistics datasets created with the SetDictionaryToSPSS function.

• The argument datasetName is the name of the PASW Statistics dataset as specified on the call to the SetDictionaryToSPSS function used to create the dataset.

• The argument variable can be a character string specifying the variable name or an integer specifying the index value of the variable (index values represent position in the dataset, starting with 0 for the first variable in file order). Variable names must match case with the names as they exist in the active dataset's dictionary.

• The arguments attr1,...,attrN specify the attributes and are of the form attrName=attrValue, where attrName is the name of the attribute and attrValue is either a single character value or a character vector. Specifying a vector results in an attribute array.

• The SetVariableAttributes function should be called after SetDictionaryToSPSS and before calling EndDataStep.

Example

spssdictionary.SetVariableAttributes("results","Gender",DemographicVars="1",
                                      Binary="Yes")


spsspivottable.Display Function (R)

spsspivottable.Display,spsspivottable.Display,spsspivottable.Display

The spsspivottable.Display function provides the ability to render tabular output from R as a pivot table that can be displayed in the PASW Statistics Viewer or written to an external file using the PASW Statistics Output Management System.

• By default, the name that appears in the outline pane of the Viewer associated with the pivot table is R. You can customize the name and nest multiple pivot tables under a common heading by wrapping the pivot table generation in a StartProcedure-EndProcedure block. See the topic spsspkg.StartProcedure Function (R) for more information.

• The spsspivottable.Display function is limited to pivot tables with one row dimension and one column dimension. To create more complex pivot tables, use the BasePivotTable class.

spsspivottable.Display(x,title,templateName,outline,caption,isSplit,rowdim,coldim,hiderowdimtitle, hiderowdimlabel,hidecoldimtitle,hidecoldimlabel,rowlabels,collabels,format). Creates a pivot table with one row dimension and one column dimension. All arguments other than x are optional.

• x. The data to be displayed as a pivot table. It may be a data frame, matrix, table, or any R object that can be converted to a data frame.

• title. A character string that specifies the title that appears with the table. The default is "Rtable".

• templateName. A character string that specifies the OMS (Output Management System) table subtype for this table. It must begin with a letter and have a maximum of 64 bytes. The default is "Rtable". Unless you are routing this pivot table with OMS and need to distinguish subtypes you do not need to specify a value.

When routing pivot table output from R using OMS, the command name associated with this output is R by default, as in COMMANDS=['R'] for the COMMANDS keyword on the OMS command. If you wrap the pivot table output in a StartProcedure-EndProcedure block, then use the name specified in the StartProcedure call as the command name. See the topic spsspkg.StartProcedure Function (R) for more information.

• outline. A character string that specifies a title, for the pivot table, that appears in the outline pane of the Viewer. The item for the table itself will be placed one level deeper than the item for the outline title. If omitted, the Viewer item for the table will be placed one level deeper than the root item for the output containing the table.

• caption. A character string that specifies a table caption.

• isSplit. A logical value (TRUE or FALSE) specifying whether to enable split file processing for the table. The default is TRUE. Split file processing refers to whether results from different split groups are displayed in separate tables or in the same table but grouped by split, and is controlled by the SPLIT FILE command.

When retrieving data with spssdata.GetSplitDataFromSPSS, call spsspivottable.Display with the results for each split group. The results from each split group are accumulated and the subsequent table(s) are displayed when spssdata.CloseDataConnection is called.

• rowdim. A character string specifying a title for the row dimension. The default is "row".

• coldim. A character string specifying a title for the column dimension. The default is "column".

• hiderowdimtitle. A logical value (TRUE or FALSE) specifying whether to hide the row dimension title. The default is TRUE.

• hiderowdimlabel. A logical value specifying whether to hide the row labels. The default is FALSE.

• hidecoldimtitle. A logical value specifying whether to hide the column dimension title. The default is TRUE.

• hidecoldimlabel. A logical value specifying whether to hide the column labels. The default is FALSE.

• rowlabels. A numeric or character vector specifying the row labels. If provided, the length of the vector must equal the number of rows in the argument x. If omitted, the row names of x will be used. If x does not have row names, the labels "row1", "row2", etc., will be used. If a numeric vector is provided, the row labels will have the format specified by the argument format.

• collabels. A numeric or character vector specifying the column labels. If provided, the length of the vector must equal the number of columns in the argument x. If omitted, the column names of x will be used. If x does not have column names, the labels "col1", "col2", etc., will be used. If a numeric vector is provided, the column labels will have the format specified by the argument format.

• format. Specifies the format to be used for displaying numeric values, including cell values, row labels, and column labels. The argument format is of the form formatSpec.format where format is one of those listed in the table below--for example, formatSpec.Correlation. You can also specify an integer code for format, as in the value 3 for Correlation. The default format is GeneralStat.

Example

BEGIN PROGRAM R.
demo <- data.frame(A=c("1A","2A"),B=c("1B","2B"),row.names=c(1,2))
spsspivottable.Display(demo,
                       title="Sample Pivot Table",
                       rowdim="Row",
                       hiderowdimtitle=FALSE,
                       coldim="Column",
                       hidecoldimtitle=FALSE)
END PROGRAM.

Result

Sample Pivot Table
Numeric Formats Collapse Hide details

Numeric Formats

Format name | Code
Coefficient | 0
CoefficientSE | 1
CoefficientVar | 2
Correlation | 3
GeneralStat | 4
Count | 6
Percent | 7
PercentNoSign | 8
Proportion | 9
Significance | 10
Residual | 11
Suggestions for Choosing a Format Collapse Hide details

Suggestions for Choosing a Format

• Consider using Coefficient for unbounded, unstandardized statistics; for instance, beta coefficients in regression.

• Correlation is appropriate for statistics bounded by –1 and 1 (typically correlations or measures of association).

• Consider using GeneralStat for unbounded, scale-free statistics; for instance, beta coefficients in regression.

• Count is appropriate for counts and other integers such as integer degrees of freedom.

• Percent and PercentNoSign are both appropriate for percentages. PercentNoSign results in a value without a percentage symbol (%).

• Significance is appropriate for statistics bounded by 0 and 1 (for example, significance levels).

• Consider using Residual for residuals from cell counts.

Related Topics

Creating Pivot Table Output (R)
BasePivotTable Class (R)
spsspkg.StartProcedure Function (R)
TextBlock Class (R)


spsspkg.EndProcedure Function (R)

spsspkg functions,spsspkg functions,spsspkg functions
EndProcedure,EndProcedure,EndProcedure
EndProcedure,EndProcedure,EndProcedure

spsspkg.EndProcedure(). Signals the end of pivot table or text block output.

• The EndProcedure function must be called to end output initiated with the StartProcedure function.

Related Topics

spsspkg.StartProcedure Function (R)


spsspkg.GetOutputLanguage Function (R)

spsspkg functions,spsspkg functions,spsspkg functions
GetOutputLanguage,GetOutputLanguage,GetOutputLanguage
GetOutputLanguage,GetOutputLanguage,GetOutputLanguage

spsspkg.GetOutputLanguage(). Returns the current PASW Statistics output language. The value is one of the following strings: "English", "French", "German", "Italian", "Japanese", "Korean", "Polish", "Russian", "SChinese", "Spanish", or "TChinese".

Example

lang <- spsspkg.GetOutputLanguage()

Related Topics

spsspkg.GetSPSSLocale Function (R)
spsspkg.SetOutputLanguage Function (R)


spsspkg.GetSPSSLocale Function (R)

spsspkg functions,spsspkg functions,spsspkg functions
GetSPSSLocale,GetSPSSLocale,GetSPSSLocale
GetSPSSLocale,GetSPSSLocale,GetSPSSLocale

spsspkg.GetSPSSLocale(). Returns the current PASW Statistics locale.

Example

locale <- spsspkg.GetSPSSLocale()

Related Topics

spsspkg.GetOutputLanguage Function (R)
spsspkg.SetOutputLanguage Function (R)


spsspkg.GetSPSSPlugInVersion Function (R)

spsspkg functions,spsspkg functions,spsspkg functions
GetSPSSPlugInVersion,GetSPSSPlugInVersion,GetSPSSPlugInVersion
GetSPSSPlugInVersion,GetSPSSPlugInVersion,GetSPSSPlugInVersion

spsspkg.GetSPSSPlugInVersion(). Returns the current version of the PASW Statistics-R Integration Plug-in.

Example

pluginVer <- spsspkg.GetSPSSPlugInVersion()

Related Topics

spsspkg.GetSPSSVersion Function (R)
spsspkg.Version Function (R)


spsspkg.GetSPSSVersion Function (R)

spsspkg functions,spsspkg functions,spsspkg functions
GetSPSSVersion,GetSPSSVersion,GetSPSSVersion
GetSPSSVersion,GetSPSSVersion,GetSPSSVersion

spsspkg.GetSPSSVersion(). Returns the current PASW Statistics version.

Example

version <- spsspkg.GetSPSSVersion()

Related Topics

spsspkg.GetSPSSPlugInVersion Function (R)
spsspkg.Version Function (R)


spsspkg.GetStatisticsPath Function (R)

spsspkg functions,spsspkg functions,spsspkg functions
GetStatisticsPath,GetStatisticsPath,GetStatisticsPath
GetStatisticsPath,GetStatisticsPath,GetStatisticsPath

spsspkg.GetStatisticsPath(). Returns the path to the installation location of the current instance of PASW Statistics.

Example

path <- spsspkg.GetStatisticsPath()


spsspkg.processcmd Function (R)

spsspkg functions,spsspkg functions,spsspkg functions
processcmd,processcmd,processcmd
processcmd,processcmd,processcmd

spsspkg.processcmd(oobj,myArgs,f,excludedargs). Parses the values passed to the Run function associated with an extension command, and executes the implementation function.

• The argument oobj is a value returned by the Syntax function. It contains all of the information needed to parse the values passed to the Run function associated with an extension command.

• The argument myArgs should be specified as:

myArgs = args[[2]]

where args is the argument passed to the Run function. myArgs contains the run-time values of the keywords associated with the extension command.

• The argument f is the name of a function that implements the extension command.

• The argument excludedargs is an optional list of arguments to be ignored when checking for arguments required by the implementation function f.

Note: The spsspkg.processcmd function is used in conjunction with the implementation code for an extension command implemented in R. It is not for use within a BEGIN PROGRAM R-END PROGRAM block. Specifically, it is for use in the Run function that implements the extension command.

Show me

Related Topics

spsspkg.Syntax Function (R)
spsspkg.Template Function (R)


spsspkg.SetOutput Function (R)

spsspkg functions,spsspkg functions,spsspkg functions
SetOutput,SetOutput,SetOutput
SetOutput,SetOutput,SetOutput

spsspkg.SetOutput("value"). Specifies whether output from R is displayed in the PASW Statistics Viewer. This applies to explicit output from R, such as from the print function. It also applies to graphical output, such as from the R plot function. The value of the argument is a quoted string: "ON" to display output from R, "OFF" to suppress the display of output from R. The default is "ON".

• The setting persists for the current PASW Statistics session.

• It is important to note the interaction of the spsspkg.SetOutput function and the spssRGraphics.SetOutput function. With spsspkg.SetOutput("ON") you can turn off display of graphics with spssRGraphics.SetOutput("OFF"). spsspkg.SetOutput("OFF"), however, applies to all output and overrides spssRGraphics.SetOutput("ON").

Example

spsspkg.SetOutput("OFF")

Related Topics

spssRGraphics.SetOutput Function (R)


spsspkg.SetOutputLanguage Function (R)

spsspkg functions,spsspkg functions,spsspkg functions
SetOutputLanguage,SetOutputLanguage,SetOutputLanguage
SetOutputLanguage,SetOutputLanguage,SetOutputLanguage

spsspkg.SetOutputLanguage("language"). Sets the language that is used in PASW Statistics output. The argument is a quoted string specifying one of the following languages: "English", "French", "German", "Italian", "Japanese", "Korean", "Polish", "Russian", "Simplified Chinese", "Spanish", or "Traditional Chinese".

Example

spsspkg.SetOutputLanguage('German')

Related Topics

spsspkg.GetOutputLanguage Function (R)
spsspkg.GetSPSSLocale Function (R)


spsspkg.StartProcedure Function (R)

spsspkg functions,spsspkg functions,spsspkg functions
StartProcedure,StartProcedure,StartProcedure
StartProcedure,StartProcedure,StartProcedure

spsspkg.StartProcedure(pName). Signals the beginning of pivot table or text block output. The StartProcedure-EndProcedure block is used to group output under a common heading, as is typical for output associated with a given procedure. The argument pName is a string and is the name that appears in the outline pane of the Viewer associated with the output. It is also the command name associated with this output when routing it with OMS (Output Management System), as used in the COMMANDS keyword of the OMS command.

• You can include multiple pivot tables and text blocks in a given StartProcedure-EndProcedure block.

• In order that names associated with output not conflict with names of existing PASW Statistics commands (when working with OMS), you may consider using names of the form yourorganization.com.procedurename.

• Call the EndProcedure function to signal the end of pivot table or text block output.

Example

BEGIN PROGRAM R.
spsspkg.StartProcedure("MyProcedure")
demo <- data.frame(A=c("1A","2A"),B=c("1B","2B"),row.names=c(1,2))
spsspivottable.Display(demo,
                       title="Sample Pivot Table",
                       rowdim="Row",
                       hiderowdimtitle=FALSE,
                       coldim="Column",
                       hidecoldimtitle=FALSE)
spsspkg.EndProcedure()
END PROGRAM.

Related Topics

BasePivotTable Class (R)
spsspivottable.Display Function (R)
TextBlock Class (R)
spsspkg.EndProcedure Function (R)


spsspkg.Syntax Function (R)

spsspkg functions,spsspkg functions,spsspkg functions
Syntax function,Syntax function,Syntax function
Syntax function,Syntax function,Syntax function
extension commands,extension commands,extension commands
parsing command syntax,parsing command syntax,parsing command syntax

spsspkg.Syntax(templ). Validates values passed to the Run function of an extension command, according to the specified template. The argument is a list of TemplateClass objects, created with the spsspkg.Template function. The list should include a TemplateClass object for each possible keyword associated with the syntax for the extension command.

Example

As an example, consider an extension command named MYCOMMAND with the following syntax chart:

MYCOMMAND VARIABLES=variable list
[/OPTIONS [MISSING={LISTWISE*}] ]
                   {FAIL     }

The associated specification for the spsspkg.Syntax function is:

oobj<-spsspkg.Syntax(templ=list(
   spsspkg.Template("VARIABLES",subc="",var="vars",ktype="existingvarlist",islist=TRUE),
   spsspkg.Template("MISSING",subc="OPTIONS",var="missing",ktype="str")
             ))

Note: The spsspkg.Syntax function is used in conjunction with the implementation code for an extension command implemented in R. It is not for use within a BEGIN PROGRAM R-END PROGRAM block. Specifically, it is for use in the Run function that implements the extension command.

Show me

Related Topics

spsspkg.processcmd Function (R)
spsspkg.Template Function (R)


spsspkg.Template Function (R)

spsspkg functions,spsspkg functions,spsspkg functions
Template function,Template function,Template function
Template function,Template function,Template function

spsspkg.Template(kwd,subc,var,ktype,islist,vallist). Creates the template for a specified keyword associated with the syntax for an extension command. The template for a keyword specifies the details needed to process the value (of this keyword) passed to the Run function. The result is a TemplateClass object for use with the Syntax function.

• The argument kwd specifies the name of the keyword (in uppercase) as it appears in the command syntax for the extension command.

• The argument subc specifies the name of the subcommand (in uppercase) that contains the keyword. If the keyword belongs to the anonymous subcommand, the argument can be omitted or set to the empty string. The anonymous subcommand is an unnamed subcommand (there can be only one per extension command) and is used to handle keywords that are not part of an explicit subcommand.

• The argument var specifies the name of the R variable that receives the value specified for the keyword. If var is omitted, the lowercase value of kwd is used.

• The argument ktype specifies the type of keyword, such as whether the keyword specifies a variable name, a string, or a floating point number. The following values are allowed:

bool. Accepts values of true, false, yes, or no and converts them into the corresponding boolean values of TRUE or FALSE. If the keyword is declared as LeadingToken in the XML specification of the extension command and treated as bool here, then the presence or absense of the keyword maps to TRUE or FALSE.

str. A string or quoted literal or list of either. Values are always converted to lower case. You can use the vallist argument to specify a set of allowed values.

int. An integer or list of integers with optional range constraints that you can specify in the vallist argument.

float. A real number or list of real numbers with optional range constraints that you can specify in the vallist argument.

literal. An arbitrary string or list of strings with no case conversion or validation.

varname. An arbitrary, unvalidated variable name (or syntactical equivalent such as a dataset name) or list of variable names with no case conversion.

existingvarlist. A list of variable names that are validated against the variables in the active dataset. Set islist to TRUE when using existingvarlist. Supports the PASW StatisticsTO and ALL keywords for variable lists. To use TO and ALL, specify the associated keyword as parameter type TokenList in the XML specification for the extension command.

• The argument islist is a boolean (TRUE or FALSE) specifying whether the keyword contains a list of values. The default is FALSE.

• The argument vallist is an R list, specifying a set of allowed values. For a keyword of type str, values are checked in uppercase. For keywords of types int and float, vallist is a 2-element list specifying the lower and upper bounds of the range of allowed values. To specify only an upper bound, use a lower bound of -Inf. To specify only a lower bound, use an upper bound of Inf.

Note: The spsspkg.Template function is used in conjunction with the implementation code for an extension command implemented in R. It is not for use within a BEGIN PROGRAM R-END PROGRAM block. Specifically, it is for use in the Run function that implements the extension command.

Show me

Related Topics

spsspkg.processcmd Function (R)
spsspkg.Syntax Function (R)


spsspkg.Version Function (R)

spsspkg functions,spsspkg functions,spsspkg functions
Version,Version,Version
Version,Version,Version

spsspkg.Version(). Returns the current version of the PASW Statistics-R Integration Plug-in, including the bug fix version and system information.

Example

spsspkg.Version()

Related Topics

spsspkg.GetSPSSPlugInVersion Function (R)
spsspkg.GetSPSSVersion Function (R)


spssRGraphics Functions (R)

spssRGraphics functions,spssRGraphics functions,spssRGraphics functions

The spssRGraphics group of functions manage the display of graphical output from R in the PASW Statistics Viewer. By default, graphical output from R--for instance, from the R plot function--is displayed in the PASW Statistics Viewer.

Related Topics

Displaying Graphical Output from R
spssRGraphics.SetOutput Function (R)
spssRGraphics.Submit Function (R)


spssRGraphics.Submit Function (R)

spssRGraphics functions,spssRGraphics functions,spssRGraphics functions
Submit,Submit,Submit
Submit,Submit,Submit

spssRGraphics.Submit(filename). Displays a specified R graphic in the PASW Statistics Viewer. The argument is a character string specifying the path to a graphic file. The supported formats for the graphic file are: png, jpg and bmp.

Example

spssRGraphics.Submit("/plots/myplot.jpg")

Note: Since escape sequences in the R programming language begin with a backslash (\)--such as \n for newline and \t for tab--it is recommended to use forward slashes (/) in file specifications on Windows. In this regard, PASW Statistics always accepts a forward slash in file specifications.


spssRGraphics.SetOutput Function (R)

spssRGraphics functions,spssRGraphics functions,spssRGraphics functions
SetOutput,SetOutput,SetOutput
SetOutput,SetOutput,SetOutput

spssRGraphics.SetOutput("value"). Controls whether graphical output from R is displayed in the PASW Statistics Viewer. The value of the argument is a quoted string: "ON" to display graphical output from R, "OFF" to suppress the display of graphical output from R. The default is "ON".

• It is important to note the interaction of the spssRGraphics.SetOutput function and the spsspkg.SetOutput function. With spsspkg.SetOutput("ON") you can turn off display of graphics with spssRGraphics.SetOutput("OFF"). spsspkg.SetOutput("OFF"), however, applies to all output and overrides spssRGraphics.SetOutput("ON").

Example

spssRGraphics.SetOutput("OFF")

Related Topics

spsspkg.SetOutput Function (R)


spssxmlworkspace Functions (R)

spssxmlworkspace functions,spssxmlworkspace functions,spssxmlworkspace functions
XML workspace,XML workspace,XML workspace

The spssxmlworkspace group of functions provides tools for working with the XML workspace--an in-memory workspace where you can store (and then retrieve) XML representations of output from PASW Statistics commands as well as an XML representation of the active dataset's dictionary.

Related Topics

spssxmlworkspace.GetHandleList Function (R)
spssxmlworkspace.DeleteXmlWorkspaceObject Function (R)
spssxmlworkspace.EvaluateXPath Function (R)
spssxmlworkspace.CreateXPathDictionary Function (R)


spssxmlworkspace.CreateXPathDictionary Function (R)

spssxmlworkspace functions,spssxmlworkspace functions,spssxmlworkspace functions
CreateXPathDictionary,CreateXPathDictionary,CreateXPathDictionary
CreateXPathDictionary,CreateXPathDictionary,CreateXPathDictionary
dictionary,dictionary,dictionary
CreateXPathDictionary,CreateXPathDictionary,CreateXPathDictionary

spssxmlworkspace.CreateXPathDictionary(handle). Creates an XPath dictionary DOM, for the active PASW Statistics dataset, that can be accessed with XPath expressions. The argument is a name used to identify this DOM in any subsequent EvaluateXPath and DeleteXmlWorkspaceObject function calls.

Example

handle <- "demo"
spssxmlworkspace.CreateXPathDictionary(handle)

• The XPath dictionary DOM for the active dataset is assigned the handle name demo. Any subsequent EvaluateXPath or DeleteXmlWorkspaceObject function calls that reference this dictionary DOM must use this handle name.


spssxmlworkspace.DeleteXmlWorkspaceObject Function (R)

spssxmlworkspace functions,spssxmlworkspace functions,spssxmlworkspace functions
DeleteXmlWorkspaceObject,DeleteXmlWorkspaceObject,DeleteXmlWorkspaceObject
DeleteXmlWorkspaceObject,DeleteXmlWorkspaceObject,DeleteXmlWorkspaceObject

spssxmlworkspace.DeleteXmlWorkspaceObject(handle). Deletes the XPath dictionary DOM or output DOM with the specified handle name. The argument is the name associated with this DOM, as defined by a previous CreateXPathDictionary function call or PASW Statistics OMS command.

Example

handles <- spssxmlworkspace.GetHandleList()
for(handle in handles)
   spssxmlworkspace.DeleteXmlWorkspaceObject(handle)


spssxmlworkspace.EvaluateXPath Function (R)

spssxmlworkspace functions,spssxmlworkspace functions,spssxmlworkspace functions
EvaluateXPath,EvaluateXPath,EvaluateXPath
EvaluateXPath,EvaluateXPath,EvaluateXPath
output,output,output
reading output results,reading output results,reading output results
OXML,OXML,OXML
reading output XML,reading output XML,reading output XML
XPath expressions,XPath expressions,XPath expressions

spssxmlworkspace.EvaluateXPath(handle,context,expression). Evaluates an XPath expression against a specified XPath DOM and returns the result as a vector of character strings. The argument handle specifies the particular XPath DOM and must be a valid handle name defined by a previous CreateXPathDictionary function call or PASW Statistics OMS command. The argument context defines the XPath context for the expression and should be set to "/dictionary" for a dictionary DOM or "/outputTree" for an output XML DOM created by the OMS command. The argument expression specifies the remainder of the XPath expression and must be quoted.

Example Collapse Hide details

Example

#retrieve a list of all variable names for the active dataset.
handle <- "demo"
spssxmlworkspace.CreateXPathDictionary(handle)
context <- "/dictionary"
xpath <- "variable/@name"
varnames <- spssxmlworkspace.EvaluateXPath(handle,context,xpath)

Note: In the PASW Statistics documentation, XPath examples for the OMS command use a namespace prefix in front of each element name (the prefix oms: is used in the OMS examples). Namespace prefixes are not valid for EvaluateXPath.

Documentation for the output schema and the dictionary schema is available from the Help system.

Related Topics

Retrieving Output from Syntax Commands (R)


spssxmlworkspace.GetHandleList Function (R)

spssxmlworkspace functions,spssxmlworkspace functions,spssxmlworkspace functions
GetHandleList,GetHandleList,GetHandleList
GetHandleList,GetHandleList,GetHandleList

spssxmlworkspace.GetHandleList(). Returns the names of the currently defined dictionary and output XML DOMs available for use with EvaluateXPath.

Example

handles <- spssxmlworkspace.GetHandleList()


TextBlock Class (R)

TextBlock class,TextBlock class,TextBlock class

spss.TextBlock(name,content,outline). Creates and populates a text block item in the Viewer. The argument name is a string that specifies the name of this item in the outline pane of the Viewer. The argument content is a string that specifies the text, which may include the escape sequence \n to specify line breaks. You can also add lines using the append method. The optional argument outline is a string that specifies a title for this item that appears in the outline pane of the Viewer. The item for the text block itself will be placed one level deeper than the item for the outline title. If outline is omitted, the Viewer item for the text block will be placed one level deeper than the root item for the output containing the text block.

An instance of the TextBlock class can only be used within a StartProcedure-EndProcedure block.

Example

BEGIN PROGRAM R.
spsspkg.StartProcedure("mycompany.com.demo")
textBlock = spss.TextBlock("Text block name",
                           "A single line of text.")
spsspkg.EndProcedure()
END PROGRAM.
Sample text block

• This example shows how to generate a text block within a StartProcedure-EndProcedure block. The output will be contained under an item named mycompany.com.demo in the outline pane of the Viewer.

• The variable textBlock stores a reference to the instance of the text block object. You will need this object reference if you intend to append additional lines to the text block with the append method.

Related Topics

BasePivotTable Class (R)
spsspivottable.Display Function (R)
spsspkg.StartProcedure Function (R)
append Method (R)


append Method (R)

TextBlock class,TextBlock class,TextBlock class
append method,append method,append method
append method,append method,append method
TextBlock class,TextBlock class,TextBlock class

.append(line,skip). Appends lines to an existing text block. The argument line is a string that specifies the text, which may include the escape sequence \n to specify line breaks. The optional argument skip specifies the number of new lines to create when appending the specified line. The default is 1 and results in appending the single specified line. Integers greater than 1 will result in blank lines preceding the appended line. For example, specifying skip=3 will result in two blank lines before the appended line.

Example

BEGIN PROGRAM R.
spsspkg.StartProcedure("mycompany.com.demo")
textBlock = spss.TextBlock("Text block name",
                           "A single line of text.")
TextBlock.append(textBlock,"A second line of text.")
TextBlock.append(textBlock,"A third line of text preceded by a blank line.",skip=2)
spsspkg.EndProcedure()
END PROGRAM.


Introduction to GPL

GPL,GPL,GPL
introduction,introduction,introduction

The Graphics Production Language (GPL) is a language for creating graphs. It is a concise and flexible language based on the grammar described in The Grammar of Graphics. Rather than requiring you to learn commands that are specific to different graph types, GPL provides a basic grammar with which you can build any graph. For more information about the theory that supports GPL, see The Grammar of Graphics, 2nd Edition (Wilkinson, 2005).

Related Topics

The Basics (GPL)
GPL Syntax Rules
GPL Concepts
GPL Statement and Function Reference
GPL Examples


The Basics (GPL)

The GPL example below creates a simple bar chart. (See Figure: Simple bar chart.) A summary of the GPL follows the bar chart.

Note: To run the examples that appear in the GPL documentation, they must be incorporated into the syntax specific to your application. For more information, see Using the Examples in Your Application (GPL) in GPL Examples.

GPL for a simple bar chart
SOURCE: s = userSource(id("Employeedata"))
DATA: jobcat=col(source(s), name("jobcat"), unit.category())
DATA: salary=col(source(s), name("salary"))
SCALE: linear(dim(2), include(0))
GUIDE: axis(dim(2), label("Mean Salary"))
GUIDE: axis(dim(1), label("Job Category"))
ELEMENT: interval(position(summary.mean(jobcat*salary)))

Each line in the example is a statement. One or more statements make up a block of GPL. Each statement specifies an aspect of the graph, such as the source data, relevant data transformations, coordinate systems, guides (for example, axis labels), graphic elements (for example, points and lines), and statistics.

Statements begin with a label that identifies the statement type. The label and the colon (:) that follows the label are the only items that delineate the statement.

Consider the statements in the example:

• SOURCE. This statement specifies the file or dataset that contains the data for the graph. In the example, it identifies userSource, which is a data source defined by the application that is calling the GPL. The data source could also have been a comma-separated values (CSV) file.

• DATA. This statement assigns a variable to a column or field in the data source. In the example, the DATA statements assign jobcat and salary to two columns in the data source. The statement identifies the appropriate columns in the data source by using the name function. The strings passed to the name function correspond to variable names in the userSource. These could also be the column header strings that appear in the first line of a CSV file. Note that jobcat is defined as a categorical variable. If a measurement level is not specified, it is assumed to be continuous.

• SCALE. This statement specifies the type of scale used for the graph dimensions and the range for the scale, among other options. In the example, it specifies a linear scale on the second dimension (the y axis in this case) and indicates that the scale must include 0. Linear scales do not necessarily include 0, but many bar charts do. Therefore, it's explicitly defined to ensure the bars start at 0. You need to include a SCALE statement only when you want to modify the scale. In this example, no SCALE statement is specified for the first dimension. We are using the default scale, which is categorical because the underlying data are categorical.

• GUIDE. This statement handles all of the aspects of the graph that aren't directly tied to the data but help to interpret the data, such as axis labels and reference lines. In the example, the GUIDE statements specify labels for the x and y axes. A specific axis is identified by a dim function. The first two dimensions of any graph are the x and y axes. The GUIDE statement is not required. Like the SCALE statement, it is needed only when you want to modify a particular guide. In this case, we are adding labels to the guides. The axis guides would still be created if the GUIDE statements were omitted, but the axes would not have labels.

• ELEMENT. This statement identifies the graphic element type, variables, and statistics. The example specifies interval. An interval element is commonly known as a bar element. It creates the bars in the example. position() specifies the location of the bars. One bar appears at each category in the jobcat. Because statistics are calculated on the second dimension in a 2-D graph, the height of the bars is the mean of salary for each job category. The contents of position() use GPL algebra. See the topic Brief Overview of GPL Algebra for more information.

Details about all of the statements and functions appear in GPL Statement and Function Reference.

Related Topics

GPL Syntax Rules
GPL Concepts


GPL Syntax Rules

GPL,GPL,GPL
syntax rules,syntax rules,syntax rules
syntax rules,syntax rules,syntax rules
GPL,GPL,GPL

When writing GPL, it is important to keep the following rules in mind.

• Except in quoted strings, whitespace is irrelevant, including line breaks. Although it is possible to write a complete GPL block on one line, line breaks are used for readability.

• All quoted strings must be enclosed in quotation marks/double quotes (for example, "text"). You cannot use single quotes to enclose strings.

• To add a quotation mark within a quoted string, precede the quotation mark with an escape character (\) (for example, "Respondents Answering \"Yes\"").

• To add a line break within a quoted string, use \n (for example, "Employment\nCategory").

• GPL is case sensitive. Statement labels and function names must appear in the case as documented. Other names (like variable names) are also case sensitive.

• Functions are separated by commas. For example:

ELEMENT: point(position(x*y), color(z), size(size."5px"))

• GPL names must begin with an alpha character and can contain alphanumeric characters and underscores (_), including those in international character sets. GPL names are used in the SOURCE, DATA, TRANS, and SCALE statements to assign the result of a function to the name. For example, gendervar in the following example is a GPL name:

DATA: gendervar=col(source(s), name("gender"), unit.category())

Related Topics

The Basics (GPL)
GPL Concepts


GPL Concepts

This section contains conceptual information about GPL. Although the information is useful for understanding GPL, it may not be easy to grasp unless you first review some examples. You can find examples in GPL Examples.

Related Topics

Brief Overview of GPL Algebra
How Coordinates and the GPL Algebra Interact
The Basics (GPL)
GPL Syntax Rules


Brief Overview of GPL Algebra

algebra (GPL),algebra (GPL),algebra (GPL)
GPL,GPL,GPL
algebra,algebra,algebra

Before you can use all of the functions and statements in GPL, it is important to understand its algebra. The algebra determines how data are combined to specify the position of graphic elements in the graph. That is, the algebra defines the graph dimensions or the data frame in which the graph is drawn. For example, the frame of a basic scatterplot is specified by the values of one variable crossed with the values of another variable. Another way of thinking about the algebra is that it identifies the variables you want to analyze in the graph.

The GPL algebra can specify one or more variables. If it includes more than one variable, you must use one of the following operators:

operators (GPL),operators (GPL),operators (GPL)
GPL,GPL,GPL
operators,operators,operators
cross operator,cross operator,cross operator
nest operator,nest operator,nest operator
blend operator,blend operator,blend operator
cross operator (GPL),cross operator (GPL),cross operator (GPL)
nest operator (GPL),nest operator (GPL),nest operator (GPL)
blend operator (GPL),blend operator (GPL),blend operator (GPL)

• Cross (*). The cross operator crosses all of the values of one variable with all of the values of another variable. A result exists for every case (row) in the data. The cross operator is the most commonly used operator. It is used whenever the graph includes more than one axis, with a different variable on each axis. Each variable on each axis is crossed with each variable on the other axes (for example, A*B results in A on the x axis and B on the y axis when the coordinate system is 2-D). Crossing can also be used for paneling (faceting) when there are more crossed variables than there are dimensions in a coordinate system. That is, if the coordinate system were 2-D rectangular and three variables were crossed, the last variable would be used for paneling (for example, with A*B*C, C is used for paneling when the coordinate system is 2-D).

• Nest (/). The nest operator nests all of the values of one variable in all of the values of another variable. The difference between crossing and nesting is that a result exists only when there is a corresponding value in the variable that nests the other variable. For example, city/state nests the city variable in the state variable. A result will exist for each city and its appropriate state, not for every combination of city and state. Therefore, there will not be a result for Chicago and Montana. Nesting always results in paneling, regardless of the coordinate system.

• Blend (+). The blend operator combines all of the values of one variable with all of the values of another variable. For example, you may want to combine two salary variables on one axis. Blending is often used for repeated measures, as in salary2004+salary2005.

Crossing and nesting add dimensions to the graph specification. Blending combines the values into one dimension. How the dimensions are interpreted and drawn depends on the coordinate system. See How Coordinates and the GPL Algebra Interact for details about the interaction between the coordinate system and the algebra.

Rules

GPL,GPL,GPL
algebra rules,algebra rules,algebra rules
algebra (GPL),algebra (GPL),algebra (GPL)
rules,rules,rules

Like elementary mathematical algebra, GPL algebra has associative, distributive, and commutative rules. All operators are associative:

(X*Y)*Z = X*(Y*Z)
(X/Y)/Z = X/(Y/Z)
(X+Y)+Z = X+(Y+Z)

The cross and nest operators are also distributive:

X*(Y+Z) = X*Y+X*Z
X/(Y+Z) = X/Y+X/Z

However, GPL algebra operators are not commutative. That is,

X*Y ≠ Y*X
X/Y ≠ Y/X

Operator Precedence

operator precedence (GPL),operator precedence (GPL),operator precedence (GPL)
GPL,GPL,GPL
operator precedence,operator precedence,operator precedence

The nest operator takes precedence over the other operators, and the cross operator takes precedence over the blend operator. Like mathematical algebra, the precedence can be changed by using parentheses. You will almost always use parentheses with the blend operator because the blend operator has the lowest precedence. For example, to blend variables before crossing or nesting the result with other variables, you would do the following:

(A+B)*C

However, note that there are some cases in which you will cross then blend. For example, consider the following.

(A*C)+(B*D)

In this case, the variables are crossed first because there is no way to untangle the variable values after they are blended. A needs to be crossed with C and B needs to be crossed with D. Therefore, using (A+B)*(C+D) won't work. (A*C)+(B*D) crosses the correct variables and then blends the results together.

Note: In this last example, the parentheses are superfluous, because the cross operator's higher precedence ensures that the crossing occurs before the blending. The parentheses are used for readability.

Analysis Variable

analysis variable (GPL),analysis variable (GPL),analysis variable (GPL)
GPL,GPL,GPL
analysis variable,analysis variable,analysis variable

Statistics other than count-based statistics require an analysis variable. The analysis variable is the variable on which a statistic is calculated. In a 1-D graph, this is the first variable in the algebra. In a 2-D graph, this is the second variable. Finally, in a 3-D graph, it is the third variable.

In all of the following, salary is the analysis variable:

• 1-D. summary.sum(salary)

• 2-D. summary.mean(jobcat*salary)

• 3-D. summary.mean(jobcat*gender*salary)

The previous rules apply only to algebra used in the position function. Algebra can be used elsewhere (as in the color and label functions), in which case the only variable in the algebra is the analysis variable. For example, in the following ELEMENT statement for a 2-D graph, the analysis variable is salary in the position function and the label function.

ELEMENT: interval(position(summary.mean(jobcat*salary)), label(summary.mean(salary)))

Unity Variable

unity variable (GPL),unity variable (GPL),unity variable (GPL)
GPL,GPL,GPL
unity variable,unity variable,unity variable

The unity variable (indicated by 1) is a placeholder in the algebra. It is not the same as the numeric value 1. When a scale is created for the unity variable, unity is located in the middle of the scale but no other values exist on the scale. The unity variable is needed only when there is no explicit variable in a specific dimension and you need to include the dimension in the algebra.

For example, assume a 2-D rectangular coordinate system. If you are creating a graph showing the count in each jobcat category, summary.count(jobcat) appears in the GPL specification. Counts are shown along the y axis, but there is no explicit variable in that dimension. If you want to panel the graph, you need to specify something in the second dimension before you can include the paneling variable. Thus, if you want to panel the graph by columns using gender, you need to change the specification to summary.count(jobcat*1*gender). If you want to panel by rows instead, there would be another unity variable to indicate the missing third dimension. The specification would change to summary.count(jobcat*1*1*gender).

You can't use the unity variable to compute statistics that require an analysis variable (like summary.mean). However, you can use it with count-based statistics (like summary.count and summary.percent.count).

User Constants

GPL,GPL,GPL
user constants,user constants,user constants
user constants (GPL),user constants (GPL),user constants (GPL)
constants (GPL),constants (GPL),constants (GPL)
user,user,user

The algebra can also include user constants, which are quoted string values (for example, "2005"). When a user constant is included in the algebra, it is like adding a new variable, with the variable's value equal to the constant for all cases. The effect of this depends on the algebra operators and the function in which the user constant appears.

In the position function, the constants can be used to create separate scales. For example, in the following GPL, two separate scales are created for the paneled graph. By nesting the values of each variable in a different string and blending the results, two different groups of cases with different scale ranges are created.

ELEMENT: line(position(date*(calls/"Calls"+orders/"Orders")))

For a full example, see Line Chart with Separate Scales (GPL).

If the cross operator is used instead of the nest operator, both categories will have the same scale range. The panel structures will also differ.

ELEMENT: line(position(date*calls*"Calls"+date*orders*"Orders"))

Constants can also be used in the position function to create a category of all cases when the constant is blended with a categorical variable. Remember that the value of the user constant is applied to all cases, so that's why the following works:

ELEMENT: interval(position(summary.mean((jobcat+"All")*salary)))

For a full example, see Simple Bar Chart with Bar for All Categories (GPL).

Aesthetic functions can also take advantage of user constants. Blending variables creates multiple graphic elements for the same case. To distinguish each group, you can mimic the blending in the aesthetic function—this time with user constants.

ELEMENT: point(position(jobcat*(salbegin+salary), color("Beginning"+"Current")))

User constants are not required to create most charts, so you can ignore them in the beginning. However, as you become more proficient with GPL, you may want to return to them to create custom graphs.

Related Topics

How Coordinates and the GPL Algebra Interact


How Coordinates and the GPL Algebra Interact

coordinates (GPL),coordinates (GPL),coordinates (GPL)
GPL,GPL,GPL
algebra and coordinate interaction,algebra and coordinate interaction,algebra and coordinate interaction

The algebra defines the dimensions of the graph. Each crossing results in an additional dimension. Thus, gender*jobcat*salary specifies three dimensions. How these dimensions are drawn depends on the coordinate system and any functions that may modify the coordinate system.

Some examples may clarify these concepts. The relevant GPL statements are extracted from the full specification.

1-D Graph

COORD: rect(dim(1))
ELEMENT: point(position(salary))
Full Specification Collapse Hide details

Full Specification

SOURCE: s = userSource(id("Employeedata"))
DATA: salary = col(source(s), name("salary"))
COORD: rect(dim(1))
GUIDE: axis(dim(1), label("Salary"))
ELEMENT: point(position(salary))

• The coordinate system is explicitly set to one-dimensional, and only one variable appears in the algebra.

• The variable is plotted on one dimension.

2-D Graph

ELEMENT: point(position(salbegin*salary))
Full Specification Collapse Hide details

Full Specification

SOURCE: s = userSource(id("Employeedata"))
DATA: salbegin=col(source(s), name("salbegin"))
DATA: salary=col(source(s), name("salary"))
GUIDE: axis(dim(2), label("Current Salary"))
GUIDE: axis(dim(1), label("Beginning Salary"))
ELEMENT: point(position(salbegin*salary))

• No coordinate system is specified, so it is assumed to be 2-D rectangular.

• The two crossed variables are plotted against each other.

Another 2-D Graph

ELEMENT: interval(position(summary.count(jobcat)))
Full Specification Collapse Hide details

Full Specification

SOURCE: s = userSource(id("Employeedata"))
DATA: jobcat=col(source(s), name("jobcat"), unit.category())
SCALE: linear(dim(2), include(0))
GUIDE: axis(dim(2), label("Count"))
GUIDE: axis(dim(1), label("Job Category"))
ELEMENT: interval(position(summary.count(jobcat)))

• No coordinate system is specified, so it is assumed to be 2-D rectangular.

• Although there is only one variable in the specification, another for the result of the count statistic is implied (percent statistics behave similarly). The algebra could have been written as jobcat*1.

• The variable and the result of the statistic are plotted.

A Faceted (Paneled) 2-D Graph

ELEMENT: interval(position(summary.mean(jobcat*salary*gender)))
Full Specification Collapse Hide details

Full Specification

SOURCE: s = userSource(id("Employeedata"))
DATA: jobcat = col(source(s), name("jobcat"), unit.category())
DATA: gender = col(source(s), name("gender"), unit.category())
DATA: salary = col(source(s), name("salary"))
SCALE: linear(dim(2), include(0))
GUIDE: axis(dim(3), label("Gender"))
GUIDE: axis(dim(2), label("Mean Salary"))
GUIDE: axis(dim(1), label("Job Category"))
ELEMENT: interval(position(summary.mean(jobcat*salary*gender)))

• No coordinate system is specified, so it is assumed to be 2-D rectangular.

• There are three variables in the algebra, but only two dimensions. The last variable is used for faceting (also known as paneling).

• The second dimension variable in a 2-D chart is the analysis variable. That is, it is the variable on which the statistic is calculated.

• The first variable is plotted against the result of the summary statistic calculated on the second variable for each category in the faceting variable.

A Faceted (Paneled) 2-D Graph with Nested Categories

ELEMENT: interval(position(summary.mean(jobcat/gender*salary)))
Full Specification Collapse Hide details

Full Specification

SOURCE: s = userSource(id("Employeedata"))
DATA: jobcat = col(source(s), name("jobcat"), unit.category())
DATA: gender = col(source(s), name("gender"), unit.category())
DATA: salary = col(source(s), name("salary"))
SCALE: linear(dim(2), include(0.0))
GUIDE: axis(dim(2), label("Mean Salary"))
GUIDE: axis(dim(1.1), label("Job Category"))
GUIDE: axis(dim(1), label("Gender"))
ELEMENT: interval(position(summary.mean(jobcat/gender*salary)))

• This example is the same as the previous paneled example, except for the algebra.

• The second dimension variable is the same as in the previous example. Therefore, it is the variable on which the statistic is calculated.

• jobcat is nested in gender. Nesting always results in faceting, regardless of the available dimensions.

• With nested categories, only those combinations of categories that occur in the data are shown in the graph. In this case, there is no bar for Female and Custodial in the graph, because there is no case with this combination of categories in the data. Compare this result to the previous example that created facets by crossing categorical variables.

A 3-D Graph

COORD: rect(dim(1,2,3))
ELEMENT: interval(position(summary.mean(jobcat*gender*salary)))
Full Specification Collapse Hide details

Full Specification

SOURCE: s = userSource(id("Employeedata"))
DATA: jobcat=col(source(s), name("jobcat"), unit.category())
DATA: gender=col(source(s), name("gender"), unit.category())
DATA: salary=col(source(s), name("salary"))
COORD: rect(dim(1,2,3))
SCALE: linear(dim(3), include(0))
GUIDE: axis(dim(3), label("Mean Salary"))
GUIDE: axis(dim(2), label("Gender"))
GUIDE: axis(dim(1), label("Job Category"))
ELEMENT: interval(position(summary.mean(jobcat*gender*salary)))

• The coordinate system is explicitly set to three-dimensional, and there are three variables in the algebra.

• The three variables are plotted on the available dimensions.

• The third dimension variable in a 3-D chart is the analysis variable. This differs from the 2-D chart in which the second dimension variable is the analysis variable.

A Clustered Graph

COORD: rect(dim(1,2), cluster(3))
ELEMENT: interval(position(summary.mean(gender*salary*jobcat)), color(gender))
Full Specification Collapse Hide details

Full Specification

SOURCE: s = userSource(id("Employeedata"))
DATA: jobcat=col(source(s), name("jobcat"), unit.category())
DATA: gender=col(source(s), name("gender"), unit.category())
DATA: salary=col(source(s), name("salary"))
COORD: rect(dim(1,2), cluster(3))
SCALE: linear(dim(2), include(0))
GUIDE: axis(dim(2), label("Mean Salary"))
GUIDE: axis(dim(3), label("Gender"))
ELEMENT: interval(position(summary.mean(jobcat*salary*gender)), color(jobcat))

• The coordinate system is explicitly set to two-dimensional, but it is modified by the cluster function.

• The cluster function indicates that clustering occurs along dim(3), which is the dimension associated with jobcat because it is the third variable in the algebra.

• The variable in dim(1) identifies the variable whose values determine the bars in each cluster. This is gender.

• Although the coordinate system was modified, this is still a 2-D chart. Therefore, the analysis variable is still the second dimension variable.

• The variables are plotted using the modified coordinate system. Note that the graph would be a paneled graph if you removed the cluster function. The charts would look similar and show the same results, but their coordinate systems would differ. Refer back to the paneled 2-D graph to see the difference.

Related Topics

Brief Overview of GPL Algebra


Common Tasks (GPL)

This section provides information for adding common graph features. This GPL creates a simple 2-D bar chart. You can apply the steps to any graph, but the examples use the GPL in The Basics (GPL) as a "baseline."

Related Topics

How to Add Stacking to a Graph (GPL)
How to Add Faceting (Paneling) to a Graph (GPL)
How to Add Clustering to a Graph (GPL)
How to Use Aesthetics (GPL)


How to Add Stacking to a Graph (GPL)

GPL,GPL,GPL
stacking,stacking,stacking

Stacking involves a couple of changes to the ELEMENT statement. The following steps use the GPL shown in The Basics (GPL) as a "baseline" for the changes.

Before modifying the ELEMENT statement, you need to define an additional categorical variable that will be used for stacking. This is specified by a DATA statement (note the unit.category() function):

DATA: gender=col(source(s), name("gender"), unit.category())

The first change to the ELEMENT statement will split the graphic element into color groups for each gender category. This splitting results from using the color function:

ELEMENT: interval(position(summary.mean(jobcat*salary)), color(gender))

Because there is no collision modifier for the interval element, the groups of bars are overlaid on each other, and there's no way to distinguish them. In fact, you may not even see graphic elements for one of the groups because the other graphic elements obscure them. You need to add the stacking collision modifier to re-position the groups (we also changed the statistic because stacking summed values makes more sense than stacking the mean values):

ELEMENT: interval.stack(position(summary.sum(jobcat*salary)), color(gender))

The complete GPL is shown below:

SOURCE: s = userSource(id("Employeedata"))
DATA: jobcat = col(source(s), name("jobcat"), unit.category())
DATA: gender = col(source(s), name("gender"), unit.category())
DATA: salary = col(source(s), name("salary"))
SCALE: linear(dim(2), include(0.0))
GUIDE: axis(dim(2), label("Sum Salary"))
GUIDE: axis(dim(1), label("Job Category"))
ELEMENT: interval.stack(position(summary.sum(jobcat*salary)), color(gender))

Following is the graph created from the GPL.

Legend Label

The graph includes a legend, but it has no label by default. To add or change the label for the legend, you use a GUIDE statement:

GUIDE: legend(aesthetic(aesthetic.color), label("Gender"))

Related Topics

How to Add Faceting (Paneling) to a Graph (GPL)
How to Add Clustering to a Graph (GPL)
How to Use Aesthetics (GPL)


How to Add Faceting (Paneling) to a Graph (GPL)

GPL,GPL,GPL
faceting,faceting,faceting
paneling,paneling,paneling

Faceted variables are added to the algebra in the ELEMENT statement. The following steps use the GPL shown in The Basics (GPL) as a "baseline" for the changes.

Before modifying the ELEMENT statement, we need to define an additional categorical variable that will be used for faceting. This is specified by a DATA statement (note the unit.category() function):

DATA: gender=col(source(s), name("gender"), unit.category())

Now we add the variable to the algebra. We will cross the variable with the other variables in the algebra:

ELEMENT: interval(position(summary.mean(jobcat*salary*gender)))

Those are the only necessary steps. The final GPL is shown below.

SOURCE: s = userSource(id("Employeedata"))
DATA: jobcat = col(source(s), name("jobcat"), unit.category())
DATA: gender = col(source(s), name("gender"), unit.category())
DATA: salary = col(source(s), name("salary"))
SCALE: linear(dim(2), include(0.0))
GUIDE: axis(dim(2), label("Mean Salary"))
GUIDE: axis(dim(1), label("Job Category"))
ELEMENT: interval(position(summary.mean(jobcat*salary*gender)))

Following is the graph created from the GPL.

Additional Features

Labeling. If you want to label the faceted dimension, you treat it like the other dimensions in the graph by adding a GUIDE statement for its axis:

GUIDE: axis(dim(3), label("Gender"))

In this case, it is specified as the 3rd dimension. You can determine the dimension number by counting the crossed variables in the algebra. gender is the 3rd variable.

Nesting. Faceted variables can be nested as well as crossed. Unlike crossed variables, the nested variable is positioned next to the variable in which it is nested. So, to nest gender in jobcat, you would do the following:

ELEMENT: interval(position(summary.mean(jobcat/gender*salary)))

Because gender is used for nesting, it is not the 3rd dimension as it was when crossing to create facets. You can't use the same simple counting method to determine the dimension number. You still count the crossings, but you count each crossing as a single factor. The number that you obtain by counting each crossed factor is used for the nested variable (in this case, 1). The other dimension is indicated by the nested variable dimension followed by a dot and the number 1 (in this case, 1.1). So, you would use the following convention to refer to the gender and jobcat dimensions in the GUIDE statement:

GUIDE: axis(dim(1), label("Gender"))
GUIDE: axis(dim(1.1), label("Job Category"))
GUIDE: axis(dim(2), label("Mean Salary"))

Related Topics

How to Add Stacking to a Graph (GPL)
How to Add Clustering to a Graph (GPL)
How to Use Aesthetics (GPL)


How to Add Clustering to a Graph (GPL)

GPL,GPL,GPL
clustering,clustering,clustering

Clustering involves changes to the COORD statement and the ELEMENT statement. The following steps use the GPL shown in The Basics (GPL) as a "baseline" for the changes.

Before modifying the COORD and ELEMENT statements, you need to define an additional categorical variable that will be used for clustering. This is specified by a DATA statement (note the unit.category() function):

DATA: gender=col(source(s), name("gender"), unit.category())

Now you will modify the COORD statement. If, like the baseline graph, the GPL does not already include a COORD statement, you first need to add one:

COORD: rect(dim(1,2))

In this case, the default coordinate system is now explicit.

Next add the cluster function to the coordinate system and specify the clustering dimension. In a 2-D coordinate system, this is the third dimension:

COORD: rect(dim(1,2), cluster(3))

Now we add the clustering dimension variable to the algebra. This variable is in the 3rd position, corresponding to the clustering dimension specified by the cluster function in the COORD statement:

ELEMENT: interval(position(summary.mean(jobcat*salary*gender)))

Note that this algebra looks similar to the algebra for faceting. Without the cluster function added in the previous step, the resulting graph would be faceted. The cluster function essentially collapses the faceting into one axis. Instead of a facet for each gender category, there is a cluster on the x axis for each category.

Because clustering changes the dimensions, we update the GUIDE statement so that it corresponds to the clustering dimension.

GUIDE: axis(dim(3), label("Gender"))

With these changes, the chart is clustered, but there is no way to distinguish the bars in each cluster. You need to add an aesthetic to distinguish the bars:

ELEMENT: interval(position(summary.mean(jobcat*salary*gender)), color(jobcat))

The complete GPL looks like the following.

SOURCE: s = userSource(id("Employeedata"))
DATA: jobcat=col(source(s), name("jobcat"), unit.category())
DATA: gender=col(source(s), name("gender"), unit.category())
DATA: salary=col(source(s), name("salary"))
COORD: rect(dim(1,2), cluster(3))
SCALE: linear(dim(2), include(0))
GUIDE: axis(dim(2), label("Mean Salary"))
GUIDE: axis(dim(3), label("Gender"))
ELEMENT: interval(position(summary.mean(jobcat*salary*gender)), color(jobcat))

Following is the graph created from the GPL. Compare this to “Faceted bar chart”.

Legend Label

The graph includes a legend, but it has no label by default. To change the label for the legend, you use a GUIDE statement:

GUIDE: legend(aesthetic(aesthetic.color), label("Gender"))

Related Topics

How to Add Stacking to a Graph (GPL)
How to Add Faceting (Paneling) to a Graph (GPL)
How to Use Aesthetics (GPL)


How to Use Aesthetics (GPL)

GPL,GPL,GPL
using aesthetics,using aesthetics,using aesthetics

GPL includes several different aesthetic functions for controlling the appearance of a graphic element. The simplest use of an aesthetic function is to define a uniform aesthetic for every instance of a graphic element. For example, you can use the color function to assign a color constant (like color.red) to the point element, thereby making all of the points in the graph red.

A more interesting use of an aesthetic function is to change the value of the aesthetic based on the value of another variable. For example, instead of a uniform color for the scatterplot points, the color could vary based on the value of the categorical variable gender. All of the points in the Male category will be one color, and all of the points in the Female category will be another. Using a categorical variable for an aesthetic creates groups of cases. In addition to identifying the graphic elements for the groups of cases, the grouping allows you to evaluate statistics for the individual groups, if needed.

An aesthetic may also vary based on a set of continuous values. Using continuous values for the aesthetic does not result in distinct groups of graphic elements. Instead, the aesthetic varies along the same continuous scale. There are no distinct groups on the scale, so the color varies gradually, just as the continuous values do.

The steps below use the following GPL as a "baseline" for adding the aesthetics. This GPL creates a simple scatterplot.

Baseline GPL for example
SOURCE: s = userSource(id("Employeedata"))
DATA: salbegin=col(source(s), name("salbegin"))
DATA: salary=col(source(s), name("salary"))
GUIDE: axis(dim(2), label("Current Salary"))
GUIDE: axis(dim(1), label("Beginning Salary"))
ELEMENT: point(position(salbegin*salary))

First, you need to define an additional categorical variable that will be used for one of the aesthetics. This is specified by a DATA statement (note the unit.category() function):

DATA: gender=col(source(s), name("gender"), unit.category())

Next you need to define another variable, this one being continuous. It will be used for the other aesthetic.

DATA: prevexp=col(source(s), name("prevexp"))

Now you will add the aesthetics to the graphic element in the ELEMENT statement. First add the aesthetic for the categorical variable:

ELEMENT: point(position(salbegin*salary), shape(gender))

Shape is a good aesthetic for the categorical variable. It has distinct values that correspond well to categorical values.

Finally add the aesthetic for the continuous variable:

ELEMENT: point(position(salbegin*salary), shape(gender), color(prevexp))

Not all aesthetics are available for continuous variables. That's another reason why shape was a good aesthetic for the categorical variable. Shape is not available for continuous variables because there aren't enough shapes to cover a continuous spectrum. On the other hand, color gradually changes in the graph. It can capture the full spectrum of continuous values. Transparency or brightness would also work well.

The complete GPL looks like the following.

SOURCE: s = userSource(id("Employeedata"))
DATA: salbegin = col(source(s), name("salbegin"))
DATA: salary = col(source(s), name("salary"))
DATA: gender = col(source(s), name("gender"), unit.category())
DATA: prevexp = col(source(s), name("prevexp"))
GUIDE: axis(dim(2), label("Current Salary"))
GUIDE: axis(dim(1), label("Beginning Salary"))
ELEMENT: point(position(salbegin*salary), shape(gender), color(prevexp))

Following is the graph created from the GPL.

Legend Label

The graph includes legends, but the legends have no labels by default. To change the labels, you use GUIDE statements that reference each aesthetic:

GUIDE: legend(aesthetic(aesthetic.shape), label("Gender"))
GUIDE: legend(aesthetic(aesthetic.color), label("Previous Experience"))

When interpreting the color legend in the example, it's important to realize that the color aesthetic corresponds to a continuous variable. Only a handful of colors may be shown in the legend, and these colors do not reflect the whole spectrum of colors that could appear in the graph itself. They are more like mileposts at major divisions.

Related Topics

How to Add Stacking to a Graph (GPL)
How to Add Faceting (Paneling) to a Graph (GPL)
How to Add Clustering to a Graph (GPL)


GPL Statement and Function Reference

This section provides detailed information about the various statements that make up GPL and the functions that you can use in each of the statements.

Reference

GPL Statements
GPL Functions


GPL Statements

statements (GPL),statements (GPL),statements (GPL)

There are general categories of GPL statements.

Data definition statements. Data definition statements specify the data sources, variables, and optional variable transformations. All GPL code blocks include at least two data definition statements: one to define the actual data source and one to specify the variable extracted from the data source.

Specification statements. Specification statements define the graph. They define the axis scales, coordinate systems, text, graphic elements (for example, bars and points), and statistics. All GPL code blocks require at least one ELEMENT statement, but the other specification statements are optional. GPL uses a default value when the SCALE, COORD, and GUIDE statements are not included in the GPL code block.

Control statements. Control statements specify the layout for graphs. The GRAPH statement allows you to group multiple graphs in a single page display. For example, you may want to add histograms to the borders on a scatterplot. The PAGE statement allows you to set the size of the overall visualization. Control statements are optional.

Comment statement. The COMMENT statement is used for adding comments to the GPL. These are optional.

Data Definition Statements

SOURCE Statement (GPL), DATA Statement (GPL), TRANS Statement (GPL)

Specification Statements

COORD Statement (GPL), SCALE Statement (GPL), GUIDE Statement (GPL), ELEMENT Statement (GPL)

Control Statements

PAGE Statement (GPL), GRAPH Statement (GPL)

Comment Statements

COMMENT Statement (GPL)


COMMENT Statement (GPL)

Syntax

statements (GPL),statements (GPL),statements (GPL)
COMMENT,COMMENT,COMMENT
COMMENT statement (GPL),COMMENT statement (GPL),COMMENT statement (GPL)
COMMENT: <text>

<text>. The comment text. This can consist of any string of characters except a statement label followed by a colon (:), unless the statement label and colon are enclosed in quotes (for example, COMMENT: With "SCALE:" statement).

Description

This statement is optional. You can use it to add comments to your GPL or to comment out a statement by converting it to a comment. The comment does not appear in the resulting graph.

Examples

Defining a comment
COMMENT: This graph shows counts for each job category.


PAGE Statement (GPL)

Syntax

statements (GPL),statements (GPL),statements (GPL)
PAGE,PAGE,PAGE
PAGE statement (GPL),PAGE statement (GPL),PAGE statement (GPL)
PAGE: <function>

<function>. A function for specifying the PAGE statements that mark the beginning and end of the visualization.

Description

This statement is optional. It's needed only when you specify a size for the page display or visualization. The current release of GPL supports only one PAGE block.

Examples

Example: Defining a page
PAGE: begin(scale(400px,300px))
SOURCE: s=csvSource(file("mydata.csv"))
DATA: x=col(source(s), name("x"))
DATA: y=col(source(s), name("y"))
ELEMENT: line(position(x*y))
PAGE: end()
Example: Defining a page with multiple graphs
PAGE: begin(scale(400px,300px))
SOURCE: s=csvSource(file("mydata.csv"))
DATA: a=col(source(s), name("a"))
DATA: b=col(source(s), name("b"))
DATA: c=col(source(s), name("c"))
GRAPH: begin(scale(90%, 45%), origin(10%, 50%))
ELEMENT: line(position(a*c))
GRAPH: end()
GRAPH: begin(scale(90%, 45%), origin(10%, 0%))
ELEMENT: line(position(b*c))
GRAPH: end()
PAGE: end()

Valid Functions

begin Function (For GPL Pages), end Function (GPL)


GRAPH Statement (GPL)

Syntax

statements (GPL),statements (GPL),statements (GPL)
GRAPH,GRAPH,GRAPH
GRAPH statement (GPL),GRAPH statement (GPL),GRAPH statement (GPL)
GRAPH: <function>

<function>. A function for specifying the GRAPH statements that mark the beginning and end of the individual graph.

Description

This statement is optional. It's needed only when you want to group multiple graphs in a single page display or you want to customize a graph's size. The GRAPH statement is essentially a wrapper around the GPL that defines a particular graph. There is no limit to the number of graphs that can appear in a GPL block.

Grouping graphs is useful for related graphs, like graphs on the borders of histograms. However, the graphs do not have to be related. You may simply want to group the graphs for presentation.

Examples

Scaling a graph
GRAPH: begin(scale(50%,50%))
Example: Scatterplot with border histograms
GRAPH: begin(origin(10.0%, 20.0%), scale(80.0%, 80.0%))
ELEMENT: point(position(salbegin*salary))
GRAPH: end()
GRAPH: begin(origin(10.0%, 100.0%), scale(80.0%, 10.0%))
ELEMENT: interval(position(summary.count(bin.rect(salbegin))))
GRAPH: end()
GRAPH: begin(origin(90.0%, 20.0%), scale(10.0%, 80.0%))
COORD: transpose()
ELEMENT: interval(position(summary.count(bin.rect(salary))))
GRAPH: end()

Valid Functions

begin Function (For GPL Graphs), end Function (GPL)


SOURCE Statement (GPL)

Syntax

statements (GPL),statements (GPL),statements (GPL)
SOURCE,SOURCE,SOURCE
SOURCE statement (GPL),SOURCE statement (GPL),SOURCE statement (GPL)
SOURCE: <source name> = <function>

<source name>. User-defined name for the data source. Refer to GPL Syntax Rules for information about which characters you can use in the name.

<function>. A function for extracting data from various data sources.

Description

Defines a data source for the graph. There can be multiple data sources, each specified by a different SOURCE statement.

Examples

Example: Reading a CSV file
SOURCE: mydata = csvSource(path("/Data/demo.csv"))

Valid Functions

csvSource Function (GPL), savSource Function (GPL), sqlSource Function (GPL), userSource Function (GPL)


DATA Statement (GPL)

statements (GPL),statements (GPL),statements (GPL)
DATA,DATA,DATA
DATA statement (GPL),DATA statement (GPL),DATA statement (GPL)

Syntax

DATA: <variable name> = <function>

<variable name>. User-defined name for the variable. Refer to GPL Syntax Rules for information about which characters you can use in the name.

<function>. A function indicating the data sources.

Description

Defines a variable from a specific data source. The GPL statement must also include a SOURCE statement. The name identified by the SOURCE statement is used in the DATA statement to indicate the data source from which a particular variable is extracted.

Examples

Example: Specifying a variable from a data source
DATA: age = col(source(mydata), name("age"))

age is an arbitrary name. In this example, the variable name is the same as the name that appears in the data source. Using the same name avoids confusion. The col function takes a data source and data source variable name as its arguments. Note that the data source name was previously defined by a SOURCE statement and is not enclosed in quotes.

Valid Functions

col Function (GPL), iter Function (GPL)


TRANS Statement (GPL)

statements (GPL),statements (GPL),statements (GPL)
TRANS,TRANS,TRANS
TRANS statement (GPL),TRANS statement (GPL),TRANS statement (GPL)

Syntax

TRANS: <variable name> = <function>

<variable name>. A string that specifies a name for the variable that is created as a result of the transformation. Refer to GPL Syntax Rules for information about which characters you can use in the name.

<function>. A valid function.

Description

Defines a new variable whose value is the result of a data transformation function.

Examples

Example: Creating a transformation variable from other variables
TRANS: saldiff = eval(((salary-salbegin)/salary)*100)
Example: Creating an index variable
TRANS: casenum = index()

Valid Functions

collapse Function (GPL), eval Function (GPL), index Function (GPL)


COORD Statement (GPL)

statements (GPL),statements (GPL),statements (GPL)
COORD,COORD,COORD
COORD statement (GPL),COORD statement (GPL),COORD statement (GPL)

Syntax

COORD: <coord>

<coord>. A valid coordinate type or transformation function.

Description

Specifies a coordinate system for the graph. You can also embed coordinate systems or wrap a coordinate system in a transformation. When transformations and coordinate systems are embedded in each other, they are applied in order, with the innermost being applied first. Thus, mirror(transpose(rect(1,2))) specifies that a 2-D rectangular coordinate system is transposed and then mirrored.

Examples

Example: Polar coordinates for pie charts
COORD: polar.theta()
Example: 3-D rectangular coordinates
COORD: rect(dim(1,2,3))
Example: Embedded coordinate systems for paneled pie chart
COORD: rect(dim(2), polar.theta(dim(1)))
Example: Transposed coordinate system
COORD: transpose()

Coordinate Types and Transformations

parallel Coordinate Type (GPL), polar Coordinate Type (GPL), polar.theta Coordinate Type (GPL), rect Coordinate Type (GPL), mirror Function (GPL), project Function (GPL), reflect Function (GPL), transpose Function (GPL), wrap Function (GPL)


GPL Coordinate Types

There are several coordinate types available in GPL.

Coordinate Types

parallel Coordinate Type (GPL), polar Coordinate Type (GPL), polar.theta Coordinate Type (GPL), rect Coordinate Type (GPL)


parallel Coordinate Type (GPL)

coordinate types (GPL),coordinate types (GPL),coordinate types (GPL)
parallel,parallel,parallel
parallel coordinates (GPL),parallel coordinates (GPL),parallel coordinates (GPL)

Syntax

parallel(dim(<numeric>), <coord>)

<numeric>. One or more numeric values (separated by commas) indicating the graph dimension or dimensions to which the parallel coordinate system applies. The number of values equals the number of dimensions for the coordinate system's frame, and the values are always in sequential order. For example, parallel(dim(1,2,3,4)) indicates that the first four variables in the algebra are used for the parallel coordinates. Any others are used for faceting. If no dimensions are specified, all variables are used for the parallel coordinates. See the topic dim Function (GPL) for more information.

<coord>. A valid coordinate type or transformation function. This is optional.

Description

Creates a parallel coordinate system. A graph using this coordinate system consists of multiple, parallel axes showing data across multiple variables, resulting in a plot that is similar to a profile plot.

When you use a parallel coordinate system, you cross each continuous variable in the algebra. A line graphic element is the most common element type for this graph. The graphic element is always distinguished by some aesthetic so that any patterns are readily apparent.

Examples

Example: Parallel coordinates graph
TRANS: caseid = index()
COORD: parallel()
ELEMENT: line(position(var1*var2*var3*var4), split(caseid), color(catvar1))

The example includes the split function to create a separate line for each case in the data. Otherwise, there would be only one line that crossed back through the coordinate system to connect all the cases.

Coordinate Types and Transformations

polar Coordinate Type (GPL), polar.theta Coordinate Type (GPL), rect Coordinate Type (GPL), mirror Function (GPL), project Function (GPL), reflect Function (GPL), transpose Function (GPL), wrap Function (GPL)

Applies To

COORD Statement (GPL), polar Coordinate Type (GPL), polar.theta Coordinate Type (GPL), rect Coordinate Type (GPL), project Function (GPL)


polar Coordinate Type (GPL)

coordinate types (GPL),coordinate types (GPL),coordinate types (GPL)
polar,polar,polar
polar coordinates (GPL),polar coordinates (GPL),polar coordinates (GPL)

Syntax

polar(dim(<numeric>), <function>, <coord>)

<numeric>. Numeric values (separated by commas) indicating the dimensions to which the polar coordinates apply. This is optional and is assumed to be the first two dimensions. See the topic dim Function (GPL) for more information.

<function>. One or more valid functions. These are optional.

<coord>. A valid coordinate type or transformation function. This is optional.

Description

Creates a polar coordinate system. This differs from the polar.theta coordinate system in that it is two dimensional. One dimension is associated with the radius, and the other is associated with the theta angle.

Examples

Example: Polar line chart
COORD: polar()
ELEMENT: line(position(date*close), closed(), preserveStraightLines())

Valid Functions

reverse Function (GPL), startAngle Function (GPL)

Coordinate Types and Transformations

parallel Coordinate Type (GPL), polar.theta Coordinate Type (GPL), rect Coordinate Type (GPL), mirror Function (GPL), project Function (GPL), reflect Function (GPL), transpose Function (GPL), wrap Function (GPL)

Applies To

COORD Statement (GPL), parallel Coordinate Type (GPL), polar.theta Coordinate Type (GPL), rect Coordinate Type (GPL), project Function (GPL)


polar.theta Coordinate Type (GPL)

coordinate types (GPL),coordinate types (GPL),coordinate types (GPL)
polar.theta,polar.theta,polar.theta
polar.theta coordinates (GPL),polar.theta coordinates (GPL),polar.theta coordinates (GPL)

Syntax

polar.theta(<function>, <coord>)

<numeric>. A numeric value indicating the dimension. This is optional and required only when polar.theta is not the first or innermost dimension. Otherwise, it is assumed to be the first dimension. See the topic dim Function (GPL) for more information.

<function>. One or more valid functions. These are optional.

<coord>. A valid coordinate type or transformation function. This is optional.

Description

Creates a polar.theta coordinate system, which is the coordinate system for creating pie charts. polar.theta differs from the polar coordinate system in that it is one dimensional. This is the dimension for the theta angle.

Examples

Example: Pie chart
COORD: polar.theta()
ELEMENT: interval.stack(position(summary.count()), color(jobcat))

Valid Functions

reverse Function (GPL), startAngle Function (GPL)

Coordinate Types and Transformations

parallel Coordinate Type (GPL), polar Coordinate Type (GPL), rect Coordinate Type (GPL), mirror Function (GPL), project Function (GPL), reflect Function (GPL), transpose Function (GPL), wrap Function (GPL)

Applies To

COORD Statement (GPL), parallel Coordinate Type (GPL), polar Coordinate Type (GPL), rect Coordinate Type (GPL), project Function (GPL)


rect Coordinate Type (GPL)

coordinate types (GPL),coordinate types (GPL),coordinate types (GPL)
rect (rectangular),rect (rectangular),rect (rectangular)
rect (rectangular) coordinates (GPL),rect (rectangular) coordinates (GPL),rect (rectangular) coordinates (GPL)

Syntax

rect(dim(<numeric>), <function>, <coord>)

<numeric>. One or more numeric values (separated by commas) indicating the graph dimension or dimensions to which the rectangular coordinate system applies. The number of values equals the number of dimensions for the coordinate system's frame, and the values are always in sequential order (for example, dim(1,2,3) and dim(4,5)). See the topic dim Function (GPL) for more information.

<function>. One or more valid functions. These are optional.

<coord>. A valid coordinate type or transformation function. This is optional.

Description

Creates a rectangular coordinate system. By default, a rectangular coordinate system is 2-D, which is the equivalent of specifying rect(dim(1,2)). To create a 3-D coordinate system, use rect(dim(1,2,3)). Similarly, use rect(dim(1)) to specify a 1-D coordinate system. Changing the coordinate system also changes which variable in the algebra is summarized for a statistic. The statistic function is calculated on the second crossed variable in a 2-D coordinate system and the third crossed variable in a 3-D coordinate system.

Examples

Example: 2-D bar chart
COORD: rect(dim(1,2))
ELEMENT: interval(position(summary.mean(jobcat*salary)))
Example: 3-D bar chart
COORD: rect(dim(1,2,3))
ELEMENT: interval(position(summary.mean(jobcat*gender*salary)))

Valid Functions

cluster Function (GPL), sameRatio Function (GPL)

Coordinate Types and Transformations

parallel Coordinate Type (GPL), polar Coordinate Type (GPL), polar.theta Coordinate Type (GPL), mirror Function (GPL), project Function (GPL), reflect Function (GPL), transpose Function (GPL), wrap Function (GPL)

Applies To

COORD Statement (GPL), parallel Coordinate Type (GPL), polar Coordinate Type (GPL), polar.theta Coordinate Type (GPL), project Function (GPL)


SCALE Statement (GPL)

statements (GPL),statements (GPL),statements (GPL)
SCALE,SCALE,SCALE
SCALE statement (GPL),SCALE statement (GPL),SCALE statement (GPL)

Syntax

SCALE: <scale type>

or

SCALE: <scale name> = <scale type>

<scale type>. A valid scale type.

<scale name>. A user-defined name for the scale. This is required only when you are creating a graph with dual scales. An example is a graph that shows the mean of a variable on one axis and the count on the other. The scale name is referenced by an axis and a graphic element to indicate which scale is associated with the axis and graphic element. Refer to GPL Syntax Rules for information about which characters you can use in the name.

Description

Defines the scale for a particular dimension or aesthetic (such as color).

Examples

Example: Specifying a linear dimension scale
SCALE: linear(dim(2), max(50000))
Example: Specifying a log aesthetic scale
SCALE: log(aesthetic(aesthetic.color))
ELEMENT: point(position(x*y), color(z))
Example: Creating a graph with dual scales
SCALE: y1 = linear(dim(2))
SCALE: y2 = linear(dim(2))
GUIDE: axis(dim(1), label("Employment Category"))
GUIDE: axis(scale(y1), label("Mean Salary"))
GUIDE: axis(scale(y2), label("Count"), opposite(), color(color.red))
ELEMENT: interval(scale(y1), position(summary.mean(jobcat*salary)))
ELEMENT: line(scale(y2), position(summary.count(jobcat)), color(color.red))

Scale Types

asn Scale (GPL), atanh Scale (GPL), cat Scale (GPL), linear Scale (GPL), log Scale (GPL), logit Scale (GPL), pow Scale (GPL), prob Scale (GPL), probit Scale (GPL), safeLog Scale (GPL), safePower Scale (GPL), time Scale (GPL)


GPL Scale Types

scale types (GPL),scale types (GPL),scale types (GPL)

There are several scale types available in GPL.

Scale Types

asn Scale (GPL), atanh Scale (GPL), cat Scale (GPL), linear Scale (GPL), log Scale (GPL), logit Scale (GPL), pow Scale (GPL), prob Scale (GPL), probit Scale (GPL), safeLog Scale (GPL), safePower Scale (GPL), time Scale (GPL)


asn Scale (GPL)

scale types (GPL),scale types (GPL),scale types (GPL)
asn,asn,asn
asn scale (GPL),asn scale (GPL),asn scale (GPL)

Syntax

asn(dim(<numeric>), <function>)

or

asn(aesthetic(aesthetic.<aesthetic type>), <function>)

<numeric>. A numeric value indicating the dimension to which the scale applies. See the topic dim Function (GPL) for more information.

<function>. One or more valid functions.

<aesthetic type>. An aesthetic type indicating the aesthetic to which the scale applies. This is an aesthetic created as the result of an aesthetic function (such as size) in the ELEMENT statement.

Description

Creates an arcsine scale. Data values for this scale must fall in the closed interval [0, 1]. That is, for any data value x, 0 ≤ x ≤ 1.

Example

Example: Specifying an arcsine scale
SCALE: asn(dim(1))

Valid Functions

aestheticMaximum Function (GPL), aestheticMinimum Function (GPL), aestheticMissing Function (GPL)

Applies To

SCALE Statement (GPL)


atanh Scale (GPL)

scale types (GPL),scale types (GPL),scale types (GPL)
atanh,atanh,atanh
atanh scale (GPL),atanh scale (GPL),atanh scale (GPL)

Syntax

atanh(dim(<numeric>), <function>)

or

atanh(aesthetic(aesthetic.<aesthetic type>), <function>)

<numeric>. A numeric value indicating the dimension to which the scale applies. See the topic dim Function (GPL) for more information.

<function>. One or more valid functions.

<aesthetic type>. An aesthetic type indicating the aesthetic to which the scale applies. This is an aesthetic created as the result of an aesthetic function (such as size) in the ELEMENT statement.

Description

Creates a Fisher's z scale (also called the hyberbolic arctangent scale). Data values for this scale must fall in the open interval (-1, 1). That is, for any data value x, -1 < x < 1.

Example

Example: Specifying a Fisher's z scale
SCALE: atanh(dim(1))

Valid Functions

aestheticMaximum Function (GPL), aestheticMinimum Function (GPL), aestheticMissing Function (GPL)

Applies To

SCALE Statement (GPL)


cat Scale (GPL)

scale types (GPL),scale types (GPL),scale types (GPL)
cat (categorical),cat (categorical),cat (categorical)
cat (categorical) scale (GPL),cat (categorical) scale (GPL),cat (categorical) scale (GPL)

Syntax

cat(dim(<numeric>), <function>)

or

cat(aesthetic(aesthetic.<aesthetic type>), <function>)

<numeric>. A numeric value indicating the dimension to which the scale applies. See the topic dim Function (GPL) for more information.

<function>. One or more valid functions. These are optional.

<aesthetic type>. An aesthetic type indicating the aesthetic to which the scale applies. This is an aesthetic created as the result of an aesthetic function in the ELEMENT statement, often used for distinguishing groups of graphic elements, as in clusters and stacks.

Description

Creates a categorical scale that can be associated with a dimension (such as an axis or panel facet) or an aesthetic (as in the legend). A categorical scale is created for a categorical variable by default. You usually don't need to specify the scale unless you want to use a function to modify it (for example, to sort the categories).

Examples

Example: Specifying the scale for a dimension and sorting categories
SCALE: cat(dim(1), sort.natural())
Example: Specifying the scale for an aesthetic and including categories
SCALE: cat(aesthetic(aesthetic.color), include("IL"))

Note: The exclude function is not supported for aesthetic scales.

Valid Functions

aestheticMissing Function (GPL), values Function (GPL), exclude Function (GPL), include Function (GPL), map Function (GPL), reverse Function (GPL), sort.data Function (GPL), sort.natural Function (GPL), sort.statistic Function (GPL), sort.values Function (GPL)

Applies To

SCALE Statement (GPL)


linear Scale (GPL)

scale types (GPL),scale types (GPL),scale types (GPL)
linear,linear,linear
linear scale (GPL),linear scale (GPL),linear scale (GPL)

Syntax

linear(dim(<numeric>), <function>)

or

linear(aesthetic(aesthetic.<aesthetic type>), <function>)

<numeric>. A numeric value indicating the dimension to which the scale applies. See the topic dim Function (GPL) for more information.

<function>. One or more valid functions. These are optional.

<aesthetic type>. An aesthetic type indicating the aesthetic to which the scale applies. This is an aesthetic created as the result of an aesthetic function (such as size) in the ELEMENT statement.

Description

Creates a linear scale. A linear scale is created for a continuous variable by default. You usually don't need to specify the scale unless you want to add a function to modify it (for example, to specify the range).

Example

Example: Specifying a maximum value for the linear scale
SCALE: linear(dim(2), max(50000))

Valid Functions

aestheticMaximum Function (GPL), aestheticMinimum Function (GPL), aestheticMissing Function (GPL), dataMaximum Function (GPL), dataMinimum Function (GPL), include Function (GPL), max Function (GPL), min Function (GPL), origin Function (For GPL Scales), reverse Function (GPL)

Applies To

SCALE Statement (GPL)


log Scale (GPL)

scale types (GPL),scale types (GPL),scale types (GPL)
log,log,log
log scale (GPL),log scale (GPL),log scale (GPL)

Syntax

log(dim(<numeric>), <function>)

or

log(aesthetic(aesthetic.<aesthetic type>), <function>)

<numeric>. A numeric value indicating the dimension to which the scale applies. See the topic dim Function (GPL) for more information.

<function>. One or more valid functions. These are optional.

<aesthetic type>. An aesthetic type indicating the aesthetic to which the scale applies. This is an aesthetic created as the result of an aesthetic function (such as size) in the ELEMENT statement.

Description

Creates a logarithmic scale. If a base is not explicitly specified, the default is base 10. Data values for this scale must be greater than 0.

Example

Example: Specifying the scale and a base
SCALE: log(dim(2), base(2))

Valid Functions

aestheticMaximum Function (GPL), aestheticMinimum Function (GPL), aestheticMissing Function (GPL), dataMaximum Function (GPL), dataMinimum Function (GPL), include Function (GPL), base Function (GPL), max Function (GPL), min Function (GPL), origin Function (For GPL Scales), reverse Function (GPL)

Applies To

SCALE Statement (GPL)


logit Scale (GPL)

scale types (GPL),scale types (GPL),scale types (GPL)
logit,logit,logit
logit scale (GPL),logit scale (GPL),logit scale (GPL)

Syntax

logit(dim(<numeric>), <function>)

or

logit(aesthetic(aesthetic.<aesthetic type>), <function>)

<numeric>. A numeric value indicating the dimension to which the scale applies. See the topic dim Function (GPL) for more information.

<function>. One or more valid functions.

<aesthetic type>. An aesthetic type indicating the aesthetic to which the scale applies. This is an aesthetic created as the result of an aesthetic function (such as size) in the ELEMENT statement.

Description

Creates a logit scale. Data values for this scale must fall in the open interval (0, 1). That is, for any data value x, 0 < x < 1.

Example

Example: Specifying a logit scale
SCALE: logit(dim(2))

Valid Functions

aestheticMaximum Function (GPL), aestheticMinimum Function (GPL), aestheticMissing Function (GPL)

Applies To

SCALE Statement (GPL)


pow Scale (GPL)

scale types (GPL),scale types (GPL),scale types (GPL)
pow,pow,pow
pow scale (GPL),pow scale (GPL),pow scale (GPL)

Syntax

pow(dim(<numeric>), <function>)

or

pow(aesthetic(aesthetic.<aesthetic type>), <function>)

<numeric>. A numeric value indicating the dimension to which the scale applies. See the topic dim Function (GPL) for more information.

<function>. One or more valid functions. These are optional.

<aesthetic type>. An aesthetic type indicating the aesthetic to which the scale applies. This is an aesthetic created as the result of an aesthetic function (such as size) in the ELEMENT statement.

Description

Creates a power scale. If an exponent is not explicitly specified, the default is 0.5.

Example

Example: Specifying the scale and an exponent
SCALE: pow(dim(2), exponent(2))

Valid Functions

aestheticMaximum Function (GPL), aestheticMinimum Function (GPL), aestheticMissing Function (GPL), dataMaximum Function (GPL), dataMinimum Function (GPL), exponent Function (GPL), include Function (GPL), max Function (GPL), min Function (GPL), origin Function (For GPL Scales), reverse Function (GPL)

Applies To

SCALE Statement (GPL)


prob Scale (GPL)

scale types (GPL),scale types (GPL),scale types (GPL)
prob,prob,prob
prob scale (GPL),prob scale (GPL),prob scale (GPL)

Syntax

prob(dim(<numeric>), <distribution function>, <function>)

or

prob(aesthetic(aesthetic.<aesthetic type>), <distribution function>, <function>)

<numeric>. A numeric value indicating the dimension to which the scale applies. See the topic dim Function (GPL) for more information.

<distribution function>. A distribution function. This is required.

<function>. One or more valid functions. These are optional.

<aesthetic type>. An aesthetic type indicating the aesthetic to which the scale applies. This is an aesthetic created as the result of an aesthetic function (such as size) in the ELEMENT statement.

Description

Creates a probability scale based on a probability distribution. Data values for this scale must fall in the open interval (0, 1). That is, for any data value x, 0 < x < 1.

Example

Example: Specifying a beta distribution for the probability scale
SCALE: prob(dim(2), beta(2, 5))

Distribution Functions

beta Function (GPL), chiSquare Function (GPL), exponential Function (GPL), f Function (GPL), gamma Function (GPL), logistic Function (GPL), normal Function (GPL), poisson Function (GPL), studentizedRange Function (GPL), t Function (GPL), uniform Function (GPL), weibull Function (GPL)

Valid Functions

aestheticMaximum Function (GPL), aestheticMinimum Function (GPL), aestheticMissing Function (GPL)

Applies To

SCALE Statement (GPL)


probit Scale (GPL)

scale types (GPL),scale types (GPL),scale types (GPL)
probit,probit,probit
probit scale (GPL),probit scale (GPL),probit scale (GPL)

Syntax

probit(dim(<numeric>), <function>)

or

probit(aesthetic(aesthetic.<aesthetic type>), <function>)

<numeric>. A numeric value indicating the dimension to which the scale applies. See the topic dim Function (GPL) for more information.

<function>. One or more valid functions.

<aesthetic type>. An aesthetic type indicating the aesthetic to which the scale applies. This is an aesthetic created as the result of an aesthetic function (such as size) in the ELEMENT statement.

Description

Creates a probit scale. Data values for this scale must fall in the closed interval [0, 1]. That is, for any data value x, 0 ≤ x ≤ 1.

Example

Example: Specifying a probit scale
probit(dim(2))

Valid Functions

aestheticMaximum Function (GPL), aestheticMinimum Function (GPL), aestheticMissing Function (GPL)

Applies To

SCALE Statement (GPL)


safeLog Scale (GPL)

scale types (GPL),scale types (GPL),scale types (GPL)
safeLog,safeLog,safeLog
safeLog scale (GPL),safeLog scale (GPL),safeLog scale (GPL)

Syntax

safeLog(dim(<numeric>), <function>)

or

safeLog(aesthetic(aesthetic.<aesthetic type>), <function>)

<numeric>. A numeric value indicating the dimension to which the scale applies. See the topic dim Function (GPL) for more information.

<function>. One or more valid functions. These are optional.

<aesthetic type>. An aesthetic type indicating the aesthetic to which the scale applies. This is an aesthetic created as the result of an aesthetic function (such as size) in the ELEMENT statement.

Description

Creates a "safe" logarithmic scale. Unlike a regular log scale, the safe log scale uses a modified function to handle 0 and negative values. If a base is not explicitly specified, the default is base 10.

Formula for Safe Log Transformation Collapse Hide details

The safe log formula is:

sign(x) * log(1 + abs(x))

So if you assume that the axis value is –99, the result of the transformation is:

sign(-99) * log(1 + abs(-99)) = -1 * log(1 + 99) = -1 * 2 = -2

Example

Example: Specifying the scale and a base
SCALE: safeLog(dim(2), base(2))

Valid Functions

aestheticMaximum Function (GPL), aestheticMinimum Function (GPL), aestheticMissing Function (GPL), dataMaximum Function (GPL), dataMinimum Function (GPL), include Function (GPL), base Function (GPL), max Function (GPL), min Function (GPL), origin Function (For GPL Scales), reverse Function (GPL)

Applies To

SCALE Statement (GPL)


safePower Scale (GPL)

scale types (GPL),scale types (GPL),scale types (GPL)
safePower,safePower,safePower
safePower scale (GPL),safePower scale (GPL),safePower scale (GPL)

Syntax

safePower(dim(<numeric>), <function>)

or

safePower(aesthetic(aesthetic.<aesthetic type>), <function>)

<numeric>. A numeric value indicating the dimension to which the scale applies. See the topic dim Function (GPL) for more information.

<function>. One or more valid functions. These are optional.

<aesthetic type>. An aesthetic type indicating the aesthetic to which the scale applies. This is an aesthetic created as the result of an aesthetic function (such as size) in the ELEMENT statement.

Description

Creates a "safe" power scale. Unlike a regular power scale, the safe power scale uses a modified function to handle negative values. If an exponent is not explicitly specified, the default is 0.5.

Formulas for Safe Power Transformation Collapse Hide details

When the exponent is a positive number, the safe power formulas are:

If (x>=0):
pow(1+x, exponent)-1
If (x<0):
1-pow(1-x, exponent)

When the exponent is a negative number, the safe power formulas are:

If (x>=0):
1-pow(1+x, exponent)
If (x<0):
pow(1-x, exponent)-1

So, if you assume the axis value is –99 and the exponent is 0.5, the result of the transformation is:

1 - pow(1 - (-99), 0.5) = 1 - pow(100, 0.5) = 1 - 10 = -9

So, if you assume the axis value is –99 and the exponent is –2, the result of the transformation is:

pow(1 - (-99), -2) - 1 = pow(100, -2) - 1 = 0.0001 - 1 = -0.999

Example

Example: Specifying the scale and an exponent
SCALE: safePower(dim(2), exponent(10))

Valid Functions

aestheticMaximum Function (GPL), aestheticMinimum Function (GPL), aestheticMissing Function (GPL), dataMaximum Function (GPL), dataMinimum Function (GPL), exponent Function (GPL), include Function (GPL), max Function (GPL), min Function (GPL), origin Function (For GPL Scales), reverse Function (GPL)

Applies To

SCALE Statement (GPL)


time Scale (GPL)

scale types (GPL),scale types (GPL),scale types (GPL)
time,time,time
time scale (GPL),time scale (GPL),time scale (GPL)

Syntax

time(dim(<numeric>), <function>)

or

time(aesthetic(aesthetic.<aesthetic type>), <function>)

<numeric>. A numeric value indicating the dimension to which the scale applies. See the topic dim Function (GPL) for more information.

<function>. One or more valid functions. These are optional.

<aesthetic type>. An aesthetic type indicating the aesthetic to which the scale applies. This is an aesthetic created as the result of an aesthetic function (such as size) in the ELEMENT statement.

Description

Creates a time scale.

Example

Example: Specifying a maximum value for the time scale
SCALE: time(dim(1), max("12/31/2005"))

Valid Functions

aestheticMaximum Function (GPL), aestheticMinimum Function (GPL), aestheticMissing Function (GPL), dataMaximum Function (GPL), dataMinimum Function (GPL), include Function (GPL), max Function (GPL), min Function (GPL), origin Function (For GPL Scales), reverse Function (GPL)

Applies To

SCALE Statement (GPL)


GUIDE Statement (GPL)

statements (GPL),statements (GPL),statements (GPL)
GUIDE,GUIDE,GUIDE
GUIDE statement (GPL),GUIDE statement (GPL),GUIDE statement (GPL)

Syntax

GUIDE: <guide type>

<guide type>. A valid guide type.

Description

Specifies a guide for the graph. Guides provide additional information that can help a viewer interpret the graph. An axis is a guide because it provides labels for the categories and values in a graph (but is separate from the scale on which the data are drawn). A title is a guide because it describes the graph. A legend is a guide because it provides color swatches to match a category name to specific instances of a graphic element in the graph.

Examples

Example: Axis
GUIDE: axis(dim(2), label("Mean Current Salary"))

Guide Types

axis Guide Type (GPL), form.line Guide Type (GPL), legend Guide Type (GPL), text.footnote Guide Type (GPL), text.subfootnote Guide Type (GPL), text.subsubfootnote Guide Type (GPL), text.subtitle Guide Type (GPL), text.subsubtitle Guide Type (GPL), text.title Guide Type (GPL)


GPL Guide Types

There are several different types of guides.

Guide Types

axis Guide Type (GPL), form.line Guide Type (GPL), legend Guide Type (GPL), text.footnote Guide Type (GPL), text.subfootnote Guide Type (GPL), text.subsubfootnote Guide Type (GPL), text.subtitle Guide Type (GPL), text.subsubtitle Guide Type (GPL), text.title Guide Type (GPL)


axis Guide Type (GPL)

guide types (GPL),guide types (GPL),guide types (GPL)
axis,axis,axis
axis guide (GPL),axis guide (GPL),axis guide (GPL)

Syntax

axis(dim(<numeric>), <function>)

or

axis(scale(<scale name>), <function>)

<numeric>. A numeric value indicating the dimension to which the scale applies. See the topic dim Function (GPL) for more information.

<function>. One or more valid functions. Use the null() function to hide the axis.

<scale name>. The name of the scale to which the axis applies. See the topic scale Function (For GPL Axes) for more information.

Description

Specifies the axis for a particular dimension. Do not confuse the axis with the scale. They are separate parts of the graph and are handled with separate GPL statements. The axis helps interpret the scale with labels and tick marks, but the axis does not change the positioning of graphic elements as changing the scale would. For information about scales, see SCALE Statement (GPL).

Examples

Example: Specifying an axis label for a dimension with one scale
GUIDE: axis(dim(2), label("Mean Current Salary"))
Example: Specifying axis labels for a dimension with two scales
SCALE: y1 = linear(dim(2))
SCALE: y2 = linear(dim(2))
GUIDE: axis(scale(y1), label("Mean Salary"))
GUIDE: axis(scale(y2), label("Count"), opposite(), color(color.red))

Valid Functions

color Function (For GPL Guides), delta Function (GPL), gap Function (GPL), gridlines Function (GPL), label Function (For GPL Guides), opposite Function (GPL), format.date Function (GPL), format.dateTime Function (GPL), format.time Function (GPL), unit.percent Function (GPL), start Function (GPL), ticks Function (GPL)

Applies To

GUIDE Statement (GPL)


form.line Guide Type (GPL)

guide types (GPL),guide types (GPL),guide types (GPL)
form.line,form.line,form.line
line,line,line
line guide (GPL),line guide (GPL),line guide (GPL)
form.line guide (GPL),form.line guide (GPL),form.line guide (GPL)
reference line (GPL),reference line (GPL),reference line (GPL)

Syntax

form.line(<function>)

<function>. One or more valid functions. The position function is required.

Description

Specifies a vertical or horizontal reference line. For information about specifying the location of the line, see position Function (For GPL Guides).

Examples

Example: Horizontal reference line
GUIDE: form.line(position(*, 5000))
Example: Vertical reference line
GUIDE: form.line(position(5000, *))

Valid Functions

color.brightness Function (For GPL Guides), color Function (For GPL Guides), color.hue Function (For GPL Guides), label Function (For GPL Guides), position Function (For GPL Guides), color.saturation Function (For GPL Guides), scale Function (For GPL Graphic Elements and form.line), shape Function (For GPL Guides), size Function (For GPL Guides), transparency Function (For GPL Guides)

Applies To

GUIDE Statement (GPL)


legend Guide Type (GPL)

guide types (GPL),guide types (GPL),guide types (GPL)
legend,legend,legend
legend guide (GPL),legend guide (GPL),legend guide (GPL)

Syntax

legend(aesthetic(aesthetic.<aesthetic type>), <function>)

<aesthetic type>. An aesthetic associated with the legend. The aesthetic identifies the legend, which was created as the result of an aesthetic function in the ELEMENT statement.

<function>. One or more valid functions. Use the null() function to hide the legend.

Description

Specifies properties of the legend associated with a specific aesthetic, which is defined by an aesthetic function in the ELEMENT statement. The legend provides a visual representation of the scale created by the aesthetic function. Thus, a legend guide is related to the aesthetic scale in the same way an axis guide is related to a dimension scale. Note that using a uniform aesthetic value in the aesthetic function (for example, color(color.blue)) does not create a scale. Therefore, the legend is not used in that case.

Examples

Example: Specifying a legend title
GUIDE: legend(aesthetic(aesthetic.color), label("Gender"))
ELEMENT: interval(position(summary.count(jobcat)), color(gender))

Valid Functions

label Function (For GPL Guides)

Applies To

GUIDE Statement (GPL)


text.footnote Guide Type (GPL)

Syntax

guide types (GPL),guide types (GPL),guide types (GPL)
text.footnote,text.footnote,text.footnote
text.footnote guide (GPL),text.footnote guide (GPL),text.footnote guide (GPL)
footnote (GPL),footnote (GPL),footnote (GPL)
text.footnote(<function>)

<function>. One or more valid functions.

Description

Specifies the footnote for the graph.

Examples

Example: Specifying the footnote text
GUIDE: text.footnote(label("Some Text"))

Valid Functions

label Function (For GPL Guides)

Applies To

GUIDE Statement (GPL)


text.subfootnote Guide Type (GPL)

guide types (GPL),guide types (GPL),guide types (GPL)
text.subfootnote,text.subfootnote,text.subfootnote
text.subfootnote guide (GPL),text.subfootnote guide (GPL),text.subfootnote guide (GPL)
subfootnote guide (GPL),subfootnote guide (GPL),subfootnote guide (GPL)
footnote (GPL),footnote (GPL),footnote (GPL)

Syntax

text.subfootnote(<function>)

<function>. One or more valid functions.

Description

Specifies the second-level footnote for the graph. That is, the subfootnote appears below the footnote.

Examples

Example: Specifying the second-level footnote text
GUIDE: text.subfootnote(label("Some Text"))

Valid Functions

label Function (For GPL Guides)

Applies To

GUIDE Statement (GPL)


text.subsubfootnote Guide Type (GPL)

guide types (GPL),guide types (GPL),guide types (GPL)
text.subsubfootnote,text.subsubfootnote,text.subsubfootnote
text.subsubfootnote guide (GPL),text.subsubfootnote guide (GPL),text.subsubfootnote guide (GPL)
subsubfootnote guide (GPL),subsubfootnote guide (GPL),subsubfootnote guide (GPL)
footnote (GPL),footnote (GPL),footnote (GPL)

Syntax

text.subsubfootnote(<function>)

<function>. One or more valid functions.

Description

Specifies the third-level footnote for the graph. That is, the subsubfootnote appears below the subfootnote.

Examples

Example: Specifying the third-level footnote text
GUIDE: text.subsubfootnote(label("Some Text"))

Valid Functions

label Function (For GPL Guides)

Applies To

GUIDE Statement (GPL)


text.subtitle Guide Type (GPL)

guide types (GPL),guide types (GPL),guide types (GPL)
text.subtitle,text.subtitle,text.subtitle
text.subtitle guide (GPL),text.subtitle guide (GPL),text.subtitle guide (GPL)
subtitle guide (GPL),subtitle guide (GPL),subtitle guide (GPL)
title 2 (GPL),title 2 (GPL),title 2 (GPL)

Syntax

text.subtitle(<function>)

<function>. One or more valid functions.

Description

Specifies the subtitle for the graph.

Examples

Example: Specifying the subtitle text
GUIDE: text.subtitle(label("Some Text"))

Valid Functions

label Function (For GPL Guides)

Applies To

GUIDE Statement (GPL)


text.subsubtitle Guide Type (GPL)

guide types (GPL),guide types (GPL),guide types (GPL)
text.subsubtitle,text.subsubtitle,text.subsubtitle
text.subsubtitle guide (GPL),text.subsubtitle guide (GPL),text.subsubtitle guide (GPL)
subsubtitle guide (GPL),subsubtitle guide (GPL),subsubtitle guide (GPL)
title 3 (GPL),title 3 (GPL),title 3 (GPL)

Syntax

text.subsubtitle(<function>)

<function>. One or more valid functions.

Description

Specifies the second-level subtitle for the graph.

Examples

Example: Specifying the second-level subtitle text
GUIDE: text.subsubtitle(label("Some Text"))

Valid Functions

label Function (For GPL Guides)

Applies To

GUIDE Statement (GPL)


text.title Guide Type (GPL)

guide types (GPL),guide types (GPL),guide types (GPL)
text.title,text.title,text.title
text.title guide (GPL),text.title guide (GPL),text.title guide (GPL)
title guide (GPL),title guide (GPL),title guide (GPL)

Syntax

text.title(<function>)

<function>. One or more valid functions.

Description

Specifies the title for the graph.

Examples

Example: Specifying the title text
GUIDE: text.title(label("Salary by Gender"))

Valid Functions

label Function (For GPL Guides)

Applies To

GUIDE Statement (GPL)


ELEMENT Statement (GPL)

statements (GPL),statements (GPL),statements (GPL)
ELEMENT,ELEMENT,ELEMENT
ELEMENT statement (GPL),ELEMENT statement (GPL),ELEMENT statement (GPL)
graphic elements (GPL),graphic elements (GPL),graphic elements (GPL)

Syntax

ELEMENT: <element type>

<element type>. A valid element type.

Description

Specifies a graphic element used to draw data on the graph. Graphic elements are the bars, points, lines, etc., that make up a graph.

There can be multiple ELEMENT statements in the same block of GPL to create multiple graphic elements. In this case, the variables in multiple ELEMENT statements share the same dimension and aesthetic scales.

For example, assume the GPL includes the following ELEMENT statements:

ELEMENT: point(position(x*y))
ELEMENT: point(position(x2*y2))

In the resulting graph, dimension 1 uses x+x2, and dimension 2 uses y+y2.

Note: This behavior is sometimes called an implied blend because we could have written the GPL as follows:

ELEMENT: point(position(x*y+x2*y2))

Examples

Example: Scatterplot
ELEMENT: point(position(x*y))
Example: Line chart
ELEMENT: line(position(x*y))
Example: Bar chart of means
ELEMENT: interval(position(summary.mean(x*y)))

Graphic Element Types

area Element (GPL), edge Element (GPL), interval Element (GPL), line Element (GPL), path Element (GPL), point Element (GPL), polygon Element (GPL), schema Element (GPL)


GPL Graphic Element Types

There are several different types of elements for drawing data on a graph.

Graphic Element Types

area Element (GPL)
edge Element (GPL)
interval Element (GPL)
line Element (GPL)
path Element (GPL)
point Element (GPL)
polygon Element (GPL)
schema Element (GPL)


area Element (GPL)

element types (GPL),element types (GPL),element types (GPL)
area,area,area
graphic element types (GPL),graphic element types (GPL),graphic element types (GPL)
area,area,area
area element (GPL),area element (GPL),area element (GPL)

Syntax

area.<collision modifier>(<function>)

<collision modifier>. A method that specifies what should happen when two area graphic elements overlap each other. The collision modifier is optional.

<function>. One or more valid functions. The position function is required. The scale function is required when there are multiple scales in a single dimension (as in a "dual axis" graph).

Description

Specifies an area graphic element.

Examples

Example: Area chart
ELEMENT: area(position(summary.mean(jobcat*gender)))

Collision Modifiers

difference Collision Modifier (GPL), stack Collision Modifier (GPL)

Valid Functions

color.brightness Function (For GPL Graphic Elements), closed Function (GPL), color Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), jump Function (GPL), label Function (For GPL Graphic Elements), missing.gap Function (GPL), missing.interpolate Function (GPL), missing.wings Function (GPL), texture.pattern Function (GPL), position Function (For GPL Graphic Elements), preserveStraightLines Function (GPL), color.saturation Function (For GPL Graphic Elements), scale Function (For GPL Graphic Elements and form.line), split Function (GPL), transparency Function (For GPL Graphic Elements), visible Function (GPL)

Applies To

ELEMENT Statement (GPL)


bar Element (GPL)

element types (GPL),element types (GPL),element types (GPL)
bar,bar,bar
graphic element types (GPL),graphic element types (GPL),graphic element types (GPL)
bar,bar,bar
bar element (GPL),bar element (GPL),bar element (GPL)

Description

bar is an alias for interval. For the syntax and other examples, see interval Element (GPL).

Examples

Example: Bar chart
ELEMENT: bar(position(summary.mean(jobcat*gender)))


edge Element (GPL)

element types (GPL),element types (GPL),element types (GPL)
edge,edge,edge
graphic element types (GPL),graphic element types (GPL),graphic element types (GPL)
edge,edge,edge
edge element (GPL),edge element (GPL),edge element (GPL)

Syntax

edge(<function>)

<function>. One or more valid functions. The position function is required. The scale function is required when there are multiple scales in a single dimension (as in a "dual axis" graph).

Description

Specifies a vertex-edge graphic element. The edge element is typically used in conjunction with a link or layout function, which calculates the actual links among the vertices. The edge element is a graphical representation of these links.

Examples

Example: Minimum spanning tree
ELEMENT: edge(position(link.mst(x*y))
Example: Convex hull
ELEMENT: edge(position(link.hull(x*y))

Valid Functions

color.brightness Function (For GPL Graphic Elements), closed Function (GPL), color Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), label Function (For GPL Graphic Elements), missing.gap Function (GPL), missing.interpolate Function (GPL), missing.wings Function (GPL), position Function (For GPL Graphic Elements), preserveStraightLines Function (GPL), color.saturation Function (For GPL Graphic Elements), scale Function (For GPL Graphic Elements and form.line), shape Function (For GPL Graphic Elements), size Function (For GPL Graphic Elements), split Function (GPL), transparency Function (For GPL Graphic Elements), visible Function (GPL)

Applies To

ELEMENT Statement (GPL)


interval Element (GPL)

element types (GPL),element types (GPL),element types (GPL)
interval,interval,interval
graphic element types (GPL),graphic element types (GPL),graphic element types (GPL)
interval,interval,interval
interval element (GPL),interval element (GPL),interval element (GPL)

Syntax

interval.<collision modifier>(<function>)

<collision modifier>. A method that specifies what should happen when two interval graphic elements overlap each other. The collision modifier is optional.

<function>. One or more valid functions. The position function is required. The scale function is required when there are multiple scales in a single dimension (as in a "dual axis" graph).

Description

Specifies an interval (bar) graphic element, as would be used in a bar chart, histogram, or error bar chart.

Examples

Example: Bar chart
ELEMENT: interval(position(summary.mean(jobcat*salary)))
Example: Histogram
ELEMENT: interval(position(bin.rect(summary.count(salary))))
Example: Error bar chart
ELEMENT: interval(position(region.confi.mean(jobcat*salary)), shape(shape.ibeam))
Example: Stacked bar chart
ELEMENT: interval.stack(position(summary.sum(jobcat*salary)), color(gender))

Collision Modifiers

dodge Collision Modifier (GPL), stack Collision Modifier (GPL)

Valid Functions

color.brightness Function (For GPL Graphic Elements), color Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), label Function (For GPL Graphic Elements), texture.pattern Function (GPL), position Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), scale Function (For GPL Graphic Elements and form.line), shape Function (For GPL Graphic Elements), size Function (For GPL Graphic Elements), split Function (GPL), transparency Function (For GPL Graphic Elements), visible Function (GPL)

Applies To

ELEMENT Statement (GPL)


line Element (GPL)

Syntax

element types (GPL),element types (GPL),element types (GPL)
line,line,line
graphic element types (GPL),graphic element types (GPL),graphic element types (GPL)
line,line,line
line element (GPL),line element (GPL),line element (GPL)
line.<collision modifier>(<function>)

<collision modifier>. A method that specifies what should happen when two line graphic elements overlap each other. The collision modifier is optional.

<function>. One or more valid functions. The position function is required. The scale function is required when there are multiple scales in a single dimension (as in a "dual axis" graph).

Description

Specifies a line graphic element. The line is drawn through values in the order in which they appear in the x-axis domain. This is one of the features that distinguishes a line graphic element from the path graphic element. See path Element (GPL) for more information about the path graphic element.

Examples

Example: Line chart of continuous variables
ELEMENT: line(position(salbegin*salary))
Example: Line chart of a summary statistic
ELEMENT: line(position(summary.mean(jobcat*salary)))

Collision Modifiers

stack Collision Modifier (GPL)

Valid Functions

color.brightness Function (For GPL Graphic Elements), closed Function (GPL), color Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), jump Function (GPL), label Function (For GPL Graphic Elements), missing.gap Function (GPL), missing.interpolate Function (GPL), missing.wings Function (GPL), position Function (For GPL Graphic Elements), preserveStraightLines Function (GPL), color.saturation Function (For GPL Graphic Elements), scale Function (For GPL Graphic Elements and form.line), shape Function (For GPL Graphic Elements), size Function (For GPL Graphic Elements), split Function (GPL), transparency Function (For GPL Graphic Elements), visible Function (GPL)

Applies To

ELEMENT Statement (GPL)


path Element (GPL)

Syntax

element types (GPL),element types (GPL),element types (GPL)
path,path,path
graphic element types (GPL),graphic element types (GPL),graphic element types (GPL)
path,path,path
path element (GPL),path element (GPL),path element (GPL)
path(<function>)

<function>. One or more valid functions. The position function is required. The scale function is required when there are multiple scales in a single dimension (as in a "dual axis" graph).

Description

Specifies a path graphic element. The path graphic element connects the data values in the order in which their associated cases appear in the dataset. Therefore, it can cross back on itself. This is one of the features that distinguishes the path graphic element from the line graphic element. Additionally, paths can have variable sizes, so another variable can control the thickness of the path at any particular point.

Examples

Example: Line chart drawn through all values
ELEMENT: path(position(salbegin*salary))
Example: Creating a line chart with variable widths
ELEMENT: path(position(salbegin*salary), size(educ))

Valid Functions

color.brightness Function (For GPL Graphic Elements), closed Function (GPL), color Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), label Function (For GPL Graphic Elements), missing.gap Function (GPL), missing.interpolate Function (GPL), missing.wings Function (GPL), position Function (For GPL Graphic Elements), preserveStraightLines Function (GPL), color.saturation Function (For GPL Graphic Elements), scale Function (For GPL Graphic Elements and form.line), shape Function (For GPL Graphic Elements), size Function (For GPL Graphic Elements), split Function (GPL), transparency Function (For GPL Graphic Elements), visible Function (GPL)

Applies To

ELEMENT Statement (GPL)


point Element (GPL)

Syntax

element types (GPL),element types (GPL),element types (GPL)
point,point,point
graphic element types (GPL),graphic element types (GPL),graphic element types (GPL)
point,point,point
point element (GPL),point element (GPL),point element (GPL)
point.<collision modifier>(<function>)

<collision modifier>. A method that specifies what should happen when two points overlap each other. The collision modifier is optional.

<function>. One or more valid functions. The position function is required. The scale function is required when there are multiple scales in a single dimension (as in a "dual axis" graph).

Description

Specifies a point graphic element, as would be used in a scatterplot.

Examples

Example: Scatterplot
ELEMENT: point(position(salbegin*salary))
Example: Dot plot
ELEMENT: point.dodge.symmetric(position(bin.dot(salary)))

Collision Modifiers

dodge.asymmetric Collision Modifier (GPL), dodge.symmetric Collision Modifier (GPL), jitter Collision Modifier (GPL), stack Collision Modifier (GPL)

Valid Functions

color.brightness Function (For GPL Graphic Elements), color Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), label Function (For GPL Graphic Elements), texture.pattern Function (GPL), position Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), scale Function (For GPL Graphic Elements and form.line), shape Function (For GPL Graphic Elements), size Function (For GPL Graphic Elements), split Function (GPL), transparency Function (For GPL Graphic Elements), visible Function (GPL)

Applies To

ELEMENT Statement (GPL)


polygon Element (GPL)

element types (GPL),element types (GPL),element types (GPL)
polygon,polygon,polygon
graphic element types (GPL),graphic element types (GPL),graphic element types (GPL)
polygon,polygon,polygon
polygon element (GPL),polygon element (GPL),polygon element (GPL)

Syntax

polygon(<function>)

<function>. One or more valid functions. The position function is required. The scale function is required when there are multiple scales in a single dimension (as in a "dual axis" graph).

Description

Specifies a polygonal graphic element. A polygon connects multiple points to create an enclosed space. For example, it may be used to draw a state or country in a map, or it may be used to draw the outline of a two-dimensional bin.

Examples

Example: Hexagonal binning
ELEMENT: polygon(position(bin.hex(x*y, dim(1,2)), color(summary.count()))

Valid Functions

color.brightness Function (For GPL Graphic Elements), color Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), label Function (For GPL Graphic Elements), position Function (For GPL Graphic Elements), preserveStraightLines Function (GPL), color.saturation Function (For GPL Graphic Elements), scale Function (For GPL Graphic Elements and form.line), shape Function (For GPL Graphic Elements), size Function (For GPL Graphic Elements), split Function (GPL), transparency Function (For GPL Graphic Elements), visible Function (GPL)

Applies To

ELEMENT Statement (GPL)


schema Element (GPL)

element types (GPL),element types (GPL),element types (GPL)
schema,schema,schema
graphic element types (GPL),graphic element types (GPL),graphic element types (GPL)
schema,schema,schema
schema element (GPL),schema element (GPL),schema element (GPL)
boxplot (GPL),boxplot (GPL),boxplot (GPL)

Syntax

schema(<function>)

<function>. One or more valid functions. The position function is required. The scale function is required when there are multiple scales in a single dimension (as in a "dual axis" graph).

Description

Specifies a schema (boxplot) graphic element.

Examples

Example: Boxplot
ELEMENT: schema(position(bin.quantile.letter(jobcat*salary)))

Valid Functions

color.brightness Function (For GPL Graphic Elements), color Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), label Function (For GPL Graphic Elements), texture.pattern Function (GPL), position Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), scale Function (For GPL Graphic Elements and form.line), size Function (For GPL Graphic Elements), split Function (GPL), transparency Function (For GPL Graphic Elements), visible Function (GPL)

Applies To

ELEMENT Statement (GPL)


GPL Collision Modifiers

Collision modifiers specify what happens when two graphic elements overlap.

Collision Modifiers

difference Collision Modifier (GPL)
dodge Collision Modifier (GPL)
dodge.asymmetric Collision Modifier (GPL)
dodge.symmetric Collision Modifier (GPL)
jitter Collision Modifier (GPL)
stack Collision Modifier (GPL)


difference Collision Modifier (GPL)

collision modifiers (GPL),collision modifiers (GPL),collision modifiers (GPL)
difference,difference,difference
difference collision modifier (GPL),difference collision modifier (GPL),difference collision modifier (GPL)

Syntax

<element type>.difference

<element type>. A valid element type.

Description

Clips graphic elements and draws the difference between dichotomous values. The aesthetic value associated with the greater value in a group determines the aesthetic for the result. This function is used to create a difference area graph. It is useful to compare the result to the one obtained when using the stack position modifier.

Examples

Example: Difference area chart
ELEMENT: area.difference(position(summary.sum(jobcat*salary)), color(gender))

Valid Element Types

area Element (GPL)


dodge Collision Modifier (GPL)

collision modifiers (GPL),collision modifiers (GPL),collision modifiers (GPL)
dodge,dodge,dodge
dodge collision modifier (GPL),dodge collision modifier (GPL),dodge collision modifier (GPL)

Syntax

<element type>.dodge

<element type>. A valid element type.

Description

Moves graphic elements next to other graphic elements that appear at the same value, rather than superimposing them. The graphic elements are arranged symmetrically. That is, the graphic elements are moved to opposite sides of a central position. For point elements, this function is the same as dodge.symmetric. (See dodge.symmetric Collision Modifier (GPL).)

Although dodged charts can look similar to clustered charts, they are not the same. Clustering changes the coordinates. Dodging only repositions graphic elements to avoid collisions. Therefore, a clustered chart allocates space for missing categories while a dodged chart does not.

Examples

Example: 2-D Dot plot
ELEMENT: point.dodge(position(bin.dot(salary*jobcat)))
Example: Dodged bar chart
ELEMENT: interval.dodge(position(summary.mean(jobcat*salary)), color(gender))

Valid Element Types

interval Element (GPL), point Element (GPL)


dodge.asymmetric Collision Modifier (GPL)

collision modifiers (GPL),collision modifiers (GPL),collision modifiers (GPL)
dodge.asymmetric,dodge.asymmetric,dodge.asymmetric
dodge.asymmetric collision modifier (GPL),dodge.asymmetric collision modifier (GPL),dodge.asymmetric collision modifier (GPL)

Syntax

<element type>.dodge.asymmetric

<element type>. A valid element type.

Description

Moves graphic elements next to other graphic elements that appear at the same value, rather than superimposing them. The graphic elements are arranged asymmetrically. That is, the graphic elements are stacked on top of one another, with the graphic element on the bottom positioned at a specific value on the scale. dodge.asymmetric is typically used for 1-D dot plots.

Examples

Example: 1-D Dot plot
ELEMENT: point.dodge.asymmetric(position(bin.dot(salary)))

Valid Element Types

point Element (GPL)


dodge.symmetric Collision Modifier (GPL)

collision modifiers (GPL),collision modifiers (GPL),collision modifiers (GPL)
dodge.symmetric,dodge.symmetric,dodge.symmetric
dodge.symmetric collision modifier (GPL),dodge.symmetric collision modifier (GPL),dodge.symmetric collision modifier (GPL)

Syntax

<element type>.dodge.symmetric

<element type>. A valid element type.

Description

Moves graphic elements next to other graphic elements that appear at the same value, rather than superimposing them. The graphic elements are arranged symmetrically. That is, the graphic elements extend in two directions from a central position. dodge.asymmetric is typically used for 2-D dot plots.

Examples

Example: 2-D Dot plot
ELEMENT: point.dodge.symmetric(position(bin.dot(salary*jobcat)))

Valid Element Types

point Element (GPL)


jitter Collision Modifier (GPL)

collision modifiers (GPL),collision modifiers (GPL),collision modifiers (GPL)
jitter,jitter,jitter
jitter collision modifier (GPL),jitter collision modifier (GPL),jitter collision modifier (GPL)

Syntax

<element type>.jitter.<jitter type>

<element type>. A valid element type.

<jitter type>. A valid jitter type. This is optional. If no type is specified, jitter.joint.uniform is used.

Description

Repositions graphic elements randomly using a normal or uniform distribution.

Examples

Example: Jittered categorical point chart
ELEMENT: point.jitter(position(jobcat*gender))
Jitter types
Type | Meaning
joint | Same as joint.uniform
conditional | Same as conditional.uniform
normal | Same as joint.normal
uniform | Same as joint.uniform
joint.normal | Jitter points in all dimensions using a normal distribution
joint.uniform | Jitter points in all dimensions using a uniform distribution
conditional.normal | Jitter points in the analysis dimension using a normal distribution
conditional.uniform | Jitter points in the analysis dimension using a uniform distribution

Valid Element Types

point Element (GPL)


stack Collision Modifier (GPL)

collision modifiers (GPL),collision modifiers (GPL),collision modifiers (GPL)
stack,stack,stack
stack collision modifier (GPL),stack collision modifier (GPL),stack collision modifier (GPL)

Syntax

<element type>.stack

<element type>. A valid element type.

Description

Stacks graphic elements that would normally be superimposed when they have the same data values.

Examples

Example: Stacked bar chart
ELEMENT: interval.stack(position(summary.mean(jobcat*salary)), color(gender))

Valid Element Types

area Element (GPL), interval Element (GPL), line Element (GPL), point Element (GPL)


GPL Functions

Functions are used within GPL statements. Functions can also be embedded in other functions.

Aesthetic Functions

color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), shape Function (For GPL Graphic Elements), size Function (For GPL Graphic Elements), texture.pattern Function (GPL), transparency Function (For GPL Graphic Elements), visible Function (GPL)

Aesthetic Mapping Functions

aestheticMaximum Function (GPL), aestheticMinimum Function (GPL), aestheticMissing Function (GPL), map Function (GPL)

Guide Aesthetic Functions

color Function (For GPL Guides), color.brightness Function (For GPL Guides), color.hue Function (For GPL Guides), color.saturation Function (For GPL Guides), shape Function (For GPL Guides), size Function (For GPL Guides), transparency Function (For GPL Guides)

Data Functions

col Function (GPL), iter Function (GPL)

Data Source Functions

csvSource Function (GPL), savSource Function (GPL), sqlSource Function (GPL), userSource Function (GPL)

Binning Functions

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL)

Graph Control Functions

begin Function (For GPL Graphs), end Function (GPL)

Missing Value Functions for Lines and Areas

missing.gap Function (GPL), missing.interpolate Function (GPL), missing.wings Function (GPL)

Percentage Base Functions

base.aesthetic Function (GPL), base.all Function (GPL), base.coordinate Function (GPL)

Probability Scale Distribution Functions

beta Function (GPL), chiSquare Function (GPL), exponential Function (GPL), f Function (GPL), gamma Function (GPL), logistic Function (GPL), normal Function (GPL), poisson Function (GPL), studentizedRange Function (GPL), t Function (GPL), uniform Function (GPL), weibull Function (GPL)

Sort Functions

sort.data Function (GPL), sort.natural Function (GPL), sort.statistic Function (GPL), sort.values Function (GPL)

Statistic Functions

density.beta Function (GPL), density.chiSquare Function (GPL), density.exponential Function (GPL), density.f Function (GPL), density.gamma Function (GPL), density.kernel Function (GPL), density.logistic Function (GPL), density.normal Function (GPL), density.poisson Function (GPL), density.studentizedRange Function (GPL), density.t Function (GPL), density.uniform Function (GPL), density.weibull Function (GPL), layout.circle Function (GPL), layout.dag Function (GPL), layout.data Function (GPL), layout.grid Function (GPL), layout.network Function (GPL), layout.random Function (GPL), layout.tree Function (GPL), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.confi.smooth Function (GPL), region.spread.range Function (GPL), region.spread.sd Function (GPL), region.spread.se Function (GPL), smooth.cubic Function (GPL), smooth.linear Function (GPL), smooth.loess Function (GPL), smooth.mean Function (GPL), smooth.median Function (GPL), smooth.quadratic Function (GPL), smooth.spline Function (GPL), smooth.step Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL)

Transformation Functions

collapse Function (GPL), eval Function (GPL), index Function (GPL)

Other Functions

alpha Function (GPL), base Function (GPL), begin Function (For GPL Graphs), begin Function (For GPL Pages), binCount Function (GPL), binStart Function (GPL), binWidth Function (GPL), closed Function (GPL), cluster Function (GPL), dataMaximum Function (GPL), dataMinimum Function (GPL), delta Function (GPL), dim Function (GPL), end Function (GPL), exclude Function (GPL), exponent Function (GPL), format Function (GPL), format.date Function (GPL), format.dateTime Function (GPL), format.time Function (GPL), from Function (GPL), gap Function (GPL), gridlines Function (GPL), in Function (GPL), include Function (GPL), jump Function (GPL), label Function (For GPL Graphic Elements), label Function (For GPL Guides), marron Function (GPL), max Function (GPL), min Function (GPL), missing.listwise Function (GPL), missing.pairwise Function (GPL), multiple Function (GPL), noConstant Function (GPL), node Function (GPL), notIn Function (GPL), opposite Function (GPL), origin Function (For GPL Graphs), origin Function (For GPL Scales), position Function (For GPL Graphic Elements), position Function (For GPL Guides), preserveStraightLines Function (GPL), proportion Function (GPL), reverse Function (GPL), root Function (GPL), sameRatio Function (GPL), scale Function (For GPL Axes), scale Function (For GPL Graphs), scale Function (For GPL Graphic Elements and form.line), scale Function (For GPL Pages), segments Function (GPL), showAll Function (GPL), split Function (GPL), start Function (GPL), startAngle Function (GPL), ticks Function (GPL), to Function (GPL), unit.percent Function (GPL), values Function (GPL), weight Function (GPL)


aestheticMaximum Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
aestheticMaximum,aestheticMaximum,aestheticMaximum
aestheticMaximum function (GPL),aestheticMaximum function (GPL),aestheticMaximum function (GPL)

Syntax

aestheticMinimum(<aesthetic type>.<aesthetic constant>)

or

aestheticMinimum(<aesthetic type>."aesthetic value")

<aesthetic type>. An aesthetic type indicating the specific aesthetic for which a maximum value is being specified. This is an aesthetic created as the result of an aesthetic function (such as size) in the ELEMENT statement.

<aesthetic constant>. A constant for the aesthetic (for example, size.huge). Valid constants depend on the aesthetic.

"aesthetic value". A specific value for the aesthetic (for example, size."10px". Valid values depend on the aesthetic.

Description

Specifies an aesthetic value that is mapped to the maximum data value for a scale. The maximum data value may be a "nice value" based on the data (the default), the exact data maximum (if using the dataMaximum function on the scale), or a specified value (if using the max function on the scale). For example, a graphic element may be sized by a continuous value. By default, the continuous scale has a "nice value" maximum. The aestheticMaximum function can map a size to this maximum value.

Examples

Example: Specifying a minimum and maximum size for points in a bubble plot
SCALE: linear(aesthetic(aesthetic.size), aestheticMinimum(size."1px"),
              aestheticMaximum(size."5px"))
ELEMENT: point(position(x*y), size(z))

Applies To

asn Scale (GPL), atanh Scale (GPL), linear Scale (GPL), log Scale (GPL), logit Scale (GPL), pow Scale (GPL), prob Scale (GPL), probit Scale (GPL), safeLog Scale (GPL), safePower Scale (GPL), time Scale (GPL)


aestheticMinimum Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
aestheticMinimum,aestheticMinimum,aestheticMinimum
aestheticMinimum function (GPL),aestheticMinimum function (GPL),aestheticMinimum function (GPL)

Syntax

aestheticMinimum(<aesthetic type>.<aesthetic constant>)

or

aestheticMinimum(<aesthetic type>."<aesthetic value>")

<aesthetic type>. An aesthetic type indicating the specific aesthetic for which a minimum value is being specified. This is an aesthetic created as the result of an aesthetic function (such as size) in the ELEMENT statement.

<aesthetic constant>. A constant for the aesthetic (for example, size.tiny). Valid constants depend on the aesthetic.

"aesthetic value". A specific value for the aesthetic (for example, size."1px". Valid values depend on the aesthetic.

Description

Specifies an aesthetic value that is mapped to the minimum data value for a scale. The minimum data value may be a "nice value" based on the data (the default), the exact data minimum (if using the dataMinimum function on the scale), or a specified value (if using the min function on the scale). For example, a graphic element may be sized by a continuous value. By default, the continuous scale has a "nice value" minimum. The aestheticMinimum function can map a size to this minimum value.

Examples

Example: Specifying a minimum and maximum size for points in a bubble plot
SCALE: linear(aesthetic(aesthetic.size), aestheticMinimum(size."1px"),
              aestheticMaximum(size."5px"))
ELEMENT: point(position(x*y), size(z))

Applies To

asn Scale (GPL), atanh Scale (GPL), linear Scale (GPL), log Scale (GPL), logit Scale (GPL), pow Scale (GPL), prob Scale (GPL), probit Scale (GPL), safeLog Scale (GPL), safePower Scale (GPL), time Scale (GPL)


aestheticMissing Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
aestheticMissing,aestheticMissing,aestheticMissing
aestheticMissing function (GPL),aestheticMissing function (GPL),aestheticMissing function (GPL)

Syntax

aestheticMissing(<aesthetic type>.<aesthetic constant>)

or

aestheticMissing(<aesthetic type>."<aesthetic value>")

<aesthetic type>. An aesthetic type indicating the specific aesthetic for which a missing value aesthetic is being specified. This is an aesthetic created as the result of an aesthetic function (such as size) in the ELEMENT statement.

<aesthetic constant>. A constant for the aesthetic (for example, size.tiny). Valid constants depend on the aesthetic.

"aesthetic value". A specific value for the aesthetic (for example, size."1px". Valid values depend on the aesthetic.

Description

Specifies an aesthetic value that is mapped to missing values for a scale.

Examples

Example: Specifying a missing value aesthetic for a scale
SCALE: linear(aesthetic(aesthetic.color), aestheticMissing(color.black))
ELEMENT: point(position(x*y), color(z))

Applies To

asn Scale (GPL), atanh Scale (GPL), cat Scale (GPL), linear Scale (GPL), log Scale (GPL), logit Scale (GPL), pow Scale (GPL), prob Scale (GPL), probit Scale (GPL), safeLog Scale (GPL), safePower Scale (GPL), time Scale (GPL)


alpha Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
alpha,alpha,alpha
alpha function (GPL),alpha function (GPL),alpha function (GPL)

Syntax

alpha(<numeric>)

<numeric>. A numeric value between 0 and 1.

Description

Specifies a percentage value used to calculate a percentile value or confidence interval.

Examples

Example: Specifying a 99% confidence interval
ELEMENT: interval(position(region.confi.mean(jobcat*salary, alpha(0.99))))

Applies To

region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.confi.smooth Function (GPL), summary.percentile Function (GPL)


base Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
base,base,base
base function (GPL),base function (GPL),base function (GPL)

Syntax

base(<numeric>)

<numeric>. A numeric value indicating the base for the logarithmic scale.

Description

Specifies a base for the logarithmic scale.

Examples

Example: Specifying a different base for a logarithmic scale
SCALE: log(dim(2), base(2))

Applies To

log Scale (GPL), safeLog Scale (GPL)


base.aesthetic Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
base.aesthetic,base.aesthetic,base.aesthetic
base.aesthetic function (GPL),base.aesthetic function (GPL),base.aesthetic function (GPL)

Syntax

base.aesthetic(aesthetic(aesthetic.<aesthetic type>))

<aesthetic type>. An aesthetic whose associated variable is used as the percentage base.

Description

Specifies that the percentage is based on the count across the result of an aesthetic function. Summing the percentages of all of the cases in a specific aesthetic group equals 100%. For example, all blue bars sum to 100%, and all red bars sum to 100%.

Examples

Example: Using a variable across clusters as the percentage base
COORD: rect(dim(1,2), cluster(3))
ELEMENT: interval(position(summary.percent(summary.count(jobcat*1*gender),
                  base.aesthetic(aesthetic(aesthetic.color)))), color(jobcat))

Applies To

region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL)


base.all Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
base.all,base.all,base.all
base.all function (GPL),base.all function (GPL),base.all function (GPL)

Syntax

base.all()

or

base.all(acrossPanels())

Description

Specifies that the percentage is based on the total count. Summing the percentages of all of the graphic elements in the chart or in each panel equals 100%. If you are using paneling and want to specify the total count across all panels as the percentage base, use the acrossPanels function.

Examples

Example: Specifying the total count as the percentage base
COORD: rect(dim(1,2))
ELEMENT: interval(position(summary.percent(summary.count(jobcat),
                  base.all())))
Example: Specifying the total count in each panel as the percentage base
COORD: rect(dim(1,2))
ELEMENT: interval(position(summary.percent(summary.count(jobcat*1*gender),
                  base.all())))
Example: Specifying the total count across all panels as the percentage base
COORD: rect(dim(1,2))
ELEMENT: interval(position(summary.percent(summary.count(jobcat*1*gender),
                  base.all(acrossPanels()))))

Applies To

region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL)


base.coordinate Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
base.coordinate,base.coordinate,base.coordinate
base.coordinate function (GPL),base.coordinate function (GPL),base.coordinate function (GPL)

Syntax

base.coordinate(dim(<numeric>))

<numeric>. A numeric value indicating the dimension to which the scale applies. See the topic dim Function (GPL) for more information.

Description

Specifies that the percentage is based on the individual values along a specific dimension. Summing the percentages of all of the graphic elements with a particular value on the specified dimension equals 100%. For example, you may do this to specify that the segments in each stacked bar sum to 100%.

Examples

Example: Making each stack equal 100%
ELEMENT: interval.stack(position(summary.percent(summary.count(jobcat*1*gender),
         base.coordinate(dim(1)))), color(gender))
Example: Making each cluster equal 100%
COORD: rect(dim(1,2), cluster(3))
ELEMENT: interval(position(summary.percent(summary.count(gender*1*jobcat),
         base.coordinate(dim(3)))), color(gender))

Applies To

region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL)


begin Function (For GPL Graphs)

functions (GPL),functions (GPL),functions (GPL)
begin,begin,begin
begin function (GPL),begin function (GPL),begin function (GPL)

Syntax

begin(<function>)

<function>. One or more valid functions. These are optional.

Specifies the start of the GPL block that defines a particular graph.

Examples

Example: Scaling a graph by 50%
GRAPH: begin(scale(50%,50%))
Example: Defining a particular graph
GRAPH: begin()
ELEMENT: line(position(x*y))
GRAPH: end()

Valid Functions

origin Function (For GPL Graphs), scale Function (For GPL Graphs)

Applies To

GRAPH Statement (GPL)


begin Function (For GPL Pages)

functions (GPL),functions (GPL),functions (GPL)
begin,begin,begin
begin function (GPL),begin function (GPL),begin function (GPL)

Syntax

begin(<function>)

<function>. One or more valid functions. These are optional.

Specifies the start of the GPL block that defines the page display or visualization.

Examples

Example: Scaling a visualization
PAGE: begin(scale(50%,50%))

Valid Functions

scale Function (For GPL Pages)

Applies To

PAGE Statement (GPL)


beta Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
beta,beta,beta
beta function (GPL),beta function (GPL),beta function (GPL)

Syntax

beta(<shape>, <shape>)

<shape>. Numeric values specifying the shape parameters for the distribution. Values must be greater than 0.

Description

Specifies a beta distribution for the probability scale.

Examples

Example: Specifying a beta distribution for the probability scale
SCALE: prob(dim(2), beta(2, 5))

Applies To

prob Scale (GPL)


bin.dot Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
bin.dot,bin.dot,bin.dot
bin.dot function (GPL),bin.dot function (GPL),bin.dot function (GPL)

Syntax

bin.dot.<position>(<algebra>, dim(<numeric>), <function>)

or

bin.dot.<position>(<binning function>, dim(<numeric>), <function>)

or

bin.dot.<position>(<statistic function>, dim(<numeric>), <function>)

<position>. The position at which a graphic element representing the bins is drawn. center is the graphical middle of the bin and makes it less likely that the graphic elements will overlap. centroid positions the graphic element at the centroid location of the values it represents. The coordinates of the centroid are the weighted means for each dimension. Specifying the position is optional. If none is specified, center is used.

<algebra>. Graph algebra, such as x*y. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra.

<numeric>. One or more numeric values (separated by commas) indicating the graph dimension or dimensions in which to bin the data. Using dim() is optional. Specifying the dimensions is necessary only when you want to bin a specific non-default dimension or multiple dimensions, for example when binning a 2-D scatterplot. See the topic dim Function (GPL) for more information.

<function>. One or more valid functions. These are optional.

<binning function>. A binning function.

<statistic function>. A statistic function.

Description

Creates irregularly spaced bins of graphic elements that have nearly identical values. When data are sparse, bin.dot centers the bins on the data. This function is typically used to create a dot plot.

Examples

Example: Creating a 1-D dot plot
ELEMENT: point.stack.asymmetric(position(bin.dot(salary)))

Statistic Functions

See GPL Functions .

Valid Functions

binCount Function (GPL), binStart Function (GPL), binWidth Function (GPL)

Binning Functions

bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL)

Applies To

bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), density.beta Function (GPL), density.chiSquare Function (GPL), density.exponential Function (GPL), density.f Function (GPL), density.gamma Function (GPL), density.logistic Function (GPL), density.normal Function (GPL), density.poisson Function (GPL), density.studentizedRange Function (GPL), density.t Function (GPL), density.uniform Function (GPL), density.weibull Function (GPL), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.spread.sd Function (GPL), region.spread.se Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL)


bin.hex Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
bin.hex,bin.hex,bin.hex
bin.hex function (GPL),bin.hex function (GPL),bin.hex function (GPL)

Syntax

bin.hex.<position>(<algebra>, dim(<numeric>), <function>)

or

bin.hex.<position>(<binning function>, dim(<numeric>), <function>)

or

bin.hex.<position>(<statistic function>, dim(<numeric>), <function>)

<position>. The position at which a graphic element representing the bins is drawn. center is the graphical middle of the bin and makes it less likely that the graphic elements will overlap. centroid positions the graphic element at the centroid location of the values it represents. The coordinates of the centroid are the weighted means for each dimension. Specifying the position is optional. If none is specified, center is used.

<algebra>. Graph algebra, such as x*y. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra.

<numeric>. One or more numeric values (separated by commas) indicating the graph dimension or dimensions in which to bin the data. Using dim() is optional.Specifying the dimensions is necessary only when you want to bin a specific non-default dimension or multiple dimensions, for example when binning a 2-D scatterplot. See the topic dim Function (GPL) for more information.

<function>. One or more valid functions. These are optional.

<binning function>. A binning function.

<statistic function>. A statistic function.

Description

Creates hexagonal bins for grouping similar cases. bin.hex is most often used when creating binned scatterplots or other binned multivariate graphs.

Examples

Example: Binned scatterplot
ELEMENT: point(position(bin.hex(salbegin*salary, dim(1,2))), size(summary.count()))
Example: Binned polygon
ELEMENT: polygon(position(bin.hex(salbegin*salary, dim(1,2))), color(summary.count()))

Statistic Functions

See GPL Functions .

Valid Functions

binCount Function (GPL), binStart Function (GPL), binWidth Function (GPL)

Binning Functions

bin.dot Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL)

Applies To

bin.dot Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), density.beta Function (GPL), density.chiSquare Function (GPL), density.exponential Function (GPL), density.f Function (GPL), density.gamma Function (GPL), density.logistic Function (GPL), density.normal Function (GPL), density.poisson Function (GPL), density.studentizedRange Function (GPL), density.t Function (GPL), density.uniform Function (GPL), density.weibull Function (GPL), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.spread.sd Function (GPL), region.spread.se Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL)


bin.quantile.letter Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
bin.quantile.letter,bin.quantile.letter,bin.quantile.letter
bin.quantile.letter function (GPL),bin.quantile.letter function (GPL),bin.quantile.letter function (GPL)

Syntax

bin.quantile.letter(<algebra>)

or

bin.quantile.letter(<binning function>)

or

bin.quantile.letter(<statistic function>)

<algebra>. Graph algebra, such as x*y. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra.

<binning function>. A binning function.

<statistic function>. A statistic function.

Description

Calculates the five statistics (minimum, first quartile, median, third quartile, and maximum) used in box plots. The data are binned appropriately as a result of the statistical calculation. bin.quantile.letter is used with the schema element to generate a box plot.

Examples

Example: Creating a box plot
ELEMENT: schema(position(bin.quantile.letter(jobcat*salary)))

Statistic Functions

See GPL Functions .

Binning Functions

bin.dot Function (GPL), bin.hex Function (GPL), bin.rect Function (GPL)

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.rect Function (GPL), density.beta Function (GPL), density.chiSquare Function (GPL), density.exponential Function (GPL), density.f Function (GPL), density.gamma Function (GPL), density.logistic Function (GPL), density.normal Function (GPL), density.poisson Function (GPL), density.studentizedRange Function (GPL), density.t Function (GPL), density.uniform Function (GPL), density.weibull Function (GPL), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.spread.sd Function (GPL), region.spread.se Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL)


bin.rect Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
bin.rect,bin.rect,bin.rect
bin.rect function (GPL),bin.rect function (GPL),bin.rect function (GPL)

Syntax

bin.rect.<position>(<algebra>, dim(<numeric>), <function>)

or

bin.rect.<position>(<binning function>, dim(<numeric>), <function>)

or

bin.rect.<position>(<statistic function>, dim(<numeric>), <function>)

<position>. The position at which a graphic element representing the bins is drawn. center is the graphical middle of the bin and makes it less likely that the graphic elements will overlap. centroid positions the graphic element at the centroid location of the values it represents. The coordinates of the centroid are the weighted means for each dimension. Specifying the position is optional. If none is specified, center is used.

<algebra>. Graph algebra, such as x*y. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra.

<numeric>. One or more numeric values (separated by commas) indicating the graph dimension or dimensions in which to bin the data. Using dim() is optional. Specifying the dimensions is necessary only when you want to bin a specific non-default dimension or multiple dimensions--for example, when binning a 2-D scatterplot. See the topic dim Function (GPL) for more information.

<function>. One or more valid functions. These are optional.

<binning function>. A binning function.

<statistic function>. A statistic function.

Description

Creates rectangular bins for grouping similar cases. bin.rect is the binning method commonly used in histograms to calculate the count in each bin.

Examples

Example: Histogram binning
ELEMENT: interval(position(summary.count(bin.rect(salary))))
Example: Histogram binning with specified bin sizes
ELEMENT: interval(position(summary.count(bin.rect(salary, binWidth(5000)))))
Example: Binned scatterplot
ELEMENT: point(position(summary.count(bin.rect(salbegin*salary, dim(1,2)))),
               size(summary.count()))

Statistic Functions

See GPL Functions .

Valid Functions

binCount Function (GPL), binStart Function (GPL), binWidth Function (GPL)

Binning Functions

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL)

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), density.beta Function (GPL), density.chiSquare Function (GPL), density.exponential Function (GPL), density.f Function (GPL), density.gamma Function (GPL), density.logistic Function (GPL), density.normal Function (GPL), density.poisson Function (GPL), density.studentizedRange Function (GPL), density.t Function (GPL), density.uniform Function (GPL), density.weibull Function (GPL), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.spread.sd Function (GPL), region.spread.se Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL)


binCount Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
binCount,binCount,binCount
binCount function (GPL),binCount function (GPL),binCount function (GPL)

Syntax

binCount(<integer> ...)

<integer>. An integer indicating the number of bins. If there are multiple binned dimensions, you can specify the number of bins for each dimension. Use commas to separate the multiple counts. For example, binCount(15,10) specifies 15 bins for dimension 1 and 10 for dimension 2. 0 specifies the default for a dimension. So, binCount(0,10) specifies the default number of bins for dimension 1 and 10 bins for dimension 2.

Description

Specifies the number of bins.

Examples

Example: Defining a specific number of bins
ELEMENT: interval(position(summary.count(bin.rect(salary, binCount(25)))))
Example: Defining a specific number of bins for multiple binned dimensions
ELEMENT: interval(position(bin.rect(salbegin*salary, dim(1,2), binCount(25,25))))

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.rect Function (GPL)


binStart Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
binStart,binStart,binStart
binStart function (GPL),binStart function (GPL),binStart function (GPL)

Syntax

binStart(<value> ...)

<value>. An integer or quoted date literal indicating the value of the first bin. If there are multiple binned dimensions, you can specify the first bin for each dimension. Use commas to separate the multiple first bins. For example, binStart(0,10) specifies 0 as the first bin on dimension 1 and 10 as the first bin on dimension 2. If you specify a value for one dimension, you have to specify a value for all dimensions.

Description

Specifies the value of the first bin. You can use the function to make sure bins begin at a specified value, regardless of the data values. Note that the first bin may not be drawn if there are no actual data values in that bin. However, the bin is still included when determining the number of bins and their widths.

If the specified value is greater than the lowest data value on the dimension, this function does not really specify the starting value of the first bin because the function can never exclude smaller values from the bins. Rather, the function specifies the starting value for some other bin, depending on the width or number of bins. There may be one or more bins that precede the specified value.

Examples

Example: Specifying the first bin on a continuous scale
ELEMENT: interval(position(summary.count(bin.rect(salary, binStart(10000)))))
Example: Specifying the first bin on a date scale
ELEMENT: interval(position(summary.count(bin.rect(saledate, binStart("01/20/2003")))))
Example: Specifying the first bin for multiple binned dimensions
ELEMENT: interval(position(bin.rect(x*y, dim(1,2), binStart(2000,1000))))

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.rect Function (GPL)


binWidth Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
binWidth,binWidth,binWidth
binWidth function (GPL),binWidth function (GPL),binWidth function (GPL)

Syntax

binWidth(<numeric> ...)

<numeric>. A positive numeric value indicating the width of the bins. If the data being binned are dates, the value indicates days or seconds, depending on the underlying data. To specify an explicit unit, append d or s to the value to indicate days or seconds, respectively. If there are multiple binned dimensions, you can specify the bin width for each dimension. Use commas to separate the multiple widths. For example, binWidth(100,200) specifies 100 as the bin width for dimension 1 and 200 as the bin width for dimension 2. 0 specifies the default for a dimension. So, binWidth(0,200) specifies the default bin width for dimension 1 and 200 as the bin width for dimension 2.

Description

Specifies the width of the bins.

Examples

Example: Defining a specific bin width
ELEMENT: interval(position(summary.count(bin.rect(salary, binWidth(1000)))))
Example: Defining a specific bin width for multiple binned dimensions
ELEMENT: interval(position(bin.rect(salbegin*salary, dim(1,2), binWidth(1000,2000))))
Example: Defining a specific bin width for date data
ELEMENT: interval(position(summary.count(bin.rect(date, binWidth(30d)))))

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.rect Function (GPL)


chiSquare Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
chiSquare,chiSquare,chiSquare
chiSquare function (GPL),chiSquare function (GPL),chiSquare function (GPL)

Syntax

chiSquare(<degrees of freedom>)

<degrees of freedom>. Numeric value specifying the degrees of freedom parameter for the distribution. This value must be greater than 0.

Description

Specifies a chi-square distribution for the probability scale.

Examples

SCALE: prob(dim(2), chiSquare(5))

Applies To

prob Scale (GPL)


closed Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
closed,closed,closed
closed function (GPL),closed function (GPL),closed function (GPL)

Syntax

closed()

Description

Specifies that the end point of a graphic element is connected to its start point. In polar coordinates, this results in a closed loop around the center of the coordinate system.

Examples

Example: Creating a closed line
ELEMENT: line(position(x*y), closed())

Applies To

area Element (GPL), edge Element (GPL), line Element (GPL), path Element (GPL)


cluster Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
cluster,cluster,cluster
cluster function (GPL),cluster function (GPL),cluster function (GPL)

Syntax

cluster(<integer> ...)

<integer>. One or more integers indicating the variable or variables in the algebra along whose axis the clustering occurs.

Description

Clusters graphic elements along a specific axis. You can also cluster graphic elements on more than one axis in 3-D charts.

Examples

Example: Clustering on the first dimension in a 2-D coordinate system
COORD: rect(dim(1,2), cluster(3))
ELEMENT: interval(position(summary.mean(jobcat*salary*gender)), color(jobcat))

In this example, jobcat is clustered in gender. Compare the position of the numbers in dim() to the positions of the numbers in cluster(). In this case, the 1 in dim and 3 in cluster are the first numbers in their respective functions. Therefore, clustering occurs on dim(3) (gender), and dim(1) (jobcat) specifies the variable that defines the graphic elements in each cluster. If you removed the cluster function, the chart would look similar, but dim(3) would specify a paneling facet and dim(1) would be the x axis. The clustering collapses multiple panels into one, changing the way dimensions are displayed. For example, compare the following graphs.

SOURCE: s = userSource(id("Employeedata"))
DATA: jobcat=col(source(s), name("jobcat"), unit.category())
DATA: gender=col(source(s), name("gender"), unit.category())
DATA: salary=col(source(s), name("salary"))
COORD: rect(dim(1,2), cluster(3))
SCALE: linear(dim(2), include(0))
GUIDE: axis(dim(2), label("Mean Salary"))
GUIDE: axis(dim(3), label("Gender"))
ELEMENT: interval(position(summary.mean(jobcat*salary*gender)), color(jobcat))
SOURCE: s = userSource(id("Employeedata"))
DATA: jobcat = col(source(s), name("jobcat"), unit.category())
DATA: gender = col(source(s), name("gender"), unit.category())
DATA: salary = col(source(s), name("salary"))
SCALE: linear(dim(2), include(0.0))
GUIDE: axis(dim(2), label("Mean Salary"))
GUIDE: axis(dim(1), label("Job Category"))
ELEMENT: interval(position(summary.mean(jobcat*salary*gender)))
Example: Clustering on the first dimension in a 3-D coordinate system
COORD: rect(dim(1,2,3), cluster(4,0,0))
ELEMENT: interval(position(summary.mean(jobcat*gender*salary*minority)),
                  color(jobcat))

In this example, jobcat is clustered in minority. The first parameter of cluster is 4. This indicates that the first variable (jobcat) in the algebra is clustered in the fourth variable (minority). As in the 2-D example, removing the cluster function would result in a paneled chart.

Example: Clustering on the second dimension in a 3-D coordinate system
COORD: rect(dim(1,2,3), cluster(0,4,0))
ELEMENT: interval(position(summary.mean(minority*jobcat*salary*gender)),
                  color(gender))

In this example, jobcat is clustered in gender. The first parameter of cluster is 0, which indicates that dim(1) (minority) is not affected by the clustering. The second parameter of cluster is 4. This indicates that the second variable (jobcat) in the algebra is clustered in the fourth variable (gender).

Applies To

rect Coordinate Type (GPL)


col Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
col,col,col
col function (GPL),col function (GPL),col function (GPL)

Syntax

col(source(<source name>), name("variable name"), <type>, <function>)

<source name>. A data source previously defined by a SOURCE statement.

"variable name". The name of the variable in the data source.

<type>. A data type or measurement level. If no type is specified, the variable is assumed to be continuous.

<function>. One or more valid functions. These are optional.

Description

Extracts a column of data from a data source. This is used for creating variables from the data.

Examples

Example: Specifying a continuous variable from a data source
DATA: age = col(source(mydata), name("age"))
Example: Specifying a categorical variable from a data source
DATA: gender = col(source(mydata), name("gender"), unit.category())
Example: Specifying a date variable from a data source
DATA: date = col(source(mydata), name("date"), unit.time(), format("M/d/yyyy"))

Valid Types

unit.category | Specifies a categorical variable.
unit.time | Specifies a date variable. You will often need to specify the date format if using this type. Note: In PASW Statistics, dates from a userSource are passed to GPL as numeric values and are specified as continuous variables. Therefore, you should not use this type with a userSource.See the topic format Function (GPL) for more information.

Valid Functions

in Function (GPL), format Function (GPL), notIn Function (GPL)

Applies To

DATA Statement (GPL)


collapse Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
collapse,collapse,collapse
collapse function (GPL),collapse function (GPL),collapse function (GPL)

Syntax

collapse(category(<algebra>), minimumPercent(<numeric>), sumVariable(<algebra>),
         otherValue("label"))

<algebra>. Graph algebra, although in this case, the algebra should identify only one variable. The variable in category() identifies the variable whose categories are collapsed. The variable in sumVariable() identifies the variable whose sum for the total compared to the sum for a particular category determines whether the category is collapsed.

<numeric>. A numeric value between 0 and 100 indicating a percentage. A category is collapsed if its sum is less than the specified percentage of the total sum for sumVariable.

"label". The label for the new variable containing the collapsed categories. This is the text that identifies the variable in the graph.

Description

Collapse small categories of a categorical variable to create a new categorical variable. The function collapses the categories by recoding them to the value specified by otherValue.

Examples

Example: Collapsing categories whose sum is less than 10% of total
TRANS: educ_collapse = collapse(category(educ), minimumPercent(10), sumVariable(salary),
                                otherValue("Other"))
ELEMENT: interval(position(summary.sum(educ_collapse*salary))))

Applies To

TRANS Statement (GPL)


color Function (For GPL Graphic Elements)

functions (GPL),functions (GPL),functions (GPL)
color,color,color
color function (GPL),color function (GPL),color function (GPL)

Note: If you are modifying the color for a guide, refer to color Function (For GPL Guides).

Syntax

color(<algebra>)

or

color(color.<color constant>)

or

color(color."color value")

or

color(<statistic function>)

<algebra>. Graph algebra, using one variable or a blend of variables. Each unique variable value results in a different color. For example, if you were creating a stacked bar chart, the argument of the color function would be the variable that controls the stacking. Each stack segment would be a different color.

<color constant>. A constant indicating a specific color, such as red. See the topic Color Constants (GPL) for more information. Color constants can also be blended (for example, color.blue+color.red).

"color value". A specific value that indicates the hexadecimal RGB color components (for example, color."6666FF").

<statistic function>. A statistic function.

Description

Controls the color of the graphic elements. To specify the color explicitly for the fill or border of the graphic element, you can append .interior or .exterior to the function. Using color without a qualifier implies color.interior.

Examples

Example: Specifying a color value with a constant
ELEMENT: line(position(x*y), color(color.red))
Example: Specifying a color value with RGB color components
ELEMENT: line(position(x*y), color(color."FF0000"))
Example: Specifying a color value for the bar border
ELEMENT: interval(position(x*y), color.exterior(color.red))
Example: Using the values of a variable to control color
ELEMENT: point(position(x*y), color(z))
Example: Using a statistical function to control color
ELEMENT: interval(position(summary.mean(jobcat*salary)),
         color(summary.count()))

Statistic Functions

See GPL Functions .

Applies To

area Element (GPL), edge Element (GPL), interval Element (GPL), path Element (GPL), point Element (GPL), polygon Element (GPL), schema Element (GPL), line Element (GPL)


color Function (For GPL Guides)

functions (GPL),functions (GPL),functions (GPL)
color,color,color
color function (GPL),color function (GPL),color function (GPL)

Note: If you are modifying the color for a graphic element (like a bar or point), refer to color Function (For GPL Graphic Elements).

Syntax

color(color.<color constant>)

or

color(color."color value")

<color constant>. A constant indicating a specific color, such as red. See the topic Color Constants (GPL) for more information.

"color value". A specific value that indicates the hexadecimal RGB color components (for example, color."6666FF").

Description

Controls the color of guides, such as axes and reference lines.

Examples

Example: Specifying an axis color
GUIDE: axis(dim(2), color(color.blue))

Applies To

axis Guide Type (GPL), form.line Guide Type (GPL)


color.brightness Function (For GPL Graphic Elements)

functions (GPL),functions (GPL),functions (GPL)
color.brightness,color.brightness,color.brightness
color.brightness function (GPL),color.brightness function (GPL),color.brightness function (GPL)

Note: If you are modifying the brightness for a guide, refer to color.brightness Function (For GPL Guides).

Syntax

color.brightness(<algebra>)

or

color.brightness(color.brightness."brightness value")

or

color.brightness(<statistic function>)

<algebra>. Graph algebra, using one variable or a blend of variables. Each variable value results in a different level of color brightness.

"brightness value". A value between 0 and 1 that indicates the level of brightness. A value of 1 indicates full brightness, while a value of 0 indicates no brightness (black).

<statistic function>. A statistic function.

Description

Controls the color brightness of the graphic elements. To specify the color brightness explicitly for the fill or border of the graphic element, you can append .interior or .exterior to the function. Using color.brightness without a qualifier implies color.brightness.interior.

Examples

Example: Using the values of a variable to control color brightness
ELEMENT: point(position(x*y), color.brightness(z), color(color.blue))
Example: Using a statistical function to control color brightness
ELEMENT: interval(position(summary.mean(jobcat*salary)),
         color.brightness(summary.count()))

Statistic Functions

See GPL Functions .

Applies To

area Element (GPL), edge Element (GPL), interval Element (GPL), path Element (GPL), point Element (GPL), polygon Element (GPL), schema Element (GPL), line Element (GPL)


color.brightness Function (For GPL Guides)

functions (GPL),functions (GPL),functions (GPL)
color.brightness,color.brightness,color.brightness
color.brightness function (GPL),color.brightness function (GPL),color.brightness function (GPL)

Note: If you are modifying the brightness for a graphic element (like a bar or point), refer to color.brightness Function (For GPL Graphic Elements).

Syntax

color.brightness(color.brightness."brightness value")

"brightness value". A value between 0 and 1 that indicates the level of brightness. A value of 1 indicates full brightness, while a value of 0 indicates no brightness (black).

Description

Controls the brightness of reference lines.

Examples

Example: Specifying a reference line brightness
GUIDE: form.line(position(*,2000), color.brightness(color.brightness."0.5"))

Applies To

form.line Guide Type (GPL)


color.hue Function (For GPL Graphic Elements)

Note: If you are modifying the hue for a guide, refer to color.hue Function (For GPL Guides).

functions (GPL),functions (GPL),functions (GPL)
color.hue,color.hue,color.hue
color.hue function (GPL),color.hue function (GPL),color.hue function (GPL)

Syntax

color.hue(<algebra>)

or

color.hue(color.hue."hue value")

or

color.hue(<statistic function>)

<algebra>. Graph algebra, using one variable or a blend of variables. Each variable value results in a different color hue.

"hue value". A value between 0 and 1 that indicates the hue level.

<statistic function>. A statistic function.

Description

Controls the color hue of the graphic elements. To specify the color hue explicitly for the fill or border of the graphic element, you can append .interior or .exterior to the function. Using color.hue without a qualifier implies color.hue.interior.

color.hue requires a base color other than white or black. Use color.interior or color.exterior to set the base color.

Examples

Example: Using the values of a variable to control color hue
ELEMENT: point(position(x*y), color.hue(z), color(color.blue))
Example: Using a statistical function to control color hue
ELEMENT: interval(position(summary.mean(jobcat*salary)),
         color.hue(summary.count()))

Statistic Functions

See GPL Functions .

Applies To

area Element (GPL), edge Element (GPL), interval Element (GPL), path Element (GPL), point Element (GPL), polygon Element (GPL), schema Element (GPL), line Element (GPL)


color.hue Function (For GPL Guides)

functions (GPL),functions (GPL),functions (GPL)
color.hue,color.hue,color.hue
color.hue function (GPL),color.hue function (GPL),color.hue function (GPL)

Note: If you are modifying the hue for a graphic element (like a bar or point), refer to color.hue Function (For GPL Graphic Elements).

Syntax

color.hue(color.brightness."hue value")

"hue value". A value between 0 and 1 that indicates the hue level.

Description

Controls the hue of reference lines.

Examples

Example: Specifying a reference line hue
GUIDE: form.line(position(*,2000), color.hue(color.hue."0.5"))

Applies To

form.line Guide Type (GPL)


color.saturation Function (For GPL Graphic Elements)

functions (GPL),functions (GPL),functions (GPL)
color.saturation,color.saturation,color.saturation
color.saturation function (GPL),color.saturation function (GPL),color.saturation function (GPL)

Note: If you are modifying the saturation for a guide, refer to color.saturation Function (For GPL Guides).

Syntax

color.saturation(<algebra>)

or

color.saturation(color.saturation."saturation value")

or

color.saturation(<statistic function>)

<algebra>. Graph algebra, using one variable or a blend of variables. Each variable value results in a different level of color saturation.

"saturation value". A value between 0 and 1 that indicates the saturation level. A value of 1 indicates full saturation, while a value of 0 indicates no saturation (gray).

<statistic function>. A statistic function.

Description

Controls the color saturation of the graphic elements. To specify the color saturation explicitly for the fill or border of the graphic element, you can append .interior or .exterior to the function. Using color.saturation without a qualifier implies color.saturation.interior.

Examples

Example: Using the values of a variable to control color saturation
ELEMENT: point(position(x*y), color.saturation(z), color(color.blue))
Example: Using a statistical function to control color
ELEMENT: interval(position(summary.mean(jobcat*salary)),
         color.saturation(summary.count()))

Statistic Functions

See GPL Functions .

Applies To

area Element (GPL), edge Element (GPL), interval Element (GPL), path Element (GPL), point Element (GPL), polygon Element (GPL), schema Element (GPL), line Element (GPL)


color.saturation Function (For GPL Guides)

functions (GPL),functions (GPL),functions (GPL)
color.saturation,color.saturation,color.saturation
color.saturation function (GPL),color.saturation function (GPL),color.saturation function (GPL)

Note: If you are modifying the saturation for a graphic element (like a bar or point), refer to color.saturation Function (For GPL Graphic Elements).

Syntax

color.saturation(color.saturation."saturation value")

"saturation value". A value between 0 and 1 that indicates the saturation level. A value of 1 indicates full saturation, while a value of 0 indicates no saturation (gray).

Description

Controls the saturation of reference lines.

Examples

Example: Specifying a reference line saturation
GUIDE: form.line(position(*,2000), color.saturation(color.saturation."0.5"))

Applies To

form.line Guide Type (GPL)


csvSource Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
csvSource,csvSource,csvSource
csvSource function (GPL),csvSource function (GPL),csvSource function (GPL)

Syntax

csvSource(file("file path"), key("key name"), <function>)

"file path". The path to the CSV file. This can be an absolute or relative path. The path is relative to the location of the application that parses the GPL code. Backslashes must be escaped with another backslash. You can also use forward slashes.

"key name". The name of a variable in the file that acts as a key. The key is used to link multiple sources, especially a dataset and a map file.

<function>. One or more valid functions. These are optional.

Description

Reads the contents of a comma-separated values (CSV) file. This function is used to assign the contents of the file to a data source.

Examples

Example: Reading a CSV file
SOURCE: mydata = csvSource(file("/Data/Employee data.csv"))

Valid Functions

missing.listwise Function (GPL), missing.pairwise Function (GPL), weight Function (GPL)

Applies To

SOURCE Statement (GPL), savSource Function (GPL), sqlSource Function (GPL)


dataMaximum Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
dataMaximum,dataMaximum,dataMaximum
dataMaximum function (GPL),dataMaximum function (GPL),dataMaximum function (GPL)

Syntax

dataMaximum()

Description

Specifies that the maximum of the scale is exactly the same as the maximum of the data. Otherwise, a "nice" maximum is used. For example, if the last data value is 97, a "nice" maximum for the scale may be 100. dataMaximum forces the scale to end at 97.

Examples

Example: Specifying a maximum on the 2nd dimension (y axis)
SCALE: linear(dim(2), dataMaximum())

Applies To

linear Scale (GPL), log Scale (GPL), pow Scale (GPL), safeLog Scale (GPL), safePower Scale (GPL), time Scale (GPL)


dataMinimum Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
dataMinimum,dataMinimum,dataMinimum
dataMinimum function (GPL),dataMinimum function (GPL),dataMinimum function (GPL)

Syntax

dataMinimum()

Description

Specifies that minimum of the scale is exactly the same as the minimum of the data. Otherwise, a "nice" minimum is used. For example, if the first data value is 2, a "nice" minimum for the scale may be 0. dataMinimum forces the scale to begin at 2.

Examples

Example: Specifying a minimum on the 2nd dimension (y axis)
SCALE: linear(dim(2), dataMinimum())

Applies To

linear Scale (GPL), log Scale (GPL), pow Scale (GPL), safeLog Scale (GPL), safePower Scale (GPL), time Scale (GPL)


delta Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
delta,delta,delta
delta function (GPL),delta function (GPL),delta function (GPL)

Syntax

delta(<numeric>)

<numeric>. A positive numeric value indicating the difference between major ticks on the axis. If the underlying data along the axis are dates, the value indicates days.

Description

Specifies the difference between major ticks on an axis. Major ticks are the location at which labels are displayed along the axis.

Examples

Example: Specifying the distance between major ticks
GUIDE: axis(dim(1), delta(1000))

Applies To

axis Guide Type (GPL)


density.beta Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
density.beta,density.beta,density.beta
density.beta function (GPL),density.beta function (GPL),density.beta function (GPL)

Syntax

density.beta(<algebra>, shape1(<numeric>), shape2(<numeric>))

or

density.beta(<binning function>, shape1(<numeric>), shape2(<numeric>))

<algebra>. Graph algebra, such as x*y. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra. The algebra is optional.

<binning function>. A binning function. The binning function is optional.

<numeric>. shape1 and shape2 define the parameters for the distribution. These take numeric values and are required.

Description

Calculates the probability density for the beta distribution. This is often used to add a distribution curve. The distribution is defined on the closed interval [0, 1]. If you don't see the graphic element for the distribution, check the parameters for the distribution and the range for the x axis scale.

Because this function does not estimate parameters from the data, it can be used only for comparison and not for fitting.

Examples

Example: Adding a beta distribution curve
ELEMENT: line(position(density.beta(x, shape1(2), shape2(5))))

Binning Functions

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL)

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.spread.range Function (GPL), region.spread.sd Function (GPL), region.spread.se Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL), transparency Function (For GPL Graphic Elements)


density.chiSquare Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
density.chiSquare,density.chiSquare,density.chiSquare
density.chiSquare function (GPL),density.chiSquare function (GPL),density.chiSquare function (GPL)

Syntax

density.chiSquare(<algebra>, degreesOfFreedom(<integer>))

or

density.chiSquare(<binning function>, degreesOfFreedom(<integer>))

<algebra>. Graph algebra, such as x*y. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra. The algebra is optional.

<binning function>. A binning function. The binning function is optional.

<integer>. degreesOfFreedom defines the parameter for the distribution. This takes a positive integer and is required.

Description

Calculates the probability density of the chi-square distribution. This is often used to add a distribution curve. If you don't see the graphic element for the distribution, check the parameter for the distribution and the range for the x axis scale.

Because this function does not estimate parameters from the data, it can be used only for comparison and not for fitting.

Examples

Example: Adding a chi-square distribution curve
ELEMENT: line(position(density.chiSquare(x, degreesoffreedom(5))))

Binning Functions

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL)

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.spread.range Function (GPL), region.spread.sd Function (GPL), region.spread.se Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL), transparency Function (For GPL Graphic Elements)


density.exponential Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
density.exponential,density.exponential,density.exponential
density.exponential function (GPL),density.exponential function (GPL),density.exponential function (GPL)

Syntax

density.exponential(<algebra>, rate(<numeric>))

or

density.exponential(<binning function>, rate(<numeric>))

<algebra>. Graph algebra, such as x*y. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra. The algebra is optional.

<binning function>. A binning function. The binning function is optional.

<numeric>. rate defines the parameter for the distribution. This takes a numeric value greater than or equal to 0 and is optional. If the parameter is not specified, it is calculated from the underlying data.

Description

Calculates the probability density of the exponential distribution. This is often used to add a distribution curve. If you don't see the graphic element for the distribution, check the parameter for the distribution and the range for the x axis scale.

Examples

Example: Adding a chi-square distribution curve
ELEMENT: line(position(density.exponential(x, rate(1.5))))

Binning Functions

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL)

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.spread.range Function (GPL), region.spread.sd Function (GPL), region.spread.se Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL), transparency Function (For GPL Graphic Elements)


density.f Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
density.f,density.f,density.f
density.f function (GPL),density.f function (GPL),density.f function (GPL)

Syntax

density.f(<algebra>, degreesOfFreedom1(<integer>), degreesOfFreedom2(<integer>))

or

density.f(<binning function>, degreesOfFreedom1(<integer>), degreesOfFreedom2(<integer>))

<algebra>. Graph algebra, such as x*y. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra. The algebra is optional.

<binning function>. A binning function. The binning function is optional.

<integer>. degreesOfFreedom1 and degreesOfFreedom2 define the parameters for the distribution. These take positive integers and are required.

Description

Calculates the probability density of the F distribution. This is often used to add a distribution curve. If you don't see the graphic element for the distribution, check the parameters for the distribution and the range for the x axis scale.

Because this function does not estimate parameters from the data, it can be used only for comparison and not for fitting.

Examples

Example: Adding an F distribution curve
ELEMENT: line(position(density.f(x, degreesoffreedom1(5), degreesoffreedom2(2))))

Binning Functions

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL)

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.spread.range Function (GPL), region.spread.sd Function (GPL), region.spread.se Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL), transparency Function (For GPL Graphic Elements)


density.gamma Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
density.gamma,density.gamma,density.gamma
density.gamma function (GPL),density.gamma function (GPL),density.gamma function (GPL)

Syntax

density.gamma(<algebra>, rate(<numeric>))

or

density.gamma(<binning function>, rate(<numeric>))

<algebra>. Graph algebra, such as x*y. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra. The algebra is optional.

<binning function>. A binning function. The binning function is optional.

<numeric>. rate defines the parameter for the distribution. This takes a positive numeric value and is required.

Description

Calculates the probability density of the gamma distribution. This is often used to add a distribution curve. If you don't see the graphic element for the distribution, check the parameters for the distribution and the range for the x axis scale.

Because this function does not estimate parameters from the data, it can be used only for comparison and not for fitting.

Examples

Example: Adding a gamma distribution curve
ELEMENT: line(position(density.gamma(x, rate(2.5))))

Binning Functions

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL)

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.spread.range Function (GPL), region.spread.sd Function (GPL), region.spread.se Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL), transparency Function (For GPL Graphic Elements)


density.kernel Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
density.kernel,density.kernel,density.kernel
density.kernel function (GPL),density.kernel function (GPL),density.kernel function (GPL)

Syntax

density.kernel.<kernel function>(<algebra>, fixedWindow(<numeric>), <function>)

or

density.kernel.<kernel function>(<algebra>, nearestNeighbor(<integer>), <function>)

or

density.kernel.<kernel function>.joint(<algebra>, fixedWindow(<numeric>), <function>)

or

density.kernel.<kernel function>.joint(<algebra>, nearestNeighbor(<integer>), <function>)

<kernel function>. A kernel function. This specifies how data are weighted by the density function, depending on how close the data are to the current point.

<algebra>. Graph algebra, such as x*y. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra.

<numeric>. fixedWindow specifies the proportion of data points to include when calculating the smooth function. This takes a numeric value between 0 and 1 and is optional. You also have the option of using the nearestNeighbor function to calculate smoother's bandwidth.

<integer>. nearestNeighbor specifies the k number of nearest neighbors to includes when calculating the smooth function. This takes a positive integer and is optional. You also have the option of using the fixedWindow function to calculate the smoother's bandwidth.

<function>. One or more valid functions. These are optional.

joint. Used to create densities based on values in the first (x axis) and second (y axis) dimensions. Without the joint modifier, the density is based only on values in the first (x axis) dimension. You would typically use the modifier for 3-D densities.

Description

Calculates the probability density using a nonparametric kernel function. This is often used to add a distribution curve that does not assume a particular model (like normal or Poisson). You can use the fixedWindow function or the nearestNeighbor function to specify the smoother's bandwidth. If you do not specify an explicit bandwidth, the internal algorithm uses a fixed window whose size is determined by the underlying data values and the specific kernel function.

Examples

Example: Adding the default kernel distribution
ELEMENT: line(position(density.kernel.epanechnikov(x)))
Example: Adding a kernel distribution using a fixed window
ELEMENT: line(position(density.kernel.epanechnikov(x, fixedWindow(0.05))))
Example: Adding a kernel distribution using k nearest neighbors
ELEMENT: line(position(density.kernel.epanechnikov(x, nearestNeighbor(100))))
Example: Creating a 3-D graph showing kernel densities
COORD: rect(dim(1,2,3))
ELEMENT: interval(position(density.kernel.epanechnikov.joint(x*y)))

Kernel Functions

uniform | All data receive equal weights.
epanechnikov | Data near the current point receive higher weights than extreme data receive. This function weights extreme points more than the triweight, biweight, and tricube kernels but less than the Gaussian and Cauchy kernels.
biweight | Data far from the current point receive more weight than the triweight kernel allows but less weight than the Epanechnikov kernel permits.
tricube | Data close to the current point receive higher weights than both the Epanechnikov and biweight kernels allow.
triweight | Data close to the current point receive higher weights than any other kernel allows. Extreme cases get very little weight.
gaussian | Weights follow a normal distribution, resulting in higher weighting of extreme cases than the Epanechnikov, biweight, tricube, and triweight kernels.
cauchy | Extreme values receive more weight than the other kernels, with the exception of the uniform kernel, allow.

Valid Functions

marron Function (GPL), segments Function (GPL)

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.spread.range Function (GPL), region.spread.sd Function (GPL), region.spread.se Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL), transparency Function (For GPL Graphic Elements)


density.logistic Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
density.logistic,density.logistic,density.logistic
density.logistic function (GPL),density.logistic function (GPL),density.logistic function (GPL)

Syntax

density.logistic(<algebra>, location(<numeric>), scaleDensity(<numeric>))

or

density.logistic(<binning function>, location(<numeric>), scaleDensity(<numeric>))

<algebra>. Graph algebra, such as x*y. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra. The algebra is optional.

<binning function>. A binning function. The binning function is optional.

<integer>. location and scaleDensity define the parameters for the distribution. These take numeric values and are required.

Description

Calculates the probability density of the logistic distribution. This is often used to add a distribution curve. If you don't see the graphic element for the distribution, check the parameters for the distribution and the range for the x axis scale.

Because this function does not estimate parameters from the data, it can be used only for comparison and not for fitting.

Examples

Example: Adding a logistic distribution curve
ELEMENT: line(position(density.logistic(x, location(5), scaleDensity(2))))

Binning Functions

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL)

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.spread.range Function (GPL), region.spread.sd Function (GPL), region.spread.se Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL), transparency Function (For GPL Graphic Elements)


density.normal Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
density.normal,density.normal,density.normal
density.normal function (GPL),density.normal function (GPL),density.normal function (GPL)

Syntax

density.normal(<algebra>, mean(<numeric>), standardDeviation(<numeric>))

or

density.normal(<binning function>, mean(<numeric>), standardDeviation(<numeric>))

<algebra>. Graph algebra, such as x*y. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra.

<binning function>. A binning function.

<numeric>. mean and standardDeviation define the parameters for the distribution. These take numeric values. You can use both of them or neither. If no parameters are specified, they are calculated from the underlying data.

Description

Calculates the probability density of the normal distribution. This is often used to add a distribution curve.

Examples

Example: Adding a normal curve to a histogram
ELEMENT: interval(position(summary.count(bin.rect(x))))
ELEMENT: line(position(density.normal(x)))
Example: Creating a normal curve with specific parameters
ELEMENT: line(position(density.normal(x, mean(50000), standardDeviation(15000))))

Binning Functions

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL)

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.spread.range Function (GPL), region.spread.sd Function (GPL), region.spread.se Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL), transparency Function (For GPL Graphic Elements)


density.poisson Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
density.poisson,density.poisson,density.poisson
density.poisson function (GPL),density.poisson function (GPL),density.poisson function (GPL)

Syntax

density.poisson(<algebra>, rate(<numeric>))

or

density.poisson(<binning function>, rate(<numeric>))

<algebra>. Graph algebra, such as x*y. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra. The algebra is optional.

<binning function>. A binning function. The binning function is optional.

<numeric>. rate defines the parameter for the distribution. This takes a positive numeric value and is optional. If the parameter is not specified, it is calculated from the underlying data.

Description

Calculates the probability density of the Poisson distribution. This is often used to add a distribution curve. If you don't see the graphic element for the distribution, check the parameter for the distribution and the range for the x axis scale.

Examples

Example: Adding a Poisson distribution curve
ELEMENT: line(position(density.poisson(x, rate(5.5))))

Binning Functions

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL)

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.spread.range Function (GPL), region.spread.sd Function (GPL), region.spread.se Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL), transparency Function (For GPL Graphic Elements)


density.studentizedRange Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
density.studentizedRange,density.studentizedRange,density.studentizedRange
density.studentizedRange function (GPL),density.studentizedRange function (GPL),density.studentizedRange function (GPL)

Syntax

density.studentizedRange(<algebra>, degreesOfFreedom(<integer>), k(<numeric>))

or

density.studentizedRange(<binning function>, degreesOfFreedom(<integer>), k(<numeric>))

<algebra>. Graph algebra, such as x*y. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra. The algebra is optional.

<binning function>. A binning function. The binning function is optional.

<integer> and <numeric>. degreesOfFreedom and k define the parameters for the distribution. degreesOfFreedom takes an integer, and k takes a numeric value. These are required.

Description

Calculates the probability density of the Studentized range distribution. This is often used to add a distribution curve. If you don't see the graphic element for the distribution, check the parameters for the distribution and the range for the x axis scale.

Because this function does not estimate parameters from the data, it can be used only for comparison and not for fitting.

Examples

Example: Adding a Studentized range distribution curve
ELEMENT: line(position(density.studentizedRange(x, degreesOfFreedom(5), k(2.5))))

Binning Functions

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL)

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.spread.range Function (GPL), region.spread.sd Function (GPL), region.spread.se Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL), transparency Function (For GPL Graphic Elements)


density.t Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
density.t,density.t,density.t
density.t function (GPL),density.t function (GPL),density.t function (GPL)

Syntax

density.t(<algebra>, degreesOfFreedom(<integer>))

or

density.t(<binning function>, degreesOfFreedom(<integer>))

<algebra>. Graph algebra, such as x*y. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra. The algebra is optional.

<binning function>. A binning function. The binning function is optional.

<integer>. degreesOfFreedom defines the parameter for the distribution. degreesOfFreedom takes an integer and is required.

Description

Calculates the probability density of the Student's t distribution. This is often used to add a distribution curve. If you don't see the graphic element for the distribution, check the parameters for the distribution and the range for the x axis scale.

Because this function does not estimate parameters from the data, it can be used only for comparison and not for fitting.

Examples

Example: Adding a Student's t distribution curve
ELEMENT: line(position(density.t(x, degreesOfFreedom(5))))

Binning Functions

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL)

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.spread.range Function (GPL), region.spread.sd Function (GPL), region.spread.se Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL), transparency Function (For GPL Graphic Elements)


density.uniform Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
density.uniform,density.uniform,density.uniform
density.uniform function (GPL),density.uniform function (GPL),density.uniform function (GPL)

Syntax

density.uniform(<algebra>, min(<numeric>), max(<numeric>))

or

density.uniform(<binning function>, min(<numeric>), max(<numeric>))

<algebra>. Graph algebra, such as x*y. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra.

<binning function>. A binning function. The binning function is optional.

<numeric>. min and max define the parameters for the distribution. These take numeric values. You can use all of them or none of them. Any missing parameters are calculated from the underlying data.

Description

Calculates the probability density of the uniform distribution using the method-of-moments estimate. This is often used to add a distribution curve.

Examples

Example: Adding a uniform distribution curve
ELEMENT: line(position(density.uniform(x)))

Binning Functions

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL)

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.spread.range Function (GPL), region.spread.sd Function (GPL), region.spread.se Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL), transparency Function (For GPL Graphic Elements)


density.weibull Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
density.weibull,density.weibull,density.weibull
density.weibull function (GPL),density.weibull function (GPL),density.weibull function (GPL)

Syntax

density.weibull(<algebra>, rate(<numeric>), scaleDensity(<numeric>))

or

density.weibull(<binning function>, rate(<numeric>), scaleDensity(<numeric>))

<algebra>. Graph algebra, such as x*y. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra. The algebra is optional.

<binning function>. A binning function. The binning function is optional. I

<integer>. rate and scaleDensity define the parameters for the distribution. These take numeric values and are required.

Description

Calculates the probability density of the Weibull distribution. This is often used to add a distribution curve. If you don't see the graphic element for the distribution, check the parameters for the distribution and the range for the x axis scale.

Because this function does not estimate parameters from the data, it can be used only for comparison and not for fitting.

Examples

Example: Adding a Weibull distribution curve
ELEMENT: line(position(density.logistic(x, location(5), scaleDensity(2))))

Binning Functions

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL)

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.spread.range Function (GPL), region.spread.sd Function (GPL), region.spread.se Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL), transparency Function (For GPL Graphic Elements)


dim Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
dim,dim,dim
dim function (GPL),dim function (GPL),dim function (GPL)

Syntax

dim(<numeric> ...)

<numeric>. A numeric value identifying the dimension or dimensions. If you are specifying multiple dimensions, use commas to separate the numeric values.

Description

Specifies the dimension or dimensions to which a coordinate type, scale, guide, or function applies.

To figure out the numeric value associated with a dimension, look at the algebra. Counting the crossings gives the main dimension values. The coordinate system (including any clustering of the coordinate system) doesn't matter.

Consider the following algebra:

a*b*c*d

The variables in the algebra correspond to the following dimensions:

Variable | Dimension
a | dim(1)
b | dim(2)
c | dim(3)
d | dim(4)

Blended variables cannot be separated. The blend of the two variables corresponds to one dimension. Consider the following:

a*(b+c)*d

The variables in the algebra correspond to the following dimensions:

Variable | Dimension
a | dim(1)
b+c | dim(2)
d | dim(3)

With nesting, you still count crossed variables, but nested groups are counted only once. To refer to each variable in the nested group, you count from the outside in, using a dot convention. The outermost variable in the nested group gets the primary dimension number (for example, dim(1)), and the next variable gets the primary dimension number followed by a dot and a 1 (for example, dim(1.1)). Consider the following:

a*b/c*d

The variables in the algebra correspond to the following dimensions:

Variable | Dimension
a | dim(1)
c | dim(2)
b | dim(2.1)
d | dim(3)

Examples

Example: Specifying a two-dimensional, rectangular coordinate system
COORD: rect(dim(1,2))
Example: Specifying an axis label for the second dimension
GUIDE: axis(dim(2), label("Mean Salary"))

Applies To

parallel Coordinate Type (GPL), polar Coordinate Type (GPL), polar.theta Coordinate Type (GPL), rect Coordinate Type (GPL), asn Scale (GPL), atanh Scale (GPL), cat Scale (GPL), linear Scale (GPL), log Scale (GPL), logit Scale (GPL), pow Scale (GPL), prob Scale (GPL), probit Scale (GPL), safeLog Scale (GPL), safePower Scale (GPL), time Scale (GPL), axis Guide Type (GPL), base.coordinate Function (GPL), bin.dot Function (GPL), bin.hex Function (GPL), bin.rect Function (GPL), reflect Function (GPL)


end Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
end,end,end
end function (GPL),end function (GPL),end function (GPL)

Syntax

end()

Description

Specifies the end of the GPL block that defines a particular graph or page.

Examples

Example: Defining a particular graph
GRAPH: begin()
ELEMENT: line(position(x*y))
GRAPH: end()
Example: Defining a page
PAGE: begin(scale(400px,300px))
SOURCE: s=csvSource(file("mydata.csv"))
DATA: x=col(source(s), name("x"))
DATA: y=col(source(s), name("y"))
ELEMENT: line(position(x*y))
PAGE: end()

Applies To

GRAPH Statement (GPL), PAGE Statement (GPL)


eval Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
eval,eval,eval
eval function (GPL),eval function (GPL),eval function (GPL)

Syntax

eval(<expression>)

<expression>. A mathematical expression, such as log(salary).

Description

Evaluates a mathematical expression for each case in the data. You can use many different mathematical functions in the expression. See the topic eval Operators and Functions (GPL) for more information. If needed, you can wrap the result of a function in another function. Therefore, datetostring(date()) is a valid expression.

The eval function is also useful for evaluating a Boolean expression whose result can be used in the summary.countTrue, summary.percentTrue, and summary.proportionTrue functions. This combination allows you to plot the number or percent of cases greater than or less than a specific value.

Examples

Example: Plotting the difference between two variables
TRANS: saldiff = eval(salary-salbegin)
ELEMENT: point(position(summary.mean(jobcat*saldiff)))
Example: Creating a graph from an equation
DATA: x = iter(-100,100,1)
TRANS: y = eval(x**2)
ELEMENT: line(position(x*y))
Example: Plotting percent greater than a value
TRANS: salGreaterThan = eval(salary>50000)
ELEMENT: interval(position(summary.percentTrue(jobcat*salGreaterThan)))

Applies To

TRANS Statement (GPL), collapse Function (GPL)


eval Operators and Functions (GPL)

Following are the operators and functions that you can use with the eval function. See eval Function (GPL) for information about the eval function.

Operators Collapse Hide details

Operators

Operator | Meaning | Notes
+ | Addition or string concatenation | Using + with numbers adds the numbers. Using it with strings concatenates the strings.
- | Subtraction |
* | Multiplication |
/ | Division |
( ) | Grouping | Grouped expressions are calculated before other expressions.
** | Exponentiation |
== | Equal |
!= | Not equal |
< | Less than |
> | Greater than |
<= | Less than or equal to |
>= | Greater than or equal to |
&& | Logical AND |
|| | Logical OR |
? : | Conditional | These operators are shorthand for then-else when evaluating a Boolean operand. For example, x>15?”High”:”Low” returns “High” if x > 15. Otherwise, the expression returns “Low”.
Mathematical Functions Collapse Hide details

Mathematical Functions

Function | Result | Notes
abs(n) | The absolute value of n |
acos(n) | The inverse cosine (arcosine) of n |
asin(n) | The inverse sine (arcsine) of n |
atan(n) | The inverse tangent (arctangent) of n |
atanh(n) | The hyperbolic inverse tangent (hyperbolic arctangent) of n |
ceil(n) | The smallest integer that is greater than n | Round up
cos(n) | The cosine of n |
cosh(n) | The hyperbolic cosine of n |
exp(n) | e raised to the power n, where e is the base of the natural logarithms |
floor(n) | The largest integer that is less than n | Round down
gamma(n) | The complete Gamma function of n |
int(n) | The value of n truncated to an integer (toward 0) |
lgamma(n) | The logarithm of the complete Gamma function of n |
log(n) | The natural (base-e) logarithm of n |
log2(n) | The base-2 logarithm of n |
log10(n) | The base-10 logarithm of n |
mod(n, modulus) | The remainder when n is divided by modulus |
pow(n, power) | The value of n raised to the power of power |
round(n) | The integer that results from rounding the absolute value of n and then reaffixing the sign. Numbers ending in 0.5 exactly are rounded away from 0. For example, round(-4.5) rounds to -5. |
sin(n) | The sine of n |
sinh(n) | The hyperbolic sine of n |
sqrt(n) | The positive square root of n |
tan(n) | The tangent of n |
tanh(n) | The hyperbolic tangent of n |
String Functions Collapse Hide details

String Functions

Function | Result | Notes
concatenate(string1, string2) | A string that is the concatenation of string1 and string2 |
datetostring(date) | The string that results when date is converted to a string |
indexof(haystack,needle[,divisor]) | A number that indicates the position of the first occurrence of needle in haystack. The optional third argument, divisor, is a number of characters used to divide needle into separate strings. Each substring is used for searching and the function returns the first occurrence of any of the substrings. For example, indexof(x, “abcd”) will return the value of the starting position of the complete string "abcd" in the string variable x; indexof(x, “abcd”, 1) will return the value of the position of the first occurrence of any of the values in the string; and indexof(x, “abcd”, 2) will return the value of the first occurrence of either "ab" or "cd". Divisor must be a positive integer and must divide evenly into the length of needle. Returns 0 if needle does not occur within haystack. |
length(string) | A number indicating the length of string |
lowercase(string) | string with uppercase letters changed to lowercase and other characters unchanged |
ltrim(string[, char]) | string with any leading instances of char removed. If char is not specified, leading blanks are removed. Char must resolve to a single character. |
midstring(string , start, end) | The substring beginning at position start of string and ending at end |
numbertostring(n) | The string that results when n is converted to a string |
replace(target, old, new) | In target, instances of old are replaced with new. All arguments are strings. |
rtrim(string[, char]) | string with any trailing instances of char removed. If char is not specified, trailing blanks are removed. Char must resolve to a single character. |
stringtodate(string) | The value of the string expression string as a date |
stringtonumber(string) | The value of the string expression string as a number |
substring(string, start, length) | The substring beginning at position start of string and running for length length |
trim(string) | string with any leading and trailing blanks removed |
uppercase(string) | string with lowercase letters changed to uppercase and other characters unchanged |
Date and Time Functions Collapse Hide details

Date and Time Functions

Function | Result | Notes
date() | The current date |
time() | The current time |
Constants Collapse Hide details

Constants

Constant | Meaning | Notes
true | True |
false | False |
pi | pi |
e | Euler's number or the base of the natural logarithm |


exclude Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
exclude,exclude,exclude
exclude function (GPL),exclude function (GPL),exclude function (GPL)

Syntax

exclude("category name" ...)

<category name>. The string representing the category on the axis. If specifying multiple categories, separate them with commas.

Description

Excludes the categories from the axis. These categories are not displayed on the axis. This function can be used only with categorical scales for dimensions, not scales for aesthetics.

Examples

Example: Exclude a category
SCALE: cat(dim(1), exclude("No Response"))
Example: Excluding multiple categories
SCALE: cat(dim(1), exclude("No Response", "Didn't Ask"))

Applies To

cat Scale (GPL)


exponent Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
exponent,exponent,exponent
exponent function (GPL),exponent function (GPL),exponent function (GPL)

Syntax

exponent(<numeric>)

<numeric>. A numeric value (including negative values) indicating the exponent for the power scale.

Description

Specifies an exponent for a power scale.

Examples

Example: Specifying a different power exponent
SCALE: power(dim(2), exponent(3))


exponential Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
exponential,exponential,exponential
exponential function (GPL),exponential function (GPL),exponential function (GPL)

Syntax

exponential(<rate>)

<rate>. Numeric value specifying the rate parameter for the distribution.

Description

Specifies an exponential distribution for the probability scale.

Examples

Example: Specifying an exponential distribution for the probability scale
SCALE: prob(dim(2), exponential(1.5))

Applies To

prob Scale (GPL)


f Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
f,f,f
f function (GPL),f function (GPL),f function (GPL)

Syntax

f(<degrees of freedom>, <degrees of freedom>)

<degrees of freedom>. Numeric values specifying the degrees of freedom parameters for the distribution. Values must be greater than 0.

Description

Specifies an F distribution for the probability scale.

Examples

SCALE: prob(dim(2), f(5, 2))

Applies To

prob Scale (GPL)


format Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
format,format,format
format function (GPL),format function (GPL),format function (GPL)

Syntax

format("date format")

<format>. The date format of the data.

Description

Indicates the input format for a date variable in the source. This function does not change the format for the date; it only specifies the format that GPL should expect. Use one or more of the following abbreviations and date separators to indicate the exact format.

Abbreviations for date formats
Abbreviation | Meaning
M | Month
d | Day
y | Year
m | Minute
s | Second

Note: In PASW Statistics, dates from a userSource are passed to GPL as numeric values. Therefore, this function does not have any affect on a userSource.

Examples

Example: Indicating a date format of the form 1/31/2006
DATA: date = col(source(mydata), name("date"), unit.time(), format("M/d/yyyy"))

Applies To

col Function (GPL)


format.date Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
format.date,format.date,format.date
format.date function (GPL),format.date function (GPL),format.date function (GPL)

Syntax

format.date()

Description

Specifies that the data are formatted as dates when displayed in an axis' tick marks. The underlying data must be dates or times.

Examples

Example: Displaying dates on an axis
GUIDE: axis(dim(1), format.date())

Applies To

axis Guide Type (GPL)


format.dateTime Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
format.dateTime,format.dateTime,format.dateTime
format.dateTime function (GPL),format.dateTime function (GPL),format.dateTime function (GPL)

Syntax

format.dateTime()

Description

Specifies that the are formatted as dates and times when displayed in an axis' tick marks. The underlying data must be dates or times.

Examples

Example: Displaying dates and times on an axis
GUIDE: axis(dim(1), format.dateTime())

Applies To

axis Guide Type (GPL)


format.time Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
format.time,format.time,format.time
format.time function (GPL),format.time function (GPL),format.time function (GPL)

Syntax

format.time()

Description

Specifies that the data are formatted times when displayed in an axis' tick marks. The underlying data must be dates or times.

Examples

Example: Displaying times on an axis
GUIDE: axis(dim(1), format.time())

Applies To

axis Guide Type (GPL)


from Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
from,from,from
from function (GPL),from function (GPL),from function (GPL)

Syntax

from(<variable name>)

<variable name>. The name of a variable previously defined in the GPL by a DATA statement.

Description

Specifies one of the pair of nodes that defines an edge relation. The is the node that defines the starting point for the edge.

Examples

Example: Creating a directed acyclic graph
ELEMENT: edge(position(layout.dag(node(id), from(fromVar), to(toVar))))

Applies To

layout.circle Function (GPL), layout.dag Function (GPL), layout.data Function (GPL), layout.grid Function (GPL), layout.network Function (GPL), layout.random Function (GPL), layout.tree Function (GPL)


gamma Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
gamma,gamma,gamma
gamma function (GPL),gamma function (GPL),gamma function (GPL)

Syntax

gamma(<rate>)

<rate>. Numeric value specifying the shape parameter for the distribution. This values must be greater than 0.

Description

Specifies a gamma distribution for the probability scale.

Examples

Example: Specifying a gamma distribution for the probability scale
SCALE: prob(dim(2), gamma(2.5))

Applies To

prob Scale (GPL)


gap Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
gap,gap,gap
gap function (GPL),gap function (GPL),gap function (GPL)

Syntax

gap(<value>)

<value>. A number with units (for example, 0px).

Description

Specifies the size of the gap between adjacent axes in a faceted graph. This function is used to close the space between adjacent axes in population pyramids and matrix scatterplots.

Examples

Example: Forcing adjacent axes to touch
GUIDE: axis(dim(3), gap(0px))

Applies To

axis Guide Type (GPL)


gridlines Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
gridlines,gridlines,gridlines
gridlines function (GPL),gridlines function (GPL),gridlines function (GPL)

Syntax

gridlines()

Description

Specifies that grid lines should be drawn for the axis. These are lines drawn from the major tick marks to the opposite side of the graph. They can assist in determining the exact location of a graphic element in the graph.

Examples

Example: Displaying grid lines
GUIDE: axis(dim(2), gridlines())

Applies To

axis Guide Type (GPL)


in Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
in,in,in
in function (GPL),in function (GPL),in function (GPL)

Syntax

in(min(<value>), max(<value>))

<value>. Numeric values for defining the range that determines which values to include.

Description

Includes only the continuous values that are in the range specified by the min and max parameters. This function is valid only for continuous variables.

Examples

Example: Including only a subset of continuous values
DATA: gender = col(source(mydata), name("salary"),
                          in(min(0), max(50000)))

Applies To

col Function (GPL)


include Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
include,include,include
include function (GPL),include function (GPL),include function (GPL)

Syntax

include(<value> ...)

<value>. The string representing the category on the axis or a numeric value on the axis. If specifying multiple values, separate them with commas.

Description

Includes the categories or values on the axis or legend, even if the data do not include the categories or values. These categories or values are always displayed on the axis or legend. For example, you may use include(0) in a bar chart to ensure bars begin at 0.

Examples

Example: Include a category
SCALE: cat(dim(1), include("No Response"))
Example: Including multiple categories
SCALE: cat(dim(1), include("No Response", "Didn't Ask"))
Example: Include a value
SCALE: linear(dim(2), include(0))
Example: Including multiple values
SCALE: linear(dim(2), include(0, 100))

Applies To

cat Scale (GPL), linear Scale (GPL), log Scale (GPL), pow Scale (GPL), safeLog Scale (GPL), safePower Scale (GPL), time Scale (GPL)


index Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
index,index,index
index function (GPL),index function (GPL),index function (GPL)

Syntax

index()

Description

Creates a new variable by indexing each case with an integer. The new variable is essentially a case number.

Examples

Example: Create an index variable and label by the variable
TRANS: casenum = index()
ELEMENT: point(position(x*y), label(casenum))

Applies To

TRANS Statement (GPL), collapse Function (GPL)


iter Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
iter,iter,iter
iter function (GPL),iter function (GPL),iter function (GPL)

Syntax

iter(<from>, <to>, <step>)

<from>. The first value in the new column. Subsequent values are iterated from this one.

<to>. The maximum value that the new column can contain.

<step>. A value defining the amount by which values are iterated.

Description

Creates a new column of data with values in a specified range. Intermediate values are calculated by adding the step value to the previous value. For example, iter(1,5,1) generates the values 1, 2, 3, 4, 5. iter(1,10,2) generates the values 1, 3, 5, 7, 9. Note that 10 is not included in the second example because it cannot be iterated from the previous value.

Examples

Example: Creating a graph from an equation
DATA: x = iter(-100,100,1)
TRANS: y = eval(x**2)
ELEMENT: line(position(x*y))

Applies To

DATA Statement (GPL)


jump Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
jump,jump,jump
jump function (GPL),jump function (GPL),jump function (GPL)

Syntax

jump()

Description

Used with smooth.step, smooth.step.left, smooth.step.center, and smooth.step.right to indicate that the interpolation line or area jumps to the next value. There is no vertical line connecting the values.

Examples

Example: Specifying an interpolation line
ELEMENT: line(position(smooth.step(educ*salary)), jump())

Applies To

area Element (GPL), line Element (GPL)


label Function (For GPL Graphic Elements)

functions (GPL),functions (GPL),functions (GPL)
label,label,label
label function (GPL),label function (GPL),label function (GPL)

Note: If you are modifying the label for a guide (like an axis), refer to label Function (For GPL Guides).

Syntax

label("label text", <function>)

or

label(<algebra>, <function>)

or

label(<statistic function>, <function>)

"label text". The text that appears in the label. Multiple strings are concatenated when each string is separated by a comma (for example, label("This is a ", "long label")).

<function>. One or more valid functions. These are optional.

<algebra>. Graph algebra, using one variable or a blend of variables.

<statistic function>. A valid statistic function.

Description

Specifies a label for a graphic element. The label appears on the graphic element. Multiple label functions can be specified. The result of each label function is displayed on a separate line in the graph.

Examples

Example: Labeling by another variable
ELEMENT: point(position(salbegin*salary), label(gender))
Example: Labeling by the result of a statistic
ELEMENT: point(position(summary.count(jobcat)), label(summary.count()))
Example: Labeling by the result of a statistic
ELEMENT: interval(position(summary.mean(jobcat*salary)), label(summary.mean(salary)))
Example: Creating a multi-line label
ELEMENT: interval(position(summary.mean(jobcat*salary)), label("Count:"), label(summary.count()))

Statistic Functions

See GPL Functions .

Valid Functions

showAll Function (GPL)

Applies To

area Element (GPL), edge Element (GPL), interval Element (GPL), line Element (GPL), path Element (GPL), point Element (GPL), polygon Element (GPL), schema Element (GPL)


label Function (For GPL Guides)

functions (GPL),functions (GPL),functions (GPL)
label,label,label
label function (GPL),label function (GPL),label function (GPL)

Note: If you are modifying the label for a graphic element (like a bar or point), refer to label Function (For GPL Graphic Elements).

Syntax

label("label text" ...)

"label text". The text that appears in the label. You can specify multiple strings by separating the strings with commas (for example, label("This is a ", "long label")). The strings are concatenated in the resulting graph.

Description

Specifies a label for a guide (for example, an axis or legend). This is text that is displayed on the resulting graph.

Examples

Example: Specifying an axis title
GUIDE: axis(dim(1), label("Job Category"))
Example: Specifying a legend title
GUIDE: legend(aesthetic(aesthetic.color), label("Gender"))
Example: Specifying a graph title
GUIDE: text.title(label("Sales By Region"))

Applies To

axis Guide Type (GPL), form.line Guide Type (GPL), legend Guide Type (GPL), text.footnote Guide Type (GPL), text.subfootnote Guide Type (GPL), text.subsubfootnote Guide Type (GPL), text.subtitle Guide Type (GPL), text.subsubtitle Guide Type (GPL), text.title Guide Type (GPL)


layout.circle Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
layout.circle,layout.circle,layout.circle
layout.circle function (GPL),layout.circle function (GPL),layout.circle function (GPL)

Syntax

layout.circle(<function>))

or

layout.circle(<algebra>, <function>)

<algebra>. Graph algebra, such as x*y. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra. The algebra for network graphs is 1*1 because the position of elements is determined by the layout method and is not tied to a coordinate value (such as a value on a dimension). This algebra is implied and needs to be specified for network graphs only when faceting is needed.

<functions>. Valid functions. The from and to functions are required. The node function is optional for edges, allowing you to draw edges without a separate node data source.

Description

Lays out graphic elements in a circle. The function is used for network graphs, which are visual representations of data that consist of nodes and relations between nodes (edges). The circle l layout is a layout that can be applied to any graph. It lays out a graph assuming that links are undirected and treats all nodes identically. Nodes are placed only around the perimeter of a circle

Note: Network graphs that display nodes and edges require two data sources, one for the unique nodes and one for the edges. If the edge data source includes weights and the weight variable is indicated in the SOURCE statement, the weights influence the length of edges in the graph, with higher weights having shorter edges.

Examples

Example: Creating a circular network diagram
ELEMENT: edge(position(layout.circle(node(id), from(fromVar), to(toVar))))
ELEMENT: point(position(layout.circle(node(id), from(fromVar), to(toVar))), label(id))

Valid Functions

from Function (GPL), node Function (GPL), to Function (GPL)

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.spread.range Function (GPL), region.spread.sd Function (GPL), region.spread.se Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL), transparency Function (For GPL Graphic Elements)


layout.dag Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
layout.dag,layout.dag,layout.dag
layout.dag function (GPL),layout.dag function (GPL),layout.dag function (GPL)

Syntax

layout.dag(<function>))

or

layout.dag(<algebra>, <function>)

<algebra>. Graph algebra, such as x*y. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra. The algebra for network graphs is 1*1 because the position of elements is determined by the layout method and is not tied to a coordinate value (such as a value on a dimension). This algebra is implied and needs to be specified for network graphs only when faceting is needed.

<functions>. Valid functions. The from and to functions are required. The node function is optional for edges, allowing you to draw edges without a separate node data source.

Description

Lays out graphic elements as a directed acyclic graph (DAG). The function is used for network graphs, which are visual representations of data that consist of nodes and relations between nodes (edges). The DAG layout should be used only for directed graphs without a primary root node (compare with layout.tree). This layout produces tree-like structures from parent nodes down to leaf nodes, so the layout works well with hierarchical data.

Note: Network graphs that display nodes and edges require two data sources, one for the unique nodes and one for the edges. If the edge data source includes weights and the weight variable is indicated in the SOURCE statement, the weights influence the length of edges in the graph, with higher weights having shorter edges.

Examples

Example: Creating a directed acyclic graph
ELEMENT: edge(position(layout.dag(node(id), from(fromVar), to(toVar))))
ELEMENT: point(position(layout.dag(node(id), from(fromVar), to(toVar))), label(id))

Valid Functions

from Function (GPL), node Function (GPL), to Function (GPL)

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.spread.range Function (GPL), region.spread.sd Function (GPL), region.spread.se Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL), transparency Function (For GPL Graphic Elements)


layout.data Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
layout.data,layout.data,layout.data
layout.data function (GPL),layout.data function (GPL),layout.data function (GPL)

Syntax

layout.data(<algebra>, <function>)

or

layout.data(<function>))

<algebra>. Graph algebra, such as x*y. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra. Unlike other network graphs, the algebra determines the position of elements and ties the position to a specific coordinate value (such as a value on a dimension). You can omit the algebra for edges if you are using algebra in another ELEMENT statement to specify the position of the points.

<functions>. Valid functions. The from and to functions are required. The node function is optional for edges, allowing you to draw edges without a separate node data source.

Description

Lays out graphic elements in the coordinate positions specified by the data. The function is used for network graphs, which are visual representations of data that consist of nodes and relations between nodes (edges).

Note: Network graphs that display nodes and edges require two data sources, one for the unique nodes and one for the edges. If the edge data source includes weights and the weight variable is indicated in the SOURCE statement, the weights influence the length of edges in the graph, with higher weights having shorter edges.

Examples

Example: Creating a network diagram
ELEMENT: point(position(layout.data(x*y, node(id), from(fromVar), to(toVar))), label(id))
ELEMENT: edge(position(layout.data(node(id), from(fromVar), to(toVar))))

Valid Functions

from Function (GPL), node Function (GPL), to Function (GPL)

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.spread.range Function (GPL), region.spread.sd Function (GPL), region.spread.se Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL), transparency Function (For GPL Graphic Elements)


layout.grid Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
layout.grid,layout.grid,layout.grid
layout.grid function (GPL),layout.grid function (GPL),layout.grid function (GPL)

Syntax

layout.grid(<function>))

or

layout.grid(<algebra>, <function>)

<algebra>. Graph algebra, such as x*y. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra. The algebra for network graphs is 1*1 because the position of elements is determined by the layout method and is not tied to a coordinate value (such as a value on a dimension). This algebra is implied and needs to be specified for network graphs only when faceting is needed.

<functions>. Valid functions. The from and to functions are required. The node function is optional for edges, allowing you to draw edges without a separate node data source.

Description

Lays out graphic elements in a grid. The function is used for network graphs, which are visual representations of data that consist of nodes and relations between nodes (edges). The grid layout is a general layout that can be applied to any graph. It lays out a graph assuming that links are undirected and treats all nodes identically. Nodes are placed only at grid points within the space.

Note: Network graphs that display nodes and edges require two data sources, one for the unique nodes and one for the edges. If the edge data source includes weights and the weight variable is indicated in the SOURCE statement, the weights influence the length of edges in the graph, with higher weights having shorter edges.

Examples

Example: Creating a grid network diagram
ELEMENT: edge(position(layout.grid(node(id), from(fromVar), to(toVar))))
ELEMENT: point(position(layout.grid(node(id), from(fromVar), to(toVar))), label(id))

Valid Functions

from Function (GPL), node Function (GPL), to Function (GPL)

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.spread.range Function (GPL), region.spread.sd Function (GPL), region.spread.se Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL), transparency Function (For GPL Graphic Elements)


layout.network Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
layout.network,layout.network,layout.network
layout.network function (GPL),layout.network function (GPL),layout.network function (GPL)

Syntax

layout.network(<function>))

or

layout.network(<algebra>, <function>)

<algebra>. Graph algebra, such as x*y. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra. The algebra for network graphs is 1*1 because the position of elements is determined by the layout method and is not tied to a coordinate value (such as a value on a dimension). This algebra is implied and needs to be specified for network graphs only when faceting is needed.

<functions>. Valid functions. The from and to functions are required. The node function is optional for edges, allowing you to draw edges without a separate node data source.

Description

Lays out graphic elements in a network. The function is used for network graphs, which are visual representations of data that consist of nodes and relations between nodes (edges). The network layout is a general layout that can be applied to any graph. It lays out a graph assuming that links are undirected and treats all nodes identically. Nodes are placed freely within the space.

Note: Network graphs that display nodes and edges require two data sources, one for the unique nodes and one for the edges. If the edge data source includes weights and the weight variable is indicated in the SOURCE statement, the weights influence the length of edges in the graph, with higher weights having shorter edges.

Examples

Example: Creating a network diagram
ELEMENT: edge(position(layout.network(node(id), from(fromVar), to(toVar))))
ELEMENT: point(position(layout.network(node(id), from(fromVar), to(toVar))), label(id))

Valid Functions

from Function (GPL), node Function (GPL), to Function (GPL)

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.spread.range Function (GPL), region.spread.sd Function (GPL), region.spread.se Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL), transparency Function (For GPL Graphic Elements)


layout.random Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
layout.random,layout.random,layout.random
layout.random function (GPL),layout.random function (GPL),layout.random function (GPL)

Syntax

layout.random(<function>))

or

layout.random(<algebra>, <function>)

<algebra>. Graph algebra, such as x*y. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra. The algebra for network graphs is 1*1 because the position of elements is determined by the layout method and is not tied to a coordinate value (such as a value on a dimension). This algebra is implied and needs to be specified for network graphs only when faceting is needed.

<functions>. Valid functions. The from and to functions are required. The node function is optional for edges, allowing you to draw edges without a separate node data source.

Description

Lays out graphic elements randomly. The function is used for network graphs, which are visual representations of data that consist of nodes and relations between nodes (edges). The network layout is a general layout that can be applied to any graph. It lays out a graph assuming that links are undirected and treats all nodes identically. Nodes are placed randomly within the space.

Note: Network graphs that display nodes and edges require two data sources, one for the unique nodes and one for the edges. If the edge data source includes weights and the weight variable is indicated in the SOURCE statement, the weights influence the length of edges in the graph, with higher weights having shorter edges.

Examples

Example: Creating a random network diagram
ELEMENT: edge(position(layout.random(node(id), from(fromVar), to(toVar))))
ELEMENT: point(position(layout.random(node(id), from(fromVar), to(toVar))), label(id))

Valid Functions

from Function (GPL), node Function (GPL), to Function (GPL)

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.spread.range Function (GPL), region.spread.sd Function (GPL), region.spread.se Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL), transparency Function (For GPL Graphic Elements)


layout.tree Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
layout.tree,layout.tree,layout.tree
layout.tree function (GPL),layout.tree function (GPL),layout.tree function (GPL)

Syntax

layout.tree(<function>))

or

layout.tree(<algebra>, <function>)

<algebra>. Graph algebra, such as x*y. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra. The algebra for network graphs is 1*1 because the position of elements is determined by the layout method and is not tied to a coordinate value (such as a value on a dimension). This algebra is implied and needs to be specified for network graphs only when faceting is needed.

<functions>. Valid functions. The from and to functions are required. The node function is optional for edges, allowing you to draw edges without a separate node data source. Also, you should use the root function when you want to ensure the correct node is used as the root node.

Description

Lays out graphic elements as a directed tree. The function is used for network graphs, which are visual representations of data that consist of nodes and relations between nodes (edges). The tree layout should be used only for directed graphs with a primary root node (compare with layout.dag). This layout produces tree-like structures from parent nodes down to leaf nodes, so the layout works well with hierarchical data. If the root node is not specified by the root function, the function picks the most likely node as the root.

Note: Network graphs that display nodes and edges require two data sources, one for the unique nodes and one for the edges. If the edge data source includes weights and the weight variable is indicated in the SOURCE statement, the weights influence the length of edges in the graph, with higher weights having shorter edges.

Examples

Example: Creating a tree
ELEMENT: edge(position(layout.tree(node(id), from(fromVar), to(toVar), root("A"))))
ELEMENT: point(position(layout.tree(node(id), from(fromVar), to(toVar), root("A"))), label(id))

Valid Functions

from Function (GPL), node Function (GPL), root Function (GPL), to Function (GPL)

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.spread.range Function (GPL), region.spread.sd Function (GPL), region.spread.se Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL), transparency Function (For GPL Graphic Elements)


link.alpha Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
link.alpha,link.alpha,link.alpha
link.alpha function (GPL),link.alpha function (GPL),link.alpha function (GPL)

Syntax

link.alpha(<algebra>, radius(<numeric>))

or

link.alpha(<binning function>, radius(<numeric>))

or

link.alpha(<statistic function>, radius(<numeric>))

<algebra>. Graph algebra, such as x*y. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra.

<numeric>. A numeric value indicating the This is required.

<binning function>. A binning function.

<statistic function>. Another statistic function. The result of the embedded statistic is used to calculate link.alpha.

Description

Calculates the alpha shape for the values. This function is typically used with the edge graphic element. The alpha shape is a generalization of the convex hull. If the radius is sufficiently large, the result is a convex hull. For smaller radius values, the shape shrinks and becomes concave. It also may not connect or contain some data values.

Examples

Example: Creating an alpha shape graph
ELEMENT: edge(position(link.alpha(x*y, radius(50))))

Statistic Functions

See GPL Functions .

Binning Functions

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL)

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.spread.range Function (GPL), region.spread.sd Function (GPL), region.spread.se Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL), transparency Function (For GPL Graphic Elements)


link.complete Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
link.complete,link.complete,link.complete
link.complete function (GPL),link.complete function (GPL),link.complete function (GPL)

Syntax

link.complete(<algebra>)

or

link.complete(<binning function>)

or

link.complete(<statistic function>)

<algebra>. Graph algebra, such as x*y. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra.

<binning function>. A binning function.

<statistic function>. Another statistic function. The result of the embedded statistic is used to calculate link.complete.

Description

Calculates the complete graph for the values. This function is typically used with the edge graphic element. The complete graph connects every data value with every other data value.

Examples

Example: Creating a complete graph
ELEMENT: edge(position(link.complete(x*y)))

Statistic Functions

See GPL Functions .

Binning Functions

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL)

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.alpha Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.spread.range Function (GPL), region.spread.sd Function (GPL), region.spread.se Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL), transparency Function (For GPL Graphic Elements)


link.delaunay Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
link.delaunay,link.delaunay,link.delaunay
link.delaunay function (GPL),link.delaunay function (GPL),link.delaunay function (GPL)

Syntax

link.delaunay(<algebra>)

or

link.delaunay(<binning function>)

or

link.delaunay(<statistic function>)

<algebra>. Graph algebra, such as x*y. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra.

<binning function>. A binning function.

<statistic function>. Another statistic function. The result of the embedded statistic is used to calculate link.delaunay.

Description

Calculates the Delaunay triangulation for the values. This function is typically used with the edge graphic element. The triangulation connects all values so that the connecting segments form triangles.

Examples

Example: Creating a Delaunay triangulation
ELEMENT: edge(position(link.delaunay(x*y)))

Statistic Functions

See GPL Functions .

Binning Functions

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL)

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.alpha Function (GPL), link.complete Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.spread.range Function (GPL), region.spread.sd Function (GPL), region.spread.se Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL), transparency Function (For GPL Graphic Elements)


link.distance Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
link.distance,link.distance,link.distance
link.distance function (GPL),link.distance function (GPL),link.distance function (GPL)

Syntax

link.distance(<algebra>, radius(<numeric>))

or

link.distance(<binning function>, radius(<numeric>))

or

link.distance(<statistic function>, radius(<numeric>))

<algebra>. Graph algebra, such as x*y. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra.

<numeric>. A numeric value indicating the distance to determine whether values are connected.

<binning function>. A binning function.

<statistic function>. Another statistic function. The result of the embedded statistic is used to calculate link.distance.

Description

Calculates the distance graph for the values. This function is typically used with the edge graphic element. The distance graph connects any two values whose distance is less than or equal to the specified radius.

Examples

Example: Creating a distance graph
ELEMENT: edge(position(link.distance(x*y), radius(5000)))

Statistic Functions

See GPL Functions .

Binning Functions

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL)

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.spread.range Function (GPL), region.spread.sd Function (GPL), region.spread.se Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL), transparency Function (For GPL Graphic Elements)


link.gabriel Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
link.gabriel,link.gabriel,link.gabriel
link.gabriel function (GPL),link.gabriel function (GPL),link.gabriel function (GPL)

Syntax

link.gabriel(<algebra>)

or

link.gabriel(<binning function>)

or

link.gabriel(<statistic function>)

<algebra>. Graph algebra, such as x*y. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra.

<binning function>. A binning function.

<statistic function>. Another statistic function. The result of the embedded statistic is used to calculate link.gabriel.

Description

Calculates the Gabriel graph for the values. This function is typically used with the edge graphic element. A Gabriel graph connects values if they are Gabriel neighbors. Gabriel neighbors are defined by imagining a circle whose diameter is the line connecting two values. The values are Gabriel neighbors if the circle doesn't contain any other values.

Examples

Example: Creating a Gabriel graph
ELEMENT: edge(position(link.gabriel(x*y)))

Statistic Functions

See GPL Functions .

Binning Functions

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL)

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.spread.range Function (GPL), region.spread.sd Function (GPL), region.spread.se Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL), transparency Function (For GPL Graphic Elements)


link.hull Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
link.hull,link.hull,link.hull
link.hull function (GPL),link.hull function (GPL),link.hull function (GPL)

Syntax

link.hull(<algebra>)

or

link.hull(<binning function>)

or

link.hull(<statistic function>)

<algebra>. Graph algebra, such as x*y. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra.

<binning function>. A binning function.

<statistic function>. Another statistic function. The result of the embedded statistic is used to calculate link.hull.

Description

Calculates the convex hull around the values. This function is typically used with the edge graphic element. A convex hull connects the least number of outermost values so that the hull contains all values. The hull contains all possible connections between any two values. Note that the convex hull is the boundary of the Delaunay triangulation.

Examples

Example: Creating a convex hull
ELEMENT: edge(position(link.hull(x*y)))

Statistic Functions

See GPL Functions .

Binning Functions

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL)

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.spread.range Function (GPL), region.spread.sd Function (GPL), region.spread.se Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL), transparency Function (For GPL Graphic Elements)


link.influence Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
link.influence,link.influence,link.influence
link.influence function (GPL),link.influence function (GPL),link.influence function (GPL)

Syntax

link.influence(<algebra>)

or

link.influence(<binning function>)

or

link.influence(<statistic function>)

<algebra>. Graph algebra, such as x*y. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra.

<binning function>. A binning function.

<statistic function>. Another statistic function. The result of the embedded statistic is used to calculate link.influence.

Description

Calculates a sphere of influence graph for the values. This function is typically used with the edge graphic element. The sphere of influence graph connects values if the distance between two values is less than or equal to the sum of the nearest neighbor distances for the two values. The nearest neighbor distance for a value is the distance between it and the value closest to it.

Examples

Example: Creating a sphere of influence graph
ELEMENT: edge(position(link.influence(x*y)))

Statistic Functions

See GPL Functions .

Binning Functions

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL)

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.spread.range Function (GPL), region.spread.sd Function (GPL), region.spread.se Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL), transparency Function (For GPL Graphic Elements)


link.join Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
link.join,link.join,link.join
link.join function (GPL),link.join function (GPL),link.join function (GPL)

Syntax

link.join(<algebra>)

or

link.join(<binning function>)

or

link.join(<statistic function>)

<algebra>. Graph algebra, such as x*y. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra.

<binning function>. A binning function.

<statistic function>. Another statistic function. The result of the embedded statistic is used to calculate link.join.

Description

Joins sets of points from a blend. link.join may be used for repeated measures or observations over time, among others. In all cases, there is a blend that defines the relation. This distinguishes link.join from the other link functions.

Examples

Example: Creating a bridge plot
ELEMENT: edge(position(link.join(x1*y1 + x2*y2)), label(a))
ELEMENT: point(position(x1*y1 + x2*y2), label("Before"+"After"))

This example assumes data that is in a format like the following:

Example data
a | x1 | y1 | x2 | y2
Bill | 45 | 50 | 58 | 67
Alice | 32 | 40 | 33 | 40
Bob | 22 | 31 | 26 | 35
Audrey | 55 | 59 | 52 | 64
Example: Drawing vectors from the origin
TRANS: zero = eval(0)
ELEMENT: edge(position(link.join(zero*zero + x*y)), shape(shape.arrow))

Statistic Functions

See GPL Functions .

Binning Functions

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL)

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.spread.range Function (GPL), region.spread.sd Function (GPL), region.spread.se Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL), transparency Function (For GPL Graphic Elements)


link.mst Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
link.mst,link.mst,link.mst
link.mst function (GPL),link.mst function (GPL),link.mst function (GPL)

Syntax

link.mst(<algebra>)

or

link.mst(<binning function>)

or

link.mst(<statistic function>)

<algebra>. Graph algebra, such as x*y. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra.

<binning function>. A binning function.

<statistic function>. Another statistic function. The result of the embedded statistic is used to calculate link.mst.

Description

Calculates the minimum spanning tree (MST) to connect the values specified by the algebra. This function is typically used with the edge graphic element. The MST connects all values by the shortest distance and never intersects a value twice.

Examples

Example: Creating a minimal spanning tree
ELEMENT: edge(position(link.mst(x*y)))

Statistic Functions

See GPL Functions .

Binning Functions

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL)

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.spread.range Function (GPL), region.spread.sd Function (GPL), region.spread.se Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL), transparency Function (For GPL Graphic Elements)


link.neighbor Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
link.neighbor,link.neighbor,link.neighbor
link.neighbor function (GPL),link.neighbor function (GPL),link.neighbor function (GPL)

Syntax

link.neighbor(<algebra>, neighborCount(<integer>))

or

link.neighbor(<binning function>, neighborCount(<integer>))

or

link.neighbor(<statistic function>, neighborCount(<integer>))

<algebra>. Graph algebra, such as x*y. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra.

<integer>. An integer defining the number of neighboring values to connect to a value.

<binning function>. A binning function.

<statistic function>. Another statistic function. The result of the embedded statistic is used to calculate link.neighbor.

Description

Calculates the nearest neighbor graph for the values. This function is typically used with the edge graphic element. The nearest neighbor graph connects a value p to the specified number of values with the shortest distance to p.

Examples

Example: Creating a nearest neighbor graph
ELEMENT: edge(position(link.neighbor(x*y, neighborCount(3))))

Statistic Functions

See GPL Functions .

Binning Functions

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL)

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.spread.range Function (GPL), region.spread.sd Function (GPL), region.spread.se Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL), transparency Function (For GPL Graphic Elements)


link.relativeNeighborhood Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
link.relativeNeighborhood,link.relativeNeighborhood,link.relativeNeighborhood
link.relativeNeighborhood function (GPL),link.relativeNeighborhood function (GPL),link.relativeNeighborhood function (GPL)

Syntax

link.relativeNeighborhood(<algebra>)

or

link.relativeNeighborhood(<binning function>)

or

link.relativeNeighborhood(<statistic function>)

<algebra>. Graph algebra, such as x*y. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra.

<binning function>. A binning function.

<statistic function>. Another statistic function. The result of the embedded statistic is used to calculate link.relativeNeighborhood.

Description

Calculates the relative neighborhood graph for the values. This function is typically used with the edge graphic element. A relative neighborhood graph connects values if they are relative neighbors. Relative neighbors are defined by imagining two circles whose centers are the two values, where the radius of the circles is the distance between the values. If the area created by the intersection of the two circles does not contain any other values, the values are relative neighbors.

Examples

Example: Creating a relative neighborhood graph
ELEMENT: edge(position(link.relativeNeighborhood(x*y)))

Statistic Functions

See GPL Functions .

Binning Functions

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL)

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.spread.range Function (GPL), region.spread.sd Function (GPL), region.spread.se Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL), transparency Function (For GPL Graphic Elements)


link.sequence Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
link.sequence,link.sequence,link.sequence
link.sequence function (GPL),link.sequence function (GPL),link.sequence function (GPL)

Syntax

link.sequence(<algebra>)

or

link.sequence(<binning function>)

or

link.sequence(<statistic function>)

<algebra>. Graph algebra, such as x*y. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra.

<binning function>. A binning function.

<statistic function>. Another statistic function. The result of the embedded statistic is used to calculate link.sequence.

Description

Connects the values in the order in which their associated cases appear in the dataset. This function is typically used with the edge graphic element. In many cases, the result is the same as what you obtain by using the path graphic element without a statistic.

Examples

Example: Creating a sequence graph
ELEMENT: edge(position(link.sequence(x*y)))

Statistic Functions

See GPL Functions .

Binning Functions

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL)

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.spread.range Function (GPL), region.spread.sd Function (GPL), region.spread.se Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL), transparency Function (For GPL Graphic Elements)


link.tsp Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
link.tsp,link.tsp,link.tsp
link.tsp function (GPL),link.tsp function (GPL),link.tsp function (GPL)

Syntax

link.tsp(<algebra>)

or

link.tsp(<binning function>)

or

link.tsp(<statistic function>)

<algebra>. Graph algebra, such as x*y. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra.

<binning function>. A binning function.

<statistic function>. Another statistic function. The result of the embedded statistic is used to calculate link.tsp.

Description

Calculates the solution to the travelling salesman problem (TSP) for the values. This function is typically used with the edge or path graphic element. The solution to the TSP is the shortest path that traverses all values once and starts and ends at the same value.

Examples

Example: Drawing the solution to the travelling salesman problem
ELEMENT: edge(position(link.tsp(x*y)))

Statistic Functions

See GPL Functions .

Binning Functions

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL)

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), position Function (For GPL Graphic Elements), region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.spread.range Function (GPL), region.spread.sd Function (GPL), region.spread.se Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL), transparency Function (For GPL Graphic Elements)


logistic Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
logistic,logistic,logistic
logistic function (GPL),logistic function (GPL),logistic function (GPL)

Syntax

logistic(<location>, <scale>)

<location>. Numeric value specifying the location parameter for the distribution.

<scale>. Numeric value specifying the scale parameter for the distribution. This value must be greater than 0.

Description

Specifies a logistic distribution for the probability scale.

Examples

Example: Specifying a logistic distribution for the probability scale
SCALE: prob(dim(2), logistic(5, 2))

Applies To

prob Scale (GPL)


map Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
map,map,map
map function (GPL),map function (GPL),map function (GPL)

Syntax

map((<value>, <aesthetic>) ...)

<value>. A categorical value that is being mapped to a specific aesthetic.

<aesthetic>. A valid aesthetic value or constant (for example, color.red or size."5px") that will be used for the categorical value.

Note: A value and aesthetic pair is enclosed in parentheses. If you are specifying multiple pairs, use commas to separate the pairs.

Description

Maps a specific categorical value to a specific aesthetic value. For example, if you were creating a bar chart showing the median income in each U.S. state, you could use the map function to force the color of the bar corresponding to Illinois to be blue.

Examples

Example: Mapping a category to a color
SCALE: cat(aesthetic(aesthetic.color), map(("IL", color.blue)))
Example: Mapping multiple categories to colors
SCALE: cat(aesthetic(aesthetic.color), map(("IL", color.blue), ("CA", color.green)))

Applies To

cat Scale (GPL)


marron Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
marron,marron,marron
marron function (GPL),marron function (GPL),marron function (GPL)

Syntax

marron()

Description

Uses the Marron adjustment to normalize the default fixed window across different kernel functions. Different kernel functions have different optimal windows. Therefore, normalizing the fixed window is useful when you need to compare the results of multiple kernel functions.

Examples

Example: Adding a kernel distribution
ELEMENT: line(position(density.kernel.epanechnikov(x, marron())))

Applies To

density.kernel Function (GPL)


max Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
max,max,max
max function (GPL),max function (GPL),max function (GPL)

Syntax

max(<numeric>)

<numeric>. A numeric value indicating the maximum scale value.

Description

Specifies a maximum value for a scale.

Examples

Example: Specifying a maximum on the 2nd dimension (y axis)
SCALE: linear(dim(2), max(50000))

Applies To

linear Scale (GPL), log Scale (GPL), pow Scale (GPL), safeLog Scale (GPL), safePower Scale (GPL), time Scale (GPL)


min Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
min,min,min
min function (GPL),min function (GPL),min function (GPL)

Syntax

min(<numeric>)

<numeric>. A numeric value indicating the minimum scale value.

Description

Specifies a minimum value for a scale.

Examples

Example: Specifying a minimum on the 2nd dimension (y axis)
SCALE: linear(dim(2), min(0))

Applies To

linear Scale (GPL), log Scale (GPL), pow Scale (GPL), safeLog Scale (GPL), safePower Scale (GPL), time Scale (GPL)


mirror Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
mirror,mirror,mirror
mirror function (GPL),mirror function (GPL),mirror function (GPL)

Syntax

mirror(<coord>)

<coord>. A valid coordinate type or transformation function. This is optional.

Description

Mirrors facets in the x axis dimension. This is useful for creating population pyramids.

Examples

Example: Mirroring dimensions in a population pyramid
COORD: transpose(mirror(rect(dim(1, 2))))

Coordinate Types and Transformations

parallel Coordinate Type (GPL), polar Coordinate Type (GPL), polar.theta Coordinate Type (GPL), rect Coordinate Type (GPL), project Function (GPL), reflect Function (GPL), transpose Function (GPL), wrap Function (GPL)

Applies To

COORD Statement (GPL), parallel Coordinate Type (GPL), polar Coordinate Type (GPL), polar.theta Coordinate Type (GPL), rect Coordinate Type (GPL), project Function (GPL)


missing.gap Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
missing.gap,missing.gap,missing.gap
missing.gap function (GPL),missing.gap function (GPL),missing.gap function (GPL)

Syntax

missing.gap()

Description

Specifies that the graphic element ends at a valid value and does not continue until the next valid value. There is a gap between valid values.

Examples

Example: Specifying gaps for missing values
ELEMENT: line(position(x*y), missing.gap())

Applies To

area Element (GPL), edge Element (GPL), line Element (GPL), path Element (GPL)


missing.interpolate Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
missing.interpolate,missing.interpolate,missing.interpolate
missing.interpolate function (GPL),missing.interpolate function (GPL),missing.interpolate function (GPL)

Syntax

missing.interpolate()

Description

Specifies that the graphic element is interpolated through missing values. That is, the graphic element is continuous from one valid value to another, regardless of missing values between the valid values.

Examples

Example: Interpolating through missing values
ELEMENT: line(position(x*y), missing.interpolate())

Applies To

area Element (GPL), edge Element (GPL), line Element (GPL), path Element (GPL)


missing.listwise Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
missing.listwise,missing.listwise,missing.listwise
missing.listwise function (GPL),missing.listwise function (GPL),missing.listwise function (GPL)

Syntax

missing.listwise()

Description

Specifies that a case is excluded from the graph if the case is missing a value for any variable in the dataset. It does not matter if the variable is actually used in the graph.

Examples

Example: Excluding missing values listwise
SOURCE: s = csvSource(file("mydata.csv"), missing.listwise())

Applies To

csvSource Function (GPL), sqlSource Function (GPL), userSource Function (GPL)


missing.pairwise Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
missing.pairwise,missing.pairwise,missing.pairwise
missing.pairwise function (GPL),missing.pairwise function (GPL),missing.pairwise function (GPL)

Syntax

missing.pairwise()

Description

Specifies that a case is excluded from the graph if the case is missing a value for any of the variables actually used in the graph. For example, if variables x, y, and z are used in the graph, a case is excluded only if it is missing a value for one of these variables. The missingness of other variables is not considered. missing.pairwise is the default behavior for handling missing values.

Examples

Example: Excluding missing values pairwise
SOURCE: s = csvSource(file("mydata.csv"), missing.pairwise())

Applies To

csvSource Function (GPL), sqlSource Function (GPL), userSource Function (GPL)


missing.wings Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
missing.wings,missing.wings,missing.wings
missing.wings function (GPL),missing.wings function (GPL),missing.wings function (GPL)

Syntax

missing.wings()

Description

Specifies that the graphic element continues after a valid value in the direction of the next valid value but then breaks just before and after the missing value. This is like interpolating through the missing value and erasing the graphic element at the missing value. For line charts, the result looks similar to wings.

Examples

Example: Specifying wings for missing values
ELEMENT: line(position(x*y), missing.wings())

Applies To

area Element (GPL), edge Element (GPL), line Element (GPL), path Element (GPL)


multiple Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
multiple,multiple,multiple
multiple function (GPL),multiple function (GPL),multiple function (GPL)

Syntax

multiple(<numeric>)

<numeric>. A positive numeric value.

Description

Specifies a multiplier for statistic functions.

Examples

Example: Specifying 2 standard deviations
ELEMENT: interval(position(region.spread.sd(x*y, multiple(2))), shape(shape.ibeam))

Applies To

region.spread.sd Function (GPL), region.spread.se Function (GPL)


noConstant Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
noConstant,noConstant,noConstant
noConstant function (GPL),noConstant function (GPL),noConstant function (GPL)

Syntax

noConstant()

Description

Specifies that no constant value is used in the smoother equation. Therefore, the smoother is calculated through the origin.

Examples

Example: Creating a linear fit line through the origin
ELEMENT: line(position(smooth.linear(salbegin*salary, noConstant())))

Applies To

region.confi.smooth Function (GPL), smooth.cubic Function (GPL), smooth.linear Function (GPL), smooth.quadratic Function (GPL)


node Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
node,node,node
node function (GPL),node function (GPL),node function (GPL)

Syntax

node(<variable name>)

<variable name>. The name of a variable previously defined in the GPL by a DATA statement.

Description

Specifies the variable containing the unique nodes in the dataset.

Examples

Example: Creating a directed acyclic graph
ELEMENT: edge(position(layout.dag(node(id), from(fromVar), to(toVar))))

Applies To

layout.circle Function (GPL), layout.dag Function (GPL), layout.data Function (GPL), layout.grid Function (GPL), layout.network Function (GPL), layout.random Function (GPL), layout.tree Function (GPL)


notIn Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
notIn,notIn,notIn
notIn function (GPL),notIn function (GPL),notIn function (GPL)

Syntax

notIn("category name" ...)

<category name>. The string representing the category to be excluded. If specifying multiple categories, separate them with commas.

Description

Excludes the categories from the variable. These categories are not displayed or used in statistical calculations. This function is valid only for variables defined as categorical.

Examples

Example: Excluding a category from a variable
DATA: gender = col(source(mydata), name("gender"), unit.category(), notIn("Missing"))

Applies To

col Function (GPL)


normal Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
normal,normal,normal
normal function (GPL),normal function (GPL),normal function (GPL)

Syntax

normal(<mean>, <standard deviation>)

<mean>. Numeric value indicating the mean parameter for the distribution.

<standard deviation>. Numeric value indicating the standard deviation parameter for the distribution.

Description

Specifies a normal distribution for the probability scale.

Examples

Example: Specifying a normal distribution for the probability scale
SCALE: prob(dim(2), normal(50000, 15000))

Applies To

prob Scale (GPL)


opposite Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
opposite,opposite,opposite
opposite function (GPL),opposite function (GPL),opposite function (GPL)

Syntax

opposite()

Description

Positions an axis on the side opposite from the one on which it normally appears. For example, using opposite with the y axis would position it on the right side. opposite can also be used to create two axes, in which case the opposite one is often an alternate scale or a transformed version of the original.

Examples

Example: Moving the y-axis to the opposite side
GUIDE: axis(dim(2), label("Count"), opposite())
Example: Adding a derived axis
GUIDE: axis(dim(2), label("Cumulative Count"))
GUIDE: axis(dim(2), label("Cumulative Percent"), opposite(), unit.percent())

Applies To

axis Guide Type (GPL)


origin Function (For GPL Graphs)

functions (GPL),functions (GPL),functions (GPL)
origin,origin,origin
origin function (GPL),origin function (GPL),origin function (GPL)

Note: If you are modifying the origin for a scale, refer to origin Function (For GPL Scales).

Syntax

origin(<value>, <value>)

<value>. Indicates an absolute value or a percentage for the origin of the graph. The value is relative to the top left corner of the page and does not include axis labels. The first value indicates the x value relative to this position, and the second value indicates the y value relative to this position. Units or a percent sign can be included with the value (e.g., 30px, 5cm, or 25%). If units are omitted, they are assumed to be pixels. Percentages are proportional to the whole page.

Description

Specifies the position of the graph relative to the top left corner of the page.

Examples

Example: Positioning a graph with absolute units
GRAPH: start(origin(2in, 4in))
Example: Positioning a graph with percentages
GRAPH: start(origin(10%, 100%))

Applies To

begin Function (For GPL Graphs)


origin Function (For GPL Scales)

functions (GPL),functions (GPL),functions (GPL)
origin,origin,origin
origin function (GPL),origin function (GPL),origin function (GPL)

Note: If you are modifying the origin for a graph, refer to origin Function (For GPL Graphs).

Syntax

origin(<numeric>)

<numeric>. A numeric value indicating the value of the scale's origin.

Description

Specifies the origin for a scale. The origin is typically used to specify a value from which area or interval graphic elements extend. The graphic elements originate at the origin and extend toward their value. For example, if your bar chart includes values of 367 and 48 and the origin is 100, one bar extends up from 100 to 367 (in default coordinates), while the other bar extends down to 48.

Examples

Example: Specifying the origin
SCALE: linear(dim(2), origin(100))

Applies To

linear Scale (GPL), log Scale (GPL), pow Scale (GPL), safeLog Scale (GPL), safePower Scale (GPL), time Scale (GPL)


poisson Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
poisson,poisson,poisson
poisson function (GPL),poisson function (GPL),poisson function (GPL)

Syntax

poisson(<rate>)

<rate>. Numeric value specifying the rate parameter for the distribution. This value must be greater than 0.

Description

Specifies a poisson distribution for the probability scale.

Examples

Example: Specifying a poisson distribution for the probability scale
SCALE: prob(dim(2), poisson(5.5))

Applies To

prob Scale (GPL)


position Function (For GPL Graphic Elements)

functions (GPL),functions (GPL),functions (GPL)
position,position,position
position function (GPL),position function (GPL),position function (GPL)

Note: If you are specifying a position for a reference line (form.line), refer to position Function (For GPL Guides).

Syntax

position(<algebra>)

or

position(<binning function>)

or

position(<statistic function>)

<algebra>. Graph algebra, such as x*y. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra.

<binning function>. A binning function.

<statistic function>. A statistic function.

Description

Specifies the position of the graphic element in the graph. When a statistic function is used in position, the statistic function is calculated on the second crossed variable in a 2-D coordinate system and the third crossed variable in a 3-D coordinate system.

Examples

Example: Scatterplot
ELEMENT: point(position(x*y))
Example: Bar chart of means
ELEMENT: interval(position(summary.mean(x*y)))

Statistic Functions

See GPL Functions .

Binning Functions

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL)

Applies To

area Element (GPL), edge Element (GPL), interval Element (GPL), line Element (GPL), path Element (GPL), point Element (GPL), polygon Element (GPL), schema Element (GPL)


position Function (For GPL Guides)

functions (GPL),functions (GPL),functions (GPL)
position,position,position
position function (GPL),position function (GPL),position function (GPL)

Note: If you are specifying a position for a graphic element, refer to position Function (For GPL Graphic Elements).

Syntax

position(<x coordinate>, <y coordinate>)

<coordinate>. A numeric value or an asterisk (*) indicating the position of the line in relation to a particular axis. The asterisk is a wildcard character that represents all values on the associated axis. For example, *,10 indicates a line at all x-axis values and at 10 on the y axis. In other words, these coordinates specify a horizontal reference line at 10.

Description

Specifies the position of a reference line (form.line guide).

Examples

Example: Horizontal reference line
GUIDE: form.line(position(*, 5000))
Example: Vertical reference line
GUIDE: form.line(position(5000, *))

Applies To

form.line Guide Type (GPL)


preserveStraightLines Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
preserveStraightLines,preserveStraightLines,preserveStraightLines
preserveStraightLines function (GPL),preserveStraightLines function (GPL),preserveStraightLines function (GPL)

Syntax

preserveStraightLines()

Description

Specifies that the graphic element is not curved in the space between points. Rather, the graphic element is drawn straight from point to point. This function is relevant only for graphic elements drawn in polar coordinates.

Examples

Example: Drawing straight lines
ELEMENT: line(position(x*y), preserveStraightLines())

Applies To

area Element (GPL), edge Element (GPL), line Element (GPL), path Element (GPL), polygon Element (GPL)


project Function (GPL)

coordinate types (GPL),coordinate types (GPL),coordinate types (GPL)
project,project,project
project coordinates (GPL),project coordinates (GPL),project coordinates (GPL)

Syntax

project.<projection>()

<projection>. A valid projection name.

Description

Transforms the coordinate system using a map projection.

Examples

Example: Creating a map
SOURCE: mapsrc = mapSource(file("World.smz"), layer("World"))
DATA: lon*lat = mapVariables(source(mapsrc))
COORD: project.mercator()
ELEMENT: polygon(position(lon*lat))

Valid Projection Names

lambert
mercator
transverseMercator
winkelTripel

Applies To

COORD Statement (GPL), parallel Coordinate Type (GPL), polar Coordinate Type (GPL), polar.theta Coordinate Type (GPL), rect Coordinate Type (GPL)


proportion Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
proportion,proportion,proportion
proportion function (GPL),proportion function (GPL),proportion function (GPL)

Syntax

proportion(<numeric>)

<numeric>. A numeric value between 0 and 1.

Description

Specifies the proportion of data points to include when calculating the smooth function. This specifies the size of the window used for the smoother.

Examples

Example: Creating a loess fit line with specific smoother window
ELEMENT: line(position(smooth.loess(salbegin*salary, proportion(0.9))))

Applies To

smooth.cubic Function (GPL), smooth.linear Function (GPL), smooth.loess Function (GPL), smooth.mean Function (GPL), smooth.median Function (GPL), smooth.quadratic Function (GPL)


reflect Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
reflect,reflect,reflect
reflect function (GPL),reflect function (GPL),reflect function (GPL)

Syntax

reflect(dim(<numeric>), <coord>)

<numeric>. A numeric value indicating the dimension across which the graph is reflected. See the topic dim Function (GPL) for more information.

<coord>. A valid coordinate type or transformation function. This is optional.

Description

Reflects the coordinate system across the specified dimension.

Examples

Example: Creating an icicle plot
COORD: rect(dim(1,2), reflect(dim(2)))
ELEMENT: interval(position(x*y))

Coordinate Types and Transformations

parallel Coordinate Type (GPL), polar Coordinate Type (GPL), polar.theta Coordinate Type (GPL), rect Coordinate Type (GPL), mirror Function (GPL), project Function (GPL), transpose Function (GPL), wrap Function (GPL)

Applies To

COORD Statement (GPL), parallel Coordinate Type (GPL), polar Coordinate Type (GPL), polar.theta Coordinate Type (GPL), rect Coordinate Type (GPL), project Function (GPL)


region.confi.count Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
region.confi.count,region.confi.count,region.confi.count
region.confi.count function (GPL),region.confi.count function (GPL),region.confi.count function (GPL)

Syntax

region.confi.count(<algebra>, <function>)

or

region.confi.count(<statistic function>, <function>)

<algebra>. Graph algebra, such as x or x*y. In the second case, the confidence interval for the count is calculated for cases with non-missing y-variable values. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra.

<function>. One or more valid functions. These are optional. If no alpha function is specified, 0.95 is used for the alpha.

<statistic function>. Another statistic function. The result of the embedded statistic is used to calculate region.confi.count.

Description

Calculates the confidence interval around the count. The function creates two values. When using the interval, area, or edge graphic elements, this function results in one graphic element showing the range of the confidence interval. All other graphic elements result in two separate elements, one showing the confidence interval below the count and one showing the confidence interval above the count.

Examples

Example: Creating error bars
ELEMENT: interval(position(region.confi.count(jobcat)), shape(shape.ibeam))

Statistic Functions

See GPL Functions .

Valid Functions

alpha Function (GPL)

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.spread.range Function (GPL), region.spread.sd Function (GPL), region.spread.se Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL), transparency Function (For GPL Graphic Elements)


region.confi.mean Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
region.confi.mean,region.confi.mean,region.confi.mean
region.confi.mean function (GPL),region.confi.mean function (GPL),region.confi.mean function (GPL)

Syntax

region.confi.mean(<algebra>, <function>)

or

region.confi.mean(<statistic function>, <function>)

<algebra>. Graph algebra, such as x*y. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra.

<function>. One or more valid functions. These are optional. If no alpha function is specified, 0.95 is used for the alpha.

<statistic function>. Another statistic function. The result of the embedded statistic is used to calculate region.confi.mean.

Description

Calculates the confidence interval around the mean. The function creates two values. When using the interval, area, or edge graphic elements, this function results in one graphic element showing the range of the confidence interval. All other graphic elements result in two separate elements, one showing the confidence interval below the mean and one showing the confidence interval above the mean.

Examples

Example: Creating error bars
ELEMENT: interval(position(region.confi.mean(jobcat*salary)), shape(shape.ibeam))

Statistic Functions

See GPL Functions .

Valid Functions

alpha Function (GPL)

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.confi.count Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.spread.range Function (GPL), region.spread.sd Function (GPL), region.spread.se Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL), transparency Function (For GPL Graphic Elements)


region.confi.percent.count Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
region.confi.percent.count,region.confi.percent.count,region.confi.percent.count
region.confi.percent.count function (GPL),region.confi.percent.count function (GPL),region.confi.percent.count function (GPL)

Syntax

region.confi.percent.count(<algebra>, <function>, <base function>)

or

region.confi.percent.count(<statistic function>, <function>, <base function>)

<algebra>. Graph algebra, such as x or x*y. In the second case, the confidence interval for the percentage is calculated for cases with non-missing y-variable values. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra.

<function>. One or more valid functions. These are optional. If no alpha function is specified, 0.95 is used for the alpha.

<base function>. A function that specifies the percentage base for region.confi.percent.count. This is optional. The default is base.all().

<statistic function>. Another statistic function. The result of the embedded statistic is used to calculate region.confi.percent.count.

Description

Calculates the confidence interval around the percentage within each group compared to the total number of cases. The function creates two values. When using the interval, area, or edge graphic elements, this function results in one graphic element showing the range of the confidence interval. All other graphic elements result in two separate elements, one showing the confidence interval below the percentage value and one showing the confidence interval above the percentage value.

Examples

Example: Creating error bars
ELEMENT: interval(position(region.confi.percent.count(jobcat)), shape(shape.ibeam))

Statistic Functions

See GPL Functions .

Valid Functions

alpha Function (GPL)

Base Functions

base.aesthetic Function (GPL), base.all Function (GPL), base.coordinate Function (GPL)

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.proportion.count Function (GPL), region.spread.range Function (GPL), region.spread.sd Function (GPL), region.spread.se Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL), transparency Function (For GPL Graphic Elements)


region.confi.proportion.count Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
region.confi.proportion.count,region.confi.proportion.count,region.confi.proportion.count
region.confi.proportion.count function (GPL),region.confi.proportion.count function (GPL),region.confi.proportion.count function (GPL)

Syntax

region.confi.proportion.count(<algebra>, <function>, <base function>)

or

region.confi.proportion.count(<statistic function>, <function>, <base function>)

<algebra>. Graph algebra, such as x or x*y. In the second case, the confidence interval for the proportion is calculated for cases with non-missing y-variable values. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra.

<function>. One or more valid functions. These are optional. If no alpha function is specified, 0.95 is used for the alpha.

<base function>. A function that specifies the percentage base for region.confi.proportion.count. This is optional. The default is base.all().

<statistic function>. Another statistic function. The result of the embedded statistic is used to calculate region.confi.proportion.count.

Description

Calculates the confidence interval around the proportion within each group compared to the total number of cases. The function creates two values. When using the interval, area, or edge graphic elements, this function results in one graphic element showing the range of the confidence interval. All other graphic elements result in two separate elements, one showing the confidence interval below the proportion value and one showing the confidence interval above the proportion value.

Examples

Example: Creating error bars
ELEMENT: interval(position(region.confi.proportion.count(jobcat)), shape(shape.ibeam))

Statistic Functions

See GPL Functions .

Valid Functions

alpha Function (GPL)

Base Functions

base.aesthetic Function (GPL), base.all Function (GPL), base.coordinate Function (GPL)

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.spread.range Function (GPL), region.spread.sd Function (GPL), region.spread.se Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL), transparency Function (For GPL Graphic Elements)


region.confi.smooth Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
region.confi.smooth,region.confi.smooth,region.confi.smooth
region.confi.smooth function (GPL),region.confi.smooth function (GPL),region.confi.smooth function (GPL)

Syntax

region.confi.smooth.<smooth function>(<algebra>, <function>)

<algebra>. Graph algebra, such as x*y. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra.

<smooth function>. The smooth function for which to calculate the confidence interval. Valid values are cubic, linear, and quadratic.

<function>. One or more valid functions. These are optional. If no alpha function is specified, 0.95 is used for the alpha.

Description

Calculates the confidence interval around a smoother function. The function creates two values. When using the interval, area, or edge graphic elements, this function results in one graphic element showing the range of the confidence interval. All other graphic elements result in two separate elements, one showing the confidence interval below the smoother function and one showing the confidence interval above the smoother function.

Examples

Example: Showing the confidence interval around a fit line
ELEMENT: line(position(region.confi.smooth.linear(salbegin*salary)))

Valid Functions

alpha Function (GPL), noConstant Function (GPL)

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.spread.range Function (GPL), region.spread.sd Function (GPL), region.spread.se Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL), transparency Function (For GPL Graphic Elements)


region.spread.range Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
region.spread.range,region.spread.range,region.spread.range
region.spread.range function (GPL),region.spread.range function (GPL),region.spread.range function (GPL)

Syntax

region.spread.range(<algebra>)

or

region.spread.range(<statistic function>)

<algebra>. Graph algebra, such as x*y. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra.

<statistic function>. Another statistic function. The result of the embedded statistic is used to calculate region.spread.range.

Description

Calculates the minimum and maximum for a variable or variables identified by the algebra. That is, region.spread.range calculates the range of the variables. When using the interval, area, or edge graphic elements, this function results in one graphic element showing the range. All other graphic elements result in two separate elements, one showing the start of the range and one showing the end of the range.

Examples

Example: Range bar showing minimum and maximum of one variable
ELEMENT: interval(position(region.spread.range(jobcat*salary)))
Example: Range bar showing minimum of one variable to maximum of another
ELEMENT: interval(position(region.spread.range(jobcat*(salbegin+salary))))

Statistic Functions

See GPL Functions .

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.spread.sd Function (GPL), region.spread.se Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL), transparency Function (For GPL Graphic Elements)


region.spread.sd Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
region.spread.sd,region.spread.sd,region.spread.sd
region.spread.sd function (GPL),region.spread.sd function (GPL),region.spread.sd function (GPL)

Syntax

region.spread.sd(<algebra>, <function>)

or

region.spread.sd(<binning function>, <function>)

or

region.spread.sd(<statistic function>, <function>)

<algebra>. Graph algebra, such as x*y. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra.

<binning function>. A binning function.

<statistic function>. Another statistic function. The result of the embedded statistic is used to calculate region.spread.sd.

<function>. One or more valid functions. These are optional. If no multiple function is specified, 1 is used for the multiplier.

Description

Calculates the mean minus the standard deviation and the mean plus the standard deviation for the variables identified by the algebra. The function creates two values. When using the interval, area, or edge graphic elements, this function results in one graphic element showing the range of the standard deviation around the mean. All other graphic elements result in two separate elements, one showing the standard deviation below the mean and one showing the standard deviation above the mean.

Examples

Example: Creating an error bar
ELEMENT: interval(position(region.spread.sd(jobcat*salary)))
Example: Creating an error bar for 2 standard deviations
ELEMENT: interval(position(region.spread.sd(jobcat*salary, multiple(2))))

Statistic Functions

See GPL Functions .

Valid Functions

multiple Function (GPL)

Binning Functions

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL)

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.spread.range Function (GPL), region.spread.se Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL), transparency Function (For GPL Graphic Elements)


region.spread.se Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
region.spread.se,region.spread.se,region.spread.se
region.spread.se function (GPL),region.spread.se function (GPL),region.spread.se function (GPL)

Syntax

region.spread.se(<algebra>, <function>)

or

region.spread.se(<binning function>, <function>)

or

region.spread.se(<statistic function>, <function>)

<algebra>. Graph algebra, such as x*y. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra.

<binning function>. A binning function.

<statistic function>. Another statistic function. The result of the embedded statistic is used to calculate region.spread.se.

<function>. One or more valid functions. These are optional. If no multiple function is specified, 1 is used for the multiplier.

Description

Calculates the mean minus the standard error and the mean plus the standard error for the variable identified by the algebra. The function creates two values. When using the interval, area, or edge graphic elements, this function results in one graphic element showing the range of the standard error around the mean. All other graphic elements result in two separate elements, one showing the standard error below the mean and one showing the standard error above the mean.

Examples

Example: Creating an error bar
ELEMENT: interval(position(region.spread.se(jobcat*salary)))
Example: Creating an error bar for 2 standard errors
ELEMENT: interval(position(region.spread.se(jobcat*salary, multiple(2))))

Statistic Functions

See GPL Functions .

Valid Functions

multiple Function (GPL)

Binning Functions

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL)

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.spread.range Function (GPL), region.spread.sd Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL), transparency Function (For GPL Graphic Elements)


reverse Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
reverse,reverse,reverse
reverse function (GPL),reverse function (GPL),reverse function (GPL)

Syntax

reverse()

Description

When used in conjunction with a scale, this function reverses the scale. For categorical scales, this function can be used in conjunction with an explicit sorting function.

When used in conjunction with a polar coordinate system, this function reverses the direction of the coordinate system. Thus, it would draw pie slices in a counterclockwise direction.

Examples

Example: Using reverse alpha-numeric sorting
SCALE: cat(dim(1), sort.natural(), reverse())
Example: Reversing a linear scale
SCALE: linear(dim(2), reverse())
Example: Reversing the direction of an aesthetic scale
SCALE: linear(aesthetic(aesthetic.color.brightness), reverse())
Example: Reversing the direction of a coordinate system
COORD: polar.theta(reverse())

Applies To

polar Coordinate Type (GPL), polar.theta Coordinate Type (GPL), cat Scale (GPL), linear Scale (GPL), log Scale (GPL), pow Scale (GPL), safeLog Scale (GPL), safePower Scale (GPL), time Scale (GPL)


root Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
root,root,root
root function (GPL),root function (GPL),root function (GPL)

Syntax

root("variable value")

"variable value". A variable value.

Description

Specifies which node is the root node. This corresponds to a value for the variable identified by the node function.

Examples

Example: Specifying a root node
ELEMENT: edge(position(layout.tree(node(id), from(fromVar), to(toVar), root("A"))))

Applies To

layout.tree Function (GPL)


sameRatio Function (GPL)

Syntax

sameRatio()

Description

Specifies that the same distance on each scale in a rectangular coordinate system represents the same difference in data values. For example, 2cm on both scales represent a difference of 1000.

Examples

Example: Creating a scatterplot with equal scales
COORD: rect(dim(1,2), sameRatio())
ELEMENT: point(position(salbegin*salary))

Applies To

rect Coordinate Type (GPL)


savSource Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
savSource,savSource,savSource
savSource function (GPL),savSource function (GPL),savSource function (GPL)

Syntax

savSource(file("file path"))

Note: This function works with the PASW Statistics data file driver. You must have the driver installed and configured before using the function. You can download the driver and its documentation from http://www.spss.com/drivers. You can also use the userSource function to read PASW Statistics data directly. See the topic userSource Function (GPL) for more information.

"file path". The absolute path to the SAV file. To ensure that the file is located correctly, this should be an absolute path. Backslashes must be escaped with another backslash. You can also use forward slashes.

Description

Reads the contents of a SAV data file for PASW Statistics. This function is used to assign the contents of the file to a data source.

Examples

Example: Reading a SAV file
SOURCE: mydata = savSource(file("/Data/Employee data.sav"))

Applies To

SOURCE Statement (GPL), csvSource Function (GPL), sqlSource Function (GPL)


scale Function (For GPL Axes)

functions (GPL),functions (GPL),functions (GPL)
scale,scale,scale
scale function (GPL),scale function (GPL),scale function (GPL)

Note: If you are specifying a size for a graph, refer to scale Function (For GPL Graphs). If you are specifying a scale associated with a graphic element (like a bar or line) or a reference line (form.line), refer to scale Function (For GPL Graphic Elements and form.line). If you are specifying a size for a page, refer to scale Function (For GPL Pages).

Syntax

scale(<scale name>)

<scale name>. A scale previously defined by a SCALE statement. This is used when there are multiple scales in a single dimension (as in a "dual axis" graph).

Description

Specifies the scale to which an axis applies.

Examples

Example: Associating an axis with a named scale
SCALE: y2= linear(dim(2))
GUIDE: axis(scale(y2), label("Count"))

Applies To

axis Guide Type (GPL)


scale Function (For GPL Graphs)

functions (GPL),functions (GPL),functions (GPL)
scale,scale,scale
scale function (GPL),scale function (GPL),scale function (GPL)

Note: If you are specifying a scale associated with an axis, refer to scale Function (For GPL Axes). If you are specifying a scale associated with a graphic element (like a bar or line) or a reference line (form.line), refer to scale Function (For GPL Graphic Elements and form.line). If you are specifying a size for a page, refer to scale Function (For GPL Pages).

Syntax

scale(<value>, <value>)

<value>. Indicates an absolute value or a percentage for the graph size. The first value indicates the x component of the size (width), and the second value indicates the y component of the size (height). Units or a percent sign can be included with either value (e.g., 30px, 5cm, or 25%). If units are omitted, they are assumed to be pixels. Percentages are proportional to the whole page.

Description

Specifies the size of the data area of a graph, not including axes and legends.

Examples

Example: Sizing a graph with absolute units
GRAPH: begin(scale(2in, 4in))
Example: Sizing a graph with percentages
GRAPH: begin(scale(80%, 100%))

Applies To

begin Function (For GPL Graphs)


scale Function (For GPL Graphic Elements and form.line)

functions (GPL),functions (GPL),functions (GPL)
scale,scale,scale
scale function (GPL),scale function (GPL),scale function (GPL)

Note: If you are specifying a scale associated with an axis, refer to scale Function (For GPL Axes). If you are specifying a size for a graph, refer to scale Function (For GPL Graphs). If you are specifying a size for a page, refer to scale Function (For GPL Pages).

Syntax

scale(<scale name> ...)

<scale name>. A scale previously defined by a SCALE statement. This is used when there are multiple scales in a single dimension (as in a "dual-axis" graph). You can specify multiple scales if the scales are associated with different dimensions. Use commas to separate the multiple scales.

Description

Specifies the scale to which a graphic element or reference line (form.line) applies.

Examples

Example: Associating a graphic element with a named scale
SCALE: y2= linear(dim(2))
ELEMENT: line(scale(y2), position(summary.count(x)))

Applies To

form.line Guide Type (GPL), area Element (GPL), edge Element (GPL), interval Element (GPL), line Element (GPL), path Element (GPL), point Element (GPL), polygon Element (GPL), schema Element (GPL)


scale Function (For GPL Pages)

functions (GPL),functions (GPL),functions (GPL)
scale,scale,scale
scale function (GPL),scale function (GPL),scale function (GPL)

Note: If you are specifying a scale associated with an axis, refer to scale Function (For GPL Axes). If you are specifying a scale associated with a graphic element (like a bar or line) or a reference line (form.line), refer to scale Function (For GPL Graphic Elements and form.line). If you are specifying a size for a graph, refer to scale Function (For GPL Graphs).

Syntax

scale(<value>, <value>)

<value>. Indicates an absolute value for the page size. The first value indicates the x component of the size (width), and the second value indicates the y component of the size (height). Units can be included with either value (e.g., 600px, 15cm, or 5in). If units are omitted, they are assumed to be pixels.

Description

Specifies the size of the graph.

Examples

Example: Sizing a visualization
PAGE: begin(scale(500px, 400px))

Applies To

begin Function (For GPL Pages)


segments Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
segments,segments,segments
segments function (GPL),segments function (GPL),segments function (GPL)

Syntax

segments(<integer>)

<integer>. A positive integer.

Description

Specifies the number of segments that are calculated and drawn for the density function. Excluding this function will result in a default number of segments, which should be sufficient for most cases.

Examples

Example: Adding a kernel distribution
ELEMENT: line(position(density.kernel.epanechnikov(x, segments(150))))

Applies To

density.kernel Function (GPL)


shape Function (For GPL Graphic Elements)

Note: If you are modifying the shape for a guide, refer to shape Function (For GPL Guides).

functions (GPL),functions (GPL),functions (GPL)
shape,shape,shape
shape function (GPL),shape function (GPL),shape function (GPL)

Syntax

shape(<algebra>)

or

shape(shape.<constant>)

<algebra>. Graph algebra using one categorical variable or a blend of categorical variables.

<constant>. A constant indicating a specific shape, such as shape.square. See the topic Shape Constants (GPL) for more information.

Description

Controls the shape of a graphic element. What shape controls depends on the graphic element type. The shape of a line specifies whether the line is solid or dashed. The border around a bar has a similar shape. The shape of a point or interval specifies whether the point or interval is shaped like a square or a line. All of these shapes are controlled by the shape function, but you can append .interior or .exterior to the function to ensure that you are specifying the desired one. shape.interior specifies the overall shape of the graphic element, including the dashing of edge, line, and path elements. shape.exterior specifies the shape of the exterior of the graphic element, which is often the border on graphic elements with fills. shape.exterior does not apply to edge, line, and path elements. Using shape without a qualifier implies shape.interior.

Examples

Example: Specifying a shape value
ELEMENT: point(position(salbegin*salary), shape.interior(shape.square))
Example: Using the values of a variable to control shape
ELEMENT: point(position(salbegin*salary), shape.interior(jobcat))
Example: Using the values of a variable to control line dashing
ELEMENT: line(position(salbegin*salary), shape.interior(jobcat))
Example: Using the values of a variable to control border dashing
ELEMENT: interval(position(gender*salary*jobcat), shape.exterior(gender))

Applies To

edge Element (GPL), interval Element (GPL), line Element (GPL), path Element (GPL), point Element (GPL), polygon Element (GPL)


shape Function (For GPL Guides)

functions (GPL),functions (GPL),functions (GPL)
shape,shape,shape
shape function (GPL),shape function (GPL),shape function (GPL)

Note: If you are modifying the shape for a graphic element (like a bar or point), refer to shape Function (For GPL Graphic Elements).

Syntax

shape(shape.<shape constant>)

<shape constant>. A constant indicating a specific shape, such as shape.dash. See the topic Shape Constants (GPL) for more information.

Description

Controls the dashing of reference lines.

Examples

Example: Specifying a dashed reference line
GUIDE: form.line(position(*,2000), shape(shape.dash))

Applies To

form.line Guide Type (GPL)


showAll Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
showAll,showAll,showAll
showAll function (GPL),showAll function (GPL),showAll function (GPL)

Syntax

showAll()

Description

Display all labels, even if they overlap. Without this function, some overlapping labels may not be displayed, depending on the available space.

Examples

Example: Displaying all labels
ELEMENT: point(position(x*y), label(z, showAll()))

Applies To

label Function (For GPL Graphic Elements)


size Function (For GPL Graphic Elements)

Note: If you are modifying the size for a guide, refer to size Function (For GPL Guides).

functions (GPL),functions (GPL),functions (GPL)
size,size,size
size function (GPL),size function (GPL),size function (GPL)

Syntax

size(<algebra>)

or

size(size."size value")

or

size(size.<constant>)

or

size(<statistic function>)

<algebra>. Graph algebra using one variable or a blend of variables. This is not available for line elements.

"size value". A specific value that indicates a size. This can be a percentage of the available space (for example, 40%) or a number with units (for example, 2in).

<constant>. A size constant. See the topic Size Constants (GPL) for more information.

<statistic function>. A statistic function.

Description

Specifies the size of the individual graphic elements.

Examples

Example: Using a variable to control size
ELEMENT: point(position(x*y), size(z))
Example: Specifying a percentage for size
ELEMENT: interval(position(x*y), size(size."60%"))
Example: Specifying a value for size
ELEMENT: interval(position(x*y), size(size."6px"))
Example: Specifying a constant for size
ELEMENT: interval(position(x*y), size(size.large))

Statistic Functions

See GPL Functions .

Applies To

edge Element (GPL), interval Element (GPL), line Element (GPL), path Element (GPL), point Element (GPL), polygon Element (GPL), schema Element (GPL)


size Function (For GPL Guides)

functions (GPL),functions (GPL),functions (GPL)
size,size,size
size function (GPL),size function (GPL),size function (GPL)

Note: If you are modifying the size for a graphic element (like a bar or point), refer to size Function (For GPL Graphic Elements).

Syntax

size(size."size value")

or

size(size.<constant>)

"size value". A specific value that indicates a size. This can be a percentage of the available space (for example, 40%) or a number with units (for example, 2in).

<constant>. A size constant. See the topic Size Constants (GPL) for more information.

Description

Controls the thickness of reference lines.

Examples

Example: Specifying a reference line with a thickness of 15 pixels
GUIDE: form.line(position(*,1000), size(size."15px"))

Applies To

form.line Guide Type (GPL)


smooth.cubic Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
smooth.cubic,smooth.cubic,smooth.cubic
smooth.cubic function (GPL),smooth.cubic function (GPL),smooth.cubic function (GPL)

Syntax

smooth.cubic(<algebra>, <function>)

or

smooth.cubic.<kernel>(<algebra, <function>)

<algebra>. Graph algebra, such as x*y. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra.

<kernel>. A kernel function for the smoother. This specifies how data are weighted by the smoother, depending on how close the data are to the current point. If no kernel is specified, Epanechnikov is used.

<function>. One or more valid functions. These are optional. If no proportion function is specified, 1 is used for the proportion.

Description

Uses regression to determine values that best fit the data to a cubic polynomial.

Examples

Example: Creating a cubic fit line
ELEMENT: line(position(smooth.cubic(salbegin*salary)))

Kernel Functions

uniform | All data receive equal weights.
epanechnikov | Data near the current point receive higher weights than extreme data receive. This function weights extreme points more than the triweight, biweight, and tricube kernels but less than the Gaussian and Cauchy kernels.
biweight | Data far from the current point receive more weight than the triweight kernel allows but less weight than the Epanechnikov kernel permits.
tricube | Data close to the current point receive higher weights than both the Epanechnikov and biweight kernels allow.
triweight | Data close to the current point receive higher weights than any other kernel allows. Extreme cases get very little weight.
gaussian | Weights follow a normal distribution, resulting in higher weighting of extreme cases than the Epanechnikov, biweight, tricube, and triweight kernels.
cauchy | Extreme values receive more weight than the other kernels, with the exception of the uniform kernel, allow.

Valid Functions

proportion Function (GPL), noConstant Function (GPL)

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.spread.range Function (GPL), region.spread.sd Function (GPL), region.spread.se Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL), transparency Function (For GPL Graphic Elements)


smooth.linear Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
smooth.linear,smooth.linear,smooth.linear
smooth.linear function (GPL),smooth.linear function (GPL),smooth.linear function (GPL)

Syntax

smooth.linear(<algebra>, <function>)

or

smooth.linear.<kernel>(<algebra, <function>)

<algebra>. Graph algebra, such as x*y. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra.

<kernel>. A kernel function for the smoother. This specifies how data are weighted by the smoother, depending on how close the data are to the current point. If no kernel is specified, Epanechnikov is used.

<function>. One or more valid functions. These are optional. If no proportion function is specified, 1 is used for the proportion.

Description

Uses regression to determine values that best fit the data to a linear slope.

Examples

Example: Creating a linear fit line
ELEMENT: line(position(smooth.linear(salbegin*salary)))

Kernel Functions

uniform | All data receive equal weights.
epanechnikov | Data near the current point receive higher weights than extreme data receive. This function weights extreme points more than the triweight, biweight, and tricube kernels but less than the Gaussian and Cauchy kernels.
biweight | Data far from the current point receive more weight than the triweight kernel allows but less weight than the Epanechnikov kernel permits.
tricube | Data close to the current point receive higher weights than both the Epanechnikov and biweight kernels allow.
triweight | Data close to the current point receive higher weights than any other kernel allows. Extreme cases get very little weight.
gaussian | Weights follow a normal distribution, resulting in higher weighting of extreme cases than the Epanechnikov, biweight, tricube, and triweight kernels.
cauchy | Extreme values receive more weight than the other kernels, with the exception of the uniform kernel, allow.

Valid Functions

proportion Function (GPL), noConstant Function (GPL)

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.spread.range Function (GPL), region.spread.sd Function (GPL), region.spread.se Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL), transparency Function (For GPL Graphic Elements)


smooth.loess Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
smooth.loess,smooth.loess,smooth.loess
smooth.loess function (GPL),smooth.loess function (GPL),smooth.loess function (GPL)

Syntax

smooth.loess(<algebra>, <function>)

or

smooth.loess.<kernel>(<algebra>, <function>)

<algebra>. Graph algebra, such as x*y. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra.

<kernel>. A kernel function for the smoother. This specifies how data are weighted by the smoother, depending on how close the data are to the current point. If no kernel is specified, tricube is used.

<function>. One or more valid functions. These are optional. If no proportion function is specified, 1 is used for the proportion.

Description

Uses iterative weighted least squares to determine values that best fit the data.

Examples

Example: Creating a loess fit line
ELEMENT: line(position(smooth.loess(salbegin*salary)))
Example: Creating a loess fit line with specific kernel
ELEMENT: line(position(smooth.loess.uniform(salbegin*salary)))

Kernel Functions

uniform | All data receive equal weights.
epanechnikov | Data near the current point receive higher weights than extreme data receive. This function weights extreme points more than the triweight, biweight, and tricube kernels but less than the Gaussian and Cauchy kernels.
biweight | Data far from the current point receive more weight than the triweight kernel allows but less weight than the Epanechnikov kernel permits.
tricube | Data close to the current point receive higher weights than both the Epanechnikov and biweight kernels allow.
triweight | Data close to the current point receive higher weights than any other kernel allows. Extreme cases get very little weight.
gaussian | Weights follow a normal distribution, resulting in higher weighting of extreme cases than the Epanechnikov, biweight, tricube, and triweight kernels.
cauchy | Extreme values receive more weight than the other kernels, with the exception of the uniform kernel, allow.

Valid Functions

proportion Function (GPL)

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.spread.range Function (GPL), region.spread.sd Function (GPL), region.spread.se Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL), transparency Function (For GPL Graphic Elements)


smooth.mean Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
smooth.mean,smooth.mean,smooth.mean
smooth.mean function (GPL),smooth.mean function (GPL),smooth.mean function (GPL)

Syntax

smooth.mean(<algebra>, <function>)

or

smooth.mean.<kernel>(<algebra, <function>)

<algebra>. Graph algebra, such as x*y. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra.

<kernel>. A kernel function for the smoother. This specifies how data are weighted by the smoother, depending on how close the data are to the current point. If no kernel is specified, Epanechnikov is used.

<function>. One or more valid functions. These are optional. If no proportion function is specified, 1 is used for the proportion.

Description

Calculates the smoothed mean of y in a 2-D (x*y) frame and z in a 3-D (x*y*z) frame. To force a straight line (a constant value), use the uniform kernel function.

Examples

Example: Creating a line at the mean of the y axis
ELEMENT: line(position(smooth.mean.uniform(salbegin*salary)))

Kernel Functions

uniform | All data receive equal weights.
epanechnikov | Data near the current point receive higher weights than extreme data receive. This function weights extreme points more than the triweight, biweight, and tricube kernels but less than the Gaussian and Cauchy kernels.
biweight | Data far from the current point receive more weight than the triweight kernel allows but less weight than the Epanechnikov kernel permits.
tricube | Data close to the current point receive higher weights than both the Epanechnikov and biweight kernels allow.
triweight | Data close to the current point receive higher weights than any other kernel allows. Extreme cases get very little weight.
gaussian | Weights follow a normal distribution, resulting in higher weighting of extreme cases than the Epanechnikov, biweight, tricube, and triweight kernels.
cauchy | Extreme values receive more weight than the other kernels, with the exception of the uniform kernel, allow.

Valid Functions

proportion Function (GPL)

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.spread.range Function (GPL), region.spread.sd Function (GPL), region.spread.se Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL), transparency Function (For GPL Graphic Elements)


smooth.median Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
smooth.median,smooth.median,smooth.median
smooth.median function (GPL),smooth.median function (GPL),smooth.median function (GPL)

Syntax

smooth.median(<algebra>, <function>)

or

smooth.median.<kernel>(<algebra, <function>)

<algebra>. Graph algebra, such as x*y. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra.

<kernel>. A kernel function for the smoother. This specifies how data are weighted by the smoother, depending on how close the data are to the current point. If no kernel is specified, Epanechnikov is used.

<function>. One or more valid functions. These are optional. If no proportion function is specified, 1 is used for the proportion.

Description

Calculates the smoothed median of y in a 2-D (x*y) frame and z in a 3-D (x*y*z) frame. To force a straight line (a constant value), use the uniform kernel function.

Examples

Example: Creating a line at the median of the y axis
ELEMENT: line(position(smooth.median.uniform(salbegin*salary)))

Kernel Functions

uniform | All data receive equal weights.
epanechnikov | Data near the current point receive higher weights than extreme data receive. This function weights extreme points more than the triweight, biweight, and tricube kernels but less than the Gaussian and Cauchy kernels.
biweight | Data far from the current point receive more weight than the triweight kernel allows but less weight than the Epanechnikov kernel permits.
tricube | Data close to the current point receive higher weights than both the Epanechnikov and biweight kernels allow.
triweight | Data close to the current point receive higher weights than any other kernel allows. Extreme cases get very little weight.
gaussian | Weights follow a normal distribution, resulting in higher weighting of extreme cases than the Epanechnikov, biweight, tricube, and triweight kernels.
cauchy | Extreme values receive more weight than the other kernels, with the exception of the uniform kernel, allow.

Valid Functions

proportion Function (GPL)

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.spread.range Function (GPL), region.spread.sd Function (GPL), region.spread.se Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL), transparency Function (For GPL Graphic Elements)


smooth.quadratic Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
smooth.quadratic,smooth.quadratic,smooth.quadratic
smooth.quadratic function (GPL),smooth.quadratic function (GPL),smooth.quadratic function (GPL)

Syntax

smooth.quadratic(<algebra>, <function>)

or

smooth.quadratic.<kernel>(<algebra, <function>)

<algebra>. Graph algebra, such as x*y. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra.

<kernel>. A kernel function for the smoother. This specifies how data are weighted by the smoother, depending on how close the data are to the current point. If no kernel is specified, Epanechnikov is used.

<function>. One or more valid functions. These are optional. If no proportion function is specified, 1 is used for the proportion.

Description

Uses regression to determine values that best fit the data to a quadratic polynomial.

Examples

Example: Creating a quadratic fit line
ELEMENT: line(position(smooth.quadratic(salbegin*salary)))

Kernel Functions

uniform | All data receive equal weights.
epanechnikov | Data near the current point receive higher weights than extreme data receive. This function weights extreme points more than the triweight, biweight, and tricube kernels but less than the Gaussian and Cauchy kernels.
biweight | Data far from the current point receive more weight than the triweight kernel allows but less weight than the Epanechnikov kernel permits.
tricube | Data close to the current point receive higher weights than both the Epanechnikov and biweight kernels allow.
triweight | Data close to the current point receive higher weights than any other kernel allows. Extreme cases get very little weight.
gaussian | Weights follow a normal distribution, resulting in higher weighting of extreme cases than the Epanechnikov, biweight, tricube, and triweight kernels.
cauchy | Extreme values receive more weight than the other kernels, with the exception of the uniform kernel, allow.

Valid Functions

proportion Function (GPL), noConstant Function (GPL)

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.spread.range Function (GPL), region.spread.sd Function (GPL), region.spread.se Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL), transparency Function (For GPL Graphic Elements)


smooth.spline Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
smooth.spline,smooth.spline,smooth.spline
smooth.spline function (GPL),smooth.spline function (GPL),smooth.spline function (GPL)

Syntax

smooth.spline(<algebra>)

<algebra>. Graph algebra, such as x*y. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra.

Description

Calculates the cubic spline for the data. You should use a cubic spline curve only when you believe there is no error in your data.

Examples

Example: Creating a cubic spline curve
ELEMENT: line(position(smooth.spline(salbegin*salary)))

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.spread.range Function (GPL), region.spread.sd Function (GPL), region.spread.se Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL), transparency Function (For GPL Graphic Elements)


smooth.step Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
smooth.step,smooth.step,smooth.step
smooth.step function (GPL),smooth.step function (GPL),smooth.step function (GPL)

Syntax

smooth.step(<algebra>)

or

smooth.step.<position>(<algebra>)

<algebra>. Graph algebra, such as x*y. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra.

<position>. The position of the data value in relation to the drawn line. Valid values are right, left, and center, with right being the default.

Description

Uses step interpolation to draw the graphic element through the data values. Use the jump function to specify that no connecting lines are drawn between the lines at each data value.

Examples

Example: Creating a step interpolation line
ELEMENT: line(position(smooth.step.center(salbegin*salary)))

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.spread.range Function (GPL), region.spread.sd Function (GPL), region.spread.se Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL), transparency Function (For GPL Graphic Elements)


sort.data Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
sort.data,sort.data,sort.data
sort.data function (GPL),sort.data function (GPL),sort.data function (GPL)

Syntax

sort.data()

Description

Sorts the categorical values in the order they appear in the data.

Note: If the data are pre-aggregated (for example, by using a statistic function in the PASW StatisticsGGRAPH command), this function will not work as expected because the categorical values may be sorted during aggregation. Therefore, the GPL no longer knows the order in which the categorical values appeared in the original data.

Examples

Example: Sorting the categories
SCALE: cat(dim(1), sort.data())

Applies To

cat Scale (GPL)


sort.natural Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
sort.natural,sort.natural,sort.natural
sort.natural function (GPL),sort.natural function (GPL),sort.natural function (GPL)

Syntax

sort.natural()

Description

Sorts the categorical values in alphanumeric order.

Examples

Example: Sorting the categories
SCALE: cat(dim(1), values("Male", "Female"), sort.natural())

Applies To

cat Scale (GPL)


sort.statistic Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
sort.statistic,sort.statistic,sort.statistic
sort.statistic function (GPL),sort.statistic function (GPL),sort.statistic function (GPL)

Syntax

sort.statistic(<statistic function>)

<statistic function>. A statistic function.

Description

Sorts the categorical values based on the result of the statistic function for each category.

Examples

Example: Sorting the categories
SCALE: cat(dim(1), sort.statistic(summary.mean(salary)))

Statistic Functions

See GPL Functions .

Applies To

cat Scale (GPL)


sort.values Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
sort.values,sort.values,sort.values
sort.values function (GPL),sort.values function (GPL),sort.values function (GPL)

Syntax

sort.values("category name" ...)

"category name". The name of a category in the data. Delineate each name with a comma.

Description

Sorts the categorical values based on the order in which they appear in this function. You do not need to specify every category. The categories will be ordered as they appear, and any other categories that are not specified will appear in the order they appear in the data.

Examples

Example: Sorting the categories explicitly
SCALE: cat(dim(1), sort.values("Male"))

In this example, Male will appear first. It is not necessary to specify that Female will appear next.

Applies To

cat Scale (GPL)


split Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
split,split,split
split function (GPL),split function (GPL),split function (GPL)

Syntax

split(<algebra>)

or

color(<statistic function>)

<algebra>. The name of a categorical variable.

<statistic function>. A statistic function.

Description

Splits the graphic element into multiple graphic elements or groups of graphic elements for each category in a categorical variable. This result is similar to that obtained by the aesthetic functions, but there is no specific aesthetic associated with each group of graphic elements.

Examples

Example: Creating groups of lines
ELEMENT: line(position(salbegin*salary), split(gender))

Statistic Functions

See GPL Functions .

Applies To

area Element (GPL), edge Element (GPL), interval Element (GPL), line Element (GPL), path Element (GPL), point Element (GPL), polygon Element (GPL), schema Element (GPL)


sqlSource Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
sqlSource,sqlSource,sqlSource
sqlSource function (GPL),sqlSource function (GPL),sqlSource function (GPL)

Syntax

sqlSource(url("url"), user("user name"), password("user password"), query("sql query"))

"url". The URL string for connecting to the database. The URL is typically of the form jdbc:<jdbc vendor>:<vendor information>://<host name>:<port number>, where items between angled brackets (<>) are variables specific to each database driver vendor. Consult your database vendor's documentation for more information.

"user name". A user name for accessing the database.

"user password". The user's password.

"sql query". A SQL query string for extracting data from the database.

Description

Reads data from a database using a SQL query string.

Examples

Example: Reading from a database
SOURCE: mydata = sqlSource(url("jdbc:microsoft:sqlserver://localhost:1433"), user("fred"),
   password("secret"), query("select * from employeeData"))

Valid Functions

missing.listwise Function (GPL), missing.pairwise Function (GPL), weight Function (GPL)

Applies To

SOURCE Statement (GPL), csvSource Function (GPL), savSource Function (GPL)


start Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
start,start,start
start function (GPL),start function (GPL),start function (GPL)

Syntax

start(<value>)

<value>. A numeric value indicating the location of the first major tick.

Description

Specifies the value at which the first major tick appears.

Examples

Example: Specifying the first major tick
GUIDE: axis(dim(1), start(1000))

Applies To

axis Guide Type (GPL)


startAngle Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
startAngle,startAngle,startAngle
startAngle function (GPL),startAngle function (GPL),startAngle function (GPL)

Syntax

startAngle(<integer>)

<integer>. An integer indicating the number of degrees relative to 12:00.

Description

Indicates the angle at which the coordinate system begins. Often used to indicate the position of the first slice in a pie chart. The specified degrees are relative to the 12:00 position, and rotation is counterclockwise.

Examples

Example: Specifying the first slice at 9:00
COORD: polar.theta(startAngle(90))
Example: Specifying the first slice at 3:00 (90 degrees)
COORD: polar.theta(startAngle(-90))

Applies To

polar Coordinate Type (GPL), polar.theta Coordinate Type (GPL)


studentizedRange Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
studentizedRange,studentizedRange,studentizedRange
studentizedRange function (GPL),studentizedRange function (GPL),studentizedRange function (GPL)

Syntax

studentizedRange(<degrees of freedom>, <k>)

<degrees of freedom>. Numeric value indicating the degrees of freedom parameter for the distribution. The value must be greater than 0.

<k>. Numeric value indicating the k (number of groups) parameter for the distribution. The value must be greater than 0.

Description

Specifies a Studentized range distribution for the probability scale.

Examples

Example: Specifying a Studentized range distribution for the probability scale
SCALE: prob(dim(2), studentizedRange(5, 2.5))

Applies To

prob Scale (GPL)


summary.count Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
summary.count,summary.count,summary.count
summary.count function (GPL),summary.count function (GPL),summary.count function (GPL)

Syntax

summary.count(<algebra>)

or

summary.count(<binning function>)

or

summary.count(<statistic function>)

<algebra>. Graph algebra, such as x or x*y. In the second case, the count is calculated for cases with non-missing y-variable values. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra.

<binning function>. A binning function.

<statistic function>. Another statistic function. The result of the embedded statistic is used to calculate summary.count.

Description

Calculates the number of cases identified by the algebra or function. If using a function, a typical one would be a binning function. summary.count subsequently calculates the number of cases in each bin.

Examples

Example: Specifying a bar chart of counts
ELEMENT: interval(position(summary.count(jobcat)))
Example: Counting non-missing cases for a continuous variable
ELEMENT: interval(position(summary.count(jobcat*salary)))
Example: Specifying a histogram
ELEMENT: interval(position(summary.count(bin.rect(salary))))

Statistic Functions

See GPL Functions .

Binning Functions

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL)

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.spread.range Function (GPL), region.spread.sd Function (GPL), region.spread.se Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL), transparency Function (For GPL Graphic Elements)


summary.count.cumulative Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
summary.count.cumulative,summary.count.cumulative,summary.count.cumulative
summary.count.cumulative function (GPL),summary.count.cumulative function (GPL),summary.count.cumulative function (GPL)

Syntax

summary.count.cumulative(<algebra>)

or

summary.count.cumulative(<binning function>)

or

summary.count.cumulative(<statistic function>)

<algebra>. Graph algebra, such as x or x*y. In the second case, the count is calculated for cases with non-missing y-variable values. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra.

<binning function>. A binning function.

<statistic function>. Another statistic function. The result of the embedded statistic is used to calculate summary.count.cumulative.

Description

Calculates the cumulative number of cases identified by the algebra or function. If using a function, a typical one would be a binning function. summary.count subsequently calculates the number of cases in each bin.

If the graph is paneled (faceted), the cumulation begins again with each panel.

Note: If there are multiple ELEMENT statements, you cannot use cumulative statistics for some graphic elements but not for others. This behavior is prohibited because the results of each statistic function would be blended on the same scale. The units for cumulative statistics do not match the units for non-cumulative statistics, so blending these results is impossible.

Examples

Example: Specifying a bar chart of cumulative counts
ELEMENT: interval(position(summary.count.cumulative(jobcat)))
Example: Specifying a cumulative histogram
ELEMENT: interval(position(summary.count.cumulative(bin.rect(salary))))

Statistic Functions

See GPL Functions .

Binning Functions

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL)

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.spread.range Function (GPL), region.spread.sd Function (GPL), region.spread.se Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL), transparency Function (For GPL Graphic Elements)


summary.countTrue Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
summary.countTrue,summary.countTrue,summary.countTrue
summary.countTrue function (GPL),summary.countTrue function (GPL),summary.countTrue function (GPL)

Syntax

summary.countTrue(<algebra>)

or

summary.countTrue(<binning function>)

or

summary.countTrue(<statistic function>)

<algebra>. Graph algebra, such as x*y. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra.

<binning function>. A binning function.

<statistic function>. Another statistic function. The result of the embedded statistic is used to calculate summary.countTrue.

Description

Calculates the number of cases that evaluate to a true value. If the function is evaluating graph algebra, the analysis variable is typically the Boolean result of expression evaluated by the eval function. For more information about analysis variables, see the discussion in Brief Overview of GPL Algebra.

Examples

Example: Plotting count greater than a value
TRANS: salGreaterThan = eval(salary>50000)
ELEMENT: interval(position(summary.countTrue(jobcat*salGreaterThan)))
Example: Plotting count less than, equal to, and greater than a value
TRANS: salLessThan = eval(salary<50000)
TRANS: salEqualTo = eval(salary==50000)
TRANS: salGreaterThan = eval(salary>50000)
ELEMENT: interval(position(summary.countTrue("Less than 50000"*salLessThan)))
ELEMENT: interval(position(summary.countTrue("Equal to 50000"*salEqualTo)))
ELEMENT: interval(position(summary.countTrue("Greater than 50000"*salGreaterThan)))

Statistic Functions

See GPL Functions .

Binning Functions

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL)

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.spread.range Function (GPL), region.spread.sd Function (GPL), region.spread.se Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL), transparency Function (For GPL Graphic Elements)


summary.first Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
summary.first,summary.first,summary.first
summary.first function (GPL),summary.first function (GPL),summary.first function (GPL)

Syntax

summary.first(<algebra>)

or

summary.first(<binning function>)

or

summary.first(<statistic function>)

<algebra>. Graph algebra, such as x*y. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra.

<binning function>. A binning function.

<statistic function>. Another statistic function. The result of the embedded statistic is used to calculate summary.max.

Description

Gets the first value that appears in the data. If the function is evaluating graph algebra, the first value of the analysis variable is returned for each subgroup. For more information about analysis variables, see the discussion in Brief Overview of GPL Algebra.

Examples

Example: Calculating the first salary value for each jobcat category
ELEMENT: interval(position(summary.first(jobcat*salary)))

Statistic Functions

See GPL Functions .

Binning Functions

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL)

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.spread.range Function (GPL), region.spread.sd Function (GPL), region.spread.se Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL), transparency Function (For GPL Graphic Elements)


summary.kurtosis Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
summary.kurtosis,summary.kurtosis,summary.kurtosis
summary.kurtosis function (GPL),summary.kurtosis function (GPL),summary.kurtosis function (GPL)

Syntax

summary.kurtosis(<algebra>)

or

summary.kurtosis(<binning function>)

or

summary.kurtosis(<statistic function>)

<algebra>. Graph algebra, such as x*y. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra.

<binning function>. A binning function.

<statistic function>. Another statistic function. The result of the embedded statistic is used to calculate summary.kurtosis.

Description

Calculates the kurtosis, which measures whether the data peak more compared to the normal distribution. If the function is evaluating graph algebra, the kurtosis of the analysis variable is returned. For more information about analysis variables, see the discussion in Brief Overview of GPL Algebra.

Examples

Example: Calculating the kurtosis of salary for each jobcat category
ELEMENT: interval(position(summary.kurtosis(jobcat*salary)))

Statistic Functions

See GPL Functions .

Binning Functions

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL)

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.spread.range Function (GPL), region.spread.sd Function (GPL), region.spread.se Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL), transparency Function (For GPL Graphic Elements)


summary.last Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
summary.last,summary.last,summary.last
summary.last function (GPL),summary.last function (GPL),summary.last function (GPL)

Syntax

summary.last(<algebra>)

or

summary.last(<binning function>)

or

summary.last(<statistic function>)

<algebra>. Graph algebra, such as x*y. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra.

<binning function>. A binning function.

<statistic function>. Another statistic function. The result of the embedded statistic is used to calculate summary.max.

Description

Gets the last value that appears in the data. If the function is evaluating graph algebra, the last value of the analysis variable is returned for each subgroup. For more information about analysis variables, see the discussion in Brief Overview of GPL Algebra.

Examples

Example: Calculating the last salary value for each jobcat category
ELEMENT: interval(position(summary.last(jobcat*salary)))

Statistic Functions

See GPL Functions .

Binning Functions

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL)

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.spread.range Function (GPL), region.spread.sd Function (GPL), region.spread.se Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL), transparency Function (For GPL Graphic Elements)


summary.max Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
summary.max,summary.max,summary.max
summary.max function (GPL),summary.max function (GPL),summary.max function (GPL)

Syntax

summary.max(<algebra>)

or

summary.max(<binning function>)

or

summary.max(<statistic function>)

<algebra>. Graph algebra, such as x*y. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra.

<binning function>. A binning function.

<statistic function>. Another statistic function. The result of the embedded statistic is used to calculate summary.max.

Description

Calculates the maximum value. If the function is evaluating graph algebra, the maximum value of the analysis variable is returned. For more information about analysis variables, see the discussion in Brief Overview of GPL Algebra.

Examples

Example: Calculating the maximum salary for each jobcat category
ELEMENT: interval(position(summary.max(jobcat*salary)))

Statistic Functions

See GPL Functions .

Binning Functions

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL)

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.spread.range Function (GPL), region.spread.sd Function (GPL), region.spread.se Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL), transparency Function (For GPL Graphic Elements)


summary.mean Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
summary.mean,summary.mean,summary.mean
summary.mean function (GPL),summary.mean function (GPL),summary.mean function (GPL)

Syntax

summary.mean(<algebra>)

or

summary.mean(<binning function>)

or

summary.mean(<statistic function>)

<algebra>. Graph algebra, such as x*y. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra.

<binning function>. A binning function.

<statistic function>. Another statistic function. The result of the embedded statistic is used to calculate summary.mean.

Description

Calculates the arithmetic mean. If the function is evaluating graph algebra, the mean of the analysis variable is returned. For more information about analysis variables, see the discussion in Brief Overview of GPL Algebra.

Examples

Example: Calculating the mean salary for each jobcat category
ELEMENT: interval(position(summary.mean(jobcat*salary)))

Statistic Functions

See GPL Functions .

Binning Functions

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL)

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.spread.range Function (GPL), region.spread.sd Function (GPL), region.spread.se Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL), transparency Function (For GPL Graphic Elements)


summary.median Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
summary.median,summary.median,summary.median
summary.median function (GPL),summary.median function (GPL),summary.median function (GPL)

Syntax

summary.median(<algebra>)

or

summary.median(<binning function>)

or

summary.median(<statistic function>)

<algebra>. Graph algebra, such as x*y. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra.

<binning function>. A binning function.

<statistic function>. Another statistic function. The result of the embedded statistic is used to calculate summary.median.

Description

Calculates the median, which is the value above and below which half of the cases fall. The result is equivalent to summary.percentile with an alpha of 0.5. If the function is evaluating graph algebra, the median of the analysis variable is returned. For more information about analysis variables, see the discussion in Brief Overview of GPL Algebra.

Examples

Example: Calculating the median salary for each jobcat category
ELEMENT: interval(position(summary.median(jobcat*salary)))

Statistic Functions

See GPL Functions .

Binning Functions

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL)

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.spread.range Function (GPL), region.spread.sd Function (GPL), region.spread.se Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL), transparency Function (For GPL Graphic Elements)


summary.min Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
summary.min,summary.min,summary.min
summary.min function (GPL),summary.min function (GPL),summary.min function (GPL)

Syntax

summary.min(<algebra>)

or

summary.min(<binning function>)

or

summary.min(<statistic function>)

<algebra>. Graph algebra, such as x*y. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra.

<binning function>. A binning function.

<statistic function>. Another statistic function. The result of the embedded statistic is used to calculate summary.min.

Description

Calculates the minimum value. If the function is evaluating graph algebra, the minimum value of the analysis variable is returned. For more information about analysis variables, see the discussion in Brief Overview of GPL Algebra.

Examples

Example: Calculating the minimum salary for each jobcat category
ELEMENT: interval(position(summary.min(jobcat*salary)))

Statistic Functions

See GPL Functions .

Binning Functions

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL)

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.spread.range Function (GPL), region.spread.sd Function (GPL), region.spread.se Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL), transparency Function (For GPL Graphic Elements)


summary.mode Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
summary.mode,summary.mode,summary.mode
summary.mode function (GPL),summary.mode function (GPL),summary.mode function (GPL)

Syntax

summary.mode(<algebra>)

or

summary.mode(<binning function>)

or

summary.mode(<statistic function>)

<algebra>. Graph algebra, such as x*y. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra.

<binning function>. A binning function.

<statistic function>. Another statistic function. The result of the embedded statistic is used to calculate summary.mode.

Description

Calculates the mode, which is the most frequent value. If there is a tie, the smallest value is returned. If the function is evaluating graph algebra, the mode of the analysis variable is returned. For more information about analysis variables, see the discussion in Brief Overview of GPL Algebra.

Examples

Example: Calculating the mode of educationalLevel for each jobcat category
ELEMENT: interval(position(summary.mode(jobcat*educationalLevel)))

Statistic Functions

See GPL Functions .

Binning Functions

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL)

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.spread.range Function (GPL), region.spread.sd Function (GPL), region.spread.se Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL), transparency Function (For GPL Graphic Elements)


summary.percent Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
summary.percent,summary.percent,summary.percent
summary.percent function (GPL),summary.percent function (GPL),summary.percent function (GPL)

Description

summary.percent is an alias for summary.percent.sum. See the topic summary.percent.sum Function (GPL) for more information.

Examples

Example: Calculating percentages of a summed variable
ELEMENT: interval(position(summary.percent(jobcat*salary)))

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.spread.range Function (GPL), region.spread.sd Function (GPL), region.spread.se Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL), transparency Function (For GPL Graphic Elements)


summary.percent.count Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
summary.percent.count,summary.percent.count,summary.percent.count
summary.percent.count function (GPL),summary.percent.count function (GPL),summary.percent.count function (GPL)

Syntax

summary.percent.count(<algebra>, <base function>)

or

summary.percent.count(<binning function>, <base function>)

or

summary.percent.count(<statistic function>, <base function>)

<algebra>. Graph algebra, such as x or x*y. In the second case, the percentage is calculated for cases with non-missing y-variable values. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra.

<base function>. A function that specifies the percentage base for summary.percent.count. This is optional. The default is base.all().

<binning function>. A binning function.

<statistic function>. Another statistic function. The result of the embedded statistic is used to calculate summary.percent.count.

Description

Calculates the percentage of cases within each subgroup compared to the total number of cases.

Examples

Example: Calculating percentages of counts
ELEMENT: interval(position(summary.percent.count(jobcat)))
Example: Graphing a histogram of percentages
ELEMENT: interval(position(summary.percent.count(bin.rect(salary))))

Statistic Functions

See GPL Functions .

Base Functions

base.aesthetic Function (GPL), base.all Function (GPL), base.coordinate Function (GPL)

Binning Functions

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL)

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.spread.range Function (GPL), region.spread.sd Function (GPL), region.spread.se Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL), transparency Function (For GPL Graphic Elements)


summary.percent.count.cumulative Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
summary.percent.count.cumulative,summary.percent.count.cumulative,summary.percent.count.cumulative
summary.percent.count.cumulative function (GPL),summary.percent.count.cumulative function (GPL),summary.percent.count.cumulative function (GPL)
summary.percent.count.cumulative(<algebra>, <base function>)

or

summary.percent.count.cumulative(<binning function>, <base function>)

or

summary.percent.count.cumulative(<statistic function>, <base function>)

<algebra>. Graph algebra, such as x or x*y. In the second case, the percentage is calculated for cases with non-missing y-variable values. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra.

<base function>. A function that specifies the percentage base for summary.percent.count.cumulative. This is optional. The default is base.all().

<binning function>. A binning function.

<statistic function>. Another statistic function. The result of the embedded statistic is used to calculate summary.percent.count.cumulative.

Description

Calculates the cumulative percentage of cases within each group compared to the total number of cases.

Note: If there are multiple ELEMENT statements, you cannot use cumulative statistics for some graphic elements but not for others. This behavior is prohibited because the results of each statistic function would be blended on the same scale. The units for cumulative statistics do not match the units for non-cumulative statistics, so blending these results is impossible.

Examples

Example: Calculating cumulative percentages of counts
ELEMENT: interval(position(summary.percent.count.cumulative(jobcat)))
Example: Calculating a cumulative histogram of percentages
ELEMENT: interval(position(summary.percent.count.cumulative(bin.rect(salary))))

Statistic Functions

See GPL Functions .

Base Functions

base.aesthetic Function (GPL), base.all Function (GPL), base.coordinate Function (GPL)

Binning Functions

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL)

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.spread.range Function (GPL), region.spread.sd Function (GPL), region.spread.se Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL), transparency Function (For GPL Graphic Elements)


summary.percent.cumulative Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
summary.percent.cumulative,summary.percent.cumulative,summary.percent.cumulative
summary.percent.cumulative function (GPL),summary.percent.cumulative function (GPL),summary.percent.cumulative function (GPL)

Description

summary.percent.cumulative is an alias for summary.percent.sum.cumulative. See the topic summary.percent.sum.cumulative Function (GPL) for more information.

Note: If there are multiple ELEMENT statements, you cannot use cumulative statistics for some graphic elements but not for others. This behavior is prohibited because the results of each statistic function would be blended on the same scale. The units for cumulative statistics do not match the units for non-cumulative statistics, so blending these results is impossible.

Examples

Example: Calculating cumulative percentages of a summed variable
ELEMENT: interval(position(summary.percent.cumulative(jobcat*salary)))


summary.percent.sum Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
summary.percent.sum,summary.percent.sum,summary.percent.sum
summary.percent.sum function (GPL),summary.percent.sum function (GPL),summary.percent.sum function (GPL)

Syntax

summary.percent.sum(<algebra>, <base function>)

or

summary.percent.sum(<binning function>, <base function>)

or

summary.percent.sum(<statistic function>, <base function>)

<algebra>. Graph algebra, such as x*y. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra.

<base function>. A function that specifies the percentage base for summary.percent.sum. This is optional. The default is base.all().

<binning function>. A binning function.

<statistic function>. Another statistic function. The result of the embedded statistic is used to calculate summary.percent.sum.

Description

Calculates the percentage within each subgroup based on a summed variable compared to the sum across all groups. summary.percent is an alias for this function. To obtain percentages of counts, use the summary.percent.count function. See the topic summary.percent.count Function (GPL) for more information.

Examples

Example: Calculating percentages of a summed variable
ELEMENT: interval(position(summary.percent.sum(jobcat*salary)))

Statistic Functions

See GPL Functions .

Base Functions

base.aesthetic Function (GPL), base.all Function (GPL), base.coordinate Function (GPL)

Binning Functions

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL)

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.spread.range Function (GPL), region.spread.sd Function (GPL), region.spread.se Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL), transparency Function (For GPL Graphic Elements)


summary.percent.sum.cumulative Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
summary.percent.sum.cumulative,summary.percent.sum.cumulative,summary.percent.sum.cumulative
summary.percent.sum.cumulative function (GPL),summary.percent.sum.cumulative function (GPL),summary.percent.sum.cumulative function (GPL)
summary.percent.sum.cumulative(<algebra>, <base function>)

or

summary.percent.sum.cumulative(<binning function>, <base function>)

or

summary.percent.sum.cumulative(<statistic function>, <base function>)

<algebra>. Graph algebra, such as x*y. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra.

<base function>. A function that specifies the percentage base for summary.percent.sum.cumulative. This is optional. The default is base.all().

<binning function>. A binning function.

<statistic function>. Another statistic function. The result of the embedded statistic is used to calculate summary.percent.sum.cumulative.

Description

Calculates the cumulative percentage within each subgroup based on a summed variable compared to the sum across all groups. summary.percent.cumulative is an alias for this function. To obtain cumulative percentages of counts, use the summary.percent.count.cumulative function. See the topic summary.percent.count.cumulative Function (GPL) for more information.

Note: If there are multiple ELEMENT statements, you cannot use cumulative statistics for some graphic elements but not for others. This behavior is prohibited because the results of each statistic function would be blended on the same scale. The units for cumulative statistics do not match the units for non-cumulative statistics, so blending these results is impossible.

Examples

Example: Calculating cumulative percentages of a summed variable
ELEMENT: interval(position(summary.percent.sum.cumulative(jobcat*salary)))

Statistic Functions

See GPL Functions .

Base Functions

base.aesthetic Function (GPL), base.all Function (GPL), base.coordinate Function (GPL)

Binning Functions

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL)

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.spread.range Function (GPL), region.spread.sd Function (GPL), region.spread.se Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL), transparency Function (For GPL Graphic Elements)


summary.percentile Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
summary.percentile,summary.percentile,summary.percentile
summary.percentile function (GPL),summary.percentile function (GPL),summary.percentile function (GPL)

Syntax

summary.percentile(<algebra>, <function>)

or

summary.percentile(<binning function>, <function>)

or

summary.percentile(<statistic function>, <function>)

<algebra>. Graph algebra, such as x*y. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra.

<function>. One or more valid functions. These are optional. If no alpha function is specified, 0.95 is used for the alpha. If the alpha is 0.5, the result is equivalent to summary.median.

Description

<binning function>. A binning function.

<statistic function>. Another statistic function. The result of the embedded statistic is used to calculate summary.percentile.

Description

Calculates the percentile value at the specified alpha. If the function is evaluating graph algebra, the percentile value of the analysis variable is returned. For more information about analysis variables, see the discussion in Brief Overview of GPL Algebra.

Examples

Example: Calculating the 25th percentile of salary for each jobcat category
ELEMENT: interval(position(summary.percentile(jobcat*salary, alpha(0.25))))

Statistic Functions

See GPL Functions .

Valid Functions

alpha Function (GPL)

Binning Functions

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL)

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.spread.range Function (GPL), region.spread.sd Function (GPL), region.spread.se Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL), transparency Function (For GPL Graphic Elements)


summary.percentTrue Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
summary.percentTrue,summary.percentTrue,summary.percentTrue
summary.percentTrue function (GPL),summary.percentTrue function (GPL),summary.percentTrue function (GPL)

Syntax

summary.percentTrue(<algebra>)

or

summary.percentTrue(<binning function>)

or

summary.percentTrue(<statistic function>)

<algebra>. Graph algebra, such as x*y. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra.

<binning function>. A binning function.

<statistic function>. Another statistic function. The result of the embedded statistic is used to calculate summary.percentTrue.

Description

Calculate the percentage of cases within each subgroup that evaluate to a true value compared to the total number of cases. If the function is evaluating graph algebra, the analysis variable is typically the Boolean result of expression evaluated by the eval function. For more information about analysis variables, see the discussion in Brief Overview of GPL Algebra.

Examples

Example: Plotting percentage greater than a value
TRANS: salGreaterThan = eval(salary>50000)
ELEMENT: interval(position(summary.percentTrue(jobcat*salGreaterThan)))

Statistic Functions

See GPL Functions .

Binning Functions

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL)

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.spread.range Function (GPL), region.spread.sd Function (GPL), region.spread.se Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL), transparency Function (For GPL Graphic Elements)


summary.proportion Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
summary.proportion,summary.proportion,summary.proportion
summary.proportion function (GPL),summary.proportion function (GPL),summary.proportion function (GPL)

Description

summary.proportion is an alias for summary.proportion.sum. See the topic summary.proportion.sum Function (GPL) for more information.

Examples

Example: Calculating proportions of a summed variable
ELEMENT: interval(position(summary.proportion(jobcat*salary)))

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.spread.range Function (GPL), region.spread.sd Function (GPL), region.spread.se Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL), transparency Function (For GPL Graphic Elements)


summary.proportion.count Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
summary.proportion.count,summary.proportion.count,summary.proportion.count
summary.proportion.count function (GPL),summary.proportion.count function (GPL),summary.proportion.count function (GPL)

Syntax

summary.proportion.count(<algebra>, <base function>)

or

summary.proportion.count(<binning function>, <base function>)

or

summary.proportion.count(<statistic function>, <base function>)

<algebra>. Graph algebra, such as x or x*y. In the second case, the proportion is calculated for cases with non-missing y-variable values. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra.

<base function>. A function that specifies the percentage base for summary.proportion.count. This is optional. The default is base.all().

<binning function>. A binning function.

<statistic function>. Another statistic function. The result of the embedded statistic is used to calculate summary.proportion.count.

Description

Calculates the proportion of cases within each subgroup compared to the total number of cases. This function is similar to summary.percent.count except it reports a value between 0 and 1 instead of 0 and 100.

Examples

Example: Calculating proportions of counts
ELEMENT: interval(position(summary.proportion.count(jobcat)))

Statistic Functions

See GPL Functions .

Base Functions

base.aesthetic Function (GPL), base.all Function (GPL), base.coordinate Function (GPL)

Binning Functions

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL)

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.spread.range Function (GPL), region.spread.sd Function (GPL), region.spread.se Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL), transparency Function (For GPL Graphic Elements)


summary.proportion.count.cumulative Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
summary.proportion.count.cumulative,summary.proportion.count.cumulative,summary.proportion.count.cumulative
summary.proportion.count.cumulative function (GPL),summary.proportion.count.cumulative function (GPL),summary.proportion.count.cumulative function (GPL)
summary.proportion.count.cumulative(<algebra>, <base function>)

or

summary.proportion.count.cumulative(<binning function>, <base function>)

or

summary.proportion.count.cumulative(<statistic function>, <base function>)

<algebra>. Graph algebra, such as x or x*y. In the second case, the proportion is calculated for cases with non-missing y-variable values. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra.

<base function>. A function that specifies the percentage base for summary.proportion.count.cumulative. This is optional. The default is base.all().

<binning function>. A binning function.

<statistic function>. Another statistic function. The result of the embedded statistic is used to calculate summary.proportion.count.cumulative.

Description

Calculates the cumulative proportion of cases within each group compared to the total number of cases. This function is similar to summary.percent.count.cumulative except it reports a value between 0 and 1 instead of 0 and 100.

Note: If there are multiple ELEMENT statements, you cannot use cumulative statistics for some graphic elements but not for others. This behavior is prohibited because the results of each statistic function would be blended on the same scale. The units for cumulative statistics do not match the units for non-cumulative statistics, so blending these results is impossible.

Examples

Example: Calculating cumulative proportions of counts
ELEMENT: interval(position(summary.proportion.count.cumulative(jobcat)))

Statistic Functions

See GPL Functions .

Base Functions

base.aesthetic Function (GPL), base.all Function (GPL), base.coordinate Function (GPL)

Binning Functions

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL)

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.spread.range Function (GPL), region.spread.sd Function (GPL), region.spread.se Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL), transparency Function (For GPL Graphic Elements)


summary.proportion.cumulative Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
summary.proportion.cumulative,summary.proportion.cumulative,summary.proportion.cumulative
summary.proportion.cumulative function (GPL),summary.proportion.cumulative function (GPL),summary.proportion.cumulative function (GPL)

Description

summary.proportion.cumulative is an alias for summary.proportion.sum.cumulative. See the topic summary.proportion.sum.cumulative Function (GPL) for more information.

Note: If there are multiple ELEMENT statements, you cannot use cumulative statistics for some graphic elements but not for others. This behavior is prohibited because the results of each statistic function would be blended on the same scale. The units for cumulative statistics do not match the units for non-cumulative statistics, so blending these results is impossible.

Examples

Example: Calculating cumulative proportions of a summed variable
ELEMENT: interval(position(summary.proportion.cumulative(jobcat*salary)))


summary.proportion.sum Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
summary.proportion.sum,summary.proportion.sum,summary.proportion.sum
summary.proportion.sum function (GPL),summary.proportion.sum function (GPL),summary.proportion.sum function (GPL)

Syntax

summary.proportion.sum(<algebra>, <base function>)

or

summary.proportion.sum(<binning function>, <base function>)

or

summary.proportion.sum(<statistic function>, <base function>)

<algebra>. Graph algebra, such as x*y. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra.

<base function>. A function that specifies the percentage base for summary.proportion.sum. This is optional. The default is base.all().

<binning function>. A binning function.

<statistic function>. Another statistic function. The result of the embedded statistic is used to calculate summary.proportion.sum.

Description

Calculates the proportion within each subgroup based on a summed variable compared to the sum across all groups. summary.proportion is an alias for this function. summary.proportion.sum is similar to summary.percent.sum except it reports a value between 0 and 1 instead of 0 and 100.

To obtain proportions of counts, use the summary.proportion.count function. See the topic summary.proportion.count Function (GPL) for more information.

Examples

Example: Calculating proportions of a summed variable
ELEMENT: interval(position(summary.proportion.sum(jobcat*salary)))

Statistic Functions

See GPL Functions .

Base Functions

base.aesthetic Function (GPL), base.all Function (GPL), base.coordinate Function (GPL)

Binning Functions

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL)

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.spread.range Function (GPL), region.spread.sd Function (GPL), region.spread.se Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL), transparency Function (For GPL Graphic Elements)


summary.proportion.sum.cumulative Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
summary.proportion.sum.cumulative,summary.proportion.sum.cumulative,summary.proportion.sum.cumulative
summary.proportion.sum.cumulative function (GPL),summary.proportion.sum.cumulative function (GPL),summary.proportion.sum.cumulative function (GPL)
summary.proportion.sum.cumulative(<algebra>, <base function>)

or

summary.proportion.sum.cumulative(<binning function>, <base function>)

or

summary.proportion.sum.cumulative(<statistic function>, <base function>)

<algebra>. Graph algebra, such as x*y. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra.

<base function>. A function that specifies the percentage base for summary.proportion.sum.cumulative. This is optional. The default is base.all().

<binning function>. A binning function.

<statistic function>. Another statistic function. The result of the embedded statistic is used to calculate summary.proportion.sum.cumulative.

Description

Calculates the cumulative proportion within each subgroup based on a summed variable compared to the sum across all groups. summary.proportion.cumulative is an alias for this function. summary.proportion.sum.cumulative is similar to summary.percent.sum.cumulative except it reports a value between 0 and 1 instead of 0 and 100.

To obtain cumulative proportions of counts, use the summary.proportion.count.cumulative function. See the topic summary.proportion.count.cumulative Function (GPL) for more information.

Note: If there are multiple ELEMENT statements, you cannot use cumulative statistics for some graphic elements but not for others. This behavior is prohibited because the results of each statistic function would be blended on the same scale. The units for cumulative statistics do not match the units for non-cumulative statistics, so blending these results is impossible.

Examples

Example: Calculating cumulative proportions of a summed variable
ELEMENT: interval(position(summary.proportion.sum.cumulative(jobcat*salary)))

Statistic Functions

See GPL Functions .

Base Functions

base.aesthetic Function (GPL), base.all Function (GPL), base.coordinate Function (GPL)

Binning Functions

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL)

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.spread.range Function (GPL), region.spread.sd Function (GPL), region.spread.se Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL), transparency Function (For GPL Graphic Elements)


summary.proportionTrue Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
summary.proportionTrue,summary.proportionTrue,summary.proportionTrue
summary.proportionTrue function (GPL),summary.proportionTrue function (GPL),summary.proportionTrue function (GPL)

Syntax

summary.proportionTrue(<algebra>)

or

summary.proportionTrue(<binning function>)

or

summary.proportionTrue(<statistic function>)

<algebra>. Graph algebra, such as x*y. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra.

<binning function>. A binning function.

<statistic function>. Another statistic function. The result of the embedded statistic is used to calculate summary.proportionTrue.

Description

Calculate the proportion of cases within each subgroup that evaluate to a true value compared to the total number of cases. This function is similar to summary.percentTrue except it reports a value between 0 and 1 instead of 0 and 100. If summary.proportionTrue is evaluating graph algebra, the analysis variable is typically the Boolean result of expression evaluated by the eval function. For more information about analysis variables, see the discussion in Brief Overview of GPL Algebra.

Examples

Example: Plotting proportion greater than a value
TRANS: salGreaterThan = eval(salary>50000)
ELEMENT: interval(position(summary.proportionTrue(jobcat*salGreaterThan)))

Statistic Functions

See GPL Functions .

Binning Functions

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL)

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.spread.range Function (GPL), region.spread.sd Function (GPL), region.spread.se Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL), transparency Function (For GPL Graphic Elements)


summary.range Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
summary.range,summary.range,summary.range
summary.range function (GPL),summary.range function (GPL),summary.range function (GPL)

Syntax

summary.range(<algebra>)

or

summary.range(<binning function>)

or

summary.range(<statistic function>)

<algebra>. Graph algebra, such as x*y. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra.

<binning function>. A binning function.

<statistic function>. Another statistic function. The result of the embedded statistic is used to calculate summary.range.

Description

Calculates the range, which is the difference between the minimum and maximum values. If the function is evaluating graph algebra, the range of the analysis variable is returned. For more information about analysis variables, see the discussion in Brief Overview of GPL Algebra.

This function returns only one value. If you want to display the interval between the minimum and maximum values, use region.spread.range. See the topic region.spread.range Function (GPL) for more information.

Examples

Example: Calculating the range of salary for each jobcat category
ELEMENT: interval(position(summary.range(jobcat*salary)))

Statistic Functions

See GPL Functions .

Binning Functions

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL)

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.spread.range Function (GPL), region.spread.sd Function (GPL), region.spread.se Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL), transparency Function (For GPL Graphic Elements)


summary.sd Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
summary.sd,summary.sd,summary.sd
summary.sd function (GPL),summary.sd function (GPL),summary.sd function (GPL)

Syntax

summary.sd(<algebra>)

or

summary.sd(<binning function>)

or

summary.sd(<statistic function>)

<algebra>. Graph algebra, such as x*y. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra.

<binning function>. A binning function.

<statistic function>. Another statistic function. The result of the embedded statistic is used to calculate summary.sd.

Description

Calculates the standard deviation, which is the square root of the variance. If the function is evaluating graph algebra, the standard deviation of the analysis variable is returned. For more information about analysis variables, see the discussion in Brief Overview of GPL Algebra.

Examples

Example: Calculating the standard deviation of salary for each jobcat category
ELEMENT: interval(position(summary.sd(jobcat*salary)))

Statistic Functions

See GPL Functions .

Binning Functions

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL)

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.spread.range Function (GPL), region.spread.sd Function (GPL), region.spread.se Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL), transparency Function (For GPL Graphic Elements)


summary.se Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
summary.se,summary.se,summary.se
summary.se function (GPL),summary.se function (GPL),summary.se function (GPL)

Syntax

summary.se(<algebra>)

or

summary.se(<binning function>)

or

summary.se(<statistic function>)

<algebra>. Graph algebra, such as x*y. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra.

<binning function>. A binning function.

<statistic function>. Another statistic function. The result of the embedded statistic is used to calculate summary.se.

Description

Calculates the standard error of the mean, which is the standard deviation of the sample means. If the function is evaluating graph algebra, the standard error of the analysis variable is returned. For more information about analysis variables, see the discussion in Brief Overview of GPL Algebra.

Examples

Example: Calculating the standard error of salary for each jobcat category
ELEMENT: interval(position(summary.se(jobcat*salary)))

Statistic Functions

See GPL Functions .

Binning Functions

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL)

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.spread.range Function (GPL), region.spread.sd Function (GPL), region.spread.se Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL), transparency Function (For GPL Graphic Elements)


summary.se.kurtosis Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
summary.se.kurtosis,summary.se.kurtosis,summary.se.kurtosis
summary.se.kurtosis function (GPL),summary.se.kurtosis function (GPL),summary.se.kurtosis function (GPL)

Syntax

summary.se.kurtosis(<algebra>)

or

summary.se.kurtosis(<binning function>)

or

summary.se.kurtosis(<statistic function>)

<algebra>. Graph algebra, such as x*y. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra.

<binning function>. A binning function.

<statistic function>. Another statistic function. The result of the embedded statistic is used to calculate summary.se.kurtosis.

Description

Calculates the standard error of the kurtosis, which is the standard deviation of the sample kurtosis values. If the function is evaluating graph algebra, the standard error of the analysis variable is returned. For more information about analysis variables, see the discussion in Brief Overview of GPL Algebra.

Examples

Example: Calculating the standard error of the kurtosis of salary for each jobcat category
ELEMENT: interval(position(summary.se.kurtosis(jobcat*salary)))

Statistic Functions

See GPL Functions .

Binning Functions

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL)

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.spread.range Function (GPL), region.spread.sd Function (GPL), region.spread.se Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL), transparency Function (For GPL Graphic Elements)


summary.se.skewness Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
summary.se.skewness,summary.se.skewness,summary.se.skewness
summary.se.skewness function (GPL),summary.se.skewness function (GPL),summary.se.skewness function (GPL)

Syntax

summary.se.skewness(<algebra>)

or

summary.se.skewness(<binning function>)

or

summary.se.skewness(<statistic function>)

<algebra>. Graph algebra, such as x*y. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra.

<binning function>. A binning function.

<statistic function>. Another statistic function. The result of the embedded statistic is used to calculate summary.se.skewness.

Description

Calculates the standard error of the skewness, which is the standard deviation of the sample skewness values. If the function is evaluating graph algebra, the standard error of the analysis variable is returned. For more information about analysis variables, see the discussion in Brief Overview of GPL Algebra.

Examples

Example: Calculating the standard error of the skewness of salary for each jobcat category
ELEMENT: interval(position(summary.se.skewness(jobcat*salary)))

Statistic Functions

See GPL Functions .

Binning Functions

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL)

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.spread.range Function (GPL), region.spread.sd Function (GPL), region.spread.se Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL), transparency Function (For GPL Graphic Elements)


summary.sum Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
summary.sum,summary.sum,summary.sum
summary.sum function (GPL),summary.sum function (GPL),summary.sum function (GPL)

Syntax

summary.sum(<algebra>)

or

summary.sum(<binning function>)

or

summary.sum(<statistic function>)

<algebra>. Graph algebra, such as x*y. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra.

<binning function>. A binning function.

<statistic function>. Another statistic function. The result of the embedded statistic is used to calculate summary.sum.

Description

Calculates the sum. If the function is evaluating graph algebra, the sum of the analysis variable is returned. For more information about analysis variables, see the discussion in Brief Overview of GPL Algebra.

Examples

Example: Calculating the sum of salary for each jobcat category
ELEMENT: interval(position(summary.sum(jobcat*salary)))

Statistic Functions

See GPL Functions .

Binning Functions

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL)

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.spread.range Function (GPL), region.spread.sd Function (GPL), region.spread.se Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum.cumulative Function (GPL), summary.variance Function (GPL), transparency Function (For GPL Graphic Elements)


summary.sum.cumulative Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
summary.sum.cumulative,summary.sum.cumulative,summary.sum.cumulative
summary.sum function (GPL),summary.sum function (GPL),summary.sum function (GPL)

Syntax

summary.sum.cumulative(<algebra>)

or

summary.sum.cumulative(<binning function>)

or

summary.sum.cumulative(<statistic function>)

<algebra>. Graph algebra, such as x*y. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra.

<binning function>. A binning function.

<statistic function>. Another statistic function. The result of the embedded statistic is used to calculate summary.sum.cumulative.

Description

Calculates the cumulative sum. If the function is evaluating graph algebra, the cumulative sum of the analysis variable is returned. For more information about analysis variables, see the discussion in Brief Overview of GPL Algebra.

Note: If there are multiple ELEMENT statements, you cannot use cumulative statistics for some graphic elements but not for others. This behavior is prohibited because the results of each statistic function would be blended on the same scale. The units for cumulative statistics do not match the units for non-cumulative statistics, so blending these results is impossible.

Examples

Example: Calculating the cumulative sum
ELEMENT: interval(position(summary.sum(jobcat*salary)))

Statistic Functions

See GPL Functions .

Binning Functions

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL)

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.spread.range Function (GPL), region.spread.sd Function (GPL), region.spread.se Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.variance Function (GPL), transparency Function (For GPL Graphic Elements)


summary.variance Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
summary.variance,summary.variance,summary.variance
summary.variance function (GPL),summary.variance function (GPL),summary.variance function (GPL)

Syntax

summary.variance(<algebra>)

or

summary.variance(<binning function>)

or

summary.variance(<statistic function>)

<algebra>. Graph algebra, such as x*y. Refer to Brief Overview of GPL Algebra for an introduction to graph algebra.

<binning function>. A binning function.

<statistic function>. Another statistic function. The result of the embedded statistic is used to calculate summary.variance.

Description

Calculates the variance, which is the sum of squared deviations from the mean divided by one less than the number of cases. If the function is evaluating graph algebra, the variance of the analysis variable is returned. For more information about analysis variables, see the discussion in Brief Overview of GPL Algebra.

Examples

Example: Calculating the variance of salary for each jobcat category
ELEMENT: interval(position(summary.variance(jobcat*salary)))

Statistic Functions

See GPL Functions .

Binning Functions

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL)

Applies To

bin.dot Function (GPL), bin.hex Function (GPL), bin.quantile.letter Function (GPL), bin.rect Function (GPL), color Function (For GPL Graphic Elements), color.brightness Function (For GPL Graphic Elements), color.hue Function (For GPL Graphic Elements), color.saturation Function (For GPL Graphic Elements), link.alpha Function (GPL), link.complete Function (GPL), link.delaunay Function (GPL), link.distance Function (GPL), link.gabriel Function (GPL), link.hull Function (GPL), link.influence Function (GPL), link.join Function (GPL), link.mst Function (GPL), link.neighbor Function (GPL), link.relativeNeighborhood Function (GPL), link.sequence Function (GPL), link.tsp Function (GPL), position Function (For GPL Graphic Elements), region.confi.count Function (GPL), region.confi.mean Function (GPL), region.confi.percent.count Function (GPL), region.confi.proportion.count Function (GPL), region.spread.range Function (GPL), region.spread.sd Function (GPL), region.spread.se Function (GPL), size Function (For GPL Graphic Elements), split Function (GPL), summary.count Function (GPL), summary.count.cumulative Function (GPL), summary.countTrue Function (GPL), summary.first Function (GPL), summary.kurtosis Function (GPL), summary.last Function (GPL), summary.max Function (GPL), summary.mean Function (GPL), summary.median Function (GPL), summary.min Function (GPL), summary.mode Function (GPL), summary.percent Function (GPL), summary.percent.count Function (GPL), summary.percent.count.cumulative Function (GPL), summary.percent.cumulative Function (GPL), summary.percent.sum Function (GPL), summary.percent.sum.cumulative Function (GPL), summary.percentile Function (GPL), summary.percentTrue Function (GPL), summary.proportion Function (GPL), summary.proportion.count Function (GPL), summary.proportion.count.cumulative Function (GPL), summary.proportion.cumulative Function (GPL), summary.proportion.sum Function (GPL), summary.proportion.sum.cumulative Function (GPL), summary.proportionTrue Function (GPL), summary.range Function (GPL), summary.sd Function (GPL), summary.se Function (GPL), summary.se.kurtosis Function (GPL), summary.se.skewness Function (GPL), summary.sum Function (GPL), summary.sum.cumulative Function (GPL), transparency Function (For GPL Graphic Elements)


t Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
t,t,t
t function (GPL),t function (GPL),t function (GPL)

Syntax

t(<degree of freedom>)

<degrees of freedom>. Numeric value indicating the degrees of freedom. This values must be greater than 0.

Description

Specifies a Student's t distribution for the probability scale.

Examples

Example: Specifying a Student's t distribution for the probability scale
SCALE: prob(dim(2), t(5))

Applies To

prob Scale (GPL)


texture.pattern Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
texture.pattern,texture.pattern,texture.pattern
texture.pattern function (GPL),texture.pattern function (GPL),texture.pattern function (GPL)

Syntax

texture.pattern(<algebra>)

or

texture.pattern(texture.pattern.<pattern constant>)

or

texture.pattern(<statistic function>)

<algebra>. Graph algebra using one categorical variable or a blend of categorical variables. Each unique variable value results in a different pattern. For example, if you were creating a stacked bar chart, the argument of the texture.pattern function would be the variable that controls the stacking. Each stack segment would have a different pattern.

<pattern constant>. A constant indicating a specific pattern, such as stripes. See the topic Pattern Constants (GPL) for more information.

<statistic function>. A statistic function.

Description

Controls the fill pattern of the associated graphic element. The color of the lines in the pattern is specified by color.exterior. The color of the pattern's background is specified by color.interior. texture.pattern.solid contains no lines or foreground. Therefore, using texture.pattern.solid results in a solid element whose color is specified by color.interior.

Examples

Example: Specifying a pattern
ELEMENT: line(position(x*y), texture.pattern(texture.pattern.checkered))
Example: Using the values of a variable to control pattern
ELEMENT: point(position(x*y), texture.pattern(z))

Statistic Functions

See GPL Functions .

Applies To

area Element (GPL), interval Element (GPL), point Element (GPL), schema Element (GPL)


ticks Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
tick,tick,tick
ticks function (GPL),ticks function (GPL),ticks function (GPL)

Syntax

ticks()

or

ticks(null())

Description

Specifies that major ticks should be drawn for the axis. Ticks are drawn by default, so this function is typically used only with null() to hide the tick marks.

Examples

Example: Hiding tick marks
GUIDE: axis(dim(2), ticks(null()))

Applies To

axis Guide Type (GPL)


to Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
to,to,to
to function (GPL),to function (GPL),to function (GPL)

Syntax

to(<variable name>)

<variable name>. The name of a variable previously defined in the GPL by a DATA statement.

Description

Specifies one of the pair of nodes that defines an edge relation. The is the node that defines the end point for the edge.

Examples

Example: Creating a directed acyclic graph
ELEMENT: edge(position(layout.dag(node(id), from(fromVar), to(toVar))))

Applies To

layout.circle Function (GPL), layout.dag Function (GPL), layout.data Function (GPL), layout.grid Function (GPL), layout.network Function (GPL), layout.random Function (GPL), layout.tree Function (GPL)


transparency Function (For GPL Graphic Elements)

Note: If you are modifying the transparency for a guide, refer to transparency Function (For GPL Guides).

functions (GPL),functions (GPL),functions (GPL)
transparency,transparency,transparency
transparency function (GPL),transparency function (GPL),transparency function (GPL)

Syntax

transparency(<algebra>)

or

transparency(transparency."transparency value")

or

transparency(<statistic function>)

<algebra>. Graph algebra using one variable or a blend of variables. The variable value results in a different transparency value. For example, if you were creating a stacked bar chart, the argument of the transparency function would be the variable that controls the stacking. Each stack segment would have a different degree of transparency.

"transparency value". A value between 0 and 1 that indicates the level of transparency. A value of 1 indicates full transparency, while a value of 0 indicates no transparency (completely opaque).

<statistic function>. A statistic function.

Description

Specifies the transparency of the associated graphic element. You can use another variable or variables to control the transparency or set a fixed value. To specify the transparency explicitly for the fill or border of the graphic element, you can append .interior or .exterior to the function. Using transparency without a qualifier implies transparency.interior.

Examples

Example: Using a variable to control transparency
ELEMENT: point(position(x*y), transparency(z))
Example: Specifying a value for transparency
ELEMENT: interval(position(x*y), transparency(transparency."0.6"))
Example: Specifying a transparency for the fill
ELEMENT: interval(position(x*y),
         transparency.interior(transparency."0.8"))

Statistic Functions

See GPL Functions .

Applies To

area Element (GPL), edge Element (GPL), interval Element (GPL), path Element (GPL), point Element (GPL), polygon Element (GPL), schema Element (GPL), line Element (GPL)


transparency Function (For GPL Guides)

functions (GPL),functions (GPL),functions (GPL)
transparency,transparency,transparency
transparency function (GPL),transparency function (GPL),transparency function (GPL)

Note: If you are modifying the transparency for a graphic element (like a bar or point), refer to transparency Function (For GPL Graphic Elements).

Syntax

transparency(transparency."transparency value")

"transparency value". A value between 0 and 1 that indicates the level of transparency. A value of 1 indicates full transparency, while a value of 0 indicates no transparency (completely opaque).

Description

Controls the transparency of reference lines.

Examples

Example: Specifying a transparency for a reference line
GUIDE: form.line(position(*,2000), transparency(transparency."0.5"))

Applies To

form.line Guide Type (GPL)


transpose Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
transpose,transpose,transpose
transpose function (GPL),transpose function (GPL),transpose function (GPL)

Syntax

transpose(<coord>)

<coord>. A valid coordinate type or transformation function. This is optional.

Description

Transposes the coordinate system.

Examples

Example: Transposing a 2-D rectangular coordinate system
COORD: transpose()
Example: Transposing a clustered coordinate system
COORD: transpose(rect(dim(1,2), cluster(3)))

Coordinate Types and Transformations

parallel Coordinate Type (GPL), polar Coordinate Type (GPL), polar.theta Coordinate Type (GPL), rect Coordinate Type (GPL), mirror Function (GPL), project Function (GPL), reflect Function (GPL), wrap Function (GPL)

Applies To

COORD Statement (GPL), parallel Coordinate Type (GPL), polar Coordinate Type (GPL), polar.theta Coordinate Type (GPL), rect Coordinate Type (GPL), project Function (GPL)


uniform Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
uniform,uniform,uniform
uniform function (GPL),uniform function (GPL),uniform function (GPL)

Syntax

uniform(<minimum>, <maximum>)

<minimum>. Numeric value indicating the minimum.

<maximum>. Numeric value indicating the maximum.

Description

Specifies a uniform distribution for the probability scale.

Examples

Example: Specifying a uniform distribution for the probability scale
SCALE: prob(dim(2), uniform(5000, 20000))

Applies To

prob Scale (GPL)


unit.percent Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
unit.percent,unit.percent,unit.percent
unit.percent function (GPL),unit.percent function (GPL),unit.percent function (GPL)

Syntax

unit.percent()

Description

Transforms the values on an axis into percents. The percent value is in relation to the largest value of the variable displayed on the axis. This transformation makes most sense when a cumulative value is displayed on the main axis.

Examples

Example: Adding a percent axis
GUIDE: axis(dim(2), label("Percent"), unit.percent())

Applies To

axis Guide Type (GPL)


userSource Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
userSource,userSource,userSource
userSource function (GPL),userSource function (GPL),userSource function (GPL)

Syntax

userSource(id("source name"), <function>)

"source name". The name of the data source as defined by the application that is calling GPL. For example, if you were using GPL with PASW StatisticsGGRAPH syntax, the source name is the name as defined in the DATASET subcommand.

<function>. One or more valid functions. These are optional.

Description

Reads the contents of a data source that an SPSS Inc. application passes to GPL.

Examples

Example: Reading a userSource
SOURCE: mydata = userSource(id("graphdataset"))

Valid Functions

missing.listwise Function (GPL), missing.pairwise Function (GPL), weight Function (GPL)

Applies To

SOURCE Statement (GPL), csvSource Function (GPL), savSource Function (GPL), sqlSource Function (GPL)


values Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
values,values,values
values function (GPL),values function (GPL),values function (GPL)

Syntax

values("category name", "category name" ...)

"category name". The string representing the category on the axis.

Description

Specifies the categorical values on an axis. Only these specified values are included on the axis, even if these values do not occur in the data or other values do occur in the data.

Examples

Example: Specifying the categories
SCALE: cat(dim(1), values("Male", "Female"))

Applies To

cat Scale (GPL)


visible Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
visible,visible,visible
visible function (GPL),visible function (GPL),visible function (GPL)

Syntax

visible(<algebra>)

<algebra>. The name of a categorical variable.

Description

Controls the visibility of the graphic element, based on categories in a categorical variable. You can use this function in conjunction with the map function to hide specific categories of data. The specific constants for the visible aesthetic are visible.true and visible.false.

Examples

Example: Hiding categories
SCALE: cat(aesthetic(aesthetic.visible), map(("m", visible.false)))
ELEMENT: line(position(salbegin*salary), visible(gender))

Applies To

area Element (GPL), edge Element (GPL), interval Element (GPL), line Element (GPL), path Element (GPL), point Element (GPL), polygon Element (GPL), schema Element (GPL)


weibull Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
weibull,weibull,weibull
weibull function (GPL),weibull function (GPL),weibull function (GPL)

Syntax

weibull(<rate>, <scale>)

<rate>. Numeric value specifying the rate parameter for the distribution.

<scale>. Numeric value specifying the scale parameter for the distribution. This value must be greater than 0.

Description

Specifies a Weibull distribution for the probability scale.

Examples

Example: Specifying a Weibull distribution for the probability scale
SCALE: prob(dim(2), weibull(5, 2))

Applies To

prob Scale (GPL)


weight Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
weight,weight,weight
weight function (GPL),weight function (GPL),weight function (GPL)

Syntax

weight(<variable name>)

<variable name>. The name of a variable defined in the GPL by a DATA statement.

Description

Specifies that a variable in the dataset contains weights. The weights affect the statistic functions that GPL calculates. Weights can be also used with network graphs to affect the distance between nodes.

In general, the weights act as frequency weights (that is, as if there were multiple occurrences of the records). This function is not suitable for sample weights (in which one case represents many).

Examples

Example: Specifying a weighted variable
SOURCE: mydata = csvSource(file("/Data/Edge data.csv"), weight(weightedVar))
DATA: weightedVar = col(source(mydata), name("weights"))

Applies To

csvSource Function (GPL), sqlSource Function (GPL), userSource Function (GPL)


wrap Function (GPL)

functions (GPL),functions (GPL),functions (GPL)
wrap,wrap,wrap
wrap function (GPL),wrap function (GPL),wrap function (GPL)

Syntax

wrap(<coord>)

<coord>. A valid coordinate type or transformation function. This is optional.

Description

Combines faceted dimensions and wraps the facets depending on the available space for the graph. This function is useful when there are many facets because it forces the graph to utilize the available space. Without this function, faceted graphs can only shrink or grow to fit the space.

Examples

Example: Wrapping facets
COORD: rect(dim(1,2), wrap())

Coordinate Types and Transformations

parallel Coordinate Type (GPL), polar Coordinate Type (GPL), polar.theta Coordinate Type (GPL), rect Coordinate Type (GPL), mirror Function (GPL), project Function (GPL), reflect Function (GPL), transpose Function (GPL)

Applies To

COORD Statement (GPL), parallel Coordinate Type (GPL), polar Coordinate Type (GPL), polar.theta Coordinate Type (GPL), rect Coordinate Type (GPL), project Function (GPL)


GPL Examples

This section provides examples organized by broad categories of graph types. You can run the examples by incorporating them into the syntax specific to your application. See the topic Using the Examples in Your Application (GPL) for more information.

Summary Bar Chart Examples

Simple Bar Chart (GPL), Simple Bar Chart of Counts (GPL), Simple Horizontal Bar Chart (GPL), Simple Bar Chart With Error Bars (GPL), Simple Bar Chart with Bar for All Categories (GPL), Stacked Bar Chart (GPL), Clustered Bar Chart (GPL), Clustered and Stacked Bar Chart (GPL), Bar Chart Using an Evaluation Function (GPL), Bar Chart with Mapped Aesthetics (GPL), Faceted (Paneled) Bar Chart (GPL), 3-D Bar Chart (GPL), Error Bar Chart (GPL)

Histogram Examples

Histogram Examples (GPL), Histogram (GPL), Histogram with Distribution Curve (GPL), Percentage Histogram (GPL), Frequency Polygon (GPL), Stacked Histogram (GPL), Faceted (Paneled) Histogram (GPL), Population Pyramid (GPL), Cumulative Histogram (GPL), 3-D Histogram (GPL)

High-Low Examples

High-Low Chart Examples (GPL), Simple Range Bar for One Variable (GPL), Simple Range Bar for Two Variables (GPL), High-Low-Close Chart (GPL)

Scatter/Dot Examples

Simple 1-D Scatterplot (GPL), Simple 2-D Scatterplot (GPL), Simple 2-D Scatterplot with Fit Line (GPL), Grouped Scatterplot (GPL), Grouped Scatterplot with Convex Hull (GPL), Scatterplot Matrix (SPLOM) (GPL), Bubble Plot (GPL), Binned Scatterplot (GPL), Binned Scatterplot with Polygons (GPL), Scatterplot with Border Histograms (GPL), Scatterplot with Border Boxplots (GPL), Dot Plot (GPL), 2-D Dot Plot (GPL), Jittered Categorical Scatterplot (GPL)

Line Chart Examples

Simple Line Chart (GPL), Simple Line Chart with Points (GPL), Line Chart of Date Data (GPL), Line Chart With Step Interpolation (GPL), Fit Line (GPL), Line Chart from Equation (GPL), Line Chart with Separate Scales (GPL), Line Chart in Parallel Coordinates (GPL)

Pie Chart Examples

Pie Chart (GPL), Paneled Pie Chart (GPL), Stacked Pie Chart (GPL)

Box Plot Examples

1-D Boxplot (GPL), Boxplot (GPL), Clustered Boxplot (GPL), Boxplot With Overlaid Dot Plot (GPL)

Other Examples

Collapsing Small Categories (GPL), Mapping Aesthetics (GPL), Faceting by Separate Variables (GPL), Grouping by Separate Variables (GPL), Clustering Separate Variables (GPL), Binning over Categorical Values (GPL), Categorical Heat Map (GPL), Creating Categories Using the eval Function (GPL)


Using the Examples in Your Application (GPL)

GPL,GPL,GPL
example data sources,example data sources,example data sources
data sources for examples,data sources for examples,data sources for examples

If you want to run the examples in your application, you need to incorporate them into the syntax specific to your application.

Using the Examples in PASW Statistics

The sample files installed with the product can be found in the Samples subdirectory of the installation directory. There is a separate folder within the Samples subdirectory for each of the following languages: English, French, German, Italian, Japanese, Korean, Polish, Russian, Simplified Chinese, Spanish, and Traditional Chinese.

Not all sample files are available in all languages. If a sample file is not available in a language, that language folder contains an English version of the sample file.

First, you need the right data source. The examples use four different userSources (Cars, Employeedata, stocks2004, and World95), which correspond to PASW Statistics SAV files located in the directory identified above.

With the data source open, create a GGRAPH syntax command.

• Modify the GRAPHDATASET subcommand by setting the NAME keyword to the id of the userSource in the GPL example. The VARIABLES keyword also needs to include all the variables identified in the GPL DATA statements.

• Modify the GRAPHSPEC subcommand so that the SOURCE keyword equals INLINE.

Follow the GGRAPH command with BEGIN GPL, the GPL shown in the example, END GPL, and a period.

So if you want to run the simple bar chart example (see Simple Bar Chart (GPL)), your syntax would look like the following:

GGRAPH
 /GRAPHDATASET NAME="Employeedata" VARIABLES=jobcat salary
 /GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
SOURCE: s = userSource(id("Employeedata"))
DATA: jobcat=col(source(s), name("jobcat"), unit.category())
DATA: salary=col(source(s), name("salary"))
SCALE: linear(dim(2), include(0))
GUIDE: axis(dim(2), label("Mean Salary"))
GUIDE: axis(dim(1), label("Job Category"))
ELEMENT: interval(position(summary.mean(jobcat*salary)))
END GPL.

Using the Examples in PASW Viz Designer

Create or open a visualization.

If the ViZml/GPL palette is not displayed, from the menus choose:

View
Palettes
ViZml/GPL

Click the GPL tab.

Enter the GPL into the palette. You can also copy and paste examples from the online help.

Modify the file function for csvSource to reference the full path to the CSV file. All of the sample data files are located in the data subfolder of the product installation folder. For example:

SOURCE: s = csvSource(file("C:/Program Files/SPSSInc/Viz Designer/data/Employee data.csv"))
DATA: jobcat=col(source(s), name("jobcat"), unit.category())
DATA: salary=col(source(s), name("salary"))
SCALE: linear(dim(2), include(0))
GUIDE: axis(dim(2), label("Mean Salary"))
GUIDE: axis(dim(1), label("Job Category"))
ELEMENT: interval(position(summary.mean(jobcat*salary)))

After entering and modifying the GPL, click the execute button.


Summary Bar Chart Examples (GPL)

This section provides examples of different types of summary bar charts.

Examples

Simple Bar Chart (GPL)
Simple Bar Chart of Counts (GPL)
Simple Horizontal Bar Chart (GPL)
Simple Bar Chart With Error Bars (GPL)
Simple Bar Chart with Bar for All Categories (GPL)
Stacked Bar Chart (GPL)
Clustered Bar Chart (GPL)
Clustered and Stacked Bar Chart (GPL)
Bar Chart Using an Evaluation Function (GPL)
Bar Chart with Mapped Aesthetics (GPL)
Faceted (Paneled) Bar Chart (GPL)
3-D Bar Chart (GPL)
Error Bar Chart (GPL)


Simple Bar Chart (GPL)

GPL for simple bar chart
SOURCE: s = userSource(id("Employeedata"))
DATA: jobcat=col(source(s), name("jobcat"), unit.category())
DATA: salary=col(source(s), name("salary"))
SCALE: linear(dim(2), include(0))
GUIDE: axis(dim(2), label("Mean Salary"))
GUIDE: axis(dim(1), label("Job Category"))
ELEMENT: interval(position(summary.mean(jobcat*salary)))


Simple Bar Chart of Counts (GPL)

GPL for simple bar chart of counts
SOURCE: s = userSource(id("Employeedata"))
DATA: jobcat=col(source(s), name("jobcat"), unit.category())
SCALE: linear(dim(2), include(0))
GUIDE: axis(dim(2), label("Count"))
GUIDE: axis(dim(1), label("Job Category"))
ELEMENT: interval(position(summary.count(jobcat)))


Simple Horizontal Bar Chart (GPL)

GPL for simple horizontal bar chart
SOURCE: s = userSource(id("Employeedata"))
DATA: jobcat=col(source(s), name("jobcat"), unit.category())
DATA: salary=col(source(s), name("salary"))
SCALE: linear(dim(2), min(0.0))
GUIDE: axis(dim(2), label("Mean Salary"))
GUIDE: axis(dim(1), label("Job Category"))
COORD: transpose()
ELEMENT: interval(position(summary.mean(jobcat*salary)))


Simple Bar Chart With Error Bars (GPL)

GPL for simple bar chart with error bars
SOURCE: s = userSource(id("Employeedata"))
DATA: jobcat=col(source(s), name("jobcat"), unit.category())
DATA: salary=col(source(s), name("salary"))
SCALE: linear(dim(2), include(0))
GUIDE: axis(dim(2), label("Mean Salary"))
GUIDE: axis(dim(1), label("Job Category"))
ELEMENT: interval(position(summary.mean(jobcat*salary)))
ELEMENT: interval(position(region.confi.mean(jobcat*salary)),
                  shape(shape.ibeam), size(size.".4in"), color(color.black))


Simple Bar Chart with Bar for All Categories (GPL)

GPL for simple bar chart with bar for all categories
SOURCE: s = userSource(id("Employeedata"))
DATA: jobcat=col(source(s), name("jobcat"), unit.category())
DATA: salary=col(source(s), name("salary"))
SCALE: linear(dim(2), include(0))
GUIDE: axis(dim(2), label("Mean Salary"))
GUIDE: axis(dim(1), label("Job Category"))
ELEMENT: interval(position(summary.mean((jobcat+"All")*salary)))

Note: Using "All" as the string is arbitrary. Any string would work (e.g., "Total" or "All Categories"). Because it is blended with the jobcat categorical variable, the string acts like a new categorical value. This value is the same for all cases in the dataset. Therefore, the bar associated with that string shows the result for all cases in the dataset.


Stacked Bar Chart (GPL)

GPL for stacked bar chart
SOURCE: s = userSource(id("Employeedata"))
DATA: jobcat=col(source(s), name("jobcat"), unit.category())
DATA: gender=col(source(s), name("gender"), unit.category())
SCALE: linear(dim(2), include(0))
GUIDE: axis(dim(2), label("Count"))
GUIDE: axis(dim(1), label("Job Category"))
ELEMENT: interval.stack(position(summary.count(jobcat)),
         color(gender))


Clustered Bar Chart (GPL)

GPL for clustered bar chart
SOURCE: s = userSource(id("Employeedata"))
DATA: jobcat=col(source(s), name("jobcat"), unit.category())
DATA: gender=col(source(s), name("gender"), unit.category())
DATA: salary=col(source(s), name("salary"))
COORD: rect(dim(1,2), cluster(3))
SCALE: linear(dim(2), include(0))
GUIDE: axis(dim(2), label("Mean Salary"))
GUIDE: axis(dim(3), label("Gender"))
ELEMENT: interval(position(summary.mean(jobcat*salary*gender)), color(jobcat))

Following is another option for creating a graph that appears clustered. It uses the dodge collision modifier. (See dodge Collision Modifier (GPL).) Note that the difference between this and the previous example is that empty space is not allocated for missing categories (in this case, the combination of "Female" and "Custodial").

GPL for dodged bar chart
SOURCE: s = userSource(id("Employeedata"))
DATA: jobcat=col(source(s), name("jobcat"), unit.category())
DATA: gender=col(source(s), name("gender"), unit.category())
DATA: salary=col(source(s), name("salary"))
SCALE: linear(dim(2), include(0))
GUIDE: axis(dim(2), label("Mean Salary"))
GUIDE: axis(dim(1), label("Gender"))
ELEMENT: interval.dodge(position(summary.mean(gender*salary)),
                        size(size."25%"), color(jobcat))


Clustered and Stacked Bar Chart (GPL)

GPL for clustered and stacked bar chart
SOURCE: s = userSource(id("Employeedata"))
DATA: jobcat = col(source(s), name("jobcat"), unit.category())
DATA: gender = col(source(s), name("gender"), unit.category())
DATA: minority = col(source(s), name("minority"), unit.category())
DATA: salary = col(source(s), name("salary"))
COORD: rect(dim(1, 2), cluster(3, 0))
SCALE: linear(dim(2), include(0))
GUIDE: axis(dim(2), label("Sum Salary"))
GUIDE: axis(dim(3), label("Job Category"))
GUIDE: legend(aesthetic(aesthetic.color.interior), label("Gender"))
GUIDE: legend(aesthetic(aesthetic.texture.pattern.interior),
              label("Minority Classification"))
ELEMENT: interval.stack(position(summary.sum(gender*salary*jobcat)),
                        color.exterior(color.black),
                        color.interior(gender), texture.pattern.interior(minority))


Bar Chart Using an Evaluation Function (GPL)

GPL using an evaluation function to calculate mean percentage increase
SOURCE: s = userSource(id("Employeedata"))
DATA: salbegin = col(source(s), name("salbegin"))
DATA: salary = col(source(s), name("salary"))
DATA: jobcat = col(source(s), name("jobcat"), unit.category())
DATA: gender = col(source(s), name("gender"), unit.category())
TRANS: saldiff = eval(((salary-salbegin)/salary)*100)
COORD: rect(dim(1, 2), cluster(3))
SCALE: linear(dim(2), include(0))
GUIDE: axis(dim(2), label("Mean Percentage Salary Increase"))
GUIDE: axis(dim(3), label("Employment Category"))
GUIDE: legend(aesthetic(aesthetic.color.interior), label("Gender"))
ELEMENT: interval(position(summary.mean(gender*saldiff*jobcat)),
                  color.interior(gender))
GPL using an evaluation function to calculate percent less than a value
SOURCE: s = userSource(id("Employeedata"))
DATA: salary = col(source(s), name("salary"))
DATA: jobcat = col(source(s), name("jobcat"), unit.category())
TRANS: greaterThan = eval(salary < 40000)
SCALE: linear(dim(2), include(0))
GUIDE: axis(dim(1), label("Employment Category"))
GUIDE: axis(dim(2), label("% < 40000 Salary"))
ELEMENT: interval(position(summary.percentTrue(jobcat*greaterThan)))


Bar Chart with Mapped Aesthetics (GPL)

This example demonstrates how you can map a specific categorical value in the graph to a specific aesthetic value. In this case, "Female" bars are colored green in the resulting graph.

GPL for bar chart with mapped aesthetics
SOURCE: s = userSource(id("Employeedata"))
DATA: salary = col(source(s), name("salary"))
DATA: jobcat = col(source(s), name("jobcat"), unit.category())
DATA: gender = col(source(s), name("gender"), unit.category())
COORD: rect(dim(1, 2), cluster(3))SCALE: cat(aesthetic(aesthetic.color), map(("f", color.green)))

GUIDE: axis(dim(2), label("Mean Salary"))
GUIDE: axis(dim(3), label("Job Category"))
ELEMENT: interval(position(summary.mean(gender*salary*jobcat)),
                  color(gender))


Faceted (Paneled) Bar Chart (GPL)

Although the following examples create bar charts, faceting is common to all graphs.

GPL for faceted bar chart
SOURCE: s = userSource(id("Employeedata"))
DATA: jobcat = col(source(s), name("jobcat"), unit.category())
DATA: gender = col(source(s), name("gender"), unit.category())
DATA: salary = col(source(s), name("salary"))
SCALE: linear(dim(2), include(0))
GUIDE: axis(dim(3), label("Gender"))
GUIDE: axis(dim(2), label("Mean Salary"))
GUIDE: axis(dim(1), label("Job Category"))
ELEMENT: interval(position(summary.mean(jobcat*salary*gender)))
GPL for faceted bar chart with nested categories
SOURCE: s = userSource(id("Employeedata"))
DATA: jobcat = col(source(s), name("jobcat"), unit.category())
DATA: gender = col(source(s), name("gender"), unit.category())
DATA: salary = col(source(s), name("salary"))
SCALE: linear(dim(2), include(0.0))
GUIDE: axis(dim(2), label("Mean Salary"))
GUIDE: axis(dim(1.1), label("Job Category"))
GUIDE: axis(dim(1), label("Gender"))
ELEMENT: interval(position(summary.mean(jobcat/gender*salary)))
GPL for multi-faceted bar chart
SOURCE: s = userSource(id("Employeedata"))
DATA: jobcat=col(source(s), name("jobcat"), unit.category())
DATA: gender=col(source(s), name("gender"), unit.category())
DATA: minority=col(source(s), name("minority"), unit.category())
DATA: salary=col(source(s), name("salary"))
SCALE: linear(dim(2), include(0))
GUIDE: axis(dim(4), label("Minority"))
GUIDE: axis(dim(3), label("Gender"))
GUIDE: axis(dim(2), label("Mean Salary"))
GUIDE: axis(dim(1), label("Job Category"))
ELEMENT: interval(position(summary.mean(jobcat*salary*gender*minority)))


3-D Bar Chart (GPL)

GPL for 3-D bar chart
SOURCE: s = userSource(id("Employeedata"))
DATA: jobcat=col(source(s), name("jobcat"), unit.category())
DATA: gender=col(source(s), name("gender"), unit.category())
DATA: salary=col(source(s), name("salary"))
COORD: rect(dim(1,2,3))
SCALE: linear(dim(3), include(0))
GUIDE: axis(dim(3), label("Mean Salary"))
GUIDE: axis(dim(2), label("Gender"))
GUIDE: axis(dim(1), label("Job Category"))
ELEMENT: interval(position(summary.mean(jobcat*gender*salary)))


Error Bar Chart (GPL)

GPL for error bar chart
SOURCE: s = userSource(id("Employeedata"))
DATA: salary = col(source(s), name("salary"))
DATA: jobcat=col(source(s), name("jobcat"), unit.category())
GUIDE: axis(dim(2), label("Mean +- 1 SD Current Salary"))
GUIDE: axis(dim(1), label("Job Category"))
ELEMENT: interval(position(region.confi.mean(jobcat*salary)),
                  shape(shape.ibeam), size(size.".4in"))
ELEMENT: point(position(summary.mean(jobcat*salary)),
               shape(shape.circle), color(color.red), size(size."6px"))


Histogram Examples (GPL)

This section provides examples of different types of histograms.

Examples

GPL Examples
Histogram (GPL)
Histogram with Distribution Curve (GPL)
Percentage Histogram (GPL)
Frequency Polygon (GPL)
Stacked Histogram (GPL)
Faceted (Paneled) Histogram (GPL)
Population Pyramid (GPL)
Cumulative Histogram (GPL)
3-D Histogram (GPL)


Histogram (GPL)

GPL for histogram
SOURCE: s = userSource(id("Employeedata"))
DATA: salary=col(source(s), name("salary"))
GUIDE: axis(dim(2), label("Count"))
GUIDE: axis(dim(1), label("Salary"))
ELEMENT: interval(position(summary.count(bin.rect(salary))))


Histogram with Distribution Curve (GPL)

GPL for histogram with normal curve
SOURCE: s = userSource(id("Employeedata"))
DATA: salary=col(source(s), name("salary"))
GUIDE: axis(dim(2), label("Count"))
GUIDE: axis(dim(1), label("Salary"))
ELEMENT: interval(position(summary.count(bin.rect(salary))))
ELEMENT: line(position(density.normal(salary)))
GPL for histogram with kernel density curve
SOURCE: s = userSource(id("Employeedata"))
DATA: salary=col(source(s), name("salary"))
GUIDE: axis(dim(2), label("Count"))
GUIDE: axis(dim(1), label("Salary"))
ELEMENT: interval(position(summary.count(bin.rect(salary))))
ELEMENT: line(position(density.kernel.epanechnikov(salary)))


Percentage Histogram (GPL)

GPL for percentage histogram
SOURCE: s = userSource(id("Employeedata"))
DATA: salary = col(source(s), name("salary"))
GUIDE: axis(dim(2), label("Percent"))
GUIDE: axis(dim(1), label("Salary"))
ELEMENT: interval(position(summary.percent.count(bin.rect(salary))))


Frequency Polygon (GPL)

GPL for frequency polygon
SOURCE: s = userSource(id("Employeedata"))
DATA: salary=col(source(s), name("salary"))
GUIDE: axis(dim(2), label("Count"))
GUIDE: axis(dim(1), label("Salary"))
ELEMENT: area(position(summary.count(bin.rect(salary))))


Stacked Histogram (GPL)

GPL for stacked histogram
SOURCE: s = userSource(id("Employeedata"))
DATA: salary=col(source(s), name("salary"))
DATA: gender=col(source(s), name("gender"), unit.category())
GUIDE: axis(dim(2), label("Count"))
GUIDE: axis(dim(1), label("Salary"))
ELEMENT: interval.stack(position(summary.count(bin.rect(salary))),
                        color(gender))


Faceted (Paneled) Histogram (GPL)

GPL for faceted histogram
SOURCE: s = userSource(id("Employeedata"))
DATA: salary = col(source(s), name("salary"))
DATA: gender = col(source(s), name("gender"), unit.category())
GUIDE: axis(dim(1), label("Salary"))
GUIDE: axis(dim(2), label("Count"))
GUIDE: axis(dim(4), label("Gender"))
ELEMENT: interval(position(summary.count(bin.rect(salary*1*1*gender))))


Population Pyramid (GPL)

GPL for population pyramid
SOURCE: s = userSource(id("Employeedata"))
DATA: gender = col(source(s), name("gender"), unit.category())
DATA: salary = col(source(s), name("salary"))
COORD: transpose(mirror())
GUIDE: axis(dim(1), label("Current Salary"))
GUIDE: axis(dim(1), label(""), opposite())
GUIDE: axis(dim(2), label("Frequency"))
GUIDE: axis(dim(3), label("Gender"), opposite(), gap(0px))
GUIDE: legend(aesthetic(aesthetic.color.interior), null())
ELEMENT: interval(position(summary.count(bin.rect(salary*1*gender))), color(gender))


Cumulative Histogram (GPL)

GPL for cumulative histogram
SOURCE: s = userSource(id("Employeedata"))
DATA: salary=col(source(s), name("salary"))
GUIDE: axis(dim(2), label("Cumulative Percent"))
GUIDE: axis(dim(1), label("Salary"))
ELEMENT: interval(position(summary.percent.count.cumulative(bin.rect(salary))))


3-D Histogram (GPL)

GPL for 3-D histogram
SOURCE: s = userSource(id("Employeedata"))
DATA: salary = col(source(s), name("salary"))
DATA: jobcat = col(source(s), name("jobcat"), unit.category())
COORD: rect(dim(1, 2, 3))
GUIDE: axis(dim(1), label("Employment Category"))
GUIDE: axis(dim(2), label("Salary"))
GUIDE: axis(dim(3), label("Count"))
ELEMENT: interval(position(summary.count(bin.rect(jobcat*salary, dim(2)))))


High-Low Chart Examples (GPL)

This section provides examples of different types of high-low charts.

Examples

GPL Examples
Simple Range Bar for One Variable (GPL)
Simple Range Bar for Two Variables (GPL)
High-Low-Close Chart (GPL)


Simple Range Bar for One Variable (GPL)

GPL for simple range bar for one variable
SOURCE: s = userSource(id("Employeedata"))
DATA: jobcat=col(source(s), name("jobcat"), unit.category())
DATA: salary=col(source(s), name("salary"))
SCALE: linear(dim(2), min(0.0))
GUIDE: axis(dim(2), label("Min Current Salary - Max Current Salary"))
GUIDE: axis(dim(1), label("Job Category"))
ELEMENT: interval(position(region.spread.range(jobcat*salary)))


Simple Range Bar for Two Variables (GPL)

GPL for simple range bar for two variables
SOURCE: s = userSource(id("Employeedata"))
DATA: jobcat=col(source(s), name("jobcat"), unit.category())
DATA: salbegin=col(source(s), name("salbegin"))
DATA: salary=col(source(s), name("salary"))
SCALE: linear(dim(2), min(0.0))
GUIDE: axis(dim(2), label("Min Beginning Salary - Max Current Salary"))
GUIDE: axis(dim(1), label("Job Category"))
ELEMENT: interval(position(region.spread.range(jobcat*(salbegin+salary))))


High-Low-Close Chart (GPL)

GPL for high-low-close chart
SOURCE: s = userSource(id("stocks2004"))
DATA: Date = col(source(s), name("Date"), unit.time(), format("MM/dd/yy"))
DATA: Close = col(source(s), name("Close"))
DATA: High = col(source(s), name("High"))
DATA: Low = col(source(s), name("Low"))
GUIDE: text.title(label("NASDAQ Composite"))
GUIDE: axis(dim(1), label("Date"))
GUIDE: axis(dim(2), label("Close"))
SCALE: time(dim(1), dataMaximum())
ELEMENT: interval(position(region.spread.range(Date*(Low+High))))
ELEMENT: point(position(Date*Close), color.exterior(color.red), size(size."2px"))


Scatter/Dot Examples (GPL)

This section provides examples of different types of scatterplots and dot plots.

Examples

Simple 1-D Scatterplot (GPL)
Simple 2-D Scatterplot (GPL)
Simple 2-D Scatterplot with Fit Line (GPL)
Grouped Scatterplot (GPL)
Grouped Scatterplot with Convex Hull (GPL)
Scatterplot Matrix (SPLOM) (GPL)
Bubble Plot (GPL)
Binned Scatterplot (GPL)
Binned Scatterplot with Polygons (GPL)
Scatterplot with Border Histograms (GPL)
Scatterplot with Border Boxplots (GPL)
Dot Plot (GPL)
2-D Dot Plot (GPL)
Jittered Categorical Scatterplot (GPL)


Simple 1-D Scatterplot (GPL)

GPL for simple 1-D scatterplot
SOURCE: s = userSource(id("Employeedata"))
DATA: salary = col(source(s), name("salary"))
COORD: rect(dim(1))
GUIDE: axis(dim(1), label("Salary"))
ELEMENT: point(position(salary))


Simple 2-D Scatterplot (GPL)

GPL for simple 2-D scatterplot
SOURCE: s = userSource(id("Employeedata"))
DATA: salbegin=col(source(s), name("salbegin"))
DATA: salary=col(source(s), name("salary"))
GUIDE: axis(dim(2), label("Current Salary"))
GUIDE: axis(dim(1), label("Beginning Salary"))
ELEMENT: point(position(salbegin*salary))


Simple 2-D Scatterplot with Fit Line (GPL)

GPL for simple scatterplot with fit line
SOURCE: s = userSource(id("Employeedata"))
DATA: salbegin=col(source(s), name("salbegin"))
DATA: salary=col(source(s), name("salary"))
GUIDE: axis(dim(2), label("Current Salary"))
GUIDE: axis(dim(1), label("Beginning Salary"))
ELEMENT: point(position(salbegin*salary))
ELEMENT: line(position(smooth.linear(salbegin*salary)))


Grouped Scatterplot (GPL)

GPL for grouped scatterplot
SOURCE: s = userSource(id("Employeedata"))
DATA: salbegin=col(source(s), name("salbegin"))
DATA: salary=col(source(s), name("salary"))
DATA: gender=col(source(s), name("gender"), unit.category())
GUIDE: axis(dim(2), label("Current Salary"))
GUIDE: axis(dim(1), label("Beginning Salary"))
ELEMENT: point(position(salbegin*salary), color(gender))


Grouped Scatterplot with Convex Hull (GPL)

GPL for grouped scatterplot with convex hull
SOURCE: s = userSource(id("Employeedata"))
DATA: salbegin=col(source(s), name("salbegin"))
DATA: salary=col(source(s), name("salary"))
DATA: gender=col(source(s), name("gender"), unit.category())
GUIDE: axis(dim(1), label("Beginning Salary"))
GUIDE: axis(dim(2), label("Current Salary"))
GUIDE: legend(aesthetic(aesthetic.color.exterior), label("Gender"))
GUIDE: legend(aesthetic(aesthetic.color.interior), null())
ELEMENT: point(position(salbegin*salary), color.exterior(gender))
ELEMENT: edge(position(link.hull(salbegin*salary)), color.interior(gender))


Scatterplot Matrix (SPLOM) (GPL)

GPL for scatterplot matrix
SOURCE: s = userSource(id("Cars"))
DATA: weight=col(source(s), name("weight"))
DATA: mpg=col(source(s), name("mpg"))
DATA: horse=col(source(s), name("horse"))
GUIDE: axis(dim(1.1), ticks(null()))
GUIDE: axis(dim(2.1), ticks(null()))
GUIDE: axis(dim(1), gap(0px))
GUIDE: axis(dim(2), gap(0px))
ELEMENT: point(position((mpg/"MPG"+weight/"Weight"+horse/"HP")*
                        (mpg/"MPG"+weight/"Weight"+horse/"HP")))


Bubble Plot (GPL)

GPL for bubble plot
SOURCE: s = userSource(id("Employeedata"))
DATA: salbegin=col(source(s), name("salbegin"))
DATA: salary=col(source(s), name("salary"))
DATA: prevexp=col(source(s), name("prevexp"))
SCALE: linear(aesthetic(aesthetic.size),
              aestheticMinimum(size."5px"), aestheticMaximum(size."35px"))
GUIDE: axis(dim(2), label("Current Salary"))
GUIDE: axis(dim(1), label("Beginning Salary"))
GUIDE: legend(aesthetic(aesthetic.size), label("Previous Experience (months)"))
ELEMENT: point(position(salbegin*salary), size(prevexp))


Binned Scatterplot (GPL)

GPL for binned scatterplot
SOURCE: s = userSource(id("Employeedata"))
DATA: salbegin=col(source(s), name("salbegin"))
DATA: salary=col(source(s), name("salary"))
GUIDE: axis(dim(2), label("Current Salary"))
GUIDE: axis(dim(1), label("Beginning Salary"))
GUIDE: legend(aesthetic(aesthetic.color), label("Count"))
ELEMENT: point(position(bin.rect(salbegin*salary, dim(1,2))),
               color(summary.count()))


Binned Scatterplot with Polygons (GPL)

GPL for binned scatterplot with polygons
SOURCE: s = userSource(id("Employeedata"))
DATA: salbegin=col(source(s), name("salbegin"))
DATA: salary=col(source(s), name("salary"))
GUIDE: axis(dim(2), label("Current Salary"))
GUIDE: axis(dim(1), label("Beginning Salary"))
GUIDE: legend(aesthetic(aesthetic.color), label("Count"))
ELEMENT: polygon(position(bin.hex(salbegin*salary, dim(1,2))),
                 color(summary.count()))


Scatterplot with Border Histograms (GPL)

GPL for scatterplot with border histograms
SOURCE: s = userSource(id("Employeedata"))
DATA: salary = col(source(s), name("salary"))
DATA: salbegin = col(source(s), name("salbegin"))
GRAPH: begin(origin(5%, 10%), scale(85%, 85%))
GUIDE: axis(dim(1), label("Beginning Salary"))
GUIDE: axis(dim(2), label("Current Salary"))
ELEMENT: point(position(salbegin*salary))
GRAPH: end()
GRAPH: begin(origin(5%, 0%), scale(85%, 10%))
GUIDE: axis(dim(1), ticks(null()))
GUIDE: axis(dim(2), null())
ELEMENT: interval(position(summary.count(bin.rect(salbegin))))
GRAPH: end()
GRAPH: begin(origin(90%, 10%), scale(10%, 85%))
COORD: rect(dim(1, 2), transpose())
GUIDE: axis(dim(1), ticks(null()))
GUIDE: axis(dim(2), null())
ELEMENT: interval(position(summary.count(bin.rect(salary))))
GRAPH: end()


Scatterplot with Border Boxplots (GPL)

GPL for scatterplot with border boxplots
SOURCE: s = userSource(id("Employeedata"))
DATA: salary = col(source(s), name("salary"))
DATA: salbegin = col(source(s), name("salbegin"))
GRAPH: begin(origin(5%, 10%), scale(85%, 85%))
GUIDE: axis(dim(1), label("Beginning Salary"))
GUIDE: axis(dim(2), label("Current Salary"))
ELEMENT: point(position(salbegin*salary))
GRAPH: end()
GRAPH: begin(origin(5%, 0%), scale(85%, 10%))
COORD: rect(dim(1))
GUIDE: axis(dim(1), ticks(null()))
ELEMENT: schema(position(bin.quantile.letter(salbegin)), size(size."80%"))
GRAPH: end()
GRAPH: begin(origin(90%, 10%), scale(10%, 85%))
COORD: transpose(rect(dim(1)))
GUIDE: axis(dim(1), ticks(null()))
ELEMENT: schema(position(bin.quantile.letter(salary)), size(size."80%"))
GRAPH: end()


Dot Plot (GPL)

GPL for dot plot
SOURCE: s = userSource(id("Employeedata"))
DATA: salary = col(source(s), name("salary"))
COORD: rect(dim(1))
GUIDE: axis(dim(1), label("Salary"))
ELEMENT: point.dodge.asymmetric(position(bin.dot(salary)))
GPL for grouped dot plot
SOURCE: s = userSource(id("Employeedata"))
DATA: gender = col(source(s), name("gender"), unit.category())
DATA: salary = col(source(s), name("salary"))
GUIDE: axis(dim(1), label("Salary"))
COORD: rect(dim(1))
ELEMENT: point.dodge.asymmetric(position(bin.dot(salary)),
                                color(gender), shape(shape.square))


2-D Dot Plot (GPL)

GPL for 2-D dot plot
SOURCE: s = userSource(id("Cars"))
DATA: origin = col(source(s), name("origin"), unit.category())
DATA: mpg = col(source(s), name("mpg"))
GUIDE: axis(dim(1), label("Miles Per Gallon"), delta(5.0))
GUIDE: axis(dim(2), label("Country of Origin"))
ELEMENT: point.dodge.symmetric(position(bin.dot(mpg*origin)))
GPL for alternate 2-D dot plot
SOURCE: s = userSource(id("Cars"))
DATA: origin = col(source(s), name("origin"), unit.category())
DATA: mpg = col(source(s), name("mpg"))
GUIDE: axis(dim(1), label("Miles Per Gallon"), delta(5.0))
GUIDE: axis(dim(2), label("Country of Origin"))
ELEMENT: point.dodge.symmetric(position(bin.dot(origin*mpg, dim(2))))


Jittered Categorical Scatterplot (GPL)

GPL for jittered categorical scatterplot
SOURCE: s = userSource(id("Employeedata"))
DATA: jobcat=col(source(s), name("jobcat"), unit.category())
DATA: gender=col(source(s), name("gender"), unit.category())
GUIDE: axis(dim(2), label("Gender"))
GUIDE: axis(dim(1), label("Employment Category"))
ELEMENT: point.jitter(position(jobcat*gender))


Line Chart Examples (GPL)

This section provides examples of different types of line charts.

Examples

Simple Line Chart (GPL)
Simple Line Chart with Points (GPL)
Line Chart of Date Data (GPL)
Line Chart With Step Interpolation (GPL)
Fit Line (GPL)
Line Chart from Equation (GPL)
Line Chart with Separate Scales (GPL)
Line Chart in Parallel Coordinates (GPL)


Simple Line Chart (GPL)

GPL for simple line chart
SOURCE: s = userSource(id("Employeedata"))
DATA: salbegin=col(source(s), name("salbegin"))
DATA: salary=col(source(s), name("salary"))
GUIDE: axis(dim(2), label("Current Salary"))
GUIDE: axis(dim(1), label("Beginning Salary"))
ELEMENT: line(position(salbegin*salary))


Simple Line Chart with Points (GPL)

GPL for simple line chart with points
SOURCE: s = userSource(id("Employeedata"))
DATA: salbegin=col(source(s), name("salbegin"))
DATA: salary=col(source(s), name("salary"))
GUIDE: axis(dim(2), label("Current Salary"))
GUIDE: axis(dim(1), label("Beginning Salary"))
ELEMENT: line(position(salbegin*salary))
ELEMENT: point(position(salbegin*salary))


Line Chart of Date Data (GPL)

GPL for line chart of date data
SOURCE: s = userSource(id("stocks2004"))
DATA: Date = col(source(s), name("Date"), unit.time(), format("MM/dd/yy"))
DATA: Close = col(source(s), name("Close"))
GUIDE: text.title(label("NASDAQ Composite"))
GUIDE: axis(dim(1), label("Date"))
GUIDE: axis(dim(2), label("Close"))
SCALE: time(dim(1), dataMaximum())
ELEMENT: line(position(Date*Close))


Line Chart With Step Interpolation (GPL)

GPL for line chart with step interpolation
SOURCE: s = userSource(id("Employeedata"))
DATA: salbegin=col(source(s), name("salbegin"))
DATA: salary=col(source(s), name("salary"))
GUIDE: axis(dim(2), label("Current Salary"))
GUIDE: axis(dim(1), label("Beginning Salary"))
ELEMENT: line(position(smooth.step.center(salbegin*salary)))


Fit Line (GPL)

GPL for linear fit line overlaid on scatterplot
SOURCE: s = userSource(id("Employeedata"))
DATA: salbegin=col(source(s), name("salbegin"))
DATA: salary=col(source(s), name("salary"))
GUIDE: axis(dim(2), label("Current Salary"))
GUIDE: axis(dim(1), label("Beginning Salary"))
ELEMENT: point(position(salbegin*salary))
ELEMENT: line(position(smooth.linear(salbegin*salary)))


Line Chart from Equation (GPL)

GPL for line chart from equation
DATA: x = iter(0,10,0.01)
TRANS: y = eval(sin(x)*cos(x)*(x-5))
ELEMENT: line(position(x*y))
GPL for line chart from equation in polar coordinates
DATA: x = iter(0,6.28,0.01)
TRANS: y = eval(cos(6*x))
COORD: polar()
SCALE: linear(dim(1), min(0.0), max(6.28))
GUIDE: axis(dim(2), null())
ELEMENT: line(position(x*y))


Line Chart with Separate Scales (GPL)

GPL for line chart with separate scales
SOURCE: s = userSource(id("stocks2004"))
DATA: date = col(source(s), name("Date"), unit.time(), format("MM/dd/yy"))
DATA: close = col(source(s), name("Close"))
DATA: volume = col(source(s), name("Volume"))
GUIDE: text.title(label("NASDAQ Composite"))
SCALE: time(dim(1), dataMaximum())
ELEMENT: line(position(date*(close/"Close"+volume/"Volume")))


Line Chart in Parallel Coordinates (GPL)

The following example creates a line chart in parallel coordinates. If we didn't use the result of the index function to split the line, every case would be connected, so there would be only one line in the resulting graph. The line would appear to zigzag back and forth between the last axis and the first one. The explicit transparency setting is not required. It is used so that it is easier to read the axis labels.

GPL for line chart in parallel coordinates
SOURCE: s = userSource(id("World95"))
DATA: lifeexpm=col(source(s), name("lifeexpm"))
DATA: lifeexpf=col(source(s), name("lifeexpf"))
DATA: babymort=col(source(s), name("babymort"))
DATA: literacy=col(source(s), name("literacy"))
DATA: region=col(source(s), name("region"), unit.category())
TRANS: caseid = index()
COORD: parallel()
GUIDE: axis(dim(1), label("Life Expectancy (Males)"))
GUIDE: axis(dim(2), label("Life Expectancy (Females)"))
GUIDE: axis(dim(3), label("Literacy"))
GUIDE: axis(dim(4), label("Infant Mortality"))
GUIDE: legend(aesthetic(aesthetic.color), label("Region"))
ELEMENT: line(position(lifeexpm*lifeexpf*literacy*babymort),
              split(caseid), color(region),
              transparency(transparency."0.5"))

Here is the same chart plotted in polar coordinates. We also reversed the scale for dimension 4 to emphasize the relationship among the variables. As you can see, there are distinct bands of color representing the different regions. Also note the preserveStraightLines and closed functions, which improve the look of the graph in polar coordinates.

GPL for line chart in polar parallel coordinates
SOURCE: s = userSource(id("World95"))
DATA: lifeexpm=col(source(s), name("lifeexpm"))
DATA: lifeexpf=col(source(s), name("lifeexpf"))
DATA: babymort=col(source(s), name("babymort"))
DATA: literacy=col(source(s), name("literacy"))
DATA: region=col(source(s), name("region"), unit.category())
TRANS: caseid = index()
COORD: polar(parallel())
SCALE: linear(dim(4), reverse())
GUIDE: axis(dim(1), label("Life Expectancy (Males)"))
GUIDE: axis(dim(2), label("Life Expectancy (Females)"))
GUIDE: axis(dim(3), label("Literacy"))
GUIDE: axis(dim(4), label("Infant Mortality"))
GUIDE: legend(aesthetic(aesthetic.color), label("Region"))
ELEMENT: line(position(lifeexpm*lifeexpf*literacy*babymort),
              split(caseid), color(region),
              transparency(transparency."0.5"),
              preserveStraightLines(), closed())


Pie Chart Examples (GPL)

This section provides examples of different types of pie charts.

Examples

Pie Chart (GPL)
Paneled Pie Chart (GPL)
Stacked Pie Chart (GPL)


Pie Chart (GPL)

GPL for pie chart
SOURCE: s = userSource(id("Employeedata"))
DATA: jobcat=col(source(s), name("jobcat"), unit.category())
COORD: polar.theta()
SCALE: linear(dim(1), dataMinimum(), dataMaximum())
GUIDE: axis(dim(1), null())
ELEMENT: interval.stack(position(summary.count(1)), color(jobcat))
GPL for pie chart with labels
SOURCE: s = userSource(id("Employeedata"))
DATA: jobcat=col(source(s), name("jobcat"), unit.category())
COORD: polar.theta()
SCALE: linear(dim(1), dataMinimum(), dataMaximum())
GUIDE: axis(dim(1), null())
GUIDE: legend(aesthetic(aesthetic.color), null())
ELEMENT: interval.stack(position(summary.count(1)), color(jobcat),
                        label(jobcat))


Paneled Pie Chart (GPL)

GPL for paneled pie chart
SOURCE: s = userSource(id("Employeedata"))
DATA: jobcat = col(source(s), name("jobcat"), unit.category())
DATA: gender = col(source(s), name("gender"), unit.category())
COORD: polar.theta()
SCALE: linear(dim(1), dataMinimum(), dataMaximum())
GUIDE: axis(dim(1), null())
GUIDE: axis(dim(2), label("Gender"))
ELEMENT: interval.stack(position(summary.percent.count(1*gender))),
                        color(jobcat))


Stacked Pie Chart (GPL)

GPL for stacked pie chart
SOURCE: s = userSource(id("Employeedata"))
DATA: jobcat = col(source(s), name("jobcat"), unit.category())
DATA: gender = col(source(s), name("gender"), unit.category())
COORD: polar(transpose())
GUIDE: axis(dim(1), null())
GUIDE: axis(dim(2), null())
GUIDE: legend(aesthetic(aesthetic.texture.pattern.interior), label("Employment Category"))
GUIDE: legend(aesthetic(aesthetic.color.interior), label("Gender"))
ELEMENT: interval.stack(position(summary.percent.count(jobcat*1, base.coordinate(dim(1)))),
                        texture.pattern(jobcat), color(gender), size(size."100%"))


Boxplot Examples (GPL)

This section provides examples of different types of box plots.

Examples

1-D Boxplot (GPL)
Boxplot (GPL)
Clustered Boxplot (GPL)
Boxplot With Overlaid Dot Plot (GPL)


1-D Boxplot (GPL)

GPL for 1-D box plot
SOURCE: s = userSource(id("Employeedata"))
DATA: salary = col(source(s), name("salary"))
COORD: rect(dim(1))
GUIDE: axis(dim(1), label("Salary"))
ELEMENT: schema(position(bin.quantile.letter(salary)), size(size."50%"))


Boxplot (GPL)

GPL for boxplot
SOURCE: s = userSource(id("Employeedata"))
DATA: jobcat=col(source(s), name("jobcat"), unit.category())
DATA: salary=col(source(s), name("salary"))
GUIDE: axis(dim(2), label("Salary"))
GUIDE: axis(dim(1), label("Job Category"))
ELEMENT: schema(position(bin.quantile.letter(jobcat*salary)))
GPL for boxplot with labeled outliers
SOURCE: s = userSource(id("Employeedata"))
DATA: jobcat=col(source(s), name("jobcat"), unit.category())
DATA: salary=col(source(s), name("salary"))
DATA: id = col(source(s), name("id"), unit.category())
GUIDE: axis(dim(2), label("Salary"))
GUIDE: axis(dim(1), label("Job Category"))
ELEMENT: schema(position(bin.quantile.letter(jobcat*salary)), label(id))


Clustered Boxplot (GPL)

GPL for clustered boxplot
SOURCE: s = userSource(id("Employeedata"))
DATA: jobcat=col(source(s), name("jobcat"), unit.category())
DATA: gender=col(source(s), name("gender"), unit.category())
DATA: salary=col(source(s), name("salary"))
COORD: rect(dim(1,2), cluster(3))
GUIDE: axis(dim(2), label("Salary"))
GUIDE: axis(dim(3), label("Job Category"))
ELEMENT: schema(position(bin.quantile.letter(gender*salary*jobcat)), color(gender))


Boxplot With Overlaid Dot Plot (GPL)

GPL for boxplot with overlaid dot plot
SOURCE: s = userSource(id("World95"))
DATA: region = col(source(s), name("region"), unit.category())
DATA: birth = col(source(s), name("birth_rt"))
GUIDE: axis(dim(2), label("Birth Rate"))
GUIDE: axis(dim(1), label("Region"))
SCALE: linear(dim(2), include(0))
ELEMENT: schema(position(bin.quantile.letter(region*birth)))
ELEMENT: point.dodge.symmetric(position(bin.dot(region*birth, dim(2))),
                               color(color.red))


Multi-Graph Examples (GPL)

This section provides examples of multiple graphs in the same page display.

Examples

Scatterplot with Border Histograms (GPL)
Scatterplot with Border Boxplots (GPL)
Stocks Line Chart with Volume Bar Chart (GPL)
Dual Axis Graph (GPL)
Histogram with Dot Plot (GPL)


Stocks Line Chart with Volume Bar Chart (GPL)

GPL for stocks and volume chart
SOURCE: s = userSource(id("stocks2004"))
DATA: date = col(source(s), name("Date"), unit.time(), format("MM/dd/yy"))
DATA: close = col(source(s), name("Close"))
DATA: volume = col(source(s), name("Volume"))
GRAPH: begin(origin(10%, 0%), scale(90%, 60%))
GUIDE: axis(dim(1), ticks(null()))
GUIDE: axis(dim(2), label("Close"))
ELEMENT: line(position(date*close)))
GRAPH: end()
GRAPH: begin(origin(10%, 70%), scale(90%, 25%))
GUIDE: axis(dim(1), label("Date"))
GUIDE: axis(dim(2), label("Volume"))
ELEMENT: interval(position(date*volume))
GRAPH: end()


Dual Axis Graph (GPL)

GPL for dual axis graph
SOURCE: s = userSource(id("Employeedata"))
DATA: jobcat = col(source(s), name("jobcat"), unit.category())
DATA: salary = col(source(s), name("salary"))
SCALE: y1 = linear(dim(2), include(0.0))
SCALE: y2 = linear(dim(2), include(0.0))
GUIDE: axis(dim(1), label("Employment Category"))
GUIDE: axis(scale(y1), label("Mean Salary"))
GUIDE: axis(scale(y2), label("Count"), opposite(), color(color.red))
ELEMENT: interval(position(summary.mean(jobcat*salary)), scale(y1))
ELEMENT: line(position(summary.count(jobcat)), color(color.red), scale(y2))


Histogram with Dot Plot (GPL)

GPL for histogram with dot plot
SOURCE: s = userSource(id("Employeedata"))
DATA: salary = col(source(s), name("salary"))
GRAPH: begin(origin(5.0%, 5.0%), scale(90.0%, 90.0%))
COORD: rect(dim(1, 2))
ELEMENT: interval(position(summary.count(bin.rect(salary))),
                  transparency.interior(transparency."0.9"))
GRAPH: end()
GRAPH: begin(origin(5.0%, 5.0%), scale(90.0%, 90.0%))
COORD: rect(dim(1))
GUIDE: axis(dim(1), ticks(null()))
GUIDE: axis(dim(2), ticks(null()))
ELEMENT: point.dodge.asymmetric(position(bin.dot(salary)))
GRAPH: end()


Other Examples (GPL)

This section provides examples that demonstrate other features of GPL that are not specific to chart types.

Examples

Collapsing Small Categories (GPL)
Mapping Aesthetics (GPL)
Faceting by Separate Variables (GPL)
Grouping by Separate Variables (GPL)
Clustering Separate Variables (GPL)
Binning over Categorical Values (GPL)
Categorical Heat Map (GPL)
Creating Categories Using the eval Function (GPL)


Collapsing Small Categories (GPL)

If you are creating a graph with several, small categories (that is, categories with a small sum), you may want to collapse those categories into a larger, common category. Following is an example that collapses small categories in a pie chart.

GPL for collapsing small categories
SOURCE: s = userSource(id("Employeedata"))
DATA: educ = col(source(s), name("educ"), unit.category())
DATA: salary = col(source(s), name("salary"))
TRANS: educ_collapsed = collapse(category(educ), minimumPercent(5.0),
                                 sumVariable(salary), otherValue("Other"))
COORD: polar.theta()
SCALE: linear(dim(1), dataMinimum(), dataMaximum())
GUIDE: axis(dim(1), null())
GUIDE: legend(aesthetic(aesthetic.color.interior),
                        label("Educational Level (years)"))
ELEMENT: interval.stack(position(summary.sum(salary)),
                        color.interior(educ_collapsed))


Mapping Aesthetics (GPL)

This example demonstrates how you can map a specific categorical value in the graph to a specific aesthetic value. In this case, "Female" bars are colored green in the resulting graph.

GPL for mapping aesthetics
SOURCE: s = userSource(id("Employeedata"))
DATA: salary = col(source(s), name("salary"))
DATA: jobcat = col(source(s), name("jobcat"), unit.category())
DATA: gender = col(source(s), name("gender"), unit.category())
COORD: rect(dim(1, 2), cluster(3))SCALE: cat(aesthetic(aesthetic.color), map(("f", color.green)))

GUIDE: axis(dim(2), label("Mean Salary"))
GUIDE: axis(dim(3), label("Job Category"))
ELEMENT: interval(position(summary.mean(gender*salary*jobcat)),
                  color(gender))


Faceting by Separate Variables (GPL)

This example demonstrates how you can create facets based on separate variables, so that each facet shows the different variable information. Note that you can do something similar with nesting. See the topic Line Chart with Separate Scales (GPL) for more information.

GPL for faceting by separate variables
SOURCE: s = userSource(id("Employeedata"))
DATA: jobcat = col(source(s), name("jobcat"), unit.category())
DATA: salary = col(source(s), name("salary"))
DATA: salbegin = col(source(s), name("salbegin"))
ELEMENT: schema(position(bin.quantile.letter(jobcat*salbegin*"Beginning Salary"+
                                             jobcat*salary*"Current Salary")))


Grouping by Separate Variables (GPL)

This example demonstrates how you can create groups based on separate variables, so that each instance of the graphic element shows the different variable information. In this example, you are comparing the results of two variables across a categorical variable.

GPL for grouping by separate variables
SOURCE: s = userSource(id("Employeedata"))
DATA: salbegin=col(source(s), name("salbegin"))
DATA: salary=col(source(s), name("salary"))
DATA: educ=col(source(s), name("educ"), unit.category())
GUIDE: axis(dim(1), label("Educational Level (years)"))
ELEMENT: line(position(summary.mean(educ*salary)),color("Current Salary"))
ELEMENT: line(position(summary.mean(educ*salbegin)),color("Beginning Salary"))


Clustering Separate Variables (GPL)

This example demonstrates how you can cluster separate variables.

GPL for clustering separate variables
SOURCE: s = userSource(id("Employeedata"))
DATA: jobcat = col(source(s), name("jobcat"), unit.category())
DATA: salary = col(source(s), name("salary"))
DATA: salbegin = col(source(s), name("salbegin"))
COORD: rect(cluster(3))
SCALE: linear(dim(2), include(0.0))
GUIDE: axis(dim(2), label("Mean"))
GUIDE: axis(dim(3), label("Job Category"))
ELEMENT: interval(position(summary.mean("Beginning Salary"*salbegin*jobcat)),
                  color("Beginning Salary"))
ELEMENT: interval(position(summary.mean("Current Salary"*salary*jobcat)),
                  color("Current Salary"))


Binning over Categorical Values (GPL)

This example demonstrates how you use binning to show the distribution of a continuous variable over categorical values.

GPL for binning over categorical values
SOURCE: s = userSource(id("Employeedata"))
DATA: jobcat = col(source(s), name("jobcat"), unit.category())
DATA: salary = col(source(s), name("salary"))
GUIDE: axis(dim(1), label("Employment Category"))
GUIDE: axis(dim(2), label("Current Salary"))
GUIDE: legend(aesthetic(aesthetic.color), label("Count"))
ELEMENT: polygon(position(bin.rect(jobcat*salary, dim(2))), color(summary.count()))


Categorical Heat Map (GPL)

GPL for categorical heat map
SOURCE: s = userSource(id("Employeedata"))
DATA: gender = col(source(s), name("gender"), unit.category())
DATA: educ = col(source(s), name("educ"), unit.category())
DATA: salary = col(source(s), name("salary"))
GUIDE: axis(dim(1), label("Educational Level"))
GUIDE: axis(dim(2), label("Gender"))
GUIDE: legend(aesthetic(aesthetic.color), label("Mean Salary"))
ELEMENT: point(position(educ*gender), shape(shape.square), size(size."10%"),
               color(summary.mean(salary)))
GPL for alternate categorical heat map
SOURCE: s = userSource(id("Employeedata"))
DATA: gender = col(source(s), name("gender"), unit.category())
DATA: educ = col(source(s), name("educ"), unit.category())
DATA: salary = col(source(s), name("salary"))
GUIDE: axis(dim(1), label("Educational Level"))
GUIDE: axis(dim(2), label("Gender"))
GUIDE: legend(aesthetic(aesthetic.color), label("Mean Salary"))
ELEMENT: polygon(position(educ*gender), color(summary.mean(salary)))


Creating Categories Using the eval Function (GPL)

This example demonstrates how you can use the eval function to create categories based on an expression.

GPL for creating categories with the eval function
SOURCE: s = userSource(id("Employeedata"))
DATA: salbegin = col(source(s), name("salbegin"))
DATA: salary = col(source(s), name("salary"))
DATA: educ = col(source(s), name("educ"))
TRANS: college = eval(educ>12 ? "College" : "No College")
GUIDE: axis(dim(2), label("Current Salary"))
GUIDE: axis(dim(1), label("Beginning Salary"))
ELEMENT: point(position(salbegin*salary), color(college))


Color Constants (GPL)

GPL,GPL,GPL
constants, color,constants, color,constants, color
color constants,color constants,color constants
constants (GPL),constants (GPL),constants (GPL)
color,color,color
aliceblue | aqua | azure | bisque
black | blanchedalmond | blue | blueviolet
brown | burlywood | cadetblue | chartreuse
chocolate | coral | cornflowerblue | cornsilk
crimson | cyan | darkblue | darkcyan
darkgoldenrod | darkgray | darkgreen | darkgrey
darkkhaki | darkmagenta | darkolivegreen | darkorange
darkorchid | darkred | darksalmon | darkseagreen
darkslateblue | darkslategray | darkslategrey | darkturquoise
darkviolet | deeppink | deepskyblue | dimgray
dimgrey | dodgerblue | firebrick | floralwhite
forestgreen | fuchsia | gainsboro | ghostwhite
gold | goldenrod | gray | grey
green | greenyellow | honeydew | hotpink
indianred | indigo | ivory | khaki
lavender | lavenderblush | lawngreen | lemonchiffon
lightblue | lightcoral | lightcyan | lightgoldenrodyellow
lightgray | lightgreen | lightgrey | lightpink
lightsalmon | lightseagreen | lightskyblue | lightslategray
lightslategrey | lightsteelblue | lightyellow | lime
limegreen | linen | magenta | maroon
mediumaquamarine | mediumblue | mediumorchid | mediumpurple
mediumseagreen | mediumslateblue | mediumspringgreen | mediumturquoise
mediumvioletred | midnightblue | mintcream | mistyrose
moccasin | navajowhite | navy | oldlace
olive | olivedrab | orange | orangered
orchid | palegoldenrod | palegreen | paleturquoise
palevioletred | papayawhip | peachpuff | peru
pink | plum | powderblue | purple
red | rosybrown | royalblue | saddlebrown
salmon | sandybrown | seagreen | seashell
sienna | silver | skyblue | slateblue
slategray | slategrey | snow | springgreen
steelblue | tan | teal | thistle
tomato | turquoise | violet | wheat
white | whitesmoke | yellow | yellowgreen


Shape Constants (GPL)

GPL,GPL,GPL
constants, shape,constants, shape,constants, shape
shape constants,shape constants,shape constants
constants (GPL),constants (GPL),constants (GPL)
shape,shape,shape

The following constants are all the valid constants for the different graphic element types. Note that the constants for the edge graphic element appear in multiple tables.

shape.interior constants for interval elements
ibeam line square
shape.interior constants for edge and point elements
arrow | bowtie | circle | cross
decagon | elbow | elbowArrow | female
flower | flower3 | flower4 | flower5
flower6 | flower7 | flower8 | flower9
flower10 | heptagon | hexagon | hollowBowtie
hollowCircle | hollowDecagon | hollowHeptagon | hollowHexagon
hollowNonagon | hollowOctagon | hollowPentagon | hollowPolygon
hollowRoundRectangle | hollowSquare | hollowStar | hollowStar3
hollowStar4 | hollowStar5 | hollowStar6 | hollowStar7
hollowStar8 | hollowStar9 | hollowStar10 | hollowTriangle
ibeam | line | male | nonagon
octagon | pentagon | plus | polygon
roundRectangle | square | star | star3
star4 | star5 | star6 | star7
star8 | star9 | star10 | triangle

The following constants can also be used with the shape.exterior function to specify the border dashing of all other graphic elements. (An exception is the edge element, for which shape.interior defines the overall shape or dashing.) These constants are also used with the shape function that specifies the dashing of form.line guides.

shape.interior constants for edge, line, and path elements
dash | dash_1_dot | dash_2_dots | dash_3_dots
dash_2x | dash_3x | dash_4_dots | dash_dash2x
half_dash | solid |  |


Size Constants (GPL)

GPL,GPL,GPL
constants, size,constants, size,constants, size
size constants,size constants,size constants
constants (GPL),constants (GPL),constants (GPL)
size,size,size
tiny | small | medium | large
huge |  |  |


Pattern Constants (GPL)

GPL,GPL,GPL
constants, pattern,constants, pattern,constants, pattern
pattern constants,pattern constants,pattern constants
constants (GPL),constants (GPL),constants (GPL)
pattern,pattern,pattern
checkered | grid | grid2 | grid3
grid4 | grid5 | mesh | mesh2
mesh3 | mesh4 | mesh5 | pluses
pluses2 | solid | stripes | stripes2


Introduction to ViZml

ViZml,ViZml,ViZml
introduction,introduction,introduction

The Visualization Markup Language (ViZml™) is an XML specification that defines a graph by specifying the components that make up a graph—such as frames, titles, axes, and graphic elements (bars, points, etc.). ViZml is a schema based on the The Grammar of Graphics (Wilkinson, 2005). Concepts from the grammar are mapped to hierarchical XML elements, enforcing grammatically correct graphs.

To understand how ViZml works, consider the different levels at which a graph can be viewed or defined:

• At the lowest level, a graph is a collection of lines, symbols, text, and graphical attributes for these objects. Although this level is lower than ViZml, ViZml allows you to define how these objects are obtained. An engine for processing ViZml will produce such objects either directly (by writing to a image file) or indirectly (by creating them and immediately using them to draw into a window, image, or printer file).

• At the opposite end are graph types. These are very good for initial graph creation ("I want a scatterplot of height versus weight" or "Give me a bar chart of height, clustered by gender"), but considering only graph types is very limiting in that every desirable graph must be pre-conceived and planned. Additionally, all options, such as adding a normal curve to a histogram, must also be considered in advance.

ViZml exists between these two extremes. It defines high-level items but not complete graphs. It also allows these items to be composed in any way that makes sense. As an example, any graph may be rendered in polar coordinates, which allows a histogram to become a variant of a Rose diagram. If polar coordinates are applied to a scatterplot with a loess smoother, the plot becomes a polar scatterplot with a circular smoother. Such a plot could be used for displaying wind direction data. However, if applied to a paneled control chart, polar coordinates would likely produce something of limited usefulness.

ViZml provides a set of elements that can be composed as flexibly as possible to provide an extremely wide variety of graphs. These elements—including axes, variables, labels, ticks, etc.—should be familiar, and ViZml keeps standard meanings of these elements as much as possible. The change is in thinking about how a graph is constructed. It is the change in thinking from "I want a scatterplot of height versus weight" to "I want a two-dimensional rectangular frame with height represented on the y axis and weight on the x axis, with points drawn inside the frame, axes drawn for both x and y, and a title."


Basics of ViZml

ViZml,ViZml,ViZml
introduction,introduction,introduction

Consider the following ViZml, which specifies a simple bar chart. A discussion of the main components of a ViZml specification appear after the examples.

<?xml version="1.0" encoding="utf-8"?>
<visualization version="2.2" xmlns="http://xml.spss.com/visualization"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://xml.spss.com/visualization
  http://xml.spss.com/visualization/vizml-2.2.xsd">
  <delimitedFileSource fileName="/pubs/gpl/data/Employee data.csv" header="true"
    id="empdata"/>
  <sourceVariable categorical="true" id="jobcat" source="empdata"
    sourceName="jobcat"/>
  <sourceVariable id="salary" source="empdata" sourceName="salary"/>
  <graph>
    <coordinates>
      <dimension>
        <axis>
          <label>
            <text>Job Category</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
      <dimension>
        <axis>
          <label>
            <text>Mean Salary</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
    </coordinates>
    <interval>
      <summaryStatistic method="mean"/>
      <x variable="jobcat"/>
      <y variable="salary"/>
    </interval>
  </graph>
</visualization>

visualization Element. This is the root element of a ViZml document. It identifies the ViZml version and the schema against which the document is validated. All other elements are contained in this element.

Data Definition Elements. These elements identify the input or information to display in the graph. You specify these elements before any others. In the example, the data source is a comma-separated values (CSV) file, defined by the delimitedFileSource element. The two sourceVariable elements define the two variables whose data are read from the data source. For more information about data in ViZml, refer to Defining the Data.

IDs. Note that the sourceVariable elements use the id attribute from delimitedFileSource to indicate the data source from which to extract the variables. In the same manner, the sourceVariable elements have id attributes that can be referenced later in the specification. All elements have id attributes that can be referenced by other elements. Many of these are optional, but you use them when you need to reference another element, such as when referring to a style or a particular aesthetic to associate with a legend.

Graph Structure Elements. These elements define what type of graph or graphs to create. The graph element is the top-level element for a graph. There may be multiple graph elements in one ViZml file. For example, a scatterplot matrix (SPLOM) with histograms on the borders would require multiple graphic elements, one for the SPLOM and at least two others for the histograms on the borders. In the example, there is only one. The children of the graph element define the graph's coordinate system and space (using the coordinates and dimension elements), graphic elements (in this case, the interval graphic element), and the statistics and variables that determine the position of the graphic elements. For more information about graph structure, refer to Specifying the Graph's Structure.

Style Elements. These elements provide details for the graph's appearance and are optional. The example doesn't contain any specific style information. In fact, to create basic graphs, you can often omit style information. When you do want specific styles, it is easy to add a style element whose ID can be referenced by almost any part of the graph's structure. For example, you may have a style that specifies the font information for the various places in which text can appear in your graph. ViZml also offers control over style cycles, which define a series of styles that are related to each other. For example, a style cycle can be defined for a stacked bar chart to indicate explicitly the individual colors for the stack segments. Refer to Using Graph Styles for details about graphs styles.


Defining the Data

ViZml,ViZml,ViZml
data, defining,data, defining,data, defining
defining data,defining data,defining data
variables,variables,variables
data sources,data sources,data sources
domains,domains,domains

Data values are required to draw the graphic elements in the graph. Otherwise, there's no information for positioning the graphic elements. For example, there has to be a value that determines the height of the bars in a bar chart, and another value to determine the bars' positions on the axis. These values may be explicitly defined in the data or may be computed from the data using a statistical calculation. ViZml can extract and use various types of data. Data are stored in variables that other items in the graph can reference as needed.

Following is a simple example that reads data from a comma-separated values (CSV) file.

<delimitedFileSource fileName="C:/Data/Employee data.csv"
  header="true" id="empdata"/>
<sourceVariable sourceName="jobcat" id="jobcat" categorical="true"
  source="empdata"/>
<sourceVariable sourceName="gender" id="gender" categorical="true"
  source="empdata"/>
<sourceVariable sourceName="salary" id="salary" source="empdata"/>
<sourceVariable sourceName="salbegin" id="salbegin" source="empdata"/>

The header attribute on the delimitedFileSource element indicates that the first row in the file is the column header. These headers are referenced by each sourceVariable element to associate a variable with a column of data. Two of the variables are defined as categorical; the two variables that aren't defined as categorical are treated as continuous by default. This is an important distinction. For example, you use a categorical variable to define facets, but not a continuous variable. Also you would use a continuous rather than a categorical variable to calculate means.

You can also use the derivedVariable element to calculate a new variable based on other variables.

<derivedVariable source="empdata" value="((salary-salbegin)/salbegin)*100" id="salincrease"/>

The resulting salincrease variable uses the specified expression to calculate the percentage increase from the beginning salary to the current salary.

Variable Domains Collapse Hide details

Variable Domains

In addition to specifying the data sources for variables, you can define their domains. The domain may determine the range of the data, formats, or the order of categories in a categorical variable. The domain is then referenced by the dimension to which it applies. Often, you do not have to consider the domain; whether an explicit domain is needed depends on the data and the way you plan to use the data in the graph.

For example, consider the case where you want to sort the categories in the jobcat variable. First, the categorical domain is defined.

<categoricalDomain id="jobcatDomain">
  <variableReference ref="jobcat"/>
  <simpleSort method="custom">
    <categoryOrder>Custodial;Clerical;Manager</categoryOrder>
  </simpleSort>
</categoricalDomain>

Then the domain is referenced by the appropriate dimension. When the graph is drawn, the categories on this dimension will be sorted in the order specified by the domain.

<dimension domain="jobcatDomain">
  <axis>
    <label>
      <text>Job Category</text>
    </label>
    <majorTicks/>
  </axis>
</dimension>


Specifying the Graph's Structure

ViZml,ViZml,ViZml
structure,structure,structure

The graph structure defines how a graph is drawn and is what distinguishes graph types. The difference between a bar chart and a pie chart is the coordinate system transformation and the number of dimensions. The difference between a histogram and a bar chart is the binning statistic.

When writing ViZml, you have to think about the graph structure. You have to consider how many dimensions there are for each graph, whether any coordinate system transformations are required, whether the graph is faceted, which graphic elements and statistics are appropriate, and any aesthetics (such as color) that split graphic elements into groups. If using aesthetics, you will often also need a legend that provides a key to the aesthetics

Graph Structure

Coordinate Systems and Dimensions
Faceting (Paneling)
Graphic Elements


Coordinate Systems and Dimensions

ViZml,ViZml,ViZml
coordinates,coordinates,coordinates
dimensions,dimensions,dimensions

Many common chart types are drawn in a rectangular coordinate system. For example, a typical bar chart is drawn in a rectangular coordinate system. This is also the coordinate system used for scatterplots and time series plots, among others. However, you have the option to apply transformations as needed. You may want a polar coordinate system, or you may want to apply a reflection transformation.

By default, the coordinate system is rectangular. Therefore, if no transformation elements are specified—as in the following example—the graph is drawn in a rectangular coordinate system.

<coordinates>
</coordinates>

Specifying only the coordinates element is not enough. You need to define the dimensions in which elements are drawn in the coordinate system. For example, if you want a 2-D coordinate system, you specify two dimensions.

<coordinates>
  <dimension/>
  <dimension/>
</coordinates>

The dimension element has child elements to specify scale and axis options for the dimension. Without them, the axis would not display tick marks or a title. Therefore, a more typical example would include at least the axis element for defining these common items.

<coordinates>
  <dimension>
    <axis>
      <label>
        <text>Job Category</text>
      </label>
      <majorTicks/>
    </axis>
  </dimension>
  <dimension>
    <axis>
      <label>
        <text>Mean Salary</text>
      </label>
      <majorTicks/>
    </axis>
  </dimension>
</coordinates>

Now both axes will display labels and major tick marks to help interpret the data on the axis.

Coordinate System Transformations Collapse Hide details

Coordinate System Transformations

By default, the coordinate system is a rectangular one, without any transformations. Transformations can be applied if needed. A polar transformation is a common one because it is used to create a pie chart.

<coordinates>
  <polarTransform/>
  <dimension niceUpperMapping="false"/>
</coordinates>

In addition to the transformation, the coordinates element for the pie chart has other differences compared to a typical bar chart. No axis is specified because it is not needed for pie charts. The pie chart would still be correct with an axis, but the axis is not commonly displayed. The dimension element also includes the niceUpperMapping attribute. This is critical for a pie chart. By setting the attribute to false, "nice" numbers (like numbers rounded to the nearest 100) are not used to create the dimension's scale . This ensures that there is no gap between the last pie slice and the first one. Imagine if the pie chart were displaying counts. If the count were 412, the dimension's scale would run from 0 to 412 without nice upper mapping. If using nice upper mapping instead, the scale might have run to 415 or even 420, resulting in a gap between the largest count and the scale's end point.


Faceting (Paneling)

ViZml,ViZml,ViZml
faceting,faceting,faceting
paneling,paneling,paneling
table of graphs,table of graphs,table of graphs

Faceting (paneling) creates tables of graphs. Faceting occurs outside of the coordinate system and is therefore specified after the coordinate system in the ViZml specification..

To create a simple faceted graph, with one row of graphs, the ViZml includes something like the following.

<faceting>
  <variableReference ref="gender"/>
</faceting>

The variableReference element identifies the variable that controls the faceting. This is always a categorical variable, and a panel is drawn for each category in the variable.

Like dimensions, facets do not have labels unless you specify them. For facets, you need to use the facetingLayout element to indicate major ticks and labels. By specifying major ticks, you ensure that each column is labeled with the appropriate variable category.

<facetLayout>
  <facetLevel level="1">
    <axis>
      <label>
        <text>Gender</text>
      </label>
      <majorTicks/>
    </axis>
  </facetLevel>
</facetLayout>

Because there is only one variable used for faceting, there is only one faceting level. Compare this to an example where two variables are crossed to create columns and rows of graphs.

<faceting>
  <cross>
    <variableReference ref="gender"/>
    <variableReference ref="jobcat"/>
  </cross>
</faceting>
<facetLayout>
  <facetLevel level="1">
    <axis>
      <label>
        <text>Gender</text>
      </label>
      <majorTicks/>
    </axis>
  </facetLevel>
  <facetLevel level="2">
    <axis>
      <label>
        <text>Employment Category</text>
      </label>
      <majorTicks/>
    </axis>
  </facetLevel>
</facetLayout>

Now there are two facetLevel elements, one for each crossed variable. The level attribute corresponds to the order in which the variable appears in the faceting. A panel is drawn for each combination of categories in the crossed variables. The columns of panels are determined by the categories in gender, and the rows are determined by the categories in jobcat.


Graphic Elements

ViZml,ViZml,ViZml
aesthetics,aesthetics,aesthetics
graphic elements,graphic elements,graphic elements
clustering,clustering,clustering
stacking,stacking,stacking

Most graphs require a graphic element. Otherwise, they would be blank and not particular useful. Common graphic elements are intervals (bars), points, lines, areas, and schemas (box plot elements). When you think about different chart types, you often think about the graphic elements.

For each graphic element, you indicate the variables that control the position of the graphic element and the aesthetics that may separate the graphic elements into groups. Following is a example that would be used for a simple bar chart.

<interval>
  <summaryStatistic method="mean"/>
  <x variable="jobcat"/>
  <y variable="salary"/>
</interval>

The result of the mean statistic determines the height of the bars. Statistics are always calculated on the y variable. The position of the bars is determined by the x variable. So, in this example, a bar would appear at each jobcat category and the height the bars would be determined by the mean of salary for each jobcat category. In other words, the graph would show mean salary by job category.

A summary statistic isn't always necessary. It's never used for graphs of individual cases (that is, graphs with graphic elements that are related to one case in the data) like scatterplots.

<point>
  <x variable="salbegin"/>
  <y variable="salary"/>
</point>

This results in a simple scatterplot, with two unsummarized variables plotted against each other.

Grouping Graphic Elements with Aesthetics Collapse Hide details

Grouping Graphic Elements with Aesthetics

Aesthetics can be used to groupe graphic elements. The following creates a grouped scatterplot, with a different group for males and females.

<point>
  <color variable="gender"/>
  <x variable="salbegin"/>
  <y variable="salary"/>
</point>

Legends are not displayed by default, so, although there will be groups in this example, there is no way to map the colors to categories. To create a legend, the associated aesthetic must have an ID that the legend element can reference. Following is a complete graph element using an aesthetic and a legend element to display a key for the aesthetic.

<graph>
  <location part="right" method="attach" target="legend"/>
  <coordinates>
    <dimension>
      <axis>
        <label>
          <text>Beginning Salary</text>
        </label>
        <majorTicks/>
      </axis>
    </dimension>
    <dimension>
      <axis>
        <label>
          <text>Current Salary</text>
        </label>
        <majorTicks/>
      </axis>
    </dimension>
  </coordinates>
  <point>
    <color variable="gender" id="genderGroup"/>
    <x variable="salbegin"/>
    <y variable="salary"/>
  </point>
</graph>
<legend id="legend">
  <location part="right" method="fixed" value="100%"/>
  <location part="width" method="sizeToContent"/>
  <label>
    <text>Gender</text>
  </label>
  <legendTarget target="genderGroup"/>
</legend>

There are several features to consider. The first is that the legend element and the color element have IDs. These IDs are required because these elements need to be referenced by other elements. For example, the graph element contains a location element that references the legend element. This allows the right portion of the graph to be attached the legend. The legend element also contains two location elements. One fixes the legend to the right-most portion of the page display (100% of its space), and the other makes the legend as wide as it contents require. By doing this, you create just enough space on the right-hand side of the graph for the legend. The legend also contains a legendTarget element to identify the aesthetic to which it applies. Finally, the legend has a label element to display its title.

Clustering Graphic Elements Collapse Hide details

Clustering Graphic Elements

Clustering also requires a grouping aesthetic. However, a clustered chart is not as simple as the grouped scatterplot. You need to do more than specify an aesthetic and a legend to display a key for the aesthetic. This is necessary because clustering is a modification to the coordinate system, specifically to a particular dimension in the coordinate system. Clustering is defined on the dimension to which it applies.

<dimension clusterVariable="jobcat">
  <axis>
    <label>
      <text>Job Category</text>
    </label>
    <majorTicks/>
  </axis>
</dimension>

Clustering can be confusing because the variable that ends up appearing on the axis is specified by clusterVariable, while the variable used to create the groups in each cluster is defined (usually) on the x axis.

<interval>
  <summaryStatistic method="mean"/>
  <color variable="gender" id="genderGroup"/>
  <x variable="gender"/>
  <y variable="salary"/>
</interval>

If the two previous snippets were combined, you would end up with a bar chart clustered by gender with jobcat on the x axis.

Stacking Graphic Elements Collapse Hide details

Stacking Graphic Elements

Stacking graphic elements involves the collision or position modifier. This determines what happens when multiple elements would otherwise be positioned at the same spot. When you split a graphic element by an aesthetic and don't define a position modifier, the two elements are drawn on top of one another. To prevent this behavior, you need a position modifier.

<interval positionModifier="stack">
  <summaryStatistic method="sum"/>
  <color variable="gender" id="genderGroup"/>
  <x variable="jobcat"/>
  <y variable="salary"/>
</interval>

Unlike the clustered example, there is no modification to the coordinate system. Also be aware that there are many other options for the position modifiers. For example, pile is used when creating asymmetrical, 1-D dot plots.

<point positionModifier="pile">
  <binStatistic gridType="dot"/>
  <x variable="salary"/>
</point>


Using Graph Styles

ViZml,ViZml,ViZml
styles,styles,styles

Many aspects of a graph can have an associated custom style. Graphic elements, legends, individual graphs, and even the visualization element can have custom styles. If a ViZml element has a style attribute, it can have a custom style. The style attribute identifies the style element that contains the style information.

For example, the following axis label references a style using the style attribute.

<axis>
  <label style="styleLabel">
    <text>Mean Salary</text>
  </label>
</axis>

The referenced style element is a child of the visualization element.

<style id="styleLabel" font-size="12pt" font-weight="bold"/>

When the graph is drawn, the size of the label's text will be 12 points, and the text will be bold.

style elements can be embedded in other style elements. The child elements inherit the attributes from the parent elements. This behavior is useful when you want multiple styles to share attributes. Rather than having to define the attributes for all the styles, you can define the shared attributes in the parent element.

<style font-family="Times">
  <style id="axisLabelStyle" font-weight="bold"/>
  <style id="legendLabelStyle"/>
</style>

In this example, both styles use Times as the font family, while the axisLabelStyle also makes the text bold.

Style Cycles Collapse Hide details

Style Cycles

Style cycles are used when multiple styles distinguish items in the graph. For example, you may use color to distinguish categories. When you use an explicit aesthetic element (like color), a default style cycle is applied. However, you can use the styleBy element to reference a style cycle that you define explicitly. The styleBy attribute is also useful for applying multiple styles (e.g., color and size) to graphic elements that are grouped by another variable.

For example, consider the following, which maps a color to specific categories in a scatterplot (you saw this example in the discussion of grouping graphic elements with aesthetics).

<point>
  <color variable="gender"/>
  <x variable="salbegin"/>
  <y variable="salary"/>
</point>

The resulting colors in the graph would be determined by the default color styles. To assign specific colors, you would change the color element to a styleBy element.

<point>
  <styleBy variable="gender" styleCycle="genderCycle" id="genderGroup"/>
  <x variable="salbegin"/>
  <y variable="salary"/>
</point>

Like the style element, the styleCycle element is a child of the visualization element.

<styleCycle id="genderCycle">
  <cycle>
    <style color="red"/>
    <style color="green"/>
  </cycle>
</styleCycle>

This style cycle defines two colors. In the data, the female category is first, so graphic elements in the female group will be red. Graphic elements in the male category will be green. In this case, using this explicit style cycle over the default one may not be advantageous, but it would be advantageous to use gender symbols to distinguish the groups.

<styleCycle id="genderCycle">
  <cycle>
    <style symbol="female"/>
    <style symbol="male"/>
  </cycle>
</styleCycle>

Additionally, you could combine the symbols with a color.

<styleCycle id="genderCycle">
  <cycle>
    <style symbol="female" color="red"/>
    <style symbol="male" color="green"/>
  </cycle>
</styleCycle>


ViZml Element Reference

This section provides a reference for all the elements in ViZml.

Each topic lists the valid attributes for an element and its parent and child elements. The diagram displays all the element's children. Note that the arrows in the diagram indicate elements that may be shared among other elements. These elements are listed in the table of contents as a child of this topic ("ViZml Element Reference") rather than as a child of the parent topic. The overall root element for a ViZml file is the visualization element.


aggregateStatistic Element

aggregateStatistic element,aggregateStatistic element,aggregateStatistic element

Aggregates data that are at the same coordinates.

Attributes for aggregateStatistic
Attribute | Use | Description | Valid Values
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
aggregateStatistic diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="aggregateStatistic">
<xs:attribute name="id" type="xs:ID"></xs:attribute>
</xs:element>

Parent Elements

area Element, edge Element, faceting Element, interval Element, line Element, path Element, point Element, polygon Element, schema Element


alternateLabel Element

alternateLabel element,alternateLabel element,alternateLabel element

An alternative label to use for different locales.

Attributes for alternateLabel
Attribute | Use | Description | Valid Values
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
lang | optional | If multiple labels are specified, the one whose 'lang' attribute most closely matches the language of the chart is used. | language
style | optional | The style for the text of the label. | IDREF
textFrameStyle | optional | The style for the frame around the text. | IDREF
zOrder | optional | Integer that determines the order in which items are drawn. If this is not specified, items are drawn in the order they are found in the specification. | int
alternateLabel diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="alternateLabel">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="descriptionGroup">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="description">
<xs:sequence minOccurs="0">
<xs:element ref="vis:format"></xs:element>
</xs:sequence>
</xs:element>
<xs:element name="text" type="vis:textType"></xs:element>
</xs:choice>
</xs:element>
<xs:element name="text" type="vis:textType"></xs:element>
<xs:element ref="vis:alternateLabel"></xs:element>
</xs:choice>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="style" type="xs:IDREF"></xs:attribute>
<xs:attribute name="textFrameStyle" type="xs:IDREF"></xs:attribute>
<xs:attribute name="zOrder" type="xs:int"></xs:attribute>
<xs:attribute name="lang" type="xs:language"></xs:attribute>
</xs:element>

Parent Elements

label Element

Child Elements

descriptionGroup Element, text Element, alternateLabel Element

Related Elements

label Element


descriptionGroup Element

descriptionGroup element,descriptionGroup element,descriptionGroup element

A target XML element that is used to generate text to be inserted in the label. A mix of text and description elements is allowed and typically used.

Attributes for descriptionGroup
Attribute | Use | Description | Valid Values
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
separator | optional | If the targeted item has multiple groups, their descriptions are separated by this string. | string
target | required | The ID of the item for which a description is required. The target is one of: element, filter, variable or visualization. The default is the visualization. | IDREF
descriptionGroup diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="descriptionGroup">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="description">
<xs:sequence minOccurs="0">
<xs:element ref="vis:format"></xs:element>
</xs:sequence>
</xs:element>
<xs:element name="text" type="vis:textType"></xs:element>
</xs:choice>
<xs:attribute name="target" type="xs:IDREF" use="required"></xs:attribute>
<xs:attribute name="separator" type="xs:string"></xs:attribute>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
</xs:element>

Parent Elements

alternateLabel Element

Child Elements

description Element, text Element


description Element

description element,description element,description element

A short piece of text acquired from an item that describes one feature of that item.

Attributes for description
Attribute | Use | Description | Valid Values
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
name | required | The name of the description requested from the target XML element. This might be as simple as "name" or more complex such as "r-squared". Different XML elements provide different possible descriptions. | string
description diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="description">
<xs:sequence minOccurs="0">
<xs:element ref="vis:format"></xs:element>
</xs:sequence>
<xs:attribute name="name" type="xs:string" use="required"></xs:attribute>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
</xs:element>

Parent Elements

descriptionGroup Element

Child Elements

format Element


text Element

text element,text element,text element

A fixed string of text.

Attributes for text
Attribute | Use | Description | Valid Values
definesReference | optional | A reference string for the format. | string
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
position | optional | Apply a position for the text. | superscript. The text should be above the line. subscript. The text should be below the line. normal. The text should be even with the line (default).
style | optional | The style for the text of the label. | IDREF
usesReference | optional | The reference string that is associated with this text. | string
text diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="text" type="vis:textType">
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="position">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="superscript"></xs:enumeration>
<xs:enumeration value="subscript"></xs:enumeration>
<xs:enumeration value="normal"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="definesReference" type="xs:string"></xs:attribute>
<xs:attribute name="usesReference" type="xs:string"></xs:attribute>
<xs:attribute name="style" type="xs:IDREF"></xs:attribute>
</xs:element>

Parent Elements

descriptionGroup Element


text Element

text element,text element,text element

A fixed string of text.

Attributes for text
Attribute | Use | Description | Valid Values
definesReference | optional | A reference string for the format. | string
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
position | optional | Apply a position for the text. | superscript. The text should be above the line. subscript. The text should be below the line. normal. The text should be even with the line (default).
style | optional | The style for the text of the label. | IDREF
usesReference | optional | The reference string that is associated with this text. | string
text diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="text" type="vis:textType">
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="position">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="superscript"></xs:enumeration>
<xs:enumeration value="subscript"></xs:enumeration>
<xs:enumeration value="normal"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="definesReference" type="xs:string"></xs:attribute>
<xs:attribute name="usesReference" type="xs:string"></xs:attribute>
<xs:attribute name="style" type="xs:IDREF"></xs:attribute>
</xs:element>

Parent Elements

alternateLabel Element


alternating Element

alternating element,alternating element,alternating element

The alternating rule applies the rule to every other wrow.

Attributes for alternating
Attribute | Use | Description | Valid Values
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
odd | optional | If true, the odd rows will have the properties applied. If false, the even rows will have the properties applied. | boolean
alternating diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="alternating">
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="odd" type="xs:boolean"></xs:attribute>
</xs:element>

Parent Elements

intersect Element


animation Element

animation element,animation element,animation element

Specifies an animation for a visualization.

Attributes for animation
Attribute Use Description Valid Values

active

optional

If set to false, the controller will be inactive

boolean

delta

optional

Increment (delta) between animation frames.

string

end

optional

Ending value for the animation.

string

id

optional

An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one.

ID

inputDateFormatPattern

optional

The date input format pattern to use when reading this variable (for example, M/dd/yy). If not defined, this column will not be considered a date variable.

string

isFilter

optional

Set whether the nodes are filtered (true), or show/hide (false)

boolean

mode

optional

The type of animation controller to use.

fullAnimation. Full animation.

manipulation. Manipulation mode.

name

required

Name of the data column to use in the animation.

string

sortMethod

optional

The order to sort categories in.

data. Sort the data values in the order they are encountered.

natural. Sort the data values in natural order (e.g., alphabetical or numeric).

source

required

Data source that has the animation column in it.

IDREF

start

optional

Starting value for the animation.

string

target

optional

The frame that should be the target of animation. Where the animation will be located.

IDREF

tickMethod

optional

The method to use for ticking

none. Show no ticks.

full. Show all the ticks

animation diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="animation">
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="active" type="xs:boolean"></xs:attribute>
<xs:attribute name="target" type="xs:IDREF"></xs:attribute>
<xs:attribute name="source" type="xs:IDREF" use="required"></xs:attribute>
<xs:attribute name="mode" type="vis:animationModeType">
<xs:enumeration value="fullAnimation"></xs:enumeration>
<xs:enumeration value="manipulation"></xs:enumeration>
</xs:attribute>
<xs:attribute name="name" type="xs:string" use="required"></xs:attribute>
<xs:attribute name="start" type="xs:string"></xs:attribute>
<xs:attribute name="end" type="xs:string"></xs:attribute>
<xs:attribute name="delta" type="xs:string"></xs:attribute>
<xs:attribute name="isFilter" type="xs:boolean"></xs:attribute>
<xs:attribute name="inputDateFormatPattern" type="xs:string"></xs:attribute>
<xs:attribute name="sortMethod">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="data"></xs:enumeration>
<xs:enumeration value="natural"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="tickMethod">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="none"></xs:enumeration>
<xs:enumeration value="full"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:element>

Parent Elements

visualization Element

Related Elements

brushing Element, dragElement Element, drillDown Element, facetSortController Element, layerController Element, lineGuideController Element, pivotController Element, popup Element, rectangleGuideController Element, swingController Element


area Element

area element,area element,area element

An area element.

Attributes for area
Attribute Use Description Valid Values

breakRepresentation

optional

How to represent breaks at missing data.

gap. Specifies that the graphic element ends at a valid value and does not continue until the next valid value. There is a gap between valid values.

interpolate. Specifies that the graphic element is interpolated through missing values. That is, the graphic element is continuous from one valid value to another, regardless of missing values between the valid values.

wings. Specifies that the graphic element continues after a valid value in the direction of the next valid value but then breaks just before and after the missing value. This is like interpolating through the missing value and erasing the graphic element at the missing value. For line charts, the result looks similar to wings.

clip

optional

The type of clipping to apply to the element.

none. Do not clip at all.

cell. Clip to the cell such that the glyph being clipped does not go outside of the cell of the graph.

domain. Clip to the domain. Do not let the bounds of the glyph exceed the domain.

closed

optional

If true, the element's end point will be connected to its start point.

boolean

coordinates

optional

Defines the coordinate system within which an element is drawn. If left undefined, the first coordinate system defined by the graph is used. This attribute is intended for only graphs with multiple coordinate systems, such as SPLOMs with histograms on the diagonal.

IDREF

dot

optional

Usually an element's expression is crossed with the faceting, so that blends in the faceting will induce multiple copies of the data in the graph. If this parameter is set to true, the expressions will be dotted together, making fewer copies.

boolean

id

optional

An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one.

ID

labelCollisionHandling

optional

Allows the use of one or more algorithms to avoid collision among labels by moving them slightly around their original positions.

none. Labels will not be moved.

normal. Labels will be moved so as to avoid collisions. A short amount of time will be allocated to this algorithm.

fast. Labels will be moved so as to avoid collisions. A very short amount of time will be allocated to this algorithm; effectively it will not attempt many changes.

quality. Labels will be moved so as to avoid collisions. A long amount of time will be allocated to this algorithm; possibly up to a half second or so.

extreme. Labels will be moved so as to avoid collisions. The process will be allowed to run for a very long period of time; many seconds or so are possible. This option should only be used when time is not important.

outside. Labels will be moved so as to radiate outwards from the center of the cell.

inside. Labels will be moved so as to radiate inwards from the center of the cell.

basic. Labels will be moved so as to avoid collisions. The process will be allowed to run for a very long period of time; many seconds or so are possible. This option should only be used when time is not important.

name

optional

A human-readable string that may be used to name the element in a legend or to be read by a screen reader. If not defined, the ID will be used instead.

string

positionModifier

optional

For elements that would be mapped to the same position, this attribute allows them to be stacked on top of each other, dodged to either side of each other, or have the intersection of their ranges removed form each of them (a difference effect).

none. Do nothing

center. Intervals that are centered will be moved around the center of the dimension

centerStacked. Intervals are stacked, then centered

stack. Elements that are split by a splitting aesthetic will be stacked on top of each other.

stackInterpolating. Deprecated. Please use stack instead. The difference has been eliminated. If items have the same coordinates except possibly for the response dimension, stack them on top of each other. If a value is missing at a given stack location, a linear interpolation will be performed to give it a value.

setMissingsToZero. A simple modifier that converts all missing values to zeros.

minusIntersection. Areas drawn with this modifier are subtracted from each other to create a 'difference area'. Although defined in terms of areas, and intended mainly for use in that element, it will work for all elements.

dodge. Items drawn at exactly the same location will be moved aside so they no longer occlude each other. The center of the set of moved items will be the same location as they originally occupied. This is used to create symmetric dot plots.

pile. Items drawn at exactly the same location will be moved aside so they no longer occlude each other. Instead of being centered at the original location as in 'dodge', they will be piled one on top of each other. This is used to create asymmetric dot plots.

jitterJointUniform. All elements are perturbed randomly along all dimensions using a uniform distribution.

jitterConditionalUniform. All elements are perturbed randomly on the dependent dimension using a uniform distribution.

jitterJointNormal. All elements are perturbed randomly along all dimensions using a normal distribution.

jitterConditionalNormal. All elements are perturbed randomly on the dependent dimension using a normal distribution.

preserveStraightLines

optional

If true, lines are not curved within the space, but drawn straight from defined point to defined point.

boolean

showCollidingLabels

optional

If no label collision handling is attempted, or if labels still collide afterwards, this parameter specifies whether a label will be drawn if it collides with a previously drawn label.

boolean

showDiscontinuity

optional

How to handle locations where there are multiple y values for a single x value. If true, a gap is left in the line. If false, they are connected.

boolean

style

optional

The basic style of this element.

IDREF

xLocation

optional

Sets the x location to a value in [0,1] coordinates. Overrides position and statistic values.

double

yLocation

optional

Sets the y location to a value in [0,1] coordinates. Overrides position and statistic values.

double

zLocation

optional

Sets the z location to a value in [0,1] coordinates. Overrides position and statistic values.

double

zOrder

optional

Integer that determines the order in which items are drawn. If this is not specified, items are drawn in the order they are found in the specification. This has no effect in a 3D chart.

int

area diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="area">
<xs:sequence>
<xs:element ref="vis:extension" minOccurs="0" maxOccurs="unbounded"></xs:element>
<xs:element ref="vis:conditionalStyle" minOccurs="0" maxOccurs="unbounded"></xs:element>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:group ref="vis:statistic">
<xs:choice>
<xs:element ref="vis:attach"></xs:element>
<xs:element ref="vis:binStatistic"></xs:element>
<xs:element ref="vis:aggregateStatistic"></xs:element>
<xs:element ref="vis:collectRowsStatistic"></xs:element>
<xs:element ref="vis:replicate"></xs:element>
<xs:element ref="vis:when"></xs:element>
<xs:element ref="vis:distributionStatistic"></xs:element>
<xs:element ref="vis:graphLayoutStatistic"></xs:element>
<xs:element ref="vis:linkStatistic"></xs:element>
<xs:element ref="vis:mapStatistic"></xs:element>
<xs:element ref="vis:regionStatistic"></xs:element>
<xs:element ref="vis:smoothStatistic"></xs:element>
<xs:element ref="vis:fixedWindowDensityStatistic"></xs:element>
<xs:element ref="vis:nearestNeighborDensityStatistic"></xs:element>
<xs:element ref="vis:summaryStatistic"></xs:element>
<xs:element ref="vis:treeLayoutStatistic"></xs:element>
<xs:element ref="vis:tagCloudStatistic"></xs:element>
<xs:element ref="vis:patternLinkStatistic"></xs:element>
<xs:element ref="vis:clusteringStatistic"></xs:element>
<xs:element ref="vis:SOMStatistic"></xs:element>
<xs:element ref="vis:tukeyStatistic"></xs:element>
</xs:choice>
</xs:group>
</xs:sequence>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:group ref="vis:aesthetic">
<xs:choice>
<xs:element ref="vis:visibility"></xs:element>
<xs:element ref="vis:colorComponent"></xs:element>
<xs:element ref="vis:color"></xs:element>
<xs:element ref="vis:dash"></xs:element>
<xs:element ref="vis:labeling"></xs:element>
<xs:element ref="vis:offset"></xs:element>
<xs:element ref="vis:pattern"></xs:element>
<xs:element ref="vis:image"></xs:element>
<xs:element ref="vis:rotation"></xs:element>
<xs:element ref="vis:shape"></xs:element>
<xs:element ref="vis:size"></xs:element>
<xs:element ref="vis:split"></xs:element>
<xs:element ref="vis:styleBy"></xs:element>
<xs:element ref="vis:transparency"></xs:element>
</xs:choice>
</xs:group>
</xs:choice>
<xs:element ref="vis:position" minOccurs="0" maxOccurs="unbounded"></xs:element>
<xs:element ref="vis:x" minOccurs="0"></xs:element>
<xs:element ref="vis:y" minOccurs="0"></xs:element>
<xs:element ref="vis:z" minOccurs="0"></xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="clip">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="none"></xs:enumeration>
<xs:enumeration value="cell"></xs:enumeration>
<xs:enumeration value="domain"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="style" type="xs:IDREF"></xs:attribute>
<xs:attribute name="name" type="xs:string"></xs:attribute>
<xs:attribute name="dot" type="xs:boolean"></xs:attribute>
<xs:attribute name="labelCollisionHandling">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="none"></xs:enumeration>
<xs:enumeration value="normal"></xs:enumeration>
<xs:enumeration value="fast"></xs:enumeration>
<xs:enumeration value="quality"></xs:enumeration>
<xs:enumeration value="extreme"></xs:enumeration>
<xs:enumeration value="outside"></xs:enumeration>
<xs:enumeration value="inside"></xs:enumeration>
<xs:enumeration value="basic"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="showCollidingLabels" type="xs:boolean"></xs:attribute>
<xs:attribute name="coordinates" type="xs:IDREF"></xs:attribute>
<xs:attribute name="positionModifier">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="none"></xs:enumeration>
<xs:enumeration value="center"></xs:enumeration>
<xs:enumeration value="centerStacked"></xs:enumeration>
<xs:enumeration value="stack"></xs:enumeration>
<xs:enumeration value="stackInterpolating"></xs:enumeration>
<xs:enumeration value="setMissingsToZero"></xs:enumeration>
<xs:enumeration value="minusIntersection"></xs:enumeration>
<xs:enumeration value="dodge"></xs:enumeration>
<xs:enumeration value="pile"></xs:enumeration>
<xs:enumeration value="jitterJointUniform"></xs:enumeration>
<xs:enumeration value="jitterConditionalUniform"></xs:enumeration>
<xs:enumeration value="jitterJointNormal"></xs:enumeration>
<xs:enumeration value="jitterConditionalNormal"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="xLocation" type="xs:double"></xs:attribute>
<xs:attribute name="yLocation" type="xs:double"></xs:attribute>
<xs:attribute name="zLocation" type="xs:double"></xs:attribute>
<xs:attribute name="zOrder" type="xs:int"></xs:attribute>
<xs:attribute name="breakRepresentation" type="vis:breakRepresentationType">
<xs:enumeration value="gap"></xs:enumeration>
<xs:enumeration value="interpolate"></xs:enumeration>
<xs:enumeration value="wings"></xs:enumeration>
</xs:attribute>
<xs:attribute name="showDiscontinuity" type="xs:boolean"></xs:attribute>
<xs:attribute name="closed" type="xs:boolean"></xs:attribute>
<xs:attribute name="preserveStraightLines" type="xs:boolean"></xs:attribute>
</xs:element>

Parent Elements

graph Element

Child Elements

aggregateStatistic Element, attach Element, binStatistic Element, clusteringStatistic Element, collectRowsStatistic Element, color Element, colorComponent Element, conditionalStyle Element, dash Element, distributionStatistic Element, extension Element, fixedWindowDensityStatistic Element, graphLayoutStatistic Element, image Element, labeling Element, linkStatistic Element, mapStatistic Element, nearestNeighborDensityStatistic Element, offset Element, pattern Element, patternLinkStatistic Element, position Element, regionStatistic Element, replicate Element, rotation Element, shape Element, size Element, smoothStatistic Element, SOMStatistic Element, split Element, styleBy Element, summaryStatistic Element, tagCloudStatistic Element, transparency Element, treeLayoutStatistic Element, tukeyStatistic Element, visibility Element, when Element, x Element, y Element, z Element

Related Elements

edge Element, interval Element, line Element, path Element, polygon Element, schema Element


attach Element

attach element,attach element,attach element

Sets positions using the values of another element. It matches positions from this element against keys from the target element. When a match occurs, the position from the target is set. If there is no match, the item is not drawn.

Attributes for attach
Attribute | Use | Description | Valid Values
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
method | optional | How to manage attachment location | center. Connect nodes center to center outside. Connect nodes by touching the outsides of their bounding rectangles vertical. Connect to the top-center or bottom-center of the node horizontal. Connect to the center-left or center-right of the node orthogonal. Choose whichever of 'horizontal' or 'vertical' appears visually better on a per-node basis
target | required | Target element of type "elementType" (for example: point, interval) from which to get the position. | IDREF
targetKey | required | The variable used to match in the target element. | IDREF
attach diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="attach">
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="target" type="xs:IDREF" use="required"></xs:attribute>
<xs:attribute name="targetKey" type="xs:IDREF" use="required"></xs:attribute>
<xs:attribute name="method" type="vis:attachmentMethod">
<xs:enumeration value="center"></xs:enumeration>
<xs:enumeration value="outside"></xs:enumeration>
<xs:enumeration value="vertical"></xs:enumeration>
<xs:enumeration value="horizontal"></xs:enumeration>
<xs:enumeration value="orthogonal"></xs:enumeration>
</xs:attribute>
</xs:element>

Parent Elements

area Element, edge Element, faceting Element, interval Element, line Element, path Element, point Element, polygon Element, schema Element


axis Element

axis element,axis element,axis element

Defines a visual representation of a dimension.

Attributes for axis
Attribute | Use | Description | Valid Values
combineAxisLabels | optional | If true, all axis labels of a given label will be combined into a single axis label. If false, they are repeated on a per-row or per-column basis. | boolean
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
maxSize | optional | An axis takes up part of the frame. It is sized dynamically to balance display requirements. By default it can take up no more than a given fraction of a display (this fraction may vary by situation). Setting this value allows an axis to extend to a given fraction of screen space. | length
opposite | optional | Axes are drawn in the most suitable position, for example, to the left of or below a simple rectangular plot. If this is set to true, they will be drawn opposite their preferred position. | boolean
repeat | optional | Whether to add an axis on each cell in a faceting. | never. Never repeat the axes. always. Always repeat the axes.
style | optional | The style for drawing the base line of the axis. | IDREF
transform | optional | Apply a transform to the ticks for the axis. | linear percent
zOrder | optional | Integer that determines the order in which items are drawn. If this is not specified, items are drawn in the order they are found in the specification. | int
axis diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="axis">
<xs:sequence>
<xs:element ref="vis:label" minOccurs="0"></xs:element>
<xs:sequence minOccurs="0">
<xs:element ref="vis:majorTicks"></xs:element>
<xs:element ref="vis:minorTicks" minOccurs="0"></xs:element>
</xs:sequence>
<xs:element name="axisTransformParameter" minOccurs="0" maxOccurs="unbounded"></xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="style" type="xs:IDREF"></xs:attribute>
<xs:attribute name="opposite" type="xs:boolean"></xs:attribute>
<xs:attribute name="transform">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="linear"></xs:enumeration>
<xs:enumeration value="percent"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="maxSize" type="vis:length"></xs:attribute>
<xs:attribute name="repeat">
<xs:simpleType>
<xs:restriction base="xs:NMTOKEN">
<xs:enumeration value="never"></xs:enumeration>
<xs:enumeration value="always"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="combineAxisLabels" type="xs:boolean"></xs:attribute>
<xs:attribute name="zOrder" type="xs:int"></xs:attribute>
</xs:element>

Parent Elements

dimension Element, facetLevel Element

Child Elements

axisTransformParameter Element, label Element, majorTicks Element, minorTicks Element


axisTransformParameter Element

axisTransformParameter element,axisTransformParameter element,axisTransformParameter element

Parameters to be used by axis transformations.

Attributes for axisTransformParameter
Attribute | Use | Description | Valid Values
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
parameterName | optional | Name for the parameter. | string
parameterValue | optional | Value for the parameter. | any
axisTransformParameter diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="axisTransformParameter" minOccurs="0" maxOccurs="unbounded">
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="parameterName" type="xs:string"></xs:attribute>
<xs:attribute name="parameterValue"></xs:attribute>
</xs:element>

Parent Elements

axis Element


binStatistic Element

binStatistic element,binStatistic element,binStatistic element

A bin statistic bins the data into regular bins. If bin widths or counts are not specified, bin sizes are calculated automatically.

Attributes for binStatistic
Attribute Use Description Valid Values

augment

optional

If true, the grid will be augmented with missing values. This is useful when you want an element to be drawn for a 0 count, as in a cumulative histogram.

boolean

binCount

optional

An array of counts for the number of bins, one for each dimension on which binning will occur. This may not be specified in conjunction with binWidth.

string

binStart

optional

An array of start locations for the bins, one for each dimension on which binning will occur.

string

binWidth

optional

An array of sizes (in data units) for bins, one for each dimension on which binning will occur. This may not be specified in conjunction with binCount.

string

dimensions

optional

A semicolon separated list of dimensions to bin, starting from 1 (x). This overrides the 'method' parameter, for the purpose of setting dimensions.

string

gridType

optional

The type of grid to use.

hex. Specifies that hexagonal grids should be used.

dot. Specifies that the dot algorithm should be used.

square. Specifies that rectangular grids should be used.

voronoi. Specifies that a Voronoi tessellation should be used.

id

optional

An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one.

ID

location

optional

When points are aggregated within a single bin, this attribute defines where they are placed within the bin.

grid. Place the result at the grid center.

centroid. Place the result at the centroid of the data that falls within that bin.

method

optional

Define whether to bin all variables, just the independent one, or whether to bin everything and aggregate.

aggregate. Similar to allDimensions, except that the data are aggregated so that a single item appears in each bin.

allDimensions. All the dimensions are used for binning, but the data are not aggregated (thus you get several points all on top of each other).

notResponse. All the dimensions except the response dimension (usually 'Y') are used for binning, and the data are not aggregated.

binStatistic diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="binStatistic">
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="binCount" type="xs:string"></xs:attribute>
<xs:attribute name="binWidth" type="xs:string"></xs:attribute>
<xs:attribute name="binStart" type="xs:string"></xs:attribute>
<xs:attribute name="gridType" type="vis:gridType">
<xs:enumeration value="hex"></xs:enumeration>
<xs:enumeration value="dot"></xs:enumeration>
<xs:enumeration value="square"></xs:enumeration>
<xs:enumeration value="voronoi"></xs:enumeration>
</xs:attribute>
<xs:attribute name="augment" type="xs:boolean"></xs:attribute>
<xs:attribute name="location" type="vis:binLocationType">
<xs:enumeration value="grid"></xs:enumeration>
<xs:enumeration value="centroid"></xs:enumeration>
</xs:attribute>
<xs:attribute name="method" type="vis:binMethodType">
<xs:enumeration value="aggregate"></xs:enumeration>
<xs:enumeration value="allDimensions"></xs:enumeration>
<xs:enumeration value="notResponse"></xs:enumeration>
</xs:attribute>
<xs:attribute name="dimensions" type="xs:string"></xs:attribute>
</xs:element>

Parent Elements

area Element, edge Element, faceting Element, interval Element, line Element, path Element, point Element, polygon Element, schema Element


blend Element

blend element,blend element,blend element

The Grammar of Graphics blend operator takes variables and merges them on the same dimension.

Attributes for blend
Attribute | Use | Description | Valid Values
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
blend diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="blend">
<xs:choice maxOccurs="unbounded">
<xs:element ref="vis:variableReference"></xs:element>
<xs:element ref="vis:unity"></xs:element>
<xs:element ref="vis:blend"></xs:element>
<xs:element ref="vis:cross"></xs:element>
<xs:element ref="vis:dot"></xs:element>
<xs:element ref="vis:nest"></xs:element>
</xs:choice>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
</xs:element>

Parent Elements

cross Element, dot Element, faceting Element, nest Element

Child Elements

blend Element, cross Element, dot Element, nest Element, unity Element, variableReference Element


booleanMapping Element

booleanMapping element,booleanMapping element,booleanMapping element

Specifies a mapping from a category to a boolean.

Attributes for booleanMapping
Attribute | Use | Description | Valid Values
from | required | Category that is mapped to a specific value of the aesthetic. | string
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
to | required | Boolean value 'true' or 'false' | boolean
booleanMapping diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="booleanMapping">
<xs:attribute name="from" type="xs:string" use="required"></xs:attribute>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="to" type="xs:boolean" use="required"></xs:attribute>
</xs:element>

Parent Elements

visibility Element

Related Elements

colorMapping Element, dashMapping Element, doubleMapping Element, footnoteMapping Element, formatMapping Element, integerMapping Element, lengthMapping Element, stringMapping Element, symbolMapping Element


brushing Element

brushing element,brushing element,brushing element

Specifies a brushing interactivity with a visualization. Brushing changes the rendering of element glyphs chosen by selection with the mouse. A given brushing element describes what to brush based upon the given target attribute. Brushing occurs across the complete set of brushing elements in a manner determined by the linkMode.

Attributes for brushing
Attribute Use Description Valid Values

active

optional

If set to false, the controller will be inactive

boolean

id

optional

An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one.

ID

linkMode

optional

Set the mode in which this brushing element links to other elements. This property is used to determine which glyphs to brush across the entire set of brushing elements in a given visualization.

source. Source of brushing requests only. When selecting these elements, target brushing elements of mode 'receiver' or 'both' are brushed. Elements of mode 'source' are never brushed.

receiver. Receives brushing requests only. These elements are brushed when elements of mode 'receiver' or 'both' are selected. Elements of mode 'receiver' cannot be selected.

both. Receiver and source of brushing requests. You can select these elements to brush elements of mode 'receiver' or 'both', or these elements can be brushed when elements of mode 'source' or 'both' are selected.

selectionMode

optional

Set the mode to use in selecting glyphs to brush.

click. Something is selected if it is clicked.

rectangle. Something is selected if it falls partially within the bounds of a rectangle specified by actions of the mouse.

hover. Something is selected if the cursor hovers over it.

lasso. Something is selected if it falls partially inside the path.

source

required

The data source to brush on.

IDREF

splitting

optional

Whether to split the element up. If true, elements will be split by the brushing action in the same way as they would be by a categorical variable on an aesthetic.

boolean

target

required

An element that should be targeted for the brushing.

IDREF

brushing diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="brushing">
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="active" type="xs:boolean"></xs:attribute>
<xs:sequence>
<xs:group ref="vis:aesthetic" minOccurs="0">
<xs:choice>
<xs:element ref="vis:visibility"></xs:element>
<xs:element ref="vis:colorComponent"></xs:element>
<xs:element ref="vis:color"></xs:element>
<xs:element ref="vis:dash"></xs:element>
<xs:element ref="vis:labeling"></xs:element>
<xs:element ref="vis:offset"></xs:element>
<xs:element ref="vis:pattern"></xs:element>
<xs:element ref="vis:image"></xs:element>
<xs:element ref="vis:rotation"></xs:element>
<xs:element ref="vis:shape"></xs:element>
<xs:element ref="vis:size"></xs:element>
<xs:element ref="vis:split"></xs:element>
<xs:element ref="vis:styleBy"></xs:element>
<xs:element ref="vis:transparency"></xs:element>
</xs:choice>
</xs:group>
</xs:sequence>
<xs:attribute name="target" type="xs:IDREF" use="required"></xs:attribute>
<xs:attribute name="splitting" type="xs:boolean"></xs:attribute>
<xs:attribute name="linkMode">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="source"></xs:enumeration>
<xs:enumeration value="receiver"></xs:enumeration>
<xs:enumeration value="both"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="selectionMode" type="vis:selectionModeType">
<xs:enumeration value="click"></xs:enumeration>
<xs:enumeration value="rectangle"></xs:enumeration>
<xs:enumeration value="hover"></xs:enumeration>
<xs:enumeration value="lasso"></xs:enumeration>
</xs:attribute>
<xs:attribute name="source" type="xs:IDREF" use="required"></xs:attribute>
</xs:element>

Parent Elements

visualization Element

Child Elements

color Element, colorComponent Element, dash Element, image Element, labeling Element, offset Element, pattern Element, rotation Element, shape Element, size Element, split Element, styleBy Element, transparency Element, visibility Element

Related Elements

animation Element, dragElement Element, drillDown Element, facetSortController Element, layerController Element, lineGuideController Element, pivotController Element, popup Element, rectangleGuideController Element, swingController Element


categoricalDomain Element

categoricalDomain element,categoricalDomain element,categoricalDomain element

A domain defines the range of values in which data are expected to lie. The domain can be used to exclude values you do not want and to define standard ranges so data with different empirical ranges can be compared.

Attributes for categoricalDomain
Attribute | Use | Description | Valid Values
date | optional | If true, then the domain is for dates. | any
id | optional | Identifier for the domain. | ID
categoricalDomain diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="categoricalDomain">
<xs:sequence>
<xs:element ref="vis:format" minOccurs="0"></xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="date"></xs:attribute>
<xs:sequence>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="vis:variableReference"></xs:element>
<xs:element ref="vis:domainReference"></xs:element>
<xs:element ref="vis:categories"></xs:element>
</xs:choice>
<xs:choice minOccurs="0">
<xs:element ref="vis:simpleSort"></xs:element>
<xs:element ref="vis:statisticSort"></xs:element>
</xs:choice>
</xs:sequence>
</xs:element>

Parent Elements

visualization Element

Child Elements

categories Element, domainReference Element, format Element, simpleSort Element, statisticSort Element, variableReference Element

Related Elements

intervalDomain Element


categoricalDomainModifier Element

categoricalDomainModifier element,categoricalDomainModifier element,categoricalDomainModifier element

Domain modifier for categorical domains. Modifies the domain with the modifiers in order replace, union, intersect, exclude.

Attributes for categoricalDomainModifier
Attribute | Use | Description | Valid Values
dateType | optional |  | date dateTime time
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
categoricalDomainModifier diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="categoricalDomainModifier">
<xs:sequence maxOccurs="1">
<xs:element ref="vis:domainReplace" minOccurs="0" maxOccurs="1"></xs:element>
<xs:element ref="vis:domainUnion" minOccurs="0" maxOccurs="1"></xs:element>
<xs:element ref="vis:domainIntersect" minOccurs="0" maxOccurs="1"></xs:element>
<xs:element ref="vis:domainExclude" minOccurs="0" maxOccurs="1"></xs:element>
<xs:choice minOccurs="0" maxOccurs="1">
<xs:element ref="vis:simpleSort"></xs:element>
<xs:element ref="vis:statisticSort"></xs:element>
</xs:choice>
</xs:sequence>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="dateType" type="vis:dateType">
<xs:enumeration value="date"></xs:enumeration>
<xs:enumeration value="dateTime"></xs:enumeration>
<xs:enumeration value="time"></xs:enumeration>
</xs:attribute>
</xs:element>

Parent Elements

visualization Element

Child Elements

domainExclude Element, domainIntersect Element, domainReplace Element, domainUnion Element, simpleSort Element, statisticSort Element


categories Element

categories element,categories element,categories element

Defines categories to be added to or removed from a parent. The content of this element is a semicolon delimited list.

Attributes for categories
Attribute | Use | Description | Valid Values
remove | optional | If true, these categories will be removed from the parent; otherwise, they will be added to the parent. | boolean
categories diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="categories">
<xs:attribute name="remove" type="xs:boolean"></xs:attribute>
</xs:element>

Parent Elements

categoricalDomain Element, mapStatistic Element


categories2 Element

categories2 element,categories2 element,categories2 element

Defines the categories to be added to or removed from a parent. The content of this element is a semicolon delimited list.

categories2 diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="categories2"></xs:element>

Parent Elements

domainExclude Element, domainIntersect Element, domainReplace Element, domainUnion Element


clusteringStatistic Element

clusteringStatistic element,clusteringStatistic element,clusteringStatistic element

Performs clustering. Currently only a single simple algorithm is implemented.

Attributes for clusteringStatistic
Attribute | Use | Description | Valid Values
variables | optional | Semicolon delimited list of variables to use in the clustering. | string
clusteringStatistic diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="clusteringStatistic">
<xs:attribute name="variables" type="xs:string"></xs:attribute>
</xs:element>

Parent Elements

area Element, edge Element, faceting Element, interval Element, line Element, path Element, point Element, polygon Element, schema Element


collectRowsStatistic Element

collectRowsStatistic element,collectRowsStatistic element,collectRowsStatistic element

Merges all the rows of a table so that aesthetics calculated on them are all the same. This essentially makes individual data items one group.

Attributes for collectRowsStatistic
Attribute | Use | Description | Valid Values
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
collectRowsStatistic diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="collectRowsStatistic">
<xs:attribute name="id" type="xs:ID"></xs:attribute>
</xs:element>

Parent Elements

area Element, edge Element, faceting Element, interval Element, line Element, path Element, point Element, polygon Element, schema Element


color Element

color element,color element,color element

Maps a variable to the color of a graphic item. The color includes all components of the color (hue, saturation, brightness, transparency), so if used with those aesthetics, this one should be specified first.

Attributes for color
Attribute Use Description Valid Values

affect

optional

Type of color affected. Fill colors are for the interior of a drawn object while a stroke color is for the edge of the drawn object. Note that some objects, such as lines do not have an interior. "main" is usually a fill color. "secondary" is usually a stroke color. "both" affects both. "fill" is explicitly a fill color. "main" or "secondary" is preferred. "stroke" is explicitly a stroke color. "main" or "secondary" is preferred.

both. Both the main color and the secondary color will be affected.

main. The main color which is usually a fill color will be affected.

secondary. The secondary color which is usually a draw color will be affected.

stroke. Always affect the stroke. For most purposes, it is better to use MAIN or SECONDARY.

fill. Always affect the fill. For most purposes, it is better to use MAIN or SECONDARY.

clamp

optional

If true, values off the edges of the domain will be pegged to low or high values, not ignored.

boolean

cycle

optional

The cycle that will be applied to categorical data. The colors will be extracted from the style cycle and used for each distinct category in the data in order.

IDREF

dimension

optional

If the variable is an expression that contains more than one dimension of data (for example, the expression contained a cross of other variables), then this attribute specifies which of the variable's dimensions to use. The first is numbered 0, then 1, 2, etc.

nonNegativeInteger

domain

optional

If specified, this domain will be used to define the domain of the variable rather than the variable's default domain. For example, a user might choose to map 0 to black and 1 to white even if the data only run from 0.3 to 0.7. In this case a domain of [0,1] would be specified for the aesthetic.

IDREF

domainModifier

optional

The domain modifier defines how the domain is modified.

IDREF

high

optional

The name of the color at the high end of the range.

string

id

optional

An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one.

ID

low

optional

The name of the color at the high end of the range.

string

missing

optional

The name of the color to which missing values are mapped.

string

scale

optional

The color scale that is to be used; the path through the color cube to be used to display a continuous value

bipolarBlack. From the first color to black through saturation, then to the second color

bipolarWhite. From the first color to white through saturation, then to the second color

bipolarGray. From the first color to gray through saturation, then to the second color

bipolarLightGray. From the first color to light gray through saturation, then to the second color

bipolarDarkGray. From the first color to dark gray through saturation, then to the second color

rainbow. Rainbow scale. This scale does not use the 'low' and 'high' color values

circular. Around via hue from blue to blue. This scale does not use the 'low' and 'high' color values

temperature. Temperature scale. This scale does not use the 'low' and 'high' color values

split

optional

If true, distinct values of the variable will have statistics computed on them independently.

boolean

variable

optional

Referers to a data variable. The values of this variable will be mapped to aesthetic values used to display the element.

IDREF

color diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="color">
<xs:sequence>
<xs:element ref="vis:scale" minOccurs="0"></xs:element>
<xs:element ref="vis:summaryStatistic" minOccurs="0"></xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="domainModifier" type="xs:IDREF"></xs:attribute>
<xs:attribute name="variable" type="xs:IDREF"></xs:attribute>
<xs:attribute name="dimension" type="xs:nonNegativeInteger"></xs:attribute>
<xs:attribute name="domain" type="xs:IDREF"></xs:attribute>
<xs:attribute name="clamp" type="xs:boolean"></xs:attribute>
<xs:attribute name="split" type="xs:boolean"></xs:attribute>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element ref="vis:colorMapping" minOccurs="0"></xs:element>
</xs:sequence>
<xs:attribute name="scale" type="vis:colorScaleType">
<xs:enumeration value="bipolarBlack"></xs:enumeration>
<xs:enumeration value="bipolarWhite"></xs:enumeration>
<xs:enumeration value="bipolarGray"></xs:enumeration>
<xs:enumeration value="bipolarLightGray"></xs:enumeration>
<xs:enumeration value="bipolarDarkGray"></xs:enumeration>
<xs:enumeration value="rainbow"></xs:enumeration>
<xs:enumeration value="circular"></xs:enumeration>
<xs:enumeration value="temperature"></xs:enumeration>
</xs:attribute>
<xs:attribute name="affect" type="vis:colorAffectType">
<xs:enumeration value="both"></xs:enumeration>
<xs:enumeration value="main"></xs:enumeration>
<xs:enumeration value="secondary"></xs:enumeration>
<xs:enumeration value="stroke"></xs:enumeration>
<xs:enumeration value="fill"></xs:enumeration>
</xs:attribute>
<xs:attribute name="cycle" type="xs:IDREF"></xs:attribute>
<xs:attribute name="missing" type="xs:string"></xs:attribute>
<xs:attribute name="low" type="xs:string"></xs:attribute>
<xs:attribute name="high" type="xs:string"></xs:attribute>
</xs:element>

Parent Elements

area Element, brushing Element, edge Element, interval Element, labeling Element, line Element, path Element, point Element, polygon Element, schema Element

Child Elements

colorMapping Element, scale Element, summaryStatistic Element

Related Elements

colorComponent Element, dash Element, footnotes Element, formatting Element, image Element, labeling Element, labelLocation Element, offset Element, pattern Element, rotation Element, shape Element, size Element, split Element, styleBy Element, transparency Element, visibility Element


colorComponent Element

colorComponent element,colorComponent element,colorComponent element

Maps a variable to a specific color component (e.g., brightness) of a graphic item.

Attributes for colorComponent
Attribute Use Description Valid Values

affect

optional

Type of color affected. Fill colors are for the interior of a drawn object while a stroke color is for the edge of the drawn object. Note that some objects, such as lines do not have an interior. "main" is usually a fill color. "secondary" is usually a stroke color. "both" affects both. "fill" is explicitly a fill color. "main" or "secondary" should be used instead. "stroke" is explicitly a stroke color. "main" or "secondary" should be used instead.

both. Both the main color and the secondary color will be affected.

main. The main color which is usually a fill color will be affected.

secondary. The secondary color which is usually a draw color will be affected.

stroke. Always affect the stroke. For most purposes, it is better to use MAIN or SECONDARY.

fill. Always affect the fill. For most purposes, it is better to use MAIN or SECONDARY.

clamp

optional

If true, values off the edges of the domain will be pegged to low or high values, not ignored.

boolean

dimension

optional

If the variable is an expression that contains more than one dimension of data (for example, the expression contained a cross of other variables), then this attribute specifies which of the variable's dimensions to use. The first is numbered 0, then 1, 2, etc.

nonNegativeInteger

domain

optional

If specified, this domain will be used to define the domain of the variable rather than the variable's default domain. For example, a user might choose to map 0 to black and 1 to white even if the data only run from 0.3 to 0.7. In this case a domain of [0,1] would be specified for the aesthetic.

IDREF

domainModifier

optional

The domain modifier defines how the domain is modified.

IDREF

high

optional

The maximum value for the color component. May be a hue index or a color value, in which case the component will be taken from that color.

string

id

optional

An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one.

ID

low

optional

The minimum value for the color component. May be a hue index or a color value, in which case the component will be taken from that color.

string

missing

optional

The value to map missing values to

double

split

optional

If true, distinct values of the variable will have statistics computed on them independently.

boolean

type

optional

The specific color component (e.g., hue).

string

variable

optional

Referers to a data variable. The values of this variable will be mapped to aesthetic values used to display the element.

IDREF

colorComponent diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="colorComponent">
<xs:sequence>
<xs:element ref="vis:scale" minOccurs="0"></xs:element>
<xs:element ref="vis:summaryStatistic" minOccurs="0"></xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="domainModifier" type="xs:IDREF"></xs:attribute>
<xs:attribute name="variable" type="xs:IDREF"></xs:attribute>
<xs:attribute name="dimension" type="xs:nonNegativeInteger"></xs:attribute>
<xs:attribute name="domain" type="xs:IDREF"></xs:attribute>
<xs:attribute name="clamp" type="xs:boolean"></xs:attribute>
<xs:attribute name="split" type="xs:boolean"></xs:attribute>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element ref="vis:doubleMapping" minOccurs="0"></xs:element>
</xs:sequence>
<xs:attribute name="missing" type="xs:double"></xs:attribute>
<xs:attribute name="low" type="xs:string"></xs:attribute>
<xs:attribute name="high" type="xs:string"></xs:attribute>
<xs:attribute name="type" type="xs:string"></xs:attribute>
<xs:attribute name="affect" type="vis:colorAffectType">
<xs:enumeration value="both"></xs:enumeration>
<xs:enumeration value="main"></xs:enumeration>
<xs:enumeration value="secondary"></xs:enumeration>
<xs:enumeration value="stroke"></xs:enumeration>
<xs:enumeration value="fill"></xs:enumeration>
</xs:attribute>
</xs:element>

Parent Elements

area Element, brushing Element, edge Element, interval Element, labeling Element, line Element, path Element, point Element, polygon Element, schema Element

Child Elements

doubleMapping Element, scale Element, summaryStatistic Element

Related Elements

color Element, dash Element, footnotes Element, formatting Element, image Element, labeling Element, labelLocation Element, offset Element, pattern Element, rotation Element, shape Element, size Element, split Element, styleBy Element, transparency Element, visibility Element


colorMapping Element

colorMapping element,colorMapping element,colorMapping element

Defines a custom mapping of categories to colors.

Attributes for colorMapping
Attribute | Use | Description | Valid Values
from | required | Category that is mapped to a specific value of the aesthetic. | string
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
to | required | Color to which to map a category. | string
colorMapping diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="colorMapping">
<xs:attribute name="from" type="xs:string" use="required"></xs:attribute>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="to" type="xs:string" use="required"></xs:attribute>
</xs:element>

Parent Elements

color Element

Related Elements

booleanMapping Element, dashMapping Element, doubleMapping Element, footnoteMapping Element, formatMapping Element, integerMapping Element, lengthMapping Element, stringMapping Element, symbolMapping Element


conditionalStyle Element

conditionalStyle element,conditionalStyle element,conditionalStyle element

Applies a style to an element for only specific facets.

Attributes for conditionalStyle
Attribute | Use | Description | Valid Values
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
style | required | Style to apply when the expression in the "when" attribute evaluates to true. | IDREF
when | required | A boolean expression using facets that determines when the style is applied. Examples are "facet1 != facet2" or "facet1 == 2". | string
conditionalStyle diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="conditionalStyle">
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="when" type="xs:string" use="required"></xs:attribute>
<xs:attribute name="style" type="xs:IDREF" use="required"></xs:attribute>
</xs:element>

Parent Elements

area Element, edge Element, frameGuide Element, functionGuide Element, gridline Element, interval Element, line Element, lineGuide Element, path Element, planeGuide Element, point Element, pointGuide Element, polygon Element, rectangleGuide Element, schema Element


container Element

container element,container element,container element

A frame that contains other frames (containers, graphs, legends, and text frames).

Attributes for container
Attribute | Use | Description | Valid Values
clip | optional | If true, the frame clips contents so they do not overflow its bounds. The default behavior may vary based on the contents of the frame. | boolean
id | optional | Identifier for this frame. The identifier must be unique within the document and is required only when another element must reference this one. Can be used as the value for a target so other frames can define their locations relative to this one. | ID
style | optional | The frame is drawn with this style before any of its contents are drawn. | IDREF
container diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="container">
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element ref="vis:extension" minOccurs="0" maxOccurs="unbounded"></xs:element>
<xs:element ref="vis:location" minOccurs="0" maxOccurs="unbounded"></xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="style" type="xs:IDREF"></xs:attribute>
<xs:attribute name="clip" type="xs:boolean"></xs:attribute>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="vis:container"></xs:element>
<xs:element ref="vis:graph"></xs:element>
<xs:element ref="vis:legend"></xs:element>
<xs:element ref="vis:labelFrame"></xs:element>
<xs:element ref="vis:controlFrame"></xs:element>
</xs:choice>
</xs:element>

Parent Elements

visualization Element

Child Elements

container Element, controlFrame Element, extension Element, graph Element, labelFrame Element, legend Element, location Element

Related Elements

controlFrame Element, graph Element, labelFrame Element, legend Element, visualization Element


controlFrame Element

controlFrame element,controlFrame element,controlFrame element

A frame that contains a visualization control. This is an experimental feature and should not be used at present.

Attributes for controlFrame
Attribute | Use | Description | Valid Values
clip | optional | If true, the frame clips contents so they do not overflow its bounds. The default behavior may vary based on the contents of the frame. | boolean
divisions | optional | The step size between min and max values. | int
id | optional | Identifier for this frame. The identifier must be unique within the document and is required only when another element must reference this one. Can be used as the value for a target so other frames can define their locations relative to this one. | ID
max | optional | The maximum value to allow for the target attribute. | double
min | optional | The minimum value to allow for the target attribute. | double
style | optional | The frame is drawn with this style before any of its contents are drawn. | IDREF
targetAttribute | optional | The attribute on the target specification to change. | string
targetSpecification | optional | The specification to change. | IDREF
title | optional | The title for the control. | string
controlFrame diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="controlFrame">
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element ref="vis:extension" minOccurs="0" maxOccurs="unbounded"></xs:element>
<xs:element ref="vis:location" minOccurs="0" maxOccurs="unbounded"></xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="style" type="xs:IDREF"></xs:attribute>
<xs:attribute name="clip" type="xs:boolean"></xs:attribute>
<xs:attribute name="targetSpecification" type="xs:IDREF"></xs:attribute>
<xs:attribute name="targetAttribute" type="xs:string"></xs:attribute>
<xs:attribute name="min" type="xs:double"></xs:attribute>
<xs:attribute name="title" type="xs:string"></xs:attribute>
<xs:attribute name="max" type="xs:double"></xs:attribute>
<xs:attribute name="divisions" type="xs:int"></xs:attribute>
</xs:element>

Parent Elements

container Element, visualization Element

Child Elements

extension Element, location Element

Related Elements

container Element, graph Element, labelFrame Element, legend Element, visualization Element


coordinates Element

coordinates element,coordinates element,coordinates element

Defines the coordinate system for the graph. Elements are placed within a coordinate system.

Attributes for coordinates
Attribute | Use | Description | Valid Values
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
coordinates diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="coordinates">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="dimension">
<xs:sequence>
<xs:element ref="vis:scale" minOccurs="0"></xs:element>
<xs:element ref="vis:axis" minOccurs="0" maxOccurs="2"></xs:element>
</xs:sequence>
</xs:element>
<xs:element name="dimensionReference"></xs:element>
<xs:element name="rotationTransform"></xs:element>
<xs:element name="reflectionTransform"></xs:element>
<xs:element name="obliqueTransform"></xs:element>
<xs:element name="rectangularTransform"></xs:element>
<xs:element name="mapProjection"></xs:element>
<xs:element name="fishEyeTransform"></xs:element>
<xs:element name="functionalTransform"></xs:element>
<xs:element name="insetTransform"></xs:element>
<xs:element name="polarTransform"></xs:element>
<xs:element name="sameRatioTransform"></xs:element>
<xs:element name="transposeTransform"></xs:element>
<xs:element name="parallelCoordinatesTransform"></xs:element>
</xs:choice>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
</xs:element>

Parent Elements

graph Element

Child Elements

dimension Element, dimensionReference Element, fishEyeTransform Element, functionalTransform Element, insetTransform Element, mapProjection Element, obliqueTransform Element, parallelCoordinatesTransform Element, polarTransform Element, rectangularTransform Element, reflectionTransform Element, rotationTransform Element, sameRatioTransform Element, transposeTransform Element


dimension Element

dimension element,dimension element,dimension element

Defines a dimension of the coordinate system.

Attributes for dimension
Attribute | Use | Description | Valid Values
clusterGap | optional | The gap between clusters on the dimension. This is relevant only if clusterVariable is specified. | length
clusterVariable | optional | If defined, categories from this categorical variable are used to subdivide the dimension and provide clustering in this dimension. | IDREF
domain | optional | The domain defines how data is mapped into this dimension. Data at the top of the domain are mapped to the maximum value on this dimension. Data at the lower end of the domain are mapped to the minimum value of the dimension. | IDREF
domainModifier | optional | The domain modifier defines how the domain is modified. | IDREF
facetsShareScale | optional | This parameter overrides the grammar by forcing the dimension to have a domain that is nested (value false) or crossed (value true) no matter what faceting expressions are in use. General use is not recommended. | boolean
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
lowerMargin | optional | Amount to extend past the domain to provide a margin at the top where data are not expected. | length
niceLowerMapping | optional | Whether to modify the lower bound to a nice round number or leave it exactly as defined by the domain. | boolean
niceUpperMapping | optional | Whether to modify the upper bound to a nice round number or leave it exactly as defined by the domain. | boolean
unionDomain | optional | If true, the domain specified will be unioned with the default domain instead of overriding it. | boolean
upperMargin | optional | Amount to extend past the domain to provide a margin at the top where data are not expected. | length
dimension diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="dimension">
<xs:sequence>
<xs:element ref="vis:scale" minOccurs="0"></xs:element>
<xs:element ref="vis:axis" minOccurs="0" maxOccurs="2"></xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="domain" type="xs:IDREF"></xs:attribute>
<xs:attribute name="domainModifier" type="xs:IDREF"></xs:attribute>
<xs:attribute name="facetsShareScale" type="xs:boolean"></xs:attribute>
<xs:attribute name="unionDomain" type="xs:boolean"></xs:attribute>
<xs:attribute name="niceUpperMapping" type="xs:boolean"></xs:attribute>
<xs:attribute name="niceLowerMapping" type="xs:boolean"></xs:attribute>
<xs:attribute name="upperMargin" type="vis:length"></xs:attribute>
<xs:attribute name="lowerMargin" type="vis:length"></xs:attribute>
<xs:attribute name="clusterVariable" type="xs:IDREF"></xs:attribute>
<xs:attribute name="clusterGap" type="vis:length"></xs:attribute>
</xs:element>

Parent Elements

coordinates Element

Child Elements

axis Element, scale Element


dimensionReference Element

dimensionReference element,dimensionReference element,dimensionReference element

Refers to a dimension in a different coordinate system. This means that a dimension is effectively shared across coordinate systems.

Attributes for dimensionReference
Attribute | Use | Description | Valid Values
ref | required | The dimension to reference. | IDREF
dimensionReference diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="dimensionReference">
<xs:attribute name="ref" type="xs:IDREF" use="required"></xs:attribute>
</xs:element>

Parent Elements

coordinates Element


rotationTransform Element

rotationTransform element,rotationTransform element,rotationTransform element

A coordinate transform that rotates around a dimension.

Attributes for rotationTransform
Attribute | Use | Description | Valid Values
angle | optional | The angle to rotate by (in degrees). | double
dimension | optional | The dimension about which to rotate. Defaults to 'z' | x y z theta r phi
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
rotationTransform diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="rotationTransform">
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="dimension" type="vis:dimensionName">
<xs:enumeration value="x"></xs:enumeration>
<xs:enumeration value="y"></xs:enumeration>
<xs:enumeration value="z"></xs:enumeration>
<xs:enumeration value="theta"></xs:enumeration>
<xs:enumeration value="r"></xs:enumeration>
<xs:enumeration value="phi"></xs:enumeration>
</xs:attribute>
<xs:attribute name="angle" type="xs:double"></xs:attribute>
</xs:element>

Parent Elements

coordinates Element


reflectionTransform Element

reflectionTransform element,reflectionTransform element,reflectionTransform element

A coordinate transform that reflects around a dimension.

Attributes for reflectionTransform
Attribute | Use | Description | Valid Values
alternating | optional | Whether reflection should alternate between facet faces, so that every other facet is reflected. | boolean
dimension | optional | The dimension in which to reflect. | x. Used for the x dimension. y. Used for the y dimension. z. Used for the z dimension.
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
reflectionTransform diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="reflectionTransform">
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="dimension" type="vis:dimensionType">
<xs:enumeration value="x"></xs:enumeration>
<xs:enumeration value="y"></xs:enumeration>
<xs:enumeration value="z"></xs:enumeration>
</xs:attribute>
<xs:attribute name="alternating" type="xs:boolean"></xs:attribute>
</xs:element>

Parent Elements

coordinates Element


obliqueTransform Element

obliqueTransform element,obliqueTransform element,obliqueTransform element

A coordinate transform for 3D that performs an oblique projection.

Attributes for obliqueTransform
Attribute | Use | Description | Valid Values
distance | optional | Distance from the viewer. '1' is normal and values in the range 0.2 .. 3 are useful. | double
dx | optional | Offset the projection in the x dimension. Useful values are in the range 0 to 1. | double
dy | optional | Offset the projection in the y dimension. Useful values are in the range 0 to 1. | double
foreShortening | optional | How deep the projection extends. '1' is normal; '0' means no extension. | double
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
theta | optional | Angle at which to project. | double
xscale | optional | Multiplier for distorting x dimension. | double
yscale | optional | Multiplier for distorting y dimension. | double
obliqueTransform diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="obliqueTransform">
<xs:attribute name="theta" type="xs:double"></xs:attribute>
<xs:attribute name="distance" type="xs:double"></xs:attribute>
<xs:attribute name="foreShortening" type="xs:double"></xs:attribute>
<xs:attribute name="xscale" type="xs:double"></xs:attribute>
<xs:attribute name="yscale" type="xs:double"></xs:attribute>
<xs:attribute name="dx" type="xs:double"></xs:attribute>
<xs:attribute name="dy" type="xs:double"></xs:attribute>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
</xs:element>

Parent Elements

coordinates Element


rectangularTransform Element

rectangularTransform element,rectangularTransform element,rectangularTransform element

A coordinate transform for 3D that performs a viewpoint change.

Attributes for rectangularTransform
Attribute | Use | Description | Valid Values
distance | optional | Distance from the viewer. '1' is normal and values in the range 0.2 .. 3 are useful. | double
dx | optional | Offset the projection in the x dimension. Useful values are in the range 0 to 1. | double
dy | optional | Offset the projection in the y dimension. Useful values are in the range 0 to 1. | double
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
phi | optional | Angle to rotate around 'y' axis. | double
projectionDistance | optional | Distance to infinity (where all lines converge). Provides parallax effect if less than infinity. | double
theta | optional | Angle to rotate around 'x' axis. | double
xscale | optional | Multiplier for distorting x dimension. | double
yscale | optional | Multiplier for distorting y dimension. | double
zeta | optional | Angle to rotate around 'z' axis. | double
zscale | optional | Multiplier for distorting z dimension. | double
rectangularTransform diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="rectangularTransform">
<xs:attribute name="theta" type="xs:double"></xs:attribute>
<xs:attribute name="phi" type="xs:double"></xs:attribute>
<xs:attribute name="zeta" type="xs:double"></xs:attribute>
<xs:attribute name="distance" type="xs:double"></xs:attribute>
<xs:attribute name="projectionDistance" type="xs:double"></xs:attribute>
<xs:attribute name="xscale" type="xs:double"></xs:attribute>
<xs:attribute name="yscale" type="xs:double"></xs:attribute>
<xs:attribute name="zscale" type="xs:double"></xs:attribute>
<xs:attribute name="dx" type="xs:double"></xs:attribute>
<xs:attribute name="dy" type="xs:double"></xs:attribute>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
</xs:element>

Parent Elements

coordinates Element


mapProjection Element

mapProjection element,mapProjection element,mapProjection element

Treats the data as latitiude/longitude and projects according to a transformation.

Attributes for mapProjection
Attribute Use Description Valid Values

id

optional

An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one.

ID

type

optional

Method to use for the projection.

lambert. Lambert Conic Conformal Projection (Lambert projection) is useful for continental and smaller areas and has the familiar look where the western Canadian/US border is an arc. The Lambert projection is a conic projection and projected parallels are arcs of concentric circles centered at the pole. The projected meridians are radii of concentric circles that meet at the pole.

mercator. Mercator Projection is useful for global maps. The Mercator projection projects parallels as horizontal lines and meridians as vertical lines. The poles are not defined in the Mercator projection.

transverseMercator. Transverse Mercator Projection is useful for continental and smaller maps and has the familiar look where the western Canadian/US border is an arc. Both the central meridian and the equator are straight lines, no other parallel or meridian is a straight line.

orthographic. An orthographic projection is a two-dimensional map typically used for view of the whole globe. The shapes and areas are distorted, but distances are preserved along parallels.

winkelTripel. Mainly useful as a whole-earth projection; this combines a cylindrical projection and a Aikoff projection to produce a transformation that achieves similar results to Robinson's, only better.

mapProjection diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="mapProjection">
<xs:attribute name="type">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="lambert"></xs:enumeration>
<xs:enumeration value="mercator"></xs:enumeration>
<xs:enumeration value="transverseMercator"></xs:enumeration>
<xs:enumeration value="orthographic"></xs:enumeration>
<xs:enumeration value="winkelTripel"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
</xs:element>

Parent Elements

coordinates Element


fishEyeTransform Element

fishEyeTransform element,fishEyeTransform element,fishEyeTransform element

Magnifies a local area in a radial fashion.

Attributes for fishEyeTransform
Attribute | Use | Description | Valid Values
affectsX | optional | If true, affects the x dimension. | boolean
affectsY | optional | If true, affects the y dimension. | boolean
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
magnification | optional | Magnification factor. | double
radius | optional | Radius to magnify on a 0 to 1 scale. | double
x | optional | x location of the center of magnification. | double
y | optional | y location of the center of magnification. | double
fishEyeTransform diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="fishEyeTransform">
<xs:attribute name="magnification" type="xs:double"></xs:attribute>
<xs:attribute name="radius" type="xs:double"></xs:attribute>
<xs:attribute name="x" type="xs:double"></xs:attribute>
<xs:attribute name="y" type="xs:double"></xs:attribute>
<xs:attribute name="affectsX" type="xs:boolean"></xs:attribute>
<xs:attribute name="affectsY" type="xs:boolean"></xs:attribute>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
</xs:element>

Parent Elements

coordinates Element


functionalTransform Element

functionalTransform element,functionalTransform element,functionalTransform element

Transforms a single dimension based on a specified function.

Attributes for functionalTransform
Attribute | Use | Description | Valid Values
base | optional | Base or exponent to use for the method. | double
dimension | optional | Dimension to transform. | x. Used for the x dimension. y. Used for the y dimension. z. Used for the z dimension.
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
method | optional | Method to use for the transformation. | cosine log power
functionalTransform diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="functionalTransform">
<xs:attribute name="dimension" type="vis:dimensionType">
<xs:enumeration value="x"></xs:enumeration>
<xs:enumeration value="y"></xs:enumeration>
<xs:enumeration value="z"></xs:enumeration>
</xs:attribute>
<xs:attribute name="method">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="cosine"></xs:enumeration>
<xs:enumeration value="log"></xs:enumeration>
<xs:enumeration value="power"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="base" type="xs:double"></xs:attribute>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
</xs:element>

Parent Elements

coordinates Element


insetTransform Element

insetTransform element,insetTransform element,insetTransform element

Insets the coordinates for each dimension.

Attributes for insetTransform
Attribute | Use | Description | Valid Values
id | optional | The identifier for this item. | ID
x-max | optional | amount to inset the x dimension's maximum value. 0 to 1 is the useful range. | double
x-min | optional | amount to inset the x dimension's minimum value. 0 to 1 is the useful range. | double
y-max | optional | amount to inset the y dimension's maximum value. 0 to 1 is the useful range. | double
y-min | optional | amount to inset the y dimension's minimum value. 0 to 1 is the useful range. | double
z-max | optional | amount to inset the z dimension's maximum value. 0 to 1 is the useful range. | double
z-min | optional | amount to inset the z dimension's minimum value. 0 to 1 is the useful range. | double
insetTransform diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="insetTransform">
<xs:attribute name="x-min" type="xs:double"></xs:attribute>
<xs:attribute name="y-min" type="xs:double"></xs:attribute>
<xs:attribute name="z-min" type="xs:double"></xs:attribute>
<xs:attribute name="x-max" type="xs:double"></xs:attribute>
<xs:attribute name="y-max" type="xs:double"></xs:attribute>
<xs:attribute name="z-max" type="xs:double"></xs:attribute>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
</xs:element>

Parent Elements

coordinates Element


polarTransform Element

polarTransform element,polarTransform element,polarTransform element

Converts the first two dimensions to polar coordinates.

Attributes for polarTransform
Attribute | Use | Description | Valid Values
counterClockwise | optional | If true, direction is counterclockwise. | boolean
cycles | optional | How many cycles to wrap around. Defaults to 1. | double
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
startAngle | optional | Angle at which to start relative to the positive horizontal axis. | double
polarTransform diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="polarTransform">
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="startAngle" type="xs:double"></xs:attribute>
<xs:attribute name="cycles" type="xs:double"></xs:attribute>
<xs:attribute name="counterClockwise" type="xs:boolean"></xs:attribute>
</xs:element>

Parent Elements

coordinates Element


sameRatioTransform Element

sameRatioTransform element,sameRatioTransform element,sameRatioTransform element

A transformation that preserves the ratio of data units to screen pixels between the first two dimensions.

Attributes for sameRatioTransform
Attribute | Use | Description | Valid Values
center | optional | When there is extra space on the chart as a result of the projection, center the projection. | boolean
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
sameRatioTransform diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="sameRatioTransform">
<xs:attribute name="center" type="xs:boolean"></xs:attribute>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
</xs:element>

Parent Elements

coordinates Element


transposeTransform Element

transposeTransform element,transposeTransform element,transposeTransform element

A coordinate transform that transposes the first two dimensions.

Attributes for transposeTransform
Attribute | Use | Description | Valid Values
dimension1 | optional | One of the dimensions to swap position. | any
dimension2 | optional | Other dimension to swap position. | any
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
transposeTransform diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="transposeTransform">
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="dimension1">
<xs:simpleType>
<xs:restriction base="xs:int">
<xs:minInclusive value="1"></xs:minInclusive>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="dimension2">
<xs:simpleType>
<xs:restriction base="xs:int">
<xs:minInclusive value="1"></xs:minInclusive>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:element>

Parent Elements

coordinates Element


parallelCoordinatesTransform Element

parallelCoordinatesTransform element,parallelCoordinatesTransform element,parallelCoordinatesTransform element

A coordinate transformation that implements parallel coordinates, which reduce many dimensions to two.

Attributes for parallelCoordinatesTransform
Attribute | Use | Description | Valid Values
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
parallelCoordinatesTransform diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="parallelCoordinatesTransform">
<xs:attribute name="id" type="xs:ID"></xs:attribute>
</xs:element>

Parent Elements

coordinates Element


cross Element

cross element,cross element,cross element

The Grammar of Graphics cross operator takes multiple variables to make a facet with all combinations of each of the variables.

Attributes for cross
Attribute | Use | Description | Valid Values
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
cross diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="cross">
<xs:choice maxOccurs="unbounded">
<xs:element ref="vis:variableReference"></xs:element>
<xs:element ref="vis:unity"></xs:element>
<xs:element ref="vis:blend"></xs:element>
<xs:element ref="vis:cross"></xs:element>
<xs:element ref="vis:dot"></xs:element>
<xs:element ref="vis:nest"></xs:element>
</xs:choice>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
</xs:element>

Parent Elements

blend Element, dot Element, faceting Element, nest Element

Child Elements

blend Element, cross Element, dot Element, nest Element, unity Element, variableReference Element


dash Element

dash element,dash element,dash element

A mapping from a categorical variable to a set of dash styles.

Attributes for dash
Attribute | Use | Description | Valid Values
clamp | optional | If true, values off the edges of the domain will be pegged to low or high values, not ignored. | boolean
cycle | optional | The cycle that will be applied to categorical data. The patterns will be extracted from the style cycle and used for each distinct category in the data in order | IDREF
dimension | optional | If the variable is an expression that contains more than one dimension of data (for example, the expression contained a cross of other variables), then this attribute specifies which of the variable's dimensions to use. The first is numbered 0, then 1, 2, etc. | nonNegativeInteger
domain | optional | If specified, this domain will be used to define the domain of the variable rather than the variable's default domain. For example, a user might choose to map 0 to black and 1 to white even if the data only run from 0.3 to 0.7. In this case a domain of [0,1] would be specified for the aesthetic. | IDREF
domainModifier | optional | The domain modifier defines how the domain is modified. | IDREF
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
missing | optional | A dash pattern (semicolon separated list of lengths) to map missing values to | string
split | optional | If true, distinct values of the variable will have statistics computed on them independently. | boolean
variable | optional | Referers to a data variable. The values of this variable will be mapped to aesthetic values used to display the element. | IDREF
dash diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="dash">
<xs:sequence>
<xs:element ref="vis:scale" minOccurs="0"></xs:element>
<xs:element ref="vis:summaryStatistic" minOccurs="0"></xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="domainModifier" type="xs:IDREF"></xs:attribute>
<xs:attribute name="variable" type="xs:IDREF"></xs:attribute>
<xs:attribute name="dimension" type="xs:nonNegativeInteger"></xs:attribute>
<xs:attribute name="domain" type="xs:IDREF"></xs:attribute>
<xs:attribute name="clamp" type="xs:boolean"></xs:attribute>
<xs:attribute name="split" type="xs:boolean"></xs:attribute>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element ref="vis:dashMapping" minOccurs="0"></xs:element>
</xs:sequence>
<xs:attribute name="missing" type="xs:string"></xs:attribute>
<xs:attribute name="cycle" type="xs:IDREF"></xs:attribute>
</xs:element>

Parent Elements

area Element, brushing Element, edge Element, interval Element, line Element, path Element, point Element, polygon Element, schema Element

Child Elements

dashMapping Element, scale Element, summaryStatistic Element

Related Elements

color Element, colorComponent Element, footnotes Element, formatting Element, image Element, labeling Element, labelLocation Element, offset Element, pattern Element, rotation Element, shape Element, size Element, split Element, styleBy Element, transparency Element, visibility Element


dashMapping Element

dashMapping element,dashMapping element,dashMapping element

Specifies a mapping from a category to a dash array.

Attributes for dashMapping
Attribute | Use | Description | Valid Values
from | required | Category that is mapped to a specific value of the aesthetic. | string
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
to | required | The dash array (semicolon separated list of lengths). | string
dashMapping diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="dashMapping">
<xs:attribute name="from" type="xs:string" use="required"></xs:attribute>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="to" type="xs:string" use="required"></xs:attribute>
</xs:element>

Parent Elements

dash Element

Related Elements

booleanMapping Element, colorMapping Element, doubleMapping Element, footnoteMapping Element, formatMapping Element, integerMapping Element, lengthMapping Element, stringMapping Element, symbolMapping Element


databaseSource Element

databaseSource element,databaseSource element,databaseSource element

A data source in a SQL database.

Attributes for databaseSource
Attribute Use Description Valid Values

driver

optional

The class name of the driver for accessing the database. If unspecified, a default one is used.

string

filterToMissing

optional

Determines whether or not the data will be filtered to missing. The default is false

boolean

id

optional

An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one.

ID

missing

optional

offers listwise and variablewise (pairwise) missing value treatment when computing statistics. For VARIABLEWISE (Pairwise), a case is included in statistics for each variable in a function for which it has a valid value (regardless of whether the case has missing values for other variables). For LISTWISE, statistics for all variables used in functions in a graph data set are based on the same cases. Cases with missing values for any variable used in a function in a graph data set are excluded. Pairwise (VARIABLEWISE) is the default.

pairwise. For PAIRWISE, a case is included in statistics for each variable in a function for which it has a valid value (regardless of whether the case has missing values for other variables). PAIRWISE is the default.

listwise. For LISTWISE, statistics for all variables used in functions in a graph data set are based on the same cases. Cases with missing values for any variable used in a function in a graph data set are excluded.

password

optional

The password used to log onto the database.

string

query

optional

The sql query to send to the database. If this is specified, 'where' and 'table' must not be specified.

string

table

optional

The database table to access. Cannot be used when 'query' is specified.

string

url

required

The URI giving the database location.

anyURI

user

optional

The username to use to log onto the database.

string

where

optional

The sql 'where' clause to use to filter data. Cannot be used when 'query' is specified.

string

databaseSource diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="databaseSource">
<xs:sequence>
<xs:element name="aggregate" minOccurs="0" maxOccurs="1"></xs:element>
<xs:element name="filter" minOccurs="0" maxOccurs="unbounded"></xs:element>
<xs:element name="dataReduction" minOccurs="0" maxOccurs="1"></xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="missing" type="vis:missingDataType">
<xs:enumeration value="pairwise"></xs:enumeration>
<xs:enumeration value="listwise"></xs:enumeration>
</xs:attribute>
<xs:attribute name="filterToMissing" type="xs:boolean"></xs:attribute>
<xs:attribute name="url" type="xs:anyURI" use="required"></xs:attribute>
<xs:attribute name="driver" type="xs:string"></xs:attribute>
<xs:attribute name="user" type="xs:string"></xs:attribute>
<xs:attribute name="password" type="xs:string"></xs:attribute>
<xs:attribute name="table" type="xs:string"></xs:attribute>
<xs:attribute name="where" type="xs:string"></xs:attribute>
<xs:attribute name="query" type="xs:string"></xs:attribute>
</xs:element>

Parent Elements

visualization Element

Child Elements

aggregate Element, dataReduction Element, filter Element

Related Elements

delimitedFileSource Element, embeddedSource Element, reportSource Element, reshapeSource Element, savFileSource Element, streamingSource Element


aggregate Element

aggregate element,aggregate element,aggregate element

This causes a source to have similar rows aggregated. All non-key variables returned from this source will be summed.

Attributes for aggregate
Attribute | Use | Description | Valid Values
generatedCount | optional | If this attribute is defined, a column will be added to the source giving the count of the number of rows aggregated into a single row. | string
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
keyVariables | required | A semicolon delimited list of variable names that will be used as the aggregation keys. | string
aggregate diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="aggregate" minOccurs="0" maxOccurs="1">
<xs:attribute name="keyVariables" type="xs:string" use="required"></xs:attribute>
<xs:attribute name="generatedCount" type="xs:string"></xs:attribute>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
</xs:element>

Parent Elements

databaseSource Element


filter Element

filter element,filter element,filter element

An element that reduces the number of rows on the data by checking if the values of a source variable are within a domain.

Attributes for filter
Attribute | Use | Description | Valid Values
domain | optional | The domain to use as criteria for filtering the source. If not defined, missing values will be used as the domain | IDREF
exclude | optional | If true, exclude values in the domain, otherwise include them. | boolean
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
sourceName | optional | Name of the variable within the source. If unspecified, the row index is used. | string
filter diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="filter" minOccurs="0" maxOccurs="unbounded">
<xs:attribute name="sourceName" type="xs:string"></xs:attribute>
<xs:attribute name="domain" type="xs:IDREF"></xs:attribute>
<xs:attribute name="exclude" type="xs:boolean"></xs:attribute>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
</xs:element>

Parent Elements

databaseSource Element


dataReduction Element

dataReduction element,dataReduction element,dataReduction element

An element that reduces the number of rows on the data

Attributes for dataReduction
Attribute | Use | Description | Valid Values
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
maxRows | optional | The limit of the number of rows to be returned from a data source | integer
weightVariableName | optional | The name of the weight variable used to represent the amount of the data returned | string
dataReduction diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="dataReduction" minOccurs="0" maxOccurs="1">
<xs:attribute name="maxRows" type="xs:integer"></xs:attribute>
<xs:attribute name="weightVariableName" type="xs:string"></xs:attribute>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
</xs:element>

Parent Elements

databaseSource Element


delimitedFileSource Element

delimitedFileSource element,delimitedFileSource element,delimitedFileSource element

A source of data residing in a delimited file. Excel-style CSV files are a good example.

Attributes for delimitedFileSource
Attribute Use Description Valid Values

delimiter

optional

The string (usually a single character) that separates columns in the file.

string

encoding

optional

File encoding.

string

fileName

required

The path to the file to access.

string

filterToMissing

optional

Determines whether or not the data will be filtered to missing. The default is false

boolean

genericVariableName

optional

Generic variable name.

string

header

optional

If true, the file contains a header row with the names of the variables.

boolean

id

optional

An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one.

ID

missing

optional

offers listwise and variablewise (pairwise) missing value treatment when computing statistics. For VARIABLEWISE (Pairwise), a case is included in statistics for each variable in a function for which it has a valid value (regardless of whether the case has missing values for other variables). For LISTWISE, statistics for all variables used in functions in a graph data set are based on the same cases. Cases with missing values for any variable used in a function in a graph data set are excluded. Pairwise (VARIABLEWISE) is the default.

pairwise. For PAIRWISE, a case is included in statistics for each variable in a function for which it has a valid value (regardless of whether the case has missing values for other variables). PAIRWISE is the default.

listwise. For LISTWISE, statistics for all variables used in functions in a graph data set are based on the same cases. Cases with missing values for any variable used in a function in a graph data set are excluded.

replaceInvalidChar

optional

Replace invalid char by character user specifed.

string

delimitedFileSource diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="delimitedFileSource">
<xs:sequence>
<xs:element name="aggregate" minOccurs="0" maxOccurs="1"></xs:element>
<xs:element name="filter" minOccurs="0" maxOccurs="unbounded"></xs:element>
<xs:element name="dataReduction" minOccurs="0" maxOccurs="1"></xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="missing" type="vis:missingDataType">
<xs:enumeration value="pairwise"></xs:enumeration>
<xs:enumeration value="listwise"></xs:enumeration>
</xs:attribute>
<xs:attribute name="filterToMissing" type="xs:boolean"></xs:attribute>
<xs:attribute name="fileName" type="xs:string" use="required"></xs:attribute>
<xs:attribute name="delimiter" type="xs:string"></xs:attribute>
<xs:attribute name="header" type="xs:boolean"></xs:attribute>
<xs:attribute name="genericVariableName" type="xs:string"></xs:attribute>
<xs:attribute name="replaceInvalidChar" type="xs:string"></xs:attribute>
<xs:attribute name="encoding" type="xs:string"></xs:attribute>
</xs:element>

Parent Elements

visualization Element

Child Elements

aggregate Element, dataReduction Element, filter Element

Related Elements

databaseSource Element, embeddedSource Element, reportSource Element, reshapeSource Element, savFileSource Element, streamingSource Element


aggregate Element

aggregate element,aggregate element,aggregate element

This causes a source to have similar rows aggregated. All non-key variables returned from this source will be summed.

Attributes for aggregate
Attribute | Use | Description | Valid Values
generatedCount | optional | If this attribute is defined, a column will be added to the source giving the count of the number of rows aggregated into a single row. | string
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
keyVariables | required | A semicolon delimited list of variable names that will be used as the aggregation keys. | string
aggregate diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="aggregate" minOccurs="0" maxOccurs="1">
<xs:attribute name="keyVariables" type="xs:string" use="required"></xs:attribute>
<xs:attribute name="generatedCount" type="xs:string"></xs:attribute>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
</xs:element>

Parent Elements

delimitedFileSource Element


filter Element

filter element,filter element,filter element

An element that reduces the number of rows on the data by checking if the values of a source variable are within a domain.

Attributes for filter
Attribute | Use | Description | Valid Values
domain | optional | The domain to use as criteria for filtering the source. If not defined, missing values will be used as the domain | IDREF
exclude | optional | If true, exclude values in the domain, otherwise include them. | boolean
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
sourceName | optional | Name of the variable within the source. If unspecified, the row index is used. | string
filter diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="filter" minOccurs="0" maxOccurs="unbounded">
<xs:attribute name="sourceName" type="xs:string"></xs:attribute>
<xs:attribute name="domain" type="xs:IDREF"></xs:attribute>
<xs:attribute name="exclude" type="xs:boolean"></xs:attribute>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
</xs:element>

Parent Elements

delimitedFileSource Element


dataReduction Element

dataReduction element,dataReduction element,dataReduction element

An element that reduces the number of rows on the data

Attributes for dataReduction
Attribute | Use | Description | Valid Values
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
maxRows | optional | The limit of the number of rows to be returned from a data source | integer
weightVariableName | optional | The name of the weight variable used to represent the amount of the data returned | string
dataReduction diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="dataReduction" minOccurs="0" maxOccurs="1">
<xs:attribute name="maxRows" type="xs:integer"></xs:attribute>
<xs:attribute name="weightVariableName" type="xs:string"></xs:attribute>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
</xs:element>

Parent Elements

delimitedFileSource Element


derivedVariable Element

derivedVariable element,derivedVariable element,derivedVariable element

Derived variables are variables that are derived from other source variables by means of a mathematical expression.

Attributes for derivedVariable
Attribute Use Description Valid Values

categorical

optional

Whether this variable is categorical. If not, and it is not a date, the data values are converted to doubles. The difference between a categorical and non-categorical variable is profound and determines whether it can be used for faceting, the aesthetics with which it can be used, and other purposes. It is legal and often useful to have two variables use the same base data with different values for categorical and/or other attributes.

boolean

creator

optional

The creator of this variable.

string

dependsOn

optional

The DependsOn variable is a variable which is tied to this one. This information is used by controllers to make sure that if they move one of the variables, the tied variable is also moved. As an example, a pivot table controller will move both of the variables at the same time, not allowing them to be moved independently . If a variable is a group for another categorical variable in a table, the group variable should define the categorical variable as a 'dependsOn' variable.

IDREF

description

optional

A description of the variable for human or machine use.

string

domain

optional

All data exist in some domain, and that domain is used to control what the "minimum" and "maximum" values are. By default, the domain of a variable is defined to be the data range (for continuous variables) or the set of unique values of a variable (for categorical variables). If this parameter is specified, the default domain is replaced with this one.

IDREF

domainModifier

optional

The domain modifier defines how the domain is modified.

IDREF

id

optional

Identifies the variable.

ID

key

optional

Indicates the variable can be used as a database key; all entries in it should be unique.

boolean

label

optional

A human-readable name for the variable (defaults to the ID).

string

labelVariable

optional

By default, the values of a categorical variable are used as the labels. If this attribute is specified, the given variable is used to label the categories of this variable. The label variable must be of the same length as this variable, since it matches on a row-by-row basis, and both must be categorical variables.

IDREF

language

optional

This gives a hint as to the language used to evaluate derived variables

string

measurementLevel

optional

A hint as to the scale for the data (nominal, ordinal, interval, ratio)

nominal. The only comparisons that can be made between nominal variable values are equality and inequality

ordinal. In this classification, the values can be given a rank order (1st, 2nd, 3rd etc.). Comparisons of greater and less can be made, in addition to equality and inequality

interval. In this classification, equal differences between measurements represent equivalent intervals. Operations such as addition and subtraction are therefore meaningful. The zero point on the scale is, however, arbitrary. Dates are a good example of intervals

ratio. In this classification, the ratios between pairs of numbers is meaningful. Operations such as multiplication and division are therefore meaningful. The zero value on a ratio scale is non-arbitrary

shortLabel

optional

A short human-readable label for the variable (defaults to the label).

string

source

optional

The data source that contains the variables from which this variable is derived.

IDREF

value

optional

This variable is derived by calculating the expression given by this attribute. Examples would be 'log(1+x)' or '(a-b)/(a+b)' , where x, a and b are the ids of other source variables.

string

weight

optional

If true, this variable will be used as the weight for all data in the same source. At most one weight may be defined for a source. Statistics will treat these weights as replication weights unless otherwise noted.

boolean

derivedVariable diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="derivedVariable">
<xs:sequence>
<xs:element ref="vis:extension" minOccurs="0" maxOccurs="unbounded"></xs:element>
<xs:element name="aggregation" minOccurs="0"></xs:element>
<xs:element ref="vis:format" minOccurs="0"></xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="categorical" type="xs:boolean"></xs:attribute>
<xs:attribute name="measurementLevel" type="vis:measurementLevel">
<xs:enumeration value="nominal"></xs:enumeration>
<xs:enumeration value="ordinal"></xs:enumeration>
<xs:enumeration value="interval"></xs:enumeration>
<xs:enumeration value="ratio"></xs:enumeration>
</xs:attribute>
<xs:attribute name="label" type="xs:string"></xs:attribute>
<xs:attribute name="shortLabel" type="xs:string"></xs:attribute>
<xs:attribute name="domain" type="xs:IDREF"></xs:attribute>
<xs:attribute name="domainModifier" type="xs:IDREF"></xs:attribute>
<xs:attribute name="labelVariable" type="xs:IDREF"></xs:attribute>
<xs:attribute name="dependsOn" type="xs:IDREF"></xs:attribute>
<xs:attribute name="weight" type="xs:boolean"></xs:attribute>
<xs:attribute name="key" type="xs:boolean"></xs:attribute>
<xs:attribute name="creator" type="xs:string"></xs:attribute>
<xs:attribute name="description" type="xs:string"></xs:attribute>
<xs:attribute name="source" type="xs:IDREF"></xs:attribute>
<xs:sequence>
<xs:element ref="vis:valueMapEntry" minOccurs="0" maxOccurs="unbounded"></xs:element>
</xs:sequence>
<xs:attribute name="value" type="xs:string"></xs:attribute>
<xs:attribute name="language" type="xs:string"></xs:attribute>
</xs:element>

Parent Elements

visualization Element

Child Elements

aggregation Element, extension Element, format Element, valueMapEntry Element

Related Elements

expressionVariable Element, multipleResponseVariable Element, sourceVariable Element


aggregation Element

aggregation element,aggregation element,aggregation element

Aggregates categories of a categorical variable based on the sum of values of a different variable.

Attributes for aggregation
Attribute | Use | Description | Valid Values
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
minFraction | required | The fraction (between 0 and 1) that will be used to determine if a category is to be aggregated. If a category has a summed value less than the given fraction of the overall sum, it will be aggregated unless it is the only such category (in which case there is nothing with which to aggregate it!). | any
newCategory | required | The name of the category that is created if any aggregation occurs. | string
sumVariable | optional | The variable whose categories are summed to determine the new category's size. | IDREF
aggregation diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="aggregation" minOccurs="0">
<xs:attribute name="newCategory" type="xs:string" use="required"></xs:attribute>
<xs:attribute name="sumVariable" type="xs:IDREF" use="optional"></xs:attribute>
<xs:attribute name="minFraction" use="required">
<xs:simpleType>
<xs:restriction base="xs:double">
<xs:minInclusive value="0"></xs:minInclusive>
<xs:maxInclusive value="1"></xs:maxInclusive>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
</xs:element>

Parent Elements

derivedVariable Element


distributionStatistic Element

distributionStatistic element,distributionStatistic element,distributionStatistic element

Creates a distribution that fits the data.

Attributes for distributionStatistic
Attribute Use Description Valid Values

distribution

optional

The distribution to use with a probability scale.

uniform. Indicates the uniform distribution. parameter is a, the minimum of the distribution. secondaryParameter is b, the maximum of the distribution. Both parameters may be left out, in which case they will be estimated from the data using method of moments. It is an error to specify only one of the parameters.

normal. Indicates the normal distribution. parameter is mu, the mean of the distribution. secondaryParameter is sigma, the standard deviation of the distribution. Either or both parameters may be left out, in which case they will be estimated from the data using maximum likelihood.

t. Indicates tthe t distribution. parameter is df, the degrees of freedom of the distribution. secondaryParameter is unused.

f. Indicates the f distribution. parameter and secondaryParameter are df1 and df2, the degrees of freedom of the distribution.

chisquare. Indicates the chi-square distribution. parameter is df, the degrees of freedom of the distribution. secondaryParameter is unused.

gamma. Indicates the gamma distribution. parameter is df, the degrees of freedom of the distribution. secondaryParameter is unused.

beta. Indicates the beta distribution. parameter and secondaryParameter are df1 and df2, the degrees of freedom of the distribution.

exponential. Indicates the exponential distribution. parameter is the rate, and secondaryParameter is unused. The rate parameter may be left out, in which case it will be estimated from the data using method of moments.

logistic. Indicates the logistic distribution. parameter is the location of the distribution, and secondaryParameter is the spread of the distribution

studentizedrange. Indicates the Studentized range distribution. parameter and secondaryParameter are df1 and df2, the degrees of freedom of the distribution.

weibull. Indicates the Weibull distribution. parameter and secondaryParameter are df1 and df2, the degrees of freedom of the distribution.

poisson. Indicates the poisson distribution. parameter is lambda and secondaryParameter is unused. The lambda parameter may be left out, in which case it will be estimated from the data using method of moments.

id

optional

An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one.

ID

parameter

optional

A parameter for a distribution. If a distribution parameter is used, it is documented with the specific type.

string

secondaryParameter

optional

A parameter for a distribution. If a distribution parameter is used, it is documented with the specific type.

string

segments

optional

The number of segments to generate for the distribute. If unspecified, a default is used.

integer

distributionStatistic diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="distributionStatistic">
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="distribution" type="vis:distributionType">
<xs:enumeration value="uniform"></xs:enumeration>
<xs:enumeration value="normal"></xs:enumeration>
<xs:enumeration value="t"></xs:enumeration>
<xs:enumeration value="f"></xs:enumeration>
<xs:enumeration value="chisquare"></xs:enumeration>
<xs:enumeration value="gamma"></xs:enumeration>
<xs:enumeration value="beta"></xs:enumeration>
<xs:enumeration value="exponential"></xs:enumeration>
<xs:enumeration value="logistic"></xs:enumeration>
<xs:enumeration value="studentizedrange"></xs:enumeration>
<xs:enumeration value="weibull"></xs:enumeration>
<xs:enumeration value="poisson"></xs:enumeration>
</xs:attribute>
<xs:attribute name="parameter" type="xs:string"></xs:attribute>
<xs:attribute name="secondaryParameter" type="xs:string"></xs:attribute>
<xs:attribute name="segments" type="xs:integer"></xs:attribute>
</xs:element>

Parent Elements

area Element, edge Element, faceting Element, interval Element, line Element, path Element, point Element, polygon Element, schema Element


domainExclude Element

domainExclude element,domainExclude element,domainExclude element

Defines the domain to be excluded from the existing domain. This can only reduce the domain.

domainExclude diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="domainExclude">
<xs:group ref="vis:modifier" maxOccurs="unbounded">
<xs:choice>
<xs:element ref="vis:variableReference"></xs:element>
<xs:element ref="vis:categories2"></xs:element>
<xs:element ref="vis:range"></xs:element>
</xs:choice>
</xs:group>
</xs:element>

Parent Elements

categoricalDomainModifier Element, intervalDomainModifier Element

Child Elements

categories2 Element, range Element, variableReference Element


domainIntersect Element

domainIntersect element,domainIntersect element,domainIntersect element

Defines the domain to intersect the existing domain. This can only reduce the domain.

domainIntersect diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="domainIntersect">
<xs:group ref="vis:modifier" maxOccurs="unbounded">
<xs:choice>
<xs:element ref="vis:variableReference"></xs:element>
<xs:element ref="vis:categories2"></xs:element>
<xs:element ref="vis:range"></xs:element>
</xs:choice>
</xs:group>
</xs:element>

Parent Elements

categoricalDomainModifier Element, intervalDomainModifier Element

Child Elements

categories2 Element, range Element, variableReference Element


domainReference Element

domainReference element,domainReference element,domainReference element

Include the specified domain.

Attributes for domainReference
Attribute | Use | Description | Valid Values
ref | required | The ID of the domain being referenced. | IDREF
domainReference diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="domainReference">
<xs:attribute name="ref" type="xs:IDREF" use="required"></xs:attribute>
</xs:element>

Parent Elements

categoricalDomain Element, intervalDomain Element


domainReplace Element

domainReplace element,domainReplace element,domainReplace element

Defines the domain to replace the existing domain. This defines the new domain.

domainReplace diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="domainReplace">
<xs:group ref="vis:modifier" maxOccurs="unbounded">
<xs:choice>
<xs:element ref="vis:variableReference"></xs:element>
<xs:element ref="vis:categories2"></xs:element>
<xs:element ref="vis:range"></xs:element>
</xs:choice>
</xs:group>
</xs:element>

Parent Elements

categoricalDomainModifier Element, intervalDomainModifier Element

Child Elements

categories2 Element, range Element, variableReference Element


domainUnion Element

domainUnion element,domainUnion element,domainUnion element

Defines the domain to union the existing domain. This can only enlarge the domain.

domainUnion diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="domainUnion">
<xs:group ref="vis:modifier" maxOccurs="unbounded">
<xs:choice>
<xs:element ref="vis:variableReference"></xs:element>
<xs:element ref="vis:categories2"></xs:element>
<xs:element ref="vis:range"></xs:element>
</xs:choice>
</xs:group>
</xs:element>

Parent Elements

categoricalDomainModifier Element, intervalDomainModifier Element

Child Elements

categories2 Element, range Element, variableReference Element


dot Element

dot element,dot element,dot element

The Grammar of Graphics dot operator takes multiple variables to make a facet with all combinations of each of the variables.

Attributes for dot
Attribute | Use | Description | Valid Values
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
dot diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="dot">
<xs:choice maxOccurs="unbounded">
<xs:element ref="vis:variableReference"></xs:element>
<xs:element ref="vis:unity"></xs:element>
<xs:element ref="vis:blend"></xs:element>
<xs:element ref="vis:cross"></xs:element>
<xs:element ref="vis:dot"></xs:element>
<xs:element ref="vis:nest"></xs:element>
</xs:choice>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
</xs:element>

Parent Elements

blend Element, cross Element, faceting Element, nest Element

Child Elements

blend Element, cross Element, dot Element, nest Element, unity Element, variableReference Element


doubleMapping Element

doubleMapping element,doubleMapping element,doubleMapping element

Specifies a mapping from a category to a double value.

Attributes for doubleMapping
Attribute | Use | Description | Valid Values
from | required | Category that is mapped to a specific value of the aesthetic. | string
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
to | required | (0 - 1) value to which to map a category. | any
doubleMapping diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="doubleMapping">
<xs:attribute name="from" type="xs:string" use="required"></xs:attribute>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="to" use="required">
<xs:simpleType>
<xs:restriction base="xs:double">
<xs:minInclusive value="0"></xs:minInclusive>
<xs:maxInclusive value="1"></xs:maxInclusive>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:element>

Parent Elements

colorComponent Element, transparency Element

Related Elements

booleanMapping Element, colorMapping Element, dashMapping Element, footnoteMapping Element, formatMapping Element, integerMapping Element, lengthMapping Element, stringMapping Element, symbolMapping Element


dragElement Element

dragElement element,dragElement element,dragElement element

Defines an interaction that allows elements to be dragged from their normal places.

Attributes for dragElement
Attribute | Use | Description | Valid Values
active | optional | If set to false, the controller will be inactive | boolean
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
target | required | The element to allow drag on. | IDREF
dragElement diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="dragElement">
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="active" type="xs:boolean"></xs:attribute>
<xs:attribute name="target" type="xs:IDREF" use="required"></xs:attribute>
</xs:element>

Parent Elements

visualization Element

Related Elements

animation Element, brushing Element, drillDown Element, facetSortController Element, layerController Element, lineGuideController Element, pivotController Element, popup Element, rectangleGuideController Element, swingController Element


drillDown Element

drillDown element,drillDown element,drillDown element

Specifies an action that occurs as a result of clicking a visualization. If the drilldown target is a ViZml file, that ViZml will replace the current visualization. If it is an HTML file, a browser window is opened to show the results.

Attributes for drillDown
Attribute | Use | Description | Valid Values
active | optional | If set to false, the controller will be inactive | boolean
function | optional | Used to construct a function call, such as to provide a JavaScript function for 'onClick'. | string
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
interactionType | optional | The type of interaction that triggers the drill-down action. | onClick. Drill down on a click. onMouseDown. Drill down on the mouse button being pushed down. onMouseUp. Drill down on the mouse button being release. onMouseOver. Drill down if the mouse pointer goes over the glyph. onMouseOut. Drill down when the mouse pointer leaves the glyph.
target | required | An element that should be targeted for drill down. | IDREF
urlBase | optional | If set, the variable used for the drill down has this value prepended to its name and the resulting string is used for the drill down. | string
drillDown diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="drillDown">
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="active" type="xs:boolean"></xs:attribute>
<xs:sequence>
<xs:element ref="vis:variableReference" minOccurs="0" maxOccurs="unbounded"></xs:element>
</xs:sequence>
<xs:attribute name="target" type="xs:IDREF" use="required"></xs:attribute>
<xs:attribute name="function" type="xs:string"></xs:attribute>
<xs:attribute name="interactionType" type="vis:drillDownType">
<xs:enumeration value="onClick"></xs:enumeration>
<xs:enumeration value="onMouseDown"></xs:enumeration>
<xs:enumeration value="onMouseUp"></xs:enumeration>
<xs:enumeration value="onMouseOver"></xs:enumeration>
<xs:enumeration value="onMouseOut"></xs:enumeration>
</xs:attribute>
<xs:attribute name="urlBase" type="xs:string"></xs:attribute>
</xs:element>

Parent Elements

visualization Element

Child Elements

variableReference Element

Related Elements

animation Element, brushing Element, dragElement Element, facetSortController Element, layerController Element, lineGuideController Element, pivotController Element, popup Element, rectangleGuideController Element, swingController Element


edge Element

edge element,edge element,edge element

An edge element. Known in previous versions as the 'link' element

Attributes for edge
Attribute Use Description Valid Values

clip

optional

The type of clipping to apply to the element.

none. Do not clip at all.

cell. Clip to the cell such that the glyph being clipped does not go outside of the cell of the graph.

domain. Clip to the domain. Do not let the bounds of the glyph exceed the domain.

coordinates

optional

Defines the coordinate system within which an element is drawn. If left undefined, the first coordinate system defined by the graph is used. This attribute is intended for only graphs with multiple coordinate systems, such as SPLOMs with histograms on the diagonal.

IDREF

dot

optional

Usually an element's expression is crossed with the faceting, so that blends in the faceting will induce multiple copies of the data in the graph. If this parameter is set to true, the expressions will be dotted together, making fewer copies.

boolean

id

optional

An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one.

ID

labelCollisionHandling

optional

Allows the use of one or more algorithms to avoid collision among labels by moving them slightly around their original positions.

none. Labels will not be moved.

normal. Labels will be moved so as to avoid collisions. A short amount of time will be allocated to this algorithm.

fast. Labels will be moved so as to avoid collisions. A very short amount of time will be allocated to this algorithm; effectively it will not attempt many changes.

quality. Labels will be moved so as to avoid collisions. A long amount of time will be allocated to this algorithm; possibly up to a half second or so.

extreme. Labels will be moved so as to avoid collisions. The process will be allowed to run for a very long period of time; many seconds or so are possible. This option should only be used when time is not important.

outside. Labels will be moved so as to radiate outwards from the center of the cell.

inside. Labels will be moved so as to radiate inwards from the center of the cell.

basic. Labels will be moved so as to avoid collisions. The process will be allowed to run for a very long period of time; many seconds or so are possible. This option should only be used when time is not important.

name

optional

A human-readable string that may be used to name the element in a legend or to be read by a screen reader. If not defined, the ID will be used instead.

string

positionModifier

optional

For elements that would be mapped to the same position, this attribute allows them to be stacked on top of each other, dodged to either side of each other, or have the intersection of their ranges removed form each of them (a difference effect).

none. Do nothing

center. Intervals that are centered will be moved around the center of the dimension

centerStacked. Intervals are stacked, then centered

stack. Elements that are split by a splitting aesthetic will be stacked on top of each other.

stackInterpolating. Deprecated. Please use stack instead. The difference has been eliminated. If items have the same coordinates except possibly for the response dimension, stack them on top of each other. If a value is missing at a given stack location, a linear interpolation will be performed to give it a value.

setMissingsToZero. A simple modifier that converts all missing values to zeros.

minusIntersection. Areas drawn with this modifier are subtracted from each other to create a 'difference area'. Although defined in terms of areas, and intended mainly for use in that element, it will work for all elements.

dodge. Items drawn at exactly the same location will be moved aside so they no longer occlude each other. The center of the set of moved items will be the same location as they originally occupied. This is used to create symmetric dot plots.

pile. Items drawn at exactly the same location will be moved aside so they no longer occlude each other. Instead of being centered at the original location as in 'dodge', they will be piled one on top of each other. This is used to create asymmetric dot plots.

jitterJointUniform. All elements are perturbed randomly along all dimensions using a uniform distribution.

jitterConditionalUniform. All elements are perturbed randomly on the dependent dimension using a uniform distribution.

jitterJointNormal. All elements are perturbed randomly along all dimensions using a normal distribution.

jitterConditionalNormal. All elements are perturbed randomly on the dependent dimension using a normal distribution.

preserveStraightLines

optional

If true, lines are not curved within the space, but drawn straight from defined point to defined point.

boolean

showCollidingLabels

optional

If no label collision handling is attempted, or if labels still collide afterwards, this parameter specifies whether a label will be drawn if it collides with a previously drawn label.

boolean

style

optional

The basic style of this element.

IDREF

xLocation

optional

Sets the x location to a value in [0,1] coordinates. Overrides position and statistic values.

double

yLocation

optional

Sets the y location to a value in [0,1] coordinates. Overrides position and statistic values.

double

zLocation

optional

Sets the z location to a value in [0,1] coordinates. Overrides position and statistic values.

double

zOrder

optional

Integer that determines the order in which items are drawn. If this is not specified, items are drawn in the order they are found in the specification. This has no effect in a 3D chart.

int

edge diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="edge">
<xs:sequence>
<xs:element ref="vis:extension" minOccurs="0" maxOccurs="unbounded"></xs:element>
<xs:element ref="vis:conditionalStyle" minOccurs="0" maxOccurs="unbounded"></xs:element>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:group ref="vis:statistic">
<xs:choice>
<xs:element ref="vis:attach"></xs:element>
<xs:element ref="vis:binStatistic"></xs:element>
<xs:element ref="vis:aggregateStatistic"></xs:element>
<xs:element ref="vis:collectRowsStatistic"></xs:element>
<xs:element ref="vis:replicate"></xs:element>
<xs:element ref="vis:when"></xs:element>
<xs:element ref="vis:distributionStatistic"></xs:element>
<xs:element ref="vis:graphLayoutStatistic"></xs:element>
<xs:element ref="vis:linkStatistic"></xs:element>
<xs:element ref="vis:mapStatistic"></xs:element>
<xs:element ref="vis:regionStatistic"></xs:element>
<xs:element ref="vis:smoothStatistic"></xs:element>
<xs:element ref="vis:fixedWindowDensityStatistic"></xs:element>
<xs:element ref="vis:nearestNeighborDensityStatistic"></xs:element>
<xs:element ref="vis:summaryStatistic"></xs:element>
<xs:element ref="vis:treeLayoutStatistic"></xs:element>
<xs:element ref="vis:tagCloudStatistic"></xs:element>
<xs:element ref="vis:patternLinkStatistic"></xs:element>
<xs:element ref="vis:clusteringStatistic"></xs:element>
<xs:element ref="vis:SOMStatistic"></xs:element>
<xs:element ref="vis:tukeyStatistic"></xs:element>
</xs:choice>
</xs:group>
</xs:sequence>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:group ref="vis:aesthetic">
<xs:choice>
<xs:element ref="vis:visibility"></xs:element>
<xs:element ref="vis:colorComponent"></xs:element>
<xs:element ref="vis:color"></xs:element>
<xs:element ref="vis:dash"></xs:element>
<xs:element ref="vis:labeling"></xs:element>
<xs:element ref="vis:offset"></xs:element>
<xs:element ref="vis:pattern"></xs:element>
<xs:element ref="vis:image"></xs:element>
<xs:element ref="vis:rotation"></xs:element>
<xs:element ref="vis:shape"></xs:element>
<xs:element ref="vis:size"></xs:element>
<xs:element ref="vis:split"></xs:element>
<xs:element ref="vis:styleBy"></xs:element>
<xs:element ref="vis:transparency"></xs:element>
</xs:choice>
</xs:group>
</xs:choice>
<xs:element ref="vis:position" minOccurs="0" maxOccurs="unbounded"></xs:element>
<xs:element ref="vis:x" minOccurs="0"></xs:element>
<xs:element ref="vis:y" minOccurs="0"></xs:element>
<xs:element ref="vis:z" minOccurs="0"></xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="clip">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="none"></xs:enumeration>
<xs:enumeration value="cell"></xs:enumeration>
<xs:enumeration value="domain"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="style" type="xs:IDREF"></xs:attribute>
<xs:attribute name="name" type="xs:string"></xs:attribute>
<xs:attribute name="dot" type="xs:boolean"></xs:attribute>
<xs:attribute name="labelCollisionHandling">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="none"></xs:enumeration>
<xs:enumeration value="normal"></xs:enumeration>
<xs:enumeration value="fast"></xs:enumeration>
<xs:enumeration value="quality"></xs:enumeration>
<xs:enumeration value="extreme"></xs:enumeration>
<xs:enumeration value="outside"></xs:enumeration>
<xs:enumeration value="inside"></xs:enumeration>
<xs:enumeration value="basic"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="showCollidingLabels" type="xs:boolean"></xs:attribute>
<xs:attribute name="coordinates" type="xs:IDREF"></xs:attribute>
<xs:attribute name="positionModifier">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="none"></xs:enumeration>
<xs:enumeration value="center"></xs:enumeration>
<xs:enumeration value="centerStacked"></xs:enumeration>
<xs:enumeration value="stack"></xs:enumeration>
<xs:enumeration value="stackInterpolating"></xs:enumeration>
<xs:enumeration value="setMissingsToZero"></xs:enumeration>
<xs:enumeration value="minusIntersection"></xs:enumeration>
<xs:enumeration value="dodge"></xs:enumeration>
<xs:enumeration value="pile"></xs:enumeration>
<xs:enumeration value="jitterJointUniform"></xs:enumeration>
<xs:enumeration value="jitterConditionalUniform"></xs:enumeration>
<xs:enumeration value="jitterJointNormal"></xs:enumeration>
<xs:enumeration value="jitterConditionalNormal"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="xLocation" type="xs:double"></xs:attribute>
<xs:attribute name="yLocation" type="xs:double"></xs:attribute>
<xs:attribute name="zLocation" type="xs:double"></xs:attribute>
<xs:attribute name="zOrder" type="xs:int"></xs:attribute>
<xs:attribute name="preserveStraightLines" type="xs:boolean"></xs:attribute>
</xs:element>

Parent Elements

graph Element

Child Elements

aggregateStatistic Element, attach Element, binStatistic Element, clusteringStatistic Element, collectRowsStatistic Element, color Element, colorComponent Element, conditionalStyle Element, dash Element, distributionStatistic Element, extension Element, fixedWindowDensityStatistic Element, graphLayoutStatistic Element, image Element, labeling Element, linkStatistic Element, mapStatistic Element, nearestNeighborDensityStatistic Element, offset Element, pattern Element, patternLinkStatistic Element, position Element, regionStatistic Element, replicate Element, rotation Element, shape Element, size Element, smoothStatistic Element, SOMStatistic Element, split Element, styleBy Element, summaryStatistic Element, tagCloudStatistic Element, transparency Element, treeLayoutStatistic Element, tukeyStatistic Element, visibility Element, when Element, x Element, y Element, z Element

Related Elements

area Element, interval Element, line Element, path Element, polygon Element, schema Element


elementVariableReference Element

elementVariableReference element,elementVariableReference element,elementVariableReference element

Defines which variable to use for a faceting, depending on the element that wants it

Attributes for elementVariableReference
Attribute | Use | Description | Valid Values
element | optional | The element that this defines a faceting variable for | IDREF
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
ref | optional | The variable to use for this element | IDREF
elementVariableReference diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="elementVariableReference">
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="element" type="xs:IDREF"></xs:attribute>
<xs:attribute name="ref" type="xs:IDREF"></xs:attribute>
</xs:element>

Parent Elements

variableReference Element


embeddedSource Element

embeddedSource element,embeddedSource element,embeddedSource element

Data that are embedded in the XML.

Attributes for embeddedSource
Attribute Use Description Valid Values

filterToMissing

optional

Determines whether or not the data will be filtered to missing. The default is false

boolean

id

optional

An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one.

ID

missing

optional

offers listwise and variablewise (pairwise) missing value treatment when computing statistics. For VARIABLEWISE (Pairwise), a case is included in statistics for each variable in a function for which it has a valid value (regardless of whether the case has missing values for other variables). For LISTWISE, statistics for all variables used in functions in a graph data set are based on the same cases. Cases with missing values for any variable used in a function in a graph data set are excluded. Pairwise (VARIABLEWISE) is the default.

pairwise. For PAIRWISE, a case is included in statistics for each variable in a function for which it has a valid value (regardless of whether the case has missing values for other variables). PAIRWISE is the default.

listwise. For LISTWISE, statistics for all variables used in functions in a graph data set are based on the same cases. Cases with missing values for any variable used in a function in a graph data set are excluded.

embeddedSource diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="embeddedSource">
<xs:sequence>
<xs:element name="aggregate" minOccurs="0" maxOccurs="1"></xs:element>
<xs:element name="filter" minOccurs="0" maxOccurs="unbounded"></xs:element>
<xs:element name="dataReduction" minOccurs="0" maxOccurs="1"></xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="missing" type="vis:missingDataType">
<xs:enumeration value="pairwise"></xs:enumeration>
<xs:enumeration value="listwise"></xs:enumeration>
</xs:attribute>
<xs:attribute name="filterToMissing" type="xs:boolean"></xs:attribute>
<xs:sequence>
<xs:element name="embeddedMultipleResponseInfo" minOccurs="0" maxOccurs="unbounded"></xs:element>
<xs:element name="names" type="xs:string"></xs:element>
<xs:element name="types" type="xs:string"></xs:element>
<xs:element name="labels" type="xs:string" minOccurs="0" maxOccurs="1"></xs:element>
<xs:element name="labelColumns" type="xs:string" minOccurs="0" maxOccurs="1"></xs:element>
<xs:element name="row" type="xs:string" minOccurs="0" maxOccurs="unbounded"></xs:element>
</xs:sequence>
</xs:element>

Parent Elements

visualization Element

Child Elements

aggregate Element, dataReduction Element, embeddedMultipleResponseInfo Element, filter Element, labelColumns Element, labels Element, names Element, row Element, types Element

Related Elements

databaseSource Element, delimitedFileSource Element, reportSource Element, reshapeSource Element, savFileSource Element, streamingSource Element


aggregate Element

aggregate element,aggregate element,aggregate element

This causes a source to have similar rows aggregated. All non-key variables returned from this source will be summed.

Attributes for aggregate
Attribute | Use | Description | Valid Values
generatedCount | optional | If this attribute is defined, a column will be added to the source giving the count of the number of rows aggregated into a single row. | string
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
keyVariables | required | A semicolon delimited list of variable names that will be used as the aggregation keys. | string
aggregate diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="aggregate" minOccurs="0" maxOccurs="1">
<xs:attribute name="keyVariables" type="xs:string" use="required"></xs:attribute>
<xs:attribute name="generatedCount" type="xs:string"></xs:attribute>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
</xs:element>

Parent Elements

embeddedSource Element


filter Element

filter element,filter element,filter element

An element that reduces the number of rows on the data by checking if the values of a source variable are within a domain.

Attributes for filter
Attribute | Use | Description | Valid Values
domain | optional | The domain to use as criteria for filtering the source. If not defined, missing values will be used as the domain | IDREF
exclude | optional | If true, exclude values in the domain, otherwise include them. | boolean
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
sourceName | optional | Name of the variable within the source. If unspecified, the row index is used. | string
filter diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="filter" minOccurs="0" maxOccurs="unbounded">
<xs:attribute name="sourceName" type="xs:string"></xs:attribute>
<xs:attribute name="domain" type="xs:IDREF"></xs:attribute>
<xs:attribute name="exclude" type="xs:boolean"></xs:attribute>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
</xs:element>

Parent Elements

embeddedSource Element


dataReduction Element

dataReduction element,dataReduction element,dataReduction element

An element that reduces the number of rows on the data

Attributes for dataReduction
Attribute | Use | Description | Valid Values
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
maxRows | optional | The limit of the number of rows to be returned from a data source | integer
weightVariableName | optional | The name of the weight variable used to represent the amount of the data returned | string
dataReduction diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="dataReduction" minOccurs="0" maxOccurs="1">
<xs:attribute name="maxRows" type="xs:integer"></xs:attribute>
<xs:attribute name="weightVariableName" type="xs:string"></xs:attribute>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
</xs:element>

Parent Elements

embeddedSource Element


embeddedMultipleResponseInfo Element

embeddedMultipleResponseInfo element,embeddedMultipleResponseInfo element,embeddedMultipleResponseInfo element

Attributes for embeddedMultipleResponseInfo
Attribute | Use | Description | Valid Values
categoryComponents | optional | If true, the variable coponents are categories, not dichotomous flags which is the default | boolean
components | optional | Defines the multiple response variables in the embedded source; contents are a semicolon-separated list with a backslash used as an escaping character. | string
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
target | optional | Which column this gives multiple response information about | string
embeddedMultipleResponseInfo diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="embeddedMultipleResponseInfo" minOccurs="0" maxOccurs="unbounded">
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="categoryComponents" type="xs:boolean"></xs:attribute>
<xs:attribute name="target" type="xs:string"></xs:attribute>
<xs:attribute name="components" type="xs:string"></xs:attribute>
</xs:element>

Parent Elements

embeddedSource Element


names Element

names element,names element,names element

The names of the columns. This is a semicolon-separated list with a backslash used as an escaping character.

names diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="names" type="xs:string"></xs:element>

Parent Elements

embeddedSource Element


types Element

types element,types element,types element

The types of the columns. This is a semicolon-separated list of the same length as the names, with entries 'int', 'double' and 'string' used to define the types.

types diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="types" type="xs:string"></xs:element>

Parent Elements

embeddedSource Element


labels Element

labels element,labels element,labels element

The labels for the columns. This is a semicolon-seperated list with a backslash used as an escaping charater.

labels diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="labels" type="xs:string" minOccurs="0" maxOccurs="1"></xs:element>

Parent Elements

embeddedSource Element


labelColumns Element

labelColumns element,labelColumns element,labelColumns element

The columns to use for labels for another columns. This is a semicolon-seperated list with a backslash used as an escaping charater.

labelColumns diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="labelColumns" type="xs:string" minOccurs="0" maxOccurs="1"></xs:element>

Parent Elements

embeddedSource Element


row Element

row element,row element,row element

The rows of the data matrix. This is a semicolon separated list of the same length as the names and types with a backslash used as an escaping character. An empty field is treated as missing.

row diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="row" type="xs:string" minOccurs="0" maxOccurs="unbounded"></xs:element>

Parent Elements

embeddedSource Element


expressionVariable Element

expressionVariable element,expressionVariable element,expressionVariable element

Expression variables use a Grammar of Graphics expression to calculate a complex variable. This 'variable' may be multi-dimensional and its use in that case is determined by context. Used as a positional variable (for example, the 'x' value of an element), it may induce faceting. In an aesthetic, only one dimension is likely to be used.

Attributes for expressionVariable
Attribute Use Description Valid Values

categorical

optional

Whether this variable is categorical. If not, and it is not a date, the data values are converted to doubles. The difference between a categorical and non-categorical variable is profound and determines whether it can be used for faceting, the aesthetics with which it can be used, and other purposes. It is legal and often useful to have two variables use the same base data with different values for categorical and/or other attributes.

boolean

creator

optional

The creator of this variable.

string

dependsOn

optional

The DependsOn variable is a variable which is tied to this one. This information is used by controllers to make sure that if they move one of the variables, the tied variable is also moved. As an example, a pivot table controller will move both of the variables at the same time, not allowing them to be moved independently . If a variable is a group for another categorical variable in a table, the group variable should define the categorical variable as a 'dependsOn' variable.

IDREF

description

optional

A description of the variable for human or machine use.

string

domain

optional

All data exist in some domain, and that domain is used to control what the "minimum" and "maximum" values are. By default, the domain of a variable is defined to be the data range (for continuous variables) or the set of unique values of a variable (for categorical variables). If this parameter is specified, the default domain is replaced with this one.

IDREF

domainModifier

optional

The domain modifier defines how the domain is modified.

IDREF

expression

optional

The expression in this attribute should be a legal Grammar of Graphics algebraic expression (with the additional dot operator) based on existing variables and the unity variable '1'.

string

id

optional

Identifies the variable.

ID

key

optional

Indicates the variable can be used as a database key; all entries in it should be unique.

boolean

label

optional

A human-readable name for the variable (defaults to the ID).

string

labelVariable

optional

By default, the values of a categorical variable are used as the labels. If this attribute is specified, the given variable is used to label the categories of this variable. The label variable must be of the same length as this variable, since it matches on a row-by-row basis, and both must be categorical variables.

IDREF

measurementLevel

optional

A hint as to the scale for the data (nominal, ordinal, interval, ratio)

nominal. The only comparisons that can be made between nominal variable values are equality and inequality

ordinal. In this classification, the values can be given a rank order (1st, 2nd, 3rd etc.). Comparisons of greater and less can be made, in addition to equality and inequality

interval. In this classification, equal differences between measurements represent equivalent intervals. Operations such as addition and subtraction are therefore meaningful. The zero point on the scale is, however, arbitrary. Dates are a good example of intervals

ratio. In this classification, the ratios between pairs of numbers is meaningful. Operations such as multiplication and division are therefore meaningful. The zero value on a ratio scale is non-arbitrary

shortLabel

optional

A short human-readable label for the variable (defaults to the label).

string

source

optional

The data source that contains the variables from which this variable is derived.

IDREF

weight

optional

If true, this variable will be used as the weight for all data in the same source. At most one weight may be defined for a source. Statistics will treat these weights as replication weights unless otherwise noted.

boolean

expressionVariable diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="expressionVariable">
<xs:sequence>
<xs:element ref="vis:extension" minOccurs="0" maxOccurs="unbounded"></xs:element>
<xs:element name="aggregation" minOccurs="0"></xs:element>
<xs:element ref="vis:format" minOccurs="0"></xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="categorical" type="xs:boolean"></xs:attribute>
<xs:attribute name="measurementLevel" type="vis:measurementLevel">
<xs:enumeration value="nominal"></xs:enumeration>
<xs:enumeration value="ordinal"></xs:enumeration>
<xs:enumeration value="interval"></xs:enumeration>
<xs:enumeration value="ratio"></xs:enumeration>
</xs:attribute>
<xs:attribute name="label" type="xs:string"></xs:attribute>
<xs:attribute name="shortLabel" type="xs:string"></xs:attribute>
<xs:attribute name="domain" type="xs:IDREF"></xs:attribute>
<xs:attribute name="domainModifier" type="xs:IDREF"></xs:attribute>
<xs:attribute name="labelVariable" type="xs:IDREF"></xs:attribute>
<xs:attribute name="dependsOn" type="xs:IDREF"></xs:attribute>
<xs:attribute name="weight" type="xs:boolean"></xs:attribute>
<xs:attribute name="key" type="xs:boolean"></xs:attribute>
<xs:attribute name="creator" type="xs:string"></xs:attribute>
<xs:attribute name="description" type="xs:string"></xs:attribute>
<xs:attribute name="source" type="xs:IDREF"></xs:attribute>
<xs:attribute name="expression" type="xs:string"></xs:attribute>
</xs:element>

Parent Elements

visualization Element

Child Elements

aggregation Element, extension Element, format Element

Related Elements

derivedVariable Element, multipleResponseVariable Element, sourceVariable Element


aggregation Element

aggregation element,aggregation element,aggregation element

Aggregates categories of a categorical variable based on the sum of values of a different variable.

Attributes for aggregation
Attribute | Use | Description | Valid Values
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
minFraction | required | The fraction (between 0 and 1) that will be used to determine if a category is to be aggregated. If a category has a summed value less than the given fraction of the overall sum, it will be aggregated unless it is the only such category (in which case there is nothing with which to aggregate it!). | any
newCategory | required | The name of the category that is created if any aggregation occurs. | string
sumVariable | optional | The variable whose categories are summed to determine the new category's size. | IDREF
aggregation diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="aggregation" minOccurs="0">
<xs:attribute name="newCategory" type="xs:string" use="required"></xs:attribute>
<xs:attribute name="sumVariable" type="xs:IDREF" use="optional"></xs:attribute>
<xs:attribute name="minFraction" use="required">
<xs:simpleType>
<xs:restriction base="xs:double">
<xs:minInclusive value="0"></xs:minInclusive>
<xs:maxInclusive value="1"></xs:maxInclusive>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
</xs:element>

Parent Elements

expressionVariable Element


extension Element

extension element,extension element,extension element

This element can be used as a simple way to store additional information in the ViZml without requiring an additional schema.

extension diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="extension">
<xs:sequence minOccurs="0" maxOccurs="unbounded"></xs:sequence>
</xs:element>

Parent Elements

area Element, container Element, controlFrame Element, derivedVariable Element, edge Element, expressionVariable Element, graph Element, interval Element, labelFrame Element, legend Element, line Element, multipleResponseVariable Element, path Element, point Element, polygon Element, schema Element, sourceVariable Element, style Element, styleCycle Element, visualization Element


faceting Element

faceting element,faceting element,faceting element

The faceting described by this element's children are applied outside the coordinate system, creating cells in a table of charts. The faceting describes an expression, which is combined with the element's expression (using the method attribute to combine the expressions) to give the final Grammar of Graphics expression for the element.

Attributes for faceting
Attribute | Use | Description | Valid Values
augmentEmptyCells | optional | When a cell is empty (that is, no data exist at a given intersection), the default behavior is to not display anything at that location. This option changes the behavior to make sure that the cell "exists". True means that the cells are augmented. | boolean
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
method | optional | How to combine the faceting with the main element expressions | string
faceting diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="faceting">
<xs:sequence>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:group ref="vis:statistic">
<xs:choice>
<xs:element ref="vis:attach"></xs:element>
<xs:element ref="vis:binStatistic"></xs:element>
<xs:element ref="vis:aggregateStatistic"></xs:element>
<xs:element ref="vis:collectRowsStatistic"></xs:element>
<xs:element ref="vis:replicate"></xs:element>
<xs:element ref="vis:when"></xs:element>
<xs:element ref="vis:distributionStatistic"></xs:element>
<xs:element ref="vis:graphLayoutStatistic"></xs:element>
<xs:element ref="vis:linkStatistic"></xs:element>
<xs:element ref="vis:mapStatistic"></xs:element>
<xs:element ref="vis:regionStatistic"></xs:element>
<xs:element ref="vis:smoothStatistic"></xs:element>
<xs:element ref="vis:fixedWindowDensityStatistic"></xs:element>
<xs:element ref="vis:nearestNeighborDensityStatistic"></xs:element>
<xs:element ref="vis:summaryStatistic"></xs:element>
<xs:element ref="vis:treeLayoutStatistic"></xs:element>
<xs:element ref="vis:tagCloudStatistic"></xs:element>
<xs:element ref="vis:patternLinkStatistic"></xs:element>
<xs:element ref="vis:clusteringStatistic"></xs:element>
<xs:element ref="vis:SOMStatistic"></xs:element>
<xs:element ref="vis:tukeyStatistic"></xs:element>
</xs:choice>
</xs:group>
</xs:choice>
<xs:choice maxOccurs="unbounded">
<xs:element ref="vis:variableReference"></xs:element>
<xs:element ref="vis:unity"></xs:element>
<xs:element ref="vis:blend"></xs:element>
<xs:element ref="vis:cross"></xs:element>
<xs:element ref="vis:dot"></xs:element>
<xs:element ref="vis:nest"></xs:element>
<xs:element ref="vis:layer"></xs:element>
</xs:choice>
</xs:sequence>
<xs:attribute name="method" type="xs:string"></xs:attribute>
<xs:attribute name="augmentEmptyCells" type="xs:boolean"></xs:attribute>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
</xs:element>

Parent Elements

graph Element

Child Elements

aggregateStatistic Element, attach Element, binStatistic Element, blend Element, clusteringStatistic Element, collectRowsStatistic Element, cross Element, distributionStatistic Element, dot Element, fixedWindowDensityStatistic Element, graphLayoutStatistic Element, layer Element, linkStatistic Element, mapStatistic Element, nearestNeighborDensityStatistic Element, nest Element, patternLinkStatistic Element, regionStatistic Element, replicate Element, smoothStatistic Element, SOMStatistic Element, summaryStatistic Element, tagCloudStatistic Element, treeLayoutStatistic Element, tukeyStatistic Element, unity Element, variableReference Element, when Element


facetSortController Element

facetSortController element,facetSortController element,facetSortController element

Specifies the graph with faceting to be used for the facet sort controller.

Attributes for facetSortController
Attribute | Use | Description | Valid Values
active | optional | If set to false, the controller will be inactive | boolean
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
target | required | A graph to be targeted for sorting of facets. | IDREF
facetSortController diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="facetSortController">
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="active" type="xs:boolean"></xs:attribute>
<xs:attribute name="target" type="xs:IDREF" use="required"></xs:attribute>
</xs:element>

Parent Elements

visualization Element

Related Elements

animation Element, brushing Element, dragElement Element, drillDown Element, layerController Element, lineGuideController Element, pivotController Element, popup Element, rectangleGuideController Element, swingController Element


fixedWindowDensityStatistic Element

fixedWindowDensityStatistic element,fixedWindowDensityStatistic element,fixedWindowDensityStatistic element

A kernel density estimate that uses a fixed window width.

Attributes for fixedWindowDensityStatistic
Attribute | Use | Description | Valid Values
bounded | optional | Sets whether or not the model is bounded. If true, then the model is bounded. | boolean
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
kernel | optional | The type of kernel to use. | uniform. Specifies that a uniform kernel should be used. epanechnikov. Specifies that a Epanechnikov kernel should be used. biweight. Specifies that a biweight kernel should be used. triweight. Specifies that a triweight kernel should be used. tricube. Specifies that a tricube kernel should be used. gaussian. Specifies that a Gaussian kernel should be used. cauchy. Specifies that a Cauchy kernel should be used.
marron | optional | Whether or not to use the Marron adjustment for discrete data. | boolean
proportion | optional | The proportion of the data to use for kernel window size. | any
segments | optional | The number of segments to predict. | integer
fixedWindowDensityStatistic diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="fixedWindowDensityStatistic">
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="kernel" type="vis:kernelType">
<xs:enumeration value="uniform"></xs:enumeration>
<xs:enumeration value="epanechnikov"></xs:enumeration>
<xs:enumeration value="biweight"></xs:enumeration>
<xs:enumeration value="triweight"></xs:enumeration>
<xs:enumeration value="tricube"></xs:enumeration>
<xs:enumeration value="gaussian"></xs:enumeration>
<xs:enumeration value="cauchy"></xs:enumeration>
</xs:attribute>
<xs:attribute name="marron" type="xs:boolean"></xs:attribute>
<xs:attribute name="segments" type="xs:integer"></xs:attribute>
<xs:attribute name="bounded" type="xs:boolean"></xs:attribute>
<xs:attribute name="proportion">
<xs:simpleType>
<xs:restriction base="xs:double">
<xs:minExclusive value="0"></xs:minExclusive>
<xs:maxInclusive value="1"></xs:maxInclusive>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:element>

Parent Elements

area Element, edge Element, faceting Element, interval Element, line Element, path Element, point Element, polygon Element, schema Element

Related Elements

nearestNeighborDensityStatistic Element


footnoteMapping Element

footnoteMapping element,footnoteMapping element,footnoteMapping element

Specifies a mapping from a category to a footnote.

Attributes for footnoteMapping
Attribute | Use | Description | Valid Values
definesReference | optional | Defines a footnote reference. | string
from | required | Category that is mapped to a specific value of the aesthetic. | string
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
to | required | A string representing an footnote symbol. | string
footnoteMapping diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="footnoteMapping">
<xs:attribute name="from" type="xs:string" use="required"></xs:attribute>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="to" type="xs:string" use="required"></xs:attribute>
<xs:attribute name="definesReference" type="xs:string"></xs:attribute>
</xs:element>

Parent Elements

footnotes Element

Related Elements

booleanMapping Element, colorMapping Element, dashMapping Element, doubleMapping Element, formatMapping Element, integerMapping Element, lengthMapping Element, stringMapping Element, symbolMapping Element


footnotes Element

footnotes element,footnotes element,footnotes element

Maps a variable to footnotes.

Attributes for footnotes
Attribute | Use | Description | Valid Values
clamp | optional | If true, values off the edges of the domain will be pegged to low or high values, not ignored. | boolean
dimension | optional | If the variable is an expression that contains more than one dimension of data (for example, the expression contained a cross of other variables), then this attribute specifies which of the variable's dimensions to use. The first is numbered 0, then 1, 2, etc. | nonNegativeInteger
domain | optional | If specified, this domain will be used to define the domain of the variable rather than the variable's default domain. For example, a user might choose to map 0 to black and 1 to white even if the data only run from 0.3 to 0.7. In this case a domain of [0,1] would be specified for the aesthetic. | IDREF
domainModifier | optional | The domain modifier defines how the domain is modified. | IDREF
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
index | optional | The labeling that the footnotes should be applied to. | nonNegativeInteger
split | optional | If true, distinct values of the variable will have statistics computed on them independently. | boolean
superscript | optional | Whether the footnotes should be superscripts or subscripts | boolean
variable | optional | Referers to a data variable. The values of this variable will be mapped to aesthetic values used to display the element. | IDREF
footnotes diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="footnotes">
<xs:sequence>
<xs:element ref="vis:scale" minOccurs="0"></xs:element>
<xs:element ref="vis:summaryStatistic" minOccurs="0"></xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="domainModifier" type="xs:IDREF"></xs:attribute>
<xs:attribute name="variable" type="xs:IDREF"></xs:attribute>
<xs:attribute name="dimension" type="xs:nonNegativeInteger"></xs:attribute>
<xs:attribute name="domain" type="xs:IDREF"></xs:attribute>
<xs:attribute name="clamp" type="xs:boolean"></xs:attribute>
<xs:attribute name="split" type="xs:boolean"></xs:attribute>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element ref="vis:footnoteMapping" minOccurs="0"></xs:element>
</xs:sequence>
<xs:attribute name="superscript" type="xs:boolean"></xs:attribute>
<xs:attribute name="index" type="xs:nonNegativeInteger"></xs:attribute>
</xs:element>

Parent Elements

labeling Element

Child Elements

footnoteMapping Element, scale Element, summaryStatistic Element

Related Elements

color Element, colorComponent Element, dash Element, formatting Element, image Element, labeling Element, labelLocation Element, offset Element, pattern Element, rotation Element, shape Element, size Element, split Element, styleBy Element, transparency Element, visibility Element


format Element

format element,format element,format element

A format for text, numbers, or dates for this domain.

Attributes for format
Attribute Use Description Valid Values

baseFormat

optional

This defines the base format. A dateTime may be just a date, just a time, or may be both. Default values of all fields will be chosen based on the locale and on the value of this field.

date. Format using just the date.

time. Format using just the time.

dateTime. Format using both date and time.

elapsedTime. Format using elapsed time.

dayOfMonthPadding

optional

If true, this field will be padded.

boolean

dayOfWeekAbbreviation

optional

Whether or not to abbreviate the day of the week.

boolean

dayPadding

optional

If true, day field will be padded.

boolean

dayType

optional

Whether to show the day as day within month or day within year.

month. Show the day of month. February 1 = 1

year. Show the day of year. February 1 = 32

errorCharacter

optional

A character to use to replace digits when the number cannot be represented given the constraints of the format.

string

hiddenseparator

optional

remove separator characters from output string(if not, include separator)

boolean

hideNegatives

optional

If true, negative values are shown as their absolute values.

boolean

hourFormat

optional

Choice of hour display method, in am/pm style (1pm), 24-hour style (13) or 12-hour style (1).

AMPM. Show the time of day in an AM/PM format. Midnight = 12:00am, Noon = 12:00pm

AS_24. Show the time of day in 24 hour format. Midnight = 24:00, Noon = 12:00

AS_12. Show the time of day without indicating morning or afternoon. Midnight = 12:00, Noon = 12:00

hourPadding

optional

If true, this field will be padded.

boolean

id

optional

An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one.

ID

maximumFractionDigits

optional

Maximum number of digits to display in the fractional part of a decimal or scientific representation.

nonNegativeInteger

maximumIntegerDigits

optional

Maximum number of digits to display in the integer part of a decimal representation.

nonNegativeInteger

mdyOrder

optional

This defines the order of the date format, using days, months, and years.

dayMonthYear. Format using the order of day, month, then year.

dayYearMonth. Format using the order of day, year, then month.

monthDayYear. Format using the order of month, day then year.

monthYearDay. Format using the order of month, year, then day.

yearDayMonth. Format using the order of year, day, then month.

yearMonthDay. Format using the order of year, month, then day.

minimumFractionDigits

optional

Minimum number of digits to display in the fractional part of a decimal or scientific representation.

nonNegativeInteger

minimumIntegerDigits

optional

Minimum number of digits to display in the integer part of a decimal representation.

nonNegativeInteger

minutePadding

optional

If true, this field will be padded.

boolean

monthFormat

optional

Format for the month: short (Mar), long (March), number (3), or paddedNumber (03).

short. Use the short form of the month. January = Jan.

long. Use the long form of the month. January = January.

number. Use the numeric form of the month. January = 1.

paddedNumber. Use the numeric form of the month, padded to be the same length. January = 01

negativesInParentheses

optional

If true, negative values will be indicated by parentheses rather than the negative sign.

boolean

negativesOutside

optional

If true, negative sign or parentheses will be shown outside the prefix/suffix.

boolean

prefix

optional

Prepend the value with this string.

string

quarterPrefix

optional

Add a prefix for the quarter (e.g., 'Q' to get Q1, Q2, Q3, Q4).

string

quarterSuffix

optional

Add a suffix for the quarter (e.g., 'q' to get 1q, 2q, 3q, 4q).

string

relabelsArePreformatted

optional

If true, any values resulting from relabeling (from a relabel element or the labelingVariable attribute) will not get any further formatting.

boolean

scalingFactor

optional

A number which will be divided into the data before formatting. A typical use would be to specify scalingFactor="1000000" and suffix="millions" or scalingFactor="0.001" and suffix="millis".

double

scientific

optional

Whether, and how, to use scientific notation.

true. Always use scientific notation.

false. Never use scientific notation.

onlyForSmall. Only use scientific notation on values smaller than the small threshold.

whenNeeded. Only use scientific notation if there is not enough room to use decimal format.

secondPadding

optional

If true, this field will be padded.

boolean

separatorChars

optional

This is a positional string. It must be 4 characters long. The first character is the decimal seperater, the second character is the group (thousands) seperater. The third position is the date seperater, and the fourth position is the time seperater. For example, if the format should be 1.000.000,25 as a number, and 04-05-07 12.00 as the date and time, then the string would be ",.-."

string

showDay

optional

Whether or not to show this time field.

boolean

showDayOfWeek

optional

Whether or not days of the week will be shown.

boolean

showEra

optional

Whether or not to show this time field.

boolean

showHour

optional

Whether or not to show this time field.

boolean

showMillis

optional

Whether or not to show this time field.

boolean

showMinute

optional

Whether or not to show this time field.

boolean

showMonth

optional

Whether or not to show this time field.

boolean

showQuarter

optional

Whether or not to show this time field.

boolean

showSecond

optional

Whether or not to show this time field.

boolean

showWeek

optional

Whether or not to show this time field.

boolean

showYear

optional

Whether or not to show this time field.

boolean

small

optional

Values smaller (nearer zero) than this value will be shown in scientific notation when onlyForSmallValues is true.

double

suffix

optional

Append the value with this string.

string

tryStringsAsNumbers

optional

If true,the string values will try to parse into integer values, so that 1000000 would be shown as 1,000,000.

boolean

useGrouping

optional

If true, grouping characters will be inserted for large integer values, so that 1000000 would be shown as 1,000,000.

boolean

weekPadding

optional

If true, this field will be padded.

boolean

weekSuffix

optional

Add a suffix for the week (e.g., 'WK' to get 1 WK, 2 WK, 3 WK,...).

string

yearAbbreviation

optional

Whether or not to abbreviate the year (drop century or not).

boolean

format diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="format">
<xs:sequence minOccurs="0" maxOccurs="1">
<xs:element name="affix" minOccurs="1" maxOccurs="unbounded"></xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="separatorChars" type="xs:string"></xs:attribute>
<xs:attribute name="hiddenseparator" type="xs:boolean"></xs:attribute>
<xs:attribute name="prefix" type="xs:string"></xs:attribute>
<xs:attribute name="suffix" type="xs:string"></xs:attribute>
<xs:sequence>
<xs:element name="unitRule" minOccurs="0" maxOccurs="unbounded"></xs:element>
<xs:element ref="vis:relabel" minOccurs="0" maxOccurs="unbounded"></xs:element>
</xs:sequence>
<xs:attribute name="tryStringsAsNumbers" type="xs:boolean"></xs:attribute>
<xs:attribute name="relabelsArePreformatted" type="xs:boolean"></xs:attribute>
<xs:attribute name="baseFormat">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="date"></xs:enumeration>
<xs:enumeration value="time"></xs:enumeration>
<xs:enumeration value="dateTime"></xs:enumeration>
<xs:enumeration value="elapsedTime"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="scientific">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="true"></xs:enumeration>
<xs:enumeration value="false"></xs:enumeration>
<xs:enumeration value="onlyForSmall"></xs:enumeration>
<xs:enumeration value="whenNeeded"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="small" type="xs:double"></xs:attribute>
<xs:attribute name="errorCharacter" type="xs:string"></xs:attribute>
<xs:attribute name="minimumFractionDigits" type="xs:nonNegativeInteger"></xs:attribute>
<xs:attribute name="maximumFractionDigits" type="xs:nonNegativeInteger"></xs:attribute>
<xs:attribute name="minimumIntegerDigits" type="xs:nonNegativeInteger"></xs:attribute>
<xs:attribute name="maximumIntegerDigits" type="xs:nonNegativeInteger"></xs:attribute>
<xs:attribute name="useGrouping" type="xs:boolean"></xs:attribute>
<xs:attribute name="hideNegatives" type="xs:boolean"></xs:attribute>
<xs:attribute name="negativesOutside" type="xs:boolean"></xs:attribute>
<xs:attribute name="scalingFactor" type="xs:double"></xs:attribute>
<xs:attribute name="negativesInParentheses" type="xs:boolean"></xs:attribute>
<xs:attribute name="mdyOrder">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="dayMonthYear"></xs:enumeration>
<xs:enumeration value="dayYearMonth"></xs:enumeration>
<xs:enumeration value="monthDayYear"></xs:enumeration>
<xs:enumeration value="monthYearDay"></xs:enumeration>
<xs:enumeration value="yearDayMonth"></xs:enumeration>
<xs:enumeration value="yearMonthDay"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="dayOfMonthPadding" type="xs:boolean"></xs:attribute>
<xs:attribute name="weekPadding" type="xs:boolean"></xs:attribute>
<xs:attribute name="dayPadding" type="xs:boolean"></xs:attribute>
<xs:attribute name="hourPadding" type="xs:boolean"></xs:attribute>
<xs:attribute name="minutePadding" type="xs:boolean"></xs:attribute>
<xs:attribute name="secondPadding" type="xs:boolean"></xs:attribute>
<xs:attribute name="showEra" type="xs:boolean"></xs:attribute>
<xs:attribute name="showYear" type="xs:boolean"></xs:attribute>
<xs:attribute name="showQuarter" type="xs:boolean"></xs:attribute>
<xs:attribute name="showMonth" type="xs:boolean"></xs:attribute>
<xs:attribute name="showWeek" type="xs:boolean"></xs:attribute>
<xs:attribute name="showDay" type="xs:boolean"></xs:attribute>
<xs:attribute name="showHour" type="xs:boolean"></xs:attribute>
<xs:attribute name="showMinute" type="xs:boolean"></xs:attribute>
<xs:attribute name="showSecond" type="xs:boolean"></xs:attribute>
<xs:attribute name="showMillis" type="xs:boolean"></xs:attribute>
<xs:attribute name="dayOfWeekAbbreviation" type="xs:boolean"></xs:attribute>
<xs:attribute name="yearAbbreviation" type="xs:boolean"></xs:attribute>
<xs:attribute name="quarterPrefix" type="xs:string"></xs:attribute>
<xs:attribute name="quarterSuffix" type="xs:string"></xs:attribute>
<xs:attribute name="weekSuffix" type="xs:string"></xs:attribute>
<xs:attribute name="dayType">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="month"></xs:enumeration>
<xs:enumeration value="year"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="hourFormat">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="AMPM"></xs:enumeration>
<xs:enumeration value="AS_24"></xs:enumeration>
<xs:enumeration value="AS_12"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="monthFormat">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="short"></xs:enumeration>
<xs:enumeration value="long"></xs:enumeration>
<xs:enumeration value="number"></xs:enumeration>
<xs:enumeration value="paddedNumber"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="showDayOfWeek" type="xs:boolean"></xs:attribute>
</xs:element>

Parent Elements

description Element, categoricalDomain Element, derivedVariable Element, expressionVariable Element, formatMapping Element, intervalDomain Element, description Element, labeling Element, majorTicks Element, multipleResponseVariable Element, tokenMapping Element, setFormat Element, sourceVariable Element

Child Elements

affix Element, unitRule Element, relabel Element


affix Element

affix element,affix element,affix element

Defines an affix (prefix or suffix) to be added when formatting.

Attributes for affix
Attribute | Use | Description | Valid Values
definesReference | optional | A reference string for the affix. | string
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
position | optional | Apply a position for the text. | superscript. The text should be above the line. subscript. The text should be below the line. normal. The text should be even with the line (default).
suffix | optional | If it is a suffix (if not, it is a prefix) | boolean
value | required | The value to affix | string
affix diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="affix" minOccurs="1" maxOccurs="unbounded">
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="value" type="xs:string" use="required"></xs:attribute>
<xs:attribute name="suffix" type="xs:boolean"></xs:attribute>
<xs:attribute name="position">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="superscript"></xs:enumeration>
<xs:enumeration value="subscript"></xs:enumeration>
<xs:enumeration value="normal"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="definesReference" type="xs:string"></xs:attribute>
</xs:element>

Parent Elements

format Element


unitRule Element

unitRule element,unitRule element,unitRule element

Specifies a rule to use for abbreviating a number. When such a rule is applied, it overrides the numberFormat's scaling factor and replaces its suffix and prefix if defined in the rule; otherwise, the suffix and prefix are left alone.

Attributes for unitRule
Attribute | Use | Description | Valid Values
factor | required | The strictly positive value used to scale the number to be formatted. This rule may only be applied if the result has a non-zero integer part. | double
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
prefix | optional | When this rule is applied, this string replaces the numberFormat's prefix. | string
suffix | optional | When this rule is applied, this string replaces the numberFormat's suffix. | string
unitRule diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="unitRule" minOccurs="0" maxOccurs="unbounded">
<xs:attribute name="factor" type="xs:double" use="required"></xs:attribute>
<xs:attribute name="prefix" type="xs:string"></xs:attribute>
<xs:attribute name="suffix" type="xs:string"></xs:attribute>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
</xs:element>

Parent Elements

format Element


formatMapping Element

formatMapping element,formatMapping element,formatMapping element

Maps a category to a format.

Attributes for formatMapping
Attribute | Use | Description | Valid Values
from | required | Category that is mapped to a specific value of the aesthetic. | string
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
formatMapping diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="formatMapping">
<xs:attribute name="from" type="xs:string" use="required"></xs:attribute>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:sequence>
<xs:element ref="vis:format" minOccurs="1" maxOccurs="1"></xs:element>
</xs:sequence>
</xs:element>

Parent Elements

formatting Element

Child Elements

format Element

Related Elements

booleanMapping Element, colorMapping Element, dashMapping Element, doubleMapping Element, footnoteMapping Element, integerMapping Element, lengthMapping Element, stringMapping Element, symbolMapping Element


formatting Element

formatting element,formatting element,formatting element

Maps a variable to a set of formats.

Attributes for formatting
Attribute | Use | Description | Valid Values
clamp | optional | If true, values off the edges of the domain will be pegged to low or high values, not ignored. | boolean
dimension | optional | If the variable is an expression that contains more than one dimension of data (for example, the expression contained a cross of other variables), then this attribute specifies which of the variable's dimensions to use. The first is numbered 0, then 1, 2, etc. | nonNegativeInteger
domain | optional | If specified, this domain will be used to define the domain of the variable rather than the variable's default domain. For example, a user might choose to map 0 to black and 1 to white even if the data only run from 0.3 to 0.7. In this case a domain of [0,1] would be specified for the aesthetic. | IDREF
domainModifier | optional | The domain modifier defines how the domain is modified. | IDREF
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
split | optional | If true, distinct values of the variable will have statistics computed on them independently. | boolean
variable | optional | Referers to a data variable. The values of this variable will be mapped to aesthetic values used to display the element. | IDREF
formatting diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="formatting">
<xs:sequence>
<xs:element ref="vis:scale" minOccurs="0"></xs:element>
<xs:element ref="vis:summaryStatistic" minOccurs="0"></xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="domainModifier" type="xs:IDREF"></xs:attribute>
<xs:attribute name="variable" type="xs:IDREF"></xs:attribute>
<xs:attribute name="dimension" type="xs:nonNegativeInteger"></xs:attribute>
<xs:attribute name="domain" type="xs:IDREF"></xs:attribute>
<xs:attribute name="clamp" type="xs:boolean"></xs:attribute>
<xs:attribute name="split" type="xs:boolean"></xs:attribute>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element ref="vis:formatMapping" minOccurs="0"></xs:element>
</xs:sequence>
</xs:element>

Parent Elements

labeling Element

Child Elements

formatMapping Element, scale Element, summaryStatistic Element

Related Elements

color Element, colorComponent Element, dash Element, footnotes Element, image Element, labeling Element, labelLocation Element, offset Element, pattern Element, rotation Element, shape Element, size Element, split Element, styleBy Element, transparency Element, visibility Element


frameGuide Element

frameGuide element,frameGuide element,frameGuide element

A wire frame in 3D. The complete property determines whether or not to draw the part of the frame that is in front.

Attributes for frameGuide
Attribute | Use | Description | Valid Values
complete | optional | Whether or not to draw the part of the frame that is front. | boolean
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
name | optional | The name of the guide. The name is a human-readable string that may be used to name the guide in a legend or to be read by a screen reader. If not defined, the ID will be used instead. | string
style | optional | The style for this guide. | IDREF
zOrder | optional | Integer that determines the order in which items are drawn. If this is not specified, items are drawn in the order they are found in the specification. | int
frameGuide diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="frameGuide">
<xs:sequence>
<xs:element ref="vis:label" minOccurs="0" maxOccurs="unbounded"></xs:element>
<xs:element ref="vis:conditionalStyle" minOccurs="0" maxOccurs="unbounded"></xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="name" type="xs:string"></xs:attribute>
<xs:attribute name="style" type="xs:IDREF"></xs:attribute>
<xs:attribute name="zOrder" type="xs:int"></xs:attribute>
<xs:attribute name="complete" type="xs:boolean"></xs:attribute>
</xs:element>

Parent Elements

graph Element

Child Elements

conditionalStyle Element, label Element

Related Elements

functionGuide Element, lineGuide Element, planeGuide Element, pointGuide Element, rectangleGuide Element


functionGuide Element

functionGuide element,functionGuide element,functionGuide element

A function guide that plots a line or surface in terms of an equation. The function guide has properties for the different dimensions (x, y, z). The numberPoints attribute is used to control how many points are used in drawing the line.

Attributes for functionGuide
Attribute | Use | Description | Valid Values
coordinates | optional | Defines the coordinate system within which an element is drawn. If left undefined, the first coordinate system defined by the graph is used. This attribute is intended for only graphs with multiple coordinate systems, such as SPLOMs with histograms on the diagonal. | IDREF
expandToFit | optional | If true, the range should be expanded to fit this guide. | boolean
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
name | optional | The name of the guide. The name is a human-readable string that may be used to name the guide in a legend or to be read by a screen reader. If not defined, the ID will be used instead. | string
segments | optional | The number of segments to use in drawing the line that corresponds to the function. | int
style | optional | The style for this guide. | IDREF
value | optional | The equation for the y dimension. | string
y | optional | Deprecated: Use 'value' instead | string
zOrder | optional | Integer that determines the order in which items are drawn. If this is not specified, items are drawn in the order they are found in the specification. | int
functionGuide diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="functionGuide">
<xs:sequence>
<xs:element ref="vis:label" minOccurs="0" maxOccurs="unbounded"></xs:element>
<xs:element ref="vis:conditionalStyle" minOccurs="0" maxOccurs="unbounded"></xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="name" type="xs:string"></xs:attribute>
<xs:attribute name="style" type="xs:IDREF"></xs:attribute>
<xs:attribute name="zOrder" type="xs:int"></xs:attribute>
<xs:attribute name="value" type="xs:string"></xs:attribute>
<xs:attribute name="y" type="xs:string"></xs:attribute>
<xs:attribute name="segments" type="xs:int"></xs:attribute>
<xs:attribute name="expandToFit" type="xs:boolean"></xs:attribute>
<xs:attribute name="coordinates" type="xs:IDREF"></xs:attribute>
</xs:element>

Parent Elements

graph Element

Child Elements

conditionalStyle Element, label Element

Related Elements

frameGuide Element, lineGuide Element, planeGuide Element, pointGuide Element, rectangleGuide Element


graph Element

graph element,graph element,graph element

A frame that defines coordinates, elements, aesthetics, and other entities to produce a statistical graph.

Attributes for graph
Attribute | Use | Description | Valid Values
alignCellHorizontallyWith | optional | Defines the graph that this graph is aligned to horizontally. When graphs are aligned horizontally, they are aligned on the inner cell (along the axis lines, not including tickmarks and ticklabels), and the ticks on the "Y" axis will align exactly (provided the "Y" dimensions are given the same domain). | IDREF
alignCellVerticallyWith | optional | Defines the graph that this graph is aligned to vertically. When graphs are aligned vertically, they are aligned on the inner cell (along the axis lines, not including tickmarks and ticklabels), and the ticks on the "X" axis will align exactly (provided the "X" dimensions are given the same domain). | IDREF
axesOutside | optional | Defines whether to draw axes outside the frame when possible. | boolean
cellStyle | optional | The style for the cell frame (inner frame). | IDREF
clip | optional | If true, the frame clips contents so they do not overflow its bounds. The default behavior may vary based on the contents of the frame. | boolean
id | optional | Identifier for this frame. The identifier must be unique within the document and is required only when another element must reference this one. Can be used as the value for a target so other frames can define their locations relative to this one. | ID
style | optional | The frame is drawn with this style before any of its contents are drawn. | IDREF
graph diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="graph">
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element ref="vis:extension" minOccurs="0" maxOccurs="unbounded"></xs:element>
<xs:element ref="vis:location" minOccurs="0" maxOccurs="unbounded"></xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="style" type="xs:IDREF"></xs:attribute>
<xs:attribute name="clip" type="xs:boolean"></xs:attribute>
<xs:sequence>
<xs:element ref="vis:coordinates" minOccurs="0" maxOccurs="unbounded"></xs:element>
<xs:element ref="vis:faceting" minOccurs="0"></xs:element>
<xs:element name="facetLayout" minOccurs="0">
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element ref="vis:tableLayout" minOccurs="0"></xs:element>
<xs:element name="facetLevel" minOccurs="0">
<xs:sequence minOccurs="0" maxOccurs="2">
<xs:element ref="vis:axis"></xs:element>
</xs:sequence>
</xs:element>
<xs:element ref="vis:setCellProperties" minOccurs="0"></xs:element>
</xs:sequence>
</xs:element>
<xs:group ref="vis:element" minOccurs="0" maxOccurs="unbounded">
<xs:choice>
<xs:element ref="vis:area"></xs:element>
<xs:element ref="vis:interval"></xs:element>
<xs:element ref="vis:line"></xs:element>
<xs:element ref="vis:edge"></xs:element>
<xs:element ref="vis:path"></xs:element>
<xs:element ref="vis:point"></xs:element>
<xs:element ref="vis:polygon"></xs:element>
<xs:element ref="vis:schema"></xs:element>
</xs:choice>
</xs:group>
<xs:group ref="vis:guide" minOccurs="0" maxOccurs="unbounded">
<xs:choice>
<xs:element ref="vis:frameGuide"></xs:element>
<xs:element ref="vis:functionGuide"></xs:element>
<xs:element ref="vis:lineGuide"></xs:element>
<xs:element ref="vis:rectangleGuide"></xs:element>
<xs:element ref="vis:planeGuide"></xs:element>
<xs:element ref="vis:pointGuide"></xs:element>
</xs:choice>
</xs:group>
</xs:sequence>
<xs:attribute name="cellStyle" type="xs:IDREF"></xs:attribute>
<xs:attribute name="axesOutside" type="xs:boolean"></xs:attribute>
<xs:attribute name="alignCellHorizontallyWith" type="xs:IDREF"></xs:attribute>
<xs:attribute name="alignCellVerticallyWith" type="xs:IDREF"></xs:attribute>
</xs:element>

Parent Elements

container Element, visualization Element

Child Elements

facetLayout Element, area Element, coordinates Element, edge Element, extension Element, faceting Element, frameGuide Element, functionGuide Element, interval Element, line Element, lineGuide Element, location Element, path Element, planeGuide Element, point Element, pointGuide Element, polygon Element, rectangleGuide Element, schema Element

Related Elements

container Element, controlFrame Element, labelFrame Element, legend Element, visualization Element


facetLayout Element

facetLayout element,facetLayout element,facetLayout element

A description of how to label and lay out levels of a facet.

Attributes for facetLayout
Attribute Use Description Valid Values

alternatingColor

optional

Deprecated. Please use the alternating rule in setCellProperties instead.

string

cellAspect

optional

If set, forces each cell to be the given aspect ratio.

double

cellSize

optional

If set to a length, requires cells to have this size. If the aspect ratio is not set, it is assumed to be 1. Note that if the overall graph size is set, this value may be ignored as the overall size is taken to be more important.

string

id

optional

An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one.

ID

method

optional

The overall method of laying out the cells.

structured. Lay out in a table-like format.

unstructured. Lay out as a single long list, wrapped into the available space.

transposed. Lay out in a table-like format, however start the layout vertically rather than horizontally.

coordinates. Lay out according to their coordinate position (x,y). An example would be facets laid out by longitude (x) and latitude (y).

topDown

optional

Denotes whether to require a layout to be top-down (table-like) as opposed to bottom-up (chart-like).

boolean

verticalTitlesInCorner

optional

If true, and there is no corner label, then vertical axes will have their titles moved to the corner.

boolean

facetLayout diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="facetLayout" minOccurs="0">
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element ref="vis:tableLayout" minOccurs="0"></xs:element>
<xs:element name="facetLevel" minOccurs="0">
<xs:sequence minOccurs="0" maxOccurs="2">
<xs:element ref="vis:axis"></xs:element>
</xs:sequence>
</xs:element>
<xs:element ref="vis:setCellProperties" minOccurs="0"></xs:element>
</xs:sequence>
<xs:attribute name="verticalTitlesInCorner" type="xs:boolean"></xs:attribute>
<xs:attribute name="cellAspect" type="xs:double"></xs:attribute>
<xs:attribute name="alternatingColor" type="xs:string"></xs:attribute>
<xs:attribute name="cellSize" type="xs:string"></xs:attribute>
<xs:attribute name="topDown" type="xs:boolean"></xs:attribute>
<xs:attribute name="method">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="structured"></xs:enumeration>
<xs:enumeration value="unstructured"></xs:enumeration>
<xs:enumeration value="transposed"></xs:enumeration>
<xs:enumeration value="coordinates"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
</xs:element>

Parent Elements

graph Element

Child Elements

facetLevel Element, setCellProperties Element, tableLayout Element


facetLevel Element

facetLevel element,facetLevel element,facetLevel element

Controls the layout and style of the facets and provides a place on facet dimensions for axes to be defined.

Attributes for facetLevel
Attribute | Use | Description | Valid Values
gap | optional | The total gap to leave between cells at this level. If expressed in absolute coordinates, care must be taken to ensure the size is not larger than the size of the cell. | length
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
level | required | The level of the faceting to which facetLevel applies. It is legal to specify levels that are not present in the chart; they will simply be ignored. Level 1 is the first dimension (the level in a simple paneled chart); level 2 is the next dimension in a 2-way table, and so on. | positiveInteger
style | optional | Style for the cells at this level of faceting. | IDREF
zOrder | optional | Integer that determines the order in which items are drawn. If this is not specified, items are drawn in the order they are found in the specification. | int
facetLevel diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="facetLevel" minOccurs="0">
<xs:sequence minOccurs="0" maxOccurs="2">
<xs:element ref="vis:axis"></xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="level" type="xs:positiveInteger" use="required"></xs:attribute>
<xs:attribute name="gap" type="vis:length"></xs:attribute>
<xs:attribute name="style" type="xs:IDREF"></xs:attribute>
<xs:attribute name="zOrder" type="xs:int"></xs:attribute>
</xs:element>

Parent Elements

facetLayout Element

Child Elements

axis Element


graphLayoutStatistic Element

graphLayoutStatistic element,graphLayoutStatistic element,graphLayoutStatistic element

Lays out the edges of a node/edge graph. Note that the edge variables are required while the weight variable is optional.

Attributes for graphLayoutStatistic
Attribute | Use | Description | Valid Values
from | optional | Variable that defines the start of edges. | IDREF
group | optional | Variable that defines the grouping of the nodes. The variable must be non-continuous. | IDREF
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
nodes | optional | Variable that defines the nodes to use. | string
to | optional | Variable that defines the end of edges. | IDREF
x | optional | A variable defining initial locations for the nodes | IDREF
y | optional | A variable defining initial locations for the nodes | IDREF
graphLayoutStatistic diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="graphLayoutStatistic">
<xs:sequence>
<xs:element name="initial" minOccurs="0"></xs:element>
<xs:element name="hideSingleNodes" minOccurs="0"></xs:element>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="swap" type="vis:improveLayout"></xs:element>
<xs:element name="polarize" type="vis:improveLayout"></xs:element>
<xs:element name="randomize"></xs:element>
<xs:element name="move"></xs:element>
</xs:choice>
<xs:element name="fixedNode" minOccurs="0" maxOccurs="unbounded"></xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="from" type="xs:IDREF"></xs:attribute>
<xs:attribute name="to" type="xs:IDREF"></xs:attribute>
<xs:attribute name="nodes" type="xs:string"></xs:attribute>
<xs:attribute name="x" type="xs:IDREF"></xs:attribute>
<xs:attribute name="y" type="xs:IDREF"></xs:attribute>
<xs:attribute name="group" type="xs:IDREF"></xs:attribute>
</xs:element>

Parent Elements

area Element, edge Element, faceting Element, interval Element, line Element, path Element, point Element, polygon Element, schema Element

Child Elements

fixedNode Element, hideSingleNodes Element, initial Element, move Element, polarize Element, randomize Element, swap Element


initial Element

initial element,initial element,initial element

A one-step process to lay out a graph. This may be the only algorithm used, or one of the update algorithms can process the layout further.

Attributes for initial
Attribute Use Description Valid Values

id

optional

An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one.

ID

root

optional

Identifier of the root node of the graph. Some methods can use this to lay out a graph, but it is never required.

string

type

optional

Method used to layout the graph initially.

grid. Lays out the graph by placing the nodes at regular grid points to make a square grid.

random. Places the nodes randomly within a square.

tree. Lays out the graph out as a directed tree. If the graph does not form a true tree, then the statistic will create a maximal spanning tree from the graph and lay that out.

DAG. Lays out the graph using a general directed acyclic graph algorithm.

data. Lays out the graph using the data passed into the statistic as the X and Y coordinates

circle. Lays out the graph around the edge of a circle.
initial diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="initial" minOccurs="0">
<xs:attribute name="type" type="vis:graphLayoutType">
<xs:enumeration value="grid"></xs:enumeration>
<xs:enumeration value="random"></xs:enumeration>
<xs:enumeration value="tree"></xs:enumeration>
<xs:enumeration value="DAG"></xs:enumeration>
<xs:enumeration value="data"></xs:enumeration>
<xs:enumeration value="circle"></xs:enumeration>
</xs:attribute>
<xs:attribute name="root" type="xs:string"></xs:attribute>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
</xs:element>

Parent Elements

graphLayoutStatistic Element


hideSingleNodes Element

hideSingleNodes element,hideSingleNodes element,hideSingleNodes element

Visibility of nodes that have no edges.

Attributes for hideSingleNodes
Attribute | Use | Description | Valid Values
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
whenEdgesHidden | optional | If true, the nodes are hidden when edges are hidden. | boolean
hideSingleNodes diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="hideSingleNodes" minOccurs="0">
<xs:attribute name="whenEdgesHidden" type="xs:boolean"></xs:attribute>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
</xs:element>

Parent Elements

graphLayoutStatistic Element


swap Element

swap element,swap element,swap element

Swaps nodes around if doing so improves the graph.

Attributes for swap
Attribute | Use | Description | Valid Values
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
ignoreLinkCrossings | optional | If true, link crossings are ignored. This is a faster option for graphs with many edges. | boolean
maxIterations | optional | Maximum number of iterations through which to run this algorithm. | integer
maxTime | optional | Maximum amount of time (approximately) for which to run this algorithm. | any
respectGroups | optional | If true, groups such as defined by layers of a tree or DAG are respected. | boolean
swap diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="swap" type="vis:improveLayout">
<xs:attribute name="ignoreLinkCrossings" type="xs:boolean"></xs:attribute>
<xs:attribute name="respectGroups" type="xs:boolean"></xs:attribute>
<xs:attribute name="maxIterations" type="xs:integer"></xs:attribute>
<xs:attribute name="maxTime">
<xs:simpleType>
<xs:restriction base="xs:double">
<xs:minExclusive value="0"></xs:minExclusive>
<xs:maxInclusive value="1000000"></xs:maxInclusive>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
</xs:element>

Parent Elements

graphLayoutStatistic Element


polarize Element

polarize element,polarize element,polarize element

Projects the graph into polar coordinates. Useful for trees and DAGs as the root node becomes the center

Attributes for polarize
Attribute | Use | Description | Valid Values
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
ignoreLinkCrossings | optional | If true, link crossings are ignored. This is a faster option for graphs with many edges. | boolean
maxIterations | optional | Maximum number of iterations through which to run this algorithm. | integer
maxTime | optional | Maximum amount of time (approximately) for which to run this algorithm. | any
respectGroups | optional | If true, groups such as defined by layers of a tree or DAG are respected. | boolean
polarize diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="polarize" type="vis:improveLayout">
<xs:attribute name="ignoreLinkCrossings" type="xs:boolean"></xs:attribute>
<xs:attribute name="respectGroups" type="xs:boolean"></xs:attribute>
<xs:attribute name="maxIterations" type="xs:integer"></xs:attribute>
<xs:attribute name="maxTime">
<xs:simpleType>
<xs:restriction base="xs:double">
<xs:minExclusive value="0"></xs:minExclusive>
<xs:maxInclusive value="1000000"></xs:maxInclusive>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
</xs:element>

Parent Elements

graphLayoutStatistic Element


randomize Element

randomize element,randomize element,randomize element

Completely randomizes all nodes, swapping them all with each other. Accepts the result if it improves the graph.

Attributes for randomize
Attribute | Use | Description | Valid Values
failuresNeededToStop | optional | The number of successive failures needed to terminate this algorithm. | integer
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
ignoreLinkCrossings | optional | If true, link crossings are ignored. This is a faster option for graphs with many edges. | boolean
maxIterations | optional | Maximum number of iterations through which to run this algorithm. | integer
maxTime | optional | Maximum amount of time (approximately) for which to run this algorithm. | any
respectGroups | optional | If true, groups such as defined by layers of a tree or DAG are respected. | boolean
randomize diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="randomize">
<xs:attribute name="ignoreLinkCrossings" type="xs:boolean"></xs:attribute>
<xs:attribute name="respectGroups" type="xs:boolean"></xs:attribute>
<xs:attribute name="maxIterations" type="xs:integer"></xs:attribute>
<xs:attribute name="maxTime">
<xs:simpleType>
<xs:restriction base="xs:double">
<xs:minExclusive value="0"></xs:minExclusive>
<xs:maxInclusive value="1000000"></xs:maxInclusive>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="failuresNeededToStop" type="xs:integer"></xs:attribute>
</xs:element>

Parent Elements

graphLayoutStatistic Element

Related Elements

move Element


move Element

move element,move element,move element

Moves individual nodes in a neighborhood around themselves, trying to find a better location.

Attributes for move
Attribute | Use | Description | Valid Values
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
ignoreLinkCrossings | optional | If true, link crossings are ignored. This is a faster option for graphs with many edges. | boolean
initialDistance | optional | The initial distance to try moving nodes in range (0,1). | any
maxIterations | optional | Maximum number of iterations through which to run this algorithm. | integer
maxTime | optional | Maximum amount of time (approximately) for which to run this algorithm. | any
reductionFactor | optional | Each step, the amount to move nodes by is multiplied by this factor, which must be in the range (0,1]. | any
respectGroups | optional | If true, groups such as defined by layers of a tree or DAG are respected. | boolean
move diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="move">
<xs:attribute name="ignoreLinkCrossings" type="xs:boolean"></xs:attribute>
<xs:attribute name="respectGroups" type="xs:boolean"></xs:attribute>
<xs:attribute name="maxIterations" type="xs:integer"></xs:attribute>
<xs:attribute name="maxTime">
<xs:simpleType>
<xs:restriction base="xs:double">
<xs:minExclusive value="0"></xs:minExclusive>
<xs:maxInclusive value="1000000"></xs:maxInclusive>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="initialDistance">
<xs:simpleType>
<xs:restriction base="xs:double">
<xs:minExclusive value="0"></xs:minExclusive>
<xs:maxExclusive value="1"></xs:maxExclusive>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="reductionFactor">
<xs:simpleType>
<xs:restriction base="xs:double">
<xs:minExclusive value="0"></xs:minExclusive>
<xs:maxExclusive value="1"></xs:maxExclusive>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:element>

Parent Elements

graphLayoutStatistic Element

Related Elements

randomize Element


fixedNode Element

fixedNode element,fixedNode element,fixedNode element

States that a node should be moved to a fixed location after the algorithm has run, regardless of where it was placed by the algorithm.

Attributes for fixedNode
Attribute | Use | Description | Valid Values
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
node | optional | The name (ID) of the node to place at a fixed location. | string
x | optional | The x location to move to. | double
y | optional | The y location to move to. | double
fixedNode diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="fixedNode" minOccurs="0" maxOccurs="unbounded">
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="node" type="xs:string"></xs:attribute>
<xs:attribute name="x" type="xs:double"></xs:attribute>
<xs:attribute name="y" type="xs:double"></xs:attribute>
</xs:element>

Parent Elements

graphLayoutStatistic Element


gridline Element

gridline element,gridline element,gridline element

Display grid lines from tick mark locations for this set of ticks.

Attributes for gridline
Attribute | Use | Description | Valid Values
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
style | optional | The style for the gridlines. | IDREF
zOrder | optional | Integer that determines the order in which items are drawn. If this is not specified, items are drawn in the order they are found in the specification. | int
gridline diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="gridline">
<xs:sequence>
<xs:element ref="vis:conditionalStyle" minOccurs="0"></xs:element>
<xs:element ref="vis:styleReference" minOccurs="0"></xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="style" type="xs:IDREF"></xs:attribute>
<xs:attribute name="zOrder" type="xs:int"></xs:attribute>
</xs:element>

Parent Elements

majorTicks Element, minorTicks Element

Child Elements

conditionalStyle Element, styleReference Element


image Element

image element,image element,image element

Maps a categorical variable to an image used in the interior of the element.

Attributes for image
Attribute | Use | Description | Valid Values
clamp | optional | If true, values off the edges of the domain will be pegged to low or high values, not ignored. | boolean
cycle | optional | The cycle that will be applied to categorical data. The images will be extracted from the style cycle and used for each distinct category in the data in order | IDREF
dimension | optional | If the variable is an expression that contains more than one dimension of data (for example, the expression contained a cross of other variables), then this attribute specifies which of the variable's dimensions to use. The first is numbered 0, then 1, 2, etc. | nonNegativeInteger
domain | optional | If specified, this domain will be used to define the domain of the variable rather than the variable's default domain. For example, a user might choose to map 0 to black and 1 to white even if the data only run from 0.3 to 0.7. In this case a domain of [0,1] would be specified for the aesthetic. | IDREF
domainModifier | optional | The domain modifier defines how the domain is modified. | IDREF
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
missing | optional | The image to map missing values to | string
split | optional | If true, distinct values of the variable will have statistics computed on them independently. | boolean
variable | optional | Referers to a data variable. The values of this variable will be mapped to aesthetic values used to display the element. | IDREF
image diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="image">
<xs:sequence>
<xs:element ref="vis:scale" minOccurs="0"></xs:element>
<xs:element ref="vis:summaryStatistic" minOccurs="0"></xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="domainModifier" type="xs:IDREF"></xs:attribute>
<xs:attribute name="variable" type="xs:IDREF"></xs:attribute>
<xs:attribute name="dimension" type="xs:nonNegativeInteger"></xs:attribute>
<xs:attribute name="domain" type="xs:IDREF"></xs:attribute>
<xs:attribute name="clamp" type="xs:boolean"></xs:attribute>
<xs:attribute name="split" type="xs:boolean"></xs:attribute>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element ref="vis:stringMapping" minOccurs="0"></xs:element>
</xs:sequence>
<xs:attribute name="missing" type="xs:string"></xs:attribute>
<xs:attribute name="cycle" type="xs:IDREF"></xs:attribute>
</xs:element>

Parent Elements

area Element, brushing Element, edge Element, interval Element, line Element, path Element, point Element, polygon Element, schema Element

Child Elements

scale Element, stringMapping Element, summaryStatistic Element

Related Elements

color Element, colorComponent Element, dash Element, footnotes Element, formatting Element, labeling Element, labelLocation Element, offset Element, pattern Element, rotation Element, shape Element, size Element, split Element, styleBy Element, transparency Element, visibility Element


integerMapping Element

integerMapping element,integerMapping element,integerMapping element

Specifies a mapping from a category to a integer.

Attributes for integerMapping
Attribute | Use | Description | Valid Values
from | required | Category that is mapped to a specific value of the aesthetic. | string
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
to | required | Integer value 0 or greater. | integer
integerMapping diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="integerMapping">
<xs:attribute name="from" type="xs:string" use="required"></xs:attribute>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="to" type="xs:integer" use="required"></xs:attribute>
</xs:element>

Parent Elements

pattern Element

Related Elements

booleanMapping Element, colorMapping Element, dashMapping Element, doubleMapping Element, footnoteMapping Element, formatMapping Element, lengthMapping Element, stringMapping Element, symbolMapping Element


intersect Element

intersect element,intersect element,intersect element

Restricts facet cells by intersecting where statements

Attributes for intersect
Attribute | Use | Description | Valid Values
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
intersect diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="intersect">
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element ref="vis:where" minOccurs="0"></xs:element>
<xs:element ref="vis:intersectWhere" minOccurs="0"></xs:element>
<xs:element ref="vis:alternating" minOccurs="0"></xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
</xs:element>

Parent Elements

union Element

Child Elements

alternating Element, intersectWhere Element, where Element


intersectWhere Element

intersectWhere element,intersectWhere element,intersectWhere element

Restricts facet cells

Attributes for intersectWhere
Attribute | Use | Description | Valid Values
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
variable | required | Referers to a variable for this where to act on. | IDREF
variable2 | required | Referers to the second variable for this where to act on. | IDREF
intersectWhere diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="intersectWhere">
<xs:attribute name="variable" type="xs:IDREF" use="required"></xs:attribute>
<xs:attribute name="variable2" type="xs:IDREF" use="required"></xs:attribute>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
</xs:element>

Parent Elements

intersect Element


interval Element

interval element,interval element,interval element

An interval (bar) element.

Attributes for interval
Attribute Use Description Valid Values

centerIn3D

optional

If true, center extruded elements in 3D. If false, they are extruded behind the location given for the z dimension.

boolean

clip

optional

The type of clipping to apply to the element.

none. Do not clip at all.

cell. Clip to the cell such that the glyph being clipped does not go outside of the cell of the graph.

domain. Clip to the domain. Do not let the bounds of the glyph exceed the domain.

coordinates

optional

Defines the coordinate system within which an element is drawn. If left undefined, the first coordinate system defined by the graph is used. This attribute is intended for only graphs with multiple coordinate systems, such as SPLOMs with histograms on the diagonal.

IDREF

dot

optional

Usually an element's expression is crossed with the faceting, so that blends in the faceting will induce multiple copies of the data in the graph. If this parameter is set to true, the expressions will be dotted together, making fewer copies.

boolean

id

optional

An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one.

ID

labelCollisionHandling

optional

Allows the use of one or more algorithms to avoid collision among labels by moving them slightly around their original positions.

none. Labels will not be moved.

normal. Labels will be moved so as to avoid collisions. A short amount of time will be allocated to this algorithm.

fast. Labels will be moved so as to avoid collisions. A very short amount of time will be allocated to this algorithm; effectively it will not attempt many changes.

quality. Labels will be moved so as to avoid collisions. A long amount of time will be allocated to this algorithm; possibly up to a half second or so.

extreme. Labels will be moved so as to avoid collisions. The process will be allowed to run for a very long period of time; many seconds or so are possible. This option should only be used when time is not important.

outside. Labels will be moved so as to radiate outwards from the center of the cell.

inside. Labels will be moved so as to radiate inwards from the center of the cell.

basic. Labels will be moved so as to avoid collisions. The process will be allowed to run for a very long period of time; many seconds or so are possible. This option should only be used when time is not important.

name

optional

A human-readable string that may be used to name the element in a legend or to be read by a screen reader. If not defined, the ID will be used instead.

string

positionModifier

optional

For elements that would be mapped to the same position, this attribute allows them to be stacked on top of each other, dodged to either side of each other, or have the intersection of their ranges removed form each of them (a difference effect).

none. Do nothing

center. Intervals that are centered will be moved around the center of the dimension

centerStacked. Intervals are stacked, then centered

stack. Elements that are split by a splitting aesthetic will be stacked on top of each other.

stackInterpolating. Deprecated. Please use stack instead. The difference has been eliminated. If items have the same coordinates except possibly for the response dimension, stack them on top of each other. If a value is missing at a given stack location, a linear interpolation will be performed to give it a value.

setMissingsToZero. A simple modifier that converts all missing values to zeros.

minusIntersection. Areas drawn with this modifier are subtracted from each other to create a 'difference area'. Although defined in terms of areas, and intended mainly for use in that element, it will work for all elements.

dodge. Items drawn at exactly the same location will be moved aside so they no longer occlude each other. The center of the set of moved items will be the same location as they originally occupied. This is used to create symmetric dot plots.

pile. Items drawn at exactly the same location will be moved aside so they no longer occlude each other. Instead of being centered at the original location as in 'dodge', they will be piled one on top of each other. This is used to create asymmetric dot plots.

jitterJointUniform. All elements are perturbed randomly along all dimensions using a uniform distribution.

jitterConditionalUniform. All elements are perturbed randomly on the dependent dimension using a uniform distribution.

jitterJointNormal. All elements are perturbed randomly along all dimensions using a normal distribution.

jitterConditionalNormal. All elements are perturbed randomly on the dependent dimension using a normal distribution.

showCollidingLabels

optional

If no label collision handling is attempted, or if labels still collide afterwards, this parameter specifies whether a label will be drawn if it collides with a previously drawn label.

boolean

style

optional

The basic style of this element.

IDREF

xLocation

optional

Sets the x location to a value in [0,1] coordinates. Overrides position and statistic values.

double

yLocation

optional

Sets the y location to a value in [0,1] coordinates. Overrides position and statistic values.

double

zLocation

optional

Sets the z location to a value in [0,1] coordinates. Overrides position and statistic values.

double

zOrder

optional

Integer that determines the order in which items are drawn. If this is not specified, items are drawn in the order they are found in the specification. This has no effect in a 3D chart.

int

interval diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="interval">
<xs:sequence>
<xs:element ref="vis:extension" minOccurs="0" maxOccurs="unbounded"></xs:element>
<xs:element ref="vis:conditionalStyle" minOccurs="0" maxOccurs="unbounded"></xs:element>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:group ref="vis:statistic">
<xs:choice>
<xs:element ref="vis:attach"></xs:element>
<xs:element ref="vis:binStatistic"></xs:element>
<xs:element ref="vis:aggregateStatistic"></xs:element>
<xs:element ref="vis:collectRowsStatistic"></xs:element>
<xs:element ref="vis:replicate"></xs:element>
<xs:element ref="vis:when"></xs:element>
<xs:element ref="vis:distributionStatistic"></xs:element>
<xs:element ref="vis:graphLayoutStatistic"></xs:element>
<xs:element ref="vis:linkStatistic"></xs:element>
<xs:element ref="vis:mapStatistic"></xs:element>
<xs:element ref="vis:regionStatistic"></xs:element>
<xs:element ref="vis:smoothStatistic"></xs:element>
<xs:element ref="vis:fixedWindowDensityStatistic"></xs:element>
<xs:element ref="vis:nearestNeighborDensityStatistic"></xs:element>
<xs:element ref="vis:summaryStatistic"></xs:element>
<xs:element ref="vis:treeLayoutStatistic"></xs:element>
<xs:element ref="vis:tagCloudStatistic"></xs:element>
<xs:element ref="vis:patternLinkStatistic"></xs:element>
<xs:element ref="vis:clusteringStatistic"></xs:element>
<xs:element ref="vis:SOMStatistic"></xs:element>
<xs:element ref="vis:tukeyStatistic"></xs:element>
</xs:choice>
</xs:group>
</xs:sequence>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:group ref="vis:aesthetic">
<xs:choice>
<xs:element ref="vis:visibility"></xs:element>
<xs:element ref="vis:colorComponent"></xs:element>
<xs:element ref="vis:color"></xs:element>
<xs:element ref="vis:dash"></xs:element>
<xs:element ref="vis:labeling"></xs:element>
<xs:element ref="vis:offset"></xs:element>
<xs:element ref="vis:pattern"></xs:element>
<xs:element ref="vis:image"></xs:element>
<xs:element ref="vis:rotation"></xs:element>
<xs:element ref="vis:shape"></xs:element>
<xs:element ref="vis:size"></xs:element>
<xs:element ref="vis:split"></xs:element>
<xs:element ref="vis:styleBy"></xs:element>
<xs:element ref="vis:transparency"></xs:element>
</xs:choice>
</xs:group>
</xs:choice>
<xs:element ref="vis:position" minOccurs="0" maxOccurs="unbounded"></xs:element>
<xs:element ref="vis:x" minOccurs="0"></xs:element>
<xs:element ref="vis:y" minOccurs="0"></xs:element>
<xs:element ref="vis:z" minOccurs="0"></xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="clip">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="none"></xs:enumeration>
<xs:enumeration value="cell"></xs:enumeration>
<xs:enumeration value="domain"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="style" type="xs:IDREF"></xs:attribute>
<xs:attribute name="name" type="xs:string"></xs:attribute>
<xs:attribute name="dot" type="xs:boolean"></xs:attribute>
<xs:attribute name="labelCollisionHandling">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="none"></xs:enumeration>
<xs:enumeration value="normal"></xs:enumeration>
<xs:enumeration value="fast"></xs:enumeration>
<xs:enumeration value="quality"></xs:enumeration>
<xs:enumeration value="extreme"></xs:enumeration>
<xs:enumeration value="outside"></xs:enumeration>
<xs:enumeration value="inside"></xs:enumeration>
<xs:enumeration value="basic"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="showCollidingLabels" type="xs:boolean"></xs:attribute>
<xs:attribute name="coordinates" type="xs:IDREF"></xs:attribute>
<xs:attribute name="positionModifier">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="none"></xs:enumeration>
<xs:enumeration value="center"></xs:enumeration>
<xs:enumeration value="centerStacked"></xs:enumeration>
<xs:enumeration value="stack"></xs:enumeration>
<xs:enumeration value="stackInterpolating"></xs:enumeration>
<xs:enumeration value="setMissingsToZero"></xs:enumeration>
<xs:enumeration value="minusIntersection"></xs:enumeration>
<xs:enumeration value="dodge"></xs:enumeration>
<xs:enumeration value="pile"></xs:enumeration>
<xs:enumeration value="jitterJointUniform"></xs:enumeration>
<xs:enumeration value="jitterConditionalUniform"></xs:enumeration>
<xs:enumeration value="jitterJointNormal"></xs:enumeration>
<xs:enumeration value="jitterConditionalNormal"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="xLocation" type="xs:double"></xs:attribute>
<xs:attribute name="yLocation" type="xs:double"></xs:attribute>
<xs:attribute name="zLocation" type="xs:double"></xs:attribute>
<xs:attribute name="zOrder" type="xs:int"></xs:attribute>
<xs:attribute name="centerIn3D" type="xs:boolean"></xs:attribute>
</xs:element>

Parent Elements

graph Element

Child Elements

aggregateStatistic Element, attach Element, binStatistic Element, clusteringStatistic Element, collectRowsStatistic Element, color Element, colorComponent Element, conditionalStyle Element, dash Element, distributionStatistic Element, extension Element, fixedWindowDensityStatistic Element, graphLayoutStatistic Element, image Element, labeling Element, linkStatistic Element, mapStatistic Element, nearestNeighborDensityStatistic Element, offset Element, pattern Element, patternLinkStatistic Element, position Element, regionStatistic Element, replicate Element, rotation Element, shape Element, size Element, smoothStatistic Element, SOMStatistic Element, split Element, styleBy Element, summaryStatistic Element, tagCloudStatistic Element, transparency Element, treeLayoutStatistic Element, tukeyStatistic Element, visibility Element, when Element, x Element, y Element, z Element

Related Elements

area Element, edge Element, line Element, path Element, polygon Element, schema Element


intervalDomain Element

intervalDomain element,intervalDomain element,intervalDomain element

A domain defines the range of values in which data is expected to lie. The domain can be used to exclude values you do not want and to define standard ranges so data with different empirical ranges can be compared. The interval domain is used for continuous values.

Attributes for intervalDomain
Attribute | Use | Description | Valid Values
date | optional | If true, then the domain is for dates. | any
id | optional | Identifier for the domain. | ID
intervalDomain diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="intervalDomain">
<xs:sequence>
<xs:element ref="vis:format" minOccurs="0"></xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="date"></xs:attribute>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="vis:variableReference"></xs:element>
<xs:element ref="vis:domainReference"></xs:element>
<xs:element name="range"></xs:element>
</xs:choice>
</xs:element>

Parent Elements

visualization Element

Child Elements

range Element, domainReference Element, format Element, variableReference Element

Related Elements

categoricalDomain Element


range Element

range element,range element,range element

An interval to add to the domain or to reduce the domain.

Attributes for range
Attribute | Use | Description | Valid Values
exact | optional | Whether to force exact interval values. | boolean
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
max | optional | The maximum value for this interval. | string
min | optional | The minimum value for this interval. | string
range diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="range">
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="min" type="xs:string"></xs:attribute>
<xs:attribute name="max" type="xs:string"></xs:attribute>
<xs:attribute name="exact" type="xs:boolean"></xs:attribute>
</xs:element>

Parent Elements

intervalDomain Element


intervalDomainModifier Element

intervalDomainModifier element,intervalDomainModifier element,intervalDomainModifier element

Domain modifier for interval domains. Modifies the domain with the modifiers in order replace, union, intersect, exclude.

Attributes for intervalDomainModifier
Attribute | Use | Description | Valid Values
dateType | optional |  | date dateTime time
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
intervalDomainModifier diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="intervalDomainModifier">
<xs:sequence maxOccurs="1">
<xs:element ref="vis:domainReplace" minOccurs="0" maxOccurs="1"></xs:element>
<xs:element ref="vis:domainUnion" minOccurs="0" maxOccurs="1"></xs:element>
<xs:element ref="vis:domainIntersect" minOccurs="0" maxOccurs="1"></xs:element>
<xs:element ref="vis:domainExclude" minOccurs="0" maxOccurs="1"></xs:element>
<xs:choice minOccurs="0" maxOccurs="1">
<xs:element ref="vis:simpleSort"></xs:element>
<xs:element ref="vis:statisticSort"></xs:element>
</xs:choice>
</xs:sequence>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="dateType" type="vis:dateType">
<xs:enumeration value="date"></xs:enumeration>
<xs:enumeration value="dateTime"></xs:enumeration>
<xs:enumeration value="time"></xs:enumeration>
</xs:attribute>
</xs:element>

Parent Elements

visualization Element

Child Elements

domainExclude Element, domainIntersect Element, domainReplace Element, domainUnion Element, simpleSort Element, statisticSort Element


label Element

label element,label element,label element

A title or other label.

Attributes for label
Attribute | Use | Description | Valid Values
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
purpose | optional | The purpose of the label. | title. A title. subTitle. A subtitle. subSubTitle. A sub subtitle. footnote. A footnote. subFootnote. A subFootnote. subSubFootnote. A sub subfootnote. layer. A layer label. auto. Automatically added label.
style | optional | The style for the text of the label. | IDREF
textFrameStyle | optional | The style for the frame around the text. | IDREF
zOrder | optional | Integer that determines the order in which items are drawn. If this is not specified, items are drawn in the order they are found in the specification. | int
label diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="label">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="descriptionGroup">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="description">
<xs:sequence minOccurs="0">
<xs:element ref="vis:format"></xs:element>
</xs:sequence>
</xs:element>
<xs:element name="text" type="vis:textType"></xs:element>
</xs:choice>
</xs:element>
<xs:element name="text" type="vis:textType"></xs:element>
<xs:element ref="vis:alternateLabel"></xs:element>
</xs:choice>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="style" type="xs:IDREF"></xs:attribute>
<xs:attribute name="textFrameStyle" type="xs:IDREF"></xs:attribute>
<xs:attribute name="zOrder" type="xs:int"></xs:attribute>
<xs:attribute name="purpose">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="title"></xs:enumeration>
<xs:enumeration value="subTitle"></xs:enumeration>
<xs:enumeration value="subSubTitle"></xs:enumeration>
<xs:enumeration value="footnote"></xs:enumeration>
<xs:enumeration value="subFootnote"></xs:enumeration>
<xs:enumeration value="subSubFootnote"></xs:enumeration>
<xs:enumeration value="layer"></xs:enumeration>
<xs:enumeration value="auto"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:element>

Parent Elements

axis Element, frameGuide Element, functionGuide Element, labelFrame Element, legend Element, lineGuide Element, majorTicks Element, planeGuide Element, pointGuide Element, rectangleGuide Element, tableLayout Element

Child Elements

descriptionGroup Element, text Element, alternateLabel Element

Related Elements

alternateLabel Element


descriptionGroup Element

descriptionGroup element,descriptionGroup element,descriptionGroup element

A target XML element that is used to generate text to be inserted in the label. A mix of text and description elements is allowed and typically used.

Attributes for descriptionGroup
Attribute | Use | Description | Valid Values
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
separator | optional | If the targeted item has multiple groups, their descriptions are separated by this string. | string
target | required | The ID of the item for which a description is required. The target is one of: element, filter, variable or visualization. The default is the visualization. | IDREF
descriptionGroup diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="descriptionGroup">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="description">
<xs:sequence minOccurs="0">
<xs:element ref="vis:format"></xs:element>
</xs:sequence>
</xs:element>
<xs:element name="text" type="vis:textType"></xs:element>
</xs:choice>
<xs:attribute name="target" type="xs:IDREF" use="required"></xs:attribute>
<xs:attribute name="separator" type="xs:string"></xs:attribute>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
</xs:element>

Parent Elements

label Element

Child Elements

description Element, text Element


text Element

text element,text element,text element

A fixed string of text.

Attributes for text
Attribute | Use | Description | Valid Values
definesReference | optional | A reference string for the format. | string
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
position | optional | Apply a position for the text. | superscript. The text should be above the line. subscript. The text should be below the line. normal. The text should be even with the line (default).
style | optional | The style for the text of the label. | IDREF
usesReference | optional | The reference string that is associated with this text. | string
text diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="text" type="vis:textType">
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="position">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="superscript"></xs:enumeration>
<xs:enumeration value="subscript"></xs:enumeration>
<xs:enumeration value="normal"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="definesReference" type="xs:string"></xs:attribute>
<xs:attribute name="usesReference" type="xs:string"></xs:attribute>
<xs:attribute name="style" type="xs:IDREF"></xs:attribute>
</xs:element>

Parent Elements

label Element


labelFrame Element

labelFrame element,labelFrame element,labelFrame element

A frame that contains a text label.

Attributes for labelFrame
Attribute | Use | Description | Valid Values
clip | optional | If true, the frame clips contents so they do not overflow its bounds. The default behavior may vary based on the contents of the frame. | boolean
id | optional | Identifier for this frame. The identifier must be unique within the document and is required only when another element must reference this one. Can be used as the value for a target so other frames can define their locations relative to this one. | ID
style | optional | The frame is drawn with this style before any of its contents are drawn. | IDREF
labelFrame diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="labelFrame">
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element ref="vis:extension" minOccurs="0" maxOccurs="unbounded"></xs:element>
<xs:element ref="vis:location" minOccurs="0" maxOccurs="unbounded"></xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="style" type="xs:IDREF"></xs:attribute>
<xs:attribute name="clip" type="xs:boolean"></xs:attribute>
<xs:sequence>
<xs:element ref="vis:label" minOccurs="0"></xs:element>
<xs:element ref="vis:paragraph" minOccurs="0" maxOccurs="1"></xs:element>
</xs:sequence>
</xs:element>

Parent Elements

container Element, visualization Element

Child Elements

extension Element, label Element, location Element, paragraph Element

Related Elements

container Element, controlFrame Element, graph Element, legend Element, visualization Element


labeling Element

labeling element,labeling element,labeling element

Labels the elements by a variable

Attributes for labeling
Attribute | Use | Description | Valid Values
clamp | optional | If true, values off the edges of the domain will be pegged to low or high values, not ignored. | boolean
connectingLines | optional | If true, connecting lines are drawn to labels that are sufficiently far away from their targets. | boolean
dimension | optional | If the variable is an expression that contains more than one dimension of data (for example, the expression contained a cross of other variables), then this attribute specifies which of the variable's dimensions to use. The first is numbered 0, then 1, 2, etc. | nonNegativeInteger
domain | optional | If specified, this domain will be used to define the domain of the variable rather than the variable's default domain. For example, a user might choose to map 0 to black and 1 to white even if the data only run from 0.3 to 0.7. In this case a domain of [0,1] would be specified for the aesthetic. | IDREF
domainModifier | optional | The domain modifier defines how the domain is modified. | IDREF
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
minConnectingLineLength | optional | The minimum distance at which to add a connecting line. | length
missing | optional | The label to display for missing values | string
part | optional | In case of boxplots,this attribute decides which part will be labeled(median,outlier,extreme). | median. The median of the boxplot outlier. The outliers of the boxplot extreme. The extreme outliers of the boxplot
split | optional | If true, distinct values of the variable will have statistics computed on them independently. | boolean
style | optional | The style for the text of the labeling. | IDREF
textFrameStyle | optional | The style for the frame surrounding the text of the labeling. | IDREF
variable | optional | Referers to a data variable. The values of this variable will be mapped to aesthetic values used to display the element. | IDREF
labeling diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="labeling">
<xs:sequence>
<xs:element ref="vis:scale" minOccurs="0"></xs:element>
<xs:element ref="vis:summaryStatistic" minOccurs="0"></xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="domainModifier" type="xs:IDREF"></xs:attribute>
<xs:attribute name="variable" type="xs:IDREF"></xs:attribute>
<xs:attribute name="dimension" type="xs:nonNegativeInteger"></xs:attribute>
<xs:attribute name="domain" type="xs:IDREF"></xs:attribute>
<xs:attribute name="clamp" type="xs:boolean"></xs:attribute>
<xs:attribute name="split" type="xs:boolean"></xs:attribute>
<xs:sequence>
<xs:choice minOccurs="0">
<xs:element ref="vis:format"></xs:element>
</xs:choice>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="vis:visibility"></xs:element>
<xs:element ref="vis:styleBy"></xs:element>
<xs:element ref="vis:size"></xs:element>
<xs:element ref="vis:color"></xs:element>
<xs:element ref="vis:colorComponent"></xs:element>
<xs:element ref="vis:transparency"></xs:element>
<xs:element ref="vis:rotation"></xs:element>
<xs:element ref="vis:labelLocation"></xs:element>
<xs:element ref="vis:footnotes"></xs:element>
<xs:element ref="vis:formatting"></xs:element>
</xs:choice>
</xs:sequence>
<xs:attribute name="style" type="xs:IDREF"></xs:attribute>
<xs:attribute name="textFrameStyle" type="xs:IDREF"></xs:attribute>
<xs:attribute name="connectingLines" type="xs:boolean"></xs:attribute>
<xs:attribute name="minConnectingLineLength" type="vis:length"></xs:attribute>
<xs:attribute name="missing" type="xs:string"></xs:attribute>
<xs:attribute name="part">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="median"></xs:enumeration>
<xs:enumeration value="outlier"></xs:enumeration>
<xs:enumeration value="extreme"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:element>

Parent Elements

area Element, brushing Element, edge Element, interval Element, line Element, path Element, point Element, polygon Element, schema Element

Child Elements

color Element, colorComponent Element, footnotes Element, format Element, formatting Element, labelLocation Element, rotation Element, scale Element, size Element, styleBy Element, summaryStatistic Element, transparency Element, visibility Element

Related Elements

color Element, colorComponent Element, dash Element, footnotes Element, formatting Element, image Element, labelLocation Element, offset Element, pattern Element, rotation Element, shape Element, size Element, split Element, styleBy Element, transparency Element, visibility Element


labelLocation Element

labelLocation element,labelLocation element,labelLocation element

If specified, determines the location of a labeling element along one dimension within the data area. The variable is used to map into continuous space based on the domain. The intent of this feature is to allow labels to be moved anywhere in the data display area.

Attributes for labelLocation
Attribute | Use | Description | Valid Values
clamp | optional | If true, values off the edges of the domain will be pegged to low or high values, not ignored. | boolean
dimension | optional | If the variable is an expression that contains more than one dimension of data (for example, the expression contained a cross of other variables), then this attribute specifies which of the variable's dimensions to use. The first is numbered 0, then 1, 2, etc. | nonNegativeInteger
domain | optional | If specified, this domain will be used to define the domain of the variable rather than the variable's default domain. For example, a user might choose to map 0 to black and 1 to white even if the data only run from 0.3 to 0.7. In this case a domain of [0,1] would be specified for the aesthetic. | IDREF
domainModifier | optional | The domain modifier defines how the domain is modified. | IDREF
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
role | optional | The dimension to which to map a variable. | any
split | optional | If true, distinct values of the variable will have statistics computed on them independently. | boolean
variable | optional | Referers to a data variable. The values of this variable will be mapped to aesthetic values used to display the element. | IDREF
labelLocation diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="labelLocation">
<xs:sequence>
<xs:element ref="vis:scale" minOccurs="0"></xs:element>
<xs:element ref="vis:summaryStatistic" minOccurs="0"></xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="domainModifier" type="xs:IDREF"></xs:attribute>
<xs:attribute name="variable" type="xs:IDREF"></xs:attribute>
<xs:attribute name="dimension" type="xs:nonNegativeInteger"></xs:attribute>
<xs:attribute name="domain" type="xs:IDREF"></xs:attribute>
<xs:attribute name="clamp" type="xs:boolean"></xs:attribute>
<xs:attribute name="split" type="xs:boolean"></xs:attribute>
<xs:attribute name="role">
<xs:simpleType>
<xs:restriction base="xs:NMTOKEN">
<xs:pattern value="x"></xs:pattern>
<xs:pattern value="y"></xs:pattern>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:element>

Parent Elements

labeling Element

Child Elements

scale Element, summaryStatistic Element

Related Elements

color Element, colorComponent Element, dash Element, footnotes Element, formatting Element, image Element, labeling Element, offset Element, pattern Element, rotation Element, shape Element, size Element, split Element, styleBy Element, transparency Element, visibility Element


layer Element

layer element,layer element,layer element

A layer filters the data based on a variable

Attributes for layer
Attribute | Use | Description | Valid Values
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
method | optional | The method for the layer | cross. CROSS performs a complete join of the variables, with all inner products nest. NEST is similar to a cross, but products not appearing in the result do not get a cell allcoated to them dot. Blend appends a variable to another variable
value | required | The value to select on for the layer | string
variable | required | The ID of the variable being used as a layer. | IDREF
visible | optional | Hint as to whether to show this in UI affordancesf | boolean
layer diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="layer">
<xs:attribute name="variable" type="xs:IDREF" use="required"></xs:attribute>
<xs:attribute name="value" type="xs:string" use="required"></xs:attribute>
<xs:attribute name="visible" type="xs:boolean" use="optional"></xs:attribute>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="method" type="vis:expressionType">
<xs:enumeration value="cross"></xs:enumeration>
<xs:enumeration value="nest"></xs:enumeration>
<xs:enumeration value="dot"></xs:enumeration>
</xs:attribute>
</xs:element>

Parent Elements

faceting Element


layerController Element

layerController element,layerController element,layerController element

Specifies that when you click on a a given frame, you will be able to modify filters for a given source

Attributes for layerController
Attribute | Use | Description | Valid Values
active | optional | If set to false, the controller will be inactive | boolean
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
source | optional | The source that will be controlled. If undefined, will be the first source | IDREF
target | optional | A frame that the controller will be active for. If undefined, will eb the whole visualization | IDREF
layerController diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="layerController">
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="active" type="xs:boolean"></xs:attribute>
<xs:attribute name="target" type="xs:IDREF"></xs:attribute>
<xs:attribute name="source" type="xs:IDREF"></xs:attribute>
</xs:element>

Parent Elements

visualization Element

Related Elements

animation Element, brushing Element, dragElement Element, drillDown Element, facetSortController Element, lineGuideController Element, pivotController Element, popup Element, rectangleGuideController Element, swingController Element


legend Element

legend element,legend element,legend element

A legend displays a frame containing small representations of graphical elements (called 'swatches') and some text showing what they represent. Each legend frame may show several elements and their corresponding values.

Attributes for legend
Attribute | Use | Description | Valid Values
clip | optional | If true, the frame clips contents so they do not overflow its bounds. The default behavior may vary based on the contents of the frame. | boolean
id | optional | Identifier for this frame. The identifier must be unique within the document and is required only when another element must reference this one. Can be used as the value for a target so other frames can define their locations relative to this one. | ID
numberOfColumns | optional | The desired number of columns in the legend. | int
numberOfRows | optional | The desired number of rows in the legend. | int
reverse | optional | If true, the legend is displayed in reverse order. | boolean
style | optional | The frame is drawn with this style before any of its contents are drawn. | IDREF
tickFrameStyle | optional | The style for the frame surrounding the legend swatch labels. | IDREF
tickTextStyle | optional | The style used for the text in the legend swatch labels. | IDREF
verticalFlow | optional | If true, the legend is displayed vertically; if false, the legend is displayed horizontally. | boolean
legend diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="legend">
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element ref="vis:extension" minOccurs="0" maxOccurs="unbounded"></xs:element>
<xs:element ref="vis:location" minOccurs="0" maxOccurs="unbounded"></xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="style" type="xs:IDREF"></xs:attribute>
<xs:attribute name="clip" type="xs:boolean"></xs:attribute>
<xs:sequence>
<xs:element ref="vis:label" minOccurs="0"></xs:element>
<xs:element name="legendTarget" maxOccurs="unbounded"></xs:element>
</xs:sequence>
<xs:attribute name="tickTextStyle" type="xs:IDREF"></xs:attribute>
<xs:attribute name="tickFrameStyle" type="xs:IDREF"></xs:attribute>
<xs:attribute name="reverse" type="xs:boolean"></xs:attribute>
<xs:attribute name="verticalFlow" type="xs:boolean"></xs:attribute>
<xs:attribute name="numberOfRows" type="xs:int"></xs:attribute>
<xs:attribute name="numberOfColumns" type="xs:int"></xs:attribute>
</xs:element>

Parent Elements

container Element, visualization Element

Child Elements

legendTarget Element, extension Element, label Element, location Element

Related Elements

container Element, controlFrame Element, graph Element, labelFrame Element, visualization Element


legendTarget Element

legendTarget element,legendTarget element,legendTarget element

A component of the legend. A simple legend has one target. If multiple targets are present, all the generated ticks are concatenated together.

Attributes for legendTarget
Attribute | Use | Description | Valid Values
domain | optional | A domain specifying which entries may be shown in the legend. Normally this is inferred from the aesthetic involved. | IDREF
domainModifier | optional | The domain modifier defines how the domain is modified. | IDREF
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
link | optional | A URI that is followed when this legend target is clicked. | anyURI
target | required | The target to show in the legend. This may be an aesthetic, in which case labels and swatches are drawn to show how the aesthetic maps to data; or the target may be an element or guide, in which case a single swatch and label are shown giving the name of the element or guide and its appearance. | IDREF
legendTarget diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="legendTarget" maxOccurs="unbounded">
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="target" type="xs:IDREF" use="required"></xs:attribute>
<xs:attribute name="domain" type="xs:IDREF"></xs:attribute>
<xs:attribute name="domainModifier" type="xs:IDREF"></xs:attribute>
<xs:attribute name="link" type="xs:anyURI"></xs:attribute>
</xs:element>

Parent Elements

legend Element


lengthMapping Element

lengthMapping element,lengthMapping element,lengthMapping element

Specifies a mapping from a category to a length.

Attributes for lengthMapping
Attribute | Use | Description | Valid Values
from | required | Category that is mapped to a specific value of the aesthetic. | string
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
to | required | Length to which to map a category. | length
lengthMapping diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="lengthMapping">
<xs:attribute name="from" type="xs:string" use="required"></xs:attribute>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="to" type="vis:length" use="required"></xs:attribute>
</xs:element>

Parent Elements

size Element

Related Elements

booleanMapping Element, colorMapping Element, dashMapping Element, doubleMapping Element, footnoteMapping Element, formatMapping Element, integerMapping Element, stringMapping Element, symbolMapping Element


line Element

line element,line element,line element

A line element.

Attributes for line
Attribute Use Description Valid Values

breakRepresentation

optional

How to represent breaks at missing data.

gap. Specifies that the graphic element ends at a valid value and does not continue until the next valid value. There is a gap between valid values.

interpolate. Specifies that the graphic element is interpolated through missing values. That is, the graphic element is continuous from one valid value to another, regardless of missing values between the valid values.

wings. Specifies that the graphic element continues after a valid value in the direction of the next valid value but then breaks just before and after the missing value. This is like interpolating through the missing value and erasing the graphic element at the missing value. For line charts, the result looks similar to wings.

clip

optional

The type of clipping to apply to the element.

none. Do not clip at all.

cell. Clip to the cell such that the glyph being clipped does not go outside of the cell of the graph.

domain. Clip to the domain. Do not let the bounds of the glyph exceed the domain.

closed

optional

If true, the element's end point will be connected to its start point.

boolean

coordinates

optional

Defines the coordinate system within which an element is drawn. If left undefined, the first coordinate system defined by the graph is used. This attribute is intended for only graphs with multiple coordinate systems, such as SPLOMs with histograms on the diagonal.

IDREF

dot

optional

Usually an element's expression is crossed with the faceting, so that blends in the faceting will induce multiple copies of the data in the graph. If this parameter is set to true, the expressions will be dotted together, making fewer copies.

boolean

id

optional

An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one.

ID

labelCollisionHandling

optional

Allows the use of one or more algorithms to avoid collision among labels by moving them slightly around their original positions.

none. Labels will not be moved.

normal. Labels will be moved so as to avoid collisions. A short amount of time will be allocated to this algorithm.

fast. Labels will be moved so as to avoid collisions. A very short amount of time will be allocated to this algorithm; effectively it will not attempt many changes.

quality. Labels will be moved so as to avoid collisions. A long amount of time will be allocated to this algorithm; possibly up to a half second or so.

extreme. Labels will be moved so as to avoid collisions. The process will be allowed to run for a very long period of time; many seconds or so are possible. This option should only be used when time is not important.

outside. Labels will be moved so as to radiate outwards from the center of the cell.

inside. Labels will be moved so as to radiate inwards from the center of the cell.

basic. Labels will be moved so as to avoid collisions. The process will be allowed to run for a very long period of time; many seconds or so are possible. This option should only be used when time is not important.

name

optional

A human-readable string that may be used to name the element in a legend or to be read by a screen reader. If not defined, the ID will be used instead.

string

positionModifier

optional

For elements that would be mapped to the same position, this attribute allows them to be stacked on top of each other, dodged to either side of each other, or have the intersection of their ranges removed form each of them (a difference effect).

none. Do nothing

center. Intervals that are centered will be moved around the center of the dimension

centerStacked. Intervals are stacked, then centered

stack. Elements that are split by a splitting aesthetic will be stacked on top of each other.

stackInterpolating. Deprecated. Please use stack instead. The difference has been eliminated. If items have the same coordinates except possibly for the response dimension, stack them on top of each other. If a value is missing at a given stack location, a linear interpolation will be performed to give it a value.

setMissingsToZero. A simple modifier that converts all missing values to zeros.

minusIntersection. Areas drawn with this modifier are subtracted from each other to create a 'difference area'. Although defined in terms of areas, and intended mainly for use in that element, it will work for all elements.

dodge. Items drawn at exactly the same location will be moved aside so they no longer occlude each other. The center of the set of moved items will be the same location as they originally occupied. This is used to create symmetric dot plots.

pile. Items drawn at exactly the same location will be moved aside so they no longer occlude each other. Instead of being centered at the original location as in 'dodge', they will be piled one on top of each other. This is used to create asymmetric dot plots.

jitterJointUniform. All elements are perturbed randomly along all dimensions using a uniform distribution.

jitterConditionalUniform. All elements are perturbed randomly on the dependent dimension using a uniform distribution.

jitterJointNormal. All elements are perturbed randomly along all dimensions using a normal distribution.

jitterConditionalNormal. All elements are perturbed randomly on the dependent dimension using a normal distribution.

preserveStraightLines

optional

If true, lines are not curved within the space, but drawn straight from defined point to defined point.

boolean

showCollidingLabels

optional

If no label collision handling is attempted, or if labels still collide afterwards, this parameter specifies whether a label will be drawn if it collides with a previously drawn label.

boolean

showDiscontinuity

optional

How to handle locations where there are multiple y values for a single x value. If true, a gap is left in the line. If false, they are connected.

boolean

style

optional

The basic style of this element.

IDREF

xLocation

optional

Sets the x location to a value in [0,1] coordinates. Overrides position and statistic values.

double

yLocation

optional

Sets the y location to a value in [0,1] coordinates. Overrides position and statistic values.

double

zLocation

optional

Sets the z location to a value in [0,1] coordinates. Overrides position and statistic values.

double

zOrder

optional

Integer that determines the order in which items are drawn. If this is not specified, items are drawn in the order they are found in the specification. This has no effect in a 3D chart.

int

line diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="line">
<xs:sequence>
<xs:element ref="vis:extension" minOccurs="0" maxOccurs="unbounded"></xs:element>
<xs:element ref="vis:conditionalStyle" minOccurs="0" maxOccurs="unbounded"></xs:element>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:group ref="vis:statistic">
<xs:choice>
<xs:element ref="vis:attach"></xs:element>
<xs:element ref="vis:binStatistic"></xs:element>
<xs:element ref="vis:aggregateStatistic"></xs:element>
<xs:element ref="vis:collectRowsStatistic"></xs:element>
<xs:element ref="vis:replicate"></xs:element>
<xs:element ref="vis:when"></xs:element>
<xs:element ref="vis:distributionStatistic"></xs:element>
<xs:element ref="vis:graphLayoutStatistic"></xs:element>
<xs:element ref="vis:linkStatistic"></xs:element>
<xs:element ref="vis:mapStatistic"></xs:element>
<xs:element ref="vis:regionStatistic"></xs:element>
<xs:element ref="vis:smoothStatistic"></xs:element>
<xs:element ref="vis:fixedWindowDensityStatistic"></xs:element>
<xs:element ref="vis:nearestNeighborDensityStatistic"></xs:element>
<xs:element ref="vis:summaryStatistic"></xs:element>
<xs:element ref="vis:treeLayoutStatistic"></xs:element>
<xs:element ref="vis:tagCloudStatistic"></xs:element>
<xs:element ref="vis:patternLinkStatistic"></xs:element>
<xs:element ref="vis:clusteringStatistic"></xs:element>
<xs:element ref="vis:SOMStatistic"></xs:element>
<xs:element ref="vis:tukeyStatistic"></xs:element>
</xs:choice>
</xs:group>
</xs:sequence>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:group ref="vis:aesthetic">
<xs:choice>
<xs:element ref="vis:visibility"></xs:element>
<xs:element ref="vis:colorComponent"></xs:element>
<xs:element ref="vis:color"></xs:element>
<xs:element ref="vis:dash"></xs:element>
<xs:element ref="vis:labeling"></xs:element>
<xs:element ref="vis:offset"></xs:element>
<xs:element ref="vis:pattern"></xs:element>
<xs:element ref="vis:image"></xs:element>
<xs:element ref="vis:rotation"></xs:element>
<xs:element ref="vis:shape"></xs:element>
<xs:element ref="vis:size"></xs:element>
<xs:element ref="vis:split"></xs:element>
<xs:element ref="vis:styleBy"></xs:element>
<xs:element ref="vis:transparency"></xs:element>
</xs:choice>
</xs:group>
</xs:choice>
<xs:element ref="vis:position" minOccurs="0" maxOccurs="unbounded"></xs:element>
<xs:element ref="vis:x" minOccurs="0"></xs:element>
<xs:element ref="vis:y" minOccurs="0"></xs:element>
<xs:element ref="vis:z" minOccurs="0"></xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="clip">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="none"></xs:enumeration>
<xs:enumeration value="cell"></xs:enumeration>
<xs:enumeration value="domain"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="style" type="xs:IDREF"></xs:attribute>
<xs:attribute name="name" type="xs:string"></xs:attribute>
<xs:attribute name="dot" type="xs:boolean"></xs:attribute>
<xs:attribute name="labelCollisionHandling">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="none"></xs:enumeration>
<xs:enumeration value="normal"></xs:enumeration>
<xs:enumeration value="fast"></xs:enumeration>
<xs:enumeration value="quality"></xs:enumeration>
<xs:enumeration value="extreme"></xs:enumeration>
<xs:enumeration value="outside"></xs:enumeration>
<xs:enumeration value="inside"></xs:enumeration>
<xs:enumeration value="basic"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="showCollidingLabels" type="xs:boolean"></xs:attribute>
<xs:attribute name="coordinates" type="xs:IDREF"></xs:attribute>
<xs:attribute name="positionModifier">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="none"></xs:enumeration>
<xs:enumeration value="center"></xs:enumeration>
<xs:enumeration value="centerStacked"></xs:enumeration>
<xs:enumeration value="stack"></xs:enumeration>
<xs:enumeration value="stackInterpolating"></xs:enumeration>
<xs:enumeration value="setMissingsToZero"></xs:enumeration>
<xs:enumeration value="minusIntersection"></xs:enumeration>
<xs:enumeration value="dodge"></xs:enumeration>
<xs:enumeration value="pile"></xs:enumeration>
<xs:enumeration value="jitterJointUniform"></xs:enumeration>
<xs:enumeration value="jitterConditionalUniform"></xs:enumeration>
<xs:enumeration value="jitterJointNormal"></xs:enumeration>
<xs:enumeration value="jitterConditionalNormal"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="xLocation" type="xs:double"></xs:attribute>
<xs:attribute name="yLocation" type="xs:double"></xs:attribute>
<xs:attribute name="zLocation" type="xs:double"></xs:attribute>
<xs:attribute name="zOrder" type="xs:int"></xs:attribute>
<xs:attribute name="breakRepresentation" type="vis:breakRepresentationType">
<xs:enumeration value="gap"></xs:enumeration>
<xs:enumeration value="interpolate"></xs:enumeration>
<xs:enumeration value="wings"></xs:enumeration>
</xs:attribute>
<xs:attribute name="showDiscontinuity" type="xs:boolean"></xs:attribute>
<xs:attribute name="closed" type="xs:boolean"></xs:attribute>
<xs:attribute name="preserveStraightLines" type="xs:boolean"></xs:attribute>
</xs:element>

Parent Elements

graph Element

Child Elements

aggregateStatistic Element, attach Element, binStatistic Element, clusteringStatistic Element, collectRowsStatistic Element, color Element, colorComponent Element, conditionalStyle Element, dash Element, distributionStatistic Element, extension Element, fixedWindowDensityStatistic Element, graphLayoutStatistic Element, image Element, labeling Element, linkStatistic Element, mapStatistic Element, nearestNeighborDensityStatistic Element, offset Element, pattern Element, patternLinkStatistic Element, position Element, regionStatistic Element, replicate Element, rotation Element, shape Element, size Element, smoothStatistic Element, SOMStatistic Element, split Element, styleBy Element, summaryStatistic Element, tagCloudStatistic Element, transparency Element, treeLayoutStatistic Element, tukeyStatistic Element, visibility Element, when Element, x Element, y Element, z Element

Related Elements

area Element, edge Element, interval Element, path Element, polygon Element, schema Element


lineGuide Element

lineGuide element,lineGuide element,lineGuide element

A line guide. Coordinates at which to draw the line must be provided. A position must be specified with the coordinate properties in data space: x, y, z, x1, x2, y1, y2. By using combinations, it is possible to create lines to be drawn in any 2D orientation, and lying at a z depth, for a particular facet. This guide can be used in 2D and 3D systems.

Attributes for lineGuide
Attribute | Use | Description | Valid Values
coordinates | optional | Defines the coordinate system within which an element is drawn. If left undefined, the first coordinate system defined by the graph is used. This attribute is intended for only graphs with multiple coordinate systems, such as SPLOMs with histograms on the diagonal. | IDREF
expandToFit | optional | If true, the range should be expanded to fit this guide. | boolean
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
name | optional | The name of the guide. The name is a human-readable string that may be used to name the guide in a legend or to be read by a screen reader. If not defined, the ID will be used instead. | string
style | optional | The style for this guide. | IDREF
x | optional | Location of vertical line on x axis. | string
x1 | optional | When x and y not specified, (x1,y1,x2,y2) define the line to be drawn. | string
x2 | optional | When x and y not specified, (x1,y1,x2,y2) define the line to be drawn. | string
y | optional | Location of horizontal line on y axis. | string
y1 | optional | When x and y not specified, (x1,y1,x2,y2) define the line to be drawn. | string
y2 | optional | When x and y not specified, (x1,y1,x2,y2) define the line to be drawn. | string
z | optional | Location of line in z dimension. | string
z1 | optional | When x and y not specified, (x1,y1,x2,y2) define the line to be drawn. | string
z2 | optional | When x and y not specified, (x1,y1,x2,y2) define the line to be drawn. | string
zOrder | optional | Integer that determines the order in which items are drawn. If this is not specified, items are drawn in the order they are found in the specification. | int
lineGuide diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="lineGuide">
<xs:sequence>
<xs:element ref="vis:label" minOccurs="0" maxOccurs="unbounded"></xs:element>
<xs:element ref="vis:conditionalStyle" minOccurs="0" maxOccurs="unbounded"></xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="name" type="xs:string"></xs:attribute>
<xs:attribute name="style" type="xs:IDREF"></xs:attribute>
<xs:attribute name="zOrder" type="xs:int"></xs:attribute>
<xs:attribute name="x" type="xs:string"></xs:attribute>
<xs:attribute name="y" type="xs:string"></xs:attribute>
<xs:attribute name="z" type="xs:string"></xs:attribute>
<xs:attribute name="x1" type="xs:string"></xs:attribute>
<xs:attribute name="x2" type="xs:string"></xs:attribute>
<xs:attribute name="y1" type="xs:string"></xs:attribute>
<xs:attribute name="y2" type="xs:string"></xs:attribute>
<xs:attribute name="z1" type="xs:string"></xs:attribute>
<xs:attribute name="z2" type="xs:string"></xs:attribute>
<xs:attribute name="expandToFit" type="xs:boolean"></xs:attribute>
<xs:attribute name="coordinates" type="xs:IDREF"></xs:attribute>
</xs:element>

Parent Elements

graph Element

Child Elements

conditionalStyle Element, label Element

Related Elements

frameGuide Element, functionGuide Element, planeGuide Element, pointGuide Element, rectangleGuide Element


lineGuideController Element

lineGuideController element,lineGuideController element,lineGuideController element

Specifies a controller that will create line guides in response to user clicks. Users can drag the existing line guides to new locations.

Attributes for lineGuideController
Attribute | Use | Description | Valid Values
active | optional | If set to false, the controller will be inactive | boolean
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
newLineOrientation | optional | The dimension against which any new line guides are created. | x. Used for the x dimension. y. Used for the y dimension. z. Used for the z dimension.
lineGuideController diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="lineGuideController">
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="active" type="xs:boolean"></xs:attribute>
<xs:attribute name="newLineOrientation" type="vis:dimensionType">
<xs:enumeration value="x"></xs:enumeration>
<xs:enumeration value="y"></xs:enumeration>
<xs:enumeration value="z"></xs:enumeration>
</xs:attribute>
</xs:element>

Parent Elements

visualization Element

Related Elements

animation Element, brushing Element, dragElement Element, drillDown Element, facetSortController Element, layerController Element, pivotController Element, popup Element, rectangleGuideController Element, swingController Element


linkStatistic Element

linkStatistic element,linkStatistic element,linkStatistic element

Creates links between data points. The 'type' determines the type of link. If the type is 'byDimension' (the default), then the X,Y and Z attributes determine the behavior on a per-dimension basis. Any dimension left unspecified copies the locations from the data points.

Attributes for linkStatistic
Attribute Use Description Valid Values

id

optional

An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one.

ID

neighborCount

optional

If type=neighbor, the number of neighbors to link.

integer

radius

optional

If type=alpha or type=distance, the maximum radius allowed for a link.

integer

type

optional

The type of links to create. Defaults to 'byDimension'.

byDimension. Links points to common locations such as centroids.

complete. Draws a complete graph.

minimalSpanningTree. Draws a minimal spanning tree.

nearestNeighbor. Draws all nearest neighbor links.

hull. Draws the convex hull

join. Joins up row i with row i+n/2. Any odd row will yield a single point.

sequence. Joins up row 2*i with row 2*i+1. Any odd row will yield a single point.

delaunay. Calculates the Delaunay triangulation of the set of points.

tsp. Makes a cycle of edges that represent the shortest route through a set of points. This will be an approximation since the exact algorithm is NP-hard.

alpha. Draws an edge between any pair of points that can be touched by an open disk D(alpha) containing no points.

gabriel. This is a subset of the Delaunay triangulation. Draws an edge between any pair of points that have a D(2) containing no points.

relativeNeighborhood. This is a subset of the Delaunay triangulation. Draws an edge between any pair of points p and q for which r is the distance between p and q and the intersection of D(p,r) and D(q,r) contains no points. This intersection region is called a lune.

knn. Draws a directed edge between p and q if the distance between them is among the k smallest distances.

distance. Draws an edge between any pair of points that both lie in a D(r). The radius r defines the size of the neighborhood.

influence. Draws an edge between any pair of points p and q if d(p,q) <= dnn(p) + dnn(q), where dnn(x) is the nearest neighbor distance for point x.

x

optional

If type=byDimension, determines the location to which to link the x dimension.

centroid. Specifies that a link terminates at the mean value of the group on which the statistic is calculated.

base. Specifies that a link terminates at the "bottom" of the plot area.

origin. specifies that a link terminates at the origin of the charts coordinate space.

midrange. Specifies that a link terminates at the middle of the range of values of the group on which the statistic is calculated.

y

optional

If type=byDimension, determines the location to which to link the y dimension.

centroid. Specifies that a link terminates at the mean value of the group on which the statistic is calculated.

base. Specifies that a link terminates at the "bottom" of the plot area.

origin. specifies that a link terminates at the origin of the charts coordinate space.

midrange. Specifies that a link terminates at the middle of the range of values of the group on which the statistic is calculated.

z

optional

If type=byDimension, the location to which to link the z dimension.

centroid. Specifies that a link terminates at the mean value of the group on which the statistic is calculated.

base. Specifies that a link terminates at the "bottom" of the plot area.

origin. specifies that a link terminates at the origin of the charts coordinate space.

midrange. Specifies that a link terminates at the middle of the range of values of the group on which the statistic is calculated.

linkStatistic diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="linkStatistic">
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="type" type="vis:linkType">
<xs:enumeration value="byDimension"></xs:enumeration>
<xs:enumeration value="complete"></xs:enumeration>
<xs:enumeration value="minimalSpanningTree"></xs:enumeration>
<xs:enumeration value="nearestNeighbor"></xs:enumeration>
<xs:enumeration value="hull"></xs:enumeration>
<xs:enumeration value="join"></xs:enumeration>
<xs:enumeration value="sequence"></xs:enumeration>
<xs:enumeration value="delaunay"></xs:enumeration>
<xs:enumeration value="tsp"></xs:enumeration>
<xs:enumeration value="alpha"></xs:enumeration>
<xs:enumeration value="gabriel"></xs:enumeration>
<xs:enumeration value="relativeNeighborhood"></xs:enumeration>
<xs:enumeration value="knn"></xs:enumeration>
<xs:enumeration value="distance"></xs:enumeration>
<xs:enumeration value="influence"></xs:enumeration>
</xs:attribute>
<xs:attribute name="x" type="vis:linkToType">
<xs:enumeration value="centroid"></xs:enumeration>
<xs:enumeration value="base"></xs:enumeration>
<xs:enumeration value="origin"></xs:enumeration>
<xs:enumeration value="midrange"></xs:enumeration>
</xs:attribute>
<xs:attribute name="y" type="vis:linkToType">
<xs:enumeration value="centroid"></xs:enumeration>
<xs:enumeration value="base"></xs:enumeration>
<xs:enumeration value="origin"></xs:enumeration>
<xs:enumeration value="midrange"></xs:enumeration>
</xs:attribute>
<xs:attribute name="z" type="vis:linkToType">
<xs:enumeration value="centroid"></xs:enumeration>
<xs:enumeration value="base"></xs:enumeration>
<xs:enumeration value="origin"></xs:enumeration>
<xs:enumeration value="midrange"></xs:enumeration>
</xs:attribute>
<xs:attribute name="neighborCount" type="xs:integer"></xs:attribute>
<xs:attribute name="radius" type="xs:integer"></xs:attribute>
</xs:element>

Parent Elements

area Element, edge Element, faceting Element, interval Element, line Element, path Element, point Element, polygon Element, schema Element


location Element

location element,location element,location element

The bounds of the frame, specified relative to the parent frame.

Attributes for location
Attribute Use Description Valid Values

id

optional

An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one.

ID

max

optional

Defines a maximum value that will override the desired value when applicable.

length

method

optional

The method used to define the location.

fixed. Use a fixed value for the location. This can be an absolute or percentage value.

sizeToContent. Size to fit the contents of the parent frame. This can be used for 'width' and 'height' location parts.

same. Use the same value as that used for a referenced frame.

attach. Use the same value as that used for the opposite side of a referenced frame.

min

optional

Defines a minimum value that will override the desired value when applicable.

length

part

required

What part of the location this element defines.

left
right
top
bottom
width
height

specifiedByUser

optional

Flag of default locations in GPL.

boolean

target

optional

This is the frame that the current component will attach to. For example, if you have a legend, and you want to attach it to the graph, then the graph would be the target.

IDREF

value

optional

Defines the desired value for the frame part location.

length

location diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="location">
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="part" type="vis:locationPartType" use="required">
<xs:enumeration value="left"></xs:enumeration>
<xs:enumeration value="right"></xs:enumeration>
<xs:enumeration value="top"></xs:enumeration>
<xs:enumeration value="bottom"></xs:enumeration>
<xs:enumeration value="width"></xs:enumeration>
<xs:enumeration value="height"></xs:enumeration>
</xs:attribute>
<xs:attribute name="method" type="vis:locationMethodType">
<xs:enumeration value="fixed"></xs:enumeration>
<xs:enumeration value="sizeToContent"></xs:enumeration>
<xs:enumeration value="same"></xs:enumeration>
<xs:enumeration value="attach"></xs:enumeration>
</xs:attribute>
<xs:attribute name="value" type="vis:length"></xs:attribute>
<xs:attribute name="min" type="vis:length"></xs:attribute>
<xs:attribute name="max" type="vis:length"></xs:attribute>
<xs:attribute name="target" type="xs:IDREF"></xs:attribute>
<xs:attribute name="specifiedByUser" type="xs:boolean"></xs:attribute>
</xs:element>

Parent Elements

container Element, controlFrame Element, graph Element, labelFrame Element, legend Element, visualization Element


majorTicks Element

majorTicks element,majorTicks element,majorTicks element

Tick marks for an axis.

Attributes for majorTicks
Attribute | Use | Description | Valid Values
base | optional | A value at which a tick mark is desired. Ticks start at this value and then are placed above and below this value at integral increments of the delta value (which is chosen automatically if not specified). Only ticks lying within the axes bounds are displayed. It is legal for this value to be outside the axis range. For example, if the axis range is [7,23] and delta is 4, a base of 1 will place ticks at 9, 13, 17, 21. | dateOrNumber
delta | optional | The increment between two tick marks, expressed in the units of the data itself. For date data, the deltaUnit attribute defines which units to use. | string
deltaUnit | optional | For date scales, determines what the units for the delta are. | second minute hour day week month year
id | optional | Identifier for the item. | ID
labelAngle | optional | An angle in degrees between 0 and 360 specifying at what angle the labels for the ticks should be drawn. Zero is horizontal. If left undefined a suitable angle is chosen so as to make the axis as legible as possible in as compact a space as possible. | any
labelFrequency | optional | If set greater than 1, labels will be skipped so as to show every nth label, where n is the value of this attribute. | positiveInteger
length | optional | The tick mark length. If undefined a value is chosen proportional to the font size used for the tick labels. | length
markStyle | optional | Style for the actual tick marks, which are the small lines not including the labels. | IDREF
position | optional | The allowed positions for tick marks relative to the axis baseline. | inside. Place ticks inside the axis. outside. Place ticks outside the axis. cross. Place ticks so they cross the axis.
stagger | optional | If true, a staggered pattern is applied, with every second label placed a line lower than usual, so that longer labels can be drawn without occlusion. Tick marks are extended so they connect to the staggered labels. If undefined, stagger may be chosen if it is the best way to make the axis legible and compact. | boolean
style | optional | The style for each of the tick labels. | IDREF
tickFrameStyle | optional | The style for each of the tick label's frames. | IDREF
zOrder | optional | Integer that determines the order in which items are drawn. If this is not specified, items are drawn in the order they are found in the specification. | int
majorTicks diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="majorTicks">
<xs:sequence>
<xs:element ref="vis:gridline" minOccurs="0"></xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="position">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="inside"></xs:enumeration>
<xs:enumeration value="outside"></xs:enumeration>
<xs:enumeration value="cross"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="markStyle" type="xs:IDREF"></xs:attribute>
<xs:attribute name="length" type="vis:length"></xs:attribute>
<xs:attribute name="zOrder" type="xs:int"></xs:attribute>
<xs:choice minOccurs="0">
<xs:element ref="vis:label" minOccurs="0"></xs:element>
<xs:element ref="vis:format"></xs:element>
</xs:choice>
<xs:attribute name="style" type="xs:IDREF"></xs:attribute>
<xs:attribute name="tickFrameStyle" type="xs:IDREF"></xs:attribute>
<xs:attribute name="labelAngle">
<xs:simpleType>
<xs:restriction base="xs:double">
<xs:minInclusive value="-360"></xs:minInclusive>
<xs:maxInclusive value="360"></xs:maxInclusive>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="stagger" type="xs:boolean"></xs:attribute>
<xs:attribute name="labelFrequency" type="xs:positiveInteger"></xs:attribute>
<xs:attribute name="delta" type="xs:string"></xs:attribute>
<xs:attribute name="deltaUnit">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="second"></xs:enumeration>
<xs:enumeration value="minute"></xs:enumeration>
<xs:enumeration value="hour"></xs:enumeration>
<xs:enumeration value="day"></xs:enumeration>
<xs:enumeration value="week"></xs:enumeration>
<xs:enumeration value="month"></xs:enumeration>
<xs:enumeration value="year"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="base" type="vis:dateOrNumber"></xs:attribute>
</xs:element>

Parent Elements

axis Element

Child Elements

format Element, gridline Element, label Element

Related Elements

minorTicks Element


mapStatistic Element

mapStatistic element,mapStatistic element,mapStatistic element

Defines a set of map features based on a map source and a variable defining keys into that map source.

Attributes for mapStatistic
Attribute | Use | Description | Valid Values
dataKey | optional | The variable in the data used as a key to match map features in the map file. The values from the variable specified must match the key values found in the map file. | any
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
keyVariable | optional | Variable in the data used as a key to match map features in the map file. The values from the variable specified must match the key values found in the map file. | IDREF
layer | optional | Layer within the map file currently being used. | string
mapFile | required | File path or URL to map file. | string
mapKey | optional | Name of the key in the map used to match map features in the map file. | string
showAll | optional | If true, all map features will be shown. If false, only those matching data will be shown. | boolean
sourceFormat | optional | Format of the source map file. | any
mapStatistic diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="mapStatistic">
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element ref="vis:categories"></xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="mapFile" type="xs:string" use="required"></xs:attribute>
<xs:attribute name="showAll" type="xs:boolean"></xs:attribute>
<xs:attribute name="mapKey" type="xs:string"></xs:attribute>
<xs:attribute name="layer" type="xs:string"></xs:attribute>
<xs:attribute name="keyVariable" type="xs:IDREF"></xs:attribute>
<xs:attribute name="sourceFormat"></xs:attribute>
<xs:attribute name="dataKey"></xs:attribute>
</xs:element>

Parent Elements

area Element, edge Element, faceting Element, interval Element, line Element, path Element, point Element, polygon Element, schema Element

Child Elements

categories Element


minorTicks Element

minorTicks element,minorTicks element,minorTicks element

Minor tick marks for an axis.

Attributes for minorTicks
Attribute | Use | Description | Valid Values
id | optional | Identifier for the item. | ID
length | optional | The tick mark length. If undefined a value is chosen proportional to the font size used for the tick labels. | length
markStyle | optional | Style for the actual tick marks, which are the small lines not including the labels. | IDREF
number | optional | The number of minor ticks per major tick division. | positiveInteger
position | optional | The allowed positions for tick marks relative to the axis baseline. | inside. Place ticks inside the axis. outside. Place ticks outside the axis. cross. Place ticks so they cross the axis.
zOrder | optional | Integer that determines the order in which items are drawn. If this is not specified, items are drawn in the order they are found in the specification. | int
minorTicks diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="minorTicks">
<xs:sequence>
<xs:element ref="vis:gridline" minOccurs="0"></xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="position">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="inside"></xs:enumeration>
<xs:enumeration value="outside"></xs:enumeration>
<xs:enumeration value="cross"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="markStyle" type="xs:IDREF"></xs:attribute>
<xs:attribute name="length" type="vis:length"></xs:attribute>
<xs:attribute name="zOrder" type="xs:int"></xs:attribute>
<xs:attribute name="number" type="xs:positiveInteger"></xs:attribute>
</xs:element>

Parent Elements

axis Element

Child Elements

gridline Element

Related Elements

majorTicks Element


multipleResponseVariable Element

multipleResponseVariable element,multipleResponseVariable element,multipleResponseVariable element

Multiple Response Variables are used to represent multiple response sets. For example, if this is asked "Please select all sports you like:" with the options of "skiing, hunting, boating and volleyball". Set the label to be the question, and the expression to be the items, seperated by "+", like this: "skiing+hunting+boating+volleyball".

Attributes for multipleResponseVariable
Attribute Use Description Valid Values

categorical

optional

Whether this variable is categorical. If not, and it is not a date, the data values are converted to doubles. The difference between a categorical and non-categorical variable is profound and determines whether it can be used for faceting, the aesthetics with which it can be used, and other purposes. It is legal and often useful to have two variables use the same base data with different values for categorical and/or other attributes.

boolean

categoryComponents

optional

If true, the variable coponents are categories, not dichotomous flags which is the default

boolean

creator

optional

The creator of this variable.

string

dependsOn

optional

The DependsOn variable is a variable which is tied to this one. This information is used by controllers to make sure that if they move one of the variables, the tied variable is also moved. As an example, a pivot table controller will move both of the variables at the same time, not allowing them to be moved independently . If a variable is a group for another categorical variable in a table, the group variable should define the categorical variable as a 'dependsOn' variable.

IDREF

description

optional

A description of the variable for human or machine use.

string

domain

optional

All data exist in some domain, and that domain is used to control what the "minimum" and "maximum" values are. By default, the domain of a variable is defined to be the data range (for continuous variables) or the set of unique values of a variable (for categorical variables). If this parameter is specified, the default domain is replaced with this one.

IDREF

domainModifier

optional

The domain modifier defines how the domain is modified.

IDREF

id

optional

Identifies the variable.

ID

key

optional

Indicates the variable can be used as a database key; all entries in it should be unique.

boolean

label

optional

A human-readable name for the variable (defaults to the ID).

string

labelVariable

optional

By default, the values of a categorical variable are used as the labels. If this attribute is specified, the given variable is used to label the categories of this variable. The label variable must be of the same length as this variable, since it matches on a row-by-row basis, and both must be categorical variables.

IDREF

measurementLevel

optional

A hint as to the scale for the data (nominal, ordinal, interval, ratio)

nominal. The only comparisons that can be made between nominal variable values are equality and inequality

ordinal. In this classification, the values can be given a rank order (1st, 2nd, 3rd etc.). Comparisons of greater and less can be made, in addition to equality and inequality

interval. In this classification, equal differences between measurements represent equivalent intervals. Operations such as addition and subtraction are therefore meaningful. The zero point on the scale is, however, arbitrary. Dates are a good example of intervals

ratio. In this classification, the ratios between pairs of numbers is meaningful. Operations such as multiplication and division are therefore meaningful. The zero value on a ratio scale is non-arbitrary

shortLabel

optional

A short human-readable label for the variable (defaults to the label).

string

source

optional

The data source that contains the variables from which this variable is derived.

IDREF

weight

optional

If true, this variable will be used as the weight for all data in the same source. At most one weight may be defined for a source. Statistics will treat these weights as replication weights unless otherwise noted.

boolean

multipleResponseVariable diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="multipleResponseVariable">
<xs:sequence>
<xs:element ref="vis:extension" minOccurs="0" maxOccurs="unbounded"></xs:element>
<xs:element name="aggregation" minOccurs="0"></xs:element>
<xs:element ref="vis:format" minOccurs="0"></xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="categorical" type="xs:boolean"></xs:attribute>
<xs:attribute name="measurementLevel" type="vis:measurementLevel">
<xs:enumeration value="nominal"></xs:enumeration>
<xs:enumeration value="ordinal"></xs:enumeration>
<xs:enumeration value="interval"></xs:enumeration>
<xs:enumeration value="ratio"></xs:enumeration>
</xs:attribute>
<xs:attribute name="label" type="xs:string"></xs:attribute>
<xs:attribute name="shortLabel" type="xs:string"></xs:attribute>
<xs:attribute name="domain" type="xs:IDREF"></xs:attribute>
<xs:attribute name="domainModifier" type="xs:IDREF"></xs:attribute>
<xs:attribute name="labelVariable" type="xs:IDREF"></xs:attribute>
<xs:attribute name="dependsOn" type="xs:IDREF"></xs:attribute>
<xs:attribute name="weight" type="xs:boolean"></xs:attribute>
<xs:attribute name="key" type="xs:boolean"></xs:attribute>
<xs:attribute name="creator" type="xs:string"></xs:attribute>
<xs:attribute name="description" type="xs:string"></xs:attribute>
<xs:attribute name="source" type="xs:IDREF"></xs:attribute>
<xs:sequence>
<xs:element ref="vis:variableReference" minOccurs="0" maxOccurs="unbounded"></xs:element>
</xs:sequence>
<xs:attribute name="categoryComponents" type="xs:boolean"></xs:attribute>
</xs:element>

Parent Elements

visualization Element

Child Elements

aggregation Element, extension Element, format Element, variableReference Element

Related Elements

derivedVariable Element, expressionVariable Element, sourceVariable Element


aggregation Element

aggregation element,aggregation element,aggregation element

Aggregates categories of a categorical variable based on the sum of values of a different variable.

Attributes for aggregation
Attribute | Use | Description | Valid Values
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
minFraction | required | The fraction (between 0 and 1) that will be used to determine if a category is to be aggregated. If a category has a summed value less than the given fraction of the overall sum, it will be aggregated unless it is the only such category (in which case there is nothing with which to aggregate it!). | any
newCategory | required | The name of the category that is created if any aggregation occurs. | string
sumVariable | optional | The variable whose categories are summed to determine the new category's size. | IDREF
aggregation diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="aggregation" minOccurs="0">
<xs:attribute name="newCategory" type="xs:string" use="required"></xs:attribute>
<xs:attribute name="sumVariable" type="xs:IDREF" use="optional"></xs:attribute>
<xs:attribute name="minFraction" use="required">
<xs:simpleType>
<xs:restriction base="xs:double">
<xs:minInclusive value="0"></xs:minInclusive>
<xs:maxInclusive value="1"></xs:maxInclusive>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
</xs:element>

Parent Elements

multipleResponseVariable Element


nearestNeighborDensityStatistic Element

nearestNeighborDensityStatistic element,nearestNeighborDensityStatistic element,nearestNeighborDensityStatistic element

A kernel density estimate for the distribution with a window that adapts to the local number of points.

Attributes for nearestNeighborDensityStatistic
Attribute | Use | Description | Valid Values
bounded | optional | Sets whether or not the model is bounded. If true, then the model is bounded. | boolean
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
kernel | optional | The type of kernel to use. | uniform. Specifies that a uniform kernel should be used. epanechnikov. Specifies that a Epanechnikov kernel should be used. biweight. Specifies that a biweight kernel should be used. triweight. Specifies that a triweight kernel should be used. tricube. Specifies that a tricube kernel should be used. gaussian. Specifies that a Gaussian kernel should be used. cauchy. Specifies that a Cauchy kernel should be used.
marron | optional | Whether or not to use the Marron adjustment for discrete data. | boolean
neighbors | optional | The number of neighbors to use to calculate the window width. | integer
segments | optional | The number of segments to predict. | integer
nearestNeighborDensityStatistic diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="nearestNeighborDensityStatistic">
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="kernel" type="vis:kernelType">
<xs:enumeration value="uniform"></xs:enumeration>
<xs:enumeration value="epanechnikov"></xs:enumeration>
<xs:enumeration value="biweight"></xs:enumeration>
<xs:enumeration value="triweight"></xs:enumeration>
<xs:enumeration value="tricube"></xs:enumeration>
<xs:enumeration value="gaussian"></xs:enumeration>
<xs:enumeration value="cauchy"></xs:enumeration>
</xs:attribute>
<xs:attribute name="marron" type="xs:boolean"></xs:attribute>
<xs:attribute name="segments" type="xs:integer"></xs:attribute>
<xs:attribute name="bounded" type="xs:boolean"></xs:attribute>
<xs:attribute name="neighbors" type="xs:integer"></xs:attribute>
</xs:element>

Parent Elements

area Element, edge Element, faceting Element, interval Element, line Element, path Element, point Element, polygon Element, schema Element

Related Elements

fixedWindowDensityStatistic Element


nest Element

nest element,nest element,nest element

The Grammar of Graphics nest operator takes two variables. The first is nested within the second on the same dimension.

Attributes for nest
Attribute | Use | Description | Valid Values
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
nest diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="nest">
<xs:choice maxOccurs="unbounded">
<xs:element ref="vis:variableReference"></xs:element>
<xs:element ref="vis:unity"></xs:element>
<xs:element ref="vis:blend"></xs:element>
<xs:element ref="vis:cross"></xs:element>
<xs:element ref="vis:nest"></xs:element>
<xs:element ref="vis:dot"></xs:element>
</xs:choice>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
</xs:element>

Parent Elements

blend Element, cross Element, dot Element, faceting Element

Child Elements

blend Element, cross Element, dot Element, nest Element, unity Element, variableReference Element


offset Element

offset element,offset element,offset element

Maps a variable to an offset that is used to nudge the variable in the y direction. Note that this happens after any coordinate transforms. A common use is to explode pie slices.

Attributes for offset
Attribute | Use | Description | Valid Values
clamp | optional | If true, values off the edges of the domain will be pegged to low or high values, not ignored. | boolean
dimension | optional | If the variable is an expression that contains more than one dimension of data (for example, the expression contained a cross of other variables), then this attribute specifies which of the variable's dimensions to use. The first is numbered 0, then 1, 2, etc. | nonNegativeInteger
domain | optional | If specified, this domain will be used to define the domain of the variable rather than the variable's default domain. For example, a user might choose to map 0 to black and 1 to white even if the data only run from 0.3 to 0.7. In this case a domain of [0,1] would be specified for the aesthetic. | IDREF
domainModifier | optional | The domain modifier defines how the domain is modified. | IDREF
high | optional | The high length. If the length is a percent, then the high size is a percentage of the whole chart space. | string
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
low | optional | The low length. If the length is a percent, then the low size is a percentage of the whole chart space. | string
missing | optional | The value to map missing values to. If the length is a percent, then the low size is a percentage of the whole chart space. | string
split | optional | If true, distinct values of the variable will have statistics computed on them independently. | boolean
variable | optional | Referers to a data variable. The values of this variable will be mapped to aesthetic values used to display the element. | IDREF
offset diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="offset">
<xs:sequence>
<xs:element ref="vis:scale" minOccurs="0"></xs:element>
<xs:element ref="vis:summaryStatistic" minOccurs="0"></xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="domainModifier" type="xs:IDREF"></xs:attribute>
<xs:attribute name="variable" type="xs:IDREF"></xs:attribute>
<xs:attribute name="dimension" type="xs:nonNegativeInteger"></xs:attribute>
<xs:attribute name="domain" type="xs:IDREF"></xs:attribute>
<xs:attribute name="clamp" type="xs:boolean"></xs:attribute>
<xs:attribute name="split" type="xs:boolean"></xs:attribute>
<xs:attribute name="missing" type="xs:string"></xs:attribute>
<xs:attribute name="low" type="xs:string"></xs:attribute>
<xs:attribute name="high" type="xs:string"></xs:attribute>
</xs:element>

Parent Elements

area Element, brushing Element, edge Element, interval Element, line Element, path Element, point Element, polygon Element, schema Element

Child Elements

scale Element, summaryStatistic Element

Related Elements

color Element, colorComponent Element, dash Element, footnotes Element, formatting Element, image Element, labeling Element, labelLocation Element, pattern Element, rotation Element, shape Element, size Element, split Element, styleBy Element, transparency Element, visibility Element


paragraph Element

paragraph element,paragraph element,paragraph element

Information about specifying the details of how to format a paragraph.

Attributes for paragraph
Attribute | Use | Description | Valid Values
hangingIndent | optional | The Hanging indent is the amount the second line should be indented. Only positive values are supported. Use 0 or null for no hanging indent. | length
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
paragraph diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="paragraph">
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="hangingIndent" type="vis:length"></xs:attribute>
</xs:element>

Parent Elements

labelFrame Element


path Element

path element,path element,path element

A path element.

Attributes for path
Attribute Use Description Valid Values

breakRepresentation

optional

How to represent breaks at missing data.

gap. Specifies that the graphic element ends at a valid value and does not continue until the next valid value. There is a gap between valid values.

interpolate. Specifies that the graphic element is interpolated through missing values. That is, the graphic element is continuous from one valid value to another, regardless of missing values between the valid values.

wings. Specifies that the graphic element continues after a valid value in the direction of the next valid value but then breaks just before and after the missing value. This is like interpolating through the missing value and erasing the graphic element at the missing value. For line charts, the result looks similar to wings.

clip

optional

The type of clipping to apply to the element.

none. Do not clip at all.

cell. Clip to the cell such that the glyph being clipped does not go outside of the cell of the graph.

domain. Clip to the domain. Do not let the bounds of the glyph exceed the domain.

closed

optional

If true, the element's end point will be connected to its start point.

boolean

coordinates

optional

Defines the coordinate system within which an element is drawn. If left undefined, the first coordinate system defined by the graph is used. This attribute is intended for only graphs with multiple coordinate systems, such as SPLOMs with histograms on the diagonal.

IDREF

dot

optional

Usually an element's expression is crossed with the faceting, so that blends in the faceting will induce multiple copies of the data in the graph. If this parameter is set to true, the expressions will be dotted together, making fewer copies.

boolean

id

optional

An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one.

ID

labelCollisionHandling

optional

Allows the use of one or more algorithms to avoid collision among labels by moving them slightly around their original positions.

none. Labels will not be moved.

normal. Labels will be moved so as to avoid collisions. A short amount of time will be allocated to this algorithm.

fast. Labels will be moved so as to avoid collisions. A very short amount of time will be allocated to this algorithm; effectively it will not attempt many changes.

quality. Labels will be moved so as to avoid collisions. A long amount of time will be allocated to this algorithm; possibly up to a half second or so.

extreme. Labels will be moved so as to avoid collisions. The process will be allowed to run for a very long period of time; many seconds or so are possible. This option should only be used when time is not important.

outside. Labels will be moved so as to radiate outwards from the center of the cell.

inside. Labels will be moved so as to radiate inwards from the center of the cell.

basic. Labels will be moved so as to avoid collisions. The process will be allowed to run for a very long period of time; many seconds or so are possible. This option should only be used when time is not important.

name

optional

A human-readable string that may be used to name the element in a legend or to be read by a screen reader. If not defined, the ID will be used instead.

string

positionModifier

optional

For elements that would be mapped to the same position, this attribute allows them to be stacked on top of each other, dodged to either side of each other, or have the intersection of their ranges removed form each of them (a difference effect).

none. Do nothing

center. Intervals that are centered will be moved around the center of the dimension

centerStacked. Intervals are stacked, then centered

stack. Elements that are split by a splitting aesthetic will be stacked on top of each other.

stackInterpolating. Deprecated. Please use stack instead. The difference has been eliminated. If items have the same coordinates except possibly for the response dimension, stack them on top of each other. If a value is missing at a given stack location, a linear interpolation will be performed to give it a value.

setMissingsToZero. A simple modifier that converts all missing values to zeros.

minusIntersection. Areas drawn with this modifier are subtracted from each other to create a 'difference area'. Although defined in terms of areas, and intended mainly for use in that element, it will work for all elements.

dodge. Items drawn at exactly the same location will be moved aside so they no longer occlude each other. The center of the set of moved items will be the same location as they originally occupied. This is used to create symmetric dot plots.

pile. Items drawn at exactly the same location will be moved aside so they no longer occlude each other. Instead of being centered at the original location as in 'dodge', they will be piled one on top of each other. This is used to create asymmetric dot plots.

jitterJointUniform. All elements are perturbed randomly along all dimensions using a uniform distribution.

jitterConditionalUniform. All elements are perturbed randomly on the dependent dimension using a uniform distribution.

jitterJointNormal. All elements are perturbed randomly along all dimensions using a normal distribution.

jitterConditionalNormal. All elements are perturbed randomly on the dependent dimension using a normal distribution.

preserveStraightLines

optional

If true, lines are not curved within the space, but drawn straight from defined point to defined point.

boolean

showCollidingLabels

optional

If no label collision handling is attempted, or if labels still collide afterwards, this parameter specifies whether a label will be drawn if it collides with a previously drawn label.

boolean

showDiscontinuity

optional

How to handle locations where there are multiple y values for a single x value. If true, a gap is left in the line. If false, they are connected.

boolean

style

optional

The basic style of this element.

IDREF

xLocation

optional

Sets the x location to a value in [0,1] coordinates. Overrides position and statistic values.

double

yLocation

optional

Sets the y location to a value in [0,1] coordinates. Overrides position and statistic values.

double

zLocation

optional

Sets the z location to a value in [0,1] coordinates. Overrides position and statistic values.

double

zOrder

optional

Integer that determines the order in which items are drawn. If this is not specified, items are drawn in the order they are found in the specification. This has no effect in a 3D chart.

int

path diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="path">
<xs:sequence>
<xs:element ref="vis:extension" minOccurs="0" maxOccurs="unbounded"></xs:element>
<xs:element ref="vis:conditionalStyle" minOccurs="0" maxOccurs="unbounded"></xs:element>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:group ref="vis:statistic">
<xs:choice>
<xs:element ref="vis:attach"></xs:element>
<xs:element ref="vis:binStatistic"></xs:element>
<xs:element ref="vis:aggregateStatistic"></xs:element>
<xs:element ref="vis:collectRowsStatistic"></xs:element>
<xs:element ref="vis:replicate"></xs:element>
<xs:element ref="vis:when"></xs:element>
<xs:element ref="vis:distributionStatistic"></xs:element>
<xs:element ref="vis:graphLayoutStatistic"></xs:element>
<xs:element ref="vis:linkStatistic"></xs:element>
<xs:element ref="vis:mapStatistic"></xs:element>
<xs:element ref="vis:regionStatistic"></xs:element>
<xs:element ref="vis:smoothStatistic"></xs:element>
<xs:element ref="vis:fixedWindowDensityStatistic"></xs:element>
<xs:element ref="vis:nearestNeighborDensityStatistic"></xs:element>
<xs:element ref="vis:summaryStatistic"></xs:element>
<xs:element ref="vis:treeLayoutStatistic"></xs:element>
<xs:element ref="vis:tagCloudStatistic"></xs:element>
<xs:element ref="vis:patternLinkStatistic"></xs:element>
<xs:element ref="vis:clusteringStatistic"></xs:element>
<xs:element ref="vis:SOMStatistic"></xs:element>
<xs:element ref="vis:tukeyStatistic"></xs:element>
</xs:choice>
</xs:group>
</xs:sequence>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:group ref="vis:aesthetic">
<xs:choice>
<xs:element ref="vis:visibility"></xs:element>
<xs:element ref="vis:colorComponent"></xs:element>
<xs:element ref="vis:color"></xs:element>
<xs:element ref="vis:dash"></xs:element>
<xs:element ref="vis:labeling"></xs:element>
<xs:element ref="vis:offset"></xs:element>
<xs:element ref="vis:pattern"></xs:element>
<xs:element ref="vis:image"></xs:element>
<xs:element ref="vis:rotation"></xs:element>
<xs:element ref="vis:shape"></xs:element>
<xs:element ref="vis:size"></xs:element>
<xs:element ref="vis:split"></xs:element>
<xs:element ref="vis:styleBy"></xs:element>
<xs:element ref="vis:transparency"></xs:element>
</xs:choice>
</xs:group>
</xs:choice>
<xs:element ref="vis:position" minOccurs="0" maxOccurs="unbounded"></xs:element>
<xs:element ref="vis:x" minOccurs="0"></xs:element>
<xs:element ref="vis:y" minOccurs="0"></xs:element>
<xs:element ref="vis:z" minOccurs="0"></xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="clip">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="none"></xs:enumeration>
<xs:enumeration value="cell"></xs:enumeration>
<xs:enumeration value="domain"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="style" type="xs:IDREF"></xs:attribute>
<xs:attribute name="name" type="xs:string"></xs:attribute>
<xs:attribute name="dot" type="xs:boolean"></xs:attribute>
<xs:attribute name="labelCollisionHandling">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="none"></xs:enumeration>
<xs:enumeration value="normal"></xs:enumeration>
<xs:enumeration value="fast"></xs:enumeration>
<xs:enumeration value="quality"></xs:enumeration>
<xs:enumeration value="extreme"></xs:enumeration>
<xs:enumeration value="outside"></xs:enumeration>
<xs:enumeration value="inside"></xs:enumeration>
<xs:enumeration value="basic"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="showCollidingLabels" type="xs:boolean"></xs:attribute>
<xs:attribute name="coordinates" type="xs:IDREF"></xs:attribute>
<xs:attribute name="positionModifier">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="none"></xs:enumeration>
<xs:enumeration value="center"></xs:enumeration>
<xs:enumeration value="centerStacked"></xs:enumeration>
<xs:enumeration value="stack"></xs:enumeration>
<xs:enumeration value="stackInterpolating"></xs:enumeration>
<xs:enumeration value="setMissingsToZero"></xs:enumeration>
<xs:enumeration value="minusIntersection"></xs:enumeration>
<xs:enumeration value="dodge"></xs:enumeration>
<xs:enumeration value="pile"></xs:enumeration>
<xs:enumeration value="jitterJointUniform"></xs:enumeration>
<xs:enumeration value="jitterConditionalUniform"></xs:enumeration>
<xs:enumeration value="jitterJointNormal"></xs:enumeration>
<xs:enumeration value="jitterConditionalNormal"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="xLocation" type="xs:double"></xs:attribute>
<xs:attribute name="yLocation" type="xs:double"></xs:attribute>
<xs:attribute name="zLocation" type="xs:double"></xs:attribute>
<xs:attribute name="zOrder" type="xs:int"></xs:attribute>
<xs:attribute name="breakRepresentation" type="vis:breakRepresentationType">
<xs:enumeration value="gap"></xs:enumeration>
<xs:enumeration value="interpolate"></xs:enumeration>
<xs:enumeration value="wings"></xs:enumeration>
</xs:attribute>
<xs:attribute name="showDiscontinuity" type="xs:boolean"></xs:attribute>
<xs:attribute name="closed" type="xs:boolean"></xs:attribute>
<xs:attribute name="preserveStraightLines" type="xs:boolean"></xs:attribute>
</xs:element>

Parent Elements

graph Element

Child Elements

aggregateStatistic Element, attach Element, binStatistic Element, clusteringStatistic Element, collectRowsStatistic Element, color Element, colorComponent Element, conditionalStyle Element, dash Element, distributionStatistic Element, extension Element, fixedWindowDensityStatistic Element, graphLayoutStatistic Element, image Element, labeling Element, linkStatistic Element, mapStatistic Element, nearestNeighborDensityStatistic Element, offset Element, pattern Element, patternLinkStatistic Element, position Element, regionStatistic Element, replicate Element, rotation Element, shape Element, size Element, smoothStatistic Element, SOMStatistic Element, split Element, styleBy Element, summaryStatistic Element, tagCloudStatistic Element, transparency Element, treeLayoutStatistic Element, tukeyStatistic Element, visibility Element, when Element, x Element, y Element, z Element

Related Elements

area Element, edge Element, interval Element, line Element, polygon Element, schema Element


pattern Element

pattern element,pattern element,pattern element

Maps a categorical variable to a pattern used to fill the interior of the element.

Attributes for pattern
Attribute | Use | Description | Valid Values
clamp | optional | If true, values off the edges of the domain will be pegged to low or high values, not ignored. | boolean
cycle | optional | The cycle that will be applied to categorical data. The patterns will be extracted from the style cycle and used for each distinct category in the data in order | IDREF
dimension | optional | If the variable is an expression that contains more than one dimension of data (for example, the expression contained a cross of other variables), then this attribute specifies which of the variable's dimensions to use. The first is numbered 0, then 1, 2, etc. | nonNegativeInteger
domain | optional | If specified, this domain will be used to define the domain of the variable rather than the variable's default domain. For example, a user might choose to map 0 to black and 1 to white even if the data only run from 0.3 to 0.7. In this case a domain of [0,1] would be specified for the aesthetic. | IDREF
domainModifier | optional | The domain modifier defines how the domain is modified. | IDREF
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
missing | optional | The pattern index to map missing values to | int
split | optional | If true, distinct values of the variable will have statistics computed on them independently. | boolean
variable | optional | Referers to a data variable. The values of this variable will be mapped to aesthetic values used to display the element. | IDREF
pattern diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="pattern">
<xs:sequence>
<xs:element ref="vis:scale" minOccurs="0"></xs:element>
<xs:element ref="vis:summaryStatistic" minOccurs="0"></xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="domainModifier" type="xs:IDREF"></xs:attribute>
<xs:attribute name="variable" type="xs:IDREF"></xs:attribute>
<xs:attribute name="dimension" type="xs:nonNegativeInteger"></xs:attribute>
<xs:attribute name="domain" type="xs:IDREF"></xs:attribute>
<xs:attribute name="clamp" type="xs:boolean"></xs:attribute>
<xs:attribute name="split" type="xs:boolean"></xs:attribute>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element ref="vis:integerMapping" minOccurs="0"></xs:element>
</xs:sequence>
<xs:attribute name="missing" type="xs:int"></xs:attribute>
<xs:attribute name="cycle" type="xs:IDREF"></xs:attribute>
</xs:element>

Parent Elements

area Element, brushing Element, edge Element, interval Element, line Element, path Element, point Element, polygon Element, schema Element

Child Elements

integerMapping Element, scale Element, summaryStatistic Element

Related Elements

color Element, colorComponent Element, dash Element, footnotes Element, formatting Element, image Element, labeling Element, labelLocation Element, offset Element, rotation Element, shape Element, size Element, split Element, styleBy Element, transparency Element, visibility Element


patternLinkStatistic Element

patternLinkStatistic element,patternLinkStatistic element,patternLinkStatistic element

Used on a stat variable that is simply a sequence, it detects sequences and creates edges between the sequence centers. The weight for the link is set to be the number in the sequence.

Attributes for patternLinkStatistic
Attribute | Use | Description | Valid Values
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
item | optional | The variable that gives the catgeory for each item | IDREF
minLength | optional | The smallest sequence length that will be used | integer
patternLinkStatistic diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="patternLinkStatistic">
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="item" type="xs:IDREF"></xs:attribute>
<xs:attribute name="minLength" type="xs:integer"></xs:attribute>
</xs:element>

Parent Elements

area Element, edge Element, faceting Element, interval Element, line Element, path Element, point Element, polygon Element, schema Element


pivotController Element

pivotController element,pivotController element,pivotController element

Specifies that when you click on a a given frame, you will be able to modify filters for a given source

Attributes for pivotController
Attribute | Use | Description | Valid Values
active | optional | If set to false, the controller will be inactive | boolean
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
pivotController diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="pivotController">
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="active" type="xs:boolean"></xs:attribute>
</xs:element>

Parent Elements

visualization Element

Related Elements

animation Element, brushing Element, dragElement Element, drillDown Element, facetSortController Element, layerController Element, lineGuideController Element, popup Element, rectangleGuideController Element, swingController Element


planeGuide Element

planeGuide element,planeGuide element,planeGuide element

A plane guide in 3D. The plane is drawn normal to an axis at the back of the coordinate system. The normal is specified by the normal attribute.

Attributes for planeGuide
Attribute | Use | Description | Valid Values
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
name | optional | The name of the guide. The name is a human-readable string that may be used to name the guide in a legend or to be read by a screen reader. If not defined, the ID will be used instead. | string
normal | optional | The dimension of the normal vector to the plane (e.g., if the normal is 'x', then the plane is in the y-z dimensions) | x. Used for the x axis. y. Used for the y axis. z. Used for the z axis.
style | optional | The style for this guide. | IDREF
zOrder | optional | Integer that determines the order in which items are drawn. If this is not specified, items are drawn in the order they are found in the specification. | int
planeGuide diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="planeGuide">
<xs:sequence>
<xs:element ref="vis:label" minOccurs="0" maxOccurs="unbounded"></xs:element>
<xs:element ref="vis:conditionalStyle" minOccurs="0" maxOccurs="unbounded"></xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="name" type="xs:string"></xs:attribute>
<xs:attribute name="style" type="xs:IDREF"></xs:attribute>
<xs:attribute name="zOrder" type="xs:int"></xs:attribute>
<xs:attribute name="normal" type="vis:axisType">
<xs:enumeration value="x"></xs:enumeration>
<xs:enumeration value="y"></xs:enumeration>
<xs:enumeration value="z"></xs:enumeration>
</xs:attribute>
</xs:element>

Parent Elements

graph Element

Child Elements

conditionalStyle Element, label Element

Related Elements

frameGuide Element, functionGuide Element, lineGuide Element, pointGuide Element, rectangleGuide Element


point Element

point element,point element,point element

A point element.

Attributes for point
Attribute Use Description Valid Values

clip

optional

The type of clipping to apply to the element.

none. Do not clip at all.

cell. Clip to the cell such that the glyph being clipped does not go outside of the cell of the graph.

domain. Clip to the domain. Do not let the bounds of the glyph exceed the domain.

coordinates

optional

Defines the coordinate system within which an element is drawn. If left undefined, the first coordinate system defined by the graph is used. This attribute is intended for only graphs with multiple coordinate systems, such as SPLOMs with histograms on the diagonal.

IDREF

dot

optional

Usually an element's expression is crossed with the faceting, so that blends in the faceting will induce multiple copies of the data in the graph. If this parameter is set to true, the expressions will be dotted together, making fewer copies.

boolean

id

optional

An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one.

ID

labelCollisionHandling

optional

Allows the use of one or more algorithms to avoid collision among labels by moving them slightly around their original positions.

none. Labels will not be moved.

normal. Labels will be moved so as to avoid collisions. A short amount of time will be allocated to this algorithm.

fast. Labels will be moved so as to avoid collisions. A very short amount of time will be allocated to this algorithm; effectively it will not attempt many changes.

quality. Labels will be moved so as to avoid collisions. A long amount of time will be allocated to this algorithm; possibly up to a half second or so.

extreme. Labels will be moved so as to avoid collisions. The process will be allowed to run for a very long period of time; many seconds or so are possible. This option should only be used when time is not important.

outside. Labels will be moved so as to radiate outwards from the center of the cell.

inside. Labels will be moved so as to radiate inwards from the center of the cell.

basic. Labels will be moved so as to avoid collisions. The process will be allowed to run for a very long period of time; many seconds or so are possible. This option should only be used when time is not important.

name

optional

A human-readable string that may be used to name the element in a legend or to be read by a screen reader. If not defined, the ID will be used instead.

string

positionModifier

optional

For elements that would be mapped to the same position, this attribute allows them to be stacked on top of each other, dodged to either side of each other, or have the intersection of their ranges removed form each of them (a difference effect).

none. Do nothing

center. Intervals that are centered will be moved around the center of the dimension

centerStacked. Intervals are stacked, then centered

stack. Elements that are split by a splitting aesthetic will be stacked on top of each other.

stackInterpolating. Deprecated. Please use stack instead. The difference has been eliminated. If items have the same coordinates except possibly for the response dimension, stack them on top of each other. If a value is missing at a given stack location, a linear interpolation will be performed to give it a value.

setMissingsToZero. A simple modifier that converts all missing values to zeros.

minusIntersection. Areas drawn with this modifier are subtracted from each other to create a 'difference area'. Although defined in terms of areas, and intended mainly for use in that element, it will work for all elements.

dodge. Items drawn at exactly the same location will be moved aside so they no longer occlude each other. The center of the set of moved items will be the same location as they originally occupied. This is used to create symmetric dot plots.

pile. Items drawn at exactly the same location will be moved aside so they no longer occlude each other. Instead of being centered at the original location as in 'dodge', they will be piled one on top of each other. This is used to create asymmetric dot plots.

jitterJointUniform. All elements are perturbed randomly along all dimensions using a uniform distribution.

jitterConditionalUniform. All elements are perturbed randomly on the dependent dimension using a uniform distribution.

jitterJointNormal. All elements are perturbed randomly along all dimensions using a normal distribution.

jitterConditionalNormal. All elements are perturbed randomly on the dependent dimension using a normal distribution.

showCollidingLabels

optional

If no label collision handling is attempted, or if labels still collide afterwards, this parameter specifies whether a label will be drawn if it collides with a previously drawn label.

boolean

style

optional

The basic style of this element.

IDREF

xLocation

optional

Sets the x location to a value in [0,1] coordinates. Overrides position and statistic values.

double

yLocation

optional

Sets the y location to a value in [0,1] coordinates. Overrides position and statistic values.

double

zLocation

optional

Sets the z location to a value in [0,1] coordinates. Overrides position and statistic values.

double

zOrder

optional

Integer that determines the order in which items are drawn. If this is not specified, items are drawn in the order they are found in the specification. This has no effect in a 3D chart.

int

point diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="point" type="vis:elementType">
<xs:sequence>
<xs:element ref="vis:extension" minOccurs="0" maxOccurs="unbounded"></xs:element>
<xs:element ref="vis:conditionalStyle" minOccurs="0" maxOccurs="unbounded"></xs:element>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:group ref="vis:statistic">
<xs:choice>
<xs:element ref="vis:attach"></xs:element>
<xs:element ref="vis:binStatistic"></xs:element>
<xs:element ref="vis:aggregateStatistic"></xs:element>
<xs:element ref="vis:collectRowsStatistic"></xs:element>
<xs:element ref="vis:replicate"></xs:element>
<xs:element ref="vis:when"></xs:element>
<xs:element ref="vis:distributionStatistic"></xs:element>
<xs:element ref="vis:graphLayoutStatistic"></xs:element>
<xs:element ref="vis:linkStatistic"></xs:element>
<xs:element ref="vis:mapStatistic"></xs:element>
<xs:element ref="vis:regionStatistic"></xs:element>
<xs:element ref="vis:smoothStatistic"></xs:element>
<xs:element ref="vis:fixedWindowDensityStatistic"></xs:element>
<xs:element ref="vis:nearestNeighborDensityStatistic"></xs:element>
<xs:element ref="vis:summaryStatistic"></xs:element>
<xs:element ref="vis:treeLayoutStatistic"></xs:element>
<xs:element ref="vis:tagCloudStatistic"></xs:element>
<xs:element ref="vis:patternLinkStatistic"></xs:element>
<xs:element ref="vis:clusteringStatistic"></xs:element>
<xs:element ref="vis:SOMStatistic"></xs:element>
<xs:element ref="vis:tukeyStatistic"></xs:element>
</xs:choice>
</xs:group>
</xs:sequence>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:group ref="vis:aesthetic">
<xs:choice>
<xs:element ref="vis:visibility"></xs:element>
<xs:element ref="vis:colorComponent"></xs:element>
<xs:element ref="vis:color"></xs:element>
<xs:element ref="vis:dash"></xs:element>
<xs:element ref="vis:labeling"></xs:element>
<xs:element ref="vis:offset"></xs:element>
<xs:element ref="vis:pattern"></xs:element>
<xs:element ref="vis:image"></xs:element>
<xs:element ref="vis:rotation"></xs:element>
<xs:element ref="vis:shape"></xs:element>
<xs:element ref="vis:size"></xs:element>
<xs:element ref="vis:split"></xs:element>
<xs:element ref="vis:styleBy"></xs:element>
<xs:element ref="vis:transparency"></xs:element>
</xs:choice>
</xs:group>
</xs:choice>
<xs:element ref="vis:position" minOccurs="0" maxOccurs="unbounded"></xs:element>
<xs:element ref="vis:x" minOccurs="0"></xs:element>
<xs:element ref="vis:y" minOccurs="0"></xs:element>
<xs:element ref="vis:z" minOccurs="0"></xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="clip">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="none"></xs:enumeration>
<xs:enumeration value="cell"></xs:enumeration>
<xs:enumeration value="domain"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="style" type="xs:IDREF"></xs:attribute>
<xs:attribute name="name" type="xs:string"></xs:attribute>
<xs:attribute name="dot" type="xs:boolean"></xs:attribute>
<xs:attribute name="labelCollisionHandling">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="none"></xs:enumeration>
<xs:enumeration value="normal"></xs:enumeration>
<xs:enumeration value="fast"></xs:enumeration>
<xs:enumeration value="quality"></xs:enumeration>
<xs:enumeration value="extreme"></xs:enumeration>
<xs:enumeration value="outside"></xs:enumeration>
<xs:enumeration value="inside"></xs:enumeration>
<xs:enumeration value="basic"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="showCollidingLabels" type="xs:boolean"></xs:attribute>
<xs:attribute name="coordinates" type="xs:IDREF"></xs:attribute>
<xs:attribute name="positionModifier">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="none"></xs:enumeration>
<xs:enumeration value="center"></xs:enumeration>
<xs:enumeration value="centerStacked"></xs:enumeration>
<xs:enumeration value="stack"></xs:enumeration>
<xs:enumeration value="stackInterpolating"></xs:enumeration>
<xs:enumeration value="setMissingsToZero"></xs:enumeration>
<xs:enumeration value="minusIntersection"></xs:enumeration>
<xs:enumeration value="dodge"></xs:enumeration>
<xs:enumeration value="pile"></xs:enumeration>
<xs:enumeration value="jitterJointUniform"></xs:enumeration>
<xs:enumeration value="jitterConditionalUniform"></xs:enumeration>
<xs:enumeration value="jitterJointNormal"></xs:enumeration>
<xs:enumeration value="jitterConditionalNormal"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="xLocation" type="xs:double"></xs:attribute>
<xs:attribute name="yLocation" type="xs:double"></xs:attribute>
<xs:attribute name="zLocation" type="xs:double"></xs:attribute>
<xs:attribute name="zOrder" type="xs:int"></xs:attribute>
</xs:element>

Parent Elements

graph Element

Child Elements

aggregateStatistic Element, attach Element, binStatistic Element, clusteringStatistic Element, collectRowsStatistic Element, color Element, colorComponent Element, conditionalStyle Element, dash Element, distributionStatistic Element, extension Element, fixedWindowDensityStatistic Element, graphLayoutStatistic Element, image Element, labeling Element, linkStatistic Element, mapStatistic Element, nearestNeighborDensityStatistic Element, offset Element, pattern Element, patternLinkStatistic Element, position Element, regionStatistic Element, replicate Element, rotation Element, shape Element, size Element, smoothStatistic Element, SOMStatistic Element, split Element, styleBy Element, summaryStatistic Element, tagCloudStatistic Element, transparency Element, treeLayoutStatistic Element, tukeyStatistic Element, visibility Element, when Element, x Element, y Element, z Element


pointGuide Element

pointGuide element,pointGuide element,pointGuide element

A point guide which is drawn using the glyph specified by the style. Coordinates are given to specify the location at which it should be drawn. Possible coordinates are x,y,z. This guide can be used in 2D and 3D systems.

Attributes for pointGuide
Attribute | Use | Description | Valid Values
coordinates | optional | Defines the coordinate system within which an element is drawn. If left undefined, the first coordinate system defined by the graph is used. This attribute is intended for only graphs with multiple coordinate systems, such as SPLOMs with histograms on the diagonal. | IDREF
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
name | optional | The name of the guide. The name is a human-readable string that may be used to name the guide in a legend or to be read by a screen reader. If not defined, the ID will be used instead. | string
style | optional | The style for this guide. | IDREF
x | optional | x position in data space. | string
y | optional | y position in data space. | string
z | optional | z position in data space. | string
zOrder | optional | Integer that determines the order in which items are drawn. If this is not specified, items are drawn in the order they are found in the specification. | int
pointGuide diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="pointGuide">
<xs:sequence>
<xs:element ref="vis:label" minOccurs="0" maxOccurs="unbounded"></xs:element>
<xs:element ref="vis:conditionalStyle" minOccurs="0" maxOccurs="unbounded"></xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="name" type="xs:string"></xs:attribute>
<xs:attribute name="style" type="xs:IDREF"></xs:attribute>
<xs:attribute name="zOrder" type="xs:int"></xs:attribute>
<xs:attribute name="x" type="xs:string"></xs:attribute>
<xs:attribute name="y" type="xs:string"></xs:attribute>
<xs:attribute name="z" type="xs:string"></xs:attribute>
<xs:attribute name="coordinates" type="xs:IDREF"></xs:attribute>
</xs:element>

Parent Elements

graph Element

Child Elements

conditionalStyle Element, label Element

Related Elements

frameGuide Element, functionGuide Element, lineGuide Element, planeGuide Element, rectangleGuide Element


polygon Element

polygon element,polygon element,polygon element

A polygonal element.

Attributes for polygon
Attribute Use Description Valid Values

clip

optional

The type of clipping to apply to the element.

none. Do not clip at all.

cell. Clip to the cell such that the glyph being clipped does not go outside of the cell of the graph.

domain. Clip to the domain. Do not let the bounds of the glyph exceed the domain.

coordinates

optional

Defines the coordinate system within which an element is drawn. If left undefined, the first coordinate system defined by the graph is used. This attribute is intended for only graphs with multiple coordinate systems, such as SPLOMs with histograms on the diagonal.

IDREF

dot

optional

Usually an element's expression is crossed with the faceting, so that blends in the faceting will induce multiple copies of the data in the graph. If this parameter is set to true, the expressions will be dotted together, making fewer copies.

boolean

id

optional

An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one.

ID

labelCollisionHandling

optional

Allows the use of one or more algorithms to avoid collision among labels by moving them slightly around their original positions.

none. Labels will not be moved.

normal. Labels will be moved so as to avoid collisions. A short amount of time will be allocated to this algorithm.

fast. Labels will be moved so as to avoid collisions. A very short amount of time will be allocated to this algorithm; effectively it will not attempt many changes.

quality. Labels will be moved so as to avoid collisions. A long amount of time will be allocated to this algorithm; possibly up to a half second or so.

extreme. Labels will be moved so as to avoid collisions. The process will be allowed to run for a very long period of time; many seconds or so are possible. This option should only be used when time is not important.

outside. Labels will be moved so as to radiate outwards from the center of the cell.

inside. Labels will be moved so as to radiate inwards from the center of the cell.

basic. Labels will be moved so as to avoid collisions. The process will be allowed to run for a very long period of time; many seconds or so are possible. This option should only be used when time is not important.

name

optional

A human-readable string that may be used to name the element in a legend or to be read by a screen reader. If not defined, the ID will be used instead.

string

positionModifier

optional

For elements that would be mapped to the same position, this attribute allows them to be stacked on top of each other, dodged to either side of each other, or have the intersection of their ranges removed form each of them (a difference effect).

none. Do nothing

center. Intervals that are centered will be moved around the center of the dimension

centerStacked. Intervals are stacked, then centered

stack. Elements that are split by a splitting aesthetic will be stacked on top of each other.

stackInterpolating. Deprecated. Please use stack instead. The difference has been eliminated. If items have the same coordinates except possibly for the response dimension, stack them on top of each other. If a value is missing at a given stack location, a linear interpolation will be performed to give it a value.

setMissingsToZero. A simple modifier that converts all missing values to zeros.

minusIntersection. Areas drawn with this modifier are subtracted from each other to create a 'difference area'. Although defined in terms of areas, and intended mainly for use in that element, it will work for all elements.

dodge. Items drawn at exactly the same location will be moved aside so they no longer occlude each other. The center of the set of moved items will be the same location as they originally occupied. This is used to create symmetric dot plots.

pile. Items drawn at exactly the same location will be moved aside so they no longer occlude each other. Instead of being centered at the original location as in 'dodge', they will be piled one on top of each other. This is used to create asymmetric dot plots.

jitterJointUniform. All elements are perturbed randomly along all dimensions using a uniform distribution.

jitterConditionalUniform. All elements are perturbed randomly on the dependent dimension using a uniform distribution.

jitterJointNormal. All elements are perturbed randomly along all dimensions using a normal distribution.

jitterConditionalNormal. All elements are perturbed randomly on the dependent dimension using a normal distribution.

preserveStraightLines

optional

If true, lines are not curved within the space, but drawn straight from defined point to defined point.

boolean

showCollidingLabels

optional

If no label collision handling is attempted, or if labels still collide afterwards, this parameter specifies whether a label will be drawn if it collides with a previously drawn label.

boolean

style

optional

The basic style of this element.

IDREF

xLocation

optional

Sets the x location to a value in [0,1] coordinates. Overrides position and statistic values.

double

yLocation

optional

Sets the y location to a value in [0,1] coordinates. Overrides position and statistic values.

double

zLocation

optional

Sets the z location to a value in [0,1] coordinates. Overrides position and statistic values.

double

zOrder

optional

Integer that determines the order in which items are drawn. If this is not specified, items are drawn in the order they are found in the specification. This has no effect in a 3D chart.

int

polygon diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="polygon">
<xs:sequence>
<xs:element ref="vis:extension" minOccurs="0" maxOccurs="unbounded"></xs:element>
<xs:element ref="vis:conditionalStyle" minOccurs="0" maxOccurs="unbounded"></xs:element>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:group ref="vis:statistic">
<xs:choice>
<xs:element ref="vis:attach"></xs:element>
<xs:element ref="vis:binStatistic"></xs:element>
<xs:element ref="vis:aggregateStatistic"></xs:element>
<xs:element ref="vis:collectRowsStatistic"></xs:element>
<xs:element ref="vis:replicate"></xs:element>
<xs:element ref="vis:when"></xs:element>
<xs:element ref="vis:distributionStatistic"></xs:element>
<xs:element ref="vis:graphLayoutStatistic"></xs:element>
<xs:element ref="vis:linkStatistic"></xs:element>
<xs:element ref="vis:mapStatistic"></xs:element>
<xs:element ref="vis:regionStatistic"></xs:element>
<xs:element ref="vis:smoothStatistic"></xs:element>
<xs:element ref="vis:fixedWindowDensityStatistic"></xs:element>
<xs:element ref="vis:nearestNeighborDensityStatistic"></xs:element>
<xs:element ref="vis:summaryStatistic"></xs:element>
<xs:element ref="vis:treeLayoutStatistic"></xs:element>
<xs:element ref="vis:tagCloudStatistic"></xs:element>
<xs:element ref="vis:patternLinkStatistic"></xs:element>
<xs:element ref="vis:clusteringStatistic"></xs:element>
<xs:element ref="vis:SOMStatistic"></xs:element>
<xs:element ref="vis:tukeyStatistic"></xs:element>
</xs:choice>
</xs:group>
</xs:sequence>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:group ref="vis:aesthetic">
<xs:choice>
<xs:element ref="vis:visibility"></xs:element>
<xs:element ref="vis:colorComponent"></xs:element>
<xs:element ref="vis:color"></xs:element>
<xs:element ref="vis:dash"></xs:element>
<xs:element ref="vis:labeling"></xs:element>
<xs:element ref="vis:offset"></xs:element>
<xs:element ref="vis:pattern"></xs:element>
<xs:element ref="vis:image"></xs:element>
<xs:element ref="vis:rotation"></xs:element>
<xs:element ref="vis:shape"></xs:element>
<xs:element ref="vis:size"></xs:element>
<xs:element ref="vis:split"></xs:element>
<xs:element ref="vis:styleBy"></xs:element>
<xs:element ref="vis:transparency"></xs:element>
</xs:choice>
</xs:group>
</xs:choice>
<xs:element ref="vis:position" minOccurs="0" maxOccurs="unbounded"></xs:element>
<xs:element ref="vis:x" minOccurs="0"></xs:element>
<xs:element ref="vis:y" minOccurs="0"></xs:element>
<xs:element ref="vis:z" minOccurs="0"></xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="clip">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="none"></xs:enumeration>
<xs:enumeration value="cell"></xs:enumeration>
<xs:enumeration value="domain"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="style" type="xs:IDREF"></xs:attribute>
<xs:attribute name="name" type="xs:string"></xs:attribute>
<xs:attribute name="dot" type="xs:boolean"></xs:attribute>
<xs:attribute name="labelCollisionHandling">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="none"></xs:enumeration>
<xs:enumeration value="normal"></xs:enumeration>
<xs:enumeration value="fast"></xs:enumeration>
<xs:enumeration value="quality"></xs:enumeration>
<xs:enumeration value="extreme"></xs:enumeration>
<xs:enumeration value="outside"></xs:enumeration>
<xs:enumeration value="inside"></xs:enumeration>
<xs:enumeration value="basic"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="showCollidingLabels" type="xs:boolean"></xs:attribute>
<xs:attribute name="coordinates" type="xs:IDREF"></xs:attribute>
<xs:attribute name="positionModifier">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="none"></xs:enumeration>
<xs:enumeration value="center"></xs:enumeration>
<xs:enumeration value="centerStacked"></xs:enumeration>
<xs:enumeration value="stack"></xs:enumeration>
<xs:enumeration value="stackInterpolating"></xs:enumeration>
<xs:enumeration value="setMissingsToZero"></xs:enumeration>
<xs:enumeration value="minusIntersection"></xs:enumeration>
<xs:enumeration value="dodge"></xs:enumeration>
<xs:enumeration value="pile"></xs:enumeration>
<xs:enumeration value="jitterJointUniform"></xs:enumeration>
<xs:enumeration value="jitterConditionalUniform"></xs:enumeration>
<xs:enumeration value="jitterJointNormal"></xs:enumeration>
<xs:enumeration value="jitterConditionalNormal"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="xLocation" type="xs:double"></xs:attribute>
<xs:attribute name="yLocation" type="xs:double"></xs:attribute>
<xs:attribute name="zLocation" type="xs:double"></xs:attribute>
<xs:attribute name="zOrder" type="xs:int"></xs:attribute>
<xs:attribute name="preserveStraightLines" type="xs:boolean"></xs:attribute>
</xs:element>

Parent Elements

graph Element

Child Elements

aggregateStatistic Element, attach Element, binStatistic Element, clusteringStatistic Element, collectRowsStatistic Element, color Element, colorComponent Element, conditionalStyle Element, dash Element, distributionStatistic Element, extension Element, fixedWindowDensityStatistic Element, graphLayoutStatistic Element, image Element, labeling Element, linkStatistic Element, mapStatistic Element, nearestNeighborDensityStatistic Element, offset Element, pattern Element, patternLinkStatistic Element, position Element, regionStatistic Element, replicate Element, rotation Element, shape Element, size Element, smoothStatistic Element, SOMStatistic Element, split Element, styleBy Element, summaryStatistic Element, tagCloudStatistic Element, transparency Element, treeLayoutStatistic Element, tukeyStatistic Element, visibility Element, when Element, x Element, y Element, z Element

Related Elements

area Element, edge Element, interval Element, line Element, path Element, schema Element


popup Element

popup element,popup element,popup element

Specifies popup interactivity for a visualization.

Attributes for popup
Attribute Use Description Valid Values

active

optional

If set to false, the controller will be inactive

boolean

id

optional

An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one.

ID

part

optional

In case of boxplots,this attribute decides which part will be labeled(median,outlier,extreme).

median. The median of the boxplot

outlier. The outliers of the boxplot

extreme. The extreme outliers of the boxplot

style

optional

A style for the popup (may not be honored in all output forms).

IDREF

target

required

An element or axis majorTicks that should be targeted for the popup.

IDREF

tokenTemplate

optional

The template for the popup. This can be used in conjunction with the child tokenMapping element by using $[q]$, where q is the value of the valueToken attribute on the tokenMapping element to display. Not used with axis majorTicks.

For example, if you were using <popup target="point1" tokenTemplate="$[1]$"><tokenMapping valueToken="1" variable="gender"/></popup> , the popup would display the value of gender for the element that corresponds to point1.

string

popup diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="popup">
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="active" type="xs:boolean"></xs:attribute>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element name="tokenMapping">
<xs:sequence>
<xs:element ref="vis:summaryStatistic" minOccurs="0" maxOccurs="unbounded"></xs:element>
<xs:element ref="vis:format" minOccurs="0" maxOccurs="unbounded"></xs:element>
</xs:sequence>
</xs:element>
</xs:sequence>
<xs:attribute name="style" type="xs:IDREF"></xs:attribute>
<xs:attribute name="target" type="xs:IDREF" use="required"></xs:attribute>
<xs:attribute name="part">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="median"></xs:enumeration>
<xs:enumeration value="outlier"></xs:enumeration>
<xs:enumeration value="extreme"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="tokenTemplate" type="xs:string"></xs:attribute>
</xs:element>

Parent Elements

visualization Element

Child Elements

tokenMapping Element

Related Elements

animation Element, brushing Element, dragElement Element, drillDown Element, facetSortController Element, layerController Element, lineGuideController Element, pivotController Element, rectangleGuideController Element, swingController Element


tokenMapping Element

tokenMapping element,tokenMapping element,tokenMapping element

Defines a token to be used in the popup via the tokenTemplate attribute on the parent element. Not used with axis majorTicks.

Attributes for tokenMapping
Attribute | Use | Description | Valid Values
columnToken | optional | The token to use for the column name. | any
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
valueToken | optional | The token to use for the value. | any
variable | required | The variable to use to get a value for the token. | IDREF
tokenMapping diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="tokenMapping">
<xs:sequence>
<xs:element ref="vis:summaryStatistic" minOccurs="0" maxOccurs="unbounded"></xs:element>
<xs:element ref="vis:format" minOccurs="0" maxOccurs="unbounded"></xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="variable" type="xs:IDREF" use="required"></xs:attribute>
<xs:attribute name="columnToken"></xs:attribute>
<xs:attribute name="valueToken"></xs:attribute>
</xs:element>

Parent Elements

popup Element

Child Elements

format Element, summaryStatistic Element


position Element

position element,position element,position element

Determines location along an axis. A generic form of 'x', 'y' and 'z' positional elements.

Attributes for position
Attribute | Use | Description | Valid Values
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
variable | optional | This variable's data are used to locate graphic items created by the element within the coordinate system. | IDREF
position diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="position" type="vis:coordinate">
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="variable" type="xs:IDREF"></xs:attribute>
</xs:element>

Parent Elements

area Element, edge Element, interval Element, line Element, path Element, point Element, polygon Element, schema Element


range Element

range element,range element,range element

The interval for the domain.

Attributes for range
Attribute | Use | Description | Valid Values
max | optional | The maximum value for this interval. | string
min | optional | The minimum value for this interval. | string
range diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="range">
<xs:attribute name="min" type="xs:string"></xs:attribute>
<xs:attribute name="max" type="xs:string"></xs:attribute>
</xs:element>

Parent Elements

domainExclude Element, domainIntersect Element, domainReplace Element, domainUnion Element


rectangleGuide Element

rectangleGuide element,rectangleGuide element,rectangleGuide element

A rectangle guide. Parameters for the rectangle giving the two points of its corners in data space must be given.

Attributes for rectangleGuide
Attribute | Use | Description | Valid Values
coordinates | optional | Defines the coordinate system within which an element is drawn. If left undefined, the first coordinate system defined by the graph is used. This attribute is intended for only graphs with multiple coordinate systems, such as SPLOMs with histograms on the diagonal. | IDREF
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
name | optional | The name of the guide. The name is a human-readable string that may be used to name the guide in a legend or to be read by a screen reader. If not defined, the ID will be used instead. | string
style | optional | The style for this guide. | IDREF
x1 | optional | The x coordinate of the first point of the rectangle. | string
x2 | optional | The x coordinate of the second point of the rectangle. | string
y1 | optional | The y coordinate of the first point of the rectangle. | string
y2 | optional | The y coordinate of the second point of the rectangle. | string
zOrder | optional | Integer that determines the order in which items are drawn. If this is not specified, items are drawn in the order they are found in the specification. | int
rectangleGuide diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="rectangleGuide">
<xs:sequence>
<xs:element ref="vis:label" minOccurs="0" maxOccurs="unbounded"></xs:element>
<xs:element ref="vis:conditionalStyle" minOccurs="0" maxOccurs="unbounded"></xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="name" type="xs:string"></xs:attribute>
<xs:attribute name="style" type="xs:IDREF"></xs:attribute>
<xs:attribute name="zOrder" type="xs:int"></xs:attribute>
<xs:attribute name="x1" type="xs:string"></xs:attribute>
<xs:attribute name="x2" type="xs:string"></xs:attribute>
<xs:attribute name="y1" type="xs:string"></xs:attribute>
<xs:attribute name="y2" type="xs:string"></xs:attribute>
<xs:attribute name="coordinates" type="xs:IDREF"></xs:attribute>
</xs:element>

Parent Elements

graph Element

Child Elements

conditionalStyle Element, label Element

Related Elements

frameGuide Element, functionGuide Element, lineGuide Element, planeGuide Element, pointGuide Element


rectangleGuideController Element

rectangleGuideController element,rectangleGuideController element,rectangleGuideController element

Specifies a controller that will create rectangle guides in response to user clicks. Users can drag the existing rectangle guides to new locations.

Attributes for rectangleGuideController
Attribute | Use | Description | Valid Values
active | optional | If set to false, the controller will be inactive | boolean
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
style | optional | The style for the rectangle as it is being dragged | IDREF
rectangleGuideController diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="rectangleGuideController">
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="active" type="xs:boolean"></xs:attribute>
<xs:attribute name="style" type="xs:IDREF"></xs:attribute>
</xs:element>

Parent Elements

visualization Element

Related Elements

animation Element, brushing Element, dragElement Element, drillDown Element, facetSortController Element, layerController Element, lineGuideController Element, pivotController Element, popup Element, swingController Element


regionStatistic Element

regionStatistic element,regionStatistic element,regionStatistic element

Calculates regions of confidence such as confidence intervals.

Attributes for regionStatistic
Attribute Use Description Valid Values

alpha

optional

The alpha value. Only used in some models (like confidence intervals).

any

bounded

optional

If true then the model is bounded.

boolean

cutPoints

optional

The cutpoints used in the model. This is an array of doubles separated by semicolons (for example 4.5;.2;4;1.7E25).

string

degree

optional

Degree of a polynomial model.

integer

df1

optional

The first degree of freedom of a model. If a model has only one degree of freedom, this is it.

double

df2

optional

The second degree of freedom of a model. If a model has only one degree of freedom, this will be ignored.

double

distribution

optional

Distribution (or model) for which the region will be calculated.

uniform. Indicates the uniform distribution. parameter is a, the minimum of the distribution. secondaryParameter is b, the maximum of the distribution. Both parameters may be left out, in which case they will be estimated from the data using method of moments. It is an error to specify only one of the parameters.

normal. Indicates the normal distribution. parameter is mu, the mean of the distribution. secondaryParameter is sigma, the standard deviation of the distribution. Either or both parameters may be left out, in which case they will be estimated from the data using maximum likelihood.

t. Indicates tthe t distribution. parameter is df, the degrees of freedom of the distribution. secondaryParameter is unused.

f. Indicates the f distribution. parameter and secondaryParameter are df1 and df2, the degrees of freedom of the distribution.

chisquare. Indicates the chi-square distribution. parameter is df, the degrees of freedom of the distribution. secondaryParameter is unused.

gamma. Indicates the gamma distribution. parameter is df, the degrees of freedom of the distribution. secondaryParameter is unused.

beta. Indicates the beta distribution. parameter and secondaryParameter are df1 and df2, the degrees of freedom of the distribution.

exponential. Indicates the exponential distribution. parameter is the rate, and secondaryParameter is unused. The rate parameter may be left out, in which case it will be estimated from the data using method of moments.

logistic. Indicates the logistic distribution. parameter is the location of the distribution, and secondaryParameter is the spread of the distribution

studentizedrange. Indicates the Studentized range distribution. parameter and secondaryParameter are df1 and df2, the degrees of freedom of the distribution.

weibull. Indicates the Weibull distribution. parameter and secondaryParameter are df1 and df2, the degrees of freedom of the distribution.

poisson. Indicates the poisson distribution. parameter is lambda and secondaryParameter is unused. The lambda parameter may be left out, in which case it will be estimated from the data using method of moments.

id

optional

An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one.

ID

intercept

optional

If specified, forces the fit to go through (0, intercept). Only valid for polynomial smooths.

double

location

optional

The measure of central tendency for which the region will be calculated.

mean. Used when the mean is desired.

median. Used when the median is desired.

mode. Used when the mode is desired.

numberConditionals

optional

Number of conditionals on a model.

integer

predictIndividuals

optional

If true, individuals will be predicted. If false, the mean value will be predicted.

boolean

regionType

optional

The type of region for calculating the statistic.

uniform. Indicates that the uniform distribution is to be used.

range. Indicates that the range distribution is to be used.

sd. Indicates that the standard deviation distribution is to be used.

se. Indicates that the standard error distribution is to be used.

linear. Indicates that the linear distribution is to be used.

quadratic. Indicates that the quadratic distribution is to be used.

cubic. Indicates that the cubic distribution is to be used.

polynomial. Indicates that the polynomial distribution is to be used.

piecewise. Indicates that the piecewise distribution is to be used.

confi. Indicates that the confidence interval distribution is to be used.

mad. Indicates that the mean absolute deviation distribution is to be used.

segments

optional

Number of segments to predict.

integer

regionStatistic diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="regionStatistic">
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="alpha">
<xs:simpleType>
<xs:restriction base="xs:double">
<xs:minInclusive value="0"></xs:minInclusive>
<xs:maxInclusive value="1"></xs:maxInclusive>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="bounded" type="xs:boolean"></xs:attribute>
<xs:attribute name="numberConditionals" type="xs:integer"></xs:attribute>
<xs:attribute name="intercept" type="xs:double"></xs:attribute>
<xs:attribute name="cutPoints" type="xs:string"></xs:attribute>
<xs:attribute name="degree" type="xs:integer"></xs:attribute>
<xs:attribute name="df1" type="xs:double"></xs:attribute>
<xs:attribute name="df2" type="xs:double"></xs:attribute>
<xs:attribute name="distribution" type="vis:distributionType">
<xs:enumeration value="uniform"></xs:enumeration>
<xs:enumeration value="normal"></xs:enumeration>
<xs:enumeration value="t"></xs:enumeration>
<xs:enumeration value="f"></xs:enumeration>
<xs:enumeration value="chisquare"></xs:enumeration>
<xs:enumeration value="gamma"></xs:enumeration>
<xs:enumeration value="beta"></xs:enumeration>
<xs:enumeration value="exponential"></xs:enumeration>
<xs:enumeration value="logistic"></xs:enumeration>
<xs:enumeration value="studentizedrange"></xs:enumeration>
<xs:enumeration value="weibull"></xs:enumeration>
<xs:enumeration value="poisson"></xs:enumeration>
</xs:attribute>
<xs:attribute name="location" type="vis:regionLocationType">
<xs:enumeration value="mean"></xs:enumeration>
<xs:enumeration value="median"></xs:enumeration>
<xs:enumeration value="mode"></xs:enumeration>
</xs:attribute>
<xs:attribute name="predictIndividuals" type="xs:boolean"></xs:attribute>
<xs:attribute name="segments" type="xs:integer"></xs:attribute>
<xs:attribute name="regionType" type="vis:regionModelType">
<xs:enumeration value="uniform"></xs:enumeration>
<xs:enumeration value="range"></xs:enumeration>
<xs:enumeration value="sd"></xs:enumeration>
<xs:enumeration value="se"></xs:enumeration>
<xs:enumeration value="linear"></xs:enumeration>
<xs:enumeration value="quadratic"></xs:enumeration>
<xs:enumeration value="cubic"></xs:enumeration>
<xs:enumeration value="polynomial"></xs:enumeration>
<xs:enumeration value="piecewise"></xs:enumeration>
<xs:enumeration value="confi"></xs:enumeration>
<xs:enumeration value="mad"></xs:enumeration>
</xs:attribute>
</xs:element>

Parent Elements

area Element, edge Element, faceting Element, interval Element, line Element, path Element, point Element, polygon Element, schema Element


relabel Element

relabel element,relabel element,relabel element

Attributes for relabel
Attribute | Use | Description | Valid Values
from | required | The real variable value that is mapped to a label. | string
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
to | required | Label to use for display instead of the real value. | string
relabel diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="relabel">
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="from" type="xs:string" use="required"></xs:attribute>
<xs:attribute name="to" type="xs:string" use="required"></xs:attribute>
</xs:element>

Parent Elements

format Element


replicate Element

replicate element,replicate element,replicate element

Replicates weights into mutliple rows

Attributes for replicate
Attribute | Use | Description | Valid Values
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
replicate diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="replicate">
<xs:attribute name="id" type="xs:ID"></xs:attribute>
</xs:element>

Parent Elements

area Element, edge Element, faceting Element, interval Element, line Element, path Element, point Element, polygon Element, schema Element


reportSource Element

reportSource element,reportSource element,reportSource element

A data source in Report Services webServices.

Attributes for reportSource
Attribute Use Description Valid Values

datasetName

required

THe name of the dataset within a report.

string

filterToMissing

optional

Determines whether or not the data will be filtered to missing. The default is false

boolean

id

optional

An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one.

ID

missing

optional

offers listwise and variablewise (pairwise) missing value treatment when computing statistics. For VARIABLEWISE (Pairwise), a case is included in statistics for each variable in a function for which it has a valid value (regardless of whether the case has missing values for other variables). For LISTWISE, statistics for all variables used in functions in a graph data set are based on the same cases. Cases with missing values for any variable used in a function in a graph data set are excluded. Pairwise (VARIABLEWISE) is the default.

pairwise. For PAIRWISE, a case is included in statistics for each variable in a function for which it has a valid value (regardless of whether the case has missing values for other variables). PAIRWISE is the default.

listwise. For LISTWISE, statistics for all variables used in functions in a graph data set are based on the same cases. Cases with missing values for any variable used in a function in a graph data set are excluded.

url

required

The SPSSCR URI that references a report in the PES repository.

anyURI

reportSource diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="reportSource">
<xs:sequence>
<xs:element name="aggregate" minOccurs="0" maxOccurs="1"></xs:element>
<xs:element name="filter" minOccurs="0" maxOccurs="unbounded"></xs:element>
<xs:element name="dataReduction" minOccurs="0" maxOccurs="1"></xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="missing" type="vis:missingDataType">
<xs:enumeration value="pairwise"></xs:enumeration>
<xs:enumeration value="listwise"></xs:enumeration>
</xs:attribute>
<xs:attribute name="filterToMissing" type="xs:boolean"></xs:attribute>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element ref="vis:reportVariable"></xs:element>
</xs:sequence>
<xs:attribute name="url" type="xs:anyURI" use="required"></xs:attribute>
<xs:attribute name="datasetName" type="xs:string" use="required"></xs:attribute>
</xs:element>

Parent Elements

visualization Element

Child Elements

aggregate Element, dataReduction Element, filter Element, reportVariable Element

Related Elements

databaseSource Element, delimitedFileSource Element, embeddedSource Element, reshapeSource Element, savFileSource Element, streamingSource Element


aggregate Element

aggregate element,aggregate element,aggregate element

This causes a source to have similar rows aggregated. All non-key variables returned from this source will be summed.

Attributes for aggregate
Attribute | Use | Description | Valid Values
generatedCount | optional | If this attribute is defined, a column will be added to the source giving the count of the number of rows aggregated into a single row. | string
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
keyVariables | required | A semicolon delimited list of variable names that will be used as the aggregation keys. | string
aggregate diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="aggregate" minOccurs="0" maxOccurs="1">
<xs:attribute name="keyVariables" type="xs:string" use="required"></xs:attribute>
<xs:attribute name="generatedCount" type="xs:string"></xs:attribute>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
</xs:element>

Parent Elements

reportSource Element


filter Element

filter element,filter element,filter element

An element that reduces the number of rows on the data by checking if the values of a source variable are within a domain.

Attributes for filter
Attribute | Use | Description | Valid Values
domain | optional | The domain to use as criteria for filtering the source. If not defined, missing values will be used as the domain | IDREF
exclude | optional | If true, exclude values in the domain, otherwise include them. | boolean
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
sourceName | optional | Name of the variable within the source. If unspecified, the row index is used. | string
filter diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="filter" minOccurs="0" maxOccurs="unbounded">
<xs:attribute name="sourceName" type="xs:string"></xs:attribute>
<xs:attribute name="domain" type="xs:IDREF"></xs:attribute>
<xs:attribute name="exclude" type="xs:boolean"></xs:attribute>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
</xs:element>

Parent Elements

reportSource Element


dataReduction Element

dataReduction element,dataReduction element,dataReduction element

An element that reduces the number of rows on the data

Attributes for dataReduction
Attribute | Use | Description | Valid Values
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
maxRows | optional | The limit of the number of rows to be returned from a data source | integer
weightVariableName | optional | The name of the weight variable used to represent the amount of the data returned | string
dataReduction diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="dataReduction" minOccurs="0" maxOccurs="1">
<xs:attribute name="maxRows" type="xs:integer"></xs:attribute>
<xs:attribute name="weightVariableName" type="xs:string"></xs:attribute>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
</xs:element>

Parent Elements

reportSource Element


reportValue Element

reportValue element,reportValue element,reportValue element

Attributes for reportValue
Attribute | Use | Description | Valid Values
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
value | optional | The value for the prompt. | string
reportValue diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="reportValue">
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="value" type="xs:string"></xs:attribute>
</xs:element>

Parent Elements

reportVariable Element


reportVariable Element

reportVariable element,reportVariable element,reportVariable element

Attributes for reportVariable
Attribute | Use | Description | Valid Values
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
name | optional | The variable name | string
reportVariable diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="reportVariable">
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element ref="vis:reportValue"></xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="name" type="xs:string"></xs:attribute>
</xs:element>

Parent Elements

reportSource Element

Child Elements

reportValue Element


reshapeSource Element

reshapeSource element,reshapeSource element,reshapeSource element

A source that reshapes input columns into new output columns.

Attributes for reshapeSource
Attribute Use Description Valid Values

base

required

The ID of the base source to reshape.

IDREF

filterToMissing

optional

Determines whether or not the data will be filtered to missing. The default is false

boolean

id

optional

An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one.

ID

input

required

Semicolon delimited list of variables from the base source to reshape.

string

missing

optional

offers listwise and variablewise (pairwise) missing value treatment when computing statistics. For VARIABLEWISE (Pairwise), a case is included in statistics for each variable in a function for which it has a valid value (regardless of whether the case has missing values for other variables). For LISTWISE, statistics for all variables used in functions in a graph data set are based on the same cases. Cases with missing values for any variable used in a function in a graph data set are excluded. Pairwise (VARIABLEWISE) is the default.

pairwise. For PAIRWISE, a case is included in statistics for each variable in a function for which it has a valid value (regardless of whether the case has missing values for other variables). PAIRWISE is the default.

listwise. For LISTWISE, statistics for all variables used in functions in a graph data set are based on the same cases. Cases with missing values for any variable used in a function in a graph data set are excluded.

output

required

Semicolon delimited list of variable names to use for the results.

string

reshapeSource diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="reshapeSource">
<xs:sequence>
<xs:element name="aggregate" minOccurs="0" maxOccurs="1"></xs:element>
<xs:element name="filter" minOccurs="0" maxOccurs="unbounded"></xs:element>
<xs:element name="dataReduction" minOccurs="0" maxOccurs="1"></xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="missing" type="vis:missingDataType">
<xs:enumeration value="pairwise"></xs:enumeration>
<xs:enumeration value="listwise"></xs:enumeration>
</xs:attribute>
<xs:attribute name="filterToMissing" type="xs:boolean"></xs:attribute>
<xs:attribute name="base" type="xs:IDREF" use="required"></xs:attribute>
<xs:attribute name="input" type="xs:string" use="required"></xs:attribute>
<xs:attribute name="output" type="xs:string" use="required"></xs:attribute>
</xs:element>

Parent Elements

visualization Element

Child Elements

aggregate Element, dataReduction Element, filter Element

Related Elements

databaseSource Element, delimitedFileSource Element, embeddedSource Element, reportSource Element, savFileSource Element, streamingSource Element


aggregate Element

aggregate element,aggregate element,aggregate element

This causes a source to have similar rows aggregated. All non-key variables returned from this source will be summed.

Attributes for aggregate
Attribute | Use | Description | Valid Values
generatedCount | optional | If this attribute is defined, a column will be added to the source giving the count of the number of rows aggregated into a single row. | string
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
keyVariables | required | A semicolon delimited list of variable names that will be used as the aggregation keys. | string
aggregate diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="aggregate" minOccurs="0" maxOccurs="1">
<xs:attribute name="keyVariables" type="xs:string" use="required"></xs:attribute>
<xs:attribute name="generatedCount" type="xs:string"></xs:attribute>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
</xs:element>

Parent Elements

reshapeSource Element


filter Element

filter element,filter element,filter element

An element that reduces the number of rows on the data by checking if the values of a source variable are within a domain.

Attributes for filter
Attribute | Use | Description | Valid Values
domain | optional | The domain to use as criteria for filtering the source. If not defined, missing values will be used as the domain | IDREF
exclude | optional | If true, exclude values in the domain, otherwise include them. | boolean
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
sourceName | optional | Name of the variable within the source. If unspecified, the row index is used. | string
filter diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="filter" minOccurs="0" maxOccurs="unbounded">
<xs:attribute name="sourceName" type="xs:string"></xs:attribute>
<xs:attribute name="domain" type="xs:IDREF"></xs:attribute>
<xs:attribute name="exclude" type="xs:boolean"></xs:attribute>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
</xs:element>

Parent Elements

reshapeSource Element


dataReduction Element

dataReduction element,dataReduction element,dataReduction element

An element that reduces the number of rows on the data

Attributes for dataReduction
Attribute | Use | Description | Valid Values
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
maxRows | optional | The limit of the number of rows to be returned from a data source | integer
weightVariableName | optional | The name of the weight variable used to represent the amount of the data returned | string
dataReduction diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="dataReduction" minOccurs="0" maxOccurs="1">
<xs:attribute name="maxRows" type="xs:integer"></xs:attribute>
<xs:attribute name="weightVariableName" type="xs:string"></xs:attribute>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
</xs:element>

Parent Elements

reshapeSource Element


rotation Element

rotation element,rotation element,rotation element

Maps a variable to an angle at which to rotate a symbol.

Attributes for rotation
Attribute | Use | Description | Valid Values
clamp | optional | If true, values off the edges of the domain will be pegged to low or high values, not ignored. | boolean
dimension | optional | If the variable is an expression that contains more than one dimension of data (for example, the expression contained a cross of other variables), then this attribute specifies which of the variable's dimensions to use. The first is numbered 0, then 1, 2, etc. | nonNegativeInteger
domain | optional | If specified, this domain will be used to define the domain of the variable rather than the variable's default domain. For example, a user might choose to map 0 to black and 1 to white even if the data only run from 0.3 to 0.7. In this case a domain of [0,1] would be specified for the aesthetic. | IDREF
domainModifier | optional | The domain modifier defines how the domain is modified. | IDREF
high | optional | The maximum value in the domain of the variable is mapped to this angle. | any
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
low | optional | The lowest value in the domain of the variable is mapped to this angle. | any
missing | optional | The angle to use when the value is missing. | any
split | optional | If true, distinct values of the variable will have statistics computed on them independently. | boolean
variable | optional | Referers to a data variable. The values of this variable will be mapped to aesthetic values used to display the element. | IDREF
rotation diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="rotation">
<xs:sequence>
<xs:element ref="vis:scale" minOccurs="0"></xs:element>
<xs:element ref="vis:summaryStatistic" minOccurs="0"></xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="domainModifier" type="xs:IDREF"></xs:attribute>
<xs:attribute name="variable" type="xs:IDREF"></xs:attribute>
<xs:attribute name="dimension" type="xs:nonNegativeInteger"></xs:attribute>
<xs:attribute name="domain" type="xs:IDREF"></xs:attribute>
<xs:attribute name="clamp" type="xs:boolean"></xs:attribute>
<xs:attribute name="split" type="xs:boolean"></xs:attribute>
<xs:attribute name="missing">
<xs:simpleType>
<xs:restriction base="xs:double">
<xs:minInclusive value="0"></xs:minInclusive>
<xs:maxInclusive value="360"></xs:maxInclusive>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="low">
<xs:simpleType>
<xs:restriction base="xs:double">
<xs:minInclusive value="0"></xs:minInclusive>
<xs:maxInclusive value="360"></xs:maxInclusive>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="high">
<xs:simpleType>
<xs:restriction base="xs:double">
<xs:minInclusive value="0"></xs:minInclusive>
<xs:maxInclusive value="360"></xs:maxInclusive>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:element>

Parent Elements

area Element, brushing Element, edge Element, interval Element, labeling Element, line Element, path Element, point Element, polygon Element, schema Element

Child Elements

scale Element, summaryStatistic Element

Related Elements

color Element, colorComponent Element, dash Element, footnotes Element, formatting Element, image Element, labeling Element, labelLocation Element, offset Element, pattern Element, shape Element, size Element, split Element, styleBy Element, transparency Element, visibility Element


savFileSource Element

savFileSource element,savFileSource element,savFileSource element

A source of data residing in a .sav file.

Attributes for savFileSource
Attribute Use Description Valid Values

fileName

required

The path to the file to access.

string

filterToMissing

optional

Determines whether or not the data will be filtered to missing. The default is false

boolean

id

optional

An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one.

ID

missing

optional

offers listwise and variablewise (pairwise) missing value treatment when computing statistics. For VARIABLEWISE (Pairwise), a case is included in statistics for each variable in a function for which it has a valid value (regardless of whether the case has missing values for other variables). For LISTWISE, statistics for all variables used in functions in a graph data set are based on the same cases. Cases with missing values for any variable used in a function in a graph data set are excluded. Pairwise (VARIABLEWISE) is the default.

pairwise. For PAIRWISE, a case is included in statistics for each variable in a function for which it has a valid value (regardless of whether the case has missing values for other variables). PAIRWISE is the default.

listwise. For LISTWISE, statistics for all variables used in functions in a graph data set are based on the same cases. Cases with missing values for any variable used in a function in a graph data set are excluded.

savFileSource diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="savFileSource">
<xs:sequence>
<xs:element name="aggregate" minOccurs="0" maxOccurs="1"></xs:element>
<xs:element name="filter" minOccurs="0" maxOccurs="unbounded"></xs:element>
<xs:element name="dataReduction" minOccurs="0" maxOccurs="1"></xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="missing" type="vis:missingDataType">
<xs:enumeration value="pairwise"></xs:enumeration>
<xs:enumeration value="listwise"></xs:enumeration>
</xs:attribute>
<xs:attribute name="filterToMissing" type="xs:boolean"></xs:attribute>
<xs:attribute name="fileName" type="xs:string" use="required"></xs:attribute>
</xs:element>

Parent Elements

visualization Element

Child Elements

aggregate Element, dataReduction Element, filter Element

Related Elements

databaseSource Element, delimitedFileSource Element, embeddedSource Element, reportSource Element, reshapeSource Element, streamingSource Element


aggregate Element

aggregate element,aggregate element,aggregate element

This causes a source to have similar rows aggregated. All non-key variables returned from this source will be summed.

Attributes for aggregate
Attribute | Use | Description | Valid Values
generatedCount | optional | If this attribute is defined, a column will be added to the source giving the count of the number of rows aggregated into a single row. | string
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
keyVariables | required | A semicolon delimited list of variable names that will be used as the aggregation keys. | string
aggregate diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="aggregate" minOccurs="0" maxOccurs="1">
<xs:attribute name="keyVariables" type="xs:string" use="required"></xs:attribute>
<xs:attribute name="generatedCount" type="xs:string"></xs:attribute>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
</xs:element>

Parent Elements

savFileSource Element


filter Element

filter element,filter element,filter element

An element that reduces the number of rows on the data by checking if the values of a source variable are within a domain.

Attributes for filter
Attribute | Use | Description | Valid Values
domain | optional | The domain to use as criteria for filtering the source. If not defined, missing values will be used as the domain | IDREF
exclude | optional | If true, exclude values in the domain, otherwise include them. | boolean
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
sourceName | optional | Name of the variable within the source. If unspecified, the row index is used. | string
filter diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="filter" minOccurs="0" maxOccurs="unbounded">
<xs:attribute name="sourceName" type="xs:string"></xs:attribute>
<xs:attribute name="domain" type="xs:IDREF"></xs:attribute>
<xs:attribute name="exclude" type="xs:boolean"></xs:attribute>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
</xs:element>

Parent Elements

savFileSource Element


dataReduction Element

dataReduction element,dataReduction element,dataReduction element

An element that reduces the number of rows on the data

Attributes for dataReduction
Attribute | Use | Description | Valid Values
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
maxRows | optional | The limit of the number of rows to be returned from a data source | integer
weightVariableName | optional | The name of the weight variable used to represent the amount of the data returned | string
dataReduction diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="dataReduction" minOccurs="0" maxOccurs="1">
<xs:attribute name="maxRows" type="xs:integer"></xs:attribute>
<xs:attribute name="weightVariableName" type="xs:string"></xs:attribute>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
</xs:element>

Parent Elements

savFileSource Element


scale Element

scale element,scale element,scale element

A transform of the data to re-scale it using a specified method.

Attributes for scale
Attribute Use Description Valid Values

base

optional

The base for a log transform or the exponent for a power transform.

double

distribution

optional

The distribution to use with a probability scale.

uniform. Indicates the uniform distribution. parameter is a, the minimum of the distribution. secondaryParameter is b, the maximum of the distribution. Both parameters may be left out, in which case they will be estimated from the data using method of moments. It is an error to specify only one of the parameters.

normal. Indicates the normal distribution. parameter is mu, the mean of the distribution. secondaryParameter is sigma, the standard deviation of the distribution. Either or both parameters may be left out, in which case they will be estimated from the data using maximum likelihood.

t. Indicates tthe t distribution. parameter is df, the degrees of freedom of the distribution. secondaryParameter is unused.

f. Indicates the f distribution. parameter and secondaryParameter are df1 and df2, the degrees of freedom of the distribution.

chisquare. Indicates the chi-square distribution. parameter is df, the degrees of freedom of the distribution. secondaryParameter is unused.

gamma. Indicates the gamma distribution. parameter is df, the degrees of freedom of the distribution. secondaryParameter is unused.

beta. Indicates the beta distribution. parameter and secondaryParameter are df1 and df2, the degrees of freedom of the distribution.

exponential. Indicates the exponential distribution. parameter is the rate, and secondaryParameter is unused. The rate parameter may be left out, in which case it will be estimated from the data using method of moments.

logistic. Indicates the logistic distribution. parameter is the location of the distribution, and secondaryParameter is the spread of the distribution

studentizedrange. Indicates the Studentized range distribution. parameter and secondaryParameter are df1 and df2, the degrees of freedom of the distribution.

weibull. Indicates the Weibull distribution. parameter and secondaryParameter are df1 and df2, the degrees of freedom of the distribution.

poisson. Indicates the poisson distribution. parameter is lambda and secondaryParameter is unused. The lambda parameter may be left out, in which case it will be estimated from the data using method of moments.

distributionParameter

optional

A parameter for a distribution. If a distribution parameter is used, it is documented with the specific type.

double

distributionParameter2

optional

A parameter for a distribution. If a distribution parameter is used, it is documented with the specific type.

double

id

optional

An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one.

ID

invert

optional

Whether to invert the scale (for example, to change the direction of the scale from right to left instead of left to right).

boolean

method

required

What sort of transformation to perform.

linear. Simple linear scale.

log. Log scale, resulting in ticks like 1, 10, 100, 1000, and so on. A numeric parameter "base" may be used to change the base from the default "10".

power. A power scale. The exponent should be set in a parameter to a positive value.

log.safe. A transformation y = SIGN(x) LOG(1 + ABS(x)) that is defined for all values of x, maps 0 to 0, and preserves the sign of the original data.

power.safe. A transformation y = SIGN(x) POWER(ABS(x), EXPONENT) that is defined for all values of x, maps 0 to 0, and preserves the sign of the original data.

logit. A transformation y = LOG(x/(1-x)).

probit. A transformation y = INVERSE_GAUSSIAN(x), where gaussian is the statistical function based on the normal distribution function.

asn. A transformation y = 2*ASIN(SQRT(x)).

atanh. A transformation y = ATANH(x).

prob. A probability scale. Use the distribution attribute to control which distribution to use, and the distributionParameter and distributionParameter2 attributes to parameterize that distribution.

origin

optional

The origin of a scale. This is particularly important to define for dates that do not have good default date origins.

string

scale diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="scale">
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="method" use="required">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="linear"></xs:enumeration>
<xs:enumeration value="log"></xs:enumeration>
<xs:enumeration value="power"></xs:enumeration>
<xs:enumeration value="log.safe"></xs:enumeration>
<xs:enumeration value="power.safe"></xs:enumeration>
<xs:enumeration value="logit"></xs:enumeration>
<xs:enumeration value="probit"></xs:enumeration>
<xs:enumeration value="asn"></xs:enumeration>
<xs:enumeration value="atanh"></xs:enumeration>
<xs:enumeration value="prob"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="invert" type="xs:boolean"></xs:attribute>
<xs:attribute name="origin" type="xs:string"></xs:attribute>
<xs:attribute name="base" type="xs:double"></xs:attribute>
<xs:attribute name="distribution" type="vis:distributionType">
<xs:enumeration value="uniform"></xs:enumeration>
<xs:enumeration value="normal"></xs:enumeration>
<xs:enumeration value="t"></xs:enumeration>
<xs:enumeration value="f"></xs:enumeration>
<xs:enumeration value="chisquare"></xs:enumeration>
<xs:enumeration value="gamma"></xs:enumeration>
<xs:enumeration value="beta"></xs:enumeration>
<xs:enumeration value="exponential"></xs:enumeration>
<xs:enumeration value="logistic"></xs:enumeration>
<xs:enumeration value="studentizedrange"></xs:enumeration>
<xs:enumeration value="weibull"></xs:enumeration>
<xs:enumeration value="poisson"></xs:enumeration>
</xs:attribute>
<xs:attribute name="distributionParameter" type="xs:double"></xs:attribute>
<xs:attribute name="distributionParameter2" type="xs:double"></xs:attribute>
</xs:element>

Parent Elements

color Element, colorComponent Element, dimension Element, dash Element, footnotes Element, formatting Element, image Element, labeling Element, labelLocation Element, offset Element, pattern Element, rotation Element, shape Element, size Element, split Element, styleBy Element, transparency Element, visibility Element


schema Element

schema element,schema element,schema element

A schema element (also known as a boxplot).

Attributes for schema
Attribute Use Description Valid Values

clip

optional

The type of clipping to apply to the element.

none. Do not clip at all.

cell. Clip to the cell such that the glyph being clipped does not go outside of the cell of the graph.

domain. Clip to the domain. Do not let the bounds of the glyph exceed the domain.

coordinates

optional

Defines the coordinate system within which an element is drawn. If left undefined, the first coordinate system defined by the graph is used. This attribute is intended for only graphs with multiple coordinate systems, such as SPLOMs with histograms on the diagonal.

IDREF

dot

optional

Usually an element's expression is crossed with the faceting, so that blends in the faceting will induce multiple copies of the data in the graph. If this parameter is set to true, the expressions will be dotted together, making fewer copies.

boolean

extremeStyle

optional

Overrides the basic style to set a particular style for the extreme outliers.

IDREF

fenceStyle

optional

Overrides the basic style to set a particular style for fence on the schema element.

IDREF

hingeStyle

optional

Overrides the basic style to set a particular style for the hinge on the schema element.

IDREF

id

optional

An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one.

ID

labelCollisionHandling

optional

Allows the use of one or more algorithms to avoid collision among labels by moving them slightly around their original positions.

none. Labels will not be moved.

normal. Labels will be moved so as to avoid collisions. A short amount of time will be allocated to this algorithm.

fast. Labels will be moved so as to avoid collisions. A very short amount of time will be allocated to this algorithm; effectively it will not attempt many changes.

quality. Labels will be moved so as to avoid collisions. A long amount of time will be allocated to this algorithm; possibly up to a half second or so.

extreme. Labels will be moved so as to avoid collisions. The process will be allowed to run for a very long period of time; many seconds or so are possible. This option should only be used when time is not important.

outside. Labels will be moved so as to radiate outwards from the center of the cell.

inside. Labels will be moved so as to radiate inwards from the center of the cell.

basic. Labels will be moved so as to avoid collisions. The process will be allowed to run for a very long period of time; many seconds or so are possible. This option should only be used when time is not important.

medianStyle

optional

Overrides the basic style to set a particular style for the median line on the schema element.

IDREF

name

optional

A human-readable string that may be used to name the element in a legend or to be read by a screen reader. If not defined, the ID will be used instead.

string

outlierStyle

optional

Overrides the basic style to set a particular style for the outliers.

IDREF

positionModifier

optional

For elements that would be mapped to the same position, this attribute allows them to be stacked on top of each other, dodged to either side of each other, or have the intersection of their ranges removed form each of them (a difference effect).

none. Do nothing

center. Intervals that are centered will be moved around the center of the dimension

centerStacked. Intervals are stacked, then centered

stack. Elements that are split by a splitting aesthetic will be stacked on top of each other.

stackInterpolating. Deprecated. Please use stack instead. The difference has been eliminated. If items have the same coordinates except possibly for the response dimension, stack them on top of each other. If a value is missing at a given stack location, a linear interpolation will be performed to give it a value.

setMissingsToZero. A simple modifier that converts all missing values to zeros.

minusIntersection. Areas drawn with this modifier are subtracted from each other to create a 'difference area'. Although defined in terms of areas, and intended mainly for use in that element, it will work for all elements.

dodge. Items drawn at exactly the same location will be moved aside so they no longer occlude each other. The center of the set of moved items will be the same location as they originally occupied. This is used to create symmetric dot plots.

pile. Items drawn at exactly the same location will be moved aside so they no longer occlude each other. Instead of being centered at the original location as in 'dodge', they will be piled one on top of each other. This is used to create asymmetric dot plots.

jitterJointUniform. All elements are perturbed randomly along all dimensions using a uniform distribution.

jitterConditionalUniform. All elements are perturbed randomly on the dependent dimension using a uniform distribution.

jitterJointNormal. All elements are perturbed randomly along all dimensions using a normal distribution.

jitterConditionalNormal. All elements are perturbed randomly on the dependent dimension using a normal distribution.

showCollidingLabels

optional

If no label collision handling is attempted, or if labels still collide afterwards, this parameter specifies whether a label will be drawn if it collides with a previously drawn label.

boolean

style

optional

The basic style of this element.

IDREF

xLocation

optional

Sets the x location to a value in [0,1] coordinates. Overrides position and statistic values.

double

yLocation

optional

Sets the y location to a value in [0,1] coordinates. Overrides position and statistic values.

double

zLocation

optional

Sets the z location to a value in [0,1] coordinates. Overrides position and statistic values.

double

zOrder

optional

Integer that determines the order in which items are drawn. If this is not specified, items are drawn in the order they are found in the specification. This has no effect in a 3D chart.

int

schema diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="schema">
<xs:sequence>
<xs:element ref="vis:extension" minOccurs="0" maxOccurs="unbounded"></xs:element>
<xs:element ref="vis:conditionalStyle" minOccurs="0" maxOccurs="unbounded"></xs:element>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:group ref="vis:statistic">
<xs:choice>
<xs:element ref="vis:attach"></xs:element>
<xs:element ref="vis:binStatistic"></xs:element>
<xs:element ref="vis:aggregateStatistic"></xs:element>
<xs:element ref="vis:collectRowsStatistic"></xs:element>
<xs:element ref="vis:replicate"></xs:element>
<xs:element ref="vis:when"></xs:element>
<xs:element ref="vis:distributionStatistic"></xs:element>
<xs:element ref="vis:graphLayoutStatistic"></xs:element>
<xs:element ref="vis:linkStatistic"></xs:element>
<xs:element ref="vis:mapStatistic"></xs:element>
<xs:element ref="vis:regionStatistic"></xs:element>
<xs:element ref="vis:smoothStatistic"></xs:element>
<xs:element ref="vis:fixedWindowDensityStatistic"></xs:element>
<xs:element ref="vis:nearestNeighborDensityStatistic"></xs:element>
<xs:element ref="vis:summaryStatistic"></xs:element>
<xs:element ref="vis:treeLayoutStatistic"></xs:element>
<xs:element ref="vis:tagCloudStatistic"></xs:element>
<xs:element ref="vis:patternLinkStatistic"></xs:element>
<xs:element ref="vis:clusteringStatistic"></xs:element>
<xs:element ref="vis:SOMStatistic"></xs:element>
<xs:element ref="vis:tukeyStatistic"></xs:element>
</xs:choice>
</xs:group>
</xs:sequence>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:group ref="vis:aesthetic">
<xs:choice>
<xs:element ref="vis:visibility"></xs:element>
<xs:element ref="vis:colorComponent"></xs:element>
<xs:element ref="vis:color"></xs:element>
<xs:element ref="vis:dash"></xs:element>
<xs:element ref="vis:labeling"></xs:element>
<xs:element ref="vis:offset"></xs:element>
<xs:element ref="vis:pattern"></xs:element>
<xs:element ref="vis:image"></xs:element>
<xs:element ref="vis:rotation"></xs:element>
<xs:element ref="vis:shape"></xs:element>
<xs:element ref="vis:size"></xs:element>
<xs:element ref="vis:split"></xs:element>
<xs:element ref="vis:styleBy"></xs:element>
<xs:element ref="vis:transparency"></xs:element>
</xs:choice>
</xs:group>
</xs:choice>
<xs:element ref="vis:position" minOccurs="0" maxOccurs="unbounded"></xs:element>
<xs:element ref="vis:x" minOccurs="0"></xs:element>
<xs:element ref="vis:y" minOccurs="0"></xs:element>
<xs:element ref="vis:z" minOccurs="0"></xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="clip">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="none"></xs:enumeration>
<xs:enumeration value="cell"></xs:enumeration>
<xs:enumeration value="domain"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="style" type="xs:IDREF"></xs:attribute>
<xs:attribute name="name" type="xs:string"></xs:attribute>
<xs:attribute name="dot" type="xs:boolean"></xs:attribute>
<xs:attribute name="labelCollisionHandling">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="none"></xs:enumeration>
<xs:enumeration value="normal"></xs:enumeration>
<xs:enumeration value="fast"></xs:enumeration>
<xs:enumeration value="quality"></xs:enumeration>
<xs:enumeration value="extreme"></xs:enumeration>
<xs:enumeration value="outside"></xs:enumeration>
<xs:enumeration value="inside"></xs:enumeration>
<xs:enumeration value="basic"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="showCollidingLabels" type="xs:boolean"></xs:attribute>
<xs:attribute name="coordinates" type="xs:IDREF"></xs:attribute>
<xs:attribute name="positionModifier">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="none"></xs:enumeration>
<xs:enumeration value="center"></xs:enumeration>
<xs:enumeration value="centerStacked"></xs:enumeration>
<xs:enumeration value="stack"></xs:enumeration>
<xs:enumeration value="stackInterpolating"></xs:enumeration>
<xs:enumeration value="setMissingsToZero"></xs:enumeration>
<xs:enumeration value="minusIntersection"></xs:enumeration>
<xs:enumeration value="dodge"></xs:enumeration>
<xs:enumeration value="pile"></xs:enumeration>
<xs:enumeration value="jitterJointUniform"></xs:enumeration>
<xs:enumeration value="jitterConditionalUniform"></xs:enumeration>
<xs:enumeration value="jitterJointNormal"></xs:enumeration>
<xs:enumeration value="jitterConditionalNormal"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="xLocation" type="xs:double"></xs:attribute>
<xs:attribute name="yLocation" type="xs:double"></xs:attribute>
<xs:attribute name="zLocation" type="xs:double"></xs:attribute>
<xs:attribute name="zOrder" type="xs:int"></xs:attribute>
<xs:attribute name="medianStyle" type="xs:IDREF"></xs:attribute>
<xs:attribute name="fenceStyle" type="xs:IDREF"></xs:attribute>
<xs:attribute name="hingeStyle" type="xs:IDREF"></xs:attribute>
<xs:attribute name="outlierStyle" type="xs:IDREF"></xs:attribute>
<xs:attribute name="extremeStyle" type="xs:IDREF"></xs:attribute>
</xs:element>

Parent Elements

graph Element

Child Elements

aggregateStatistic Element, attach Element, binStatistic Element, clusteringStatistic Element, collectRowsStatistic Element, color Element, colorComponent Element, conditionalStyle Element, dash Element, distributionStatistic Element, extension Element, fixedWindowDensityStatistic Element, graphLayoutStatistic Element, image Element, labeling Element, linkStatistic Element, mapStatistic Element, nearestNeighborDensityStatistic Element, offset Element, pattern Element, patternLinkStatistic Element, position Element, regionStatistic Element, replicate Element, rotation Element, shape Element, size Element, smoothStatistic Element, SOMStatistic Element, split Element, styleBy Element, summaryStatistic Element, tagCloudStatistic Element, transparency Element, treeLayoutStatistic Element, tukeyStatistic Element, visibility Element, when Element, x Element, y Element, z Element

Related Elements

area Element, edge Element, interval Element, line Element, path Element, polygon Element


setCellProperties Element

setCellProperties element,setCellProperties element,setCellProperties element

Sets styles on facet cells.

Attributes for setCellProperties
Attribute | Use | Description | Valid Values
applyToConverse | optional | If true, the property will apply to everything EXCEPT the targeted cells. | boolean
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
setCellProperties diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="setCellProperties">
<xs:sequence minOccurs="0" maxOccurs="1">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="vis:setMetaData"></xs:element>
<xs:element ref="vis:setFormat"></xs:element>
<xs:element ref="vis:setStyle"></xs:element>
<xs:element ref="vis:setFrameStyle"></xs:element>
<xs:element ref="vis:setPageBreak"></xs:element>
</xs:choice>
<xs:element ref="vis:union" minOccurs="0" maxOccurs="1"></xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="applyToConverse" type="xs:boolean"></xs:attribute>
</xs:element>

Parent Elements

facetLayout Element

Child Elements

setFormat Element, setFrameStyle Element, setMetaData Element, setPageBreak Element, setStyle Element, union Element


setFormat Element

setFormat element,setFormat element,setFormat element

Sets the format.

Attributes for setFormat
Attribute | Use | Description | Valid Values
definesReference | optional | A reference string for the format. | string
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
reset | optional | If the reset value is true, any format previously specified is overridden by this one. If false, this format augments the old format. | boolean
target | optional | A target for the property. | IDREF
setFormat diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="setFormat">
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="target" type="xs:IDREF"></xs:attribute>
<xs:choice minOccurs="1" maxOccurs="1">
<xs:element ref="vis:format"></xs:element>
</xs:choice>
<xs:attribute name="definesReference" type="xs:string"></xs:attribute>
<xs:attribute name="reset" type="xs:boolean"></xs:attribute>
</xs:element>

Parent Elements

setCellProperties Element

Child Elements

format Element

Related Elements

setFrameStyle Element, setMetaData Element, setPageBreak Element, setStyle Element


setFrameStyle Element

setFrameStyle element,setFrameStyle element,setFrameStyle element

Sets the style.

Attributes for setFrameStyle
Attribute | Use | Description | Valid Values
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
style | optional | A frame style for facet cells. | IDREF
target | optional | A target for the property. | IDREF
setFrameStyle diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="setFrameStyle">
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="target" type="xs:IDREF"></xs:attribute>
<xs:attribute name="style" type="xs:IDREF"></xs:attribute>
</xs:element>

Parent Elements

setCellProperties Element

Related Elements

setFormat Element, setMetaData Element, setPageBreak Element, setStyle Element


setMetaData Element

setMetaData element,setMetaData element,setMetaData element

Sets meta data.

Attributes for setMetaData
Attribute | Use | Description | Valid Values
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
key | optional | The key for the metadata. | string
target | optional | A target for the property. | IDREF
value | optional | The value for the metadata. | string
setMetaData diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="setMetaData">
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="target" type="xs:IDREF"></xs:attribute>
<xs:attribute name="key" type="xs:string"></xs:attribute>
<xs:attribute name="value" type="xs:string"></xs:attribute>
</xs:element>

Parent Elements

setCellProperties Element

Related Elements

setFormat Element, setFrameStyle Element, setPageBreak Element, setStyle Element


setPageBreak Element

setPageBreak element,setPageBreak element,setPageBreak element

Sets the parameters for page breaks.

Attributes for setPageBreak
Attribute Use Description Valid Values

id

optional

An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one.

ID

target

optional

A target for the property.

IDREF

type

optional

Options for page breaks

below. Break the page below the cell

right. Break the page to the right of the cell

keepTogetherTop. If needed,Break the page top the cell that's split over pages for the selected cells can be kept together.

keepTogetherLeft. If needed,Break the page left the cell that's split over pages for the selected cells can be kept together.

setPageBreak diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="setPageBreak">
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="target" type="xs:IDREF"></xs:attribute>
<xs:attribute name="type" type="vis:pageBreakType">
<xs:enumeration value="below"></xs:enumeration>
<xs:enumeration value="right"></xs:enumeration>
<xs:enumeration value="keepTogetherTop"></xs:enumeration>
<xs:enumeration value="keepTogetherLeft"></xs:enumeration>
</xs:attribute>
</xs:element>

Parent Elements

setCellProperties Element

Related Elements

setFormat Element, setFrameStyle Element, setMetaData Element, setStyle Element


setStyle Element

setStyle element,setStyle element,setStyle element

Sets the style.

Attributes for setStyle
Attribute | Use | Description | Valid Values
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
style | optional | A style for facet cells. Note that we do not guarantee that all style changes will be possible. In particular, if you attempt to set a cell width or height, it will only work if that is the only cell that would be affected by the change. Changes like colors and things that do not affect the layout should all work well. | IDREF
target | optional | A target for the property. | IDREF
setStyle diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="setStyle">
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="target" type="xs:IDREF"></xs:attribute>
<xs:attribute name="style" type="xs:IDREF"></xs:attribute>
</xs:element>

Parent Elements

setCellProperties Element

Related Elements

setFormat Element, setFrameStyle Element, setMetaData Element, setPageBreak Element


shape Element

shape element,shape element,shape element

Maps a categorical variable to a set of glyph shapes.

Attributes for shape
Attribute | Use | Description | Valid Values
clamp | optional | If true, values off the edges of the domain will be pegged to low or high values, not ignored. | boolean
cycle | optional | The cycle that will be applied to categorical data. The shapes will be extracted from the style cycle and used for each distinct category in the data in order | IDREF
dimension | optional | If the variable is an expression that contains more than one dimension of data (for example, the expression contained a cross of other variables), then this attribute specifies which of the variable's dimensions to use. The first is numbered 0, then 1, 2, etc. | nonNegativeInteger
domain | optional | If specified, this domain will be used to define the domain of the variable rather than the variable's default domain. For example, a user might choose to map 0 to black and 1 to white even if the data only run from 0.3 to 0.7. In this case a domain of [0,1] would be specified for the aesthetic. | IDREF
domainModifier | optional | The domain modifier defines how the domain is modified. | IDREF
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
missing | optional | The shape to display missing values as. | string
split | optional | If true, distinct values of the variable will have statistics computed on them independently. | boolean
variable | optional | Referers to a data variable. The values of this variable will be mapped to aesthetic values used to display the element. | IDREF
shape diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="shape">
<xs:sequence>
<xs:element ref="vis:scale" minOccurs="0"></xs:element>
<xs:element ref="vis:summaryStatistic" minOccurs="0"></xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="domainModifier" type="xs:IDREF"></xs:attribute>
<xs:attribute name="variable" type="xs:IDREF"></xs:attribute>
<xs:attribute name="dimension" type="xs:nonNegativeInteger"></xs:attribute>
<xs:attribute name="domain" type="xs:IDREF"></xs:attribute>
<xs:attribute name="clamp" type="xs:boolean"></xs:attribute>
<xs:attribute name="split" type="xs:boolean"></xs:attribute>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element ref="vis:symbolMapping" minOccurs="0"></xs:element>
</xs:sequence>
<xs:attribute name="missing" type="xs:string"></xs:attribute>
<xs:attribute name="cycle" type="xs:IDREF"></xs:attribute>
</xs:element>

Parent Elements

area Element, brushing Element, edge Element, interval Element, line Element, path Element, point Element, polygon Element, schema Element

Child Elements

scale Element, summaryStatistic Element, symbolMapping Element

Related Elements

color Element, colorComponent Element, dash Element, footnotes Element, formatting Element, image Element, labeling Element, labelLocation Element, offset Element, pattern Element, rotation Element, size Element, split Element, styleBy Element, transparency Element, visibility Element


simpleSort Element

simpleSort element,simpleSort element,simpleSort element

Sorts data either by occurrence or alphanumerically.

Attributes for simpleSort
Attribute Use Description Valid Values

descending

optional

Whether to reverse the usual sorting order.

boolean

id

optional

An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one.

ID

method

optional

The sort method to use.

data. Sort the data values in the order they are encountered.

custom. Sort the data values in the order that the user specifies using the categoryOrder element.

natural. Sort the data values in natural order (e.g., alphabetical or numeric).

naturalUsingLabel. Sort the data values in natural order using their labels.

sourceVariable

optional

The variable that contains categories for sorting. Categories not present are to one end of the list.

IDREF

simpleSort diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="simpleSort">
<xs:sequence>
<xs:element name="sortMove" minOccurs="0" maxOccurs="unbounded"></xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="descending" type="xs:boolean"></xs:attribute>
<xs:sequence>
<xs:element name="categoryOrder" type="xs:string" minOccurs="0"></xs:element>
</xs:sequence>
<xs:attribute name="method">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="data"></xs:enumeration>
<xs:enumeration value="custom"></xs:enumeration>
<xs:enumeration value="natural"></xs:enumeration>
<xs:enumeration value="naturalUsingLabel"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="sourceVariable" type="xs:IDREF" use="optional"></xs:attribute>
</xs:element>

Parent Elements

categoricalDomain Element, categoricalDomainModifier Element, intervalDomainModifier Element

Child Elements

categoryOrder Element, sortMove Element

Related Elements

statisticSort Element


sortMove Element

sortMove element,sortMove element,sortMove element

Sort at the beginning or end of a categorical domain. Category sorts at the beginning if the first attribute is true, otherwise it sorts at the end.

Attributes for sortMove
Attribute | Use | Description | Valid Values
category | required | The value to be placed in the sort order. | string
first | optional | Whether the value sorts at the beginning or end. | boolean
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
sortMove diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="sortMove" minOccurs="0" maxOccurs="unbounded">
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="first" type="xs:boolean"></xs:attribute>
<xs:attribute name="category" type="xs:string" use="required"></xs:attribute>
</xs:element>

Parent Elements

simpleSort Element


categoryOrder Element

categoryOrder element,categoryOrder element,categoryOrder element

A semicolon-separated list of the categories in the desired order.

categoryOrder diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="categoryOrder" type="xs:string" minOccurs="0"></xs:element>

Parent Elements

simpleSort Element


size Element

size element,size element,size element

Maps a variable to the size of the graphic item.

Attributes for size
Attribute | Use | Description | Valid Values
clamp | optional | If true, values off the edges of the domain will be pegged to low or high values, not ignored. | boolean
cycle | optional | The cycle that will be applied to categorical data. The sizes will be extracted from the style cycle and used for each distinct category in the data in order | IDREF
dimension | optional | If the variable is an expression that contains more than one dimension of data (for example, the expression contained a cross of other variables), then this attribute specifies which of the variable's dimensions to use. The first is numbered 0, then 1, 2, etc. | nonNegativeInteger
domain | optional | If specified, this domain will be used to define the domain of the variable rather than the variable's default domain. For example, a user might choose to map 0 to black and 1 to white even if the data only run from 0.3 to 0.7. In this case a domain of [0,1] would be specified for the aesthetic. | IDREF
domainModifier | optional | The domain modifier defines how the domain is modified. | IDREF
high | optional | The maximum value in an aesthetic variable's data will be mapped to this length. | length
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
low | optional | The lowest value in the domain for the aesthetic variable will be mapped to this length. | length
missing | optional | Missing values for the aesthetic variable will be mapped to this length. | length
split | optional | If true, distinct values of the variable will have statistics computed on them independently. | boolean
type | optional | The way in which size is varied. | string
variable | optional | Referers to a data variable. The values of this variable will be mapped to aesthetic values used to display the element. | IDREF
size diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="size">
<xs:sequence>
<xs:element ref="vis:scale" minOccurs="0"></xs:element>
<xs:element ref="vis:summaryStatistic" minOccurs="0"></xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="domainModifier" type="xs:IDREF"></xs:attribute>
<xs:attribute name="variable" type="xs:IDREF"></xs:attribute>
<xs:attribute name="dimension" type="xs:nonNegativeInteger"></xs:attribute>
<xs:attribute name="domain" type="xs:IDREF"></xs:attribute>
<xs:attribute name="clamp" type="xs:boolean"></xs:attribute>
<xs:attribute name="split" type="xs:boolean"></xs:attribute>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element ref="vis:lengthMapping" minOccurs="0"></xs:element>
</xs:sequence>
<xs:attribute name="missing" type="vis:length"></xs:attribute>
<xs:attribute name="low" type="vis:length"></xs:attribute>
<xs:attribute name="high" type="vis:length"></xs:attribute>
<xs:attribute name="type" type="xs:string"></xs:attribute>
<xs:attribute name="cycle" type="xs:IDREF"></xs:attribute>
</xs:element>

Parent Elements

area Element, brushing Element, edge Element, interval Element, labeling Element, line Element, path Element, point Element, polygon Element, schema Element

Child Elements

lengthMapping Element, scale Element, summaryStatistic Element

Related Elements

color Element, colorComponent Element, dash Element, footnotes Element, formatting Element, image Element, labeling Element, labelLocation Element, offset Element, pattern Element, rotation Element, shape Element, split Element, styleBy Element, transparency Element, visibility Element


smoothStatistic Element

smoothStatistic element,smoothStatistic element,smoothStatistic element

Fits a model to the data in order to provide a smooth version of the data. Common examples include simple linear regression, polynomial regression, loess curve fitting, and kernel smoothing.

Attributes for smoothStatistic
Attribute | Use | Description | Valid Values
bandwith | optional | The width used for kernel smooths. | any
bounded | optional | Sets whether or not the model is bounded. If true, then the model is bounded. | boolean
cutpoints | optional | The cutpoints used in the model. This is an array of doubles separated by semicolons (for example 4.5;.2;4;1.7E25). | string
degree | optional | The degree of the polynomial model. | integer
firstStep | optional | Whether or not the first step is set. | boolean
gridded | optional | Whether or not to predict on gridded data. | boolean
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
intercept | optional | If specified, forces the fit to go through (0, intercept). Only valid for polynomial smooths. | double
kernel | optional | The type of kernel to use for kernel smoothing. | uniform. Specifies that a uniform kernel should be used. epanechnikov. Specifies that a Epanechnikov kernel should be used. biweight. Specifies that a biweight kernel should be used. triweight. Specifies that a triweight kernel should be used. tricube. Specifies that a tricube kernel should be used. gaussian. Specifies that a Gaussian kernel should be used. cauchy. Specifies that a Cauchy kernel should be used.
marron | optional | Whether or not to use the Marron adjustment for discrete data. | boolean
method | optional | The model to use to smooth data. | linear. Specifies to fit a linear model to the data. loess. Specifies to fit a loess model to the data. power. Specifies to fit a power model to the data. quadratic. Specifies to fit a quadratic model to the data. monotonic. Specifies to fit a monotonic model to the data. cubic. Specifies to fit a cubic model to the data. polynomial. Specifies to fit a polynomial model to the data. log. Specifies to fit a log model to the data. piecewise. Specifies to fit a piecewise linear model to the data. mean. Specifies to fit a simple mean model to the data. median. Specifies to fit a simple median model to the data. trim. Specifies to fit a trimmed mean model to the data. spline. Specifies to fit a spline to the data seasonal. Specifies to fit a seasonal model to the data step-left. Specifies to fit a step function to the left of the data points step-right. Specifies to fit a step function to the right of the data points step-center. Specifies to fit a step function centered on each data point
neighbors | optional | The number of neighbors to use for nearest neighbor kernel model. | integer
proportion | optional | The proportion of the data to use for kernel models not based on nearest neighbors. | any
residuals | optional | Whether or not to generate residuals to the fit line instead of actually generating the fit line. This overrides spikes, if spikes is also defined as true | boolean
robust | optional | The method for calculating robust statistics. | andrews. Specifies that the Andrews method should be used. biweight. Specifies that the biweight method should be used. cauchy. Specifies that the Cauchy method should be used. fair. Specifies that the fair method should be used. huber. Specifies that the Huber method should be used. logistic. Specifies that the logistic method should be used. talwar. Specifies that the Talwar method should be used. welsch. Specifies that the Welsch method should be used.
segments | optional | The number of segments to predict. | integer
spikes | optional | Whether or not to generate spikes to the fit line instead of actually generating the fit line. | boolean
window | optional | The type of window to use for a kernel smooth model. | fixed. Specifies that the window size is fixed across all data.
smoothStatistic diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="smoothStatistic">
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="bandwith">
<xs:simpleType>
<xs:restriction base="xs:double">
<xs:minExclusive value="0"></xs:minExclusive>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="intercept" type="xs:double"></xs:attribute>
<xs:attribute name="bounded" type="xs:boolean"></xs:attribute>
<xs:attribute name="cutpoints" type="xs:string"></xs:attribute>
<xs:attribute name="degree" type="xs:integer"></xs:attribute>
<xs:attribute name="firstStep" type="xs:boolean"></xs:attribute>
<xs:attribute name="gridded" type="xs:boolean"></xs:attribute>
<xs:attribute name="kernel" type="vis:kernelType">
<xs:enumeration value="uniform"></xs:enumeration>
<xs:enumeration value="epanechnikov"></xs:enumeration>
<xs:enumeration value="biweight"></xs:enumeration>
<xs:enumeration value="triweight"></xs:enumeration>
<xs:enumeration value="tricube"></xs:enumeration>
<xs:enumeration value="gaussian"></xs:enumeration>
<xs:enumeration value="cauchy"></xs:enumeration>
</xs:attribute>
<xs:attribute name="marron" type="xs:boolean"></xs:attribute>
<xs:attribute name="method" type="vis:smoothMethodType">
<xs:enumeration value="linear"></xs:enumeration>
<xs:enumeration value="loess"></xs:enumeration>
<xs:enumeration value="power"></xs:enumeration>
<xs:enumeration value="quadratic"></xs:enumeration>
<xs:enumeration value="monotonic"></xs:enumeration>
<xs:enumeration value="cubic"></xs:enumeration>
<xs:enumeration value="polynomial"></xs:enumeration>
<xs:enumeration value="log"></xs:enumeration>
<xs:enumeration value="piecewise"></xs:enumeration>
<xs:enumeration value="mean"></xs:enumeration>
<xs:enumeration value="median"></xs:enumeration>
<xs:enumeration value="trim"></xs:enumeration>
<xs:enumeration value="spline"></xs:enumeration>
<xs:enumeration value="seasonal"></xs:enumeration>
<xs:enumeration value="step-left"></xs:enumeration>
<xs:enumeration value="step-right"></xs:enumeration>
<xs:enumeration value="step-center"></xs:enumeration>
</xs:attribute>
<xs:attribute name="neighbors" type="xs:integer"></xs:attribute>
<xs:attribute name="proportion">
<xs:simpleType>
<xs:restriction base="xs:double">
<xs:minInclusive value="0"></xs:minInclusive>
<xs:maxInclusive value="1"></xs:maxInclusive>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="robust" type="vis:robustType">
<xs:enumeration value="andrews"></xs:enumeration>
<xs:enumeration value="biweight"></xs:enumeration>
<xs:enumeration value="cauchy"></xs:enumeration>
<xs:enumeration value="fair"></xs:enumeration>
<xs:enumeration value="huber"></xs:enumeration>
<xs:enumeration value="logistic"></xs:enumeration>
<xs:enumeration value="talwar"></xs:enumeration>
<xs:enumeration value="welsch"></xs:enumeration>
</xs:attribute>
<xs:attribute name="segments" type="xs:integer"></xs:attribute>
<xs:attribute name="spikes" type="xs:boolean"></xs:attribute>
<xs:attribute name="residuals" type="xs:boolean"></xs:attribute>
<xs:attribute name="window" type="vis:windowType">
<xs:enumeration value="fixed"></xs:enumeration>
</xs:attribute>
</xs:element>

Parent Elements

area Element, edge Element, faceting Element, interval Element, line Element, path Element, point Element, polygon Element, schema Element


SOMStatistic Element

SOMStatistic element,SOMStatistic element,SOMStatistic element

Self-organizing map

Attributes for SOMStatistic
Attribute | Use | Description | Valid Values
sparse | optional | True if the data is in sparse matrix format | boolean
SOMStatistic diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="SOMStatistic">
<xs:attribute name="sparse" type="xs:boolean"></xs:attribute>
</xs:element>

Parent Elements

area Element, edge Element, faceting Element, interval Element, line Element, path Element, point Element, polygon Element, schema Element


sourceVariable Element

sourceVariable element,sourceVariable element,sourceVariable element

Variables are used to construct visualizations and are defined in terms of source data. They are the link that defines how a column of data is used in the chart.

Attributes for sourceVariable
Attribute Use Description Valid Values

categorical

optional

Whether this variable is categorical. If not, and it is not a date, the data values are converted to doubles. The difference between a categorical and non-categorical variable is profound and determines whether it can be used for faceting, the aesthetics with which it can be used, and other purposes. It is legal and often useful to have two variables use the same base data with different values for categorical and/or other attributes.

boolean

creator

optional

The creator of this variable.

string

dependsOn

optional

The DependsOn variable is a variable which is tied to this one. This information is used by controllers to make sure that if they move one of the variables, the tied variable is also moved. As an example, a pivot table controller will move both of the variables at the same time, not allowing them to be moved independently . If a variable is a group for another categorical variable in a table, the group variable should define the categorical variable as a 'dependsOn' variable.

IDREF

description

optional

A description of the variable for human or machine use.

string

domain

optional

All data exist in some domain, and that domain is used to control what the "minimum" and "maximum" values are. By default, the domain of a variable is defined to be the data range (for continuous variables) or the set of unique values of a variable (for categorical variables). If this parameter is specified, the default domain is replaced with this one.

IDREF

domainModifier

optional

The domain modifier defines how the domain is modified.

IDREF

id

optional

Identifies the variable.

ID

inputDateFormatPattern

optional

The date input format pattern to use when reading this variable (for example, M/dd/yy).

string

key

optional

Indicates the variable can be used as a database key; all entries in it should be unique.

boolean

label

optional

A human-readable name for the variable (defaults to the ID).

string

labelVariable

optional

By default, the values of a categorical variable are used as the labels. If this attribute is specified, the given variable is used to label the categories of this variable. The label variable must be of the same length as this variable, since it matches on a row-by-row basis, and both must be categorical variables.

IDREF

measurementLevel

optional

A hint as to the scale for the data (nominal, ordinal, interval, ratio)

nominal. The only comparisons that can be made between nominal variable values are equality and inequality

ordinal. In this classification, the values can be given a rank order (1st, 2nd, 3rd etc.). Comparisons of greater and less can be made, in addition to equality and inequality

interval. In this classification, equal differences between measurements represent equivalent intervals. Operations such as addition and subtraction are therefore meaningful. The zero point on the scale is, however, arbitrary. Dates are a good example of intervals

ratio. In this classification, the ratios between pairs of numbers is meaningful. Operations such as multiplication and division are therefore meaningful. The zero value on a ratio scale is non-arbitrary

originalSourceName

optional

This is for internal use only. It is used to maintain the original variable source name through acceleration.

string

shortLabel

optional

A short human-readable label for the variable (defaults to the label).

string

source

optional

The data source that contains the variables from which this variable is derived.

IDREF

sourceName

optional

The name of this variable as it is identified in the source.

string

weight

optional

If true, this variable will be used as the weight for all data in the same source. At most one weight may be defined for a source. Statistics will treat these weights as replication weights unless otherwise noted.

boolean

sourceVariable diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="sourceVariable">
<xs:sequence>
<xs:element ref="vis:extension" minOccurs="0" maxOccurs="unbounded"></xs:element>
<xs:element name="aggregation" minOccurs="0"></xs:element>
<xs:element ref="vis:format" minOccurs="0"></xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="categorical" type="xs:boolean"></xs:attribute>
<xs:attribute name="measurementLevel" type="vis:measurementLevel">
<xs:enumeration value="nominal"></xs:enumeration>
<xs:enumeration value="ordinal"></xs:enumeration>
<xs:enumeration value="interval"></xs:enumeration>
<xs:enumeration value="ratio"></xs:enumeration>
</xs:attribute>
<xs:attribute name="label" type="xs:string"></xs:attribute>
<xs:attribute name="shortLabel" type="xs:string"></xs:attribute>
<xs:attribute name="domain" type="xs:IDREF"></xs:attribute>
<xs:attribute name="domainModifier" type="xs:IDREF"></xs:attribute>
<xs:attribute name="labelVariable" type="xs:IDREF"></xs:attribute>
<xs:attribute name="dependsOn" type="xs:IDREF"></xs:attribute>
<xs:attribute name="weight" type="xs:boolean"></xs:attribute>
<xs:attribute name="key" type="xs:boolean"></xs:attribute>
<xs:attribute name="creator" type="xs:string"></xs:attribute>
<xs:attribute name="description" type="xs:string"></xs:attribute>
<xs:attribute name="source" type="xs:IDREF"></xs:attribute>
<xs:attribute name="sourceName" type="xs:string"></xs:attribute>
<xs:attribute name="inputDateFormatPattern" type="xs:string"></xs:attribute>
<xs:attribute name="originalSourceName" type="xs:string"></xs:attribute>
</xs:element>

Parent Elements

visualization Element

Child Elements

aggregation Element, extension Element, format Element

Related Elements

derivedVariable Element, expressionVariable Element, multipleResponseVariable Element


aggregation Element

aggregation element,aggregation element,aggregation element

Aggregates categories of a categorical variable based on the sum of values of a different variable.

Attributes for aggregation
Attribute | Use | Description | Valid Values
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
minFraction | required | The fraction (between 0 and 1) that will be used to determine if a category is to be aggregated. If a category has a summed value less than the given fraction of the overall sum, it will be aggregated unless it is the only such category (in which case there is nothing with which to aggregate it!). | any
newCategory | required | The name of the category that is created if any aggregation occurs. | string
sumVariable | optional | The variable whose categories are summed to determine the new category's size. | IDREF
aggregation diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="aggregation" minOccurs="0">
<xs:attribute name="newCategory" type="xs:string" use="required"></xs:attribute>
<xs:attribute name="sumVariable" type="xs:IDREF" use="optional"></xs:attribute>
<xs:attribute name="minFraction" use="required">
<xs:simpleType>
<xs:restriction base="xs:double">
<xs:minInclusive value="0"></xs:minInclusive>
<xs:maxInclusive value="1"></xs:maxInclusive>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
</xs:element>

Parent Elements

sourceVariable Element


split Element

split element,split element,split element

A pseudo-aesthetic that does not actually change graphic appearance, but simply splits the element into subgroups based on a categorical variable.

Attributes for split
Attribute | Use | Description | Valid Values
clamp | optional | If true, values off the edges of the domain will be pegged to low or high values, not ignored. | boolean
dimension | optional | If the variable is an expression that contains more than one dimension of data (for example, the expression contained a cross of other variables), then this attribute specifies which of the variable's dimensions to use. The first is numbered 0, then 1, 2, etc. | nonNegativeInteger
domain | optional | If specified, this domain will be used to define the domain of the variable rather than the variable's default domain. For example, a user might choose to map 0 to black and 1 to white even if the data only run from 0.3 to 0.7. In this case a domain of [0,1] would be specified for the aesthetic. | IDREF
domainModifier | optional | The domain modifier defines how the domain is modified. | IDREF
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
split | optional | If true, distinct values of the variable will have statistics computed on them independently. | boolean
variable | optional | Referers to a data variable. The values of this variable will be mapped to aesthetic values used to display the element. | IDREF
split diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="split">
<xs:sequence>
<xs:element ref="vis:scale" minOccurs="0"></xs:element>
<xs:element ref="vis:summaryStatistic" minOccurs="0"></xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="domainModifier" type="xs:IDREF"></xs:attribute>
<xs:attribute name="variable" type="xs:IDREF"></xs:attribute>
<xs:attribute name="dimension" type="xs:nonNegativeInteger"></xs:attribute>
<xs:attribute name="domain" type="xs:IDREF"></xs:attribute>
<xs:attribute name="clamp" type="xs:boolean"></xs:attribute>
<xs:attribute name="split" type="xs:boolean"></xs:attribute>
</xs:element>

Parent Elements

area Element, brushing Element, edge Element, interval Element, line Element, path Element, point Element, polygon Element, schema Element

Child Elements

scale Element, summaryStatistic Element

Related Elements

color Element, colorComponent Element, dash Element, footnotes Element, formatting Element, image Element, labeling Element, labelLocation Element, offset Element, pattern Element, rotation Element, shape Element, size Element, styleBy Element, transparency Element, visibility Element


statisticSort Element

statisticSort element,statisticSort element,statisticSort element

Sorts categories according to a statistic calculated on a continuous variable for rows with each category.

Attributes for statisticSort
Attribute Use Description Valid Values

descending

optional

Whether to reverse the usual sorting order.

boolean

id

optional

An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one.

ID

method

optional

The summary method.

mean. The mean of the data.

sum. The sum of the data.

midRange. The middle of the range of the data.

percent. The percent of this group of data compared to all the data.

percentCount. The percent of the count of this group of data compared to all the data.

fraction. The fraction of this group of data compared to all the data.

fractionCount. The fraction of the count of this group of data compared to all the data.

range. The range of values for data. This may be used as either a two-value interval, or a one-value extent.

confidenceIntervalOfMean. The simple confidence interval for the mean. This may be used as either a two-value interval, or a one-value extent.

confidenceIntervalIndividual. The simple confidence interval for individuals. This may be used as either a two-value interval, or a one-value extent.

count. The number of individuals in the data.

confidenceIntervalOfCount. The simple confidence interval for a count. This may be used as either a two-value interval, or a one-value extent.

confidenceIntervalOfPercentCount. The simple confidence interval for a percentage. This may be used as either a two-value interval, or a one-value extent.

confidenceIntervalOfFractionCount. The simple confidence interval for a fraction of counts. This may be used as either a two-value interval, or a one-value extent.

rowCount. The number of rows in the data. This is like count, but only counts data from blends once.

stddev. The standard deviation for the data.

stderr. The standard error for the data.

median. The median for the data.

max. The maximum value for the data.

min. The minimum value for the data.

variance. The variance of the data.

cumulativeSum. The cumulative sum, which summarizes each category and adds it to the previous category, through all categories in the data.

cumulativePercent. Cumulative percentage across all categories in the data, the final value being 100.

cumulativePercentCount. Cumulative percentage of the counts across all categories in the data, the final value being 100.

cumulativeFraction. Cumulative fraction across all categories in the data, the final value being 1.

cumulativeFractionCount. Cumulative fraction of the counts across all categories in the data, the final value being 1.

cumulativeCount. The cumulative count, which counts each category and adds it to the previous category, through all the categories in the data.

first. The first value presented for the category.

last. The last value presented for the category.

percentile. The data value below which the specified percentage of values fall within each category.

mode. The first value presented for the category.

countTrue. The count of true values. A value is true if its string is precisely "true".

percentTrue. The percentage of true values. A value is true if its string is precisely "true".

fractionTrue. The fraction of true values. A value is true if its string is precisely "true".

sourceVariable

required

The variable that contains categories for sorting. Categories not present are to one end of the list.

IDREF

statVariable

optional

The continuous variable on which the statistic is calculated for each category in the categorical variable.

IDREF

statisticSort diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="statisticSort">
<xs:sequence>
<xs:element name="sortMove" minOccurs="0" maxOccurs="unbounded"></xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="descending" type="xs:boolean"></xs:attribute>
<xs:sequence minOccurs="0" maxOccurs="1">
<xs:element ref="vis:union" minOccurs="0" maxOccurs="1"></xs:element>
</xs:sequence>
<xs:attribute name="sourceVariable" type="xs:IDREF" use="required"></xs:attribute>
<xs:attribute name="statVariable" type="xs:IDREF"></xs:attribute>
<xs:attribute name="method" type="vis:summaryType">
<xs:enumeration value="mean"></xs:enumeration>
<xs:enumeration value="sum"></xs:enumeration>
<xs:enumeration value="midRange"></xs:enumeration>
<xs:enumeration value="percent"></xs:enumeration>
<xs:enumeration value="percentCount"></xs:enumeration>
<xs:enumeration value="fraction"></xs:enumeration>
<xs:enumeration value="fractionCount"></xs:enumeration>
<xs:enumeration value="range"></xs:enumeration>
<xs:enumeration value="confidenceIntervalOfMean"></xs:enumeration>
<xs:enumeration value="confidenceIntervalIndividual"></xs:enumeration>
<xs:enumeration value="count"></xs:enumeration>
<xs:enumeration value="confidenceIntervalOfCount"></xs:enumeration>
<xs:enumeration value="confidenceIntervalOfPercentCount"></xs:enumeration>
<xs:enumeration value="confidenceIntervalOfFractionCount"></xs:enumeration>
<xs:enumeration value="rowCount"></xs:enumeration>
<xs:enumeration value="stddev"></xs:enumeration>
<xs:enumeration value="stderr"></xs:enumeration>
<xs:enumeration value="median"></xs:enumeration>
<xs:enumeration value="max"></xs:enumeration>
<xs:enumeration value="min"></xs:enumeration>
<xs:enumeration value="variance"></xs:enumeration>
<xs:enumeration value="cumulativeSum"></xs:enumeration>
<xs:enumeration value="cumulativePercent"></xs:enumeration>
<xs:enumeration value="cumulativePercentCount"></xs:enumeration>
<xs:enumeration value="cumulativeFraction"></xs:enumeration>
<xs:enumeration value="cumulativeFractionCount"></xs:enumeration>
<xs:enumeration value="cumulativeCount"></xs:enumeration>
<xs:enumeration value="first"></xs:enumeration>
<xs:enumeration value="last"></xs:enumeration>
<xs:enumeration value="percentile"></xs:enumeration>
<xs:enumeration value="mode"></xs:enumeration>
<xs:enumeration value="countTrue"></xs:enumeration>
<xs:enumeration value="percentTrue"></xs:enumeration>
<xs:enumeration value="fractionTrue"></xs:enumeration>
</xs:attribute>
</xs:element>

Parent Elements

categoricalDomain Element, categoricalDomainModifier Element, intervalDomainModifier Element

Child Elements

sortMove Element, union Element

Related Elements

simpleSort Element


sortMove Element

sortMove element,sortMove element,sortMove element

Sort at the beginning or end of a categorical domain. Category sorts at the beginning if the first attribute is true, otherwise it sorts at the end.

Attributes for sortMove
Attribute | Use | Description | Valid Values
category | required | The value to be placed in the sort order. | string
first | optional | Whether the value sorts at the beginning or end. | boolean
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
sortMove diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="sortMove" minOccurs="0" maxOccurs="unbounded">
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="first" type="xs:boolean"></xs:attribute>
<xs:attribute name="category" type="xs:string" use="required"></xs:attribute>
</xs:element>

Parent Elements

statisticSort Element


streamingSource Element

streamingSource element,streamingSource element,streamingSource element

A source of streaming data.

Attributes for streamingSource
Attribute Use Description Valid Values

filterToMissing

optional

Determines whether or not the data will be filtered to missing. The default is false

boolean

id

optional

An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one.

ID

missing

optional

offers listwise and variablewise (pairwise) missing value treatment when computing statistics. For VARIABLEWISE (Pairwise), a case is included in statistics for each variable in a function for which it has a valid value (regardless of whether the case has missing values for other variables). For LISTWISE, statistics for all variables used in functions in a graph data set are based on the same cases. Cases with missing values for any variable used in a function in a graph data set are excluded. Pairwise (VARIABLEWISE) is the default.

pairwise. For PAIRWISE, a case is included in statistics for each variable in a function for which it has a valid value (regardless of whether the case has missing values for other variables). PAIRWISE is the default.

listwise. For LISTWISE, statistics for all variables used in functions in a graph data set are based on the same cases. Cases with missing values for any variable used in a function in a graph data set are excluded.

url

required

The URL of a jar file containing a streaming source.

any

streamingSource diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="streamingSource">
<xs:sequence>
<xs:element name="aggregate" minOccurs="0" maxOccurs="1"></xs:element>
<xs:element name="filter" minOccurs="0" maxOccurs="unbounded"></xs:element>
<xs:element name="dataReduction" minOccurs="0" maxOccurs="1"></xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="missing" type="vis:missingDataType">
<xs:enumeration value="pairwise"></xs:enumeration>
<xs:enumeration value="listwise"></xs:enumeration>
</xs:attribute>
<xs:attribute name="filterToMissing" type="xs:boolean"></xs:attribute>
<xs:attribute name="url" use="required"></xs:attribute>
</xs:element>

Parent Elements

visualization Element

Child Elements

aggregate Element, dataReduction Element, filter Element

Related Elements

databaseSource Element, delimitedFileSource Element, embeddedSource Element, reportSource Element, reshapeSource Element, savFileSource Element


aggregate Element

aggregate element,aggregate element,aggregate element

This causes a source to have similar rows aggregated. All non-key variables returned from this source will be summed.

Attributes for aggregate
Attribute | Use | Description | Valid Values
generatedCount | optional | If this attribute is defined, a column will be added to the source giving the count of the number of rows aggregated into a single row. | string
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
keyVariables | required | A semicolon delimited list of variable names that will be used as the aggregation keys. | string
aggregate diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="aggregate" minOccurs="0" maxOccurs="1">
<xs:attribute name="keyVariables" type="xs:string" use="required"></xs:attribute>
<xs:attribute name="generatedCount" type="xs:string"></xs:attribute>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
</xs:element>

Parent Elements

streamingSource Element


filter Element

filter element,filter element,filter element

An element that reduces the number of rows on the data by checking if the values of a source variable are within a domain.

Attributes for filter
Attribute | Use | Description | Valid Values
domain | optional | The domain to use as criteria for filtering the source. If not defined, missing values will be used as the domain | IDREF
exclude | optional | If true, exclude values in the domain, otherwise include them. | boolean
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
sourceName | optional | Name of the variable within the source. If unspecified, the row index is used. | string
filter diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="filter" minOccurs="0" maxOccurs="unbounded">
<xs:attribute name="sourceName" type="xs:string"></xs:attribute>
<xs:attribute name="domain" type="xs:IDREF"></xs:attribute>
<xs:attribute name="exclude" type="xs:boolean"></xs:attribute>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
</xs:element>

Parent Elements

streamingSource Element


dataReduction Element

dataReduction element,dataReduction element,dataReduction element

An element that reduces the number of rows on the data

Attributes for dataReduction
Attribute | Use | Description | Valid Values
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
maxRows | optional | The limit of the number of rows to be returned from a data source | integer
weightVariableName | optional | The name of the weight variable used to represent the amount of the data returned | string
dataReduction diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="dataReduction" minOccurs="0" maxOccurs="1">
<xs:attribute name="maxRows" type="xs:integer"></xs:attribute>
<xs:attribute name="weightVariableName" type="xs:string"></xs:attribute>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
</xs:element>

Parent Elements

streamingSource Element


stringMapping Element

stringMapping element,stringMapping element,stringMapping element

Specifies a mapping from a category to a string.

Attributes for stringMapping
Attribute | Use | Description | Valid Values
from | required | Category that is mapped to a specific value of the aesthetic. | string
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
to | required | A string representing an aesthetic value such as image location. | string
stringMapping diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="stringMapping">
<xs:attribute name="from" type="xs:string" use="required"></xs:attribute>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="to" type="xs:string" use="required"></xs:attribute>
</xs:element>

Parent Elements

image Element

Related Elements

booleanMapping Element, colorMapping Element, dashMapping Element, doubleMapping Element, footnoteMapping Element, formatMapping Element, integerMapping Element, lengthMapping Element, symbolMapping Element


style Element

style element,style element,style element

A cascading style sheet-like definition of a style to control drawing details such as colors, line widths, fonts, pattern and transparency.

Attributes for style
Attribute Use Description Valid Values

background-image

optional

Define a location for an image to use. May be a file path, a path relative to the top level of a jar file, or a URL.

string

background-method

optional

If there is a background image, this defines how to fit it in the shape.

tile. Tile the image across the target.

stretch. Stretch the image to fill the target and do not preserve the aspect ratio.

zoom. Zoom the image to fill the target and preserve the aspect ratio.

center. Place a single copy of the image in the center of the target.

left. Place a single copy of the image anchored to the left of the target

right. Place a single copy of the image anchored to the right of the target

top. Place a single copy of the image anchored to the top of the target

bottom. Place a single copy of the image anchored to the bottom of the target

baselineRotated

optional

If true, all text (Roman and CJK) is drawn in normal orientation, stacked on top of each other.

boolean

bevel-size

optional

Width of bevel with which to draw the item.

length

border-bottom

optional

Sets the border style type for the bottom border.

none. There is nothing drawn there irrespective of the other values in the style

normal. Current behavior. Use all the style properties

solid. A line drawn with the normal style using the style color, width, endcap, etc. but ignoring the dashing (dashing effectively set to none)

dashed. A line drawn with the normal style using the style color, width, endcap, etc. If a dashing is defined, it uses that, but if no dashing is defined, it uses a default DASH pattern

thick. A line drawn with the normal style using the style color, endcap, etc. but ignoring the dashing and with the line width set to 2x normal

thin. A line drawn with the normal style using the style color, endcap, etc. but ignoring the dashing and with the line width set to 1/2 normal

double. A line drawn as a solid, except you draw two lines, centered on the line ignoring the dashing, but with a visible gap between them equal to the width (so if the width is 2, you would draw them at locations +2, -2 (which would leave a visible gap of 2 between them)

border-bottom-color

optional

The color of the bottom border.

string

border-left

optional

Sets the border style type for the left border.

none. There is nothing drawn there irrespective of the other values in the style

normal. Current behavior. Use all the style properties

solid. A line drawn with the normal style using the style color, width, endcap, etc. but ignoring the dashing (dashing effectively set to none)

dashed. A line drawn with the normal style using the style color, width, endcap, etc. If a dashing is defined, it uses that, but if no dashing is defined, it uses a default DASH pattern

thick. A line drawn with the normal style using the style color, endcap, etc. but ignoring the dashing and with the line width set to 2x normal

thin. A line drawn with the normal style using the style color, endcap, etc. but ignoring the dashing and with the line width set to 1/2 normal

double. A line drawn as a solid, except you draw two lines, centered on the line ignoring the dashing, but with a visible gap between them equal to the width (so if the width is 2, you would draw them at locations +2, -2 (which would leave a visible gap of 2 between them)

border-left-color

optional

The color of the left border.

string

border-right

optional

Sets the border style type for the right border.

none. There is nothing drawn there irrespective of the other values in the style

normal. Current behavior. Use all the style properties

solid. A line drawn with the normal style using the style color, width, endcap, etc. but ignoring the dashing (dashing effectively set to none)

dashed. A line drawn with the normal style using the style color, width, endcap, etc. If a dashing is defined, it uses that, but if no dashing is defined, it uses a default DASH pattern

thick. A line drawn with the normal style using the style color, endcap, etc. but ignoring the dashing and with the line width set to 2x normal

thin. A line drawn with the normal style using the style color, endcap, etc. but ignoring the dashing and with the line width set to 1/2 normal

double. A line drawn as a solid, except you draw two lines, centered on the line ignoring the dashing, but with a visible gap between them equal to the width (so if the width is 2, you would draw them at locations +2, -2 (which would leave a visible gap of 2 between them)

border-right-color

optional

The color of the right border.

string

border-top

optional

Sets the border style type for the top border.

none. There is nothing drawn there irrespective of the other values in the style

normal. Current behavior. Use all the style properties

solid. A line drawn with the normal style using the style color, width, endcap, etc. but ignoring the dashing (dashing effectively set to none)

dashed. A line drawn with the normal style using the style color, width, endcap, etc. If a dashing is defined, it uses that, but if no dashing is defined, it uses a default DASH pattern

thick. A line drawn with the normal style using the style color, endcap, etc. but ignoring the dashing and with the line width set to 2x normal

thin. A line drawn with the normal style using the style color, endcap, etc. but ignoring the dashing and with the line width set to 1/2 normal

double. A line drawn as a solid, except you draw two lines, centered on the line ignoring the dashing, but with a visible gap between them equal to the width (so if the width is 2, you would draw them at locations +2, -2 (which would leave a visible gap of 2 between them)

border-top-color

optional

The color of the top border.

string

brightness

optional

The primary brightness (overrides color).

double

brightness2

optional

The secondary brightness (overrides color2).

double

color

optional

The primary color.

string

color2

optional

The secondary color. Used for the exterior color for shapes that have exterior, and for items like the median lines in schemas.

string

decimal-offset

optional

Used with decimal text alignment only, offset of the decimal from the right.

length

depth

optional

Size of the extruded shape for such shapes in 3D.

length

depthRelativeToWidth

optional

If true, the depth is proportional to the width for extruded shapes in 3D.

boolean

fill

optional

The color used to fill a shape. This is deprecated; the color attribute should be used instead.

string

fill-opacity

optional

The opacity used to fill a shape. This is deprecated; the opacity attribute should be used instead.

string

font-family

optional

Name of the font family to use.

string

font-size

optional

Size of font.

length

font-style

optional

Font face.

regular. Not italic.

italic. Italic.

font-underline

optional

underline flag.

none. Non-underline.

underline. underline.

font-weight

optional

Use bold font or normal weight font.

regular. Normal weight.

bold. Heavy weight.

glyph-angle

optional

If a symbol is used for the target, rotate it by this amount in degrees.

double

glyph-aspect

optional

If a symbol is used for the target, set its aspect ratio to this value

any

glyph-sides

optional

Number of sides for a symbol that can have different numbers of sides (star, polygon, flower).

any

gradient-angle

optional

For linear gradients, the angle of the gradient from horizontal.

double

gradient-color

optional

If set, a gradient is drawn across the target using the 'color' and this color.

string

gradient-focus

optional

A value between -1 and 1 indicating where the center of the gradient should be.

double

gradient-isInverted

optional

Invert the colors of the gradient, swapping 'color' and 'gradient-color'.

boolean

gradient-method

optional

If a gradient color is set, this allows either a radial or linear gradient to be used to fill the target.

linear. A linear gradient.

radial. A radial gradient (outward from a point).

gradient-opacity

optional

The opacity of the gradient.

any

gradient-size

optional

For radial gradients. the size of the radius for the gradient, which is a value between 0 and 1.

double

height

optional

The height of an element (a line, bar, cell or such). If not set, the 'size' value is used instead.

length

hue

optional

The primary hue (overrides color).

double

hue2

optional

The secondary hue (overrides color2).

double

id

optional

An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one.

ID

ignoreNewLines

optional

If true, newlines in text are replaced by spaces.

boolean

labelAngle

optional

For labels, the angle at which to draw them in degrees.

double

labelInside

optional

If true, labels are placed inside the target. If false, outside the target. If preferred, it tries inside. If that doesn't fit, then it does outside.

true. Labels Re placed inside the target.

false. Labels are placed outside the target.

preferred. The labels are placed inside the target, but only if they fit. If they don't fit, then they're placed outside the target.

labelLocationHorizontal

optional

The label placement relative to the target in the 'horizontal' direction. Under coordinate transforms, this may not actually be the horizontal direction, but the 'transformed horizontal'.

any

labelLocationVertical

optional

The label placement relative to the target in the 'vertical' direction. Under coordinate transforms, this may not actually be the vertical direction, but the 'transformed vertical'.

any

margin

optional

Amount of space to leave between the target and neighboring shapes. "Neighboring" is defined differently for different targets.

length

margin-bottom

optional

Overrides the generic margin value for one direction.

length

margin-left

optional

Overrides the generic margin value for one direction.

length

margin-right

optional

Overrides the generic margin value for one direction.

length

margin-top

optional

Overrides the generic margin value for one direction.

length

maxAttachedTextHeight

optional

For text that is attached on the outside of a target, this is the maximum size it can extend vertically.

length

maxAttachedTextWidth

optional

For text that is attached on the outside of a target, this is the maximum size it can extend horizontally.

length

opacity

optional

The primary opacity (overrides color).

string

opacity2

optional

The opacity of the secondary color.

any

padding

optional

Amount of space to leave between this target and items inside it.

length

padding-bottom

optional

Overrides the generic padding value for one direction.

length

padding-left

optional

Overrides the generic padding value for one direction.

length

padding-right

optional

Overrides the generic padding value for one direction.

length

padding-top

optional

Overrides the generic padding value for one direction.

length

pattern

optional

Index of a pattern to fill the target with. Pattern 0, which is a solid fill, is the default.

any

saturation

optional

The primary saturation (overrides color).

double

saturation2

optional

The secondary saturation (overrides color2).

double

shadow-color

optional

If set, a shadow of this color will be drawn under the target.

string

shadow-dx

optional

Offset in horizontal direction (as a length, this defaults to pixels if no unit is specified).

length

shadow-dy

optional

Offset in vertical direction (as a length, this defaults to pixels if no unit is specified).

length

shadow-opacity

optional

The opacity of the shadow.

any

size

optional

The size of the symbol, line, or other shape to be drawn. This is not the size of text; use the font-size attribute for that.

length

stroke

optional

The color used to draw the edges of a shape. This is deprecated; the color or color2 attributes should be used instead.

string

stroke-dasharray

optional

A semicolon-delimited list of lengths to use for the stroke dashing. Percentages are relative to the stroke width.

string

stroke-decoration

optional

Draw the target with a decorative edging.

etchLowered. Etch the shape with a 'lowered' etch look.

etchRaised. Etch the shape with a 'raised' etch look.

bevel. Put a bevel on the shape.

stroke-linecap

optional

The method to use to join and end lines.

round. Use rounded joins with circular caps protruding past the start and end points.

square. Use mitered joins with square caps protruding past the start and end points.

butt. Use mitered joins with square caps butting up to the start and end points.

stroke-opacity

optional

The opacity used to draw a shape's edges. This is deprecated; the opacity or opacity2 attributes should be used instead.

string

stroke-width

optional

The width of the stroke for drawing the shape.

length

symbol

optional

Which symbol to draw for the shape. Valid values include circle, square, line, arrow, polygon, star, roundRectangle and flower.

any

textAlignment

optional

Alignment of text within space allowed for it.

left. Align text on the left.

right. Align text on the right.

center. Align text in the center.

decimal. Align numbers on the decimal symbol.

mixed. Align text and numbers according to their type.

text-fit

optional

If true, the text autofits, shrinking down if necessary to fit in the space.

boolean

text-rotate

optional

If true, the text autorotates by 90 if it will better fit the space

boolean

twoCharacterVertical

optional

If true, for CJK text that is drawn vertically, roman characters are drawn in pairs with regular orientation. If false, roman text is drawn rotated within the vertical strip for the CJK text.

boolean

visible

optional

If false, the target is hidden.

boolean

width

optional

The width of an element (a line, bar, cell or such). If not set, the 'size' value is used instead.

length

style diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="style">
<xs:sequence>
<xs:element ref="vis:style" minOccurs="0" maxOccurs="unbounded"></xs:element>
<xs:element ref="vis:extension" minOccurs="0" maxOccurs="unbounded"></xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="gradient-method">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="linear"></xs:enumeration>
<xs:enumeration value="radial"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="gradient-color" type="xs:string"></xs:attribute>
<xs:attribute name="gradient-focus" type="xs:double"></xs:attribute>
<xs:attribute name="gradient-angle" type="xs:double"></xs:attribute>
<xs:attribute name="gradient-size" type="xs:double"></xs:attribute>
<xs:attribute name="gradient-opacity">
<xs:simpleType>
<xs:restriction base="xs:double">
<xs:minInclusive value="0"></xs:minInclusive>
<xs:maxInclusive value="1"></xs:maxInclusive>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="gradient-isInverted" type="xs:boolean"></xs:attribute>
<xs:attribute name="shadow-color" type="xs:string"></xs:attribute>
<xs:attribute name="shadow-opacity">
<xs:simpleType>
<xs:restriction base="xs:double">
<xs:minInclusive value="0"></xs:minInclusive>
<xs:maxInclusive value="1"></xs:maxInclusive>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="shadow-dx" type="vis:length"></xs:attribute>
<xs:attribute name="shadow-dy" type="vis:length"></xs:attribute>
<xs:attribute name="glyph-angle" type="xs:double"></xs:attribute>
<xs:attribute name="glyph-aspect">
<xs:simpleType>
<xs:restriction base="xs:double">
<xs:minInclusive value="0"></xs:minInclusive>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="color2" type="xs:string"></xs:attribute>
<xs:attribute name="hue2" type="xs:double"></xs:attribute>
<xs:attribute name="saturation2" type="xs:double"></xs:attribute>
<xs:attribute name="brightness2" type="xs:double"></xs:attribute>
<xs:attribute name="opacity2">
<xs:simpleType>
<xs:restriction base="xs:double">
<xs:minInclusive value="0"></xs:minInclusive>
<xs:maxInclusive value="1"></xs:maxInclusive>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="pattern">
<xs:simpleType>
<xs:restriction base="xs:int">
<xs:minInclusive value="0"></xs:minInclusive>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="background-method">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="tile"></xs:enumeration>
<xs:enumeration value="stretch"></xs:enumeration>
<xs:enumeration value="zoom"></xs:enumeration>
<xs:enumeration value="center"></xs:enumeration>
<xs:enumeration value="left"></xs:enumeration>
<xs:enumeration value="right"></xs:enumeration>
<xs:enumeration value="top"></xs:enumeration>
<xs:enumeration value="bottom"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="background-image" type="xs:string"></xs:attribute>
<xs:attribute name="margin" type="vis:length"></xs:attribute>
<xs:attribute name="margin-left" type="vis:length"></xs:attribute>
<xs:attribute name="margin-right" type="vis:length"></xs:attribute>
<xs:attribute name="margin-top" type="vis:length"></xs:attribute>
<xs:attribute name="margin-bottom" type="vis:length"></xs:attribute>
<xs:attribute name="padding" type="vis:length"></xs:attribute>
<xs:attribute name="padding-left" type="vis:length"></xs:attribute>
<xs:attribute name="padding-right" type="vis:length"></xs:attribute>
<xs:attribute name="padding-top" type="vis:length"></xs:attribute>
<xs:attribute name="padding-bottom" type="vis:length"></xs:attribute>
<xs:attribute name="color" type="xs:string"></xs:attribute>
<xs:attribute name="opacity" type="xs:string"></xs:attribute>
<xs:attribute name="hue" type="xs:double"></xs:attribute>
<xs:attribute name="saturation" type="xs:double"></xs:attribute>
<xs:attribute name="brightness" type="xs:double"></xs:attribute>
<xs:attribute name="stroke-dasharray" type="xs:string"></xs:attribute>
<xs:attribute name="stroke-width" type="vis:length"></xs:attribute>
<xs:attribute name="stroke-decoration">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="etchLowered"></xs:enumeration>
<xs:enumeration value="etchRaised"></xs:enumeration>
<xs:enumeration value="bevel"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="size" type="vis:length"></xs:attribute>
<xs:attribute name="symbol">
<xs:simpleType>
<xs:restriction base="xs:string"></xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="glyph-sides">
<xs:simpleType>
<xs:restriction base="xs:int">
<xs:minInclusive value="2"></xs:minInclusive>
<xs:maxInclusive value="100"></xs:maxInclusive>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="font-family" type="xs:string"></xs:attribute>
<xs:attribute name="font-size" type="vis:length"></xs:attribute>
<xs:attribute name="font-style">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="regular"></xs:enumeration>
<xs:enumeration value="italic"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="font-underline">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="none"></xs:enumeration>
<xs:enumeration value="underline"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="font-weight">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="regular"></xs:enumeration>
<xs:enumeration value="bold"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="bevel-size" type="vis:length"></xs:attribute>
<xs:attribute name="depth" type="vis:length"></xs:attribute>
<xs:attribute name="depthRelativeToWidth" type="xs:boolean"></xs:attribute>
<xs:attribute name="stroke-linecap">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="round"></xs:enumeration>
<xs:enumeration value="square"></xs:enumeration>
<xs:enumeration value="butt"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="labelAngle" type="xs:double"></xs:attribute>
<xs:attribute name="labelInside">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="true"></xs:enumeration>
<xs:enumeration value="false"></xs:enumeration>
<xs:enumeration value="preferred"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="labelLocationHorizontal">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:pattern value="center"></xs:pattern>
<xs:pattern value="positive"></xs:pattern>
<xs:pattern value="negative"></xs:pattern>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="labelLocationVertical">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:pattern value="center"></xs:pattern>
<xs:pattern value="positive"></xs:pattern>
<xs:pattern value="negative"></xs:pattern>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="textAlignment">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="left"></xs:enumeration>
<xs:enumeration value="right"></xs:enumeration>
<xs:enumeration value="center"></xs:enumeration>
<xs:enumeration value="decimal"></xs:enumeration>
<xs:enumeration value="mixed"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="decimal-offset" type="vis:length"></xs:attribute>
<xs:attribute name="ignoreNewLines" type="xs:boolean"></xs:attribute>
<xs:attribute name="twoCharacterVertical" type="xs:boolean"></xs:attribute>
<xs:attribute name="baselineRotated" type="xs:boolean"></xs:attribute>
<xs:attribute name="maxAttachedTextWidth" type="vis:length"></xs:attribute>
<xs:attribute name="maxAttachedTextHeight" type="vis:length"></xs:attribute>
<xs:attribute name="visible" type="xs:boolean"></xs:attribute>
<xs:attribute name="width" type="vis:length"></xs:attribute>
<xs:attribute name="height" type="vis:length"></xs:attribute>
<xs:attribute name="text-fit" type="xs:boolean"></xs:attribute>
<xs:attribute name="text-rotate" type="xs:boolean"></xs:attribute>
<xs:attribute name="fill" type="xs:string"></xs:attribute>
<xs:attribute name="stroke" type="xs:string"></xs:attribute>
<xs:attribute name="fill-opacity" type="xs:string"></xs:attribute>
<xs:attribute name="stroke-opacity" type="xs:string"></xs:attribute>
<xs:attribute name="border-left" type="vis:borderStyleType">
<xs:enumeration value="none"></xs:enumeration>
<xs:enumeration value="normal"></xs:enumeration>
<xs:enumeration value="solid"></xs:enumeration>
<xs:enumeration value="dashed"></xs:enumeration>
<xs:enumeration value="thick"></xs:enumeration>
<xs:enumeration value="thin"></xs:enumeration>
<xs:enumeration value="double"></xs:enumeration>
</xs:attribute>
<xs:attribute name="border-right" type="vis:borderStyleType">
<xs:enumeration value="none"></xs:enumeration>
<xs:enumeration value="normal"></xs:enumeration>
<xs:enumeration value="solid"></xs:enumeration>
<xs:enumeration value="dashed"></xs:enumeration>
<xs:enumeration value="thick"></xs:enumeration>
<xs:enumeration value="thin"></xs:enumeration>
<xs:enumeration value="double"></xs:enumeration>
</xs:attribute>
<xs:attribute name="border-top" type="vis:borderStyleType">
<xs:enumeration value="none"></xs:enumeration>
<xs:enumeration value="normal"></xs:enumeration>
<xs:enumeration value="solid"></xs:enumeration>
<xs:enumeration value="dashed"></xs:enumeration>
<xs:enumeration value="thick"></xs:enumeration>
<xs:enumeration value="thin"></xs:enumeration>
<xs:enumeration value="double"></xs:enumeration>
</xs:attribute>
<xs:attribute name="border-bottom" type="vis:borderStyleType">
<xs:enumeration value="none"></xs:enumeration>
<xs:enumeration value="normal"></xs:enumeration>
<xs:enumeration value="solid"></xs:enumeration>
<xs:enumeration value="dashed"></xs:enumeration>
<xs:enumeration value="thick"></xs:enumeration>
<xs:enumeration value="thin"></xs:enumeration>
<xs:enumeration value="double"></xs:enumeration>
</xs:attribute>
<xs:attribute name="border-left-color" type="xs:string"></xs:attribute>
<xs:attribute name="border-right-color" type="xs:string"></xs:attribute>
<xs:attribute name="border-top-color" type="xs:string"></xs:attribute>
<xs:attribute name="border-bottom-color" type="xs:string"></xs:attribute>
</xs:element>

Parent Elements

cycle Element, visualization Element

Child Elements

extension Element, style Element


styleBy Element

styleBy element,styleBy element,styleBy element

Map a categorical variable to a set of discrete styles for graphic items.

Attributes for styleBy
Attribute | Use | Description | Valid Values
affects | optional | The name of the style attribute to be affected by the styleBy. If not specified, the main style will be affected. | NMTOKEN
clamp | optional | If true, values off the edges of the domain will be pegged to low or high values, not ignored. | boolean
dimension | optional | If the variable is an expression that contains more than one dimension of data (for example, the expression contained a cross of other variables), then this attribute specifies which of the variable's dimensions to use. The first is numbered 0, then 1, 2, etc. | nonNegativeInteger
domain | optional | If specified, this domain will be used to define the domain of the variable rather than the variable's default domain. For example, a user might choose to map 0 to black and 1 to white even if the data only run from 0.3 to 0.7. In this case a domain of [0,1] would be specified for the aesthetic. | IDREF
domainModifier | optional | The domain modifier defines how the domain is modified. | IDREF
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
missing | optional | Use this style for missing values. | IDREF
split | optional | If true, distinct values of the variable will have statistics computed on them independently. | boolean
styleCycle | optional | A cycle of styles to use for categories of data. If undefined, a default cycle will be used, based on the type of graphic element being displayed. | IDREF
variable | optional | Referers to a data variable. The values of this variable will be mapped to aesthetic values used to display the element. | IDREF
styleBy diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="styleBy">
<xs:sequence>
<xs:element ref="vis:scale" minOccurs="0"></xs:element>
<xs:element ref="vis:summaryStatistic" minOccurs="0"></xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="domainModifier" type="xs:IDREF"></xs:attribute>
<xs:attribute name="variable" type="xs:IDREF"></xs:attribute>
<xs:attribute name="dimension" type="xs:nonNegativeInteger"></xs:attribute>
<xs:attribute name="domain" type="xs:IDREF"></xs:attribute>
<xs:attribute name="clamp" type="xs:boolean"></xs:attribute>
<xs:attribute name="split" type="xs:boolean"></xs:attribute>
<xs:attribute name="missing" type="xs:IDREF"></xs:attribute>
<xs:attribute name="styleCycle" type="xs:IDREF"></xs:attribute>
<xs:attribute name="affects" type="xs:NMTOKEN"></xs:attribute>
</xs:element>

Parent Elements

area Element, brushing Element, edge Element, interval Element, labeling Element, line Element, path Element, point Element, polygon Element, schema Element

Child Elements

scale Element, summaryStatistic Element

Related Elements

color Element, colorComponent Element, dash Element, footnotes Element, formatting Element, image Element, labeling Element, labelLocation Element, offset Element, pattern Element, rotation Element, shape Element, size Element, split Element, transparency Element, visibility Element


styleCycle Element

styleCycle element,styleCycle element,styleCycle element

Styles that can be used by a styleBy aesthetic.

Attributes for styleCycle
Attribute | Use | Description | Valid Values
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
styleCycle diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="styleCycle">
<xs:sequence>
<xs:sequence>
<xs:element name="cycle" maxOccurs="unbounded">
<xs:sequence>
<xs:element ref="vis:style" maxOccurs="unbounded"></xs:element>
</xs:sequence>
</xs:element>
</xs:sequence>
<xs:element ref="vis:extension" minOccurs="0" maxOccurs="unbounded"></xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
</xs:element>

Parent Elements

visualization Element

Child Elements

cycle Element, extension Element


cycle Element

cycle element,cycle element,cycle element

When getting the first style from a styleCycle, the first styles from each cycle are combined. The second style consists of the second style from the first cycle combined with the others and so on until that cycle is exhausted. Then the first cycle resets to the first style and the second style from the second cycle is used. This means that, for example, a styleCycle with four cycles each containing three styles can generate 81 styles before wrapping.

Attributes for cycle
Attribute | Use | Description | Valid Values
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
cycle diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="cycle" maxOccurs="unbounded">
<xs:sequence>
<xs:element ref="vis:style" maxOccurs="unbounded"></xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
</xs:element>

Parent Elements

styleCycle Element

Child Elements

style Element


styleReference Element

styleReference element,styleReference element,styleReference element

A reference to a style element. This is used when an element needs to reference multiple styles.

Attributes for styleReference
Attribute | Use | Description | Valid Values
ref | required | The ID of the style being referenced. | IDREF
styleReference diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="styleReference">
<xs:attribute name="ref" type="xs:IDREF" use="required"></xs:attribute>
</xs:element>

Parent Elements

gridline Element


summaryStatistic Element

summaryStatistic element,summaryStatistic element,summaryStatistic element

Summarizes the dependant variable for a set of data conditional on the values of the other position variables.

Attributes for summaryStatistic
Attribute Use Description Valid Values

augment

optional

Controls the way in which values for missing combinations of categories are imputed.

zero. A zero value will be added where there are missing combinations of categories.

missing. A missing value will be added where there are missing combinations of categories.

none. No values will be added for missing combinations of categories.

convertIntervalToSingleValue

optional

If true, a summary statistic that is an interval (such as a confidence interval) will be converted to a single value, the difference between the upper and lower values.

boolean

id

optional

An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one.

ID

method

optional

The method used to summarize the data.

mean. The mean of the data.

sum. The sum of the data.

midRange. The middle of the range of the data.

percent. The percent of this group of data compared to all the data.

percentCount. The percent of the count of this group of data compared to all the data.

fraction. The fraction of this group of data compared to all the data.

fractionCount. The fraction of the count of this group of data compared to all the data.

range. The range of values for data. This may be used as either a two-value interval, or a one-value extent.

confidenceIntervalOfMean. The simple confidence interval for the mean. This may be used as either a two-value interval, or a one-value extent.

confidenceIntervalIndividual. The simple confidence interval for individuals. This may be used as either a two-value interval, or a one-value extent.

count. The number of individuals in the data.

confidenceIntervalOfCount. The simple confidence interval for a count. This may be used as either a two-value interval, or a one-value extent.

confidenceIntervalOfPercentCount. The simple confidence interval for a percentage. This may be used as either a two-value interval, or a one-value extent.

confidenceIntervalOfFractionCount. The simple confidence interval for a fraction of counts. This may be used as either a two-value interval, or a one-value extent.

rowCount. The number of rows in the data. This is like count, but only counts data from blends once.

stddev. The standard deviation for the data.

stderr. The standard error for the data.

median. The median for the data.

max. The maximum value for the data.

min. The minimum value for the data.

variance. The variance of the data.

cumulativeSum. The cumulative sum, which summarizes each category and adds it to the previous category, through all categories in the data.

cumulativePercent. Cumulative percentage across all categories in the data, the final value being 100.

cumulativePercentCount. Cumulative percentage of the counts across all categories in the data, the final value being 100.

cumulativeFraction. Cumulative fraction across all categories in the data, the final value being 1.

cumulativeFractionCount. Cumulative fraction of the counts across all categories in the data, the final value being 1.

cumulativeCount. The cumulative count, which counts each category and adds it to the previous category, through all the categories in the data.

first. The first value presented for the category.

last. The last value presented for the category.

percentile. The data value below which the specified percentage of values fall within each category.

mode. The first value presented for the category.

countTrue. The count of true values. A value is true if its string is precisely "true".

percentTrue. The percentage of true values. A value is true if its string is precisely "true".

fractionTrue. The fraction of true values. A value is true if its string is precisely "true".

multiple

optional

The multiple value using in the region.spread.sd and region.spread.se function.

any

percent

optional

The percentage value to use in the confidence interval summary.

any

summaryAcrossPanels

optional

If true, the summary base will be calculated across all panels, rather than on a per-panel basis.

boolean

summaryBase

optional

The base for a percentage or fraction summary.

global. The percentage base is calculated from the data for the whole chart or panel.

aesthetic. The percentage base is calculated from the data within one or more aesthetics for chart or panel.

coordinate. The percentage base is calculated from the data within one or more coordinates for chart or panel.

summaryIndex

optional

The index of the aesthetic or coordinate to use to set for 100%.

int

summaryStatistic diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="summaryStatistic">
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="convertIntervalToSingleValue" type="xs:boolean"></xs:attribute>
<xs:attribute name="method" type="vis:summaryType">
<xs:enumeration value="mean"></xs:enumeration>
<xs:enumeration value="sum"></xs:enumeration>
<xs:enumeration value="midRange"></xs:enumeration>
<xs:enumeration value="percent"></xs:enumeration>
<xs:enumeration value="percentCount"></xs:enumeration>
<xs:enumeration value="fraction"></xs:enumeration>
<xs:enumeration value="fractionCount"></xs:enumeration>
<xs:enumeration value="range"></xs:enumeration>
<xs:enumeration value="confidenceIntervalOfMean"></xs:enumeration>
<xs:enumeration value="confidenceIntervalIndividual"></xs:enumeration>
<xs:enumeration value="count"></xs:enumeration>
<xs:enumeration value="confidenceIntervalOfCount"></xs:enumeration>
<xs:enumeration value="confidenceIntervalOfPercentCount"></xs:enumeration>
<xs:enumeration value="confidenceIntervalOfFractionCount"></xs:enumeration>
<xs:enumeration value="rowCount"></xs:enumeration>
<xs:enumeration value="stddev"></xs:enumeration>
<xs:enumeration value="stderr"></xs:enumeration>
<xs:enumeration value="median"></xs:enumeration>
<xs:enumeration value="max"></xs:enumeration>
<xs:enumeration value="min"></xs:enumeration>
<xs:enumeration value="variance"></xs:enumeration>
<xs:enumeration value="cumulativeSum"></xs:enumeration>
<xs:enumeration value="cumulativePercent"></xs:enumeration>
<xs:enumeration value="cumulativePercentCount"></xs:enumeration>
<xs:enumeration value="cumulativeFraction"></xs:enumeration>
<xs:enumeration value="cumulativeFractionCount"></xs:enumeration>
<xs:enumeration value="cumulativeCount"></xs:enumeration>
<xs:enumeration value="first"></xs:enumeration>
<xs:enumeration value="last"></xs:enumeration>
<xs:enumeration value="percentile"></xs:enumeration>
<xs:enumeration value="mode"></xs:enumeration>
<xs:enumeration value="countTrue"></xs:enumeration>
<xs:enumeration value="percentTrue"></xs:enumeration>
<xs:enumeration value="fractionTrue"></xs:enumeration>
</xs:attribute>
<xs:attribute name="summaryBase" type="vis:summaryBaseType">
<xs:enumeration value="global"></xs:enumeration>
<xs:enumeration value="aesthetic"></xs:enumeration>
<xs:enumeration value="coordinate"></xs:enumeration>
</xs:attribute>
<xs:attribute name="percent">
<xs:simpleType>
<xs:restriction base="xs:double">
<xs:minInclusive value="0"></xs:minInclusive>
<xs:maxExclusive value="100"></xs:maxExclusive>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="multiple">
<xs:simpleType>
<xs:restriction base="xs:double">
<xs:minInclusive value="0"></xs:minInclusive>
<xs:maxExclusive value="10"></xs:maxExclusive>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="summaryIndex" type="xs:int"></xs:attribute>
<xs:attribute name="summaryAcrossPanels" type="xs:boolean"></xs:attribute>
<xs:attribute name="augment" type="vis:augmentType">
<xs:enumeration value="zero"></xs:enumeration>
<xs:enumeration value="missing"></xs:enumeration>
<xs:enumeration value="none"></xs:enumeration>
</xs:attribute>
</xs:element>

Parent Elements

area Element, color Element, colorComponent Element, dash Element, edge Element, faceting Element, footnotes Element, formatting Element, image Element, interval Element, labeling Element, labelLocation Element, line Element, offset Element, path Element, pattern Element, point Element, polygon Element, tokenMapping Element, rotation Element, schema Element, shape Element, size Element, split Element, styleBy Element, transparency Element, visibility Element


swingController Element

swingController element,swingController element,swingController element

Attributes for swingController
Attribute | Use | Description | Valid Values
active | optional | If set to false, the controller will be inactive | boolean
function | optional | Used to construct a function call, such as to provide a JComponent . | string
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
target | optional | The frame that should be the target of swingController. Where the swingController will be located. | IDREF
swingController diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="swingController">
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="active" type="xs:boolean"></xs:attribute>
<xs:attribute name="target" type="xs:IDREF"></xs:attribute>
<xs:attribute name="function" type="xs:string"></xs:attribute>
</xs:element>

Parent Elements

visualization Element

Related Elements

animation Element, brushing Element, dragElement Element, drillDown Element, facetSortController Element, layerController Element, lineGuideController Element, pivotController Element, popup Element, rectangleGuideController Element


symbolMapping Element

symbolMapping element,symbolMapping element,symbolMapping element

Maps a category to a symbol.

Attributes for symbolMapping
Attribute | Use | Description | Valid Values
from | required | Category that is mapped to a specific value of the aesthetic. | string
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
to | required | Which symbol name to which to map a category. | string
symbolMapping diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="symbolMapping">
<xs:attribute name="from" type="xs:string" use="required"></xs:attribute>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="to" type="xs:string" use="required"></xs:attribute>
</xs:element>

Parent Elements

shape Element

Related Elements

booleanMapping Element, colorMapping Element, dashMapping Element, doubleMapping Element, footnoteMapping Element, formatMapping Element, integerMapping Element, lengthMapping Element, stringMapping Element


tableLayout Element

tableLayout element,tableLayout element,tableLayout element

Specify that we want a table like layout, with special drawing mechanisms

Attributes for tableLayout
Attribute | Use | Description | Valid Values
fitCells | optional | The 4 options to set column autoFit in tables: none, cells, ticks, both | none. No auto fit for columns cells. Auto fit only for cells/data ticks. Auto fit only for labels both. Auto fit for both cells and labels
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
style | optional | Style for the general appearance | IDREF
verticalTitlesInCorner | optional | If true, and there is no corner label, then vertical axes will have their titles moved to the corner. | boolean
tableLayout diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="tableLayout">
<xs:sequence minOccurs="0" maxOccurs="1">
<xs:element ref="vis:label"></xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="verticalTitlesInCorner" type="xs:boolean"></xs:attribute>
<xs:attribute name="style" type="xs:IDREF"></xs:attribute>
<xs:attribute name="fitCells" type="vis:autoFitOptions">
<xs:enumeration value="none"></xs:enumeration>
<xs:enumeration value="cells"></xs:enumeration>
<xs:enumeration value="ticks"></xs:enumeration>
<xs:enumeration value="both"></xs:enumeration>
</xs:attribute>
</xs:element>

Parent Elements

facetLayout Element

Child Elements

label Element


tagCloudStatistic Element

tagCloudStatistic element,tagCloudStatistic element,tagCloudStatistic element

Lays out a set of strings as a tag cloud. The variables should be a column of strings and a column of numbers

Attributes for tagCloudStatistic
Attribute | Use | Description | Valid Values
aspect | optional | The aspect ratio of the desired result | double
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
sizeVariable | optional | The variable that gives the size of each tag. Must be numeric | IDREF
wordVariable | optional | The variable that gives the word (or phrase) to be displayed. Must be catgeorical | IDREF
tagCloudStatistic diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="tagCloudStatistic">
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="wordVariable" type="xs:IDREF"></xs:attribute>
<xs:attribute name="sizeVariable" type="xs:IDREF"></xs:attribute>
<xs:attribute name="aspect" type="xs:double"></xs:attribute>
</xs:element>

Parent Elements

area Element, edge Element, faceting Element, interval Element, line Element, path Element, point Element, polygon Element, schema Element


transparency Element

transparency element,transparency element,transparency element

Maps a variable to the transparency (1-opacity) of the graphic item.

Attributes for transparency
Attribute Use Description Valid Values

affect

optional

Type of color affected. Fill colors are for the interior of a drawn object while a stroke color is for the edge of the drawn object. Note that some objects, such as lines do not have an interior. "main" is usually a fill color. "secondary" is usually a stroke color. "both" affects both. "fill" is explicitly a fill color. "main" or "secondary" should be used instead. "stroke" is explicitly a stroke color. "main" or "secondary" should be used instead.

both. Both the main color and the secondary color will be affected.

main. The main color which is usually a fill color will be affected.

secondary. The secondary color which is usually a draw color will be affected.

stroke. Always affect the stroke. For most purposes, it is better to use MAIN or SECONDARY.

fill. Always affect the fill. For most purposes, it is better to use MAIN or SECONDARY.

clamp

optional

If true, values off the edges of the domain will be pegged to low or high values, not ignored.

boolean

dimension

optional

If the variable is an expression that contains more than one dimension of data (for example, the expression contained a cross of other variables), then this attribute specifies which of the variable's dimensions to use. The first is numbered 0, then 1, 2, etc.

nonNegativeInteger

domain

optional

If specified, this domain will be used to define the domain of the variable rather than the variable's default domain. For example, a user might choose to map 0 to black and 1 to white even if the data only run from 0.3 to 0.7. In this case a domain of [0,1] would be specified for the aesthetic.

IDREF

domainModifier

optional

The domain modifier defines how the domain is modified.

IDREF

high

optional

The highest value in the domain of the aesthetic is mapped to this number. 0 represents the lowest number the aesthetic could support and 1 represents the highest. For example, for brightness, 0 represents completely dark and 1 represents completely white.

any

id

optional

An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one.

ID

low

optional

The lowest value in the domain of the aesthetic is mapped to this number. 0 represents the lowest number the aesthetic could support and 1 represents the highest. For example, for brightness, 0 represents completely dark and 1 represents completely white.

any

missing

optional

Missing values in the domain of the aesthetic are mapped to this number. 0 represents the lowest number the aesthetic could support and 1 represents the highest. For example, for brightness, 0 represents completely dark and 1 represents completely white.

any

split

optional

If true, distinct values of the variable will have statistics computed on them independently.

boolean

variable

optional

Referers to a data variable. The values of this variable will be mapped to aesthetic values used to display the element.

IDREF

transparency diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="transparency">
<xs:sequence>
<xs:element ref="vis:scale" minOccurs="0"></xs:element>
<xs:element ref="vis:summaryStatistic" minOccurs="0"></xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="domainModifier" type="xs:IDREF"></xs:attribute>
<xs:attribute name="variable" type="xs:IDREF"></xs:attribute>
<xs:attribute name="dimension" type="xs:nonNegativeInteger"></xs:attribute>
<xs:attribute name="domain" type="xs:IDREF"></xs:attribute>
<xs:attribute name="clamp" type="xs:boolean"></xs:attribute>
<xs:attribute name="split" type="xs:boolean"></xs:attribute>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element ref="vis:doubleMapping" minOccurs="0"></xs:element>
</xs:sequence>
<xs:attribute name="missing">
<xs:simpleType>
<xs:restriction base="xs:double">
<xs:minInclusive value="0"></xs:minInclusive>
<xs:maxInclusive value="1"></xs:maxInclusive>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="low">
<xs:simpleType>
<xs:restriction base="xs:double">
<xs:minInclusive value="0"></xs:minInclusive>
<xs:maxInclusive value="1"></xs:maxInclusive>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="high">
<xs:simpleType>
<xs:restriction base="xs:double">
<xs:minInclusive value="0"></xs:minInclusive>
<xs:maxInclusive value="1"></xs:maxInclusive>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="affect" type="vis:colorAffectType">
<xs:enumeration value="both"></xs:enumeration>
<xs:enumeration value="main"></xs:enumeration>
<xs:enumeration value="secondary"></xs:enumeration>
<xs:enumeration value="stroke"></xs:enumeration>
<xs:enumeration value="fill"></xs:enumeration>
</xs:attribute>
</xs:element>

Parent Elements

area Element, brushing Element, edge Element, interval Element, labeling Element, line Element, path Element, point Element, polygon Element, schema Element

Child Elements

doubleMapping Element, scale Element, summaryStatistic Element

Related Elements

color Element, colorComponent Element, dash Element, footnotes Element, formatting Element, image Element, labeling Element, labelLocation Element, offset Element, pattern Element, rotation Element, shape Element, size Element, split Element, styleBy Element, visibility Element


treeLayoutStatistic Element

treeLayoutStatistic element,treeLayoutStatistic element,treeLayoutStatistic element

Lays out a tree as a set of polygons using a space filling technique. This is in contrast to graphLayoutStatistic, which lays out a tree as a set of nodes and edges.

Attributes for treeLayoutStatistic
Attribute | Use | Description | Valid Values
addChildSizes | optional | If true, then the size variable specifies the size of the node not including its children (therefore, the children sizes need to be added to get the total size). If false, then the size variable already includes the size of the children. In that case, it is an error if the children sizes add up to more than the node size. If there is no size variable, this flag is ignored. | boolean
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
itemVariable | optional | The variable to use for the unique identifiers for the nodes in the tree. | any
method | optional | The method to use for laying out the tree. | treemap. Specifies a layout method based on mosaic plots, and similar to the treemap plot of Schniedermann. simple. Specifies a top down traditional tree layout.
padding | optional | The amount of space to use between nodes and their parents in the tree. | length
parent | optional | The variable to use to identify the parents of nodes in the tree. | any
sizeVariable | optional | The variable that gives the size of each tree node. If not specified, all nodes are assumed to be the same size. | IDREF
spacing | optional | The amount of spacing to place between sibling nodes in the tree. | length
treeLayoutStatistic diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="treeLayoutStatistic">
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="itemVariable"></xs:attribute>
<xs:attribute name="parent"></xs:attribute>
<xs:attribute name="addChildSizes" type="xs:boolean"></xs:attribute>
<xs:attribute name="method" type="vis:treeLayoutMethodType">
<xs:enumeration value="treemap"></xs:enumeration>
<xs:enumeration value="simple"></xs:enumeration>
</xs:attribute>
<xs:attribute name="padding" type="vis:length"></xs:attribute>
<xs:attribute name="sizeVariable" type="xs:IDREF"></xs:attribute>
<xs:attribute name="spacing" type="vis:length"></xs:attribute>
</xs:element>

Parent Elements

area Element, edge Element, faceting Element, interval Element, line Element, path Element, point Element, polygon Element, schema Element


tukeyStatistic Element

tukeyStatistic element,tukeyStatistic element,tukeyStatistic element

Calculates Tukey Letter Values. The main use of this is for boxplots.

Attributes for tukeyStatistic
Attribute | Use | Description | Valid Values
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
tukeyStatistic diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="tukeyStatistic">
<xs:attribute name="id" type="xs:ID"></xs:attribute>
</xs:element>

Parent Elements

area Element, edge Element, faceting Element, interval Element, line Element, path Element, point Element, polygon Element, schema Element


union Element

union element,union element,union element

Unions the intersection

Attributes for union
Attribute | Use | Description | Valid Values
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
union diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="union">
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element ref="vis:intersect"></xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
</xs:element>

Parent Elements

setCellProperties Element, statisticSort Element

Child Elements

intersect Element


unity Element

unity element,unity element,unity element

The Grammar of Graphics unity variable.

Attributes for unity
Attribute | Use | Description | Valid Values
id | optional | Optional ID, which is not generally needed for this element. | any
unity diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="unity">
<xs:attribute name="id"></xs:attribute>
</xs:element>

Parent Elements

blend Element, cross Element, dot Element, faceting Element, nest Element


userSource Element

userSource element,userSource element,userSource element

This source is left undefined by the specification. An object satisfying the Source interface must be passed to a visualization prior to any action on the visualization. It must have the same ID as this source.

Attributes for userSource
Attribute Use Description Valid Values

filterToMissing

optional

Determines whether or not the data will be filtered to missing. The default is false

boolean

id

optional

An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one.

ID

missing

optional

offers listwise and variablewise (pairwise) missing value treatment when computing statistics. For VARIABLEWISE (Pairwise), a case is included in statistics for each variable in a function for which it has a valid value (regardless of whether the case has missing values for other variables). For LISTWISE, statistics for all variables used in functions in a graph data set are based on the same cases. Cases with missing values for any variable used in a function in a graph data set are excluded. Pairwise (VARIABLEWISE) is the default.

pairwise. For PAIRWISE, a case is included in statistics for each variable in a function for which it has a valid value (regardless of whether the case has missing values for other variables). PAIRWISE is the default.

listwise. For LISTWISE, statistics for all variables used in functions in a graph data set are based on the same cases. Cases with missing values for any variable used in a function in a graph data set are excluded.

userSource diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="userSource" type="vis:sourceType">
<xs:sequence>
<xs:element name="aggregate" minOccurs="0" maxOccurs="1"></xs:element>
<xs:element name="filter" minOccurs="0" maxOccurs="unbounded"></xs:element>
<xs:element name="dataReduction" minOccurs="0" maxOccurs="1"></xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="missing" type="vis:missingDataType">
<xs:enumeration value="pairwise"></xs:enumeration>
<xs:enumeration value="listwise"></xs:enumeration>
</xs:attribute>
<xs:attribute name="filterToMissing" type="xs:boolean"></xs:attribute>
</xs:element>

Parent Elements

visualization Element

Child Elements

aggregate Element, dataReduction Element, filter Element


aggregate Element

aggregate element,aggregate element,aggregate element

This causes a source to have similar rows aggregated. All non-key variables returned from this source will be summed.

Attributes for aggregate
Attribute | Use | Description | Valid Values
generatedCount | optional | If this attribute is defined, a column will be added to the source giving the count of the number of rows aggregated into a single row. | string
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
keyVariables | required | A semicolon delimited list of variable names that will be used as the aggregation keys. | string
aggregate diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="aggregate" minOccurs="0" maxOccurs="1">
<xs:attribute name="keyVariables" type="xs:string" use="required"></xs:attribute>
<xs:attribute name="generatedCount" type="xs:string"></xs:attribute>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
</xs:element>

Parent Elements

userSource Element


filter Element

filter element,filter element,filter element

An element that reduces the number of rows on the data by checking if the values of a source variable are within a domain.

Attributes for filter
Attribute | Use | Description | Valid Values
domain | optional | The domain to use as criteria for filtering the source. If not defined, missing values will be used as the domain | IDREF
exclude | optional | If true, exclude values in the domain, otherwise include them. | boolean
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
sourceName | optional | Name of the variable within the source. If unspecified, the row index is used. | string
filter diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="filter" minOccurs="0" maxOccurs="unbounded">
<xs:attribute name="sourceName" type="xs:string"></xs:attribute>
<xs:attribute name="domain" type="xs:IDREF"></xs:attribute>
<xs:attribute name="exclude" type="xs:boolean"></xs:attribute>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
</xs:element>

Parent Elements

userSource Element


dataReduction Element

dataReduction element,dataReduction element,dataReduction element

An element that reduces the number of rows on the data

Attributes for dataReduction
Attribute | Use | Description | Valid Values
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
maxRows | optional | The limit of the number of rows to be returned from a data source | integer
weightVariableName | optional | The name of the weight variable used to represent the amount of the data returned | string
dataReduction diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="dataReduction" minOccurs="0" maxOccurs="1">
<xs:attribute name="maxRows" type="xs:integer"></xs:attribute>
<xs:attribute name="weightVariableName" type="xs:string"></xs:attribute>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
</xs:element>

Parent Elements

userSource Element


valueMapEntry Element

valueMapEntry element,valueMapEntry element,valueMapEntry element

An entry in a value map that defines a derived variable.

Attributes for valueMapEntry
Attribute | Use | Description | Valid Values
from | optional | A semicolon separated list of values to map from. | string
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
to | optional | The value to map to. | string
valueMapEntry diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="valueMapEntry">
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="from" type="xs:string"></xs:attribute>
<xs:attribute name="to" type="xs:string"></xs:attribute>
</xs:element>

Parent Elements

derivedVariable Element


variableReference Element

variableReference element,variableReference element,variableReference element

Use the variable identified by the ref attribute.

Attributes for variableReference
Attribute | Use | Description | Valid Values
ref | optional | The ID of the variable being referenced. | IDREF
variableReference diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="variableReference">
<xs:sequence maxOccurs="unbounded" minOccurs="0">
<xs:element ref="vis:elementVariableReference"></xs:element>
</xs:sequence>
<xs:attribute name="ref" type="xs:IDREF"></xs:attribute>
</xs:element>

Parent Elements

blend Element, categoricalDomain Element, cross Element, domainExclude Element, domainIntersect Element, domainReplace Element, domainUnion Element, dot Element, drillDown Element, faceting Element, intervalDomain Element, multipleResponseVariable Element, nest Element

Child Elements

elementVariableReference Element


visibility Element

visibility element,visibility element,visibility element

Maps a variable to a visibility of 'false' or 'true'. Any value strictly greater than zero is considered visible for continuous variables.

Attributes for visibility
Attribute | Use | Description | Valid Values
clamp | optional | If true, values off the edges of the domain will be pegged to low or high values, not ignored. | boolean
dimension | optional | If the variable is an expression that contains more than one dimension of data (for example, the expression contained a cross of other variables), then this attribute specifies which of the variable's dimensions to use. The first is numbered 0, then 1, 2, etc. | nonNegativeInteger
domain | optional | If specified, this domain will be used to define the domain of the variable rather than the variable's default domain. For example, a user might choose to map 0 to black and 1 to white even if the data only run from 0.3 to 0.7. In this case a domain of [0,1] would be specified for the aesthetic. | IDREF
domainModifier | optional | The domain modifier defines how the domain is modified. | IDREF
high | optional | Whether the bottom of the range is visible or not | boolean
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
low | optional | Whether the top of the range is visible or not | boolean
missing | optional | Whether a missing value is visible or not | boolean
split | optional | If true, distinct values of the variable will have statistics computed on them independently. | boolean
variable | optional | Referers to a data variable. The values of this variable will be mapped to aesthetic values used to display the element. | IDREF
visibility diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="visibility">
<xs:sequence>
<xs:element ref="vis:scale" minOccurs="0"></xs:element>
<xs:element ref="vis:summaryStatistic" minOccurs="0"></xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="domainModifier" type="xs:IDREF"></xs:attribute>
<xs:attribute name="variable" type="xs:IDREF"></xs:attribute>
<xs:attribute name="dimension" type="xs:nonNegativeInteger"></xs:attribute>
<xs:attribute name="domain" type="xs:IDREF"></xs:attribute>
<xs:attribute name="clamp" type="xs:boolean"></xs:attribute>
<xs:attribute name="split" type="xs:boolean"></xs:attribute>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element ref="vis:booleanMapping" minOccurs="0"></xs:element>
</xs:sequence>
<xs:attribute name="low" type="xs:boolean"></xs:attribute>
<xs:attribute name="high" type="xs:boolean"></xs:attribute>
<xs:attribute name="missing" type="xs:boolean"></xs:attribute>
</xs:element>

Parent Elements

area Element, brushing Element, edge Element, interval Element, labeling Element, line Element, path Element, point Element, polygon Element, schema Element

Child Elements

booleanMapping Element, scale Element, summaryStatistic Element

Related Elements

color Element, colorComponent Element, dash Element, footnotes Element, formatting Element, image Element, labeling Element, labelLocation Element, offset Element, pattern Element, rotation Element, shape Element, size Element, split Element, styleBy Element, transparency Element


visualization Element

visualization element,visualization element,visualization element

The top-level element, also known as the document or root element. This element contains a complete specification of a visualization. It is also a frame, and therefore can have styles and sizes

Attributes for visualization
Attribute | Use | Description | Valid Values
author | optional | For documentation; not used directly to generate a visualization. | string
clip | optional | If true, the frame clips contents so they do not overflow its bounds. The default behavior may vary based on the contents of the frame. | boolean
creator | optional | For documentation; not used directly to generate a visualization. | string
date | optional | For documentation; not used directly to generate a visualization. | date
description | optional | For documentation; not used directly to generate a visualization. | string
id | optional | Identifier for this frame. The identifier must be unique within the document and is required only when another element must reference this one. Can be used as the value for a target so other frames can define their locations relative to this one. | ID
lang | optional | Determines the language of the graph. If no language is specified, the local language is determined from the operating system. | language
name | optional | For documentation; not used directly to generate a visualization. | string
style | optional | The frame is drawn with this style before any of its contents are drawn. | IDREF
type | optional | For documentation; not used directly to generate a visualization. | string
version | required | The specification version. This is usually the same as the schema version, but may be less, for example when a schema has been updated to a more recent version. If any of the meanings of schema elements have changed (which is very rare), this attribute determines what the behavior is to be. | float
visualization diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="visualization">
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element ref="vis:extension" minOccurs="0" maxOccurs="unbounded"></xs:element>
<xs:element ref="vis:location" minOccurs="0" maxOccurs="unbounded"></xs:element>
</xs:sequence>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="style" type="xs:IDREF"></xs:attribute>
<xs:attribute name="clip" type="xs:boolean"></xs:attribute>
<xs:sequence>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="vis:reshapeSource"></xs:element>
<xs:element ref="vis:databaseSource"></xs:element>
<xs:element ref="vis:delimitedFileSource"></xs:element>
<xs:element ref="vis:savFileSource"></xs:element>
<xs:element ref="vis:embeddedSource"></xs:element>
<xs:element ref="vis:streamingSource"></xs:element>
<xs:element ref="vis:userSource"></xs:element>
<xs:element ref="vis:reportSource"></xs:element>
</xs:choice>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="vis:sourceVariable"></xs:element>
<xs:element ref="vis:derivedVariable"></xs:element>
<xs:element ref="vis:expressionVariable"></xs:element>
<xs:element ref="vis:multipleResponseVariable"></xs:element>
<xs:element ref="vis:categoricalDomain"></xs:element>
<xs:element ref="vis:intervalDomain"></xs:element>
<xs:element ref="vis:categoricalDomainModifier"></xs:element>
<xs:element ref="vis:intervalDomainModifier"></xs:element>
</xs:choice>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="vis:graph"></xs:element>
<xs:element ref="vis:container"></xs:element>
<xs:element ref="vis:legend"></xs:element>
<xs:element ref="vis:labelFrame"></xs:element>
<xs:element ref="vis:controlFrame"></xs:element>
</xs:choice>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="vis:style"></xs:element>
<xs:element ref="vis:styleCycle"></xs:element>
</xs:choice>
<xs:group ref="vis:interaction" minOccurs="0" maxOccurs="unbounded">
<xs:choice>
<xs:element ref="vis:animation"></xs:element>
<xs:element ref="vis:popup"></xs:element>
<xs:element ref="vis:drillDown"></xs:element>
<xs:element ref="vis:brushing"></xs:element>
<xs:element ref="vis:lineGuideController"></xs:element>
<xs:element ref="vis:rectangleGuideController"></xs:element>
<xs:element ref="vis:layerController"></xs:element>
<xs:element ref="vis:pivotController"></xs:element>
<xs:element ref="vis:dragElement"></xs:element>
<xs:element ref="vis:swingController"></xs:element>
<xs:element ref="vis:facetSortController"></xs:element>
</xs:choice>
</xs:group>
</xs:sequence>
<xs:attribute name="lang" type="xs:language"></xs:attribute>
<xs:attribute name="name" type="xs:string"></xs:attribute>
<xs:attribute name="author" type="xs:string"></xs:attribute>
<xs:attribute name="description" type="xs:string"></xs:attribute>
<xs:attribute name="version" type="xs:float" use="required"></xs:attribute>
<xs:attribute name="creator" type="xs:string"></xs:attribute>
<xs:attribute name="date" type="xs:date"></xs:attribute>
<xs:attribute name="type" type="xs:string"></xs:attribute>
</xs:element>

Child Elements

animation Element, brushing Element, categoricalDomain Element, categoricalDomainModifier Element, container Element, controlFrame Element, databaseSource Element, delimitedFileSource Element, derivedVariable Element, dragElement Element, drillDown Element, embeddedSource Element, expressionVariable Element, extension Element, facetSortController Element, graph Element, intervalDomain Element, intervalDomainModifier Element, labelFrame Element, layerController Element, legend Element, lineGuideController Element, location Element, multipleResponseVariable Element, pivotController Element, popup Element, rectangleGuideController Element, reportSource Element, reshapeSource Element, savFileSource Element, sourceVariable Element, streamingSource Element, style Element, styleCycle Element, swingController Element, userSource Element

Related Elements

container Element, controlFrame Element, graph Element, labelFrame Element, legend Element


when Element

when element,when element,when element

Remove all data if the condition is failed. Used mainly in chains

Attributes for when
Attribute Use Description Valid Values

id

optional

An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one.

ID

max

optional

The summary statistic must be less than this value for the data set to be retained

double

min

optional

The summary statistic must be greater or equal to this value for the data set to be retained

double

summary

optional

The summary statistic to be calculated to see if the data should be retained

mean. The mean of the data.

sum. The sum of the data.

midRange. The middle of the range of the data.

percent. The percent of this group of data compared to all the data.

percentCount. The percent of the count of this group of data compared to all the data.

fraction. The fraction of this group of data compared to all the data.

fractionCount. The fraction of the count of this group of data compared to all the data.

range. The range of values for data. This may be used as either a two-value interval, or a one-value extent.

confidenceIntervalOfMean. The simple confidence interval for the mean. This may be used as either a two-value interval, or a one-value extent.

confidenceIntervalIndividual. The simple confidence interval for individuals. This may be used as either a two-value interval, or a one-value extent.

count. The number of individuals in the data.

confidenceIntervalOfCount. The simple confidence interval for a count. This may be used as either a two-value interval, or a one-value extent.

confidenceIntervalOfPercentCount. The simple confidence interval for a percentage. This may be used as either a two-value interval, or a one-value extent.

confidenceIntervalOfFractionCount. The simple confidence interval for a fraction of counts. This may be used as either a two-value interval, or a one-value extent.

rowCount. The number of rows in the data. This is like count, but only counts data from blends once.

stddev. The standard deviation for the data.

stderr. The standard error for the data.

median. The median for the data.

max. The maximum value for the data.

min. The minimum value for the data.

variance. The variance of the data.

cumulativeSum. The cumulative sum, which summarizes each category and adds it to the previous category, through all categories in the data.

cumulativePercent. Cumulative percentage across all categories in the data, the final value being 100.

cumulativePercentCount. Cumulative percentage of the counts across all categories in the data, the final value being 100.

cumulativeFraction. Cumulative fraction across all categories in the data, the final value being 1.

cumulativeFractionCount. Cumulative fraction of the counts across all categories in the data, the final value being 1.

cumulativeCount. The cumulative count, which counts each category and adds it to the previous category, through all the categories in the data.

first. The first value presented for the category.

last. The last value presented for the category.

percentile. The data value below which the specified percentage of values fall within each category.

mode. The first value presented for the category.

countTrue. The count of true values. A value is true if its string is precisely "true".

percentTrue. The percentage of true values. A value is true if its string is precisely "true".

fractionTrue. The fraction of true values. A value is true if its string is precisely "true".

when diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="when">
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="summary" type="vis:summaryType">
<xs:enumeration value="mean"></xs:enumeration>
<xs:enumeration value="sum"></xs:enumeration>
<xs:enumeration value="midRange"></xs:enumeration>
<xs:enumeration value="percent"></xs:enumeration>
<xs:enumeration value="percentCount"></xs:enumeration>
<xs:enumeration value="fraction"></xs:enumeration>
<xs:enumeration value="fractionCount"></xs:enumeration>
<xs:enumeration value="range"></xs:enumeration>
<xs:enumeration value="confidenceIntervalOfMean"></xs:enumeration>
<xs:enumeration value="confidenceIntervalIndividual"></xs:enumeration>
<xs:enumeration value="count"></xs:enumeration>
<xs:enumeration value="confidenceIntervalOfCount"></xs:enumeration>
<xs:enumeration value="confidenceIntervalOfPercentCount"></xs:enumeration>
<xs:enumeration value="confidenceIntervalOfFractionCount"></xs:enumeration>
<xs:enumeration value="rowCount"></xs:enumeration>
<xs:enumeration value="stddev"></xs:enumeration>
<xs:enumeration value="stderr"></xs:enumeration>
<xs:enumeration value="median"></xs:enumeration>
<xs:enumeration value="max"></xs:enumeration>
<xs:enumeration value="min"></xs:enumeration>
<xs:enumeration value="variance"></xs:enumeration>
<xs:enumeration value="cumulativeSum"></xs:enumeration>
<xs:enumeration value="cumulativePercent"></xs:enumeration>
<xs:enumeration value="cumulativePercentCount"></xs:enumeration>
<xs:enumeration value="cumulativeFraction"></xs:enumeration>
<xs:enumeration value="cumulativeFractionCount"></xs:enumeration>
<xs:enumeration value="cumulativeCount"></xs:enumeration>
<xs:enumeration value="first"></xs:enumeration>
<xs:enumeration value="last"></xs:enumeration>
<xs:enumeration value="percentile"></xs:enumeration>
<xs:enumeration value="mode"></xs:enumeration>
<xs:enumeration value="countTrue"></xs:enumeration>
<xs:enumeration value="percentTrue"></xs:enumeration>
<xs:enumeration value="fractionTrue"></xs:enumeration>
</xs:attribute>
<xs:attribute name="min" type="xs:double"></xs:attribute>
<xs:attribute name="max" type="xs:double"></xs:attribute>
</xs:element>

Parent Elements

area Element, edge Element, faceting Element, interval Element, line Element, path Element, point Element, polygon Element, schema Element


where Element

where element,where element,where element

Restricts facet cells

Attributes for where
Attribute | Use | Description | Valid Values
exclude | optional | Categories to exclude. | string
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
include | optional | Categories to include. | string
variable | required | Referers to a variable for this where to act on. | IDREF
where diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="where">
<xs:attribute name="variable" type="xs:IDREF" use="required"></xs:attribute>
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="include" type="xs:string"></xs:attribute>
<xs:attribute name="exclude" type="xs:string"></xs:attribute>
</xs:element>

Parent Elements

intersect Element


x Element

x element,x element,x element

Determines location along the x (horizontal) axis.

Attributes for x
Attribute | Use | Description | Valid Values
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
variable | optional | This variable's data are used to locate graphic items created by the element within the coordinate system. | IDREF
x diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="x" type="vis:coordinate">
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="variable" type="xs:IDREF"></xs:attribute>
</xs:element>

Parent Elements

area Element, edge Element, interval Element, line Element, path Element, point Element, polygon Element, schema Element


y Element

y element,y element,y element

Determines location along the y (vertical) axis.

Attributes for y
Attribute | Use | Description | Valid Values
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
variable | optional | This variable's data are used to locate graphic items created by the element within the coordinate system. | IDREF
y diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="y" type="vis:coordinate">
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="variable" type="xs:IDREF"></xs:attribute>
</xs:element>

Parent Elements

area Element, edge Element, interval Element, line Element, path Element, point Element, polygon Element, schema Element


z Element

z element,z element,z element

Determines location along the z (front-back) axis. High Z is towards the front and low Z is to the back.

Attributes for z
Attribute | Use | Description | Valid Values
id | optional | An identifier for this element. The identifier must be unique within the document and is required only when another element must reference this one. | ID
variable | optional | This variable's data are used to locate graphic items created by the element within the coordinate system. | IDREF
z diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="z" type="vis:coordinate">
<xs:attribute name="id" type="xs:ID"></xs:attribute>
<xs:attribute name="variable" type="xs:IDREF"></xs:attribute>
</xs:element>

Parent Elements

area Element, edge Element, interval Element, line Element, path Element, point Element, polygon Element, schema Element


Examples

This section provides examples, organized by broad categories of graph types. You can run the examples by incorporating them into the syntax specific to your application.

Summary Bar Chart Examples

Simple Bar Chart, Simple Bar Chart of Counts, Simple Horizontal Bar Chart, Simple Bar Chart With Error Bars, Stacked Bar Chart, Clustered Bar Chart, Clustered and Stacked Bar Chart, Bar Chart Using an Evaluation Function, Faceted (Paneled) Bar Chart, 3-D Bar Chart, Error Bar Chart, Pareto Chart

Histogram Examples

Histogram Examples, Histogram, Histogram with Normal Curve, Frequency Polygon, Stacked Histogram, Cumulative Histogram, Population Pyramid, Faceted (Paneled) Population Pyramid

High-Low Examples

High-Low Chart Examples, Simple Range Bar for One Variable, Simple Range Bar for Two Variables

Scatter/Dot Examples

Simple 1-D Scatterplot, Simple 2-D Scatterplot, Simple 2-D Scatterplot with Fit Line, Grouped Scatterplot, Scatterplot Matrix (SPLOM), Bubble Plot, Binned Scatterplot, Binned Scatterplot with Polygons, Scatterplot with Border Boxplots, Scatterplot with Border Histograms, Dot Plot, 2-D Dot Plot

Line Chart Examples

Simple Line Chart, Simple Line Chart with Points, Line Chart of Date Data, Line Chart With Step Interpolation, Fit Line, Line Chart from Equation, Pareto Chart

Pie Chart Examples

Pie Chart, Paneled Pie Chart

Box Plot Examples

1-D Boxplot, Boxplot, Boxplot With Overlaid Dot Plot

Multi-graph Examples

Scatterplot with Border Histograms, Scatterplot with Border Boxplots, Stocks Line Chart with Volume Bar Chart

Other Examples

Linking Variables, Minimum Spanning Tree


Summary Bar Chart Examples

This section provides examples of different types of summary bar charts.

Examples

Simple Bar Chart
Simple Bar Chart of Counts
Simple Horizontal Bar Chart
Simple Bar Chart With Error Bars
Stacked Bar Chart
Clustered Bar Chart
Clustered and Stacked Bar Chart
Bar Chart Using an Evaluation Function
Faceted (Paneled) Bar Chart
3-D Bar Chart
Error Bar Chart
Pareto Chart


Simple Bar Chart

ViZml for simple bar chart
<?xml version="1.0" encoding="utf-8"?>
<visualization version="2.2" xmlns="http://xml.spss.com/visualization"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://xml.spss.com/visualization
  http://xml.spss.com/visualization/vizml-2.2.xsd">
  <delimitedFileSource fileName="/pubs/gpl/data/Employee data.csv" header="true"
    id="empdata"/>
  <sourceVariable categorical="true" id="jobcat" source="empdata"
    sourceName="jobcat"/>
  <sourceVariable id="salary" source="empdata" sourceName="salary"/>
  <graph>
    <coordinates>
      <dimension>
        <axis>
          <label>
            <text>Job Category</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
      <dimension>
        <axis>
          <label>
            <text>Mean Salary</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
    </coordinates>
    <interval>
      <summaryStatistic method="mean"/>
      <x variable="jobcat"/>
      <y variable="salary"/>
    </interval>
  </graph>
</visualization>


Simple Bar Chart of Counts

ViZml for simple bar chart of counts
<?xml version="1.0" encoding="utf-8"?>
<visualization version="2.2" xmlns="http://xml.spss.com/visualization"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://xml.spss.com/visualization
  http://xml.spss.com/visualization/vizml-2.2.xsd">
  <delimitedFileSource fileName="/pubs/gpl/data/Employee data.csv" header="true"
    id="empdata"/>
  <sourceVariable categorical="true" id="jobcat" source="empdata"
    sourceName="jobcat"/>
  <graph>
    <coordinates>
      <dimension>
        <axis>
          <label>
            <text>Job Category</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
      <dimension>
        <axis>
          <label>
            <text>Count</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
    </coordinates>
    <interval>
      <summaryStatistic method="count"/>
      <x variable="jobcat"/>
    </interval>
  </graph>
</visualization>


Simple Horizontal Bar Chart

ViZml for simple horizontal bar chart
<?xml version="1.0" encoding="utf-8"?>
<visualization version="2.2" xmlns="http://xml.spss.com/visualization"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://xml.spss.com/visualization
  http://xml.spss.com/visualization/vizml-2.2.xsd">
  <delimitedFileSource fileName="/pubs/gpl/data/Employee data.csv" header="true"
    id="empdata"/>
  <sourceVariable categorical="true" id="jobcat" source="empdata"
    sourceName="jobcat"/>
  <sourceVariable id="salary" source="empdata" sourceName="salary"/>
  <graph>
    <coordinates>
      <transposeTransform/>
      <dimension>
        <axis>
          <label>
            <text>Job Category</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
      <dimension>
        <axis>
          <label>
            <text>Mean Salary</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
    </coordinates>
    <interval>
      <summaryStatistic method="mean"/>
      <x variable="jobcat"/>
      <y variable="salary"/>
    </interval>
  </graph>
</visualization>


Simple Bar Chart With Error Bars

ViZml for simple bar chart with error bars
<?xml version="1.0" encoding="utf-8"?>
<visualization version="2.2" xmlns="http://xml.spss.com/visualization"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://xml.spss.com/visualization
  http://xml.spss.com/visualization/vizml-2.2.xsd">
  <delimitedFileSource fileName="/pubs/gpl/data/Employee data.csv" header="true"
    id="empdata"/>
  <sourceVariable categorical="true" id="jobcat" source="empdata"
    sourceName="jobcat"/>
  <sourceVariable id="salary" source="empdata" sourceName="salary"/>
  <intervalDomain id="salaryDomain">
    <range min="0"/>
  </intervalDomain>
  <graph>
    <coordinates>
      <dimension>
        <axis>
          <label>
            <text>Job Category</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
      <dimension domain="salaryDomain">
        <axis>
          <label>
            <text>Mean Salary</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
    </coordinates>
    <interval>
      <summaryStatistic method="mean"/>
      <x variable="jobcat"/>
      <y variable="salary"/>
    </interval>
    <interval style="ibeam">
      <summaryStatistic method="stddev"/>
      <x variable="jobcat"/>
      <y variable="salary"/>
    </interval>
  </graph>
  <style id="ibeam" symbol="ibeam" size="0.4in"/>
</visualization>


Stacked Bar Chart

ViZml for stacked bar chart
<?xml version="1.0" encoding="utf-8"?>
<visualization version="2.2" xmlns="http://xml.spss.com/visualization"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://xml.spss.com/visualization
  http://xml.spss.com/visualization/vizml-2.2.xsd">
  <delimitedFileSource fileName="/pubs/gpl/data/Employee data.csv" header="true"
    id="empdata"/>
  <sourceVariable categorical="true" id="jobcat" source="empdata"
    sourceName="jobcat"/>
  <sourceVariable categorical="true" id="gender" source="empdata"
    sourceName="gender"/>
  <sourceVariable id="salary" source="empdata" sourceName="salary"/>
  <graph id="main">
    <location part="right" method="attach" target="legend"/>
    <coordinates>
      <dimension>
        <axis>
          <label>
            <text>Job Category</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
      <dimension>
        <axis>
          <label>
            <text>Sum Salary</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
    </coordinates>
    <interval positionModifier="stack">
      <summaryStatistic method="sum"/>
      <color variable="gender" id="genderGroup"/>
      <x variable="jobcat"/>
      <y variable="salary"/>
    </interval>
  </graph>
  <legend id="legend">
    <location part="right" method="fixed" value="100%"/>
    <location part="width" method="sizeToContent"/>
    <label>
      <text>Gender</text>
    </label>
    <legendTarget target="genderGroup"/>
  </legend>
</visualization>


Clustered Bar Chart

ViZml for clustered bar chart
<?xml version="1.0" encoding="utf-8"?>
<visualization version="2.2" xmlns="http://xml.spss.com/visualization"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://xml.spss.com/visualization
  http://xml.spss.com/visualization/vizml-2.2.xsd">
  <delimitedFileSource fileName="/pubs/gpl/data/Employee data.csv" header="true"
    id="empdata"/>
  <sourceVariable categorical="true" id="jobcat" source="empdata"
    sourceName="jobcat"/>
  <sourceVariable categorical="true" id="gender" source="empdata"
    sourceName="gender"/>
  <sourceVariable id="salary" source="empdata" sourceName="salary"/>
  <graph id="main">
    <location part="right" method="attach" target="legend"/>
    <coordinates>
      <dimension clusterVariable="jobcat">
        <axis>
          <label>
            <text>Job Category</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
      <dimension>
        <axis>
          <label>
            <text>Mean Salary</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
    </coordinates>
    <interval>
      <summaryStatistic method="mean"/>
      <color variable="gender" id="genderGroup"/>
      <x variable="gender"/>
      <y variable="salary"/>
    </interval>
  </graph>
  <legend id="legend">
    <location part="right" method="fixed" value="100%"/>
    <location part="width" method="sizeToContent"/>
    <label>
      <text>Gender</text>
    </label>
    <legendTarget target="genderGroup"/>
  </legend>
</visualization>


Clustered and Stacked Bar Chart

ViZml for clustered and stacked bar chart
<?xml version="1.0" encoding="utf-8"?>
<visualization version="2.2" xmlns="http://xml.spss.com/visualization"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://xml.spss.com/visualization
  http://xml.spss.com/visualization/vizml-2.2.xsd">
  <delimitedFileSource fileName="/pubs/gpl/data/Employee data.csv" header="true"
    id="empdata"/>
  <sourceVariable categorical="true" id="jobcat" source="empdata"
    sourceName="jobcat"/>
  <sourceVariable categorical="true" id="gender" source="empdata"
    sourceName="gender"/>
  <sourceVariable categorical="true" id="minority" source="empdata"
    sourceName="minority"/>
  <sourceVariable id="salary" source="empdata" sourceName="salary"/>
  <graph id="main">
    <location part="right" method="attach" target="legend"/>
    <coordinates>
      <dimension clusterVariable="jobcat">
        <axis>
          <label>
            <text>Job Category</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
      <dimension>
        <axis>
          <label>
            <text>Mean Salary</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
    </coordinates>
    <interval>
      <summaryStatistic method="sum"/>
      <color variable="gender" id="genderGroup"/>
      <pattern variable="minority" id="minorityGroup"/>
      <x variable="gender"/>
      <y variable="salary"/>
    </interval>
  </graph>
  <legend id="legend">
    <location part="top" method="fixed" value="0%"/>
    <location part="right" method="fixed" value="100%"/>
    <location part="width" method="sizeToContent"/>
    <label>
      <text>Gender</text>
    </label>
    <legendTarget target="genderGroup"/>
  </legend>
  <legend>
    <location part="top" method="fixed" value="50%"/>
    <location part="right" method="fixed" value="100%"/>
    <location part="width" method="sizeToContent"/>
    <label>
      <text>Minority&#10;Classification</text>
    </label>
    <legendTarget target="minorityGroup"/>
  </legend>
</visualization>


Bar Chart Using an Evaluation Function

ViZml for bar chart using an evaluation function
<?xml version="1.0" encoding="UTF-8"?>
<visualization xmlns="http://xml.spss.com/visualization"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://xml.spss.com/visualization
  http://xml.spss.com/visualization/vizml-2.2.xsd" version="2.2">
  <delimitedFileSource fileName="/pubs/gpl/data/Employee data.csv" header="true"
    id="empdata"/>
  <sourceVariable sourceName="jobcat" id="jobcat" categorical="true"
    source="empdata"/>
  <sourceVariable sourceName="gender" id="gender" categorical="true"
    source="empdata"/>
  <sourceVariable sourceName="salary" id="salary" source="empdata"/>
  <sourceVariable sourceName="salbegin" id="salbegin" source="empdata"/>
  <derivedVariable source="empdata" value="((salary-salbegin)/salbegin)*100"
    id="salincrease"/>
  <graph id="main">
    <location part="right" method="attach" target="legend"/>
    <coordinates>
      <dimension clusterVariable="jobcat">
        <axis>
          <label>
            <text>Employment Category</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
      <dimension>
        <axis>
          <label>
            <text>Mean Percent Salary Increase</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
    </coordinates>
    <interval>
      <summaryStatistic method="mean"/>
      <color variable="gender" id="clustering"/>
      <x variable="gender"/>
      <y variable="salincrease"/>
    </interval>
  </graph>
  <legend id="legend">
    <location part="right" method="fixed" value="100%"/>
    <location part="width" method="sizeToContent"/>
    <label>
      <text>Gender</text>
    </label>
    <legendTarget target="clustering"/>
  </legend>
</visualization>


Faceted (Paneled) Bar Chart

ViZml for faceted bar chart
<?xml version="1.0" encoding="utf-8"?>
<visualization version="2.2" xmlns="http://xml.spss.com/visualization"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://xml.spss.com/visualization
  http://xml.spss.com/visualization/vizml-2.2.xsd">
  <delimitedFileSource fileName="/pubs/gpl/data/Employee data.csv" header="true"
    id="empdata"/>
  <sourceVariable categorical="true" id="jobcat" source="empdata"
    sourceName="jobcat"/>
  <sourceVariable categorical="true" id="gender" source="empdata"
    sourceName="gender"/>
  <sourceVariable id="salary" source="empdata" sourceName="salary"/>
  <graph>
    <coordinates>
      <dimension>
        <axis>
          <label>
            <text>Job Category</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
      <dimension>
        <axis>
          <label>
            <text>Mean Salary</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
    </coordinates>
    <faceting>
      <variableReference ref="gender"/>
    </faceting>
    <facetLayout>
      <facetLevel level="1">
        <axis>
          <label>
            <text>Gender</text>
          </label>
          <majorTicks/>
        </axis>
      </facetLevel>
    </facetLayout>
    <interval>
      <summaryStatistic method="mean"/>
      <x variable="jobcat"/>
      <y variable="salary"/>
    </interval>
  </graph>
</visualization>
ViZml for multi-faceted bar chart
<?xml version="1.0" encoding="utf-8"?>
<visualization version="2.2" xmlns="http://xml.spss.com/visualization"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://xml.spss.com/visualization
  http://xml.spss.com/visualization/vizml-2.2.xsd">
  <delimitedFileSource fileName="/pubs/gpl/data/Employee data.csv" header="true"
    id="empdata"/>
  <sourceVariable categorical="true" id="jobcat" source="empdata"
    sourceName="jobcat"/>
  <sourceVariable categorical="true" id="gender" source="empdata"
    sourceName="gender"/>
  <sourceVariable categorical="true" id="minority" source="empdata"
    sourceName="minority"/>
  <sourceVariable id="salary" source="empdata" sourceName="salary"/>
  <graph>
    <coordinates>
      <dimension>
        <axis>
          <label>
            <text>Job Category</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
      <dimension >
        <axis combineAxisLabels="true">
          <label>
            <text>Mean Salary</text>
          </label>
          <majorTicks />
        </axis>
      </dimension>
    </coordinates>
    <faceting>
      <cross>
        <variableReference ref="gender"/>
        <variableReference ref="minority"/>
      </cross>
    </faceting>
    <facetLayout>
      <facetLevel level="1">
        <axis>
          <label>
            <text>Gender</text>
          </label>
          <majorTicks/>
        </axis>
      </facetLevel>
      <facetLevel level="2">
        <axis>
          <label>
            <text>Minority Classification</text>
          </label>
          <majorTicks/>
        </axis>
      </facetLevel>
    </facetLayout>
    <interval>
      <summaryStatistic method="mean"/>
      <x variable="jobcat"/>
      <y variable="salary"/>
    </interval>
  </graph>
</visualization>


3-D Bar Chart

ViZml for 3-D bar chart
<?xml version="1.0" encoding="utf-8"?>
<visualization version="2.2" xmlns="http://xml.spss.com/visualization"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://xml.spss.com/visualization
  http://xml.spss.com/visualization/vizml-2.2.xsd">
  <delimitedFileSource fileName="/pubs/gpl/data/Employee data.csv" header="true"
    id="empdata"/>
  <sourceVariable categorical="true" id="jobcat" source="empdata"
    sourceName="jobcat"/>
  <sourceVariable categorical="true" id="gender" source="empdata"
    sourceName="gender"/>
  <sourceVariable id="salary" source="empdata" sourceName="salary"/>
  <graph>
    <coordinates>
      <dimension>
        <axis>
          <label>
            <text>Gender</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
      <dimension>
        <axis>
          <label>
            <text>Mean Salary</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
      <dimension>
        <axis>
          <label>
            <text>Job Category</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
    </coordinates>
    <interval style="bars3d">
      <summaryStatistic method="mean"/>
      <x variable="gender"/>
      <y variable="salary"/>
      <z variable="jobcat"/>
    </interval>
  </graph>
  <style id="bars3d" depth="50%"/>
</visualization>


Error Bar Chart

ViZml for error bar chart
<?xml version="1.0" encoding="utf-8"?>
<visualization version="2.2" xmlns="http://xml.spss.com/visualization"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://xml.spss.com/visualization
  http://xml.spss.com/visualization/vizml-2.2.xsd">
  <delimitedFileSource fileName="/pubs/gpl/data/Employee data.csv" header="true"
    id="empdata"/>
  <sourceVariable categorical="true" id="jobcat" source="empdata"
    sourceName="jobcat"/>
  <sourceVariable id="salary" source="empdata" sourceName="salary"/>
  <intervalDomain id="salaryDomain">
    <range min="0"/>
  </intervalDomain>
  <graph>
    <coordinates>
      <dimension>
        <axis>
          <label>
            <text>Job Category</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
      <dimension domain="salaryDomain">
        <axis>
          <label>
            <text>Mean +- 1 SD Current Salary</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
    </coordinates>
    <interval style="ibeam">
      <summaryStatistic method="stddev"/>
      <x variable="jobcat"/>
      <y variable="salary"/>
    </interval>
    <point>
      <summaryStatistic method="mean"/>
      <x variable="jobcat"/>
      <y variable="salary"/>
    </point>
  </graph>
  <style id="ibeam" symbol="ibeam" size="0.4in"/>
</visualization>


Pareto Chart

ViZml for pareto chart
<?xml version="1.0" encoding="UTF-8"?>
<visualization xmlns="http://xml.spss.com/visualization"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://xml.spss.com/visualization
  http://xml.spss.com/visualization/vizml-2.2.xsd" version="2.2">
  <delimitedFileSource fileName="/pubs/gpl/data/Employee data.csv" header="true"
    id="empdata"/>
  <sourceVariable sourceName="educ" id="educ" source="empdata"
    categorical="true"/>
  <categoricalDomain id="catSort">
    <variableReference ref="educ"/>
    <statisticSort descending="true" sourceVariable="educ" statVariable="educ"
      method="count"/>
  </categoricalDomain>
  <derivedVariable id="counted" categorical="true" value="constant(counted)"/>
  <graph>
    <coordinates>
      <dimension domain="catSort">
        <axis>
          <label>
            <text>Educational Level</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
      <dimension>
        <axis>
          <label>
            <text>Count</text>
          </label>
          <majorTicks/>
        </axis>
        <axis opposite="true" transform="percent">
          <label>
            <text>Percent</text>
          </label>
          <majorTicks>
            <numberFormat suffix="%"/>
          </majorTicks>
        </axis>
      </dimension>
    </coordinates>
    <interval>
      <summaryStatistic method="count"/>
      <labeling variable="counted">
        <summaryStatistic method="count"/>
      </labeling>
      <x variable="educ"/>
    </interval>
    <line>
      <summaryStatistic method="cumulativeCount"/>
      <x variable="educ"/>
    </line>
  </graph>
</visualization>


Histogram Examples

This section provides examples of different types of histograms.

Examples

Examples
Histogram
Histogram with Normal Curve
Frequency Polygon
Stacked Histogram
Cumulative Histogram
Population Pyramid
Faceted (Paneled) Population Pyramid


Histogram

ViZml for histogram
<?xml version="1.0" encoding="UTF-8"?>
<visualization xmlns="http://xml.spss.com/visualization"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://xml.spss.com/visualization
  http://xml.spss.com/visualization/vizml-2.2.xsd" version="2.2">
  <delimitedFileSource fileName="/pubs/gpl/data/Employee data.csv" header="true"
    id="empdata"/>
  <sourceVariable sourceName="salary" id="salary" source="empdata"/>
  <graph>
    <coordinates>
      <dimension>
        <axis>
          <label>
            <text>Salary</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
      <dimension>
        <axis>
          <label>
            <text>Frequency</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
    </coordinates>
    <interval>
      <binStatistic gridType="square"/>
      <summaryStatistic method="count"/>
      <x variable="salary"/>
    </interval>
  </graph>
</visualization>


Histogram with Normal Curve

ViZml for histogram with normal curve
<?xml version="1.0" encoding="UTF-8"?>
<visualization xmlns="http://xml.spss.com/visualization"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://xml.spss.com/visualization
  http://xml.spss.com/visualization/vizml-2.2.xsd" version="2.2">
  <delimitedFileSource fileName="/pubs/gpl/data/Employee data.csv" header="true"
    id="empdata"/>
  <sourceVariable sourceName="salary" id="salary" source="empdata"/>
  <graph>
    <coordinates>
      <dimension>
        <axis>
          <label>
            <text>Salary</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
      <dimension>
        <axis>
          <label>
            <text>Frequency</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
    </coordinates>
    <interval>
      <binStatistic gridType="square"/>
      <summaryStatistic method="count"/>
      <x variable="salary"/>
    </interval>
    <line>
      <distributionStatistic/>
      <x variable="salary"/>
    </line>
  </graph>
</visualization>


Frequency Polygon

ViZml for frequency polygon
<?xml version="1.0" encoding="UTF-8"?>
<visualization xmlns="http://xml.spss.com/visualization"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://xml.spss.com/visualization
  http://xml.spss.com/visualization/vizml-2.2.xsd" version="2.2">
  <delimitedFileSource fileName="/pubs/gpl/data/Employee data.csv" header="true"
    id="empdata"/>
  <sourceVariable sourceName="salary" id="salary" source="empdata"/>
  <graph>
    <coordinates>
      <dimension>
        <axis>
          <label>
            <text>Salary</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
      <dimension>
        <axis>
          <label>
            <text>Frequency</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
    </coordinates>
    <area>
      <binStatistic gridType="square"/>
      <summaryStatistic method="count"/>
      <x variable="salary"/>
    </area>
  </graph>
</visualization>


Stacked Histogram

ViZml for stacked histogram
<?xml version="1.0" encoding="UTF-8"?>
<visualization xmlns="http://xml.spss.com/visualization"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://xml.spss.com/visualization
  http://xml.spss.com/visualization/vizml-2.2.xsd" version="2.2">
  <delimitedFileSource fileName="/pubs/gpl/data/Employee data.csv" header="true"
    id="empdata"/>
  <sourceVariable sourceName="salary" id="salary" source="empdata"/>
  <sourceVariable sourceName="gender" id="gender" source="empdata"
    categorical="true"/>
  <graph>
    <location part="right" method="attach" target="legend"/>
    <coordinates>
      <dimension>
        <axis>
          <label>
            <text>Salary</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
      <dimension>
        <axis>
          <label>
            <text>Frequency</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
    </coordinates>
    <interval positionModifier="stack">
      <binStatistic gridType="square"/>
      <summaryStatistic method="count"/>
      <color variable="gender" id="groupGender"/>
      <x variable="salary"/>
    </interval>
  </graph>
  <legend id="legend">
    <location part="right" method="fixed" value="100%"/>
    <location part="width" method="sizeToContent"/>
    <label>
      <text>Gender</text>
    </label>
    <legendTarget target="groupGender"/>
  </legend>
</visualization>


Cumulative Histogram

ViZml for cumulative histogram
<?xml version="1.0" encoding="UTF-8"?>
<visualization xmlns="http://xml.spss.com/visualization"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://xml.spss.com/visualization
  http://xml.spss.com/visualization/vizml-2.2.xsd" version="2.2">
  <delimitedFileSource fileName="/pubs/gpl/data/Employee data.csv" header="true"
    id="empdata"/>
  <sourceVariable sourceName="salary" id="salary" source="empdata"/>
  <graph>
    <coordinates>
      <dimension>
        <axis>
          <label>
            <text>Salary</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
      <dimension>
        <axis>
          <label>
            <text>Cumulative Percent</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
    </coordinates>
    <interval>
      <binStatistic gridType="square"/>
      <summaryStatistic method="count"/>
      <summaryStatistic method="cumulativePercent"/>
      <x variable="salary"/>
    </interval>
  </graph>
</visualization>


Population Pyramid

ViZml for population pyramid
<?xml version="1.0" encoding="UTF-8"?>
<visualization xmlns="http://xml.spss.com/visualization"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://xml.spss.com/visualization
  http://xml.spss.com/visualization/vizml-2.2.xsd" version="2.2">
  <delimitedFileSource fileName="/pubs/gpl/data/Employee data.csv" header="true"
    id="empdata"/>
  <sourceVariable sourceName="gender" id="gender" categorical="true"
    source="empdata"/>
  <sourceVariable sourceName="salary" id="salary" source="empdata"/>
  <graph>
    <coordinates>
      <transposeTransform/>
      <reflectionTransform alternating="true"/>
      <dimension>
        <axis combineAxisLabels="true" opposite="true">
          <label>
            <text>Current Salary</text>
          </label>
          <majorTicks/>
        </axis>
        <axis combineAxisLabels="true" opposite="false">
          <label>
            <text>Current Salary</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
      <dimension>
        <axis combineAxisLabels="true">
          <label>
            <text>Count</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
    </coordinates>
    <faceting>
      <variableReference ref="gender"/>
    </faceting>
    <facetLayout>
      <facetLevel level="1" gap="0">
        <axis combineAxisLabels="true">
          <label>
            <text>Gender</text>
          </label>
          <majorTicks/>
        </axis>
      </facetLevel>
    </facetLayout>
    <interval>
      <binStatistic/>
      <summaryStatistic method="count"/>
      <color variable="gender"/>
      <x variable="salary"/>
    </interval>
  </graph>
</visualization>


Faceted (Paneled) Population Pyramid

ViZml for faceted population pyramid
<?xml version="1.0" encoding="UTF-8"?>
<visualization xmlns="http://xml.spss.com/visualization"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://xml.spss.com/visualization
  http://xml.spss.com/visualization/vizml-2.2.xsd" version="2.2">
  <delimitedFileSource fileName="/pubs/gpl/data/Employee data.csv" header="true"
    id="empdata"/>
  <sourceVariable sourceName="jobcat" id="jobcat" categorical="true"
    source="empdata"/>
  <sourceVariable sourceName="gender" id="gender" categorical="true"
    source="empdata"/>
  <sourceVariable sourceName="salary" id="salary" source="empdata"/>
  <graph>
    <coordinates>
      <transposeTransform/>
      <reflectionTransform alternating="true"/>
      <dimension>
        <axis combineAxisLabels="true" opposite="true">
          <label>
            <text>Current Salary</text>
          </label>
          <majorTicks/>
        </axis>
        <axis combineAxisLabels="true" opposite="false">
          <label>
            <text>Current Salary</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
      <dimension>
        <axis combineAxisLabels="true">
          <label>
            <text>Count</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
    </coordinates>
    <faceting>
      <cross>
        <cross>
          <variableReference ref="gender"/>
          <variableReference ref="jobcat"/>
        </cross>
      </cross>
    </faceting>
    <facetLayout>
      <facetLevel level="1" gap="0">
        <axis>
          <label>
            <text>Gender</text>
          </label>
        </axis>
      </facetLevel>
      <facetLevel level="2">
        <axis combineAxisLabels="true">
          <label>
            <text>Employment Category</text>
          </label>
          <majorTicks/>
        </axis>
      </facetLevel>
    </facetLayout>
    <interval>
      <binStatistic/>
      <summaryStatistic method="count"/>
      <color variable="gender"/>
      <x variable="salary"/>
    </interval>
  </graph>
</visualization>


High-Low Chart Examples

This section provides examples of different types of high-low charts.

Examples

Examples
Simple Range Bar for One Variable
Simple Range Bar for Two Variables


Simple Range Bar for One Variable

ViZml for simple range bar for one variable
<?xml version="1.0" encoding="utf-8"?>
<visualization version="2.2" xmlns="http://xml.spss.com/visualization"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://xml.spss.com/visualization
  http://xml.spss.com/visualization/vizml-2.2.xsd">
  <delimitedFileSource fileName="/pubs/gpl/data/Employee data.csv" header="true"
    id="empdata"/>
  <sourceVariable categorical="true" id="jobcat" source="empdata"
    sourceName="jobcat"/>
  <sourceVariable id="salary" source="empdata" sourceName="salary"/>
  <graph>
    <coordinates>
      <dimension>
        <axis>
          <label>
            <text>Job Category</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
      <dimension>
        <axis>
          <label>
            <text>Min Current Salary - Max Current Salary</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
    </coordinates>
    <interval>
      <summaryStatistic method="range"/>
      <x variable="jobcat"/>
      <y variable="salary"/>
    </interval>
  </graph>
</visualization>


Simple Range Bar for Two Variables

ViZml for simple range bar for two variables
<?xml version="1.0" encoding="utf-8"?>
<visualization version="2.2" xmlns="http://xml.spss.com/visualization"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://xml.spss.com/visualization
  http://xml.spss.com/visualization/vizml-2.2.xsd">
  <delimitedFileSource fileName="/pubs/gpl/data/Employee data.csv" header="true"
    id="empdata"/>
  <sourceVariable categorical="true" id="jobcat" source="empdata"
    sourceName="jobcat"/>
  <sourceVariable id="salary" source="empdata" sourceName="salary"/>
  <sourceVariable id="salbegin" source="empdata" sourceName="salbegin"/>
  <expressionVariable id="salblend" expression="salbegin+salary"/>
  <graph>
    <coordinates>
      <dimension>
        <axis>
          <label>
            <text>Job Category</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
      <dimension>
        <axis>
          <label>
            <text>Min Beginning Salary - Max Current Salary</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
    </coordinates>
    <interval>
      <summaryStatistic method="range"/>
      <x variable="jobcat"/>
      <y variable="salblend"/>
    </interval>
  </graph>
</visualization>


Scatter/Dot Examples

This section provides examples of different types of scatterplots and dot plots.

Examples

Simple 1-D Scatterplot
Simple 2-D Scatterplot
Simple 2-D Scatterplot with Fit Line
Grouped Scatterplot
Scatterplot Matrix (SPLOM)
Bubble Plot
Binned Scatterplot
Binned Scatterplot with Polygons
Scatterplot with Border Boxplots
Scatterplot with Border Histograms
Dot Plot
2-D Dot Plot


Simple 1-D Scatterplot

ViZml for simple 1-D scatterplot
<?xml version="1.0" encoding="UTF-8"?>
<visualization xmlns="http://xml.spss.com/visualization"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://xml.spss.com/visualization
  http://xml.spss.com/visualization/vizml-2.2.xsd" version="2.2">
  <delimitedFileSource fileName="/pubs/gpl/data/Employee data.csv" header="true"
    id="empdata"/>
  <sourceVariable sourceName="salary" id="salary" source="empdata"/>
  <graph id="main">
    <coordinates>
      <dimension>
        <axis>
          <label>
            <text>Salary</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
    </coordinates>
    <point>
      <x variable="salary"/>
    </point>
  </graph>
</visualization>


Simple 2-D Scatterplot

ViZml for simple 2-D scatterplot
<?xml version="1.0" encoding="UTF-8"?>
<visualization xmlns="http://xml.spss.com/visualization"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://xml.spss.com/visualization
  http://xml.spss.com/visualization/vizml-2.2.xsd" version="2.2">
  <delimitedFileSource fileName="/pubs/gpl/data/Employee data.csv" header="true"
    id="empdata"/>
  <sourceVariable sourceName="salary" id="salary" source="empdata"/>
  <sourceVariable sourceName="salbegin" id="salbegin" source="empdata"/>
  <graph id="main">
    <coordinates>
      <dimension>
        <axis>
          <label>
            <text>Beginning Salary</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
      <dimension>
        <axis>
          <label>
            <text>Current Salary</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
    </coordinates>
    <point>
      <x variable="salbegin"/>
      <y variable="salary"/>
    </point>
  </graph>
</visualization>


Simple 2-D Scatterplot with Fit Line

ViZml for simple scatterplot with fit line
<?xml version="1.0" encoding="UTF-8"?>
<visualization xmlns="http://xml.spss.com/visualization"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://xml.spss.com/visualization
  http://xml.spss.com/visualization/vizml-2.2.xsd" version="2.2">
  <delimitedFileSource fileName="/pubs/gpl/data/Employee data.csv" header="true"
    id="empdata"/>
  <sourceVariable sourceName="salary" id="salary" source="empdata"/>
  <sourceVariable sourceName="salbegin" id="salbegin" source="empdata"/>
  <graph id="main">
    <coordinates>
      <dimension>
        <axis>
          <label>
            <text>Beginning Salary</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
      <dimension>
        <axis>
          <label>
            <text>Current Salary</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
    </coordinates>
    <point>
      <x variable="salbegin"/>
      <y variable="salary"/>
    </point>
    <line>
      <smoothStatistic method="linear"/>
      <x variable="salbegin"/>
      <y variable="salary"/>
    </line>
  </graph>
</visualization>


Grouped Scatterplot

ViZml for grouped scatterplot
<?xml version="1.0" encoding="UTF-8"?>
<visualization xmlns="http://xml.spss.com/visualization"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://xml.spss.com/visualization
  http://xml.spss.com/visualization/vizml-2.2.xsd" version="2.2">
  <delimitedFileSource fileName="/pubs/gpl/data/Employee data.csv" header="true"
    id="empdata"/>
  <sourceVariable sourceName="gender" id="gender" categorical="true"
    source="empdata"/>
  <sourceVariable sourceName="salary" id="salary" source="empdata"/>
  <sourceVariable sourceName="salbegin" id="salbegin" source="empdata"/>
  <graph id="main">
    <location part="right" method="attach" target="legend"/>
    <coordinates>
      <dimension>
        <axis>
          <label>
            <text>Beginning Salary</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
      <dimension>
        <axis>
          <label>
            <text>Current Salary</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
    </coordinates>
    <point>
      <color variable="gender" id="genderGroup" affect="secondary"/>
      <x variable="salbegin"/>
      <y variable="salary"/>
    </point>
  </graph>
  <legend id="legend">
    <location part="right" method="fixed" value="100%"/>
    <location part="width" method="sizeToContent"/>
    <label>
      <text>Gender</text>
    </label>
    <legendTarget target="genderGroup"/>
  </legend>
</visualization>


Scatterplot Matrix (SPLOM)

ViZml for scatterplot matrix
<?xml version="1.0"?>
<visualization version="2.2" xmlns="http://xml.spss.com/visualization"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://xml.spss.com/visualization
  http://xml.spss.com/visualization/vizml-2.2.xsd">
  <delimitedFileSource id="cars" fileName="/pubs/gpl/data/cars.csv" header="true"/>
  <derivedVariable id="mpgString" categorical="true" key="false"
    value="constant(MPG)" weight="false"/>
  <sourceVariable id="mpg" categorical="false" source="cars" sourceName="mpg"/>
  <derivedVariable id="weightString" categorical="true" key="false"
    value="constant(Weight)" weight="false"/>
  <sourceVariable id="weight" categorical="false" source="cars"
    sourceName="weight"/>
  <sourceVariable id="horse" categorical="false" source="cars"
    sourceName="horse"/>
  <derivedVariable id="hpString" categorical="true" key="false"
    value="constant(HP)" weight="false"/>
  <expressionVariable id="algebra1" categorical="false"
    expression="mpg/mpgString+weight/weightString+horse/hpString+
    mpg/mpgString+weight/weightString+horse/hpString+mpg/mpgString+
    weight/weightString+horse/hpString"/>
  <expressionVariable id="algebra2" categorical="false"
    expression="mpg/mpgString+mpg/mpgString+mpg/mpgString+
    weight/weightString+weight/weightString+weight/weightString+horse/hpString+
    horse/hpString+horse/hpString"/>
  <graph>
    <coordinates>
      <dimension>
        <axis/>
      </dimension>
      <dimension>
        <axis/>
      </dimension>
    </coordinates>
    <facetLayout>
      <facetLevel level="1">
        <axis>
          <majorTicks/>
        </axis>
      </facetLevel>
      <facetLevel level="2">
        <axis>
          <majorTicks/>
        </axis>
      </facetLevel>
    </facetLayout>
    <point>
      <x variable="algebra1"/>
      <y variable="algebra2"/>
    </point>
  </graph>
</visualization>


Bubble Plot

ViZml for bubble plot
<?xml version="1.0" encoding="UTF-8"?>
<visualization xmlns="http://xml.spss.com/visualization"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://xml.spss.com/visualization
  http://xml.spss.com/visualization/vizml-2.2.xsd" version="2.2">
  <delimitedFileSource fileName="/pubs/gpl/data/Employee data.csv" header="true"
    id="empdata"/>
  <sourceVariable sourceName="salary" id="salary" source="empdata"/>
  <sourceVariable sourceName="salbegin" id="salbegin" source="empdata"/>
  <sourceVariable categorical="true" sourceName="educ" id="educ" source="empdata"/>
  <graph id="main">
    <location part="right" method="attach" target="legend"/>
    <coordinates>
      <dimension>
        <axis>
          <label>
            <text>Beginning Salary</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
      <dimension>
        <axis>
          <label>
            <text>Current Salary</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
    </coordinates>
    <point>
      <size variable="educ" id="educSize" low="5px" high="20px"/>
      <x variable="salbegin"/>
      <y variable="salary"/>
    </point>
  </graph>
  <legend id="legend">
    <location part="right" method="fixed" value="100%"/>
    <location part="width" method="sizeToContent"/>
    <label>
      <text>Educational Level</text>
    </label>
    <legendTarget target="educSize"/>
  </legend>
</visualization>


Binned Scatterplot

ViZml for binned scatterplot
<?xml version="1.0" encoding="UTF-8"?>
<visualization xmlns="http://xml.spss.com/visualization"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://xml.spss.com/visualization
  http://xml.spss.com/visualization/vizml-2.2.xsd" version="2.2">
  <delimitedFileSource fileName="/pubs/gpl/data/Employee data.csv" header="true"
    id="empdata"/>
  <sourceVariable sourceName="salary" id="salary" source="empdata"/>
  <sourceVariable sourceName="salbegin" id="salbegin" source="empdata"/>
  <graph id="main">
    <location part="right" method="attach" target="legend"/>
    <coordinates>
      <dimension>
        <axis>
          <label>
            <text>Beginning Salary</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
      <dimension>
        <axis>
          <label>
            <text>Current Salary</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
    </coordinates>
    <point>
      <binStatistic method="aggregate" gridType="hex"/>
      <size low="2pt" high="10pt" variable="salbegin" id="binSize">
        <summaryStatistic method="count"/>
      </size>
      <x variable="salbegin"/>
      <y variable="salary"/>
    </point>
  </graph>
  <legend id="legend">
    <location part="right" method="fixed" value="100%"/>
    <location part="width" method="sizeToContent"/>
    <label>
      <text>Count</text>
    </label>
    <legendTarget target="binSize"/>
  </legend>
</visualization>


Binned Scatterplot with Polygons

ViZml for binned scatterplot
<?xml version="1.0" encoding="UTF-8"?>
<visualization xmlns="http://xml.spss.com/visualization"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://xml.spss.com/visualization
  http://xml.spss.com/visualization/vizml-2.2.xsd" version="2.2">
  <delimitedFileSource fileName="/pubs/gpl/data/Employee data.csv" header="true"
    id="empdata"/>
  <sourceVariable sourceName="salary" id="salary" source="empdata"/>
  <sourceVariable sourceName="salbegin" id="salbegin" source="empdata"/>
  <graph>
    <location part="right" method="attach" target="legend"/>
    <coordinates>
      <dimension>
        <axis>
          <label>
            <text>Beginning Salary</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
      <dimension>
        <axis>
          <label>
            <text>Current Salary</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
    </coordinates>
    <polygon>
      <binStatistic method="aggregate" gridType="square"/>
      <color variable="salbegin" id="binColor">
        <summaryStatistic method="count"/>
      </color>
      <x variable="salbegin"/>
      <y variable="salary"/>
    </polygon>
  </graph>
  <legend id="legend">
    <location part="right" method="fixed" value="100%"/>
    <location part="width" method="sizeToContent"/>
    <label>
      <text>Count</text>
    </label>
    <legendTarget target="binColor"/>
  </legend>
</visualization>


Scatterplot with Border Boxplots

ViZml for scatterplot with border histograms
<?xml version="1.0" encoding="UTF-8"?>
<visualization xmlns="http://xml.spss.com/visualization"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://xml.spss.com/visualization
  http://xml.spss.com/visualization/vizml-2.2.xsd" version="2.2">
  <delimitedFileSource fileName="/pubs/gpl/data/Employee data.csv" header="true"
    id="empdata"/>
  <sourceVariable sourceName="salary" id="salary" source="empdata"/>
  <sourceVariable sourceName="salbegin" id="salbegin" source="empdata"/>
  <container>
    <graph id="main">
      <location part="width" value="85%"/>
      <location part="height" value="85%"/>
      <location part="left" value="0%"/>
      <location part="top" value="15%"/>
      <coordinates>
        <dimension>
          <axis>
            <label>
              <text>Beginning Salary</text>
            </label>
            <majorTicks/>
          </axis>
        </dimension>
        <dimension>
          <axis>
            <label>
              <text>Current Salary</text>
            </label>
            <majorTicks/>
          </axis>
        </dimension>
      </coordinates>
      <point>
        <x variable="salbegin"/>
        <y variable="salary"/>
      </point>
    </graph>
    <graph id="boxplotbegin" alignCellHorizontallyWith="main">
      <location part="width" value="85%"/>
      <location part="height" value="15%"/>
      <location part="left" value="0%"/>
      <location part="top" value="0%"/>
      <coordinates>
        <transposeTransform/>
        <dimension/>
        <dimension>
          <axis/>
        </dimension>
      </coordinates>
      <schema>
        <tukeyStatistic/>
        <y variable="salbegin"/>
      </schema>
    </graph>
    <graph id="boxplotcurrent" alignCellVerticallyWith="main">
      <location part="width" value="15%"/>
      <location value="15%" part="top"/>
      <location part="left" value="85%"/>
      <coordinates>
        <dimension/>
        <dimension>
          <axis/>
        </dimension>
      </coordinates>
      <schema>
        <tukeyStatistic/>
        <y variable="salary"/>
      </schema>
    </graph>
  </container>
</visualization>


Scatterplot with Border Histograms

ViZml for scatterplot with border histograms
<?xml version="1.0" encoding="UTF-8"?>
<visualization xmlns="http://xml.spss.com/visualization"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://xml.spss.com/visualization
  http://xml.spss.com/visualization/vizml-2.2.xsd" version="2.2">
  <delimitedFileSource fileName="/pubs/gpl/data/Employee data.csv" header="true"
    id="empdata"/>
  <sourceVariable sourceName="salary" id="salary" source="empdata"/>
  <sourceVariable sourceName="salbegin" id="salbegin" source="empdata"/>
  <container>
    <graph id="main">
      <location part="width" value="85%"/>
      <location part="height" value="85%"/>
      <location part="left" value="0%"/>
      <location part="top" value="15%"/>
      <coordinates>
        <dimension>
          <axis>
            <label>
              <text>Beginning Salary</text>
            </label>
            <majorTicks/>
          </axis>
        </dimension>
        <dimension>
          <axis>
            <label>
              <text>Current Salary</text>
            </label>
            <majorTicks/>
          </axis>
        </dimension>
      </coordinates>
      <point>
        <x variable="salbegin"/>
        <y variable="salary"/>
      </point>
    </graph>
    <graph id="histobegin" alignCellHorizontallyWith="main">
      <location part="width" value="85%"/>
      <location part="height" value="15%"/>
      <location part="left" value="0%"/>
      <location part="top" value="0%"/>
      <coordinates>
        <dimension>
          <axis/>
        </dimension>
        <dimension/>
      </coordinates>
      <interval>
        <binStatistic/>
        <summaryStatistic method="count"/>
        <x variable="salbegin"/>
      </interval>
      <line>
        <distributionStatistic/>
        <x variable="salbegin"/>
      </line>
    </graph>
    <graph id="histocurrent" alignCellVerticallyWith="main">
      <location part="width" value="15%"/>
      <location value="15%" part="top"/>
      <location part="left" value="85%"/>
      <coordinates>
        <transposeTransform/>
        <dimension>
          <axis/>
        </dimension>
        <dimension/>
      </coordinates>
      <interval>
        <binStatistic/>
        <summaryStatistic method="count"/>
        <x variable="salary"/>
      </interval>
      <line>
        <distributionStatistic/>
        <x variable="salary"/>
      </line>
    </graph>
  </container>
</visualization>


Dot Plot

ViZml for dot plot
<?xml version="1.0" encoding="UTF-8"?>
<visualization xmlns="http://xml.spss.com/visualization"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://xml.spss.com/visualization
  http://xml.spss.com/visualization/vizml-2.2.xsd" version="2.2">
  <delimitedFileSource fileName="/pubs/gpl/data/Employee data.csv" header="true"
    id="empdata"/>
  <sourceVariable sourceName="salary" id="salary" source="empdata"/>
  <graph>
    <coordinates>
      <dimension>
        <axis>
          <label>
            <text>Salary</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
    </coordinates>
    <point positionModifier="pile">
      <binStatistic gridType="dot"/>
      <x variable="salary"/>
    </point>
  </graph>
</visualization>
ViZml for grouped dot plot
<?xml version="1.0" encoding="UTF-8"?>
<visualization xmlns="http://xml.spss.com/visualization"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://xml.spss.com/visualization
  http://xml.spss.com/visualization/vizml-2.2.xsd" version="2.2">
  <delimitedFileSource fileName="/pubs/gpl/data/Employee data.csv" header="true"
    id="empdata"/>
  <sourceVariable sourceName="salary" id="salary" source="empdata"/>
  <sourceVariable sourceName="gender" id="gender" source="empdata" categorical="true"/>
  <graph>
    <location part="right" method="attach" target="legend"/>
    <coordinates>
      <dimension>
        <axis>
          <label>
            <text>Salary</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
    </coordinates>
    <point positionModifier="pile">
      <binStatistic gridType="dot"/>
      <color variable="gender" id="genderGroup"/>
      <x variable="salary"/>
    </point>
  </graph>
  <legend id="legend">
    <location part="right" method="fixed" value="100%"/>
    <location part="width" method="sizeToContent"/>
    <label>
      <text>Gender</text>
    </label>
    <legendTarget target="genderGroup"/>
  </legend>
</visualization>


2-D Dot Plot

ViZml for 2-D dot plot
<?xml version="1.0" encoding="UTF-8"?>
<visualization xmlns="http://xml.spss.com/visualization"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://xml.spss.com/visualization
  http://xml.spss.com/visualization/vizml-2.2.xsd" version="2.2">
  <delimitedFileSource fileName="/pubs/gpl/data/cars.csv" header="true"
    id="cars"/>
  <sourceVariable sourceName="mpg" id="mpg" source="cars"/>
  <sourceVariable categorical="true" sourceName="origin" id="origin"
    source="cars"/>
  <graph>
    <coordinates>
      <dimension>
        <axis>
          <label>
            <text>Miles Per Gallon</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
      <dimension>
        <axis>
          <label>
            <text>Origin</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
    </coordinates>
    <point positionModifier="dodge">
      <binStatistic gridType="dot"/>
      <x variable="mpg"/>
      <y variable="origin"/>
    </point>
  </graph>
</visualization>
ViZml for transposed 2-D dot plot
<?xml version="1.0" encoding="UTF-8"?>
<visualization xmlns="http://xml.spss.com/visualization"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://xml.spss.com/visualization
  http://xml.spss.com/visualization/vizml-2.2.xsd" version="2.2">
  <delimitedFileSource fileName="/pubs/gpl/data/cars.csv" header="true"
    id="cars"/>
  <sourceVariable sourceName="mpg" id="mpg" source="cars"/>
  <sourceVariable categorical="true" sourceName="origin" id="origin"
    source="cars"/>
  <graph>
    <coordinates>
      <transposeTransform/>
      <dimension>
        <axis>
          <label>
            <text>Miles Per Gallon</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
      <dimension>
        <axis>
          <label>
            <text>Origin</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
    </coordinates>
    <point positionModifier="dodge">
      <binStatistic gridType="dot"/>
      <x variable="mpg"/>
      <y variable="origin"/>
    </point>
  </graph>
</visualization>


Line Chart Examples

This section provides examples of different types of line charts.

Examples

Simple Line Chart
Simple Line Chart with Points
Line Chart of Date Data
Line Chart With Step Interpolation
Fit Line
Line Chart from Equation
Pareto Chart


Simple Line Chart

ViZml for simple line chart
<?xml version="1.0" encoding="UTF-8"?>
<visualization xmlns="http://xml.spss.com/visualization"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://xml.spss.com/visualization
  http://xml.spss.com/visualization/vizml-2.2.xsd" version="2.2">
  <delimitedFileSource fileName="/pubs/gpl/data/Employee data.csv" header="true"
    id="empdata"/>
  <sourceVariable sourceName="salary" id="salary" source="empdata"/>
  <sourceVariable sourceName="salbegin" id="salbegin" source="empdata"/>
  <graph id="main">
    <coordinates>
      <dimension>
        <axis>
          <label>
            <text>Beginning Salary</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
      <dimension>
        <axis>
          <label>
            <text>Current Salary</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
    </coordinates>
    <line>
      <x variable="salbegin"/>
      <y variable="salary"/>
    </line>
  </graph>
</visualization>


Simple Line Chart with Points

ViZml for simple line chart with points
<?xml version="1.0" encoding="UTF-8"?>
<visualization xmlns="http://xml.spss.com/visualization"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://xml.spss.com/visualization
  http://xml.spss.com/visualization/vizml-2.2.xsd" version="2.2">
  <delimitedFileSource fileName="/pubs/gpl/data/Employee data.csv" header="true"
    id="empdata"/>
  <sourceVariable sourceName="salary" id="salary" source="empdata"/>
  <sourceVariable sourceName="salbegin" id="salbegin" source="empdata"/>
  <graph id="main">
    <coordinates>
      <dimension>
        <axis>
          <label>
            <text>Beginning Salary</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
      <dimension>
        <axis>
          <label>
            <text>Current Salary</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
    </coordinates>
    <line>
      <x variable="salbegin"/>
      <y variable="salary"/>
    </line>
    <point>
      <x variable="salbegin"/>
      <y variable="salary"/>
    </point>
  </graph>
</visualization>


Line Chart of Date Data

ViZml for line chart of date data
<?xml version="1.0"?>
<visualization version="2.2" xmlns="http://xml.spss.com/visualization"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://xml.spss.com/visualization
  http://xml.spss.com/visualization/vizml-2.2.xsd">
  <delimitedFileSource id="stocksdata" fileName="/pubs/gpl/data/stocks2004.csv"
    header="true"/>
  <sourceVariable id="date" categorical="false" inputDateFormatPattern="MM/dd/yy"
    source="stocksdata" sourceName="Date"/>
  <sourceVariable id="close" categorical="false" source="stocksdata"
    sourceName="Close"/>
  <intervalDomain id="dateDomain" date="true"/>
  <graph>
    <location method="attach" part="top" target="title"/>
    <coordinates>
      <dimension domain="dateDomain">
        <axis>
          <label>
            <text>Date</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
      <dimension>
        <axis>
          <label>
            <text>Close</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
    </coordinates>
    <line>
      <x variable="date"/>
      <y variable="close"/>
    </line>
  </graph>
  <labelFrame id="title">
    <location method="sizeToContent" part="height"/>
    <location method="fixed" part="top" value="0%"/>
    <label>
      <text>NASDAQ Composite</text>
    </label>
  </labelFrame>
</visualization>


Line Chart With Step Interpolation

ViZml for line chart with step interpolation
<?xml version="1.0" encoding="UTF-8"?>
<visualization xmlns="http://xml.spss.com/visualization"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://xml.spss.com/visualization
  http://xml.spss.com/visualization/vizml-2.2.xsd" version="2.2">
  <delimitedFileSource fileName="/pubs/gpl/data/Employee data.csv" header="true"
    id="empdata"/>
  <sourceVariable sourceName="salary" id="salary" source="empdata"/>
  <sourceVariable sourceName="salbegin" id="salbegin" source="empdata"/>
  <graph id="main">
    <coordinates>
      <dimension>
        <axis>
          <label>
            <text>Beginning Salary</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
      <dimension>
        <axis>
          <label>
            <text>Current Salary</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
    </coordinates>
    <line>
      <smoothStatistic method="step-center"/>
      <x variable="salbegin"/>
      <y variable="salary"/>
    </line>
  </graph>
</visualization>


Fit Line

ViZml for linear fit line overlaid on scatterplot
<?xml version="1.0" encoding="UTF-8"?>
<visualization xmlns="http://xml.spss.com/visualization"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://xml.spss.com/visualization
  http://xml.spss.com/visualization/vizml-2.2.xsd" version="2.2">
  <delimitedFileSource fileName="/pubs/gpl/data/Employee data.csv" header="true"
    id="empdata"/>
  <sourceVariable sourceName="salary" id="salary" source="empdata"/>
  <sourceVariable sourceName="salbegin" id="salbegin" source="empdata"/>
  <graph id="main">
    <coordinates>
      <dimension>
        <axis>
          <label>
            <text>Beginning Salary</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
      <dimension>
        <axis>
          <label>
            <text>Current Salary</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
    </coordinates>
    <point>
      <x variable="salbegin"/>
      <y variable="salary"/>
    </point>
    <line>
      <smoothStatistic method="linear"/>
      <x variable="salbegin"/>
      <y variable="salary"/>
    </line>
  </graph>
</visualization>


Line Chart from Equation

ViZml for line chart from equation
<?xml version="1.0"?>
<visualization version="2.2" xmlns="http://xml.spss.com/visualization"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://xml.spss.com/visualization
  http://xml.spss.com/visualization/vizml-2.2.xsd">
  <derivedVariable id="x" categorical="false" key="false"
    value="iter(0,10,0.01)" weight="false"/>
  <derivedVariable id="y" categorical="false" key="false"
    value="sin(x)*cos(x)*(x-5)" weight="false"/>
  <graph>
    <coordinates>
      <dimension>
        <axis>
          <majorTicks/>
        </axis>
      </dimension>
      <dimension>
        <axis>
          <majorTicks/>
        </axis>
      </dimension>
    </coordinates>
    <line>
      <x variable="x"/>
      <y variable="y"/>
    </line>
  </graph>
</visualization>
ViZml for line chart from equation in polar coordinates
<?xml version="1.0"?>
<visualization version="2.2" xmlns="http://xml.spss.com/visualization"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://xml.spss.com/visualization
  http://xml.spss.com/visualization/vizml-2.2.xsd">
  <derivedVariable id="x" categorical="false" key="false"
    value="iter(0,6.28,0.01)" weight="false"/>
  <derivedVariable id="y" categorical="false" key="false" value="cos(6*x)"
    weight="false"/>
  <intervalDomain id="xInterval">
    <range min="0" max="6.28"/>
  </intervalDomain>
  <graph>
    <coordinates>
      <polarTransform/>
      <dimension domain="xInterval" niceLowerMapping="false"
        niceUpperMapping="false">
        <axis>
          <majorTicks/>
        </axis>
      </dimension>
      <dimension/>
    </coordinates>
    <line>
      <x variable="x"/>
      <y variable="y"/>
    </line>
  </graph>
</visualization>


Pie Chart Examples

This section provides examples of different types of pie charts.

Examples

Pie Chart
Paneled Pie Chart


Pie Chart

ViZml for pie chart
<?xml version="1.0" encoding="UTF-8"?>
<visualization xmlns="http://xml.spss.com/visualization"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://xml.spss.com/visualization
  http://xml.spss.com/visualization/vizml-2.2.xsd" version="2.2">
  <delimitedFileSource fileName="/pubs/gpl/data/Employee data.csv" header="true"
    id="empdata"/>
  <sourceVariable sourceName="jobcat" id="jobcat" categorical="true"
    source="empdata"/>
  <expressionVariable id="unity" categorical="true" expression="1"/>
  <graph id="main">
    <location part="right" method="attach" target="legendColor"/>
    <coordinates>
      <polarTransform/>
      <dimension niceUpperMapping="false"/>
    </coordinates>
    <interval positionModifier="stack">
      <summaryStatistic method="count"/>
      <color variable="jobcat" id="colorJobcat"/>
      <x variable="unity"/>
    </interval>
  </graph>
  <legend id="legendColor">
    <location part="right" value="100%"/>
    <location part="width" method="sizeToContent"/>
    <label>
      <text>Job Category</text>
    </label>
    <legendTarget target="colorJobcat"/>
  </legend>
</visualization>


Paneled Pie Chart

ViZml for paneled pie chart
<?xml version="1.0" encoding="UTF-8"?>
<visualization xmlns="http://xml.spss.com/visualization"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://xml.spss.com/visualization
  http://xml.spss.com/visualization/vizml-2.2.xsd" version="2.2">
  <delimitedFileSource fileName="/pubs/gpl/data/Employee data.csv" header="true"
    id="empdata"/>
  <sourceVariable sourceName="jobcat" id="jobcat" categorical="true"
    source="empdata"/>
  <sourceVariable sourceName="gender" id="gender" categorical="true"
    source="empdata"/>
  <expressionVariable id="unity" categorical="true" expression="1"/>
  <graph id="main">
    <location part="right" method="attach" target="legendColor"/>
    <coordinates>
      <polarTransform/>
      <dimension niceUpperMapping="false"/>
    </coordinates>
    <faceting method="nest">
      <variableReference ref="gender"/>
    </faceting>
    <facetLayout>
      <facetLevel level="1">
        <axis>
          <label>
            <text>Gender</text>
          </label>
          <majorTicks/>
        </axis>
      </facetLevel>
    </facetLayout>
    <interval positionModifier="stack">
      <summaryStatistic method="count"/>
      <color variable="jobcat" id="colorJobcat"/>
      <x variable="unity"/>
    </interval>
  </graph>
  <legend id="legendColor">
    <location part="right" value="100%"/>
    <location part="width" method="sizeToContent"/>
    <label>
      <text>Job Category</text>
    </label>
    <legendTarget target="colorJobcat"/>
  </legend>
</visualization>


Boxplot Examples

This section provides examples of different types of box plots.

Examples

1-D Boxplot
Boxplot
Boxplot With Overlaid Dot Plot


1-D Boxplot

ViZml for 1-D box plot
<?xml version="1.0" encoding="utf-8"?>
<visualization version="2.2" xmlns="http://xml.spss.com/visualization"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://xml.spss.com/visualization
  http://xml.spss.com/visualization/vizml-2.2.xsd">
  <delimitedFileSource fileName="/pubs/gpl/data/Employee data.csv" header="true"
    id="empdata"/>
  <sourceVariable id="salary" source="empdata" sourceName="salary"/>
  <graph>
    <coordinates>
      <transposeTransform/>
      <dimension/>
      <dimension>
        <axis>
          <label>
            <text>Salary</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
    </coordinates>
    <schema>
      <tukeyStatistic/>
      <y variable="salary"/>
    </schema>
  </graph>
</visualization>


Boxplot

ViZml for boxplot
<?xml version="1.0" encoding="utf-8"?>
<visualization version="2.2" xmlns="http://xml.spss.com/visualization"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://xml.spss.com/visualization
  http://xml.spss.com/visualization/vizml-2.2.xsd">
  <delimitedFileSource fileName="/pubs/gpl/data/Employee data.csv" header="true"
    id="empdata"/>
  <sourceVariable categorical="true" id="jobcat" source="empdata"
    sourceName="jobcat"/>
  <sourceVariable id="salary" source="empdata" sourceName="salary"/>
  <graph>
    <coordinates>
      <dimension>
        <axis>
          <label>
            <text>Job Category</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
      <dimension>
        <axis>
          <label>
            <text>Mean Salary</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
    </coordinates>
    <schema>
      <tukeyStatistic/>
      <x variable="jobcat"/>
      <y variable="salary"/>
    </schema>
  </graph>
</visualization>
ViZml for boxplot with labeled outliers
<?xml version="1.0" encoding="utf-8"?>
<visualization version="2.2" xmlns="http://xml.spss.com/visualization"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://xml.spss.com/visualization
  http://xml.spss.com/visualization/vizml-2.2.xsd">
  <delimitedFileSource fileName="/pubs/gpl/data/Employee data.csv" header="true"
    id="empdata"/>
  <sourceVariable categorical="true" id="jobcat" source="empdata"
    sourceName="jobcat"/>
  <sourceVariable categorical="true" id="id" source="empdata"
    sourceName="id"/>
  <sourceVariable id="salary" source="empdata" sourceName="salary"/>
  <graph>
    <coordinates>
      <dimension>
        <axis>
          <label>
            <text>Job Category</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
      <dimension>
        <axis>
          <label>
            <text>Mean Salary</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
    </coordinates>
    <schema>
      <tukeyStatistic/>
      <labeling variable="id"/>
      <x variable="jobcat"/>
      <y variable="salary"/>
    </schema>
  </graph>
</visualization>


Boxplot With Overlaid Dot Plot

ViZml for boxplot with overlaid dot plot
<?xml version="1.0" encoding="utf-8"?>
<visualization version="2.2" xmlns="http://xml.spss.com/visualization"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://xml.spss.com/visualization
  http://xml.spss.com/visualization/vizml-2.2.xsd">
  <delimitedFileSource fileName="/pubs/gpl/data/World95.csv" header="true"
    id="world95"/>
  <sourceVariable categorical="true" id="region" source="world95"
    sourceName="region"/>
  <sourceVariable id="birth" source="world95" sourceName="birth_rt"/>
  <graph>
    <coordinates>
      <dimension>
        <axis>
          <label>
            <text>Region</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
      <dimension>
        <axis>
          <label>
            <text>Birth Rate</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
    </coordinates>
    <schema>
      <tukeyStatistic/>
      <x variable="region"/>
      <y variable="birth"/>
    </schema>
    <point positionModifier="dodge" style="pointStyle">
      <binStatistic gridType="dot"/>
      <x variable="region"/>
      <y variable="birth"/>
    </point>
  </graph>
  <style id="pointStyle" size="6px"/>
</visualization>


Multi-Graph Examples

This section provides examples of multiple graphs in the same page display.

Examples

Scatterplot with Border Histograms
Scatterplot with Border Boxplots
Stocks Line Chart with Volume Bar Chart


Scatterplot with Border Boxplots

ViZml for scatterplot with border boxplots
<?xml version="1.0" encoding="UTF-8"?>
<visualization xmlns="http://xml.spss.com/visualization"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://xml.spss.com/visualization
  http://xml.spss.com/visualization/vizml-2.2.xsd" version="2.2">
  <delimitedFileSource fileName="/pubs/gpl/data/Employee data.csv" header="true"
    id="empdata"/>
  <sourceVariable sourceName="salary" id="salary" source="empdata"/>
  <sourceVariable sourceName="salbegin" id="salbegin" source="empdata"/>
  <container>
    <graph id="main">
      <location part="width" value="85%"/>
      <location part="height" value="85%"/>
      <location part="left" value="0%"/>
      <location part="top" value="15%"/>
      <coordinates>
        <dimension>
          <axis>
            <label>
              <text>Beginning Salary</text>
            </label>
            <majorTicks/>
          </axis>
        </dimension>
        <dimension>
          <axis>
            <label>
              <text>Current Salary</text>
            </label>
            <majorTicks/>
          </axis>
        </dimension>
      </coordinates>
      <point>
        <x variable="salbegin"/>
        <y variable="salary"/>
      </point>
    </graph>
    <graph id="boxplotbegin" alignCellHorizontallyWith="main">
      <location part="width" value="85%"/>
      <location part="height" value="15%"/>
      <location part="left" value="0%"/>
      <location part="top" value="0%"/>
      <coordinates>
        <transposeTransform/>
        <dimension/>
        <dimension>
          <axis/>
        </dimension>
      </coordinates>
      <schema>
        <tukeyStatistic/>
        <y variable="salbegin"/>
      </schema>
    </graph>
    <graph id="boxplotcurrent" alignCellVerticallyWith="main">
      <location part="width" value="15%"/>
      <location value="15%" part="top"/>
      <location part="left" value="85%"/>
      <coordinates>
        <dimension/>
        <dimension>
          <axis/>
        </dimension>
      </coordinates>
      <schema>
        <tukeyStatistic/>
        <y variable="salary"/>
      </schema>
    </graph>
  </container>
</visualization>


Stocks Line Chart with Volume Bar Chart

ViZml for line chart with bar chart
<?xml version="1.0" encoding="UTF-8"?>
<visualization xmlns="http://xml.spss.com/visualization"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://xml.spss.com/visualization
  http://xml.spss.com/visualization/vizml-2.2.xsd" version="2.2">
  <delimitedFileSource fileName="/pubs/gpl/data/stocks2004.csv" header="true"
    id="stocks"/>
  <sourceVariable id="close" source="stocks" sourceName="Close"/>
  <sourceVariable id="volume" source="stocks" sourceName="Volume"/>
  <sourceVariable id="date" inputDateFormatPattern="MM/dd/yy" source="stocks"
    sourceName="Date"/>
  <graph id="closeChart">
    <location part="height" value="70%"/>
    <location part="width" value="100%"/>
    <location part="top" value="5%"/>
    <coordinates>
      <dimension>
        <axis>
          <majorTicks/>
        </axis>
      </dimension>
      <dimension>
        <axis>
          <label>
            <text>Close</text>
          </label>
          <majorTicks/>
        </axis>
      </dimension>
    </coordinates>
    <line>
      <x variable="date"/>
      <y variable="close"/>
    </line>
  </graph>
  <graph id="volumeChart" alignCellHorizontallyWith="closeChart">
    <location part="height" value="20%"/>
    <location part="width" value="100%"/>
    <location part="bottom" value="95%"/>
    <coordinates>
      <dimension>
        <axis>
          <label>
            <text>Date</text>
          </label>
        </axis>
      </dimension>
      <dimension>
        <axis>
          <label>
            <text>Vol.</text>
          </label>
        </axis>
      </dimension>
    </coordinates>
    <interval>
      <x variable="date"/>
      <y variable="volume"/>
    </interval>
  </graph>
</visualization>


Other Examples

This section provides examples that demonstrate other features of ViZml.

Examples

Linking Variables
Minimum Spanning Tree


Linking Variables

ViZml for linking variables
<?xml version="1.0"?>
<visualization version="2.2" xmlns="http://xml.spss.com/visualization"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://xml.spss.com/visualization
  http://xml.spss.com/visualization/vizml-2.2.xsd">
  <delimitedFileSource id="data" fileName="/pubs/gpl/data/us48.csv"/>
  <sourceVariable id="state" categorical="true" domain="sortedStates"
    source="data" sourceName="STATE"/>
  <sourceVariable id="summer" source="data" sourceName="SUMMER"/>
  <sourceVariable id="winter" source="data" sourceName="WINTER"/>
  <expressionVariable id="diff" expression="winter + summer"/>
  <categoricalDomain id="sortedStates">
    <variableReference ref="state"/>
    <statisticSort sourceVariable="state" statVariable="winter"/>
  </categoricalDomain>
  <graph>
    <coordinates>
      <dimension>
        <axis>
          <majorTicks style="labelStyle"/>
        </axis>
      </dimension>
      <dimension>
        <axis>
          <label>
            <text>Winter and Summer Temperatures</text>
          </label>
          <majorTicks style="labelStyle"/>
        </axis>
      </dimension>
    </coordinates>
    <link style="linkStyle">
      <x variable="state"/>
      <y variable="diff"/>
    </link>
  </graph>
  <style id="linkStyle" symbol="arrow"/>
  <style id="labelStyle" color="black" font-size="9px" margin="0" padding="0"
    margin-left="3px"/>
</visualization>


Minimum Spanning Tree

ViZml for minimum spanning tree
<?xml version="1.0"?>
<visualization version="2.2" xmlns="http://xml.spss.com/visualization"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://xml.spss.com/visualization
  http://xml.spss.com/visualization/vizml-2.2.xsd">
  <delimitedFileSource fileName="/pubs/gpl/data/us48.csv" id="data"/>
  <sourceVariable categorical="true" id="name" source="data" sourceName="STATE"/>
  <sourceVariable id="x" source="data" sourceName="LABLON"/>
  <sourceVariable id="y" source="data" sourceName="LABLAT"/>
  <graph>
    <coordinates>
      <dimension niceLowerMapping="false" niceUpperMapping="false"
        lowerMargin="2%" upperMargin="2%"/>
      <dimension niceLowerMapping="false" niceUpperMapping="false"
        lowerMargin="2%" upperMargin="2%"/>
      <mapProjection type="mercator"/>
    </coordinates>
    <edge>
      <linkStatistic type="minimalSpanningTree"/>
      <x variable="x"/>
      <y variable="y"/>
    </edge>
    <point>
      <labeling variable="name"/>
      <x variable="x"/>
      <y variable="y"/>
    </point>
  </graph>
</visualization>


Output XML Schema

The Output XML schema is an XML schema for communicating the output from an execution of PASW Statistics to another application. Its emphasis is on content, not presentation, and on accessibility to general tools like XSLT rather than on compactness.

The schema covers nearly all the object types that can be in output, including:

• Text blocks (including logs).

• Pivot tables (including notes and warnings tables).

• "Standard" charts (charts not created by the IGRAPH command).

• Headings that organize output in the outline pane of the Viewer.

A complete list of all the schema elements, attributes, attribute values, data types, parent/child relationships, etc. is provided in Output Schema Specifications.

Related Topics

Common Attributes
Elements
Pivot Table Child Elements
Pivot Table Structure
Output Management System
Routing Output to PASW Statistics Data Files
OXML Table Structure
OMS Identifiers
Copying OMS Identifiers from the Viewer Outline
Using Output as Input with OMS


Common Attributes

Unlike simple text output, where what you see in the Viewer is basically what you get in the OXML <textBlock> element, the OXML <pivotTable> element can contain much more information than simply the text displayed in the pivot table. In addition to the text attribute that contains the text displayed in the pivot table, the child and descendant elements of the <pivotTable> element can contain additional attributes that describe the data used to construct that text.

Numbers

Elements that contain numbers that are not values of PASW Statistics variables can have the following attributes:

number. The numeric value, up to 14 significant digits.

format. The PASW Statistics format used to display the number. For the default F format, the format attribute is not included in the element.

decimals. The number of decimal positions displayed.

null. Where a statistic cannot be computed, the Viewer displays the system-missing value: a decimal point (.). This is represented by null='true' in OXML. None of the other attributes usually shown with numbers are shown for null values.

Dates, Times, Time Intervals

Dates, times, and time intervals are treated as special kinds of numbers and are represented by different attributes:

date. Attribute values are xs:dateTime values of the general form yyyy-mm-ddThh:mm:ss.ss. The format attribute value indicates the PASW Statistics date format. For example:

<cell date="2003-08-05T17:44:04.48" format="DATETIME" text="05-AUG-2003 17:44:04" />

time. Attribute values are xs:time values of the general form hh:mm:ss.ss. The format attribute value is usually time.

duration. Attribute values are xs:duration values of the general format PnYnDTnHnMn.nS. The format attribute value can be either time or dtime. For example:

<cell duration="P10DT11H12M00S" format="DTIME" text="10 11:12" />

As with other numbers, if the value is the system-missing value, the element will have the null="true" attribute.

Numeric Data Values

The values of numeric variables are, of course, numbers, and they can have the same attributes as other numbers. Their values will be represented by a number, date, time, or duration attribute, depending on the variable's format, unless the value is system-missing. The system-missing value is represented by null="true".

Elements that represent values of PASW Statistics variables can also have the following attributes (in addition to the text attribute):

varName. Attribute values are case-sensitive variable names.

label. Attribute values are the defined value labels. If the value doesn't have a defined label, the label attribute is not included.

display. Attribute values are the display rules for the values: value, label, or both. The display attribute is only included if it differs from the valueDisplay attribute of the ancestor <pivotTable> element.

Text Strings

The values of simple text strings like statistic names, and the values of composed strings like most footnotes, appear in the XML with only the text attribute, whose value is the string itself.

String Data Values

In addition to the text attribute, values of string variables have the following attributes:

string. Attribute values are xs:string values that contain the actual values of the string variables.

varName. Attribute values are case-sensitive variable names.

label. Attribute values are the defined value labels. If the value doesn't have a defined label, the label attribute is not included.

display. Attribute values are the display rules for the values: value, label, or both. The display attribute is only included if it differs from the valueDisplay attribute of the ancestor <pivotTable> element.

Variables

PASW Statistics variables are described by the following attributes:

varName. Attribute values are case-sensitive variable names.

label. Attribute values are the defined variable labels. If the variable doesn't have a defined label, the label attribute is not included.

variable. The attribute value of variable="true" distinguishes variables from data values.

display. Attribute values are the display rules for the variables: name, label, or both. The display attribute is only included if it differs from the tableVariableDisplay or outlineVariableDisplay attribute of the ancestor <command> element.

Related Topics

Output XML Schema
Elements
Pivot Table Child Elements
Pivot Table Structure


Elements

The elements found in an OXML document correspond to the objects and structures you see in PASW Statistics output. There is an outline, which is a tree structure with an outputTree element as its root, composed of command and textBlock elements.

Commands

A <command> element is the parent node for all the output from one execution of a syntax command. The <command> element has the following attributes:

command. Attribute values are command identifiers. These identifiers are the same as the command identifiers used in the OMS command, and are usually (but not always) the same as the actual command names.

text. The text displayed in the outline pane of the Viewer for the top node of the command's output block. In English, this is usually -- but not -- always -- the same as the command name. This is a localized text string that is affected by the current output language setting.

xml:lang.The output language. Attribute values are standard two-letter language codes (e.g., "en" for English, "es" for Spanish, "fr" for French).

displayOutlineVariables, displayTableVariables. Attribute values are the settings for display of variables and/or variable labels in the outline pane and pivot tables: label, name, or both.

displayOutlineValues, displayTableValues. Attribute values are the settings for display of values and/or value labels in the outline pane and pivot table: label, value, or both.

A <command> element may contain one or more of the following child elements: heading, pivotTable, chart, and textBlock.

Headings

A <heading> element is just a heading in the output outline under a command. It can have any of the sets of common text attributes. In the Viewer, there is a small text block named "Title" under each heading (and command) in the outline that contains the heading text. That text block is not present in the OXML. A <heading> element may contain heading, pivotTable, chart, and textBlock elements.

Text Blocks

Some of the output consists of lines of text. Those are collected in <textBlock> elements. A <textBlock> element may have any number of line elements as children. The body text of each line element is a line of text. The <textBlock> element itself may have any of the sets of common text attributes.

Charts

Each chart is represented by a subdocument described in the Chart XML schema and documented elsewhere.

Pivot Tables

A <pivotTable> element always has at least two attributes:

text. The text displayed in the Viewer outline for the pivot table object. For default table titles, this is a localized text string that is affected by the current output language setting. For table titles that include information about variables used in the table, it is also affected by the current setting for display of variable names and/or variable names.

subType. The table subtype identifier. These identifiers are the same as the subtype identifiers in the OMS command. They are not affected by output language or other user-controlled settings.

A <pivotTable> element can also have a number of common attributes including label, varName, and variable, and two additional attributes:

rowVertical. Attribute values are xs:boolean, indicating whether row labels are displayed vertically rather than horizontally. The attribute value is false by default and not included in OXML. It is only included if the value if true.

columnVertical. Attribute values are xs:boolean, indicating whether column labels are displayed vertically rather than horizontally. The attribute value is false by default and not included in OXML. It is only included if the value if true.

Related Topics

Output XML Schema
Common Attributes
Pivot Table Child Elements
Pivot Table Structure


Pivot Table Child Elements

The <pivotTable> element always has the following child element:

dimension. The first dimension in the table and the root of the subtree that contains the body of the table.

The <pivotTable> element can also have one or more of the following additional child elements:

footnote. Parent of the <note> element that contains footnote text. The <footnote> element has no attributes; it contains or more child <note> elements.

caption. Text displayed below the pivot table. This may have any of the common text attributes.

cornerText. Text displayed in the upper left corner of the pivot table. This may have any of the common text attributes.

Related Topics

Output XML Schema
Common Attributes
Elements
Pivot Table Structure


Pivot Table Structure

Pivot tables have a completely hierarchical structure in OXML. The small Regression Coefficients table below shows how a rectangular pivot table becomes a tree structure.

Regression Coefficients pivot table

Here is the same table with the column dimension pivoted to become the last row dimension. Dimension names that are normally hidden have been shown as well.

Statistics rotated into row dimension

A tree structure can be seen in this pivot. The dimension name "Model" is the root; its children are the model numbers (of which there is only one in this example). Each model number has one child: the "Variables" dimension.

The OXML fragment below represents the same table and illustrates the elements that compose a <pivotTable> element.

• A <dimension> element will have a sequence of children which may be <group> elements or <category> elements. The dimensions in our example table are "Model", "Variables", and "Statistics."

• A <group> element is a non-leaf node in a dimension's tree. It can have any number of children, and each one can be either a <group> or a <category>. The "Statistics" dimension in the example contains two groups: "Unstandardized Coefficients" and "Standardized Coefficients."

• A <category> element is a leaf node in a dimension's tree. It can have only one child: either a <cell> or another <dimension>. In the example, the dimension "Model" has one category, named "1". Other categories in the example are "Sig.", "(Constant)", and "B."

• A <cell> element represents a cell in the pivot table body. It can have footnotes as children, but no other children. In the example table after pivoting, all the cells, and only the cells, are in the last column on the right.

Example XML

<pivotTable subType="Coefficients" text="Coefficients">
 <footnote>
  <note text="Dependent Variable: salary Current Salary"/>
 </footnote>
 <dimension axis="row" text="Model">
  <category number="1" text="1">
   <dimension axis="row" text="Variables">
    <category text="(Constant)">
     <dimension axis="column" text="Statistics">
      <group text="Unstandardized Coefficients">
       <category text="B">
        <cell decimals="3"  format="g" number="1928.2057573545" text="1928.206"/>
       </category>
       <category text="Std. Error">
        <cell decimals="3" number="888.67985268068" text="888.680"/>
       </category>
      </group>
      <category text="t">
       <cell decimals="3" number="2.1697417259299" text="2.170"/>
      </category>
      <category text="Sig.">
       <cell decimals="3" number="0.030524621952912" text=".031"/>
      </category>
     </dimension>
    </category>
    <category label="Beginning Salary" text="Beginning Salary" varName="salbegin" variable="true">
     <dimension axis="column" text="Statistics">
      <group text="Unstandardized Coefficients">
       <category text="B">
        <cell decimals="3"  format="g" number="1.909449729068" text="1.909"/>
       </category>
       <category text="Std. Error">
        <cell decimals="3" number="0.047409681743933" text=".047"/>
       </category>
      </group>
      <group text="Standardized Coefficients">
       <category text="Beta">
        <cell decimals="3" number="0.88011746559995" text=".880"/>
       </category>
      </group>
      <category text="t">
       <cell decimals="3" number="40.275523033063" text="40.276"/>
      </category>
      <category text="Sig.">
       <cell decimals="3" number="8.2032224019992e-155" text=".000"/>
      </category>
     </dimension>
    </category>
   </dimension>
  </category>
  </dimension>
</pivotTable>

Related Topics

Output XML Schema
Common Attributes
Elements
Pivot Table Child Elements


Output Schema Specifications

The following sections provide technical specifications of the schema. For a general overview of the schema elements and attributes, see Output XML Schema.

• category Element

• chartTitle Element

• dimension Element

• group Element

• heading Element

• outputTree Element

• pivotTable Element

• textBlock Element

• treeTitle Element


category Element

category element,category element,category element

Attributes for category
Attribute | Use | Description | Valid Values
date | optional |  | dateTime
decimals | optional |  | unsignedInt
display | optional |  | name value label both
duration | optional |  | duration
format | optional |  | a f comma dollar date adate ahex ibhex rbhex z n e time datetime jdate dtime week wkday month moyr qyr wkyr pct dot cca ccb ccc ccd cce edate sdate g
label | optional |  | string
null | optional |  | boolean
number | optional |  | double
string | optional |  | string
text | optional |  | string
time | optional |  | time
variable | optional |  | boolean
varName | optional |  | string
category diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="category">
<xs:attribute name="null" type="xs:boolean" use="optional" default="false"></xs:attribute>
<xs:attribute name="number" type="xs:double" use="optional"></xs:attribute>
<xs:attribute name="format" use="optional" default="f">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="a"></xs:enumeration>
<xs:enumeration value="f"></xs:enumeration>
<xs:enumeration value="comma"></xs:enumeration>
<xs:enumeration value="dollar"></xs:enumeration>
<xs:enumeration value="date"></xs:enumeration>
<xs:enumeration value="adate"></xs:enumeration>
<xs:enumeration value="ahex"></xs:enumeration>
<xs:enumeration value="ibhex"></xs:enumeration>
<xs:enumeration value="rbhex"></xs:enumeration>
<xs:enumeration value="z"></xs:enumeration>
<xs:enumeration value="n"></xs:enumeration>
<xs:enumeration value="e"></xs:enumeration>
<xs:enumeration value="time"></xs:enumeration>
<xs:enumeration value="datetime"></xs:enumeration>
<xs:enumeration value="jdate"></xs:enumeration>
<xs:enumeration value="dtime"></xs:enumeration>
<xs:enumeration value="week"></xs:enumeration>
<xs:enumeration value="wkday"></xs:enumeration>
<xs:enumeration value="month"></xs:enumeration>
<xs:enumeration value="moyr"></xs:enumeration>
<xs:enumeration value="qyr"></xs:enumeration>
<xs:enumeration value="wkyr"></xs:enumeration>
<xs:enumeration value="pct"></xs:enumeration>
<xs:enumeration value="dot"></xs:enumeration>
<xs:enumeration value="cca"></xs:enumeration>
<xs:enumeration value="ccb"></xs:enumeration>
<xs:enumeration value="ccc"></xs:enumeration>
<xs:enumeration value="ccd"></xs:enumeration>
<xs:enumeration value="cce"></xs:enumeration>
<xs:enumeration value="edate"></xs:enumeration>
<xs:enumeration value="sdate"></xs:enumeration>
<xs:enumeration value="g"></xs:enumeration>
<xs:enumeration value=""></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="decimals" type="xs:unsignedInt" use="optional" default="0"></xs:attribute>
<xs:attribute name="variable" type="xs:boolean" use="optional" default="false"></xs:attribute>
<xs:attribute name="label" type="xs:string" use="optional"></xs:attribute>
<xs:attribute name="varName" type="xs:string" use="optional"></xs:attribute>
<xs:attribute name="text" type="xs:string"></xs:attribute>
<xs:attribute name="display" use="optional">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="name"></xs:enumeration>
<xs:enumeration value="value"></xs:enumeration>
<xs:enumeration value="label"></xs:enumeration>
<xs:enumeration value="both"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="time" type="xs:time" use="optional"></xs:attribute>
<xs:attribute name="date" type="xs:dateTime" use="optional"></xs:attribute>
<xs:attribute name="duration" type="xs:duration" use="optional"></xs:attribute>
<xs:attribute name="string" type="xs:string" use="optional"></xs:attribute>
<xs:sequence>
<xs:element name="footnote" minOccurs="0" maxOccurs="unbounded">
<xs:sequence>
<xs:element name="marker" type="TextType" minOccurs="0"></xs:element>
<xs:element name="note" type="TextType"></xs:element>
</xs:sequence>
</xs:element>
</xs:sequence>
<xs:choice>
<xs:element ref="dimension"></xs:element>
<xs:element name="cell" type="NodeType">
<xs:sequence>
<xs:element name="footnote" minOccurs="0" maxOccurs="unbounded">
<xs:sequence>
<xs:element name="marker" type="TextType" minOccurs="0"></xs:element>
<xs:element name="note" type="TextType"></xs:element>
</xs:sequence>
</xs:element>
</xs:sequence>
</xs:element>
</xs:choice>
</xs:element>

Parent Elements

dimension Element, group Element

Child Elements

cell Element, dimension Element, footnote Element

Related Elements

dimension Element, group Element, pivotTable Element


footnote Element

footnote element,footnote element,footnote element

Attributes for footnote
Attribute | Use | Description | Valid Values
date | optional |  | dateTime
decimals | optional |  | unsignedInt
display | optional |  | name value label both
duration | optional |  | duration
format | optional |  | a f comma dollar date adate ahex ibhex rbhex z n e time datetime jdate dtime week wkday month moyr qyr wkyr pct dot cca ccb ccc ccd cce edate sdate g
label | optional |  | string
null | optional |  | boolean
number | optional |  | double
string | optional |  | string
text | optional |  | string
time | optional |  | time
variable | optional |  | boolean
varName | optional |  | string
footnote diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="footnote" minOccurs="0" maxOccurs="unbounded">
<xs:attribute name="null" type="xs:boolean" use="optional" default="false"></xs:attribute>
<xs:attribute name="number" type="xs:double" use="optional"></xs:attribute>
<xs:attribute name="format" use="optional" default="f">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="a"></xs:enumeration>
<xs:enumeration value="f"></xs:enumeration>
<xs:enumeration value="comma"></xs:enumeration>
<xs:enumeration value="dollar"></xs:enumeration>
<xs:enumeration value="date"></xs:enumeration>
<xs:enumeration value="adate"></xs:enumeration>
<xs:enumeration value="ahex"></xs:enumeration>
<xs:enumeration value="ibhex"></xs:enumeration>
<xs:enumeration value="rbhex"></xs:enumeration>
<xs:enumeration value="z"></xs:enumeration>
<xs:enumeration value="n"></xs:enumeration>
<xs:enumeration value="e"></xs:enumeration>
<xs:enumeration value="time"></xs:enumeration>
<xs:enumeration value="datetime"></xs:enumeration>
<xs:enumeration value="jdate"></xs:enumeration>
<xs:enumeration value="dtime"></xs:enumeration>
<xs:enumeration value="week"></xs:enumeration>
<xs:enumeration value="wkday"></xs:enumeration>
<xs:enumeration value="month"></xs:enumeration>
<xs:enumeration value="moyr"></xs:enumeration>
<xs:enumeration value="qyr"></xs:enumeration>
<xs:enumeration value="wkyr"></xs:enumeration>
<xs:enumeration value="pct"></xs:enumeration>
<xs:enumeration value="dot"></xs:enumeration>
<xs:enumeration value="cca"></xs:enumeration>
<xs:enumeration value="ccb"></xs:enumeration>
<xs:enumeration value="ccc"></xs:enumeration>
<xs:enumeration value="ccd"></xs:enumeration>
<xs:enumeration value="cce"></xs:enumeration>
<xs:enumeration value="edate"></xs:enumeration>
<xs:enumeration value="sdate"></xs:enumeration>
<xs:enumeration value="g"></xs:enumeration>
<xs:enumeration value=""></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="decimals" type="xs:unsignedInt" use="optional" default="0"></xs:attribute>
<xs:attribute name="variable" type="xs:boolean" use="optional" default="false"></xs:attribute>
<xs:attribute name="label" type="xs:string" use="optional"></xs:attribute>
<xs:attribute name="varName" type="xs:string" use="optional"></xs:attribute>
<xs:attribute name="text" type="xs:string"></xs:attribute>
<xs:attribute name="display" use="optional">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="name"></xs:enumeration>
<xs:enumeration value="value"></xs:enumeration>
<xs:enumeration value="label"></xs:enumeration>
<xs:enumeration value="both"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="time" type="xs:time" use="optional"></xs:attribute>
<xs:attribute name="date" type="xs:dateTime" use="optional"></xs:attribute>
<xs:attribute name="duration" type="xs:duration" use="optional"></xs:attribute>
<xs:attribute name="string" type="xs:string" use="optional"></xs:attribute>
<xs:sequence>
<xs:element name="marker" type="TextType" minOccurs="0"></xs:element>
<xs:element name="note" type="TextType"></xs:element>
</xs:sequence>
</xs:element>

Parent Elements

category Element

Child Elements

marker Element, note Element

Related Elements

cell Element, footnote Element, chartTitle Element, footnote Element, footnote Element, heading Element, modelTitle Element, command Element, footnote Element, textBlock Element, treeTitle Element


marker Element

marker element,marker element,marker element

Attributes for marker
Attribute | Use | Description | Valid Values
date | optional |  | dateTime
decimals | optional |  | unsignedInt
display | optional |  | name value label both
duration | optional |  | duration
format | optional |  | a f comma dollar date adate ahex ibhex rbhex z n e time datetime jdate dtime week wkday month moyr qyr wkyr pct dot cca ccb ccc ccd cce edate sdate g
label | optional |  | string
null | optional |  | boolean
number | optional |  | double
string | optional |  | string
text | optional |  | string
time | optional |  | time
variable | optional |  | boolean
varName | optional |  | string
marker diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="marker" type="TextType" minOccurs="0">
<xs:attribute name="null" type="xs:boolean" use="optional" default="false"></xs:attribute>
<xs:attribute name="number" type="xs:double" use="optional"></xs:attribute>
<xs:attribute name="format" use="optional" default="f">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="a"></xs:enumeration>
<xs:enumeration value="f"></xs:enumeration>
<xs:enumeration value="comma"></xs:enumeration>
<xs:enumeration value="dollar"></xs:enumeration>
<xs:enumeration value="date"></xs:enumeration>
<xs:enumeration value="adate"></xs:enumeration>
<xs:enumeration value="ahex"></xs:enumeration>
<xs:enumeration value="ibhex"></xs:enumeration>
<xs:enumeration value="rbhex"></xs:enumeration>
<xs:enumeration value="z"></xs:enumeration>
<xs:enumeration value="n"></xs:enumeration>
<xs:enumeration value="e"></xs:enumeration>
<xs:enumeration value="time"></xs:enumeration>
<xs:enumeration value="datetime"></xs:enumeration>
<xs:enumeration value="jdate"></xs:enumeration>
<xs:enumeration value="dtime"></xs:enumeration>
<xs:enumeration value="week"></xs:enumeration>
<xs:enumeration value="wkday"></xs:enumeration>
<xs:enumeration value="month"></xs:enumeration>
<xs:enumeration value="moyr"></xs:enumeration>
<xs:enumeration value="qyr"></xs:enumeration>
<xs:enumeration value="wkyr"></xs:enumeration>
<xs:enumeration value="pct"></xs:enumeration>
<xs:enumeration value="dot"></xs:enumeration>
<xs:enumeration value="cca"></xs:enumeration>
<xs:enumeration value="ccb"></xs:enumeration>
<xs:enumeration value="ccc"></xs:enumeration>
<xs:enumeration value="ccd"></xs:enumeration>
<xs:enumeration value="cce"></xs:enumeration>
<xs:enumeration value="edate"></xs:enumeration>
<xs:enumeration value="sdate"></xs:enumeration>
<xs:enumeration value="g"></xs:enumeration>
<xs:enumeration value=""></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="decimals" type="xs:unsignedInt" use="optional" default="0"></xs:attribute>
<xs:attribute name="variable" type="xs:boolean" use="optional" default="false"></xs:attribute>
<xs:attribute name="label" type="xs:string" use="optional"></xs:attribute>
<xs:attribute name="varName" type="xs:string" use="optional"></xs:attribute>
<xs:attribute name="text" type="xs:string"></xs:attribute>
<xs:attribute name="display" use="optional">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="name"></xs:enumeration>
<xs:enumeration value="value"></xs:enumeration>
<xs:enumeration value="label"></xs:enumeration>
<xs:enumeration value="both"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="time" type="xs:time" use="optional"></xs:attribute>
<xs:attribute name="date" type="xs:dateTime" use="optional"></xs:attribute>
<xs:attribute name="duration" type="xs:duration" use="optional"></xs:attribute>
<xs:attribute name="string" type="xs:string" use="optional"></xs:attribute>
</xs:element>

Parent Elements

footnote Element


note Element

note element,note element,note element

Attributes for note
Attribute | Use | Description | Valid Values
date | optional |  | dateTime
decimals | optional |  | unsignedInt
display | optional |  | name value label both
duration | optional |  | duration
format | optional |  | a f comma dollar date adate ahex ibhex rbhex z n e time datetime jdate dtime week wkday month moyr qyr wkyr pct dot cca ccb ccc ccd cce edate sdate g
label | optional |  | string
null | optional |  | boolean
number | optional |  | double
string | optional |  | string
text | optional |  | string
time | optional |  | time
variable | optional |  | boolean
varName | optional |  | string
note diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="note" type="TextType">
<xs:attribute name="null" type="xs:boolean" use="optional" default="false"></xs:attribute>
<xs:attribute name="number" type="xs:double" use="optional"></xs:attribute>
<xs:attribute name="format" use="optional" default="f">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="a"></xs:enumeration>
<xs:enumeration value="f"></xs:enumeration>
<xs:enumeration value="comma"></xs:enumeration>
<xs:enumeration value="dollar"></xs:enumeration>
<xs:enumeration value="date"></xs:enumeration>
<xs:enumeration value="adate"></xs:enumeration>
<xs:enumeration value="ahex"></xs:enumeration>
<xs:enumeration value="ibhex"></xs:enumeration>
<xs:enumeration value="rbhex"></xs:enumeration>
<xs:enumeration value="z"></xs:enumeration>
<xs:enumeration value="n"></xs:enumeration>
<xs:enumeration value="e"></xs:enumeration>
<xs:enumeration value="time"></xs:enumeration>
<xs:enumeration value="datetime"></xs:enumeration>
<xs:enumeration value="jdate"></xs:enumeration>
<xs:enumeration value="dtime"></xs:enumeration>
<xs:enumeration value="week"></xs:enumeration>
<xs:enumeration value="wkday"></xs:enumeration>
<xs:enumeration value="month"></xs:enumeration>
<xs:enumeration value="moyr"></xs:enumeration>
<xs:enumeration value="qyr"></xs:enumeration>
<xs:enumeration value="wkyr"></xs:enumeration>
<xs:enumeration value="pct"></xs:enumeration>
<xs:enumeration value="dot"></xs:enumeration>
<xs:enumeration value="cca"></xs:enumeration>
<xs:enumeration value="ccb"></xs:enumeration>
<xs:enumeration value="ccc"></xs:enumeration>
<xs:enumeration value="ccd"></xs:enumeration>
<xs:enumeration value="cce"></xs:enumeration>
<xs:enumeration value="edate"></xs:enumeration>
<xs:enumeration value="sdate"></xs:enumeration>
<xs:enumeration value="g"></xs:enumeration>
<xs:enumeration value=""></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="decimals" type="xs:unsignedInt" use="optional" default="0"></xs:attribute>
<xs:attribute name="variable" type="xs:boolean" use="optional" default="false"></xs:attribute>
<xs:attribute name="label" type="xs:string" use="optional"></xs:attribute>
<xs:attribute name="varName" type="xs:string" use="optional"></xs:attribute>
<xs:attribute name="text" type="xs:string"></xs:attribute>
<xs:attribute name="display" use="optional">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="name"></xs:enumeration>
<xs:enumeration value="value"></xs:enumeration>
<xs:enumeration value="label"></xs:enumeration>
<xs:enumeration value="both"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="time" type="xs:time" use="optional"></xs:attribute>
<xs:attribute name="date" type="xs:dateTime" use="optional"></xs:attribute>
<xs:attribute name="duration" type="xs:duration" use="optional"></xs:attribute>
<xs:attribute name="string" type="xs:string" use="optional"></xs:attribute>
</xs:element>

Parent Elements

footnote Element


cell Element

cell element,cell element,cell element

Attributes for cell
Attribute | Use | Description | Valid Values
date | optional |  | dateTime
decimals | optional |  | unsignedInt
display | optional |  | name value label both
duration | optional |  | duration
format | optional |  | a f comma dollar date adate ahex ibhex rbhex z n e time datetime jdate dtime week wkday month moyr qyr wkyr pct dot cca ccb ccc ccd cce edate sdate g
label | optional |  | string
null | optional |  | boolean
number | optional |  | double
string | optional |  | string
text | optional |  | string
time | optional |  | time
variable | optional |  | boolean
varName | optional |  | string
cell diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="cell" type="NodeType">
<xs:attribute name="null" type="xs:boolean" use="optional" default="false"></xs:attribute>
<xs:attribute name="number" type="xs:double" use="optional"></xs:attribute>
<xs:attribute name="format" use="optional" default="f">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="a"></xs:enumeration>
<xs:enumeration value="f"></xs:enumeration>
<xs:enumeration value="comma"></xs:enumeration>
<xs:enumeration value="dollar"></xs:enumeration>
<xs:enumeration value="date"></xs:enumeration>
<xs:enumeration value="adate"></xs:enumeration>
<xs:enumeration value="ahex"></xs:enumeration>
<xs:enumeration value="ibhex"></xs:enumeration>
<xs:enumeration value="rbhex"></xs:enumeration>
<xs:enumeration value="z"></xs:enumeration>
<xs:enumeration value="n"></xs:enumeration>
<xs:enumeration value="e"></xs:enumeration>
<xs:enumeration value="time"></xs:enumeration>
<xs:enumeration value="datetime"></xs:enumeration>
<xs:enumeration value="jdate"></xs:enumeration>
<xs:enumeration value="dtime"></xs:enumeration>
<xs:enumeration value="week"></xs:enumeration>
<xs:enumeration value="wkday"></xs:enumeration>
<xs:enumeration value="month"></xs:enumeration>
<xs:enumeration value="moyr"></xs:enumeration>
<xs:enumeration value="qyr"></xs:enumeration>
<xs:enumeration value="wkyr"></xs:enumeration>
<xs:enumeration value="pct"></xs:enumeration>
<xs:enumeration value="dot"></xs:enumeration>
<xs:enumeration value="cca"></xs:enumeration>
<xs:enumeration value="ccb"></xs:enumeration>
<xs:enumeration value="ccc"></xs:enumeration>
<xs:enumeration value="ccd"></xs:enumeration>
<xs:enumeration value="cce"></xs:enumeration>
<xs:enumeration value="edate"></xs:enumeration>
<xs:enumeration value="sdate"></xs:enumeration>
<xs:enumeration value="g"></xs:enumeration>
<xs:enumeration value=""></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="decimals" type="xs:unsignedInt" use="optional" default="0"></xs:attribute>
<xs:attribute name="variable" type="xs:boolean" use="optional" default="false"></xs:attribute>
<xs:attribute name="label" type="xs:string" use="optional"></xs:attribute>
<xs:attribute name="varName" type="xs:string" use="optional"></xs:attribute>
<xs:attribute name="text" type="xs:string"></xs:attribute>
<xs:attribute name="display" use="optional">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="name"></xs:enumeration>
<xs:enumeration value="value"></xs:enumeration>
<xs:enumeration value="label"></xs:enumeration>
<xs:enumeration value="both"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="time" type="xs:time" use="optional"></xs:attribute>
<xs:attribute name="date" type="xs:dateTime" use="optional"></xs:attribute>
<xs:attribute name="duration" type="xs:duration" use="optional"></xs:attribute>
<xs:attribute name="string" type="xs:string" use="optional"></xs:attribute>
<xs:sequence>
<xs:element name="footnote" minOccurs="0" maxOccurs="unbounded">
<xs:sequence>
<xs:element name="marker" type="TextType" minOccurs="0"></xs:element>
<xs:element name="note" type="TextType"></xs:element>
</xs:sequence>
</xs:element>
</xs:sequence>
</xs:element>

Parent Elements

category Element

Child Elements

footnote Element

Related Elements

footnote Element, footnote Element, chartTitle Element, footnote Element, footnote Element, heading Element, modelTitle Element, command Element, footnote Element, textBlock Element, treeTitle Element


footnote Element

footnote element,footnote element,footnote element

Attributes for footnote
Attribute | Use | Description | Valid Values
date | optional |  | dateTime
decimals | optional |  | unsignedInt
display | optional |  | name value label both
duration | optional |  | duration
format | optional |  | a f comma dollar date adate ahex ibhex rbhex z n e time datetime jdate dtime week wkday month moyr qyr wkyr pct dot cca ccb ccc ccd cce edate sdate g
label | optional |  | string
null | optional |  | boolean
number | optional |  | double
string | optional |  | string
text | optional |  | string
time | optional |  | time
variable | optional |  | boolean
varName | optional |  | string
footnote diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="footnote" minOccurs="0" maxOccurs="unbounded">
<xs:attribute name="null" type="xs:boolean" use="optional" default="false"></xs:attribute>
<xs:attribute name="number" type="xs:double" use="optional"></xs:attribute>
<xs:attribute name="format" use="optional" default="f">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="a"></xs:enumeration>
<xs:enumeration value="f"></xs:enumeration>
<xs:enumeration value="comma"></xs:enumeration>
<xs:enumeration value="dollar"></xs:enumeration>
<xs:enumeration value="date"></xs:enumeration>
<xs:enumeration value="adate"></xs:enumeration>
<xs:enumeration value="ahex"></xs:enumeration>
<xs:enumeration value="ibhex"></xs:enumeration>
<xs:enumeration value="rbhex"></xs:enumeration>
<xs:enumeration value="z"></xs:enumeration>
<xs:enumeration value="n"></xs:enumeration>
<xs:enumeration value="e"></xs:enumeration>
<xs:enumeration value="time"></xs:enumeration>
<xs:enumeration value="datetime"></xs:enumeration>
<xs:enumeration value="jdate"></xs:enumeration>
<xs:enumeration value="dtime"></xs:enumeration>
<xs:enumeration value="week"></xs:enumeration>
<xs:enumeration value="wkday"></xs:enumeration>
<xs:enumeration value="month"></xs:enumeration>
<xs:enumeration value="moyr"></xs:enumeration>
<xs:enumeration value="qyr"></xs:enumeration>
<xs:enumeration value="wkyr"></xs:enumeration>
<xs:enumeration value="pct"></xs:enumeration>
<xs:enumeration value="dot"></xs:enumeration>
<xs:enumeration value="cca"></xs:enumeration>
<xs:enumeration value="ccb"></xs:enumeration>
<xs:enumeration value="ccc"></xs:enumeration>
<xs:enumeration value="ccd"></xs:enumeration>
<xs:enumeration value="cce"></xs:enumeration>
<xs:enumeration value="edate"></xs:enumeration>
<xs:enumeration value="sdate"></xs:enumeration>
<xs:enumeration value="g"></xs:enumeration>
<xs:enumeration value=""></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="decimals" type="xs:unsignedInt" use="optional" default="0"></xs:attribute>
<xs:attribute name="variable" type="xs:boolean" use="optional" default="false"></xs:attribute>
<xs:attribute name="label" type="xs:string" use="optional"></xs:attribute>
<xs:attribute name="varName" type="xs:string" use="optional"></xs:attribute>
<xs:attribute name="text" type="xs:string"></xs:attribute>
<xs:attribute name="display" use="optional">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="name"></xs:enumeration>
<xs:enumeration value="value"></xs:enumeration>
<xs:enumeration value="label"></xs:enumeration>
<xs:enumeration value="both"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="time" type="xs:time" use="optional"></xs:attribute>
<xs:attribute name="date" type="xs:dateTime" use="optional"></xs:attribute>
<xs:attribute name="duration" type="xs:duration" use="optional"></xs:attribute>
<xs:attribute name="string" type="xs:string" use="optional"></xs:attribute>
<xs:sequence>
<xs:element name="marker" type="TextType" minOccurs="0"></xs:element>
<xs:element name="note" type="TextType"></xs:element>
</xs:sequence>
</xs:element>

Parent Elements

cell Element

Child Elements

marker Element, note Element

Related Elements

footnote Element, cell Element, chartTitle Element, footnote Element, footnote Element, heading Element, modelTitle Element, command Element, footnote Element, textBlock Element, treeTitle Element


chartTitle Element

chartTitle element,chartTitle element,chartTitle element

The chartTitle element contains a chart in the output. Its attributes describe the chart's title. Its chart element specifies the chart, including data, structure and styling.

Attributes for chartTitle
Attribute | Use | Description | Valid Values
date | optional |  | dateTime
decimals | optional |  | unsignedInt
display | optional |  | name value label both
duration | optional |  | duration
format | optional |  | a f comma dollar date adate ahex ibhex rbhex z n e time datetime jdate dtime week wkday month moyr qyr wkyr pct dot cca ccb ccc ccd cce edate sdate g
label | optional |  | string
null | optional |  | boolean
number | optional |  | double
string | optional |  | string
text | optional |  | string
time | optional |  | time
variable | optional |  | boolean
varName | optional |  | string
chartTitle diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="chartTitle">
<xs:attribute name="null" type="xs:boolean" use="optional" default="false"></xs:attribute>
<xs:attribute name="number" type="xs:double" use="optional"></xs:attribute>
<xs:attribute name="format" use="optional" default="f">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="a"></xs:enumeration>
<xs:enumeration value="f"></xs:enumeration>
<xs:enumeration value="comma"></xs:enumeration>
<xs:enumeration value="dollar"></xs:enumeration>
<xs:enumeration value="date"></xs:enumeration>
<xs:enumeration value="adate"></xs:enumeration>
<xs:enumeration value="ahex"></xs:enumeration>
<xs:enumeration value="ibhex"></xs:enumeration>
<xs:enumeration value="rbhex"></xs:enumeration>
<xs:enumeration value="z"></xs:enumeration>
<xs:enumeration value="n"></xs:enumeration>
<xs:enumeration value="e"></xs:enumeration>
<xs:enumeration value="time"></xs:enumeration>
<xs:enumeration value="datetime"></xs:enumeration>
<xs:enumeration value="jdate"></xs:enumeration>
<xs:enumeration value="dtime"></xs:enumeration>
<xs:enumeration value="week"></xs:enumeration>
<xs:enumeration value="wkday"></xs:enumeration>
<xs:enumeration value="month"></xs:enumeration>
<xs:enumeration value="moyr"></xs:enumeration>
<xs:enumeration value="qyr"></xs:enumeration>
<xs:enumeration value="wkyr"></xs:enumeration>
<xs:enumeration value="pct"></xs:enumeration>
<xs:enumeration value="dot"></xs:enumeration>
<xs:enumeration value="cca"></xs:enumeration>
<xs:enumeration value="ccb"></xs:enumeration>
<xs:enumeration value="ccc"></xs:enumeration>
<xs:enumeration value="ccd"></xs:enumeration>
<xs:enumeration value="cce"></xs:enumeration>
<xs:enumeration value="edate"></xs:enumeration>
<xs:enumeration value="sdate"></xs:enumeration>
<xs:enumeration value="g"></xs:enumeration>
<xs:enumeration value=""></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="decimals" type="xs:unsignedInt" use="optional" default="0"></xs:attribute>
<xs:attribute name="variable" type="xs:boolean" use="optional" default="false"></xs:attribute>
<xs:attribute name="label" type="xs:string" use="optional"></xs:attribute>
<xs:attribute name="varName" type="xs:string" use="optional"></xs:attribute>
<xs:attribute name="text" type="xs:string"></xs:attribute>
<xs:attribute name="display" use="optional">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="name"></xs:enumeration>
<xs:enumeration value="value"></xs:enumeration>
<xs:enumeration value="label"></xs:enumeration>
<xs:enumeration value="both"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="time" type="xs:time" use="optional"></xs:attribute>
<xs:attribute name="date" type="xs:dateTime" use="optional"></xs:attribute>
<xs:attribute name="duration" type="xs:duration" use="optional"></xs:attribute>
<xs:attribute name="string" type="xs:string" use="optional"></xs:attribute>
<xs:sequence>
<xs:element name="chart">
<xs:sequence></xs:sequence>
</xs:element>
</xs:sequence>
</xs:element>

Parent Elements

heading Element, command Element

Child Elements

chart Element

Related Elements

footnote Element, cell Element, footnote Element, footnote Element, footnote Element, heading Element, modelTitle Element, command Element, footnote Element, textBlock Element, treeTitle Element


chart Element

chart element,chart element,chart element

Attributes for chart
Attribute | Use | Description | Valid Values
imageFile | optional | File path to image file representing this chart. | string
chart diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="chart">
<xs:sequence></xs:sequence>
<xs:attribute name="imageFile" type="xs:string" use="optional"></xs:attribute>
</xs:element>

Parent Elements

chartTitle Element


dimension Element

dimension element,dimension element,dimension element

Attributes for dimension
Attribute | Use | Description | Valid Values
axis | required |  | row column layer
date | optional |  | dateTime
decimals | optional |  | unsignedInt
display | optional |  | name value label both
displayLastCategory | optional |  | boolean
duration | optional |  | duration
format | optional |  | a f comma dollar date adate ahex ibhex rbhex z n e time datetime jdate dtime week wkday month moyr qyr wkyr pct dot cca ccb ccc ccd cce edate sdate g
hideCategories | optional |  | boolean
label | optional |  | string
null | optional |  | boolean
number | optional |  | double
string | optional |  | string
text | optional |  | string
time | optional |  | time
variable | optional |  | boolean
varName | optional |  | string
dimension diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="dimension">
<xs:attribute name="null" type="xs:boolean" use="optional" default="false"></xs:attribute>
<xs:attribute name="number" type="xs:double" use="optional"></xs:attribute>
<xs:attribute name="format" use="optional" default="f">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="a"></xs:enumeration>
<xs:enumeration value="f"></xs:enumeration>
<xs:enumeration value="comma"></xs:enumeration>
<xs:enumeration value="dollar"></xs:enumeration>
<xs:enumeration value="date"></xs:enumeration>
<xs:enumeration value="adate"></xs:enumeration>
<xs:enumeration value="ahex"></xs:enumeration>
<xs:enumeration value="ibhex"></xs:enumeration>
<xs:enumeration value="rbhex"></xs:enumeration>
<xs:enumeration value="z"></xs:enumeration>
<xs:enumeration value="n"></xs:enumeration>
<xs:enumeration value="e"></xs:enumeration>
<xs:enumeration value="time"></xs:enumeration>
<xs:enumeration value="datetime"></xs:enumeration>
<xs:enumeration value="jdate"></xs:enumeration>
<xs:enumeration value="dtime"></xs:enumeration>
<xs:enumeration value="week"></xs:enumeration>
<xs:enumeration value="wkday"></xs:enumeration>
<xs:enumeration value="month"></xs:enumeration>
<xs:enumeration value="moyr"></xs:enumeration>
<xs:enumeration value="qyr"></xs:enumeration>
<xs:enumeration value="wkyr"></xs:enumeration>
<xs:enumeration value="pct"></xs:enumeration>
<xs:enumeration value="dot"></xs:enumeration>
<xs:enumeration value="cca"></xs:enumeration>
<xs:enumeration value="ccb"></xs:enumeration>
<xs:enumeration value="ccc"></xs:enumeration>
<xs:enumeration value="ccd"></xs:enumeration>
<xs:enumeration value="cce"></xs:enumeration>
<xs:enumeration value="edate"></xs:enumeration>
<xs:enumeration value="sdate"></xs:enumeration>
<xs:enumeration value="g"></xs:enumeration>
<xs:enumeration value=""></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="decimals" type="xs:unsignedInt" use="optional" default="0"></xs:attribute>
<xs:attribute name="variable" type="xs:boolean" use="optional" default="false"></xs:attribute>
<xs:attribute name="label" type="xs:string" use="optional"></xs:attribute>
<xs:attribute name="varName" type="xs:string" use="optional"></xs:attribute>
<xs:attribute name="text" type="xs:string"></xs:attribute>
<xs:attribute name="display" use="optional">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="name"></xs:enumeration>
<xs:enumeration value="value"></xs:enumeration>
<xs:enumeration value="label"></xs:enumeration>
<xs:enumeration value="both"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="time" type="xs:time" use="optional"></xs:attribute>
<xs:attribute name="date" type="xs:dateTime" use="optional"></xs:attribute>
<xs:attribute name="duration" type="xs:duration" use="optional"></xs:attribute>
<xs:attribute name="string" type="xs:string" use="optional"></xs:attribute>
<xs:sequence>
<xs:element name="footnote" minOccurs="0" maxOccurs="unbounded">
<xs:sequence>
<xs:element name="marker" type="TextType" minOccurs="0"></xs:element>
<xs:element name="note" type="TextType"></xs:element>
</xs:sequence>
</xs:element>
</xs:sequence>
<xs:choice maxOccurs="unbounded">
<xs:element ref="group"></xs:element>
<xs:element ref="category"></xs:element>
</xs:choice>
<xs:attribute name="hideCategories" type="xs:boolean" use="optional" default="false"></xs:attribute>
<xs:attribute name="displayLastCategory" type="xs:boolean" use="optional" default="false"></xs:attribute>
<xs:attribute name="axis" use="required">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="row"></xs:enumeration>
<xs:enumeration value="column"></xs:enumeration>
<xs:enumeration value="layer"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:element>

Parent Elements

category Element, pivotTable Element

Child Elements

category Element, footnote Element, group Element

Related Elements

category Element, group Element, pivotTable Element


footnote Element

footnote element,footnote element,footnote element

Attributes for footnote
Attribute | Use | Description | Valid Values
date | optional |  | dateTime
decimals | optional |  | unsignedInt
display | optional |  | name value label both
duration | optional |  | duration
format | optional |  | a f comma dollar date adate ahex ibhex rbhex z n e time datetime jdate dtime week wkday month moyr qyr wkyr pct dot cca ccb ccc ccd cce edate sdate g
label | optional |  | string
null | optional |  | boolean
number | optional |  | double
string | optional |  | string
text | optional |  | string
time | optional |  | time
variable | optional |  | boolean
varName | optional |  | string
footnote diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="footnote" minOccurs="0" maxOccurs="unbounded">
<xs:attribute name="null" type="xs:boolean" use="optional" default="false"></xs:attribute>
<xs:attribute name="number" type="xs:double" use="optional"></xs:attribute>
<xs:attribute name="format" use="optional" default="f">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="a"></xs:enumeration>
<xs:enumeration value="f"></xs:enumeration>
<xs:enumeration value="comma"></xs:enumeration>
<xs:enumeration value="dollar"></xs:enumeration>
<xs:enumeration value="date"></xs:enumeration>
<xs:enumeration value="adate"></xs:enumeration>
<xs:enumeration value="ahex"></xs:enumeration>
<xs:enumeration value="ibhex"></xs:enumeration>
<xs:enumeration value="rbhex"></xs:enumeration>
<xs:enumeration value="z"></xs:enumeration>
<xs:enumeration value="n"></xs:enumeration>
<xs:enumeration value="e"></xs:enumeration>
<xs:enumeration value="time"></xs:enumeration>
<xs:enumeration value="datetime"></xs:enumeration>
<xs:enumeration value="jdate"></xs:enumeration>
<xs:enumeration value="dtime"></xs:enumeration>
<xs:enumeration value="week"></xs:enumeration>
<xs:enumeration value="wkday"></xs:enumeration>
<xs:enumeration value="month"></xs:enumeration>
<xs:enumeration value="moyr"></xs:enumeration>
<xs:enumeration value="qyr"></xs:enumeration>
<xs:enumeration value="wkyr"></xs:enumeration>
<xs:enumeration value="pct"></xs:enumeration>
<xs:enumeration value="dot"></xs:enumeration>
<xs:enumeration value="cca"></xs:enumeration>
<xs:enumeration value="ccb"></xs:enumeration>
<xs:enumeration value="ccc"></xs:enumeration>
<xs:enumeration value="ccd"></xs:enumeration>
<xs:enumeration value="cce"></xs:enumeration>
<xs:enumeration value="edate"></xs:enumeration>
<xs:enumeration value="sdate"></xs:enumeration>
<xs:enumeration value="g"></xs:enumeration>
<xs:enumeration value=""></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="decimals" type="xs:unsignedInt" use="optional" default="0"></xs:attribute>
<xs:attribute name="variable" type="xs:boolean" use="optional" default="false"></xs:attribute>
<xs:attribute name="label" type="xs:string" use="optional"></xs:attribute>
<xs:attribute name="varName" type="xs:string" use="optional"></xs:attribute>
<xs:attribute name="text" type="xs:string"></xs:attribute>
<xs:attribute name="display" use="optional">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="name"></xs:enumeration>
<xs:enumeration value="value"></xs:enumeration>
<xs:enumeration value="label"></xs:enumeration>
<xs:enumeration value="both"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="time" type="xs:time" use="optional"></xs:attribute>
<xs:attribute name="date" type="xs:dateTime" use="optional"></xs:attribute>
<xs:attribute name="duration" type="xs:duration" use="optional"></xs:attribute>
<xs:attribute name="string" type="xs:string" use="optional"></xs:attribute>
<xs:sequence>
<xs:element name="marker" type="TextType" minOccurs="0"></xs:element>
<xs:element name="note" type="TextType"></xs:element>
</xs:sequence>
</xs:element>

Parent Elements

dimension Element

Child Elements

marker Element, note Element

Related Elements

footnote Element, cell Element, footnote Element, chartTitle Element, footnote Element, heading Element, modelTitle Element, command Element, footnote Element, textBlock Element, treeTitle Element


group Element

group element,group element,group element

Attributes for group
Attribute | Use | Description | Valid Values
date | optional |  | dateTime
decimals | optional |  | unsignedInt
display | optional |  | name value label both
duration | optional |  | duration
format | optional |  | a f comma dollar date adate ahex ibhex rbhex z n e time datetime jdate dtime week wkday month moyr qyr wkyr pct dot cca ccb ccc ccd cce edate sdate g
hide | optional |  | any
label | optional |  | string
null | optional |  | boolean
number | optional |  | double
string | optional |  | string
text | optional |  | string
time | optional |  | time
variable | optional |  | boolean
varName | optional |  | string
group diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="group">
<xs:attribute name="null" type="xs:boolean" use="optional" default="false"></xs:attribute>
<xs:attribute name="number" type="xs:double" use="optional"></xs:attribute>
<xs:attribute name="format" use="optional" default="f">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="a"></xs:enumeration>
<xs:enumeration value="f"></xs:enumeration>
<xs:enumeration value="comma"></xs:enumeration>
<xs:enumeration value="dollar"></xs:enumeration>
<xs:enumeration value="date"></xs:enumeration>
<xs:enumeration value="adate"></xs:enumeration>
<xs:enumeration value="ahex"></xs:enumeration>
<xs:enumeration value="ibhex"></xs:enumeration>
<xs:enumeration value="rbhex"></xs:enumeration>
<xs:enumeration value="z"></xs:enumeration>
<xs:enumeration value="n"></xs:enumeration>
<xs:enumeration value="e"></xs:enumeration>
<xs:enumeration value="time"></xs:enumeration>
<xs:enumeration value="datetime"></xs:enumeration>
<xs:enumeration value="jdate"></xs:enumeration>
<xs:enumeration value="dtime"></xs:enumeration>
<xs:enumeration value="week"></xs:enumeration>
<xs:enumeration value="wkday"></xs:enumeration>
<xs:enumeration value="month"></xs:enumeration>
<xs:enumeration value="moyr"></xs:enumeration>
<xs:enumeration value="qyr"></xs:enumeration>
<xs:enumeration value="wkyr"></xs:enumeration>
<xs:enumeration value="pct"></xs:enumeration>
<xs:enumeration value="dot"></xs:enumeration>
<xs:enumeration value="cca"></xs:enumeration>
<xs:enumeration value="ccb"></xs:enumeration>
<xs:enumeration value="ccc"></xs:enumeration>
<xs:enumeration value="ccd"></xs:enumeration>
<xs:enumeration value="cce"></xs:enumeration>
<xs:enumeration value="edate"></xs:enumeration>
<xs:enumeration value="sdate"></xs:enumeration>
<xs:enumeration value="g"></xs:enumeration>
<xs:enumeration value=""></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="decimals" type="xs:unsignedInt" use="optional" default="0"></xs:attribute>
<xs:attribute name="variable" type="xs:boolean" use="optional" default="false"></xs:attribute>
<xs:attribute name="label" type="xs:string" use="optional"></xs:attribute>
<xs:attribute name="varName" type="xs:string" use="optional"></xs:attribute>
<xs:attribute name="text" type="xs:string"></xs:attribute>
<xs:attribute name="display" use="optional">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="name"></xs:enumeration>
<xs:enumeration value="value"></xs:enumeration>
<xs:enumeration value="label"></xs:enumeration>
<xs:enumeration value="both"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="time" type="xs:time" use="optional"></xs:attribute>
<xs:attribute name="date" type="xs:dateTime" use="optional"></xs:attribute>
<xs:attribute name="duration" type="xs:duration" use="optional"></xs:attribute>
<xs:attribute name="string" type="xs:string" use="optional"></xs:attribute>
<xs:sequence>
<xs:element name="footnote" minOccurs="0" maxOccurs="unbounded">
<xs:sequence>
<xs:element name="marker" type="TextType" minOccurs="0"></xs:element>
<xs:element name="note" type="TextType"></xs:element>
</xs:sequence>
</xs:element>
</xs:sequence>
<xs:choice maxOccurs="unbounded">
<xs:element ref="group"></xs:element>
<xs:element ref="category"></xs:element>
</xs:choice>
<xs:attribute name="hide" use="optional" default="false">
<xs:simpleType>
<xs:restriction base="xs:boolean"></xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:element>

Parent Elements

dimension Element

Child Elements

category Element, footnote Element, group Element

Related Elements

category Element, dimension Element, pivotTable Element


footnote Element

footnote element,footnote element,footnote element

Attributes for footnote
Attribute | Use | Description | Valid Values
date | optional |  | dateTime
decimals | optional |  | unsignedInt
display | optional |  | name value label both
duration | optional |  | duration
format | optional |  | a f comma dollar date adate ahex ibhex rbhex z n e time datetime jdate dtime week wkday month moyr qyr wkyr pct dot cca ccb ccc ccd cce edate sdate g
label | optional |  | string
null | optional |  | boolean
number | optional |  | double
string | optional |  | string
text | optional |  | string
time | optional |  | time
variable | optional |  | boolean
varName | optional |  | string
footnote diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="footnote" minOccurs="0" maxOccurs="unbounded">
<xs:attribute name="null" type="xs:boolean" use="optional" default="false"></xs:attribute>
<xs:attribute name="number" type="xs:double" use="optional"></xs:attribute>
<xs:attribute name="format" use="optional" default="f">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="a"></xs:enumeration>
<xs:enumeration value="f"></xs:enumeration>
<xs:enumeration value="comma"></xs:enumeration>
<xs:enumeration value="dollar"></xs:enumeration>
<xs:enumeration value="date"></xs:enumeration>
<xs:enumeration value="adate"></xs:enumeration>
<xs:enumeration value="ahex"></xs:enumeration>
<xs:enumeration value="ibhex"></xs:enumeration>
<xs:enumeration value="rbhex"></xs:enumeration>
<xs:enumeration value="z"></xs:enumeration>
<xs:enumeration value="n"></xs:enumeration>
<xs:enumeration value="e"></xs:enumeration>
<xs:enumeration value="time"></xs:enumeration>
<xs:enumeration value="datetime"></xs:enumeration>
<xs:enumeration value="jdate"></xs:enumeration>
<xs:enumeration value="dtime"></xs:enumeration>
<xs:enumeration value="week"></xs:enumeration>
<xs:enumeration value="wkday"></xs:enumeration>
<xs:enumeration value="month"></xs:enumeration>
<xs:enumeration value="moyr"></xs:enumeration>
<xs:enumeration value="qyr"></xs:enumeration>
<xs:enumeration value="wkyr"></xs:enumeration>
<xs:enumeration value="pct"></xs:enumeration>
<xs:enumeration value="dot"></xs:enumeration>
<xs:enumeration value="cca"></xs:enumeration>
<xs:enumeration value="ccb"></xs:enumeration>
<xs:enumeration value="ccc"></xs:enumeration>
<xs:enumeration value="ccd"></xs:enumeration>
<xs:enumeration value="cce"></xs:enumeration>
<xs:enumeration value="edate"></xs:enumeration>
<xs:enumeration value="sdate"></xs:enumeration>
<xs:enumeration value="g"></xs:enumeration>
<xs:enumeration value=""></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="decimals" type="xs:unsignedInt" use="optional" default="0"></xs:attribute>
<xs:attribute name="variable" type="xs:boolean" use="optional" default="false"></xs:attribute>
<xs:attribute name="label" type="xs:string" use="optional"></xs:attribute>
<xs:attribute name="varName" type="xs:string" use="optional"></xs:attribute>
<xs:attribute name="text" type="xs:string"></xs:attribute>
<xs:attribute name="display" use="optional">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="name"></xs:enumeration>
<xs:enumeration value="value"></xs:enumeration>
<xs:enumeration value="label"></xs:enumeration>
<xs:enumeration value="both"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="time" type="xs:time" use="optional"></xs:attribute>
<xs:attribute name="date" type="xs:dateTime" use="optional"></xs:attribute>
<xs:attribute name="duration" type="xs:duration" use="optional"></xs:attribute>
<xs:attribute name="string" type="xs:string" use="optional"></xs:attribute>
<xs:sequence>
<xs:element name="marker" type="TextType" minOccurs="0"></xs:element>
<xs:element name="note" type="TextType"></xs:element>
</xs:sequence>
</xs:element>

Parent Elements

group Element

Child Elements

marker Element, note Element

Related Elements

footnote Element, cell Element, footnote Element, chartTitle Element, footnote Element, heading Element, modelTitle Element, command Element, footnote Element, textBlock Element, treeTitle Element


heading Element

heading element,heading element,heading element

Attributes for heading
Attribute | Use | Description | Valid Values
date | optional |  | dateTime
decimals | optional |  | unsignedInt
display | optional |  | name value label both
duration | optional |  | duration
format | optional |  | a f comma dollar date adate ahex ibhex rbhex z n e time datetime jdate dtime week wkday month moyr qyr wkyr pct dot cca ccb ccc ccd cce edate sdate g
label | optional |  | string
null | optional |  | boolean
number | optional |  | double
string | optional |  | string
text | optional |  | string
time | optional |  | time
variable | optional |  | boolean
varName | optional |  | string
heading diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="heading">
<xs:attribute name="null" type="xs:boolean" use="optional" default="false"></xs:attribute>
<xs:attribute name="number" type="xs:double" use="optional"></xs:attribute>
<xs:attribute name="format" use="optional" default="f">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="a"></xs:enumeration>
<xs:enumeration value="f"></xs:enumeration>
<xs:enumeration value="comma"></xs:enumeration>
<xs:enumeration value="dollar"></xs:enumeration>
<xs:enumeration value="date"></xs:enumeration>
<xs:enumeration value="adate"></xs:enumeration>
<xs:enumeration value="ahex"></xs:enumeration>
<xs:enumeration value="ibhex"></xs:enumeration>
<xs:enumeration value="rbhex"></xs:enumeration>
<xs:enumeration value="z"></xs:enumeration>
<xs:enumeration value="n"></xs:enumeration>
<xs:enumeration value="e"></xs:enumeration>
<xs:enumeration value="time"></xs:enumeration>
<xs:enumeration value="datetime"></xs:enumeration>
<xs:enumeration value="jdate"></xs:enumeration>
<xs:enumeration value="dtime"></xs:enumeration>
<xs:enumeration value="week"></xs:enumeration>
<xs:enumeration value="wkday"></xs:enumeration>
<xs:enumeration value="month"></xs:enumeration>
<xs:enumeration value="moyr"></xs:enumeration>
<xs:enumeration value="qyr"></xs:enumeration>
<xs:enumeration value="wkyr"></xs:enumeration>
<xs:enumeration value="pct"></xs:enumeration>
<xs:enumeration value="dot"></xs:enumeration>
<xs:enumeration value="cca"></xs:enumeration>
<xs:enumeration value="ccb"></xs:enumeration>
<xs:enumeration value="ccc"></xs:enumeration>
<xs:enumeration value="ccd"></xs:enumeration>
<xs:enumeration value="cce"></xs:enumeration>
<xs:enumeration value="edate"></xs:enumeration>
<xs:enumeration value="sdate"></xs:enumeration>
<xs:enumeration value="g"></xs:enumeration>
<xs:enumeration value=""></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="decimals" type="xs:unsignedInt" use="optional" default="0"></xs:attribute>
<xs:attribute name="variable" type="xs:boolean" use="optional" default="false"></xs:attribute>
<xs:attribute name="label" type="xs:string" use="optional"></xs:attribute>
<xs:attribute name="varName" type="xs:string" use="optional"></xs:attribute>
<xs:attribute name="text" type="xs:string"></xs:attribute>
<xs:attribute name="display" use="optional">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="name"></xs:enumeration>
<xs:enumeration value="value"></xs:enumeration>
<xs:enumeration value="label"></xs:enumeration>
<xs:enumeration value="both"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="time" type="xs:time" use="optional"></xs:attribute>
<xs:attribute name="date" type="xs:dateTime" use="optional"></xs:attribute>
<xs:attribute name="duration" type="xs:duration" use="optional"></xs:attribute>
<xs:attribute name="string" type="xs:string" use="optional"></xs:attribute>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="heading"></xs:element>
<xs:element ref="pivotTable"></xs:element>
<xs:element ref="chartTitle"></xs:element>
<xs:element ref="treeTitle"></xs:element>
<xs:element ref="textBlock"></xs:element>
<xs:element ref="modelTitle"></xs:element>
</xs:choice>
</xs:element>

Parent Elements

command Element

Child Elements

chartTitle Element, heading Element, modelTitle Element, pivotTable Element, textBlock Element, treeTitle Element

Related Elements

footnote Element, cell Element, footnote Element, chartTitle Element, footnote Element, footnote Element, modelTitle Element, command Element, footnote Element, textBlock Element, treeTitle Element


modelTitle Element

modelTitle element,modelTitle element,modelTitle element

The modelTitle element contains a model in the output.

Attributes for modelTitle
Attribute | Use | Description | Valid Values
date | optional |  | dateTime
decimals | optional |  | unsignedInt
display | optional |  | name value label both
duration | optional |  | duration
format | optional |  | a f comma dollar date adate ahex ibhex rbhex z n e time datetime jdate dtime week wkday month moyr qyr wkyr pct dot cca ccb ccc ccd cce edate sdate g
label | optional |  | string
null | optional |  | boolean
number | optional |  | double
string | optional |  | string
text | optional |  | string
time | optional |  | time
variable | optional |  | boolean
varName | optional |  | string
modelTitle diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="modelTitle">
<xs:attribute name="null" type="xs:boolean" use="optional" default="false"></xs:attribute>
<xs:attribute name="number" type="xs:double" use="optional"></xs:attribute>
<xs:attribute name="format" use="optional" default="f">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="a"></xs:enumeration>
<xs:enumeration value="f"></xs:enumeration>
<xs:enumeration value="comma"></xs:enumeration>
<xs:enumeration value="dollar"></xs:enumeration>
<xs:enumeration value="date"></xs:enumeration>
<xs:enumeration value="adate"></xs:enumeration>
<xs:enumeration value="ahex"></xs:enumeration>
<xs:enumeration value="ibhex"></xs:enumeration>
<xs:enumeration value="rbhex"></xs:enumeration>
<xs:enumeration value="z"></xs:enumeration>
<xs:enumeration value="n"></xs:enumeration>
<xs:enumeration value="e"></xs:enumeration>
<xs:enumeration value="time"></xs:enumeration>
<xs:enumeration value="datetime"></xs:enumeration>
<xs:enumeration value="jdate"></xs:enumeration>
<xs:enumeration value="dtime"></xs:enumeration>
<xs:enumeration value="week"></xs:enumeration>
<xs:enumeration value="wkday"></xs:enumeration>
<xs:enumeration value="month"></xs:enumeration>
<xs:enumeration value="moyr"></xs:enumeration>
<xs:enumeration value="qyr"></xs:enumeration>
<xs:enumeration value="wkyr"></xs:enumeration>
<xs:enumeration value="pct"></xs:enumeration>
<xs:enumeration value="dot"></xs:enumeration>
<xs:enumeration value="cca"></xs:enumeration>
<xs:enumeration value="ccb"></xs:enumeration>
<xs:enumeration value="ccc"></xs:enumeration>
<xs:enumeration value="ccd"></xs:enumeration>
<xs:enumeration value="cce"></xs:enumeration>
<xs:enumeration value="edate"></xs:enumeration>
<xs:enumeration value="sdate"></xs:enumeration>
<xs:enumeration value="g"></xs:enumeration>
<xs:enumeration value=""></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="decimals" type="xs:unsignedInt" use="optional" default="0"></xs:attribute>
<xs:attribute name="variable" type="xs:boolean" use="optional" default="false"></xs:attribute>
<xs:attribute name="label" type="xs:string" use="optional"></xs:attribute>
<xs:attribute name="varName" type="xs:string" use="optional"></xs:attribute>
<xs:attribute name="text" type="xs:string"></xs:attribute>
<xs:attribute name="display" use="optional">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="name"></xs:enumeration>
<xs:enumeration value="value"></xs:enumeration>
<xs:enumeration value="label"></xs:enumeration>
<xs:enumeration value="both"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="time" type="xs:time" use="optional"></xs:attribute>
<xs:attribute name="date" type="xs:dateTime" use="optional"></xs:attribute>
<xs:attribute name="duration" type="xs:duration" use="optional"></xs:attribute>
<xs:attribute name="string" type="xs:string" use="optional"></xs:attribute>
<xs:sequence>
<xs:element name="model" minOccurs="0">
<xs:sequence></xs:sequence>
</xs:element>
<xs:element name="modelView" minOccurs="0" maxOccurs="unbounded">
<xs:sequence></xs:sequence>
</xs:element>
</xs:sequence>
</xs:element>

Parent Elements

heading Element, command Element

Child Elements

model Element, modelView Element

Related Elements

footnote Element, cell Element, footnote Element, chartTitle Element, footnote Element, footnote Element, heading Element, command Element, footnote Element, textBlock Element, treeTitle Element


model Element

model element,model element,model element

model diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="model" minOccurs="0">
<xs:sequence></xs:sequence>
</xs:element>

Parent Elements

modelTitle Element


modelView Element

modelView element,modelView element,modelView element

Attributes for modelView
Attribute | Use | Description | Valid Values
imageFile | optional | File path to image file representing this model. | string
modelView diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="modelView" minOccurs="0" maxOccurs="unbounded">
<xs:sequence></xs:sequence>
<xs:attribute name="imageFile" type="xs:string" use="optional"></xs:attribute>
</xs:element>

Parent Elements

modelTitle Element


outputTree Element

outputTree element,outputTree element,outputTree element

Output from PASW Statistics

outputTree diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="outputTree">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="textBlock"></xs:element>
<xs:element name="command">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="heading"></xs:element>
<xs:element ref="textBlock"></xs:element>
<xs:element ref="chartTitle"></xs:element>
<xs:element ref="treeTitle"></xs:element>
<xs:element ref="pivotTable"></xs:element>
<xs:element ref="modelTitle"></xs:element>
</xs:choice>
</xs:element>
<xs:element name="pageTitle">
<xs:sequence minOccurs="0" maxOccurs="2">
<xs:element name="line"></xs:element>
</xs:sequence>
</xs:element>
</xs:choice>
</xs:element>

Child Elements

command Element, pageTitle Element, textBlock Element


command Element

command element,command element,command element

A command element contains all the output from one execution of a PASW Statistics command. Some commands (typically those with no normal output) do not produce command elements, but write their error messages directly to the log file.

Attributes for command
Attribute | Use | Description | Valid Values
command | required |  | string
date | optional |  | dateTime
decimals | optional |  | unsignedInt
display | optional |  | name value label both
displayOutlineValues | optional |  | value label both
displayOutlineVariables | optional |  | name label both
displayTableValues | optional |  | value label both
displayTableVariables | optional |  | name label both
duration | optional |  | duration
format | optional |  | a f comma dollar date adate ahex ibhex rbhex z n e time datetime jdate dtime week wkday month moyr qyr wkyr pct dot cca ccb ccc ccd cce edate sdate g
label | optional |  | string
lang | optional | Taken from xml.xsd. | any
null | optional |  | boolean
number | optional |  | double
string | optional |  | string
text | optional |  | string
time | optional |  | time
variable | optional |  | boolean
varName | optional |  | string
command diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="command">
<xs:attribute name="null" type="xs:boolean" use="optional" default="false"></xs:attribute>
<xs:attribute name="number" type="xs:double" use="optional"></xs:attribute>
<xs:attribute name="format" use="optional" default="f">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="a"></xs:enumeration>
<xs:enumeration value="f"></xs:enumeration>
<xs:enumeration value="comma"></xs:enumeration>
<xs:enumeration value="dollar"></xs:enumeration>
<xs:enumeration value="date"></xs:enumeration>
<xs:enumeration value="adate"></xs:enumeration>
<xs:enumeration value="ahex"></xs:enumeration>
<xs:enumeration value="ibhex"></xs:enumeration>
<xs:enumeration value="rbhex"></xs:enumeration>
<xs:enumeration value="z"></xs:enumeration>
<xs:enumeration value="n"></xs:enumeration>
<xs:enumeration value="e"></xs:enumeration>
<xs:enumeration value="time"></xs:enumeration>
<xs:enumeration value="datetime"></xs:enumeration>
<xs:enumeration value="jdate"></xs:enumeration>
<xs:enumeration value="dtime"></xs:enumeration>
<xs:enumeration value="week"></xs:enumeration>
<xs:enumeration value="wkday"></xs:enumeration>
<xs:enumeration value="month"></xs:enumeration>
<xs:enumeration value="moyr"></xs:enumeration>
<xs:enumeration value="qyr"></xs:enumeration>
<xs:enumeration value="wkyr"></xs:enumeration>
<xs:enumeration value="pct"></xs:enumeration>
<xs:enumeration value="dot"></xs:enumeration>
<xs:enumeration value="cca"></xs:enumeration>
<xs:enumeration value="ccb"></xs:enumeration>
<xs:enumeration value="ccc"></xs:enumeration>
<xs:enumeration value="ccd"></xs:enumeration>
<xs:enumeration value="cce"></xs:enumeration>
<xs:enumeration value="edate"></xs:enumeration>
<xs:enumeration value="sdate"></xs:enumeration>
<xs:enumeration value="g"></xs:enumeration>
<xs:enumeration value=""></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="decimals" type="xs:unsignedInt" use="optional" default="0"></xs:attribute>
<xs:attribute name="variable" type="xs:boolean" use="optional" default="false"></xs:attribute>
<xs:attribute name="label" type="xs:string" use="optional"></xs:attribute>
<xs:attribute name="varName" type="xs:string" use="optional"></xs:attribute>
<xs:attribute name="text" type="xs:string"></xs:attribute>
<xs:attribute name="display" use="optional">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="name"></xs:enumeration>
<xs:enumeration value="value"></xs:enumeration>
<xs:enumeration value="label"></xs:enumeration>
<xs:enumeration value="both"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="time" type="xs:time" use="optional"></xs:attribute>
<xs:attribute name="date" type="xs:dateTime" use="optional"></xs:attribute>
<xs:attribute name="duration" type="xs:duration" use="optional"></xs:attribute>
<xs:attribute name="string" type="xs:string" use="optional"></xs:attribute>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="heading"></xs:element>
<xs:element ref="textBlock"></xs:element>
<xs:element ref="chartTitle"></xs:element>
<xs:element ref="treeTitle"></xs:element>
<xs:element ref="pivotTable"></xs:element>
<xs:element ref="modelTitle"></xs:element>
</xs:choice>
<xs:attribute name="lang">
<xs:simpleType>
<xs:union memberTypes="xs:language">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value=""></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:union>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="command" type="xs:string" use="required"></xs:attribute>
<xs:attribute name="displayOutlineVariables">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="name"></xs:enumeration>
<xs:enumeration value="label"></xs:enumeration>
<xs:enumeration value="both"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="displayOutlineValues">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="value"></xs:enumeration>
<xs:enumeration value="label"></xs:enumeration>
<xs:enumeration value="both"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="displayTableVariables">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="name"></xs:enumeration>
<xs:enumeration value="label"></xs:enumeration>
<xs:enumeration value="both"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="displayTableValues">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="value"></xs:enumeration>
<xs:enumeration value="label"></xs:enumeration>
<xs:enumeration value="both"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:element>

Parent Elements

outputTree Element

Child Elements

chartTitle Element, heading Element, modelTitle Element, pivotTable Element, textBlock Element, treeTitle Element

Related Elements

footnote Element, cell Element, footnote Element, chartTitle Element, footnote Element, footnote Element, heading Element, modelTitle Element, footnote Element, textBlock Element, treeTitle Element


pageTitle Element

pageTitle element,pageTitle element,pageTitle element

A pageTitle contains 0 to two lines to be shown at the top of each page of printed output.

pageTitle diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="pageTitle">
<xs:sequence minOccurs="0" maxOccurs="2">
<xs:element name="line"></xs:element>
</xs:sequence>
</xs:element>

Parent Elements

outputTree Element

Child Elements

line Element


line Element

line element,line element,line element

line diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="line"></xs:element>

Parent Elements

pageTitle Element


pivotTable Element

pivotTable element,pivotTable element,pivotTable element

Attributes for pivotTable
Attribute | Use | Description | Valid Values
columnVertical | optional |  | boolean
date | optional |  | dateTime
decimals | optional |  | unsignedInt
display | optional |  | name value label both
duration | optional |  | duration
format | optional |  | a f comma dollar date adate ahex ibhex rbhex z n e time datetime jdate dtime week wkday month moyr qyr wkyr pct dot cca ccb ccc ccd cce edate sdate g
label | optional |  | string
null | optional |  | boolean
number | optional |  | double
option | optional |  | int
rowVertical | optional |  | boolean
string | optional |  | string
subType | required |  | string
text | optional |  | string
time | optional |  | time
variable | optional |  | boolean
varName | optional |  | string
pivotTable diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="pivotTable">
<xs:attribute name="null" type="xs:boolean" use="optional" default="false"></xs:attribute>
<xs:attribute name="number" type="xs:double" use="optional"></xs:attribute>
<xs:attribute name="format" use="optional" default="f">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="a"></xs:enumeration>
<xs:enumeration value="f"></xs:enumeration>
<xs:enumeration value="comma"></xs:enumeration>
<xs:enumeration value="dollar"></xs:enumeration>
<xs:enumeration value="date"></xs:enumeration>
<xs:enumeration value="adate"></xs:enumeration>
<xs:enumeration value="ahex"></xs:enumeration>
<xs:enumeration value="ibhex"></xs:enumeration>
<xs:enumeration value="rbhex"></xs:enumeration>
<xs:enumeration value="z"></xs:enumeration>
<xs:enumeration value="n"></xs:enumeration>
<xs:enumeration value="e"></xs:enumeration>
<xs:enumeration value="time"></xs:enumeration>
<xs:enumeration value="datetime"></xs:enumeration>
<xs:enumeration value="jdate"></xs:enumeration>
<xs:enumeration value="dtime"></xs:enumeration>
<xs:enumeration value="week"></xs:enumeration>
<xs:enumeration value="wkday"></xs:enumeration>
<xs:enumeration value="month"></xs:enumeration>
<xs:enumeration value="moyr"></xs:enumeration>
<xs:enumeration value="qyr"></xs:enumeration>
<xs:enumeration value="wkyr"></xs:enumeration>
<xs:enumeration value="pct"></xs:enumeration>
<xs:enumeration value="dot"></xs:enumeration>
<xs:enumeration value="cca"></xs:enumeration>
<xs:enumeration value="ccb"></xs:enumeration>
<xs:enumeration value="ccc"></xs:enumeration>
<xs:enumeration value="ccd"></xs:enumeration>
<xs:enumeration value="cce"></xs:enumeration>
<xs:enumeration value="edate"></xs:enumeration>
<xs:enumeration value="sdate"></xs:enumeration>
<xs:enumeration value="g"></xs:enumeration>
<xs:enumeration value=""></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="decimals" type="xs:unsignedInt" use="optional" default="0"></xs:attribute>
<xs:attribute name="variable" type="xs:boolean" use="optional" default="false"></xs:attribute>
<xs:attribute name="label" type="xs:string" use="optional"></xs:attribute>
<xs:attribute name="varName" type="xs:string" use="optional"></xs:attribute>
<xs:attribute name="text" type="xs:string"></xs:attribute>
<xs:attribute name="display" use="optional">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="name"></xs:enumeration>
<xs:enumeration value="value"></xs:enumeration>
<xs:enumeration value="label"></xs:enumeration>
<xs:enumeration value="both"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="time" type="xs:time" use="optional"></xs:attribute>
<xs:attribute name="date" type="xs:dateTime" use="optional"></xs:attribute>
<xs:attribute name="duration" type="xs:duration" use="optional"></xs:attribute>
<xs:attribute name="string" type="xs:string" use="optional"></xs:attribute>
<xs:sequence>
<xs:element name="footnote" minOccurs="0" maxOccurs="unbounded">
<xs:sequence>
<xs:element name="marker" type="TextType" minOccurs="0"></xs:element>
<xs:element name="note" type="TextType"></xs:element>
</xs:sequence>
</xs:element>
</xs:sequence>
<xs:sequence>
<xs:element name="caption" type="TextType" minOccurs="0"></xs:element>
<xs:element name="cornerText" type="TextType" minOccurs="0"></xs:element>
<xs:element ref="dimension"></xs:element>
</xs:sequence>
<xs:attribute name="subType" type="xs:string" use="required"></xs:attribute>
<xs:attribute name="option" type="xs:int" use="optional"></xs:attribute>
<xs:attribute name="rowVertical" type="xs:boolean" use="optional" default="false"></xs:attribute>
<xs:attribute name="columnVertical" type="xs:boolean" use="optional" default="false"></xs:attribute>
</xs:element>

Parent Elements

heading Element, command Element

Child Elements

caption Element, cornerText Element, dimension Element, footnote Element

Related Elements

category Element, dimension Element, group Element


footnote Element

footnote element,footnote element,footnote element

Attributes for footnote
Attribute | Use | Description | Valid Values
date | optional |  | dateTime
decimals | optional |  | unsignedInt
display | optional |  | name value label both
duration | optional |  | duration
format | optional |  | a f comma dollar date adate ahex ibhex rbhex z n e time datetime jdate dtime week wkday month moyr qyr wkyr pct dot cca ccb ccc ccd cce edate sdate g
label | optional |  | string
null | optional |  | boolean
number | optional |  | double
string | optional |  | string
text | optional |  | string
time | optional |  | time
variable | optional |  | boolean
varName | optional |  | string
footnote diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="footnote" minOccurs="0" maxOccurs="unbounded">
<xs:attribute name="null" type="xs:boolean" use="optional" default="false"></xs:attribute>
<xs:attribute name="number" type="xs:double" use="optional"></xs:attribute>
<xs:attribute name="format" use="optional" default="f">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="a"></xs:enumeration>
<xs:enumeration value="f"></xs:enumeration>
<xs:enumeration value="comma"></xs:enumeration>
<xs:enumeration value="dollar"></xs:enumeration>
<xs:enumeration value="date"></xs:enumeration>
<xs:enumeration value="adate"></xs:enumeration>
<xs:enumeration value="ahex"></xs:enumeration>
<xs:enumeration value="ibhex"></xs:enumeration>
<xs:enumeration value="rbhex"></xs:enumeration>
<xs:enumeration value="z"></xs:enumeration>
<xs:enumeration value="n"></xs:enumeration>
<xs:enumeration value="e"></xs:enumeration>
<xs:enumeration value="time"></xs:enumeration>
<xs:enumeration value="datetime"></xs:enumeration>
<xs:enumeration value="jdate"></xs:enumeration>
<xs:enumeration value="dtime"></xs:enumeration>
<xs:enumeration value="week"></xs:enumeration>
<xs:enumeration value="wkday"></xs:enumeration>
<xs:enumeration value="month"></xs:enumeration>
<xs:enumeration value="moyr"></xs:enumeration>
<xs:enumeration value="qyr"></xs:enumeration>
<xs:enumeration value="wkyr"></xs:enumeration>
<xs:enumeration value="pct"></xs:enumeration>
<xs:enumeration value="dot"></xs:enumeration>
<xs:enumeration value="cca"></xs:enumeration>
<xs:enumeration value="ccb"></xs:enumeration>
<xs:enumeration value="ccc"></xs:enumeration>
<xs:enumeration value="ccd"></xs:enumeration>
<xs:enumeration value="cce"></xs:enumeration>
<xs:enumeration value="edate"></xs:enumeration>
<xs:enumeration value="sdate"></xs:enumeration>
<xs:enumeration value="g"></xs:enumeration>
<xs:enumeration value=""></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="decimals" type="xs:unsignedInt" use="optional" default="0"></xs:attribute>
<xs:attribute name="variable" type="xs:boolean" use="optional" default="false"></xs:attribute>
<xs:attribute name="label" type="xs:string" use="optional"></xs:attribute>
<xs:attribute name="varName" type="xs:string" use="optional"></xs:attribute>
<xs:attribute name="text" type="xs:string"></xs:attribute>
<xs:attribute name="display" use="optional">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="name"></xs:enumeration>
<xs:enumeration value="value"></xs:enumeration>
<xs:enumeration value="label"></xs:enumeration>
<xs:enumeration value="both"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="time" type="xs:time" use="optional"></xs:attribute>
<xs:attribute name="date" type="xs:dateTime" use="optional"></xs:attribute>
<xs:attribute name="duration" type="xs:duration" use="optional"></xs:attribute>
<xs:attribute name="string" type="xs:string" use="optional"></xs:attribute>
<xs:sequence>
<xs:element name="marker" type="TextType" minOccurs="0"></xs:element>
<xs:element name="note" type="TextType"></xs:element>
</xs:sequence>
</xs:element>

Parent Elements

pivotTable Element

Child Elements

marker Element, note Element

Related Elements

footnote Element, cell Element, footnote Element, chartTitle Element, footnote Element, footnote Element, heading Element, modelTitle Element, command Element, textBlock Element, treeTitle Element


caption Element

caption element,caption element,caption element

Attributes for caption
Attribute | Use | Description | Valid Values
date | optional |  | dateTime
decimals | optional |  | unsignedInt
display | optional |  | name value label both
duration | optional |  | duration
format | optional |  | a f comma dollar date adate ahex ibhex rbhex z n e time datetime jdate dtime week wkday month moyr qyr wkyr pct dot cca ccb ccc ccd cce edate sdate g
label | optional |  | string
null | optional |  | boolean
number | optional |  | double
string | optional |  | string
text | optional |  | string
time | optional |  | time
variable | optional |  | boolean
varName | optional |  | string
caption diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="caption" type="TextType" minOccurs="0">
<xs:attribute name="null" type="xs:boolean" use="optional" default="false"></xs:attribute>
<xs:attribute name="number" type="xs:double" use="optional"></xs:attribute>
<xs:attribute name="format" use="optional" default="f">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="a"></xs:enumeration>
<xs:enumeration value="f"></xs:enumeration>
<xs:enumeration value="comma"></xs:enumeration>
<xs:enumeration value="dollar"></xs:enumeration>
<xs:enumeration value="date"></xs:enumeration>
<xs:enumeration value="adate"></xs:enumeration>
<xs:enumeration value="ahex"></xs:enumeration>
<xs:enumeration value="ibhex"></xs:enumeration>
<xs:enumeration value="rbhex"></xs:enumeration>
<xs:enumeration value="z"></xs:enumeration>
<xs:enumeration value="n"></xs:enumeration>
<xs:enumeration value="e"></xs:enumeration>
<xs:enumeration value="time"></xs:enumeration>
<xs:enumeration value="datetime"></xs:enumeration>
<xs:enumeration value="jdate"></xs:enumeration>
<xs:enumeration value="dtime"></xs:enumeration>
<xs:enumeration value="week"></xs:enumeration>
<xs:enumeration value="wkday"></xs:enumeration>
<xs:enumeration value="month"></xs:enumeration>
<xs:enumeration value="moyr"></xs:enumeration>
<xs:enumeration value="qyr"></xs:enumeration>
<xs:enumeration value="wkyr"></xs:enumeration>
<xs:enumeration value="pct"></xs:enumeration>
<xs:enumeration value="dot"></xs:enumeration>
<xs:enumeration value="cca"></xs:enumeration>
<xs:enumeration value="ccb"></xs:enumeration>
<xs:enumeration value="ccc"></xs:enumeration>
<xs:enumeration value="ccd"></xs:enumeration>
<xs:enumeration value="cce"></xs:enumeration>
<xs:enumeration value="edate"></xs:enumeration>
<xs:enumeration value="sdate"></xs:enumeration>
<xs:enumeration value="g"></xs:enumeration>
<xs:enumeration value=""></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="decimals" type="xs:unsignedInt" use="optional" default="0"></xs:attribute>
<xs:attribute name="variable" type="xs:boolean" use="optional" default="false"></xs:attribute>
<xs:attribute name="label" type="xs:string" use="optional"></xs:attribute>
<xs:attribute name="varName" type="xs:string" use="optional"></xs:attribute>
<xs:attribute name="text" type="xs:string"></xs:attribute>
<xs:attribute name="display" use="optional">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="name"></xs:enumeration>
<xs:enumeration value="value"></xs:enumeration>
<xs:enumeration value="label"></xs:enumeration>
<xs:enumeration value="both"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="time" type="xs:time" use="optional"></xs:attribute>
<xs:attribute name="date" type="xs:dateTime" use="optional"></xs:attribute>
<xs:attribute name="duration" type="xs:duration" use="optional"></xs:attribute>
<xs:attribute name="string" type="xs:string" use="optional"></xs:attribute>
</xs:element>

Parent Elements

pivotTable Element


cornerText Element

cornerText element,cornerText element,cornerText element

Attributes for cornerText
Attribute | Use | Description | Valid Values
date | optional |  | dateTime
decimals | optional |  | unsignedInt
display | optional |  | name value label both
duration | optional |  | duration
format | optional |  | a f comma dollar date adate ahex ibhex rbhex z n e time datetime jdate dtime week wkday month moyr qyr wkyr pct dot cca ccb ccc ccd cce edate sdate g
label | optional |  | string
null | optional |  | boolean
number | optional |  | double
string | optional |  | string
text | optional |  | string
time | optional |  | time
variable | optional |  | boolean
varName | optional |  | string
cornerText diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="cornerText" type="TextType" minOccurs="0">
<xs:attribute name="null" type="xs:boolean" use="optional" default="false"></xs:attribute>
<xs:attribute name="number" type="xs:double" use="optional"></xs:attribute>
<xs:attribute name="format" use="optional" default="f">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="a"></xs:enumeration>
<xs:enumeration value="f"></xs:enumeration>
<xs:enumeration value="comma"></xs:enumeration>
<xs:enumeration value="dollar"></xs:enumeration>
<xs:enumeration value="date"></xs:enumeration>
<xs:enumeration value="adate"></xs:enumeration>
<xs:enumeration value="ahex"></xs:enumeration>
<xs:enumeration value="ibhex"></xs:enumeration>
<xs:enumeration value="rbhex"></xs:enumeration>
<xs:enumeration value="z"></xs:enumeration>
<xs:enumeration value="n"></xs:enumeration>
<xs:enumeration value="e"></xs:enumeration>
<xs:enumeration value="time"></xs:enumeration>
<xs:enumeration value="datetime"></xs:enumeration>
<xs:enumeration value="jdate"></xs:enumeration>
<xs:enumeration value="dtime"></xs:enumeration>
<xs:enumeration value="week"></xs:enumeration>
<xs:enumeration value="wkday"></xs:enumeration>
<xs:enumeration value="month"></xs:enumeration>
<xs:enumeration value="moyr"></xs:enumeration>
<xs:enumeration value="qyr"></xs:enumeration>
<xs:enumeration value="wkyr"></xs:enumeration>
<xs:enumeration value="pct"></xs:enumeration>
<xs:enumeration value="dot"></xs:enumeration>
<xs:enumeration value="cca"></xs:enumeration>
<xs:enumeration value="ccb"></xs:enumeration>
<xs:enumeration value="ccc"></xs:enumeration>
<xs:enumeration value="ccd"></xs:enumeration>
<xs:enumeration value="cce"></xs:enumeration>
<xs:enumeration value="edate"></xs:enumeration>
<xs:enumeration value="sdate"></xs:enumeration>
<xs:enumeration value="g"></xs:enumeration>
<xs:enumeration value=""></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="decimals" type="xs:unsignedInt" use="optional" default="0"></xs:attribute>
<xs:attribute name="variable" type="xs:boolean" use="optional" default="false"></xs:attribute>
<xs:attribute name="label" type="xs:string" use="optional"></xs:attribute>
<xs:attribute name="varName" type="xs:string" use="optional"></xs:attribute>
<xs:attribute name="text" type="xs:string"></xs:attribute>
<xs:attribute name="display" use="optional">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="name"></xs:enumeration>
<xs:enumeration value="value"></xs:enumeration>
<xs:enumeration value="label"></xs:enumeration>
<xs:enumeration value="both"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="time" type="xs:time" use="optional"></xs:attribute>
<xs:attribute name="date" type="xs:dateTime" use="optional"></xs:attribute>
<xs:attribute name="duration" type="xs:duration" use="optional"></xs:attribute>
<xs:attribute name="string" type="xs:string" use="optional"></xs:attribute>
</xs:element>

Parent Elements

pivotTable Element


textBlock Element

textBlock element,textBlock element,textBlock element

A textBlock that is a direct child of the outputTree element is always labeled "Log" (in English language output) and is referred to in documentation as a "log file."

Attributes for textBlock
Attribute | Use | Description | Valid Values
date | optional |  | dateTime
decimals | optional |  | unsignedInt
display | optional |  | name value label both
duration | optional |  | duration
format | optional |  | a f comma dollar date adate ahex ibhex rbhex z n e time datetime jdate dtime week wkday month moyr qyr wkyr pct dot cca ccb ccc ccd cce edate sdate g
label | optional |  | string
null | optional |  | boolean
number | optional |  | double
string | optional |  | string
text | optional |  | string
time | optional |  | time
variable | optional |  | boolean
varName | optional |  | string
textBlock diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="textBlock">
<xs:attribute name="null" type="xs:boolean" use="optional" default="false"></xs:attribute>
<xs:attribute name="number" type="xs:double" use="optional"></xs:attribute>
<xs:attribute name="format" use="optional" default="f">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="a"></xs:enumeration>
<xs:enumeration value="f"></xs:enumeration>
<xs:enumeration value="comma"></xs:enumeration>
<xs:enumeration value="dollar"></xs:enumeration>
<xs:enumeration value="date"></xs:enumeration>
<xs:enumeration value="adate"></xs:enumeration>
<xs:enumeration value="ahex"></xs:enumeration>
<xs:enumeration value="ibhex"></xs:enumeration>
<xs:enumeration value="rbhex"></xs:enumeration>
<xs:enumeration value="z"></xs:enumeration>
<xs:enumeration value="n"></xs:enumeration>
<xs:enumeration value="e"></xs:enumeration>
<xs:enumeration value="time"></xs:enumeration>
<xs:enumeration value="datetime"></xs:enumeration>
<xs:enumeration value="jdate"></xs:enumeration>
<xs:enumeration value="dtime"></xs:enumeration>
<xs:enumeration value="week"></xs:enumeration>
<xs:enumeration value="wkday"></xs:enumeration>
<xs:enumeration value="month"></xs:enumeration>
<xs:enumeration value="moyr"></xs:enumeration>
<xs:enumeration value="qyr"></xs:enumeration>
<xs:enumeration value="wkyr"></xs:enumeration>
<xs:enumeration value="pct"></xs:enumeration>
<xs:enumeration value="dot"></xs:enumeration>
<xs:enumeration value="cca"></xs:enumeration>
<xs:enumeration value="ccb"></xs:enumeration>
<xs:enumeration value="ccc"></xs:enumeration>
<xs:enumeration value="ccd"></xs:enumeration>
<xs:enumeration value="cce"></xs:enumeration>
<xs:enumeration value="edate"></xs:enumeration>
<xs:enumeration value="sdate"></xs:enumeration>
<xs:enumeration value="g"></xs:enumeration>
<xs:enumeration value=""></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="decimals" type="xs:unsignedInt" use="optional" default="0"></xs:attribute>
<xs:attribute name="variable" type="xs:boolean" use="optional" default="false"></xs:attribute>
<xs:attribute name="label" type="xs:string" use="optional"></xs:attribute>
<xs:attribute name="varName" type="xs:string" use="optional"></xs:attribute>
<xs:attribute name="text" type="xs:string"></xs:attribute>
<xs:attribute name="display" use="optional">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="name"></xs:enumeration>
<xs:enumeration value="value"></xs:enumeration>
<xs:enumeration value="label"></xs:enumeration>
<xs:enumeration value="both"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="time" type="xs:time" use="optional"></xs:attribute>
<xs:attribute name="date" type="xs:dateTime" use="optional"></xs:attribute>
<xs:attribute name="duration" type="xs:duration" use="optional"></xs:attribute>
<xs:attribute name="string" type="xs:string" use="optional"></xs:attribute>
<xs:sequence>
<xs:element name="line" minOccurs="0" maxOccurs="unbounded"></xs:element>
</xs:sequence>
</xs:element>

Parent Elements

heading Element, outputTree Element, command Element

Child Elements

line Element

Related Elements

footnote Element, cell Element, footnote Element, chartTitle Element, footnote Element, footnote Element, heading Element, modelTitle Element, command Element, footnote Element, treeTitle Element


line Element

line element,line element,line element

line diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="line" minOccurs="0" maxOccurs="unbounded"></xs:element>

Parent Elements

textBlock Element


treeTitle Element

treeTitle element,treeTitle element,treeTitle element

The treeTitle element contains a chart in the output. Its attributes describe the tree's title. Its model element specifies structure and treeView specifies styling.

Attributes for treeTitle
Attribute | Use | Description | Valid Values
date | optional |  | dateTime
decimals | optional |  | unsignedInt
display | optional |  | name value label both
duration | optional |  | duration
format | optional |  | a f comma dollar date adate ahex ibhex rbhex z n e time datetime jdate dtime week wkday month moyr qyr wkyr pct dot cca ccb ccc ccd cce edate sdate g
label | optional |  | string
null | optional |  | boolean
number | optional |  | double
string | optional |  | string
text | optional |  | string
time | optional |  | time
variable | optional |  | boolean
varName | optional |  | string
treeTitle diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="treeTitle">
<xs:attribute name="null" type="xs:boolean" use="optional" default="false"></xs:attribute>
<xs:attribute name="number" type="xs:double" use="optional"></xs:attribute>
<xs:attribute name="format" use="optional" default="f">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="a"></xs:enumeration>
<xs:enumeration value="f"></xs:enumeration>
<xs:enumeration value="comma"></xs:enumeration>
<xs:enumeration value="dollar"></xs:enumeration>
<xs:enumeration value="date"></xs:enumeration>
<xs:enumeration value="adate"></xs:enumeration>
<xs:enumeration value="ahex"></xs:enumeration>
<xs:enumeration value="ibhex"></xs:enumeration>
<xs:enumeration value="rbhex"></xs:enumeration>
<xs:enumeration value="z"></xs:enumeration>
<xs:enumeration value="n"></xs:enumeration>
<xs:enumeration value="e"></xs:enumeration>
<xs:enumeration value="time"></xs:enumeration>
<xs:enumeration value="datetime"></xs:enumeration>
<xs:enumeration value="jdate"></xs:enumeration>
<xs:enumeration value="dtime"></xs:enumeration>
<xs:enumeration value="week"></xs:enumeration>
<xs:enumeration value="wkday"></xs:enumeration>
<xs:enumeration value="month"></xs:enumeration>
<xs:enumeration value="moyr"></xs:enumeration>
<xs:enumeration value="qyr"></xs:enumeration>
<xs:enumeration value="wkyr"></xs:enumeration>
<xs:enumeration value="pct"></xs:enumeration>
<xs:enumeration value="dot"></xs:enumeration>
<xs:enumeration value="cca"></xs:enumeration>
<xs:enumeration value="ccb"></xs:enumeration>
<xs:enumeration value="ccc"></xs:enumeration>
<xs:enumeration value="ccd"></xs:enumeration>
<xs:enumeration value="cce"></xs:enumeration>
<xs:enumeration value="edate"></xs:enumeration>
<xs:enumeration value="sdate"></xs:enumeration>
<xs:enumeration value="g"></xs:enumeration>
<xs:enumeration value=""></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="decimals" type="xs:unsignedInt" use="optional" default="0"></xs:attribute>
<xs:attribute name="variable" type="xs:boolean" use="optional" default="false"></xs:attribute>
<xs:attribute name="label" type="xs:string" use="optional"></xs:attribute>
<xs:attribute name="varName" type="xs:string" use="optional"></xs:attribute>
<xs:attribute name="text" type="xs:string"></xs:attribute>
<xs:attribute name="display" use="optional">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="name"></xs:enumeration>
<xs:enumeration value="value"></xs:enumeration>
<xs:enumeration value="label"></xs:enumeration>
<xs:enumeration value="both"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="time" type="xs:time" use="optional"></xs:attribute>
<xs:attribute name="date" type="xs:dateTime" use="optional"></xs:attribute>
<xs:attribute name="duration" type="xs:duration" use="optional"></xs:attribute>
<xs:attribute name="string" type="xs:string" use="optional"></xs:attribute>
<xs:sequence>
<xs:element name="model">
<xs:sequence></xs:sequence>
</xs:element>
<xs:element name="treeView">
<xs:sequence></xs:sequence>
</xs:element>
</xs:sequence>
</xs:element>

Parent Elements

heading Element, command Element

Child Elements

model Element, treeView Element

Related Elements

footnote Element, cell Element, footnote Element, chartTitle Element, footnote Element, footnote Element, heading Element, modelTitle Element, command Element, footnote Element, textBlock Element


model Element

model element,model element,model element

model diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="model">
<xs:sequence></xs:sequence>
</xs:element>

Parent Elements

treeTitle Element


treeView Element

treeView element,treeView element,treeView element

Attributes for treeView
Attribute | Use | Description | Valid Values
imageFile | optional | File path to image file representing this tree. | string
treeView diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="treeView">
<xs:sequence></xs:sequence>
<xs:attribute name="imageFile" type="xs:string" use="optional"></xs:attribute>
</xs:element>

Parent Elements

treeTitle Element


Dictionary Schema Overview

dictionary schema,dictionary schema,dictionary schema

The dictionary schema is an XML representation of the PASW Statistics data dictionary. The data dictionary contains metadata that describes various properties of a data file. A copy of the dictionary schema, dictionary-1.0.xsd is installed with PASW Statistics. This section provides a general overview of the schema. Detailed schema documentation is provided in subsequent sections. The following figure shows a basic outline of the dictionary schema.

Outline of the dictionary schema
<dictionary locale="string" rowCount="integer" creationDateTime="dateTime">
  <variable alignment="right" | "center" | "left"
    displayWidth="integer" label="string" name="string" type="integer"
    measurmentLevel="nominal" | "ordinal" | "scale" | "unknown">
    <variableFormat decimals="integer" type="string" width="integer"/>
    <variableWriteFormat decimals="integer" type="string" width="integer"/>
    <missingValue data="lowest" | "highest" | "string" type="lowerBound" | "upperBound"/>
    <attributeSet version="integer">
      <attribute name="string" type="user" | "system">
        <attributeValue value="string"/>
      </attribute>
    </attributeSet>
  </variable>
  <weightVariable name="string"/>
  <valueLabelSet>
    <valueLabel label="string"/>
    <valueLabelVariable name="string"/>
  </valueLabelSet>
  <variableSet name="string">
    <variablesetVariable name="string"/>
  </variableSet>
  <multipleResponseSet name="string">
    <multipleResponseSetCategoryLabels
      value="variableLabels" | "countedValues"/>
    <multipleResponseSetDichotomy value="string"/>
    <multipleResponseSetLabelSource value="variableLabel"/>
    <multipleResponseSetLabel value="string"/>
    <multipleResponseSetVariable name="string"/>
  </multipleResponseSet>
  <attributeSet version="integer">
    <attribute name="string" type="user" | "system">
      <attributeValue value="string"/>
    </attribute>
  </attributeSet>
</dictionary>

Related Topics

dictionary Element
variable Element
weightVariable Element
valueLabelSet Element
multipleResponseSet Element
variableSet Element


dictionary Element

dictionary schema,dictionary schema,dictionary schema
dictionary element,dictionary element,dictionary element
dictionary element,dictionary element,dictionary element
dictionary schema,dictionary schema,dictionary schema

<dictionary> is the root element of the schema. In addition to namespace declaration and schema location information, it has three attributes:

• locale. Locale in ISO format. The language part is ISO 639 and the country part is ISO 3166.

• creationDateTime. Date-time in ISO 8601 format.

• rowCount. Number of rows in the active dataset. This value is not affected by weighting or filtering.

Example

<dictionary locale="en_US" creationDateTime="2002-08-26T14:49:24"
  rowCount="200" xmlns="http://xml.spss.com/spss/data"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://xml.spss.com/spss/data
  http://xml.spss.com/spss/data/dictionary-1.0.xsd">

Child Elements

The <dictionary> element has the following child elements:

• <variable>

• <valueLabelSet>

• <weightVariable>

• <multipleResponseSet>

• <variableSet>

• <attributeSet>

Related Topics

Dictionary Schema Overview
variable Element
weightVariable Element
valueLabelSet Element
multipleResponseSet Element
variableSet Element


variable Element

dictionary schema,dictionary schema,dictionary schema
variable element,variable element,variable element
variable element,variable element,variable element
dictionary schema,dictionary schema,dictionary schema

Most of the metadata attributes associated with individual variables are contained in attributes and child elements of the <variable> element.

Attributes

• alignment. Alignment of data values in the Data Editor. The value can be "left, "right", or "center".

• displayWidth. Column width for the display of variables in the Data Editor. The value is a positive integer.

• label. Descriptive variable label. The value is a string with a maximum length of 255 bytes. If the variable doesn't have a variable label, this attribute is not present.

• measurementLevel. Measurement level. The value can be "nominal", "ordinal", "scale", or "unknown".

• name. Variable name. The value is a string with a maximum width of 64 bytes.

• type. Variable type, numeric or string. The value is 0 for numeric variables or a positive integer indicating the defined width (in bytes) for string variables.

Example

<variable alignment="right" displayWidth="11"
  label="Descriptive variable label" measurementLevel="ordinal"
  name="numvar1" type="0">

Child Elements

• <attributeSet>

• <missingValue/>

• <variableFormat/>

• <variableWriteFormat/>

Related Topics

Dictionary Schema Overview
dictionary Element
weightVariable Element
valueLabelSet Element
multipleResponseSet Element
variableSet Element


missingValue Element

dictionary schema,dictionary schema,dictionary schema
missingValue element,missingValue element,missingValue element
missingValue element,missingValue element,missingValue element
dictionary schema,dictionary schema,dictionary schema

The <missingValue/> element contains user-missing value definitions. A <variable> element can contain up to three <missingValue/> elements. If a variable has no user-missing values, this element is not present.

Attributes

• data. Data value that represents a defined missing value or beginning or end of a range of missing values. The value can be any valid value for the variable type or "lowest" or "highest" for missing value ranges for numeric variables.

• type. For values that represent the start or end of missing value ranges, the type attribute has a value of "lowerBound" or "upperBound". For discrete missing values, the type attribute is not present.

Example

<missingValue data="8"/>
<missingValue data="9" type="lowerBound"/>
<missingValue data="highest" type="upperBound"/>

Related Topics

variableFormat Element
variableWriteFormat Element


variableFormat Element

dictionary schema,dictionary schema,dictionary schema
variableFormat element,variableFormat element,variableFormat element
variableFormat element,variableFormat element,variableFormat element
dictionary schema,dictionary schema,dictionary schema

The <variableFormat/> element contains the defined display and print format for each variable. Each <variable> element contains one <variableFormat/> element.

Attributes

• decimals. Number of decimal positions. The value is a non-negative integer and is always "0" for string variables.

• width. Maximum width (including decimal indicator for numeric variables) in bytes.

• type. Data format. The PASW Statistics variable format expressed in all upper case letters.

Example

<variableFormat decimals="0" type="DATE" width="10"/>
A. Standard characters.
AHEX. Hexadecimal characters.
COMMA. Numbers with commas as the grouping symbol and a period as the decimal indicator. For example: 1,234,567.89.
DOLLAR. Numbers with a leading dollar sign ($), commas as the grouping symbol, and a period as the decimal indicator. For example: $1,234,567.89.
F. Standard numeric.
IB. Integer binary.
PIBHEX. Hexadecimal of PIB (positive integer binary).
P. Packed decimal.
PIB. Positive integer binary.
PK. Unsigned packed decimal.
RB. Real binary.
RBHEX. Hexadecimal of RB (real binary).
Z. Zoned decimal.
N. Restricted numeric.
E. Scientific notation.
DATE. International date of the general form dd-mmm-yyyy.
TIME. Time of the general form hh:mm:ss.ss.
DATETIME. Date and time of the general form dd-mmm-yyyy hh:mm:ss.ss.
ADATE. American date of the general form mm/dd/yyyy.
JDATE. Julian date of the general form yyyyddd.
DTIME. Days and time of the general form dd hh:mm:ss.ss.
WKDAY. Day of the week.
MONTH. Month.
MOYR. Month and year.
QYR. Quarter and year of the general form qQyyyy.
WKYR. Week and year.
PCT. Percentage sign after numbers.
DOT. Numbers with periods as the grouping symbol and a comma as the decimal indicator. For example: 1.234.567,89.
CCA. Custom currency format 1.
CCB. Custom currency format 2.
CCC. Custom currency format 3.
CCD. Custom currency format 4.
CCE. Custom currency format 5.
EDATE. European date of the general form dd.mm.yyyy.
SDATE. Sortable date of the general form yyyy/mm/dd.

Related Topics

missingValue Element
variableWriteFormat Element


variableWriteFormat Element

dictionary schema,dictionary schema,dictionary schema
dictionary element,dictionary element,dictionary element
dictionary element,dictionary element,dictionary element
dictionary schema,dictionary schema,dictionary schema

The <variableWriteFormat/> element contains the defined write format for each variable (for example, the format used when writing data to an external text file with the WRITE command). Each <variable> element contains one <variableFormat/> element.

Attributes

• decimals. Number of decimal positions. The value is a non-negative integer and is always "0" for string variables.

• width. Maximum width (including decimal indicator for numeric variables) in bytes.

• type. Data format. The PASW Statistics variable format expressed in all upper case letters. See the topic variableFormat Element for more information.

Example

<variableWriteFormat decimals="0" type="DATE" width="10"/>

Related Topics

missingValue Element
variableFormat Element


weightVariable Element

dictionary schema,dictionary schema,dictionary schema
weightVariable element,weightVariable element,weightVariable element
weightVariable element,weightVariable element,weightVariable element
dictionary schema,dictionary schema,dictionary schema

The <weightVariable/> element specifies the name of the weight variable, if weighting is on in the active dataset. The <dictionary> element can contain one <weightVariable/> element. If weighting is not on, this element is not present.

The <weightVariable/> element has a single attribute, name, that specifies the name of the weight variable.

Example

<weightVariable name="weightvar"/>

Related Topics

Dictionary Schema Overview
dictionary Element
variable Element
valueLabelSet Element
multipleResponseSet Element
variableSet Element


valueLabelSet Element

dictionary schema,dictionary schema,dictionary schema
valueLabelSet element,valueLabelSet element,valueLabelSet element
valueLabelSet element,valueLabelSet element,valueLabelSet element
dictionary schema,dictionary schema,dictionary schema

The <valueLabelSet> element contains one or more <valueLabel/> elements and one <valueLabelVariable/> element that contain information on defined value labels. The <dictionary> element can contain one or more <valueLabelSet> elements. There is a separate <valueLabelSet> element for each variable that has defined value labels. If no variables in the active dataset have defined value labels, this element is not present.

The <valueLabelSet> element has no attributes.

Example

<valueLabelSet>
  <valueLabel label="Low" value="1" />
  <valueLabel label="Medium" value="2" />
  <valueLabel label="High" value="3" />
  <valueLabelVariable name="numvar1" />
</valueLabelSet>

Child Element

• <valueLabel/>

• <valueLabelVariable/>

Related Topics

Dictionary Schema Overview
dictionary Element
variable Element
weightVariable Element
multipleResponseSet Element
variableSet Element
valueLabel Element
valueLabelVariable Element


valueLabel Element

dictionary schema,dictionary schema,dictionary schema
valueLabel element,valueLabel element,valueLabel element
valueLabel element,valueLabel element,valueLabel element
dictionary schema,dictionary schema,dictionary schema

The <valueLabel/> element contains information for a single value-label pair. A <valueLabelSet> element contains one or more <valueLabel/> elements.

Attributes

• label. A descriptive value label. A string up to 120 bytes long.

• value. The data value associated with the label.

Example

<valueLabel label="Low" value="1" />

See the topic valueLabelSet Element for more information.

Related Topics

valueLabelSet Element
valueLabelVariable Element


valueLabelVariable Element

dictionary schema,dictionary schema,dictionary schema
valueLabelVariable element,valueLabelVariable element,valueLabelVariable element
valueLabelVariable element,valueLabelVariable element,valueLabelVariable element
dictionary schema,dictionary schema,dictionary schema

The <valueLabelVariable/> element identifies the variable associated with a set of value labels. A <valueLabelSet> element contains one <valueLabelVariable/> element.

The <valueLabelVariable/> element has a single attribute, name, that contains the name of the variable associated with the value label set.

Example

<valueLabelVariable name="numvar1" />

See the topic valueLabelSet Element for more information.

Related Topics

valueLabelSet Element
valueLabel Element


multipleResponseSet Element

dictionary schema,dictionary schema,dictionary schema
multipleResponseSet element,multipleResponseSet element,multipleResponseSet element
multipleResponseSet element,multipleResponseSet element,multipleResponseSet element
dictionary schema,dictionary schema,dictionary schema

The <multipleResponseSet> element contains information on multiple response sets. The <dictionary> element can contain one or more <multipleResponseSet> elements. If there are no multiple response sets in the active dataset, this element is not present.

The <multipleResponseSet> element has a single attribute, name, that contains the name of the multiple response set.

Example

<multipleResponseSet name="$MultipleDichotomyExample">
  <multipleResponseSetCategoryLabels value="variableLabels"/>
  <multipleResponseSetDichotomy value="1" />
  <multipleResponseSetLabel value="Multiple Dichotomy Set" />
  <multipleResponseSetVariable name="numvar1" />
  <multipleResponseSetVariable name="numvar2" />
</multipleResponseSet>

Example

<multipleResponseSet name="$MultipleCategoryExample">
   <multipleResponseSetLabel value="Multiple Category Set" />
   <multipleResponseSetVariable name="numvar1" />
   <multipleResponseSetVariable name="numvar2" />
 </multipleResponseSet>

Child Elements

• <multipleResponseSetCategoryLabels/>

• <multipleResponseSetDichotomy/>

• <multipleResponsSetLabelSource/>

• <multipleResponseSetLabel/>

• <multipleResponseSetVariable/>

Related Topics

Dictionary Schema Overview
dictionary Element
variable Element
weightVariable Element
valueLabelSet Element
variableSet Element
multipleResponseSetCategoryLabels Element
multipleResponseSetDichtomy Element
multipleResponseSetLabel Element
multipleResponseSetVariable Element
attributeSet Element


multipleResponseSetCategoryLabels Element

The <multipleResponseSetCategoryLabels/> element indicates how categories are labeled for multiple dichotomy sets.

• The <multipleResponseSet> element can contain one <multipleResponseSetCategoryLabels/> element.

• If this element is present, the <multipleResponseSetDichotomy/> element must also be present in the <multipleResponseSet> element.

• The <multipleResponseSetCategoryLabels/> element has a single attribute, value, that is either "variableLabels" or "countedValues".

• For multiple category sets, this element is not present.

Example

<multipleResponseSetCategoryLabels value="variableLabels"/>

See the topic multipleResponseSet Element for more information.

Related Topics

multipleResponseSet Element
multipleResponseSetDichtomy Element
multipleResponseSetLabel Element
multipleResponseSetVariable Element
attributeSet Element


multipleResponseSetDichtomy Element

The <multipleResponseSetDichotomy/> element identifies the counted value for multiple dichotomy sets.

• The <multipleResponseSet> element can contain one <multipleResponseSetDichotomy/> element.

• If this element is present, the <multipleResponseSetCategoryLabels/> element must also be present in the <multipleResponseSet> element.

• The <multipleResponseSetDichotomy/> element has a single attribute, value, that identifies the counted value.

• For multiple category sets, this element is not present.

Example

<multipleResponseSetDichotomy value="1" />

See the topic multipleResponseSet Element for more information.

Related Topics

multipleResponseSet Element
multipleResponseSetCategoryLabels Element
multipleResponseSetLabel Element
multipleResponseSetVariable Element
attributeSet Element


multipleResponseSetLabelSource Element

For multiple dichotomy sets, the <multipleResponseSetLabelSource/> element indicates that the variable label for the first variable in the set is used as the descriptive label for the multiple response set.

• The <multipleResponseSet> element can contain one <multipleResponseSetLabelSource/> element.

• If this element is present, the <multipleResponseSetCategoryLabels/> and <multipleResponseSetDichotomy/> elements must also be present in the <multipleResponseSet> element.

• The <multipleResponseSetLabelSource/> element has a single attribute, value, with a value of "variableLabel".

• A <multipleResponseSet> element can contain a <multipleResponseSetLabelSource/> or a <multipleResponseSetLabel/> element, but not both.

• For multiple category sets, this element is not present.

Example

<multipleResponseSetLabelSource value="variableLabel" />


multipleResponseSetLabel Element

The <multipleResponseSetLabel/> element indicates the optional descriptive label for a multiple response set. The <multipleResponseSet> element can contain one <multipleResponseSetLabel/> element. If there is no descriptive label, this element is not present.

The <multipleResponseSetLabel/> element has one attribute, value, that contains the descriptive label text.

Example

<multipleResponseSetLabel value="Multiple Dichotomy Set" />

See the topic multipleResponseSet Element for more information.

Related Topics

multipleResponseSet Element
multipleResponseSetCategoryLabels Element
multipleResponseSetDichtomy Element
multipleResponseSetVariable Element
attributeSet Element


multipleResponseSetVariable Element

The <multipleResponseSetVariable/> element identifies a variable associated with a multiple response set. A <multipleResponseSet> element contains two or more <multipleResponseSetVariable/> elements.

The <multipleResponseSetVariable/> element has a single attribute, name, that contains a variable name.

Example

<multipleResponseSetVariable name="numvar1" />

See the topic multipleResponseSet Element for more information.

Related Topics

multipleResponseSet Element
multipleResponseSetCategoryLabels Element
multipleResponseSetDichtomy Element
multipleResponseSetLabel Element
attributeSet Element


variableSet Element

dictionary schema,dictionary schema,dictionary schema
variableSet element,variableSet element,variableSet element
dictionary element,dictionary element,dictionary element
variableSet schema,variableSet schema,variableSet schema

The <variableSet> element contains information on defined variable sets (used to control the variables displayed in dialog selection lists). The <dictionary> element can contain one or more <variableSet> elements. If there are no variable sets in the active dataset, this element is not present.

The <variableSet> element has one attribute, name, that contains the name of the variable set.

Child Elements

The <variableSet> element contains one or more <variableSetVariable/> elements that identify the variables in the set. The <variableSetVariable/> element has a single attribute, name, that contains the name of a variable in the set.

Example

<variableSet name="SetOne">
  <variableSetVariable name="numvar1" />
  <variableSetVariable name="numvar2" />
</variableSet>

Related Topics

Dictionary Schema Overview
dictionary Element
variable Element
weightVariable Element
valueLabelSet Element
multipleResponseSet Element


attributeSet Element

dictionary schema,dictionary schema,dictionary schema
attributeSet element,attributeSet element,attributeSet element
attributeSet element,attributeSet element,attributeSet element
dictionary schema,dictionary schema,dictionary schema

The <attributeSet> element contains information on variable and/or file attributes (typically defined with the VARIABLE ATTRIBUTE and DATAFILE ATTRIBUTE commands).

• <dictionary> and <variable> elements can contain one or more optional <attributeSet> elements.

• If the element is a child of the <dictionary> element, it is a file attribute set.

• If the element is a child of the <variable> element, it is a variable attribute set.

• <attributeSet> has one attribute, version, that identifies the version number of the set (how many times the set has been modified).

Child Attributes

• The <attributeSet> element has single child element, <attribute>, which in turn has a single child element <attributeValue/>.

• <attributeSet> contains one or more <attribute> elements.

• <attribute> has two attributes: name contains the name of the attribute, and type identifies the type as "user" or "system".

• <attribute> contains one <attributeValue/> element, with one attribute, value, that contains the value of the attribute.

Example

<attributeSet version="1">
  <attribute name="dataAttribute1" type="user">
    <attributeValue value="A datafile attribute" />
  </attribute>
</attributeSet>

Related Topics

multipleResponseSet Element
multipleResponseSetCategoryLabels Element
multipleResponseSetDichtomy Element
multipleResponseSetLabel Element
multipleResponseSetVariable Element


attribute Element

attribute element,attribute element,attribute element

a dataset or variable attribute

Attributes for attribute
Attribute | Use | Description | Valid Values
name | required |  | variableNameType
type | required |  | system user
attribute diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="attribute">
<xs:sequence>
<xs:element ref="di:attributeValue" minOccurs="1" maxOccurs="unbounded"></xs:element>
</xs:sequence>
<xs:attribute name="name" type="di:variableNameType" use="required"></xs:attribute>
<xs:attribute name="type" use="required">
<xs:simpleType>
<xs:restriction base="xs:NMTOKEN">
<xs:enumeration value="system"></xs:enumeration>
<xs:enumeration value="user"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:element>

Parent Elements

attributeSet Element

Child Elements

attributeValue Element


attributeSet Element

attributeSet element,attributeSet element,attributeSet element

a set of dataset or variable attributes

Attributes for attributeSet
Attribute | Use | Description | Valid Values
version | required |  | nonNegativeInteger
attributeSet diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="attributeSet">
<xs:sequence>
<xs:element ref="di:attribute" minOccurs="0" maxOccurs="unbounded"></xs:element>
</xs:sequence>
<xs:attribute name="version" type="xs:nonNegativeInteger" use="required"></xs:attribute>
</xs:element>

Parent Elements

dictionary Element, variable Element

Child Elements

attribute Element


attributeValue Element

attributeValue element,attributeValue element,attributeValue element

Attributes for attributeValue
Attribute | Use | Description | Valid Values
value | required |  | string
attributeValue diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="attributeValue">
<xs:attribute name="value" type="xs:string" use="required"></xs:attribute>
</xs:element>

Parent Elements

attribute Element


dictionary Element

dictionary element,dictionary element,dictionary element

PASW Statistics data dictionary

Attributes for dictionary
Attribute | Use | Description | Valid Values
creationDateTime | optional | Optional creation date and time | dateTime
locale | optional |  | any
rowCount | optional | The number of rows (cases) in the dataset | nonNegativeInteger
dictionary diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="dictionary">
<xs:sequence>
<xs:element ref="di:variable" minOccurs="0" maxOccurs="unbounded"></xs:element>
<xs:element ref="di:weightVariable" minOccurs="0" maxOccurs="1"></xs:element>
<xs:element ref="di:valueLabelSet" minOccurs="0" maxOccurs="unbounded"></xs:element>
<xs:element ref="di:variableSet" minOccurs="0" maxOccurs="unbounded"></xs:element>
<xs:element ref="di:multipleResponseSet" minOccurs="0" maxOccurs="unbounded"></xs:element>
<xs:element ref="di:attributeSet" minOccurs="0" maxOccurs="1"></xs:element>
<xs:element ref="di:extension" minOccurs="0" maxOccurs="unbounded"></xs:element>
</xs:sequence>
<xs:attribute name="locale" use="optional">
<xs:simpleType>
<xs:restriction base="xs:string"></xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="creationDateTime" type="xs:dateTime" use="optional"></xs:attribute>
<xs:attribute name="rowCount" type="xs:nonNegativeInteger" use="optional"></xs:attribute>
</xs:element>

Child Elements

attributeSet Element, extension Element, multipleResponseSet Element, valueLabelSet Element, variable Element, variableSet Element, weightVariable Element


extension Element

extension element,extension element,extension element

For internal use. A PASW Statistics extension encoded in hexadecimal. The element size is in bytes. The length is the number of elements.

Attributes for extension
Attribute | Use | Description | Valid Values
data | optional |  | hexBinary
elementSize | required |  | nonNegativeInteger
length | required |  | nonNegativeInteger
type | required |  | positiveInteger
extension diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="extension">
<xs:attribute name="type" type="xs:positiveInteger" use="required"></xs:attribute>
<xs:attribute name="elementSize" type="xs:nonNegativeInteger" use="required"></xs:attribute>
<xs:attribute name="length" type="xs:nonNegativeInteger" use="required"></xs:attribute>
<xs:attribute name="data" type="xs:hexBinary" use="optional"></xs:attribute>
</xs:element>

Parent Elements

dictionary Element


missingValue Element

missingValue element,missingValue element,missingValue element

Describes a PASW Statistics missing value. The lowerBound and upperBound are inclusive.

Attributes for missingValue
Attribute | Use | Description | Valid Values
data | required |  | lowest highest
type | optional |  | lowerBound upperBound
missingValue diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="missingValue">
<xs:attribute name="type" use="optional">
<xs:simpleType>
<xs:restriction base="xs:NMTOKEN">
<xs:enumeration value="lowerBound"></xs:enumeration>
<xs:enumeration value="upperBound"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="data" type="di:missingDataType" use="required">
<xs:enumeration value="lowest"></xs:enumeration>
<xs:enumeration value="highest"></xs:enumeration>
</xs:attribute>
</xs:element>

Parent Elements

variable Element


multipleResponseSet Element

multipleResponseSet element,multipleResponseSet element,multipleResponseSet element

A multiple response set of PASW Statistics variables, either dichotomous or categorical

Attributes for multipleResponseSet
Attribute | Use | Description | Valid Values
name | required |  | variableNameType
multipleResponseSet diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="multipleResponseSet">
<xs:choice>
<xs:sequence>
<xs:element ref="di:multipleResponseSetLabel" minOccurs="0"></xs:element>
<xs:element ref="di:multipleResponseSetVariable" minOccurs="1" maxOccurs="unbounded"></xs:element>
</xs:sequence>
<xs:sequence>
<xs:element ref="di:multipleResponseSetCategoryLabels"></xs:element>
<xs:element ref="di:multipleResponseSetDichotomy"></xs:element>
<xs:choice minOccurs="0">
<xs:element ref="di:multipleResponseSetLabel"></xs:element>
<xs:element ref="di:multipleResponseSetLabelSource"></xs:element>
</xs:choice>
<xs:element ref="di:multipleResponseSetVariable" minOccurs="1" maxOccurs="unbounded"></xs:element>
</xs:sequence>
</xs:choice>
<xs:attribute name="name" type="di:variableNameType" use="required"></xs:attribute>
</xs:element>

Parent Elements

dictionary Element

Child Elements

multipleResponseSetCategoryLabels Element, multipleResponseSetDichotomy Element, multipleResponseSetLabel Element, multipleResponseSetLabelSource Element, multipleResponseSetVariable Element


multipleResponseSetCategoryLabels Element

multipleResponseSetCategoryLabels element,multipleResponseSetCategoryLabels element,multipleResponseSetCategoryLabels element

Attributes for multipleResponseSetCategoryLabels
Attribute | Use | Description | Valid Values
value | optional |  | variableLabels countedValues
multipleResponseSetCategoryLabels diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="multipleResponseSetCategoryLabels">
<xs:attribute name="value" default="variableLabels">
<xs:simpleType>
<xs:restriction base="xs:NMTOKEN">
<xs:enumeration value="variableLabels"></xs:enumeration>
<xs:enumeration value="countedValues"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:element>

Parent Elements

multipleResponseSet Element


multipleResponseSetDichotomy Element

multipleResponseSetDichotomy element,multipleResponseSetDichotomy element,multipleResponseSetDichotomy element

Attributes for multipleResponseSetDichotomy
Attribute | Use | Description | Valid Values
value | required |  | dataType
multipleResponseSetDichotomy diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="multipleResponseSetDichotomy">
<xs:attribute name="value" type="di:dataType" use="required"></xs:attribute>
</xs:element>

Parent Elements

multipleResponseSet Element


multipleResponseSetLabel Element

multipleResponseSetLabel element,multipleResponseSetLabel element,multipleResponseSetLabel element

Attributes for multipleResponseSetLabel
Attribute | Use | Description | Valid Values
value | required |  | variableNameType
multipleResponseSetLabel diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="multipleResponseSetLabel">
<xs:attribute name="value" type="di:variableNameType" use="required"></xs:attribute>
</xs:element>

Parent Elements

multipleResponseSet Element


multipleResponseSetLabelSource Element

multipleResponseSetLabelSource element,multipleResponseSetLabelSource element,multipleResponseSetLabelSource element

Attributes for multipleResponseSetLabelSource
Attribute | Use | Description | Valid Values
value | optional |  | variableLabel
multipleResponseSetLabelSource diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="multipleResponseSetLabelSource">
<xs:attribute name="value" default="variableLabel">
<xs:simpleType>
<xs:restriction base="xs:NMTOKEN">
<xs:enumeration value="variableLabel"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:element>

Parent Elements

multipleResponseSet Element


multipleResponseSetVariable Element

multipleResponseSetVariable element,multipleResponseSetVariable element,multipleResponseSetVariable element

Attributes for multipleResponseSetVariable
Attribute | Use | Description | Valid Values
name | required |  | variableNameType
multipleResponseSetVariable diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="multipleResponseSetVariable">
<xs:attribute name="name" type="di:variableNameType" use="required"></xs:attribute>
</xs:element>

Parent Elements

multipleResponseSet Element


valueLabel Element

valueLabel element,valueLabel element,valueLabel element

Describes a PASW Statistics value label

Attributes for valueLabel
Attribute | Use | Description | Valid Values
label | required |  | string
value | required |  | dataType
valueLabel diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="valueLabel">
<xs:attribute name="value" type="di:dataType" use="required"></xs:attribute>
<xs:attribute name="label" type="xs:string" use="required"></xs:attribute>
</xs:element>

Parent Elements

valueLabelSet Element


valueLabelSet Element

valueLabelSet element,valueLabelSet element,valueLabelSet element

A set of PASW Statistics value labels

valueLabelSet diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="valueLabelSet">
<xs:sequence>
<xs:element ref="di:valueLabel" minOccurs="0" maxOccurs="unbounded"></xs:element>
<xs:element ref="di:valueLabelVariable" minOccurs="0" maxOccurs="unbounded"></xs:element>
</xs:sequence>
</xs:element>

Parent Elements

dictionary Element

Child Elements

valueLabel Element, valueLabelVariable Element


valueLabelVariable Element

valueLabelVariable element,valueLabelVariable element,valueLabelVariable element

Attributes for valueLabelVariable
Attribute | Use | Description | Valid Values
name | required |  | variableNameType
valueLabelVariable diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="valueLabelVariable">
<xs:attribute name="name" type="di:variableNameType" use="required"></xs:attribute>
</xs:element>

Parent Elements

valueLabelSet Element


variable Element

variable element,variable element,variable element

A PASW Statistics variable

Attributes for variable
Attribute | Use | Description | Valid Values
alignment | required |  | left center right
displayWidth | required |  | nonNegativeInteger
label | optional |  | string
measurementLevel | optional |  | unknown nominal ordinal scale
name | required |  | variableNameType
type | required |  | any
variable diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="variable">
<xs:sequence>
<xs:element name="variableFormat" minOccurs="1" maxOccurs="1"></xs:element>
<xs:element name="variableWriteFormat" minOccurs="1" maxOccurs="1"></xs:element>
<xs:element ref="di:missingValue" minOccurs="0" maxOccurs="3"></xs:element>
<xs:element ref="di:attributeSet" minOccurs="0" maxOccurs="1"></xs:element>
</xs:sequence>
<xs:attribute name="name" type="di:variableNameType" use="required"></xs:attribute>
<xs:attribute name="label" type="xs:string"></xs:attribute>
<xs:attribute name="type" use="required">
<xs:simpleType>
<xs:restriction base="xs:nonNegativeInteger">
<xs:maxInclusive value="32767"></xs:maxInclusive>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="alignment" use="required">
<xs:simpleType>
<xs:restriction base="xs:NMTOKEN">
<xs:enumeration value="left"></xs:enumeration>
<xs:enumeration value="center"></xs:enumeration>
<xs:enumeration value="right"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="measurementLevel" default="unknown">
<xs:simpleType>
<xs:restriction base="xs:NMTOKEN">
<xs:enumeration value="unknown"></xs:enumeration>
<xs:enumeration value="nominal"></xs:enumeration>
<xs:enumeration value="ordinal"></xs:enumeration>
<xs:enumeration value="scale"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="displayWidth" type="xs:nonNegativeInteger" use="required"></xs:attribute>
</xs:element>

Parent Elements

dictionary Element

Child Elements

attributeSet Element, missingValue Element, variableFormat Element, variableWriteFormat Element


variableFormat Element

variableFormat element,variableFormat element,variableFormat element

Attributes for variableFormat
Attribute | Use | Description | Valid Values
decimals | required |  | any
type | required |  | A AHEX COMMA DOLLAR F IB IBHEX P PIB PK RB RBHEX Z N E DATE TIME DATETIME ADATE JDATE DTIME WKDAY MONTH MOYR QYR WKYR PERCENT DOT CCA CCB CCC CCD CCE EDATE SDATE G LNUMBER LDATE LTIME LCA LCB LCC LCD LCE LCF LCG LCH LCI LCJ
width | required |  | any
variableFormat diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="variableFormat" minOccurs="1" maxOccurs="1">
<xs:attribute name="type" use="required">
<xs:simpleType>
<xs:restriction base="xs:NMTOKEN">
<xs:enumeration value="A"></xs:enumeration>
<xs:enumeration value="AHEX"></xs:enumeration>
<xs:enumeration value="COMMA"></xs:enumeration>
<xs:enumeration value="DOLLAR"></xs:enumeration>
<xs:enumeration value="F"></xs:enumeration>
<xs:enumeration value="IB"></xs:enumeration>
<xs:enumeration value="IBHEX"></xs:enumeration>
<xs:enumeration value="P"></xs:enumeration>
<xs:enumeration value="PIB"></xs:enumeration>
<xs:enumeration value="PK"></xs:enumeration>
<xs:enumeration value="RB"></xs:enumeration>
<xs:enumeration value="RBHEX"></xs:enumeration>
<xs:enumeration value="Z"></xs:enumeration>
<xs:enumeration value="N"></xs:enumeration>
<xs:enumeration value="E"></xs:enumeration>
<xs:enumeration value="DATE"></xs:enumeration>
<xs:enumeration value="TIME"></xs:enumeration>
<xs:enumeration value="DATETIME"></xs:enumeration>
<xs:enumeration value="ADATE"></xs:enumeration>
<xs:enumeration value="JDATE"></xs:enumeration>
<xs:enumeration value="DTIME"></xs:enumeration>
<xs:enumeration value="WKDAY"></xs:enumeration>
<xs:enumeration value="MONTH"></xs:enumeration>
<xs:enumeration value="MOYR"></xs:enumeration>
<xs:enumeration value="QYR"></xs:enumeration>
<xs:enumeration value="WKYR"></xs:enumeration>
<xs:enumeration value="PERCENT"></xs:enumeration>
<xs:enumeration value="DOT"></xs:enumeration>
<xs:enumeration value="CCA"></xs:enumeration>
<xs:enumeration value="CCB"></xs:enumeration>
<xs:enumeration value="CCC"></xs:enumeration>
<xs:enumeration value="CCD"></xs:enumeration>
<xs:enumeration value="CCE"></xs:enumeration>
<xs:enumeration value="EDATE"></xs:enumeration>
<xs:enumeration value="SDATE"></xs:enumeration>
<xs:enumeration value="G"></xs:enumeration>
<xs:enumeration value="LNUMBER"></xs:enumeration>
<xs:enumeration value="LDATE"></xs:enumeration>
<xs:enumeration value="LTIME"></xs:enumeration>
<xs:enumeration value="LCA"></xs:enumeration>
<xs:enumeration value="LCB"></xs:enumeration>
<xs:enumeration value="LCC"></xs:enumeration>
<xs:enumeration value="LCD"></xs:enumeration>
<xs:enumeration value="LCE"></xs:enumeration>
<xs:enumeration value="LCF"></xs:enumeration>
<xs:enumeration value="LCG"></xs:enumeration>
<xs:enumeration value="LCH"></xs:enumeration>
<xs:enumeration value="LCI"></xs:enumeration>
<xs:enumeration value="LCJ"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="width" use="required">
<xs:simpleType>
<xs:restriction base="xs:nonNegativeInteger">
<xs:maxInclusive value="32767"></xs:maxInclusive>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="decimals" use="required">
<xs:simpleType>
<xs:restriction base="xs:nonNegativeInteger">
<xs:maxInclusive value="16"></xs:maxInclusive>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:element>

Parent Elements

variable Element


variableWriteFormat Element

variableWriteFormat element,variableWriteFormat element,variableWriteFormat element

Attributes for variableWriteFormat
Attribute | Use | Description | Valid Values
decimals | required |  | any
type | required |  | A AHEX COMMA DOLLAR F IB IBHEX P PIB PK RB RBHEX Z N E DATE TIME DATETIME ADATE JDATE DTIME WKDAY MONTH MOYR QYR WKYR PERCENT DOT CCA CCB CCC CCD CCE EDATE SDATE G LNUMBER LDATE LTIME LCA LCB LCC LCD LCE LCF LCG LCH LCI LCJ
width | required |  | any
variableWriteFormat diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="variableWriteFormat" minOccurs="1" maxOccurs="1">
<xs:attribute name="type" use="required">
<xs:simpleType>
<xs:restriction base="xs:NMTOKEN">
<xs:enumeration value="A"></xs:enumeration>
<xs:enumeration value="AHEX"></xs:enumeration>
<xs:enumeration value="COMMA"></xs:enumeration>
<xs:enumeration value="DOLLAR"></xs:enumeration>
<xs:enumeration value="F"></xs:enumeration>
<xs:enumeration value="IB"></xs:enumeration>
<xs:enumeration value="IBHEX"></xs:enumeration>
<xs:enumeration value="P"></xs:enumeration>
<xs:enumeration value="PIB"></xs:enumeration>
<xs:enumeration value="PK"></xs:enumeration>
<xs:enumeration value="RB"></xs:enumeration>
<xs:enumeration value="RBHEX"></xs:enumeration>
<xs:enumeration value="Z"></xs:enumeration>
<xs:enumeration value="N"></xs:enumeration>
<xs:enumeration value="E"></xs:enumeration>
<xs:enumeration value="DATE"></xs:enumeration>
<xs:enumeration value="TIME"></xs:enumeration>
<xs:enumeration value="DATETIME"></xs:enumeration>
<xs:enumeration value="ADATE"></xs:enumeration>
<xs:enumeration value="JDATE"></xs:enumeration>
<xs:enumeration value="DTIME"></xs:enumeration>
<xs:enumeration value="WKDAY"></xs:enumeration>
<xs:enumeration value="MONTH"></xs:enumeration>
<xs:enumeration value="MOYR"></xs:enumeration>
<xs:enumeration value="QYR"></xs:enumeration>
<xs:enumeration value="WKYR"></xs:enumeration>
<xs:enumeration value="PERCENT"></xs:enumeration>
<xs:enumeration value="DOT"></xs:enumeration>
<xs:enumeration value="CCA"></xs:enumeration>
<xs:enumeration value="CCB"></xs:enumeration>
<xs:enumeration value="CCC"></xs:enumeration>
<xs:enumeration value="CCD"></xs:enumeration>
<xs:enumeration value="CCE"></xs:enumeration>
<xs:enumeration value="EDATE"></xs:enumeration>
<xs:enumeration value="SDATE"></xs:enumeration>
<xs:enumeration value="G"></xs:enumeration>
<xs:enumeration value="LNUMBER"></xs:enumeration>
<xs:enumeration value="LDATE"></xs:enumeration>
<xs:enumeration value="LTIME"></xs:enumeration>
<xs:enumeration value="LCA"></xs:enumeration>
<xs:enumeration value="LCB"></xs:enumeration>
<xs:enumeration value="LCC"></xs:enumeration>
<xs:enumeration value="LCD"></xs:enumeration>
<xs:enumeration value="LCE"></xs:enumeration>
<xs:enumeration value="LCF"></xs:enumeration>
<xs:enumeration value="LCG"></xs:enumeration>
<xs:enumeration value="LCH"></xs:enumeration>
<xs:enumeration value="LCI"></xs:enumeration>
<xs:enumeration value="LCJ"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="width" use="required">
<xs:simpleType>
<xs:restriction base="xs:nonNegativeInteger">
<xs:maxInclusive value="32767"></xs:maxInclusive>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="decimals" use="required">
<xs:simpleType>
<xs:restriction base="xs:nonNegativeInteger">
<xs:maxInclusive value="16"></xs:maxInclusive>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:element>

Parent Elements

variable Element


variableSet Element

variableSet element,variableSet element,variableSet element

A named subset of PASW Statistics variables

Attributes for variableSet
Attribute | Use | Description | Valid Values
name | required |  | variableNameType
variableSet diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="variableSet">
<xs:sequence>
<xs:element ref="di:variableSetVariable" minOccurs="0" maxOccurs="unbounded"></xs:element>
</xs:sequence>
<xs:attribute name="name" type="di:variableNameType" use="required"></xs:attribute>
</xs:element>

Parent Elements

dictionary Element

Child Elements

variableSetVariable Element


variableSetVariable Element

variableSetVariable element,variableSetVariable element,variableSetVariable element

Attributes for variableSetVariable
Attribute | Use | Description | Valid Values
name | required |  | variableNameType
variableSetVariable diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="variableSetVariable">
<xs:attribute name="name" type="di:variableNameType" use="required"></xs:attribute>
</xs:element>

Parent Elements

variableSet Element


weightVariable Element

weightVariable element,weightVariable element,weightVariable element

The name of the case weight variable

Attributes for weightVariable
Attribute | Use | Description | Valid Values
name | required |  | variableNameType
weightVariable diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="weightVariable">
<xs:attribute name="name" type="di:variableNameType" use="required"></xs:attribute>
</xs:element>

Parent Elements

dictionary Element


Extension XML Schema

extension commands,extension commands,extension commands
XML specification of syntax,XML specification of syntax,XML specification of syntax
extension schema,extension schema,extension schema

The Extension XML schema is an XML schema for specifying the command syntax for extension commands. Extension commands provide the ability to wrap programs written in Python or R in PASW Statistics command syntax. They allow users who are proficient in Python or R to share external functions with users of PASW Statistics command syntax. Extension commands require the PASW Statistics Integration Plug-In for the language in which the command is implemented--Python or R.

This section provides a reference for all elements in the extension schema. Each topic lists the valid attributes for an element and its parent and child elements. A tutorial on creating extension commands for R is available by choosing "Working with R" from the Help menu.

Show me

Additional information on creating extension commands is available from the following sources:

• The article "Writing PASW Statistics Extension Commands", available from Developer Central at http://www.spss.com/devcentral.

• The chapter on Extension Commands in Programming and Data Management for PASW Statistics, available in PDF from http://www.spss.com/spss/data_management_book.htm.

Related Topics

Working with Arbitrary Tokens
Examples


Command Element

Command element,Command element,Command element

The top-level element, also known as the document or root element. This element contains a complete command syntax specification of an extension command.

Attributes for Command
Attribute | Use | Description | Valid Values
Language | optional | The programming language in which the command is implemented. Defaults to Python. | Python R
Mode | optional | Specifies whether the implementation code is contained in an R source file or an R package. Only applies for Language="R". Defaults to Source. | Source Package
Name | required | The name of the command. For release 16.0.1, the name must be a single word in upper case with a maximum of 8 bytes. For release 17.0 and higher, the name can consist of up to three words (case insensitive) separated by spaces. Command names are restricted to 7-bit ascii characters. For multi-word command names, ensure that the first word as well as the first two words do not match the name of another command. For example, do not use the name CMD NEW if there is a command named CMD. Likewise, do not use the name MY CMD NEW if there is a command named MY CMD. | any
Command diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="Command" type="command-content">
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="Subcommand"></xs:element>
</xs:sequence>
<xs:attribute name="Name" use="required"></xs:attribute>
<xs:attribute name="Language">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="Python"></xs:enumeration>
<xs:enumeration value="R"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="Mode">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="Source"></xs:enumeration>
<xs:enumeration value="Package"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:element>

Child Elements

Subcommand Element


Parameter Element

Parameter element,Parameter element,Parameter element

A parameter controls a specific piece of a command's functionality. There are many types of parameters so that the Parameter element is flexible enough to cover the different types of functionality provided by parameters. Subcommands contain zero or more parameters.

Attributes for Parameter
Attribute Use Description Valid Values

Name

required

The name of the parameter. Parameter names are restricted to 7-bit ascii characters and must start with a letter or one of the characters @, #, or $. Subsequent characters can be any combination of letters, numbers, nonpunctuation characters, and a period (.).

any

ParameterType

required

DatasetName. Specifies a dataset name. The value will be checked for syntax correctness (same rules as for variable names) but not existence. The case is preserved when passed to the Run function.

Integer. A number with no fractional part after conversion. Optionally, you can specify a set of allowed keyword values for an Integer parameter, using EnumValue elements.

IntegerList. A blank or comma separated list of Integer types.

Keyword. Specifies a value that adheres to the same rules as the Name attribute of a Parameter element. The value is passed in upper case to the Run function. You can specify the set of allowed values using EnumValue elements. Keyword type parameters must be assigned values. To specify a keyword without an associated value, use the LeadingToken type.

KeywordList. Specifies a comma or blank separated list of values that adhere to the same rules as the Name attribute of a Parameter element. To specify a list of values not bound by these rules, use the TokenList type. You can specify the set of allowed values using EnumValue elements.

LeadingToken. Specifies a parameter that has a name (given by the Name attribute of the Parameter element) but no associated value. The name is passed in upper case to the Run function.

Number. A number, possibly in scientific notation using e or E. Optionally, you can specify a set of allowed keyword values for a Number parameter, using EnumValue elements.

NumberList. A blank or comma separated list of Number types.

QuotedString. A string enclosed in single or double quotes. The case is preserved when passed to the Run function. Optionally, you can specify a set of allowed keyword values (unquoted) for a QuotedString parameter, using EnumValue elements.

TokenList. Specifies a comma or blank separated list of values. Case is preserved when values are passed to the Run function. The TokenList type is similar to the KeywordList type but TokenList values are not bound by the rules required of KeywordList values.

VariableName. Specifies a variable name. The value will be checked for syntax correctness (see the rules for variable names in the Command Syntax Reference) but not existence. The case is preserved when passed to the Run function.

VariableNameList. Specifies a list of variable names. Each name in the list will be checked for syntax correctness but not existence. Case is preserved when values are passed to the Run function. The TO and ALL keywords are not supported.

InputFile. A file specification for an input file. The specified file must exist. The case is preserved when passed to the Run function.

OutputFile. A file specification for an output file. The specified directory path must exist and either the specified file does not exist or, if it exists, it must be writable. The case is preserved when passed to the Run function.

Parameter diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="Parameter" type="parameter-content">
<xs:sequence maxOccurs="unbounded" minOccurs="0">
<xs:element name="EnumValue"></xs:element>
</xs:sequence>
<xs:attribute name="Name" use="required"></xs:attribute>
<xs:attribute name="ParameterType" use="required">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="DatasetName"></xs:enumeration>
<xs:enumeration value="Integer"></xs:enumeration>
<xs:enumeration value="IntegerList"></xs:enumeration>
<xs:enumeration value="Keyword"></xs:enumeration>
<xs:enumeration value="KeywordList"></xs:enumeration>
<xs:enumeration value="LeadingToken"></xs:enumeration>
<xs:enumeration value="Number"></xs:enumeration>
<xs:enumeration value="NumberList"></xs:enumeration>
<xs:enumeration value="QuotedString"></xs:enumeration>
<xs:enumeration value="TokenList"></xs:enumeration>
<xs:enumeration value="VariableName"></xs:enumeration>
<xs:enumeration value="VariableNameList"></xs:enumeration>
<xs:enumeration value="InputFile"></xs:enumeration>
<xs:enumeration value="OutputFile"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:element>

Parent Elements

Subcommand Element

Child Elements

EnumValue Element


EnumValue Element

EnumValue element,EnumValue element,EnumValue element

EnumValue is used to enumerate a set of allowed values. EnumValue elements are ignored except for Keyword, KeywordList, Number, Integer, and QuotedString parameters. When used with Keyword or KeywordList parameters, the specified EnumValue elements represent the complete set of allowed values. When used with Number, Integer, or QuotedString parameters, the specified EnumValue elements represent a set of valid keywords in addition to the specified type. For example, the value AUTO might be specified as an allowed keyword value for an Integer parameter. The parameter can then be specified as an integer or the unquoted string AUTO.

Attributes for EnumValue
Attribute | Use | Description | Valid Values
Name | required | The enumerated value. Case is ignored. | any
EnumValue diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="EnumValue">
<xs:attribute name="Name" use="required"></xs:attribute>
</xs:element>

Parent Elements

Parameter Element


Subcommand Element

Subcommand element,Subcommand element,Subcommand element

Subcommands divide a command's functionality into distinct groups. Typical subcommands include SAVE for specifying variables to be saved to the active dataset, PRINT for specifying tabular output, and PLOT for specifying chart output. A subcommand can only be specified once per command.

Attributes for Subcommand
Attribute | Use | Description | Valid Values
IsArbitrary | optional | Allows arbitrary tokens on the subcommand. This is useful, for example, for specifying variable lists and model effect lists. | True. False. Yes. Equivalent to True. No. Equivalent to False.
Name | required | The name of the subcommand. Subcommand names are restricted to 7-bit ascii characters and start with a letter or one of the characters @, #, or $. Subsequent characters can be any combination of letters, numbers, nonpunctuation characters, and a period (.). To specify the anonymous subcommand, use Name="". | any
Occurrence | optional | Specifies whether the subcommand must be included in a syntax job for the command to run. | Required Optional
Subcommand diagram
XML Representation Collapse Hide details

XML Representation

<xs:element name="Subcommand" type="subcommand-content">
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="Parameter"></xs:element>
</xs:sequence>
<xs:attribute name="Name" use="required"></xs:attribute>
<xs:attribute name="Occurrence">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="Required"></xs:enumeration>
<xs:enumeration value="Optional"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="IsArbitrary">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="True"></xs:enumeration>
<xs:enumeration value="False"></xs:enumeration>
<xs:enumeration value="Yes"></xs:enumeration>
<xs:enumeration value="No"></xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:element>

Parent Elements

Command Element

Child Elements

Parameter Element


Working with Arbitrary Tokens

TokenList parameter types and Subcommand elements with IsArbitrary=True consist of arbitrary tokens, such as character strings, literals (strings delimited by single or double quotes), and operators like '>'. Typical scenarios where arbitrary tokens are required include variable lists that may contain BY or WITH specifications and model effects lists. For example, a subcommand that allows arbitrary tokens for specifying model interaction effects might be given as:

/MODEL var1*var2(var3)

When parsed, this results in the following list of six tokens passed to the Run function of the implementation code.

['var1','*','var2','(','var3',')']

Likewise, an anonymous subcommand that allows arbitrary tokens to specify variables with optional BY or WITH keywords might be specified as:

DepVar BY A B WITH X Y

When parsed, this results in the following list of seven tokens passed to the Run function of the implementation code.

['DepVar','BY','A','B','WITH','X','Y']

When working with arbitrary tokens you'll want to test the various forms of input that your implementation function will need to handle, since the tokens that result from the specified input may not always be what you expect. For example, a TokenList parameter named TOKENS might be specified as:

TOKENS = 1a 2b

When parsed, this results in the following list of four tokens passed to the Run function of the implementation code.

['1','a','2','b']

The result reflects the standard way that PASW Statistics tokenizes command syntax. In particular, when a set of digits precedes a set of characters, the digits are treated as a separate token. You can force a set of characters to be passed as a single token by enclosing them in quotes. For example, specifying TOKENS = '1a' '2b' results in the token list ['1a','2b']. The same applies if you need to specify multi-word phrases and have each phrase passed as a single token. For example, TOKENS = 'two words' results in the single token 'two words'.

Related Topics

Extension XML Schema
Examples


Examples

Using the Keyword Type

The Keyword type is used to specify a parameter that takes a single value. As an example, consider an OPTIONS subcommand with a parameter for controlling missing values, and represented in the syntax diagram as:

/OPTIONS MISSING={PAIRWISE}
                 {LISTWISE}

The specification of MISSING is best handled with a Keyword type parameter. The XML syntax specification for the OPTIONS subcommand is:

<Subcommand Name="OPTIONS">
   <Parameter Name="MISSING" ParameterType="Keyword">
      <EnumValue Name="PAIRWISE"/>
      <EnumValue Name="LISTWISE"/>
   </Parameter>
</Subcommand>

An example of command syntax containing the OPTIONS subcommand is:

/OPTIONS MISSING=LISTWISE

The Keyword type always requires the parameter name, followed by an equals sign, followed by a single value.

Using the KeywordList Type

The KeywordList type is used to specify a parameter that can take on multiple values. As an example, consider an OPTIONS subcommand with a parameter for specifying one or more file types from a fixed set, and represented in the syntax diagram as:

/OPTIONS FILETYPES=[SAV SAS STATA]

The specification of FILETYPES is best handled with a KeywordList type parameter. The XML syntax specification for the OPTIONS subcommand is:

<Subcommand Name="OPTIONS">
   <Parameter Name="FILETYPES" ParameterType="KeywordList">
      <EnumValue Name="SAV"/>
      <EnumValue Name="SAS"/>
      <EnumValue Name="STATA"/>
   </Parameter>
</Subcommand>

An example of command syntax containing the OPTIONS subcommand is:

/OPTIONS FILETYPES=SAV SAS

The KeywordList type always requires the parameter name, followed by an equals sign, followed by one or more values.

Using the LeadingToken Type

The LeadingToken type is used to specify a parameter that has a name but no associated value. As an example, consider a PLOT subcommand for specifying types of plots to include in output, and represented in the syntax diagram as:

/PLOT OBSERVED FORECAST FIT

The specification of PLOT is best handled with a set of LeadingToken type parameters. The XML syntax specification for the PLOT subcommand is:

<Subcommand Name="PLOT">
   <Parameter Name="OBSERVED" ParameterType="LeadingToken"/>
   <Parameter Name="FORECAST" ParameterType="LeadingToken"/>
   <Parameter Name="FIT" ParameterType="LeadingToken"/>
</Subcommand>

An example of command syntax containing the PLOT subcommand is:

/PLOT OBSERVED FIT

Using the TokenList Type

The TokenList type is used to specify a parameter that can take on multiple values. It is similar to the KeywordList type but TokenList values are not bound by the rules required of KeywordList values. As an example, consider a MODEL subcommand with a parameter for specifying model interaction effects, and represented in the syntax diagram as:

/MODEL EFFECTS=effect-list

The specification of the effects list is handled with a TokenList type parameter. The XML syntax specification for the MODEL subcommand is:

<Subcommand Name="MODEL">
   <Parameter Name="EFFECTS" ParameterType="TokenList"/>
</Subcommand>

An example of command syntax containing the MODEL subcommand is:

/MODEL EFFECTS=A*B C(D)

Related Topics

Extension XML Schema
Working with Arbitrary Tokens


Introduction to Algorithms

Throughout much of the documentation, we avoid detailed discussion of the inner workings of procedures in order to promote readability. The algorithms documents are designed as a resource for those interested in the specific calculations performed by procedures.

The algorithms are available in two forms:

• Integrated into the overall Help system. In the Contents tab, there is a section labeled "Algorithms" which contains all the algorithms in alphabetic order. In the Index tab, each procedure's main index entry has a second-level "algorithms" index entry.

• As a separate document in PDF format, available on the Manuals CD.

Related Topics

Algorithms Used in Multiple Procedures
Choice of Formulas
Missing Values

Links to Algorithms

2SLS Algorithms
ACF/PACF Algorithms
AIM Algorithms
ALSCAL Algorithms
ANACOR Algorithms
ANOVA Algorithms
AREG Algorithms
ARIMA Algorithms
Automated Data Preparation Algorithms
Bootstrapping Algorithms
CATPCA Algorithms
CATREG Algorithms
CCF Algorithms
CLUSTER Algorithms
Cluster Evaluation Algorithms
CNLR Algorithms
CONJOINT Algorithms
CORRELATIONS Algorithms
CORRESPONDENCE Algorithms
COXREG Algorithms
CREATE Algorithms
CROSSTABS Algorithms
CSCOXREG Algorithms
CSDESCRIPTIVES Algorithms
CSGLM Algorithms
CSLOGISTIC Algorithms
CSORDINAL Algorithms
CSSELECT Algorithms
CSTABULATE Algorithms
Complex Samples: Covariance Matrix of Total
Complex Samples: Model Testing
CTABLES Algorithms
CURVEFIT Algorithms
DESCRIPTIVES Algorithms
DETECTANOMALY Algorithms
DISCRIMINANT Algorithms
ERROR BARS Algorithms
EXAMINE Algorithms
EXSMOOTH Algorithms
FACTOR Algorithms
FIT Algorithms
FREQUENCIES Algorithms
GENLIN Algorithms
GENLOG Multinomial Loglinear and Logit Models Algorithms
GENLOG Poisson Loglinear Model Algorithms
GLM Algorithms
HILOGLINEAR Algorithms
HOMALS Algorithms
KM Algorithms
KNN Algorithms
LOGISTIC REGRESSION Algorithms
LOGLINEAR Algorithms
MANOVA Algorithms
MEANS Algorithms
MIXED Algorithms
MLP Algorithms
MULTIPLE CORRESPONDENCE Algorithms
Multiple Imputation Algorithms
Multiple Imputation: Pooling Algorithms
MVA Algorithms
NAIVE BAYES Algorithms
NLR Algorithms
NOMREG Algorithms
NONPAR CORR Algorithms
Nonparametric Tests Algorithms
NPAR TESTS Algorithms
ONEWAY Algorithms
OPTIMAL BINNING Algorithms
ORTHOPLAN Algorithms
OVERALS Algorithms
PARTIAL CORR Algorithms
PLS Algorithms
PLUM Algorithms
PPLOT Algorithms
PRINCALS Algorithms
PROBIT Algorithms
PROXIMITIES Algorithms
PROXSCAL Algorithms
QUICK CLUSTER Algorithms
RANK Algorithms
RATIO STATISTICS Algorithms
RBF Algorithms
REGRESSION Algorithms
RELIABILITY Algorithms
RMV Algorithms
ROC Algorithms
SAMPLE Algorithms
SEASON Algorithms
SELECTPRED
SPCHART Algorithms
SPECTRA Algorithms
SURVIVAL Algorithms
T Test Algorithms
TREE Algorithms
TSMODEL Algorithms
TWOSTEP CLUSTER Algorithms
VARCOMP Algorithms
WLS Algorithms
Significance Level of a Standard Normal Deviate
Significance of a t Statistic
Significance of a Chi-Square Statistic
Significance of an F Statistic
Significance Levels for Fisher's Exact Test
Sorting and Searching
Generation of Uniform Random Numbers
Grouped Percentiles
Indicator Method
Post Hoc Tests
Sums of Squares
Distribution and Special Functions
Box's M Test
Confidence Intervals for Percentages and Counts Algorithms


Algorithms Used in Multiple Procedures

algorithms,algorithms,algorithms
used in multiple procedures,used in multiple procedures,used in multiple procedures

For some statistics, such as the significance of a t test, the same algorithms are used in more than one procedure. Another example is the group of post hoc tests that are used in ONEWAY and GLM. You can find algorithms for these tests in the appendixes.

Related Topics

Generation of Uniform Random Numbers
Box's M Test
Distribution and Special Functions
Grouped Percentiles
Indicator Method
Post Hoc Tests
Significance of a Chi-Square Statistic
Significance of an F Statistic
Significance Levels for Fisher's Exact Test
Significance Level of a Standard Normal Deviate
Significance of a t Statistic
Sorting and Searching
Sums of Squares
Introduction to Algorithms
Choice of Formulas
Missing Values


Choice of Formulas

algorithms,algorithms,algorithms
choice of formulas,choice of formulas,choice of formulas

Starting with the first statistics course, students learn that there are often several equivalent ways to compute the same quantity. For example, the variance can be obtained using either of the following formulas:

s2=NΣi=1(xi−x)2/(N−1)
s2=(NΣi=1x2i−(NΣi=1xi)2/N)/(N−1)

Since the formulas are algebraically equal, the one preferred is often the one easier to use (or remember). For small data sets consisting of “nice” numbers, the arbitrary choice of several computational methods is usually of little consequence. However, for handling large data sets or “troublesome” numbers, the choice of computational algorithms can become very important, even when those algorithms are to be executed by a computer. Care must be taken to choose an algorithm that produces accurate results under a wide variety of conditions without requiring extensive computer time. Often, these two considerations must be balanced against each other.

You may notice that the same statistic is computed differently in various routines. Among the reasons for this are the precision of the calculations and the desirability of computing many statistics in the same procedure. For example, in the paired t test procedure (T-TEST), the need to compute both the correlation coefficient and the standard error of the difference led to the selection of a different algorithm than would have been chosen for computation of only the standard error. Throughout the years of development, the personal preferences of many designers and programmers have also influenced the choice of algorithms. Now, as new routines are added and old ones are updated, any unnecessary diversity is being replaced by a consistent core of algorithms.

Related Topics

Introduction to Algorithms
Algorithms Used in Multiple Procedures
Missing Values


Missing Values

algorithms,algorithms,algorithms
missing values,missing values,missing values

Since similar options for treatment of missing values are available in many procedures, treatment of missing values has often not been specified in each chapter. Instead, the following rules should be used:

• If listwise deletion has been specified and a missing value is encountered, the case is not included in the analysis. This is equivalent, for purposes of following the algorithms, to setting the case weight to zero.

• If variable-wise deletion is in effect, a case has zero weight when the variable with missing values is involved in computations.

• If pairwise deletion has been specified, a case has zero weight when one or both of a pair of variables included in a computation is missing.

• If missing-values declarations are to be ignored, all cases are always included in the computation.

It should be noted again that the computer routines do not alter case weights for cases with missing data but, instead, actually exclude them from the computations. Missing-value specifications do not apply when a variable is used for weighting. All values are treated as weights.

Related Topics

Introduction to Algorithms
Algorithms Used in Multiple Procedures
Choice of Formulas


2SLS Algorithms

2SLS (command),2SLS (command),2SLS (command)
algorithms,algorithms,algorithms
Two-Stage Least-Squares Regression,Two-Stage Least-Squares Regression,Two-Stage Least-Squares Regression
algorithms,algorithms,algorithms
two-stage least-squares algorithms,two-stage least-squares algorithms,two-stage least-squares algorithms

2SLS produces the two-stage least-squares estimation for a structure of simultaneous linear equations.

Related Topics

Notation (two-stage least-squares algorithms)
Model (two-stage least-squares algorithms)
Estimation (two-stage least-squares algorithms)
Computational Details (two-stage least-squares algorithms)
References (two-stage least-squares algorithms)


Notation (two-stage least-squares algorithms)

two-stage least-squares algorithms,two-stage least-squares algorithms,two-stage least-squares algorithms
notation,notation,notation

The following notation is used throughout this chapter unless otherwise stated:

p | Number of predictors
p1 | Number of endogenous variables among p predictors
p2 | Number of non-endogenous variables among p predictors
k | Number of instrument variables
n | Number of cases
y | n×1 vector which consists of a sample of the dependent variable
Z | n×p matrix which represents observed predictors
β | p×1 parameter vector
X | n×1 matrix with element xij, which represents the observed value of the jth instrumental variable for case i.
Z1 | Submatrix of Z with dimension n×p1, which represents observed endogenous variables
Z2 | Submatrix of Z with dimension n×p2, which represents observed non-endogenous variables
β1 | Subvector of β with parameters associated with Z1
β2 | Subvector of β with parameters associated with Z2

Related Topics

2SLS Algorithms
Model (two-stage least-squares algorithms)
Estimation (two-stage least-squares algorithms)
Computational Details (two-stage least-squares algorithms)
References (two-stage least-squares algorithms)


Model (two-stage least-squares algorithms)

two-stage least-squares algorithms,two-stage least-squares algorithms,two-stage least-squares algorithms
model,model,model

The structure equations of interest are written in the form:

y=Zβ=[Z1,Z2][
β 1
β 2
]+ε

Z1=Xγ+δ

where

Z=[Z1,Z2]
, β=[
β1
β2
]

and ε and δ are the disturbances with zero means and covariance matrices σ2In and ζ2In, respectively.

Related Topics

2SLS Algorithms
Notation (two-stage least-squares algorithms)
Estimation (two-stage least-squares algorithms)
Computational Details (two-stage least-squares algorithms)
References (two-stage least-squares algorithms)


Estimation (two-stage least-squares algorithms)

two-stage least-squares algorithms,two-stage least-squares algorithms,two-stage least-squares algorithms
estimation,estimation,estimation

The estimation technique used was developed by Theil; (Theil, 1953), (Theil, 1953). First premultiply both sides of the model equation by X´ to obtain

X´y=X´Zβ+X´ε

Since the disturbance vector has zero mean and covariance matrix σ2(X´X), then (X´X)−12X´ε would have a covariance matrix σ2In. Thus, multiplying (X´X)−12 to both sides of the above equation results in a multiple linear regression model

(X´X)−12X´y=(X´X)−12X´Zβ+(X´X)−12X´ε

The ordinary least-square estimator
^
β
for β is

^
β
=(Z´X(X´X)−1X´Z)−1Z´X(X´X)−1X´y

Related Topics

2SLS Algorithms
Notation (two-stage least-squares algorithms)
Model (two-stage least-squares algorithms)
Computational Details (two-stage least-squares algorithms)
References (two-stage least-squares algorithms)


Computational Details (two-stage least-squares algorithms)

2SLS constructs a matrix R,

R=[
1 | V´
V | M
]

where

M=Czx(Cxx)−1C´zx
V=Czx(Cxx)−1C´xy

and Czx is the correlation matrix between Z and X, and Cxx is the correlation matrix among instrumental variables.

Sweep the matrix R to obtain regression coefficient estimate for β.

Compute sum of the squares of residuals (SSE) by

y´y−uZ´y−y´Zu´+uZ´Zu´

where

u=y´X(X´X)−1X´z[z´X(X´X)−1X´z]−1

Compute the statistics for the ANOVA table and for variables in the equation. See the topic REGRESSION Algorithms for more information.

Related Topics

2SLS Algorithms
Notation (two-stage least-squares algorithms)
Model (two-stage least-squares algorithms)
Estimation (two-stage least-squares algorithms)
References (two-stage least-squares algorithms)


References (two-stage least-squares algorithms)

two-stage least-squares algorithms,two-stage least-squares algorithms,two-stage least-squares algorithms
references,references,references

Theil, H. 1953. Repeated least square applied to complete equation systems. Netherlands: The Hague: Central Planning Bureau.

Theil, H. 1953. Estimation and simultaneous correlation in complete equation systems. Netherlands: The Hague: Central Planning Bureau.

Related Topics

2SLS Algorithms
Notation (two-stage least-squares algorithms)
Model (two-stage least-squares algorithms)
Estimation (two-stage least-squares algorithms)
Computational Details (two-stage least-squares algorithms)


ACF/PACF Algorithms

ACF (command),ACF (command),ACF (command)
algorithms,algorithms,algorithms
PACF (command),PACF (command),PACF (command)
algorithms,algorithms,algorithms
autocorrelation,autocorrelation,autocorrelation
algorithms,algorithms,algorithms
ACF/PACF algorithms,ACF/PACF algorithms,ACF/PACF algorithms

Procedures ACF and PACF print and plot the sample autocorrelation and partial autocorrelation functions of a series of data.

Related Topics

Notation (ACF/PACF algorithms)
Basic Statistics
Sample Autocorrelation
Standard Error of Sample Autocorrelation
Box-Ljung Statistic
Sample Partial Autocorrelation
Standard Error of Sample Partial Autocorrelation
Series with Missing Values
Sample Autocorrelation
Standard Error of Sample Autocorrelation
Box-Ljung Statistic
Standard Error of Sample Partial Autocorrelation
References


Notation (ACF/PACF algorithms)

ACF/PACF algorithms,ACF/PACF algorithms,ACF/PACF algorithms
notation,notation,notation

The following notation is used throughout this chapter unless otherwise stated:

xi

ith observation of input series, i=1,...,n

rk

kth lag sample autocorrelation

^
φ
kk

kth lag sample partial autocorrelation

Related Topics

ACF/PACF Algorithms
Basic Statistics
Sample Autocorrelation
Standard Error of Sample Autocorrelation
Box-Ljung Statistic
Sample Partial Autocorrelation
Standard Error of Sample Partial Autocorrelation
Series with Missing Values
Sample Autocorrelation
Standard Error of Sample Autocorrelation
Box-Ljung Statistic
Standard Error of Sample Partial Autocorrelation
References


Basic Statistics

ACF/PACF algorithms,ACF/PACF algorithms,ACF/PACF algorithms
basic statistics,basic statistics,basic statistics

The following formulas are used if no missing values are encountered. If missing values are present, see Series with Missing Values for modification of some formulas.

Related Topics

ACF/PACF Algorithms
Notation (ACF/PACF algorithms)
Sample Autocorrelation
Standard Error of Sample Autocorrelation
Box-Ljung Statistic
Sample Partial Autocorrelation
Standard Error of Sample Partial Autocorrelation
Series with Missing Values
Sample Autocorrelation
Standard Error of Sample Autocorrelation
Box-Ljung Statistic
Standard Error of Sample Partial Autocorrelation
References


Sample Autocorrelation

autocorrelation,autocorrelation,autocorrelation
ACF/PACF algorithms,ACF/PACF algorithms,ACF/PACF algorithms

rk=n−kΣi=1(xi−x)(xi+k−x)nΣi=1(xi−x)2

where x is the average of the n observations.

Related Topics

ACF/PACF Algorithms
Notation (ACF/PACF algorithms)
Basic Statistics
Standard Error of Sample Autocorrelation
Box-Ljung Statistic
Sample Partial Autocorrelation
Standard Error of Sample Partial Autocorrelation
Series with Missing Values
Sample Autocorrelation
Standard Error of Sample Autocorrelation
Box-Ljung Statistic
Standard Error of Sample Partial Autocorrelation
References


Standard Error of Sample Autocorrelation

There are two formulas for the standard error of rk based on different assumptions about the autocorrelation. Under the assumption that the true MA order of the process is k−1, the approximate variance of rk(Bartlett, 1946) is:

var(rk)
˜
=
1n(1+2k−1Σl=1r2l)

The standard error is the square root (Box and Jenkins, 1976), p. 35. Under the assumption that the process is white noise,

var(rk)
˜
=
1n(n−kn+2)

Related Topics

ACF/PACF Algorithms
Notation (ACF/PACF algorithms)
Basic Statistics
Sample Autocorrelation
Box-Ljung Statistic
Sample Partial Autocorrelation
Standard Error of Sample Partial Autocorrelation
Series with Missing Values
Sample Autocorrelation
Standard Error of Sample Autocorrelation
Box-Ljung Statistic
Standard Error of Sample Partial Autocorrelation
References


Box-Ljung Statistic

Box-Ljung statistic,Box-Ljung statistic,Box-Ljung statistic
ACF/PACF algorithms,ACF/PACF algorithms,ACF/PACF algorithms

At lag k, the Box-Ljung statistic is defined by

Qk=n(n+2)kΣl=1r2ln−l

When n is large, Qk has a chi-square distribution with degrees of freedom k−p−q, where p and q are autoregressive and moving average orders, respectively. The significance level of Qk is calculated from the chi-square distribution with k−p−q degrees of freedom.

Related Topics

ACF/PACF Algorithms
Notation (ACF/PACF algorithms)
Basic Statistics
Sample Autocorrelation
Standard Error of Sample Autocorrelation
Sample Partial Autocorrelation
Standard Error of Sample Partial Autocorrelation
Series with Missing Values
Sample Autocorrelation
Standard Error of Sample Autocorrelation
Box-Ljung Statistic
Standard Error of Sample Partial Autocorrelation
References


Sample Partial Autocorrelation

partial autocorrelation,partial autocorrelation,partial autocorrelation
ACF/PACF algorithms,ACF/PACF algorithms,ACF/PACF algorithms

^
φ
11=r1
^
φ
22=(r2−r21)/(1−r21)
^
φ
kj=
^
φ
k−1,j−φkkφk−1, k−j   k=2,...,   j=1,2,...,k−1
^
φ
kk=(rk−k−1Σj=1φk−1,jrk−j)/(1−k−1Σj=1φk−1,jrj),   k=3,...

Related Topics

ACF/PACF Algorithms
Notation (ACF/PACF algorithms)
Basic Statistics
Sample Autocorrelation
Standard Error of Sample Autocorrelation
Box-Ljung Statistic
Standard Error of Sample Partial Autocorrelation
Series with Missing Values
Sample Autocorrelation
Standard Error of Sample Autocorrelation
Box-Ljung Statistic
Standard Error of Sample Partial Autocorrelation
References


Standard Error of Sample Partial Autocorrelation

Under the assumption that the AR(p) model is correct and p≤k−1,

^
φ
kkN(0,1n)(Quenouville, 1949)

Thus

var(
^
φ
kk)1n

Related Topics

ACF/PACF Algorithms
Notation (ACF/PACF algorithms)
Basic Statistics
Sample Autocorrelation
Standard Error of Sample Autocorrelation
Box-Ljung Statistic
Sample Partial Autocorrelation
Series with Missing Values
Sample Autocorrelation
Standard Error of Sample Autocorrelation
Box-Ljung Statistic
Standard Error of Sample Partial Autocorrelation
References


Series with Missing Values

ACF/PACF algorithms,ACF/PACF algorithms,ACF/PACF algorithms
missing values,missing values,missing values

If there are missing values in x, the following statistics are computed differently (Cryer, 1986). First, define

x= average of nonmissing x1 , ... , xn ,

ai={
xi−x, | if xi is not missing
SYSMIS, | if xi is missing

for k=0,1,2,..., and j=1,...,n

b(k)j={
ajaj+k, | if both are not missing
SYSMIS, | otherwise

mk= the number of nonmissing values in b(k)1,...,b(k)n−k

m0= the number of nonmissing values in x

Related Topics

ACF/PACF Algorithms
Notation (ACF/PACF algorithms)
Basic Statistics
Sample Autocorrelation
Standard Error of Sample Autocorrelation
Box-Ljung Statistic
Sample Partial Autocorrelation
Standard Error of Sample Partial Autocorrelation
Sample Autocorrelation
Standard Error of Sample Autocorrelation
Box-Ljung Statistic
Standard Error of Sample Partial Autocorrelation
References


Sample Autocorrelation

autocorrelation,autocorrelation,autocorrelation
ACF/PACF algorithms,ACF/PACF algorithms,ACF/PACF algorithms

rk= sum of nonmissing b(k)1,...,b(k)n−k sum of nonmissing b(0)1,...,b(0)n

Related Topics

ACF/PACF Algorithms
Notation (ACF/PACF algorithms)
Basic Statistics
Sample Autocorrelation
Standard Error of Sample Autocorrelation
Box-Ljung Statistic
Sample Partial Autocorrelation
Standard Error of Sample Partial Autocorrelation
Series with Missing Values
Standard Error of Sample Autocorrelation
Box-Ljung Statistic
Standard Error of Sample Partial Autocorrelation
References


Standard Error of Sample Autocorrelation

se (rk)=
√ 1m0(1+k−1Σl=1r2l)
( MA assumption )
se (rk)=
√ mk(m0+2)m0
(white noise)

Related Topics

ACF/PACF Algorithms
Notation (ACF/PACF algorithms)
Basic Statistics
Sample Autocorrelation
Standard Error of Sample Autocorrelation
Box-Ljung Statistic
Sample Partial Autocorrelation
Standard Error of Sample Partial Autocorrelation
Series with Missing Values
Sample Autocorrelation
Box-Ljung Statistic
Standard Error of Sample Partial Autocorrelation
References


Box-Ljung Statistic

Box-Ljung statistic,Box-Ljung statistic,Box-Ljung statistic
ACF/PACF algorithms,ACF/PACF algorithms,ACF/PACF algorithms

Q=m0(m0+2)kΣl=1r2lml

Related Topics

ACF/PACF Algorithms
Notation (ACF/PACF algorithms)
Basic Statistics
Sample Autocorrelation
Standard Error of Sample Autocorrelation
Box-Ljung Statistic
Sample Partial Autocorrelation
Standard Error of Sample Partial Autocorrelation
Series with Missing Values
Sample Autocorrelation
Standard Error of Sample Autocorrelation
Standard Error of Sample Partial Autocorrelation
References


Standard Error of Sample Partial Autocorrelation

se (
^
φ
kk)
√ 1m0

Related Topics

ACF/PACF Algorithms
Notation (ACF/PACF algorithms)
Basic Statistics
Sample Autocorrelation
Standard Error of Sample Autocorrelation
Box-Ljung Statistic
Sample Partial Autocorrelation
Standard Error of Sample Partial Autocorrelation
Series with Missing Values
Sample Autocorrelation
Standard Error of Sample Autocorrelation
Box-Ljung Statistic
References


References

ACF/PACF algorithms,ACF/PACF algorithms,ACF/PACF algorithms
references,references,references

Bartlett, M. S. 1946. On the theoretical specification of sampling properties of autocorrelated time series. Journal of Royal Statistical Society, Series B, 8, 27-27.

Box, G. E. P., and G. M. Jenkins. 1976. Time series analysis: Forecasting and control, Rev. ed. San Francisco: Holden-Day.

Cryer, J. D. 1986. Time series analysis. Boston, Mass.: Duxbury Press.

Quenouville, M. H. 1949. Approximate tests of correlation in time series. Journal of the Royal Statistical Society, Series B, 11, 68-68.

Related Topics

ACF/PACF Algorithms
Notation (ACF/PACF algorithms)
Basic Statistics
Sample Autocorrelation
Standard Error of Sample Autocorrelation
Box-Ljung Statistic
Sample Partial Autocorrelation
Standard Error of Sample Partial Autocorrelation
Series with Missing Values
Sample Autocorrelation
Standard Error of Sample Autocorrelation
Box-Ljung Statistic
Standard Error of Sample Partial Autocorrelation


AIM Algorithms

AIM (command),AIM (command),AIM (command)
algorithms,algorithms,algorithms
attribute importance algorithms,attribute importance algorithms,attribute importance algorithms

The Attribute Importance (AIM) procedure performs tests to find out if the groups are homogeneous.


Notation (attribute importance algorithms)

attribute importance algorithms,attribute importance algorithms,attribute importance algorithms
notation,notation,notation

The following notation is used throughout this chapter unless otherwise stated:

G | Number of groups.
C | Number of categories in the categorical variable.
nij | Number of cases in the jth category in the ith group, i = 1, …, G and j = 1, …, C. Assume that nij≥0.
ni | Number of cases in the ith group. ni=ΣCj=1nij
n | Overall number of cases. n=ΣGi=1ni. Assume n>0.
pj | Overall proportion of cases in the jth category.pj=1nΣGi=1nij
xi | Mean of the continuous variable in the ith group.
si | Standard deviation of the continuous variable in the ith group. Assume that si≥0.
x | Overall mean of the continuous variable. x=1nGΣi=1ni xi


Test of Homogeneity of Proportions (attribute importance algorithms)

attribute importance algorithms,attribute importance algorithms,attribute importance algorithms
homogeneity of proportions,homogeneity of proportions,homogeneity of proportions
homogeneity of proportions,homogeneity of proportions,homogeneity of proportions
attribute importance algorithms,attribute importance algorithms,attribute importance algorithms

This test is performed only for categorical variables. The null hypothesis is that the proportion of cases in the categories in the ith group is the same as the overall proportion. If C > 1, the Chi-square statistic for the ith group is computed as follows:

χ2=CΣj=1( nij−nipj) 2nipj

The degrees of freedom is C−1. The significance is the probability that a Chi-square random variate with this degrees of freedom will have a value greater than the χ2 statistic.

If C<1, the Chi-square statistic is always 0 with zero degrees of freedom, and the significance value is undefined.


Test of Equality of Means (attribute importance algorithms)

attribute importance algorithms,attribute importance algorithms,attribute importance algorithms
equality of means,equality of means,equality of means
equality of means,equality of means,equality of means
attribute importance algorithms,attribute importance algorithms,attribute importance algorithms

This test is performed only for continuous variables. The null hypothesis is that the mean (of a continuous variable) in the ith group is the same as the overall mean. If ni>1 and si>0, the Student’s t statistic for the ith group is computed as follows:

t=(xi−x)si/
√ ni

The degrees of freedom is ni−1. The significance is the probability that a Student's t random variate with this degrees of freedom will have a value greater than the t statistic.

When ni>1 but si=0, this implies that the continuous variable is constant in the ith group. In this case, the Student’s t statistic is infinity with positive degrees of freedom ni−1, and the significance value is zero.

If ni≤1, then si is undefined. In this case, the Student’s t statistic is undefined, the degrees of freedom is 0, and the significance value is undefined.


Graphical Display of Significance (attribute importance algorithms)

Since significance values are often very small numbers, the negative common logarithm (−log10) of significance values are displayed instead in the bar charts.


ALSCAL Algorithms

ALSCAL (command),ALSCAL (command),ALSCAL (command)
algorithms,algorithms,algorithms
ALSCAL algorithms,ALSCAL algorithms,ALSCAL algorithms

ALSCAL attempts to find the structure in a set of distance measures between objects or cases.

Related Topics

Initial Configuration (ALSCAL algorithms)
Optimization Algorithm (ALSCAL algorithms)
Distance (ALSCAL algorithms)
Optimal Scaling (ALSCAL algorithms)
Normalization (ALSCAL algorithms)
SSTRESS (ALSCAL algorithms)
Termination (ALSCAL algorithms)
Model Estimation (ALSCAL algorithms)
References (ALSCAL algorithms)


Initial Configuration (ALSCAL algorithms)

ALSCAL algorithms,ALSCAL algorithms,ALSCAL algorithms
initial configuration,initial configuration,initial configuration

The first step is to estimate an additive constant ck, which is added to the observed proximity measures (for example, oijk). Thus,

o*ijk=oijk+ck

such that for all triples the triangular inequality holds:

o*ijk+o*jlk≥o*ilk

and positivity holds o*ijk≥0,

where

o*ijk | is the adjusted proximity between stimulus i and stimulus j for subject k
o*jlk | is the adjusted proximity between stimulus j and stimulus l for subject k
o*ilk | is the adjusted proximity between stimulus i and stimulus l for subject k

The constant ck, which is added, is as small as possible to estimate a zero point for the dissimilarity data, thus bringing the data more nearly in line with the ratio level of measurement. This step is necessary to make the B*k matrix, described below, positive semidefinite (that is, with no imaginary roots).

The next step is to compute a scalar product matrix B**k for each subject k by double centering O*k, the adjusted proximity matrix for each subject. An element of the B**k matrix b**ijk is computed as follows:

b**ijk=−12(o*2ijk−o*2i.k−o*2.jk+o*2..k)

where

o*i.k | are the row means for the adjusted proximities for subject k
o*.jk | are the column means for the adjusted proximities for subject k
o*..k | is the grand mean for subject k

Double centering to convert distances to scalar products is necessary because a scalar products matrix is required to compute an initial configuration using the Young-Householder-Torgerson procedure.

Next the individual subject matrices are normalized so that they have the same variance. The normalized matrix B*k is found for each subject. The elements of the matrix are

b*ijk=b**ijk[
Σ
i
Σ
j
(b**ijk)2/(n(n−1))]1/2

where n is the number of stimuli, and n(n−1) is the number of off-diagonal elements in the B**k matrix. The denominator is both the root mean square and the standard deviation of the unnormalized scalar products matrix B** (It is both because b**..k=0, due to double centering.) B*k is thus a matrix with elements b*ijk, which are scalar products for individual subject k. Normalization of individual subjects’ matrices equates the contribution of each individual to the formation of a mean scalar products matrix and thus the resulting initial configuration.

Next an average scalar products matrix B* over the subjects is computed. The elements of this matrix are

b*ij.=
Σ
k
b*ijkm

where m is the number of subjects.

The average B* matrix used in the previous step is used to compute an initial stimulus configuration using the classical Young-Householder multidimensional scaling procedure

B*=XX´

where X is an n×r matrix of n stimulus points on r dimensions, and X´ is the transpose of the X matrix; that is, the rows and columns are interchanged. The X matrix is the initial configuration.

For the weighted ALSCAL matrix model, initial weight configuration matrices Wk for each of the m subjects are computed. The initial weight matrices Wk are r×r matrices, where r is the number of dimensions. Later the diagonals of Wk will form rows of the W matrix, which is an n×r matrix. The matrices Wk are determined such that B*k=YWkY´, where Y=XT and TT´=I and where T is an orthogonal rotation of the configuration X to a new orientation Y. T is computed by the Schönemann-de Leeuw procedure discussed by Young, Takane, and Lewyckyj (Young, Takane, and Lewyckyj, 1978). T rotates X so that Wk is as diagonal as possible (that is, off-diagonal elements are as close to zero as possible on the average over subjects). Off-diagonal elements represent a departure from the model (which assumes that subjects weight only the dimensions of the stimulus space).

Related Topics

ALSCAL Algorithms
Optimization Algorithm (ALSCAL algorithms)
Distance (ALSCAL algorithms)
Optimal Scaling (ALSCAL algorithms)
Normalization (ALSCAL algorithms)
SSTRESS (ALSCAL algorithms)
Termination (ALSCAL algorithms)
Model Estimation (ALSCAL algorithms)
References (ALSCAL algorithms)


Optimization Algorithm (ALSCAL algorithms)

ALSCAL algorithms,ALSCAL algorithms,ALSCAL algorithms
optimization algorithm,optimization algorithm,optimization algorithm

The optimization algorithm is a series of steps which are repeated (iterated) until the final solution is achieved. The steps for the optimization algorithm are performed successively because disparities, weights, and coordinates cannot be solved for simultaneously.

Related Topics

ALSCAL Algorithms
Initial Configuration (ALSCAL algorithms)
Distance (ALSCAL algorithms)
Optimal Scaling (ALSCAL algorithms)
Normalization (ALSCAL algorithms)
SSTRESS (ALSCAL algorithms)
Termination (ALSCAL algorithms)
Model Estimation (ALSCAL algorithms)
References (ALSCAL algorithms)


Distance (ALSCAL algorithms)

ALSCAL algorithms,ALSCAL algorithms,ALSCAL algorithms
distance,distance,distance

Distances are computed according to the weighted Euclidean model

d2ijk=rΣa=1wka(xia−xja)2

where

wka | is the weight for subject k on a dimension a,
xia | is the coordinate of stimulus i on dimension a,
xja | is the coordinate of stimulus j on dimension a.

The first set of distances is computed from the coordinates and weights found in the previous steps. Subsequently, new distances are computed from new coordinates found in the iteration process (described below).

Related Topics

ALSCAL Algorithms
Initial Configuration (ALSCAL algorithms)
Optimization Algorithm (ALSCAL algorithms)
Optimal Scaling (ALSCAL algorithms)
Normalization (ALSCAL algorithms)
SSTRESS (ALSCAL algorithms)
Termination (ALSCAL algorithms)
Model Estimation (ALSCAL algorithms)
References (ALSCAL algorithms)


Optimal Scaling (ALSCAL algorithms)

ALSCAL algorithms,ALSCAL algorithms,ALSCAL algorithms
optimal scaling,optimal scaling,optimal scaling

Optimal scaling for ordinal data use Kruskal’s least-squares monotonic transformation. This yields disparities that are a monotonic transformation of the data and that are as much like the distances (in a least squares sense) as possible. Ideally, we want the distances to be in exactly the same rank order as the data, but usually they are not. So we locate a new set of numbers, called disparities, which are in the same rank order as the data and which fit the distances as well as possible. When we see an order violation we replace the numbers that are out of order with a block of values that are the mean of the out-of-order numbers. When there are ties in the data, the optimal scaling process is changed somewhat. Kruskal’s primary and secondary procedures are used in ALSCAL.

Related Topics

ALSCAL Algorithms
Initial Configuration (ALSCAL algorithms)
Optimization Algorithm (ALSCAL algorithms)
Distance (ALSCAL algorithms)
Normalization (ALSCAL algorithms)
SSTRESS (ALSCAL algorithms)
Termination (ALSCAL algorithms)
Model Estimation (ALSCAL algorithms)
References (ALSCAL algorithms)


Normalization (ALSCAL algorithms)

ALSCAL algorithms,ALSCAL algorithms,ALSCAL algorithms
normalization,normalization,normalization

The disparities computed previously are now normalized for technical reasons related to the alternating least squares algorithm (Takane, Young, and de Leeuw, 1977). During the course of the optimization process, we want to minimize a measure of error called SSTRESS. But the monotone regression procedure described above only minimizes the numerator of the SSTRESS formula. Thus, the formula below is applied to readjust the length of the disparities vector so that SSTRESS is minimized:

D*Nk=D*k(Dk´Dk)(Dk´D*k)−1

where

D*k | is a column vector with n(n−1)2 elements containing all the disparities for subject k,
Dk | is a column vector with n(n−1)2 elements containing all the distances for subject k,
Dk´Dk | is the sum of the squared distances,
Dk´D*k | is the sum of the cross products.

The normalized disparities vector D*Nk is a conditional least squares estimate for the distances; that is, it is the least squares estimate for a given iteration. The previous D* values are replaced by D*N values, and subsequent steps utilize the normalized disparities.

Related Topics

ALSCAL Algorithms
Initial Configuration (ALSCAL algorithms)
Optimization Algorithm (ALSCAL algorithms)
Distance (ALSCAL algorithms)
Optimal Scaling (ALSCAL algorithms)
SSTRESS (ALSCAL algorithms)
Termination (ALSCAL algorithms)
Model Estimation (ALSCAL algorithms)
References (ALSCAL algorithms)


SSTRESS (ALSCAL algorithms)

ALSCAL algorithms,ALSCAL algorithms,ALSCAL algorithms
SSTRESS,SSTRESS,SSTRESS

The Takane-Young-de Leeuw formula is used:

SSTRESS(1)=S=[1mmΣk=1[
Σ
i
Σ
j
(d2ijk−d*2ijk)2
Σ
i
Σ
j
d*4ijk]]1/2

where d*ijk values are the normalized disparity measures computed previously, and dijk are computed as shown above. Thus SSTRESS is computed from the normalized disparities and the previous set of coordinates and weights.

Related Topics

ALSCAL Algorithms
Initial Configuration (ALSCAL algorithms)
Optimization Algorithm (ALSCAL algorithms)
Distance (ALSCAL algorithms)
Optimal Scaling (ALSCAL algorithms)
Normalization (ALSCAL algorithms)
Termination (ALSCAL algorithms)
Model Estimation (ALSCAL algorithms)
References (ALSCAL algorithms)


Termination (ALSCAL algorithms)

ALSCAL algorithms,ALSCAL algorithms,ALSCAL algorithms
termination,termination,termination

The current value of SSTRESS is compared to the value of SSTRESS from the previous iteration. If the improvement is less than a specified value (default equals 0.001), iteration stops and the output stages has been reached. If not, the program proceeds to the next step. (This step is skipped on the first iteration.)

Related Topics

ALSCAL Algorithms
Initial Configuration (ALSCAL algorithms)
Optimization Algorithm (ALSCAL algorithms)
Distance (ALSCAL algorithms)
Optimal Scaling (ALSCAL algorithms)
Normalization (ALSCAL algorithms)
SSTRESS (ALSCAL algorithms)
Model Estimation (ALSCAL algorithms)
References (ALSCAL algorithms)


Model Estimation (ALSCAL algorithms)

ALSCAL algorithms,ALSCAL algorithms,ALSCAL algorithms
model estimation,model estimation,model estimation

In ALSCAL the weights and coordinates cannot be solved for simultaneously, so we do it successively. Thus, the model estimation phase consists of two steps: (i) estimation of subject weights and (ii) estimation of stimulus coordinates.

(i) Estimation of subject weights. (This step is skipped for the simple, that is, unweighted, Euclidean model.)

A conditional least-squares estimate of the weights is computed at each iteration:

W
˜
=
D*P(P´P)−1

The derivation of the computational formula is as follows:

We have found disparities such that

d*ijk
˜
=
d2ijk,

where

d2ijk=rΣa=1wka(xia−xja)2

Let pija be the unweighted distance between stimuli i and j as projected onto dimension a, that is,

pija=(xia−xja)2.

Then

d*2ijk
˜
=
d2ijk=rΣa=1wkapija.

In matrix notation, this is expressed as D*=WP´, where D* is now an m×n(n−1)2 matrix having one row for every subject and one column for each stimulus pair; W is an m×r matrix having one row for every subject and one column for each dimension; and P´ has one row for every dimension and one column for every stimulus pair.

We wish to solve for W, WP´
˜
=
D*, which we do by noting that

WP´P(P´P)−1=D*P(P´P)−1.

Therefore,

W=D*P(P´P)−1

and we have the conditional least squares estimate for W. We have in fact minimized SSTRESS at this point relative to the previously computed values for stimulus coordinates and optimal scaling. We replace the old subject weights with the newly estimated values.

(ii) Estimation of Stimulus Coordinates. The next step is to estimate coordinates, one at a time, using the previously computed values for D* (disparities) and weights. Coordinates are determined one at a time by minimizing SSTRESS with regard to a given coordinate. Equation (2) allows us to solve for a given coordinate xle:

∂ S∂ xle=1mΣck∂ Sk∂ xle             (1)
∂ Sk∂ xle=4w2ke
Σ
j
(x3le−3x2lexje+2xlex2je−b2ljkxle+b2ljkxje)
            (2)

Equation (2) can be substituted back into equation (1). This equation with one unknown, xle, is then set equal to zero and solved by standard techniques. All the other coordinates except xle are assumed to be constant while we solve for xle.

Immediately upon solving for xle, we replace the value for xle used on the previous iteration with the newly obtained value, and then proceed to estimate the value for another coordinate. We successively obtain values for each coordinate of point l, one at a time, replacing old values with new ones. This continues for point l until the estimates stabilize. We then move to a new point and proceed until new coordinates for all stimuli are estimated. We then return to the beginning of the optimization algorithm (the previous step above) and start another iteration.

Related Topics

ALSCAL Algorithms
Initial Configuration (ALSCAL algorithms)
Optimization Algorithm (ALSCAL algorithms)
Distance (ALSCAL algorithms)
Optimal Scaling (ALSCAL algorithms)
Normalization (ALSCAL algorithms)
SSTRESS (ALSCAL algorithms)
Termination (ALSCAL algorithms)
References (ALSCAL algorithms)


References (ALSCAL algorithms)

ALSCAL algorithms,ALSCAL algorithms,ALSCAL algorithms
references,references,references

Bloxom, B. 1978. Contrained multidimensional scaling in n spaces. Psychometrika, 43, 397-408.

Carroll, J. D., and J. J. Chang. 1970. Analysis of individual differences in multidimensional scaling via an n-way generalization of “Eckart-Young” decomposition. Psychometrika, 35, 238-319.

Carroll, J. D., and J. J. Chang. 1972. IDIOSCAL (Individual differences in orientation scaling). Paper presented at the spring meeting of the Psychometric Society, Princeton, New Jersey. : .

Carroll, J. D., S. Pruzansky, and J. B. Kruskal. 1980. CANDELINC: A general approach to multidimensional analysis with linear constraints on parameters. Psychometrika, 45, 3-24.

Harshman, R. A. 1970. Foundations of the PARAFAC procedure: Models and conditions for an explanatory multi-model factor analysis, Working Papers in Phonetics No. 16 ed. Los Angeles: University of California.

Jones, L. E., and F. W. Young. 1972. Structure of a social environment: longitudinal individual differences scaling of an intact group. Journal of Personality and Social Psychology, 24, 108-121.

MacCallum, R. C. 1977. Effects of conditionality on INDSCAL and ALSCAL weights. Psychometrika, 42, 297-305.

Mardia, K. V. 1972. Statistics of Directional Data. New York: Academic Press.

Mardia, K. V., J. T. Kent, and J. M. Bibby. 1979. Multivariate Analysis. New York: Academic Press.

Null, C. H., and W. S. Sarle. 1982. Multidimensional scaling by least squares. Proceedings of the 7th Annual SAS User's Group International, , - .

Schiffman, S. S., M. L. Reynolds, and F. W. Young. 1981. Introduction to multidimensional scaling: theory, methods and applications. New York: Academic Press.

Takane, Y., F. W. Young, and J. de Leeuw. 1977. Nonmetric individual differences multidimensional scaling: An alternating least squares method with optimal scaling features. Psychometrika, 42, 7-67.

Tucker, L. R. 1972. Relations between multidimensional scaling and three mode factor analysis. Psychometrika, 37, 3-28.

Young, F. W., and R. Lewyckyj. 1979. ALSCAL-4 user's guide. Carrboro: N.C.: Data Analysis and Theory Associates.

Young, F. W., D. V. Easterling, and B. N. Forsyth. 1984. The general Euclidean model for scaling three mode dissimilarities: theory and application. In: Research Methods for Multi-mode Data Analysis in the Behavioral Sciences, H. G. Law, G. W. Snyder, Jr., J. Hattie, and R. P. McDonald, eds. New York: Praeger.

Young, F. W., Y. Takane, and R. Lewyckyj. 1978. ALSCAL: A nonmetric multidimensional scaling program with several different options. Behavioral Research Methods and Instrumentation, 10, 451-453.

Related Topics

ALSCAL Algorithms
Initial Configuration (ALSCAL algorithms)
Optimization Algorithm (ALSCAL algorithms)
Distance (ALSCAL algorithms)
Optimal Scaling (ALSCAL algorithms)
Normalization (ALSCAL algorithms)
SSTRESS (ALSCAL algorithms)
Termination (ALSCAL algorithms)
Model Estimation (ALSCAL algorithms)


ANACOR Algorithms

ANACOR (command),ANACOR (command),ANACOR (command)
algorithms,algorithms,algorithms
ANACOR algorithms,ANACOR algorithms,ANACOR algorithms

The ANACOR algorithm consists of three major parts:

1. A singular value decomposition (SVD)

2. Centering and rescaling of the data and various rescalings of the results

3. Variance estimation by the delta method.

Other names for SVD are “Eckart-Young decomposition” after Eckart and Young (1936), who introduced the technique in psychometrics, and “basic structure” (Horst, 1963). The rescalings and centering, including their rationale, are well explained in Benzécri (1969), Nishisato (1980), Gifi (1981), and Greenacre (1984). Those who are interested in the general framework of matrix approximation and reduction of dimensionality with positive definite row and column metrics are referred to Rao (1980). The delta method is a method that can be used for the derivation of asymptotic distributions and is particularly useful for the approximation of the variance of complex statistics. There are many versions of the delta method, differing in the assumptions made and in the strength of the approximation (Rao, 1973, ch. 6; Bishop et al., 1975, ch. 14; Wolter, 1985, ch. 6).

Related Topics

Notation (ANACOR algorithms)
Basic Calculations (ANACOR algorithms)
Diagnostics (ANACOR algorithms)
References (ANACOR algorithms)


Notation (ANACOR algorithms)

ANACOR algorithms,ANACOR algorithms,ANACOR algorithms
notation,notation,notation

The following notation is used throughout this chapter unless otherwise stated:

k1 | Number of rows (row objects)
k2 | Number of columns (column objects)
p | Number of dimensions

Related Topics

ANACOR Algorithms
Basic Calculations (ANACOR algorithms)
Diagnostics (ANACOR algorithms)
References (ANACOR algorithms)
Data-Related Quantities (ANACOR algorithms)
Scores and Statistics (ANACOR algorithms)


Data-Related Quantities (ANACOR algorithms)

fij | Nonnegative data value for row i and column j: collected in table F
fi+ | Marginal total of row i, i=1, ...,k1
f+j | Marginal total of column j, j=1, ...,k2
N | Grand total of F

Related Topics

Notation (ANACOR algorithms)
Scores and Statistics (ANACOR algorithms)


Scores and Statistics (ANACOR algorithms)

ris | Score of row object i on dimension s
cjs | Score of column object j on dimension s
I | Total inertia

Related Topics

Notation (ANACOR algorithms)
Data-Related Quantities (ANACOR algorithms)


Basic Calculations (ANACOR algorithms)

ANACOR algorithms,ANACOR algorithms,ANACOR algorithms
basic calculations,basic calculations,basic calculations

One way to phrase the ANACOR objective (cf. Heiser, 1981) is to say that we wish to find row scores {ris} and column scores {cjs} so that the function

σ({ris};{cjs})=
Σ
i
Σ
j
fij
Σ
s
(ris−cjs)2

is minimal, under the standardization restriction either that

Σ
i
fi+ risrit=δst

or

Σ
j
f+j cjscjt=δst

where δst is Kronecker’s delta and t is an alternative index for dimensions. The trivial set of scores ({1},{1}) is excluded.

The ANACOR algorithm can be subdivided into five steps, as explained below.

Related Topics

ANACOR Algorithms
Notation (ANACOR algorithms)
Diagnostics (ANACOR algorithms)
References (ANACOR algorithms)
Data scaling and centering (ANACOR algorithms)
Singular value decomposition (ANACOR algorithms)
Adjustment to the row and column metric (ANACOR algorithms)
Determination of variances and covariances (ANACOR algorithms)
Normalization of row and column scores (ANACOR algorithms)


Data scaling and centering (ANACOR algorithms)

The first step is to form the auxiliary matrix Z with general element

zij=fij
√ fi+f+j
−
√ fi+f+j
N

Related Topics

Basic Calculations (ANACOR algorithms)
Singular value decomposition (ANACOR algorithms)
Adjustment to the row and column metric (ANACOR algorithms)
Determination of variances and covariances (ANACOR algorithms)
Normalization of row and column scores (ANACOR algorithms)


Singular value decomposition (ANACOR algorithms)

Let the singular value decomposition of Z be denoted by

Z=KΛL´

with K´K=I, L´L=I, and L diagonal. This decomposition is calculated by a routine based on Golub and Reinsch (1971). It involves Householder reduction to bidiagonal form and diagonalization by a QR procedure with shifts. The routine requires an array with more rows than columns, so when k1<k2 the original table is transposed and the parameter transfer is permuted accordingly.

Related Topics

Basic Calculations (ANACOR algorithms)
Data scaling and centering (ANACOR algorithms)
Adjustment to the row and column metric (ANACOR algorithms)
Determination of variances and covariances (ANACOR algorithms)
Normalization of row and column scores (ANACOR algorithms)


Adjustment to the row and column metric (ANACOR algorithms)

The arrays of both the left-hand singular vectors and the right-hand singular vectors are adjusted row-wise to form scores that are standardized in the row and in the column marginal proportions, respectively:

ris=kis/
√ fi+/N
,
cjs=ljs/
√ f+j/N
.

This way, both sets of scores satisfy the standardization restrictions simultaneously.

Related Topics

Basic Calculations (ANACOR algorithms)
Data scaling and centering (ANACOR algorithms)
Singular value decomposition (ANACOR algorithms)
Determination of variances and covariances (ANACOR algorithms)
Normalization of row and column scores (ANACOR algorithms)


Determination of variances and covariances (ANACOR algorithms)

For the application of the delta method to the results of generalized eigenvalue methods under multinomial sampling, the reader is referred to Gifi (1981, ch. 12) and Israëls (1987, Appendix B). It is shown there that N time variance-covariance matrix of a function φ of the observed cell proportions p={pij=fij/N} asymptotically reaches the form

N×cov(φ(p))
˜
=
Σ
i
Σ
j
πij(∂φ∂pij)(∂φ∂pij)´−(
Σ
i
Σ
j
πij∂φ∂pij)(
Σ
i
Σ
j
πij∂φ∂pij)´

Here the quantities πij are the cell probabilities of the multinomial distribution, and ∂φ/∂pij are the partial derivatives of φ (which is either a generalized eigenvalue or a generalized eigenvector) with respect to the observed cell proportion. Expressions for these partial derivatives can also be found in the above-mentioned references.

Related Topics

Basic Calculations (ANACOR algorithms)
Data scaling and centering (ANACOR algorithms)
Singular value decomposition (ANACOR algorithms)
Adjustment to the row and column metric (ANACOR algorithms)
Normalization of row and column scores (ANACOR algorithms)


Normalization of row and column scores (ANACOR algorithms)

Depending on the normalization option chosen, the scores are normalized, which implies a compensatory rescaling of the coordinate axes of the row scores and the column scores. The general formula for the weighted sum of squares that results from this rescaling is

row scores:
Σ
i
fi+r2is=Nλs(1+q)
column scores:
Σ
j
f+jc2js=Nλs(1−q)

The parameter q can be chosen freely or it can be specified according to the following designations:

q={
0, | canonical
1, | row principal
−1, | column principal

There is a fifth possibility, choosing the designation “principal,” that does not fit into this scheme. It implies that the weighted sum of squares of both sets of scores becomes equal to Nλ2s. The estimated variances and covariances are adjusted according to the type of normalization chosen.

Related Topics

Basic Calculations (ANACOR algorithms)
Data scaling and centering (ANACOR algorithms)
Singular value decomposition (ANACOR algorithms)
Adjustment to the row and column metric (ANACOR algorithms)
Determination of variances and covariances (ANACOR algorithms)


Diagnostics (ANACOR algorithms)

ANACOR algorithms,ANACOR algorithms,ANACOR algorithms
diagnostics,diagnostics,diagnostics

After printing the data, ANACOR optionally also prints a table of row profiles and column profiles, which are {fij/fi+} and {fij/f+j}, respectively.

Related Topics

ANACOR Algorithms
Notation (ANACOR algorithms)
Basic Calculations (ANACOR algorithms)
References (ANACOR algorithms)
Singular Values, Maximum Rank and Inertia (ANACOR algorithms)
Scores and Contributions (ANACOR algorithms)
Variances and Correlation Matrix of Singular Values and Scores (ANACOR algorithms)
Permutations of the Input Table (ANACOR algorithms)


Singular Values, Maximum Rank and Inertia (ANACOR algorithms)

singular values,singular values,singular values
ANACOR algorithms,ANACOR algorithms,ANACOR algorithms
maximum rank,maximum rank,maximum rank
ANACOR algorithms,ANACOR algorithms,ANACOR algorithms
inertia,inertia,inertia
ANACOR algorithms,ANACOR algorithms,ANACOR algorithms

All singular values λs defined in step 2 are printed up to a maximum of min{(k1−1),(k2−1)}. Small singular values and corresponding dimensions are suppressed when they don’t exceed the quantity (k1k2)1/210−7; in this case a warning message is issued. Dimensionwise inertia and total inertia are given by the relationships

I=
Σ
s
λ2s=
Σ
s
Σ
i
fi+r2isN

where the right-hand part of this equality is true only if the normalization is row principal (but for the other normalizations similar relationships are easily derived from Normalization of row and column scores (ANACOR algorithms)). The quantities “proportion explained” are equal to inertia divided by total inertia: λ2s/I.

Related Topics

Diagnostics (ANACOR algorithms)
Scores and Contributions (ANACOR algorithms)
Variances and Correlation Matrix of Singular Values and Scores (ANACOR algorithms)
Permutations of the Input Table (ANACOR algorithms)


Scores and Contributions (ANACOR algorithms)

contributions,contributions,contributions
ANACOR algorithms,ANACOR algorithms,ANACOR algorithms

This output is given first for rows, then for columns, and always preceded by a column of marginal proportions (fi+/N and f+j/N, respectively). The table of scores is printed in p dimensions. The contribution to the inertia of each dimension is given by

τis=fi+Nr2isλ2s
τjs=f+jNc2js

The above formula is true only under the row principal normalization option. For the other normalizations, similar relationships are again easily derived from Normalization of row and column scores (ANACOR algorithms)) The contribution of dimensions to the inertia of each point is given by, for s, t=1,...,p,

σis=r2is/
Σ
t
r2it
σjs=c2js/
Σ
t
c2jt

Related Topics

Diagnostics (ANACOR algorithms)
Singular Values, Maximum Rank and Inertia (ANACOR algorithms)
Variances and Correlation Matrix of Singular Values and Scores (ANACOR algorithms)
Permutations of the Input Table (ANACOR algorithms)


Variances and Correlation Matrix of Singular Values and Scores (ANACOR algorithms)

The computation of variances and covariances is explained in Determination of variances and covariances (ANACOR algorithms). Since the row and column scores are linear functions of the singular vectors, an adjustment is necessary depending on the normalization option chosen. From these adjusted variances and covariances the correlations are derived in the standard way.

Related Topics

Diagnostics (ANACOR algorithms)
Singular Values, Maximum Rank and Inertia (ANACOR algorithms)
Scores and Contributions (ANACOR algorithms)
Permutations of the Input Table (ANACOR algorithms)


Permutations of the Input Table (ANACOR algorithms)

permutation of input table,permutation of input table,permutation of input table
ANACOR algorithms,ANACOR algorithms,ANACOR algorithms

For each dimension s, let ρ(i|s) be the permutation of the first k1 integers that would sort the sth column of {ris} in ascending order. Similarly, let ρ(j|s) be the permutation of the first k2 integers that would sort the sth column of {cjs} in ascending order. Then the permuted data matrix is given by {fρ(i|s),ρ(j|s)}.

Related Topics

Diagnostics (ANACOR algorithms)
Singular Values, Maximum Rank and Inertia (ANACOR algorithms)
Scores and Contributions (ANACOR algorithms)
Variances and Correlation Matrix of Singular Values and Scores (ANACOR algorithms)


References (ANACOR algorithms)

ANACOR algorithms,ANACOR algorithms,ANACOR algorithms
references,references,references

Benzécri, J. P. 1969. Statistical analysis as a tool to make patterns emerge from data. In: Methodologies of Pattern Recognition, S. Watanabe, eds. New York: Academic Press.

Bishop, Y. M., S. E. Fienberg, and P. W. Holland. 1977. Discrete Multivariate Analysis: Theory and Practice. Cambridge, MA: MIT Press.

Eckart, C., and G. Young. 1936. The approximation of one matrix by another one of lower rank. Psychometrika, 1, 211-218.

Gifi, A. 1990. Nonlinear multivariate analysis. Chichester: John Wiley and Sons.

Golub, G. H., and C. Reinsch. 1971. Linear Algebra. In: Handbook for Automatic Computation, Volume II, J. H. Wilkinson, and C. Reinsch, eds. New York: Springer-Verlag.

Greenacre, M. J. 1984. Theory and applications of correspondence analysis. London: Academic Press.

Heiser, W. J. 1981. Unfolding analysis of proximity data. Leiden: Department of Data Theory, University of Leiden.

Horst, P. 1963. Matrix algebra for social scientists. New York: Holt, Rinehart and Winston.

Israëls, A. 1987. Eigenvalue techniques for qualitative data. Leiden: DSWO Press.

Nishisato, S. 1980. Analysis of categorical data: Dual scaling and its applications. Toronto: University of Toronto Press.

Rao, C. R. 1973. Linear statistical inference and its applications, 2nd ed. New York: John Wiley and Sons.

Rao, C. R. 1980. Matrix approximations and reduction of dimensionality in multivariate statistical analysis. In: Multivariate Analysis, Vol. 5, P. R. Krishnaiah, eds. Amsterdam: North-Holland.

Wolter, K. M. 1985. Introduction to variance estimation. Berlin: Springer-Verlag.

Related Topics

ANACOR Algorithms
Notation (ANACOR algorithms)
Basic Calculations (ANACOR algorithms)
Diagnostics (ANACOR algorithms)


ANOVA Algorithms

ANOVA (command),ANOVA (command),ANOVA (command)
algorithms,algorithms,algorithms
ANOVA algorithms,ANOVA algorithms,ANOVA algorithms

This chapter describes the algorithms used by the ANOVA procedure.

Related Topics

Model and Matrix Computations (ANOVA algorithms)
Computation of ANOVA Sum of Squares (ANOVA algorithms)
Model and Options (ANOVA algorithms)
Multiple Classification Analysis (ANOVA algorithms)
Unstandardized Regression Coefficients for Covariates (ANOVA algorithms)
Cell Means and Sample Sizes (ANOVA algorithms)
References (ANOVA algorithms)


Model and Matrix Computations (ANOVA algorithms)

ANOVA algorithms,ANOVA algorithms,ANOVA algorithms
model and matrix computations,model and matrix computations,model and matrix computations

Related Topics

Notation (ANOVA algorithms)
The Model (ANOVA algorithms)
Constraints (ANOVA algorithms)
Computation of Matrices (ANOVA algorithms)
ANOVA Algorithms
Computation of ANOVA Sum of Squares (ANOVA algorithms)
Model and Options (ANOVA algorithms)
Multiple Classification Analysis (ANOVA algorithms)
Unstandardized Regression Coefficients for Covariates (ANOVA algorithms)
Cell Means and Sample Sizes (ANOVA algorithms)
References (ANOVA algorithms)


Notation (ANOVA algorithms)

ANOVA algorithms,ANOVA algorithms,ANOVA algorithms
notation,notation,notation

The following notation is used throughout this section unless otherwise stated:

N | Number of cases
F | Number of factors
CN | Number of covariates
ki | Number of levels of factor i
Yk | Value of the dependent variable for case k
Zjk | Value of the jth covariate for case k
wk | Weight for case k
W | Sum of weights of all cases

Related Topics

Model and Matrix Computations (ANOVA algorithms)
The Model (ANOVA algorithms)
Constraints (ANOVA algorithms)
Computation of Matrices (ANOVA algorithms)


The Model (ANOVA algorithms)

ANOVA algorithms,ANOVA algorithms,ANOVA algorithms
model,model,model

A linear model with covariates can be written in matrix notation as

Y=Xβ+ZC+e (1)

where

Y | N×1 vector of values of the dependent variable
X | Design matrix (N×p) of rank q<p
β | Vector of parameters (p×1)
Z | Matrix of covariates (N×CN)
C | Vector of covariate coefficients (CN×1)
e | Vector of error terms (N×1)

Related Topics

Model and Matrix Computations (ANOVA algorithms)
Notation (ANOVA algorithms)
Constraints (ANOVA algorithms)
Computation of Matrices (ANOVA algorithms)


Constraints (ANOVA algorithms)

ANOVA algorithms,ANOVA algorithms,ANOVA algorithms
constraints,constraints,constraints

To reparametrize equation (1) to a full rank model, a set of non-estimable conditions is needed. The constraint imposed on non-regression models is that all parameters involving level 1 of any factor are set to zero.

For regression model, the constraints are that the analysis of variance parameters estimates for each main effect and each order of interactions sum to zero. The interaction must also sum to zero over each level of subscripts.

For a standard two way ANOVA model with the main effects αi and βj, and interaction parameter γij, the constraints can be expressed as

α1=β1=γ1j=γi1=0 | non − regression
α·=β·=γi·=γ·j=0 | regression

where · indicates summation.

Related Topics

Model and Matrix Computations (ANOVA algorithms)
Notation (ANOVA algorithms)
The Model (ANOVA algorithms)
Computation of Matrices (ANOVA algorithms)


Computation of Matrices (ANOVA algorithms)

ANOVA algorithms,ANOVA algorithms,ANOVA algorithms
computation of matrices,computation of matrices,computation of matrices
X´X

Non-regression Model

The X´X matrix contains the sum of weights of the cases that contain a particular combination of parameters. All parameters that involve level 1 of any of the factors are excluded from the matrix. For a two-way design with k1=2 and k2=3, the symmetric matrix would look like the following:

 | α2 | β2 | β3 | γ22 | γ23
α2 | N2· | N22 | N23 | N22 | N23
β2 |  | N·2 | 0 | N22 | 0
β3 |  |  | N·3 | 0 | N23
γ22 |  |  |  | N22 | 0
γ23 |  |  |  |  | N23

The elements Ni· or N·j on the diagonal are the sums of weights of cases that have level i of a or level j of β. Off-diagonal elements are sums of weights of cases cross-classified by parameter combinations. Thus, N·3 is the sum of weights of cases in level 3 of main effect β3, while N22 is the sum of weights of cases with α2 and β2.

Regression Model

A row of the design matrix X is formed for each case. The row is generated as follows:

If a case belongs to one of the 2 to ki levels of factor i, a code of 1 is placed in the column corresponding to the level and 0 in all other ki−1 columns associated with factor i. If the case belongs in the first level of factor i, -1 is placed in all the ki−1 columns associated with factor i. This is repeated for each factor. The entries for the interaction terms are obtained as products of the entries in the corresponding main effect columns. This vector of dummy variables for a case will be denoted as d(i), i=1,...,NC, where NC is the number of columns in the reparametrized design matrix. After the vector d is generated for case k, the ijth cell of X´X is incremented by d(i)d(j)wk, where i=1,...,NC and j≥i.

Checking and Adjustment for the Mean

After all cases have been processed, the diagonal entries of X´X are examined. Rows and columns corresponding to zero diagonals are deleted and the number of levels of a factor is reduced accordingly. If a factor has only one level, the analysis will be terminated with a message. If the first specified level of a factor is missing, the first non-empty level will be deleted from the matrix for non-regression model. For regression designs, the first level cannot be missing. All entries of X´X are subsequently adjusted for means.

The highest order of interactions in the model can be selected. This will affect the generation of X´X If none of these options is chosen, the program will generate the highest order of interactions allowed by the number of factors. If sub-matrices corresponding to main effects or interactions in the reparametrized model are not of full rank, a message is printed and the order of the model is reduced accordingly.

Related Topics

Cross-Product Matrices for Continuous Variables (ANOVA algorithms)
Matrix of Covariates Z'Z (ANOVA algorithms)
The Vector Z'Y (ANOVA algorithms)
The Scalar Y'Y (ANOVA algorithms)
The Vector X'Y (ANOVA algorithms)
Matrix X'Z (ANOVA algorithms)
Notation (ANOVA algorithms)
The Model (ANOVA algorithms)
Constraints (ANOVA algorithms)


Cross-Product Matrices for Continuous Variables (ANOVA algorithms)

ANOVA algorithms,ANOVA algorithms,ANOVA algorithms
cross-product matrices for continuous variables,cross-product matrices for continuous variables,cross-product matrices for continuous variables

Provisional means algorithm are used to compute the adjusted-for-the-means cross-product matrices.

Related Topics

Computation of Matrices (ANOVA algorithms)
Matrix of Covariates Z'Z (ANOVA algorithms)
The Vector Z'Y (ANOVA algorithms)
The Scalar Y'Y (ANOVA algorithms)
The Vector X'Y (ANOVA algorithms)
Matrix X'Z (ANOVA algorithms)


Matrix of Covariates Z'Z (ANOVA algorithms)

ANOVA algorithms,ANOVA algorithms,ANOVA algorithms
matrix of covariates Z'Z,matrix of covariates Z'Z,matrix of covariates Z'Z

The covariance of covariates m and l after case k has been processed is

Z´Zml(k)=Z´Zml(k−1)+wk(WkZlk−kΣj=1wjZlj) (WkZmk−kΣj=1wjZmj)WkWk−1

where Wk is the sum of weights of the first k cases.

Related Topics

Computation of Matrices (ANOVA algorithms)
Cross-Product Matrices for Continuous Variables (ANOVA algorithms)
The Vector Z'Y (ANOVA algorithms)
The Scalar Y'Y (ANOVA algorithms)
The Vector X'Y (ANOVA algorithms)
Matrix X'Z (ANOVA algorithms)


The Vector Z'Y (ANOVA algorithms)

ANOVA algorithms,ANOVA algorithms,ANOVA algorithms
vector Z'Y,vector Z'Y,vector Z'Y

The covariance between the mth covariate and the dependent variable after case k has been processed is

Z´Ym(k)=Z´Ym(k−1)+wk(WkYk−kΣj=1wjYj)(WkZmk−kΣj=1wjZmj)WkWk−1

Related Topics

Computation of Matrices (ANOVA algorithms)
Cross-Product Matrices for Continuous Variables (ANOVA algorithms)
Matrix of Covariates Z'Z (ANOVA algorithms)
The Scalar Y'Y (ANOVA algorithms)
The Vector X'Y (ANOVA algorithms)
Matrix X'Z (ANOVA algorithms)


The Scalar Y'Y (ANOVA algorithms)

ANOVA algorithms,ANOVA algorithms,ANOVA algorithms
scalar Y'Y,scalar Y'Y,scalar Y'Y

The corrected sum of squares for the dependent variable after case k has been processed is

Y´Y(k)=Y´Y(k−1)+wk(WkYk−kΣj=1wjYj)2WkWk−1

Related Topics

Computation of Matrices (ANOVA algorithms)
Cross-Product Matrices for Continuous Variables (ANOVA algorithms)
Matrix of Covariates Z'Z (ANOVA algorithms)
The Vector Z'Y (ANOVA algorithms)
The Vector X'Y (ANOVA algorithms)
Matrix X'Z (ANOVA algorithms)


The Vector X'Y (ANOVA algorithms)

ANOVA algorithms,ANOVA algorithms,ANOVA algorithms
vector X'Y,vector X'Y,vector X'Y

X´Y is a vector with NC rows. The ith element is

X´Yi=NΣk=1Ykwkδk,

where, for non-regression model, δk=1 if case k has the factor combination in column i of X´X; δk=0 otherwise. For regression model, δk=d(i) where d(i) is the dummy variable for column i of case k. The final entries are adjusted for the mean.

Related Topics

Computation of Matrices (ANOVA algorithms)
Cross-Product Matrices for Continuous Variables (ANOVA algorithms)
Matrix of Covariates Z'Z (ANOVA algorithms)
The Vector Z'Y (ANOVA algorithms)
The Scalar Y'Y (ANOVA algorithms)
Matrix X'Z (ANOVA algorithms)


Matrix X'Z (ANOVA algorithms)

ANOVA algorithms,ANOVA algorithms,ANOVA algorithms
matrix X'Z,matrix X'Z,matrix X'Z

The (i, m)th entry is

X´Zim=NΣk=1Zmkwkδk

where δk has been defined previously. The final entries are adjusted for the mean.

Related Topics

Computation of Matrices (ANOVA algorithms)
Cross-Product Matrices for Continuous Variables (ANOVA algorithms)
Matrix of Covariates Z'Z (ANOVA algorithms)
The Vector Z'Y (ANOVA algorithms)
The Scalar Y'Y (ANOVA algorithms)
The Vector X'Y (ANOVA algorithms)


Computation of ANOVA Sum of Squares (ANOVA algorithms)

ANOVA algorithms,ANOVA algorithms,ANOVA algorithms
computation of sum of squares,computation of sum of squares,computation of sum of squares

The full rank model with covariates

Y=Xβ+ZC+e

can also be expressed as

Y=Xkbk+Xmbm+ZC+e

where X and b are partitioned as

X=[Xk | Xm] and β=[
bk
bm
].

The normal equations are then

[
Z´Z | Z´Xk | Z´Xm
X´kZ | X´kXk | X´kXm
X´mZ | X´mXk | X´mXm
] [
^
C
^
b
k
^
b
m
]=[
Z´Y
X´kY
X´mY
] (2)

The normal equations for any reduced model can be obtained by excluding those entries from equation (2) corresponding to terms that do not appear in the reduced model.

Thus, for the model excluding bm,

Y=Xkbk+ZC+e

the solution to the normal equation is:

[
˜
C
˜
b
k
]=[
Z´Z | Z´Xk
X´kZ | X´kXk
]−1[
Z´Y
X´kY
] (3)

The sum of squares due to fitting the complete model (explained SS) is

R(C,bk,bm)=[
^
C
´,
^
b
´k,
^
b
´m] [
Z´Y
X´kY
X´mY
]=
^
C
´Z´Y+
^
b
´kX´kY+
^
b
´mX´mY

For the reduced model, it is

R(C,bk)=[
˜
C
´,
˜
b
´k] [
Z´Y
X´kY
]=
˜
C
´Z´Y+
˜
b
´kX´kY

The residual (unexplained) sum of squares for the complete model is RSS=Y´Y−R(C,bk,bm) and similarly for the reduced model. The total sum of squares is Y´Y. The reduction in the sum of squares due to including bm in a model that already includes bk and C will be denoted as R(bm | C,bk). This can also be expressed as

R(bm | C,bk)=R(C,bk,bm)−R(C,bk)

There are several ways to compute R(bm | C,bk). The sum of squares due to the full model, as well as the sum of squares due to the reduced model, can each be calculated, and the difference obtained (Method 1).

R(bm | C,bk)=
^
C
´Z´Y+
^
b
´kX´kY+
^
b
´mX´mY−
˜
C
´Z´Y−
˜
b
´kX´kY

A sometimes computationally more efficient procedure is to calculate

R(bm | C,bk)=
^
b
´mT−1m
^
b
m

where
^
b
m are the estimates obtained from fitting the full model and Tm is the partition of the inverse matrix corresponding to bm (Method 2).

[
Z´Z | Z´Xk | Z´Xm
X´kZ | X´kXk | X´kXm
X´mZ | X´mXk | X´mXm
]−1=[
Tc | Tck | Tcm
Tkc | Tk | Tkm
Tmc | Tmk | Tm
]

Related Topics

ANOVA Algorithms
Model and Matrix Computations (ANOVA algorithms)
Model and Options (ANOVA algorithms)
Multiple Classification Analysis (ANOVA algorithms)
Unstandardized Regression Coefficients for Covariates (ANOVA algorithms)
Cell Means and Sample Sizes (ANOVA algorithms)
References (ANOVA algorithms)


Model and Options (ANOVA algorithms)

ANOVA algorithms,ANOVA algorithms,ANOVA algorithms
model and options,model and options,model and options

Related Topics

Notation (ANOVA algorithms)
Models (ANOVA algorithms)
Sum of Squares for Type of Effects (ANOVA algorithms)
Degrees of Freedom (ANOVA algorithms)
ANOVA Algorithms
Model and Matrix Computations (ANOVA algorithms)
Computation of ANOVA Sum of Squares (ANOVA algorithms)
Multiple Classification Analysis (ANOVA algorithms)
Unstandardized Regression Coefficients for Covariates (ANOVA algorithms)
Cell Means and Sample Sizes (ANOVA algorithms)
References (ANOVA algorithms)


Notation (ANOVA algorithms)

ANOVA algorithms,ANOVA algorithms,ANOVA algorithms
notation,notation,notation

Let b be partitioned as

b=[
M
D
]=[
m1
·
·
·
mF
d1
·
·
·
dF−1
]

where

M | Vector of main effect coefficients
mi | Vector of coefficients for main effect i
m(i) | M excluding mi
Mi* | M including only m1 through mi−1
D | Vector of interaction coefficients
dk | Vector of kth order interaction coefficients
dki | Vector of coefficients for the ith of the kth order interactions
D(k) | D excluding dk
Dk* | D including only d1 through dk−1
d(i)k | dk excluding dki
C | Vector of covariate coefficients
ci | Covariate coefficient
C(i) | C excluding ci
Ci* | C including only c1 through ci−1

Related Topics

Model and Options (ANOVA algorithms)
Models (ANOVA algorithms)
Sum of Squares for Type of Effects (ANOVA algorithms)
Degrees of Freedom (ANOVA algorithms)


Models (ANOVA algorithms)

ANOVA algorithms,ANOVA algorithms,ANOVA algorithms
models,models,models

Different types of sums of squares can be calculated in ANOVA.

Related Topics

Model and Options (ANOVA algorithms)
Notation (ANOVA algorithms)
Sum of Squares for Type of Effects (ANOVA algorithms)
Degrees of Freedom (ANOVA algorithms)


Sum of Squares for Type of Effects (ANOVA algorithms)

ANOVA algorithms,ANOVA algorithms,ANOVA algorithms
sum of squares for type of effects,sum of squares for type of effects,sum of squares for type of effects
 | Covariates | Main Effects | Interactions
Experimental and Hierarchical | R(C) | R(M | C) | R(dk | C,M,Dk*)
Covariates with Main Effects | R(C,M) | R(C,M) | R(dk | C,M,Dk*)
Covariates after Main Effects | R(C | M) | R(M) | R(dk | C,M,Dk*)
Regression | R(C | M,D) | R(M | C,D) | R(dk | C,M,Dk*)

All sums of squares are calculated as described in the introduction. Reductions in sums of squares (R(A | B)) are computed using Method 1. Since all cross-product matrices have been corrected for the mean, all sums of squares are adjusted for the mean.

Related Topics

Model and Options (ANOVA algorithms)
Notation (ANOVA algorithms)
Models (ANOVA algorithms)
Degrees of Freedom (ANOVA algorithms)


Sum of Squares Within Effects (ANOVA algorithms)

ANOVA algorithms,ANOVA algorithms,ANOVA algorithms
sum of squares within effects,sum of squares within effects,sum of squares within effects
 | Covariates | Main Effects | Interactions
Default Experimental | R(ci | C(i)) | R(mi | C,M(i)) | R(dki | C,M,Dk*,d(i)k)
Covariates with Main Effects | R(ci | M,C(i)) | R(mi | C,M(i)) | same as default
Covariates after Main Effects | R(ci | M,C(i)) | R(mi | M(i)) | same as default
Regression | R(ci | M,C(i),D) | R(mi | M(i),C,D) | R(dki | C,M,D(ki))
Hierarchical | R(ci | Ci*) | R(mi | C,Mi*) | same as default
Hierarchical and Covariates with Main Effects or Hierarchical and Covariates after Main Effects | R(ci | Ci*,M) | R(mi | Mi*) | same as default

Reductions in sums of squares are calculated using Method 2, except for specifications involving the Hierarchical approach. For these, Method 1 is used. All sums of squares are adjusted for the mean.


Degrees of Freedom (ANOVA algorithms)

ANOVA algorithms,ANOVA algorithms,ANOVA algorithms
degrees of freedom,degrees of freedom,degrees of freedom

Related Topics

Main Effects (ANOVA algorithms)
Main Effect i (ANOVA algorithms)
Covariates (ANOVA algorithms)
Covariate i (ANOVA algorithms)
Interactions (ANOVA algorithms)
Model (ANOVA algorithms)
Residual (ANOVA algorithms)
Total (ANOVA algorithms)
Notation (ANOVA algorithms)
Models (ANOVA algorithms)
Sum of Squares for Type of Effects (ANOVA algorithms)


Main Effects (ANOVA algorithms)

ANOVA algorithms,ANOVA algorithms,ANOVA algorithms
main effects,main effects,main effects
dfM=FΣi=1(ki−1)

Related Topics

Degrees of Freedom (ANOVA algorithms)
Main Effect i (ANOVA algorithms)
Covariates (ANOVA algorithms)
Covariate i (ANOVA algorithms)
Interactions (ANOVA algorithms)
Model (ANOVA algorithms)
Residual (ANOVA algorithms)
Total (ANOVA algorithms)


Main Effect i (ANOVA algorithms)

ANOVA algorithms,ANOVA algorithms,ANOVA algorithms
main effect i,main effect i,main effect i
(ki−1)

Related Topics

Degrees of Freedom (ANOVA algorithms)
Main Effects (ANOVA algorithms)
Covariates (ANOVA algorithms)
Covariate i (ANOVA algorithms)
Interactions (ANOVA algorithms)
Model (ANOVA algorithms)
Residual (ANOVA algorithms)
Total (ANOVA algorithms)


Covariates (ANOVA algorithms)

ANOVA algorithms,ANOVA algorithms,ANOVA algorithms
covariates,covariates,covariates
dfc=CN

Related Topics

Degrees of Freedom (ANOVA algorithms)
Main Effects (ANOVA algorithms)
Main Effect i (ANOVA algorithms)
Covariate i (ANOVA algorithms)
Interactions (ANOVA algorithms)
Model (ANOVA algorithms)
Residual (ANOVA algorithms)
Total (ANOVA algorithms)


Covariate i (ANOVA algorithms)

ANOVA algorithms,ANOVA algorithms,ANOVA algorithms
covariate i,covariate i,covariate i

1

Related Topics

Degrees of Freedom (ANOVA algorithms)
Main Effects (ANOVA algorithms)
Main Effect i (ANOVA algorithms)
Covariates (ANOVA algorithms)
Interactions (ANOVA algorithms)
Model (ANOVA algorithms)
Residual (ANOVA algorithms)
Total (ANOVA algorithms)


Interactions (ANOVA algorithms)

ANOVA algorithms,ANOVA algorithms,ANOVA algorithms
interactions,interactions,interactions

Interactions dr:

dfr= number of linearly independent columns corresponding to interaction dr in X´X

Interactions dri:

df= number of independent columns corresponding to interaction dri in X´X

Related Topics

Degrees of Freedom (ANOVA algorithms)
Main Effects (ANOVA algorithms)
Main Effect i (ANOVA algorithms)
Covariates (ANOVA algorithms)
Covariate i (ANOVA algorithms)
Model (ANOVA algorithms)
Residual (ANOVA algorithms)
Total (ANOVA algorithms)


Model (ANOVA algorithms)

ANOVA algorithms,ANOVA algorithms,ANOVA algorithms
model,model,model
dfModel=dfM+dfc+F−1Σr=1dfr

Related Topics

Degrees of Freedom (ANOVA algorithms)
Main Effects (ANOVA algorithms)
Main Effect i (ANOVA algorithms)
Covariates (ANOVA algorithms)
Covariate i (ANOVA algorithms)
Interactions (ANOVA algorithms)
Residual (ANOVA algorithms)
Total (ANOVA algorithms)


Residual (ANOVA algorithms)

ANOVA algorithms,ANOVA algorithms,ANOVA algorithms
residual,residual,residual
W−1−dfModel

Related Topics

Degrees of Freedom (ANOVA algorithms)
Main Effects (ANOVA algorithms)
Main Effect i (ANOVA algorithms)
Covariates (ANOVA algorithms)
Covariate i (ANOVA algorithms)
Interactions (ANOVA algorithms)
Model (ANOVA algorithms)
Total (ANOVA algorithms)


Total (ANOVA algorithms)

ANOVA algorithms,ANOVA algorithms,ANOVA algorithms
total,total,total

W − 1

Related Topics

Degrees of Freedom (ANOVA algorithms)
Main Effects (ANOVA algorithms)
Main Effect i (ANOVA algorithms)
Covariates (ANOVA algorithms)
Covariate i (ANOVA algorithms)
Interactions (ANOVA algorithms)
Model (ANOVA algorithms)
Residual (ANOVA algorithms)


Multiple Classification Analysis (ANOVA algorithms)

ANOVA algorithms,ANOVA algorithms,ANOVA algorithms
multiple classification analysis,multiple classification analysis,multiple classification analysis

Related Topics

ANOVA Algorithms
Model and Matrix Computations (ANOVA algorithms)
Computation of ANOVA Sum of Squares (ANOVA algorithms)
Model and Options (ANOVA algorithms)
Unstandardized Regression Coefficients for Covariates (ANOVA algorithms)
Cell Means and Sample Sizes (ANOVA algorithms)
References (ANOVA algorithms)


Notation (ANOVA algorithms)

ANOVA algorithms,ANOVA algorithms,ANOVA algorithms
notation,notation,notation
Yijk | Value of the dependent variable for the kth case in level j of main effect i
nij | Sum of weights of observations in level j of main effect i
ki | Number of nonempty levels in the ith main effect
W | Sum of weights of all observations

Related Topics

Basic Computations (ANOVA algorithms)
Calculation of the MCA Statistics (Andrews, et al., 1973) (ANOVA algorithms)


Basic Computations (ANOVA algorithms)

ANOVA algorithms,ANOVA algorithms,ANOVA algorithms
basic computations,basic computations,basic computations

Related Topics

Mean of Dependent Variable in Level j of Main Effect i (ANOVA algorithms)
Grand Mean (ANOVA algorithms)
Coefficient Estimates (ANOVA algorithms)
Notation (ANOVA algorithms)
Calculation of the MCA Statistics (Andrews, et al., 1973) (ANOVA algorithms)


Mean of Dependent Variable in Level j of Main Effect i (ANOVA algorithms)

ANOVA algorithms,ANOVA algorithms,ANOVA algorithms
mean of dependent variable in level j of main effect i,mean of dependent variable in level j of main effect i,mean of dependent variable in level j of main effect i
Yij=nijΣk=1Yijk/nij

Related Topics

Basic Computations (ANOVA algorithms)
Grand Mean (ANOVA algorithms)
Coefficient Estimates (ANOVA algorithms)


Grand Mean (ANOVA algorithms)

ANOVA algorithms,ANOVA algorithms,ANOVA algorithms
grand mean,grand mean,grand mean
Y=
Σ
i
Σ
j
Σ
k
Yijk/W

Related Topics

Basic Computations (ANOVA algorithms)
Mean of Dependent Variable in Level j of Main Effect i (ANOVA algorithms)
Coefficient Estimates (ANOVA algorithms)


Coefficient Estimates (ANOVA algorithms)

ANOVA algorithms,ANOVA algorithms,ANOVA algorithms
coefficient estimates,coefficient estimates,coefficient estimates

The computation of the coefficient for the main effects only model (bij) and coefficients for the main effects and covariates only model (
˜
b
ij) are obtained as previously described.

Related Topics

Basic Computations (ANOVA algorithms)
Mean of Dependent Variable in Level j of Main Effect i (ANOVA algorithms)
Grand Mean (ANOVA algorithms)


Calculation of the MCA Statistics (Andrews, et al., 1973) (ANOVA algorithms)

ANOVA algorithms,ANOVA algorithms,ANOVA algorithms
calculation of MCA statistics,calculation of MCA statistics,calculation of MCA statistics

Related Topics

Deviations (ANOVA algorithms)
Unadjusted Deviations (ANOVA algorithms)
Deviations Adjusted for the Main Effects (ANOVA algorithms)
Deviations Adjusted for the Main Effects and Covariates (Only for Models with Covariates) (ANOVA algorithms)
ETA and Beta Coefficients (ANOVA algorithms)
Beta Adjusted for Main Effects (ANOVA algorithms)
Beta Adjusted for Main Effects and Covariates (ANOVA algorithms)
Squared Multiple Correlation Coefficients (ANOVA algorithms)
Notation (ANOVA algorithms)
Basic Computations (ANOVA algorithms)


Deviations (ANOVA algorithms)

ANOVA algorithms,ANOVA algorithms,ANOVA algorithms
deviations,deviations,deviations

For each level of each main effect, the following are computed:

• Unadjusted Deviations

• Deviations Adjusted for the Main Effects

• Deviations Adjusted for the Main Effects and Covariates (Only for Models with Covariates)

Related Topics

Calculation of the MCA Statistics (Andrews, et al., 1973) (ANOVA algorithms)
Unadjusted Deviations (ANOVA algorithms)
Deviations Adjusted for the Main Effects (ANOVA algorithms)
Deviations Adjusted for the Main Effects and Covariates (Only for Models with Covariates) (ANOVA algorithms)
ETA and Beta Coefficients (ANOVA algorithms)
Beta Adjusted for Main Effects (ANOVA algorithms)
Beta Adjusted for Main Effects and Covariates (ANOVA algorithms)
Squared Multiple Correlation Coefficients (ANOVA algorithms)


Unadjusted Deviations (ANOVA algorithms)

ANOVA algorithms,ANOVA algorithms,ANOVA algorithms
unadjusted deviations,unadjusted deviations,unadjusted deviations

The unadjusted deviation from the grand mean for the jth level of the ith factor:

mij=Yij−Y

Related Topics

Calculation of the MCA Statistics (Andrews, et al., 1973) (ANOVA algorithms)
Deviations (ANOVA algorithms)
Deviations Adjusted for the Main Effects (ANOVA algorithms)
Deviations Adjusted for the Main Effects and Covariates (Only for Models with Covariates) (ANOVA algorithms)
ETA and Beta Coefficients (ANOVA algorithms)
Beta Adjusted for Main Effects (ANOVA algorithms)
Beta Adjusted for Main Effects and Covariates (ANOVA algorithms)
Squared Multiple Correlation Coefficients (ANOVA algorithms)


Deviations Adjusted for the Main Effects (ANOVA algorithms)

ANOVA algorithms,ANOVA algorithms,ANOVA algorithms
deviations adjusted for main effects,deviations adjusted for main effects,deviations adjusted for main effects

m1ij=bij−kiΣj=2bijnij/W, where bi1=0.

Related Topics

Calculation of the MCA Statistics (Andrews, et al., 1973) (ANOVA algorithms)
Deviations (ANOVA algorithms)
Unadjusted Deviations (ANOVA algorithms)
Deviations Adjusted for the Main Effects and Covariates (Only for Models with Covariates) (ANOVA algorithms)
ETA and Beta Coefficients (ANOVA algorithms)
Beta Adjusted for Main Effects (ANOVA algorithms)
Beta Adjusted for Main Effects and Covariates (ANOVA algorithms)
Squared Multiple Correlation Coefficients (ANOVA algorithms)


Deviations Adjusted for the Main Effects and Covariates (Only for Models with Covariates) (ANOVA algorithms)

ANOVA algorithms,ANOVA algorithms,ANOVA algorithms
deviations adjusted for main effects and covariates,deviations adjusted for main effects and covariates,deviations adjusted for main effects and covariates

m2ij=
˜
b
ij−kiΣj=2
˜
b
ijnij/W, where
˜
b
i1=0.

Related Topics

Calculation of the MCA Statistics (Andrews, et al., 1973) (ANOVA algorithms)
Deviations (ANOVA algorithms)
Unadjusted Deviations (ANOVA algorithms)
Deviations Adjusted for the Main Effects (ANOVA algorithms)
ETA and Beta Coefficients (ANOVA algorithms)
Beta Adjusted for Main Effects (ANOVA algorithms)
Beta Adjusted for Main Effects and Covariates (ANOVA algorithms)
Squared Multiple Correlation Coefficients (ANOVA algorithms)


ETA and Beta Coefficients (ANOVA algorithms)

ANOVA algorithms,ANOVA algorithms,ANOVA algorithms
ETA and beta coefficients,ETA and beta coefficients,ETA and beta coefficients

For each main effect i, the following are computed:

ETAi=
√ kiΣj=2nij(Yij−Y)2/Y´Y

Related Topics

Calculation of the MCA Statistics (Andrews, et al., 1973) (ANOVA algorithms)
Deviations (ANOVA algorithms)
Unadjusted Deviations (ANOVA algorithms)
Deviations Adjusted for the Main Effects (ANOVA algorithms)
Deviations Adjusted for the Main Effects and Covariates (Only for Models with Covariates) (ANOVA algorithms)
Beta Adjusted for Main Effects (ANOVA algorithms)
Beta Adjusted for Main Effects and Covariates (ANOVA algorithms)
Squared Multiple Correlation Coefficients (ANOVA algorithms)


Beta Adjusted for Main Effects (ANOVA algorithms)

ANOVA algorithms,ANOVA algorithms,ANOVA algorithms
beta adjusted for main effects,beta adjusted for main effects,beta adjusted for main effects
Betai=
√ kiΣj=2nij(m1ij)2/Y´Y

Related Topics

Calculation of the MCA Statistics (Andrews, et al., 1973) (ANOVA algorithms)
Deviations (ANOVA algorithms)
Unadjusted Deviations (ANOVA algorithms)
Deviations Adjusted for the Main Effects (ANOVA algorithms)
Deviations Adjusted for the Main Effects and Covariates (Only for Models with Covariates) (ANOVA algorithms)
ETA and Beta Coefficients (ANOVA algorithms)
Beta Adjusted for Main Effects and Covariates (ANOVA algorithms)
Squared Multiple Correlation Coefficients (ANOVA algorithms)


Beta Adjusted for Main Effects and Covariates (ANOVA algorithms)

ANOVA algorithms,ANOVA algorithms,ANOVA algorithms
beta adjusted for main effects and covariates,beta adjusted for main effects and covariates,beta adjusted for main effects and covariates
Betai=
√ kiΣj=2nij(m2ij)2/Y´Y

Related Topics

Calculation of the MCA Statistics (Andrews, et al., 1973) (ANOVA algorithms)
Deviations (ANOVA algorithms)
Unadjusted Deviations (ANOVA algorithms)
Deviations Adjusted for the Main Effects (ANOVA algorithms)
Deviations Adjusted for the Main Effects and Covariates (Only for Models with Covariates) (ANOVA algorithms)
ETA and Beta Coefficients (ANOVA algorithms)
Beta Adjusted for Main Effects (ANOVA algorithms)
Squared Multiple Correlation Coefficients (ANOVA algorithms)


Squared Multiple Correlation Coefficients (ANOVA algorithms)

ANOVA algorithms,ANOVA algorithms,ANOVA algorithms
squared multiple correlation coefficients,squared multiple correlation coefficients,squared multiple correlation coefficients

Main effects model

R2m=R(M)Y´Y.

Main effects and covariates model

R2mc=R(M,C)Y´Y.

The computations of R(M), R(M,C), and Y´Y are outlined previously.

Related Topics

Calculation of the MCA Statistics (Andrews, et al., 1973) (ANOVA algorithms)
Deviations (ANOVA algorithms)
Unadjusted Deviations (ANOVA algorithms)
Deviations Adjusted for the Main Effects (ANOVA algorithms)
Deviations Adjusted for the Main Effects and Covariates (Only for Models with Covariates) (ANOVA algorithms)
ETA and Beta Coefficients (ANOVA algorithms)
Beta Adjusted for Main Effects (ANOVA algorithms)
Beta Adjusted for Main Effects and Covariates (ANOVA algorithms)


Unstandardized Regression Coefficients for Covariates (ANOVA algorithms)

ANOVA algorithms,ANOVA algorithms,ANOVA algorithms
unstandardized regression coefficients for covariates,unstandardized regression coefficients for covariates,unstandardized regression coefficients for covariates

Estimates for the C vector, which are obtained the first time covariates are entered into the model, are printed.

Related Topics

ANOVA Algorithms
Model and Matrix Computations (ANOVA algorithms)
Computation of ANOVA Sum of Squares (ANOVA algorithms)
Model and Options (ANOVA algorithms)
Multiple Classification Analysis (ANOVA algorithms)
Cell Means and Sample Sizes (ANOVA algorithms)
References (ANOVA algorithms)


Cell Means and Sample Sizes (ANOVA algorithms)

ANOVA algorithms,ANOVA algorithms,ANOVA algorithms
cell means and sample sizes,cell means and sample sizes,cell means and sample sizes

Cell means and sample sizes for each combination of factor levels are obtained from the X´Y and X´X matrices prior to correction for the mean.

Yi=(X´Y)i(X´X)ii i=1,...,CN

Means for combinations involving the first level of a factor are obtained by subtraction from marginal totals.

Related Topics

Matrix Inversion (ANOVA algorithms)
ANOVA Algorithms
Model and Matrix Computations (ANOVA algorithms)
Computation of ANOVA Sum of Squares (ANOVA algorithms)
Model and Options (ANOVA algorithms)
Multiple Classification Analysis (ANOVA algorithms)
Unstandardized Regression Coefficients for Covariates (ANOVA algorithms)
References (ANOVA algorithms)


Matrix Inversion (ANOVA algorithms)

ANOVA algorithms,ANOVA algorithms,ANOVA algorithms
matrix inversion,matrix inversion,matrix inversion

The Cholesky decomposition (Stewart, 1973) is used to triangularize the matrix. If the tolerance is less than 10−5, the matrix is considered singular.

Related Topics

Cell Means and Sample Sizes (ANOVA algorithms)


References (ANOVA algorithms)

ANOVA algorithms,ANOVA algorithms,ANOVA algorithms
references,references,references

Andrews, F., J. Morgan, J. Sonquist, and L. Klein. 1973. Multiple classification analysis, 2nd ed. Ann Arbor: University of Michigan.

Searle, S. R. 1966. Matrix algebra for the biological sciences. New York: John Wiley & Sons, Inc.

Searle, S. R. 1971. Linear Models. New York: John Wiley & Sons, Inc.

Stewart, G. W. 1973. Introduction to matrix computations. New York: Academic Press.

Related Topics

ANOVA Algorithms
Model and Matrix Computations (ANOVA algorithms)
Computation of ANOVA Sum of Squares (ANOVA algorithms)
Model and Options (ANOVA algorithms)
Multiple Classification Analysis (ANOVA algorithms)
Unstandardized Regression Coefficients for Covariates (ANOVA algorithms)
Cell Means and Sample Sizes (ANOVA algorithms)


AREG Algorithms

AREG (command),AREG (command),AREG (command)
algorithms,algorithms,algorithms
AREG algorithms,AREG algorithms,AREG algorithms

In the ordinary regression model the errors are assumed to be uncorrelated. The model considered here has the form

yt=a+pΣi=1bixti+ut t=1, ..., n
ut=ρut−1+εt

(1)

where εt is an uncorrelated random error with variance σ2 and zero mean. The error terms ut follow a first-order autoregressive process. The constant term a can be included or excluded as specified. In the discussion below, if a is not included, it is set to be zero and not involved in the subsequent computation.

Two computational methods—Prais-Winsten and Cochrane-Orcutt—are described here.

Related Topics

Cochrane-Orcutt Method (AREG algorithms)
Initial Results (AREG algorithms)
Intermediate Results (AREG algorithms)
Final Results (AREG algorithms)
Prais-Winsten Method (AREG algorithms)
Initial Results (AREG algorithms)
Intermediate Results (AREG algorithms)
Final Results (AREG algorithms)


Cochrane-Orcutt Method (AREG algorithms)

AREG algorithms,AREG algorithms,AREG algorithms
Cochrane-Orcutt method,Cochrane-Orcutt method,Cochrane-Orcutt method

Note that model (1) can be rewritten in two equivalent forms as:

yt−ρyt−1=a(1−ρ)+pΣi=1bi(xti−ρ x(t−1)i)+εt | (2)
yt−a−pΣi=1bixti=ρ(yt−1−a−pΣi=1bix(t−1)i)+εt | (3)

Defining y*t=yt−ρyt−1 and x*ti=xti−ρx(t−1)i for t=2, ..., n, equation (2) can be rewritten as

y*t=a(1−ρ)+pΣi=1bix*ti+εt

(2*)

Starting with an initial value for ρ, the difference y*t and x*ti in equation (2*) are computed and OLS then applied to equation (2*) to estimate a and bi. These estimates in turn can be used in equation (3) to update
^
ρ
and the standard error of the estimate
^
ρ
.

Related Topics

AREG Algorithms
Initial Results (AREG algorithms)
Intermediate Results (AREG algorithms)
Final Results (AREG algorithms)
Prais-Winsten Method (AREG algorithms)
Initial Results (AREG algorithms)
Intermediate Results (AREG algorithms)
Final Results (AREG algorithms)


Initial Results (AREG algorithms)

AREG algorithms,AREG algorithms,AREG algorithms
initial results,initial results,initial results

An initial value for ρ can be pre-set by the user or set to be zero by default. The OLS method is used to obtain an initial estimate for a (if constant term is include) and bi.

Related Topics

ANOVA (AREG algorithms)
AREG Algorithms
Intermediate Results (AREG algorithms)
Final Results (AREG algorithms)
Prais-Winsten Method (AREG algorithms)
Initial Results (AREG algorithms)
Intermediate Results (AREG algorithms)
Final Results (AREG algorithms)


ANOVA (AREG algorithms)

AREG algorithms,AREG algorithms,AREG algorithms
ANOVA,ANOVA,ANOVA

Based on the OLS results, an analysis of variance table is constructed in which the degrees of freedom for regression are p, the number of X variables in equation (1), while the degrees of freedom for the residual are n−p*−1 if initial ρ≠0 and are n−p* otherwise. p* is the number of coefficients in equation (1). The sums of squares, mean squares, and other statistics are computed as in the REGRESSION procedure.

Related Topics

Initial Results (AREG algorithms)


Intermediate Results (AREG algorithms)

AREG algorithms,AREG algorithms,AREG algorithms
intermediate results,intermediate results,intermediate results

At each iteration, the following statistics are calculated:

• Rho

• Standard Error of rho

• Durbin-Watson Statistic

• Mean Square Error

Related Topics

Rho (AREG algorithms)
Standard Error of rho (AREG algorithms)
Durbin-Watson Statistic (AREG algorithms)
Mean Square Error (AREG algorithms)
AREG Algorithms
Initial Results (AREG algorithms)
Final Results (AREG algorithms)
Prais-Winsten Method (AREG algorithms)
Initial Results (AREG algorithms)
Intermediate Results (AREG algorithms)
Final Results (AREG algorithms)


Rho (AREG algorithms)

AREG algorithms,AREG algorithms,AREG algorithms
rho,rho,rho

An updated value for ρ is computed as

^
ρ
=nΣt=2
˜
u
t
˜
u
t−1nΣt=1
˜
u
2t

where the residuals
˜
u
t are obtained from equation (1).

Related Topics

Intermediate Results (AREG algorithms)
Standard Error of rho (AREG algorithms)
Durbin-Watson Statistic (AREG algorithms)
Mean Square Error (AREG algorithms)


Standard Error of rho (AREG algorithms)

AREG algorithms,AREG algorithms,AREG algorithms
standard error of rho,standard error of rho,standard error of rho

An estimate of the standard error of
^
ρ

se (
^
ρ
)=
√ 1−
^
ρ
2n−1−p*

where p*=p+1 if there is a constant term; p otherwise.

Related Topics

Intermediate Results (AREG algorithms)
Rho (AREG algorithms)
Durbin-Watson Statistic (AREG algorithms)
Mean Square Error (AREG algorithms)


Durbin-Watson Statistic (AREG algorithms)

AREG algorithms,AREG algorithms,AREG algorithms
Durbin-Watson statistic,Durbin-Watson statistic,Durbin-Watson statistic
DW=n−1Σi=1(
˜
ε
i+1−
˜
ε
i)2nΣi=1
˜
ε
2i

where

˜
ε
1=
√ 1−
^
ρ
2
˜
u
1
˜
ε
i=
˜
u
i−
^
ρ
˜
u
i−1i=2, ..., n

Related Topics

Intermediate Results (AREG algorithms)
Rho (AREG algorithms)
Standard Error of rho (AREG algorithms)
Mean Square Error (AREG algorithms)


Mean Square Error (AREG algorithms)

AREG algorithms,AREG algorithms,AREG algorithms
mean square error,mean square error,mean square error

An estimate of the variance of εt

MSE=nΣt=2(
˜
u
t−
^
ρ
˜
u
t−1)2n−2−p*

Related Topics

Intermediate Results (AREG algorithms)
Rho (AREG algorithms)
Standard Error of rho (AREG algorithms)
Durbin-Watson Statistic (AREG algorithms)


Final Results (AREG algorithms)

AREG algorithms,AREG algorithms,AREG algorithms
final results,final results,final results

Iteration terminates if either all the parameters change by less than a specified value (default 0.001) or the number of iterations exceeds the cutoff value (default 10).

The following variables are computed for each case:

• FIT

• ERR

• SEP

• LCL and UCL

• Other Statistics

Related Topics

FIT (AREG algorithms)
ERR (AREG algorithms)
SEP (AREG algorithms)
LCL and UCL (AREG algorithms)
Other Statistics (AREG algorithms)
AREG Algorithms
Initial Results (AREG algorithms)
Intermediate Results (AREG algorithms)
Prais-Winsten Method (AREG algorithms)
Initial Results (AREG algorithms)
Intermediate Results (AREG algorithms)
Final Results (AREG algorithms)


FIT (AREG algorithms)

AREG algorithms,AREG algorithms,AREG algorithms
FIT,FIT,FIT

Fitted responses are computed as

˜
y
1=
^
y
1

and

˜
y
t=
^
y
t+
^
ρ
^
u
t−1t=2, ..., n

in which
^
ρ
is the final estimate of ρ, and

^
y
t=
^
a
+pΣi=1
^
b
ixti
^
u
t=yt−
^
y
tt=1, ..., n

Related Topics

Final Results (AREG algorithms)
ERR (AREG algorithms)
SEP (AREG algorithms)
LCL and UCL (AREG algorithms)
Other Statistics (AREG algorithms)


ERR (AREG algorithms)

AREG algorithms,AREG algorithms,AREG algorithms
ERR,ERR,ERR

Residuals are computed as

˜
ε
t=yt−
˜
y
tt=2, ..., n
˜
ε
1=
√ 1−
^
ρ
2(y1−
˜
y
1)

Related Topics

Final Results (AREG algorithms)
FIT (AREG algorithms)
SEP (AREG algorithms)
LCL and UCL (AREG algorithms)
Other Statistics (AREG algorithms)


SEP (AREG algorithms)

AREG algorithms,AREG algorithms,AREG algorithms
SEP,SEP,SEP

Standard error of predicted values at time t

SEP1=
√ MSE
√ (11−
^
ρ
2+
˜
h
1)

and

SEPt=
√ MSE
√ (1+
˜
h
t)
t=2, ..., n

where

˜
h
i=Xi(X*´X*)−1X´i

in which Xi is the predictor vector at time i with the first component 1 if a constant term is included in equation (2*). X* is a (n−1)×p* design matrix for equation (2*). The first column has value of 1−
^
ρ
if a constant term is included in equation (2*).

Related Topics

Final Results (AREG algorithms)
FIT (AREG algorithms)
ERR (AREG algorithms)
LCL and UCL (AREG algorithms)
Other Statistics (AREG algorithms)


LCL and UCL (AREG algorithms)

AREG algorithms,AREG algorithms,AREG algorithms
LCL UCL,LCL UCL,LCL UCL

95% prediction interval for the future yk is

˜
y
k±tn−1−p*;0.025 SEPk

Related Topics

Final Results (AREG algorithms)
FIT (AREG algorithms)
ERR (AREG algorithms)
SEP (AREG algorithms)
Other Statistics (AREG algorithms)


Other Statistics (AREG algorithms)

AREG algorithms,AREG algorithms,AREG algorithms
other statistics,other statistics,other statistics

Other statistics such as Multiple R, R-Squared, Adjusted R-Squared, and so on, are computed. Consult the REGRESSION procedure for details.

Related Topics

Final Results (AREG algorithms)
FIT (AREG algorithms)
ERR (AREG algorithms)
SEP (AREG algorithms)
LCL and UCL (AREG algorithms)


Prais-Winsten Method (AREG algorithms)

AREG algorithms,AREG algorithms,AREG algorithms
Prais-Winsten method,Prais-Winsten method,Prais-Winsten method

This method is a modification of the Cochrane-Orcutt method in that the first case gets explicit treatment. By adding an extra equation to (2*) , the model has the form of

(1−ρ)y1=a(1−ρ)+pΣi=1bi(1−ρ)x1i+(1−ρ)u1
y*t=a(1−ρ)+pΣi=1bix*ti+εtt=2, ..., n

(4)

Like the Cochrane-Orcutt method, an initial value of ρ can be set by the user or a default value of zero can be used. The iterative process of estimating the parameters is performed via weighted least squares (WLS). The weights used in WLS computation are w1=(1−
^
ρ
2)/(1−
^
ρ
)2 and wi=1 for i=2, ..., n. The computation of the variance of εt and the variance of
^
ρ
is the same as that of the WLS in the REGRESSION procedure.

Related Topics

AREG Algorithms
Cochrane-Orcutt Method (AREG algorithms)
Initial Results (AREG algorithms)
Intermediate Results (AREG algorithms)
Final Results (AREG algorithms)
Initial Results (AREG algorithms)
Intermediate Results (AREG algorithms)
Final Results (AREG algorithms)


Initial Results (AREG algorithms)

AREG algorithms,AREG algorithms,AREG algorithms
initial results,initial results,initial results

The WLS method is used to obtain initial parameter estimates.

Related Topics

ANOVA (AREG algorithms)
AREG Algorithms
Cochrane-Orcutt Method (AREG algorithms)
Initial Results (AREG algorithms)
Intermediate Results (AREG algorithms)
Final Results (AREG algorithms)
Intermediate Results (AREG algorithms)
Final Results (AREG algorithms)


ANOVA (AREG algorithms)

AREG algorithms,AREG algorithms,AREG algorithms
ANOVA,ANOVA,ANOVA

The degrees of freedom are p for regression and n−p* for residuals.

Related Topics

Initial Results (AREG algorithms)


Intermediate Results (AREG algorithms)

AREG algorithms,AREG algorithms,AREG algorithms
intermediate results,intermediate results,intermediate results

The formulas for RHO, SE Rho, DW, and MSE are exactly the same as those in the Cochrane-Orcutt method. The degrees of freedom for residuals, however, are n−1−p*.

Related Topics

AREG Algorithms
Cochrane-Orcutt Method (AREG algorithms)
Initial Results (AREG algorithms)
Intermediate Results (AREG algorithms)
Final Results (AREG algorithms)
Prais-Winsten Method (AREG algorithms)
Initial Results (AREG algorithms)
Final Results (AREG algorithms)


Final Results (AREG algorithms)

AREG algorithms,AREG algorithms,AREG algorithms
final results,final results,final results

The following variables are computed for each case.

Related Topics

SEP (AREG algorithms)
LCL and UCL (AREG algorithms)
AREG Algorithms
Cochrane-Orcutt Method (AREG algorithms)
Initial Results (AREG algorithms)
Intermediate Results (AREG algorithms)
Final Results (AREG algorithms)
Initial Results (AREG algorithms)
Intermediate Results (AREG algorithms)


SEP (AREG algorithms)

AREG algorithms,AREG algorithms,AREG algorithms
SEP,SEP,SEP

Standard error of predicted value at time t is computed as

SEP1=
√ MSE
√ (11−
^
ρ
2+
˜
h
1)
SEPt=
√ MSE
√ (1+
˜
h
t)
t=2, ..., n

where
˜
h
is computed as

˜
h
i=Xi(X*´X*)−1X´i

in which Xi is the predictor vector at time i and X* is a n×p* design matrix for equation (4). If a constant term is included in the model, the first column of X* has a constant value of 1−
^
ρ
, the first row of X* is
√ w1
(x11, ..., x1p), and p*=p+1.

Related Topics

Final Results (AREG algorithms)
LCL and UCL (AREG algorithms)


LCL and UCL (AREG algorithms)

AREG algorithms,AREG algorithms,AREG algorithms
LCL and UCL,LCL and UCL,LCL and UCL

95% prediction interval for yk at time k is

˜
y
k±tn−p*;0.025 SEPk

Related Topics

Final Results (AREG algorithms)
SEP (AREG algorithms)


ARIMA Algorithms

ARIMA (command),ARIMA (command),ARIMA (command)
algorithms,algorithms,algorithms
ARIMA algorithms,ARIMA algorithms,ARIMA algorithms

The ARIMA procedure computes the parameter estimates for a given seasonal or non-seasonal univariate ARIMA model. It also computes the fitted values, forecasting values, and other related variables for the model.

Related Topics

Notation (ARIMA algorithms)
Models (ARIMA algorithms)
Estimation (ARIMA algorithms)
Diagnostic Statistics (ARIMA algorithms)
Generated Variables (ARIMA algorithms)
Forecasting (ARIMA algorithms)
References (ARIMA algorithms)


Notation (ARIMA algorithms)

ARIMA algorithms,ARIMA algorithms,ARIMA algorithms
notation,notation,notation

The following notation is used throughout this chapter unless otherwise stated:

yt (t=1, 2, ..., N) | Univariate time series under investigation.
N | Total number of observations.
at (t = 1, 2, ... , N) | White noise series normally distributed with mean zero and variance σ2a.
p | Order of the non-seasonal autoregressive part of the model
q | Order of the non-seasonal moving average part of the model
d | Order of the non-seasonal differencing
P | Order of the seasonal autoregressive part of the model
Q | Order of the seasonal moving-average part of the model
D | Order of the seasonal differencing
s | Seasonality or period of the model
φp(B) | AR polynomial of B of order p, φp(B)=1−1B−2B2−...−pBp
θq(B) | MA polynomial of B of order q, θq(B)=1−1B−2B2−...−qBq
ΦP(Bs) | Seasonal AR polynomial of BS of order P, ΦP(Bs)=1−Φ1Bs−Φ2Bs2−...−ΦPBsP
ΘQ(Bs) | Seasonal MA polynomial of BS of order Q, ΘQ(Bs)=1−Θ1Bs−Θ2Bs2−...−ΘQBsQ
Δ | Differencing operator Δ=(1−B)d(1−Bs)D
B | Backward shift operator with BYt=Yt−1 and Bat=at−1

Related Topics

ARIMA Algorithms
Models (ARIMA algorithms)
Estimation (ARIMA algorithms)
Diagnostic Statistics (ARIMA algorithms)
Generated Variables (ARIMA algorithms)
Forecasting (ARIMA algorithms)
References (ARIMA algorithms)


Models (ARIMA algorithms)

ARIMA algorithms,ARIMA algorithms,ARIMA algorithms
models,models,models

A seasonal univariate ARIMA(p,d,q)(P,D,Q)s model is given by

Φ(B)[Δyt−μ]=Θ(B)att=1,...,N

where

Φ(B)=φp(B)ΦP(B)

Θ(B)=θq(B)ΘQ(B)

and μ is an optional model constant. It is also called the stationary series mean, assuming that, after differencing, the series is stationary. When NOCONSTANT is specified, μ is assumed to be zero.

An optional log scale transformation can be applied to yt before the model is fitted. In this chapter, the same symbol, yt, is used to denote the series either before or after log scale transformation.

Independent variables x1, x2, …, xm can also be included in the model. The model with independent variables is given by

Φ(B)[Δ(yt−mΣi=1cixit)−μ]=Θ(B)at

where

ci, i=1,2,...,m, are the regression coefficients for the independent variables.

Related Topics

ARIMA Algorithms
Notation (ARIMA algorithms)
Estimation (ARIMA algorithms)
Diagnostic Statistics (ARIMA algorithms)
Generated Variables (ARIMA algorithms)
Forecasting (ARIMA algorithms)
References (ARIMA algorithms)


Estimation (ARIMA algorithms)

ARIMA algorithms,ARIMA algorithms,ARIMA algorithms
estimation,estimation,estimation

Basically, two different estimation algorithms are used to compute maximum likelihood (ML) estimates for the parameters in an ARIMA model:

• Melard’s algorithm is used for the estimation when there is no missing data in the time series. The algorithm computes the maximum likelihood estimates of the model parameters. The details of the algorithm are described in (Melard, 1984), (Pearlman, 1980), and (Morf, Sidhu, and Kailath, 1974).

• A Kalman filtering algorithm is used for the estimation when some observations in the time series are missing. The algorithm efficiently computes the marginal likelihood of an ARIMA model with missing observations. The details of the algorithm are described in the following literature: (Kohn and Ansley, 1986) and (Kohn and Ansley, 1985).

Initialization of ARMA parameters

The ARMA parameters are initialized as follows:

Assume that the series Yt follows an ARMA(p,q)(P,Q) model with mean 0; that is:

Yt−1Yt−1−...−pYt−p=at−θ1at−1−...−θqat−q

In the following cl and ρl represent the lth lag autocovariance and autocorrelation of Yt respectively, and
^
c
l and
^
ρ
l represent their estimates.

Non-seasonal AR parameters

For AR parameter initial values, the estimated method is the same as that in appendix A6.2 of (Box, Jenkins, and Reinsel, 1994). Denote the estimates as
^
´1,...,
^
´p+q.

Non-seasonal MA parameters

Let

wt=Yt−1Yt−1−...−pYt−p=at−θ1at−1−...−θqat−q

The cross covariance

λl=E(wt+lat)=E((at+l−θ1at+l−1−...−θqat+l−q)at)={
σ2a | l=0
−θ1σ2a | l=1
... ...
−θqσ2a
0
l=q
l>q

Assuming that an AR(p+q) can approximate Yt, it follows that:

Yt−´1Yt−1−...−´pYt−p−´p+1Yt−p−1−...−´p+qYt−p−q=at

The AR parameters of this model are estimated as above and are denoted as
^
´1,...,
^
´p+q.

Thus λl can be estimated by

λl≈E((Yt+l−1Yt+l−1−...−pYt+l−p)(Yt−´1Yt−1−...−´p+qYt−p−q))
=(ρl−p+qΣj=1jρl+j−pΣi=1iρl−i+pΣi=1p+qΣj=1ijρl+j−i)c0

And the error variance σ2a is approximated by

^
σ
2a=Var(−p+qΣj=0´jYt−j)=p+qΣi=0p+qΣj=0´i´jci−j=c0p+qΣi=0p+qΣj=0´i´jρi−j

with
^
´0=−1.

Then the initial MA parameters are approximated by θl=−λl/σ2a and estimated by

^
θ
l=−
^
λ
l/
^
σ
2a=ρl−p+qΣj=1
^
jρl+j−pΣi=1
^
iρl−i+pΣi=1p+qΣj=1
^
i
^
jρl+j−ip+qΣi=0p+qΣj=0
^
´i
^
´jρi−j

So
^
θ
l can be calculated by
^
´j,
^
i, and {
^
ρ
l}p+2ql=1. In this procedure, only {
^
ρ
l}p+ql=1 are used and all other parameters are set to 0.

Seasonal parameters

For seasonal AR and MA components, the autocorrelations at the seasonal lags in the above equations are used.

Related Topics

ARIMA Algorithms
Notation (ARIMA algorithms)
Models (ARIMA algorithms)
Diagnostic Statistics (ARIMA algorithms)
Generated Variables (ARIMA algorithms)
Forecasting (ARIMA algorithms)
References (ARIMA algorithms)


Diagnostic Statistics (ARIMA algorithms)

ARIMA algorithms,ARIMA algorithms,ARIMA algorithms
diagnostic statistics,diagnostic statistics,diagnostic statistics

The following definitions are used in the statistics below:

Np

Number of parameters.

Np={
p+q+P+Q+m | without model constant
p+q+P+Q+m+1 | with model constant

SSQ

Residual sum of squares SSQ=e´e, where e is the residual vector

^
σ
2a

Estimated residual variance.
^
σ
2a=SSQdf, where df=N− Np

SSQ'

Adjusted residual sum of squares. SSQ´=(SSQ)|Ω|1/N, where Ω is the theoretical covariance matrix of the observation vector computed at MLE

Related Topics

Log-Likelihood (ARIMA algorithms)
Akaike Information Criterion (AIC) (ARIMA algorithms)
Schwartz Bayesian Criterion (SBC) (ARIMA algorithms)
ARIMA Algorithms
Notation (ARIMA algorithms)
Models (ARIMA algorithms)
Estimation (ARIMA algorithms)
Generated Variables (ARIMA algorithms)
Forecasting (ARIMA algorithms)
References (ARIMA algorithms)


Log-Likelihood (ARIMA algorithms)

ARIMA algorithms,ARIMA algorithms,ARIMA algorithms
log-likelihood,log-likelihood,log-likelihood

L = −Nln(
^
σ
a)−SSQ´2
^
σ
2a−Nln(2π)2

Related Topics

Diagnostic Statistics (ARIMA algorithms)
Akaike Information Criterion (AIC) (ARIMA algorithms)
Schwartz Bayesian Criterion (SBC) (ARIMA algorithms)


Akaike Information Criterion (AIC) (ARIMA algorithms)

ARIMA algorithms,ARIMA algorithms,ARIMA algorithms
Akaike information criterion (AIC),Akaike information criterion (AIC),Akaike information criterion (AIC)
AIC,AIC,AIC

AIC = −2L+2Np

Related Topics

Diagnostic Statistics (ARIMA algorithms)
Log-Likelihood (ARIMA algorithms)
Schwartz Bayesian Criterion (SBC) (ARIMA algorithms)


Schwartz Bayesian Criterion (SBC) (ARIMA algorithms)

ARIMA algorithms,ARIMA algorithms,ARIMA algorithms
Schwartz bayesian criterion (SBC),Schwartz bayesian criterion (SBC),Schwartz bayesian criterion (SBC)
SBC,SBC,SBC

SBC=−2L+ln(N)Np

Related Topics

Diagnostic Statistics (ARIMA algorithms)
Log-Likelihood (ARIMA algorithms)
Akaike Information Criterion (AIC) (ARIMA algorithms)


Generated Variables (ARIMA algorithms)

ARIMA algorithms,ARIMA algorithms,ARIMA algorithms
generated variables,generated variables,generated variables

The following variables are generated for each case.

Related Topics

Predicted Values (ARIMA algorithms)
Residuals (ARIMA algorithms)
Standard Errors of the Predicted Values (ARIMA algorithms)
Confidence Limits of the Predicted Values (ARIMA algorithms)
ARIMA Algorithms
Notation (ARIMA algorithms)
Models (ARIMA algorithms)
Estimation (ARIMA algorithms)
Diagnostic Statistics (ARIMA algorithms)
Forecasting (ARIMA algorithms)
References (ARIMA algorithms)


Predicted Values (ARIMA algorithms)

ARIMA algorithms,ARIMA algorithms,ARIMA algorithms
predicted values,predicted values,predicted values

Computation of predicted values depends upon the forecasting method.

Related Topics

Forecasting Method: Conditional Least Squares (CLS or AUTOINT) (ARIMA algorithms)
Forecasting Method: Unconditional Least Squares (EXACT) (ARIMA algorithms)
Residuals (ARIMA algorithms)
Standard Errors of the Predicted Values (ARIMA algorithms)
Confidence Limits of the Predicted Values (ARIMA algorithms)


Forecasting Method: Conditional Least Squares (CLS or AUTOINT) (ARIMA algorithms)

ARIMA algorithms,ARIMA algorithms,ARIMA algorithms
forecasting method: conditional least squares (CLS or AUTOINT),forecasting method: conditional least squares (CLS or AUTOINT),forecasting method: conditional least squares (CLS or AUTOINT)
conditional least squares forecasting method,conditional least squares forecasting method,conditional least squares forecasting method
CLS or AUTOINT,CLS or AUTOINT,CLS or AUTOINT

In general, the model used for fitting and forecasting (after estimation, if involved) can be written as

yt−D(B)yt=Φ(B)μ+Θ(B)at+mΣi=1ciΦ(B)Δxit

where

D(B)=Θ(B)Δ−1

Φ(B)μ=Φ(1)μ

Thus, the predicted values (FIT)t are computed as follows:

(FIT)t=
^
y
t=D(B)
^
y
t+Φ(B)μ+Θ(B)
^
a
t+mΣi=1ciΦ(B)Δxit

where

^
a
t=yt−
^
y
t1≤t≤n

Starting Values for Computing Fitted Series. To start the computation for fitted values, all unavailable beginning residuals are set to zero and unavailable beginning values of the fitted series are set according to the selected method:

CLS. The computation starts at the (d+sD)-th period. After a specified log scale transformation, if any, the original series is differenced and/or seasonally differenced according to the model specification. Fitted values for the differenced series are computed first. All unavailable beginning fitted values in the computation are replaced by the stationary series mean, which is equal to the model constant in the model specification. The fitted values are then aggregated to the original series and properly transformed back to the original scale. The first d+sD fitted values are set to missing (SYSMIS).

AUTOINIT. The computation starts at the [d+p+s(D+P)]-th period. After any specified log scale transformation, the actual d+p+s(D+P) beginning observations in the series are used as beginning fitted values in the computation. The first d+p+s(D+P) fitted values are set to missing. The fitted values are then transformed back to the original scale, if a log transformation is specified.

Related Topics

Predicted Values (ARIMA algorithms)
Forecasting Method: Unconditional Least Squares (EXACT) (ARIMA algorithms)


Forecasting Method: Unconditional Least Squares (EXACT) (ARIMA algorithms)

ARIMA algorithms,ARIMA algorithms,ARIMA algorithms
forecasting method: unconditional least squares (EXACT),forecasting method: unconditional least squares (EXACT),forecasting method: unconditional least squares (EXACT)
unconditional least squares forecasting method,unconditional least squares forecasting method,unconditional least squares forecasting method
EXACT,EXACT,EXACT

As with the CLS method, the computations start at the (d+sD)-th period. First, the original series (or the log-transformed series if a transformation is specified) is differenced and/or seasonally differenced according to the model specification. Then the fitted values for the differenced series are computed. The fitted values are one-step-ahead, least-squares predictors calculated using the theoretical autocorrelation function of the stationary autoregressive moving average (ARMA) process corresponding to the differenced series. The autocorrelation function is computed by treating the estimated parameters as the true parameters. The fitted values are then aggregated to the original series and properly transformed back to the original scale. The first d+sD fitted values are set to missing (SYSMIS). The details of the least-squares prediction algorithm for the ARMA models can be found in (Brockwell and Davis, 1991).

Related Topics

Predicted Values (ARIMA algorithms)
Forecasting Method: Conditional Least Squares (CLS or AUTOINT) (ARIMA algorithms)


Residuals (ARIMA algorithms)

ARIMA algorithms,ARIMA algorithms,ARIMA algorithms
residuals,residuals,residuals

Residual series are always computed in the transformed log scale, if a transformation is specified.

(ERR)t=yt−(FIT)tt=1,2,...,N

Related Topics

Generated Variables (ARIMA algorithms)
Predicted Values (ARIMA algorithms)
Standard Errors of the Predicted Values (ARIMA algorithms)
Confidence Limits of the Predicted Values (ARIMA algorithms)


Standard Errors of the Predicted Values (ARIMA algorithms)

ARIMA algorithms,ARIMA algorithms,ARIMA algorithms
standard errors of the predicted values,standard errors of the predicted values,standard errors of the predicted values

Standard errors of the predicted values are first computed in the transformed log scale, if a transformation is specified.

Related Topics

Forecasting Method: Conditional Least Squares (CLS or AUTOINIT) (ARIMA algorithms)
Forecasting Method: Unconditional Least Squares (EXACT) (ARIMA algorithms)
Predicted Values (ARIMA algorithms)
Residuals (ARIMA algorithms)
Confidence Limits of the Predicted Values (ARIMA algorithms)


Forecasting Method: Conditional Least Squares (CLS or AUTOINIT) (ARIMA algorithms)

ARIMA algorithms,ARIMA algorithms,ARIMA algorithms
forecasting method: conditional least squares (CLS or AUTOINIT),forecasting method: conditional least squares (CLS or AUTOINIT),forecasting method: conditional least squares (CLS or AUTOINIT)
conditional least squares forecasting method,conditional least squares forecasting method,conditional least squares forecasting method
CLS or AUTOINIT,CLS or AUTOINIT,CLS or AUTOINIT

(SEP)t=
^
σ
at=1,2,...,N

Related Topics

Standard Errors of the Predicted Values (ARIMA algorithms)
Forecasting Method: Unconditional Least Squares (EXACT) (ARIMA algorithms)


Forecasting Method: Unconditional Least Squares (EXACT) (ARIMA algorithms)

ARIMA algorithms,ARIMA algorithms,ARIMA algorithms
forecasting method: unconditional least squares (EXACT),forecasting method: unconditional least squares (EXACT),forecasting method: unconditional least squares (EXACT)
unconditional least squares forecasting method,unconditional least squares forecasting method,unconditional least squares forecasting method
EXACT,EXACT,EXACT

In the EXACT method, unlike the CLS method, there is no simple expression for the standard errors of the predicted values. The standard errors of the predicted values will, however, be given by the least-squares prediction algorithm as a byproduct.

Standard errors of the predicted values are then transformed back to the original scale for each predicted value, if a transformation is specified.

Related Topics

Standard Errors of the Predicted Values (ARIMA algorithms)
Forecasting Method: Conditional Least Squares (CLS or AUTOINIT) (ARIMA algorithms)


Confidence Limits of the Predicted Values (ARIMA algorithms)

ARIMA algorithms,ARIMA algorithms,ARIMA algorithms
confidence limits of the predicted values,confidence limits of the predicted values,confidence limits of the predicted values

Confidence limits of the predicted values are first computed in the transformed log scale, if a transformation is specified:

(LCL)t=(FIT)t−t1−α/2,df(SEP)tt=1,2,...,N

(UCL)t=(FIT)t+t1−α/2,df(SEP)tt=1,2,...,N

where t1−α/2,df is the (1−α/2)-th percentile of a t distribution with df degrees of freedom and α is the specified confidence level (by default α=0.05).

Confidence limits of the predicted values are then transformed back to the original scale for each predicted value, if a transformation is specified.

Related Topics

Generated Variables (ARIMA algorithms)
Predicted Values (ARIMA algorithms)
Residuals (ARIMA algorithms)
Standard Errors of the Predicted Values (ARIMA algorithms)


Forecasting (ARIMA algorithms)

ARIMA algorithms,ARIMA algorithms,ARIMA algorithms
forecasting,forecasting,forecasting

The following values are computed for each forecast period.

Related Topics

Forecasting Values (ARIMA algorithms)
Standard Errors of the Forecasting Values (ARIMA algorithms)
ARIMA Algorithms
Notation (ARIMA algorithms)
Models (ARIMA algorithms)
Estimation (ARIMA algorithms)
Diagnostic Statistics (ARIMA algorithms)
Generated Variables (ARIMA algorithms)
References (ARIMA algorithms)


Forecasting Values (ARIMA algorithms)

ARIMA algorithms,ARIMA algorithms,ARIMA algorithms
forecasting values,forecasting values,forecasting values

Computation of forecasting values depends upon the forecasting method.

Related Topics

Forcasting Method: Conditional Least Squares (CLS or AUTOINIT) (ARIMA algorithms)
Forecasting Method: Unconditional Least Squares (EXACT) (ARIMA algorithms)
Standard Errors of the Forecasting Values (ARIMA algorithms)


Forcasting Method: Conditional Least Squares (CLS or AUTOINIT) (ARIMA algorithms)

ARIMA algorithms,ARIMA algorithms,ARIMA algorithms
forecasting method: conditional least squares (CLS or AUTOINIT),forecasting method: conditional least squares (CLS or AUTOINIT),forecasting method: conditional least squares (CLS or AUTOINIT)
conditional least squares forecasting method,conditional least squares forecasting method,conditional least squares forecasting method
CLS or AUTOINIT,CLS or AUTOINIT,CLS or AUTOINIT

^
y
t(l), the l-step-ahead forecast of yt+l at the time t, can be represented as:

^
y
t(l)=D(B)
^
y
t+l+Φ(B)μ+Θ(B)
^
a
t+l+mΣi=1ciΦ(B)Δxi,t+l

Note that

^
y
t+l−i={
yt+l−i if l≤i
^
y
t(l−i) 		if l>i

^
a
t+l−j={
yt+l−i−
^
y
t+l−i−1(1) 		if l≤i
0 if l>i

Related Topics

Forecasting Values (ARIMA algorithms)
Forecasting Method: Unconditional Least Squares (EXACT) (ARIMA algorithms)


Forecasting Method: Unconditional Least Squares (EXACT) (ARIMA algorithms)

ARIMA algorithms,ARIMA algorithms,ARIMA algorithms
forecasting method: unconditional least squares (EXACT),forecasting method: unconditional least squares (EXACT),forecasting method: unconditional least squares (EXACT)
unconditional least squares forecasting method,unconditional least squares forecasting method,unconditional least squares forecasting method
EXACT,EXACT,EXACT

The forecasts with this option are finite memory, least-squares forecasts computed using the theoretical autocorrelation function of the series. The details of the least-squares forecasting algorithm for the ARIMA models can be found in (Brockwell and Davis, 1991).

Related Topics

Forecasting Values (ARIMA algorithms)
Forcasting Method: Conditional Least Squares (CLS or AUTOINIT) (ARIMA algorithms)


Standard Errors of the Forecasting Values (ARIMA algorithms)

ARIMA algorithms,ARIMA algorithms,ARIMA algorithms
standard errors of the forecasting values,standard errors of the forecasting values,standard errors of the forecasting values

Computation of these standard errors depends upon the forecasting method.

Related Topics

Forcasting Method: Conditional Least Squares (CLS or AUTOINIT) (ARIMA algorithms)
Forecasting Method: Unconditional Least Squares (EXACT) (ARIMA algorithms)
Forecasting Values (ARIMA algorithms)


Forcasting Method: Conditional Least Squares (CLS or AUTOINIT) (ARIMA algorithms)

ARIMA algorithms,ARIMA algorithms,ARIMA algorithms
forecasting method: conditional least squares (CLS or AUTOINIT),forecasting method: conditional least squares (CLS or AUTOINIT),forecasting method: conditional least squares (CLS or AUTOINIT)
conditional least squares forecasting method,conditional least squares forecasting method,conditional least squares forecasting method
CLS or AUTOINIT,CLS or AUTOINIT,CLS or AUTOINIT

For the purpose of computing standard errors of the forecasting values, the model can be written in the format of weights (ignoring the model constant):

yt=q(B)ΘQ(B)φp(B)ΦP(B)at=ψ(B)at=∞Σi=0ψiBiat−i

where

ψ0=1

Then

se [
^
y
t(l)]={1+ψ21+ψ22+...+ψ2l−1}12
^
σ
a

Note that, for the predicted value, l=1. Hence, (SEP)t=
^
σ
a at any time t.

Computation of Ψ Weights. Ψ weights can be computed by expanding both sides of the following equation and solving the linear equation system established by equating the corresponding coefficients on both sides of the expansion:

φp(B)ΦP(B)Δψ(B)=θq(B)ΘQ(B)

An explicit expression of Ψ weights can be found in (Box et al., 1994).

Related Topics

Standard Errors of the Forecasting Values (ARIMA algorithms)
Forecasting Method: Unconditional Least Squares (EXACT) (ARIMA algorithms)


Forecasting Method: Unconditional Least Squares (EXACT) (ARIMA algorithms)

ARIMA algorithms,ARIMA algorithms,ARIMA algorithms
forecasting method: unconditional least squares (EXACT),forecasting method: unconditional least squares (EXACT),forecasting method: unconditional least squares (EXACT)
unconditional least squares forecasting method,unconditional least squares forecasting method,unconditional least squares forecasting method
EXACT,EXACT,EXACT

As with the standard errors of the predicted values, the standard errors of the forecasting values are a byproduct during the least-squares forecasting computation. The details can be found in (Brockwell and Davis, 1991).

Related Topics

Standard Errors of the Forecasting Values (ARIMA algorithms)
Forcasting Method: Conditional Least Squares (CLS or AUTOINIT) (ARIMA algorithms)


References (ARIMA algorithms)

ARIMA algorithms,ARIMA algorithms,ARIMA algorithms
references,references,references

Box, G. E. P., G. M. Jenkins, and G. C. Reinsel. 1994. Time series analysis: Forecasting and control, 3rd ed. Englewood Cliffs, N.J.: Prentice Hall.

Brockwell, P. J., and R. A. Davis. 1991. Time Series: Theory and Methods, 2 ed. : Springer-Verlag.

Kohn, R., and C. Ansley. 1985. Efficient estimation and prediction in time series regression models. Biometrika, 72:3, 694-697.

Kohn, R., and C. Ansley. 1986. Estimation, prediction, and interpolation for ARIMA models with missing data. Journal of the American Statistical Association, 81, 751-761.

Makridakis, S. G., S. C. Wheelwright, and R. J. Hyndman. 1997. Forecasting: Methods and applications, 3rd ed. ed. New York: John Wiley and Sons.

Melard, G. 1984. A fast algorithm for the exact likelihood of autoregressive-moving average models. Applied Statistics, 33:1, 104-119.

Morf, M., G. S. Sidhu, and T. Kailath. 1974. Some new algorithms for recursive estimation in constant, linear, discrete-time systems. IEEE Transactions on Automatic Control, AC-19:4, 315-323.

Pearlman, J. G. 1980. An algorithm for the exact likelihood of a high-order autoregressive-moving average process. Biometrika, 67:1, 232-233.

Related Topics

ARIMA Algorithms
Notation (ARIMA algorithms)
Models (ARIMA algorithms)
Estimation (ARIMA algorithms)
Diagnostic Statistics (ARIMA algorithms)
Generated Variables (ARIMA algorithms)
Forecasting (ARIMA algorithms)


Automated Data Preparation Algorithms

automated data preparation algorithms,automated data preparation algorithms,automated data preparation algorithms
ADP,ADP,ADP
algorithms,algorithms,algorithms

The goal of automated data preparation is to prepare a dataset so as to generally improve the training speed, predictive power, and robustness of models fit to the prepared data.

These algorithms do not assume which models will be trained post-data preparation. At the end of automated data preparation, we output the predictive power of each recommended predictor, which is computed from a linear regression or naïve Bayes model, depending upon whether the target is continuous or categorical.

The algorithms described here are used by the ADP command.

Related Topics

Notation (automated data preparation algorithms)
Date/Time Handling (automated data preparation algorithms)
Univariate Statistics Collection (automated data preparation algorithms)
Basic Variable Screening (automated data preparation algorithms)
Checkpoint 1: Exit? (automated data preparation algorithms)
Measurement Level Recasting (automated data preparation algorithms)
Outlier Identification and Handling (automated data preparation algorithms)
Missing Value Handling (automated data preparation algorithms)
Continuous Predictor Transformations (automated data preparation algorithms)
Z-score Transformation (automated data preparation algorithms)
Min-Max Transformation (automated data preparation algorithms)
Target Handling (automated data preparation algorithms)
Bivariate Statistics Collection (automated data preparation algorithms)
Categorical Variable Handling (automated data preparation algorithms)
Reordering Categories (automated data preparation algorithms)
Identify Highly Associated Categorical Features (automated data preparation algorithms)
Supervised Merge (automated data preparation algorithms)
P-value Calculations (automated data preparation algorithms)
Unsupervised Merge (automated data preparation algorithms)
Continuous Predictor Handling (automated data preparation algorithms)
Supervised Binning (automated data preparation algorithms)
Feature Selection and Construction (automated data preparation algorithms)
Principal Component Analysis (automated data preparation algorithms)
Correlation and Partial Correlation (automated data preparation algorithms)
Discretization of Continuous Predictors (automated data preparation algorithms)
Predictive Power (automated data preparation algorithms)
References (automated data preparation algorithms)


Notation (automated data preparation algorithms)

automated data preparation algorithms,automated data preparation algorithms,automated data preparation algorithms
notation,notation,notation

The following notation is used throughout this chapter unless otherwise stated:

X | A continuous or categorical variable
xi | Value of the variable X for case i.
fi | Frequency weight for case i. Non-integer positive values are rounded to the nearest integer. If there is no frequency weight variable, then all fi=1. If the frequency weight of a case is zero, negative or missing, then this case will be ignored.
wi | Analysis weight for case i. If there is no analysis weight variable, then all wi=1. If the analysis weight of a case is zero, negative or missing, then this case will be ignored.
n | Number of cases in the dataset
NX | nΣi=1fiI(xi is not missing ), where I( expression ) is the indicator function taking value 1 when the expression is true, 0 otherwise.
WX | nΣi=1fiwiI(xi is not missing )
NXY | nΣi=1fiI(xi and yi are not missing )
WXY | nΣi=1fiwiI(xi and yi are not missing )
x | The mean of variable X, 1WXnΣi=1fiwixiI(xi is not missing )
MrX | nΣi=1fiwi(xi−x)r
xy | 1WXYnΣi=1fiwixiI(xi and yi are not missing )
MXY | nΣi=1fiwi(xi−xy)(yi−yx)

A note on missing values

Listwise deletion is used in the following sections:

• Univariate Statistics Collection (automated data preparation algorithms)

• Basic Variable Screening (automated data preparation algorithms)

• Measurement Level Recasting (automated data preparation algorithms)

• Missing Value Handling (automated data preparation algorithms)

• Outlier Identification and Handling (automated data preparation algorithms)

• Continuous Predictor Transformations (automated data preparation algorithms)

• Target Handling (automated data preparation algorithms)

• Reordering Categories (automated data preparation algorithms)

• Unsupervised Merge (automated data preparation algorithms)

Pairwise deletion is used in the following sections:

• Bivariate Statistics Collection (automated data preparation algorithms)

• Supervised Merge (automated data preparation algorithms)

• Supervised Binning (automated data preparation algorithms)

• Feature Selection and Construction (automated data preparation algorithms)

• Predictive Power (automated data preparation algorithms)

A note on frequency weight and analysis weight

The frequency weight variable is treated as a case replication weight. For example if a case has a frequency weight of 2, then this case will count as 2 cases.

The analysis weight would adjust the variance of cases. For example if a case xi of a variable X has an analysis weight wi, then we assume that xi˜N(μ,σ2wi).

Frequency weights and analysis weights are used in automated preparation of other variables, but are themselves left unchanged in the dataset.

Related Topics

Automated Data Preparation Algorithms
Date/Time Handling (automated data preparation algorithms)
Univariate Statistics Collection (automated data preparation algorithms)
Basic Variable Screening (automated data preparation algorithms)
Checkpoint 1: Exit? (automated data preparation algorithms)
Measurement Level Recasting (automated data preparation algorithms)
Outlier Identification and Handling (automated data preparation algorithms)
Missing Value Handling (automated data preparation algorithms)
Continuous Predictor Transformations (automated data preparation algorithms)
Z-score Transformation (automated data preparation algorithms)
Min-Max Transformation (automated data preparation algorithms)
Target Handling (automated data preparation algorithms)
Bivariate Statistics Collection (automated data preparation algorithms)
Categorical Variable Handling (automated data preparation algorithms)
Reordering Categories (automated data preparation algorithms)
Identify Highly Associated Categorical Features (automated data preparation algorithms)
Supervised Merge (automated data preparation algorithms)
P-value Calculations (automated data preparation algorithms)
Unsupervised Merge (automated data preparation algorithms)
Continuous Predictor Handling (automated data preparation algorithms)
Supervised Binning (automated data preparation algorithms)
Feature Selection and Construction (automated data preparation algorithms)
Principal Component Analysis (automated data preparation algorithms)
Correlation and Partial Correlation (automated data preparation algorithms)
Discretization of Continuous Predictors (automated data preparation algorithms)
Predictive Power (automated data preparation algorithms)
References (automated data preparation algorithms)


Date/Time Handling (automated data preparation algorithms)

automated data preparation algorithms,automated data preparation algorithms,automated data preparation algorithms
date/time handling,date/time handling,date/time handling

Date Handling

If there is a date variable, we extract the date elements (year, month and day) as ordinal variables. If requested, we also calculate the number of elapsed days/months/years since the user-specified reference date (default is the current date). Unless specified by the user, the "best" unit of duration is chosen as follows:

1. If the minimum number of elapsed days is less than 31, then we use days as the best unit.

2. If the minimum number of elapsed days is less than 366 but larger than or equal to 31, we use months as the best unit. The number of months between two dates is calculated based on average number of days in a month (30.4375): months = days / 30.4375.

3. If the minimum number of elapsed days is larger than or equal to 366, we use years as the best unit. The number of years between two dates is calculated based on average number of days in a year (365.25): years = days / 365.25.

Once the date elements are extracted and the duration is obtained, then the original date variable will be excluded from the rest of the analysis.

Time Handling

If there is a time variable, we extract the time elements (second, minute and hour) as ordinal variables. If requested, we also calculate the number of elapsed seconds/minutes/hours since the user-specified reference time (default is the current time). Unless specified by the user, the "best" unit of duration is chosen as follows:

1. If the minimum number of elapsed seconds is less than 60, then we use seconds as the best unit.

2. If the minimum number of elapsed seconds is larger than or equal to 60 but less than 3600, we use minutes as the best unit.

3. If the minimum number of elapsed seconds is larger than or equal to 3600, we use hours as the best unit.

Once the elements of time are extracted and time duration is obtained, then original time predictor will be excluded.

Related Topics

Automated Data Preparation Algorithms
Notation (automated data preparation algorithms)
Univariate Statistics Collection (automated data preparation algorithms)
Basic Variable Screening (automated data preparation algorithms)
Checkpoint 1: Exit? (automated data preparation algorithms)
Measurement Level Recasting (automated data preparation algorithms)
Outlier Identification and Handling (automated data preparation algorithms)
Missing Value Handling (automated data preparation algorithms)
Continuous Predictor Transformations (automated data preparation algorithms)
Z-score Transformation (automated data preparation algorithms)
Min-Max Transformation (automated data preparation algorithms)
Target Handling (automated data preparation algorithms)
Bivariate Statistics Collection (automated data preparation algorithms)
Categorical Variable Handling (automated data preparation algorithms)
Reordering Categories (automated data preparation algorithms)
Identify Highly Associated Categorical Features (automated data preparation algorithms)
Supervised Merge (automated data preparation algorithms)
P-value Calculations (automated data preparation algorithms)
Unsupervised Merge (automated data preparation algorithms)
Continuous Predictor Handling (automated data preparation algorithms)
Supervised Binning (automated data preparation algorithms)
Feature Selection and Construction (automated data preparation algorithms)
Principal Component Analysis (automated data preparation algorithms)
Correlation and Partial Correlation (automated data preparation algorithms)
Discretization of Continuous Predictors (automated data preparation algorithms)
Predictive Power (automated data preparation algorithms)
References (automated data preparation algorithms)


Univariate Statistics Collection (automated data preparation algorithms)

automated data preparation algorithms,automated data preparation algorithms,automated data preparation algorithms
univariate statistics collection,univariate statistics collection,univariate statistics collection

Continuous Variables

For each continuous variable, we calculate the following statistics:

• Number of missing values: NmissingX=nΣi=1fiI(xi is missing )

• Number of valid values: NX

• Minimum value:
min
i
xi

• Maximum value:
max
i
xi

• Mean, standard deviation, skewness. (see below)

• The number of distinct values I.

• The number of cases for each distinct value si: ci=nΣj=1fjI(xj=si)

• Median: If the distinct values of X are sorted in ascending order, s1<s2<...<sI, then the median can be computed by Median(X)=min{si:cciNX≥0.5}, where cci=iΣj=1ci.

Note: If the number of distinct values is larger than a threshold (default is 5), we stop updating the number of distinct values and the number of cases for each distinct value. Also we do not calculate the median.

Categorical Numeric Variables

For each categorical numeric variable, we calculate the following statistics:

• Number of missing values: NmissingX=nΣi=1fiI(xi is missing )

• Number of valid values: NX

• Minimum value:
min
i
xi (only for ordinal variables)

• Maximum value:
max
i
xi (only for ordinal variables)

• The number of categories.

• The counts of each category.

• Mean, Standard deviation, Skewness (only for ordinal variables). (see below)

• Mode (only for nominal variables). If several values share the greatest frequency of occurrence, then the mode with the smallest value is used.

• Median (only for ordinal variables): If the distinct values of X are sorted in ascending order, s1<s2<...<sI, then the median can be computed by Median(X)=min{si:cciNX≥0.5}, where cci=iΣj=1ci.

Notes:

1. If an ordinal predictor has more categories than a specified threshold (default 10), we stop updating the number of categories and the number of cases for each category. Also we do not calculate mode and median.

2. If a nominal predictor has more categories than a specified threshold (default 100), we stop collecting statistics and just store the information that the variable had more than threshold categories.

Categorical String Variables

For each string variable, we calculate the following statistics:

• Number of missing values: NmissingX=nΣi=1fiI(xi is missing )

• Number of valid values: NX

• The number of categories.

• Counts of each category.

• Mode: If several values share the greatest frequency of occurrence, then the mode with the smallest value is used.

Note: If a string predictor has more categories than a specified threshold (default 100), we stop collecting statistics and just store the information that the predictor had more than threshold categories.

Mean, Standard Deviation, Skewness

We calculate mean, standard deviation and skewness by updating moments.

1. Start with N(0)X=W(0)X=x(0)=M2(0)X=M3(0)X=0.

2. For j=1,..,n compute:

N(j)X=N(j−1)X+fjI(xj is not missing )

W(j)X=W(j−1)X+fjwiI(xj is not missing )

vj=fjwjW(j)X(xj−x(j−1))

x(j)=x(j−1)+vj

M2(j)X=M2(j−1)X+W(j)XW(j−1)Xfjwjv2j

M3(j)X=M3(i−1)X−3vjM2(j−1)X+W(j)XW(j−1)X(fjwj)2(W(j)X−2fjwj)v3j

3. After the last case has been processed, compute:

Mean: x=x(n)

Standard deviation: sd=
√ M2(n)XNX−1

Skewness: skew=NX(NX−2)1(NX−1)M3(n)Xsd3

If NX≤2 or sd2<10−20, then skewness is not calculated.

Related Topics

Automated Data Preparation Algorithms
Notation (automated data preparation algorithms)
Date/Time Handling (automated data preparation algorithms)
Basic Variable Screening (automated data preparation algorithms)
Checkpoint 1: Exit? (automated data preparation algorithms)
Measurement Level Recasting (automated data preparation algorithms)
Outlier Identification and Handling (automated data preparation algorithms)
Missing Value Handling (automated data preparation algorithms)
Continuous Predictor Transformations (automated data preparation algorithms)
Z-score Transformation (automated data preparation algorithms)
Min-Max Transformation (automated data preparation algorithms)
Target Handling (automated data preparation algorithms)
Bivariate Statistics Collection (automated data preparation algorithms)
Categorical Variable Handling (automated data preparation algorithms)
Reordering Categories (automated data preparation algorithms)
Identify Highly Associated Categorical Features (automated data preparation algorithms)
Supervised Merge (automated data preparation algorithms)
P-value Calculations (automated data preparation algorithms)
Unsupervised Merge (automated data preparation algorithms)
Continuous Predictor Handling (automated data preparation algorithms)
Supervised Binning (automated data preparation algorithms)
Feature Selection and Construction (automated data preparation algorithms)
Principal Component Analysis (automated data preparation algorithms)
Correlation and Partial Correlation (automated data preparation algorithms)
Discretization of Continuous Predictors (automated data preparation algorithms)
Predictive Power (automated data preparation algorithms)
References (automated data preparation algorithms)


Basic Variable Screening (automated data preparation algorithms)

automated data preparation algorithms,automated data preparation algorithms,automated data preparation algorithms
variable screening,variable screening,variable screening

1. If the percent of missing values is greater than a threshold (default is 50%), then exclude the variable from subsequent analysis.

2. For continuous variables, if the maximum value is equal to minimum value, then exclude the variable from subsequent analysis.

3. For categorical variables, if the mode contains more cases than a specified percentage (default is 95%), then exclude the variable from subsequent analysis.

4. If a string variable has more categories than a specified threshold (default is 100), then exclude the variable from subsequent analysis.

Related Topics

Automated Data Preparation Algorithms
Notation (automated data preparation algorithms)
Date/Time Handling (automated data preparation algorithms)
Univariate Statistics Collection (automated data preparation algorithms)
Checkpoint 1: Exit? (automated data preparation algorithms)
Measurement Level Recasting (automated data preparation algorithms)
Outlier Identification and Handling (automated data preparation algorithms)
Missing Value Handling (automated data preparation algorithms)
Continuous Predictor Transformations (automated data preparation algorithms)
Z-score Transformation (automated data preparation algorithms)
Min-Max Transformation (automated data preparation algorithms)
Target Handling (automated data preparation algorithms)
Bivariate Statistics Collection (automated data preparation algorithms)
Categorical Variable Handling (automated data preparation algorithms)
Reordering Categories (automated data preparation algorithms)
Identify Highly Associated Categorical Features (automated data preparation algorithms)
Supervised Merge (automated data preparation algorithms)
P-value Calculations (automated data preparation algorithms)
Unsupervised Merge (automated data preparation algorithms)
Continuous Predictor Handling (automated data preparation algorithms)
Supervised Binning (automated data preparation algorithms)
Feature Selection and Construction (automated data preparation algorithms)
Principal Component Analysis (automated data preparation algorithms)
Correlation and Partial Correlation (automated data preparation algorithms)
Discretization of Continuous Predictors (automated data preparation algorithms)
Predictive Power (automated data preparation algorithms)
References (automated data preparation algorithms)


Checkpoint 1: Exit? (automated data preparation algorithms)

automated data preparation algorithms,automated data preparation algorithms,automated data preparation algorithms
checkpoint,checkpoint,checkpoint

This checkpoint determines whether the algorithm should be terminated. If, after the screening step:

1. The target (if specified) has been removed from subsequent analysis, or

2. All predictors have been removed from subsequent analysis,

then terminate the algorithm and generate an error.

Related Topics

Automated Data Preparation Algorithms
Notation (automated data preparation algorithms)
Date/Time Handling (automated data preparation algorithms)
Univariate Statistics Collection (automated data preparation algorithms)
Basic Variable Screening (automated data preparation algorithms)
Measurement Level Recasting (automated data preparation algorithms)
Outlier Identification and Handling (automated data preparation algorithms)
Missing Value Handling (automated data preparation algorithms)
Continuous Predictor Transformations (automated data preparation algorithms)
Z-score Transformation (automated data preparation algorithms)
Min-Max Transformation (automated data preparation algorithms)
Target Handling (automated data preparation algorithms)
Bivariate Statistics Collection (automated data preparation algorithms)
Categorical Variable Handling (automated data preparation algorithms)
Reordering Categories (automated data preparation algorithms)
Identify Highly Associated Categorical Features (automated data preparation algorithms)
Supervised Merge (automated data preparation algorithms)
P-value Calculations (automated data preparation algorithms)
Unsupervised Merge (automated data preparation algorithms)
Continuous Predictor Handling (automated data preparation algorithms)
Supervised Binning (automated data preparation algorithms)
Feature Selection and Construction (automated data preparation algorithms)
Principal Component Analysis (automated data preparation algorithms)
Correlation and Partial Correlation (automated data preparation algorithms)
Discretization of Continuous Predictors (automated data preparation algorithms)
Predictive Power (automated data preparation algorithms)
References (automated data preparation algorithms)


Measurement Level Recasting (automated data preparation algorithms)

automated data preparation algorithms,automated data preparation algorithms,automated data preparation algorithms
measurement level recasting,measurement level recasting,measurement level recasting

For each continuous variable, if the number of distinct values is less than a threshold (default is 5), then it is recast as an ordinal variable.

For each numeric ordinal variable, if the number of categories is greater than a threshold (default is 10), then it is recast as a continuous variable.

Note: The continuous-to-ordinal threshold must be less than the ordinal-to-continuous threshold.

Related Topics

Automated Data Preparation Algorithms
Notation (automated data preparation algorithms)
Date/Time Handling (automated data preparation algorithms)
Univariate Statistics Collection (automated data preparation algorithms)
Basic Variable Screening (automated data preparation algorithms)
Checkpoint 1: Exit? (automated data preparation algorithms)
Outlier Identification and Handling (automated data preparation algorithms)
Missing Value Handling (automated data preparation algorithms)
Continuous Predictor Transformations (automated data preparation algorithms)
Z-score Transformation (automated data preparation algorithms)
Min-Max Transformation (automated data preparation algorithms)
Target Handling (automated data preparation algorithms)
Bivariate Statistics Collection (automated data preparation algorithms)
Categorical Variable Handling (automated data preparation algorithms)
Reordering Categories (automated data preparation algorithms)
Identify Highly Associated Categorical Features (automated data preparation algorithms)
Supervised Merge (automated data preparation algorithms)
P-value Calculations (automated data preparation algorithms)
Unsupervised Merge (automated data preparation algorithms)
Continuous Predictor Handling (automated data preparation algorithms)
Supervised Binning (automated data preparation algorithms)
Feature Selection and Construction (automated data preparation algorithms)
Principal Component Analysis (automated data preparation algorithms)
Correlation and Partial Correlation (automated data preparation algorithms)
Discretization of Continuous Predictors (automated data preparation algorithms)
Predictive Power (automated data preparation algorithms)
References (automated data preparation algorithms)


Outlier Identification and Handling (automated data preparation algorithms)

automated data preparation algorithms,automated data preparation algorithms,automated data preparation algorithms
outliers,outliers,outliers

In this section, we identify outliers in continuous variables and then set the outlying values to a cutoff or to a missing value. The identification is based on the robust mean and robust standard deviation which are estimated by supposing that the percentage of outliers is no more than 5%.

Identification

1. Compute the mean and standard deviation from the raw data. Split the continuous variable into non-intersecting intervals: Ii=(x+(i−1)×sdw, x+i×sdw], i=−3, −2,...,2, 3, 4, where I−3=(−∞, x−3sdw], I4=(x+3sdw, +∞] and sdw=sd×
√ NX−1WX−1
.

2. Calculate univariate statistics in each interval:

NIi=nΣj=1fjI(xjIi), WIi=nΣi=1fiwiI(xjIi)

xIi=nΣj=1fjwjxjI(xjIi)WIi, M2Ii=nΣj=1fjwj(xj−xIi)2I(xjIi)

3. Let l=−3, r=4, and p=0.

4. Between two tail intervals Il and Ir, find one interval with the least number of cases.

5. If NIl≤NIr, then pcurrent=NIlNX. Check if p+pcurrent is less than a threshold pthreshold (default is 0.05). If it does, then p=p+pcurrent and l=l+1, go to step 4; otherwise, go to step 6.

Else pcurrent=NIrNX. Check if p+pcurrent is less than a threshold, pthreshold. If it is, then p=p+pcurrent and r=r−1, go to step 4; otherwise, go to step 6.

6. Compute the robust mean xrobust and robust standard deviation sdrobust within the range (x+(l−1)×sd, x+r×sd]. See below for details.

7. If xi satisfies the conditions:

√ wi
(xi−xrobust)<−cutoff×sdrobust or
√ wi
(xi−xrobust)>cutoff×sdrobust

where cutoff is positive number (default is 3), then xi is detected as an outlier.

Handling

Outliers will be handled using one of following methods:

• Trim outliers to cutoff values. If
√ wi
(xi−xrobust)<−cutoff×sdrobust then replace xi by xrobust−cutoff×sdrobust/
√ wi
, and if
√ wi
(xi−xrobust)>cutoff×sdrobust then replace xi by xrobust+cutoff×sdrobust/
√ wi
.

• Set outliers to missing values.

Update Univariate Statistics

After outlier handling, we perform a data pass to calculate univariate statistics for each continuous variable, including the number of missing values, minimum, maximum, mean, standard deviation, skewness, and number of outliers.

Robust Mean and Standard Deviation

Robust mean and standard deviation within the range (x+(l−1)×sd, x+r×sd] are calculated as follows:

xrobust=rΣi=lWIixIirΣi=lWIi

and

sdrobust=
√ M2robustrΣi=lNIi−1

where M2robust=rΣi=lAIi and AIi=M2Ii+WIi(xrobust−xIi)2.

Related Topics

Automated Data Preparation Algorithms
Notation (automated data preparation algorithms)
Date/Time Handling (automated data preparation algorithms)
Univariate Statistics Collection (automated data preparation algorithms)
Basic Variable Screening (automated data preparation algorithms)
Checkpoint 1: Exit? (automated data preparation algorithms)
Measurement Level Recasting (automated data preparation algorithms)
Missing Value Handling (automated data preparation algorithms)
Continuous Predictor Transformations (automated data preparation algorithms)
Z-score Transformation (automated data preparation algorithms)
Min-Max Transformation (automated data preparation algorithms)
Target Handling (automated data preparation algorithms)
Bivariate Statistics Collection (automated data preparation algorithms)
Categorical Variable Handling (automated data preparation algorithms)
Reordering Categories (automated data preparation algorithms)
Identify Highly Associated Categorical Features (automated data preparation algorithms)
Supervised Merge (automated data preparation algorithms)
P-value Calculations (automated data preparation algorithms)
Unsupervised Merge (automated data preparation algorithms)
Continuous Predictor Handling (automated data preparation algorithms)
Supervised Binning (automated data preparation algorithms)
Feature Selection and Construction (automated data preparation algorithms)
Principal Component Analysis (automated data preparation algorithms)
Correlation and Partial Correlation (automated data preparation algorithms)
Discretization of Continuous Predictors (automated data preparation algorithms)
Predictive Power (automated data preparation algorithms)
References (automated data preparation algorithms)


Missing Value Handling (automated data preparation algorithms)

automated data preparation algorithms,automated data preparation algorithms,automated data preparation algorithms
missing values,missing values,missing values

Continuous variables. Missing values are replaced by the mean, and the following statistics are updated:

• Standard deviation: sd×
√ NX−1N−1
, where N=NX+NmissingX.

• Skewness: skew×L1L2, where L1=(NN−2)(NX−2NX) and L2=
√ NX−1N−1

• The number of missing values: NmissingX=0

• The number of valid values: NX=N

Ordinal variables. Missing values are replaced by the median, and the following statistics are updated:

• The number of cases in the median category: cmedian+NmissingX, where cmedian is the original number of cases in the median category.

• The number of missing values: NmissingX=0

• The number of valid values: NX=N

Nominal variables. Missing values are replaced by the mode, and the following statistics are updated:

• The number of cases in the modal category: cmode+NmissingX, where cmode is the original number of cases in the modal category.

• The number of missing values: NmissingX=0

• The number of valid values: NX=N

Related Topics

Automated Data Preparation Algorithms
Notation (automated data preparation algorithms)
Date/Time Handling (automated data preparation algorithms)
Univariate Statistics Collection (automated data preparation algorithms)
Basic Variable Screening (automated data preparation algorithms)
Checkpoint 1: Exit? (automated data preparation algorithms)
Measurement Level Recasting (automated data preparation algorithms)
Outlier Identification and Handling (automated data preparation algorithms)
Continuous Predictor Transformations (automated data preparation algorithms)
Z-score Transformation (automated data preparation algorithms)
Min-Max Transformation (automated data preparation algorithms)
Target Handling (automated data preparation algorithms)
Bivariate Statistics Collection (automated data preparation algorithms)
Categorical Variable Handling (automated data preparation algorithms)
Reordering Categories (automated data preparation algorithms)
Identify Highly Associated Categorical Features (automated data preparation algorithms)
Supervised Merge (automated data preparation algorithms)
P-value Calculations (automated data preparation algorithms)
Unsupervised Merge (automated data preparation algorithms)
Continuous Predictor Handling (automated data preparation algorithms)
Supervised Binning (automated data preparation algorithms)
Feature Selection and Construction (automated data preparation algorithms)
Principal Component Analysis (automated data preparation algorithms)
Correlation and Partial Correlation (automated data preparation algorithms)
Discretization of Continuous Predictors (automated data preparation algorithms)
Predictive Power (automated data preparation algorithms)
References (automated data preparation algorithms)


Continuous Predictor Transformations (automated data preparation algorithms)

automated data preparation algorithms,automated data preparation algorithms,automated data preparation algorithms
transformations,transformations,transformations

We transform a continuous predictor so that it has the user-specified mean xuser (default 0) and standard deviation sduser (default 1) using the z-score transformation, or minimum minuser (default 0) and maximum maxuser (default 100) value using the min-max transformation.

Related Topics

Automated Data Preparation Algorithms
Notation (automated data preparation algorithms)
Date/Time Handling (automated data preparation algorithms)
Univariate Statistics Collection (automated data preparation algorithms)
Basic Variable Screening (automated data preparation algorithms)
Checkpoint 1: Exit? (automated data preparation algorithms)
Measurement Level Recasting (automated data preparation algorithms)
Outlier Identification and Handling (automated data preparation algorithms)
Missing Value Handling (automated data preparation algorithms)
Z-score Transformation (automated data preparation algorithms)
Min-Max Transformation (automated data preparation algorithms)
Target Handling (automated data preparation algorithms)
Bivariate Statistics Collection (automated data preparation algorithms)
Categorical Variable Handling (automated data preparation algorithms)
Reordering Categories (automated data preparation algorithms)
Identify Highly Associated Categorical Features (automated data preparation algorithms)
Supervised Merge (automated data preparation algorithms)
P-value Calculations (automated data preparation algorithms)
Unsupervised Merge (automated data preparation algorithms)
Continuous Predictor Handling (automated data preparation algorithms)
Supervised Binning (automated data preparation algorithms)
Feature Selection and Construction (automated data preparation algorithms)
Principal Component Analysis (automated data preparation algorithms)
Correlation and Partial Correlation (automated data preparation algorithms)
Discretization of Continuous Predictors (automated data preparation algorithms)
Predictive Power (automated data preparation algorithms)
References (automated data preparation algorithms)


Z-score Transformation (automated data preparation algorithms)

z-score transformation,z-score transformation,z-score transformation
automated data preparation algorithms,automated data preparation algorithms,automated data preparation algorithms

Suppose a continuous variable has mean x and standard deviation sd. The z-score transformation is

x´i=sdusersd×(xi−x)+xuser

where x´i is the transformed value of continuous variable X for case i.

Since we do not take into account the analysis weight in the rescaling formula, the rescaled values x´i follow a normal distribution N(xuser,sd2userwi).

Update univariate statistics

After a z-score transformation, the following univariate statistics are updated:

• Number of missing values: NmissingX´=NmissingX

• Number of valid values: NX´=NX

• Minimum value: min(x´i)=sdusersd×(minxi−x)+xuser

• Maximum value: max(x´i)=sdusersd×(maxxi−x)+xuser

• Mean: x´=xuser

• Standard deviation: sd(x´)=sduser

• Skewness: skew(x´)=skew(x)

Related Topics

Automated Data Preparation Algorithms
Notation (automated data preparation algorithms)
Date/Time Handling (automated data preparation algorithms)
Univariate Statistics Collection (automated data preparation algorithms)
Basic Variable Screening (automated data preparation algorithms)
Checkpoint 1: Exit? (automated data preparation algorithms)
Measurement Level Recasting (automated data preparation algorithms)
Outlier Identification and Handling (automated data preparation algorithms)
Missing Value Handling (automated data preparation algorithms)
Continuous Predictor Transformations (automated data preparation algorithms)
Min-Max Transformation (automated data preparation algorithms)
Target Handling (automated data preparation algorithms)
Bivariate Statistics Collection (automated data preparation algorithms)
Categorical Variable Handling (automated data preparation algorithms)
Reordering Categories (automated data preparation algorithms)
Identify Highly Associated Categorical Features (automated data preparation algorithms)
Supervised Merge (automated data preparation algorithms)
P-value Calculations (automated data preparation algorithms)
Unsupervised Merge (automated data preparation algorithms)
Continuous Predictor Handling (automated data preparation algorithms)
Supervised Binning (automated data preparation algorithms)
Feature Selection and Construction (automated data preparation algorithms)
Principal Component Analysis (automated data preparation algorithms)
Correlation and Partial Correlation (automated data preparation algorithms)
Discretization of Continuous Predictors (automated data preparation algorithms)
Predictive Power (automated data preparation algorithms)
References (automated data preparation algorithms)


Min-Max Transformation (automated data preparation algorithms)

min-max transformation,min-max transformation,min-max transformation
automated data preparation algorithms,automated data preparation algorithms,automated data preparation algorithms

Suppose a continuous variable has a minimum value minxi and a minimum value maxxi. The min-max transformation is

x´i=maxuser−minusermaxxi−minxi×(xi−minxi)+minuser

where x´i is the transformed value of continuous variable X for case i.

Update univariate statistics

After a min-max transformation, the following univariate statistics are updated:

• The number of missing values: NmissingX´=NmissingX

• The number of valid values: NX´=NX

• Minimum value: min(x´i)=minuser

• Maximum value: max(x´i)=maxuser

• Mean: x´=maxuser−minusermaxxi−minxi×(x−minxi)+minuser

• Standard deviation: sd(x´)=maxuser−minusermaxxi−minxi×sd

• Skwness: skew(x´)=skew(x)

Related Topics

Automated Data Preparation Algorithms
Notation (automated data preparation algorithms)
Date/Time Handling (automated data preparation algorithms)
Univariate Statistics Collection (automated data preparation algorithms)
Basic Variable Screening (automated data preparation algorithms)
Checkpoint 1: Exit? (automated data preparation algorithms)
Measurement Level Recasting (automated data preparation algorithms)
Outlier Identification and Handling (automated data preparation algorithms)
Missing Value Handling (automated data preparation algorithms)
Continuous Predictor Transformations (automated data preparation algorithms)
Z-score Transformation (automated data preparation algorithms)
Target Handling (automated data preparation algorithms)
Bivariate Statistics Collection (automated data preparation algorithms)
Categorical Variable Handling (automated data preparation algorithms)
Reordering Categories (automated data preparation algorithms)
Identify Highly Associated Categorical Features (automated data preparation algorithms)
Supervised Merge (automated data preparation algorithms)
P-value Calculations (automated data preparation algorithms)
Unsupervised Merge (automated data preparation algorithms)
Continuous Predictor Handling (automated data preparation algorithms)
Supervised Binning (automated data preparation algorithms)
Feature Selection and Construction (automated data preparation algorithms)
Principal Component Analysis (automated data preparation algorithms)
Correlation and Partial Correlation (automated data preparation algorithms)
Discretization of Continuous Predictors (automated data preparation algorithms)
Predictive Power (automated data preparation algorithms)
References (automated data preparation algorithms)


Target Handling (automated data preparation algorithms)

automated data preparation algorithms,automated data preparation algorithms,automated data preparation algorithms
target handling,target handling,target handling
Box-Cox transformation,Box-Cox transformation,Box-Cox transformation
automated data preparation algorithms,automated data preparation algorithms,automated data preparation algorithms

Nominal Target

For a nominal target, we rearrange categories from lowest to highest counts. If there is a tie on counts, then ties will be broken by ascending sort or lexical order of the data values.

Continuous Target

The transformation proposed by Box and Cox (1964) transforms a continuous variable into one that is more normally distributed. We apply the Box-Cox transformation followed by the z score transformation so that the rescaled target has the user-specified mean and standard deviation.

Box-Cox transformation. This transforms a non-normal variable Y to a more normally distributed variable:

gi(λ)=g(yi,λ)={
((yi−c)λ−1)λλ≠0
ln(yi−c)λ=0

where yi,i=1,2,...,n are observations of variable Y, and c is a constant such that all values yi−c are positive. Here, we choose c=min(Y)−1.

The parameter λ is selected to maximize the log-likelihood function:

L(λ)=−NY2ln[NY−1NY(sd(g(λ)))2]+(λ−1)nΣi=1filn(yi−c)

where (sd(g(λ)))2=1NY−1nΣi=1fiwi(gi(λj)−g(λj))2 and g(λ)=1WYnΣi=1fiwigi(λ).

We perform a grid search over a user-specified finite set [a,b] with increment s. By default a=−3, b=3, and s=0.5.

The algorithm can be described as follows:

1. Compute λj=a+(j−1)*s where j is an integer such that a≤λj≤b.

2. For each λj, compute the following statistics:

Mean: g(λj)=1WYnΣi=1fiwigi(λj)

Standard deviation: sd(g(λj))=
√ 1NY−1nΣi=1fiwi(gi(λj)−g(λj))2

Skewness: skew(g(λj))=NY(NY−2)1(NY−1)nΣi=1fiwi(gi(λj)−g(λj))3sd(g(λj))3

Sum of logarithm transformation: nΣi=1filn(yi−c)

3. For each λj, compute the log-likelihood function L(λj). Find the value of j with the largest log-likelihood function, breaking ties by selecting the smallest value of λj. Also find the corresponding statistics g(λ*), sd(g(λ*)) and skew(g(λ*)).

4. Transform target to reflect user’s mean yuser (default is 0) and standard deviation sduser (default is 1):

y´i=sdusersd(g(λ*))×(gi(λ*)−g(λ*))+yuser

where g(λ*)=1WYnΣi=1fiwigi(λ*) and sd(g(λ*))=
√ 1NY−1nΣi=1fiwi(gi(λ*)−g(λ*))2
.

Update univariate statistics. After Box-Cox and Z-score transformations, the following univariate statistics are updated:

• Minimum value: sdusersd(g(λ*))×(g(min(yi)−c,λ*)−g(λ*))+yuser

• Maximum value: sdusersd(g(λ*))×(g(max(yi)−c,λ*)−g(λ*))+yuser

• Mean: yuser

• Standard deviation: sduser

• Skewness: skew(g(λ*))

Related Topics

Automated Data Preparation Algorithms
Notation (automated data preparation algorithms)
Date/Time Handling (automated data preparation algorithms)
Univariate Statistics Collection (automated data preparation algorithms)
Basic Variable Screening (automated data preparation algorithms)
Checkpoint 1: Exit? (automated data preparation algorithms)
Measurement Level Recasting (automated data preparation algorithms)
Outlier Identification and Handling (automated data preparation algorithms)
Missing Value Handling (automated data preparation algorithms)
Continuous Predictor Transformations (automated data preparation algorithms)
Z-score Transformation (automated data preparation algorithms)
Min-Max Transformation (automated data preparation algorithms)
Bivariate Statistics Collection (automated data preparation algorithms)
Categorical Variable Handling (automated data preparation algorithms)
Reordering Categories (automated data preparation algorithms)
Identify Highly Associated Categorical Features (automated data preparation algorithms)
Supervised Merge (automated data preparation algorithms)
P-value Calculations (automated data preparation algorithms)
Unsupervised Merge (automated data preparation algorithms)
Continuous Predictor Handling (automated data preparation algorithms)
Supervised Binning (automated data preparation algorithms)
Feature Selection and Construction (automated data preparation algorithms)
Principal Component Analysis (automated data preparation algorithms)
Correlation and Partial Correlation (automated data preparation algorithms)
Discretization of Continuous Predictors (automated data preparation algorithms)
Predictive Power (automated data preparation algorithms)
References (automated data preparation algorithms)


Bivariate Statistics Collection (automated data preparation algorithms)

automated data preparation algorithms,automated data preparation algorithms,automated data preparation algorithms
bivariate statistics collection,bivariate statistics collection,bivariate statistics collection

For each target/predictor pair, the following statistics are collected according to the measurement levels of the target and predictor.

Continuous target or no target and all continuous predictors

If there is a continuous target and some continuous predictors, then we need to calculate the covariance and correlations between all pairs of continuous variables. If there is no continuous target, then we only calculate the covariance and correlations between all pairs of continuous predictors. We suppose there are there are m continuous variables, and denote the covariance matrix as Cm×m, with element cij, and the correlation matrix as Rm×m, with element rij.

We define the covariance between two continuous variables X and Y as

cXY=1NXY−1nΣi=1fiwi(xi−xy)(yi−yx)

where xy=1WXYnΣi=1xiI(xi and yi are not missing ) and yx=1WXYnΣi=1yiI(xj and yj are not missing ).

The covariance can be computed by a provisional means algorithm:

1. Start with N(0)XY=W(0)XY=xy=yx=M(0)XY=0.

2. For j=1,..,n compute:

N(j)XY=N(j−1)XY+fjI(xj and yj are not missing )

W(j)XY=W(j−1)XY+fjwjI(xj and yj are not missing )

vxj=fjwjW(j)XY(xj−xy)

xy=xy+vxj

vyj=fjwjW(j)XY(yj−yx)

yx=yx+vyj

M(j)XY=M(j−1)XY+(xj−xy)(yj−yx)(fjwj−(fjwj)2W(j)XY)

After the last case has been processed, we obtain:

MXY=M(n)XY=nΣi=1fiwi(xi−xy)(yi−yx)

3. Compute bivariate statistics between X and Y:

Number of valid cases: NXY

Covariance: cXY=MXYNXY−1

Correlation: rXY=cXY
√ cXX
√ cYY

Note: If there are no valid cases when pairwise deletion is used, then we let cXY=0 and rXY=0.

Categorical target and all continuous predictors

For a categorical target Y with values i=1,2,...,J and a continuous predictor X with values x1,...xn, the bivariate statistics are:

Mean of X for each Y=i, i=1,...,J:

x· i=nΣj=1fjwjxjI(yj=i)nΣj=1fjwjI(yj=i)

Sum of squared errors of X for each Y=i, i=1,...,J:

M2·i=nΣj=1fjwj(xj−x· i)2I(yj=i)

Sum of frequency weight for each Y=i, i=1,...,J:

N·i=nΣj=1fjI(yj=i∧xj is not missing )

Number of invalid cases

NXY=JΣi=1N·i

Sum of weights (frequency weight times analysis weight) for each Y=i, i=1,...,J:

W·i=nΣj=1fjwiI(yj=i∧xj is not missing )

Continuous target and all categorical predictors

For a continuous target Y and a categorical predictor X with values i=1,...,J, the bivariate statistics include:

Mean of Y conditional upon X:

yx=IΣi=1nΣj=1fjwjyjI(xj=i)IΣi=1nΣj=1fjwjI(xj=i)

Sum of squared errors of Y:

M2X ·=nΣj=1fjwj(yj−yx)2

Mean of Y for each X=i, i=1,...,J:

yi ·=nΣj=1fjwjyjI(xj=i)nΣj=1fjwjI(xj=i)

Sum of squared errors of Y for each X=i, i=1,...,J:

M2i ·=nΣj=1fjwj(yj−yi ·)2I(xj=i)

Sum of frequency weights for X=i, i=1,...,J:

Ni ·=nΣj=1fjI(xj=i∧yj is not missing )

Sum of weights (frequency weight times analysis weight) for X=i, i=1,...,J:

Wi ·=nΣj=1fjwjI(xj=i∧yj is not missing )

Categorical target and all categorical predictors

For a categorical target Y with values j=1,...,J and a categorical predictor X with values i=1,...,I, then bivariate statistics are:

Sum of frequency weights for each combination of xk=i and yk=j:

Nij=nΣk=1fkI(xk=i∧yk=j)

Sum of weights (frequency weight times analysis weight) for each combination of xk=i and yk=j:

Wij=nΣk1fkwkI(xk=i∧yk=j)

Related Topics

Automated Data Preparation Algorithms
Notation (automated data preparation algorithms)
Date/Time Handling (automated data preparation algorithms)
Univariate Statistics Collection (automated data preparation algorithms)
Basic Variable Screening (automated data preparation algorithms)
Checkpoint 1: Exit? (automated data preparation algorithms)
Measurement Level Recasting (automated data preparation algorithms)
Outlier Identification and Handling (automated data preparation algorithms)
Missing Value Handling (automated data preparation algorithms)
Continuous Predictor Transformations (automated data preparation algorithms)
Z-score Transformation (automated data preparation algorithms)
Min-Max Transformation (automated data preparation algorithms)
Target Handling (automated data preparation algorithms)
Categorical Variable Handling (automated data preparation algorithms)
Reordering Categories (automated data preparation algorithms)
Identify Highly Associated Categorical Features (automated data preparation algorithms)
Supervised Merge (automated data preparation algorithms)
P-value Calculations (automated data preparation algorithms)
Unsupervised Merge (automated data preparation algorithms)
Continuous Predictor Handling (automated data preparation algorithms)
Supervised Binning (automated data preparation algorithms)
Feature Selection and Construction (automated data preparation algorithms)
Principal Component Analysis (automated data preparation algorithms)
Correlation and Partial Correlation (automated data preparation algorithms)
Discretization of Continuous Predictors (automated data preparation algorithms)
Predictive Power (automated data preparation algorithms)
References (automated data preparation algorithms)


Categorical Variable Handling (automated data preparation algorithms)

automated data preparation algorithms,automated data preparation algorithms,automated data preparation algorithms
categorical variable handling,categorical variable handling,categorical variable handling

In this step, we use univariate or bivariate statistics to handle categorical predictors.

Related Topics

Automated Data Preparation Algorithms
Notation (automated data preparation algorithms)
Date/Time Handling (automated data preparation algorithms)
Univariate Statistics Collection (automated data preparation algorithms)
Basic Variable Screening (automated data preparation algorithms)
Checkpoint 1: Exit? (automated data preparation algorithms)
Measurement Level Recasting (automated data preparation algorithms)
Outlier Identification and Handling (automated data preparation algorithms)
Missing Value Handling (automated data preparation algorithms)
Continuous Predictor Transformations (automated data preparation algorithms)
Z-score Transformation (automated data preparation algorithms)
Min-Max Transformation (automated data preparation algorithms)
Target Handling (automated data preparation algorithms)
Bivariate Statistics Collection (automated data preparation algorithms)
Reordering Categories (automated data preparation algorithms)
Identify Highly Associated Categorical Features (automated data preparation algorithms)
Supervised Merge (automated data preparation algorithms)
P-value Calculations (automated data preparation algorithms)
Unsupervised Merge (automated data preparation algorithms)
Continuous Predictor Handling (automated data preparation algorithms)
Supervised Binning (automated data preparation algorithms)
Feature Selection and Construction (automated data preparation algorithms)
Principal Component Analysis (automated data preparation algorithms)
Correlation and Partial Correlation (automated data preparation algorithms)
Discretization of Continuous Predictors (automated data preparation algorithms)
Predictive Power (automated data preparation algorithms)
References (automated data preparation algorithms)


Reordering Categories (automated data preparation algorithms)

For a nominal predictor, we rearrange categories from lowest to highest counts. If there is a tie on counts, then ties will be broken by ascending sort or lexical order of the data values. The new field values start with 0 as the least frequent category. Note that the new field will be numeric even if the original field is a string. For example, if a nominal field's data values are "A", "A", "A", "B", "C", "C", then automated data preparation would recode "B" into 0, "C" into 1, and "A" into 2.

Related Topics

Automated Data Preparation Algorithms
Notation (automated data preparation algorithms)
Date/Time Handling (automated data preparation algorithms)
Univariate Statistics Collection (automated data preparation algorithms)
Basic Variable Screening (automated data preparation algorithms)
Checkpoint 1: Exit? (automated data preparation algorithms)
Measurement Level Recasting (automated data preparation algorithms)
Outlier Identification and Handling (automated data preparation algorithms)
Missing Value Handling (automated data preparation algorithms)
Continuous Predictor Transformations (automated data preparation algorithms)
Z-score Transformation (automated data preparation algorithms)
Min-Max Transformation (automated data preparation algorithms)
Target Handling (automated data preparation algorithms)
Bivariate Statistics Collection (automated data preparation algorithms)
Categorical Variable Handling (automated data preparation algorithms)
Identify Highly Associated Categorical Features (automated data preparation algorithms)
Supervised Merge (automated data preparation algorithms)
P-value Calculations (automated data preparation algorithms)
Unsupervised Merge (automated data preparation algorithms)
Continuous Predictor Handling (automated data preparation algorithms)
Supervised Binning (automated data preparation algorithms)
Feature Selection and Construction (automated data preparation algorithms)
Principal Component Analysis (automated data preparation algorithms)
Correlation and Partial Correlation (automated data preparation algorithms)
Discretization of Continuous Predictors (automated data preparation algorithms)
Predictive Power (automated data preparation algorithms)
References (automated data preparation algorithms)


Identify Highly Associated Categorical Features (automated data preparation algorithms)

If there is a target in the data set, we select a ordinal/nominal predictor if its p-value is not larger than an alpha-level αselection (default is 0.05). See P-value Calculations (automated data preparation algorithms) for details of computing these p-values.

Since we use pairwise deletion to handle missing values when we collect bivariate statistics, we may have some categories with zero cases; that is, Ni ·=0 for a category i of a categorical predictor. When we calculate p-values, these categories will be excluded.

If there is only one category or no category after excluding categories with zero cases, we set the p-value to be 1 and this predictor will not be selected.

Related Topics

Automated Data Preparation Algorithms
Notation (automated data preparation algorithms)
Date/Time Handling (automated data preparation algorithms)
Univariate Statistics Collection (automated data preparation algorithms)
Basic Variable Screening (automated data preparation algorithms)
Checkpoint 1: Exit? (automated data preparation algorithms)
Measurement Level Recasting (automated data preparation algorithms)
Outlier Identification and Handling (automated data preparation algorithms)
Missing Value Handling (automated data preparation algorithms)
Continuous Predictor Transformations (automated data preparation algorithms)
Z-score Transformation (automated data preparation algorithms)
Min-Max Transformation (automated data preparation algorithms)
Target Handling (automated data preparation algorithms)
Bivariate Statistics Collection (automated data preparation algorithms)
Categorical Variable Handling (automated data preparation algorithms)
Reordering Categories (automated data preparation algorithms)
Supervised Merge (automated data preparation algorithms)
P-value Calculations (automated data preparation algorithms)
Unsupervised Merge (automated data preparation algorithms)
Continuous Predictor Handling (automated data preparation algorithms)
Supervised Binning (automated data preparation algorithms)
Feature Selection and Construction (automated data preparation algorithms)
Principal Component Analysis (automated data preparation algorithms)
Correlation and Partial Correlation (automated data preparation algorithms)
Discretization of Continuous Predictors (automated data preparation algorithms)
Predictive Power (automated data preparation algorithms)
References (automated data preparation algorithms)


Supervised Merge (automated data preparation algorithms)

automated data preparation algorithms,automated data preparation algorithms,automated data preparation algorithms
supervised merge,supervised merge,supervised merge

We merge categories of an ordinal/nominal predictor using a supervised method that is similar to a Chaid Tree with one level of depth.

1. Exclude all categories with zero case count.

2. If X has 0 categories, merge all excluded categories into one category, then stop.

3. If X has 1 category, go to step 7.

4. Else, find the allowable pair of categories of X that is most similar. This is the pair whose test statistic gives the largest p-value with respect to the target. An allowable pair of categories for an ordinal predictor is two adjacent categories; for a nominal predictor it is any two categories. Note that for an ordinal predictor, if categories between the ith category and jth categories are excluded because of zero cases, then the ith category and jth categories are two adjacent categories. See P-value Calculations (automated data preparation algorithms) for details of computing these p-values.

5. For the pair having the largest p-value, check if its p-value is larger than a specified alpha-level αselection (default is 0.05). If it does, this pair is merged into a single compound category and at the same time we calculate the bivariate statistics of this new category. Then a new set of categories of X is formed. If it does not, then go to step 6.

6. Go to step 3.

7. For an ordinal predictor, find the maximum value in each new category. Sort these maximum values in ascending order. Suppose we have r new categories, and the maximum values are: i1<i2<...<ir, then we get the merge rule as: the first new category will contain all original categories such that X≤i1, the second new category will contain all original categories such that i1<X≤i2,…, and the last new category will contain all original categories such that X>ir−1.

For a nominal predictor, all categories excluded at step 1 will be merged into the new category with the lowest count. If there are ties on categories with the lowest counts, then ties are broken by selecting the category with the smallest value by ascending sort or lexical order of the original category values which formed the new categories with the lowest counts.

Bivariate statistics calculation of new category

When two categories are merged into a new category, we need to calculate the bivariate statistics of this new category.

Scale target. If the categories i and i´ can be merged based on p-value, then the bivariate statistics should be calculated as:

Ni,i´·=Ni·+Ni´·
Wi,i´ ·=Wi ·+Wi´ ·
yi,i´ ·=yi ·+Wi´ ·Wi,i´ ·(yi´ ·−yi ·)
M2i,i´ ·=M2i ·+M2i´ ·+Wi ·(yi,i´ ·−yi ·)2+Wi´ ·(yi,i´ ·−yi´ ·)2

Categorical target. If the categories i and i´ can be merged based on p-value, then the bivariate statistics should be calculated as:

Ni,i´j=Nij+Ni´j
Wi,i´j=Wij+Wi´j

Update univariate and bivariate statistics

At the end of the supervised merge step, we calculate the bivariate statistics for each new category. For univariate statistics, the counts for each new category will be sum of the counts of each original categories which formed the new category. Then we update other statistics according to the formulas in Univariate Statistics Collection (automated data preparation algorithms), though note that the statistics only need to be updated based on the new categories and the numbers of cases in these categories.

Related Topics

Automated Data Preparation Algorithms
Notation (automated data preparation algorithms)
Date/Time Handling (automated data preparation algorithms)
Univariate Statistics Collection (automated data preparation algorithms)
Basic Variable Screening (automated data preparation algorithms)
Checkpoint 1: Exit? (automated data preparation algorithms)
Measurement Level Recasting (automated data preparation algorithms)
Outlier Identification and Handling (automated data preparation algorithms)
Missing Value Handling (automated data preparation algorithms)
Continuous Predictor Transformations (automated data preparation algorithms)
Z-score Transformation (automated data preparation algorithms)
Min-Max Transformation (automated data preparation algorithms)
Target Handling (automated data preparation algorithms)
Bivariate Statistics Collection (automated data preparation algorithms)
Categorical Variable Handling (automated data preparation algorithms)
Reordering Categories (automated data preparation algorithms)
Identify Highly Associated Categorical Features (automated data preparation algorithms)
P-value Calculations (automated data preparation algorithms)
Unsupervised Merge (automated data preparation algorithms)
Continuous Predictor Handling (automated data preparation algorithms)
Supervised Binning (automated data preparation algorithms)
Feature Selection and Construction (automated data preparation algorithms)
Principal Component Analysis (automated data preparation algorithms)
Correlation and Partial Correlation (automated data preparation algorithms)
Discretization of Continuous Predictors (automated data preparation algorithms)
Predictive Power (automated data preparation algorithms)
References (automated data preparation algorithms)


P-value Calculations (automated data preparation algorithms)

Each p-value calculation is based on the appropriate statistical test of association between the predictor and target.

Scale target

We calculate an F statistic:

F=IΣi=1Wi ·(yi ·−yx)2/(I−1)IΣi=1M2i ·/(IΣi=1Ni ·−I)

where yx=IΣi=1Wi ·yi ·IΣi=1Wi ·.

Based on F statistics, the p-value can be derived as

p=Pr(F(I−1,IΣi=1Ni ·−I)>F)

where F(I−1,IΣi=1Ni ·−I) is a random variable following a F distribution with I−1 and IΣi=1Ni ·−I degrees of freedom.

At the merge step we calculate the F statistic and p-value between two categories i and i´ of X as

F=Wi ·(yi ·−yi,i´ ·)2+Wi´ ·(yi´ ·−yi,i´ ·)2(M2i ·+M2i´ ·)/(Ni ·+Ni´ ·−2)
p=Pr(F(1,Ni ·+Ni´ ·−2)>F)

where yi,i´ · is the mean of Y for a new category i,i´ merged by i and i´:

yi,i´ ·=yi·+Wi´ ·Wi ·+Wi´ ·(yi´ ·−yi ·)

and F(I−1,Ni ·+Ni´ ·−2) is a random variable following a F distribution with 1 and Ni ·+Ni´ ·−2 degrees of freedom.

Nominal target

The null hypothesis of independence of X and Y is tested. First a contingency (or count) table is formed using classes of Y as columns and categories of the predictor X as rows. Then the expected cell frequencies under the null hypothesis are estimated. The observed cell frequencies and the expected cell frequencies are used to calculate the Pearson chi-squared statistic and the p-value:

X2=JΣj=1IΣi=1(Nij−
^
m
ij)2
^
m
ij

where Nij=
Σ
kD
fkI(xk=i∧yk=j) is the observed cell frequency and
^
m
ij is the estimated expected cell frequency for cell (xk=i,yk=j) following the independence model. If
^
m
ij=0, then (Nij−
^
m
ij)2
^
m
ij=0. How to estimate
^
m
ij is described below.

The corresponding p-value is given by p=Pr(χ2d>X2), where χ2d follows a chi-squared distribution with d=(J−1)(I−1) degrees of freedom.

When we investigate whether two categories i and i´ of X can be merged, the Pearson chi-squared statistic is revised as

X2=JΣj=1((Nij−
^
m
ij)2
^
m
ij+(Ni´j−
^
m
i´j)2
^
m
i´j)

and the p-value is given by p=Pr(χ2J−1>X2).

Ordinal target

Suppose there are I categories of X, and J ordinal categories of Y. Then the null hypothesis of the independence of X and Y is tested against the row effects model (with the rows being the categories of X and columns the classes of Y) proposed by Goodman (1979). Two sets of expected cell frequencies,
^
m
ij (under the hypothesis of independence) and
^
^
m
ij (under the hypothesis that the data follow a row effects model), are both estimated. The likelihood ratio statistic is

H2=2IΣi=1JΣj=1H2ij

where

H2ij={
^
^
m
ijln(
^
^
m
ij/
^
m
ij)
^
^
m
ij/
^
m
ij>0
0 else

The p-value is given by p=Pr(χ2I−1>H2).

Estimated expected cell frequencies (independence assumption)

If analysis weights are specified, the expected cell frequency under the null hypothesis of independence is of the form

mij=w−1ijαiβj

where αi and βj are parameters to be estimated, and wij=WijNij if Nij>0, otherwise wij=1.

Parameter estimates
^
α
i,
^
β
j, and hence
^
m
ij, are obtained from the following iterative procedure.

1. k=0, α(0)i=β(0)j=1, m(0)ij=w−1ij

2. α(k+1)i=Ni.
Σ
j
w−1ijβ(k)j=α(k)iNi.
Σ
j
m(k)ij

3. β(k+1)j=N.j
Σ
i
w−1ijα(k+1)i

4. m(k+1)ij=w−1ijα(k+1)iβ(k+1)j

5. If
max
i,j
|m(k+1)ij−m(k)ij|<ε (default is 0.001) or the number of iterations is larger than a threshold (default is 100), stop and output α(k+1)i,β(k+1)j and m(k+1)ij as the final estimates
^
α
i,
^
β
j,
^
m
ij. Otherwise, k=k+1 and go to step 2.

Estimated expected cell frequencies (row effects model)

In the row effects model, scores for classes of Y are needed. By default, s*j (the order of a class of Y) is used as the class score. These orders will be standardized via the following linear transformation such that the largest score is 100 and the lowest score is 0.

sj=100(s*j−s*min)/(s*max−s*min)

Where s*min and s*max are the smallest and largest order, respectively.

The expected cell frequency under the row effects model is given by

mij=w−1ijαiβjγi

where s=JΣj=1W.jsj/JΣj=1W.j, in which W·j=ΣiWij, and αi, βj, and γi are unknown parameters to be estimated.

Parameter estimates
^
^
α
i,
^
^
β
j,
^
^
γ
i and hence
^
^
m
ij are obtained from the following iterative procedure.

1. k=0, α(0)i=β(0)j=γ(0)i=1, m(0)ij=w−1ij

2. α(k+1)i=N.j
Σ
j
w−1ijβ(k)j(γ(k)i)(sj−s)=α(k)iNi.
Σ
j
m(k)ij

3. β(k+1)j=N.j
Σ
i
w−1ijα(k+1)i(γ(k)i)(sj−s)

4. m*ij=w−1ijα(k+1)iβ(k+1)j(γ(k)i)(sj−s), Gi=1+Σj(sj−s)(Nij−m*ij)Σj(sj−s)2m*ij

5. γ(k+1)i={
γ(k)iGi | Gi>0
γ(k)i | otherwise

6. m(k+1)ij=w−1ijα(k+1)iβ(k+1)j(γ(k+1)i)(sj−s)

7. If
max
i,j
|m(k+1)ij−m(k)ij|<ε (default is 0.001) or the number of iterations is larger than a threshold (default is 100), stop and output α(k+1)i,β(k+1)j,γ(k+1)i and m(k+1)ij as the final estimates
^
^
α
i,
^
^
β
j,
^
^
γ
i,
^
^
m
ij. Otherwise, k=k+1 and go to step 2.

Related Topics

Automated Data Preparation Algorithms
Notation (automated data preparation algorithms)
Date/Time Handling (automated data preparation algorithms)
Univariate Statistics Collection (automated data preparation algorithms)
Basic Variable Screening (automated data preparation algorithms)
Checkpoint 1: Exit? (automated data preparation algorithms)
Measurement Level Recasting (automated data preparation algorithms)
Outlier Identification and Handling (automated data preparation algorithms)
Missing Value Handling (automated data preparation algorithms)
Continuous Predictor Transformations (automated data preparation algorithms)
Z-score Transformation (automated data preparation algorithms)
Min-Max Transformation (automated data preparation algorithms)
Target Handling (automated data preparation algorithms)
Bivariate Statistics Collection (automated data preparation algorithms)
Categorical Variable Handling (automated data preparation algorithms)
Reordering Categories (automated data preparation algorithms)
Identify Highly Associated Categorical Features (automated data preparation algorithms)
Supervised Merge (automated data preparation algorithms)
Unsupervised Merge (automated data preparation algorithms)
Continuous Predictor Handling (automated data preparation algorithms)
Supervised Binning (automated data preparation algorithms)
Feature Selection and Construction (automated data preparation algorithms)
Principal Component Analysis (automated data preparation algorithms)
Correlation and Partial Correlation (automated data preparation algorithms)
Discretization of Continuous Predictors (automated data preparation algorithms)
Predictive Power (automated data preparation algorithms)
References (automated data preparation algorithms)


Unsupervised Merge (automated data preparation algorithms)

automated data preparation algorithms,automated data preparation algorithms,automated data preparation algorithms
unsupervised merge,unsupervised merge,unsupervised merge

If there is no target, we merge categories based on counts. Suppose that X has I categories which are sorted in ascending order. For an ordinal predictor, we sort it according to its values, while for nominal predictor we rearrange categories from lowest to highest count, with ties broken by ascending sort or lexical order of the data values. Let ci be the number of cases for the ith category, and NX be the total number of cases for X. Then we use the equal frequency method to merge sparse categories.

1. Start with j1=j2=1 and g=1.

2. If j1>I, go to step 5.

3. If j2Σi=j1ci<[b%×NX], then j2=j2+1; otherwise the original categories j1,j1+1,...,j2 will be merged into the new category g and let j1=j2+1, j2=j1 and g=g+1, then go to step 2.

4. If j2≥I, then merge categories using one of the following rules:

i) If g=1, then categories 1,2,...,I−1 will be merged into category g and I will be left unmerged.

ii) If g=2, then j1,j1+1,...,I will be merged into category g=2.

iii) If g>2, then j1,j1+1,...,I will be merged into category g−1.

If j2<I, then go to step 3.

5. Output the merge rule and merged predictor.

After merging, one of the following rules holds:

• Neither the original category nor any category created during merging has fewer than [b%×NX] cases, where b is a user-specified parameter satisfying 1<b<100 (default is 10) and [x] denotes the nearest integer of x.

• The merged predictor has only two categories.

Update univariate statistics. When original categories j1,j1+1,...,j2 are merged into one new category, then the number of cases in this new category will be j2Σi=j1cj. At the end of the merge step, we get new categories and the number of cases in each category. Then we update other statistics according to the formulas in Univariate Statistics Collection (automated data preparation algorithms), though note that the statistics only need to be updated based on the new categories and the numbers of cases in these categories.

Related Topics

Automated Data Preparation Algorithms
Notation (automated data preparation algorithms)
Date/Time Handling (automated data preparation algorithms)
Univariate Statistics Collection (automated data preparation algorithms)
Basic Variable Screening (automated data preparation algorithms)
Checkpoint 1: Exit? (automated data preparation algorithms)
Measurement Level Recasting (automated data preparation algorithms)
Outlier Identification and Handling (automated data preparation algorithms)
Missing Value Handling (automated data preparation algorithms)
Continuous Predictor Transformations (automated data preparation algorithms)
Z-score Transformation (automated data preparation algorithms)
Min-Max Transformation (automated data preparation algorithms)
Target Handling (automated data preparation algorithms)
Bivariate Statistics Collection (automated data preparation algorithms)
Categorical Variable Handling (automated data preparation algorithms)
Reordering Categories (automated data preparation algorithms)
Identify Highly Associated Categorical Features (automated data preparation algorithms)
Supervised Merge (automated data preparation algorithms)
P-value Calculations (automated data preparation algorithms)
Continuous Predictor Handling (automated data preparation algorithms)
Supervised Binning (automated data preparation algorithms)
Feature Selection and Construction (automated data preparation algorithms)
Principal Component Analysis (automated data preparation algorithms)
Correlation and Partial Correlation (automated data preparation algorithms)
Discretization of Continuous Predictors (automated data preparation algorithms)
Predictive Power (automated data preparation algorithms)
References (automated data preparation algorithms)


Continuous Predictor Handling (automated data preparation algorithms)

automated data preparation algorithms,automated data preparation algorithms,automated data preparation algorithms
continuous variable handling,continuous variable handling,continuous variable handling

Continuous predictor handling includes supervised binning when the target is categorical, predictor selection when the target is continuous and predictor construction when the target is continuous or there is no target in the dataset.

After handling continuous predictors, we collect univariate statistics for derived or constructed predictors according to the formulas in Univariate Statistics Collection (automated data preparation algorithms). Any derived predictors that are constant, or have all missing values, are excluded from further analysis.

Related Topics

Automated Data Preparation Algorithms
Notation (automated data preparation algorithms)
Date/Time Handling (automated data preparation algorithms)
Univariate Statistics Collection (automated data preparation algorithms)
Basic Variable Screening (automated data preparation algorithms)
Checkpoint 1: Exit? (automated data preparation algorithms)
Measurement Level Recasting (automated data preparation algorithms)
Outlier Identification and Handling (automated data preparation algorithms)
Missing Value Handling (automated data preparation algorithms)
Continuous Predictor Transformations (automated data preparation algorithms)
Z-score Transformation (automated data preparation algorithms)
Min-Max Transformation (automated data preparation algorithms)
Target Handling (automated data preparation algorithms)
Bivariate Statistics Collection (automated data preparation algorithms)
Categorical Variable Handling (automated data preparation algorithms)
Reordering Categories (automated data preparation algorithms)
Identify Highly Associated Categorical Features (automated data preparation algorithms)
Supervised Merge (automated data preparation algorithms)
P-value Calculations (automated data preparation algorithms)
Unsupervised Merge (automated data preparation algorithms)
Supervised Binning (automated data preparation algorithms)
Feature Selection and Construction (automated data preparation algorithms)
Principal Component Analysis (automated data preparation algorithms)
Correlation and Partial Correlation (automated data preparation algorithms)
Discretization of Continuous Predictors (automated data preparation algorithms)
Predictive Power (automated data preparation algorithms)
References (automated data preparation algorithms)


Supervised Binning (automated data preparation algorithms)

automated data preparation algorithms,automated data preparation algorithms,automated data preparation algorithms
supervised binning,supervised binning,supervised binning

If there is a categorical target, then we will transform each continuous predictor to an ordinal predictor using supervised binning. Suppose that we have already collected the bivariate statistics between the categorical target and a continuous predictor. Using the notations introduced in Bivariate Statistics Collection (automated data preparation algorithms), the homogeneous subset will be identified by the Scheffe method as follows:

If |x· i−x· j|≤ccritical then x· i and x· j will be a homogeneous subset, where ccritical=max(x· i)−min(x· i) if NXY=J; otherwiseccritical=R*C, where R=
√ 2(J−1)F1−α(J−1,NXY−J)
and C=MS×
√ JΣi=11/W· iJ
, MS=
√ JΣi=1M2·iNXY−J
.

The supervised algorithm follows:

1. Sort the means x· i in ascending order, denote as x· (1)≤x· (2)≤...≤x· (J).

2. Start with i=1 and q=J.

3. If |x· (q)−x· (i)|≤ccritical, then {x· (i),...,x· (q)} can be considered a homogeneous subset. At the same time we compute the mean and standard deviation of this subset: x· (i,q)=qΣk=iW· (k)x· (k)qΣk=iW· (k) and sd· (i,q)=
√ M2 (i,q)qΣk=iN· (k)−1
, where M2 (i,q)=qΣk=iA· (k) and A· (k)=M2· (k)+W· (k)(x· (i,q)−x· (k))2, then set i=q+1 and q=J; Otherwise q=q−1.

4. If i≤J, go to step 3.

5. Else compute the cut point of bins. Suppose we have r≤J homogeneous subsets and we assume that the means of these subsets are x*· (1),x*· (2),...,x*· (r), and standard deviations are sd*· (1),sd*· (2),...,sd*· (r), then the cut points between the ith and (i+1)th homogeneous subsets are computed as cuti=x*(i)+sd*(i)+ε(sd*(i)+sd*(i+1)+2ε)(x*(i+1)−x*(i)).

6. Output the binning rules. Category 1: X≤cut1; Category 2: cut1<X≤cut2;…; Category : cutr−1<X.

Related Topics

Automated Data Preparation Algorithms
Notation (automated data preparation algorithms)
Date/Time Handling (automated data preparation algorithms)
Univariate Statistics Collection (automated data preparation algorithms)
Basic Variable Screening (automated data preparation algorithms)
Checkpoint 1: Exit? (automated data preparation algorithms)
Measurement Level Recasting (automated data preparation algorithms)
Outlier Identification and Handling (automated data preparation algorithms)
Missing Value Handling (automated data preparation algorithms)
Continuous Predictor Transformations (automated data preparation algorithms)
Z-score Transformation (automated data preparation algorithms)
Min-Max Transformation (automated data preparation algorithms)
Target Handling (automated data preparation algorithms)
Bivariate Statistics Collection (automated data preparation algorithms)
Categorical Variable Handling (automated data preparation algorithms)
Reordering Categories (automated data preparation algorithms)
Identify Highly Associated Categorical Features (automated data preparation algorithms)
Supervised Merge (automated data preparation algorithms)
P-value Calculations (automated data preparation algorithms)
Unsupervised Merge (automated data preparation algorithms)
Continuous Predictor Handling (automated data preparation algorithms)
Feature Selection and Construction (automated data preparation algorithms)
Principal Component Analysis (automated data preparation algorithms)
Correlation and Partial Correlation (automated data preparation algorithms)
Discretization of Continuous Predictors (automated data preparation algorithms)
Predictive Power (automated data preparation algorithms)
References (automated data preparation algorithms)


Feature Selection and Construction (automated data preparation algorithms)

automated data preparation algorithms,automated data preparation algorithms,automated data preparation algorithms
feature selection,feature selection,feature selection
automated data preparation algorithms,automated data preparation algorithms,automated data preparation algorithms
feature construction,feature construction,feature construction

If there is a continuous target, we perform predictor selection using p-values derived from the correlation or partial correlation between the predictors and the target. The selected predictors are grouped if they are highly correlated. In each group, we will derive a new predictor using principal component analysis. However, if there is no target, we will do not implement predictor selection.

To identify highly correlated predictors, we compute the correlation between a scale and a group as follows: suppose that X is a continuous predictor and continuous predictors X1,X2,...,Xm form a group G. Then the correlation between X and group G is defined as:

rXG=min{|rXXi|, XiG}

where rXXi is correlation between X and Xi.

Let αgroup be the correlation level at which the predictors are identified as groups. The predictor selection and predictor construction algorithm is as follows:

1. (Target is continuous and predictor selection is in effect ) If the p-value between a continuous predictor and target is larger than a threshold (default is 0.05), then we remove this predictor from the correlation matrix and covariance matrix. See Correlation and Partial Correlation (automated data preparation algorithms) for details on computing these p-values.

2. Start with αgroup=0.9 and i=1.

3. If αgroup≤0.1, stop and output all the derived predictors, their source predictors and coefficient of each source predictor. In addition, output the remaining predictors in the correlation matrix.

4. Find the two most correlated predictors such that their correlation in absolute value is larger than αgroup, and put them in group i. If there are no predictors to be chosen, then go to step 9.

5. Add one predictor to group i such that the predictor is most correlated with group i and the correlation is larger than αgroup. Repeat this step until the number of predictors in group i is greater than a threshold (default is 5) or there is no predictor to be chosen.

6. Derive a new predictor from the group i using principal component analysis. See the topic Principal Component Analysis (automated data preparation algorithms) for more information.

7. (Both predictor selection and predictor construction are in effect) Compute partial correlations between the other continuous predictors and the target, controlling for values of the new predictor. Also compute the p-values based on partial correlation. See Correlation and Partial Correlation (automated data preparation algorithms) for details on computing these p-values. If the p-value based on partial correlation between a continuous predictor and continuous target is larger than a threshold (default is 0.05), then remove this predictor from the correlation and covariance matrices.

8. Remove predictors that are in the group from the correlation matrix. Then let i=i+1 and go to step 4.

9. αgroup=αgroup−0.1, then go to step 3.

Notes:

• If only predictor selection is needed, then only step 1 is implemented. If only predictor construction is needed, then we implement all steps except step 1 and step 7. If both predictor selection and predictor construction are needed, then all steps are implemented.

• If there are ties on correlations when we identify highly correlated predictors, the ties will be broken by selecting the predictor with the smallest index in dataset.

Related Topics

Automated Data Preparation Algorithms
Notation (automated data preparation algorithms)
Date/Time Handling (automated data preparation algorithms)
Univariate Statistics Collection (automated data preparation algorithms)
Basic Variable Screening (automated data preparation algorithms)
Checkpoint 1: Exit? (automated data preparation algorithms)
Measurement Level Recasting (automated data preparation algorithms)
Outlier Identification and Handling (automated data preparation algorithms)
Missing Value Handling (automated data preparation algorithms)
Continuous Predictor Transformations (automated data preparation algorithms)
Z-score Transformation (automated data preparation algorithms)
Min-Max Transformation (automated data preparation algorithms)
Target Handling (automated data preparation algorithms)
Bivariate Statistics Collection (automated data preparation algorithms)
Categorical Variable Handling (automated data preparation algorithms)
Reordering Categories (automated data preparation algorithms)
Identify Highly Associated Categorical Features (automated data preparation algorithms)
Supervised Merge (automated data preparation algorithms)
P-value Calculations (automated data preparation algorithms)
Unsupervised Merge (automated data preparation algorithms)
Continuous Predictor Handling (automated data preparation algorithms)
Supervised Binning (automated data preparation algorithms)
Principal Component Analysis (automated data preparation algorithms)
Correlation and Partial Correlation (automated data preparation algorithms)
Discretization of Continuous Predictors (automated data preparation algorithms)
Predictive Power (automated data preparation algorithms)
References (automated data preparation algorithms)


Principal Component Analysis (automated data preparation algorithms)

automated data preparation algorithms,automated data preparation algorithms,automated data preparation algorithms
principal component analysis,principal component analysis,principal component analysis
principal component analysis,principal component analysis,principal component analysis
automated data preparation algorithms,automated data preparation algorithms,automated data preparation algorithms

Let X1,X2,...,Xm be m continuous predictors. Principal component analysis can be described as follows:

1. Input Cm×m, the covariance matrix of X1,X2,...,Xm.

2. Calculate the eigenvectors and eigenvalues of the covariance matrix. Sort the eigenvalues (and corresponding eigenvectors) in descending order, λ1≥λ2≥...≥λm.

3. Derive new predictors. Suppose the elements of the first component v1 are v11,v12,...,v1m, then the new derived predictor is v11
√ λ1
X1+v12
√ λ1
X2+...+v1m
√ λ1
Xm.

Related Topics

Automated Data Preparation Algorithms
Notation (automated data preparation algorithms)
Date/Time Handling (automated data preparation algorithms)
Univariate Statistics Collection (automated data preparation algorithms)
Basic Variable Screening (automated data preparation algorithms)
Checkpoint 1: Exit? (automated data preparation algorithms)
Measurement Level Recasting (automated data preparation algorithms)
Outlier Identification and Handling (automated data preparation algorithms)
Missing Value Handling (automated data preparation algorithms)
Continuous Predictor Transformations (automated data preparation algorithms)
Z-score Transformation (automated data preparation algorithms)
Min-Max Transformation (automated data preparation algorithms)
Target Handling (automated data preparation algorithms)
Bivariate Statistics Collection (automated data preparation algorithms)
Categorical Variable Handling (automated data preparation algorithms)
Reordering Categories (automated data preparation algorithms)
Identify Highly Associated Categorical Features (automated data preparation algorithms)
Supervised Merge (automated data preparation algorithms)
P-value Calculations (automated data preparation algorithms)
Unsupervised Merge (automated data preparation algorithms)
Continuous Predictor Handling (automated data preparation algorithms)
Supervised Binning (automated data preparation algorithms)
Feature Selection and Construction (automated data preparation algorithms)
Correlation and Partial Correlation (automated data preparation algorithms)
Discretization of Continuous Predictors (automated data preparation algorithms)
Predictive Power (automated data preparation algorithms)
References (automated data preparation algorithms)


Correlation and Partial Correlation (automated data preparation algorithms)

Correlation and P-value

Let rXY be the correlation between continuous predictor X and continuous target Y, then the p-value is derived form the t test:

p=Pr(|t(NXY−2)|>t)

where t(NXY−2) is a random variable with a t distribution with NXY−2 degrees of freedom, and t=rXY
√ NXY−21−r2XY
. If r2XY=1, then set p=0; If NXY≤2, then set p=1.

Partial correlation and P-value

For two continuous variables, X and Y, we can calculate the partial correlation between them controlling for the values of a new continuous variable Z:

rXY|Z=rXY−rXZrYZ
√ 1−r2XZ
√ 1−r2YZ

Since the new variable Z is always a linear combination of several continuous variables, we compute the correlation of Z and a continuous variable using a property of the covariance rather than the original dataset. Suppose the new derived predictor Z is a linear combination of original predictors X1,X2,...,Xm:

Z=a1X1+a2X2+...+amXm

Then for any a continuous variable X (continuous predictor or continuous target), the correlation between X and Z is

rZX=cZX
√ cZZcXX

where cZX=mΣi=1aicXiX, and cZZ=mΣi=1a2icXiXi+2
Σ
i≠j
aiajcXiXj.

If 1−r2XZ or 1−r2YZ is less than 10−10, let rXY|Z=0. If rXY|Z is larger than 1, then set it to 1; If rXY|Z is less than −1, then set it to −1. (This may occur with pairwise deletion). Based on partial correlation, the p-value is derived from the t test

p=Pr(|t(NXY−3)|>t)

where t(NXY−3) is a random variable with a t distribution with NXY−3 degrees of freedom, and t=rXY|Z
√ NXY−31−r2XY|Z
. If r2XY|Z=1, then set p=0; if NXY≤3, then set p=1.

Related Topics

Automated Data Preparation Algorithms
Notation (automated data preparation algorithms)
Date/Time Handling (automated data preparation algorithms)
Univariate Statistics Collection (automated data preparation algorithms)
Basic Variable Screening (automated data preparation algorithms)
Checkpoint 1: Exit? (automated data preparation algorithms)
Measurement Level Recasting (automated data preparation algorithms)
Outlier Identification and Handling (automated data preparation algorithms)
Missing Value Handling (automated data preparation algorithms)
Continuous Predictor Transformations (automated data preparation algorithms)
Z-score Transformation (automated data preparation algorithms)
Min-Max Transformation (automated data preparation algorithms)
Target Handling (automated data preparation algorithms)
Bivariate Statistics Collection (automated data preparation algorithms)
Categorical Variable Handling (automated data preparation algorithms)
Reordering Categories (automated data preparation algorithms)
Identify Highly Associated Categorical Features (automated data preparation algorithms)
Supervised Merge (automated data preparation algorithms)
P-value Calculations (automated data preparation algorithms)
Unsupervised Merge (automated data preparation algorithms)
Continuous Predictor Handling (automated data preparation algorithms)
Supervised Binning (automated data preparation algorithms)
Feature Selection and Construction (automated data preparation algorithms)
Principal Component Analysis (automated data preparation algorithms)
Discretization of Continuous Predictors (automated data preparation algorithms)
Predictive Power (automated data preparation algorithms)
References (automated data preparation algorithms)


Discretization of Continuous Predictors (automated data preparation algorithms)

automated data preparation algorithms,automated data preparation algorithms,automated data preparation algorithms
discretization of continuous predictors,discretization of continuous predictors,discretization of continuous predictors

Discretization is used for calculating predictive power and creating histograms.

Discretization for calculating predictive power

If the transformed target is categorical, we use the equal width bins method to discretize a continuous predictor into a number of bins equal to the number of categories of the target. Variables considered for discretization include:

• Scale predictors which have been recommended.

• Original continuous variables of recommended predictors.

Discretization for creating histograms

We use the equal width bins method to discretize a continuous predictor into a maximum of 400 bins. Variables considered for discretization include:

• Recommended continuous variables.

• Excluded continuous variables which have not been used to derive a new variable.

• Original continuous variables of recommended variables.

• Original continuous variables of excluded variables which have not been used to derive a new variable.

• Scale variables used to construct new variables. If their original variables are also continuous, then the original variables will be discretized.

• Date/time variables.

After discretization, the number of cases and mean in each bin are collected to create histograms.

Note: If an original predictor has been recast, then this recast version will be regarded as the "original" predictor.

Related Topics

Automated Data Preparation Algorithms
Notation (automated data preparation algorithms)
Date/Time Handling (automated data preparation algorithms)
Univariate Statistics Collection (automated data preparation algorithms)
Basic Variable Screening (automated data preparation algorithms)
Checkpoint 1: Exit? (automated data preparation algorithms)
Measurement Level Recasting (automated data preparation algorithms)
Outlier Identification and Handling (automated data preparation algorithms)
Missing Value Handling (automated data preparation algorithms)
Continuous Predictor Transformations (automated data preparation algorithms)
Z-score Transformation (automated data preparation algorithms)
Min-Max Transformation (automated data preparation algorithms)
Target Handling (automated data preparation algorithms)
Bivariate Statistics Collection (automated data preparation algorithms)
Categorical Variable Handling (automated data preparation algorithms)
Reordering Categories (automated data preparation algorithms)
Identify Highly Associated Categorical Features (automated data preparation algorithms)
Supervised Merge (automated data preparation algorithms)
P-value Calculations (automated data preparation algorithms)
Unsupervised Merge (automated data preparation algorithms)
Continuous Predictor Handling (automated data preparation algorithms)
Supervised Binning (automated data preparation algorithms)
Feature Selection and Construction (automated data preparation algorithms)
Principal Component Analysis (automated data preparation algorithms)
Correlation and Partial Correlation (automated data preparation algorithms)
Predictive Power (automated data preparation algorithms)
References (automated data preparation algorithms)


Predictive Power (automated data preparation algorithms)

automated data preparation algorithms,automated data preparation algorithms,automated data preparation algorithms
predictive power,predictive power,predictive power
predictive power,predictive power,predictive power
automated data preparation algorithms,automated data preparation algorithms,automated data preparation algorithms

Collect bivariate statistics for predictive power

We collect bivariate statistics between recommended predictors and the (transformed) target. If an original predictor of a recommended predictor exists, then we also collect bivariate statistics between this original predictor and the target; if an original predictor has a recast version, then we use the recast version.

If the target is categorical, but a recommended predictor or its original predictor/recast version is continuous, then we discretize the continuous predictor using the method in Discretization of Continuous Predictors (automated data preparation algorithms) and collect bivariate statistics between the categorical target and the categorical predictors.

Bivariate statistics between the predictors and target are same as those described in Bivariate Statistics Collection (automated data preparation algorithms).

Computing predictive power

Predictive power is used to measure the usefulness of a predictor and is computed with respect to the (transformed) target. If an original predictor of a recommended predictor exists, then we also compute predictive power for this original predictor; if an original predictor has a recast version, then we use the recast version.

Scale target. When the target is continuous, we fit a linear regression model and predictive power is computed as follows.

• Scale predictor: r2XY=(cXY
√ cXX
√ cYY
)2

• Categorical predictor: 1−SeST, where Se=IΣi=1M2i ·and ST=nΣi=1fiwi(yi−yx)2.

Categorical target. If the (transformed) target is categorical, then we fit a naïve Bayes model and the classification accuracy will serve as predictive power. We discretize continuous predictors as described in Discretization of Continuous Predictors (automated data preparation algorithms), so we only consider the predictive power of categorical predictors.

If Nij is the of number cases where X=i and Y=j, Ni.=JΣj=1Nij, and N.j=IΣi=1Nij, then the chi-square statistic is calculated as

χ2=IΣi=1JΣj=1(Nij−
^
N
ij)2
^
N
ij

where
^
N
ij=Ni·N·JNXY

and Cramer's V is defined as

V=(χ2NXY(min(I,J)−1))1/2

Related Topics

Automated Data Preparation Algorithms
Notation (automated data preparation algorithms)
Date/Time Handling (automated data preparation algorithms)
Univariate Statistics Collection (automated data preparation algorithms)
Basic Variable Screening (automated data preparation algorithms)
Checkpoint 1: Exit? (automated data preparation algorithms)
Measurement Level Recasting (automated data preparation algorithms)
Outlier Identification and Handling (automated data preparation algorithms)
Missing Value Handling (automated data preparation algorithms)
Continuous Predictor Transformations (automated data preparation algorithms)
Z-score Transformation (automated data preparation algorithms)
Min-Max Transformation (automated data preparation algorithms)
Target Handling (automated data preparation algorithms)
Bivariate Statistics Collection (automated data preparation algorithms)
Categorical Variable Handling (automated data preparation algorithms)
Reordering Categories (automated data preparation algorithms)
Identify Highly Associated Categorical Features (automated data preparation algorithms)
Supervised Merge (automated data preparation algorithms)
P-value Calculations (automated data preparation algorithms)
Unsupervised Merge (automated data preparation algorithms)
Continuous Predictor Handling (automated data preparation algorithms)
Supervised Binning (automated data preparation algorithms)
Feature Selection and Construction (automated data preparation algorithms)
Principal Component Analysis (automated data preparation algorithms)
Correlation and Partial Correlation (automated data preparation algorithms)
Discretization of Continuous Predictors (automated data preparation algorithms)
References (automated data preparation algorithms)


References (automated data preparation algorithms)

automated data preparation algorithms,automated data preparation algorithms,automated data preparation algorithms
references,references,references

Box, G. E. P., and D. R. Cox. 1964. An analysis of transformations. Journal of the Royal Statistical Society, Series B, 26, 211-246.

Goodman, L. A. 1979. Simple models for the analysis of association in cross-classifications having ordered categories. Journal of the American Statistical Association, 74, 537-552.

Related Topics

Automated Data Preparation Algorithms
Notation (automated data preparation algorithms)
Date/Time Handling (automated data preparation algorithms)
Univariate Statistics Collection (automated data preparation algorithms)
Basic Variable Screening (automated data preparation algorithms)
Checkpoint 1: Exit? (automated data preparation algorithms)
Measurement Level Recasting (automated data preparation algorithms)
Outlier Identification and Handling (automated data preparation algorithms)
Missing Value Handling (automated data preparation algorithms)
Continuous Predictor Transformations (automated data preparation algorithms)
Z-score Transformation (automated data preparation algorithms)
Min-Max Transformation (automated data preparation algorithms)
Target Handling (automated data preparation algorithms)
Bivariate Statistics Collection (automated data preparation algorithms)
Categorical Variable Handling (automated data preparation algorithms)
Reordering Categories (automated data preparation algorithms)
Identify Highly Associated Categorical Features (automated data preparation algorithms)
Supervised Merge (automated data preparation algorithms)
P-value Calculations (automated data preparation algorithms)
Unsupervised Merge (automated data preparation algorithms)
Continuous Predictor Handling (automated data preparation algorithms)
Supervised Binning (automated data preparation algorithms)
Feature Selection and Construction (automated data preparation algorithms)
Principal Component Analysis (automated data preparation algorithms)
Correlation and Partial Correlation (automated data preparation algorithms)
Discretization of Continuous Predictors (automated data preparation algorithms)
Predictive Power (automated data preparation algorithms)


Bootstrapping Algorithms

BOOTSTRAP (command),BOOTSTRAP (command),BOOTSTRAP (command)
algorithms,algorithms,algorithms
bootstrapping algorithms,bootstrapping algorithms,bootstrapping algorithms

Bootstrapping is a method for deriving robust estimates of standard errors and confidence intervals for estimates such as the mean, median, proportion, odds ratio, correlation coefficient or regression coefficient. It may also be used for constructing hypothesis tests. Bootstrapping is most useful as an alternative to parametric estimates when the assumptions of those methods are in doubt (as in the case of regression models with heteroscedastic residuals fit to small samples), or where parametric inference is impossible or requires very complicated formulas for the calculation of standard errors (as in the case of computing confidence intervals for the median, quartiles, and other percentiles).

Related Topics

Notation (bootstrapping algorithms)
Jackknife Sampling (bootstrapping algorithms)
Case Resampling (bootstrapping algorithms)
Stratified Sampling (bootstrapping algorithms)
Residual Sampling (bootstrapping algorithms)
Wild Bootstrap Sampling (bootstrapping algorithms)
Pooling (bootstrapping algorithms)
Bootstrap Estimates (bootstrapping algorithms)
Percentile-t Pivotal Tests (bootstrapping algorithms)
References (bootstrapping algorithms)


Notation (bootstrapping algorithms)

bootstrapping algorithms,bootstrapping algorithms,bootstrapping algorithms
notation,notation,notation

The following notation is used throughout this chapter unless otherwise stated:

K | Number of distinct records in the dataset.
Xk | The kth distinct record, k=1,..,K.
fk | Frequency weight of the kth record.
N | Number of records, N=ΣKk=1fk.
B | Number of bootstrap samples.
f*bk | Generated frequency weight for the kth record of the bth bootstrap sample.
T | Statistic to bootstrap.
T*b | The bth bootstrap copy of statistic T.
T*(1)≤...≤T*(B) | Ordered bootstrap values.

Related Topics

Bootstrapping Algorithms
Jackknife Sampling (bootstrapping algorithms)
Case Resampling (bootstrapping algorithms)
Stratified Sampling (bootstrapping algorithms)
Residual Sampling (bootstrapping algorithms)
Wild Bootstrap Sampling (bootstrapping algorithms)
Pooling (bootstrapping algorithms)
Bootstrap Estimates (bootstrapping algorithms)
Percentile-t Pivotal Tests (bootstrapping algorithms)
References (bootstrapping algorithms)


Sampling (bootstrapping algorithms)

The following sampling methods are available.

Related Topics

Case Resampling (bootstrapping algorithms)
Jackknife Sampling (bootstrapping algorithms)
Stratified Sampling (bootstrapping algorithms)
Residual Sampling (bootstrapping algorithms)
Wild Bootstrap Sampling (bootstrapping algorithms)


Jackknife Sampling (bootstrapping algorithms)

bootstrapping algorithms,bootstrapping algorithms,bootstrapping algorithms
jackknife sampling,jackknife sampling,jackknife sampling
jackknife sampling,jackknife sampling,jackknife sampling
bootstrapping algorithms,bootstrapping algorithms,bootstrapping algorithms

Jackknife sampling is used in combination with bootstrap sampling to approximate influence functions that are used in computing BCa confidence intervals. The algorithm is performed by leaving out one record at a time, and outputs the following frequency weights:

f1−1 | f1 | ... | f1
f2 | f2−1 | ... | f2
... | ... | ... | ...
fK | fK | ... | fK−1

Related Topics

Bootstrapping Algorithms
Notation (bootstrapping algorithms)
Case Resampling (bootstrapping algorithms)
Stratified Sampling (bootstrapping algorithms)
Residual Sampling (bootstrapping algorithms)
Wild Bootstrap Sampling (bootstrapping algorithms)
Pooling (bootstrapping algorithms)
Bootstrap Estimates (bootstrapping algorithms)
Percentile-t Pivotal Tests (bootstrapping algorithms)
References (bootstrapping algorithms)


Case Resampling (bootstrapping algorithms)

bootstrapping algorithms,bootstrapping algorithms,bootstrapping algorithms
case resampling,case resampling,case resampling
case resampling,case resampling,case resampling
bootstrapping algorithms,bootstrapping algorithms,bootstrapping algorithms

In the context of bootstrapping, case resampling means to randomly sample with replacement from the original dataset. This creates bootstrap samples of equal size to the original dataset. The algorithm is performed iteratively over k=1,..,K and b=1,...,B to generate frequency weights:

f*bk={
rv.binom(N,fkN) | k=1
rv.binom(N−Σk−1i=1f*bi,fkN−Σk−1i=1fi) | otherwise

Related Topics

Bootstrapping Algorithms
Notation (bootstrapping algorithms)
Jackknife Sampling (bootstrapping algorithms)
Stratified Sampling (bootstrapping algorithms)
Residual Sampling (bootstrapping algorithms)
Wild Bootstrap Sampling (bootstrapping algorithms)
Pooling (bootstrapping algorithms)
Bootstrap Estimates (bootstrapping algorithms)
Percentile-t Pivotal Tests (bootstrapping algorithms)
References (bootstrapping algorithms)


Stratified Sampling (bootstrapping algorithms)

bootstrapping algorithms,bootstrapping algorithms,bootstrapping algorithms
stratified sampling,stratified sampling,stratified sampling
stratified sampling,stratified sampling,stratified sampling
bootstrapping algorithms,bootstrapping algorithms,bootstrapping algorithms

When subpopulations vary considerably, it is advantageous to sample each subpopulation (stratum) independently. Stratification is the process of grouping members of the population into relatively homogeneous subgroups before sampling. The strata should be mutually exclusive: every element in the population must be assigned to only one stratum. The strata should also be collectively exhaustive: no population element can be excluded. Then simple case resampling is applied within each stratum to generate frequency weights f*bsks.

Related Topics

Bootstrapping Algorithms
Notation (bootstrapping algorithms)
Jackknife Sampling (bootstrapping algorithms)
Case Resampling (bootstrapping algorithms)
Residual Sampling (bootstrapping algorithms)
Wild Bootstrap Sampling (bootstrapping algorithms)
Pooling (bootstrapping algorithms)
Bootstrap Estimates (bootstrapping algorithms)
Percentile-t Pivotal Tests (bootstrapping algorithms)
References (bootstrapping algorithms)


Residual Sampling (bootstrapping algorithms)

bootstrapping algorithms,bootstrapping algorithms,bootstrapping algorithms
residual sampling,residual sampling,residual sampling
residual sampling,residual sampling,residual sampling
bootstrapping algorithms,bootstrapping algorithms,bootstrapping algorithms

Residual sampling supports bootstrapping of regression models. In this case, the predicted variable for each record will be adjusted with a residual that is randomly sampled in the residual set with replacement. This adjusted variable will be used as the dependent variable in the new bootstrap sample. Residual sampling assumes homoscedastic residuals.

The following notation applies to residual sampling:

(xk,yk)
Data pairs used to build regression models.
^
y
k
Predicted values under the fitted model.
^
ε
k
Residuals,
^
ε
k=yk−
^
y
k
.
(x*i,y*bi)
Data pairs for the bth bootstrap sample.

For i=1,..,N, the algorithm sets:

x*i=xk(i)

where k(i) maps i to k based upon fk; that is, if f1=3 and f2=5, then k(1)=k(3)=1, k(4)=k(8)=2, and so on.

For i=1,..,N and b=1,...,B, the algorithm sets:

y*bi=
^
y
k(i)+
^
ε
× rv.multinomial (f1,...,fK)

where
^
ε
is the 1×k matrix of residuals and rv.multinomial (f1,...,fK) produces a k×1 matrix representing a single draw from a multinomial distribution with relative frequencies f1,...,fK.

Related Topics

Bootstrapping Algorithms
Notation (bootstrapping algorithms)
Jackknife Sampling (bootstrapping algorithms)
Case Resampling (bootstrapping algorithms)
Stratified Sampling (bootstrapping algorithms)
Wild Bootstrap Sampling (bootstrapping algorithms)
Pooling (bootstrapping algorithms)
Bootstrap Estimates (bootstrapping algorithms)
Percentile-t Pivotal Tests (bootstrapping algorithms)
References (bootstrapping algorithms)


Wild Bootstrap Sampling (bootstrapping algorithms)

bootstrapping algorithms,bootstrapping algorithms,bootstrapping algorithms
wild sampling,wild sampling,wild sampling
wild sampling,wild sampling,wild sampling
bootstrapping algorithms,bootstrapping algorithms,bootstrapping algorithms

Wild bootstrap is similar to residual sampling, but the sign of the bootstrap residual for each record is randomly reversed. Wild bootstrap is useful in the presence of heteroscedastic residuals and small sample sizes.

For i=1,..,N, the algorithm sets:

x*i=xk(i)

where k(i) maps i to k based upon fk; that is, if f1=3 and f2=5, then k(1)=k(3)=1, k(4)=k(8)=2, and so on.

For i=1,..,N and b=1,...,B, the algorithm sets:

y*bi=
^
y
k(i)+(1−2 rv.bernoulli (0.5))(
^
ε
× rv.multinomial (f1,...,fK))

where
^
ε
is the 1×k matrix of residuals and rv.multinomial (f1,...,fK) produces a k×1 matrix representing a single draw from a multinomial distribution with relative frequencies f1,...,fK.

Related Topics

Bootstrapping Algorithms
Notation (bootstrapping algorithms)
Jackknife Sampling (bootstrapping algorithms)
Case Resampling (bootstrapping algorithms)
Stratified Sampling (bootstrapping algorithms)
Residual Sampling (bootstrapping algorithms)
Pooling (bootstrapping algorithms)
Bootstrap Estimates (bootstrapping algorithms)
Percentile-t Pivotal Tests (bootstrapping algorithms)
References (bootstrapping algorithms)


Pooling (bootstrapping algorithms)

The following pooling methods are available: bootstrap estimates and percentile-t pivotal tests.

Related Topics

Bootstrapping Algorithms
Notation (bootstrapping algorithms)
Jackknife Sampling (bootstrapping algorithms)
Case Resampling (bootstrapping algorithms)
Stratified Sampling (bootstrapping algorithms)
Residual Sampling (bootstrapping algorithms)
Wild Bootstrap Sampling (bootstrapping algorithms)
Bootstrap Estimates (bootstrapping algorithms)
Percentile-t Pivotal Tests (bootstrapping algorithms)
References (bootstrapping algorithms)


Bootstrap Estimates (bootstrapping algorithms)

bootstrapping algorithms,bootstrapping algorithms,bootstrapping algorithms
bootstrap estimates,bootstrap estimates,bootstrap estimates
bias,bias,bias
bootstrapping algorithms,bootstrapping algorithms,bootstrapping algorithms
percentile confidence interval,percentile confidence interval,percentile confidence interval
bootstrapping algorithms,bootstrapping algorithms,bootstrapping algorithms
BCa confidence interval,BCa confidence interval,BCa confidence interval
bootstrapping algorithms,bootstrapping algorithms,bootstrapping algorithms

Bias

The bias of statistic T can be estimated by the following equation

Bias(T)=B−1BΣb=1T*b−T

Standard error

The standard error of statistic T can be estimated by the standard deviation of the bootstrap values with the following equation

SE≈
√ 1B−1BΣb=1(T*b−B−1BΣb=1T*b)2

Percentile confidence interval

Suppose that T estimates a scalar θ, that we want an interval with left- and right-tail errors both equal to α, and that bootstrap values are ordered as T*(1)≤...≤T*(B). The basic percentile confidence interval is

^
θ
α=T*((B+1)α),
^
θ
1−α=T*((B+1)(1−α))

If (B+1)α is not an integer, then interpolation can be used. A simple method that works well for approximately normal estimators is linear interpolation on the normal quantile scale. For example, suppose the integer part of (B+1)α is k, then we define

T*((B+1)α)=T*(k)+Φ−1(α)−Φ−1(kB+1)Φ−1(k+1B+1)−Φ−1(kB+1)(T*(k+1)−T*(k))

where Φ−1(·) is the inverse normal(0,1) distribution. Similarly, if (B+1)(1−α) is not an integer, the same interpolation can be used by replacing α with 1−α in the equation above. Clearly such interpolations fail if k=0, B or B+1. If this happens, we quote the extreme value and the implied level of error equal to 1/(B+1).

BCa confidence interval

The influence value of the ksth record in the sth stratum is approximated by

ljack,sks=(Ns−1)(T−T−sks)

where T−sks is the estimate calculated from the original data but with the frequency fsks−1 for the ksth record in the sth stratum. It is reasonably to assume the empirical influence values lsks˙=ljack,sks.

Defining
˜
l
sks=lsksN/Ns, the BCa confidence interval is given as

^
θ
α=T*((B+1)
˜
α
),
^
θ
1−α=T*((B+1)(1−
˜
α
))

where

˜
α
=Φ(w+w+zα1−a(w+zα)),
zα=Φ−1(α),
w=Φ−1(|{T*b≤t}|B+1),
a=16Σs,ksfsks
˜
l
3sks(Σs,ksfsks
˜
l
2sks)3/2.

Interpolation will be used as in the Percentile confidence interval.

Related Topics

Bootstrapping Algorithms
Notation (bootstrapping algorithms)
Jackknife Sampling (bootstrapping algorithms)
Case Resampling (bootstrapping algorithms)
Stratified Sampling (bootstrapping algorithms)
Residual Sampling (bootstrapping algorithms)
Wild Bootstrap Sampling (bootstrapping algorithms)
Pooling (bootstrapping algorithms)
Percentile-t Pivotal Tests (bootstrapping algorithms)
References (bootstrapping algorithms)


Percentile-t Pivotal Tests (bootstrapping algorithms)

bootstrapping algorithms,bootstrapping algorithms,bootstrapping algorithms
percentile-t pivotal tests,percentile-t pivotal tests,percentile-t pivotal tests
percentile-t pivotal tests,percentile-t pivotal tests,percentile-t pivotal tests
bootstrapping algorithms,bootstrapping algorithms,bootstrapping algorithms

Suppose the null hypothesis is H0:T=T0.

Scalar T

Let z0=(T−T0)/SE and z*b=(T*b−T)/SE*b, where SE and SE*b are the standard errors of T and T*b, respectively. We estimate the standard error from the standard errors calculated within the procedure.

The alternative hypothesis can be HA:T>T0, HA:T<T0, or HA:T≠T0, which correspond to right-sided, left-sided, and two-sided p-values, respectively. The bootstrap right-sided p-value is calculated as

p=|{z*b≥z0}|+1B+1

The bootstrap left-sided p-value is calculated as

p=|{z*b≤z0}|+1B+1

The bootstrap two-sided p-value is calculated as .

p=|{z*2b≥z20}|+1B+1

Vector T

Let z0=(T−T0)TCov(T)−1(T−T0) and z*b=(T*b−T)TCov(T*b)−1(T*b−T), where Cov(T) and Cov(T*b) are the covariance matrices of T and T*b, respectively. We estimate the covariance matrix from the covariance matrix calculated within the procedure.

The alternative hypothesis is HA:T≠T0, and the bootstrap p-value can be calculated as

p=|{z*b≥z0}|+1B+1

The percentile-t pivotal tests can also support bootstrap testing for the null hypothesis of H0:LT=T0 where L is a matrix of linear combinations. In this case, let z0=(LT−T0)T{LCov(T)LT}−1(LT−T0) and z*b=(LT*b−LT)T{LCov(T*b)LT}−1(LT*b−LT). The alternative hypothesis is HA:LT≠T0, and nd the bootstrap p-value can be calculated as

p=|{z*b≥z0}|+1B+1

Related Topics

Bootstrapping Algorithms
Notation (bootstrapping algorithms)
Jackknife Sampling (bootstrapping algorithms)
Case Resampling (bootstrapping algorithms)
Stratified Sampling (bootstrapping algorithms)
Residual Sampling (bootstrapping algorithms)
Wild Bootstrap Sampling (bootstrapping algorithms)
Pooling (bootstrapping algorithms)
Bootstrap Estimates (bootstrapping algorithms)
References (bootstrapping algorithms)


References (bootstrapping algorithms)

bootstrapping algorithms,bootstrapping algorithms,bootstrapping algorithms
references,references,references

Davison, A. C., and D. V. Hinkley. 2006. Bootstrap Methods and their Application. : Cambridge University Press.

Shao, J., and D. Tu. 1995. The Jackknife and Bootstrap. New York: Springer.

Related Topics

Bootstrapping Algorithms
Notation (bootstrapping algorithms)
Jackknife Sampling (bootstrapping algorithms)
Case Resampling (bootstrapping algorithms)
Stratified Sampling (bootstrapping algorithms)
Residual Sampling (bootstrapping algorithms)
Wild Bootstrap Sampling (bootstrapping algorithms)
Pooling (bootstrapping algorithms)
Bootstrap Estimates (bootstrapping algorithms)
Percentile-t Pivotal Tests (bootstrapping algorithms)


CATPCA Algorithms

CATPCA (command),CATPCA (command),CATPCA (command)
algorithms,algorithms,algorithms
Categorical Principal Components Analysis,Categorical Principal Components Analysis,Categorical Principal Components Analysis
algorithms,algorithms,algorithms
CATPCA algorithms,CATPCA algorithms,CATPCA algorithms

The CATPCA procedure quantifies categorical variables using optimal scaling, resulting in optimal principal components for the transformed variables. The variables can be given mixed optimal scaling levels and no distributional assumptions about the variables are made.

In CATPCA, dimensions correspond to components (that is, an analysis with two dimensions results in two components), and object scores correspond to component scores.

Related Topics

Notation (CATPCA algorithms)
Discretization (CATPCA algorithms)
Imputation of Missing Values (CATPCA algorithms)
Configuration (CATPCA algorithms)
Objective Function (CATPCA algorithms)
Optimal Scaling Levels (CATPCA algorithms)
Objective Function Optimization (CATPCA algorithms)
Supplementary Objects (CATPCA algorithms)
Supplementary Variables (CATPCA algorithms)
Diagnostics (CATPCA algorithms)
References (CATPCA algorithms)


Notation (CATPCA algorithms)

CATPCA algorithms,CATPCA algorithms,CATPCA algorithms
notation,notation,notation

The following notation is used throughout this chapter unless otherwise stated:

n | Number of analysis cases (objects)
nw | Weighted number of analysis cases: nΣi=1wi
ntot | Total number of cases (analysis + supplementary)
wi | Weight of object i; wi=1 if cases are unweighted; wi=0 if object i is supplementary.
W | Diagonal ntot×ntot matrix, with wi on the diagonal.
m | Number of analysis variables
mw | Weighted number of analysis variables (mw=mΣj=1vj)
mtot | Total number of variables (analysis + supplementary)
m1 | Number of analysis variables with multiple nominal scaling level.
m2 | Number of analysis variables with non-multiple scaling level.
mw1 | Weighted number of analysis variables with multiple nominal scaling level.
mw2 | Weighted number of analysis variables with non-multiple scaling level.
J | Index set recording which variables have multiple nominal scaling level.
H | The data matrix (category indicators), of order ntot×mtot, after discretization, imputation of missings , and listwise deletion, if applicable.
p | Number of dimensions

For variable j; j=1, ..., mtot

vj | Variable weight; vj=1 if weight for variable j is not specified or if variable j is supplementary
kj | Number of categories of variable j (number of distinct values in hj, thus, including supplementary objects)
Gj | Indicator matrix for variable j, of order ntot×kj

The elements of Gj are defined as i=1, ..., ntot; r=1, ..., kj

g(j)ir={
1 | when the i th object is in the r th category of variable j
0 | when the i th object is not in the r th category of variable j

Dj | Diagonal kj×kj matrix, containing the weighted univariate marginals; i.e., the weighted column sums of Gj (Dj=G´jWGj)
Mj | Diagonal ntot×ntot matrix, with diagonal elements defined as

m(j)ii={
0 | when the i th observation is missing and missing strategy variable j is passive
0
when the i th object is in r th category of variable j and r th category is only
used by supplementary objects ( i.e. when d(j)rr=0)
vj | otherwise

M* | ΣjMj
Sj | I-spline basis for variable j, of order kj×(sj+tj) (see Ramsay (1988) for details)
bj | Spline coefficient vector, of order sj+tj
dj | Spline intercept.
sj | Degree of polynomial
tj | Number of interior knots

The quantification matrices and parameter vectors are:

X | Object scores, of order ntot×p
Xw | Weighted object scores (Xw=WX)
X n | X normalized according to requested normalization option
Yj | Centroid coordinates, of order kj×p. For variables with optimal scaling level multiple nominal, this are the category quantifications
yj | Category quantifications for variables with non-multiple scaling level, of order kj
aj | Component loadings for variables with non-multiple scaling level, of order p
a n j | aj normalized according to requested normalization option
Y | Collection of category quantifications (centroid coordinates) for variables with multiple nominal scaling level (Yj), and vector coordinates for non-multiple scaling level (yja´j).

Note: The matrices W, Gj, Mj, M*, and Dj are exclusively notational devices; they are stored in reduced form, and the program fully profits from their sparseness by replacing matrix multiplications with selective accumulation.

Related Topics

CATPCA Algorithms
Discretization (CATPCA algorithms)
Imputation of Missing Values (CATPCA algorithms)
Configuration (CATPCA algorithms)
Objective Function (CATPCA algorithms)
Optimal Scaling Levels (CATPCA algorithms)
Objective Function Optimization (CATPCA algorithms)
Supplementary Objects (CATPCA algorithms)
Supplementary Variables (CATPCA algorithms)
Diagnostics (CATPCA algorithms)
References (CATPCA algorithms)


Discretization (CATPCA algorithms)

CATPCA algorithms,CATPCA algorithms,CATPCA algorithms
discretization,discretization,discretization

Discretization is done on the unweighted data.

Multiplying

First, the original variable is standardized. Then the standardized values are multiplied by 10 and rounded, and a value is added such that the lowest value is 1.

Ranking

The original variable is ranked in ascending order, according to the alphanumerical value.

Grouping into a specified number of categories with a normal distribution

First, the original variable is standardized. Then cases are assigned to categories using intervals as defined in Max (1960).

Grouping into a specified number of categories with a uniform distribution

First the target frequency is computed as divided by the number of specified categories, rounded. Then the original categories are assigned to grouped categories such that the frequencies of the grouped categories are as close to the target frequency as possible.

Grouping equal intervals of specified size

First the intervals are defined as lowest value + interval size, lowest value + 2*interval size, etc. Then cases with values in the kth interval are assigned to category k.

Related Topics

CATPCA Algorithms
Notation (CATPCA algorithms)
Imputation of Missing Values (CATPCA algorithms)
Configuration (CATPCA algorithms)
Objective Function (CATPCA algorithms)
Optimal Scaling Levels (CATPCA algorithms)
Objective Function Optimization (CATPCA algorithms)
Supplementary Objects (CATPCA algorithms)
Supplementary Variables (CATPCA algorithms)
Diagnostics (CATPCA algorithms)
References (CATPCA algorithms)


Imputation of Missing Values (CATPCA algorithms)

CATPCA algorithms,CATPCA algorithms,CATPCA algorithms
missing values,missing values,missing values

When there are variables with missing values specified to be treated as active (impute mode or extra category), then first the kj’s for these variables are computed before listwise deletion. Next the category indicator with the highest weighted frequency (mode; the smallest if multiple modes exist), or kj+1 (extra category) is imputed. Then listwise deletion is applied if applicable. And then the kj’s are adjusted.

If an extra category is imputed for a variable with optimal scaling level Spline Nominal, Spline Ordinal, Ordinal or Numerical, the extra category is not included in the restriction according to the scaling level in the final phase.

See the topic Objective Function Optimization (CATPCA algorithms) for more information.

Related Topics

CATPCA Algorithms
Notation (CATPCA algorithms)
Discretization (CATPCA algorithms)
Configuration (CATPCA algorithms)
Objective Function (CATPCA algorithms)
Optimal Scaling Levels (CATPCA algorithms)
Objective Function Optimization (CATPCA algorithms)
Supplementary Objects (CATPCA algorithms)
Supplementary Variables (CATPCA algorithms)
Diagnostics (CATPCA algorithms)
References (CATPCA algorithms)


Configuration (CATPCA algorithms)

CATPCA algorithms,CATPCA algorithms,CATPCA algorithms
initial configuration,initial configuration,initial configuration

CATPCA can read a configuration from a file, to be used as the initial configuration or as a fixed configuration in which to fit variables.

For an initial configuration see step 1 in Objective Function Optimization (CATPCA algorithms)

A fixed configuration X is centered and orthonormalized as described in the optimization section in step 3 (with X instead of Z) and step 4 (except for the factor n1/2w), and the result is postmultiplied with Λ1/2 (this leaves the configuration unchanged if it is already centered and orthogonal). The analysis variables are set to supplementary and variable weights are set to one. Then CATPCA proceeds as described in Supplementary Variables (CATPCA algorithms).

Related Topics

CATPCA Algorithms
Notation (CATPCA algorithms)
Discretization (CATPCA algorithms)
Imputation of Missing Values (CATPCA algorithms)
Objective Function (CATPCA algorithms)
Optimal Scaling Levels (CATPCA algorithms)
Objective Function Optimization (CATPCA algorithms)
Supplementary Objects (CATPCA algorithms)
Supplementary Variables (CATPCA algorithms)
Diagnostics (CATPCA algorithms)
References (CATPCA algorithms)


Objective Function (CATPCA algorithms)

CATPCA algorithms,CATPCA algorithms,CATPCA algorithms
objective function,objective function,objective function

The CATPCA objective is to find object scores X and a set of Yj (for j=1,...,m) — the underlining indicates that they may be restricted in various ways — so that the function

σ(X;Y)=n−1w
Σ
j
c−1 tr ((X−GjYj)´MjW(X−GjYj))

where c is p if jJ and c is 1 if jJ,

is minimal, under the normalization restriction X´M*WX=nwmwI (I is the p×p identity matrix). The inclusion of Mj in σ(X;Y) ensures that there is no influence of passive missing values (missing values in variables that have missing option passive, or missing option not specified). M* contains the number of active data values for each object. The object scores are also centered; that is, they satisfy u´M*WX=0 with u denoting an n-vector with ones.

Related Topics

CATPCA Algorithms
Notation (CATPCA algorithms)
Discretization (CATPCA algorithms)
Imputation of Missing Values (CATPCA algorithms)
Configuration (CATPCA algorithms)
Optimal Scaling Levels (CATPCA algorithms)
Objective Function Optimization (CATPCA algorithms)
Supplementary Objects (CATPCA algorithms)
Supplementary Variables (CATPCA algorithms)
Diagnostics (CATPCA algorithms)
References (CATPCA algorithms)


Optimal Scaling Levels (CATPCA algorithms)

CATPCA algorithms,CATPCA algorithms,CATPCA algorithms
optimal scaling levels,optimal scaling levels,optimal scaling levels

The following optimal scaling levels are distinguished in CATPCA:

Multiple Nominal.Yj=Yj (equality restriction only).

Nominal.Yj=yja´j (equality and rank – one restrictions).

Spline Nominal.Yj=yja´jand yj= dj+Sjbj (equality, rank – one, and spline restrictions).

Spline Ordinal. Yj=yja´jand yj= dj+Sjbj (equality, rank – one, and monotonic spline restrictions), with bj restricted to contain nonnegative elements (to guarantee monotonic I-splines).

Ordinal.Yj=yja´j and yjCj (equality, rank – one, and monotonicity restrictions). The monotonicity restriction yjCj means that yj must be located in the convex cone of all kj-vectors with nondecreasing elements.

Numerical.Yj=yja´j and yjLj (equality, rank – one, and linearity restrictions). The linearity restriction yjLj means that yj must be located in the subspace of all kj-vectors that are a linear transformation of the vector consisting of kj successive integers.

For each variable, these levels can be chosen independently. The general requirement for all options is that equal category indicators receive equal quantifications. The general requirement for the non-multiple options is Yj=yja´j; that is, Yj is of rank one; for identification purposes, yj is always normalized so that y´jDjyj=nw.

Related Topics

CATPCA Algorithms
Notation (CATPCA algorithms)
Discretization (CATPCA algorithms)
Imputation of Missing Values (CATPCA algorithms)
Configuration (CATPCA algorithms)
Objective Function (CATPCA algorithms)
Objective Function Optimization (CATPCA algorithms)
Supplementary Objects (CATPCA algorithms)
Supplementary Variables (CATPCA algorithms)
Diagnostics (CATPCA algorithms)
References (CATPCA algorithms)


Objective Function Optimization (CATPCA algorithms)

Optimization is achieved by executing the following iteration scheme:

1. Initialization I or II

2. Update category quantifications

3. Update object scores

4. Orthonormalization

5. Convergence test: repeat (2) through (4) or continue

6. Rotation and reflection

The first time (for the initial configuration) initialization I is used and variables that do not have optimal scaling level Multiple Nominal or Numerical are temporarily treated as numerical, the second time (for the final configuration) initialization II is used. Steps (1) through (6) are explained below.

Initialization

I. If an initial configuration is not specified, the object scores X are initialized with random numbers. Then X is orthonormalized (see step 4) so that u´M*WX=0 and X´M*WX=nwmwI, yielding X+w. The initial component loadings are computed as the cross products of X+w and the centered original variables (I−Mjuu´W/(u´MjWu))hj, rescaled to unit length.

II. All relevant quantities are copied from the results of the first cycle.

Update category quantifications; loop across analysis variables

With fixed current values X+w the unconstrained update of Yj is

˜
Y
j=D−1jG´jX+w

Multiple nominal: Y+j=
˜
Y
j.

For non-multiple scaling levels first an unconstrained update is computed in the same way:

˜
Y
j=D−1jG´jX+w

next one cycle of an ALS algorithm (De Leeuw et al., 1976) is executed for computing a rank-one decomposition of
˜
Y
j, with restrictions on the left-hand vector, resulting in

˜
y
j=
˜
Y
jaj

Nominal: y*j=
˜
y
j.

For the next four optimal scaling levels, if variable j was imputed with an extra category, y*j is inclusive category kj in the initial phase, and is exclusive category kj in the final phase.

Spline nominal and spline ordinal: y*j= dj+Sjbj.

The spline transformation is computed as a weighted regression (with weights the diagonal elements of Dj) of
˜
y
j on the I-spline basis Sj. For the spline ordinal scaling level the elements of bj are restricted to be nonnegative, which makes y*j monotonically increasing

Ordinal: y*j← WMON(
˜
y
j) .

The notation WMON( ) is used to denote the weighted monotonic regression process, which makes y*j monotonically increasing. The weights used are the diagonal elements of Dj and the subalgorithm used is the up-and-down-blocks minimum violators algorithm (Kruskal, 1964; Barlow et al., 1972).

Numerical: y*j← WLIN(
˜
y
j).

The notation WLIN( ) is used to denote the weighted linear regression process. The weights used are the diagonal elements of Dj.

Next y*j is normalized (if variable j was imputed with an extra category, y*j is inclusive category kj from here on):

y+j=n1/2wy*j(y´*jDjy*j)−1/2

Then we update the component loadings:

a+j=n−1w
˜
Y
´Djy+j

Finally, we set Y+j=y+ja´+j.

Update object scores

First the auxiliary score matrix Z is computed as

Z←ΣjMjGjY+j

and centered with respect to W and M*:

X*=(I−M*uu´W/(u´M*Wu))Z

These two steps yield locally the best updates when there would be no orthogonality constraints.

Orthonormalization

To find an M*-orthonormal X+ that is closest to X* in the least squares sense, we use for the Procrustes rotation (Cliff, 1966) the singular value decomposition m1/2wM−1/2*W1/2X*=KΛ1/2L´, then yields n1/2wm1/2wM−1/2*W1/2KL´-orthonormal weighted object scores: X+w←n1/2wmwM−1*WX*LΛ−1/2L´, and X+=W−1X+w. The calculation of L and Λ is based on tridiagonalization with Householder transformations followed by the implicit QL algorithm (Wilkinson, 1965).

Convergence test

The difference between consecutive values of the quantity

TFIT = (pnw)−1
Σ
jJ
vj tr (Y´jDjYj)+
Σ
jJ
vja´jaj

is compared with the user-specified convergence criterion ε - a small positive number. It can be shown that TFIT = mw1+pmw2−σ(X;Y). Steps (2) through (4) are repeated as long as the loss difference exceeds ε.

After convergence TFIT is also equal to tr (Λ1/2), with Λ as computed in the Orthonormalization step during the last iteration. (See also Model Summary (CATPCA algorithms) and variable correlations Correlations and Eigenvalues (CATPCA algorithms) for interpretation of Λ1/2).

Rotation and reflection

To achieve principal axes orientation, X+ is rotated with the matrix L. In addition the sth column of X+ is reflected if for dimension s the mean of squared loadings with a negative sign is higher than the mean of squared loadings with a positive sign. Then step (2) is executed, yielding the rotated and possibly reflected quantifications and loadings.

Related Topics

CATPCA Algorithms
Notation (CATPCA algorithms)
Discretization (CATPCA algorithms)
Imputation of Missing Values (CATPCA algorithms)
Configuration (CATPCA algorithms)
Objective Function (CATPCA algorithms)
Optimal Scaling Levels (CATPCA algorithms)
Supplementary Objects (CATPCA algorithms)
Supplementary Variables (CATPCA algorithms)
Diagnostics (CATPCA algorithms)
References (CATPCA algorithms)


Supplementary Objects (CATPCA algorithms)

CATPCA algorithms,CATPCA algorithms,CATPCA algorithms
supplementary objects,supplementary objects,supplementary objects

To compute the object scores for supplementary objects, after convergence the category quantifications and object scores are again updated (following the steps in Objective Function Optimization (CATPCA algorithms)), with the zero's in W temporarily set to ones in computing Z and X+. If a supplementary object has missing values, passive treatment is applied.

Related Topics

CATPCA Algorithms
Notation (CATPCA algorithms)
Discretization (CATPCA algorithms)
Imputation of Missing Values (CATPCA algorithms)
Configuration (CATPCA algorithms)
Objective Function (CATPCA algorithms)
Optimal Scaling Levels (CATPCA algorithms)
Objective Function Optimization (CATPCA algorithms)
Supplementary Variables (CATPCA algorithms)
Diagnostics (CATPCA algorithms)
References (CATPCA algorithms)


Supplementary Variables (CATPCA algorithms)

CATPCA algorithms,CATPCA algorithms,CATPCA algorithms
supplementary variables,supplementary variables,supplementary variables

The quantifications for supplementary variables are computed after convergence. For supplementary variables with multiple nominal scaling level, the Update Category Quantification step is executed once. For non-multiple supplementary variables, an initial aj is computed as in the Initialization step. Then the rank-one and restriction substeps of the Update Category Quantification step are repeated as long as the difference between consecutive values of a´jaj exceeds .00001, with a maximum of 100 iterations. See the topic Objective Function Optimization (CATPCA algorithms) for more information.

Related Topics

CATPCA Algorithms
Notation (CATPCA algorithms)
Discretization (CATPCA algorithms)
Imputation of Missing Values (CATPCA algorithms)
Configuration (CATPCA algorithms)
Objective Function (CATPCA algorithms)
Optimal Scaling Levels (CATPCA algorithms)
Objective Function Optimization (CATPCA algorithms)
Supplementary Objects (CATPCA algorithms)
Diagnostics (CATPCA algorithms)
References (CATPCA algorithms)


Diagnostics (CATPCA algorithms)

CATPCA algorithms,CATPCA algorithms,CATPCA algorithms
diagnostics,diagnostics,diagnostics

The procedure produces the following diagnostics.

Related Topics

CATPCA Algorithms
Notation (CATPCA algorithms)
Discretization (CATPCA algorithms)
Imputation of Missing Values (CATPCA algorithms)
Configuration (CATPCA algorithms)
Objective Function (CATPCA algorithms)
Optimal Scaling Levels (CATPCA algorithms)
Objective Function Optimization (CATPCA algorithms)
Supplementary Objects (CATPCA algorithms)
Supplementary Variables (CATPCA algorithms)
References (CATPCA algorithms)
Maximum Rank (may be issued as a warning when exceeded) (CATPCA algorithms)
Descriptives (CATPCA algorithms)
Fit and Loss Measures (CATPCA algorithms)
Model Summary (CATPCA algorithms)
Cronbach's Alpha (CATPCA algorithms)
Variance Accounted For (CATPCA algorithms)
Variance Accounted For (CATPCA algorithms)
Centroid Coordinates (CATPCA algorithms)
Vector Coordinates (CATPCA algorithms)
Correlations and Eigenvalues (CATPCA algorithms)
Object Scores and Loadings (CATPCA algorithms)
Quantifications (CATPCA algorithms)
Residuals (CATPCA algorithms)
Projected Centroids (CATPCA algorithms)
Scaling factor Biplot, triplot, and loading plot (CATPCA algorithms)


Maximum Rank (may be issued as a warning when exceeded) (CATPCA algorithms)

maximum rank,maximum rank,maximum rank
CATPCA algorithms,CATPCA algorithms,CATPCA algorithms

The maximum rank pmax indicates the maximum number of dimensions that can be computed for any dataset. In general

pmax=min(n−1,(
Σ
jcJ
kj)−m1−m2)

if there are variables with optimal scaling level multiple nominal without missing values to be treated as passive. If variables with optimal scaling level multiple nominal do have missing values to be treated as passive, the maximum rank is

pmax=min(n−1,(
Σ
jcJ
kj)−max(m3,1)−m2)

with m3 the number of variables with optimal scaling level multiple nominal without missing values to be treated as passive.

Here kj is exclusive supplementary objects (that is, a category only used by supplementary objects is not counted in computing the maximum rank). Although the number of nontrivial dimensions may be less than pmax when m=2, CATPCA does allow dimensionalities all the way up to pmax. When, due to empty categories in the actual data, the rank deteriorates below the specified dimensionality, the program stops.

Related Topics

Diagnostics (CATPCA algorithms)
Descriptives (CATPCA algorithms)
Fit and Loss Measures (CATPCA algorithms)
Model Summary (CATPCA algorithms)
Cronbach's Alpha (CATPCA algorithms)
Variance Accounted For (CATPCA algorithms)
Variance Accounted For (CATPCA algorithms)
Centroid Coordinates (CATPCA algorithms)
Vector Coordinates (CATPCA algorithms)
Correlations and Eigenvalues (CATPCA algorithms)
Object Scores and Loadings (CATPCA algorithms)
Quantifications (CATPCA algorithms)
Residuals (CATPCA algorithms)
Projected Centroids (CATPCA algorithms)
Scaling factor Biplot, triplot, and loading plot (CATPCA algorithms)


Descriptives (CATPCA algorithms)

The descriptives tables gives the weighted univariate marginals and the weighted number of missing values (system missing, user defined missing, and values less than or equal to 0) for each variable.

Related Topics

Diagnostics (CATPCA algorithms)
Maximum Rank (may be issued as a warning when exceeded) (CATPCA algorithms)
Fit and Loss Measures (CATPCA algorithms)
Model Summary (CATPCA algorithms)
Cronbach's Alpha (CATPCA algorithms)
Variance Accounted For (CATPCA algorithms)
Variance Accounted For (CATPCA algorithms)
Centroid Coordinates (CATPCA algorithms)
Vector Coordinates (CATPCA algorithms)
Correlations and Eigenvalues (CATPCA algorithms)
Object Scores and Loadings (CATPCA algorithms)
Quantifications (CATPCA algorithms)
Residuals (CATPCA algorithms)
Projected Centroids (CATPCA algorithms)
Scaling factor Biplot, triplot, and loading plot (CATPCA algorithms)


Fit and Loss Measures (CATPCA algorithms)

loss measures,loss measures,loss measures
CATPCA algorithms,CATPCA algorithms,CATPCA algorithms
fit measures,fit measures,fit measures
CATPCA algorithms,CATPCA algorithms,CATPCA algorithms

When the HISTORY option is in effect, the following fit and loss measures are reported:

Total fit (VAF). This is the quantity TFIT as defined in the Convergence Test step.

Total loss. This is σ(X;Y), computed as the sum of multiple loss and single loss defined below.

Multiple loss. This measure is computed as

TMLOSS =(mw1+pmw2)−((nwp)−1
Σ
jJ
vj tr (Y´jDjYj)+n−1w
Σ
jJ
vj tr (Y´jDjYj))

Single loss. This measure is computed only when some of the variables are single:

SLOSS =n−1w
Σ
jJ
vj tr (Y´jDjYj)−
Σ
jJ
vja´jaj

Related Topics

Diagnostics (CATPCA algorithms)
Maximum Rank (may be issued as a warning when exceeded) (CATPCA algorithms)
Descriptives (CATPCA algorithms)
Model Summary (CATPCA algorithms)
Cronbach's Alpha (CATPCA algorithms)
Variance Accounted For (CATPCA algorithms)
Variance Accounted For (CATPCA algorithms)
Centroid Coordinates (CATPCA algorithms)
Vector Coordinates (CATPCA algorithms)
Correlations and Eigenvalues (CATPCA algorithms)
Object Scores and Loadings (CATPCA algorithms)
Quantifications (CATPCA algorithms)
Residuals (CATPCA algorithms)
Projected Centroids (CATPCA algorithms)
Scaling factor Biplot, triplot, and loading plot (CATPCA algorithms)


Model Summary (CATPCA algorithms)

Model summary information consists of Cronbach's alpha and the variance accounted for.

Related Topics

Diagnostics (CATPCA algorithms)
Maximum Rank (may be issued as a warning when exceeded) (CATPCA algorithms)
Descriptives (CATPCA algorithms)
Fit and Loss Measures (CATPCA algorithms)
Cronbach's Alpha (CATPCA algorithms)
Variance Accounted For (CATPCA algorithms)
Variance Accounted For (CATPCA algorithms)
Centroid Coordinates (CATPCA algorithms)
Vector Coordinates (CATPCA algorithms)
Correlations and Eigenvalues (CATPCA algorithms)
Object Scores and Loadings (CATPCA algorithms)
Quantifications (CATPCA algorithms)
Residuals (CATPCA algorithms)
Projected Centroids (CATPCA algorithms)
Scaling factor Biplot, triplot, and loading plot (CATPCA algorithms)


Cronbach's Alpha (CATPCA algorithms)

Cronbach's alpha,Cronbach's alpha,Cronbach's alpha
CATPCA algorithms,CATPCA algorithms,CATPCA algorithms

Cronbach's Alpha per dimension (s=1,...,p):

αs=mw(λ1/2s−1)/(λ1/2s(mw−1))

Total Cronbach's Alpha is

α=mw(Σsλ1/2s−1)/Σsλ1/2s(mw−1)

with λs the sth diagonal element of Λ as computed in the Orthonormalization step during the last iteration.

Related Topics

Diagnostics (CATPCA algorithms)
Maximum Rank (may be issued as a warning when exceeded) (CATPCA algorithms)
Descriptives (CATPCA algorithms)
Fit and Loss Measures (CATPCA algorithms)
Model Summary (CATPCA algorithms)
Variance Accounted For (CATPCA algorithms)
Variance Accounted For (CATPCA algorithms)
Centroid Coordinates (CATPCA algorithms)
Vector Coordinates (CATPCA algorithms)
Correlations and Eigenvalues (CATPCA algorithms)
Object Scores and Loadings (CATPCA algorithms)
Quantifications (CATPCA algorithms)
Residuals (CATPCA algorithms)
Projected Centroids (CATPCA algorithms)
Scaling factor Biplot, triplot, and loading plot (CATPCA algorithms)


Variance Accounted For (CATPCA algorithms)

variance accounted for,variance accounted for,variance accounted for
CATPCA algorithms,CATPCA algorithms,CATPCA algorithms

Variance Accounted For per dimension (s=1,...,p):

Multiple Nominal variables:

VAF1 s=n−1w
Σ
jJ
vj tr (y´(j)sDjy(j)s), (% of variance is VAF1 s×100/mw1),

Non-Multiple variables:

VAF2 s=
Σ
jJ
vja2js, (% of variance is VAF2 s×100/mw2).

Eigenvalue per dimension:

λ1/2s =VAF1 s +VAF2 s,

with λs the sth diagonal element of Λ as computed in the Orthonormalization step during the last iteration. (See also the Convergence Test step and variable correlations Correlations and Eigenvalues (CATPCA algorithms) for interpretation of Λ1/2).

The Total Variance Accounted For for multiple nominal variables is the mean over dimensions, and for non-multiple variables the sum over dimensions. So, the total eigenvalue is

tr (Λ1/2) = p−1Σs VAF1 s + Σ s VAF2 s.

If there are no passive missing values, the eigenvalues Λ1/2 are those of the correlation matrix (see Correlations and Eigenvalues (CATPCA algorithms)) weighted with variable weights:

r w jj=vjrjj, and r w jl=r w lj=v1/2jrjl

If there are passive missing values, then the eigenvalues are those of the matrix mwQ´ c M−1*Q c , with Q c =n−1/2w(I−M*uu´W/(u´M*Wu))Q, (see Correlations and Eigenvalues (CATPCA algorithms)) which is not necessarily a correlation matrix, although it is positive semi-definite. This matrix is weighted with variable weights in the same way as R.

Related Topics

Diagnostics (CATPCA algorithms)
Maximum Rank (may be issued as a warning when exceeded) (CATPCA algorithms)
Descriptives (CATPCA algorithms)
Fit and Loss Measures (CATPCA algorithms)
Model Summary (CATPCA algorithms)
Cronbach's Alpha (CATPCA algorithms)
Variance Accounted For (CATPCA algorithms)
Centroid Coordinates (CATPCA algorithms)
Vector Coordinates (CATPCA algorithms)
Correlations and Eigenvalues (CATPCA algorithms)
Object Scores and Loadings (CATPCA algorithms)
Quantifications (CATPCA algorithms)
Residuals (CATPCA algorithms)
Projected Centroids (CATPCA algorithms)
Scaling factor Biplot, triplot, and loading plot (CATPCA algorithms)


Variance Accounted For (CATPCA algorithms)

variance accounted for,variance accounted for,variance accounted for
CATPCA algorithms,CATPCA algorithms,CATPCA algorithms

The Variance Accounted For table gives the VAF per dimension and per variable for centroid coordinates, and for non-multiple variables also for vector coordinates (see Quantifications (CATPCA algorithms)).

Related Topics

Diagnostics (CATPCA algorithms)
Maximum Rank (may be issued as a warning when exceeded) (CATPCA algorithms)
Descriptives (CATPCA algorithms)
Fit and Loss Measures (CATPCA algorithms)
Model Summary (CATPCA algorithms)
Cronbach's Alpha (CATPCA algorithms)
Variance Accounted For (CATPCA algorithms)
Centroid Coordinates (CATPCA algorithms)
Vector Coordinates (CATPCA algorithms)
Correlations and Eigenvalues (CATPCA algorithms)
Object Scores and Loadings (CATPCA algorithms)
Quantifications (CATPCA algorithms)
Residuals (CATPCA algorithms)
Projected Centroids (CATPCA algorithms)
Scaling factor Biplot, triplot, and loading plot (CATPCA algorithms)


Centroid Coordinates (CATPCA algorithms)

VAF js=vj tr (Y´jsDjYjs)

Related Topics

Diagnostics (CATPCA algorithms)
Maximum Rank (may be issued as a warning when exceeded) (CATPCA algorithms)
Descriptives (CATPCA algorithms)
Fit and Loss Measures (CATPCA algorithms)
Model Summary (CATPCA algorithms)
Cronbach's Alpha (CATPCA algorithms)
Variance Accounted For (CATPCA algorithms)
Variance Accounted For (CATPCA algorithms)
Vector Coordinates (CATPCA algorithms)
Correlations and Eigenvalues (CATPCA algorithms)
Object Scores and Loadings (CATPCA algorithms)
Quantifications (CATPCA algorithms)
Residuals (CATPCA algorithms)
Projected Centroids (CATPCA algorithms)
Scaling factor Biplot, triplot, and loading plot (CATPCA algorithms)


Vector Coordinates (CATPCA algorithms)

VAF js=vja2js, for jJ

Related Topics

Diagnostics (CATPCA algorithms)
Maximum Rank (may be issued as a warning when exceeded) (CATPCA algorithms)
Descriptives (CATPCA algorithms)
Fit and Loss Measures (CATPCA algorithms)
Model Summary (CATPCA algorithms)
Cronbach's Alpha (CATPCA algorithms)
Variance Accounted For (CATPCA algorithms)
Variance Accounted For (CATPCA algorithms)
Centroid Coordinates (CATPCA algorithms)
Correlations and Eigenvalues (CATPCA algorithms)
Object Scores and Loadings (CATPCA algorithms)
Quantifications (CATPCA algorithms)
Residuals (CATPCA algorithms)
Projected Centroids (CATPCA algorithms)
Scaling factor Biplot, triplot, and loading plot (CATPCA algorithms)


Correlations and Eigenvalues (CATPCA algorithms)

eigenvalues,eigenvalues,eigenvalues
CATPCA algorithms,CATPCA algorithms,CATPCA algorithms

Before Transformation

R=n−1wH´ c WH c , with H c weighted centered and normalized H. For the eigenvalue decomposition of R (to compute the eigenvalues), first row j and column j are removed from R if j is a supplementary variable, and then rij is multiplied by (vivj)1/2.

If passive missing treatment is applicable for a variable, missing values are imputed with the variable mode, regardless of the passive imputation specification.

After Transformation

When all analysis variables are non-multiple, and there are no missing values, specified to be treated as passive, the correlation matrix is:

R=n−1wQ´WQ, with qj=Gjyj.

The first p eigenvalues of R equal Λ1/2. (See also the Convergence Test step and Model Summary (CATPCA algorithms) for interpretation of Λ1/2). When there are multiple nominal variables in the analysis, p correlation matrices are computed (s=1,...,p):

R(s)=n−1wQ´(s)WQ(s),

with q(s)j=Gjyj for non-multiple variables and q(s)j=n1/2wGjY(j)s(Y´(j)sDjY(j)s)−1/2 for multiple nominal variables.

Usually, for the higher eigenvalues, the first eigenvalue of R(s) is equal to λ1/2s(see Model Summary (CATPCA algorithms)). The lower values of Λ1/2 are in most cases the second or subsequent eigenvalues of R(s).

If there are missing values, specified to be treated as passive, the mode of the quantified variable or the quantification of an extra category (as specified in syntax; if not specified, default (mode) is used) is imputed before computing correlations. Then the eigenvalues of the correlation matrix do not equal Λ1/2 (see Model Summary section). The quantification of an extra category for multiple nominal variables is computed as

Y(j)(kj+1)s=(
Σ
icI
wi)−1
Σ
icI
wixis,

with I an index set recording which objects have missing values.

For the quantification of an extra category for non-multiple variables first Y(j)(kj+1)s is computed as above, and then

y(kj+1)j=n1/2w(
Σ
s
a2js)−1
Σ
s
ajsY(j)kj+1)s.

For the eigenvalue decomposition of R (to compute the eigenvalues), first row j and column j are removed from R if j is a supplementary variable, and then rij is multiplied by (vivj)1/2.

Related Topics

Diagnostics (CATPCA algorithms)
Maximum Rank (may be issued as a warning when exceeded) (CATPCA algorithms)
Descriptives (CATPCA algorithms)
Fit and Loss Measures (CATPCA algorithms)
Model Summary (CATPCA algorithms)
Cronbach's Alpha (CATPCA algorithms)
Variance Accounted For (CATPCA algorithms)
Variance Accounted For (CATPCA algorithms)
Centroid Coordinates (CATPCA algorithms)
Vector Coordinates (CATPCA algorithms)
Object Scores and Loadings (CATPCA algorithms)
Quantifications (CATPCA algorithms)
Residuals (CATPCA algorithms)
Projected Centroids (CATPCA algorithms)
Scaling factor Biplot, triplot, and loading plot (CATPCA algorithms)


Object Scores and Loadings (CATPCA algorithms)

objects scores,objects scores,objects scores
CATPCA algorithms,CATPCA algorithms,CATPCA algorithms
loadings,loadings,loadings
CATPCA algorithms,CATPCA algorithms,CATPCA algorithms

If all variables have non-multiple scaling level, normalization partitions the first p singular values of n−1/2wW1/2QV1/2 divided by mw over the objects scores X and the loadings A, with Q the matrix of quantified variables (see Correlations and Eigenvalues (CATPCA algorithms)), and V a diagonal matrix with elements vj. The singular value decomposition of n−1/2wW1/2QV1/2 is

SVD (n−1/2wW1/2QV1/2)=KΦ1/2L´.

With X=Kp (the subscript p denoting the first p columns of K) and A=(LΦ1/2)p, XA´ gives the best p-dimensional approximation of n−1/2wW1/2QV1/2.

The first p singular values Φ1/2p equal Λ1/4, with Λ as computed in the Orthonormalization step during the last iteration. (See also the Convergence Test step and Model Summary (CATPCA algorithms) for interpretation of Λ1/2).

For partitioning the first p singular values we write

(KΦ1/2L´)p=KpΦa/2pΦb/2pL´p=KpΛa/4Λb/4L´p, (a+b=1, see below).

During the optimization phase, variable principal normalization is used. Then, after convergence X=n1/2wW−1/2Kp and A=V−1/2LpΛ1/4.

If variable principal normalization is requested, X n =X and A n =A, else X n =XΛa/4 and A n =AΛ1/4(b−1) with a=(1+q)/2, b=(1−q)/2, and q any real value in the closed interval [-1,1], except for independent normalization: then there is no q value and a=b=1. q=−1 is equal to variable principal normalization, q=1 is equal to object principal normalization, q=0 is equal to symmetrical normalization.

When there are multiple nominal variables in the analysis, there are p matrices Q(s), s=1,...p, (see Correlations and Eigenvalues (CATPCA algorithms)). Then one of the singular values of n−1/2wW1/2Q(s)V1/2 equals Λ1/4s.

If a variable has multiple nominal scaling level, the normalization factor is reflected in the centroids: Y n j=YjΛ1/4(b−1).

Related Topics

Diagnostics (CATPCA algorithms)
Maximum Rank (may be issued as a warning when exceeded) (CATPCA algorithms)
Descriptives (CATPCA algorithms)
Fit and Loss Measures (CATPCA algorithms)
Model Summary (CATPCA algorithms)
Cronbach's Alpha (CATPCA algorithms)
Variance Accounted For (CATPCA algorithms)
Variance Accounted For (CATPCA algorithms)
Centroid Coordinates (CATPCA algorithms)
Vector Coordinates (CATPCA algorithms)
Correlations and Eigenvalues (CATPCA algorithms)
Quantifications (CATPCA algorithms)
Residuals (CATPCA algorithms)
Projected Centroids (CATPCA algorithms)
Scaling factor Biplot, triplot, and loading plot (CATPCA algorithms)


Quantifications (CATPCA algorithms)

quantifications,quantifications,quantifications
CATPCA algorithms,CATPCA algorithms,CATPCA algorithms

For variables with non-multiple scaling level the quantifications yj are displayed, the vector coordinates yj(a n j)´, and the centroid coordinates: Yj with variable principal normalization, D−1jG´jWX n with one of the other normalization options. For multiple nominal variables the quantifications are the centroid coordinates Y n j.

If a category is only used by supplementary objects (i.e. treated as a passive missing), only centroid coordinates are displayed for this category, computed as y(j)r=n1/2wn−1jr
Σ
iI
x n i for variables with non-multiple scaling level and y(j)r=n1/2wn−1jr
Σ
iI
xiΛ1/4(b−1) for variables with multiple nominal scaling level, where y(j)r is the rth row of Yj, njr is the number of objects that have category r, and I is an index set recording which objects are in category r.

Related Topics

Diagnostics (CATPCA algorithms)
Maximum Rank (may be issued as a warning when exceeded) (CATPCA algorithms)
Descriptives (CATPCA algorithms)
Fit and Loss Measures (CATPCA algorithms)
Model Summary (CATPCA algorithms)
Cronbach's Alpha (CATPCA algorithms)
Variance Accounted For (CATPCA algorithms)
Variance Accounted For (CATPCA algorithms)
Centroid Coordinates (CATPCA algorithms)
Vector Coordinates (CATPCA algorithms)
Correlations and Eigenvalues (CATPCA algorithms)
Object Scores and Loadings (CATPCA algorithms)
Residuals (CATPCA algorithms)
Projected Centroids (CATPCA algorithms)
Scaling factor Biplot, triplot, and loading plot (CATPCA algorithms)


Residuals (CATPCA algorithms)

residuals,residuals,residuals
CATPCA algorithms,CATPCA algorithms,CATPCA algorithms

For non-multiple variables, Residuals gives a plot of the quantified variable j (Gjyj) against the approximation, Xaj. For multiple nominal variables plots per dimension are produced of Gjy n (j)s against the approximation x n s.

Related Topics

Diagnostics (CATPCA algorithms)
Maximum Rank (may be issued as a warning when exceeded) (CATPCA algorithms)
Descriptives (CATPCA algorithms)
Fit and Loss Measures (CATPCA algorithms)
Model Summary (CATPCA algorithms)
Cronbach's Alpha (CATPCA algorithms)
Variance Accounted For (CATPCA algorithms)
Variance Accounted For (CATPCA algorithms)
Centroid Coordinates (CATPCA algorithms)
Vector Coordinates (CATPCA algorithms)
Correlations and Eigenvalues (CATPCA algorithms)
Object Scores and Loadings (CATPCA algorithms)
Quantifications (CATPCA algorithms)
Projected Centroids (CATPCA algorithms)
Scaling factor Biplot, triplot, and loading plot (CATPCA algorithms)


Projected Centroids (CATPCA algorithms)

projected centroids,projected centroids,projected centroids
CATPCA algorithms,CATPCA algorithms,CATPCA algorithms

The projected centroids of variable l on variable j, jJ, are

Ylaj(a´jaj)−1/2

Related Topics

Diagnostics (CATPCA algorithms)
Maximum Rank (may be issued as a warning when exceeded) (CATPCA algorithms)
Descriptives (CATPCA algorithms)
Fit and Loss Measures (CATPCA algorithms)
Model Summary (CATPCA algorithms)
Cronbach's Alpha (CATPCA algorithms)
Variance Accounted For (CATPCA algorithms)
Variance Accounted For (CATPCA algorithms)
Centroid Coordinates (CATPCA algorithms)
Vector Coordinates (CATPCA algorithms)
Correlations and Eigenvalues (CATPCA algorithms)
Object Scores and Loadings (CATPCA algorithms)
Quantifications (CATPCA algorithms)
Residuals (CATPCA algorithms)
Scaling factor Biplot, triplot, and loading plot (CATPCA algorithms)


Scaling factor Biplot, triplot, and loading plot (CATPCA algorithms)

triplots,triplots,triplots
CATPCA algorithms,CATPCA algorithms,CATPCA algorithms
biplots,biplots,biplots
CATPCA algorithms,CATPCA algorithms,CATPCA algorithms
loading plots,loading plots,loading plots
CATPCA algorithms,CATPCA algorithms,CATPCA algorithms

In plots including both the object scores or centroids and loadings (loading plot including centroids, biplot with objects and loadings, and triplot with objects, centroids and loadings), the object scores and centroids are rescaled using the following scaling factor:

Scalefactor =2pΣs=1max(a n 1s,...,a n ms)pΣs=1|min(x n 1s,...,x n ns)|+(max(x n 1s,...,x n ns)

Related Topics

Diagnostics (CATPCA algorithms)
Maximum Rank (may be issued as a warning when exceeded) (CATPCA algorithms)
Descriptives (CATPCA algorithms)
Fit and Loss Measures (CATPCA algorithms)
Model Summary (CATPCA algorithms)
Cronbach's Alpha (CATPCA algorithms)
Variance Accounted For (CATPCA algorithms)
Variance Accounted For (CATPCA algorithms)
Centroid Coordinates (CATPCA algorithms)
Vector Coordinates (CATPCA algorithms)
Correlations and Eigenvalues (CATPCA algorithms)
Object Scores and Loadings (CATPCA algorithms)
Quantifications (CATPCA algorithms)
Residuals (CATPCA algorithms)
Projected Centroids (CATPCA algorithms)


References (CATPCA algorithms)

CATPCA algorithms,CATPCA algorithms,CATPCA algorithms
references,references,references

Barlow, R. E., D. J. Bartholomew, D. J. Bremner, and H. D. Brunk. 1972. Statistical inference under order restrictions. New York: John Wiley and Sons.

Cliff, N. 1966. Orthogonal rotation to congruence. Psychometrika, 31, 33-42.

De Leeuw, J., F. W. Young, and Y. Takane. 1976. Additive structure in qualitative data: An alternating least squares method with optimal scaling features. Psychometrika, 41, 471-503.

Gifi, A. 1990. Nonlinear multivariate analysis. Chichester: John Wiley and Sons.

Kruskal, J. B. 1964. Nonmetric multidimensional scaling: A numerical method. Psychometrika, 29, 115-129.

Max, J. 1960. Quantizing for minimum distortion. Proceedings IEEE (Information Theory), 6, 7-12.

Pratt, J. W. 1987. Dividing the indivisible: Using simple symmetry to partition variance explained. In: Proceedings of the Second International Conference in Statistics, T. Pukkila, and S. Puntanen, eds. Tampere, Finland: University of Tampere.

Ramsay, J. O. 1989. Monotone regression splines in action. Statistical Science, 4, 425-441.

Wilkinson, J. H. 1965. The algebraic eigenvalue problem. Oxford: Clarendon Press.

Related Topics

CATPCA Algorithms
Notation (CATPCA algorithms)
Discretization (CATPCA algorithms)
Imputation of Missing Values (CATPCA algorithms)
Configuration (CATPCA algorithms)
Objective Function (CATPCA algorithms)
Optimal Scaling Levels (CATPCA algorithms)
Objective Function Optimization (CATPCA algorithms)
Supplementary Objects (CATPCA algorithms)
Supplementary Variables (CATPCA algorithms)
Diagnostics (CATPCA algorithms)


CATREG Algorithms

CATREG (command),CATREG (command),CATREG (command)
algorithms,algorithms,algorithms
Categorical Regression,Categorical Regression,Categorical Regression
algorithms,algorithms,algorithms
CATREG algorithms,CATREG algorithms,CATREG algorithms

CATREG (Categorical regression with optimal scaling using alternating least squares) quantifies categorical variables using optimal scaling, resulting in an optimal linear regression equation for the transformed variables. The variables can be given mixed optimal scaling levels and no distributional assumptions about the variables are made.

Related Topics

Notation (CATREG algorithms)
Discretization (CATREG algorithms)
Imputation of Missing Values (CATREG algorithms)
Objective Function (CATREG algorithms)
Optimal Scaling Levels (CATREG algorithms)
Objective Function Optimization (CATREG algorithms)
Diagnostics (CATREG algorithms)
Regularization (CATREG algorithms)
References (CATREG algorithms)


Notation (CATREG algorithms)

CATREG algorithms,CATREG algorithms,CATREG algorithms
notation,notation,notation

The following notation is used throughout this chapter unless otherwise stated:

n | Number of analysis cases (objects)
nw | Weighted number of analysis cases: nΣi=1wi
ntot | Total number of cases (analysis + supplementary)
wi | Weight of object i; wi=1 if cases are unweighted; wi=0 if object i is supplementary.
W | Diagonal ntot×ntot matrix, with wi on the diagonal.
p | Number of predictor variables
m | Total number of analysis variables
r | Index of response variable
Jp | Index set of predictor variables
H | The data matrix (category indicators), of order ntot×m, after discretization, imputation of missings , and listwise deletion, if applicable.
p | Number of dimensions
λ1 | Lasso penalty
λ2 | Ridge penalty

For variable j; j=1, ..., m

kj | Number of categories of variable j (number of distinct values in hj, thus, including supplementary objects)
Gj | Indicator matrix for variable j, of order ntot×kj

The elements of Gj are defined as i=1, ..., ntot; r=1, ..., kj

g(j) i r={
1 | when the i th object is in the r th category of variable j
0 | when the i th object is not in the r th category of variable j

Dj | Diagonal kj×kj matrix, containing the weighted univariate marginals; i.e., the weighted column sums of Gj (Dj=G´jWGj)
f | Vector of degrees of freedom for the predictor variables, of order p
Sj | I-spline basis for variable j, of order kj×(sj+tj) (see Ramsay (1988) for details)
bj | Spline coefficient vector, of order sj+tj
dj | Spline intercept.
sj | Degree of polynomial
tj | Number of interior knots

The quantification matrices and parameter vectors are:

yr

Category quantifications for the response variable, of order kr

yj

Category quantifications for predictor variable j, of order kj

b

Regression coefficients for the predictor variables, of order p

v

Accumulated contributions of predictor variables:
Σ
jJp
bjGjyj

Note: The matrices W, Gj, and Dj are exclusively notational devices; they are stored in reduced form, and the program fully profits from their sparseness by replacing matrix multiplications with selective accumulation.

Related Topics

CATREG Algorithms
Discretization (CATREG algorithms)
Imputation of Missing Values (CATREG algorithms)
Objective Function (CATREG algorithms)
Optimal Scaling Levels (CATREG algorithms)
Objective Function Optimization (CATREG algorithms)
Diagnostics (CATREG algorithms)
Regularization (CATREG algorithms)
References (CATREG algorithms)


Discretization (CATREG algorithms)

CATREG algorithms,CATREG algorithms,CATREG algorithms
discretization,discretization,discretization

Discretization is done on the unweighted data.

Multiplying

First, the original variable is standardized. Then the standardized values are multiplied by 10 and rounded, and a value is added such that the lowest value is 1.

Ranking

The original variable is ranked in ascending order, according to the alphanumerical value.

Grouping into a specified number of categories with a normal distribution

First, the original variable is standardized. Then cases are assigned to categories using intervals as defined in Max (1960).

Grouping into a specified number of categories with a uniform distribution

First the target frequency is computed as divided by the number of specified categories, rounded. Then the original categories are assigned to grouped categories such that the frequencies of the grouped categories are as close to the target frequency as possible.

Grouping equal intervals of specified size

First the intervals are defined as lowest value + interval size, lowest value + 2*interval size, etc. Then cases with values in the kth interval are assigned to category k.

Related Topics

CATREG Algorithms
Notation (CATREG algorithms)
Imputation of Missing Values (CATREG algorithms)
Objective Function (CATREG algorithms)
Optimal Scaling Levels (CATREG algorithms)
Objective Function Optimization (CATREG algorithms)
Diagnostics (CATREG algorithms)
Regularization (CATREG algorithms)
References (CATREG algorithms)


Imputation of Missing Values (CATREG algorithms)

CATREG algorithms,CATREG algorithms,CATREG algorithms
missing values,missing values,missing values

When there are variables with missing values specified to be treated as active (impute mode or extra category), then first the kj’s for these variables are computed before listwise deletion. Next the category indicator with the highest weighted frequency (mode; the smallest if multiple modes exist), or kj+1 (extra category) is imputed. Then listwise deletion is applied if applicable. And then the kj’s are adjusted.

If an extra category is imputed for a variable with optimal scaling level Spline Nominal, Spline Ordinal, Ordinal or Numerical, the extra category is not included in the restriction according to the scaling level in the final phase.

See the topic Objective Function Optimization (CATREG algorithms) for more information.

Related Topics

CATREG Algorithms
Notation (CATREG algorithms)
Discretization (CATREG algorithms)
Objective Function (CATREG algorithms)
Optimal Scaling Levels (CATREG algorithms)
Objective Function Optimization (CATREG algorithms)
Diagnostics (CATREG algorithms)
Regularization (CATREG algorithms)
References (CATREG algorithms)


Objective Function (CATREG algorithms)

CATREG algorithms,CATREG algorithms,CATREG algorithms
objective function,objective function,objective function

The CATREG objective is to find the set of yr, b, and yj, jJp, so that the function

σ(yr;b;yj)=(Gryr−
∫
jJp
bjGjyj)´W(Gryr−
∫
jJp
bjGjyj)

is minimal, under the normalization restriction y´rDryr=nw. The quantifications of the response variable are also centered; that is, they satisfy u´WGryr=0 with u denoting an n-vector with ones.

With regularization, the loss function is subjected to:

P∫jJpβ2j≤t2 for Ridge,

P∫jJp|βj|≤t1 for Lasso,

P∫jJp|βj|≤t1 and P∫jJpβ2j≤t2 for Elastic Net.

The constrained loss functions can also be written as penalized loss functions:

L ridge =L+λ2P∫jJpβ2j
L lasso =L+λ1P∫jJp sign (βj)βj
L e-net =L+λ1P∫jJp sign (βj)βj+λ2P∫jJpβ2j

Related Topics

CATREG Algorithms
Notation (CATREG algorithms)
Discretization (CATREG algorithms)
Imputation of Missing Values (CATREG algorithms)
Optimal Scaling Levels (CATREG algorithms)
Objective Function Optimization (CATREG algorithms)
Diagnostics (CATREG algorithms)
Regularization (CATREG algorithms)
References (CATREG algorithms)


Optimal Scaling Levels (CATREG algorithms)

CATREG algorithms,CATREG algorithms,CATREG algorithms
optimal scaling levels,optimal scaling levels,optimal scaling levels

The following optimal scaling levels are distinguished in CATREG:

Nominal. Equality restrictions only.

Spline Nominal. yj= dj+Sjaj (equality and spline restrictions).

Spline Ordinal. yj= dj+Sjaj (equality and monotonic spline restrictions), with aj restricted to contain nonnegative elements (to guarantee monotonic I-splines).

Ordinal. yjCj (equality and monotonicity restrictions). The monotonicity restriction yjCj means that yj must be located in the convex cone of all kj-vectors with nondecreasing elements.

Numerical. yjLj (equality and linearity restrictions). The linearity restriction yjLj means that yj must be located in the subspace of all kj-vectors that are a linear transformation of the vector consisting of kj successive integers.

For each variable, these levels can be chosen independently. The general requirement for all options is that equal category indicators receive equal quantifications. For identification purposes, yj is always normalized so that y´jDjyj=nw.

Related Topics

CATREG Algorithms
Notation (CATREG algorithms)
Discretization (CATREG algorithms)
Imputation of Missing Values (CATREG algorithms)
Objective Function (CATREG algorithms)
Objective Function Optimization (CATREG algorithms)
Diagnostics (CATREG algorithms)
Regularization (CATREG algorithms)
References (CATREG algorithms)


Objective Function Optimization (CATREG algorithms)

Optimization is achieved by executing the following iteration scheme:

1. Initialization I or II

2. Update category quantifications response variable

3. Update category quantifications and regression coefficients predictor variables

4. Convergence test: repeat (2) through (3) or continue

Steps (1) through (4) are explained below.

Initialization

I. Random

The initial category quantifications
˜
y
j (for j= 1, ..., m) are defined as the kj category indicators of variable j, normalized such that u´WGj
˜
y
j=0 and
˜
y
jDj
˜
y
j=nw, and the initial regression coefficients are the correlations with the response variable.

II. Numerical

In this case, the iteration scheme is executed twice. In the first cycle, (initialized with initialization I) all variables are treated as numerical. The second cycle, with the specified scaling levels, starts with the category quantifications and regression coefficients from the first cycle.

III. Multistart (ALL)

Choosing all multiple systematic starts guarantees obtaining the global optimal solution when the spline ordinal or ordinal scaling level is specified for one or more predictors (Van der Kooij, Meulman, and Heiser, 2006). When this option is chosen, the iteration scheme is executed 2s times, where s is the number of predictor variables with (spline) ordinal scaling level and 2s is the number of all possible sign patterns for the regression coefficients of the predictor variables with (spline) ordinal scaling level. Each execution of the iteration scheme starts with the same initial category quantifications and regression coefficients (initialized with initialization I), but with different sign patterns for the coefficients. In the iteration process, the signs are held fixed. Finally, the iteration scheme is executed one more time using the optimal sign pattern (the pattern resulting in the highest R2, or RSQregu if regularization is applied).

IV. Multistart (value)

When a threshold value is specified with the multiple systematic starts option, the iteration scheme is executed twice for a selection of sign patterns for the regression coefficients of the predictor variables with (spline) ordinal scaling level. The sign patterns are selected by a combination of a percentage of loss of variance strategy and a hierarchical strategy (Van der Kooij, Meulman, and Heiser, 2006).

The maximum number of sign patterns with this option is 1+sΣi=1i.

In the first cycle (initialized with initialization I) all variables are treated as nominal. The second cycle, with the specified scaling levels, starts with the category quantifications and regression coefficients from the first cycle. After one iteration in the second cycle, the decrease in variance going from the last iteration in the first cycle to the first iteration in the second cycle is determined for predictors with (spline) ordinal scaling level. If the percentage of decrease for a predictor is above the specified threshold value, the predictor is allowed to have a negative sign. Then the second cycle continues a number of times: one time with the regression coefficient for all (spline) ordinal predictor positive and q times with the regression coefficient for one (spline) ordinal predictor negative, where q is the number of predictors with (spline) ordinal scaling level that are allowed to have a negative sign. If the 'all positive' sign pattern gives a better result (higher R2, or RSQregu if regularization is applied) then the 'one negative' signs patterns, the iteration scheme is executed one more time using the 'all positive' sign pattern. Else, if one of the 'one negative' signs patterns gives a better result then the 'all positive' sign pattern, the best 'one negative' signs pattern is selected and the second cycle is repeated for the 'two negatives' signs patterns: the patterns formed by adding one more negative sign to the best 'one negative' signs pattern. Then, the results of the 'two negatives' signs patterns are compared to the 'one negative' signs pattern and the 'one negative' signs pattern is selected if its result is better. Else, the second cycle is repeated for the 'three negatives' signs patterns, and so on.

V. Fixsigns

In this case, the iteration scheme is executed twice. In the first cycle, (initialized with initialization I) all variables are treated as nominal. The second cycle, with the specified scaling levels, starts with the category quantifications and regression coefficients from the first cycle and fixed signs (read from a user-specified file) for the regression coefficients of the predictor variables with (spline) ordinal scaling level.

Update category quantifications response variable

With fixed current values yj, jJp the unconstrained update of yr is

˜
y
r=D−1rG´rWv

Nominal: y*r=
˜
y
r

For the next four optimal scaling levels, if variable j was imputed with an extra category, y*r is inclusive category kr in the initial phase, and is exclusive category kr in the final phase.

Spline nominal and spline ordinal: y*r= dr+Srar.

The spline transformation is computed as a weighted regression (with weights the diagonal elements of Dr) of
˜
y
r on the I-spline basis Sr. For the spline ordinal scaling level the elements of ar are restricted to be nonnegative, which makes y*r monotonically increasing

Ordinal: y*r← WMON(
˜
y
r) .

The notation WMON( ) is used to denote the weighted monotonic regression process, which makes y*r monotonically increasing. The weights used are the diagonal elements of Dr and the subalgorithm used is the up-and-down-blocks minimum violators algorithm (Kruskal, 1964; Barlow et al., 1972).

Numerical: y*r← WLIN(
˜
y
r).

The notation WLIN( ) is used to denote the weighted linear regression process. The weights used are the diagonal elements of Dr.

Next y*r is normalized (if the response variable was imputed with an extra category, y*r is inclusive category kr from here on):

y+r=n1/2wy*r(y´*rDry*r)−1/2

Update category quantifications and regression weights predictor variables

For updating a predictor variable j, jJp, first the contribution of variable j is removed from v:vj=v−bjGjyj Then the unconstrained update of yj is

˜
y
j=D−1jG´jW(Gryr−vj)

Next
˜
y
j is restricted and normalized as in step (2) to obtain y+j.

Finally, we update the regression coefficient

b+j=n−1 w
˜
y
´jDjy+j

Regularized regression coefficients are obtained as

β+j=β*j1+λ2 for Ridge,

β+j=(β*j−λ12wj)+=β*j−λ12 if β*j>0 and β*j+λ12 if β*j<0 for Lasso, and

β+j=(β*j−λ12wj)+1+λ2=(β*j−λ12)+1+λ2 if β*j>0 and (β*j+λ12)+1+λ2 if β*j<0 for Elastic Net (van der Kooij, 2007).

Convergence test

The difference between consecutive values of the apparent Prediction Error is compared with the user-specified convergence criterion ε a small positive number.

The difference between consecutive values of the quantity

APE =n−1w(Gryr−∫jJpβjGjyj)´W(Gryr−∫jJpβjGjyj)

Without regularization, APE is equal to 1 minus the squared multiple regression coefficient. Steps (2) and (3) are repeated as long as the APE difference exceeds ε.

Related Topics

CATREG Algorithms
Notation (CATREG algorithms)
Discretization (CATREG algorithms)
Imputation of Missing Values (CATREG algorithms)
Objective Function (CATREG algorithms)
Optimal Scaling Levels (CATREG algorithms)
Diagnostics (CATREG algorithms)
Regularization (CATREG algorithms)
References (CATREG algorithms)


Diagnostics (CATREG algorithms)

CATREG algorithms,CATREG algorithms,CATREG algorithms
diagnostics,diagnostics,diagnostics

The procedure produces the following diagnostics.

Related Topics

CATREG Algorithms
Notation (CATREG algorithms)
Discretization (CATREG algorithms)
Imputation of Missing Values (CATREG algorithms)
Objective Function (CATREG algorithms)
Optimal Scaling Levels (CATREG algorithms)
Objective Function Optimization (CATREG algorithms)
Regularization (CATREG algorithms)
References (CATREG algorithms)
Descriptive Statistics (CATREG algorithms)
Fit and error measures (CATREG algorithms)
Summary Statistics (CATREG algorithms)
Multiple R (CATREG algorithms)
Multiple R Square (CATREG algorithms)
Adjusted Multiple R Square (CATREG algorithms)
Regularization "R Square" (1-Error) (CATREG algorithms)
Apparent Prediction Error (CATREG algorithms)
Expected Prediction Error (CATREG algorithms)
ANOVA Table (CATREG algorithms)
Correlations and Eigenvalues (CATREG algorithms)
Statistics for Predictor Variables (CATREG algorithms)
Beta (CATREG algorithms)
Standard Error Beta (CATREG algorithms)
Degrees of Freedom (CATREG algorithms)
F-Value (CATREG algorithms)
Zero-order correlation (CATREG algorithms)
Partial correlation (CATREG algorithms)
Part correlation (CATREG algorithms)
Importance (CATREG algorithms)
Tolerance (CATREG algorithms)
Quantifications (CATREG algorithms)
Predicted and residual values (CATREG algorithms)
Residual Plots (CATREG algorithms)


Descriptive Statistics (CATREG algorithms)

The descriptives tables gives the weighted univariate marginals and the weighted number of missing values (system missing, user defined missing, and values less than or equal to 0) for each variable.

Related Topics

Diagnostics (CATREG algorithms)
Fit and error measures (CATREG algorithms)
Summary Statistics (CATREG algorithms)
Multiple R (CATREG algorithms)
Multiple R Square (CATREG algorithms)
Adjusted Multiple R Square (CATREG algorithms)
Regularization "R Square" (1-Error) (CATREG algorithms)
Apparent Prediction Error (CATREG algorithms)
Expected Prediction Error (CATREG algorithms)
ANOVA Table (CATREG algorithms)
Correlations and Eigenvalues (CATREG algorithms)
Statistics for Predictor Variables (CATREG algorithms)
Beta (CATREG algorithms)
Standard Error Beta (CATREG algorithms)
Degrees of Freedom (CATREG algorithms)
F-Value (CATREG algorithms)
Zero-order correlation (CATREG algorithms)
Partial correlation (CATREG algorithms)
Part correlation (CATREG algorithms)
Importance (CATREG algorithms)
Tolerance (CATREG algorithms)
Quantifications (CATREG algorithms)
Predicted and residual values (CATREG algorithms)
Residual Plots (CATREG algorithms)


Fit and error measures (CATREG algorithms)

The squared multiple regression coefficient and the Apparent Prediction Error for each iteration are reported in the History table. Also, the decrease in APE for each iteration is reported.

Related Topics

Diagnostics (CATREG algorithms)
Descriptive Statistics (CATREG algorithms)
Summary Statistics (CATREG algorithms)
Multiple R (CATREG algorithms)
Multiple R Square (CATREG algorithms)
Adjusted Multiple R Square (CATREG algorithms)
Regularization "R Square" (1-Error) (CATREG algorithms)
Apparent Prediction Error (CATREG algorithms)
Expected Prediction Error (CATREG algorithms)
ANOVA Table (CATREG algorithms)
Correlations and Eigenvalues (CATREG algorithms)
Statistics for Predictor Variables (CATREG algorithms)
Beta (CATREG algorithms)
Standard Error Beta (CATREG algorithms)
Degrees of Freedom (CATREG algorithms)
F-Value (CATREG algorithms)
Zero-order correlation (CATREG algorithms)
Partial correlation (CATREG algorithms)
Part correlation (CATREG algorithms)
Importance (CATREG algorithms)
Tolerance (CATREG algorithms)
Quantifications (CATREG algorithms)
Predicted and residual values (CATREG algorithms)
Residual Plots (CATREG algorithms)


Summary Statistics (CATREG algorithms)

The following model summary statistics are available.

Related Topics

Diagnostics (CATREG algorithms)
Descriptive Statistics (CATREG algorithms)
Fit and error measures (CATREG algorithms)
Multiple R (CATREG algorithms)
Multiple R Square (CATREG algorithms)
Adjusted Multiple R Square (CATREG algorithms)
Regularization "R Square" (1-Error) (CATREG algorithms)
Apparent Prediction Error (CATREG algorithms)
Expected Prediction Error (CATREG algorithms)
ANOVA Table (CATREG algorithms)
Correlations and Eigenvalues (CATREG algorithms)
Statistics for Predictor Variables (CATREG algorithms)
Beta (CATREG algorithms)
Standard Error Beta (CATREG algorithms)
Degrees of Freedom (CATREG algorithms)
F-Value (CATREG algorithms)
Zero-order correlation (CATREG algorithms)
Partial correlation (CATREG algorithms)
Part correlation (CATREG algorithms)
Importance (CATREG algorithms)
Tolerance (CATREG algorithms)
Quantifications (CATREG algorithms)
Predicted and residual values (CATREG algorithms)
Residual Plots (CATREG algorithms)


Multiple R (CATREG algorithms)

multiple R,multiple R,multiple R
CATREG algorithms,CATREG algorithms,CATREG algorithms

R=(Gryr)´Wv(nwv´Wv)−1/2

Related Topics

Diagnostics (CATREG algorithms)
Descriptive Statistics (CATREG algorithms)
Fit and error measures (CATREG algorithms)
Summary Statistics (CATREG algorithms)
Multiple R Square (CATREG algorithms)
Adjusted Multiple R Square (CATREG algorithms)
Regularization "R Square" (1-Error) (CATREG algorithms)
Apparent Prediction Error (CATREG algorithms)
Expected Prediction Error (CATREG algorithms)
ANOVA Table (CATREG algorithms)
Correlations and Eigenvalues (CATREG algorithms)
Statistics for Predictor Variables (CATREG algorithms)
Beta (CATREG algorithms)
Standard Error Beta (CATREG algorithms)
Degrees of Freedom (CATREG algorithms)
F-Value (CATREG algorithms)
Zero-order correlation (CATREG algorithms)
Partial correlation (CATREG algorithms)
Part correlation (CATREG algorithms)
Importance (CATREG algorithms)
Tolerance (CATREG algorithms)
Quantifications (CATREG algorithms)
Predicted and residual values (CATREG algorithms)
Residual Plots (CATREG algorithms)


Multiple R Square (CATREG algorithms)

R2,R2,R2
CATREG algorithms,CATREG algorithms,CATREG algorithms

R2

Related Topics

Diagnostics (CATREG algorithms)
Descriptive Statistics (CATREG algorithms)
Fit and error measures (CATREG algorithms)
Summary Statistics (CATREG algorithms)
Multiple R (CATREG algorithms)
Adjusted Multiple R Square (CATREG algorithms)
Regularization "R Square" (1-Error) (CATREG algorithms)
Apparent Prediction Error (CATREG algorithms)
Expected Prediction Error (CATREG algorithms)
ANOVA Table (CATREG algorithms)
Correlations and Eigenvalues (CATREG algorithms)
Statistics for Predictor Variables (CATREG algorithms)
Beta (CATREG algorithms)
Standard Error Beta (CATREG algorithms)
Degrees of Freedom (CATREG algorithms)
F-Value (CATREG algorithms)
Zero-order correlation (CATREG algorithms)
Partial correlation (CATREG algorithms)
Part correlation (CATREG algorithms)
Importance (CATREG algorithms)
Tolerance (CATREG algorithms)
Quantifications (CATREG algorithms)
Predicted and residual values (CATREG algorithms)
Residual Plots (CATREG algorithms)


Adjusted Multiple R Square (CATREG algorithms)

1−(1−R2)(nw−1)(nw−1−u´f)

with u a p-vector of ones.

Related Topics

Diagnostics (CATREG algorithms)
Descriptive Statistics (CATREG algorithms)
Fit and error measures (CATREG algorithms)
Summary Statistics (CATREG algorithms)
Multiple R (CATREG algorithms)
Multiple R Square (CATREG algorithms)
Regularization "R Square" (1-Error) (CATREG algorithms)
Apparent Prediction Error (CATREG algorithms)
Expected Prediction Error (CATREG algorithms)
ANOVA Table (CATREG algorithms)
Correlations and Eigenvalues (CATREG algorithms)
Statistics for Predictor Variables (CATREG algorithms)
Beta (CATREG algorithms)
Standard Error Beta (CATREG algorithms)
Degrees of Freedom (CATREG algorithms)
F-Value (CATREG algorithms)
Zero-order correlation (CATREG algorithms)
Partial correlation (CATREG algorithms)
Part correlation (CATREG algorithms)
Importance (CATREG algorithms)
Tolerance (CATREG algorithms)
Quantifications (CATREG algorithms)
Predicted and residual values (CATREG algorithms)
Residual Plots (CATREG algorithms)


Regularization "R Square" (1-Error) (CATREG algorithms)

RSQ regu = 1 − APE

Without regularization, RSQ regu is equal to R2.

Related Topics

Diagnostics (CATREG algorithms)
Descriptive Statistics (CATREG algorithms)
Fit and error measures (CATREG algorithms)
Summary Statistics (CATREG algorithms)
Multiple R (CATREG algorithms)
Multiple R Square (CATREG algorithms)
Adjusted Multiple R Square (CATREG algorithms)
Apparent Prediction Error (CATREG algorithms)
Expected Prediction Error (CATREG algorithms)
ANOVA Table (CATREG algorithms)
Correlations and Eigenvalues (CATREG algorithms)
Statistics for Predictor Variables (CATREG algorithms)
Beta (CATREG algorithms)
Standard Error Beta (CATREG algorithms)
Degrees of Freedom (CATREG algorithms)
F-Value (CATREG algorithms)
Zero-order correlation (CATREG algorithms)
Partial correlation (CATREG algorithms)
Part correlation (CATREG algorithms)
Importance (CATREG algorithms)
Tolerance (CATREG algorithms)
Quantifications (CATREG algorithms)
Predicted and residual values (CATREG algorithms)
Residual Plots (CATREG algorithms)


Apparent Prediction Error (CATREG algorithms)

APE as computed in the convergence step in the last iteration of the optimization algorithm. See the topic Objective Function Optimization (CATREG algorithms) for more information.

Related Topics

Diagnostics (CATREG algorithms)
Descriptive Statistics (CATREG algorithms)
Fit and error measures (CATREG algorithms)
Summary Statistics (CATREG algorithms)
Multiple R (CATREG algorithms)
Multiple R Square (CATREG algorithms)
Adjusted Multiple R Square (CATREG algorithms)
Regularization "R Square" (1-Error) (CATREG algorithms)
Expected Prediction Error (CATREG algorithms)
ANOVA Table (CATREG algorithms)
Correlations and Eigenvalues (CATREG algorithms)
Statistics for Predictor Variables (CATREG algorithms)
Beta (CATREG algorithms)
Standard Error Beta (CATREG algorithms)
Degrees of Freedom (CATREG algorithms)
F-Value (CATREG algorithms)
Zero-order correlation (CATREG algorithms)
Partial correlation (CATREG algorithms)
Part correlation (CATREG algorithms)
Importance (CATREG algorithms)
Tolerance (CATREG algorithms)
Quantifications (CATREG algorithms)
Predicted and residual values (CATREG algorithms)
Residual Plots (CATREG algorithms)


Expected Prediction Error (CATREG algorithms)

The expected prediction error is computed for the standardized (quantified) data. Only when for all variables the numeric scaling level is specified, the EPE is computed for the raw data as well.

Supplementary objects (test cases)

The expected prediction error for the training data (active cases) is

EPE train =1nwnΣi=1((Gryr)i−(
Σ
jJp
βjGjyj)i)2

and the standard error is

SE train =(1n2wnΣi=1wi( EPE train i− EPE train )2)1/2

For the test data (supplementary objects), the expected prediction error is

EPE test =1ntot−n
Σ
iS
((Gryr)i−(
Σ
jJp
βjGjyj)i)2

where S is the index set of supplementary objects.

SE test =(1(ntot−n)2
Σ
iS
( EPE test i− EPE test )2)1/2

For the estimation of the quantification of a supplementary category (a category only occurring with supplementary cases), see the Quantification section below.

Multiplying EPE train , SE train , EPE test , and SE test with

1nwnΣi=1(hri− 1nwnΣi=1hri)2

(the variance of the response variable for the active cases) yields the EPE and SE for the raw data.

Resampling, .632 Bootstrap

Bootstrap datasets are created by randomly drawing (with replacement) n times from the active objects (training data), including the object (case) weights.

EPE boot =
^
Err
(.632)= err +
^
OP

where the optimism is estimated as

^
OP
= .632( Err (1)− err )

and Err (1), the leave-one-out bootstrap estimate of prediction error, is

Err (1)=1n(1)wnΣi=11|C−i|
Σ
bC−i
wi((Grybr)i−(
Σ
jJp
βbjGjybj)i)2 for |C−i|≠0

where C−i is the set of indices of the bootstrap samples b (b=1, ... ,B) that

(a) do not contain observation i,

(b) do contain the categories that apply to observation i for variables with nominal or ordinal transformations,

(c) do not require extrapolation for observation I for variables with spline transformations.

n(1)w is the number of observations for which |C−i|≠0. (The set |C−i| may become empty if, for example, observation i has one of the extreme categories on a variable with a spline transformation, and this category has a frequency of one. Then each bootstrap sample that does not contain this observation, also does not contain the extreme category; thus for observation i all bootstrap samples are excluded.)

The Standard Error is computed as

SE boot =(1n2wnΣi=1wi( Err (1)i− Err (1))2)1/2

Adding multiplication with the variance of the response variable for the cases in bootstrap sample b in the computation of Err (1)(... wivar﻿(hbr)(...)), yields the EPE and SE for the raw data.

Resampling, Cross-validation

The data are randomly divided into K disjoint subsets of the active objects (training data), including the object (case) weights.

EPE CV =1nwnΣi=1
Σ
ik
wi((Grykr)i−(
Σ
jJp
β−kjGjy−kj)i)2

where k (k=1, ... ,K) indexes the kth subset and −k the remaining part of the data.

The Standard Error is computed as

SE CV =(1n2wnΣi=1wi( EPE CV i− EPE CV )2)1/2

Adding multiplication with the variance of the response variable for the cases with the kth part removed in the computation of EPE CV (... wivar﻿(h−kr)(...)), yields the EPE and SE for the raw data.

Quantifications of categories that do not occur in a bootstrap sample or in the data with the kth part removed, are estimated as for supplementary categories (see Quantifications (CATREG algorithms)).

Related Topics

Diagnostics (CATREG algorithms)
Descriptive Statistics (CATREG algorithms)
Fit and error measures (CATREG algorithms)
Summary Statistics (CATREG algorithms)
Multiple R (CATREG algorithms)
Multiple R Square (CATREG algorithms)
Adjusted Multiple R Square (CATREG algorithms)
Regularization "R Square" (1-Error) (CATREG algorithms)
Apparent Prediction Error (CATREG algorithms)
ANOVA Table (CATREG algorithms)
Correlations and Eigenvalues (CATREG algorithms)
Statistics for Predictor Variables (CATREG algorithms)
Beta (CATREG algorithms)
Standard Error Beta (CATREG algorithms)
Degrees of Freedom (CATREG algorithms)
F-Value (CATREG algorithms)
Zero-order correlation (CATREG algorithms)
Partial correlation (CATREG algorithms)
Part correlation (CATREG algorithms)
Importance (CATREG algorithms)
Tolerance (CATREG algorithms)
Quantifications (CATREG algorithms)
Predicted and residual values (CATREG algorithms)
Residual Plots (CATREG algorithms)


ANOVA Table (CATREG algorithms)

 | Sum of Squares | df | Mean Sum of Squares
Regression | n w R2 | u´f | n w R2(u´f)−1
Residual | n w (1−R2) | n w −1−u´f | n w (1−R2)(n w −1−u´f)−1

F = MSreg/MSres

Related Topics

Diagnostics (CATREG algorithms)
Descriptive Statistics (CATREG algorithms)
Fit and error measures (CATREG algorithms)
Summary Statistics (CATREG algorithms)
Multiple R (CATREG algorithms)
Multiple R Square (CATREG algorithms)
Adjusted Multiple R Square (CATREG algorithms)
Regularization "R Square" (1-Error) (CATREG algorithms)
Apparent Prediction Error (CATREG algorithms)
Expected Prediction Error (CATREG algorithms)
Correlations and Eigenvalues (CATREG algorithms)
Statistics for Predictor Variables (CATREG algorithms)
Beta (CATREG algorithms)
Standard Error Beta (CATREG algorithms)
Degrees of Freedom (CATREG algorithms)
F-Value (CATREG algorithms)
Zero-order correlation (CATREG algorithms)
Partial correlation (CATREG algorithms)
Part correlation (CATREG algorithms)
Importance (CATREG algorithms)
Tolerance (CATREG algorithms)
Quantifications (CATREG algorithms)
Predicted and residual values (CATREG algorithms)
Residual Plots (CATREG algorithms)


Correlations and Eigenvalues (CATREG algorithms)

Before transformation

R=n−1wH´ c WH c , with H c weighted centered and normalized H excluding the response variable.

After transformation

R=n−1wQ´WQ, the columns of Q are qj=Gjyj, jJp.

Related Topics

Diagnostics (CATREG algorithms)
Descriptive Statistics (CATREG algorithms)
Fit and error measures (CATREG algorithms)
Summary Statistics (CATREG algorithms)
Multiple R (CATREG algorithms)
Multiple R Square (CATREG algorithms)
Adjusted Multiple R Square (CATREG algorithms)
Regularization "R Square" (1-Error) (CATREG algorithms)
Apparent Prediction Error (CATREG algorithms)
Expected Prediction Error (CATREG algorithms)
ANOVA Table (CATREG algorithms)
Statistics for Predictor Variables (CATREG algorithms)
Beta (CATREG algorithms)
Standard Error Beta (CATREG algorithms)
Degrees of Freedom (CATREG algorithms)
F-Value (CATREG algorithms)
Zero-order correlation (CATREG algorithms)
Partial correlation (CATREG algorithms)
Part correlation (CATREG algorithms)
Importance (CATREG algorithms)
Tolerance (CATREG algorithms)
Quantifications (CATREG algorithms)
Predicted and residual values (CATREG algorithms)
Residual Plots (CATREG algorithms)


Statistics for Predictor Variables (CATREG algorithms)

The following statistics are produced for each predicted variable.

Related Topics

Diagnostics (CATREG algorithms)
Descriptive Statistics (CATREG algorithms)
Fit and error measures (CATREG algorithms)
Summary Statistics (CATREG algorithms)
Multiple R (CATREG algorithms)
Multiple R Square (CATREG algorithms)
Adjusted Multiple R Square (CATREG algorithms)
Regularization "R Square" (1-Error) (CATREG algorithms)
Apparent Prediction Error (CATREG algorithms)
Expected Prediction Error (CATREG algorithms)
ANOVA Table (CATREG algorithms)
Correlations and Eigenvalues (CATREG algorithms)
Beta (CATREG algorithms)
Standard Error Beta (CATREG algorithms)
Degrees of Freedom (CATREG algorithms)
F-Value (CATREG algorithms)
Zero-order correlation (CATREG algorithms)
Partial correlation (CATREG algorithms)
Part correlation (CATREG algorithms)
Importance (CATREG algorithms)
Tolerance (CATREG algorithms)
Quantifications (CATREG algorithms)
Predicted and residual values (CATREG algorithms)
Residual Plots (CATREG algorithms)


Beta (CATREG algorithms)

regression coefficients,regression coefficients,regression coefficients
CATREG algorithms,CATREG algorithms,CATREG algorithms

The standardized regression coefficient is Betaj=bj.

Related Topics

Diagnostics (CATREG algorithms)
Descriptive Statistics (CATREG algorithms)
Fit and error measures (CATREG algorithms)
Summary Statistics (CATREG algorithms)
Multiple R (CATREG algorithms)
Multiple R Square (CATREG algorithms)
Adjusted Multiple R Square (CATREG algorithms)
Regularization "R Square" (1-Error) (CATREG algorithms)
Apparent Prediction Error (CATREG algorithms)
Expected Prediction Error (CATREG algorithms)
ANOVA Table (CATREG algorithms)
Correlations and Eigenvalues (CATREG algorithms)
Statistics for Predictor Variables (CATREG algorithms)
Standard Error Beta (CATREG algorithms)
Degrees of Freedom (CATREG algorithms)
F-Value (CATREG algorithms)
Zero-order correlation (CATREG algorithms)
Partial correlation (CATREG algorithms)
Part correlation (CATREG algorithms)
Importance (CATREG algorithms)
Tolerance (CATREG algorithms)
Quantifications (CATREG algorithms)
Predicted and residual values (CATREG algorithms)
Residual Plots (CATREG algorithms)


Standard Error Beta (CATREG algorithms)

The standard error of Betaj is estimated by

SE (Betaj) = ((1−R2)/(nw−1−u´f)tj)1/2

with tj the tolerance for variable j (see below).

Related Topics

Diagnostics (CATREG algorithms)
Descriptive Statistics (CATREG algorithms)
Fit and error measures (CATREG algorithms)
Summary Statistics (CATREG algorithms)
Multiple R (CATREG algorithms)
Multiple R Square (CATREG algorithms)
Adjusted Multiple R Square (CATREG algorithms)
Regularization "R Square" (1-Error) (CATREG algorithms)
Apparent Prediction Error (CATREG algorithms)
Expected Prediction Error (CATREG algorithms)
ANOVA Table (CATREG algorithms)
Correlations and Eigenvalues (CATREG algorithms)
Statistics for Predictor Variables (CATREG algorithms)
Beta (CATREG algorithms)
Degrees of Freedom (CATREG algorithms)
F-Value (CATREG algorithms)
Zero-order correlation (CATREG algorithms)
Partial correlation (CATREG algorithms)
Part correlation (CATREG algorithms)
Importance (CATREG algorithms)
Tolerance (CATREG algorithms)
Quantifications (CATREG algorithms)
Predicted and residual values (CATREG algorithms)
Residual Plots (CATREG algorithms)


Degrees of Freedom (CATREG algorithms)

The degrees of freedom for a variable depend on the optimal scaling level:

Numerical.fj=1.

Spline ordinal, spline nominal.fj=sj+tj minus the number of elements equal to zero in aj.

Ordinal, nominal.fj=the number of distinct values in yj minus 1.

Related Topics

Diagnostics (CATREG algorithms)
Descriptive Statistics (CATREG algorithms)
Fit and error measures (CATREG algorithms)
Summary Statistics (CATREG algorithms)
Multiple R (CATREG algorithms)
Multiple R Square (CATREG algorithms)
Adjusted Multiple R Square (CATREG algorithms)
Regularization "R Square" (1-Error) (CATREG algorithms)
Apparent Prediction Error (CATREG algorithms)
Expected Prediction Error (CATREG algorithms)
ANOVA Table (CATREG algorithms)
Correlations and Eigenvalues (CATREG algorithms)
Statistics for Predictor Variables (CATREG algorithms)
Beta (CATREG algorithms)
Standard Error Beta (CATREG algorithms)
F-Value (CATREG algorithms)
Zero-order correlation (CATREG algorithms)
Partial correlation (CATREG algorithms)
Part correlation (CATREG algorithms)
Importance (CATREG algorithms)
Tolerance (CATREG algorithms)
Quantifications (CATREG algorithms)
Predicted and residual values (CATREG algorithms)
Residual Plots (CATREG algorithms)


F-Value (CATREG algorithms)

Fj=( Beta j/ SE ( Beta j))2

Related Topics

Diagnostics (CATREG algorithms)
Descriptive Statistics (CATREG algorithms)
Fit and error measures (CATREG algorithms)
Summary Statistics (CATREG algorithms)
Multiple R (CATREG algorithms)
Multiple R Square (CATREG algorithms)
Adjusted Multiple R Square (CATREG algorithms)
Regularization "R Square" (1-Error) (CATREG algorithms)
Apparent Prediction Error (CATREG algorithms)
Expected Prediction Error (CATREG algorithms)
ANOVA Table (CATREG algorithms)
Correlations and Eigenvalues (CATREG algorithms)
Statistics for Predictor Variables (CATREG algorithms)
Beta (CATREG algorithms)
Standard Error Beta (CATREG algorithms)
Degrees of Freedom (CATREG algorithms)
Zero-order correlation (CATREG algorithms)
Partial correlation (CATREG algorithms)
Part correlation (CATREG algorithms)
Importance (CATREG algorithms)
Tolerance (CATREG algorithms)
Quantifications (CATREG algorithms)
Predicted and residual values (CATREG algorithms)
Residual Plots (CATREG algorithms)


Zero-order correlation (CATREG algorithms)

zero-order correlations,zero-order correlations,zero-order correlations
CATREG algorithms,CATREG algorithms,CATREG algorithms

Correlations between the transformed response variable Gryr and the transformed predictor variables Gjyj:

rrj=n−1w(Gryr)´WGjyj

Related Topics

Diagnostics (CATREG algorithms)
Descriptive Statistics (CATREG algorithms)
Fit and error measures (CATREG algorithms)
Summary Statistics (CATREG algorithms)
Multiple R (CATREG algorithms)
Multiple R Square (CATREG algorithms)
Adjusted Multiple R Square (CATREG algorithms)
Regularization "R Square" (1-Error) (CATREG algorithms)
Apparent Prediction Error (CATREG algorithms)
Expected Prediction Error (CATREG algorithms)
ANOVA Table (CATREG algorithms)
Correlations and Eigenvalues (CATREG algorithms)
Statistics for Predictor Variables (CATREG algorithms)
Beta (CATREG algorithms)
Standard Error Beta (CATREG algorithms)
Degrees of Freedom (CATREG algorithms)
F-Value (CATREG algorithms)
Partial correlation (CATREG algorithms)
Part correlation (CATREG algorithms)
Importance (CATREG algorithms)
Tolerance (CATREG algorithms)
Quantifications (CATREG algorithms)
Predicted and residual values (CATREG algorithms)
Residual Plots (CATREG algorithms)


Partial correlation (CATREG algorithms)

partial correlation,partial correlation,partial correlation
CATREG algorithms,CATREG algorithms,CATREG algorithms

PartialCorrj=bj((1/tj)(1−R2)+b2j)−1/2

with tj the tolerance for variable j (see Tolerance (CATREG algorithms)).

When a regularization method is applied, the OLS coefficients are computed as

β*=(nwR)−1Q´W(Gryr)

with R the correlation matrix after transformation and R−1 is computed using the eigenvectors and eigenvalues of Rp, where Rp is the correlation matrix of the predictors that have regression coefficients > 0, and R2 is computed as

((Gryr)´WQβ*(nw(Qβ*)´WQB*)−1/2)2

Related Topics

Diagnostics (CATREG algorithms)
Descriptive Statistics (CATREG algorithms)
Fit and error measures (CATREG algorithms)
Summary Statistics (CATREG algorithms)
Multiple R (CATREG algorithms)
Multiple R Square (CATREG algorithms)
Adjusted Multiple R Square (CATREG algorithms)
Regularization "R Square" (1-Error) (CATREG algorithms)
Apparent Prediction Error (CATREG algorithms)
Expected Prediction Error (CATREG algorithms)
ANOVA Table (CATREG algorithms)
Correlations and Eigenvalues (CATREG algorithms)
Statistics for Predictor Variables (CATREG algorithms)
Beta (CATREG algorithms)
Standard Error Beta (CATREG algorithms)
Degrees of Freedom (CATREG algorithms)
F-Value (CATREG algorithms)
Zero-order correlation (CATREG algorithms)
Part correlation (CATREG algorithms)
Importance (CATREG algorithms)
Tolerance (CATREG algorithms)
Quantifications (CATREG algorithms)
Predicted and residual values (CATREG algorithms)
Residual Plots (CATREG algorithms)


Part correlation (CATREG algorithms)

part correlation,part correlation,part correlation
CATREG algorithms,CATREG algorithms,CATREG algorithms

PartCorrj=bjt1/2j

with tj the tolerance for variable j (see Tolerance (CATREG algorithms)).

For computation of the OLS coefficients if regularization is applied, see Partial correlation (CATREG algorithms).

Related Topics

Diagnostics (CATREG algorithms)
Descriptive Statistics (CATREG algorithms)
Fit and error measures (CATREG algorithms)
Summary Statistics (CATREG algorithms)
Multiple R (CATREG algorithms)
Multiple R Square (CATREG algorithms)
Adjusted Multiple R Square (CATREG algorithms)
Regularization "R Square" (1-Error) (CATREG algorithms)
Apparent Prediction Error (CATREG algorithms)
Expected Prediction Error (CATREG algorithms)
ANOVA Table (CATREG algorithms)
Correlations and Eigenvalues (CATREG algorithms)
Statistics for Predictor Variables (CATREG algorithms)
Beta (CATREG algorithms)
Standard Error Beta (CATREG algorithms)
Degrees of Freedom (CATREG algorithms)
F-Value (CATREG algorithms)
Zero-order correlation (CATREG algorithms)
Partial correlation (CATREG algorithms)
Importance (CATREG algorithms)
Tolerance (CATREG algorithms)
Quantifications (CATREG algorithms)
Predicted and residual values (CATREG algorithms)
Residual Plots (CATREG algorithms)


Importance (CATREG algorithms)

importance,importance,importance
CATREG algorithms,CATREG algorithms,CATREG algorithms

Pratt's measure of relative importance (Pratt, 1987)

Impj=bjrrj/R2

The relative importance is only displayed if no regularization is applied.

Related Topics

Diagnostics (CATREG algorithms)
Descriptive Statistics (CATREG algorithms)
Fit and error measures (CATREG algorithms)
Summary Statistics (CATREG algorithms)
Multiple R (CATREG algorithms)
Multiple R Square (CATREG algorithms)
Adjusted Multiple R Square (CATREG algorithms)
Regularization "R Square" (1-Error) (CATREG algorithms)
Apparent Prediction Error (CATREG algorithms)
Expected Prediction Error (CATREG algorithms)
ANOVA Table (CATREG algorithms)
Correlations and Eigenvalues (CATREG algorithms)
Statistics for Predictor Variables (CATREG algorithms)
Beta (CATREG algorithms)
Standard Error Beta (CATREG algorithms)
Degrees of Freedom (CATREG algorithms)
F-Value (CATREG algorithms)
Zero-order correlation (CATREG algorithms)
Partial correlation (CATREG algorithms)
Part correlation (CATREG algorithms)
Tolerance (CATREG algorithms)
Quantifications (CATREG algorithms)
Predicted and residual values (CATREG algorithms)
Residual Plots (CATREG algorithms)


Tolerance (CATREG algorithms)

tolerance,tolerance,tolerance
CATREG algorithms,CATREG algorithms,CATREG algorithms

The tolerance for the optimally scaled predictor variables is given by

tj=r−1pjj

with rpjj the jth diagonal element of Rp, where Rp is the correlation matrix of predictors that have regression coefficients > 0.

The tolerance for the original predictor variables is also reported and is computed in the same way, using the correlation matrix for the original predictor variables, discretized, imputed, and listwise deleted, if applicable.

Related Topics

Diagnostics (CATREG algorithms)
Descriptive Statistics (CATREG algorithms)
Fit and error measures (CATREG algorithms)
Summary Statistics (CATREG algorithms)
Multiple R (CATREG algorithms)
Multiple R Square (CATREG algorithms)
Adjusted Multiple R Square (CATREG algorithms)
Regularization "R Square" (1-Error) (CATREG algorithms)
Apparent Prediction Error (CATREG algorithms)
Expected Prediction Error (CATREG algorithms)
ANOVA Table (CATREG algorithms)
Correlations and Eigenvalues (CATREG algorithms)
Statistics for Predictor Variables (CATREG algorithms)
Beta (CATREG algorithms)
Standard Error Beta (CATREG algorithms)
Degrees of Freedom (CATREG algorithms)
F-Value (CATREG algorithms)
Zero-order correlation (CATREG algorithms)
Partial correlation (CATREG algorithms)
Part correlation (CATREG algorithms)
Importance (CATREG algorithms)
Quantifications (CATREG algorithms)
Predicted and residual values (CATREG algorithms)
Residual Plots (CATREG algorithms)


Quantifications (CATREG algorithms)

quantifications,quantifications,quantifications
CATREG algorithms,CATREG algorithms,CATREG algorithms

The quantifications are yj, j=1,...,m.

Supplementary objects

The category indicators of supplementary objects are replaced by the quantification of the categories if these categories also appear in the active data. If a category is only used by supplementary objects, the category quantification is estimated by interpolation for variables with numeric or spline scaling level if the supplementary category lies within the range of the categories in the active data. If the variable has numeric scaling level and the non-occuring category lies outside the range of categories in the active data, then extrapolation is applied. In all other cases, the category indicator is replaced by a system-missing value.

Related Topics

Diagnostics (CATREG algorithms)
Descriptive Statistics (CATREG algorithms)
Fit and error measures (CATREG algorithms)
Summary Statistics (CATREG algorithms)
Multiple R (CATREG algorithms)
Multiple R Square (CATREG algorithms)
Adjusted Multiple R Square (CATREG algorithms)
Regularization "R Square" (1-Error) (CATREG algorithms)
Apparent Prediction Error (CATREG algorithms)
Expected Prediction Error (CATREG algorithms)
ANOVA Table (CATREG algorithms)
Correlations and Eigenvalues (CATREG algorithms)
Statistics for Predictor Variables (CATREG algorithms)
Beta (CATREG algorithms)
Standard Error Beta (CATREG algorithms)
Degrees of Freedom (CATREG algorithms)
F-Value (CATREG algorithms)
Zero-order correlation (CATREG algorithms)
Partial correlation (CATREG algorithms)
Part correlation (CATREG algorithms)
Importance (CATREG algorithms)
Tolerance (CATREG algorithms)
Predicted and residual values (CATREG algorithms)
Residual Plots (CATREG algorithms)


Predicted and residual values (CATREG algorithms)

predicted values,predicted values,predicted values
CATREG algorithms,CATREG algorithms,CATREG algorithms
residuals,residuals,residuals
CATREG algorithms,CATREG algorithms,CATREG algorithms

There is an option to save the predicted values v and the residual values Gryr−v.

Whether for a supplementary object the predicted and residual value can be computed, depends on whether all categories of the object are quantified (which is the case if all categories also appear with the active objects) or can be estimated by inter- or extrapolation (see Quantifications (CATREG algorithms)).

Related Topics

Diagnostics (CATREG algorithms)
Descriptive Statistics (CATREG algorithms)
Fit and error measures (CATREG algorithms)
Summary Statistics (CATREG algorithms)
Multiple R (CATREG algorithms)
Multiple R Square (CATREG algorithms)
Adjusted Multiple R Square (CATREG algorithms)
Regularization "R Square" (1-Error) (CATREG algorithms)
Apparent Prediction Error (CATREG algorithms)
Expected Prediction Error (CATREG algorithms)
ANOVA Table (CATREG algorithms)
Correlations and Eigenvalues (CATREG algorithms)
Statistics for Predictor Variables (CATREG algorithms)
Beta (CATREG algorithms)
Standard Error Beta (CATREG algorithms)
Degrees of Freedom (CATREG algorithms)
F-Value (CATREG algorithms)
Zero-order correlation (CATREG algorithms)
Partial correlation (CATREG algorithms)
Part correlation (CATREG algorithms)
Importance (CATREG algorithms)
Tolerance (CATREG algorithms)
Quantifications (CATREG algorithms)
Residual Plots (CATREG algorithms)


Residual Plots (CATREG algorithms)

residual plots,residual plots,residual plots
CATREG algorithms,CATREG algorithms,CATREG algorithms

The residual plot for predictor variable j displays two sets of points: unnormalized quantifications (bjyj) against category indicators, and residuals when the response variable is predicted from all predictor variables except variable j (Gryr−(v−bjGjyj)) against category indicators.

Related Topics

Diagnostics (CATREG algorithms)
Descriptive Statistics (CATREG algorithms)
Fit and error measures (CATREG algorithms)
Summary Statistics (CATREG algorithms)
Multiple R (CATREG algorithms)
Multiple R Square (CATREG algorithms)
Adjusted Multiple R Square (CATREG algorithms)
Regularization "R Square" (1-Error) (CATREG algorithms)
Apparent Prediction Error (CATREG algorithms)
Expected Prediction Error (CATREG algorithms)
ANOVA Table (CATREG algorithms)
Correlations and Eigenvalues (CATREG algorithms)
Statistics for Predictor Variables (CATREG algorithms)
Beta (CATREG algorithms)
Standard Error Beta (CATREG algorithms)
Degrees of Freedom (CATREG algorithms)
F-Value (CATREG algorithms)
Zero-order correlation (CATREG algorithms)
Partial correlation (CATREG algorithms)
Part correlation (CATREG algorithms)
Importance (CATREG algorithms)
Tolerance (CATREG algorithms)
Quantifications (CATREG algorithms)
Predicted and residual values (CATREG algorithms)


Regularization (CATREG algorithms)

CATREG algorithms,CATREG algorithms,CATREG algorithms
regularization,regularization,regularization

If regularization is specified, all above diagnostics apply to the selected or specified regularized model. If more than one model is specified (more than one penalty value), diagnostics for each model can be requested.

Statistics

APE (see Apparent Prediction Error (CATREG algorithms)), EPE (see Expected Prediction Error (CATREG algorithms)), and the Standardized sum of coefficients for each model.

The standardized sum of coefficients are computed as

P∫jJpβ2j P∫jJp(β*j)2 for Ridge

P∫jJp sign (βj)βj P∫jJp sign (β*j)β*j for Lasso and Elastic Net

Coefficients

The regularized standardized coefficients for each model.

Paths

The regularized standardized coefficients are plotted on the y-axis against the standardized sum of coefficients for each model on the x-axis. For the Elastic net, multiple plots are produced: a Lasso paths plot for each specified value of the ridge penalty.

Related Topics

CATREG Algorithms
Notation (CATREG algorithms)
Discretization (CATREG algorithms)
Imputation of Missing Values (CATREG algorithms)
Objective Function (CATREG algorithms)
Optimal Scaling Levels (CATREG algorithms)
Objective Function Optimization (CATREG algorithms)
Diagnostics (CATREG algorithms)
References (CATREG algorithms)


References (CATREG algorithms)

CATREG algorithms,CATREG algorithms,CATREG algorithms
references,references,references

Barlow, R. E., D. J. Bartholomew, D. J. Bremner, and H. D. Brunk. 1972. Statistical inference under order restrictions. New York: John Wiley and Sons.

Gifi, A. 1990. Nonlinear multivariate analysis. Chichester: John Wiley and Sons.

Kruskal, J. B. 1964. Nonmetric multidimensional scaling: A numerical method. Psychometrika, 29, 115-129.

Max, J. 1960. Quantizing for minimum distortion. Proceedings IEEE (Information Theory), 6, 7-12.

Pratt, J. W. 1987. Dividing the indivisible: Using simple symmetry to partition variance explained. In: Proceedings of the Second International Conference in Statistics, T. Pukkila, and S. Puntanen, eds. Tampere, Finland: University of Tampere.

Ramsay, J. O. 1989. Monotone regression splines in action. Statistical Science, 4, 425-441.

Van der Kooij, A. J., J. J. Meulman, and W. J. Heiser. 2006. Local Minima in Categorical Multiple Regression. Computational Statistics and Data Analysis, 50, 446-462.

Van der Kooij, A. J. 2007. Prediction Accuracy and Stability of Regression with Optimal Scaling Transformations (Thesis). : Leiden University.

Related Topics

CATREG Algorithms
Notation (CATREG algorithms)
Discretization (CATREG algorithms)
Imputation of Missing Values (CATREG algorithms)
Objective Function (CATREG algorithms)
Optimal Scaling Levels (CATREG algorithms)
Objective Function Optimization (CATREG algorithms)
Diagnostics (CATREG algorithms)
Regularization (CATREG algorithms)


CCF Algorithms

CCF computes the cross-correlation functions of two or more time series.


Notation (cross-correlation functions algorithms)

CCF (command),CCF (command),CCF (command)
algorithms,algorithms,algorithms
Cross-correlations,Cross-correlations,Cross-correlations
algorithms,algorithms,algorithms
cross-correlation functions algorithms,cross-correlation functions algorithms,cross-correlation functions algorithms
notation,notation,notation

The following notation is used throughout this chapter unless otherwise stated:

X, Y | Any two series of length n
rxy(k) | Sample cross correlation coefficient at lag k
Sx | Standard deviation of series X
Sy | Standard deviation of series Y
Cxy(k) | Sample cross covariance at lag k

Related Topics

Cross Correlation (cross-correlation functions algorithms)
References (cross-correlation functions algorithms)


Cross Correlation (cross-correlation functions algorithms)

cross-correlation functions algorithms,cross-correlation functions algorithms,cross-correlation functions algorithms
cross correlation,cross correlation,cross correlation

The cross correlation coefficient at lag k is estimated by

rxy(k)=Cxy(k)SxSy

where

Cxy(k)={
1nn−kΣt=1(xt−x)(yt+k−y), | k=0, 1, 2,...
1nn+kΣt=1(yt−y)(xt−k−x), | k=−1,−2,...

Sx=
√ 1nnΣt=1(xt−x)2

Sy=
√ 1nnΣt=1(yt−y)2

The cross correlation function is not symmetric about k=0.

Approximate standard error of rxy(k) is

se(rxy(k))
√ 1n−|k|
,   k=0, ±1, ±2,...

The standard error is based on the assumption that the series are not cross correlated and one of the series is white noise. (The general formula for the standard error can be found in (Box and Jenkins, 1976), p. 376, 11.1.7.)

Related Topics

Notation (cross-correlation functions algorithms)
References (cross-correlation functions algorithms)


References (cross-correlation functions algorithms)

cross-correlation functions algorithms,cross-correlation functions algorithms,cross-correlation functions algorithms
references,references,references

Box, G. E. P., and G. M. Jenkins. 1976. Time series analysis: Forecasting and control, Rev. ed. San Francisco: Holden-Day.

Related Topics

Notation (cross-correlation functions algorithms)
Cross Correlation (cross-correlation functions algorithms)


CLUSTER Algorithms

CLUSTER (command),CLUSTER (command),CLUSTER (command)
algorithms,algorithms,algorithms
Hierarchical Cluster Analysis,Hierarchical Cluster Analysis,Hierarchical Cluster Analysis
algorithms,algorithms,algorithms
hierarchical cluster analysis algorithms,hierarchical cluster analysis algorithms,hierarchical cluster analysis algorithms

CLUSTER produces hierarchical clusters of items based on distance measures of dissimilarity or similarity.

Related Topics

Cluster Measures (hierarchical cluster analysis algorithms)
Clustering Methods (hierarchical cluster analysis algorithms)
References (hierarchical cluster analysis algorithms)


Cluster Measures (hierarchical cluster analysis algorithms)

hierarchical cluster analysis algorithms,hierarchical cluster analysis algorithms,hierarchical cluster analysis algorithms
cluster measures,cluster measures,cluster measures

See the topic Proximities Measures (PROXIMITIES algorithms) for more information.

Related Topics

CLUSTER Algorithms
Clustering Methods (hierarchical cluster analysis algorithms)
References (hierarchical cluster analysis algorithms)


Clustering Methods (hierarchical cluster analysis algorithms)

hierarchical cluster analysis algorithms,hierarchical cluster analysis algorithms,hierarchical cluster analysis algorithms
clustering methods,clustering methods,clustering methods

The cluster method defines the rules for cluster formation. For example, when calculating the distance between two clusters, you can use the pair of nearest objects between clusters or the pair of furthest objects, or a compromise between these methods.

Related Topics

Notation (hierarchical cluster analysis algorithms)
General Procedure (hierarchical cluster analysis algorithms)
Average Linkage between Groups (hierarchical cluster analysis algorithms)
Average Linkage within Groups (hierarchical cluster analysis algorithms)
Single Linkage (hierarchical cluster analysis algorithms)
Complete Linkage (hierarchical cluster analysis algorithms)
Centroid Method (hierarchical cluster analysis algorithms)
Median Method (hierarchical cluster analysis algorithms)
Ward's Method (hierarchical cluster analysis algorithms)
CLUSTER Algorithms
Cluster Measures (hierarchical cluster analysis algorithms)
References (hierarchical cluster analysis algorithms)


Notation (hierarchical cluster analysis algorithms)

hierarchical cluster analysis algorithms,hierarchical cluster analysis algorithms,hierarchical cluster analysis algorithms
notation,notation,notation

The following notation is used unless otherwise stated:

S | Matrix of similarity or dissimilarity measures
sij | Similarity or dissimilarity measure between cluster i and cluster j
Ni | Number of cases in cluster i

Related Topics

Clustering Methods (hierarchical cluster analysis algorithms)
General Procedure (hierarchical cluster analysis algorithms)
Average Linkage between Groups (hierarchical cluster analysis algorithms)
Average Linkage within Groups (hierarchical cluster analysis algorithms)
Single Linkage (hierarchical cluster analysis algorithms)
Complete Linkage (hierarchical cluster analysis algorithms)
Centroid Method (hierarchical cluster analysis algorithms)
Median Method (hierarchical cluster analysis algorithms)
Ward's Method (hierarchical cluster analysis algorithms)


General Procedure (hierarchical cluster analysis algorithms)

Begin with N clusters each containing one case. Denote the clusters 1 through N.

• Find the most similar pair of clusters p and q(p>q). Denote this similarity spq. If a dissimilarity measure is used, large values indicate dissimilarity. If a similarity measure is used, small values indicate dissimilarity.

• Reduce the number of clusters by one through merger of clusters p and q. Label the new cluster t(=q) and update similarity matrix (by the method specified) to reflect revised similarities or dissimilarities between cluster t and all other clusters. Delete the row and column of S corresponding to cluster p.

• Perform the previous two steps until all entities are in one cluster.

• For each of the following methods, the similarity or dissimilarity matrix S is updated to reflect revised similarities or dissimilarities (str) between the new cluster t and all other clusters r as given below.

Related Topics

Clustering Methods (hierarchical cluster analysis algorithms)
Notation (hierarchical cluster analysis algorithms)
Average Linkage between Groups (hierarchical cluster analysis algorithms)
Average Linkage within Groups (hierarchical cluster analysis algorithms)
Single Linkage (hierarchical cluster analysis algorithms)
Complete Linkage (hierarchical cluster analysis algorithms)
Centroid Method (hierarchical cluster analysis algorithms)
Median Method (hierarchical cluster analysis algorithms)
Ward's Method (hierarchical cluster analysis algorithms)


Average Linkage between Groups (hierarchical cluster analysis algorithms)

average linkage between groups,average linkage between groups,average linkage between groups
hierarchical cluster analysis algorithms,hierarchical cluster analysis algorithms,hierarchical cluster analysis algorithms

Before the first merge, let Ni=1 for i=1 to N. Update str by

str=spr+sqr

Update Nt by

Nt=Np+Nq

and then choose the most similar pair based on the value

sij/(NiNj)

Related Topics

Clustering Methods (hierarchical cluster analysis algorithms)
Notation (hierarchical cluster analysis algorithms)
General Procedure (hierarchical cluster analysis algorithms)
Average Linkage within Groups (hierarchical cluster analysis algorithms)
Single Linkage (hierarchical cluster analysis algorithms)
Complete Linkage (hierarchical cluster analysis algorithms)
Centroid Method (hierarchical cluster analysis algorithms)
Median Method (hierarchical cluster analysis algorithms)
Ward's Method (hierarchical cluster analysis algorithms)


Average Linkage within Groups (hierarchical cluster analysis algorithms)

average linkage within groups,average linkage within groups,average linkage within groups
hierarchical cluster analysis algorithms,hierarchical cluster analysis algorithms,hierarchical cluster analysis algorithms

Before the first merge, let SUMi=0 and Ni=1 for i=1 to N. Update str by

str=spr+sqr

Update SUMt and Nt by

SUMt=SUMp+SUMq+spq
Nt=Np+Nq

and choose the most similar pair based on

SUMi+SUMj+sij((Ni+Nj)(Ni+Nj−1))/2

Related Topics

Clustering Methods (hierarchical cluster analysis algorithms)
Notation (hierarchical cluster analysis algorithms)
General Procedure (hierarchical cluster analysis algorithms)
Average Linkage between Groups (hierarchical cluster analysis algorithms)
Single Linkage (hierarchical cluster analysis algorithms)
Complete Linkage (hierarchical cluster analysis algorithms)
Centroid Method (hierarchical cluster analysis algorithms)
Median Method (hierarchical cluster analysis algorithms)
Ward's Method (hierarchical cluster analysis algorithms)


Single Linkage (hierarchical cluster analysis algorithms)

single linkage,single linkage,single linkage
hierarchical cluster analysis algorithms,hierarchical cluster analysis algorithms,hierarchical cluster analysis algorithms

Update str by

str={
min(spr, sqr) | if S is a dissimilarity matrix
max(spr, sqr) | if S is a similarity matrix

Related Topics

Clustering Methods (hierarchical cluster analysis algorithms)
Notation (hierarchical cluster analysis algorithms)
General Procedure (hierarchical cluster analysis algorithms)
Average Linkage between Groups (hierarchical cluster analysis algorithms)
Average Linkage within Groups (hierarchical cluster analysis algorithms)
Complete Linkage (hierarchical cluster analysis algorithms)
Centroid Method (hierarchical cluster analysis algorithms)
Median Method (hierarchical cluster analysis algorithms)
Ward's Method (hierarchical cluster analysis algorithms)


Complete Linkage (hierarchical cluster analysis algorithms)

complete linkage,complete linkage,complete linkage
hierarchical cluster analysis algorithms,hierarchical cluster analysis algorithms,hierarchical cluster analysis algorithms

Update str by

str={
max(spr, sqr) | if S is a dissimilarity matrix
min(spr, sqr) | if S is a similarity matrix

Related Topics

Clustering Methods (hierarchical cluster analysis algorithms)
Notation (hierarchical cluster analysis algorithms)
General Procedure (hierarchical cluster analysis algorithms)
Average Linkage between Groups (hierarchical cluster analysis algorithms)
Average Linkage within Groups (hierarchical cluster analysis algorithms)
Single Linkage (hierarchical cluster analysis algorithms)
Centroid Method (hierarchical cluster analysis algorithms)
Median Method (hierarchical cluster analysis algorithms)
Ward's Method (hierarchical cluster analysis algorithms)


Centroid Method (hierarchical cluster analysis algorithms)

centroid method,centroid method,centroid method
hierarchical cluster analysis algorithms,hierarchical cluster analysis algorithms,hierarchical cluster analysis algorithms

Update str by

str=NpNp+Nqspr+NqNp+Nqsqr−NpNq(Np+Nq)2spq

Related Topics

Clustering Methods (hierarchical cluster analysis algorithms)
Notation (hierarchical cluster analysis algorithms)
General Procedure (hierarchical cluster analysis algorithms)
Average Linkage between Groups (hierarchical cluster analysis algorithms)
Average Linkage within Groups (hierarchical cluster analysis algorithms)
Single Linkage (hierarchical cluster analysis algorithms)
Complete Linkage (hierarchical cluster analysis algorithms)
Median Method (hierarchical cluster analysis algorithms)
Ward's Method (hierarchical cluster analysis algorithms)


Median Method (hierarchical cluster analysis algorithms)

median method,median method,median method
hierarchical cluster analysis algorithms,hierarchical cluster analysis algorithms,hierarchical cluster analysis algorithms

Update str by

str=(spr+sqr)/2−spq/4

Related Topics

Clustering Methods (hierarchical cluster analysis algorithms)
Notation (hierarchical cluster analysis algorithms)
General Procedure (hierarchical cluster analysis algorithms)
Average Linkage between Groups (hierarchical cluster analysis algorithms)
Average Linkage within Groups (hierarchical cluster analysis algorithms)
Single Linkage (hierarchical cluster analysis algorithms)
Complete Linkage (hierarchical cluster analysis algorithms)
Centroid Method (hierarchical cluster analysis algorithms)
Ward's Method (hierarchical cluster analysis algorithms)


Ward's Method (hierarchical cluster analysis algorithms)

Ward's method,Ward's method,Ward's method
hierarchical cluster analysis algorithms,hierarchical cluster analysis algorithms,hierarchical cluster analysis algorithms

Update str by

str=1(Nt+Nr)[(Nr+Np)srp+(Nr+Nq)srq−Nrspq]

Update the coefficient W by

W=W+ .5 spq

Note that for Ward’s method, the coefficient given in the agglomeration schedule is really the within-cluster sum of squares at that step. For all other methods, this coefficient represents the distance at which the clusters p and q were joined.

Related Topics

Clustering Methods (hierarchical cluster analysis algorithms)
Notation (hierarchical cluster analysis algorithms)
General Procedure (hierarchical cluster analysis algorithms)
Average Linkage between Groups (hierarchical cluster analysis algorithms)
Average Linkage within Groups (hierarchical cluster analysis algorithms)
Single Linkage (hierarchical cluster analysis algorithms)
Complete Linkage (hierarchical cluster analysis algorithms)
Centroid Method (hierarchical cluster analysis algorithms)
Median Method (hierarchical cluster analysis algorithms)


References (hierarchical cluster analysis algorithms)

hierarchical cluster analysis algorithms,hierarchical cluster analysis algorithms,hierarchical cluster analysis algorithms
references,references,references

Anderberg, M. R. 1973. Cluster analysis for applications. New York: Academic Press.

Related Topics

CLUSTER Algorithms
Cluster Measures (hierarchical cluster analysis algorithms)
Clustering Methods (hierarchical cluster analysis algorithms)


Cluster Evaluation Algorithms

cluster evaluation algorithms,cluster evaluation algorithms,cluster evaluation algorithms

This document describes measures used for evaluating clustering models.

• The Silhouette coefficient combines the concepts of cluster cohesion (favoring models which contain tightly cohesive clusters) and cluster separation (favoring models which contain highly separated clusters). It can be used to evaluate individual objects, clusters, and models.

• The sum of squares error (SSE) is a measure of prototype-based cohesion, while sum of squares between (SSB) is a measure of prototype-based separation.

• Variable importance indicates how well the variable can differentiate different clusters. For both range (numeric) and discrete variables, the higher the importance measure, the less likely the variation for a variable between clusters is due to chance and more likely due to some underlying difference.

Related Topics

Notation (cluster evaluation algorithms)
Goodness Measures (cluster evaluation algorithms)
Data Preparation (cluster evaluation algorithms)
Basic Statistics (cluster evaluation algorithms)
Silhouette Coefficient (cluster evaluation algorithms)
Sum of Squares Error (SSE) (cluster evaluation algorithms)
Sum of Squares Between (SSB) (cluster evaluation algorithms)
Variable Importance (cluster evaluation algorithms)
References (cluster evaluation algorithms)


Notation (cluster evaluation algorithms)

cluster evaluation algorithms,cluster evaluation algorithms,cluster evaluation algorithms
notation,notation,notation

The following notation is used throughout this chapter unless otherwise stated:

xik | Continuous variable k in case i (standardized).
xiks | The sth category of variable k in case i (one-of-c coding).
N | Total number of valid cases.
Nj | The number of cases in cluster j.
Y | Variable with J cluster labels.
μjk | The centroid of cluster j for variable k.
Dij | The distance between case i and the centroid of cluster j.
Dj | The distance between the overall mean u and the centroid of cluster j.

Related Topics

Cluster Evaluation Algorithms
Goodness Measures (cluster evaluation algorithms)
Data Preparation (cluster evaluation algorithms)
Basic Statistics (cluster evaluation algorithms)
Silhouette Coefficient (cluster evaluation algorithms)
Sum of Squares Error (SSE) (cluster evaluation algorithms)
Sum of Squares Between (SSB) (cluster evaluation algorithms)
Variable Importance (cluster evaluation algorithms)
References (cluster evaluation algorithms)


Goodness Measures (cluster evaluation algorithms)

cluster evaluation algorithms,cluster evaluation algorithms,cluster evaluation algorithms
goodness measures,goodness measures,goodness measures

The average Silhouette coefficient is simply the average over all cases of the following calculation for each individual case:

(B−A)/max(A,B)

where A is the average distance from the case to every other case assigned to the same cluster and B is the minimal average distance from the case to cases of a different cluster across all clusters.

Unfortunately, this coefficient is computationally expensive. In order to ease this burden, we use the following definitions of A and B:

• A is the distance from the case to the centroid of the cluster which the case belongs to;

• B is the minimal distance from the case to the centroid of every other cluster.

Distances may be calculated using Euclidean distances. The Silhouette coefficient and its average range between −1, indicating a very poor model, and 1, indicating an excellent model. As found by Kaufman and Rousseeuw (1990), an average silhouette greater than 0.5 indicates reasonable partitioning of data; less than 0.2 means that the data do not exhibit cluster structure.

Related Topics

Cluster Evaluation Algorithms
Notation (cluster evaluation algorithms)
Data Preparation (cluster evaluation algorithms)
Basic Statistics (cluster evaluation algorithms)
Silhouette Coefficient (cluster evaluation algorithms)
Sum of Squares Error (SSE) (cluster evaluation algorithms)
Sum of Squares Between (SSB) (cluster evaluation algorithms)
Variable Importance (cluster evaluation algorithms)
References (cluster evaluation algorithms)


Data Preparation (cluster evaluation algorithms)

Before calculating Silhouette coefficient, we need to transform cases as follows:

1. Recode categorical variables using one-of-c coding. If a variable has c categories, then it is stored as c vectors, with the first category denoted (1,0,...,0), the next category (0,1,0,...,0), ..., and the final category (0,0,...,0,1). The order of the categories is based on the ascending sort or lexical order of the data values.

2. Rescale continuous variables. Continuous variables are normalized to the interval [−1, 1] using the transformation [2*(x−min)/(max−min)]−1. This normalization tries to equalize the contributions of continuous and categorical features to the distance computations.

Related Topics

Cluster Evaluation Algorithms
Notation (cluster evaluation algorithms)
Goodness Measures (cluster evaluation algorithms)
Basic Statistics (cluster evaluation algorithms)
Silhouette Coefficient (cluster evaluation algorithms)
Sum of Squares Error (SSE) (cluster evaluation algorithms)
Sum of Squares Between (SSB) (cluster evaluation algorithms)
Variable Importance (cluster evaluation algorithms)
References (cluster evaluation algorithms)


Basic Statistics (cluster evaluation algorithms)

The following statistics are collected in order to compute the goodness measures: the centroid μjk of variable k for cluster j, the distance between a case and the centroid, and the overall mean u.

For μjk with an ordinal or continuous variable k, we average all standardized values of variable k within cluster j. For nominal variables, μjk is a vector {jks} of probabilities of occurrence for each state s of variable k for cluster j. Note that in counting , we do not consider cases with missing values in variable k. If the value of variable k is missing for all cases within cluster j, μjk is marked as missing.

The distance D2ij between case i and the centroid of cluster j can be calculated in terms of the weighted sum of the distance components d2ijk across all variables; that is

D2ij=Σkwijkd2ijkΣkwijk

where wijk denotes a weight. At this point, we do not consider differential weights, thus wijk equals 1 if the variable k in case i is valid, 0 if not. If all wijk equal 0, set D2ij=0.

The distance component d2ijk is calculated as follows for ordinal and continuous variables

d2ijk=(xik−μjk)2

For binary or nominal variables, it is

d2ijk=1SkSkΣs=1(xiks−jks)2

where variable k uses one-of-c coding, and Sk is the number of its states.

The calculation of Dj is the same as that of Dij, but the overall mean u is used in place of μjk and μjk is used in place of xik.

Related Topics

Cluster Evaluation Algorithms
Notation (cluster evaluation algorithms)
Goodness Measures (cluster evaluation algorithms)
Data Preparation (cluster evaluation algorithms)
Silhouette Coefficient (cluster evaluation algorithms)
Sum of Squares Error (SSE) (cluster evaluation algorithms)
Sum of Squares Between (SSB) (cluster evaluation algorithms)
Variable Importance (cluster evaluation algorithms)
References (cluster evaluation algorithms)


Silhouette Coefficient (cluster evaluation algorithms)

cluster evaluation algorithms,cluster evaluation algorithms,cluster evaluation algorithms
Silhouette coefficient,Silhouette coefficient,Silhouette coefficient
Silhouette coefficient,Silhouette coefficient,Silhouette coefficient
cluster evaluation algorithms,cluster evaluation algorithms,cluster evaluation algorithms

The Silhouette coefficient of case i is

min{Dij,jC−i}−Dicimax(min{Dij,jC−i},Dici)

where C−i denotes cluster labels which do not include case i as a member, while ci is the cluster label which includes case i. If max﻿(min﻿{Dij,jC−i},Dici) equals 0, the Silhouette of case i is not used in the average operations.

Based on these individual data, the total average Silhouette coefficient is:

SC=1NNΣi=1min{Dij,jC−i}−Dicimax(min{Dij,jC−i},Dici)

Related Topics

Cluster Evaluation Algorithms
Notation (cluster evaluation algorithms)
Goodness Measures (cluster evaluation algorithms)
Data Preparation (cluster evaluation algorithms)
Basic Statistics (cluster evaluation algorithms)
Sum of Squares Error (SSE) (cluster evaluation algorithms)
Sum of Squares Between (SSB) (cluster evaluation algorithms)
Variable Importance (cluster evaluation algorithms)
References (cluster evaluation algorithms)


Sum of Squares Error (SSE) (cluster evaluation algorithms)

cluster evaluation algorithms,cluster evaluation algorithms,cluster evaluation algorithms
sum of squares error,sum of squares error,sum of squares error
sum of squares error,sum of squares error,sum of squares error
cluster evaluation algorithms,cluster evaluation algorithms,cluster evaluation algorithms

SSE is a prototype-based cohesion measure where the squared Euclidean distance is used. In order to compare between models, we will use the averaged form, defined as:

Average SSE =1NΣjC
Σ
ij
D2ij

Related Topics

Cluster Evaluation Algorithms
Notation (cluster evaluation algorithms)
Goodness Measures (cluster evaluation algorithms)
Data Preparation (cluster evaluation algorithms)
Basic Statistics (cluster evaluation algorithms)
Silhouette Coefficient (cluster evaluation algorithms)
Sum of Squares Between (SSB) (cluster evaluation algorithms)
Variable Importance (cluster evaluation algorithms)
References (cluster evaluation algorithms)


Sum of Squares Between (SSB) (cluster evaluation algorithms)

cluster evaluation algorithms,cluster evaluation algorithms,cluster evaluation algorithms
sum of squares between,sum of squares between,sum of squares between
sum of squares between,sum of squares between,sum of squares between
cluster evaluation algorithms,cluster evaluation algorithms,cluster evaluation algorithms

SSB is a prototype-based separation measure where the squared Euclidean distance is used. In order to compare between models, we will use the averaged form, defined as:

Average SSB =1NΣjCNjD2j

Related Topics

Cluster Evaluation Algorithms
Notation (cluster evaluation algorithms)
Goodness Measures (cluster evaluation algorithms)
Data Preparation (cluster evaluation algorithms)
Basic Statistics (cluster evaluation algorithms)
Silhouette Coefficient (cluster evaluation algorithms)
Sum of Squares Error (SSE) (cluster evaluation algorithms)
Variable Importance (cluster evaluation algorithms)
References (cluster evaluation algorithms)


Variable Importance (cluster evaluation algorithms)

cluster evaluation algorithms,cluster evaluation algorithms,cluster evaluation algorithms
variable importance,variable importance,variable importance
variable importance,variable importance,variable importance
cluster evaluation algorithms,cluster evaluation algorithms,cluster evaluation algorithms

The importance of field i is defined as

VIi=−log﻿10(sigi)
max﻿
jΩ
(−log﻿10(sigj))

where Ω denotes the set of predictor and evaluation fields, sigi is the significance or p-value computed from applying a certain test, as described below. If sigi equals zero, set sigi=MinDouble, where MinDouble is the minimal double value.

Across Clusters Collapse Hide details

Across Clusters

The p-value for categorical fields is based on Pearson’s chi-square. It is calculated by

p-value = Prob(χ2d>X2),

where

X2=IΣi=1JΣj=1(Nij−
^
N
ij)2/
^
N
ij

where
^
N
ij=Ni·N·j/N(X).

• If N(X)=0, the importance is set to be undefined or unknown;

• If Ni.=0, subtract one from I for each such category to obtain I´;

• If N.j=0, subtract one from J for each such cluster to obtain J´;

• If J´≤1 or I´≤1, the importance is set to be undefined or unknown.

The degrees of freedom are (I´−1)(J´−1).

The p-value for continuous fields is based on an F test. It is calculated by

p-value = Prob{F(J−1,N−J)>F},

where

F=JΣj=1Nj(xj−x)2/(J−1)JΣj=1(Nj−1)sj/(N−J)

• If N=0, the importance is set to be undefined or unknown;

• If Nj=0, subtract one from J for each such cluster to obtain J´;

• If J´≤1 or N≤J´, the importance is set to be undefined or unknown;

• If the denominator in the formula for the F statistic is zero, the importance is set to be undefined or unknown;

• If the numerator in the formula for the F statistic is zero, set p-value = 1;

The degrees of freedom are (J´−1,N−J´).

Within Clusters Collapse Hide details

Within Clusters

The null hypothesis for categorical fields is that the proportion of cases in the categories in cluster j is the same as the overall proportion.

The chi-square statistic for cluster j is computed as follows

X2=IΣi=1(Nij−Njpi)2Njpi

If Nj=0, the importance is set to be undefined or unknown;

If pi=0, subtract one from I for each such category to obtain I´;

If I´≤1, the importance is set to be undefined or unknown.

The degrees of freedom are d=I´−1.

The null hypothesis for continuous fields is that the mean in cluster j is the same as the overall mean.

The Student's t statistic for cluster j is computed as follows

t=(xj−x)sj/
√ Nj

with d=Nj−1 degrees of freedom.

If Nj≤1 or sj=0, the importance is set to be undefined or unknown;

If the numerator is zero, set p-value = 1;

Here, the p-value based on Student's t distribution is calculated as

p-value = 1 − Prob{|T(d)|≤|t|}.

Related Topics

Cluster Evaluation Algorithms
Notation (cluster evaluation algorithms)
Goodness Measures (cluster evaluation algorithms)
Data Preparation (cluster evaluation algorithms)
Basic Statistics (cluster evaluation algorithms)
Silhouette Coefficient (cluster evaluation algorithms)
Sum of Squares Error (SSE) (cluster evaluation algorithms)
Sum of Squares Between (SSB) (cluster evaluation algorithms)
References (cluster evaluation algorithms)


References (cluster evaluation algorithms)

cluster evaluation algorithms,cluster evaluation algorithms,cluster evaluation algorithms
references,references,references

Kaufman, L., and P. J. Rousseeuw. 1990. Finding groups in data: An introduction to cluster analysis. New York: John Wiley and Sons.

Tan, P., M. Steinbach, and V. Kumar. 2006. Introduction to Data Mining. : Addison-Wesley.

Related Topics

Cluster Evaluation Algorithms
Notation (cluster evaluation algorithms)
Goodness Measures (cluster evaluation algorithms)
Data Preparation (cluster evaluation algorithms)
Basic Statistics (cluster evaluation algorithms)
Silhouette Coefficient (cluster evaluation algorithms)
Sum of Squares Error (SSE) (cluster evaluation algorithms)
Sum of Squares Between (SSB) (cluster evaluation algorithms)
Variable Importance (cluster evaluation algorithms)


CNLR Algorithms

CNLR (command),CNLR (command),CNLR (command)
algorithms,algorithms,algorithms
Nonlinear Regression,Nonlinear Regression,Nonlinear Regression
algorithms,algorithms,algorithms
constrained nonlinear regression algorithms,constrained nonlinear regression algorithms,constrained nonlinear regression algorithms

CNLR is used to estimate the parameters of a function by minimizing a smooth nonlinear loss function (objective function) when the parameters are subject to a set of constraints.

Related Topics

Model (constrained nonlinear regression algorithms)
Goal (constrained nonlinear regression algorithms)
Algorithm (constrained nonlinear regression algorithms)
Bootstrapping Estimates (constrained nonlinear regression algorithms)
References (constrained nonlinear regression algorithms)


Model (constrained nonlinear regression algorithms)

constrained nonlinear regression algorithms,constrained nonlinear regression algorithms,constrained nonlinear regression algorithms
model,model,model

Consider the model

f=f(
x
˜
,
θ
˜
)

where
θ
˜
is a p×1 parameter vector,
x
˜
is an independent variable vector, and f is a function of
x
˜
and
θ
˜
.

Related Topics

CNLR Algorithms
Goal (constrained nonlinear regression algorithms)
Algorithm (constrained nonlinear regression algorithms)
Bootstrapping Estimates (constrained nonlinear regression algorithms)
References (constrained nonlinear regression algorithms)


Goal (constrained nonlinear regression algorithms)

Find the estimate
θ
˜
* of
θ
˜
such that
θ
˜
* minimizes

F=F(y,f)

subject to

l
˜
´≤{
θ
˜
ALq˜
C(
θ
˜
)
}≤
u
˜
´

where F is the smooth loss function (objective function), which can be specified by the user. AL is an mL×p matrix of linear constraints, and C(
θ
˜
) is an mN×1 vector of nonlinear constraint functions.
l
˜
´=(
l
˜
´B,
l
˜
´L,
l
˜
´N), where
l
˜
´B,
l
˜
´L, and
l
˜
´N represent the lower bounds, linear constraints and nonlinear constraints, respectively. The upper bound
u
˜
´ is defined similarly.

Related Topics

CNLR Algorithms
Model (constrained nonlinear regression algorithms)
Algorithm (constrained nonlinear regression algorithms)
Bootstrapping Estimates (constrained nonlinear regression algorithms)
References (constrained nonlinear regression algorithms)


Algorithm (constrained nonlinear regression algorithms)

CNLR uses the algorithms proposed and implemented in NPSOL by Gill, Murray, Saunders, and Wright. A description of the algorithms can be found in the User’s Guide for NPSOL, Version 4.0 (Gill, Murray, Saunders, and Wright, 1986).

The method used in NPSOL is a sequential quadratic programming (SQP) method. For an overview of SQP methods, see (Gill, Murray, and Saunders, 1981), pp. 237–242.

The basic structure of NPSOL involves major and minor iterations. Based on the given initial value
θ
˜
(0) of
θ
˜
the algorithm first selects an initial working set that includes bounds or general inequality constraints that lie within a crash tolerance (CRSHTOL). At the kth iteration, the algorithm starts with

Related Topics

CNLR Algorithms
Model (constrained nonlinear regression algorithms)
Goal (constrained nonlinear regression algorithms)
Bootstrapping Estimates (constrained nonlinear regression algorithms)
References (constrained nonlinear regression algorithms)
Minor Iteration (constrained nonlinear regression algorithms)
Major Iteration (constrained nonlinear regression algorithms)
Convergence Tests (constrained nonlinear regression algorithms)
Termination (constrained nonlinear regression algorithms)


Minor Iteration (constrained nonlinear regression algorithms)

This iteration searches for the direction Pk, which is the solution of a quadratic subproblem; that is, Pk is found by minimizing

g´kP+12P´HkP

subject to

¯l˜(k)≤{
P
ALP
ANP
}≤¯u˜(k)

where gk is the gradient of F at
θ
˜
(k), the matrix Hk is a positive-definite quasi-Newton approximation to the Hessian of the Lagrangian function, AN is the Jacobian matrix of the nonlinear-constraint vector C evaluated at
θ
˜
(k), and

¯l˜(k)=(l´B,l´L,l´N)
¯u˜(k)=(u´B,u´L,u´N)
lB=lB−
q
˜
(k)
lL=lL−AL
q
˜
(k)
lN=lN−C(
q
˜
(k))
uB=uB−
q
˜
(k)
uL=uL−AL
q
˜
(k)
uN=uN−C(
q
˜
(k))

The linear feasibility tolerance, the nonlinear feasibility tolerance, and the feasibility tolerance are used to decide if a solution is feasible for linear and nonlinear constraints.

Once the search direction Pk is found, the algorithm goes to the major iteration.

Related Topics

Algorithm (constrained nonlinear regression algorithms)
Major Iteration (constrained nonlinear regression algorithms)
Convergence Tests (constrained nonlinear regression algorithms)
Termination (constrained nonlinear regression algorithms)


Major Iteration (constrained nonlinear regression algorithms)

The purpose of the major iteration is to find a non-negative scalar αk such that

θ
˜
(k+1)=
θ
˜
(k)+αkPk

satisfies the following conditions:

•
θ
˜
(k+1) produces a “sufficient decrease” in the augmented Lagrangian merit function

L(
θ
˜
,
λ
˜
,
s
˜
)=F(
θ
˜
)−
Σ
i
λi(ci(
θ
˜
)−si)+12
Σ
i
ρi(ci(
θ
˜
)−si)2

The summation terms involve only the nonlinear constraints. The vector λ is an estimate of the Lagrange multipliers for the nonlinear constraints. The non-negative slack variables {si} allow nonlinear inequality constraints to be treated without introducing discontinuities. The solution of the QP subproblem defined in Minor Iteration (constrained nonlinear regression algorithms) provides a vector triple that serves as a direction search for
θ
˜
,
λ
˜
and
s
˜
. The non-negative vector of penalty parameters (ρ) is initialized to zero at the beginning of the first major iteration. Function precision criteria are used as a measure of the accuracy with which the functions F and ci can be evaluated.

•
θ
˜
(k+1) is close to a minimum of F along Pk. The criterion is

|g´(
θ
˜
(k+1))Pk|<−η g´kPk

where η is the Line Search Tolerance and 0≤η<1. The value of η determines the accuracy with which αk approximates a stationary point of F along Pk. A smaller value of η produces a more accurate line search.

• The step length is in a certain range; that is,

||
θ
˜
(k+1)−
θ
˜
(k)||=||αkPk||≤ Step Limit

Related Topics

Algorithm (constrained nonlinear regression algorithms)
Minor Iteration (constrained nonlinear regression algorithms)
Convergence Tests (constrained nonlinear regression algorithms)
Termination (constrained nonlinear regression algorithms)


Convergence Tests (constrained nonlinear regression algorithms)

After αk is determined from the major iteration, the following conditions are checked:

• k+1 ≤ Maximum number of major iterations

• The sequence {
θ
˜
(l)} converged at
θ
˜
(k+1); that is,

||αkPk||≤
√ r
(1+||
θ
˜
(k+1)||)

•
θ
˜
(k+1) satisfies the Kuhn-Tucker conditions to the accuracy requested; that is,

||gz(
θ
˜
(k+1))||≤
√ r
(1+max(1+|F(
θ
˜
(k+1))|,||g(
θ
˜
(k+1))||))

and

|| res j||≤ FTOL for all j,

where gz is the projected gradient, g is the gradient of F with respect to the free parameters, res j is the violation of the jth nonlinear constraint, FTOL is the Nonlinear Feasibility Tolerance, and r is the Optimality Tolerance.

If none of these three conditions are satisfied, the algorithm continues with the Minor Iteration to find a new search direction.

Related Topics

Algorithm (constrained nonlinear regression algorithms)
Minor Iteration (constrained nonlinear regression algorithms)
Major Iteration (constrained nonlinear regression algorithms)
Termination (constrained nonlinear regression algorithms)


Termination (constrained nonlinear regression algorithms)

The following are termination conditions.

• Underflow. A single underflow will always occur if machine constants are computed automatically. Other floating-point underflows may occur occasionally, but can usually be ignored.

• Overflow. If the printed output before the overflow error contains a warning about serious ill-conditioning in the working set when adding the jth constraint, it may be possible to avoid the difficulty by increasing the magnitude of FTOL, LFTOL, or NFTOL and rerunning the program. If the message recurs after this change, the offending linearly dependent constrains (with index “j”) must be removed from the problem.

• Optimal solution found.

• Optimal solution found, but the requested accuracy could not be achieved, NPSOL terminates because no further improvement can be made in the merit function. This is probably caused by requesting a more accurate solution than is attainable with the given precision of the problem (as specified by FPRECISION).

• No point has been found that satisfies the linear constraints. NPSOL terminates without finding a feasible point for the given value of LFTOL. The user should check that there are no constraint redundancies and ensure that the value of LFTOL is greater than the precision of parameter estimates.

• No point has been found which satisfies the nonlinear constraints. There is no feasible point found in QP subproblems. The user should check the validity of constraints. If the user is convinced that a feasible point does exist, NPSOL should be restarted at a different starting point.

• Too many iterations. If the algorithm appears to be making progress, increase the value of ITER and rerun NPSOL. If the algorithm seems to be “bogged down”, the user should check for incorrect gradients.

• Cannot improve on current point. A sufficient decrease in the merit function could not be attained during the final line search. This sometimes occurs because an overly stringent accuracy has been requested; for example, Optimality Tolerance is too small or a too-small step limit is given when the parameters are measured on different scales.

Please note the following:

• Unlike the other procedures, the weight function is not treated as a case replicate in CNLR.

• When both weight and loss function are specified, the algorithm takes the product of these two functions are the loss function.

• If the loss function is not specified, the default loss function is a squared loss function and the default output in NLR will be printed. However, if the loss function is not a squared loss function, CNLR prints only the final parameter estimates, iteration history, and termination message. In order to obtain estimates of the standard errors of parameter estimates and correlations between parameter estimates, the bootstrapping method can be requested.

Related Topics

Algorithm (constrained nonlinear regression algorithms)
Minor Iteration (constrained nonlinear regression algorithms)
Major Iteration (constrained nonlinear regression algorithms)
Convergence Tests (constrained nonlinear regression algorithms)


Bootstrapping Estimates (constrained nonlinear regression algorithms)

constrained nonlinear regression algorithms,constrained nonlinear regression algorithms,constrained nonlinear regression algorithms
bootstrapping estimates,bootstrapping estimates,bootstrapping estimates

Bootstrapping is a nonparametric technique of estimating the standard error of a parameter estimate using repeated samples from the original data. This is done by sampling with replacement. CNLR computes and saves the parameter estimates for each sample generated. This results, for each parameter, in a sample of estimates from which the standard deviation is calculated. This is the estimated standard error.

Mathematically, the bootstrap covariance matrix S for the p parameter estimates is

S=(sij)p×p

where

sij=mΣk=1(
^
θ
ik−θi)(
^
θ
jk−θj)
θi=mΣk=1
^
θ
ik/m

and
^
θ
ik is the CNLR parameter estimate of θi for the kth bootstrap sample and m is the number of samples generated by the bootstrap. By default, m=10p(p+1)2. The standard error for the jth parameter estimate is estimated by

√ sjjm−1

and the correlation between the ith and jth parameter estimates is estimated by

sij
√ siisjj

The “95% Trimmed Range” values are the most extreme values that remain after trimming from the set of estimates for a parameter, the g largest, and the g smallest estimates, where g is the largest integer not exceeding 0.025m.

Related Topics

CNLR Algorithms
Model (constrained nonlinear regression algorithms)
Goal (constrained nonlinear regression algorithms)
Algorithm (constrained nonlinear regression algorithms)
References (constrained nonlinear regression algorithms)


References (constrained nonlinear regression algorithms)

constrained nonlinear regression algorithms,constrained nonlinear regression algorithms,constrained nonlinear regression algorithms
references,references,references

Gill, P. E., W. M. Murray, and M. A. Saunders. 1981. Practical Optimization. London: Academic Press.

Gill, P. E., W. M. Murray, M. A. Saunders, and M. H. Wright. 1984. Procedures for optimization problems with a mixture of bounds and general linear constraints. ACM Transactions on Mathematical Software, 10:3, 282-296.

Gill, P. E., W. M. Murray, M. A. Saunders, and M. H. Wright. 1986. User’s guide for NPSOL (version 4.0): A FORTRAN package for nonlinear programming. Technical Report SOL 86-2. Stanford University: Department of Operations Research.

Related Topics

CNLR Algorithms
Model (constrained nonlinear regression algorithms)
Goal (constrained nonlinear regression algorithms)
Algorithm (constrained nonlinear regression algorithms)
Bootstrapping Estimates (constrained nonlinear regression algorithms)


CONJOINT Algorithms

CONJOINT (command),CONJOINT (command),CONJOINT (command)
algorithms,algorithms,algorithms
Conjoint analysis,Conjoint analysis,Conjoint analysis
algorithms,algorithms,algorithms
conjoint analysis algorithms,conjoint analysis algorithms,conjoint analysis algorithms

This procedure performs conjoint analysis using ordinary least squares.

Related Topics

Notation (conjoint analysis algorithms)
Model (conjoint analysis algorithms)
Design Matrix (conjoint analysis algorithms)
Converting Card Numbers to Ranks (conjoint analysis algorithms)
Estimation (conjoint analysis algorithms)
Utility (Part Worth) Values (conjoint analysis algorithms)
Standard Errors of Part Worths (conjoint analysis algorithms)
Importance Scores (conjoint analysis algorithms)
Predicted Scores (conjoint analysis algorithms)
Correlations (conjoint analysis algorithms)
Simulations (conjoint analysis algorithms)


Notation (conjoint analysis algorithms)

conjoint analysis algorithms,conjoint analysis algorithms,conjoint analysis algorithms
notation,notation,notation

The following notation is used throughout this chapter unless otherwise stated:

n | The total number of regular cards in the PLAN file.
p | The total number of factors.
d | The number of discrete factors.
l | The number of linear factors.
q | The number of quadratic factors.
mi | The number of levels of levels of the ith discrete factor.
aij | The jth level of the ith discrete factor i=1,...,d.
xi | The ith linear factor, i=1,...,l.
zi | The ith ideal or anti-ideal factor, i=1,...,q.
ri | The response for the ith card, i=i,...,n.
t | The total number of subjects being analyzed at the same time. (When /SUBJECT is specified, t is usually 1.)

Related Topics

CONJOINT Algorithms
Model (conjoint analysis algorithms)
Design Matrix (conjoint analysis algorithms)
Converting Card Numbers to Ranks (conjoint analysis algorithms)
Estimation (conjoint analysis algorithms)
Utility (Part Worth) Values (conjoint analysis algorithms)
Standard Errors of Part Worths (conjoint analysis algorithms)
Importance Scores (conjoint analysis algorithms)
Predicted Scores (conjoint analysis algorithms)
Correlations (conjoint analysis algorithms)
Simulations (conjoint analysis algorithms)


Model (conjoint analysis algorithms)

conjoint analysis algorithms,conjoint analysis algorithms,conjoint analysis algorithms
model,model,model

The model for the response ri for the ith card from a subject is

ri=β0+pΣj=1ujkji

where ujkji is the utility (part worth) associated with the kji th level of the jth factor on the ith card.

Related Topics

CONJOINT Algorithms
Notation (conjoint analysis algorithms)
Design Matrix (conjoint analysis algorithms)
Converting Card Numbers to Ranks (conjoint analysis algorithms)
Estimation (conjoint analysis algorithms)
Utility (Part Worth) Values (conjoint analysis algorithms)
Standard Errors of Part Worths (conjoint analysis algorithms)
Importance Scores (conjoint analysis algorithms)
Predicted Scores (conjoint analysis algorithms)
Correlations (conjoint analysis algorithms)
Simulations (conjoint analysis algorithms)


Design Matrix (conjoint analysis algorithms)

conjoint analysis algorithms,conjoint analysis algorithms,conjoint analysis algorithms
design matrix,design matrix,design matrix

A design matrix X is formed from the values in the PLAN file. There is one row for each card in the PLAN file. The columns of the matrix are defined by each of the factor variables in the following manner:

• There is a column of 1s for the constant. This column is used for the estimate of β*0.

• For each discrete factor containing mi levels, mi−1 columns are formed. Each column represents the deviation of one of the factor levels from the overall mean. There is a 1 in the column if that level of the factor was observed, a−1 if the last level of the factor was observed, or a 0 otherwise. These columns are used to estimate the mi−1 values of αij.

• For each linear factor, there is one column which is the centered value of that factor (xij−xi). These columns are used to estimate the values for
^
β
i.

• For each quadratic factor there are two columns, one which contains the centered value of the factor (zij−zi), the next which contains the square of the centered factor value (zij−zi)2. These columns are used to estimate the values of
^
γ
*.

Related Topics

CONJOINT Algorithms
Notation (conjoint analysis algorithms)
Model (conjoint analysis algorithms)
Converting Card Numbers to Ranks (conjoint analysis algorithms)
Estimation (conjoint analysis algorithms)
Utility (Part Worth) Values (conjoint analysis algorithms)
Standard Errors of Part Worths (conjoint analysis algorithms)
Importance Scores (conjoint analysis algorithms)
Predicted Scores (conjoint analysis algorithms)
Correlations (conjoint analysis algorithms)
Simulations (conjoint analysis algorithms)


Converting Card Numbers to Ranks (conjoint analysis algorithms)

If the observations are card numbers, they are converted to ranks. If card number i has a value of k, then ri=k.

Related Topics

CONJOINT Algorithms
Notation (conjoint analysis algorithms)
Model (conjoint analysis algorithms)
Design Matrix (conjoint analysis algorithms)
Estimation (conjoint analysis algorithms)
Utility (Part Worth) Values (conjoint analysis algorithms)
Standard Errors of Part Worths (conjoint analysis algorithms)
Importance Scores (conjoint analysis algorithms)
Predicted Scores (conjoint analysis algorithms)
Correlations (conjoint analysis algorithms)
Simulations (conjoint analysis algorithms)


Estimation (conjoint analysis algorithms)

conjoint analysis algorithms,conjoint analysis algorithms,conjoint analysis algorithms
estimation,estimation,estimation

The estimates

(
^
β
*0
^
α
^
β
^
γ
*)´=(X´X)−1X´y

are computed by using a QR decomposition (see MANOVA) where

yi={
ri | if responses are scores
n+1−ri | if responses are ranks

The variance-covariance matrix of these estimates is

^
σ
2(X´X)−1

where

^
σ
2=tΣi=1nΣj=1(rij−
^
r
ij)2/(nt−d−l−2q−1)

The values of
^
γ
are computed by

^
γ
i1=
^
γ
*i1−2
^
γ
*i2 zi

and

^
γ
i2=
^
γ
*i2

with variances

var(
^
γ
j1)=var(
^
γ
*j1)−4zjcov(
^
γ
*j1,
^
γ
j2)+4z2jvar(
^
γ
j2)

and

var(
^
γ
j2)=var(
^
γ
*j2)

where

cov(
^
γ
j1,
^
γ
j2)=cov(
^
γ
*j1,
^
γ
j2)−2z2var(
^
γ
j2)

The value for
^
β
0 is calculated by

^
β
0=
^
β
*0−Σ
^
β
ixi−Σ(
^
γ
i1zi+
^
γ
i2z2i)

with variance

var(
^
β
0)=aΣ−1aa´

where

a=(1, −x1, ..., −xl, −z1, z21, ..., −zq, z2q)

and

Σa=(
var
^
β
*0 		cov(
^
β
*0,
^
β
1) 		cov(
^
β
*0,
^
γ
*q1) 		cov(
^
β
*0,
^
γ
*q2)
var
^
β
1
var
^
γ
*q1
var
^
γ
*q2
)

Related Topics

CONJOINT Algorithms
Notation (conjoint analysis algorithms)
Model (conjoint analysis algorithms)
Design Matrix (conjoint analysis algorithms)
Converting Card Numbers to Ranks (conjoint analysis algorithms)
Utility (Part Worth) Values (conjoint analysis algorithms)
Standard Errors of Part Worths (conjoint analysis algorithms)
Importance Scores (conjoint analysis algorithms)
Predicted Scores (conjoint analysis algorithms)
Correlations (conjoint analysis algorithms)
Simulations (conjoint analysis algorithms)


Utility (Part Worth) Values (conjoint analysis algorithms)

conjoint analysis algorithms,conjoint analysis algorithms,conjoint analysis algorithms
utility values,utility values,utility values

Discrete Factors

^
u
jk={
^
a
jk 		for k=1, ..., mj−1
−mj−1Σj=1
^
a
jk 		for k=mj

Linear Factors

^
u
jk=
^
β
jxk

Ideal or Anti-ideal Factors

^
u
jk=
^
γ
j1zjk+
^
γ
j2z2jk

Related Topics

CONJOINT Algorithms
Notation (conjoint analysis algorithms)
Model (conjoint analysis algorithms)
Design Matrix (conjoint analysis algorithms)
Converting Card Numbers to Ranks (conjoint analysis algorithms)
Estimation (conjoint analysis algorithms)
Standard Errors of Part Worths (conjoint analysis algorithms)
Importance Scores (conjoint analysis algorithms)
Predicted Scores (conjoint analysis algorithms)
Correlations (conjoint analysis algorithms)
Simulations (conjoint analysis algorithms)


Standard Errors of Part Worths (conjoint analysis algorithms)

The standard error of part worth ujk=
√ var(ujk)
where var(ujk) is defined below:

Discrete Factors

var(ujk)={
var(
^
α
jk)
for k=1, ..., mj−1
mj−1Σi=1var(
^
α
jk)−2mj−1Σi=1
Σ
l<i
cov(
^
α
ji,
^
α
jl) 		for k=mj

Linear Factors

var(ujk)=x2kvar(
^
β
j)

Ideal or Anti-ideal Factors

var(ujk)=z2kvar(
^
γ
j1)+2z3kcov(
^
γ
j1,
^
γ
j2)+z4kvar(
^
γ
j2)

Related Topics

CONJOINT Algorithms
Notation (conjoint analysis algorithms)
Model (conjoint analysis algorithms)
Design Matrix (conjoint analysis algorithms)
Converting Card Numbers to Ranks (conjoint analysis algorithms)
Estimation (conjoint analysis algorithms)
Utility (Part Worth) Values (conjoint analysis algorithms)
Importance Scores (conjoint analysis algorithms)
Predicted Scores (conjoint analysis algorithms)
Correlations (conjoint analysis algorithms)
Simulations (conjoint analysis algorithms)


Importance Scores (conjoint analysis algorithms)

conjoint analysis algorithms,conjoint analysis algorithms,conjoint analysis algorithms
importance scores,importance scores,importance scores

The importance score for factor i is

IMPi=100RANGEipΣi=1RANGEi

where RANGEi is the highest minus lowest utility for factor i. If there is a SUBJECT command, the importance for each factor is calculated separately for each subject, and these are then averaged.

Related Topics

CONJOINT Algorithms
Notation (conjoint analysis algorithms)
Model (conjoint analysis algorithms)
Design Matrix (conjoint analysis algorithms)
Converting Card Numbers to Ranks (conjoint analysis algorithms)
Estimation (conjoint analysis algorithms)
Utility (Part Worth) Values (conjoint analysis algorithms)
Standard Errors of Part Worths (conjoint analysis algorithms)
Predicted Scores (conjoint analysis algorithms)
Correlations (conjoint analysis algorithms)
Simulations (conjoint analysis algorithms)


Predicted Scores (conjoint analysis algorithms)

conjoint analysis algorithms,conjoint analysis algorithms,conjoint analysis algorithms
predicted scores,predicted scores,predicted scores
^
r
i=
^
β
0+pΣj=1
^
u
jkji

where
^
u
jkji is the estimated utility (part worth) associated with the kji th level of the jth factor.

Related Topics

CONJOINT Algorithms
Notation (conjoint analysis algorithms)
Model (conjoint analysis algorithms)
Design Matrix (conjoint analysis algorithms)
Converting Card Numbers to Ranks (conjoint analysis algorithms)
Estimation (conjoint analysis algorithms)
Utility (Part Worth) Values (conjoint analysis algorithms)
Standard Errors of Part Worths (conjoint analysis algorithms)
Importance Scores (conjoint analysis algorithms)
Correlations (conjoint analysis algorithms)
Simulations (conjoint analysis algorithms)


Correlations (conjoint analysis algorithms)

conjoint analysis algorithms,conjoint analysis algorithms,conjoint analysis algorithms
correlations,correlations,correlations

Pearson and Kendall correlations are calculated between predicted (
^
r
i) and the observed (ri) responses. See the CORRELATIONS and NONPAR CORR chapters for algorithms. Pearson correlations for holdouts are not calculated.

Related Topics

CONJOINT Algorithms
Notation (conjoint analysis algorithms)
Model (conjoint analysis algorithms)
Design Matrix (conjoint analysis algorithms)
Converting Card Numbers to Ranks (conjoint analysis algorithms)
Estimation (conjoint analysis algorithms)
Utility (Part Worth) Values (conjoint analysis algorithms)
Standard Errors of Part Worths (conjoint analysis algorithms)
Importance Scores (conjoint analysis algorithms)
Predicted Scores (conjoint analysis algorithms)
Simulations (conjoint analysis algorithms)


Simulations (conjoint analysis algorithms)

conjoint analysis algorithms,conjoint analysis algorithms,conjoint analysis algorithms
simulations,simulations,simulations

Each person is assigned a probability pi for each simulation i. The probabilities are all computed based on the predicted score (
^
r
i) for that product. The probabilities are computed as follows:

Max Utility

pi={
1 if
^
r
i=max(
^
r
i)
0 otherwise

BTL

pi=
^
r
i
Σ
j
^
r
j

Logit

pi=e
^
r
i
Σ
j
e
^
r
j

Probabilities are averaged across respondents for the grouped simulation results. For the BTL and Logit methods, only subjects having all positive
^
r
i values are used.

Related Topics

CONJOINT Algorithms
Notation (conjoint analysis algorithms)
Model (conjoint analysis algorithms)
Design Matrix (conjoint analysis algorithms)
Converting Card Numbers to Ranks (conjoint analysis algorithms)
Estimation (conjoint analysis algorithms)
Utility (Part Worth) Values (conjoint analysis algorithms)
Standard Errors of Part Worths (conjoint analysis algorithms)
Importance Scores (conjoint analysis algorithms)
Predicted Scores (conjoint analysis algorithms)
Correlations (conjoint analysis algorithms)


CORRELATIONS Algorithms

CORRELATIONS (command),CORRELATIONS (command),CORRELATIONS (command)
algorithms,algorithms,algorithms
Bivariate Correlations,Bivariate Correlations,Bivariate Correlations
algorithms,algorithms,algorithms
bivariate correlations algorithms,bivariate correlations algorithms,bivariate correlations algorithms

The user-specified treatment for missing values is used for computation of all statistics except, under certain conditions, the means and standard deviations.

Related Topics

Notation (bivariate correlations algorithms)
Statistics (bivariate correlations algorithms)
References (bivariate correlations algorithms)


Notation (bivariate correlations algorithms)

bivariate correlations algorithms,bivariate correlations algorithms,bivariate correlations algorithms
notation,notation,notation

The following notation is used throughout this section unless otherwise specified:

N | Number of cases
Xkl | Value of the variable k for case l
wl | Weight for case l
Wk | Sum of weights of cases used in computation of statistics for variable k
Wkj | Sum of weights of cases used in computation of statistics for variables k and j

Related Topics

CORRELATIONS Algorithms
Statistics (bivariate correlations algorithms)
References (bivariate correlations algorithms)


Statistics (bivariate correlations algorithms)

bivariate correlations algorithms,bivariate correlations algorithms,bivariate correlations algorithms
statistics,statistics,statistics

The following statistics are available.

Related Topics

Means and Standard Deviations (bivariate correlations algorithms)
Cross-product Deviations and Covariances (bivariate correlations algorithms)
Pearson Correlation (bivariate correlations algorithms)
Significance Level of r (bivariate correlations algorithms)
CORRELATIONS Algorithms
Notation (bivariate correlations algorithms)
References (bivariate correlations algorithms)


Means and Standard Deviations (bivariate correlations algorithms)

bivariate correlations algorithms,bivariate correlations algorithms,bivariate correlations algorithms
means and standard deviations,means and standard deviations,means and standard deviations
Xk=NΣl=1wlXklWk
Sk=
√ (NΣl=1wlX2kl−X2kWk)/(Wk−1)

Note: If no treatment for missing values is specified (default is pairwise), means and standard deviations are computed based on all nonmissing values for each variable. If missing values are to be included or listwise is chosen, that option is used for means and standard deviations as well.

Related Topics

Statistics (bivariate correlations algorithms)
Cross-product Deviations and Covariances (bivariate correlations algorithms)
Pearson Correlation (bivariate correlations algorithms)
Significance Level of r (bivariate correlations algorithms)


Cross-product Deviations and Covariances (bivariate correlations algorithms)

bivariate correlations algorithms,bivariate correlations algorithms,bivariate correlations algorithms
cross-product deviations and covariances,cross-product deviations and covariances,cross-product deviations and covariances

The cross-product deviation for variables i and j is

Cij=NΣl=1wlXilXjl−(NΣl=1wlXil)(NΣl=1wlXjl)/Wij

The covariance is

Sij=CijWij−1

Related Topics

Statistics (bivariate correlations algorithms)
Means and Standard Deviations (bivariate correlations algorithms)
Pearson Correlation (bivariate correlations algorithms)
Significance Level of r (bivariate correlations algorithms)


Pearson Correlation (bivariate correlations algorithms)

bivariate correlations algorithms,bivariate correlations algorithms,bivariate correlations algorithms
Pearson correlation,Pearson correlation,Pearson correlation
rij=Cij
√ CiiCjj

Related Topics

Statistics (bivariate correlations algorithms)
Means and Standard Deviations (bivariate correlations algorithms)
Cross-product Deviations and Covariances (bivariate correlations algorithms)
Significance Level of r (bivariate correlations algorithms)


Significance Level of r (bivariate correlations algorithms)

bivariate correlations algorithms,bivariate correlations algorithms,bivariate correlations algorithms
significance level of r,significance level of r,significance level of r

The significance level for rij is based on

t=rij
√ Wij−21−r2ij

which, under the null hypothesis, is distributed as a t with Wij−2 degrees of freedom. By default, the significance level is two-tailed.

Related Topics

Statistics (bivariate correlations algorithms)
Means and Standard Deviations (bivariate correlations algorithms)
Cross-product Deviations and Covariances (bivariate correlations algorithms)
Pearson Correlation (bivariate correlations algorithms)


References (bivariate correlations algorithms)

bivariate correlations algorithms,bivariate correlations algorithms,bivariate correlations algorithms
references,references,references

Blalock, H. M. 1972. Social statistics. New York: McGraw-Hill.

Related Topics

CORRELATIONS Algorithms
Notation (bivariate correlations algorithms)
Statistics (bivariate correlations algorithms)


CORRESPONDENCE Algorithms

CORRESPONDENCE (command),CORRESPONDENCE (command),CORRESPONDENCE (command)
algorithms,algorithms,algorithms
Correspondence Analysis,Correspondence Analysis,Correspondence Analysis
algorithms,algorithms,algorithms
CORRESPONDENCE algorithms,CORRESPONDENCE algorithms,CORRESPONDENCE algorithms

The CORRESPONDENCE algorithm consists of three major parts:

1. A singular value decomposition (SVD)

2. Centering and rescaling of the data and various rescalings of the results

3. Variance estimation by the delta method.

Other names for SVD are “Eckart-Young decomposition” after Eckart and Young (1936), who introduced the technique in psychometrics, and “basic structure” (Horst, 1963). The rescalings and centering, including their rationale, are well explained in Benzécri (1969), Nishisato (1980), Gifi (1981), and Greenacre (1984). Those who are interested in the general framework of matrix approximation and reduction of dimensionality with positive definite row and column metrics are referred to Rao (1980). The delta method is a method that can be used for the derivation of asymptotic distributions and is particularly useful for the approximation of the variance of complex statistics. There are many versions of the delta method, differing in the assumptions made and in the strength of the approximation (Rao, 1973, ch. 6; Bishop et al., 1975, ch. 14; Wolter, 1985, ch. 6).

Other characteristic features of CORRESPONDENCE are the ability to fit supplementary points into the space defined by the active points, the ability to constrain rows and/or columns to have equal scores, and the ability to make biplots using either chi-squared distances, as in standard correspondence analysis, or Euclidean distances.

Related Topics

Notation (CORRESPONDENCE algorithms)
Basic Calculations (CORRESPONDENCE algorithms)
Diagnostics (CORRESPONDENCE algorithms)
References (CORRESPONDENCE algorithms)


Notation (CORRESPONDENCE algorithms)

CORRESPONDENCE algorithms,CORRESPONDENCE algorithms,CORRESPONDENCE algorithms
notation,notation,notation

The following notation is used throughout this chapter unless otherwise stated:

t1 | Total number of rows (row objects)
s1 | Number of supplementary rows
k1 | Number of rows in analysis (t1−s1)
t2 | Total number of columns (column objects)
s2 | Number of supplementary columns
k2 | Number of columns in analysis (t2−s2)
p | Number of dimensions

Data-related quantities:

fij | Nonnegative data value for row i and column j: collected in table F
fi+ | Marginal total of row i, i=1, ...,k1
f+j | Marginal total of column j, j=1, ...,k2
N | Grand total of F

Scores and statistics:

ris | Score of row object i on dimension s
cjs | Score of column object j on dimension s
I | Total inertia

Related Topics

CORRESPONDENCE Algorithms
Basic Calculations (CORRESPONDENCE algorithms)
Diagnostics (CORRESPONDENCE algorithms)
References (CORRESPONDENCE algorithms)


Basic Calculations (CORRESPONDENCE algorithms)

CORRESPONDENCE algorithms,CORRESPONDENCE algorithms,CORRESPONDENCE algorithms
basic calculations,basic calculations,basic calculations

One way to phrase the CORRESPONDENCE objective (cf. Heiser, 1981) is to say that we wish to find row scores {ris} and column scores {cjs} so that the function

σ({ris};{cjs})=
Σ
i
Σ
j
fij
Σ
s
(ris−cjs)2

is minimal, under the standardization restriction either that

Σ
i
fi+ risrit=δst

or

Σ
j
f+j cjscjt=δst

where δst is Kronecker’s delta and t is an alternative index for dimensions. The trivial set of scores ({1},{1}) is excluded.

The CORRESPONDENCE algorithm can be subdivided into five steps, as explained below.

Related Topics

CORRESPONDENCE Algorithms
Notation (CORRESPONDENCE algorithms)
Diagnostics (CORRESPONDENCE algorithms)
References (CORRESPONDENCE algorithms)
Data scaling and centering (CORRESPONDENCE algorithms)
Singular value decomposition (CORRESPONDENCE algorithms)
Adjustment to the row and column metric (CORRESPONDENCE algorithms)
Determination of variances and covariances (CORRESPONDENCE algorithms)
Normalization of row and column scores (CORRESPONDENCE algorithms)


Data scaling and centering (CORRESPONDENCE algorithms)

When rows and/or columns are specified to be equal, first the frequencies of the rows/columns to be equal are summed. The sums are put into the row/column with the smallest row/column number and the other rows/columns are set to zero.

Measure is Chi Square

The first step is to form the auxiliary matrix Z with general element

zij=fij
√ fi+f+j
−
√ fi+f+j
N

The standardization with Chi Square measure is always rcmean (both row and column means removed.

Measure is Euclidean

When Euclidean measure is choosen, the auxiliary matrix Z is formed in two steps:

z˜ij=f˜ij−f˜i+f˜+jN

With f˜ij, f˜i+, and f˜j+ depending on the standardization option.

rmean (remove row means).f˜ij=fij; f˜i+=fi+; f˜+j=Nk2

cmean (remove column means).f˜ij=fij; f˜i+=Nk1; f˜j+=f+j

rcmean (remove both row and column means).f˜ij=fij; f˜i+=fi+; f˜+j=f+j

rsum (equalize row totals, then remove row means).f˜ij=fijf˜i+fi+; f˜i+=Nk1; f˜+j=Nk2

csum (equalize column totals, then remove column means).f˜ij=fijf˜+jf+j; f˜i+=Nk1; f˜+j=Nk2

Then, if not computed yet in the previous step, f˜i+, or/and f˜+j are computed:

f˜i+=Nk1, f˜+j=Nk2, and zij=z˜ij
√ f˜i+f˜+j

Related Topics

Basic Calculations (CORRESPONDENCE algorithms)
Singular value decomposition (CORRESPONDENCE algorithms)
Adjustment to the row and column metric (CORRESPONDENCE algorithms)
Determination of variances and covariances (CORRESPONDENCE algorithms)
Normalization of row and column scores (CORRESPONDENCE algorithms)


Singular value decomposition (CORRESPONDENCE algorithms)

When rows and/or columns are specified as supplementary, first these rows and/or colums of Z are set to zero, yielding Z

Let the singular value decomposition of Z be denoted by

Z=KΛL´

with K´K=I, L´L=I, and Λ diagonal. This decomposition is calculated by a routine based on Golub and Reinsch (1971). It involves Householder reduction to bidiagonal form and diagonalization by a QR procedure with shifts. The routine requires an array with more rows than columns, so when k1<k2 the original table is transposed and the parameter transfer is permuted accordingly.

Related Topics

Basic Calculations (CORRESPONDENCE algorithms)
Data scaling and centering (CORRESPONDENCE algorithms)
Adjustment to the row and column metric (CORRESPONDENCE algorithms)
Determination of variances and covariances (CORRESPONDENCE algorithms)
Normalization of row and column scores (CORRESPONDENCE algorithms)


Adjustment to the row and column metric (CORRESPONDENCE algorithms)

The arrays of both the left-hand singular vectors and the right-hand singular vectors are adjusted row-wise to form scores that are standardized in the row and in the column marginal proportions, respectively:

˜
r
is=kis/
√ f˜i+/N
,

˜
c
js=ljs/
√ f˜+j/N
.

This way, both sets of scores satisfy the standardization restrictions simultaneously.

Related Topics

Basic Calculations (CORRESPONDENCE algorithms)
Data scaling and centering (CORRESPONDENCE algorithms)
Singular value decomposition (CORRESPONDENCE algorithms)
Determination of variances and covariances (CORRESPONDENCE algorithms)
Normalization of row and column scores (CORRESPONDENCE algorithms)


Determination of variances and covariances (CORRESPONDENCE algorithms)

For the application of the delta method to the results of generalized eigenvalue methods under multinomial sampling, the reader is referred to Gifi (1990, ch. 12) and Israëls (1987, Appendix B). It is shown there that N time variance-covariance matrix of a function φ of the observed cell proportions p={pij=f˜ij/N} asymptotically reaches the form

N×cov(φ(p))
˜
=
Σ
i
Σ
j
πij(∂φ∂pij)(∂φ∂pij)´−(
Σ
i
Σ
j
πij∂φ∂pij)(
Σ
i
Σ
j
πij∂φ∂pij)´

Here the quantities πij are the cell probabilities of the multinomial distribution, and ∂φ/∂pij are the partial derivatives of φ (which is either a generalized eigenvalue or a generalized eigenvector) with respect to the observed cell proportion. Expressions for these partial derivatives can also be found in the above-mentioned references.

Related Topics

Basic Calculations (CORRESPONDENCE algorithms)
Data scaling and centering (CORRESPONDENCE algorithms)
Singular value decomposition (CORRESPONDENCE algorithms)
Adjustment to the row and column metric (CORRESPONDENCE algorithms)
Normalization of row and column scores (CORRESPONDENCE algorithms)


Normalization of row and column scores (CORRESPONDENCE algorithms)

Depending on the normalization option chosen, the scores are normalized. The normalization option q can be chosen to be any value in the interval [-1,1] or it can be specified according to the following designations:

q={
0, | symmetrical
1, | row principal
−1, | column principal

There is a fifth possibility, choosing the designation “principal”, that does not correspond to a q-value.

When “principal” is chosen, normalization parameters α for the rows and β for the columns are both set to 1. When one of the other options is chosen, α and β are functions of q:

α = (1+q)/2

β = (1−q)/2

The normalization implies a compensatory rescaling of the coordinate axes of the row scores and the column scores:

ris=
˜
r
isλαs,
cjs=
˜
c
jsλβs.

The general formula for the weighted sum of squares that results from this rescaling is

row scores:
Σ
i
f˜i+r2is=Nλ2αs
column scores:
Σ
j
f˜+jc2js=Nλ2βs

The estimated variances and covariances are adjusted according to the type of normalization chosen.

Related Topics

Basic Calculations (CORRESPONDENCE algorithms)
Data scaling and centering (CORRESPONDENCE algorithms)
Singular value decomposition (CORRESPONDENCE algorithms)
Adjustment to the row and column metric (CORRESPONDENCE algorithms)
Determination of variances and covariances (CORRESPONDENCE algorithms)


Diagnostics (CORRESPONDENCE algorithms)

CORRESPONDENCE algorithms,CORRESPONDENCE algorithms,CORRESPONDENCE algorithms
diagnostics,diagnostics,diagnostics

After printing the data, CORRESPONDENCE optionally also prints a table of row profiles and column profiles, which are {fij/fi+} and {fij/f+j}, respectively.

Related Topics

CORRESPONDENCE Algorithms
Notation (CORRESPONDENCE algorithms)
Basic Calculations (CORRESPONDENCE algorithms)
References (CORRESPONDENCE algorithms)
Singular Values, Maximum Rank and Inertia (CORRESPONDENCE algorithms)
Supplementary Points (CORRESPONDENCE algorithms)
Mass, Scores, Inertia and Contributions (CORRESPONDENCE algorithms)
Confidence Statistics of Singular Values and Scores (CORRESPONDENCE algorithms)
Permutations of the Input Table (CORRESPONDENCE algorithms)


Singular Values, Maximum Rank and Inertia (CORRESPONDENCE algorithms)

maximum rank,maximum rank,maximum rank
CORRESPONDENCE algorithms,CORRESPONDENCE algorithms,CORRESPONDENCE algorithms
singular values,singular values,singular values
CORRESPONDENCE algorithms,CORRESPONDENCE algorithms,CORRESPONDENCE algorithms
inertia,inertia,inertia
CORRESPONDENCE algorithms,CORRESPONDENCE algorithms,CORRESPONDENCE algorithms

All singular values λs defined in the second step are printed up to a maximum of min{(k1−1),(k2−1)}. Small singular values and corresponding dimensions are suppressed when they don’t exceed the quantity (k1k2)1/210−7; in this case a warning message is issued. Dimensionwise inertia and total inertia are given by the relationships

I=
Σ
s
λ2s=
Σ
s
Σ
i
f˜i+r2isN

where the right-hand part of this equality is true only if the normalization is row principal (but for the other normalizations similar relationships are easily derived from step 5). The quantities “proportion explained” are equal to inertia divided by total inertia: λ2s/I.

Related Topics

Diagnostics (CORRESPONDENCE algorithms)
Supplementary Points (CORRESPONDENCE algorithms)
Mass, Scores, Inertia and Contributions (CORRESPONDENCE algorithms)
Confidence Statistics of Singular Values and Scores (CORRESPONDENCE algorithms)
Permutations of the Input Table (CORRESPONDENCE algorithms)


Supplementary Points (CORRESPONDENCE algorithms)

supplementary points,supplementary points,supplementary points
CORRESPONDENCE algorithms,CORRESPONDENCE algorithms,CORRESPONDENCE algorithms

Supplementary row and column points are given by

rsupis=
Σ
j
f˜ijf˜i+cjsλ2α−2s

csupjs=
Σ
i
f˜ijf˜+jrisλ2β−2s

Related Topics

Diagnostics (CORRESPONDENCE algorithms)
Singular Values, Maximum Rank and Inertia (CORRESPONDENCE algorithms)
Mass, Scores, Inertia and Contributions (CORRESPONDENCE algorithms)
Confidence Statistics of Singular Values and Scores (CORRESPONDENCE algorithms)
Permutations of the Input Table (CORRESPONDENCE algorithms)


Mass, Scores, Inertia and Contributions (CORRESPONDENCE algorithms)

mass,mass,mass
CORRESPONDENCE algorithms,CORRESPONDENCE algorithms,CORRESPONDENCE algorithms
scores,scores,scores
CORRESPONDENCE algorithms,CORRESPONDENCE algorithms,CORRESPONDENCE algorithms
inertia,inertia,inertia
CORRESPONDENCE algorithms,CORRESPONDENCE algorithms,CORRESPONDENCE algorithms
contributions,contributions,contributions
CORRESPONDENCE algorithms,CORRESPONDENCE algorithms,CORRESPONDENCE algorithms

The mass, scores, inertia and contributions for the row and columns points (including supplementary points) are given in the Overview Row Points Table and the Overview Column Points Table. These tables are printed in p dimensions. The tables are given first for rows, then for columns. The masses are the marginal proportions (f˜i+/N and f˜+j/N, respectively). The inertia of the rows/columns is given by:

Ii=k2Σjz2ij

Ij=k1Σiz2ij

For supplementary points, the contribution to the inertia of dimensions is zero. The contribution of the active points to the inertia of each dimension is given by

τis=f˜i+Nr2isλ2αs
τjs=f˜+jNc2jsλ2βs

The contribution of dimensions to the inertia of each point is given by

σis=f˜i+Nr2isλ2−2αsIi
σjs=f˜+jNc2jsλ2−2βsIj

Related Topics

Diagnostics (CORRESPONDENCE algorithms)
Singular Values, Maximum Rank and Inertia (CORRESPONDENCE algorithms)
Supplementary Points (CORRESPONDENCE algorithms)
Confidence Statistics of Singular Values and Scores (CORRESPONDENCE algorithms)
Permutations of the Input Table (CORRESPONDENCE algorithms)


Confidence Statistics of Singular Values and Scores (CORRESPONDENCE algorithms)

The computation of variances and covariances is explained in step 4. Since the row and column scores are linear functions of the singular vectors, an adjustment is necessary depending on the normalization option chosen. From these adjusted standard deviations and correlations are derived in the standard way.

Related Topics

Diagnostics (CORRESPONDENCE algorithms)
Singular Values, Maximum Rank and Inertia (CORRESPONDENCE algorithms)
Supplementary Points (CORRESPONDENCE algorithms)
Mass, Scores, Inertia and Contributions (CORRESPONDENCE algorithms)
Permutations of the Input Table (CORRESPONDENCE algorithms)


Permutations of the Input Table (CORRESPONDENCE algorithms)

permutations of the input table,permutations of the input table,permutations of the input table
CORRESPONDENCE algorithms,CORRESPONDENCE algorithms,CORRESPONDENCE algorithms

For each dimension s, let ρ(i|s) be the permutation of the first t1 integers that would sort the sth column of {ris} in ascending order. Similarly, let ρ(j|s)be the permutation of the first t2 integers that would sort the sth column of {cjs} in ascending order. Then the permuted data matrix is given by {fρ(i|s),ρ(j|s)}.

Related Topics

Diagnostics (CORRESPONDENCE algorithms)
Singular Values, Maximum Rank and Inertia (CORRESPONDENCE algorithms)
Supplementary Points (CORRESPONDENCE algorithms)
Mass, Scores, Inertia and Contributions (CORRESPONDENCE algorithms)
Confidence Statistics of Singular Values and Scores (CORRESPONDENCE algorithms)


References (CORRESPONDENCE algorithms)

CORRESPONDENCE algorithms,CORRESPONDENCE algorithms,CORRESPONDENCE algorithms
references,references,references

Benzécri, J. P. 1969. Statistical analysis as a tool to make patterns emerge from data. In: Methodologies of Pattern Recognition, S. Watanabe, eds. New York: Academic Press.

Bishop, Y. M., S. E. Fienberg, and P. W. Holland. 1977. Discrete Multivariate Analysis: Theory and Practice. Cambridge, MA: MIT Press.

Eckart, C., and G. Young. 1936. The approximation of one matrix by another one of lower rank. Psychometrika, 1, 211-218.

Gifi, A. 1990. Nonlinear multivariate analysis. Chichester: John Wiley and Sons.

Golub, G. H., and C. Reinsch. 1971. Linear Algebra. In: Handbook for Automatic Computation, Volume II, J. H. Wilkinson, and C. Reinsch, eds. New York: Springer-Verlag.

Greenacre, M. J. 1984. Theory and applications of correspondence analysis. London: Academic Press.

Heiser, W. J. 1981. Unfolding analysis of proximity data. Leiden: Department of Data Theory, University of Leiden.

Horst, P. 1963. Matrix algebra for social scientists. New York: Holt, Rinehart and Winston.

Israëls, A. 1987. Eigenvalue techniques for qualitative data. Leiden: DSWO Press.

Nishisato, S. 1980. Analysis of categorical data: Dual scaling and its applications. Toronto: University of Toronto Press.

Rao, C. R. 1973. Linear statistical inference and its applications, 2nd ed. New York: John Wiley and Sons.

Rao, C. R. 1980. Matrix approximations and reduction of dimensionality in multivariate statistical analysis. In: Multivariate Analysis, Vol. 5, P. R. Krishnaiah, eds. Amsterdam: North-Holland.

Wolter, K. M. 1985. Introduction to variance estimation. Berlin: Springer-Verlag.

Related Topics

CORRESPONDENCE Algorithms
Notation (CORRESPONDENCE algorithms)
Basic Calculations (CORRESPONDENCE algorithms)
Diagnostics (CORRESPONDENCE algorithms)


COXREG Algorithms

COXREG (command),COXREG (command),COXREG (command)
algorithms,algorithms,algorithms
Cox Regression,Cox Regression,Cox Regression
algorithms,algorithms,algorithms
Cox regression algorithms,Cox regression algorithms,Cox regression algorithms

Cox (1972) first suggested the models in which factors related to lifetime have a multiplicative effect on the hazard function. These models are called proportional hazards models. Under the proportional hazards assumption, the hazard function h of t given X is of the form

h(t | x)=h0(t) ex´β

where x is a known vector of regressor variables associated with the individual, β is a vector of unknown parameters, and h0(t) is the baseline hazard function for an individual with x=0. Hence, for any two covariates sets x1 and x2, the log hazard functions h(t | x1) and h(t | x2) should be parallel across time.

When a factor does not affect the hazard function multiplicatively, stratification may be useful in model building. Suppose that individuals can be assigned to one of m different strata, defined by the levels of one or more factors. The hazard function for an individual in the jth stratum is defined as

hj(t | x)=h0j(t) ex´β

There are two unknown components in the model: the regression parameter β and the baseline hazard function h0j(t). The estimation for the parameters is described below.

Related Topics

Estimation (Cox regression algorithms)
Estimation of Beta (Cox regression algorithms)
Estimation of the Baseline Function (Cox regression algorithms)
Selection Statistics for Stepwise Methods (Cox regression algorithms)
Statistics (Cox regression algorithms)
Diagnostic Statistics (Cox regression algorithms)
Plots (Cox regression algorithms)
References (Cox regression algorithms)


Estimation (Cox regression algorithms)

We begin by considering a nonnegative random variable T representing the lifetimes of individuals in some population. Let f(t | x) denote the probability density function (pdf) of T given a regressor x and let S(t | x) be the survivor function (the probability of an individual surviving until time t). Hence

S(t | x)=∫∞tf(u | x) du

The hazard h(t | x) is then defined by

h(t | x)=f(t | x)S(t | x)

Another useful expression for S(t | x) in terms of h(t | x) is

S(t | x)=exp(−∫t0h(u | x) du)

Thus,

lnS(t | x)=−∫t0h(u | x) du

For some purposes, it is also useful to define the cumulative hazard function

H(t | x)=∫t0h(u | x) du=−lnS(t | x)

Under the proportional hazard assumption, the survivor function can be written as

S(t | x)=[S0(t)]exp(x´β)

where S0(t) is the baseline survivor function defined by

S0(t)=exp(−H0(t))

and

H0(t)=∫t0h0(u) du

Some relationships between S(t | x), H(t | x) and H0(t), S0(t) and h0(t) which will be used later are

lnS(t | x)=−H(t | x)=−exp(x´β)H0(t)
ln(−lnS(t | x))=x´β+lnH0(t)

To estimate the survivor function S(t | x), we can see from the equation for the survivor function that there are two components, β and S0(t), which need to be estimated. The approach we use here is to estimate β from the partial likelihood function and then to maximize the full likelihood for S0(t).

Related Topics

COXREG Algorithms
Estimation of Beta (Cox regression algorithms)
Estimation of the Baseline Function (Cox regression algorithms)
Selection Statistics for Stepwise Methods (Cox regression algorithms)
Statistics (Cox regression algorithms)
Diagnostic Statistics (Cox regression algorithms)
Plots (Cox regression algorithms)
References (Cox regression algorithms)


Estimation of Beta (Cox regression algorithms)

Cox regression algorithms,Cox regression algorithms,Cox regression algorithms
regression coefficient estimation,regression coefficient estimation,regression coefficient estimation

Assume that

• There are m levels for the stratification variable.

• Individuals in the same stratum have proportional hazard functions.

• The relative effect of the regressor variables is the same in each stratum.

Let tj1< ... <tjkj be the observed uncensored failure time of the nj individuals in the jth stratum and xj1,...,xjkj be the corresponding covariates. Then the partial likelihood function is defined by

L(β)=m∏j=1kj∏i=1eS´jiβ(
Σ
lRji
wlex´lβ)dji

where dji is the sum of case weights of individuals whose lifetime is equal to tji and Sji is the weighted sum of the regression vector x for those dji individuals, wl is the case weight of individual l, and Rji is the set of individuals alive and uncensored just prior to tji in the jth stratum. Thus the log-likelihood arising from the partial likelihood function is

l=lnL(β)=mΣj=1kjΣi=1S´jiβ−mΣj=1kjΣi=1djiln(
Σ
lRji
wlex´lβ)

and the first derivatives of l are

Dβr=∂ l∂ βr=mΣj=1kjΣi=1(S(r)ji−dji
Σ
lRji
wlxlrex´lβ
Σ
lRji
wlex´lβ), 		r=1,...,p

S(r)ji is the rth component of Sji=(S(1)ji,...,S(p)ji)´. The maximum partial likelihood estimate (MPLE) of β is obtained by setting ∂ l∂ βr equal to zero for r=1,...,p, where p is the number of independent variables in the model. The equations
∂ l∂ βr=0 (r=1,...,p)
can usually be solved by using the Newton-Raphson method.

Note that from its equation that the partial likelihood function L(β) is invariant under translation. All the covariates are centered by their corresponding overall mean. The overall mean of a covariate is defined as the sum of the product of weight and covariate for all the censored and uncensored cases in each stratum. For notational simplicity, xl used in the Estimation Section denotes centered covariates.

Three convergence criteria for the Newton-Raphson method are available:

• Absolute value of the largest difference in parameter estimates between iterations (δ) divided by the value of the parameter estimate for the previous iteration; that is,

BCON =| δ parameter estimate for previous iteration |

• Absolute difference of the log-likelihood function between iterations divided by the log-likelihood function for previous iteration.

• Maximum number of iterations.

The asymptotic covariance matrix for the MPLE
^
β
=(
^
β
1,...,
^
β
p)´ is estimated by I−1 where I is the information matrix containing minus the second partial derivatives of lnL. The (r, s)-th element of I is defined by

Irs =−E∂2∂ βr∂ βslnL
=mΣj=1kjΣi=1dji[
Σ
lRji
wlxlsxlrex´lβ
Σ
lRji
wlex´lβ−(
Σ
lRji
wlxlrex´lβ)(
Σ
lRji
wlxlsex´lβ)(
Σ
lRji
wlex´lβ)2]

We can also write I in a matrix form as

Irs=mΣj=1kjΣi=1dji(x´(tji)) V(tji) (x(tji))

where x(tji) is a nji×p matrix which represents the p covariate variables in the model evaluated at time tji, nji is the number of distinct individuals in Rji, and V(tji) is a nji×nji matrix with the lth diagonal element vll(tji) defined by

vll(tji)=pl(tji)wl−(wlpl(tji))2

pl(tji)=exp(x´l
^
β
)
Σ
hRji
whexp(x´h
^
β
)

and the (l, k) element vlk(tji) defined by

vlk(tji)=wlpl(tji)×wkpk(tji)

Related Topics

COXREG Algorithms
Estimation (Cox regression algorithms)
Estimation of the Baseline Function (Cox regression algorithms)
Selection Statistics for Stepwise Methods (Cox regression algorithms)
Statistics (Cox regression algorithms)
Diagnostic Statistics (Cox regression algorithms)
Plots (Cox regression algorithms)
References (Cox regression algorithms)


Estimation of the Baseline Function (Cox regression algorithms)

Cox regression algorithms,Cox regression algorithms,Cox regression algorithms
baseline function estimation,baseline function estimation,baseline function estimation

After the MPLE
^
β
of β is found, the baseline survivor function S0j(t) is estimated separately for each stratum. Assume that, for a stratum, t1< ... <tk are observed lifetimes in the sample. There are ni at risk and di deaths at ti, and in the interval [ti−1,ti) there are λi censored times. Since S0(t) is a survivor function, it is non-increasing and left continuous, and thus
^
S
0(t) must be constant except for jumps at the observed lifetimes t1,...,tk.

Further, it follows that

^
S
0(t1)=1

and

^
S
0(ti+)=
^
S
0(ti+1)

Writing
^
S
0(ti+)=pi(i=1,...,k), the observed likelihood function is of the form

L1=k∏i=1{
∏
lDi
(pexp(x´lβ)i−1−pexp(x´lβ)i)wl
∏
lCi
(pexp(x´lβ)i−1)wl}
∏
lCk+1
(pexp(x´lβ)k)wl

where Di is the set of individuals dying at ti and Ci is the set of individuals with censored times in [ti−1,ti). (Note that if the last observation is uncensored, Ck+1 is empty and pk=0)

If we let αi=pi/pi−1(i=1,...,k), L1 can be written as

L1=k∏i=1
∏
lDi
(1−αexp(x´lβ)i)wl
∏
lRi−Di
αwlexp(x´lβ)i

Differentiating lnL1 with respect to α1,...,αk and setting the equations equal to zero, we get

Σ
lDi
wlexp(x´lβ)1−αexp(x´lβ)i=
Σ
lRi
wlexp(x´lβ) 		i=1,...,k

We then plug the MPLE
^
β
of β into this equation and solve these k equations separately.

There are two things worth noting:

• If any |Di|=1,
^
α
i can be solved explicitly.

^
α
i=[1−wiexp(x´i
^
β
)
Σ
lRi
wlexp(x´l
^
β
)]exp(−x´lβ)

• If |Di|>1, the equation for the cumulative hazard function must be solved iteratively for
^
α
i. A good initial value for
^
α
i is

^
α
i=exp(−di
Σ
lRi
wlexp(x´lβ))

where di=
Σ
lDi
wl is the weight sum for set Di. (See Lawless, 1982, p. 361.)

Once the
^
α
i, i=1,...,k are found, S0(t) is estimated by

^
S
0(t)=
∏
i:(ti<t)
^
α
i

Since the above estimate of S0(t) requires some iterative calculations when ties exist, Breslow (1974) suggests using the equation for αi when |Di|>1 as an estimate; however, we will use this as an initial estimate.

The asymptotic variance for −ln
^
S
0(t) can be found in Chapter 4 of Kalbfleisch and Prentice (1980). At a specified time t, it is consistently estimated by

var(−ln
^
S
0(t))=
Σ
ti<t
|Di| (
Σ
lRi
wlexp(x´l
^
β
))−2+a´I−1a

where a is a p×1 vector with the jth element defined by

Σ
ti<t
|Di|
Σ
lRi
wlxljexp(x´l
^
β
)(
Σ
lRi
wlexp(x´l
^
β
))2

and I is the information matrix. The asymptotic variance of
^
S
(t|x) is estimated by

e2x´
^
β
(
^
S
(t|x))2var(−ln
^
S
0(t))

Related Topics

COXREG Algorithms
Estimation (Cox regression algorithms)
Estimation of Beta (Cox regression algorithms)
Selection Statistics for Stepwise Methods (Cox regression algorithms)
Statistics (Cox regression algorithms)
Diagnostic Statistics (Cox regression algorithms)
Plots (Cox regression algorithms)
References (Cox regression algorithms)


Selection Statistics for Stepwise Methods (Cox regression algorithms)

Cox regression algorithms,Cox regression algorithms,Cox regression algorithms
stepwise selection,stepwise selection,stepwise selection
stepwise selection,stepwise selection,stepwise selection
Cox regression algorithms,Cox regression algorithms,Cox regression algorithms

The same methods for variable selection are offered as in binary logistic regression. See the topic Stepwise Variable Selection (logistic regression algorithms) for more information. Here we will only define the three removal statistics—Wald, LR, and Conditional—and the Score entry statistic.

Related Topics

COXREG Algorithms
Estimation (Cox regression algorithms)
Estimation of Beta (Cox regression algorithms)
Estimation of the Baseline Function (Cox regression algorithms)
Statistics (Cox regression algorithms)
Diagnostic Statistics (Cox regression algorithms)
Plots (Cox regression algorithms)
References (Cox regression algorithms)
Score Statistic (Cox regression algorithms)
Wald Statistic (Cox regression algorithms)
LR (Likelihood Ratio) Statistic (Cox regression algorithms)
Conditional Statistic (Cox regression algorithms)


Score Statistic (Cox regression algorithms)

score statistic,score statistic,score statistic
Cox regression algorithms,Cox regression algorithms,Cox regression algorithms

The score statistic is calculated for every variable not in the model to decide which variable should be added to the model. First we compute the information matrix I for all eligible variables based on the parameter estimates for the variables in the model and zero parameter estimates for the variables not in the model. Then we partition the resulting I into four submatrices as follows:

[
A11 | A12
A21 | A22
]

where A11 and A22 are square matrices for variables in the model and variables not in the model, respectively, and A12 is the cross-product matrix for variables in and out. The score statistic for variable xi is defined by

D´xiB22,iDxi

where Dxi is the first derivative of the log-likelihood with respect to all the parameters associated with xi and B22,i is equal to (A22,i−A21,iA−111A12,i)−1, and A22,i and A12,i are the submatrices in A22 and A12 associated with variable xi.

Related Topics

Selection Statistics for Stepwise Methods (Cox regression algorithms)
Wald Statistic (Cox regression algorithms)
LR (Likelihood Ratio) Statistic (Cox regression algorithms)
Conditional Statistic (Cox regression algorithms)


Wald Statistic (Cox regression algorithms)

Wald statistic,Wald statistic,Wald statistic
Cox regression algorithms,Cox regression algorithms,Cox regression algorithms

The Wald statistic is calculated for the variables in the model to select variables for removal. The Wald statistic for variable xj is defined by

^
β
´jB11,j
^
β
j

where
^
β
j is the parameter estimate associated with xj and B11,j is the submatrix of A−111 associated with xj .

Related Topics

Selection Statistics for Stepwise Methods (Cox regression algorithms)
Score Statistic (Cox regression algorithms)
LR (Likelihood Ratio) Statistic (Cox regression algorithms)
Conditional Statistic (Cox regression algorithms)


LR (Likelihood Ratio) Statistic (Cox regression algorithms)

likelihood ratio statistic,likelihood ratio statistic,likelihood ratio statistic
Cox regression algorithms,Cox regression algorithms,Cox regression algorithms

The LR statistic is defined as twice the log of the ratio of the likelihood functions of two models evaluated at their own MPLES. Assume that r variables are in the current model and let us call the current model the full model. Based on the MPLES of parameters for the full model, l(full) is defined in Estimation of Beta (Cox regression algorithms). For each of r variables deleted from the full model, MPLES are found and the reduced log-likelihood function, l(reduced), is calculated. Then LR statistic is defined as

–2(l(reduced) – l(full))

Related Topics

Selection Statistics for Stepwise Methods (Cox regression algorithms)
Score Statistic (Cox regression algorithms)
Wald Statistic (Cox regression algorithms)
Conditional Statistic (Cox regression algorithms)


Conditional Statistic (Cox regression algorithms)

conditional statistic,conditional statistic,conditional statistic
Cox regression algorithms,Cox regression algorithms,Cox regression algorithms

The conditional statistic is also computed for every variable in the model. The formula for conditional statistic is the same as LR statistic except that the parameter estimates for each reduced model are conditional estimates, not MPLES. The conditional estimates are defined as follows. Let
^
β
=(
^
β
1,...,
^
β
r)´ be the MPLES for the r variables (blocks) and C be the asymptotic covariance for the parameters left in the model given
^
β
i is

˜
β
(i)=
^
β
(i)−C(i)12(C(i)22)−1
^
β
i

where
^
β
i is the MPLE for the parameter(s) associated with xi and
^
β
(i) is
^
β
without
^
β
i, C(i)12 is the covariance between the parameter estimates left in the model
^
β
(i) and
^
β
i, and C(i)22 is the covariance of
^
β
i. Then the conditional statistic for variable xi is defined by

−2(l( b (i))−l(full))

where l(
˜
β
(i)) is the log-likelihood function evaluated at
˜
β
(i).

Note that all these four statistics have a chi-square distribution with degrees of freedom equal to the number of parameters the corresponding model has.

Related Topics

Selection Statistics for Stepwise Methods (Cox regression algorithms)
Score Statistic (Cox regression algorithms)
Wald Statistic (Cox regression algorithms)
LR (Likelihood Ratio) Statistic (Cox regression algorithms)


Statistics (Cox regression algorithms)

Cox regression algorithms,Cox regression algorithms,Cox regression algorithms
output statistics,output statistics,output statistics

The following output statistics are available.

Related Topics

COXREG Algorithms
Estimation (Cox regression algorithms)
Estimation of Beta (Cox regression algorithms)
Estimation of the Baseline Function (Cox regression algorithms)
Selection Statistics for Stepwise Methods (Cox regression algorithms)
Diagnostic Statistics (Cox regression algorithms)
Plots (Cox regression algorithms)
References (Cox regression algorithms)
Initial Model Information (Cox regression algorithms)
Model Information (Cox regression algorithms)
–2 Log-Likelihood (Cox regression algorithms)
Improvement Chi-Square (Cox regression algorithms)
Model Chi-Square (Cox regression algorithms)
Overall Chi-Square (Cox regression algorithms)
Information for Variables in the Equation (Cox regression algorithms)
Information for the Variables Not in the Equation (Cox regression algorithms)
Survival Table (Cox regression algorithms)


Initial Model Information (Cox regression algorithms)

model information,model information,model information
Cox regression algorithms,Cox regression algorithms,Cox regression algorithms

The initial model for the first method is for a model that does not include covariates. The log-likelihood function l is equal to

l(0)=−mΣj=1kjΣi=1djiln(n*ji)

where n*ji is the sum of weights of individuals in set Rji.

Related Topics

Statistics (Cox regression algorithms)
Model Information (Cox regression algorithms)
–2 Log-Likelihood (Cox regression algorithms)
Improvement Chi-Square (Cox regression algorithms)
Model Chi-Square (Cox regression algorithms)
Overall Chi-Square (Cox regression algorithms)
Information for Variables in the Equation (Cox regression algorithms)
Information for the Variables Not in the Equation (Cox regression algorithms)
Survival Table (Cox regression algorithms)


Model Information (Cox regression algorithms)

model information,model information,model information
Cox regression algorithms,Cox regression algorithms,Cox regression algorithms

When a stepwise method is requested, at each step, the −2 log-likelihood function and three chi-square statistics (model chi-square, improvement chi-square, and overall chi-square) and their corresponding degrees of freedom and significance are printed.

Related Topics

Statistics (Cox regression algorithms)
Initial Model Information (Cox regression algorithms)
–2 Log-Likelihood (Cox regression algorithms)
Improvement Chi-Square (Cox regression algorithms)
Model Chi-Square (Cox regression algorithms)
Overall Chi-Square (Cox regression algorithms)
Information for Variables in the Equation (Cox regression algorithms)
Information for the Variables Not in the Equation (Cox regression algorithms)
Survival Table (Cox regression algorithms)


–2 Log-Likelihood (Cox regression algorithms)

−2mΣj=1kjΣi=1(s´ji
^
β
−djiln(
Σ
lRji
wlexp(x´l
^
β
)))

where
^
β
is the MPLE of β for the current model.

Related Topics

Statistics (Cox regression algorithms)
Initial Model Information (Cox regression algorithms)
Model Information (Cox regression algorithms)
Improvement Chi-Square (Cox regression algorithms)
Model Chi-Square (Cox regression algorithms)
Overall Chi-Square (Cox regression algorithms)
Information for Variables in the Equation (Cox regression algorithms)
Information for the Variables Not in the Equation (Cox regression algorithms)
Survival Table (Cox regression algorithms)


Improvement Chi-Square (Cox regression algorithms)

(–2 log-likelihood function for previous model) – ( –2 log-likelihood function for current model).

The previous model is the model from the last step. The degrees of freedom are equal to the absolute value of the difference between the number of parameters estimated in these two models.

Related Topics

Statistics (Cox regression algorithms)
Initial Model Information (Cox regression algorithms)
Model Information (Cox regression algorithms)
–2 Log-Likelihood (Cox regression algorithms)
Model Chi-Square (Cox regression algorithms)
Overall Chi-Square (Cox regression algorithms)
Information for Variables in the Equation (Cox regression algorithms)
Information for the Variables Not in the Equation (Cox regression algorithms)
Survival Table (Cox regression algorithms)


Model Chi-Square (Cox regression algorithms)

(–2 log-likelihood function for initial model) – ( –2 log-likelihood function for current model).

The initial model is the final model from the previous method. The degrees of freedom are equal to the absolute value of the difference between the number of parameters estimated in these two model.

Note: The values of the model chi-square and improvement chi-square can be less than or equal to zero. If the degrees of freedom are equal to zero, the chi-square is not printed.

Related Topics

Statistics (Cox regression algorithms)
Initial Model Information (Cox regression algorithms)
Model Information (Cox regression algorithms)
–2 Log-Likelihood (Cox regression algorithms)
Improvement Chi-Square (Cox regression algorithms)
Overall Chi-Square (Cox regression algorithms)
Information for Variables in the Equation (Cox regression algorithms)
Information for the Variables Not in the Equation (Cox regression algorithms)
Survival Table (Cox regression algorithms)


Overall Chi-Square (Cox regression algorithms)

The overall chi-square statistic tests the hypothesis that all regression coefficients for the variables in the model are identically zero. This statistic is defined as

u´(0)I−1u(0)

where u(0) represents the vector of first derivatives of the partial log-likelihood function evaluated at β=0. The elements of u and I are defined in Estimation of Beta (Cox regression algorithms).

Related Topics

Statistics (Cox regression algorithms)
Initial Model Information (Cox regression algorithms)
Model Information (Cox regression algorithms)
–2 Log-Likelihood (Cox regression algorithms)
Improvement Chi-Square (Cox regression algorithms)
Model Chi-Square (Cox regression algorithms)
Information for Variables in the Equation (Cox regression algorithms)
Information for the Variables Not in the Equation (Cox regression algorithms)
Survival Table (Cox regression algorithms)


Information for Variables in the Equation (Cox regression algorithms)

For each of the single variables in the equation, MPLE, SE for MPLE, Wald statistic, and its corresponding df, significance, and partial R are given. For a single variable, R is defined by

R=[ Wald −2− 2 log-likelihood for the intial model ]1/2× sign of MPLE

if Wald >2. Otherwise R is set to zero. For a multiple category variable, only the Wald statistic, df, significance, and partial R are printed, where R is defined by

R=[ Wald −2* df − 2 log-likelihood for the intial model ]1/2

if Wald >2 df . Otherwise R is set to zero.

Related Topics

Statistics (Cox regression algorithms)
Initial Model Information (Cox regression algorithms)
Model Information (Cox regression algorithms)
–2 Log-Likelihood (Cox regression algorithms)
Improvement Chi-Square (Cox regression algorithms)
Model Chi-Square (Cox regression algorithms)
Overall Chi-Square (Cox regression algorithms)
Information for the Variables Not in the Equation (Cox regression algorithms)
Survival Table (Cox regression algorithms)


Information for the Variables Not in the Equation (Cox regression algorithms)

For each of the variables not in the equation, the Score statistic is calculated and its corresponding degrees of freedom, significance, and partial R are printed. The partial R for variables not in the equation is defined similarly to the R for the variables in the equation by changing the Wald statistic to the Score statistic.

There is one overall statistic called the residual chi-square. This statistic tests if all regression coefficients for the variables not in the equation are zero. It is defined by

u´(
^
β
)B22 u(
^
β
)

where u(
^
β
) is the vector of first derivatives of the partial log-likelihood function with respect to all the parameters not in the equation evaluated at MPLE
^
β
and B22 is equal to (A22−A21A−111A12)−1 and A is defined in Score Statistic (Cox regression algorithms).

Related Topics

Statistics (Cox regression algorithms)
Initial Model Information (Cox regression algorithms)
Model Information (Cox regression algorithms)
–2 Log-Likelihood (Cox regression algorithms)
Improvement Chi-Square (Cox regression algorithms)
Model Chi-Square (Cox regression algorithms)
Overall Chi-Square (Cox regression algorithms)
Information for Variables in the Equation (Cox regression algorithms)
Survival Table (Cox regression algorithms)


Survival Table (Cox regression algorithms)

For each stratum, the estimates of the baseline cumulative survival (S0) and hazard (H0) function and their standard errors are computed. H0(t) is estimated by

^
H
0(t)=−ln
^
S
0(t)

and the asymptotic variance of
^
H
0(t) is defined in Estimation of the Baseline Function (Cox regression algorithms). Finally, the cumulative hazard function H(t | x) and survival function S(t | x) are estimated by

^
H
(t | x)=exp(x´
^
β
)
^
H
0(t)

and, for a given x,

^
S
(t | x)=[
^
S
0(t)]exp(x´
^
β
)

The asymptotic variances are

var(
^
H
(t | x))=exp(2x´
^
β
)var(
^
H
0(t))

and

var(
^
S
(t | x))=exp(2x´
^
β
)(
^
S
(t | x))2var(
^
H
0(t))

Related Topics

Statistics (Cox regression algorithms)
Initial Model Information (Cox regression algorithms)
Model Information (Cox regression algorithms)
–2 Log-Likelihood (Cox regression algorithms)
Improvement Chi-Square (Cox regression algorithms)
Model Chi-Square (Cox regression algorithms)
Overall Chi-Square (Cox regression algorithms)
Information for Variables in the Equation (Cox regression algorithms)
Information for the Variables Not in the Equation (Cox regression algorithms)


Diagnostic Statistics (Cox regression algorithms)

Cox regression algorithms,Cox regression algorithms,Cox regression algorithms
diagnostic statistics,diagnostic statistics,diagnostic statistics

Three casewise diagnostic statistics, Residual, Partial Residual, and DFBETAs, are produced. Both Residual and DFBETA are computed for all distinct individuals. Partial Residuals are calculated only for uncensored individuals.

Assume that there are nj subjects in stratum j and kj distinct observed events t1< ... <tkj. Define the selected probability for the lth individual at time ti as

pl(ti)={
exp(x´l(ti)
^
β
)
Σ
hRi
whexp(x´h(ti)
^
β
) 		if l th individual is in Ri
0
otherwise

and

ul=kjΣi=1di[pl(ti)−p2l(ti)]
yl(ti)={
1 | if l th individual is in Di
0 | otherwise
rl=kjΣi=1[yl(ti)−dipl(ti)]

Related Topics

COXREG Algorithms
Estimation (Cox regression algorithms)
Estimation of Beta (Cox regression algorithms)
Estimation of the Baseline Function (Cox regression algorithms)
Selection Statistics for Stepwise Methods (Cox regression algorithms)
Statistics (Cox regression algorithms)
Plots (Cox regression algorithms)
References (Cox regression algorithms)
DFBETA (Cox regression algorithms)
Partial Residuals (Cox regression algorithms)
Residuals (Cox regression algorithms)


DFBETA (Cox regression algorithms)

DfBeta,DfBeta,DfBeta
Cox regression algorithms,Cox regression algorithms,Cox regression algorithms

The changes in the maximum partial likelihood estimate of beta due to the deletion of a single observation have been discussed in Cain and Lange (1984) and Storer and Crowley (1985). The estimate of DFBETA computed is derived from augmented regression models. The details can be found in Storer and Crowley (1985). When the lth individual in the jth stratum is deleted, the change Δβl is estimated by

Δβl=−1mI−1vlrl

where

w=diag(w1,...,wnji)
vl=kjΣi=1dipl(ti)(xl(ti)−x(ti)w p(ti))
p(ti)=(p1(ti),...,pnji(ti))´
ml=ul−vlI−1vl

and x´(ti) is an nji×p matrix which represents the p covariate variables in the model evaluated at ti, and nji is the number of individuals in Rji.

Related Topics

Diagnostic Statistics (Cox regression algorithms)
Partial Residuals (Cox regression algorithms)
Residuals (Cox regression algorithms)


Partial Residuals (Cox regression algorithms)

partial residuals,partial residuals,partial residuals
Cox regression algorithms,Cox regression algorithms,Cox regression algorithms

Partial residuals can only be computed for the covariates which are not time dependent. At time ti in stratum j, xg is the p×1 observed covariate vector for any gth individual in set Di, where Di is the set of individuals dying at ti. The partial residual γg is defined by

γg=(
γg1
...
γgp
)=xg−p(ti) x

Rewriting the above formula in a univariate form, we get

γgh=xgh−
Σ
lRi
wlxlhexp(x´l
^
β
)
Σ
lRi
wlexp(x´l
^
β
), 		h=1,...,p,gDi

where xgh is the hth component for xg. For every variable, the residuals can be plotted against times to test the proportional hazards assumption.

Related Topics

Diagnostic Statistics (Cox regression algorithms)
DFBETA (Cox regression algorithms)
Residuals (Cox regression algorithms)


Residuals (Cox regression algorithms)

residuals,residuals,residuals
Cox regression algorithms,Cox regression algorithms,Cox regression algorithms

The residuals ei are computed by

ei=
^
H
(ti | xi)=exp(x´i
^
β
) (
^
H
0(ti))

which is the same as the estimate of the cumulative hazard function.

Related Topics

Diagnostic Statistics (Cox regression algorithms)
DFBETA (Cox regression algorithms)
Partial Residuals (Cox regression algorithms)


Plots (Cox regression algorithms)

Cox regression algorithms,Cox regression algorithms,Cox regression algorithms
plots,plots,plots

For a specified pattern, the covariate values xc are determined and xc is computed. There are three plots available for Cox regression.

Related Topics

COXREG Algorithms
Estimation (Cox regression algorithms)
Estimation of Beta (Cox regression algorithms)
Estimation of the Baseline Function (Cox regression algorithms)
Selection Statistics for Stepwise Methods (Cox regression algorithms)
Statistics (Cox regression algorithms)
Diagnostic Statistics (Cox regression algorithms)
References (Cox regression algorithms)
Survival Plot (Cox regression algorithms)
Hazard Plot (Cox regression algorithms)
LML Plot (Cox regression algorithms)


Survival Plot (Cox regression algorithms)

survival plots,survival plots,survival plots
Cox regression algorithms,Cox regression algorithms,Cox regression algorithms

For stratum j, (ti,
^
S
0(ti | xc)), i=1,...,kj are plotted where

^
S
(ti | xc)=(
^
S
0(ti))exp(x´c
^
β
)

When PATTERN(ALL) is requested, for every uncensored time ti in stratum j the survival function is estimated by

^
S
(ti)=kjΣl=1wl
^
S
(ti | xc)kjΣl=1wl=kjΣl=1wl(
^
S
0(ti))exp(x´c
^
β
)kjΣl=1wl

Then (ti,
^
S
(ti)), i=1,...,kj are plotted for stratum j.

Related Topics

Plots (Cox regression algorithms)
Hazard Plot (Cox regression algorithms)
LML Plot (Cox regression algorithms)


Hazard Plot (Cox regression algorithms)

hazard plots,hazard plots,hazard plots
Cox regression algorithms,Cox regression algorithms,Cox regression algorithms

For stratum j, (ti,
^
H
(ti | xc)), i=1,...,kj are plotted where

^
H
(ti | xc)=exp(x´c
^
β
)
^
H
0(ti)

Related Topics

Plots (Cox regression algorithms)
Survival Plot (Cox regression algorithms)
LML Plot (Cox regression algorithms)


LML Plot (Cox regression algorithms)

log-minus-log plots,log-minus-log plots,log-minus-log plots
Cox regression algorithms,Cox regression algorithms,Cox regression algorithms

The log-minus-log plot is used to see whether the stratification variable should be included as a covariate. For stratum j, (ti,x´c
^
β
+ln
^
H
0(ti)), i=1,...,kj are plotted. If the plot shows parallelism among strata, then the stratum variable should be a covariate.

Related Topics

Plots (Cox regression algorithms)
Survival Plot (Cox regression algorithms)
Hazard Plot (Cox regression algorithms)


References (Cox regression algorithms)

Breslow, N. E. 1974. Covariance analysis of censored survival data. Biometrics, 30, 89-99.

Cain, K. C., and N. T. Lange. 1984. Approximate case influence for the proportional hazards regression model with censored data. Biometrics, 40, 493-499.

Cox, D. R. 1972. Regression models and life tables (with discussion). Journal of the Royal Statistical Society, Series B, 34, 187-220.

Kalbfleisch, J. D., and R. L. Prentice. 2002. The statistical analysis of failure time data, 2 ed. New York: John Wiley & Sons, Inc.

Lawless, R. F. 1982. Statistical models and methods for lifetime data. New York: John Wiley & Sons, Inc..

Storer, B. E., and J. Crowley. 1985. A diagnostic for Cox regression and general conditional likelihoods. Journal of the American Statistical Association, 80, 139-147.

Related Topics

COXREG Algorithms
Estimation (Cox regression algorithms)
Estimation of Beta (Cox regression algorithms)
Estimation of the Baseline Function (Cox regression algorithms)
Selection Statistics for Stepwise Methods (Cox regression algorithms)
Statistics (Cox regression algorithms)
Diagnostic Statistics (Cox regression algorithms)
Plots (Cox regression algorithms)


CREATE Algorithms

CREATE (command),CREATE (command),CREATE (command)
algorithms,algorithms,algorithms
Create Time Series,Create Time Series,Create Time Series
algorithms,algorithms,algorithms
create time series algorithms,create time series algorithms,create time series algorithms

CREATE produces new series as a function of existing series.

Related Topics

Notation (create time series algorithms)
Cumulative Sum (CSUM(X)) (create time series algorithms)
Differences of Order m (DIFF(X,m)) (create time series algorithms)
Lag of Order m (LAG(X,m)) (create time series algorithms)
Lead of Order m (LEAD(X,m)) (create time series algorithms)
Moving Average of Length m (MA(X,m)) (create time series algorithms)
Running Median of Length m (X,m) (create time series algorithms)
Seasonal Differencing of Order m and Period p (SDIFF(X,m,p)) (create time series algorithms)
The T4253H Smoothing Function (T4253H(X)) (create time series algorithms)
Prior Moving Averages of Length m (PMA(X,m)) (create time series algorithms)
Fast Fourier Transform (FFT(X)) (create time series algorithms)
Inverse Fast Fourier Transform of Two Series (IFFT(a,b)) (create time series algorithms)
References (create time series algorithms)


Notation (create time series algorithms)

create time series algorithms,create time series algorithms,create time series algorithms
notation,notation,notation

The following notation is used throughout this chapter unless otherwise stated:

Existing Series | X1, ...,Xn
New Series | Y1, ...,Yn

Related Topics

CREATE Algorithms
Cumulative Sum (CSUM(X)) (create time series algorithms)
Differences of Order m (DIFF(X,m)) (create time series algorithms)
Lag of Order m (LAG(X,m)) (create time series algorithms)
Lead of Order m (LEAD(X,m)) (create time series algorithms)
Moving Average of Length m (MA(X,m)) (create time series algorithms)
Running Median of Length m (X,m) (create time series algorithms)
Seasonal Differencing of Order m and Period p (SDIFF(X,m,p)) (create time series algorithms)
The T4253H Smoothing Function (T4253H(X)) (create time series algorithms)
Prior Moving Averages of Length m (PMA(X,m)) (create time series algorithms)
Fast Fourier Transform (FFT(X)) (create time series algorithms)
Inverse Fast Fourier Transform of Two Series (IFFT(a,b)) (create time series algorithms)
References (create time series algorithms)


Cumulative Sum (CSUM(X)) (create time series algorithms)

cumulative sum function,cumulative sum function,cumulative sum function
create time series algorithms,create time series algorithms,create time series algorithms
create time series algorithms,create time series algorithms,create time series algorithms
cumulative sum (CSUM(X)),cumulative sum (CSUM(X)),cumulative sum (CSUM(X))
Yj=
jΣi=1Xi j=1,...,n

Related Topics

CREATE Algorithms
Notation (create time series algorithms)
Differences of Order m (DIFF(X,m)) (create time series algorithms)
Lag of Order m (LAG(X,m)) (create time series algorithms)
Lead of Order m (LEAD(X,m)) (create time series algorithms)
Moving Average of Length m (MA(X,m)) (create time series algorithms)
Running Median of Length m (X,m) (create time series algorithms)
Seasonal Differencing of Order m and Period p (SDIFF(X,m,p)) (create time series algorithms)
The T4253H Smoothing Function (T4253H(X)) (create time series algorithms)
Prior Moving Averages of Length m (PMA(X,m)) (create time series algorithms)
Fast Fourier Transform (FFT(X)) (create time series algorithms)
Inverse Fast Fourier Transform of Two Series (IFFT(a,b)) (create time series algorithms)
References (create time series algorithms)


Differences of Order m (DIFF(X,m)) (create time series algorithms)

differencing function,differencing function,differencing function
create time series algorithms,create time series algorithms,create time series algorithms
create time series algorithms,create time series algorithms,create time series algorithms
differences of order m (DIFF(X,m)),differences of order m (DIFF(X,m)),differences of order m (DIFF(X,m))

Define

Zj(k)=Zj(k−1)−Zj−1(k−1) k=1,...,m j=k+1,...,n

with

Zj(0)=Xj j=1,...,n

then

Yj={
Zj(m) | j=m+1,...,n
SYSMIS | otherwise

Related Topics

CREATE Algorithms
Notation (create time series algorithms)
Cumulative Sum (CSUM(X)) (create time series algorithms)
Lag of Order m (LAG(X,m)) (create time series algorithms)
Lead of Order m (LEAD(X,m)) (create time series algorithms)
Moving Average of Length m (MA(X,m)) (create time series algorithms)
Running Median of Length m (X,m) (create time series algorithms)
Seasonal Differencing of Order m and Period p (SDIFF(X,m,p)) (create time series algorithms)
The T4253H Smoothing Function (T4253H(X)) (create time series algorithms)
Prior Moving Averages of Length m (PMA(X,m)) (create time series algorithms)
Fast Fourier Transform (FFT(X)) (create time series algorithms)
Inverse Fast Fourier Transform of Two Series (IFFT(a,b)) (create time series algorithms)
References (create time series algorithms)


Lag of Order m (LAG(X,m)) (create time series algorithms)

lag function,lag function,lag function
create time series algorithms,create time series algorithms,create time series algorithms
create time series algorithms,create time series algorithms,create time series algorithms
lag of order m (LAG(X,m)),lag of order m (LAG(X,m)),lag of order m (LAG(X,m))
Yj={
Xj−m | j=m+1,...,n
SYSMIS | j=1,...,m

Related Topics

CREATE Algorithms
Notation (create time series algorithms)
Cumulative Sum (CSUM(X)) (create time series algorithms)
Differences of Order m (DIFF(X,m)) (create time series algorithms)
Lead of Order m (LEAD(X,m)) (create time series algorithms)
Moving Average of Length m (MA(X,m)) (create time series algorithms)
Running Median of Length m (X,m) (create time series algorithms)
Seasonal Differencing of Order m and Period p (SDIFF(X,m,p)) (create time series algorithms)
The T4253H Smoothing Function (T4253H(X)) (create time series algorithms)
Prior Moving Averages of Length m (PMA(X,m)) (create time series algorithms)
Fast Fourier Transform (FFT(X)) (create time series algorithms)
Inverse Fast Fourier Transform of Two Series (IFFT(a,b)) (create time series algorithms)
References (create time series algorithms)


Lead of Order m (LEAD(X,m)) (create time series algorithms)

lead function,lead function,lead function
create time series algorithms,create time series algorithms,create time series algorithms
create time series algorithms,create time series algorithms,create time series algorithms
lead of order m (LEAD(X,m)),lead of order m (LEAD(X,m)),lead of order m (LEAD(X,m))
Yj={
Xj+m | j=1,...,n−m
SYSMIS | j=n−m+1,...,n

Related Topics

CREATE Algorithms
Notation (create time series algorithms)
Cumulative Sum (CSUM(X)) (create time series algorithms)
Differences of Order m (DIFF(X,m)) (create time series algorithms)
Lag of Order m (LAG(X,m)) (create time series algorithms)
Moving Average of Length m (MA(X,m)) (create time series algorithms)
Running Median of Length m (X,m) (create time series algorithms)
Seasonal Differencing of Order m and Period p (SDIFF(X,m,p)) (create time series algorithms)
The T4253H Smoothing Function (T4253H(X)) (create time series algorithms)
Prior Moving Averages of Length m (PMA(X,m)) (create time series algorithms)
Fast Fourier Transform (FFT(X)) (create time series algorithms)
Inverse Fast Fourier Transform of Two Series (IFFT(a,b)) (create time series algorithms)
References (create time series algorithms)


Moving Average of Length m (MA(X,m)) (create time series algorithms)

moving average function,moving average function,moving average function
create time series algorithms,create time series algorithms,create time series algorithms
create time series algorithms,create time series algorithms,create time series algorithms
moving average of length m (MA(X,m)),moving average of length m (MA(X,m)),moving average of length m (MA(X,m))

If m is odd, define

q=m−12

then

Yj={
qΣk=−qXj+k/m | j=q+1,...,n−q
SYSMIS | otherwise

If m is even, define q=m/2 and

Zj=
qΣk=−q+1Xj+k/m j=q,...,n−q

then

Yj={
(Zj−1+Zj)/2 | j=q+1,...,n−q
SYSMIS | otherwise

Related Topics

CREATE Algorithms
Notation (create time series algorithms)
Cumulative Sum (CSUM(X)) (create time series algorithms)
Differences of Order m (DIFF(X,m)) (create time series algorithms)
Lag of Order m (LAG(X,m)) (create time series algorithms)
Lead of Order m (LEAD(X,m)) (create time series algorithms)
Running Median of Length m (X,m) (create time series algorithms)
Seasonal Differencing of Order m and Period p (SDIFF(X,m,p)) (create time series algorithms)
The T4253H Smoothing Function (T4253H(X)) (create time series algorithms)
Prior Moving Averages of Length m (PMA(X,m)) (create time series algorithms)
Fast Fourier Transform (FFT(X)) (create time series algorithms)
Inverse Fast Fourier Transform of Two Series (IFFT(a,b)) (create time series algorithms)
References (create time series algorithms)


Running Median of Length m (X,m) (create time series algorithms)

running median function,running median function,running median function
create time series algorithms,create time series algorithms,create time series algorithms
create time series algorithms,create time series algorithms,create time series algorithms
running median of length m (X,m),running median of length m (X,m),running median of length m (X,m)

If m is odd,

q=m−12
Yj={
median (Xj−q,Xj−q+1,...,Xj,Xj+1,...,Xj+q) | j=q+1,...,n−q
SYSMIS | otherwise

If m is even, define

Zj= median (Xj−q+1,...,Xj,Xj+1,...,Xj+q) j=q,...,n−q

then

Yj={
(Zj−1+Zj)/2 | j=q+1,...,n−q
SYSMIS | otherwise

where

median(a1,...,ak)={
a(l) | if k is odd
(a(l)+a(l+1))/2 | if k is even
l={
(k+1)/2 | if k is odd
k/2 | if k is even

and a(1)<a(2)< ...<a(k) is the ordered sample of a1,...,ak.

Related Topics

CREATE Algorithms
Notation (create time series algorithms)
Cumulative Sum (CSUM(X)) (create time series algorithms)
Differences of Order m (DIFF(X,m)) (create time series algorithms)
Lag of Order m (LAG(X,m)) (create time series algorithms)
Lead of Order m (LEAD(X,m)) (create time series algorithms)
Moving Average of Length m (MA(X,m)) (create time series algorithms)
Seasonal Differencing of Order m and Period p (SDIFF(X,m,p)) (create time series algorithms)
The T4253H Smoothing Function (T4253H(X)) (create time series algorithms)
Prior Moving Averages of Length m (PMA(X,m)) (create time series algorithms)
Fast Fourier Transform (FFT(X)) (create time series algorithms)
Inverse Fast Fourier Transform of Two Series (IFFT(a,b)) (create time series algorithms)
References (create time series algorithms)


Seasonal Differencing of Order m and Period p (SDIFF(X,m,p)) (create time series algorithms)

seasonal difference function,seasonal difference function,seasonal difference function
create time series algorithms,create time series algorithms,create time series algorithms
create time series algorithms,create time series algorithms,create time series algorithms
seasonal differencing of order m and period p (SDIFF(X,m,p)),seasonal differencing of order m and period p (SDIFF(X,m,p)),seasonal differencing of order m and period p (SDIFF(X,m,p))

Define

Zj(k)=Zj(k−1)−Zj−p(k−1) k=1,...,m j=pk+1,...,n

where

Zj(0)=Xj j=1,...,n

then

Yj=Zj(m) j=mp+1,...,n

Related Topics

CREATE Algorithms
Notation (create time series algorithms)
Cumulative Sum (CSUM(X)) (create time series algorithms)
Differences of Order m (DIFF(X,m)) (create time series algorithms)
Lag of Order m (LAG(X,m)) (create time series algorithms)
Lead of Order m (LEAD(X,m)) (create time series algorithms)
Moving Average of Length m (MA(X,m)) (create time series algorithms)
Running Median of Length m (X,m) (create time series algorithms)
The T4253H Smoothing Function (T4253H(X)) (create time series algorithms)
Prior Moving Averages of Length m (PMA(X,m)) (create time series algorithms)
Fast Fourier Transform (FFT(X)) (create time series algorithms)
Inverse Fast Fourier Transform of Two Series (IFFT(a,b)) (create time series algorithms)
References (create time series algorithms)


The T4253H Smoothing Function (T4253H(X)) (create time series algorithms)

T4253H smoothing,T4253H smoothing,T4253H smoothing
create time series algorithms,create time series algorithms,create time series algorithms
create time series algorithms,create time series algorithms,create time series algorithms
the T4253H smoothing function (T4253H(X)),the T4253H smoothing function (T4253H(X)),the T4253H smoothing function (T4253H(X))

The original series is smoothed by a compound data smoother based on (Velleman, 1980). The smoother starts with:

A running median of 4:

Let Z be the smoothed series, then

Zj+1/2=median(Xj−1,Xj,Xj+1,Xj+2) j=2,...,n−2

and

Z(1)0.5=X1
Z(1)1.5=median(X1,X2)=12(X1+X2)
Z(1)n−1/2=median(Xn−1,Xn)=12(Xn−1+Xn) Z(1)n+1/2=Xn

A running median of Z:

Z(1)1=Z0.5 Z(1)n=Zn+1/2

and

Z(1)j=12(Zj−1/2+Zj+1/2) j=2,...,n−1

A running median of 5 on Z(1)1,...,Z(1)n from the previous step:

Let Z(2) be the resulting series, then

Z(2)1=Z(1)1 Z(2)n=Z(1)n
Z(2)2=median(Z(1)1,Z(1)2,Z(1)3)
Z(2)n−1=median(Z(1)n−2,Z(1)n−1,Z(1)n)

and

Z(2)j=median(Z(1)j−2,Z(1)j−1,Z(1)j,Z(1)j+1,Z(1)j+2) j=3,...,n−2

A running median of 3 on Z(1)1,...,Z(1)n from the previous step:

Let Z(3) be the resulting series, then

Z(3)j=median(Z(2)j−1,Z(2)j,Z(2)j+1) j=2,3,...,n−1
Z(3)1=median(3Z(3)2−2Z(3)3,Z(2)1,Z(3)2)
Z(3)n=median(3Z(3)n−1−2Z(3)n−2,Z(2)n,Z(3)n−1)

Hanning (Running Weighted Averages):

Z(4)j=14Z(3)j−1+12Z(3)j+14Z(3)j+1 j=2,...,n−1
Z(4)1=Z(3)1, Z(4)n=Z(3)n

Residual:

Di=Xi−Z(4)i i=1,...,n

Repeat the previous steps on the residuals D1,...,Dn:

Let D(4)1,...,D(4)n be the final result.

Final smooth:

Yi=Z(4)i+D(4)i i=1,...,n

Related Topics

CREATE Algorithms
Notation (create time series algorithms)
Cumulative Sum (CSUM(X)) (create time series algorithms)
Differences of Order m (DIFF(X,m)) (create time series algorithms)
Lag of Order m (LAG(X,m)) (create time series algorithms)
Lead of Order m (LEAD(X,m)) (create time series algorithms)
Moving Average of Length m (MA(X,m)) (create time series algorithms)
Running Median of Length m (X,m) (create time series algorithms)
Seasonal Differencing of Order m and Period p (SDIFF(X,m,p)) (create time series algorithms)
Prior Moving Averages of Length m (PMA(X,m)) (create time series algorithms)
Fast Fourier Transform (FFT(X)) (create time series algorithms)
Inverse Fast Fourier Transform of Two Series (IFFT(a,b)) (create time series algorithms)
References (create time series algorithms)


Prior Moving Averages of Length m (PMA(X,m)) (create time series algorithms)

prior moving average function,prior moving average function,prior moving average function
create time series algorithms,create time series algorithms,create time series algorithms
create time series algorithms,create time series algorithms,create time series algorithms
prior moving averages of length m (PMA(X,m)),prior moving averages of length m (PMA(X,m)),prior moving averages of length m (PMA(X,m))
Yi={
i−1Σj=i−mXj/m | i=m+1,...,n
SYSMIS | i=1,...,m

Related Topics

CREATE Algorithms
Notation (create time series algorithms)
Cumulative Sum (CSUM(X)) (create time series algorithms)
Differences of Order m (DIFF(X,m)) (create time series algorithms)
Lag of Order m (LAG(X,m)) (create time series algorithms)
Lead of Order m (LEAD(X,m)) (create time series algorithms)
Moving Average of Length m (MA(X,m)) (create time series algorithms)
Running Median of Length m (X,m) (create time series algorithms)
Seasonal Differencing of Order m and Period p (SDIFF(X,m,p)) (create time series algorithms)
The T4253H Smoothing Function (T4253H(X)) (create time series algorithms)
Fast Fourier Transform (FFT(X)) (create time series algorithms)
Inverse Fast Fourier Transform of Two Series (IFFT(a,b)) (create time series algorithms)
References (create time series algorithms)


Fast Fourier Transform (FFT(X)) (create time series algorithms)

fast Fourier transform,fast Fourier transform,fast Fourier transform
create time series algorithms,create time series algorithms,create time series algorithms
create time series algorithms,create time series algorithms,create time series algorithms
fast fourier transform (FFT(X)),fast fourier transform (FFT(X)),fast fourier transform (FFT(X))

The discrete Fourier transform of a sequence X={X1,...,Xn} is defined as

Yk=1nnΣt=1Xtexp{−i2πfk(t−1)}
=1nnΣt=1Xt[cos(2πfk(t−1))−isin(2πfk(t−1))]
=1nnΣt=1Xtcos(2πfk(t−1))+i[−1nnΣt=1Xtsin(2πfk(t−1))]
=ak+ibk

Thus a, b are two sequences generated by FFT and they are called real and imaginary, respectively.

ak=1nnΣt=1Xtcos(2πfk(t−1)) k=1,...,r
bk=−1nnΣt=1Xtsin(2πfk(t−1)) k=1,...,r

where

r={
(n−1)/2 | if n is odd
n/2 | if n is even

and

a0=X
b0=−1nnΣt=1Xtcos(π(t−1))

Related Topics

CREATE Algorithms
Notation (create time series algorithms)
Cumulative Sum (CSUM(X)) (create time series algorithms)
Differences of Order m (DIFF(X,m)) (create time series algorithms)
Lag of Order m (LAG(X,m)) (create time series algorithms)
Lead of Order m (LEAD(X,m)) (create time series algorithms)
Moving Average of Length m (MA(X,m)) (create time series algorithms)
Running Median of Length m (X,m) (create time series algorithms)
Seasonal Differencing of Order m and Period p (SDIFF(X,m,p)) (create time series algorithms)
The T4253H Smoothing Function (T4253H(X)) (create time series algorithms)
Prior Moving Averages of Length m (PMA(X,m)) (create time series algorithms)
Inverse Fast Fourier Transform of Two Series (IFFT(a,b)) (create time series algorithms)
References (create time series algorithms)


Inverse Fast Fourier Transform of Two Series (IFFT(a,b)) (create time series algorithms)

inverse fast Fourier transform,inverse fast Fourier transform,inverse fast Fourier transform
create time series algorithms,create time series algorithms,create time series algorithms
create time series algorithms,create time series algorithms,create time series algorithms
inverse fast fourier transform of two series (IFFT(a,b)),inverse fast fourier transform of two series (IFFT(a,b)),inverse fast fourier transform of two series (IFFT(a,b))

The inverse Fourier Transform of two series {a, b} is defined as

Xt=a0−b0cos(π(t−1))+2[qΣk=1akcos(2πfk(t−1))−qΣk=1bksin(2πfk(t−1))]

Related Topics

CREATE Algorithms
Notation (create time series algorithms)
Cumulative Sum (CSUM(X)) (create time series algorithms)
Differences of Order m (DIFF(X,m)) (create time series algorithms)
Lag of Order m (LAG(X,m)) (create time series algorithms)
Lead of Order m (LEAD(X,m)) (create time series algorithms)
Moving Average of Length m (MA(X,m)) (create time series algorithms)
Running Median of Length m (X,m) (create time series algorithms)
Seasonal Differencing of Order m and Period p (SDIFF(X,m,p)) (create time series algorithms)
The T4253H Smoothing Function (T4253H(X)) (create time series algorithms)
Prior Moving Averages of Length m (PMA(X,m)) (create time series algorithms)
Fast Fourier Transform (FFT(X)) (create time series algorithms)
References (create time series algorithms)


References (create time series algorithms)

create time series algorithms,create time series algorithms,create time series algorithms
references,references,references

Brigham, E. O. 1974. The fast Fourier transform. Englewood Cliffs, N.J.: Prentice-Hall.

Monro, D. M. 1975. Algorithm AS 83: Complex discrete fast Fourier transform. Applied Statistics, 24, 153-160.

Monro, D. M., and J. L. Branch. 1977. Algorithm AS 117: The Chirp discrete Fourier transform of general length. Applied Statistics, 26, 351-361.

Velleman, P. F. 1980. Definition and comparison of robust nonlinear data smoothing algorithms. Journal of the American Statistical Association, 75, 609-615.

Velleman, P. F., and D. C. Hoaglin. 1981. Applications, basics, and computing of exploratory data analysis. Boston, Mass.: Duxbury Press.

Related Topics

CREATE Algorithms
Notation (create time series algorithms)
Cumulative Sum (CSUM(X)) (create time series algorithms)
Differences of Order m (DIFF(X,m)) (create time series algorithms)
Lag of Order m (LAG(X,m)) (create time series algorithms)
Lead of Order m (LEAD(X,m)) (create time series algorithms)
Moving Average of Length m (MA(X,m)) (create time series algorithms)
Running Median of Length m (X,m) (create time series algorithms)
Seasonal Differencing of Order m and Period p (SDIFF(X,m,p)) (create time series algorithms)
The T4253H Smoothing Function (T4253H(X)) (create time series algorithms)
Prior Moving Averages of Length m (PMA(X,m)) (create time series algorithms)
Fast Fourier Transform (FFT(X)) (create time series algorithms)
Inverse Fast Fourier Transform of Two Series (IFFT(a,b)) (create time series algorithms)


CROSSTABS Algorithms

CROSSTABS (command),CROSSTABS (command),CROSSTABS (command)
algorithms,algorithms,algorithms
Crosstabs,Crosstabs,Crosstabs
algorithms,algorithms,algorithms
crosstabulations algorithms,crosstabulations algorithms,crosstabulations algorithms

The notation and statistics refer to bivariate subtables defined by a row variable X and a column variable Y, unless specified otherwise. By default, CROSSTABS deletes cases with missing values on a table-by-table basis.

Related Topics

Notation (crosstabulations algorithms)
Marginal and Cell Statistics (crosstabulations algorithms)
Chi-Square Statistics (crosstabulations algorithms)
Other Measures of Association (crosstabulations algorithms)
Measures of Proportional Reduction in Predictive Error (crosstabulations algorithms)
Cohen's Kappa (crosstabulations algorithms)
Kendall's Tau-b and Tau-c (crosstabulations algorithms)
Gamma (crosstabulations algorithms)
Somers' d (crosstabulations algorithms)
Pearson's r (crosstabulations algorithms)
Spearman Correlation (crosstabulations algorithms)
Eta (crosstabulations algorithms)
Relative Risk (crosstabulations algorithms)
McNemar-Bowker's Test (crosstabulations algorithms)
Conditional Independence and Homogeneity (crosstabulations algorithms)
References (crosstabulations algorithms)


Notation (crosstabulations algorithms)

crosstabulations algorithms,crosstabulations algorithms,crosstabulations algorithms
notation,notation,notation

The following notation is used throughout this section unless otherwise stated:

Xi | Distinct values of row variable arranged in ascending order: X1<X2< ... <XR
Yj | Distinct values of column variable arranged in ascending order: Y1<Y2< ... <YC
fij | Sum of cell weights for cases in cell (i,j)
cj | RΣi=1fij, the jth column subtotal
ri | CΣj=1fij, the ith row subtotal
W | CΣj=1cj=RΣi=1ri, the grand total

Related Topics

CROSSTABS Algorithms
Marginal and Cell Statistics (crosstabulations algorithms)
Chi-Square Statistics (crosstabulations algorithms)
Other Measures of Association (crosstabulations algorithms)
Measures of Proportional Reduction in Predictive Error (crosstabulations algorithms)
Cohen's Kappa (crosstabulations algorithms)
Kendall's Tau-b and Tau-c (crosstabulations algorithms)
Gamma (crosstabulations algorithms)
Somers' d (crosstabulations algorithms)
Pearson's r (crosstabulations algorithms)
Spearman Correlation (crosstabulations algorithms)
Eta (crosstabulations algorithms)
Relative Risk (crosstabulations algorithms)
McNemar-Bowker's Test (crosstabulations algorithms)
Conditional Independence and Homogeneity (crosstabulations algorithms)
References (crosstabulations algorithms)


Marginal and Cell Statistics (crosstabulations algorithms)

crosstabulations algorithms,crosstabulations algorithms,crosstabulations algorithms
marginal and cell statistics,marginal and cell statistics,marginal and cell statistics
count,count,count
crosstabulations algorithms,crosstabulations algorithms,crosstabulations algorithms

Count

count =fij
expect count,expect count,expect count
crosstabulations algorithms,crosstabulations algorithms,crosstabulations algorithms

Expected Count

Eij=ricjW
row percentages,row percentages,row percentages
crosstabulations algorithms,crosstabulations algorithms,crosstabulations algorithms

Row Percent

row percent =100×(fij/ri)
column percentages,column percentages,column percentages
crosstabulations algorithms,crosstabulations algorithms,crosstabulations algorithms

Column Percent

column percent =100×(fij/cj)
total percentages,total percentages,total percentages
crosstabulations algorithms,crosstabulations algorithms,crosstabulations algorithms

Total Percent

total percent =100×(fij/W)
residuals,residuals,residuals
crosstabulations algorithms,crosstabulations algorithms,crosstabulations algorithms

Residual

Rij=fij−Eij
standardized residuals,standardized residuals,standardized residuals
crosstabulations algorithms,crosstabulations algorithms,crosstabulations algorithms

Standardized Residual

SRij=Rij
√ Eij
adjusted residuals,adjusted residuals,adjusted residuals
crosstabulations algorithms,crosstabulations algorithms,crosstabulations algorithms

Adjusted Residual

ARij=Rij
√ Eij(1−riW)(1−cjW)

Related Topics

CROSSTABS Algorithms
Notation (crosstabulations algorithms)
Chi-Square Statistics (crosstabulations algorithms)
Other Measures of Association (crosstabulations algorithms)
Measures of Proportional Reduction in Predictive Error (crosstabulations algorithms)
Cohen's Kappa (crosstabulations algorithms)
Kendall's Tau-b and Tau-c (crosstabulations algorithms)
Gamma (crosstabulations algorithms)
Somers' d (crosstabulations algorithms)
Pearson's r (crosstabulations algorithms)
Spearman Correlation (crosstabulations algorithms)
Eta (crosstabulations algorithms)
Relative Risk (crosstabulations algorithms)
McNemar-Bowker's Test (crosstabulations algorithms)
Conditional Independence and Homogeneity (crosstabulations algorithms)
References (crosstabulations algorithms)


Chi-Square Statistics (crosstabulations algorithms)

crosstabulations algorithms,crosstabulations algorithms,crosstabulations algorithms
chi-square statistics,chi-square statistics,chi-square statistics
Pearson chi-square,Pearson chi-square,Pearson chi-square
crosstabulations algorithms,crosstabulations algorithms,crosstabulations algorithms

Pearson’s Chi-Square

χ2p=
Σ
ij
(fij−Eij)2Eij

The degrees of freedom are (R−1)(C−1).

likelihood ratio,likelihood ratio,likelihood ratio
crosstabulations algorithms,crosstabulations algorithms,crosstabulations algorithms

Likelihood Ratio

χ2LR=2
Σ
ij
fijln(fij/Eij)

The degrees of freedom are (R−1)(C−1).

Note: when fij=0, the entire term fijln(fij/Eij) is treated as 0, because
lim
n→0
nlog(n)=0, and thus has no effect on the sum.

Fisher's exact test,Fisher's exact test,Fisher's exact test
crosstabulations algorithms,crosstabulations algorithms,crosstabulations algorithms

Fisher’s Exact Test

If the table is a 2×2 table, not resulting from a larger table with missing cells, with at least one expected cell count less than 5, then the Fisher exact test is calculated. See the topic Significance Levels for Fisher's Exact Test for more information.

Yates' correction for continuity,Yates' correction for continuity,Yates' correction for continuity
crosstabulations algorithms,crosstabulations algorithms,crosstabulations algorithms

Yates Continuity Corrected for 2 x 2 Tables

χ2c={
W(|f11f22−f12f21|−0.5W)2r1r2c1c2 | if |f11f22−f12f21| >0 .5W
0 | otherwise

The degrees of freedom are 1.

Mantel-Haenszel statistic,Mantel-Haenszel statistic,Mantel-Haenszel statistic
crosstabulations algorithms,crosstabulations algorithms,crosstabulations algorithms

Mantel-Haenszel Test of Linear Association

χ2MH=(W−1)r2

where r is the Pearson correlation coefficient to be defined later. The degrees of freedom are 1.

Related Topics

CROSSTABS Algorithms
Notation (crosstabulations algorithms)
Marginal and Cell Statistics (crosstabulations algorithms)
Other Measures of Association (crosstabulations algorithms)
Measures of Proportional Reduction in Predictive Error (crosstabulations algorithms)
Cohen's Kappa (crosstabulations algorithms)
Kendall's Tau-b and Tau-c (crosstabulations algorithms)
Gamma (crosstabulations algorithms)
Somers' d (crosstabulations algorithms)
Pearson's r (crosstabulations algorithms)
Spearman Correlation (crosstabulations algorithms)
Eta (crosstabulations algorithms)
Relative Risk (crosstabulations algorithms)
McNemar-Bowker's Test (crosstabulations algorithms)
Conditional Independence and Homogeneity (crosstabulations algorithms)
References (crosstabulations algorithms)


Other Measures of Association (crosstabulations algorithms)

crosstabulations algorithms,crosstabulations algorithms,crosstabulations algorithms
other measures of association,other measures of association,other measures of association
phi,phi,phi
crosstabulations algorithms,crosstabulations algorithms,crosstabulations algorithms

Phi Coefficient

For a table not 2×2

=
√ χ2pW

For a 2×2 table only, is equal to the Pearson correlation coefficient so that the sign of matches that of the correlation coefficients.

contingency coefficient,contingency coefficient,contingency coefficient
crosstabulations algorithms,crosstabulations algorithms,crosstabulations algorithms

Coefficient of Contingency

CC=(χ2pχ2p+W)1/2
Cramér’s V,Cramér’s V,Cramér’s V
crosstabulations algorithms,crosstabulations algorithms,crosstabulations algorithms

Cramér’s V

V=(χ2pW(q−1))1/2

where q=min{R,C}.

Related Topics

CROSSTABS Algorithms
Notation (crosstabulations algorithms)
Marginal and Cell Statistics (crosstabulations algorithms)
Chi-Square Statistics (crosstabulations algorithms)
Measures of Proportional Reduction in Predictive Error (crosstabulations algorithms)
Cohen's Kappa (crosstabulations algorithms)
Kendall's Tau-b and Tau-c (crosstabulations algorithms)
Gamma (crosstabulations algorithms)
Somers' d (crosstabulations algorithms)
Pearson's r (crosstabulations algorithms)
Spearman Correlation (crosstabulations algorithms)
Eta (crosstabulations algorithms)
Relative Risk (crosstabulations algorithms)
McNemar-Bowker's Test (crosstabulations algorithms)
Conditional Independence and Homogeneity (crosstabulations algorithms)
References (crosstabulations algorithms)


Measures of Proportional Reduction in Predictive Error (crosstabulations algorithms)

crosstabulations algorithms,crosstabulations algorithms,crosstabulations algorithms
measures of proportional reduction in predictive error,measures of proportional reduction in predictive error,measures of proportional reduction in predictive error
lambda,lambda,lambda
crosstabulations algorithms,crosstabulations algorithms,crosstabulations algorithms

Lambda

Let fim and fmj be the largest cell count in row i and column j, respectively. Also, let rm be the largest row subtotal and cm the largest column subtotal. Define λY|X as the proportion of relative error in predicting an individual’s Y category that can be eliminated by knowledge of the X category. λY|X is computed as

λY|X=RΣi=1fim−cmW−cm

The standard errors are

ASE0=
√ RΣi=1CΣj=1fij(δij−δj)2−(RΣi=1fim−cm)2/W
W−cm
ASE1=
√ RΣi=1CΣj=1fij(δij−δj+λδj)2−WλY|X
W−cm

where

δij={
1 | if j is column index for fim
0 | otherwise
δj={
1 | if j is index for cm
0 | otherwise

Lambda for predicting X from Y, λY|X, is obtained by permuting the indices in the above formulae.

The two asymmetric lambdas are averaged to obtain the symmetric lambda.

λ=RΣi=1fim+CΣj=1fmj−cm−rm2W−rm−cm

The standard errors are

ASE0=
√ RΣi=1CΣj=1fij(δrij+δcij−δri−δcj)2−[(RΣi=1fim+CΣj=1fmj−cm−rm)2/W]
2W−rm−cm
ASE1=
√ RΣi=1CΣj=1fij[δrij+δcij−δri−δcj+λ(δri+δcj)]2−4Wλ2
2W−rm−cm

where

δrij={
1 | if i is row index for fmj
0 | otherwise
δri={
1 | if i is index for rm
0 | otherwise

and where

δcij={
1 | if j is column index for fim
0 | otherwise
δci={
1 | if j is index for cm
0 | otherwise
Goodman and Kruskal's Tau,Goodman and Kruskal's Tau,Goodman and Kruskal's Tau
crosstabulations algorithms,crosstabulations algorithms,crosstabulations algorithms

Goodman and Kruskal’s Tau

Similarly defined is Goodman and Kruskal’s tau (τ)(Goodman and Kruskal, 1954):

τY|X=W
Σ
i,j
(f2ij/ri)−CΣj=1c2jW2−CΣj=1c2j

with standard error

ASE1=
√ 4δ4
Σ
i,j
fij{(v−δ)(1riCΣj=1fijcj−cj)−Wδ(1r2iCΣj=1f2ij−1rifij)}2

in which

δ=W2−CΣj=1c2j and v=W
Σ
i,j
f2ij/ri−
CΣj=1c2j

τX|Y and its standard error can be obtained by interchanging the roles of X and Y.

The significance level is based on the chi-square distribution, since

(W−1)(C−1)τY|X˜χ2(R−1)(C−1)
(W−1)(R−1)τX|Y˜χ2(R−1)(C−1)
uncertainty coefficient,uncertainty coefficient,uncertainty coefficient
crosstabulations algorithms,crosstabulations algorithms,crosstabulations algorithms

Uncertainty Coefficient

Let UY|X be the proportional reduction in the uncertainty (entropy) of Y that can be eliminated by knowledge of X. It is computed as

UY|X=U(X)+U(Y)−U(XY)U(Y)

where

U(X)=−RΣi=1riWln(riW)
U(Y)=−CΣj=1cjWln(cjW)

and

U(XY)=−
Σ
i,j
fijWln(fijW), 		for fij>0

The asymptotic standard errors are

ASE1=1WU(Y)2
√
Σ
i,j
fij{U(Y)ln(fijri)+[U(X)−U(XY)]ln(cjW)}2
ASE0=
√ P−W[U(X)+U(Y)−U(XY)]2
[WU(Y)]

where

P=
Σ
i,j
fijln(cjriWfij)2

The formulas for UX|Y can be obtained by interchanging the roles of X and Y.

A symmetric version of the two asymmetric uncertainty coefficients is defined as follows:

U=2[U(X)+U(Y)−U(XY)U(X)+U(Y)]

with asymptotic standard errors

ASE1=2W[U(X)+U(Y)]2
√
Σ
i,j
fij{U(XY)ln(ricjW2)−[U(X)+U(Y)]ln(fijW)}2

or

ASE0=2W[U(X)+U(Y)]
√ P−[U(X)+U(Y)−U(XY)]2/W

Related Topics

CROSSTABS Algorithms
Notation (crosstabulations algorithms)
Marginal and Cell Statistics (crosstabulations algorithms)
Chi-Square Statistics (crosstabulations algorithms)
Other Measures of Association (crosstabulations algorithms)
Cohen's Kappa (crosstabulations algorithms)
Kendall's Tau-b and Tau-c (crosstabulations algorithms)
Gamma (crosstabulations algorithms)
Somers' d (crosstabulations algorithms)
Pearson's r (crosstabulations algorithms)
Spearman Correlation (crosstabulations algorithms)
Eta (crosstabulations algorithms)
Relative Risk (crosstabulations algorithms)
McNemar-Bowker's Test (crosstabulations algorithms)
Conditional Independence and Homogeneity (crosstabulations algorithms)
References (crosstabulations algorithms)


Cohen's Kappa (crosstabulations algorithms)

crosstabulations algorithms,crosstabulations algorithms,crosstabulations algorithms
Cohen's kappa,Cohen's kappa,Cohen's kappa
Cohen's kappa,Cohen's kappa,Cohen's kappa
crosstabulations algorithms,crosstabulations algorithms,crosstabulations algorithms

Cohen’s kappa (κ), defined only for square table (R=C), is computed as

κ=WRΣi=1fii−RΣi=1riciW2−RΣi=1rici

with variance

var1=W{(Σfii)(W−Σfii)(W2−Σrici)2+2(W−Σfii)(2ΣfiiΣrici−WΣfii(ri+ci))(W2−Σrici)3
+(W−Σfii)2[W
Σ
i,j
fij(rj+ci)2−4(Σrici)2](W2−Σrici)4}
var0=1W(W2−
Σ
i
rici)2[W2(
Σ
i
rici)+(
Σ
i
rici)2−W(
Σ
i
rici(ri+ci))]

Related Topics

CROSSTABS Algorithms
Notation (crosstabulations algorithms)
Marginal and Cell Statistics (crosstabulations algorithms)
Chi-Square Statistics (crosstabulations algorithms)
Other Measures of Association (crosstabulations algorithms)
Measures of Proportional Reduction in Predictive Error (crosstabulations algorithms)
Kendall's Tau-b and Tau-c (crosstabulations algorithms)
Gamma (crosstabulations algorithms)
Somers' d (crosstabulations algorithms)
Pearson's r (crosstabulations algorithms)
Spearman Correlation (crosstabulations algorithms)
Eta (crosstabulations algorithms)
Relative Risk (crosstabulations algorithms)
McNemar-Bowker's Test (crosstabulations algorithms)
Conditional Independence and Homogeneity (crosstabulations algorithms)
References (crosstabulations algorithms)


Kendall's Tau-b and Tau-c (crosstabulations algorithms)

crosstabulations algorithms,crosstabulations algorithms,crosstabulations algorithms
Kendall's tau-b and tau-c,Kendall's tau-b and tau-c,Kendall's tau-b and tau-c
Kendall's tau-b,Kendall's tau-b,Kendall's tau-b
crosstabulations algorithms,crosstabulations algorithms,crosstabulations algorithms
Kendall's tau-c,Kendall's tau-c,Kendall's tau-c
crosstabulations algorithms,crosstabulations algorithms,crosstabulations algorithms

Define

Dr=W2−RΣi=1r2i
Dc=W2−CΣj=1c2j
Cij=
Σ
h<i
Σ
k<j
fhk+
Σ
h>i
Σ
k>j
fhk
Dij=
Σ
h<i
Σ
k>j
fhk+
Σ
h>i
Σ
k<j
fhk
P=
Σ
i,j
fijCij
Q=
Σ
i,j
fijDij

Note: the P and Q listed above are double the “usual” P (number of concordant pairs) and Q (number of discordant pairs). Likewise, Dr is double the “usual” P+Q+X0 (the number of concordant pairs, discordant pairs, and pairs on which the row variable is tied) and Dc is double the “usual” P+Q+Y0 (the number of concordant pairs, discordant pairs, and pairs on which the column variable is tied).

Kendall’s Tau-b

τb=P−Q
√ DrDc

with standard error

ASE1=1(DrDc)
√
Σ
i,j
fij(2
√ DrDc
(Cij−Dij)+τbvij)2−W3τ2b(Dr+Dc)2

where

vij=riDc+cjDr

Under the independence assumption, the standard error is

ASE0=2
√
Σ
i,j
fij(Cij−Dij)2−1W(P−Q)2DrDc

Kendall’s Tau-c

τc=q(P−Q)W2(q−1)

with standard error

ASE1=2q(q−1)W2
√
Σ
i,j
fij(Cij−Dij)2−1W(P−Q)2

or, under the independence assumption,

ASE0=2q(q−1)W2
√
Σ
i,j
fij(Cij−Dij)2−1W(P−Q)2

where

q=min{R, C}

Related Topics

CROSSTABS Algorithms
Notation (crosstabulations algorithms)
Marginal and Cell Statistics (crosstabulations algorithms)
Chi-Square Statistics (crosstabulations algorithms)
Other Measures of Association (crosstabulations algorithms)
Measures of Proportional Reduction in Predictive Error (crosstabulations algorithms)
Cohen's Kappa (crosstabulations algorithms)
Gamma (crosstabulations algorithms)
Somers' d (crosstabulations algorithms)
Pearson's r (crosstabulations algorithms)
Spearman Correlation (crosstabulations algorithms)
Eta (crosstabulations algorithms)
Relative Risk (crosstabulations algorithms)
McNemar-Bowker's Test (crosstabulations algorithms)
Conditional Independence and Homogeneity (crosstabulations algorithms)
References (crosstabulations algorithms)


Gamma (crosstabulations algorithms)

crosstabulations algorithms,crosstabulations algorithms,crosstabulations algorithms
gamma,gamma,gamma
gamma,gamma,gamma
crosstabulations algorithms,crosstabulations algorithms,crosstabulations algorithms

Gamma (γ) is estimated by

γ=P−QP+Q

with standard error

ASE1=4(P+Q)2
√
Σ
i,j
fij(QCij−PDij)2

or, under the hypothesis of independence,

ASE0=2(P+Q)
√
Σ
i,j
fij(Cij−Dij)2−1W(P−Q)2

Related Topics

CROSSTABS Algorithms
Notation (crosstabulations algorithms)
Marginal and Cell Statistics (crosstabulations algorithms)
Chi-Square Statistics (crosstabulations algorithms)
Other Measures of Association (crosstabulations algorithms)
Measures of Proportional Reduction in Predictive Error (crosstabulations algorithms)
Cohen's Kappa (crosstabulations algorithms)
Kendall's Tau-b and Tau-c (crosstabulations algorithms)
Somers' d (crosstabulations algorithms)
Pearson's r (crosstabulations algorithms)
Spearman Correlation (crosstabulations algorithms)
Eta (crosstabulations algorithms)
Relative Risk (crosstabulations algorithms)
McNemar-Bowker's Test (crosstabulations algorithms)
Conditional Independence and Homogeneity (crosstabulations algorithms)
References (crosstabulations algorithms)


Somers' d (crosstabulations algorithms)

crosstabulations algorithms,crosstabulations algorithms,crosstabulations algorithms
Somers' d,Somers' d,Somers' d
Somer's d,Somer's d,Somer's d
crosstabulations algorithms,crosstabulations algorithms,crosstabulations algorithms

Somers’ d with row variable X as the independent variable is calculated as

dY|X=P−QDr

with standard error

ASE1=2D2r
√
Σ
i,j
fij{Dr(Cij−Dij)−(P−Q)(W−Ri)}2

or, under the hypothesis of independence,

ASE0=2Dr
√
Σ
i,j
fij(Cij−Dij)2−1W(P−Q)2

By interchanging the roles of X and Y, the formulas for Somers’ d with X as the dependent variable can be obtained.

Symmetric version of Somers’ d is

d=(P−Q)12(Dc+Dr)

The standard error is

ASE1=2σ2τb(Dr+Dc)
√ DrDc

where σ2τb is the variance of Kendall’s τb,

ASE0=4(Dc+Dr)
√
Σ
i,j
fij(Cij−Dij)2−1W(P−Q)2

Related Topics

CROSSTABS Algorithms
Notation (crosstabulations algorithms)
Marginal and Cell Statistics (crosstabulations algorithms)
Chi-Square Statistics (crosstabulations algorithms)
Other Measures of Association (crosstabulations algorithms)
Measures of Proportional Reduction in Predictive Error (crosstabulations algorithms)
Cohen's Kappa (crosstabulations algorithms)
Kendall's Tau-b and Tau-c (crosstabulations algorithms)
Gamma (crosstabulations algorithms)
Pearson's r (crosstabulations algorithms)
Spearman Correlation (crosstabulations algorithms)
Eta (crosstabulations algorithms)
Relative Risk (crosstabulations algorithms)
McNemar-Bowker's Test (crosstabulations algorithms)
Conditional Independence and Homogeneity (crosstabulations algorithms)
References (crosstabulations algorithms)


Pearson's r (crosstabulations algorithms)

crosstabulations algorithms,crosstabulations algorithms,crosstabulations algorithms
Pearson's r,Pearson's r,Pearson's r
Pearson correlation,Pearson correlation,Pearson correlation
crosstabulations algorithms,crosstabulations algorithms,crosstabulations algorithms

The Pearson’s product moment correlation r is computed as

r=cov(X, Y)
√ S(X)S(Y)
≡ST

where

cov(X, Y)=
Σ
i,j
XiYjfij−(RΣi=1Xiri)(CΣj=1Yjcj)/W
S(X)=RΣi=1X2iri−(RΣi=1Xiri)2/W

and

S(Y)=CΣj=1Y2jcj−(CΣj=1Yjcj)2/W

The variance of r is

var1=1T4
Σ
i,j
fij{T(Xi−X)(Yj−Y)−S2T[(Xi−X)2S(Y)+(Yj−Y)2S(X)]}2

If the null hypothesis is true,

var0=
Σ
i,j
fijX2iY2j−(
Σ
i,j
fijXiYj)2/W(
Σ
i
riX2i)(
Σ
j
cjY2j)

where

X=RΣi=1Xiri/W

and

Y=CΣj=1Yjcj/W

Under the hypothesis that ρ=0,

t=r
√ W−2
√ 1−r2

is distributed as a t with W−2 degrees of freedom.

Related Topics

CROSSTABS Algorithms
Notation (crosstabulations algorithms)
Marginal and Cell Statistics (crosstabulations algorithms)
Chi-Square Statistics (crosstabulations algorithms)
Other Measures of Association (crosstabulations algorithms)
Measures of Proportional Reduction in Predictive Error (crosstabulations algorithms)
Cohen's Kappa (crosstabulations algorithms)
Kendall's Tau-b and Tau-c (crosstabulations algorithms)
Gamma (crosstabulations algorithms)
Somers' d (crosstabulations algorithms)
Spearman Correlation (crosstabulations algorithms)
Eta (crosstabulations algorithms)
Relative Risk (crosstabulations algorithms)
McNemar-Bowker's Test (crosstabulations algorithms)
Conditional Independence and Homogeneity (crosstabulations algorithms)
References (crosstabulations algorithms)


Spearman Correlation (crosstabulations algorithms)

crosstabulations algorithms,crosstabulations algorithms,crosstabulations algorithms
Spearman correlation,Spearman correlation,Spearman correlation
Spearman correlation,Spearman correlation,Spearman correlation
crosstabulations algorithms,crosstabulations algorithms,crosstabulations algorithms

The Spearman’s rank correlation coefficient rs is computed by using rank scores Ri for Xi and Ci for Yj. These rank scores are defined as follows:

Ri=
Σ
k < i
rk+(ri+1)/2 		for i=1, 2, ..., R
Cj=
Σ
h < j
ch+(cj+1)/2
for j=1, 2, ..., C

The formulas for rs and its asymptotic variance can be obtained from the Pearson formulas by substituting Ri and Cj for Xi and Yj, respectively.

Related Topics

CROSSTABS Algorithms
Notation (crosstabulations algorithms)
Marginal and Cell Statistics (crosstabulations algorithms)
Chi-Square Statistics (crosstabulations algorithms)
Other Measures of Association (crosstabulations algorithms)
Measures of Proportional Reduction in Predictive Error (crosstabulations algorithms)
Cohen's Kappa (crosstabulations algorithms)
Kendall's Tau-b and Tau-c (crosstabulations algorithms)
Gamma (crosstabulations algorithms)
Somers' d (crosstabulations algorithms)
Pearson's r (crosstabulations algorithms)
Eta (crosstabulations algorithms)
Relative Risk (crosstabulations algorithms)
McNemar-Bowker's Test (crosstabulations algorithms)
Conditional Independence and Homogeneity (crosstabulations algorithms)
References (crosstabulations algorithms)


Eta (crosstabulations algorithms)

crosstabulations algorithms,crosstabulations algorithms,crosstabulations algorithms
eta,eta,eta
eta,eta,eta
crosstabulations algorithms,crosstabulations algorithms,crosstabulations algorithms

Asymmetric η with the column variable Y as dependent is

ηY=
√ 1−SYWS(Y)

where

SYW=
Σ
i,j
Y2jfij−RΣi=11ri(CΣj=1Yjfij)2

Related Topics

CROSSTABS Algorithms
Notation (crosstabulations algorithms)
Marginal and Cell Statistics (crosstabulations algorithms)
Chi-Square Statistics (crosstabulations algorithms)
Other Measures of Association (crosstabulations algorithms)
Measures of Proportional Reduction in Predictive Error (crosstabulations algorithms)
Cohen's Kappa (crosstabulations algorithms)
Kendall's Tau-b and Tau-c (crosstabulations algorithms)
Gamma (crosstabulations algorithms)
Somers' d (crosstabulations algorithms)
Pearson's r (crosstabulations algorithms)
Spearman Correlation (crosstabulations algorithms)
Relative Risk (crosstabulations algorithms)
McNemar-Bowker's Test (crosstabulations algorithms)
Conditional Independence and Homogeneity (crosstabulations algorithms)
References (crosstabulations algorithms)


Relative Risk (crosstabulations algorithms)

crosstabulations algorithms,crosstabulations algorithms,crosstabulations algorithms
relative risk,relative risk,relative risk
relative risk,relative risk,relative risk
crosstabulations algorithms,crosstabulations algorithms,crosstabulations algorithms

Consider a 2×2 table ( that is, R=C=2). In a case-control study, the relative risk is estimated as

R0=f11f22f12f21

The 100(1−α) percent CI for the relative risk is obtained as

[
R0exp(−z1−α/2v), R0exp(z1−α/2v)
]

where

v=(1f11+1f12+1f21+1f22)1/2

The relative risk ratios in a cohort study are computed for both columns. For column 1, the risk is

R1=f11(f21+f22)f21(f11+f12)

and the corresponding 100(1−α) percent CI is

[
R1exp(−z1−α/2v), R1exp(z1−α/2v)
]

where

v=(f12f11(f11+f12)+f22f21(f21+f22))1/2

The relative risk for column 2 and the confidence interval are computed similarly.

Related Topics

CROSSTABS Algorithms
Notation (crosstabulations algorithms)
Marginal and Cell Statistics (crosstabulations algorithms)
Chi-Square Statistics (crosstabulations algorithms)
Other Measures of Association (crosstabulations algorithms)
Measures of Proportional Reduction in Predictive Error (crosstabulations algorithms)
Cohen's Kappa (crosstabulations algorithms)
Kendall's Tau-b and Tau-c (crosstabulations algorithms)
Gamma (crosstabulations algorithms)
Somers' d (crosstabulations algorithms)
Pearson's r (crosstabulations algorithms)
Spearman Correlation (crosstabulations algorithms)
Eta (crosstabulations algorithms)
McNemar-Bowker's Test (crosstabulations algorithms)
Conditional Independence and Homogeneity (crosstabulations algorithms)
References (crosstabulations algorithms)


McNemar-Bowker's Test (crosstabulations algorithms)

crosstabulations algorithms,crosstabulations algorithms,crosstabulations algorithms
McNemar-Bowker's test,McNemar-Bowker's test,McNemar-Bowker's test
McNemar test,McNemar test,McNemar test
crosstabulations algorithms,crosstabulations algorithms,crosstabulations algorithms

This statistic is used to test if a square table is symmetric.

Related Topics

Notations (crosstabulations algorithms)
Algorithm (crosstabulations algorithms)
A Special Case: 2x2 Tables (crosstabulations algorithms)
CROSSTABS Algorithms
Notation (crosstabulations algorithms)
Marginal and Cell Statistics (crosstabulations algorithms)
Chi-Square Statistics (crosstabulations algorithms)
Other Measures of Association (crosstabulations algorithms)
Measures of Proportional Reduction in Predictive Error (crosstabulations algorithms)
Cohen's Kappa (crosstabulations algorithms)
Kendall's Tau-b and Tau-c (crosstabulations algorithms)
Gamma (crosstabulations algorithms)
Somers' d (crosstabulations algorithms)
Pearson's r (crosstabulations algorithms)
Spearman Correlation (crosstabulations algorithms)
Eta (crosstabulations algorithms)
Relative Risk (crosstabulations algorithms)
Conditional Independence and Homogeneity (crosstabulations algorithms)
References (crosstabulations algorithms)


Notations (crosstabulations algorithms)

crosstabulations algorithms,crosstabulations algorithms,crosstabulations algorithms
notations,notations,notations
n | Dimension of the table (both row and column)
pij | Unknown population cell probability of row i and column j
nij | Observed counts cell count of row i and column j

Related Topics

McNemar-Bowker's Test (crosstabulations algorithms)
Algorithm (crosstabulations algorithms)
A Special Case: 2x2 Tables (crosstabulations algorithms)


Algorithm (crosstabulations algorithms)

crosstabulations algorithms,crosstabulations algorithms,crosstabulations algorithms
algorithm,algorithm,algorithm

Given a n×n square table, the McNemar-Bowker’s statistic is used to test the hypothesis H0:pij=pji for all (i<j) v.s. H1:pij≠pji for at least one pair of (i,j). The statistic is defined by the formula

χ2
=
Σ
i<j
I(nij+nji>0)(nij−nji)2nij+nji

Where I() is the indicator function. Under the null hypothesis, χ2 has an asymptotic Chi-square distribution with n(n−1)/2 degrees of freedom. The null hypothesis will be rejected if χ2 has a large value. The two-sided p-value is equal to 1−F(n(n−1)/2,χ2), where F(df, · ) is the CDF of Chi-square distribution with df degrees of freedom.

Related Topics

McNemar-Bowker's Test (crosstabulations algorithms)
Notations (crosstabulations algorithms)
A Special Case: 2x2 Tables (crosstabulations algorithms)


A Special Case: 2x2 Tables (crosstabulations algorithms)

crosstabulations algorithms,crosstabulations algorithms,crosstabulations algorithms
2x2 tables,2x2 tables,2x2 tables

For 2x2 table, the statistic reduces to the classical McNemar statistic (McNemar, 1947) for which exact p-value can be computed. The two-tailed probability level is

2min(n12,n21)Σi=0(
n12+n21
i
)(1/2)n12+n21

Related Topics

McNemar-Bowker's Test (crosstabulations algorithms)
Notations (crosstabulations algorithms)
Algorithm (crosstabulations algorithms)


Conditional Independence and Homogeneity (crosstabulations algorithms)

crosstabulations algorithms,crosstabulations algorithms,crosstabulations algorithms
conditional independence and homogeneity,conditional independence and homogeneity,conditional independence and homogeneity

The Cochran’s and Mantel-Haenzel statistics test the independence of two dichotomous variables, controlling for one or more other categorical variables. These “other” categorical variables define a number of strata, across which these statistics are computed.

The Breslow-Day statistic is used to test homogeneity of the common odds ratio, which is a weaker condition than the conditional independence (i.e., homogeneity with the common odds ratio of 1) tested by Cochran’s and Mantel-Haenszel statistics. Tarone’s statistic is the Breslow-Day statistic adjusted for the consistent but inefficient estimator such as the Mantel-Haenszel estimator of the common odds ratio.

Related Topics

Notation and Definitions (crosstabulations algorithms)
Cochran's Statistic (crosstabulations algorithms)
Mantel and Haeszel's Statistic (crosstabulations algorithms)
The Breslow-Day Statistic (crosstabulations algorithms)
Tarone's Statistic (crosstabulations algorithms)
Estimation of the Common Odds Ratio (crosstabulations algorithms)
CROSSTABS Algorithms
Notation (crosstabulations algorithms)
Marginal and Cell Statistics (crosstabulations algorithms)
Chi-Square Statistics (crosstabulations algorithms)
Other Measures of Association (crosstabulations algorithms)
Measures of Proportional Reduction in Predictive Error (crosstabulations algorithms)
Cohen's Kappa (crosstabulations algorithms)
Kendall's Tau-b and Tau-c (crosstabulations algorithms)
Gamma (crosstabulations algorithms)
Somers' d (crosstabulations algorithms)
Pearson's r (crosstabulations algorithms)
Spearman Correlation (crosstabulations algorithms)
Eta (crosstabulations algorithms)
Relative Risk (crosstabulations algorithms)
McNemar-Bowker's Test (crosstabulations algorithms)
References (crosstabulations algorithms)


Notation and Definitions (crosstabulations algorithms)

crosstabulations algorithms,crosstabulations algorithms,crosstabulations algorithms
notation and definitions,notation and definitions,notation and definitions
K | The number of strata.
fijk | Sum of cell weights for cases in the ith row of the jth column of the kth strata.
cjk | RΣi=1fijk, the jth column of the kth strata subtotal.
rik | CΣj=1fijk, the ith row of the kth strata subtotal.
nk | CΣj=1cjk=RΣi=1rik, the grand total of the kth strata.
Eijk | E(fijk)=rikcjknk, the expected cell count of the ith row of the jth column of the kth strata.

A stratum such that nk=0 is omitted from the analysis. (K must be modified accordingly.) If nk=0 for all k, then no computation is done.

Preliminarily, define for each k

^
p
ik=fi1krik,

dk=
^
p
1k−
^
p
2k,

^
p
k=c1knk,

and

wk=r1kr2knk.

Related Topics

Conditional Independence and Homogeneity (crosstabulations algorithms)
Cochran's Statistic (crosstabulations algorithms)
Mantel and Haeszel's Statistic (crosstabulations algorithms)
The Breslow-Day Statistic (crosstabulations algorithms)
Tarone's Statistic (crosstabulations algorithms)
Estimation of the Common Odds Ratio (crosstabulations algorithms)


Cochran's Statistic (crosstabulations algorithms)

crosstabulations algorithms,crosstabulations algorithms,crosstabulations algorithms
Cochran's statistic,Cochran's statistic,Cochran's statistic
Cochran's statistic,Cochran's statistic,Cochran's statistic
crosstabulations algorithms,crosstabulations algorithms,crosstabulations algorithms

Cochran’s statistic (Cochran, 1954) is

C=KΣk=1wkdk/KΣk=1wk
√ KΣk=1wk
^
p
k(1−
^
p
k)
/KΣk=1wk=KΣk=1wkdk
√ KΣk=1wk
^
p
k(1−
^
p
k)
.

All stratum such that r1k=0 or r2k=0 are excluded, because dk is undefined. If every stratum is such, C is undefined. Note that a stratum such that r1k>0 and r2k>0 but that c1k=0 or c2k=0 is a valid stratum, although it contributes nothing to the denominator or numerator. However, if every stratum is such, C is again undefined. So, in order to compute a non system missing value of C, at least one stratum must have all non-zero marginal totals.

Alternatively, Cochran’s statistic can be written as

C=KΣk=1(f11k−E11k)
√ KΣk=1wk
^
p
k(1−
^
p
k)
.

When the number of strata is fixed as the sample sizes within each stratum increase, Cochran’s statistic is asymptotically standard normal, and thus its square is asymptotically distributed as a chi-squared distribution with 1 d.f.

Related Topics

Conditional Independence and Homogeneity (crosstabulations algorithms)
Notation and Definitions (crosstabulations algorithms)
Mantel and Haeszel's Statistic (crosstabulations algorithms)
The Breslow-Day Statistic (crosstabulations algorithms)
Tarone's Statistic (crosstabulations algorithms)
Estimation of the Common Odds Ratio (crosstabulations algorithms)


Mantel and Haeszel's Statistic (crosstabulations algorithms)

crosstabulations algorithms,crosstabulations algorithms,crosstabulations algorithms
Mantel and Haeszel's statistics,Mantel and Haeszel's statistics,Mantel and Haeszel's statistics
Mantel-Haenszel statistic,Mantel-Haenszel statistic,Mantel-Haenszel statistic
crosstabulations algorithms,crosstabulations algorithms,crosstabulations algorithms

Mantel and Haenszel’s statistic (Mantel and Haenszel, 1959) is simply Cochran’s statistic with small-sample corrections for continuity and variance “inflation.” These corrections are desirable when r1k and r2k are small, but the corrections can make a noticeable difference even for relatively large r1k and r2k(Snedecor and Cochran, 1980) (p. 213). The statistic is defined as:

M={|KΣk=1(f11k−E11k)|−0.5}sgn{KΣk=1(f11k−E11k)}
√ KΣk=1r1kr2knk−1
^
p
k(1−
^
p
k)
,

where sgn is the signum function

sgn(x)={
1 if x>0
0 if x=0
−1 if x<0
.

Any stratum in which nk=1 is excluded from the computation. If every stratum is such, then M is undefined. M is also undefined if every stratum is such that r1k=0, r2k=0, c1k=0, or c2k=0. In order to compute a non system missing value of M, at least one stratum must have all non-zero marginal totals, just as for C.

When the number of strata is fixed as the sample sizes within each stratum increase, or when the sample sizes within each strata are fixed as the number of strata increases, this statistic is asymptotically standard normal, and thus its square is asymptotically distributed as a chi-squared distribution with 1 d.f.

Related Topics

Conditional Independence and Homogeneity (crosstabulations algorithms)
Notation and Definitions (crosstabulations algorithms)
Cochran's Statistic (crosstabulations algorithms)
The Breslow-Day Statistic (crosstabulations algorithms)
Tarone's Statistic (crosstabulations algorithms)
Estimation of the Common Odds Ratio (crosstabulations algorithms)


The Breslow-Day Statistic (crosstabulations algorithms)

crosstabulations algorithms,crosstabulations algorithms,crosstabulations algorithms
Breslow-Day statistic,Breslow-Day statistic,Breslow-Day statistic
Breslow-Day statistic,Breslow-Day statistic,Breslow-Day statistic
crosstabulations algorithms,crosstabulations algorithms,crosstabulations algorithms

The Breslow-Day statistic for any estimator
^
θ
is

KΣk=1{f11k− E (f11k|c1k;
^
θ
)}2 V (f11k|c1k;
^
θ
).

E and V are based on the exact moments, but it is customary to replace them with the asymptotic expectation and variance. Let
^
E
and
^
V
mean the estimated asymptotic expectation and the estimated asymptotic variance, respectively. Given the Mantel-Haenszel common odds ratio estimator
^
θ
MH , we use the following statistic as the Breslow-Day statistic:

B=KΣk=1{f11k−
^
E
(f11k|c1k;
^
θ
MH )}2
^
V
(f11k|c1k;
^
θ
MH ),

where

^
E
(f11k|c1k;
^
θ
MH )=
^
f
11k

satisfies the equations

^
f
11k(nk−r1k−c1k+
^
f
11k)(r1k−
^
f
11k)(c1k−
^
f
11k)=
^
θ
MH ,

with constraints such that

^
f
11k≥0,
r1k−
^
f
11k>0,
c1k−
^
f
11k>0,
nk−r1k−c1k+
^
f
11k≥0;

and

^
V
(f11k|c1k;
^
θ
MH )=(1
^
f
11k+1
^
f
12k+1
^
f
21k+1
^
f
22k)−1

with constraints such that

^
f
11k>0,
^
f
12k=r1k−
^
f
11k>0,
^
f
21k=c1k−
^
f
11k>0,
^
f
22k=nk−r1k−c1k+
^
f
11k>0;

All stratum such that r1k=0 or c1k=0 are excluded. If every stratum is such, B is undefined. Stratum such that
^
f
11k=0 are also excluded. If every stratum is such, then B is undefined.

Breslow-Day’s statistic is asymptotically distributed as a chi-squared random variable with K-1 degrees of freedom under the null hypothesis of a constant odds ratio.

Related Topics

Conditional Independence and Homogeneity (crosstabulations algorithms)
Notation and Definitions (crosstabulations algorithms)
Cochran's Statistic (crosstabulations algorithms)
Mantel and Haeszel's Statistic (crosstabulations algorithms)
Tarone's Statistic (crosstabulations algorithms)
Estimation of the Common Odds Ratio (crosstabulations algorithms)


Tarone's Statistic (crosstabulations algorithms)

crosstabulations algorithms,crosstabulations algorithms,crosstabulations algorithms
Tarone's statistic,Tarone's statistic,Tarone's statistic
Tarone's statistic,Tarone's statistic,Tarone's statistic
crosstabulations algorithms,crosstabulations algorithms,crosstabulations algorithms

Tarone (Tarone, 1985) proposes an adjustment to the Breslow-Day statistic when the common odds ratio estimator is consistent but inefficient, specifically when we have the Mantel-Haenszel common odds ratio estimator. The adjusted statistic, Tarone’s statistic, for
^
θ
MH is

T=KΣk=1{f11k−
^
E
(f11k|c1k;
^
θ
MH )}2
^
V
(f11k|c1k;
^
θ
MH )−[KΣk=1{f11k−
^
E
(f11k|c1k;
^
θ
MH )}]2KΣk=1
^
V
(f11k|c1k;
^
θ
MH )
  =B−[KΣk=1{f11k−
^
E
(f11k|c1k;
^
θ
MH )}]2KΣk=1
^
V
(f11k|c1k;
^
θ
MH ),

where
^
E
and
^
V
are as before.

The required data conditions are the same as for the Breslow-Day statistic computation. T is, of course, undefined, when B is undefined.

T is also asymptotically distributed as a chi-squared random variable with K-1 degrees of freedom under the null hypothesis of a constant odds ratio.

Related Topics

Conditional Independence and Homogeneity (crosstabulations algorithms)
Notation and Definitions (crosstabulations algorithms)
Cochran's Statistic (crosstabulations algorithms)
Mantel and Haeszel's Statistic (crosstabulations algorithms)
The Breslow-Day Statistic (crosstabulations algorithms)
Estimation of the Common Odds Ratio (crosstabulations algorithms)


Estimation of the Common Odds Ratio (crosstabulations algorithms)

crosstabulations algorithms,crosstabulations algorithms,crosstabulations algorithms
estimation of common odds ratio,estimation of common odds ratio,estimation of common odds ratio

For K strata of 2×2 tables, write the true odds ratios as

θk=p1k(1−p2k)(1−p1k)p2k

for k=1, ..., K. And, assuming that the true common odds ratio exists, θ=θ1= ... =θK, Mantel and Haenszel’s estimator (Mantel and Haenszel, 1959) of this common odds ratio is

^
θ
MH =KΣk=1f11kf22knkKΣk=1f12kf21knk.

If every stratum is such that f12k=0 or f21k=0, then
^
θ
MH is undefined. The (natural) log of the estimated common odds ratio is asymptotically normal. Note, however, that if f11k=0 or f22k=0 in every stratum, then
^
θ
MH is zero and log(
^
θ
MH ) is undefined.

Related Topics

The Asymptotic Confidence Interval (crosstabulations algorithms)
The Asymptotic P-value (crosstabulations algorithms)
Notation and Definitions (crosstabulations algorithms)
Cochran's Statistic (crosstabulations algorithms)
Mantel and Haeszel's Statistic (crosstabulations algorithms)
The Breslow-Day Statistic (crosstabulations algorithms)
Tarone's Statistic (crosstabulations algorithms)


The Asymptotic Confidence Interval (crosstabulations algorithms)

crosstabulations algorithms,crosstabulations algorithms,crosstabulations algorithms
asymptotic confidence interval,asymptotic confidence interval,asymptotic confidence interval

Robins et al. (Robins, Breslow, and Greenland, 1986) give an estimated asymptotic variance for log(
^
θ
MH) that is appropriate in both asymptotic cases:

^
σ
2[log(
^
θ
MH)]=KΣk=1(f11k+f22k)f11kf22kn2k2(KΣk=1f11kf22knk)2
+KΣk=1(f11k+f22k)f12kf21k+(f12k+f21k)f11kf22kn2k2(KΣk=1f11kf22knk)(KΣk=1f12kf21knk)
+KΣk=1(f12k+f21k)f12kf21kn2k2(KΣk=1f12kf21knk)2.

An asymptotic (100 − α)% confidence interval for log(θ) is

log(
^
θ
MH )± z( α/2)
^
σ
[ log (
^
θ
MH )],

where z (α/2) is the upper α/2 critical value for the standard normal distribution. All these computations are valid only if
^
θ
MH is defined and greater than 0.

Related Topics

Estimation of the Common Odds Ratio (crosstabulations algorithms)
The Asymptotic P-value (crosstabulations algorithms)


The Asymptotic P-value (crosstabulations algorithms)

crosstabulations algorithms,crosstabulations algorithms,crosstabulations algorithms
asymptotic P-value,asymptotic P-value,asymptotic P-value

We compute an asymptotic P-value under the null hypothesis that θ(=θk∀k)=θ0(>0) against a 2-sided alternative hypothesis (θ≠θ0), using the standard normal variate, as follows

Pr(|Z|>|log(
^
θ
MH )−log(θ0)
^
σ
[log(
^
θ
MH )]|)=2Pr(Z>|log(
^
θ
MH )− log( θ0)
^
σ
[log(
^
θ
MH )]|),

given that log(
^
θ
MH ) is defined.

Alternatively, we can consider using
^
θ
MH and the estimated exact variance of
^
θ
MH , which is still consistent in both limiting cases:

^
σ
2[log(
^
θ
MH )]
^
θ
2 MH .

Then, the asymptotic P-value may be approximated by

Pr (|Z|>|
^
θ
MH −θ0
^
σ
[log(
^
θ
MH )]θ0|).

The caveat for this formula is that
^
θ
MH may be quite skewed even in moderate sample sizes (Robins et al., 1986).

Related Topics

Estimation of the Common Odds Ratio (crosstabulations algorithms)
The Asymptotic Confidence Interval (crosstabulations algorithms)


References (crosstabulations algorithms)

crosstabulations algorithms,crosstabulations algorithms,crosstabulations algorithms
references,references,references

Agresti, A. 1990. Categorical Data Analysis. New York: John Wiley.

Agresti, A. 1996. An Introduction to Categorical Data Analysis. New York: John Wiley and Sons.

Bishop, Y. M., S. E. Feinberg, and P. W. Holland. 1975. Discrete multivariate analysis: Theory and practice. Cambridge, Mass.: MIT Press.

Bowker, A. H. 1948. A test for symmetry in contingency tables. Journal of the American Statistical Association, 43, 572-574.

Breslow, N. E., and N. E. Day. 1980. Statistical Methods in Cancer Research, 1, The Analysis of Case-Control Studies. : International Agency for Research on Cancer, Lyon..

Brown, M. B. 1975. The asymptotic standard errors of some estimates of uncertainty in the two-way contingency table. Psychometrika, 40(3), 291.

Brown, M. B., and J. K. Benedetti. 1977. Sampling behavior of tests for correlation in two-way contingency tables. Journal of the American Statistical Association, 72, 309-315.

Cochran, W. G. 1954. Some methods of strengthening the common chi-square tests. Biometrics, 10, 417-451.

Goodman, L. A., and W. H. Kruskal. 1954. Measures of association for cross-classification.. Journal of the American Statistical Association, 49, 732-764.

Goodman, L. A., and W. H. Kruskal. 1972. Measures of association for cross-classification, IV: simplification and asymptotic variances. Journal of the American Statistical Association, 67, 415-421.

Hauck, W. 1989. Odds ratio inference from stratified samples. Commun. Statis.-Theory Meth., 18, 767-800.

Somes, G. W., and K. F. O'Brien. 1985. Mantel-Haenszel statistic. In Encyclopedia of Statistical Sciences, Vol. 5 (S. Kotz and N. L. Johnson, eds.) 214–217. New York: John Wiley.

Mantel, N., and W. Haenszel. 1959. Statistical aspects of the analysis of data from retrospective studies of disease. J. Natl. Cancer Inst., 22, 719-748.

McNemar, Q. 1947. Note on the sampling error of the difference between correlated proportions or percentages. Psychometrika, 12, 153-157.

Robins, J., N. Breslow, and S. Greenland. 1986. Estimators of the Mantel-Haenszel variance consistent in both sparse data and large-strata limiting models. Biometrics, 42, 311-323.

Snedecor, G. W., and W. G. Cochran. 1980. Statistical Methods, 7th ed. Ames, Iowa: Iowa University Press.

Tarone, R. E. 1985. On heterogeneity tests based on efficient scores. Biometrika, 72, 91-95.

Related Topics

CROSSTABS Algorithms
Notation (crosstabulations algorithms)
Marginal and Cell Statistics (crosstabulations algorithms)
Chi-Square Statistics (crosstabulations algorithms)
Other Measures of Association (crosstabulations algorithms)
Measures of Proportional Reduction in Predictive Error (crosstabulations algorithms)
Cohen's Kappa (crosstabulations algorithms)
Kendall's Tau-b and Tau-c (crosstabulations algorithms)
Gamma (crosstabulations algorithms)
Somers' d (crosstabulations algorithms)
Pearson's r (crosstabulations algorithms)
Spearman Correlation (crosstabulations algorithms)
Eta (crosstabulations algorithms)
Relative Risk (crosstabulations algorithms)
McNemar-Bowker's Test (crosstabulations algorithms)
Conditional Independence and Homogeneity (crosstabulations algorithms)


CSCOXREG Algorithms

CSCOXREG (command),CSCOXREG (command),CSCOXREG (command)
algorithms,algorithms,algorithms
Complex Samples Cox Regression,Complex Samples Cox Regression,Complex Samples Cox Regression
algorithms,algorithms,algorithms
complex samples cox regression algorithms,complex samples cox regression algorithms,complex samples cox regression algorithms

Survival analysis studies the failure time distribution. This algorithm considers the Cox proportional hazards regression model under the complex sampling setting. The failure time is assumed to be continuous here.

Related Topics

Notation (complex samples cox regression algorithms)
Input (complex samples cox regression algorithms)
Predictor Transformations (complex samples cox regression algorithms)
Proportional Hazards (complex samples cox regression algorithms)
Baseline Hazard Strata (complex samples cox regression algorithms)
Time-Dependent Predictors (complex samples cox regression algorithms)
Hypothesis Testing (complex samples cox regression algorithms)
Testing Model Assumptions (complex samples cox regression algorithms)
Subpopulation Estimates (complex samples cox regression algorithms)
Missing Values (complex samples cox regression algorithms)
References (complex samples cox regression algorithms)


Notation (complex samples cox regression algorithms)

complex samples cox regression algorithms,complex samples cox regression algorithms,complex samples cox regression algorithms
notation,notation,notation

The following notation is used throughout this chapter unless otherwise stated:

ti

For data with one time interval, the observed end time for record i.

t1i,t2i

For data with two time intervals, the observed enter and end time for record i, t1i<t2i.

δi

The zero-one status indicator with δi=1 indicating end time ti or t2i being failure time, and δi=0 indicating ti or t2i being right censoring time.

0=t*0<...<t*K+1=∞

The ordered observed failure times where K is the number of distinct failure times in the data set.

xi

Predictor vector for record i, xi=(xi1,...,xip)´. No intercept term.

x0

Vector of reference values for transforming predictors. See the topic Predictor Transformations (complex samples cox regression algorithms) for more information.

X

Design matrix X=(x1,...,xn)´.

D(t)

The set of records failed at time t. D(t)={ i:ti=t,δi=1} for data with one time variable, and D(t)={ i:t2i=t,δi=1} for data with two time variables.

R(t)

The set of records at risk at time t. R(t)={ i:ti≥t} for data with one time variable, and R(t)={ i:t1i<t≤t2i} for data with two time variables.

Yi(t)

The at-risk indicator for record i such that Yi(t)={
1 | if iR(t)
0 | otherwise

d(t)

The number of records failed at time t; that is, the number of records in D(t)

S(t|x)

Survival function at time t for a given predictor vector x, S(t)≡Pr(T>t|x) where T is a random variable representing survival time.

h(t|x)

Hazard function at time t for a given predictor vector x, h(t|x)≡
lim
Δt→0+
Pr(t≤T<t+Δt|T≥t|x)Δt.

H(t|x)=t∫0h(u|x)du

Cumulative hazard function at time t for a given predictor vector x.

h0(t)

Baseline hazard function at time t, h0(t)=h(t|x=0).

H0(t)=t∫0h0(u)du

Cumulative baseline hazard function at time t.

S0(t)=exp(−H0(t))

Baseline survival function at time t.

N

The number of cases in the whole population.

n

The number of cases/records in the sample.

ns

The number of subjects/individuals in the sample.

wi

Sampling weight for record i, wi=1/πi.

B

The parameter of interest, the population or census parameter.

^
B

The estimate of census parameter B from the sample.

Related Topics

CSCOXREG Algorithms
Input (complex samples cox regression algorithms)
Predictor Transformations (complex samples cox regression algorithms)
Proportional Hazards (complex samples cox regression algorithms)
Baseline Hazard Strata (complex samples cox regression algorithms)
Time-Dependent Predictors (complex samples cox regression algorithms)
Hypothesis Testing (complex samples cox regression algorithms)
Testing Model Assumptions (complex samples cox regression algorithms)
Subpopulation Estimates (complex samples cox regression algorithms)
Missing Values (complex samples cox regression algorithms)
References (complex samples cox regression algorithms)


Input (complex samples cox regression algorithms)

Sampling plan. This plan is needed for sampling method, sampling weight, strata and cluster information.

Observed sample data. Two kinds of data structures are allowed.

• Data with one time intervals: {ti,δi,xi,wi}ni=1.

• Data with two time intervals: {t1i,t2i,δi,xi,wi}ni=1, or { id i,t1i,t2i,δi,xi,wi}ni=1, where (t1i,t2i] is the time interval during which the record is at risk, and id i is the subject id for record i. Multiple records for the same subject have the same id and same sampling weight. Multiple records of the same subject should have disjoint time intervals. If id i is not specified, each record is assumed from different subject.

Note: Data with one time interval is simply a special case of data with two time intervals where t1i=0 and t2i=ti. The rest of this document is written from the perspective of data with two time intervals.

Related Topics

CSCOXREG Algorithms
Notation (complex samples cox regression algorithms)
Predictor Transformations (complex samples cox regression algorithms)
Proportional Hazards (complex samples cox regression algorithms)
Baseline Hazard Strata (complex samples cox regression algorithms)
Time-Dependent Predictors (complex samples cox regression algorithms)
Hypothesis Testing (complex samples cox regression algorithms)
Testing Model Assumptions (complex samples cox regression algorithms)
Subpopulation Estimates (complex samples cox regression algorithms)
Missing Values (complex samples cox regression algorithms)
References (complex samples cox regression algorithms)


Predictor Transformations (complex samples cox regression algorithms)

complex samples cox regression algorithms,complex samples cox regression algorithms,complex samples cox regression algorithms
predictor transformations,predictor transformations,predictor transformations

To decrease the chance of over- or underflow when calculating exp(.), first a transformation z=x−x0 is performed on each predictor for a properly chosen x0 (reference value). Then all the calculations described in other sections are performed on the transformed data. Except for baseline hazards and baseline survival functions, all other quantities based on transformed data are the same as those based on original data.

For a continuous predictor x in the original covariate list, the reference value x0 is chosen to be

x0=nΣi=1wixinΣi=1wi

Note that x0 is not the mean of x when there are multiple cases per subject or x is a time dependent predictor.

For a categorical predictor, the last category is the reference value.

The reference values for model effects derived from original predictors, such as interactions, are derived from the reference values of the original predictors in the same way the effects are derived.

Related Topics

CSCOXREG Algorithms
Notation (complex samples cox regression algorithms)
Input (complex samples cox regression algorithms)
Proportional Hazards (complex samples cox regression algorithms)
Baseline Hazard Strata (complex samples cox regression algorithms)
Time-Dependent Predictors (complex samples cox regression algorithms)
Hypothesis Testing (complex samples cox regression algorithms)
Testing Model Assumptions (complex samples cox regression algorithms)
Subpopulation Estimates (complex samples cox regression algorithms)
Missing Values (complex samples cox regression algorithms)
References (complex samples cox regression algorithms)


Proportional Hazards (complex samples cox regression algorithms)

complex samples cox regression algorithms,complex samples cox regression algorithms,complex samples cox regression algorithms
proportional hazards model,proportional hazards model,proportional hazards model
proportional hazards model,proportional hazards model,proportional hazards model
complex samples cox regression algorithms,complex samples cox regression algorithms,complex samples cox regression algorithms

Two phases of sampling are assumed. The first phase generates a finite population by a model or super population. The second phase selects a sample according to a sampling plan from the finite population generated in the first phase.

Related Topics

CSCOXREG Algorithms
Notation (complex samples cox regression algorithms)
Input (complex samples cox regression algorithms)
Predictor Transformations (complex samples cox regression algorithms)
Baseline Hazard Strata (complex samples cox regression algorithms)
Time-Dependent Predictors (complex samples cox regression algorithms)
Hypothesis Testing (complex samples cox regression algorithms)
Testing Model Assumptions (complex samples cox regression algorithms)
Subpopulation Estimates (complex samples cox regression algorithms)
Missing Values (complex samples cox regression algorithms)
References (complex samples cox regression algorithms)
Model (complex samples cox regression algorithms)
Pseudo Partial Likelihood and Derivatives (complex samples cox regression algorithms)
Parameter Estimation (complex samples cox regression algorithms)
Properties of Estimates (complex samples cox regression algorithms)
Survival and Cumulative Hazard Functions (complex samples cox regression algorithms)
Residuals (complex samples cox regression algorithms)


Model (complex samples cox regression algorithms)

For a given predictor vector x, the hazard function at time t is

h(t|x)=h0(t)exp{x´β}

or

ln(h(t|x)h0(t))=x´β

where h0(t) is the baseline hazard function. The regression parameter vector doesn’t include an intercept term because the intercept can be absorbed by the baseline hazard.

Survival and cumulative hazard functions

From this model the cumulative hazard function is

H(t|x)=t∫0h(u|x)du=exp(x´β)t∫0h0(u)du=exp(x´β)H0(t)

where H0(t)=t∫0h0(u)du is the baseline cumulative hazard function. The survival function is

S(t|x)=exp{−H(t|x)}=exp{−exp(x´β)H0(t)}={S0(t)}exp(x´β)

where S0(t)=exp(−H0(t)) is the baseline survival function.

Related Topics

Proportional Hazards (complex samples cox regression algorithms)
Pseudo Partial Likelihood and Derivatives (complex samples cox regression algorithms)
Parameter Estimation (complex samples cox regression algorithms)
Properties of Estimates (complex samples cox regression algorithms)
Survival and Cumulative Hazard Functions (complex samples cox regression algorithms)
Residuals (complex samples cox regression algorithms)


Pseudo Partial Likelihood and Derivatives (complex samples cox regression algorithms)

For a sample S={t1i,t2i,δi,xi,wi}ni=1 drawn from the finite population according to a sample plan, we take the pseudo-likelihood approach. In this approach, pseudo-likelihood is a sample estimate of the population log-likelihood, and parameter estimates are derived by maximizing the pseudo-likelihood. Let lS(β), US(β) and JS(β) denote the pseudo-likelihood, its first and second derivatives.

For the Breslow approximation:

lS(β)=nΣi=1wiδi(x´iβ−ln
Σ
lR(t2i)
wlexp(x´lβ))

For the Efron approximation:

lS(β)=nΣi=1wiδi(x´iβ−1d(t2i)d(t2i)−1Σr=0ln{
Σ
lR(t2i)
wlexp(x´lβ)−rd(t2i)ΣlD(t2i)wlexp(x´lβ)})

Let

E(0)(β,t)=
Σ
lR(t)
wlexp(x´lβ)=nΣl=1wlYl(t)exp(x´lβ)
E(1)(β,t)=∂E(0)(β,t)∂β=
Σ
lR(t)
wlxlexp(x´lβ)=nΣl=1wlYl(t)xlexp(x´lβ)
E(2)(β,t)=∂2E(0)(β,t)∂β∂β=
Σ
lR(t)
wlxlx´lexp(x´lβ)=nΣl=1wlYl(t)xlx´lexp(x´lβ)
EE(0)(β,t,r)=
Σ
lR(t)
wlexp(x´lβ)−rd(t)
Σ
lD(t)
wlexp(x´lβ)
=nΣl=1wl(Yl(t)−rδlI(t2l=t)d(t))exp(x´lβ)
EE(1)(β,t,r)=
Σ
lR(t)
wlxlexp(x´lβ)−rd(t)
Σ
lD(t)
wlxlexp(x´lβ)
=nΣl=1wl(Yl(t)−rδlI(t2l=t)d(t))xlexp(x´lβ)
EE(2)(β,t,r)=
Σ
lR(t)
wlxlx´lexp(x´lβ)−rd(t)
Σ
lD(t)
wlxlx´lexp(x´lβ)
=nΣl=1wl(Yl(t)−rδlI(t2l=t)d(t))xlx´lexp(x´lβ)
x(β,t,r)=EE(1)(β,t,r)EE(0)(β,t,r)
x(β,t)={
E(1)(β,t)E(0)(β,t) | Breslow
1d(t)d(t)−1Σr=0EE(1)(β,t,r)EE(0)(β,t,r) | Efron
ui(β,t,r)=xi−x(β,t,r)
ui(β,t)=xi−x(β,t)
ℑi(β,t)={
E(1)(β,t)(E(1)(β,t))´(E(0)(β,t))2−E(2)(β,t)E(0)(β,t) | Breslow
1d(t)d(t)−1Σr=0 | Efron

So

lS(β)={
nΣi=1wiδi(x´iβ−lnE(0)(β,t2i)) | Breslow
nΣi=1wiδi(x´iβ−1d(t2i)d(t2i)−1Σr=0lnEE(0)(β,t2i,r)) | Efron
US(β)=∂lS(β)∂β=nΣi=1wiδiui(β,t2i)
JS(β)=∂2lS(β)∂β∂β=nΣi=1wiδiℑi(β,t2i)

These equations are used to calculate the needed quantities throughout the rest of the document. When predictors are time-dependent, these equations need to be modified accordingly. See the topic Time-Dependent Predictors (complex samples cox regression algorithms) for more information.

Related Topics

Proportional Hazards (complex samples cox regression algorithms)
Model (complex samples cox regression algorithms)
Parameter Estimation (complex samples cox regression algorithms)
Properties of Estimates (complex samples cox regression algorithms)
Survival and Cumulative Hazard Functions (complex samples cox regression algorithms)
Residuals (complex samples cox regression algorithms)


Parameter Estimation (complex samples cox regression algorithms)

To obtain the maximum pseudo-likelihood estimate of B, the Newton-Raphson iterative estimation method is used to solve the estimating equation. Redundant parameters are fixed at zero for all iterations. Let B(v) be the parameter estimate at iteration step v, the parameter estimate B(v+1) at iteration step v + 1 is updated as

B(v+1)=B(v)−ξ·(JS(B(v)))−US(B(v))

where (JS(.))− is a generalized inverse of JS(.). The stepping scalar ξ>0 is used to make lS(B(v+1))≥lS(B(v)). Use the step-halving method if lS(B(v+1))<lS(B(v)). Let s be the maximum number of steps in step-halving; the set of values of ξ is then {1/2r: r = 0, …, s−1}.

Starting with initial value B(0), update B(v+1) until one of the stopping criteria is satisfied. The final estimate is denoted as
^
B
.

Initial values

By default, B(0)=0.

Stopping criteria

Given two small constants εl > 0 and εp > 0, the iteration stops if one of the following criteria is satisfied:

1. Pseudo-likelihood criterion

{
|lS(B(v+1))−lS(B(v))||lS(B(v))|+10−6<εl | if relative change
|lS(B(v+1))−lS(B(v))|<εl | if absolute change

2. Parameter criterion

{
max
j
(|B(v+1)j−B(v)j||B(v)j|+10−6)<εp 		if relative change
max
j
(|B(v+1)j−B(v)j|)<εp 		if absolute change

3. The maximum number of iteration is reached, or maximum number of steps in step-halving is reached.

Either relative or absolute change is considered in criteria 1 and 2.

Infinite valued parameters

There may be situations in which the maximum pseudo-likelihood estimates of some parameters are infinite. For example, if there is no failure at one level of a binary predictor, the estimated parameter would be infinity for this predictor. In this situation, the estimation procedure is performed as usual. At the end of the estimation, we will check for possible infinite parameters and issue warnings if there are any. Parameter Bj is possibly infinite if both of the followings are satisfied:

1. |
^
B
j|·(xj,max−xj,min)≥10

2. The Hessian is singular, or se(
^
B
j)/|
^
B
j|≥3.

When there are infinite valued parameters, the Wald statistic for hypothesis testing involving infinite valued parameters becomes worthless.

Related Topics

Proportional Hazards (complex samples cox regression algorithms)
Model (complex samples cox regression algorithms)
Pseudo Partial Likelihood and Derivatives (complex samples cox regression algorithms)
Properties of Estimates (complex samples cox regression algorithms)
Survival and Cumulative Hazard Functions (complex samples cox regression algorithms)
Residuals (complex samples cox regression algorithms)


Properties of Estimates (complex samples cox regression algorithms)

Variance matrix

Let

Ui(β)={
δiui(β,t2i)−
Σ
{m: t1i<t2m≤t2i}
δmwmui(β,t2m)exp(x´iβ)E(0)(β,t2m)
Breslow
δiui(β,t2i)−
Σ
{m: t1i<t2m≤t2i}
δmwmd(t2m)d(t2m)−1Σr=0
ui(β,t2m,r)exp(x´iβ)(1−rI(t2m=t2i)δid(t2m))EE(0)(β,t2m,r)
Efron

We will use the following robust variance estimation (Binder 1992, Lin 2000),

^
V
(
^
B
)≈(JS(
^
B
))−
^
I
(
^
B
)(JS(
^
B
))−

where
^
I
(β) is the estimate of the design based variance of US(β) with

US(β)=nsΣj=1wjU(a)j(β)
U(a)j(β)=
Σ
i{ id i=j}
Ui(β)

Notice that the sum in US(β) is over all ns subjects, and the sum in U(a)j(β) is over all records for subject j. The US(.) is an estimate for the population total of U(a)j(.) vectors. See the topic Complex Samples: Covariance Matrix of Total for more information.

Confidence interval

The confidence interval for a single regression parameter Bj is approximately

[
^
B
j−tdf,1−α2
√
^
V
(
^
B
j)
,
^
B
j+tdf,1−α2
√
^
V
(
^
B
j)
]

where tdf,1−α2 is the 100(1−α/2) percentile of a t distribution with df degrees of freedom.

The degrees of freedom df can be user specified; its default value is the difference between the number of primary sampling units and the number of strata in the first stage of sampling.

Design effect

For each parameter Bj, its design effect is the ratio of its variance under the design to its variance under the SRS design,

Deff(
^
B
j)=
^
V
(
^
B
j)
^
V
SRS(
^
B
j)

For SRS design, the variance matrix is

^
V
SRS(
^
B
)≈(JS(
^
B
))−
^
I
SRS(
^
B
)(JS(
^
B
))−

where

^
I
SRS(
^
B
)=
^
V
SRS(US(
^
B
))=fpc
^
N
ns−1nsΣj=1wjU(a)j(
^
B
)(U(a)j(
^
B
))´
^
N
=nsΣj=1wj
fpc={
1−ns
^
N
with finite population correction.
1 without finite population correction.

t Tests

Testing hypothesis H0:Bj=0 for each non-redundant model parameter Bj is performed using the t test statistic:

t(
^
B
j)=
^
B
j
√
^
V
(
^
B
j)

The p-value for the two-sided test is given by the probability P(|T|>|t(
^
B
j)|), where T is a random variable from the t distribution with df degrees of freedom.

Exponentiated parameter estimates

exp(Bj) can be interpreted as a hazard ratio for main effects model. Its 1−α confidence interval is

[exp(L(
^
B
j)),exp(U(
^
B
j))]

where L(
^
B
j),U(
^
B
j) are the lower and upper confidence limits for census parameter Bj.

Related Topics

Proportional Hazards (complex samples cox regression algorithms)
Model (complex samples cox regression algorithms)
Pseudo Partial Likelihood and Derivatives (complex samples cox regression algorithms)
Parameter Estimation (complex samples cox regression algorithms)
Survival and Cumulative Hazard Functions (complex samples cox regression algorithms)
Residuals (complex samples cox regression algorithms)


Survival and Cumulative Hazard Functions (complex samples cox regression algorithms)

complex samples cox regression algorithms,complex samples cox regression algorithms,complex samples cox regression algorithms
survival function,survival function,survival function
survival function,survival function,survival function
complex samples cox regression algorithms,complex samples cox regression algorithms,complex samples cox regression algorithms
complex samples cox regression algorithms,complex samples cox regression algorithms,complex samples cox regression algorithms
hazard function,hazard function,hazard function
hazard function,hazard function,hazard function
complex samples cox regression algorithms,complex samples cox regression algorithms,complex samples cox regression algorithms

In this section, t*1<...<t*K are the ordered observed failure times, and t*0=0, t*K+1=∞ are used for convenience. The estimates are valid for t[0,
max
i
(t2i)].

Related Topics

Proportional Hazards (complex samples cox regression algorithms)
Model (complex samples cox regression algorithms)
Pseudo Partial Likelihood and Derivatives (complex samples cox regression algorithms)
Parameter Estimation (complex samples cox regression algorithms)
Properties of Estimates (complex samples cox regression algorithms)
Residuals (complex samples cox regression algorithms)
Estimation of Baseline Survival and Cumulative Hazard Functions (complex samples cox regression algorithms)
Product-limit Estimate (complex samples cox regression algorithms)
Breslow, or Nelson-Aalan, or Empirical, Estimate (complex samples cox regression algorithms)
Efron Estimate (complex samples cox regression algorithms)
Prediction of Survival and Cumulative Hazard Functions (complex samples cox regression algorithms)


Estimation of Baseline Survival and Cumulative Hazard Functions (complex samples cox regression algorithms)

Only one of these needs to be estimated because H0(t)=−lnS0(t) and S0(t)=exp(−H0(t)). The baseline functions are estimated by right continuous step functions with jumps only at observed failure times; that is,
^
S
0(t)=
^
S
0(t*j) and
^
H
0(t)=
^
H
0(t*j) for t[t*j,t*j+1).

Related Topics

Survival and Cumulative Hazard Functions (complex samples cox regression algorithms)
Product-limit Estimate (complex samples cox regression algorithms)
Breslow, or Nelson-Aalan, or Empirical, Estimate (complex samples cox regression algorithms)
Efron Estimate (complex samples cox regression algorithms)
Prediction of Survival and Cumulative Hazard Functions (complex samples cox regression algorithms)


Product-limit Estimate (complex samples cox regression algorithms)

The non-increasing right continuous baseline survival function S0(t) is estimated here. Let the ratio jump be αj=S0(t*j)/S0(t*j−1) for j = 1 to K, and α0=1, so S0(t)=
∏
{l: t*l≤t}
αl. Assuming that the regression parameters are given, {αj}Kj=1 will be the parameters to be estimated by maximum likelihood estimation.

Pseudo likelihood and its derivatives

Let f(t|x) be the probability density function of failure time at t for a given predictor. The pseudo likelihood is

lS(α,β)=KΣj=1{
Σ
iD(t*j)
wiln(1−αexp(x´iβ)j)+
Σ
iR(t*j)−D(t*j)
wiexp(x´iβ)lnαj}

We will estimate αj by maximizing lS(α,
^
B
), which is equivalent to solving ∂ lS(α,
^
B
)∂αj=0 and hence the following equation.

Σ
iD(t*j)
wiexp(x´i
^
B
)1−αexp(x´iβ)j=
Σ
iR(t*j)
wiexp(x´i
^
B
)

Failure times of single failure

If there is only a single failure ij at failure time t*j, there exists a closed form solution,

^
α
j=(1−wijexp(x´ij
^
B
)
Σ
iR(t*j)
wiexp(x´i
^
B
))exp(−x´ij
^
B
)=(1−wijexp(x´ij
^
B
)E(0)(
^
B
,t*j))exp(−x´ij
^
B
)

Failure times with tied failures

If there are multiple failures at failure time t*j, Newton’s iterative method is used to solve the equation with constraint αj(0,1). A good initial value is

αj0=exp(−
Σ
lD(t*j)
wl
Σ
lR(t*j)
wlexp(x´l
^
B
))=exp(−
Σ
lD(t*j)
wlE(0)(
^
B
,t*j))

Kaplan-Meier estimator: a special situation of no predictors

When there are no predictors; that is, x=0 always, the product-limit estimator becomes the Kaplan-Meier estimator,

^
α
j=1−
Σ
iD(t*j)
wi
Σ
iR(t*j)
wi

Related Topics

Survival and Cumulative Hazard Functions (complex samples cox regression algorithms)
Estimation of Baseline Survival and Cumulative Hazard Functions (complex samples cox regression algorithms)
Breslow, or Nelson-Aalan, or Empirical, Estimate (complex samples cox regression algorithms)
Efron Estimate (complex samples cox regression algorithms)
Prediction of Survival and Cumulative Hazard Functions (complex samples cox regression algorithms)


Breslow, or Nelson-Aalan, or Empirical, Estimate (complex samples cox regression algorithms)

Here H0(t) is estimated by a non-decreasing step function with steps at observed failure times:

^
H
0(t)=
Σ
{k:t*k≤t}
Σ
iD(t*k)
wiE(0)(
^
B
,t*k)

where Ni(t) is the count of failures up to time t for record i.

Related Topics

Survival and Cumulative Hazard Functions (complex samples cox regression algorithms)
Estimation of Baseline Survival and Cumulative Hazard Functions (complex samples cox regression algorithms)
Product-limit Estimate (complex samples cox regression algorithms)
Efron Estimate (complex samples cox regression algorithms)
Prediction of Survival and Cumulative Hazard Functions (complex samples cox regression algorithms)


Efron Estimate (complex samples cox regression algorithms)

When there are ties in failure times, the following estimation can also be used. This will reduce to Breslow when there are no ties.

^
H
0(t)=
Σ
{k:t*k≤t}
Σ
iD(t*k)
wid(t*k)d(t*k)−1Σr=01EE(0)(
^
B
,t*k,r)

Related Topics

Survival and Cumulative Hazard Functions (complex samples cox regression algorithms)
Estimation of Baseline Survival and Cumulative Hazard Functions (complex samples cox regression algorithms)
Product-limit Estimate (complex samples cox regression algorithms)
Breslow, or Nelson-Aalan, or Empirical, Estimate (complex samples cox regression algorithms)
Prediction of Survival and Cumulative Hazard Functions (complex samples cox regression algorithms)


Prediction of Survival and Cumulative Hazard Functions (complex samples cox regression algorithms)

For a given x, the cumulative hazard function and survival functions are predicted by

^
H
(t|x)=
^
H
0(t)exp(x´
^
B
)
^
S
(t|x)=exp(−H(t|x))=(
^
S
0(t))exp(x´
^
B
)

where
^
H
0(t) and
^
S
0(t) are the estimated baseline cumulative hazard function and baseline survival function.

For variance calculation, the same formula will be used regardless of different ways to estimate baseline functions. The variance for cumulative hazard is

^
V
(
^
H
(t|x))≈(Var(nsΣj=1wjq(a)j(t|x)))q(a)j(t|x)=
^
q
(a)j(t|x)

where

^
q
(a)j(t|x)=
Σ
i{ id i=j}
^
q
i(t|x)
^
q
i(t|x)=vi(t|x)−(A(t|x))´(JS(
^
B
))−1Ui(
^
B
)
vi(t|x)=δiI(t2i≤t)E(0)(
^
B
,t2i|x)−nΣl=1wlδlI(t2l≤t)Yi(t2l)exp((xi−x)´
^
B
)(E(0)(
^
B
,t2l|x))2
A(t|x)=−nΣl=1wlδlI(t2l≤t)E(1)(
^
B
,t2l|x)(E(0)(
^
B
,t2l|x))2
E(0)(
^
B
,t|x)=nΣl=1wlYl(t)exp((xl−x)´
^
B
)
E(1)(
^
B
,t|x)=nΣl=1wlYl(t)(xl−x)exp((xl−x)´
^
B
)

and JS(β) and Ui(β) are defined in Pseudo Partial Likelihood and Derivatives (complex samples cox regression algorithms) and Properties of Estimates (complex samples cox regression algorithms), respectively. See Lin (2000) for more details. Var(nsΣj=1wjq(a)j(t)) is the design-based variance of nsΣj=1wjq(a)j(t) which is the estimated population total of q(a)j(t). See the topic Complex Samples: Covariance Matrix of Total for more information.

The variance estimate for the survival function is

^
V
(
^
S
(t|x))=(
^
S
(t|x))2
^
V
(
^
H
(t|x))

Confidence interval for survival function

A confidence interval for
^
S
(t|x) can be calculated in the following ways. Let

Y(t)={
^
S
(t|x) 		original
ln
^
S
(t|x) 		log
ln(−ln
^
S
(t|x)) 		log−log

the confidence interval for
^
S
(t|x) at 1−α level is

{
Y(t)±zα/2
√
^
V
(Y(t))
=
^
S
(t|x)±zα/2
√
^
V
(Y(t))
original
exp(Y(t)±zα/2
√
^
V
(Y(t))
)=
^
S
(t|x)exp(±zα/2
√
^
V
(Y(t))
) 		log
exp{−exp(Y(t)±zα/2
√
^
V
(Y(t))
)}=(
^
S
(t|x))exp(±zα/2
√
^
V
(Y(t))
) 		log−log

where zα/2 is the 1−α2 upper percentile point of the standard normal distribution and

^
V
(Y)={
(
^
S
(t|x))2
^
V
(
^
H
(t|x)) 		original
^
V
(
^
H
(t|x)) 		log
(
^
H
(t|x))−2
^
V
(
^
H
(t|x)) 		log−log

Please note that the first two confidence intervals may have values greater than 1 or less than zero (we can truncate them to 0 or 1 if they are out of range). The third one always between 0 and 1. However Link (1984 & 1986) suggested that the second one performed the best.

Related Topics

Survival and Cumulative Hazard Functions (complex samples cox regression algorithms)
Estimation of Baseline Survival and Cumulative Hazard Functions (complex samples cox regression algorithms)
Product-limit Estimate (complex samples cox regression algorithms)
Breslow, or Nelson-Aalan, or Empirical, Estimate (complex samples cox regression algorithms)
Efron Estimate (complex samples cox regression algorithms)


Residuals (complex samples cox regression algorithms)

complex samples cox regression algorithms,complex samples cox regression algorithms,complex samples cox regression algorithms
residuals,residuals,residuals
Schoenfeld's partial residuals,Schoenfeld's partial residuals,Schoenfeld's partial residuals
complex samples cox regression algorithms,complex samples cox regression algorithms,complex samples cox regression algorithms
martingale residuals,martingale residuals,martingale residuals
complex samples cox regression algorithms,complex samples cox regression algorithms,complex samples cox regression algorithms
deviance residuals,deviance residuals,deviance residuals
complex samples cox regression algorithms,complex samples cox regression algorithms,complex samples cox regression algorithms
Cox-Snell residuals,Cox-Snell residuals,Cox-Snell residuals
complex samples cox regression algorithms,complex samples cox regression algorithms,complex samples cox regression algorithms
score residuals,score residuals,score residuals
complex samples cox regression algorithms,complex samples cox regression algorithms,complex samples cox regression algorithms
DFBETA,DFBETA,DFBETA
complex samples cox regression algorithms,complex samples cox regression algorithms,complex samples cox regression algorithms
aggregated residuals,aggregated residuals,aggregated residuals
complex samples cox regression algorithms,complex samples cox regression algorithms,complex samples cox regression algorithms

Some residuals defined below depend on the baseline cumulative function. Three estimation methods for baseline cumulative function are available to user. If users don’t request estimation of cumulative hazard or survival function, but request for residuals, then use Breslow estimate if Breslow approximation is chosen in estimating the parameters, and Efron estimate if Efron approximation is chosen in estimating the parameters.

Schoenfeld’s partial residuals

This is calculated only for observations with δi=1.

r (Sch) i=wiui(
^
B
,t2i)

where ui(.) is defined in Pseudo Partial Likelihood and Derivatives (complex samples cox regression algorithms).

Martingale residual

r (M) i=δi−(H0(t2i)−H0(t1i))exp(x´i
^
B
)

Deviance residual

r (D) i=sign(r (M) i)
√ 2[−r (M) i−δiln(δi−r (M) i)]

Cox-Snell residual

r (CS) i=(H0(t2i)−H0(t1i))exp(x´i
^
B
)=δi−r (M) i

Score residual

r (Sco) i=wiUi(
^
B
)

where Ui(β) is defined in Properties of Estimates (complex samples cox regression algorithms).

DFBETA

DFBETA that measures the influence of record i on parameter estimate is

−wiJ−1S(
^
B
)Ui(
^
B
)

This is approximately the parameter change,
^
B
−
^
B
(i), where
^
B
(i) is the parameter estimate when the ith record is omitted.

Aggregated residual

When there are multiple records representing a single subject (as in data with two time variables), residuals can be given for each subject rather than for each record. Except for Schoenfeld’s and deviance residuals, the aggregated residual for a subject is simply the sum of the corresponding record residuals over all the records belonging to the same subject. Please notice that aggregation can only be done for data in the format { id i,ti1,ti2,δi,xi,wi}ni=1. For Schoenfeld’s residual, the aggregated version is the same as that of the non-aggregated version because Schoenfeld’s residual is only defined for records with δi=1. For deviance residual, the aggregated residual can be derived using the aggregated Martingale residual.

Related Topics

Proportional Hazards (complex samples cox regression algorithms)
Model (complex samples cox regression algorithms)
Pseudo Partial Likelihood and Derivatives (complex samples cox regression algorithms)
Parameter Estimation (complex samples cox regression algorithms)
Properties of Estimates (complex samples cox regression algorithms)
Survival and Cumulative Hazard Functions (complex samples cox regression algorithms)


Baseline Hazard Strata (complex samples cox regression algorithms)

complex samples cox regression algorithms,complex samples cox regression algorithms,complex samples cox regression algorithms
baseline hazard strata,baseline hazard strata,baseline hazard strata

Cox regression can be extended to allow multiple baseline hazard strata (note that these are different from the sample design strata). The baseline hazard strata divide the subjects into disjoint groups, each of which has different baseline hazard function while the regression parameter β stays the same for all baseline hazard strata.

Suppose there are G baseline hazard strata. For baseline hazard stratum g, the model becomes

hg(t|x)=h0g(t)exp{x´β}

Let Vg be the set of records belong to baseline hazard stratum g. Adding the subscript g to a quantity denotes that it is calculated only using data in Vg. For baseline stratum g, the previously defined quantities would be {E(j)g(β,t)}2j=0, {EE(j)g(β,t)}2j=0, xg(β,t), ugi(β,t), ℑgi(β,t), lSg(β), USg(β), JSg(β), Ugi(β).

The overall pseudo partial likelihood, its first and second derivatives become lS(β)=GΣg=1lSg(β), US(β)=GΣg=1USg(β), JS(β)=GΣg=1JSg(β).

The parameter B can be estimated by maximizing lS(β) as before. The variance of the parameter estimates and design effects are calculated by the same formulae with the following modifications:

U(a)j(β)=Σi{ id i=j}Ukii(β)

where ki is the baseline stratum that case i belongs to, and the sum is over all cases for subject j, no matter which baseline stratum the case is in.

After the regression parameters are estimated, the cumulative hazard and survival functions can be estimated for each baseline stratum separately using the same formula but on data only from that stratum. Let
^
H
g(t|x) denote the estimate of stratum g's cumulative hazard function at time t for a given predictor x. Its variance calculation is similar as before but with the following changes.

^
V
(
^
H
g(t|x))≈(Var(nsΣj=1wjq(a)g,j(t|x)))q(a)g,j(t|x)=
^
q
(a)g,j(t|x)

where

^
q
(a)g,j(t|x)=Σi{ id i =j}
^
q
g,kii(t|x)
^
q
g,ki(t|x)=vgi(t|x)I(iVg)−(Ag(t|x))´(JS(
^
B
))−1Ukii(
^
B
)

and vgi(t|x),Ag(t|x) are calculated by the same equations as before but only using data from stratum g.

Given regression parameters at the estimated values, the residual for each record is calculated based on the data only from the stratum that the record belongs to. If record i belongs to stratum g, then in its residuals calculation, simply replace ui,H0,Ui by ugi,H0g,Ugi.

Related Topics

CSCOXREG Algorithms
Notation (complex samples cox regression algorithms)
Input (complex samples cox regression algorithms)
Predictor Transformations (complex samples cox regression algorithms)
Proportional Hazards (complex samples cox regression algorithms)
Time-Dependent Predictors (complex samples cox regression algorithms)
Hypothesis Testing (complex samples cox regression algorithms)
Testing Model Assumptions (complex samples cox regression algorithms)
Subpopulation Estimates (complex samples cox regression algorithms)
Missing Values (complex samples cox regression algorithms)
References (complex samples cox regression algorithms)


Time-Dependent Predictors (complex samples cox regression algorithms)

complex samples cox regression algorithms,complex samples cox regression algorithms,complex samples cox regression algorithms
time-dependent predictor,time-dependent predictor,time-dependent predictor
time-dependent predictor,time-dependent predictor,time-dependent predictor
complex samples cox regression algorithms,complex samples cox regression algorithms,complex samples cox regression algorithms

Cox regression can also be extended to allow time dependent predictors, x=x(t). The Cox regression model becomes

h(t|x(t))=h0(t)exp{x´(t)β}

The previously defined equations still apply by simply replacing x with x(t) accordingly.

Note: If the values of a time-dependent predictor only depend on time and not the case number, then this predictor will be absorbed in the baseline hazard function. The regression parameter for this predictor is set as redundant.

Related Topics

CSCOXREG Algorithms
Notation (complex samples cox regression algorithms)
Input (complex samples cox regression algorithms)
Predictor Transformations (complex samples cox regression algorithms)
Proportional Hazards (complex samples cox regression algorithms)
Baseline Hazard Strata (complex samples cox regression algorithms)
Hypothesis Testing (complex samples cox regression algorithms)
Testing Model Assumptions (complex samples cox regression algorithms)
Subpopulation Estimates (complex samples cox regression algorithms)
Missing Values (complex samples cox regression algorithms)
References (complex samples cox regression algorithms)
Predictors (complex samples cox regression algorithms)
Survival and Cumulative Hazard Functions (complex samples cox regression algorithms)
Residuals (complex samples cox regression algorithms)


Predictors (complex samples cox regression algorithms)

All predictor values for records in the risk set at each failure time are needed in the calculation. Two kinds of time dependent predictors are allowed: piecewise constant predictors, and predictor values that can be calculated at all the needed times.

Piecewise constant predictors

Often the predictors for a subject are measured many times during the study. Between measurements, the predictor value is assumed to be unchanged. Data with two time variables can handle this kind of piecewise constant predictors. For each subject, multiple records with two time variables (see Input (complex samples cox regression algorithms)) are created, one record for each distinct pattern of the time-dependent measurements. The predictor values are constant for each record. This becomes the two failure time variables with time-independent covariate situation.

Note: it is the user’s responsibility to create the data set of two time variables.

Calculatable predictors

The predictor values can be calculated and hence known at any time point; for example, the age of a subject. The TIME PROGRAM command is used for this purpose. See the topic TIME PROGRAM for more information.

Related Topics

Time-Dependent Predictors (complex samples cox regression algorithms)
Survival and Cumulative Hazard Functions (complex samples cox regression algorithms)
Residuals (complex samples cox regression algorithms)


Survival and Cumulative Hazard Functions (complex samples cox regression algorithms)

For product-limit estimate, solve for {αk}Kk=1 from:

Σ
iD(t*k)
wiexp(x´i(t*k)
^
B
)1−αk=
Σ
iR(t*k)
wiexp(x´i(t*k)
^
B
)

For Breslow estimation:

^
H
0(t)=
Σ
{k:t*k≤t}
Σ
iD(t*k)
wi
Σ
lR(t*k)
wlexp(x´l(t*k)
^
B
)

For Efron estimation:

^
H
0(t)=
Σ
{k:t*k<t}
Σ
iD(t*k)
wid(t*k)×
Σ
r=0
1
Σ
lR(t*k)
wlexp(x´l(t*k)
^
B
)−rd(t*k)
Σ
lD(t*k)
wlexp(x´l(t*k)
^
B
)

Using the fact that
^
H
0(t) and
^
S
0(t) are right continuous step functions with jumps only at observed failure times, then for a given predictor path up to time T: {x(u):u≤T}, the cumulative hazards and survival function are estimated by step functions. For t≤min(T,
max
i
(t2i))

H(t|{x(u):u≤t})=
Σ
{j:t*j≤t}
(
^
H
0(t*j)−
^
H
0(t*j−1))exp(x´(t*j)
^
B
)
S(t|{x(u):u≤t})=
∏
{j:t*j≤t}
{
^
S
0(t*j)
^
S
0(t*j−1)}exp(x´(t*j)
^
B
)

The variance of H(t|{x(u):u≤t}) can be calculated as in the case without time-dependent predictors, but with the following changes:

vi(t|{x(u):u≤t})=δiI(t2i≤t)E(0)(
^
B
,t2i|x(t2i))
−nΣl=1wlδlI(t2l≤t)Yi(t2l)exp((xi(t2l)−x(t2l))´
^
B
)(E(0)(
^
B
,t2l|x(t2l)))2
A(t|{x(u):u≤t})=−nΣl=1wlδlI(t2l≤t)E(1)(
^
B
,t2l|x(t2l))(E(0)(
^
B
,t2l|x(t2l)))2
E(0)(
^
B
,t|x(t))=nΣl=1wlYl(t)exp((xl(t)−x(t))´
^
B
)
E(1)(
^
B
,t|x)=nΣl=1wlYl(t)(xl(t)−x(t))exp((xl(t)−x(t))´
^
B
)

There is no agreeable interpretation of the survival function when there are calculatable time-dependent predictors. Survival curves based on a time-dependent covariate must be used with extreme caution.

Related Topics

Time-Dependent Predictors (complex samples cox regression algorithms)
Predictors (complex samples cox regression algorithms)
Residuals (complex samples cox regression algorithms)


Residuals (complex samples cox regression algorithms)

When there are time dependent predictors, all residuals are calculated in the situation where data with two time variables are used to handle the time-dependent predictors. Only Schoenfeld’s residual, score residual, and DFBETA are calculated in other situations.

Related Topics

Time-Dependent Predictors (complex samples cox regression algorithms)
Predictors (complex samples cox regression algorithms)
Survival and Cumulative Hazard Functions (complex samples cox regression algorithms)


Hypothesis Testing (complex samples cox regression algorithms)

complex samples cox regression algorithms,complex samples cox regression algorithms,complex samples cox regression algorithms
hypothesis testing,hypothesis testing,hypothesis testing

Contrasts defined as a linear combination of regression parameters can be tested. Given matrix L with r rows and p columns, and vector K with r elements, we test the linear hypothesis H0:LB=K if it is testable. See the topic Complex Samples: Model Testing for more information.

Related Topics

CSCOXREG Algorithms
Notation (complex samples cox regression algorithms)
Input (complex samples cox regression algorithms)
Predictor Transformations (complex samples cox regression algorithms)
Proportional Hazards (complex samples cox regression algorithms)
Baseline Hazard Strata (complex samples cox regression algorithms)
Time-Dependent Predictors (complex samples cox regression algorithms)
Testing Model Assumptions (complex samples cox regression algorithms)
Subpopulation Estimates (complex samples cox regression algorithms)
Missing Values (complex samples cox regression algorithms)
References (complex samples cox regression algorithms)


Testing Model Assumptions (complex samples cox regression algorithms)

complex samples cox regression algorithms,complex samples cox regression algorithms,complex samples cox regression algorithms
testing model assumptions,testing model assumptions,testing model assumptions

Tests are performed by considering bigger alternative models involving additional parameters. When fitting alternative models, initial values are set to 0 for all additional parameters and β=
^
B
for old parameters where
^
B
is the previously estimated value of model h(t|x)=h0(t)exp{x´β}.

If there are baseline hazard strata or time dependent covariates in the original model, then the alternative model should also include them. The only difference between the original and the alternative model is that there are more predictors in the alternative model.

Related Topics

CSCOXREG Algorithms
Notation (complex samples cox regression algorithms)
Input (complex samples cox regression algorithms)
Predictor Transformations (complex samples cox regression algorithms)
Proportional Hazards (complex samples cox regression algorithms)
Baseline Hazard Strata (complex samples cox regression algorithms)
Time-Dependent Predictors (complex samples cox regression algorithms)
Hypothesis Testing (complex samples cox regression algorithms)
Subpopulation Estimates (complex samples cox regression algorithms)
Missing Values (complex samples cox regression algorithms)
References (complex samples cox regression algorithms)
Testing Proportional Hazards (complex samples cox regression algorithms)


Testing Proportional Hazards (complex samples cox regression algorithms)

A key assumption of Cox regression is proportional hazards. When predictors are constant, the hazard ratio h(t|x2)h(t|x1)=exp{(x2−x1)´β} is independent of time, so the hazards at different predictor values are proportional. We test the adequacy of the proportional hazards assumption by considering an alternative model with time-dependent coefficients. Suppose that there are p predictors, and we are interested in testing the proportional hazard assumption for p* predictors, assuming the first p* predictors without loss of generality.

Specific alternative model

Consider the alternative model

h(t|x)=h0(t)exp{x´β(t)}=h0(t)exp{x´β+z´(t)θ}

where z´(t)=(x1g1(t),...,xp*gp*(t)) is a time dependent predictor vector, and g1(t),...,gp*(t) are p* user-specified functions of time, one for each of the predictors of interest. This is a proportional hazards model with time dependent covariates with parameter vector (β´,θ´)´. Fit this model and test H0:θ=0.

For the time functions, the available options are

g(t)={
t | identity
lnt | log
rd(t) | rank
1−SKM(t) | KM

where SKM(t) is the Kaplan-Meier estimate of the survival function, and rd(t) is

rd(t)={
1 | t<t*1
j | t[t*j−1,t*j)
K+1 | t≥t*K

For simplicity, we will only allow g1(t)=...=gp*(t)=g(t). By default, p*=p and g(t)=1−SKM(t).

Note: When there are baseline strata, rd(t) and SKM(t) are calculated based on the whole data, not any individual strata.

Related Topics

Testing Model Assumptions (complex samples cox regression algorithms)


Subpopulation Estimates (complex samples cox regression algorithms)

complex samples cox regression algorithms,complex samples cox regression algorithms,complex samples cox regression algorithms
subpopulation estimates,subpopulation estimates,subpopulation estimates

When analyses are requested for a given subpopulation, we perform calculations on the redefined data such that if the ith record is not in the subpopulation, then

t1i=t2i=0,δi=0,xi=0

In the estimations of regression parameters and the survival/cumulative hazard functions, this substitution is equivalent to including only the subpopulation elements in the calculations. In the calculation of variance
^
I
(β) and
^
I
SRS(β), this means that Ui(β)=0 if the ith record is not in the subpopulation.

Related Topics

CSCOXREG Algorithms
Notation (complex samples cox regression algorithms)
Input (complex samples cox regression algorithms)
Predictor Transformations (complex samples cox regression algorithms)
Proportional Hazards (complex samples cox regression algorithms)
Baseline Hazard Strata (complex samples cox regression algorithms)
Time-Dependent Predictors (complex samples cox regression algorithms)
Hypothesis Testing (complex samples cox regression algorithms)
Testing Model Assumptions (complex samples cox regression algorithms)
Missing Values (complex samples cox regression algorithms)
References (complex samples cox regression algorithms)


Missing Values (complex samples cox regression algorithms)

complex samples cox regression algorithms,complex samples cox regression algorithms,complex samples cox regression algorithms
missing values,missing values,missing values

List-wise deletion is used to determine which records are used in the analysis. Negative failure times, ti or t1i or t2i, are considered missing.

Related Topics

CSCOXREG Algorithms
Notation (complex samples cox regression algorithms)
Input (complex samples cox regression algorithms)
Predictor Transformations (complex samples cox regression algorithms)
Proportional Hazards (complex samples cox regression algorithms)
Baseline Hazard Strata (complex samples cox regression algorithms)
Time-Dependent Predictors (complex samples cox regression algorithms)
Hypothesis Testing (complex samples cox regression algorithms)
Testing Model Assumptions (complex samples cox regression algorithms)
Subpopulation Estimates (complex samples cox regression algorithms)
References (complex samples cox regression algorithms)


References (complex samples cox regression algorithms)

complex samples cox regression algorithms,complex samples cox regression algorithms,complex samples cox regression algorithms
references,references,references

Binder, D. A. 1992. Fitting Cox’s Proportional Hazards Models from Survey Data. Biometrika, 79, 139-147.

Collett, D. 2003. Modelling survival data in medical research, 2 ed. Boca Raton: Chapman & Hall/CRC.

Grambsch, P., and T. Therneau. 1994. Proportional hazards tests and diagnostics based on weighted residuals. Biometrika, 81, 515-526.

Kalbfleisch, J. D., and R. L. Prentice. 2002. The statistical analysis of failure time data, 2 ed. New York: John Wiley & Sons, Inc.

Lin, D. Y. 2000. On fitting Cox’s proportional hazards models to survey data. Biometrika, 87, 37-47.

Link, C. L. 1984. Confidence intervals for the survival function using Cox's proportional hazards model with covariates. Biometrics, 40, 601-610.

Link, C. L. 1986. Confidence intervals for the survival function in the presence of covariates. Biometrics, 42, 219-220.

Therneau, T., and P. Grambsch. 2000. Modeling Survival Data: Extending the Cox Model. New York: Springer.

Zhang, D. 2005. "Analysis of Survival Data, lecture notes, Chapter 10." Available at http://www4.stat.ncsu.edu/%7Edzhang2/st745/chap10.pdf.

Related Topics

CSCOXREG Algorithms
Notation (complex samples cox regression algorithms)
Input (complex samples cox regression algorithms)
Predictor Transformations (complex samples cox regression algorithms)
Proportional Hazards (complex samples cox regression algorithms)
Baseline Hazard Strata (complex samples cox regression algorithms)
Time-Dependent Predictors (complex samples cox regression algorithms)
Hypothesis Testing (complex samples cox regression algorithms)
Testing Model Assumptions (complex samples cox regression algorithms)
Subpopulation Estimates (complex samples cox regression algorithms)
Missing Values (complex samples cox regression algorithms)


CSDESCRIPTIVES Algorithms

CSDESCRIPTIVES (command),CSDESCRIPTIVES (command),CSDESCRIPTIVES (command)
algorithms,algorithms,algorithms
Complex Samples Ratios,Complex Samples Ratios,Complex Samples Ratios
algorithms,algorithms,algorithms
Complex Samples Descriptives,Complex Samples Descriptives,Complex Samples Descriptives
algorithms,algorithms,algorithms
complex samples descriptives algorithms,complex samples descriptives algorithms,complex samples descriptives algorithms

This document describes the algorithms used in the complex sampling estimation procedure CSDESCRIPTIVES. The data do not have to be sorted.

Complex sample data must contain both the values of the variables to be analyzed and the information on the current sampling design. Sampling design includes the sampling method, strata and clustering information, and inclusion probabilities for all units at every sampling stage. The overall sampling weight must be specified for each observation.

The sampling design specification for CSDESCRIPTIVES may include up to three stages of sampling. Any of the following general sampling methods may be assumed in the first stage: random sampling with replacement, random sampling without replacement and equal probabilities and random sampling without replacement and unequal probabilities. The first two sampling methods can also be specified for the second and the third sampling stage.

Related Topics

Notation (complex samples descriptives algorithms)
Weights (complex samples descriptives algorithms)
Z Expressions (complex samples descriptives algorithms)
Variable Total (complex samples descriptives algorithms)
Variable Total Variance (complex samples descriptives algorithms)
Population Size Estimation (complex samples descriptives algorithms)
Ratio Estimation (complex samples descriptives algorithms)
Mean Estimation (complex samples descriptives algorithms)
Domain Estimation (complex samples descriptives algorithms)
Standard Errors (complex samples descriptives algorithms)
Coefficient of Variation (complex samples descriptives algorithms)
T Tests (complex samples descriptives algorithms)
Confidence Limits (complex samples descriptives algorithms)
Design Effects (complex samples descriptives algorithms)
References (complex samples descriptives algorithms)


Notation (complex samples descriptives algorithms)

complex samples descriptives algorithms,complex samples descriptives algorithms,complex samples descriptives algorithms
notation,notation,notation

The following notation is used throughout this chapter unless otherwise stated:

H | Number of strata.
nh | Sampled number of primary sampling units (PSU) per stratum.
fh | Sampling rate per stratum.
mhi | Number of elements in the ith sampled unit in stratum h.
whij | Overall sampling weight for the jth element in the ith sampled unit in stratum h.
yhij | Value of variable y for the jth element in the ith sampled unit in stratum h.
Y | Population total sum for variable y.
n | Total number of elements in the sample.
N | Total number of elements in the population.

Related Topics

CSDESCRIPTIVES Algorithms
Weights (complex samples descriptives algorithms)
Z Expressions (complex samples descriptives algorithms)
Variable Total (complex samples descriptives algorithms)
Variable Total Variance (complex samples descriptives algorithms)
Population Size Estimation (complex samples descriptives algorithms)
Ratio Estimation (complex samples descriptives algorithms)
Mean Estimation (complex samples descriptives algorithms)
Domain Estimation (complex samples descriptives algorithms)
Standard Errors (complex samples descriptives algorithms)
Coefficient of Variation (complex samples descriptives algorithms)
T Tests (complex samples descriptives algorithms)
Confidence Limits (complex samples descriptives algorithms)
Design Effects (complex samples descriptives algorithms)
References (complex samples descriptives algorithms)


Weights (complex samples descriptives algorithms)

Overall weights specified for each ultimate element are processed as given. See Weights (complex samples: covariance matrix of total algorithms) in Complex Samples: Covariance Matrix of Total for more information on weights and variance estimation methods.

Related Topics

CSDESCRIPTIVES Algorithms
Notation (complex samples descriptives algorithms)
Z Expressions (complex samples descriptives algorithms)
Variable Total (complex samples descriptives algorithms)
Variable Total Variance (complex samples descriptives algorithms)
Population Size Estimation (complex samples descriptives algorithms)
Ratio Estimation (complex samples descriptives algorithms)
Mean Estimation (complex samples descriptives algorithms)
Domain Estimation (complex samples descriptives algorithms)
Standard Errors (complex samples descriptives algorithms)
Coefficient of Variation (complex samples descriptives algorithms)
T Tests (complex samples descriptives algorithms)
Confidence Limits (complex samples descriptives algorithms)
Design Effects (complex samples descriptives algorithms)
References (complex samples descriptives algorithms)


Z Expressions (complex samples descriptives algorithms)

zhij=whijyhij

zhi=mhiΣj=1zhij

zh=1nhnhΣi=1zhi

S2h=1nh−1nhΣi=1(zhi−zh)2

For multi-stage samples, the index h denotes a stratum in the given stage, and i stands for unit from h in the same stage. The index j runs over all final stage elements contained in unit hi.

Related Topics

CSDESCRIPTIVES Algorithms
Notation (complex samples descriptives algorithms)
Weights (complex samples descriptives algorithms)
Variable Total (complex samples descriptives algorithms)
Variable Total Variance (complex samples descriptives algorithms)
Population Size Estimation (complex samples descriptives algorithms)
Ratio Estimation (complex samples descriptives algorithms)
Mean Estimation (complex samples descriptives algorithms)
Domain Estimation (complex samples descriptives algorithms)
Standard Errors (complex samples descriptives algorithms)
Coefficient of Variation (complex samples descriptives algorithms)
T Tests (complex samples descriptives algorithms)
Confidence Limits (complex samples descriptives algorithms)
Design Effects (complex samples descriptives algorithms)
References (complex samples descriptives algorithms)


Variable Total (complex samples descriptives algorithms)

An estimate for the population total of variable y in a single-stage sample is the weighted sum over all the strata and all the clusters:

^
Y
=HΣh=1nhΣi=1mhiΣj=1whijyhij

Alternatively, compute the weighted sum over all the elements in the sample:

^
Y
=nΣi=1wiyi

The latter expression is more general because it also applies to multi-stage samples.

Related Topics

CSDESCRIPTIVES Algorithms
Notation (complex samples descriptives algorithms)
Weights (complex samples descriptives algorithms)
Z Expressions (complex samples descriptives algorithms)
Variable Total Variance (complex samples descriptives algorithms)
Population Size Estimation (complex samples descriptives algorithms)
Ratio Estimation (complex samples descriptives algorithms)
Mean Estimation (complex samples descriptives algorithms)
Domain Estimation (complex samples descriptives algorithms)
Standard Errors (complex samples descriptives algorithms)
Coefficient of Variation (complex samples descriptives algorithms)
T Tests (complex samples descriptives algorithms)
Confidence Limits (complex samples descriptives algorithms)
Design Effects (complex samples descriptives algorithms)
References (complex samples descriptives algorithms)


Variable Total Variance (complex samples descriptives algorithms)

For a multi-stage sample containing a with replacement sampling stage, all specifications other than weights are ignored for the subsequent stages. They make no contribution to the variance estimates.

Related Topics

CSDESCRIPTIVES Algorithms
Notation (complex samples descriptives algorithms)
Weights (complex samples descriptives algorithms)
Z Expressions (complex samples descriptives algorithms)
Variable Total (complex samples descriptives algorithms)
Population Size Estimation (complex samples descriptives algorithms)
Ratio Estimation (complex samples descriptives algorithms)
Mean Estimation (complex samples descriptives algorithms)
Domain Estimation (complex samples descriptives algorithms)
Standard Errors (complex samples descriptives algorithms)
Coefficient of Variation (complex samples descriptives algorithms)
T Tests (complex samples descriptives algorithms)
Confidence Limits (complex samples descriptives algorithms)
Design Effects (complex samples descriptives algorithms)
References (complex samples descriptives algorithms)
Single Stage Sample (complex samples descriptives algorithms)
Two-stage Sample (complex samples descriptives algorithms)
Three-stage Sample (complex samples descriptives algorithms)


Single Stage Sample (complex samples descriptives algorithms)

The variance of the total for variable y in a single-stage sampling is estimated by the following:

^
V
(
^
Y
)=
^
V
1(
^
Y
)=HΣh=1Uh

where Uh is an estimated contribution from stratum h and depends on the sampling method as follows:

• For sampling with replacement: Uh=nhS2h

• For simple random sampling: Uh=(1−fh)nhS2h

• For sampling without replacement and unequal probabilities: Uh=nhΣi=1nhΣi>j(πhiπhjπhij−1)(zhi−zhj)2

πhi and πhj are the inclusion probabilities for units i and j in stratum h, and πhij is the joint inclusion probability for the same units. This estimator is due to Yates and Grundy (1953) and Sen (1953).

For each stratum h containing a single element, the variance contribution Uh is always set to zero.

Related Topics

Variable Total Variance (complex samples descriptives algorithms)
Two-stage Sample (complex samples descriptives algorithms)
Three-stage Sample (complex samples descriptives algorithms)


Two-stage Sample (complex samples descriptives algorithms)

When the sample is obtained in two stages and sampling without replacement is applied in the first stage, use the following estimate for the variance of the total for variable y:

^
V
(
^
Y
)=
^
V
2(
^
Y
)=
^
V
1(
^
Y
)+HΣh=1nhΣi=1πhiKhiΣk=1Uhik

where

• πhi is the first stage inclusion probability for the primary sampling unit i in stratum h. In the case of simple random sampling, the inclusion probability is equal to the sampling rate fh for stratum h.

• Khi is the number of second stage strata in the primary sampling unit i within the first stage stratum h.

• Uhik is a variance contribution from the second stage stratum k from the primary sampling unit hi. Its value depends on the second stage sampling method; the corresponding formula from Single Stage Sample (complex samples descriptives algorithms) applies.

Related Topics

Variable Total Variance (complex samples descriptives algorithms)
Single Stage Sample (complex samples descriptives algorithms)
Three-stage Sample (complex samples descriptives algorithms)


Three-stage Sample (complex samples descriptives algorithms)

When the sample is obtained in three stages where sampling in the first stage is done without replacement and simple random sampling is applied in the second stage, we use the following estimate for the variance of the total for variable y:

^
V
(
^
Y
)=
^
V
2(
^
Y
)+HΣh=1nhΣi=1πhiKhiΣk=1fhiknhikΣj=1LhikjΣl=1Uhikjl

where

• fhik is the sampling rate for the secondary sampling units in the second stage stratum hik.

• Lhikj is the number of third stage strata in the secondary sampling unit hikj.

• Uhikjl is a variance contribution from the third stage stratum l contained in the secondary sampling unit hikj. Its value depends on the second stage sampling method; the corresponding formula from Single Stage Sample (complex samples descriptives algorithms) applies.

Related Topics

Variable Total Variance (complex samples descriptives algorithms)
Single Stage Sample (complex samples descriptives algorithms)
Two-stage Sample (complex samples descriptives algorithms)


Population Size Estimation (complex samples descriptives algorithms)

population size,population size,population size
complex samples descriptives algorithms,complex samples descriptives algorithms,complex samples descriptives algorithms
complex samples descriptives algorithms,complex samples descriptives algorithms,complex samples descriptives algorithms
population size estimation,population size estimation,population size estimation

An estimate for the population size corresponds to the estimate for the variable total; it is sum of the sampling weights. We have the following estimate for the single-stage samples:

^
N
=HΣh=1nhΣi=1mhiΣj=1whij

More generally,

^
N
=nΣi=1wi

The variance of
^
N
is obtained by replacing yhij with 1; that is, by replacing zhij with whij in the corresponding variance estimator formula for
^
V
(
^
Y
).

Related Topics

CSDESCRIPTIVES Algorithms
Notation (complex samples descriptives algorithms)
Weights (complex samples descriptives algorithms)
Z Expressions (complex samples descriptives algorithms)
Variable Total (complex samples descriptives algorithms)
Variable Total Variance (complex samples descriptives algorithms)
Ratio Estimation (complex samples descriptives algorithms)
Mean Estimation (complex samples descriptives algorithms)
Domain Estimation (complex samples descriptives algorithms)
Standard Errors (complex samples descriptives algorithms)
Coefficient of Variation (complex samples descriptives algorithms)
T Tests (complex samples descriptives algorithms)
Confidence Limits (complex samples descriptives algorithms)
Design Effects (complex samples descriptives algorithms)
References (complex samples descriptives algorithms)


Ratio Estimation (complex samples descriptives algorithms)

ratios,ratios,ratios
complex samples descriptives algorithms,complex samples descriptives algorithms,complex samples descriptives algorithms
complex samples descriptives algorithms,complex samples descriptives algorithms,complex samples descriptives algorithms
ratio estimation,ratio estimation,ratio estimation

Let R=Y/X be the ratio of the totals for variables y and x. It is estimated by

^
R
=
^
Y
/
^
X

where
^
Y
and
^
X
are the estimates for the corresponding variable totals.

The variance of
^
R
is approximated using the Taylor linearization formula following Woodruff (1971). The estimate for the approximate variance of the ratio estimate
^
V
(
^
R
) is obtained by replacing zhij with

zhij=whij(yhij−
^
R
xhij)/
^
X

in the corresponding variance estimator
^
V
(
^
Y
).

Related Topics

CSDESCRIPTIVES Algorithms
Notation (complex samples descriptives algorithms)
Weights (complex samples descriptives algorithms)
Z Expressions (complex samples descriptives algorithms)
Variable Total (complex samples descriptives algorithms)
Variable Total Variance (complex samples descriptives algorithms)
Population Size Estimation (complex samples descriptives algorithms)
Mean Estimation (complex samples descriptives algorithms)
Domain Estimation (complex samples descriptives algorithms)
Standard Errors (complex samples descriptives algorithms)
Coefficient of Variation (complex samples descriptives algorithms)
T Tests (complex samples descriptives algorithms)
Confidence Limits (complex samples descriptives algorithms)
Design Effects (complex samples descriptives algorithms)
References (complex samples descriptives algorithms)


Mean Estimation (complex samples descriptives algorithms)

mean,mean,mean
complex samples descriptives algorithms,complex samples descriptives algorithms,complex samples descriptives algorithms
complex samples descriptives algorithms,complex samples descriptives algorithms,complex samples descriptives algorithms
mean estimation,mean estimation,mean estimation

The mean Y for the variable y is estimated by

^
Y
=
^
Y
/
^
N

where
^
Y
is the estimate for the total of y and
^
N
is the population size estimate.

The variance of the mean is estimated using the ratio formulas, as the mean is a ratio of
^
Y
and
^
N
. Accordingly,
^
V
(
^
Y
) is obtained by substituting zhij with

zhij=whij(yhij−
^
Y
)/
^
N

in the corresponding variance estimator
^
V
(
^
Y
).

Related Topics

CSDESCRIPTIVES Algorithms
Notation (complex samples descriptives algorithms)
Weights (complex samples descriptives algorithms)
Z Expressions (complex samples descriptives algorithms)
Variable Total (complex samples descriptives algorithms)
Variable Total Variance (complex samples descriptives algorithms)
Population Size Estimation (complex samples descriptives algorithms)
Ratio Estimation (complex samples descriptives algorithms)
Domain Estimation (complex samples descriptives algorithms)
Standard Errors (complex samples descriptives algorithms)
Coefficient of Variation (complex samples descriptives algorithms)
T Tests (complex samples descriptives algorithms)
Confidence Limits (complex samples descriptives algorithms)
Design Effects (complex samples descriptives algorithms)
References (complex samples descriptives algorithms)


Domain Estimation (complex samples descriptives algorithms)

domain estimation,domain estimation,domain estimation
complex samples descriptives algorithms,complex samples descriptives algorithms,complex samples descriptives algorithms
complex samples descriptives algorithms,complex samples descriptives algorithms,complex samples descriptives algorithms
domain estimation,domain estimation,domain estimation

Let the population be divided into D domains. For each domain d define the following indicator variables:

δhij(d)={
1 | if the sample unit hij is in the domain d
0 | otherwise

To estimate a domain population total, domain variable total, ratios and means, substitute yi with δi(d)yi in the corresponding formula for the whole population as follows:

• Domain variable total:
^
Y
d=nΣi=1wiδi(d)yi

• Domain population total:
^
N
d=nΣi=1wiδi(d)

• Domain variable ratio:
^
R
d=
^
Y
d/
^
X
d

• Domain variable mean:
^
Y
d=
^
Y
d/
^
N
d

Similarly, in order to estimate the variances of the above estimators, substitute yhij with δhij(d)yhij in the corresponding formula for the whole population. The following substitution of zij in the formulas for
^
V
(
^
Y
) are used for estimating the variance of:

• Domain variable total: zhij(d)=δhij(d)whijyhij

• Domain population total: zhij(d)=δhij(d)whij

• Domain variable ratio: zhij=δhij(d)whij(yhij−
^
R
dxhij)/
^
X
d

• Domain mean: zhij=δhij(d)whij(yhij−
^
Y
d)/
^
N
d

Related Topics

CSDESCRIPTIVES Algorithms
Notation (complex samples descriptives algorithms)
Weights (complex samples descriptives algorithms)
Z Expressions (complex samples descriptives algorithms)
Variable Total (complex samples descriptives algorithms)
Variable Total Variance (complex samples descriptives algorithms)
Population Size Estimation (complex samples descriptives algorithms)
Ratio Estimation (complex samples descriptives algorithms)
Mean Estimation (complex samples descriptives algorithms)
Standard Errors (complex samples descriptives algorithms)
Coefficient of Variation (complex samples descriptives algorithms)
T Tests (complex samples descriptives algorithms)
Confidence Limits (complex samples descriptives algorithms)
Design Effects (complex samples descriptives algorithms)
References (complex samples descriptives algorithms)


Standard Errors (complex samples descriptives algorithms)

complex samples descriptives algorithms,complex samples descriptives algorithms,complex samples descriptives algorithms
standard errors,standard errors,standard errors

Let Z denote any of the population or subpopulation quantities defined above: variable total, population size, ratio or mean. Then the standard error of an estimator
^
Z
is the square root of its estimated variance:

StdError(
^
Z
)=
√
^
V
(
^
Z
)

Related Topics

CSDESCRIPTIVES Algorithms
Notation (complex samples descriptives algorithms)
Weights (complex samples descriptives algorithms)
Z Expressions (complex samples descriptives algorithms)
Variable Total (complex samples descriptives algorithms)
Variable Total Variance (complex samples descriptives algorithms)
Population Size Estimation (complex samples descriptives algorithms)
Ratio Estimation (complex samples descriptives algorithms)
Mean Estimation (complex samples descriptives algorithms)
Domain Estimation (complex samples descriptives algorithms)
Coefficient of Variation (complex samples descriptives algorithms)
T Tests (complex samples descriptives algorithms)
Confidence Limits (complex samples descriptives algorithms)
Design Effects (complex samples descriptives algorithms)
References (complex samples descriptives algorithms)


Coefficient of Variation (complex samples descriptives algorithms)

coefficient of variation,coefficient of variation,coefficient of variation
complex samples descriptives algorithms,complex samples descriptives algorithms,complex samples descriptives algorithms
complex samples descriptives algorithms,complex samples descriptives algorithms,complex samples descriptives algorithms
coefficient of variation,coefficient of variation,coefficient of variation

The coefficient of variation of the estimator
^
Z
is the ratio of its standard error and its value:

CV(
^
Z
)=SE(
^
Z
)
^
Z

The coefficient of variation is undefined when
^
Z
=0.

Related Topics

CSDESCRIPTIVES Algorithms
Notation (complex samples descriptives algorithms)
Weights (complex samples descriptives algorithms)
Z Expressions (complex samples descriptives algorithms)
Variable Total (complex samples descriptives algorithms)
Variable Total Variance (complex samples descriptives algorithms)
Population Size Estimation (complex samples descriptives algorithms)
Ratio Estimation (complex samples descriptives algorithms)
Mean Estimation (complex samples descriptives algorithms)
Domain Estimation (complex samples descriptives algorithms)
Standard Errors (complex samples descriptives algorithms)
T Tests (complex samples descriptives algorithms)
Confidence Limits (complex samples descriptives algorithms)
Design Effects (complex samples descriptives algorithms)
References (complex samples descriptives algorithms)


T Tests (complex samples descriptives algorithms)

complex samples descriptives algorithms,complex samples descriptives algorithms,complex samples descriptives algorithms
t tests,t tests,t tests

Testing the hypothesis that a population quantity Z equals θ0; that is, H0:Z=θ0, is performed using the t test statistic:

t(
^
Z
)=
^
Z
−θ0StdError(
^
Z
)

The p-value for the two-sided test is given by the probability

P(|T|>|t(
^
Z
)|)

where T is a random variable form the t distribution with df degrees of freedom.

The number of the degrees of freedom is calculated as the difference between the number of primary sampling units and the number of strata in the first stage of sampling.

Related Topics

CSDESCRIPTIVES Algorithms
Notation (complex samples descriptives algorithms)
Weights (complex samples descriptives algorithms)
Z Expressions (complex samples descriptives algorithms)
Variable Total (complex samples descriptives algorithms)
Variable Total Variance (complex samples descriptives algorithms)
Population Size Estimation (complex samples descriptives algorithms)
Ratio Estimation (complex samples descriptives algorithms)
Mean Estimation (complex samples descriptives algorithms)
Domain Estimation (complex samples descriptives algorithms)
Standard Errors (complex samples descriptives algorithms)
Coefficient of Variation (complex samples descriptives algorithms)
Confidence Limits (complex samples descriptives algorithms)
Design Effects (complex samples descriptives algorithms)
References (complex samples descriptives algorithms)


Confidence Limits (complex samples descriptives algorithms)

complex samples descriptives algorithms,complex samples descriptives algorithms,complex samples descriptives algorithms
confidence limits,confidence limits,confidence limits

A level 1−α confidence interval is constructed for a given 0≤α≤1. The confidence bounds are defined as

^
Z
±StdError(
^
Z
)tdf(1−α/2)

where StdError(
^
Z
) is the estimated standard error of
^
Z
, and tdf(1−α/2) is the 100(1−α/2) percentile of the t distribution with df degrees of freedom.

Related Topics

CSDESCRIPTIVES Algorithms
Notation (complex samples descriptives algorithms)
Weights (complex samples descriptives algorithms)
Z Expressions (complex samples descriptives algorithms)
Variable Total (complex samples descriptives algorithms)
Variable Total Variance (complex samples descriptives algorithms)
Population Size Estimation (complex samples descriptives algorithms)
Ratio Estimation (complex samples descriptives algorithms)
Mean Estimation (complex samples descriptives algorithms)
Domain Estimation (complex samples descriptives algorithms)
Standard Errors (complex samples descriptives algorithms)
Coefficient of Variation (complex samples descriptives algorithms)
T Tests (complex samples descriptives algorithms)
Design Effects (complex samples descriptives algorithms)
References (complex samples descriptives algorithms)


Design Effects (complex samples descriptives algorithms)

complex samples descriptives algorithms,complex samples descriptives algorithms,complex samples descriptives algorithms
design effects,design effects,design effects
design effect,design effect,design effect
complex samples descriptives algorithms,complex samples descriptives algorithms,complex samples descriptives algorithms

The design effect Deff is estimated by

Deff=
^
V
(
^
Y
)
^
V
srs(
^
Y
srs)

^
V
(
^
Y
) is the estimate of the variance of
^
Y
under the appropriate sampling design, while
^
V
srs(
^
Y
srs) is the estimate of variance of
^
Y
srs under the simple random sampling assumption as follows:

^
V
srs(
^
Y
srs)=(fpc)
^
N
n−1nΣi=1wi(yi−
^
Y
^
N
)2

Assuming sampling without replacement we have fpc=(1−n
^
N
) given that n
^
N
<1, while for sampling with replacement we set fpc=1. This assumption is independent of the sampling specified for the complex sample design based variance
^
V
(
^
Y
).

Whereas design effect is not relevant for estimates of the population size, we do compute the design effects for ratios and means in addition to the totals. The values of variable y in
^
V
srs are then replaced by the linearized values as follows:

• Ratio estimation (yi−
^
R
xi)/
^
X

• Mean estimation (yi−
^
Y
)/
^
N

When estimating design effects for domains we use the familiar substitution δi(d)yi for yi in the
^
V
srs formula in addition to any ratio or mean substitutions.

We also provide the square root of design effect
√ Deff
.

Design effects and their applications have been discussed by Kish (1965) and Kish (1995).

Related Topics

CSDESCRIPTIVES Algorithms
Notation (complex samples descriptives algorithms)
Weights (complex samples descriptives algorithms)
Z Expressions (complex samples descriptives algorithms)
Variable Total (complex samples descriptives algorithms)
Variable Total Variance (complex samples descriptives algorithms)
Population Size Estimation (complex samples descriptives algorithms)
Ratio Estimation (complex samples descriptives algorithms)
Mean Estimation (complex samples descriptives algorithms)
Domain Estimation (complex samples descriptives algorithms)
Standard Errors (complex samples descriptives algorithms)
Coefficient of Variation (complex samples descriptives algorithms)
T Tests (complex samples descriptives algorithms)
Confidence Limits (complex samples descriptives algorithms)
References (complex samples descriptives algorithms)


References (complex samples descriptives algorithms)

complex samples descriptives algorithms,complex samples descriptives algorithms,complex samples descriptives algorithms
references,references,references

Cochran, W. G. 1977. Sampling Techniques, 3rd ed. New York: John Wiley and Sons.

Hansen, M. H., W. N. Hurwitz, and W. G. Madow. 1953. Sample Survey Methods and Theory, Volume II Theory. New York: John Wiley & Sons.

Horwitz, D. G., and D. J. Thompson. 1952. A generalization of sampling without replacement from a finite universe. Journal of the American Statistical Association, 47, 663-685.

Kish, L. 1965. Survey Sampling. New York: John Wiley and Sons.

Kish, L. 1995. Methods for Design Effects. Journal of Official Statistics, 11, 119-127.

Särndal, C., B. Swensson, and J. Wretman. 1992. Model Assisted Survey Sampling. New York: Springer-Verlag.

Sen, A. R. 1953. On the estimate of the variance in sampling with varying probabilities. Journal of the Indian Society of Agricultural Statistics, 5, 55-77.

Wolter, K. M. 1985. Introduction to variance estimation. Berlin: Springer-Verlag.

Woodruff, R. S. 1971. A Simple Method for Approximating the Variance of a Complicated Estimate. Journal of the American Statistical Association, 66, 411-414.

Yates, F., and P. M. Grundy. 1953. Selection without replacement from within strata with probability proportional to size. Journal of the Royal Statistical Society Series B, 15, 253-261.

Related Topics

CSDESCRIPTIVES Algorithms
Notation (complex samples descriptives algorithms)
Weights (complex samples descriptives algorithms)
Z Expressions (complex samples descriptives algorithms)
Variable Total (complex samples descriptives algorithms)
Variable Total Variance (complex samples descriptives algorithms)
Population Size Estimation (complex samples descriptives algorithms)
Ratio Estimation (complex samples descriptives algorithms)
Mean Estimation (complex samples descriptives algorithms)
Domain Estimation (complex samples descriptives algorithms)
Standard Errors (complex samples descriptives algorithms)
Coefficient of Variation (complex samples descriptives algorithms)
T Tests (complex samples descriptives algorithms)
Confidence Limits (complex samples descriptives algorithms)
Design Effects (complex samples descriptives algorithms)


CSGLM Algorithms

CSGLM (command),CSGLM (command),CSGLM (command)
algorithms,algorithms,algorithms
Complex General Linear Model,Complex General Linear Model,Complex General Linear Model
algorithms,algorithms,algorithms
complex samples general linear model algorithms,complex samples general linear model algorithms,complex samples general linear model algorithms

CSGLM is a procedure for regression analysis as well as analysis of variance and covariance based on complex samples.

Complex sample data must contain both the values of the variables to be analyzed and the information on the current sampling design. Sampling design includes the sampling method, strata and clustering information, inclusion probabilities and the overall sampling weights.

Sampling design specification for CSGLM may include up to three stages of sampling. Any of the following general sampling methods may be assumed in the first stage: random sampling with replacement, random sampling without replacement and equal probabilities and random sampling without replacement and unequal probabilities. The first two sampling methods can also be specified for the second and the third sampling stage.

Related Topics

Notation (complex samples general linear model algorithms)
Weights (complex samples general linear model algorithms)
Model Specification (complex samples general linear model algorithms)
Estimation (complex samples general linear model algorithms)
Variance Estimates (complex samples general linear model algorithms)
Subpopulation Estimates (complex samples general linear model algorithms)
Standard Errors (complex samples general linear model algorithms)
Degrees of Freedom (complex samples general linear model algorithms)
Confidence Intervals (complex samples general linear model algorithms)
t Tests (complex samples general linear model algorithms)
Design Effects (complex samples general linear model algorithms)
Multiple R-square (complex samples general linear model algorithms)
Hypothesis Testing (complex samples general linear model algorithms)
Estimated Marginal Means (complex samples general linear model algorithms)
References (complex samples general linear model algorithms)


Notation (complex samples general linear model algorithms)

complex samples general linear model algorithms,complex samples general linear model algorithms,complex samples general linear model algorithms
notation,notation,notation

The following notation is used throughout this chapter unless otherwise stated:

n | Total number of elements in the sample.
p | Number of regression parameters in the model.
Y | Dependent variable vector containing values yi,i=1,...,n.
X | n×p design matrix. The rows correspond to the observations and the columns to the model parameters. The ith row is x´i,i=1,...,n.
W | Diagonal matrix with sampling weights wi,i=1,...,n on the diagonal.
B | Vector of p unknown population parameters.
N | Total number of elements in the population.

Related Topics

CSGLM Algorithms
Weights (complex samples general linear model algorithms)
Model Specification (complex samples general linear model algorithms)
Estimation (complex samples general linear model algorithms)
Variance Estimates (complex samples general linear model algorithms)
Subpopulation Estimates (complex samples general linear model algorithms)
Standard Errors (complex samples general linear model algorithms)
Degrees of Freedom (complex samples general linear model algorithms)
Confidence Intervals (complex samples general linear model algorithms)
t Tests (complex samples general linear model algorithms)
Design Effects (complex samples general linear model algorithms)
Multiple R-square (complex samples general linear model algorithms)
Hypothesis Testing (complex samples general linear model algorithms)
Estimated Marginal Means (complex samples general linear model algorithms)
References (complex samples general linear model algorithms)


Weights (complex samples general linear model algorithms)

Overall weights specified for each ultimate element are processed as given. See Weights (complex samples: covariance matrix of total algorithms) in Complex Samples: Covariance Matrix of Total for more information on weights and variance estimation methods.

Related Topics

CSGLM Algorithms
Notation (complex samples general linear model algorithms)
Model Specification (complex samples general linear model algorithms)
Estimation (complex samples general linear model algorithms)
Variance Estimates (complex samples general linear model algorithms)
Subpopulation Estimates (complex samples general linear model algorithms)
Standard Errors (complex samples general linear model algorithms)
Degrees of Freedom (complex samples general linear model algorithms)
Confidence Intervals (complex samples general linear model algorithms)
t Tests (complex samples general linear model algorithms)
Design Effects (complex samples general linear model algorithms)
Multiple R-square (complex samples general linear model algorithms)
Hypothesis Testing (complex samples general linear model algorithms)
Estimated Marginal Means (complex samples general linear model algorithms)
References (complex samples general linear model algorithms)


Model Specification (complex samples general linear model algorithms)

complex samples general linear model algorithms,complex samples general linear model algorithms,complex samples general linear model algorithms
model,model,model

Let the linear model be specified by the equation Y=Xβ+E, where Y is a vector of observed dependent variable values, X is the linear model design matrix, β is a vector of model parameters and E is a vector of random errors with zero mean. Each column of the design matrix corresponds to a parameter in the model equation. Each parameter corresponds to one of the intercept, factor main effects, factor interaction effects, factor nested effects, covariate effects and factors by covariates interaction effects. For every factor effect level occurring in data there is a separate parameter. This results in an over-parametrized model.

Related Topics

CSGLM Algorithms
Notation (complex samples general linear model algorithms)
Weights (complex samples general linear model algorithms)
Estimation (complex samples general linear model algorithms)
Variance Estimates (complex samples general linear model algorithms)
Subpopulation Estimates (complex samples general linear model algorithms)
Standard Errors (complex samples general linear model algorithms)
Degrees of Freedom (complex samples general linear model algorithms)
Confidence Intervals (complex samples general linear model algorithms)
t Tests (complex samples general linear model algorithms)
Design Effects (complex samples general linear model algorithms)
Multiple R-square (complex samples general linear model algorithms)
Hypothesis Testing (complex samples general linear model algorithms)
Estimated Marginal Means (complex samples general linear model algorithms)
References (complex samples general linear model algorithms)


Estimation (complex samples general linear model algorithms)

complex samples general linear model algorithms,complex samples general linear model algorithms,complex samples general linear model algorithms
estimation,estimation,estimation

Assuming that the entire finite population has been observed, we can obtain the least square parameter estimates for the linear model by solving the following normal equations

X´NXNβ=X´NYN

where XN and YN denote the design matrix and dependent variable for all elements in the given population. A solution vector for this system, estimating the model parameters β, is denoted by B. In our analyses we take the established design-based approach concerned with estimating the finite population parameters B developed by Kish and Frankel (1974), Fuller (1975), Shah, Holt and Folsom (1977) and others. See Särndal et al. (1992) for an overview.

Estimates for the population matrices X´NXN and X´NYN are given by X´WX and X´WY respectively. We solve the following set of weighted normal equations

X´WXB=X´WY

where W is a diagonal matrix with sampling weights wi,i=1...n on the diagonal. A solution for B is then given by the equation

^
B
=(X´WX)−X´WY

where (X´WX)− is a generalized g2 inverse of X´WX.

Related Topics

CSGLM Algorithms
Notation (complex samples general linear model algorithms)
Weights (complex samples general linear model algorithms)
Model Specification (complex samples general linear model algorithms)
Variance Estimates (complex samples general linear model algorithms)
Subpopulation Estimates (complex samples general linear model algorithms)
Standard Errors (complex samples general linear model algorithms)
Degrees of Freedom (complex samples general linear model algorithms)
Confidence Intervals (complex samples general linear model algorithms)
t Tests (complex samples general linear model algorithms)
Design Effects (complex samples general linear model algorithms)
Multiple R-square (complex samples general linear model algorithms)
Hypothesis Testing (complex samples general linear model algorithms)
Estimated Marginal Means (complex samples general linear model algorithms)
References (complex samples general linear model algorithms)
Predicted Values and Residuals (complex samples general linear model algorithms)
Algorithm (complex samples general linear model algorithms)


Predicted Values and Residuals (complex samples general linear model algorithms)

Predicted values for each observation are given by
^
y
i=x´i
^
B
.

The vector of residuals r is defined as ri=yi−
^
y
i,i=1,...n.

The residual sum of squares is: r´Wr=nΣi=1wi(yi−x´i
^
B
)2

Related Topics

Estimation (complex samples general linear model algorithms)
Algorithm (complex samples general linear model algorithms)


Algorithm (complex samples general linear model algorithms)

Estimation begins with construction of the weighted sum-of-squares and crossed products (SSCP) matrix. Let z´i=(x´i,yi) be the ith row of the matrix Z. Then the SSCP matrix is computed by

Z´WZ=nΣi=1wiziz´i

where ziz´i is the outer product for the vector zi. This matrix can be partitioned as follows

Z´WZ=(
X´WX | X´WY
Y´WX | Y´WY
)

After applying the sweep operator to the first p rows and columns of the matrix above, we obtain the following solution matrix

(
−(X´WX)−
^
B
^
B
´ 		r´Wr
)

(X´WX)− is a generalized g2 inverse of X´WX,
^
B
is a parameter solution, and r´Wr is the residual sum of squares.

When a column of X´WX is found to be dependent on previous columns, the corresponding parameter is treated as redundant. The solution for redundant parameters is set to 0 as well as the corresponding rows and columns in (X´WX)−.

Related Topics

Estimation (complex samples general linear model algorithms)
Predicted Values and Residuals (complex samples general linear model algorithms)


Variance Estimates (complex samples general linear model algorithms)

complex samples general linear model algorithms,complex samples general linear model algorithms,complex samples general linear model algorithms
variance estimates,variance estimates,variance estimates

Variances of parameter estimates are computed according to the Taylor linearization method as presented by Binder (1983).

Define the vector di=xi(yi−x´i
^
B
) for i=1,...,n and its total population estimate by

^
d
T=nΣi=1wixi(yi−x´i
^
B
)

Let
^
V
(
^
d
T) be its sample design-based covariance matrix. See Complex Samples: Covariance Matrix of Total for more information on its computation. Then the covariance matrix of
^
B
is estimated by

^
V
(
^
B
)=(X´WX)−
^
V
(
^
d
T)(X´WX)−

Note: If any diagonal element of
^
V
(
^
d
T) happens to be non-positive due to the use of the Yates-Grundy-Sen estimator, all elements in the corresponding row and column are set to zero.

Related Topics

CSGLM Algorithms
Notation (complex samples general linear model algorithms)
Weights (complex samples general linear model algorithms)
Model Specification (complex samples general linear model algorithms)
Estimation (complex samples general linear model algorithms)
Subpopulation Estimates (complex samples general linear model algorithms)
Standard Errors (complex samples general linear model algorithms)
Degrees of Freedom (complex samples general linear model algorithms)
Confidence Intervals (complex samples general linear model algorithms)
t Tests (complex samples general linear model algorithms)
Design Effects (complex samples general linear model algorithms)
Multiple R-square (complex samples general linear model algorithms)
Hypothesis Testing (complex samples general linear model algorithms)
Estimated Marginal Means (complex samples general linear model algorithms)
References (complex samples general linear model algorithms)


Subpopulation Estimates (complex samples general linear model algorithms)

When analyses are requested for a given subpopulation S, we redefine (x´i,yi)´ as follows:

(x´i,yi)={
(x´i,yi) | if the i th element is in S
(0,...,0) | otherwise

When computing point estimates, this substitution is equivalent to including only the subpopulation elements in the calculations. This is in contrast to computing the variance estimates where all elements in the sample need to be included.

Related Topics

CSGLM Algorithms
Notation (complex samples general linear model algorithms)
Weights (complex samples general linear model algorithms)
Model Specification (complex samples general linear model algorithms)
Estimation (complex samples general linear model algorithms)
Variance Estimates (complex samples general linear model algorithms)
Standard Errors (complex samples general linear model algorithms)
Degrees of Freedom (complex samples general linear model algorithms)
Confidence Intervals (complex samples general linear model algorithms)
t Tests (complex samples general linear model algorithms)
Design Effects (complex samples general linear model algorithms)
Multiple R-square (complex samples general linear model algorithms)
Hypothesis Testing (complex samples general linear model algorithms)
Estimated Marginal Means (complex samples general linear model algorithms)
References (complex samples general linear model algorithms)


Standard Errors (complex samples general linear model algorithms)

complex samples general linear model algorithms,complex samples general linear model algorithms,complex samples general linear model algorithms
standard errors,standard errors,standard errors

Let
^
B
i denote a non-redundant parameter estimate. Its standard error is the square root of its estimated variance:

SE(
^
B
i)=
√
^
V
(
^
B
i)

Standard error is undefined for redundant parameters.

Related Topics

CSGLM Algorithms
Notation (complex samples general linear model algorithms)
Weights (complex samples general linear model algorithms)
Model Specification (complex samples general linear model algorithms)
Estimation (complex samples general linear model algorithms)
Variance Estimates (complex samples general linear model algorithms)
Subpopulation Estimates (complex samples general linear model algorithms)
Degrees of Freedom (complex samples general linear model algorithms)
Confidence Intervals (complex samples general linear model algorithms)
t Tests (complex samples general linear model algorithms)
Design Effects (complex samples general linear model algorithms)
Multiple R-square (complex samples general linear model algorithms)
Hypothesis Testing (complex samples general linear model algorithms)
Estimated Marginal Means (complex samples general linear model algorithms)
References (complex samples general linear model algorithms)


Degrees of Freedom (complex samples general linear model algorithms)

The sample design degrees of freedom ν is used for computing confidence intervals and test statistics below and is calculated as the difference between the number of primary sampling units and the number of strata in the first stage of sampling. Alternatively, ν may be specified by the user.

Related Topics

CSGLM Algorithms
Notation (complex samples general linear model algorithms)
Weights (complex samples general linear model algorithms)
Model Specification (complex samples general linear model algorithms)
Estimation (complex samples general linear model algorithms)
Variance Estimates (complex samples general linear model algorithms)
Subpopulation Estimates (complex samples general linear model algorithms)
Standard Errors (complex samples general linear model algorithms)
Confidence Intervals (complex samples general linear model algorithms)
t Tests (complex samples general linear model algorithms)
Design Effects (complex samples general linear model algorithms)
Multiple R-square (complex samples general linear model algorithms)
Hypothesis Testing (complex samples general linear model algorithms)
Estimated Marginal Means (complex samples general linear model algorithms)
References (complex samples general linear model algorithms)


Confidence Intervals (complex samples general linear model algorithms)

A level 1−α confidence interval is constructed for a given 0≤α≤1 for each non-redundant model parameter. Confidence bounds are given by

^
B
i±SE(
^
B
i)tν(1−α/2)

where tν(1−α/2) is the 100(1−α/2) percentile of the t distribution with ν degrees of freedom.

Related Topics

CSGLM Algorithms
Notation (complex samples general linear model algorithms)
Weights (complex samples general linear model algorithms)
Model Specification (complex samples general linear model algorithms)
Estimation (complex samples general linear model algorithms)
Variance Estimates (complex samples general linear model algorithms)
Subpopulation Estimates (complex samples general linear model algorithms)
Standard Errors (complex samples general linear model algorithms)
Degrees of Freedom (complex samples general linear model algorithms)
t Tests (complex samples general linear model algorithms)
Design Effects (complex samples general linear model algorithms)
Multiple R-square (complex samples general linear model algorithms)
Hypothesis Testing (complex samples general linear model algorithms)
Estimated Marginal Means (complex samples general linear model algorithms)
References (complex samples general linear model algorithms)


t Tests (complex samples general linear model algorithms)

complex samples general linear model algorithms,complex samples general linear model algorithms,complex samples general linear model algorithms
t tests,t tests,t tests

The hypothesis test H0i:
^
B
i=0 is performed for each non-redundant model parameter using the t test statistic:

t(
^
B
i)=
^
B
iSE(
^
B
i)

The p-value for the two-sided test is given by the probability P(|T|>|t(
^
B
i)|), where T is a random variable from the t distribution with ν degrees of freedom.

Related Topics

CSGLM Algorithms
Notation (complex samples general linear model algorithms)
Weights (complex samples general linear model algorithms)
Model Specification (complex samples general linear model algorithms)
Estimation (complex samples general linear model algorithms)
Variance Estimates (complex samples general linear model algorithms)
Subpopulation Estimates (complex samples general linear model algorithms)
Standard Errors (complex samples general linear model algorithms)
Degrees of Freedom (complex samples general linear model algorithms)
Confidence Intervals (complex samples general linear model algorithms)
Design Effects (complex samples general linear model algorithms)
Multiple R-square (complex samples general linear model algorithms)
Hypothesis Testing (complex samples general linear model algorithms)
Estimated Marginal Means (complex samples general linear model algorithms)
References (complex samples general linear model algorithms)


Design Effects (complex samples general linear model algorithms)

complex samples general linear model algorithms,complex samples general linear model algorithms,complex samples general linear model algorithms
design effects,design effects,design effects

The design effect for each non-redundant parameter estimate is given by

Deff(
^
B
i)=
^
V
(
^
B
i)
^
V
srs(
^
B
i)

^
V
(
^
B
i) is the estimate of variance of
^
B
i under the complex sampling design, while
^
V
srs(
^
B
i) is the estimate of variance of
^
B
i under the simple random sampling assumption. The latter is computed as the ith diagonal element of the following matrix:

^
V
srs(
^
B
i)=[(X´WX)−
^
V
srs(
^
d
T)(X´WX)−]ii

where

^
V
srs(
^
d
T)=(fpc)
^
N
n−1nΣi=1widid´i

with di as specified earlier.

Assuming sampling without replacement we have fpc=(1−n
^
N
) given that n
^
N
<1, while for sampling with replacement we set fpc=1. This assumption is independent of the sampling specified for the complex sample design based variance
^
V
(
^
d
T).

For subpopulation analysis di=0 whenever observation i does not belong to a given subpopulation.

We also provide the square root of design effect
√ Deff
.

Design effects and their application have been discussed by Kish (1965) and Kish (1995).

Related Topics

CSGLM Algorithms
Notation (complex samples general linear model algorithms)
Weights (complex samples general linear model algorithms)
Model Specification (complex samples general linear model algorithms)
Estimation (complex samples general linear model algorithms)
Variance Estimates (complex samples general linear model algorithms)
Subpopulation Estimates (complex samples general linear model algorithms)
Standard Errors (complex samples general linear model algorithms)
Degrees of Freedom (complex samples general linear model algorithms)
Confidence Intervals (complex samples general linear model algorithms)
t Tests (complex samples general linear model algorithms)
Multiple R-square (complex samples general linear model algorithms)
Hypothesis Testing (complex samples general linear model algorithms)
Estimated Marginal Means (complex samples general linear model algorithms)
References (complex samples general linear model algorithms)


Multiple R-square (complex samples general linear model algorithms)

R2=1−r´Wr(Y−
^
Y
S1)´W(Y−
^
Y
S1)

where
^
Y
S=
^
Y
S/
^
N
S is the estimated subpopulation mean for variable Y.

If the specified model contains no intercept the following expression is used:

R2=1−r´WrY´WY

Related Topics

CSGLM Algorithms
Notation (complex samples general linear model algorithms)
Weights (complex samples general linear model algorithms)
Model Specification (complex samples general linear model algorithms)
Estimation (complex samples general linear model algorithms)
Variance Estimates (complex samples general linear model algorithms)
Subpopulation Estimates (complex samples general linear model algorithms)
Standard Errors (complex samples general linear model algorithms)
Degrees of Freedom (complex samples general linear model algorithms)
Confidence Intervals (complex samples general linear model algorithms)
t Tests (complex samples general linear model algorithms)
Design Effects (complex samples general linear model algorithms)
Hypothesis Testing (complex samples general linear model algorithms)
Estimated Marginal Means (complex samples general linear model algorithms)
References (complex samples general linear model algorithms)


Hypothesis Testing (complex samples general linear model algorithms)

complex samples general linear model algorithms,complex samples general linear model algorithms,complex samples general linear model algorithms
hypothesis testing,hypothesis testing,hypothesis testing

Given an r×pL matrix and r×1 K vector, CSGLM tests the linear hypothesis H0:LB=K if LB is estimable. The Wald X2 statistic is given by

X2=(L
^
B
−K)´(L
^
V
(
^
B
)L´)−(L
^
B
−K)

The statistic has an asymptotic chi-square distribution with rI=rank(L
^
V
(
^
B
)L´) degrees of freedom. If rI<r, (L
^
V
(
^
B
)L´)− is a generalized inverse such that Wald tests are effective for a restricted set of hypothesis LIB=KI containing a particular subset I of independent rows from H0.

Each row l´i of L is also tested separately. The estimate for the ith row is given by l´i
^
B
and its standard error by
√ l´i
^
V
(
^
B
)li
.

See Complex Samples: Model Testing for additional tests and p-value adjustments.

Related Topics

CSGLM Algorithms
Notation (complex samples general linear model algorithms)
Weights (complex samples general linear model algorithms)
Model Specification (complex samples general linear model algorithms)
Estimation (complex samples general linear model algorithms)
Variance Estimates (complex samples general linear model algorithms)
Subpopulation Estimates (complex samples general linear model algorithms)
Standard Errors (complex samples general linear model algorithms)
Degrees of Freedom (complex samples general linear model algorithms)
Confidence Intervals (complex samples general linear model algorithms)
t Tests (complex samples general linear model algorithms)
Design Effects (complex samples general linear model algorithms)
Multiple R-square (complex samples general linear model algorithms)
Estimated Marginal Means (complex samples general linear model algorithms)
References (complex samples general linear model algorithms)
Custom Tests (complex samples general linear model algorithms)
Default Tests of Model Effects (complex samples general linear model algorithms)


Custom Tests (complex samples general linear model algorithms)

Custom hypothesis tests are conducted only when L is such that LB is estimable. This condition is verified using the following equality:

L=L(X´WX)−(X´WX)

Related Topics

Hypothesis Testing (complex samples general linear model algorithms)
Default Tests of Model Effects (complex samples general linear model algorithms)


Default Tests of Model Effects (complex samples general linear model algorithms)

For each effect specified in the model, a Type III test L matrix is constructed such that LB is estimable. It involves parameters only for the given effect and the containing effects and it does not depend on the order of effects specified in the model. If such a matrix cannot be constructed, the effect is not testable. K is always set to 0 when computing the test statistics for model effects.

The hypothesis for the corrected model is that all the parameters except for the intercept are zero.

Related Topics

Hypothesis Testing (complex samples general linear model algorithms)
Custom Tests (complex samples general linear model algorithms)


Estimated Marginal Means (complex samples general linear model algorithms)

complex samples general linear model algorithms,complex samples general linear model algorithms,complex samples general linear model algorithms
estimated marginal means,estimated marginal means,estimated marginal means

Estimated marginal means (EMMEANS) are based on the estimated cell means. For a given fixed set of factors, or their interactions, we estimate marginal means as the mean value averaged over all cells generated by the rest of the factors in the model. Covariates may be fixed at any specified value. If not specified, the value for each covariate is set to its overall mean estimate.

When missing cells are present in the data, EMMEANS may not be estimable. In such circumstance, we provide a modified estimate proposed by Searle, Speed and Milliken (1980) that ignores the non-estimable cells.

Each marginal estimate is finally constructed in the form l´
^
B
such that l´
^
B
is estimable.

Related Topics

CSGLM Algorithms
Notation (complex samples general linear model algorithms)
Weights (complex samples general linear model algorithms)
Model Specification (complex samples general linear model algorithms)
Estimation (complex samples general linear model algorithms)
Variance Estimates (complex samples general linear model algorithms)
Subpopulation Estimates (complex samples general linear model algorithms)
Standard Errors (complex samples general linear model algorithms)
Degrees of Freedom (complex samples general linear model algorithms)
Confidence Intervals (complex samples general linear model algorithms)
t Tests (complex samples general linear model algorithms)
Design Effects (complex samples general linear model algorithms)
Multiple R-square (complex samples general linear model algorithms)
Hypothesis Testing (complex samples general linear model algorithms)
References (complex samples general linear model algorithms)
Comparing EMMEANS (complex samples general linear model algorithms)


Comparing EMMEANS (complex samples general linear model algorithms)

For a given factor in the model, a vector of EMMEANS is created for all levels of the factor. This vector can be expressed in the form
^
μ
=L
^
B
where each row of L is generated as described above. The variance is then computed by the following formula:

^
V
(
^
μ
)=L
^
V
(
^
B
)L´

A set of contrasts for the factor is created according to the selected contrast type. Let this set of contrasts define the matrix C used for testing the hypothesis H0:Cμ=0.

The Wald X2 statistic is used for testing given set of contrasts for the factor as follows:

X2=(C
^
μ
)´(C
^
V
(
^
μ
)C´)−(C
^
μ
)

The statistic has an asymptotic chi-square distribution with rI degrees of freedom, where rI=rank(C
^
V
(
^
μ
)C´).

Each row c´i of C is also tested separately. The estimate for the ith row is given by c´i
^
μ
and its standard error by
√ c´i
^
V
(
^
μ
)ci
.

See Complex Samples: Model Testing for additional tests and p-value adjustments. Substitute the following formula for the simple random sampling covariance:
^
V
srs(
^
μ
)=L
^
V
srs(
^
B
)L´.

Related Topics

Estimated Marginal Means (complex samples general linear model algorithms)


References (complex samples general linear model algorithms)

complex samples general linear model algorithms,complex samples general linear model algorithms,complex samples general linear model algorithms
references,references,references

Binder, D. A. 1983. On the variances of asymptotically normal estimators from complex surveys. International Statistical Review, 51, 279-292.

Fuller, W. A. 1975. Regression analysis for sample survey. Sankhya, Series C, 37, 117-132.

Kish, L. 1965. Survey Sampling. New York: John Wiley and Sons.

Kish, L. 1995. Methods for Design Effects. Journal of Official Statistics, 11, 119-127.

Kish, L., and M. R. Frankel. 1974. Inference from complex samples. Journal of the Royal Statistical Society B, 36, 1-37.

Särndal, C., B. Swensson, and J. Wretman. 1992. Model Assisted Survey Sampling. New York: Springer-Verlag.

Searle, S. R., F. M. Speed, and G. A. Milliken. 1980. Population marginal means in the linear model: an alternative to least squares means. The American Statistician, 34, 216-221.

Shah, B. V., M. M. Holt, and R. E. Folsom. 1977. Inference about regression models from sample survey data. Bulletin of the International Statistical Institute, 67:3, 43-57.

Related Topics

CSGLM Algorithms
Notation (complex samples general linear model algorithms)
Weights (complex samples general linear model algorithms)
Model Specification (complex samples general linear model algorithms)
Estimation (complex samples general linear model algorithms)
Variance Estimates (complex samples general linear model algorithms)
Subpopulation Estimates (complex samples general linear model algorithms)
Standard Errors (complex samples general linear model algorithms)
Degrees of Freedom (complex samples general linear model algorithms)
Confidence Intervals (complex samples general linear model algorithms)
t Tests (complex samples general linear model algorithms)
Design Effects (complex samples general linear model algorithms)
Multiple R-square (complex samples general linear model algorithms)
Hypothesis Testing (complex samples general linear model algorithms)
Estimated Marginal Means (complex samples general linear model algorithms)


CSLOGISTIC Algorithms

CSLOGISTIC (command),CSLOGISTIC (command),CSLOGISTIC (command)
algorithms,algorithms,algorithms
Complex Samples Logistic Regression,Complex Samples Logistic Regression,Complex Samples Logistic Regression
algorithms,algorithms,algorithms
complex samples logistic regression algorithms,complex samples logistic regression algorithms,complex samples logistic regression algorithms

Logistic regression is a commonly used analytical tool for categorical responses. LOGISTIC REGRESSION (for binary response) and NOMREG (for multi-category response) are procedures under the standard sampling setting. This document considers multinomial logistic regression model under the complex sampling setting extending the model in NOMREG to complex sampling.

There are different approaches for analytic inference in complex sampling (Chambers and Skinner 2003). We will take the two-phase sampling and pseudo-likelihood estimation approaches.

Related Topics

Notation (complex samples logistic regression algorithms)
Superpopulation Model (complex samples logistic regression algorithms)
Parameter Estimation (complex samples logistic regression algorithms)
Parameter Covariance Matrix (complex samples logistic regression algorithms)
Confidence Intervals (complex samples logistic regression algorithms)
Design Effect (complex samples logistic regression algorithms)
Pseudo -2 Log-Likelihood (complex samples logistic regression algorithms)
Pseudo R Squares (complex samples logistic regression algorithms)
Hypothesis Tests (complex samples logistic regression algorithms)
Predicted Values (complex samples logistic regression algorithms)
Classification Table (complex samples logistic regression algorithms)
Odds Ratio (complex samples logistic regression algorithms)
exp(B) (complex samples logistic regression algorithms)
Subpopulation Estimates (complex samples logistic regression algorithms)
Missing Values (complex samples logistic regression algorithms)
References (complex samples logistic regression algorithms)


Notation (complex samples logistic regression algorithms)

complex samples logistic regression algorithms,complex samples logistic regression algorithms,complex samples logistic regression algorithms
notation,notation,notation

The following notation is used throughout this chapter unless otherwise stated:

Y

Categorical dependent variable vector containing values yi, i=1,...,n.

K

The total number of categories for dependent variable.

yi(k)

Indicator variable for category k; yi(k)={
1 | if yi=k
0 | otherwise
.

X

n×p design matrix. The rows correspond to the observations and the columns to the model parameters.

πi

Inclusion probability for case i.

wi

Sampling weight for case i, wi=1/πi.

px(k)

The probability for response category k at x: px(k)=Pr(y=k|x), and denote pi(k)=pxi(k) for case i.

N

The number of cases in the whole population.

n

The number of cases in the sample.

B

The parameter of interest, the population or census parameter.

Related Topics

CSLOGISTIC Algorithms
Superpopulation Model (complex samples logistic regression algorithms)
Parameter Estimation (complex samples logistic regression algorithms)
Parameter Covariance Matrix (complex samples logistic regression algorithms)
Confidence Intervals (complex samples logistic regression algorithms)
Design Effect (complex samples logistic regression algorithms)
Pseudo -2 Log-Likelihood (complex samples logistic regression algorithms)
Pseudo R Squares (complex samples logistic regression algorithms)
Hypothesis Tests (complex samples logistic regression algorithms)
Predicted Values (complex samples logistic regression algorithms)
Classification Table (complex samples logistic regression algorithms)
Odds Ratio (complex samples logistic regression algorithms)
exp(B) (complex samples logistic regression algorithms)
Subpopulation Estimates (complex samples logistic regression algorithms)
Missing Values (complex samples logistic regression algorithms)
References (complex samples logistic regression algorithms)


Superpopulation Model (complex samples logistic regression algorithms)

complex samples logistic regression algorithms,complex samples logistic regression algorithms,complex samples logistic regression algorithms
model,model,model

Two phases of sampling are assumed. The first phase generates a finite population by a model or super population. The second phase selects a sample according to a sampling plan from the finite population generated in the first phase.

Related Topics

CSLOGISTIC Algorithms
Notation (complex samples logistic regression algorithms)
Parameter Estimation (complex samples logistic regression algorithms)
Parameter Covariance Matrix (complex samples logistic regression algorithms)
Confidence Intervals (complex samples logistic regression algorithms)
Design Effect (complex samples logistic regression algorithms)
Pseudo -2 Log-Likelihood (complex samples logistic regression algorithms)
Pseudo R Squares (complex samples logistic regression algorithms)
Hypothesis Tests (complex samples logistic regression algorithms)
Predicted Values (complex samples logistic regression algorithms)
Classification Table (complex samples logistic regression algorithms)
Odds Ratio (complex samples logistic regression algorithms)
exp(B) (complex samples logistic regression algorithms)
Subpopulation Estimates (complex samples logistic regression algorithms)
Missing Values (complex samples logistic regression algorithms)
References (complex samples logistic regression algorithms)
Model Generating the Population (complex samples logistic regression algorithms)


Model Generating the Population (complex samples logistic regression algorithms)

Assume that the response variable y at a given x follows a multinomial distribution with probability px(k) for y=k. Without loss of generality, let the last category K be the reference category. Then for k = 1, …, K−1,

logpx(k)px(K)=x´βk

or

px(k)={
exp(x´βk)1+K−1Σk=1exp(x´βk) | k=1,...,K−1
11+K−1Σk=1exp(x´βk) | k=K

where βk=(βk1,...,βkp)´ is the regression parameter vector for response category k.

There are p(K−1) regression parameters in total. This model is described in many books, for example Agresti (2002).

Let B denote the MLE of the model parameter β based on the whole population. This B is also called the census parameter. The parameter of interest is the census parameter B, rather than the model parameter β. The exact definition and formulation of B is described below in the estimating equation.

Related Topics

Superpopulation Model (complex samples logistic regression algorithms)


Parameter Estimation (complex samples logistic regression algorithms)

complex samples logistic regression algorithms,complex samples logistic regression algorithms,complex samples logistic regression algorithms
estimation,estimation,estimation

For a sample drawn from the finite population according to a sample plan, we take the pseudo-likelihood approach. In this approach, the pseudo-likelihood is a sample estimate of the population log-likelihood, and parameter estimates are derived by maximizing the pseudo-likelihood.

From the sample, an unbiased estimate of population log-likelihood lU is

lS(β)=ΣiSKΣk=1wiyi(k)log(pi(k))

We will maximize lS(β) to get the estimates for census parameter B. The pseudo-score function is, for k = 1, …, K−1,

SS(β)=ΣiSwi(y*i−p*i)xi

The estimator obtained by solving SS(β)=0 is an estimator of B.

Related Topics

CSLOGISTIC Algorithms
Notation (complex samples logistic regression algorithms)
Superpopulation Model (complex samples logistic regression algorithms)
Parameter Covariance Matrix (complex samples logistic regression algorithms)
Confidence Intervals (complex samples logistic regression algorithms)
Design Effect (complex samples logistic regression algorithms)
Pseudo -2 Log-Likelihood (complex samples logistic regression algorithms)
Pseudo R Squares (complex samples logistic regression algorithms)
Hypothesis Tests (complex samples logistic regression algorithms)
Predicted Values (complex samples logistic regression algorithms)
Classification Table (complex samples logistic regression algorithms)
Odds Ratio (complex samples logistic regression algorithms)
exp(B) (complex samples logistic regression algorithms)
Subpopulation Estimates (complex samples logistic regression algorithms)
Missing Values (complex samples logistic regression algorithms)
References (complex samples logistic regression algorithms)
Redundant Parameters (complex samples logistic regression algorithms)
Estimation Algorithm (complex samples logistic regression algorithms)
Initial Values (complex samples logistic regression algorithms)
Stopping Criteria (complex samples logistic regression algorithms)


Redundant Parameters (complex samples logistic regression algorithms)

In this procedure, the over-parameterization approach is similar to that in the NOMREG procedure. If a parameter is found to be redundant, it is set to zero and will not affect the estimation procedure.

Related Topics

Parameter Estimation (complex samples logistic regression algorithms)
Estimation Algorithm (complex samples logistic regression algorithms)
Initial Values (complex samples logistic regression algorithms)
Stopping Criteria (complex samples logistic regression algorithms)


Estimation Algorithm (complex samples logistic regression algorithms)

The Newton-Raphson iterative estimation method is used to solve the estimating equation. Let B(v) be the parameter estimate at iteration step v, the parameter estimate B(v+1) at iteration step v + 1 is updated as

B(v+1)=B(v)−ξ·J−(B(v))SS(B(v))

where

J(β)=∂SS(β)∂β=−
Σ
iS
wi(diag(p*i)−p*i(p*i)´)xix´i

the (k, j)th block element of J(β), for k, j = 1, …, K−1, is

Jkj(β)=∂SS(βk)∂βj={
ΣiSwipi(k)pi(j)xix´i | k≠j
−ΣiSwipi(j)(1−pi(j))xix´i | k=j

J−(β) is a generalized inverse of J(β). The stepping scalar ζ > 0 is used to make lS(B(v+1))≥lS(B(v)). Use the step-halving method if lS(B(v+1))<lS(B(v)). Let t be the maximum number of steps in step-halving; the set of values of ζ is {1/2r: r = 0, …, t−1}.

Starting with initial values B(0), iteratively update B(v+1) until one of the stopping criteria is satisfied. The final estimate is denoted as
^
B
.

Note: Sometimes, infinite parameters may be present in the model because of complete or quasi-complete separation of the data (Albert and Anderson, 1984) (Santner and Duffy, 1986). In CSLOGISTIC, a check for separation of the data can be performed. If either complete or quasi-complete separation is suggested by the test, a warning is issued and results based on the last iteration are given.

Related Topics

Parameter Estimation (complex samples logistic regression algorithms)
Redundant Parameters (complex samples logistic regression algorithms)
Initial Values (complex samples logistic regression algorithms)
Stopping Criteria (complex samples logistic regression algorithms)


Initial Values (complex samples logistic regression algorithms)

For all non-intercept regression parameters, set their initial values to be zero. For intercepts, if there are any, set for k = 1, …, K−1,

B(0)k1=log﻿(
^
N
k
^
N
K)

where
^
N
k=ΣiSwiyi(k) is the estimated population number of responses in category k.

Related Topics

Parameter Estimation (complex samples logistic regression algorithms)
Redundant Parameters (complex samples logistic regression algorithms)
Estimation Algorithm (complex samples logistic regression algorithms)
Stopping Criteria (complex samples logistic regression algorithms)


Stopping Criteria (complex samples logistic regression algorithms)

Given two convergence criteria εl > 0 and εp > 0, the iteration is considered to be converged if one of the following criteria is satisfied:

1. {
|lS(B(v+1))−lS(B(v))||lS(B(v))|+10−6<εl | if relative change
|lS(B(v+1))−lS(B(v))|<εl | if absolute change

2. {
max
k,j
(|B(v+1)kj−B(v)kj||B(v)kj|+10−6)<εp 		if relative change
max
k,j
(|B(v+1)kj−B(v)kj|)<εp 		if absolute change

3. The maximum number of iterations is reached.

Related Topics

Parameter Estimation (complex samples logistic regression algorithms)
Redundant Parameters (complex samples logistic regression algorithms)
Estimation Algorithm (complex samples logistic regression algorithms)
Initial Values (complex samples logistic regression algorithms)


Parameter Covariance Matrix (complex samples logistic regression algorithms)

The design-based variance of
^
B
(Binder 1983) has estimate

^
V
(
^
B
)≈J−(
^
B
)
^
I
(
^
B
)J−(
^
B
)

where
^
I
(β) is the estimate of design based variance of SS(β). Let di=(y*i−p*i)xi, then SS(β)=ΣiSwi(y*i−p*i)xi=ΣiSwidi is an estimate for population total of di vectors. See Complex Samples: Covariance Matrix of Total for how to calculate the design-based variance matrix for the total.

Related Topics

CSLOGISTIC Algorithms
Notation (complex samples logistic regression algorithms)
Superpopulation Model (complex samples logistic regression algorithms)
Parameter Estimation (complex samples logistic regression algorithms)
Confidence Intervals (complex samples logistic regression algorithms)
Design Effect (complex samples logistic regression algorithms)
Pseudo -2 Log-Likelihood (complex samples logistic regression algorithms)
Pseudo R Squares (complex samples logistic regression algorithms)
Hypothesis Tests (complex samples logistic regression algorithms)
Predicted Values (complex samples logistic regression algorithms)
Classification Table (complex samples logistic regression algorithms)
Odds Ratio (complex samples logistic regression algorithms)
exp(B) (complex samples logistic regression algorithms)
Subpopulation Estimates (complex samples logistic regression algorithms)
Missing Values (complex samples logistic regression algorithms)
References (complex samples logistic regression algorithms)


Confidence Intervals (complex samples logistic regression algorithms)

The confidence interval for a single regression parameter Bkj is approximately

[
^
B
kj−tdf,1−α2se(
^
B
kj),
^
B
kj+tdf,1−α2se(
^
B
kj)]

where se(
^
B
kj)=
^
V
(
^
B
kj) is the estimated standard error of
^
B
kj, and tdf,1−α2 is the 100(1−α/2) percentile of a t distribution with df degrees of freedom. The degrees of freedom df can be user specified, and defaults to the difference between the number of primary sampling units and the number of strata in the first stage of sampling.

Related Topics

CSLOGISTIC Algorithms
Notation (complex samples logistic regression algorithms)
Superpopulation Model (complex samples logistic regression algorithms)
Parameter Estimation (complex samples logistic regression algorithms)
Parameter Covariance Matrix (complex samples logistic regression algorithms)
Design Effect (complex samples logistic regression algorithms)
Pseudo -2 Log-Likelihood (complex samples logistic regression algorithms)
Pseudo R Squares (complex samples logistic regression algorithms)
Hypothesis Tests (complex samples logistic regression algorithms)
Predicted Values (complex samples logistic regression algorithms)
Classification Table (complex samples logistic regression algorithms)
Odds Ratio (complex samples logistic regression algorithms)
exp(B) (complex samples logistic regression algorithms)
Subpopulation Estimates (complex samples logistic regression algorithms)
Missing Values (complex samples logistic regression algorithms)
References (complex samples logistic regression algorithms)


Design Effect (complex samples logistic regression algorithms)

complex samples logistic regression algorithms,complex samples logistic regression algorithms,complex samples logistic regression algorithms
design effects,design effects,design effects

For each parameter Bkj, its design effect is the ratio of its variance under the design to its variance under the SRS design,

Deff(
^
B
kj)=
^
V
(
^
B
kj)
^
V
srs(
^
B
kj)

For SRS design, the variance matrix is

VSRS(
^
B
)≈J−(
^
B
)ISRS(
^
B
)J−(
^
B
)

where

^
I
srs(
^
B
)=
^
V
srs(SS(
^
B
))=(fpc)
^
N
n−1ΣiSwidid´i

^
N
=
Σ
iS
wi

Assuming sampling without replacement we have fpc=(1−n
^
N
) given that n
^
N
<1, while for sampling with replacement we set fpc=1. This assumption is independent of the sampling specified for the complex sample design based variance matrix
^
I
(β).

Related Topics

CSLOGISTIC Algorithms
Notation (complex samples logistic regression algorithms)
Superpopulation Model (complex samples logistic regression algorithms)
Parameter Estimation (complex samples logistic regression algorithms)
Parameter Covariance Matrix (complex samples logistic regression algorithms)
Confidence Intervals (complex samples logistic regression algorithms)
Pseudo -2 Log-Likelihood (complex samples logistic regression algorithms)
Pseudo R Squares (complex samples logistic regression algorithms)
Hypothesis Tests (complex samples logistic regression algorithms)
Predicted Values (complex samples logistic regression algorithms)
Classification Table (complex samples logistic regression algorithms)
Odds Ratio (complex samples logistic regression algorithms)
exp(B) (complex samples logistic regression algorithms)
Subpopulation Estimates (complex samples logistic regression algorithms)
Missing Values (complex samples logistic regression algorithms)
References (complex samples logistic regression algorithms)


Pseudo -2 Log-Likelihood (complex samples logistic regression algorithms)

For the model under consideration, the pseudo –2 Log Likelihood is

−2lS(
^
B
)

Let the initial model be the intercept-only model if the intercept is in the considered model, or the empty model otherwise. For the initial model, the pseudo –2 Log Likelihood is

−2lS(B(0))

where B(0) is the initial parameter vector used in the iterative estimating procedure.

Related Topics

CSLOGISTIC Algorithms
Notation (complex samples logistic regression algorithms)
Superpopulation Model (complex samples logistic regression algorithms)
Parameter Estimation (complex samples logistic regression algorithms)
Parameter Covariance Matrix (complex samples logistic regression algorithms)
Confidence Intervals (complex samples logistic regression algorithms)
Design Effect (complex samples logistic regression algorithms)
Pseudo R Squares (complex samples logistic regression algorithms)
Hypothesis Tests (complex samples logistic regression algorithms)
Predicted Values (complex samples logistic regression algorithms)
Classification Table (complex samples logistic regression algorithms)
Odds Ratio (complex samples logistic regression algorithms)
exp(B) (complex samples logistic regression algorithms)
Subpopulation Estimates (complex samples logistic regression algorithms)
Missing Values (complex samples logistic regression algorithms)
References (complex samples logistic regression algorithms)


Pseudo R Squares (complex samples logistic regression algorithms)

Let LU(B) be the likelihood function for the whole population; that is, LU(B)=exp(lU(B)). A sample estimate is
^
L
U(B)=exp(lS(B)).

Related Topics

CSLOGISTIC Algorithms
Notation (complex samples logistic regression algorithms)
Superpopulation Model (complex samples logistic regression algorithms)
Parameter Estimation (complex samples logistic regression algorithms)
Parameter Covariance Matrix (complex samples logistic regression algorithms)
Confidence Intervals (complex samples logistic regression algorithms)
Design Effect (complex samples logistic regression algorithms)
Pseudo -2 Log-Likelihood (complex samples logistic regression algorithms)
Hypothesis Tests (complex samples logistic regression algorithms)
Predicted Values (complex samples logistic regression algorithms)
Classification Table (complex samples logistic regression algorithms)
Odds Ratio (complex samples logistic regression algorithms)
exp(B) (complex samples logistic regression algorithms)
Subpopulation Estimates (complex samples logistic regression algorithms)
Missing Values (complex samples logistic regression algorithms)
References (complex samples logistic regression algorithms)
Cox and Snell's R Square (complex samples logistic regression algorithms)
Nagelkerke's R Square (complex samples logistic regression algorithms)
McFadden's R Square (complex samples logistic regression algorithms)


Cox and Snell's R Square (complex samples logistic regression algorithms)

R2CS=1−(
^
L
U(B(0))
^
L
U(
^
B
))2
^
N
=1−exp{−−2lS(B(0))−(−2lS(
^
B
))
^
N
}

Related Topics

Pseudo R Squares (complex samples logistic regression algorithms)
Nagelkerke's R Square (complex samples logistic regression algorithms)
McFadden's R Square (complex samples logistic regression algorithms)


Nagelkerke's R Square (complex samples logistic regression algorithms)

R2N=R2 CS 1−{
^
L
U(B(0))}2/
^
N

Related Topics

Pseudo R Squares (complex samples logistic regression algorithms)
Cox and Snell's R Square (complex samples logistic regression algorithms)
McFadden's R Square (complex samples logistic regression algorithms)


McFadden's R Square (complex samples logistic regression algorithms)

R2 M =1−lS(
^
B
)lS(B(0))

Related Topics

Pseudo R Squares (complex samples logistic regression algorithms)
Cox and Snell's R Square (complex samples logistic regression algorithms)
Nagelkerke's R Square (complex samples logistic regression algorithms)


Hypothesis Tests (complex samples logistic regression algorithms)

Contrasts defined as linear combination of regression parameters can be tested. Given an r×p(K−1) L matrix and r×1 K vector, CSLogistic tests the linear hypothesis H0:LB=K. See Complex Samples: Model Testing for details.

Related Topics

CSLOGISTIC Algorithms
Notation (complex samples logistic regression algorithms)
Superpopulation Model (complex samples logistic regression algorithms)
Parameter Estimation (complex samples logistic regression algorithms)
Parameter Covariance Matrix (complex samples logistic regression algorithms)
Confidence Intervals (complex samples logistic regression algorithms)
Design Effect (complex samples logistic regression algorithms)
Pseudo -2 Log-Likelihood (complex samples logistic regression algorithms)
Pseudo R Squares (complex samples logistic regression algorithms)
Predicted Values (complex samples logistic regression algorithms)
Classification Table (complex samples logistic regression algorithms)
Odds Ratio (complex samples logistic regression algorithms)
exp(B) (complex samples logistic regression algorithms)
Subpopulation Estimates (complex samples logistic regression algorithms)
Missing Values (complex samples logistic regression algorithms)
References (complex samples logistic regression algorithms)
Custom Tests (complex samples logistic regression algorithms)
Default Tests of Model Effects (complex samples logistic regression algorithms)


Custom Tests (complex samples logistic regression algorithms)

For a user specified L and K, H0:LB=K is tested only when LB is estimable. Let L=(L1,...,LK−1), where each Lk is a r×p matrix. LB is estimable if for every

Lk=LkH

where H=(X´X)−X´X is a p×p matrix.

Note: In NOMREG, only block diagonal matrices such as L=diag(L*,...,L*) are considered, where L* is a q×p matrix. Also in NOMREG, testability is not checked.

Related Topics

Hypothesis Tests (complex samples logistic regression algorithms)
Default Tests of Model Effects (complex samples logistic regression algorithms)


Default Tests of Model Effects (complex samples logistic regression algorithms)

For each effect specified in the model, a matrix L=diag(L*,...,L*) is constructed and H0:LB=0 is tested. The matrix L* is chosen to be the type III test matrix constructed based on matrix H=(X´X)−X´X. This construction procedure makes sure that LB is estimable. It involves parameters only for the given effect and the effects containing the given effect. It does not depend on the order of effects specified in the model. If such a matrix cannot be constructed, the effect is not testable.

Related Topics

Hypothesis Tests (complex samples logistic regression algorithms)
Custom Tests (complex samples logistic regression algorithms)


Predicted Values (complex samples logistic regression algorithms)

For a predictor pattern x, the predicted probability of each response category is

^
p
x(k)={
exp(x´
^
B
k)1+K−1Σk=1exp(x´
^
B
k) 		k=1,...,K−1
11+K−1Σk=1exp(x´
^
B
k) 		k=K

The predicted category c(x) is the one with the highest predicted probability; that is

c(x)=arg
max
k
^
p
x(k)

Equivalently,

c(x)=arg
max
k
(x´
^
B
k)

where
^
B
K=0 is set for the last (reference) response category. This latter formula is less likely to have numerical problems and should be used.

Related Topics

CSLOGISTIC Algorithms
Notation (complex samples logistic regression algorithms)
Superpopulation Model (complex samples logistic regression algorithms)
Parameter Estimation (complex samples logistic regression algorithms)
Parameter Covariance Matrix (complex samples logistic regression algorithms)
Confidence Intervals (complex samples logistic regression algorithms)
Design Effect (complex samples logistic regression algorithms)
Pseudo -2 Log-Likelihood (complex samples logistic regression algorithms)
Pseudo R Squares (complex samples logistic regression algorithms)
Hypothesis Tests (complex samples logistic regression algorithms)
Classification Table (complex samples logistic regression algorithms)
Odds Ratio (complex samples logistic regression algorithms)
exp(B) (complex samples logistic regression algorithms)
Subpopulation Estimates (complex samples logistic regression algorithms)
Missing Values (complex samples logistic regression algorithms)
References (complex samples logistic regression algorithms)


Classification Table (complex samples logistic regression algorithms)

A two-way table with (i,j)th element being the counts or the sum of weights for the observations whose actual response category is i (as row) and predicted response category is j (as column) respectively.

Related Topics

CSLOGISTIC Algorithms
Notation (complex samples logistic regression algorithms)
Superpopulation Model (complex samples logistic regression algorithms)
Parameter Estimation (complex samples logistic regression algorithms)
Parameter Covariance Matrix (complex samples logistic regression algorithms)
Confidence Intervals (complex samples logistic regression algorithms)
Design Effect (complex samples logistic regression algorithms)
Pseudo -2 Log-Likelihood (complex samples logistic regression algorithms)
Pseudo R Squares (complex samples logistic regression algorithms)
Hypothesis Tests (complex samples logistic regression algorithms)
Predicted Values (complex samples logistic regression algorithms)
Odds Ratio (complex samples logistic regression algorithms)
exp(B) (complex samples logistic regression algorithms)
Subpopulation Estimates (complex samples logistic regression algorithms)
Missing Values (complex samples logistic regression algorithms)
References (complex samples logistic regression algorithms)


Odds Ratio (complex samples logistic regression algorithms)

The ratio of odds at x1 to odds at x2 for response category k1 versus k2 is

or(x1,x2;k1,k2)=px1(k1)/px1(k2)px2(k1)/px2(k2)=exp((x1−x2)´(Bk1−Bk2))

For k1=k and k2=K (the reference response category), odds ratio is simplified as

or(x1,x2;k,K)=exp((x1−x2)´Bk)

Equation for or(x1,x2;k,K) will be the one we use to calculate odds ratios. The estimate and confidence interval for or(x1,x2;k,K) are respectively

exp((x1−x2)´
^
B
k)

and

[exp(
^
C
−tdf,1−α2se(
^
C
)),exp(
^
C
+tdf,1−α2se(
^
C
))]

where

^
C
=(x1−x2)´
^
B
k

se(
^
C
)=
√ (x1−x2)´Var(
^
B
k)(x1−x2)

Related Topics

CSLOGISTIC Algorithms
Notation (complex samples logistic regression algorithms)
Superpopulation Model (complex samples logistic regression algorithms)
Parameter Estimation (complex samples logistic regression algorithms)
Parameter Covariance Matrix (complex samples logistic regression algorithms)
Confidence Intervals (complex samples logistic regression algorithms)
Design Effect (complex samples logistic regression algorithms)
Pseudo -2 Log-Likelihood (complex samples logistic regression algorithms)
Pseudo R Squares (complex samples logistic regression algorithms)
Hypothesis Tests (complex samples logistic regression algorithms)
Predicted Values (complex samples logistic regression algorithms)
Classification Table (complex samples logistic regression algorithms)
exp(B) (complex samples logistic regression algorithms)
Subpopulation Estimates (complex samples logistic regression algorithms)
Missing Values (complex samples logistic regression algorithms)
References (complex samples logistic regression algorithms)


exp(B) (complex samples logistic regression algorithms)

exp(Bkj) can be interpreted as an odds ratio for main effects model. SUDAAN calls exp(Bkj) the odds ratio for parameter Bkj whether or not there is an interaction effect in the model. Even though they may not be odds ratios for models with interaction effects, they are still of interest. For each exp(Bkj), its 1−α confidence interval is

[exp(L(
^
B
kj)),exp(U(
^
B
kj))]

where L(
^
B
kj),U(
^
B
kj) are the lower and upper confidence limits for census parameter Bkj.

Related Topics

CSLOGISTIC Algorithms
Notation (complex samples logistic regression algorithms)
Superpopulation Model (complex samples logistic regression algorithms)
Parameter Estimation (complex samples logistic regression algorithms)
Parameter Covariance Matrix (complex samples logistic regression algorithms)
Confidence Intervals (complex samples logistic regression algorithms)
Design Effect (complex samples logistic regression algorithms)
Pseudo -2 Log-Likelihood (complex samples logistic regression algorithms)
Pseudo R Squares (complex samples logistic regression algorithms)
Hypothesis Tests (complex samples logistic regression algorithms)
Predicted Values (complex samples logistic regression algorithms)
Classification Table (complex samples logistic regression algorithms)
Odds Ratio (complex samples logistic regression algorithms)
Subpopulation Estimates (complex samples logistic regression algorithms)
Missing Values (complex samples logistic regression algorithms)
References (complex samples logistic regression algorithms)


Subpopulation Estimates (complex samples logistic regression algorithms)

complex samples logistic regression algorithms,complex samples logistic regression algorithms,complex samples logistic regression algorithms
notation,notation,notation

When analyses are requested for a given subpopulation D, we perform calculations on the following redefined xi and yi(k):

xi=xiδi(D)
yi(k)=yi(k)δi(D)

where

δi(D)={
1 | if the sample unit i is in the subpopulation D
0 | otherwise

When computing point estimates, this substitution is equivalent to including only the subpopulation elements in the calculations. This is in contrast to computing the variance estimates where all elements in the sample need to be included.

Related Topics

CSLOGISTIC Algorithms
Notation (complex samples logistic regression algorithms)
Superpopulation Model (complex samples logistic regression algorithms)
Parameter Estimation (complex samples logistic regression algorithms)
Parameter Covariance Matrix (complex samples logistic regression algorithms)
Confidence Intervals (complex samples logistic regression algorithms)
Design Effect (complex samples logistic regression algorithms)
Pseudo -2 Log-Likelihood (complex samples logistic regression algorithms)
Pseudo R Squares (complex samples logistic regression algorithms)
Hypothesis Tests (complex samples logistic regression algorithms)
Predicted Values (complex samples logistic regression algorithms)
Classification Table (complex samples logistic regression algorithms)
Odds Ratio (complex samples logistic regression algorithms)
exp(B) (complex samples logistic regression algorithms)
Missing Values (complex samples logistic regression algorithms)
References (complex samples logistic regression algorithms)


Missing Values (complex samples logistic regression algorithms)

complex samples logistic regression algorithms,complex samples logistic regression algorithms,complex samples logistic regression algorithms
missing values,missing values,missing values

Missing values are handled using list-wise deletion; that is, any case without valid data on any design, dependent, or independent variable is excluded from the analysis.

Related Topics

CSLOGISTIC Algorithms
Notation (complex samples logistic regression algorithms)
Superpopulation Model (complex samples logistic regression algorithms)
Parameter Estimation (complex samples logistic regression algorithms)
Parameter Covariance Matrix (complex samples logistic regression algorithms)
Confidence Intervals (complex samples logistic regression algorithms)
Design Effect (complex samples logistic regression algorithms)
Pseudo -2 Log-Likelihood (complex samples logistic regression algorithms)
Pseudo R Squares (complex samples logistic regression algorithms)
Hypothesis Tests (complex samples logistic regression algorithms)
Predicted Values (complex samples logistic regression algorithms)
Classification Table (complex samples logistic regression algorithms)
Odds Ratio (complex samples logistic regression algorithms)
exp(B) (complex samples logistic regression algorithms)
Subpopulation Estimates (complex samples logistic regression algorithms)
References (complex samples logistic regression algorithms)


References (complex samples logistic regression algorithms)

complex samples logistic regression algorithms,complex samples logistic regression algorithms,complex samples logistic regression algorithms
references,references,references

Agresti, A. 2002. Categorical Data Analysis, 2nd ed. New York: John Wiley and Sons.

Albert, A., and J. A. Anderson. 1984. On the Existence of Maximum Likelihood Estimates in Logistic Regression Models. Biometrika, 71, 1-10.

Binder, D. A. 1983. On the variances of asymptotically normal estimators from complex surveys. International Statistical Review, 51, 279-292.

Chambers, R., and C. Skinner, eds. 2003. Analysis of Survey Data. New York: John Wiley & Sons.

Santner, T. J., and E. D. Duffy. 1986. A Note on A. Albert and J.A. Anderson's Conditions for the Existence of Maximum Likelihood Estimates in Logistic Regression Models. Biometrika, 73, 755-758.

Related Topics

CSLOGISTIC Algorithms
Notation (complex samples logistic regression algorithms)
Superpopulation Model (complex samples logistic regression algorithms)
Parameter Estimation (complex samples logistic regression algorithms)
Parameter Covariance Matrix (complex samples logistic regression algorithms)
Confidence Intervals (complex samples logistic regression algorithms)
Design Effect (complex samples logistic regression algorithms)
Pseudo -2 Log-Likelihood (complex samples logistic regression algorithms)
Pseudo R Squares (complex samples logistic regression algorithms)
Hypothesis Tests (complex samples logistic regression algorithms)
Predicted Values (complex samples logistic regression algorithms)
Classification Table (complex samples logistic regression algorithms)
Odds Ratio (complex samples logistic regression algorithms)
exp(B) (complex samples logistic regression algorithms)
Subpopulation Estimates (complex samples logistic regression algorithms)
Missing Values (complex samples logistic regression algorithms)


CSORDINAL Algorithms

CSORDINAL (command),CSORDINAL (command),CSORDINAL (command)
algorithms,algorithms,algorithms
Complex Samples Ordinal Regression,Complex Samples Ordinal Regression,Complex Samples Ordinal Regression
algorithms,algorithms,algorithms
complex samples ordinal regression algorithms,complex samples ordinal regression algorithms,complex samples ordinal regression algorithms

Complex Samples Ordinal Regression is a procedure for the analysis of ordinal responses using cumulative link models and allowing for both categorical and continuous predictors. Models specify threshold parameters associated with different response categories in addition to regression parameters associated with model predictors.

Complex sample data must contain both the values of the variables to be analyzed and the information on the current sampling design. Sampling design includes the sampling method, strata and clustering information, inclusion probabilities and the overall sampling weights.

Sampling design specification for Complex Samples Ordinal Regression may include up to three stages of sampling. Any of the following general sampling methods may be assumed in the first stage: random sampling with replacement, random sampling without replacement and equal probabilities and random sampling without replacement and unequal probabilities. The first two sampling methods can also be specified for the second and the third sampling stage.

Related Topics

Notation (complex samples ordinal regression algorithms)
Weights (complex samples ordinal regression algorithms)
Cumulative Link Model (complex samples ordinal regression algorithms)
Estimation (complex samples ordinal regression algorithms)
Variance estimates (complex samples ordinal regression algorithms)
Subpopulation estimates (complex samples ordinal regression algorithms)
Standard Errors (complex samples ordinal regression algorithms)
Degrees of Freedom (complex samples ordinal regression algorithms)
Confidence Intervals (complex samples ordinal regression algorithms)
t Tests (complex samples ordinal regression algorithms)
Design Effects (complex samples ordinal regression algorithms)
Pseudo -2 Log Likelihood (complex samples ordinal regression algorithms)
Pseudo R Squares (complex samples ordinal regression algorithms)
Hypothesis Testing (complex samples ordinal regression algorithms)
Test of Parallel Lines Assumption (complex samples ordinal regression algorithms)
Predicted Values (complex samples ordinal regression algorithms)
Cumulative odds ratios (complex samples ordinal regression algorithms)
References (complex samples ordinal regression algorithms)


Notation (complex samples ordinal regression algorithms)

complex samples ordinal regression algorithms,complex samples ordinal regression algorithms,complex samples ordinal regression algorithms
notation,notation,notation

The following notation is used throughout this chapter unless otherwise stated:

n

Total number of complete records or cases in the dataset.

wi

Overall sampling weight for each sample element in the ith record, i=1,...,n.

K

The number of values for the ordinal response variable, K>1.

Y

The ordinal response variable taking values coded into integers between 1 and K.

θ

Vector of K−1 population threshold parameters in the cumulative link model.

β

Vector of p population regression parameters associated with model predictors.

B

Vector of all model parameters B=(θT,βT)T.

X

n×p design matrix. The rows correspond to the records and the columns to the model regression parameters. The ith row is xTi,i=1,...,n.

πik

Conditional response probability for category given observed independent variable vector xi; that is, πik=P(Y=k|xi).

γik

Conditional cumulative response probability for category given observed independent variable vector xi; that is, γik=P(Y≤k|xi).

N

Total number of elements in the population:
^
N
=nΣi=1wi.

Related Topics

CSORDINAL Algorithms
Weights (complex samples ordinal regression algorithms)
Cumulative Link Model (complex samples ordinal regression algorithms)
Estimation (complex samples ordinal regression algorithms)
Variance estimates (complex samples ordinal regression algorithms)
Subpopulation estimates (complex samples ordinal regression algorithms)
Standard Errors (complex samples ordinal regression algorithms)
Degrees of Freedom (complex samples ordinal regression algorithms)
Confidence Intervals (complex samples ordinal regression algorithms)
t Tests (complex samples ordinal regression algorithms)
Design Effects (complex samples ordinal regression algorithms)
Pseudo -2 Log Likelihood (complex samples ordinal regression algorithms)
Pseudo R Squares (complex samples ordinal regression algorithms)
Hypothesis Testing (complex samples ordinal regression algorithms)
Test of Parallel Lines Assumption (complex samples ordinal regression algorithms)
Predicted Values (complex samples ordinal regression algorithms)
Cumulative odds ratios (complex samples ordinal regression algorithms)
References (complex samples ordinal regression algorithms)


Weights (complex samples ordinal regression algorithms)

complex samples ordinal regression algorithms,complex samples ordinal regression algorithms,complex samples ordinal regression algorithms
weights,weights,weights

Overall weights specified for each ultimate element are processed as given. See Weights (complex samples: covariance matrix of total algorithms) in Complex Samples: Covariance Matrix of Total for more information on weights and variance estimation methods.

Related Topics

CSORDINAL Algorithms
Notation (complex samples ordinal regression algorithms)
Cumulative Link Model (complex samples ordinal regression algorithms)
Estimation (complex samples ordinal regression algorithms)
Variance estimates (complex samples ordinal regression algorithms)
Subpopulation estimates (complex samples ordinal regression algorithms)
Standard Errors (complex samples ordinal regression algorithms)
Degrees of Freedom (complex samples ordinal regression algorithms)
Confidence Intervals (complex samples ordinal regression algorithms)
t Tests (complex samples ordinal regression algorithms)
Design Effects (complex samples ordinal regression algorithms)
Pseudo -2 Log Likelihood (complex samples ordinal regression algorithms)
Pseudo R Squares (complex samples ordinal regression algorithms)
Hypothesis Testing (complex samples ordinal regression algorithms)
Test of Parallel Lines Assumption (complex samples ordinal regression algorithms)
Predicted Values (complex samples ordinal regression algorithms)
Cumulative odds ratios (complex samples ordinal regression algorithms)
References (complex samples ordinal regression algorithms)


Cumulative Link Model (complex samples ordinal regression algorithms)

complex samples ordinal regression algorithms,complex samples ordinal regression algorithms,complex samples ordinal regression algorithms
model,model,model

Cumulative link models support regression of a single categorical dependent variable on a set of categorical or continuous independent variables. The dependent variable Y is assumed to be ordinal. Its values have an intrinsic linear ordering and correspond to consecutive integers from 1 to K. The cumulative link model links the conditional cumulative probabilities P(Y≤k|xi),k=1,...,K−1 to a linear predictor. Threshold parameters θ1<θ2<...<θK−1 are assumed different for each cumulative probability, but the vector of regression parameters β=(β1,...,βp)´ remains the same. The cumulative link model is given by the following set of equations:

link(P(Y≤k|xi))=θk−β´xi

Cumulative link function is specified as an inverse of a cumulative probability distribution function as follows:

link(γi,k)={
log(γi,k/(1−γi,k)) | Logit link
log(−log(1−γi,k)) | Complementary log-log link
−log(−log(γi,k)) | Negative log-log link
Φ−1(γi,k) | Probit link
tan( π ( γi,k -0 .5)) | Cauchit link

where γi,k=P(Y≤k|xi) for k=1,...,K−1.

Vector xi denotes a linear model design matrix row matching the vector of regression parameters β. Each parameter corresponds to one of the factor main effects, factor interaction effects, factor nested effects, covariate effects and factors by covariates interaction effects. For every factor effect level occurring in data there is a separate parameter. This results in an over-parametrized model.

Cumulative link models gained popularity after the publication by McCullagh (1980). Further details and examples of these models are given in Agresti (2002).

Related Topics

CSORDINAL Algorithms
Notation (complex samples ordinal regression algorithms)
Weights (complex samples ordinal regression algorithms)
Estimation (complex samples ordinal regression algorithms)
Variance estimates (complex samples ordinal regression algorithms)
Subpopulation estimates (complex samples ordinal regression algorithms)
Standard Errors (complex samples ordinal regression algorithms)
Degrees of Freedom (complex samples ordinal regression algorithms)
Confidence Intervals (complex samples ordinal regression algorithms)
t Tests (complex samples ordinal regression algorithms)
Design Effects (complex samples ordinal regression algorithms)
Pseudo -2 Log Likelihood (complex samples ordinal regression algorithms)
Pseudo R Squares (complex samples ordinal regression algorithms)
Hypothesis Testing (complex samples ordinal regression algorithms)
Test of Parallel Lines Assumption (complex samples ordinal regression algorithms)
Predicted Values (complex samples ordinal regression algorithms)
Cumulative odds ratios (complex samples ordinal regression algorithms)
References (complex samples ordinal regression algorithms)


Estimation (complex samples ordinal regression algorithms)

complex samples ordinal regression algorithms,complex samples ordinal regression algorithms,complex samples ordinal regression algorithms
estimation,estimation,estimation

Assuming that the entire finite population U={yi,xi}Ni=1 has been observed, we can obtain the maximum likelihood population parameter estimates for the cumulative model by maximizing the following multinomial log-likelihood function

l(θ,β)=logN∏i=1K∏k=1(πi,k)yi,k=NΣi=1KΣk=1yi,klogπi,k

where we define indicator variables

yi,k={
1 | if yi=k
0 | otherwise

and model probabilities

πi,k=P(Y=k|xi)=γi,k−γi,k−1,k=1,...,K with γi,0=0,γi,K=1.

Taking the first derivatives of the log-likelihood function with respect to the model parameters (θ,β) and setting them equal to zero, we obtain a set of estimating equations for the population model. A solution vector for this set of equations is denoted by (θN,βN). We follow the established design-based approach concerned with estimating the implicit finite population parameters as described by Binder (1983). Population totals in the estimating equations are replaced by their sample-based estimates. A solution for the sample-based estimating equations provides estimates for the population parameters (
^
θ
N,
^
β
N) and these are the estimates that we will consider in our analysis. For simplicity, we shall still denote them by (
^
θ
,
^
β
).

An equivalent approach for obtaining the estimates (
^
θ
,
^
β
) is the pseudo-maximum likelihood method where we maximize the sample-based estimate of the log-likelihood given as follows:

^
l
(θ,β)=nΣi=1KΣk=1wiyi,klogπi,k

See Särndal et al. (1992) for an overview of designed-based approach in modeling survey data.

Related Topics

CSORDINAL Algorithms
Notation (complex samples ordinal regression algorithms)
Weights (complex samples ordinal regression algorithms)
Cumulative Link Model (complex samples ordinal regression algorithms)
Variance estimates (complex samples ordinal regression algorithms)
Subpopulation estimates (complex samples ordinal regression algorithms)
Standard Errors (complex samples ordinal regression algorithms)
Degrees of Freedom (complex samples ordinal regression algorithms)
Confidence Intervals (complex samples ordinal regression algorithms)
t Tests (complex samples ordinal regression algorithms)
Design Effects (complex samples ordinal regression algorithms)
Pseudo -2 Log Likelihood (complex samples ordinal regression algorithms)
Pseudo R Squares (complex samples ordinal regression algorithms)
Hypothesis Testing (complex samples ordinal regression algorithms)
Test of Parallel Lines Assumption (complex samples ordinal regression algorithms)
Predicted Values (complex samples ordinal regression algorithms)
Cumulative odds ratios (complex samples ordinal regression algorithms)
References (complex samples ordinal regression algorithms)
Predicted probabilities (complex samples ordinal regression algorithms)
Estimating equations (complex samples ordinal regression algorithms)
Second derivatives (complex samples ordinal regression algorithms)
Expected second derivatives (complex samples ordinal regression algorithms)
Redundant parameters (complex samples ordinal regression algorithms)
Parameter estimation (complex samples ordinal regression algorithms)
Initial values (complex samples ordinal regression algorithms)
Stopping Criteria (complex samples ordinal regression algorithms)


Predicted probabilities (complex samples ordinal regression algorithms)

Given a predictor design vector , the model-predicted probability for each response category is

πi,k=γi,k−γi,k−1

where

γi,k={
0 | k=0
link−1(θk−β´xi) | k=1,...,K−1
1 | k=K

Let ηi,k=θk−β´xi. The inverse of the link function; that is, the corresponding cumulative distribution function is given by the following formulas:

link−1(ηi,k)={
exp(ηi,k)/(1+exp(ηi,k)) | for Logistic link
1−exp(−exp(ηi,k)) | for Complementary log-log link
exp(−exp(−ηi,k)) | for Negative log-log link
Φ(ηi,k) | for Probit link
0.5+arctan(ηi,k)/π | for Cauchit link

Related Topics

Estimation (complex samples ordinal regression algorithms)
Estimating equations (complex samples ordinal regression algorithms)
Second derivatives (complex samples ordinal regression algorithms)
Expected second derivatives (complex samples ordinal regression algorithms)
Redundant parameters (complex samples ordinal regression algorithms)
Parameter estimation (complex samples ordinal regression algorithms)
Initial values (complex samples ordinal regression algorithms)
Stopping Criteria (complex samples ordinal regression algorithms)


Estimating equations (complex samples ordinal regression algorithms)

Sample-based estimating equations for the population parameters are given by

^
S
(θ,β)=∂
^
l
(θ,β)∂(θ,β)=0

∂
^
l
∂θk=nΣi=1wi∂γi,k∂ηi,k(yi,kπi,k−yi,k+1πi,k+1)=0,k=1,...,K−1

and

∂
^
l
∂βt=nΣi=1KΣk=1−wi(∂γi,k∂ηi,k−∂γi,k−1∂ηi,k−1)yi,kπi,kxi,t=0,t=1,...,p

where

∂γi,k∂ηi,k={
γi,k(1−γi,k) | Logit link
−(1−γi,k)log(1−γi,k) | Complementary log-log link
−γi,klog(γi,k) | Negative log-log link
φ(Φ−1(γi,k)) | Probit link
cos2(π(γi,k−0.5))/π | Cauchit link

for k=1,...,K−1, and by the definition ∂γi,0∂ηi,0=∂γi,K∂ηi,K=0. Note that if

γi,k=0 or γi,k=1 then ∂γi,k∂ηi,k=0 for all link functions.

Related Topics

Estimation (complex samples ordinal regression algorithms)
Predicted probabilities (complex samples ordinal regression algorithms)
Second derivatives (complex samples ordinal regression algorithms)
Expected second derivatives (complex samples ordinal regression algorithms)
Redundant parameters (complex samples ordinal regression algorithms)
Parameter estimation (complex samples ordinal regression algorithms)
Initial values (complex samples ordinal regression algorithms)
Stopping Criteria (complex samples ordinal regression algorithms)


Second derivatives (complex samples ordinal regression algorithms)

The matrix of the first derivatives of the estimated scores
^
S
(θ,β) is denoted by
^
J
0(θ,β) and its elements are given by the following expressions:

∂2
^
l
∂θk−1∂θk=nΣi=1wi∂γi,k−1∂ηi,k−1∂γi,k∂ηi,kyi,kπ2i,k,k=2,...,K−1

∂2
^
l
∂θ2k=nΣi=1wi[∂2γi,k∂η2i,k(yi,kπi,k−yi,k+1πi,k+1)−(∂γi,k∂ηi,k)2(yi,kπ2i,k+yi,k+1π2i,k+1)],k=1,...,K−1

∂2
^
l
∂θj∂θk=0, for |j−k|>1

∂2
^
l
∂θk∂βt=−nΣi=1wi(∂2γi,k∂η2i,kπi,k−∂γi,k∂ηi,k(∂γi,k∂ηi,k−∂γi,k−1∂ηi,k−1))yi,kπ2i,kxi,t+
nΣi=1wi(∂2γi,k∂η2i,kπi,k+1−∂γi,k∂ηi,k(∂γi,k+1∂ηi,k+1−∂γi,k∂ηi,k))yi,k+1π2i,k+1xi,t,k=1,...K−1,t=1,...,p

∂2
^
l
∂βt∂βu=nΣi=1KΣk=1wi[(∂2γi,k∂η2i,k−∂2γi,k−1∂η2i,k−1)πi,k−(∂γi,k∂ηi,k−∂γi,k−1∂ηi,k−1)2]yi,kπ2i,kxi,txi,u

t,u=1,...,p

Second derivatives of the cumulative distribution functions are given by

∂2γi,k∂η2i,k=∂γi,k∂ηi,k×{
1−2γi,k | Logit link
1+log(1−γi,k) | Complementary log-log link
−(1+log(γi,k)) | Negative log-log link
−Φ−1(γi,k) | Probit link
sin(2πγi,k) | Cauchit link

for k=1,...,K−1, and by the definition ∂2γi,0∂η2i,0=∂2γi,K∂η2i,K=0.

Related Topics

Estimation (complex samples ordinal regression algorithms)
Predicted probabilities (complex samples ordinal regression algorithms)
Estimating equations (complex samples ordinal regression algorithms)
Expected second derivatives (complex samples ordinal regression algorithms)
Redundant parameters (complex samples ordinal regression algorithms)
Parameter estimation (complex samples ordinal regression algorithms)
Initial values (complex samples ordinal regression algorithms)
Stopping Criteria (complex samples ordinal regression algorithms)


Expected second derivatives (complex samples ordinal regression algorithms)

The matrix of the expected first derivatives of the estimated scores
^
S
(θ,β) is denoted by
^
J
1(θ,β) and its elements are given by the following expressions:

∂2
^
l
∂θk−1∂θk=nΣi=1wi∂γi,k−1∂ηi,k−1∂γi,k∂ηi,k1πi,k,k=2,...,K−1

∂2
^
l
∂θ2k=−nΣi=1wi(∂γi,k∂ηi,k)2(1πi,k+1πi,k+1),k=1,...,K−1

∂2
^
l
∂θj∂θk=0, for |j−k|>1

∂2
^
l
∂θk∂βt=nΣi=1wi[(∂γi,k∂ηi,k−∂γi,k−1∂ηi,k−1)1πi,k−(∂γi,k+1∂ηi,k+1−∂γi,k∂ηi,k)1πi,k+1]∂γi,k∂ηi,kxi,t

k=1,...K−1,t=1,...,p

∂2
^
l
∂βt∂βu=nΣi=1KΣk=1−wi(∂γi,k∂ηi,k−∂γi,k−1∂ηi,k−1)21πi,kxi,txi,u,t,u=1,...,p

When conducting an analysis for a subpopulation D, only records that belong to the subpopulation enter the summation in all of the above derivatives formulas.

Related Topics

Estimation (complex samples ordinal regression algorithms)
Predicted probabilities (complex samples ordinal regression algorithms)
Estimating equations (complex samples ordinal regression algorithms)
Second derivatives (complex samples ordinal regression algorithms)
Redundant parameters (complex samples ordinal regression algorithms)
Parameter estimation (complex samples ordinal regression algorithms)
Initial values (complex samples ordinal regression algorithms)
Stopping Criteria (complex samples ordinal regression algorithms)


Redundant parameters (complex samples ordinal regression algorithms)

Due to our use of the over-parametrized model where there is a separate parameter for every factor effect level occurring in the data, the columns of the design matrix are often dependent. Collinearities among continuous variables in the data can also occur. To establish the dependencies in the design matrix we examine columns of (1,−X)´(1,−X) using the sweep operator. When a column is found to be dependent on previous columns, the corresponding parameter is treated as redundant. The solution for redundant parameters is fixed at zero.

Related Topics

Estimation (complex samples ordinal regression algorithms)
Predicted probabilities (complex samples ordinal regression algorithms)
Estimating equations (complex samples ordinal regression algorithms)
Second derivatives (complex samples ordinal regression algorithms)
Expected second derivatives (complex samples ordinal regression algorithms)
Parameter estimation (complex samples ordinal regression algorithms)
Initial values (complex samples ordinal regression algorithms)
Stopping Criteria (complex samples ordinal regression algorithms)


Parameter estimation (complex samples ordinal regression algorithms)

The vector of estimates of the population model parameters is obtained as a solution
^
B
=(
^
θ
,
^
β
) of the sample-based estimating equations. It is computed using the Newton-Raphson method, Fisher scoring or a hybrid method. The hybrid method consists of applying Fisher scoring steps for a specified number of iterations before switching to Newton-Raphson steps. The iteration step is described as follows. Given a vector of parameter estimates B(ν) at iteration step ν, the parameters B(ν+1) at iteration step ν+1 are computed by solving the following equation:

^
J
(B(ν))B(ν+1)=
^
J
(B(ν))B(ν)−ξ·
^
S
(B(ν))

where

^
J
(B)={
^
J
0(B) 		for Newton-Raphson step
^
J
1(B) 		for Fisher scoring step

The stepping scalar ξ>0 is used to ensure that
^
l
(B(ν+1))≥
^
l
(B(ν)) and that πik>0 if yik=1 for every i. Use step-halving ξ=1/2μ,μ=0,...,M−1 until these conditions are satisfied or the maximum number of steps in step-halving M is reached.

Starting with initial values B(0), iteratively update estimates B(v+1) until one of the stopping criteria is satisfied. The final vector of estimates is denoted by
^
B
.

Related Topics

Estimation (complex samples ordinal regression algorithms)
Predicted probabilities (complex samples ordinal regression algorithms)
Estimating equations (complex samples ordinal regression algorithms)
Second derivatives (complex samples ordinal regression algorithms)
Expected second derivatives (complex samples ordinal regression algorithms)
Redundant parameters (complex samples ordinal regression algorithms)
Initial values (complex samples ordinal regression algorithms)
Stopping Criteria (complex samples ordinal regression algorithms)


Initial values (complex samples ordinal regression algorithms)

Let
^
N
k=nΣi=1wiyik be the estimated population number of responses in category k=1,...,K, and
^
N
=nΣi=1wi be the estimated population size. Initial thresholds are then computed according to the following formula:

θ(0)k=link(kΣj=1
^
N
j
^
N
) for k=1,...,K−1

Initial values for all regression parameters are set to zero, i.e. β(0)t=0 for t=1,...,p.

Related Topics

Estimation (complex samples ordinal regression algorithms)
Predicted probabilities (complex samples ordinal regression algorithms)
Estimating equations (complex samples ordinal regression algorithms)
Second derivatives (complex samples ordinal regression algorithms)
Expected second derivatives (complex samples ordinal regression algorithms)
Redundant parameters (complex samples ordinal regression algorithms)
Parameter estimation (complex samples ordinal regression algorithms)
Stopping Criteria (complex samples ordinal regression algorithms)


Stopping Criteria (complex samples ordinal regression algorithms)

Given two convergence criteria εl > 0 and εp > 0, the iteration is considered to have converged if criterion 1 or 2 is satisfied, and it stops if any of the following criteria are satisfied:

1. Pseudo-likelihood criterion

{
|
^
l
(B(v+1))−
^
l
(B(v))||
^
l
(B(v))|+10−6<εl 		if relative change
|
^
l
(B(v+1))−
^
l
(B(v))|<εl 		if absolute change

2. Parameter criterion

{
max
i
(|B(v+1)i−B(v)i||B(v)i|+10−6)<εp 		if relative change
max
i
(|B(v+1)i−B(v)i|)<εp 		if absolute change

3. The maximum number of iterations, or steps in step-halving is reached.

4. Complete or quasi-complete separation of the data is established.

Depending on user's choice, either relative or absolute change (default) is considered in criterion 1 and 2.

If the hybrid algorithm converges with Fisher scoring step, the iterations continue with Newton-Raphson steps.

Related Topics

Estimation (complex samples ordinal regression algorithms)
Predicted probabilities (complex samples ordinal regression algorithms)
Estimating equations (complex samples ordinal regression algorithms)
Second derivatives (complex samples ordinal regression algorithms)
Expected second derivatives (complex samples ordinal regression algorithms)
Redundant parameters (complex samples ordinal regression algorithms)
Parameter estimation (complex samples ordinal regression algorithms)
Initial values (complex samples ordinal regression algorithms)


Variance estimates (complex samples ordinal regression algorithms)

Variances of parameter estimates are computed according to the Taylor linearization method as suggested by Binder (1983). Define vector si(
^
B
) of size (K−1+t) to be the contribution of the ith element to the estimating equations as follows:

s(k)i(
^
B
)=∂γi,k∂ηi,k(yi,kπi,k−yi,k+1πi,k+1),k=1,...,K−1

and

s(K−1+t)i(
^
B
)=KΣk=1−(∂γi,k∂ηi,k−∂γi,k−1∂ηi,k−1)yi,kπi,kxi,t,t=1,...,p

so that

^
S
(
^
B
)=nΣi=1wisi(
^
B
).

The above sum is to be considered as an estimate for the population total of the vectors si(
^
B
). Its sample design-based covariance matrix is denoted by
^
V
(
^
S
(
^
B
)) . See Complex Samples: Covariance Matrix of Total for more information on its computation. Then the covariance matrix of
^
B
is estimated by

^
V
(
^
B
)=
^
J
(
^
B
)−
^
V
(
^
S
(
^
B
))
^
J
(
^
B
)−

where
^
J
(
^
B
)− is a generalized inverse of
^
J
(
^
B
).

Note: If any diagonal element of
^
V
(
^
S
(
^
B
)) happens to be non-positive due to the use of Yates-Grundy-Sen estimator, all elements in the corresponding row and column are set to zero.

Related Topics

CSORDINAL Algorithms
Notation (complex samples ordinal regression algorithms)
Weights (complex samples ordinal regression algorithms)
Cumulative Link Model (complex samples ordinal regression algorithms)
Estimation (complex samples ordinal regression algorithms)
Subpopulation estimates (complex samples ordinal regression algorithms)
Standard Errors (complex samples ordinal regression algorithms)
Degrees of Freedom (complex samples ordinal regression algorithms)
Confidence Intervals (complex samples ordinal regression algorithms)
t Tests (complex samples ordinal regression algorithms)
Design Effects (complex samples ordinal regression algorithms)
Pseudo -2 Log Likelihood (complex samples ordinal regression algorithms)
Pseudo R Squares (complex samples ordinal regression algorithms)
Hypothesis Testing (complex samples ordinal regression algorithms)
Test of Parallel Lines Assumption (complex samples ordinal regression algorithms)
Predicted Values (complex samples ordinal regression algorithms)
Cumulative odds ratios (complex samples ordinal regression algorithms)
References (complex samples ordinal regression algorithms)


Subpopulation estimates (complex samples ordinal regression algorithms)

When analyses are requested for a given subpopulation D, we redefine (yi,x´i)´ as follows:

(yi,x´i)={
(yi,x´i) | if the i the record is in D
(0,...,0) | otherwise

This is to ensure that the contribution to estimates of every element not in subpopulation D is zero. When computing point estimates, this substitution is equivalent to including only the subpopulation elements in the calculations. This is in contrast to computing the variance estimates where all elements in the sample need to be included.

Related Topics

CSORDINAL Algorithms
Notation (complex samples ordinal regression algorithms)
Weights (complex samples ordinal regression algorithms)
Cumulative Link Model (complex samples ordinal regression algorithms)
Estimation (complex samples ordinal regression algorithms)
Variance estimates (complex samples ordinal regression algorithms)
Standard Errors (complex samples ordinal regression algorithms)
Degrees of Freedom (complex samples ordinal regression algorithms)
Confidence Intervals (complex samples ordinal regression algorithms)
t Tests (complex samples ordinal regression algorithms)
Design Effects (complex samples ordinal regression algorithms)
Pseudo -2 Log Likelihood (complex samples ordinal regression algorithms)
Pseudo R Squares (complex samples ordinal regression algorithms)
Hypothesis Testing (complex samples ordinal regression algorithms)
Test of Parallel Lines Assumption (complex samples ordinal regression algorithms)
Predicted Values (complex samples ordinal regression algorithms)
Cumulative odds ratios (complex samples ordinal regression algorithms)
References (complex samples ordinal regression algorithms)


Standard Errors (complex samples ordinal regression algorithms)

complex samples ordinal regression algorithms,complex samples ordinal regression algorithms,complex samples ordinal regression algorithms
notation,notation,notation

Let
^
B
i denote a non-redundant parameter estimate. Its standard error is the square root of its estimated variance:

SE(
^
B
i)=
√
^
V
(
^
B
i)

Standard error is undefined for redundant parameters.

Related Topics

CSORDINAL Algorithms
Notation (complex samples ordinal regression algorithms)
Weights (complex samples ordinal regression algorithms)
Cumulative Link Model (complex samples ordinal regression algorithms)
Estimation (complex samples ordinal regression algorithms)
Variance estimates (complex samples ordinal regression algorithms)
Subpopulation estimates (complex samples ordinal regression algorithms)
Degrees of Freedom (complex samples ordinal regression algorithms)
Confidence Intervals (complex samples ordinal regression algorithms)
t Tests (complex samples ordinal regression algorithms)
Design Effects (complex samples ordinal regression algorithms)
Pseudo -2 Log Likelihood (complex samples ordinal regression algorithms)
Pseudo R Squares (complex samples ordinal regression algorithms)
Hypothesis Testing (complex samples ordinal regression algorithms)
Test of Parallel Lines Assumption (complex samples ordinal regression algorithms)
Predicted Values (complex samples ordinal regression algorithms)
Cumulative odds ratios (complex samples ordinal regression algorithms)
References (complex samples ordinal regression algorithms)


Degrees of Freedom (complex samples ordinal regression algorithms)

The number of the degrees of freedom df used for computing confidence intervals and test statistics below is calculated as the difference between the number of primary sampling units and the number of strata in the first stage of sampling. We shall also refer to this quantity as the sample design degrees of freedom. Alternatively, df may be specified by the user.

Related Topics

CSORDINAL Algorithms
Notation (complex samples ordinal regression algorithms)
Weights (complex samples ordinal regression algorithms)
Cumulative Link Model (complex samples ordinal regression algorithms)
Estimation (complex samples ordinal regression algorithms)
Variance estimates (complex samples ordinal regression algorithms)
Subpopulation estimates (complex samples ordinal regression algorithms)
Standard Errors (complex samples ordinal regression algorithms)
Confidence Intervals (complex samples ordinal regression algorithms)
t Tests (complex samples ordinal regression algorithms)
Design Effects (complex samples ordinal regression algorithms)
Pseudo -2 Log Likelihood (complex samples ordinal regression algorithms)
Pseudo R Squares (complex samples ordinal regression algorithms)
Hypothesis Testing (complex samples ordinal regression algorithms)
Test of Parallel Lines Assumption (complex samples ordinal regression algorithms)
Predicted Values (complex samples ordinal regression algorithms)
Cumulative odds ratios (complex samples ordinal regression algorithms)
References (complex samples ordinal regression algorithms)


Confidence Intervals (complex samples ordinal regression algorithms)

A level 1−α confidence interval is constructed for a given 0≤α≤1 for each non-redundant model parameter
^
B
i. Confidence bounds are given by

^
B
i±SE(
^
B
i)tdf(1−α/2)

where SE(
^
B
i) is the estimated standard error of
^
B
i, and tdf(1−α/2) is the 100(1−α/2) percentile of t distribution with df degrees of freedom.

Related Topics

CSORDINAL Algorithms
Notation (complex samples ordinal regression algorithms)
Weights (complex samples ordinal regression algorithms)
Cumulative Link Model (complex samples ordinal regression algorithms)
Estimation (complex samples ordinal regression algorithms)
Variance estimates (complex samples ordinal regression algorithms)
Subpopulation estimates (complex samples ordinal regression algorithms)
Standard Errors (complex samples ordinal regression algorithms)
Degrees of Freedom (complex samples ordinal regression algorithms)
t Tests (complex samples ordinal regression algorithms)
Design Effects (complex samples ordinal regression algorithms)
Pseudo -2 Log Likelihood (complex samples ordinal regression algorithms)
Pseudo R Squares (complex samples ordinal regression algorithms)
Hypothesis Testing (complex samples ordinal regression algorithms)
Test of Parallel Lines Assumption (complex samples ordinal regression algorithms)
Predicted Values (complex samples ordinal regression algorithms)
Cumulative odds ratios (complex samples ordinal regression algorithms)
References (complex samples ordinal regression algorithms)


t Tests (complex samples ordinal regression algorithms)

Testing hypothesis H0i:
^
B
i=0 for each non-redundant model parameter
^
B
i is performed using the t test statistic:

t(
^
B
i)=
^
B
iSE(
^
B
i)

The p-value for the two-sided test is given by the probability P(|T|>|t(
^
B
i)|), where T is a random variable from the t distribution with df degrees of freedom.

Related Topics

CSORDINAL Algorithms
Notation (complex samples ordinal regression algorithms)
Weights (complex samples ordinal regression algorithms)
Cumulative Link Model (complex samples ordinal regression algorithms)
Estimation (complex samples ordinal regression algorithms)
Variance estimates (complex samples ordinal regression algorithms)
Subpopulation estimates (complex samples ordinal regression algorithms)
Standard Errors (complex samples ordinal regression algorithms)
Degrees of Freedom (complex samples ordinal regression algorithms)
Confidence Intervals (complex samples ordinal regression algorithms)
Design Effects (complex samples ordinal regression algorithms)
Pseudo -2 Log Likelihood (complex samples ordinal regression algorithms)
Pseudo R Squares (complex samples ordinal regression algorithms)
Hypothesis Testing (complex samples ordinal regression algorithms)
Test of Parallel Lines Assumption (complex samples ordinal regression algorithms)
Predicted Values (complex samples ordinal regression algorithms)
Cumulative odds ratios (complex samples ordinal regression algorithms)
References (complex samples ordinal regression algorithms)


Design Effects (complex samples ordinal regression algorithms)

The design effect Deff(
^
B
i) for non-redundant parameter estimate
^
B
i is given by

Deff(
^
B
i)=
^
V
(
^
B
i)
^
V
srs(
^
B
i)

Design effects are undefined for redundant parameters.

^
V
(
^
B
i) is the estimate of variance of
^
B
i under the appropriate sampling design, while
^
V
srs(
^
B
i) is the estimate of variance of
^
B
i under the simple random sampling assumption. The latter is computed as the ith diagonal element of the following matrix:

^
V
srs(
^
B
i)=[
^
J
(
^
B
)−
^
V
srs(
^
S
(
^
B
))
^
J
(
^
B
)−]ii

^
V
srs(
^
S
(
^
B
)) can be computed by the following formula:

^
V
srs(
^
S
(
^
B
))=(fpc)
^
N
n−1nΣi=1wisis´i

with si as specified earlier and
^
N
being an estimate of the population size.

Assuming sampling without replacement we have fpc=(1−n
^
N
) given that n
^
N
<1, while for sampling with replacement we set fpc=1. This assumption is independent of the sampling specified for the complex sample design based variance
^
V
(
^
S
(
^
B
)).

For subpopulation analysis we have that si=0 whenever record does not belong to a given subpopulation.

We also provide the square root of design effects. Note that the square root of design effect Deff, computed without finite population correction, has been commonly denoted by Deft following paper by Kish (1995). Design effects and their application have been discussed since introduction by Kish (1965).

Related Topics

CSORDINAL Algorithms
Notation (complex samples ordinal regression algorithms)
Weights (complex samples ordinal regression algorithms)
Cumulative Link Model (complex samples ordinal regression algorithms)
Estimation (complex samples ordinal regression algorithms)
Variance estimates (complex samples ordinal regression algorithms)
Subpopulation estimates (complex samples ordinal regression algorithms)
Standard Errors (complex samples ordinal regression algorithms)
Degrees of Freedom (complex samples ordinal regression algorithms)
Confidence Intervals (complex samples ordinal regression algorithms)
t Tests (complex samples ordinal regression algorithms)
Pseudo -2 Log Likelihood (complex samples ordinal regression algorithms)
Pseudo R Squares (complex samples ordinal regression algorithms)
Hypothesis Testing (complex samples ordinal regression algorithms)
Test of Parallel Lines Assumption (complex samples ordinal regression algorithms)
Predicted Values (complex samples ordinal regression algorithms)
Cumulative odds ratios (complex samples ordinal regression algorithms)
References (complex samples ordinal regression algorithms)


Linear combinations (complex samples ordinal regression algorithms)

Given a constant vector l of the same size as the vector of parameter estimates
^
B
, we compute variance estimates for the linear combination l´
^
B
by the formulas:

^
V
(l´
^
B
)=l´
^
V
(
^
B
)l

and

^
V
srs(l´
^
B
)=l´
^
V
srs(
^
B
)l

Design effect Deff(l´
^
B
) for the linear combination l´
^
B
is then given by

Deff(l´
^
B
)=
^
V
(l´
^
B
)
^
V
srs(l´
^
B
)


Pseudo -2 Log Likelihood (complex samples ordinal regression algorithms)

For the model under consideration, the sample-based estimate of the population –2 Log Likelihood is

−2
^
l
(
^
B
)

For initial model, the estimate of the –2 Log Likelihood is

−2
^
l
(B(0))

where B(0) is the initial parameter values used in iterative estimating procedure.

Related Topics

CSORDINAL Algorithms
Notation (complex samples ordinal regression algorithms)
Weights (complex samples ordinal regression algorithms)
Cumulative Link Model (complex samples ordinal regression algorithms)
Estimation (complex samples ordinal regression algorithms)
Variance estimates (complex samples ordinal regression algorithms)
Subpopulation estimates (complex samples ordinal regression algorithms)
Standard Errors (complex samples ordinal regression algorithms)
Degrees of Freedom (complex samples ordinal regression algorithms)
Confidence Intervals (complex samples ordinal regression algorithms)
t Tests (complex samples ordinal regression algorithms)
Design Effects (complex samples ordinal regression algorithms)
Pseudo R Squares (complex samples ordinal regression algorithms)
Hypothesis Testing (complex samples ordinal regression algorithms)
Test of Parallel Lines Assumption (complex samples ordinal regression algorithms)
Predicted Values (complex samples ordinal regression algorithms)
Cumulative odds ratios (complex samples ordinal regression algorithms)
References (complex samples ordinal regression algorithms)


Pseudo R Squares (complex samples ordinal regression algorithms)

Let L(B) be the likelihood function for the whole population, that is, L(B)=exp(l(B)). A sample-based estimate of it is
^
L
(B)=exp(
^
l
(B)).

Related Topics

CSORDINAL Algorithms
Notation (complex samples ordinal regression algorithms)
Weights (complex samples ordinal regression algorithms)
Cumulative Link Model (complex samples ordinal regression algorithms)
Estimation (complex samples ordinal regression algorithms)
Variance estimates (complex samples ordinal regression algorithms)
Subpopulation estimates (complex samples ordinal regression algorithms)
Standard Errors (complex samples ordinal regression algorithms)
Degrees of Freedom (complex samples ordinal regression algorithms)
Confidence Intervals (complex samples ordinal regression algorithms)
t Tests (complex samples ordinal regression algorithms)
Design Effects (complex samples ordinal regression algorithms)
Pseudo -2 Log Likelihood (complex samples ordinal regression algorithms)
Hypothesis Testing (complex samples ordinal regression algorithms)
Test of Parallel Lines Assumption (complex samples ordinal regression algorithms)
Predicted Values (complex samples ordinal regression algorithms)
Cumulative odds ratios (complex samples ordinal regression algorithms)
References (complex samples ordinal regression algorithms)
Cox and Snell's R Square (complex samples ordinal regression algorithms)
Nagelkerke's R Square (complex samples ordinal regression algorithms)
McFadden's R Square (complex samples ordinal regression algorithms)


Cox and Snell's R Square (complex samples ordinal regression algorithms)

R2CS=1−(
^
L
(B(0))
^
L
(
^
B
))2
^
N
=1−exp{−−2
^
l
(B(0))−(−2
^
l
(
^
B
))
^
N
}

Related Topics

Pseudo R Squares (complex samples ordinal regression algorithms)
Nagelkerke's R Square (complex samples ordinal regression algorithms)
McFadden's R Square (complex samples ordinal regression algorithms)


Nagelkerke's R Square (complex samples ordinal regression algorithms)

R2N=R2CS1−{
^
L
(B(0))}2/
^
N

Related Topics

Pseudo R Squares (complex samples ordinal regression algorithms)
Cox and Snell's R Square (complex samples ordinal regression algorithms)
McFadden's R Square (complex samples ordinal regression algorithms)


McFadden's R Square (complex samples ordinal regression algorithms)

R2 M =1−
^
l
(
^
B
)
^
l
(B(0))

Related Topics

Pseudo R Squares (complex samples ordinal regression algorithms)
Cox and Snell's R Square (complex samples ordinal regression algorithms)
Nagelkerke's R Square (complex samples ordinal regression algorithms)


Hypothesis Testing (complex samples ordinal regression algorithms)

complex samples ordinal regression algorithms,complex samples ordinal regression algorithms,complex samples ordinal regression algorithms
testing,testing,testing

Contrasts defined as linear combinations of threshold and regression parameters can be tested . Given matrix L with r rows and K−1+p columns, and vector K with r elements, Complex Samples Ordinal Regression performs testing of linear hypothesis H0:LB=K. See Complex Samples: Model Testing for details.

Related Topics

CSORDINAL Algorithms
Notation (complex samples ordinal regression algorithms)
Weights (complex samples ordinal regression algorithms)
Cumulative Link Model (complex samples ordinal regression algorithms)
Estimation (complex samples ordinal regression algorithms)
Variance estimates (complex samples ordinal regression algorithms)
Subpopulation estimates (complex samples ordinal regression algorithms)
Standard Errors (complex samples ordinal regression algorithms)
Degrees of Freedom (complex samples ordinal regression algorithms)
Confidence Intervals (complex samples ordinal regression algorithms)
t Tests (complex samples ordinal regression algorithms)
Design Effects (complex samples ordinal regression algorithms)
Pseudo -2 Log Likelihood (complex samples ordinal regression algorithms)
Pseudo R Squares (complex samples ordinal regression algorithms)
Test of Parallel Lines Assumption (complex samples ordinal regression algorithms)
Predicted Values (complex samples ordinal regression algorithms)
Cumulative odds ratios (complex samples ordinal regression algorithms)
References (complex samples ordinal regression algorithms)
Custom tests (complex samples ordinal regression algorithms)
Default tests of Model effects (complex samples ordinal regression algorithms)


Custom tests (complex samples ordinal regression algorithms)

For a user specified L and K, H0:LB=K is tested only when it is testable; that is, when vector LB is estimable. Consider partition L=(L(θ),L(β)), where L(θ)=(l1,...,lK−1) consists of columns corresponding to threshold parameters and L(β) be the part of L corresponding to regression parameters. Consider matrix L0=(l0,L(β)) where the column vectors corresponding to threshold parameters are replaced by their sum l0=K−1Σk=1lk. Then LB is estimable if and only if L0=L0H, where H=(X´1X1)−X´1X1 is a (p+1)×(p+1) matrix constructed using X1=(1,−X).

Related Topics

Hypothesis Testing (complex samples ordinal regression algorithms)
Default tests of Model effects (complex samples ordinal regression algorithms)


Default tests of Model effects (complex samples ordinal regression algorithms)

For each effect specified in the model excluding intercept, type III test matrix L is constructed and H0:LB=0 is tested. Construction of matrix L is based on matrix H=(X´1X1)−X´1X1 and such that LB is estimable. It involves parameters only for the given effect and the effects containing the given effect. It does not depend on the order of effects specified in the model. If such a matrix cannot be constructed, the effect is not testable.

See Type III Sum of Squares and Hypothesis Matrix (Sums of Squares algorithms) in Sums of Squares for computational details on construction of type III test matrices.

Related Topics

Hypothesis Testing (complex samples ordinal regression algorithms)
Custom tests (complex samples ordinal regression algorithms)


Test of Parallel Lines Assumption (complex samples ordinal regression algorithms)

complex samples ordinal regression algorithms,complex samples ordinal regression algorithms,complex samples ordinal regression algorithms
parallel lines test,parallel lines test,parallel lines test

Consider an alternative model for the specified cumulative link model by allowing different regression parameters β(k)=(β(k)1,...,β(k)p)´ for the first K−1 response categories:

link(P(Y≤k|x))=θk−β(k)x

The alternative model then contains parameters with threshold parameters and regression parameters. Cumulative link model is a restriction of the alternative model based on the assumption of parallel lines corresponding to the following null hypothesis:

H0:β(1)=...=β(K−1)

We conduct test of this hypothesis by estimating the parameters of the alternative model and applying a Wald type test for LBA=0 with the contrast matrix L given by

L=[
L(1)
·
·
·
L(p)
]

where each L(t),t=1,...p is a (K−2)×(p+1)(K−1) matrix containing pairwise contrasts for parameter t between the first and the rest of the regression equations for corresponding responses.

See Complex Samples: Model Testing for details of conducting an appropriate Wald test. There are several testing options available, but they all require previously computed alternative model parameter estimates
^
B
A as well as their covariance matrix
^
V
(
^
B
A). For some of the options, covariance matrix
^
V
srs(
^
B
A) must be computed as well.

See Peterson and Harrell (1990) for a discussion of the alternative model.

Related Topics

CSORDINAL Algorithms
Notation (complex samples ordinal regression algorithms)
Weights (complex samples ordinal regression algorithms)
Cumulative Link Model (complex samples ordinal regression algorithms)
Estimation (complex samples ordinal regression algorithms)
Variance estimates (complex samples ordinal regression algorithms)
Subpopulation estimates (complex samples ordinal regression algorithms)
Standard Errors (complex samples ordinal regression algorithms)
Degrees of Freedom (complex samples ordinal regression algorithms)
Confidence Intervals (complex samples ordinal regression algorithms)
t Tests (complex samples ordinal regression algorithms)
Design Effects (complex samples ordinal regression algorithms)
Pseudo -2 Log Likelihood (complex samples ordinal regression algorithms)
Pseudo R Squares (complex samples ordinal regression algorithms)
Hypothesis Testing (complex samples ordinal regression algorithms)
Predicted Values (complex samples ordinal regression algorithms)
Cumulative odds ratios (complex samples ordinal regression algorithms)
References (complex samples ordinal regression algorithms)
Estimation of the Alternative Model (complex samples ordinal regression algorithms)


Estimation of the Alternative Model (complex samples ordinal regression algorithms)

Algorithm applied for computing solution of the alternative model
^
B
A is similar to the algorithm for the restricted cumulative link model
^
B
. The main difference is in computation of estimating equations and second derivatives appropriate for the alternative model. They are outlined below.

Expressions ∂
^
l
A∂θk,∂2
^
l
A∂θj∂θk and expected ∂2
^
l
A∂θj∂θk for j,k=1,...,K−1 are identical to their restricted model counterparts.

Estimating equations for alternative model regression parameters are given by

∂
^
l
A∂β(k)t=nΣi=1−wi∂γi,k∂ηi,k(yi,kπi,k−yi,k+1πi,k+1)xi,t=0,k=1,...,K−1,t=1,...,p

Derivatives of the estimated scores for the alternative model are given by:

∂2
^
l
A∂θj∂β(k)t=nΣi=1fi,j,k,t and ∂2
^
l
A∂β(j)u∂β(k)t=−mΣi=1fi,j,k,txi,u,j,k=1,...K−1,t,u=1,...,p

where

fi,j,k,t=
−wi[δjk∂2γi,k∂η2i,kπi,k−∂γi,k∂ηi,k(δjk∂γi,k∂ηi,k−δjk−1∂γi,k−1∂ηi,k−1)]yi,kπ2i,kxi,t+
wi[δjk∂2γi,k∂η2i,kπi,k+1−∂γi,k∂ηi,k(δjk+1∂γi,k+1∂ηi,k+1−δjk∂γi,k∂ηi,k)]yi,k+1π2i,k+1xi,t,
i=1,...m,j,k=1,...K−1,t=1,...,p

Expected derivatives of the estimated scores for alternative model are given by the following expressions:

∂2
^
l
A∂θj∂β(k)t=nΣi=1ei,j,k,t and ∂2
^
l
A∂β(j)u∂β(k)t=−mΣi=1ei,j,k,txi,u,j,k=1,...K−1,t,u=1,...,p

where

ei,j,k,t=
wi[(δjk∂γi,k∂ηi,k−δjk−1∂γi,k−1∂ηi,k−1)1πi,k−(δjk+1∂γi,k+1∂ηi,k+1−δjk∂γi,k∂ηi,k)1πi,k+1]∂γi,k∂ηi,kxi,t

i=1,...m,j,k=1,...K−1,t=1,...,p

Initial values for threshold and regression parameters in the alternative model are taken as the final estimated parameters in the restricted model.

Solution of the alternative model
^
B
A is provided as an optional output.

Related Topics

Test of Parallel Lines Assumption (complex samples ordinal regression algorithms)


Predicted Values (complex samples ordinal regression algorithms)

complex samples ordinal regression algorithms,complex samples ordinal regression algorithms,complex samples ordinal regression algorithms
predicted values,predicted values,predicted values

For a predictor design vector xi and estimated parameters (
^
θ
,
^
β
), the predicted probability for each response category is denoted by
^
π
ik,i,k,k=1,...K. The predicted category c(xi) is the one with the highest predicted probability; that is,

c(xi)=arg
max
k
^
π
i,k

If there is a tie in determining c(xi), choose the category with

1. higher
^
N
k=nΣi=1wiyik

2. If there is still a tie, choose the one with higher nk=nΣi=1yik

3. If there is still a tie, choose the one with lower category number.

Related Topics

CSORDINAL Algorithms
Notation (complex samples ordinal regression algorithms)
Weights (complex samples ordinal regression algorithms)
Cumulative Link Model (complex samples ordinal regression algorithms)
Estimation (complex samples ordinal regression algorithms)
Variance estimates (complex samples ordinal regression algorithms)
Subpopulation estimates (complex samples ordinal regression algorithms)
Standard Errors (complex samples ordinal regression algorithms)
Degrees of Freedom (complex samples ordinal regression algorithms)
Confidence Intervals (complex samples ordinal regression algorithms)
t Tests (complex samples ordinal regression algorithms)
Design Effects (complex samples ordinal regression algorithms)
Pseudo -2 Log Likelihood (complex samples ordinal regression algorithms)
Pseudo R Squares (complex samples ordinal regression algorithms)
Hypothesis Testing (complex samples ordinal regression algorithms)
Test of Parallel Lines Assumption (complex samples ordinal regression algorithms)
Cumulative odds ratios (complex samples ordinal regression algorithms)
References (complex samples ordinal regression algorithms)
Classification table (complex samples ordinal regression algorithms)
Predictions for new or incomplete records (complex samples ordinal regression algorithms)


Classification table (complex samples ordinal regression algorithms)

A two-way classification table is constructed with (k,l)th element, k,l=1,...,K, being the sum of weights wi for the sample elements i whose actual response category is k and predicted response category is l respectively.

Related Topics

Predicted Values (complex samples ordinal regression algorithms)
Predictions for new or incomplete records (complex samples ordinal regression algorithms)


Predictions for new or incomplete records (complex samples ordinal regression algorithms)

Predicted probabilities and category are also computed for the records not used in the analysis, but having non-missing values for all the model predictors and subpopulation variable if any. An additional requirement is that given predictor values could be properly parametrized by using only the existing model parameters.

Related Topics

Predicted Values (complex samples ordinal regression algorithms)
Classification table (complex samples ordinal regression algorithms)


Cumulative odds ratios (complex samples ordinal regression algorithms)

complex samples ordinal regression algorithms,complex samples ordinal regression algorithms,complex samples ordinal regression algorithms
odds ratios,odds ratios,odds ratios

Given user specified design vectors x1 and x2, the ratio of cumulative odds at x1 to cumulative odds at x2 is computed for cumulative logistic link. For response category k=1,...,K−1

or(x1,x2)=P(Y≤k|x1)/P(Y>k|x1)P(Y≤k|x2)/P(Y>k|x2)=exp(−β´(x1−x2))

Notice that cumulative odds for this particular link do not depend on the response category k. Because of this property, ordinal response model with cumulative logistic link is also called a proportional odds model.

A level 1−α confidence interval for or(x1,x2) is given by

exp[
^
C
±SE(
^
C
)tdf(1−α/2)]

where

^
C
=−
^
β
´(x1−x2)

and

SE(
^
C
)=
√ (x1−x2)´Var(
^
β
)(x1−x2)

Given a factor we compute odds ratios for all its categories relative to the reference category. If a covariate is specified, we compute odds ratios for its unit change. Other factors are held fixed at their respective reference categories, while other covariates are held fixed at their mean values, unless requested differently by the user.

Related Topics

CSORDINAL Algorithms
Notation (complex samples ordinal regression algorithms)
Weights (complex samples ordinal regression algorithms)
Cumulative Link Model (complex samples ordinal regression algorithms)
Estimation (complex samples ordinal regression algorithms)
Variance estimates (complex samples ordinal regression algorithms)
Subpopulation estimates (complex samples ordinal regression algorithms)
Standard Errors (complex samples ordinal regression algorithms)
Degrees of Freedom (complex samples ordinal regression algorithms)
Confidence Intervals (complex samples ordinal regression algorithms)
t Tests (complex samples ordinal regression algorithms)
Design Effects (complex samples ordinal regression algorithms)
Pseudo -2 Log Likelihood (complex samples ordinal regression algorithms)
Pseudo R Squares (complex samples ordinal regression algorithms)
Hypothesis Testing (complex samples ordinal regression algorithms)
Test of Parallel Lines Assumption (complex samples ordinal regression algorithms)
Predicted Values (complex samples ordinal regression algorithms)
References (complex samples ordinal regression algorithms)


References (complex samples ordinal regression algorithms)

complex samples ordinal regression algorithms,complex samples ordinal regression algorithms,complex samples ordinal regression algorithms
references,references,references

Agresti, A. 2002. Categorical Data Analysis, 2nd ed. New York: John Wiley and Sons.

Binder, D. A. 1983. On the variances of asymptotically normal estimators from complex surveys. International Statistical Review, 51, 279-292.

Kish, L. 1965. Survey Sampling. New York: John Wiley and Sons.

Kish, L. 1995. Methods for Design Effects. Journal of Official Statistics, 11, 119-127.

McCullagh, P. 1980. Regression Models for Ordinal Data. Journal of the Royal Statistical Society B, 42:2, 109-142.

Peterson, B., and F. Harrell. 1990. Partial proportional odds models for ordinal response variables. Applied Statistics, 39, 205-217.

Särndal, C., B. Swensson, and J. Wretman. 1992. Model Assisted Survey Sampling. New York: Springer-Verlag.

Related Topics

CSORDINAL Algorithms
Notation (complex samples ordinal regression algorithms)
Weights (complex samples ordinal regression algorithms)
Cumulative Link Model (complex samples ordinal regression algorithms)
Estimation (complex samples ordinal regression algorithms)
Variance estimates (complex samples ordinal regression algorithms)
Subpopulation estimates (complex samples ordinal regression algorithms)
Standard Errors (complex samples ordinal regression algorithms)
Degrees of Freedom (complex samples ordinal regression algorithms)
Confidence Intervals (complex samples ordinal regression algorithms)
t Tests (complex samples ordinal regression algorithms)
Design Effects (complex samples ordinal regression algorithms)
Pseudo -2 Log Likelihood (complex samples ordinal regression algorithms)
Pseudo R Squares (complex samples ordinal regression algorithms)
Hypothesis Testing (complex samples ordinal regression algorithms)
Test of Parallel Lines Assumption (complex samples ordinal regression algorithms)
Predicted Values (complex samples ordinal regression algorithms)
Cumulative odds ratios (complex samples ordinal regression algorithms)


CSSELECT Algorithms

CSSELECT (command),CSSELECT (command),CSSELECT (command)
algorithms,algorithms,algorithms
Sampling Wizard,Sampling Wizard,Sampling Wizard
algorithms,algorithms,algorithms
complex samples selection algorithms,complex samples selection algorithms,complex samples selection algorithms

This document describes the algorithm used by CSSELECT to draw samples according to complex designs. The data file does not have to be sorted. Population units can appear more than once in the data file and they do not have to be in a consecutive block of cases.

Related Topics

Notation (complex samples selection algorithms)
Stratification (complex samples selection algorithms)
Simple Random Sampling (complex samples selection algorithms)
Unrestricted Random Sampling (complex samples selection algorithms)
Systematic Sampling (complex samples selection algorithms)
Sequential Sampling (Chromy) (complex samples selection algorithms)
PPS Sampling without Replacement (Hanurav & Vijayan) (complex samples selection algorithms)
PPS Sampling with Replacement (complex samples selection algorithms)
PPS Systematic Sampling (complex samples selection algorithms)
PPS Sequential Sampling (Chromy) (complex samples selection algorithms)
PPS Sampford's Method (complex samples selection algorithms)
PPS Brewer's Method (n=2) (complex samples selection algorithms)
PPS Murthy's Method (n=2) (complex samples selection algorithms)
Saved Variables (complex samples selection algorithms)
References (complex samples selection algorithms)


Notation (complex samples selection algorithms)

complex samples selection algorithms,complex samples selection algorithms,complex samples selection algorithms
notation,notation,notation

The following notation is used throughout this chapter unless otherwise stated:

N | Population size
n | Sample size
f | Sampling fraction
hi | Hit counts of ith population unit (i=1,...,N).
Mi | Size measure of ith population unit (i=1,...,N).
M | Total size. M=NΣi=1Mi
pi | pi=MiM is the relative size of ith population unit (i=1,...,N)

Related Topics

CSSELECT Algorithms
Stratification (complex samples selection algorithms)
Simple Random Sampling (complex samples selection algorithms)
Unrestricted Random Sampling (complex samples selection algorithms)
Systematic Sampling (complex samples selection algorithms)
Sequential Sampling (Chromy) (complex samples selection algorithms)
PPS Sampling without Replacement (Hanurav & Vijayan) (complex samples selection algorithms)
PPS Sampling with Replacement (complex samples selection algorithms)
PPS Systematic Sampling (complex samples selection algorithms)
PPS Sequential Sampling (Chromy) (complex samples selection algorithms)
PPS Sampford's Method (complex samples selection algorithms)
PPS Brewer's Method (n=2) (complex samples selection algorithms)
PPS Murthy's Method (n=2) (complex samples selection algorithms)
Saved Variables (complex samples selection algorithms)
References (complex samples selection algorithms)


Stratification (complex samples selection algorithms)

complex samples selection algorithms,complex samples selection algorithms,complex samples selection algorithms
stratification,stratification,stratification

Stratification partitions the sampling frame into disjoint sets. Sampling is carried out independently within each stratum. Therefore, without loss of generality, the algorithm described in this document only considers sampling from one population.

In the first stage of selection, the sampling frame is partitioned by the stratification variables specified in stage 1. In the second stage, the sampling frame is stratified by first-stage strata and cluster variables as well as strata variables specified in stage 2. If sampling with replacement is used in the first stage, the first-stage duplication index is also one of the stratification variables. Stratification of the third stage continues in a like manner.

Related Topics

CSSELECT Algorithms
Notation (complex samples selection algorithms)
Simple Random Sampling (complex samples selection algorithms)
Unrestricted Random Sampling (complex samples selection algorithms)
Systematic Sampling (complex samples selection algorithms)
Sequential Sampling (Chromy) (complex samples selection algorithms)
PPS Sampling without Replacement (Hanurav & Vijayan) (complex samples selection algorithms)
PPS Sampling with Replacement (complex samples selection algorithms)
PPS Systematic Sampling (complex samples selection algorithms)
PPS Sequential Sampling (Chromy) (complex samples selection algorithms)
PPS Sampford's Method (complex samples selection algorithms)
PPS Brewer's Method (n=2) (complex samples selection algorithms)
PPS Murthy's Method (n=2) (complex samples selection algorithms)
Saved Variables (complex samples selection algorithms)
References (complex samples selection algorithms)
Population Size (complex samples selection algorithms)
Sample Size (complex samples selection algorithms)


Population Size (complex samples selection algorithms)

Sampling units in a population are identified by all unique level combinations of cluster variables within a stratum. Therefore, the population size N of a stratum is equal to the number of unique level combinations of the cluster variables within a stratum. When a sampling unit is selected, all cases having the same sampling unit identifier are included in the sample. If no cluster variable is defined, each case is a sampling unit.

Related Topics

Stratification (complex samples selection algorithms)
Sample Size (complex samples selection algorithms)


Sample Size (complex samples selection algorithms)

CSSELECT uses a fixed sample size approach in selecting samples. If the sample size is supplied by the user, it should satisfy 0≤n≤N for any without replacement design and n≥0 for any with replacement design.

If a sampling fraction f is specified, it should satisfy 0<f≤1 for any without replacement design and f>0 for any with replacement design. The actual sample size is determined by the formula n=round(f*N). When the option RATEMINSIZE is specified, a sample size less than RATEMINSIZE is raised to RATEMINSIZE. Likewise, a sample size exceeding RATEMAXSIZE is lowered to RATEMAXSIZE.

Related Topics

Stratification (complex samples selection algorithms)
Population Size (complex samples selection algorithms)


Simple Random Sampling (complex samples selection algorithms)

complex samples selection algorithms,complex samples selection algorithms,complex samples selection algorithms
simple random sampling,simple random sampling,simple random sampling

This algorithm selects n distinct units out of N population units with equal probability; see Fan, Muller & Rezucha (1962) for more information.

• Inclusion probability of ith unit = n/N

• Sampling weight of ith = N/n

Related Topics

CSSELECT Algorithms
Notation (complex samples selection algorithms)
Stratification (complex samples selection algorithms)
Unrestricted Random Sampling (complex samples selection algorithms)
Systematic Sampling (complex samples selection algorithms)
Sequential Sampling (Chromy) (complex samples selection algorithms)
PPS Sampling without Replacement (Hanurav & Vijayan) (complex samples selection algorithms)
PPS Sampling with Replacement (complex samples selection algorithms)
PPS Systematic Sampling (complex samples selection algorithms)
PPS Sequential Sampling (Chromy) (complex samples selection algorithms)
PPS Sampford's Method (complex samples selection algorithms)
PPS Brewer's Method (n=2) (complex samples selection algorithms)
PPS Murthy's Method (n=2) (complex samples selection algorithms)
Saved Variables (complex samples selection algorithms)
References (complex samples selection algorithms)
Algorithm (complex samples selection algorithms)


Algorithm (complex samples selection algorithms)

1. If f is supplied, compute n=round(f*N).

2. Set k=0, i=0 and start data scan.

3. Get a population unit and set k=k+1. If no more population units are left, terminate.

4. Test if kth unit should go into the sample.

Generate a uniform (0,1) random number U.

If (n−i)/(N−k+1)>U, kth population unit is selected and set i=i+1.

If i=n, terminate. Otherwise, go to step 3.

Related Topics

Simple Random Sampling (complex samples selection algorithms)


Unrestricted Random Sampling (complex samples selection algorithms)

complex samples selection algorithms,complex samples selection algorithms,complex samples selection algorithms
unrestricted random sampling,unrestricted random sampling,unrestricted random sampling

This algorithm selects n units out of N population units with equal probability and with replacement.

• Inclusion probability of ith unit = 1−(1−1/N)n

• Sampling weight of ith = N/n. (For use with Hansen-Hurwitz(1943) estimator)

• Expected number of hits of ith = n/N

Related Topics

CSSELECT Algorithms
Notation (complex samples selection algorithms)
Stratification (complex samples selection algorithms)
Simple Random Sampling (complex samples selection algorithms)
Systematic Sampling (complex samples selection algorithms)
Sequential Sampling (Chromy) (complex samples selection algorithms)
PPS Sampling without Replacement (Hanurav & Vijayan) (complex samples selection algorithms)
PPS Sampling with Replacement (complex samples selection algorithms)
PPS Systematic Sampling (complex samples selection algorithms)
PPS Sequential Sampling (Chromy) (complex samples selection algorithms)
PPS Sampford's Method (complex samples selection algorithms)
PPS Brewer's Method (n=2) (complex samples selection algorithms)
PPS Murthy's Method (n=2) (complex samples selection algorithms)
Saved Variables (complex samples selection algorithms)
References (complex samples selection algorithms)
Algorithm (complex samples selection algorithms)


Algorithm (complex samples selection algorithms)

1. Set i=0 and initialize all hit counts to zero.

2. Generate an integer k between 1 and N uniformly.

3. Increase hit count of kth population unit by 1.

4. Set i=i+1.

5. If i=n, then terminate. Otherwise go to step 2.

At the end of the procedure, population units with hit count greater than zero are selected.

Related Topics

Unrestricted Random Sampling (complex samples selection algorithms)


Systematic Sampling (complex samples selection algorithms)

complex samples selection algorithms,complex samples selection algorithms,complex samples selection algorithms
systematic sampling,systematic sampling,systematic sampling

This algorithm selects n distinct units out of N population units. If the selection interval (N/n) is not an integer, an exact fractional selection interval is used.

• Inclusion probability of a unit = n/N

• Sampling weight = N/n

Related Topics

CSSELECT Algorithms
Notation (complex samples selection algorithms)
Stratification (complex samples selection algorithms)
Simple Random Sampling (complex samples selection algorithms)
Unrestricted Random Sampling (complex samples selection algorithms)
Sequential Sampling (Chromy) (complex samples selection algorithms)
PPS Sampling without Replacement (Hanurav & Vijayan) (complex samples selection algorithms)
PPS Sampling with Replacement (complex samples selection algorithms)
PPS Systematic Sampling (complex samples selection algorithms)
PPS Sequential Sampling (Chromy) (complex samples selection algorithms)
PPS Sampford's Method (complex samples selection algorithms)
PPS Brewer's Method (n=2) (complex samples selection algorithms)
PPS Murthy's Method (n=2) (complex samples selection algorithms)
Saved Variables (complex samples selection algorithms)
References (complex samples selection algorithms)
Algorithm (complex samples selection algorithms)


Algorithm (complex samples selection algorithms)

1. Draw a uniform (0,1) random number U.

2. Population units with indices {i: i=trunc((U+k)*N/n)+1, k=0,...,n−1} are included in the sample.

Related Topics

Systematic Sampling (complex samples selection algorithms)


Sequential Sampling (Chromy) (complex samples selection algorithms)

complex samples selection algorithms,complex samples selection algorithms,complex samples selection algorithms
sequential sampling,sequential sampling,sequential sampling

See the section on PPS sequential sampling. This algorithm is a special case of PPS Chromy with all size measures Mi equal.

Related Topics

CSSELECT Algorithms
Notation (complex samples selection algorithms)
Stratification (complex samples selection algorithms)
Simple Random Sampling (complex samples selection algorithms)
Unrestricted Random Sampling (complex samples selection algorithms)
Systematic Sampling (complex samples selection algorithms)
PPS Sampling without Replacement (Hanurav & Vijayan) (complex samples selection algorithms)
PPS Sampling with Replacement (complex samples selection algorithms)
PPS Systematic Sampling (complex samples selection algorithms)
PPS Sequential Sampling (Chromy) (complex samples selection algorithms)
PPS Sampford's Method (complex samples selection algorithms)
PPS Brewer's Method (n=2) (complex samples selection algorithms)
PPS Murthy's Method (n=2) (complex samples selection algorithms)
Saved Variables (complex samples selection algorithms)
References (complex samples selection algorithms)


PPS Sampling without Replacement (Hanurav & Vijayan) (complex samples selection algorithms)

complex samples selection algorithms,complex samples selection algorithms,complex samples selection algorithms
PPS sampling,PPS sampling,PPS sampling

This algorithm selects n distinct units out of N population units with probability proportional to size without replacement. This method is first proposed by Hanurav (1967) and extended by Vijayan (1968) to the case of n>2.

• Inclusion probability of ith unit = npi

• Sampling weight of ith unit = 1npi

• Special requirement: maxMi≤Mn

Related Topics

CSSELECT Algorithms
Notation (complex samples selection algorithms)
Stratification (complex samples selection algorithms)
Simple Random Sampling (complex samples selection algorithms)
Unrestricted Random Sampling (complex samples selection algorithms)
Systematic Sampling (complex samples selection algorithms)
Sequential Sampling (Chromy) (complex samples selection algorithms)
PPS Sampling with Replacement (complex samples selection algorithms)
PPS Systematic Sampling (complex samples selection algorithms)
PPS Sequential Sampling (Chromy) (complex samples selection algorithms)
PPS Sampford's Method (complex samples selection algorithms)
PPS Brewer's Method (n=2) (complex samples selection algorithms)
PPS Murthy's Method (n=2) (complex samples selection algorithms)
Saved Variables (complex samples selection algorithms)
References (complex samples selection algorithms)
Algorithm (Case 1) (complex samples selection algorithms)
Joint Inclusion Probabilities (Case 1) (complex samples selection algorithms)
Algorithm (Case 2) (complex samples selection algorithms)
Joint Inclusion Probabilities (Case 2) (complex samples selection algorithms)


Algorithm (Case 1) (complex samples selection algorithms)

This algorithm assumes that the population units are sorted by Mi; that is, M1≤M2≤...≤MN with the additional assumption that MN−n+1<MN.

1. Compute the probabilities θj=n(pN−n+j+1−pN−n+j)(S+jpN−n+1)S, j=1,...,n, where S=N−nΣk=1pk.

2. Select one integer from 1,...,n with probability proportional to θj.

3. If the integer selected is i, then the last (n−i) population units are selected.

4. Define a new set of probabilities for the first (N−n+i) population units.

p*j=pjS+ipN−n+1,   1≤j≤N−n+1
=pN−n+1S+ipN−n+1,   N−n+1<j≤N−n+i

5. Define Pj=Mj(Mj+1+...+MN−n+i),   j=1,...,N−n+i−1

6. Set m=1 and select one unit from the first (N−n+1) population units with probability proportional to

a1=ip*1
aj=np*jj−1∏k=1[1−(i−1)Pk],   j=2,...,N−n+1

7. Denote the index of the selected unit by jm.

8. Set m=m+1 and select one unit from the (jm−1+1)th to (N−n+m)th population units with the following revised probabilities

ajm−1+1=(i−m+1)p*jm−1+1
aj=(i−m+1)p*jj−1∏k=jm−1+1[1−(i−m)Pk],   j=jm−1+2,...,N−n+m

9. Denote the selected unit in step 8 by jm.

10. If m=i, terminate. Otherwise, go to step 8. At the end of the algorithm, the last (n−i) units and units with indices j1,...,ji are selected.

Related Topics

PPS Sampling without Replacement (Hanurav & Vijayan) (complex samples selection algorithms)
Joint Inclusion Probabilities (Case 1) (complex samples selection algorithms)
Algorithm (Case 2) (complex samples selection algorithms)
Joint Inclusion Probabilities (Case 2) (complex samples selection algorithms)


Joint Inclusion Probabilities (Case 1) (complex samples selection algorithms)

The joint inclusion probabilities of unit i and unit j in the population (1≤i<j≤N) is given by

πij=nΣr=1θrK(r)ij

where

K(r)ij={
1 | if N−1≥i>N−n+r,
rpN−n+1S+rpN−n+1 | if N−n+r≥i>N−n and j>N−n+r,
rpiS+rpN−n+1 | if N−n≥i>0 and j>N−n+r,
π(r)ij | if j≤N−n+r.

π(r)ij's are the conditional joint inclusion probabilities given that the last (n−r) units are selected at step 3. They can be computed by the following formula

π(r)ij=r(r−1)(1−P(r)1)...(1−P(r)i−1)P(r)ip(r)j

where

p(r)k={
pkS+rpN−n+1 | if k≤N−n+1
pN−n+1S+rpN−n+1 | if N−n+1<k≤N−n+r

and

P(r)k=p(r)k(p(r)k+1+...+p(r)N−n+r)

Note: There is a typo in (3.5) of Vijayan(1967) and (3.3) of Fox(1989). The factor (1/2) should not be there. See also Golmant (1990) and Watts (1991) for other corrections.

Related Topics

PPS Sampling without Replacement (Hanurav & Vijayan) (complex samples selection algorithms)
Algorithm (Case 1) (complex samples selection algorithms)
Algorithm (Case 2) (complex samples selection algorithms)
Joint Inclusion Probabilities (Case 2) (complex samples selection algorithms)


Algorithm (Case 2) (complex samples selection algorithms)

This algorithm assumes that the population units are sorted by Mi with the order M1≤M2≤...≤MN and the additional assumption MN−n+1=MN.

1. Define the probabilities

Pj=Mj(Mj+1+...+MN),   j=1,...,N−1

2. Select one unit from the first (N−n+1) population units with probability proportional to

a1=np1
aj=npjj−1∏k=1[1−(n−1)Pk],   j=2,...,N−n+1

3. Set m=1 and denote the index of the selected unit by jm.

4. Set m=m+1.

5. Select one unit from the (jm−1+1)th to the (N−n+m)th population unit with probability proportional to

ajm−1+1=(n−m+1)pjm−1+1
aj=(n−m+1)pjj−1∏k=jm−1+1[1−(n−m)Pk],   j=jm−1+2,...,N−n+m

6. Denote the index of the unit selected in step 5 by jm.

7. If m=n, terminate. Otherwise, go to step 4.

At the end of the algorithm, population units with indices j1,...,jn are selected.

Related Topics

PPS Sampling without Replacement (Hanurav & Vijayan) (complex samples selection algorithms)
Algorithm (Case 1) (complex samples selection algorithms)
Joint Inclusion Probabilities (Case 1) (complex samples selection algorithms)
Joint Inclusion Probabilities (Case 2) (complex samples selection algorithms)


Joint Inclusion Probabilities (Case 2) (complex samples selection algorithms)

Joint inclusion probabilities πij of unit i and unit j in the population (1≤i<j≤N) are given by πij=n(n−1)(1−P1)...(1−Pi−1)Pipj.

Related Topics

PPS Sampling without Replacement (Hanurav & Vijayan) (complex samples selection algorithms)
Algorithm (Case 1) (complex samples selection algorithms)
Joint Inclusion Probabilities (Case 1) (complex samples selection algorithms)
Algorithm (Case 2) (complex samples selection algorithms)


PPS Sampling with Replacement (complex samples selection algorithms)

complex samples selection algorithms,complex samples selection algorithms,complex samples selection algorithms
PPS sampling,PPS sampling,PPS sampling

This algorithm selects n units out of N population units with probability proportional to size and with replacement. Any units may be sampled more than once.

• Inclusion probability of ith unit = 1 − (1 − p i ) n

• Sampling weight of ith unit = 1 np i . (For use with Hansen-Hurwitz(1943) estimator)

• Expected number of hits of ith unit = npi

Related Topics

CSSELECT Algorithms
Notation (complex samples selection algorithms)
Stratification (complex samples selection algorithms)
Simple Random Sampling (complex samples selection algorithms)
Unrestricted Random Sampling (complex samples selection algorithms)
Systematic Sampling (complex samples selection algorithms)
Sequential Sampling (Chromy) (complex samples selection algorithms)
PPS Sampling without Replacement (Hanurav & Vijayan) (complex samples selection algorithms)
PPS Systematic Sampling (complex samples selection algorithms)
PPS Sequential Sampling (Chromy) (complex samples selection algorithms)
PPS Sampford's Method (complex samples selection algorithms)
PPS Brewer's Method (n=2) (complex samples selection algorithms)
PPS Murthy's Method (n=2) (complex samples selection algorithms)
Saved Variables (complex samples selection algorithms)
References (complex samples selection algorithms)
Algorithm (complex samples selection algorithms)


Algorithm (complex samples selection algorithms)

1. Compute total size M=NΣi=1Mi.

2. Generate n uniform (0,M) random numbers U1,...,Un.

3. Compute hit counts of ith population unit hi= card {Uj:M*i−1<Uj≤M*i,j=1,...,n}, where card{} is the number of elements in the set, M0=0, and M*i=iΣk=1Mk.

At the end of the algorithm, population units with hit count mi>0 are selected.

Related Topics

PPS Sampling with Replacement (complex samples selection algorithms)


PPS Systematic Sampling (complex samples selection algorithms)

complex samples selection algorithms,complex samples selection algorithms,complex samples selection algorithms
PPS systematic sampling,PPS systematic sampling,PPS systematic sampling

This algorithm selects n units out of N population units with probability proportional to size. If the size of the ith unit Mi is greater than the selection interval, the ith unit is sampled more than once.

• Inclusion probability of ith unit = npi

• Sampling weight of ith unit = 1npi

• Expected number of hits of ith unit = npi. In order to ensure no duplicates in the sample, the condition maxMi≤Mn is required.

Related Topics

CSSELECT Algorithms
Notation (complex samples selection algorithms)
Stratification (complex samples selection algorithms)
Simple Random Sampling (complex samples selection algorithms)
Unrestricted Random Sampling (complex samples selection algorithms)
Systematic Sampling (complex samples selection algorithms)
Sequential Sampling (Chromy) (complex samples selection algorithms)
PPS Sampling without Replacement (Hanurav & Vijayan) (complex samples selection algorithms)
PPS Sampling with Replacement (complex samples selection algorithms)
PPS Sequential Sampling (Chromy) (complex samples selection algorithms)
PPS Sampford's Method (complex samples selection algorithms)
PPS Brewer's Method (n=2) (complex samples selection algorithms)
PPS Murthy's Method (n=2) (complex samples selection algorithms)
Saved Variables (complex samples selection algorithms)
References (complex samples selection algorithms)
Algorithm (complex samples selection algorithms)


Algorithm (complex samples selection algorithms)

1. Compute cumulated sizes M*i=iΣk=1Mk.

2. Compute the selection interval I=M/n.

3. Generate a random number S from uniform(0,I).

4. Generate the sequence {Sj:Sj=S+(j−1)I, j=1,...,n}.

5. Compute hit counts of ith population unit hi= card {M*i−1<Sj≤M*i,j=1,...,n}, k=1,...,N, where card{} is the number of elements in the set.

At the end of the algorithm, population with hit counts hi>0 are selected.

Related Topics

PPS Systematic Sampling (complex samples selection algorithms)


PPS Sequential Sampling (Chromy) (complex samples selection algorithms)

complex samples selection algorithms,complex samples selection algorithms,complex samples selection algorithms
PPS sequential sampling,PPS sequential sampling,PPS sequential sampling

This algorithm selects n units from N population units sequentially proportional to size with minimum replacement. This method is proposed by Chromy (1979).

• Inclusion probability of ith unit = npi

• Sampling weight of ith unit = 1npi

• Maximum number of hits of ith unit = trunc(npi)+1

• Applying the restriction maxMi≤Mnensures maximum number of hits is equal to 1.

Related Topics

CSSELECT Algorithms
Notation (complex samples selection algorithms)
Stratification (complex samples selection algorithms)
Simple Random Sampling (complex samples selection algorithms)
Unrestricted Random Sampling (complex samples selection algorithms)
Systematic Sampling (complex samples selection algorithms)
Sequential Sampling (Chromy) (complex samples selection algorithms)
PPS Sampling without Replacement (Hanurav & Vijayan) (complex samples selection algorithms)
PPS Sampling with Replacement (complex samples selection algorithms)
PPS Systematic Sampling (complex samples selection algorithms)
PPS Sampford's Method (complex samples selection algorithms)
PPS Brewer's Method (n=2) (complex samples selection algorithms)
PPS Murthy's Method (n=2) (complex samples selection algorithms)
Saved Variables (complex samples selection algorithms)
References (complex samples selection algorithms)
Algorithm (complex samples selection algorithms)


Algorithm (complex samples selection algorithms)

1. Select one unit from the population proportional to its size Mi. The selected unit receives a label 1. Then assign labels sequentially to the remaining units. If the end of the list is encountered, loop back to the beginning of the list until all N units are labeled. These labels are the index i in the subsequent steps.

2. Compute the integer part of expected hit counts Ii=trunc(M*i), where M*i=iΣk=1Mk, i=1,...,N.

3. Compute the fractional part of expected hit counts Fi=M*i−Ii, i=1,...,N.

4. Define I0=0, F0=0 and T0=0.

5. Set i=1.

6. If Ti−1=Ii−1, go to step 8.

7. If Ti−1=Ii−1+1, go to step 9.

8. Determine accumulated hits at ith step (case 1).

Set Ti=Ii.

If Fi>Fi−1, set Ti=Ti+1 with probability (Fi−Fi−1)/(1−Fi−1).

Set i=i+1.

If i > N, terminate. Otherwise go to step 6.

9. Determine accumulated hits at ith step (case 2).

Set Ti=Ii.

If Fi>Fi−1, set Ti=Ti+1.

If Fi−1≥Fi, set Ti=Ti+1 with probability Fi/Fi−1.

Set i=i+1.

If i > N, terminate. Otherwise go to step 6.

At the end of the algorithm, number of hits of each unit can be computed by the formula hi=Ti−Ti−1, i=1,...,N. Units with mi>0 are selected.

Related Topics

PPS Sequential Sampling (Chromy) (complex samples selection algorithms)


PPS Sampford's Method (complex samples selection algorithms)

complex samples selection algorithms,complex samples selection algorithms,complex samples selection algorithms
PPS Sampford sampling,PPS Sampford sampling,PPS Sampford sampling

Sampford's (1967) method selects n units out of N population units without replacement and probabilities proportional to size.

• Inclusion probability of ith unit = npi

• Sampling weight of ith unit = 1npi

• Special requirement: maxMi<Mn

Related Topics

CSSELECT Algorithms
Notation (complex samples selection algorithms)
Stratification (complex samples selection algorithms)
Simple Random Sampling (complex samples selection algorithms)
Unrestricted Random Sampling (complex samples selection algorithms)
Systematic Sampling (complex samples selection algorithms)
Sequential Sampling (Chromy) (complex samples selection algorithms)
PPS Sampling without Replacement (Hanurav & Vijayan) (complex samples selection algorithms)
PPS Sampling with Replacement (complex samples selection algorithms)
PPS Systematic Sampling (complex samples selection algorithms)
PPS Sequential Sampling (Chromy) (complex samples selection algorithms)
PPS Brewer's Method (n=2) (complex samples selection algorithms)
PPS Murthy's Method (n=2) (complex samples selection algorithms)
Saved Variables (complex samples selection algorithms)
References (complex samples selection algorithms)
Algorithm (complex samples selection algorithms)
Joint Inclusion Probabilities (complex samples selection algorithms)


Algorithm (complex samples selection algorithms)

1. If maxMi<Mn, then go to step 2, otherwise go to step 5.

2. Select one unit with probability proportional to pi, i=1,...,N.

3. Select the remaining (n−1) units with probabilities proportional to pi1−npi, i=1,...,N.

4. If there are duplicates, reject the sample and go to step 2. Otherwise accept the selected units and stop.

5. If N=n and the Mi's are constant, then select all units in the population and set all sampling weights, 1st and 2nd order inclusion probabilities to 1.

Related Topics

PPS Sampford's Method (complex samples selection algorithms)
Joint Inclusion Probabilities (complex samples selection algorithms)


Joint Inclusion Probabilities (complex samples selection algorithms)

First define the following quantities:

λi=pi(1−npi), i=1,...,N

Rr=NΣk=1λrk, r=1,...,n

L0=L0,ij=1, i,j=1,...,N

Lm=1mmΣk=1(−1)k−1RkLm−k, m=1,...,n

Lm,ij=Lm−(λi+λj)Lm−1,ij−λiλjLm−2,ij, m=1,...,n, i,j=1,...,N

Kn=(nΣk=1kLn−knk)−1

Given the above quantities, the joint inclusion probability of the ith and jth population units is

πij=KnλiλjnΣk=2[k−n(pi+pj)]Ln−k,ijnk−2

Related Topics

PPS Sampford's Method (complex samples selection algorithms)
Algorithm (complex samples selection algorithms)


PPS Brewer's Method (n=2) (complex samples selection algorithms)

complex samples selection algorithms,complex samples selection algorithms,complex samples selection algorithms
PPS Brewer's sampling,PPS Brewer's sampling,PPS Brewer's sampling

Brewer's (1963) method is a special case of Sampford's method when n=2.

Related Topics

CSSELECT Algorithms
Notation (complex samples selection algorithms)
Stratification (complex samples selection algorithms)
Simple Random Sampling (complex samples selection algorithms)
Unrestricted Random Sampling (complex samples selection algorithms)
Systematic Sampling (complex samples selection algorithms)
Sequential Sampling (Chromy) (complex samples selection algorithms)
PPS Sampling without Replacement (Hanurav & Vijayan) (complex samples selection algorithms)
PPS Sampling with Replacement (complex samples selection algorithms)
PPS Systematic Sampling (complex samples selection algorithms)
PPS Sequential Sampling (Chromy) (complex samples selection algorithms)
PPS Sampford's Method (complex samples selection algorithms)
PPS Murthy's Method (n=2) (complex samples selection algorithms)
Saved Variables (complex samples selection algorithms)
References (complex samples selection algorithms)


PPS Murthy's Method (n=2) (complex samples selection algorithms)

complex samples selection algorithms,complex samples selection algorithms,complex samples selection algorithms
PPS Murthy's sampling,PPS Murthy's sampling,PPS Murthy's sampling

Murthy's (1957) method selects two units out of N population units with probabilities proportional to size without replacement.

• Inclusion probability of ith unit = pi(1−pi1−pi+NΣk=1pk1−pk)

• Sampling weight of ith unit = inverse of inclusion probability

Related Topics

CSSELECT Algorithms
Notation (complex samples selection algorithms)
Stratification (complex samples selection algorithms)
Simple Random Sampling (complex samples selection algorithms)
Unrestricted Random Sampling (complex samples selection algorithms)
Systematic Sampling (complex samples selection algorithms)
Sequential Sampling (Chromy) (complex samples selection algorithms)
PPS Sampling without Replacement (Hanurav & Vijayan) (complex samples selection algorithms)
PPS Sampling with Replacement (complex samples selection algorithms)
PPS Systematic Sampling (complex samples selection algorithms)
PPS Sequential Sampling (Chromy) (complex samples selection algorithms)
PPS Sampford's Method (complex samples selection algorithms)
PPS Brewer's Method (n=2) (complex samples selection algorithms)
Saved Variables (complex samples selection algorithms)
References (complex samples selection algorithms)
Algorithm (complex samples selection algorithms)
Joint Inclusion Probabilities (complex samples selection algorithms)


Algorithm (complex samples selection algorithms)

1. Select first unit from the population with probabilities pk, k=1,...,N.

2. If the first selected unit has index i, then select second unit with probabilities pk/(1−pi), k≠i.

Related Topics

PPS Murthy's Method (n=2) (complex samples selection algorithms)
Joint Inclusion Probabilities (complex samples selection algorithms)


Joint Inclusion Probabilities (complex samples selection algorithms)

The joint inclusion probability of population units i and j is given by

πij=pipj(2−pi−pj)/(1−pi)(1−pj)

Related Topics

PPS Murthy's Method (n=2) (complex samples selection algorithms)
Algorithm (complex samples selection algorithms)


Saved Variables (complex samples selection algorithms)

complex samples selection algorithms,complex samples selection algorithms,complex samples selection algorithms
saved variables,saved variables,saved variables

STAGEPOPSIZE saves the population sizes of each stratum in a given stage.

STAGESAMPSIZE saves the actual sample sizes of each stratum in a given stage. See the "Sample Size" section for details on sample size calculations.

STAGESAMPRATE saves the actual sampling rate of each stratum in a given stage. It is computed by dividing the actual sample size by the population size. Due to the use of rounding and application of RATEMINSIZE and RATEMAXSIZE on sample size, the resulting STAGESAMPRATE may be different from sampling rate specified by the user.

STAGEINCLPROB saves stage inclusion probabilities. These depend on the selection method. The formulae are given in the individual sections of each selection method.

STAGEWEIGHT saves the inverse of stage inclusion probabilities.

SAMPLEWEIGHT saves the product of previous weight (if specified) and all the stage weights.

STAGEHITS saves the number of times a unit is selected in a given stage. When a WOR method is used the value is always 0 or 1. When a WR method is used it can be any nonnegative integer.

SAMPLEHITS saves the number of times an ultimate sampling unit is selected. It is equal to STAGEHITS of the last specified stage.

STAGEINDEX saves an index variable used to differentiate duplicated sampling units resulted from sampling with replacement. STAGEINDEX ranges from one to number of hits of a selected unit.

Related Topics

CSSELECT Algorithms
Notation (complex samples selection algorithms)
Stratification (complex samples selection algorithms)
Simple Random Sampling (complex samples selection algorithms)
Unrestricted Random Sampling (complex samples selection algorithms)
Systematic Sampling (complex samples selection algorithms)
Sequential Sampling (Chromy) (complex samples selection algorithms)
PPS Sampling without Replacement (Hanurav & Vijayan) (complex samples selection algorithms)
PPS Sampling with Replacement (complex samples selection algorithms)
PPS Systematic Sampling (complex samples selection algorithms)
PPS Sequential Sampling (Chromy) (complex samples selection algorithms)
PPS Sampford's Method (complex samples selection algorithms)
PPS Brewer's Method (n=2) (complex samples selection algorithms)
PPS Murthy's Method (n=2) (complex samples selection algorithms)
References (complex samples selection algorithms)


References (complex samples selection algorithms)

complex samples selection algorithms,complex samples selection algorithms,complex samples selection algorithms
references,references,references

Brewer, K. W. R. 1963. A Model of Systematic Sampling with Unequal Probabilities. Australian Journal of Statistics, 5, 93-105.

Chromy, J. R. 1979. . Sequential Sample Selection Methods, , 401-406.

Fan, C. T., M. E. Muller, and I. Rezucha. 1962. Development of Sampling Plans by Using Sequential (Item by Item) Selection Techniques and Digital Computers. Journal of the American Statistical Association, 57, 387-402.

Fox, D. R. 1989. Computer Selection of Size-Biased Samples. The American Statistician, 43:3, 168-171.

Golmant, J. 1990. Correction: Computer Selection of Size-Biased Samples. The American Statistician, , 194-194.

Hanurav, T. V. 1967. Optimum Utilization of Auxiliary Information: PPS Sampling of Two Units from a Stratum. Journal of the Royal Statistical Society, Series B, 29, 374-391.

Hansen, M. H., and W. N. Hurwitz. 1943. On the theory of sampling from finite populations. Annals of Mathematical Statistics, 14, 333-362.

Murthy, M. N. 1957. Ordered and Unordered Estimators in Sampling Without Replacement. Sankhya, 18, 379-390.

Sampford, M. R. 1967. On Sampling without Replacement with Unequal Probabilities of Selection. Biometrika, 54, 499-513.

Vijayan, K. 1968. An Exact PPS Sampling Scheme: Generalization of a Method of Hanurav. Journal of the Royal Statistical Society, Series B, 54, 556-566.

Watts, D. L. 1991. Correction: Computer Selection of Size-Biased Samples. The American Statistician, 45:2, 172-172.

Related Topics

CSSELECT Algorithms
Notation (complex samples selection algorithms)
Stratification (complex samples selection algorithms)
Simple Random Sampling (complex samples selection algorithms)
Unrestricted Random Sampling (complex samples selection algorithms)
Systematic Sampling (complex samples selection algorithms)
Sequential Sampling (Chromy) (complex samples selection algorithms)
PPS Sampling without Replacement (Hanurav & Vijayan) (complex samples selection algorithms)
PPS Sampling with Replacement (complex samples selection algorithms)
PPS Systematic Sampling (complex samples selection algorithms)
PPS Sequential Sampling (Chromy) (complex samples selection algorithms)
PPS Sampford's Method (complex samples selection algorithms)
PPS Brewer's Method (n=2) (complex samples selection algorithms)
PPS Murthy's Method (n=2) (complex samples selection algorithms)
Saved Variables (complex samples selection algorithms)


CSTABULATE Algorithms

CSTABULATE (command),CSTABULATE (command),CSTABULATE (command)
algorithms,algorithms,algorithms
Complex Samples Frequencies,Complex Samples Frequencies,Complex Samples Frequencies
algorithms,algorithms,algorithms
Complex Samples Crosstabs,Complex Samples Crosstabs,Complex Samples Crosstabs
algorithms,algorithms,algorithms
complex samples tabulation algorithms,complex samples tabulation algorithms,complex samples tabulation algorithms

This document describes the algorithms used in the complex sampling estimation procedure CSTABULATE.

Complex sample data must contain both the values of the variables to be analyzed and the information on the current sampling design. The sampling design includes the sampling method, strata and clustering information, inclusion probabilities and the overall sampling weights.

The sampling design specification for CSTABULATE may include up to three stages of sampling. Any of the following general sampling methods may be assumed in the first stage: random sampling with replacement, random sampling without replacement and equal probabilities and random sampling without replacement and unequal probabilities. The first two sampling methods can also be specified for the second and the third sampling stage.

Related Topics

Notation (complex samples tabulation algorithms)
Weights (complex samples tabulation algorithms)
Z Expressions (complex samples tabulation algorithms)
Variable Total (complex samples tabulation algorithms)
Variables Total Covariance (complex samples tabulation algorithms)
Population Size Estimation (complex samples tabulation algorithms)
Cell Estimates: One-Way Tables (complex samples tabulation algorithms)
Cell Estimates: Two-Way Tables (complex samples tabulation algorithms)
Standard Errors (complex samples tabulation algorithms)
Coefficient of Variation (complex samples tabulation algorithms)
Confidence Limits (complex samples tabulation algorithms)
Design Effects (complex samples tabulation algorithms)
Tests of Independence for Two-Way Tables (complex samples tabulation algorithms)
Odds Ratios and Risks (complex samples tabulation algorithms)
Tests of Homogeneity for One-Way Tables (complex samples tabulation algorithms)
References (complex samples tabulation algorithms)


Notation (complex samples tabulation algorithms)

complex samples tabulation algorithms,complex samples tabulation algorithms,complex samples tabulation algorithms
notation,notation,notation

The following notation is used throughout this chapter unless otherwise stated:

H | Number of strata.
nh | Sampled number of primary sampling units (PSU) per stratum.
fh | Sampling rate per stratum.
mhi | Number of elements in the ith sampled unit in stratum h.
whij | Overall sampling weight for the jth element in the ith sampled unit in stratum h.
yhij | Value of variable y for the jth element in the ith sampled unit in stratum h.
Y | Population total sum for variable y.
n | Total number of elements in the sample.
N | Total number of elements in the population.

Related Topics

CSTABULATE Algorithms
Weights (complex samples tabulation algorithms)
Z Expressions (complex samples tabulation algorithms)
Variable Total (complex samples tabulation algorithms)
Variables Total Covariance (complex samples tabulation algorithms)
Population Size Estimation (complex samples tabulation algorithms)
Cell Estimates: One-Way Tables (complex samples tabulation algorithms)
Cell Estimates: Two-Way Tables (complex samples tabulation algorithms)
Standard Errors (complex samples tabulation algorithms)
Coefficient of Variation (complex samples tabulation algorithms)
Confidence Limits (complex samples tabulation algorithms)
Design Effects (complex samples tabulation algorithms)
Tests of Independence for Two-Way Tables (complex samples tabulation algorithms)
Odds Ratios and Risks (complex samples tabulation algorithms)
Tests of Homogeneity for One-Way Tables (complex samples tabulation algorithms)
References (complex samples tabulation algorithms)


Weights (complex samples tabulation algorithms)

complex samples tabulation algorithms,complex samples tabulation algorithms,complex samples tabulation algorithms
weights,weights,weights

Overall weights specified for each ultimate element are processed as given. See Weights (complex samples: covariance matrix of total algorithms) in Complex Samples: Covariance Matrix of Total for more information on weights and variance estimation methods.

Related Topics

CSTABULATE Algorithms
Notation (complex samples tabulation algorithms)
Z Expressions (complex samples tabulation algorithms)
Variable Total (complex samples tabulation algorithms)
Variables Total Covariance (complex samples tabulation algorithms)
Population Size Estimation (complex samples tabulation algorithms)
Cell Estimates: One-Way Tables (complex samples tabulation algorithms)
Cell Estimates: Two-Way Tables (complex samples tabulation algorithms)
Standard Errors (complex samples tabulation algorithms)
Coefficient of Variation (complex samples tabulation algorithms)
Confidence Limits (complex samples tabulation algorithms)
Design Effects (complex samples tabulation algorithms)
Tests of Independence for Two-Way Tables (complex samples tabulation algorithms)
Odds Ratios and Risks (complex samples tabulation algorithms)
Tests of Homogeneity for One-Way Tables (complex samples tabulation algorithms)
References (complex samples tabulation algorithms)


Z Expressions (complex samples tabulation algorithms)

For variables y and y´:

zhij=whijyhij, z´hij=whijy´hij

zhi=mhiΣj=1zhij, z´hi=mhiΣj=1z´hij

zh=1nhnhΣi=1zhi, z´h=1nhnhΣi=1z´hi

S2h(y,y´)=1nh−1nhΣi=1(zhi−zh)(z´hi−z´h)

For multi-stage samples, the index h denotes a stratum in the given stage, and i stands for unit from h in the same stage. The index j runs over all final stage elements contained in unit hi.

Related Topics

CSTABULATE Algorithms
Notation (complex samples tabulation algorithms)
Weights (complex samples tabulation algorithms)
Variable Total (complex samples tabulation algorithms)
Variables Total Covariance (complex samples tabulation algorithms)
Population Size Estimation (complex samples tabulation algorithms)
Cell Estimates: One-Way Tables (complex samples tabulation algorithms)
Cell Estimates: Two-Way Tables (complex samples tabulation algorithms)
Standard Errors (complex samples tabulation algorithms)
Coefficient of Variation (complex samples tabulation algorithms)
Confidence Limits (complex samples tabulation algorithms)
Design Effects (complex samples tabulation algorithms)
Tests of Independence for Two-Way Tables (complex samples tabulation algorithms)
Odds Ratios and Risks (complex samples tabulation algorithms)
Tests of Homogeneity for One-Way Tables (complex samples tabulation algorithms)
References (complex samples tabulation algorithms)


Variable Total (complex samples tabulation algorithms)

An estimate for the population total of variable y in a single-stage sample is the weighted sum over all the strata and all the clusters:

^
Y
=HΣh=1nhΣi=1mhiΣj=1whijyhij

Alternatively, we compute the weighted sum over all the elements in the sample:

^
Y
=nΣi=1wiyi

The latter expression is more general as it also applies to multi-stage samples.

Related Topics

CSTABULATE Algorithms
Notation (complex samples tabulation algorithms)
Weights (complex samples tabulation algorithms)
Z Expressions (complex samples tabulation algorithms)
Variables Total Covariance (complex samples tabulation algorithms)
Population Size Estimation (complex samples tabulation algorithms)
Cell Estimates: One-Way Tables (complex samples tabulation algorithms)
Cell Estimates: Two-Way Tables (complex samples tabulation algorithms)
Standard Errors (complex samples tabulation algorithms)
Coefficient of Variation (complex samples tabulation algorithms)
Confidence Limits (complex samples tabulation algorithms)
Design Effects (complex samples tabulation algorithms)
Tests of Independence for Two-Way Tables (complex samples tabulation algorithms)
Odds Ratios and Risks (complex samples tabulation algorithms)
Tests of Homogeneity for One-Way Tables (complex samples tabulation algorithms)
References (complex samples tabulation algorithms)


Variables Total Covariance (complex samples tabulation algorithms)

For a multi-stage sample containing a with replacement sampling stage, all specifications other than weights are ignored for the subsequent stages. They make no contribution to the variance estimates.

Related Topics

CSTABULATE Algorithms
Notation (complex samples tabulation algorithms)
Weights (complex samples tabulation algorithms)
Z Expressions (complex samples tabulation algorithms)
Variable Total (complex samples tabulation algorithms)
Population Size Estimation (complex samples tabulation algorithms)
Cell Estimates: One-Way Tables (complex samples tabulation algorithms)
Cell Estimates: Two-Way Tables (complex samples tabulation algorithms)
Standard Errors (complex samples tabulation algorithms)
Coefficient of Variation (complex samples tabulation algorithms)
Confidence Limits (complex samples tabulation algorithms)
Design Effects (complex samples tabulation algorithms)
Tests of Independence for Two-Way Tables (complex samples tabulation algorithms)
Odds Ratios and Risks (complex samples tabulation algorithms)
Tests of Homogeneity for One-Way Tables (complex samples tabulation algorithms)
References (complex samples tabulation algorithms)
Single Stage Sample (complex samples tabulation algorithms)
Two-stage Sample (complex samples tabulation algorithms)
Three-stage Sample (complex samples tabulation algorithms)
Variable Total Variance (complex samples tabulation algorithms)


Single Stage Sample (complex samples tabulation algorithms)

The covariance of the total for variables y and y´ in a single-stage sample is estimated by the following:

^
C
(
^
Y
,
^
Y
´)=
^
C
1(
^
Y
,
^
Y
´)=HΣh=1Uh(
^
Y
,
^
Y
´)

where Uh(
^
Y
,
^
Y
´) is an estimate contribution from stratum h and depends on the sampling method as follows:

• For sampling with replacement: Uh(
^
Y
,
^
Y
´)=nhS2h(y,y´)

• For simple random sampling: Uh(
^
Y
,
^
Y
´)=(1−fh)nhS2h(y,y´)

• For sampling without replacement and unequal probabilities: Uh(
^
Y
,
^
Y
´)=nhΣi=1nhΣi>j(πhiπhjπhij−1)(zhi−zhj)(z´hi−z´hj)

πhi and πhj are the inclusion probabilities for units i and j in stratum h, and πhij is the joint inclusion probability for the same units. This estimator is due to Yates and Grundy (1953) and Sen (1953).

For each stratum h containing a single element, the covariance contribution Uh(
^
Y
,
^
Y
´) is always set to zero.

Related Topics

Variables Total Covariance (complex samples tabulation algorithms)
Two-stage Sample (complex samples tabulation algorithms)
Three-stage Sample (complex samples tabulation algorithms)
Variable Total Variance (complex samples tabulation algorithms)


Two-stage Sample (complex samples tabulation algorithms)

When the sample is obtained in two stages and sampling without replacement is applied in the first stage, we use the following estimate for the covariance of the total for variables y and y´:

^
C
(
^
Y
,
^
Y
´)=
^
C
2(
^
Y
,
^
Y
´)=
^
C
1(
^
Y
,
^
Y
´)+HΣh=1nhΣi=1πhiKhiΣk=1Uhik(
^
Y
,
^
Y
´)

where

πhi is the first stage inclusion probability for the primary sampling unit i in stratum h. In the case of simple random sampling, the inclusion probability is equal to the sampling rate fh for stratum h.

Khi is the number of second stage strata in the primary sampling unit i within the first stage stratum h.

Uhik(
^
Y
,
^
Y
´) is a covariance contribution from the second stage stratum k from the primary sampling unit hi. It depends on the second stage sampling method. The corresponding formula given in the "Single Stage Sample" section applies.

Related Topics

Variables Total Covariance (complex samples tabulation algorithms)
Single Stage Sample (complex samples tabulation algorithms)
Three-stage Sample (complex samples tabulation algorithms)
Variable Total Variance (complex samples tabulation algorithms)


Three-stage Sample (complex samples tabulation algorithms)

When the sample is obtained in three stages where sampling in the first stage is done without replacement and simple random sampling is applied in the second stage, we use the following estimate for the covariance of the total for variables y and y´:

^
C
(
^
Y
,
^
Y
´)=
^
C
2(
^
Y
,
^
Y
´)+HΣh=1nhΣi=1πhiKhiΣk=1fhiknhikΣj=1LhikjΣl=1Uhikjl(
^
Y
,
^
Y
´)

where

• fhik is the sampling rate for the secondary sampling units in the second stage stratum hik.

• Lhikj is the number of third stage strata in the secondary sampling unit hikj.

• Uhikjl(
^
Y
,
^
Y
´) is a variance contribution from the third stage stratum l contained in the secondary sampling unit hikj. It depends on the third stage sampling method. The corresponding formula given in the "Single Stage Sample" section applies.

Related Topics

Variables Total Covariance (complex samples tabulation algorithms)
Single Stage Sample (complex samples tabulation algorithms)
Two-stage Sample (complex samples tabulation algorithms)
Variable Total Variance (complex samples tabulation algorithms)


Variable Total Variance (complex samples tabulation algorithms)

The variance of the total for variable y in a complex sample is estimated by

^
V
(
^
Y
)=
^
C
(
^
Y
,
^
Y
)

with
^
C
(
^
Y
,
^
Y
) defined above.

Related Topics

Variables Total Covariance (complex samples tabulation algorithms)
Single Stage Sample (complex samples tabulation algorithms)
Two-stage Sample (complex samples tabulation algorithms)
Three-stage Sample (complex samples tabulation algorithms)


Population Size Estimation (complex samples tabulation algorithms)

complex samples tabulation algorithms,complex samples tabulation algorithms,complex samples tabulation algorithms
population size estimation,population size estimation,population size estimation

An estimate for the population size corresponds to the estimate for the variable total; it is sum of the sampling weights. We have the following estimate for the single-stage samples:

^
N
=HΣh=1nhΣi=1mhiΣj=1whij

More generally,

^
N
=nΣi=1wi

The variance of
^
N
is obtained by replacing yhij with 1; that is, by replacing zhij with whij in the corresponding variance estimator formula for
^
V
(
^
Y
).

Related Topics

CSTABULATE Algorithms
Notation (complex samples tabulation algorithms)
Weights (complex samples tabulation algorithms)
Z Expressions (complex samples tabulation algorithms)
Variable Total (complex samples tabulation algorithms)
Variables Total Covariance (complex samples tabulation algorithms)
Cell Estimates: One-Way Tables (complex samples tabulation algorithms)
Cell Estimates: Two-Way Tables (complex samples tabulation algorithms)
Standard Errors (complex samples tabulation algorithms)
Coefficient of Variation (complex samples tabulation algorithms)
Confidence Limits (complex samples tabulation algorithms)
Design Effects (complex samples tabulation algorithms)
Tests of Independence for Two-Way Tables (complex samples tabulation algorithms)
Odds Ratios and Risks (complex samples tabulation algorithms)
Tests of Homogeneity for One-Way Tables (complex samples tabulation algorithms)
References (complex samples tabulation algorithms)


Cell Estimates: One-Way Tables (complex samples tabulation algorithms)

complex samples tabulation algorithms,complex samples tabulation algorithms,complex samples tabulation algorithms
one-way cell estimates,one-way cell estimates,one-way cell estimates

Let the population be classified according to the values of a single categorical row variable and possibly one or more categorical variables in the layer. Categories for the row variable are enumerated by r=1,...,R and categories for the layer variables are given by l=1,...,L. Each combination of the values (r,l) defines a domain and a cell in the one-way table (r,l) , r=1,...,R. For each cell we define a corresponding indicator variable:

δhij(r,l)={
1 | if the sample unit hij is in the cell (r,l)
0 | otherwise

Related Topics

CSTABULATE Algorithms
Notation (complex samples tabulation algorithms)
Weights (complex samples tabulation algorithms)
Z Expressions (complex samples tabulation algorithms)
Variable Total (complex samples tabulation algorithms)
Variables Total Covariance (complex samples tabulation algorithms)
Population Size Estimation (complex samples tabulation algorithms)
Cell Estimates: Two-Way Tables (complex samples tabulation algorithms)
Standard Errors (complex samples tabulation algorithms)
Coefficient of Variation (complex samples tabulation algorithms)
Confidence Limits (complex samples tabulation algorithms)
Design Effects (complex samples tabulation algorithms)
Tests of Independence for Two-Way Tables (complex samples tabulation algorithms)
Odds Ratios and Risks (complex samples tabulation algorithms)
Tests of Homogeneity for One-Way Tables (complex samples tabulation algorithms)
References (complex samples tabulation algorithms)
Sizes (complex samples tabulation algorithms)
Proportions (complex samples tabulation algorithms)


Sizes (complex samples tabulation algorithms)

To estimate a cell population size or a table population size, we replace yi with δi(r,l) in the formula for the population total and obtain the following expressions:

• Cell population size:
^
N
(r,l)=nΣi=1wiδi(r,l)

• Table population size:
^
N
(+,l)=nΣi=1RΣr=1wiδi(r,l)

Similarly, in order to estimate variances of the above estimators, we substitute yhij with δhij(r,l) in the corresponding formula for the whole population. The following substitutions of zhij in the formulas for
^
V
(
^
Y
) are used for estimating the variances of these estimators:

• Cell population size: zhij(r,l)=whijδhij(r,l)

• Table population size: zhij(+,l)=RΣr=1whijδhij(r,l)

Related Topics

Cell Estimates: One-Way Tables (complex samples tabulation algorithms)
Proportions (complex samples tabulation algorithms)


Proportions (complex samples tabulation algorithms)

A table proportion estimate is computed at each layer category as follows:

^
P
tab(r,l)=
^
N
(r,l)/
^
N
(+,l)

This estimator is a ratio and we apply Taylor linearization formulas as suggested by Woodruff (1971). The following substitution of zhij in the formulas for
^
V
(
^
Y
) are used for estimating the variance of the table proportion at a given layer:

zhij(r,l)=whijδhij(r,l)−δhij(+,l)
^
P
tab(r,l)
^
N
(+,l)

Related Topics

Cell Estimates: One-Way Tables (complex samples tabulation algorithms)
Sizes (complex samples tabulation algorithms)


Cell Estimates: Two-Way Tables (complex samples tabulation algorithms)

complex samples tabulation algorithms,complex samples tabulation algorithms,complex samples tabulation algorithms
two-way cell estimates,two-way cell estimates,two-way cell estimates

Let the population be cross-classified according to the values of a categorical row variable, a categorical column variable and possibly one or more categorical variables in the layer. Categories for the row variable are enumerated by r=1,...,R while categories for the column variable are denoted by c=1,...,C and categories for the layer variables are given by l=1,...,L. Each combination of values (r,c,l) defines a domain and a cell in the two-way table (r,c,l) . For each cell we define a corresponding indicator variable:

δhij(r,c,l)={
1 | if the sample unit hij is in the cell (r,c,l)
0 | otherwise

We will also use the following indicator notation:

• Row indicator: δi(r,+,l)=CΣc=1δi(r,c,l)

• Column indicator: δi(+,c,l)=RΣr=1δi(r,c,l)

• Table indicator: δi(+,+,l)=RΣr=1CΣc=1δi(r,c,l)

Related Topics

CSTABULATE Algorithms
Notation (complex samples tabulation algorithms)
Weights (complex samples tabulation algorithms)
Z Expressions (complex samples tabulation algorithms)
Variable Total (complex samples tabulation algorithms)
Variables Total Covariance (complex samples tabulation algorithms)
Population Size Estimation (complex samples tabulation algorithms)
Cell Estimates: One-Way Tables (complex samples tabulation algorithms)
Standard Errors (complex samples tabulation algorithms)
Coefficient of Variation (complex samples tabulation algorithms)
Confidence Limits (complex samples tabulation algorithms)
Design Effects (complex samples tabulation algorithms)
Tests of Independence for Two-Way Tables (complex samples tabulation algorithms)
Odds Ratios and Risks (complex samples tabulation algorithms)
Tests of Homogeneity for One-Way Tables (complex samples tabulation algorithms)
References (complex samples tabulation algorithms)
Sizes (complex samples tabulation algorithms)
Proportions (complex samples tabulation algorithms)


Sizes (complex samples tabulation algorithms)

To estimate various domain sizes, we substitute yi with δi in the corresponding formula for the whole population as follows:

• Cell population size:
^
N
(r,c,l)=nΣi=1wiδi(r,c,l)

• Row population size:
^
N
(r,+,l)=nΣi=1wiδi(r,+,l)

• Column population size:
^
N
(+,c,l)=nΣi=1wiδi(+,c,l)

• Table population size:
^
N
(+,+,l)=nΣi=1wiδi(+,+,l)

Similarly, in order to estimate variance of the above estimators, we substitute yhij with δhij in the corresponding formula for the whole population. The following substitutions of zhij in the formulas for
^
V
(
^
Y
) are used for estimating variances of:

• Cell population size: zhij(r,c,l)=whijδhij(r,c,l)

• Row population size: zhij(r,+,l)=whijδhij(r,+,l)

• Column population size: zhij(+,c,l)=whijδhij(+,c,l)

• Table population size: zhij(+,+,l)=whijδhij(+,+,l)

Related Topics

Cell Estimates: Two-Way Tables (complex samples tabulation algorithms)
Proportions (complex samples tabulation algorithms)


Proportions (complex samples tabulation algorithms)

We define various proportion estimates to be computed as follows:

• Row population proportion:
^
P
row(r,c,l)=
^
N
(r,c,l)/
^
N
(r,+,l)

• Column population proportion:
^
P
col(r,c,l)=
^
N
(r,c,l)/
^
N
(+,c,l)

• Table population proportion:
^
P
tab(r,c,l)=
^
N
(r,c,l)/
^
N
(+,+,l)

• Marginal column population proportion:
^
P
mcol(+,c,l)=
^
N
(+,c,l)/
^
N
(+,+,l)

• Marginal row population proportion:
^
P
mrow(r,+,l)=
^
N
(r,+,l)/
^
N
(+,+,l)

In order to estimate variances of the above estimators, again apply the Taylor linearization formulas as for the one-way tables. The following substitutions of zij in the formulas for
^
V
(
^
Y
) are used for estimating variances of:

• Row population proportion: zhij(r,c,l)=whijδhij(r,c,l)−δhij(r,+,l)
^
P
row(r,c,l)
^
N
(r,+,l)

• Column population proportion: zhij(r,c,l)=whijδhij(r,c,l)−δhij(+,c,l)
^
P
col(r,c,l)
^
N
(+,c,l)

• Table population proportion: zhij(r,c,l)=whijδhij(r,c,l)−δhij(+,+,l)
^
P
tab(r,c,l)
^
N
(+,+,l)

• Marginal column population proportion: zhij(+,c,l)=whijδhij(+,c,l)−δhij(+,+,l)
^
P
mcol(+,c,l)
^
N
(+,+,l)

• Marginal row population proportion: zhij(r,+,l)=whijδhij(r,+,l)−δhij(+,+,l)
^
P
mrow(r,+,l)
^
N
(+,+,l)

Related Topics

Cell Estimates: Two-Way Tables (complex samples tabulation algorithms)
Sizes (complex samples tabulation algorithms)


Standard Errors (complex samples tabulation algorithms)

Let Z denote any of the population or subpopulation quantities defined above: variable total, population size, ratio or mean. Then the standard error of an estimator
^
Z
is the square root of its estimated variance:

StdError(
^
Z
)=
√
^
V
(
^
Z
)

Related Topics

CSTABULATE Algorithms
Notation (complex samples tabulation algorithms)
Weights (complex samples tabulation algorithms)
Z Expressions (complex samples tabulation algorithms)
Variable Total (complex samples tabulation algorithms)
Variables Total Covariance (complex samples tabulation algorithms)
Population Size Estimation (complex samples tabulation algorithms)
Cell Estimates: One-Way Tables (complex samples tabulation algorithms)
Cell Estimates: Two-Way Tables (complex samples tabulation algorithms)
Coefficient of Variation (complex samples tabulation algorithms)
Confidence Limits (complex samples tabulation algorithms)
Design Effects (complex samples tabulation algorithms)
Tests of Independence for Two-Way Tables (complex samples tabulation algorithms)
Odds Ratios and Risks (complex samples tabulation algorithms)
Tests of Homogeneity for One-Way Tables (complex samples tabulation algorithms)
References (complex samples tabulation algorithms)


Coefficient of Variation (complex samples tabulation algorithms)

The coefficient of variation of the estimator
^
Z
is the ratio of its standard error and its value:

CV(
^
Z
)=SE(
^
Z
)
^
Z

The coefficient of variation is undefined when
^
Z
=0.

Related Topics

CSTABULATE Algorithms
Notation (complex samples tabulation algorithms)
Weights (complex samples tabulation algorithms)
Z Expressions (complex samples tabulation algorithms)
Variable Total (complex samples tabulation algorithms)
Variables Total Covariance (complex samples tabulation algorithms)
Population Size Estimation (complex samples tabulation algorithms)
Cell Estimates: One-Way Tables (complex samples tabulation algorithms)
Cell Estimates: Two-Way Tables (complex samples tabulation algorithms)
Standard Errors (complex samples tabulation algorithms)
Confidence Limits (complex samples tabulation algorithms)
Design Effects (complex samples tabulation algorithms)
Tests of Independence for Two-Way Tables (complex samples tabulation algorithms)
Odds Ratios and Risks (complex samples tabulation algorithms)
Tests of Homogeneity for One-Way Tables (complex samples tabulation algorithms)
References (complex samples tabulation algorithms)


Confidence Limits (complex samples tabulation algorithms)

A level 1−α confidence interval is constructed for a given 0≤α≤1 for any domain size Nd defined earlier. The confidence bounds are defined as

^
N
d±SE(
^
N
d)tν(1−α/2)

where SE(
^
N
d) is the estimated standard error of
^
N
d, and tν(1−α/2) is the 100(1−α/2) percentile of the t distribution with ν degrees of freedom.

Related Topics

CSTABULATE Algorithms
Notation (complex samples tabulation algorithms)
Weights (complex samples tabulation algorithms)
Z Expressions (complex samples tabulation algorithms)
Variable Total (complex samples tabulation algorithms)
Variables Total Covariance (complex samples tabulation algorithms)
Population Size Estimation (complex samples tabulation algorithms)
Cell Estimates: One-Way Tables (complex samples tabulation algorithms)
Cell Estimates: Two-Way Tables (complex samples tabulation algorithms)
Standard Errors (complex samples tabulation algorithms)
Coefficient of Variation (complex samples tabulation algorithms)
Design Effects (complex samples tabulation algorithms)
Tests of Independence for Two-Way Tables (complex samples tabulation algorithms)
Odds Ratios and Risks (complex samples tabulation algorithms)
Tests of Homogeneity for One-Way Tables (complex samples tabulation algorithms)
References (complex samples tabulation algorithms)
Proportions (complex samples tabulation algorithms)
Degrees of Freedom (complex samples tabulation algorithms)


Proportions (complex samples tabulation algorithms)

For any domain proportion Pd, we use the logistic transformation f(p)=ln(p/(1−p)) and obtain the following 1−α level confidence bounds for the transformed estimate:

ln(
^
P
d1−
^
P
d)±SE(
^
P
d)
^
P
d(1−
^
P
d)tν(1−α/2)

These bounds are transformed back to the original metric using the logistic inverse f−1(y)=exp(y)/(1+exp(y)).

Related Topics

Confidence Limits (complex samples tabulation algorithms)
Degrees of Freedom (complex samples tabulation algorithms)


Degrees of Freedom (complex samples tabulation algorithms)

The degrees of freedom for the t distributions above is calculated as the difference between the number of primary sampling units and the number of strata in the first stage of sampling. This quantity is also referred to as the sample design degrees of freedom.

Related Topics

Confidence Limits (complex samples tabulation algorithms)
Proportions (complex samples tabulation algorithms)


Design Effects (complex samples tabulation algorithms)

complex samples tabulation algorithms,complex samples tabulation algorithms,complex samples tabulation algorithms
design effects,design effects,design effects

Size

The design effect Deff for a two-way table cell population size is estimated by

Deff=
^
V
(
^
N
(r,c,l))
^
V
srs(
^
N
(r,c,l))

^
V
(
^
N
(r,c,l)) is an estimate of the variance of
^
N
(r,c,l) under the complex sample design, while
^
V
srs(
^
N
(r,c,l)) is its estimate of variance under the simple random sampling assumption:

^
V
srs(
^
N
(r,c,l))=(fpc)1n−1
^
N
(r,c,l)(
^
N
−
^
N
(r,c,l))

Assuming sampling without replacement we have fpc=(1−n
^
N
) given that n
^
N
<1, while for sampling with replacement we set fpc=1. This assumption is independent of the sampling specified for the complex sample design based variance
^
V
(
^
N
(r,c,l)).

Computations of the design effects for the one-way table cells, as well as for the row, column and table population sizes are analogous to the one above.

Proportions

Deff for a two-way table population proportion is estimated by

Deff=
^
V
(
^
P
tab(r,c,l))
^
V
srs(
^
P
tab(r,c,l))

^
V
(
^
P
tab(r,c,l)) is an estimate of the variance of
^
P
tab(r,c,l) under the complex sample design, while
^
V
srs(
^
P
tab(r,c,l)) is its estimate of variance under the simple random sampling assumption:

^
V
srs(
^
P
tab(r,c,l))=(fpc)
^
N
n−1
^
P
tab(r,c,l)(1−
^
P
tab(r,c,l))
^
N
(+,+,l)

with fpc as specified earlier.

Computations of the design effects for one-way table proportions, as well as for the row, column, marginal row and marginal column population proportions are analogous to the one above.

Design effects for various estimates are computed only when the condition n
^
N
<1 is satisfied.

Design effect square root

We also compute the square root of a design effect
√ Deff
.

Design effects and their applications have been discussed by Kish (1965) and Kish (1995).

Related Topics

CSTABULATE Algorithms
Notation (complex samples tabulation algorithms)
Weights (complex samples tabulation algorithms)
Z Expressions (complex samples tabulation algorithms)
Variable Total (complex samples tabulation algorithms)
Variables Total Covariance (complex samples tabulation algorithms)
Population Size Estimation (complex samples tabulation algorithms)
Cell Estimates: One-Way Tables (complex samples tabulation algorithms)
Cell Estimates: Two-Way Tables (complex samples tabulation algorithms)
Standard Errors (complex samples tabulation algorithms)
Coefficient of Variation (complex samples tabulation algorithms)
Confidence Limits (complex samples tabulation algorithms)
Tests of Independence for Two-Way Tables (complex samples tabulation algorithms)
Odds Ratios and Risks (complex samples tabulation algorithms)
Tests of Homogeneity for One-Way Tables (complex samples tabulation algorithms)
References (complex samples tabulation algorithms)


Tests of Independence for Two-Way Tables (complex samples tabulation algorithms)

complex samples tabulation algorithms,complex samples tabulation algorithms,complex samples tabulation algorithms
two-way tests of independence,two-way tests of independence,two-way tests of independence

Let the population be cross-classified according to the values of a categorical row variable, a categorical column variable and possibly one a more categorical variables in the layer. Categories for the row variable are enumerated by r=1,...,R, while categories for the column variable are denoted by c=1,...,C. When the layer variables are given we assume that their categories coincide with the strata in the first sampling stage. In the following we omit reference to the layers as the formulas apply for each stratum separately when needed.

We use a contrast matrix C defined as follows. Let AR be the contrast matrix given by

AR=[IR−1|−1R−1]´

IR−1 is an identity matrix of size R−1 and 1R−1 is a vector with R−1 elements equal to 1. Define C to be a RC×(R−1)(C−1) matrix defined by the following Kronecker product:

C=ARAC

Related Topics

CSTABULATE Algorithms
Notation (complex samples tabulation algorithms)
Weights (complex samples tabulation algorithms)
Z Expressions (complex samples tabulation algorithms)
Variable Total (complex samples tabulation algorithms)
Variables Total Covariance (complex samples tabulation algorithms)
Population Size Estimation (complex samples tabulation algorithms)
Cell Estimates: One-Way Tables (complex samples tabulation algorithms)
Cell Estimates: Two-Way Tables (complex samples tabulation algorithms)
Standard Errors (complex samples tabulation algorithms)
Coefficient of Variation (complex samples tabulation algorithms)
Confidence Limits (complex samples tabulation algorithms)
Design Effects (complex samples tabulation algorithms)
Odds Ratios and Risks (complex samples tabulation algorithms)
Tests of Homogeneity for One-Way Tables (complex samples tabulation algorithms)
References (complex samples tabulation algorithms)
Adjusted Pearson Statistic (complex samples tabulation algorithms)
Adjusted Likelihood Ratio Statistic (complex samples tabulation algorithms)
Residuals (complex samples tabulation algorithms)


Adjusted Pearson Statistic (complex samples tabulation algorithms)

X2=nRΣr=1CΣc=1(
^
P
(r,c)−
^
P
(r,+)
^
P
(+,c))2
^
P
(r,+)
^
P
(+,c)

Under the null hypothesis, the asymptotic distribution of X2 is generally not a chi-square distribution, so we perform an adjustment using the following
^
Δ
matrix:

^
Δ
=n(C´D−1
^
P
^
M
D−1
^
P
C)−1(C´D−1
^
P
^
V
(
^
P
)D−1
^
P
C)

^
P
is a vector and D
^
P
is a diagonal matrix of size RC containing elements
^
P
(r,c).
^
M
=[
^
D
^
P
−
^
P
^
P´
] is a multinomial covariance matrix estimating the asymptotic covariance of
^
P
under the simple random sampling design, while
^
V
(
^
P
) estimates covariance matrix of
^
P
under the complex sampling design.

We use the F-based variant of the Rao and Scott’s (1984) second-order adjustment

FX2=X2tr
^
Δ

where

d=(tr
^
Δ
)2tr
^
Δ
2

This statistic has an approximate F(d,dν) distribution. Properties of this test are given in a review of simulation studies by Rao and Thomas (2003).

Related Topics

Tests of Independence for Two-Way Tables (complex samples tabulation algorithms)
Adjusted Likelihood Ratio Statistic (complex samples tabulation algorithms)
Residuals (complex samples tabulation algorithms)


Adjusted Likelihood Ratio Statistic (complex samples tabulation algorithms)

G2=2nRΣr=1CΣc=1
^
P
(r,c)ln(
^
P
(r,c)
^
P
(r,+)
^
P
(+,c))

The adjusted likelihood ratio statistic is computed in an analogous manner to the Pearson adjustment where
^
Δ
is the same as before and

FG2=G2tr
^
Δ

where

d=(tr
^
Δ
)2tr
^
Δ
2

This statistic has an approximate F(d,dν) distribution.

Related Topics

Tests of Independence for Two-Way Tables (complex samples tabulation algorithms)
Adjusted Pearson Statistic (complex samples tabulation algorithms)
Residuals (complex samples tabulation algorithms)


Residuals (complex samples tabulation algorithms)

Under the independence hypothesis, the expected table proportion estimates are given by
^
E
(r,c)=
^
P
(r,+)
^
P
(+,c) and residual are defined as
^
R
(r,c)=
^
P
(r,c)−
^
E
(r,c).

Standardized residuals are computed by

^
R
(r,c)
√
^
V
(
^
R
(r,c))

where
^
V
(
^
R
(r,c)) denotes the estimated residual variance.

Let
^
M
=[
^
D
^
P
−
^
P
^
P´
] estimate the asymptotic covariance matrix under simple random sampling where
^
P
and D
^
P
are defined as above. X is another contrast matrix specified by

X=[AR1C|1RAC]

Contrast matrices AR and AC, as well as the unit vectors 1R and 1C, are defined as earlier. Variance estimates for residuals are obtained from the diagonal of the following matrix:

^
V
(
^
R
)=[I−
^
M
X(X´
^
M
X)−1X´]
^
V
(
^
P
)[I−X(X´
^
M
X)−1X´
^
M
]

Related Topics

Tests of Independence for Two-Way Tables (complex samples tabulation algorithms)
Adjusted Pearson Statistic (complex samples tabulation algorithms)
Adjusted Likelihood Ratio Statistic (complex samples tabulation algorithms)


Odds Ratios and Risks (complex samples tabulation algorithms)

complex samples tabulation algorithms,complex samples tabulation algorithms,complex samples tabulation algorithms
odds ratios,odds ratios,odds ratios

These statistics are computed only for 2×2 tables. If any layers are specified, they must correspond to the first stage strata.

Let
^
N
11,
^
N
12,
^
N
21 and
^
N
22 be the cell population size estimates,
^
N
1+,
^
N
2+,
^
N
+1, and
^
N
+2 be marginal estimates and
^
N
++ the population size estimate.

Related Topics

CSTABULATE Algorithms
Notation (complex samples tabulation algorithms)
Weights (complex samples tabulation algorithms)
Z Expressions (complex samples tabulation algorithms)
Variable Total (complex samples tabulation algorithms)
Variables Total Covariance (complex samples tabulation algorithms)
Population Size Estimation (complex samples tabulation algorithms)
Cell Estimates: One-Way Tables (complex samples tabulation algorithms)
Cell Estimates: Two-Way Tables (complex samples tabulation algorithms)
Standard Errors (complex samples tabulation algorithms)
Coefficient of Variation (complex samples tabulation algorithms)
Confidence Limits (complex samples tabulation algorithms)
Design Effects (complex samples tabulation algorithms)
Tests of Independence for Two-Way Tables (complex samples tabulation algorithms)
Tests of Homogeneity for One-Way Tables (complex samples tabulation algorithms)
References (complex samples tabulation algorithms)
Estimates and Variances (complex samples tabulation algorithms)
Confidence Limits (complex samples tabulation algorithms)


Estimates and Variances (complex samples tabulation algorithms)

The odds ratio is defined by the following expression:

OR=
^
N
11
^
N
22
^
N
12
^
N
21

Relative risks are defined by

RR1=
^
N
11/
^
N
1+
^
N
21/
^
N
2+ and RR2=
^
N
12/
^
N
1+
^
N
22/
^
N
2+

Risk differences are given by

D1=
^
N
11
^
N
1+−
^
N
21
^
N
2+ and D2=
^
N
12
^
N
1+−
^
N
22
^
N
2+

The following substitutions of zij in the formulas for
^
V
(
^
Y
) are used for estimating variances:

• Odds ratio: zhij(r,c)=whij(δhij(1,1)
^
N
11−δhij(1,2)
^
N
12−δhij(2,1)
^
N
21+δhij(2,2)
^
N
22)×OR

• Risk ratio RR1: zhij(r,c)=whij(δhij(1,1)
^
N
12
^
N
11
^
N
1+−δhij(1,2)
^
N
1+−δhij(2,1)
^
N
22
^
N
21
^
N
2++δhij(2,2)
^
N
2+)×RR1

• Risk difference D1: zhij(r,c)=whij(δhij(1,1)
^
N
12−δhij(1,2)
^
N
11
^
N
21+−δhij(2,1)
^
N
22−δhij(2,2)
^
N
21
^
N
22+)

The estimations of variance for RR2 and D2 are performed using similar substitutions.

Related Topics

Odds Ratios and Risks (complex samples tabulation algorithms)
Confidence Limits (complex samples tabulation algorithms)


Confidence Limits (complex samples tabulation algorithms)

A level 1−α confidence interval is constructed for a given 0≤α≤1 for odds ratio, risk ratio and risk difference in every table.

For the odds ratio or risk ratio R we use the logarithm transformation and obtain the confidence bounds

ln(
^
R
)±SE(
^
R
)
^
R
tν(1−α/2)

These bounds are transformed back to the original metric using the exponential function. No transformations are used when estimating confidence bounds for a risk difference D:

^
D
±SE(
^
D
)tν(1−α/2)

Related Topics

Odds Ratios and Risks (complex samples tabulation algorithms)
Estimates and Variances (complex samples tabulation algorithms)


Tests of Homogeneity for One-Way Tables (complex samples tabulation algorithms)

complex samples tabulation algorithms,complex samples tabulation algorithms,complex samples tabulation algorithms
one-way tests of homogeneity,one-way tests of homogeneity,one-way tests of homogeneity

Let the population be classified according to the values of a categorical row variable and possibly one a more categorical variables in the layer. Categories for the row variable are enumerated by r=1,...,R. When the layer variables are given we assume that their categories coincide with the strata in the first sampling stage. In the following we omit references to the layers as the formulas apply for each stratum separately when needed.

We study proportions P(r)=N(r)/N(+). The test of homogeneity consists of testing the null hypotheses H0:P(r)=1/R for r=1,...,R.

Related Topics

CSTABULATE Algorithms
Notation (complex samples tabulation algorithms)
Weights (complex samples tabulation algorithms)
Z Expressions (complex samples tabulation algorithms)
Variable Total (complex samples tabulation algorithms)
Variables Total Covariance (complex samples tabulation algorithms)
Population Size Estimation (complex samples tabulation algorithms)
Cell Estimates: One-Way Tables (complex samples tabulation algorithms)
Cell Estimates: Two-Way Tables (complex samples tabulation algorithms)
Standard Errors (complex samples tabulation algorithms)
Coefficient of Variation (complex samples tabulation algorithms)
Confidence Limits (complex samples tabulation algorithms)
Design Effects (complex samples tabulation algorithms)
Tests of Independence for Two-Way Tables (complex samples tabulation algorithms)
Odds Ratios and Risks (complex samples tabulation algorithms)
References (complex samples tabulation algorithms)
Adjusted Pearson Statistic (complex samples tabulation algorithms)
Adjusted Likelihood Ratio Statistic (complex samples tabulation algorithms)


Adjusted Pearson Statistic (complex samples tabulation algorithms)

We perform an adjusted Pearson statistic test for testing the homogeneity. The Pearson test statistic is computed according to the following standard formula:

X2=nRΣr=1R(
^
P
(r)−1/R)2

Under the null hypothesis, the asymptotic distribution of X2 is generally not a chi-square distribution, so we perform an adjustment using the following
^
Δ
matrix:

^
Δ
=n(
^
M
(
^
P
0))−1
^
V
(
^
P
0)

^
V
(
^
P
0) is the estimated covariance matrix under the complex sample design, while
^
M
(
^
P
0) is an estimated asymptotic covariance matrix under the simple random sampling given by

^
M
(
^
P
0)=[diag(
^
P
0)−
^
P
0
^
P
´0]

where
^
P
0 is a vector and diag(
^
P
0) is a diagonal matrix of size R−1 containing elements
^
P
(r), r=1,...,R−1.

We use the F-based variant of the Rao and Scott’s (1984) second-order adjustment

FX2=X2tr
^
Δ

where

d=(tr
^
Δ
)2tr
^
Δ
2

This statistic has an asymptotic approximate F(d,dν) distribution.

Related Topics

Tests of Homogeneity for One-Way Tables (complex samples tabulation algorithms)
Adjusted Likelihood Ratio Statistic (complex samples tabulation algorithms)


Adjusted Likelihood Ratio Statistic (complex samples tabulation algorithms)

The likelihood ratio test statistic is given by

G2=2nRΣr=1
^
P
(r)ln(R
^
P
(r))

The adjusted likelihood ratio statistic is computed in an identical way as the adjustment for the Pearson statistic:

FG2=G2tr
^
Δ

d and
^
Δ
are the same as specified before. This statistic has an asymptotic approximate F(d,dν) distribution.

Related Topics

Tests of Homogeneity for One-Way Tables (complex samples tabulation algorithms)
Adjusted Pearson Statistic (complex samples tabulation algorithms)


References (complex samples tabulation algorithms)

complex samples tabulation algorithms,complex samples tabulation algorithms,complex samples tabulation algorithms
references,references,references

Cochran, W. G. 1977. Sampling Techniques, 3rd ed. New York: John Wiley and Sons.

Hansen, M. H., and W. N. Hurwitz. 1943. On the theory of sampling from finite populations. Annals of Mathematical Statistics, 14, 333-362.

Horwitz, D. G., and D. J. Thompson. 1952. A generalization of sampling without replacement from a finite universe. Journal of the American Statistical Association, 47, 663-685.

Kish, L. 1965. Survey Sampling. New York: John Wiley and Sons.

Kish, L. 1995. Methods for Design Effects. Journal of Official Statistics, 11, 119-127.

Rao, J. N. K., and A. J. Scott. 1981. The analysis of categorical data from complex sample surveys: chi-squared tests for goodness of fit and independence in two-way tables. Journal of the American Statistical Association, 76, 221-230.

Rao, J. N. K., and A. J. Scott. 1984. On chi-squared tests for multiway contingency tables with cell proportions estimated from survey data. Annals of Statistics, 12, 46-60.

Rao, J. N. K., and D. R. Thomas. 2003. Analysis of categorical response data from complex surveys: an Appraisal and update. In: Analysis of Survey Data, R. Chambers, and C. Skinner, eds. New York: John Wiley & Sons.

Särndal, C., B. Swensson, and J. Wretman. 1992. Model Assisted Survey Sampling. New York: Springer-Verlag.

Sen, A. R. 1953. On the estimate of the variance in sampling with varying probabilities. Journal of the Indian Society of Agricultural Statistics, 5, 55-77.

Thomas, D. R., and J. N. K. Rao. 1987. Small-sample comparisons of level and power for simple goodness-of-fit statistics under cluster sampling. Journal of the American Statistical Association, 82, 630-636.

Woodruff, R. S. 1971. A Simple Method for Approximating the Variance of a Complicated Estimate. Journal of the American Statistical Association, 66, 411-414.

Yates, F., and P. M. Grundy. 1953. Selection without replacement from within strata with probability proportional to size. Journal of the Royal Statistical Society Series B, 15, 253-261.

Related Topics

CSTABULATE Algorithms
Notation (complex samples tabulation algorithms)
Weights (complex samples tabulation algorithms)
Z Expressions (complex samples tabulation algorithms)
Variable Total (complex samples tabulation algorithms)
Variables Total Covariance (complex samples tabulation algorithms)
Population Size Estimation (complex samples tabulation algorithms)
Cell Estimates: One-Way Tables (complex samples tabulation algorithms)
Cell Estimates: Two-Way Tables (complex samples tabulation algorithms)
Standard Errors (complex samples tabulation algorithms)
Coefficient of Variation (complex samples tabulation algorithms)
Confidence Limits (complex samples tabulation algorithms)
Design Effects (complex samples tabulation algorithms)
Tests of Independence for Two-Way Tables (complex samples tabulation algorithms)
Odds Ratios and Risks (complex samples tabulation algorithms)
Tests of Homogeneity for One-Way Tables (complex samples tabulation algorithms)


Complex Samples: Covariance Matrix of Total

complex samples algorithms,complex samples algorithms,complex samples algorithms
covariance matrix of total,covariance matrix of total,covariance matrix of total
covariance matrix of total,covariance matrix of total,covariance matrix of total
complex samples algorithms,complex samples algorithms,complex samples algorithms

This document describes the algorithms used in the complex sampling module procedures for estimation of covariance matrix of population total estimates. It contains a more general formulation of the algorithms given in CSDESCRIPTIVES and CSTABULATE.

Complex sample data must contain both the values of the variables to be analyzed and the information on the current sampling design. Sampling design includes the sampling method, strata and clustering information, inclusion probabilities and the overall sampling weights.

Sampling design specification may include up to three stages of sampling. Any of the following general sampling methods may be assumed in the first stage: random sampling with replacement, random sampling without replacement and equal probabilities and random sampling without replacement and unequal probabilities. The first two sampling methods can also be specified for the second and the third sampling stage.

Related Topics

Notation (complex samples: covariance matrix of total algorithms)
Weights (complex samples: covariance matrix of total algorithms)
Z Expressions (complex samples: covariance matrix of total algorithms)
Total Estimation (complex samples: covariance matrix of total algorithms)
Total covariances (complex samples: covariance matrix of total algorithms)
Single stage sample (complex samples: covariance matrix of total algorithms)
Two-stage sample (complex samples: covariance matrix of total algorithms)
Three-stage sample (complex samples: covariance matrix of total algorithms)
Total variance (complex samples: covariance matrix of total algorithms)
Population Size Estimation (complex samples: covariance matrix of total algorithms)
References (complex samples: covariance matrix of total algorithms)


Notation (complex samples: covariance matrix of total algorithms)

The following notation is used throughout this chapter unless otherwise stated:

H | Number of strata.
nh | Sampled number of primary sampling units (PSU) per stratum.
fh | Sampling rate per stratum.
mhi | Number of elements in the ith sampled unit in stratum h.
whij | Overall sampling weight for the jth element in the ith sampled unit in stratum h.
yhij | Values of vector y for the jth element in the ith sampled unit in stratum h.
yT | Population total sum for vector of variables y.
n | Total number of elements in the sample.
N | Total number of elements in the population.

Related Topics

Complex Samples: Covariance Matrix of Total
Weights (complex samples: covariance matrix of total algorithms)
Z Expressions (complex samples: covariance matrix of total algorithms)
Total Estimation (complex samples: covariance matrix of total algorithms)
Total covariances (complex samples: covariance matrix of total algorithms)
Single stage sample (complex samples: covariance matrix of total algorithms)
Two-stage sample (complex samples: covariance matrix of total algorithms)
Three-stage sample (complex samples: covariance matrix of total algorithms)
Total variance (complex samples: covariance matrix of total algorithms)
Population Size Estimation (complex samples: covariance matrix of total algorithms)
References (complex samples: covariance matrix of total algorithms)


Weights (complex samples: covariance matrix of total algorithms)

Overall weights specified for each ultimate element are processed as given. They can be obtained as a product of weights for corresponding units computed in each sampling stage.

When sampling without replacement in a given stage, the substitution whi=1/πhi for unit i in stratum h will result in application of the estimator for the population totals due to Horvitz and Thompson (1952). The corresponding variance estimator will also be unbiased. πhi is the probability of unit i from stratum h being selected in the given stage.

If sampling with replacement in a given stage, the substitution whi=1/(nhphi) yields the estimator for the population totals due to Hansen and Hurwitz (1943). Repeatedly selected units should be replicated in the data. The corresponding variance estimator will be unbiased. phi is the probability of selecting unit i in a single draw from stratum h in the given stage.

Weights obtained in each sampling stage need to be multiplied when processing multi-stage samples. The resulting overall weights for the elements in the final stage are used in all expressions and formulas below.

Related Topics

Complex Samples: Covariance Matrix of Total
Notation (complex samples: covariance matrix of total algorithms)
Z Expressions (complex samples: covariance matrix of total algorithms)
Total Estimation (complex samples: covariance matrix of total algorithms)
Total covariances (complex samples: covariance matrix of total algorithms)
Single stage sample (complex samples: covariance matrix of total algorithms)
Two-stage sample (complex samples: covariance matrix of total algorithms)
Three-stage sample (complex samples: covariance matrix of total algorithms)
Total variance (complex samples: covariance matrix of total algorithms)
Population Size Estimation (complex samples: covariance matrix of total algorithms)
References (complex samples: covariance matrix of total algorithms)


Z Expressions (complex samples: covariance matrix of total algorithms)

zhij=whijyhij

zhi=mhiΣj=1zhij

zh=1nhnhΣi=1zhi

S2h(y)=1nh−1nhΣi=1(zhi−zh)(zhi−zh)´

For multi-stage samples, index h denotes a stratum in the given stage, and i stands for unit from h in the same stage. Index j runs over all final stage elements contained in unit hi.

Related Topics

Complex Samples: Covariance Matrix of Total
Notation (complex samples: covariance matrix of total algorithms)
Weights (complex samples: covariance matrix of total algorithms)
Total Estimation (complex samples: covariance matrix of total algorithms)
Total covariances (complex samples: covariance matrix of total algorithms)
Single stage sample (complex samples: covariance matrix of total algorithms)
Two-stage sample (complex samples: covariance matrix of total algorithms)
Three-stage sample (complex samples: covariance matrix of total algorithms)
Total variance (complex samples: covariance matrix of total algorithms)
Population Size Estimation (complex samples: covariance matrix of total algorithms)
References (complex samples: covariance matrix of total algorithms)


Total Estimation (complex samples: covariance matrix of total algorithms)

An estimate for the population total of vector of variables y in a single-stage sample is the weighted sum over all the strata and all the clusters:

^
y
T=HΣh=1nhΣi=1mhiΣj=1whijyhij

Alternatively, we compute the weighted sum over all the elements in the sample:

^
y
T=nΣi=1wiyi

The latter expression is more general as it also applies to multi-stages samples.

Related Topics

Complex Samples: Covariance Matrix of Total
Notation (complex samples: covariance matrix of total algorithms)
Weights (complex samples: covariance matrix of total algorithms)
Z Expressions (complex samples: covariance matrix of total algorithms)
Total covariances (complex samples: covariance matrix of total algorithms)
Single stage sample (complex samples: covariance matrix of total algorithms)
Two-stage sample (complex samples: covariance matrix of total algorithms)
Three-stage sample (complex samples: covariance matrix of total algorithms)
Total variance (complex samples: covariance matrix of total algorithms)
Population Size Estimation (complex samples: covariance matrix of total algorithms)
References (complex samples: covariance matrix of total algorithms)


Total covariances (complex samples: covariance matrix of total algorithms)

For a multi-stage sample containing a with replacement sampling stage, all specifications other than weights are ignored for the subsequent stages. They make no contribution to the variance estimates.

Related Topics

Complex Samples: Covariance Matrix of Total
Notation (complex samples: covariance matrix of total algorithms)
Weights (complex samples: covariance matrix of total algorithms)
Z Expressions (complex samples: covariance matrix of total algorithms)
Total Estimation (complex samples: covariance matrix of total algorithms)
Single stage sample (complex samples: covariance matrix of total algorithms)
Two-stage sample (complex samples: covariance matrix of total algorithms)
Three-stage sample (complex samples: covariance matrix of total algorithms)
Total variance (complex samples: covariance matrix of total algorithms)
Population Size Estimation (complex samples: covariance matrix of total algorithms)
References (complex samples: covariance matrix of total algorithms)


Single stage sample (complex samples: covariance matrix of total algorithms)

Covariance of the total for vector y in a single-stage sample is estimated by the following:

^
V
(
^
y
T)=
^
V
1(
^
y
T)=HΣh=1Uh(
^
y
T)

where Uh(
^
y
T) is an estimate contribution from stratum h and depends on the sampling method as follows:

For sampling with replacement

Uh(
^
y
T)=nhS2h(y)

For simple random sampling

Uh(
^
y
T)=(1−fh)nhS2h(y)

For sampling without replacement and unequal probabilities

Uh(
^
y
T)=nhΣi=1nhΣi>j(πhiπhjπhij−1)(zhi−zhj)(zhi−zhj)´

πhi and πhj are the inclusion probability for units i and j in stratum h, and πhij is the joint inclusion probability for the same units. This estimator is due to Yates and Grundy (1953) and Sen (1953). In some situations it may yield a negative estimate and is treated as undefined. For each stratum h containing a single element, the covariance contribution Uh(
^
y
T) is always set to zero.

Related Topics

Complex Samples: Covariance Matrix of Total
Notation (complex samples: covariance matrix of total algorithms)
Weights (complex samples: covariance matrix of total algorithms)
Z Expressions (complex samples: covariance matrix of total algorithms)
Total Estimation (complex samples: covariance matrix of total algorithms)
Total covariances (complex samples: covariance matrix of total algorithms)
Two-stage sample (complex samples: covariance matrix of total algorithms)
Three-stage sample (complex samples: covariance matrix of total algorithms)
Total variance (complex samples: covariance matrix of total algorithms)
Population Size Estimation (complex samples: covariance matrix of total algorithms)
References (complex samples: covariance matrix of total algorithms)


Two-stage sample (complex samples: covariance matrix of total algorithms)

When the sample is obtained in two stages and sampling without replacement is applied in the first stage, we use the following estimate for the covariance of the total for vector y:

^
V
(
^
y
T)=
^
V
2(
^
y
T)=
^
V
1(
^
y
T)+HΣh=1nhΣi=1πhiKhiΣk=1Uhik(
^
y
T)

πhi is the first stage inclusion probability for the primary sampling unit i in stratum h. In case of simple random sampling, the inclusion probability is equal to the sampling rate fh for stratum h.

Khi is the number of second stage strata in the primary sampling unit i within the first stage stratum h.

Uhik(
^
y
T) is a covariance contribution from the second stage stratum k from the primary sampling unit hi. Its value depends on the second stage sampling method; the corresponding formula from Single stage sample (complex samples: covariance matrix of total algorithms) applies.

Related Topics

Complex Samples: Covariance Matrix of Total
Notation (complex samples: covariance matrix of total algorithms)
Weights (complex samples: covariance matrix of total algorithms)
Z Expressions (complex samples: covariance matrix of total algorithms)
Total Estimation (complex samples: covariance matrix of total algorithms)
Total covariances (complex samples: covariance matrix of total algorithms)
Single stage sample (complex samples: covariance matrix of total algorithms)
Three-stage sample (complex samples: covariance matrix of total algorithms)
Total variance (complex samples: covariance matrix of total algorithms)
Population Size Estimation (complex samples: covariance matrix of total algorithms)
References (complex samples: covariance matrix of total algorithms)


Three-stage sample (complex samples: covariance matrix of total algorithms)

When the sample is obtained in three stages where sampling in the first stage is done without replacement and simple random sampling is applied in the second stage, we use the following estimate for the covariance of the total for vector y:

^
V
(
^
y
T)=
^
V
2(
^
y
T)+HΣh=1nhΣi=1πhiKhiΣk=1fhiknhikΣj=1LhikjΣl=1Uhikjl(
^
y
T)

fhik is the sampling rate for the secondary sampling units in the second stage stratum hik.

Lhikj is the number of the third stage strata in the secondary sampling unit hikj.

Uhikjl(
^
y
T) is a covariance contribution from the third stage stratum l contained in the secondary sampling unit hikj. Its value depends on the second stage sampling method; the corresponding formula from Single stage sample (complex samples: covariance matrix of total algorithms) applies.

Related Topics

Complex Samples: Covariance Matrix of Total
Notation (complex samples: covariance matrix of total algorithms)
Weights (complex samples: covariance matrix of total algorithms)
Z Expressions (complex samples: covariance matrix of total algorithms)
Total Estimation (complex samples: covariance matrix of total algorithms)
Total covariances (complex samples: covariance matrix of total algorithms)
Single stage sample (complex samples: covariance matrix of total algorithms)
Two-stage sample (complex samples: covariance matrix of total algorithms)
Total variance (complex samples: covariance matrix of total algorithms)
Population Size Estimation (complex samples: covariance matrix of total algorithms)
References (complex samples: covariance matrix of total algorithms)


Total variance (complex samples: covariance matrix of total algorithms)

Variance of the total estimate for the rth element of the vector
^
y
T, is estimated by the rth diagonal element of the covariance matrix for
^
y
T

^
V
((
^
y
T)r)=
^
V
(
^
y
T

Related Topics

Complex Samples: Covariance Matrix of Total
Notation (complex samples: covariance matrix of total algorithms)
Weights (complex samples: covariance matrix of total algorithms)
Z Expressions (complex samples: covariance matrix of total algorithms)
Total Estimation (complex samples: covariance matrix of total algorithms)
Total covariances (complex samples: covariance matrix of total algorithms)
Single stage sample (complex samples: covariance matrix of total algorithms)
Two-stage sample (complex samples: covariance matrix of total algorithms)
Three-stage sample (complex samples: covariance matrix of total algorithms)
Population Size Estimation (complex samples: covariance matrix of total algorithms)
References (complex samples: covariance matrix of total algorithms)


Population Size Estimation (complex samples: covariance matrix of total algorithms)

An estimate for the population size corresponds to the estimate for the variable total; it is sum of the sampling weights. We have the following estimate for the single-stage samples:

^
N
=HΣh=1nhΣi=1mhiΣj=1whij

More generally,

^
N
=nΣi=1wi

Variance of
^
N
is obtained by replacing yhij with 1, i.e. by replacing zhij with whij in the corresponding variance estimator formula for
^
V
(
^
y
T).

Related Topics

Complex Samples: Covariance Matrix of Total
Notation (complex samples: covariance matrix of total algorithms)
Weights (complex samples: covariance matrix of total algorithms)
Z Expressions (complex samples: covariance matrix of total algorithms)
Total Estimation (complex samples: covariance matrix of total algorithms)
Total covariances (complex samples: covariance matrix of total algorithms)
Single stage sample (complex samples: covariance matrix of total algorithms)
Two-stage sample (complex samples: covariance matrix of total algorithms)
Three-stage sample (complex samples: covariance matrix of total algorithms)
Total variance (complex samples: covariance matrix of total algorithms)
References (complex samples: covariance matrix of total algorithms)


References (complex samples: covariance matrix of total algorithms)

Hansen, M. H., and W. N. Hurwitz. 1943. On the theory of sampling from finite populations. Annals of Mathematical Statistics, 14, 333-362.

Horwitz, D. G., and D. J. Thompson. 1952. A generalization of sampling without replacement from a finite universe. Journal of the American Statistical Association, 47, 663-685.

Särndal, C., B. Swensson, and J. Wretman. 1992. Model Assisted Survey Sampling. New York: Springer-Verlag.

Sen, A. R. 1953. On the estimate of the variance in sampling with varying probabilities. Journal of the Indian Society of Agricultural Statistics, 5, 55-77.

Yates, F., and P. M. Grundy. 1953. Selection without replacement from within strata with probability proportional to size. Journal of the Royal Statistical Society Series B, 15, 253-261.

Related Topics

Complex Samples: Covariance Matrix of Total
Notation (complex samples: covariance matrix of total algorithms)
Weights (complex samples: covariance matrix of total algorithms)
Z Expressions (complex samples: covariance matrix of total algorithms)
Total Estimation (complex samples: covariance matrix of total algorithms)
Total covariances (complex samples: covariance matrix of total algorithms)
Single stage sample (complex samples: covariance matrix of total algorithms)
Two-stage sample (complex samples: covariance matrix of total algorithms)
Three-stage sample (complex samples: covariance matrix of total algorithms)
Total variance (complex samples: covariance matrix of total algorithms)
Population Size Estimation (complex samples: covariance matrix of total algorithms)


Complex Samples: Model Testing

complex samples algorithms,complex samples algorithms,complex samples algorithms
model testing,model testing,model testing

This document describes the methods used for conducting linear hypothesis tests based on the estimated parameters in Complex Samples models.

Required input is a set of the linear hypothesis, parameter estimates and their covariance matrix estimated for the complex sample design. Some methods require an estimate of the parameter covariance matrix under the simple random sampling assumption as well. Also needed is the number of degrees of freedom for the complex sample design; typically this will be the difference between the number of primary sampling units and the number of strata in the first stage of sampling.

Given consistent estimates of the above constructs, no additional restrictions are imposed on the complex sample design.

Related Topics

Notation (complex samples: model testing algorithms)
Hypothesis Testing (complex samples: model testing algorithms)
Wald Chi-Square Test (complex samples: model testing algorithms)
Wald F Test (complex samples: model testing algorithms)
Adjusted Wald Chi-Square Test (complex samples: model testing algorithms)
Adjusted Wald F Test (complex samples: model testing algorithms)
Individual Tests (complex samples: model testing algorithms)
Significance Values (complex samples: model testing algorithms)
Multiple Comparisons (complex samples: model testing algorithms)
LSD (Least Significant Difference) (complex samples: model testing algorithms)
Bonferroni (complex samples: model testing algorithms)
Sidak (complex samples: model testing algorithms)
Sequential Bonferroni (complex samples: model testing algorithms)
Sequential Sidak (complex samples: model testing algorithms)
Comparison of Adjustment Methods (complex samples: model testing algorithms)
References (complex samples: model testing algorithms)


Notation (complex samples: model testing algorithms)

The following notation is used throughout this chapter unless otherwise stated:

p

Number of regression parameters in the model.

r

The number of linear hypotheses considered.

L

r×p generalized linear hypothesis matrix.

K

r×1 vector of hypothesis values.

B

p×1 vector of population parameters.

^
B

p×1 vector of estimated population parameters (solution).

^
V
(
^
B
)

p×p estimated covariance matrix for
^
B
given the complex sample design.

ν

Sampling design degrees of freedom.

Related Topics

Complex Samples: Model Testing
Hypothesis Testing (complex samples: model testing algorithms)
Wald Chi-Square Test (complex samples: model testing algorithms)
Wald F Test (complex samples: model testing algorithms)
Adjusted Wald Chi-Square Test (complex samples: model testing algorithms)
Adjusted Wald F Test (complex samples: model testing algorithms)
Individual Tests (complex samples: model testing algorithms)
Significance Values (complex samples: model testing algorithms)
Multiple Comparisons (complex samples: model testing algorithms)
LSD (Least Significant Difference) (complex samples: model testing algorithms)
Bonferroni (complex samples: model testing algorithms)
Sidak (complex samples: model testing algorithms)
Sequential Bonferroni (complex samples: model testing algorithms)
Sequential Sidak (complex samples: model testing algorithms)
Comparison of Adjustment Methods (complex samples: model testing algorithms)
References (complex samples: model testing algorithms)


Hypothesis Testing (complex samples: model testing algorithms)

Given L and K, the following generalized linear hypothesis test is performed:

H0:LB=K

It is assumed that LB is estimable.

Related Topics

Complex Samples: Model Testing
Notation (complex samples: model testing algorithms)
Wald Chi-Square Test (complex samples: model testing algorithms)
Wald F Test (complex samples: model testing algorithms)
Adjusted Wald Chi-Square Test (complex samples: model testing algorithms)
Adjusted Wald F Test (complex samples: model testing algorithms)
Individual Tests (complex samples: model testing algorithms)
Significance Values (complex samples: model testing algorithms)
Multiple Comparisons (complex samples: model testing algorithms)
LSD (Least Significant Difference) (complex samples: model testing algorithms)
Bonferroni (complex samples: model testing algorithms)
Sidak (complex samples: model testing algorithms)
Sequential Bonferroni (complex samples: model testing algorithms)
Sequential Sidak (complex samples: model testing algorithms)
Comparison of Adjustment Methods (complex samples: model testing algorithms)
References (complex samples: model testing algorithms)


Wald Chi-Square Test (complex samples: model testing algorithms)

X2=(L
^
B
−K)´(L
^
V
(
^
B
)L´)−(L
^
B
−K) Koch et al. (1975)

The statistic has an asymptotic chi-square distribution with rI=rank(L
^
V
(
^
B
)L´)degrees of freedom. If rI<r, (L
^
V
(
^
B
)L´)− is a generalized inverse such that Wald tests are effective for a restricted set of hypothesis LIB=KI containing a particular subset I of independent rows from H0.

Related Topics

Complex Samples: Model Testing
Notation (complex samples: model testing algorithms)
Hypothesis Testing (complex samples: model testing algorithms)
Wald F Test (complex samples: model testing algorithms)
Adjusted Wald Chi-Square Test (complex samples: model testing algorithms)
Adjusted Wald F Test (complex samples: model testing algorithms)
Individual Tests (complex samples: model testing algorithms)
Significance Values (complex samples: model testing algorithms)
Multiple Comparisons (complex samples: model testing algorithms)
LSD (Least Significant Difference) (complex samples: model testing algorithms)
Bonferroni (complex samples: model testing algorithms)
Sidak (complex samples: model testing algorithms)
Sequential Bonferroni (complex samples: model testing algorithms)
Sequential Sidak (complex samples: model testing algorithms)
Comparison of Adjustment Methods (complex samples: model testing algorithms)
References (complex samples: model testing algorithms)


Wald F Test (complex samples: model testing algorithms)

F=ν−rI+1rIνX2 Fellegi (1980)

This statistic has an approximate asymptotic F-distribution F(rI,ν−rI+1). The statistic is undefined if ν<rI. See Korn and Graubard (1990) for the properties of this statistic.

Related Topics

Complex Samples: Model Testing
Notation (complex samples: model testing algorithms)
Hypothesis Testing (complex samples: model testing algorithms)
Wald Chi-Square Test (complex samples: model testing algorithms)
Adjusted Wald Chi-Square Test (complex samples: model testing algorithms)
Adjusted Wald F Test (complex samples: model testing algorithms)
Individual Tests (complex samples: model testing algorithms)
Significance Values (complex samples: model testing algorithms)
Multiple Comparisons (complex samples: model testing algorithms)
LSD (Least Significant Difference) (complex samples: model testing algorithms)
Bonferroni (complex samples: model testing algorithms)
Sidak (complex samples: model testing algorithms)
Sequential Bonferroni (complex samples: model testing algorithms)
Sequential Sidak (complex samples: model testing algorithms)
Comparison of Adjustment Methods (complex samples: model testing algorithms)
References (complex samples: model testing algorithms)


Adjusted Wald Chi-Square Test (complex samples: model testing algorithms)

The Wald chi-square statistic under the simple random sampling assumption is given by the following expression:

X2srs=(L
^
B
−K)´(L
^
V
srs(
^
B
)L´)−(L
^
B
−K)

where
^
V
srs(
^
B
) is an asymptotic covariance matrix estimated under the simple random sampling assumption. If rank(L
^
V
srs(
^
B
)L´)<r, adjusted Wald tests are effective for a restricted set of hypotheses LIB=KI containing a particular subset I of independent rows from H0.

Since the asymptotic distribution of X2srs is generally not a chi-square distribution, it is adjusted using the following matrix:

^
Δ
=(L
^
V
srs(
^
B
)L´)−(L
^
V
(
^
B
)L´)

where
^
V
(
^
B
) is an estimated asymptotic covariance matrix under the complex sample design. We use second-order adjustment as in Rao and Scott’s (1984) given by

X2adj=X2srstr
^
Δ
/d

where

d=(tr
^
Δ
)2tr
^
Δ
2

This statistic has an approximate asymptotic chi-square distribution with d degrees of freedom. See Graubard and Korn (1993) for properties of this statistic in reference to regression problems.

Related Topics

Complex Samples: Model Testing
Notation (complex samples: model testing algorithms)
Hypothesis Testing (complex samples: model testing algorithms)
Wald Chi-Square Test (complex samples: model testing algorithms)
Wald F Test (complex samples: model testing algorithms)
Adjusted Wald F Test (complex samples: model testing algorithms)
Individual Tests (complex samples: model testing algorithms)
Significance Values (complex samples: model testing algorithms)
Multiple Comparisons (complex samples: model testing algorithms)
LSD (Least Significant Difference) (complex samples: model testing algorithms)
Bonferroni (complex samples: model testing algorithms)
Sidak (complex samples: model testing algorithms)
Sequential Bonferroni (complex samples: model testing algorithms)
Sequential Sidak (complex samples: model testing algorithms)
Comparison of Adjustment Methods (complex samples: model testing algorithms)
References (complex samples: model testing algorithms)


Adjusted Wald F Test (complex samples: model testing algorithms)

Fadj=X2srstr
^
Δ
Rao and Scott’s (1984)

This statistic has an approximate asymptotic F distribution F(d,dν) where d is defined as above. See Thomas and Rao (1987) for the heuristic derivation of this test, and Rao and Thomas (2003) for a review of the related simulation studies.

Related Topics

Complex Samples: Model Testing
Notation (complex samples: model testing algorithms)
Hypothesis Testing (complex samples: model testing algorithms)
Wald Chi-Square Test (complex samples: model testing algorithms)
Wald F Test (complex samples: model testing algorithms)
Adjusted Wald Chi-Square Test (complex samples: model testing algorithms)
Individual Tests (complex samples: model testing algorithms)
Significance Values (complex samples: model testing algorithms)
Multiple Comparisons (complex samples: model testing algorithms)
LSD (Least Significant Difference) (complex samples: model testing algorithms)
Bonferroni (complex samples: model testing algorithms)
Sidak (complex samples: model testing algorithms)
Sequential Bonferroni (complex samples: model testing algorithms)
Sequential Sidak (complex samples: model testing algorithms)
Comparison of Adjustment Methods (complex samples: model testing algorithms)
References (complex samples: model testing algorithms)


Individual Tests (complex samples: model testing algorithms)

Each row l´ of the L matrix may also be tested separately. For such tests, or when the L matrix contains a single row, the statistics above simplify as follows:

X2=(l´
^
B
−k)2l´
^
V
(
^
B
)l

and

X2=F=Χ2adj=Fadj

The test statistics X2 and X2adj have asymptotic chi-square distributions with 1 degree of freedom. The test statistics F and Fadj have approximate asymptotic F distributions F(1,ν). The tests are undefined if l´
^
V
(
^
B
)l is not positive.

Related Topics

Complex Samples: Model Testing
Notation (complex samples: model testing algorithms)
Hypothesis Testing (complex samples: model testing algorithms)
Wald Chi-Square Test (complex samples: model testing algorithms)
Wald F Test (complex samples: model testing algorithms)
Adjusted Wald Chi-Square Test (complex samples: model testing algorithms)
Adjusted Wald F Test (complex samples: model testing algorithms)
Significance Values (complex samples: model testing algorithms)
Multiple Comparisons (complex samples: model testing algorithms)
LSD (Least Significant Difference) (complex samples: model testing algorithms)
Bonferroni (complex samples: model testing algorithms)
Sidak (complex samples: model testing algorithms)
Sequential Bonferroni (complex samples: model testing algorithms)
Sequential Sidak (complex samples: model testing algorithms)
Comparison of Adjustment Methods (complex samples: model testing algorithms)
References (complex samples: model testing algorithms)


Significance Values (complex samples: model testing algorithms)

Given a value of test statistic T and a corresponding cumulative distribution function G as specified above, the p-value of the given test is computed as p=1−G(T).

Related Topics

Complex Samples: Model Testing
Notation (complex samples: model testing algorithms)
Hypothesis Testing (complex samples: model testing algorithms)
Wald Chi-Square Test (complex samples: model testing algorithms)
Wald F Test (complex samples: model testing algorithms)
Adjusted Wald Chi-Square Test (complex samples: model testing algorithms)
Adjusted Wald F Test (complex samples: model testing algorithms)
Individual Tests (complex samples: model testing algorithms)
Multiple Comparisons (complex samples: model testing algorithms)
LSD (Least Significant Difference) (complex samples: model testing algorithms)
Bonferroni (complex samples: model testing algorithms)
Sidak (complex samples: model testing algorithms)
Sequential Bonferroni (complex samples: model testing algorithms)
Sequential Sidak (complex samples: model testing algorithms)
Comparison of Adjustment Methods (complex samples: model testing algorithms)
References (complex samples: model testing algorithms)


Multiple Comparisons (complex samples: model testing algorithms)

In addition to the testing methods mentioned in the previous section, the hypothesis H0:LB=K can also be tested using the multiple row hypotheses testing technique. Let l´i be the ith row vector of the L matrix, and ki be the ith element of the K vector. The ith row hypothesis is H0i:l´iB=ki. Testing H0 is the same as testing multiple hypotheses {H0i}Ri=1 simultaneously, where R is the number of non-redundant row hypotheses. A hypothesis H0i is redundant if there exists another hypothesis H0j,j≠i such that li=clj,ki=ckj,c≠0.

For each individual hypothesis H0i , tests described in the previous section can be performed. Let pi denote the p-value for testing H0i, and p*i denote the adjusted p-value. The conclusion from multiple testing is, at level α (the family-wise type I error),

reject H0i:l´iB=ki if p*i<α

reject H0:LB=K if
min
i
(p*i)<α

There are different methods for adjusting p-values. If the adjusted p-value is bigger than 1, it is set to 1 in all the methods.

Sequential Tests. In sequential testing, the p-values are first ordered from the smallest to the biggest, and then adjusted depending on the order. Let the ordered p-values be p(1)≤p(2)≤...≤p(R).

Related Topics

Complex Samples: Model Testing
Notation (complex samples: model testing algorithms)
Hypothesis Testing (complex samples: model testing algorithms)
Wald Chi-Square Test (complex samples: model testing algorithms)
Wald F Test (complex samples: model testing algorithms)
Adjusted Wald Chi-Square Test (complex samples: model testing algorithms)
Adjusted Wald F Test (complex samples: model testing algorithms)
Individual Tests (complex samples: model testing algorithms)
Significance Values (complex samples: model testing algorithms)
LSD (Least Significant Difference) (complex samples: model testing algorithms)
Bonferroni (complex samples: model testing algorithms)
Sidak (complex samples: model testing algorithms)
Sequential Bonferroni (complex samples: model testing algorithms)
Sequential Sidak (complex samples: model testing algorithms)
Comparison of Adjustment Methods (complex samples: model testing algorithms)
References (complex samples: model testing algorithms)


LSD (Least Significant Difference) (complex samples: model testing algorithms)

least significant difference,least significant difference,least significant difference
complex samples algorithms,complex samples algorithms,complex samples algorithms

The adjusted p-values are the same as the original p-values:

p*i=pi

Related Topics

Complex Samples: Model Testing
Notation (complex samples: model testing algorithms)
Hypothesis Testing (complex samples: model testing algorithms)
Wald Chi-Square Test (complex samples: model testing algorithms)
Wald F Test (complex samples: model testing algorithms)
Adjusted Wald Chi-Square Test (complex samples: model testing algorithms)
Adjusted Wald F Test (complex samples: model testing algorithms)
Individual Tests (complex samples: model testing algorithms)
Significance Values (complex samples: model testing algorithms)
Multiple Comparisons (complex samples: model testing algorithms)
Bonferroni (complex samples: model testing algorithms)
Sidak (complex samples: model testing algorithms)
Sequential Bonferroni (complex samples: model testing algorithms)
Sequential Sidak (complex samples: model testing algorithms)
Comparison of Adjustment Methods (complex samples: model testing algorithms)
References (complex samples: model testing algorithms)


Bonferroni (complex samples: model testing algorithms)

Bonferroni,Bonferroni,Bonferroni
complex samples algorithms,complex samples algorithms,complex samples algorithms

The adjusted p-values are:

p*i=Rpi

Related Topics

Complex Samples: Model Testing
Notation (complex samples: model testing algorithms)
Hypothesis Testing (complex samples: model testing algorithms)
Wald Chi-Square Test (complex samples: model testing algorithms)
Wald F Test (complex samples: model testing algorithms)
Adjusted Wald Chi-Square Test (complex samples: model testing algorithms)
Adjusted Wald F Test (complex samples: model testing algorithms)
Individual Tests (complex samples: model testing algorithms)
Significance Values (complex samples: model testing algorithms)
Multiple Comparisons (complex samples: model testing algorithms)
LSD (Least Significant Difference) (complex samples: model testing algorithms)
Sidak (complex samples: model testing algorithms)
Sequential Bonferroni (complex samples: model testing algorithms)
Sequential Sidak (complex samples: model testing algorithms)
Comparison of Adjustment Methods (complex samples: model testing algorithms)
References (complex samples: model testing algorithms)


Sidak (complex samples: model testing algorithms)

Sidak,Sidak,Sidak
complex samples algorithms,complex samples algorithms,complex samples algorithms

The adjusted p-values are:

p*i=1−(1−pi)R

Related Topics

Complex Samples: Model Testing
Notation (complex samples: model testing algorithms)
Hypothesis Testing (complex samples: model testing algorithms)
Wald Chi-Square Test (complex samples: model testing algorithms)
Wald F Test (complex samples: model testing algorithms)
Adjusted Wald Chi-Square Test (complex samples: model testing algorithms)
Adjusted Wald F Test (complex samples: model testing algorithms)
Individual Tests (complex samples: model testing algorithms)
Significance Values (complex samples: model testing algorithms)
Multiple Comparisons (complex samples: model testing algorithms)
LSD (Least Significant Difference) (complex samples: model testing algorithms)
Bonferroni (complex samples: model testing algorithms)
Sequential Bonferroni (complex samples: model testing algorithms)
Sequential Sidak (complex samples: model testing algorithms)
Comparison of Adjustment Methods (complex samples: model testing algorithms)
References (complex samples: model testing algorithms)


Sequential Bonferroni (complex samples: model testing algorithms)

sequential Bonferroni,sequential Bonferroni,sequential Bonferroni
complex samples algorithms,complex samples algorithms,complex samples algorithms

The adjusted p-values are:

p*(i)={
Rp(1) | i=1
max((R−i+1)p(i),p*(i−1)) | i≥2

Related Topics

Complex Samples: Model Testing
Notation (complex samples: model testing algorithms)
Hypothesis Testing (complex samples: model testing algorithms)
Wald Chi-Square Test (complex samples: model testing algorithms)
Wald F Test (complex samples: model testing algorithms)
Adjusted Wald Chi-Square Test (complex samples: model testing algorithms)
Adjusted Wald F Test (complex samples: model testing algorithms)
Individual Tests (complex samples: model testing algorithms)
Significance Values (complex samples: model testing algorithms)
Multiple Comparisons (complex samples: model testing algorithms)
LSD (Least Significant Difference) (complex samples: model testing algorithms)
Bonferroni (complex samples: model testing algorithms)
Sidak (complex samples: model testing algorithms)
Sequential Sidak (complex samples: model testing algorithms)
Comparison of Adjustment Methods (complex samples: model testing algorithms)
References (complex samples: model testing algorithms)


Sequential Sidak (complex samples: model testing algorithms)

sequential sidak,sequential sidak,sequential sidak
complex samples algorithms,complex samples algorithms,complex samples algorithms

The adjusted p-values are:

p*(i)={
1−(1−p(1))R | i=1
max(1−(1−p(i))R−i+1,p*(i−1)) | i≥2

Related Topics

Complex Samples: Model Testing
Notation (complex samples: model testing algorithms)
Hypothesis Testing (complex samples: model testing algorithms)
Wald Chi-Square Test (complex samples: model testing algorithms)
Wald F Test (complex samples: model testing algorithms)
Adjusted Wald Chi-Square Test (complex samples: model testing algorithms)
Adjusted Wald F Test (complex samples: model testing algorithms)
Individual Tests (complex samples: model testing algorithms)
Significance Values (complex samples: model testing algorithms)
Multiple Comparisons (complex samples: model testing algorithms)
LSD (Least Significant Difference) (complex samples: model testing algorithms)
Bonferroni (complex samples: model testing algorithms)
Sidak (complex samples: model testing algorithms)
Sequential Bonferroni (complex samples: model testing algorithms)
Comparison of Adjustment Methods (complex samples: model testing algorithms)
References (complex samples: model testing algorithms)


Comparison of Adjustment Methods (complex samples: model testing algorithms)

A multiple testing procedure tells not only if H0 is rejected, but also if each individual H0i is rejected. All the methods, except LSD, control the family-wise type I error for testing H0; that is, the probability of rejecting at least one individual hypothesis under H0. In addition, sequential methods also control the family-wise type I error for testing any subset of H0.

LSD is the one without any adjustment, it rejects H0 too often. It does not control the family-wise type I error and should never be used to test H0. It is provided here mainly for reference.

Bonferroni is conservative in the sense that it rejects H0 less often than it should. In some situations, it becomes extremely conservative when test statistics are highly correlated.

Sidak is also conservative in most cases, but is less conservative than Bonferroni. It gives the exact type I error when test statistics are independent.

Sequential Bonferroni is as conservative as the Bonferroni in terms of testing H0 because the smallest adjusted p-value used in making decision is the same in both methods. But in term of testing individual H0i, it is less conservative than the Bonferroni. Sequential Bonferroni rejects at least as many individual hypotheses as Bonferroni.

Sequential Sidak is as conservative as the Sidak in terms of testing H0, but less conservative than the Sidak in terms of testing individual H0i. Sequential Sidak is less conservative than sequential Bonferroni.

Related Topics

Complex Samples: Model Testing
Notation (complex samples: model testing algorithms)
Hypothesis Testing (complex samples: model testing algorithms)
Wald Chi-Square Test (complex samples: model testing algorithms)
Wald F Test (complex samples: model testing algorithms)
Adjusted Wald Chi-Square Test (complex samples: model testing algorithms)
Adjusted Wald F Test (complex samples: model testing algorithms)
Individual Tests (complex samples: model testing algorithms)
Significance Values (complex samples: model testing algorithms)
Multiple Comparisons (complex samples: model testing algorithms)
LSD (Least Significant Difference) (complex samples: model testing algorithms)
Bonferroni (complex samples: model testing algorithms)
Sidak (complex samples: model testing algorithms)
Sequential Bonferroni (complex samples: model testing algorithms)
Sequential Sidak (complex samples: model testing algorithms)
References (complex samples: model testing algorithms)


References (complex samples: model testing algorithms)

Fellegi, I. P. 1980. Approximate tests of independence and goodness of fit based on stratified multistage samples. Journal of the American Statistical Association, 75, 261-268.

Graubard, B. I., and E. L. Korn. Graubard. Hypothesis testing with complex survey data: The use of classical quadratic test statistics with particular reference to regression problems. Journal of the American Statistical Association, 88, 629-641.

Holm, S. 1979. A simple sequentially rejective multiple test procedure. Scandinavian Journal of Statistics, 6, 65-70.

Koch, G. G., D. H. Freeman, and J. L. Freeman. 1975. Strategies in the multivariate analysis of data from complex surveys. International Statistical Review, 43, 59-78.

Korn, E. L., and B. L. Graubard. 1990. Simultaneous testing of regression coefficients with complex survey data: Use of Bonferroni t statistics. American Statistician, 44, 270-276.

Rao, J. N. K., and A. J. Scott. 1984. On chi-squared tests for multiway contingency tables with cell proportions estimated from survey data. Annals of Statistics, 12, 46-60.

Rao, J. N. K., and D. R. Thomas. 2003. Analysis of categorical response data from complex surveys: an Appraisal and update. In: Analysis of Survey Data, R. Chambers, and C. Skinner, eds. New York: John Wiley & Sons.

Thomas, D. R., and J. N. K. Rao. 1987. Small-sample comparisons of level and power for simple goodness-of-fit statistics under cluster sampling. Journal of the American Statistical Association, 82, 630-636.

Wright, S. P. 1992. Adjusted P-values for simultaneous inference. Biometrics, 48, 1005-1013.

Related Topics

Complex Samples: Model Testing
Notation (complex samples: model testing algorithms)
Hypothesis Testing (complex samples: model testing algorithms)
Wald Chi-Square Test (complex samples: model testing algorithms)
Wald F Test (complex samples: model testing algorithms)
Adjusted Wald Chi-Square Test (complex samples: model testing algorithms)
Adjusted Wald F Test (complex samples: model testing algorithms)
Individual Tests (complex samples: model testing algorithms)
Significance Values (complex samples: model testing algorithms)
Multiple Comparisons (complex samples: model testing algorithms)
LSD (Least Significant Difference) (complex samples: model testing algorithms)
Bonferroni (complex samples: model testing algorithms)
Sidak (complex samples: model testing algorithms)
Sequential Bonferroni (complex samples: model testing algorithms)
Sequential Sidak (complex samples: model testing algorithms)
Comparison of Adjustment Methods (complex samples: model testing algorithms)


CTABLES Algorithms

CTABLES (command),CTABLES (command),CTABLES (command)
algorithms,algorithms,algorithms
Custom Tables,Custom Tables,Custom Tables
algorithms,algorithms,algorithms
Custom Tables algorithms,Custom Tables algorithms,Custom Tables algorithms

This document describes the algorithms used in the Custom Tables procedure.

A note on weights and multiple response sets

Case weights are always based on Counts, not Responses, even when one of the variables is a multiple response variable.

Related Topics

Pearson's Chi-Square
Column Proportions Test
Column Means Tests


Pearson's Chi-Square

This section describes the computation of Pearson's chi-square.

Related Topics

CTABLES Algorithms
Column Proportions Test
Column Means Tests
Notation (custom tables algorithms)
Conditions and Assumptions (custom tables algorithms)
Statistics (custom tables algorithms)
References (custom tables algorithms)


Notation (custom tables algorithms)

Custom Tables algorithms,Custom Tables algorithms,Custom Tables algorithms
notation,notation,notation

The following notation is used throughout this section unless otherwise stated:

R | Number of rows in the sub-table.
C | Number of columns in the sub-table.
fij | Sum of case weights in cell (i,j).
ri | Marginal case weights total in ith row.
cj | Marginal case weights total in jth column.
W | Marginal case weights total in the sub-table.
Eij | Expected cell counts.
χ2p | Pearson's Chi-Square statistic.
pij | Population proportion for cell (i,j).
pi. | Marginal population proportion for ith row.
p.j | Marginal population proportion for jth column.
df | Degrees of Freedom.
p | p-value of the chi-square test.
α | Significance level supplied by the user.

Related Topics

Pearson's Chi-Square
Conditions and Assumptions (custom tables algorithms)
Statistics (custom tables algorithms)
References (custom tables algorithms)


Conditions and Assumptions (custom tables algorithms)

Custom Tables algorithms,Custom Tables algorithms,Custom Tables algorithms
chi-square assumptions,chi-square assumptions,chi-square assumptions

• Tests will not be performed on Comperimeter tables.

• Chi-square tests are performed on each innermost sub-table of each layer.

• If a scale variable is in the layer, that layer will not be used in analysis.

• The row variable and column variable must be two different categorical variables or multiple response sets.

• The contingency table must have at least two non-empty rows and two non-empty columns.

• Non-empty rows and columns do not include subtotals and totals.

• Empty rows and columns are assumed to be structural zeros. Therefore, R and C are the numbers of non-empty rows and columns in the table.

• If weighting is on, cell statistics must include weighted cell counts or weighted simple row/column percents; the analysis will be performed using these weighted cell statistics. If weighting is off, cell statistics must include cell counts or simple row/column percents; the analysis will be unweighted.

• Tests are constructed by using all visible categories. Hiding of categories and showing of user-missing categories are respected.

Related Topics

Pearson's Chi-Square
Notation (custom tables algorithms)
Statistics (custom tables algorithms)
References (custom tables algorithms)


Statistics (custom tables algorithms)

Custom Tables algorithms,Custom Tables algorithms,Custom Tables algorithms
chi-square statistics,chi-square statistics,chi-square statistics

The following statistics are available.

Related Topics

Pearson's Chi-Square
Notation (custom tables algorithms)
Conditions and Assumptions (custom tables algorithms)
References (custom tables algorithms)
Hypothesis (custom tables algorithms)
Statistic (custom tables algorithms)
P-Value (custom tables algorithms)
Use of Case Weights (custom tables algorithms)
Small Sample Test Validity (custom tables algorithms)
Test Statistics for Multiple Response Sets (custom tables algorithms)


Hypothesis (custom tables algorithms)

H0: pij=pi.p.ji=1,...,R and j=1,...,C vs. not H0

Related Topics

Statistics (custom tables algorithms)
Statistic (custom tables algorithms)
P-Value (custom tables algorithms)
Use of Case Weights (custom tables algorithms)
Small Sample Test Validity (custom tables algorithms)
Test Statistics for Multiple Response Sets (custom tables algorithms)


Statistic (custom tables algorithms)

Pearson chi-square,Pearson chi-square,Pearson chi-square
Custom Tables algorithms,Custom Tables algorithms,Custom Tables algorithms
χ2p=RΣi=1CΣj=1(fij−Eij)2Eij

where

Eij=ricjW

Under the null hypothesis, the statistic has a Chi-square distribution with df=(R−1)(C−1) degrees of freedom.

Alternatively, the chi-square statistics and degrees of freedom can be computed as the following,

χ2p=ΣEij>0(fij−Eij)2Eij

R=#{ri>0} and C=#{cj>0}

This avoids scanning for empty rows and columns before computations.

Categorical variable in rows and multiple response set in columns

χ2p=RΣi=1CΣj=1(fij−Eij)2Eij(1−cjW)

Under the null hypothesis, the statistic has an approximate Chi-square distribution with df=(R−1)C degrees of freedom.

Multiple response set in rows and categorical variable in columns

χ2p=RΣi=1CΣj=1(fij−Eij)2Eij(1−riW)

Under the null hypothesis, the statistic has an approximate Chi-square distribution with df=R(C−1) degrees of freedom.

Multiple response sets in rows and columns

χ2p=RΣi=1CΣj=1(fij−Eij)2Eij(1−riW)(1−cjW)

Under the null hypothesis, the statistic has an approximate Chi-square distribution with df=RC degrees of freedom.

Related Topics

Statistics (custom tables algorithms)
Hypothesis (custom tables algorithms)
P-Value (custom tables algorithms)
Use of Case Weights (custom tables algorithms)
Small Sample Test Validity (custom tables algorithms)
Test Statistics for Multiple Response Sets (custom tables algorithms)


P-Value (custom tables algorithms)

p=1−F(χ2p;df)

where F(x; df) is the cumulative distribution function of Chi-square distribution with df degrees of freedom. The chi-square test is significant if the p<α.

Related Topics

Statistics (custom tables algorithms)
Hypothesis (custom tables algorithms)
Statistic (custom tables algorithms)
Use of Case Weights (custom tables algorithms)
Small Sample Test Validity (custom tables algorithms)
Test Statistics for Multiple Response Sets (custom tables algorithms)


Use of Case Weights (custom tables algorithms)

The case weights (or frequency weights) are supposed to be integers representing number of replications of each case. In chi-square tests, we will only check if the aggregated cell counts fij are integers. If not, they will be rounded to nearest integer before computations.

Related Topics

Statistics (custom tables algorithms)
Hypothesis (custom tables algorithms)
Statistic (custom tables algorithms)
P-Value (custom tables algorithms)
Small Sample Test Validity (custom tables algorithms)
Test Statistics for Multiple Response Sets (custom tables algorithms)


Small Sample Test Validity (custom tables algorithms)

Pearson's chi-square is a large sample test, it may not be valid when sample size is small. A rule of thumb is to check if there are more than 80% of cells have expected cell counts larger than 5 and expected cell counts are all larger than 1.

Related Topics

Statistics (custom tables algorithms)
Hypothesis (custom tables algorithms)
Statistic (custom tables algorithms)
P-Value (custom tables algorithms)
Use of Case Weights (custom tables algorithms)
Test Statistics for Multiple Response Sets (custom tables algorithms)


Test Statistics for Multiple Response Sets (custom tables algorithms)

The formulas above use a variation of the Pearson chi-square test statistics developed for a combination of categorical variable and a multiple response set as initially suggested by Agresti and Liu (1999). Formulas and properties of this test can be found in a comparative study by Bilder et al. (2000).

An extension of this approach when both variables are multiple response sets is given in the paper by Thomas and Decady (2004). It contains a study of the test properties as well as additional references.

Related Topics

Statistics (custom tables algorithms)
Hypothesis (custom tables algorithms)
Statistic (custom tables algorithms)
P-Value (custom tables algorithms)
Use of Case Weights (custom tables algorithms)
Small Sample Test Validity (custom tables algorithms)


References (custom tables algorithms)

Agresti, A. and Liu, I.-M. (1999), “Modeling responses to a categorical variable allowing arbitrarily many category choices”, Biometrics, 55, 936-943.

Bilder, C.R., Loughin, T.M. and Nettleton, D. (2000), “Multiple marginal independence testing for pick any/c variables”, Communications in Statistics: Simulation, 29, 1285-1316.

Thomas, D.R. and Decady, Y.J. (2004), “Testing for association using multiple response survey data: approximate procedures based on Rao-Scott Approach”, International Journal of Testing, 4, 43-59.

Related Topics

Pearson's Chi-Square
Notation (custom tables algorithms)
Conditions and Assumptions (custom tables algorithms)
Statistics (custom tables algorithms)


Column Proportions Test

Custom Tables algorithms,Custom Tables algorithms,Custom Tables algorithms
column proportions test,column proportions test,column proportions test

This section describes the computation of the column proportions test.

Related Topics

CTABLES Algorithms
Pearson's Chi-Square
Column Means Tests
Notation (custom tables algorithms)
Conditions and Assumptions (custom tables algorithms)
Statistics (custom tables algorithms)


Notation (custom tables algorithms)

Custom Tables algorithms,Custom Tables algorithms,Custom Tables algorithms
notation,notation,notation

The following notation is used throughout this section unless otherwise stated:

R

Number of rows in the sub-table.

C

Number of columns in the sub-table.

Ai

ith category of the row variable.

Bj

jth category of the column variable.

fij

Total case weights in cell (i,j).

cj

Marginal case weights total in jth column.

˜
c
j

Rounded marginal case weights total in jth column.

z

z-statistic.

χ2

Chi-Square statistic.

pij

Column proportion for cell (i,j).

^
p
ij

Estimated column proportion for cell (i,j).

^
p
ijk

Estimate of pooled column proportion of j and kth column in ith row.

p

p-value of a test.

pB

Bonferroni corrected p-value.

α

The significance level supplied by the user.

Related Topics

Column Proportions Test
Conditions and Assumptions (custom tables algorithms)
Statistics (custom tables algorithms)


Conditions and Assumptions (custom tables algorithms)

Custom Tables algorithms,Custom Tables algorithms,Custom Tables algorithms
column proporitions assumptions,column proporitions assumptions,column proporitions assumptions

• Tests will not be performed on Comperimeter tables and tables with scale variables in the layer.

• Pairwise tests are performed on each row of all eligible innermost sub-tables within each layer.

• Sub-tables must have categorical variables or multiple response sets in both rows and columns.

• The number of rows and columns in the sub-table must each be greater than or equal to two.

• Tests are constructed by using all visible categories excluding totals and sub-totals. Hiding of categories and showing of user-missing categories are respected.

• If weighting is on, cell statistics must include weighted cell counts or weighted simple column percents; a weighted analysis will be performed. If weighting is off, cell statistics requested must include cell counts or simple column percents; an unweighted analysis will be performed.

• A proportion will be discarded if the proportion is equal to zero or one, or the sum of case weights in a category is less than 2; that is, if cj<2. If less than two proportions are left after discarding proportions, test will not be performed.

Related Topics

Column Proportions Test
Notation (custom tables algorithms)
Statistics (custom tables algorithms)


Statistics (custom tables algorithms)

Custom Tables algorithms,Custom Tables algorithms,Custom Tables algorithms

The following statistics are available.

Related Topics

Column Proportions Test
Notation (custom tables algorithms)
Conditions and Assumptions (custom tables algorithms)
Table Layout (custom tables algorithms)
Hypothesis (custom tables algorithms)
Aggregated Statistics (custom tables algorithms)
Statistics for the (i,j)th Comparisons (custom tables algorithms)
Bonferroni Adjustment (custom tables algorithms)
Relationship to Pearson's Chi-Square Tests (custom tables algorithms)
Use of Case Weights (custom tables algorithms)


Table Layout (custom tables algorithms)

 | B1 | B2 | ... | BC
A1 | p11 | p12 | ... | p1C
A2 | p21 | p22 | ... | p2C
... | ... | ... | ... | ...
AR | pR1 | pR2 | ... | pRC

Related Topics

Statistics (custom tables algorithms)
Hypothesis (custom tables algorithms)
Aggregated Statistics (custom tables algorithms)
Statistics for the (i,j)th Comparisons (custom tables algorithms)
Bonferroni Adjustment (custom tables algorithms)
Relationship to Pearson's Chi-Square Tests (custom tables algorithms)
Use of Case Weights (custom tables algorithms)


Hypothesis (custom tables algorithms)

Without lost of generality, we will only look at the ith row of the table. Let C* be the number of categories in the ith row where the proportion is greater than zero and less than one, and where the sum of case weights in the corresponding column is at least 2. In the ith row, C*(C*−1)/2 comparisons will be made among pi1,pi2,...,piC. The (j,k)th hypothesis will be

H0jk:pij=pik vs. H1jk:pij≠pik

Related Topics

Statistics (custom tables algorithms)
Table Layout (custom tables algorithms)
Aggregated Statistics (custom tables algorithms)
Statistics for the (i,j)th Comparisons (custom tables algorithms)
Bonferroni Adjustment (custom tables algorithms)
Relationship to Pearson's Chi-Square Tests (custom tables algorithms)
Use of Case Weights (custom tables algorithms)


Aggregated Statistics (custom tables algorithms)

Column proportions tests are based on the aggregated proportions (
^
p
ij) and cell counts for each column (cj). Column proportions are computed using the un-rounded cell counts
^
p
ij=fijcj which are equal to the proportions actually displayed in CTABLES.

Related Topics

Statistics (custom tables algorithms)
Table Layout (custom tables algorithms)
Hypothesis (custom tables algorithms)
Statistics for the (i,j)th Comparisons (custom tables algorithms)
Bonferroni Adjustment (custom tables algorithms)
Relationship to Pearson's Chi-Square Tests (custom tables algorithms)
Use of Case Weights (custom tables algorithms)


Statistics for the (i,j)th Comparisons (custom tables algorithms)

Pooled proportion:
^
p
ijk=
˜
c
j
^
p
ij+
˜
c
k
^
p
ik
˜
c
j+
˜
c
k

z statistic with a categorical variable in the columns: z=(
^
p
ij−
^
p
ik)
√
^
p
ijk(1−
^
p
ijk)(1
˜
c
j+1
˜
c
k)

When multiple response set defines columns there may exist cases that belong to both jth and kth columns. Let
˜
c
jk be the rounded sum of weights for such cases.

z statistic with a multiple response set in the columns: z=(
^
p
ij−
^
p
ik)
√
^
p
ijk(1−
^
p
ijk)(1
˜
c
j+1
˜
c
k−2
˜
c
jk
˜
c
j
˜
c
k)

p-value: p=2[1−Φ(|z|)]

where Φ(z) is the CDF of standard normal distribution.

Alternatively, the statistic can be constructed as a chi-square statistic,

χ2=z2

the p-value will now be given by p=1−F(χ2;1), where F(x;df) is the CDF of a chi-square distribution with df degrees of freedom.

A comparison is significant if p<α (or pB<α, if Bonferroni adjusted).

Related Topics

Statistics (custom tables algorithms)
Table Layout (custom tables algorithms)
Hypothesis (custom tables algorithms)
Aggregated Statistics (custom tables algorithms)
Bonferroni Adjustment (custom tables algorithms)
Relationship to Pearson's Chi-Square Tests (custom tables algorithms)
Use of Case Weights (custom tables algorithms)


Bonferroni Adjustment (custom tables algorithms)

If Bonferroni adjustment for multiple comparisons is requested, the p-value will be adjusted by

pB=min(p*C*(C*−1)2,1)

Related Topics

Statistics (custom tables algorithms)
Table Layout (custom tables algorithms)
Hypothesis (custom tables algorithms)
Aggregated Statistics (custom tables algorithms)
Statistics for the (i,j)th Comparisons (custom tables algorithms)
Relationship to Pearson's Chi-Square Tests (custom tables algorithms)
Use of Case Weights (custom tables algorithms)


Relationship to Pearson's Chi-Square Tests (custom tables algorithms)

With a categorical variable in the columns, the statistics used in column proportion tests is equivalent to the Pearson's chi-square test on a 2×2 table by taking j and kth column and collapsing all rows except the ith row. Therefore performing column proportion tests on a 2×2 table will give you the same result as Pearson's chi-square test.

Related Topics

Statistics (custom tables algorithms)
Table Layout (custom tables algorithms)
Hypothesis (custom tables algorithms)
Aggregated Statistics (custom tables algorithms)
Statistics for the (i,j)th Comparisons (custom tables algorithms)
Bonferroni Adjustment (custom tables algorithms)
Use of Case Weights (custom tables algorithms)


Use of Case Weights (custom tables algorithms)

The case weights (or frequency weights) are supposed to be integers representing number of replications of each case. In column proportions tests, we will only check if the column marginal cj's are integers. If not, they will be rounded to the nearest integer.

Related Topics

Statistics (custom tables algorithms)
Table Layout (custom tables algorithms)
Hypothesis (custom tables algorithms)
Aggregated Statistics (custom tables algorithms)
Statistics for the (i,j)th Comparisons (custom tables algorithms)
Bonferroni Adjustment (custom tables algorithms)
Relationship to Pearson's Chi-Square Tests (custom tables algorithms)


Column Means Tests

Custom Tables algorithms,Custom Tables algorithms,Custom Tables algorithms
column means tests,column means tests,column means tests

This section describes the computation of the column means tests.

Related Topics

CTABLES Algorithms
Pearson's Chi-Square
Column Proportions Test
Notation (custom tables algorithms)
Conditions and Assumptions (custom tables algorithms)
Statistics: All Pairwise Comparisons (custom tables algorithms)


Notation (custom tables algorithms)

Custom Tables algorithms,Custom Tables algorithms,Custom Tables algorithms
notation,notation,notation

The following notation is used throughout this section unless otherwise stated:

k

Number of categories in the sub-table.

k*

Number of categories with case weights greater than or equal to 2.

μi

Population mean of the ith category, i=1,...,k.

xij

jth observation in ith group.

wij

Case weight of the jth observation in ith group.

wi

Sum of case weights in category i, i=1,...,k.

˜
w
i

Rounded sum of case weights in category i, i=1,...,k.

xi

Mean of category i, i=1,...,k.

si

Standard devation of category i, i=1,...,k.

sij

Pooled standard deviation from ith and jth group.

sw

Pooled standard deviation of all categories.

W

Total case weights. Sum of rounded wi's.

pB

p-value adjusted by using Bonferroni method.

α

Significance level supplied by the user.

Related Topics

Column Means Tests
Conditions and Assumptions (custom tables algorithms)
Statistics: All Pairwise Comparisons (custom tables algorithms)


Conditions and Assumptions (custom tables algorithms)

Custom Tables algorithms,Custom Tables algorithms,Custom Tables algorithms
column means assumptions,column means assumptions,column means assumptions

• Tests will not be performed for Comperimeter tables.

• Tests are performed on each innermost sub-tables for each layer.

• The row variable must be a scale variable, possibly nested under or over some categorical variables. The column variable must be categorical or a multiple response set.

• If weighting is on, cell statistics must include weighted means; a weighted analysis will be performed using the weighted statistics. If weighting is off, cell statistics must include means, an unweighted analysis will be performed.

• Tests are constructed by using all visible, non-empty categories excluding totals and sub-totals. Hiding of categories and showing of user-missing categories are respected.

• Total case weights in each category must be at least two. Categories not satisfying this assumption are not used. If number of categories satisfying this condition is less than two, no comparisons will be made.

• Variances of all categories are assumed to be equal.

• User and system missing values of scale variables are excluded.

Related Topics

Column Means Tests
Notation (custom tables algorithms)
Statistics: All Pairwise Comparisons (custom tables algorithms)


Statistics: All Pairwise Comparisons (custom tables algorithms)

Custom Tables algorithms,Custom Tables algorithms,Custom Tables algorithms
column means statistics,column means statistics,column means statistics

The following statistics are available.

Related Topics

Column Means Tests
Notation (custom tables algorithms)
Conditions and Assumptions (custom tables algorithms)
Hypothesis (custom tables algorithms)
Aggregated Statistics (custom tables algorithms)
Statistics for (i,j)th Comparisons (custom tables algorithms)
Bonferroni Adjustment (custom tables algorithms)
Possible Computational Problems (custom tables algorithms)
Use of Case Weights (custom tables algorithms)


Hypothesis (custom tables algorithms)

H0ij:μi=μj vs. H1ij:μi≠μj for all i>j

Total number of hypotheses: k*(k*−1)2, (where k*=kΣi=1I(wi≥2)).

Related Topics

Statistics: All Pairwise Comparisons (custom tables algorithms)
Aggregated Statistics (custom tables algorithms)
Statistics for (i,j)th Comparisons (custom tables algorithms)
Bonferroni Adjustment (custom tables algorithms)
Possible Computational Problems (custom tables algorithms)
Use of Case Weights (custom tables algorithms)


Aggregated Statistics (custom tables algorithms)

The statistics in pairwise comparisons are computed from aggregated category means (xi), sample variances (s2i) and sample sizes (wi), i=1,...,k. Various quantities used in the comparisons are shown below.

Total case weight (sample size): W=kΣi=1round(wi)I(wi≥2)

Mean of ith category: xi=niΣj=1wijxijwi

Sample variance of ith category: s2i=niΣj=1wij(xij−xi)2wi−1

Related Topics

Statistics: All Pairwise Comparisons (custom tables algorithms)
Hypothesis (custom tables algorithms)
Statistics for (i,j)th Comparisons (custom tables algorithms)
Bonferroni Adjustment (custom tables algorithms)
Possible Computational Problems (custom tables algorithms)
Use of Case Weights (custom tables algorithms)


Statistics for (i,j)th Comparisons (custom tables algorithms)

Assuming wi≥2 and wj≥2:

Variance pooled from the two compared categories: s2ij=(
˜
w
i−1)s2i+(
˜
w
j−1)s2j
˜
w
i+
˜
w
j−2

T-statistic, tij = (xi−xj)sij
√ (1
˜
w
i+1
˜
w
j)

P-value p=2[1−F(|tij|;
˜
w
i+
˜
w
j−2)]

where F(t;n) is the cumulative distribution function of a t-distribution with n degrees of freedom.

When multiple response sets determine categories there may exist cases that belong to both the ith and jth categories. Let
˜
w
ij be the rounded sum of weights for such cases.

T-statistic for comparing levels of a multiple response set:

tij = (xi−xj)sij
√ (1
˜
w
i+1
˜
w
j−2
˜
w
ij
˜
w
i
˜
w
j)

P-value: p=2[1−F(|tij|;
˜
w
i+
˜
w
j−
˜
w
ij−2)]

A comparison is significant if p<α (or pB<α, if Bonferroni adjustment is used).

Statisitics for (i,j)th comparisons with variance pooled from all categories

Within groups variance pooled from all the categories:

s2w=kΣi=1I(wi≥2)(
˜
w
i−1)s2iW−k*

T-statistic for levels of a categorical variable:

tij= (xi−xj)sw
√ (1
˜
w
i+1
˜
w
j)

P-value: p=2[1−F(|tij|;W−k*)]

A comparison is significant if p<α (or pB<α, if Bonferroni adjustment is used). This test is available for categories defined by categorical variable only.

Related Topics

Statistics: All Pairwise Comparisons (custom tables algorithms)
Hypothesis (custom tables algorithms)
Aggregated Statistics (custom tables algorithms)
Bonferroni Adjustment (custom tables algorithms)
Possible Computational Problems (custom tables algorithms)
Use of Case Weights (custom tables algorithms)


Bonferroni Adjustment (custom tables algorithms)

If the Bonferroni adjustment for multiple comparisons is requested, the p-value will be adjusted by

pB=min(pk*(k*−1)2,1)

Related Topics

Statistics: All Pairwise Comparisons (custom tables algorithms)
Hypothesis (custom tables algorithms)
Aggregated Statistics (custom tables algorithms)
Statistics for (i,j)th Comparisons (custom tables algorithms)
Possible Computational Problems (custom tables algorithms)
Use of Case Weights (custom tables algorithms)


Possible Computational Problems (custom tables algorithms)

From the formulas, we can see that comparison can be made as long as either s2ij or s2w is nonzero. If variances for both compared categories are zero, the first test cannot be conducted. If variances for all categories with cell count greater than or equal to two are zero, s2w becomes zero and the second test conducted be conducted either.

Related Topics

Statistics: All Pairwise Comparisons (custom tables algorithms)
Hypothesis (custom tables algorithms)
Aggregated Statistics (custom tables algorithms)
Statistics for (i,j)th Comparisons (custom tables algorithms)
Bonferroni Adjustment (custom tables algorithms)
Use of Case Weights (custom tables algorithms)


Use of Case Weights (custom tables algorithms)

The case weights (or frequency weights) are supposed to be integers representing number of replications of each case. If sum of case weights in each group (wi ,i=1,...,k) are not integers, they will be rounded to the nearest integers before calculations. Consequently, the total weight W will become the sum of rounded wi's.

Related Topics

Statistics: All Pairwise Comparisons (custom tables algorithms)
Hypothesis (custom tables algorithms)
Aggregated Statistics (custom tables algorithms)
Statistics for (i,j)th Comparisons (custom tables algorithms)
Bonferroni Adjustment (custom tables algorithms)
Possible Computational Problems (custom tables algorithms)


CURVEFIT Algorithms

CURVEFIT (command),CURVEFIT (command),CURVEFIT (command)
algorithms,algorithms,algorithms
Curve Estimation,Curve Estimation,Curve Estimation
algorithms,algorithms,algorithms
curve estimation algorithms,curve estimation algorithms,curve estimation algorithms

Eleven models can be selected to fit times series and produce forecasts, forecast errors, and confidence limits. In all of the models, the observed series is some function of time.

Related Topics

Notation (curve estimation algorithms)
Models (curve estimation algorithms)
Assumption (curve estimation algorithms)
Application of Regression (curve estimation algorithms)
Predicted Values and Confidence Intervals (curve estimation algorithms)


Notation (curve estimation algorithms)

curve estimation algorithms,curve estimation algorithms,curve estimation algorithms
notation,notation,notation

The following notation is used throughout this chapter unless otherwise stated:

Yt

Observed series; t=1,...,n

E(Yt)

Expected value of Yt

^
Y
t

Predicted value for Yt

Related Topics

CURVEFIT Algorithms
Models (curve estimation algorithms)
Assumption (curve estimation algorithms)
Application of Regression (curve estimation algorithms)
Predicted Values and Confidence Intervals (curve estimation algorithms)


Models (curve estimation algorithms)

curve estimation algorithms,curve estimation algorithms,curve estimation algorithms
models,models,models

CURVEFIT allows the user to specify a model with or without a constant term designated by β0. If this constant term is excluded, simply set it zero or one depending upon whether it appears in an additive or multiplicative manner in the models listed below.

(1) Linear | E(Yt)=β0+β1t
(2) Logarithmic | E(Yt)=β0+β1ln(t)
(3) Inverse | E(Yt)=β0+β1/t
(4) Quadratic | E(Yt)=β0+β1t+β2t2
(5) Cubic | E(Yt)=β0+β1t+β2t2+β3t3
(6) Compound | E(Yt)=β0βt1
(7) Power | E(Yt)=β0tβ1
(8) S | E(Yt)=exp(β0+β1/t)
(9) Growth | E(Yt)=exp(β0+β1t)
(10) Exponential | E(Yt)=β0eβ1t
(11) Logistic | E(Yt)=(1u+β0βt1)−1

Related Topics

CURVEFIT Algorithms
Notation (curve estimation algorithms)
Assumption (curve estimation algorithms)
Application of Regression (curve estimation algorithms)
Predicted Values and Confidence Intervals (curve estimation algorithms)


Assumption (curve estimation algorithms)

curve estimation algorithms,curve estimation algorithms,curve estimation algorithms
assumption,assumption,assumption

We assume that nonlinear models (6) to (11) can be expressed in linear model form by logarithmic transformation. So, for models (6) to (10),

ln(Yt)=ln(E(Yt))+εt

and for model (11),

ln(1Yt−1u)=ln(1E(Yt)−1u)+εt

with εt, t=1,...,n being independently identically distributed N(0, σ2).

Related Topics

CURVEFIT Algorithms
Notation (curve estimation algorithms)
Models (curve estimation algorithms)
Application of Regression (curve estimation algorithms)
Predicted Values and Confidence Intervals (curve estimation algorithms)


Application of Regression (curve estimation algorithms)

curve estimation algorithms,curve estimation algorithms,curve estimation algorithms
regression applicaton,regression applicaton,regression applicaton

Each of the models is expressed in linear form and computational techniques described in the REGRESSION procedure are applied. The dependent variable and independent variables for each model are listed as follows:

Model | Dependent Variable | Independent Variables | Coefficients
(1) | Y | t | β0, β1
(2) | Y | ln﻿(t) | β0, β1
(3) | Y | 1/t | β0, β1
(4) | Y | t, t2 | β0, β1, β2
(5) | Y | t, t2, t3 | β0, β1, β2, β3
(6) | ln(Y) | t | β*0, β*1
(7) | ln(Y) | ln(t) | β*0, β1
(8) | ln(Y) | 1/t | β0, β1
(9) | ln(Y) | t | β0, β1
(10) | ln(Y) | t | β*0, β1
(11) | ln(1Y−1u) | t | β*0, β*1

where β*0=ln(β0) and β*1=ln(β1).

The ANOVA table, coefficient estimates and their standard errors, t-values, and significance levels are computed as in the REGRESSION procedure. Note that for the nonlinear models (6) to (11), we have

se(
^
β
0)≈exp(
^
β
*0)×se(
^
β
*0)

and

se(
^
β
1)≈exp(
^
β
*1)×se(
^
β
*1)

Related Topics

CURVEFIT Algorithms
Notation (curve estimation algorithms)
Models (curve estimation algorithms)
Assumption (curve estimation algorithms)
Predicted Values and Confidence Intervals (curve estimation algorithms)


Predicted Values and Confidence Intervals (curve estimation algorithms)

curve estimation algorithms,curve estimation algorithms,curve estimation algorithms
predicted values,predicted values,predicted values
confidence intervals,confidence intervals,confidence intervals

The regression coefficients for models (1) to (5) are used to obtain the predicted values. For the transformed models, more computations are required to obtain the predicted values for the original models. The formulas are listed below:

(1)

^
Y
t=
^
β
0+
^
β
1t

(2)

^
Y
t=
^
β
0+
^
β
1ln(t)

(3)

^
Y
t=
^
β
0+
^
β
1/t

(4)

^
Y
t=
^
β
0+
^
β
1t+
^
β
2t2

(5)

^
Y
t=
^
β
0+
^
β
1t+
^
β
2t2+
^
β
3t3

(6)

^
Y
*t=
^
β
*0+
^
β
*1t

(7)

^
Y
*t=
^
β
*0+
^
β
1ln(t)

(8)

^
Y
*t=
^
β
0+
^
β
1/t

(9)

^
Y
*t=
^
β
0+
^
β
1t

(10)

^
Y
*t=
^
β
*0+
^
β
1t

(11)

^
Y
*t=
^
β
*0+
^
β
*1t

where
^
Y
*t=ln﻿(
^
Y
t) in models (5) to (10), and
^
Y
*t=ln(1
^
Y
t−1u) in model (11).

The 95% prediction interval for an observation at time t is constructed as follows:

For models (1) to (5):

^
Y
t±t0.025
√ MSE(1+ht+1n)
if constant term is included
^
Y
t±t0.025
√ MSE(1+ht)
otherwise

For models (6) to (10):

exp(
^
Y
*t±t0.025
√ MSE(1+ht+1n)
)

and for model (11):

1exp(
^
Y
*t±t0.025
√ MSE(1+ht+1n)
)+1u

where MSE is the mean square error obtained by fitting the linear model, t0.025 is the 97.5 percentage point from Student t-distribution with MSE degrees of freedom, and ht is the leverage (computational detail in the REGRESSION procedure).

Related Topics

CURVEFIT Algorithms
Notation (curve estimation algorithms)
Models (curve estimation algorithms)
Assumption (curve estimation algorithms)
Application of Regression (curve estimation algorithms)


DESCRIPTIVES Algorithms

DESCRIPTIVES (command),DESCRIPTIVES (command),DESCRIPTIVES (command)
algorithms,algorithms,algorithms
Descriptives,Descriptives,Descriptives
algorithms,algorithms,algorithms
descriptives algorithms,descriptives algorithms,descriptives algorithms

DESCRIPTIVES computes univariate statistics--including the mean, standard deviation, minimum, and maximum--for numeric variables.

Related Topics

Notation (descriptives algorithms)
Moments (descriptives algorithms)
Basic Statistics (descriptives algorithms)
References (descriptives algorithms)


Notation (descriptives algorithms)

descriptives algorithms,descriptives algorithms,descriptives algorithms
notation,notation,notation

The following notation is used throughout this section unless otherwise stated:

Xi | Value of the variable for case i
wi | Weight for case i
N | Number of cases
Wi | Sum of the weights for the first i cases
Xi | Mean for the first i cases

Related Topics

DESCRIPTIVES Algorithms
Moments (descriptives algorithms)
Basic Statistics (descriptives algorithms)
References (descriptives algorithms)


Moments (descriptives algorithms)

descriptives algorithms,descriptives algorithms,descriptives algorithms
moments,moments,moments

Moments about the mean are calculated recursively using a provisional means algorithm (Spicer, 1972):

Wj=jΣi=1wi
vj=wjWj(Xj−Xj−1)
M4j=M4j−1−4vjM3j−1+6v2jM2j−1+(W2j−3wjWj−1w3j) v4jWj−1Wj
M3j=M3j−1−3vjM2j−1+WjWj−1w2j(Wj−2wj)v3j
M2j=M2j−1+WjWj−1wjv2j
Xj=Xj−1+vj
W0=X0=M20=M30=M40=0

After the last observation has been processed,

WN= sum of weights for all cases

XN= mean

MrN=NΣi=1wi(Xi−X)r

Related Topics

DESCRIPTIVES Algorithms
Notation (descriptives algorithms)
Basic Statistics (descriptives algorithms)
References (descriptives algorithms)


Basic Statistics (descriptives algorithms)

descriptives algorithms,descriptives algorithms,descriptives algorithms
basic statistics,basic statistics,basic statistics

Mean

XN

Variance

S2=M2N/(WN−1)

Standard Deviation

S=
√ S2

Standard Error

SX=S
√ WN

Minimum

min Xj
j

Maximum

max Xj
j

Sum

XNWN

Skewness and Standard Error of Skewness

g1=WNM3N(WN−1)(WN−2)S3 se (g1)=
√ 6WN(WN−1)(WN−2)(WN+1)(WN+3)

If WN≤2 or S2<10−20, g1 and its standard error are not calculated.

Kurtosis (Bliss, 1967, p. 144) and Standard Error of Kurtosis

g2=WN(WN+1)M4N−3M2NM2N(WN−1)(WN−1)(WN−2)(WN−3)S4 se (g2)=
√ 4(W2N−1)(SE(g1))2(WN−3)(WN+5)

If WN≤3 or S2<10−20, g2 and its standard error are not calculated.

Z-Scores

Zi=Xi−XNS

If Xi is missing or S≤0, Zi is set to the system missing value.

Related Topics

DESCRIPTIVES Algorithms
Notation (descriptives algorithms)
Moments (descriptives algorithms)
References (descriptives algorithms)


References (descriptives algorithms)

descriptives algorithms,descriptives algorithms,descriptives algorithms
references,references,references

Bliss, C. I. 1967. Statistics in biology, Volume 1. New York: McGraw-Hill.

Spicer, C. C. 1972. Algorithm AS 52: Calculation of power sums of deviations about the mean. Applied Statistics, 21, 226-227.

Related Topics

DESCRIPTIVES Algorithms
Notation (descriptives algorithms)
Moments (descriptives algorithms)
Basic Statistics (descriptives algorithms)


DETECTANOMALY Algorithms

DETECTANOMALY (command),DETECTANOMALY (command),DETECTANOMALY (command)
algorithms,algorithms,algorithms
Identify Unusual Cases,Identify Unusual Cases,Identify Unusual Cases
algorithms,algorithms,algorithms
anomaly detection algorithms,anomaly detection algorithms,anomaly detection algorithms

The Anomaly Detection procedure searches for unusual cases based on deviations from the norms of their cluster groups. The procedure is designed to quickly detect unusual cases for data-auditing purposes in the exploratory data analysis step, prior to any inferential data analysis. This algorithm is designed for generic anomaly detection; that is, the definition of an anomalous case is not specific to any particular application, such as detection of unusual payment patterns in the healthcare industry or detection of money laundering in the finance industry, in which the definition of an anomaly can be well-defined.

Related Topics

Data Assumptions
Notation (anomaly detection algorithms)
Algorithm Steps (anomaly detection algorithms)
Modeling Stage (anomaly detection algorithms)
Scoring Stage (anomaly detection algorithms)
Odd Situations (anomaly detection algorithms)
Reasoning Stage (anomaly detection algorithms)
Key Formulas from Two-Step Clustering (anomaly detection algorithms)


Data Assumptions

Data. This procedure works with both continuous and categorical variables. Each row represents a distinct observation, and each column represents a distinct variable upon which the peer groups are based. A case identification variable can be available in the data file for marking output, but it will not be used in the analysis. Missing values are allowed. The weight variable, if specified, is ignored.

The detection model can be applied to a new test data file. The elements of the test data must be the same as the elements of the training data. And, depending on the algorithm settings, the missing value handling that is used to create the model may be applied to the test data file prior to scoring.

Case order. Note that the solution may depend on the order of cases. To minimize order effects, randomly order the cases. To verify the stability of a given solution, you may want to obtain several different solutions with cases sorted in different random orders. In situations with extremely large file sizes, multiple runs can be performed with a sample of cases sorted in different random orders.

Assumptions. The algorithm assumes that all variables are nonconstant and independent and that no case has missing values for any of the input variables. Each continuous variable is assumed to have a normal (Gaussian) distribution, and each categorical variable is assumed to have a multinomial distribution. Empirical internal testing indicates that the procedure is fairly robust to violations of both the assumption of independence and the distributional assumptions, but be aware of how well these assumptions are met.

Related Topics

DETECTANOMALY Algorithms
Notation (anomaly detection algorithms)
Algorithm Steps (anomaly detection algorithms)
Modeling Stage (anomaly detection algorithms)
Scoring Stage (anomaly detection algorithms)
Odd Situations (anomaly detection algorithms)
Reasoning Stage (anomaly detection algorithms)
Key Formulas from Two-Step Clustering (anomaly detection algorithms)


Notation (anomaly detection algorithms)

The following notation is used throughout this chapter unless otherwise stated:

ID | The identity variable of each case in the data file.
n | The number of cases in the training data Xtrain .
Xok, k = 1, …, K | The set of input variables in the training data.
Mk, k ∈ {1, …, K} | If Xok is a continuous variable, Mk represents the grand mean, or average of the variable across the entire training data.
SDk, k ∈ {1, …, K} | If Xok is a continuous variable, SDk represents the grand standard deviation, or standard deviation of the variable across the entire training data.
XK+1 | A continuous variable created in the analysis. It represents the percentage of variables (k = 1, …, K) that have missing values in each case.
Xk, k = 1, …, K | The set of processed input variables after the missing value handling is applied. See the topic Modeling Stage (anomaly detection algorithms) for more information.
H, or the boundaries of H: [Hmin, Hmax] | H is the pre-specified number of cluster groups to create. Alternatively, the bounds [Hmin, Hmax] can be used to specify the minimum and maximum numbers of cluster groups.
nh, h = 1, …, H | The number of cases in cluster h, h = 1, …, H, based on the training data.
ph, h = 1, …, H | The proportion of cases in cluster h, h = 1, …, H, based on the training data. For each h, ph = nh/n.
Mhk, k = 1, …, K+1, h = 1, …, H | If Xk is a continuous variable, Mhk represents the cluster mean, or average of the variable in cluster h based on the training data. If Xk is a categorical variable, it represents the cluster mode, or most popular categorical value of the variable in cluster h based on the training data.
SDhk, k ∈ {1, …, K+1}, h = 1, …, H | If Xk is a continuous variable, SDhk represents the cluster standard deviation, or standard deviation of the variable in cluster h based on the training data.
{nhkj}, k ∈ {1, …, K}, h = 1, …, H, j = 1, …, Jk | The frequency set {nhkj} is defined only when Xk is a categorical variable. If Xk has Jk categories, then nhkj is the number of cases in cluster h that fall into category j.
m | An adjustment weight used to balance the influence between continuous and categorical variables. It is a positive value with a default of 6.
VDIk, k = 1, …, K+1 | The variable deviation index of a case is a measure of the deviation of variable value Xk from its cluster norm.
GDI | The group deviation index GDI of a case is the log-likelihood distance d(h, s), which is the sum of all of the variable deviation indices {VDIk, k = 1, …, K+1}.
anomaly index | The anomaly index of a case is the ratio of the GDI to that of the average GDI for the cluster group to which the case belongs.
variable contribution measure | The variable contribution measure of variable Xk for a case is the ratio of the VDIk to the case’s corresponding GDI.
pctanomaly or nanomaly | A pre-specified value pctanomaly determines the percentage of cases to be considered as anomalies. Alternatively, a pre-specified positive integer value nanomaly determines the number of cases to be considered as anomalies.
cutpointanomaly | A pre-specified cutpoint; cases with anomaly index values greater than cutpointanomaly are considered anomalous.
kanomaly | A pre-specified integer threshold 1≤kanomaly≤K+1 determines the number of variables considered as the reasons that the case is identified as an anomaly.

Related Topics

DETECTANOMALY Algorithms
Data Assumptions
Algorithm Steps (anomaly detection algorithms)
Modeling Stage (anomaly detection algorithms)
Scoring Stage (anomaly detection algorithms)
Odd Situations (anomaly detection algorithms)
Reasoning Stage (anomaly detection algorithms)
Key Formulas from Two-Step Clustering (anomaly detection algorithms)


Algorithm Steps (anomaly detection algorithms)

This algorithm is divided into three stages:

Modeling. Cases are placed into cluster groups based on their similarities on a set of input variables. The clustering model used to determine the cluster group of a case and the sufficient statistics used to calculate the norms of the cluster groups are stored.

Scoring. The model is applied to each case to identify its cluster group and some indices are created for each case to measure the unusualness of the case with respect to its cluster group. All cases are sorted by the values of the anomaly indices. The top portion of the case list is identified as the set of anomalies.

Reasoning. For each anomalous case, the variables are sorted by its corresponding variable deviation indices. The top variables, their values, and the corresponding norm values are presented as the reasons why a case is identified as an anomaly.

Related Topics

DETECTANOMALY Algorithms
Data Assumptions
Notation (anomaly detection algorithms)
Modeling Stage (anomaly detection algorithms)
Scoring Stage (anomaly detection algorithms)
Odd Situations (anomaly detection algorithms)
Reasoning Stage (anomaly detection algorithms)
Key Formulas from Two-Step Clustering (anomaly detection algorithms)


Modeling Stage (anomaly detection algorithms)

This stage performs the following tasks:

1. Training Set Formation. Starting with the specified variables and cases, remove any case with extremely large values (greater than 1.0E+150) on any continuous variable. If missing value handling is not in effect, also remove cases with a missing value on any variable. Remove variables with all constant nonmissing values or all missing values. The remaining cases and variables are used to create the anomaly detection model. Statistics output to pivot table by the procedure are based on this training set, but variables saved to the dataset are computed for all cases.

2. Missing Value Handling (Optional). For each input variable Xok, k = 1, …, K, if Xok is a continuous variable, use all valid values of that variable to compute the grand mean Mk and grand standard deviation SDk. Replace the missing values of the variable by its grand mean. If Xok is a categorical variable, combine all missing values into a "missing value" category. This category is treated as a valid category. Denote the processed form of {Xok} by {Xk}.

3. Creation of Missing Value Pct Variable (Optional). A new continuous variable, XK+1, is created that represents the percentage of variables (both continuous and categorical) with missing values in each case.

4. Cluster Group Identification. The processed input variables {Xk, k = 1, …, K+1} are used to create a clustering model. The two-step clustering algorithm is used with noise handling turned on (see the TwoStep Cluster algorithm document for more information).

5. Sufficient Statistics Storage. The cluster model and the sufficient statistics for the variables by cluster are stored for the Scoring stage:

• The grand mean Mk and standard deviation SDk of each continuous variable are stored, k ∈ {1, …, K+1}.

• For each cluster h = 1, …, H, store the size nh. If Xk is a continuous variable, store the cluster mean Mhk and standard deviation SDhk of the variable based on the cases in cluster h. If Xk is a categorical variable, store the frequency nhkj of each category j of the variable based on the cases in cluster h. Also store the modal category Mhk. These sufficient statistics will be used in calculating the log-likelihood distance d(h, s) between a cluster h and a given case s.

Related Topics

DETECTANOMALY Algorithms
Data Assumptions
Notation (anomaly detection algorithms)
Algorithm Steps (anomaly detection algorithms)
Scoring Stage (anomaly detection algorithms)
Odd Situations (anomaly detection algorithms)
Reasoning Stage (anomaly detection algorithms)
Key Formulas from Two-Step Clustering (anomaly detection algorithms)


Scoring Stage (anomaly detection algorithms)

This stage performs the following tasks on scoring (testing or training) data:

1. New Valid Category Screening. The scoring data should contain the input variables {Xok, k = 1, …, K} in the training data. Moreover, the format of the variables in the scoring data should be the same as those in the training data file during the Modeling Stage.

Cases in the scoring data are screened out if they contain a categorical variable with a valid category that does not appear in the training data. For example, if Region is a categorical variable with categories IL, MA and CA in the training data, a case in the scoring data that has a valid category FL for Region will be excluded from the analysis.

2. Missing Value Handling (Optional). For each input variable Xok, if Xok is a continuous variable, use all valid values of that variable to compute the grand mean Mk and grand standard deviation SDk. Replace the missing values of the variable by its grand mean. If Xok is a categorical variable, combine all missing values and put together a missing value category. This category is treated as a valid category.

3. Creation of Missing Value Pct Variable (Optional depending on Modeling Stage). If XK+1 is created in the Modeling Stage, it is also computed for the scoring data.

4. Assign Each Case to its Closest Non-Noise Cluster. The clustering model from the Modeling Stage is applied to the processed variables of the scoring data file to create a cluster ID for each case. Cases belonging to the noise cluster are reassigned to their closest non-noise cluster. See the TwoStep Cluster algorithm document for more information on the noise cluster.

Variable Deviation Index,Variable Deviation Index,Variable Deviation Index
VDI,VDI,VDI
see Variable Deviation Index,see Variable Deviation Index,see Variable Deviation Index

5. Calculate Variable Deviation Indices. Given a case s, the closest cluster h is found. The variable deviation index VDIk of variable Xk is defined as the contribution dk(h, s) of the variable to its log-likelihood distance d(h, s). The corresponding norm value is Mhk, which is the cluster sample mean of Xk if Xk is continuous, or the cluster mode of Xk if Xk is categorical.

Group Deviation Index,Group Deviation Index,Group Deviation Index
GDI,GDI,GDI
see Group Deviation Index,see Group Deviation Index,see Group Deviation Index

6. Calculate Group Deviation Index. The group deviation index GDI of a case is the log-likelihood distance d(h, s), which is the sum of all the variable deviation indices {VDIk, k = 1, …, K+1}.

anomaly index,anomaly index,anomaly index
variable contribution measure,variable contribution measure,variable contribution measure
in anomaly detection,in anomaly detection,in anomaly detection

7. Calculate Anomaly Index and Variable Contribution Measures. Two additional indices are calculated that are easier to interpret than the group deviation index and the variable deviation index.

The anomaly index of a case is an alternative to the GDI, which is computed as the ratio of the case's GDI to the average GDI of the cluster to which the case belongs. Increasing values of this index correspond to greater deviations from the average and indicate better anomaly candidates.

A variable's variable contribution measure of a case is an alternative to the VDI, which is computed as the ratio of the variable's VDI to the case's GDI. This is the proportional contribution of the variable to the deviation of the case. The larger the value of this measure, the greater the variable's contribution to the deviation.

Related Topics

DETECTANOMALY Algorithms
Data Assumptions
Notation (anomaly detection algorithms)
Algorithm Steps (anomaly detection algorithms)
Modeling Stage (anomaly detection algorithms)
Odd Situations (anomaly detection algorithms)
Reasoning Stage (anomaly detection algorithms)
Key Formulas from Two-Step Clustering (anomaly detection algorithms)


Odd Situations (anomaly detection algorithms)

Zero Divided by Zero

The situation in which the GDI of a case is zero and the average GDI of the cluster that the case belongs to is also zero is possible if the cluster is a singleton or is made up of identical cases and the case in question is the same as the identical cases. Whether this case is considered as an anomaly or not depends on whether the number of identical cases that make up the cluster is large or small. For example, suppose that there is a total of 10 cases in the training and two clusters are resulted in which one cluster is a singleton; that is, made up of one case, and the other has nine cases. In this situation, the case in the singleton cluster should be considered as an anomaly as it does not belong to the larger cluster. One way to calculate the anomaly index in this situation is to set it as the ratio of average cluster size to the size of the cluster h, which is:

n/Hnh

Following the 10 cases example, the anomaly index for the case belonging to the singleton cluster would be (10/2)/1 = 5, which should be large enough for the algorithm to catch it as an anomaly. In this situation, the variable contribution measure is set to 1/(K+1), where (K+1) is the number of processed variables in the analysis.

Nonzero Divided by Zero

The situation in which the GDI of a case is nonzero but the average GDI of the cluster that the case belongs to is 0 is possible if the corresponding cluster is a singleton or is made up of identical cases and the case in question is not the same as the identical cases. Suppose that case i belongs to cluster h, which has a zero average GDI; that is, average(GDI)h = 0, but the GDI between case i and cluster h is nonzero; that is, GDI(i, h) ≠ 0. One choice for the anomaly index calculation of case i could be to set the denominator as the weighted average GDI over all other clusters if this value is not 0; else set the calculation as the ratio of average cluster size to the size of cluster h. That is,

{
GDI(i,h)1(n−nh)ΣHs=1,≠hns·average(GDI)s | if 1(n−nh)HΣs=1,≠hns·average(GDI)s≠0
n/Hnh | otherwise

This situation triggers a warning that the case is assigned to a cluster that is made up of identical cases.

Related Topics

DETECTANOMALY Algorithms
Data Assumptions
Notation (anomaly detection algorithms)
Algorithm Steps (anomaly detection algorithms)
Modeling Stage (anomaly detection algorithms)
Scoring Stage (anomaly detection algorithms)
Reasoning Stage (anomaly detection algorithms)
Key Formulas from Two-Step Clustering (anomaly detection algorithms)


Reasoning Stage (anomaly detection algorithms)

Every case now has a group deviation index and anomaly index and a set of variable deviation indices and variable contribution measures. The purpose of this stage is to rank the likely anomalous cases and provide the reasons to suspect them of being anomalous.

1. Identify the Most Anomalous Cases. Sort the cases in descending order on the values of the anomaly index. The top pctanomaly % (or alternatively, the top nanomaly) gives the anomaly list, subject to the restriction that cases with an anomaly index less than or equal to cutpointanomaly are not considered anomalous.

2. Provide Reasons for Considering a Case Anomalous. For each anomalous case, sort the variables by their corresponding VDIk values in descending order. The top kanomaly variable names, its value (of the corresponding original variable Xok), and the norm values are displayed as reasoning.

Related Topics

DETECTANOMALY Algorithms
Data Assumptions
Notation (anomaly detection algorithms)
Algorithm Steps (anomaly detection algorithms)
Modeling Stage (anomaly detection algorithms)
Scoring Stage (anomaly detection algorithms)
Odd Situations (anomaly detection algorithms)
Key Formulas from Two-Step Clustering (anomaly detection algorithms)


Key Formulas from Two-Step Clustering (anomaly detection algorithms)

The two-step clustering algorithm consists of: (a) a pre-cluster step that pre-clusters cases into many sub-clusters and (b) a cluster step that clusters the sub-clusters resulting from pre-cluster step into the desired number of clusters. It can also select the number of clusters automatically.

The formula for the log-likelihood distance d(j, s) between 2 clusters j and s is as follows:

d(j,s)=ξj+ξs−ξ<j,s>

where

ξv=−Nv(ΣKAk=1log(Δk+
^
σ
2vk)/2+ΣKBk=1
^
E
vk)

and

^
E
vk=−ΣLkl=1Nvkl/Nvlog(Nvkl/Nv)

in which Δk> 0 is a positive adjustment included in the formula to avoid the logarithm of zero in the calculation. Its value is set as:

Δk=
^
σ
2km

where m is user-specified and set to m = 6 by default, and
^
σ
2k is the sample variance of variable Xk over the entire training sample.

The log-likelihood distance can be computed as follows:

d(j,s)=ΣKA+KBk=1dk(j,s)

where

dk(j,s)={
{−Njlog(Δk+
^
σ
2jk)−Nslog(Δk+
^
σ
2sk)+N<j,s>log(Δk+
^
σ
2<j,s>k)}/2
{−Nj
^
E
jk−Ns
^
E
sk+N<j,s>
^
E
<j,s>k}

depending on whether the corresponding variable Xk is continuous or categorical.

See the topic TWOSTEP CLUSTER Algorithms for more information.

Related Topics

DETECTANOMALY Algorithms
Data Assumptions
Notation (anomaly detection algorithms)
Algorithm Steps (anomaly detection algorithms)
Modeling Stage (anomaly detection algorithms)
Scoring Stage (anomaly detection algorithms)
Odd Situations (anomaly detection algorithms)
Reasoning Stage (anomaly detection algorithms)


DISCRIMINANT Algorithms

DISCRIMINANT (command),DISCRIMINANT (command),DISCRIMINANT (command)
algorithms,algorithms,algorithms
Discriminant Analysis,Discriminant Analysis,Discriminant Analysis
algorithms,algorithms,algorithms
discriminant analysis algorithms,discriminant analysis algorithms,discriminant analysis algorithms

No analysis is done for any subfile group for which the number of non-empty groups is less than two or the number of cases or sum of weights fails to exceed the number of non-empty groups. An analysis may be stopped if no variables are selected during variable selection or the eigenanalysis fails.

Related Topics

Notation (discriminant analysis algorithms)
Basic Statistics (discriminant analysis algorithms)
Rules of Variable Selection (discriminant analysis algorithms)
Computations During Variable Selection (discriminant analysis algorithms)
Classification Functions (discriminant analysis algorithms)
Canonical Discriminant Functions (discriminant analysis algorithms)
Classification (discriminant analysis algorithms)
Cross-Validation (discriminant analysis algorithms)
Rotations (discriminant analysis algorithms)
References (discriminant analysis algorithms)


Notation (discriminant analysis algorithms)

discriminant analysis algorithms,discriminant analysis algorithms,discriminant analysis algorithms
notation,notation,notation

The following notation is used throughout this chapter unless otherwise stated:

g | Number of groups
p | Number of variables
q | Number of variables selected
Xijk | Value of variable i for case k in group j
fjk | Case weights for case k in group j
mj | Number of cases in group j
nj | Sum of case weights in group j
n | Total sum of weights

Related Topics

DISCRIMINANT Algorithms
Basic Statistics (discriminant analysis algorithms)
Rules of Variable Selection (discriminant analysis algorithms)
Computations During Variable Selection (discriminant analysis algorithms)
Classification Functions (discriminant analysis algorithms)
Canonical Discriminant Functions (discriminant analysis algorithms)
Classification (discriminant analysis algorithms)
Cross-Validation (discriminant analysis algorithms)
Rotations (discriminant analysis algorithms)
References (discriminant analysis algorithms)


Basic Statistics (discriminant analysis algorithms)

discriminant analysis algorithms,discriminant analysis algorithms,discriminant analysis algorithms
basic statistics,basic statistics,basic statistics

The procedure calculates the following basic statistics.

Related Topics

DISCRIMINANT Algorithms
Notation (discriminant analysis algorithms)
Rules of Variable Selection (discriminant analysis algorithms)
Computations During Variable Selection (discriminant analysis algorithms)
Classification Functions (discriminant analysis algorithms)
Canonical Discriminant Functions (discriminant analysis algorithms)
Classification (discriminant analysis algorithms)
Cross-Validation (discriminant analysis algorithms)
Rotations (discriminant analysis algorithms)
References (discriminant analysis algorithms)
Mean (discriminant analysis algorithms)
Variances (discriminant analysis algorithms)
Within-Groups Sums of Squares and Cross-Product Matrix (W) (discriminant analysis algorithms)
Total Sums of Squares and Cross-Product Matrix (T) (discriminant analysis algorithms)
Within-Groups Covariance Matrix (discriminant analysis algorithms)
Individual Group Covariance Matrices (discriminant analysis algorithms)
Within-Groups Correlation Matrix (R) (discriminant analysis algorithms)
Total Covariance Matrix (discriminant analysis algorithms)
Univariate F and Λ for Variable I (discriminant analysis algorithms)


Mean (discriminant analysis algorithms)

Xij=(mjΣk=1fjkXijk)/nj ( variable i in group j)
Xi·=(gΣj=1mjΣk=1fjkXijk)/n
( variable i)

Related Topics

Basic Statistics (discriminant analysis algorithms)
Variances (discriminant analysis algorithms)
Within-Groups Sums of Squares and Cross-Product Matrix (W) (discriminant analysis algorithms)
Total Sums of Squares and Cross-Product Matrix (T) (discriminant analysis algorithms)
Within-Groups Covariance Matrix (discriminant analysis algorithms)
Individual Group Covariance Matrices (discriminant analysis algorithms)
Within-Groups Correlation Matrix (R) (discriminant analysis algorithms)
Total Covariance Matrix (discriminant analysis algorithms)
Univariate F and Λ for Variable I (discriminant analysis algorithms)


Variances (discriminant analysis algorithms)

S2ij=(mjΣk=1fjkX2ijk−njX2ij)(nj−1) ( variable i in group j)
S2i·=(gΣj=1mjΣk=1fjkX2ijk−nX2i)(n−1)
( variable i)

Related Topics

Basic Statistics (discriminant analysis algorithms)
Mean (discriminant analysis algorithms)
Within-Groups Sums of Squares and Cross-Product Matrix (W) (discriminant analysis algorithms)
Total Sums of Squares and Cross-Product Matrix (T) (discriminant analysis algorithms)
Within-Groups Covariance Matrix (discriminant analysis algorithms)
Individual Group Covariance Matrices (discriminant analysis algorithms)
Within-Groups Correlation Matrix (R) (discriminant analysis algorithms)
Total Covariance Matrix (discriminant analysis algorithms)
Univariate F and Λ for Variable I (discriminant analysis algorithms)


Within-Groups Sums of Squares and Cross-Product Matrix (W) (discriminant analysis algorithms)

wil=gΣj=1mjΣk=1fjkXijkXljk−gΣj=1(mjΣk=1fjkXijk)(mjΣk=1fjkXljk)/nj i, l=1, ..., p

Related Topics

Basic Statistics (discriminant analysis algorithms)
Mean (discriminant analysis algorithms)
Variances (discriminant analysis algorithms)
Total Sums of Squares and Cross-Product Matrix (T) (discriminant analysis algorithms)
Within-Groups Covariance Matrix (discriminant analysis algorithms)
Individual Group Covariance Matrices (discriminant analysis algorithms)
Within-Groups Correlation Matrix (R) (discriminant analysis algorithms)
Total Covariance Matrix (discriminant analysis algorithms)
Univariate F and Λ for Variable I (discriminant analysis algorithms)


Total Sums of Squares and Cross-Product Matrix (T) (discriminant analysis algorithms)

til=gΣj=1mjΣk=1fjkXijkXljk−(gΣj=1mjΣk=1fjkXijk)(gΣj=1mjΣk=1fjkXljk)/n

Related Topics

Basic Statistics (discriminant analysis algorithms)
Mean (discriminant analysis algorithms)
Variances (discriminant analysis algorithms)
Within-Groups Sums of Squares and Cross-Product Matrix (W) (discriminant analysis algorithms)
Within-Groups Covariance Matrix (discriminant analysis algorithms)
Individual Group Covariance Matrices (discriminant analysis algorithms)
Within-Groups Correlation Matrix (R) (discriminant analysis algorithms)
Total Covariance Matrix (discriminant analysis algorithms)
Univariate F and Λ for Variable I (discriminant analysis algorithms)


Within-Groups Covariance Matrix (discriminant analysis algorithms)

C=W(n−g) n>g

Related Topics

Basic Statistics (discriminant analysis algorithms)
Mean (discriminant analysis algorithms)
Variances (discriminant analysis algorithms)
Within-Groups Sums of Squares and Cross-Product Matrix (W) (discriminant analysis algorithms)
Total Sums of Squares and Cross-Product Matrix (T) (discriminant analysis algorithms)
Individual Group Covariance Matrices (discriminant analysis algorithms)
Within-Groups Correlation Matrix (R) (discriminant analysis algorithms)
Total Covariance Matrix (discriminant analysis algorithms)
Univariate F and Λ for Variable I (discriminant analysis algorithms)


Individual Group Covariance Matrices (discriminant analysis algorithms)

c(j)il=(mjΣk=1fjkXijkXljk−XijXljnj)(nj−1)

Related Topics

Basic Statistics (discriminant analysis algorithms)
Mean (discriminant analysis algorithms)
Variances (discriminant analysis algorithms)
Within-Groups Sums of Squares and Cross-Product Matrix (W) (discriminant analysis algorithms)
Total Sums of Squares and Cross-Product Matrix (T) (discriminant analysis algorithms)
Within-Groups Covariance Matrix (discriminant analysis algorithms)
Within-Groups Correlation Matrix (R) (discriminant analysis algorithms)
Total Covariance Matrix (discriminant analysis algorithms)
Univariate F and Λ for Variable I (discriminant analysis algorithms)


Within-Groups Correlation Matrix (R) (discriminant analysis algorithms)

ril={
wil
√ wiiwll
if wiiwll>0
SYSMIS otherwise

Related Topics

Basic Statistics (discriminant analysis algorithms)
Mean (discriminant analysis algorithms)
Variances (discriminant analysis algorithms)
Within-Groups Sums of Squares and Cross-Product Matrix (W) (discriminant analysis algorithms)
Total Sums of Squares and Cross-Product Matrix (T) (discriminant analysis algorithms)
Within-Groups Covariance Matrix (discriminant analysis algorithms)
Individual Group Covariance Matrices (discriminant analysis algorithms)
Total Covariance Matrix (discriminant analysis algorithms)
Univariate F and Λ for Variable I (discriminant analysis algorithms)


Total Covariance Matrix (discriminant analysis algorithms)

T´=Tn−1

Related Topics

Basic Statistics (discriminant analysis algorithms)
Mean (discriminant analysis algorithms)
Variances (discriminant analysis algorithms)
Within-Groups Sums of Squares and Cross-Product Matrix (W) (discriminant analysis algorithms)
Total Sums of Squares and Cross-Product Matrix (T) (discriminant analysis algorithms)
Within-Groups Covariance Matrix (discriminant analysis algorithms)
Individual Group Covariance Matrices (discriminant analysis algorithms)
Within-Groups Correlation Matrix (R) (discriminant analysis algorithms)
Univariate F and Λ for Variable I (discriminant analysis algorithms)


Univariate F and Λ for Variable I (discriminant analysis algorithms)

Fi=(tii−wii)(n−g)wii(g−1)

with g−1 and n−g degrees of freedom

Λi=wiitii

with 1, g−1 and n−g degrees of freedom

Related Topics

Basic Statistics (discriminant analysis algorithms)
Mean (discriminant analysis algorithms)
Variances (discriminant analysis algorithms)
Within-Groups Sums of Squares and Cross-Product Matrix (W) (discriminant analysis algorithms)
Total Sums of Squares and Cross-Product Matrix (T) (discriminant analysis algorithms)
Within-Groups Covariance Matrix (discriminant analysis algorithms)
Individual Group Covariance Matrices (discriminant analysis algorithms)
Within-Groups Correlation Matrix (R) (discriminant analysis algorithms)
Total Covariance Matrix (discriminant analysis algorithms)


Rules of Variable Selection (discriminant analysis algorithms)

discriminant analysis algorithms,discriminant analysis algorithms,discriminant analysis algorithms
variable selection,variable selection,variable selection

Both direct and stepwise variable entry are possible. Multiple inclusion levels may also be specified.

Related Topics

DISCRIMINANT Algorithms
Notation (discriminant analysis algorithms)
Basic Statistics (discriminant analysis algorithms)
Computations During Variable Selection (discriminant analysis algorithms)
Classification Functions (discriminant analysis algorithms)
Canonical Discriminant Functions (discriminant analysis algorithms)
Classification (discriminant analysis algorithms)
Cross-Validation (discriminant analysis algorithms)
Rotations (discriminant analysis algorithms)
References (discriminant analysis algorithms)
Method = Direct (discriminant analysis algorithms)
Stepwise Variable Selection (discriminant analysis algorithms)
Ineligibility for Inclusion (discriminant analysis algorithms)
Tolerance (discriminant analysis algorithms)
F-to-Remove (discriminant analysis algorithms)
F-to-Enter (discriminant analysis algorithms)
Wilks' Lambda for Testing the Equality of Group Means (discriminant analysis algorithms)
The Approximate F Test for Lambda (the "overall F"), also known as Rao's R (Tatsuoka, 1971) (discriminant analysis algorithms)
Rao's V (Lawley-Hotelling Trace) (Rao, 1952; Morrison, 1976) (discriminant analysis algorithms)
The Squared Mahalanobis Distance (Morrison, 1976) between groups a and b (discriminant analysis algorithms)
The F Value for Testing the Equality of Means of Groups a and b (discriminant analysis algorithms)
The Sum of Unexplained Variations (Dixon, 1973) (discriminant analysis algorithms)


Method = Direct (discriminant analysis algorithms)

For direct variable selection, variables are considered for inclusion in the order in which they are written on the ANALYSIS = list. A variable is included in the analysis if, when it is included, no variable in the analysis will have a tolerance less than the specified tolerance limit (default = 0.001).

Related Topics

Rules of Variable Selection (discriminant analysis algorithms)
Stepwise Variable Selection (discriminant analysis algorithms)
Ineligibility for Inclusion (discriminant analysis algorithms)
Computations During Variable Selection (discriminant analysis algorithms)
Tolerance (discriminant analysis algorithms)
F-to-Remove (discriminant analysis algorithms)
F-to-Enter (discriminant analysis algorithms)
Wilks' Lambda for Testing the Equality of Group Means (discriminant analysis algorithms)
The Approximate F Test for Lambda (the "overall F"), also known as Rao's R (Tatsuoka, 1971) (discriminant analysis algorithms)
Rao's V (Lawley-Hotelling Trace) (Rao, 1952; Morrison, 1976) (discriminant analysis algorithms)
The Squared Mahalanobis Distance (Morrison, 1976) between groups a and b (discriminant analysis algorithms)
The F Value for Testing the Equality of Means of Groups a and b (discriminant analysis algorithms)
The Sum of Unexplained Variations (Dixon, 1973) (discriminant analysis algorithms)


Stepwise Variable Selection (discriminant analysis algorithms)

At each step, the following rules control variable selection:

• Eligible variables with higher inclusion levels are entered before eligible variables with lower inclusion levels.

• The order of entry of eligible variables with the same even inclusion level is determined by their order on the ANALYSIS = specification.

• The order of entry of eligible variables with the same odd level of inclusion is determined by their value on the entry criterion. The variable with the "best" value for the criterion statistic is entered first.

• When level-one processing is reached, prior to inclusion of any eligible variables, all already-entered variables which have level one inclusion numbers are examined for removal. A variable is considered eligible for removal if its F-to-remove is less than the F value for variable removal, or, if probability criteria are used, the significance of its F-to-remove exceeds the specified probability level. If more than one variable is eligible for removal, that variable is removed that leaves the "best" value for the criterion statistic for the remaining variables. Variable removal continues until no more variables are eligible for removal. Sequential entry of variables then proceeds as described previously, except that after each step, variables with inclusion numbers of one are also considered for exclusion as described before.

• A variable with a zero inclusion level is never entered, although some statistics for it are printed.

Related Topics

Rules of Variable Selection (discriminant analysis algorithms)
Method = Direct (discriminant analysis algorithms)
Ineligibility for Inclusion (discriminant analysis algorithms)
Computations During Variable Selection (discriminant analysis algorithms)
Tolerance (discriminant analysis algorithms)
F-to-Remove (discriminant analysis algorithms)
F-to-Enter (discriminant analysis algorithms)
Wilks' Lambda for Testing the Equality of Group Means (discriminant analysis algorithms)
The Approximate F Test for Lambda (the "overall F"), also known as Rao's R (Tatsuoka, 1971) (discriminant analysis algorithms)
Rao's V (Lawley-Hotelling Trace) (Rao, 1952; Morrison, 1976) (discriminant analysis algorithms)
The Squared Mahalanobis Distance (Morrison, 1976) between groups a and b (discriminant analysis algorithms)
The F Value for Testing the Equality of Means of Groups a and b (discriminant analysis algorithms)
The Sum of Unexplained Variations (Dixon, 1973) (discriminant analysis algorithms)


Ineligibility for Inclusion (discriminant analysis algorithms)

A variable with an odd inclusion number is considered ineligible for inclusion if:

• The tolerance of any variable in the analysis (including its own) drops below the specified tolerance limit if it is entered, or

• Its F-to-enter is less than the F-value for a variable to enter value, or

• If probability criteria are used, the significance level associated with its F-to-enter exceeds the probability to enter.

A variable with an even inclusion number is ineligible for inclusion if the first condition above is met.

Related Topics

Rules of Variable Selection (discriminant analysis algorithms)
Method = Direct (discriminant analysis algorithms)
Stepwise Variable Selection (discriminant analysis algorithms)
Computations During Variable Selection (discriminant analysis algorithms)
Tolerance (discriminant analysis algorithms)
F-to-Remove (discriminant analysis algorithms)
F-to-Enter (discriminant analysis algorithms)
Wilks' Lambda for Testing the Equality of Group Means (discriminant analysis algorithms)
The Approximate F Test for Lambda (the "overall F"), also known as Rao's R (Tatsuoka, 1971) (discriminant analysis algorithms)
Rao's V (Lawley-Hotelling Trace) (Rao, 1952; Morrison, 1976) (discriminant analysis algorithms)
The Squared Mahalanobis Distance (Morrison, 1976) between groups a and b (discriminant analysis algorithms)
The F Value for Testing the Equality of Means of Groups a and b (discriminant analysis algorithms)
The Sum of Unexplained Variations (Dixon, 1973) (discriminant analysis algorithms)


Computations During Variable Selection (discriminant analysis algorithms)

During variable selection, the matrix W is replaced at each step by a new matrix W* using the symmetric sweep operator described by Dempster (1969). If the first q variables have been included in the analysis, W may be partitioned as:

[
W11 | W12
W21 | W22
]

where W11 is q×q. At this stage, the matrix W* is defined by

W*=[
−W−111 | W−111W12
W21W−111 | W22−W21W−111W12
]=[
W*11 | W*12
W*21 | W*22
]

In addition, when stepwise variable selection is used, T is replaced by the matrix T*, defined similarly.

The following statistics are computed.

Related Topics

DISCRIMINANT Algorithms
Notation (discriminant analysis algorithms)
Basic Statistics (discriminant analysis algorithms)
Rules of Variable Selection (discriminant analysis algorithms)
Classification Functions (discriminant analysis algorithms)
Canonical Discriminant Functions (discriminant analysis algorithms)
Classification (discriminant analysis algorithms)
Cross-Validation (discriminant analysis algorithms)
Rotations (discriminant analysis algorithms)
References (discriminant analysis algorithms)
Method = Direct (discriminant analysis algorithms)
Stepwise Variable Selection (discriminant analysis algorithms)
Ineligibility for Inclusion (discriminant analysis algorithms)
Tolerance (discriminant analysis algorithms)
F-to-Remove (discriminant analysis algorithms)
F-to-Enter (discriminant analysis algorithms)
Wilks' Lambda for Testing the Equality of Group Means (discriminant analysis algorithms)
The Approximate F Test for Lambda (the "overall F"), also known as Rao's R (Tatsuoka, 1971) (discriminant analysis algorithms)
Rao's V (Lawley-Hotelling Trace) (Rao, 1952; Morrison, 1976) (discriminant analysis algorithms)
The Squared Mahalanobis Distance (Morrison, 1976) between groups a and b (discriminant analysis algorithms)
The F Value for Testing the Equality of Means of Groups a and b (discriminant analysis algorithms)
The Sum of Unexplained Variations (Dixon, 1973) (discriminant analysis algorithms)


Tolerance (discriminant analysis algorithms)

TOL i={
0 | if wii=0
w*ii/wii | if variable i is not in the analysis and wii≠0
−1/(w*iiwii) | if variable i is in the analysis and wii≠0.

If a variable's tolerance is less than or equal to the specified tolerance limit, or its inclusion in the analysis would reduce the tolerance of another variable in the equation to or below the limit, the following statistics are not computed for it or any set including it.

Related Topics

Rules of Variable Selection (discriminant analysis algorithms)
Method = Direct (discriminant analysis algorithms)
Stepwise Variable Selection (discriminant analysis algorithms)
Ineligibility for Inclusion (discriminant analysis algorithms)
Computations During Variable Selection (discriminant analysis algorithms)
F-to-Remove (discriminant analysis algorithms)
F-to-Enter (discriminant analysis algorithms)
Wilks' Lambda for Testing the Equality of Group Means (discriminant analysis algorithms)
The Approximate F Test for Lambda (the "overall F"), also known as Rao's R (Tatsuoka, 1971) (discriminant analysis algorithms)
Rao's V (Lawley-Hotelling Trace) (Rao, 1952; Morrison, 1976) (discriminant analysis algorithms)
The Squared Mahalanobis Distance (Morrison, 1976) between groups a and b (discriminant analysis algorithms)
The F Value for Testing the Equality of Means of Groups a and b (discriminant analysis algorithms)
The Sum of Unexplained Variations (Dixon, 1973) (discriminant analysis algorithms)


F-to-Remove (discriminant analysis algorithms)

Fi=(w*ii−t*ii)(n−q−g+1)t*ii(g−1)

with degrees of freedom g−1 and n−q−g+1.

Related Topics

Rules of Variable Selection (discriminant analysis algorithms)
Method = Direct (discriminant analysis algorithms)
Stepwise Variable Selection (discriminant analysis algorithms)
Ineligibility for Inclusion (discriminant analysis algorithms)
Computations During Variable Selection (discriminant analysis algorithms)
Tolerance (discriminant analysis algorithms)
F-to-Enter (discriminant analysis algorithms)
Wilks' Lambda for Testing the Equality of Group Means (discriminant analysis algorithms)
The Approximate F Test for Lambda (the "overall F"), also known as Rao's R (Tatsuoka, 1971) (discriminant analysis algorithms)
Rao's V (Lawley-Hotelling Trace) (Rao, 1952; Morrison, 1976) (discriminant analysis algorithms)
The Squared Mahalanobis Distance (Morrison, 1976) between groups a and b (discriminant analysis algorithms)
The F Value for Testing the Equality of Means of Groups a and b (discriminant analysis algorithms)
The Sum of Unexplained Variations (Dixon, 1973) (discriminant analysis algorithms)


F-to-Enter (discriminant analysis algorithms)

Fi=(t*ii−w*ii)(n−q−g)w*ii(g−1)

with degrees of freedom g−1 and n−q−g.

Related Topics

Rules of Variable Selection (discriminant analysis algorithms)
Method = Direct (discriminant analysis algorithms)
Stepwise Variable Selection (discriminant analysis algorithms)
Ineligibility for Inclusion (discriminant analysis algorithms)
Computations During Variable Selection (discriminant analysis algorithms)
Tolerance (discriminant analysis algorithms)
F-to-Remove (discriminant analysis algorithms)
Wilks' Lambda for Testing the Equality of Group Means (discriminant analysis algorithms)
The Approximate F Test for Lambda (the "overall F"), also known as Rao's R (Tatsuoka, 1971) (discriminant analysis algorithms)
Rao's V (Lawley-Hotelling Trace) (Rao, 1952; Morrison, 1976) (discriminant analysis algorithms)
The Squared Mahalanobis Distance (Morrison, 1976) between groups a and b (discriminant analysis algorithms)
The F Value for Testing the Equality of Means of Groups a and b (discriminant analysis algorithms)
The Sum of Unexplained Variations (Dixon, 1973) (discriminant analysis algorithms)


Wilks' Lambda for Testing the Equality of Group Means (discriminant analysis algorithms)

Λ=|W11|/|T11|

with degrees of freedom q, g−1 and n−g.

Related Topics

Rules of Variable Selection (discriminant analysis algorithms)
Method = Direct (discriminant analysis algorithms)
Stepwise Variable Selection (discriminant analysis algorithms)
Ineligibility for Inclusion (discriminant analysis algorithms)
Computations During Variable Selection (discriminant analysis algorithms)
Tolerance (discriminant analysis algorithms)
F-to-Remove (discriminant analysis algorithms)
F-to-Enter (discriminant analysis algorithms)
The Approximate F Test for Lambda (the "overall F"), also known as Rao's R (Tatsuoka, 1971) (discriminant analysis algorithms)
Rao's V (Lawley-Hotelling Trace) (Rao, 1952; Morrison, 1976) (discriminant analysis algorithms)
The Squared Mahalanobis Distance (Morrison, 1976) between groups a and b (discriminant analysis algorithms)
The F Value for Testing the Equality of Means of Groups a and b (discriminant analysis algorithms)
The Sum of Unexplained Variations (Dixon, 1973) (discriminant analysis algorithms)


The Approximate F Test for Lambda (the "overall F"), also known as Rao's R (Tatsuoka, 1971) (discriminant analysis algorithms)

F=(1−Λs)(r/s+1−qh/2)Λsqh

where

s={
√ q2+h2−5q2h2−4
if q2+h2≠5
1 otherwise
r=n−1−(q+g)/2
h=g−1

with degrees of freedom qh and r/s+1−qh/2. The approximation is exact if q or h is 1 or 2.

Related Topics

Rules of Variable Selection (discriminant analysis algorithms)
Method = Direct (discriminant analysis algorithms)
Stepwise Variable Selection (discriminant analysis algorithms)
Ineligibility for Inclusion (discriminant analysis algorithms)
Computations During Variable Selection (discriminant analysis algorithms)
Tolerance (discriminant analysis algorithms)
F-to-Remove (discriminant analysis algorithms)
F-to-Enter (discriminant analysis algorithms)
Wilks' Lambda for Testing the Equality of Group Means (discriminant analysis algorithms)
Rao's V (Lawley-Hotelling Trace) (Rao, 1952; Morrison, 1976) (discriminant analysis algorithms)
The Squared Mahalanobis Distance (Morrison, 1976) between groups a and b (discriminant analysis algorithms)
The F Value for Testing the Equality of Means of Groups a and b (discriminant analysis algorithms)
The Sum of Unexplained Variations (Dixon, 1973) (discriminant analysis algorithms)


Rao's V (Lawley-Hotelling Trace) (Rao, 1952; Morrison, 1976) (discriminant analysis algorithms)

V=−(n−g)qΣi=1qΣl=1w*il(til−wil)

When n−g is large, V, under the null hypothesis, is approximately distributed as χ2 with q(g−1) degrees of freedom. When an additional variable is entered, the change in V, if positive, has approximately a χ2 distribution with g−1 degrees of freedom.

Related Topics

Rules of Variable Selection (discriminant analysis algorithms)
Method = Direct (discriminant analysis algorithms)
Stepwise Variable Selection (discriminant analysis algorithms)
Ineligibility for Inclusion (discriminant analysis algorithms)
Computations During Variable Selection (discriminant analysis algorithms)
Tolerance (discriminant analysis algorithms)
F-to-Remove (discriminant analysis algorithms)
F-to-Enter (discriminant analysis algorithms)
Wilks' Lambda for Testing the Equality of Group Means (discriminant analysis algorithms)
The Approximate F Test for Lambda (the "overall F"), also known as Rao's R (Tatsuoka, 1971) (discriminant analysis algorithms)
The Squared Mahalanobis Distance (Morrison, 1976) between groups a and b (discriminant analysis algorithms)
The F Value for Testing the Equality of Means of Groups a and b (discriminant analysis algorithms)
The Sum of Unexplained Variations (Dixon, 1973) (discriminant analysis algorithms)


The Squared Mahalanobis Distance (Morrison, 1976) between groups a and b (discriminant analysis algorithms)

D2ab=−(n−g)qΣi=1qΣl=1w*il(Xia−Xib)(Xla−Xlb)

Related Topics

Rules of Variable Selection (discriminant analysis algorithms)
Method = Direct (discriminant analysis algorithms)
Stepwise Variable Selection (discriminant analysis algorithms)
Ineligibility for Inclusion (discriminant analysis algorithms)
Computations During Variable Selection (discriminant analysis algorithms)
Tolerance (discriminant analysis algorithms)
F-to-Remove (discriminant analysis algorithms)
F-to-Enter (discriminant analysis algorithms)
Wilks' Lambda for Testing the Equality of Group Means (discriminant analysis algorithms)
The Approximate F Test for Lambda (the "overall F"), also known as Rao's R (Tatsuoka, 1971) (discriminant analysis algorithms)
Rao's V (Lawley-Hotelling Trace) (Rao, 1952; Morrison, 1976) (discriminant analysis algorithms)
The F Value for Testing the Equality of Means of Groups a and b (discriminant analysis algorithms)
The Sum of Unexplained Variations (Dixon, 1973) (discriminant analysis algorithms)


The F Value for Testing the Equality of Means of Groups a and b (discriminant analysis algorithms)

Fab=(n−q−g+1)nanbq(n−g)(na+nb)D2ab

Related Topics

Rules of Variable Selection (discriminant analysis algorithms)
Method = Direct (discriminant analysis algorithms)
Stepwise Variable Selection (discriminant analysis algorithms)
Ineligibility for Inclusion (discriminant analysis algorithms)
Computations During Variable Selection (discriminant analysis algorithms)
Tolerance (discriminant analysis algorithms)
F-to-Remove (discriminant analysis algorithms)
F-to-Enter (discriminant analysis algorithms)
Wilks' Lambda for Testing the Equality of Group Means (discriminant analysis algorithms)
The Approximate F Test for Lambda (the "overall F"), also known as Rao's R (Tatsuoka, 1971) (discriminant analysis algorithms)
Rao's V (Lawley-Hotelling Trace) (Rao, 1952; Morrison, 1976) (discriminant analysis algorithms)
The Squared Mahalanobis Distance (Morrison, 1976) between groups a and b (discriminant analysis algorithms)
The Sum of Unexplained Variations (Dixon, 1973) (discriminant analysis algorithms)


The Sum of Unexplained Variations (Dixon, 1973) (discriminant analysis algorithms)

R=g−1Σa=1gΣb=a+14/(4+D2ab)

Related Topics

Rules of Variable Selection (discriminant analysis algorithms)
Method = Direct (discriminant analysis algorithms)
Stepwise Variable Selection (discriminant analysis algorithms)
Ineligibility for Inclusion (discriminant analysis algorithms)
Computations During Variable Selection (discriminant analysis algorithms)
Tolerance (discriminant analysis algorithms)
F-to-Remove (discriminant analysis algorithms)
F-to-Enter (discriminant analysis algorithms)
Wilks' Lambda for Testing the Equality of Group Means (discriminant analysis algorithms)
The Approximate F Test for Lambda (the "overall F"), also known as Rao's R (Tatsuoka, 1971) (discriminant analysis algorithms)
Rao's V (Lawley-Hotelling Trace) (Rao, 1952; Morrison, 1976) (discriminant analysis algorithms)
The Squared Mahalanobis Distance (Morrison, 1976) between groups a and b (discriminant analysis algorithms)
The F Value for Testing the Equality of Means of Groups a and b (discriminant analysis algorithms)


Classification Functions (discriminant analysis algorithms)

discriminant analysis algorithms,discriminant analysis algorithms,discriminant analysis algorithms
classification functions,classification functions,classification functions

Once a set of q variables has been selected, the classification functions (also known as Fisher's linear discriminant functions) can be computed using

bij=(n−g)qΣl=1w*ilXlj i=1, 2, ..., q,j=1, 2, ..., g

for the coefficients, and

aj=logpj−12qΣi=1bijXij j=1, 2, ..., q

for the constant, where pj is the prior probability of group j.

Related Topics

DISCRIMINANT Algorithms
Notation (discriminant analysis algorithms)
Basic Statistics (discriminant analysis algorithms)
Rules of Variable Selection (discriminant analysis algorithms)
Computations During Variable Selection (discriminant analysis algorithms)
Canonical Discriminant Functions (discriminant analysis algorithms)
Classification (discriminant analysis algorithms)
Cross-Validation (discriminant analysis algorithms)
Rotations (discriminant analysis algorithms)
References (discriminant analysis algorithms)


Canonical Discriminant Functions (discriminant analysis algorithms)

discriminant analysis algorithms,discriminant analysis algorithms,discriminant analysis algorithms
canonical discriminant functions,canonical discriminant functions,canonical discriminant functions

The canonical discriminant function coefficients are determined by solving the general eigenvalue problem

(T−W)V=λWV

where V is the unscaled matrix of discriminant function coefficients and λ is a diagonal matrix of eigenvalues. The eigensystem is solved as follows:

The Cholesky decomposition

W=LU

is formed, where L is a lower triangular matrix, and U=L´.

The symmetric matrix L−1BU−1 is formed and the system

(L−1(T−W)U−1−λI)(UV)=0

is solved using tridiagonalization and the QL method. The result is m eigenvalues, where m=min(q, g−1) and corresponding orthonormal eigenvectors, UV. The eigenvectors of the original system are obtained as

V=U−1(UV)

For each of the eigenvalues, which are ordered in descending magnitude, the following statistics are calculated.

Related Topics

DISCRIMINANT Algorithms
Notation (discriminant analysis algorithms)
Basic Statistics (discriminant analysis algorithms)
Rules of Variable Selection (discriminant analysis algorithms)
Computations During Variable Selection (discriminant analysis algorithms)
Classification Functions (discriminant analysis algorithms)
Classification (discriminant analysis algorithms)
Cross-Validation (discriminant analysis algorithms)
Rotations (discriminant analysis algorithms)
References (discriminant analysis algorithms)
Percentage of Between-Groups Variance Accounted for (discriminant analysis algorithms)
Canonical Correlation (discriminant analysis algorithms)
Wilks' Lambda (discriminant analysis algorithms)
The Standardized Canonical Discriminant Coefficient Matrix D (discriminant analysis algorithms)
The Correlations Between the Canonical Discriminant Functions and the Discriminating Variables (discriminant analysis algorithms)
The Unstandardized Coefficients (discriminant analysis algorithms)
Tests For Equality Of Variance (discriminant analysis algorithms)


Percentage of Between-Groups Variance Accounted for (discriminant analysis algorithms)

100λkmΣk=1λk

Related Topics

Canonical Discriminant Functions (discriminant analysis algorithms)
Canonical Correlation (discriminant analysis algorithms)
Wilks' Lambda (discriminant analysis algorithms)
The Standardized Canonical Discriminant Coefficient Matrix D (discriminant analysis algorithms)
The Correlations Between the Canonical Discriminant Functions and the Discriminating Variables (discriminant analysis algorithms)
The Unstandardized Coefficients (discriminant analysis algorithms)
Tests For Equality Of Variance (discriminant analysis algorithms)


Canonical Correlation (discriminant analysis algorithms)

√ λk/(1+λk)

Related Topics

Canonical Discriminant Functions (discriminant analysis algorithms)
Percentage of Between-Groups Variance Accounted for (discriminant analysis algorithms)
Wilks' Lambda (discriminant analysis algorithms)
The Standardized Canonical Discriminant Coefficient Matrix D (discriminant analysis algorithms)
The Correlations Between the Canonical Discriminant Functions and the Discriminating Variables (discriminant analysis algorithms)
The Unstandardized Coefficients (discriminant analysis algorithms)
Tests For Equality Of Variance (discriminant analysis algorithms)


Wilks' Lambda (discriminant analysis algorithms)

Testing the significance of all the discriminating functions after the first k:

Λk=m∏i=k+11/(1+λi) k=0, 1, ..., m−1

The significance level is based on

χ2=−(n−(q+g)/2−1)lnΛk

which is distributed as a χ2 with (q−k)(g−k−1) degrees of freedom.

Related Topics

Canonical Discriminant Functions (discriminant analysis algorithms)
Percentage of Between-Groups Variance Accounted for (discriminant analysis algorithms)
Canonical Correlation (discriminant analysis algorithms)
The Standardized Canonical Discriminant Coefficient Matrix D (discriminant analysis algorithms)
The Correlations Between the Canonical Discriminant Functions and the Discriminating Variables (discriminant analysis algorithms)
The Unstandardized Coefficients (discriminant analysis algorithms)
Tests For Equality Of Variance (discriminant analysis algorithms)


The Standardized Canonical Discriminant Coefficient Matrix D (discriminant analysis algorithms)

The standard canonical discriminant coefficient matrix D is computed as

D=S−111V

where

S= diag (
√ w11
,
√ w22
, ...,
√ wpp
)

S11= partition containing the first q rows and columns of S

V is a matrix of eigenvectors such that V´W11V=I

Related Topics

Canonical Discriminant Functions (discriminant analysis algorithms)
Percentage of Between-Groups Variance Accounted for (discriminant analysis algorithms)
Canonical Correlation (discriminant analysis algorithms)
Wilks' Lambda (discriminant analysis algorithms)
The Correlations Between the Canonical Discriminant Functions and the Discriminating Variables (discriminant analysis algorithms)
The Unstandardized Coefficients (discriminant analysis algorithms)
Tests For Equality Of Variance (discriminant analysis algorithms)


The Correlations Between the Canonical Discriminant Functions and the Discriminating Variables (discriminant analysis algorithms)

The correlations between the canonical discriminant functions and the discriminating variables are given by

R=S−1111W11V

If some variables were not selected for inclusion in the analysis (q<p), the eigenvectors are implicitly extended with zeroes to include the nonselected variables in the correlation matrix. Variables for which Wii=0 are excluded from S and W for this calculation; p then represents the number of variables with non-zero within-groups variance.

Related Topics

Canonical Discriminant Functions (discriminant analysis algorithms)
Percentage of Between-Groups Variance Accounted for (discriminant analysis algorithms)
Canonical Correlation (discriminant analysis algorithms)
Wilks' Lambda (discriminant analysis algorithms)
The Standardized Canonical Discriminant Coefficient Matrix D (discriminant analysis algorithms)
The Unstandardized Coefficients (discriminant analysis algorithms)
Tests For Equality Of Variance (discriminant analysis algorithms)


The Unstandardized Coefficients (discriminant analysis algorithms)

The unstandardized coefficients are calculated from the standardized ones using

B=
√ (n−g)
S−111D

The associated constants are:

ak=−qΣi=1bikXi·

The group centroids are the canonical discriminant functions evaluated at the group means:

fkj=ak+qΣi=1bikXij

Related Topics

Canonical Discriminant Functions (discriminant analysis algorithms)
Percentage of Between-Groups Variance Accounted for (discriminant analysis algorithms)
Canonical Correlation (discriminant analysis algorithms)
Wilks' Lambda (discriminant analysis algorithms)
The Standardized Canonical Discriminant Coefficient Matrix D (discriminant analysis algorithms)
The Correlations Between the Canonical Discriminant Functions and the Discriminating Variables (discriminant analysis algorithms)
Tests For Equality Of Variance (discriminant analysis algorithms)


Tests For Equality Of Variance (discriminant analysis algorithms)

Box's M is used to test for equality of the group covariance matrices.

M=(n−g) log |C´|−gΣj=1(nj−1) log |C(j)|

where

C´ = pooled within-groups covariance matrix excluding groups with singular covariance matrices

C(j) = covariance matrix for group j.

Determinants of C´ and C(j) are obtained from the Cholesky decomposition. If any diagonal element of the decomposition is less than 10-11, the matrix is considered singular and excluded from the analysis.

log|C(j)|=2pΣi=1loglii−plog(nj−1)

where lii is the ith diagonal entry of L such that (nj−1)C(j)=L´L. Similarly,

log|C´|=2pΣi=1loglii−plog(n´−g)

where

(n´−g)C´=L´L

n´= sum of weights of cases in all groups with nonsingular covariance matrices

The significance level is obtained from the F distribution with t1 and t2 degrees of freedom using (Cooley and Lohnes, 1971):

F={
M/b | if e2>e21
t2Mt1(b−M) | if e2<e21

where

e1=(gΣj=11nj−1−1n−g)2p2+3p−16(g−1)(p+1)
e2=(gΣj=11(nj−1)2−1(n−g)2)(p−1)(p+2)6(g−1)
t1=(g−1)p(p+1)/2
t2=(t1+2)/|e2−e21|
b={
t11−e1−t1/t2 | if e2>e21
t21−e1−2/t2 | if e2<e21

If e21−e2 is zero, or much smaller than e2, t2 cannot be computed or cannot be computed accurately. If

e2=e2+0.0001(e2−e21)

the program uses Bartlett's χ2 statistic rather than the F statistic:

χ2=M(1−e1)

with t1 degrees of freedom.

For testing the group covariance matrix of the canonical discriminant functions, the procedure is similar. The covariance matrices C´ and C(j) are replaced by Dj and D´, where

Dj=B´C(j)B

is the group covariance matrix of the discriminant functions.

The pooled covariance matrix in this case is an identity, so that

D´=(n−g)Im−
Σ
j
(nj−1)Dj

where the summation is only over groups with singular Dj.

Related Topics

Canonical Discriminant Functions (discriminant analysis algorithms)
Percentage of Between-Groups Variance Accounted for (discriminant analysis algorithms)
Canonical Correlation (discriminant analysis algorithms)
Wilks' Lambda (discriminant analysis algorithms)
The Standardized Canonical Discriminant Coefficient Matrix D (discriminant analysis algorithms)
The Correlations Between the Canonical Discriminant Functions and the Discriminating Variables (discriminant analysis algorithms)
The Unstandardized Coefficients (discriminant analysis algorithms)


Classification (discriminant analysis algorithms)

discriminant analysis algorithms,discriminant analysis algorithms,discriminant analysis algorithms
classification,classification,classification

The basic procedure for classifying a case is as follows:

• If X is the 1×q vector of discriminating variables for the case, the 1×m vector of canonical discriminant function values is

f=XB+a

• A chi-square distance from each centroid is computed

χ2j=(f−fj)D−1j(f−fj)´

where Dj is the covariance matrix of canonical discriminant functions for group j and fj is the group centroid vector. If the case is a member of group j, χ2j has a χ2 distribution with m degrees of freedom. P(X|G) is the significance level of such a χ2j .

• The classification, or posterior probability, is

P(Gj | X)=Pj|Dj|−1/2e−χ2j/2gΣj=1Pj|Dj|−1/2e−χ2j/2

where pj is the prior probability for group j. A case is classified into the group for which P(Gj | X) is highest.

The actual calculation of P(Gj | X) is

gj=logPj−12(log|Dj|+χ2j)
P(Gj | X)={
exp(gj−
max
j
gj)gΣj=1exp(gj−
max
j
gj) 		if gj−
max
j
gj>−46
0 otherwise

If individual group covariances are not used in classification, the pooled within-groups covariance matrix of the discriminant functions (an identity matrix) is substituted for Dj in the above calculation, resulting in considerable simplification.

If any Dj is singular, a pseudo-inverse of the form

[
D−1j11 | 0
0 | 0
]

replaces D−1j and |Dj11| replaces |Dj|. Dj11 is a submatrix of Dj whose rows and columns correspond to functions not dependent on preceding functions. That is, function 1 will be excluded only if the rank of Dj=0, function 2 will be excluded only if it is dependent on function 1, and so on. This choice of the pseudo-inverse is not optimal for the numerical stability of D−1j11, but maximizes the discrimination power of the remaining functions.

Related Topics

DISCRIMINANT Algorithms
Notation (discriminant analysis algorithms)
Basic Statistics (discriminant analysis algorithms)
Rules of Variable Selection (discriminant analysis algorithms)
Computations During Variable Selection (discriminant analysis algorithms)
Classification Functions (discriminant analysis algorithms)
Canonical Discriminant Functions (discriminant analysis algorithms)
Cross-Validation (discriminant analysis algorithms)
Rotations (discriminant analysis algorithms)
References (discriminant analysis algorithms)


Cross-Validation (discriminant analysis algorithms)

discriminant analysis algorithms,discriminant analysis algorithms,discriminant analysis algorithms
cross-validation,cross-validation,cross-validation
leave-one-out classification,leave-one-out classification,leave-one-out classification
discriminant analysis algorithms,discriminant analysis algorithms,discriminant analysis algorithms

The following notation is used in this section:

Xjk
˜

(X1jk,...,Xqjk)T

Mj
˜

Sample mean of jth group

Mj
˜
=1njmjΣk=1fjk
Xjk
˜

Mjk
˜

Sample mean of jth group excluding point
Xjk
˜

Mjk
˜
=1nj−fjkmjΣ
l=1
l≠k
fjl
Xjl
˜

Σ

Polled sample covariance matrix

Σj

Sample covariance matrix of jth group

Σjk

Polled sample covariance matrix without point
Xjk
˜

Σ−1jk

=n−g−fjkn−g(Σ−1+njΣ−1j(
Xjk
˜
−
Mj
˜
)(
Xjk
˜
−
Mj
˜
)TΣ−1j(nj−fjk)(nj−g)−nj(
Xjk
˜
−
Mj
˜
)TΣ−1j(
Xjk
˜
−
Mj
˜
))

d20(
a
˜
,
b
˜
)

(
a
˜
−
b
˜
)TΣ−1jk(
a
˜
−
b
˜
)T

Cross-validation applies only to linear discriminant analysis (not quadratic). During cross-validation, all cases in the dataset are looped over. Each case, say
Xjk
˜
, is extracted once and treated as test data. The remaining cases are treated as a new dataset.

Here we compute d20(
Xjk
˜
,
Mjk
˜
) and d20(
Xjk
˜
,
Mi
˜
)(i=1,...,g.i≠j). If there is an i(i≠j) that satisfies (log(Pi)−d20(
Xjk
˜
,
Mi
˜
)/2>log(Pj)−d20(
Xjk
˜
,
Mjk
˜
)/2), then the extracted point
Xjk
˜
is misclassified. The estimate of prediction error rate is the ratio of the sum of misclassified case weights and the sum of all case weights.

To reduce computation time, the linear discriminant method is used instead of the canonical discriminant method. The theoretical solution is exactly the same for both methods.

Related Topics

DISCRIMINANT Algorithms
Notation (discriminant analysis algorithms)
Basic Statistics (discriminant analysis algorithms)
Rules of Variable Selection (discriminant analysis algorithms)
Computations During Variable Selection (discriminant analysis algorithms)
Classification Functions (discriminant analysis algorithms)
Canonical Discriminant Functions (discriminant analysis algorithms)
Classification (discriminant analysis algorithms)
Rotations (discriminant analysis algorithms)
References (discriminant analysis algorithms)


Rotations (discriminant analysis algorithms)

discriminant analysis algorithms,discriminant analysis algorithms,discriminant analysis algorithms
rotations,rotations,rotations

Varimax rotations may be performed on either the matrix of canonical discriminant function coefficients or on that of the correlation between the canonical discriminant functions and the discrimination variables (the structure matrix). The actual algorithm for the rotation is described in FACTOR. For the Kaiser normalization

h2i={
1+1/wiiw*ii
( squared multiple correlation )
if coefficients rotated
mΣk=1r2ik if correlations rotated

The unrotated structure matrix is

R=S−111W11V

If the rotation transformation matrix is represented by K, the rotated standardized coefficient matrix DR is given by

DR=DK

The rotated matrix of pooled within-groups correlations between the canonical discriminant functions and the discriminating variables RR is

RR=RK

The eigenvector matrix V satisfies

V´(T−W)V=Λ= diag (λ1, λ2, ..., λm)

where the λk are the eigenvalues. The equivalent matrix for the rotated coefficient VR

(VR)´(T−W)VR

is not diagonal, meaning the rotated functions, unlike the unrotated ones, are correlated for the original sample, although their within-groups covariance matrix is an identity. The diagonals of the above matrix may still be interpreted as the between-groups variances of the functions. They are the numerators for the proportions of variance printed with the transformation matrix. The denominator is their sum. After rotation, the columns of the transformation are exchanged, if necessary, so that the diagonals of the matrix above are in descending order.

Related Topics

DISCRIMINANT Algorithms
Notation (discriminant analysis algorithms)
Basic Statistics (discriminant analysis algorithms)
Rules of Variable Selection (discriminant analysis algorithms)
Computations During Variable Selection (discriminant analysis algorithms)
Classification Functions (discriminant analysis algorithms)
Canonical Discriminant Functions (discriminant analysis algorithms)
Classification (discriminant analysis algorithms)
Cross-Validation (discriminant analysis algorithms)
References (discriminant analysis algorithms)


References (discriminant analysis algorithms)

discriminant analysis algorithms,discriminant analysis algorithms,discriminant analysis algorithms
references,references,references

Anderson, T. W. 1958. Introduction to multivariate statistical analysis. New York: John Wiley & Sons, Inc..

Cooley, W. W., and P. R. Lohnes. 1971. Multivariate data analysis. New York: John Wiley & Sons, Inc..

Dempster, A. P. 1969. Elements of Continuous Multivariate Analysis. Reading, MA: Addison-Wesley.

Dixon, W. J. 1973. BMD Biomedical computer programs. Los Angeles: University of California Press.

Tatsuoka, M. M. 1971. Multivariate analysis. New York: John Wiley & Sons, Inc..

Related Topics

DISCRIMINANT Algorithms
Notation (discriminant analysis algorithms)
Basic Statistics (discriminant analysis algorithms)
Rules of Variable Selection (discriminant analysis algorithms)
Computations During Variable Selection (discriminant analysis algorithms)
Classification Functions (discriminant analysis algorithms)
Canonical Discriminant Functions (discriminant analysis algorithms)
Classification (discriminant analysis algorithms)
Cross-Validation (discriminant analysis algorithms)
Rotations (discriminant analysis algorithms)


ERROR BARS Algorithms

error bars algorithms,error bars algorithms,error bars algorithms

This section describes the algorithms for error bar computation of the mean, median and their confidence intervals for a simple random sample.

Related Topics

Notation (error bars algorithms)
Descriptive Statistics (error bars algorithms)
References (error bars algorithms)


Notation (error bars algorithms)

error bars algorithms,error bars algorithms,error bars algorithms
notation,notation,notation

The following notation is used throughout this section unless otherwise noted:

Let y1≤...≤ym be m ordered observations for the sample and w1,...,wm be the corresponding case weights. Then

wwi=iΣk=1wk= cumulative sum of weights up to and including yi

and

W=wwm=mΣk=1wk= total sum of weights

p=CI100,CI is the confidence interval level 0≤CI<100.

Related Topics

ERROR BARS Algorithms
Descriptive Statistics (error bars algorithms)
References (error bars algorithms)


Descriptive Statistics (error bars algorithms)

error bars algorithms,error bars algorithms,error bars algorithms
descriptive statistics,descriptive statistics,descriptive statistics

The following statistics are available.

Related Topics

ERROR BARS Algorithms
Notation (error bars algorithms)
References (error bars algorithms)
Mean (error bars algorithms)
Confidence Interval for the Mean (error bars algorithms)
Variance (error bars algorithms)
Standard Deviation (error bars algorithms)
Standard Error (error bars algorithms)
Median (error bars algorithms)
Confidence Interval for the Median (error bars algorithms)
Algorithm: Hettmansperger-Sheather Interpolation (1986) (error bars algorithms)


Mean (error bars algorithms)

error bars algorithms,error bars algorithms,error bars algorithms
mean,mean,mean

y=mΣi=1wiyiW

Related Topics

Descriptive Statistics (error bars algorithms)
Confidence Interval for the Mean (error bars algorithms)
Variance (error bars algorithms)
Standard Deviation (error bars algorithms)
Standard Error (error bars algorithms)
Median (error bars algorithms)
Confidence Interval for the Median (error bars algorithms)
Algorithm: Hettmansperger-Sheather Interpolation (1986) (error bars algorithms)


Confidence Interval for the Mean (error bars algorithms)

error bars algorithms,error bars algorithms,error bars algorithms
confidence interval for the mean,confidence interval for the mean,confidence interval for the mean

Lower bound = y−IDF.T(p+12,W−1)·SE

Upper bound = y+IDF.T(p+12,W−1)·SE

where SE is the standard error, and IDF.T is the inverse student t function documented in the COMPUTE command.

Related Topics

Descriptive Statistics (error bars algorithms)
Mean (error bars algorithms)
Variance (error bars algorithms)
Standard Deviation (error bars algorithms)
Standard Error (error bars algorithms)
Median (error bars algorithms)
Confidence Interval for the Median (error bars algorithms)
Algorithm: Hettmansperger-Sheather Interpolation (1986) (error bars algorithms)


Variance (error bars algorithms)

error bars algorithms,error bars algorithms,error bars algorithms
variance,variance,variance

s2=1W−1mΣi=1wi(yi−y)2

Related Topics

Descriptive Statistics (error bars algorithms)
Mean (error bars algorithms)
Confidence Interval for the Mean (error bars algorithms)
Standard Deviation (error bars algorithms)
Standard Error (error bars algorithms)
Median (error bars algorithms)
Confidence Interval for the Median (error bars algorithms)
Algorithm: Hettmansperger-Sheather Interpolation (1986) (error bars algorithms)


Standard Deviation (error bars algorithms)

error bars algorithms,error bars algorithms,error bars algorithms
standard deviation,standard deviation,standard deviation

s=
√ s2

Related Topics

Descriptive Statistics (error bars algorithms)
Mean (error bars algorithms)
Confidence Interval for the Mean (error bars algorithms)
Variance (error bars algorithms)
Standard Error (error bars algorithms)
Median (error bars algorithms)
Confidence Interval for the Median (error bars algorithms)
Algorithm: Hettmansperger-Sheather Interpolation (1986) (error bars algorithms)


Standard Error (error bars algorithms)

error bars algorithms,error bars algorithms,error bars algorithms
standard error,standard error,standard error

SE=s
√ W

Related Topics

Descriptive Statistics (error bars algorithms)
Mean (error bars algorithms)
Confidence Interval for the Mean (error bars algorithms)
Variance (error bars algorithms)
Standard Deviation (error bars algorithms)
Median (error bars algorithms)
Confidence Interval for the Median (error bars algorithms)
Algorithm: Hettmansperger-Sheather Interpolation (1986) (error bars algorithms)


Median (error bars algorithms)

error bars algorithms,error bars algorithms,error bars algorithms
median,median,median

The Aempirical method in the EXAMINE procedure is used for computation of the median.

Let

v=W2

and k satisfies

wwk≤v<wwk+1

Then,

g=v−wwk

Let m be the estimated median, then it is defined as

m={
(yk+yk+1)2, | g=0
yk+1, | g>0

Related Topics

Descriptive Statistics (error bars algorithms)
Mean (error bars algorithms)
Confidence Interval for the Mean (error bars algorithms)
Variance (error bars algorithms)
Standard Deviation (error bars algorithms)
Standard Error (error bars algorithms)
Confidence Interval for the Median (error bars algorithms)
Algorithm: Hettmansperger-Sheather Interpolation (1986) (error bars algorithms)


Confidence Interval for the Median (error bars algorithms)

error bars algorithms,error bars algorithms,error bars algorithms
confidence interval for the median,confidence interval for the median,confidence interval for the median

Note: the case weights w1,...,wm must be integers for the following computation. If at least one weight is not integer, an error message is issued.

Let

bi = Pr[Binomial(W,0.5)≥i]
= WΣj=i(
W
i
)0.5W
= IB(0.5;i,W−i)

where IB is the incomplete Beta function.

Define

γi | = | Pr[i≤Binomial(W,0.5)≤W−i]
 | = | bi−bW−i+1
, i=0,1,...,floor(W/2)

and define

γw/2+1=0, if W is even;

γ(w+1)/2=0, if W is odd.

Related Topics

Descriptive Statistics (error bars algorithms)
Mean (error bars algorithms)
Confidence Interval for the Mean (error bars algorithms)
Variance (error bars algorithms)
Standard Deviation (error bars algorithms)
Standard Error (error bars algorithms)
Median (error bars algorithms)
Algorithm: Hettmansperger-Sheather Interpolation (1986) (error bars algorithms)


Algorithm: Hettmansperger-Sheather Interpolation (1986) (error bars algorithms)

error bars algorithms,error bars algorithms,error bars algorithms
Hettmansperger-Sheather interpolation,Hettmansperger-Sheather interpolation,Hettmansperger-Sheather interpolation

1. Re-index all the cases to be x1≤x2,...,≤xW in which

x1 | = | x2,... | =xww1 | =y1
xww1+1 | = | xww1+2... | =xww2 | =y2
·
·
·
xwwm−1+1 = xwwm−1+2... =xwwm =ym

2. If W is even, compute γ0,...,γW/2.
If W is odd, compute γ0,...,γ(W+1)/2.

3. Choose the smallest index k such that γk+1≤p. If k is found, go to Step 4; otherwise, stop and issue a message.

4. Compute

l=γk−pγk−γk+1,

and

λ=(W−k)lk+(W−2k)l.

The p confidence interval is

Lower bound = λ·xk+1+(1−λ)·xk

Upper bound = λ·xW−k+(1−λ)·xW−k+1

Related Topics

Descriptive Statistics (error bars algorithms)
Mean (error bars algorithms)
Confidence Interval for the Mean (error bars algorithms)
Variance (error bars algorithms)
Standard Deviation (error bars algorithms)
Standard Error (error bars algorithms)
Median (error bars algorithms)
Confidence Interval for the Median (error bars algorithms)


References (error bars algorithms)

error bars algorithms,error bars algorithms,error bars algorithms
references,references,references

Hettmansperger, T. P., and S. J. Sheather. 1986. Confidence Interval Based on Interpolated Order Statistics. Statistical Probability Letters, 4, 75-79.

Related Topics

ERROR BARS Algorithms
Notation (error bars algorithms)
Descriptive Statistics (error bars algorithms)


EXAMINE Algorithms

EXAMINE (command),EXAMINE (command),EXAMINE (command)
algorithms,algorithms,algorithms

EXAMINE provides stem-and-leaf plots, histograms, boxplots, normal plots, robust estimates of location, tests of normality, and other descriptive statistics. Separate analyses can be obtained for subgroups of cases.

Related Topics

Univariate Statistics (EXAMINE algorithms)
Group Statistics (EXAMINE algorithms)
Plots (EXAMINE algorithms)
References (EXAMINE algorithms)


Univariate Statistics (EXAMINE algorithms)

EXAMINE algorithms,EXAMINE algorithms,EXAMINE algorithms
univariate statistics,univariate statistics,univariate statistics

This section discusses the computation of statistics for a variable considered on its own.

Related Topics

Notation (EXAMINE algorithms)
Descriptive Statistics (EXAMINE algorithms)
Percentiles (EXAMINE algorithms)
Tests of Normality (EXAMINE algorithms)
EXAMINE Algorithms
Group Statistics (EXAMINE algorithms)
Plots (EXAMINE algorithms)
References (EXAMINE algorithms)


Notation (EXAMINE algorithms)

EXAMINE algorithms,EXAMINE algorithms,EXAMINE algorithms
notation,notation,notation

The following notation is used throughout this chapter unless otherwise noted:

Let y1< ... ym be m distinct ordered observations for the sample and c1, ..., cm be the corresponding caseweights. Then

cci=iΣk=1ck= cumulative frequency up to and including yi

and

W=ccm=mΣk=1ck= total sum of weights.

Related Topics

Univariate Statistics (EXAMINE algorithms)
Descriptive Statistics (EXAMINE algorithms)
Percentiles (EXAMINE algorithms)
Tests of Normality (EXAMINE algorithms)


Descriptive Statistics (EXAMINE algorithms)

EXAMINE algorithms,EXAMINE algorithms,EXAMINE algorithms
descriptive statistics,descriptive statistics,descriptive statistics

The following statistics are available.

Related Topics

Minimum and Maximum (EXAMINE algorithms)
Range (EXAMINE algorithms)
Mean (EXAMINE algorithms)
Confidence Interval for the Mean (EXAMINE algorithms)
Median (EXAMINE algorithms)
Interquartile Range (EXAMINE algorithms)
Variance (EXAMINE algorithms)
Standard Deviation (EXAMINE algorithms)
Standard Error (EXAMINE algorithms)
Skewness and SE of Skewness (EXAMINE algorithms)
Kurtosis and SE of Kurtosis (EXAMINE algorithms)
5% Trimmed Mean (EXAMINE algorithms)
Notation (EXAMINE algorithms)
Percentiles (EXAMINE algorithms)
Tests of Normality (EXAMINE algorithms)


Minimum and Maximum (EXAMINE algorithms)

EXAMINE algorithms,EXAMINE algorithms,EXAMINE algorithms
minimum,minimum,minimum
maximum,maximum,maximum
min=y1, max=ym

Related Topics

Descriptive Statistics (EXAMINE algorithms)
Range (EXAMINE algorithms)
Mean (EXAMINE algorithms)
Confidence Interval for the Mean (EXAMINE algorithms)
Median (EXAMINE algorithms)
Interquartile Range (EXAMINE algorithms)
Variance (EXAMINE algorithms)
Standard Deviation (EXAMINE algorithms)
Standard Error (EXAMINE algorithms)
Skewness and SE of Skewness (EXAMINE algorithms)
Kurtosis and SE of Kurtosis (EXAMINE algorithms)
5% Trimmed Mean (EXAMINE algorithms)


Range (EXAMINE algorithms)

EXAMINE algorithms,EXAMINE algorithms,EXAMINE algorithms
range,range,range
range =ym−y1

Related Topics

Descriptive Statistics (EXAMINE algorithms)
Minimum and Maximum (EXAMINE algorithms)
Mean (EXAMINE algorithms)
Confidence Interval for the Mean (EXAMINE algorithms)
Median (EXAMINE algorithms)
Interquartile Range (EXAMINE algorithms)
Variance (EXAMINE algorithms)
Standard Deviation (EXAMINE algorithms)
Standard Error (EXAMINE algorithms)
Skewness and SE of Skewness (EXAMINE algorithms)
Kurtosis and SE of Kurtosis (EXAMINE algorithms)
5% Trimmed Mean (EXAMINE algorithms)


Mean (EXAMINE algorithms)

EXAMINE algorithms,EXAMINE algorithms,EXAMINE algorithms
mean,mean,mean
y=mΣi=1ciyiW

Related Topics

Descriptive Statistics (EXAMINE algorithms)
Minimum and Maximum (EXAMINE algorithms)
Range (EXAMINE algorithms)
Confidence Interval for the Mean (EXAMINE algorithms)
Median (EXAMINE algorithms)
Interquartile Range (EXAMINE algorithms)
Variance (EXAMINE algorithms)
Standard Deviation (EXAMINE algorithms)
Standard Error (EXAMINE algorithms)
Skewness and SE of Skewness (EXAMINE algorithms)
Kurtosis and SE of Kurtosis (EXAMINE algorithms)
5% Trimmed Mean (EXAMINE algorithms)


Confidence Interval for the Mean (EXAMINE algorithms)

EXAMINE algorithms,EXAMINE algorithms,EXAMINE algorithms
confidence interval for mean,confidence interval for mean,confidence interval for mean
lower bound =y−tα/2,W−1 SE
upper bound =y+tα/2,W−1 SE

where SE is the standard error.

Related Topics

Descriptive Statistics (EXAMINE algorithms)
Minimum and Maximum (EXAMINE algorithms)
Range (EXAMINE algorithms)
Mean (EXAMINE algorithms)
Median (EXAMINE algorithms)
Interquartile Range (EXAMINE algorithms)
Variance (EXAMINE algorithms)
Standard Deviation (EXAMINE algorithms)
Standard Error (EXAMINE algorithms)
Skewness and SE of Skewness (EXAMINE algorithms)
Kurtosis and SE of Kurtosis (EXAMINE algorithms)
5% Trimmed Mean (EXAMINE algorithms)


Median (EXAMINE algorithms)

EXAMINE algorithms,EXAMINE algorithms,EXAMINE algorithms
median,median,median

The median is the 50th percentile, which is calculated by the method requested. The default method is HAVERAGE.

Related Topics

Descriptive Statistics (EXAMINE algorithms)
Minimum and Maximum (EXAMINE algorithms)
Range (EXAMINE algorithms)
Mean (EXAMINE algorithms)
Confidence Interval for the Mean (EXAMINE algorithms)
Interquartile Range (EXAMINE algorithms)
Variance (EXAMINE algorithms)
Standard Deviation (EXAMINE algorithms)
Standard Error (EXAMINE algorithms)
Skewness and SE of Skewness (EXAMINE algorithms)
Kurtosis and SE of Kurtosis (EXAMINE algorithms)
5% Trimmed Mean (EXAMINE algorithms)


Interquartile Range (EXAMINE algorithms)

EXAMINE algorithms,EXAMINE algorithms,EXAMINE algorithms
interquartile range,interquartile range,interquartile range

(IQR) IQR = 75th percentile − 25th percentile, where the 75th and 25th percentiles are calculated by the method requested for percentiles.

Related Topics

Descriptive Statistics (EXAMINE algorithms)
Minimum and Maximum (EXAMINE algorithms)
Range (EXAMINE algorithms)
Mean (EXAMINE algorithms)
Confidence Interval for the Mean (EXAMINE algorithms)
Median (EXAMINE algorithms)
Variance (EXAMINE algorithms)
Standard Deviation (EXAMINE algorithms)
Standard Error (EXAMINE algorithms)
Skewness and SE of Skewness (EXAMINE algorithms)
Kurtosis and SE of Kurtosis (EXAMINE algorithms)
5% Trimmed Mean (EXAMINE algorithms)


Variance (EXAMINE algorithms)

EXAMINE algorithms,EXAMINE algorithms,EXAMINE algorithms
variance,variance,variance
s2=1W−1mΣi=1ci(yi−y)2

Related Topics

Descriptive Statistics (EXAMINE algorithms)
Minimum and Maximum (EXAMINE algorithms)
Range (EXAMINE algorithms)
Mean (EXAMINE algorithms)
Confidence Interval for the Mean (EXAMINE algorithms)
Median (EXAMINE algorithms)
Interquartile Range (EXAMINE algorithms)
Standard Deviation (EXAMINE algorithms)
Standard Error (EXAMINE algorithms)
Skewness and SE of Skewness (EXAMINE algorithms)
Kurtosis and SE of Kurtosis (EXAMINE algorithms)
5% Trimmed Mean (EXAMINE algorithms)


Standard Deviation (EXAMINE algorithms)

EXAMINE algorithms,EXAMINE algorithms,EXAMINE algorithms
standard deviation,standard deviation,standard deviation

s=
√ s2

Related Topics

Descriptive Statistics (EXAMINE algorithms)
Minimum and Maximum (EXAMINE algorithms)
Range (EXAMINE algorithms)
Mean (EXAMINE algorithms)
Confidence Interval for the Mean (EXAMINE algorithms)
Median (EXAMINE algorithms)
Interquartile Range (EXAMINE algorithms)
Variance (EXAMINE algorithms)
Standard Error (EXAMINE algorithms)
Skewness and SE of Skewness (EXAMINE algorithms)
Kurtosis and SE of Kurtosis (EXAMINE algorithms)
5% Trimmed Mean (EXAMINE algorithms)


Standard Error (EXAMINE algorithms)

EXAMINE algorithms,EXAMINE algorithms,EXAMINE algorithms
standard error,standard error,standard error
SE=s
√ W

Related Topics

Descriptive Statistics (EXAMINE algorithms)
Minimum and Maximum (EXAMINE algorithms)
Range (EXAMINE algorithms)
Mean (EXAMINE algorithms)
Confidence Interval for the Mean (EXAMINE algorithms)
Median (EXAMINE algorithms)
Interquartile Range (EXAMINE algorithms)
Variance (EXAMINE algorithms)
Standard Deviation (EXAMINE algorithms)
Skewness and SE of Skewness (EXAMINE algorithms)
Kurtosis and SE of Kurtosis (EXAMINE algorithms)
5% Trimmed Mean (EXAMINE algorithms)


Skewness and SE of Skewness (EXAMINE algorithms)

EXAMINE algorithms,EXAMINE algorithms,EXAMINE algorithms
skewness and SE of skewness,skewness and SE of skewness,skewness and SE of skewness
g1=WM3(W−1)(W−2)s3
SE(g1)=
√ 6W(W−1)(W−2)(W+1)(W+3)
M3=mΣi=1ci(yi−y)3

Related Topics

Descriptive Statistics (EXAMINE algorithms)
Minimum and Maximum (EXAMINE algorithms)
Range (EXAMINE algorithms)
Mean (EXAMINE algorithms)
Confidence Interval for the Mean (EXAMINE algorithms)
Median (EXAMINE algorithms)
Interquartile Range (EXAMINE algorithms)
Variance (EXAMINE algorithms)
Standard Deviation (EXAMINE algorithms)
Standard Error (EXAMINE algorithms)
Kurtosis and SE of Kurtosis (EXAMINE algorithms)
5% Trimmed Mean (EXAMINE algorithms)


Kurtosis and SE of Kurtosis (EXAMINE algorithms)

EXAMINE algorithms,EXAMINE algorithms,EXAMINE algorithms
kurtosis and SE of Kurtosis,kurtosis and SE of Kurtosis,kurtosis and SE of Kurtosis
g2=W(W+1)M4−3M22(W−1)(W−1)(W−2)(W−3)s4
M2=mΣi=1ci(yi−y)2
M4=mΣi=1ci(yi−y)4
SE(g2)=
√ 4(W2−1)SE2(g1)(W−3)(W+5)

Related Topics

Descriptive Statistics (EXAMINE algorithms)
Minimum and Maximum (EXAMINE algorithms)
Range (EXAMINE algorithms)
Mean (EXAMINE algorithms)
Confidence Interval for the Mean (EXAMINE algorithms)
Median (EXAMINE algorithms)
Interquartile Range (EXAMINE algorithms)
Variance (EXAMINE algorithms)
Standard Deviation (EXAMINE algorithms)
Standard Error (EXAMINE algorithms)
Skewness and SE of Skewness (EXAMINE algorithms)
5% Trimmed Mean (EXAMINE algorithms)


5% Trimmed Mean (EXAMINE algorithms)

EXAMINE algorithms,EXAMINE algorithms,EXAMINE algorithms
5% trimmed mean,5% trimmed mean,5% trimmed mean
T0.9=10.9W{(cck1+1−tc)yk1+1+(W−cck2−1−tc)yk2+k2−1Σi=k1+2ciyi}

where k1 and k2 satisfy the following conditions

cck1<tc≤cck1+1, W−
cck2<tc≤W−cck2−1

and

tc=0.05W

Note: If k1+1=k2, then T0.9=yk2

Related Topics

Descriptive Statistics (EXAMINE algorithms)
Minimum and Maximum (EXAMINE algorithms)
Range (EXAMINE algorithms)
Mean (EXAMINE algorithms)
Confidence Interval for the Mean (EXAMINE algorithms)
Median (EXAMINE algorithms)
Interquartile Range (EXAMINE algorithms)
Variance (EXAMINE algorithms)
Standard Deviation (EXAMINE algorithms)
Standard Error (EXAMINE algorithms)
Skewness and SE of Skewness (EXAMINE algorithms)
Kurtosis and SE of Kurtosis (EXAMINE algorithms)


Percentiles (EXAMINE algorithms)

EXAMINE algorithms,EXAMINE algorithms,EXAMINE algorithms
percentiles,percentiles,percentiles

There are five methods for computation of percentiles. Let

tc1=Wp, tc2=(W+1)p

where p is the requested percentile divided by 100, and k1 and k2 satisfy

cck1≤tc1<cck1+1
cck2≤tc2<cck2+1

Then,

g1=(tc1−cck1)ck1+1, g*1=tc1−cck1
g2=(tc2−cck2)ck2+1,
g*2=tc2−cck2

Let x be the pth percentile; the five definitions are as follows:

Waverage (Weighted Average)

Round (Closest Observation)

Empirical (Empirical Distribution Function)

Haverage (Weighted Average)

Aempirical (Empirical Distribution Function with Averaging)

Related Topics

Waverage (Weighted Average) (EXAMINE algorithms)
Round (Closest Observation) (EXAMINE algorithms)
Empirical (Empirical Distribution Function) (EXAMINE algorithms)
Haverage (Weighted Average) (EXAMINE algorithms)
Aempirical (Empirical Distribution Function with Averaging) (EXAMINE algorithms)
Tukey Hinges (EXAMINE algorithms)
M-Estimation (Robust Location Estimation) (EXAMINE algorithms)
M-Estimators (EXAMINE algorithms)
Huber (k), k > 0 (EXAMINE algorithms)
Hampel (a, b, c), 0 < a ≤ b ≤ c (EXAMINE algorithms)
Andrew's Wave (c), c > 0 (EXAMINE algorithms)
Tukey's Biweight (c) (EXAMINE algorithms)
Notation (EXAMINE algorithms)
Descriptive Statistics (EXAMINE algorithms)
Tests of Normality (EXAMINE algorithms)


Waverage (Weighted Average) (EXAMINE algorithms)

EXAMINE algorithms,EXAMINE algorithms,EXAMINE algorithms
waverage,waverage,waverage

This is a weighted average at ytc1.

x={
yk1+1 | if g*1≥1
(1−g*1)yk1+g*1yk1+1 | if g*1<1 and ck1+1≥1
(1−g1)yk1+g1yk1+1 | if g*1<1 and ck1+1<1

Related Topics

Percentiles (EXAMINE algorithms)
Round (Closest Observation) (EXAMINE algorithms)
Empirical (Empirical Distribution Function) (EXAMINE algorithms)
Haverage (Weighted Average) (EXAMINE algorithms)
Aempirical (Empirical Distribution Function with Averaging) (EXAMINE algorithms)
Tukey Hinges (EXAMINE algorithms)
M-Estimation (Robust Location Estimation) (EXAMINE algorithms)
M-Estimators (EXAMINE algorithms)
Huber (k), k > 0 (EXAMINE algorithms)
Hampel (a, b, c), 0 < a ≤ b ≤ c (EXAMINE algorithms)
Andrew's Wave (c), c > 0 (EXAMINE algorithms)
Tukey's Biweight (c) (EXAMINE algorithms)


Round (Closest Observation) (EXAMINE algorithms)

EXAMINE algorithms,EXAMINE algorithms,EXAMINE algorithms
round,round,round

This is the observation closest to ytc1.

If ck1+1≥1, then

x={
yk1 | if g*1<12
yk1+1 | if g*1≥12

If ck1+1<1, then

x={
yk1 | if g1<12
yk1+1 | if g1≥12

Related Topics

Percentiles (EXAMINE algorithms)
Waverage (Weighted Average) (EXAMINE algorithms)
Empirical (Empirical Distribution Function) (EXAMINE algorithms)
Haverage (Weighted Average) (EXAMINE algorithms)
Aempirical (Empirical Distribution Function with Averaging) (EXAMINE algorithms)
Tukey Hinges (EXAMINE algorithms)
M-Estimation (Robust Location Estimation) (EXAMINE algorithms)
M-Estimators (EXAMINE algorithms)
Huber (k), k > 0 (EXAMINE algorithms)
Hampel (a, b, c), 0 < a ≤ b ≤ c (EXAMINE algorithms)
Andrew's Wave (c), c > 0 (EXAMINE algorithms)
Tukey's Biweight (c) (EXAMINE algorithms)


Empirical (Empirical Distribution Function) (EXAMINE algorithms)

EXAMINE algorithms,EXAMINE algorithms,EXAMINE algorithms
empirical,empirical,empirical
x={
yk1 | if g*1=0
yk1+1 | if g*1>0

Related Topics

Percentiles (EXAMINE algorithms)
Waverage (Weighted Average) (EXAMINE algorithms)
Round (Closest Observation) (EXAMINE algorithms)
Haverage (Weighted Average) (EXAMINE algorithms)
Aempirical (Empirical Distribution Function with Averaging) (EXAMINE algorithms)
Tukey Hinges (EXAMINE algorithms)
M-Estimation (Robust Location Estimation) (EXAMINE algorithms)
M-Estimators (EXAMINE algorithms)
Huber (k), k > 0 (EXAMINE algorithms)
Hampel (a, b, c), 0 < a ≤ b ≤ c (EXAMINE algorithms)
Andrew's Wave (c), c > 0 (EXAMINE algorithms)
Tukey's Biweight (c) (EXAMINE algorithms)


Haverage (Weighted Average) (EXAMINE algorithms)

EXAMINE algorithms,EXAMINE algorithms,EXAMINE algorithms
haverage,haverage,haverage

This is a weighted average at ytc2.

x={
yk2+1 | if g*2≥1
(1−g*2)yk2+g*2yk2+1 | if g*2<1 and ck2+1≥1
(1−g2)yk2+g2yk2+1 | if g*2<1 and ck2+1<1

Related Topics

Percentiles (EXAMINE algorithms)
Waverage (Weighted Average) (EXAMINE algorithms)
Round (Closest Observation) (EXAMINE algorithms)
Empirical (Empirical Distribution Function) (EXAMINE algorithms)
Aempirical (Empirical Distribution Function with Averaging) (EXAMINE algorithms)
Tukey Hinges (EXAMINE algorithms)
M-Estimation (Robust Location Estimation) (EXAMINE algorithms)
M-Estimators (EXAMINE algorithms)
Huber (k), k > 0 (EXAMINE algorithms)
Hampel (a, b, c), 0 < a ≤ b ≤ c (EXAMINE algorithms)
Andrew's Wave (c), c > 0 (EXAMINE algorithms)
Tukey's Biweight (c) (EXAMINE algorithms)


Aempirical (Empirical Distribution Function with Averaging) (EXAMINE algorithms)

EXAMINE algorithms,EXAMINE algorithms,EXAMINE algorithms
aempirical,aempirical,aempirical
x={
(yk1+yk1+1)/2 | if g*1=0
yk1+1 | if g*1>0

Note: If either the 25th, 50th, or 75th percentiles is request, Tukey Hinges will also be printed.

Related Topics

Percentiles (EXAMINE algorithms)
Waverage (Weighted Average) (EXAMINE algorithms)
Round (Closest Observation) (EXAMINE algorithms)
Empirical (Empirical Distribution Function) (EXAMINE algorithms)
Haverage (Weighted Average) (EXAMINE algorithms)
Tukey Hinges (EXAMINE algorithms)
M-Estimation (Robust Location Estimation) (EXAMINE algorithms)
M-Estimators (EXAMINE algorithms)
Huber (k), k > 0 (EXAMINE algorithms)
Hampel (a, b, c), 0 < a ≤ b ≤ c (EXAMINE algorithms)
Andrew's Wave (c), c > 0 (EXAMINE algorithms)
Tukey's Biweight (c) (EXAMINE algorithms)


Tukey Hinges (EXAMINE algorithms)

EXAMINE algorithms,EXAMINE algorithms,EXAMINE algorithms
Tukey hinges,Tukey hinges,Tukey hinges

Let Q1, Q2, and Q3 be the 25th, 50th, and 75th percentiles. If c*≥1, where c*=min(c1, ..., cm), define

d= greatest integer ≤((W + 3)/2)2
L1=d
L2=W/2+1/2
L3=W+1−d

Otherwise

d= greatest integer ≤(W/c* + 3)/22

and

L1=dc*
L2=W/2+c*/2
L3=W+c*−dc*

Then for every i, i=1, 2, 3, find hi such that

cchi≤Li<cchi+1

and

Qi={
(1−a*i)yhi+a*iyhi+1 | if a*i<1 and chi+1≥1
(1−ai)yhi+aiyhi+1 | if a*i<1 and chi+1<1
yhi+1 | if a*i≥1

where

a*i=Li−cchi
ai=a*ichi+1

Related Topics

Percentiles (EXAMINE algorithms)
Waverage (Weighted Average) (EXAMINE algorithms)
Round (Closest Observation) (EXAMINE algorithms)
Empirical (Empirical Distribution Function) (EXAMINE algorithms)
Haverage (Weighted Average) (EXAMINE algorithms)
Aempirical (Empirical Distribution Function with Averaging) (EXAMINE algorithms)
M-Estimation (Robust Location Estimation) (EXAMINE algorithms)
M-Estimators (EXAMINE algorithms)
Huber (k), k > 0 (EXAMINE algorithms)
Hampel (a, b, c), 0 < a ≤ b ≤ c (EXAMINE algorithms)
Andrew's Wave (c), c > 0 (EXAMINE algorithms)
Tukey's Biweight (c) (EXAMINE algorithms)


M-Estimation (Robust Location Estimation) (EXAMINE algorithms)

EXAMINE algorithms,EXAMINE algorithms,EXAMINE algorithms
M-estimation,M-estimation,M-estimation

The M-estimator T of location is the solution of

mΣi=1ciΨ(yi−Ts)=0

where Ψ is an odd function and s is a measure of the spread.

An alternative form of M-estimation is

mΣi=1ci (yi−Ts) ω(yi−Ts)=0

where

ω(u)=Ψ(u)u

After rearranging the above equation, we get

T=mΣi=1ciyiω(yi−Ts)mΣi=1ciω(yi−Ts)

Therefore, the algorithm to find M-estimators is defined iteratively by

Tk+1=mΣi=1ciyiω(yi−Tks)mΣi=1ciω(yi−Tks)

The algorithm stops when either

|Tk+1−Tk|≤ε[(Tk+1+Tk)/2], where ε=0.005

or the number of iterations exceeds 30.

Related Topics

Percentiles (EXAMINE algorithms)
Waverage (Weighted Average) (EXAMINE algorithms)
Round (Closest Observation) (EXAMINE algorithms)
Empirical (Empirical Distribution Function) (EXAMINE algorithms)
Haverage (Weighted Average) (EXAMINE algorithms)
Aempirical (Empirical Distribution Function with Averaging) (EXAMINE algorithms)
Tukey Hinges (EXAMINE algorithms)
M-Estimators (EXAMINE algorithms)
Huber (k), k > 0 (EXAMINE algorithms)
Hampel (a, b, c), 0 < a ≤ b ≤ c (EXAMINE algorithms)
Andrew's Wave (c), c > 0 (EXAMINE algorithms)
Tukey's Biweight (c) (EXAMINE algorithms)


M-Estimators (EXAMINE algorithms)

EXAMINE algorithms,EXAMINE algorithms,EXAMINE algorithms
M-estimators,M-estimators,M-estimators

Four M-estimators (Huber, Hampel, Andrew, and Tukey) are available. Let

ui=yi−Ts

where

s= median of
˜
y
1, ...,
˜
y
m with caseweights c1, ..., cm

and

˜
y
i=| yi−
˜
y
|, 		where
˜
y
is the median.

Related Topics

Percentiles (EXAMINE algorithms)
Waverage (Weighted Average) (EXAMINE algorithms)
Round (Closest Observation) (EXAMINE algorithms)
Empirical (Empirical Distribution Function) (EXAMINE algorithms)
Haverage (Weighted Average) (EXAMINE algorithms)
Aempirical (Empirical Distribution Function with Averaging) (EXAMINE algorithms)
Tukey Hinges (EXAMINE algorithms)
M-Estimation (Robust Location Estimation) (EXAMINE algorithms)
Huber (k), k > 0 (EXAMINE algorithms)
Hampel (a, b, c), 0 < a ≤ b ≤ c (EXAMINE algorithms)
Andrew's Wave (c), c > 0 (EXAMINE algorithms)
Tukey's Biweight (c) (EXAMINE algorithms)


Huber (k), k > 0 (EXAMINE algorithms)

EXAMINE algorithms,EXAMINE algorithms,EXAMINE algorithms
Huber,Huber,Huber
ω(ui)={
1 | if | ui|≤k
kuisgn(ui) | if | ui|>k

The default value of k=1.339

Related Topics

Percentiles (EXAMINE algorithms)
Waverage (Weighted Average) (EXAMINE algorithms)
Round (Closest Observation) (EXAMINE algorithms)
Empirical (Empirical Distribution Function) (EXAMINE algorithms)
Haverage (Weighted Average) (EXAMINE algorithms)
Aempirical (Empirical Distribution Function with Averaging) (EXAMINE algorithms)
Tukey Hinges (EXAMINE algorithms)
M-Estimation (Robust Location Estimation) (EXAMINE algorithms)
M-Estimators (EXAMINE algorithms)
Hampel (a, b, c), 0 < a ≤ b ≤ c (EXAMINE algorithms)
Andrew's Wave (c), c > 0 (EXAMINE algorithms)
Tukey's Biweight (c) (EXAMINE algorithms)


Hampel (a, b, c), 0 < a ≤ b ≤ c (EXAMINE algorithms)

EXAMINE algorithms,EXAMINE algorithms,EXAMINE algorithms
Hampel,Hampel,Hampel
ω(ui)={
1 | if | ui|≤a
auisgn(ui) | if a<| ui|≤b
auic−| ui|c−bsgn(ui)
if b<|ui|≤c
0
if |ui|>c

By default, a = 1.7, b = 3.4 and c = 8.5.

Related Topics

Percentiles (EXAMINE algorithms)
Waverage (Weighted Average) (EXAMINE algorithms)
Round (Closest Observation) (EXAMINE algorithms)
Empirical (Empirical Distribution Function) (EXAMINE algorithms)
Haverage (Weighted Average) (EXAMINE algorithms)
Aempirical (Empirical Distribution Function with Averaging) (EXAMINE algorithms)
Tukey Hinges (EXAMINE algorithms)
M-Estimation (Robust Location Estimation) (EXAMINE algorithms)
M-Estimators (EXAMINE algorithms)
Huber (k), k > 0 (EXAMINE algorithms)
Andrew's Wave (c), c > 0 (EXAMINE algorithms)
Tukey's Biweight (c) (EXAMINE algorithms)


Andrew's Wave (c), c > 0 (EXAMINE algorithms)

EXAMINE algorithms,EXAMINE algorithms,EXAMINE algorithms
Andrew's Wave,Andrew's Wave,Andrew's Wave
ω(ui)={
cπ uisin(π uic) if | ui|≤c
0
if | ui|>c

By default, c=1.34π

Related Topics

Percentiles (EXAMINE algorithms)
Waverage (Weighted Average) (EXAMINE algorithms)
Round (Closest Observation) (EXAMINE algorithms)
Empirical (Empirical Distribution Function) (EXAMINE algorithms)
Haverage (Weighted Average) (EXAMINE algorithms)
Aempirical (Empirical Distribution Function with Averaging) (EXAMINE algorithms)
Tukey Hinges (EXAMINE algorithms)
M-Estimation (Robust Location Estimation) (EXAMINE algorithms)
M-Estimators (EXAMINE algorithms)
Huber (k), k > 0 (EXAMINE algorithms)
Hampel (a, b, c), 0 < a ≤ b ≤ c (EXAMINE algorithms)
Tukey's Biweight (c) (EXAMINE algorithms)


Tukey's Biweight (c) (EXAMINE algorithms)

EXAMINE algorithms,EXAMINE algorithms,EXAMINE algorithms
Tukey's biweight,Tukey's biweight,Tukey's biweight
ω(ui)={
(1−u2ic2)2 if | ui|≤c
0
if | ui|>c

By default, c = 4.685.

Related Topics

Percentiles (EXAMINE algorithms)
Waverage (Weighted Average) (EXAMINE algorithms)
Round (Closest Observation) (EXAMINE algorithms)
Empirical (Empirical Distribution Function) (EXAMINE algorithms)
Haverage (Weighted Average) (EXAMINE algorithms)
Aempirical (Empirical Distribution Function with Averaging) (EXAMINE algorithms)
Tukey Hinges (EXAMINE algorithms)
M-Estimation (Robust Location Estimation) (EXAMINE algorithms)
M-Estimators (EXAMINE algorithms)
Huber (k), k > 0 (EXAMINE algorithms)
Hampel (a, b, c), 0 < a ≤ b ≤ c (EXAMINE algorithms)
Andrew's Wave (c), c > 0 (EXAMINE algorithms)


Tests of Normality (EXAMINE algorithms)

EXAMINE algorithms,EXAMINE algorithms,EXAMINE algorithms
normality tests,normality tests,normality tests

The following tests are available.

Related Topics

Shapiro-Wilk Statistic (W) (EXAMINE algorithms)
Kolmogorov-Smirnov Statistic with Lilliefors' Significance (EXAMINE algorithms)
Notation (EXAMINE algorithms)
Descriptive Statistics (EXAMINE algorithms)
Percentiles (EXAMINE algorithms)


Shapiro-Wilk Statistic (W) (EXAMINE algorithms)

EXAMINE algorithms,EXAMINE algorithms,EXAMINE algorithms
Shapiro-Wilk statistic,Shapiro-Wilk statistic,Shapiro-Wilk statistic

Since the W statistic is based on the order statistics of the sample, the caseweights have to be restricted to integers. Hence, before W is calculated, all the caseweights are rounded to the closest integer and the series is expanded. Let c*i be the closest integer to ci; then

cc*i=iΣk=1c*k, Ws=cc*m=mΣk=1c*k

The original series y={y1, ..., ym} is expanded to

x={x1, ..., xws}

where

xcc*i−1+1= ... =xcc*i=yi, i=1, ..., m

Then the W statistic is defined as

W=(WsΣi=1aixi)2WsΣi=1(xi−x)2

where

x=WsΣi=1xiWs
a21=a2Ws={
Γ(Ws/2)
√ 2
Γ((Ws+1)/2) 		if 5≤Ws≤20
Γ((Ws+1)/2)
√ 2
Γ(Ws/2+1)
if Ws>20

a1=−
√ a21
,aWs=
√ a2Ws

ai=(2/c)mi,i=2,...,Ws−1

mi=Ψ−1(i−αWs−2α+1), where Ψ is the c.d.f. of a standard normal distribution
α=0.314195+0.063336β−0.010895β2
β=log10Ws
c2=4Ws−1Σi=1m2i(1−2a2i)

Based on the computed W statistic, the significance is calculated by linearly interpolating within the range of simulated critical values given in Shapiro and Wilk (1965).

If non-integer weights are specified, the Shapiro-Wilk’s statistic is calculated when the weighted sample size lies between 3 and 50. For no weights or integer weights, the statistic is calculated when the weighted sample size lies between 3 and 5000.

If W>w0.99, the critical value of 99th percentile, the significance is reported as >0.99. Similarly, if W<w0.01, the critical value of first percentile, the significance is reported as <0.01.

Related Topics

Tests of Normality (EXAMINE algorithms)
Kolmogorov-Smirnov Statistic with Lilliefors' Significance (EXAMINE algorithms)


Kolmogorov-Smirnov Statistic with Lilliefors' Significance (EXAMINE algorithms)

EXAMINE algorithms,EXAMINE algorithms,EXAMINE algorithms
univariate statistics,univariate statistics,univariate statistics
normality tests,normality tests,normality tests
Kolmogorov-Smirnov statistic with Lilliefors' significance,Kolmogorov-Smirnov statistic with Lilliefors' significance,Kolmogorov-Smirnov statistic with Lilliefors' significance

Lilliefors (Lilliefors, 1967) presented a table for testing normality using the Kolmogorov-Smirnov statistic when the mean and variance of the population are unknown. This statistic is

Da=max{D+,D−}

where

D+=maxi{
^
F
(yi)−F(yi)}
D−=maxi{F(yi)−
^
F
(yi−1)}

where
^
F
(x) is the sample cumulative distribution and F(x) is the cumulative normal distribution whose mean and variance are estimated from the sample.

Dallal and Wilkinson (Dallal and Wilkinson, 1986) corrected the critical values for testing normality reported by Lilliefors. With the corrected table they derived an analytic approximation to the upper tail probabilities of Da for probabilities less than 0.1. The following formula is used to estimate the critical value Dc for probability 0.1.

Dc=(−b−
√ b2−4ac
)2a

where, if W≤100,

a=−7.01256(W+2.78019)
b=2.99587
√ W+2.78019
c=2.1804661+0.974598
√ W
+1.67997W

If W > 100

a=−7.90289126054*W0.98
b=3.180370175721*W0.49
c=2.2947256

The Lilliefors significance p is calculated as follows: If
Da=Dc,
p=0.1.

If Da>Dc, p=exp{aD2a+bDa+c−2.3025851}.

If D0.2≤Da<Dc, linear interpolation between D0.2 and Dc where D0.2 is the critical value for probability 0.2 is done.

If Da>D0.2, p is reported as >0.2.

Related Topics

Tests of Normality (EXAMINE algorithms)
Shapiro-Wilk Statistic (W) (EXAMINE algorithms)


Group Statistics (EXAMINE algorithms)

EXAMINE algorithms,EXAMINE algorithms,EXAMINE algorithms
group statistics,group statistics,group statistics

Assume that there are k(k≥2) combinations of grouping factors. For every combination i, i=1, 2, ..., k, let {yi1, ..., yimi} be the sample observations with the corresponding caseweights {ci1, ..., cimi}.

Related Topics

EXAMINE Algorithms
Univariate Statistics (EXAMINE algorithms)
Plots (EXAMINE algorithms)
References (EXAMINE algorithms)
Spread versus Level (EXAMINE algorithms)
Levene Test of Homogeneity of Variances (EXAMINE algorithms)
Robust Levene's Test of Homogeneity of Variances (EXAMINE algorithms)


Spread versus Level (EXAMINE algorithms)

EXAMINE algorithms,EXAMINE algorithms,EXAMINE algorithms
group statistics,group statistics,group statistics
spread versus level,spread versus level,spread versus level

If a transformation value, a, is given, the spread(s) and level(l) are defined based on the transformed data. Let x be the transformed value of y; for every i=1, ..., k, j=1, ..., mi

xij={
lnyij | if a=0
yaij | otherwise

Then the spread (si) and the level (li) are respectively defined as the Interquartile Range and the median of {xi1, ..., ximi} with corresponding caseweights {ci1, ..., cimi}. However, if a is not specified, the spread and the level are natural logarithms of the Interquartile Range and of the median of the original data. Finally, the slope is the regression coefficient of s on l, which is defined as

kΣi=1(li−l)(si−s)kΣi=1(li−l)2

In some situations, the transformations cannot be done. The spread-versus-level plot and Levene statistic will not be produced if:

• a is a negative integer and at least one of the data is 0

• a is a negative non-integer and at least one of the data is less than or equal to 0

• a is a positive non-integer and at least one of the data is less than 0

• a is not specified and the median or the spread is less than or equal to 0

Related Topics

Group Statistics (EXAMINE algorithms)
Levene Test of Homogeneity of Variances (EXAMINE algorithms)
Robust Levene's Test of Homogeneity of Variances (EXAMINE algorithms)


Levene Test of Homogeneity of Variances (EXAMINE algorithms)

EXAMINE algorithms,EXAMINE algorithms,EXAMINE algorithms
group statistics,group statistics,group statistics
Levene test of homogeneity of variances,Levene test of homogeneity of variances,Levene test of homogeneity of variances

The Levene test statistic is based on the transformed data and is defined by

La=(W−kk−1)kΣi=1wi(zi−z)2kΣi=1miΣl=1cil(zil−zi)2

where

wi=miΣl=1cil
xi=miΣl=1cilxilwi
zil=|xil−xi|
zi=miΣl=1cilzilwi
z=kΣi=1wiziW

The significance of La is calculated from the F distribution with degrees of freedom k−1 and W−k.

Groups with zero variance are included in the test.

Related Topics

Group Statistics (EXAMINE algorithms)
Spread versus Level (EXAMINE algorithms)
Robust Levene's Test of Homogeneity of Variances (EXAMINE algorithms)


Robust Levene's Test of Homogeneity of Variances (EXAMINE algorithms)

EXAMINE algorithms,EXAMINE algorithms,EXAMINE algorithms
group statistics,group statistics,group statistics
robust Leven's test of homogeneity of variances,robust Leven's test of homogeneity of variances,robust Leven's test of homogeneity of variances

With the current version of Levene’s testLa the followings can be considered as options in order to obtain robust Levene’s tests:

• Levene’s test Lb based on z(b)li = |Xil −
˜
x
i| where
˜
x
i is the median of Xil’s for group i.
Median calculation is done by the method requested. The default method is HAVERAGE. Once the
˜
x
i’s and hence z(b)li’s are calculated, apply the formula for La, shown in the section above, to obtain Lb by replacing Zil, zi and z with z(b)li, z(b)i and z(b) respectively.
Two significances of Lb are given. One is calculated from a F-distribution with degrees of freedom k − 1 and W − k. Another is calculated from a F-distribution with degrees of freedom k − 1 and v. The value of v is given by:

v=(kΣi=1ui)2(kΣi=1u2ivi)

where

ui=miΣl=1cil(z(b)il−z(b)i)2

in which

z(b)i=miΣl=1cilz(b)ilwi

and

vi=wi−1

• Levene’s test Lc based on z(c)il=|xil−Ti,0.9| where Ti,0.9 is the 5% trimmed mean of xil’s for group i.
Once the Ti,0.9’s and hence z(c)il’s are calculated, apply the formula of La to obtain Lc by replacing z il, zi and z with z(c)li, z(c)i and z(c) respectively.
The significance of Lc is calculated from a F-distribution with degrees of freedom k − 1 and W − k.

Related Topics

Group Statistics (EXAMINE algorithms)
Spread versus Level (EXAMINE algorithms)
Levene Test of Homogeneity of Variances (EXAMINE algorithms)


Plots (EXAMINE algorithms)

EXAMINE algorithms,EXAMINE algorithms,EXAMINE algorithms
plots,plots,plots

The following plots are available.

Related Topics

EXAMINE Algorithms
Univariate Statistics (EXAMINE algorithms)
Group Statistics (EXAMINE algorithms)
References (EXAMINE algorithms)
Normal Probability Plot (NPPLOT) (EXAMINE algorithms)
Detrended Normal Plot (EXAMINE algorithms)
Boxplot (EXAMINE algorithms)


Normal Probability Plot (NPPLOT) (EXAMINE algorithms)

EXAMINE algorithms,EXAMINE algorithms,EXAMINE algorithms
plots,plots,plots
normal probability plot,normal probability plot,normal probability plot

For every distinct observation yi, Ri is the rank (the mean of ranks is assigned to ties). The normal score NSi is calculated by

NSi=Ψ−1(RiW+1)

where Ψ−1 is the inverse of the standard normal cumulative distribution function. The NPPLOT is the plot of (y1, NS1), ..., (ym, NSm).

Related Topics

Plots (EXAMINE algorithms)
Detrended Normal Plot (EXAMINE algorithms)
Boxplot (EXAMINE algorithms)


Detrended Normal Plot (EXAMINE algorithms)

EXAMINE algorithms,EXAMINE algorithms,EXAMINE algorithms
plots,plots,plots
detrended normal plot,detrended normal plot,detrended normal plot

The detrended normal plot is the scatterplot of (y1, D1), ..., (ym, Dm), where Di is the difference between the Z-score and normal score, which is defined by

Di=Zi−NSi

and

Zi=yi−ys

where y is the average and s is the standard deviation.

Related Topics

Plots (EXAMINE algorithms)
Normal Probability Plot (NPPLOT) (EXAMINE algorithms)
Boxplot (EXAMINE algorithms)


Boxplot (EXAMINE algorithms)

EXAMINE algorithms,EXAMINE algorithms,EXAMINE algorithms
plots,plots,plots
boxplot,boxplot,boxplot

The boundaries of the box are Tukey’s hinges. The length of the box is the interquartile range based on Tukey’s hinges. That is,

IQR=Q3−Q1

Define

STEP = 1.5 IQR

A case is an outlier if

Q3+STEP≤yi<Q3+2STEP
or
Q1−2STEP<yi≤Q1−STEP

A case is an extreme if

yi≥Q3+2STEP
or
yi≤Q1−2STEP

Related Topics

Plots (EXAMINE algorithms)
Normal Probability Plot (NPPLOT) (EXAMINE algorithms)
Detrended Normal Plot (EXAMINE algorithms)


References (EXAMINE algorithms)

EXAMINE algorithms,EXAMINE algorithms,EXAMINE algorithms
references,references,references

Brown, M. B., and A. B. Forsythe. 1974b. Robust tests for the equality of variances. Journal of the American Statistical Association, 69:, 364-367.

Dallal, G. E., and L. Wilkinson. 1986. An analytic approximation to the distribution of Lilliefor's test statistic for normality. The American Statistician, 40(4): 294–296 (Correction: 41: 248), - .

Frigge, M., D. C. Hoaglin, and B. Iglewicz. 1987. Some implementations for the boxplot. In: Computer Science and Statistics Proceedings of the 19th Symposium on the Interface, R. M. Heiberger, and M. Martin, eds. Alexandria, Virginia: American Statistical Association.

Glaser, R. E. 1983. Levene's Robust Test of Homogeneity of Variances. In: Encyclopedia of Statistical Sciences 4. New York: Wiley, p608–610.

Hoaglin, D. C., F. Mosteller, and J. W. Tukey. 1983. Understanding robust and exploratory data analysis. New York: John Wiley and Sons.

Hoaglin, D. C., F. Mosteller, and J. W. Tukey. 1985. Exploring data tables, trends, and shapes. New York: John Wiley and Sons.

Lilliefors, H. W. 1967. On the Kolmogorov-Smirnov tests for normality with mean and variance unknown. Journal of the American Statistical Association, 62, 399-402.

Loh, W. Y. 1987. Some Modifications of Levene's Test of Variance Homogeneity. Journal of the Statistical Computation and Similarities, 28, 213-226.

Shapiro, S. S., and M. B. Wilk. 1965. An analysis of variance test for normality. Biometrika, 52:3, 591-599.

Tukey, J. W. 1977. Exploratory data analysis. Reading, MA: Addison-Wesley.

Velleman, P. F., and D. C. Hoaglin. 1981. Applications, basics, and computing of exploratory data analysis. Boston, Mass.: Duxbury Press.

Related Topics

EXAMINE Algorithms
Univariate Statistics (EXAMINE algorithms)
Group Statistics (EXAMINE algorithms)
Plots (EXAMINE algorithms)


EXSMOOTH Algorithms

EXSMOOTH (command),EXSMOOTH (command),EXSMOOTH (command)
algorithms,algorithms,algorithms
exponential smoothing algorithms,exponential smoothing algorithms,exponential smoothing algorithms

EXSMOOTH produces one period ahead forecasts for different models.

Related Topics

Notation (EXSMOOTH algorithms)
Models (EXSMOOTH algorithms)
References (EXSMOOTH algorithms)


Notation (EXSMOOTH algorithms)

EXSMOOTH algorithms,EXSMOOTH algorithms,EXSMOOTH algorithms
notation,notation,notation

The following notation is used throughout this section unless otherwise stated:

Xt

Observed series, t=1, ..., n

^
X
t

Forecast of one period ahead from time t

P

Number of periods

K

Number of complete cycles ([n/p])

et

tth residual (Xt−
^
X
t−1)

S0

Initial value for series

T0

Initial value for trend

I1−p, ..., I0

Initial values for seasonal factors

ml

Mean for the lth cycle, lpΣi=(l−1)p+1Xi/p

Note the following points:

• I1−p,...,I0 are obtained from the SEASON procedure with MA = EQUAL if p is even; otherwise MA = CENTERED is used for both multiplicative and additive models.

• The index for the fitted series starts with zero.

• The value saved in the FIT variable for the tth case is
^
X
t−1.

Related Topics

EXSMOOTH Algorithms
Models (EXSMOOTH algorithms)
References (EXSMOOTH algorithms)


Models (EXSMOOTH algorithms)

EXSMOOTH algorithms,EXSMOOTH algorithms,EXSMOOTH algorithms
models,models,models

The following models are available.

Related Topics

No Trend, No Seasonality Model (EXSMOOTH algorithms)
No Trend, Additive Seasonality Model (EXSMOOTH algorithms)
No Trend, Multiplicative Seasonality Model (EXSMOOTH algorithms)
Linear Trend, No Seasonality Model (EXSMOOTH algorithms)
Linear Trend, Additive Seasonality Model (EXSMOOTH algorithms)
Linear Trend, Multiplicative Seasonality Model (EXSMOOTH algorithms)
Exponential Trend, No Season Model (EXSMOOTH algorithms)
Exponential Trend, Additive Seasonal Model (EXSMOOTH algorithms)
Exponential Trend, Multiplicative Seasonality Model (EXSMOOTH algorithms)
Damped Trend, No Seasonality Model (EXSMOOTH algorithms)
Damped Trend, Additive Seasonality Model (EXSMOOTH algorithms)
Damped Trend, Multiplicative Seasonality Model (EXSMOOTH algorithms)
EXSMOOTH Algorithms
Notation (EXSMOOTH algorithms)
References (EXSMOOTH algorithms)


No Trend, No Seasonality Model (EXSMOOTH algorithms)

EXSMOOTH algorithms,EXSMOOTH algorithms,EXSMOOTH algorithms
no trend, no seasonality model,no trend, no seasonality model,no trend, no seasonality model
Xt=b+εt

Initial value

S0=X

then

^
X
0=S0, 		e1=X1−
^
X
0
St=St−1+α et
^
X
t=St

Related Topics

Models (EXSMOOTH algorithms)
No Trend, Additive Seasonality Model (EXSMOOTH algorithms)
No Trend, Multiplicative Seasonality Model (EXSMOOTH algorithms)
Linear Trend, No Seasonality Model (EXSMOOTH algorithms)
Linear Trend, Additive Seasonality Model (EXSMOOTH algorithms)
Linear Trend, Multiplicative Seasonality Model (EXSMOOTH algorithms)
Exponential Trend, No Season Model (EXSMOOTH algorithms)
Exponential Trend, Additive Seasonal Model (EXSMOOTH algorithms)
Exponential Trend, Multiplicative Seasonality Model (EXSMOOTH algorithms)
Damped Trend, No Seasonality Model (EXSMOOTH algorithms)
Damped Trend, Additive Seasonality Model (EXSMOOTH algorithms)
Damped Trend, Multiplicative Seasonality Model (EXSMOOTH algorithms)


No Trend, Additive Seasonality Model (EXSMOOTH algorithms)

EXSMOOTH algorithms,EXSMOOTH algorithms,EXSMOOTH algorithms
no trend, additive seasonality model,no trend, additive seasonality model,no trend, additive seasonality model
Xt=b+It+εt

Initial value

S0=kΣi=1mik

then

^
X
0=S0+I1−p
e1=X1−
^
X
0
St=St−1+α et
It=It−p+δ(1−α)et
^
X
t=St+It−p+1

Related Topics

Models (EXSMOOTH algorithms)
No Trend, No Seasonality Model (EXSMOOTH algorithms)
No Trend, Multiplicative Seasonality Model (EXSMOOTH algorithms)
Linear Trend, No Seasonality Model (EXSMOOTH algorithms)
Linear Trend, Additive Seasonality Model (EXSMOOTH algorithms)
Linear Trend, Multiplicative Seasonality Model (EXSMOOTH algorithms)
Exponential Trend, No Season Model (EXSMOOTH algorithms)
Exponential Trend, Additive Seasonal Model (EXSMOOTH algorithms)
Exponential Trend, Multiplicative Seasonality Model (EXSMOOTH algorithms)
Damped Trend, No Seasonality Model (EXSMOOTH algorithms)
Damped Trend, Additive Seasonality Model (EXSMOOTH algorithms)
Damped Trend, Multiplicative Seasonality Model (EXSMOOTH algorithms)


No Trend, Multiplicative Seasonality Model (EXSMOOTH algorithms)

EXSMOOTH algorithms,EXSMOOTH algorithms,EXSMOOTH algorithms
no trend, multiplicative seasonality model,no trend, multiplicative seasonality model,no trend, multiplicative seasonality model
Xt=bIt+εt

Initial value

S0=kΣi=1mik

then

^
X
0=S0I1−p
e1=X1−
^
X
0
St=St−1+αet/It−p
It=It−p+δ(1−α)et/St
^
X
t=StIt−p+1

Related Topics

Models (EXSMOOTH algorithms)
No Trend, No Seasonality Model (EXSMOOTH algorithms)
No Trend, Additive Seasonality Model (EXSMOOTH algorithms)
Linear Trend, No Seasonality Model (EXSMOOTH algorithms)
Linear Trend, Additive Seasonality Model (EXSMOOTH algorithms)
Linear Trend, Multiplicative Seasonality Model (EXSMOOTH algorithms)
Exponential Trend, No Season Model (EXSMOOTH algorithms)
Exponential Trend, Additive Seasonal Model (EXSMOOTH algorithms)
Exponential Trend, Multiplicative Seasonality Model (EXSMOOTH algorithms)
Damped Trend, No Seasonality Model (EXSMOOTH algorithms)
Damped Trend, Additive Seasonality Model (EXSMOOTH algorithms)
Damped Trend, Multiplicative Seasonality Model (EXSMOOTH algorithms)


Linear Trend, No Seasonality Model (EXSMOOTH algorithms)

EXSMOOTH algorithms,EXSMOOTH algorithms,EXSMOOTH algorithms
linear trend, no seasonality model,linear trend, no seasonality model,linear trend, no seasonality model
Xt=b0+b1t+εt

Initial values

T0=Xn−X1n−1
S0=X1−12T0

then

^
X
0=S0+T0
e1=X1−
^
X
0
St=St−1+Tt−1+α et
Tt=Tt−1+αγ et
^
X
t=St+Tt

Related Topics

Models (EXSMOOTH algorithms)
No Trend, No Seasonality Model (EXSMOOTH algorithms)
No Trend, Additive Seasonality Model (EXSMOOTH algorithms)
No Trend, Multiplicative Seasonality Model (EXSMOOTH algorithms)
Linear Trend, Additive Seasonality Model (EXSMOOTH algorithms)
Linear Trend, Multiplicative Seasonality Model (EXSMOOTH algorithms)
Exponential Trend, No Season Model (EXSMOOTH algorithms)
Exponential Trend, Additive Seasonal Model (EXSMOOTH algorithms)
Exponential Trend, Multiplicative Seasonality Model (EXSMOOTH algorithms)
Damped Trend, No Seasonality Model (EXSMOOTH algorithms)
Damped Trend, Additive Seasonality Model (EXSMOOTH algorithms)
Damped Trend, Multiplicative Seasonality Model (EXSMOOTH algorithms)


Linear Trend, Additive Seasonality Model (EXSMOOTH algorithms)

EXSMOOTH algorithms,EXSMOOTH algorithms,EXSMOOTH algorithms
linear trend additive seasonality model,linear trend additive seasonality model,linear trend additive seasonality model
Xt=b0+b1t+It+εt

Initial values

T0=mk−m1(k−1)p
S0=X1−p2T0

then

^
X
0=S0+T0+I1−p
St=St−1+Tt−1+αet
Tt=Tt−1+αγet
It=It−p+δ(1−α)et
^
X
t=St+Tt+It−p+1

Related Topics

Models (EXSMOOTH algorithms)
No Trend, No Seasonality Model (EXSMOOTH algorithms)
No Trend, Additive Seasonality Model (EXSMOOTH algorithms)
No Trend, Multiplicative Seasonality Model (EXSMOOTH algorithms)
Linear Trend, No Seasonality Model (EXSMOOTH algorithms)
Linear Trend, Multiplicative Seasonality Model (EXSMOOTH algorithms)
Exponential Trend, No Season Model (EXSMOOTH algorithms)
Exponential Trend, Additive Seasonal Model (EXSMOOTH algorithms)
Exponential Trend, Multiplicative Seasonality Model (EXSMOOTH algorithms)
Damped Trend, No Seasonality Model (EXSMOOTH algorithms)
Damped Trend, Additive Seasonality Model (EXSMOOTH algorithms)
Damped Trend, Multiplicative Seasonality Model (EXSMOOTH algorithms)


Linear Trend, Multiplicative Seasonality Model (EXSMOOTH algorithms)

EXSMOOTH algorithms,EXSMOOTH algorithms,EXSMOOTH algorithms
linear trend, multiplicative seasonality model,linear trend, multiplicative seasonality model,linear trend, multiplicative seasonality model
Xt=(b0+b1t)It+εt

Initial values

T0=mk−m1(k−1)p
S0=m1−p2T0

then

^
X
0=(S0+T0)I
1−p
St=St−1+Tt−1+α(et/It−p)
Tt=Tt−1+α γ(et/It−p)
It=It−p+δ(1−α)(et/St)
^
X
t=(St+Tt)It−p+1

Related Topics

Models (EXSMOOTH algorithms)
No Trend, No Seasonality Model (EXSMOOTH algorithms)
No Trend, Additive Seasonality Model (EXSMOOTH algorithms)
No Trend, Multiplicative Seasonality Model (EXSMOOTH algorithms)
Linear Trend, No Seasonality Model (EXSMOOTH algorithms)
Linear Trend, Additive Seasonality Model (EXSMOOTH algorithms)
Exponential Trend, No Season Model (EXSMOOTH algorithms)
Exponential Trend, Additive Seasonal Model (EXSMOOTH algorithms)
Exponential Trend, Multiplicative Seasonality Model (EXSMOOTH algorithms)
Damped Trend, No Seasonality Model (EXSMOOTH algorithms)
Damped Trend, Additive Seasonality Model (EXSMOOTH algorithms)
Damped Trend, Multiplicative Seasonality Model (EXSMOOTH algorithms)


Exponential Trend, No Season Model (EXSMOOTH algorithms)

EXSMOOTH algorithms,EXSMOOTH algorithms,EXSMOOTH algorithms
exponential trend, no season model,exponential trend, no season model,exponential trend, no season model
Xt=b0bt1+εt

Initial values

T0=exp{lnX2−lnX1}=X2X1
S0=exp{lnX1−12lnT0}=X1
√ T0

then

^
X
0=S0T0
St=St−1Tt−1+αet
Tt=Tt−1+αγet/St−1
^
X
t=StTt

Related Topics

Models (EXSMOOTH algorithms)
No Trend, No Seasonality Model (EXSMOOTH algorithms)
No Trend, Additive Seasonality Model (EXSMOOTH algorithms)
No Trend, Multiplicative Seasonality Model (EXSMOOTH algorithms)
Linear Trend, No Seasonality Model (EXSMOOTH algorithms)
Linear Trend, Additive Seasonality Model (EXSMOOTH algorithms)
Linear Trend, Multiplicative Seasonality Model (EXSMOOTH algorithms)
Exponential Trend, Additive Seasonal Model (EXSMOOTH algorithms)
Exponential Trend, Multiplicative Seasonality Model (EXSMOOTH algorithms)
Damped Trend, No Seasonality Model (EXSMOOTH algorithms)
Damped Trend, Additive Seasonality Model (EXSMOOTH algorithms)
Damped Trend, Multiplicative Seasonality Model (EXSMOOTH algorithms)


Exponential Trend, Additive Seasonal Model (EXSMOOTH algorithms)

EXSMOOTH algorithms,EXSMOOTH algorithms,EXSMOOTH algorithms
exponential trend, additive seasonal model,exponential trend, additive seasonal model,exponential trend, additive seasonal model
Xt=b0bt1+It+εt

Initial values

T0=exp{(lnm2−lnm1)/p}
S0=exp{lnm1−p2lnT0}

then

^
X
0=S0T0+I1−p
St=St−1Tt−1+αet
Tt=Tt−1+αγet/St−1
It=It−p+δ(1−α)et
^
X
t=StTt+It−p+1

Related Topics

Models (EXSMOOTH algorithms)
No Trend, No Seasonality Model (EXSMOOTH algorithms)
No Trend, Additive Seasonality Model (EXSMOOTH algorithms)
No Trend, Multiplicative Seasonality Model (EXSMOOTH algorithms)
Linear Trend, No Seasonality Model (EXSMOOTH algorithms)
Linear Trend, Additive Seasonality Model (EXSMOOTH algorithms)
Linear Trend, Multiplicative Seasonality Model (EXSMOOTH algorithms)
Exponential Trend, No Season Model (EXSMOOTH algorithms)
Exponential Trend, Multiplicative Seasonality Model (EXSMOOTH algorithms)
Damped Trend, No Seasonality Model (EXSMOOTH algorithms)
Damped Trend, Additive Seasonality Model (EXSMOOTH algorithms)
Damped Trend, Multiplicative Seasonality Model (EXSMOOTH algorithms)


Exponential Trend, Multiplicative Seasonality Model (EXSMOOTH algorithms)

EXSMOOTH algorithms,EXSMOOTH algorithms,EXSMOOTH algorithms
exponential trend, multiplicative seasonality model,exponential trend, multiplicative seasonality model,exponential trend, multiplicative seasonality model
Xt=(b0bt1)It+εt

Initial values

T0=exp{(lnm2−lnm1)/(k−1)}
S0=exp{lnm1−p2lnT0}

then

^
X
0=(S0T0)I1−p
St=St−1Tt−1+αet/It−p
Tt=Tt−1+αγet/(It−pSt−1)
It=It−p+δ(1−α)et/St
^
X
t=(StTt)It−p+1

Related Topics

Models (EXSMOOTH algorithms)
No Trend, No Seasonality Model (EXSMOOTH algorithms)
No Trend, Additive Seasonality Model (EXSMOOTH algorithms)
No Trend, Multiplicative Seasonality Model (EXSMOOTH algorithms)
Linear Trend, No Seasonality Model (EXSMOOTH algorithms)
Linear Trend, Additive Seasonality Model (EXSMOOTH algorithms)
Linear Trend, Multiplicative Seasonality Model (EXSMOOTH algorithms)
Exponential Trend, No Season Model (EXSMOOTH algorithms)
Exponential Trend, Additive Seasonal Model (EXSMOOTH algorithms)
Damped Trend, No Seasonality Model (EXSMOOTH algorithms)
Damped Trend, Additive Seasonality Model (EXSMOOTH algorithms)
Damped Trend, Multiplicative Seasonality Model (EXSMOOTH algorithms)


Damped Trend, No Seasonality Model (EXSMOOTH algorithms)

EXSMOOTH algorithms,EXSMOOTH algorithms,EXSMOOTH algorithms
damped trend, no seasonality model,damped trend, no seasonality model,damped trend, no seasonality model
Xt=b0+φ b1t+εt

Initial values

T0=Xn−X1(n−1)φ
S0=X1−12T0

then

^
X
0=S0+φ T0
St=St−1+φ Tt−1+αet
Tt=φ Tt−1+αγet
^
X
t=St+φ Tt

Related Topics

Models (EXSMOOTH algorithms)
No Trend, No Seasonality Model (EXSMOOTH algorithms)
No Trend, Additive Seasonality Model (EXSMOOTH algorithms)
No Trend, Multiplicative Seasonality Model (EXSMOOTH algorithms)
Linear Trend, No Seasonality Model (EXSMOOTH algorithms)
Linear Trend, Additive Seasonality Model (EXSMOOTH algorithms)
Linear Trend, Multiplicative Seasonality Model (EXSMOOTH algorithms)
Exponential Trend, No Season Model (EXSMOOTH algorithms)
Exponential Trend, Additive Seasonal Model (EXSMOOTH algorithms)
Exponential Trend, Multiplicative Seasonality Model (EXSMOOTH algorithms)
Damped Trend, Additive Seasonality Model (EXSMOOTH algorithms)
Damped Trend, Multiplicative Seasonality Model (EXSMOOTH algorithms)


Damped Trend, Additive Seasonality Model (EXSMOOTH algorithms)

EXSMOOTH algorithms,EXSMOOTH algorithms,EXSMOOTH algorithms
damped trend, additive seasonality model,damped trend, additive seasonality model,damped trend, additive seasonality model
Xt=b0+φ b1t+It+εt

Initial values

T0=mk−m1(k−1)pφ
S0=m1−p2T0

then

^
X
0=S0+φ T0+I1−p
St=St−1+φ Tt−1+α(2−α)et
Tt=φ Tt−1+α(α−φ+1)et
It=It−p+δ[1−α(2−α)]et
^
X
t=St+φ Tt+It−p+1

Related Topics

Models (EXSMOOTH algorithms)
No Trend, No Seasonality Model (EXSMOOTH algorithms)
No Trend, Additive Seasonality Model (EXSMOOTH algorithms)
No Trend, Multiplicative Seasonality Model (EXSMOOTH algorithms)
Linear Trend, No Seasonality Model (EXSMOOTH algorithms)
Linear Trend, Additive Seasonality Model (EXSMOOTH algorithms)
Linear Trend, Multiplicative Seasonality Model (EXSMOOTH algorithms)
Exponential Trend, No Season Model (EXSMOOTH algorithms)
Exponential Trend, Additive Seasonal Model (EXSMOOTH algorithms)
Exponential Trend, Multiplicative Seasonality Model (EXSMOOTH algorithms)
Damped Trend, No Seasonality Model (EXSMOOTH algorithms)
Damped Trend, Multiplicative Seasonality Model (EXSMOOTH algorithms)


Damped Trend, Multiplicative Seasonality Model (EXSMOOTH algorithms)

EXSMOOTH algorithms,EXSMOOTH algorithms,EXSMOOTH algorithms
damped trend, multiplicative seasonality model,damped trend, multiplicative seasonality model,damped trend, multiplicative seasonality model
Xt=(b0+b1φ t)It+εt

Initial values

T0=mk−m1(k−1)pφ
S0=m1−p2T0φ

then

^
X
0=(S0+φ T0)I1−p
St=St−1+φ Tt−1+α(2−α)et/It−p
Tt=φ Tt−1+α(α−φ+1)et/It−p
It=It−p+δ[1−α(2−α)]et/St
^
X
t=(St+φ Tt)It−p+1

Related Topics

Models (EXSMOOTH algorithms)
No Trend, No Seasonality Model (EXSMOOTH algorithms)
No Trend, Additive Seasonality Model (EXSMOOTH algorithms)
No Trend, Multiplicative Seasonality Model (EXSMOOTH algorithms)
Linear Trend, No Seasonality Model (EXSMOOTH algorithms)
Linear Trend, Additive Seasonality Model (EXSMOOTH algorithms)
Linear Trend, Multiplicative Seasonality Model (EXSMOOTH algorithms)
Exponential Trend, No Season Model (EXSMOOTH algorithms)
Exponential Trend, Additive Seasonal Model (EXSMOOTH algorithms)
Exponential Trend, Multiplicative Seasonality Model (EXSMOOTH algorithms)
Damped Trend, No Seasonality Model (EXSMOOTH algorithms)
Damped Trend, Additive Seasonality Model (EXSMOOTH algorithms)


References (EXSMOOTH algorithms)

EXSMOOTH algorithms,EXSMOOTH algorithms,EXSMOOTH algorithms
references,references,references

Abraham, B., and J. Ledolter. 1983. Statistical methods of forecasting. New York: John Wiley and Sons.

Gardner, E. S. 1985. Exponential smoothing: The state of the art. Journal of Forecasting, 4, 1-28.

Ledolter, J., and B. Abraham. 1984. Some comments on the initialization of exponential smoothing. Journal of Forecasting, 3, 79-84.

Makridakis, S., S. C. Wheelwright, and V. E. McGee. 1983. Forecasting: Methods and applications. New York: John Wiley and Sons.

Related Topics

EXSMOOTH Algorithms
Notation (EXSMOOTH algorithms)
Models (EXSMOOTH algorithms)


FACTOR Algorithms

FACTOR (command),FACTOR (command),FACTOR (command)
algorithms,algorithms,algorithms
Factor Analysis,Factor Analysis,Factor Analysis
algorithms,algorithms,algorithms
factor analysis algorithms,factor analysis algorithms,factor analysis algorithms

FACTOR performs factor analysis based either on correlations or covariances and using one of the seven extraction methods.

Related Topics

Extraction of Initial Factors (factor analysis algorithms)
Factor Rotations (factor analysis algorithms)
Factor Score Coefficients (Harman, 1976) (factor analysis algorithms)
Optional Statistics (Dziubin and Shirkey, 1974) (factor analysis algorithms)
References (factor analysis algorithms)


Extraction of Initial Factors (factor analysis algorithms)

The following extraction methods are available.

Related Topics

Principal Components Extraction (PC) (factor analysis algorithms)
Principal Axis Factoring (factor analysis algorithms)
Maximum Likelihood (ML) (factor analysis algorithms)
Unweighted and Generalized Least Squares (ULS, GLS) (factor analysis algorithms)
Alpha (Harman, 1976) (factor analysis algorithms)
Image (Kaiser, 1963) (factor analysis algorithms)
FACTOR Algorithms
Factor Rotations (factor analysis algorithms)
Factor Score Coefficients (Harman, 1976) (factor analysis algorithms)
Optional Statistics (Dziubin and Shirkey, 1974) (factor analysis algorithms)
References (factor analysis algorithms)


Principal Components Extraction (PC) (factor analysis algorithms)

factor analysis algorithms,factor analysis algorithms,factor analysis algorithms
principal components extraction (PC),principal components extraction (PC),principal components extraction (PC)

The matrix of factor loadings based on factor m is

Λm=ΩmΓ1/2m

where

Ωm=(ω1,ω2,...,ωm)
Γm=diag(|γ1|,|γ2|,...,|γm|)

The communality of variable i is given by

hi=mΣj=1|γj|ω2ij

Analyzing a Correlation Matrix

γ1≥γ2≥...≥γm are the eigenvalues and ωi are the corresponding eigenvectors of R, where R is the correlation matrix.

Analyzing a Covariance Matrix

γ1≥γ2≥...≥γm are the eigenvalues and ωi are the corresponding eigenvectors of Σ, where Σ=(σij)n×n is the covariance matrix.

The rescaled loadings matrix is ΛmR=[diagΣ]−1/2Λm.

The rescaled communality of variable i is hiR=σ−1iihi.

Related Topics

Extraction of Initial Factors (factor analysis algorithms)
Principal Axis Factoring (factor analysis algorithms)
Maximum Likelihood (ML) (factor analysis algorithms)
Unweighted and Generalized Least Squares (ULS, GLS) (factor analysis algorithms)
Alpha (Harman, 1976) (factor analysis algorithms)
Image (Kaiser, 1963) (factor analysis algorithms)


Principal Axis Factoring (factor analysis algorithms)

factor analysis algorithms,factor analysis algorithms,factor analysis algorithms
principal axis factoring,principal axis factoring,principal axis factoring

Analyzing a Correlation Matrix

An iterative solution for communalities and factor loadings is sought. At iteration i, the communalities from the preceding iteration are placed on the diagonal of R, and the resulting R is denoted by Ri. The eigenanalysis is performed on Ri and the new communality of variable j is estimated by

hj(i)=mΣj=1|γk(i)|ω2jk(i)

The factor loadings are obtained by

Λm(i)=Ωm(i)Γ1/2m(i)

Iterations continue until the maximum number (default 25) is reached or until the maximum change in the communality estimates is less than the convergence criterion (default 0.001).

Analyzing a Covariance Matrix

This analysis is the same as analyzing a correlation matrix, except Σ is used instead of the correlation matrix R. Convergence is dependent on the maximum change of rescaled communality estimates.

At iteration i, the rescaled loadings matrix is Λm(i)R=[diagΣ]−1/2Λm(i). The rescaled communality of variable i is hj(i)R=σ−1iihj(i).

Related Topics

Principal Components Extraction (PC) (factor analysis algorithms)
Maximum Likelihood (ML) (factor analysis algorithms)
Unweighted and Generalized Least Squares (ULS, GLS) (factor analysis algorithms)
Alpha (Harman, 1976) (factor analysis algorithms)
Image (Kaiser, 1963) (factor analysis algorithms)


Maximum Likelihood (ML) (factor analysis algorithms)

factor analysis algorithms,factor analysis algorithms,factor analysis algorithms
maximum likelihood (ML),maximum likelihood (ML),maximum likelihood (ML)

The maximum likelihood solutions of Λ and ψ2 are obtained by minimizing

F=tr[(ΛΛ´+ψ2)−1R]−log|(ΛΛ´+ψ2)−1R|−p

with respect to Λ and ψ, where p is the number of variables, Λ is the factor loading matrix, and ψ 2 is the diagonal matrix of unique variances.

The minimization of F is performed by way of a two-step algorithm. First, the conditional minimum of F for a given y is found. This gives the function f(ψ), which is minimized numerically using the Newton-Raphson procedure. Let x(s) be the column vector containing the logarithm of the diagonal elements of y at the sth iteration; then

x(s+1)=x(s)−d(s)

where d(s) is the solution to the system of linear equations

H(s)d(s)=h(s)

and where

H(s)=(∂2f(ψ)/∂ xi∂ xj)

and h(s) is the column vector containing ∂f(ψ)/∂ xi. The starting point x(1) is

x(1)i={
log[(1−m/2p)/rii] | for ML and GLS
[(1−m/2p)/rii]1/2 | for ULS

where m is the number of factors and rii is the ith diagonal element of R−1.

The values of f(ψ), ∂f/∂xi, and ∂2f/∂xi∂xj can be expressed in terms of the eigenvalues

γ1≤γ2≤...≤γp

and corresponding eigenvectors

ω 1 , ω 2 , ..., ω p

of matrix ψR−1ψ. That is,

f(ψ)=pΣk=m+1(logγk+γ−1k−1)
∂f∂ xi=pΣk=m+1(1−γ−1k)ω2ik
∂2f∂ xi∂ xj=−δij∂f∂ xi+pΣk=m+1ωikωjk(mΣn=1γk+γn−2γk−γnωinωjn+δij)

where

δij={
1 | if i=j
0 | if i≠j

The approximate second-order derivatives

∂2f∂xi∂xj(pΣk=m+1ωikωjk)2

are used in the initial step and when the matrix of the exact second-order derivatives is not positive definite or when all elements of the vector d are greater than 0.1. If ∂2f/∂x2i<0.05 (Heywood variables), the diagonal element is replaced by 1 and the rest of the elements of that column and row are set to 0. If the value of f(ψ) is not decreased by step d, the step is halved and halved again until the value of f(ψ) decreases or 25 halvings fail to produce a decrease. (In this case, the computations are terminated.) Stepping continues until the largest absolute value of the elements of d is less than the criterion value (default 0.001) or until the maximum number of iterations (default 25) is reached. Using the converged value of ψ (denoted by
^
ψ
), the eigenanalysis is performed on the matrix
^
ψ
R−1
^
ψ
. The factor loadings are computed as

^
Λ
m=
^
ψ
Ωm(Γ−1m−Im)1/2

where

Γm= diag (γ1,γ2,...,γm)
Ωm=(ω1,ω2,...,ωm)

Related Topics

Extraction of Initial Factors (factor analysis algorithms)
Principal Components Extraction (PC) (factor analysis algorithms)
Principal Axis Factoring (factor analysis algorithms)
Unweighted and Generalized Least Squares (ULS, GLS) (factor analysis algorithms)
Alpha (Harman, 1976) (factor analysis algorithms)
Image (Kaiser, 1963) (factor analysis algorithms)


Unweighted and Generalized Least Squares (ULS, GLS) (factor analysis algorithms)

factor analysis algorithms,factor analysis algorithms,factor analysis algorithms
unweighted and generalized least squares (ULS, GLS),unweighted and generalized least squares (ULS, GLS),unweighted and generalized least squares (ULS, GLS)

The same basic algorithm is used in ULS and GLS methods as in maximum likelihood, except that

f(ψ)={
pΣk=m+1γ2k2 | for ULS
pΣk=m+1(γk−1)22 | for GLS

for the ULS method, the eigenanalysis is performed on the matrix R−ψ2, where γ1≥γ2≥...≥γp are the eigenvalues. In terms of the derivatives, for ULS

∂f∂xi=2xipΣk=m+1γkω2ik
∂2f∂xi∂ xj=4[xixjpΣk=m+1ωikωjkmΣn=1γk+γnγk−γnωikωjk+δijpΣk=m+1(x2i−γk2)ω2ik]

and

∂2f∂xi∂xj=4xixj(pΣk=m+1ωikωjk)2

For GLS

∂f∂xi=pΣk=m+1(γ2k−γk)ω2ik
∂2f∂xi∂xj=δij∂f∂xi+pΣk=m+1γkωikωjk(mΣn=1γnγk+γn−2γk−γnωinωjn+riiexp[(xi+xj)/2])

and

∂2f∂xi∂xj=(pΣk=m+1ωikωjk)2

Also, the factor loadings of the ULS method are obtained by

^
Λ
m=ΩmΓ1/2m

The chi-square statistics for m factors for the ML and GLS methods is given by

χ2m=(W−1−2p+56−2m3)f(
^
ψ
)

with ((p−m)2−p−m)/2

Related Topics

Extraction of Initial Factors (factor analysis algorithms)
Principal Components Extraction (PC) (factor analysis algorithms)
Principal Axis Factoring (factor analysis algorithms)
Maximum Likelihood (ML) (factor analysis algorithms)
Alpha (Harman, 1976) (factor analysis algorithms)
Image (Kaiser, 1963) (factor analysis algorithms)


Alpha (Harman, 1976) (factor analysis algorithms)

factor analysis algorithms,factor analysis algorithms,factor analysis algorithms
alpha,alpha,alpha
factor analysis algorithms,factor analysis algorithms,factor analysis algorithms
iteration for communalities,iteration for communalities,iteration for communalities

Iteration for Communalities

At each iteration i:

The eigenvalues (r(i)) and eigenvectors (Ω(i)) of

H1/2(i−1)(R−I)H1/2(i−1)+I are computed.

The new communalities are

hk(i)(mΣj=1|γj(i)|ω2kj(i))hk(i−1)

The initial values of the communalities, H0, are

hio={
1−1/rii |R|≥10−8 and all 0≤hio≤1
max
j
|rij| 		otherwise

where rii is the ith diagonal entry of R−1.

If |R|≥10−8 and all rii are equal to one, the procedure is terminated. If for some i,
max
j
|rij|>1, the procedure is terminated.

Iteration stops if any of the following are true:

max
k
|hk(i)−hk(i−1)|< EPS
i= MAX
hk(i)=0 for any k
factor analysis algorithms,factor analysis algorithms,factor analysis algorithms
final communalities and factor pattern matrix,final communalities and factor pattern matrix,final communalities and factor pattern matrix

Final Communalities and Factor Pattern Matrix

The communalities are the values when iteration stops, unless the last termination criterion is true, in which case the procedure terminates. The factor pattern matrix is

Fm=H1/2(f)Ωm(f)Γ1/2m(f)

where f is the final iteration.

Related Topics

Extraction of Initial Factors (factor analysis algorithms)
Principal Components Extraction (PC) (factor analysis algorithms)
Principal Axis Factoring (factor analysis algorithms)
Maximum Likelihood (ML) (factor analysis algorithms)
Unweighted and Generalized Least Squares (ULS, GLS) (factor analysis algorithms)
Image (Kaiser, 1963) (factor analysis algorithms)


Image (Kaiser, 1963) (factor analysis algorithms)

factor analysis algorithms,factor analysis algorithms,factor analysis algorithms
image,image,image

Factor Analysis of a Correlation Matrix

Eigenvalues and eigenvectors of S−1RS−1 are found.
S2= diag (1/r11,...,1/rnn)
rii=i th diagonal element of R−1

The factor pattern matrix is
Fm=SΩm(Λm−Im)Λ−1/2m

where Ωm and Λm correspond to the m eigenvalues greater than 1.

If m=0, the procedure is terminated.

The communalities are

hi=mΣj=1(γj−1)2ω2ij/(γjrii)

The image covariance matrix is

R+S2R−1S2−2S2

The anti-image covariance matrix is

S2R−1S2

Factor Analysis of a Covariance Matrix

We are using the covariance matrix Σ instead of the correlation matrix R. The calculation is similar to the correlation matrix case.

The rescaled factor pattern matrix is FmR=[diagΣ]−1/2Fm. The rescaled communality of variable i is hiR=σ−1iihi.

Related Topics

Extraction of Initial Factors (factor analysis algorithms)
Principal Components Extraction (PC) (factor analysis algorithms)
Principal Axis Factoring (factor analysis algorithms)
Maximum Likelihood (ML) (factor analysis algorithms)
Unweighted and Generalized Least Squares (ULS, GLS) (factor analysis algorithms)
Alpha (Harman, 1976) (factor analysis algorithms)


Factor Rotations (factor analysis algorithms)

The following rotation methods are available.

Related Topics

Orthogonal Rotations (Harman, 1976) (factor analysis algorithms)
Oblique Rotations (factor analysis algorithms)
Promax Rotation (factor analysis algorithms)
FACTOR Algorithms
Extraction of Initial Factors (factor analysis algorithms)
Factor Score Coefficients (Harman, 1976) (factor analysis algorithms)
Optional Statistics (Dziubin and Shirkey, 1974) (factor analysis algorithms)
References (factor analysis algorithms)


Orthogonal Rotations (Harman, 1976) (factor analysis algorithms)

factor analysis algorithms,factor analysis algorithms,factor analysis algorithms
orthogonal rotations,orthogonal rotations,orthogonal rotations

Rotations are done cyclically on pairs of factors until the maximum number of iterations is reached or the convergence criterion is met. The algorithm is the same for all orthogonal rotations, differing only in computations of the tangent values of the rotation angles.

The factor pattern matrix is normalized by the square root of communalities:

Λ*m=H−1/2Λm

where

Λm=(λ1, ..., λm) is the factor pattern matrix

H= diag (h1,...,hn) is the diagonal matrix of communalities

The transformation matrix T is initialized to Im

At each iteration i

(1) The convergence criterion is

SV(i)=mΣj=1(nnΣk=1λ*4kj(i)−(nΣk=1λ*2kj(i))2)/n2

where the initial value of Λ*m(1) is the original factor pattern matrix. For subsequent iterations, the initial value is the final value of Λ*m(i−1) when all factor pairs have been rotated.

(2) For all pairs of factors (λj,λk) where k>j, the following are computed:

(a) Angle of rotation

P=1/4tan−1(X/Y)

where

X={
D−2AB/n | Varimax
D−mAB/n | Equimax
D | Quartimax
Y= {
C−(A2−B2)/n | Varimax
C−m(A2−B2)/2n | Equimax
C | Quartimax
up(i)=f*2pj(i)−f*2pk(i)
vp(i)=2f*pj(i)f*pk(i) p=1,...,n
A=nΣp=1up(i)
B=nΣp=1vp(i)
C=nΣp=1[u2p(i)−v2p(i)]
D=nΣp=12up(i)vp(i)

If |sin(P)|≤10−15, no rotation is done on the pair of factors.

(b) New rotated factors

(
˜
λ
j(i),
˜
λ
k(i))=(λ*j(i), λ*k(i)) 		|
cos(P) | −sin(P)
sin(P) | cos(P)
|

where λ*j(i) are the last values for factor j calculated in this iteration.

(c) Accrued rotation transformation matrix

(
˜
t
j,
˜
t
k)=(tj,tk) 		|
cos(P) | −sin(P)
sin(P) | cos(P)
|

where tj and tk are the last calculated values of the jth and kth columns of T.

(d) Iteration is terminated when

|SV(i)−SV(i−1)|≤10−5

or the maximum number of iterations is reached.

(e) Final rotated factor pattern matrix

˜
Λ
m=H1/2Λ*m(f)

where

Λ*m(f)

is the value of the last iteration.

(f) Reflect factors with negative sums

If

nΣi=1
˜
λ
ij(f)<0

then

˜
λ
j=−
˜
λ
j(f)

(g) Rearrange the rotated factors such that

nΣj=1
˜
λ
2j1≥...≥nΣj=1
˜
λ
2jm

(h) The communalities are

hj=mΣi=1
˜
λ
2ji

Related Topics

Factor Rotations (factor analysis algorithms)
Oblique Rotations (factor analysis algorithms)
Promax Rotation (factor analysis algorithms)


Oblique Rotations (factor analysis algorithms)

factor analysis algorithms,factor analysis algorithms,factor analysis algorithms
oblique rotations,oblique rotations,oblique rotations

The direct oblimin method (Jennrich and Sampson, 1966) is used for oblique rotation. The user can choose the parameter δ. The default value is δ=0.

(a) The factor pattern matrix is normalized by the square root of the communalities

Ω*m=H−1/2Λm

where

hj=mΣk=1λ2jk

If no Kaiser is specified, this normalization is not done.

(b) Initializations

The factor correlation matrix C is initialized to Im. The following are also computed:

sk={
1 | if Kaiser
hk | if no Kaiser
         k=1,...,n
ui=nΣj=1λ*2ji
i=1,...,m
vi=nΣj=1λ*4ji
xi=vi−(δ/n)u2i
D=mΣi=1ui
G=mΣi=1xi
H=nΣk=1s2i−(δ/n)D2
FO=H−G

(c) At each iteration, all possible factor pairs are rotated. For a pair of factors λ*p and λ*q(p≠q), the following are computed:

Dpq=D−up−uq
Gpq=G−xp−xq
spq,i=si−λ*2ip−λ*2iq
ypq=nΣi=1λ*ipλ*iq
zpq=nΣi=1λ*2ipλ*2iq
T=nΣi=1spq,iλ*2ip−(δ/n)upDpq
Z=nΣi=1spq,iλ*ipλ*iq−(δ/n)ypqDpq
P=nΣi=1λ*3ipλ*iq−(δ/n)upypq
R=zpq−(δ/n)upuq
P´=32(cpq−P/xp)
Q´=12(xp−4cpqP+R+2T)/xp
R´=12(cpq(T+R)−P−Z)/xp

A root, a, of the equation

b3+P´b2+Q´b+R=0 is computed, as well as:

A=1+2cpqa+a2
t1=|A|1/2
t2=a/t1

The rotated pair of factors is

(
˜
λ
*p,
˜
λ
*q)=(λ*p,λ*q)|
t1 | −a
0 | 1
|

These replace the previous factor values.

New values are computed for

˜
u
p=|A|up
˜
x
p=A2xp
˜
v
q=nΣi=1
˜
λ
*4iq
˜
u
q=nΣi=1
˜
λ
*2iq
˜
x
q=
˜
v
q−(δ/n)
˜
u
2q
˜
S
k=Spq,k+
˜
λ
*2kp+
˜
λ
*2kq
˜
D
=Dpq+
˜
u
p+
˜
u
q
˜
G
=Gpq+
˜
x
p+
˜
x
q

All values designated as
˜
V
replaces V and are used in subsequent calculations.

The new factor correlations with factor p are

˜
c
ip=t−11cip+t2ciq 		(i≠p)
˜
c
pi=
˜
c
ip
˜
c
pp=1

After all factor pairs have been rotated, iteration is terminated if

MAX iterations have been done
or
|F1(i)−F1(i−1)|<(FO)(EPS)

where

F1(i)=
˜
H
−
˜
G
˜
H
=nΣk=1
˜
s
2k−(δ/n)
˜
D
2
F1(0)=FO

Otherwise, the factor pairs are rotated again.

The final rotated factor pattern matrix is

˜
λ
m=H1/2
˜
λ
*m

where
˜
λ
m is the value in the final iteration.

The factor structure matrix is

S=
˜
Λ
m
˜
C
m

where
˜
C
m is the factor correlation matrix in the final iteration.

Related Topics

Factor Rotations (factor analysis algorithms)
Orthogonal Rotations (Harman, 1976) (factor analysis algorithms)
Promax Rotation (factor analysis algorithms)


Promax Rotation (factor analysis algorithms)

factor analysis algorithms,factor analysis algorithms,factor analysis algorithms
promax rotation,promax rotation,promax rotation

(Hendrickson and White, 1964) proposed a computationally fast rotation. The speed is achieved by first rotating to an orthogonal varimax solution and then relaxing the orthogonality of the factors to better fit simple structure.

Varimax rotation is used to get an orthogonal rotated matrix ΛR={λij}.

The matrix P=(pij)p×m is calculated, where

pij=|λij(mΣj=1λ2ij)1/2|k+1(mΣj=1λ2ij)1/2/λij

Here, k (k > 1) is the power of promax rotation.

The matrix L is calculated.

L=(Λ´RΛR)−1Λ´RP

The matrix L is normalized by column to a transformation matrix

Q=LD

where D=(diag(L´L))−1/2 is the diagonal matrix that normalizes the columns of L.

At this stage, the rotated factors are

fpromax_temp=Q−1fvarimax.

Because

var (fpromax_temp)=(Q´Q)−1,

and the diagonal elements do not equal 1, we must modify the rotated factor to

fpromax=Cfpromax_temp

where

C={diag((Q´Q)−1)}−1/2

The rotated factor pattern is

Λpromax=ΛvarimaxQC−1

The correlation matrix of the factors is

Rff=C(Q´Q)−1C´

The factor structure matrix is

ΛS=ΛpromaxRff

Related Topics

Factor Rotations (factor analysis algorithms)
Orthogonal Rotations (Harman, 1976) (factor analysis algorithms)
Oblique Rotations (factor analysis algorithms)


Factor Score Coefficients (Harman, 1976) (factor analysis algorithms)

factor analysis algorithms,factor analysis algorithms,factor analysis algorithms
factor score coefficients,factor score coefficients,factor score coefficients

Creates one new variable for each factor in the final solution. The following alternative methods for calculating the factor scores are available.

Related Topics

Regression (factor analysis algorithms)
Bartlett (factor analysis algorithms)
Anderson Rubin (factor analysis algorithms)
FACTOR Algorithms
Extraction of Initial Factors (factor analysis algorithms)
Factor Rotations (factor analysis algorithms)
Optional Statistics (Dziubin and Shirkey, 1974) (factor analysis algorithms)
References (factor analysis algorithms)


Regression (factor analysis algorithms)

factor analysis algorithms,factor analysis algorithms,factor analysis algorithms
regression,regression,regression
W={
ΛmΓ−1m | PC without rotation
Λm(Λ´mΛm)−1 | PC with rotation
R−1Sm | otherwise

where

Sm= factor structure matrix
Sm=Λm   for orthogonal rotations

For PC without rotation if any |γi|≤10−8, factor score coefficients are not computed. For PC with rotation, if the determinant of Λ´mΛm is less than 10−8, the coefficients are not computed. Otherwise, if R is singular, factor score coefficients are not computed.

Related Topics

Factor Score Coefficients (Harman, 1976) (factor analysis algorithms)
Bartlett (factor analysis algorithms)
Anderson Rubin (factor analysis algorithms)


Bartlett (factor analysis algorithms)

factor analysis algorithms,factor analysis algorithms,factor analysis algorithms
Bartlett,Bartlett,Bartlett
W=J−1Λ´U−2

where

J=Λ´U−2Λ
U2=R−
^
R

Related Topics

Factor Score Coefficients (Harman, 1976) (factor analysis algorithms)
Regression (factor analysis algorithms)
Anderson Rubin (factor analysis algorithms)


Anderson Rubin (factor analysis algorithms)

factor analysis algorithms,factor analysis algorithms,factor analysis algorithms
Anderson Rubin,Anderson Rubin,Anderson Rubin
W=(Λ´U−2RU−2Λ)−1/2Λ´U−2

where the symmetric square root of the parenthetical term is taken.

Related Topics

Factor Score Coefficients (Harman, 1976) (factor analysis algorithms)
Regression (factor analysis algorithms)
Bartlett (factor analysis algorithms)


Optional Statistics (Dziubin and Shirkey, 1974) (factor analysis algorithms)

factor analysis algorithms,factor analysis algorithms,factor analysis algorithms
optional statistics,optional statistics,optional statistics

The anti-image covariance matrix A=(aij) is given by

aij=rijriirjj

The chi-square value for Bartlett’s test of sphericity is

χ2=−(W−1−2p+56)log|R|

with p(p−1)/2 degrees of freedom.

The Kaiser-Mayer-Olkin measure of sample adequacy is

KMOj=
Σ
i≠j
r2ij
Σ
i≠j
r2ij+
Σ
i≠j
a2*ij 		KMO=
Σ
i≠j
Σr2ij
Σ
i≠j
Σr2ij+
Σ
i≠j
Σa2*ij

where a*ij is the anti-image correlation coefficient.

Related Topics

FACTOR Algorithms
Extraction of Initial Factors (factor analysis algorithms)
Factor Rotations (factor analysis algorithms)
Factor Score Coefficients (Harman, 1976) (factor analysis algorithms)
References (factor analysis algorithms)


References (factor analysis algorithms)

factor analysis algorithms,factor analysis algorithms,factor analysis algorithms
references,references,references

Dziuban, C. D., and E. C. Shirkey. 1974. When is a correlation matrix appropriate for factor analysis?. Psychological Bulletin, 81, 358-361.

Harman, H. H. 1976. Modern Factor Analysis, 3rd ed. Chicago: University of Chicago Press.

Hendrickson, A. E., and P. O. White. 1964. Promax: a quick method for rotation to oblique simple structure. British Journal of Statistical Psychology, 17, 65-70.

Jennrich, R. I., and P. F. Sampson. 1966. Rotation for simple loadings. Psychometrika, 31, 313-323.

Jöreskog, K. G. 1977. Factor analysis by least-square and maximum-likelihood method. In: Statistical Methods for Digital Computers, volume 3, K. Enslein, A. Ralston, and R. S. Wilf, eds. New York: John Wiley and Sons.

Kaiser, H. F. 1963. Image analysis. In: Problems in Measuring Change, C. W. Harris, eds. Madison: University of Wisconsin Press.

Rummel, R. J. 1970. Applied factor analysis. Evanston: Ill.: Northwestern University Press.

Related Topics

FACTOR Algorithms
Extraction of Initial Factors (factor analysis algorithms)
Factor Rotations (factor analysis algorithms)
Factor Score Coefficients (Harman, 1976) (factor analysis algorithms)
Optional Statistics (Dziubin and Shirkey, 1974) (factor analysis algorithms)


FIT Algorithms

FIT (command),FIT (command),FIT (command)
algorithms,algorithms,algorithms
FIT algorithms,FIT algorithms,FIT algorithms

FIT displays a variety of descriptive statistics computed from the residual series as an aid in evaluating the goodness of fit of one or more models.

Related Topics

Notation (FIT algorithms)
Statistics Computed in FIT (FIT algorithms)


Notation (FIT algorithms)

FIT algorithms,FIT algorithms,FIT algorithms
notation,notation,notation

The following notation is used throughout this chapter unless otherwise stated:

DFH | Hypothesis degrees of freedom
DFE | Error degrees of freedom
e1,...,en | Residual (error) series
X1,...,Xn | Observed series
n | Number of cases

Related Topics

FIT Algorithms
Statistics Computed in FIT (FIT algorithms)


Statistics Computed in FIT (FIT algorithms)

FIT algorithms,FIT algorithms,FIT algorithms
computed statistics,computed statistics,computed statistics

Mean Error (ME)

FIT algorithms,FIT algorithms,FIT algorithms
mean error (ME),mean error (ME),mean error (ME)
ME=nΣi=1ei/n

Mean Percent Error (MPE)

FIT algorithms,FIT algorithms,FIT algorithms
mean percent error (MPE),mean percent error (MPE),mean percent error (MPE)
MPE=100nnΣi=1ei/Xi

Mean Absolute Error (MAE)

FIT algorithms,FIT algorithms,FIT algorithms
mean absolute error (MAE),mean absolute error (MAE),mean absolute error (MAE)
MAE=nΣi=1| ei|/n

Mean Absolute Percent Error (MAPE)

FIT algorithms,FIT algorithms,FIT algorithms
mean absolute percent error (MAPE),mean absolute percent error (MAPE),mean absolute percent error (MAPE)
MAPE=100nnΣi=1| ei/Xi|

Sum of Square Error (SSE)

FIT algorithms,FIT algorithms,FIT algorithms
sum of square error (SSE),sum of square error (SSE),sum of square error (SSE)
SSE=nΣi=1e2i

Mean Square Error (MSE)

FIT algorithms,FIT algorithms,FIT algorithms
mean square error (MSE),mean square error (MSE),mean square error (MSE)
MSE={
SSE/n, if none of DFE and DFH is specified
SSE/DFE,
if DFE is specified or DFH is specified;
then DFE = n − DFH .

Root Mean Square Error (RMS)

FIT algorithms,FIT algorithms,FIT algorithms
root mean square error (RMS),root mean square error (RMS),root mean square error (RMS)
RMS=
√ MSE

Durbin-Watson Statistics (DW)

FIT algorithms,FIT algorithms,FIT algorithms
Durbin-Watson statistics (DW),Durbin-Watson statistics (DW),Durbin-Watson statistics (DW)
DW=n−1Σi=1(ei−ei+1)2nΣi=1e2i

Related Topics

FIT Algorithms
Notation (FIT algorithms)


FREQUENCIES Algorithms

FREQUENCIES (command),FREQUENCIES (command),FREQUENCIES (command)
algorithms,algorithms,algorithms
Frequencies,Frequencies,Frequencies
algorithms,algorithms,algorithms
FREQUENCIES algorithms,FREQUENCIES algorithms,FREQUENCIES algorithms

If the absolute value of any observation is greater than 1013, no calculations are done. For sorting of the observations, see Sorting and Searching.For information on percentiles for grouped data, see Grouped Percentiles.

Related Topics

Notation (FREQUENCIES algorithms)
Basic Statistics (FREQUENCIES algorithms)
References (FREQUENCIES algorithms)


Notation (FREQUENCIES algorithms)

FREQUENCIES algorithms,FREQUENCIES algorithms,FREQUENCIES algorithms
notation,notation,notation

The following notation is used throughout this chapter unless otherwise stated:

Xk | Value of the variable for case k
wk | Weight for case k
NV | Number of distinct values the variable assumes
N | Number of cases
W | Sum of weights of the cases

Related Topics

FREQUENCIES Algorithms
Basic Statistics (FREQUENCIES algorithms)
References (FREQUENCIES algorithms)


Basic Statistics (FREQUENCIES algorithms)

FREQUENCIES algorithms,FREQUENCIES algorithms,FREQUENCIES algorithms
basic statistics,basic statistics,basic statistics

The values are sorted into ascending order and the following statistics are calculated.

Related Topics

Sum of Weights of Cases Having Each Value of X (FREQUENCIES algorithms)
Relative Frequency (Percentage) for each Value of X (FREQUENCIES algorithms)
Adjusted Frequency (Percentage) (FREQUENCIES algorithms)
Cumulative Frequency (Percentage) (FREQUENCIES algorithms)
Minimum (FREQUENCIES algorithms)
Maximum (FREQUENCIES algorithms)
Mode (FREQUENCIES algorithms)
Range (FREQUENCIES algorithms)
The pth percentile (FREQUENCIES algorithms)
Mean (FREQUENCIES algorithms)
Variance (FREQUENCIES algorithms)
Standard Deviation (FREQUENCIES algorithms)
Standard Error of the Mean (FREQUENCIES algorithms)
Skewness (Bliss, 1967, p. 144) (FREQUENCIES algorithms)
Kurtosis (FREQUENCIES algorithms)
FREQUENCIES Algorithms
Notation (FREQUENCIES algorithms)
References (FREQUENCIES algorithms)


Sum of Weights of Cases Having Each Value of X (FREQUENCIES algorithms)

FREQUENCIES algorithms,FREQUENCIES algorithms,FREQUENCIES algorithms
sum of weights of cases having each value of X,sum of weights of cases having each value of X,sum of weights of cases having each value of X

fj=NΣi=1wiki j=1, 2,..., NV

where

ki={
1 | if Xi=Xj
0 | otherwise

where Xj is the jth largest distinct value of X.

Related Topics

Basic Statistics (FREQUENCIES algorithms)
Relative Frequency (Percentage) for each Value of X (FREQUENCIES algorithms)
Adjusted Frequency (Percentage) (FREQUENCIES algorithms)
Cumulative Frequency (Percentage) (FREQUENCIES algorithms)
Minimum (FREQUENCIES algorithms)
Maximum (FREQUENCIES algorithms)
Mode (FREQUENCIES algorithms)
Range (FREQUENCIES algorithms)
The pth percentile (FREQUENCIES algorithms)
Mean (FREQUENCIES algorithms)
Variance (FREQUENCIES algorithms)
Standard Deviation (FREQUENCIES algorithms)
Standard Error of the Mean (FREQUENCIES algorithms)
Skewness (Bliss, 1967, p. 144) (FREQUENCIES algorithms)
Kurtosis (FREQUENCIES algorithms)


Relative Frequency (Percentage) for each Value of X (FREQUENCIES algorithms)

FREQUENCIES algorithms,FREQUENCIES algorithms,FREQUENCIES algorithms
relative frequency (percentage) for each value of X,relative frequency (percentage) for each value of X,relative frequency (percentage) for each value of X

Rfj=(fjW´)×100

where

W´=NVΣi=1fi
(sum over all categories including those declared as missing values)

Related Topics

Basic Statistics (FREQUENCIES algorithms)
Sum of Weights of Cases Having Each Value of X (FREQUENCIES algorithms)
Adjusted Frequency (Percentage) (FREQUENCIES algorithms)
Cumulative Frequency (Percentage) (FREQUENCIES algorithms)
Minimum (FREQUENCIES algorithms)
Maximum (FREQUENCIES algorithms)
Mode (FREQUENCIES algorithms)
Range (FREQUENCIES algorithms)
The pth percentile (FREQUENCIES algorithms)
Mean (FREQUENCIES algorithms)
Variance (FREQUENCIES algorithms)
Standard Deviation (FREQUENCIES algorithms)
Standard Error of the Mean (FREQUENCIES algorithms)
Skewness (Bliss, 1967, p. 144) (FREQUENCIES algorithms)
Kurtosis (FREQUENCIES algorithms)


Adjusted Frequency (Percentage) (FREQUENCIES algorithms)

FREQUENCIES algorithms,FREQUENCIES algorithms,FREQUENCIES algorithms
adjusted frequency (percentage),adjusted frequency (percentage),adjusted frequency (percentage)

Afj=(fjW)×100

where

W=NVΣi=1fiki
(sum over nonmissing categories)

and

ki={
0 | if Xi has been declared missing
1 | otherwise

For all Xj declared missing, an adjusted frequency is not printed.

Related Topics

Basic Statistics (FREQUENCIES algorithms)
Sum of Weights of Cases Having Each Value of X (FREQUENCIES algorithms)
Relative Frequency (Percentage) for each Value of X (FREQUENCIES algorithms)
Cumulative Frequency (Percentage) (FREQUENCIES algorithms)
Minimum (FREQUENCIES algorithms)
Maximum (FREQUENCIES algorithms)
Mode (FREQUENCIES algorithms)
Range (FREQUENCIES algorithms)
The pth percentile (FREQUENCIES algorithms)
Mean (FREQUENCIES algorithms)
Variance (FREQUENCIES algorithms)
Standard Deviation (FREQUENCIES algorithms)
Standard Error of the Mean (FREQUENCIES algorithms)
Skewness (Bliss, 1967, p. 144) (FREQUENCIES algorithms)
Kurtosis (FREQUENCIES algorithms)


Cumulative Frequency (Percentage) (FREQUENCIES algorithms)

FREQUENCIES algorithms,FREQUENCIES algorithms,FREQUENCIES algorithms
cumulative frequency (percentage),cumulative frequency (percentage),cumulative frequency (percentage)

Cfj=jΣi=1fi

Related Topics

Basic Statistics (FREQUENCIES algorithms)
Sum of Weights of Cases Having Each Value of X (FREQUENCIES algorithms)
Relative Frequency (Percentage) for each Value of X (FREQUENCIES algorithms)
Adjusted Frequency (Percentage) (FREQUENCIES algorithms)
Minimum (FREQUENCIES algorithms)
Maximum (FREQUENCIES algorithms)
Mode (FREQUENCIES algorithms)
Range (FREQUENCIES algorithms)
The pth percentile (FREQUENCIES algorithms)
Mean (FREQUENCIES algorithms)
Variance (FREQUENCIES algorithms)
Standard Deviation (FREQUENCIES algorithms)
Standard Error of the Mean (FREQUENCIES algorithms)
Skewness (Bliss, 1967, p. 144) (FREQUENCIES algorithms)
Kurtosis (FREQUENCIES algorithms)


Minimum (FREQUENCIES algorithms)

FREQUENCIES algorithms,FREQUENCIES algorithms,FREQUENCIES algorithms
minimum,minimum,minimum
min
k
Xk

Related Topics

Basic Statistics (FREQUENCIES algorithms)
Sum of Weights of Cases Having Each Value of X (FREQUENCIES algorithms)
Relative Frequency (Percentage) for each Value of X (FREQUENCIES algorithms)
Adjusted Frequency (Percentage) (FREQUENCIES algorithms)
Cumulative Frequency (Percentage) (FREQUENCIES algorithms)
Maximum (FREQUENCIES algorithms)
Mode (FREQUENCIES algorithms)
Range (FREQUENCIES algorithms)
The pth percentile (FREQUENCIES algorithms)
Mean (FREQUENCIES algorithms)
Variance (FREQUENCIES algorithms)
Standard Deviation (FREQUENCIES algorithms)
Standard Error of the Mean (FREQUENCIES algorithms)
Skewness (Bliss, 1967, p. 144) (FREQUENCIES algorithms)
Kurtosis (FREQUENCIES algorithms)


Maximum (FREQUENCIES algorithms)

FREQUENCIES algorithms,FREQUENCIES algorithms,FREQUENCIES algorithms
maximum,maximum,maximum
max
k
Xk

Related Topics

Basic Statistics (FREQUENCIES algorithms)
Sum of Weights of Cases Having Each Value of X (FREQUENCIES algorithms)
Relative Frequency (Percentage) for each Value of X (FREQUENCIES algorithms)
Adjusted Frequency (Percentage) (FREQUENCIES algorithms)
Cumulative Frequency (Percentage) (FREQUENCIES algorithms)
Minimum (FREQUENCIES algorithms)
Mode (FREQUENCIES algorithms)
Range (FREQUENCIES algorithms)
The pth percentile (FREQUENCIES algorithms)
Mean (FREQUENCIES algorithms)
Variance (FREQUENCIES algorithms)
Standard Deviation (FREQUENCIES algorithms)
Standard Error of the Mean (FREQUENCIES algorithms)
Skewness (Bliss, 1967, p. 144) (FREQUENCIES algorithms)
Kurtosis (FREQUENCIES algorithms)


Mode (FREQUENCIES algorithms)

FREQUENCIES algorithms,FREQUENCIES algorithms,FREQUENCIES algorithms
mode,mode,mode

Value of Xj which has the largest observed frequency. If several are tied, the smallest value is selected.

Related Topics

Basic Statistics (FREQUENCIES algorithms)
Sum of Weights of Cases Having Each Value of X (FREQUENCIES algorithms)
Relative Frequency (Percentage) for each Value of X (FREQUENCIES algorithms)
Adjusted Frequency (Percentage) (FREQUENCIES algorithms)
Cumulative Frequency (Percentage) (FREQUENCIES algorithms)
Minimum (FREQUENCIES algorithms)
Maximum (FREQUENCIES algorithms)
Range (FREQUENCIES algorithms)
The pth percentile (FREQUENCIES algorithms)
Mean (FREQUENCIES algorithms)
Variance (FREQUENCIES algorithms)
Standard Deviation (FREQUENCIES algorithms)
Standard Error of the Mean (FREQUENCIES algorithms)
Skewness (Bliss, 1967, p. 144) (FREQUENCIES algorithms)
Kurtosis (FREQUENCIES algorithms)


Range (FREQUENCIES algorithms)

FREQUENCIES algorithms,FREQUENCIES algorithms,FREQUENCIES algorithms
range,range,range

Maximum – Minimum

Related Topics

Basic Statistics (FREQUENCIES algorithms)
Sum of Weights of Cases Having Each Value of X (FREQUENCIES algorithms)
Relative Frequency (Percentage) for each Value of X (FREQUENCIES algorithms)
Adjusted Frequency (Percentage) (FREQUENCIES algorithms)
Cumulative Frequency (Percentage) (FREQUENCIES algorithms)
Minimum (FREQUENCIES algorithms)
Maximum (FREQUENCIES algorithms)
Mode (FREQUENCIES algorithms)
The pth percentile (FREQUENCIES algorithms)
Mean (FREQUENCIES algorithms)
Variance (FREQUENCIES algorithms)
Standard Deviation (FREQUENCIES algorithms)
Standard Error of the Mean (FREQUENCIES algorithms)
Skewness (Bliss, 1967, p. 144) (FREQUENCIES algorithms)
Kurtosis (FREQUENCIES algorithms)


The pth percentile (FREQUENCIES algorithms)

FREQUENCIES algorithms,FREQUENCIES algorithms,FREQUENCIES algorithms
pth percentile,pth percentile,pth percentile
FREQUENCIES algorithms,FREQUENCIES algorithms,FREQUENCIES algorithms
median,median,median

Find the first score interval (x2) containing more than tp cases.

p th percentile ={
x2 if tp−cp1≥100/W
{1−[(W+1)p/100−cc1]}x1
  +[(W+1)p/100−cc1]x2
if tp−cp1<100/W

where

tp=(W+1)p/100
cp1<tp<cp2
x1 and x2 are the values corresponding to cp1 and cp2, respectively
cc1 is the cumulative frequency up to x1
cp1 is the cumulative percent up to x1

Note: when p=50, this is the median.

Related Topics

Basic Statistics (FREQUENCIES algorithms)
Sum of Weights of Cases Having Each Value of X (FREQUENCIES algorithms)
Relative Frequency (Percentage) for each Value of X (FREQUENCIES algorithms)
Adjusted Frequency (Percentage) (FREQUENCIES algorithms)
Cumulative Frequency (Percentage) (FREQUENCIES algorithms)
Minimum (FREQUENCIES algorithms)
Maximum (FREQUENCIES algorithms)
Mode (FREQUENCIES algorithms)
Range (FREQUENCIES algorithms)
Mean (FREQUENCIES algorithms)
Variance (FREQUENCIES algorithms)
Standard Deviation (FREQUENCIES algorithms)
Standard Error of the Mean (FREQUENCIES algorithms)
Skewness (Bliss, 1967, p. 144) (FREQUENCIES algorithms)
Kurtosis (FREQUENCIES algorithms)


Mean (FREQUENCIES algorithms)

FREQUENCIES algorithms,FREQUENCIES algorithms,FREQUENCIES algorithms
mean,mean,mean

X=NVΣj=1fjXjW

Moments about the mean are calculated as:

Mj=NVΣi=1fi(Xi−X)j j=2, 3, 4

Related Topics

Basic Statistics (FREQUENCIES algorithms)
Sum of Weights of Cases Having Each Value of X (FREQUENCIES algorithms)
Relative Frequency (Percentage) for each Value of X (FREQUENCIES algorithms)
Adjusted Frequency (Percentage) (FREQUENCIES algorithms)
Cumulative Frequency (Percentage) (FREQUENCIES algorithms)
Minimum (FREQUENCIES algorithms)
Maximum (FREQUENCIES algorithms)
Mode (FREQUENCIES algorithms)
Range (FREQUENCIES algorithms)
The pth percentile (FREQUENCIES algorithms)
Variance (FREQUENCIES algorithms)
Standard Deviation (FREQUENCIES algorithms)
Standard Error of the Mean (FREQUENCIES algorithms)
Skewness (Bliss, 1967, p. 144) (FREQUENCIES algorithms)
Kurtosis (FREQUENCIES algorithms)


Variance (FREQUENCIES algorithms)

FREQUENCIES algorithms,FREQUENCIES algorithms,FREQUENCIES algorithms
variance,variance,variance

S2=M2(W−1)

Related Topics

Basic Statistics (FREQUENCIES algorithms)
Sum of Weights of Cases Having Each Value of X (FREQUENCIES algorithms)
Relative Frequency (Percentage) for each Value of X (FREQUENCIES algorithms)
Adjusted Frequency (Percentage) (FREQUENCIES algorithms)
Cumulative Frequency (Percentage) (FREQUENCIES algorithms)
Minimum (FREQUENCIES algorithms)
Maximum (FREQUENCIES algorithms)
Mode (FREQUENCIES algorithms)
Range (FREQUENCIES algorithms)
The pth percentile (FREQUENCIES algorithms)
Mean (FREQUENCIES algorithms)
Standard Deviation (FREQUENCIES algorithms)
Standard Error of the Mean (FREQUENCIES algorithms)
Skewness (Bliss, 1967, p. 144) (FREQUENCIES algorithms)
Kurtosis (FREQUENCIES algorithms)


Standard Deviation (FREQUENCIES algorithms)

FREQUENCIES algorithms,FREQUENCIES algorithms,FREQUENCIES algorithms
standard deviation,standard deviation,standard deviation

S=
√ S2

Related Topics

Basic Statistics (FREQUENCIES algorithms)
Sum of Weights of Cases Having Each Value of X (FREQUENCIES algorithms)
Relative Frequency (Percentage) for each Value of X (FREQUENCIES algorithms)
Adjusted Frequency (Percentage) (FREQUENCIES algorithms)
Cumulative Frequency (Percentage) (FREQUENCIES algorithms)
Minimum (FREQUENCIES algorithms)
Maximum (FREQUENCIES algorithms)
Mode (FREQUENCIES algorithms)
Range (FREQUENCIES algorithms)
The pth percentile (FREQUENCIES algorithms)
Mean (FREQUENCIES algorithms)
Variance (FREQUENCIES algorithms)
Standard Error of the Mean (FREQUENCIES algorithms)
Skewness (Bliss, 1967, p. 144) (FREQUENCIES algorithms)
Kurtosis (FREQUENCIES algorithms)


Standard Error of the Mean (FREQUENCIES algorithms)

FREQUENCIES algorithms,FREQUENCIES algorithms,FREQUENCIES algorithms
standard error of the mean,standard error of the mean,standard error of the mean

SEM=S
√ W

Related Topics

Basic Statistics (FREQUENCIES algorithms)
Sum of Weights of Cases Having Each Value of X (FREQUENCIES algorithms)
Relative Frequency (Percentage) for each Value of X (FREQUENCIES algorithms)
Adjusted Frequency (Percentage) (FREQUENCIES algorithms)
Cumulative Frequency (Percentage) (FREQUENCIES algorithms)
Minimum (FREQUENCIES algorithms)
Maximum (FREQUENCIES algorithms)
Mode (FREQUENCIES algorithms)
Range (FREQUENCIES algorithms)
The pth percentile (FREQUENCIES algorithms)
Mean (FREQUENCIES algorithms)
Variance (FREQUENCIES algorithms)
Standard Deviation (FREQUENCIES algorithms)
Skewness (Bliss, 1967, p. 144) (FREQUENCIES algorithms)
Kurtosis (FREQUENCIES algorithms)


Skewness (Bliss, 1967, p. 144) (FREQUENCIES algorithms)

FREQUENCIES algorithms,FREQUENCIES algorithms,FREQUENCIES algorithms
skewness,skewness,skewness

g1=WM3(W−1)(W−2)S3 se(g1)=
√ 6W(W−1)(W−2)(W+1)(W+3)

The skewness if computed only if W≥3 and Variance>0.

Related Topics

Basic Statistics (FREQUENCIES algorithms)
Sum of Weights of Cases Having Each Value of X (FREQUENCIES algorithms)
Relative Frequency (Percentage) for each Value of X (FREQUENCIES algorithms)
Adjusted Frequency (Percentage) (FREQUENCIES algorithms)
Cumulative Frequency (Percentage) (FREQUENCIES algorithms)
Minimum (FREQUENCIES algorithms)
Maximum (FREQUENCIES algorithms)
Mode (FREQUENCIES algorithms)
Range (FREQUENCIES algorithms)
The pth percentile (FREQUENCIES algorithms)
Mean (FREQUENCIES algorithms)
Variance (FREQUENCIES algorithms)
Standard Deviation (FREQUENCIES algorithms)
Standard Error of the Mean (FREQUENCIES algorithms)
Kurtosis (FREQUENCIES algorithms)


Kurtosis (FREQUENCIES algorithms)

FREQUENCIES algorithms,FREQUENCIES algorithms,FREQUENCIES algorithms
kurtosis,kurtosis,kurtosis

g2=W(W+1)M4−3(W−1)M22(W−1)(W−2)(W−3)S4 se(g2)=
√ 4(W2−1)se(g1)2(W−3)(W+5)

The kurtosis is computed only if W≥4 and Variance>0.

Related Topics

Basic Statistics (FREQUENCIES algorithms)
Sum of Weights of Cases Having Each Value of X (FREQUENCIES algorithms)
Relative Frequency (Percentage) for each Value of X (FREQUENCIES algorithms)
Adjusted Frequency (Percentage) (FREQUENCIES algorithms)
Cumulative Frequency (Percentage) (FREQUENCIES algorithms)
Minimum (FREQUENCIES algorithms)
Maximum (FREQUENCIES algorithms)
Mode (FREQUENCIES algorithms)
Range (FREQUENCIES algorithms)
The pth percentile (FREQUENCIES algorithms)
Mean (FREQUENCIES algorithms)
Variance (FREQUENCIES algorithms)
Standard Deviation (FREQUENCIES algorithms)
Standard Error of the Mean (FREQUENCIES algorithms)
Skewness (Bliss, 1967, p. 144) (FREQUENCIES algorithms)


References (FREQUENCIES algorithms)

FREQUENCIES algorithms,FREQUENCIES algorithms,FREQUENCIES algorithms
references,references,references

Blalock, H. M. 1972. Social statistics. New York: McGraw-Hill.

Bliss, C. I. 1967. Statistics in biology, Volume 1. New York: McGraw-Hill.

Related Topics

FREQUENCIES Algorithms
Notation (FREQUENCIES algorithms)
Basic Statistics (FREQUENCIES algorithms)


GENLIN Algorithms

GENLIN (command),GENLIN (command),GENLIN (command)
algorithms,algorithms,algorithms
Generalized Linear Models,Generalized Linear Models,Generalized Linear Models
algorithms,algorithms,algorithms
generalized linear models algorithms,generalized linear models algorithms,generalized linear models algorithms
generalized estimating equations algorithms,generalized estimating equations algorithms,generalized estimating equations algorithms

Generalized linear models (GZLM) and generalized estimating equations (GEE) are commonly used analytical tools for different types of data. Generalized linear models cover not only widely used statistical models, such as linear regression for normally distributed responses, logistic models for binary data, and log linear model for count data, but also many useful statistical models via its very general model formulation. However, the independence assumption prohibits application of generalized linear models to correlated data. Generalized estimating equations were developed to extend generalized linear models to accommodate correlated longitudinal data and clustered data.

Related Topics

Notation (generalized linear models algorithms)
Model (generalized linear models algorithms)
Estimation (generalized linear models algorithms)
Model Testing (generalized linear models algorithms)
Default Tests of Model Effects (generalized linear models algorithms)
Estimated Marginal Means (generalized linear models algorithms)
Scoring (generalized linear models algorithms)
Predicted Values (generalized linear models algorithms)
Diagnostics (generalized linear models algorithms)
Generalized Estimating Equations
Goodness of Fit (generalized estimating equations algorithms)
References (generalized linear models algorithms)


Generalized Linear Models

generalized linear models algorithms,generalized linear models algorithms,generalized linear models algorithms

Generalized linear models were first introduced by Nelder and Wedderburn (1972) and later expanded by McCullagh and Nelder (1989). The following discussion is based on their works.


Notation (generalized linear models algorithms)

generalized linear models algorithms,generalized linear models algorithms,generalized linear models algorithms
notation,notation,notation

The following notation is used throughout this section unless otherwise stated:

n | Number of complete cases in the dataset. It is an integer and n ≥ 1.
p | Number of parameters (including the intercept, if exists) in the model. It is an integer and p ≥ 1.
px | Number of non-redundant columns in the design matrix. It is an integer and px ≥ 1.
y | n × 1 dependent variable vector. The rows are the cases.
r | n × 1 vector of events for the binomial distribution; it usually represents the number of "successes." All elements are non-negative integers.
m | n × 1 vector of trials for the binomial distribution. All elements are positive integers and mi ≥ ri, i=1,...,n.
μ | n × 1 vector of expectations of the dependent variable.
η | n × 1 vector of linear predictors.
X | n × p design matrix. The rows represent the cases and the columns represent the parameters. The ith row is xi=(xi1, ...,xip) T ,i=1,...,n with xi1=1 if the model has an intercept.
O | n × 1 vector of scale offsets. This variable can't be the dependent variable (y) or one of the predictor variables (X).
β | p × 1 vector of unknown parameters. The first element in β is the intercept, if there is one.
ω | n × 1 vector of scale weights. If an element is less than or equal to 0 or missing, the corresponding case is not used.
f | n × 1 vector of frequency counts. Non-integer elements are treated by rounding the value to the nearest integer. For values less than 0.5 or missing, the corresponding cases are not used.
N | Effective sample size. N=nΣi=1fi. If frequency count variable f is not used, N = n.

Related Topics

GENLIN Algorithms
Model (generalized linear models algorithms)
Estimation (generalized linear models algorithms)
Model Testing (generalized linear models algorithms)
Default Tests of Model Effects (generalized linear models algorithms)
Estimated Marginal Means (generalized linear models algorithms)
Scoring (generalized linear models algorithms)
Predicted Values (generalized linear models algorithms)
Diagnostics (generalized linear models algorithms)
Generalized Estimating Equations
Goodness of Fit (generalized estimating equations algorithms)
References (generalized linear models algorithms)


Model (generalized linear models algorithms)

generalized linear models algorithms,generalized linear models algorithms,generalized linear models algorithms
model,model,model

A GZLM of y with predictor variables X has the form

η=g( E (y))=Xβ+O,y˜F

where η is the linear predictor; O is an offset variable with a constant coefficient of 1 for each observation; g(.) is the monotonic differentiable link function which states how the mean of y, E(y)=μ, is related to the linear predictor η ; F is the response probability distribution. Choosing different combinations of a proper probability distribution and a link function can result in different models.

Some combinations are well known models and have been provided in different PASW Statistics procedures. The following table lists these combinations and corresponding procedures.

Distribution, link function, and corresponding procedure
Distribution | Link function | Model | Procedure
Normal | Identity | Linear regression | GLM, REGRESSION
Binomial | Logit | Logistic regression | LOGISTIC REGRESSION
Poisson | Log | Loglinear | GENLOG

In addition, GZLM also assumes yi are independent for i=1,….,n. This is the main assumption which separates GZLM and GEE. Then for each observation, the model becomes

ηi=g(μi)=x T iβ+oi,yi˜F

Notes

• X can be any combination of scale variables (covariates), categorical variables (factors), and interactions. The parameterization of X is the same as in the GLM procedure. Due to use of the over-parameterized model where there is a separate parameter for every factor effect level occurring in the data, the columns of the design matrix X are often dependent. Collinearity between scale variables in the data can also occur. To establish the dependencies in the design matrix, columns of XTΨX, where Ψ= diag (f1ω1,...fnωn),, are examined by using the sweep operator. When a column is found to be dependent on previous columns, the corresponding parameter is treated as redundant. The solution for redundant parameters is fixed at zero.

• When y is a binary dependent variable which can be character or numeric, such as "male"/"female" or 1/2, its values will be transformed to 0 and 1 with 1 typically representing a success or some other positive result. In this document, we assume to be modeling the probability of success. In this document, we assume that y has been transformed to 0/1 values and we always model the probability of success; that is, Prob(y = 1). Which original value should be transformed to 0 or 1 depends on what the reference category is. If the reference category is the last value (REFERENCE=LAST in the syntax), then the first category represents a success and we are modeling the probability of it. For example, if REFERENCE=LAST is used in the syntax, “male” in "male"/"female" and 2 in 1/2 are the last values (since "male" comes later in the dictionary than "female") and would be transformed to 0, and “female” and 1 would be transformed to 1 as we model the probability of them, respectively. However, one way to change to model the probability of “male” and 2 instead is to specify REFERENCE=FIRST in the syntax. Note if original binary format is 0/1 and REFERENCE=LAST is specified, then 0 would be transformed to 1 and 1 to 0.

• When r, representing the number of successes (or number of 1s) and m, representing the number of trials, are used for the binomial distribution, the response is the binomial proportion y = r/m.

Multinomial Distribution

The response variable y is assumed to be ordinal; its values have an intrinsic ordering and correspond to consecutive integers from 1 to J. The design matrix X includes model predictors, but not an intercept. The following new notations are needed to define the model form:

J | The number of values for the ordinal response variable, J ≥ 1.
ψ | J – 1 × 1 vector of threshold parameters ψ =(ψ1,ψ2,...,ψJ−1)´ and ψ1<ψ2<...<ψJ−1.
β | p × 1 vector of regression parameters associated with model predictors, β =(β1,β2,...,βp)´.
B | (J – 1 + p) × 1 vector of all parameters, B=(ψ´,β´)´
γi,j | Conditional cumulative response probability for category j given observed independent variable vector, γi,j=P(yi≤j| x i ).
πi,j | Conditional response probability for category j given observed independent variable vector, πi,j=P(yi=j| x i ) and πi,j=γi,j−γi,j−1 for j=1,...,J.
ηi,j | Linear predictor value of case i for category j. It is related to γi,j through a cumulative link function.

ηi,j=g(γi,j)=ψj− x T i β +oi,   yi˜F.

Related Topics

GENLIN Algorithms
Notation (generalized linear models algorithms)
Estimation (generalized linear models algorithms)
Model Testing (generalized linear models algorithms)
Default Tests of Model Effects (generalized linear models algorithms)
Estimated Marginal Means (generalized linear models algorithms)
Scoring (generalized linear models algorithms)
Predicted Values (generalized linear models algorithms)
Diagnostics (generalized linear models algorithms)
Generalized Estimating Equations
Goodness of Fit (generalized estimating equations algorithms)
References (generalized linear models algorithms)
Probability Distribution (generalized linear models algorithms)
Link Function (generalized linear models algorithms)


Probability Distribution (generalized linear models algorithms)

generalized linear models algorithms,generalized linear models algorithms,generalized linear models algorithms
probability distribution,probability distribution,probability distribution

GZLMs are usually formulated within the framework of the exponential family of distributions. The probability density function of the response Y for the exponential family can be presented as

f(y)=exp{yθ−b(θ)φ/ω+c(y,φ/ω)}

where θ is the canonical (natural) parameter, φ is the scale parameter related to the variance of y and ω is a known prior weight which varies from case to case. Different forms of b(θ) and c(y, φ/ω) will give specific distributions. In fact, the exponential family provides a notation that allows us to model both continuous and discrete (count, binary, and proportional) outcomes. Several are available including continuous ones: normal, inverse Gaussian, gamma; discrete ones: negative binomial, Poisson, binomial, ordinal multinomial; and a mixed distribution: Tweedie.

The mean and variance of y can be expressed as follows

E(y)=b´(θ)=μ
Var(y)=b´´(θ)φω=V(μ)φω

where b´(θ) and b´´(θ) denote the first and second derivatives of b with respect to θ, respectively; V(μ) is the variance function which is a function of μ.

In GZLM, the distribution of y is parameterized in terms of the mean (μ) and a scale parameter (φ) instead of the canonical parameter (θ). The following table lists the distribution of y, corresponding range of y, variance function (V(μ)), the variance of y (Var(y)), and the first derivative of the variance function (V´(μ)), which will be used later.

Distribution, range and variance of the response, variance function, and its first derivative
Distribution | Range of y | V(μ) | Var(y) | V'(μ)
Normal | (−∞,∞) | 1 | φ | 0
Inverse Gaussian | (0,∞) | μ3 | φμ3 | 3μ2
Gamma | (0,∞) | μ2 | φμ2 | 2μ
Negative binomial | 0(1)∞ | μ+kμ2 | μ+kμ2 | 1+2kμ
Poisson | 0(1)∞ | μ | μ | 1
Binomial(m) | 0(1)m/m | μ(1−μ) | μ(1−μ)/m | 1−2μ
Tweedie(q) | [0,∞) | μq | φμq | qμq−1
Multinomial | 1(1)J | There are not simple forms for ordinal multinomial, but they are not needed for parameter estimation.

Notes

• 0(1)z means the range is from 0 to z with increments of 1; that is, 0, 1, 2, …, z.

• For the binomial distribution, the binomial trial variable m is considered as a part of the weight variable ω.

• If a weight variable ω is presented, φ is replaced by φ/ω.

• For the negative binomial distribution, the ancillary parameter (k) can be user-specified or estimated by the maximum likelihood (ML) method. When k = 0, the negative binomial distribution reduces to the Poisson distribution. When k = 1, the negative binomial is the geometric distribution.

• The Tweedie class of distributions includes discrete, continuous and mixed densities as long as q ≤ 0 or q ≥ 1, where q is the exponent in the variance function. Special cases include the normal (q = 0), Poisson (q = 1), gamma (q = 2) and inverse Gaussian (q = 3). Except for these special cases, the Tweedie distributions cannot be written in closed form. Here, we only consider the Tweedie distributions for 1 < q < 2, which can be represented as Poisson mixtures of gamma distributions and are mixed distributions with mass at zero and with support on the non-negative real values. These distributions are sometimes called “compound Poisson”, “compound gamma” and “Poisson-gamma” distributions. q must be user-specified.

Scale parameter handling. The expressions for V(μ) and Var(y) for continuous distributions and Tweedie distributions include the scale parameter φ which can be used to scale the relationship of the variance and mean (Var(y) and μ). Since it is usually unknown, there are three ways to fit the scale parameter:

1. It can be estimated with β jointly by maximum likelihood method.

2. It can be set to a fixed positive value.

3. It can be specified by the deviance or Pearson chi-square. See the topic Goodness-of-Fit Statistics (generalized linear models algorithms) for more information.

On the other hand, discrete distributions do not have this extra parameter (it is theoretically equal to one). Because of it, the variance of y might not be equal to the nominal variance in practice (especially for Poisson and binomial because the negative binomial has an ancillary parameter k). A simple way to adjust this situation is to allow the variance of y for discrete distributions to have the scale parameter as well, but unlike continuous distributions, it can’t be estimated by the ML method. So for discrete distributions, there are two ways to obtain the value of φ:

1. It can be specified by the deviance or Pearson chi-square.

2. It can be set to a fixed positive value.

To ensure the data fit the range of response for the specified distribution, we follow the rules:

• For the gamma or inverse Gaussian distributions, values of y must be real and greater than zero. If a value of y is less than or equal to 0 or missing, the corresponding case is not used.

• For the negative binomial and Poisson distributions, values of y must be integer and non-negative. If a value of y is non-integer, less than 0 or missing, the corresponding case is not used.

• For the binomial distribution and if the response is in the form of a single variable, y must have only two distinct values. If y has more than two distinct values, the algorithm terminates in an error.

• For the binomial distribution and the response is in the form of ratio of two variables denoted events/trials, values of r (the number of events) must be nonnegative integers, values of m (the number of trials) must be positive integers and mi ≥ ri, ∀ i. If a value of r is not integer, less than 0, or missing, the corresponding case is not used. If a value of m is not integer, less than or equal to 0, less than the corresponding value of r, or missing, the corresponding case is not used.

• For the Tweedie distributions, values of y must be zero or positive real. If a value of y is less than 0 or missing, the corresponding case is not used.

The ML method will be used to estimate β and possibly φ for continuous distributions and the Tweedie distribution, or k for the negative binomial. The kernels of the log-likelihood function (ℓk) and the full log-likelihood function (ℓ), which will be used as the objective function for parameter estimation, are listed for each distribution in the following table. Using ℓ or ℓk won’t affect the parameter estimation, but the selection will affect the calculation of information criteria. See the topic Goodness-of-Fit Statistics (generalized linear models algorithms) for more information.

The log-likelihood function for probability distribution
Distribution ℓk and ℓ
Normal

ℓk=nΣi=1−fi2{ωi(yi−μi)2φ+ln(φωi)}

ℓ=ℓk+nΣi=1−fi2{ln(2π)}

Inverse Gaussian

ℓk=nΣi=1−fi2{ωi(yi−μi)2φyiμ2i+ln(φy3iωi)}

ℓ=ℓk+nΣi=1−fi2{ln(2π)}

Gamma

ℓk=nΣi=1fi{ωiφln(ωiyiφμi)−ωiyiφμi−ln(Γ(ωiφ))}

ℓ=ℓk+nΣi=1fi{−ln(yi)}

Negative binomial

ℓk=nΣi=1fiωiφ{yiln(kμi)−(yi+1/k)ln(1+kμi)+ln(Γ(yi+1/k))−ln(Γ(1/k))}

ℓ=ℓk+nΣi=1fiωiφ{−ln(Γ(yi+1))}

Poisson

ℓk=nΣi=1fiωiφ{yiln(μi)−μi}

ℓ=ℓk+nΣi=1fiωiφ{−ln(yi!)}

Binomial(m)

ℓk=nΣi=1fiω*iφ{yiln(μi)+(1−yi)ln(1−μi)}

ℓ=ℓk+nΣi=1fiωiφ{ln(
mi
ri
)},where (
mi
ri
)=mi!ri!(mi−ri)!

Tweedie

ℓk=nΣi=1fi{ln(Vi)+ωiφ(yiμ1−qi(1−q)−μ2−qi(2−q))}

ℓ=ℓk+nΣi=1fi{−ln(yi)}

Multinomial

ℓ=ℓk=nΣi=1fiωiφJΣj=1yi,jln(πi,j),where yi,j={
1 if yi=j
0 otherwise
.

When an individual y = 0 for the negative binomial, Poisson or Tweedie distributions and y = 0 or 1 for the binomial distribution, a separate value of the log-likelihood is given. Let ℓk,i be the log-likelihood value for individual case i when yi = 0 for the negative binomial, Poisson and Tweedie and 0/1 for the binomial. The full log-likelihood for i is equal to the kernel of the log-likelihood for i; that is, ℓi=ℓk,i.

Distribution ℓk,i
Negative binomial

ℓk,i=−fiωiφln(1+kμi)k if yi=0

Poisson

ℓk,i=−fiωiφμi if yi=0

Binomial(m)

ℓk,i={
fiωiφln(1−μi) if yi=0
fiωiφln(μi) if yi=1

Tweedie

−fiωiφμ2−qi(2−q) if yi=0

• Γ(z) is the gamma function and ln(Γ(z)) is the log-gamma function (the logarithm of the gamma function), evaluated at z.

• For the negative binomial distribution, the scale parameter is still included in ℓk for flexibility, although it is usually set to 1.

• For the negative binomial distribution, yi must be a non-negative integer, which means Γ(yi+1)=yi! and ℓ=ℓk+nΣi=1fiωiφ{−ln(yi!)}. In addition, ℓk can be written as nΣi=1fiωiφ{yiln(kμi)−(yi+1k)ln(1+kμi)+yi−1Σj=1ln(1+kj)} because Γ(yi+1/k)Γ(1/k)=yi−1∏j=0(j+1/k). Some potential computational problems can be avoided by using this form. See Cameron and Trivedi (1998, P. 72).

• For the binomial distribution (r/m), the scale weight variable becomes ω*i=ωimi in ℓk; that is, the binomial trials variable m is regarded as a part of the weight. However, the scale weight in the extra term of ℓ is still ωi.

• Vi in the Tweedie distribution is an infinite series as follows:

Vi=∞Σj=1Vij

and

Vij=ωj(1−α)iy−jαi(q−1)jαφj(1−α)(2−q)jΓ(−jα)j!

where α=2−q1−q and. To evaluate the infinite summation for Vi, the value of j is determined for which Vij reaches a maximum and sum the necessary terms of the series in that region. The method proposed by Dunn and Smyth (2005) is adopted here.

Related Topics

Model (generalized linear models algorithms)
Link Function (generalized linear models algorithms)


Link Function (generalized linear models algorithms)

generalized linear models algorithms,generalized linear models algorithms,generalized linear models algorithms
link function,link function,link function
link function,link function,link function
generalized linear models algorithms,generalized linear models algorithms,generalized linear models algorithms

The following tables list the form, inverse form, range of
^
μ
, and first and second derivatives for each link function.

Link function name, form, inverse of link function, and range of the predicted mean
Link function

η=g(μ)

Inverse μ=g−1(η)

Range of
^
μ

Identity

μ

η

^
μ

Log

ln(μ)

exp(η)

^
μ
≥0

Logit

ln(μ1−μ)

exp(η)1+exp(η)

^
μ
[0, 1]

Probit

Φ −1(μ), where Φ (ξ)=1
√ 2π
∫ξ−∞e−z2/2dz

Φ(η)

^
μ
[0, 1]

Complementary log-log

ln(−(ln(1−μ))

1−exp(−exp(η))

^
μ
[0, 1]

Power(α){
α≠0
α=0

{
μα
ln(μ)

{
η1/α
exp(η)

{
^
μ
if α or 1/α is odd integer
^
μ
≥0 otherwise

Log-complement

ln(1−μ)

1−exp(η)

^
μ
≤1

Negative log-log

−ln(−ln(μ))

exp(−exp(−η))

^
μ
[0, 1]

Negative binomial

ln(μμ+1k)

exp(η)k(1−exp(η))

^
μ
≥0

Odds power(α){
α≠0
α=0

{
(μ/(1−μ))α−1α
ln(μ1−μ)

{
(1+αη)1/α1+(1+αη)1/α
exp(η)1+exp(η)

^
μ
[0, 1]

Note: In the power link function, if |α| < 2.2e-16, α is treated as 0.

The first and second derivatives of link function
Link function

First derivative g´(μ)=∂η∂μ=Δ

Second derivative g´´(μ)=∂2η∂μ2

Identity

1

0

Log

1μ

−Δ2

Logit

1μ(1−μ)

Δ2(2μ−1)

Probit

1φ( Φ −1(μ)), where φ(z)=1
√ 2π
e−z2/2

Δ2 Φ −1(μ)

Complementary log-log

1(μ−1)ln(1−μ)

−Δ2(1+ln(1−μ))

Power(α){
α≠0
α=0

{
αμα−1
1μ

{
Δα−1μ
−Δ2

Log-complement

−11−μ

−Δ2

Negative log-log

−1μln(μ)

Δ2(1+ln(μ))

Negative binomial

1μ+kμ2

−Δ2(1+2kμ)

Odds power(α){
α≠0
α=0

{
μα−1(1−μ)α+1
1μ(1−μ)

{
Δ(α−1μ+α+11−μ)
Δ2(2μ−1)

Cumulative Link Function Name, Form, Inverse Form and Range of the Predicted Cumulative Probability
Link function

η=g(γ)

Inverse γ=g−1(η)

Range of
^
γ

Cumulative logit

ln(γ1−γ)

exp(η)1+exp(η)

^
γ
[0, 1]

Cumulative probit

Φ −1(γ), where Φ (ξ)=1
√ 2π
∫ξ−∞e−z2/2dz

Φ (η)

^
γ
[0, 1]

Cumulative complementary log-log

ln(−ln(1−γ))

1−exp(−exp(η))

^
γ
[0, 1]

Cumulative negative log-log

−ln(−ln(γ))

exp(−exp(−η))

^
γ
[0, 1]

Cumulative Cauchit

tan(π(γ−0.5))

0.5+arctan(η)/π

^
γ
[0, 1]

Note: π in the formulae is the number, not the response probability.

The Inverse First and Second Derivatives of Cumulative Link Function
Link function

Inverse first derivative ∂γ∂η=Δ

Inverse second derivative ∂2γ∂η2

Cumulative logit

γ(1−γ)

Δ(1−2γ)

Cumulative probit

φ( Φ −1(γ)), where φ(z)=1
√ 2π
e−z2/2

−Δ× Φ −1(γ)

Cumulative complementary log-log

(γ−1)ln(1−γ)

Δ(1+ln(1−γ))

Cumulative negative log-log

−γln(γ)

−Δ(1+ln(γ))

Cumulative Cauchit

cos2(π(γ−0.5))/π

Δ×sin(2πγ)

When the canonical parameter is equal to the linear predictor, θ=η, then the link function is called the canonical link function. Although the canonical links lead to desirable statistical properties of the model, particularly in small samples, there is in general no a priori reason why the systematic effects in a model should be additive on the scale given by that link. The canonical link functions for probability distributions are given in the following table.

Canonical and default link functions for probability distributions
Distribution | Canonical link function
Normal | Identity
Inverse Gaussian | Power(−2)
Gamma | Power(−1)
Negative binomial | Negative binomial
Poisson | Log
Binomial | Logit
Tweedie | Power(1−q)
Multinomial | Cumulative logit

Related Topics

Model (generalized linear models algorithms)
Probability Distribution (generalized linear models algorithms)


Estimation (generalized linear models algorithms)

generalized linear models algorithms,generalized linear models algorithms,generalized linear models algorithms
estimation,estimation,estimation

Having selected a particular model, it is required to estimate the parameters and to assess the precision of the estimates.

Related Topics

GENLIN Algorithms
Notation (generalized linear models algorithms)
Model (generalized linear models algorithms)
Model Testing (generalized linear models algorithms)
Default Tests of Model Effects (generalized linear models algorithms)
Estimated Marginal Means (generalized linear models algorithms)
Scoring (generalized linear models algorithms)
Predicted Values (generalized linear models algorithms)
Diagnostics (generalized linear models algorithms)
Generalized Estimating Equations
Goodness of Fit (generalized estimating equations algorithms)
References (generalized linear models algorithms)
Parameter estimation (generalized linear models algorithms)
Parameter Estimate Covariance Matrix, Correlation Matrix and Standard Errors (generalized linear models algorithms)
Confidence Intervals (generalized linear models algorithms)
Chi-Square Statistics (generalized linear models algorithms)
P Values (generalized linear models algorithms)


Parameter estimation (generalized linear models algorithms)

The parameters are estimated by maximizing the log-likelihood function (or the kernel of the log-likelihood function) from the observed data. Let s be the first derivative (gradient) vector of the log-likelihood with respect to each parameter, then we wish to solve

s=[∂ℓ∂β]p×1= 0

or, for the multinomial distribution,

s =[∂ℓ∂ Β ](J−1+p)×1=[
∂ℓ∂ ψ
∂ℓ∂ β
]= 0 .

In general, there is no closed form solution except for a normal distribution with identity link function, so estimates are obtained numerically via an iterative process. A Newton-Raphson and/or Fisher scoring algorithm is used and it is based on a linear Taylor series approximation of the first derivative of the log-likelihood.

First Derivatives

If the scale parameter φ is not estimated by the ML method, s is a p×1 vector with the form:

s=nΣi=1fiωi(yi−μi)φ V(μi)g´(μi)·xi=1φnΣi=1fiωi(yi−μi)V(μi)g´(μi)·xi

where μi, V(μi) and g´(μi) are defined in Table “Link function name, form, inverse of link function, and range of the predicted mean”, Table “Distribution, range and variance of the response, variance function, and its first derivative” and Table “The first and second derivatives of link function”, respectively.

If the scale parameter φ is estimated by the ML method, it is handled by searching for ln(φ) since φ is required to be greater than zero. Similarly, if the ancillary parameter k for negative binomial is estimated by the ML method, it is still handled by searching for ln(k) since k is also required to be greater than zero.

Let τ = ln(φ) so φ = exp(τ) (or τ= ln(k) and k = exp(τ) for negative binomial), then s is a (p+1)×1 vector with the following form

s=[
∂ℓ∂β
∂ℓ∂τ
](p+1)×1=[
1exp(τ)nΣi=1fiωi(yi−μi)V(μi)g´(μi)·xi
∂ℓ∂τ
]

where ∂ℓ/∂β is the same as the above with φ is replaced with exp(τ) (though for negative binomial, φ is not replaced), ∂ℓ/∂τ has a different form depending on the distribution as follows:

The 1st derivative functions w.r.t. the scale parameter for probability distributions
Distribution

∂ℓ∂τ

Normal

nΣi=1fi2{ωi(yi−μi)2exp(τ)−1}

Inverse Gaussian

nΣi=1fi2{ωi(yi−μi)2exp(τ)yiμ2i−1}

Gamma

nΣi=1−fiωiexp(τ){ln(ωiyiexp(τ)μi)+(1−yiμi)−ψ(ωiexp(τ))}

Negative Binomial

nΣi=1fiωiφexp(τ){ai+ln(1+exp(τ)μi)−ψ(yi+1exp(τ))+ψ(1exp(τ))}

where for all appropriate link functions other than negative binomial link function,

ai=exp(τ)(yi−μi)(1+exp(τ)μi)

and for the negative binomial link function,

ai=0

Tweedie

nΣi=1fi∂ℓi∂τ,

where

∂ℓi∂τ={
ωiμ2−qiexp(τ)(2−q) for yi=0
∂Vi∂τVi−ωiyiμ1−qiexp(τ)(1−q)+ωiμ2−qiexp(τ)(2−q) for yi>0

Note: ψ(z) is a digamma function, which is the derivative of logarithm of a gamma function, evaluated at z; that is, ψ(z)=∂ln(Γ(z))∂z=Γ´(z)Γ(z).

As mentioned above, for normal distribution with identity link function which is a classical linear regression model, there is a closed form solution for both β and τ, so no iterative process is needed. The solution for β, after applying the SWEEP operation in GLM procedure, is

^
β
=(nΣi=1fiωi x T i x i)−(nΣi=1fiωi x T i(yi−oi))=( X T Ψ X )−( X T Ψ (y−o)) ,

where Ψ = diag (f1ω1,...fnωn) and ( Z )− is the generalized inverse of a matrix Z. If the scale parameter φ is also estimated by the ML method, the estimate of τ is

^
τ
=ln(
^
φ
)=ln(1NnΣi=1fiωi(yi− x T i
^
β
−oi)2).

For the ordinal multinomial model:

s =[∂ℓ∂ψ1,...,∂ℓ∂ψJ−1,∂ℓ∂β1,...,∂ℓ∂βp]T,

where

∂ℓ∂ψj=nΣi=1fiωiφ∂γi,j∂ηi,j(yi,jπi,j−yi,j+1πi,j+1),   j=1,...,J−1
∂ℓ∂βt=−nΣi=1JΣj=1fiωiφ(∂γi,j∂ηi,j−∂γi,j−1∂ηi,j−1)yi,jπi,jxit,   t=1,...,p,

and

πi,j=γi,j−γi,j−1 for j=1,...,J
γi,j={
0 | j=0
g−1(ψj− x T i β +oi) | j=1,...,J−1
1 | j=J
,

Note: if ∂γi,j=0 or ∂γi,j=1 then ∂γi,j∂ηi,j=0 for all cumulative link functions.

Second Derivatives

Let H be the second derivative (Hessian) matrix. If the scale parameter is not estimated by the ML method, H is a p×p matrix with the following form

H=[∂2ℓ∂β∂β T ]p×p=−X T W X

where W is an n×n diagonal matrix. There are two definitions for W depending on which algorithm is used: We for Fisher scoring and Wo for Newton-Raphson. The ith diagonal element for We is

we,i=fiωiφ·1V(μi)(g´(μi))2,

and the ith diagonal element for Wo is

wo,i=we,i+fiωiφ(yi−μi)·V(μi)g´´(μi)+V´(μi)g´(μi)(V(μi))2(g´(μi))3,

where V´(μi) and g´´(μi) are defined in Table “Distribution, range and variance of the response, variance function, and its first derivative” and Table “The first and second derivatives of link function”, respectively. Note the expected value of Wo is We and when the canonical link is used for the specified distribution, then Wo = We.

If the scale parameter is estimated by the ML method, H becomes a (p+1)×(p+1) matrix with the form

H=[
∂2ℓ∂β∂β T | ∂2ℓ∂β∂τ
∂2ℓ∂τ∂β T | ∂2ℓ∂τ2
](p+1)×(p+1)

where ∂2ℓ/∂β∂τ is a p×1 vector and ∂2ℓ/∂τ ∂β T is a 1×p vector and the transpose of ∂2ℓ/∂β∂τ. For all three continuous distributions:

∂2ℓ∂β∂τ=nΣi=1−fiωi(yi−μi)exp(τ)V(μi)g´(μi)· x i=−∂ℓ∂β.

The forms of ∂2ℓ/∂ β ∂τ for negative binomial are as follows depending on the link functions:

For all appropriate link functions other than negative binomial link function,

∂2ℓ∂ β ∂τ=nΣi=1−fiωiexp(τ)(yi−μi)φ(1+exp(τ)μi)2g´(μi)· x i;

for the negative binomial link function,

∂2ℓ∂ β ∂τ=nΣi=1fiωiμiφ· x i.

The forms of ∂2ℓ/∂τ2 are listed in the following table.

The second derivative functions w.r.t. the scale parameter for probability distributions
Distribution

∂2ℓ∂τ2

Normal

nΣi=1−fiωi2exp(τ)(yi−μi)2

Inverse Gaussian

nΣi=1−fiωi2exp(τ)yiμ2i(yi−μi)2

Gamma

nΣi=1fiωiexp(τ){ln(ωiyiexp(τ)μi)+(2−yiμi)−ψ(ωiexp(τ))−ωiexp(τ)ψ´(ωiexp(τ))}

Negative Binomial

nΣi=1fiωiφ{
ai−1exp(τ)ln(1+exp(τ)μi)+
1exp(τ)[ψ(yi+1exp(τ))−ψ(1exp(τ))]+
1exp(2τ)[ψ´(yi+1exp(τ))−ψ´(1exp(τ))]
};

where for all appropriate link functions other than negative binomial link function,

ai=−yiexp(τ)μi+μi+2exp(τ)μ2i(1+exp(τ)μi)2

and for the negative binomial link function,

ai=0

Tweedie

nΣi=1fi∂2ℓi∂τ2,

where

∂2ℓi∂τ2={
−ωiμ2−qiexp(τ)(2−q) for yi=0
∂2Vi∂τ2Vi−(∂Vi∂τVi)2+ωiyiμ1−qiexp(τ)(1−q)−ωiμ2−qiexp(τ)(2−q) for yi>0

Note: ψ´(z) is a trigamma function, which is the derivative of ψ(z), evaluated at z.

∂Vi∂τ=(α−1)∞Σj=1jVij and the evaluation of it is similar to that of the series Vi=∞Σj=1Vij.

For the ordinal multinomial model:

H=[∂2ℓ∂ Β ∂ Β T ](J−1+p)×(J−1+p)=[
∂2ℓ∂ ψ ∂ ψ T | ∂2ℓ∂ ψ ∂ β T
∂2ℓ∂ β ∂ ψ T | ∂2ℓ∂ β ∂ β T
] .

The elements of H have two forms: (1) the expected first derivatives of the estimating equation s which is applied to Fisher scoring and (2) the first derivatives of the estimating equation s which is applied to Newton Raphson.

Expected second derivatives have the following expressions:

∂2ℓ∂ψj−1∂ψj=nΣi=1fiωiφ∂γi,j−1∂ηi,j−1∂γi,j∂ηi,j1πi,j,   j=2,...,J−1,
∂2ℓ∂ψ2j=−nΣi=1fiωiφ(∂γi,j∂ηi,j)2(1πi,j+1πi,j+1),   j=1,...,J−1,
∂2ℓ∂ψl∂ψj=0, for |l−j|>1,
∂2ℓ∂ψj∂βt=nΣi=1fiωiφ[(∂γi,j∂ηi,j−∂γi,j−1∂ηi,j−1)1πi,j−(∂γi,j+1∂ηi,j+1−∂γi,j∂ηi,j)1πi,j+1]∂γi,j∂ηi,jxit,
        j=1,...,J−1,   t=1,...,p,
∂2ℓ∂βt∂βu=−nΣi=1JΣj=1fiωiφ(∂γi,j∂ηi,j−∂γi,j−1∂ηi,j−1)21πi,jxitxiu,   t,u=1,...,p.

Second derivatives have the following expressions:

∂2ℓ∂ψj−1∂ψj=nΣi=1fiωiφ∂γi,j−1∂ηi,j−1∂γi,j∂ηi,jyi,jπ2i,j,   j=2,...,J−1,
∂2ℓ∂ψ2j=nΣi=1fiωiφ[∂2γi,j∂η2i,j(yi,jπi,j−yi,j+1πi,j+1)−(∂γi,j∂ηi,j)2(yi,jπ2i,j+yi,j+1π2i,j+1)],   j=1,...,J−1,
∂2ℓ∂ψl∂ψj=0, for |l−j|>1,
∂ℓ∂ψj∂βt=−nΣi=1fiωiφ[∂2γi,j∂η2i,jπi,j−∂γi,j∂ηi,j(∂γi,j∂ηi,j−∂γi,j−1∂ηi,j−1)]yi,jπ2i,jxit+
        nΣi=1fiωiφ[∂2γi,j∂η2i,jπi,j+1−∂γi,j∂ηi,j(∂γi,j+1∂ηi,j+1−∂γi,j∂ηi,j)]yi,j+1π2i,j+1xit,
        j=1,...,J−1,   t=1,...,p,
∂ℓ∂βt∂βu=nΣi=1JΣj=1fiωiφ[(∂2γi,j∂η2i,j−∂2γi,j−1∂η2i,j−1)πi,j−(∂γi,j∂ηi,j−∂γi,j−1∂ηi,j−1)2]yi,jπ2i,jxitxiu,
        t,u=1,...,p,

Iterations

An iterative process to find the solution for β (which might include φ, k for negative binomial or Ψ for multinomial) is based on Newton-Raphson (for all iterations), Fisher scoring (for all iterations) or a hybrid method. The hybrid method consists of applying Fisher scoring steps for a specified number of iterations before switching to Newton-Raphson steps. Newton-Raphson performs well if the initial values are close to the solution, but the hybrid method can be used to improve the algorithm’s robustness from bad initial values. Apart from improved robustness, Fisher scoring is faster due to the simpler form of the Hessian matrix.

The following notation applies to the iterative process:

I | Starting iteration for checking complete separation and quasi-complete separation. It must be 0 or a positive integer. This criterion is not used if the value is 0.
J | The maximum number of steps in step-halving method. It must be a positive integer.
K | The first number of iterations using Fisher scoring, then switching to Newton-Raphson. It must be 0 or a positive integer. A value of 0 means using Newton-Raphson for all iterations and a value greater or equal to M means using Fisher scoring for all iterations.
M | The maximum number of iterations. It must be a non-negative integer. If the value is 0, then initial parameter values become final estimates.
εℓ, ε p , εH | Tolerance levels for three types of convergence criteria.
Abs | A 0/1 binary variable; Abs = 1 if absolute change is used for convergence criteria and Abs = 0 if relative change is used.

And the iterative process is outlined as follows:

1. Input values for I, J, K, M, εℓ, ε p , εH and Abs for each type of three convergence criteria.

2. Input initial values β ( 0 ) or if no initial values are given, compute initial values (see below), then calculate log-likelihood ℓ(0), gradient vector s(0) and Hessian matrix H(0) based on β ( 0 ) .

3. Let ξ=1.

4. Compute estimates of ith iteration:

β ( i ) =β ( i−1 ) −ξ(H ( i−1))−s ( i−1), where (H)− is a generalized inverse of H. Then compute the log-likelihood based on β ( i ) .

5. Use step-halving method if ℓ(i)<ℓ(i−1): reduce ξ by half and repeat step (4). The set of values of ξ is {0.5 j : j = 0, …, J – 1}. If J is reached but the log-likelihood is not improved, issue a warning message, then stop.

6. Compute gradient vector s(i) and Hessian matrix H(i) based on β ( i ) . Note that We is used to calculate H(i) if i ≤ K; Wo is used to calculate H(i) if i > K.

7. Check if complete or quasi-complete separation of the data is established (see below) if distribution is binomial or ordinal multinomial and the current iteration i ≥ I. If either complete or quasi-complete separation is detected, issue a warning message, then stop.

8. Check if all three convergence criteria (see below) are met. If they are not but M is reached, issue a warning message, then stop.

9. If all three convergence criteria are met, check if complete or quasi-complete separation of the data is established if distribution is binomial or ordinal multinomial and i < I (because checking for complete or quasi-complete separation has not started yet). If complete or quasi-complete separation is detected, issue a warning message, then stop, otherwise, stop (the process converges for binomial or ordinal multinomial successfully). If all three convergence criteria are met for the distributions other than binomial or ordinal multinomial, stop (the process converges for other distributions successfully). The final vector of estimates is denoted by
^
β
(and
^
τ
and
^
Ψ
for ordinal multinomial). Otherwise, go back to step (3).

Initial Values

If initial values are not specified by the user, they are calculated as follows:

1. Set the initial fitted values
˜
μ
i =(yimi+0.5)/(mi+1) for a binomial distribution (yi can be a proportion or 0/1 value) and
˜
μ
i =yi for a non-binomial distribution. From these derive
˜
η
i = g(
˜
μ
i) , g´(
˜
μ
i) and V(
˜
μ
i). If
˜
η
i becomes undefined, set
˜
η
i=1.

2. Calculate the weight matrix
˜
W
e with the diagonal element
˜
w
ei=fiωiφ·1V(
˜
μ
i)(g´(
˜
μ
i))2, where φ is set to 1 or a fixed positive value. If the denominator of
˜
w
ei becomes 0, set
˜
w
ei= 0.

3. Assign the adjusted dependent variable z with the ith observation zi=(
˜
η
i−oi)+(yi−
˜
μ
i)g´(
˜
μ
i) for a binomial distribution and zi=(
˜
η
i−oi) for a non-binomial distribution.

4. Calculate the initial parameter values

β (0)=( X T
˜
W
e X )−1 X T
˜
W
e z

and

φ(0) = ( z − X β (0)) T
˜
W
e( z − X β (0)).

if the scale parameter is estimated by the ML method.

For the ancillary parameter k of the negative binomial model, the initial k = 1, so the initial τ = 0.

For the ordinal multinomial model, let Nj=nΣi=1fiyi,j be the number of responses in category j, and N=nΣi=1fi be the effective sample size. Initial values for the threshold parameters, with and without the offset variable, are then computed according to the following formulae:

ψ(0)j=g(jΣl=1NlN)

and

ψ(0)j=g(jΣl=1NlN)−oj

for j=1,...,J−1, where oj=jΣl=1nΣi=1fiyi,joi/jΣl=1nΣi=1fiyi,j.

Initial values for all regression parameters are set to zero.

Scale Parameter Handling

1. For normal, inverse Gaussian, gamma and Tweedie response, if the scale parameter is estimated by the ML method, then it will be estimated jointly with the regression parameters; that is, the last element of the gradient vector s is with respect to τ.

2. If the scale parameter is set to be a fixed positive value, then it will be held fixed at that value for in each iteration of the above process.

3. If the scale parameter is specified by the deviance or Pearson chi-square divided by degrees of freedom, then it will be fixed at 1 to obtain the regression estimates through the whole iterative process. Based on the regression estimates, calculate the deviance and Pearson chi-square values and obtain the scale parameter estimate.

Checking for Separation

For each iteration after the user-specified number of iterations; that is, if i > I, calculate (note here v refers to cases in the dataset)

pmin=
min
v
pv
pmax=
max
v
pv,
p*min=
min
v
(min(μv,1−μv)),

where

pv={
μv if yv= success (=1)
1−μv if yv= failure (=0)

(pv is the probability of the observed response for case v) and μv=g−1( x T v β +ov).

For the ordinal multinomial model, the definitions are modified as follows:

pmin=
min
v
πv,yv
pmax=
max
v
πv,yv,
p*min=
min
v
(
min﻿
j
πv,j).

The rules for checking complete separation or quasi-complete separation for binomial or multinomial models are otherwise the same.

If min(pmin, pmax)=pmin>0.99 we consider there to be complete separation. Otherwise, if pmax>0.99 or p*min<0.001 and if there are very small diagonal elements (absolute value <
√ 10−7
≈3.16×10−4) in the non-redundant parameter locations in the lower triangular matrix in Cholesky decomposition of –H, where H is the Hessian matrix, then there is a quasi-complete separation.

Convergence Criteria

The following convergence criteria are considered:

Log-likelihood convergence: {
|ℓ ( i ) −ℓ ( i−1 ) ||ℓ ( i−1 ) |+10−6<εℓ if relative change
|ℓ ( i ) −ℓ ( i−1 ) | <εℓ if absolute change
.

Parameter convergence: {
max
j
(|β(i)j−β(i−1)j||β(i−1)j|+10−6)<ε p if relative change
max
j
(|β(i)j−β(i−1)j|) <ε p if absolute change
.

Hessian convergence: {
(s ( i ) ) T (H ( i ) )−(s ( i ) )|ℓ ( v ) |+10−6<εH if relative change
(s ( i ) ) T (H ( i ) )−(s ( i ) ) <εH if absolute change
.

where εℓ, ε p and εH are the given tolerance levels for each type.

If the Hessian convergence criterion is not user-specified, it is checked based on absolute change with ε H = 1E-4 after the log-likelihood or parameter convergence criterion has been satisfied. If Hessian convergence is not met, a warning is displayed.

Related Topics

Estimation (generalized linear models algorithms)
Parameter Estimate Covariance Matrix, Correlation Matrix and Standard Errors (generalized linear models algorithms)
Confidence Intervals (generalized linear models algorithms)
Chi-Square Statistics (generalized linear models algorithms)
P Values (generalized linear models algorithms)


Parameter Estimate Covariance Matrix, Correlation Matrix and Standard Errors (generalized linear models algorithms)

The parameter estimate covariance matrix, correlation matrix and standard errors can be obtained easily with parameter estimates. Whether or not the scale parameter is estimated by ML, parameter estimate covariance and correlation matrices are listed for
^
β
only because the covariance between
^
β
and
^
τ
should be zero.

If the ancillary parameter k (τ) of negative binomial is estimated by ML method, the parameter estimate covariance and correlation matrices are still listed for
^
β
only even though the covariance between
^
β
and
^
τ
is generally not zero.

For the ordinal multinomial model, parameter estimate covariance and correlation matrices are listed for
^
β
and
^
Ψ
.

Model-Based Parameter Estimate Covariance

The model-based parameter estimate covariance matrix is given by

Σ m =− Η −=−(−X W X)−

where H− is the generalized inverse of the Hessian matrix evaluated at the parameter estimates. The corresponding rows and columns for redundant parameter estimates should be set to zero.

Robust Parameter Estimate Covariance

The validity of the parameter estimate covariance matrix based on the Hessian depends on the correct specification of the variance function of the response in addition to the correct specification of the mean regression function of the response. The robust parameter estimate covariance provides a consistent estimate even when the specification of the variance function of the response is incorrect. The robust estimator is also called Huber’s estimator because Huber (1967) was the first to describe this variance estimate; White’s estimator or HCCM (heteroskedasticity consistent covariance matrix) estimator because White (1980) independently showed that this variance estimate is consistent under a linear regression model including heteroskedasticity; or the sandwich estimator because it includes three terms. The robust (or Huber/White/sandwich) estimator is defined as follows

Σ r = Σ m (nΣi=1[∂ℓi∂β][∂ℓi∂β] T ) Σ m = Σ m (nΣi=1fi(ωi(yi−μi)φ V(μi)g´(μi))2·xi·x T i) Σ m

For the ordinal multinomial model,

Σ r = Σ m (nΣi=1fi[∂ℓi∂ Β ][∂ℓi∂ B ] T ) Σ m

where

∂ℓi∂ Β = [∂ℓi∂ ψ T ,∂ℓi∂ β T ] T =[∂ℓi∂ψ1,...,∂ℓi∂ψJ−1,∂ℓi∂β1,...,∂ℓi∂βp] T
∂ℓi∂ψj=ωiφ∂γi,j∂ηi,j(yi,jπi,j−yi,j+1πi,j+1),   j=1,...,J−1
∂ℓi∂βt=−JΣj=1ωiφ(∂γi,j∂ηi,j−∂γi,j−1∂ηi,j−1)yi,jπi,jxit,   t=1,...,p.

Parameter Estimate Correlation

The correlation matrix is calculated from the covariance matrix as usual. Let σij be an element of Σ m or Σ r , then the corresponding element of the correlation matrix is σij
√ σii
√ σjj
. The corresponding rows and columns for redundant parameter estimates should be set to system missing values.

Parameter Estimate Standard Error

Let
^
β
i denote a non-redundant parameter estimate for all distributions except multinomial. Its standard error is the square root of the ith diagonal element of Σ m or Σ r :

^
σ
βi=
√ σii

The standard error for redundant parameter estimates is set to a system missing value. If the scale parameter is estimated by the ML method, we obtain
^
τ
and its standard error estimate
^
σ
τ=
√ −1(∂2ℓ∂τ2)
, where ∂2ℓ∂τ2 can be found in Table “The second derivative functions w.r.t. the scale parameter for probability distributions”. Then the estimate of the scale parameter is exp(
^
τ
) and the standard error estimate is (exp(
^
τ
)·
^
σ
τ)

For the ordinal multinomial model, let
^
ψ
j, j=1,...,J−1, be threshold parameter estimates and
^
β
i, i=1,...,p, denote non-redundant regression parameter estimates. Their standard errors are the square root of the ith diagonal element of Σ m or Σ r :
^
σ
ψj=
√ σjj
and
^
σ
βi=
√ σ(J−1+i),(J−1+i)
, respectively.

Related Topics

Estimation (generalized linear models algorithms)
Parameter estimation (generalized linear models algorithms)
Confidence Intervals (generalized linear models algorithms)
Chi-Square Statistics (generalized linear models algorithms)
P Values (generalized linear models algorithms)


Confidence Intervals (generalized linear models algorithms)

There are two methods of computing confidence intervals for the non-redundant parameters. One is based on the asymptotic normality of the parameter estimators, and the other is based on the profile likelihood function. The latter is time consuming because it needs to run iterative processes many times.

Wald Confidence Intervals

Wald confidence intervals are based on the asymptotic normal distribution of the parameter estimates. The 100(1 – α)% Wald confidence interval for β j is given by

(
^
β
j−z1−α/2
^
σ
βj,
^
β
j+z1−α/2
^
σ
βj),

where zp is the 100pth percentile of the standard normal distribution.

If exponentiated parameter estimates are requested for logistic regression or log-linear models, then using the delta method, the estimate of exp(βj) is exp(
^
β
j), the standard error estimate of exp(
^
β
j) is (exp(
^
β
j)·
^
σ
βj) and the corresponding 100(1 – α)% Wald confidence interval for exp(βj) is

(exp(
^
β
j−z1−α/2
^
σ
βj),exp(
^
β
j+z1−α/2
^
σ
βj)).

Wald confidence intervals for redundant parameter estimates are set to system missing values.

Similarly, the 100(1 – α)% Wald confidence interval for φ or k of the negative binomial model is

(exp(
^
τ
−z1−α/2
^
σ
τ),exp(
^
τ
+z1−α/2
^
σ
τ))

Additionally, for the ordinal multinomial model, the 100(1 – α)% Wald confidence interval for ψj is given by

(
^
ψ
j−z1−α/2
^
σ
ψj,
^
ψ
j+z1−α/2
^
σ
ψj)

the estimate of exp(ψj) is exp(
^
ψ
j), the standard error estimate of exp(
^
ψ
j) is (exp(
^
ψ
j)·
^
σ
ψj) and the corresponding 100(1 – α)% Wald confidence interval for exp(ψj) is

(exp(
^
ψ
j−z1−α/2
^
σ
ψj),exp(
^
ψ
j+z1−α/2
^
σ
ψj))

Profile Likelihood Confidence Intervals

The construction of profile likelihood confidence interval (PLCI) is first derived from the asymptotic Chi-square distribution of the generalized likelihood ratio test by Venzon and Moolgavkav (1988). We use the modified algorithm, which is equivalent to theirs, by Heinze and Ploner (2002). The computation is iterative and very time consuming, especially if the number of predictors is large because the number of iterative processes needed is 2px; for the ordinal multinomial model, it is 2(J – 1 + px). PLCIs for redundant parameter estimates are set to system missing values and won’t involve iterative processes.

The iterative process is as follows:

1. Let initial values β ( 0 ) (note it might include τ; Ψ for multinomial) be the maximum likelihood estimates and initial log-likelihood ℓ(0), gradient vector s(0) and Hessian matrix H(0) are obtained based on β ( 0 ) .

2. Calculate ℓ0=ℓ(0)−0.5χ21,(1−α), where χ21,(1−α) is the 100(1 – α)% percentile of the Chi-square distribution with one degree of freedom.

3. Set the parameter number j = 1.

4. Set the iteration number i = 1.

5. Compute the incremental value λ at the (i – 1)th iteration:

λ(i−1)=±{2[ℓ0−ℓ(i−1)]+(s ( i−1 ) )(H ( i−1 ) )−(s ( i−1 ) ) e j(H ( i−1 ) )− e j}1/2,

where e j is the jth unit vector. Take the positive values of λ first.

In rare cases, the value in the above braces is negative or ℓ(i−1) is missing or undefined. In that case, λ(i−1) is undefined (note that λ(0) is highly unlikely to be undefined) and the parameters can't be updated. To solve this problem, in general, we just take a simple average of parameters from the two previous iterations β ( i ) =12( β ( i−1 ) + β ( i−2 ) ). If λ(i) based on β ( i ) is still undefined, we continue the process up to 5 times by taking the average of the current β ( i ) value and β ( i−2 ) till λ(i) becomes defined, otherwise, we issue a warning and stop.

6. Compute the step size d (i−1)=−(H ( i−1 ) )−(s ( i−1 ) +λ(i−1) e j).

7. Update parameter estimates β ( i ) = β ( i−1 ) + d ( i−1 ) .

8. Compute log-likelihood ℓ(i), gradient vector s(i) and Hessian matrix H(i) based on β ( i ) . Note that whether We or Wo is used to calculate H(i) should be based on what has been used in the maximum likelihood estimates of β.

9. Check if the following two criteria with tolerance levels εℓ and εH are satisfied:

(a) |ℓ ( i ) −ℓ0| <εℓ

(b) (s ( i ) +λ ( i ) j)(H ( i ) )−(s ( i ) +λ ( i ) j) <εH .

If both criteria are met or the maximum number of iterations is reached, stop. Otherwise, set i = i + 1 and go back to step (5).

10. The final vector of estimates is denoted by
^
β
u, then
^
β
uj is the upper confidence limit for βj.

11. Repeat steps (4) – (9) with negative values of λ in step (5) to find the lower confidence limit
^
β
lj.

12. Repeat steps (4) – (11) by setting the parameter number j = 2, …, px.

Note

• If the scale parameter or ancillary parameter k of the negative binomial model is estimated by ML method, then it will be estimated jointly with regression parameters for the iterative processes of each regression parameter βj, j = 1, …, px. Then the PLCI for φ will be obtained by the iterative processes as well, and is equal to (exp(
^
τ
l),exp(
^
τ
u)). Similarly, the profile likelihood confidence interval for exp(βj) is calculated as (exp(
^
β
lj),exp(
^
β
uj)).

• If the scale parameter or ancillary parameter k of the negative binomial model is set to be a fixed positive value, then it will be held fixed at that value for each iterative process.

• If the scale parameter is specified for all distributions by the deviance or Pearson chi-square divided by degrees of freedom, then φ will be held fixed at the value estimated from the deviance or Pearson statistic during the full model fit for each iterative process. See the topic Goodness-of-Fit Statistics (generalized linear models algorithms) for more information.

Related Topics

Estimation (generalized linear models algorithms)
Parameter estimation (generalized linear models algorithms)
Parameter Estimate Covariance Matrix, Correlation Matrix and Standard Errors (generalized linear models algorithms)
Chi-Square Statistics (generalized linear models algorithms)
P Values (generalized linear models algorithms)


Chi-Square Statistics (generalized linear models algorithms)

generalized linear models algorithms,generalized linear models algorithms,generalized linear models algorithms
chi-square statistic,chi-square statistic,chi-square statistic
chi-square,chi-square,chi-square
generalized linear models algorithms,generalized linear models algorithms,generalized linear models algorithms

The hypothesis H0i:βi=0 is tested for each non-redundant parameter using the chi-square statistic:

ci=(
^
β
i
^
σ
βj)2

which has an asymptotic chi-square distribution with 1 degree of freedom.

Chi-square statistics and their corresponding p-values are set to system missing values for redundant parameter estimates.

The chi-square statistic is not calculated for the scale parameter, even if it is estimated by ML method.

For the ordinal multinomial model, the hypotheses H0j:ψj=0, j=1,...,J−1, and H0i:βi=0, i=1,...,px, are tested for threshold parameters and non-redundant regression parameters using the chi-square statistics

cψj=(
^
ψ
j
^
σ
ψj)2

and

cβi=(
^
β
i
^
σ
βi)2

Related Topics

Estimation (generalized linear models algorithms)
Parameter estimation (generalized linear models algorithms)
Parameter Estimate Covariance Matrix, Correlation Matrix and Standard Errors (generalized linear models algorithms)
Confidence Intervals (generalized linear models algorithms)
P Values (generalized linear models algorithms)


P Values (generalized linear models algorithms)

Given a test statistic T and a corresponding cumulative distribution function G as specified above, the p-value is defined as p=1−G(T). For example, the p-value for the chi-square test of H0i:βi=0 is pi=1−prob(χ21≤ci).

Related Topics

Estimation (generalized linear models algorithms)
Parameter estimation (generalized linear models algorithms)
Parameter Estimate Covariance Matrix, Correlation Matrix and Standard Errors (generalized linear models algorithms)
Confidence Intervals (generalized linear models algorithms)
Chi-Square Statistics (generalized linear models algorithms)


Model Testing (generalized linear models algorithms)

generalized linear models algorithms,generalized linear models algorithms,generalized linear models algorithms
model testing,model testing,model testing

After estimating parameters and calculating relevant statistics, several tests for the given model are performed.

Related Topics

GENLIN Algorithms
Notation (generalized linear models algorithms)
Model (generalized linear models algorithms)
Estimation (generalized linear models algorithms)
Default Tests of Model Effects (generalized linear models algorithms)
Estimated Marginal Means (generalized linear models algorithms)
Scoring (generalized linear models algorithms)
Predicted Values (generalized linear models algorithms)
Diagnostics (generalized linear models algorithms)
Generalized Estimating Equations
Goodness of Fit (generalized estimating equations algorithms)
References (generalized linear models algorithms)
Lagrange Multiplier Test (generalized linear models algorithms)
Goodness-of-Fit Statistics (generalized linear models algorithms)
Test of Model Fit (generalized linear models algorithms)
Multiple Comparisons (generalized linear models algorithms)
LSD (Least Significant Difference) (generalized linear models algorithms)
Bonferroni (generalized linear models algorithms)
Sidak (generalized linear models algorithms)
Sequential Bonferroni (generalized linear models algorithms)
Sequential Sidak (generalized linear models algorithms)
Comparison of Adjustment Methods (generalized linear models algorithms)


Lagrange Multiplier Test (generalized linear models algorithms)

Lagrange multiplier test,Lagrange multiplier test,Lagrange multiplier test
generalized linear models algorithms,generalized linear models algorithms,generalized linear models algorithms

If the scale parameter for normal, inverse Gaussian, gamma, and Tweedie distributions is set to a fixed value or specified by the deviance or Pearson chi-square divided by the degrees of freedom (when the scale parameter is specified by the deviance or Pearson chi-square divided by the degrees of freedom, it can be considered as a fixed value), or an ancillary parameter k for the negative binomial is set to a fixed value other than 0, the Lagrange Multiplier (LM) test assesses the validity of the value. For a fixed φ or k, the test statistic is defined as

TLM=s2A

where s=∂ℓ/∂τ and A=−(∂2ℓ∂τ2)−(−∂2ℓ∂τ∂β T )(−∂2ℓ∂β∂β T )−(−∂2ℓ∂β∂τ) evaluated at the parameter estimates and fixed φ or k value. TLM has an asymptotic chi-square distribution with 1 degree of freedom, and the p-values are calculated accordingly.

For testing φ, see Table “The 1st derivative functions w.r.t. the scale parameter for probability distributions” and see Table “The second derivative functions w.r.t. the scale parameter for probability distributions” for the elements of s and A, respectively.

If k is set to 0, then the above statistic can't be applied. According to Cameron and Trivedi (1998), the LM test statistic should now be based on the following auxiliary OLS regression (without constant)

(yi−
^
μ
i)2−yi
^
μ
i=α
^
μ
i+εi

where
^
μ
i=g−1(xTi
^
β
) and εi is an error term. Let the response of the above OLS regression [(yi−
^
μ
i)2−yi]/
^
μ
i be zi and the explanatory variable
^
μ
i be wi. The estimate of the above regression parameter α and the standard error of the estimate of α are

^
α
=nΣi=1fiwizinΣi=1fiw2i and
^
σ
α=
√ s2enΣi=1fiw2i
,

where s2e=1N−1nΣi=1fie2i and ei=zi−
^
α
wi. Then the LM test statistic is a z statistic

z=
^
α
^
σ
α,

and it has an asymptotic standard normal distribution under the null hypothesis of equidispersion in a Poisson model (H0:k=0). Three p-values are provided. The alternative hypothesis can be one-sided overdispersion (Ha:k>0), underdispersion (Ha:k<0) or two-sided non-directional (Ha:k≠0) with the variance function of V(μ)=μ+kμ2. The calculation of p-values depends on the alternative. For Ha:k>0,p -value =1− Φ (z), where Φ (·) is the cumulative probability of a standard normal distribution; for Ha:k<0,p -value = Φ (z); and for Ha:k≠0,p -value =2(1− Φ (|z|)).

Related Topics

Model Testing (generalized linear models algorithms)
Goodness-of-Fit Statistics (generalized linear models algorithms)
Test of Model Fit (generalized linear models algorithms)
Multiple Comparisons (generalized linear models algorithms)
LSD (Least Significant Difference) (generalized linear models algorithms)
Bonferroni (generalized linear models algorithms)
Sidak (generalized linear models algorithms)
Sequential Bonferroni (generalized linear models algorithms)
Sequential Sidak (generalized linear models algorithms)
Comparison of Adjustment Methods (generalized linear models algorithms)


Goodness-of-Fit Statistics (generalized linear models algorithms)

generalized linear models algorithms,generalized linear models algorithms,generalized linear models algorithms
goodness of fit,goodness of fit,goodness of fit
goodness of fit,goodness of fit,goodness of fit
generalized linear models algorithms,generalized linear models algorithms,generalized linear models algorithms

Several statistics are calculated to assess goodness of fit of a given generalized linear model.

Deviance

deviance,deviance,deviance
generalized linear models algorithms,generalized linear models algorithms,generalized linear models algorithms

The theoretical definition of deviance is:

D=2φ(ℓ( y ; y )−ℓ(
^
μ
; y )),

where ℓ(
^
μ
; y ) is the log-likelihood function expressed as the function of the predicted mean values
^
μ
(calculated based on the parameter estimates) given the response variable, and ℓ( y ; y ) is the log-likelihood function computed by replacing
^
μ
with y. The formula used for the deviance is nΣi=1fidi, where the form of di for the distributions are given in the following table:

Distribution | di
Normal | ωi(yi−μi)2
Inverse Gaussian | ωiyiμ2i(yi−μi)2
Gamma | 2ωi{−ln(yiμi)+yi−μiμi}
Negative Binomial | 2ωi{yiln(yiμi)−(yi+1/k)ln(yi+1/kμi+1/k)}
Poisson | 2ωi{yiln(yiμi)−(yi−μi)}
Binomial(m) | 2ω*i{yiln(yiμi)+(1−yi)ln(1−yi1−μi)}
Tweedie | 2ωi{y2−qi−(2−q)yiμ1−qi+(1−q)μ2−qi(1−q)(2−q)}

Note

• When y is a binary dependent variable with 0/1 values (binomial distribution), the deviance and Pearson chi-square are calculated based on the subpopulations; see below.

• When y = 0 for negative binomial and Poisson distributions and y = 0 (for r = 0) or 1 (for r = m) for binomial distribution with r/m format, separate values are given for the deviance. Let di be the deviance value for individual case i when yi = 0 for negative binomial and Poisson and 0/1 for binomial.

Distribution

di

Negative Binomial

2ωiln(1+kμi)k if yi=0

Poisson

2ωiμi if yi=0

Binomial(m)

{
−2ω*iln(1−μi) if yi=0 or ri=0
−2ω*iln(μi) if yi=1 or ri=mi

Pearson Chi-Square

Pearson chi-square,Pearson chi-square,Pearson chi-square
generalized linear models algorithms,generalized linear models algorithms,generalized linear models algorithms
χ2=nΣi=1fiγi

where γi=ω*i(yi−μi)2V(μi) for the binomial distribution and γi=ωi(yi−μi)2V(μi) for other distributions.

Scaled Deviance and Scaled Pearson Chi-Square

scaled deviance,scaled deviance,scaled deviance
generalized linear models algorithms,generalized linear models algorithms,generalized linear models algorithms
scaled Pearson chi-square,scaled Pearson chi-square,scaled Pearson chi-square
generalized linear models algorithms,generalized linear models algorithms,generalized linear models algorithms

The scaled deviance is D*=D/φ and the scaled Pearson chi-square is χ2*=χ2/φ.

Since the scaled deviance and Pearson chi-square statistics have a limiting chi-square distribution with N – px degrees of freedom, the deviance or Pearson chi-square divided by its degrees of freedom can be used as an estimate of the scale parameter for both continuous and discrete distributions.

^
φ
=DN−px or
^
φ
=χ2N−px.

If the ancillary parameter k of the negative binomial model is estimated by the ML method, the scale parameter is measured by the deviance or Pearson chi-square divided by its degrees of freedom, then the degrees of freedom is N−px−1 because k is the extra parameter estimated by ML method.

If the scale parameter is measured by the deviance or Pearson chi-square, first we assume φ=1, then estimate the regression parameters, calculate the deviance and Pearson chi-square values and obtain the scale parameter estimate from the above formula. Then the scaled version of both statistics is obtained by dividing the deviance and Pearson chi-square by
^
φ
. In the meantime, some statistics need to be revised. The gradient vector and the Hessian matrix are divided by
^
φ
and the covariance matrix is multiplied by
^
φ
. Accordingly the estimated standard errors are also adjusted, the Wald confidence intervals and significance tests will be affected even the parameter estimates are not affected by
^
φ
.

Note that two log likelihood values are displayed: the original one (based on φ=1) and the revised one (based on φ=
^
φ
which is plugged into the log likelihood function of the corresponding distribution). Prior to version 16, only the original one is displayed. The original log likelihood is used in computing the information criteria but the revised log likelihood is used in the model fitting omnibus test.

Overdispersion

overdispersion,overdispersion,overdispersion
generalized linear models algorithms,generalized linear models algorithms,generalized linear models algorithms

For the Poisson and binomial distributions, if the estimated scale parameter is not near the assumed value of one, then the data may be overdispersed if the value is greater than one or underdispersed if the value is less than one. Overdispersion is more common in practice. The problem with overdispersion is that it may cause standard errors of the estimated parameters to be underestimated. A variable may appear to be a significant predictor, when in fact it is not.

Deviance and Pearson Chi-Square for Binomial with 0/1 Binary Response and Ordinal Multinomial

When r and m (event/trial) variables are used for the binomial distribution, each case represents m Bernoulli trials. When y is a binary dependent variable with 0/1 values, each case represents a single trial. The trial can be repeated for several times with the same setting (i.e. the same values for all predictor variables). For example, suppose the first 10 y values are 2 1s and 8 0s and x values are the same (if recorded in events/trials format, these 10 cases is recorded as 1 case with r = 2 and m = 10), then these 10 cases should be considered from the same subpopulation. Cases with common values in the variable list that includes all predictor variables are regarded as coming from the same subpopulation. When the binomial distribution with binary response is used, we should calculate the deviance and Pearson chi-square based on the subpopulations. If we calculate them based on the cases, the results might not be useful.

If subpopulations are specified for the binomial distribution with 0/1 binary response variable, the data should be reconstructed from the single trial format to the events/trials format. Assume the following notation for formatted data:

ns

Number of subpopulations.

rj1

Sum of the product of the frequencies and the scale weights associated with y = 1 in the jth subpopulation. So rj0 is that with y = 0 in the jth subpopulation.

mj

Total weighted observations; mj = rj1 + rj0.

yj1

The proportion of 1s in the jth subpopulation; yj1 = rj1/ mj.

μj

The fitted probability in the jth subpopulation (
^
μ
j would be the same for each case in the jth subpopulation because values for all predictor variables are the same for each case.)

The deviance and Pearson chi-square are defined as follows:

D=2nsΣj=1mj{yj1ln(yj1μj)+(1−yj1)ln(1−yj11−μj)} and χ2=nsΣj=1mj(yj1−μj)2μj(1−μj),

then the corresponding estimate of the scale parameter will be

^
φ
=Dns−px and
^
φ
=χ2ns−px.

The full log likelihood, based on subpopulations, is defined as follows:

ℓ=ℓk+nsΣj=11φ{ln(
mj
rj1
)}=ℓk+nsΣj=11φ{lnmj!rj1!rj0!},

where ℓk is the kernel log likelihood; it should be the same as the kernel log-likelihood computed based on cases before, there is no need to compute again.

For the ordinal multinomial model, similarly, the data will be reconstructed based on subpopulations. Assume the following notation for reconstructed ordinal multinomial data:

ns

Number of subpopulations.

rij

Sum of the product of the frequencies and the scale weights associated with the jth category in the ith subpopulation.

mi

Total weighted observations for the ith subpopulation; mi=JΣj=1ri,j

^
π
i,j

The fitted probability for the jth category in the ith subpopulation.

The deviance and Pearson chi-square are defined as follows.

D=2nsΣi=1JΣj=1ri,jln(ri,jmi
^
π
i,j)

and

χ2=nsΣi=1JΣj=1(ri,j−mi
^
π
i,j)2mi
^
π
i,j.

with ns(J−1)−d degrees of freedom, where d=J−1+px. The corresponding estimates of the scale parameter will be

^
φ
=Dns(J−1)−d

and

^
φ
=χ2ns(J−1)−d

The full log likelihood, based on subpopulations, is defined as follows:

ℓ=ℓk+c=ℓk+nsΣi=11φ{lnmj!rj1!...rjJ!},

where again ℓk is the same as before.

Information Criteria

information criteria,information criteria,information criteria
generalized linear models algorithms,generalized linear models algorithms,generalized linear models algorithms
Akaike information criterion,Akaike information criterion,Akaike information criterion
generalized linear models algorithms,generalized linear models algorithms,generalized linear models algorithms
finite sample corrected AIC,finite sample corrected AIC,finite sample corrected AIC
generalized linear models algorithms,generalized linear models algorithms,generalized linear models algorithms
Bayesian information criterion,Bayesian information criterion,Bayesian information criterion
generalized linear models algorithms,generalized linear models algorithms,generalized linear models algorithms
consistent AIC,consistent AIC,consistent AIC
generalized linear models algorithms,generalized linear models algorithms,generalized linear models algorithms

Information criteria are used when comparing different models for the same data. The formulas for various criteria are as follows.

Akaike information criteria (AIC) | −2ℓ+2d
Finite sample corrected (AICC) | −2ℓ+2d·N(N−d−1)
Bayesian information criteria (BIC) | −2ℓ+dln(N)
Consistent AIC (CAIC) | −2ℓ+d(ln(N)+1).

where ℓ is the log-likelihood
evaluated at the parameter estimates. Notice that d = px if only β is included; d = px + 1 if the scale parameter
is included for normal, inverse Gaussian, gamma, and Tweedie, or k for the negative binomial distribution;
for multinomial, d = J – 1 + px.

Notes

• ℓ (the full log-likelihood) can be replaced with ℓk (the kernel of the log-likelihood) depending on the user's choice.

• If the scale parameter is specified by the deviance or Pearson chi-square, then the log likelihood is based on φ=1, for fair comparison among different models.

• When r and m (event/trial) variables are used for the binomial distribution, then the N used here would be the sum of the trials frequencies; N=nΣi=1fimi. In this way, the same value results whether the data are in raw, binary form (using single-trial syntax) or in summarized, binomial form (events/trials syntax).

Related Topics

Model Testing (generalized linear models algorithms)
Lagrange Multiplier Test (generalized linear models algorithms)
Test of Model Fit (generalized linear models algorithms)
Multiple Comparisons (generalized linear models algorithms)
LSD (Least Significant Difference) (generalized linear models algorithms)
Bonferroni (generalized linear models algorithms)
Sidak (generalized linear models algorithms)
Sequential Bonferroni (generalized linear models algorithms)
Sequential Sidak (generalized linear models algorithms)
Comparison of Adjustment Methods (generalized linear models algorithms)


Test of Model Fit (generalized linear models algorithms)

generalized linear models algorithms,generalized linear models algorithms,generalized linear models algorithms
model fit test,model fit test,model fit test

The model fitting omnibus test is based on –2 log-likelihood values for the model under consideration and the initial model. For the model under consideration, the value of the –2 log-likelihood is

−2ℓ(
^
β
)

Let the initial model be the intercept-only model if intercept is in the considered model or the empty model otherwise. For the intercept-only model, the value of the –2 log-likelihood is

−2ℓ(
^
β
0)

For the empty model, the value of the –2 log-likelihood is

−2ℓ(0)

Then the omnibus (or global) test statistic is

S=2(ℓ(
^
β
)−ℓ(β0)) for the intercept-only model or

S=2(ℓ(
^
β
)−ℓ(0)) for the empty model.

S has an asymptotic chi-square distribution with r degrees of freedom, equal to the difference in the number of valid parameters between the model under consideration and the initial model. r = px−1 for the intercept-only model,; r = px for the empty model. The p-values then can be calculated accordingly.

Note if the scale parameter or the ancillary parameter is estimated by the ML method in the model under consideration, then it will also be estimated by the ML method in the initial model.

For the ordinal multinomial model, the value of –2 log-likelihood for the model under consideration is

−2ℓ(
^
B
)

the value of –2 log-likelihood for the thresholds-only model is

−2ℓ( B (0)),

where B (0)=( ψ (0), β (0)) is the initial parameter values used in the iterative process. Then the omnibus test statistic is

S=2(ℓ(
^
B
)−ℓ( B (0)))

and it has an asymptotic chi-square distribution with px degrees of freedom.

When calculating the value of –2 log-likelihood of initial model, the following rules are used to handle the scale parameter or the ancillary parameter k in the initial model.

If the scale parameter or the ancillary parameter is estimated by the ML method in the model under consideration, then it will also be estimated by the ML method in the initial model.

If the scale parameter or the ancillary parameter is held fixed in the model under consideration, then the same value is fixed in the initial model.

If the scale parameter is specified by the deviance or Pearson chi-square divided by degrees of freedom in the model under consideration, then that value will be held fixed in the initial model. Note that the log likelihood for the model under consideration would be revised; that is, based on φ=
^
φ
, so the log likelihoods for both models (the model under consideration and initial model) are calculated based on the same scale parameter value. This is to be consistent with the way chi-squares statistics in type I and III analyses are computed. Prior to version 16, the log likelihoods for both models are calculated based on φ=1; thus the omnibus test statistic will be different between 15 and later versions.

Related Topics

Model Testing (generalized linear models algorithms)
Lagrange Multiplier Test (generalized linear models algorithms)
Goodness-of-Fit Statistics (generalized linear models algorithms)
Multiple Comparisons (generalized linear models algorithms)
LSD (Least Significant Difference) (generalized linear models algorithms)
Bonferroni (generalized linear models algorithms)
Sidak (generalized linear models algorithms)
Sequential Bonferroni (generalized linear models algorithms)
Sequential Sidak (generalized linear models algorithms)
Comparison of Adjustment Methods (generalized linear models algorithms)


Default Tests of Model Effects (generalized linear models algorithms)

generalized linear models algorithms,generalized linear models algorithms,generalized linear models algorithms
default tests of model effects,default tests of model effects,default tests of model effects

For each regression effect specified in the model, type I and III analyses can be conducted.

Type I Analysis

Type I analysis consists of fitting a sequence of models, starting with the null model as the baseline model (for all distributions except ordinal multinomial), adding one additional effect, which can be an intercept term (if there is one), covariates, factors and interactions, of the model on each step. For the ordinal multinomial model, the baseline model is a thresholds-only model. Thus, the test depends on the order of effects specified in the model. On the other hand, type III analysis won’t depend on the order of effects. The reason for using the null model as the baseline model is to obtain the chi-square statistic for the first parameter which might be for an intercept or the first predictor variable.

There are two kinds of test statistics for type I analysis: likelihood ratio statistics and Wald statistics.

Likelihood ratio statistics. Different formulae are used to calculate likelihood ratio statistics depending on how the scale parameter or ancillary parameter is handled.

• Estimated by ML method. The likelihood ratio statistics are twice the difference of the log likelihoods between two successive models. Unlike type III analysis, we don't obtain the log likelihood of the constrained model based on the type I test matrix.

Start by considering the first pair of models η= ο (the null model with the log likelihood ℓ(0) and φ or k might be estimated) and η= x T 1 β 1+ ο (with the log likelihood ℓ(
^
β
1) and β1 and φ or k are estimated jointly) and the test statistic for the null hypothesis Η0: β 1= 0 is

S=2(ℓ(
^
β
1)−ℓ(0))

The log-likelihood convergence criterion is used estimating the above two models. The tolerance level is the same as that used for the parameter estimation iterative process. A similar rule applies to usage of relative or absolute change.

Note the optimal estimated scale parameter would be different for the above two models. If either log-likelihood is not available due to numerical problems in parameter estimation, then the test statistic, degrees of freedom and p-value are all set to system missing values. Similar rules will apply to other pairs of models below.

Then consider the second pair of two models η= x T 1 β 1+ ο and η= x T 1 β 1+ x T 2 β 2+ ο , the test statistic for the null hypothesis Η0: β 2= 0 based on β 1 is

S=2(ℓ(
^
β
1,
^
β
2)− ℓ(
^
β
1)).

Then consider the third pair of models η= x T 1β1+x T 2β2+ offset , and η= x T 1β1+x T 2β2+x T 3β3+ offset . The likelihood ratio statistic for the null hypothesis Η0:β3= 0

S=2(ℓ(
^
β
1,
^
β
2,
^
β
3)− ℓ(
^
β
1,
^
β
2))

Continue this way until all effects in the model are included. Similar convergence criterion applies to all reduced models except the full model. Each likelihood ratio statistic S has an asymptotic chi-square distribution with degrees of freedom equal to the difference in the number of parameters estimated in the successive models. The p-values can be calculated accordingly.

• Set to a fixed positive value. The likelihood ratio statistics are calculated as above except φ or k is held fixed at that value.

For the ordinal multinomial model, the scale parameter can be set to a fixed value or be specified by the deviance or Pearson chi-square divided by degrees of freedom. We briefly describe how the statistics can be constructed when it is a fixed value here.

First, consider the first pair of two models η=ψ + ο and η=ψ− x T 1 β 1+ ο , the likelihood ratio statistic for the null hypothesis Η0: β 1= 0 based on Ψ is

S=2(ℓ(
^
ψ
,
^
β
1)− ℓ(
^
ψ
))

Then consider the second pair of two models η=ψ− x T 1 β 1+ ο , and η=ψ− ( x T 1 β 1+ x T 2 β 2)+ ο , the likelihood ratio statistic for the null hypothesis Η0: β 2= 0 based on ψ and β 1 is

S=2(ℓ(
^
ψ
,
^
β
1,
^
β
2)− ℓ(
^
ψ
,
^
β
1))

Again, S has an asymptotic chi-square distribution with degrees of freedom equal to the difference in the number of parameters in the successive models.

• Specified from the full model by the deviance or Pearson chi-square. In this case, the likelihood ratio chi-square and F statistics can be computed to assess the significance of each additional effect.

Suppose that ℓf,1 is the log-likelihood from fitting a generalized model (model f) and that ℓs,1 is the log-likelihood from fitting a sub-model (model s). Both models are fit assuming the scale parameter equals 1. Then the test statistic is defined by

S=2(ℓf,1−ℓs,1)
^
φ
.

It has an asymptotic chi-square distribution with r degrees of freedom, where r is the difference in the number of parameters between the two models and
^
φ
is estimated from the full model.

In some references the test statistic is defined by

S=Ds−Df
^
φ

where Df is the deviance from fitting model f and Ds is the deviance from fitting a sub-model s. However, this formulation can result in negative chi-square statistics for negative binomial responses where the ancillary parameter is estimated by maximum likelihood.

Since φ is unknown and the estimator
^
φ
is the deviance or Pearson chi-square statistic divided by its degrees of freedom, then (N−px)
^
φ
/φ has an asymptotic chi-square distribution with N−px degrees of freedom. Thus, the F statistic can be defined as

F =Sr

Under the assumption that 2(ℓf,1−ℓs,1)/φ and (N−px)
^
φ
/φ are approximately independent, the F statistic has an asymptotic F distribution with r and N−px degrees of freedom, and the p-values can be calculated accordingly. Note for the negative binomial with the ancillary parameter k estimated by the ML method and with the scale parameter measured by the deviance or Pearson chi-square divided by its degrees of freedom, the degrees of freedom in the denominator for the F statistic are N – px – 1; for the binomial distribution with 0/1 binary response, the degrees of freedom for the denominator should be ns – px; for the ordinal multinomial model, the degrees of freedom for the denominator should be ns(J−1)−(J−1+px).

For type I analysis, model f is the higher order model obtained by including one additional effect in model s. For example, for the second pair of two models, model f is η= x T 1β1+x T 2β2+ o and model s is η= x T 1β1+ o .

Wald Statistics. For each effect specified in the model, type I test matrix Li is constructed and H0: Liβ = 0 is tested. Construction of matrix Li is based on the generating matrix Hω=(X T ΩX)−X T ΩX, where Ω is the scale weight matrix with ith diagonal element ωi and such that Liβ is estimable. It involves parameters only for the given effect and the effects containing the given effect. If such a matrix cannot be constructed, the effect is not testable.

Since Wald statistics can be applied to type I and III analysis and custom tests, we express Wald statistics in a more general form. The Wald statistic for testing Liβ=K, where Li is a r×p full row rank hypothesis matrix and K is a r×1 resulting vector, is defined by

S=(Li
^
β
−K) T (LiΣLi T )−(Li
^
β
−K)

where
^
β
is the maximum likelihood estimate and Σ is the parameter estimates covariance matrix. S has an asymptotic chi-square distribution with rC degrees of freedom, where rC=rank( L Σ L T ). If rC<r, then ( L Σ L T )− is a generalized inverse such that Wald tests are effective for a restricted set of hypotheses LiCβ−KC containing a particular subset C of independent rows from H0.

For type I and III analysis, calculate the Wald statistic for each effect i according to the corresponding hypothesis matrix Li and K=0.

For the ordinal multinomial model, first consider partitions of the more general test matrix L =( L ( ψ ), L ( β )), where L ( ψ )=( l 1,..., l J−1) consists of columns corresponding to threshold parameters and L ( β ) be the part of L corresponding to regression parameters. Consider matrix L 0 =( l 0, L ( β )) where the column vectors corresponding to threshold parameters are replaced by their sum l 0=J−1Σj=1 l j. Then LB is estimable if and only if L 0 = L 0 H ω, where H ω=( X T 1Ω X 1)− X T 1Ω X 1, is a (1+p)×(1+p) matrix constructed using X 1=( 1 , − ​ X ). The Wald statistic for testing LB = K , where L is a r×(J−1+p) full row rank hypothesis matrix and K is a r× 1 resulting vector, is defined by

S=(LB−K) T (L Σ L T )−(LB−K)

where
^
Β
=(
^
ψ
,
^
β
) is the maximum likelihood estimate and Σ is the estimated covariance matrix ( Σ could be the model based or robust estimator). The asymptotic distribution of S is χ2r C , where r C =rank( L Σ L T ).

For each effect specified in the model excluding intercept, a type I test matrix Li is constructed and H0: LiB = 0 is tested. Construction of matrix Li is based on matrix H ω=( X T 1Ω X 1)− X T 1Ω X 1 and such that Liβ is estimable. Thus the way to construct Li (type I and III) for ordinal multinomial is the same as that for other distributions.

Type III Analysis

Similar to type I analysis, two kinds of test statistics are available for type I analysis: chi-square statistics and Wald statistics.

Likelihood ratio statistics. The likelihood ratio statistics can be obtained as follows:

Calculate the log-likelihood evaluated at the constrained maximum likelihood estimate under the constraint L iβ=0 for each effect:

ℓ(
˜
β
−i)=
max
β
ℓ( μ (β); y ) s .t . L iβ=0,

where L i is the type III test matrix for the ith effect. ℓ(
˜
β
−i) will be obtained by sequential quadratic programming. See the topic Sequential Quadratic Programming for more information.

The calculation of ℓ(
^
β
) and ℓ(
˜
β
−i) are based on how the scale parameter φ or the ancillary parameter k is handled:

1. If φ or k is estimated jointly with β by ML method, then ℓ(
^
β
) is the log likelihood evaluated at
^
β
and
^
φ
or
^
k
and ℓ(
˜
β
−i) is the log likelihood evaluated at
˜
β
−i and
˜
φ
−i or
˜
k
−i under the constraint L iβ=0 for each effect i. Note that the constraint should be expanded by including φ or k so that the last element in expanded β is φ or k and the last element in expanded L i is 0.

2. If φ or k is set to a fixed value, then ℓ(
^
β
) and ℓ(
˜
β
−i) are calculated with φ or k held fixed at that value for both unconstrained and constrained estimation processes.

3. If φ is specified from the full model by the deviance or Pearson chi-square divided by degrees of freedom, then ℓ(
^
β
) and ℓ(
˜
β
−i) are calculated with φ assumed to be 1. In addition, the deviance values for both unconstrained and constrained models are also calculated.

Then calculate the likelihood ratio statistic for each effect i.

1. If φ or k is estimated jointly with β by ML method or set to a fixed value,

Si=2(ℓ(
^
β
)−ℓ(
˜
β
−i))

Then Si has an asymptotic chi-square distribution with degrees of freedom r, where r is equal to the rank of the Li matrix.

2. If φ is specified from the full model by the deviance or Pearson chi-square divided by degrees of freedom,

Si=2(ℓ(
^
β
)−ℓ(
˜
β
−i))
^
φ
and F i=Sir,

respectively. Then Si has an asymptotic chi-square distribution with degrees of freedom r. F has an asymptotic F distribution with r and N−px degrees of freedom. Note for the negative binomial with the ancillary parameter k estimated by the ML method and with the scale parameter measured by the deviance or Pearson chi-square divided by its degrees of freedom, the degrees of freedom in the denominator for the F statistic are N – px – 1; for the binomial distribution with 0/1 binary response, the degrees of freedom for the denominator should be ns – px; for the ordinal multinomial model, the degrees of freedom for the denominator should be ns(J−1)−(J−1+px).

Wald statistics. See the discussion of Wald statistics for Type I analysis above. L i is the type III test matrix for the ith effect.

Related Topics

GENLIN Algorithms
Notation (generalized linear models algorithms)
Model (generalized linear models algorithms)
Estimation (generalized linear models algorithms)
Model Testing (generalized linear models algorithms)
Estimated Marginal Means (generalized linear models algorithms)
Scoring (generalized linear models algorithms)
Predicted Values (generalized linear models algorithms)
Diagnostics (generalized linear models algorithms)
Generalized Estimating Equations
Goodness of Fit (generalized estimating equations algorithms)
References (generalized linear models algorithms)


Sequential Quadratic Programming

Sequential quadratic programming is a method of linear constrained optimization that can be applied to type III analysis and custom tests. It has the general form:

max
β
ℓ( μ (β); y )
s .t . L β= K ,

where L is a r×p full row rank hypothesis matrix and K is a r×1 resulting vector. Note for the ordinal multinomial model, L is a r×(J−1+p) full row rank hypothesis matrix for ordinal multinomial. To simplify the notation, we write the log-likelihood as ℓ(β) here. The Lagrange function with an r×1 vector of Lagrange multipliers is

L(β, λ )=ℓ(β)+ λ Τ ( L β− K )=ℓ(β)+rΣi=1λi( L iβ−Ki)

The first order conditions with respect to β and λ are

{
∂L(β, λ )∂β=∂ℓ(β)∂β+ L Τ λ =[0]p×1 (dual feasibility equations)
∂L(β, λ )∂ λ = L β− K= [0]r×1           (primal feasibility equations)

We would like to find a solution (β* and λ *) for the above KKT (Karush-Kuhn-Tucker) equations, which is a set of p + r equations. The method usually used is extensions of Newton Raphson’s method. First we replace the log-likelihood with its second-order Taylor approximation near to reform the problem

max
δ
ℓ(β+ δ )=ℓ(β)+s(β δ +12 δ Τ H(β) δ
s.t. L (β+ δ )= K .

This is a quadratic optimization problem with variable δ. We use the feasible start method solve the KKT equations.

Feasible Start Method

The feasible β values satisfy Lβ=K and belong to the domain of the log-likelihood. If the initial values of β are feasible, then Lδ=0 and the constrained problem is almost the same as the Newton-Raphson method without constraints. The iterative process can be outlined briefly as follows:

1. Find initial values β ( 0 ) with L β(0)= K (see below), then compute ℓ(β(0)), s(β(0)) and H(β(0)).

2. Let ξ=1.

3. Find a solution of δ (i−1) and λ (i) for the following KKT equations:

[
H(β(i−1)) | LT
L | 0
][
δ (i−1)
λ (i)
]=[
−s(β(i−1))
0
]( p+r )×1 .

4. Compute estimates of ith iteration:

β ( i ) =β ( i−1 ) +ξ δ ( i−1 ) , then compute ℓ(β(i)).

5. Use step-halving method if ℓ(β(i))<ℓ(β(i−1)): reduce ξ by half and repeat step (4). If the maximum number of steps in step-halving is reached but the log-likelihood is not improved, stop.

6. Check if convergence criteria (see below) are met. If they are or the maximum number of iterations is reached, stop. The final vector of estimates is denoted by
˜
β
(
˜
τ
). Otherwise, go back to step (2).

Initial Values

The initial values for constrained optimization under the constraint L i β =0 for each effect i in type III analysis can be obtained by applying the method the initial values obtained for unconstrained parameter estimation with a constraint that type III contrast equals zero. Specifically, follow steps (1) to (3) of the method for computing initial values for parameter estimation (see the appropriate section under Parameter estimation (generalized linear models algorithms)), then solve the following KKT equations

[
X T
˜
W
e X 		L T i
L i 0
][
β (0)
λ (0)
]=[
X T
˜
W
e z
0
](p + r)×1 .

The solution will be a feasible point. Then the initial value for φ or k can be obtained as before. For the ordinal multinomial model, initial values for unconstrained parameter estimation can be applied here because they are feasible values.

Convergence Criteria

We only consider the log-likelihood convergence criterion for the constrained optimization problem to speed the iterative processes here. If εℓ and relative or absolute change is user-specified for the unconstrained optimization problem, then they will be also apply here; otherwise, the internal default values will be used.


Estimated Marginal Means (generalized linear models algorithms)

generalized linear models algorithms,generalized linear models algorithms,generalized linear models algorithms
estimated marginal means,estimated marginal means,estimated marginal means
estimated marginal means,estimated marginal means,estimated marginal means
generalized linear models algorithms,generalized linear models algorithms,generalized linear models algorithms

There are two types of estimated marginal means (EMMEANS) calculated here. One corresponds to the specified factors for the linear predictor of the model and the other corresponds to those for the response of the model. EMMEANS for the predictor are equivalent to LSMEANS (least-squares means) used by SAS. EMMEANS for the response are equivalent to conditional marginals used by SUDAAN or conditional prediction used by Lane and Nelder (1982).

EMMEANS are based on the estimated cell means. For a given fixed set of factors, or their interactions, we estimate marginal means as the mean value averaged over all cells generated by the rest of the factors in the model. Covariates may be fixed at any specified value. If not specified, the value for each covariate is set to its overall mean estimate.

For the ordinal multinomial model, EMMEANS are not available.

Related Topics

GENLIN Algorithms
Notation (generalized linear models algorithms)
Model (generalized linear models algorithms)
Estimation (generalized linear models algorithms)
Model Testing (generalized linear models algorithms)
Default Tests of Model Effects (generalized linear models algorithms)
Scoring (generalized linear models algorithms)
Predicted Values (generalized linear models algorithms)
Diagnostics (generalized linear models algorithms)
Generalized Estimating Equations
Goodness of Fit (generalized estimating equations algorithms)
References (generalized linear models algorithms)
EMMEANS for the Linear Predictor (generalized linear models algorithms)
EMMEANS for the Response (generalized linear models algorithms)


EMMEANS for the Linear Predictor (generalized linear models algorithms)

Calculating EMMEANS for the Linear Predictor

EMMEANS for the linear predictor are based on the link function transformation. They are computed for the linear predictor. Since the given model with respect to the linear predictor is a linear model, the way to construct L is the same as that for the GLM procedure. Each EMMEAN for the linear predictor is constructed such that LB is estimable.

Briefly, for a given set of factors in the model, a vector of EMMEANS for the linear predictor is created for all combined levels of the factors. Assume there are r levels. This r×1 vector can be expressed in the form
^
v
=L
^
β
. The variance matrix of
^
v
is then computed by

V (
^
v
) =L Σ L T

The standard error for the jth element of
^
v
is the square root of the jth diagonal element of V (
^
v
). Let the jth element of
^
v
and its standard error be
^
v
j and
^
σ
vj, respectively, then the corresponding 100(1 – α)% Wald confidence interval for vj, j=1,...,r, is given by

(
^
v
j−z1−α/2
^
σ
vj,
^
v
j+z1−α/2
^
σ
vj)

Comparing EMMEANS for the Linear Predictor

We can compare EMMEANS for the linear predictor based on a selected contrast type, for which a set of contrasts for the factor is created. Let this set of contrasts define matrix C used for testing the hypothesis H0: Cv = 0 . A Wald statistic is used for testing given set of contrasts for the factor as follows:

S=( C
^
v
) T ( CV (
^
v
) C T )−( C
^
v
)

S has an asymptotic chi-square distribution with rI degrees of freedom, where rI= rank ( CV (
^
v
) C T ). The p-values can be calculated accordingly. Note that adjusted p-values based on multiple comparisons adjustments won't be computed for the overall test.

Each row c T i of matrix C is also tested separately. The estimate for the ith row is given by c T i
^
v
and its standard error by
√ c T i V (
^
v
) c i
. The corresponding 100(1 – α)% Wald confidence interval for is given by

( c T i
^
v
±z1−α/2
√ c T i V (
^
v
) c i
)

The Wald statistic for H0: c T iv=0 is

Si=( c T i
^
v
√ c T i V (
^
v
) c i
)2

It has an asymptotic chi-square distribution with 1 degree of freedom. The p-values can be calculated accordingly. In addition, adjusted p-values for multiple comparisons can also computed.

Related Topics

Estimated Marginal Means (generalized linear models algorithms)
EMMEANS for the Response (generalized linear models algorithms)


EMMEANS for the Response (generalized linear models algorithms)

EMMEANS for the response are based on the original scale of the dependent variable except for the binomial response with events/trials format (see note below). They can be defined as the estimator of the expected response for a subject conditional on his/her belonging to a specified effect and having the averages of covariates. Note that as for the so called predicted marginals used by SUDAAN or marginal prediction used by Lane and Nelder (1982), we will not offer them because they require some assumptions about the distribution of the predictor variables.

Calculating EMMEANS for the Response

The way to construct EMMEANS for the response is based on EMMEANS for the linear predictor. Let
^
M
c be EMMEANS for the response and it is defined as

^
M
c=g−1( L
^
β
)

The variance of EMMEANS for the response is

V(
^
M
c)=diag(∂g−1(
^
v
j)∂
^
v
j)LΣLTdiag(∂g−1(
^
v
j)∂
^
v
j)

where diag(∂g−1(
^
v
j)/∂
^
v
j) is a r×r matrix and ∂g−1(
^
v
j)/∂
^
v
j is the derivative of the inverse of the link with respect to the jth value in
^
v
and ∂g−1(
^
v
j)/∂
^
v
j=1/g´(
^
M
cj) where g´(
^
M
cj) is from Table . The standard error for the jth element of
^
M
c and the corresponding confidence interval are calculated similarly to those of
^
v
. See the topic EMMEANS for the Linear Predictor (generalized linear models algorithms) for more information.

Note:
^
M
c is EMMEANS for the proportion, not for the number of events when events and trials variables are used for the binomial distribution.

Comparing EMMEANS for the Response

This is similar to comparing EMMEANS for the linear predictor; just replace
^
v
with
^
M
c and V(
^
v
) with V(
^
M
c). See the topic EMMEANS for the Linear Predictor (generalized linear models algorithms) for more information.

Related Topics

Estimated Marginal Means (generalized linear models algorithms)
EMMEANS for the Linear Predictor (generalized linear models algorithms)


Multiple Comparisons (generalized linear models algorithms)

The hypothesis H0:Cv=0 can be tested using the multiple row hypotheses testing technique. Let cTi be the ith row vector of matrix C. The ith row hypothesis is H0i:cTiv=0. Testing H0 is the same as testing multiple non-redundant row hypotheses {H*0i}Ri=1 simultaneously, where R is the number of non-redundant row hypotheses, and H*0i represents the ith non-redundant hypothesis. A hypothesis H0i is redundant if there exists another hypothesis H0j,j≠i such that ci=acj,a≠0.

Adjusted p-values. For each individual hypothesis H0i, test statistics can be calculated. Let pi denote the p-value for testing H0i and p*i denote the adjusted p-value. The conclusion from multiple testing is, at level α (the family-wise type I error),

reject H0i:cTiv=0 if p*i<α;

reject H0:Cv=0 if
min
i
(p*i)<α.

Several different methods to adjust p-values are provided here. Please note that if the adjusted p-value is bigger than 1, it is set to 1 in all the methods.

Adjusted confidence intervals. Note that if confidence intervals are also calculated for the above hypothesis, then adjusting confidence intervals is required to correspond to adjusted p-values. The only item needed to be adjusted in the confidence intervals is the critical value from the standard normal distribution. Assume that the original critical value is z1−α/2 and the adjusted critical value is z*.

Related Topics

Model Testing (generalized linear models algorithms)
Lagrange Multiplier Test (generalized linear models algorithms)
Goodness-of-Fit Statistics (generalized linear models algorithms)
Test of Model Fit (generalized linear models algorithms)
LSD (Least Significant Difference) (generalized linear models algorithms)
Bonferroni (generalized linear models algorithms)
Sidak (generalized linear models algorithms)
Sequential Bonferroni (generalized linear models algorithms)
Sequential Sidak (generalized linear models algorithms)
Comparison of Adjustment Methods (generalized linear models algorithms)


LSD (Least Significant Difference) (generalized linear models algorithms)

least significant difference,least significant difference,least significant difference
generalized linear models algorithms,generalized linear models algorithms,generalized linear models algorithms

The adjusted p-values are the same as the original p-values:

p*i=pi

The adjusted critical value is:

z*=z1−α2.

Related Topics

Model Testing (generalized linear models algorithms)
Lagrange Multiplier Test (generalized linear models algorithms)
Goodness-of-Fit Statistics (generalized linear models algorithms)
Test of Model Fit (generalized linear models algorithms)
Multiple Comparisons (generalized linear models algorithms)
Bonferroni (generalized linear models algorithms)
Sidak (generalized linear models algorithms)
Sequential Bonferroni (generalized linear models algorithms)
Sequential Sidak (generalized linear models algorithms)
Comparison of Adjustment Methods (generalized linear models algorithms)


Bonferroni (generalized linear models algorithms)

Bonferroni,Bonferroni,Bonferroni
generalized linear models algorithms,generalized linear models algorithms,generalized linear models algorithms

The adjusted p-values are:

p*i=Rpi

The adjusted critical value is:

z*=z1−α2R.

Related Topics

Model Testing (generalized linear models algorithms)
Lagrange Multiplier Test (generalized linear models algorithms)
Goodness-of-Fit Statistics (generalized linear models algorithms)
Test of Model Fit (generalized linear models algorithms)
Multiple Comparisons (generalized linear models algorithms)
LSD (Least Significant Difference) (generalized linear models algorithms)
Sidak (generalized linear models algorithms)
Sequential Bonferroni (generalized linear models algorithms)
Sequential Sidak (generalized linear models algorithms)
Comparison of Adjustment Methods (generalized linear models algorithms)


Sidak (generalized linear models algorithms)

Sidak,Sidak,Sidak
generalized linear models algorithms,generalized linear models algorithms,generalized linear models algorithms

The adjusted p-values are:

p*i=1−(1−pi)R

The adjusted critical value is:

z*=z1−1−(1−α)1/R2.

Related Topics

Model Testing (generalized linear models algorithms)
Lagrange Multiplier Test (generalized linear models algorithms)
Goodness-of-Fit Statistics (generalized linear models algorithms)
Test of Model Fit (generalized linear models algorithms)
Multiple Comparisons (generalized linear models algorithms)
LSD (Least Significant Difference) (generalized linear models algorithms)
Bonferroni (generalized linear models algorithms)
Sequential Bonferroni (generalized linear models algorithms)
Sequential Sidak (generalized linear models algorithms)
Comparison of Adjustment Methods (generalized linear models algorithms)


Sequential Bonferroni (generalized linear models algorithms)

sequential Bonferroni,sequential Bonferroni,sequential Bonferroni
generalized linear models algorithms,generalized linear models algorithms,generalized linear models algorithms

The adjusted p-values are:

p*(i)={
Rp(1) | i=1
max((R−i+1)p(i),p*(i−1)) | i≥2

The adjusted critical values will correspond to the ordered adjusted p-values as follows:

z*(i)={
z1−α2R | if i=1
z1−α2(R−i+1) | if p*(i)=(R−i+1)p(i) , for i≥2
z*(i−1) | if p*(i)=p*(i−1) , for i≥2
.

Related Topics

Model Testing (generalized linear models algorithms)
Lagrange Multiplier Test (generalized linear models algorithms)
Goodness-of-Fit Statistics (generalized linear models algorithms)
Test of Model Fit (generalized linear models algorithms)
Multiple Comparisons (generalized linear models algorithms)
LSD (Least Significant Difference) (generalized linear models algorithms)
Bonferroni (generalized linear models algorithms)
Sidak (generalized linear models algorithms)
Sequential Sidak (generalized linear models algorithms)
Comparison of Adjustment Methods (generalized linear models algorithms)


Sequential Sidak (generalized linear models algorithms)

sequential sidak,sequential sidak,sequential sidak
generalized linear models algorithms,generalized linear models algorithms,generalized linear models algorithms

The adjusted p-values are:

p*(i)={
1−(1−p(1))R | i=1
max(1−(1−p(i))R−i+1,p*(i−1)) | i≥2

The adjusted critical values will correspond to the ordered adjusted p-values as follows:

z*(i)={ if i=1
z1−1−(1−α)1/R2 |
z1−1−(1−α)1/(R−i+1)2 | if p*(i) = 1−(1−p(i))R−i+1 , for i≥2
z*(i−1) | if p*(i) = p*(i−1) , for i≥2
.

Related Topics

Model Testing (generalized linear models algorithms)
Lagrange Multiplier Test (generalized linear models algorithms)
Goodness-of-Fit Statistics (generalized linear models algorithms)
Test of Model Fit (generalized linear models algorithms)
Multiple Comparisons (generalized linear models algorithms)
LSD (Least Significant Difference) (generalized linear models algorithms)
Bonferroni (generalized linear models algorithms)
Sidak (generalized linear models algorithms)
Sequential Bonferroni (generalized linear models algorithms)
Comparison of Adjustment Methods (generalized linear models algorithms)


Comparison of Adjustment Methods (generalized linear models algorithms)

A multiple testing procedure tells not only if H0 is rejected, but also if each individual H0i is rejected. All the methods, except LSD, control the family-wise type I error for testing H0; that is, the probability of rejecting at least one individual hypothesis under H0. In addition, sequential methods also control the family-wise type I error for testing any subset of H0.

LSD is the one without any adjustment, it rejects H0 too often. It does not control the family-wise type I error and should never be used to test H0. It is provided here mainly for reference.

Bonferroni is conservative in the sense that it rejects H0 less often than it should. In some situations, it becomes extremely conservative when test statistics are highly correlated.

Sidak is also conservative in most cases, but is less conservative than Bonferroni. It gives the exact type I error when test statistics are independent.

Sequential Bonferroni is as conservative as the Bonferroni in terms of testing H0 because the smallest adjusted p-value used in making decision is the same in both methods. But in term of testing individual H0i, it is less conservative than the Bonferroni. Sequential Bonferroni rejects at least as many individual hypotheses as Bonferroni.

Sequential Sidak is as conservative as the Sidak in terms of testing H0, but less conservative than the Sidak in terms of testing individual H0i. Sequential Sidak is less conservative than sequential Bonferroni.

Related Topics

Model Testing (generalized linear models algorithms)
Lagrange Multiplier Test (generalized linear models algorithms)
Goodness-of-Fit Statistics (generalized linear models algorithms)
Test of Model Fit (generalized linear models algorithms)
Multiple Comparisons (generalized linear models algorithms)
LSD (Least Significant Difference) (generalized linear models algorithms)
Bonferroni (generalized linear models algorithms)
Sidak (generalized linear models algorithms)
Sequential Bonferroni (generalized linear models algorithms)
Sequential Sidak (generalized linear models algorithms)


Scoring (generalized linear models algorithms)

generalized linear models algorithms,generalized linear models algorithms,generalized linear models algorithms
scoring,scoring,scoring

Scoring is defined as assigning one or more values to a case in a data set. Two types are considered here: predicted values and model diagnostics.

Related Topics

GENLIN Algorithms
Notation (generalized linear models algorithms)
Model (generalized linear models algorithms)
Estimation (generalized linear models algorithms)
Model Testing (generalized linear models algorithms)
Default Tests of Model Effects (generalized linear models algorithms)
Estimated Marginal Means (generalized linear models algorithms)
Predicted Values (generalized linear models algorithms)
Diagnostics (generalized linear models algorithms)
Generalized Estimating Equations
Goodness of Fit (generalized estimating equations algorithms)
References (generalized linear models algorithms)


Predicted Values (generalized linear models algorithms)

predicted values,predicted values,predicted values
generalized linear models algorithms,generalized linear models algorithms,generalized linear models algorithms

Due to the non-linear link functions, the predicted values will be computed for the linear predictor and the mean of the response separately. Also, since estimated standard errors of predicted values of linear predictor are calculated, the confidence intervals for the mean are obtained easily.

Predicted values are still computed as long all the predictor variables have non-missing values in the given model.

Predicted Values of the Linear Predictors

^
η
i=x T i
^
β
+ o i

For the ordinal multinomial model, a predicted value of the linear predictor for category j is given by

^
η
i,j =
^
ψ
j− x T i
^
β
+oi,   j=1,...,J−1.

Estimated Standard Errors of Predicted Values of the Linear Predictors

^
σ
η=
√ x T i Σ xi

For the ordinal multinomial model, the estimated standard error of
^
η
i,j is given by

^
σ
ηi,j =
√ (1,− x T i) Σ j(
1
− x i
)
,   j=1,...,J−1,

where Σ j is a reduced parameter estimates covariance (1 + p)×(1 + p) matrix from Σ . Suppose Σ for ordinal multinomial models has the following form:

Σ =[
Σ ψ,ψ | Σ ψ,β
Σ β,ψ | Σ β,β
]
=[
[
σ1,1 ... σ1,(J−1)
·
·
·
·
·
·
·
·
·
σ(J−1),1 ... σ(J−1),(J−1)
] 		[
σ1,J ... σ1,(J−1+p)
·
·
·
·
·
·
·
·
·
σ(J−1),J ... σ(J−1),(J−1+p)
]
[
σJ,1 ... σJ,(J−1)
·
·
·
·
·
·
·
·
·
σ(J−1+p),1 ... σ(J−1+p),(J−1)
] 		[
σJ,J ... σJ,(J−1+p)
·
·
·
·
·
·
·
·
·
σ(J−1+p),J ... σ(J−1+p),(J−1+p)
]
]

then Σ j will have the following form as it takes the corresponding elements in the jth row and column of Σ and Σ β,β:

Σ j =[
σj,j [
σj,J ... σj,(J−1+p)
]
[
σJ,j
·
·
·
σ(J−1+p),j
] 		Σ β,β
]
=[
σj,j σj,J ... σj,(J−1+p)
σJ,j σJ,J ... σJ,(J−1+p)
·
·
·
·
·
·
·
·
·
·
·
·
σ(J−1+p),j σ(J−1+p),J ... σ(J−1+p),(J−1+p)
]

Predicted Values of the Means

^
μ
i=g−1(x T i
^
β
+ oi)

where g−1 is the inverse of the link function. For binomial response with 0/1 binary response variable, this the predicted probability of category 1.

For the ordinal multinomial model, a predicted value of the cumulative response probability for category j is given by

^
γ
i,j=g−1(
^
ψ
j− x T i β + oi),   j=1,...,J−1

Confidence Intervals for the Means

Approximate 100(1−α)% confidence intervals for the mean can be computed as follows

g−1(x T i
^
β
+ o i± z1−α/2
^
σ
η)

Approximate 100(1−α)% confidence intervals for the cumulative response probability can be computed as follows

g−1(
^
ψ
j− x T i β + oi± z1−α/2
^
σ
ηi,j),   j=1,...,J−1.

If either endpoint in the argument is outside the valid range for he inverse link function, the corresponding confidence interval endpoint is set to a system missing value.

Predicted category for binomial and multinomial distributions

For the binomial distribution with 0/1 binary response variable, the predicted category is

c( x i)={
1 (or sucess)   if
^
μ
i≥0.5
0 (or failure)   otherwise
.

For the ordinal multinomial model, the predicted category is the one with the highest predicted probability; that is

c( x i)=arg
max
j
^
π
i,j.

• If there are ties in determining c( x i), choose the category with highest Nj=nΣi=1fiyi,j.

• If there are still ties, choose the one with lowest category number.

Related Topics

GENLIN Algorithms
Notation (generalized linear models algorithms)
Model (generalized linear models algorithms)
Estimation (generalized linear models algorithms)
Model Testing (generalized linear models algorithms)
Default Tests of Model Effects (generalized linear models algorithms)
Estimated Marginal Means (generalized linear models algorithms)
Scoring (generalized linear models algorithms)
Diagnostics (generalized linear models algorithms)
Generalized Estimating Equations
Goodness of Fit (generalized estimating equations algorithms)
References (generalized linear models algorithms)


Diagnostics (generalized linear models algorithms)

diagnostics,diagnostics,diagnostics
generalized linear models algorithms,generalized linear models algorithms,generalized linear models algorithms

In addition to predicted values, we can calculate some values which would be good for model diagnostics for all distributions except the ordinal multinomial.

leverage,leverage,leverage
generalized linear models algorithms,generalized linear models algorithms,generalized linear models algorithms

Leverage

The leverage value hi is defined as the ith diagonal element of the hat matrix

H = W 1/2ε X ( X T W ε X )− X T W 1/2ε,

where the ith diagonal element for W ε is

we,i=ωiφ·1V(μi)(g´(μi))2.
residuals,residuals,residuals
generalized linear models algorithms,generalized linear models algorithms,generalized linear models algorithms

Raw Residuals

rRi=yi−
^
μ
i

where yi is the ith response and
^
μ
i is the corresponding predicted mean. Note for binomial response with a binary format, y values are 0 for the reference category and 1 for the category we are modeling.

Pearson residuals,Pearson residuals,Pearson residuals
generalized linear models algorithms,generalized linear models algorithms,generalized linear models algorithms

Pearson Residuals

The Pearson residual is the square root of the ith contribution to the Pearson chi-square.

rPi=(yi−
^
μ
i)
√ ωiV(
^
μ
i)

deviance residuals,deviance residuals,deviance residuals
generalized linear models algorithms,generalized linear models algorithms,generalized linear models algorithms

Deviance Residuals

The deviance residual is the square root of the contribution of the ith observation to the deviance, with the sign of the raw residual.

rDi= sign (yi−
^
μ
i)
√ di

where di is the contribution of the ith case to the deviance and sign() is 1 if its argument is positive and −1 if it is negative.

Standardized (and Studentized) Pearson Residuals

rSPi=(yi−
^
μ
i)
√ ωiφ V(
^
μ
i)(1−hi)
=rPi
√ 1φ (1−hi)

Standardized (and Studentized) Deviance Residuals

rSDi= sign (yi−
^
μ
i)
√ di
√ 1φ (1−hi)
=rDi
√ 1φ (1−hi)

likelihood residuals,likelihood residuals,likelihood residuals
generalized linear models algorithms,generalized linear models algorithms,generalized linear models algorithms

Likelihood Residuals

rLi= sign (yi−
^
μ
i)
√ hi(rSPi)2+(1−hi)(rSDi)2

Cook's distance,Cook's distance,Cook's distance
generalized linear models algorithms,generalized linear models algorithms,generalized linear models algorithms

Cook's Distance

Ci=1pxhi1−hi(rSPi)2

Related Topics

GENLIN Algorithms
Notation (generalized linear models algorithms)
Model (generalized linear models algorithms)
Estimation (generalized linear models algorithms)
Model Testing (generalized linear models algorithms)
Default Tests of Model Effects (generalized linear models algorithms)
Estimated Marginal Means (generalized linear models algorithms)
Scoring (generalized linear models algorithms)
Predicted Values (generalized linear models algorithms)
Generalized Estimating Equations
Goodness of Fit (generalized estimating equations algorithms)
References (generalized linear models algorithms)


Generalized Estimating Equations

generalized estimating equations algorithms,generalized estimating equations algorithms,generalized estimating equations algorithms

Generalized estimating equations (GEE) extend the GZLM algorithm to accommodate correlated data. The algorithms of generalized estimating equations are based on Liang and Zeger (1986) and Diggle, Heagerty, Liang and Zeger (2002).

Related Topics

GENLIN Algorithms
Notation (generalized linear models algorithms)
Model (generalized linear models algorithms)
Estimation (generalized linear models algorithms)
Model Testing (generalized linear models algorithms)
Default Tests of Model Effects (generalized linear models algorithms)
Estimated Marginal Means (generalized linear models algorithms)
Scoring (generalized linear models algorithms)
Predicted Values (generalized linear models algorithms)
Diagnostics (generalized linear models algorithms)
Goodness of Fit (generalized estimating equations algorithms)
References (generalized linear models algorithms)
Data Format (generalized estimating equations algorithms)
Notation (generalized estimating equations algorithms)
Model (generalized estimating equations algorithms)
Estimation (generalized estimating equations algorithms)
Default Tests of Model Effects (generalized estimating equations algorithms)
Scoring (generalized estimating equations algorithms)


Data Format (generalized estimating equations algorithms)

The data formation in GEE is very different from that in GZLM, so the data used in GEE need to be formatted appropriately. The structure of the correlated data has two dimensions: there are some independent subjects (the subject effect) where each subject has correlated measurements (the within-subject effect).

The subject effect can be a single variable or a list of variables connected by asterisks (*). In general, the number of subjects equals to the number of distinct combinations of values of the variables except under some circumstances (see example below).

The within-subject effect defines the ordering of measurements within subjects. If specified, it can be a single variable or a list of variables connected by asterisks (*). The start and end of the within-subject effect could be different for each subject, so the whole data file is checked to find the complete set of measurements which include all distinct combinations of values of within-subject effect from all subjects. The dimension of the complete set of measurement will be the dimension of the working correlation matrix (see Model (generalized estimating equations algorithms) for more information). If some measurements do not appear in the data for some subjects, then the existing measurements are ordered and the omitted measurements are treated as missing values.

Note that the within-subject effect might not be equally spaced. This is relevant for the time dependent working correlation structures. We will assume that the lags based on the data ordered by the within-subject effect are appropriate and fit the model.

The data have to be properly grouped by the subject effect and sorted by the within-subject effect if it exists. If you specify not to sort the data file (SORT=NO), we assume that the cases in the data file are pre-sorted. If you specify to sort the data file (SORT=YES), the data will be sorted internally by the subject effect and the within-subject effect, if the within-subject effect is specified.

Consider the following artificial data:

center | id | year | y | x1
A | 11 | 91 | 4 | 0
A | 11 | 93 | 5 | 1
A | 12 | 93 | 5 | 1
A | 11 | 94 | 6 | 1
A | 12 | 94 | 6 | 0
A | 12 | 95 | 7 | 1
B | 1 | 91 | 6 | 0
B | 1 | 94 | 3 | 0
B | 2 | 93 | 5 | 1
B | 2 | 95 | 7 | 0
B | 2 | 94 | 8 | 1

Suppose the subject effect is specified as center*id. The number of subjects or clusters depends on whether the within-subject effect is specified or not and whether the data are indicated to be sorted or not. Thus we consider the following cases:

Within-subject effect is specified, data will be sorted by procedure (SORT=YES)

There are four distinct combinations for the subject effect: (center*id) = (A*11), (A*12), (B*1), (B*2). The data will be grouped internally based on them, so the number of clusters or groups = 4. The complete set of measurements = (91, 93, 94, 95) with the dimension = 4, the maximum and minimum sizes of the within-subject effect are 3 and 2, respectively. Note the measurements for the within-subject effect are not equally spaced, we assume the measurements are spaced appropriately when calculating the time dependent working correlation structures. GEE model information about the data is:

Number of Levels | Subject Effect | center | 2
 |  | id | 4
 | Within-Subject Effect | year | 4
Number of Subjects |  |  | 4
Number of Measurements per Subject | Minimum |  | 2
 | Maximum |  | 3
Correlation Matrix Dimension |  |  | 4

The data file is then organized internally as follows (subject and withinsubject are internal variables):

center | id | year | y | x1 | subject | withinsubject
A | 11 | 91 | 4 | 0 | 1 | 1
A | 11 | 93 | 5 | 1 | 1 | 2
A | 11 | 94 | 6 | 1 | 1 | 3
A | 11 | 95 | . | . | 1 | 4
A | 12 | 91 | . | . | 2 | 1
A | 12 | 93 | 5 | 1 | 2 | 2
A | 12 | 94 | 6 | 0 | 2 | 3
A | 12 | 95 | 7 | 1 | 2 | 4
B | 1 | 91 | 6 | 0 | 3 | 1
B | 1 | 93 | . | . | 3 | 2
B | 1 | 94 | 3 | 0 | 3 | 3
B | 1 | 95 | . | . | 3 | 4
B | 2 | 91 | . | . | 4 | 1
B | 2 | 93 | 5 | 1 | 4 | 2
B | 2 | 94 | 8 | 1 | 4 | 3
B | 2 | 95 | 7 | 0 | 4 | 4

Within-subject effect is not specified, data will be sorted by procedure (SORT=YES)

There are still 4 distinct combinations for the subject effect and the number of clusters or groups = 4. The dimension of the working correlation matrix is 3 which is determined by the maximum size of measurements from all subjects, the maximum and minimum sizes of repeated measurements are 3 and 2, respectively. A summary is as follows:

Number of Levels | Subject Effect | center | 2
 |  | id | 4
Number of Subjects |  |  | 4
Number of Measurements per Subject | Minimum |  | 2
 | Maximum |  | 3
Correlation Matrix Dimension |  |  | 3

The data file is then organized internally as follows (subject and withinsubject are internal variables):

center | id | year | y | x1 | subject | withinsubject
A | 11 | 91 | 4 | 0 | 1 | 1
A | 11 | 93 | 5 | 1 | 1 | 2
A | 11 | 94 | 6 | 1 | 1 | 3
A | 12 | 93 | 5 | 1 | 2 | 1
A | 12 | 94 | 6 | 0 | 2 | 2
A | 12 | 95 | 7 | 1 | 2 | 3
B | 1 | 91 | 6 | 0 | 3 | 1
B | 1 | 94 | 3 | 0 | 3 | 2
B | 1 | . | . | . | 3 | 3
B | 2 | 93 | 5 | 1 | 4 | 1
B | 2 | 95 | 7 | 0 | 4 | 2
B | 2 | 94 | 8 | 1 | 4 | 3

Data will not be sorted by procedure (SORT=NO)

When data are not to be sorted, the within-subject effect will be ignored whether specified or not.

From the original data file, we notice that the same combinations of values for the subject effect are in different blocks, so they will be considered as different clusters. For example:

The 1st cluster (certer*id = A *11) includes the 1st and 2nd observations.

The 2nd cluster (center*id = A*12) includes the 3rd observation.

The 3rd cluster (center*id = A*11) includes the 4th observation.

The 4th cluster (center*id = A*12) includes the 5th and 6th observations.

The 5th cluster (center*id = B*1) includes the 7th and 8th observations.

The 6th cluster (center*id = B*2) includes the 9th, 10th and 11th observations.

So the number of clusters =6. The dimension of the working correlation matrix is 3, the maximum and minimum sizes of repeated measurements are 3 and 1, respectively. A summary is as follows:

Number of Levels | Subject Effect | center | 2
 |  | id | 4
Number of Subjects |  |  | 6
Number of Measurements per Subject | Minimum |  | 1
 | Maximum |  | 3
Correlation Matrix Dimension |  |  | 3

The data file is then organized internally as follows (subject and withinsubject are internal variables):

center | id | year | y | x1 | subject | withinsubject
A | 11 | 91 | 4 | 0 | 1 | 1
A | 11 | 93 | 5 | 1 | 1 | 2
A | 11 | . | . | . | 1 | 3
A | 12 | 93 | 5 | 1 | 2 | 1
A | 12 | . | . | . | 2 | 2
A | 12 | . | . | . | 2 | 3
A | 11 | 94 | 6 | 1 | 3 | 1
A | 11 | . | . | . | 3 | 2
A | 11 | . | . | . | 3 | 3
A | 12 | 94 | 6 | 0 | 4 | 1
A | 12 | 95 | 7 | 1 | 4 | 2
A | 12 | . | . | . | 4 | 3
B | 1 | 91 | 6 | 0 | 5 | 1
B | 1 | 94 | 3 | 0 | 5 | 2
B | 1 | . | . | . | 5 | 3
B | 2 | 93 | 5 | 1 | 6 | 1
B | 2 | 95 | 7 | 0 | 6 | 2
B | 2 | 94 | 8 | 1 | 6 | 3

After reformatting the data, we assume there are i = 1, …, K subjects or clusters where each subject or cluster has t = 1, …, ni correlated measurements. Note now that n1 = n2 = … = nk. The following notations should be applied to the reformatted data, not the original data.

Related Topics

Generalized Estimating Equations
Notation (generalized estimating equations algorithms)
Model (generalized estimating equations algorithms)
Estimation (generalized estimating equations algorithms)
Model Testing (generalized estimating equations algorithms)
Default Tests of Model Effects (generalized estimating equations algorithms)
Scoring (generalized estimating equations algorithms)
References (generalized linear models algorithms)


Notation (generalized estimating equations algorithms)

generalized estimating equations algorithms,generalized estimating equations algorithms,generalized estimating equations algorithms
notation,notation,notation

The following notation is used throughout this section unless otherwise stated:

K | Number of subjects (clusters or groups) in the data set. It is an integer and K≥1.
ni | Number of complete measurements on the ith subject. It is an integer and ni≥1.
n | Total umber of measurement; n=ΣKi=1ni. It is an integer and n ≥ 1.
p | Number of parameters (including the intercept, if exists) in the model. It is an integer and p ≥ 1.
px | Number of non-redundant columns in the design matrix. It is an integer and px ≥ 1.
y | n × 1 dependent variable vector. y =[ y T 1,..., y T K] T with y i=[yi1,...,yini] T for each i.
r | n × 1 vector of events for the binomial distribution; it usually represents the number of "successes". All elements are non-negative integers.
m | n × 1 vector of trials for the binomial distribution. All elements are positive integers and mi ≥ ri, i=1,...,n.
μ | n × 1 vector of expectations of the dependent variable.
η | n × 1 vector of linear predictors.
X | n × p design matrix. The vector for the tth measurement on the ith subject is xit=[xit1,...,xitp] T , i = 1, …, K and t = 1, …, ni with xit1=1 if the model has an intercept.
β | p × 1 vector of unknown parameters. The first element in β is the intercept, if there is one.
ω | n × 1 vector of scale weights. If an element is less than or equal to 0 or missing, the corresponding case is not used.
f | n × 1 vector of frequency counts. Non-integer elements are treated by rounding the value to the nearest integer. For values less than 0.5 or missing, the corresponding cases are not used.
N | Effective sample size. N=nΣi=1fini.

Related Topics

Generalized Estimating Equations
Data Format (generalized estimating equations algorithms)
Model (generalized estimating equations algorithms)
Estimation (generalized estimating equations algorithms)
Model Testing (generalized estimating equations algorithms)
Default Tests of Model Effects (generalized estimating equations algorithms)
Scoring (generalized estimating equations algorithms)
References (generalized linear models algorithms)


Model (generalized estimating equations algorithms)

generalized estimating equations algorithms,generalized estimating equations algorithms,generalized estimating equations algorithms
model,model,model

GEE offers the same link functions and distributions as those for GZLM. The generalized estimating equation is given by

s(β)=KΣi=1fi(∂ μ i∂β) T V −i( y i− μ i)=[0]p×1 ,

where

(∂ μ i∂β) =(∂ μ i∂ η i)(∂ η i∂β)
= diag (1g´(μij))(
xi11 ... xi1p
·
·
·
·
·
·
·
·
·
xini1 ... xinip
)
=(
xi11g´(μi1) ... xi1pg´(μi1)
·
·
·
·
·
·
·
·
·
xini1g´(μini) ... xinipg´(μini)
)ni×p,

diag (1/g´(μij)), j=1,...,ni, is an ni×ni matrix, V i is the assumed covariance matrix of yi and V −i is a generalized inverse of V i.

If the measurements within the ith subject are independent like in GZLM, then V i is a diagonal matrix which can be decomposed into

V i=(φ A 1/2i I ni A 1/2i)ni×ni,

where Ai= diag (V(μij)/ωij), j=1,...,ni, is an ni×ni matrix and I ni is an ni×ni identity matrix. However, if the measurements within the ith subject are correlated, we simply replace the identity matrix I ni with a more general correlation R( α )

V i=φA1/2iR(α)A1/2i,

where R(α) is an ni×ni “working” correlation matrix which can be estimated through the parameter vector α. Since R(α) usually doesn’t have a diagonal form, neither does V i. If R(α) is indeed the true correlation matrix of the y i’s, then V i is the true covariance matrix of y i.

Ordinal Multinomial Model

For ordinal multinomial GEE models, we need to transform original response variable and define some notation as follows:

J

Number of values for the ordinal response. It is an integer and J≥2.

y

n × 1 dependent variable vector. y =[ y T 1,..., y T K] T with y i=[yi1,...,yini] T for each i.

z

K × ni × (J – 1)) × 1 transformed dependent variable vector. z =[ z T 1,..., z T K] T , z i=[ z T i1,..., z T ini] T , z it=[yit,1,...,yit,J−1] T and yit,j={
1   if yit=j
0   otherwise
.

π

K × ni × (J – 1)) × 1 conditional response probability vector. π =[ π T 1,..., π T K] T , π i=[ π T i1,..., π T ini] T and π it=[πit,1,...,πit,J−1] T , where πit,j is the conditional response probability of measurement t on subject i for category j given the observed independent variable vector; that is, πit,j=P(yi=j| x it) and πit,j=γit,j−γit,j−1 for j=1,...,J.

γit,j

Conditional cumulative response probability of measurement t on subject i for category j given observed independent variable vector; that is, γit,j=P(yi≤j| x it).

ηit,j

Linear predictor value of measurement t on subject i for category j. It is related to γit,j through a cumulative link function.

Ψ

(J – 1) × 1 vector of threshold parameters; ψ =(ψ1,ψ2,...,ψJ−1)´ and ψ1<ψ2<...<ψJ−1.

β

p × 1 vector of regression parameters associated with model predictors; β =(β1,β2,...,βp)´.

B

(J – 1 + p) × 1 vector of all parameters; Β =( ψ T , β T ) T .

The generalized estimating equation for estimating parameters B is given by

s( B )=KΣi=1fi(∂ π i∂ B ) T V −i( z i− π i)=[0](J−1+p)×1 ,

where

∂ π i∂ B =[
∂πi1,1∂ψ1 ... ∂πi1,1∂ψJ−1 ∂πi1,1∂β1 ... ∂πi1,1∂βp
·
·
·
·
·
·
∂πi1,J−1∂ψ1 ... ∂πi1,J−1∂ψJ−1 ∂πi1,J−1∂β1 ... ∂πi,J−1∂βp
·
·
·
·
·
·
·
·
·
·
·
·
∂πini,1∂ψ1 ... ∂πini,1∂ψJ−1 ∂πini,1∂β1 ... ∂πini,1∂βp
·
·
·
·
·
·
∂πini,J−1∂ψ1 ... ∂πini,J−1∂ψJ−1 ∂πini,J−1∂β1 ... ∂πini,J−1∂βp
](ni×(J−1))×(J−1+p)

and for all t=1,...,ni,

∂πit,j∂ψj=∂γit,j∂ηit,j,   j=1,...,J−1,
∂πit,j∂ψj−1=−∂γit,j−1∂ηit,j−1,   j=2,...,J−1,
∂πit,j∂ψl=0,   for j<l or j−l>1, j=1,...,J−1 and l=1,...,J−1,
∂πit,1∂βℓ=−∂γit,1∂ηit,1xitℓ, ℓ=1,...,p,
∂πit,j∂βℓ=−(∂γit,j∂ηit,j−∂γit,j−1∂ηit,j−1)xitℓ,   j=2,...,J−1 and ℓ=1,...,p,

and V −i is a is a generalized inverse of V i. Here

V i=φA1/2iRi ( α ) A1/2i ,

where

Ai= diag (Ai1 , ... , Aini) ,
Ait=1ωit diag (πit,1(1−πit,1) , ... , πit,J−1(1−πit,J−1)) ,

and

Ri( α )=1φ[
A−1/2i1 V i1A−1/2i1 ρ i12 ... ρ i1ni
ρ i21 A−1/2i2 V i2A−1/2i2 ... ρ i2ni
·
·
·
·
·
·
·
·
·
·
·
·
ρ ini1 ρ ini2 ... A−1/2ini V iniA−1/2ini
]

and note that there is a subscript i in Ri ( α ) which means each subject has different working correlation matrix. In fact, only the diagonal blocks are different for different subjects, the off-diagonal blocks will be the same for all subjects. The diagonal blocks of Ri ( α ) , A−1/2it V itA−1/2it, with

A−1/2it=ω1/2it× diag ({πit,1(1−πit,1)}−1/2 , ... , {πit,J−1(1−πit,J−1)}−1/2)

and

V it=φωit×[ diag (πit,1 , ... , πit,J−1)− π it π T it]
=φωit×[
πit,1(1−πit,1) −πit,1πit,2 ... −πit,1πit,J−1
−πit,2πit,1 πit,2(1−πit,2) ... −πit,2πit,J−1
·
·
·
·
·
·
·
·
·
·
·
·
−πit,J−1πit,1 −πit,J−1πit,2 ... πit,J−1(1−πit,J−1)
],

are specified entirely by π i. In particular, the diagonal elements of 1φA−1/2it V itA−1/2it are 1 and off-diagonal (j,l) elements are

−πit,jπit,l{πit,j(1−πit,j)πit,l(1−πit,l)}1/2

which are not constant and depend on the categories j and l at measurement t. The unknown off-diagonal blocks of Ri ( α ) are the (J−1)×(J−1) matrix ρ iuv( α ),   u,v=1,...,ni, which we need to parameterize and estimate them.

Related Topics

Generalized Estimating Equations
Data Format (generalized estimating equations algorithms)
Notation (generalized estimating equations algorithms)
Estimation (generalized estimating equations algorithms)
Model Testing (generalized estimating equations algorithms)
Default Tests of Model Effects (generalized estimating equations algorithms)
Scoring (generalized estimating equations algorithms)
References (generalized linear models algorithms)


Working correlation matrix

The working correlation matrix is usually unknown and should be estimated. We use the estimated Pearson residuals

rit=(yit−μit)
√ ωitV(μit)

from the current fit of the model to estimate α.

For the ordinal multinomial model, we define estimated Pearson-like residuals as follows

rit,j=(yit,j−πit,j)
√ ωitπit,j(1−πit,j)

and the vector

r it=[rit,1,...,rit,J−1] T

The following structures are available.

Independent

The independent correlation structure is defined as:

Ruv={
1 if u=v
0 otherwise

For the ordinal multinomial model:

ρ iuv= 0 ,   u,v=1,...,ni.

No parameters need to be estimated for this structure.

Exchangeable

The exchangeable correlation structure is defined as:

Ruv={
1 if u=v
α otherwise

1 parameter is estimated as follows:

α=KΣi=1
Σ
t<t´
firitrit´(12KΣi=1fin´i(n´i−1))−px/(1N´−pxKΣi=1niΣt=1fir2it),

where N´=ΣKi=1fin´i and n´i is the number of non-missing measurements on the ith subject.

For the ordinal multinomial model:

α =KΣi=1fi
Σ
t<t´
12(ritrTit´+rit´rTit)(12KΣi=1fin´i(n´i−1))−(J−1+px)

and ρ iuv= α , u,v=1,...,ni and u≠v.

AR(1)

The first-order autoregressive correlation structure is defined as:

Ruv={
1 if u=v
α|u−v| otherwise

1 parameter is estimated as follows:

α=KΣi=1ni−1Σt=1fi ritri,t+1(KΣi=1fi n´´i)−px/(1N´−pxKΣi=1niΣt=1fir2it),

where n´´i is the number of non-missing pairs used in the numerator part for the ith subject. If there is no non-missing measurement for the ith subject, n´´i=ni−1 .

For the ordinal multinomial model:

α =KΣi=1fini−1Σt=112(ritrTit+1+rit+1rTit)(KΣi=1fin´´i)−(J−1+px)

and ρ iuv= α |u−v|, u,v=1,...,ni and u≠v.

M-dependent

The m-dependent correlation structure is defined as:

Ruv={
1 if u=v
α|u−v| if |u−v|≤m
0     otherwise

m parameters are estimated as follows:

αj=KΣi=1ni−jΣt=1fi ritri,t+j(KΣi=1fi n'''ij)−px/(1N´−pxKΣi=1niΣt=1fir2it),

where n'''ij is the number of non-missing pairs for the ith subject in calculating αj. If there is no non-missing measurement for the ith subject, n'''ij=ni−j.

For the ordinal multinomial model:

α j=KΣi=1fini−jΣt=112(ritrTit+j+rit+jrTit)(KΣi=1fin'''ij)−(J−1+px)

and ρ iuv={
α |u−v| if |u−v|≤m
0     otherwise

Unstructured

The unstructured correlation structure is defined as:

Ruv={
1 if u=v
αuv otherwise

12ni(ni−1) parameters are estimated as follows:

αuv=KΣi=1fi riuriv(KΣi=1fiIi,uv)−px/(1N´−pxKΣi=1niΣt=1fir2it),

where Ii,uv=1 if the ith subject has non-missing measurements at times u and v; 0 otherwise

For the ordinal multinomial model:

α uv=KΣi=1fi r iu r T iv(KΣi=1fiIi,uv)−(J−1+px)

and ρ iuv= α uv, u,v=1,...,ni and u≠v

Fixed

The fixed correlation structure is defined as:

Ruv={
1 if u=v
γuv otherwise

where γuv is user-specified

Fixed correlation structures are not allowed for ordinal multinomial models.

No parameters need to be estimated for this structure.

Notes

• When the scale parameter is updated by the current Pearson residuals, the denominator for the α parameter vector is an estimator of the scale parameter.

• The denominators in the above equations and in the estimator of the scale parameter are all adjusted by the number of non-redundant parameters (not subtracted by px). The user can specify that these adjustments not be used so that the numerator and denominator parts are invariant to subject-level replication changes of the data. If the denominators are non-positive; that is, if the summation part is smaller than or equal to px, then only the summation part is used.


Estimation (generalized estimating equations algorithms)

generalized estimating equations algorithms,generalized estimating equations algorithms,generalized estimating equations algorithms
estimation,estimation,estimation

Having selected a particular model, it is required to estimate the parameters and to assess the precision of the estimates.

Related Topics

Generalized Estimating Equations
Data Format (generalized estimating equations algorithms)
Notation (generalized estimating equations algorithms)
Model (generalized estimating equations algorithms)
Model Testing (generalized estimating equations algorithms)
Default Tests of Model Effects (generalized estimating equations algorithms)
Scoring (generalized estimating equations algorithms)
References (generalized linear models algorithms)
Parameter Estimation (generalized estimating equations algorithms)
Parameter Estimate Covariance Matrix, Correlation Matrix and Standard Errors (generalized estimating equations algorithms)
Wald Confidence Intervals (generalized estimating equations algorithms)
Chi-Square Statistics (generalized estimating equations algorithms)


Parameter Estimation (generalized estimating equations algorithms)

The algorithm for estimating model parameters using GEEs is outlined below. Note the scale parameter or the ancillary parameter k is not a part of parameter estimation and see below on how to deal with them.

Some definitions are needed for an iterative process:

M | The maximum number of iterations. It must be a non-negative integer. If the value is 0, then initial parameter values become final estimates.
Nu | The number of iterations between updates of the working correlation matrix. It must be a positive integer.
CORRTYPE | The specified working correlation structure.
ε p , εH | Tolerance levels for different types of convergence criteria.
Abs | A 0/1 binary variable; Abs = 1 if absolute change is used for convergence criteria and Abs = 0 if relative change is used.

1. Input initial values β ( 0 ) and/or φ ( 0 ) or if no initial values are given, compute initial estimates with an independent generalized linear model.

2. Compute the working correlation R( α ) based on β ( 0 ) , Pearson residuals and a specified working correlation structure (CORRTYPE). Check if R( α ) is positive definite for exchangeable, m-dependent and unstructured structures. If it is not, revise it to be equal to 11+ς( R( α ) +ς I ), where I is an identity matrix and ς is a ridge value such that the adjusted matrix is positive definite. If a fixed correlation matrix is specified by the users and it is not positive definite, issue a warning and stop. Then compute the initial estimate of the covariance matrix of y i ( V (0)i), the generalized estimating equation s(0), and generalized Hessian matrix H(0) (see formulae below) based on β ( 0 ) and V (0)i.

3. Initialize v=0.

4. Set v=v+1.

5. Compute estimates of vth iteration

β ( v ) =β ( v−1 ) −(H(v−1))−s(v−1),

6. If v/Nu is a positive integer, update the working correlation, checking for positive definiteness as above.

7. Compute an estimate of the covariance matrix of y i and its generalized inverse

V (v)i=φ A 1/2i R ( α ) A 1/2i and ( V (v)i)−=1φ A −1/2i R ( α ) − A −1/2i.

For the ordinal multinomial model, replace R ( α ) with R i ( α ) in the above equations.

8. Revise s(v) and H(v) based on β ( v ) and V (v)i.

s(v)=KΣi=1fi(∂ μ i∂β) T ( V (v)i)−(yi−μi),

H(v)=−KΣi=1fi(∂ μ i∂β) T ( V (v)i)−(∂ μ i∂β).

For the ordinal multinomial model,

s (v)=KΣi=1fi(∂ π i∂ B ) T ( V (v)i)−( z i− π i),

H (v)=−KΣi=1fi(∂ π i∂ B ) T ( V (v)i)−(∂ π i∂ B ).

9. Check the convergence criteria. If they are met or the maximum number of iterations is reached, stop. The final vector of estimates is denoted by
^
β
(and
^
Ψ
for the ordinal multinomial). Otherwise, go back to step (4).

Scale Parameter Handling

If no initial values are given,, the initial values are computed with an independent GZLM. The ways to deal with the scale parameter in the GZLM step (1) and the GEE step (7) are as follows:

• For normal, inverse Gaussian, gamma, and Tweedie response, if the scale parameter is estimated by the ML method in step (1), then in step (7) φ would be updated as

^
φ
=1N´−pxKΣi=1niΣt=1fir2it,

where rit is the Pearson residual, and ni is the number of non-missing measurements on the ith subject.

• If the scale parameter is set to a fixed value in step (1), then φ would be held fixed at that value in step (7) as well.

Convergence Criteria

We consider parameter convergence and Hessian convergence. For parameter convergence, we consider both absolute and relative change, but for Hessian convergence, we only consider absolute change because the log-likelihood values used as the denominator for relative change are not valid for GEE. Let ε p and εH be given tolerance levels for each type, then the criteria can be written as follows:

Parameter convergence: {
max
j
(|β(v)j−β(v−1)j||β(v−1)j|+10−6)<ε p if relative change
max
j
(|β(v)j−β(v−1)j|) <ε p if absolute change
.

Hessian convergence: (s ( v ) ) T (H ( v ) )−(s ( v ) ) <εH if absolute change

If the Hessian convergence criterion is not user-specified, it is checked based on absolute change with ε H = 1E-4 after the log-likelihood or parameter convergence criterion has been satisfied. If Hessian convergence is not met, a warning is displayed.

Related Topics

Estimation (generalized estimating equations algorithms)
Parameter Estimate Covariance Matrix, Correlation Matrix and Standard Errors (generalized estimating equations algorithms)
Wald Confidence Intervals (generalized estimating equations algorithms)
Chi-Square Statistics (generalized estimating equations algorithms)


Parameter Estimate Covariance Matrix, Correlation Matrix and Standard Errors (generalized estimating equations algorithms)

Parameter Estimate Covariance

Two parameter estimate covariance matrices can be calculated. One is the model-based estimator and the other one is the robust estimator. As in the generalized linear model, the consistency of the model-based parameter estimate covariance depends on the correct specification of the mean and variance of the response (including correct choice of the working correlation matrix). However, the robust parameter estimate covariance is still consistent even when the specification of the working correlation matrix is incorrect as we often expect.

The model-based parameter estimate covariance is

Σ m =−H−1

where H−1 is the generalized inverse of H1=−KΣi=1fi(∂ μ i∂β) T V −i(∂ μ i∂β).

For the ordinal multinomial model, H 1=−KΣi=1fi(∂ π i∂ B ) V −i(∂ π i∂ B ).

The robust parameter estimate covariance is

Σ r =H−1H2H−1

where H2=KΣi=1fi(∂ μ i∂β) T V −i cov ( y i) V −i(∂ μ i∂β) and cov( y i) can be estimated by ( y i− μ i)( y i− μ i) T .

For the ordinal multinomial model, H 2=KΣi=1fi(∂ π i∂ B ) V −icov( z i) V −i(∂ π i∂ B ) and cov﻿( z i) can be estimated by ( z i− π i)( z i− π i).

Note that model-based parameter estimate covariance will be affected by how the scale parameter is handled, but the robust parameter estimate covariance will not be affected by the estimate of the scale parameter because φ is cancelled in different terms.

Parameter Estimate Correlation

Parameter estimate correlation is calculated as described in GZLM. See the topic Parameter Estimate Covariance Matrix, Correlation Matrix and Standard Errors (generalized linear models algorithms) for more information.

Parameter Estimate Standard Error

Parameter estimate standard errors are calculated as described in GZLM. There is no standard error for the scale parameter in GEE. See the topic Parameter Estimate Covariance Matrix, Correlation Matrix and Standard Errors (generalized linear models algorithms) for more information.

Related Topics

Estimation (generalized estimating equations algorithms)
Parameter Estimation (generalized estimating equations algorithms)
Wald Confidence Intervals (generalized estimating equations algorithms)
Chi-Square Statistics (generalized estimating equations algorithms)


Wald Confidence Intervals (generalized estimating equations algorithms)

generalized estimating equations algorithms,generalized estimating equations algorithms,generalized estimating equations algorithms
confidence intervals,confidence intervals,confidence intervals

Wald confidence intervals are calculated as described in GZLM. See the topic Confidence Intervals (generalized linear models algorithms) for more information.

Related Topics

Estimation (generalized estimating equations algorithms)
Parameter Estimation (generalized estimating equations algorithms)
Parameter Estimate Covariance Matrix, Correlation Matrix and Standard Errors (generalized estimating equations algorithms)
Chi-Square Statistics (generalized estimating equations algorithms)


Chi-Square Statistics (generalized estimating equations algorithms)

The chi-square statistics and corresponding p-values are calculated as described in GZLM. See the topic Chi-Square Statistics (generalized linear models algorithms) for more information.

Related Topics

Estimation (generalized estimating equations algorithms)
Parameter Estimation (generalized estimating equations algorithms)
Parameter Estimate Covariance Matrix, Correlation Matrix and Standard Errors (generalized estimating equations algorithms)
Wald Confidence Intervals (generalized estimating equations algorithms)


Model Testing (generalized estimating equations algorithms)

generalized estimating equations algorithms,generalized estimating equations algorithms,generalized estimating equations algorithms
model testing,model testing,model testing

Since GEE is not a likelihood-based method of estimation, the inferences based on likelihoods are not possible for GEEs. Most notably, the Lagrange multiplier test, goodness-of-fit tests, and omnibus tests are invalid and will not be offered.

Default tests of model effects are as in GZLM. See the topic Default Tests of Model Effects (generalized linear models algorithms) for more information.

Estimated marginal means are as in GZLM. See the topic Estimated Marginal Means (generalized linear models algorithms) for more information.

Related Topics

Generalized Estimating Equations
Data Format (generalized estimating equations algorithms)
Notation (generalized estimating equations algorithms)
Model (generalized estimating equations algorithms)
Estimation (generalized estimating equations algorithms)
Default Tests of Model Effects (generalized estimating equations algorithms)
Scoring (generalized estimating equations algorithms)
References (generalized linear models algorithms)


Goodness of Fit (generalized estimating equations algorithms)

generalized estimating equations algorithms,generalized estimating equations algorithms,generalized estimating equations algorithms
goodness of fit,goodness of fit,goodness of fit

None of the goodness-of-fit statistics which are available for GZLM are valid for GEE. However, Pan (2001b) introduced two useful extensions of AIC as goodness-of-fit statistics for model selection based on the quasi-likelihood function. One is for working correlation structure selection and the other is for variable selection. Both of them are based on the quasi-likelihood function under the independence model and the known scale parameter assumptions.

For the ordinal multinomial model, these goodness of fit statistics are not available because the log quasi-likelihood function can not be derived.

Based on the model specification Ε( y ) =μ and Var( y ) =V(μ)φ/ω, the (log) quasi-likelihood function for each case is

Qk(μ ; φ, ω, y)=∫μy−tφωV(t) dt=F(μ)

or

Q(μ ; φ, ω, y)=∫μyy−tφωV(t) dt=F(μ)−F(y)

which we shall call the kernel quasi-likelihood and full quasi-likelihood, respectively.

Since the components of Y are independent by assumption, the kernel and full quasi-likelihood for the complete data is the sum of the individual contributions

Qk( μ ; φ, ω , y )=nΣi=1Qk,i(μi ; φ, ωi, yi)

and

Q( μ ; φ, ω , y )=nΣi=1Qi(μi ; φ, ωi, yi).

Since μ would depend on β, we change notation from Qk( μ ; φ, ω , y )to Qk( β ; Ι ) and Q( μ ; φ, ω , y ) to Q( β ; Ι ) where I implies independence assumption. The quasi-likelihood functions for the probability distributions are listed in the following table:

Quasi-likelihood functions for probability distributions
Distribution | Qk( β ; Ι ) and Q( β ; Ι )
Normal | Qk( β ; Ι )=Q( β ; Ι )=nΣi=1−fiωi2φ{(yi−μi)2}
Inverse Gaussian | Qk( β ; Ι )=nΣi=1−fiωiφ{yi2μ2i−1μi} Q( β ; Ι )=nΣi=1−fiωi2φyiμ2i(yi−μi)2
Gamma | Qk( β ; Ι )=nΣi=1−fiωiφ{yiμi+ln(μi)} Q( β ; Ι )=nΣi=1fiωiφ{ln(yiμi)+μi−yiμi}
Negative binomial | Qk( β ; Ι )=nΣi=1fiωiφ{yiln(kμi)−(yi+1/k)ln(1+kμi)} Q( β ; Ι )=nΣi=1−fiωiφ{yiln(yiμi)−(yi+1/k)ln(yi+1/kμi+1/k)}
Poisson | Qk( β ; Ι )=nΣi=1fiωiφ{yiln(μi)−μi} Q( β ; Ι )=nΣi=1fiωiφ{−yiln(yiμi)+(yi−μi)}
Binomial(m) | Qk( β ; Ι )=nΣi=1fiω*iφ{yiln(μi)+(1−yi)ln(1−μi)} Q( β ; Ι )=nΣi=1fiω*iφ{yiln(μiyi)+(1−yi)ln(1−μi1−yi)}
Tweedie | Qk( β ; Ι )=nΣi=1fiωiφ{(2−q)yiμ1−qi−(1−q)μ2−qi(1−q)(2−q)} Q( β ; Ι )=nΣi=1fiωiφ{y2−qi+(2−q)yiμ1−qi−(1−q)μ2−qi(1−q)(2−q)}

Then the quasi-likelihood under the independence model criterion (QIC) for choosing the best correlation structure is defined as

QIC(R) = −2Q(βR; I )+2 trace (−H1, I ·Σr,R)

There are three terms in the above formula:

1. Q(βR; I ) is the value of the quasi-likelihood computed using the parameter estimates from the model with hypothesized correlation structure R; that is, the estimates of βR. In evaluating the quasi-likelihood, we use
^
μ
in place of μ. The scale parameter is unknown in practice, so we have to assign a value. If it is set to a fixed value by the user, then that value is used; otherwise 1 is used. Note that Q(βR; I ) could be replaced by Qk(βR; I ).

2. H1, I is the generalized Hessian matrix obtained by fitting an independent working correlation model.

3. Σr,R is the robust estimator for parameter estimate covariance from the model with hypothesized correlation structure R.

Under the assumption that all modeling specifications in GEE are correct, trace (−H1, I ·Σr,R)≈px, then the above QIC reduces to

QICu(R) = −2Q(βR; I )+2px

So QICu(R) can be useful for choosing the best subset of covariates for a particular model. For the use of QIC and QICu(R), the model with the smallest value is preferred. Note again that Q(βR; I ) could be replaced by Qk(βR; I ).

Related Topics

GENLIN Algorithms
Notation (generalized linear models algorithms)
Model (generalized linear models algorithms)
Estimation (generalized linear models algorithms)
Model Testing (generalized linear models algorithms)
Default Tests of Model Effects (generalized linear models algorithms)
Estimated Marginal Means (generalized linear models algorithms)
Scoring (generalized linear models algorithms)
Predicted Values (generalized linear models algorithms)
Diagnostics (generalized linear models algorithms)
Generalized Estimating Equations
References (generalized linear models algorithms)


Default Tests of Model Effects (generalized estimating equations algorithms)

default tests of model effects,default tests of model effects,default tests of model effects
generalized estimating equations algorithms,generalized estimating equations algorithms,generalized estimating equations algorithms

For type I and III analyses, Wald statistics are still valid.

Generalized Score Statistics

For type I and III analyses, the method of constructing a generalized score statistic is the same, the only difference is the method of constructing L matrices. A generalized score statistic can be computed as follows (when the process is applied to the ordinal multinomial model, all formulae should be modified accordingly):

Calculate
˜
β
−i under the constraint L iβ= 0 for each effect i,

˜
β
−i=
arg
β
(β)=0 s.t. L iβ=0,

where L i is a type III test matrix for the ith effect.

The iterative process to calculate the above optimal
˜
β
−i is a combination of sequential quadratic programming and GEE parameter estimation. This kind of iterative process will be used here and for custom tests, so we will describe the iterative process in a more general form:

˜
β
=
arg
β
s(β)=0 s.t. L β= K .

The iterative process is outlined briefly as follows:

1. Find initial values β ( 0 ) with L β(0)= K as described in Section 2.3.4.2-(a).

2. Compute the working correlation R( α ) based on the last iteration’s estimate β ( v−1 ) , Pearson residuals and a specified working correlation structure if (v−1+Nu)/Nu is an integer, otherwise the working correlation is not updated.

3. Compute an estimate of the covariance matrix of y i and its generalized inverse

V (v−1)i=φ A 1/2i R( α )A 1/2i and ( V (v−1)i)−=1φ A −1/2i R( α ) − A −1/2i.

Also compute s(v−1) and H(v−1) based on β ( v−1 ) and V (v−1)i as follows:

s(v−1)=KΣi=1fi(∂ μ i∂β) T ( V (v−1)i)−(yi−μi),

H(v−1)=−KΣi=1fi(∂ μ i∂β) T ( V (v−1)i)−(∂ μ i∂β).

4. Find a solution of δ (v−1) and λ (v) for the following KKT equations

[
H(v−1) | L T
L | 0
][
δ (v−1)
λ (v)
]=[
−s(v−1)
0
] .

5. Compute estimates of the vth iteration:

β ( v ) =β ( v−1 ) + δ ( v−1 )

6. Check if convergence criteria are met. If they are or the maximum number of iterations is reached, stop. The final vector of estimates is denoted by
˜
β
. Otherwise, go back to step (2).

Note: the convergence criteria here are similar to those for parameter estimation, except that the Hessian convergence criterion is modified as follows:

( s ( v ) + L T λ ( v+1 ) ) T ( H ( v ) )−( s ( v ) + L T λ ( v+1 ) ) <ε H .

Compute the generalized estimating equation based on the optimal
˜
β
−i.

Calculate the generalized score statistic for each effect i,

T GS ,i=s(
˜
β
−i) T Σ m L T i( L i Σ r L T i)−1 L i Σ m s(
˜
β
−i),

where Σ m is the model-based parameter estimate covariance and Σ r is the robust parameter estimate covariance, each evaluated at
˜
β
−i. Then the asymptotic distribution of T GS ,i is χ2r, where r is the rank of L i and the p-values can be calculated accordingly.

Wald Statistics

See the topic Default Tests of Model Effects (generalized linear models algorithms) for more information. Note Σ r (or Σ rm ) should be used as the estimated covariance matrix.

Related Topics

Generalized Estimating Equations
Data Format (generalized estimating equations algorithms)
Notation (generalized estimating equations algorithms)
Model (generalized estimating equations algorithms)
Estimation (generalized estimating equations algorithms)
Model Testing (generalized estimating equations algorithms)
Scoring (generalized estimating equations algorithms)
References (generalized linear models algorithms)


Scoring (generalized estimating equations algorithms)

Predicted values of the linear predictor, estimated standard errors of predicted values of linear predictor, predicted values of the means and confidence intervals for the means are calculated. See the topic Predicted Values (generalized linear models algorithms) for more information.

Only two types of residuals are offered as model diagnostics in GEE: raw residuals and Pearson residuals. See the topic Diagnostics (generalized linear models algorithms) for more information.

Related Topics

Generalized Estimating Equations
Data Format (generalized estimating equations algorithms)
Notation (generalized estimating equations algorithms)
Model (generalized estimating equations algorithms)
Estimation (generalized estimating equations algorithms)
Model Testing (generalized estimating equations algorithms)
Default Tests of Model Effects (generalized estimating equations algorithms)
References (generalized linear models algorithms)


References (generalized linear models algorithms)

generalized linear models algorithms,generalized linear models algorithms,generalized linear models algorithms
references,references,references
generalized estimating equations algorithms,generalized estimating equations algorithms,generalized estimating equations algorithms
references,references,references

Aitkin, M., D. Anderson, B. Francis, and J. Hinde. 1989. Statistical Modelling in GLIM. Oxford: Oxford Science Publications.

Albert, A., and J. A. Anderson. 1984. On the Existence of Maximum Likelihood Estimates in Logistic Regression Models. Biometrika, 71, 1-10.

Cameron, A. C., and P. K. Trivedi. 1998. Regression Analysis of Count Data. Cambridge: Cambridge University Press.

Diggle, P. J., P. Heagerty, K. Y. Liang, and S. L. Zeger. 2002. The analysis of Longitudinal Data, 2 ed. Oxford: Oxford University Press.

Dobson, A. J. 2002. An Introduction to Generalized Linear Models, 2 ed. Boca Raton, FL: Chapman & Hall/CRC.

Dunn, P. K., and G. K. Smyth. 2005. Series Evaluation of Tweedie Exponential Dispersion Model Densities. Statistics and Computing, 15, 267-280.

Dunn, P. K., and G. K. Smyth. 2001. Tweedie Family Densities: Methods of Evaluation. In: Proceedings of the 16th International Workshop on Statistical Modelling. Odense, Denmark: .

Gill, J. 2000. Generalized Linear Models: A Unified Approach. Thousand Oaks, CA: Sage Publications.

Hardin, J. W., and J. M. Hilbe. 2001. Generalized Estimating Equations. Boca Raton, FL: Chapman & Hall/CRC.

Hardin, J. W., and J. M. Hilbe. 2003. Generalized Linear Models and Extension. Station, TX: Stata Press.

Horton, N. J., and S. R. Lipsitz. 1999. Review of Software to Fit Generalized Estimating Equation Regression Models. The American Statistician, 53, 160-169.

Huber, P. J. 1967. The Behavior of Maximum Likelihood Estimates under Nonstandard Conditions. In: Proceedings of the Fifth Berkeley Symposium on Mathematical Statistics and Probability. Berkeley, CA: University of California Press.

Lane, P. W., and J. A. Nelder. 1982. Analysis of Covariance and Standardization as Instances of Prediction. Biometrics, 38, 613-621.

Lawless, J. E. 1984. Negative Binomial and Mixed Poisson Regression. The Canadian Journal of Statistics, 15, 209-225.

Liang, K. Y., and S. L. Zeger. 1986. Longitudinal Data Analysis Using Generalized Linear Models. Biometrika, 73, 13-22.

Lipsitz, S. H., K. Kim, and L. Zhao. 1994. Analysis of Repeated Categorical Data Using Generalized Estimating Equations. Statistics in Medicine, 13, 1149-1163.

McCullagh, P. 1983. Quasi-Likelihood Functions. Annals of Statistics, 11, 59-67.

McCullagh, P., and J. A. Nelder. 1989. Generalized Linear Models, 2nd ed. London: Chapman & Hall.

Miller, M. E., C. S. Davis, and J. R. Landis. 1993. The Analysis of Longitudinal Polytomous Data: Generalized Estimating Equations and Connections with Weighted Least Squares. Biometrics, 49, 1033-1044.

Nelder, J. A., and R. W. M. Wedderburn. 1972. Generalized Linear Models. Journal of the Royal Statistical Society Series A, 135, 370-384.

Pan, W. 2001. Akaike’s Information Criterion in Generalized Estimating Equations. Biometrics, 57, 120-125.

Pregibon, D. 1981. Logistic Regression Diagnostics. Annals of Statistics, 9, 705-724.

Smyth, G. K., and B. Jorgensen. 2002. Fitting Tweedie’s Compound Poisson Model to Insurance Claims Data: Dispersion Modelling. ASTIN Bulletin, 32, 143-157.

White, H. 1980. A Heteroskedasticity-Consistent Covariance Matrix Estimator and a Direct Test for Heteroskedasticity. Econometrica, 48, 817-836.

Williams, D. A. 1987. Generalized Linear Models Diagnostics Using the Deviance and Single Case Deletions. Applied Statistics, 36, 181-191.

Zeger, S. L., and K. Y. Liang. 1986. Longitudinal Data Analysis for Discrete and Continuous Outcomes. Biometrics, 42, 121-130.

Related Topics

Generalized Estimating Equations
Data Format (generalized estimating equations algorithms)
Notation (generalized estimating equations algorithms)
Model (generalized estimating equations algorithms)
Estimation (generalized estimating equations algorithms)
Model Testing (generalized estimating equations algorithms)
Default Tests of Model Effects (generalized estimating equations algorithms)
Scoring (generalized estimating equations algorithms)
GENLIN Algorithms
Notation (generalized linear models algorithms)
Model (generalized linear models algorithms)
Estimation (generalized linear models algorithms)
Model Testing (generalized linear models algorithms)
Default Tests of Model Effects (generalized linear models algorithms)
Estimated Marginal Means (generalized linear models algorithms)
Scoring (generalized linear models algorithms)
Predicted Values (generalized linear models algorithms)
Diagnostics (generalized linear models algorithms)
Goodness of Fit (generalized estimating equations algorithms)


GENLOG Multinomial Loglinear and Logit Models Algorithms

GENLOG (command),GENLOG (command),GENLOG (command)
algorithms,algorithms,algorithms
General Loglinear Analysis,General Loglinear Analysis,General Loglinear Analysis
algorithms,algorithms,algorithms
Logit Loglinear Analysis,Logit Loglinear Analysis,Logit Loglinear Analysis
algorithms,algorithms,algorithms
loglinear models algorithms,loglinear models algorithms,loglinear models algorithms

This chapter describes the algorithms used to calculate maximum-likelihood estimates for the multinomial loglinear model and the multinomial logit model. This algorithm is applicable only to aggregated data.

Related Topics

Notation (loglinear models algorithms)
Model (loglinear models algorithms)
Cell Structure Values (loglinear models algorithms)
Maximum-Likelihood Estimation (loglinear models algorithms)
Newton-Raphson Method (loglinear models algorithms)
Estimated Normalizing Constants (loglinear models algorithms)
Estimated Cell Counts (loglinear models algorithms)
Goodness-of-Fit Statistics (loglinear models algorithms)
Analysis of Dispersion (Logit Models Only) (loglinear models algorithms)
Residuals (loglinear models algorithms)
Generalized Residual (loglinear models algorithms)
Generalized Log-Odds Ratio (loglinear models algorithms)
Aggregated Data (loglinear models algorithms)
References (loglinear models algorithms)


Notation (loglinear models algorithms)

loglinear models algorithms,loglinear models algorithms,loglinear models algorithms
notation,notation,notation

The following notation is used throughout this chapter unless otherwise stated:

A | Generic categorical independent (explanatory) variable. Its categories are indexed by an array of integers.
B | Generic categorical dependent (response) variable. Its categories are indexed by an array of integers.
r | Number of categories of B. r≥1
c | Number of categories of A. c≥1
p | Number of nonredundant (nonaliased) parameters.
i | Generic index for the categories of B. i=1,...,r
j | Generic index for the categories of A. j=1,...,c
k | Generic index for the parameters. k=1,...,p
nij | Observed count in the ith response of B and the jth setting of A. nij≥0
Nj | Marginal total count at the jth setting of A. Nj=Σri=1nij
N | Total observed count. N=Σcj=1Σri=1nij
mij | Expected count. mij≥0
πij | Probability of having an observation in the ith response of B and the jth setting of A. 0≤πij≤1 and Σcj =1 Σri=1πij=1
zij | Cell structure value.
αj | jth normalizing constant.
βk | kth nonredundant parameter.
β | A vector of (β1,...,βp)´.
xijk | An element in the ith row and the kth column of the design matrix for the j setting.

The same notation is used for both loglinear and logit models so that the methods are presented in a unified way. Conceptually, one can consider a loglinear model as a special case of a logit model where the explanatory variable has only one level (that is, c=1).

Related Topics

GENLOG Multinomial Loglinear and Logit Models Algorithms
Model (loglinear models algorithms)
Cell Structure Values (loglinear models algorithms)
Maximum-Likelihood Estimation (loglinear models algorithms)
Newton-Raphson Method (loglinear models algorithms)
Estimated Normalizing Constants (loglinear models algorithms)
Estimated Cell Counts (loglinear models algorithms)
Goodness-of-Fit Statistics (loglinear models algorithms)
Analysis of Dispersion (Logit Models Only) (loglinear models algorithms)
Residuals (loglinear models algorithms)
Generalized Residual (loglinear models algorithms)
Generalized Log-Odds Ratio (loglinear models algorithms)
Aggregated Data (loglinear models algorithms)
References (loglinear models algorithms)


Model (loglinear models algorithms)

loglinear models algorithms,loglinear models algorithms,loglinear models algorithms
model,model,model

There are two components in a loglinear model: the random component and the systematic component.

Related Topics

GENLOG Multinomial Loglinear and Logit Models Algorithms
Notation (loglinear models algorithms)
Cell Structure Values (loglinear models algorithms)
Maximum-Likelihood Estimation (loglinear models algorithms)
Newton-Raphson Method (loglinear models algorithms)
Estimated Normalizing Constants (loglinear models algorithms)
Estimated Cell Counts (loglinear models algorithms)
Goodness-of-Fit Statistics (loglinear models algorithms)
Analysis of Dispersion (Logit Models Only) (loglinear models algorithms)
Residuals (loglinear models algorithms)
Generalized Residual (loglinear models algorithms)
Generalized Log-Odds Ratio (loglinear models algorithms)
Aggregated Data (loglinear models algorithms)
References (loglinear models algorithms)
Random Component (loglinear models algorithms)
Systematic Component (loglinear models algorithms)
Normalizing Constants (loglinear models algorithms)


Random Component (loglinear models algorithms)

The random component describes the joint distribution of the counts.

• The counts {n1j,...,nrj} at the jth setting of A have the multinomial (Nj,π1j,...,πrj) distribution.

• The counts nij and ni´j´ are independent if j≠j´.

• The joint probability distribution of {nij} is the product of these c independent multinomial distributions. The probability density function is

c∏j=1(Nj!∏ri=1nij!r∏i=1πij)

• The expected count is E (nij)=mij=Njπij.

• The covariance is

cov (nij,ni´j´)={
Njπij(δii´−πi´j) | if j=j´
0 | if j≠j´

where δab=1 if a=b and δab=0 if a≠b.

Related Topics

Model (loglinear models algorithms)
Systematic Component (loglinear models algorithms)
Normalizing Constants (loglinear models algorithms)


Systematic Component (loglinear models algorithms)

The systematic component describes the linkage function between the expected counts and the parameters. The expected counts are themselves functions of other parameters. Explicitly, for i=1...,r and j=1,...,c,

mij={
zijeαj+vij | if zij>0
0 | if zij≤0

where

vij=pΣk=1xijkβk

Related Topics

Model (loglinear models algorithms)
Random Component (loglinear models algorithms)
Normalizing Constants (loglinear models algorithms)


Normalizing Constants (loglinear models algorithms)

αj are not considered as parameters, but as normalizing constants.

αj=log(NjΣri=1zijevij)     j=1,...,c

Related Topics

Model (loglinear models algorithms)
Random Component (loglinear models algorithms)
Systematic Component (loglinear models algorithms)


Cell Structure Values (loglinear models algorithms)

The cell structure values play two roles in loglinear procedures, depending on their signs. If zij>0, it is a usual weight for the corresponding cell and log(zij) is sometimes called the offset. If zij≤0, a structural zero is imposed on the cell (B=i,A=j). Contingency tables containing at least one structural zero are called incomplete tables. If nij=0 but zij>0, the cell (B=i,A=j) contains a sampling zero. Although a structural zero is still considered part of the contingency table, it is not used in fitting the model. Cellwise statistics are not computed for structural zeros.

Related Topics

GENLOG Multinomial Loglinear and Logit Models Algorithms
Notation (loglinear models algorithms)
Model (loglinear models algorithms)
Maximum-Likelihood Estimation (loglinear models algorithms)
Newton-Raphson Method (loglinear models algorithms)
Estimated Normalizing Constants (loglinear models algorithms)
Estimated Cell Counts (loglinear models algorithms)
Goodness-of-Fit Statistics (loglinear models algorithms)
Analysis of Dispersion (Logit Models Only) (loglinear models algorithms)
Residuals (loglinear models algorithms)
Generalized Residual (loglinear models algorithms)
Generalized Log-Odds Ratio (loglinear models algorithms)
Aggregated Data (loglinear models algorithms)
References (loglinear models algorithms)


Maximum-Likelihood Estimation (loglinear models algorithms)

loglinear models algorithms,loglinear models algorithms,loglinear models algorithms
maximum likelihood estimation,maximum likelihood estimation,maximum likelihood estimation

The multinomial log-likelihood is

L(β)=L(β1,...,βp)= constant +cΣj=1rΣi=1nijlog﻿(mij)

Related Topics

GENLOG Multinomial Loglinear and Logit Models Algorithms
Notation (loglinear models algorithms)
Model (loglinear models algorithms)
Cell Structure Values (loglinear models algorithms)
Newton-Raphson Method (loglinear models algorithms)
Estimated Normalizing Constants (loglinear models algorithms)
Estimated Cell Counts (loglinear models algorithms)
Goodness-of-Fit Statistics (loglinear models algorithms)
Analysis of Dispersion (Logit Models Only) (loglinear models algorithms)
Residuals (loglinear models algorithms)
Generalized Residual (loglinear models algorithms)
Generalized Log-Odds Ratio (loglinear models algorithms)
Aggregated Data (loglinear models algorithms)
References (loglinear models algorithms)
Likelihood Equations (loglinear models algorithms)
Hessian Matrix (loglinear models algorithms)


Likelihood Equations (loglinear models algorithms)

It can be shown that:

∂L∂βk=cΣj=1rΣi=1(nij−mij)xijk for k=1,...,p

Let g(β)=(g1(β),...,gp(β))´ be the (p+1) gradient vector with

gk(β)=∂L∂βk

The maximum-likelihood estimates
^
β
=(
^
β
1,...,
^
β
p)t are regarded as a solution to the vector of likelihood equations:

g(β)=0

Related Topics

Maximum-Likelihood Estimation (loglinear models algorithms)
Hessian Matrix (loglinear models algorithms)


Hessian Matrix (loglinear models algorithms)

The likelihood equations are nonlinear functions of β. Solving them for
^
β
requires an iterative method. The Newton-Raphson method is used. It can be shown that

∂2L∂βk∂βt=−cΣj=1rΣi=1mij(xijk−θjk)(xijl−θjl)

where

θjk=1NjrΣi=1mijxijkj=1,...,c and k=1,...,p

Let H(β) be the p×p information matrix, where −H(β) is the Hessian matrix of the log-likelihood. The elements of H(β) are

hkl(β)=−∂2L∂βk∂βlk=1,...,p and l=1,...,p

Note:H(β) is a symmetric positive-definite matrix. The asymptotic covariance matrix of
^
β
is estimated by H−1(β).

Related Topics

Maximum-Likelihood Estimation (loglinear models algorithms)
Likelihood Equations (loglinear models algorithms)


Newton-Raphson Method (loglinear models algorithms)

Let β(s) denote the sth approximation for the solution. By the Newton-Raphson method,

β(s+1)=β(s)+H−1(β(s))g(β(s))

Define q(β)=H(β)β+g(β). The kth element of q(β) is

qk(β)=cΣj=1rΣi=1ηij(xijk−θjk)

where

ηij={
mijvij+(nij−mij) | if zij>0 and mij>0
0 | otherwise

Then

H(β(s))β(s+1)=q(β(s))

Thus, given β(s), the (s+1)th approximation β(s+1) is found by solving this system of equations.

Related Topics

GENLOG Multinomial Loglinear and Logit Models Algorithms
Notation (loglinear models algorithms)
Model (loglinear models algorithms)
Cell Structure Values (loglinear models algorithms)
Maximum-Likelihood Estimation (loglinear models algorithms)
Estimated Normalizing Constants (loglinear models algorithms)
Estimated Cell Counts (loglinear models algorithms)
Goodness-of-Fit Statistics (loglinear models algorithms)
Analysis of Dispersion (Logit Models Only) (loglinear models algorithms)
Residuals (loglinear models algorithms)
Generalized Residual (loglinear models algorithms)
Generalized Log-Odds Ratio (loglinear models algorithms)
Aggregated Data (loglinear models algorithms)
References (loglinear models algorithms)
Initial Values (loglinear models algorithms)
Stopping Criteria (loglinear models algorithms)
Algorithm (loglinear models algorithms)


Initial Values (loglinear models algorithms)

β(0), which corresponds to a saturated mode, is used as the initial value for β. Then the initial estimates for the expected cell counts are

m(0)ij={
nij+Δ | if zij>0
0 | if zij≤0

where Δ≥0 is a constant.

Note: For saturated models, Δ is added to nij if zij>0. This is done to avoid numerical problems in case some observed counts are 0. We advise users to set Δ to 0 whenever all observed counts (other than structural zeros) are positive.

The initial values for other quantities are

θ(0)jk=1NjrΣi=1m(0)ijxijk

and

η(0)ij={
m(0)ijlog(m(0)ij/zij)+(nij−m(0)ij) | if zij>0 and m(0)ij>0
0 | otherwise

Related Topics

Newton-Raphson Method (loglinear models algorithms)
Stopping Criteria (loglinear models algorithms)
Algorithm (loglinear models algorithms)


Stopping Criteria (loglinear models algorithms)

The following conditions are checked for convergence:

1. max i,j(|m(s+1)ij−m(s)ij|/m(s)ij)<ε provided that mij>0

2. max i,j(|m(s+1)ij−m(s)ij|)<ε

3.
√ (Σpk=1g2k(
^
β
))/p
<ε

The iteration is said to be converged if either conditions 1 and 3 or conditions 2 and 3 are satisfied. If p=0, then condition 3 will be automatically satisfied. The iteration is said to be not converged if neither pair of conditions is satisfied within the maximum number of iterations.

Related Topics

Newton-Raphson Method (loglinear models algorithms)
Initial Values (loglinear models algorithms)
Algorithm (loglinear models algorithms)


Algorithm (loglinear models algorithms)

The iteration process uses the following steps:

1. Calculate m(0)ij , θ(0)jk , and n(0)ij .

2. Set s=0.

3. Calculate H(β(s)) evaluated at mij=m(s)ij; calculate q(β(s)) evaluated at nij=n(s)ij.

4. Solve for β(s+1) .

5. Calculate v(s+1)ij=Σpk=1xijkβ(s+1)k and

m(s+1)ij={
Nj(zijev(s+1)ij/(Σrt=1ztjev(s+1)ij)) | if zij>0
0 | if zij≤0

6. Check whether the stopping criteria are satisfied. If yes, stop iteration and declare convergence. Otherwise continue.

7. Increase s by 1 and check whether the maximum iteration has been reached. If yes, stop iteration and declare the process not converged. Otherwise repeat steps 3-7.

Related Topics

Newton-Raphson Method (loglinear models algorithms)
Initial Values (loglinear models algorithms)
Stopping Criteria (loglinear models algorithms)


Estimated Normalizing Constants (loglinear models algorithms)

The maximum-likelihood estimate for αj is

^
α
j=log(NjΣri=1zije
^
v
ij)     j=1,...,c

where

^
v
ij=pΣk=1xijk
^
β
k

Related Topics

GENLOG Multinomial Loglinear and Logit Models Algorithms
Notation (loglinear models algorithms)
Model (loglinear models algorithms)
Cell Structure Values (loglinear models algorithms)
Maximum-Likelihood Estimation (loglinear models algorithms)
Newton-Raphson Method (loglinear models algorithms)
Estimated Cell Counts (loglinear models algorithms)
Goodness-of-Fit Statistics (loglinear models algorithms)
Analysis of Dispersion (Logit Models Only) (loglinear models algorithms)
Residuals (loglinear models algorithms)
Generalized Residual (loglinear models algorithms)
Generalized Log-Odds Ratio (loglinear models algorithms)
Aggregated Data (loglinear models algorithms)
References (loglinear models algorithms)


Estimated Cell Counts (loglinear models algorithms)

The estimated expected count is

^
m
ij={
Nj(zije
^
v
ij/(Σrt=1ztje
^
v
tj)) 		if zij>0
0 if zij≤0

Related Topics

GENLOG Multinomial Loglinear and Logit Models Algorithms
Notation (loglinear models algorithms)
Model (loglinear models algorithms)
Cell Structure Values (loglinear models algorithms)
Maximum-Likelihood Estimation (loglinear models algorithms)
Newton-Raphson Method (loglinear models algorithms)
Estimated Normalizing Constants (loglinear models algorithms)
Goodness-of-Fit Statistics (loglinear models algorithms)
Analysis of Dispersion (Logit Models Only) (loglinear models algorithms)
Residuals (loglinear models algorithms)
Generalized Residual (loglinear models algorithms)
Generalized Log-Odds Ratio (loglinear models algorithms)
Aggregated Data (loglinear models algorithms)
References (loglinear models algorithms)


Goodness-of-Fit Statistics (loglinear models algorithms)

goodness of fit,goodness of fit,goodness of fit
loglinear models algorithms,loglinear models algorithms,loglinear models algorithms

The Pearson chi-square statistic is

X2=cΣj=1rΣi=1X2ij

where

X2ij={
(nij−
^
m
ij)2/
^
m
ij 		if zij>0,nij>0, and
^
m
ij>0
SYSMIS if zij>0, nij>0, and
^
m
ij=0
0 if zij≤0 or nij=
^
m
ij

If any X2ij is system missing, then X2 is also system missing.

The likelihood-ratio chi-square statistic is

G2=2cΣj=1rΣi=1X2ij

where

G2ij={
nij(log(nij/
^
m
ij)) 		if zij>0, nij>0 and
^
m
ij>0
SYSMIS if zij>0, nij>0 and
^
m
ij=0
0 if zij>0, nij=0, and
^
m
ij≥0;
zij≤0 or nij=
^
m
ij

If any G2ij is system missing, then G2 is also system missing.

Related Topics

GENLOG Multinomial Loglinear and Logit Models Algorithms
Notation (loglinear models algorithms)
Model (loglinear models algorithms)
Cell Structure Values (loglinear models algorithms)
Maximum-Likelihood Estimation (loglinear models algorithms)
Newton-Raphson Method (loglinear models algorithms)
Estimated Normalizing Constants (loglinear models algorithms)
Estimated Cell Counts (loglinear models algorithms)
Analysis of Dispersion (Logit Models Only) (loglinear models algorithms)
Residuals (loglinear models algorithms)
Generalized Residual (loglinear models algorithms)
Generalized Log-Odds Ratio (loglinear models algorithms)
Aggregated Data (loglinear models algorithms)
References (loglinear models algorithms)
Degrees of Freedom (loglinear models algorithms)
Significance Level (loglinear models algorithms)


Degrees of Freedom (loglinear models algorithms)

The degrees of freedom for each statistic is defined as a=c(r−1)−p−E, where E is the number of cells with zij≤0 or
^
m
ij=0.

Related Topics

Goodness-of-Fit Statistics (loglinear models algorithms)
Significance Level (loglinear models algorithms)


Significance Level (loglinear models algorithms)

The significance level (or the p value) for the Pearson chi-square statistic is Prob (χ 2 a>X2) and that for the likelihood-ratio chi-square statistic is Prob (χ 2 a>G2). In both cases, χ2a is the central chi-square distribution with a degrees of freedom.

Related Topics

Goodness-of-Fit Statistics (loglinear models algorithms)
Degrees of Freedom (loglinear models algorithms)


Analysis of Dispersion (Logit Models Only) (loglinear models algorithms)

analysis of dispersion,analysis of dispersion,analysis of dispersion
loglinear models algorithms,loglinear models algorithms,loglinear models algorithms
loglinear models algorithms,loglinear models algorithms,loglinear models algorithms
analysis of dispersion,analysis of dispersion,analysis of dispersion

The analysis of dispersion is based on two types of dispersion: entropy and concentration. The following definitions are used:

S(A) | Dispersion due to the model
S(B|A) | Dispersion due to residuals
S(B) | Total dispersion
R=S(A)/S(B) | Measure of association

where S(A)+S(B|A)=S(B). Also define

^
π
i=Σcj=1
^
m
ijΣcj=1Nj

^
π
i|j=
^
m
ijNj

The bounds are 0≤
^
π
i≤1 and 0 ≤
^
π
i | j≤1.

Related Topics

GENLOG Multinomial Loglinear and Logit Models Algorithms
Notation (loglinear models algorithms)
Model (loglinear models algorithms)
Cell Structure Values (loglinear models algorithms)
Maximum-Likelihood Estimation (loglinear models algorithms)
Newton-Raphson Method (loglinear models algorithms)
Estimated Normalizing Constants (loglinear models algorithms)
Estimated Cell Counts (loglinear models algorithms)
Goodness-of-Fit Statistics (loglinear models algorithms)
Residuals (loglinear models algorithms)
Generalized Residual (loglinear models algorithms)
Generalized Log-Odds Ratio (loglinear models algorithms)
Aggregated Data (loglinear models algorithms)
References (loglinear models algorithms)
Entropy (loglinear models algorithms)
Concentration (loglinear models algorithms)
Degrees of Freedom (loglinear models algorithms)


Entropy (loglinear models algorithms)

entropy,entropy,entropy
loglinear models algorithms,loglinear models algorithms,loglinear models algorithms

S(B)=−NrΣi=1Si(B)

where

Si(B)={
^
π
ilog(πi) 		if 0<
^
π
i≤1
0 if
^
π
i=0

and

S(B |A)=−cΣj=1NjrΣi=1Sij(B |A)

where

Sij(B |A)={
^
π
i|jlog(
^
π
i|j) 		if 0<
^
π
i|j≤1
0 if
^
π
i|j=0

Related Topics

Analysis of Dispersion (Logit Models Only) (loglinear models algorithms)
Concentration (loglinear models algorithms)
Degrees of Freedom (loglinear models algorithms)


Concentration (loglinear models algorithms)

concentration,concentration,concentration
loglinear models algorithms,loglinear models algorithms,loglinear models algorithms

S(B)=N(1−rΣi=1
^
π
2i)

S(B |A)=cΣj=1Nj(1−rΣi=1
^
π
2i|j)

Related Topics

Analysis of Dispersion (Logit Models Only) (loglinear models algorithms)
Entropy (loglinear models algorithms)
Degrees of Freedom (loglinear models algorithms)


Degrees of Freedom (loglinear models algorithms)

Source | Measure | Degrees of Freedom
Model | S(A) | f(r−1)
Residual | S(B|A) | (N−f−1)(r−1)
Total | S(B) | (N−1)(r−1)

where f equals p minus the number of nonredundant columns (in the design matrix) associated with the main effects of the dependent factors.

Related Topics

Analysis of Dispersion (Logit Models Only) (loglinear models algorithms)
Entropy (loglinear models algorithms)
Concentration (loglinear models algorithms)


Residuals (loglinear models algorithms)

Goodness-of-fit statistics provide only broad summaries of how models fit data. The pattern of lack of fit is revealed in cell-by-cell comparisons of observed and fitted cell counts.

Related Topics

GENLOG Multinomial Loglinear and Logit Models Algorithms
Notation (loglinear models algorithms)
Model (loglinear models algorithms)
Cell Structure Values (loglinear models algorithms)
Maximum-Likelihood Estimation (loglinear models algorithms)
Newton-Raphson Method (loglinear models algorithms)
Estimated Normalizing Constants (loglinear models algorithms)
Estimated Cell Counts (loglinear models algorithms)
Goodness-of-Fit Statistics (loglinear models algorithms)
Analysis of Dispersion (Logit Models Only) (loglinear models algorithms)
Generalized Residual (loglinear models algorithms)
Generalized Log-Odds Ratio (loglinear models algorithms)
Aggregated Data (loglinear models algorithms)
References (loglinear models algorithms)
Simple Residuals (loglinear models algorithms)
Standardized Residuals (loglinear models algorithms)
Adjusted Residuals (loglinear models algorithms)
Deviance Residuals (loglinear models algorithms)


Simple Residuals (loglinear models algorithms)

simple residuals,simple residuals,simple residuals
loglinear models algorithms,loglinear models algorithms,loglinear models algorithms

The simple residual of the (i,j)th cell is

rij={
nij−
^
m
ij 		if zij>0
SYSMIS if zij≤0

Related Topics

Residuals (loglinear models algorithms)
Standardized Residuals (loglinear models algorithms)
Adjusted Residuals (loglinear models algorithms)
Deviance Residuals (loglinear models algorithms)


Standardized Residuals (loglinear models algorithms)

standardized residuals,standardized residuals,standardized residuals
loglinear models algorithms,loglinear models algorithms,loglinear models algorithms

The standardized residual for the (i,j)th cell is

rSij={
(nij−
^
m
ij)/
√
^
m
ij(1−
^
m
ij/Nj)
if zij>0 and 0<
^
m
ij<Nj
0 if zij>0 and nij=
^
m
ij
SYSMIS otherwise

The standardized residuals are also known as Pearson residuals even though Σcj=1Σri=1(rSij)2≠X2. Although the standardized residuals are asymptotically normal, their asymptotic variances are less than 1.

Related Topics

Residuals (loglinear models algorithms)
Simple Residuals (loglinear models algorithms)
Adjusted Residuals (loglinear models algorithms)
Deviance Residuals (loglinear models algorithms)


Adjusted Residuals (loglinear models algorithms)

adjusted residuals,adjusted residuals,adjusted residuals
loglinear models algorithms,loglinear models algorithms,loglinear models algorithms

The adjusted residual is the simple residual divided by its estimated standard error. Its definition and applications first appeared in Haberman (1973) and re-appeared on page 454 of Haberman (1979). This statistic for the (i,j)th cell is

rAij={
(nij−
^
m
ij)/
√ sij
if zij>0 and
^
m
ij>0
0 if zij>0 and nij=
^
m
ij
SYSMIS otherwise

where

sij=
^
m
ij(1−
^
m
ijNj−
^
m
ijpΣk=1pΣl=1(xijk−
^
θ
jk)(xijl−
^
θ
jl)hkl)

hkl is the (k,l)th element of H−1(
^
β
). The adjusted residuals are asymptotically standard normal.

Related Topics

Residuals (loglinear models algorithms)
Simple Residuals (loglinear models algorithms)
Standardized Residuals (loglinear models algorithms)
Deviance Residuals (loglinear models algorithms)


Deviance Residuals (loglinear models algorithms)

deviance residuals,deviance residuals,deviance residuals
loglinear models algorithms,loglinear models algorithms,loglinear models algorithms

Pierce and Schafer (1986) and McCullagh and Nelder (1989) define the signed square root of the individual contribution to the G2 statistic as the deviance residual. This statistic for the (i,j)th cell is

rDij= sign (nij−
^
m
ij)
√ dij

where

dij={
2(nij(log(nij/
^
m
ij))−(nij−
^
m
ij)) 		if zij>0,
^
m
ij>0, and nij>0
2
^
m
ij 		if zij>0,
^
m
ij≥0, and nij=0
0 if zij>0 and nij=
^
m
ij
SYSMIS otherwise

For multinomial sampling, the individual contribution to the G2 statistic is only 2nijlog(nij/
^
m
ij), but this is negative when nij<
^
m
ij. Thus, an extra term 2(nij−
^
m
ij) is added to it so that dij>0 for all i and j. However, we still have Σcj=1Σri=1(rDij)2=G2.

Related Topics

Residuals (loglinear models algorithms)
Simple Residuals (loglinear models algorithms)
Standardized Residuals (loglinear models algorithms)
Adjusted Residuals (loglinear models algorithms)


Generalized Residual (loglinear models algorithms)

generalized residuals,generalized residuals,generalized residuals
loglinear models algorithms,loglinear models algorithms,loglinear models algorithms

Consider a linear combination of the cell counts Σcj=1Σri=1dijnij, where dij are real numbers.

The estimated expected value is

cΣj=1rΣi=1dij
^
m
ij

The simple residual for this linear combination is

cΣj=1rΣi=1dij(nij−
^
m
ij)

The standardized residual for this linear combination is

Σcj=1Σri=1dij(nij−
^
m
ij)
√ Σcj=1(Σri=1d2ij
^
m
ij−(Σri=1dijmij)2/Nj)

The adjusted residual for this linear combination is, as given on page 420 of Haberman (1979),

Σcj=1Σri=1dij(nij−
^
m
ij)
√ V

where

V=cΣj=1rΣi=1d2ij
^
m
ij−cΣj=11Nj(rΣi=1dij
^
m
ij)2−pΣk=1pΣl=1fkflhkl

fk=cΣj=1rΣi=1dij
^
m
ij(xijk−θik)

Related Topics

GENLOG Multinomial Loglinear and Logit Models Algorithms
Notation (loglinear models algorithms)
Model (loglinear models algorithms)
Cell Structure Values (loglinear models algorithms)
Maximum-Likelihood Estimation (loglinear models algorithms)
Newton-Raphson Method (loglinear models algorithms)
Estimated Normalizing Constants (loglinear models algorithms)
Estimated Cell Counts (loglinear models algorithms)
Goodness-of-Fit Statistics (loglinear models algorithms)
Analysis of Dispersion (Logit Models Only) (loglinear models algorithms)
Residuals (loglinear models algorithms)
Generalized Log-Odds Ratio (loglinear models algorithms)
Aggregated Data (loglinear models algorithms)
References (loglinear models algorithms)


Generalized Log-Odds Ratio (loglinear models algorithms)

generalized log-odds ratio,generalized log-odds ratio,generalized log-odds ratio
loglinear models algorithms,loglinear models algorithms,loglinear models algorithms

Consider a linear combination of the natural logarithm of cell counts

cΣj=1rΣi=1dijlog(mij)

where dij are real numbers with the restriction

rΣi=1dij=0j=1,...,c

The linear combination is estimated by

cΣj=1rΣi=1dijlog(
^
m
ij)=cΣj=1rΣi=1dijlog(zij)+cΣj=1rΣi=1pΣk=1dijxijk
^
β
k

The variance of the estimate is

var (cΣj=1rΣi=1dijlog(
^
m
ij))=pΣk=1pΣl=1wkwlhkl

where

wk=cΣj=1rΣi=1dijxijkk=1,...,p

Related Topics

GENLOG Multinomial Loglinear and Logit Models Algorithms
Notation (loglinear models algorithms)
Model (loglinear models algorithms)
Cell Structure Values (loglinear models algorithms)
Maximum-Likelihood Estimation (loglinear models algorithms)
Newton-Raphson Method (loglinear models algorithms)
Estimated Normalizing Constants (loglinear models algorithms)
Estimated Cell Counts (loglinear models algorithms)
Goodness-of-Fit Statistics (loglinear models algorithms)
Analysis of Dispersion (Logit Models Only) (loglinear models algorithms)
Residuals (loglinear models algorithms)
Generalized Residual (loglinear models algorithms)
Aggregated Data (loglinear models algorithms)
References (loglinear models algorithms)
Wald Statistic (loglinear models algorithms)
Asymptotic Confidence Interval (loglinear models algorithms)


Wald Statistic (loglinear models algorithms)

The null hypothesis is

H0:cΣj=1rΣi=1dijlog(mij)=0

The Wald statistic is

W=(Σcj=1Σri=1dijlog(
^
m
ij))2Σpk=1Σpl=1wkwlhkl

Under H0, W asymptotically distributes as a chi-square distribution with 1 degree of freedom. The significance level is Prob (χ 2 1 ≥W). Note:W will be system missing if the variance of the estimate is 0.

Related Topics

Generalized Log-Odds Ratio (loglinear models algorithms)
Asymptotic Confidence Interval (loglinear models algorithms)


Asymptotic Confidence Interval (loglinear models algorithms)

The asymptotic (1−α)×100% confidence interval is

cΣj=1rΣi=1dijlog(
^
m
ij)±zα/2
√ pΣk=1pΣl=1wkwlhkl

where zα/2 is the upper α/2 point of the standard normal distribution. The default value of α is 0.05.

Related Topics

Generalized Log-Odds Ratio (loglinear models algorithms)
Wald Statistic (loglinear models algorithms)


Aggregated Data (loglinear models algorithms)

This section shows how data are aggregated for a multinomial distribution. The following notation is used in this section:

vij | Number of cases for B=i(i=1,...,r) and A=j(j=1,...,c)
nijs | sth caseweight for B=i and A=j(s=1,...,vi)
xijs | Covariate
zijs | Cell weight
cijs | GRESID coefficient
eijs | GLOR coefficient
v+ij | Number of positive zijs (cell weights) for 1≤s≤vij

The cell count is

nij={
Σ*1≤s≤vijn+ijs | if v+ij>0
0 | if vij=0 or v+ij=0

where

n+ijs={
nijs | if nijs>0 and zijs>0
0 | if nijs≤0 and zijs>0

and Σ*1≤s≤vij means summation over the range of s with the terms zijs>0.

The cell weight value is

zij={
Σ*1≤s≤vijn+ijszijs/nij | if nij>0 and v+ij>0
Σ*1≤s≤vijzijs/v+ij | if nij=0 and v+ij>0
0 | if v+ij=0
1 | if vij=0

If no variable is specified as the cell weight variable, then all cases have unit cell weights by default.

The cell covariate value is

xij={
Σ*1≤s≤vijn+ijsxijs/nij | if nij>0 and vij>0
Σ*1≤s≤vijxijs/v+ij | if nij=0 and v+ij>0
0 | if v+ij=0 or vij=0

The cell GRESID coefficient is

cij={
Σ*1≤s≤vijn+ijscijs/nij | if nij>0 and vij>0
Σ*1≤s≤vijcijs/v+ij | if nij=0 and v+ij>0
0 | if v+ij or vij=0

There are no defaults for the GRESID coefficients.

The cell GLOR coefficient is

eij={
Σ*1≤s≤vijn+ijseijs/nij | if nij>0 and vij>0
Σ*1≤s≤vijeijs/v+ij | if nij=0 and v+ij>0
0 | if v+ij=0 or vij=0

There are no defaults for the GLOR coefficients.

Related Topics

GENLOG Multinomial Loglinear and Logit Models Algorithms
Notation (loglinear models algorithms)
Model (loglinear models algorithms)
Cell Structure Values (loglinear models algorithms)
Maximum-Likelihood Estimation (loglinear models algorithms)
Newton-Raphson Method (loglinear models algorithms)
Estimated Normalizing Constants (loglinear models algorithms)
Estimated Cell Counts (loglinear models algorithms)
Goodness-of-Fit Statistics (loglinear models algorithms)
Analysis of Dispersion (Logit Models Only) (loglinear models algorithms)
Residuals (loglinear models algorithms)
Generalized Residual (loglinear models algorithms)
Generalized Log-Odds Ratio (loglinear models algorithms)
References (loglinear models algorithms)


References (loglinear models algorithms)

loglinear models algorithms,loglinear models algorithms,loglinear models algorithms
references,references,references

Agresti, A. 2002. Categorical Data Analysis, 2nd ed. New York: John Wiley and Sons.

Christensen, R. 1990. Log-linear models. New York: Springer-Verlag.

Haberman, S. J. 1973. The analysis of residuals in cross-classified tables. Biometrics, 29, 205-220.

Haberman, S. J. 1978. Analysis of qualitative data. London: Academic Press.

McCullagh, P., and J. A. Nelder. 1989. Generalized Linear Models, 2nd ed. London: Chapman & Hall.

Pierce, D. A., and D. W. Schafer. 1986. Residuals in generalized linear models. Journal of the American Statistical Association, 81, 977-986.

Related Topics

GENLOG Multinomial Loglinear and Logit Models Algorithms
Notation (loglinear models algorithms)
Model (loglinear models algorithms)
Cell Structure Values (loglinear models algorithms)
Maximum-Likelihood Estimation (loglinear models algorithms)
Newton-Raphson Method (loglinear models algorithms)
Estimated Normalizing Constants (loglinear models algorithms)
Estimated Cell Counts (loglinear models algorithms)
Goodness-of-Fit Statistics (loglinear models algorithms)
Analysis of Dispersion (Logit Models Only) (loglinear models algorithms)
Residuals (loglinear models algorithms)
Generalized Residual (loglinear models algorithms)
Generalized Log-Odds Ratio (loglinear models algorithms)
Aggregated Data (loglinear models algorithms)


GENLOG Poisson Loglinear Model Algorithms

GENLOG (command),GENLOG (command),GENLOG (command)
algorithms,algorithms,algorithms
General Loglinear Analysis,General Loglinear Analysis,General Loglinear Analysis
algorithms,algorithms,algorithms
poisson loglinear models algorithms,poisson loglinear models algorithms,poisson loglinear models algorithms

This chapter describes the algorithm to calculate maximum-likelihood estimates for the Poisson loglinear model. This algorithm is applicable only to aggregated data. See Aggregated Data (loglinear models algorithms)for producing aggregated data.

Related Topics

Notation (poisson loglinear models algorithms)
Model (poisson loglinear models algorithms)
Cell Structure Values (poisson loglinear models algorithms)
Maximum-Likelihood Estimation (poisson loglinear models algorithms)
Newton-Raphson Method (poisson loglinear models algorithms)
Estimated Cell Counts (poisson loglinear models algorithms)
Goodness-of-Fit Statistics (poisson loglinear models algorithms)
Residuals (poisson loglinear models algorithms)
Generalized Residual (poisson loglinear models algorithms)
Generalized Log-Odds Ratio (poisson loglinear models algorithms)
Aggregated Data (Poisson) (poisson loglinear models algorithms)
References (poisson loglinear models algorithms)


Notation (poisson loglinear models algorithms)

poisson loglinear models algorithms,poisson loglinear models algorithms,poisson loglinear models algorithms
notation,notation,notation

The following notation is used throughout this chapter unless otherwise stated:

B | Generic categorical dependent (response) variable. Its categories are indexed by an array of integers.
r | Number of categories of B. r≥1
p | Number of nonredundant (nonaliased) parameters.
i | Generic index for the category of B. i=1,...,r
k | Generic index for the parameters. k=0,...,p
ni | Observed count in the ith response of B. nij≥0
N | Total observed count, equal to rΣi=1ni. N>0
mi | Expected count. mi>0
zi | Cell structure value.
βk | The kth nonredundant parameter.
β | Vector of (β0,β1,...,βp)´
xik | An element in the ith row and the kth column of the design matrix.

• Because of the Poisson distribution assumptions, the logit model is not applicable for a Poisson distribution.

• The Poisson distribution is available in GENLOG only.

Related Topics

GENLOG Poisson Loglinear Model Algorithms
Model (poisson loglinear models algorithms)
Cell Structure Values (poisson loglinear models algorithms)
Maximum-Likelihood Estimation (poisson loglinear models algorithms)
Newton-Raphson Method (poisson loglinear models algorithms)
Estimated Cell Counts (poisson loglinear models algorithms)
Goodness-of-Fit Statistics (poisson loglinear models algorithms)
Residuals (poisson loglinear models algorithms)
Generalized Residual (poisson loglinear models algorithms)
Generalized Log-Odds Ratio (poisson loglinear models algorithms)
Aggregated Data (Poisson) (poisson loglinear models algorithms)
References (poisson loglinear models algorithms)


Model (poisson loglinear models algorithms)

poisson loglinear models algorithms,poisson loglinear models algorithms,poisson loglinear models algorithms
model,model,model

There are two components in a loglinear model: the random component and the systematic component.

Related Topics

GENLOG Poisson Loglinear Model Algorithms
Notation (poisson loglinear models algorithms)
Cell Structure Values (poisson loglinear models algorithms)
Maximum-Likelihood Estimation (poisson loglinear models algorithms)
Newton-Raphson Method (poisson loglinear models algorithms)
Estimated Cell Counts (poisson loglinear models algorithms)
Goodness-of-Fit Statistics (poisson loglinear models algorithms)
Residuals (poisson loglinear models algorithms)
Generalized Residual (poisson loglinear models algorithms)
Generalized Log-Odds Ratio (poisson loglinear models algorithms)
Aggregated Data (Poisson) (poisson loglinear models algorithms)
References (poisson loglinear models algorithms)
Random Component (poisson loglinear models algorithms)
Systematic Component (poisson loglinear models algorithms)


Random Component (poisson loglinear models algorithms)

The random component describes the joint distribution of the counts.

• The count {ni} has a Poisson distribution with parameter mi.

• The counts ni and n´i are independent if i≠i´.

• The joint probability distribution of {ni} is the product of these r independent Poisson distributions. The probability density function is

r∏i=1mniie−mini!

• The expected count is E (ni)=mi.

• The covariance is

cov (ni,n´i)={
mi | if i=i´
0 | if i≠i´

Related Topics

Model (poisson loglinear models algorithms)
Systematic Component (poisson loglinear models algorithms)


Systematic Component (poisson loglinear models algorithms)

The systematic component describes the linkage function between the expected counts and the parameters. The expected counts are themselves functions of parameters. For i=1,...,r,

mi={
zieβ0+vi | if zi>0
0 | if zi≤0

where

vi=pΣk=1xikβk

Since there are no constraints on the observed counts, β0 is a free parameter in a Poisson loglinear model.

Related Topics

Model (poisson loglinear models algorithms)
Random Component (poisson loglinear models algorithms)


Cell Structure Values (poisson loglinear models algorithms)

Cell structure values play two roles in loglinear procedures, depending on their signs. If zi>0, it is a usual weight for the corresponding cell and log﻿(zi) is sometimes called the offset. If zi≤0, a structural zero is imposed on the cell (B=i). Contingency tables containing at least one structural zero are called incomplete tables. If ni=0 but zi>0, the cell (B=i) contains a sampling zero. Although a structural zero is still considered part of the contingency table, it is not used in fitting the model. Cellwise statistics are not computed for structural zeros.

Related Topics

GENLOG Poisson Loglinear Model Algorithms
Notation (poisson loglinear models algorithms)
Model (poisson loglinear models algorithms)
Maximum-Likelihood Estimation (poisson loglinear models algorithms)
Newton-Raphson Method (poisson loglinear models algorithms)
Estimated Cell Counts (poisson loglinear models algorithms)
Goodness-of-Fit Statistics (poisson loglinear models algorithms)
Residuals (poisson loglinear models algorithms)
Generalized Residual (poisson loglinear models algorithms)
Generalized Log-Odds Ratio (poisson loglinear models algorithms)
Aggregated Data (Poisson) (poisson loglinear models algorithms)
References (poisson loglinear models algorithms)


Maximum-Likelihood Estimation (poisson loglinear models algorithms)

poisson loglinear models algorithms,poisson loglinear models algorithms,poisson loglinear models algorithms
maximum likelihood estimation,maximum likelihood estimation,maximum likelihood estimation

The multinomial log-likelihood is

L(β)=L(β0,...,βp)= constant +rΣi=1(nilog(mi)−mi)

Related Topics

GENLOG Poisson Loglinear Model Algorithms
Notation (poisson loglinear models algorithms)
Model (poisson loglinear models algorithms)
Cell Structure Values (poisson loglinear models algorithms)
Newton-Raphson Method (poisson loglinear models algorithms)
Estimated Cell Counts (poisson loglinear models algorithms)
Goodness-of-Fit Statistics (poisson loglinear models algorithms)
Residuals (poisson loglinear models algorithms)
Generalized Residual (poisson loglinear models algorithms)
Generalized Log-Odds Ratio (poisson loglinear models algorithms)
Aggregated Data (Poisson) (poisson loglinear models algorithms)
References (poisson loglinear models algorithms)
Likelihood Equations (poisson loglinear models algorithms)
Hessian Matrix (poisson loglinear models algorithms)


Likelihood Equations (poisson loglinear models algorithms)

It can be shown that

∂L∂β0=rΣi=1(ni−mi)

∂L∂βk=rΣi=1(ni−mi)xikk=1,...,p

Let g(β)=(g0(β),...,gp(β))´ be the (p+1)×1 gradient vector with

gk(β)=∂L∂βk

The maximum-likelihood estimates
^
β
=(
^
β
0,...,
^
β
p)´ are regarded as a solution to the vector of likelihood equations:

g(β)=0

Related Topics

Maximum-Likelihood Estimation (poisson loglinear models algorithms)
Hessian Matrix (poisson loglinear models algorithms)


Hessian Matrix (poisson loglinear models algorithms)

The likelihood equations are nonlinear functions of β. Solving them for
^
β
requires an iterative method. The Newton-Raphson method is used. It can be shown that

∂2L∂2β0=−rΣi=1mi
∂2L∂β0∂β1=−rΣi=1mixil
∂2L∂βk∂β0=−rΣi=1mixik
∂2L∂βk∂βl=−rΣi=1mixikxil

Let H(β) be the (p+1)×(p+1) information matrix, where −H(β) is the Hessian matrix of the log-likelihood. The elements of H(β) are

hkl(β)=∂2L∂βk∂βlk=0,...,p and l=1,...,p

Note:H(β) is a symmetric positive definite matrix. The asymptotic covariance matrix of
^
β
is estimated by −H(β).

Related Topics

Maximum-Likelihood Estimation (poisson loglinear models algorithms)
Likelihood Equations (poisson loglinear models algorithms)


Newton-Raphson Method (poisson loglinear models algorithms)

Let β(s) denote the sth approximation for the solution to the vector of likelihood equations. By the Newton-Raphson method,

β(s+1)=β(s)+H−1(β(s))g(β(s))

Define q(β)=H(β)β+g(β). The kth element of q(β) is

qk(β)=rΣi=1ηixik

where

ηi={
mivi+(ni−mi) | if zi>0 and mi>0
0 | otherwise

Then

H(β(s))β(s+1)=q(β(s))

Thus, given β(s), the (s+1)th approximation β(s+1) is found by solving this system of equations.

Related Topics

GENLOG Poisson Loglinear Model Algorithms
Notation (poisson loglinear models algorithms)
Model (poisson loglinear models algorithms)
Cell Structure Values (poisson loglinear models algorithms)
Maximum-Likelihood Estimation (poisson loglinear models algorithms)
Estimated Cell Counts (poisson loglinear models algorithms)
Goodness-of-Fit Statistics (poisson loglinear models algorithms)
Residuals (poisson loglinear models algorithms)
Generalized Residual (poisson loglinear models algorithms)
Generalized Log-Odds Ratio (poisson loglinear models algorithms)
Aggregated Data (Poisson) (poisson loglinear models algorithms)
References (poisson loglinear models algorithms)
Initial Values (poisson loglinear models algorithms)
Stopping Criteria (poisson loglinear models algorithms)
Algorithm (poisson loglinear models algorithms)


Initial Values (poisson loglinear models algorithms)

β(0), which corresponds to a saturated model, is used as the initial value for β. Then the initial estimates for the expected cell counts are

m(0)i={
ni+Δ | if zi>0
0 | if zi≤0

where Δ≥0 is a constant.

Note: For saturated models, Δ is added to ni if zi>0. This is done to avoid numerical problems in case some observed counts are 0. We advise users to set Δ to 0 whenever all observed counts (other than structural zeros) are positive.

The initial values for ηi are

η(0)i={
m(0)ilog(m(0)i/zi)+(ni−m(0)i) | if zi>0 and m(0)i>0
0 | otherwise

Related Topics

Newton-Raphson Method (poisson loglinear models algorithms)
Stopping Criteria (poisson loglinear models algorithms)
Algorithm (poisson loglinear models algorithms)


Stopping Criteria (poisson loglinear models algorithms)

The following conditions are checked for convergence:

1. max i(|m(s+1)i−m(s)i|/m(s)i)<ε provided that mi>0

2. max i(|m(s+1)i−m(s)i|)<ε

3.
√ (Σpk=1g2k(
^
β
))/p
<ε

The iteration is said to be converged if either conditions 1 and 3 or conditions 2 and 3 are satisfied. If p=0, then condition 3 will be automatically satisfied. The iteration is said to be not converged if neither pair of conditions is satisfied within the maximum number of iterations.

Related Topics

Newton-Raphson Method (poisson loglinear models algorithms)
Initial Values (poisson loglinear models algorithms)
Algorithm (poisson loglinear models algorithms)


Algorithm (poisson loglinear models algorithms)

The iteration process uses the following steps:

1. Calculate m(0)i and n(0)i .

2. Set s=0.

3. Calculate H(β(s)) evaluated at mi=m(s)i; calculate q(β(s)) evaluated at ηi=η(s)i.

4. Solve for β(s+1) .

5. Calculate v(s+1)i=Σpk=1xikβ(s+1)k and

6. m(s+1)i={
zieβ(s+1)0+v(s+1)i | if zi>0
0 | if zi≤0

7. Check whether the stopping criteria are satisfied. If yes, stop iteration and declare convergence. Otherwise continue.

8. Increase s by 1 and check whether the maximum iteration has been reached. If yes, stop iteration and declare the process not converged. Otherwise repeat steps 3-7.

Related Topics

Newton-Raphson Method (poisson loglinear models algorithms)
Initial Values (poisson loglinear models algorithms)
Stopping Criteria (poisson loglinear models algorithms)


Estimated Cell Counts (poisson loglinear models algorithms)

The estimated expected count is

^
m
i={
zie
^
β
0+
^
v
i 		if zi>0
0 if zi≤0

where

^
v
i=pΣk=1xik
^
β
k

Related Topics

GENLOG Poisson Loglinear Model Algorithms
Notation (poisson loglinear models algorithms)
Model (poisson loglinear models algorithms)
Cell Structure Values (poisson loglinear models algorithms)
Maximum-Likelihood Estimation (poisson loglinear models algorithms)
Newton-Raphson Method (poisson loglinear models algorithms)
Goodness-of-Fit Statistics (poisson loglinear models algorithms)
Residuals (poisson loglinear models algorithms)
Generalized Residual (poisson loglinear models algorithms)
Generalized Log-Odds Ratio (poisson loglinear models algorithms)
Aggregated Data (Poisson) (poisson loglinear models algorithms)
References (poisson loglinear models algorithms)


Goodness-of-Fit Statistics (poisson loglinear models algorithms)

goodness of fit,goodness of fit,goodness of fit
poisson loglinear models algorithms,poisson loglinear models algorithms,poisson loglinear models algorithms

The Pearson chi-square statistic is

X2=rΣi=1X2i

where

X2i={
(ni−
^
m
i)2/
^
m
i 		if zi>0, ni>0, and
^
m
i>0
SYSMIS if zi>0, ni>0, and
^
m
i=0
0 if zi≤0 or ni=
^
m
i

If any X2i is system missing, then X2 is also system missing.

The likelihood-ratio chi-square statistic is

G2=2rΣi=1G2i

where

G2i={
ni(log(ni/
^
m
i))−(ni−
^
m
i) 		if zi>0, ni>0, and
^
m
i>0
SYSMIS if zi>0, ni>0, and
^
m
i=0
^
m
i 		if zi>0, ni=0, and
^
m
i>0
0 if zi≤0 or ni=
^
m
i

If any G2i is system missing, then G2 is also system missing.

Related Topics

GENLOG Poisson Loglinear Model Algorithms
Notation (poisson loglinear models algorithms)
Model (poisson loglinear models algorithms)
Cell Structure Values (poisson loglinear models algorithms)
Maximum-Likelihood Estimation (poisson loglinear models algorithms)
Newton-Raphson Method (poisson loglinear models algorithms)
Estimated Cell Counts (poisson loglinear models algorithms)
Residuals (poisson loglinear models algorithms)
Generalized Residual (poisson loglinear models algorithms)
Generalized Log-Odds Ratio (poisson loglinear models algorithms)
Aggregated Data (Poisson) (poisson loglinear models algorithms)
References (poisson loglinear models algorithms)
Degrees of Freedom (poisson loglinear models algorithms)
Significance Level (poisson loglinear models algorithms)


Degrees of Freedom (poisson loglinear models algorithms)

The degrees of freedom for each statistic is defined as a=r−1−p−E, where E is the number of cells with zi≤0 or
^
m
i=0.

Related Topics

Goodness-of-Fit Statistics (poisson loglinear models algorithms)
Significance Level (poisson loglinear models algorithms)


Significance Level (poisson loglinear models algorithms)

The significance level (or the p value) for the Pearson chi-square statistic is Prob (χ 2 a>X2) and that for the likelihood-ratio chi-square statistic is Prob (χ 2 a>G2). In both cases, χ2a is the central chi-square distribution with a degrees of freedom.

Related Topics

Goodness-of-Fit Statistics (poisson loglinear models algorithms)
Degrees of Freedom (poisson loglinear models algorithms)


Residuals (poisson loglinear models algorithms)

Goodness-of-fit statistics provide only broad summaries of how models fit data. The pattern of lack of fit is revealed in cell-by-cell comparisons of observed and fitted cell counts.

Related Topics

GENLOG Poisson Loglinear Model Algorithms
Notation (poisson loglinear models algorithms)
Model (poisson loglinear models algorithms)
Cell Structure Values (poisson loglinear models algorithms)
Maximum-Likelihood Estimation (poisson loglinear models algorithms)
Newton-Raphson Method (poisson loglinear models algorithms)
Estimated Cell Counts (poisson loglinear models algorithms)
Goodness-of-Fit Statistics (poisson loglinear models algorithms)
Generalized Residual (poisson loglinear models algorithms)
Generalized Log-Odds Ratio (poisson loglinear models algorithms)
Aggregated Data (Poisson) (poisson loglinear models algorithms)
References (poisson loglinear models algorithms)
Simple Residuals (poisson loglinear models algorithms)
Standardized Residuals (poisson loglinear models algorithms)
Adjusted Residuals (poisson loglinear models algorithms)
Deviance Residuals (poisson loglinear models algorithms)


Simple Residuals (poisson loglinear models algorithms)

simple residuals,simple residuals,simple residuals
poisson loglinear models algorithms,poisson loglinear models algorithms,poisson loglinear models algorithms

The simple residual of the ith cell is

ri={
ni−
^
m
i 		if zi>0
SYSMIS if zi≤0

Related Topics

Residuals (poisson loglinear models algorithms)
Standardized Residuals (poisson loglinear models algorithms)
Adjusted Residuals (poisson loglinear models algorithms)
Deviance Residuals (poisson loglinear models algorithms)


Standardized Residuals (poisson loglinear models algorithms)

standardized residuals,standardized residuals,standardized residuals
poisson loglinear models algorithms,poisson loglinear models algorithms,poisson loglinear models algorithms

The standardized residual for the ith cell is

rSi={
(ni−
^
m
i)/
√
^
m
i
if zi>0 and 0<
^
m
i
0 if zi>0 and ni=
^
m
i
SYSMIS otherwise

The standardized residuals are also known as Pearson residuals because Σri=1(rSi)2=X2 when all zi>0. Although the standardized residuals are asymptotically normal, their asymptotic variances are less than 1.

Related Topics

Residuals (poisson loglinear models algorithms)
Simple Residuals (poisson loglinear models algorithms)
Adjusted Residuals (poisson loglinear models algorithms)
Deviance Residuals (poisson loglinear models algorithms)


Adjusted Residuals (poisson loglinear models algorithms)

adjusted residuals,adjusted residuals,adjusted residuals
poisson loglinear models algorithms,poisson loglinear models algorithms,poisson loglinear models algorithms

The adjusted residual is the simple residual divided by its estimated standard error. This statistic for the ith cell is

rAi={
(ni−
^
m
i)/
√
^
m
i(1−aii)
if zi>0,ni≠
^
m
i, and
^
m
i>0
0 if zi>0 and ni=
^
m
i
SYSMIS otherwise

where

aii=
^
m
i(h00+2pΣk=1xikhk0+pΣk=1pΣl=1xikxilhkl)

hkl is the (k,l)th element of H−1(
^
β
). The adjusted residuals are asymptotically standard normal.

Related Topics

Residuals (poisson loglinear models algorithms)
Simple Residuals (poisson loglinear models algorithms)
Standardized Residuals (poisson loglinear models algorithms)
Deviance Residuals (poisson loglinear models algorithms)


Deviance Residuals (poisson loglinear models algorithms)

deviance residuals,deviance residuals,deviance residuals
poisson loglinear models algorithms,poisson loglinear models algorithms,poisson loglinear models algorithms

Pierce and Schafer (1986) and McCullagh and Nelder (1989) define the signed square root of the individual contribution to the G2 statistic as the deviance residual. This statistic for the ith cell is

rDi= sign (ni−
^
m
i)
√ di

where

di={
2(ni(log(ni/
^
m
i))−(ni−
^
m
i)) 		if zi>0,
^
m
i>0, and ni>0
2
^
m
i 		if zi>0,
^
m
i≥0, and ni=0
0 if zi>0 and ni=
^
m
i
SYSMIS otherwise

When all zi>0, Σri=1(rDi)2=G2

Related Topics

Residuals (poisson loglinear models algorithms)
Simple Residuals (poisson loglinear models algorithms)
Standardized Residuals (poisson loglinear models algorithms)
Adjusted Residuals (poisson loglinear models algorithms)


Generalized Residual (poisson loglinear models algorithms)

generalized residuals,generalized residuals,generalized residuals
poisson loglinear models algorithms,poisson loglinear models algorithms,poisson loglinear models algorithms

Consider a linear combination of the cell counts Σri=1dini, where di are real numbers.

The estimated expected value is

rΣi=1di
^
m
i

The simple residual for this linear combination is

rΣi=1di(ni−
^
m
i)

The standardized residual for this linear combination is

Σri=1di(ni−
^
m
i)
√ Σri=1d2i
^
m
i

Using the results in Christensen (1990, p. 227), the adjusted residual for this linear combination is

Σri=1di(ni−
^
m
i)
√ V

where

V=rΣi=1rΣj=1didj
^
m
i(δij−aij)
=rΣi=1d2i
^
m
i−rΣi=1rΣj=1didjaij
^
m
i

where

aij=
^
m
i(h00+pΣk=1(xik+xjk)hk0+pΣk=1pΣl=1xikxjlhkl)

Related Topics

GENLOG Poisson Loglinear Model Algorithms
Notation (poisson loglinear models algorithms)
Model (poisson loglinear models algorithms)
Cell Structure Values (poisson loglinear models algorithms)
Maximum-Likelihood Estimation (poisson loglinear models algorithms)
Newton-Raphson Method (poisson loglinear models algorithms)
Estimated Cell Counts (poisson loglinear models algorithms)
Goodness-of-Fit Statistics (poisson loglinear models algorithms)
Residuals (poisson loglinear models algorithms)
Generalized Log-Odds Ratio (poisson loglinear models algorithms)
Aggregated Data (Poisson) (poisson loglinear models algorithms)
References (poisson loglinear models algorithms)


Generalized Log-Odds Ratio (poisson loglinear models algorithms)

generalized log-odds ratio,generalized log-odds ratio,generalized log-odds ratio
poisson loglinear models algorithms,poisson loglinear models algorithms,poisson loglinear models algorithms

Consider a linear combination of the natural logarithm of cell counts

rΣi=1dilog(mi)

where di are real numbers with the restriction

rΣi=1di=0

The linear combination is estimated by

rΣi=1dilog(
^
m
i)=rΣi=1djlog(zi)+rΣi=1pΣk=1dixik
^
β
k

The variance is

var (rΣi=1dilog(
^
m
i))=pΣk=1pΣl=1wkwlhkl

where

wk=rΣi=1dixikk=1,...,p

Related Topics

GENLOG Poisson Loglinear Model Algorithms
Notation (poisson loglinear models algorithms)
Model (poisson loglinear models algorithms)
Cell Structure Values (poisson loglinear models algorithms)
Maximum-Likelihood Estimation (poisson loglinear models algorithms)
Newton-Raphson Method (poisson loglinear models algorithms)
Estimated Cell Counts (poisson loglinear models algorithms)
Goodness-of-Fit Statistics (poisson loglinear models algorithms)
Residuals (poisson loglinear models algorithms)
Generalized Residual (poisson loglinear models algorithms)
Aggregated Data (Poisson) (poisson loglinear models algorithms)
References (poisson loglinear models algorithms)
Wald Statistic (poisson loglinear models algorithms)
Asymptotic Confidence Interval (poisson loglinear models algorithms)


Wald Statistic (poisson loglinear models algorithms)

The null hypothesis is

H0:rΣi=1dilog(mi)=0

The Wald statistic is

W=(Σri=1dilog(
^
m
i))2Σpk=1Σpl=1wkwlhkl

Under the null hypothesis, the statistic has asymptotic chi-square distribution with 1 degree of freedom. The significance level is Prob (χ 2 1 ≥W). Note:W will be system missing if the variance is 0.

Related Topics

Generalized Log-Odds Ratio (poisson loglinear models algorithms)
Asymptotic Confidence Interval (poisson loglinear models algorithms)


Asymptotic Confidence Interval (poisson loglinear models algorithms)

The asymptotic (1−α)×100% confidence interval is

rΣi=1dilog(
^
m
i)±zα/2
√ pΣk=1pΣl=1wkwlhkl

where zα/2 is the upper α/2 point of the standard normal distribution. The default value of α is 0.05.

Related Topics

Generalized Log-Odds Ratio (poisson loglinear models algorithms)
Wald Statistic (poisson loglinear models algorithms)


Aggregated Data (Poisson) (poisson loglinear models algorithms)

This section shows how data are aggregated for a Poisson distribution. The following notation is used in this section:

vi | Number of cases for B=i (i=1,...,r)
nis | sth caseweight for B=i (s=1,...,vi)
xis | Covariate
zis | Cell weight
cis | GRESID coefficient
eis | GLOR coefficient
v+i | Number of positive zis (cell weights) for 1≤s≤vi

The cell count is

ni={
Σ*1≤s≤vin+is | if v+i>0
0 | if vi=0 or v+i=0

where

n+is={
nis | if nis>0 and zis>0
0 | if nis≤0 and zis>0

and Σ*1≤s≤vi means summation over the range of s with the terms zis>0.

The cell weight value is

zi={
Σ*1≤s≤vin+iszis/nij | if ni>0 and v+i>0
Σ*1≤s≤vizis/v+i | if ni=0 and v+i>0
0 | if v+i=0
1 | if vi=0

If no variable is specified as the cell weight variable, then all cases have unit cell weights by default.

The cell covariate value is

xij={
Σ*1≤s≤vin+isxis/ni | if ni>0 and vi>0
Σ*1≤s≤vixis/v+i | if ni=0 and v+i>0
0 | if v+i=0 or vi=0

The cell GRESID coefficient is

ci={
Σ*1≤s≤vin+iscis/ni | if ni>0 and vi>0
Σ*1≤s≤vicis/v+i | if ni=0 and v+i>0
0 | if v+i=0 or vi=0

There are no defaults for the GRESID coefficients.

The cell GLOR coefficient is

ei={
Σ*1≤s≤vin+iseis/ni | if ni>0 and vi>0
Σ*1≤s≤vieis/v+i | if ni=0 and v+i>0
0 | if v+i=0 or vi=0

There are no defaults for the GLOR coefficients.

Related Topics

GENLOG Poisson Loglinear Model Algorithms
Notation (poisson loglinear models algorithms)
Model (poisson loglinear models algorithms)
Cell Structure Values (poisson loglinear models algorithms)
Maximum-Likelihood Estimation (poisson loglinear models algorithms)
Newton-Raphson Method (poisson loglinear models algorithms)
Estimated Cell Counts (poisson loglinear models algorithms)
Goodness-of-Fit Statistics (poisson loglinear models algorithms)
Residuals (poisson loglinear models algorithms)
Generalized Residual (poisson loglinear models algorithms)
Generalized Log-Odds Ratio (poisson loglinear models algorithms)
References (poisson loglinear models algorithms)


References (poisson loglinear models algorithms)

poisson loglinear models algorithms,poisson loglinear models algorithms,poisson loglinear models algorithms
references,references,references

Agresti, A. 2002. Categorical Data Analysis, 2nd ed. New York: John Wiley and Sons.

Christensen, R. 1990. Log-linear models. New York: Springer-Verlag.

Haberman, S. J. 1973. The analysis of residuals in cross-classified tables. Biometrics, 29, 205-220.

McCullagh, P., and J. A. Nelder. 1989. Generalized Linear Models, 2nd ed. London: Chapman & Hall.

Pierce, D. A., and D. W. Schafer. 1986. Residuals in generalized linear models. Journal of the American Statistical Association, 81, 977-986.

Related Topics

GENLOG Poisson Loglinear Model Algorithms
Notation (poisson loglinear models algorithms)
Model (poisson loglinear models algorithms)
Cell Structure Values (poisson loglinear models algorithms)
Maximum-Likelihood Estimation (poisson loglinear models algorithms)
Newton-Raphson Method (poisson loglinear models algorithms)
Estimated Cell Counts (poisson loglinear models algorithms)
Goodness-of-Fit Statistics (poisson loglinear models algorithms)
Residuals (poisson loglinear models algorithms)
Generalized Residual (poisson loglinear models algorithms)
Generalized Log-Odds Ratio (poisson loglinear models algorithms)
Aggregated Data (Poisson) (poisson loglinear models algorithms)


GLM Algorithms

GLM (command),GLM (command),GLM (command)
algorithms,algorithms,algorithms
GLM Univariate,GLM Univariate,GLM Univariate
algorithms,algorithms,algorithms
GLM Multivariate,GLM Multivariate,GLM Multivariate
algorithms,algorithms,algorithms
GLM algorithms,GLM algorithms,GLM algorithms

GLM (general linear model) is a general procedure for analysis of variance and covariance, as well as regression. It can be used for both univariate, multivariate, and repeated measures designs. Algorithms that apply only to repeated measures are in Repeated Measures (GLM algorithms).

For information on post hoc tests, see Post Hoc Tests. For sums of squares, see Sums of Squares. For distribution functions, see Distribution and Special Functions.For Box’s M test, see Box's M Test.

Related Topics

Repeated Measures (GLM algorithms)
Notation (GLM algorithms)
Model (GLM algorithms)
Frequency Weight and Total Sample Size (GLM algorithms)
The Cross-Product and Sums-of-Squares Matrices (GLM algorithms)
Sweep Operation (GLM algorithms)
Residual Covariance Matrix (GLM algorithms)
Lack of Fit (GLM algorithms)
Parameter Estimates (GLM algorithms)
Estimated Marginal Means (GLM algorithms)
Saved Values (GLM algorithms)
Diagnostics (GLM algorithms)
Hypothesis Testing (GLM algorithms)
Bartlett's Test of Sphericity (GLM algorithms)
Custom Hypothesis Tests (GLM algorithms)
Univariate Mixed Model (GLM algorithms)
References (GLM algorithms)


Notation (GLM algorithms)

GLM algorithms,GLM algorithms,GLM algorithms
notation,notation,notation

The following notation is used throughout this chapter. Unless otherwise stated, all vectors are column vectors and all quantities are known.

n | Number of cases.
N | Effective sample size.
p | Number of parameters (including the constant, if it exists) in the model.
r | Number of dependent variables in the model.
Y | n×r matrix of dependent variables. The rows are the cases and the columns are the dependent variables. The ith row is y´i, i=1,...,n.
X | n×p design matrix. The rows are the cases and the columns are the parameters. The ith row is x´i, i=1,...,n.
rX | Number of nonredundant columns in the design matrix. Also the rank of the design matrix.
wi | Regression weight of the ith case.
fi | Frequency weight of the ith case.
B | unknown parameter matrix. The columns are the dependent variables. The jth column is bj, j=1,...,r.
Σ | r×r unknown common multiplier of the covariance matrix of any row of Y. The (i, j)th element is σij, i=1,...,r, j=1,...,r.

Related Topics

GLM Algorithms
Model (GLM algorithms)
Frequency Weight and Total Sample Size (GLM algorithms)
The Cross-Product and Sums-of-Squares Matrices (GLM algorithms)
Sweep Operation (GLM algorithms)
Residual Covariance Matrix (GLM algorithms)
Lack of Fit (GLM algorithms)
Parameter Estimates (GLM algorithms)
Estimated Marginal Means (GLM algorithms)
Saved Values (GLM algorithms)
Diagnostics (GLM algorithms)
Hypothesis Testing (GLM algorithms)
Bartlett's Test of Sphericity (GLM algorithms)
Custom Hypothesis Tests (GLM algorithms)
Univariate Mixed Model (GLM algorithms)
References (GLM algorithms)


Model (GLM algorithms)

GLM algorithms,GLM algorithms,GLM algorithms
model,model,model

The model is Y=XB and y´i is independently distributed as a p-dimensional normal distribution with mean x´iB and covariance matrix w−1iΣ. The ith case is ignored if wi≤0.

Related Topics

GLM Algorithms
Notation (GLM algorithms)
Frequency Weight and Total Sample Size (GLM algorithms)
The Cross-Product and Sums-of-Squares Matrices (GLM algorithms)
Sweep Operation (GLM algorithms)
Residual Covariance Matrix (GLM algorithms)
Lack of Fit (GLM algorithms)
Parameter Estimates (GLM algorithms)
Estimated Marginal Means (GLM algorithms)
Saved Values (GLM algorithms)
Diagnostics (GLM algorithms)
Hypothesis Testing (GLM algorithms)
Bartlett's Test of Sphericity (GLM algorithms)
Custom Hypothesis Tests (GLM algorithms)
Univariate Mixed Model (GLM algorithms)
References (GLM algorithms)


Frequency Weight and Total Sample Size (GLM algorithms)

The frequency weight fi is the number of replications represented by a case in PASW Statistics; therefore, the weight must be a non-negative integer. It is computed by rounding the value in the weight variable to the nearest integer. The total sample size is N=Σni=1fi I(wi>0), where I (wi>0)=1 if wi>0 and is equal to 0 otherwise.

Related Topics

GLM Algorithms
Notation (GLM algorithms)
Model (GLM algorithms)
The Cross-Product and Sums-of-Squares Matrices (GLM algorithms)
Sweep Operation (GLM algorithms)
Residual Covariance Matrix (GLM algorithms)
Lack of Fit (GLM algorithms)
Parameter Estimates (GLM algorithms)
Estimated Marginal Means (GLM algorithms)
Saved Values (GLM algorithms)
Diagnostics (GLM algorithms)
Hypothesis Testing (GLM algorithms)
Bartlett's Test of Sphericity (GLM algorithms)
Custom Hypothesis Tests (GLM algorithms)
Univariate Mixed Model (GLM algorithms)
References (GLM algorithms)


The Cross-Product and Sums-of-Squares Matrices (GLM algorithms)

To prepare for the SWEEP operation, an augmented row vector of length (p+r) is formed:

z´i=(x´i,y´i)

Then the (p+r)×(p+r) matrix is computed:

Z´WZ=Σni=1fiwiziz´i

This matrix is partitioned as

Z´WZ=(
X´WX | X´WY
Y´WX | Y´WY
)

The upper left p×p submatrix is X'WX and the lower right r×r submatrix is Y'WY.

Related Topics

GLM Algorithms
Notation (GLM algorithms)
Model (GLM algorithms)
Frequency Weight and Total Sample Size (GLM algorithms)
Sweep Operation (GLM algorithms)
Residual Covariance Matrix (GLM algorithms)
Lack of Fit (GLM algorithms)
Parameter Estimates (GLM algorithms)
Estimated Marginal Means (GLM algorithms)
Saved Values (GLM algorithms)
Diagnostics (GLM algorithms)
Hypothesis Testing (GLM algorithms)
Bartlett's Test of Sphericity (GLM algorithms)
Custom Hypothesis Tests (GLM algorithms)
Univariate Mixed Model (GLM algorithms)
References (GLM algorithms)


Sweep Operation (GLM algorithms)

Three important matrices, G,
^
B
, and S, are obtained by sweeping the Z'WZ matrix as follows:

1. Sweep sequentially the first p rows and the first p columns of Z'WZ, starting from the first row and the first column.

2. After the pth row and the pth column are swept, the resulting matrix is

(
−G
^
B
^
B
´ 		S
)

where G is a p×p symmetric g2 generalized inverse of X'WX,
^
B
is the p×r matrix of parameter estimates and S is the r×r symmetric matrix of sums of squares and cross products of residuals.

The SWEEP routine is adapted from Algorithm AS 178 by Clarke (1982) and Remarks R78 by Ridout and Cobby (1989).

Related Topics

GLM Algorithms
Notation (GLM algorithms)
Model (GLM algorithms)
Frequency Weight and Total Sample Size (GLM algorithms)
The Cross-Product and Sums-of-Squares Matrices (GLM algorithms)
Residual Covariance Matrix (GLM algorithms)
Lack of Fit (GLM algorithms)
Parameter Estimates (GLM algorithms)
Estimated Marginal Means (GLM algorithms)
Saved Values (GLM algorithms)
Diagnostics (GLM algorithms)
Hypothesis Testing (GLM algorithms)
Bartlett's Test of Sphericity (GLM algorithms)
Custom Hypothesis Tests (GLM algorithms)
Univariate Mixed Model (GLM algorithms)
References (GLM algorithms)


Residual Covariance Matrix (GLM algorithms)

The estimated r×r covariance matrix is
^
Σ
=S/(N−rX) provided rX<N. If rX=N, then
^
Σ
=0. If rX>N, then all elements of
^
Σ
are system missing. The residual degrees of freedom is N−rX. If rX>N, then the degrees of freedom is system missing.

Related Topics

GLM Algorithms
Notation (GLM algorithms)
Model (GLM algorithms)
Frequency Weight and Total Sample Size (GLM algorithms)
The Cross-Product and Sums-of-Squares Matrices (GLM algorithms)
Sweep Operation (GLM algorithms)
Lack of Fit (GLM algorithms)
Parameter Estimates (GLM algorithms)
Estimated Marginal Means (GLM algorithms)
Saved Values (GLM algorithms)
Diagnostics (GLM algorithms)
Hypothesis Testing (GLM algorithms)
Bartlett's Test of Sphericity (GLM algorithms)
Custom Hypothesis Tests (GLM algorithms)
Univariate Mixed Model (GLM algorithms)
References (GLM algorithms)


Lack of Fit (GLM algorithms)

Source of Variation Sum of Squares df
Lack of fit
nuΣi=1ni(yi−
^
y
i)2
nu−p
Pure error
nuΣi=1niΣj=1(yij−yi)2
N−nu

Where nu is the number of unique combinations of observed predictor values and ni is the number of cases with the ith combination.

Mean squares are calculated by dividing each sum of squares by its degrees of freedom.

The F ratio for testing lack of fit is the ratio of the Lack of fit mean squares to the Pure error mean squares.

The significance level is obtained from the F distribution with nu−p and N−nu degrees of freedom.

Related Topics

GLM Algorithms
Notation (GLM algorithms)
Model (GLM algorithms)
Frequency Weight and Total Sample Size (GLM algorithms)
The Cross-Product and Sums-of-Squares Matrices (GLM algorithms)
Sweep Operation (GLM algorithms)
Residual Covariance Matrix (GLM algorithms)
Parameter Estimates (GLM algorithms)
Estimated Marginal Means (GLM algorithms)
Saved Values (GLM algorithms)
Diagnostics (GLM algorithms)
Hypothesis Testing (GLM algorithms)
Bartlett's Test of Sphericity (GLM algorithms)
Custom Hypothesis Tests (GLM algorithms)
Univariate Mixed Model (GLM algorithms)
References (GLM algorithms)


Parameter Estimates (GLM algorithms)

GLM algorithms,GLM algorithms,GLM algorithms
parameter estimates,parameter estimates,parameter estimates

Let the elements of
^
Σ
be
^
σ
ij, the elements of G, gij, and the elements of
^
B
,
^
b
ij. Then var(
^
b
ij) is estimated by
^
σ
jj gii for i=1,...,p, j=1,...,r and cov(
^
b
ij,
^
b
rs) is estimated by
^
σ
js gir for i, r=1,...,p, j, s=1,...,r .

Related Topics

GLM Algorithms
Notation (GLM algorithms)
Model (GLM algorithms)
Frequency Weight and Total Sample Size (GLM algorithms)
The Cross-Product and Sums-of-Squares Matrices (GLM algorithms)
Sweep Operation (GLM algorithms)
Residual Covariance Matrix (GLM algorithms)
Lack of Fit (GLM algorithms)
Estimated Marginal Means (GLM algorithms)
Saved Values (GLM algorithms)
Diagnostics (GLM algorithms)
Hypothesis Testing (GLM algorithms)
Bartlett's Test of Sphericity (GLM algorithms)
Custom Hypothesis Tests (GLM algorithms)
Univariate Mixed Model (GLM algorithms)
References (GLM algorithms)
Standard Error of the Estimate (GLM algorithms)
The t Statistic (GLM algorithms)
Partial Eta Squared Statistic (GLM algorithms)
Noncentrality Parameter (GLM algorithms)
Observed Power (GLM algorithms)
Confidence Interval (GLM algorithms)
Correlation (GLM algorithms)


Standard Error of the Estimate (GLM algorithms)

se(
^
b
ij)=
√
^
σ
jj gii

When the ith parameter is redundant, the standard error is system missing.

Related Topics

Parameter Estimates (GLM algorithms)
The t Statistic (GLM algorithms)
Partial Eta Squared Statistic (GLM algorithms)
Noncentrality Parameter (GLM algorithms)
Observed Power (GLM algorithms)
Confidence Interval (GLM algorithms)
Correlation (GLM algorithms)


The t Statistic (GLM algorithms)

For testing H 0 : bij=0 versus H 1 :bij≠0, the t statistic is

t={
^
b
ij/ se (
^
b
ij) 		if ​the standard error is positive
SYSMIS otherwise

The significance value for this statistic is 2(1− CDF .T (| t |,N−rx)) where CDF.T is the PASW Statistics function for the cumulative t distribution.

Related Topics

Parameter Estimates (GLM algorithms)
Standard Error of the Estimate (GLM algorithms)
Partial Eta Squared Statistic (GLM algorithms)
Noncentrality Parameter (GLM algorithms)
Observed Power (GLM algorithms)
Confidence Interval (GLM algorithms)
Correlation (GLM algorithms)


Partial Eta Squared Statistic (GLM algorithms)

η2={
^
b
2ij/(
^
b
2ij+(N−rX)var(
^
b
ij)) 		if rX<N and the denominator is positive
1 | if rX=N but bij≠0
SYSMIS | otherwise

The value should be within 0≤η2≤1.

Related Topics

Parameter Estimates (GLM algorithms)
Standard Error of the Estimate (GLM algorithms)
The t Statistic (GLM algorithms)
Noncentrality Parameter (GLM algorithms)
Observed Power (GLM algorithms)
Confidence Interval (GLM algorithms)
Correlation (GLM algorithms)


Noncentrality Parameter (GLM algorithms)

c=|t|

Related Topics

Parameter Estimates (GLM algorithms)
Standard Error of the Estimate (GLM algorithms)
The t Statistic (GLM algorithms)
Partial Eta Squared Statistic (GLM algorithms)
Observed Power (GLM algorithms)
Confidence Interval (GLM algorithms)
Correlation (GLM algorithms)


Observed Power (GLM algorithms)

p={
1− NCDF .T (tc,N−rX,c)+ NCDF .T (−tc,N−rX,c) rX<N
SYSMIS
rX≥N,
or any arguments to NCDF .T
or IDF .T are SYSMIS

where tc= IDF .T (1−α/2,N−rX) and αis the user-specified chance of Type I error (0<α<1). NCDF.T and IDF.T are the PASW Statistics functions for the cumulative noncentral t distribution and for the inverse cumulative t distribution, respectively.

The default value is α=0.05. The observed power should be within 0≤p≤1.

Related Topics

Parameter Estimates (GLM algorithms)
Standard Error of the Estimate (GLM algorithms)
The t Statistic (GLM algorithms)
Partial Eta Squared Statistic (GLM algorithms)
Noncentrality Parameter (GLM algorithms)
Confidence Interval (GLM algorithms)
Correlation (GLM algorithms)


Confidence Interval (GLM algorithms)

For the p% level, the individual univariate confidence interval for the parameter is

^
b
ij±tα se(
^
b
ij)

where tα= IDF .T (0.5(1+p/100),N−rX) for i=1,...,n, j=1,...,r. The default value of p is 95 (0<p<100).

Related Topics

Parameter Estimates (GLM algorithms)
Standard Error of the Estimate (GLM algorithms)
The t Statistic (GLM algorithms)
Partial Eta Squared Statistic (GLM algorithms)
Noncentrality Parameter (GLM algorithms)
Observed Power (GLM algorithms)
Correlation (GLM algorithms)


Correlation (GLM algorithms)

corr (
^
b
ij,
^
b
rs)={
^
σ
js gir/(se(
^
b
ij)×se(
^
b
rs)) 		if the standard errors are positive
SYSMIS otherwise

for i, r=1,...,n, j, s=1,...,r.

Related Topics

Parameter Estimates (GLM algorithms)
Standard Error of the Estimate (GLM algorithms)
The t Statistic (GLM algorithms)
Partial Eta Squared Statistic (GLM algorithms)
Noncentrality Parameter (GLM algorithms)
Observed Power (GLM algorithms)
Confidence Interval (GLM algorithms)


Estimated Marginal Means (GLM algorithms)

GLM algorithms,GLM algorithms,GLM algorithms
estimated marginal means,estimated marginal means,estimated marginal means
estimated marginal means,estimated marginal means,estimated marginal means
GLM algorithms,GLM algorithms,GLM algorithms

Estimated marginal means (EMMEANS) are computed as the generic l´
^
B
m expression with appropriate l and m vectors. l is a column vector of length p and m is a column vector of length r. Since the l vector is chosen to be always estimable, the quantity l´
^
B
m is in fact the estimated modified marginal means (Searle, Speed, and Milliken, 1980). When covariates (or products of covariates) are present in the effects, the overall means of the covariates (or products of covariates) are used in the l matrix. Suppose X and Y are covariates and they appear as X*Y in an effect; then the mean of X*Y is used instead of the product of the mean of X and the mean of Y.

Related Topics

GLM Algorithms
Notation (GLM algorithms)
Model (GLM algorithms)
Frequency Weight and Total Sample Size (GLM algorithms)
The Cross-Product and Sums-of-Squares Matrices (GLM algorithms)
Sweep Operation (GLM algorithms)
Residual Covariance Matrix (GLM algorithms)
Lack of Fit (GLM algorithms)
Parameter Estimates (GLM algorithms)
Saved Values (GLM algorithms)
Diagnostics (GLM algorithms)
Hypothesis Testing (GLM algorithms)
Bartlett's Test of Sphericity (GLM algorithms)
Custom Hypothesis Tests (GLM algorithms)
Univariate Mixed Model (GLM algorithms)
References (GLM algorithms)
L Matrix (GLM algorithms)
M Matrix (GLM algorithms)
Standard Error (GLM algorithms)
Significance (GLM algorithms)
Pairwise Comparison (GLM algorithms)
Between-Subjects Factor (GLM algorithms)
Within-Subjects Factor (GLM algorithms)
Confidence Interval (GLM algorithms)


L Matrix (GLM algorithms)

For each level combination of the between subjects factors in TABLES, identify the nonmissing cases with positive caseweights and positive regression weights which are associated with the current level combination. Suppose the cases are classified by three between-subjects factors: A, B and C. Now A and B are specified in TABLES and the current level combination is A=1 and B=2. A case in the cell A=1, B=2, and C=3 is associated with the current level combination, whereas a case in the cell A=1, B=3 and C=3 is not. Compute the average of the design matrix rows corresponding to these cases.

If an effect contains a covariate, then its parameters which belong to the current level combination are equal to the mean of the covariate, and are equal to 0 otherwise. Using the above example, for effect A*X where X is a covariate, the parameter [A=1]*X belongs to the current level combination where the parameter [A=2]*X does not. If the effect contains a product of covariates, then the mean of the product is applied.

The result is the l vector for the current between-subjects factor level combination. When none of the between-subjects effects contain covariates, the vector always forms an estimable function. Otherwise, a non-estimable function may occur, depending on the data.

Related Topics

Estimated Marginal Means (GLM algorithms)
M Matrix (GLM algorithms)
Standard Error (GLM algorithms)
Significance (GLM algorithms)
Pairwise Comparison (GLM algorithms)
Between-Subjects Factor (GLM algorithms)
Within-Subjects Factor (GLM algorithms)
Confidence Interval (GLM algorithms)


M Matrix (GLM algorithms)

The M matrix is formed as a series of Kronecker products

M=IcA1 ... At

where

Ak={
Irk | if the k th within subjects factor is specified in TABLES
(1/rk)1rk | otherwise

with 1rk a column vector of length rk and all of its elements equal to 1.

If OVERALL or only between-subjects factors are specified in TABLES, then Ak=(1/rk)1rk for k=1,...,t.

The column for a particular within-subjects factor level combination, denoted by m, is extracted accordingly from this M matrix.

Related Topics

Estimated Marginal Means (GLM algorithms)
L Matrix (GLM algorithms)
Standard Error (GLM algorithms)
Significance (GLM algorithms)
Pairwise Comparison (GLM algorithms)
Between-Subjects Factor (GLM algorithms)
Within-Subjects Factor (GLM algorithms)
Confidence Interval (GLM algorithms)


Standard Error (GLM algorithms)

se(l´
^
B
m)={
√ (l´Gl)(m´
^
Σ
m)
if N−rX>0
SYSMIS otherwise

Since l are coefficients of an estimable function, the standard error is the same for any generalized inverse G.

Related Topics

Estimated Marginal Means (GLM algorithms)
L Matrix (GLM algorithms)
M Matrix (GLM algorithms)
Significance (GLM algorithms)
Pairwise Comparison (GLM algorithms)
Between-Subjects Factor (GLM algorithms)
Within-Subjects Factor (GLM algorithms)
Confidence Interval (GLM algorithms)


Significance (GLM algorithms)

The t statistic is

t={
l´
^
B
m/se(l´
^
B
m) 		if se(l´
^
B
m)>0
SYSMIS otherwise

If the t statistic is not system missing, then the significance is computed based on a t distribution with N−rX degrees of freedom.

Related Topics

Estimated Marginal Means (GLM algorithms)
L Matrix (GLM algorithms)
M Matrix (GLM algorithms)
Standard Error (GLM algorithms)
Pairwise Comparison (GLM algorithms)
Between-Subjects Factor (GLM algorithms)
Within-Subjects Factor (GLM algorithms)
Confidence Interval (GLM algorithms)


Pairwise Comparison (GLM algorithms)

The levels of a between-subjects or within-subjects factor can be compared pair-by-pair. For example, a factor with 3 levels produces 3 pairwise comparisons: 1 vs. 2, 1 vs. 3, and 2 vs. 3.

Related Topics

Estimated Marginal Means (GLM algorithms)
L Matrix (GLM algorithms)
M Matrix (GLM algorithms)
Standard Error (GLM algorithms)
Significance (GLM algorithms)
Between-Subjects Factor (GLM algorithms)
Within-Subjects Factor (GLM algorithms)
Confidence Interval (GLM algorithms)


Between-Subjects Factor (GLM algorithms)

Suppose the l vectors are indexed by the level of the between-subjects factor as li1,...,ib, is=1, ...,ns and s=1,...,b where ns is the number of levels of between-subjects factor s and b is the number of between-subjects factors specified inside TABLES. The difference in estimated marginal means of level is and level i´s of between-subjects factor s at fixed levels of other between-subjects factors is

(li1,...,is−1,is,is+1,...,ib−li1,...,is−1,i´s,is+1,...,ib)´
^
B
m for is,i´s=1, ...,ns;is≠i´s

The standard error of the difference is computed by substituting for l in (1): li1,...,is−1,is,is+1,...,ib−li1,...,is−1,i´s,is+1,...,ib.

Related Topics

Estimated Marginal Means (GLM algorithms)
L Matrix (GLM algorithms)
M Matrix (GLM algorithms)
Standard Error (GLM algorithms)
Significance (GLM algorithms)
Pairwise Comparison (GLM algorithms)
Within-Subjects Factor (GLM algorithms)
Confidence Interval (GLM algorithms)


Within-Subjects Factor (GLM algorithms)

Suppose the m vectors are indexed by level of the within-subjects factor as mj1,...,jw, js=1, ...,ns and s=1,...,w, where ns is the number of levels of within-subjects factor s and w is the number of within-subjects factors specified inside TABLES. The difference in estimated marginal means of level js and level j´s of within-subjects factor s at fixed levels of other within-subjects factors is

l´B (mj1,...,js−1,js,js+1,...,jb−mj1,...,js−1,j´s,js+1,...,jb) for js,j´s=1, ...,ns;js≠j´s

The standard error of the difference is computed by substituting for m in (1) mi1,...,is−1,is,is+1,...,ib−mi1,...,is−1,i´s,is+1,...,ib

Related Topics

Estimated Marginal Means (GLM algorithms)
L Matrix (GLM algorithms)
M Matrix (GLM algorithms)
Standard Error (GLM algorithms)
Significance (GLM algorithms)
Pairwise Comparison (GLM algorithms)
Between-Subjects Factor (GLM algorithms)
Confidence Interval (GLM algorithms)


Confidence Interval (GLM algorithms)

The (1−α)×100% confidence interval is:

l´
^
B
m±t1−α/2;N−rX×se(l´
^
B
m)

and t1−α/2;N−rX is the (1−α/2)×100% percentile of a t distribution with N−rX degrees of freedom. No confidence interval is computed if N−rX≤0.

Related Topics

Estimated Marginal Means (GLM algorithms)
L Matrix (GLM algorithms)
M Matrix (GLM algorithms)
Standard Error (GLM algorithms)
Significance (GLM algorithms)
Pairwise Comparison (GLM algorithms)
Between-Subjects Factor (GLM algorithms)
Within-Subjects Factor (GLM algorithms)


Saved Values (GLM algorithms)

Temporary variables can be added to the working data file. These include predicted values, residuals, and diagnostics.

Related Topics

GLM Algorithms
Notation (GLM algorithms)
Model (GLM algorithms)
Frequency Weight and Total Sample Size (GLM algorithms)
The Cross-Product and Sums-of-Squares Matrices (GLM algorithms)
Sweep Operation (GLM algorithms)
Residual Covariance Matrix (GLM algorithms)
Lack of Fit (GLM algorithms)
Parameter Estimates (GLM algorithms)
Estimated Marginal Means (GLM algorithms)
Diagnostics (GLM algorithms)
Hypothesis Testing (GLM algorithms)
Bartlett's Test of Sphericity (GLM algorithms)
Custom Hypothesis Tests (GLM algorithms)
Univariate Mixed Model (GLM algorithms)
References (GLM algorithms)
Predicted Values (GLM algorithms)
Residuals (GLM algorithms)
Deleted Residuals (PRESS Residuals) (GLM algorithms)
Standardized Residuals (GLM algorithms)
Studentized Residuals (GLM algorithms)


Predicted Values (GLM algorithms)

The n×r matrix of predicted values is
^
Y
=X
^
B
. The ith row of
^
Y
is
^
y
´i=x´i
^
B
, i=1,...,n. Let the elements of
^
Y
be
^
y
ij and the elements of XGX' be πij.

The standard error of
^
y
ij is

se(
^
y
ij)=
√
^
σ
jj πii
for i=1,...,n, j=1,...,r

The weighted predicted value of the ith case is
√ wi
^
y
´i.

Related Topics

Saved Values (GLM algorithms)
Residuals (GLM algorithms)
Deleted Residuals (PRESS Residuals) (GLM algorithms)
Standardized Residuals (GLM algorithms)
Studentized Residuals (GLM algorithms)


Residuals (GLM algorithms)

GLM algorithms,GLM algorithms,GLM algorithms
residuals,residuals,residuals

The n×r matrix of residuals is
^
E
=Y−
^
Y
.

The ith row of
^
E
is
^
e´
i=y´i−
^
y
´i, i=1,...,n.

Let the elements of
^
E
be
^
e
ij; then

^
e
ij=yij−
^
y
ij, for i=1,...,n, j=1,...,r

The weighted residual is
√ wi
^
e
´i.

Related Topics

Saved Values (GLM algorithms)
Predicted Values (GLM algorithms)
Deleted Residuals (PRESS Residuals) (GLM algorithms)
Standardized Residuals (GLM algorithms)
Studentized Residuals (GLM algorithms)


Deleted Residuals (PRESS Residuals) (GLM algorithms)

deleted residuals,deleted residuals,deleted residuals
GLM algorithms,GLM algorithms,GLM algorithms

The deleted residual is the predicted residual for the ith case that results from omitting the ith case from estimation. It is:

DRESID ij={
^
e
ij/(1/wi−πii) 		if wi>0 and wiπii<1;
SYSMIS otherwise .

for i=1,...,n, j=1,...,r.

Related Topics

Saved Values (GLM algorithms)
Predicted Values (GLM algorithms)
Residuals (GLM algorithms)
Standardized Residuals (GLM algorithms)
Studentized Residuals (GLM algorithms)


Standardized Residuals (GLM algorithms)

standardized residuals,standardized residuals,standardized residuals
GLM algorithms,GLM algorithms,GLM algorithms

The standardized residual is the residual divided by the standard deviation of data:

ZRESID ij ={
(yij−
^
y
ij)/(
√
^
σ
jj/wi
) 		if wi>0
SYSMIS otherwise

Related Topics

Saved Values (GLM algorithms)
Predicted Values (GLM algorithms)
Residuals (GLM algorithms)
Deleted Residuals (PRESS Residuals) (GLM algorithms)
Studentized Residuals (GLM algorithms)


Studentized Residuals (GLM algorithms)

studentized residuals,studentized residuals,studentized residuals
GLM algorithms,GLM algorithms,GLM algorithms

The standard error for
^
e
ij is

se(
^
e
ij)={
√
^
σ
jj(1/wi−πii)
if wi>0 and wiπii<1;
SYSMIS otherwise .

for i=1,...,n, j=1,...,r. The Studentized residual is the residual divided by the standard error of the residual.

SRESID ij ={
^
e
ij/se(
^
e
ij) 		if wi>0 and se(
^
e
ij)>0
SYSMIS otherwise

Related Topics

Saved Values (GLM algorithms)
Predicted Values (GLM algorithms)
Residuals (GLM algorithms)
Deleted Residuals (PRESS Residuals) (GLM algorithms)
Standardized Residuals (GLM algorithms)


Diagnostics (GLM algorithms)

The following diagnostic statistics are available.

Related Topics

GLM Algorithms
Notation (GLM algorithms)
Model (GLM algorithms)
Frequency Weight and Total Sample Size (GLM algorithms)
The Cross-Product and Sums-of-Squares Matrices (GLM algorithms)
Sweep Operation (GLM algorithms)
Residual Covariance Matrix (GLM algorithms)
Lack of Fit (GLM algorithms)
Parameter Estimates (GLM algorithms)
Estimated Marginal Means (GLM algorithms)
Saved Values (GLM algorithms)
Hypothesis Testing (GLM algorithms)
Bartlett's Test of Sphericity (GLM algorithms)
Custom Hypothesis Tests (GLM algorithms)
Univariate Mixed Model (GLM algorithms)
References (GLM algorithms)
Cook's Distance (GLM algorithms)
Leverage (GLM algorithms)


Cook's Distance (GLM algorithms)

Cook's distance,Cook's distance,Cook's distance
GLM algorithms,GLM algorithms,GLM algorithms

Cook’s Distance D measures the change to the solution that results from omitting each observation. The formula is

Dij=(
^
e
ij
√
^
σ
jj(1/wi−πii)
)2(πii(1/wi−πii))1rX

for i=1,...,n, j=1,...,r. This formula is equivalent to

Dij=(
^
e
ij/se(
^
e
ij))2(se(
^
y
ij)/se(
^
e
ij))/rX provided wi>0 and se(
^
e
ij)>0

When wi≤0 or se(
^
e
ij)=0, Dij is system missing

Related Topics

Diagnostics (GLM algorithms)
Leverage (GLM algorithms)


Leverage (GLM algorithms)

leverage,leverage,leverage
GLM algorithms,GLM algorithms,GLM algorithms

The leverage for the ith case (i=1,...,n) for all dependent variables is

LEVER i={
wiπii | if wi>0
SYSMIS | otherwise

Related Topics

Diagnostics (GLM algorithms)
Cook's Distance (GLM algorithms)


Hypothesis Testing (GLM algorithms)

Let L be an l×p known matrix, M be an r×m known matrix and K be an l×m known matrix. The test hypotheses H 0 :LBM=K versus H 1 :LBM≠K are testable if and only if LB is estimable.

The following results apply to testable hypotheses only. Nontestable hypotheses are excluded.

The hypothesis SSCP matrix is SH=(L
^
B
M−K)´(LGL´)−1(L
^
B
M−K) and the error SSCP matrix is SE=M´SM.

Four test statistics, based on the eigenvalues of S−1ESH, are available: Wilks' lambda, Hotelling-Lawley trace, Pillai's trace, and Roy's largest root.

Let the eigenvalues of S−1ESH be λ1≥ ...≥λrE≥0 and λrE+1,...,λm=0, and let rE=rank(SE); s=min(l,rE); ne=n−rX; m*=12(| rE−l|−1); n*=12(ne−rE−1).

Related Topics

GLM Algorithms
Notation (GLM algorithms)
Model (GLM algorithms)
Frequency Weight and Total Sample Size (GLM algorithms)
The Cross-Product and Sums-of-Squares Matrices (GLM algorithms)
Sweep Operation (GLM algorithms)
Residual Covariance Matrix (GLM algorithms)
Lack of Fit (GLM algorithms)
Parameter Estimates (GLM algorithms)
Estimated Marginal Means (GLM algorithms)
Saved Values (GLM algorithms)
Diagnostics (GLM algorithms)
Bartlett's Test of Sphericity (GLM algorithms)
Custom Hypothesis Tests (GLM algorithms)
Univariate Mixed Model (GLM algorithms)
References (GLM algorithms)
Wilks' Lambda (GLM algorithms)
Hotelling-Lawley Trace (GLM algorithms)
Pillai's Trace (GLM algorithms)
Roy's Largest Root (GLM algorithms)
Individual Univariate Test (GLM algorithms)


Wilks' Lambda (GLM algorithms)

Wilks' lambda,Wilks' lambda,Wilks' lambda
GLM algorithms,GLM algorithms,GLM algorithms

Λ=det(SE)det(SH+SE)=m∏k=11(1+λk)

When Ho is true, the F statistic

F=(ςτ−2υ)lrE(1−Λ1/τ)Λ1/τ

follows asymptotically an F distribution, where

ς=ne−12(rE−l+1)
υ=14(lrE−2)
τ={
√ (l2 r2E−4)/(l2+r2E−5)
if (l2+r2E−5)>0
1 otherwise

The degrees of freedom are (lrE,ςτ−2υ). The F statistic is exact if s=1,2. See Rao (1951) and Section 8c.5 of Rao (1973) for details.

The eta-squared statistic is η2=1−Λ1/s.

The noncentrality parameter is λ=(ξτ−2υ)η2/(1−η2).

The power is 1− NCDF .F ( F α,lrE,(ξτ−2υ),λ) where Fα is the upper 100α percentage point of the central F distribution, and α is user-specified on the ALPHA keyword on the CRITERIA subcommand.

Related Topics

Hypothesis Testing (GLM algorithms)
Hotelling-Lawley Trace (GLM algorithms)
Pillai's Trace (GLM algorithms)
Roy's Largest Root (GLM algorithms)
Individual Univariate Test (GLM algorithms)


Hotelling-Lawley Trace (GLM algorithms)

Hotelling-Lawley trace,Hotelling-Lawley trace,Hotelling-Lawley trace
GLM algorithms,GLM algorithms,GLM algorithms

In PASW Statistics, the name Hotelling-Lawley trace is shortened to Hotelling’s trace

T=trace(S−1ESH)=Σmk=1λk

When Ho is true, the F statistic

F=2(sn*+1)s(2m*+s+1)Ts

follows asymptotically an F distribution with degrees of freedom (s(2m*+s+1), 2(sn*+1)). The F statistic is exact if s=1.

The eta-squared statistic is η2=(T/s)/(T/s+1).

The noncentrality parameter is λ=2(sn*+1)η2/(1−η2).

The power is 1− NCDF .F ( F α,s(2m*+s+1),2(sn*+1),λ) where Fα is the upper 100α percentage point of the central F distribution, and α is user-specified on the ALPHA keyword on the CRITERIA subcommand.

Related Topics

Hypothesis Testing (GLM algorithms)
Wilks' Lambda (GLM algorithms)
Pillai's Trace (GLM algorithms)
Roy's Largest Root (GLM algorithms)
Individual Univariate Test (GLM algorithms)


Pillai's Trace (GLM algorithms)

Pillai's trace,Pillai's trace,Pillai's trace
GLM algorithms,GLM algorithms,GLM algorithms

V=trace(SH(SH+SE)−1)=Σmk=1λk/(1+λk)

When Ho is true, the F statistic

F=(2n*+s+1)(2m*+s+1)V(s−V)

follows asymptotically an F distribution with degrees of freedom (s(2m*+s+1),s(2n*+s+1)). The F statistic is exact if s=1.

The eta-squared statistic is η2=V/s.

The noncentrality parameter is λ=s(2n*+s+1)η2/(1−η2).

The power is 1− NCDF .F ( F α,s(2m*+s+1),s(2n*+s+1),λ) where Fα is the upper 100α percentage point of the central F distribution, and α is user-specified on the ALPHA keyword on the CRITERIA subcommand.

Related Topics

Hypothesis Testing (GLM algorithms)
Wilks' Lambda (GLM algorithms)
Hotelling-Lawley Trace (GLM algorithms)
Roy's Largest Root (GLM algorithms)
Individual Univariate Test (GLM algorithms)


Roy's Largest Root (GLM algorithms)

Roy's largest root,Roy's largest root,Roy's largest root
GLM algorithms,GLM algorithms,GLM algorithms

Θ=λ1

which is the largest eigenvalue of S−1ESH. When Ho is true, the F statistic is

F=Θ(ne−ω+rH)/ω

where ω=max(l,rE) is an upper bound of F that yields a lower bound on the significance level. The degrees of freedom are (ω,ne−ω+rH). The F statistic is exact if s=1.

The eta-squared statistic is η2=Θ/(1+Θ).

The noncentrality parameter is λ=(ne−ω+rH)η2/(1−η2).

The power is 1− NCDF .F ( F α,ω,ne−ω+l,λ) where Fα is the upper 100α percentage point of the central F distribution, and α is user-specified on the ALPHA keyword on the CRITERIA subcommand.

Related Topics

Hypothesis Testing (GLM algorithms)
Wilks' Lambda (GLM algorithms)
Hotelling-Lawley Trace (GLM algorithms)
Pillai's Trace (GLM algorithms)
Individual Univariate Test (GLM algorithms)


Individual Univariate Test (GLM algorithms)

F=SH;i/lSE;i/(n−rX)i=1,...,m

where SH;i and SE;i are the ith diagonal elements of the matrices SH and SE respectively. Under the null hypothesis, the F statistic has an F distribution with degrees of freedom (l,n−rX).

The eta-squared statistic is η2=SH;i/(SH;i+SE;i).

The noncentrality parameter is λ=(n−rX) SH;i/SE;i.

The power is 1− NCDF .F ( F α,1,n−rX,λ) where Fα is the upper 100α percentage point of the central F distribution, and α is user-specified on the ALPHA keyword on the CRITERIA subcommand.

Related Topics

Hypothesis Testing (GLM algorithms)
Wilks' Lambda (GLM algorithms)
Hotelling-Lawley Trace (GLM algorithms)
Pillai's Trace (GLM algorithms)
Roy's Largest Root (GLM algorithms)


Bartlett's Test of Sphericity (GLM algorithms)

GLM algorithms,GLM algorithms,GLM algorithms
Bartlett's test of sphericity,Bartlett's test of sphericity,Bartlett's test of sphericity
Bartlett's test of sphericity,Bartlett's test of sphericity,Bartlett's test of sphericity
GLM algorithms,GLM algorithms,GLM algorithms

Bartlett's test of sphericity is printed when the Residual SSCP matrix is requested.

Related Topics

GLM Algorithms
Notation (GLM algorithms)
Model (GLM algorithms)
Frequency Weight and Total Sample Size (GLM algorithms)
The Cross-Product and Sums-of-Squares Matrices (GLM algorithms)
Sweep Operation (GLM algorithms)
Residual Covariance Matrix (GLM algorithms)
Lack of Fit (GLM algorithms)
Parameter Estimates (GLM algorithms)
Estimated Marginal Means (GLM algorithms)
Saved Values (GLM algorithms)
Diagnostics (GLM algorithms)
Hypothesis Testing (GLM algorithms)
Custom Hypothesis Tests (GLM algorithms)
Univariate Mixed Model (GLM algorithms)
References (GLM algorithms)
Hypotheses (GLM algorithms)
Likelihood Ratio Test Statistic (GLM algorithms)
Chi-Square Approximation (GLM algorithms)
Chi-Square Statistic (GLM algorithms)
Degrees of Freedom (GLM algorithms)
Significance (GLM algorithms)


Hypotheses (GLM algorithms)

In Bartlett's test of sphericity the null hypothesis is Ho:Σ=σ2Ir versus the alternative hypothesis H1:Σ≠σ2Ir where σ2>0 is unspecified and Ir is an r×r identity matrix.

Related Topics

Bartlett's Test of Sphericity (GLM algorithms)
Likelihood Ratio Test Statistic (GLM algorithms)
Chi-Square Approximation (GLM algorithms)
Chi-Square Statistic (GLM algorithms)
Degrees of Freedom (GLM algorithms)
Significance (GLM algorithms)


Likelihood Ratio Test Statistic (GLM algorithms)

λ={
|A|n/2(trace(A)/r)nr/2 | if trace(A)>0
SYSMIS | if trace(A)≤0

where A=(Y−X
^
B
)´W(Y−X
^
B
) is the r×r matrix of residual sums of squares and cross products.

Related Topics

Bartlett's Test of Sphericity (GLM algorithms)
Hypotheses (GLM algorithms)
Chi-Square Approximation (GLM algorithms)
Chi-Square Statistic (GLM algorithms)
Degrees of Freedom (GLM algorithms)
Significance (GLM algorithms)


Chi-Square Approximation (GLM algorithms)

Define W=λ2/n. When n is large and under the null hypothesis that for n−rX≥1 and r≥2,

Pr(−ρ(n−rX)logW≤c)=Pr(χ2f≤c)+ω2(Pr(χ2f+4≤c)−Pr(χ2f≤c))+O(n−3)

where

f=r(r+1)/2−1
ρ=1−(2r2+r+2)/(6r(n−rX))
ω2=(r+2)(r−1)(r−2)(2r3+6r2+3r+2)288r2(n−rX)2ρ2

Related Topics

Bartlett's Test of Sphericity (GLM algorithms)
Hypotheses (GLM algorithms)
Likelihood Ratio Test Statistic (GLM algorithms)
Chi-Square Statistic (GLM algorithms)
Degrees of Freedom (GLM algorithms)
Significance (GLM algorithms)


Chi-Square Statistic (GLM algorithms)

c={
−ρ(n−rX)logW | if W>0
SYSMIS | otherwise

Related Topics

Bartlett's Test of Sphericity (GLM algorithms)
Hypotheses (GLM algorithms)
Likelihood Ratio Test Statistic (GLM algorithms)
Chi-Square Approximation (GLM algorithms)
Degrees of Freedom (GLM algorithms)
Significance (GLM algorithms)


Degrees of Freedom (GLM algorithms)

f=r(r+1)/2−1

Related Topics

Bartlett's Test of Sphericity (GLM algorithms)
Hypotheses (GLM algorithms)
Likelihood Ratio Test Statistic (GLM algorithms)
Chi-Square Approximation (GLM algorithms)
Chi-Square Statistic (GLM algorithms)
Significance (GLM algorithms)


Significance (GLM algorithms)

1− CDF .CHISQ (c,f)−ω2( CDF .CHISQ (c,f+4)− CDF .CHISQ (c,f))

where CDF.CHISQ is the PASW Statistics function for the cumulative chi-square distribution. The significance is reset to zero whenever the computed value is less than zero due to floating point imprecision.

Related Topics

Bartlett's Test of Sphericity (GLM algorithms)
Hypotheses (GLM algorithms)
Likelihood Ratio Test Statistic (GLM algorithms)
Chi-Square Approximation (GLM algorithms)
Chi-Square Statistic (GLM algorithms)
Degrees of Freedom (GLM algorithms)


Custom Hypothesis Tests (GLM algorithms)

GLM algorithms,GLM algorithms,GLM algorithms
custom hypothesis tests,custom hypothesis tests,custom hypothesis tests
custom hypothesis tests,custom hypothesis tests,custom hypothesis tests
GLM algorithms,GLM algorithms,GLM algorithms

The TEST subcommand offers custom hypothesis tests. The hypothesis term is any effect specified (either explicitly or implicitly) in the DESIGN subcommand. The error term can be a linear combination of effects that are specified in the DESIGN subcommand or a sum of squares with specified degrees of freedom. The TEST subcommand is available only for univariate analysis; therefore, an F statistic is computed. When the error term is a linear combination of effects and no value for degrees of freedom is specified, the error degrees of freedom is approximated by the Satterthwaite (1946) method.

Related Topics

GLM Algorithms
Notation (GLM algorithms)
Model (GLM algorithms)
Frequency Weight and Total Sample Size (GLM algorithms)
The Cross-Product and Sums-of-Squares Matrices (GLM algorithms)
Sweep Operation (GLM algorithms)
Residual Covariance Matrix (GLM algorithms)
Lack of Fit (GLM algorithms)
Parameter Estimates (GLM algorithms)
Estimated Marginal Means (GLM algorithms)
Saved Values (GLM algorithms)
Diagnostics (GLM algorithms)
Hypothesis Testing (GLM algorithms)
Bartlett's Test of Sphericity (GLM algorithms)
Univariate Mixed Model (GLM algorithms)
References (GLM algorithms)
Notation (GLM algorithms)
Error Mean Square (GLM algorithms)
Degrees of Freedom (GLM algorithms)
F Statistic (GLM algorithms)
Significance (GLM algorithms)


Notation (GLM algorithms)

The following notation is used in this section:

S | Number of effects in the linear combination
qs | Coefficient of the sth effect in the linear combination, s=1,...,S.
ls | Degrees of freedom of the sth effect in the linear combination, s=1,...,S.
MS s | Mean square of the sth effect in the linear combination, s=1,...,S.
Q | Linear combination of effects
lQ | Degrees of freedom of the linear combination
MS Q | Mean square of the linear combination

Related Topics

Custom Hypothesis Tests (GLM algorithms)
Error Mean Square (GLM algorithms)
Degrees of Freedom (GLM algorithms)
F Statistic (GLM algorithms)
Significance (GLM algorithms)


Error Mean Square (GLM algorithms)

If the error term is a linear combination of effects, the error mean square is

MS Q=SΣs=1qs× MS s

If the user supplied the mean squares, MS Q is equal to the number specified after the keyword VS. If MS Q<0, the custom error term is invalid, and MS Q is equal to the system-missing value and an error message is issued.

Related Topics

Custom Hypothesis Tests (GLM algorithms)
Notation (GLM algorithms)
Degrees of Freedom (GLM algorithms)
F Statistic (GLM algorithms)
Significance (GLM algorithms)


Degrees of Freedom (GLM algorithms)

If MS Q≥0 and the user did not supply the error degrees of freedom, then the error degrees of freedom is approximated using the Satterthwaite (1946) method. Define

ds={
(qs MS s)2/ls | if ls>0
0 | otherwise

Then D=SΣs=1ds. The approximate error degrees of freedom is

lQ={
( MS Q)2/D | if D>0
SYSMIS | otherwise

If MS Q≥0 and the user supplied the error degrees of freedom, lQ is equal to the number following the keyword DF. If lQ<0, the custom degrees of freedom is invalid. In this case, lQ is equal to the system-missing value and an error message is issued.

Related Topics

Custom Hypothesis Tests (GLM algorithms)
Notation (GLM algorithms)
Error Mean Square (GLM algorithms)
F Statistic (GLM algorithms)
Significance (GLM algorithms)


F Statistic (GLM algorithms)

The null hypothesis is that all parameters of the hypothesis effect are zero. The F statistic is used for testing this null hypothesis. Suppose the mean square and the degrees of freedom of the hypothesis effect are MS H and lH; then the F statistic is

F={
MS H MS Q | if MS Q>0 and MS H≥0
SYSMIS | otherwise

Related Topics

Custom Hypothesis Tests (GLM algorithms)
Notation (GLM algorithms)
Error Mean Square (GLM algorithms)
Degrees of Freedom (GLM algorithms)
Significance (GLM algorithms)


Significance (GLM algorithms)

significance ={
1− CDF.F (F,lH,lQ) | if lH>0,lQ>0 and F≠ SYSMIS
SYSMIS | otherwise

where CDF.F is the PASW Statistics function for the F cumulative distribution function.

Related Topics

Custom Hypothesis Tests (GLM algorithms)
Notation (GLM algorithms)
Error Mean Square (GLM algorithms)
Degrees of Freedom (GLM algorithms)
F Statistic (GLM algorithms)


Univariate Mixed Model (GLM algorithms)

GLM algorithms,GLM algorithms,GLM algorithms
univariate mixed model,univariate mixed model,univariate mixed model

This section describes the algorithms pertaining to a random effects model. GLM offers mixed model analysis only for univariate models—that is, for r=1.

Related Topics

GLM Algorithms
Notation (GLM algorithms)
Model (GLM algorithms)
Frequency Weight and Total Sample Size (GLM algorithms)
The Cross-Product and Sums-of-Squares Matrices (GLM algorithms)
Sweep Operation (GLM algorithms)
Residual Covariance Matrix (GLM algorithms)
Lack of Fit (GLM algorithms)
Parameter Estimates (GLM algorithms)
Estimated Marginal Means (GLM algorithms)
Saved Values (GLM algorithms)
Diagnostics (GLM algorithms)
Hypothesis Testing (GLM algorithms)
Bartlett's Test of Sphericity (GLM algorithms)
Custom Hypothesis Tests (GLM algorithms)
References (GLM algorithms)
Notation (GLM algorithms)
Model (GLM algorithms)
Expected Mean Squares (GLM algorithms)
Hypothesis Test in Mixed Models (GLM algorithms)
Null Hypothesis Expected Mean Squares (GLM algorithms)
Error Mean Squares (GLM algorithms)


Notation (GLM algorithms)

The following notation is used throughout this section. Unless otherwise stated, all vectors are column vectors and all quantities are known.

k | Number of random effects.
p0 | Number of parameters in the fixed effects.
pi | Number of parameters in the ith random effect, i=1,...,k.
σ2i | Unknown variance of the ith random effect, σ2i≥0, i=1,...,k.
σ2e | Unknown variance of the residual term, σ2e>0.
Xi | The n×pi design matrix, i=0,1,...,k.
β0 | The length p0 vector of parameters of the fixed effects.
βi | The length pi vector of parameters of the ith random effect, i=1,...,k.
L | The s×p full row rank matrix. The rows are estimable functions. s≥1

Relationships between these symbols and those defined at the beginning of the chapter are:

• p=p0+p1+ ... +pk

• X=[X0|X1|...|Xk]

• B=[
β0
β1
·
·
·
βk
]

Related Topics

Univariate Mixed Model (GLM algorithms)
Model (GLM algorithms)
Expected Mean Squares (GLM algorithms)
Hypothesis Test in Mixed Models (GLM algorithms)
Null Hypothesis Expected Mean Squares (GLM algorithms)
Error Mean Squares (GLM algorithms)


Model (GLM algorithms)

The mixed model is represented, following Rao (1973), as

Y=X0β0+kΣi=1Xiβi+e

The random vectors β1,...,βk and e are assumed to be jointly independent. Moreover, the random vector βi is distributed as Npi(0,σ2iIpi) for i=1,...,k and the residual vector e is distributed as Nn(0,σ2eW−1). Thus,

E(Y)=X0βo
cov(Y)=kΣi=1σ2iXiX´i+σ2eW−1

Related Topics

Univariate Mixed Model (GLM algorithms)
Notation (GLM algorithms)
Expected Mean Squares (GLM algorithms)
Hypothesis Test in Mixed Models (GLM algorithms)
Null Hypothesis Expected Mean Squares (GLM algorithms)
Error Mean Squares (GLM algorithms)


Expected Mean Squares (GLM algorithms)

For the estimable function L, the expected hypothesis sum of squares is

E(SSL)=E(Y´W12ALW12Y)
=β´0X´0W12ALW12X0β0+kΣi=1σ2itrace(X´kW12ALW12Xk)+σ2etrace(AL)

where

AL=W12XGL´(LGL´)−1LGX´W12

Since L=LGX´WX, trace(AL)=s and X´W12ALW12X=L´(LGL´)−1L. The matrix X´W12ALW12X can therefore be computed in the following way:

1. Compute an s×s upper triangular matrix U such that U´U=LGL´ by the Cholesky decomposition.

2. Invert the matrix U to give U−1.

3. Compute C=L´U−1.

Now we have X´W12ALW12X=CC´. If the rows of C are partitioned into the same-size submatrices as those contained in X—that is,

C=[
C0
C1
·
·
·
Ck
]

where Ci is a pi×s submatrix—then X´kW12ALW12Xk=CiC´i, i=0,1,...,k.

Since trace(CiC´i) is equal to the sum of squares of the elements in Ci, denoted by SSQ(Ci), the matrices CiC´i need not be formed. The preferred computational formula for the expected sum of squares is

E(SSL)=β´0C0C´0β0+kΣi=1σ2iSSQ(Ci)+sσ2e

Finally the expected mean square is

E(MSL)=1sE(SSL)

For the residual term, the expected residual mean square is: E(MSE)=σ2e.

Note: GLM does not compute the term 1sβ0´C0C´0β0 but reports the fixed effects whose corresponding row block in C0 contains nonzero elements.

Related Topics

Univariate Mixed Model (GLM algorithms)
Notation (GLM algorithms)
Model (GLM algorithms)
Hypothesis Test in Mixed Models (GLM algorithms)
Null Hypothesis Expected Mean Squares (GLM algorithms)
Error Mean Squares (GLM algorithms)


Hypothesis Test in Mixed Models (GLM algorithms)

Suppose MSL is the mean square for the effect whose estimable function is L, and sL is the associated degrees of freedom. The F statistic for testing this effect is

F=MSLMSE(L)

where MSE(L) is the mean square of the error term with sE(L) degrees of freedom.

Related Topics

Univariate Mixed Model (GLM algorithms)
Notation (GLM algorithms)
Model (GLM algorithms)
Expected Mean Squares (GLM algorithms)
Null Hypothesis Expected Mean Squares (GLM algorithms)
Error Mean Squares (GLM algorithms)


Null Hypothesis Expected Mean Squares (GLM algorithms)

If the effect being tested is a fixed effect, its expected mean square is

E(MSL)=σ2e+c1σ21+ ... +ckσ2k+Q(L)

where c1,...,ck are coefficients and Q(L) is a quadratic term involving the fixed effects. Under the null hypothesis, it is assumed that Q(L)=0. Although the quadratic term may involve effects that are unrelated to the effect being tested, such effects are assumed to be zero in order to draw a correct inference for the effect being tested. Therefore, under the null hypothesis, the expected mean square is

E(MSL)=σ2e+c1σ21+ ... +ckσ2k

If the effect being tested is a random effect, say the jth (1≤j≤k) random effect, its expected mean square is

E(MSL)=σ2e+c1σ21+ ... +ckσ2k

Under the null hypothesis σ2j=0; hence, the expected mean square is

E(MSL)=σ2e+
Σ
1≤i≤k,i≠j
ciσ2i

Related Topics

Univariate Mixed Model (GLM algorithms)
Notation (GLM algorithms)
Model (GLM algorithms)
Expected Mean Squares (GLM algorithms)
Hypothesis Test in Mixed Models (GLM algorithms)
Error Mean Squares (GLM algorithms)


Error Mean Squares (GLM algorithms)

Let MSi be the mean square of the ith (i=1,...,k) random effect. Let si be the corresponding degrees of freedom. The error term is then found as a linear combination of the expected mean squares of the random effects:

MSE(L)=q1MS1+ ... +qkMSk+qk+1MSE

such that

E(MSE(L))=q1E(MS1)+ ... +qkE(MSk)+qk+1E(MSE)=σ2e+c1σ21+ ... +ckσ2k

If si=0(1≤i≤k) then qi=0.

The error degrees of freedom is computed using the Satterthwaite (1946) method:

sE(L)=(MSE(L))2
Σ
1≤i≤k;si>0
(qiMSi)2/si

If the design is balanced, the above F statistic is approximately distributed as an F distribution with degrees of freedom (sL,sE(L)) under the null hypothesis. The statistic is exact when only one random effect is used as the error term—that is, qi0=1 and qi=0 for i≠i0. If the design is not balanced, the above approximation may not be valid (even when only one random effect is used as the error term) because the hypothesis term and the error term may not be independent.

Related Topics

Univariate Mixed Model (GLM algorithms)
Notation (GLM algorithms)
Model (GLM algorithms)
Expected Mean Squares (GLM algorithms)
Hypothesis Test in Mixed Models (GLM algorithms)
Null Hypothesis Expected Mean Squares (GLM algorithms)


Repeated Measures (GLM algorithms)

GLM Repeated Measures,GLM Repeated Measures,GLM Repeated Measures
algorithms,algorithms,algorithms
GLM algorithms,GLM algorithms,GLM algorithms

The GLM (general linear model) procedure provides analysis of variance when the same measurement or measurements are made several times on each subject or case (repeated measures). The algorithms in this section apply solely to repeated measures designs.

Related Topics

GLM Algorithms
Notation (GLM repeated measures algorithms)
Covariance Structure (GLM repeated measures algorithms)
Tests on the Between-Subjects Effects (GLM repeated measures algorithms)
Multivariate Tests on the Within-Subjects Effects (GLM repeated measures algorithms)
Averaged Tests on the Within-Subjects Effects (GLM repeated measures algorithms)
Adjustments to Degrees of Freedom of the F Statistics (GLM repeated measures algorithms)
Mauchly's Test of Sphericity (GLM repeated measures algorithms)


Notation (GLM repeated measures algorithms)

GLM algorithms,GLM algorithms,GLM algorithms
notation,notation,notation

The notation used in GLM Algorithms is used here. Additional conventions are defined below:

t

The number of within-subjects factors.

c

The number of measures.

rk

The number of levels of the kth within-subjects factor. rk≥2, k=1,...,t

Mk

The contrast matrix of the kth within-subjects factor, k=1,...,t. It is a square matrix with dimension rk. Each element in the first column is usually equal to 1/rk. For a polynomial contrast each element is 1/
√ rk
, or, for a user-specified contrast, a non-zero constant The other columns have zero column sums.

Related Topics

Repeated Measures (GLM algorithms)
Covariance Structure (GLM repeated measures algorithms)
Tests on the Between-Subjects Effects (GLM repeated measures algorithms)
Multivariate Tests on the Within-Subjects Effects (GLM repeated measures algorithms)
Averaged Tests on the Within-Subjects Effects (GLM repeated measures algorithms)
Adjustments to Degrees of Freedom of the F Statistics (GLM repeated measures algorithms)
Mauchly's Test of Sphericity (GLM repeated measures algorithms)


Number of Variables (GLM repeated measures algorithms)

It is required that c×∏tk=1rk=r, the number of dependent variables in the model.


Covariance Structure (GLM repeated measures algorithms)

GLM algorithms,GLM algorithms,GLM algorithms
covariance structure,covariance structure,covariance structure

As usual in GLM, the data matrix is related to the parameter matrix B as Y=XB+E. The rows of E are uncorrelated and the ith row has the distribution Nr(0,w−1iΣ). Repeated measures analysis has two additional assumptions:

• Σ=ΣCΣ1 ... Σt where ΣC is the covariance matrix of the measures and  is the Kronecker product operator.

• The Huynh and Feldt (1970) condition: Suppose σ(k)rs is the (r,s)-th element of Σk(k=1, ...,t); then σ(k)rr+σ(k)ss−2σ(k)rs= constant for r≠s. Matrices satisfying this condition result in orthonormally transformed variables with spherical covariance matrices; for this reason, the assumption is sometimes referred to as the sphericity assumption. A matrix that has the property of compound symmetry (that is, identical diagonal elements and identical off-diagonal elements) automatically satisfies this assumption.

Related Topics

Repeated Measures (GLM algorithms)
Notation (GLM repeated measures algorithms)
Tests on the Between-Subjects Effects (GLM repeated measures algorithms)
Multivariate Tests on the Within-Subjects Effects (GLM repeated measures algorithms)
Averaged Tests on the Within-Subjects Effects (GLM repeated measures algorithms)
Adjustments to Degrees of Freedom of the F Statistics (GLM repeated measures algorithms)
Mauchly's Test of Sphericity (GLM repeated measures algorithms)


Tests on the Between-Subjects Effects (GLM repeated measures algorithms)

GLM algorithms,GLM algorithms,GLM algorithms
between-subjects tests,between-subjects tests,between-subjects tests

The procedure for testing the hypothesis of no between-subjects effects uses the following steps:

1. Compute M=IcM1;1 ... Mt;1 where Mk;1 is the first column of the contrast matrix Mk of the kth within-subjects factors. Note that M is an r×c matrix.

2. For each of the between-subjects effects including the intercept, get the L matrix, according to the specified type of sum of squares.

3. Compute SH=(L
^
B
M)´(LGL´) (L
^
B
M) and SE=M´S M. Both are c×c matrices.

4. Compute the four multivariate test statistics: Wilks’ lambda, Pillai’s trace, Hotelling-Lawley trace, Roy’s largest root, and the corresponding significance levels. Also compute the individual univariate F statistics.

5. Repeat steps 2 to 4 until all between-subjects effects have been tested.

Related Topics

Repeated Measures (GLM algorithms)
Notation (GLM repeated measures algorithms)
Covariance Structure (GLM repeated measures algorithms)
Multivariate Tests on the Within-Subjects Effects (GLM repeated measures algorithms)
Averaged Tests on the Within-Subjects Effects (GLM repeated measures algorithms)
Adjustments to Degrees of Freedom of the F Statistics (GLM repeated measures algorithms)
Mauchly's Test of Sphericity (GLM repeated measures algorithms)


Multivariate Tests on the Within-Subjects Effects (GLM repeated measures algorithms)

GLM algorithms,GLM algorithms,GLM algorithms
within-subjects tests,within-subjects tests,within-subjects tests

The procedure for testing the hypothesis of no within-subjects effects uses the following steps:

1. For the kth within-subjects factor, compute M=IcA1 ... At where Ak=Mk;2:rk which is the second-to-last column of Mk when the kth within-subjects factor is involved in the effect. Otherwise, Ak=Mk;1. Note that M is an r×cd matrix, where d is the number of columns in the Kronecker product A1...At. In general, d > 1.

2. For each of the between-subjects effects, get the L matrix, according to the specified type of sum of squares.

3. Compute SH=(L
^
B
M)´(LGL´) (L
^
B
M) and SE=M´S M. Both are cd×cd matrices.

4. Compute the four multivariate test statistics: Wilks’ lambda, Pillai’s trace, Hotelling-Lawley trace, Roy’s largest root, and the corresponding significance levels. Also compute the individual univariate F statistics.

5. Repeat steps 2 to 4 for the next between-subjects effect. When all the between-subjects effects are used, go to step 6.

6. Repeat steps 1 to 5 until all within-subjects effects have been tested.

Related Topics

Repeated Measures (GLM algorithms)
Notation (GLM repeated measures algorithms)
Covariance Structure (GLM repeated measures algorithms)
Tests on the Between-Subjects Effects (GLM repeated measures algorithms)
Averaged Tests on the Within-Subjects Effects (GLM repeated measures algorithms)
Adjustments to Degrees of Freedom of the F Statistics (GLM repeated measures algorithms)
Mauchly's Test of Sphericity (GLM repeated measures algorithms)


Averaged Tests on the Within-Subjects Effects (GLM repeated measures algorithms)

GLM algorithms,GLM algorithms,GLM algorithms
within-subjects tests,within-subjects tests,within-subjects tests

The procedure for the averaged test of the hypothesis of no within-subjects effects uses the following steps:

1. Take Mk (k=1, ...,t) the equally spaced polynomial contrast matrix.

2. Compute M=IcA1 ... At where Ak=Mk;2:rk which is the 2nd to last column of Mk when the kth within-subjects factor is involved in the effect. Otherwise, Ak=1rk/
√ rk
. Note that M is an r×cd matrix, where d is the number of columns in the Kronecker product A1...At. In general, d > 1.

3. For each of the between-subjects effects, get the L matrix, according to the specified type of sum of squares.

4. Compute SH=(L
^
B
M)´(LGL´) (L
^
B
M) and SE=M´S M. Both are cd×cd matrices.

5. Partition SH into c2 block matrices each of dimension d×d. The (k,l)th block, denoted as SH;k,l, (k=1,...,c and l=1,...,c), is a sub-matrix of SH from row (k−1)d+1 to row kd, and from column (l−1)d+1 to column ld. Form the c×c matrix, denoted by SH, whose (k, l)th element is the trace of SH;k,l. The matrix SE is obtained similarly.

6. Use SH and SE for computing the four multivariate test statistics: Wilks’ lambda, Pillai’s trace, Hotelling-Lawley trace, Roy’s largest root, and the corresponding significance levels. Note: Set the degrees of freedom for SH (same as the row dimension of L in the test procedure) equal to drL and that for SE equal to d(n−rX) in the computations. Also compute the individual univariate F statistics and their significance levels.

7. Repeat steps 3 to 6 for each between-subjects effect. When all the between-subjects effects are used, go to step 8.

8. Repeat steps 2 to 7 until all within-subjects effects have been tested.

Related Topics

Repeated Measures (GLM algorithms)
Notation (GLM repeated measures algorithms)
Covariance Structure (GLM repeated measures algorithms)
Tests on the Between-Subjects Effects (GLM repeated measures algorithms)
Multivariate Tests on the Within-Subjects Effects (GLM repeated measures algorithms)
Adjustments to Degrees of Freedom of the F Statistics (GLM repeated measures algorithms)
Mauchly's Test of Sphericity (GLM repeated measures algorithms)


Adjustments to Degrees of Freedom of the F Statistics (GLM repeated measures algorithms)

GLM algorithms,GLM algorithms,GLM algorithms
degrees of freedom adjustments,degrees of freedom adjustments,degrees of freedom adjustments

The adjustments to degrees of freedom of the univariate F test statistics are the Greenhouse-Geisser epsilon, the Huynh-Feldt epsilon, and the lower-bound epsilon.

For any of the three epsilons, the adjusted significance level is

1−CDF.F(F,ε drL,ε d(n−rX))

where ε is one of the three epsilons.

Related Topics

Repeated Measures (GLM algorithms)
Notation (GLM repeated measures algorithms)
Covariance Structure (GLM repeated measures algorithms)
Tests on the Between-Subjects Effects (GLM repeated measures algorithms)
Multivariate Tests on the Within-Subjects Effects (GLM repeated measures algorithms)
Averaged Tests on the Within-Subjects Effects (GLM repeated measures algorithms)
Mauchly's Test of Sphericity (GLM repeated measures algorithms)
Greenhouse-Geisser epsilon (GLM repeated measures algorithms)
Huynh-Feldt epsilon (GLM repeated measures algorithms)
Lower bound epsilon (GLM repeated measures algorithms)


Greenhouse-Geisser epsilon (GLM repeated measures algorithms)

εGG=(trace(SE))2d×trace(S2E)

Related Topics

Adjustments to Degrees of Freedom of the F Statistics (GLM repeated measures algorithms)
Huynh-Feldt epsilon (GLM repeated measures algorithms)
Lower bound epsilon (GLM repeated measures algorithms)


Huynh-Feldt epsilon (GLM repeated measures algorithms)

εHF=min(ndεGG−2d(n−rX)−d2εGG, 1)

Related Topics

Adjustments to Degrees of Freedom of the F Statistics (GLM repeated measures algorithms)
Greenhouse-Geisser epsilon (GLM repeated measures algorithms)
Lower bound epsilon (GLM repeated measures algorithms)


Lower bound epsilon (GLM repeated measures algorithms)

εLB=1/d

Related Topics

Adjustments to Degrees of Freedom of the F Statistics (GLM repeated measures algorithms)
Greenhouse-Geisser epsilon (GLM repeated measures algorithms)
Huynh-Feldt epsilon (GLM repeated measures algorithms)


Mauchly's Test of Sphericity (GLM repeated measures algorithms)

GLM algorithms,GLM algorithms,GLM algorithms
Mauchly's test of sphericity,Mauchly's test of sphericity,Mauchly's test of sphericity
Mauchly's test of sphericity,Mauchly's test of sphericity,Mauchly's test of sphericity
GLM algorithms,GLM algorithms,GLM algorithms

Mauchly's test of sphericity is displayed for every repeated measures model.

Related Topics

Repeated Measures (GLM algorithms)
Notation (GLM repeated measures algorithms)
Covariance Structure (GLM repeated measures algorithms)
Tests on the Between-Subjects Effects (GLM repeated measures algorithms)
Multivariate Tests on the Within-Subjects Effects (GLM repeated measures algorithms)
Averaged Tests on the Within-Subjects Effects (GLM repeated measures algorithms)
Adjustments to Degrees of Freedom of the F Statistics (GLM repeated measures algorithms)
Hypotheses (GLM repeated measures algorithms)
Mauchly's W Statistic (GLM repeated measures algorithms)
Chi-Square Approximation (GLM repeated measures algorithms)
Chi-Square Statistic (GLM repeated measures algorithms)
Degrees of Freedom (GLM repeated measures algorithms)
Significance (GLM repeated measures algorithms)


Hypotheses (GLM repeated measures algorithms)

In Mauchly's test of sphericity the null hypothesis is Ho:M´ΣM=σ2Im, versus the alternative hypothesis H1:M´ΣM≠σ2Im, where σ2>0 is unspecified, I is an m×m identity matrix, and M is the r×m orthonormal matrix associated with a within-subjects effect. M is generated using equally spaced polynomial contrasts applied to the within-subjects factors (see the descriptions in Averaged Tests on the Within-Subjects Effects (GLM repeated measures algorithms)).

Related Topics

Mauchly's Test of Sphericity (GLM repeated measures algorithms)
Mauchly's W Statistic (GLM repeated measures algorithms)
Chi-Square Approximation (GLM repeated measures algorithms)
Chi-Square Statistic (GLM repeated measures algorithms)
Degrees of Freedom (GLM repeated measures algorithms)
Significance (GLM repeated measures algorithms)


Mauchly's W Statistic (GLM repeated measures algorithms)

W={
|Ξ|(trace(Ξ)/m)m | if trace(Ξ)>0
SYSMIS | if trace(Ξ)≤0

where Ξ=M´AM and A=(Y−X
^
B
)´W(Y−X
^
B
) is the r×r matrix of residual sums of squares and cross products.

Related Topics

Mauchly's Test of Sphericity (GLM repeated measures algorithms)
Hypotheses (GLM repeated measures algorithms)
Chi-Square Approximation (GLM repeated measures algorithms)
Chi-Square Statistic (GLM repeated measures algorithms)
Degrees of Freedom (GLM repeated measures algorithms)
Significance (GLM repeated measures algorithms)


Chi-Square Approximation (GLM repeated measures algorithms)

When n is large and under the null hypothesis that for n−rX≥1 and m≥2,

Pr(−ρ(n−rX)logW≤c)=Pr(χ2f≤c)+ω2(Pr(χ2f+4≤c)−Pr(χ2f≤c))+O(n−3)

where

f=m(m+1)/2−1
ρ=1−(2m2+m+2)/(6m(n−rX))
ω2=(m+2)(m−1)(m−2)(2m3+6m2+3m+2)288m2(n−rX)2ρ2

Related Topics

Mauchly's Test of Sphericity (GLM repeated measures algorithms)
Hypotheses (GLM repeated measures algorithms)
Mauchly's W Statistic (GLM repeated measures algorithms)
Chi-Square Statistic (GLM repeated measures algorithms)
Degrees of Freedom (GLM repeated measures algorithms)
Significance (GLM repeated measures algorithms)


Chi-Square Statistic (GLM repeated measures algorithms)

c={
−ρ(n−rX)logW | if W>0
SYSMIS | otherwise

Related Topics

Mauchly's Test of Sphericity (GLM repeated measures algorithms)
Hypotheses (GLM repeated measures algorithms)
Mauchly's W Statistic (GLM repeated measures algorithms)
Chi-Square Approximation (GLM repeated measures algorithms)
Degrees of Freedom (GLM repeated measures algorithms)
Significance (GLM repeated measures algorithms)


Degrees of Freedom (GLM repeated measures algorithms)

f=m(m+1)/2−1

Related Topics

Mauchly's Test of Sphericity (GLM repeated measures algorithms)
Hypotheses (GLM repeated measures algorithms)
Mauchly's W Statistic (GLM repeated measures algorithms)
Chi-Square Approximation (GLM repeated measures algorithms)
Chi-Square Statistic (GLM repeated measures algorithms)
Significance (GLM repeated measures algorithms)


Significance (GLM repeated measures algorithms)

1−CDF.CHISQ(c,f)−ω2(CDF.CHISQ(c,f+4)−CDF.CHISQ(c,f))

where CDF.CHISQ is the PASW Statistics function for cumulative chi-square distribution. The significance will be reset to zero in case the computed value is less than zero due to floating point imprecision.

Related Topics

Mauchly's Test of Sphericity (GLM repeated measures algorithms)
Hypotheses (GLM repeated measures algorithms)
Mauchly's W Statistic (GLM repeated measures algorithms)
Chi-Square Approximation (GLM repeated measures algorithms)
Chi-Square Statistic (GLM repeated measures algorithms)
Degrees of Freedom (GLM repeated measures algorithms)


References (GLM algorithms)

GLM algorithms,GLM algorithms,GLM algorithms
references,references,references

Belsley, D. A., E. Kuh, and R. E. Welsch. 1980. Regression diagnostics: Identifying influential data and sources of collinearity. New York: John Wiley and Sons.

Clarke, M. R. B. 1982. Algorithm AS 178: The Gauss-Jordan sweep operator with detection of collinearity. Applied Statistics, 31:2, 166-168.

Goodnight, J. H. 1979. A tutorial on the SWEEP operator. The American Statistician, 33:3, 149-158.

Greenhouse, S. W., and S. Geisser. 1959. On methods in the analysis of profile data. Psychometrika, 24:2, 95-111.

Huynh, H., and L. S. Feldt. 1970. Conditions under which mean square ratios in repeated measurements designs have exact F-distributions. Journal of the American Statistical Association, 65, 1582-1589.

Huynh, H., and L. S. Feldt. 1976. Estimation of the Box correction for degrees of freedom from sample data in the randomized block and split plot designs. Journal of Educational Statistics, 1, 69-82.

Mauchly, J. W. 1940. Significance test for sphericity of a normal n-variate distribution. Annals of Mathematical Statistics, 11, 204-209.

Rao, C. R. 1951. An asymptotic expansion of the distribution of Wilks’ criterion. Bulletin of the International Statistical Institute, 33:2, 177-180.

Rao, C. R. 1973. Linear statistical inference and its applications, 2nd ed. New York: John Wiley and Sons.

Ridout, M. S., and J. M. Cobby. 1989. A remark on algorithm AS 178. Applied Statistics, 38, 420-422.

Satterthwaite, F. E. 1946. An approximate distribution of estimates of variance components. Biometrics Bulletin, 2, 110-114.

Searle, S. R., F. M. Speed, and G. A. Milliken. 1980. Population marginal means in the linear model: an alternative to least squares means. The American Statistician, 34, 216-221.

Searle, S. R. 1982. Matrix algebra useful for statistics. New York: John Wiley & Sons, Inc..

Related Topics

GLM Algorithms
Notation (GLM algorithms)
Model (GLM algorithms)
Frequency Weight and Total Sample Size (GLM algorithms)
The Cross-Product and Sums-of-Squares Matrices (GLM algorithms)
Sweep Operation (GLM algorithms)
Residual Covariance Matrix (GLM algorithms)
Lack of Fit (GLM algorithms)
Parameter Estimates (GLM algorithms)
Estimated Marginal Means (GLM algorithms)
Saved Values (GLM algorithms)
Diagnostics (GLM algorithms)
Hypothesis Testing (GLM algorithms)
Bartlett's Test of Sphericity (GLM algorithms)
Custom Hypothesis Tests (GLM algorithms)
Univariate Mixed Model (GLM algorithms)


HILOGLINEAR Algorithms

HILOGLINEAR (command),HILOGLINEAR (command),HILOGLINEAR (command)
algorithms,algorithms,algorithms
Model Selection Loglinear Analysis,Model Selection Loglinear Analysis,Model Selection Loglinear Analysis
algorithms,algorithms,algorithms
hierarchical loglinear models algorithms,hierarchical loglinear models algorithms,hierarchical loglinear models algorithms

HILOGLINEAR fits hierarchical loglinear models to multidimensional contingency tables using an iterative proportional-fitting algorithm.

Related Topics

The Model Minimum Configuration (hierarchical loglinear models algorithms)
Notation for Unlimited Number of Dimensions (hierarchical loglinear models algorithms)
Iterative Proportional Fitting Procedure (IPFP) (hierarchical loglinear models algorithms)
Goodness of Fit Tests (hierarchical loglinear models algorithms)
Parameter Estimates and Standard Errors (hierarchical loglinear models algorithms)
Residuals (hierarchical loglinear models algorithms)
Partial Associations and Partial Chi-squares (hierarchical loglinear models algorithms)
Model Selection Via Backward Elimination (hierarchical loglinear models algorithms)
References (hierarchical loglinear models algorithms)


The Model Minimum Configuration (hierarchical loglinear models algorithms)

Consider an I×J×K table. Let nijk be the observed frequency and mijk the expected frequency for cell (i, j, k). A simple way to construct a saturated linear model in the natural logarithms of the expected cell frequencies is by analogy with analysis of variance (ANOVA) models:

Lijk≡log(mijk)=u+uAi+uBj+uCk+uABij+uACik+uBCjk+uABCijk

where 1≤i≤I, 1≤j≤J, and 1≤k≤K. In general, each of the seven subscripted u-terms sums to zero over each lettered subscript.

It can be shown (Bishop, Feinberg, and Holland, 1975), p. 65, that, under the commonly encountered sampling plans, the log-likelihood is

Φ+Nu+
Σ
i
ni++uAi+
Σ
j
n+j+uBj+
Σ
k
n++kuCk+
Σ
i,j
nij+uABij+
Σ
i,k
ni+kuACik+
Σ
j,k
n+jkuBCjk+
Σ
i,j,k
nijkuABCijk

where Φ is independent of any parameters and N is total number of observations. Also, the n-terms adjacent to the unknown parameters are the sufficient statistics. The formulation of the above log likelihood is based on the saturated model. When we consider unsaturated models, terms drop out and those that remain give the sufficient statistics. For instance, if we assume that there is no three-factor effect, that is, uABCijk=0 for all i, j, and k, or more briefly uijk=0, then

log﻿(mijk)=u+uAi+uBj+uCk+uABij+uACik+uBCjk

and ni++, n+j+, n++k, nij+, ni+k and n+jk are the sufficient statistics for this reduced model. These statistics can be considered as tables of sums configurations and denoted by C with proper subscripts. For example, {nij+} is the configuration C12 and {n++k} is the configuration C3. Note that {ni++}, {n+j+}, and {n++k} can be obtained from {nij+}, {ni+k} and {n+jk}. We then call the last three configurations C12, C13 and C23minimal configurations or minimal statistics.

Related Topics

HILOGLINEAR Algorithms
Notation for Unlimited Number of Dimensions (hierarchical loglinear models algorithms)
Iterative Proportional Fitting Procedure (IPFP) (hierarchical loglinear models algorithms)
Goodness of Fit Tests (hierarchical loglinear models algorithms)
Parameter Estimates and Standard Errors (hierarchical loglinear models algorithms)
Residuals (hierarchical loglinear models algorithms)
Partial Associations and Partial Chi-squares (hierarchical loglinear models algorithms)
Model Selection Via Backward Elimination (hierarchical loglinear models algorithms)
References (hierarchical loglinear models algorithms)


Notation for Unlimited Number of Dimensions (hierarchical loglinear models algorithms)

To generalize results, we denote the complete set of subscripts by a single symbol θ. Thus, nθ is the observed frequency in an elementary cell and wθ is the cell weight. We add a subscript to θ to denote a reduced dimensionality so that nθ i is the observed sum in a cell of Cθ i. We use the second subscript, i, solely to distinguish between different configurations.

Related Topics

HILOGLINEAR Algorithms
The Model Minimum Configuration (hierarchical loglinear models algorithms)
Iterative Proportional Fitting Procedure (IPFP) (hierarchical loglinear models algorithms)
Goodness of Fit Tests (hierarchical loglinear models algorithms)
Parameter Estimates and Standard Errors (hierarchical loglinear models algorithms)
Residuals (hierarchical loglinear models algorithms)
Partial Associations and Partial Chi-squares (hierarchical loglinear models algorithms)
Model Selection Via Backward Elimination (hierarchical loglinear models algorithms)
References (hierarchical loglinear models algorithms)


Iterative Proportional Fitting Procedure (IPFP) (hierarchical loglinear models algorithms)

We can obtain MLEs for the elementary cells under any hierarchical model by iterative fitting of the minimal sufficient configurations. To illustrate the algorithm, we consider the unsaturated model. The MLEs must fit the configurations C12, C13 and C23. The basic IPFP chooses an initial table m(0)ijk and then sequentially adjusts the preliminary estimates to fit C12, C13 and C23. Fitting to C12 gives

^
m
(1)ijk=
^
m
(0)ijknij+
^
m
(0)ij+

Subsequent fitting to C13 gives

^
m
(2)ijk=
^
m
(1)ijkni+k
^
m
(1)i+k

and similarly, after fitting C23 we have

^
m
(3)ijk=
^
m
(2)ijkn+jk
^
m
(2)+jk

We repeat this three-step cycle until convergence to the desired accuracy is attained. The extension of the above procedure to the general procedure for fitting s configurations is straightforward. Let the minimal configurations be Cθ i for i=1,...,s, with cell entries nθ i, respectively. The procedure is as follows:

Related Topics

HILOGLINEAR Algorithms
The Model Minimum Configuration (hierarchical loglinear models algorithms)
Notation for Unlimited Number of Dimensions (hierarchical loglinear models algorithms)
Goodness of Fit Tests (hierarchical loglinear models algorithms)
Parameter Estimates and Standard Errors (hierarchical loglinear models algorithms)
Residuals (hierarchical loglinear models algorithms)
Partial Associations and Partial Chi-squares (hierarchical loglinear models algorithms)
Model Selection Via Backward Elimination (hierarchical loglinear models algorithms)
References (hierarchical loglinear models algorithms)
Initial Cell Estimates (hierarchical loglinear models algorithms)
Intermediate Computations (hierarchical loglinear models algorithms)
Convergence Criteria (hierarchical loglinear models algorithms)


Initial Cell Estimates (hierarchical loglinear models algorithms)

To start the iterations, if CWEIGHT is not specified, set

m(0)θ={
1 | if nθ≥0
0 | otherwise

If CWEIGHT is specified, set

m(0)θ={
1 | if CWEIGHT≥1
0 | if CWEIGHT≤0
CWEIGHT | if 0 < CWEIGHT < 1

Related Topics

Iterative Proportional Fitting Procedure (IPFP) (hierarchical loglinear models algorithms)
Intermediate Computations (hierarchical loglinear models algorithms)
Convergence Criteria (hierarchical loglinear models algorithms)


Intermediate Computations (hierarchical loglinear models algorithms)

After obtaining the initial cell estimates, the algorithm proceeds to fit each of these configurations in turn. After r cycles, the relations are

^
m
(sr+i)θ=
^
m
(sr+i−1)θnθi
^
m
(sr+i−1)θi 		for 1≤i≤s; r≥0

Related Topics

Iterative Proportional Fitting Procedure (IPFP) (hierarchical loglinear models algorithms)
Initial Cell Estimates (hierarchical loglinear models algorithms)
Convergence Criteria (hierarchical loglinear models algorithms)


Convergence Criteria (hierarchical loglinear models algorithms)

The computations stop either when a complete cycle, which consists of s steps, does not cause any cell to change by more than a preset amount ε; that is,

|
^
m
(sr)θ−
^
m
(sr−s)θ|<ε 		for all θ

or the number of cycles is larger than a preset integer max. Both ε and max can be specified. The default for ε is

ε=
max
θ
{0.25; nθwθ1000}

and the default for max is 20.

Related Topics

Iterative Proportional Fitting Procedure (IPFP) (hierarchical loglinear models algorithms)
Initial Cell Estimates (hierarchical loglinear models algorithms)
Intermediate Computations (hierarchical loglinear models algorithms)


Goodness of Fit Tests (hierarchical loglinear models algorithms)

hierarchical loglinear models algorithms,hierarchical loglinear models algorithms,hierarchical loglinear models algorithms
goodness of fit tests,goodness of fit tests,goodness of fit tests

The Pearson chi-square statistic is

χ2=
Σ
θ
(nθ−
^
m
θ)2
^
m
θ

and the likelihood-ratio chi-square statistic is

L2=2
Σ
θ
nθln(nθ/
^
m
θ)

where the first summation is done over the cells with nonzero estimated cell frequencies while the second summation is done over cells with positive observed and estimated cell frequencies. The degrees of freedom for the above two statistics are computed as follows:

Related Topics

HILOGLINEAR Algorithms
The Model Minimum Configuration (hierarchical loglinear models algorithms)
Notation for Unlimited Number of Dimensions (hierarchical loglinear models algorithms)
Iterative Proportional Fitting Procedure (IPFP) (hierarchical loglinear models algorithms)
Parameter Estimates and Standard Errors (hierarchical loglinear models algorithms)
Residuals (hierarchical loglinear models algorithms)
Partial Associations and Partial Chi-squares (hierarchical loglinear models algorithms)
Model Selection Via Backward Elimination (hierarchical loglinear models algorithms)
References (hierarchical loglinear models algorithms)
Adjusted Degrees of Freedom (hierarchical loglinear models algorithms)
Unadjusted Degrees of Freedom (hierarchical loglinear models algorithms)


Adjusted Degrees of Freedom (hierarchical loglinear models algorithms)

Let Tc be the total number of the cells and P the number of parameters in the model. Also, let zc be the number of cells such that
^
m
θ=0. The adjusted degrees of freedom is

adjusted df =Tc−P−zc

Related Topics

Goodness of Fit Tests (hierarchical loglinear models algorithms)
Unadjusted Degrees of Freedom (hierarchical loglinear models algorithms)


Unadjusted Degrees of Freedom (hierarchical loglinear models algorithms)

unadjusted df =Tc−P

Related Topics

Goodness of Fit Tests (hierarchical loglinear models algorithms)
Adjusted Degrees of Freedom (hierarchical loglinear models algorithms)


Parameter Estimates and Standard Errors (hierarchical loglinear models algorithms)

hierarchical loglinear models algorithms,hierarchical loglinear models algorithms,hierarchical loglinear models algorithms
parameter estimates,parameter estimates,parameter estimates

If a saturated model is fitted and neither nθ+δ nor wθ is equal to zero for all cells, then the parameter estimates and their standard errors will be computed. Each estimate of the parameters in the saturated model can be expressed as a linear combination of the logarithms of the observed cell frequencies plus user-specified δ, where the coefficients used in the linear combination add to zero. We discuss the rule of obtaining the coefficients. Consider, in general case, a J1×J2× ... ×JM frequency table with defining variables X1, ..., XM. Let uXs1, ..., XsLjs1, ..., jsL denote an L-term interaction involving Xs1, ..., XsL at level js1, ..., jsL respectively. Denote A as a vector that is constructed in the way that its nonzero components correspond to the variables in the parameter to be estimated and are set to the level of the variable. Let Cj1, ..., jM be a M-dim vector with components equal to cell IDs. That is,

Cj1, ..., jM=(j1, ..., jM); 1≤j1≤J1, 1≤i≤M

The coefficient βj1, ..., jM is determined through the comparison of the components of A and Cj1, ..., jM. Let s be the number of nonzero components of A that do not match (equal) the corresponding components of Cj1, ..., jM. Also, let matching occur at component i1, ..., ik. Then the coefficient for cell (j1, ..., jM) is

βj1, ..., jM=(−1)s(Ji1−1)× ... ×(Jik−1)

The estimate
^
u
Xs1, ..., XsLjs1, ..., jsL of uXs1, ..., XsLjs1, ..., jsL is then

^
u
Xs1, ..., XsLjs1, ..., jsL=
Σ
j1, ..., jM
βj1, ..., jMln(nj1, ..., jM+δ)

The large-sample variance of the estimate is

Σ
j1, ..., jM
β2[ln(nj1, ..., jM+δ)]−1

For a large sample, the estimate approximately follows a normal distribution with the above mean and variance if the sampling model follows a Poisson, multinomial, or product-multinomial distribution. The confidence interval for the parameter can be computed based on the asymptotic normality.

Related Topics

HILOGLINEAR Algorithms
The Model Minimum Configuration (hierarchical loglinear models algorithms)
Notation for Unlimited Number of Dimensions (hierarchical loglinear models algorithms)
Iterative Proportional Fitting Procedure (IPFP) (hierarchical loglinear models algorithms)
Goodness of Fit Tests (hierarchical loglinear models algorithms)
Residuals (hierarchical loglinear models algorithms)
Partial Associations and Partial Chi-squares (hierarchical loglinear models algorithms)
Model Selection Via Backward Elimination (hierarchical loglinear models algorithms)
References (hierarchical loglinear models algorithms)


Residuals (hierarchical loglinear models algorithms)

hierarchical loglinear models algorithms,hierarchical loglinear models algorithms,hierarchical loglinear models algorithms
residuals,residuals,residuals

The following residuals are computed.

Related Topics

HILOGLINEAR Algorithms
The Model Minimum Configuration (hierarchical loglinear models algorithms)
Notation for Unlimited Number of Dimensions (hierarchical loglinear models algorithms)
Iterative Proportional Fitting Procedure (IPFP) (hierarchical loglinear models algorithms)
Goodness of Fit Tests (hierarchical loglinear models algorithms)
Parameter Estimates and Standard Errors (hierarchical loglinear models algorithms)
Partial Associations and Partial Chi-squares (hierarchical loglinear models algorithms)
Model Selection Via Backward Elimination (hierarchical loglinear models algorithms)
References (hierarchical loglinear models algorithms)
Raw Residuals (hierarchical loglinear models algorithms)
Standardized Residuals (hierarchical loglinear models algorithms)


Raw Residuals (hierarchical loglinear models algorithms)

raw residuals,raw residuals,raw residuals
hierarchical loglinear models algorithms,hierarchical loglinear models algorithms,hierarchical loglinear models algorithms

raw residual =nθ−
^
m
θ

Related Topics

Residuals (hierarchical loglinear models algorithms)
Standardized Residuals (hierarchical loglinear models algorithms)


Standardized Residuals (hierarchical loglinear models algorithms)

standardized residuals,standardized residuals,standardized residuals
hierarchical loglinear models algorithms,hierarchical loglinear models algorithms,hierarchical loglinear models algorithms

standardized residual =(nθ−
^
m
θ)/
√
^
m
θ

where
^
m
θ must be greater than 0.

Related Topics

Residuals (hierarchical loglinear models algorithms)
Raw Residuals (hierarchical loglinear models algorithms)


Partial Associations and Partial Chi-squares (hierarchical loglinear models algorithms)

Partial associations of effects can be requested when a saturated model is specified. Let χ2(k) be the chi-square for the model that contains the effects up to and including the k-interaction terms. The test of the significance of the kth-order interaction can be based on

χ2(k−1)−χ2(k)

Degrees of freedom are obtained by subtracting the degrees of freedom for the corresponding models.

Related Topics

HILOGLINEAR Algorithms
The Model Minimum Configuration (hierarchical loglinear models algorithms)
Notation for Unlimited Number of Dimensions (hierarchical loglinear models algorithms)
Iterative Proportional Fitting Procedure (IPFP) (hierarchical loglinear models algorithms)
Goodness of Fit Tests (hierarchical loglinear models algorithms)
Parameter Estimates and Standard Errors (hierarchical loglinear models algorithms)
Residuals (hierarchical loglinear models algorithms)
Model Selection Via Backward Elimination (hierarchical loglinear models algorithms)
References (hierarchical loglinear models algorithms)


Model Selection Via Backward Elimination (hierarchical loglinear models algorithms)

hierarchical loglinear models algorithms,hierarchical loglinear models algorithms,hierarchical loglinear models algorithms
model selection,model selection,model selection

The selection process starts with the model specified (either via DESIGN or MAXORDER subcommand). The partial chi-square is calculated for every term in the generating class. Any term with zero partial chi-square is deleted, then the effect with the largest observed significance level for the change in chi-square is deleted, provided the significance level is larger than 0.05, the default. With the removal of a highest-order term, a new model with new generating class is generated. The above process of removing a term is repeated for the new model and is continued until no remaining terms in the model can be deleted.

Related Topics

HILOGLINEAR Algorithms
The Model Minimum Configuration (hierarchical loglinear models algorithms)
Notation for Unlimited Number of Dimensions (hierarchical loglinear models algorithms)
Iterative Proportional Fitting Procedure (IPFP) (hierarchical loglinear models algorithms)
Goodness of Fit Tests (hierarchical loglinear models algorithms)
Parameter Estimates and Standard Errors (hierarchical loglinear models algorithms)
Residuals (hierarchical loglinear models algorithms)
Partial Associations and Partial Chi-squares (hierarchical loglinear models algorithms)
References (hierarchical loglinear models algorithms)


References (hierarchical loglinear models algorithms)

hierarchical loglinear models algorithms,hierarchical loglinear models algorithms,hierarchical loglinear models algorithms
references,references,references

Bishop, Y. M., S. E. Feinberg, and P. W. Holland. 1975. Discrete multivariate analysis: Theory and practice. Cambridge, Mass.: MIT Press.

Fienberg, S. E. 1994. The Analysis of Cross-Classified Categorical Data, 2nd ed. Cambridge, MA: MIT Press.

Related Topics

HILOGLINEAR Algorithms
The Model Minimum Configuration (hierarchical loglinear models algorithms)
Notation for Unlimited Number of Dimensions (hierarchical loglinear models algorithms)
Iterative Proportional Fitting Procedure (IPFP) (hierarchical loglinear models algorithms)
Goodness of Fit Tests (hierarchical loglinear models algorithms)
Parameter Estimates and Standard Errors (hierarchical loglinear models algorithms)
Residuals (hierarchical loglinear models algorithms)
Partial Associations and Partial Chi-squares (hierarchical loglinear models algorithms)
Model Selection Via Backward Elimination (hierarchical loglinear models algorithms)


HOMALS Algorithms

HOMALS (command),HOMALS (command),HOMALS (command)
algorithms,algorithms,algorithms
HOMALS algorithms,HOMALS algorithms,HOMALS algorithms

The iterative HOMALS algorithm is a modernized version of Guttman (1941). The treatment of missing values, described below, is based on setting weights in the loss function equal to zero, and was first described in De Leeuw and Van Rijckevorsel (1980). Other possibilities do exist and can be accomplished by recoding the data (Gifi, 1981; Meulman, 1982).

Related Topics

Notation (HOMALS algorithms)
Objective Function Optimization (HOMALS algorithms)
Diagnostics (HOMALS algorithms)
References (HOMALS algorithms)


Notation (HOMALS algorithms)

HOMALS algorithms,HOMALS algorithms,HOMALS algorithms
notation,notation,notation

The following notation is used throughout this chapter unless otherwise stated:

n | Number of cases (objects)
m | Number of variables
p | Number of dimensions

For variable j; j=1, ..., m

hj | n-vector with categorical observations
kj | Number of valid categories (distinct values) of variable j
Gj | Indicator matrix for variable j, of order n×kj

g(j) i r={
1 | when the i th object is in the r th category of variable j
0 | when the i th object is not in the r th category of variable j

Dj | Diagonal matrix, containing the univariate marginals; that is, the column sums of Gj
Mj | Binary diagonal n×n matrix, with diagonal elements defined as

m(j) i i={
1 when the i th observation is within the range [1,kj]
0
when the i th observation outside the range [1,kj]

The quantification matrices and parameter vectors are:

X | Object scores, of order n×p
Yj | Category quantifications, of order kj×p.
Y | Concatenated category quantification matrices, of order Σjkj×p

Note: The matrices Gj, Mj, and Dj are exclusively notational devices; they are stored in reduced form, and the program fully profits from their sparseness by replacing matrix multiplications with selective accumulation.

Related Topics

HOMALS Algorithms
Objective Function Optimization (HOMALS algorithms)
Diagnostics (HOMALS algorithms)
References (HOMALS algorithms)


Objective Function Optimization (HOMALS algorithms)

HOMALS algorithms,HOMALS algorithms,HOMALS algorithms
objective function,objective function,objective function

The HOMALS objective is to find object scores X and a set of Yj (for j=1, ..., m) so that the function

σ(X;Y)=1/mΣj tr ((X−GjYj)´Mj(X−GjYj))

is minimal, under the normalization restriction X´M*X=mnI, where the matrix M*=ΣjMj, and I is the p×p identity matrix. The inclusion of Mj in σ(X;Y) ensures that there is no influence of data values outside the range [1, kj], which may be really missing or merely regarded as such; M* contains the number of “active” data values for each object. The object scores are also centered; that is, they satisfy u´M*X=0, with u denoting an n-vector with ones.

Optimization is achieved through the following iteration scheme:

1. Initialization

2. Update object scores

3. Orthonormalization

4. Update category quantifications

5. Convergence test: repeat steps 2-4 or continue

6. Rotation

These steps are explained below.

Related Topics

HOMALS Algorithms
Notation (HOMALS algorithms)
Diagnostics (HOMALS algorithms)
References (HOMALS algorithms)
Initialization (HOMALS algorithms)
Update object scores (HOMALS algorithms)
Orthonormalization (HOMALS algorithms)
Update category quantifications (HOMALS algorithms)
Convergence test (HOMALS algorithms)
Rotation (HOMALS algorithms)


Initialization (HOMALS algorithms)

The object scores X are initialized with random numbers, which are normalized so that u´M*X=0 and X´M*X=mnI, yielding
˜
X
. Then the first category quantifications are obtained as
˜
Y
j=D−1jG´j
˜
X
.

Related Topics

Objective Function Optimization (HOMALS algorithms)
Update object scores (HOMALS algorithms)
Orthonormalization (HOMALS algorithms)
Update category quantifications (HOMALS algorithms)
Convergence test (HOMALS algorithms)
Rotation (HOMALS algorithms)


Update object scores (HOMALS algorithms)

First the auxiliary score matrix Z is computed as

Z←ΣjMjGj
˜
Y
j

and centered with respect to M*:

˜
Z
←{M*−(M*uu´M*/u´M*u)}Z.

These two steps yield locally the best updates when there are no orthogonality constraints.

Related Topics

Objective Function Optimization (HOMALS algorithms)
Initialization (HOMALS algorithms)
Orthonormalization (HOMALS algorithms)
Update category quantifications (HOMALS algorithms)
Convergence test (HOMALS algorithms)
Rotation (HOMALS algorithms)


Orthonormalization (HOMALS algorithms)

The orthonormalization problem is to find an M*-orthonormal X+ that is closest to
˜
Z
in the least squares sense. In HOMALS, this is done by setting

X+←m1/2M−1/2*GRAM(M−1/2*
˜
Z
)

which is equal to the genuine least squares estimate up to a rotation. The notation GRAM( ) is used to denote the Gram-Schmidt transformation (Björk and Golub, 1973).

Related Topics

Objective Function Optimization (HOMALS algorithms)
Initialization (HOMALS algorithms)
Update object scores (HOMALS algorithms)
Update category quantifications (HOMALS algorithms)
Convergence test (HOMALS algorithms)
Rotation (HOMALS algorithms)


Update category quantifications (HOMALS algorithms)

For j=1,...,m, the new category quantifications are computed as:

Y+j=D−1jG´j
˜
X

Related Topics

Objective Function Optimization (HOMALS algorithms)
Initialization (HOMALS algorithms)
Update object scores (HOMALS algorithms)
Orthonormalization (HOMALS algorithms)
Convergence test (HOMALS algorithms)
Rotation (HOMALS algorithms)


Convergence test (HOMALS algorithms)

The difference between consecutive loss function values σ(
˜
X
;
˜
Y
)−σ(X+;Y+) is compared with the user-specified convergence criterion ε —a small positive number. Steps 2 to 4 are repeated as long as the loss difference exceeds ε.

Related Topics

Objective Function Optimization (HOMALS algorithms)
Initialization (HOMALS algorithms)
Update object scores (HOMALS algorithms)
Orthonormalization (HOMALS algorithms)
Update category quantifications (HOMALS algorithms)
Rotation (HOMALS algorithms)


Rotation (HOMALS algorithms)

As indicated in step 3, during iteration the orientation of X and Y with respect to the coordinate system is not necessarily correct; this also reflects that σ(X; Y) is invariant under simultaneous rotations of X and Y. From theory it is known that solutions in different dimensionality should be nested; that is, the p-dimensional solution should be equal to the first p columns of the (p+1)-dimensional solution. Nestedness is achieved by computing the eigenvectors of the matrix 1/mΣjY´jDjYj. The corresponding eigenvalues are printed after the convergence message of the program. The calculation involves tridiagonalization with Householder transformations followed by the implicit QL algorithm (Wilkinson, 1965).

Related Topics

Objective Function Optimization (HOMALS algorithms)
Initialization (HOMALS algorithms)
Update object scores (HOMALS algorithms)
Orthonormalization (HOMALS algorithms)
Update category quantifications (HOMALS algorithms)
Convergence test (HOMALS algorithms)


Diagnostics (HOMALS algorithms)

HOMALS algorithms,HOMALS algorithms,HOMALS algorithms
diagnostics,diagnostics,diagnostics

The following diagnostics are available.

Related Topics

HOMALS Algorithms
Notation (HOMALS algorithms)
Objective Function Optimization (HOMALS algorithms)
References (HOMALS algorithms)
Maximum Rank (may be issued as a warning when exceeded) (HOMALS algorithms)
Marginal Frequencies (HOMALS algorithms)
Discrimination Measure (HOMALS algorithms)
Eigenvalues (HOMALS algorithms)


Maximum Rank (may be issued as a warning when exceeded) (HOMALS algorithms)

maximum rank,maximum rank,maximum rank
HOMALS algorithms,HOMALS algorithms,HOMALS algorithms

The maximum rank pmax indicates the maximum number of dimensions that can be computed for any dataset. In general:

pmax=min{(n−1), ((Σjkj)−max(m1, 1))}

where m1 is the number of variables with no missing values. Although the number of nontrivial dimensions may be less than pmax when m=2, HOMALS does allow dimensionalities all the way up to pmax.

Related Topics

Diagnostics (HOMALS algorithms)
Marginal Frequencies (HOMALS algorithms)
Discrimination Measure (HOMALS algorithms)
Eigenvalues (HOMALS algorithms)


Marginal Frequencies (HOMALS algorithms)

marginal frequencies,marginal frequencies,marginal frequencies
HOMALS algorithms,HOMALS algorithms,HOMALS algorithms

The frequencies table gives the univariate marginals and the number of missing values (that is, values that are regarded as out of range for the current analysis) for each variable. These are computed as the column sums of Dj and the total sum of Mj.

Related Topics

Diagnostics (HOMALS algorithms)
Maximum Rank (may be issued as a warning when exceeded) (HOMALS algorithms)
Discrimination Measure (HOMALS algorithms)
Eigenvalues (HOMALS algorithms)


Discrimination Measure (HOMALS algorithms)

discrimination measures,discrimination measures,discrimination measures
HOMALS algorithms,HOMALS algorithms,HOMALS algorithms

These are the dimensionwise variances of the quantified variables. For variable j and dimension s:

η2js=y´(j)sDjy(j)s/n

where y(j)s is the sth column of Yj, corresponding to the sth quantified variable Gjy(j)s.

Related Topics

Diagnostics (HOMALS algorithms)
Maximum Rank (may be issued as a warning when exceeded) (HOMALS algorithms)
Marginal Frequencies (HOMALS algorithms)
Eigenvalues (HOMALS algorithms)


Eigenvalues (HOMALS algorithms)

eigenvalues,eigenvalues,eigenvalues
HOMALS algorithms,HOMALS algorithms,HOMALS algorithms

The computation of the eigenvalues that are reported after convergence is discussed in step 6. With the HISTORY option, the sum of the eigenvalues is reported during iteration under the heading “total fit.” Due to the fact that the sum of the eigenvalues is equal to the trace of the original matrix, the sum can be computed as 1/mΣjΣsη2js. The value of σ(X; Y) is equal to p−1/mΣjΣsη2js.

Related Topics

Diagnostics (HOMALS algorithms)
Maximum Rank (may be issued as a warning when exceeded) (HOMALS algorithms)
Marginal Frequencies (HOMALS algorithms)
Discrimination Measure (HOMALS algorithms)


References (HOMALS algorithms)

HOMALS algorithms,HOMALS algorithms,HOMALS algorithms
references,references,references

Björk, A., and G. H. Golub. 1973. Numerical methods for computing angles between linear subspaces. Mathematics of Computation, 27, 579-594.

De Leeuw, J., and J. Van Rijckevorsel. 1980. HOMALS and PRINCALS—Some generalizations of principal components analysis. In: Data Analysis and Informatics, E. Diday, et al., eds. Amsterdam: North-Holland.

Gifi, A. 1990. Nonlinear multivariate analysis. Chichester: John Wiley and Sons.

Guttman, L. 1941. The quantification of a class of attributes: A theory and method of scale construction. In: The Prediction of Personal Adjustment, P. Horst, eds. New York: Social Science Research Council.

Meulman, J. J. 1982. Homogeneity analysis of incomplete data. Leiden: DSWO Press.

Wilkinson, J. H. 1965. The algebraic eigenvalue problem. Oxford: Clarendon Press.

Related Topics

HOMALS Algorithms
Notation (HOMALS algorithms)
Objective Function Optimization (HOMALS algorithms)
Diagnostics (HOMALS algorithms)


KM Algorithms

KM (command),KM (command),KM (command)
algorithms,algorithms,algorithms
Kaplan-Meier Analysis,Kaplan-Meier Analysis,Kaplan-Meier Analysis
algorithms,algorithms,algorithms
Kaplan-Meier algorithms,Kaplan-Meier algorithms,Kaplan-Meier algorithms

This procedure estimates the survival function for time to occurrence of an event. Some of the times may be “censored” in that the event does not occur during the observation period, or contact is lost with participants (loss to follow-up).

If the subjects are divided into treatment groups, KM produces a survival function for each treatment group (factor level) and a test of equality of the survival functions across treatment groups. The survival functions across treatment groups can also be compared while controlling for categories of a stratification variable.

Related Topics

Notation (Kaplan-Meier algorithms)
Estimation and SE for Survival Distribution (Kaplan-Meier algorithms)
Estimation of Mean Survival Time and Standard Error (Kaplan-Meier algorithms)
Plots (Kaplan-Meier algorithms)
Estimation of Percentiles and Standard Error (Kaplan-Meier algorithms)
Testing the Equality of the Survival Functions (Kaplan-Meier algorithms)
References (Kaplan-Meier algorithms)


Notation (Kaplan-Meier algorithms)

Kaplan-Meier algorithms,Kaplan-Meier algorithms,Kaplan-Meier algorithms
notation,notation,notation

The following notation is used throughout this chapter unless otherwise stated:

p | Number of levels (strata) for the stratification variable
g | Number of levels (treatment groups) for the factor variable

Related Topics

KM Algorithms
Estimation and SE for Survival Distribution (Kaplan-Meier algorithms)
Estimation of Mean Survival Time and Standard Error (Kaplan-Meier algorithms)
Plots (Kaplan-Meier algorithms)
Estimation of Percentiles and Standard Error (Kaplan-Meier algorithms)
Testing the Equality of the Survival Functions (Kaplan-Meier algorithms)
References (Kaplan-Meier algorithms)


Estimation and SE for Survival Distribution (Kaplan-Meier algorithms)

Kaplan-Meier algorithms,Kaplan-Meier algorithms,Kaplan-Meier algorithms
survival distribution,survival distribution,survival distribution

Suppose that for a given combination of the stratification and factor variables, a random sample of n individuals yields a sample with k distinct observed failure times (uncensored). Let t1< ... <tk represent the observed life times and TL be the largest observation in the sample. (Note that TL=tk if the largest observation is uncensored.) Define

ni= Number of subjects who are at risk at time ti
di= Number of failures (deaths) at ti
λi= Number of censorings in interval [ ti, ti+1 )

Note that

n0=n
ni+1=ni−di−λi,
  i=0, 1, ..., k−1
t0=0
tk+1=∞
d0=0
λ0=0

The Kaplan-Meier estimate
^
S
(t) for the survival function is computed as

^
S
(t)=
∏
ti < t
(1−dini)

Note that

^
S
(t+l)=l∏i=1(1−dini),
  l=1, 2, ..., k.
^
S
(t+0)=1
^
S
(t+l+1)=
^
S
(t+l)(1−dl+1nl+1)
^
S
(t+k)=0
if nk=dk(Tl=tk and λk=0), otherwise
^
S
(t+k)=k∏l=1(1−dlnl),
TL≥t≥tk
^
S
(t+1), ...,
^
S
(t+k) are the survival functions shown in the table .

The asymptotic standard error for
^
S
(t+l) is computed as the square root of

var(
^
S
(t+l))=[
^
S
(t+l)]2lΣi=1dini(ni−di), 		l=1, ..., k.

Note: When nk=dk (TL=tk and λk=0),
^
S
(t+k)=0 and var(
^
S
(t+k))=0.

Related Topics

KM Algorithms
Notation (Kaplan-Meier algorithms)
Estimation of Mean Survival Time and Standard Error (Kaplan-Meier algorithms)
Plots (Kaplan-Meier algorithms)
Estimation of Percentiles and Standard Error (Kaplan-Meier algorithms)
Testing the Equality of the Survival Functions (Kaplan-Meier algorithms)
References (Kaplan-Meier algorithms)


Estimation of Mean Survival Time and Standard Error (Kaplan-Meier algorithms)

Kaplan-Meier algorithms,Kaplan-Meier algorithms,Kaplan-Meier algorithms
mean survival time,mean survival time,mean survival time

^
μ
={
k−1Σi=0
^
S
(t+i)(ti+1−ti) 		if TL=tk
k−1Σi=0
^
S
(t+i)(ti+1−ti)+
^
S
(t+k)(TL−tk)
otherwise

The variance of the mean survival time is

var(
^
μ
)=kΣi=1a2idini(ni−di)
ai=k−1Σl=i
^
S
(t+l)(tl+1−tl)+
^
S
(t+k)(TL−tk)
d=kΣi=1di

unless there are both censored and uncensored occurrences of the largest survival time. In that case,

var(
^
μ
)=dd−1k−1Σi=1a2idini(ni−di)
ai=k−1Σl=i
^
S
(t+l)(tl+1−tl)

The standard error is the square root of the variance.

Related Topics

KM Algorithms
Notation (Kaplan-Meier algorithms)
Estimation and SE for Survival Distribution (Kaplan-Meier algorithms)
Plots (Kaplan-Meier algorithms)
Estimation of Percentiles and Standard Error (Kaplan-Meier algorithms)
Testing the Equality of the Survival Functions (Kaplan-Meier algorithms)
References (Kaplan-Meier algorithms)


Plots (Kaplan-Meier algorithms)

Kaplan-Meier algorithms,Kaplan-Meier algorithms,Kaplan-Meier algorithms
plots,plots,plots

The following plots are available.

Related Topics

KM Algorithms
Notation (Kaplan-Meier algorithms)
Estimation and SE for Survival Distribution (Kaplan-Meier algorithms)
Estimation of Mean Survival Time and Standard Error (Kaplan-Meier algorithms)
Estimation of Percentiles and Standard Error (Kaplan-Meier algorithms)
Testing the Equality of the Survival Functions (Kaplan-Meier algorithms)
References (Kaplan-Meier algorithms)
Survival Functions versus Time (Kaplan-Meier algorithms)
Log Survival Functions versus Time (Kaplan-Meier algorithms)
Cumulative Hazard Functions versus Time (Kaplan-Meier algorithms)


Survival Functions versus Time (Kaplan-Meier algorithms)

The survival function
^
S
(t) is plotted against t.

Related Topics

Plots (Kaplan-Meier algorithms)
Log Survival Functions versus Time (Kaplan-Meier algorithms)
Cumulative Hazard Functions versus Time (Kaplan-Meier algorithms)


Log Survival Functions versus Time (Kaplan-Meier algorithms)

ln(
^
S
(t)) is plotted against t.

Related Topics

Plots (Kaplan-Meier algorithms)
Survival Functions versus Time (Kaplan-Meier algorithms)
Cumulative Hazard Functions versus Time (Kaplan-Meier algorithms)


Cumulative Hazard Functions versus Time (Kaplan-Meier algorithms)

−ln(
^
S
(t)) is plotted against t.

Related Topics

Plots (Kaplan-Meier algorithms)
Survival Functions versus Time (Kaplan-Meier algorithms)
Log Survival Functions versus Time (Kaplan-Meier algorithms)


Estimation of Percentiles and Standard Error (Kaplan-Meier algorithms)

100p percentile of the survival time, where p is between 0 and 1, is computed as

tp=inf{ti | (
^
S
(ti)≤p)}

The asymptotic variance of tp is estimated by

var(tp)=var(
^
S
(tp))(
^
f
(tp))2

where
^
f
(tp) is computed as

^
f
(tp)=
^
S
(up+0.05)−
^
S
(tp−0.05)tp−0.05−up+0.05

where uq=sup{ti | (
^
S
(ti)≥q)}.

Related Topics

KM Algorithms
Notation (Kaplan-Meier algorithms)
Estimation and SE for Survival Distribution (Kaplan-Meier algorithms)
Estimation of Mean Survival Time and Standard Error (Kaplan-Meier algorithms)
Plots (Kaplan-Meier algorithms)
Testing the Equality of the Survival Functions (Kaplan-Meier algorithms)
References (Kaplan-Meier algorithms)


Testing the Equality of the Survival Functions (Kaplan-Meier algorithms)

Kaplan-Meier algorithms,Kaplan-Meier algorithms,Kaplan-Meier algorithms
equality of survival functions,equality of survival functions,equality of survival functions

Three statistics are computed to test the equality of survival distributions in the presence of arbitrary right censorship. These statistics are the logrank (Mantel-Cox), the modified Wilcoxon test statistic (Breslow), and an alternative test statistic proposed by Tarone and Ware (1977). Using the regression model proposed by Cox (1972), all three test statistics have been modified for testing monotonic trend in hazard functions.

Related Topics

KM Algorithms
Notation (Kaplan-Meier algorithms)
Estimation and SE for Survival Distribution (Kaplan-Meier algorithms)
Estimation of Mean Survival Time and Standard Error (Kaplan-Meier algorithms)
Plots (Kaplan-Meier algorithms)
Estimation of Percentiles and Standard Error (Kaplan-Meier algorithms)
References (Kaplan-Meier algorithms)
Test Statistics (Kaplan-Meier algorithms)
Test Statistic for Trend (Kaplan-Meier algorithms)


Test Statistics (Kaplan-Meier algorithms)

Let n(s) be the number of subjects in stratum s. Let

t(s)1< ... <t(s)ms

be the observed failure times (responses) and

n(s)li= in stratum s the number of individuals in group l at risk just prior to t(s)i

d(s)li= number of deaths at t(s)i in group l

and

d(s)i=gΣl=1d(s)li
n(s)i=gΣl=1n(s)li

Hence, the expected number of events in group l at time t(s)i is given by

E(s)li=d(s)in(s)lin(s)i

Define

Us=(U(s)1, ..., U(s)g−1)´

with

U(s)l=msΣi=1w(s)i(d(s)li−E(s)li) for l=1, ..., g−1

Also, let Vs be a (g−1)×(g−1) covariance matrix with

V(s)jl=msΣi=1(w(s)i)2d(s)i(n(s)i−d(s)i)n(s)i−1n(s)jin(s)i(δjl−n(s)lin(s)i) for j, l=1, ..., g−1

where

w(s)i=1 for log-rank test
w(s)i=n(s)i for Breslow test
w(s)i=
√ n(s)i
for Tarone Ware test

and

δjl={
1 | if j=l
0 | otherwise

Define

U=pΣs=1Us

and

V=pΣs=1Vs

The test statistic for the equality of the g survival functions is defined by

χ2=U´V−1U

χ2 has an asymptotic chi-square distribution with g−1 degrees of freedom.

Related Topics

Testing the Equality of the Survival Functions (Kaplan-Meier algorithms)
Test Statistic for Trend (Kaplan-Meier algorithms)


Test Statistic for Trend (Kaplan-Meier algorithms)

Let

t=(t1, ..., tg)´

be a vector with tj= trend weighting coefficient for group j. Form the vector

U(s)=(U(s)1, ..., U(s)g)´

U(s) differs from Us only in the last component.

Let V(s) be a g×g matrix with element V(s)lj for 1≤l, j≤g. The test statistic is defined by

χ2t=(t´U)2t´Vt

where

U=pΣs=1U(s)
V=pΣs=1V(s)

The logrank, Breslow, and Tarone Ware tests may involve trend. Each of the test statistics has a chi-square distribution with one degree of freedom.

The default trend is defined as follows:

t={
(−(g−1), ..., −3, −1, 1, 3, ..., (g−1)) | if g is even
(−(g−1)2, ..., −1, 0, 1, ..., (g−1)2) | otherwise

Related Topics

Testing the Equality of the Survival Functions (Kaplan-Meier algorithms)
Test Statistics (Kaplan-Meier algorithms)


References (Kaplan-Meier algorithms)

Kaplan-Meier algorithms,Kaplan-Meier algorithms,Kaplan-Meier algorithms
references,references,references

Cox, D. R. 1972. Regression models and life tables (with discussion). Journal of the Royal Statistical Society, Series B, 34, 187-220.

Tarone, R. 1975. Tests for trend in life table analysis. Biometrika, 62, 679-682.

Tarone, R., and J. Ware. 1977. On distribution free tests for equality of survival distributions. Biometrika, 64, 156-160.

Related Topics

KM Algorithms
Notation (Kaplan-Meier algorithms)
Estimation and SE for Survival Distribution (Kaplan-Meier algorithms)
Estimation of Mean Survival Time and Standard Error (Kaplan-Meier algorithms)
Plots (Kaplan-Meier algorithms)
Estimation of Percentiles and Standard Error (Kaplan-Meier algorithms)
Testing the Equality of the Survival Functions (Kaplan-Meier algorithms)


KNN Algorithms

KNN (command),KNN (command),KNN (command)
algorithms,algorithms,algorithms
Nearest Neighbor Analysis,Nearest Neighbor Analysis,Nearest Neighbor Analysis
algorithms,algorithms,algorithms
nearest neighbor algorithms,nearest neighbor algorithms,nearest neighbor algorithms

Nearest Neighbor Analysis is a method for classifying cases based on their similarity to other cases. In machine learning, it was developed as a way to recognize patterns of data without requiring an exact match to any stored patterns, or cases. Similar cases are near each other and dissimilar cases are distant from each other. Thus, the distance between two cases is a measure of their dissimilarity.

Cases that are near each other are said to be “neighbors.” When a new case (holdout) is presented, its distance from each of the cases in the model is computed. The classifications of the most similar cases – the nearest neighbors – are tallied and the new case is placed into the category that contains the greatest number of nearest neighbors.

You can specify the number of nearest neighbors to examine; this value is called k. The pictures show how a new case would be classified using two different values of k. When k = 5, the new case is placed in category 1 because a majority of the nearest neighbors belong to category 1. However, when k = 9, the new case is placed in category 0 because a majority of the nearest neighbors belong to category 0.

The effects of changing k on classification

Nearest neighbor analysis can also be used to compute values for a continuous target. In this situation, the average or median target value of the nearest neighbors is used to obtain the predicted value for the new case.

Related Topics

Notation (nearest neighbor algorithms)
Preprocessing (nearest neighbor algorithms)
Training (nearest neighbor algorithms)
Distance Metric (nearest neighbor algorithms)
Crossvalidation for Selection of k (nearest neighbor algorithms)
Feature Selection (nearest neighbor algorithms)
Combined k and Feature Selection (nearest neighbor algorithms)
Output Statistics (nearest neighbor algorithms)
Scoring (nearest neighbor algorithms)
References (nearest neighbor algorithms)


Notation (nearest neighbor algorithms)

nearest neighbor algorithms,nearest neighbor algorithms,nearest neighbor algorithms
notation,notation,notation

The following notation is used throughout this chapter unless otherwise stated:

Y

Optional 1×N vector of responses with element yn, where n=1,...,N indexes the cases.

X0

P0×N matrix of features with element x0pn, where p=1,...,P0 indexes the features and n=1,...,N indexes the cases.

X

P×N matrix of encoded features with element xpn, where p=1,...,P indexes the features and n=1,...,N indexes the cases.

P

Dimensionality of the feature space; the number of continuous features plus the number of categories across all categorical features.

N

Total number of cases.

Nj, j=1, 2,...,J

The number of cases with Y = j, where Y is a response variable with J categories

^
N
j

The number of cases which belong to class j and are correctly classified as j.

^
N
*j

The total number of cases which are classified as j.

Related Topics

KNN Algorithms
Preprocessing (nearest neighbor algorithms)
Training (nearest neighbor algorithms)
Distance Metric (nearest neighbor algorithms)
Crossvalidation for Selection of k (nearest neighbor algorithms)
Feature Selection (nearest neighbor algorithms)
Combined k and Feature Selection (nearest neighbor algorithms)
Output Statistics (nearest neighbor algorithms)
Scoring (nearest neighbor algorithms)
References (nearest neighbor algorithms)


Preprocessing (nearest neighbor algorithms)

nearest neighbor algorithms,nearest neighbor algorithms,nearest neighbor algorithms
preprocessing,preprocessing,preprocessing

Features are coded to account for differences in measurement scale.

Continuous

Continuous features are optionally coded using adjusted normalization:

xpn=2(x0pn−min(x0p))max(x0p)−min(x0p)−1

where xpn is the normalized value of input feature p for case n, x0p is the original value of the feature for case n, min(x0p) is the minimum value of the feature for all training cases, and max(x0p) is the maximum value for all training cases.

Categorical

Categorical features are always temporarily recoded using one-of-c coding. If a feature has c categories, then it is is stored as c vectors, with the first category denoted (1,0,...,0), the next category (0,1,0,...,0), ..., and the final category (0,0,...,0,1).

Related Topics

KNN Algorithms
Notation (nearest neighbor algorithms)
Training (nearest neighbor algorithms)
Distance Metric (nearest neighbor algorithms)
Crossvalidation for Selection of k (nearest neighbor algorithms)
Feature Selection (nearest neighbor algorithms)
Combined k and Feature Selection (nearest neighbor algorithms)
Output Statistics (nearest neighbor algorithms)
Scoring (nearest neighbor algorithms)
References (nearest neighbor algorithms)


Training (nearest neighbor algorithms)

nearest neighbor algorithms,nearest neighbor algorithms,nearest neighbor algorithms
training,training,training

Training a nearest neighbor model involves computing the distances between cases based upon their values in the feature set. The nearest neighbors to a given case have the smallest distances from that case. The distance metric, choice of number of nearest neighbors, and choice of the feature set have the following options.

Related Topics

KNN Algorithms
Notation (nearest neighbor algorithms)
Preprocessing (nearest neighbor algorithms)
Distance Metric (nearest neighbor algorithms)
Crossvalidation for Selection of k (nearest neighbor algorithms)
Feature Selection (nearest neighbor algorithms)
Combined k and Feature Selection (nearest neighbor algorithms)
Output Statistics (nearest neighbor algorithms)
Scoring (nearest neighbor algorithms)
References (nearest neighbor algorithms)


Distance Metric (nearest neighbor algorithms)

nearest neighbor algorithms,nearest neighbor algorithms,nearest neighbor algorithms
distance metric,distance metric,distance metric
nearest neighbor algorithms,nearest neighbor algorithms,nearest neighbor algorithms
feature weights,feature weights,feature weights
,,
nearest neighbor algorithms,nearest neighbor algorithms,nearest neighbor algorithms

We use one of the following metrics to measure the similarity of query cases and their nearest neighbors.

Euclidean Distance. The distance between two cases is the square root of the sum, over all dimensions, of the weighted squared differences between the values for the cases.

Euclideanih=
√ PΣp=1w(p)(x(p)i−x(p)h)2

City Block Distance. The distance between two cases is the sum, over all dimensions, of the weighted absolute differences between the values for the cases.

CityBlockih=PΣp=1w(p)|x(p)i−x(p)h|

The feature weight w(p) is equal to 1 when feature importance is not used to weight distances; otherwise, it is equal to the normalized feature importance:

w(p)=FI(p)/PΣp=1FI(p)

See Output Statistics (nearest neighbor algorithms) for the computation of feature importance FI(p).

Related Topics

KNN Algorithms
Notation (nearest neighbor algorithms)
Preprocessing (nearest neighbor algorithms)
Training (nearest neighbor algorithms)
Crossvalidation for Selection of k (nearest neighbor algorithms)
Feature Selection (nearest neighbor algorithms)
Combined k and Feature Selection (nearest neighbor algorithms)
Output Statistics (nearest neighbor algorithms)
Scoring (nearest neighbor algorithms)
References (nearest neighbor algorithms)


Crossvalidation for Selection of k (nearest neighbor algorithms)

nearest neighbor algorithms,nearest neighbor algorithms,nearest neighbor algorithms
k selection,k selection,k selection

Cross validation is used for automatic selection of the number of nearest neighbors, between a minimum kmin and maximum kmax. Suppose that the training set has a cross validation variable with the integer values 1,2,..., V. Then the cross validation algorithm is as follows:

For each k[kmin,kmax], compute the average error rate or sum-of square error of k: CVk=VΣv=1ev/V, where ev is the error rate or sum-of square error when we apply the Nearest Neighbor model to make predictions on the cases with X=v; that is, when we use the other cases as the training dataset.

Select the optimal k as:
^
k
=arg{minCVk:kmin≤k≤kmax}.

Note: If multiple values of k are tied on the lowest average error, we select the smallest k among those that are tied.

Related Topics

KNN Algorithms
Notation (nearest neighbor algorithms)
Preprocessing (nearest neighbor algorithms)
Training (nearest neighbor algorithms)
Distance Metric (nearest neighbor algorithms)
Feature Selection (nearest neighbor algorithms)
Combined k and Feature Selection (nearest neighbor algorithms)
Output Statistics (nearest neighbor algorithms)
Scoring (nearest neighbor algorithms)
References (nearest neighbor algorithms)


Feature Selection (nearest neighbor algorithms)

nearest neighbor algorithms,nearest neighbor algorithms,nearest neighbor algorithms
feature selection,feature selection,feature selection

Feature selection is based on the wrapper approach of Cunningham and Delany (2007) and uses forward selection which starts from JForced features which are entered into the model. Further features are chosen sequentially; the chosen feature at each step is the one that causes the largest decrease in the error rate or sum-of squares error.

Let SJ represent the set of J features that are currently chosen to be included, ScJ represents the set of remaining features and eJ represents the error rate or sum-of-squares error associated with the model based on SJ .

The algorithm is as follows:

Start with J=JForced features.

For each feature in ScJ , fit the k nearest neighbor model with this feature plus the existing features in SJ and calculate the error rate or sum-of square error for each model. The feature in ScJ whose model has the smallest error rate or sum-of square error is the one to be added to create SJ+1.

Check the selected stopping criterion. If satisfied, stop and report the chosen feature subset. Otherwise, J=J+1 and go back to the previous step.

Note: the set of encoded features associated with a categorical predictor are considered and added together as a set for the purpose of feature selection.

Stopping Criteria

One of two stopping criteria can be applied to the feature selection algorithm.

Fixed number of features. The algorithm adds a fixed number of features, Jadd, in addition to those forced into the model. The final feature subset will have Jadd+JForced features. Jadd may be user-specified or computed automatically; if computed automatically the value is

Jadd=max{min(20,P0)−JForced,0}

When this is the stopping criterion, the feature selection algorithm stops when Jadd features have been added to the model; that is, when Jadd=J+1, stop and report SJ+1 as the chosen feature subset.

Note: if Jadd=0, no features are added and SJ with J=JForced is reported as the chosen feature subset.

Change in error rate or sum of squares error. The algorithm stops when the change in the absolute error ratio indicates that the model cannot be further improved by adding more features. Specifically, if eJ+1=0 or eJ≥eJ+1 and

|eJ−eJ+1|eJ≤Δmin

where Δmin is the specified minimum change, stop and report SJ+1 as the chosen feature subset.

If eJ<eJ+1 and

|eJ−eJ+1|eJ>2Δmin

stop and report SJ as the chosen feature subset.

Note: if eJ=0 for J=JForced, no features are added and SJ with J=JForced is reported as the chosen feature subset.

Related Topics

KNN Algorithms
Notation (nearest neighbor algorithms)
Preprocessing (nearest neighbor algorithms)
Training (nearest neighbor algorithms)
Distance Metric (nearest neighbor algorithms)
Crossvalidation for Selection of k (nearest neighbor algorithms)
Combined k and Feature Selection (nearest neighbor algorithms)
Output Statistics (nearest neighbor algorithms)
Scoring (nearest neighbor algorithms)
References (nearest neighbor algorithms)


Combined k and Feature Selection (nearest neighbor algorithms)

The following method is used for combined neighbors and features selection.

1. For each k, use the forward selection method for feature selection.

2. Select the k, and accompanying feature set, with the lowest error rate or the lowest sum-of-squares error.

Related Topics

KNN Algorithms
Notation (nearest neighbor algorithms)
Preprocessing (nearest neighbor algorithms)
Training (nearest neighbor algorithms)
Distance Metric (nearest neighbor algorithms)
Crossvalidation for Selection of k (nearest neighbor algorithms)
Feature Selection (nearest neighbor algorithms)
Output Statistics (nearest neighbor algorithms)
Scoring (nearest neighbor algorithms)
References (nearest neighbor algorithms)


Output Statistics (nearest neighbor algorithms)

nearest neighbor algorithms,nearest neighbor algorithms,nearest neighbor algorithms
output statistics,output statistics,output statistics

The following statistics are available.

Percent correct for class j

^
N
jNj×100%

Overall percent for class j

^
N
*jN×100%

Intersection of Overall percent and percent correct

(JΣj=1
^
N
j/N)×100%

Error rate of classification

(1−JΣj=1
^
N
j/N)×100%

Sum-of-Square Error for continuous response

NΣn=1(yn−
^
y
n)2

where
^
y
n is the estimated value of yn.

Feature Importance

Suppose there are X(1),X(2)...X(m)(1≤m≤P0) in the model from the forward selection process with the error rate or sum-of-squares error e. The importance of feature X(p) in the model is computed by the following method.

Delete the feature X(p) from the model, make predictions and evaluate the error rate or sum-of-squares error e(p) based on features X(1),X(2)...X(p−1),X(p+1),...,X(m).

Compute the error ratio e(p)+1m.

The feature importance of X(p) is FI(p)=e(p)+1m

Related Topics

KNN Algorithms
Notation (nearest neighbor algorithms)
Preprocessing (nearest neighbor algorithms)
Training (nearest neighbor algorithms)
Distance Metric (nearest neighbor algorithms)
Crossvalidation for Selection of k (nearest neighbor algorithms)
Feature Selection (nearest neighbor algorithms)
Combined k and Feature Selection (nearest neighbor algorithms)
Scoring (nearest neighbor algorithms)
References (nearest neighbor algorithms)


Scoring (nearest neighbor algorithms)

nearest neighbor algorithms,nearest neighbor algorithms,nearest neighbor algorithms
scoring,scoring,scoring

After we find the k nearest neighbors of a case, we can classify it or predict its response value.

Categorical response

Classify each case by majority vote of its k nearest neighbors among the training cases.

If multiple categories are tied on the highest predicted probability, then the tie should be broken by choosing the category with largest number of cases in training set.

If multiple categories are tied on the largest number of cases in the training set, then choose the category with the smallest data value among the tied categories. In this case, categories are assumed to be in the ascending sort or lexical order of the data values.

We can also compute the predicted probability of each category. Suppose kj is the number of cases of the jth category among the k nearest neighbors. Instead of simply estimating the predicted probability for the jth category by kjk, we apply a Laplace correction as follows:

kj+1k+J

where J is the number of categories in the training data set.

The effect of the Laplace correction is to shrink the probability estimates towards to 1/J when the number of nearest neighbors is small. In addition, if a query case has k nearest neighbors with the same response value, the probability estimates are less than 1 and larger than 0, instead of 1 or 0.

Continuous response

Predict each case using the mean or median function.

Mean function.
^
y
n=ΣmNearest(n)ym/k, where Nearest(n) is the index set of those cases that are the nearest neighbors of case n and ym is the value of the continuous response variable for case m.

Median function. Suppose that ym,mNearest(n) are the values of the continuous response variable, and we arrange ym,mNearest(n) from the lowest value to the highest value and denote them as y(j1)≤y(m2)≤...≤y(mk), then the median is

^
y
n={
y(k+12)k is odd
y(k2)+y(k2)+12k is even

Related Topics

KNN Algorithms
Notation (nearest neighbor algorithms)
Preprocessing (nearest neighbor algorithms)
Training (nearest neighbor algorithms)
Distance Metric (nearest neighbor algorithms)
Crossvalidation for Selection of k (nearest neighbor algorithms)
Feature Selection (nearest neighbor algorithms)
Combined k and Feature Selection (nearest neighbor algorithms)
Output Statistics (nearest neighbor algorithms)
References (nearest neighbor algorithms)


References (nearest neighbor algorithms)

nearest neighbor algorithms,nearest neighbor algorithms,nearest neighbor algorithms
references,references,references

Arya, S., and D. M. Mount. 1993. Algorithms for fast vector quantization. In: Proceedings of the Data Compression Conference 1993. : IEEE Press.

Cunningham, P., and S. J. Delaney. 2007. k-Nearest Neighbor Classifiers. Technical Report UCD-CSI-2007-4, School of Computer Science and Informatics, University College Dublin, Ireland, , - .

Friedman, J. H., J. L. Bentley, and R. A. Finkel. 1977. An algorithm for finding best matches in logarithm expected time. ACM Transactions on Mathematical Software, 3, 209-226.

Related Topics

KNN Algorithms
Notation (nearest neighbor algorithms)
Preprocessing (nearest neighbor algorithms)
Training (nearest neighbor algorithms)
Distance Metric (nearest neighbor algorithms)
Crossvalidation for Selection of k (nearest neighbor algorithms)
Feature Selection (nearest neighbor algorithms)
Combined k and Feature Selection (nearest neighbor algorithms)
Output Statistics (nearest neighbor algorithms)
Scoring (nearest neighbor algorithms)


LOGISTIC REGRESSION Algorithms

LOGISTIC REGRESSION (command),LOGISTIC REGRESSION (command),LOGISTIC REGRESSION (command)
algorithms,algorithms,algorithms
Logistic Regression,Logistic Regression,Logistic Regression
algorithms,algorithms,algorithms
logistic regression algorithms,logistic regression algorithms,logistic regression algorithms

Logistic regression regresses a dichotomous dependent (target) variable on a set of independent (predictor) variables. Several methods are implemented for selecting the independent variables.

Related Topics

Notation (logistic regression algorithms)
Model (logistic regression algorithms)
Maximum Likelihood Estimates (MLE) (logistic regression algorithms)
Stepwise Variable Selection (logistic regression algorithms)
Statistics (logistic regression algorithms)


Notation (logistic regression algorithms)

logistic regression algorithms,logistic regression algorithms,logistic regression algorithms
notation,notation,notation

The following notation is used throughout this chapter unless otherwise stated:

n | The number of observed cases
p | The number of parameters
y | n×1 vector with element yi, the observed value of the ith case of the dichotomous dependent variable
X | n×p matrix with element xij, the observed value of the ith case of the jth parameter
β | p×1 vector with element βj, the coefficient for the jth parameter
w | n×1 vector with element wi, the weight for the ith case
l | Likelihood function
L | Log-likelihood function
I | Information matrix

Related Topics

LOGISTIC REGRESSION Algorithms
Model (logistic regression algorithms)
Maximum Likelihood Estimates (MLE) (logistic regression algorithms)
Stepwise Variable Selection (logistic regression algorithms)
Statistics (logistic regression algorithms)


Model (logistic regression algorithms)

logistic regression algorithms,logistic regression algorithms,logistic regression algorithms
model,model,model

The linear logistic model assumes a dichotomous dependent variable Y with probability π, where for the ith case,

πi=exp(ηi)1+exp(ηi)

or

ln(πi1−πi)=ηi=X´iβ

Hence, the likelihood function l for n observations y1, ..., yn, with probabilities π1, ..., πn and case weights w1, ..., wn, can be written as

l=n∏i=1πwiyii(1−πi)wi(1−yi)

It follows that the logarithm of l is

L=ln(l)=nΣi=1(wiyiln(πi)+wi(1−yi)ln(1−πi))

and the derivative of L with respect to βj is

L*Xj=∂L∂βj=nΣi=1wi(yi−πi)xij

Related Topics

LOGISTIC REGRESSION Algorithms
Notation (logistic regression algorithms)
Maximum Likelihood Estimates (MLE) (logistic regression algorithms)
Stepwise Variable Selection (logistic regression algorithms)
Statistics (logistic regression algorithms)


Maximum Likelihood Estimates (MLE) (logistic regression algorithms)

logistic regression algorithms,logistic regression algorithms,logistic regression algorithms
maximum likelihood estimates,maximum likelihood estimates,maximum likelihood estimates

The maximum likelihood estimates for β satisfy the following equations

nΣi=1wi(yi−
^
π
i)xij=0
, for the jth parameter

where xi0=1 for i=1, ..., n.

Note the following:

1. A Newton-Raphson type algorithm is used to obtain the MLEs. Convergence can be based on

• Absolute difference for the parameter estimates between the iterations

• Percent difference in the log-likelihood function between successive iterations

• Maximum number of iterations specified

2. During the iterations, if
^
π
i(1−
^
π
i) is smaller than 10−8 for all cases, the log-likelihood function is very close to zero. In this situation, iteration stops and the message “All predicted values are either 1 or 0” is issued.

After the maximum likelihood estimates
^
β
are obtained, the asymptotic covariance matrix is estimated by I−1, the inverse of the information matrix I, where

I=−[E(∂2L∂βi∂βj)]=X´W
^
V
X,
^
V
=Diag{
^
π
1(1−
^
π
1), ...,
^
π
n(1−
^
π
n)},
W=Diag{w1, ..., wn},
^
π
i=exp(
^
η
i)1+exp(
^
η
i),

and

^
η
i=Xi´
^
β

Related Topics

LOGISTIC REGRESSION Algorithms
Notation (logistic regression algorithms)
Model (logistic regression algorithms)
Stepwise Variable Selection (logistic regression algorithms)
Statistics (logistic regression algorithms)


Stepwise Variable Selection (logistic regression algorithms)

logistic regression algorithms,logistic regression algorithms,logistic regression algorithms
stepwise variable selection,stepwise variable selection,stepwise variable selection

Several methods are available for selecting independent variables. With the forced entry method, any variable in the variable list is entered into the model. There are two stepwise methods: forward and backward. The stepwise methods can use either the Wald statistic, the likelihood ratio, or a conditional algorithm for variable removal. For both stepwise methods, the score statistic is used to select variables for entry into the model.

Related Topics

LOGISTIC REGRESSION Algorithms
Notation (logistic regression algorithms)
Model (logistic regression algorithms)
Maximum Likelihood Estimates (MLE) (logistic regression algorithms)
Statistics (logistic regression algorithms)
Forward Stepwise (FSTEP) (logistic regression algorithms)
Backward Stepwise (BSTEP) (logistic regression algorithms)
Stepwise Statistics (logistic regression algorithms)
Score Statistic (logistic regression algorithms)
Wald Statistic (logistic regression algorithms)
Likelihood Ratio (LR) Statistic (logistic regression algorithms)
Conditional Statistic (logistic regression algorithms)


Forward Stepwise (FSTEP) (logistic regression algorithms)

1. If FSTEP is the first method requested, estimate the parameter and likelihood function for the initial model. Otherwise, the final model from the previous method is the initial model for FSTEP. Obtain the necessary information: MLEs of the parameters for the current model, predicted probability, likelihood function for the current model, and so on.

2. Based on the MLEs of the current model, calculate the score statistic for every variable eligible for inclusion and find its significance.

3. Choose the variable with the smallest significance. If that significance is less than the probability for a variable to enter, then go to step 4; otherwise, stop FSTEP.

4. Update the current model by adding a new variable. If this results in a model which has already been evaluated, stop FSTEP.

5. Calculate LR or Wald statistic or conditional statistic for each variable in the current model. Then calculate its corresponding significance.

6. Choose the variable with the largest significance. If that significance is less than the probability for variable removal, then go back to step 2; otherwise, if the current model with the variable deleted is the same as a previous model, stop FSTEP; otherwise, go to the next step.

7. Modify the current model by removing the variable with the largest significance from the previous model. Estimate the parameters for the modified model and go back to step 5.

Related Topics

Stepwise Variable Selection (logistic regression algorithms)
Backward Stepwise (BSTEP) (logistic regression algorithms)
Stepwise Statistics (logistic regression algorithms)
Score Statistic (logistic regression algorithms)
Wald Statistic (logistic regression algorithms)
Likelihood Ratio (LR) Statistic (logistic regression algorithms)
Conditional Statistic (logistic regression algorithms)


Backward Stepwise (BSTEP) (logistic regression algorithms)

1. Estimate the parameters for the full model which includes the final model from previous method and all eligible variables. Only variables listed on the BSTEP variable list are eligible for entry and removal. Let the current model be the full model.

2. Based on the MLEs of the current model, calculate the LR or Wald statistic or conditional statistic for every variable in the model and find its significance.

3. Choose the variable with the largest significance. If that significance is less than the probability for a variable removal, then go to step 5; otherwise, if the current model without the variable with the largest significance is the same as the previous model, stop BSTEP; otherwise, go to the next step.

4. Modify the current model by removing the variable with the largest significance from the model. Estimate the parameters for the modified model and go back to step 2.

5. Check to see any eligible variable is not in the model. If there is none, stop BSTEP; otherwise, go to the next step.

6. Based on the MLEs of the current model, calculate the score statistic for every variable not in the model and find its significance.

7. Choose the variable with the smallest significance. If that significance is less than the probability for variable entry, then go to the next step; otherwise, stop BSTEP.

8. Add the variable with the smallest significance to the current model. If the model is not the same as any previous models, estimate the parameters for the new model and go back to step 2; otherwise, stop BSTEP.

Related Topics

Stepwise Variable Selection (logistic regression algorithms)
Forward Stepwise (FSTEP) (logistic regression algorithms)
Stepwise Statistics (logistic regression algorithms)
Score Statistic (logistic regression algorithms)
Wald Statistic (logistic regression algorithms)
Likelihood Ratio (LR) Statistic (logistic regression algorithms)
Conditional Statistic (logistic regression algorithms)


Stepwise Statistics (logistic regression algorithms)

The statistics used in the stepwise variable selection methods are defined as follows.

Related Topics

Stepwise Variable Selection (logistic regression algorithms)
Forward Stepwise (FSTEP) (logistic regression algorithms)
Backward Stepwise (BSTEP) (logistic regression algorithms)
Score Statistic (logistic regression algorithms)
Wald Statistic (logistic regression algorithms)
Likelihood Ratio (LR) Statistic (logistic regression algorithms)
Conditional Statistic (logistic regression algorithms)


Score Statistic (logistic regression algorithms)

The score statistic is calculated for each variable not in the model to determine whether the variable should enter the model. Assume that there are r1 variables, namely, α1, ..., αr1 in the model and r2 variables, γ1, ..., γr2, not in the model. The score statistic for γi is defined as

Si=(L*γi)2B22, i

if γi is not a categorical variable. If γi is a categorical variable with m categories, it is converted to a (m−1)-dimension dummy vector. Denote these new m−1 variables as
˜
γ
i, ...,
˜
γ
i+m−2. The score statistic for γi is then

Si=(L*
˜
γ
)´B22,iL*
˜
γ

where (L*
˜
γ
)´=(L*
˜
γ
i, ..., L*
˜
γ
i+m−2) and the (m−1)×(m−1) matrix B22, i is

B22, i=(A22, i−A21, iA−111A12, i)−1

with

A11=
α
˜
´
^
V
α
˜
,
A12, i=
α
˜
´
^
V
γi
˜
,
A22, i=
γ´i
˜
i
^
V
γi
˜

in which
α
˜
is the design matrix for variables α1, ..., αr1 and
γi
˜
is the design matrix for dummy variables
˜
γ
i, ...,
˜
γ
i+m−2. Note that
α
˜
contains a column of ones unless the constant term is excluded from η. Based on the MLEs for the parameters in the model, V is estimated by
^
V
=Diag{
^
π
1(1−
^
π
1), ...,
^
π
n(1−
^
π
n)}. The asymptotic distribution of the score statistic is a chi-square with degrees of freedom equal to the number of variables involved.

Note the following:

1. If the model is through the origin and there are no variables in the model, B22, i is defined by A−122, i and
^
V
is equal to 14In.

2. If B22, i is not positive definite, the score statistic and residual chi-square statistic are set to be zero.

Related Topics

Stepwise Variable Selection (logistic regression algorithms)
Forward Stepwise (FSTEP) (logistic regression algorithms)
Backward Stepwise (BSTEP) (logistic regression algorithms)
Stepwise Statistics (logistic regression algorithms)
Wald Statistic (logistic regression algorithms)
Likelihood Ratio (LR) Statistic (logistic regression algorithms)
Conditional Statistic (logistic regression algorithms)


Wald Statistic (logistic regression algorithms)

The Wald statistic is calculated for the variables in the model to determine whether a variable should be removed. If the ith variable is not categorical, the Wald statistic is defined by

Waldi=
^
β
2i
^
σ
2
^
β
i

If it is a categorical variable, the Wald statistic is computed as follows:

Let
^
β
i be the vector of maximum likelihood estimates associated with the m−1 dummy variables, and C the asymptotic covariance matrix for
^
β
i. The Wald statistic is

Waldi=
^
β
´iC−1
^
β
i

The asymptotic distribution of the Wald statistic is chi-square with degrees of freedom equal to the number of parameters estimated.

Related Topics

Stepwise Variable Selection (logistic regression algorithms)
Forward Stepwise (FSTEP) (logistic regression algorithms)
Backward Stepwise (BSTEP) (logistic regression algorithms)
Stepwise Statistics (logistic regression algorithms)
Score Statistic (logistic regression algorithms)
Likelihood Ratio (LR) Statistic (logistic regression algorithms)
Conditional Statistic (logistic regression algorithms)


Likelihood Ratio (LR) Statistic (logistic regression algorithms)

The LR statistic is defined as two times the log of the ratio of the likelihood functions of two models evaluated at their MLEs. The LR statistic is used to determine if a variable should be removed from the model. Assume that there are r1 variables in the current model which is referred to as a full model. Based on the MLEs of the full model, l(full) is calculated. For each of the variables removed from the full model one at a time, MLEs are computed and the likelihood function l(reduced) is calculated. The LR statistic is then defined as

LR=−2ln(l(reduced)l(full))=−2(L(reduced)−L(full))

LR is asymptotically chi-square distributed with degrees of freedom equal to the difference between the numbers of parameters estimated in the two models.

Related Topics

Stepwise Variable Selection (logistic regression algorithms)
Forward Stepwise (FSTEP) (logistic regression algorithms)
Backward Stepwise (BSTEP) (logistic regression algorithms)
Stepwise Statistics (logistic regression algorithms)
Score Statistic (logistic regression algorithms)
Wald Statistic (logistic regression algorithms)
Conditional Statistic (logistic regression algorithms)


Conditional Statistic (logistic regression algorithms)

The conditional statistic is also computed for every variable in the model. The formula for the conditional statistic is the same as the LR statistic except that the parameter estimates for each reduced model are conditional estimates, not MLEs. The conditional estimates are defined as follows. Let
^
β
=(
^
β
1, ...,
^
β
r1)´ be the MLE for the r1 variables in the model and C be the asymptotic covariance matrix for
^
β
. If variable xi is removed from the model, the conditional estimate for the parameters left in the model given
^
β
is

˜
β
(i)=
^
β
(i)−c(i)12(c(i)22)−1
^
β
i

where
^
βi
is the MLE for the parameter(s) associated with xi and
^
β(i)
is
^
β
with
^
βi
removed, c(i)12 is the covariance between
^
β(i)
and
^
βi
, and c(i)22 is the covariance of
^
βi
. Then the conditional statistic is computed by

−2(L(
˜
β
(i))−L(full))

where L(
˜
β
(i)) is the log-likelihood function evaluated at
^
β(i)
.

Related Topics

Stepwise Variable Selection (logistic regression algorithms)
Forward Stepwise (FSTEP) (logistic regression algorithms)
Backward Stepwise (BSTEP) (logistic regression algorithms)
Stepwise Statistics (logistic regression algorithms)
Score Statistic (logistic regression algorithms)
Wald Statistic (logistic regression algorithms)
Likelihood Ratio (LR) Statistic (logistic regression algorithms)


Statistics (logistic regression algorithms)

logistic regression algorithms,logistic regression algorithms,logistic regression algorithms
output statistics,output statistics,output statistics

The following output statistics are available.

Related Topics

LOGISTIC REGRESSION Algorithms
Notation (logistic regression algorithms)
Model (logistic regression algorithms)
Maximum Likelihood Estimates (MLE) (logistic regression algorithms)
Stepwise Variable Selection (logistic regression algorithms)


Initial Model Information (logistic regression algorithms)

If β0 is not included in the model, the predicted probability is estimated to be 0.5 for all cases and the log-likelihood function L(0) is

L(0)=Wln(0.5)=−0.6931472W

with W=nΣi=1wi. If β0 is included in the model, the predicted probability is estimated as

^
π
0=nΣi=1wiyiW

and β0 is estimated by

^
β
0=ln(
^
π
01−
^
π
0)

with asymptotic standard error estimated by

^
σ
^
β
0=1
√ W
^
π
0(1−
^
π
0)

The log-likelihood function is

L(0)=W[
^
π
0ln(
^
π
01−
^
π
0)+ln(1−
^
π
0).]


Model Information (logistic regression algorithms)

The following statistics are computed if a stepwise method is specified.

–2 Log-Likelihood

−2nΣi=1(wiyiln(
^
π
i)+wi(1−yi)ln(1−
^
π
i))

Model Chi-Square

2(log-likelihood function for current model − log-likelihood function for initial model)

The initial model contains a constant if it is in the model; otherwise, the model has no terms. The degrees of freedom for the model chi-square statistic is equal to the difference between the numbers of parameters estimated in each of the two models. If the degrees of freedom is zero, the model chi-square is not computed.

Block Chi-Square

2(log-likelihood function for current model − log-likelihood function for the final model from the previous method)

The degrees of freedom for the block chi-square statistic is equal to the difference between the numbers of parameters estimated in each of the two models.

Improvement Chi-Square

2(log-likelihood function for current model − log-likelihood function for the model from the last step)

The degrees of freedom for the improvement chi-square statistic is equal to the difference between the numbers of parameters estimated in each of the two models.

Goodness of Fit

nΣi=1wi(yi−
^
π
i)2
^
π
i(1−
^
π
i)

Cox and Snell’s R-Square (Cox and Snell, 1989; Nagelkerke, 1991)

R2CS=1−(l(0)l(
^
β
))2W

where l(
^
β
) is the likelihood of the current model and l(0) is the likelihood of the initial model; that is, l(0)=Wlog(0.5) if the constant is not included in the model; l(0)=W[
^
π
olog{
^
π
o/(1−
^
π
o)}+log(1−
^
π
o)] if the constant is included in the model, where
^
π
o=Σniwiyi/W.

Nagelkerke’s R-Square (Nagelkerke, 1981)

R2N=R2CS/max(R2CS)

where max(R2CS)=1−{l(0)}2/W.


Hosmer-Lemeshow Goodness-of-Fit Statistic (logistic regression algorithms)

Hosmer-Lemeshow goodness-of-fit statistic,Hosmer-Lemeshow goodness-of-fit statistic,Hosmer-Lemeshow goodness-of-fit statistic
logistic regression algorithms,logistic regression algorithms,logistic regression algorithms

The test statistic is obtained by applying a chi-square test on a 2×g contingency table. The contingency table is constructed by cross-classifying the dichotomous dependent variable with a grouping variable (with g groups) in which groups are formed by partitioning the predicted probabilities using the percentiles of the predicted event probability. In the calculation, approximately 10 groups are used (g=10). The corresponding groups are often referred to as the “deciles of risk” (Hosmer and Lemeshow, 2000).

If the values of independent variables for observation i and i' are the same, observations i and i' are said to be in the same block. When one or more blocks occur within the same decile, the blocks are assigned to this same group. Moreover, observations in the same block are not divided when they are placed into groups. This strategy may result in fewer than 10 groups (that is, g≤10) and consequently, fewer degrees of freedom.

Suppose that there are Q blocks, and the qth block has mq number of observations, q=1,...,Q. Moreover, suppose that the kth group (k=1,...,g) is composed of the q1th, …, qkth blocks of observations. Then the total number of observations in the kth group is sk=Σqkq1mj. The total observed frequency of events (that is, Y=1) in the kth group, call it O1k, is the total number of observations in the kth group with Y=1. Let E1k be the total expected frequency of the event in the kth group; then E1k is given by E1k=skξk, where ξk is the average predicted event probability for the kth group.

ξk=Σqkq1mj
^
π
j/sk

The Hosmer-Lemeshow goodness-of-fit statistic is computed as

χ2HL=gΣk=1(O1k−E1k)2E1k(1−ξk)

The p value is given by Pr(χ2≥χ2HL) where χ2 is the chi-square statistic distributed with degrees of freedom (g−2).

Related Topics

Individual Deviance (logistic regression algorithms)
Leverage (logistic regression algorithms)
Studentized Residual (logistic regression algorithms)
Logit Residual (logistic regression algorithms)
Standardized Residual (logistic regression algorithms)
Cook’s Distance (logistic regression algorithms)
DFBETA (logistic regression algorithms)
Predicted Group (logistic regression algorithms)


Information for the Variables Not in the Equation (logistic regression algorithms)

For each of the variables not in the equation, the score statistic is calculated along with the associated degrees of freedom, significance and partial R. Let Xi be a variable not currently in the model and Si the score statistic. The partial R is defined by

Partial_R={
√ Si−2×df−2L(initial)
if Si>2×df
0 otherwise

where df is the degrees of freedom associated with Si, and L(initial) is the log-likelihood function for the initial model.

The residual Chi-Square printed for the variables not in the equation is defined as

RCS=(L* g )´B22L* g

where L* g =(L*γ1, ..., L*γr2)´


Information for the Variables in the Equation (logistic regression algorithms)

For each of the variables in the equation, the MLE of the Beta coefficients is calculated along with the standard errors, Wald statistics, degrees of freedom, significances, and partial R. If Xi is not a categorical variable currently in the equation, the partial R is computed as

Partial_R={
sign(
^
β
i)
√ Waldi−2−2L(initial)
if Waldi>2
0 otherwise

If Xi is a categorical variable with m categories, the partial R is then

Partial_R={
√ Waldi−2(m−1)−2L(initial)
if Waldi>2(m−1)
0 otherwise


Casewise Statistics (logistic regression algorithms)

The following statistics are computed for each case.


Individual Deviance (logistic regression algorithms)

deviance,deviance,deviance
logistic regression algorithms,logistic regression algorithms,logistic regression algorithms

The deviance of the ith case, Gi, is defined as

Gi={
√ 2(yiln(
^
π
i)+(1−yi)ln(1−
^
π
i))
if yi>
^
π
i
−
√ 2(yiln(
^
π
i)+(1−yi)ln(1−
^
π
i))
otherwise

Related Topics

Hosmer-Lemeshow Goodness-of-Fit Statistic (logistic regression algorithms)
Leverage (logistic regression algorithms)
Studentized Residual (logistic regression algorithms)
Logit Residual (logistic regression algorithms)
Standardized Residual (logistic regression algorithms)
Cook’s Distance (logistic regression algorithms)
DFBETA (logistic regression algorithms)
Predicted Group (logistic regression algorithms)


Leverage (logistic regression algorithms)

leverage,leverage,leverage
logistic regression algorithms,logistic regression algorithms,logistic regression algorithms

The leverage of the ith case, hi, is the ith diagonal element of the matrix

^
V
12X(X´C
^
V
X)−1X´
^
V
12

where

^
V
=Diag{
^
π
1(1−
^
π
1), ...,
^
π
n(1−
^
π
n)}

Related Topics

Hosmer-Lemeshow Goodness-of-Fit Statistic (logistic regression algorithms)
Individual Deviance (logistic regression algorithms)
Studentized Residual (logistic regression algorithms)
Logit Residual (logistic regression algorithms)
Standardized Residual (logistic regression algorithms)
Cook’s Distance (logistic regression algorithms)
DFBETA (logistic regression algorithms)
Predicted Group (logistic regression algorithms)


Studentized Residual (logistic regression algorithms)

studentized residuals,studentized residuals,studentized residuals
logistic regression algorithms,logistic regression algorithms,logistic regression algorithms

˜
G
*i=Gi
√ 1−hi

Related Topics

Hosmer-Lemeshow Goodness-of-Fit Statistic (logistic regression algorithms)
Individual Deviance (logistic regression algorithms)
Leverage (logistic regression algorithms)
Logit Residual (logistic regression algorithms)
Standardized Residual (logistic regression algorithms)
Cook’s Distance (logistic regression algorithms)
DFBETA (logistic regression algorithms)
Predicted Group (logistic regression algorithms)


Logit Residual (logistic regression algorithms)

logit residuals,logit residuals,logit residuals
logistic regression algorithms,logistic regression algorithms,logistic regression algorithms

˜
e
i=ei
^
π
i(1−
^
π
i)

where ei=yi−
^
π
i

Related Topics

Hosmer-Lemeshow Goodness-of-Fit Statistic (logistic regression algorithms)
Individual Deviance (logistic regression algorithms)
Leverage (logistic regression algorithms)
Studentized Residual (logistic regression algorithms)
Standardized Residual (logistic regression algorithms)
Cook’s Distance (logistic regression algorithms)
DFBETA (logistic regression algorithms)
Predicted Group (logistic regression algorithms)


Standardized Residual (logistic regression algorithms)

standardized residuals,standardized residuals,standardized residuals
logistic regression algorithms,logistic regression algorithms,logistic regression algorithms

zi=ei
√
^
π
i(1−
^
π
i)

Related Topics

Hosmer-Lemeshow Goodness-of-Fit Statistic (logistic regression algorithms)
Individual Deviance (logistic regression algorithms)
Leverage (logistic regression algorithms)
Studentized Residual (logistic regression algorithms)
Logit Residual (logistic regression algorithms)
Cook’s Distance (logistic regression algorithms)
DFBETA (logistic regression algorithms)
Predicted Group (logistic regression algorithms)


Cook’s Distance (logistic regression algorithms)

Cook's distance,Cook's distance,Cook's distance
logistic regression algorithms,logistic regression algorithms,logistic regression algorithms

Di=z2ihi1−hi

Related Topics

Hosmer-Lemeshow Goodness-of-Fit Statistic (logistic regression algorithms)
Individual Deviance (logistic regression algorithms)
Leverage (logistic regression algorithms)
Studentized Residual (logistic regression algorithms)
Logit Residual (logistic regression algorithms)
Standardized Residual (logistic regression algorithms)
DFBETA (logistic regression algorithms)
Predicted Group (logistic regression algorithms)


DFBETA (logistic regression algorithms)

DfBeta,DfBeta,DfBeta
logistic regression algorithms,logistic regression algorithms,logistic regression algorithms

Let Δβi be the change of the coefficient estimates from the deletion of case i. It is computed as

Δβi=(X´C
^
V
X)−1X´iei1−hi

Related Topics

Hosmer-Lemeshow Goodness-of-Fit Statistic (logistic regression algorithms)
Individual Deviance (logistic regression algorithms)
Leverage (logistic regression algorithms)
Studentized Residual (logistic regression algorithms)
Logit Residual (logistic regression algorithms)
Standardized Residual (logistic regression algorithms)
Cook’s Distance (logistic regression algorithms)
Predicted Group (logistic regression algorithms)


Predicted Group (logistic regression algorithms)

predicted group,predicted group,predicted group
logistic regression algorithms,logistic regression algorithms,logistic regression algorithms

If
^
π
i≥0.5, the predicted group is the group in which y=1.

Note the following:

For the unselected cases with nonmissing values for the independent variables in the analysis, the leverage (
˜
h
i) is computed as

˜
h
i=hi−
^
V
ih2i1+
^
V
ihi

where

hi=
^
V
iX´i(X´C
^
V
X)−1Xi

For the unselected cases, the Cook’s distance and DFBETA are calculated based on
˜
h
i.

Related Topics

Hosmer-Lemeshow Goodness-of-Fit Statistic (logistic regression algorithms)
Individual Deviance (logistic regression algorithms)
Leverage (logistic regression algorithms)
Studentized Residual (logistic regression algorithms)
Logit Residual (logistic regression algorithms)
Standardized Residual (logistic regression algorithms)
Cook’s Distance (logistic regression algorithms)
DFBETA (logistic regression algorithms)


LOGLINEAR Algorithms

LOGLINEAR (command),LOGLINEAR (command),LOGLINEAR (command)
algorithms,algorithms,algorithms
loglinear models algorithms,loglinear models algorithms,loglinear models algorithms

The LOGLINEAR procedure models cell frequencies using the multinomial response model and produces maximum likelihood estimates of parameters by the Newton-Raphson method. The contingency tables are converted to two-way I×J tables, with I and J being the dimensions of the independent and dependent categorical variables respectively.

Related Topics

Notation (loglinear models algorithms)
Model (loglinear models algorithms)
Contrasts (loglinear models algorithms)
Computational Algorithm (loglinear models algorithms)
Computed Statistics (loglinear models algorithms)
Residuals (loglinear models algorithms)
Generalized Residuals (loglinear models algorithms)
Analysis of Dispersion (loglinear models algorithms)
References (loglinear models algorithms)


Notation (loglinear models algorithms)

loglinear models algorithms,loglinear models algorithms,loglinear models algorithms
notation,notation,notation

The following notation is used throughout this chapter unless otherwise stated:

nij

Observed frequency of cell (i, j)

I

Dimension of the row variable, associated with independent variables

J

Dimension of the column variable, associated with dependent variables

wij

Weight of cell (i, j)

βk

Coefficients in the loglinear model; 1≤k≤p

β(l)k

Estimate of βk at the lth iteration

^
β
k

Final estimate of βk

mij

Expected values of nij

m(l)ij

Estimate of mij at the lth iteration

^
m
ij

Estimate of mij at the final iteration

^
M
i.

JΣj=1
^
m
ij

^
M
.j

IΣi=1
^
m
ij

M

JΣj=1IΣi=1
^
m
ij

Related Topics

LOGLINEAR Algorithms
Model (loglinear models algorithms)
Contrasts (loglinear models algorithms)
Computational Algorithm (loglinear models algorithms)
Computed Statistics (loglinear models algorithms)
Residuals (loglinear models algorithms)
Generalized Residuals (loglinear models algorithms)
Analysis of Dispersion (loglinear models algorithms)
References (loglinear models algorithms)


Model (loglinear models algorithms)

loglinear models algorithms,loglinear models algorithms,loglinear models algorithms
model,model,model

In the general LOGLINEAR model, the logarithms of the cell frequencies are formulated as a linear function of the parameters. The actual form of the model is determined by the contrast and the effects specified. The model has the form

yij≡ln(mijwij)=λi+pΣk=1βkxijk 1≤i≤I, 1≤j≤J

where λi are chosen so that
Σ
j
mij=
Σ
j
nij, and xijk are the independent variables in the linear model.

Related Topics

LOGLINEAR Algorithms
Notation (loglinear models algorithms)
Contrasts (loglinear models algorithms)
Computational Algorithm (loglinear models algorithms)
Computed Statistics (loglinear models algorithms)
Residuals (loglinear models algorithms)
Generalized Residuals (loglinear models algorithms)
Analysis of Dispersion (loglinear models algorithms)
References (loglinear models algorithms)


Contrasts (loglinear models algorithms)

The values of xijk are determined by the types of contrasts specified in the procedure. The default contrast is DEVIATION.

Related Topics

LOGLINEAR Algorithms
Notation (loglinear models algorithms)
Model (loglinear models algorithms)
Computational Algorithm (loglinear models algorithms)
Computed Statistics (loglinear models algorithms)
Residuals (loglinear models algorithms)
Generalized Residuals (loglinear models algorithms)
Analysis of Dispersion (loglinear models algorithms)
References (loglinear models algorithms)


Computational Algorithm (loglinear models algorithms)

To estimate the coefficients, a series of weighted regressions is used for iterative calculations. The iterative process is outlined (also see Haberman, 1978) as follows:

(1) Obtain initial approximations y(0)ij and use them to obtain β(0)k.

(2) Obtain the next approximations y(1)ij and m(1)ij.

(3) Use the updated y(1)ij in (2) to obtain the next approximations β(1)k.

(4) Repeat steps 2 and 3, replacing β(l)k with β(l+1)k. Continue repeating this until convergence is achieved.

The computations begin with selection of initial approximations m(0)ij=nij+δ for mij. The default for δ is 0.5. If the model is saturated, δ is added to nij permanently. If the model is not saturated, δ is added to nij only at the initial step and is then subtracted at the second step.

The maximum likelihood estimates
^
β
k of βk are found by the Newton-Raphson method. Let β(l) be the column vector containing the ML estimates at the lth iteration; then

β(0)=(C(0))−1a(0)
β(l+1)=β(l)+(C(l+1))−1a(l+1),
for l≥0,

where the (k, l)-element of C(l) is

c(l)k l=JΣj=1IΣi=1(xijk−θ(l)ik)(xijl−θ(l)il)m(l)ij

with

θ(l)ik=
Σ
j
m(l)ijxijk
Σ
j
m(l)ij 		for 1≤i≤I, 1≤k≤p

and the kth element of a(0) is

a(0)k=
Σ
i,j
xijky(0)ijm(0)ij−(
Σ
i,j
xijkm(0)ij)(
Σ
i,j
yijm(0)ij)
Σ
i,j
m(0)ij

and the kth element of a(l) is

a(l)k=
Σ
i,j
xijk(nij−m(l)ij) 		for l≥1

The estimated cell means are updated by

m(l)ij=Twijexp(v(l−1)ij)
Σ
i,j
wijexp(v(l−1)ij) 		for l≥1

where

T={
Σ
i,j
(nij+δ) 		if the model is saturated
Σ
i,j
(nij)
otherwise

and

v(l−1)ij=pΣk=1xijkβ(l−1)k

The iterative process stops when either the maximum number of iterations (default=20) is reached or

maxi,j|v(l+1)ij−v(l)ij|<ε ( with default ε=0.001).

Related Topics

LOGLINEAR Algorithms
Notation (loglinear models algorithms)
Model (loglinear models algorithms)
Contrasts (loglinear models algorithms)
Computed Statistics (loglinear models algorithms)
Residuals (loglinear models algorithms)
Generalized Residuals (loglinear models algorithms)
Analysis of Dispersion (loglinear models algorithms)
References (loglinear models algorithms)


Computed Statistics (loglinear models algorithms)

The following output statistics are available.

Related Topics

LOGLINEAR Algorithms
Notation (loglinear models algorithms)
Model (loglinear models algorithms)
Contrasts (loglinear models algorithms)
Computational Algorithm (loglinear models algorithms)
Residuals (loglinear models algorithms)
Generalized Residuals (loglinear models algorithms)
Analysis of Dispersion (loglinear models algorithms)
References (loglinear models algorithms)
Correlation Matrix of Parameter Estimates (loglinear models algorithms)
Goodness of Fit (loglinear models algorithms)


Correlation Matrix of Parameter Estimates (loglinear models algorithms)

Let C be the final C(l) and H=C−1. The correlation between
^
β
i and
^
β
j is computed as

hij
√ hiihjj

Related Topics

Computed Statistics (loglinear models algorithms)
Goodness of Fit (loglinear models algorithms)


Goodness of Fit (loglinear models algorithms)

goodness of fit,goodness of fit,goodness of fit
loglinear models algorithms,loglinear models algorithms,loglinear models algorithms

The Pearson chi-square is computed as

χ2=
Σ
i,j
(nij−
^
m
ij)2
^
m
ij

and the likelihood-ratio chi-square is

L=2
Σ
i,j
nijln(nij
^
m
ij)

The degrees of freedom are I×(J−1)−p−E, where E is the number of cells with nijwij≤0 and p is the number of coefficients in the model.

Related Topics

Computed Statistics (loglinear models algorithms)
Correlation Matrix of Parameter Estimates (loglinear models algorithms)


Residuals (loglinear models algorithms)

loglinear models algorithms,loglinear models algorithms,loglinear models algorithms
residuals,residuals,residuals

The following residuals are available.

Related Topics

LOGLINEAR Algorithms
Notation (loglinear models algorithms)
Model (loglinear models algorithms)
Contrasts (loglinear models algorithms)
Computational Algorithm (loglinear models algorithms)
Computed Statistics (loglinear models algorithms)
Generalized Residuals (loglinear models algorithms)
Analysis of Dispersion (loglinear models algorithms)
References (loglinear models algorithms)
Unadjusted Residuals (loglinear models algorithms)
Standardized Residuals (loglinear models algorithms)
Adjusted Residuals (loglinear models algorithms)


Unadjusted Residuals (loglinear models algorithms)

residualij=nij−
^
m
ij

Related Topics

Residuals (loglinear models algorithms)
Standardized Residuals (loglinear models algorithms)
Adjusted Residuals (loglinear models algorithms)


Standardized Residuals (loglinear models algorithms)

standard residualij=nij−
^
m
ij
√
^
m
ij

Related Topics

Residuals (loglinear models algorithms)
Unadjusted Residuals (loglinear models algorithms)
Adjusted Residuals (loglinear models algorithms)


Adjusted Residuals (loglinear models algorithms)

adjusted residualij=nij−
^
m
ij
√ sij

where

sij=
^
m
ij[1−
^
m
ijT−
^
m
ij
Σ
k,l
(xijk−
^
θ
ik)(xijl−
^
θ
il)hkl]
^
θ
ik=
Σ
j
^
m
ijxijk
Σ
j
^
m
ij

Related Topics

Residuals (loglinear models algorithms)
Unadjusted Residuals (loglinear models algorithms)
Standardized Residuals (loglinear models algorithms)


Generalized Residuals (loglinear models algorithms)

loglinear models algorithms,loglinear models algorithms,loglinear models algorithms
generalized residuals,generalized residuals,generalized residuals

Consider a linear combination of the cell counts

Σ
i,j
dijnij

The estimated expected value is computed as

Σ
i,j
dij
^
m
ij

Two generalized residuals are computed.

Related Topics

LOGLINEAR Algorithms
Notation (loglinear models algorithms)
Model (loglinear models algorithms)
Contrasts (loglinear models algorithms)
Computational Algorithm (loglinear models algorithms)
Computed Statistics (loglinear models algorithms)
Residuals (loglinear models algorithms)
Analysis of Dispersion (loglinear models algorithms)
References (loglinear models algorithms)
Unadjusted Residuals (loglinear models algorithms)
Adjusted Residuals (loglinear models algorithms)


Unadjusted Residuals (loglinear models algorithms)

residual=
Σ
i,j
dijnij−
Σ
i,j
dij
^
m
ij

Related Topics

Generalized Residuals (loglinear models algorithms)
Adjusted Residuals (loglinear models algorithms)


Adjusted Residuals (loglinear models algorithms)

adjusted residual=
Σ
i,j
dijnij−
Σ
i,j
dij
^
m
ij
√ C1

where

C1=
Σ
i,j
d2ij
^
m
ij−
Σ
i
[(
Σ
j
^
m
ijdij)2
Σ
j
^
m
ij]−pΣk=1pΣl=1fkflhkl
fk=
Σ
i,j
^
m
ijdij(xijk−
^
θ
ik)

Related Topics

Generalized Residuals (loglinear models algorithms)
Unadjusted Residuals (loglinear models algorithms)


Analysis of Dispersion (loglinear models algorithms)

Following Haberman (1982), define

S(Y)= Total dispersion
S(Y|X)= Conditional dispersion
S(X)= Dispersion due to fit
R = S(X)S(Y)= Measure of association

For entropy

S(Y)=−MJΣj=1
^
p
jln(
^
p
j)
S(Y|X)=−IΣi=1
^
M
i·JΣj=1
^
p
i|jln﻿(
^
p
i|j)
S(X)=S(Y)−S(Y|X)

For concentration

S(Y)=M×(1−JΣj=1
^
p
2j)
S(Y|X)=IΣi=1
^
M
i·(1−JΣj=1
^
p
2i|j)
S(X)=S(Y)−S(Y|X)

where

^
p
j=
^
M
·jM
^
p
j|i=
^
m
ij
^
M
i·

Haberman (1977) shows that, under the hypothesis that Y and X are independent,

ψE=2S(X)→χ2I(J−1)

in the case of entropy, and

ψC=M(J−1)S(X)S(Y)→χ2I−1

in the case of concentration.

Related Topics

LOGLINEAR Algorithms
Notation (loglinear models algorithms)
Model (loglinear models algorithms)
Contrasts (loglinear models algorithms)
Computational Algorithm (loglinear models algorithms)
Computed Statistics (loglinear models algorithms)
Residuals (loglinear models algorithms)
Generalized Residuals (loglinear models algorithms)
References (loglinear models algorithms)


References (loglinear models algorithms)

loglinear models algorithms,loglinear models algorithms,loglinear models algorithms
references,references,references

Haberman, S. J. 1977. Maximum likelihood estimates in exponential response models. Annals of Statistics, 5, 815-841.

Haberman, S. J. 1978. Analysis of qualitative data. London: Academic Press.

Haberman, S. J. 1982. Analysis of dispersion of multinomial responses. Journal of the American Statistical Association, 77, 568-580.

Related Topics

LOGLINEAR Algorithms
Notation (loglinear models algorithms)
Model (loglinear models algorithms)
Contrasts (loglinear models algorithms)
Computational Algorithm (loglinear models algorithms)
Computed Statistics (loglinear models algorithms)
Residuals (loglinear models algorithms)
Generalized Residuals (loglinear models algorithms)
Analysis of Dispersion (loglinear models algorithms)


MANOVA Algorithms

MANOVA (command),MANOVA (command),MANOVA (command)
algorithms,algorithms,algorithms
multivariate analysis of variance algorithms,multivariate analysis of variance algorithms,multivariate analysis of variance algorithms

The program performs univariate and multivariate analysis of variance and covariance for any crossed and/or nested design.

Related Topics

Analysis of Variance (MANOVA algorithms)
Analysis of Covariance (MANOVA algorithms)
Repeated Measures (MANOVA algorithms)
Effect Size (MANOVA algorithms)
References (MANOVA algorithms)


Analysis of Variance (MANOVA algorithms)

The following topics detail computational formulas for MANOVA's use in the analysis of variance.

Related Topics

MANOVA Algorithms
Analysis of Covariance (MANOVA algorithms)
Repeated Measures (MANOVA algorithms)
Effect Size (MANOVA algorithms)
References (MANOVA algorithms)
Notation (MANOVA algorithms)
Reparameterization (MANOVA algorithms)
Parameter Estimation (MANOVA algorithms)
Significance Tests (MANOVA algorithms)
Pillai's Criterion (Pillai, 1967) (MANOVA algorithms)
Hotelling's Trace (MANOVA algorithms)
Wilks' Lambda (Rao, 1973) (MANOVA algorithms)
Roy's Largest Root (MANOVA algorithms)
Stepdown F Tests (MANOVA algorithms)
Design Matrix (MANOVA algorithms)
Estimated Cell Means (MANOVA algorithms)


Notation (MANOVA algorithms)

MANOVA algorithms,MANOVA algorithms,MANOVA algorithms
notation,notation,notation

The experimental design model (the model with covariates will be discussed later) can be expressed as

Y | = | W | β | + | E
N×p |  | N×m | m×p |  | N×p

where

Y | is the observed matrix
W | is the design matrix
β | is the matrix of parameters
E | is the matrix of random errors
N | is the total number of observations
p | is the number of dependent variables
m | is the number of parameters

Since the rows of W will be identical for all observations in the same cell, the model is rewritten in terms of cell means as

Y· | = | A | β | + | E·
g×p |  | g×m | m×p |  | g×p

where g is the number of cells and Y· and E· denote matrices of means.

Related Topics

Analysis of Variance (MANOVA algorithms)
Reparameterization (MANOVA algorithms)
Parameter Estimation (MANOVA algorithms)
Significance Tests (MANOVA algorithms)
Pillai's Criterion (Pillai, 1967) (MANOVA algorithms)
Hotelling's Trace (MANOVA algorithms)
Wilks' Lambda (Rao, 1973) (MANOVA algorithms)
Roy's Largest Root (MANOVA algorithms)
Stepdown F Tests (MANOVA algorithms)
Design Matrix (MANOVA algorithms)
Estimated Cell Means (MANOVA algorithms)


Reparameterization (MANOVA algorithms)

The reparameterization of the model (Bock, 1975; Finn, 1977) is done by factoring A into

A | = | K | L
g×m |  | g×r | r×m

K forms a column basis for the model and has rank r. The contrast matrix L contains the coefficients of linear combinations of parameters and has rank r. L can be specified by the user. Given L, K can be obtained from AL´(LL´)−1. For designs with more than one factor, L, and hence K, can be constructed from Kronecker products of contrast matrices of each factor. After reparameterization, the model can be expressed as

Y
g×p
=Aβ+E
=K(Lβ)+E
=
K | q | + | E
g×r | r×p |  | g×p

Related Topics

Analysis of Variance (MANOVA algorithms)
Notation (MANOVA algorithms)
Parameter Estimation (MANOVA algorithms)
Significance Tests (MANOVA algorithms)
Pillai's Criterion (Pillai, 1967) (MANOVA algorithms)
Hotelling's Trace (MANOVA algorithms)
Wilks' Lambda (Rao, 1973) (MANOVA algorithms)
Roy's Largest Root (MANOVA algorithms)
Stepdown F Tests (MANOVA algorithms)
Design Matrix (MANOVA algorithms)
Estimated Cell Means (MANOVA algorithms)


Parameter Estimation (MANOVA algorithms)

An orthogonal decomposition (Golub, 1969) is performed on K. That is, K is represented as

K=QR

where Q is an orthonormal matrix such that Q´DQ=I; D is the diagonal matrix of cell frequencies; and R is an upper-triangular matrix.

The normal equation of the model is

(K´DK)
^
θ
=K´DY

or

R
^
θ
=Q´DY=U

This triangular system can therefore be solved forming the cross-product matrix.

Related Topics

Analysis of Variance (MANOVA algorithms)
Notation (MANOVA algorithms)
Reparameterization (MANOVA algorithms)
Significance Tests (MANOVA algorithms)
Pillai's Criterion (Pillai, 1967) (MANOVA algorithms)
Hotelling's Trace (MANOVA algorithms)
Wilks' Lambda (Rao, 1973) (MANOVA algorithms)
Roy's Largest Root (MANOVA algorithms)
Stepdown F Tests (MANOVA algorithms)
Design Matrix (MANOVA algorithms)
Estimated Cell Means (MANOVA algorithms)


Significance Tests (MANOVA algorithms)

The sum of squares and cross-products (SSCP) matrix due to the model is

^
θ
´R´R
^
θ
=U´U

and since var(U)=R var(θ)R´=I S the SSCP matrix of each individual effect can be obtained from the components of

U´U=(U1, ..., Uk)(
U´1
·
·
·
U´k
)=U1U´1+ ...+ UkU´k

Therefore the hypothesis SSCP matrix for testing Ho:θh=0 is

SH=
p×p

Uh
p×nh

U´h
nh×p

The default error SSCP matrix is the pooled within-groups SSCP:

SE=Y´Y−Y´DY

if the pooled within-groups SSCP matrix does not exist, the residual SSCP matrix is used:

SE=Y´Y−U´U

Four test criteria are available. Each of these statistics is a function of the nonzero eigenvalues λi of the matrix SHS−1E. The number of nonzero eigenvalues, s, is equal to min(p, nh).

Related Topics

Analysis of Variance (MANOVA algorithms)
Notation (MANOVA algorithms)
Reparameterization (MANOVA algorithms)
Parameter Estimation (MANOVA algorithms)
Pillai's Criterion (Pillai, 1967) (MANOVA algorithms)
Hotelling's Trace (MANOVA algorithms)
Wilks' Lambda (Rao, 1973) (MANOVA algorithms)
Roy's Largest Root (MANOVA algorithms)
Stepdown F Tests (MANOVA algorithms)
Design Matrix (MANOVA algorithms)
Estimated Cell Means (MANOVA algorithms)


Pillai's Criterion (Pillai, 1967) (MANOVA algorithms)

Pillai's criterion,Pillai's criterion,Pillai's criterion
MANOVA algorithms,MANOVA algorithms,MANOVA algorithms

T=sΣi=1λi/(1+λi)

Approximate F=(ne−p−s)T/(b(s−T)) with bs and s(ne−p+s) degrees of freedom, where

ne= degrees of freedom for SE
b=max(p, nh)

Related Topics

Analysis of Variance (MANOVA algorithms)
Notation (MANOVA algorithms)
Reparameterization (MANOVA algorithms)
Parameter Estimation (MANOVA algorithms)
Significance Tests (MANOVA algorithms)
Hotelling's Trace (MANOVA algorithms)
Wilks' Lambda (Rao, 1973) (MANOVA algorithms)
Roy's Largest Root (MANOVA algorithms)
Stepdown F Tests (MANOVA algorithms)
Design Matrix (MANOVA algorithms)
Estimated Cell Means (MANOVA algorithms)


Hotelling's Trace (MANOVA algorithms)

Hotelling's trace,Hotelling's trace,Hotelling's trace
MANOVA algorithms,MANOVA algorithms,MANOVA algorithms

T=sΣi=1λi

Approximate F=2(sn+1)T/(s2(2m+s+1)) with s(2m+s+1) and 2(sn+1) degrees of freedom where

m=(|nh−p|−1)/2
n=(ne−p−1)/2

Related Topics

Analysis of Variance (MANOVA algorithms)
Notation (MANOVA algorithms)
Reparameterization (MANOVA algorithms)
Parameter Estimation (MANOVA algorithms)
Significance Tests (MANOVA algorithms)
Pillai's Criterion (Pillai, 1967) (MANOVA algorithms)
Wilks' Lambda (Rao, 1973) (MANOVA algorithms)
Roy's Largest Root (MANOVA algorithms)
Stepdown F Tests (MANOVA algorithms)
Design Matrix (MANOVA algorithms)
Estimated Cell Means (MANOVA algorithms)


Wilks' Lambda (Rao, 1973) (MANOVA algorithms)

Wilk's Lambda,Wilk's Lambda,Wilk's Lambda
MANOVA algorithms,MANOVA algorithms,MANOVA algorithms

T=s∏i=11/(1+λi)

Approximate F=(1−T1/l)(Ml+1−nhp/2)/(T1/lnhp) with nhp and (Ml+1−nhp/2) degrees of freedom, where

l2=(p2n2h−4)/(p2+n2h−5)
M=ne−(p+1−nh)/2

Related Topics

Analysis of Variance (MANOVA algorithms)
Notation (MANOVA algorithms)
Reparameterization (MANOVA algorithms)
Parameter Estimation (MANOVA algorithms)
Significance Tests (MANOVA algorithms)
Pillai's Criterion (Pillai, 1967) (MANOVA algorithms)
Hotelling's Trace (MANOVA algorithms)
Roy's Largest Root (MANOVA algorithms)
Stepdown F Tests (MANOVA algorithms)
Design Matrix (MANOVA algorithms)
Estimated Cell Means (MANOVA algorithms)


Roy's Largest Root (MANOVA algorithms)

Pillai's criterion,Pillai's criterion,Pillai's criterion
MANOVA algorithms,MANOVA algorithms,MANOVA algorithms

T=λ1/(1+λ1)

Related Topics

Analysis of Variance (MANOVA algorithms)
Notation (MANOVA algorithms)
Reparameterization (MANOVA algorithms)
Parameter Estimation (MANOVA algorithms)
Significance Tests (MANOVA algorithms)
Pillai's Criterion (Pillai, 1967) (MANOVA algorithms)
Hotelling's Trace (MANOVA algorithms)
Wilks' Lambda (Rao, 1973) (MANOVA algorithms)
Stepdown F Tests (MANOVA algorithms)
Design Matrix (MANOVA algorithms)
Estimated Cell Means (MANOVA algorithms)


Stepdown F Tests (MANOVA algorithms)

The stepdown F statistics are

Fi=(t2−t2e)/nht2e/(ne−i+1)

with nh and ne−i+1 degrees of freedom, where te and t are the ith diagonal element of TE and T respectively, and where

SE=T´ETE
SE+SH=T´T

Related Topics

Analysis of Variance (MANOVA algorithms)
Notation (MANOVA algorithms)
Reparameterization (MANOVA algorithms)
Parameter Estimation (MANOVA algorithms)
Significance Tests (MANOVA algorithms)
Pillai's Criterion (Pillai, 1967) (MANOVA algorithms)
Hotelling's Trace (MANOVA algorithms)
Wilks' Lambda (Rao, 1973) (MANOVA algorithms)
Roy's Largest Root (MANOVA algorithms)
Design Matrix (MANOVA algorithms)
Estimated Cell Means (MANOVA algorithms)


Design Matrix (MANOVA algorithms)

K

Related Topics

Analysis of Variance (MANOVA algorithms)
Notation (MANOVA algorithms)
Reparameterization (MANOVA algorithms)
Parameter Estimation (MANOVA algorithms)
Significance Tests (MANOVA algorithms)
Pillai's Criterion (Pillai, 1967) (MANOVA algorithms)
Hotelling's Trace (MANOVA algorithms)
Wilks' Lambda (Rao, 1973) (MANOVA algorithms)
Roy's Largest Root (MANOVA algorithms)
Stepdown F Tests (MANOVA algorithms)
Estimated Cell Means (MANOVA algorithms)


Estimated Cell Means (MANOVA algorithms)

^
Y
·= K
^
θ

Related Topics

Analysis of Variance (MANOVA algorithms)
Notation (MANOVA algorithms)
Reparameterization (MANOVA algorithms)
Parameter Estimation (MANOVA algorithms)
Significance Tests (MANOVA algorithms)
Pillai's Criterion (Pillai, 1967) (MANOVA algorithms)
Hotelling's Trace (MANOVA algorithms)
Wilks' Lambda (Rao, 1973) (MANOVA algorithms)
Roy's Largest Root (MANOVA algorithms)
Stepdown F Tests (MANOVA algorithms)
Design Matrix (MANOVA algorithms)


Analysis of Covariance (MANOVA algorithms)

Y· | = | K | θ | + | X· | B | + | E·
g×p |  | g×r | r×p |  | g×q | q×p |  | g×p

where g, p, and r are as before and q is the number of covariates, and X· is the mean of X, the matrix of covariates.

Related Topics

MANOVA Algorithms
Analysis of Variance (MANOVA algorithms)
Repeated Measures (MANOVA algorithms)
Effect Size (MANOVA algorithms)
References (MANOVA algorithms)
Parameter Estimation and Significance Tests (MANOVA algorithms)


Parameter Estimation and Significance Tests (MANOVA algorithms)

For purposes of parameter estimation, no initial distinction is made between dependent variables and covariates.

Let

V=(Y X)
V·=(Y· X·)

The normal equation of the model

V· | = | K | θ | + | E·
g×(p+q) |  | g×r | r×(p+q) |  | g×(p+q)

is

(K´DK)
^
θ
=K´DY·

or

R
^
θ
=Q´DV·=U

or

^
θ
= (
^
θ
Y
^
θ
X)
r×(p+q) r×p r×q

If SE and ST are partitioned as

SE=(
S(Y)E | S(YX)E
S(XY)E | S(X)E
)
ST=(
S(Y)T | S(YX)T
S(XY)T | S(X)T
)

then the adjusted error SSCP matrix is

S*E=S(Y)E−S(YX)E(S(X)E)−1S(XY)E

and the adjusted total SSCP matrix is

S*T=S(Y)T−S(YX)T(S(X)T)−1S(XY)T

The adjusted hypothesis SSCP matrix is then

S*H=S*T−S*E

The estimate of B is

^
B
=(S(X)T)−1S(XY)T

The adjusted parameter estimates are

^
θ
*=
^
θ
Y−
^
θ
X
^
B

The adjusted cell means are

^
Y
*=K
^
θ
*

Related Topics

Analysis of Covariance (MANOVA algorithms)


Repeated Measures (MANOVA algorithms)

The following topics detail computational formulas for MANOVA's use in the analysis of repeated measures data.

Related Topics

MANOVA Algorithms
Analysis of Variance (MANOVA algorithms)
Analysis of Covariance (MANOVA algorithms)
Effect Size (MANOVA algorithms)
References (MANOVA algorithms)
Notation (MANOVA algorithms)
Statistics (MANOVA algorithms)
Greenhouse-Geisser Epsilon (MANOVA algorithms)
Huynh-Feldt Epsilon (MANOVA algorithms)
Lower Bound Epsilon (MANOVA algorithms)


Notation (MANOVA algorithms)

The following notation is used within this section unless otherwise stated:

k | Degrees of freedom for the within-subject factor
SSE* | Orthonormal transformed error matrix
N | Total number of observations
ndfb | Degrees of freedom for all between-subject factors (including the constant)

Related Topics

Repeated Measures (MANOVA algorithms)
Statistics (MANOVA algorithms)
Greenhouse-Geisser Epsilon (MANOVA algorithms)
Huynh-Feldt Epsilon (MANOVA algorithms)
Lower Bound Epsilon (MANOVA algorithms)


Statistics (MANOVA algorithms)

The following statistics are available.

Related Topics

Repeated Measures (MANOVA algorithms)
Notation (MANOVA algorithms)
Greenhouse-Geisser Epsilon (MANOVA algorithms)
Huynh-Feldt Epsilon (MANOVA algorithms)
Lower Bound Epsilon (MANOVA algorithms)


Greenhouse-Geisser Epsilon (MANOVA algorithms)

ggeps =( tr (SSE*))2k× tr ((SSE*)2)

Related Topics

Repeated Measures (MANOVA algorithms)
Notation (MANOVA algorithms)
Statistics (MANOVA algorithms)
Huynh-Feldt Epsilon (MANOVA algorithms)
Lower Bound Epsilon (MANOVA algorithms)


Huynh-Feldt Epsilon (MANOVA algorithms)

hfeps =N×k× ggeps −2k×(N− ndfb )−k2× ggeps

if hfeps>1 , set hfeps=1

Related Topics

Repeated Measures (MANOVA algorithms)
Notation (MANOVA algorithms)
Statistics (MANOVA algorithms)
Greenhouse-Geisser Epsilon (MANOVA algorithms)
Lower Bound Epsilon (MANOVA algorithms)


Lower Bound Epsilon (MANOVA algorithms)

lbeps= 1k

Related Topics

Repeated Measures (MANOVA algorithms)
Notation (MANOVA algorithms)
Statistics (MANOVA algorithms)
Greenhouse-Geisser Epsilon (MANOVA algorithms)
Huynh-Feldt Epsilon (MANOVA algorithms)


Effect Size (MANOVA algorithms)

The effect size gives a partial eta-squared value for each effect and parameter estimate

Related Topics

MANOVA Algorithms
Analysis of Variance (MANOVA algorithms)
Analysis of Covariance (MANOVA algorithms)
Repeated Measures (MANOVA algorithms)
References (MANOVA algorithms)
Notation (MANOVA algorithms)
Statistic (MANOVA algorithms)
Power (MANOVA algorithms)
Univariate Non-Centrality (MANOVA algorithms)
Multivariate Non-Centrality (MANOVA algorithms)
Hotelling's Trace (MANOVA algorithms)
Pillai's Trace (MANOVA algorithms)
Approximate Power (MANOVA algorithms)
Confidence Intervals (MANOVA algorithms)
Univariate Individual Confidence Intervals (MANOVA algorithms)
Univariate Intervals Joint Confidence Intervals (MANOVA algorithms)
Multivariate Intervals (MANOVA algorithms)
Regression Statistics (MANOVA algorithms)


Notation (MANOVA algorithms)

The following notation is used within this section unless otherwise stated:

dfh | Hypothesis degrees of freedom
dfe | Error degrees of freedom
F | F test
W | Wilks' lambda
s | Number of non-zero eigenvalues of HE−1
T | Hotelling's trace
V | Pillai's trace

Related Topics

Effect Size (MANOVA algorithms)
Statistic (MANOVA algorithms)
Power (MANOVA algorithms)
Univariate Non-Centrality (MANOVA algorithms)
Multivariate Non-Centrality (MANOVA algorithms)
Hotelling's Trace (MANOVA algorithms)
Pillai's Trace (MANOVA algorithms)
Approximate Power (MANOVA algorithms)
Confidence Intervals (MANOVA algorithms)
Univariate Individual Confidence Intervals (MANOVA algorithms)
Univariate Intervals Joint Confidence Intervals (MANOVA algorithms)
Multivariate Intervals (MANOVA algorithms)
Regression Statistics (MANOVA algorithms)


Statistic (MANOVA algorithms)

Partial eta-squared =dfh×Fdfh×F+dfe= SS hyp SS hyp+SS error

Eta − squared ( Wilks' )=1−W1/s

Eta − squared ( Hotelling's )=T/sT/s+1

Total eta-squared = sum of squares for effect total ( corrected ) sum of squares

Hay's omega-squared = SS for effect − df ( effect )× MSE corrected total SS + MSE

Pillai =V/S

Related Topics

Effect Size (MANOVA algorithms)
Notation (MANOVA algorithms)
Power (MANOVA algorithms)
Univariate Non-Centrality (MANOVA algorithms)
Multivariate Non-Centrality (MANOVA algorithms)
Hotelling's Trace (MANOVA algorithms)
Pillai's Trace (MANOVA algorithms)
Approximate Power (MANOVA algorithms)
Confidence Intervals (MANOVA algorithms)
Univariate Individual Confidence Intervals (MANOVA algorithms)
Univariate Intervals Joint Confidence Intervals (MANOVA algorithms)
Multivariate Intervals (MANOVA algorithms)
Regression Statistics (MANOVA algorithms)


Power (MANOVA algorithms)

The following statistics pertain to the observed power of F and t tests performed by the procedure.

Related Topics

Effect Size (MANOVA algorithms)
Notation (MANOVA algorithms)
Statistic (MANOVA algorithms)
Univariate Non-Centrality (MANOVA algorithms)
Multivariate Non-Centrality (MANOVA algorithms)
Hotelling's Trace (MANOVA algorithms)
Pillai's Trace (MANOVA algorithms)
Approximate Power (MANOVA algorithms)
Confidence Intervals (MANOVA algorithms)
Univariate Individual Confidence Intervals (MANOVA algorithms)
Univariate Intervals Joint Confidence Intervals (MANOVA algorithms)
Multivariate Intervals (MANOVA algorithms)
Regression Statistics (MANOVA algorithms)


Univariate Non-Centrality (MANOVA algorithms)

λ= SS hyp SS error ×dfe

Related Topics

Effect Size (MANOVA algorithms)
Notation (MANOVA algorithms)
Statistic (MANOVA algorithms)
Power (MANOVA algorithms)
Multivariate Non-Centrality (MANOVA algorithms)
Hotelling's Trace (MANOVA algorithms)
Pillai's Trace (MANOVA algorithms)
Approximate Power (MANOVA algorithms)
Confidence Intervals (MANOVA algorithms)
Univariate Individual Confidence Intervals (MANOVA algorithms)
Univariate Intervals Joint Confidence Intervals (MANOVA algorithms)
Multivariate Intervals (MANOVA algorithms)
Regression Statistics (MANOVA algorithms)


Multivariate Non-Centrality (MANOVA algorithms)

For a single degree of freedom hypothesis

λ=T×dfe

where T is Hotelling's trace and dfe is the error degrees of freedom. Approximate power non-centrality based on Wilks' lambda is

λ= Wilks' eta square 1 − Wilks' eta square ×dfe(W)

where dfe(W) is the error df from Rao's F-approximation to the distribution of Wilks' lambda.

Related Topics

Effect Size (MANOVA algorithms)
Notation (MANOVA algorithms)
Statistic (MANOVA algorithms)
Power (MANOVA algorithms)
Univariate Non-Centrality (MANOVA algorithms)
Hotelling's Trace (MANOVA algorithms)
Pillai's Trace (MANOVA algorithms)
Approximate Power (MANOVA algorithms)
Confidence Intervals (MANOVA algorithms)
Univariate Individual Confidence Intervals (MANOVA algorithms)
Univariate Intervals Joint Confidence Intervals (MANOVA algorithms)
Multivariate Intervals (MANOVA algorithms)
Regression Statistics (MANOVA algorithms)


Hotelling's Trace (MANOVA algorithms)

λ= Hotelling's eta square 1 − Hotelling's eta square ×dfe(H)

where dfe(H) is the error df from the F-approximation to the distribution of Hotelling's trace.

Related Topics

Effect Size (MANOVA algorithms)
Notation (MANOVA algorithms)
Statistic (MANOVA algorithms)
Power (MANOVA algorithms)
Univariate Non-Centrality (MANOVA algorithms)
Multivariate Non-Centrality (MANOVA algorithms)
Pillai's Trace (MANOVA algorithms)
Approximate Power (MANOVA algorithms)
Confidence Intervals (MANOVA algorithms)
Univariate Individual Confidence Intervals (MANOVA algorithms)
Univariate Intervals Joint Confidence Intervals (MANOVA algorithms)
Multivariate Intervals (MANOVA algorithms)
Regression Statistics (MANOVA algorithms)


Pillai's Trace (MANOVA algorithms)

λ= Pillai's eta square 1 − Pillai's eta square ×dfe(P)

where dfe(P) is the error df from the F-approximation to the distribution of Pillai's trace.

Related Topics

Effect Size (MANOVA algorithms)
Notation (MANOVA algorithms)
Statistic (MANOVA algorithms)
Power (MANOVA algorithms)
Univariate Non-Centrality (MANOVA algorithms)
Multivariate Non-Centrality (MANOVA algorithms)
Hotelling's Trace (MANOVA algorithms)
Approximate Power (MANOVA algorithms)
Confidence Intervals (MANOVA algorithms)
Univariate Individual Confidence Intervals (MANOVA algorithms)
Univariate Intervals Joint Confidence Intervals (MANOVA algorithms)
Multivariate Intervals (MANOVA algorithms)
Regression Statistics (MANOVA algorithms)


Approximate Power (MANOVA algorithms)

Approximate power is computed using an Edgeworth Series Expansion (Mudholkar, Chaubey, and Lin, 1976).

r=υ1+λ
b=λ/r

K1={(rυ1)1/3(1−2(b+1)9r−40b234r2+80(1+3b+33b2−77b3)37r3+176(1+4b−210b2+2380b3−2975b4)39r4)}
−c1/3{(1−29υ2+8037υ32+17639υ42)}

K2={(rυ1)2/3(2(b+1)9r+16b233r2−8(13+39b+405b2−1025b3)37r3+160(1+4b−87b2+1168b3−1544b4)38r4)}
+c2/3(29υ2−10437υ32−16038υ42)

K3={(−rυ1)(8b227r2−32(1+3b+21b2−62b3)36r3−32(8+32b−177b2+4550b3−6625b4)38r4)}
−c(3236υ32+25638υ42)

K4={(rυ1)4/3(16(1+3b+12b2−44b3)36r3+256(1+4b+6b2+247b3−458b4)38r4)}
−c4/3(1636υ32+25638υ42)

Y=K1
√ K2

Power =1−Φ(Y)−1
√ 2π
e−Y2/2{K36(Y2−1)+K424(Y3−3Y)K2172(Y5−10Y3+15Y)}

Related Topics

Effect Size (MANOVA algorithms)
Notation (MANOVA algorithms)
Statistic (MANOVA algorithms)
Power (MANOVA algorithms)
Univariate Non-Centrality (MANOVA algorithms)
Multivariate Non-Centrality (MANOVA algorithms)
Hotelling's Trace (MANOVA algorithms)
Pillai's Trace (MANOVA algorithms)
Confidence Intervals (MANOVA algorithms)
Univariate Individual Confidence Intervals (MANOVA algorithms)
Univariate Intervals Joint Confidence Intervals (MANOVA algorithms)
Multivariate Intervals (MANOVA algorithms)
Regression Statistics (MANOVA algorithms)


Confidence Intervals (MANOVA algorithms)

The intervals are calculated as follows:

Lower bound = parameter estimate −k * stderr

Upper bound = parameter estimate + k * stderr

where stderr is the standard error of the parameter estimate, and k is the critical constant whose value depends upon the type of confidence interval requested.

Related Topics

Effect Size (MANOVA algorithms)
Notation (MANOVA algorithms)
Statistic (MANOVA algorithms)
Power (MANOVA algorithms)
Univariate Non-Centrality (MANOVA algorithms)
Multivariate Non-Centrality (MANOVA algorithms)
Hotelling's Trace (MANOVA algorithms)
Pillai's Trace (MANOVA algorithms)
Approximate Power (MANOVA algorithms)
Univariate Individual Confidence Intervals (MANOVA algorithms)
Univariate Intervals Joint Confidence Intervals (MANOVA algorithms)
Multivariate Intervals (MANOVA algorithms)
Regression Statistics (MANOVA algorithms)


Univariate Individual Confidence Intervals (MANOVA algorithms)

k=
√ (F(a; 1, ne))

where

ne is the error degrees of freedom

a is the confidence level desired

F is the percentage point of the F distribution

Related Topics

Effect Size (MANOVA algorithms)
Notation (MANOVA algorithms)
Statistic (MANOVA algorithms)
Power (MANOVA algorithms)
Univariate Non-Centrality (MANOVA algorithms)
Multivariate Non-Centrality (MANOVA algorithms)
Hotelling's Trace (MANOVA algorithms)
Pillai's Trace (MANOVA algorithms)
Approximate Power (MANOVA algorithms)
Confidence Intervals (MANOVA algorithms)
Univariate Intervals Joint Confidence Intervals (MANOVA algorithms)
Multivariate Intervals (MANOVA algorithms)
Regression Statistics (MANOVA algorithms)


Univariate Intervals Joint Confidence Intervals (MANOVA algorithms)

For Scheffé intervals:

k=
√ (nh *F(a; nh, ne))

where

ne is the error degrees of freedom

nh is the hypothesis degrees of freedom

a is the confidence level desired

F is the percentage point of the F distribution

For Bonferroni intervals:

k=t(a/(2 * nh), ne)

where

ne is the error degrees of freedom

nh is the hypothesis degrees of freedom

a is 100 minus the confidence level desired

F is the percentage point of Student's t distribution

Related Topics

Effect Size (MANOVA algorithms)
Notation (MANOVA algorithms)
Statistic (MANOVA algorithms)
Power (MANOVA algorithms)
Univariate Non-Centrality (MANOVA algorithms)
Multivariate Non-Centrality (MANOVA algorithms)
Hotelling's Trace (MANOVA algorithms)
Pillai's Trace (MANOVA algorithms)
Approximate Power (MANOVA algorithms)
Confidence Intervals (MANOVA algorithms)
Univariate Individual Confidence Intervals (MANOVA algorithms)
Multivariate Intervals (MANOVA algorithms)
Regression Statistics (MANOVA algorithms)


Multivariate Intervals (MANOVA algorithms)

The value of the multipliers for the multivariate case is computed as follows:

Let

p= the number of dependent variables
nh= the hypothesis degrees of freedom
ne= the error degrees of freedom
a= the desired confidence level
s=min(p, nh)
m=(|nh−p|−1)/2
n=(ne−p−1)/2

For Roy's largest root, define

c=G/(1−G)

where

G = GCR (a; s, m, n); the percentage point of the largest root distribution

For Wilks' lambda, define

t=(p * nh)2−4
b=p * p+nh*nh−5
r=
√ (t/b)
if b≠0, else r=1
u=(p * nh−2)/4
t=p * nh
b=(nh+ne−(p+nh+1)/2) * r−2 * u
f=(t *F(a; t, b))/b
W=(1/(1+c))r
c=(1−W)/W

For Hotelling's trace, define

t=s(2m+s+1)
b=2(sn+1)
T=(stF(a; t, b))/b
c=T

For Pillai's trace, define

t=s(max(p, nh))
b=s(ne−p+s)
D=(F(a; t, b)t)/b
V=(sc)/(c+1)
c=V/(1−V)

Now for each of the above criteria, the critical value is

K=
√ (ne * c)

For Bonferroni intervals,

K=t(a/(2p(nh)); ne)

where t is the percentage point of the Student's t distribution.

Related Topics

Effect Size (MANOVA algorithms)
Notation (MANOVA algorithms)
Statistic (MANOVA algorithms)
Power (MANOVA algorithms)
Univariate Non-Centrality (MANOVA algorithms)
Multivariate Non-Centrality (MANOVA algorithms)
Hotelling's Trace (MANOVA algorithms)
Pillai's Trace (MANOVA algorithms)
Approximate Power (MANOVA algorithms)
Confidence Intervals (MANOVA algorithms)
Univariate Individual Confidence Intervals (MANOVA algorithms)
Univariate Intervals Joint Confidence Intervals (MANOVA algorithms)
Regression Statistics (MANOVA algorithms)


Regression Statistics (MANOVA algorithms)

Correlation between independent variables and predicted dependent variables

r(Xi,
^
Y
j)=rijRj

where

Xi=i th predictor (covariate)
^
Y
j=j th predicted dependent variable
rij= correlation between i th predictor and j th dependent variable
Rj= multiple R for j th dependent variable across all predictors

Related Topics

Effect Size (MANOVA algorithms)
Notation (MANOVA algorithms)
Statistic (MANOVA algorithms)
Power (MANOVA algorithms)
Univariate Non-Centrality (MANOVA algorithms)
Multivariate Non-Centrality (MANOVA algorithms)
Hotelling's Trace (MANOVA algorithms)
Pillai's Trace (MANOVA algorithms)
Approximate Power (MANOVA algorithms)
Confidence Intervals (MANOVA algorithms)
Univariate Individual Confidence Intervals (MANOVA algorithms)
Univariate Intervals Joint Confidence Intervals (MANOVA algorithms)
Multivariate Intervals (MANOVA algorithms)


References (MANOVA algorithms)

MANOVA algorithms,MANOVA algorithms,MANOVA algorithms
references,references,references

Bock, R. D. 1975. Multivariate statistical methods in behavioral research. New York: McGraw-Hill.

Finn, J. D. 1977. Multivariate analysis of variance and covariance. In: Statistical Methods for Digital Computers, Volume 3, K. Enslein, A. Ralston, and H. Wilf, eds. New York: John Wiley & Sons, Inc.

Golub, G. H. 1969. Matrix decompositions and statistical calculations. In: Statistical Computation, R. C. Milton, and J. A. Nelder, eds. New York: Academic Press.

Green, P. E. 1978. Analyzing multivariate data. Hinsdale, Ill.: The Dryden Press.

Mudholkar, G. S., Y. P. Chaubrey, and C. Lin. 1976. Some Approximations for the noncentral F-distribution. Technometrics, 18, 351-358.

Muller, K. E., and B. L. Peterson. 1984. Practical methods for computing power in testing the multivariate general linear hypothesis. Computational Statistics and Data Analysis, 2, 143-158.

Pillai, K. C. S. 1967. Upper percentage points of the largest root of a matrix in multivariate analysis. Biometrika, 54, 189-194.

Timm, N. H. 1975. Multivariate statistics: With applications in education and psychology. Monterey, California: Brooks/Cole.

Related Topics

MANOVA Algorithms
Analysis of Variance (MANOVA algorithms)
Analysis of Covariance (MANOVA algorithms)
Repeated Measures (MANOVA algorithms)
Effect Size (MANOVA algorithms)


MEANS Algorithms

MEANS (command),MEANS (command),MEANS (command)
algorithms,algorithms,algorithms
Means,Means,Means
algorithms,algorithms,algorithms
MEANS algorithms,MEANS algorithms,MEANS algorithms

Cases are cross-classified on the basis of multiple independent variables, and for each cell of the resulting cross-classification, basic statistics are calculated for a dependent variable.

Related Topics

Notation (MEANS algorithms)
Statistics (MEANS algorithms)
ANOVA and Test for Linearity (MEANS algorithms)
References (MEANS algorithms)


Notation (MEANS algorithms)

MEANS algorithms,MEANS algorithms,MEANS algorithms
notation,notation,notation

The following notation is used throughout this section unless otherwise stated:

Xip | Value for the pth independent variable for case i
Yi | Value for the dependent variable for case i
wi | Weight for case i
P | Number of independent variables
N | Number of cases

Related Topics

MEANS Algorithms
Statistics (MEANS algorithms)
ANOVA and Test for Linearity (MEANS algorithms)
References (MEANS algorithms)


Statistics (MEANS algorithms)

MEANS algorithms,MEANS algorithms,MEANS algorithms
statistics,statistics,statistics

For each value of the first independent variable (X1), for each value of the pair (X1, X2), for the triple (X1, X2, X3), and similarly for the P-tuple (X1, X2, ..., XP), the following are computed:

Related Topics

MEANS Algorithms
Notation (MEANS algorithms)
ANOVA and Test for Linearity (MEANS algorithms)
References (MEANS algorithms)
Sum of Case Weights for the Cell (MEANS algorithms)
The Sum and Corrected Sum of Squares (MEANS algorithms)
The Mean (MEANS algorithms)
Harmonic mean (MEANS algorithms)
Geometric mean (MEANS algorithms)
Variance (MEANS algorithms)
Standard Deviation (MEANS algorithms)
Standard Error of the Mean (MEANS algorithms)
Skewness (computed if W ≥ 3 and S > 0) , and its standard error (MEANS algorithms)
Kurtosis (computed if W ≥ 4 and S > 0), and its standard error (MEANS algorithms)
Minimum (MEANS algorithms)
Maximum (MEANS algorithms)
Range (MEANS algorithms)
Percent of Total N (MEANS algorithms)
Percent of Total Sum (MEANS algorithms)
Median (MEANS algorithms)
Grouped Median (MEANS algorithms)


Sum of Case Weights for the Cell (MEANS algorithms)

MEANS algorithms,MEANS algorithms,MEANS algorithms
sum of case weights for the cell,sum of case weights for the cell,sum of case weights for the cell
W=NΣi=1wili

where li=1 if the ith case is in the cell, li=0 otherwise.

Related Topics

Statistics (MEANS algorithms)
The Sum and Corrected Sum of Squares (MEANS algorithms)
The Mean (MEANS algorithms)
Harmonic mean (MEANS algorithms)
Geometric mean (MEANS algorithms)
Variance (MEANS algorithms)
Standard Deviation (MEANS algorithms)
Standard Error of the Mean (MEANS algorithms)
Skewness (computed if W ≥ 3 and S > 0) , and its standard error (MEANS algorithms)
Kurtosis (computed if W ≥ 4 and S > 0), and its standard error (MEANS algorithms)
Minimum (MEANS algorithms)
Maximum (MEANS algorithms)
Range (MEANS algorithms)
Percent of Total N (MEANS algorithms)
Percent of Total Sum (MEANS algorithms)
Median (MEANS algorithms)
Grouped Median (MEANS algorithms)


The Sum and Corrected Sum of Squares (MEANS algorithms)

MEANS algorithms,MEANS algorithms,MEANS algorithms
sum and corrected sum of squares,sum and corrected sum of squares,sum and corrected sum of squares
SMY=NΣi=1wiliYi
SSY=NΣi=1wiliY2i
CSS=SSY−SMY2/W

Related Topics

Statistics (MEANS algorithms)
Sum of Case Weights for the Cell (MEANS algorithms)
The Mean (MEANS algorithms)
Harmonic mean (MEANS algorithms)
Geometric mean (MEANS algorithms)
Variance (MEANS algorithms)
Standard Deviation (MEANS algorithms)
Standard Error of the Mean (MEANS algorithms)
Skewness (computed if W ≥ 3 and S > 0) , and its standard error (MEANS algorithms)
Kurtosis (computed if W ≥ 4 and S > 0), and its standard error (MEANS algorithms)
Minimum (MEANS algorithms)
Maximum (MEANS algorithms)
Range (MEANS algorithms)
Percent of Total N (MEANS algorithms)
Percent of Total Sum (MEANS algorithms)
Median (MEANS algorithms)
Grouped Median (MEANS algorithms)


The Mean (MEANS algorithms)

MEANS algorithms,MEANS algorithms,MEANS algorithms
mean,mean,mean
Y=NΣi=1wiliYiW

Related Topics

Statistics (MEANS algorithms)
Sum of Case Weights for the Cell (MEANS algorithms)
The Sum and Corrected Sum of Squares (MEANS algorithms)
Harmonic mean (MEANS algorithms)
Geometric mean (MEANS algorithms)
Variance (MEANS algorithms)
Standard Deviation (MEANS algorithms)
Standard Error of the Mean (MEANS algorithms)
Skewness (computed if W ≥ 3 and S > 0) , and its standard error (MEANS algorithms)
Kurtosis (computed if W ≥ 4 and S > 0), and its standard error (MEANS algorithms)
Minimum (MEANS algorithms)
Maximum (MEANS algorithms)
Range (MEANS algorithms)
Percent of Total N (MEANS algorithms)
Percent of Total Sum (MEANS algorithms)
Median (MEANS algorithms)
Grouped Median (MEANS algorithms)


Harmonic mean (MEANS algorithms)

MEANS algorithms,MEANS algorithms,MEANS algorithms
harmonic mean,harmonic mean,harmonic mean
Yh=NΣi=1wiNΣi=1wiy−1i

Both summations are over cases with positive wi values.

Related Topics

Statistics (MEANS algorithms)
Sum of Case Weights for the Cell (MEANS algorithms)
The Sum and Corrected Sum of Squares (MEANS algorithms)
The Mean (MEANS algorithms)
Geometric mean (MEANS algorithms)
Variance (MEANS algorithms)
Standard Deviation (MEANS algorithms)
Standard Error of the Mean (MEANS algorithms)
Skewness (computed if W ≥ 3 and S > 0) , and its standard error (MEANS algorithms)
Kurtosis (computed if W ≥ 4 and S > 0), and its standard error (MEANS algorithms)
Minimum (MEANS algorithms)
Maximum (MEANS algorithms)
Range (MEANS algorithms)
Percent of Total N (MEANS algorithms)
Percent of Total Sum (MEANS algorithms)
Median (MEANS algorithms)
Grouped Median (MEANS algorithms)


Geometric mean (MEANS algorithms)

MEANS algorithms,MEANS algorithms,MEANS algorithms
geometric mean,geometric mean,geometric mean
Yg=(N∏i=1ywii)1/W

The product is taken over cases with positive wi values.

Related Topics

Statistics (MEANS algorithms)
Sum of Case Weights for the Cell (MEANS algorithms)
The Sum and Corrected Sum of Squares (MEANS algorithms)
The Mean (MEANS algorithms)
Harmonic mean (MEANS algorithms)
Variance (MEANS algorithms)
Standard Deviation (MEANS algorithms)
Standard Error of the Mean (MEANS algorithms)
Skewness (computed if W ≥ 3 and S > 0) , and its standard error (MEANS algorithms)
Kurtosis (computed if W ≥ 4 and S > 0), and its standard error (MEANS algorithms)
Minimum (MEANS algorithms)
Maximum (MEANS algorithms)
Range (MEANS algorithms)
Percent of Total N (MEANS algorithms)
Percent of Total Sum (MEANS algorithms)
Median (MEANS algorithms)
Grouped Median (MEANS algorithms)


Variance (MEANS algorithms)

MEANS algorithms,MEANS algorithms,MEANS algorithms
variance,variance,variance
S2=CSSW−1

Related Topics

Statistics (MEANS algorithms)
Sum of Case Weights for the Cell (MEANS algorithms)
The Sum and Corrected Sum of Squares (MEANS algorithms)
The Mean (MEANS algorithms)
Harmonic mean (MEANS algorithms)
Geometric mean (MEANS algorithms)
Standard Deviation (MEANS algorithms)
Standard Error of the Mean (MEANS algorithms)
Skewness (computed if W ≥ 3 and S > 0) , and its standard error (MEANS algorithms)
Kurtosis (computed if W ≥ 4 and S > 0), and its standard error (MEANS algorithms)
Minimum (MEANS algorithms)
Maximum (MEANS algorithms)
Range (MEANS algorithms)
Percent of Total N (MEANS algorithms)
Percent of Total Sum (MEANS algorithms)
Median (MEANS algorithms)
Grouped Median (MEANS algorithms)


Standard Deviation (MEANS algorithms)

MEANS algorithms,MEANS algorithms,MEANS algorithms
standard deviation,standard deviation,standard deviation
S=
√ variance

Related Topics

Statistics (MEANS algorithms)
Sum of Case Weights for the Cell (MEANS algorithms)
The Sum and Corrected Sum of Squares (MEANS algorithms)
The Mean (MEANS algorithms)
Harmonic mean (MEANS algorithms)
Geometric mean (MEANS algorithms)
Variance (MEANS algorithms)
Standard Error of the Mean (MEANS algorithms)
Skewness (computed if W ≥ 3 and S > 0) , and its standard error (MEANS algorithms)
Kurtosis (computed if W ≥ 4 and S > 0), and its standard error (MEANS algorithms)
Minimum (MEANS algorithms)
Maximum (MEANS algorithms)
Range (MEANS algorithms)
Percent of Total N (MEANS algorithms)
Percent of Total Sum (MEANS algorithms)
Median (MEANS algorithms)
Grouped Median (MEANS algorithms)


Standard Error of the Mean (MEANS algorithms)

MEANS algorithms,MEANS algorithms,MEANS algorithms
standard error of the mean,standard error of the mean,standard error of the mean
SEM=S
√ W

Related Topics

Statistics (MEANS algorithms)
Sum of Case Weights for the Cell (MEANS algorithms)
The Sum and Corrected Sum of Squares (MEANS algorithms)
The Mean (MEANS algorithms)
Harmonic mean (MEANS algorithms)
Geometric mean (MEANS algorithms)
Variance (MEANS algorithms)
Standard Deviation (MEANS algorithms)
Skewness (computed if W ≥ 3 and S > 0) , and its standard error (MEANS algorithms)
Kurtosis (computed if W ≥ 4 and S > 0), and its standard error (MEANS algorithms)
Minimum (MEANS algorithms)
Maximum (MEANS algorithms)
Range (MEANS algorithms)
Percent of Total N (MEANS algorithms)
Percent of Total Sum (MEANS algorithms)
Median (MEANS algorithms)
Grouped Median (MEANS algorithms)


Skewness (computed if W ≥ 3 and S > 0) , and its standard error (MEANS algorithms)

MEANS algorithms,MEANS algorithms,MEANS algorithms
skewness and its standard error,skewness and its standard error,skewness and its standard error
g1=WM3(W−1)(W−2)S3 se(g1)=
√ 6W(W−1)(W−2)(W+1)(W+3)

Related Topics

Statistics (MEANS algorithms)
Sum of Case Weights for the Cell (MEANS algorithms)
The Sum and Corrected Sum of Squares (MEANS algorithms)
The Mean (MEANS algorithms)
Harmonic mean (MEANS algorithms)
Geometric mean (MEANS algorithms)
Variance (MEANS algorithms)
Standard Deviation (MEANS algorithms)
Standard Error of the Mean (MEANS algorithms)
Kurtosis (computed if W ≥ 4 and S > 0), and its standard error (MEANS algorithms)
Minimum (MEANS algorithms)
Maximum (MEANS algorithms)
Range (MEANS algorithms)
Percent of Total N (MEANS algorithms)
Percent of Total Sum (MEANS algorithms)
Median (MEANS algorithms)
Grouped Median (MEANS algorithms)


Kurtosis (computed if W ≥ 4 and S > 0), and its standard error (MEANS algorithms)

MEANS algorithms,MEANS algorithms,MEANS algorithms
kurtosis and its standard error,kurtosis and its standard error,kurtosis and its standard error
g2=W(W+1)M4−3(W−1)M22(W−1)(W−2)(W−3)S4 se(g2)=
√ 4(W2−1)se(g1)2(W−3)(W+5)

Related Topics

Statistics (MEANS algorithms)
Sum of Case Weights for the Cell (MEANS algorithms)
The Sum and Corrected Sum of Squares (MEANS algorithms)
The Mean (MEANS algorithms)
Harmonic mean (MEANS algorithms)
Geometric mean (MEANS algorithms)
Variance (MEANS algorithms)
Standard Deviation (MEANS algorithms)
Standard Error of the Mean (MEANS algorithms)
Skewness (computed if W ≥ 3 and S > 0) , and its standard error (MEANS algorithms)
Minimum (MEANS algorithms)
Maximum (MEANS algorithms)
Range (MEANS algorithms)
Percent of Total N (MEANS algorithms)
Percent of Total Sum (MEANS algorithms)
Median (MEANS algorithms)
Grouped Median (MEANS algorithms)


Minimum (MEANS algorithms)

MEANS algorithms,MEANS algorithms,MEANS algorithms
minimum,minimum,minimum
min
i
Xi

Related Topics

Statistics (MEANS algorithms)
Sum of Case Weights for the Cell (MEANS algorithms)
The Sum and Corrected Sum of Squares (MEANS algorithms)
The Mean (MEANS algorithms)
Harmonic mean (MEANS algorithms)
Geometric mean (MEANS algorithms)
Variance (MEANS algorithms)
Standard Deviation (MEANS algorithms)
Standard Error of the Mean (MEANS algorithms)
Skewness (computed if W ≥ 3 and S > 0) , and its standard error (MEANS algorithms)
Kurtosis (computed if W ≥ 4 and S > 0), and its standard error (MEANS algorithms)
Maximum (MEANS algorithms)
Range (MEANS algorithms)
Percent of Total N (MEANS algorithms)
Percent of Total Sum (MEANS algorithms)
Median (MEANS algorithms)
Grouped Median (MEANS algorithms)


Maximum (MEANS algorithms)

MEANS algorithms,MEANS algorithms,MEANS algorithms
maximum,maximum,maximum
max
i
Xi

Related Topics

Statistics (MEANS algorithms)
Sum of Case Weights for the Cell (MEANS algorithms)
The Sum and Corrected Sum of Squares (MEANS algorithms)
The Mean (MEANS algorithms)
Harmonic mean (MEANS algorithms)
Geometric mean (MEANS algorithms)
Variance (MEANS algorithms)
Standard Deviation (MEANS algorithms)
Standard Error of the Mean (MEANS algorithms)
Skewness (computed if W ≥ 3 and S > 0) , and its standard error (MEANS algorithms)
Kurtosis (computed if W ≥ 4 and S > 0), and its standard error (MEANS algorithms)
Minimum (MEANS algorithms)
Range (MEANS algorithms)
Percent of Total N (MEANS algorithms)
Percent of Total Sum (MEANS algorithms)
Median (MEANS algorithms)
Grouped Median (MEANS algorithms)


Range (MEANS algorithms)

MEANS algorithms,MEANS algorithms,MEANS algorithms
range,range,range

Maximum – Minimum

Related Topics

Statistics (MEANS algorithms)
Sum of Case Weights for the Cell (MEANS algorithms)
The Sum and Corrected Sum of Squares (MEANS algorithms)
The Mean (MEANS algorithms)
Harmonic mean (MEANS algorithms)
Geometric mean (MEANS algorithms)
Variance (MEANS algorithms)
Standard Deviation (MEANS algorithms)
Standard Error of the Mean (MEANS algorithms)
Skewness (computed if W ≥ 3 and S > 0) , and its standard error (MEANS algorithms)
Kurtosis (computed if W ≥ 4 and S > 0), and its standard error (MEANS algorithms)
Minimum (MEANS algorithms)
Maximum (MEANS algorithms)
Percent of Total N (MEANS algorithms)
Percent of Total Sum (MEANS algorithms)
Median (MEANS algorithms)
Grouped Median (MEANS algorithms)


Percent of Total N (MEANS algorithms)

MEANS algorithms,MEANS algorithms,MEANS algorithms
percent of total N,percent of total N,percent of total N

For each category j of the independent variable,

%TotNj=(NΣi=1wiliW)×100

where li=1 if the ith case is in the jth category, li=0 otherwise.

Related Topics

Statistics (MEANS algorithms)
Sum of Case Weights for the Cell (MEANS algorithms)
The Sum and Corrected Sum of Squares (MEANS algorithms)
The Mean (MEANS algorithms)
Harmonic mean (MEANS algorithms)
Geometric mean (MEANS algorithms)
Variance (MEANS algorithms)
Standard Deviation (MEANS algorithms)
Standard Error of the Mean (MEANS algorithms)
Skewness (computed if W ≥ 3 and S > 0) , and its standard error (MEANS algorithms)
Kurtosis (computed if W ≥ 4 and S > 0), and its standard error (MEANS algorithms)
Minimum (MEANS algorithms)
Maximum (MEANS algorithms)
Range (MEANS algorithms)
Percent of Total Sum (MEANS algorithms)
Median (MEANS algorithms)
Grouped Median (MEANS algorithms)


Percent of Total Sum (MEANS algorithms)

MEANS algorithms,MEANS algorithms,MEANS algorithms
percent of total sum,percent of total sum,percent of total sum

For each category j of the independent variable,

%TotSumj=(NΣi=1wiliYiW)×100

where li=1 if the ith case is in the jth category, li=0 otherwise.

Related Topics

Statistics (MEANS algorithms)
Sum of Case Weights for the Cell (MEANS algorithms)
The Sum and Corrected Sum of Squares (MEANS algorithms)
The Mean (MEANS algorithms)
Harmonic mean (MEANS algorithms)
Geometric mean (MEANS algorithms)
Variance (MEANS algorithms)
Standard Deviation (MEANS algorithms)
Standard Error of the Mean (MEANS algorithms)
Skewness (computed if W ≥ 3 and S > 0) , and its standard error (MEANS algorithms)
Kurtosis (computed if W ≥ 4 and S > 0), and its standard error (MEANS algorithms)
Minimum (MEANS algorithms)
Maximum (MEANS algorithms)
Range (MEANS algorithms)
Percent of Total N (MEANS algorithms)
Median (MEANS algorithms)
Grouped Median (MEANS algorithms)


Median (MEANS algorithms)

MEANS algorithms,MEANS algorithms,MEANS algorithms
median,median,median

Find the first score interval (x2) containing more than t cases.

median ={
x2 if t−cp1≥100/W
{1−[(W+1)/2−cc1]}x1
  +[(W+1)/2−cc1]x2
if t−cp1<100/W

where

t=(W+1)/2
cp1<t<cp2
x1 and x2 are the values corresponding to cp1 and cp2, respectively
cc1 is the cumulative frequency up to x1
cp1 is the cumulative percent up to x1

Related Topics

Statistics (MEANS algorithms)
Sum of Case Weights for the Cell (MEANS algorithms)
The Sum and Corrected Sum of Squares (MEANS algorithms)
The Mean (MEANS algorithms)
Harmonic mean (MEANS algorithms)
Geometric mean (MEANS algorithms)
Variance (MEANS algorithms)
Standard Deviation (MEANS algorithms)
Standard Error of the Mean (MEANS algorithms)
Skewness (computed if W ≥ 3 and S > 0) , and its standard error (MEANS algorithms)
Kurtosis (computed if W ≥ 4 and S > 0), and its standard error (MEANS algorithms)
Minimum (MEANS algorithms)
Maximum (MEANS algorithms)
Range (MEANS algorithms)
Percent of Total N (MEANS algorithms)
Percent of Total Sum (MEANS algorithms)
Grouped Median (MEANS algorithms)


Grouped Median (MEANS algorithms)

MEANS algorithms,MEANS algorithms,MEANS algorithms
grouped median,grouped median,grouped median

See the topic Grouped Percentiles for more information.

Related Topics

Statistics (MEANS algorithms)
Sum of Case Weights for the Cell (MEANS algorithms)
The Sum and Corrected Sum of Squares (MEANS algorithms)
The Mean (MEANS algorithms)
Harmonic mean (MEANS algorithms)
Geometric mean (MEANS algorithms)
Variance (MEANS algorithms)
Standard Deviation (MEANS algorithms)
Standard Error of the Mean (MEANS algorithms)
Skewness (computed if W ≥ 3 and S > 0) , and its standard error (MEANS algorithms)
Kurtosis (computed if W ≥ 4 and S > 0), and its standard error (MEANS algorithms)
Minimum (MEANS algorithms)
Maximum (MEANS algorithms)
Range (MEANS algorithms)
Percent of Total N (MEANS algorithms)
Percent of Total Sum (MEANS algorithms)
Median (MEANS algorithms)


ANOVA and Test for Linearity (MEANS algorithms)

MEANS algorithms,MEANS algorithms,MEANS algorithms
ANOVA and test for linearity,ANOVA and test for linearity,ANOVA and test for linearity

If the analysis of variance table or test for linearity are requested, only the first independent variable is used. Assume it takes on J distinct values (groups). The previously described statistics are calculated and printed for each group separately, as well as for all cases pooled. Symbols subscripted from 1 to J will denote group statistics, unsubscripted the total. Thus for group j,

• SMYj is the sum of the dependent variable.

and

• Xj the value of the independent variable. Note that the standard deviation and sum of squares printed in the last row of the summary table are pooled within group values.

Related Topics

MEANS Algorithms
Notation (MEANS algorithms)
Statistics (MEANS algorithms)
References (MEANS algorithms)
Analysis of Variance (MEANS algorithms)
Correlation Coefficient (MEANS algorithms)
Eta (MEANS algorithms)


Analysis of Variance (MEANS algorithms)

MEANS algorithms,MEANS algorithms,MEANS algorithms
analysis of variance,analysis of variance,analysis of variance
Source | Sum of Squares | df
Between Groups | Total-Within Groups | J−1
Regression | (JΣj=1XjSMYj−(JΣj=1wjXj)(JΣj=1SMYj)/W)2JΣj=1wjX2j−(JΣj=1wjXj)2/W | 1
Deviation from Regression | Between-Regression | J−2
Within Groups | JΣj=1CSSj | W−J
Total | JΣj=1SSYj−(JΣj=1SMYj)2/W | W−1

The mean squares are calculated by dividing each sum of squares by its degrees of freedom. The F ratios are the mean squares for each source divided by the within groups mean square. The significance level for the F is from the F distribution with the degrees of freedom for the numerator and denominator mean squares. If there is only one group the ANOVA is not done; if there are fewer than three groups or the independent variable is a string variable, the test for linearity is not done.

Related Topics

ANOVA and Test for Linearity (MEANS algorithms)
Correlation Coefficient (MEANS algorithms)
Eta (MEANS algorithms)


Correlation Coefficient (MEANS algorithms)

MEANS algorithms,MEANS algorithms,MEANS algorithms
correlation coefficient,correlation coefficient,correlation coefficient
r=JΣj=1XjSMYj−(JΣj=1WjXj)SMY/W
√ (JΣj=1WjX2j−(JΣj=1WjXj)2/W)(SSY−SMY2/W)

Related Topics

ANOVA and Test for Linearity (MEANS algorithms)
Analysis of Variance (MEANS algorithms)
Eta (MEANS algorithms)


Eta (MEANS algorithms)

MEANS algorithms,MEANS algorithms,MEANS algorithms
eta,eta,eta
(eta)2= Sum of Squares Between Groups Total Sum of Squares

Related Topics

ANOVA and Test for Linearity (MEANS algorithms)
Analysis of Variance (MEANS algorithms)
Correlation Coefficient (MEANS algorithms)


References (MEANS algorithms)

Blalock, H. M. 1972. Social statistics. New York: McGraw-Hill.

Bliss, C. I. 1967. Statistics in biology, Volume 1. New York: McGraw-Hill.

Hays, W. L. 1973. Statistics for the social sciences. New York: Holt, Rinehart, and Winston.

Related Topics

MEANS Algorithms
Notation (MEANS algorithms)
Statistics (MEANS algorithms)
ANOVA and Test for Linearity (MEANS algorithms)


MIXED Algorithms

MIXED (command),MIXED (command),MIXED (command)
algorithms,algorithms,algorithms
Linear Mixed Models,Linear Mixed Models,Linear Mixed Models
algorithms,algorithms,algorithms
linear mixed models algorithms,linear mixed models algorithms,linear mixed models algorithms

This document summarizes the computational algorithms for the linear mixed model (Wolfinger, Tobias, and Sall, 1994).

Related Topics

Notation (linear mixed models algorithms)
Model (linear mixed models algorithms)
Likelihood Functions (linear mixed models algorithms)
Newton & Scoring Algorithms (linear mixed models algorithms)
Convergence Criteria (linear mixed models algorithms)
Starting value of Newton's Algorithm (linear mixed models algorithms)
Confidence Intervals of Covariance Parameters (linear mixed models algorithms)
Fixed and Random Effect Parameters: Estimation and Prediction (linear mixed models algorithms)
Custom Hypotheses (linear mixed models algorithms)
Saved Values (linear mixed models algorithms)
Information Criteria (linear mixed models algorithms)
Derivatives of Log-Likelihood (linear mixed models algorithms)
Derivatives: Parameters in G (linear mixed models algorithms)
Derivatives: Parameters in R (linear mixed models algorithms)
G and R Cross-derivatives (linear mixed models algorithms)
Gradient and Hessian of REML (linear mixed models algorithms)
Gradient and Hessian of MLE (linear mixed models algorithms)
Cross Product Matrices (linear mixed models algorithms)
References (linear mixed models algorithms)


Notation (linear mixed models algorithms)

linear mixed models algorithms,linear mixed models algorithms,linear mixed models algorithms
notation,notation,notation

The following notation is used throughout this chapter unless otherwise stated:

θ | Overall covariance parameter vector
θG | A vector of covariance parameters associated with random effects.
θ k | A vector of covariance parameters associated with the kth random effect.
θ R | A vector of covariance parameters associated with the residual term.
K | Number of random effects.
Sr | Number of repeated subjects.
Sk | Number of subjects in kth random effect.
V | The n×n covariance matrix of y. This matrix is sometimes denoted by Vy(θ).
∂∂θsV | First derivative of V with respect to the sth parameter in θ.
∂2∂θs∂θtV | Second derivative of V with respect to the sth and tth parameters in θ.
R | The n×n covariance matrix of ε. This matrix is sometimes denoted by R(θR)
∂∂θsR | First derivative of R with respect to the sth parameter in θ R .
∂2∂θs∂θtR | Second derivative of R with respect to the sth and tth parameters in θ R .
G | The covariance matrix of random effects. This matrix is sometimes denoted by G(θG)
∂∂θsG | First derivative of G with respect to the sth parameter in θ G .
∂2∂θs∂θtG | Second derivative of G with respect to the sth and tth parameters in θ G .
Vk | The covariance matrix of the kth random effect for one random subject. This matrix is sometimes denoted by Vk(θk).
∂∂θsVk | First derivative of Vk with respect to the sth parameter in θk.
∂2∂θs∂θtVk | Second derivative of Vk with respect to the sth and tth parameters in θk.
y | n×1 vector of dependent variable.
X | n×p design matrix of fixed effects.
Z | n×q design matrix of random effects.
r | n×1 vector of residuals.
β | p×1 vector of fixed effects parameters.
γ | q×1 vector of random effects parameters.
ε | n×1 vector of residual error.
Wc | n×n diagonal matrix of case weights.
Wrw | n×n diagonal matrix of regression weights.

Related Topics

MIXED Algorithms
Model (linear mixed models algorithms)
Likelihood Functions (linear mixed models algorithms)
Newton & Scoring Algorithms (linear mixed models algorithms)
Convergence Criteria (linear mixed models algorithms)
Starting value of Newton's Algorithm (linear mixed models algorithms)
Confidence Intervals of Covariance Parameters (linear mixed models algorithms)
Fixed and Random Effect Parameters: Estimation and Prediction (linear mixed models algorithms)
Custom Hypotheses (linear mixed models algorithms)
Saved Values (linear mixed models algorithms)
Information Criteria (linear mixed models algorithms)
Derivatives of Log-Likelihood (linear mixed models algorithms)
Derivatives: Parameters in G (linear mixed models algorithms)
Derivatives: Parameters in R (linear mixed models algorithms)
G and R Cross-derivatives (linear mixed models algorithms)
Gradient and Hessian of REML (linear mixed models algorithms)
Gradient and Hessian of MLE (linear mixed models algorithms)
Cross Product Matrices (linear mixed models algorithms)
References (linear mixed models algorithms)


Model (linear mixed models algorithms)

linear mixed models algorithms,linear mixed models algorithms,linear mixed models algorithms
model,model,model

In this document, we assume a mixed effect model of the form

y=Xβ+Zγ+ε

In this model, we assume that ε is distributed as N[0,R] and γ is independently distributed as N[0,G]. Therefore y is distributed as N[Xβ,V], where V=ZGZT+R. The unknown parameters include the regression parameters in β and covariance parameters in θ. Estimation of these model parameters relies on the use of a Newton-Ralphson or scoring algorithm. When we use either algorithm for finding MLE or REML solutions, we need to compute V−1 and its derivatives with respect to θ, which are computationally infeasible for large n. Wolfinger et.al.(1994) discussed methods that can avoid direct computation of V−1. They tackled the problem by using the SWEEP algorithm and exploiting the block diagonal structures of G and R. In the first half of this document, we will detail the algorithm for mixed models without subject blocking. In second half of the document we will refine the algorithm to exploit the structure of G; this is the actual implementation of the algorithm.

If there are regression weights, the covariance matrix R will be replaced by R*=W−1/2rwRW−1/2rw. For simpler notations, we will assume that the weights are already included in the matrix R and they will not be displayed in the remainder of this document. When case weights are specified, they will be rounded to nearest integer and each case will be entered into the analysis multiple times depending on the rounded case weight. Since replicating a case will lead to duplicate repeated measures (Note: repeated measures are unique within a repeated subject), non-unity case weights will only be allowed for R with scaled identity structure. In MIXED, only cases with positive case weight and regression weight will be included analysis.

Related Topics

MIXED Algorithms
Notation (linear mixed models algorithms)
Likelihood Functions (linear mixed models algorithms)
Newton & Scoring Algorithms (linear mixed models algorithms)
Convergence Criteria (linear mixed models algorithms)
Starting value of Newton's Algorithm (linear mixed models algorithms)
Confidence Intervals of Covariance Parameters (linear mixed models algorithms)
Fixed and Random Effect Parameters: Estimation and Prediction (linear mixed models algorithms)
Custom Hypotheses (linear mixed models algorithms)
Saved Values (linear mixed models algorithms)
Information Criteria (linear mixed models algorithms)
Derivatives of Log-Likelihood (linear mixed models algorithms)
Derivatives: Parameters in G (linear mixed models algorithms)
Derivatives: Parameters in R (linear mixed models algorithms)
G and R Cross-derivatives (linear mixed models algorithms)
Gradient and Hessian of REML (linear mixed models algorithms)
Gradient and Hessian of MLE (linear mixed models algorithms)
Cross Product Matrices (linear mixed models algorithms)
References (linear mixed models algorithms)
Fixed Effects Parameterization (linear mixed models algorithms)
Random Effects Parameterization (linear mixed models algorithms)
Repeated Subjects (linear mixed models algorithms)


Fixed Effects Parameterization (linear mixed models algorithms)

The parameterization of fixed effects is the same as in the GLM procedure.

Related Topics

Model (linear mixed models algorithms)
Random Effects Parameterization (linear mixed models algorithms)
Repeated Subjects (linear mixed models algorithms)


Random Effects Parameterization (linear mixed models algorithms)

If we have K random effects and there are Sk random subjects in kth random effect, the design matrix Z will be partitioned as

Z=[
Z1 Z2 ... ZK
]

where Zk is the design matrix of the kth random effect. Each Zk can be partitioned further by random subjects as below,

Zk=[
Zk1 Zk2 ... ZkSk
], k=1,..,K

The number of columns in the design matrix Zkj (jth random subject of kth random effect) is equal to number of levels of the kth random effect variable.

Under this partition, the G will be a block diagonal matrix which can be expressed as

G=Kk=1[ISkVk]

It should also be noted that each random effect has its own parameter vector θk, k=1,...,K, and there are no functional constraints between elements in these parameter vectors. Thus θG=(θ1,...,θK).

When there are correlated random effects, Zkj will be a combined design matrix of the correlated random effects. Therefore in subsequent sections, each random effect can either be one single random effect or a set of correlated random effects.

Related Topics

Model (linear mixed models algorithms)
Fixed Effects Parameterization (linear mixed models algorithms)
Repeated Subjects (linear mixed models algorithms)


Repeated Subjects (linear mixed models algorithms)

When the REPEATED subcommand is used, R will be a block diagonal matrix where the ith block is Ri, i=1,...,SR. That is,

R=SRi=1Ri

The dimension of Ri will be equal to number of cases in one repeated subject but all Ri share the same parameter vector θR.

Related Topics

Model (linear mixed models algorithms)
Fixed Effects Parameterization (linear mixed models algorithms)
Random Effects Parameterization (linear mixed models algorithms)


Likelihood Functions (linear mixed models algorithms)

linear mixed models algorithms,linear mixed models algorithms,linear mixed models algorithms
likelihood functions,likelihood functions,likelihood functions

Recall that the –2 times log likelihood of the MLE is

−2lMLE(β,θ)=log|V|+rTV−1r+nlog2π

and the –2 times log likelihood of the REML is

−2lMLE(θ)=log|V|+rTV−1r+log|XTV−1X|+(n−p)log2π

where n is the number of observations and p is the rank of fixed effects design matrix. The key components of the likelihood functions are

l1(θ)=log|V|
l2(θ)=rTV−1r
l3(θ)=log|XTV−1X|

Therefore, in each estimation iteration, we need to compute l1(θ), l2(θ) and l3(θ) as well as their 1st and 2nd derivatives with respective to θ.

Related Topics

MIXED Algorithms
Notation (linear mixed models algorithms)
Model (linear mixed models algorithms)
Newton & Scoring Algorithms (linear mixed models algorithms)
Convergence Criteria (linear mixed models algorithms)
Starting value of Newton's Algorithm (linear mixed models algorithms)
Confidence Intervals of Covariance Parameters (linear mixed models algorithms)
Fixed and Random Effect Parameters: Estimation and Prediction (linear mixed models algorithms)
Custom Hypotheses (linear mixed models algorithms)
Saved Values (linear mixed models algorithms)
Information Criteria (linear mixed models algorithms)
Derivatives of Log-Likelihood (linear mixed models algorithms)
Derivatives: Parameters in G (linear mixed models algorithms)
Derivatives: Parameters in R (linear mixed models algorithms)
G and R Cross-derivatives (linear mixed models algorithms)
Gradient and Hessian of REML (linear mixed models algorithms)
Gradient and Hessian of MLE (linear mixed models algorithms)
Cross Product Matrices (linear mixed models algorithms)
References (linear mixed models algorithms)


Newton & Scoring Algorithms (linear mixed models algorithms)

linear mixed models algorithms,linear mixed models algorithms,linear mixed models algorithms
estimation methods,estimation methods,estimation methods

Covariance parameters in θ can be found by maximizing the MLE or REML log-likelihood; however, there are no closed form solutions in general. Therefore Newton and scoring algorithms are used to find the solution numerically. The algorithm is outlined as below,

1. Compute starting value and initial log-likelihood (REML or ML).

2. Compute gradient vector g and Hessian matrix H of the log-likelihood function using last iteration's estimate θi−1. (See later section for computation of g and H)

3. Compute the new step d=−H−1g.

4. Let ρ=1.

5. Compute estimates of ith iteration θi=θi−1+ρd.

6. Check if θi generates valid covariance matrices and improve the likelihood. If not, reduce ρ by half and repeat step (5). If this process is repeated for pre-specified number of times and the stated conditions are still not satisfied, stop.

7. Check convergence of the parameter. If convergence criteria are met, then stop. Otherwise, go back to step (2).

Newton's algorithm performs well if the starting value is close to the solution. In order to improve the algorithm’s robustness to bad starting values, the scoring algorithm is used in the first few iterations. This can be done easily be applying different formulae for the Hessian matrix at each iteration. Apart from improved robustness, the scoring algorithm is faster due to the simpler form of the Hessian matrix.

Related Topics

MIXED Algorithms
Notation (linear mixed models algorithms)
Model (linear mixed models algorithms)
Likelihood Functions (linear mixed models algorithms)
Convergence Criteria (linear mixed models algorithms)
Starting value of Newton's Algorithm (linear mixed models algorithms)
Confidence Intervals of Covariance Parameters (linear mixed models algorithms)
Fixed and Random Effect Parameters: Estimation and Prediction (linear mixed models algorithms)
Custom Hypotheses (linear mixed models algorithms)
Saved Values (linear mixed models algorithms)
Information Criteria (linear mixed models algorithms)
Derivatives of Log-Likelihood (linear mixed models algorithms)
Derivatives: Parameters in G (linear mixed models algorithms)
Derivatives: Parameters in R (linear mixed models algorithms)
G and R Cross-derivatives (linear mixed models algorithms)
Gradient and Hessian of REML (linear mixed models algorithms)
Gradient and Hessian of MLE (linear mixed models algorithms)
Cross Product Matrices (linear mixed models algorithms)
References (linear mixed models algorithms)


Convergence Criteria (linear mixed models algorithms)

linear mixed models algorithms,linear mixed models algorithms,linear mixed models algorithms
convergence criteria,convergence criteria,convergence criteria

There are three types of convergence criteria: parameter convergence, log-likelihood convergence and Hessian convergence. For parameter and log-likelihood convergence, they are subdivided into absolute and relative. If we let ε be some given tolerance level and θs,i be the sth parameter in ith iteration, li be the log-likelihood in the ith iteration, gi be the gradient vector in ith iteration, and Hi be the hessian matrix in ith iteration, then the criteria can be written as follows:

Absolute parameter convergence: maxs|θs,i−θs,i−1|<ε

Relative parameter convergence: maxs|θs,i−θs,i−1||θs,i−1|<ε

Absolute log-likelihood convergence: |li−li−1|<ε

Relative log-likelihood convergence: |li−li−1||li−1|<ε

Absolute Hessian convergence: gTiH−1igi<ε

Relative Hessian convergence: gTiH−1igi|li|<ε

Denominator terms that equal 0 are replaced by 1.

Related Topics

MIXED Algorithms
Notation (linear mixed models algorithms)
Model (linear mixed models algorithms)
Likelihood Functions (linear mixed models algorithms)
Newton & Scoring Algorithms (linear mixed models algorithms)
Starting value of Newton's Algorithm (linear mixed models algorithms)
Confidence Intervals of Covariance Parameters (linear mixed models algorithms)
Fixed and Random Effect Parameters: Estimation and Prediction (linear mixed models algorithms)
Custom Hypotheses (linear mixed models algorithms)
Saved Values (linear mixed models algorithms)
Information Criteria (linear mixed models algorithms)
Derivatives of Log-Likelihood (linear mixed models algorithms)
Derivatives: Parameters in G (linear mixed models algorithms)
Derivatives: Parameters in R (linear mixed models algorithms)
G and R Cross-derivatives (linear mixed models algorithms)
Gradient and Hessian of REML (linear mixed models algorithms)
Gradient and Hessian of MLE (linear mixed models algorithms)
Cross Product Matrices (linear mixed models algorithms)
References (linear mixed models algorithms)


Starting value of Newton's Algorithm (linear mixed models algorithms)

If no prior information is available, we can choose the initial values of G and R to be the identity. However, it is highly desirably to estimate the scale of the parameter. By ignoring the random effects, and assuming the residual errors are i.i.d. with variance σ2, we can fit a GLM model and estimate σ2 by the residual sum of squares
^
σ
2. Then we choose the starting value of Newton's algorithm to be

Gk=
^
σ
2K+1 and R=
^
σ
2K+1

Related Topics

MIXED Algorithms
Notation (linear mixed models algorithms)
Model (linear mixed models algorithms)
Likelihood Functions (linear mixed models algorithms)
Newton & Scoring Algorithms (linear mixed models algorithms)
Convergence Criteria (linear mixed models algorithms)
Confidence Intervals of Covariance Parameters (linear mixed models algorithms)
Fixed and Random Effect Parameters: Estimation and Prediction (linear mixed models algorithms)
Custom Hypotheses (linear mixed models algorithms)
Saved Values (linear mixed models algorithms)
Information Criteria (linear mixed models algorithms)
Derivatives of Log-Likelihood (linear mixed models algorithms)
Derivatives: Parameters in G (linear mixed models algorithms)
Derivatives: Parameters in R (linear mixed models algorithms)
G and R Cross-derivatives (linear mixed models algorithms)
Gradient and Hessian of REML (linear mixed models algorithms)
Gradient and Hessian of MLE (linear mixed models algorithms)
Cross Product Matrices (linear mixed models algorithms)
References (linear mixed models algorithms)


Confidence Intervals of Covariance Parameters (linear mixed models algorithms)

The estimate
^
θ
(ML or REML) is asymptotically normally distributed. Its variance covariance matrix can be approximated by −2H−1, where H is the hessian matrix of the log-likelihood function evaluated at
^
θ
. A simple Wald’s type confidence interval for any covariance parameter can be obtained by using the asymptotic normality of the parameter estimates, however it is not very appropriate for variance parameters and correlation parameters that have a range of [0,∞) and [−1,1] respectively. Therefore these parameters are transformed to parameters that have range (−∞,∞). Using the uniform delta method, see for example (van der Vaart, 1998), these transformed estimates still have asymptotic normal distributions.

Suppose we are estimating a variance parameter σ2 by
^
σ
2n that is distributed as N[σ2,Var(
^
σ
2n)] asymptotically. The transformation we used is log(σ2) which can correct the skewness of
^
σ
2n, moreover log(
^
σ
2n) has the range (−∞,∞) which matches that of normal distribution. Using the delta method, one can show that the asymptotic distribution of log(
^
σ
2n) is N[log(σ2),σ−4Var(
^
σ
2n)]. Thus, a (1−α)100% confidence interval of log(σ2) is given by

log(
^
σ
2n)±z1−a/2
^
σ
−2n
√ Var(
^
σ
2n)

where z1−α/2 is the upper (1−α/2) percentage point of standard normal distribution. By inverting this confidence interval, a (1−α)100% confidence interval for σ2 is given by

exp(log(
^
σ
2n)±z1−α/2
^
σ
−2n
√ Var(
^
σ
2n)
)

When we need a confidence interval for a correlation parameter ρ, a possible transformation will be its generalized logit arctanh(ρ)=0.5log[(1+ρ)/(1−ρ)]. The resulting confidence interval for ρ will be

tanh(arctanh(
^
ρ
)±z1−α/2(1−
^
ρ
2)−1
√ Var(
^
ρ
)
)

Related Topics

MIXED Algorithms
Notation (linear mixed models algorithms)
Model (linear mixed models algorithms)
Likelihood Functions (linear mixed models algorithms)
Newton & Scoring Algorithms (linear mixed models algorithms)
Convergence Criteria (linear mixed models algorithms)
Starting value of Newton's Algorithm (linear mixed models algorithms)
Fixed and Random Effect Parameters: Estimation and Prediction (linear mixed models algorithms)
Custom Hypotheses (linear mixed models algorithms)
Saved Values (linear mixed models algorithms)
Information Criteria (linear mixed models algorithms)
Derivatives of Log-Likelihood (linear mixed models algorithms)
Derivatives: Parameters in G (linear mixed models algorithms)
Derivatives: Parameters in R (linear mixed models algorithms)
G and R Cross-derivatives (linear mixed models algorithms)
Gradient and Hessian of REML (linear mixed models algorithms)
Gradient and Hessian of MLE (linear mixed models algorithms)
Cross Product Matrices (linear mixed models algorithms)
References (linear mixed models algorithms)


Fixed and Random Effect Parameters: Estimation and Prediction (linear mixed models algorithms)

linear mixed models algorithms,linear mixed models algorithms,linear mixed models algorithms
fixed effect estimates,fixed effect estimates,fixed effect estimates
linear mixed models algorithms,linear mixed models algorithms,linear mixed models algorithms
random effect estimates,random effect estimates,random effect estimates

After we obtain an estimate of θ, the best linear unbiased estimator (BLUE) of β and the best linear unbiased predictor (BLUP) of γ can be found by solving the mixed model equations, Henderson (1984).

[
XT
^
R
−1X 		XT
^
R
−1Z
ZT
^
R
−1X 		ZT
^
R
−1X+
^
G
−1
](
β
γ
)=[
XT
^
R
−1y
ZT
^
R
−1y
]

The solution of this equation can be expressed as

^
β
=(XT
^
V
−1X)−XT
^
V
−1y
^
γ
=
^
G
ZT
^
V
−1(y−X
^
β
)
=
^
G
[ZT
^
V
−1y−ZT
^
V
−1X
^
β
]

The covariance matrix C of
^
β
and
^
γ
is given by

C =Cov(
^
β
,
^
γ
)
=[
XT
^
R
−1X 		XT
^
R
−1Z
ZT
^
R
−1X 		ZT
^
R
−1Z+
^
G
−1
]−
=[
^
C
11
^
C
T
^
C
21
^
C
22
]

where

^
C
11=(XT
^
V
−1X)−

^
C
21=−
^
G
ZT
^
V
−1X
^
C
11

^
C
22=(ZT
^
R
−1Z+
^
G
−1)−1−
^
C
21XT
^
V
−1Z
^
G

Related Topics

MIXED Algorithms
Notation (linear mixed models algorithms)
Model (linear mixed models algorithms)
Likelihood Functions (linear mixed models algorithms)
Newton & Scoring Algorithms (linear mixed models algorithms)
Convergence Criteria (linear mixed models algorithms)
Starting value of Newton's Algorithm (linear mixed models algorithms)
Confidence Intervals of Covariance Parameters (linear mixed models algorithms)
Custom Hypotheses (linear mixed models algorithms)
Saved Values (linear mixed models algorithms)
Information Criteria (linear mixed models algorithms)
Derivatives of Log-Likelihood (linear mixed models algorithms)
Derivatives: Parameters in G (linear mixed models algorithms)
Derivatives: Parameters in R (linear mixed models algorithms)
G and R Cross-derivatives (linear mixed models algorithms)
Gradient and Hessian of REML (linear mixed models algorithms)
Gradient and Hessian of MLE (linear mixed models algorithms)
Cross Product Matrices (linear mixed models algorithms)
References (linear mixed models algorithms)


Custom Hypotheses (linear mixed models algorithms)

linear mixed models algorithms,linear mixed models algorithms,linear mixed models algorithms
custom tests,custom tests,custom tests

In general, one can construct estimators or predictors for

Lb=[
L0 L1
] [
β
γ
]

for some hypothesis matrix L. Estimators or predictors of Lb can easily be constructed by substituting
^
β
and
^
γ
into the equation for Lb and its variance covariance matrix can be approximated by LCLT. If L1 is zero and L0β is estimable, L
^
b
is called the best linear unbiased estimator of L0β. If L1 is nonzero and L0β is estimable, L
^
b
is called the best linear unbiased predictor of Lb.

To test the hypothesis H0:Lb=a for a given vector a, we can use the statistic

F=(L
^
b
−a)T(L
^
C
LT)−1(L
^
b
−a)q

where q is the rank of the matrix L. This statistic has an approximate F distribution. The numerator degrees of freedom is q and the denominator degree of freedom can be obtained by Satterthwaite (1946) approximation. The method outlined below is similar to Giesbrecht and Burns (1985), McLean and Sanders (1988), and Fai and Cornelius (1996).

Related Topics

MIXED Algorithms
Notation (linear mixed models algorithms)
Model (linear mixed models algorithms)
Likelihood Functions (linear mixed models algorithms)
Newton & Scoring Algorithms (linear mixed models algorithms)
Convergence Criteria (linear mixed models algorithms)
Starting value of Newton's Algorithm (linear mixed models algorithms)
Confidence Intervals of Covariance Parameters (linear mixed models algorithms)
Fixed and Random Effect Parameters: Estimation and Prediction (linear mixed models algorithms)
Saved Values (linear mixed models algorithms)
Information Criteria (linear mixed models algorithms)
Derivatives of Log-Likelihood (linear mixed models algorithms)
Derivatives: Parameters in G (linear mixed models algorithms)
Derivatives: Parameters in R (linear mixed models algorithms)
G and R Cross-derivatives (linear mixed models algorithms)
Gradient and Hessian of REML (linear mixed models algorithms)
Gradient and Hessian of MLE (linear mixed models algorithms)
Cross Product Matrices (linear mixed models algorithms)
References (linear mixed models algorithms)
Satterthwaite's Approximation (linear mixed models algorithms)
Type I and Type III Statistics (linear mixed models algorithms)
Estimated Marginal Means (EMMEANS) (linear mixed models algorithms)


Satterthwaite's Approximation (linear mixed models algorithms)

To find the denominator degrees of freedom of the F statistic, first perform the spectral decomposition L
^
C
LT=ΓTDΓ where Γ is an orthogonal matrix of eigenvectors and D is a diagonal matrix of eigenvalues. If lm is the mth row of ΓL, dm is the mth eigenvalues and

νm=2dmgmΣ(
^
θ
)−1gm

where gm=∂lmClTm∂θ|θ=
^
θ
and Σ(
^
θ
)−1 is the covariance matrix of the estimated covariance parameters. If

E=qΣm=1νmνm−2I(νm>2)

then the denominator degree of freedom is given by

ν=2EE−q

Note that the degrees of freedom can only be computed when E>q.

Related Topics

Custom Hypotheses (linear mixed models algorithms)
Type I and Type III Statistics (linear mixed models algorithms)
Estimated Marginal Means (EMMEANS) (linear mixed models algorithms)


Type I and Type III Statistics (linear mixed models algorithms)

Type I and type III test statistics are special cases of custom hypothesis tests.

Related Topics

Custom Hypotheses (linear mixed models algorithms)
Satterthwaite's Approximation (linear mixed models algorithms)
Estimated Marginal Means (EMMEANS) (linear mixed models algorithms)


Estimated Marginal Means (EMMEANS) (linear mixed models algorithms)

Estimated marginal means are special cases of custom hypothesis test. The construction of the matrix for EMMEANS can be found in "Estimated Marginal Means" section of GLM's algorithm document. If Bonferroni or Sidak adjustment is requested for multiple comparisons, they will be computed according to the algorithm detailed in Appendix 10:Post Hoc Tests.

Related Topics

Custom Hypotheses (linear mixed models algorithms)
Satterthwaite's Approximation (linear mixed models algorithms)
Type I and Type III Statistics (linear mixed models algorithms)


Saved Values (linear mixed models algorithms)

linear mixed models algorithms,linear mixed models algorithms,linear mixed models algorithms
saved values,saved values,saved values

Predicted values are computed by

^
y
=X
^
β
+Z
^
γ

Fixed predicted values are be computed by

^
y
=X
^
β

Residuals are computed by

r=
^
y
−y

If standard errors or degrees of freedom are requested for predicted values, a L matrix will be constructed for each case and the formula in custom hypothesis section will be used to obtain the requested values.

Related Topics

MIXED Algorithms
Notation (linear mixed models algorithms)
Model (linear mixed models algorithms)
Likelihood Functions (linear mixed models algorithms)
Newton & Scoring Algorithms (linear mixed models algorithms)
Convergence Criteria (linear mixed models algorithms)
Starting value of Newton's Algorithm (linear mixed models algorithms)
Confidence Intervals of Covariance Parameters (linear mixed models algorithms)
Fixed and Random Effect Parameters: Estimation and Prediction (linear mixed models algorithms)
Custom Hypotheses (linear mixed models algorithms)
Information Criteria (linear mixed models algorithms)
Derivatives of Log-Likelihood (linear mixed models algorithms)
Derivatives: Parameters in G (linear mixed models algorithms)
Derivatives: Parameters in R (linear mixed models algorithms)
G and R Cross-derivatives (linear mixed models algorithms)
Gradient and Hessian of REML (linear mixed models algorithms)
Gradient and Hessian of MLE (linear mixed models algorithms)
Cross Product Matrices (linear mixed models algorithms)
References (linear mixed models algorithms)


Information Criteria (linear mixed models algorithms)

linear mixed models algorithms,linear mixed models algorithms,linear mixed models algorithms
information criteria,information criteria,information criteria
Akaike information criterion,Akaike information criterion,Akaike information criterion
linear mixed models algorithms,linear mixed models algorithms,linear mixed models algorithms
Bayesian information criterion,Bayesian information criterion,Bayesian information criterion
linear mixed models algorithms,linear mixed models algorithms,linear mixed models algorithms

Information criteria are for model comparison, the following criteria are given in smaller is better form. If we let l be the log-likelihood of (REML or ML), n be total number of cases (or total of case weights if used) and d is number of model parameters, the formula for various criteria are given as below,

Akaike information criteria (AIC), Akaike (1974):

−2l+2d

Finite sample corrected (AICC), Hurvich and Tsai (1989):

−2l+2d×n(n−d−1)

Bayesian information criteria (BIC), Schwarz (1978):

−2l+d×log(n)

Consistent AIC (CAIC), Bozdogan (1987):

−2l+d×(log(n)+1)

For REML, the value of n is chosen to be total number of cases minus number fixed effect parameters and d is number of covariance parameters. For ML, the value of n is total number of cases and d is number of fixed effect parameters plus number of covariance parameters.

Related Topics

MIXED Algorithms
Notation (linear mixed models algorithms)
Model (linear mixed models algorithms)
Likelihood Functions (linear mixed models algorithms)
Newton & Scoring Algorithms (linear mixed models algorithms)
Convergence Criteria (linear mixed models algorithms)
Starting value of Newton's Algorithm (linear mixed models algorithms)
Confidence Intervals of Covariance Parameters (linear mixed models algorithms)
Fixed and Random Effect Parameters: Estimation and Prediction (linear mixed models algorithms)
Custom Hypotheses (linear mixed models algorithms)
Saved Values (linear mixed models algorithms)
Derivatives of Log-Likelihood (linear mixed models algorithms)
Derivatives: Parameters in G (linear mixed models algorithms)
Derivatives: Parameters in R (linear mixed models algorithms)
G and R Cross-derivatives (linear mixed models algorithms)
Gradient and Hessian of REML (linear mixed models algorithms)
Gradient and Hessian of MLE (linear mixed models algorithms)
Cross Product Matrices (linear mixed models algorithms)
References (linear mixed models algorithms)


Derivatives of Log-Likelihood (linear mixed models algorithms)

In each Newton or scoring iteration we need to compute the 1st and 2nd derivatives of the components of the log-likelihood lk(θ), k=1,2,3. Here we let gk=∂∂θlk(θ) and Hk=∂2∂θ2lk(θ), k=1,2,3, then the 1st derivatives with respect to the sth parameter in θ is given by

[g1]s=tr(V−1∂∂θsV)

[g2]s=−rV−1(∂∂θsV)V−1r

[g3]s=−tr(
˜
X
TV−1(∂∂θsV)V−1
˜
X
)

and the 2nd derivatives with respect to s and tth parameter are given by

[H1]st=−tr(V−1(∂∂θsV)V−1(∂∂θtV))+tr(V−1∂2∂θs∂θtV)

[H2]st= 2rTV−1(∂∂θsV)V−1(∂∂θtV)V−1r
−2rTV−1(∂∂θsV)V−1
˜
X
˜
X
T(∂∂θtV)V−1r
−rTV−1(∂2∂θs∂θtV)V−1r

[H3]st= 2tr(
˜
X
TV−1(∂∂θsV)V−1(∂∂θtV)V−1
˜
X
)
−tr(
˜
X
TV−1(∂∂θsV)V−1
˜
X
˜
X
TV−1(∂∂θtV)V−1
˜
X
)
−tr(
˜
X
TV−1(∂2∂θs∂θtV)V−1
˜
X
)

where
˜
X
=XC for a matrix C satisfying CCT=(X´V−1X)−=P and r=y−X
^
β
.

Related Topics

MIXED Algorithms
Notation (linear mixed models algorithms)
Model (linear mixed models algorithms)
Likelihood Functions (linear mixed models algorithms)
Newton & Scoring Algorithms (linear mixed models algorithms)
Convergence Criteria (linear mixed models algorithms)
Starting value of Newton's Algorithm (linear mixed models algorithms)
Confidence Intervals of Covariance Parameters (linear mixed models algorithms)
Fixed and Random Effect Parameters: Estimation and Prediction (linear mixed models algorithms)
Custom Hypotheses (linear mixed models algorithms)
Saved Values (linear mixed models algorithms)
Information Criteria (linear mixed models algorithms)
Derivatives: Parameters in G (linear mixed models algorithms)
Derivatives: Parameters in R (linear mixed models algorithms)
G and R Cross-derivatives (linear mixed models algorithms)
Gradient and Hessian of REML (linear mixed models algorithms)
Gradient and Hessian of MLE (linear mixed models algorithms)
Cross Product Matrices (linear mixed models algorithms)
References (linear mixed models algorithms)


Derivatives: Parameters in G (linear mixed models algorithms)

Derivatives with respect to parameters in G can be constructed by from the entries of

W1(X;r;Z) =[
W1(X,X) | W1(X,Z) | W1(X,r)
W1(Z,X) | W1(Z,Z) | W1(Z,r)
W1(r,X) | W1(r,Z) | W1(r,r)
]
=[
XTV−1X | XTV−1Z | XTV−1r
ZTV−1X | ZTV−1Z | ZTV−1r
rTV−1X | rTV−1Z | rTV−1r
]

The matrix W1(X;r;Z) can be computed from W1(X;y;Z)given in Cross Product Matrices (linear mixed models algorithms), by using the following relationship,

r=y−Xb0

where b0 is the current estimate of β.

Using the above formula, we can obtain the following expressions,

rTV−1r | =yTV−1y−yTV−1Xb0
 | =W1(y,y)−W1(y,X)b0

XTV−1r | =XTV−1y−XTV−1Xb0
 | =W1(X,y)−W1(X,X)b0

ZTV−1r | =ZTV−1y−ZTV−1Xb0
 | =W1(Z,y)−W1(Z,X)b0

In terms of the elements in W1(X;r;Z), we can write down the 1st derivatives of l1, l2 and l3 with respect to a parameter θs of the G matrix,

[g1]G,s=tr(W1(Z,Z)∂∂θsG)

[g2]G,s=−W1(Z,r)T(∂∂θsG)W1(Z,r)

[g3]G,s=−tr(W1(X,Z)(∂∂θsG)W1(Z,X)P)

For the second derivatives, we first define the following simplification factors

HstG1=−W1(Z,Z)(∂∂θsG)W1(Z,Z)(∂∂θtG)+W1(Z,Z)∂2∂θs∂θtG

HsG2=W1(X,Z)(∂∂θsG)W1(Z,r)

HstG2=2W1(r,Z)(∂∂θsG)W1(Z,Z)(∂∂θtG)W1(Z,r)−W1(r,Z)(∂2∂θs∂θtG)W1(Z,r)

HsG3=W1(X,Z)(∂∂θsG)W1(Z,X)

HstG3=2W1(X,Z)(∂∂θsG)W1(Z,Z)(∂∂θtG)W1(Z,X)−W1(X,Z)(∂2∂θs∂θtG)W1(Z,X)

then second derivatives of l1, l2 and l3 w.r.t. θs and θt (in G) are given by

[H1]G,st=tr(HstG1)

[H2]G,st=HstG2−2(HsG2)TPHtG2

[H3]G,st=tr[HstG3P]−[HsG3PHtG3P]

Related Topics

MIXED Algorithms
Notation (linear mixed models algorithms)
Model (linear mixed models algorithms)
Likelihood Functions (linear mixed models algorithms)
Newton & Scoring Algorithms (linear mixed models algorithms)
Convergence Criteria (linear mixed models algorithms)
Starting value of Newton's Algorithm (linear mixed models algorithms)
Confidence Intervals of Covariance Parameters (linear mixed models algorithms)
Fixed and Random Effect Parameters: Estimation and Prediction (linear mixed models algorithms)
Custom Hypotheses (linear mixed models algorithms)
Saved Values (linear mixed models algorithms)
Information Criteria (linear mixed models algorithms)
Derivatives of Log-Likelihood (linear mixed models algorithms)
Derivatives: Parameters in R (linear mixed models algorithms)
G and R Cross-derivatives (linear mixed models algorithms)
Gradient and Hessian of REML (linear mixed models algorithms)
Gradient and Hessian of MLE (linear mixed models algorithms)
Cross Product Matrices (linear mixed models algorithms)
References (linear mixed models algorithms)


Derivatives: Parameters in R (linear mixed models algorithms)

To compute R derivatives, we need to introduce the matrices

W(1)s0=−∂W0∂θs

and

W(2)st0=−∂2W0∂θs∂θt

where θs and θt are the sth and tth parameters of R. Therefore,

W0(A,B) =ATR−1B

W(1)s0(A,B) | =ATR−1(∂∂θsR)R−1B
 | =−AT[∂∂θsR−1]B

W(2)st0(A,B) | =AT[R−1(∂2∂θs∂θtR)R−1−R−1(∂∂θsR)R−1(∂∂θtR)R−1
 | −R−1(∂∂θtR)R−1(∂∂θsR)R−1]B
 | =−AT[∂2∂θsθtR−1]B

The matrices A and B can be X, Z,
˜
Z
or r, where

˜
Z
=ZM=Z(G−1+ZTR−1Z)−1

and

r=[I−X(X´V−1X)−1X´V−1]y=y−Xb0

Note: The matrix (G−1+ZTR−1Z)−1 involved in
˜
Z
can be obtained by pre/post multiplying (I+LTZTR−1ZL)− by L and LT).

Using these notations, the 1st derivatives of lk(θ) with respect to a parameter in R are as follows,

[g1]R,s=tr(R−1∂∂θsR)−tr(W(1)s0(Z,Z)M)

[g2]R,s= −W(1)s0(r,r)+2W0(r,
˜
Z
)W(1)s0(Z,r)
−W0(r,
˜
Z
)W(1)s0(Z,Z)W0(
˜
Z
,r)

[g3]R,s=−tr(HsR3)

To compute 2nd derivatives w.r.t. θs and θt (of R), we need to consider the following simplification factors.

HstR1= | −R−1(∂∂θsR)R−1(∂∂θtR)+R−1(∂2∂θs∂θtR)
 | −W(2)st0(Z,Z)M−W(1)s0(Z,Z)MW(1)t0(Z,Z)M

HsR2= W(1)s0(X,r)+W0(X,
˜
Z
)W(1)s0(Z,Z) W(
˜
Z
,r)
−W0(X,
˜
Z
)W(1)s0(Z,r)−W(1)s0(X,Z)W0(
˜
Z
,r)

HstR2= −W(2)st0(r,r)
−W0(r,
˜
Z
)W(2)st0(Z,Z)W0(
˜
Z
,r)
+2W0(r,
˜
Z
)W(2)st0(Z,r)
−2[W0(r,
˜
Z
)W(1)s0(Z,Z)−W(1)s0(r,Z)]M
×[W(1)t0(Z,Z)W0(
˜
Z
,r)−W(1)t0(Z,r)]

HsR3= W(1)s0(X,X)−W0(X,
˜
Z
)W(1)s0(Z,X)
−W(1)s0(X,Z)W0(
˜
Z
,X)
+W0(X,
˜
Z
)W(1)s0(Z,Z)W0(
˜
Z
,X)

HstR3= −W(2)st0(X,X)
−W0(X,
˜
Z
)W(2)st0(Z,Z)W0(
˜
Z
,X)
+2W0(X,
˜
Z
)W(2)st0(Z,X)
−2[W0(X,
˜
Z
)W(1)s0(Z,Z)−W(1)s0(X,Z)]M
×[W(1)t0(Z,Z)W0(
˜
Z
,X)−W(1)t0(Z,X)]

Based on these simplification terms, the entries of the Hessian matrices are given by

[H1]R,st=tr(HstR1)

[H2]R,st=HstR2−2(HsR2)TPHtR2

[H3]R,st=tr(HstR3P−HsR3PHtR3P)

Related Topics

MIXED Algorithms
Notation (linear mixed models algorithms)
Model (linear mixed models algorithms)
Likelihood Functions (linear mixed models algorithms)
Newton & Scoring Algorithms (linear mixed models algorithms)
Convergence Criteria (linear mixed models algorithms)
Starting value of Newton's Algorithm (linear mixed models algorithms)
Confidence Intervals of Covariance Parameters (linear mixed models algorithms)
Fixed and Random Effect Parameters: Estimation and Prediction (linear mixed models algorithms)
Custom Hypotheses (linear mixed models algorithms)
Saved Values (linear mixed models algorithms)
Information Criteria (linear mixed models algorithms)
Derivatives of Log-Likelihood (linear mixed models algorithms)
Derivatives: Parameters in G (linear mixed models algorithms)
G and R Cross-derivatives (linear mixed models algorithms)
Gradient and Hessian of REML (linear mixed models algorithms)
Gradient and Hessian of MLE (linear mixed models algorithms)
Cross Product Matrices (linear mixed models algorithms)
References (linear mixed models algorithms)


G and R Cross-derivatives (linear mixed models algorithms)

This section gives expressions for the 2nd derivatives of l1, l2 and l3 with respect to a parameter θs in G and a parameter θt in G . First, we introduce the following simplification terms,

HstGR1= −W(1)s0(Z,Z)(∂∂θtG)
+2W1(s)0(Z,Z)(∂∂θtG)W0(Z,
˜
Z
)
−W(1)s0(Z,Z)W0(
˜
Z
,Z)(∂∂θtG)W0(Z,
˜
Z
)

HstGR2= | 2[W(1)s0(r,Z)−W0(r,Z)MW(1)s0(Z,Z)]
 | ×[MW0(Z,Z)−I](∂∂θtG)[W0(Z,Z)M−I]
 | ×W0(Z,r)

HstGR3= | 2[W(1)s0(X,Z)−W0(X,Z)MW(1)s0(Z,Z)]
 | ×[MW0(Z,Z)−I](∂∂θtG)[W0(Z,Z)M−I]
 | ×W0(Z,X)

Based on these simplification terms, the second derivatives are given by

[H1]GR,st=tr(HstGR1)

[H2]GR,st=HstGR2−2(HsG2)THtR2

[H3]GR,st=tr(HstGR3P−HsG3PHtR3P)

Related Topics

MIXED Algorithms
Notation (linear mixed models algorithms)
Model (linear mixed models algorithms)
Likelihood Functions (linear mixed models algorithms)
Newton & Scoring Algorithms (linear mixed models algorithms)
Convergence Criteria (linear mixed models algorithms)
Starting value of Newton's Algorithm (linear mixed models algorithms)
Confidence Intervals of Covariance Parameters (linear mixed models algorithms)
Fixed and Random Effect Parameters: Estimation and Prediction (linear mixed models algorithms)
Custom Hypotheses (linear mixed models algorithms)
Saved Values (linear mixed models algorithms)
Information Criteria (linear mixed models algorithms)
Derivatives of Log-Likelihood (linear mixed models algorithms)
Derivatives: Parameters in G (linear mixed models algorithms)
Derivatives: Parameters in R (linear mixed models algorithms)
Gradient and Hessian of REML (linear mixed models algorithms)
Gradient and Hessian of MLE (linear mixed models algorithms)
Cross Product Matrices (linear mixed models algorithms)
References (linear mixed models algorithms)


Gradient and Hessian of REML (linear mixed models algorithms)

The restricted log likelihood is given by

−2lREML(θ|y)= | log|V|+rTV−1r
 | +log|XTV−1X|+(n−p)log2π

where p is equal to the rank of X. Therefore the sth element of the gradient vector is given by

[g]s=[g1]s+[g2]s+[g3]s

and the (s,t)th element of the Hessian matrix is given by

[H]st=[H1]st+[H2]st+[H3]st

If scoring algorithm is used, the Hessian can be simplified to

[H]st=−[H1]st+[H3]st

Related Topics

MIXED Algorithms
Notation (linear mixed models algorithms)
Model (linear mixed models algorithms)
Likelihood Functions (linear mixed models algorithms)
Newton & Scoring Algorithms (linear mixed models algorithms)
Convergence Criteria (linear mixed models algorithms)
Starting value of Newton's Algorithm (linear mixed models algorithms)
Confidence Intervals of Covariance Parameters (linear mixed models algorithms)
Fixed and Random Effect Parameters: Estimation and Prediction (linear mixed models algorithms)
Custom Hypotheses (linear mixed models algorithms)
Saved Values (linear mixed models algorithms)
Information Criteria (linear mixed models algorithms)
Derivatives of Log-Likelihood (linear mixed models algorithms)
Derivatives: Parameters in G (linear mixed models algorithms)
Derivatives: Parameters in R (linear mixed models algorithms)
G and R Cross-derivatives (linear mixed models algorithms)
Gradient and Hessian of MLE (linear mixed models algorithms)
Cross Product Matrices (linear mixed models algorithms)
References (linear mixed models algorithms)


Gradient and Hessian of MLE (linear mixed models algorithms)

The log likelihood is given by

−2lMLE(θ|y)= | log|V|+rTV−1r
 | +nlog2π

Therefore the sth element of the gradient vector is given by

[g]s=[g1]s+[g2]s

and the (s,t)th element of the Hessian matrix is given by

[H]st=[H1]st+[H2]st

If scoring algorithm is used the Hessian can be simplified to

[H]st=−[H1]st

It should be noted that the Hessian matrices for the scoring algorithm in both ML and REML are not 'exact'. In order to speed up calculation, some second derivative terms are dropped. Therefore, they are only used in intermediate step of optimization but not for standard error calculations.

Related Topics

MIXED Algorithms
Notation (linear mixed models algorithms)
Model (linear mixed models algorithms)
Likelihood Functions (linear mixed models algorithms)
Newton & Scoring Algorithms (linear mixed models algorithms)
Convergence Criteria (linear mixed models algorithms)
Starting value of Newton's Algorithm (linear mixed models algorithms)
Confidence Intervals of Covariance Parameters (linear mixed models algorithms)
Fixed and Random Effect Parameters: Estimation and Prediction (linear mixed models algorithms)
Custom Hypotheses (linear mixed models algorithms)
Saved Values (linear mixed models algorithms)
Information Criteria (linear mixed models algorithms)
Derivatives of Log-Likelihood (linear mixed models algorithms)
Derivatives: Parameters in G (linear mixed models algorithms)
Derivatives: Parameters in R (linear mixed models algorithms)
G and R Cross-derivatives (linear mixed models algorithms)
Gradient and Hessian of REML (linear mixed models algorithms)
Cross Product Matrices (linear mixed models algorithms)
References (linear mixed models algorithms)


Cross Product Matrices (linear mixed models algorithms)

During estimation we need to construct several cross product matrices in each iteration, namely: W0(X;y;Z), W1(X;y;Z), WA0(X;y;Z), WA1(X;y;Z), Wb0(X;y), and Wb1(X;y). The sweep operator (see for example Goodnight (1979)) is used in constructing these matrices. Basically, the sweep operator performs the following transformation

[
A | B
B´ | C
]⇒[
A− | A−B
−B´A− | C−B´A−B
]

The steps needed to construct these matrices are outlined below:

STEP 1: Construct

W0(X;y;Z)=[
XTR−1X | XTR−1y | XTR−1Z
yTR−1X | yTR−1y | yTR−1Z
ZTR−1X | ZTR−1Z | yTR−1y
]

STEP 2:

Construct W0(X;y;Z) which is an augmented version of W0(X;y;Z). It is given by the following expression.

WA0(X;y;Z)=[
I+LTZTR−1ZL | LTW0(Z,·)
W0(·,Z)L | W0
]

where L is the lower-triangular Cholesky root of G, i.e. G=LLT and W0(Z;˙;˙) is the rows of W0 corresponding to Z.

STEP 3: Sweeping WA0(X;y;Z) by pivoting on diagonal elements in upper-left partition will give us the matrix WA1(X;y;Z), which is shown below.

WA1(X;y;Z)=[
WA1(1,1) | WA1(1,1)LTW(Z,·)
−W0(·,Z)LWA1(1,1) | W1(X;y;Z)
]

where

W1(X;y;Z)=[
XTV−1X | XTV−1Z | XTV−1y
ZTV−1X | ZTV−1Z | ZTX−1y
yTV−1X | yTV−1Z | yTV−1y
]

and

WA1(1,1)=(I+LTZTR−1ZL)−

During the sweeping, if we accumulate the log of the ith diagonal element just before ith sweep, we will obtain log|I+LTZTR−1ZL|=log|V|−log|R| as a by-product. Thus, adding to this quantity by log|R| will give us l1(θ).

STEP 4: Consider the following submatrix Wb0(X;y) of W1(X;y;Z),

Wb0(X;y)=[
XTV−1X | XTV−1y
yTV−1X | yTV−1y
]

Sweeping Wb0(X;y) by pivoting on diagonal elements of XTV−1X will give us

Wb1(X;y)=[
(XTV−1X)− | b0
bT0 | l2(θ)
]

where b0 is an estimate of β0 in the current iteration. After this step, we will obtain l2(θ) and l3(θ)=|XTV−1X|.

Related Topics

MIXED Algorithms
Notation (linear mixed models algorithms)
Model (linear mixed models algorithms)
Likelihood Functions (linear mixed models algorithms)
Newton & Scoring Algorithms (linear mixed models algorithms)
Convergence Criteria (linear mixed models algorithms)
Starting value of Newton's Algorithm (linear mixed models algorithms)
Confidence Intervals of Covariance Parameters (linear mixed models algorithms)
Fixed and Random Effect Parameters: Estimation and Prediction (linear mixed models algorithms)
Custom Hypotheses (linear mixed models algorithms)
Saved Values (linear mixed models algorithms)
Information Criteria (linear mixed models algorithms)
Derivatives of Log-Likelihood (linear mixed models algorithms)
Derivatives: Parameters in G (linear mixed models algorithms)
Derivatives: Parameters in R (linear mixed models algorithms)
G and R Cross-derivatives (linear mixed models algorithms)
Gradient and Hessian of REML (linear mixed models algorithms)
Gradient and Hessian of MLE (linear mixed models algorithms)
References (linear mixed models algorithms)


References (linear mixed models algorithms)

linear mixed models algorithms,linear mixed models algorithms,linear mixed models algorithms
references,references,references

Akaike, H. 1974. A new look at the statistical model identification. IEEE Transaction on Automatic Control, AC–19, 716-723.

Bozdogan, H. 1987. Model Selection and Akaike's Information Criterion (AIC): The General Theory and Its Analytical Extensions. Psychometrika, 52, 345-370.

Fai, A. H. T., and P. L. Cornelius. 1996. Approximate F-tests of Multiple Degree of Freedom Hypotheses in Generalized Least Squares Analyses of Unbalanced Split-plot Experiments. Journal of Statistical Computation and Simulation, 54, 363-378.

Giesbrecht, F. G., and J. C. Burns. 1985. Two-Stage Analysis Based on a Mixed Model: Large-sample Asymptotic Theory and Small-Sample Simulation Results. Biometrics, 41, 477-486.

Goodnight, J. H. 1979. A tutorial on the SWEEP operator. The American Statistician, 33:3, 149-158.

Henderson, C. R. 1984. Applications of Linear Models in Animal Breeding. Guelph, Ontario: University of Guelph.

Hurvich, C. M., and C. L. Tsai. 1989. Regression and Time Series Model Selection in Small Samples. Biometrika, 76, 297-307.

McLean, R. A., and W. L. Sanders. 1988. Approximating Degrees of Freedom for Standard Errors in Mixed Linear Models. In: Proceedings of the Statistical Computing Section, American Statistical Association. New Orleans: American Statistical Association.

Schwarz, G. 1978. Estimating the Dimension of a Model. Annals of Statistics, 6, 461-464.

Wolfinger, R., R. Tobias, and J. Sall. 1994. Computing Gaussian likelihoods and their derivatives for general linear mixed models. SIAM Journal on Scientific Computing, 15:6, 1294-1310.

Related Topics

MIXED Algorithms
Notation (linear mixed models algorithms)
Model (linear mixed models algorithms)
Likelihood Functions (linear mixed models algorithms)
Newton & Scoring Algorithms (linear mixed models algorithms)
Convergence Criteria (linear mixed models algorithms)
Starting value of Newton's Algorithm (linear mixed models algorithms)
Confidence Intervals of Covariance Parameters (linear mixed models algorithms)
Fixed and Random Effect Parameters: Estimation and Prediction (linear mixed models algorithms)
Custom Hypotheses (linear mixed models algorithms)
Saved Values (linear mixed models algorithms)
Information Criteria (linear mixed models algorithms)
Derivatives of Log-Likelihood (linear mixed models algorithms)
Derivatives: Parameters in G (linear mixed models algorithms)
Derivatives: Parameters in R (linear mixed models algorithms)
G and R Cross-derivatives (linear mixed models algorithms)
Gradient and Hessian of REML (linear mixed models algorithms)
Gradient and Hessian of MLE (linear mixed models algorithms)
Cross Product Matrices (linear mixed models algorithms)


MLP Algorithms

MLP (command),MLP (command),MLP (command)
algorithms,algorithms,algorithms
Multilayer Perceptron,Multilayer Perceptron,Multilayer Perceptron
algorithms,algorithms,algorithms
multilayer perceptron algorithms,multilayer perceptron algorithms,multilayer perceptron algorithms

The multilayer perceptron (MLP) is a feed-forward, supervised learning network with up to two hidden layers. The MLP network is a function of one or more predictors (also called inputs or independent variables) that minimizes the prediction error of one or more target variables (also called outputs). Predictors and targets can be a mix of categorical and scale variables.

Related Topics

Notation (multilayer perceptron algorithms)
Architecture (multilayer perceptron algorithms)
Activation Functions (multilayer perceptron algorithms)
Error Functions (multilayer perceptron algorithms)
Expert Architecture Selection (multilayer perceptron algorithms)
Training (multilayer perceptron algorithms)
Alternated Simulated Annealing and Training (multilayer perceptron algorithms)
Error Backpropagation (multilayer perceptron algorithms)
Gradient Descent (multilayer perceptron algorithms)
Scaled Conjugate Gradient (multilayer perceptron algorithms)
Stopping Rules (multilayer perceptron algorithms)
Missing Values (multilayer perceptron algorithms)
Output Statistics (multilayer perceptron algorithms)
References (multilayer perceptron algorithms)


Notation (multilayer perceptron algorithms)

multilayer perceptron algorithms,multilayer perceptron algorithms,multilayer perceptron algorithms
notation,notation,notation

The following notation is used throughout this chapter unless otherwise stated:

X(m)=(x(m)1,...,x(m)P) | Input vector, pattern m, m=1,...M.
Y(m)=(y(m)1,...,y(m)R) | Target vector, pattern m.
I | Number of layers, discounting the input layer.
Ji | Number of units in layer i. J0 = P, Ji = R, discounting the bias unit.
Γc | Set of categorical outputs.
Γ | Set of scale outputs.
Γh | Set of subvectors of Y(m) containing 1-of-c coded hth categorical variable.
ami:j | Unit j of layer i, pattern m, j=0,...,Ji;i=0,...,I.
wi:j,k | Weight leading from layer i−1, unit j to layer i, unit k. No weights connect ami−1:j and the bias ami:0; that is, there is no wi:j,0 for any j.
cmi:k | Ji−1Σj=0wi:j,kami−1:j, i=1,...,I.
γi(c) | Activation function for layer i.
w | Weight vector containing all weights (w1:0,1,w1:0,2,...,wI:JI−1,JI).

Related Topics

MLP Algorithms
Architecture (multilayer perceptron algorithms)
Activation Functions (multilayer perceptron algorithms)
Error Functions (multilayer perceptron algorithms)
Expert Architecture Selection (multilayer perceptron algorithms)
Training (multilayer perceptron algorithms)
Alternated Simulated Annealing and Training (multilayer perceptron algorithms)
Error Backpropagation (multilayer perceptron algorithms)
Gradient Descent (multilayer perceptron algorithms)
Scaled Conjugate Gradient (multilayer perceptron algorithms)
Stopping Rules (multilayer perceptron algorithms)
Missing Values (multilayer perceptron algorithms)
Output Statistics (multilayer perceptron algorithms)
References (multilayer perceptron algorithms)


Architecture (multilayer perceptron algorithms)

multilayer perceptron algorithms,multilayer perceptron algorithms,multilayer perceptron algorithms
architecture,architecture,architecture
network architecture,network architecture,network architecture
multilayer perceptron algorithms,multilayer perceptron algorithms,multilayer perceptron algorithms

The general architecture for MLP networks is:

Input layer: J0=P units, a0:1,...,a0:J0; with a0:j=xj.

ith hidden layer: Ji units, ai:1,...,ai:Ji; with ai:k=γi(ci:k) and ci:k=Ji−1Σj=0wi:j,kai−1:j where ai−1:0=1.

Output layer: JI=R units, aI:1,...,aI:JI; with aI:k=γI(cI:k) and cI:k=J1Σj=0wI:j,kai−1:j where ai−1:0=1.

Note that the pattern index and the bias term of each layer are not counted in the total number of units for that layer.

Related Topics

MLP Algorithms
Notation (multilayer perceptron algorithms)
Activation Functions (multilayer perceptron algorithms)
Error Functions (multilayer perceptron algorithms)
Expert Architecture Selection (multilayer perceptron algorithms)
Training (multilayer perceptron algorithms)
Alternated Simulated Annealing and Training (multilayer perceptron algorithms)
Error Backpropagation (multilayer perceptron algorithms)
Gradient Descent (multilayer perceptron algorithms)
Scaled Conjugate Gradient (multilayer perceptron algorithms)
Stopping Rules (multilayer perceptron algorithms)
Missing Values (multilayer perceptron algorithms)
Output Statistics (multilayer perceptron algorithms)
References (multilayer perceptron algorithms)


Activation Functions (multilayer perceptron algorithms)

multilayer perceptron algorithms,multilayer perceptron algorithms,multilayer perceptron algorithms
activation functions,activation functions,activation functions
activation functions,activation functions,activation functions
multilayer perceptron algorithms,multilayer perceptron algorithms,multilayer perceptron algorithms
hyperbolic tangent activation function,hyperbolic tangent activation function,hyperbolic tangent activation function
multilayer perceptron algorithms,multilayer perceptron algorithms,multilayer perceptron algorithms
sigmoid activation function,sigmoid activation function,sigmoid activation function
multilayer perceptron algorithms,multilayer perceptron algorithms,multilayer perceptron algorithms
identity activation function,identity activation function,identity activation function
multilayer perceptron algorithms,multilayer perceptron algorithms,multilayer perceptron algorithms
softmax activation function,softmax activation function,softmax activation function
multilayer perceptron algorithms,multilayer perceptron algorithms,multilayer perceptron algorithms

Hyperbolic Tangent

γ(c)= tanh (c)=ec−e−cec+e−c

Sigmoid

γ(c)=11+exp(−c)

Identity

γ(c)=c

This is only available for output layer units.

Softmax

γ(ck)=exp(ck)
Σ
jΓh
exp(cj)

This is only available if all output layer units correspond to categorical variables and cross-entropy error is used.

Related Topics

MLP Algorithms
Notation (multilayer perceptron algorithms)
Architecture (multilayer perceptron algorithms)
Error Functions (multilayer perceptron algorithms)
Expert Architecture Selection (multilayer perceptron algorithms)
Training (multilayer perceptron algorithms)
Alternated Simulated Annealing and Training (multilayer perceptron algorithms)
Error Backpropagation (multilayer perceptron algorithms)
Gradient Descent (multilayer perceptron algorithms)
Scaled Conjugate Gradient (multilayer perceptron algorithms)
Stopping Rules (multilayer perceptron algorithms)
Missing Values (multilayer perceptron algorithms)
Output Statistics (multilayer perceptron algorithms)
References (multilayer perceptron algorithms)


Error Functions (multilayer perceptron algorithms)

multilayer perceptron algorithms,multilayer perceptron algorithms,multilayer perceptron algorithms
error functions,error functions,error functions
sum of squares error,sum of squares error,sum of squares error
multilayer perceptron algorithms,multilayer perceptron algorithms,multilayer perceptron algorithms
cross-entropy error,cross-entropy error,cross-entropy error
multilayer perceptron algorithms,multilayer perceptron algorithms,multilayer perceptron algorithms

Sum-of-Squares

ET(w)=MΣm=1Em(w)

where

Em(w)=12RΣr=1(y(m)r−amI:r)2

Cross-Entropy

ET(w)=MΣm=1Em(w)

where

Em(w)=−
Σ
rΓc
y(m)rlog(amI:ry(m)r)

This is only available if all output layer units correspond to categorical variables and the softmax activation function is used.

Related Topics

MLP Algorithms
Notation (multilayer perceptron algorithms)
Architecture (multilayer perceptron algorithms)
Activation Functions (multilayer perceptron algorithms)
Expert Architecture Selection (multilayer perceptron algorithms)
Training (multilayer perceptron algorithms)
Alternated Simulated Annealing and Training (multilayer perceptron algorithms)
Error Backpropagation (multilayer perceptron algorithms)
Gradient Descent (multilayer perceptron algorithms)
Scaled Conjugate Gradient (multilayer perceptron algorithms)
Stopping Rules (multilayer perceptron algorithms)
Missing Values (multilayer perceptron algorithms)
Output Statistics (multilayer perceptron algorithms)
References (multilayer perceptron algorithms)


Expert Architecture Selection (multilayer perceptron algorithms)

multilayer perceptron algorithms,multilayer perceptron algorithms,multilayer perceptron algorithms
expert architecture selection,expert architecture selection,expert architecture selection

Expert architecture selection determines the "best" number of hidden units in a single hidden layer. The hyperbolic tangent activation function is used for the hidden layer, and the identity function is used for the output layer (softmax if the output is categorical).

A random sample is taken from the entire data set and split into training (70%) and testing samples (30%). The size of random sample is N = min(1000, memsize), where memsize is the user-controlled maximum number of cases stored in memory. If entire dataset has less than N cases, use all of them. If training and testing data sets are supplied separately, the random samples for training and testing should be taken from the respective datasets.

Given Kmin and Kmax , the algorithm is as follows.

1. Start with an initial network of k hidden units. The default is k=min(g(R,P),20,h(R,P)), where

g(R,P)={
4.5+
√ P+R
R<5,P≥8
0.5+0.5(P+R) otherwise

where x denotes the largest integer less than or equal to x. h(R,P)=[M−RP+R+1] is the maximum number of hidden units that will not result in more weights than there are cases in the entire training set.

If k < Kmin, set k = Kmin. Else if k > Kmax, set k = Kmax. Train this network once via the alternated simulated annealing and training procedure (steps 1 to 5).

2. If k > Kmin, set DOWN=TRUE. Else if training error ratio > 0.01, DOWN=FALSE. Else stop and report the initial network.

3. If DOWN=TRUE, remove the weakest hidden unit (see below); k=k−1. Else add a hidden unit; k=k+1.

4. Using the previously fit weights as initial weights for the old weights and random weights for the new weights, train the old and new weights for the network once through the alternated simulated annealing and training procedure (steps 3 to 5) until the stopping conditions are met.

5. If the error on test data has dropped:

If DOWN=FALSE, If k< Kmax and the training error has dropped but the error ratio is still above 0.01, return to step 3. Else if k> Kmin, return to step 3. Else, stop and report the network with the minimum test error.

Else if DOWN=TRUE, If |k−k0|>1, stop and report the network with the minimum test error. Else if training error ratio for k=k0 is bigger than 0.01, set DOWN=FALSE, k=k0 return to step 3. Else stop and report the initial network.

Else stop and report the network with the minimum test error.

If more than one network attains the minimum test error, choose the one with fewest hidden units.

If the resulting network from this procedure has training error ratio (training error divided by error from the model using average of an output variable to predict that variable) bigger than 0.1, repeat the architecture selection with different initial weights until either the error ratio is <=0.1 or the procedure is repeated 5 times, then pick the one with smallest test error.

Using this network with its weights as initial values, retrain the network on the entire training set.

The weakest hidden unit

For each hidden unit j, calculate the error on the test data when j is removed from the network. The weakest hidden unit is the one having the smallest total test error upon its removal.

Related Topics

MLP Algorithms
Notation (multilayer perceptron algorithms)
Architecture (multilayer perceptron algorithms)
Activation Functions (multilayer perceptron algorithms)
Error Functions (multilayer perceptron algorithms)
Training (multilayer perceptron algorithms)
Alternated Simulated Annealing and Training (multilayer perceptron algorithms)
Error Backpropagation (multilayer perceptron algorithms)
Gradient Descent (multilayer perceptron algorithms)
Scaled Conjugate Gradient (multilayer perceptron algorithms)
Stopping Rules (multilayer perceptron algorithms)
Missing Values (multilayer perceptron algorithms)
Output Statistics (multilayer perceptron algorithms)
References (multilayer perceptron algorithms)


Training (multilayer perceptron algorithms)

multilayer perceptron algorithms,multilayer perceptron algorithms,multilayer perceptron algorithms
training,training,training

Given the training type (online, batch, or mini-batch), the problem of estimating the weights consists of the following parts:

Initializing the weights. Take a random sample (as described in Expert Architecture Selection (multilayer perceptron algorithms)) and apply the alternated simulated annealing and training procedure on the random sample to derive the initial weights. Training in step 3 is performed using all default training parameters.

Computing the derivative of the error function with respect to the weights. This is solved via the error backpropagation algorithm.

Updating the estimated weights. This is solved by the gradient descent or scaled conjugate gradient method.

Related Topics

MLP Algorithms
Notation (multilayer perceptron algorithms)
Architecture (multilayer perceptron algorithms)
Activation Functions (multilayer perceptron algorithms)
Error Functions (multilayer perceptron algorithms)
Expert Architecture Selection (multilayer perceptron algorithms)
Alternated Simulated Annealing and Training (multilayer perceptron algorithms)
Error Backpropagation (multilayer perceptron algorithms)
Gradient Descent (multilayer perceptron algorithms)
Scaled Conjugate Gradient (multilayer perceptron algorithms)
Stopping Rules (multilayer perceptron algorithms)
Missing Values (multilayer perceptron algorithms)
Output Statistics (multilayer perceptron algorithms)
References (multilayer perceptron algorithms)


Alternated Simulated Annealing and Training (multilayer perceptron algorithms)

The following procedure uses simulated annealing and training alternately up to K1 times. Simulated annealing is used to break out of the local minimum that training finds by perturbing the local minimum K2 times. If break out is successful, simulated annealing sets a better initial weight for the next training. We hope to find the global minimum by repeating this procedure K3 times. This procedure is rather expensive for large data sets, so it is only used on a random sample to search for initial weights and in architecture selection. Let K1=K2=4, K3=3.

1. Randomly generate K2 weight vectors between [a0−a, a0+a]. This is a user controllable interval with default a0=0 and a=0.5. Calculate the training error for each weight vector. Pick the weights that give the minimum training error as the initial weights.

2. Set k1=0.

3. Train the network with the specified initial weights. Call the trained weights w.

4. If the training error ratio <= 0.05, stop the k1 loop and use w as the result of the loop. Else set k1 = k1+1.

5. If k1 < K1, perturb the old weight to form K2 new weights w´=w+wn by adding K2 different random noise wn between [a(k1), a(k1)] where a(k1)=(0.5)k1a. Let wmin be the weights that give the minimum training error among all the perturbed weights. If ET(wmin)<ET(w), set the initial weights to be wmin, return to step 3. Else stop and report w as the final result.

Else stop the k1 loop and use w as the result of the loop.

If the resulting weights have training error ratio bigger than 0.1, repeat this algorithm until either the training error ratio is <=0.1 or the procedure is repeated K3 times, then pick the one with smallest test error among the result of the k1 loops.

Related Topics

MLP Algorithms
Notation (multilayer perceptron algorithms)
Architecture (multilayer perceptron algorithms)
Activation Functions (multilayer perceptron algorithms)
Error Functions (multilayer perceptron algorithms)
Expert Architecture Selection (multilayer perceptron algorithms)
Training (multilayer perceptron algorithms)
Error Backpropagation (multilayer perceptron algorithms)
Gradient Descent (multilayer perceptron algorithms)
Scaled Conjugate Gradient (multilayer perceptron algorithms)
Stopping Rules (multilayer perceptron algorithms)
Missing Values (multilayer perceptron algorithms)
Output Statistics (multilayer perceptron algorithms)
References (multilayer perceptron algorithms)


Error Backpropagation (multilayer perceptron algorithms)

error backpropagation,error backpropagation,error backpropagation
multilayer perceptron algorithms,multilayer perceptron algorithms,multilayer perceptron algorithms

Error-backpropagation is used to compute the first partial derivatives of the error function with respect to the weights.

First note that γ´(c)={
1−[γ(c)]2 | tanh
γ(c)(1−γ(c)) | sigmoid
1 | identity

The backpropagation algorithm follows:

For each i,j,k, set ∂ET∂wi:k,j=0.

For each m in group T; For each p=1,...,JI, let

δmI:p=∂Em∂cmI:p={
amI:p−y(m)p | if cross-entropy error is used
γ´I(cmI:p)(amI:p−y(m)p) | otherwise

For each i=I,...,1 (start from the output layer); For each j=1,...,Ji; For each k=0,...,Ji−1

Let ∂Em∂wi:k,j=δmi:jami−1:k, where δmi:j=∂Em∂cmi:j

Set ∂ET∂wi:k,j=∂ET∂wi:k,j+∂Em∂wi:k,j

If k > 0 and i > 1, set δmi−1:k=γ´i−1(cmi−1:k)JiΣj=1δmi:jwi:k,j

This gives us a vector of I−1Σi=0(Ji+1)Ji+1 elements that form the gradient of ET(wk).

Related Topics

MLP Algorithms
Notation (multilayer perceptron algorithms)
Architecture (multilayer perceptron algorithms)
Activation Functions (multilayer perceptron algorithms)
Error Functions (multilayer perceptron algorithms)
Expert Architecture Selection (multilayer perceptron algorithms)
Training (multilayer perceptron algorithms)
Alternated Simulated Annealing and Training (multilayer perceptron algorithms)
Gradient Descent (multilayer perceptron algorithms)
Scaled Conjugate Gradient (multilayer perceptron algorithms)
Stopping Rules (multilayer perceptron algorithms)
Missing Values (multilayer perceptron algorithms)
Output Statistics (multilayer perceptron algorithms)
References (multilayer perceptron algorithms)


Gradient Descent (multilayer perceptron algorithms)

gradient descent,gradient descent,gradient descent
multilayer perceptron algorithms,multilayer perceptron algorithms,multilayer perceptron algorithms

Online or Mini-Batch

Given the learning rate parameters η0 and ηlow, momentum rate α, and learning rate decay factor β, the gradient descent method for online and mini-batch training is as follows.

1. Let k=0. Initialize the weight vector to w0, learning rate to η0. Let Δw0=0.

2. Read records in Tk (Tk is randomly chosen) and find ETk(wk) and its gradient gk=ETk(wk).

3. If ηk|gk|≤α|Δwk|, α=0.9ηk|gk||Δwk|. This step is to make sure that the steepest gradient descent direction dominates weight change in next step. Without this step, the weight change in next step could be along the opposite direction of the steepest descent and hence no matter how small ηk is, the error will not decrease.

4. Let v=wk−ηkgk+αΔwk.

5. If ETk(v)<ETk(wk), then set wk+1=v and Δwk+1=wk+1−wk, Else wk+1=wk,Δwk+1=Δwk.

6. ηk+1=e−βηk. If ηk+1<ηlow, then set ηk+1=ηlow.

7. If a stopping rule is met, exit and report the network as stated in the stopping criteria. Else let k=k+1 and return to step 2.

Batch

Given the learning rate parameter η0 and momentum rate α, the gradient descent method for batch training is as follows.

1. Let k=0. Initialize the weight vector to w0, learning rate to η0. Let Δw0=0.

2. Read all data and find ET(wk) and its gradient gk=ET(wk). If |gk|<10−6, stop and report the current network.

3. If ηk|gk|≤α|Δwk|, α=0.9ηk|gk||Δwk|. This step is to make sure that the steepest gradient descent direction dominates weight change in next step. Without this step, the weight change in next step could be along the opposite direction of the steepest descent and hence no matter how small ηk is, the error will not decrease.

4. Let v=wk−ηkgk+αΔwk

5. If ET(v)<ET(wk), then set wk+1=v, Δwk+1=wk+1−wk, and ηk+1=ηk, Else ηk=.5ηk and return to step 3.

6. If a stopping rule is met, exit and report the network as stated in the stopping criteria. Else let k=k+1 and return to step 2.

Related Topics

MLP Algorithms
Notation (multilayer perceptron algorithms)
Architecture (multilayer perceptron algorithms)
Activation Functions (multilayer perceptron algorithms)
Error Functions (multilayer perceptron algorithms)
Expert Architecture Selection (multilayer perceptron algorithms)
Training (multilayer perceptron algorithms)
Alternated Simulated Annealing and Training (multilayer perceptron algorithms)
Error Backpropagation (multilayer perceptron algorithms)
Scaled Conjugate Gradient (multilayer perceptron algorithms)
Stopping Rules (multilayer perceptron algorithms)
Missing Values (multilayer perceptron algorithms)
Output Statistics (multilayer perceptron algorithms)
References (multilayer perceptron algorithms)


Scaled Conjugate Gradient (multilayer perceptron algorithms)

scaled conjugate gradient,scaled conjugate gradient,scaled conjugate gradient
multilayer perceptron algorithms,multilayer perceptron algorithms,multilayer perceptron algorithms

This method is only available to batch training. To begin, initialize the weight vector to w0, and let N be the total number of weights.

1. k=0. Choose scalars 0<λ0<10−6,0<σ<10−4,λ0=0. Set r0=p0=−ET(w0), and success=true.

2. If success=true, find the second-order information: σk=σ|pk|, sk=ET(wk+σkpk)−ET(wk)σk, δk=ptksk, where the superscript t denotes the transpose.

3. Set δk=δk+(λk−λk)|pk|2.

4. If δk≤0, make the Hessian positive definite: λk=2(λk−δk|pk|2), δk=−δk+λk|pk|2, λk=λk.

5. Calculate the step size: μk=ptkrk, αk=μkδk.

6. Calculate the comparison parameter: Δk=2δk[ET(wk)−ET(wk+αkpk)]μk.

7. If Δk≥0, error can be reduced. Set wk+1=wk+αkpk, rk+1=−ET(wk+1), If |rk+1|<10−6, return wk+1 as the final weight vector and exit. Set λk=0, success=true. If k mod N=0, restart the algorithm: pk+1=rk+1, else set βk=|rk+1|2−rtk+1rkμk, pk+1=rk+1+βkpk. If Δk≥.75, reduce the scale parameter: λk=14λk. else (if Δk<0): Set λk=λk, success=false.

8. If Δk<.25, increase the scale parameter: λk=λk+δk(1−Δk)|pk|2.

9. If success=false, return to step 2. Otherwise if a stopping rule is met, exit and report the network as stated in the stopping criteria. Else set k=k+1 , λk+1=λk, λk+1=λk and return to step 2.

Note: each iteration of batch training requires at least two data passes.

Related Topics

MLP Algorithms
Notation (multilayer perceptron algorithms)
Architecture (multilayer perceptron algorithms)
Activation Functions (multilayer perceptron algorithms)
Error Functions (multilayer perceptron algorithms)
Expert Architecture Selection (multilayer perceptron algorithms)
Training (multilayer perceptron algorithms)
Alternated Simulated Annealing and Training (multilayer perceptron algorithms)
Error Backpropagation (multilayer perceptron algorithms)
Gradient Descent (multilayer perceptron algorithms)
Stopping Rules (multilayer perceptron algorithms)
Missing Values (multilayer perceptron algorithms)
Output Statistics (multilayer perceptron algorithms)
References (multilayer perceptron algorithms)


Stopping Rules (multilayer perceptron algorithms)

stopping rules,stopping rules,stopping rules
multilayer perceptron algorithms,multilayer perceptron algorithms,multilayer perceptron algorithms

Training proceeds through at least one complete pass of the data. Then the search should be stopped according to following criteria. These stopping criteria should be checked in the listed order. For batch training, check of any stopping criteria is performed after completion of an iteration. For online or mini-batch training, check of any of stopping criterion 1, 3, 4, and 5 is performed after completion of a data pass, only check of criterion 2 is performed after an iteration. Let step mean a data pass for online and mini-batch methods, an iteration for batch method. Let E1 denote the current minimum error and K1 denote the step where it occurs for training data, E2 and K2 are that for testing data, and K3=min(K1,K2).

1. If there is no testing dataset and the training method is online or mini-batch, compute the total error for training data at the end of each step. From step K1, if the training error does not decrease below E1 over the next n steps, stop. Report the weights at step K1. If there is a testing dataset, users have the following options:

Check testing data only: at the end of each step compute the total error for testing data. From step K2, if the testing error does not decrease below E2 over the next n steps, stop. Report the weights at step K2.

Check both training and testing data: at the end of each step simultaneously check the total error for training and testing data. From step K1 for training and step K2 for testing, if either training or testing error does not decrease below its current minimum over the next n steps, stop. Report the weights at step K3. Notice that for batch method there is no need to check the total error for training data because a decrease in total error for training data is guaranteed by the algorithm.

2. The search has lasted beyond some maximum allotted time. For batch training, report the weights at step K3. For on-line or mini-batch training, even though training stops before the completion of current step, treat this as a complete step. Calculate current errors for training and testing datasets and update E1, K1, E2, K2 correspondingly. Report the weights at step K3.

3. The search has lasted more than some maximum number of data passes. Report the weights at step K3.

4. When current training error is the minimum (E1=ET(wk), always true for batch), stop if the relative change in training error is small: |ET(wk)−ET(wk−1)|12(ET(wk)+ET(wk−1)+δ)<ε1 for δ=10−10 and ε1, where wk−1,wk are the weight vectors of two consecutive steps. Report weights at step K3.

5. The current training error ratio is small compared with the initial error: |ET(wk)ET+δ|<ε2 for δ=10−10 and ε2, where ET is the total error from the model using the average of an output variable to predict that variable; ET is calculated by using amI:r=1MMΣm=1y(m)r in the error function, where wk is the weight vector of one step. Report weights at step K3.

Note: In criteria 4 and 5, the total error for whole training data is needed. For batch training, the error is always calculated, but for online or mini-batch training, error is not available without passing the training data one more time. So for online and mini-batch training, criterion 4 and 5 will not be checked if user decides to use testing data only in criterion 1.

Related Topics

MLP Algorithms
Notation (multilayer perceptron algorithms)
Architecture (multilayer perceptron algorithms)
Activation Functions (multilayer perceptron algorithms)
Error Functions (multilayer perceptron algorithms)
Expert Architecture Selection (multilayer perceptron algorithms)
Training (multilayer perceptron algorithms)
Alternated Simulated Annealing and Training (multilayer perceptron algorithms)
Error Backpropagation (multilayer perceptron algorithms)
Gradient Descent (multilayer perceptron algorithms)
Scaled Conjugate Gradient (multilayer perceptron algorithms)
Missing Values (multilayer perceptron algorithms)
Output Statistics (multilayer perceptron algorithms)
References (multilayer perceptron algorithms)


Missing Values (multilayer perceptron algorithms)

multilayer perceptron algorithms,multilayer perceptron algorithms,multilayer perceptron algorithms
missing values,missing values,missing values

Missing values are not allowed.

Related Topics

MLP Algorithms
Notation (multilayer perceptron algorithms)
Architecture (multilayer perceptron algorithms)
Activation Functions (multilayer perceptron algorithms)
Error Functions (multilayer perceptron algorithms)
Expert Architecture Selection (multilayer perceptron algorithms)
Training (multilayer perceptron algorithms)
Alternated Simulated Annealing and Training (multilayer perceptron algorithms)
Error Backpropagation (multilayer perceptron algorithms)
Gradient Descent (multilayer perceptron algorithms)
Scaled Conjugate Gradient (multilayer perceptron algorithms)
Stopping Rules (multilayer perceptron algorithms)
Output Statistics (multilayer perceptron algorithms)
References (multilayer perceptron algorithms)


Output Statistics (multilayer perceptron algorithms)

multilayer perceptron algorithms,multilayer perceptron algorithms,multilayer perceptron algorithms
output statistics,output statistics,output statistics
sensitivity analysis,sensitivity analysis,sensitivity analysis
multilayer perceptron algorithms,multilayer perceptron algorithms,multilayer perceptron algorithms

The following output statistics are available. Note that, for scale variables, output statistics are reported in terms of the rescaled values of the variables.

Sum-of-Squares or Cross Entropy Error

As described in Error Functions (multilayer perceptron algorithms). The cross entropy error is displayed if the output layer activation function is softmax, otherwise the sum-of-squares error is shown.

Relative Error

For each scale target r:

MΣm=1(y(m)r−
^
y
(m)r)2MΣm=1(y(m)r−yr)2

For each categorical target r, report pr, the percent of incorrect predictions

Average Overall Relative Error

If there is at least one scale target:

MΣm=1RΣr=1(y(m)r−
^
y
(m)r)2MΣm=1RΣr=1(y(m)r−yr)2

where yr is the mean of y(m)r over patterns.

If all targets are categorical, report the average percent of incorrect predictions:

1CCΣr=1pr

where C is the number of categorical variables.

Sensitivity Analysis

For each predictor p and each input pattern m, compute:

dpm=maxxp1,xp2Sp||
^
Y
(m)p1−
^
Y
(m)p2||

where
^
Y
(m)pk is the predicted output vector (standardized if standardization of output variable is used in training) using (x(m)1,...,x(m)p−1,xpk,x(m)p+1,...,x(m)P) as its input, and Sp= {xminp,x(2)p,x(3)p,x(4)p,xmaxp} for scale predictors and {(1,0,...,0),(0,1,0,...,0),...,(0,0,...,1)} for categorical predictors.

Then compute:

dp=1MMΣm=1dpm

and normalize the dps to sum to 1, and report these normalized values as the sensitivity values for the predictors. This is the average maximum amount we can expect the output to change based on changes in the pth predictor. The greater the sensitivity, the more we expect the output to change when the predictor changes.

Related Topics

MLP Algorithms
Notation (multilayer perceptron algorithms)
Architecture (multilayer perceptron algorithms)
Activation Functions (multilayer perceptron algorithms)
Error Functions (multilayer perceptron algorithms)
Expert Architecture Selection (multilayer perceptron algorithms)
Training (multilayer perceptron algorithms)
Alternated Simulated Annealing and Training (multilayer perceptron algorithms)
Error Backpropagation (multilayer perceptron algorithms)
Gradient Descent (multilayer perceptron algorithms)
Scaled Conjugate Gradient (multilayer perceptron algorithms)
Stopping Rules (multilayer perceptron algorithms)
Missing Values (multilayer perceptron algorithms)
References (multilayer perceptron algorithms)


References (multilayer perceptron algorithms)

multilayer perceptron algorithms,multilayer perceptron algorithms,multilayer perceptron algorithms
references,references,references

Bishop, C. M. 1995. Neural Networks for Pattern Recognition, 3rd ed. Oxford: Oxford University Press.

Fine, T. L. 1999. Feedforward Neural Network Methodology, 3rd ed. New York: Springer-Verlag.

Haykin, S. 1998. Neural Networks: A Comprehensive Foundation, 2nd ed. New York: Macmillan College Publishing.

Ripley, B. D. 1996. Pattern Recognition and Neural Networks. Cambridge: Cambridge University Press.

Related Topics

MLP Algorithms
Notation (multilayer perceptron algorithms)
Architecture (multilayer perceptron algorithms)
Activation Functions (multilayer perceptron algorithms)
Error Functions (multilayer perceptron algorithms)
Expert Architecture Selection (multilayer perceptron algorithms)
Training (multilayer perceptron algorithms)
Alternated Simulated Annealing and Training (multilayer perceptron algorithms)
Error Backpropagation (multilayer perceptron algorithms)
Gradient Descent (multilayer perceptron algorithms)
Scaled Conjugate Gradient (multilayer perceptron algorithms)
Stopping Rules (multilayer perceptron algorithms)
Missing Values (multilayer perceptron algorithms)
Output Statistics (multilayer perceptron algorithms)


MULTIPLE CORRESPONDENCE Algorithms

MULTIPLE CORRESPONDENCE (command),MULTIPLE CORRESPONDENCE (command),MULTIPLE CORRESPONDENCE (command)
algorithms,algorithms,algorithms
Multiple Correspondence Analysis,Multiple Correspondence Analysis,Multiple Correspondence Analysis
algorithms,algorithms,algorithms
MULTIPLE CORRESPONDENCE algorithms,MULTIPLE CORRESPONDENCE algorithms,MULTIPLE CORRESPONDENCE algorithms

Multiple Correspondence Analysis, also known as homogeneity analysis, quantifies nominal (categorical) data by assigning numerical values to the cases (objects) and categories, such that in the low-dimensional representation of the data, objects within the same category are close together and objects in different categories are far apart. Each object is as close as possible to the category points of categories that apply to the object. In this way, the categories divide the objects into homogeneous subgroups. Variables are considered homogeneous when they classify objects that are in the same categories into the same subgroups.

Related Topics

Notation (MULTIPLE CORRESPONDENCE algorithms)
Discretization (MULTIPLE CORRESPONDENCE algorithms)
Imputation of Missing Values (MULTIPLE CORRESPONDENCE algorithms)
Configuration (MULTIPLE CORRESPONDENCE algorithms)
Objective Function Optimization (MULTIPLE CORRESPONDENCE algorithms)
Supplementary Objects (MULTIPLE CORRESPONDENCE algorithms)
Supplementary Variables (MULTIPLE CORRESPONDENCE algorithms)
Diagnostics (MULTIPLE CORRESPONDENCE algorithms)
References (MULTIPLE CORRESPONDENCE algorithms)


Notation (MULTIPLE CORRESPONDENCE algorithms)

MULTIPLE CORRESPONDENCE algorithms,MULTIPLE CORRESPONDENCE algorithms,MULTIPLE CORRESPONDENCE algorithms
notation,notation,notation

The following notation is used throughout this chapter unless otherwise stated:

n | Number of analysis cases (objects)
nw | Weighted number of analysis cases: nΣi=1wi
ntot | Total number of cases (analysis + supplementary)
wi | Weight of object i; wi=1 if cases are unweighted; wi=0 if object i is supplementary.
W | Diagonal ntot×ntot matrix, with wi on the diagonal.
m | Number of analysis variables
mw | Weighted number of analysis variables (mw=mΣj=1vj)
mtot | Total number of variables (analysis + supplementary)
H | The data matrix (category indicators), of order ntot×mtot, after discretization, imputation of missings , and listwise deletion, if applicable.
p | Number of dimensions

For variable j; j=1, ..., mtot

vj | Variable weight; vj=1 if weight for variable j is not specified or if variable j is supplementary
kj | Number of categories of variable j (number of distinct values in hj, thus, including supplementary objects)
Gj | Indicator matrix for variable j, of order ntot×kj

The elements of Gj are defined as i=1, ..., ntot; r=1, ..., kj

g(j)ir={
1 | when the i th object is in the r th category of variable j
0 | when the i th object is not in the r th category of variable j

Dj | Diagonal kj×kj matrix, containing the weighted univariate marginals; i.e., the weighted column sums of Gj (Dj=G´jWGj)
Mj | Diagonal ntot×ntot matrix, with diagonal elements defined as

m(j)ii={
0 | when the i th observation is missing and missing strategy variable j is passive
0
when the i th object is in r th category of variable j and r th category is only
used by supplementary objects ( i.e. when d(j)rr=0)
vj | otherwise

M*

ΣjMj

The quantification matrices and parameter vectors are:

X | Object scores, of order ntot×p
Xw | Weighted object scores (Xw=WX)
X n | X normalized according to requested normalization option
Yj | Category quantifications, of order kj×p.

Note: The matrices W, Gj, Mj, M*, and Dj are exclusively notational devices; they are stored in reduced form, and the program fully profits from their sparseness by replacing matrix multiplications with selective accumulation.

Related Topics

MULTIPLE CORRESPONDENCE Algorithms
Discretization (MULTIPLE CORRESPONDENCE algorithms)
Imputation of Missing Values (MULTIPLE CORRESPONDENCE algorithms)
Configuration (MULTIPLE CORRESPONDENCE algorithms)
Objective Function Optimization (MULTIPLE CORRESPONDENCE algorithms)
Supplementary Objects (MULTIPLE CORRESPONDENCE algorithms)
Supplementary Variables (MULTIPLE CORRESPONDENCE algorithms)
Diagnostics (MULTIPLE CORRESPONDENCE algorithms)
References (MULTIPLE CORRESPONDENCE algorithms)


Discretization (MULTIPLE CORRESPONDENCE algorithms)

MULTIPLE CORRESPONDENCE algorithms,MULTIPLE CORRESPONDENCE algorithms,MULTIPLE CORRESPONDENCE algorithms
discretization,discretization,discretization

Discretization is done on the unweighted data.

Multiplying

First, the original variable is standardized. Then the standardized values are multiplied by 10 and rounded, and a value is added such that the lowest value is 1.

Ranking

The original variable is ranked in ascending order, according to the alphanumerical value.

Grouping into a specified number of categories with a normal distribution

First, the original variable is standardized. Then cases are assigned to categories using intervals as defined in Max (1960).

Grouping into a specified number of categories with a uniform distribution

First the target frequency is computed as divided by the number of specified categories, rounded. Then the original categories are assigned to grouped categories such that the frequencies of the grouped categories are as close to the target frequency as possible.

Grouping equal intervals of specified size

First the intervals are defined as lowest value + interval size, lowest value + 2*interval size, etc. Then cases with values in the kth interval are assigned to category k.

Related Topics

MULTIPLE CORRESPONDENCE Algorithms
Notation (MULTIPLE CORRESPONDENCE algorithms)
Imputation of Missing Values (MULTIPLE CORRESPONDENCE algorithms)
Configuration (MULTIPLE CORRESPONDENCE algorithms)
Objective Function Optimization (MULTIPLE CORRESPONDENCE algorithms)
Supplementary Objects (MULTIPLE CORRESPONDENCE algorithms)
Supplementary Variables (MULTIPLE CORRESPONDENCE algorithms)
Diagnostics (MULTIPLE CORRESPONDENCE algorithms)
References (MULTIPLE CORRESPONDENCE algorithms)


Imputation of Missing Values (MULTIPLE CORRESPONDENCE algorithms)

MULTIPLE CORRESPONDENCE algorithms,MULTIPLE CORRESPONDENCE algorithms,MULTIPLE CORRESPONDENCE algorithms
missing values,missing values,missing values

When there are variables with missing values specified to be treated as active (impute mode or extra category), then first the kj’s for these variables are computed before listwise deletion. Next the category indicator with the highest weighted frequency (mode; the smallest if multiple modes exist), or kj+1 (extra category) is imputed. Then listwise deletion is applied if applicable. And then the kj’s are adjusted.

Related Topics

MULTIPLE CORRESPONDENCE Algorithms
Notation (MULTIPLE CORRESPONDENCE algorithms)
Discretization (MULTIPLE CORRESPONDENCE algorithms)
Configuration (MULTIPLE CORRESPONDENCE algorithms)
Objective Function Optimization (MULTIPLE CORRESPONDENCE algorithms)
Supplementary Objects (MULTIPLE CORRESPONDENCE algorithms)
Supplementary Variables (MULTIPLE CORRESPONDENCE algorithms)
Diagnostics (MULTIPLE CORRESPONDENCE algorithms)
References (MULTIPLE CORRESPONDENCE algorithms)


Configuration (MULTIPLE CORRESPONDENCE algorithms)

MULTIPLE CORRESPONDENCE algorithms,MULTIPLE CORRESPONDENCE algorithms,MULTIPLE CORRESPONDENCE algorithms
configuration,configuration,configuration

MULTIPLE CORRESPONDENCE can read a configuration from a file, to be used as the initial configuration or as a fixed configuration in which to fit variables.

For an initial configuration see step 1 in the Optimization section.

A fixed configuration X is centered and orthonormalized as described in the optimization section in step 3 (with X instead of Z) and step 4 (except for the factor n1/2w), and the result is postmultiplied with Λ1/2 (this leaves the configuration unchanged if it is already centered and orthogonal). The analysis variables are set to supplementary and variable weights are set to one. Then MULTIPLE CORRESPONDENCE proceeds as described in the Supplementary Variables section.

Related Topics

MULTIPLE CORRESPONDENCE Algorithms
Notation (MULTIPLE CORRESPONDENCE algorithms)
Discretization (MULTIPLE CORRESPONDENCE algorithms)
Imputation of Missing Values (MULTIPLE CORRESPONDENCE algorithms)
Objective Function Optimization (MULTIPLE CORRESPONDENCE algorithms)
Supplementary Objects (MULTIPLE CORRESPONDENCE algorithms)
Supplementary Variables (MULTIPLE CORRESPONDENCE algorithms)
Diagnostics (MULTIPLE CORRESPONDENCE algorithms)
References (MULTIPLE CORRESPONDENCE algorithms)


Objective Function Optimization (MULTIPLE CORRESPONDENCE algorithms)

MULTIPLE CORRESPONDENCE algorithms,MULTIPLE CORRESPONDENCE algorithms,MULTIPLE CORRESPONDENCE algorithms
objective function,objective function,objective function

The MULTIPLE CORRESPONDENCE objective is to find object scores X and a set of Yj (for j=1,...,m) — the underlining indicates that they may be restricted in various ways — so that the function

σ(X;Y)=(nwp)−1
Σ
j
tr ((X−GjYj)´MjW(X−GjYj))

is minimal, under the normalization restriction X´M*WX=nwmwI (I is the p×p identity matrix). The inclusion of Mj in σ(X;Y) ensures that there is no influence of passive missing values (missing values in variables that have missing option passive, or missing option not specified). M* contains the number of active data values for each object. The object scores are also centered; that is, they satisfy u´M*WX=0 with u denoting an n-vector with ones.

Optimization is achieved by executing the following iteration scheme:

1. Initialization

2. Update category quantifications

3. Update object scores

4. Orthonormalization

5. Convergence test: repeat (2) through (4) or continue

6. Rotation

These steps are explained below.

Initialization

If an initial configuration is not specified, the object scores X are initialized with random numbers. Then X is orthonormalized (see step 4) so that u´M*WX=0 and X´M*WX=nwmwI, yielding X+w.

Update Category Quantifications; Loop Across Analysis Variables

With fixed current values X+w the unconstrained update of Yj is

˜
Y
j=D−1jG´jX+w

Update Object Scores

First the auxiliary score matrix Z is computed as

Z←ΣjMjGjY+j

and centered with respect to W and M*:

X*=(I−M*uu´W/(u´M*Wu))Z

These two steps yield locally the best updates when there would be no orthogonality constraints.

Orthonormalization

To find an M*-orthonormal X+ that is closest to X* in the least squares sense, we use for the Procrustes rotation (Cliff, 1966) the singular value decomposition m1/2wM−1/2*W1/2X*=KΛ1/2L´, then yields n1/2wm1/2wM−1/2*W1/2KL´-orthonormal weighted object scores: X+w←n1/2wmwM−1*WX*LΛ−1/2L´, and X+=W−1X+w. The calculation of L and Λ is based on tridiagonalization with Householder transformations followed by the implicit QL algorithm (Wilkinson, 1965).

Convergence Test

The difference between consecutive values of the quantity

TFIT = (pnw)−1
Σ
j
vj tr (Y´jDjYj)

is compared with the user-specified convergence criterion ε - a small positive number. It can be shown that TFIT = mw−σ(X;Y). Steps (2) through (4) are repeated as long as the loss difference exceeds ε.

After convergence TFIT is also equal to tr (Λ1/2), with Λ as computed in step (4) during the last iteration. (See also Model Summary, and Correlations Transformed Variables for interpretation of Λ1/2).

Rotation

To achieve principal axes orientation, X+ is rotated with the matrix L. Then step (2) is executed, yielding the rotated quantifications.

Related Topics

MULTIPLE CORRESPONDENCE Algorithms
Notation (MULTIPLE CORRESPONDENCE algorithms)
Discretization (MULTIPLE CORRESPONDENCE algorithms)
Imputation of Missing Values (MULTIPLE CORRESPONDENCE algorithms)
Configuration (MULTIPLE CORRESPONDENCE algorithms)
Supplementary Objects (MULTIPLE CORRESPONDENCE algorithms)
Supplementary Variables (MULTIPLE CORRESPONDENCE algorithms)
Diagnostics (MULTIPLE CORRESPONDENCE algorithms)
References (MULTIPLE CORRESPONDENCE algorithms)


Supplementary Objects (MULTIPLE CORRESPONDENCE algorithms)

MULTIPLE CORRESPONDENCE algorithms,MULTIPLE CORRESPONDENCE algorithms,MULTIPLE CORRESPONDENCE algorithms
supplementary objects,supplementary objects,supplementary objects

To compute the object scores for supplementary objects, after convergence steps (2) and (3) are repeated, with the zero's in W temporarily set to ones in computing Z and X+. If a supplementary object has missing values, passive treatment is applied.

Related Topics

MULTIPLE CORRESPONDENCE Algorithms
Notation (MULTIPLE CORRESPONDENCE algorithms)
Discretization (MULTIPLE CORRESPONDENCE algorithms)
Imputation of Missing Values (MULTIPLE CORRESPONDENCE algorithms)
Configuration (MULTIPLE CORRESPONDENCE algorithms)
Objective Function Optimization (MULTIPLE CORRESPONDENCE algorithms)
Supplementary Variables (MULTIPLE CORRESPONDENCE algorithms)
Diagnostics (MULTIPLE CORRESPONDENCE algorithms)
References (MULTIPLE CORRESPONDENCE algorithms)


Supplementary Variables (MULTIPLE CORRESPONDENCE algorithms)

MULTIPLE CORRESPONDENCE algorithms,MULTIPLE CORRESPONDENCE algorithms,MULTIPLE CORRESPONDENCE algorithms
supplementary variables,supplementary variables,supplementary variables

The quantifications for supplementary variables are computed after convergence by executing step (2) once.

Related Topics

MULTIPLE CORRESPONDENCE Algorithms
Notation (MULTIPLE CORRESPONDENCE algorithms)
Discretization (MULTIPLE CORRESPONDENCE algorithms)
Imputation of Missing Values (MULTIPLE CORRESPONDENCE algorithms)
Configuration (MULTIPLE CORRESPONDENCE algorithms)
Objective Function Optimization (MULTIPLE CORRESPONDENCE algorithms)
Supplementary Objects (MULTIPLE CORRESPONDENCE algorithms)
Diagnostics (MULTIPLE CORRESPONDENCE algorithms)
References (MULTIPLE CORRESPONDENCE algorithms)


Diagnostics (MULTIPLE CORRESPONDENCE algorithms)

MULTIPLE CORRESPONDENCE algorithms,MULTIPLE CORRESPONDENCE algorithms,MULTIPLE CORRESPONDENCE algorithms
diagnostics,diagnostics,diagnostics

The following diagnostics are available.

Related Topics

MULTIPLE CORRESPONDENCE Algorithms
Notation (MULTIPLE CORRESPONDENCE algorithms)
Discretization (MULTIPLE CORRESPONDENCE algorithms)
Imputation of Missing Values (MULTIPLE CORRESPONDENCE algorithms)
Configuration (MULTIPLE CORRESPONDENCE algorithms)
Objective Function Optimization (MULTIPLE CORRESPONDENCE algorithms)
Supplementary Objects (MULTIPLE CORRESPONDENCE algorithms)
Supplementary Variables (MULTIPLE CORRESPONDENCE algorithms)
References (MULTIPLE CORRESPONDENCE algorithms)
Maximum Rank (may be issued as a warning when exceeded) (MULTIPLE CORRESPONDENCE algorithms)
Descriptives (MULTIPLE CORRESPONDENCE algorithms)
Fit and Loss Measures (MULTIPLE CORRESPONDENCE algorithms)
Model Summary (MULTIPLE CORRESPONDENCE algorithms)
Cronbach's Alpha (MULTIPLE CORRESPONDENCE algorithms)
Variance Accounted For (MULTIPLE CORRESPONDENCE algorithms)
Inertia (MULTIPLE CORRESPONDENCE algorithms)
Correlations and Eigenvalues (MULTIPLE CORRESPONDENCE algorithms)
Discrimination measures (MULTIPLE CORRESPONDENCE algorithms)
Object Scores (MULTIPLE CORRESPONDENCE algorithms)
Mass (MULTIPLE CORRESPONDENCE algorithms)
Inertia (MULTIPLE CORRESPONDENCE algorithms)
Contribution of point to inertia of dimension (MULTIPLE CORRESPONDENCE algorithms)
Contribution of dimension to inertia of point (MULTIPLE CORRESPONDENCE algorithms)
Quantifications (MULTIPLE CORRESPONDENCE algorithms)
Mass (MULTIPLE CORRESPONDENCE algorithms)
Inertia (MULTIPLE CORRESPONDENCE algorithms)
Contribution of point to inertia of dimension (MULTIPLE CORRESPONDENCE algorithms)
Contribution of dimension to inertia of point (MULTIPLE CORRESPONDENCE algorithms)
Residuals (MULTIPLE CORRESPONDENCE algorithms)


Maximum Rank (may be issued as a warning when exceeded) (MULTIPLE CORRESPONDENCE algorithms)

maximum rank,maximum rank,maximum rank
MULTIPLE CORRESPONDENCE algorithms,MULTIPLE CORRESPONDENCE algorithms,MULTIPLE CORRESPONDENCE algorithms

The maximum rank pmax indicates the maximum number of dimensions that can be computed for any dataset. In general

pmax=min(n−1,(
Σ
jcJ
kj)−m)

if there are no variables with missing values to be treated as passive. If variables do have missing values to be treated as passive, the maximum rank is

pmax=min(n−1,(
Σ
jcJ
kj)−max(m1,1))

with m1 the number of variables without missing values to be treated as passive.

Here kj is exclusive supplementary objects (that is, a category only used by supplementary objects is not counted in computing the maximum rank). Although the number of nontrivial dimensions may be less than pmax when m=2, MULTIPLE CORRESPONDENCE does allow dimensionalities all the way up to pmax. When, due to empty categories in the actual data, the rank deteriorates below the specified dimensionality, the program stops.

Related Topics

Diagnostics (MULTIPLE CORRESPONDENCE algorithms)
Descriptives (MULTIPLE CORRESPONDENCE algorithms)
Fit and Loss Measures (MULTIPLE CORRESPONDENCE algorithms)
Model Summary (MULTIPLE CORRESPONDENCE algorithms)
Cronbach's Alpha (MULTIPLE CORRESPONDENCE algorithms)
Variance Accounted For (MULTIPLE CORRESPONDENCE algorithms)
Inertia (MULTIPLE CORRESPONDENCE algorithms)
Correlations and Eigenvalues (MULTIPLE CORRESPONDENCE algorithms)
Discrimination measures (MULTIPLE CORRESPONDENCE algorithms)
Object Scores (MULTIPLE CORRESPONDENCE algorithms)
Mass (MULTIPLE CORRESPONDENCE algorithms)
Inertia (MULTIPLE CORRESPONDENCE algorithms)
Contribution of point to inertia of dimension (MULTIPLE CORRESPONDENCE algorithms)
Contribution of dimension to inertia of point (MULTIPLE CORRESPONDENCE algorithms)
Quantifications (MULTIPLE CORRESPONDENCE algorithms)
Mass (MULTIPLE CORRESPONDENCE algorithms)
Inertia (MULTIPLE CORRESPONDENCE algorithms)
Contribution of point to inertia of dimension (MULTIPLE CORRESPONDENCE algorithms)
Contribution of dimension to inertia of point (MULTIPLE CORRESPONDENCE algorithms)
Residuals (MULTIPLE CORRESPONDENCE algorithms)


Descriptives (MULTIPLE CORRESPONDENCE algorithms)

The descriptives tables gives the weighted univariate marginals and the weighted number of missing values (system missing, user defined missing, and values less than or equal to 0) for each variable.

Related Topics

Diagnostics (MULTIPLE CORRESPONDENCE algorithms)
Maximum Rank (may be issued as a warning when exceeded) (MULTIPLE CORRESPONDENCE algorithms)
Fit and Loss Measures (MULTIPLE CORRESPONDENCE algorithms)
Model Summary (MULTIPLE CORRESPONDENCE algorithms)
Cronbach's Alpha (MULTIPLE CORRESPONDENCE algorithms)
Variance Accounted For (MULTIPLE CORRESPONDENCE algorithms)
Inertia (MULTIPLE CORRESPONDENCE algorithms)
Correlations and Eigenvalues (MULTIPLE CORRESPONDENCE algorithms)
Discrimination measures (MULTIPLE CORRESPONDENCE algorithms)
Object Scores (MULTIPLE CORRESPONDENCE algorithms)
Mass (MULTIPLE CORRESPONDENCE algorithms)
Inertia (MULTIPLE CORRESPONDENCE algorithms)
Contribution of point to inertia of dimension (MULTIPLE CORRESPONDENCE algorithms)
Contribution of dimension to inertia of point (MULTIPLE CORRESPONDENCE algorithms)
Quantifications (MULTIPLE CORRESPONDENCE algorithms)
Mass (MULTIPLE CORRESPONDENCE algorithms)
Inertia (MULTIPLE CORRESPONDENCE algorithms)
Contribution of point to inertia of dimension (MULTIPLE CORRESPONDENCE algorithms)
Contribution of dimension to inertia of point (MULTIPLE CORRESPONDENCE algorithms)
Residuals (MULTIPLE CORRESPONDENCE algorithms)


Fit and Loss Measures (MULTIPLE CORRESPONDENCE algorithms)

When the HISTORY option is in effect, the following fit and loss measures are reported:

Fit (VAF). This is the quantity TFIT as defined in step (5).

Loss. This is σ(X;Y).

Related Topics

Diagnostics (MULTIPLE CORRESPONDENCE algorithms)
Maximum Rank (may be issued as a warning when exceeded) (MULTIPLE CORRESPONDENCE algorithms)
Descriptives (MULTIPLE CORRESPONDENCE algorithms)
Model Summary (MULTIPLE CORRESPONDENCE algorithms)
Cronbach's Alpha (MULTIPLE CORRESPONDENCE algorithms)
Variance Accounted For (MULTIPLE CORRESPONDENCE algorithms)
Inertia (MULTIPLE CORRESPONDENCE algorithms)
Correlations and Eigenvalues (MULTIPLE CORRESPONDENCE algorithms)
Discrimination measures (MULTIPLE CORRESPONDENCE algorithms)
Object Scores (MULTIPLE CORRESPONDENCE algorithms)
Mass (MULTIPLE CORRESPONDENCE algorithms)
Inertia (MULTIPLE CORRESPONDENCE algorithms)
Contribution of point to inertia of dimension (MULTIPLE CORRESPONDENCE algorithms)
Contribution of dimension to inertia of point (MULTIPLE CORRESPONDENCE algorithms)
Quantifications (MULTIPLE CORRESPONDENCE algorithms)
Mass (MULTIPLE CORRESPONDENCE algorithms)
Inertia (MULTIPLE CORRESPONDENCE algorithms)
Contribution of point to inertia of dimension (MULTIPLE CORRESPONDENCE algorithms)
Contribution of dimension to inertia of point (MULTIPLE CORRESPONDENCE algorithms)
Residuals (MULTIPLE CORRESPONDENCE algorithms)


Model Summary (MULTIPLE CORRESPONDENCE algorithms)

Model summary information consists of Cronbach's alpha, the variance accounted for, and the inertia.

Related Topics

Diagnostics (MULTIPLE CORRESPONDENCE algorithms)
Maximum Rank (may be issued as a warning when exceeded) (MULTIPLE CORRESPONDENCE algorithms)
Descriptives (MULTIPLE CORRESPONDENCE algorithms)
Fit and Loss Measures (MULTIPLE CORRESPONDENCE algorithms)
Cronbach's Alpha (MULTIPLE CORRESPONDENCE algorithms)
Variance Accounted For (MULTIPLE CORRESPONDENCE algorithms)
Inertia (MULTIPLE CORRESPONDENCE algorithms)
Correlations and Eigenvalues (MULTIPLE CORRESPONDENCE algorithms)
Discrimination measures (MULTIPLE CORRESPONDENCE algorithms)
Object Scores (MULTIPLE CORRESPONDENCE algorithms)
Mass (MULTIPLE CORRESPONDENCE algorithms)
Inertia (MULTIPLE CORRESPONDENCE algorithms)
Contribution of point to inertia of dimension (MULTIPLE CORRESPONDENCE algorithms)
Contribution of dimension to inertia of point (MULTIPLE CORRESPONDENCE algorithms)
Quantifications (MULTIPLE CORRESPONDENCE algorithms)
Mass (MULTIPLE CORRESPONDENCE algorithms)
Inertia (MULTIPLE CORRESPONDENCE algorithms)
Contribution of point to inertia of dimension (MULTIPLE CORRESPONDENCE algorithms)
Contribution of dimension to inertia of point (MULTIPLE CORRESPONDENCE algorithms)
Residuals (MULTIPLE CORRESPONDENCE algorithms)


Cronbach's Alpha (MULTIPLE CORRESPONDENCE algorithms)

Cronbach's Alpha,Cronbach's Alpha,Cronbach's Alpha
MULTIPLE CORRESPONDENCE algorithms,MULTIPLE CORRESPONDENCE algorithms,MULTIPLE CORRESPONDENCE algorithms

Cronbach's Alpha per dimension (s=1,...,p):

αs=mw(λ1/2s−1)/(λ1/2s(mw−1))

Total Cronbach's Alpha is

α=mw(Σsλ1/2s−1)/Σsλ1/2s(mw−1)

with λs the sth diagonal element of Λ as computed in step (4) during the last iteration.

Related Topics

Diagnostics (MULTIPLE CORRESPONDENCE algorithms)
Maximum Rank (may be issued as a warning when exceeded) (MULTIPLE CORRESPONDENCE algorithms)
Descriptives (MULTIPLE CORRESPONDENCE algorithms)
Fit and Loss Measures (MULTIPLE CORRESPONDENCE algorithms)
Model Summary (MULTIPLE CORRESPONDENCE algorithms)
Variance Accounted For (MULTIPLE CORRESPONDENCE algorithms)
Inertia (MULTIPLE CORRESPONDENCE algorithms)
Correlations and Eigenvalues (MULTIPLE CORRESPONDENCE algorithms)
Discrimination measures (MULTIPLE CORRESPONDENCE algorithms)
Object Scores (MULTIPLE CORRESPONDENCE algorithms)
Mass (MULTIPLE CORRESPONDENCE algorithms)
Inertia (MULTIPLE CORRESPONDENCE algorithms)
Contribution of point to inertia of dimension (MULTIPLE CORRESPONDENCE algorithms)
Contribution of dimension to inertia of point (MULTIPLE CORRESPONDENCE algorithms)
Quantifications (MULTIPLE CORRESPONDENCE algorithms)
Mass (MULTIPLE CORRESPONDENCE algorithms)
Inertia (MULTIPLE CORRESPONDENCE algorithms)
Contribution of point to inertia of dimension (MULTIPLE CORRESPONDENCE algorithms)
Contribution of dimension to inertia of point (MULTIPLE CORRESPONDENCE algorithms)
Residuals (MULTIPLE CORRESPONDENCE algorithms)


Variance Accounted For (MULTIPLE CORRESPONDENCE algorithms)

variance accounted for,variance accounted for,variance accounted for
MULTIPLE CORRESPONDENCE algorithms,MULTIPLE CORRESPONDENCE algorithms,MULTIPLE CORRESPONDENCE algorithms

Variance Accounted For per dimension (s=1,...,p):

VAF s=n−1w
Σ
jJ
vj tr (y´(j)sDjy(j)s), (% of variance is VAF1 s×100/mw),

Eigenvalue per dimension:

λ1/2s =VAF s,

with λs the sth diagonal element of Λ as computed in step (4) during the last iteration. (See also Optimization step (5), and Correlations Transformed Variables for interpretation of Λ1/2).

The Total Variance Accounted For is the mean over dimensions. So, the total eigenvalue is

tr (Λ1/2) = p−1Σs VAF s.

If there are no passive missing values, the eigenvalues Λ1/2 are those of the correlation matrix (see the Correlations and Eigenvalues section) weighted with variable weights:

r w jj=vjrjj, and r w jl=r w lj=v1/2jrjl

If there are passive missing values, then the eigenvalues are those of the matrix mwQ´ c M−1*Q c , with Q c =n−1/2w(I−M*uu´W/(u´M*Wu))Q, (for Q see the Correlations and Eigenvalues section) which is not necessarily a correlation matrix, although it is positive semi-definite. This matrix is weighted with variable weights in the same way as R.

Related Topics

Diagnostics (MULTIPLE CORRESPONDENCE algorithms)
Maximum Rank (may be issued as a warning when exceeded) (MULTIPLE CORRESPONDENCE algorithms)
Descriptives (MULTIPLE CORRESPONDENCE algorithms)
Fit and Loss Measures (MULTIPLE CORRESPONDENCE algorithms)
Model Summary (MULTIPLE CORRESPONDENCE algorithms)
Cronbach's Alpha (MULTIPLE CORRESPONDENCE algorithms)
Inertia (MULTIPLE CORRESPONDENCE algorithms)
Correlations and Eigenvalues (MULTIPLE CORRESPONDENCE algorithms)
Discrimination measures (MULTIPLE CORRESPONDENCE algorithms)
Object Scores (MULTIPLE CORRESPONDENCE algorithms)
Mass (MULTIPLE CORRESPONDENCE algorithms)
Inertia (MULTIPLE CORRESPONDENCE algorithms)
Contribution of point to inertia of dimension (MULTIPLE CORRESPONDENCE algorithms)
Contribution of dimension to inertia of point (MULTIPLE CORRESPONDENCE algorithms)
Quantifications (MULTIPLE CORRESPONDENCE algorithms)
Mass (MULTIPLE CORRESPONDENCE algorithms)
Inertia (MULTIPLE CORRESPONDENCE algorithms)
Contribution of point to inertia of dimension (MULTIPLE CORRESPONDENCE algorithms)
Contribution of dimension to inertia of point (MULTIPLE CORRESPONDENCE algorithms)
Residuals (MULTIPLE CORRESPONDENCE algorithms)


Inertia (MULTIPLE CORRESPONDENCE algorithms)

The inertia per dimension is the eigenvalue per dimension divided by mw. The total inertia is the total eigenvalue divided by mw.

Related Topics

Diagnostics (MULTIPLE CORRESPONDENCE algorithms)
Maximum Rank (may be issued as a warning when exceeded) (MULTIPLE CORRESPONDENCE algorithms)
Descriptives (MULTIPLE CORRESPONDENCE algorithms)
Fit and Loss Measures (MULTIPLE CORRESPONDENCE algorithms)
Model Summary (MULTIPLE CORRESPONDENCE algorithms)
Cronbach's Alpha (MULTIPLE CORRESPONDENCE algorithms)
Variance Accounted For (MULTIPLE CORRESPONDENCE algorithms)
Correlations and Eigenvalues (MULTIPLE CORRESPONDENCE algorithms)
Discrimination measures (MULTIPLE CORRESPONDENCE algorithms)
Object Scores (MULTIPLE CORRESPONDENCE algorithms)
Mass (MULTIPLE CORRESPONDENCE algorithms)
Inertia (MULTIPLE CORRESPONDENCE algorithms)
Contribution of point to inertia of dimension (MULTIPLE CORRESPONDENCE algorithms)
Contribution of dimension to inertia of point (MULTIPLE CORRESPONDENCE algorithms)
Quantifications (MULTIPLE CORRESPONDENCE algorithms)
Mass (MULTIPLE CORRESPONDENCE algorithms)
Inertia (MULTIPLE CORRESPONDENCE algorithms)
Contribution of point to inertia of dimension (MULTIPLE CORRESPONDENCE algorithms)
Contribution of dimension to inertia of point (MULTIPLE CORRESPONDENCE algorithms)
Residuals (MULTIPLE CORRESPONDENCE algorithms)


Correlations and Eigenvalues (MULTIPLE CORRESPONDENCE algorithms)

Before transformation

R=n−1wH´ c WH c , with H c weighted centered and normalized H. For the eigenvalue decomposition of R (to compute the eigenvalues), first row j and column j are removed from R if j is a supplementary variable, and then rij is multiplied by (vivj)1/2.

If passive missing treatment is applicable for a variable, missing values are imputed with the variable mode, regardless of the passive imputation specification.

After transformation

After transformation, p correlation matrices are computed (s=1,...,p):

R(s)=n−1wQ´(s)WQ(s),

with q(s)j=n1/2wGjY(j)s(Y´(j)sDjY(j)s)−1/2.

Usually, for the higher eigenvalues, the first eigenvalue of R(s) is equal to λ1/2s (see Model Summary section). The lower values of Λ1/2 are in most cases the second or subsequent eigenvalues of R(s).

If there are missing values, specified to be treated as passive, the mode of the quantified variable or the quantification of an extra category (as specified in syntax; if not specified, default (mode) is used) is imputed before computing correlations. Then the eigenvalues of the correlation matrix do not equal Λ1/2 (see Model Summary section). The quantification of an extra category is computed as

Y(j)(kj+1)s=(
Σ
iI
wi)−1
Σ
iI
wixis,

with I an index set recording which objects have missing values.

For the eigenvalue decomposition of R (to compute the eigenvalues), first row j and column j are removed from R if j is a supplementary variable, and then rij is multiplied by (vivj)1/2.

Related Topics

Diagnostics (MULTIPLE CORRESPONDENCE algorithms)
Maximum Rank (may be issued as a warning when exceeded) (MULTIPLE CORRESPONDENCE algorithms)
Descriptives (MULTIPLE CORRESPONDENCE algorithms)
Fit and Loss Measures (MULTIPLE CORRESPONDENCE algorithms)
Model Summary (MULTIPLE CORRESPONDENCE algorithms)
Cronbach's Alpha (MULTIPLE CORRESPONDENCE algorithms)
Variance Accounted For (MULTIPLE CORRESPONDENCE algorithms)
Inertia (MULTIPLE CORRESPONDENCE algorithms)
Discrimination measures (MULTIPLE CORRESPONDENCE algorithms)
Object Scores (MULTIPLE CORRESPONDENCE algorithms)
Mass (MULTIPLE CORRESPONDENCE algorithms)
Inertia (MULTIPLE CORRESPONDENCE algorithms)
Contribution of point to inertia of dimension (MULTIPLE CORRESPONDENCE algorithms)
Contribution of dimension to inertia of point (MULTIPLE CORRESPONDENCE algorithms)
Quantifications (MULTIPLE CORRESPONDENCE algorithms)
Mass (MULTIPLE CORRESPONDENCE algorithms)
Inertia (MULTIPLE CORRESPONDENCE algorithms)
Contribution of point to inertia of dimension (MULTIPLE CORRESPONDENCE algorithms)
Contribution of dimension to inertia of point (MULTIPLE CORRESPONDENCE algorithms)
Residuals (MULTIPLE CORRESPONDENCE algorithms)


Discrimination measures (MULTIPLE CORRESPONDENCE algorithms)

discrimination measures,discrimination measures,discrimination measures
MULTIPLE CORRESPONDENCE algorithms,MULTIPLE CORRESPONDENCE algorithms,MULTIPLE CORRESPONDENCE algorithms

The discrimination measures are the dimensionwise variances of the quantified variables, which are equal to the dimensionwise squared correlations of the quantified variables with the object scores. For variable j and dimension the discrimination measure is

Discr js=n−1wy´(j)sDjy(j)s

which is equal to the squared correlation between Gjy(j)s and xs.

Related Topics

Diagnostics (MULTIPLE CORRESPONDENCE algorithms)
Maximum Rank (may be issued as a warning when exceeded) (MULTIPLE CORRESPONDENCE algorithms)
Descriptives (MULTIPLE CORRESPONDENCE algorithms)
Fit and Loss Measures (MULTIPLE CORRESPONDENCE algorithms)
Model Summary (MULTIPLE CORRESPONDENCE algorithms)
Cronbach's Alpha (MULTIPLE CORRESPONDENCE algorithms)
Variance Accounted For (MULTIPLE CORRESPONDENCE algorithms)
Inertia (MULTIPLE CORRESPONDENCE algorithms)
Correlations and Eigenvalues (MULTIPLE CORRESPONDENCE algorithms)
Object Scores (MULTIPLE CORRESPONDENCE algorithms)
Mass (MULTIPLE CORRESPONDENCE algorithms)
Inertia (MULTIPLE CORRESPONDENCE algorithms)
Contribution of point to inertia of dimension (MULTIPLE CORRESPONDENCE algorithms)
Contribution of dimension to inertia of point (MULTIPLE CORRESPONDENCE algorithms)
Quantifications (MULTIPLE CORRESPONDENCE algorithms)
Mass (MULTIPLE CORRESPONDENCE algorithms)
Inertia (MULTIPLE CORRESPONDENCE algorithms)
Contribution of point to inertia of dimension (MULTIPLE CORRESPONDENCE algorithms)
Contribution of dimension to inertia of point (MULTIPLE CORRESPONDENCE algorithms)
Residuals (MULTIPLE CORRESPONDENCE algorithms)


Object Scores (MULTIPLE CORRESPONDENCE algorithms)

object scores,object scores,object scores
MULTIPLE CORRESPONDENCE algorithms,MULTIPLE CORRESPONDENCE algorithms,MULTIPLE CORRESPONDENCE algorithms

If Λ1/2 gives the eigenvalues, then Λ1/4 gives the singular values, that can be used to spread the inertia over the object scores X and the category quantifications Y. During the optimization phase, variable principal normalization is used, then X n =X and Y n =Y, else X n =X(m−1wΛ)a/4 and Y n =Y(m−1wΛ)1/4(b−1), with a=(1+q)/2, b=(1−q)/2, and q any real value in the closed interval [-1,1], except for independent normalization: then there is no q value and a=b=1. q=1 is equal to variable principal normalization, q=-1 is equal to object principal normalization, q=0 is equal to symmetrical normalization.

Related Topics

Diagnostics (MULTIPLE CORRESPONDENCE algorithms)
Maximum Rank (may be issued as a warning when exceeded) (MULTIPLE CORRESPONDENCE algorithms)
Descriptives (MULTIPLE CORRESPONDENCE algorithms)
Fit and Loss Measures (MULTIPLE CORRESPONDENCE algorithms)
Model Summary (MULTIPLE CORRESPONDENCE algorithms)
Cronbach's Alpha (MULTIPLE CORRESPONDENCE algorithms)
Variance Accounted For (MULTIPLE CORRESPONDENCE algorithms)
Inertia (MULTIPLE CORRESPONDENCE algorithms)
Correlations and Eigenvalues (MULTIPLE CORRESPONDENCE algorithms)
Discrimination measures (MULTIPLE CORRESPONDENCE algorithms)
Mass (MULTIPLE CORRESPONDENCE algorithms)
Inertia (MULTIPLE CORRESPONDENCE algorithms)
Contribution of point to inertia of dimension (MULTIPLE CORRESPONDENCE algorithms)
Contribution of dimension to inertia of point (MULTIPLE CORRESPONDENCE algorithms)
Quantifications (MULTIPLE CORRESPONDENCE algorithms)
Mass (MULTIPLE CORRESPONDENCE algorithms)
Inertia (MULTIPLE CORRESPONDENCE algorithms)
Contribution of point to inertia of dimension (MULTIPLE CORRESPONDENCE algorithms)
Contribution of dimension to inertia of point (MULTIPLE CORRESPONDENCE algorithms)
Residuals (MULTIPLE CORRESPONDENCE algorithms)


Mass (MULTIPLE CORRESPONDENCE algorithms)

The mass of object i is

Mass i=m*ii tr( M*W)

Related Topics

Diagnostics (MULTIPLE CORRESPONDENCE algorithms)
Maximum Rank (may be issued as a warning when exceeded) (MULTIPLE CORRESPONDENCE algorithms)
Descriptives (MULTIPLE CORRESPONDENCE algorithms)
Fit and Loss Measures (MULTIPLE CORRESPONDENCE algorithms)
Model Summary (MULTIPLE CORRESPONDENCE algorithms)
Cronbach's Alpha (MULTIPLE CORRESPONDENCE algorithms)
Variance Accounted For (MULTIPLE CORRESPONDENCE algorithms)
Inertia (MULTIPLE CORRESPONDENCE algorithms)
Correlations and Eigenvalues (MULTIPLE CORRESPONDENCE algorithms)
Discrimination measures (MULTIPLE CORRESPONDENCE algorithms)
Object Scores (MULTIPLE CORRESPONDENCE algorithms)
Inertia (MULTIPLE CORRESPONDENCE algorithms)
Contribution of point to inertia of dimension (MULTIPLE CORRESPONDENCE algorithms)
Contribution of dimension to inertia of point (MULTIPLE CORRESPONDENCE algorithms)
Quantifications (MULTIPLE CORRESPONDENCE algorithms)
Mass (MULTIPLE CORRESPONDENCE algorithms)
Inertia (MULTIPLE CORRESPONDENCE algorithms)
Contribution of point to inertia of dimension (MULTIPLE CORRESPONDENCE algorithms)
Contribution of dimension to inertia of point (MULTIPLE CORRESPONDENCE algorithms)
Residuals (MULTIPLE CORRESPONDENCE algorithms)


Inertia (MULTIPLE CORRESPONDENCE algorithms)

The inertia of object i is

Inertia i=1m*ii
Σ
j,hij≠0
vjd(j)hij− Mass i

where d(j)hij is the frequency of the category of object i on variable j, and hij≠0 indicates to exclude a variable if object i has a missing value on the variable and the missing option for the variable is passive.

Related Topics

Diagnostics (MULTIPLE CORRESPONDENCE algorithms)
Maximum Rank (may be issued as a warning when exceeded) (MULTIPLE CORRESPONDENCE algorithms)
Descriptives (MULTIPLE CORRESPONDENCE algorithms)
Fit and Loss Measures (MULTIPLE CORRESPONDENCE algorithms)
Model Summary (MULTIPLE CORRESPONDENCE algorithms)
Cronbach's Alpha (MULTIPLE CORRESPONDENCE algorithms)
Variance Accounted For (MULTIPLE CORRESPONDENCE algorithms)
Inertia (MULTIPLE CORRESPONDENCE algorithms)
Correlations and Eigenvalues (MULTIPLE CORRESPONDENCE algorithms)
Discrimination measures (MULTIPLE CORRESPONDENCE algorithms)
Object Scores (MULTIPLE CORRESPONDENCE algorithms)
Mass (MULTIPLE CORRESPONDENCE algorithms)
Contribution of point to inertia of dimension (MULTIPLE CORRESPONDENCE algorithms)
Contribution of dimension to inertia of point (MULTIPLE CORRESPONDENCE algorithms)
Quantifications (MULTIPLE CORRESPONDENCE algorithms)
Mass (MULTIPLE CORRESPONDENCE algorithms)
Inertia (MULTIPLE CORRESPONDENCE algorithms)
Contribution of point to inertia of dimension (MULTIPLE CORRESPONDENCE algorithms)
Contribution of dimension to inertia of point (MULTIPLE CORRESPONDENCE algorithms)
Residuals (MULTIPLE CORRESPONDENCE algorithms)


Contribution of point to inertia of dimension (MULTIPLE CORRESPONDENCE algorithms)

The contribution of object i to the inertia of dimension s is

Contribution is=m*iix2isnwmw

Related Topics

Diagnostics (MULTIPLE CORRESPONDENCE algorithms)
Maximum Rank (may be issued as a warning when exceeded) (MULTIPLE CORRESPONDENCE algorithms)
Descriptives (MULTIPLE CORRESPONDENCE algorithms)
Fit and Loss Measures (MULTIPLE CORRESPONDENCE algorithms)
Model Summary (MULTIPLE CORRESPONDENCE algorithms)
Cronbach's Alpha (MULTIPLE CORRESPONDENCE algorithms)
Variance Accounted For (MULTIPLE CORRESPONDENCE algorithms)
Inertia (MULTIPLE CORRESPONDENCE algorithms)
Correlations and Eigenvalues (MULTIPLE CORRESPONDENCE algorithms)
Discrimination measures (MULTIPLE CORRESPONDENCE algorithms)
Object Scores (MULTIPLE CORRESPONDENCE algorithms)
Mass (MULTIPLE CORRESPONDENCE algorithms)
Inertia (MULTIPLE CORRESPONDENCE algorithms)
Contribution of dimension to inertia of point (MULTIPLE CORRESPONDENCE algorithms)
Quantifications (MULTIPLE CORRESPONDENCE algorithms)
Mass (MULTIPLE CORRESPONDENCE algorithms)
Inertia (MULTIPLE CORRESPONDENCE algorithms)
Contribution of point to inertia of dimension (MULTIPLE CORRESPONDENCE algorithms)
Contribution of dimension to inertia of point (MULTIPLE CORRESPONDENCE algorithms)
Residuals (MULTIPLE CORRESPONDENCE algorithms)


Contribution of dimension to inertia of point (MULTIPLE CORRESPONDENCE algorithms)

The contribution of dimension s to the inertia of object i is

Contribution si=m*iix2isnwmw Inertia s Inertia i

Related Topics

Diagnostics (MULTIPLE CORRESPONDENCE algorithms)
Maximum Rank (may be issued as a warning when exceeded) (MULTIPLE CORRESPONDENCE algorithms)
Descriptives (MULTIPLE CORRESPONDENCE algorithms)
Fit and Loss Measures (MULTIPLE CORRESPONDENCE algorithms)
Model Summary (MULTIPLE CORRESPONDENCE algorithms)
Cronbach's Alpha (MULTIPLE CORRESPONDENCE algorithms)
Variance Accounted For (MULTIPLE CORRESPONDENCE algorithms)
Inertia (MULTIPLE CORRESPONDENCE algorithms)
Correlations and Eigenvalues (MULTIPLE CORRESPONDENCE algorithms)
Discrimination measures (MULTIPLE CORRESPONDENCE algorithms)
Object Scores (MULTIPLE CORRESPONDENCE algorithms)
Mass (MULTIPLE CORRESPONDENCE algorithms)
Inertia (MULTIPLE CORRESPONDENCE algorithms)
Contribution of point to inertia of dimension (MULTIPLE CORRESPONDENCE algorithms)
Quantifications (MULTIPLE CORRESPONDENCE algorithms)
Mass (MULTIPLE CORRESPONDENCE algorithms)
Inertia (MULTIPLE CORRESPONDENCE algorithms)
Contribution of point to inertia of dimension (MULTIPLE CORRESPONDENCE algorithms)
Contribution of dimension to inertia of point (MULTIPLE CORRESPONDENCE algorithms)
Residuals (MULTIPLE CORRESPONDENCE algorithms)


Quantifications (MULTIPLE CORRESPONDENCE algorithms)

quantifications,quantifications,quantifications
MULTIPLE CORRESPONDENCE algorithms,MULTIPLE CORRESPONDENCE algorithms,MULTIPLE CORRESPONDENCE algorithms

The quantifications are the centroid coordinates. If a category is only used by supplementary objects (i.e. treated as a passive missing), the centroid coordinates for this category are computed as

y(j)r=n1/2wn−1jr
Σ
iI
xiΛ1/4(b−1)

where y(j)r is the rth row of Yj, njr is the number of objects that have category r, and I is an index set recording which objects are in category r.

Related Topics

Diagnostics (MULTIPLE CORRESPONDENCE algorithms)
Maximum Rank (may be issued as a warning when exceeded) (MULTIPLE CORRESPONDENCE algorithms)
Descriptives (MULTIPLE CORRESPONDENCE algorithms)
Fit and Loss Measures (MULTIPLE CORRESPONDENCE algorithms)
Model Summary (MULTIPLE CORRESPONDENCE algorithms)
Cronbach's Alpha (MULTIPLE CORRESPONDENCE algorithms)
Variance Accounted For (MULTIPLE CORRESPONDENCE algorithms)
Inertia (MULTIPLE CORRESPONDENCE algorithms)
Correlations and Eigenvalues (MULTIPLE CORRESPONDENCE algorithms)
Discrimination measures (MULTIPLE CORRESPONDENCE algorithms)
Object Scores (MULTIPLE CORRESPONDENCE algorithms)
Mass (MULTIPLE CORRESPONDENCE algorithms)
Inertia (MULTIPLE CORRESPONDENCE algorithms)
Contribution of point to inertia of dimension (MULTIPLE CORRESPONDENCE algorithms)
Contribution of dimension to inertia of point (MULTIPLE CORRESPONDENCE algorithms)
Mass (MULTIPLE CORRESPONDENCE algorithms)
Inertia (MULTIPLE CORRESPONDENCE algorithms)
Contribution of point to inertia of dimension (MULTIPLE CORRESPONDENCE algorithms)
Contribution of dimension to inertia of point (MULTIPLE CORRESPONDENCE algorithms)
Residuals (MULTIPLE CORRESPONDENCE algorithms)


Mass (MULTIPLE CORRESPONDENCE algorithms)

The mass of category r of variable j is

Mass (j)r=d(j)rr tr( M*W)

Related Topics

Diagnostics (MULTIPLE CORRESPONDENCE algorithms)
Maximum Rank (may be issued as a warning when exceeded) (MULTIPLE CORRESPONDENCE algorithms)
Descriptives (MULTIPLE CORRESPONDENCE algorithms)
Fit and Loss Measures (MULTIPLE CORRESPONDENCE algorithms)
Model Summary (MULTIPLE CORRESPONDENCE algorithms)
Cronbach's Alpha (MULTIPLE CORRESPONDENCE algorithms)
Variance Accounted For (MULTIPLE CORRESPONDENCE algorithms)
Inertia (MULTIPLE CORRESPONDENCE algorithms)
Correlations and Eigenvalues (MULTIPLE CORRESPONDENCE algorithms)
Discrimination measures (MULTIPLE CORRESPONDENCE algorithms)
Object Scores (MULTIPLE CORRESPONDENCE algorithms)
Mass (MULTIPLE CORRESPONDENCE algorithms)
Inertia (MULTIPLE CORRESPONDENCE algorithms)
Contribution of point to inertia of dimension (MULTIPLE CORRESPONDENCE algorithms)
Contribution of dimension to inertia of point (MULTIPLE CORRESPONDENCE algorithms)
Quantifications (MULTIPLE CORRESPONDENCE algorithms)
Inertia (MULTIPLE CORRESPONDENCE algorithms)
Contribution of point to inertia of dimension (MULTIPLE CORRESPONDENCE algorithms)
Contribution of dimension to inertia of point (MULTIPLE CORRESPONDENCE algorithms)
Residuals (MULTIPLE CORRESPONDENCE algorithms)


Inertia (MULTIPLE CORRESPONDENCE algorithms)

The inertia of category r of variable j is

Inertia (j)r=nΣi=1wim*iig(j)ird(j)rr− Mass (j)r

if there are no missing values with missing option passive, this is equal to 1mw− Mass (j)r, and then the total inertia for variable j is vj(kj−1)mw.

Related Topics

Diagnostics (MULTIPLE CORRESPONDENCE algorithms)
Maximum Rank (may be issued as a warning when exceeded) (MULTIPLE CORRESPONDENCE algorithms)
Descriptives (MULTIPLE CORRESPONDENCE algorithms)
Fit and Loss Measures (MULTIPLE CORRESPONDENCE algorithms)
Model Summary (MULTIPLE CORRESPONDENCE algorithms)
Cronbach's Alpha (MULTIPLE CORRESPONDENCE algorithms)
Variance Accounted For (MULTIPLE CORRESPONDENCE algorithms)
Inertia (MULTIPLE CORRESPONDENCE algorithms)
Correlations and Eigenvalues (MULTIPLE CORRESPONDENCE algorithms)
Discrimination measures (MULTIPLE CORRESPONDENCE algorithms)
Object Scores (MULTIPLE CORRESPONDENCE algorithms)
Mass (MULTIPLE CORRESPONDENCE algorithms)
Inertia (MULTIPLE CORRESPONDENCE algorithms)
Contribution of point to inertia of dimension (MULTIPLE CORRESPONDENCE algorithms)
Contribution of dimension to inertia of point (MULTIPLE CORRESPONDENCE algorithms)
Quantifications (MULTIPLE CORRESPONDENCE algorithms)
Mass (MULTIPLE CORRESPONDENCE algorithms)
Contribution of point to inertia of dimension (MULTIPLE CORRESPONDENCE algorithms)
Contribution of dimension to inertia of point (MULTIPLE CORRESPONDENCE algorithms)
Residuals (MULTIPLE CORRESPONDENCE algorithms)


Contribution of point to inertia of dimension (MULTIPLE CORRESPONDENCE algorithms)

The contribution of category r of variable j to the inertia of dimension s is

Contribution (j)rs=d(j)rry2(j)rsnwmw Inertia s

the total contribution of variable j to the inertia of dimension s is vj Discr jsλ1/2s.

Related Topics

Diagnostics (MULTIPLE CORRESPONDENCE algorithms)
Maximum Rank (may be issued as a warning when exceeded) (MULTIPLE CORRESPONDENCE algorithms)
Descriptives (MULTIPLE CORRESPONDENCE algorithms)
Fit and Loss Measures (MULTIPLE CORRESPONDENCE algorithms)
Model Summary (MULTIPLE CORRESPONDENCE algorithms)
Cronbach's Alpha (MULTIPLE CORRESPONDENCE algorithms)
Variance Accounted For (MULTIPLE CORRESPONDENCE algorithms)
Inertia (MULTIPLE CORRESPONDENCE algorithms)
Correlations and Eigenvalues (MULTIPLE CORRESPONDENCE algorithms)
Discrimination measures (MULTIPLE CORRESPONDENCE algorithms)
Object Scores (MULTIPLE CORRESPONDENCE algorithms)
Mass (MULTIPLE CORRESPONDENCE algorithms)
Inertia (MULTIPLE CORRESPONDENCE algorithms)
Contribution of point to inertia of dimension (MULTIPLE CORRESPONDENCE algorithms)
Contribution of dimension to inertia of point (MULTIPLE CORRESPONDENCE algorithms)
Quantifications (MULTIPLE CORRESPONDENCE algorithms)
Mass (MULTIPLE CORRESPONDENCE algorithms)
Inertia (MULTIPLE CORRESPONDENCE algorithms)
Contribution of dimension to inertia of point (MULTIPLE CORRESPONDENCE algorithms)
Residuals (MULTIPLE CORRESPONDENCE algorithms)


Contribution of dimension to inertia of point (MULTIPLE CORRESPONDENCE algorithms)

The contribution of dimension s to the inertia of category r of variable j is

Contribution s(j)r=d(j)rry2(j)rsnwmw Inertia (j)r

Related Topics

Diagnostics (MULTIPLE CORRESPONDENCE algorithms)
Maximum Rank (may be issued as a warning when exceeded) (MULTIPLE CORRESPONDENCE algorithms)
Descriptives (MULTIPLE CORRESPONDENCE algorithms)
Fit and Loss Measures (MULTIPLE CORRESPONDENCE algorithms)
Model Summary (MULTIPLE CORRESPONDENCE algorithms)
Cronbach's Alpha (MULTIPLE CORRESPONDENCE algorithms)
Variance Accounted For (MULTIPLE CORRESPONDENCE algorithms)
Inertia (MULTIPLE CORRESPONDENCE algorithms)
Correlations and Eigenvalues (MULTIPLE CORRESPONDENCE algorithms)
Discrimination measures (MULTIPLE CORRESPONDENCE algorithms)
Object Scores (MULTIPLE CORRESPONDENCE algorithms)
Mass (MULTIPLE CORRESPONDENCE algorithms)
Inertia (MULTIPLE CORRESPONDENCE algorithms)
Contribution of point to inertia of dimension (MULTIPLE CORRESPONDENCE algorithms)
Contribution of dimension to inertia of point (MULTIPLE CORRESPONDENCE algorithms)
Quantifications (MULTIPLE CORRESPONDENCE algorithms)
Mass (MULTIPLE CORRESPONDENCE algorithms)
Inertia (MULTIPLE CORRESPONDENCE algorithms)
Contribution of point to inertia of dimension (MULTIPLE CORRESPONDENCE algorithms)
Residuals (MULTIPLE CORRESPONDENCE algorithms)


Residuals (MULTIPLE CORRESPONDENCE algorithms)

residuals,residuals,residuals
MULTIPLE CORRESPONDENCE algorithms,MULTIPLE CORRESPONDENCE algorithms,MULTIPLE CORRESPONDENCE algorithms

Plots per dimension are produced of Gjy n (j)s against the approximation x n s.

Related Topics

Diagnostics (MULTIPLE CORRESPONDENCE algorithms)
Maximum Rank (may be issued as a warning when exceeded) (MULTIPLE CORRESPONDENCE algorithms)
Descriptives (MULTIPLE CORRESPONDENCE algorithms)
Fit and Loss Measures (MULTIPLE CORRESPONDENCE algorithms)
Model Summary (MULTIPLE CORRESPONDENCE algorithms)
Cronbach's Alpha (MULTIPLE CORRESPONDENCE algorithms)
Variance Accounted For (MULTIPLE CORRESPONDENCE algorithms)
Inertia (MULTIPLE CORRESPONDENCE algorithms)
Correlations and Eigenvalues (MULTIPLE CORRESPONDENCE algorithms)
Discrimination measures (MULTIPLE CORRESPONDENCE algorithms)
Object Scores (MULTIPLE CORRESPONDENCE algorithms)
Mass (MULTIPLE CORRESPONDENCE algorithms)
Inertia (MULTIPLE CORRESPONDENCE algorithms)
Contribution of point to inertia of dimension (MULTIPLE CORRESPONDENCE algorithms)
Contribution of dimension to inertia of point (MULTIPLE CORRESPONDENCE algorithms)
Quantifications (MULTIPLE CORRESPONDENCE algorithms)
Mass (MULTIPLE CORRESPONDENCE algorithms)
Inertia (MULTIPLE CORRESPONDENCE algorithms)
Contribution of point to inertia of dimension (MULTIPLE CORRESPONDENCE algorithms)
Contribution of dimension to inertia of point (MULTIPLE CORRESPONDENCE algorithms)


References (MULTIPLE CORRESPONDENCE algorithms)

MULTIPLE CORRESPONDENCE algorithms,MULTIPLE CORRESPONDENCE algorithms,MULTIPLE CORRESPONDENCE algorithms
references,references,references

Cliff, N. 1966. Orthogonal rotation to congruence. Psychometrika, 31, 33-42.

Gifi, A. 1990. Nonlinear multivariate analysis. Chichester: John Wiley and Sons.

Max, J. 1960. Quantizing for minimum distortion. Proceedings IEEE (Information Theory), 6, 7-12.

Wilkinson, J. H. 1965. The algebraic eigenvalue problem. Oxford: Clarendon Press.

Related Topics

MULTIPLE CORRESPONDENCE Algorithms
Notation (MULTIPLE CORRESPONDENCE algorithms)
Discretization (MULTIPLE CORRESPONDENCE algorithms)
Imputation of Missing Values (MULTIPLE CORRESPONDENCE algorithms)
Configuration (MULTIPLE CORRESPONDENCE algorithms)
Objective Function Optimization (MULTIPLE CORRESPONDENCE algorithms)
Supplementary Objects (MULTIPLE CORRESPONDENCE algorithms)
Supplementary Variables (MULTIPLE CORRESPONDENCE algorithms)
Diagnostics (MULTIPLE CORRESPONDENCE algorithms)


Multiple Imputation Algorithms

MUTLIPLE IMPUTATION (command),MUTLIPLE IMPUTATION (command),MUTLIPLE IMPUTATION (command)
algorithms,algorithms,algorithms
Multiple Imputation,Multiple Imputation,Multiple Imputation
algorithms,algorithms,algorithms
multiple imputation algorithms,multiple imputation algorithms,multiple imputation algorithms

Multiple imputation imputes missing values multiple times. This algorithm only considers the imputation phase. See Multiple Imputation: Pooling Algorithms for the algorithm for combining analysis results of multiply imputed data sets.

Univariate and multivariate methods are given here. Univariate methods are used in situations where only the variable to be imputed has missing values, and all variables used as predictors in the imputation have no missing values. Multivariate methods are used in situations where variables are used both as dependents and predictors during imputation.

Related Topics

Notation (multiple imputation algorithms)
Univariate Methods (multiple imputation algorithms)
Linear Regression (multiple imputation algorithms)
Predictive Mean Matching (multiple imputation algorithms)
Logistic Regression (multiple imputation algorithms)
Multivariate Methods (multiple imputation algorithms)
Monotone Method (multiple imputation algorithms)
Fully Conditional Specification (FCS) (multiple imputation algorithms)
Automatic Selection of Imputation Method (multiple imputation algorithms)
Special Situations (multiple imputation algorithms)
Missing Values (multiple imputation algorithms)
References (multiple imputation algorithms)
Multiple Imputation: Pooling Algorithms
Notation (multiple imputation algorithms)
Rubin's Rules (multiple imputation algorithms)
Combining Results after Multiple Imputation (multiple imputation algorithms)
Scalar Q (multiple imputation algorithms)
Vector Q (multiple imputation algorithms)
Output Statistics (multiple imputation algorithms)
Hypothesis Tests (multiple imputation algorithms)
References (multiple imputation algorithms)


Notation (multiple imputation algorithms)

multiple imputation algorithms,multiple imputation algorithms,multiple imputation algorithms
notation,notation,notation

The following notation is used throughout this chapter unless otherwise stated:

x | Set of variables that have no missing values.
yij | The data value for case i, variable j. It may be missing.
Yobsj | The collection of observed values of variable j.
Ymisj | The collection of missing values of variable j.
Yobs=(Yobs1,...,YobsJ) | The collection of all observed data.
Ymis=(Ymis1,...,YmisJ) | The collection of all missing data.
fi | Frequency (replication) weight for case i. Must be integer.
F=diag(f1,...,fn) | Frequency weight matrix, diagonal with case frequency weight on the diagonal.
wi | Regression or analysis weight for case i.
W=diag(w1,...,wn) | Regression weight matrix.
n | The total number of cases. Each case may represent more than one observation due to frequency (replication) weights.
N=nΣi=1fi | The total number of observations.
Nw=nΣi=1wifi | The total weight.

Related Topics

Multiple Imputation Algorithms
Univariate Methods (multiple imputation algorithms)
Linear Regression (multiple imputation algorithms)
Predictive Mean Matching (multiple imputation algorithms)
Logistic Regression (multiple imputation algorithms)
Multivariate Methods (multiple imputation algorithms)
Monotone Method (multiple imputation algorithms)
Fully Conditional Specification (FCS) (multiple imputation algorithms)
Automatic Selection of Imputation Method (multiple imputation algorithms)
Special Situations (multiple imputation algorithms)
Missing Values (multiple imputation algorithms)
References (multiple imputation algorithms)
Multiple Imputation: Pooling Algorithms
Notation (multiple imputation algorithms)
Rubin's Rules (multiple imputation algorithms)
Combining Results after Multiple Imputation (multiple imputation algorithms)
Scalar Q (multiple imputation algorithms)
Vector Q (multiple imputation algorithms)
Output Statistics (multiple imputation algorithms)
Hypothesis Tests (multiple imputation algorithms)
References (multiple imputation algorithms)


Univariate Methods (multiple imputation algorithms)

y: the variable to be imputed, has missing values.

x: predictor variables, no missings.

Related Topics

Multiple Imputation Algorithms
Notation (multiple imputation algorithms)
Linear Regression (multiple imputation algorithms)
Predictive Mean Matching (multiple imputation algorithms)
Logistic Regression (multiple imputation algorithms)
Multivariate Methods (multiple imputation algorithms)
Monotone Method (multiple imputation algorithms)
Fully Conditional Specification (FCS) (multiple imputation algorithms)
Automatic Selection of Imputation Method (multiple imputation algorithms)
Special Situations (multiple imputation algorithms)
Missing Values (multiple imputation algorithms)
References (multiple imputation algorithms)
Multiple Imputation: Pooling Algorithms
Notation (multiple imputation algorithms)
Rubin's Rules (multiple imputation algorithms)
Combining Results after Multiple Imputation (multiple imputation algorithms)
Scalar Q (multiple imputation algorithms)
Vector Q (multiple imputation algorithms)
Output Statistics (multiple imputation algorithms)
Hypothesis Tests (multiple imputation algorithms)
References (multiple imputation algorithms)


Linear Regression (multiple imputation algorithms)

multiple imputation algorithms,multiple imputation algorithms,multiple imputation algorithms
linear regression,linear regression,linear regression

The variable to be imputed, y, is a continuous variable and is to be used as the dependent variable in the regression model. Both frequency and regression weights are accepted.

Model yi=x´iβ+ei with ei˜N(0,σ2wi) is used.

Prior: Pr(β,logσ2)∝1, or equivalently Pr(β,σ2)∝1/σ2

Using the complete cases, fit the regression model, assuming that all redundant parameters are removed if there are any. Denote the fitted parameters as (
^
β
,
^
σ
2) such that

^
β
=(X´cFcWcXc)−1X´cFcWcYc
^
σ
2=(Yc−Xc
^
β
)´FcWc(Yc−Xc
^
β
)/(Nobs−p)

where Nobs=Σiobs(Y)fi is the number of complete cases, p is the number of parameters, and Yc,Xc,Fc,Wc are the dependent vector, design matrix and frequency weight, regression weight matrix for complete cases.

The posterior distributions are:

β|σ2,Yc,Xc˜N(
^
β
,(X´cFcWcXc)−1σ2)
σ2|Yc,Xc˜(Nobs−p)
^
σ
2/χ2Nobs−p

Let A be the upper triangular matrix of Cholesky decomposition (X´cFcWcXc)−1=A´A.

Draw parameters from the posterior distributions.

Draw (σ*)2 : draw a random value u from χ2Nobs−p, then (σ*)2=(Nobs−p)
^
σ
2/u.

Draw β* : draw p independent N(0,1) values to create a random vector v, then β*=
^
β
+σ*A´v.

Impute missing values. For i in mis(Y), draw zi from N(0,1); imputation is y*i=x´iβ*+σ*
√ wi
zi.

Repeat the drawing of parameters and imputation of missing values to generate multiple imputations.

Incorporate restrictions

Using the linear regression method, a continuous variable may have an imputed value well outside the range of observed values, so the imputed values of continuous variables can be restricted to fall within a user-specified range, R. When an imputed value falls outside R, the algorithm draws another imputed value until a value is drawn within R or r1 draws have been made (the maximum number of tries allowed for drawing each missing case under the given parameter). If the r1 limit is reached, a new set of parameters are drawn from the posterior distributions (discarding any successfully imputed values for this variable during this imputation) and the process of imputing missing values is repeated until a set of imputed values is obtained for this variable and this imputation or r2 sets of parameters have been drawn (the maximum number of tries allowed for drawing parameters).

If the r2 limit is reached, the algorithm stops and issues an error.

Related Topics

Multiple Imputation Algorithms
Notation (multiple imputation algorithms)
Univariate Methods (multiple imputation algorithms)
Predictive Mean Matching (multiple imputation algorithms)
Logistic Regression (multiple imputation algorithms)
Multivariate Methods (multiple imputation algorithms)
Monotone Method (multiple imputation algorithms)
Fully Conditional Specification (FCS) (multiple imputation algorithms)
Automatic Selection of Imputation Method (multiple imputation algorithms)
Special Situations (multiple imputation algorithms)
Missing Values (multiple imputation algorithms)
References (multiple imputation algorithms)
Multiple Imputation: Pooling Algorithms
Notation (multiple imputation algorithms)
Rubin's Rules (multiple imputation algorithms)
Combining Results after Multiple Imputation (multiple imputation algorithms)
Scalar Q (multiple imputation algorithms)
Vector Q (multiple imputation algorithms)
Output Statistics (multiple imputation algorithms)
Hypothesis Tests (multiple imputation algorithms)
References (multiple imputation algorithms)


Predictive Mean Matching (multiple imputation algorithms)

multiple imputation algorithms,multiple imputation algorithms,multiple imputation algorithms
predictive mean matching,predictive mean matching,predictive mean matching
predictive mean matching,predictive mean matching,predictive mean matching
multiple imputation algorithms,multiple imputation algorithms,multiple imputation algorithms

This is the same as the linear regression method, but with the following changes.

Replace the impute missing values step of linear regression by the following:

Calculate
^
Y
obs={
^
y
obsi=x´iβ*:iobs(Y)}. For i in mis(Y):

y*i=x´iβ*;

Among Yobs, find the observation whose corresponding predicted values are closest to y*i;

Pick that one as the imputation.

Related Topics

Multiple Imputation Algorithms
Notation (multiple imputation algorithms)
Univariate Methods (multiple imputation algorithms)
Linear Regression (multiple imputation algorithms)
Logistic Regression (multiple imputation algorithms)
Multivariate Methods (multiple imputation algorithms)
Monotone Method (multiple imputation algorithms)
Fully Conditional Specification (FCS) (multiple imputation algorithms)
Automatic Selection of Imputation Method (multiple imputation algorithms)
Special Situations (multiple imputation algorithms)
Missing Values (multiple imputation algorithms)
References (multiple imputation algorithms)
Multiple Imputation: Pooling Algorithms
Notation (multiple imputation algorithms)
Rubin's Rules (multiple imputation algorithms)
Combining Results after Multiple Imputation (multiple imputation algorithms)
Scalar Q (multiple imputation algorithms)
Vector Q (multiple imputation algorithms)
Output Statistics (multiple imputation algorithms)
Hypothesis Tests (multiple imputation algorithms)
References (multiple imputation algorithms)


Logistic Regression (multiple imputation algorithms)

multiple imputation algorithms,multiple imputation algorithms,multiple imputation algorithms
logistic regression,logistic regression,logistic regression

The variable to be imputed, y, is a categorical variable with K categories taking values 1, 2, …, K, and is used as dependent variable in the logistic regression model. In the following, px(k)=Pr(y=k|x), and pi(k)=pxi(k) for case i.

Model: logpx(k)px(K)=x´βk for k = 1, …, K−1.

Prior: Pr(β)∝1, where β´=(β´1,...,β´K−1)

Using the complete cases, fit the logistic regression model with user specified frequency and analysis/regression weight variables. Denote the fitted parameter vector and its variance matrix as
^
β
,
^
V
(
^
β
). The posterior distribution is approximately: β|Yc,Xc˜N(
^
β
,
^
V
). Let A be the upper triangular matrix of the Cholesky decomposition
^
V
=A´A.

Draw parameters from the posterior distributions: draw β*: draw length(β) independent N(0,1) values to create a random vector z, then β*=
^
β
+Az.

Impute missing values. For i in mis(Y):

Calculate pi(k)=exp(x´iβ*k)1+K−1Σj=1exp(x´iβ*j) for k=1,...,K−1.

Draw a random value u from uniform distribution [0,1].

Imputation is y*i={
1 | u<Pi(1)
k | Pi(k−1)≤u<Pi(k)
K | u≥Pi(K−1)
 where Pi(k)=kΣj=1pi(j).

Repeat the drawing of parameters and imputation of missing values to generate multiple imputations.

Related Topics

Multiple Imputation Algorithms
Notation (multiple imputation algorithms)
Univariate Methods (multiple imputation algorithms)
Linear Regression (multiple imputation algorithms)
Predictive Mean Matching (multiple imputation algorithms)
Multivariate Methods (multiple imputation algorithms)
Monotone Method (multiple imputation algorithms)
Fully Conditional Specification (FCS) (multiple imputation algorithms)
Automatic Selection of Imputation Method (multiple imputation algorithms)
Special Situations (multiple imputation algorithms)
Missing Values (multiple imputation algorithms)
References (multiple imputation algorithms)
Multiple Imputation: Pooling Algorithms
Notation (multiple imputation algorithms)
Rubin's Rules (multiple imputation algorithms)
Combining Results after Multiple Imputation (multiple imputation algorithms)
Scalar Q (multiple imputation algorithms)
Vector Q (multiple imputation algorithms)
Output Statistics (multiple imputation algorithms)
Hypothesis Tests (multiple imputation algorithms)
References (multiple imputation algorithms)


Multivariate Methods (multiple imputation algorithms)

Multivariate methods apply to situations in which multiple variables have missing values. Patterns of missing values are important here because a fast non-iterative procedure can be used for monotone missing patterns. For general missing patterns, the fully conditional specification (FCS) is available. This is an iterative MCMC method.

Related Topics

Multiple Imputation Algorithms
Notation (multiple imputation algorithms)
Univariate Methods (multiple imputation algorithms)
Linear Regression (multiple imputation algorithms)
Predictive Mean Matching (multiple imputation algorithms)
Logistic Regression (multiple imputation algorithms)
Monotone Method (multiple imputation algorithms)
Fully Conditional Specification (FCS) (multiple imputation algorithms)
Automatic Selection of Imputation Method (multiple imputation algorithms)
Special Situations (multiple imputation algorithms)
Missing Values (multiple imputation algorithms)
References (multiple imputation algorithms)
Multiple Imputation: Pooling Algorithms
Notation (multiple imputation algorithms)
Rubin's Rules (multiple imputation algorithms)
Combining Results after Multiple Imputation (multiple imputation algorithms)
Scalar Q (multiple imputation algorithms)
Vector Q (multiple imputation algorithms)
Output Statistics (multiple imputation algorithms)
Hypothesis Tests (multiple imputation algorithms)
References (multiple imputation algorithms)


Monotone Method (multiple imputation algorithms)

multiple imputation algorithms,multiple imputation algorithms,multiple imputation algorithms
monotone method,monotone method,monotone method
monotone method,monotone method,monotone method
multiple imputation algorithms,multiple imputation algorithms,multiple imputation algorithms

Missing patterns are monotone if the variables can be ordered such that, for each case, all earlier variables are observed if the later variable is observed. This method also assumes that the parameters of individual imputation models have independent priors.

Let Y1,...,YK be variables with missing values in the sorted monotone order such that Y1 has the smallest number of missing values. Let X be the set of variables without missing values. Starting from Y1, sequentially use univariate method with the previous Y variables and X variables as predictors to impute.

Given X,Yobs1 and imputation model for Y1, impute Ymis1 by univariate method m times to get m complete variable Y*(1)1,...,Y*(m)1.

For l = 1, …, m, given X,Y*(l)1,Yobs2 and imputation model for Y2, impute Ymis2 by univariate method once to get Y*(l)2.

For l = 1, …, m, given X,Y*(l)1,Y*(l)2,Yobs3 and imputation model for Y3, impute Ymis3 by univariate method once to get Y*(l)3.

Continue until last variable YmisK is imputed.

Notes:

• The imputation model for variable Yj can only use variables from X,Y1,...,Yj−1 as predictors. In the case of no X variables, a constant model for Y1 is used.

• The posterior distribution used to draw parameters for imputing Ymisj doesn’t depend on previously imputed values {{Y*(l)k}ml=1}j−1k=1.

Related Topics

Multiple Imputation Algorithms
Notation (multiple imputation algorithms)
Univariate Methods (multiple imputation algorithms)
Linear Regression (multiple imputation algorithms)
Predictive Mean Matching (multiple imputation algorithms)
Logistic Regression (multiple imputation algorithms)
Multivariate Methods (multiple imputation algorithms)
Fully Conditional Specification (FCS) (multiple imputation algorithms)
Automatic Selection of Imputation Method (multiple imputation algorithms)
Special Situations (multiple imputation algorithms)
Missing Values (multiple imputation algorithms)
References (multiple imputation algorithms)
Multiple Imputation: Pooling Algorithms
Notation (multiple imputation algorithms)
Rubin's Rules (multiple imputation algorithms)
Combining Results after Multiple Imputation (multiple imputation algorithms)
Scalar Q (multiple imputation algorithms)
Vector Q (multiple imputation algorithms)
Output Statistics (multiple imputation algorithms)
Hypothesis Tests (multiple imputation algorithms)
References (multiple imputation algorithms)


Fully Conditional Specification (FCS) (multiple imputation algorithms)

multiple imputation algorithms,multiple imputation algorithms,multiple imputation algorithms
fully conditional specification (FCS),fully conditional specification (FCS),fully conditional specification (FCS)
fully conditional specification (FCS),fully conditional specification (FCS),fully conditional specification (FCS)
multiple imputation algorithms,multiple imputation algorithms,multiple imputation algorithms

In this method, an imputation model for each variable with missing values is specified. This method is an iterative MCMC procedure. In each iteration, it sequentially imputes missing values starting from the first variable with missing values.

Set initial values for missing values in all variables Y(0)1,...,Y(0)K (see below).

At iteration t, for j = 1 to K: Given X,Y(t)1,...,Y(t)j−1,Y(t−1)j+1,...,Y(t−1)K; that is, the most recently imputed values of all other variables, X,Y(t−1)2,...,Y(t−1)K for j =1, and X,Y(t)1,...,Y(t)K−1 for j = K, use a univariate method to impute all missing values in the jth variable, Y(t)j.

Continue iterations until the maximum number of iterations is reached.

We create multiple imputations by the multiple chain method; that is, we repeat above steps m times to get m imputations. Each chain starts with a different seed for random numbers and different initial values.

Initial Values

For a continuous variable with missing values, use the non-missing values to find its sample mean and standard deviation, then fill in the missing values with random draws from a normal distribution with mean and standard deviation equal to the sample values, limited within the range of the observed minimum and maximum values.

For a categorical variable with missing values, use the non-missing values to find the observed proportion of each category, then fill in the missing values with random draws from a multinomial distribution with category probabilities equal to the observed category proportions.

Assessment of Convergence

For each imputation and each iteration, missing values are imputed for each variable. Let Y*mis(l,t)j be the vector of imputed values of Ymisj at iteration t, imputation l. For each (l, t), calculate the sample mean and standard deviation of Y*mis(l,t)j:

m(l,t)j= mean (Y*mis(l,t)j)
s(l,t)j=
√ var(Y*mis(l,t)j)

Sequence plots of m(l,t)j versus t and s(l,t)j versus t are useful in assessing convergence. If there are 5 imputations, then there will be 5 lines (different color) in the same plot. On convergence, for each variable j, the traces of different l should be intermingled with each other without showing any definite trends, and the variance between different sequences is no larger than the variance with each individual sequence. When frequency and analysis weights are involved, the mean and standard deviation are calculated using the weights as well.

Related Topics

Multiple Imputation Algorithms
Notation (multiple imputation algorithms)
Univariate Methods (multiple imputation algorithms)
Linear Regression (multiple imputation algorithms)
Predictive Mean Matching (multiple imputation algorithms)
Logistic Regression (multiple imputation algorithms)
Multivariate Methods (multiple imputation algorithms)
Monotone Method (multiple imputation algorithms)
Automatic Selection of Imputation Method (multiple imputation algorithms)
Special Situations (multiple imputation algorithms)
Missing Values (multiple imputation algorithms)
References (multiple imputation algorithms)
Multiple Imputation: Pooling Algorithms
Notation (multiple imputation algorithms)
Rubin's Rules (multiple imputation algorithms)
Combining Results after Multiple Imputation (multiple imputation algorithms)
Scalar Q (multiple imputation algorithms)
Vector Q (multiple imputation algorithms)
Output Statistics (multiple imputation algorithms)
Hypothesis Tests (multiple imputation algorithms)
References (multiple imputation algorithms)


Automatic Selection of Imputation Method (multiple imputation algorithms)

If automatic selection of the imputation method is selected, the method is chosen as follows:

If the pattern of missing values is monotone, then the monotone method is used.

Otherwise, the fully conditional specification (FCS) method is used.

Note: only main effects models are used during automatic selection.

Related Topics

Multiple Imputation Algorithms
Notation (multiple imputation algorithms)
Univariate Methods (multiple imputation algorithms)
Linear Regression (multiple imputation algorithms)
Predictive Mean Matching (multiple imputation algorithms)
Logistic Regression (multiple imputation algorithms)
Multivariate Methods (multiple imputation algorithms)
Monotone Method (multiple imputation algorithms)
Fully Conditional Specification (FCS) (multiple imputation algorithms)
Special Situations (multiple imputation algorithms)
Missing Values (multiple imputation algorithms)
References (multiple imputation algorithms)
Multiple Imputation: Pooling Algorithms
Notation (multiple imputation algorithms)
Rubin's Rules (multiple imputation algorithms)
Combining Results after Multiple Imputation (multiple imputation algorithms)
Scalar Q (multiple imputation algorithms)
Vector Q (multiple imputation algorithms)
Output Statistics (multiple imputation algorithms)
Hypothesis Tests (multiple imputation algorithms)
References (multiple imputation algorithms)


Special Situations (multiple imputation algorithms)

When the variable to be imputed is constant over all its observed values, we use this constant to impute its missing values.

Related Topics

Multiple Imputation Algorithms
Notation (multiple imputation algorithms)
Univariate Methods (multiple imputation algorithms)
Linear Regression (multiple imputation algorithms)
Predictive Mean Matching (multiple imputation algorithms)
Logistic Regression (multiple imputation algorithms)
Multivariate Methods (multiple imputation algorithms)
Monotone Method (multiple imputation algorithms)
Fully Conditional Specification (FCS) (multiple imputation algorithms)
Automatic Selection of Imputation Method (multiple imputation algorithms)
Missing Values (multiple imputation algorithms)
References (multiple imputation algorithms)
Multiple Imputation: Pooling Algorithms
Notation (multiple imputation algorithms)
Rubin's Rules (multiple imputation algorithms)
Combining Results after Multiple Imputation (multiple imputation algorithms)
Scalar Q (multiple imputation algorithms)
Vector Q (multiple imputation algorithms)
Output Statistics (multiple imputation algorithms)
Hypothesis Tests (multiple imputation algorithms)
References (multiple imputation algorithms)


Missing Values (multiple imputation algorithms)

The following cases are not used during imputation.

• Cases with every variable missing.

• Cases with zero/negative replication or analysis weight.

Related Topics

Multiple Imputation Algorithms
Notation (multiple imputation algorithms)
Univariate Methods (multiple imputation algorithms)
Linear Regression (multiple imputation algorithms)
Predictive Mean Matching (multiple imputation algorithms)
Logistic Regression (multiple imputation algorithms)
Multivariate Methods (multiple imputation algorithms)
Monotone Method (multiple imputation algorithms)
Fully Conditional Specification (FCS) (multiple imputation algorithms)
Automatic Selection of Imputation Method (multiple imputation algorithms)
Special Situations (multiple imputation algorithms)
References (multiple imputation algorithms)
Multiple Imputation: Pooling Algorithms
Notation (multiple imputation algorithms)
Rubin's Rules (multiple imputation algorithms)
Combining Results after Multiple Imputation (multiple imputation algorithms)
Scalar Q (multiple imputation algorithms)
Vector Q (multiple imputation algorithms)
Output Statistics (multiple imputation algorithms)
Hypothesis Tests (multiple imputation algorithms)
References (multiple imputation algorithms)


References (multiple imputation algorithms)

multiple imputation algorithms,multiple imputation algorithms,multiple imputation algorithms
references,references,references

Raghunathan, T. E., J. M. Lepkowski, J. van Hoewyk, and P. Solenberger. 2001. A multivariate technique for multiply imputing missing values using a sequence of regression models. Survey Methodology , 27, 85-95.

Rubin, R. B. 1987. Multiple Imputation for Nonresponse in Surveys. New York: John Wiley and Sons, Inc..

Schafer, J. L. 1997. Analysis of Incomplete Multivariate Data. London: Chapman and Hall.

Van Buuren, S. 2007. Multiple imputation of discrete and continuous data by fully conditional specification. Statistical Methods in Medical Research, 16, 219-242.

Van Buuren, S., H. C. Boshuizen, and D. L. Knook. 1999. Multiple imputation of missing blood pressure covariates in survival analysis. Statistics in Medicine, 18, 681-694.

Related Topics

Multiple Imputation Algorithms
Notation (multiple imputation algorithms)
Univariate Methods (multiple imputation algorithms)
Linear Regression (multiple imputation algorithms)
Predictive Mean Matching (multiple imputation algorithms)
Logistic Regression (multiple imputation algorithms)
Multivariate Methods (multiple imputation algorithms)
Monotone Method (multiple imputation algorithms)
Fully Conditional Specification (FCS) (multiple imputation algorithms)
Automatic Selection of Imputation Method (multiple imputation algorithms)
Special Situations (multiple imputation algorithms)
Missing Values (multiple imputation algorithms)
Multiple Imputation: Pooling Algorithms
Notation (multiple imputation algorithms)
Rubin's Rules (multiple imputation algorithms)
Combining Results after Multiple Imputation (multiple imputation algorithms)
Scalar Q (multiple imputation algorithms)
Vector Q (multiple imputation algorithms)
Output Statistics (multiple imputation algorithms)
Hypothesis Tests (multiple imputation algorithms)
References (multiple imputation algorithms)


Multiple Imputation: Pooling Algorithms

multiple imputation algorithms,multiple imputation algorithms,multiple imputation algorithms

Analysis of missing values consists of two sequential steps: analysis of each individual complete data set to create multiple analysis results and then combining (pooling) these multiple analysis results. This algorithm only considers combining the multiple analysis results assuming that multiple complete datasets are created and the analysis of each individual complete dataset is complete. See Multiple Imputation Algorithms for the algorithm for creating multiply imputed data sets. See the algorithm of the analysis you're performing for details on the analysis an individual complete data set.

Related Topics

Multiple Imputation Algorithms
Notation (multiple imputation algorithms)
Univariate Methods (multiple imputation algorithms)
Linear Regression (multiple imputation algorithms)
Predictive Mean Matching (multiple imputation algorithms)
Logistic Regression (multiple imputation algorithms)
Multivariate Methods (multiple imputation algorithms)
Monotone Method (multiple imputation algorithms)
Fully Conditional Specification (FCS) (multiple imputation algorithms)
Automatic Selection of Imputation Method (multiple imputation algorithms)
Special Situations (multiple imputation algorithms)
Missing Values (multiple imputation algorithms)
References (multiple imputation algorithms)
Notation (multiple imputation algorithms)
Rubin's Rules (multiple imputation algorithms)
Combining Results after Multiple Imputation (multiple imputation algorithms)
Scalar Q (multiple imputation algorithms)
Vector Q (multiple imputation algorithms)
Output Statistics (multiple imputation algorithms)
Hypothesis Tests (multiple imputation algorithms)
References (multiple imputation algorithms)


Notation (multiple imputation algorithms)

multiple imputation algorithms,multiple imputation algorithms,multiple imputation algorithms
notation,notation,notation

The following notation is used throughout this chapter unless otherwise stated:

m

The number of multiply imputed sets of complete data. m≥2 is assumed.

Q=(Q1,...,Qk)´

Parameter vector (with k elements) to be estimated.

^
Q
(i)=(
^
Q
(i)1,...,
^
Q
(i)k)´

Estimated parameter vector using the i-th set of completed data, i=1,...,m.

U(i)

Estimated covariance matrix of
^
Q
(i)

Q

The final combined estimate of Q

Related Topics

Multiple Imputation Algorithms
Notation (multiple imputation algorithms)
Univariate Methods (multiple imputation algorithms)
Linear Regression (multiple imputation algorithms)
Predictive Mean Matching (multiple imputation algorithms)
Logistic Regression (multiple imputation algorithms)
Multivariate Methods (multiple imputation algorithms)
Monotone Method (multiple imputation algorithms)
Fully Conditional Specification (FCS) (multiple imputation algorithms)
Automatic Selection of Imputation Method (multiple imputation algorithms)
Special Situations (multiple imputation algorithms)
Missing Values (multiple imputation algorithms)
References (multiple imputation algorithms)
Multiple Imputation: Pooling Algorithms
Rubin's Rules (multiple imputation algorithms)
Combining Results after Multiple Imputation (multiple imputation algorithms)
Scalar Q (multiple imputation algorithms)
Vector Q (multiple imputation algorithms)
Output Statistics (multiple imputation algorithms)
Hypothesis Tests (multiple imputation algorithms)
References (multiple imputation algorithms)


Rubin's Rules (multiple imputation algorithms)

multiple imputation algorithms,multiple imputation algorithms,multiple imputation algorithms
Rubin's rules,Rubin's rules,Rubin's rules
Rubin's rules,Rubin's rules,Rubin's rules
multiple imputation algorithms,multiple imputation algorithms,multiple imputation algorithms

Across all the complete datasets, it is assumed that:

• the model of the same effects in the same order is fit,

• a categorical variable has the same set of categories and the reference category is the same.

Assuming that each individual analysis result {
^
Q
(i),U(i)}mi=1 is available, the goal is to derive the final combined result based on these m individual results.

Related Topics

Multiple Imputation Algorithms
Notation (multiple imputation algorithms)
Univariate Methods (multiple imputation algorithms)
Linear Regression (multiple imputation algorithms)
Predictive Mean Matching (multiple imputation algorithms)
Logistic Regression (multiple imputation algorithms)
Multivariate Methods (multiple imputation algorithms)
Monotone Method (multiple imputation algorithms)
Fully Conditional Specification (FCS) (multiple imputation algorithms)
Automatic Selection of Imputation Method (multiple imputation algorithms)
Special Situations (multiple imputation algorithms)
Missing Values (multiple imputation algorithms)
References (multiple imputation algorithms)
Multiple Imputation: Pooling Algorithms
Notation (multiple imputation algorithms)
Combining Results after Multiple Imputation (multiple imputation algorithms)
Scalar Q (multiple imputation algorithms)
Vector Q (multiple imputation algorithms)
Output Statistics (multiple imputation algorithms)
Hypothesis Tests (multiple imputation algorithms)
References (multiple imputation algorithms)


Combining Results after Multiple Imputation (multiple imputation algorithms)

The final estimate of Q is simply the average of individual ones:

Q=1mmΣi=1
^
Q
(i)

The estimated total variance is

T=U+(1+1m)B

where B and U are respectively the between-imputation and average within-imputation variance calculated by

B=1m−1mΣi=1(
^
Q
(i)−Q)(
^
Q
(i)−Q)´
U=1mmΣi=1U(i)

Special Situations

Redundant parameters. Standard procedures set redundant parameter estimates at 0 and variance/covariance as missing. If a parameter is redundant across all imputations, then the combined parameter is still redundant. If there is a parameter that is redundant in some imputations but not in others, this causes an error. The reason is that the combined results depend on the order of effects in the model (for example x1,x2,x3 or x3,x1,x2 when x3=x1+x2 holds in some imputations but not in others) which makes the combined results arbitrary and useless.

Different sets of parameters. There may be situations in which some model coefficients occur in some model fits but not in others (for example, a certain combination of two categorical variables occurs in some complete datasets but not in others). If the parameters across imputations are different, this causes an error. The reason is that the combined results depend on the choice of reference categories of categorical predictors which makes the results arbitrary and useless.

Missing Elements. If there are any missing elements in {
^
Q
(i),U(i)}mi=1, then we will only use the non-missing part to do calculations.

Related Topics

Multiple Imputation Algorithms
Notation (multiple imputation algorithms)
Univariate Methods (multiple imputation algorithms)
Linear Regression (multiple imputation algorithms)
Predictive Mean Matching (multiple imputation algorithms)
Logistic Regression (multiple imputation algorithms)
Multivariate Methods (multiple imputation algorithms)
Monotone Method (multiple imputation algorithms)
Fully Conditional Specification (FCS) (multiple imputation algorithms)
Automatic Selection of Imputation Method (multiple imputation algorithms)
Special Situations (multiple imputation algorithms)
Missing Values (multiple imputation algorithms)
References (multiple imputation algorithms)
Multiple Imputation: Pooling Algorithms
Notation (multiple imputation algorithms)
Rubin's Rules (multiple imputation algorithms)
Scalar Q (multiple imputation algorithms)
Vector Q (multiple imputation algorithms)
Output Statistics (multiple imputation algorithms)
Hypothesis Tests (multiple imputation algorithms)
References (multiple imputation algorithms)


Scalar Q (multiple imputation algorithms)

relative efficiency,relative efficiency,relative efficiency
multiple imputation algorithms,multiple imputation algorithms,multiple imputation algorithms

If Q is a scalar (k=1), then

(Q−Q)/
√ T

has an approximate Student's t distribution with degrees of freedom

νm=(m−1)[1+r−1]2

where r is the relative increase in variance due to non-response

r=(1+m−1)BU

The fraction of missing information about Q due to missing values is

λ=r+2/(νm+3)r+1

The relative efficiency (RE) of using the finite m imputation estimator, rather than using an infinite number for the fully efficient imputation, in units of variance, is approximately

RE=(1+λ/m)−1

Related Topics

Multiple Imputation Algorithms
Notation (multiple imputation algorithms)
Univariate Methods (multiple imputation algorithms)
Linear Regression (multiple imputation algorithms)
Predictive Mean Matching (multiple imputation algorithms)
Logistic Regression (multiple imputation algorithms)
Multivariate Methods (multiple imputation algorithms)
Monotone Method (multiple imputation algorithms)
Fully Conditional Specification (FCS) (multiple imputation algorithms)
Automatic Selection of Imputation Method (multiple imputation algorithms)
Special Situations (multiple imputation algorithms)
Missing Values (multiple imputation algorithms)
References (multiple imputation algorithms)
Multiple Imputation: Pooling Algorithms
Notation (multiple imputation algorithms)
Rubin's Rules (multiple imputation algorithms)
Combining Results after Multiple Imputation (multiple imputation algorithms)
Vector Q (multiple imputation algorithms)
Output Statistics (multiple imputation algorithms)
Hypothesis Tests (multiple imputation algorithms)
References (multiple imputation algorithms)


Vector Q (multiple imputation algorithms)

If the number of imputations m is big enough (at least 50,000), then

1k(Q−Q)TT−1(Q−Q)

has an approximate F distribution with k numerator degrees of freedom and denominator degrees of freedom

ν=(m−1)[1+r−1]2

where

r=1k(1+m−1)trace(BU−1)

But for small m (this usually is the case in practice), this approximation is bad because the estimate of B is unstable and when m ≤ k, B is not even full rank. Alternatively, we assume that B and U are proportional to one another. Under this assumption, a more stable estimate of total variance is

˜
T
=(1+r)U

and

1k(Q−Q)T
˜
T
−1(Q−Q)˜Fk,
˜
ν

has an approximate F distribution with k numerator degrees of freedom and denominator degrees of freedom
˜
ν
(Li, Raghunathan and Rubin (1991)), let t=k(m−1),

˜
ν
={
t(1+k−1)(1+r−1)2/2 | t≤4
4+(t−4)[1+(1−2t−1)r−1]2 | t>4

Note:

• When k=1,
˜
T
reduces to T for a scalar statistic.

• When k=1,
˜
ν
=vm if m≤5, and
˜
ν
<vm if m>5.

Related Topics

Multiple Imputation Algorithms
Notation (multiple imputation algorithms)
Univariate Methods (multiple imputation algorithms)
Linear Regression (multiple imputation algorithms)
Predictive Mean Matching (multiple imputation algorithms)
Logistic Regression (multiple imputation algorithms)
Multivariate Methods (multiple imputation algorithms)
Monotone Method (multiple imputation algorithms)
Fully Conditional Specification (FCS) (multiple imputation algorithms)
Automatic Selection of Imputation Method (multiple imputation algorithms)
Special Situations (multiple imputation algorithms)
Missing Values (multiple imputation algorithms)
References (multiple imputation algorithms)
Multiple Imputation: Pooling Algorithms
Notation (multiple imputation algorithms)
Rubin's Rules (multiple imputation algorithms)
Combining Results after Multiple Imputation (multiple imputation algorithms)
Scalar Q (multiple imputation algorithms)
Output Statistics (multiple imputation algorithms)
Hypothesis Tests (multiple imputation algorithms)
References (multiple imputation algorithms)


Output Statistics (multiple imputation algorithms)

relative efficiency,relative efficiency,relative efficiency
multiple imputation algorithms,multiple imputation algorithms,multiple imputation algorithms
fraction of missing information,fraction of missing information,fraction of missing information
multiple imputation algorithms,multiple imputation algorithms,multiple imputation algorithms
relative increase in variance due to missing values,relative increase in variance due to missing values,relative increase in variance due to missing values
multiple imputation algorithms,multiple imputation algorithms,multiple imputation algorithms

Other than Q,U,B,T, we are also interested in some statistics for each individual element of Q (for example the vector of regression coefficients). For the jth element of Q, we calculate the following. Please notice that the following listed quantities do not use the off diagonal elements of matrix T, or B, or U. They are the same as treating each element as scalar and calculating them separately. In the following tν denotes a random variable following a Student's t distribution with degrees of freedom ν, and tv,1−α/2 denotes the 100(1−α/2) percentile of the distribution such that Pr[tν≤tv,1−α/2]=1−α/2.

Estimate: Qj

Standard error: sej=
√ Tjj

Degrees of freedom: νj

Confidence interval: Qj±tνj,1−α/2·sej

t-value:
˜
t
j=Qj/sej

p-value for hypothesis test : H0:Qj=0: p=2Pr[tνj≥|
˜
t
j|]

Relative increase in variance due to non-response: rj=(1+m−1)BjjUjj

Fraction of missing information: λj

Relative efficiency (RE): REj=(1+λj/m)−1

Related Topics

Multiple Imputation Algorithms
Notation (multiple imputation algorithms)
Univariate Methods (multiple imputation algorithms)
Linear Regression (multiple imputation algorithms)
Predictive Mean Matching (multiple imputation algorithms)
Logistic Regression (multiple imputation algorithms)
Multivariate Methods (multiple imputation algorithms)
Monotone Method (multiple imputation algorithms)
Fully Conditional Specification (FCS) (multiple imputation algorithms)
Automatic Selection of Imputation Method (multiple imputation algorithms)
Special Situations (multiple imputation algorithms)
Missing Values (multiple imputation algorithms)
References (multiple imputation algorithms)
Multiple Imputation: Pooling Algorithms
Notation (multiple imputation algorithms)
Rubin's Rules (multiple imputation algorithms)
Combining Results after Multiple Imputation (multiple imputation algorithms)
Scalar Q (multiple imputation algorithms)
Vector Q (multiple imputation algorithms)
Hypothesis Tests (multiple imputation algorithms)
References (multiple imputation algorithms)


Hypothesis Tests (multiple imputation algorithms)

multiple imputation algorithms,multiple imputation algorithms,multiple imputation algorithms
hypothesis tests,hypothesis tests,hypothesis tests

The p-value for testing H0:Q=Q0 is

p=Pr(Fk,ν≥F)

where

F=1k(Q−Q0)T
˜
T
−(Q−Q0)]
k=rank(
˜
T
)
ν=
˜
ν

We will also apply this test to scalar statistics. Note that for k = 1 this test does not necessarily reduce to the equivalent student t test mentioned in the scalar Q section due to possibly different degrees of freedom.

General Linear Contrast of Model Parameters

The above test can be applied to test hypotheses about linear combinations of parameters.For a given matrix L and a vector K, H0:Lβ=Kcan be tested, where β is a model parameter vector (regression coefficients for example). Let Q=Lβ,
^
Q
i=L
^
β
i, and Ui=LVar(
^
β
i)L´. This test becomes testing H0:Q=K.

It is likely that only K,
^
Q
i and diagonal elements of Ui are available, so the simultaneous test of H0 cannot be done. Instead, we will test each row of H0 separately. Denote the l-th row hypothesis of H0 as H0l:Ql=Kl. Let pl be the p-value for testing H0l alone. If multiple comparisons are requested, the p-values are adjusted as usual.

In multivariate GLM, there is a parameter matrix, B, instead of a vector. In multivariate GLM H0:LBM=K can be tested for the given matrices L, M, K. Where possible, we separately test each element of the hypotheses H0ij:Qij=l´iBmj=kij where l´i is the i-th row vector of matrix L, and kij is the ijth element of vector K. Again, if multiple comparisons are requested, the p-values are adjusted as usual.

Related Topics

Multiple Imputation Algorithms
Notation (multiple imputation algorithms)
Univariate Methods (multiple imputation algorithms)
Linear Regression (multiple imputation algorithms)
Predictive Mean Matching (multiple imputation algorithms)
Logistic Regression (multiple imputation algorithms)
Multivariate Methods (multiple imputation algorithms)
Monotone Method (multiple imputation algorithms)
Fully Conditional Specification (FCS) (multiple imputation algorithms)
Automatic Selection of Imputation Method (multiple imputation algorithms)
Special Situations (multiple imputation algorithms)
Missing Values (multiple imputation algorithms)
References (multiple imputation algorithms)
Multiple Imputation: Pooling Algorithms
Notation (multiple imputation algorithms)
Rubin's Rules (multiple imputation algorithms)
Combining Results after Multiple Imputation (multiple imputation algorithms)
Scalar Q (multiple imputation algorithms)
Vector Q (multiple imputation algorithms)
Output Statistics (multiple imputation algorithms)
References (multiple imputation algorithms)


References (multiple imputation algorithms)

multiple imputation algorithms,multiple imputation algorithms,multiple imputation algorithms
references,references,references

Li, K. H., T. E. Raghunathan, and D. B. Rubin. 1991. Large-Sample Significance Levels from Multiply Imputed Data Using Moment-Based Statistics and an F Reference Distribution. Journal of the American Statistical Association, 86, 1065-1073.

Schafer, J. L. 1997. Analysis of Incomplete Multivariate Data. London: Chapman and Hall.

Related Topics

Multiple Imputation Algorithms
Notation (multiple imputation algorithms)
Univariate Methods (multiple imputation algorithms)
Linear Regression (multiple imputation algorithms)
Predictive Mean Matching (multiple imputation algorithms)
Logistic Regression (multiple imputation algorithms)
Multivariate Methods (multiple imputation algorithms)
Monotone Method (multiple imputation algorithms)
Fully Conditional Specification (FCS) (multiple imputation algorithms)
Automatic Selection of Imputation Method (multiple imputation algorithms)
Special Situations (multiple imputation algorithms)
Missing Values (multiple imputation algorithms)
References (multiple imputation algorithms)
Multiple Imputation: Pooling Algorithms
Notation (multiple imputation algorithms)
Rubin's Rules (multiple imputation algorithms)
Combining Results after Multiple Imputation (multiple imputation algorithms)
Scalar Q (multiple imputation algorithms)
Vector Q (multiple imputation algorithms)
Output Statistics (multiple imputation algorithms)
Hypothesis Tests (multiple imputation algorithms)


MVA Algorithms

MVA (command),MVA (command),MVA (command)
algorithms,algorithms,algorithms
Missing Value Analysis,Missing Value Analysis,Missing Value Analysis
algorithms,algorithms,algorithms
missing value analysis algorithms,missing value analysis algorithms,missing value analysis algorithms

The Missing Value procedure provides descriptions of missing value patterns; estimates of means, standard deviations, covariances, and correlations (using a listwise, pairwise, EM, or regression method); and imputation of values by either EM or regression.

Related Topics

Notation (missing value analysis algorithms)
Univariate Statistics (missing value analysis algorithms)
Separate Variance T Test (missing value analysis algorithms)
Listwise Statistics (missing value analysis algorithms)
Pairwise Statistics (missing value analysis algorithms)
Regression Estimated Statistics (missing value analysis algorithms)
EM Estimated Statistics (missing value analysis algorithms)
References (missing value analysis algorithms)


Notation (missing value analysis algorithms)

missing value analysis algorithms,missing value analysis algorithms,missing value analysis algorithms
notation,notation,notation

The following notation is used throughout this chapter unless otherwise stated:

X | Data matrix
xij | Value of the ith case, jth variable
v | Number of variables
n | Number of cases
ni | Number of nonmissing values of the ith variable
nij | Number of nonmissing value pairs of the ith and jth variables
nc | Number of complete cases
J | Index of all variables
J#=J(condition) | Index of variables satisfying “condition”
I | Index of all cases
I(k1,...,kl) | Index of cases at which variables are not missing
I(J) | Index of complete cases
a=[ai] | Vector whose ith element is ai
A=[aij] | Matrix whose ith row, jth column element is aij

Example to Illustrate Notation

X=[
43 | 76 | 34
. | 45 | 72
44 | 15 | 52
. | . | 65
. | . | 43
54 | 12 | .
43 | 67 | 34
]
x2,3=72 | The 2nd row, 3rd element
v=3 | Number of variables
n=7 | Number of cases
n2=5 | Number of nonmissing values in the 2nd variable
n2,3=4 | Number of nonmissing value pairs in the 2nd and 3rd variables
nc=3 | Number of complete cases
J={1,2,3} | Index of variables
J(2 or more missing)={1,2} | The 1st and 2nd variables have two or more missing values
I={1,2,3,4,5,6,7} | Index of cases
I(2)={1,2,3,6,7} | Index of cases at which the 2nd variable is not missing
I(2,3)={1,2,3,7} | Index of cases at which the 2nd and 3rd variables are not missing
I(J)={1,7} | Index of complete cases
x2=43.0 | The 2nd element of the vector x=[x1,x2,x3]

Related Topics

MVA Algorithms
Univariate Statistics (missing value analysis algorithms)
Separate Variance T Test (missing value analysis algorithms)
Listwise Statistics (missing value analysis algorithms)
Pairwise Statistics (missing value analysis algorithms)
Regression Estimated Statistics (missing value analysis algorithms)
EM Estimated Statistics (missing value analysis algorithms)
References (missing value analysis algorithms)


Univariate Statistics (missing value analysis algorithms)

missing value analysis algorithms,missing value analysis algorithms,missing value analysis algorithms
univariate statistics,univariate statistics,univariate statistics

The index j refers to quantitative variables.

Related Topics

MVA Algorithms
Notation (missing value analysis algorithms)
Separate Variance T Test (missing value analysis algorithms)
Listwise Statistics (missing value analysis algorithms)
Pairwise Statistics (missing value analysis algorithms)
Regression Estimated Statistics (missing value analysis algorithms)
EM Estimated Statistics (missing value analysis algorithms)
References (missing value analysis algorithms)
Mean (missing value analysis algorithms)
Standard Deviation (missing value analysis algorithms)
Extreme Low (missing value analysis algorithms)
Extreme High (missing value analysis algorithms)


Mean (missing value analysis algorithms)

mean,mean,mean
missing value analysis algorithms,missing value analysis algorithms,missing value analysis algorithms
x=[xj]=[Σixij/nj; iI(j)]

Related Topics

Univariate Statistics (missing value analysis algorithms)
Standard Deviation (missing value analysis algorithms)
Extreme Low (missing value analysis algorithms)
Extreme High (missing value analysis algorithms)


Standard Deviation (missing value analysis algorithms)

standard deviation,standard deviation,standard deviation
missing value analysis algorithms,missing value analysis algorithms,missing value analysis algorithms
^
σ
=[
^
σ
j]=[(Σi(xij−xj)2/(nj−1))1/2;   iI(j)]

Related Topics

Univariate Statistics (missing value analysis algorithms)
Mean (missing value analysis algorithms)
Extreme Low (missing value analysis algorithms)
Extreme High (missing value analysis algorithms)


Extreme Low (missing value analysis algorithms)

extreme low,extreme low,extreme low
missing value analysis algorithms,missing value analysis algorithms,missing value analysis algorithms
NL =[nlj]=[ number of xij values <low_limitj]

Related Topics

Univariate Statistics (missing value analysis algorithms)
Mean (missing value analysis algorithms)
Standard Deviation (missing value analysis algorithms)
Extreme High (missing value analysis algorithms)


Extreme High (missing value analysis algorithms)

extreme high,extreme high,extreme high
missing value analysis algorithms,missing value analysis algorithms,missing value analysis algorithms
NH =[nhj]=[ number of xij values >high_limitj]

where

low_limitj={
xj−2*
^
σ
j 		if v*n*log10(n)>150,000
25 th percentile of the j th varible if v*n*log10(n)≤150,000

and

high_limitj={
xj+2*
^
σ
j 		if v*n*log10(n)>150,000
75 th percentile of the j th variable if v*n*log10(n)≤150,000

Related Topics

Univariate Statistics (missing value analysis algorithms)
Mean (missing value analysis algorithms)
Standard Deviation (missing value analysis algorithms)
Extreme Low (missing value analysis algorithms)


Separate Variance T Test (missing value analysis algorithms)

missing value analysis algorithms,missing value analysis algorithms,missing value analysis algorithms
separate variance t test,separate variance t test,separate variance t test

The index k refers to quantitative variables, and index j refers to all variables.

tjk=xPjk−xk| variable j is missing (
^
σ
Pjknjk+
^
σ
k| variable j is missing nkk−njk)1/2

where xPjk and
^
σ
Pjk are defined in Pairwise Statistics (missing value analysis algorithms).

df jk=(
^
σ
Pjknjk+
^
σ
k| variable j is missing nkk−njk)2(
^
σ
Pjk)2njk−1+(
^
σ
k| variable j is missing )2nkk−njk−1p( 2-tail )jk=1−2*|0.5− tcdf (tjk, df jk)|

where “tcdf” is the t cumulative distribution function

Related Topics

MVA Algorithms
Notation (missing value analysis algorithms)
Univariate Statistics (missing value analysis algorithms)
Listwise Statistics (missing value analysis algorithms)
Pairwise Statistics (missing value analysis algorithms)
Regression Estimated Statistics (missing value analysis algorithms)
EM Estimated Statistics (missing value analysis algorithms)
References (missing value analysis algorithms)


Listwise Statistics (missing value analysis algorithms)

missing value analysis algorithms,missing value analysis algorithms,missing value analysis algorithms
listwise statistics,listwise statistics,listwise statistics

The indices j and k refer to quantitative variables.

Related Topics

MVA Algorithms
Notation (missing value analysis algorithms)
Univariate Statistics (missing value analysis algorithms)
Separate Variance T Test (missing value analysis algorithms)
Pairwise Statistics (missing value analysis algorithms)
Regression Estimated Statistics (missing value analysis algorithms)
EM Estimated Statistics (missing value analysis algorithms)
References (missing value analysis algorithms)
Mean (missing value analysis algorithms)
Covariance (missing value analysis algorithms)
Correlation (missing value analysis algorithms)


Mean (missing value analysis algorithms)

mean,mean,mean
missing value analysis algorithms,missing value analysis algorithms,missing value analysis algorithms
xL=[xLj]=[Σixij/nc; iI(J)]

Related Topics

Listwise Statistics (missing value analysis algorithms)
Covariance (missing value analysis algorithms)
Correlation (missing value analysis algorithms)


Covariance (missing value analysis algorithms)

covariance,covariance,covariance
missing value analysis algorithms,missing value analysis algorithms,missing value analysis algorithms
CL=[cLjk]=[Σi(xij−xLj)*(xik−xLk)/(nc−1);   iI(J)]

Related Topics

Listwise Statistics (missing value analysis algorithms)
Mean (missing value analysis algorithms)
Correlation (missing value analysis algorithms)


Correlation (missing value analysis algorithms)

correlations,correlations,correlations
missing value analysis algorithms,missing value analysis algorithms,missing value analysis algorithms
RL=[rLjk]=[cLjk/(cLjj*cLkk)1/2]

Related Topics

Listwise Statistics (missing value analysis algorithms)
Mean (missing value analysis algorithms)
Covariance (missing value analysis algorithms)


Pairwise Statistics (missing value analysis algorithms)

missing value analysis algorithms,missing value analysis algorithms,missing value analysis algorithms
pairwise statistics,pairwise statistics,pairwise statistics

The indices j and k refer to quantitative variables, and l refers to all variables.

Related Topics

MVA Algorithms
Notation (missing value analysis algorithms)
Univariate Statistics (missing value analysis algorithms)
Separate Variance T Test (missing value analysis algorithms)
Listwise Statistics (missing value analysis algorithms)
Regression Estimated Statistics (missing value analysis algorithms)
EM Estimated Statistics (missing value analysis algorithms)
References (missing value analysis algorithms)
Mean (missing value analysis algorithms)
Standard Deviation (missing value analysis algorithms)
Covariance (missing value analysis algorithms)
Correlation (missing value analysis algorithms)


Mean (missing value analysis algorithms)

mean,mean,mean
missing value analysis algorithms,missing value analysis algorithms,missing value analysis algorithms
XP=[xPlk]=[Σixik/nlk; iI(l,k)]

Related Topics

Pairwise Statistics (missing value analysis algorithms)
Standard Deviation (missing value analysis algorithms)
Covariance (missing value analysis algorithms)
Correlation (missing value analysis algorithms)


Standard Deviation (missing value analysis algorithms)

standard deviation,standard deviation,standard deviation
missing value analysis algorithms,missing value analysis algorithms,missing value analysis algorithms
^
σ
P=[
^
σ
Plk]=[(Σi(xik−xPlk)2/(nlk−1))1/2;   iI(l,k)]

Related Topics

Pairwise Statistics (missing value analysis algorithms)
Mean (missing value analysis algorithms)
Covariance (missing value analysis algorithms)
Correlation (missing value analysis algorithms)


Covariance (missing value analysis algorithms)

covariance,covariance,covariance
missing value analysis algorithms,missing value analysis algorithms,missing value analysis algorithms
CP=[cPjk]=[Σi(xik−xPjk)*(xij−xPkj)/(njk−1);   iI(j,k)]

Related Topics

Pairwise Statistics (missing value analysis algorithms)
Mean (missing value analysis algorithms)
Standard Deviation (missing value analysis algorithms)
Correlation (missing value analysis algorithms)


Correlation (missing value analysis algorithms)

correlations,correlations,correlations
missing value analysis algorithms,missing value analysis algorithms,missing value analysis algorithms
RP=[rPjk]=[cPjk/(
^
σ
Pjk*
^
σ
Pkj)]

Related Topics

Pairwise Statistics (missing value analysis algorithms)
Mean (missing value analysis algorithms)
Standard Deviation (missing value analysis algorithms)
Covariance (missing value analysis algorithms)


Regression Estimated Statistics (missing value analysis algorithms)

missing value analysis algorithms,missing value analysis algorithms,missing value analysis algorithms
regression estimated statistics,regression estimated statistics,regression estimated statistics

The indices j and k refer to quantitative variables, and l refers to predictor variables.

Related Topics

MVA Algorithms
Notation (missing value analysis algorithms)
Univariate Statistics (missing value analysis algorithms)
Separate Variance T Test (missing value analysis algorithms)
Listwise Statistics (missing value analysis algorithms)
Pairwise Statistics (missing value analysis algorithms)
EM Estimated Statistics (missing value analysis algorithms)
References (missing value analysis algorithms)
Estimates of Missing Values (missing value analysis algorithms)
Mean (missing value analysis algorithms)
Covariance (missing value analysis algorithms)
Correlation (missing value analysis algorithms)


Estimates of Missing Values (missing value analysis algorithms)

missing value estimates,missing value estimates,missing value estimates
missing value analysis algorithms,missing value analysis algorithms,missing value analysis algorithms
xRij={
xij | if xij is not missing
regression estimated xij | if xij is missing

where the regression estimated xij is

xRij=β0,ij+Σlβl,ij*xil+εijlJ1=J(l:xil not missing and l≠j)

where:

[β0,ij,βl,ij] is computed from Diag (XP)=[xPjj] and by pivoting on the “best” “q” of the J1 diagonals of CP.

“best” is forward stepwise selected.

“q” is less than or equal to the user-specified maximum number of predictors; it may also be limited by the user-specified F-to-enter limit.

“εij” is the optional random error term, as specified:

1. residual of a randomly selected complete case

2. random normal deviate, scaled by the standard error of estimate

3. random t(df) deviate, scaled by the standard error of estimate, df is specified by the user

4. no error term adjustment

Note that for each missing value xij, a unique set of regression coefficients (β0,ij,βl,ij) and error terms εij is computed.

Related Topics

Regression Estimated Statistics (missing value analysis algorithms)
Mean (missing value analysis algorithms)
Covariance (missing value analysis algorithms)
Correlation (missing value analysis algorithms)


Mean (missing value analysis algorithms)

mean,mean,mean
missing value analysis algorithms,missing value analysis algorithms,missing value analysis algorithms
xR=[xRj]=[ΣixRij/n;     iI]

Related Topics

Regression Estimated Statistics (missing value analysis algorithms)
Estimates of Missing Values (missing value analysis algorithms)
Covariance (missing value analysis algorithms)
Correlation (missing value analysis algorithms)


Covariance (missing value analysis algorithms)

covariance,covariance,covariance
missing value analysis algorithms,missing value analysis algorithms,missing value analysis algorithms
CR=[cRjk]=[Σi(xRij−xRj)*(xRik−xRk)/(n−1);     iI]

Related Topics

Regression Estimated Statistics (missing value analysis algorithms)
Estimates of Missing Values (missing value analysis algorithms)
Mean (missing value analysis algorithms)
Correlation (missing value analysis algorithms)


Correlation (missing value analysis algorithms)

correlations,correlations,correlations
missing value analysis algorithms,missing value analysis algorithms,missing value analysis algorithms
RR=[rRjk]=[cRjk/(cRjj*cRkk)1/2]

Related Topics

Regression Estimated Statistics (missing value analysis algorithms)
Estimates of Missing Values (missing value analysis algorithms)
Mean (missing value analysis algorithms)
Covariance (missing value analysis algorithms)


EM Estimated Statistics (missing value analysis algorithms)

missing value analysis algorithms,missing value analysis algorithms,missing value analysis algorithms
EM estimated statistics,EM estimated statistics,EM estimated statistics

The indices j and k refer to quantitative variables, and l refers to predictor variables.

Related Topics

MVA Algorithms
Notation (missing value analysis algorithms)
Univariate Statistics (missing value analysis algorithms)
Separate Variance T Test (missing value analysis algorithms)
Listwise Statistics (missing value analysis algorithms)
Pairwise Statistics (missing value analysis algorithms)
Regression Estimated Statistics (missing value analysis algorithms)
References (missing value analysis algorithms)
Estimates of Missing Values, Mean Vector, and Covariance Matrix (missing value analysis algorithms)
Convergence (missing value analysis algorithms)
Filled-In Data (missing value analysis algorithms)
Mean (missing value analysis algorithms)
Covariance (missing value analysis algorithms)
Correlation (missing value analysis algorithms)
Little's MCAR Test (missing value analysis algorithms)


Estimates of Missing Values, Mean Vector, and Covariance Matrix (missing value analysis algorithms)

x0=[x0j]= Diag (XP)=[xPjj]
C0=[c0jk]=CP=[cPjk]

For m=1 to M, or until convergence is attained:

If xij is not missing then xmij=xij.

If xij is missing then it is estimated in the mth iteration as:

xmij=βm−10,ij+Σlβm−1l,ij*xil;lJ2=J(l:xil is not missing and l≠j)

where [βm−10,ij,βm−1l,ij] is computed from xm−1 and Cm−1.

xm=[xmj]=[Σiwi*xmij/Σiwi;iI]
Cm=[cmjk]=[Σiwi*xmij(xmij−xmj)*(xmik−xmk)+ΣiΣscm−1j,s|J2(n−1)*Σiwi/n; iJ2, sJ2, and s≠j]

where cm−1j,s|J2 is the jth row, sth element of the J2 pivoted Cm−1.

Note that some sources (Little & Rubin, 1987, for example) simply use n as the denominator of the formula for Cm, which produces full maximum likelihood (ML) estimates. The formula used by MVA produces restricted maximum likelihood (REML) estimates, which are n/(n−1) times the ML estimates.

wi={
1 for multivariate normal
1−α+α*λ1+p/2*exp((1−λ)*D2/2)1−α+α*λp/2*exp((1−λ)*D2/2)
for contaminated normal
( df +p)/( df +D2)
for t (df)
α= proportion of contamination
λ= ratio of standard deviations
p= number of predictors = number of indices in J2
D2 = Mahalanobis distance square of the current case from the mean
=Σjk(xmij−xmj)*(cmjk)−1*(xmik−xmk)

where (cmjk)−1 is the jkth element of C−1m.

Related Topics

EM Estimated Statistics (missing value analysis algorithms)
Convergence (missing value analysis algorithms)
Filled-In Data (missing value analysis algorithms)
Mean (missing value analysis algorithms)
Covariance (missing value analysis algorithms)
Correlation (missing value analysis algorithms)
Little's MCAR Test (missing value analysis algorithms)


Convergence (missing value analysis algorithms)

The algorithm is declared to have converged if, for all j,

|cmjj−cm−1jj|/cmjj≤ CONVERGENCE

Related Topics

EM Estimated Statistics (missing value analysis algorithms)
Estimates of Missing Values, Mean Vector, and Covariance Matrix (missing value analysis algorithms)
Filled-In Data (missing value analysis algorithms)
Mean (missing value analysis algorithms)
Covariance (missing value analysis algorithms)
Correlation (missing value analysis algorithms)
Little's MCAR Test (missing value analysis algorithms)


Filled-In Data (missing value analysis algorithms)

XEi=[xEij]=[xm´ij]

where m´ is the last value of m.

Related Topics

EM Estimated Statistics (missing value analysis algorithms)
Estimates of Missing Values, Mean Vector, and Covariance Matrix (missing value analysis algorithms)
Convergence (missing value analysis algorithms)
Mean (missing value analysis algorithms)
Covariance (missing value analysis algorithms)
Correlation (missing value analysis algorithms)
Little's MCAR Test (missing value analysis algorithms)


Mean (missing value analysis algorithms)

mean,mean,mean
missing value analysis algorithms,missing value analysis algorithms,missing value analysis algorithms
xE=[xEj]=xm´=[xm´j]

Related Topics

EM Estimated Statistics (missing value analysis algorithms)
Estimates of Missing Values, Mean Vector, and Covariance Matrix (missing value analysis algorithms)
Convergence (missing value analysis algorithms)
Filled-In Data (missing value analysis algorithms)
Covariance (missing value analysis algorithms)
Correlation (missing value analysis algorithms)
Little's MCAR Test (missing value analysis algorithms)


Covariance (missing value analysis algorithms)

covariance,covariance,covariance
missing value analysis algorithms,missing value analysis algorithms,missing value analysis algorithms
CE=[cEjk]=Cm´=[cm´jk]

Related Topics

EM Estimated Statistics (missing value analysis algorithms)
Estimates of Missing Values, Mean Vector, and Covariance Matrix (missing value analysis algorithms)
Convergence (missing value analysis algorithms)
Filled-In Data (missing value analysis algorithms)
Mean (missing value analysis algorithms)
Correlation (missing value analysis algorithms)
Little's MCAR Test (missing value analysis algorithms)


Correlation (missing value analysis algorithms)

correlations,correlations,correlations
missing value analysis algorithms,missing value analysis algorithms,missing value analysis algorithms
RE=[rEjk]=[cEjk/(cEjj*cEkk)1/2]

Related Topics

EM Estimated Statistics (missing value analysis algorithms)
Estimates of Missing Values, Mean Vector, and Covariance Matrix (missing value analysis algorithms)
Convergence (missing value analysis algorithms)
Filled-In Data (missing value analysis algorithms)
Mean (missing value analysis algorithms)
Covariance (missing value analysis algorithms)
Little's MCAR Test (missing value analysis algorithms)


Little's MCAR Test (missing value analysis algorithms)

Little's MCAR test,Little's MCAR test,Little's MCAR test
missing value analysis algorithms,missing value analysis algorithms,missing value analysis algorithms
χ 2 MCAR =
Σ
each unique pattern
( no. of cases in pattern )*( MD )
DF MCAR =
Σ
each unique pattern
( no . of nonmissing variables )−v

where

MD = Mahalanobis D2 of pattern mean from xE

Related Topics

EM Estimated Statistics (missing value analysis algorithms)
Estimates of Missing Values, Mean Vector, and Covariance Matrix (missing value analysis algorithms)
Convergence (missing value analysis algorithms)
Filled-In Data (missing value analysis algorithms)
Mean (missing value analysis algorithms)
Covariance (missing value analysis algorithms)
Correlation (missing value analysis algorithms)


References (missing value analysis algorithms)

missing value analysis algorithms,missing value analysis algorithms,missing value analysis algorithms
references,references,references

Dempster, A. P., N. M. Laird, and D. B. Rubin. 1977. Maximum likelihood from incomplete data via the EM algorithm. Journal of the Royal Statistical Society, B, 39, 1-38.

Dixon, W. J. 1983. BMDP statistical software. Berkeley: University of California Press.

Little, R. J. A. 1988. A test of missing completely at random for multivariate data with missing values. Journal of the American Statistical Association, 83, 1198-1202.

Little, R. J. A., and D. B. Rubin. 1987. Statistical analysis with missing data. New York: John Wiley & Sons, Inc. .

Louise, T. A. 1982. Finding the observed information matrix when using the EM algorithm. Journal of the Royal Statistical Society, B, 44:2, 226-233.

Orchard, T., and M. A. Woodbury. 1972. . In: Missing information principal: Theory and applications. Berkeley: University of California Press.

Rubin, R. B. 1987. Multiple Imputation for Nonresponse in Surveys. New York: John Wiley and Sons, Inc..

Related Topics

MVA Algorithms
Notation (missing value analysis algorithms)
Univariate Statistics (missing value analysis algorithms)
Separate Variance T Test (missing value analysis algorithms)
Listwise Statistics (missing value analysis algorithms)
Pairwise Statistics (missing value analysis algorithms)
Regression Estimated Statistics (missing value analysis algorithms)
EM Estimated Statistics (missing value analysis algorithms)


NAIVE BAYES Algorithms

NAIVEBAYES (command),NAIVEBAYES (command),NAIVEBAYES (command)
algorithms,algorithms,algorithms
Naive Bayes,Naive Bayes,Naive Bayes
algorithms,algorithms,algorithms
Naive Bayes algorithms,Naive Bayes algorithms,Naive Bayes algorithms

The Naive Bayes model is an old method for classification and predictor selection that is enjoying a renaissance because of its simplicity and stability.

Related Topics

Notation (Naive Bayes algorithms)
Naive Bayes Model
Missing Values (Naive Bayes algorithms)
Continuous Variables (Naive Bayes algorithms)
Feature Selection (Naive Bayes algorithms)
Classification (Naive Bayes algorithms)
References (Naive Bayes algorithms)


Notation (Naive Bayes algorithms)

Naive Bayes algorithms,Naive Bayes algorithms,Naive Bayes algorithms
notation,notation,notation

The following notation is used throughout this chapter unless otherwise stated:

J0 | Total number of predictors.
X | Categorical predictor vector X' = ( X1, ..., XJ ), where J is the number of predictors considered.
Mj | Number of categories for predictor Xj.
Y | Categorical target variable.
K | Number of categories of Y.
N | Total number of cases or patterns in the training data.
Nk | The number of cases with Y= k in the training data.
Njmk | The number of cases with Y= k and Xj=m in the training data.
pk | The probability for Y= k.
pjmk | The probability of Xj=m given Y= k.

Related Topics

NAIVE BAYES Algorithms
Naive Bayes Model
Missing Values (Naive Bayes algorithms)
Continuous Variables (Naive Bayes algorithms)
Feature Selection (Naive Bayes algorithms)
Classification (Naive Bayes algorithms)
References (Naive Bayes algorithms)


Naive Bayes Model

Naive Bayes algorithms,Naive Bayes algorithms,Naive Bayes algorithms
model,model,model

The Naive Bayes model is based on the conditional independence model of each predictor given the target class. The Bayesian principle is to assign a case to the class that has the largest posterior probability. By Bayes’ theorem, the posterior probability of Y given X is:

P(Y=k|X=x)=P(X=x|Y=k)P(Y=k)KΣi=1P(X=x|Y=i)P(Y=i)

Let X1, ..., XJ be the J predictors considered in the model. The Naive Bayes model assumes that X1, ..., XJ are conditionally independent given the target; that is:

P(X=x|Y=k)=JΠj=1P(Xj=xj|Y=k)

These probabilities are estimated from training data by the following equations:

πk=P(Y=k)=Nk+λN+Kλ

pjmk=P(Xj=m|Y=k)=Njmk+fΣMjl=1Njlk+Mjf

Where Nk is calculated based on all non-missing Y, Njmk is based on all non-missing pairs of XJ and Y, and the factors l and f are introduced to overcome problems caused by zero or very small cell counts. These estimates correspond to Bayesian estimation of the multinomial probabilities with Dirichlet priors. Empirical studies suggest λ=f=1N(Kohavi, Becker, and Sommerfield, 1997).

A single data pass is needed to collect all the involved counts.

For the special situation in which J = 0; that is, there is no predictor at all, P(Y=k|X=x)=P(Y=k). When there are empty categories in the target variable or categorical predictors, these empty categories should be removed from the calculations.

Related Topics

NAIVE BAYES Algorithms
Notation (Naive Bayes algorithms)
Missing Values (Naive Bayes algorithms)
Continuous Variables (Naive Bayes algorithms)
Feature Selection (Naive Bayes algorithms)
Classification (Naive Bayes algorithms)
References (Naive Bayes algorithms)


Preprocessing (Naive Bayes algorithms)

The following steps are performed before building the Naive Bayes model.


Missing Values (Naive Bayes algorithms)

Naive Bayes algorithms,Naive Bayes algorithms,Naive Bayes algorithms
missing values,missing values,missing values

A predictor is ignored if every value is missing or if it has only one observed category. A case is ignored if the value of the target variable or the values of all predictors are missing. For each case missing some, but not all, of the values of the predictors, only the predictors with nonmissing values are used to predict the case, as suggested in (Kohavi et al., 1997).

This implies the following equation:

P(X=xi|Y=yi)=
∏
{j: xji not missing }
P(Xj=xji|Y=yi)

This also implies the following equation for B(J) in average log-likelihood calculations:

B(J)=−1NNΣi=1log(KΣk=1πk
∏
{j: xji not missing }
pjxjik)

Where the log() term for case i is ignored if all the values of the predictors considered in the model are missing. See the topic Average Log-likelihood (Naive Bayes algorithms) for more information.

Related Topics

NAIVE BAYES Algorithms
Notation (Naive Bayes algorithms)
Naive Bayes Model
Continuous Variables (Naive Bayes algorithms)
Feature Selection (Naive Bayes algorithms)
Classification (Naive Bayes algorithms)
References (Naive Bayes algorithms)


Continuous Variables (Naive Bayes algorithms)

Naive Bayes algorithms,Naive Bayes algorithms,Naive Bayes algorithms
discretizing continuous variables,discretizing continuous variables,discretizing continuous variables

The Naive Bayes model assumes that the target and predictor variables are categorical. If there are continuous variables, they need to be discretized. There are many ways to discretize a continuous variable; the simplest is to divide the domain of a variable into equal width bins. This method performs well with the Naive Bayes model while no obvious improvement is found when complex methods are used (Hsu, Huang, and Wong, 2000).

Sometimes the equal width binning method may produce empty bins. In this case, empty bins are eliminated by changing bin boundary points. Let b1 < b2 < ... bn be the bin boundary points produced by the equal width binning method. The two end bins (-∞, b1] and (bn, ∞) are non-empty by design. Suppose that bin (bi, bi+1] is empty, and suppose that the closest left non-empty bin has right boundary point bj (< bi) and the closest right non-empty bin has left boundary point bk (> bi). Then empty bins are eliminated by deleting all boundary points from bj to bk, and setting a new boundary point at (bj+bk)/2.

Related Topics

NAIVE BAYES Algorithms
Notation (Naive Bayes algorithms)
Naive Bayes Model
Missing Values (Naive Bayes algorithms)
Feature Selection (Naive Bayes algorithms)
Classification (Naive Bayes algorithms)
References (Naive Bayes algorithms)


Feature Selection (Naive Bayes algorithms)

Naive Bayes algorithms,Naive Bayes algorithms,Naive Bayes algorithms
feature selection,feature selection,feature selection

Given a total of J0 predictors, the goal of feature selection is to choose a subset of J predictors using the Naive Bayes model (Natarajan and Pednault, 2001). This process has the following steps:

• Collect the necessary summary statistics to estimate all possible model parameters.

• Create a sequence of candidate predictor subsets that has an increasing number of predictors; that is, each successive subset is equal to the previous subset plus one more predictor.

• From this sequence, find the "best" subset.

Related Topics

NAIVE BAYES Algorithms
Notation (Naive Bayes algorithms)
Naive Bayes Model
Missing Values (Naive Bayes algorithms)
Continuous Variables (Naive Bayes algorithms)
Classification (Naive Bayes algorithms)
References (Naive Bayes algorithms)
Collect Summary Statistics (Naive Bayes algorithms)
Create the Sequence of Subsets (Naive Bayes algorithms)
Find the “Best” Subset (Naive Bayes algorithms)
Average Log-likelihood (Naive Bayes algorithms)


Collect Summary Statistics (Naive Bayes algorithms)

One pass through the training data is required to collect the total number of cases, the number of cases per category of the target variable, and the number of cases per category of the target variable for each category of each predictor.

Related Topics

Feature Selection (Naive Bayes algorithms)
Create the Sequence of Subsets (Naive Bayes algorithms)
Find the “Best” Subset (Naive Bayes algorithms)
Average Log-likelihood (Naive Bayes algorithms)


Create the Sequence of Subsets (Naive Bayes algorithms)

Start with an initial subset of predictors considered vital to the model, which can be empty. For each predictor not in the subset, a Naive Bayes model is fit with the predictor plus the predictors in the subset. The predictor that gives the largest average log-likelihood is added to create the next larger subset. This continues until the model includes the user-specified:

• Exact number of predictors

or

• Maximum number of predictors

Alternatively, the maximum number of predictors, J Max , may be automatically chosen by the following equation:

J Max =min{J Must +min{100,max(20,J05)},J0}

where J Must is the number of predictors in the initial subset.

Related Topics

Feature Selection (Naive Bayes algorithms)
Collect Summary Statistics (Naive Bayes algorithms)
Find the “Best” Subset (Naive Bayes algorithms)
Average Log-likelihood (Naive Bayes algorithms)


Find the “Best” Subset (Naive Bayes algorithms)

If you specify an exact number of predictors, the final subset in the sequence is the final model. If you specify a maximum number of predictors, the "best" subset is determined by one of the following:

• A test data criterion based on the average log-likelihood of the test data.

• A pseudo-BIC criterion that uses the average log-likelihood of the training data and penalizes overly complex models using the number of predictors and number of cases. This criterion is used if there are no test data.

Smaller values of these criteria indicate "better" models. The "best" subset is the one with the smallest value of the criterion used.

Test Data Criterion

Q(J)=−l Test (J)

Where l Test (J) is the average log-likelihood for test data.

Pseudo-BIC Criterion

Q(J)=−l Train (J)+12Jlog(N)N

Where J denotes the number of predictors in the model, and −l Train (J) is the average log-likelihood for training data.

Related Topics

Feature Selection (Naive Bayes algorithms)
Collect Summary Statistics (Naive Bayes algorithms)
Create the Sequence of Subsets (Naive Bayes algorithms)
Average Log-likelihood (Naive Bayes algorithms)


Average Log-likelihood (Naive Bayes algorithms)

average log-likelihood,average log-likelihood,average log-likelihood
Naive Bayes algorithms,Naive Bayes algorithms,Naive Bayes algorithms

The average (conditional) log-likelihood for data {xi,yi}Ni=1 with J predictors is

l(J) | =1NlogL=1NNΣi=1logP(Y=yi|X=xi)
 | =1NNΣi=1logP(Y=yi)+1NNΣi=1logP(X=xi|Y=yi)
 | −1NNΣi=1log(KΣk=1P(X=xi|Y=k)P(Y=k))
 | =1NKΣk=1Nklog(πk)+1NKΣk=1JΣj=1MjΣm=1Njmklog(pjmk)−1NNΣi=1log(KΣk=1πkJ∏j=1pjxjik)

Let

A(J)=1NKΣk=1Nklog(πk)+1NKΣk=1JΣj=1MjΣm=1Njmklog(pjmk)

B(J)=−1NNΣi=1log(KΣk=1πkJ∏j=1pjxjik)

then

l(J)=A(J)+B(J)

Note: for the special situation in which J = 0; that is, there are no predictors, l(J)=1NNΣi=1logP(Y=yi) =1NKΣk=1Nklog(πk)

Calculation of average log-likelihood by sampling

When adding each predictor to the sequence of subsets, a data pass is needed to calculate B(J). When the data set is small enough to fit in the memory, this is not a problem. When the data set cannot fit in memory, this can be costly. The Naive Bayes model uses simulated data to calculate B(J). Other research has shown that this approach yields good results (Natarajan and Pednault, 2001). The formula for B(J) can be rewritten as, for a data set of m cases:

B(J)=−1mmΣi=1log(KΣk=1πkJ∏j=1pjxjik)

By default m = 1000.

Related Topics

Feature Selection (Naive Bayes algorithms)
Collect Summary Statistics (Naive Bayes algorithms)
Create the Sequence of Subsets (Naive Bayes algorithms)
Find the “Best” Subset (Naive Bayes algorithms)


Classification (Naive Bayes algorithms)

Naive Bayes algorithms,Naive Bayes algorithms,Naive Bayes algorithms
classification,classification,classification

The target category with the highest posterior probability is the predicted category for a given case.

^
y
(x)=
argmax
k
{P(Y=k|X=x)}=
argmax
k
{P(X=x|Y=k)P(Y=k)}

Ties are broken in favor of the target category with greater prior probability pk.

When cases being classified contain categories of categorical predictors that did not occur in the training data, these new categories are treated as missing.

Related Topics

NAIVE BAYES Algorithms
Notation (Naive Bayes algorithms)
Naive Bayes Model
Missing Values (Naive Bayes algorithms)
Continuous Variables (Naive Bayes algorithms)
Feature Selection (Naive Bayes algorithms)
References (Naive Bayes algorithms)
Classification Error (Naive Bayes algorithms)


Classification Error (Naive Bayes algorithms)

If there is test data, the error equals the misclassification ratio of the test data. If there is no test data, the error equals the misclassification ratio of the training data.

Related Topics

Classification (Naive Bayes algorithms)


References (Naive Bayes algorithms)

Naive Bayes algorithms,Naive Bayes algorithms,Naive Bayes algorithms
references,references,references

Bayes, T. 1763. An essay towards solving a problem in the doctrine of chances. Philosophical Transactions of the Royal Society, 53:, 370-418.

Becker, B., R. Kohavi, and D. Sommerfield. 2001. Visualizing the Simple Bayesian Classifier. In: Information Visualization in Data Mining and Knowledge Discovery, U. Fayyad, G. Grinstein, and A. Wierse, eds. San Francisco: Morgan Kaufmann Publishers.

Domingos, P., and M. J. Pazzani. 1996. Beyond Independence: conditions for the optimality of the simple Bayesian classifier. In: Machine Learning: Proceedings of the Thirteenth International Conference, L. Saitta, eds. : Morgan Kaufman.

Hsu, C., H. Huang, and T. Wong. 2000. Why Discretization Works for Naive Bayesian Classifiers. In: Proceedings of the 17th International Conference on Machine Learning. San Francisco: Morgan Kaufman.

Kohavi, R., and D. Sommerfield. 1995. Feature subset selection using the wrapper model: Overfitting and dynamic search space topology. In: The First International Conference on Knowledge Discovery and Data Mining. Menlo Park, California: AAAI Press.

Kohavi, R., B. Becker, and D. Sommerfield. 1997. Improving Simple Bayes. In: Proceedings of the European Conference on Machine Learning. : .

Natarajan, R., and E. Pednault. 2001. Using Simulated Pseudo Data to Speed Up Statistical Predictive Modeling from Massive Data Sets. In: SIAM First International Conference on Data Mining. : .

Related Topics

NAIVE BAYES Algorithms
Notation (Naive Bayes algorithms)
Naive Bayes Model
Missing Values (Naive Bayes algorithms)
Continuous Variables (Naive Bayes algorithms)
Feature Selection (Naive Bayes algorithms)
Classification (Naive Bayes algorithms)


NLR Algorithms

NLR (command),NLR (command),NLR (command)
algorithms,algorithms,algorithms
Nonlinear Regression,Nonlinear Regression,Nonlinear Regression
algorithms,algorithms,algorithms
nonlinear regression algorithms,nonlinear regression algorithms,nonlinear regression algorithms

NLR produces the least square estimates of the parameters for models that are not linear in their parameters. Unlike in other procedures, the weight function is not treated as a case replicate in NLR.

Related Topics

Model (nonlinear regression algorithms)
Goal (nonlinear regression algorithms)
Estimation (nonlinear regression algorithms)
Statistics (nonlinear regression algorithms)
References (nonlinear regression algorithms)


Model (nonlinear regression algorithms)

nonlinear regression algorithms,nonlinear regression algorithms,nonlinear regression algorithms
model,model,model

Consider the model

f=f(x,Θ)

where Θ is a p×1 parameter vector, x is an independent variable vector, and f is a function of x and Θ.

Related Topics

NLR Algorithms
Goal (nonlinear regression algorithms)
Estimation (nonlinear regression algorithms)
Statistics (nonlinear regression algorithms)
References (nonlinear regression algorithms)


Goal (nonlinear regression algorithms)

Find the least square estimate Θ* of Θ such that Θ* minimizes the objective function

F(Θ)=R´WR

where

R´=(R1, ..., Rn)
Ri=yi−fi
fi=f(xi,Θ*),
i=1, ..., n
W= Diag (W1, ..., Wn)

and n is the number of cases. For case i, yi is the observed dependent variable, xi is the vector of observed independent variables, Wi is the weight function which can be a function of Θ.

The gradient of F at Θ is defined as

F=2J´·jWR

where J·j is the jth column of the n×p Jacobian matrix J whose (i,j)th element is defined by

Jij=Ri2Wi∂ Wi∂ Θj−∂ fi∂ Θj

Related Topics

NLR Algorithms
Model (nonlinear regression algorithms)
Estimation (nonlinear regression algorithms)
Statistics (nonlinear regression algorithms)
References (nonlinear regression algorithms)


Estimation (nonlinear regression algorithms)

nonlinear regression algorithms,nonlinear regression algorithms,nonlinear regression algorithms
estimation,estimation,estimation

The modified Levenberg-Marquardt algorithm (Moré, 1977) that is contained in MINPACK is used in NLR to solve the objective function.

Given an initial value Θ(0) for Θ, the algorithm is as follows:

At stage k+1, k=0, 1, 2, ...

Compute

f(k)i=fi(Θ(F)), R(k)i=yi−f(k)i, Fk=F(Θ(k)) and J(k)=J(Θ(k))

Choose an appropriate non-negative scalar such that

F(Θ(k)+hk)<Fk

where

hk=−(J(k)´J(k)+αkI)−1J(k)´R(k)

Set

Θ(k+1)=Θ(k)+hk

and compute J(k+1), R(k+1), W(k+1), and Fk+1

Check the following conditions:

1. 1−(Fk−1/Fk)<ε1(SSCON)

2. For every element of hk

|hki/Θ(k)i|<ε2(PCON)

3. k+1≥ITER (maximum number of iterations)

4. For every parameter Θj, the gradient of F at Θj, Fj, is evaluated at Θ(k+1) by checking

|r(k+1)j|<ε2(RCON)

where r(k+1)j is the correlation between the jth column J(k+1)j of J(k+1) and W(k+1)R(k+1).

If any of these four conditions is satisfied, the algorithm will stop. Then the final parameter estimate Θ*

Θ*=Θ(k+1)

and the termination reason is reported. Otherwise, iteration continues.

Related Topics

NLR Algorithms
Model (nonlinear regression algorithms)
Goal (nonlinear regression algorithms)
Statistics (nonlinear regression algorithms)
References (nonlinear regression algorithms)


Statistics (nonlinear regression algorithms)

nonlinear regression algorithms,nonlinear regression algorithms,nonlinear regression algorithms
output statistics,output statistics,output statistics

When the estimation algorithm terminates, the following statistics are printed.

Related Topics

NLR Algorithms
Model (nonlinear regression algorithms)
Goal (nonlinear regression algorithms)
Estimation (nonlinear regression algorithms)
References (nonlinear regression algorithms)


Parameter Estimates and Standard Errors (nonlinear regression algorithms)

The asymptotic standard error of Θ*j is estimated by the square root of the jth diagonal element ajj of A, where

A=F(Θ*)n−p(J*W*J*)−1

and J* and W* are the Jacobian matrix J and weight function W evaluated at Θ*, respectively.

Related Topics

Asymptotic 95% Confidence Interval for Parameter Values (nonlinear regression algorithms)
Asymptotic Correlation Matrix of the Parameter Estimates (nonlinear regression algorithms)
Analysis of Variance Table (nonlinear regression algorithms)


Asymptotic 95% Confidence Interval for Parameter Values (nonlinear regression algorithms)

Θ*j±t(0.975, n−p)aii

Related Topics

Parameter Estimates and Standard Errors (nonlinear regression algorithms)
Asymptotic Correlation Matrix of the Parameter Estimates (nonlinear regression algorithms)
Analysis of Variance Table (nonlinear regression algorithms)


Asymptotic Correlation Matrix of the Parameter Estimates (nonlinear regression algorithms)

C=D−1/2AD−1/2

where

D= Diag (a11, ..., app)

and aii is the ith diagonal element of A.

Related Topics

Parameter Estimates and Standard Errors (nonlinear regression algorithms)
Asymptotic 95% Confidence Interval for Parameter Values (nonlinear regression algorithms)
Analysis of Variance Table (nonlinear regression algorithms)


Analysis of Variance Table (nonlinear regression algorithms)

Source | df | Sum of Squares
Residual | n−p | F(Θ*)
Regression | p | SS uncorrected −F(Θ*)
Uncorrected Total | n | SS uncorrected
Corrected Total | n−1 | SS uncorrected −y2nΣi=1Wi(Θ*)

where

SS uncorrected =nΣi=1Wi(Θ*) y2i
y=(nΣi=1Wi(Θ*) yi)/(nΣi=1Wi(Θ*))

Related Topics

Parameter Estimates and Standard Errors (nonlinear regression algorithms)
Asymptotic 95% Confidence Interval for Parameter Values (nonlinear regression algorithms)
Asymptotic Correlation Matrix of the Parameter Estimates (nonlinear regression algorithms)


References (nonlinear regression algorithms)

nonlinear regression algorithms,nonlinear regression algorithms,nonlinear regression algorithms
references,references,references

Moré, J. J. 1977. The Levenberg-Marquardt algorithm: implementation and theory in numerical analysis. In: Lecture Notes in Mathematics , G. A. Watson, eds. Berlin: Springer-Verlag.

Related Topics

NLR Algorithms
Model (nonlinear regression algorithms)
Goal (nonlinear regression algorithms)
Estimation (nonlinear regression algorithms)
Statistics (nonlinear regression algorithms)


NOMREG Algorithms

NOMREG (command),NOMREG (command),NOMREG (command)
algorithms,algorithms,algorithms
Multinomial Logistic Regression,Multinomial Logistic Regression,Multinomial Logistic Regression
algorithms,algorithms,algorithms
multinomial logistic regression algorithms,multinomial logistic regression algorithms,multinomial logistic regression algorithms

The purpose of the Multinomial Logistic Regression procedure is to model the dependence of a nominal categorical response on a set of discrete and/or continuous predictor variables.

Related Topics

Notation (multinomial logistic regression algorithms)
Data Aggregation (multinomial logistic regression algorithms)
Data Assumptions (multinomial logistic regression algorithms)
Model (multinomial logistic regression algorithms)
Log-likelihood (multinomial logistic regression algorithms)
Parameter Estimation (multinomial logistic regression algorithms)
Stepwise Variable Selection (multinomial logistic regression algorithms)
Statistics (multinomial logistic regression algorithms)
Linear Hypothesis Testing (multinomial logistic regression algorithms)
Classification Table (multinomial logistic regression algorithms)
Checking for Separation (multinomial logistic regression algorithms)
References (multinomial logistic regression algorithms)


Notation (multinomial logistic regression algorithms)

multinomial logistic regression algorithms,multinomial logistic regression algorithms,multinomial logistic regression algorithms
notation,notation,notation

The following notation is used throughout this chapter unless otherwise stated:

Y

The response variable, which takes integer values from 1 to J.

J

The number of categories of the nominal response.

m

The number of subpopulations.

XA

m×pA matrix with vector-element xAi, the observed values at the ith subpopulation, determined by the independent variables specified in the command.

X

m×p matrix with vector-element xi, the observed values of the location model’s independent variables at the ith subpopulation.

fijs

The frequency weight for the sth observation which belongs to the cell corresponding to Y=j at subpopulation i.

nij

The sum of frequency weights of the observations that belong to the cell corresponding to Y=j at subpopulation i.

N

The sum of all nij’s.

πij

The cell probability corresponding to Y=j at subpopulation i.

log(πij/πik)

The logit of response category j to response category k.

βj=(βj1,...,βjp)´

p×1 vector of unknown parameters in the j-th logit (i.e., logit of response category j to response category J).

p

Number of parameters in each logit. p≥1.

pnrj

Number of non-redundant parameters in logit j after maximum likelihood estimation. p≥pnrj≥0.

pnr

The total number of non-redundant parameters after maximum likelihood estimation. pnr=ΣJ−1j=1pnrj.

B=(β´1,...,β´J−1) '

(J−1)p×1 vector of unknown parameters in the model.

^
B
=(
^
β
´1,...,
^
β
´J−1)´

The maximum likelihood estimate of B.

^
π
ij

The maximum likelihood estimate of πij

Related Topics

NOMREG Algorithms
Data Aggregation (multinomial logistic regression algorithms)
Data Assumptions (multinomial logistic regression algorithms)
Model (multinomial logistic regression algorithms)
Log-likelihood (multinomial logistic regression algorithms)
Parameter Estimation (multinomial logistic regression algorithms)
Stepwise Variable Selection (multinomial logistic regression algorithms)
Statistics (multinomial logistic regression algorithms)
Linear Hypothesis Testing (multinomial logistic regression algorithms)
Classification Table (multinomial logistic regression algorithms)
Checking for Separation (multinomial logistic regression algorithms)
References (multinomial logistic regression algorithms)


Data Aggregation (multinomial logistic regression algorithms)

multinomial logistic regression algorithms,multinomial logistic regression algorithms,multinomial logistic regression algorithms
data aggregation,data aggregation,data aggregation

Observations with negative or missing frequency weights are discarded. Observations are aggregated by the definition of subpopulations. Subpopulations are defined by the cross-classifications of either the set of independent variables specified in the command or the set of independent variables specified in the SUBPOP subcommand.

Let ni be the marginal count of subpopulation i,

ni=JΣj=1nij

If there is no observation for the cell of Y=j at subpopulation i, it is assumed that nij=0, provided that ni≠0. A non-negative scalar δc[0,1) may be added to any zero cell (i.e., cell with nij=0) if its marginal count ni is nonzero. The value of δ is zero by default.

Related Topics

NOMREG Algorithms
Notation (multinomial logistic regression algorithms)
Data Assumptions (multinomial logistic regression algorithms)
Model (multinomial logistic regression algorithms)
Log-likelihood (multinomial logistic regression algorithms)
Parameter Estimation (multinomial logistic regression algorithms)
Stepwise Variable Selection (multinomial logistic regression algorithms)
Statistics (multinomial logistic regression algorithms)
Linear Hypothesis Testing (multinomial logistic regression algorithms)
Classification Table (multinomial logistic regression algorithms)
Checking for Separation (multinomial logistic regression algorithms)
References (multinomial logistic regression algorithms)


Data Assumptions (multinomial logistic regression algorithms)

multinomial logistic regression algorithms,multinomial logistic regression algorithms,multinomial logistic regression algorithms
data assumptions,data assumptions,data assumptions

Let (ni1,...,niJ) T be the J×1 vector of counts for the categories of Y at subpopulation. It is assumed that each (ni1,...,niJ) T is independently multinomial distributed with probability vector (πi1,...,πiJ) T of dimension J×1 and fixed total ni.

Related Topics

NOMREG Algorithms
Notation (multinomial logistic regression algorithms)
Data Aggregation (multinomial logistic regression algorithms)
Model (multinomial logistic regression algorithms)
Log-likelihood (multinomial logistic regression algorithms)
Parameter Estimation (multinomial logistic regression algorithms)
Stepwise Variable Selection (multinomial logistic regression algorithms)
Statistics (multinomial logistic regression algorithms)
Linear Hypothesis Testing (multinomial logistic regression algorithms)
Classification Table (multinomial logistic regression algorithms)
Checking for Separation (multinomial logistic regression algorithms)
References (multinomial logistic regression algorithms)


Model (multinomial logistic regression algorithms)

multinomial logistic regression algorithms,multinomial logistic regression algorithms,multinomial logistic regression algorithms
model,model,model

NOMREG fits a generalized logit model that can also be used to model the results of 1-1 matched case-control studies.

Related Topics

NOMREG Algorithms
Notation (multinomial logistic regression algorithms)
Data Aggregation (multinomial logistic regression algorithms)
Data Assumptions (multinomial logistic regression algorithms)
Log-likelihood (multinomial logistic regression algorithms)
Parameter Estimation (multinomial logistic regression algorithms)
Stepwise Variable Selection (multinomial logistic regression algorithms)
Statistics (multinomial logistic regression algorithms)
Linear Hypothesis Testing (multinomial logistic regression algorithms)
Classification Table (multinomial logistic regression algorithms)
Checking for Separation (multinomial logistic regression algorithms)
References (multinomial logistic regression algorithms)
Generalized Logit Model (multinomial logistic regression algorithms)
1-1 Matched Case Control Model by Conditional Likelihood Approach (multinomial logistic regression algorithms)


Generalized Logit Model (multinomial logistic regression algorithms)

In a Generalized Logit model, the probability πij of response category j at subpopulation i is

πij=exp(x´iβj)1+ΣJ−1k=1exp(x´iβk)

where the last category J is assumed to be the reference category.

In terms of logits, the model can be expressed as

log(πijπiJ)=x´iβj

for j = 1, …, J−1.

When J = 2, this model is equivalent to the binary Logistic Regression model. Thus, the above model can be thought of as an extension of the binary Logistic Regression model from binary response to polytomous nominal response.

Related Topics

Model (multinomial logistic regression algorithms)
1-1 Matched Case Control Model by Conditional Likelihood Approach (multinomial logistic regression algorithms)


1-1 Matched Case Control Model by Conditional Likelihood Approach (multinomial logistic regression algorithms)

The above model can also be used to estimate the parameters in the conditional likelihood of the 1-1 Matched Case Control Model. In this case, let m be the number of matching pairs, xil be the vector of independent variables for the case and xi2 that for the control. The conditional log-likelihood for the m matched pairs is given by

l=exp{(xi1−xi2)´β}1+exp{(xi1−xi2)´β}

in which β is the vector of parameters for the difference between the values of independent variables of the case and those of the control. This conditional likelihood is identical to the unconditional log-likelihood of a binary (i.e., k = 2) logistic regression model when

• There is no intercept term in the model.

• The set of subpopulations is defined by the set of matching pairs.

• The independent variables in the model are set to equal to the differences between the values for the case and the control.

• The number of response categories is J = 2, and the value of the response is 1 (or a constant), i.e., Y = 1.

Related Topics

Model (multinomial logistic regression algorithms)
Generalized Logit Model (multinomial logistic regression algorithms)


Log-likelihood (multinomial logistic regression algorithms)

multinomial logistic regression algorithms,multinomial logistic regression algorithms,multinomial logistic regression algorithms
likelihood function,likelihood function,likelihood function

The log-likelihood of the model is given by

l(B) | =mΣi=1JΣj=1nijlog(πij)
 | =mΣi=1JΣj=1nijlog(exp(x´iβj)1+ΣJ−1k=1exp(x´iβk))

A constant that is independent of parameters has been excluded here. The value of the constant is

c=Σmi=1log{ni!/(ni1!...niJ!)}

Related Topics

NOMREG Algorithms
Notation (multinomial logistic regression algorithms)
Data Aggregation (multinomial logistic regression algorithms)
Data Assumptions (multinomial logistic regression algorithms)
Model (multinomial logistic regression algorithms)
Parameter Estimation (multinomial logistic regression algorithms)
Stepwise Variable Selection (multinomial logistic regression algorithms)
Statistics (multinomial logistic regression algorithms)
Linear Hypothesis Testing (multinomial logistic regression algorithms)
Classification Table (multinomial logistic regression algorithms)
Checking for Separation (multinomial logistic regression algorithms)
References (multinomial logistic regression algorithms)


Parameter Estimation (multinomial logistic regression algorithms)

multinomial logistic regression algorithms,multinomial logistic regression algorithms,multinomial logistic regression algorithms
parameter estimation,parameter estimation,parameter estimation

Estimation of the model parameters proceeds as follows.

Related Topics

NOMREG Algorithms
Notation (multinomial logistic regression algorithms)
Data Aggregation (multinomial logistic regression algorithms)
Data Assumptions (multinomial logistic regression algorithms)
Model (multinomial logistic regression algorithms)
Log-likelihood (multinomial logistic regression algorithms)
Stepwise Variable Selection (multinomial logistic regression algorithms)
Statistics (multinomial logistic regression algorithms)
Linear Hypothesis Testing (multinomial logistic regression algorithms)
Classification Table (multinomial logistic regression algorithms)
Checking for Separation (multinomial logistic regression algorithms)
References (multinomial logistic regression algorithms)
First and Second Derivatives of the Log-likelihood (multinomial logistic regression algorithms)
Maximum Likelihood Estimate (multinomial logistic regression algorithms)
Stepping (multinomial logistic regression algorithms)
Starting Values of the Parameters (multinomial logistic regression algorithms)
Convergence Criteria (multinomial logistic regression algorithms)


First and Second Derivatives of the Log-likelihood (multinomial logistic regression algorithms)

For any j = 1, …, J−1, s = 1, …, p, the first derivative of l with respect to βjs is

∂l∂βjs=mΣi=1xis(nij−niπij)

For any j, j’= 1, …, J −1, s, t = 1, …, p, the second derivative of l with respect to βjs and βj´t is

∂2l∂βjs∂βj´t=−mΣi=1nixisxitπij(δjj´−πij´)

where δjj´= 1 if j = j’, 0 otherwise.

Related Topics

Parameter Estimation (multinomial logistic regression algorithms)
Maximum Likelihood Estimate (multinomial logistic regression algorithms)
Stepping (multinomial logistic regression algorithms)
Starting Values of the Parameters (multinomial logistic regression algorithms)
Convergence Criteria (multinomial logistic regression algorithms)


Maximum Likelihood Estimate (multinomial logistic regression algorithms)

To obtain the maximum likelihood estimate of B, a Newton-Raphson iterative estimation method is used. Notice that this method is the same as Fisher-Scoring iterative estimation method in this model, since the expectation of the second derivative of l with respect to B is the same as the observed one.

Let ∂l/∂B be the (J−1)p×1 vector of the first derivative of l with respect to B. Moreover, let [∂2l/∂B∂B] be the (J−1)p×(J−1)p matrix of the second derivative of l with respect to B. Notice that −[∂2l/∂B∂B]=Σmi=1X*iΔiX*i´ where Δi is a (J−1)×(J−1) matrix

Δi=ni( Diag (π(−J)i)−π(−J)iπ(−J)i´)

in which π(−J)i=(πi1,...,πi J−1)´ and Diag( π(−J)i) is a (J−1)×(J−1) diagonal matrix of π(−J)i. Let B(ν) be the parameter estimate at iteration v, the parameter estimate B(ν+1) at iteration v + 1 is updated as

B(ν+1)=B(ν)+ξ(mΣi=1X*iΔ(v)iX*i´)−1∂l∂B(v)

and ξ>0 is a stepping scalar such that l(B(ν+1))−l(B(ν))≥0, X* is a (J−1)p×(J−1) matrix of independent vectors,

X*i=(
xi 0 ... 0
0 xi
·
·
·
·
·
·
·
·
·
0
0 ... 0 xi
)

and Δ(ν)i is Δi and ∂l/∂B(ν) is ∂l/∂B, both evaluated at B=B(ν).

Related Topics

Parameter Estimation (multinomial logistic regression algorithms)
First and Second Derivatives of the Log-likelihood (multinomial logistic regression algorithms)
Stepping (multinomial logistic regression algorithms)
Starting Values of the Parameters (multinomial logistic regression algorithms)
Convergence Criteria (multinomial logistic regression algorithms)


Stepping (multinomial logistic regression algorithms)

Use step-halving method if l(B(ν+1))−l(B(ν))<0. Let V be the maximum number of steps in step-halving, the set of values of ξ is {1/2v: v = 0, …, V−1}.

Related Topics

Parameter Estimation (multinomial logistic regression algorithms)
First and Second Derivatives of the Log-likelihood (multinomial logistic regression algorithms)
Maximum Likelihood Estimate (multinomial logistic regression algorithms)
Starting Values of the Parameters (multinomial logistic regression algorithms)
Convergence Criteria (multinomial logistic regression algorithms)


Starting Values of the Parameters (multinomial logistic regression algorithms)

If intercepts are included in the model, set β(0)j=(β(0)j1,0,...,0)´ where

β(0)j1=log(
˜
π
ij
˜
π
iJ)=log(mΣi=1nijmΣi=1niJ)

for j = 1, …, J −1.

If intercepts are not included in the model, set

β(0)j=(0,...,0)´

for j = 1, …, J−1.

Related Topics

Parameter Estimation (multinomial logistic regression algorithms)
First and Second Derivatives of the Log-likelihood (multinomial logistic regression algorithms)
Maximum Likelihood Estimate (multinomial logistic regression algorithms)
Stepping (multinomial logistic regression algorithms)
Convergence Criteria (multinomial logistic regression algorithms)


Convergence Criteria (multinomial logistic regression algorithms)

Given two convergence criteria εk>0 and εp>0, the iteration is considered to be converged if one of the following criteria are satisfied:

1. |l(B(ν+1))−l(B(ν))|<εk

2.
max
i
|B(ν+1)i−Bνi|<εp

3. The maximum above element in ∂l/∂B(ν+1) is less than min(εl, εp).

Related Topics

Parameter Estimation (multinomial logistic regression algorithms)
First and Second Derivatives of the Log-likelihood (multinomial logistic regression algorithms)
Maximum Likelihood Estimate (multinomial logistic regression algorithms)
Stepping (multinomial logistic regression algorithms)
Starting Values of the Parameters (multinomial logistic regression algorithms)


Stepwise Variable Selection (multinomial logistic regression algorithms)

multinomial logistic regression algorithms,multinomial logistic regression algorithms,multinomial logistic regression algorithms
stepwise variable selection,stepwise variable selection,stepwise variable selection

Several methods are available for selecting independent variables. With the forced entry method, any variable in the variable list is entered into the model. The forward stepwise, backward stepwise, and backward entry methods use either the Wald statistic or the likelihood ratio statistic for variable removal. The forward stepwise, forward entry, and backward stepwise use the score statistic or the likelihood ratio statistic to select variables for entry into the model.

Related Topics

NOMREG Algorithms
Notation (multinomial logistic regression algorithms)
Data Aggregation (multinomial logistic regression algorithms)
Data Assumptions (multinomial logistic regression algorithms)
Model (multinomial logistic regression algorithms)
Log-likelihood (multinomial logistic regression algorithms)
Parameter Estimation (multinomial logistic regression algorithms)
Statistics (multinomial logistic regression algorithms)
Linear Hypothesis Testing (multinomial logistic regression algorithms)
Classification Table (multinomial logistic regression algorithms)
Checking for Separation (multinomial logistic regression algorithms)
References (multinomial logistic regression algorithms)
Forward Stepwise (FSTEP) (multinomial logistic regression algorithms)
Forward Only (FORWARD) (multinomial logistic regression algorithms)
Backward Stepwise (BSTEP) (multinomial logistic regression algorithms)
Backward Only (BACKWARD) (multinomial logistic regression algorithms)
Stepwise Statistics (multinomial logistic regression algorithms)
Score Function and Information Matrix (multinomial logistic regression algorithms)
Block Notations (multinomial logistic regression algorithms)
Score Test (multinomial logistic regression algorithms)
Computational Formula for Score Statistic (multinomial logistic regression algorithms)
Wald's Test (multinomial logistic regression algorithms)


Forward Stepwise (FSTEP) (multinomial logistic regression algorithms)

forward stepwise,forward stepwise,forward stepwise
multinomial logistic regression algorithms,multinomial logistic regression algorithms,multinomial logistic regression algorithms

1. Estimate the parameter and likelihood function for the initial model and let it be our current model.

2. Based on the MLEs of the current model, calculate the score statistic or likelihood ratio statistic for every variable eligible for inclusion and find its significance.

3. Choose the variable with the smallest significance (p-value). If that significance is less than the probability for a variable to enter, then go to step 4; otherwise, stop FSTEP.

4. Update the current model by adding a new variable. If this results in a model which has already been evaluated, stop FSTEP.

5. Calculate the significance for each variable in the current model using LR or Wald’s test.

6. Choose the variable with the largest significance. If its significance is less than the probability for variable removal, then go back to step 2. If the current model with the variable deleted is the same as a previous model, stop FSTEP; otherwise go to the next step.

7. Modify the current model by removing the variable with the largest significance from the previous model. Estimate the parameters for the modified model and go back to step 5.

Related Topics

Stepwise Variable Selection (multinomial logistic regression algorithms)
Forward Only (FORWARD) (multinomial logistic regression algorithms)
Backward Stepwise (BSTEP) (multinomial logistic regression algorithms)
Backward Only (BACKWARD) (multinomial logistic regression algorithms)
Stepwise Statistics (multinomial logistic regression algorithms)
Score Function and Information Matrix (multinomial logistic regression algorithms)
Block Notations (multinomial logistic regression algorithms)
Score Test (multinomial logistic regression algorithms)
Computational Formula for Score Statistic (multinomial logistic regression algorithms)
Wald's Test (multinomial logistic regression algorithms)


Forward Only (FORWARD) (multinomial logistic regression algorithms)

forward entry,forward entry,forward entry
multinomial logistic regression algorithms,multinomial logistic regression algorithms,multinomial logistic regression algorithms

1. Estimate the parameter and likelihood function for the initial model and let it be our current model.

2. Based on the MLEs of the current model, calculate the score or LR statistic for every variable eligible for inclusion and find its significance.

3. Choose the variable with the smallest significance. If that significance is less than the probability for a variable to enter, then go to step 4; otherwise, stop FORWARD.

4. Update the current model by adding a new variable. If there are no more eligible variable left, stop FORWARD; otherwise, go to step 2.

Related Topics

Stepwise Variable Selection (multinomial logistic regression algorithms)
Forward Stepwise (FSTEP) (multinomial logistic regression algorithms)
Backward Stepwise (BSTEP) (multinomial logistic regression algorithms)
Backward Only (BACKWARD) (multinomial logistic regression algorithms)
Stepwise Statistics (multinomial logistic regression algorithms)
Score Function and Information Matrix (multinomial logistic regression algorithms)
Block Notations (multinomial logistic regression algorithms)
Score Test (multinomial logistic regression algorithms)
Computational Formula for Score Statistic (multinomial logistic regression algorithms)
Wald's Test (multinomial logistic regression algorithms)


Backward Stepwise (BSTEP) (multinomial logistic regression algorithms)

backward stepwise,backward stepwise,backward stepwise
multinomial logistic regression algorithms,multinomial logistic regression algorithms,multinomial logistic regression algorithms

1. Estimate the parameters for the full model that includes the final model from previous method and all eligible variables. Only variables listed on the BSTEP variable list are eligible for entry and removal. Let current model be the full model.

2. Based on the MLEs of the current model, calculate the LR or Wald’s statistic for every variable in the BSTEP list and find its significance.

3. Choose the variable with the largest significance. If that significance is less than the probability for a variable removal, then go to step 5. If the current model without the variable with the largest significance is the same as the previous model, stop BSTEP; otherwise go to the next step.

4. Modify the current model by removing the variable with the largest significance from the model. Estimate the parameters for the modified model and go back to step 2.

5. Check to see any eligible variable is not in the model. If there is none, stop BSTEP; otherwise, go to the next step.

6. Based on the MLEs of the current model, calculate LR statistic or score statistic for every variable not in the model and find its significance.

7. Choose the variable with the smallest significance. If that significance is less than the probability for the variable entry, then go to the next step; otherwise, stop BSTEP.

8. Add the variable with the smallest significance to the current model. If the model is not the same as any previous models, estimate the parameters for the new model and go back to step 2; otherwise, stop BSTEP.

Related Topics

Stepwise Variable Selection (multinomial logistic regression algorithms)
Forward Stepwise (FSTEP) (multinomial logistic regression algorithms)
Forward Only (FORWARD) (multinomial logistic regression algorithms)
Backward Only (BACKWARD) (multinomial logistic regression algorithms)
Stepwise Statistics (multinomial logistic regression algorithms)
Score Function and Information Matrix (multinomial logistic regression algorithms)
Block Notations (multinomial logistic regression algorithms)
Score Test (multinomial logistic regression algorithms)
Computational Formula for Score Statistic (multinomial logistic regression algorithms)
Wald's Test (multinomial logistic regression algorithms)


Backward Only (BACKWARD) (multinomial logistic regression algorithms)

backward elimination,backward elimination,backward elimination
multinomial logistic regression algorithms,multinomial logistic regression algorithms,multinomial logistic regression algorithms

1. Estimate the parameters for the full model that includes all eligible variables. Let the current model be the full model.

2. Based on the MLEs of the current model, calculate the LR or Wald’s statistic for all variables eligible for removal and find its significance.

3. Choose the variable with the largest significance. If that significance is less than the probability for a variable removal, then stop BACKWARD; otherwise, go to the next step.

4. Modify the current model by removing the variable with the largest significance from the model. Estimate the parameters for the modified model. If all the variables in the BACKWARD list are removed then stop BACKWARD; otherwise, go back to step 2.

Related Topics

Stepwise Variable Selection (multinomial logistic regression algorithms)
Forward Stepwise (FSTEP) (multinomial logistic regression algorithms)
Forward Only (FORWARD) (multinomial logistic regression algorithms)
Backward Stepwise (BSTEP) (multinomial logistic regression algorithms)
Stepwise Statistics (multinomial logistic regression algorithms)
Score Function and Information Matrix (multinomial logistic regression algorithms)
Block Notations (multinomial logistic regression algorithms)
Score Test (multinomial logistic regression algorithms)
Computational Formula for Score Statistic (multinomial logistic regression algorithms)
Wald's Test (multinomial logistic regression algorithms)


Stepwise Statistics (multinomial logistic regression algorithms)

The statistics used in the stepwise variable selection methods are defined as follows.

Related Topics

Stepwise Variable Selection (multinomial logistic regression algorithms)
Forward Stepwise (FSTEP) (multinomial logistic regression algorithms)
Forward Only (FORWARD) (multinomial logistic regression algorithms)
Backward Stepwise (BSTEP) (multinomial logistic regression algorithms)
Backward Only (BACKWARD) (multinomial logistic regression algorithms)
Score Function and Information Matrix (multinomial logistic regression algorithms)
Block Notations (multinomial logistic regression algorithms)
Score Test (multinomial logistic regression algorithms)
Computational Formula for Score Statistic (multinomial logistic regression algorithms)
Wald's Test (multinomial logistic regression algorithms)


Score Function and Information Matrix (multinomial logistic regression algorithms)

The score function for a model with parameter B is:

U(B)=∂l(B)∂B

The (j,s)th element of the score function can be written as

[U(B)]js | =∂l(B)∂βjs
 | =mΣi=1xis(nij−niπij)

Similarly, elements of the information matrix are given by

[I(B)]js,j´t | =∂2l(B)∂βjs∂βjt
 | =−mΣi=1nixisxitπij(δjj´−πij´)

where δjj´=1 if j=j´, 0 otherwise.

(Note that πij in the formula are functions of B)

Related Topics

Stepwise Variable Selection (multinomial logistic regression algorithms)
Forward Stepwise (FSTEP) (multinomial logistic regression algorithms)
Forward Only (FORWARD) (multinomial logistic regression algorithms)
Backward Stepwise (BSTEP) (multinomial logistic regression algorithms)
Backward Only (BACKWARD) (multinomial logistic regression algorithms)
Stepwise Statistics (multinomial logistic regression algorithms)
Block Notations (multinomial logistic regression algorithms)
Score Test (multinomial logistic regression algorithms)
Computational Formula for Score Statistic (multinomial logistic regression algorithms)
Wald's Test (multinomial logistic regression algorithms)


Block Notations (multinomial logistic regression algorithms)

By partitioning the parameter B into two parts, B1 and B2, the score function, information matrix, and inverse information matrix can be written as partitioned matrices:

U(B1,B2) =(
U1(B1,B2)
U2(B1,B2)
)
=(
∂l(B1,B2)∂B1
∂l(B1,B2)∂B2
)

where l(B1,B2)=l(B)

I(B) =I(B1,B2)
=(
I11(B1,B2) | I12(B1,B2)
I21(B1,B2) | I22(B1,B2)
)
=(
∂2l(B1,B2)∂B1∂B1 | ∂2l(B1,B2)∂B1∂B2
∂2l(B1,B2)∂B2∂B1 | ∂2l(B1,B2)∂B2∂B2
)

J(B)=I(B1,B2)−=(
J11(B1,B2) | J12(B1,B2)
J21(B1,B2) | J22(B1,B2)
)

where

J11=I−11+I−11 I12 J22 I21 I−11
J12=−I−11I12J22
J21=JT12
J22=[I22

Typically, B1 and B2 are parameters corresponding to two different sets of effects. The dimensions of the 1st and 2nd partition in U, I and J are equal to the numbers of parameters in B1 and B2 respectively.

Related Topics

Stepwise Variable Selection (multinomial logistic regression algorithms)
Forward Stepwise (FSTEP) (multinomial logistic regression algorithms)
Forward Only (FORWARD) (multinomial logistic regression algorithms)
Backward Stepwise (BSTEP) (multinomial logistic regression algorithms)
Backward Only (BACKWARD) (multinomial logistic regression algorithms)
Stepwise Statistics (multinomial logistic regression algorithms)
Score Function and Information Matrix (multinomial logistic regression algorithms)
Score Test (multinomial logistic regression algorithms)
Computational Formula for Score Statistic (multinomial logistic regression algorithms)
Wald's Test (multinomial logistic regression algorithms)


Score Test (multinomial logistic regression algorithms)

score test,score test,score test
multinomial logistic regression algorithms,multinomial logistic regression algorithms,multinomial logistic regression algorithms

Suppose a base model with parameter vector Bbase with the corresponding maximum likelihood estimate
^
B
base. We are interested in testing the significance of an extra effect E if it is added to the base model. For convenience, we will call the model with effect E the augmented model. Let BE be the vector of extra parameters associated with the effect E, then the hypothesis can be written as

H0:BE=0 v.s. H1:BE≠0

Using the block notations, the score function, information matrix and inverse information of the augmented model can be written as

U(Bbase,BE)=(
Ubase(Bbase,BE)
UE(Bbase,BE)
)

I(Bbase,BE)=(
Ibase,base(Bbase,BE) | Ibase,E(Bbase,BE)
IE,base(Bbase,BE) | IE,E(Bbase,BE)
)

J(Bbase,BE)=(
Jbase,base(Bbase,BE) | Jbase,E(Bbase,BE)
JE,base(Bbase,BE) | JE,E(Bbase,BE)
)

Then the score statistic for testing our hypothesis will be

s=UE(
^
B
base,0)TJE,E(
^
B
base,0)UE(
^
B
base,0)

where UE(
^
B
base,0) and JE,E(
^
B
base,0) are the 2nd partition of score function and inverse information matrix evaluated at Bbase=
^
B
base and BE=0.

Under the null hypothesis, the score statistic s has a chi-square distribution with degrees of freedom equal to the rank of JE,E(B1,B2). If the rank of JE,E(B1,B2) is zero, then the score statistic will be set to 0 and the p-value will be 1. Otherwise, if the rank of JE,E(B1,B2) is rE:rE>0, then the p-value of the test is equal to 1−F(s;rE), where F(·,rE) is the cumulative distribution function of a chi-square distribution with rE degrees of freedom.

Related Topics

Stepwise Variable Selection (multinomial logistic regression algorithms)
Forward Stepwise (FSTEP) (multinomial logistic regression algorithms)
Forward Only (FORWARD) (multinomial logistic regression algorithms)
Backward Stepwise (BSTEP) (multinomial logistic regression algorithms)
Backward Only (BACKWARD) (multinomial logistic regression algorithms)
Stepwise Statistics (multinomial logistic regression algorithms)
Score Function and Information Matrix (multinomial logistic regression algorithms)
Block Notations (multinomial logistic regression algorithms)
Computational Formula for Score Statistic (multinomial logistic regression algorithms)
Wald's Test (multinomial logistic regression algorithms)


Computational Formula for Score Statistic (multinomial logistic regression algorithms)

When we compute the score statistic s, it is not necessary to re-compute U(
^
B
base,0) and I(
^
B
base,0) from scratch. The score function and information matrix of the base model can be reused in the calculation. Using the block notations introduced earlier, we have

U(
^
B
base,0)=(
Ubase(
^
B
base,0)
UE(
^
B
base,0)
)=(
U(
^
B
base)
UE(
^
B
base,0)
)

and

I(
^
B
base,0)=(
I(
^
B
base) 		Ibase,E(
^
B
base,0)
IE,base(
^
B
base,0) 		IE,E(
^
B
base,0)
)

In stepwise logistic regression, it is necessary to compute one score test for each effect that are not in the base model. Since the 1st partition of U(
^
B
base,0) and I(
^
B
base,0) depend only on the base model, we only need to compute UE(
^
B
base,0), Ibase,E(
^
B
base,0) and IE,E(
^
B
base,0) for each new effect.

If βjs is the s-th parameter of the j-th logit in Bbase and βkt is the t-th parameter of k-th logit in BE, then the elements of UE(
^
B
base,0), Ibase,E(
^
B
base,0) and IE,E(
^
B
base,0) can be expressed as follows:

[UE(
^
B
base,0)]kt=mΣi=1xit(nik−ni
^
π
ik)

[IE,E(
^
B
base,0)]kt,k´t´=−mΣi=1nixitxit´
^
π
ik(δkk´−
^
π
ik´)

[Ibase,E(
^
B
base,0)]js,kt=−mΣi=1nixisxit
^
π
ij(δjk−
^
π
ik)

where
^
π
ik,
^
π
ik´ are computed under the base model.

Related Topics

Stepwise Variable Selection (multinomial logistic regression algorithms)
Forward Stepwise (FSTEP) (multinomial logistic regression algorithms)
Forward Only (FORWARD) (multinomial logistic regression algorithms)
Backward Stepwise (BSTEP) (multinomial logistic regression algorithms)
Backward Only (BACKWARD) (multinomial logistic regression algorithms)
Stepwise Statistics (multinomial logistic regression algorithms)
Score Function and Information Matrix (multinomial logistic regression algorithms)
Block Notations (multinomial logistic regression algorithms)
Score Test (multinomial logistic regression algorithms)
Wald's Test (multinomial logistic regression algorithms)


Wald's Test (multinomial logistic regression algorithms)

In backward stepwise selection, we are interested in removing an effect F from an already fitted model. For a given base model with parameter vector Bbase, we want to use Wald’s statistic to test if effect F should be removed from the base model. If the parameter vector for the effect F is BF, then the hypothesis can be formulated as

H0:BF=0 vs. H1:BF≠0

In order to write down the expression of the Wald’s statistic, we will partition our parameter vector (and its estimate) into two parts as follows:

Bbase=(
Bbase\F
BF
) and
^
B
base=(
^
B
base\F
^
B
F
)

The first partition contains parameters that we intended to keep in the model and the 2nd partition contains the parameters of the effect F, which may be removed from the model. The information matrix and inverse information will be partitioned accordingly,

I(Bbase)=(
Ibase\F,base\F(Bbase\F,Bbase\F) | Ibase\F,F(Bbase\F,BF)
IF,base\F(Bbase\F,BF) | IF,F(Bbase\F,BF)
)

and

J(Bbase)=(
Jbase\F,base\F(Bbase\F,Bbase\F) | Jbase\F,F(Bbase\F,BF)
JF,base\F(Bbase\F,BF) | JF,F(Bbase\F,BF)
)

Using the above notations, the Wald’s statistic for effect F can be expressed as

w=
^
B
F[JF,F(Bbase\F,BF)]−
^
B
F

Under the null hypothesis, w has a chi-square distribution with degrees of freedom equal to the rank of JF,F(Bbase\F,BF). If the rank of JF,F(Bbase\F,BF) is zero, then Wald’s statistic will be set to 0 and the p-value will be 1. Otherwise, if the rank of JF,F(Bbase\F,BF) is rF:rF>0, then the p-value of the test is equal to 1−F(w;rF), where F(w;rF) is the cumulative distribution function of a chi-square distribution with rF degrees of freedom.

Related Topics

Stepwise Variable Selection (multinomial logistic regression algorithms)
Forward Stepwise (FSTEP) (multinomial logistic regression algorithms)
Forward Only (FORWARD) (multinomial logistic regression algorithms)
Backward Stepwise (BSTEP) (multinomial logistic regression algorithms)
Backward Only (BACKWARD) (multinomial logistic regression algorithms)
Stepwise Statistics (multinomial logistic regression algorithms)
Score Function and Information Matrix (multinomial logistic regression algorithms)
Block Notations (multinomial logistic regression algorithms)
Score Test (multinomial logistic regression algorithms)
Computational Formula for Score Statistic (multinomial logistic regression algorithms)


Statistics (multinomial logistic regression algorithms)

multinomial logistic regression algorithms,multinomial logistic regression algorithms,multinomial logistic regression algorithms
output statistics,output statistics,output statistics

The following output statistics are available.

Related Topics

NOMREG Algorithms
Notation (multinomial logistic regression algorithms)
Data Aggregation (multinomial logistic regression algorithms)
Data Assumptions (multinomial logistic regression algorithms)
Model (multinomial logistic regression algorithms)
Log-likelihood (multinomial logistic regression algorithms)
Parameter Estimation (multinomial logistic regression algorithms)
Stepwise Variable Selection (multinomial logistic regression algorithms)
Linear Hypothesis Testing (multinomial logistic regression algorithms)
Classification Table (multinomial logistic regression algorithms)
Checking for Separation (multinomial logistic regression algorithms)
References (multinomial logistic regression algorithms)
Model Information (multinomial logistic regression algorithms)
Initial Model, Intercept-Only (multinomial logistic regression algorithms)
Initial Model, Empty (multinomial logistic regression algorithms)
Final Model (multinomial logistic regression algorithms)
Model Chi-Square (multinomial logistic regression algorithms)
Model with Intercepts versus Intercept-only Model (multinomial logistic regression algorithms)
Model without Intercepts versus Empty Model (multinomial logistic regression algorithms)
Pseudo R-Square (multinomial logistic regression algorithms)
Cox and Snell's R-Square (multinomial logistic regression algorithms)
Nagelkerke's R-Square (multinomial logistic regression algorithms)
McFadden's R-Square (multinomial logistic regression algorithms)
Measures of Monotone Association
Pearson Goodness of Fit Measure (multinomial logistic regression algorithms)
Deviance Goodness of Fit Measure (multinomial logistic regression algorithms)
Overdispersion Adjustments (multinomial logistic regression algorithms)
Covariance and Correlation Matrices (multinomial logistic regression algorithms)
Parameter Statistics (multinomial logistic regression algorithms)
Likelihood Based Partial Effects (multinomial logistic regression algorithms)


Model Information (multinomial logistic regression algorithms)

The model information (-2 log-likelihood) is available for the initial and final model.

Related Topics

Statistics (multinomial logistic regression algorithms)
Initial Model, Intercept-Only (multinomial logistic regression algorithms)
Initial Model, Empty (multinomial logistic regression algorithms)
Final Model (multinomial logistic regression algorithms)
Model Chi-Square (multinomial logistic regression algorithms)
Model with Intercepts versus Intercept-only Model (multinomial logistic regression algorithms)
Model without Intercepts versus Empty Model (multinomial logistic regression algorithms)
Pseudo R-Square (multinomial logistic regression algorithms)
Cox and Snell's R-Square (multinomial logistic regression algorithms)
Nagelkerke's R-Square (multinomial logistic regression algorithms)
McFadden's R-Square (multinomial logistic regression algorithms)
Measures of Monotone Association
Pearson Goodness of Fit Measure (multinomial logistic regression algorithms)
Deviance Goodness of Fit Measure (multinomial logistic regression algorithms)
Overdispersion Adjustments (multinomial logistic regression algorithms)
Covariance and Correlation Matrices (multinomial logistic regression algorithms)
Parameter Statistics (multinomial logistic regression algorithms)
Likelihood Based Partial Effects (multinomial logistic regression algorithms)


Initial Model, Intercept-Only (multinomial logistic regression algorithms)

If intercepts are included in the model, the predicted probability for the initial model (that is, the model with intercepts only) is

˜
π
ij=mΣi=1nijN

and the value of the -2 log-likelihood of the initial model is

−2l(
˜
π
)=−2mΣi=1JΣj=1nijlog(
˜
π
ij)

Related Topics

Statistics (multinomial logistic regression algorithms)
Model Information (multinomial logistic regression algorithms)
Initial Model, Empty (multinomial logistic regression algorithms)
Final Model (multinomial logistic regression algorithms)
Model Chi-Square (multinomial logistic regression algorithms)
Model with Intercepts versus Intercept-only Model (multinomial logistic regression algorithms)
Model without Intercepts versus Empty Model (multinomial logistic regression algorithms)
Pseudo R-Square (multinomial logistic regression algorithms)
Cox and Snell's R-Square (multinomial logistic regression algorithms)
Nagelkerke's R-Square (multinomial logistic regression algorithms)
McFadden's R-Square (multinomial logistic regression algorithms)
Measures of Monotone Association
Pearson Goodness of Fit Measure (multinomial logistic regression algorithms)
Deviance Goodness of Fit Measure (multinomial logistic regression algorithms)
Overdispersion Adjustments (multinomial logistic regression algorithms)
Covariance and Correlation Matrices (multinomial logistic regression algorithms)
Parameter Statistics (multinomial logistic regression algorithms)
Likelihood Based Partial Effects (multinomial logistic regression algorithms)


Initial Model, Empty (multinomial logistic regression algorithms)

If intercepts are not included in the model, the predicted probability for the initial model is

˜
π
ij=1J

and the value of the -2 log-likelihood of the initial model is

−2l(
˜
π
)=−2Nlog(1J)

Related Topics

Statistics (multinomial logistic regression algorithms)
Model Information (multinomial logistic regression algorithms)
Initial Model, Intercept-Only (multinomial logistic regression algorithms)
Final Model (multinomial logistic regression algorithms)
Model Chi-Square (multinomial logistic regression algorithms)
Model with Intercepts versus Intercept-only Model (multinomial logistic regression algorithms)
Model without Intercepts versus Empty Model (multinomial logistic regression algorithms)
Pseudo R-Square (multinomial logistic regression algorithms)
Cox and Snell's R-Square (multinomial logistic regression algorithms)
Nagelkerke's R-Square (multinomial logistic regression algorithms)
McFadden's R-Square (multinomial logistic regression algorithms)
Measures of Monotone Association
Pearson Goodness of Fit Measure (multinomial logistic regression algorithms)
Deviance Goodness of Fit Measure (multinomial logistic regression algorithms)
Overdispersion Adjustments (multinomial logistic regression algorithms)
Covariance and Correlation Matrices (multinomial logistic regression algorithms)
Parameter Statistics (multinomial logistic regression algorithms)
Likelihood Based Partial Effects (multinomial logistic regression algorithms)


Final Model (multinomial logistic regression algorithms)

The value of -2 log-likelihood of the final model is

−2l(
˜
π
)=−2mΣi=1JΣj=1nijlog(
^
π
ij)

Related Topics

Statistics (multinomial logistic regression algorithms)
Model Information (multinomial logistic regression algorithms)
Initial Model, Intercept-Only (multinomial logistic regression algorithms)
Initial Model, Empty (multinomial logistic regression algorithms)
Model Chi-Square (multinomial logistic regression algorithms)
Model with Intercepts versus Intercept-only Model (multinomial logistic regression algorithms)
Model without Intercepts versus Empty Model (multinomial logistic regression algorithms)
Pseudo R-Square (multinomial logistic regression algorithms)
Cox and Snell's R-Square (multinomial logistic regression algorithms)
Nagelkerke's R-Square (multinomial logistic regression algorithms)
McFadden's R-Square (multinomial logistic regression algorithms)
Measures of Monotone Association
Pearson Goodness of Fit Measure (multinomial logistic regression algorithms)
Deviance Goodness of Fit Measure (multinomial logistic regression algorithms)
Overdispersion Adjustments (multinomial logistic regression algorithms)
Covariance and Correlation Matrices (multinomial logistic regression algorithms)
Parameter Statistics (multinomial logistic regression algorithms)
Likelihood Based Partial Effects (multinomial logistic regression algorithms)


Model Chi-Square (multinomial logistic regression algorithms)

The Model Chi-square is given by

−2l(
˜
π
)−{−2l(
^
π
)}

Related Topics

Statistics (multinomial logistic regression algorithms)
Model Information (multinomial logistic regression algorithms)
Initial Model, Intercept-Only (multinomial logistic regression algorithms)
Initial Model, Empty (multinomial logistic regression algorithms)
Final Model (multinomial logistic regression algorithms)
Model with Intercepts versus Intercept-only Model (multinomial logistic regression algorithms)
Model without Intercepts versus Empty Model (multinomial logistic regression algorithms)
Pseudo R-Square (multinomial logistic regression algorithms)
Cox and Snell's R-Square (multinomial logistic regression algorithms)
Nagelkerke's R-Square (multinomial logistic regression algorithms)
McFadden's R-Square (multinomial logistic regression algorithms)
Measures of Monotone Association
Pearson Goodness of Fit Measure (multinomial logistic regression algorithms)
Deviance Goodness of Fit Measure (multinomial logistic regression algorithms)
Overdispersion Adjustments (multinomial logistic regression algorithms)
Covariance and Correlation Matrices (multinomial logistic regression algorithms)
Parameter Statistics (multinomial logistic regression algorithms)
Likelihood Based Partial Effects (multinomial logistic regression algorithms)


Model with Intercepts versus Intercept-only Model (multinomial logistic regression algorithms)

If the final model includes intercepts, then the initial model is an intercept-only model. Under the null hypothesis that H0:β intercepts =0, the Model Chi-square is asymptotically chi-squared distributed with pnr – (J – 1) degrees of freedom.

Related Topics

Statistics (multinomial logistic regression algorithms)
Model Information (multinomial logistic regression algorithms)
Initial Model, Intercept-Only (multinomial logistic regression algorithms)
Initial Model, Empty (multinomial logistic regression algorithms)
Final Model (multinomial logistic regression algorithms)
Model Chi-Square (multinomial logistic regression algorithms)
Model without Intercepts versus Empty Model (multinomial logistic regression algorithms)
Pseudo R-Square (multinomial logistic regression algorithms)
Cox and Snell's R-Square (multinomial logistic regression algorithms)
Nagelkerke's R-Square (multinomial logistic regression algorithms)
McFadden's R-Square (multinomial logistic regression algorithms)
Measures of Monotone Association
Pearson Goodness of Fit Measure (multinomial logistic regression algorithms)
Deviance Goodness of Fit Measure (multinomial logistic regression algorithms)
Overdispersion Adjustments (multinomial logistic regression algorithms)
Covariance and Correlation Matrices (multinomial logistic regression algorithms)
Parameter Statistics (multinomial logistic regression algorithms)
Likelihood Based Partial Effects (multinomial logistic regression algorithms)


Model without Intercepts versus Empty Model (multinomial logistic regression algorithms)

If the model does not include intercepts, then the initial model is an empty model. Under the null hypothesis that H0:β=0, the Model Chi-square is asymptotically chi-squared distributed with pnr degrees of freedoms.

Related Topics

Statistics (multinomial logistic regression algorithms)
Model Information (multinomial logistic regression algorithms)
Initial Model, Intercept-Only (multinomial logistic regression algorithms)
Initial Model, Empty (multinomial logistic regression algorithms)
Final Model (multinomial logistic regression algorithms)
Model Chi-Square (multinomial logistic regression algorithms)
Model with Intercepts versus Intercept-only Model (multinomial logistic regression algorithms)
Pseudo R-Square (multinomial logistic regression algorithms)
Cox and Snell's R-Square (multinomial logistic regression algorithms)
Nagelkerke's R-Square (multinomial logistic regression algorithms)
McFadden's R-Square (multinomial logistic regression algorithms)
Measures of Monotone Association
Pearson Goodness of Fit Measure (multinomial logistic regression algorithms)
Deviance Goodness of Fit Measure (multinomial logistic regression algorithms)
Overdispersion Adjustments (multinomial logistic regression algorithms)
Covariance and Correlation Matrices (multinomial logistic regression algorithms)
Parameter Statistics (multinomial logistic regression algorithms)
Likelihood Based Partial Effects (multinomial logistic regression algorithms)


Pseudo R-Square (multinomial logistic regression algorithms)

The R2 statistic cannot be exactly computed for multinomial logistic regression models, so these approximations are computed instead.

Related Topics

Statistics (multinomial logistic regression algorithms)
Model Information (multinomial logistic regression algorithms)
Initial Model, Intercept-Only (multinomial logistic regression algorithms)
Initial Model, Empty (multinomial logistic regression algorithms)
Final Model (multinomial logistic regression algorithms)
Model Chi-Square (multinomial logistic regression algorithms)
Model with Intercepts versus Intercept-only Model (multinomial logistic regression algorithms)
Model without Intercepts versus Empty Model (multinomial logistic regression algorithms)
Cox and Snell's R-Square (multinomial logistic regression algorithms)
Nagelkerke's R-Square (multinomial logistic regression algorithms)
McFadden's R-Square (multinomial logistic regression algorithms)
Measures of Monotone Association
Pearson Goodness of Fit Measure (multinomial logistic regression algorithms)
Deviance Goodness of Fit Measure (multinomial logistic regression algorithms)
Overdispersion Adjustments (multinomial logistic regression algorithms)
Covariance and Correlation Matrices (multinomial logistic regression algorithms)
Parameter Statistics (multinomial logistic regression algorithms)
Likelihood Based Partial Effects (multinomial logistic regression algorithms)


Cox and Snell's R-Square (multinomial logistic regression algorithms)

Cox and Snell R-Square,Cox and Snell R-Square,Cox and Snell R-Square
multinomial logistic regression algorithms,multinomial logistic regression algorithms,multinomial logistic regression algorithms

R2 CS =1−(L(
˜
π
)L(
^
π
))2n

Related Topics

Statistics (multinomial logistic regression algorithms)
Model Information (multinomial logistic regression algorithms)
Initial Model, Intercept-Only (multinomial logistic regression algorithms)
Initial Model, Empty (multinomial logistic regression algorithms)
Final Model (multinomial logistic regression algorithms)
Model Chi-Square (multinomial logistic regression algorithms)
Model with Intercepts versus Intercept-only Model (multinomial logistic regression algorithms)
Model without Intercepts versus Empty Model (multinomial logistic regression algorithms)
Pseudo R-Square (multinomial logistic regression algorithms)
Nagelkerke's R-Square (multinomial logistic regression algorithms)
McFadden's R-Square (multinomial logistic regression algorithms)
Measures of Monotone Association
Pearson Goodness of Fit Measure (multinomial logistic regression algorithms)
Deviance Goodness of Fit Measure (multinomial logistic regression algorithms)
Overdispersion Adjustments (multinomial logistic regression algorithms)
Covariance and Correlation Matrices (multinomial logistic regression algorithms)
Parameter Statistics (multinomial logistic regression algorithms)
Likelihood Based Partial Effects (multinomial logistic regression algorithms)


Nagelkerke's R-Square (multinomial logistic regression algorithms)

Nagelkerke R-Square,Nagelkerke R-Square,Nagelkerke R-Square
multinomial logistic regression algorithms,multinomial logistic regression algorithms,multinomial logistic regression algorithms

R2 N =R2 CS 1−L(
˜
π
)2/n

Related Topics

Statistics (multinomial logistic regression algorithms)
Model Information (multinomial logistic regression algorithms)
Initial Model, Intercept-Only (multinomial logistic regression algorithms)
Initial Model, Empty (multinomial logistic regression algorithms)
Final Model (multinomial logistic regression algorithms)
Model Chi-Square (multinomial logistic regression algorithms)
Model with Intercepts versus Intercept-only Model (multinomial logistic regression algorithms)
Model without Intercepts versus Empty Model (multinomial logistic regression algorithms)
Pseudo R-Square (multinomial logistic regression algorithms)
Cox and Snell's R-Square (multinomial logistic regression algorithms)
McFadden's R-Square (multinomial logistic regression algorithms)
Measures of Monotone Association
Pearson Goodness of Fit Measure (multinomial logistic regression algorithms)
Deviance Goodness of Fit Measure (multinomial logistic regression algorithms)
Overdispersion Adjustments (multinomial logistic regression algorithms)
Covariance and Correlation Matrices (multinomial logistic regression algorithms)
Parameter Statistics (multinomial logistic regression algorithms)
Likelihood Based Partial Effects (multinomial logistic regression algorithms)


McFadden's R-Square (multinomial logistic regression algorithms)

McFadden R-Square,McFadden R-Square,McFadden R-Square
multinomial logistic regression algorithms,multinomial logistic regression algorithms,multinomial logistic regression algorithms

R2 M =1−(l(
^
π
)l(
˜
π
))

Related Topics

Statistics (multinomial logistic regression algorithms)
Model Information (multinomial logistic regression algorithms)
Initial Model, Intercept-Only (multinomial logistic regression algorithms)
Initial Model, Empty (multinomial logistic regression algorithms)
Final Model (multinomial logistic regression algorithms)
Model Chi-Square (multinomial logistic regression algorithms)
Model with Intercepts versus Intercept-only Model (multinomial logistic regression algorithms)
Model without Intercepts versus Empty Model (multinomial logistic regression algorithms)
Pseudo R-Square (multinomial logistic regression algorithms)
Cox and Snell's R-Square (multinomial logistic regression algorithms)
Nagelkerke's R-Square (multinomial logistic regression algorithms)
Measures of Monotone Association
Pearson Goodness of Fit Measure (multinomial logistic regression algorithms)
Deviance Goodness of Fit Measure (multinomial logistic regression algorithms)
Overdispersion Adjustments (multinomial logistic regression algorithms)
Covariance and Correlation Matrices (multinomial logistic regression algorithms)
Parameter Statistics (multinomial logistic regression algorithms)
Likelihood Based Partial Effects (multinomial logistic regression algorithms)


Measures of Monotone Association

Somers' D,Somers' D,Somers' D
multinomial logistic regression algorithms,multinomial logistic regression algorithms,multinomial logistic regression algorithms
Goodman and Kruskal's gamma,Goodman and Kruskal's gamma,Goodman and Kruskal's gamma
multinomial logistic regression algorithms,multinomial logistic regression algorithms,multinomial logistic regression algorithms
Kendall's Tau-a,Kendall's Tau-a,Kendall's Tau-a
multinomial logistic regression algorithms,multinomial logistic regression algorithms,multinomial logistic regression algorithms
Concordance Index C,Concordance Index C,Concordance Index C
multinomial logistic regression algorithms,multinomial logistic regression algorithms,multinomial logistic regression algorithms

When the response variable has exactly two levels; that is, k = 2, measures of monotone association are available.

Without loss of generality, let the predicted probability for the category which is not the base category be πi1. Also, let si=[500×πi1]/500 where [x] is the integer part of the value x.

Take a pair of observations indexed by i1 and i2 with different observed responses; the smaller index corresponds to a lower predictor value. This pair is a concordant pair if si1<si2 for i1<i2. This pair is a discordant pair if si1>si2 for i1<i2. If the pair is neither concordant nor discordant, it is a tied pair. Suppose there are a total of t pairs with different responses, mc pairs are concordant, md pairs are discordant, and t−mc−md pairs are tied. The following measures of monotone association are computed.

Somers’ D

D=(mc−md)/t

Goodman-Kruskal’s Gamma

Gamma=(mc−md)/(mc+md)

Kendall’s Tau-a

Tau−a=2(mc−md)/(n(n−1))

where n is the total sum of all frequencies n = mΣi=1kΣj=1nij.

Concordance Index C

C=(mc+(t−mc−md)/2)/t

Related Topics

Statistics (multinomial logistic regression algorithms)
Model Information (multinomial logistic regression algorithms)
Initial Model, Intercept-Only (multinomial logistic regression algorithms)
Initial Model, Empty (multinomial logistic regression algorithms)
Final Model (multinomial logistic regression algorithms)
Model Chi-Square (multinomial logistic regression algorithms)
Model with Intercepts versus Intercept-only Model (multinomial logistic regression algorithms)
Model without Intercepts versus Empty Model (multinomial logistic regression algorithms)
Pseudo R-Square (multinomial logistic regression algorithms)
Cox and Snell's R-Square (multinomial logistic regression algorithms)
Nagelkerke's R-Square (multinomial logistic regression algorithms)
McFadden's R-Square (multinomial logistic regression algorithms)
Pearson Goodness of Fit Measure (multinomial logistic regression algorithms)
Deviance Goodness of Fit Measure (multinomial logistic regression algorithms)
Overdispersion Adjustments (multinomial logistic regression algorithms)
Covariance and Correlation Matrices (multinomial logistic regression algorithms)
Parameter Statistics (multinomial logistic regression algorithms)
Likelihood Based Partial Effects (multinomial logistic regression algorithms)


Goodness of Fit Measures (multinomial logistic regression algorithms)

The following tests of the null hypothesis that the model adequately fits the data are available.


Pearson Goodness of Fit Measure (multinomial logistic regression algorithms)

Pearson chi-square,Pearson chi-square,Pearson chi-square
multinomial logistic regression algorithms,multinomial logistic regression algorithms,multinomial logistic regression algorithms

X2=mΣi=1JΣj=1(nij−ni
^
π
ij)2ni
^
π
ij

Under the null hypothesis, the Pearson goodness-of-fit statistic is asymptotically chi-squared distributed with m(J – 1) – pnr degrees of freedom.

Related Topics

Statistics (multinomial logistic regression algorithms)
Model Information (multinomial logistic regression algorithms)
Initial Model, Intercept-Only (multinomial logistic regression algorithms)
Initial Model, Empty (multinomial logistic regression algorithms)
Final Model (multinomial logistic regression algorithms)
Model Chi-Square (multinomial logistic regression algorithms)
Model with Intercepts versus Intercept-only Model (multinomial logistic regression algorithms)
Model without Intercepts versus Empty Model (multinomial logistic regression algorithms)
Pseudo R-Square (multinomial logistic regression algorithms)
Cox and Snell's R-Square (multinomial logistic regression algorithms)
Nagelkerke's R-Square (multinomial logistic regression algorithms)
McFadden's R-Square (multinomial logistic regression algorithms)
Measures of Monotone Association
Deviance Goodness of Fit Measure (multinomial logistic regression algorithms)
Overdispersion Adjustments (multinomial logistic regression algorithms)
Covariance and Correlation Matrices (multinomial logistic regression algorithms)
Parameter Statistics (multinomial logistic regression algorithms)
Likelihood Based Partial Effects (multinomial logistic regression algorithms)


Deviance Goodness of Fit Measure (multinomial logistic regression algorithms)

deviance,deviance,deviance
multinomial logistic regression algorithms,multinomial logistic regression algorithms,multinomial logistic regression algorithms

D=2mΣi=1JΣj=1nijlog(nijni
^
π
ij)

Under the null hypothesis, the Deviance goodness-of-fit statistic is asymptotically chi-squared distributed with m(J – 1) – pnr degrees of freedom.

Related Topics

Statistics (multinomial logistic regression algorithms)
Model Information (multinomial logistic regression algorithms)
Initial Model, Intercept-Only (multinomial logistic regression algorithms)
Initial Model, Empty (multinomial logistic regression algorithms)
Final Model (multinomial logistic regression algorithms)
Model Chi-Square (multinomial logistic regression algorithms)
Model with Intercepts versus Intercept-only Model (multinomial logistic regression algorithms)
Model without Intercepts versus Empty Model (multinomial logistic regression algorithms)
Pseudo R-Square (multinomial logistic regression algorithms)
Cox and Snell's R-Square (multinomial logistic regression algorithms)
Nagelkerke's R-Square (multinomial logistic regression algorithms)
McFadden's R-Square (multinomial logistic regression algorithms)
Measures of Monotone Association
Pearson Goodness of Fit Measure (multinomial logistic regression algorithms)
Overdispersion Adjustments (multinomial logistic regression algorithms)
Covariance and Correlation Matrices (multinomial logistic regression algorithms)
Parameter Statistics (multinomial logistic regression algorithms)
Likelihood Based Partial Effects (multinomial logistic regression algorithms)


Overdispersion Adjustments (multinomial logistic regression algorithms)

overdispersion adjustments,overdispersion adjustments,overdispersion adjustments
multinomial logistic regression algorithms,multinomial logistic regression algorithms,multinomial logistic regression algorithms

Let
^
κ
> 0 be an estimate of the overdispersion parameter. Possible estimates of this parameter are:

• A positive value specified in the command. If no value is specified, 1 is assumed.

• The ratio of Pearson goodness-of-fit measure to its degrees of freedom:

^
κ
=X2m(k−1)−pnr

• The ratio of Deviance goodness of fit measure to its degrees of freedoms:

^
κ
=Dm(k−1)−pnr

Related Topics

Statistics (multinomial logistic regression algorithms)
Model Information (multinomial logistic regression algorithms)
Initial Model, Intercept-Only (multinomial logistic regression algorithms)
Initial Model, Empty (multinomial logistic regression algorithms)
Final Model (multinomial logistic regression algorithms)
Model Chi-Square (multinomial logistic regression algorithms)
Model with Intercepts versus Intercept-only Model (multinomial logistic regression algorithms)
Model without Intercepts versus Empty Model (multinomial logistic regression algorithms)
Pseudo R-Square (multinomial logistic regression algorithms)
Cox and Snell's R-Square (multinomial logistic regression algorithms)
Nagelkerke's R-Square (multinomial logistic regression algorithms)
McFadden's R-Square (multinomial logistic regression algorithms)
Measures of Monotone Association
Pearson Goodness of Fit Measure (multinomial logistic regression algorithms)
Deviance Goodness of Fit Measure (multinomial logistic regression algorithms)
Covariance and Correlation Matrices (multinomial logistic regression algorithms)
Parameter Statistics (multinomial logistic regression algorithms)
Likelihood Based Partial Effects (multinomial logistic regression algorithms)


Covariance and Correlation Matrices (multinomial logistic regression algorithms)

The estimate of the covariance matrix of the parameters is the inverse of the negative of the second derivative of the log-likelihood evaluated at B=B(ν), multiplied by the estimate of the overdispersion parameter.

Cov (
^
B
)=
^
κ
[mΣi=1X*i
^
Δ
iX*i´]−1

Let
^
σ
be the (J-1)p 1 vector of the square roots of the diagonal elements in Cov (
^
B
). The estimate of the correlation matrix of
^
B
is

Cor(
^
B
)=Diag(
^
σ
−1)Cov(
^
B
)Diag(
^
σ
−1)

Related Topics

Statistics (multinomial logistic regression algorithms)
Model Information (multinomial logistic regression algorithms)
Initial Model, Intercept-Only (multinomial logistic regression algorithms)
Initial Model, Empty (multinomial logistic regression algorithms)
Final Model (multinomial logistic regression algorithms)
Model Chi-Square (multinomial logistic regression algorithms)
Model with Intercepts versus Intercept-only Model (multinomial logistic regression algorithms)
Model without Intercepts versus Empty Model (multinomial logistic regression algorithms)
Pseudo R-Square (multinomial logistic regression algorithms)
Cox and Snell's R-Square (multinomial logistic regression algorithms)
Nagelkerke's R-Square (multinomial logistic regression algorithms)
McFadden's R-Square (multinomial logistic regression algorithms)
Measures of Monotone Association
Pearson Goodness of Fit Measure (multinomial logistic regression algorithms)
Deviance Goodness of Fit Measure (multinomial logistic regression algorithms)
Overdispersion Adjustments (multinomial logistic regression algorithms)
Parameter Statistics (multinomial logistic regression algorithms)
Likelihood Based Partial Effects (multinomial logistic regression algorithms)


Parameter Statistics (multinomial logistic regression algorithms)

An estimate of the standard deviation of
^
B
js is
^
σ
js. The Wald statistic for
^
B
js is

Wald js=
^
B
js
^
σ
js

Under the null hypothesis that H0:Bjs=0, Wald 2js is asymptotically chi-square distributed with 1 degree of freedom.

Based on the asymptotic normality of the parameter estimate, a 100(1−α )% Wald confidence interval for
^
B
js is

^
B
js±z1−α/2
^
σ
js

where z1−α/2 is the upper (1−α/2)100th percentile of the standard normal distribution.

Related Topics

Statistics (multinomial logistic regression algorithms)
Model Information (multinomial logistic regression algorithms)
Initial Model, Intercept-Only (multinomial logistic regression algorithms)
Initial Model, Empty (multinomial logistic regression algorithms)
Final Model (multinomial logistic regression algorithms)
Model Chi-Square (multinomial logistic regression algorithms)
Model with Intercepts versus Intercept-only Model (multinomial logistic regression algorithms)
Model without Intercepts versus Empty Model (multinomial logistic regression algorithms)
Pseudo R-Square (multinomial logistic regression algorithms)
Cox and Snell's R-Square (multinomial logistic regression algorithms)
Nagelkerke's R-Square (multinomial logistic regression algorithms)
McFadden's R-Square (multinomial logistic regression algorithms)
Measures of Monotone Association
Pearson Goodness of Fit Measure (multinomial logistic regression algorithms)
Deviance Goodness of Fit Measure (multinomial logistic regression algorithms)
Overdispersion Adjustments (multinomial logistic regression algorithms)
Covariance and Correlation Matrices (multinomial logistic regression algorithms)
Likelihood Based Partial Effects (multinomial logistic regression algorithms)


Predicted Cell Counts (multinomial logistic regression algorithms)

At each subpopulation i, the predicted count for response category Y=j is

^
n
ij=ni
^
π
ij

The (raw) residual is nij−
^
n
ij and the standardized residual is (nij−
^
n
ij)/
√ ni
^
π
ij(1−
^
π
ij)
.


Likelihood Based Partial Effects (multinomial logistic regression algorithms)

A likelihood ratio test is performed for any effect (except intercept) in the model. The procedure to perform a likelihood ratio test for any effect e is as follows:

1. Form a submodel that has all the effects in the working model but the one (e) of interest.

2. Fit the submodel and calculate the value of its –2 log-likelihood, denote it by −2l(
^
π
(e)). Moreover, let the number of non-redundant parameters in this submodel be pnr(e).

3. Calculate the difference between the –2 log-likelihood of the submodel and that of the working model, {−2l(
^
π
(e))}−{−2l(
^
π
)}.

Under the null hypothesis that the effect e of interest is zero, {−2l(
^
π
(e))}−{−2l(
^
π
)} is asymptotically chi-square distributed with pnr−pnr(e) degrees of freedom.

Related Topics

Statistics (multinomial logistic regression algorithms)
Model Information (multinomial logistic regression algorithms)
Initial Model, Intercept-Only (multinomial logistic regression algorithms)
Initial Model, Empty (multinomial logistic regression algorithms)
Final Model (multinomial logistic regression algorithms)
Model Chi-Square (multinomial logistic regression algorithms)
Model with Intercepts versus Intercept-only Model (multinomial logistic regression algorithms)
Model without Intercepts versus Empty Model (multinomial logistic regression algorithms)
Pseudo R-Square (multinomial logistic regression algorithms)
Cox and Snell's R-Square (multinomial logistic regression algorithms)
Nagelkerke's R-Square (multinomial logistic regression algorithms)
McFadden's R-Square (multinomial logistic regression algorithms)
Measures of Monotone Association
Pearson Goodness of Fit Measure (multinomial logistic regression algorithms)
Deviance Goodness of Fit Measure (multinomial logistic regression algorithms)
Overdispersion Adjustments (multinomial logistic regression algorithms)
Covariance and Correlation Matrices (multinomial logistic regression algorithms)
Parameter Statistics (multinomial logistic regression algorithms)


Linear Hypothesis Testing (multinomial logistic regression algorithms)

multinomial logistic regression algorithms,multinomial logistic regression algorithms,multinomial logistic regression algorithms
hypothesis testing,hypothesis testing,hypothesis testing

For each q×p matrix of linear combinations L, J Wald’s tests are performed. Each of the first J – 1 Wald’s tests corresponds to a Wald’s test on each of the J – 1 logits. The last Wald’s test corresponds to a joint Wald’s test for all the J – 1 logits. In the following, it is assumed that q= Rank( L)≤p.

The Wald’s test corresponding to the jth logit is

Wald(L,j)=(L
^
β
j)´{LCov(
^
β
j)L´}−1(L
^
β
j)

Under the null hypothesis, H0:Lβj=0, Wald( L,j) is asymptotically chi-square distributed with q degrees of freedom.

Let L* be a (J – 1)q× (J – 1)p matrix,

L*=(
L 0 ... 0
0 L
·
·
·
·
·
·
·
·
·
0
0 ... 0 L
)

The Wald’s joint test for all logits is

Wald( L,°)=(L*
^
B
)´{L* Cov (
^
B
)L*´}−1(L*
^
B
)

Under the null hypothesis, H0:L*B=0, Wald( L,°) is asymptotically chi-square distributed with (J−1)q degrees of freedom.

Related Topics

NOMREG Algorithms
Notation (multinomial logistic regression algorithms)
Data Aggregation (multinomial logistic regression algorithms)
Data Assumptions (multinomial logistic regression algorithms)
Model (multinomial logistic regression algorithms)
Log-likelihood (multinomial logistic regression algorithms)
Parameter Estimation (multinomial logistic regression algorithms)
Stepwise Variable Selection (multinomial logistic regression algorithms)
Statistics (multinomial logistic regression algorithms)
Classification Table (multinomial logistic regression algorithms)
Checking for Separation (multinomial logistic regression algorithms)
References (multinomial logistic regression algorithms)


Classification Table (multinomial logistic regression algorithms)

multinomial logistic regression algorithms,multinomial logistic regression algorithms,multinomial logistic regression algorithms
classification,classification,classification

Suppose that c(j, j’) is the (j, j’)-th element of the classification table, j, j’ = 1, …, J. c(j, j’) is the sum of the frequencies for the observations whose actual response category is j (as row) and predicted response category is j’ (as column) respectively.

The predicted response category for subpopulation i is

j * :
^
π
ij * =
max
j
(
^
π
ij)

Should there be a tie, choose the category with the smallest category number.

For j, j’ = 1, …, J, c(j, j’) is given as

c(j,j´)=mΣi=1nijδj*i j´

The percentage of total correct predictions of the model is

p(°)=(Σnj=1c(j,j)n)100%

The percentage of correct predictions of the model for response category j is

p(°)=(c(j,j)Σmi=1nij)100%

Related Topics

NOMREG Algorithms
Notation (multinomial logistic regression algorithms)
Data Aggregation (multinomial logistic regression algorithms)
Data Assumptions (multinomial logistic regression algorithms)
Model (multinomial logistic regression algorithms)
Log-likelihood (multinomial logistic regression algorithms)
Parameter Estimation (multinomial logistic regression algorithms)
Stepwise Variable Selection (multinomial logistic regression algorithms)
Statistics (multinomial logistic regression algorithms)
Linear Hypothesis Testing (multinomial logistic regression algorithms)
Checking for Separation (multinomial logistic regression algorithms)
References (multinomial logistic regression algorithms)


Checking for Separation (multinomial logistic regression algorithms)

The algorithm checks for separation in the data starting with iteration ν chksep (20 by default). To check for separation:

1. For each subpopulation i, find j * :
^
π
ij * =
max
j
(
^
π
ij).

2. If nij * =ni, then there is a perfect prediction for subpopulation i.

3. If all subpopulations have perfect prediction, then there is complete separation. If some patterns have perfect prediction and the Hessian of
^
B
is singular, then there is quasi-complete separation.

Related Topics

NOMREG Algorithms
Notation (multinomial logistic regression algorithms)
Data Aggregation (multinomial logistic regression algorithms)
Data Assumptions (multinomial logistic regression algorithms)
Model (multinomial logistic regression algorithms)
Log-likelihood (multinomial logistic regression algorithms)
Parameter Estimation (multinomial logistic regression algorithms)
Stepwise Variable Selection (multinomial logistic regression algorithms)
Statistics (multinomial logistic regression algorithms)
Linear Hypothesis Testing (multinomial logistic regression algorithms)
Classification Table (multinomial logistic regression algorithms)
References (multinomial logistic regression algorithms)


References (multinomial logistic regression algorithms)

multinomial logistic regression algorithms,multinomial logistic regression algorithms,multinomial logistic regression algorithms
references,references,references

Agresti, A. 2002. Categorical Data Analysis, 2nd ed. New York: John Wiley and Sons.

Cohen, A., and M. Rom. 1994. A Method for Hypothesis Tests in Polychotomous Logistic Regression. Computational Statistics and Data Analysis, 17, 277-288.

Cox, D. R., and E. J. Snell. 1989. The Analysis of Binary Data, 2nd ed. London: Chapman and Hall.

Cramer, J. S., and G. Ridder. 1988. The Logit Model in Economics. Statistica Neerlandica, 42, 291-314.

Haberman, S. 1974. The Analysis of Frequency Data. Chicago: University of Chicago Press.

Hauck, W. W., and A. Donner. 1977. Wald’s Test as Applied to Hypotheses in Logit Analysis. Journal of the American Statistical Association, 72, 851-853.

Hosmer, D. W., and S. Lemeshow. 2000. Applied Logistic Regression, 2nd ed. New York: John Wiley and Sons.

Long, J. S. 1997. Regression Models for Categorical and Limited Dependent Variables. New York: Advanced Quantitative Techniques in the Social Sciences Series.

Luce, R. D. 1959. Individual Choice Behavior. New York: John Wiley.

McCullagh, P., and J. A. Nelder. 1989. Generalized Linear Models, 2nd ed. London: Chapman & Hall.

McFadden, D. 1974. Conditional logit analysis of qualitative choice behavior. In: Frontiers in Economics, P. Zarembka, eds. New York: Academic Press.

Nagelkerke, N. J. D. 1991. A note on the general definition of the coefficient of determination. Biometrika, 78:3, 691-692.

Searle, R. S. 1987. Linear Models for Unbalanced Data. New York: Wiley.

Zhang, J., and S. D. Hoffman. 1993. Discrete-Choice Logit Models. Testing the IIA Property. Sociological Methods and Research, 22:2, 193-213.

Related Topics

NOMREG Algorithms
Notation (multinomial logistic regression algorithms)
Data Aggregation (multinomial logistic regression algorithms)
Data Assumptions (multinomial logistic regression algorithms)
Model (multinomial logistic regression algorithms)
Log-likelihood (multinomial logistic regression algorithms)
Parameter Estimation (multinomial logistic regression algorithms)
Stepwise Variable Selection (multinomial logistic regression algorithms)
Statistics (multinomial logistic regression algorithms)
Linear Hypothesis Testing (multinomial logistic regression algorithms)
Classification Table (multinomial logistic regression algorithms)
Checking for Separation (multinomial logistic regression algorithms)


NONPAR CORR Algorithms

NONPAR CORR (command),NONPAR CORR (command),NONPAR CORR (command)
algorithms,algorithms,algorithms
Bivariate Correlations,Bivariate Correlations,Bivariate Correlations
algorithms,algorithms,algorithms
nonparametric correlations algorithms,nonparametric correlations algorithms,nonparametric correlations algorithms

If a WEIGHT variable is specified, it is used to replicate a case as many times as indicated by the weight value rounded to the nearest integer. If the workspace requirements are exceeded and sampling has been selected, a random sample of cases is chosen for analysis using the algorithm described in SAMPLE. For the RUNS test, if sampling is specified, it is ignored. The tests are described in (Siegel, 1956).

Related Topics

Spearman Correlation Coefficient (nonparametric correlations algorithms)
Kendall's Tau (nonparametric correlations algorithms)
References (nonparametric correlations algorithms)


Spearman Correlation Coefficient (nonparametric correlations algorithms)

nonparametric correlations algorithms,nonparametric correlations algorithms,nonparametric correlations algorithms
Spearman correlation coefficient,Spearman correlation coefficient,Spearman correlation coefficient

For each of the variables X and Y separately, the observations are sorted into ascending order and replaced by their ranks. In situations where t observations are tied, the average rank is assigned. Each time t>1, the quantity t3−t is calculated and summed separately for each variable. These sums will be designated STx and STv.

For each of the N observations, the difference between the rank of X and rank of Y is computed as:

di=R(Xi)−R(Yi)

Spearman’s rho (ρ) is calculated as (Siegel, 1956):

ρs=Tx+Ty−NΣi=1d2i2
√ TxTy

where

Tx=N3−N−STx12 and Ty=N3−N−STy12

If Tx or Ty is 0, the statistic is not computed.

The significance level is calculated assuming that, under the null hypothesis,

t=ρs
√ N−21−r2s

is distributed as a t with N−2 degrees of freedom. A one- or two-tailed significance level is printed depending on the user-selected option.

Related Topics

NONPAR CORR Algorithms
Kendall's Tau (nonparametric correlations algorithms)
References (nonparametric correlations algorithms)


Kendall's Tau (nonparametric correlations algorithms)

nonparametric correlations algorithms,nonparametric correlations algorithms,nonparametric correlations algorithms
Kendall's tau,Kendall's tau,Kendall's tau

For each of the variables X and Y separately, the observations are sorted into ascending order and replaced by their ranks. In situations where t observations are tied, the average rank is assigned.

Each time t>1, the following quantities are computed and summed over all groups of ties for each variable separately.

τv=Σt2−t
τ´v=Σ(t2−t)(t−2)
τ''v=Σ(t2−t)(2t+5), and v=x or y

Each of the N cases is compared to the others to determine with how many cases its ranking of X and Y is concordant or discordant. The following procedure is used. For each distinct pair of cases (i,j), i<j the quantity

dij=[R(Xj)−R(Xi)][R(Yj)−R(Yi)]

is computed. If the sign of this product is positive, the pair of observations (i,j) is concordant, since both members of observation i are either less than or greater than their respective measurement in observation j. If the sign is negative, the pair is discordant.

The number of concordant pairs minus the number of discordant pairs is

S=N−1Σi=1NΣj=i+1 sign (dij)

where sign (dij) is defined as +1 or –1 depending on the sign of dij. Pairs in which dij=0 are ignored in the computation of S.
Kendall’s tau (τ) is computed as

τ=S
√ N2−N−τx2
√ N2−N−τy2

If the denominator is 0, the statistic is not computed.
The variance of S is estimated by (Kendall, 1955):

d=118{K(2N+5)−τ''x−τ''y}+τ´xτ´y9K(N−2)+τxτy2K

where

K=N2−N

The significance level is obtained using

Z=S
√ d

which, under the null hypothesis, is approximately normally distributed. The significance level is either one- or two-sided, depending on the user specification.

Related Topics

NONPAR CORR Algorithms
Spearman Correlation Coefficient (nonparametric correlations algorithms)
References (nonparametric correlations algorithms)


References (nonparametric correlations algorithms)

nonparametric correlations algorithms,nonparametric correlations algorithms,nonparametric correlations algorithms
references,references,references

Kendall, M. G. 1955. Rank correlation methods. London: Charles Griffin.

Siegel, S. 1956. Nonparametric statistics for the behavioral sciences. New York: McGraw-Hill.

Related Topics

NONPAR CORR Algorithms
Spearman Correlation Coefficient (nonparametric correlations algorithms)
Kendall's Tau (nonparametric correlations algorithms)


Nonparametric Tests Algorithms

NPTESTS (command),NPTESTS (command),NPTESTS (command)
algorithms,algorithms,algorithms
one-sample nonparametric tests,one-sample nonparametric tests,one-sample nonparametric tests
algorithms,algorithms,algorithms
independent-samples nonparametric tests,independent-samples nonparametric tests,independent-samples nonparametric tests
algorithms,algorithms,algorithms
paired-samples nonparametric tests,paired-samples nonparametric tests,paired-samples nonparametric tests
algorithms,algorithms,algorithms
nonparametric tests algorithms,nonparametric tests algorithms,nonparametric tests algorithms

Nonparametric tests make minimal assumptions about the underlying distribution of the data. The available nonparametric tests can be grouped into three broad categories based on how the data are organized: one-sample tests, related-samples tests, and independent-samples tests. A one-sample test analyzes one field. A test for related samples compares two or more fields for the same set of records. An independent-samples test analyzes one field that is grouped by categories of another field.

The algorithms described here are used by the NPTESTS command.

Related Topics

Notation (nonparametric tests algorithms)
Binomial Test (nonparametric tests algorithms)
Confidence Interval for Binomial Success Rate (nonparametric tests algorithms)
Chi-Square Test (nonparametric tests algorithms)
Kolmogorov-Smirnov Test, One-Sample (nonparametric tests algorithms)
Runs Test (nonparametric tests algorithms)
Wilcoxon Signed-Rank Test , One-Sample (nonparametric tests algorithms)
Mann-Whitney Test (nonparametric tests algorithms)
Wald-Wolfowitz Test (nonparametric tests algorithms)
Kolmogorov-Smirnov Test, Independent Samples (nonparametric tests algorithms)
Hodges-Lehmann Estimates, Independent Samples (nonparametric tests algorithms)
Moses Test of Extreme Reactions (nonparametric tests algorithms)
Kruskal-Wallis Test (nonparametric tests algorithms)
Median Test (nonparametric tests algorithms)
Jonckheere-Terpstra Test (nonparametric tests algorithms)
McNemar's Test (nonparametric tests algorithms)
Wilcoxon Signed-Rank Test, Matched Pairs (nonparametric tests algorithms)
Sign Test (nonparametric tests algorithms)
Marginal Homogeneity (nonparametric tests algorithms)
Hodges-Lehmann Estimates, Related Samples (nonparametric tests algorithms)
Cochran's Q Test (nonparametric tests algorithms)
Friedman's Test (nonparametric tests algorithms)
Kendall's Coefficient of Concordance (nonparametric tests algorithms)
Multiple Comparisons (nonparametric tests algorithms)
Pairwise Multiple Comparisons (nonparametric tests algorithms)
Stepwise Stepdown Multiple Comparisons (nonparametric tests algorithms)
References (nonparametric tests algorithms)


Notation (nonparametric tests algorithms)

nonparametric tests algorithms,nonparametric tests algorithms,nonparametric tests algorithms
notation,notation,notation

The following notation is used throughout this chapter unless otherwise stated:

{xi,fi}ni=1

Data for one sample tests: xi is the ith observed value, and fi is the frequency/replication weight for xi.

{xi1,...,xiK,fi}ni=1

Data for K related samples tests: each x-column represents one sample, fi is the frequency/replication weight for row/record i.

{xi,gi,fi}Ni=1

Data for K independent samples: gi indicates the sample that observation xi belongs to, fi is the frequency/replication weight.

Gj={i:gi=j}

All record indices in the jth sample.

nj

The number of records in the jth sample, ignoring the frequency weight.

nj,f=
Σ
iGj
fi

The number of records in the jth sample, incorporating frequency weight.

rank (g(xi);D)

The rank of g(xi) when all {g(x):xD} are jointly ranked. If there are ties, the average rank is used.

rank(g(xi);D,f)

Like rank (g(xi);D) but frequency weights are incorporated when calculating the ranks.

Fk(x)

The cumulative distribution function of population k.

Φ(z)

The cumulative distribution function for the standard normal distribution such that.

α

The critical value for determining whether to reject the null hypothesis.

Related Topics

Nonparametric Tests Algorithms
Binomial Test (nonparametric tests algorithms)
Confidence Interval for Binomial Success Rate (nonparametric tests algorithms)
Chi-Square Test (nonparametric tests algorithms)
Kolmogorov-Smirnov Test, One-Sample (nonparametric tests algorithms)
Runs Test (nonparametric tests algorithms)
Wilcoxon Signed-Rank Test , One-Sample (nonparametric tests algorithms)
Mann-Whitney Test (nonparametric tests algorithms)
Wald-Wolfowitz Test (nonparametric tests algorithms)
Kolmogorov-Smirnov Test, Independent Samples (nonparametric tests algorithms)
Hodges-Lehmann Estimates, Independent Samples (nonparametric tests algorithms)
Moses Test of Extreme Reactions (nonparametric tests algorithms)
Kruskal-Wallis Test (nonparametric tests algorithms)
Median Test (nonparametric tests algorithms)
Jonckheere-Terpstra Test (nonparametric tests algorithms)
McNemar's Test (nonparametric tests algorithms)
Wilcoxon Signed-Rank Test, Matched Pairs (nonparametric tests algorithms)
Sign Test (nonparametric tests algorithms)
Marginal Homogeneity (nonparametric tests algorithms)
Hodges-Lehmann Estimates, Related Samples (nonparametric tests algorithms)
Cochran's Q Test (nonparametric tests algorithms)
Friedman's Test (nonparametric tests algorithms)
Kendall's Coefficient of Concordance (nonparametric tests algorithms)
Multiple Comparisons (nonparametric tests algorithms)
Pairwise Multiple Comparisons (nonparametric tests algorithms)
Stepwise Stepdown Multiple Comparisons (nonparametric tests algorithms)
References (nonparametric tests algorithms)


One-Sample Tests (nonparametric tests algorithms)

The following one-sample tests are available.

Related Topics

Binomial Test (nonparametric tests algorithms)
Confidence Interval for Binomial Success Rate (nonparametric tests algorithms)
Chi-Square Test (nonparametric tests algorithms)
Kolmogorov-Smirnov Test, One-Sample (nonparametric tests algorithms)
Runs Test (nonparametric tests algorithms)
Wilcoxon Signed-Rank Test , One-Sample (nonparametric tests algorithms)


Binomial Test (nonparametric tests algorithms)

nonparametric tests algorithms,nonparametric tests algorithms,nonparametric tests algorithms
binomial test,binomial test,binomial test
binomial test,binomial test,binomial test
nonparametric tests algorithms,nonparametric tests algorithms,nonparametric tests algorithms

For a categorical field with 2 values (or recoded categorical field with more than 2 values or recoded continuous field), this tests:

H0: The probability of success is equal to the hypothesized success probability p0.

HA (if p0=0.5): The probability of success is not equal to the hypothesized success probability (use the two-tailed p-value)

HA (if p0>0.5): The probability of success is greater than the hypothesized success probability (use the one-tailed p-value)

HA (if p0<0.5): The probability of success is less than the hypothesized success probability (use the one-tailed p-value)

Let n1,f and n2,f be the numbers of records in the success and failure categories, incorporating the frequency weight.

If n1,f+n2,f≤25, then one-tailed exact probability is

p1=min{Pr(T≤n1,f|H0), Pr(T≥n1,f|H0)}

where

Pr(T≤n1,f|H0)=n1,fΣi=0(
n1,f+n2,f
i
)pi0(1−p0)(n1,f+n2,f)−i

and

Pr(T≥n1,f|H0)=n1,f+n2,fΣi=n1,f(
n1,f+n2,f
i
)pi0(1−p0)(n1,f+n2,f)−i

The two-tailed exact probability is p=2p1.

If n1,f+n2,f>25, a normal approximation is used. Letting

Z1=n1,f+0.5−(n1,f+n2,f)p0
√ (n1,f+n2,f)p0(1−p0)

and

Z2=n1,f−0.5−(n1,f+n2,f)p0
√ (n1,f+n2,f)p0(1−p0)

the one-tailed approximate probability is

p1=min{Φ(Z1), 1−Φ(Z2)}

and the two-tailed approximate probability is p=2p1.

p<α rejects the two-tailed test if p0 = 0.5; otherwise p1<α rejects the one-tailed test.

Related Topics

Nonparametric Tests Algorithms
Notation (nonparametric tests algorithms)
Confidence Interval for Binomial Success Rate (nonparametric tests algorithms)
Chi-Square Test (nonparametric tests algorithms)
Kolmogorov-Smirnov Test, One-Sample (nonparametric tests algorithms)
Runs Test (nonparametric tests algorithms)
Wilcoxon Signed-Rank Test , One-Sample (nonparametric tests algorithms)
Mann-Whitney Test (nonparametric tests algorithms)
Wald-Wolfowitz Test (nonparametric tests algorithms)
Kolmogorov-Smirnov Test, Independent Samples (nonparametric tests algorithms)
Hodges-Lehmann Estimates, Independent Samples (nonparametric tests algorithms)
Moses Test of Extreme Reactions (nonparametric tests algorithms)
Kruskal-Wallis Test (nonparametric tests algorithms)
Median Test (nonparametric tests algorithms)
Jonckheere-Terpstra Test (nonparametric tests algorithms)
McNemar's Test (nonparametric tests algorithms)
Wilcoxon Signed-Rank Test, Matched Pairs (nonparametric tests algorithms)
Sign Test (nonparametric tests algorithms)
Marginal Homogeneity (nonparametric tests algorithms)
Hodges-Lehmann Estimates, Related Samples (nonparametric tests algorithms)
Cochran's Q Test (nonparametric tests algorithms)
Friedman's Test (nonparametric tests algorithms)
Kendall's Coefficient of Concordance (nonparametric tests algorithms)
Multiple Comparisons (nonparametric tests algorithms)
Pairwise Multiple Comparisons (nonparametric tests algorithms)
Stepwise Stepdown Multiple Comparisons (nonparametric tests algorithms)
References (nonparametric tests algorithms)


Confidence Interval for Binomial Success Rate (nonparametric tests algorithms)

nonparametric tests algorithms,nonparametric tests algorithms,nonparametric tests algorithms
binomial test,binomial test,binomial test
binomial test,binomial test,binomial test
nonparametric tests algorithms,nonparametric tests algorithms,nonparametric tests algorithms

Without loss of generality we assume that xi=0 or 1 with 1 representing success. We want to estimate the success probability p=Pr(x=1) and its confidence interval. Let T=nΣi=1fiI(xi=1)=nΣi=1fixi, nf=nΣi=1fi. The estimate of the success probability is
^
p
=Tnf. For confidence interval (pL,pU), we provide the following three ways of calculating it. For all three methods, pL=0 if
^
p
=0 and pU=1 if
^
p
=1.

Clopper-Pearson confidence interval

The Clopper-Pearson confidence interval is an exact confidence interval based on inverting the exact equal-tailed binomial test H0:p=p0. The lower and upper confidence limits are found by solving

nfΣi=T(
nf
i
)pL(1−pL)n−i=α/2
TΣi=0(
nf
i
)pU(1−pU)n−i=α/2

The solutions to these two equations are (Leemis and Trivedi, 1996)

pL=(1+nf−T+1TFα/2(2T,2(nf−T+1)))−1
pU=(1+nf−T(T+1)F1−α/2(2(T+1),2(nf−T)))−1

where Fα/2(v1,v2) is the α/2 percentile of the F-distribution F(v1,v2).

Note: The Clopper-Pearson confidence interval is conservative (coverage probability is at least 1−α) because of the discreteness of the binomial distribution. The coverage probability can be much larger than 1−α unless sample size is very big.

Jeffreys confidence interval

Jeffreys confidence interval is a Bayesian interval based on the posterior probability of p using the Jeffreys prior Beta(12,12). The resulting posterior for p is Beta(T+12,nf−T+12). Then the lower and upper confidence limits of p are the α2 and 1−α2 percentiles of this beta distribution

pL=Bα2(T+12,nf−T+12)
pU=B1−α2(T+12,nf−T+12)

Likelihood ratio confidence interval

The likelihood ratio confidence interval is constructed by inverting the acceptance region of the likelihood ratio test which accepts the null hypothesis H0:p=p0 if

−2log(Lik(p0)
sup
p
(Lik(p)))≤χ21−α(1)

or

−2(l(p0)−
sup
p
(l(p)))≤χ21−α(1)

where χ21−α(1) is the 1−α percentile of the chi-square distribution with 1 degree of freedom, Lik(p) and l(p) are likelihood and log likelihood functions. The log likelihood function is

l(p)=log(Lik(p))=Tlogp+(nf−T)log(1−p)

with the convention 0log(0)=0.

Inverting the likelihood ratio test is to find a range (pL,pU) for p0 such that within this range −2(l(p0)−l(
^
p
))≤χ21−α(1) or equivalently l(p0)−l(
^
p
)+χ21−α(1)2≥0 is satisfied. The function h(p0)=l(p0)−l(
^
p
)+χ21−α(1)2 is well behaved with h(0)=−∞,h(1)=−∞, maximum at h(
^
p
)=χ21−α(1)2, increasing for p0<
^
p
and decreasing for p0>
^
p
because its first derivative is

h´(p0)=T−nfp0p0(1−p0)=nf(
^
p
−p0)p0(1−p0)={
>0
=0
p0<
^
p
p0=
^
p
<0 p0>
^
p

The two solutions for h(p0)=0, one on each side of
^
p
, correspond to pL(<
^
p
) and pU(>
^
p
). To obtain the solutions, the Newton-Raphson iterative method is used to solve the equation h(p0)=0. Letting p(v) be the solution at iteration step v, the solution p(v+1) at iteration step v + 1 is updated as

p(v+1)=p(v)−ξh(p(v))h´(p(v))=p(v)−ξp(v)(1−p(v))T−nfp(v)h(p(v))

The stepping scalar ξ > 0 is used to make sure |h(p(v+1))|<|h(p(v)))| and 0<p(v+1)<1. We use the step-halving method if either |h(p(v+1))|<|h(p(v)))| or 0<p(v+1)<1 is not satisfied. Let s be the maximum number of steps in step-halving, the set of values of ξ is {1/2r: r = 0, …, s−1}.

Iterations start with an initial value p(0) and continue until one of the stopping criteria is reached. Only pU needs to be calculated when
^
p
=0 because pL=0; and only pL needs to be calculated when
^
p
=1 because pU=1. In fact, a closed form solution exists in these special situations, <semantics>pU=1−exp﻿(−χ21−α(1)2nf)<annotation></annotation></semantics> for
^
p
=0, and <semantics>pL=exp﻿(−χ21−α(1)2nf)<annotation></annotation></semantics> for
^
p
=1 .

Initial values. Any initial value p(0)(0,
^
p
) will lead to a solution for pL, and any initial value p(0)(
^
p
,1) will lead to pU. Let pL,J,pU,J be the Jeffreys lower and upper confidence limits. We will take the following as the initial values for the lower and upper confidence limits

p(0)L={
pL,J if pL,J<
^
p
^
p
/2 		otherwise
p(0)U={
pU,J if pU,J>
^
p
(
^
p
+1)/2 		otherwise

Stopping criteria. Let ε=10−8. The following stopping criteria are checked in the following order.

1. Absolute argument convergence criterion: |p(v+1)−p(v)|<ε

2. Relative argument convergence criterion: |p(v+1)−p(v)||p(v)|+10−12<ε

3. Function convergence criterion: |h(p(v+1))|<ε

4. The maximum number of iterations, default at 50, is reached, or the maximum number of steps in step-halving is reached, default at 20.

Related Topics

Nonparametric Tests Algorithms
Notation (nonparametric tests algorithms)
Binomial Test (nonparametric tests algorithms)
Chi-Square Test (nonparametric tests algorithms)
Kolmogorov-Smirnov Test, One-Sample (nonparametric tests algorithms)
Runs Test (nonparametric tests algorithms)
Wilcoxon Signed-Rank Test , One-Sample (nonparametric tests algorithms)
Mann-Whitney Test (nonparametric tests algorithms)
Wald-Wolfowitz Test (nonparametric tests algorithms)
Kolmogorov-Smirnov Test, Independent Samples (nonparametric tests algorithms)
Hodges-Lehmann Estimates, Independent Samples (nonparametric tests algorithms)
Moses Test of Extreme Reactions (nonparametric tests algorithms)
Kruskal-Wallis Test (nonparametric tests algorithms)
Median Test (nonparametric tests algorithms)
Jonckheere-Terpstra Test (nonparametric tests algorithms)
McNemar's Test (nonparametric tests algorithms)
Wilcoxon Signed-Rank Test, Matched Pairs (nonparametric tests algorithms)
Sign Test (nonparametric tests algorithms)
Marginal Homogeneity (nonparametric tests algorithms)
Hodges-Lehmann Estimates, Related Samples (nonparametric tests algorithms)
Cochran's Q Test (nonparametric tests algorithms)
Friedman's Test (nonparametric tests algorithms)
Kendall's Coefficient of Concordance (nonparametric tests algorithms)
Multiple Comparisons (nonparametric tests algorithms)
Pairwise Multiple Comparisons (nonparametric tests algorithms)
Stepwise Stepdown Multiple Comparisons (nonparametric tests algorithms)
References (nonparametric tests algorithms)


Chi-Square Test (nonparametric tests algorithms)

nonparametric tests algorithms,nonparametric tests algorithms,nonparametric tests algorithms
chi-square test,chi-square test,chi-square test
chi-square test,chi-square test,chi-square test
nonparametric tests algorithms,nonparametric tests algorithms,nonparametric tests algorithms

For a categorical field, this tests:

H0: The probability of each category i equals the hypothesized probability Pi.

HA: At least one category's probability does not equal its hypothesized probability.

The test statistic is

χ2=kΣi=1(Oi,f−EXPi)2EXPi

where Oi,f and EXPi=Pinf are the observed and expected frequencies of category i.

The one-sided p-value is

p=Pr(χ2k−1≥χ2)=1−Pr(χ2k−1≤χ2)

where χ2k−1 follows a chi-square distribution with k−1 degrees of freedom.

p<α rejects the null hypothesis.

Related Topics

Nonparametric Tests Algorithms
Notation (nonparametric tests algorithms)
Binomial Test (nonparametric tests algorithms)
Confidence Interval for Binomial Success Rate (nonparametric tests algorithms)
Kolmogorov-Smirnov Test, One-Sample (nonparametric tests algorithms)
Runs Test (nonparametric tests algorithms)
Wilcoxon Signed-Rank Test , One-Sample (nonparametric tests algorithms)
Mann-Whitney Test (nonparametric tests algorithms)
Wald-Wolfowitz Test (nonparametric tests algorithms)
Kolmogorov-Smirnov Test, Independent Samples (nonparametric tests algorithms)
Hodges-Lehmann Estimates, Independent Samples (nonparametric tests algorithms)
Moses Test of Extreme Reactions (nonparametric tests algorithms)
Kruskal-Wallis Test (nonparametric tests algorithms)
Median Test (nonparametric tests algorithms)
Jonckheere-Terpstra Test (nonparametric tests algorithms)
McNemar's Test (nonparametric tests algorithms)
Wilcoxon Signed-Rank Test, Matched Pairs (nonparametric tests algorithms)
Sign Test (nonparametric tests algorithms)
Marginal Homogeneity (nonparametric tests algorithms)
Hodges-Lehmann Estimates, Related Samples (nonparametric tests algorithms)
Cochran's Q Test (nonparametric tests algorithms)
Friedman's Test (nonparametric tests algorithms)
Kendall's Coefficient of Concordance (nonparametric tests algorithms)
Multiple Comparisons (nonparametric tests algorithms)
Pairwise Multiple Comparisons (nonparametric tests algorithms)
Stepwise Stepdown Multiple Comparisons (nonparametric tests algorithms)
References (nonparametric tests algorithms)


Kolmogorov-Smirnov Test, One-Sample (nonparametric tests algorithms)

nonparametric tests algorithms,nonparametric tests algorithms,nonparametric tests algorithms
Kolmogorov-Smirnov test,Kolmogorov-Smirnov test,Kolmogorov-Smirnov test
Kolmogorov-Smirnov test,Kolmogorov-Smirnov test,Kolmogorov-Smirnov test
nonparametric tests algorithms,nonparametric tests algorithms,nonparametric tests algorithms

For a continuous field, this tests:

H0: F(x)=F0(x) for all x, where F(x) is the distribution of the sample and F0(x) is the hypothesized distribution which can be the uniform, the Poisson, the normal or the exponential distribution.

HA: F(x)≠F0(x) for some x.

Empirical cumulative distribution function

The observations are sorted into ascending order: x(1)<x(2)<...<x(m), where m is the number of distinct values of X. Then the empirical cdf is

^
F
(x)={
0,           −∞<x<x(1)
mΣi=1fiI{x<x(k+1)}nΣi=1fi,       x(k)≤x<x(k+1),k=1,...,m−1
1,           x(m)≤x<∞

Theoretical cumulative distribution function

Uniform

F0(xi)=xi−minmax−min

where min and max are user-specified (default sample minimum and maximum).

Poisson

F0(xi)=xiΣl=0e−λλll!

where λ is user-specified (default sample mean). If λ≥100,000, the normal approximation is used with μ=λ and σ=
√ λ
.

Normal

F0(xi)=Φ(xi−μσ)

where μ and σ are user-specified (default sample mean and standard deviation).

Exponential

F0(xi)=1−e−βxi

where β is user-specified (default inverse sample mean).

Test statistic and p-value

The test statistic is calculated based on differences between the empirical cumulative distribution and the theoretical cumulative distribution. For the uniform, normal and exponential distributions, two differences are computed:

Di=
^
F
(x(i−1))−F0(x(i))
˜
D
i=
^
F
(x(i))−F0(x(i))

for i=1,...,m. For the Poisson:

Di={
^
F
(x(i)−1)−F0(x(i)−1),     x(i)>0,.
0                       x(i)=0
˜
D
i=
^
F
(x(i))−F0(x(i))

for i=1,...,m.

The test statistic is

Z=
√ nΣj=1fj
maxi(|Di|, |
˜
D
i|)

The two-tailed probability level is estimated using the first three terms of the Smirnov (1948) formula.

p={
1 | 0≤Z<0.27
1−
√ 2π
Z(Q+Q9+Q25), 		Q=e−π2/8Z2 0.27≤Z<1
2(Q−Q4+Q9−Q16), | Q=e−2Z2 | 1≤Z<3.1
0 | Z≥3.1

p<α rejects the null hypothesis.

Related Topics

Nonparametric Tests Algorithms
Notation (nonparametric tests algorithms)
Binomial Test (nonparametric tests algorithms)
Confidence Interval for Binomial Success Rate (nonparametric tests algorithms)
Chi-Square Test (nonparametric tests algorithms)
Runs Test (nonparametric tests algorithms)
Wilcoxon Signed-Rank Test , One-Sample (nonparametric tests algorithms)
Mann-Whitney Test (nonparametric tests algorithms)
Wald-Wolfowitz Test (nonparametric tests algorithms)
Kolmogorov-Smirnov Test, Independent Samples (nonparametric tests algorithms)
Hodges-Lehmann Estimates, Independent Samples (nonparametric tests algorithms)
Moses Test of Extreme Reactions (nonparametric tests algorithms)
Kruskal-Wallis Test (nonparametric tests algorithms)
Median Test (nonparametric tests algorithms)
Jonckheere-Terpstra Test (nonparametric tests algorithms)
McNemar's Test (nonparametric tests algorithms)
Wilcoxon Signed-Rank Test, Matched Pairs (nonparametric tests algorithms)
Sign Test (nonparametric tests algorithms)
Marginal Homogeneity (nonparametric tests algorithms)
Hodges-Lehmann Estimates, Related Samples (nonparametric tests algorithms)
Cochran's Q Test (nonparametric tests algorithms)
Friedman's Test (nonparametric tests algorithms)
Kendall's Coefficient of Concordance (nonparametric tests algorithms)
Multiple Comparisons (nonparametric tests algorithms)
Pairwise Multiple Comparisons (nonparametric tests algorithms)
Stepwise Stepdown Multiple Comparisons (nonparametric tests algorithms)
References (nonparametric tests algorithms)


Runs Test (nonparametric tests algorithms)

nonparametric tests algorithms,nonparametric tests algorithms,nonparametric tests algorithms
runs test,runs test,runs test
runs test,runs test,runs test
nonparametric tests algorithms,nonparametric tests algorithms,nonparametric tests algorithms

For a categorical field with 2 values (or a recoded categorical field with more than 2 values or a recoded continuous field), this tests:

H0: The observed order of observations of a field is attributable to chance variation.

Number of runs

The number of times that the category changes; that is, where xi belongs to one category and xi+1 belongs to the other, as well as the number of records in category 1 (n1,f) and category 2 (n2,f), are determined. The number of runs, R, is the number of sign changes plus one.

Test statistic and p-value

The sampling distribution of the number of runs is approximately normal with

μR=2n1,fn2,fn1,f+n2,f+1
σR=
√ 2n1,fn2,f(2n1,fn2,f−n1,f−n2,f)(n1,f+n2,f)2(n1,f+n2,f−1)

The test statistic is

z=R−μRσR, if nf≥50, otherwise

z={
(R−μR+0.5)/σR | if R−μR≤−0.5
(R−μR−0.5)/σR | if R−μR≥0.5
0 | if |R−μR|<0.5

The one sided p-value is p1=Pr(Z≥|z|)=1−Φ(|z|) and the two sided p-value is p2=2p1.

p2<α rejects the null hypothesis.

Related Topics

Nonparametric Tests Algorithms
Notation (nonparametric tests algorithms)
Binomial Test (nonparametric tests algorithms)
Confidence Interval for Binomial Success Rate (nonparametric tests algorithms)
Chi-Square Test (nonparametric tests algorithms)
Kolmogorov-Smirnov Test, One-Sample (nonparametric tests algorithms)
Wilcoxon Signed-Rank Test , One-Sample (nonparametric tests algorithms)
Mann-Whitney Test (nonparametric tests algorithms)
Wald-Wolfowitz Test (nonparametric tests algorithms)
Kolmogorov-Smirnov Test, Independent Samples (nonparametric tests algorithms)
Hodges-Lehmann Estimates, Independent Samples (nonparametric tests algorithms)
Moses Test of Extreme Reactions (nonparametric tests algorithms)
Kruskal-Wallis Test (nonparametric tests algorithms)
Median Test (nonparametric tests algorithms)
Jonckheere-Terpstra Test (nonparametric tests algorithms)
McNemar's Test (nonparametric tests algorithms)
Wilcoxon Signed-Rank Test, Matched Pairs (nonparametric tests algorithms)
Sign Test (nonparametric tests algorithms)
Marginal Homogeneity (nonparametric tests algorithms)
Hodges-Lehmann Estimates, Related Samples (nonparametric tests algorithms)
Cochran's Q Test (nonparametric tests algorithms)
Friedman's Test (nonparametric tests algorithms)
Kendall's Coefficient of Concordance (nonparametric tests algorithms)
Multiple Comparisons (nonparametric tests algorithms)
Pairwise Multiple Comparisons (nonparametric tests algorithms)
Stepwise Stepdown Multiple Comparisons (nonparametric tests algorithms)
References (nonparametric tests algorithms)


Wilcoxon Signed-Rank Test , One-Sample (nonparametric tests algorithms)

nonparametric tests algorithms,nonparametric tests algorithms,nonparametric tests algorithms
Wilcoxon signed-rank test,Wilcoxon signed-rank test,Wilcoxon signed-rank test
Wilcoxon signed-rank test,Wilcoxon signed-rank test,Wilcoxon signed-rank test
nonparametric tests algorithms,nonparametric tests algorithms,nonparametric tests algorithms

For a continuous field, this tests:

H0: median (X)=θ where θ is user-specified (default to sample median).

Let di=xi−θ, D={di:|di|≠0}. The test statistic is the sum of positive ranks incorporating the frequency weights:

T=ΣiDfi rank (|di|;D,f)I(sgn(di)>0)

The standardized test statistic is

T*=T−μTσT

where

μT=14nf(nf+1)
σ2T=124nf(nf+1)(2nf+1)−148MΣj=1(t3j,f−tj,f)
nf=ΣiDfi

where M is the total number of distinct rank values of |di|>0 and tj,f is the number of records tied at the jth distinct value, incorporating the frequency weights.

The asymptotic one-sided and two-sided p-values are

p1=Pr(Z≥|T*|)=1−Φ(|T*|)
p=2p1

p1<α rejects the null hypothesis in favor of median (X)>θ if T*>0 and in favor of median (X)<θ if T*<0.

Note: The one-sample Wilcoxon signed-rank test is equivalent to the matched-pairs Wilcoxon signed-rank test when the second sample replaced by a constant θ.

Related Topics

Nonparametric Tests Algorithms
Notation (nonparametric tests algorithms)
Binomial Test (nonparametric tests algorithms)
Confidence Interval for Binomial Success Rate (nonparametric tests algorithms)
Chi-Square Test (nonparametric tests algorithms)
Kolmogorov-Smirnov Test, One-Sample (nonparametric tests algorithms)
Runs Test (nonparametric tests algorithms)
Mann-Whitney Test (nonparametric tests algorithms)
Wald-Wolfowitz Test (nonparametric tests algorithms)
Kolmogorov-Smirnov Test, Independent Samples (nonparametric tests algorithms)
Hodges-Lehmann Estimates, Independent Samples (nonparametric tests algorithms)
Moses Test of Extreme Reactions (nonparametric tests algorithms)
Kruskal-Wallis Test (nonparametric tests algorithms)
Median Test (nonparametric tests algorithms)
Jonckheere-Terpstra Test (nonparametric tests algorithms)
McNemar's Test (nonparametric tests algorithms)
Wilcoxon Signed-Rank Test, Matched Pairs (nonparametric tests algorithms)
Sign Test (nonparametric tests algorithms)
Marginal Homogeneity (nonparametric tests algorithms)
Hodges-Lehmann Estimates, Related Samples (nonparametric tests algorithms)
Cochran's Q Test (nonparametric tests algorithms)
Friedman's Test (nonparametric tests algorithms)
Kendall's Coefficient of Concordance (nonparametric tests algorithms)
Multiple Comparisons (nonparametric tests algorithms)
Pairwise Multiple Comparisons (nonparametric tests algorithms)
Stepwise Stepdown Multiple Comparisons (nonparametric tests algorithms)
References (nonparametric tests algorithms)


Independent Samples Tests (nonparametric tests algorithms)

The following independent-samples tests are available.

Related Topics

Mann-Whitney Test (nonparametric tests algorithms)
Wald-Wolfowitz Test (nonparametric tests algorithms)
Kolmogorov-Smirnov Test, Independent Samples (nonparametric tests algorithms)
Hodges-Lehmann Estimates, Independent Samples (nonparametric tests algorithms)
Moses Test of Extreme Reactions (nonparametric tests algorithms)
Kruskal-Wallis Test (nonparametric tests algorithms)
Median Test (nonparametric tests algorithms)
Jonckheere-Terpstra Test (nonparametric tests algorithms)


Mann-Whitney Test (nonparametric tests algorithms)

nonparametric tests algorithms,nonparametric tests algorithms,nonparametric tests algorithms
Mann-Whitney test,Mann-Whitney test,Mann-Whitney test
Mann-Whitney test,Mann-Whitney test,Mann-Whitney test
nonparametric tests algorithms,nonparametric tests algorithms,nonparametric tests algorithms

For two independent samples from a continuous field, this tests:

H0: F1(x)=F2(x); that is, the two samples are from populations with the same distribution function

HA: F1(x)≥F2(x)

H´A: F1(x)≤F2(x)

The first group is defined by the first value of the grouping field in ascending order.

Calculation of Sums of Ranks

The combined data from both specified groups are sorted and ranks assigned to all records, with average rank being used in the case of ties. The sum of ranks for each group is

S1,f=
Σ
iG1
fi rank (xi; D1∪D2, f )I(xiD1)
S2,f=
Σ
iG2
fi rank (xi; D1∪D2, f )I(xiD2)

The average rank for each group is

Si=Si,f/ni,f

where ni,f=
Σ
iG*i
fiI(xiDi).

If there are tied records, the number of records tied at the jth distinct value incorporating the frequency weight, tj,f are counted.

Test statistic and p-value

The Wilcoxon rank sum W statistic is W=S2,f. The Mann-Whiney U statistic for group 1 is

U=
Σ
iG1
Σ
jG2
fifjI(xi<xj)+12
Σ
iG1
Σ
jG2
fifjI(xi=xj)
=n1,fn2,f+n1,f(n1,f+1)2−S1,f
=S2,f−n2,f(n2,f+1)2

If n1,fn2,f≤400 and n1,fn2,f/2+min(n1,f,n2,f)≤220, the exact significance level is based on an algorithm of Dineen and Blakesley (1973), which is given as follows:

Let fij(u) be the sampling frequency of the Mann-Whitney statistic for a value of U and with sample size i and j. Then the frequency distribution of the Mann-Whiney U statistic can be derived by summing two lower order distributions:

fn1,f,n2,f(u)=fn1,f−1,n2,f(u−n2,f)+fn1,f,n2,f−1(u)

Each of the lower order distribution is symmetrical about a different value of U and the sum gives a result which is also symmetrical. The algorithm starts with known distribution for i=1 (or j=1) and then uses the above equation and symmetry properties to derive the full distribution for i=2 (or j=2). This procedure is repeated until the distribution for the required value for i=n1,f (or j=n2,f).

After the complete distribution of U is obtained, the one sided and two sided p-values are

p1={
UΣu=0fn1,f,n2,f(u) | if U≤n1,fn2,f+12
1−UΣu=0fn1,f,n2,f(u) | if U>n1,fn2,f+12
p=2p1

where x is the floor integer of x.

The test statistic corrected for ties is

T=(U−μT)σT

where

μT=n1,fn2,f2
σ2T=n1,fn2,fn1 and 2,f(n1 and 2,f−1)(n31 and 2,f−n1 and 2,f12−MΣi=1Ti)
n1 and 2,f=n1,f+n2,f
Ti=t3i,f−ti,f12

and M is the total number of distinct rank values. The one sided and two sided p-values are respectively

p1=Pr(Z≥|T|)=1−Φ(|T|)
p=2p1

p1<α will reject the null hypothesis and in favor of H´A if T<0 in favor of HA if T>0. p<α will reject the null hypothesis in favor of either H´A or HA.

Related Topics

Nonparametric Tests Algorithms
Notation (nonparametric tests algorithms)
Binomial Test (nonparametric tests algorithms)
Confidence Interval for Binomial Success Rate (nonparametric tests algorithms)
Chi-Square Test (nonparametric tests algorithms)
Kolmogorov-Smirnov Test, One-Sample (nonparametric tests algorithms)
Runs Test (nonparametric tests algorithms)
Wilcoxon Signed-Rank Test , One-Sample (nonparametric tests algorithms)
Wald-Wolfowitz Test (nonparametric tests algorithms)
Kolmogorov-Smirnov Test, Independent Samples (nonparametric tests algorithms)
Hodges-Lehmann Estimates, Independent Samples (nonparametric tests algorithms)
Moses Test of Extreme Reactions (nonparametric tests algorithms)
Kruskal-Wallis Test (nonparametric tests algorithms)
Median Test (nonparametric tests algorithms)
Jonckheere-Terpstra Test (nonparametric tests algorithms)
McNemar's Test (nonparametric tests algorithms)
Wilcoxon Signed-Rank Test, Matched Pairs (nonparametric tests algorithms)
Sign Test (nonparametric tests algorithms)
Marginal Homogeneity (nonparametric tests algorithms)
Hodges-Lehmann Estimates, Related Samples (nonparametric tests algorithms)
Cochran's Q Test (nonparametric tests algorithms)
Friedman's Test (nonparametric tests algorithms)
Kendall's Coefficient of Concordance (nonparametric tests algorithms)
Multiple Comparisons (nonparametric tests algorithms)
Pairwise Multiple Comparisons (nonparametric tests algorithms)
Stepwise Stepdown Multiple Comparisons (nonparametric tests algorithms)
References (nonparametric tests algorithms)


Wald-Wolfowitz Test (nonparametric tests algorithms)

nonparametric tests algorithms,nonparametric tests algorithms,nonparametric tests algorithms
Wald-Wolfowitz test,Wald-Wolfowitz test,Wald-Wolfowitz test
Wald-Wolfowitz test,Wald-Wolfowitz test,Wald-Wolfowitz test
nonparametric tests algorithms,nonparametric tests algorithms,nonparametric tests algorithms

For two independent samples from a continuous field, this tests:

H0: F1(x)=F2(x); that is, the two samples are from populations with the same distribution function

HA: F1(x)≠F2(x) for some x

Calculation of Number of Runs

Then all observations from the two groups G1 and G2 are pooled and sorted into ascending order. The number of changes in the group corresponding to the ordered data is counted. The number of runs (R) is the number of group changes plus one. If there are ties involving observations from the two groups, both the minimum and maximum numbers of runs possible are calculated.

Suppose that m distinct values in groups G1 and G2 are sorted into ascending order:

x(1)<x(2)<...<x(m)

Let si,f and ti,f be the numbers of records of x(i) in G1 and G2 respectively, incorporating the frequency weight

si,f=
Σ
jG1
fjI(xj=x(i))

and

ti,f=
Σ
jG2
fjI(xj=x(i))

Let MinRun and MaxRun be the minimum and maximum number of runs respectively, g1 be the group indictors at the last run when computing the maximum number of runs, and g2 be the group indicator when computing the minimum number of runs. Then the following algorithm will compute the minimum and maximum number of runs.

1. MinRun=0, MaxRun=0, g1=0, g2=0, d=0, and i=0

2. i=i+1. If i>m, stop and output MinRun and MaxRun.

3. d=si,f−ti,f, Minim=min(si,f,ti,f). If Minim=0, then go to step 6.

4. MaxRun=MaxRun+2Minim, MinRun=max(MinRun+1, 2).

5. If d≠0 and d×g1≤0, then MaxRun=MaxRun+1. If d≠0, then g1=d. g2=−g2. Go to step 2.

6. If g2×d<0 or i=1, then MinRun=MinRun+1. If g1×d≤0, then MaxRun=MaxRun+1. g2=d, g1=d. Go to step 2.

Test statistic and p-value

Let n1,f=
Σ
iG1
fi and n2,f=
Σ
iG2
fi. The distribution of the number of runs, R, is approximately normal with

μR=2n1,fn2,fn1,f+n2,f+1
σR=
√ 2n1,fn2,f(2n1,fn2,f−n1,f−n2,f)(n1,f+n2,f)2(n1,f+n2,f−1)

The test statistic is

z=R−μRσR, if n1,f+n2,f≥50. Otherwise

zC={
(R−μR+0.5)/σR | if |R−μR|≥0.5
0 | if |R−μR|<0.5

The one sided p-value is p1=Pr(Z≤z)=Φ(z) or p=Pr(Z≤zC)=Φ(zC), but if n1,f+n2,f≤30 we use the following exact method to compute the one sided p-value and do not use the above approximate normal method even if the test statistic was computed. The one-sided exact p-value is calculated from

p1=Pr(r≤R)=RΣr=2fR(r)

where

fR(r)=2(
n1,f−1
r/2−1
)(
n2,f−1
r/2−1
)(
n1,f+n2,f
n1,f
)

when r is even and when r is odd

fR(r)=(
n1,f−1
(r−1)/2
)(
n2,f−1
(r−3)/2
)+(
n1,f−1
(r−3)/2
)(
n2,f−1
(r−1)/2
)(
n1,f+n2,f
n1,f
)

The conservative decision is made using the biggest number of runs. p1<α will reject the null hypothesis.

Related Topics

Nonparametric Tests Algorithms
Notation (nonparametric tests algorithms)
Binomial Test (nonparametric tests algorithms)
Confidence Interval for Binomial Success Rate (nonparametric tests algorithms)
Chi-Square Test (nonparametric tests algorithms)
Kolmogorov-Smirnov Test, One-Sample (nonparametric tests algorithms)
Runs Test (nonparametric tests algorithms)
Wilcoxon Signed-Rank Test , One-Sample (nonparametric tests algorithms)
Mann-Whitney Test (nonparametric tests algorithms)
Kolmogorov-Smirnov Test, Independent Samples (nonparametric tests algorithms)
Hodges-Lehmann Estimates, Independent Samples (nonparametric tests algorithms)
Moses Test of Extreme Reactions (nonparametric tests algorithms)
Kruskal-Wallis Test (nonparametric tests algorithms)
Median Test (nonparametric tests algorithms)
Jonckheere-Terpstra Test (nonparametric tests algorithms)
McNemar's Test (nonparametric tests algorithms)
Wilcoxon Signed-Rank Test, Matched Pairs (nonparametric tests algorithms)
Sign Test (nonparametric tests algorithms)
Marginal Homogeneity (nonparametric tests algorithms)
Hodges-Lehmann Estimates, Related Samples (nonparametric tests algorithms)
Cochran's Q Test (nonparametric tests algorithms)
Friedman's Test (nonparametric tests algorithms)
Kendall's Coefficient of Concordance (nonparametric tests algorithms)
Multiple Comparisons (nonparametric tests algorithms)
Pairwise Multiple Comparisons (nonparametric tests algorithms)
Stepwise Stepdown Multiple Comparisons (nonparametric tests algorithms)
References (nonparametric tests algorithms)


Kolmogorov-Smirnov Test, Independent Samples (nonparametric tests algorithms)

nonparametric tests algorithms,nonparametric tests algorithms,nonparametric tests algorithms
Kolmogorov-Smirnov,Kolmogorov-Smirnov,Kolmogorov-Smirnov
Kolmogorov-Smirnov,Kolmogorov-Smirnov,Kolmogorov-Smirnov
nonparametric tests algorithms,nonparametric tests algorithms,nonparametric tests algorithms

For two independent samples from a continuous field, this tests:

H0: F1(x)=F2(x); that is, the two samples are from populations with the same distribution function

HA: F1(x)≠F2(x) for some x

Calculation of the empirical cumulative distribution functions and differences

For each of the two groups, distinct values are sorted into ascending order:

Group 1: x*(1)<x*(2)<...<x*(n1),

where x*(i)D1 and n1 is the number of distinct values in G1.

Group 2: x**(1)<x**(2)<...<x**(n2),

where x**(i)D2 and n2 is the number of distinct values in G2.

Then the empirical cumulative distribution functions for Group 1 and Group 2 are computed as:

^
F
1(x)={
0 | −∞<x<x*(1)
Σ
iG1
fiI{x≤x*(k)}n1,f 		x*(k)≤x<x*(k+1)
1 | x*(n1)≤x<∞

and

^
F
2(x)={
0 | −∞<x<x**(1)
Σ
iG2
fiI{x≤x**(k)}n2,f 		x**(k)≤x<x**(k+1)
1 | x**(n2)≤x<∞

where n1,f=
Σ
iG2
fi and n2,f=
Σ
iG2
fi.

For each xj, the difference between the two groups is

If n1,f≥n2,f, dj=
^
F
1(xj)−
^
F
2(xj).

If n1,f<n2,f, dj=
^
F
2(xj)−
^
F
1(xj).

The maximum positive, negative and absolute differences are also computed.

Test statistic and p-value

The test statistic (Smirnov, 1948) is

Z=maxj|dj|
√ n1,fn2,fn1,f+n2,f

The p-value is calculated using the Smirnov approximation described in the K-S one-sample test.

p<α rejects the null hypothesis.

Related Topics

Nonparametric Tests Algorithms
Notation (nonparametric tests algorithms)
Binomial Test (nonparametric tests algorithms)
Confidence Interval for Binomial Success Rate (nonparametric tests algorithms)
Chi-Square Test (nonparametric tests algorithms)
Kolmogorov-Smirnov Test, One-Sample (nonparametric tests algorithms)
Runs Test (nonparametric tests algorithms)
Wilcoxon Signed-Rank Test , One-Sample (nonparametric tests algorithms)
Mann-Whitney Test (nonparametric tests algorithms)
Wald-Wolfowitz Test (nonparametric tests algorithms)
Hodges-Lehmann Estimates, Independent Samples (nonparametric tests algorithms)
Moses Test of Extreme Reactions (nonparametric tests algorithms)
Kruskal-Wallis Test (nonparametric tests algorithms)
Median Test (nonparametric tests algorithms)
Jonckheere-Terpstra Test (nonparametric tests algorithms)
McNemar's Test (nonparametric tests algorithms)
Wilcoxon Signed-Rank Test, Matched Pairs (nonparametric tests algorithms)
Sign Test (nonparametric tests algorithms)
Marginal Homogeneity (nonparametric tests algorithms)
Hodges-Lehmann Estimates, Related Samples (nonparametric tests algorithms)
Cochran's Q Test (nonparametric tests algorithms)
Friedman's Test (nonparametric tests algorithms)
Kendall's Coefficient of Concordance (nonparametric tests algorithms)
Multiple Comparisons (nonparametric tests algorithms)
Pairwise Multiple Comparisons (nonparametric tests algorithms)
Stepwise Stepdown Multiple Comparisons (nonparametric tests algorithms)
References (nonparametric tests algorithms)


Hodges-Lehmann Estimates, Independent Samples (nonparametric tests algorithms)

nonparametric tests algorithms,nonparametric tests algorithms,nonparametric tests algorithms
Hodges-Lehmann estimates,Hodges-Lehmann estimates,Hodges-Lehmann estimates
Hodges-Lehmann estimates,Hodges-Lehmann estimates,Hodges-Lehmann estimates
nonparametric tests algorithms,nonparametric tests algorithms,nonparametric tests algorithms

Here we assume that two samples follow the same distribution except in the location parameters; that is, if the first sample follows F(x), the second sample follows F(x+θ). We want to estimate and find the confidence interval for θ.

Let dij=xi−xj,iG1,jG2. Incorporating the frequency weight fi for xi and fj for xj, the frequency weight for dij is f*ij=fifj. Let B(1)≤...≤B(L), L=n1n2, be the ordered values of dij, and the corresponding frequency weights are f*(1),...,f*(L).

The Hodges-Lehmann estimator for θ is
^
θ
= median {B;f*}.

The Moses' confidence interval for θ is (B(k1),B(k2)].

where the median, k1 and k2 are calculated by the same formula as that in the Hodges-Lehmann estimate for paired samples (see Hodges-Lehmann Estimates, Related Samples (nonparametric tests algorithms)) but with μT and σT replaced by the expected value and standard deviation of the test statistics under null hypothesis in Mann-Whitney's test:

μT=n1,fn2,f2
σ2T=n1,fn2,f12Nf(Nf−1)(Nf(N2f−1)−MΣi=1ti,f(t2i,f−1))
=n1,fn2,f(Nf+1)12(1−MΣi=1ti,f(t2i,f−1)Nf(N2f−1))
Nf=n1,f+n2,f

where M is the total number of distinct values among all combined observations, and ti,f is the number of occurrences of the ith distinct value, incorporating the frequency weight.

Related Topics

Nonparametric Tests Algorithms
Notation (nonparametric tests algorithms)
Binomial Test (nonparametric tests algorithms)
Confidence Interval for Binomial Success Rate (nonparametric tests algorithms)
Chi-Square Test (nonparametric tests algorithms)
Kolmogorov-Smirnov Test, One-Sample (nonparametric tests algorithms)
Runs Test (nonparametric tests algorithms)
Wilcoxon Signed-Rank Test , One-Sample (nonparametric tests algorithms)
Mann-Whitney Test (nonparametric tests algorithms)
Wald-Wolfowitz Test (nonparametric tests algorithms)
Kolmogorov-Smirnov Test, Independent Samples (nonparametric tests algorithms)
Moses Test of Extreme Reactions (nonparametric tests algorithms)
Kruskal-Wallis Test (nonparametric tests algorithms)
Median Test (nonparametric tests algorithms)
Jonckheere-Terpstra Test (nonparametric tests algorithms)
McNemar's Test (nonparametric tests algorithms)
Wilcoxon Signed-Rank Test, Matched Pairs (nonparametric tests algorithms)
Sign Test (nonparametric tests algorithms)
Marginal Homogeneity (nonparametric tests algorithms)
Hodges-Lehmann Estimates, Related Samples (nonparametric tests algorithms)
Cochran's Q Test (nonparametric tests algorithms)
Friedman's Test (nonparametric tests algorithms)
Kendall's Coefficient of Concordance (nonparametric tests algorithms)
Multiple Comparisons (nonparametric tests algorithms)
Pairwise Multiple Comparisons (nonparametric tests algorithms)
Stepwise Stepdown Multiple Comparisons (nonparametric tests algorithms)
References (nonparametric tests algorithms)


Moses Test of Extreme Reactions (nonparametric tests algorithms)

nonparametric tests algorithms,nonparametric tests algorithms,nonparametric tests algorithms
Moses extreme reaction test,Moses extreme reaction test,Moses extreme reaction test
Moses extreme reaction test,Moses extreme reaction test,Moses extreme reaction test
nonparametric tests algorithms,nonparametric tests algorithms,nonparametric tests algorithms

For two independent samples from a continuous field, this tests:

H0: Extreme values are equally likely in both populations

HA: Extreme values are more likely to occur in the population from which the sample with the larger range was drawn.

Span computation

Observations from both specified groups are jointly sorted and ranked, with the average rank being assigned in the case of ties. The smallest and largest ranks of the control group (the group defined by the first value in ascending order) are determined, and the span is computed as

SPAN = The largest rank of control group-the smallest rank of control group + 1

If SPAN is not an integer, then it will be rounded to its nearest integer.

Significance Level

Let nc,f and ne,f be the numbers of records in the control group and experiment group respectively, incorporating the frequency weight, and g= SPAN - nc,f+2h. Then the exact one-tailed probability of span s is

p1=Pr(s≤ SPAN )=gΣi=0[(
i+nc,f−2h−2
i
)(
ne,f+2h+1−i
ne,f−i
)](
nc,f+ne,f
nc,f
)

where h=0. The same formula is used below where h is not zero.

Censoring the Range

The previous test is repeated, dropping the h lowest and h highest ranks from the control group, where h is a positive user-specified integer (default at the integer part of 0.05nc,f or 1, whichever is greater). If 2h>nc,f−2, then the test will be implemented using the largest integer such that 2h≤(nc,f−2).

The exact one-tailed probability is calculated by the formula above, and p1≤α rejects the null hypothesis.

Related Topics

Nonparametric Tests Algorithms
Notation (nonparametric tests algorithms)
Binomial Test (nonparametric tests algorithms)
Confidence Interval for Binomial Success Rate (nonparametric tests algorithms)
Chi-Square Test (nonparametric tests algorithms)
Kolmogorov-Smirnov Test, One-Sample (nonparametric tests algorithms)
Runs Test (nonparametric tests algorithms)
Wilcoxon Signed-Rank Test , One-Sample (nonparametric tests algorithms)
Mann-Whitney Test (nonparametric tests algorithms)
Wald-Wolfowitz Test (nonparametric tests algorithms)
Kolmogorov-Smirnov Test, Independent Samples (nonparametric tests algorithms)
Hodges-Lehmann Estimates, Independent Samples (nonparametric tests algorithms)
Kruskal-Wallis Test (nonparametric tests algorithms)
Median Test (nonparametric tests algorithms)
Jonckheere-Terpstra Test (nonparametric tests algorithms)
McNemar's Test (nonparametric tests algorithms)
Wilcoxon Signed-Rank Test, Matched Pairs (nonparametric tests algorithms)
Sign Test (nonparametric tests algorithms)
Marginal Homogeneity (nonparametric tests algorithms)
Hodges-Lehmann Estimates, Related Samples (nonparametric tests algorithms)
Cochran's Q Test (nonparametric tests algorithms)
Friedman's Test (nonparametric tests algorithms)
Kendall's Coefficient of Concordance (nonparametric tests algorithms)
Multiple Comparisons (nonparametric tests algorithms)
Pairwise Multiple Comparisons (nonparametric tests algorithms)
Stepwise Stepdown Multiple Comparisons (nonparametric tests algorithms)
References (nonparametric tests algorithms)


Kruskal-Wallis Test (nonparametric tests algorithms)

nonparametric tests algorithms,nonparametric tests algorithms,nonparametric tests algorithms
Kruskal-Wallis H,Kruskal-Wallis H,Kruskal-Wallis H
Kruskal-Wallis H,Kruskal-Wallis H,Kruskal-Wallis H
nonparametric tests algorithms,nonparametric tests algorithms,nonparametric tests algorithms

For k independent samples from a continuous field, this tests:

H0: The distributions of the k samples are the same

HA: At least one sample is different

Sum of Ranks

Observations from all k nonempty groups are jointly sorted and ranked, with the average rank being assigned in the case of ties. The number of records tied at the jth distinct value tj,f is calculated incorporating the frequency weight, and the sum of Tj,f=t3j,f−tj,f is also accumulated. For each group the sum of ranks, Ri,f, as well as the number of observations, ni,f, is obtained.

Test statistic and p-value

The test statistic unadjusted for ties is

H=12Nf(Nf+1)kΣi=1R2i,f/ni,f−3(Nf+1)

where Nf=kΣi=1ni,f. The statistic adjusted for ties is

H´=H1−mΣi=1Ti,f/(N3f−Nf)

where m is the total number of tied sets.

The one sided p-value is p1=Pr(χ2k−1≥H´)=1−Pr(χ2k−1≤H´), where χ2k−1 follows a chi-square distribution with k−1 degrees of freedom.

p1<α will reject the null hypothesis.

Related Topics

Nonparametric Tests Algorithms
Notation (nonparametric tests algorithms)
Binomial Test (nonparametric tests algorithms)
Confidence Interval for Binomial Success Rate (nonparametric tests algorithms)
Chi-Square Test (nonparametric tests algorithms)
Kolmogorov-Smirnov Test, One-Sample (nonparametric tests algorithms)
Runs Test (nonparametric tests algorithms)
Wilcoxon Signed-Rank Test , One-Sample (nonparametric tests algorithms)
Mann-Whitney Test (nonparametric tests algorithms)
Wald-Wolfowitz Test (nonparametric tests algorithms)
Kolmogorov-Smirnov Test, Independent Samples (nonparametric tests algorithms)
Hodges-Lehmann Estimates, Independent Samples (nonparametric tests algorithms)
Moses Test of Extreme Reactions (nonparametric tests algorithms)
Median Test (nonparametric tests algorithms)
Jonckheere-Terpstra Test (nonparametric tests algorithms)
McNemar's Test (nonparametric tests algorithms)
Wilcoxon Signed-Rank Test, Matched Pairs (nonparametric tests algorithms)
Sign Test (nonparametric tests algorithms)
Marginal Homogeneity (nonparametric tests algorithms)
Hodges-Lehmann Estimates, Related Samples (nonparametric tests algorithms)
Cochran's Q Test (nonparametric tests algorithms)
Friedman's Test (nonparametric tests algorithms)
Kendall's Coefficient of Concordance (nonparametric tests algorithms)
Multiple Comparisons (nonparametric tests algorithms)
Pairwise Multiple Comparisons (nonparametric tests algorithms)
Stepwise Stepdown Multiple Comparisons (nonparametric tests algorithms)
References (nonparametric tests algorithms)


Median Test (nonparametric tests algorithms)

nonparametric tests algorithms,nonparametric tests algorithms,nonparametric tests algorithms
median test,median test,median test
median test,median test,median test
nonparametric tests algorithms,nonparametric tests algorithms,nonparametric tests algorithms

For k independent samples from a continuous field, this tests:

H0: θ0=θ1=θ2=...=θk; that is, the k samples are from populations with the same median

HA: At least one population median is different

Table Construction

θ0 is user-specified (default at the sample median of the combined k samples).

The number of records in each of the groups that exceed the median are counted and the following table is formed, where O1i,f denotes the number of records that are less than or equal to the median, and O2i,f is the number of records that are greater than the median, in the ith group, incorporating the frequency weight. nj,f=O1j,f+O2j,f, Ri,f=kΣj=1Oij,f and Nf=R1,f+R2,f.

 | 1 | 2 | ... | k | Total
LE median | O11,f | O12,f | ... | O1k,f | R1,f
GT median | O21,f | O22,f | ... | O2k,f | R2,f
Total | n1,f | n2,f | ... | nk,f | Nf

Test statistic and p-value

The χ2 statistic for all nonempty groups is calculated as

χ2=kΣj=12Σi=1(Oij−Eij)2/Eij

where Eij=Ri,fnj,fNf.

If k=2 and nf>30, Yates' Continuity Correction for the chi-square statistic is applied

χ2c=(|O21,f(n2,f−O22,f)−O22,f(n1,f−O21,f)|−Nf/2)2Nf(O21,f+O22,f)(n1,f+n2,f−O21,f−O22,f)n1,fn2,f

The one sided p-value is p1=Pr(χ2k−1≥χ2)=1−Pr(χ2k−1≤χ2), where χ2k−1 follows a chi-square distribution with k−1 degrees of freedom, where k is the number of nonempty groups.

p1<α rejects the null hypothesis. The results may be questionable if any cell has an expected value less than one, or more than 20% of the cells have expected values less than five.

If k=2 and nf≤30, the two sided p-value is computed using Fisher's exact test. See the topic Significance Levels for Fisher's Exact Test for more information.

Related Topics

Nonparametric Tests Algorithms
Notation (nonparametric tests algorithms)
Binomial Test (nonparametric tests algorithms)
Confidence Interval for Binomial Success Rate (nonparametric tests algorithms)
Chi-Square Test (nonparametric tests algorithms)
Kolmogorov-Smirnov Test, One-Sample (nonparametric tests algorithms)
Runs Test (nonparametric tests algorithms)
Wilcoxon Signed-Rank Test , One-Sample (nonparametric tests algorithms)
Mann-Whitney Test (nonparametric tests algorithms)
Wald-Wolfowitz Test (nonparametric tests algorithms)
Kolmogorov-Smirnov Test, Independent Samples (nonparametric tests algorithms)
Hodges-Lehmann Estimates, Independent Samples (nonparametric tests algorithms)
Moses Test of Extreme Reactions (nonparametric tests algorithms)
Kruskal-Wallis Test (nonparametric tests algorithms)
Jonckheere-Terpstra Test (nonparametric tests algorithms)
McNemar's Test (nonparametric tests algorithms)
Wilcoxon Signed-Rank Test, Matched Pairs (nonparametric tests algorithms)
Sign Test (nonparametric tests algorithms)
Marginal Homogeneity (nonparametric tests algorithms)
Hodges-Lehmann Estimates, Related Samples (nonparametric tests algorithms)
Cochran's Q Test (nonparametric tests algorithms)
Friedman's Test (nonparametric tests algorithms)
Kendall's Coefficient of Concordance (nonparametric tests algorithms)
Multiple Comparisons (nonparametric tests algorithms)
Pairwise Multiple Comparisons (nonparametric tests algorithms)
Stepwise Stepdown Multiple Comparisons (nonparametric tests algorithms)
References (nonparametric tests algorithms)


Jonckheere-Terpstra Test (nonparametric tests algorithms)

nonparametric tests algorithms,nonparametric tests algorithms,nonparametric tests algorithms
Jonckheere-Terpstra test,Jonckheere-Terpstra test,Jonckheere-Terpstra test
Jonckheere-Terpstra test,Jonckheere-Terpstra test,Jonckheere-Terpstra test
nonparametric tests algorithms,nonparametric tests algorithms,nonparametric tests algorithms

For k independent samples from a continuous field, this tests:

H0: F1(x)=F2(x)=...=FK(x); that is, the k samples are from populations with the same distribution function

HA: HA:F1(x)≥F2(x)≥...≥FK(x) or H´A:F1(x)≤F2(x)≤...≤FK(x) with at least one strict inequality.

Under the assumption that all distribution functions are the same except the location parameters; that is, Fk(x)=F(x−τk),k=1,...,K, the null and alternative hypotheses become:

H0:τ1=τ2=...=τK

HA:τ1≤τ2≤...≤τK or H´A:τ1≥τ2≥...≥τK with at least one strict inequality.

For the k1th sample and the k2th sample, the Mann-Whitney U count is

Uk1k2 =
Σ
iGk1
ΣjGk2fifjI(xi<xj)+12
Σ
iGk1
ΣjGk2fifjI(xi=xj)
=nk1,fnk2,f+nk1,f(nk1,f+1)2−Sk1(k1,k2)
=Sk2(k1,k2)−nk2,f(nk2,f+1)2

where nk,f=ΣiGkfi and Sk1(k1,k2) is the sum of ranks of sample k1 when sample k1 and sample k2 are jointly ranked incorporating frequency weight; that is, Sk1(k1,k2)=ΣiGk1fi rank (xi,(Dk1,Dk2),f).

The test statistics is

T=K−1Σk1=1 KΣk2=k1+1Uk1k2

The standardized test statistic is

T*=T−μTσT

where

μT=14(N2f−KΣk=1n2k,f)
σ2T=172(Nf(Nf−1)(2Nf+5)−KΣk=1nk,f(nk,f−1)(2nk,f+5)−2A2−5A1)
+(KΣk=1nk,f(nk,f−1)(nk,f−2))(A2−2A1)36Nf(Nf−1)(Nf−2)+(KΣk=1nk,f(nk,f−1))A18Nf(Nf−1)
Nf=KΣk=1nk,f
A1=MΣi=1ti,f(ti,f−1)
A2=MΣi=1t2i,f(ti,f−1)

and M is the total number of distinct values among all combined observations, and ti,f is the number of occurrences of the ith distinct value considering the frequency weight.

The one sided and two sided p-values are

p1=Pr(Z≥|T*|)=1−Φ(|T*|)
p=2p1

p1<α will reject the null hypothesis in favor of H´A:F1(x)≤F2(x)≤...≤FK(x) if T*<0 and in favor of HA:F1(x)≥F2(x)≥...≥FK(x) if T*>0.

p<α will reject the null hypothesis in favor of an ordered alternative (either direction of ordering).

Note: When there are only two samples, K = 2, the Jonckheere-Terpstra test reduces to the Mann-Whitney test.

One-sided test

If the direction of the alternative is specified, this becomes a one-sided test. The previously defined one-sided p-value is not the p-value for a fixed one-sided test, and cannot be used alone to make decision for one-sided test.

If the alternative is H´A:F1(x)≤F2(x)≤...≤FK(x), the p-value for the one-sided test is

p=Pr(Z≤T*)=Φ(T*)={
1−p1 | T*≥0
p1 | T*<0

If the alternative is HA:F1(x)≥F2(x)≥...≥FK(x), the p-value for the one-sided test is

p=Pr(Z≥T*)=1−Φ(T*)={
p1 | T*≥0
1−p1 | T*<0

Note: The one-sided test will be used in multiple comparisons for Jonckheere-Terpstra test.

Related Topics

Nonparametric Tests Algorithms
Notation (nonparametric tests algorithms)
Binomial Test (nonparametric tests algorithms)
Confidence Interval for Binomial Success Rate (nonparametric tests algorithms)
Chi-Square Test (nonparametric tests algorithms)
Kolmogorov-Smirnov Test, One-Sample (nonparametric tests algorithms)
Runs Test (nonparametric tests algorithms)
Wilcoxon Signed-Rank Test , One-Sample (nonparametric tests algorithms)
Mann-Whitney Test (nonparametric tests algorithms)
Wald-Wolfowitz Test (nonparametric tests algorithms)
Kolmogorov-Smirnov Test, Independent Samples (nonparametric tests algorithms)
Hodges-Lehmann Estimates, Independent Samples (nonparametric tests algorithms)
Moses Test of Extreme Reactions (nonparametric tests algorithms)
Kruskal-Wallis Test (nonparametric tests algorithms)
Median Test (nonparametric tests algorithms)
McNemar's Test (nonparametric tests algorithms)
Wilcoxon Signed-Rank Test, Matched Pairs (nonparametric tests algorithms)
Sign Test (nonparametric tests algorithms)
Marginal Homogeneity (nonparametric tests algorithms)
Hodges-Lehmann Estimates, Related Samples (nonparametric tests algorithms)
Cochran's Q Test (nonparametric tests algorithms)
Friedman's Test (nonparametric tests algorithms)
Kendall's Coefficient of Concordance (nonparametric tests algorithms)
Multiple Comparisons (nonparametric tests algorithms)
Pairwise Multiple Comparisons (nonparametric tests algorithms)
Stepwise Stepdown Multiple Comparisons (nonparametric tests algorithms)
References (nonparametric tests algorithms)


Related Samples Tests (nonparametric tests algorithms)

The following related samples tests are available.

Related Topics

McNemar's Test (nonparametric tests algorithms)
Wilcoxon Signed-Rank Test, Matched Pairs (nonparametric tests algorithms)
Sign Test (nonparametric tests algorithms)
Marginal Homogeneity (nonparametric tests algorithms)
Hodges-Lehmann Estimates, Related Samples (nonparametric tests algorithms)
Cochran's Q Test (nonparametric tests algorithms)
Friedman's Test (nonparametric tests algorithms)
Kendall's Coefficient of Concordance (nonparametric tests algorithms)
Multiple Comparisons (nonparametric tests algorithms)
Pairwise Multiple Comparisons (nonparametric tests algorithms)
Stepwise Stepdown Multiple Comparisons (nonparametric tests algorithms)


McNemar's Test (nonparametric tests algorithms)

nonparametric tests algorithms,nonparametric tests algorithms,nonparametric tests algorithms
McNemar Test,McNemar Test,McNemar Test
McNemar Test,McNemar Test,McNemar Test
nonparametric tests algorithms,nonparametric tests algorithms,nonparametric tests algorithms

For two related samples from a categorical field with 2 values (or a recoded categorical field with more than 2 values), this tests:

H0: The two samples have the same marginal distribution.

Let n1,f be the number of records in which xi is a success and yi is a failure, and n2,f be the number of records in which xi is a failure and yi is a success, incorporating the frequency weights.

If n1,f+n2,f≤25, the two-sided exact probability is

p=2rΣi=0(
n1,f+n2,f
i
)0.5n1,f+n2,f

where r=min(n1,f,n2,f).

If n1,f+n2,f>25, the test statistic is

χ2c=(|n1,f−n2,f|−1)2n1,f+n2,f

The one sided p-value is

p=Pr(χ21≥χ2)=1−Pr(χ21≤χ2)

where χ21 has a chi-square distribution with 1 degree of freedom.

p<α will reject the null hypothesis.

Related Topics

Nonparametric Tests Algorithms
Notation (nonparametric tests algorithms)
Binomial Test (nonparametric tests algorithms)
Confidence Interval for Binomial Success Rate (nonparametric tests algorithms)
Chi-Square Test (nonparametric tests algorithms)
Kolmogorov-Smirnov Test, One-Sample (nonparametric tests algorithms)
Runs Test (nonparametric tests algorithms)
Wilcoxon Signed-Rank Test , One-Sample (nonparametric tests algorithms)
Mann-Whitney Test (nonparametric tests algorithms)
Wald-Wolfowitz Test (nonparametric tests algorithms)
Kolmogorov-Smirnov Test, Independent Samples (nonparametric tests algorithms)
Hodges-Lehmann Estimates, Independent Samples (nonparametric tests algorithms)
Moses Test of Extreme Reactions (nonparametric tests algorithms)
Kruskal-Wallis Test (nonparametric tests algorithms)
Median Test (nonparametric tests algorithms)
Jonckheere-Terpstra Test (nonparametric tests algorithms)
Wilcoxon Signed-Rank Test, Matched Pairs (nonparametric tests algorithms)
Sign Test (nonparametric tests algorithms)
Marginal Homogeneity (nonparametric tests algorithms)
Hodges-Lehmann Estimates, Related Samples (nonparametric tests algorithms)
Cochran's Q Test (nonparametric tests algorithms)
Friedman's Test (nonparametric tests algorithms)
Kendall's Coefficient of Concordance (nonparametric tests algorithms)
Multiple Comparisons (nonparametric tests algorithms)
Pairwise Multiple Comparisons (nonparametric tests algorithms)
Stepwise Stepdown Multiple Comparisons (nonparametric tests algorithms)
References (nonparametric tests algorithms)


Wilcoxon Signed-Rank Test, Matched Pairs (nonparametric tests algorithms)

nonparametric tests algorithms,nonparametric tests algorithms,nonparametric tests algorithms
Wilcoxon signed-rank test,Wilcoxon signed-rank test,Wilcoxon signed-rank test
Wilcoxon signed-rank test,Wilcoxon signed-rank test,Wilcoxon signed-rank test
nonparametric tests algorithms,nonparametric tests algorithms,nonparametric tests algorithms

For two related samples from a continuous field, this tests:

H0: θ = Median(X1−X2) = 0

HA: θ<0or θ>0

Computing Ranked Differences

For each record, the difference di=xi1−xi2 is computed, as well as the absolute value. All nonzero absolute differences are sorted into ascending order, and ranks are assigned. In the case of ties, the average rank is used. Let D={di: |di|≠0}, then the sums of the ranks corresponding to positive and negative differences are

Sp=
Σ
iD
firank(|di|;D,f)I(sign(di)>0)

and

Sn=
Σ
iD
firank(|di|;D,f)I(sign(di)<0)

respectively. Then the average positive rank and average negative rank are

Xp=Sp/np,f

and

Xn=Sn/nn,f

where np is the number of records with positive differences and nn the number with negative differences.

Test statistic and p-value

The test statistic is

T=Sp−μTσT

where

μT=nf(nf+1)4
σ2T=nf(nf+1)(2nf+1)/24−lΣj=1(t3j,f−tj,f)/48
nf=
Σ
iD
fi

where l is the total number of distinct rank values and tj,f is the number of records tied at the jth distinct value, incorporating the frequency weight.

The one-sided and two-sided p-values are

p1=Pr(Z≥|T|)=1−Φ(|T|)
p=2p1

p1<α will reject the null hypothesis in favor of θ>0 if T > 0 and θ<0 if T < 0.

p<α will reject the null hypothesis in favor of θ>0 or θ<0.

Related Topics

Nonparametric Tests Algorithms
Notation (nonparametric tests algorithms)
Binomial Test (nonparametric tests algorithms)
Confidence Interval for Binomial Success Rate (nonparametric tests algorithms)
Chi-Square Test (nonparametric tests algorithms)
Kolmogorov-Smirnov Test, One-Sample (nonparametric tests algorithms)
Runs Test (nonparametric tests algorithms)
Wilcoxon Signed-Rank Test , One-Sample (nonparametric tests algorithms)
Mann-Whitney Test (nonparametric tests algorithms)
Wald-Wolfowitz Test (nonparametric tests algorithms)
Kolmogorov-Smirnov Test, Independent Samples (nonparametric tests algorithms)
Hodges-Lehmann Estimates, Independent Samples (nonparametric tests algorithms)
Moses Test of Extreme Reactions (nonparametric tests algorithms)
Kruskal-Wallis Test (nonparametric tests algorithms)
Median Test (nonparametric tests algorithms)
Jonckheere-Terpstra Test (nonparametric tests algorithms)
McNemar's Test (nonparametric tests algorithms)
Sign Test (nonparametric tests algorithms)
Marginal Homogeneity (nonparametric tests algorithms)
Hodges-Lehmann Estimates, Related Samples (nonparametric tests algorithms)
Cochran's Q Test (nonparametric tests algorithms)
Friedman's Test (nonparametric tests algorithms)
Kendall's Coefficient of Concordance (nonparametric tests algorithms)
Multiple Comparisons (nonparametric tests algorithms)
Pairwise Multiple Comparisons (nonparametric tests algorithms)
Stepwise Stepdown Multiple Comparisons (nonparametric tests algorithms)
References (nonparametric tests algorithms)


Sign Test (nonparametric tests algorithms)

nonparametric tests algorithms,nonparametric tests algorithms,nonparametric tests algorithms
sign test,sign test,sign test
sign test,sign test,sign test
nonparametric tests algorithms,nonparametric tests algorithms,nonparametric tests algorithms

For two related samples from a continuous field, this tests:

H0: θ = Median(X1−X2) = 0

HA: θ<0 or θ>0

Counting Signs

For each record, the difference di=xi1−xi2 is computed and the number of positive(np,f) and negative(nn,f) differences, incorporating the frequency weight, are counted:

np,f=nΣi=1fiI(di>0)
nn,f=nΣi=1fiI(di<0)

Cases with xi1=xi2 are ignored.

Test statistic and p-value

If np,f+nn,f=0, then the one-sided exact probability is p1=0.5.

If 0<np,f+nn,f≤25, then p1 is calculated recursively from the binomial distribution:

p1=min{p*,p**}

where

p*=np,fΣi=0(
np,f+nn,f
i
)0.5np,f+nn,f

and

p**=1−np,f−1Σi=0(
np,f+nn,f
i
)0.5np,f+nn,f

If np,f+nn,f>25, the test statistic is

zc= max (np,f,np,f)−0.5(np,f+nn,f)−0.50.5
√ np,f+nn,f

The one sided and two sided p-values are

p1=Pr(Z≥|zc|)=1−Φ(|zc|)
p=2p1

p1<α rejects the null hypothesis in favor of θ>0 if np,f>nn,f and θ<0 if np,f<nn,f.

p<α will reject the null hypothesis in favor of θ>0 or θ<0.

Related Topics

Nonparametric Tests Algorithms
Notation (nonparametric tests algorithms)
Binomial Test (nonparametric tests algorithms)
Confidence Interval for Binomial Success Rate (nonparametric tests algorithms)
Chi-Square Test (nonparametric tests algorithms)
Kolmogorov-Smirnov Test, One-Sample (nonparametric tests algorithms)
Runs Test (nonparametric tests algorithms)
Wilcoxon Signed-Rank Test , One-Sample (nonparametric tests algorithms)
Mann-Whitney Test (nonparametric tests algorithms)
Wald-Wolfowitz Test (nonparametric tests algorithms)
Kolmogorov-Smirnov Test, Independent Samples (nonparametric tests algorithms)
Hodges-Lehmann Estimates, Independent Samples (nonparametric tests algorithms)
Moses Test of Extreme Reactions (nonparametric tests algorithms)
Kruskal-Wallis Test (nonparametric tests algorithms)
Median Test (nonparametric tests algorithms)
Jonckheere-Terpstra Test (nonparametric tests algorithms)
McNemar's Test (nonparametric tests algorithms)
Wilcoxon Signed-Rank Test, Matched Pairs (nonparametric tests algorithms)
Marginal Homogeneity (nonparametric tests algorithms)
Hodges-Lehmann Estimates, Related Samples (nonparametric tests algorithms)
Cochran's Q Test (nonparametric tests algorithms)
Friedman's Test (nonparametric tests algorithms)
Kendall's Coefficient of Concordance (nonparametric tests algorithms)
Multiple Comparisons (nonparametric tests algorithms)
Pairwise Multiple Comparisons (nonparametric tests algorithms)
Stepwise Stepdown Multiple Comparisons (nonparametric tests algorithms)
References (nonparametric tests algorithms)


Marginal Homogeneity (nonparametric tests algorithms)

nonparametric tests algorithms,nonparametric tests algorithms,nonparametric tests algorithms
marginal homogeneity,marginal homogeneity,marginal homogeneity
marginal homogeneity,marginal homogeneity,marginal homogeneity
nonparametric tests algorithms,nonparametric tests algorithms,nonparametric tests algorithms

For two related samples from an ordinal field, this tests:

H0: The two samples have the same marginal distribution.

Let nuv,f be the cell count incorporating the frequency weight for cell (x1=u,x2=v)

nuv,f=nΣi=1I(xi1=u,xi2=v)fi

The test statistic is

T=
Σ
u
Σ
v≠u
wunuv,f

The standardized test statistics is

T*=T−μTσT

where

μT=12
Σ
u
Σ
v≠u
(wu+wv)nuv,f
σ2T=
Σ
u
Σ
v≠u
(wu−wv2)2nuv,f

The asymptotic one sided p-value is p1=Pr(Z≥|T*|)=1−Φ(|T*|).

p1<α rejects the null hypothesis in favor of F1(x)≥F2(x) if T* < 0 or F1(x)≤F2(x) if T* > 0 with at least one x gives strict inequality.

The asymptotic two sided p-value is p=2p1.

Note: Any linear transformation of scores produces the same standardized test statistic and p-value.

Related Topics

Nonparametric Tests Algorithms
Notation (nonparametric tests algorithms)
Binomial Test (nonparametric tests algorithms)
Confidence Interval for Binomial Success Rate (nonparametric tests algorithms)
Chi-Square Test (nonparametric tests algorithms)
Kolmogorov-Smirnov Test, One-Sample (nonparametric tests algorithms)
Runs Test (nonparametric tests algorithms)
Wilcoxon Signed-Rank Test , One-Sample (nonparametric tests algorithms)
Mann-Whitney Test (nonparametric tests algorithms)
Wald-Wolfowitz Test (nonparametric tests algorithms)
Kolmogorov-Smirnov Test, Independent Samples (nonparametric tests algorithms)
Hodges-Lehmann Estimates, Independent Samples (nonparametric tests algorithms)
Moses Test of Extreme Reactions (nonparametric tests algorithms)
Kruskal-Wallis Test (nonparametric tests algorithms)
Median Test (nonparametric tests algorithms)
Jonckheere-Terpstra Test (nonparametric tests algorithms)
McNemar's Test (nonparametric tests algorithms)
Wilcoxon Signed-Rank Test, Matched Pairs (nonparametric tests algorithms)
Sign Test (nonparametric tests algorithms)
Hodges-Lehmann Estimates, Related Samples (nonparametric tests algorithms)
Cochran's Q Test (nonparametric tests algorithms)
Friedman's Test (nonparametric tests algorithms)
Kendall's Coefficient of Concordance (nonparametric tests algorithms)
Multiple Comparisons (nonparametric tests algorithms)
Pairwise Multiple Comparisons (nonparametric tests algorithms)
Stepwise Stepdown Multiple Comparisons (nonparametric tests algorithms)
References (nonparametric tests algorithms)


Hodges-Lehmann Estimates, Related Samples (nonparametric tests algorithms)

nonparametric tests algorithms,nonparametric tests algorithms,nonparametric tests algorithms
Hodges-Lehmann estimates,Hodges-Lehmann estimates,Hodges-Lehmann estimates
Hodges-Lehmann estimates,Hodges-Lehmann estimates,Hodges-Lehmann estimates
nonparametric tests algorithms,nonparametric tests algorithms,nonparametric tests algorithms

For two related samples from a continuous field, this finds a confidence interval for the median difference: letting di=xi1−xi2, we assume that di follows a symmetric distribution with median θ.

Let Aij=di+dj2,i≤j. Incorporating the frequency weight fi for di and fj for dj, the frequency weight for Aij is

f*ij={
12fi(fi+1) | i=j
fifj | i<j

Let B(1)≤...≤B(L), L=n(n+1)2, be the ordered values of Aij,i≤j, and the corresponding frequency weights are f*(1),...,f*(L).

The Hodges-Lehmann estimator for θ is the median of B(1),...,B(L) incorporating the frequency weights

^
θ
= median {B;f*}={
B(k)+B(k+1)2 | W(L)= even and W(k)<W(L)+12<W(k)+1
B(k) | otherwise W(L)+12[W(k−1)+1,W(k)]

where W(k)=kΣi=1f*(i).

The Tukey's confidence interval for θ is

(B(k1),B(k2)]

where k1 and k2 are integers such that

i1[W(k1−1)+1,W(k1)]
i2[W(k2−1)+1,W(k2)]

with

i1=1+μT−zα/2σT
i2=μT+zα/2σT

and x and x are the floor and ceiling integers of x, μT and σT are the expected value and standard deviation of the test statistic T under the null hypothesis in the Wilcoxon signed rank test, and zα/2 is the right tail percentile such that Pr(Z>zα/2)=α/2 where Z is a random variate following a standard normal distribution.

Related Topics

Nonparametric Tests Algorithms
Notation (nonparametric tests algorithms)
Binomial Test (nonparametric tests algorithms)
Confidence Interval for Binomial Success Rate (nonparametric tests algorithms)
Chi-Square Test (nonparametric tests algorithms)
Kolmogorov-Smirnov Test, One-Sample (nonparametric tests algorithms)
Runs Test (nonparametric tests algorithms)
Wilcoxon Signed-Rank Test , One-Sample (nonparametric tests algorithms)
Mann-Whitney Test (nonparametric tests algorithms)
Wald-Wolfowitz Test (nonparametric tests algorithms)
Kolmogorov-Smirnov Test, Independent Samples (nonparametric tests algorithms)
Hodges-Lehmann Estimates, Independent Samples (nonparametric tests algorithms)
Moses Test of Extreme Reactions (nonparametric tests algorithms)
Kruskal-Wallis Test (nonparametric tests algorithms)
Median Test (nonparametric tests algorithms)
Jonckheere-Terpstra Test (nonparametric tests algorithms)
McNemar's Test (nonparametric tests algorithms)
Wilcoxon Signed-Rank Test, Matched Pairs (nonparametric tests algorithms)
Sign Test (nonparametric tests algorithms)
Marginal Homogeneity (nonparametric tests algorithms)
Cochran's Q Test (nonparametric tests algorithms)
Friedman's Test (nonparametric tests algorithms)
Kendall's Coefficient of Concordance (nonparametric tests algorithms)
Multiple Comparisons (nonparametric tests algorithms)
Pairwise Multiple Comparisons (nonparametric tests algorithms)
Stepwise Stepdown Multiple Comparisons (nonparametric tests algorithms)
References (nonparametric tests algorithms)


Cochran's Q Test (nonparametric tests algorithms)

nonparametric tests algorithms,nonparametric tests algorithms,nonparametric tests algorithms
Cochran's Q,Cochran's Q,Cochran's Q
Cochran's Q,Cochran's Q,Cochran's Q
nonparametric tests algorithms,nonparametric tests algorithms,nonparametric tests algorithms

For k related samples from a categorical field with 2 values (or recoded categorical field with more than 2 values), this tests:

H0: The distributions of these k samples are the same.

For each record, the number of successes across samples is counted. The number of successes for record i is

Ri,f=kΣj=1I( if xij is success )

and the total number of successes for sample l, incorporating the frequency weights, is

Cl,f=nΣi=1fiI( if xil is success )

The test statistic is

Q=(k−1)[kkΣl=1C2l,f−(kΣl=1Cl,f)2]kkΣl=1Cl,f−nΣi=1fiR2i,f

The one-sided p-value is

p=Pr(χ2k−1≥χ2)=1−Pr(χ2k−1≤χ2)

where χ2k−1 follows a chi-square distribution with k−1 degrees of freedom.

p<α rejects the null hypothesis.

Related Topics

Nonparametric Tests Algorithms
Notation (nonparametric tests algorithms)
Binomial Test (nonparametric tests algorithms)
Confidence Interval for Binomial Success Rate (nonparametric tests algorithms)
Chi-Square Test (nonparametric tests algorithms)
Kolmogorov-Smirnov Test, One-Sample (nonparametric tests algorithms)
Runs Test (nonparametric tests algorithms)
Wilcoxon Signed-Rank Test , One-Sample (nonparametric tests algorithms)
Mann-Whitney Test (nonparametric tests algorithms)
Wald-Wolfowitz Test (nonparametric tests algorithms)
Kolmogorov-Smirnov Test, Independent Samples (nonparametric tests algorithms)
Hodges-Lehmann Estimates, Independent Samples (nonparametric tests algorithms)
Moses Test of Extreme Reactions (nonparametric tests algorithms)
Kruskal-Wallis Test (nonparametric tests algorithms)
Median Test (nonparametric tests algorithms)
Jonckheere-Terpstra Test (nonparametric tests algorithms)
McNemar's Test (nonparametric tests algorithms)
Wilcoxon Signed-Rank Test, Matched Pairs (nonparametric tests algorithms)
Sign Test (nonparametric tests algorithms)
Marginal Homogeneity (nonparametric tests algorithms)
Hodges-Lehmann Estimates, Related Samples (nonparametric tests algorithms)
Friedman's Test (nonparametric tests algorithms)
Kendall's Coefficient of Concordance (nonparametric tests algorithms)
Multiple Comparisons (nonparametric tests algorithms)
Pairwise Multiple Comparisons (nonparametric tests algorithms)
Stepwise Stepdown Multiple Comparisons (nonparametric tests algorithms)
References (nonparametric tests algorithms)


Friedman's Test (nonparametric tests algorithms)

nonparametric tests algorithms,nonparametric tests algorithms,nonparametric tests algorithms
Friedman test,Friedman test,Friedman test
Friedman test,Friedman test,Friedman test
nonparametric tests algorithms,nonparametric tests algorithms,nonparametric tests algorithms

For k related samples from a continuous field, this tests:

H0: The distributions of these k samples are the same.

For each record, the k samples are sorted and ranked, with average rank being assigned in the case of ties. For each sample, the sum of ranks over the records is calculated, incorporating the frequency weight, as follows:

Cl,f=nΣi=1fi rank (xil,Di, f )

where Di={xij, j=1,...,k}. The average rank for each sample is

Rl,f=Cl,f/nf

where nf=nΣi=1fi.

The test statistic is

χ2=(12/nfk(k+1))kΣl=1C2l,f−3nf(k+1)1−ΣT/nfk(k2−1)

where

ΣT=nΣi=1miΣj=1(t3ij,f−tij,f)

and mi is the total number of distinct rank values of the ith record and tij is the number of fields tied at the jth distinct value of the ith record, incorporating the frequency weight. The one-sided p-value is

p=Pr(χ2k−1≥χ2)=1−Pr(χ2k−1≤χ2)

where χ2k−1 follows a chi-square distribution with k−1 degrees of freedom.

p<α rejects the null hypothesis.

Related Topics

Nonparametric Tests Algorithms
Notation (nonparametric tests algorithms)
Binomial Test (nonparametric tests algorithms)
Confidence Interval for Binomial Success Rate (nonparametric tests algorithms)
Chi-Square Test (nonparametric tests algorithms)
Kolmogorov-Smirnov Test, One-Sample (nonparametric tests algorithms)
Runs Test (nonparametric tests algorithms)
Wilcoxon Signed-Rank Test , One-Sample (nonparametric tests algorithms)
Mann-Whitney Test (nonparametric tests algorithms)
Wald-Wolfowitz Test (nonparametric tests algorithms)
Kolmogorov-Smirnov Test, Independent Samples (nonparametric tests algorithms)
Hodges-Lehmann Estimates, Independent Samples (nonparametric tests algorithms)
Moses Test of Extreme Reactions (nonparametric tests algorithms)
Kruskal-Wallis Test (nonparametric tests algorithms)
Median Test (nonparametric tests algorithms)
Jonckheere-Terpstra Test (nonparametric tests algorithms)
McNemar's Test (nonparametric tests algorithms)
Wilcoxon Signed-Rank Test, Matched Pairs (nonparametric tests algorithms)
Sign Test (nonparametric tests algorithms)
Marginal Homogeneity (nonparametric tests algorithms)
Hodges-Lehmann Estimates, Related Samples (nonparametric tests algorithms)
Cochran's Q Test (nonparametric tests algorithms)
Kendall's Coefficient of Concordance (nonparametric tests algorithms)
Multiple Comparisons (nonparametric tests algorithms)
Pairwise Multiple Comparisons (nonparametric tests algorithms)
Stepwise Stepdown Multiple Comparisons (nonparametric tests algorithms)
References (nonparametric tests algorithms)


Kendall's Coefficient of Concordance (nonparametric tests algorithms)

nonparametric tests algorithms,nonparametric tests algorithms,nonparametric tests algorithms
Kendall's coefficient of concordance,Kendall's coefficient of concordance,Kendall's coefficient of concordance
Kendall's coefficient of concordance,Kendall's coefficient of concordance,Kendall's coefficient of concordance
nonparametric tests algorithms,nonparametric tests algorithms,nonparametric tests algorithms

For k related samples from a continuous field, this tests:

H0: The distributions of these k samples are the same.

The coefficient of concordance (W) is

W=(Fnf(k−1))

where F is the Friedman χ2 statistic and nf=nΣi=1fi.

The test statistic is

χ2=nf(k−1)W

The one-sided p-value is calculated as

p=Pr(χ2k−1≥χ2)=1−Pr(χ2k−1≤χ2)

where χ2k−1 follows a chi-square distribution with k−1 degrees of freedom.

p<α rejects the null hypothesis.

Related Topics

Nonparametric Tests Algorithms
Notation (nonparametric tests algorithms)
Binomial Test (nonparametric tests algorithms)
Confidence Interval for Binomial Success Rate (nonparametric tests algorithms)
Chi-Square Test (nonparametric tests algorithms)
Kolmogorov-Smirnov Test, One-Sample (nonparametric tests algorithms)
Runs Test (nonparametric tests algorithms)
Wilcoxon Signed-Rank Test , One-Sample (nonparametric tests algorithms)
Mann-Whitney Test (nonparametric tests algorithms)
Wald-Wolfowitz Test (nonparametric tests algorithms)
Kolmogorov-Smirnov Test, Independent Samples (nonparametric tests algorithms)
Hodges-Lehmann Estimates, Independent Samples (nonparametric tests algorithms)
Moses Test of Extreme Reactions (nonparametric tests algorithms)
Kruskal-Wallis Test (nonparametric tests algorithms)
Median Test (nonparametric tests algorithms)
Jonckheere-Terpstra Test (nonparametric tests algorithms)
McNemar's Test (nonparametric tests algorithms)
Wilcoxon Signed-Rank Test, Matched Pairs (nonparametric tests algorithms)
Sign Test (nonparametric tests algorithms)
Marginal Homogeneity (nonparametric tests algorithms)
Hodges-Lehmann Estimates, Related Samples (nonparametric tests algorithms)
Cochran's Q Test (nonparametric tests algorithms)
Friedman's Test (nonparametric tests algorithms)
Multiple Comparisons (nonparametric tests algorithms)
Pairwise Multiple Comparisons (nonparametric tests algorithms)
Stepwise Stepdown Multiple Comparisons (nonparametric tests algorithms)
References (nonparametric tests algorithms)


Multiple Comparisons (nonparametric tests algorithms)

nonparametric tests algorithms,nonparametric tests algorithms,nonparametric tests algorithms
multiple comparisons,multiple comparisons,multiple comparisons
multiple comparisons,multiple comparisons,multiple comparisons
nonparametric tests algorithms,nonparametric tests algorithms,nonparametric tests algorithms

Tests such as Kruskal-Wallis involve more than two samples. They test if all samples are from populations with the same characteristics. This characteristic may be the distribution, mean or median depending on the hypotheses. Denote the overall null hypothesis as H0:θ1=...=θK. When this overall hypothesis is rejected at the user-specified significance level α (using two-sided p-values except for the Jonckheere-Terpstra test here), we may want to know where the differences are among the populations. Two multiple comparison procedures are considered to answer this question: pairwise multiple comparisons and a stepwise stepdown procedure for multiple comparisons.

Related Topics

Nonparametric Tests Algorithms
Notation (nonparametric tests algorithms)
Binomial Test (nonparametric tests algorithms)
Confidence Interval for Binomial Success Rate (nonparametric tests algorithms)
Chi-Square Test (nonparametric tests algorithms)
Kolmogorov-Smirnov Test, One-Sample (nonparametric tests algorithms)
Runs Test (nonparametric tests algorithms)
Wilcoxon Signed-Rank Test , One-Sample (nonparametric tests algorithms)
Mann-Whitney Test (nonparametric tests algorithms)
Wald-Wolfowitz Test (nonparametric tests algorithms)
Kolmogorov-Smirnov Test, Independent Samples (nonparametric tests algorithms)
Hodges-Lehmann Estimates, Independent Samples (nonparametric tests algorithms)
Moses Test of Extreme Reactions (nonparametric tests algorithms)
Kruskal-Wallis Test (nonparametric tests algorithms)
Median Test (nonparametric tests algorithms)
Jonckheere-Terpstra Test (nonparametric tests algorithms)
McNemar's Test (nonparametric tests algorithms)
Wilcoxon Signed-Rank Test, Matched Pairs (nonparametric tests algorithms)
Sign Test (nonparametric tests algorithms)
Marginal Homogeneity (nonparametric tests algorithms)
Hodges-Lehmann Estimates, Related Samples (nonparametric tests algorithms)
Cochran's Q Test (nonparametric tests algorithms)
Friedman's Test (nonparametric tests algorithms)
Kendall's Coefficient of Concordance (nonparametric tests algorithms)
Pairwise Multiple Comparisons (nonparametric tests algorithms)
Stepwise Stepdown Multiple Comparisons (nonparametric tests algorithms)
References (nonparametric tests algorithms)


Pairwise Multiple Comparisons (nonparametric tests algorithms)

nonparametric tests algorithms,nonparametric tests algorithms,nonparametric tests algorithms
pairwise multiple comparisons,pairwise multiple comparisons,pairwise multiple comparisons
pairwise multiple comparisons,pairwise multiple comparisons,pairwise multiple comparisons
nonparametric tests algorithms,nonparametric tests algorithms,nonparametric tests algorithms

All possible pairwise hypotheses like H0,jk:θj=θk for 1≤j<k≤K are tested. There are K(K−1)/2 of them. In order to control the familywise type I error; that is, the probability of rejecting at least one pair hypothesis given all pairwise hypotheses are true, adjusted p-values are calculated and used to make the decision for each pair. For pair (j, k), reject H0,jk at level α if padj,jk<α. The adjusted p-values are calculated the following way.

Calculate the p-value, for each of the pairwise hypotheses.

Calculate the adjusted p-value as padj=pK(K−1)/2.

Note. If the adjusted p-value is bigger than 1, it is set to 1. The calculation of the p-value in step 1 depends on the specific method used to do the overall test. The details are listed below; in the following, two-sided p-values are used except for the Jonckheere-Terpstra test.

Kruskal-Wallis test

Let Rj=ΣiGjfi rank (xi,D,f) be the sum of ranks for sample j, incorporating frequency weights.

For testing H0,jk:θj=θk, the test statistic is Tjk=Rjnj,f−Rknk,f.

The standardized test statistic is T*jk=Tjkσjk where

σ2jk=A(1nj,f+1nk,f)
A=(Nf(Nf+1)12−MΣi=1(t3i,f−ti,f)12(Nf−1))

and M is the total number of distinct values among all observations, and ti,f is the number of occurrences of the ith distinct value incorporating the frequency weight.

The two-sided p-value is

pjk=Pr(|Z|>|T*jk|)=2(1−Φ(|T*jk|))

Note: This is the test procedure proposed by Dunn (1964). The rank here is based on joint data from all samples.

K-sample median test

For H0,jk:θj=θk, perform the median test using data only consisting of sample j and sample k as if other samples don't exist. In this test the median of the two samples is found, and the number above and below that median is used in the test.

Jonckheere-Terpstra test for ordered alternatives

For pair (j, k), j<k, the null and alternative hypotheses are H0,jk:θj=θk vs HA,jk:θj>θk if the overall alternative hypotheses HA:θ1≥...≥θK is specified or favored (it is favored if T*>0 where T* is the standardized test statistic in the overall Jonckheere-Terpstra test), or vs HA,jk:θj<θk if HA:θ1≤...≤θK is specified or favored (it is favored if T*<0). Use Mann-Whitney’s U test on each pair of hypotheses to calculate the p-value for the one-sided test.

Friedman's test and Kendall’s Coefficient of Concordance

For treatment j, let Rj,f=nΣi=1fi rank (xij, row i of D) be the sum of ranks for sample j.

For testing H0,jk:θj=θk, the test statistic is Tjk=Rj,f−Rk,fnf.

The standardized test statistic is T*jk=Tjkσ where σ2=K(K+1)6nf.

The two-sided p-value is pjk=Pr(|Z|>|T*jk|)=2(1−Φ(|T*jk|)).

Cochran’s Q Test

Using xij=1 to represent success and xij=0 to represent failure, let Cj,f=nΣi=1fixij be the total number of successes for sample j incorporating frequency weights, and Ri=KΣj=1xij be the total number of successes for record i.

The test statistic for H0,jk:θj=θk is Tjk=Cj,f−Ck,fnf.

The standardized test statistic is T*jk=Tjkσ where

σ2=2KnΣi=1fiRi−nΣi=1fiR2in2fK(K−1)

The two-sided p-value is pjk=Pr(|Z|>|T*jk|)=2(1−Φ(|T*jk|)).

Related Topics

Nonparametric Tests Algorithms
Notation (nonparametric tests algorithms)
Binomial Test (nonparametric tests algorithms)
Confidence Interval for Binomial Success Rate (nonparametric tests algorithms)
Chi-Square Test (nonparametric tests algorithms)
Kolmogorov-Smirnov Test, One-Sample (nonparametric tests algorithms)
Runs Test (nonparametric tests algorithms)
Wilcoxon Signed-Rank Test , One-Sample (nonparametric tests algorithms)
Mann-Whitney Test (nonparametric tests algorithms)
Wald-Wolfowitz Test (nonparametric tests algorithms)
Kolmogorov-Smirnov Test, Independent Samples (nonparametric tests algorithms)
Hodges-Lehmann Estimates, Independent Samples (nonparametric tests algorithms)
Moses Test of Extreme Reactions (nonparametric tests algorithms)
Kruskal-Wallis Test (nonparametric tests algorithms)
Median Test (nonparametric tests algorithms)
Jonckheere-Terpstra Test (nonparametric tests algorithms)
McNemar's Test (nonparametric tests algorithms)
Wilcoxon Signed-Rank Test, Matched Pairs (nonparametric tests algorithms)
Sign Test (nonparametric tests algorithms)
Marginal Homogeneity (nonparametric tests algorithms)
Hodges-Lehmann Estimates, Related Samples (nonparametric tests algorithms)
Cochran's Q Test (nonparametric tests algorithms)
Friedman's Test (nonparametric tests algorithms)
Kendall's Coefficient of Concordance (nonparametric tests algorithms)
Multiple Comparisons (nonparametric tests algorithms)
Stepwise Stepdown Multiple Comparisons (nonparametric tests algorithms)
References (nonparametric tests algorithms)


Stepwise Stepdown Multiple Comparisons (nonparametric tests algorithms)

nonparametric tests algorithms,nonparametric tests algorithms,nonparametric tests algorithms
stepwise stepdown comparisons,stepwise stepdown comparisons,stepwise stepdown comparisons
stepwise stepdown comparisons,stepwise stepdown comparisons,stepwise stepdown comparisons
nonparametric tests algorithms,nonparametric tests algorithms,nonparametric tests algorithms

The procedure described in this section is an extension of the ad hoc procedure developed by Campbell and Skillings (1985). This procedure starts with the overall hypothesis involving all K populations, and if the hypothesis is rejected, then it considers the sub-hypotheses involving K−1 populations, continuing until the hypothesis only involves two populations or no hypotheses are rejected. If all sub-hypotheses are considered, it may be computationally too expensive when K is big, so a shortcut is used on the sorted samples. This procedure returns a sequence of subsets of populations with homogeneous characteristics.

Sort the samples

The K samples are sorted from the smallest to largest by test-specific criteria. Let (1), ..., (K) index the sorted samples.

• Kruskal-Wallis: average treatment rank, where rank is the joint rank of all the observations. Use the treatment median to break ties.

• Median: treatment median

• Jonckheere-Terpstra test: given by the user-specified alternative hypothesis order.

• Friedman: average treatment rank (same as using treatment rank sum) where rank is the joint within row/block ranking.

• Kendall's coefficient of concordance: same as Friedman

• Cochran’s Q: average treatment mean, which is the same as using the treatment sum.

Find the homogeneous subsets

Starting with sample (1), sequentially test H0:θ(1)=θ(2), then H0:θ(1)=θ(2)=θ(3), and so on, until the null hypothesis is rejected when sample (j) is added. Samples (1) through (j−1) are considered homogenous. The process repeats starting with sample (j) and continues until sample (K).

Related Topics

Nonparametric Tests Algorithms
Notation (nonparametric tests algorithms)
Binomial Test (nonparametric tests algorithms)
Confidence Interval for Binomial Success Rate (nonparametric tests algorithms)
Chi-Square Test (nonparametric tests algorithms)
Kolmogorov-Smirnov Test, One-Sample (nonparametric tests algorithms)
Runs Test (nonparametric tests algorithms)
Wilcoxon Signed-Rank Test , One-Sample (nonparametric tests algorithms)
Mann-Whitney Test (nonparametric tests algorithms)
Wald-Wolfowitz Test (nonparametric tests algorithms)
Kolmogorov-Smirnov Test, Independent Samples (nonparametric tests algorithms)
Hodges-Lehmann Estimates, Independent Samples (nonparametric tests algorithms)
Moses Test of Extreme Reactions (nonparametric tests algorithms)
Kruskal-Wallis Test (nonparametric tests algorithms)
Median Test (nonparametric tests algorithms)
Jonckheere-Terpstra Test (nonparametric tests algorithms)
McNemar's Test (nonparametric tests algorithms)
Wilcoxon Signed-Rank Test, Matched Pairs (nonparametric tests algorithms)
Sign Test (nonparametric tests algorithms)
Marginal Homogeneity (nonparametric tests algorithms)
Hodges-Lehmann Estimates, Related Samples (nonparametric tests algorithms)
Cochran's Q Test (nonparametric tests algorithms)
Friedman's Test (nonparametric tests algorithms)
Kendall's Coefficient of Concordance (nonparametric tests algorithms)
Multiple Comparisons (nonparametric tests algorithms)
Pairwise Multiple Comparisons (nonparametric tests algorithms)
References (nonparametric tests algorithms)


References (nonparametric tests algorithms)

nonparametric tests algorithms,nonparametric tests algorithms,nonparametric tests algorithms
references,references,references

Brown, L. D., T. Cai, and A. DasGupta. 2003. Interval estimation in exponential families. Statistica Sinica, 13, 19-49.

Campbell, G., and J. H. Skillings. 1985. Nonparametric Stepwise Multiple Comparison Procedures. Journal of the American Statistical Association, 80, 998-998.

Dineen, L. C., and B. C. Blakesley. 1973. Algorithm AS 62: Generator for the sampling distribution of the Mann-Whitney U statistic. Applied Statistics, 22, 269-273.

Dunn, O. J. 1964. Multiple Comparisons Using Rank Sums. Technometrics, 6, 241-241.

Gibbons, J. D., and S. Chakraborti. 2003. Nonparametric Statistical Inference, 4th edition. : Marcel Dekker.

Hochberg, Y., and A. C. Tamhane. 1987. Multiple Comparison Procedures. New York: John Wiley & Sons, Inc..

Hollander, M., and D. A. Wolfe. 1999. Nonparametric Statistical Methods, 2nd edition. New York: John Wiley & Sons.

Lehmann, E. L. 1985. Nonparametrics: Statistical Methods Based on Ranks. San Francisco: McGraw-Hill.

Sheskin, D. J. 2007. Handbook of Parametric and Nonparametric Statistical Procedures, 4th edition. : Chapman & Hall/CRC.

Smirnov, N. V. 1948. Table for estimating the goodness of fit of empirical distributions. Annals of the Mathematical Statistics, 19, 279-281.

Related Topics

Nonparametric Tests Algorithms
Notation (nonparametric tests algorithms)
Binomial Test (nonparametric tests algorithms)
Confidence Interval for Binomial Success Rate (nonparametric tests algorithms)
Chi-Square Test (nonparametric tests algorithms)
Kolmogorov-Smirnov Test, One-Sample (nonparametric tests algorithms)
Runs Test (nonparametric tests algorithms)
Wilcoxon Signed-Rank Test , One-Sample (nonparametric tests algorithms)
Mann-Whitney Test (nonparametric tests algorithms)
Wald-Wolfowitz Test (nonparametric tests algorithms)
Kolmogorov-Smirnov Test, Independent Samples (nonparametric tests algorithms)
Hodges-Lehmann Estimates, Independent Samples (nonparametric tests algorithms)
Moses Test of Extreme Reactions (nonparametric tests algorithms)
Kruskal-Wallis Test (nonparametric tests algorithms)
Median Test (nonparametric tests algorithms)
Jonckheere-Terpstra Test (nonparametric tests algorithms)
McNemar's Test (nonparametric tests algorithms)
Wilcoxon Signed-Rank Test, Matched Pairs (nonparametric tests algorithms)
Sign Test (nonparametric tests algorithms)
Marginal Homogeneity (nonparametric tests algorithms)
Hodges-Lehmann Estimates, Related Samples (nonparametric tests algorithms)
Cochran's Q Test (nonparametric tests algorithms)
Friedman's Test (nonparametric tests algorithms)
Kendall's Coefficient of Concordance (nonparametric tests algorithms)
Multiple Comparisons (nonparametric tests algorithms)
Pairwise Multiple Comparisons (nonparametric tests algorithms)
Stepwise Stepdown Multiple Comparisons (nonparametric tests algorithms)


NPAR TESTS Algorithms

NPAR TESTS (command),NPAR TESTS (command),NPAR TESTS (command)
algorithms,algorithms,algorithms
nonparametric tests algorithms,nonparametric tests algorithms,nonparametric tests algorithms

If a WEIGHT variable is specified, it is used to replicate a case as many times as indicated by the weight value rounded to the nearest integer. If the workspace requirements are exceeded and sampling has been selected, a random sample of cases is chosen for analysis using the algorithm described in SAMPLE. For the RUNS test, if sampling is specified, it is ignored. The tests are described in (Siegel, 1956).

Related Topics

One-Sample Chi-Square Test (nonparametric tests algorithms)
Kolmogorov-Smirnov One-Sample Test (nonparametric tests algorithms)
Runs Test (nonparametric tests algorithms)
Binomial Test (nonparametric tests algorithms)
McNemar’s Test (nonparametric tests algorithms)
Sign Test (nonparametric tests algorithms)
Wilcoxon Matched-Pairs Signed-Rank Test (nonparametric tests algorithms)
Cochran’s Q Test (nonparametric tests algorithms)
Friedman’s Test (nonparametric tests algorithms)
Kendall’s Coefficient of Concordance (nonparametric tests algorithms)
The Two-Sample Median Test (nonparametric tests algorithms)
Mann-Whitney U Test (nonparametric tests algorithms)
Kolmogorov-Smirnov Two-Sample Test (nonparametric tests algorithms)
Wald-Wolfowitz Runs Test (nonparametric tests algorithms)
Moses Test of Extreme Reaction (nonparametric tests algorithms)
K-Sample Median Test (nonparametric tests algorithms)
Kruskal-Wallis One-Way Analysis of Variance (nonparametric tests algorithms)
References (nonparametric tests algorithms)


One-Sample Chi-Square Test (nonparametric tests algorithms)

nonparametric tests algorithms,nonparametric tests algorithms,nonparametric tests algorithms
one-sample chi-square test,one-sample chi-square test,one-sample chi-square test

Cell Specification

If the (lo, hi) specification is used, each integer value in the lo to hi range is designated a cell. Otherwise, each distinct value encountered is considered a cell.

Observed Frequencies

If (lo, hi) has been selected, every observed value is truncated to an integer and, if it is in the lo to hi range, it is included in the frequency count for the corresponding cell. Otherwise, a count of the frequency of occurrence of the distinct values is obtained.

Expected Frequencies

If none or EQUAL is specified,

EXPi= number of observations (N) [in range] number of cells (k)

When the expected values (Ei) are specified either as counts, percentages, or proportions,

EXPi=(EikΣi=1Ei)N

If there are cells with expected values less than 5, the number of such cells and the minimum expected value are printed.

If the number of user-supplied expected frequencies is not equal to the number of cells generated, or if an expected value is less than or equal to zero, the test terminates with an error message.

Chi-Square and Its Degrees of Freedom

χ2=kΣi=1(Oi−EXPi)2EXPi
df=k−1

The significance level is from the chi-square distribution with k−1 degrees of freedom.

Related Topics

NPAR TESTS Algorithms
Kolmogorov-Smirnov One-Sample Test (nonparametric tests algorithms)
Runs Test (nonparametric tests algorithms)
Binomial Test (nonparametric tests algorithms)
McNemar’s Test (nonparametric tests algorithms)
Sign Test (nonparametric tests algorithms)
Wilcoxon Matched-Pairs Signed-Rank Test (nonparametric tests algorithms)
Cochran’s Q Test (nonparametric tests algorithms)
Friedman’s Test (nonparametric tests algorithms)
Kendall’s Coefficient of Concordance (nonparametric tests algorithms)
The Two-Sample Median Test (nonparametric tests algorithms)
Mann-Whitney U Test (nonparametric tests algorithms)
Kolmogorov-Smirnov Two-Sample Test (nonparametric tests algorithms)
Wald-Wolfowitz Runs Test (nonparametric tests algorithms)
Moses Test of Extreme Reaction (nonparametric tests algorithms)
K-Sample Median Test (nonparametric tests algorithms)
Kruskal-Wallis One-Way Analysis of Variance (nonparametric tests algorithms)
References (nonparametric tests algorithms)


Kolmogorov-Smirnov One-Sample Test (nonparametric tests algorithms)

nonparametric tests algorithms,nonparametric tests algorithms,nonparametric tests algorithms
Kolmogorov-Smirnov one-sample test,Kolmogorov-Smirnov one-sample test,Kolmogorov-Smirnov one-sample test

Related Topics

Calculation of Empirical Cumulative Distribution Function (nonparametric tests algorithms)
Estimation of Parameters for Theoretical Distribution (nonparametric tests algorithms)
Calculation of Theoretical Cumulative Distribution Functions (nonparametric tests algorithms)
Calculation of Differences (nonparametric tests algorithms)
Test Statistic and Significance (nonparametric tests algorithms)
NPAR TESTS Algorithms
One-Sample Chi-Square Test (nonparametric tests algorithms)
Runs Test (nonparametric tests algorithms)
Binomial Test (nonparametric tests algorithms)
McNemar’s Test (nonparametric tests algorithms)
Sign Test (nonparametric tests algorithms)
Wilcoxon Matched-Pairs Signed-Rank Test (nonparametric tests algorithms)
Cochran’s Q Test (nonparametric tests algorithms)
Friedman’s Test (nonparametric tests algorithms)
Kendall’s Coefficient of Concordance (nonparametric tests algorithms)
The Two-Sample Median Test (nonparametric tests algorithms)
Mann-Whitney U Test (nonparametric tests algorithms)
Kolmogorov-Smirnov Two-Sample Test (nonparametric tests algorithms)
Wald-Wolfowitz Runs Test (nonparametric tests algorithms)
Moses Test of Extreme Reaction (nonparametric tests algorithms)
K-Sample Median Test (nonparametric tests algorithms)
Kruskal-Wallis One-Way Analysis of Variance (nonparametric tests algorithms)
References (nonparametric tests algorithms)


Calculation of Empirical Cumulative Distribution Function (nonparametric tests algorithms)

nonparametric tests algorithms,nonparametric tests algorithms,nonparametric tests algorithms
calculation of empirical cumulative distribution function,calculation of empirical cumulative distribution function,calculation of empirical cumulative distribution function

The observations are sorted into ascending order X(1) to X(N). The empirical cdf,
^
F
(X), is

^
F
(X)={
0 | −∞<X<X(1)
i/N X(i)≤X<X(i+1)
i=1,...,N−1
1 | X(N)≤X<∞

Related Topics

Kolmogorov-Smirnov One-Sample Test (nonparametric tests algorithms)
Estimation of Parameters for Theoretical Distribution (nonparametric tests algorithms)
Calculation of Theoretical Cumulative Distribution Functions (nonparametric tests algorithms)
Calculation of Differences (nonparametric tests algorithms)
Test Statistic and Significance (nonparametric tests algorithms)


Estimation of Parameters for Theoretical Distribution (nonparametric tests algorithms)

nonparametric tests algorithms,nonparametric tests algorithms,nonparametric tests algorithms
estimation of parameters for theoretical distribution,estimation of parameters for theoretical distribution,estimation of parameters for theoretical distribution

It is possible to test that the underlying distribution is either uniform, normal, or Poisson. If the parameters are not specified, they are estimated from the data.

Uniform

minimum =X(1)
maximum =X(N)

Normal

mean (X)=NΣi=1Xi/N
standard deviation (S)=
√ (NΣi=1X2i−(NΣi=1Xi/N)(NΣi=1Xi))/(N−1)

Poisson

mean (λ)=NΣi=1Xi/N

The test is not done if, for the uniform, all data are not within the user-specified range or, for the Poisson, the data are not non-negative integers. If the variance of the normal or the mean of the Poisson is zero, the test is also not done.

Related Topics

Kolmogorov-Smirnov One-Sample Test (nonparametric tests algorithms)
Calculation of Empirical Cumulative Distribution Function (nonparametric tests algorithms)
Calculation of Theoretical Cumulative Distribution Functions (nonparametric tests algorithms)
Calculation of Differences (nonparametric tests algorithms)
Test Statistic and Significance (nonparametric tests algorithms)


Calculation of Theoretical Cumulative Distribution Functions (nonparametric tests algorithms)

nonparametric tests algorithms,nonparametric tests algorithms,nonparametric tests algorithms
calculation of theoretical cumulative distribution functions,calculation of theoretical cumulative distribution functions,calculation of theoretical cumulative distribution functions

For Uniform

F0(Xi)=Xi−minmax−min

For Poisson

F0(Xi)=XiΣl=0e−λλll!

If λ≥100,000, the normal approximation is used.

For Normal

F0(Xi)=F0,1(Xi−XS)

where the generation of F0,1(Z) is described in Significance Level of a Standard Normal Deviate.

Related Topics

Kolmogorov-Smirnov One-Sample Test (nonparametric tests algorithms)
Calculation of Empirical Cumulative Distribution Function (nonparametric tests algorithms)
Estimation of Parameters for Theoretical Distribution (nonparametric tests algorithms)
Calculation of Differences (nonparametric tests algorithms)
Test Statistic and Significance (nonparametric tests algorithms)


Calculation of Differences (nonparametric tests algorithms)

nonparametric tests algorithms,nonparametric tests algorithms,nonparametric tests algorithms
calculation of differences,calculation of differences,calculation of differences

For the Uniform and Normal, two differences are computed:

Di=
^
F
(Xi−1)−F0(Xi)
˜
D
i=
^
F
(Xi)−F0(Xi)i=1,...,N

For the Poisson:

Di={
^
F
(Xi−1)−F(Xi−1) 		Xi>0 i=1, 2, ..., N.
0 Xi=0
˜
D
i=
^
F
(Xi)−F(Xi)

The maximum positive, negative, and absolute differences are printed.

Related Topics

Kolmogorov-Smirnov One-Sample Test (nonparametric tests algorithms)
Calculation of Empirical Cumulative Distribution Function (nonparametric tests algorithms)
Estimation of Parameters for Theoretical Distribution (nonparametric tests algorithms)
Calculation of Theoretical Cumulative Distribution Functions (nonparametric tests algorithms)
Test Statistic and Significance (nonparametric tests algorithms)


Test Statistic and Significance (nonparametric tests algorithms)

nonparametric tests algorithms,nonparametric tests algorithms,nonparametric tests algorithms
test statistic and significance,test statistic and significance,test statistic and significance

The test statistic is

Z=
√ N
maxi(|Di|,|
˜
D
i|)

The two-tailed probability level is estimated using the first three terms of the Smirnov (1948) formula.

if 0≤Z<0.27, | p=1
if 0.27≤Z<1, | p=1−2.506628Z(Q+Q9+Q25)

where Q=e−1.233701Z−2.

if 1≤Z<3.1, p=2(Q−Q4+Q9−Q16)

where Q=e−2Z2.

if Z≥3.1, p=0

Related Topics

Kolmogorov-Smirnov One-Sample Test (nonparametric tests algorithms)
Calculation of Empirical Cumulative Distribution Function (nonparametric tests algorithms)
Estimation of Parameters for Theoretical Distribution (nonparametric tests algorithms)
Calculation of Theoretical Cumulative Distribution Functions (nonparametric tests algorithms)
Calculation of Differences (nonparametric tests algorithms)


Runs Test (nonparametric tests algorithms)

nonparametric tests algorithms,nonparametric tests algorithms,nonparametric tests algorithms
runs test,runs test,runs test

Computation of Cutting Point

The cutting point which is used to dichotomize the data can be specified as a particular number, or the value of a statistic which is to be calculated. The possible statistics are

Mean =NΣi=1Xi/N
Median ={
(X(N/2+1)+X(N/2))/2 | if N is even
X((N+1)/2) | if N is odd

where the data are sorted in ascending order from X(1), the smallest, to X(N), the largest.

Mode = most frequently occurring value

If there are multiple modes, the one largest in value is selected and a warning printed.

Number of Runs

For each of the data points, in the sequence in the file, the difference

Di=Xi− CUTPOINT

is computed. If Di≥0, the difference is considered positive, otherwise negative. The number of times the sign changes, that is, Di≥0 and Di+1<0, or Di<0 and Di+1≥0, as well as the number of positive (np) and (na) signs, are determined. The number of runs (R) is the number of sign changes plus one.

Significance Level

The sampling distribution of the number of runs (R) is approximately normal with

μr=2npnanp+na+1
σr=
√ 2npna(2npna−na−np)(np+na)2(np+na−1)

The two-sided significance level is based on

Z=R−μrσr

unless n<50; then

Zc={
(R−μr+0.5)/σr | if R−μr≤0.5
(R−μr−0.5)/σr | if R−μr≥0.5
0 | if |R−μr|<0.5

Related Topics

NPAR TESTS Algorithms
One-Sample Chi-Square Test (nonparametric tests algorithms)
Kolmogorov-Smirnov One-Sample Test (nonparametric tests algorithms)
Binomial Test (nonparametric tests algorithms)
McNemar’s Test (nonparametric tests algorithms)
Sign Test (nonparametric tests algorithms)
Wilcoxon Matched-Pairs Signed-Rank Test (nonparametric tests algorithms)
Cochran’s Q Test (nonparametric tests algorithms)
Friedman’s Test (nonparametric tests algorithms)
Kendall’s Coefficient of Concordance (nonparametric tests algorithms)
The Two-Sample Median Test (nonparametric tests algorithms)
Mann-Whitney U Test (nonparametric tests algorithms)
Kolmogorov-Smirnov Two-Sample Test (nonparametric tests algorithms)
Wald-Wolfowitz Runs Test (nonparametric tests algorithms)
Moses Test of Extreme Reaction (nonparametric tests algorithms)
K-Sample Median Test (nonparametric tests algorithms)
Kruskal-Wallis One-Way Analysis of Variance (nonparametric tests algorithms)
References (nonparametric tests algorithms)


Binomial Test (nonparametric tests algorithms)

nonparametric tests algorithms,nonparametric tests algorithms,nonparametric tests algorithms
binomial test,binomial test,binomial test
n1 | Number of observations in the first (test) category
n2 | Number of observations in the second category
p | Test probability
m | min(n1,n2)
N | n1+n2
p* | p if m=n1 , 1−p if m=n2

When the test probability is equal to 0.5, a two-tailed test is performed. The two-tailed probability is

min(1,2(mΣi=0(
N
i
)0.5N))

When the test probability is not equal to 0.5, a one-tailed test is performed. The one-tailed probability is

mΣi=0(
N
i
)p*i(1−p*)N−i

Related Topics

NPAR TESTS Algorithms
One-Sample Chi-Square Test (nonparametric tests algorithms)
Kolmogorov-Smirnov One-Sample Test (nonparametric tests algorithms)
Runs Test (nonparametric tests algorithms)
McNemar’s Test (nonparametric tests algorithms)
Sign Test (nonparametric tests algorithms)
Wilcoxon Matched-Pairs Signed-Rank Test (nonparametric tests algorithms)
Cochran’s Q Test (nonparametric tests algorithms)
Friedman’s Test (nonparametric tests algorithms)
Kendall’s Coefficient of Concordance (nonparametric tests algorithms)
The Two-Sample Median Test (nonparametric tests algorithms)
Mann-Whitney U Test (nonparametric tests algorithms)
Kolmogorov-Smirnov Two-Sample Test (nonparametric tests algorithms)
Wald-Wolfowitz Runs Test (nonparametric tests algorithms)
Moses Test of Extreme Reaction (nonparametric tests algorithms)
K-Sample Median Test (nonparametric tests algorithms)
Kruskal-Wallis One-Way Analysis of Variance (nonparametric tests algorithms)
References (nonparametric tests algorithms)


McNemar’s Test (nonparametric tests algorithms)

nonparametric tests algorithms,nonparametric tests algorithms,nonparametric tests algorithms
McNemar's test,McNemar's test,McNemar's test

Table Construction

The data values are searched to determine the two unique response categories. If the variables X and Y take on more than two values, or only one value, a message is printed and the test is not done. The number of cases that have Xi<Yi(n1) or Xi>Yi(n2) are counted.

Test Statistic and Significance Level

If n1+n2≤25, the exact probability of r or fewer “successes” occurring in n1+n2 trials when p=0.5 and r=min(n1,n2) is calculated recursively from the binomial.

p(X≤r)=rΣi=0(
n1+n2
i
)(0.5)n1+n2

The two-tailed probability level is obtained by doubling the computed value. If n1+n2>25, a χ2 approximation with a correction for continuity is used.

χ2c=(|n1−n2|−1)2n1+n2, df=1

Related Topics

NPAR TESTS Algorithms
One-Sample Chi-Square Test (nonparametric tests algorithms)
Kolmogorov-Smirnov One-Sample Test (nonparametric tests algorithms)
Runs Test (nonparametric tests algorithms)
Binomial Test (nonparametric tests algorithms)
Sign Test (nonparametric tests algorithms)
Wilcoxon Matched-Pairs Signed-Rank Test (nonparametric tests algorithms)
Cochran’s Q Test (nonparametric tests algorithms)
Friedman’s Test (nonparametric tests algorithms)
Kendall’s Coefficient of Concordance (nonparametric tests algorithms)
The Two-Sample Median Test (nonparametric tests algorithms)
Mann-Whitney U Test (nonparametric tests algorithms)
Kolmogorov-Smirnov Two-Sample Test (nonparametric tests algorithms)
Wald-Wolfowitz Runs Test (nonparametric tests algorithms)
Moses Test of Extreme Reaction (nonparametric tests algorithms)
K-Sample Median Test (nonparametric tests algorithms)
Kruskal-Wallis One-Way Analysis of Variance (nonparametric tests algorithms)
References (nonparametric tests algorithms)


Sign Test (nonparametric tests algorithms)

nonparametric tests algorithms,nonparametric tests algorithms,nonparametric tests algorithms
sign test,sign test,sign test

Count of Signs

For each case, the difference

Di=Xi−Yi

is computed and the number of positive (np) and negative (nn) differences counted. Cases in which Xi=Yi are ignored.

Test Statistic and Significance Level

If np+nn≤25, the exact probability of r or fewer “successes” occurring in np+nn trials, when p=0.5 and r=min(np,nn), is calculated recursively from the binomial

p(X≤r)=rΣi=0(
np+nn
i
)(0.5)np+nn

If np+nn>25, the significance level is based on the normal approximation

Zc=max(np,nn)−0.5(np+nn)−0.50.5
√ np+nn

A two-tailed significance level is printed.

Related Topics

NPAR TESTS Algorithms
One-Sample Chi-Square Test (nonparametric tests algorithms)
Kolmogorov-Smirnov One-Sample Test (nonparametric tests algorithms)
Runs Test (nonparametric tests algorithms)
Binomial Test (nonparametric tests algorithms)
McNemar’s Test (nonparametric tests algorithms)
Wilcoxon Matched-Pairs Signed-Rank Test (nonparametric tests algorithms)
Cochran’s Q Test (nonparametric tests algorithms)
Friedman’s Test (nonparametric tests algorithms)
Kendall’s Coefficient of Concordance (nonparametric tests algorithms)
The Two-Sample Median Test (nonparametric tests algorithms)
Mann-Whitney U Test (nonparametric tests algorithms)
Kolmogorov-Smirnov Two-Sample Test (nonparametric tests algorithms)
Wald-Wolfowitz Runs Test (nonparametric tests algorithms)
Moses Test of Extreme Reaction (nonparametric tests algorithms)
K-Sample Median Test (nonparametric tests algorithms)
Kruskal-Wallis One-Way Analysis of Variance (nonparametric tests algorithms)
References (nonparametric tests algorithms)


Wilcoxon Matched-Pairs Signed-Rank Test (nonparametric tests algorithms)

nonparametric tests algorithms,nonparametric tests algorithms,nonparametric tests algorithms
Wilcoxon matched-pairs signed-rank test,Wilcoxon matched-pairs signed-rank test,Wilcoxon matched-pairs signed-rank test

Computation of Ranked Differences

For each case, the difference

Di=Xi−Yi

is computed, as well as the absolute value of Di. All nonzero absolute differences are then sorted into ascending order, and ranks are assigned. In the case of ties, the average rank is used. The sums of the ranks corresponding to positive differences (Sp) and negative differences (Sn) are calculated. The average positive rank is

Xp=Sp/np

and the average negative rank is

Xn=Sn/nn

where np is the number of cases with positive differences and nn the number with negative differences.

Test Statistic and Significance Level

The test statistic is

Z=min(Sp,Sn)−(n(n+1)/4)
√ n(n+1)(2n+1)/24−lΣj=1(t3j−tj)/48

where

n | Number of cases with non-zero differences
l | Number of ties
tj | Number of elements in the j-th tie, j=1,...,l

For large sample sizes the distribution of Z is approximately standard normal. A two-tailed probability level is printed.

Related Topics

NPAR TESTS Algorithms
One-Sample Chi-Square Test (nonparametric tests algorithms)
Kolmogorov-Smirnov One-Sample Test (nonparametric tests algorithms)
Runs Test (nonparametric tests algorithms)
Binomial Test (nonparametric tests algorithms)
McNemar’s Test (nonparametric tests algorithms)
Sign Test (nonparametric tests algorithms)
Cochran’s Q Test (nonparametric tests algorithms)
Friedman’s Test (nonparametric tests algorithms)
Kendall’s Coefficient of Concordance (nonparametric tests algorithms)
The Two-Sample Median Test (nonparametric tests algorithms)
Mann-Whitney U Test (nonparametric tests algorithms)
Kolmogorov-Smirnov Two-Sample Test (nonparametric tests algorithms)
Wald-Wolfowitz Runs Test (nonparametric tests algorithms)
Moses Test of Extreme Reaction (nonparametric tests algorithms)
K-Sample Median Test (nonparametric tests algorithms)
Kruskal-Wallis One-Way Analysis of Variance (nonparametric tests algorithms)
References (nonparametric tests algorithms)


Cochran’s Q Test (nonparametric tests algorithms)

nonparametric tests algorithms,nonparametric tests algorithms,nonparametric tests algorithms
Cochran's Q test,Cochran's Q test,Cochran's Q test
Cochran's Q test,Cochran's Q test,Cochran's Q test
algorithms,algorithms,algorithms

Computation of Basic Statistics

For each of the N cases, the k variables specified may take on only one of two possible values. If more than two values, or only one, are encountered, a message is printed and the test is not done. The first value encountered is designated a “success” and for each case the number of variables that are “successes” are counted. The number of “successes” for case i will be designated Ri and the total number of “successes” for variable l will be designated Cl.

Test Statistic and Level of Significance

Cochran’s Q is calculated as

Q=(k−1)[kkΣl=1C2l−(kΣl=1Cl)2]kkΣl=1Cl−NΣi=1R2i

The significance level of Q is from the χ2 distribution with k−1 degrees of freedom.

Related Topics

NPAR TESTS Algorithms
One-Sample Chi-Square Test (nonparametric tests algorithms)
Kolmogorov-Smirnov One-Sample Test (nonparametric tests algorithms)
Runs Test (nonparametric tests algorithms)
Binomial Test (nonparametric tests algorithms)
McNemar’s Test (nonparametric tests algorithms)
Sign Test (nonparametric tests algorithms)
Wilcoxon Matched-Pairs Signed-Rank Test (nonparametric tests algorithms)
Friedman’s Test (nonparametric tests algorithms)
Kendall’s Coefficient of Concordance (nonparametric tests algorithms)
The Two-Sample Median Test (nonparametric tests algorithms)
Mann-Whitney U Test (nonparametric tests algorithms)
Kolmogorov-Smirnov Two-Sample Test (nonparametric tests algorithms)
Wald-Wolfowitz Runs Test (nonparametric tests algorithms)
Moses Test of Extreme Reaction (nonparametric tests algorithms)
K-Sample Median Test (nonparametric tests algorithms)
Kruskal-Wallis One-Way Analysis of Variance (nonparametric tests algorithms)
References (nonparametric tests algorithms)


Friedman’s Test (nonparametric tests algorithms)

nonparametric tests algorithms,nonparametric tests algorithms,nonparametric tests algorithms
Friedman's test,Friedman's test,Friedman's test

Sum of Ranks

For each of the N cases, the k variables are sorted and ranked, with average rank being assigned in the case of ties. For each of the k variables, the sum of ranks over the cases is calculated. This will be denoted as Cl. The average rank for each variable is

Rl=Cl/N

Test Statistic and Significance Level

The test statistic is

χ2=(12/Nk(k+1))kΣl=1C2l−3N(k+1)1−ΣT/Nk(k2−1)

where ΣT is the same as in Kendall’s coefficient of concordance. See (Lehmann, 1985) p. 265.

The significance level is from the χ2 distribution with k−1 degrees of freedom.

Related Topics

NPAR TESTS Algorithms
One-Sample Chi-Square Test (nonparametric tests algorithms)
Kolmogorov-Smirnov One-Sample Test (nonparametric tests algorithms)
Runs Test (nonparametric tests algorithms)
Binomial Test (nonparametric tests algorithms)
McNemar’s Test (nonparametric tests algorithms)
Sign Test (nonparametric tests algorithms)
Wilcoxon Matched-Pairs Signed-Rank Test (nonparametric tests algorithms)
Cochran’s Q Test (nonparametric tests algorithms)
Kendall’s Coefficient of Concordance (nonparametric tests algorithms)
The Two-Sample Median Test (nonparametric tests algorithms)
Mann-Whitney U Test (nonparametric tests algorithms)
Kolmogorov-Smirnov Two-Sample Test (nonparametric tests algorithms)
Wald-Wolfowitz Runs Test (nonparametric tests algorithms)
Moses Test of Extreme Reaction (nonparametric tests algorithms)
K-Sample Median Test (nonparametric tests algorithms)
Kruskal-Wallis One-Way Analysis of Variance (nonparametric tests algorithms)
References (nonparametric tests algorithms)


Kendall’s Coefficient of Concordance (nonparametric tests algorithms)

nonparametric tests algorithms,nonparametric tests algorithms,nonparametric tests algorithms
Kendall's coefficient of concordance (W),Kendall's coefficient of concordance (W),Kendall's coefficient of concordance (W)
Kendall's coefficient of concordance (W),Kendall's coefficient of concordance (W),Kendall's coefficient of concordance (W)
algorithms,algorithms,algorithms

N, k, and l are the same as in Friedman.

Coefficient of Concordance (W)

W=(FN(k−1))(N2k(k2−1)/12N2k(k2−1)/12−NΣT/12)

where F= Friedman χ2 statistic .

ΣT=NΣi=1kΣl=1(t3−t)

with t = number of variables tied at each tied rank for each case.

Test Statistic and Significance Level

χ2=N(k−1)W

The significance level is from the χ2 distribution with k−1 degrees of freedom.

Related Topics

NPAR TESTS Algorithms
One-Sample Chi-Square Test (nonparametric tests algorithms)
Kolmogorov-Smirnov One-Sample Test (nonparametric tests algorithms)
Runs Test (nonparametric tests algorithms)
Binomial Test (nonparametric tests algorithms)
McNemar’s Test (nonparametric tests algorithms)
Sign Test (nonparametric tests algorithms)
Wilcoxon Matched-Pairs Signed-Rank Test (nonparametric tests algorithms)
Cochran’s Q Test (nonparametric tests algorithms)
Friedman’s Test (nonparametric tests algorithms)
The Two-Sample Median Test (nonparametric tests algorithms)
Mann-Whitney U Test (nonparametric tests algorithms)
Kolmogorov-Smirnov Two-Sample Test (nonparametric tests algorithms)
Wald-Wolfowitz Runs Test (nonparametric tests algorithms)
Moses Test of Extreme Reaction (nonparametric tests algorithms)
K-Sample Median Test (nonparametric tests algorithms)
Kruskal-Wallis One-Way Analysis of Variance (nonparametric tests algorithms)
References (nonparametric tests algorithms)


The Two-Sample Median Test (nonparametric tests algorithms)

nonparametric tests algorithms,nonparametric tests algorithms,nonparametric tests algorithms
two-sample median test,two-sample median test,two-sample median test

Table Construction

If the median value is not specified by the user, the combined data from both samples are sorted and the median calculated.

Md={
(X[N/2]+X[N/2+1])/2 | if N is even
X[(N+1)/2] | otherwise

where X[N] is the largest value and X[1] the smallest. The number of cases in each of the two groups which exceed the median are counted. These will be denoted as g1 and g2, and the corresponding sample sizes as n1 and n2.

Test Statistic and Significance Level

• If N≤30, the significance level is from Fisher’s exact test. (See Appendix 5.)

• If N>30, the test statistic is

χ2c=[| g1(n2−g2)−g2(n1−g1)|−N/2]2N(g1+g2)(n1+n2−g1−g2)n1n2

which is distributed as a χ2 with 1 degree of freedom.

Related Topics

NPAR TESTS Algorithms
One-Sample Chi-Square Test (nonparametric tests algorithms)
Kolmogorov-Smirnov One-Sample Test (nonparametric tests algorithms)
Runs Test (nonparametric tests algorithms)
Binomial Test (nonparametric tests algorithms)
McNemar’s Test (nonparametric tests algorithms)
Sign Test (nonparametric tests algorithms)
Wilcoxon Matched-Pairs Signed-Rank Test (nonparametric tests algorithms)
Cochran’s Q Test (nonparametric tests algorithms)
Friedman’s Test (nonparametric tests algorithms)
Kendall’s Coefficient of Concordance (nonparametric tests algorithms)
Mann-Whitney U Test (nonparametric tests algorithms)
Kolmogorov-Smirnov Two-Sample Test (nonparametric tests algorithms)
Wald-Wolfowitz Runs Test (nonparametric tests algorithms)
Moses Test of Extreme Reaction (nonparametric tests algorithms)
K-Sample Median Test (nonparametric tests algorithms)
Kruskal-Wallis One-Way Analysis of Variance (nonparametric tests algorithms)
References (nonparametric tests algorithms)


Mann-Whitney U Test (nonparametric tests algorithms)

nonparametric tests algorithms,nonparametric tests algorithms,nonparametric tests algorithms
Mann-Whitney U test,Mann-Whitney U test,Mann-Whitney U test

Calculation of Sums of Ranks

The combined data from both groups are sorted and ranks assigned to all cases, with average rank being used in the case of ties. The sum of ranks for each of the groups (S1 and S2) is calculated, as well as, for tied observations, Ti=t3−t12, where t is the number of observations tied for rank i.
The average rank for each group is

Si=Si/ni

where ni is the sample size in group i.

Test Statistic and Significance Level

The U statistic for group 1 is

U=n1n2+n1(n1+1)2−S1

• If U>n1n2/2, the statistic used is

U´=n1n2−U

• If n1n2≤400 and n1n2/2+min(n1,n2)≤220 the exact significance level is based on an algorithm of Dineen and Blakesley (1973).

• The test statistic corrected for ties is

Z=(U−n1n2/2)
√ n1n2N(N−1)(N3−N12−
Σ
i
Ti)

which is distributed approximately as a standard normal. A two-tailed significance level is printed.

Wilcoxon Rank Sum W Statistic

If U>n1n2/2, then W=S1; otherwise W=S2.

Related Topics

NPAR TESTS Algorithms
One-Sample Chi-Square Test (nonparametric tests algorithms)
Kolmogorov-Smirnov One-Sample Test (nonparametric tests algorithms)
Runs Test (nonparametric tests algorithms)
Binomial Test (nonparametric tests algorithms)
McNemar’s Test (nonparametric tests algorithms)
Sign Test (nonparametric tests algorithms)
Wilcoxon Matched-Pairs Signed-Rank Test (nonparametric tests algorithms)
Cochran’s Q Test (nonparametric tests algorithms)
Friedman’s Test (nonparametric tests algorithms)
Kendall’s Coefficient of Concordance (nonparametric tests algorithms)
The Two-Sample Median Test (nonparametric tests algorithms)
Kolmogorov-Smirnov Two-Sample Test (nonparametric tests algorithms)
Wald-Wolfowitz Runs Test (nonparametric tests algorithms)
Moses Test of Extreme Reaction (nonparametric tests algorithms)
K-Sample Median Test (nonparametric tests algorithms)
Kruskal-Wallis One-Way Analysis of Variance (nonparametric tests algorithms)
References (nonparametric tests algorithms)


Kolmogorov-Smirnov Two-Sample Test (nonparametric tests algorithms)

nonparametric tests algorithms,nonparametric tests algorithms,nonparametric tests algorithms
Kolmogorov-Smirnov two-sample test,Kolmogorov-Smirnov two-sample test,Kolmogorov-Smirnov two-sample test

Calculation of the Empirical Cumulative Distribution Functions and Differences

For each of the two groups separately the data sorted into ascending order, from X[1] to X[ni], and the empirical cdf for group i is computed as

^
F
i(X)={
0 | −∞<X<X[1]
j/ni | X[j]≤X<X[j+1]
1 | X[n1]≤X<∞

For all of the Xj values in the two groups, the difference between the two groups is

Dj=
^
F
1(Xj)−
^
F
2(Xj)

where
^
F
1(Xj) is the cdf for the group with the larger sample size. The maximum positive, negative, and absolute differences are also computed.

Test Statistic and Level of Significance

The test statistic (Smirnov, 1948) is

Z=maxj
|Dj|
√ n1n2n1+n2
j

and the significance level is calculated using the Smirnov approximation described in the K-S one sample test.

Related Topics

NPAR TESTS Algorithms
One-Sample Chi-Square Test (nonparametric tests algorithms)
Kolmogorov-Smirnov One-Sample Test (nonparametric tests algorithms)
Runs Test (nonparametric tests algorithms)
Binomial Test (nonparametric tests algorithms)
McNemar’s Test (nonparametric tests algorithms)
Sign Test (nonparametric tests algorithms)
Wilcoxon Matched-Pairs Signed-Rank Test (nonparametric tests algorithms)
Cochran’s Q Test (nonparametric tests algorithms)
Friedman’s Test (nonparametric tests algorithms)
Kendall’s Coefficient of Concordance (nonparametric tests algorithms)
The Two-Sample Median Test (nonparametric tests algorithms)
Mann-Whitney U Test (nonparametric tests algorithms)
Wald-Wolfowitz Runs Test (nonparametric tests algorithms)
Moses Test of Extreme Reaction (nonparametric tests algorithms)
K-Sample Median Test (nonparametric tests algorithms)
Kruskal-Wallis One-Way Analysis of Variance (nonparametric tests algorithms)
References (nonparametric tests algorithms)


Wald-Wolfowitz Runs Test (nonparametric tests algorithms)

nonparametric tests algorithms,nonparametric tests algorithms,nonparametric tests algorithms
Wald-Wolfowitz runs test,Wald-Wolfowitz runs test,Wald-Wolfowitz runs test

Calculation of Number of Runs

All observations from the two samples are pooled and sorted into ascending order. The number of changes in the group numbers corresponding to the ordered data are counted. The number of runs (R) is the number of group changes plus one.

If there are ties involving observations from the two groups, both the minimum and maximum number of runs possible are calculated.

Significance Level

If n1+n2, the total sample size, is less than or equal to 30, the one-sided significance level is exactly calculated from

P(r≤R)=2(
n1+n2
n1
)RΣr=2(
n1−1
r/2−1
) (
n2−1
r/2−1
)

when R is even. When R is odd

P(r≤R)=1(
n1+n2
n1
)RΣr=2[(
n1−1
k−1
) (
n2−1
k−2
)+(
n1−1
k−2
) (
n2−1
k−1
)]

where

r=2k−1.

For sample sizes greater than 30, the normal approximation is used (see Runs Test).

Related Topics

NPAR TESTS Algorithms
One-Sample Chi-Square Test (nonparametric tests algorithms)
Kolmogorov-Smirnov One-Sample Test (nonparametric tests algorithms)
Runs Test (nonparametric tests algorithms)
Binomial Test (nonparametric tests algorithms)
McNemar’s Test (nonparametric tests algorithms)
Sign Test (nonparametric tests algorithms)
Wilcoxon Matched-Pairs Signed-Rank Test (nonparametric tests algorithms)
Cochran’s Q Test (nonparametric tests algorithms)
Friedman’s Test (nonparametric tests algorithms)
Kendall’s Coefficient of Concordance (nonparametric tests algorithms)
The Two-Sample Median Test (nonparametric tests algorithms)
Mann-Whitney U Test (nonparametric tests algorithms)
Kolmogorov-Smirnov Two-Sample Test (nonparametric tests algorithms)
Moses Test of Extreme Reaction (nonparametric tests algorithms)
K-Sample Median Test (nonparametric tests algorithms)
Kruskal-Wallis One-Way Analysis of Variance (nonparametric tests algorithms)
References (nonparametric tests algorithms)


Moses Test of Extreme Reaction (nonparametric tests algorithms)

nonparametric tests algorithms,nonparametric tests algorithms,nonparametric tests algorithms
Moses test of extreme reaction,Moses test of extreme reaction,Moses test of extreme reaction

Span Computation

Observation from both groups are jointly sorted and ranked, with the average rank being assigned in the case of ties. The ranks corresponding to the smallest and largest control group (first group) members are determined, and the span is computed as

SPAN = Rank(Largest Control Value) – Rank(Smallest Control Value) + 1

rounded to the nearest integer.

Significance Level

The exact one-tailed probability level is computed from

P( SPAN ≤nc−2h+g)=gΣi=0[(
i+nc−2h−2
i
) (
ne+2h+1−i
ne−i
)](
nc+ne
nc
)

where h=0, nc is the number of cases in the control group, and ne is the number of cases in the experimental group. The same formula is used in the next section where h is not zero.

Censoring of Range

The previous test is repeated, dropping the h lowest and h highest ranks from the control group. If not specified by the user, h is taken to be the integer part of 0.05 nc or 1, whichever is greater. If h is user specified, the integer value is used unless it is less than one. The significance level is determined as in the previous section.

Related Topics

NPAR TESTS Algorithms
One-Sample Chi-Square Test (nonparametric tests algorithms)
Kolmogorov-Smirnov One-Sample Test (nonparametric tests algorithms)
Runs Test (nonparametric tests algorithms)
Binomial Test (nonparametric tests algorithms)
McNemar’s Test (nonparametric tests algorithms)
Sign Test (nonparametric tests algorithms)
Wilcoxon Matched-Pairs Signed-Rank Test (nonparametric tests algorithms)
Cochran’s Q Test (nonparametric tests algorithms)
Friedman’s Test (nonparametric tests algorithms)
Kendall’s Coefficient of Concordance (nonparametric tests algorithms)
The Two-Sample Median Test (nonparametric tests algorithms)
Mann-Whitney U Test (nonparametric tests algorithms)
Kolmogorov-Smirnov Two-Sample Test (nonparametric tests algorithms)
Wald-Wolfowitz Runs Test (nonparametric tests algorithms)
K-Sample Median Test (nonparametric tests algorithms)
Kruskal-Wallis One-Way Analysis of Variance (nonparametric tests algorithms)
References (nonparametric tests algorithms)


K-Sample Median Test (nonparametric tests algorithms)

nonparametric tests algorithms,nonparametric tests algorithms,nonparametric tests algorithms
k-sample median test,k-sample median test,k-sample median test

Table Construction

If the median value is not specified by the user, the combined data from all groups are sorted and the median is calculated.

Md ={
(X[N/2]+X[N/2+1])/2 | if N is even
X[(N+1)/2] | if N is odd

where X[N] is the largest value and X[1] the smallest.

The number of cases in each of the groups that exceed the median are counted and the following table is formed.

Group
 | 1 | 2 | 3 | ... | k |
LE Md | O11 | O12 | O13 | ... | O1k | R1
GT Md | O21 | O22 | O23 | ... | O2k | R2
 | n1 | n2 | n3 | ... | nk | N

Test Statistic and Level of Significance

The χ2 statistic for all nonempty groups is calculated as

χ2=kΣj=12Σi=1(Oij−Eij)2/Eij

where

Eij=RinjN.

The significance level is from the χ2 distribution with k−1 degrees of freedom, where k is the number of nonempty groups. A message is printed if any cell has an expected value less than one, or more than 20% of the cells have expected values less than five.

Related Topics

NPAR TESTS Algorithms
One-Sample Chi-Square Test (nonparametric tests algorithms)
Kolmogorov-Smirnov One-Sample Test (nonparametric tests algorithms)
Runs Test (nonparametric tests algorithms)
Binomial Test (nonparametric tests algorithms)
McNemar’s Test (nonparametric tests algorithms)
Sign Test (nonparametric tests algorithms)
Wilcoxon Matched-Pairs Signed-Rank Test (nonparametric tests algorithms)
Cochran’s Q Test (nonparametric tests algorithms)
Friedman’s Test (nonparametric tests algorithms)
Kendall’s Coefficient of Concordance (nonparametric tests algorithms)
The Two-Sample Median Test (nonparametric tests algorithms)
Mann-Whitney U Test (nonparametric tests algorithms)
Kolmogorov-Smirnov Two-Sample Test (nonparametric tests algorithms)
Wald-Wolfowitz Runs Test (nonparametric tests algorithms)
Moses Test of Extreme Reaction (nonparametric tests algorithms)
Kruskal-Wallis One-Way Analysis of Variance (nonparametric tests algorithms)
References (nonparametric tests algorithms)


Kruskal-Wallis One-Way Analysis of Variance (nonparametric tests algorithms)

nonparametric tests algorithms,nonparametric tests algorithms,nonparametric tests algorithms
Kruskal-Wallis one-way analysis of variance,Kruskal-Wallis one-way analysis of variance,Kruskal-Wallis one-way analysis of variance

Computation of Sums of Ranks

Observations from all k nonempty groups are jointly sorted and ranked, with the average rank being assigned in the case of ties. The number of tied scores in a set of ties, ti, is also found, and the sum of Ti=t3i−ti is accumulated. For each group the sum of ranks, Ri, as well as the number of observations, ni, is obtained.

Test Statistic and Level of Significance

The test statistic unadjusted for ties is

H=12N(N+1)kΣi=1R2i/ni−3 (N+1)

where N is the total number of observations.
Adjusted for ties, the statistic is

H´=H1−mΣi=1Ti/(N3−N)

where m is the total number of tied sets.

The significance level is based on the χ2 distribution, with k−1 degrees of freedom.

Related Topics

NPAR TESTS Algorithms
One-Sample Chi-Square Test (nonparametric tests algorithms)
Kolmogorov-Smirnov One-Sample Test (nonparametric tests algorithms)
Runs Test (nonparametric tests algorithms)
Binomial Test (nonparametric tests algorithms)
McNemar’s Test (nonparametric tests algorithms)
Sign Test (nonparametric tests algorithms)
Wilcoxon Matched-Pairs Signed-Rank Test (nonparametric tests algorithms)
Cochran’s Q Test (nonparametric tests algorithms)
Friedman’s Test (nonparametric tests algorithms)
Kendall’s Coefficient of Concordance (nonparametric tests algorithms)
The Two-Sample Median Test (nonparametric tests algorithms)
Mann-Whitney U Test (nonparametric tests algorithms)
Kolmogorov-Smirnov Two-Sample Test (nonparametric tests algorithms)
Wald-Wolfowitz Runs Test (nonparametric tests algorithms)
Moses Test of Extreme Reaction (nonparametric tests algorithms)
K-Sample Median Test (nonparametric tests algorithms)
References (nonparametric tests algorithms)


References (nonparametric tests algorithms)

nonparametric tests algorithms,nonparametric tests algorithms,nonparametric tests algorithms
references,references,references

Dineen, L. C., and B. C. Blakesley. 1973. Algorithm AS 62: Generator for the sampling distribution of the Mann-Whitney U statistic. Applied Statistics, 22, 269-273.

Lehmann, E. L. 1985. Nonparametrics: Statistical Methods Based on Ranks. San Francisco: McGraw-Hill.

Siegel, S. 1956. Nonparametric statistics for the behavioral sciences. New York: McGraw-Hill.

Smirnov, N. V. 1948. Table for estimating the goodness of fit of empirical distributions. Annals of the Mathematical Statistics, 19, 279-281.

Related Topics

NPAR TESTS Algorithms
One-Sample Chi-Square Test (nonparametric tests algorithms)
Kolmogorov-Smirnov One-Sample Test (nonparametric tests algorithms)
Runs Test (nonparametric tests algorithms)
Binomial Test (nonparametric tests algorithms)
McNemar’s Test (nonparametric tests algorithms)
Sign Test (nonparametric tests algorithms)
Wilcoxon Matched-Pairs Signed-Rank Test (nonparametric tests algorithms)
Cochran’s Q Test (nonparametric tests algorithms)
Friedman’s Test (nonparametric tests algorithms)
Kendall’s Coefficient of Concordance (nonparametric tests algorithms)
The Two-Sample Median Test (nonparametric tests algorithms)
Mann-Whitney U Test (nonparametric tests algorithms)
Kolmogorov-Smirnov Two-Sample Test (nonparametric tests algorithms)
Wald-Wolfowitz Runs Test (nonparametric tests algorithms)
Moses Test of Extreme Reaction (nonparametric tests algorithms)
K-Sample Median Test (nonparametric tests algorithms)
Kruskal-Wallis One-Way Analysis of Variance (nonparametric tests algorithms)


ONEWAY Algorithms

ONEWAY (command),ONEWAY (command),ONEWAY (command)
algorithms,algorithms,algorithms
One-Way ANOVA,One-Way ANOVA,One-Way ANOVA
algorithms,algorithms,algorithms
ONEWAY algorithms,ONEWAY algorithms,ONEWAY algorithms

For post hoc range tests and pairwise multiple comparisons, see Post Hoc Tests.

Related Topics

Notation (ONEWAY algorithms)
Group Statistics (ONEWAY algorithms)
The ANOVA Table (ONEWAY algorithms)
Basic Statistics (ONEWAY algorithms)
Variance Estimates and Confidence Interval for Mean (ONEWAY algorithms)
Levene Test for Homogeneity of Variances (ONEWAY algorithms)
User-Supplied Contrasts (ONEWAY algorithms)
Polynomial Contrasts (Speed 1976) (ONEWAY algorithms)
UNWEIGHTED Contrasts and Statistics (ONEWAY algorithms)
WEIGHTED Contrasts and Statistics (Emerson 1968; Robson 1959) (ONEWAY algorithms)
Multiple Comparisons (Winer 1971) (ONEWAY algorithms)
Establishment of Homogeneous Subsets (ONEWAY algorithms)
Welch Test (ONEWAY algorithms)
Brown-Forsythe Test (ONEWAY algorithms)
References (ONEWAY algorithms)


Notation (ONEWAY algorithms)

ONEWAY algorithms,ONEWAY algorithms,ONEWAY algorithms
notation,notation,notation

The following notation is used throughout this section unless otherwise stated:

Xlj | Value of the jth observation in group l
wlj | Weight for the jth observation in group l
Wl,j | Sum of weights of the first j cases in group l
Wl | Sum of weights of all cases in group l
ki | Number of groups, determined as maximum group values minus minimum plus one
k´ | Number of nonempty groups
nl | Number of cases in group l
W | Sum of weights of cases in all groups

Related Topics

ONEWAY Algorithms
Group Statistics (ONEWAY algorithms)
The ANOVA Table (ONEWAY algorithms)
Basic Statistics (ONEWAY algorithms)
Variance Estimates and Confidence Interval for Mean (ONEWAY algorithms)
Levene Test for Homogeneity of Variances (ONEWAY algorithms)
User-Supplied Contrasts (ONEWAY algorithms)
Polynomial Contrasts (Speed 1976) (ONEWAY algorithms)
UNWEIGHTED Contrasts and Statistics (ONEWAY algorithms)
WEIGHTED Contrasts and Statistics (Emerson 1968; Robson 1959) (ONEWAY algorithms)
Multiple Comparisons (Winer 1971) (ONEWAY algorithms)
Establishment of Homogeneous Subsets (ONEWAY algorithms)
Welch Test (ONEWAY algorithms)
Brown-Forsythe Test (ONEWAY algorithms)
References (ONEWAY algorithms)


Group Statistics (ONEWAY algorithms)

ONEWAY algorithms,ONEWAY algorithms,ONEWAY algorithms
group statistics,group statistics,group statistics

The following group statistics are available.

Related Topics

Computation of Group Statistics (ONEWAY algorithms)
Group Statistics from Summary Statistics (ONEWAY algorithms)
ONEWAY Algorithms
Notation (ONEWAY algorithms)
The ANOVA Table (ONEWAY algorithms)
Basic Statistics (ONEWAY algorithms)
Variance Estimates and Confidence Interval for Mean (ONEWAY algorithms)
Levene Test for Homogeneity of Variances (ONEWAY algorithms)
User-Supplied Contrasts (ONEWAY algorithms)
Polynomial Contrasts (Speed 1976) (ONEWAY algorithms)
UNWEIGHTED Contrasts and Statistics (ONEWAY algorithms)
WEIGHTED Contrasts and Statistics (Emerson 1968; Robson 1959) (ONEWAY algorithms)
Multiple Comparisons (Winer 1971) (ONEWAY algorithms)
Establishment of Homogeneous Subsets (ONEWAY algorithms)
Welch Test (ONEWAY algorithms)
Brown-Forsythe Test (ONEWAY algorithms)
References (ONEWAY algorithms)


Computation of Group Statistics (ONEWAY algorithms)

ONEWAY algorithms,ONEWAY algorithms,ONEWAY algorithms
computation of group statistics,computation of group statistics,computation of group statistics

A weighted version of the Young-Cramer (1971) algorithm is used to compute recursively the corrected sum of squares for each group.

SSQl,i=SSQl,i−1+wli(XliWl,i−1−i−1Σj=1wljXlj)2Wl,i−1Wli

The initial value is 0; the value for each group after the last observation has been processed is the corrected sum of squares.

SSl=SSQ l, nl

The sum and mean for each group are

Tl=nlΣi=1Xliwli
Tl=Tl/Wl

The variance is

S2l=SSl/(Wl−1)

The grand sum is

G=kΣi=1Ti

Related Topics

Group Statistics (ONEWAY algorithms)
Group Statistics from Summary Statistics (ONEWAY algorithms)


Group Statistics from Summary Statistics (ONEWAY algorithms)

ONEWAY algorithms,ONEWAY algorithms,ONEWAY algorithms
group statistics from summary statistics,group statistics from summary statistics,group statistics from summary statistics

With matrix data input, the user supplies sum of weights in each group (Wl), means (Tl), and standard deviations (Sl). From these,

Tl=WlTl
SSl=(Wl−1)S2l
G=kΣi=1Ti

If the user supplies the pooled variance S2p and its degrees of freedom (D) instead of the individual Sl, and D<1, the program will reset it to

D=kΣl=1Wl−k´

The within-group sum of squares is

WSS=S2pD

Related Topics

Group Statistics (ONEWAY algorithms)
Computation of Group Statistics (ONEWAY algorithms)


The ANOVA Table (ONEWAY algorithms)

ONEWAY algorithms,ONEWAY algorithms,ONEWAY algorithms
the ANOVA table,the ANOVA table,the ANOVA table

Source of Variation

SS

df

Between (BSS)

kΣl=1T2l/nl−G2/W

k´−1

Within (WSS)

kΣl=1SSl
(s2pD for matrix input )

W−k´
(D)

Total (TSS)

BSS+WSS

W−1

Mean squares are calculated by dividing each sum of squares by its degree of freedom. The F ratio for testing equality of group means is

F= Mean Square Between Mean Square Within =BSSMWSSM

The significance level is obtained from the F distribution with numerator and denominator degrees of freedom.

Related Topics

ONEWAY Algorithms
Notation (ONEWAY algorithms)
Group Statistics (ONEWAY algorithms)
Basic Statistics (ONEWAY algorithms)
Variance Estimates and Confidence Interval for Mean (ONEWAY algorithms)
Levene Test for Homogeneity of Variances (ONEWAY algorithms)
User-Supplied Contrasts (ONEWAY algorithms)
Polynomial Contrasts (Speed 1976) (ONEWAY algorithms)
UNWEIGHTED Contrasts and Statistics (ONEWAY algorithms)
WEIGHTED Contrasts and Statistics (Emerson 1968; Robson 1959) (ONEWAY algorithms)
Multiple Comparisons (Winer 1971) (ONEWAY algorithms)
Establishment of Homogeneous Subsets (ONEWAY algorithms)
Welch Test (ONEWAY algorithms)
Brown-Forsythe Test (ONEWAY algorithms)
References (ONEWAY algorithms)


Basic Statistics (ONEWAY algorithms)

ONEWAY algorithms,ONEWAY algorithms,ONEWAY algorithms
basic statistics,basic statistics,basic statistics

The following basic statistics are available.

Related Topics

Descriptive Statistics (ONEWAY algorithms)
95% Confidence Interval for the Mean (ONEWAY algorithms)
ONEWAY Algorithms
Notation (ONEWAY algorithms)
Group Statistics (ONEWAY algorithms)
The ANOVA Table (ONEWAY algorithms)
Variance Estimates and Confidence Interval for Mean (ONEWAY algorithms)
Levene Test for Homogeneity of Variances (ONEWAY algorithms)
User-Supplied Contrasts (ONEWAY algorithms)
Polynomial Contrasts (Speed 1976) (ONEWAY algorithms)
UNWEIGHTED Contrasts and Statistics (ONEWAY algorithms)
WEIGHTED Contrasts and Statistics (Emerson 1968; Robson 1959) (ONEWAY algorithms)
Multiple Comparisons (Winer 1971) (ONEWAY algorithms)
Establishment of Homogeneous Subsets (ONEWAY algorithms)
Welch Test (ONEWAY algorithms)
Brown-Forsythe Test (ONEWAY algorithms)
References (ONEWAY algorithms)


Descriptive Statistics (ONEWAY algorithms)

ONEWAY algorithms,ONEWAY algorithms,ONEWAY algorithms
descriptive statistics,descriptive statistics,descriptive statistics
Sample size =Wq
Mean =Tq
Standard deviation =Sq
Standard error =Sq/
√ Wq

Related Topics

Basic Statistics (ONEWAY algorithms)
95% Confidence Interval for the Mean (ONEWAY algorithms)


95% Confidence Interval for the Mean (ONEWAY algorithms)

ONEWAY algorithms,ONEWAY algorithms,ONEWAY algorithms
95% confidence interval for mean,95% confidence interval for mean,95% confidence interval for mean
Tq±tWq−1Sq/
√ Wq

where tWq−1 is the upper 2.5% critical value for the t distribution with Wq−1 degrees of freedom.

Related Topics

Basic Statistics (ONEWAY algorithms)
Descriptive Statistics (ONEWAY algorithms)


Variance Estimates and Confidence Interval for Mean (ONEWAY algorithms)

ONEWAY algorithms,ONEWAY algorithms,ONEWAY algorithms
variance estimates and confidence interval for mean,variance estimates and confidence interval for mean,variance estimates and confidence interval for mean

Computation depends upon whether a fixed-effects or random-effects model is fit.

Related Topics

Fixed-Effects Model (ONEWAY algorithms)
Pooled Standard Deviation (ONEWAY algorithms)
Standard Error (ONEWAY algorithms)
95% Confidence Interval for the Mean (ONEWAY algorithms)
Random-Effects Model (ONEWAY algorithms)
Between-Groups Component of Variance (Snedecor and Cochran 1967) (ONEWAY algorithms)
Standard Error of the Mean (Brownlee 1965) (ONEWAY algorithms)
95% Confidence Interval for the Mean (ONEWAY algorithms)
ONEWAY Algorithms
Notation (ONEWAY algorithms)
Group Statistics (ONEWAY algorithms)
The ANOVA Table (ONEWAY algorithms)
Basic Statistics (ONEWAY algorithms)
Levene Test for Homogeneity of Variances (ONEWAY algorithms)
User-Supplied Contrasts (ONEWAY algorithms)
Polynomial Contrasts (Speed 1976) (ONEWAY algorithms)
UNWEIGHTED Contrasts and Statistics (ONEWAY algorithms)
WEIGHTED Contrasts and Statistics (Emerson 1968; Robson 1959) (ONEWAY algorithms)
Multiple Comparisons (Winer 1971) (ONEWAY algorithms)
Establishment of Homogeneous Subsets (ONEWAY algorithms)
Welch Test (ONEWAY algorithms)
Brown-Forsythe Test (ONEWAY algorithms)
References (ONEWAY algorithms)


Fixed-Effects Model (ONEWAY algorithms)

ONEWAY algorithms,ONEWAY algorithms,ONEWAY algorithms
fixed-effects model,fixed-effects model,fixed-effects model

Fixed-effects factors are generally thought of as variables whose values of interest are all represented in the data file.

Related Topics

Variance Estimates and Confidence Interval for Mean (ONEWAY algorithms)
Pooled Standard Deviation (ONEWAY algorithms)
Standard Error (ONEWAY algorithms)
95% Confidence Interval for the Mean (ONEWAY algorithms)
Random-Effects Model (ONEWAY algorithms)
Between-Groups Component of Variance (Snedecor and Cochran 1967) (ONEWAY algorithms)
Standard Error of the Mean (Brownlee 1965) (ONEWAY algorithms)
95% Confidence Interval for the Mean (ONEWAY algorithms)


Pooled Standard Deviation (ONEWAY algorithms)

ONEWAY algorithms,ONEWAY algorithms,ONEWAY algorithms
pooled standard deviation,pooled standard deviation,pooled standard deviation
Sp=
√ WSSM

Related Topics

Variance Estimates and Confidence Interval for Mean (ONEWAY algorithms)
Fixed-Effects Model (ONEWAY algorithms)
Standard Error (ONEWAY algorithms)
95% Confidence Interval for the Mean (ONEWAY algorithms)
Random-Effects Model (ONEWAY algorithms)
Between-Groups Component of Variance (Snedecor and Cochran 1967) (ONEWAY algorithms)
Standard Error of the Mean (Brownlee 1965) (ONEWAY algorithms)
95% Confidence Interval for the Mean (ONEWAY algorithms)


Standard Error (ONEWAY algorithms)

ONEWAY algorithms,ONEWAY algorithms,ONEWAY algorithms
standard error,standard error,standard error
Standard error =
√ WSSM/W

Related Topics

Variance Estimates and Confidence Interval for Mean (ONEWAY algorithms)
Fixed-Effects Model (ONEWAY algorithms)
Pooled Standard Deviation (ONEWAY algorithms)
95% Confidence Interval for the Mean (ONEWAY algorithms)
Random-Effects Model (ONEWAY algorithms)
Between-Groups Component of Variance (Snedecor and Cochran 1967) (ONEWAY algorithms)
Standard Error of the Mean (Brownlee 1965) (ONEWAY algorithms)
95% Confidence Interval for the Mean (ONEWAY algorithms)


95% Confidence Interval for the Mean (ONEWAY algorithms)

ONEWAY algorithms,ONEWAY algorithms,ONEWAY algorithms
95% confidence interval for mean,95% confidence interval for mean,95% confidence interval for mean
G±tW−k´
√ WSSM/W

where tW−k´ is the upper 2.5% critical value for the t distribution with W−k´ degrees of freedom.

Related Topics

Variance Estimates and Confidence Interval for Mean (ONEWAY algorithms)
Fixed-Effects Model (ONEWAY algorithms)
Pooled Standard Deviation (ONEWAY algorithms)
Standard Error (ONEWAY algorithms)
Random-Effects Model (ONEWAY algorithms)
Between-Groups Component of Variance (Snedecor and Cochran 1967) (ONEWAY algorithms)
Standard Error of the Mean (Brownlee 1965) (ONEWAY algorithms)
95% Confidence Interval for the Mean (ONEWAY algorithms)


Random-Effects Model (ONEWAY algorithms)

ONEWAY algorithms,ONEWAY algorithms,ONEWAY algorithms
random-effects model,random-effects model,random-effects model

Random-effects factors are variables whose values in the data file can be considered a random sample from a larger population of values. They are useful for explaining excess variability in the dependent variable.

Related Topics

Variance Estimates and Confidence Interval for Mean (ONEWAY algorithms)
Fixed-Effects Model (ONEWAY algorithms)
Pooled Standard Deviation (ONEWAY algorithms)
Standard Error (ONEWAY algorithms)
95% Confidence Interval for the Mean (ONEWAY algorithms)
Between-Groups Component of Variance (Snedecor and Cochran 1967) (ONEWAY algorithms)
Standard Error of the Mean (Brownlee 1965) (ONEWAY algorithms)
95% Confidence Interval for the Mean (ONEWAY algorithms)


Between-Groups Component of Variance (Snedecor and Cochran 1967) (ONEWAY algorithms)

ONEWAY algorithms,ONEWAY algorithms,ONEWAY algorithms
between-groups component of variance,between-groups component of variance,between-groups component of variance
ω2=(BSSM−WSSM)(W(k´−1))(W2−kΣi=1W2i)

Related Topics

Variance Estimates and Confidence Interval for Mean (ONEWAY algorithms)
Fixed-Effects Model (ONEWAY algorithms)
Pooled Standard Deviation (ONEWAY algorithms)
Standard Error (ONEWAY algorithms)
95% Confidence Interval for the Mean (ONEWAY algorithms)
Random-Effects Model (ONEWAY algorithms)
Standard Error of the Mean (Brownlee 1965) (ONEWAY algorithms)
95% Confidence Interval for the Mean (ONEWAY algorithms)


Standard Error of the Mean (Brownlee 1965) (ONEWAY algorithms)

ONEWAY algorithms,ONEWAY algorithms,ONEWAY algorithms
standard error of the mean,standard error of the mean,standard error of the mean
V(G)=(kΣi=1W2i)(k´−1)(BSSM−WSSM)W(W2−kΣi=1W2i)+WSSMW

If BSSM<WSSM, V(G)=WSSMW and a warning is printed that the variance component estimate is negative.

Related Topics

Variance Estimates and Confidence Interval for Mean (ONEWAY algorithms)
Fixed-Effects Model (ONEWAY algorithms)
Pooled Standard Deviation (ONEWAY algorithms)
Standard Error (ONEWAY algorithms)
95% Confidence Interval for the Mean (ONEWAY algorithms)
Random-Effects Model (ONEWAY algorithms)
Between-Groups Component of Variance (Snedecor and Cochran 1967) (ONEWAY algorithms)
95% Confidence Interval for the Mean (ONEWAY algorithms)


95% Confidence Interval for the Mean (ONEWAY algorithms)

ONEWAY algorithms,ONEWAY algorithms,ONEWAY algorithms
95% confidence interval for mean,95% confidence interval for mean,95% confidence interval for mean
G±tk´−1
√ V(G)

where tk´−1 is the upper 2.5% critical value for the t distribution with k´−1 degrees of freedom

Related Topics

Variance Estimates and Confidence Interval for Mean (ONEWAY algorithms)
Fixed-Effects Model (ONEWAY algorithms)
Pooled Standard Deviation (ONEWAY algorithms)
Standard Error (ONEWAY algorithms)
95% Confidence Interval for the Mean (ONEWAY algorithms)
Random-Effects Model (ONEWAY algorithms)
Between-Groups Component of Variance (Snedecor and Cochran 1967) (ONEWAY algorithms)
Standard Error of the Mean (Brownlee 1965) (ONEWAY algorithms)


Levene Test for Homogeneity of Variances (ONEWAY algorithms)

ONEWAY algorithms,ONEWAY algorithms,ONEWAY algorithms
tests for homogeneity of variances,tests for homogeneity of variances,tests for homogeneity of variances
ONEWAY algorithms,ONEWAY algorithms,ONEWAY algorithms
Levene test,Levene test,Levene test
L=(W−k´)k´Σi=1Wi(Zi−Z)2(k´−1)k´Σi=1niΣl=1wil(Zil−Zi)2

where

Zil=|Xil−Ti|
Zi=niΣl=1wilZilWi
Z=k´Σi=1WiZiW

Related Topics

ONEWAY Algorithms
Notation (ONEWAY algorithms)
Group Statistics (ONEWAY algorithms)
The ANOVA Table (ONEWAY algorithms)
Basic Statistics (ONEWAY algorithms)
Variance Estimates and Confidence Interval for Mean (ONEWAY algorithms)
User-Supplied Contrasts (ONEWAY algorithms)
Polynomial Contrasts (Speed 1976) (ONEWAY algorithms)
UNWEIGHTED Contrasts and Statistics (ONEWAY algorithms)
WEIGHTED Contrasts and Statistics (Emerson 1968; Robson 1959) (ONEWAY algorithms)
Multiple Comparisons (Winer 1971) (ONEWAY algorithms)
Establishment of Homogeneous Subsets (ONEWAY algorithms)
Welch Test (ONEWAY algorithms)
Brown-Forsythe Test (ONEWAY algorithms)
References (ONEWAY algorithms)


User-Supplied Contrasts (ONEWAY algorithms)

ONEWAY algorithms,ONEWAY algorithms,ONEWAY algorithms
user-supplied contrasts,user-supplied contrasts,user-supplied contrasts

Let C1 through Ck be the coefficients for a particular contrast. If the sum of the coefficients is not 0, a warning is printed and the contrast number is starred. For each contrast the following are printed.

Related Topics

Value of the Contrast (ONEWAY algorithms)
Pooled Variance Statistics (ONEWAY algorithms)
Separate Variance Statistics (ONEWAY algorithms)
ONEWAY Algorithms
Notation (ONEWAY algorithms)
Group Statistics (ONEWAY algorithms)
The ANOVA Table (ONEWAY algorithms)
Basic Statistics (ONEWAY algorithms)
Variance Estimates and Confidence Interval for Mean (ONEWAY algorithms)
Levene Test for Homogeneity of Variances (ONEWAY algorithms)
Polynomial Contrasts (Speed 1976) (ONEWAY algorithms)
UNWEIGHTED Contrasts and Statistics (ONEWAY algorithms)
WEIGHTED Contrasts and Statistics (Emerson 1968; Robson 1959) (ONEWAY algorithms)
Multiple Comparisons (Winer 1971) (ONEWAY algorithms)
Establishment of Homogeneous Subsets (ONEWAY algorithms)
Welch Test (ONEWAY algorithms)
Brown-Forsythe Test (ONEWAY algorithms)
References (ONEWAY algorithms)


Value of the Contrast (ONEWAY algorithms)

ONEWAY algorithms,ONEWAY algorithms,ONEWAY algorithms
value of the contrast,value of the contrast,value of the contrast
V=kΣi=1TiCi

Related Topics

User-Supplied Contrasts (ONEWAY algorithms)
Pooled Variance Statistics (ONEWAY algorithms)
Separate Variance Statistics (ONEWAY algorithms)


Pooled Variance Statistics (ONEWAY algorithms)

ONEWAY algorithms,ONEWAY algorithms,ONEWAY algorithms
pooled variance statistics,pooled variance statistics,pooled variance statistics

The following statistics are computed.

Standard Error

SE=
√ S2pkΣi=1C2i/Wi

t Value

t=V/SE

Degrees of Freedom

W−k´

And a two-tailed significance level based on the t distribution with W – k' degrees of freedom.

Related Topics

User-Supplied Contrasts (ONEWAY algorithms)
Value of the Contrast (ONEWAY algorithms)
Separate Variance Statistics (ONEWAY algorithms)


Separate Variance Statistics (ONEWAY algorithms)

ONEWAY algorithms,ONEWAY algorithms,ONEWAY algorithms
standard variance statistics,standard variance statistics,standard variance statistics

The following statistics are computed.

Standard Error

SE=
√ kΣi=1C2i(S2i/Wi)

t Value

t=V/SE

Degrees of Freedom (Brownlee 1965)

df=(kΣi=1C2iS2i/Wi)2kΣi=1(C2iS2i/Wi)2/(Wi−1)

And a two-tailed significance level based on the t distribution with df degrees of freedom

Related Topics

User-Supplied Contrasts (ONEWAY algorithms)
Value of the Contrast (ONEWAY algorithms)
Pooled Variance Statistics (ONEWAY algorithms)


Polynomial Contrasts (Speed 1976) (ONEWAY algorithms)

ONEWAY algorithms,ONEWAY algorithms,ONEWAY algorithms
polynomial contrasts,polynomial contrasts,polynomial contrasts

If the specified degree of the polynomial (NP) is less than or equal to 0, or greater than 5, a message is printed and the procedure is terminated. If the degree of the polynomial specified is greater than the number of nonempty groups, it is set to k´−1. If the sums of the weights in each group are equal, only the WEIGHTED contrasts will be generated. For unequal sample sizes with equal spacing between groups, both WEIGHTED and UNWEIGHTED contrasts are computed. For unequal sample sizes and unequal spacing, only WEIGHTED contrasts are computed. The metric for the polynomial is the group code.

Related Topics

ONEWAY Algorithms
Notation (ONEWAY algorithms)
Group Statistics (ONEWAY algorithms)
The ANOVA Table (ONEWAY algorithms)
Basic Statistics (ONEWAY algorithms)
Variance Estimates and Confidence Interval for Mean (ONEWAY algorithms)
Levene Test for Homogeneity of Variances (ONEWAY algorithms)
User-Supplied Contrasts (ONEWAY algorithms)
UNWEIGHTED Contrasts and Statistics (ONEWAY algorithms)
WEIGHTED Contrasts and Statistics (Emerson 1968; Robson 1959) (ONEWAY algorithms)
Multiple Comparisons (Winer 1971) (ONEWAY algorithms)
Establishment of Homogeneous Subsets (ONEWAY algorithms)
Welch Test (ONEWAY algorithms)
Brown-Forsythe Test (ONEWAY algorithms)
References (ONEWAY algorithms)


UNWEIGHTED Contrasts and Statistics (ONEWAY algorithms)

ONEWAY algorithms,ONEWAY algorithms,ONEWAY algorithms
UNWEIGHTED contrasts and statistics,UNWEIGHTED contrasts and statistics,UNWEIGHTED contrasts and statistics

The coefficients for the orthogonal polynomial are calculated recursively from the following relations:

ci, q=(i−Aq)ci, q−1−Cqci, q−2

for

q=1, 2, ..., NP
i=1, 2, ..., k

with the initial values

ci,−1=0, ci,0=1

and

Aq=kΣi=1ic2i, q−1kΣi=1c2i, q−1
Cq=kΣi=1c2i, q−1kΣi=1c2i, q−2 for q ≥ 2
Cq=0
for q = 1

The F statistic for the qth degree contrast is computed as

F=[kΣi=1(Ti−G)ci, q]2kΣi=1c2i, q/Wi/WSSM

where WSSM is the mean square within. The significance level is obtained from the F distribution with 1 and W−k´ degrees of freedom.

Related Topics

ONEWAY Algorithms
Notation (ONEWAY algorithms)
Group Statistics (ONEWAY algorithms)
The ANOVA Table (ONEWAY algorithms)
Basic Statistics (ONEWAY algorithms)
Variance Estimates and Confidence Interval for Mean (ONEWAY algorithms)
Levene Test for Homogeneity of Variances (ONEWAY algorithms)
User-Supplied Contrasts (ONEWAY algorithms)
Polynomial Contrasts (Speed 1976) (ONEWAY algorithms)
WEIGHTED Contrasts and Statistics (Emerson 1968; Robson 1959) (ONEWAY algorithms)
Multiple Comparisons (Winer 1971) (ONEWAY algorithms)
Establishment of Homogeneous Subsets (ONEWAY algorithms)
Welch Test (ONEWAY algorithms)
Brown-Forsythe Test (ONEWAY algorithms)
References (ONEWAY algorithms)


WEIGHTED Contrasts and Statistics (Emerson 1968; Robson 1959) (ONEWAY algorithms)

ONEWAY algorithms,ONEWAY algorithms,ONEWAY algorithms
WEIGHTED contrasts and statistics,WEIGHTED contrasts and statistics,WEIGHTED contrasts and statistics

The contrast for the qth degree polynomial component is computed from the following recursive relations:

di, q=(i−A´q)di, q−1−C´qdi, q−2

for

q=1, 2, ..., NP.
i=1, 2, ..., k.

with initial values

di, 0=1, di, −1=0
A´q=kΣi=1iWid2i, q−1kΣi=1Wid2i, q−1
C´q=kΣi=1iWidi, q−1di, q−2kΣi=1Wid2i, q−2
for q ≥ 2
C´q=0
for q = 1

The test for the contribution of the qth degree orthogonal polynomial component is based on

F=Dq/WSSM

where

Dq=(kΣi=1WiTidi, q)2kΣi=1Wid2i, q

The significance level is computed from the F distribution with degrees of freedom 1 and W−k´.

The test for deviation from the qth degree polynomial is based on

F=DDq/WSSM

where

DDq=(BSS−qΣj=1Dj)/(k´−q−1)

The significance level is computed from the F distribution with degrees of freedom k´−q−1 and W−k´. The highest degree printed will be the minimum of (k´−2) and 5.

Related Topics

ONEWAY Algorithms
Notation (ONEWAY algorithms)
Group Statistics (ONEWAY algorithms)
The ANOVA Table (ONEWAY algorithms)
Basic Statistics (ONEWAY algorithms)
Variance Estimates and Confidence Interval for Mean (ONEWAY algorithms)
Levene Test for Homogeneity of Variances (ONEWAY algorithms)
User-Supplied Contrasts (ONEWAY algorithms)
Polynomial Contrasts (Speed 1976) (ONEWAY algorithms)
UNWEIGHTED Contrasts and Statistics (ONEWAY algorithms)
Multiple Comparisons (Winer 1971) (ONEWAY algorithms)
Establishment of Homogeneous Subsets (ONEWAY algorithms)
Welch Test (ONEWAY algorithms)
Brown-Forsythe Test (ONEWAY algorithms)
References (ONEWAY algorithms)


Multiple Comparisons (Winer 1971) (ONEWAY algorithms)

ONEWAY algorithms,ONEWAY algorithms,ONEWAY algorithms
multiple comparisons,multiple comparisons,multiple comparisons

Related Topics

Generation of Ranges (ONEWAY algorithms)
ONEWAY Algorithms
Notation (ONEWAY algorithms)
Group Statistics (ONEWAY algorithms)
The ANOVA Table (ONEWAY algorithms)
Basic Statistics (ONEWAY algorithms)
Variance Estimates and Confidence Interval for Mean (ONEWAY algorithms)
Levene Test for Homogeneity of Variances (ONEWAY algorithms)
User-Supplied Contrasts (ONEWAY algorithms)
Polynomial Contrasts (Speed 1976) (ONEWAY algorithms)
UNWEIGHTED Contrasts and Statistics (ONEWAY algorithms)
WEIGHTED Contrasts and Statistics (Emerson 1968; Robson 1959) (ONEWAY algorithms)
Establishment of Homogeneous Subsets (ONEWAY algorithms)
Welch Test (ONEWAY algorithms)
Brown-Forsythe Test (ONEWAY algorithms)
References (ONEWAY algorithms)


Generation of Ranges (ONEWAY algorithms)

ONEWAY algorithms,ONEWAY algorithms,ONEWAY algorithms
generation of ranges,generation of ranges,generation of ranges

The Student-Newman-Keuls (SNK), TUKEY, and TUKEYB procedures are all based on the studentized range, Sr, f, where r is the number of steps between means and f is the degrees of freedom for the within-groups mean square. For the above tests, only α=0.05 can be used.

The appropriate range of values for the tests are

SNK | Rr=Sr, f | r=2, ..., k´
TUKEY | Rr=Sk´, f |
TUKEYB | Rr=(Sr, f+Sk´, f)2 |

For the DUNCAN procedure, alphas of 0.01, 0.05, and 0.10 can be used. The ranges (Dr, f) are generated using the algorithm of Gebhardt (1966).

DUNCAN

Rr=Dr, f

r=2, ..., k´

The Scheffé, LSD, and modified LSD procedures all use critical points from the F distribution. Any α≤0.5 can be used.

SCHEFFE

Rr=
√ 2(k´−1)F1−α(k´−1, f)

LSD

Rr=
√ 2F1−α(1, f)

MODLSD

Rr=
√ 2F1−α´(1, f)

where

α´=2αk´(k´−1)

Compute the multiplier of the ranges for the difference of means i and j.

Mi,j=Sp
√ 12(1ni+1nj)
( default )
Mi,j=Sp
√ kΣl=11/nlk´
( harmonic mean for all groups )

Related Topics

Multiple Comparisons (Winer 1971) (ONEWAY algorithms)


Establishment of Homogeneous Subsets (ONEWAY algorithms)

ONEWAY algorithms,ONEWAY algorithms,ONEWAY algorithms
establishment of homogeneous subsets,establishment of homogeneous subsets,establishment of homogeneous subsets

If the sample sizes in all groups are equal, or the harmonic mean for all groups has been selected, or the multiple comparison procedure is SNK or DUNCAN, homogeneous subsets are established as follows:

The means are sorted into ascending order from T(1) to T(k´). Values of i and q such that

|T(q)−T(i)|≤Rq−i+1Mq,i(*)

are systematically searched for and

{T(i), ..., T(q)}

is considered a homogeneous subset. The search procedure is as follows:

At each step t, the value of i is incremented by 1 (the starting value is 1), and q=k´. The value of q is then decremented by one until (*) is true. Call this value qt. If qt>qt−1 and (*) is true,

{T(i), ..., Tqt}

is considered homogeneous. Otherwise i is incremented and the next step is done. The procedure terminates when i=k or qt=k.

In all other situations, all nonredundant pairs of groups are compared using the criteria of (*). A table containing all pairs of groups is printed with symbols indicating group means that are significantly different.

Related Topics

ONEWAY Algorithms
Notation (ONEWAY algorithms)
Group Statistics (ONEWAY algorithms)
The ANOVA Table (ONEWAY algorithms)
Basic Statistics (ONEWAY algorithms)
Variance Estimates and Confidence Interval for Mean (ONEWAY algorithms)
Levene Test for Homogeneity of Variances (ONEWAY algorithms)
User-Supplied Contrasts (ONEWAY algorithms)
Polynomial Contrasts (Speed 1976) (ONEWAY algorithms)
UNWEIGHTED Contrasts and Statistics (ONEWAY algorithms)
WEIGHTED Contrasts and Statistics (Emerson 1968; Robson 1959) (ONEWAY algorithms)
Multiple Comparisons (Winer 1971) (ONEWAY algorithms)
Welch Test (ONEWAY algorithms)
Brown-Forsythe Test (ONEWAY algorithms)
References (ONEWAY algorithms)


Welch Test (ONEWAY algorithms)

ONEWAY algorithms,ONEWAY algorithms,ONEWAY algorithms
Welch test,Welch test,Welch test

In Welch (1947,1951), he derived the an approximate test for equality of means without the homogeneous variance assumption. The statistic is given by

FWelch=kΣl=1ωl[(Tl−
˜
X
)2/(k−1)]1+2(k−2)(k2−1)kΣl=1[(1−ωlu)2/(Wl−1)]

where ωl=Wl/S2l, u=kΣl=1ωl, and
˜
X
=kΣl=1ωlTl/u.

The Welch statistic has an approximate F distribution with k-1 and f degrees of freedom, where

f=[3k2−1kΣl=1(1−ωlu)2/(Wl−1)]−1

Since the weight used in Welch statistic is ωl=Wl/S2l, one cannot compute the statistic if any one group has zero standard deviation. Moreover, sample sizes of all groups have to be greater than or equal to zero.

Related Topics

ONEWAY Algorithms
Notation (ONEWAY algorithms)
Group Statistics (ONEWAY algorithms)
The ANOVA Table (ONEWAY algorithms)
Basic Statistics (ONEWAY algorithms)
Variance Estimates and Confidence Interval for Mean (ONEWAY algorithms)
Levene Test for Homogeneity of Variances (ONEWAY algorithms)
User-Supplied Contrasts (ONEWAY algorithms)
Polynomial Contrasts (Speed 1976) (ONEWAY algorithms)
UNWEIGHTED Contrasts and Statistics (ONEWAY algorithms)
WEIGHTED Contrasts and Statistics (Emerson 1968; Robson 1959) (ONEWAY algorithms)
Multiple Comparisons (Winer 1971) (ONEWAY algorithms)
Establishment of Homogeneous Subsets (ONEWAY algorithms)
Brown-Forsythe Test (ONEWAY algorithms)
References (ONEWAY algorithms)


Brown-Forsythe Test (ONEWAY algorithms)

ONEWAY algorithms,ONEWAY algorithms,ONEWAY algorithms
Brown-Forsythe test,Brown-Forsythe test,Brown-Forsythe test

In (Brown and Forsythe, 1974a) and (Brown and Forsythe, 1974b), a test statistic for equal means was proposed. The statistic has the following form,

FBF=kΣl=1Wl(Tl−G)2kΣl=1(1−Wl/W)S2l

The statistic has an approximate F distribution with (k-1) and f degrees of freedom, where

1f=kΣl=1c2l/(Wl−1)

and

cl=(1−Wl/W)S2lkΣl=1(1−Wl/W)S2l

When we look at the denominator of FBF, we can see that it tries to estimate the ‘pooled variance’ by

S2pool=kΣl=1ω*lS2l

where

ω*l=(W−Wl)W(k−1)

The Brown & Forsythe statistic cannot be computed if all groups have zero standard deviation or any group has sample size less than or equal to 1. In the situation that some groups have zero standard deviations, the statistic can be computed but the approximation may not work.

Related Topics

ONEWAY Algorithms
Notation (ONEWAY algorithms)
Group Statistics (ONEWAY algorithms)
The ANOVA Table (ONEWAY algorithms)
Basic Statistics (ONEWAY algorithms)
Variance Estimates and Confidence Interval for Mean (ONEWAY algorithms)
Levene Test for Homogeneity of Variances (ONEWAY algorithms)
User-Supplied Contrasts (ONEWAY algorithms)
Polynomial Contrasts (Speed 1976) (ONEWAY algorithms)
UNWEIGHTED Contrasts and Statistics (ONEWAY algorithms)
WEIGHTED Contrasts and Statistics (Emerson 1968; Robson 1959) (ONEWAY algorithms)
Multiple Comparisons (Winer 1971) (ONEWAY algorithms)
Establishment of Homogeneous Subsets (ONEWAY algorithms)
Welch Test (ONEWAY algorithms)
References (ONEWAY algorithms)


References (ONEWAY algorithms)

ONEWAY algorithms,ONEWAY algorithms,ONEWAY algorithms
references,references,references

Brown, M. B., and A. B. Forsythe. 1974a. The small sample behavior of some statistics which test the equality of several means. Technometrics, 16, 129-132.

Brown, M. B., and A. B. Forsythe. 1974b. Robust tests for the equality of variances. Journal of the American Statistical Association, 69:, 364-367.

Brownlee, K. A. 1965. Statistical theory and methodology in science and engineering. New York: John Wiley & Sons, Inc.

Duncan, D. B. 1955. Multiple Range and Multiple F tests. Biometrics, 11, 1-42.

Eisenhart, C., M. W. Hastay, and N. A. Wallis, eds. 1947. Significance of the largest of a set of sample estimates of variance. In: Techniques of Statistical Analysis. New York: McGraw-Hill.

Emerson, P. L. 1968. Numerical construction of orthogonal polynomials from a general recurrence formula. Biometrics, 24, 695-701.

Gebhardt, F. 1966. Approximation to the Critical Values for Duncan's Multiple Range Test. Biometrics, 22, 179-182.

James, G. S. 1951. The comparison of several groups of observations when the ratios of the population variances are unknown. Biometrika, 38, 324-329.

Kramer, C. Y. 1956. Extension of multiple range tests to group means with unequal numbers of replications. Biometrics, 12, 307-310.

Miller, R. G. J. 1966. Simultaneous statistical inference. New York: McGraw-Hill.

Robson, D. S. 1959. A simple method for construction of orthogonal polynomials when the independent variable is unequally spaced. Biometrics, 15, 187-191.

Satterthwaite, F. E. 1946. An approximate distribution of estimates of variance components. Biometrics Bulletin, 2, 110-114.

Snedecor, G. W., and W. G. Cochran. 1967. Statistical methods. Ames, Iowa: Iowa State University Press.

Speed, M. F. 1976. Response curves in the one way classification with unequal numbers of observations per cell. In: Proceedings of the Statistical Computing Section. Alexandria, VA: American Statistical Association.

Welch, B. L. 1947. The generalization of Student's problem when several different population variances are involved. Biometrika, 34, 28-35.

Welch, B. L. 1951. On the Comparison of Several Mean Values: An Alternative Approach. Biometrika, 38:, 330-336.

Winer, B. J. 1971. Statistical principles in experimental design, 2nd ed. New York: McGraw-Hill.

Young, E. A., and E. W. Cramer. 1971. Some results relevant to choice of sum and sum-of-product algorithms. Technometrics, 13, 657-665.

Related Topics

ONEWAY Algorithms
Notation (ONEWAY algorithms)
Group Statistics (ONEWAY algorithms)
The ANOVA Table (ONEWAY algorithms)
Basic Statistics (ONEWAY algorithms)
Variance Estimates and Confidence Interval for Mean (ONEWAY algorithms)
Levene Test for Homogeneity of Variances (ONEWAY algorithms)
User-Supplied Contrasts (ONEWAY algorithms)
Polynomial Contrasts (Speed 1976) (ONEWAY algorithms)
UNWEIGHTED Contrasts and Statistics (ONEWAY algorithms)
WEIGHTED Contrasts and Statistics (Emerson 1968; Robson 1959) (ONEWAY algorithms)
Multiple Comparisons (Winer 1971) (ONEWAY algorithms)
Establishment of Homogeneous Subsets (ONEWAY algorithms)
Welch Test (ONEWAY algorithms)
Brown-Forsythe Test (ONEWAY algorithms)


OPTIMAL BINNING Algorithms

OPTIMAL BINNING (command),OPTIMAL BINNING (command),OPTIMAL BINNING (command)
algorithms,algorithms,algorithms
Optimal Binning,Optimal Binning,Optimal Binning
algorithms,algorithms,algorithms
optimal binning algorithms,optimal binning algorithms,optimal binning algorithms

The Optimal Binning procedure performs MDLP (minimal description length principle) discretization of scale variables. This method divides a scale variable into a small number of intervals, or bins, where each bin is mapped to a separate category of the discretized variable.

MDLP is a univariate, supervised discretization method. Without loss of generality, the algorithm described in this document only considers one continuous attribute in relation to a categorical guide variable — the discretization is "optimal" with respect to the categorical guide. Therefore, the input data matrix S contains two columns, the scale variable A and categorical guide C.

Related Topics

Notation (optimal binning algorithms)
Simple MDLP (optimal binning algorithms)
Class Entropy (optimal binning algorithms)
Class Information Entropy (optimal binning algorithms)
Information Gain (optimal binning algorithms)
MDLP Acceptance Criterion (optimal binning algorithms)
Algorithm: BinaryDiscretization (optimal binning algorithms)
Algorithm: MDLPCut (optimal binning algorithms)
Algorithm: SimpleMDLP (optimal binning algorithms)
Hybrid MDLP (optimal binning algorithms)
Algorithm: EqualFrequency (optimal binning algorithms)
Algorithm: HybridMDLP (optimal binning algorithms)
Merging Sparsely Populated Bins (optimal binning algorithms)
Example (optimal binning algorithms)
References (optimal binning algorithms)


Notation (optimal binning algorithms)

optimal binning algorithms,optimal binning algorithms,optimal binning algorithms
notation,notation,notation

The following notation is used throughout this chapter unless otherwise stated:

S | The input data matrix, containing a column of the scale variable A and a column of the categorical guide C. Each row is a separate observation, or instance.
A | A scale variable, also called a continuous attribute.
S(i) | The value of A for the ith instance in S.
N | The number of instances in S.
D | A set of all distinct values in S.
Si | A subset of S.
C | The categorical guide, or class attribute; it is assumed to have k categories, or classes.
T | A cut point that defines the boundary between two bins.
TA | A set of cut points.
Ent(S) | The class entropy of S.
E(A, T, S) | The class entropy of partition induced by T on A.
Gain(A, T, S) | The information gain of the cut point T on A.
n | A parameter denoting the number of cut points for the equal frequency method.
W | A weight attribute denoting the frequency of each instance. If the weight values are not integer, they are rounded to the nearest whole numbers before use. For example, 0.5 is rounded to 1, and 2.4 is rounded to 2. Instances with missing weights or weights less than 0.5 are not used.

Related Topics

OPTIMAL BINNING Algorithms
Simple MDLP (optimal binning algorithms)
Class Entropy (optimal binning algorithms)
Class Information Entropy (optimal binning algorithms)
Information Gain (optimal binning algorithms)
MDLP Acceptance Criterion (optimal binning algorithms)
Algorithm: BinaryDiscretization (optimal binning algorithms)
Algorithm: MDLPCut (optimal binning algorithms)
Algorithm: SimpleMDLP (optimal binning algorithms)
Hybrid MDLP (optimal binning algorithms)
Algorithm: EqualFrequency (optimal binning algorithms)
Algorithm: HybridMDLP (optimal binning algorithms)
Merging Sparsely Populated Bins (optimal binning algorithms)
Example (optimal binning algorithms)
References (optimal binning algorithms)


Simple MDLP (optimal binning algorithms)

optimal binning algorithms,optimal binning algorithms,optimal binning algorithms
MDLP,MDLP,MDLP
MDLP,MDLP,MDLP
optimal binning algorithms,optimal binning algorithms,optimal binning algorithms

This section describes the supervised binning method (MDLP) discussed in Fayyad and Irani (1993).

Related Topics

OPTIMAL BINNING Algorithms
Notation (optimal binning algorithms)
Class Entropy (optimal binning algorithms)
Class Information Entropy (optimal binning algorithms)
Information Gain (optimal binning algorithms)
MDLP Acceptance Criterion (optimal binning algorithms)
Algorithm: BinaryDiscretization (optimal binning algorithms)
Algorithm: MDLPCut (optimal binning algorithms)
Algorithm: SimpleMDLP (optimal binning algorithms)
Hybrid MDLP (optimal binning algorithms)
Algorithm: EqualFrequency (optimal binning algorithms)
Algorithm: HybridMDLP (optimal binning algorithms)
Merging Sparsely Populated Bins (optimal binning algorithms)
Example (optimal binning algorithms)
References (optimal binning algorithms)


Class Entropy (optimal binning algorithms)

optimal binning algorithms,optimal binning algorithms,optimal binning algorithms
class entropy,class entropy,class entropy
class entropy,class entropy,class entropy
optimal binning algorithms,optimal binning algorithms,optimal binning algorithms

Let there be k classes C1, ..., Ck and let P(Ci, S) be the proportion of instances in S that have class Ci. The class entropy Ent(S) is defined as

Ent(S)=−kΣi=1P(Ci,S)log2(P(Ci,S))

Related Topics

OPTIMAL BINNING Algorithms
Notation (optimal binning algorithms)
Simple MDLP (optimal binning algorithms)
Class Information Entropy (optimal binning algorithms)
Information Gain (optimal binning algorithms)
MDLP Acceptance Criterion (optimal binning algorithms)
Algorithm: BinaryDiscretization (optimal binning algorithms)
Algorithm: MDLPCut (optimal binning algorithms)
Algorithm: SimpleMDLP (optimal binning algorithms)
Hybrid MDLP (optimal binning algorithms)
Algorithm: EqualFrequency (optimal binning algorithms)
Algorithm: HybridMDLP (optimal binning algorithms)
Merging Sparsely Populated Bins (optimal binning algorithms)
Example (optimal binning algorithms)
References (optimal binning algorithms)


Class Information Entropy (optimal binning algorithms)

optimal binning algorithms,optimal binning algorithms,optimal binning algorithms
class information entropy,class information entropy,class information entropy
class information entropy,class information entropy,class information entropy
optimal binning algorithms,optimal binning algorithms,optimal binning algorithms

For an instance set S, a continuous attribute A, and a cut point T, let S1 ⊂ S be the subset of instances in S with the values of A ≤ T, and S2 = S−S1. The class information entropy of the partition induced by T, E(A, T; S), is defined as

E(A,T;S)=|S1||S|Ent(S1)+|S2||S|Ent(S2)

Related Topics

OPTIMAL BINNING Algorithms
Notation (optimal binning algorithms)
Simple MDLP (optimal binning algorithms)
Class Entropy (optimal binning algorithms)
Information Gain (optimal binning algorithms)
MDLP Acceptance Criterion (optimal binning algorithms)
Algorithm: BinaryDiscretization (optimal binning algorithms)
Algorithm: MDLPCut (optimal binning algorithms)
Algorithm: SimpleMDLP (optimal binning algorithms)
Hybrid MDLP (optimal binning algorithms)
Algorithm: EqualFrequency (optimal binning algorithms)
Algorithm: HybridMDLP (optimal binning algorithms)
Merging Sparsely Populated Bins (optimal binning algorithms)
Example (optimal binning algorithms)
References (optimal binning algorithms)


Information Gain (optimal binning algorithms)

optimal binning algorithms,optimal binning algorithms,optimal binning algorithms
information gain,information gain,information gain
information gain,information gain,information gain
optimal binning algorithms,optimal binning algorithms,optimal binning algorithms

Given a set of instances S, a continuous attribute A, and a cut point T on A, the information gain of a cut point T is

Gain(A,T;S)=Ent(S)−E(A,T;S)

Related Topics

OPTIMAL BINNING Algorithms
Notation (optimal binning algorithms)
Simple MDLP (optimal binning algorithms)
Class Entropy (optimal binning algorithms)
Class Information Entropy (optimal binning algorithms)
MDLP Acceptance Criterion (optimal binning algorithms)
Algorithm: BinaryDiscretization (optimal binning algorithms)
Algorithm: MDLPCut (optimal binning algorithms)
Algorithm: SimpleMDLP (optimal binning algorithms)
Hybrid MDLP (optimal binning algorithms)
Algorithm: EqualFrequency (optimal binning algorithms)
Algorithm: HybridMDLP (optimal binning algorithms)
Merging Sparsely Populated Bins (optimal binning algorithms)
Example (optimal binning algorithms)
References (optimal binning algorithms)


MDLP Acceptance Criterion (optimal binning algorithms)

The partition induced by a cut point T for a set S of N instances is accepted if and only if

Gain(A,T;S)>log2(N−1)N+Δ(A,T;S)N

and it is rejected otherwise.

Here Δ(A,T;S)=log2(3k−2)−[k·Ent(S)−k1Ent(S1)−k2Ent(S2)] in which ki is the number of classes in the subset Si of S.

Note: While the MDLP acceptance criterion uses the association between A and C to determine cut points, it also tries to keep the creation of bins to a small number. Thus there are situations in which a high association between A and C will result in no cut points. For example, consider the following data:

D | Class
 | 2 | 3
1 | 1 | 0
2 | 0 | 6

Then the potential cut point is T = 1. In this case:

Gain(A,T;S)=0.5916728
log2(N−1)N+Δ(A,T;S)N=0.6530774

Since 0.5916728 < 0.6530774, T is not accepted as a cut point, even though there is a clear relationship between A and C.

Related Topics

OPTIMAL BINNING Algorithms
Notation (optimal binning algorithms)
Simple MDLP (optimal binning algorithms)
Class Entropy (optimal binning algorithms)
Class Information Entropy (optimal binning algorithms)
Information Gain (optimal binning algorithms)
Algorithm: BinaryDiscretization (optimal binning algorithms)
Algorithm: MDLPCut (optimal binning algorithms)
Algorithm: SimpleMDLP (optimal binning algorithms)
Hybrid MDLP (optimal binning algorithms)
Algorithm: EqualFrequency (optimal binning algorithms)
Algorithm: HybridMDLP (optimal binning algorithms)
Merging Sparsely Populated Bins (optimal binning algorithms)
Example (optimal binning algorithms)
References (optimal binning algorithms)


Algorithm: BinaryDiscretization (optimal binning algorithms)

1. Calculate E(A, di; S) for each distinct value di ∈ D for which di and di+1 do not belong to the same class. A distinct value belongs to a class if all instances of this value have the same class.

2. Select a cut point T for which E(A, T; S) is minimum among all the candidate cut points, that is,

T=arg
min
di
E(A,di;S)

Related Topics

OPTIMAL BINNING Algorithms
Notation (optimal binning algorithms)
Simple MDLP (optimal binning algorithms)
Class Entropy (optimal binning algorithms)
Class Information Entropy (optimal binning algorithms)
Information Gain (optimal binning algorithms)
MDLP Acceptance Criterion (optimal binning algorithms)
Algorithm: MDLPCut (optimal binning algorithms)
Algorithm: SimpleMDLP (optimal binning algorithms)
Hybrid MDLP (optimal binning algorithms)
Algorithm: EqualFrequency (optimal binning algorithms)
Algorithm: HybridMDLP (optimal binning algorithms)
Merging Sparsely Populated Bins (optimal binning algorithms)
Example (optimal binning algorithms)
References (optimal binning algorithms)


Algorithm: MDLPCut (optimal binning algorithms)

1. BinaryDiscretization(A, T; D, S).

2. Calculate Gain(A, T; S).

3. If Gain(A,T;S)>log2(N−1)N+Δ(A,T;S)N then

a) TA=TA∪T.

b) Split D into D1 and D2, and S into S1 and S2.

c) MDLPCut(A, TA; D1, S1).

d) MDLPCut(A, TA; D2, S2). where S1 ⊂ S be the subset of instances in S with A-values ≤ T, and S2 = S−S1. D1 and D2 are the sets of all distinct values in S1 and S2, respectively.

Also presented is the iterative version of MDLPCut(A, TA; D, S). The iterative implementation requires a stack to store the D and S remaining to be cut.

First push D and S into stack. Then, while ( stack≠∅ ) do

1. Obtain D and S by popping stack.

2. BinaryDiscretization(A, T; D, S).

3. Calculate Gain(A, T; S).

4. If Gain(A,T;S)>log2(N−1)N+Δ(A,T;S)N then

i) TA=TA∪T.

ii) Split D into D1 and D2, and S into S1 and S2.

iii) Push D1 and S1 into stack.

iv) Push D2 and S2 into stack.

Note: In practice, all operations within the algorithm are based on a global matrix M. Its element, mij, denotes the total number of instances that have value di ∈ D and belong to the jth class in S. In addition, D is sorted in ascending order. Therefore, we do not need to push D and S into stack, but only two integer numbers, which denote the bounds of D, into stack.

Related Topics

OPTIMAL BINNING Algorithms
Notation (optimal binning algorithms)
Simple MDLP (optimal binning algorithms)
Class Entropy (optimal binning algorithms)
Class Information Entropy (optimal binning algorithms)
Information Gain (optimal binning algorithms)
MDLP Acceptance Criterion (optimal binning algorithms)
Algorithm: BinaryDiscretization (optimal binning algorithms)
Algorithm: SimpleMDLP (optimal binning algorithms)
Hybrid MDLP (optimal binning algorithms)
Algorithm: EqualFrequency (optimal binning algorithms)
Algorithm: HybridMDLP (optimal binning algorithms)
Merging Sparsely Populated Bins (optimal binning algorithms)
Example (optimal binning algorithms)
References (optimal binning algorithms)


Algorithm: SimpleMDLP (optimal binning algorithms)

1. Sort the set S with N instances by the value A in ascending order.

2. Find a set of all distinct values, D, in S.

3. TA = ∅.

4. MDLPCut(A, TA; D, S)

5. Sort the set TA in ascending order, and output TA.

Related Topics

OPTIMAL BINNING Algorithms
Notation (optimal binning algorithms)
Simple MDLP (optimal binning algorithms)
Class Entropy (optimal binning algorithms)
Class Information Entropy (optimal binning algorithms)
Information Gain (optimal binning algorithms)
MDLP Acceptance Criterion (optimal binning algorithms)
Algorithm: BinaryDiscretization (optimal binning algorithms)
Algorithm: MDLPCut (optimal binning algorithms)
Hybrid MDLP (optimal binning algorithms)
Algorithm: EqualFrequency (optimal binning algorithms)
Algorithm: HybridMDLP (optimal binning algorithms)
Merging Sparsely Populated Bins (optimal binning algorithms)
Example (optimal binning algorithms)
References (optimal binning algorithms)


Hybrid MDLP (optimal binning algorithms)

optimal binning algorithms,optimal binning algorithms,optimal binning algorithms
hybrid MDLP,hybrid MDLP,hybrid MDLP

When the set D of distinct values in S is large, the computational cost to calculate E(A, di; S) for each di ∈ D is large. In order to reduce the computational cost, the unsupervised equal frequency binning method is used to reduce the size of D and obtain a subset Def ∈ D. Then the MDLPCut(A, TA; Ds, S) algorithm is applied to obtain the final cut point set TA.

Related Topics

OPTIMAL BINNING Algorithms
Notation (optimal binning algorithms)
Simple MDLP (optimal binning algorithms)
Class Entropy (optimal binning algorithms)
Class Information Entropy (optimal binning algorithms)
Information Gain (optimal binning algorithms)
MDLP Acceptance Criterion (optimal binning algorithms)
Algorithm: BinaryDiscretization (optimal binning algorithms)
Algorithm: MDLPCut (optimal binning algorithms)
Algorithm: SimpleMDLP (optimal binning algorithms)
Algorithm: EqualFrequency (optimal binning algorithms)
Algorithm: HybridMDLP (optimal binning algorithms)
Merging Sparsely Populated Bins (optimal binning algorithms)
Example (optimal binning algorithms)
References (optimal binning algorithms)


Algorithm: EqualFrequency (optimal binning algorithms)

It divides a continuous attribute A into n bins where each bin contains N/n instances. n is a user-specified parameter, where 1 < n < N.

1. Sort the set S with N instances by the value A in ascending order.

2. Def = ∅.

3. j=1.

4. Use the aempirical percentile method to generate the dp,i which denote the (i·Nn×100)th percentiles.

5. Def=Def∪dp,i; i=i+1

6. If i≤n, then go to step 4.

7. Delete the duplicate values in the set Def.

Note: If, for example, there are many occurrences of a single value of A, the equal frequency criterion may not be met. In this case, no cut points are produced.

Related Topics

OPTIMAL BINNING Algorithms
Notation (optimal binning algorithms)
Simple MDLP (optimal binning algorithms)
Class Entropy (optimal binning algorithms)
Class Information Entropy (optimal binning algorithms)
Information Gain (optimal binning algorithms)
MDLP Acceptance Criterion (optimal binning algorithms)
Algorithm: BinaryDiscretization (optimal binning algorithms)
Algorithm: MDLPCut (optimal binning algorithms)
Algorithm: SimpleMDLP (optimal binning algorithms)
Hybrid MDLP (optimal binning algorithms)
Algorithm: HybridMDLP (optimal binning algorithms)
Merging Sparsely Populated Bins (optimal binning algorithms)
Example (optimal binning algorithms)
References (optimal binning algorithms)


Algorithm: HybridMDLP (optimal binning algorithms)

1. D = ∅;

2. EqualFrequency(A, n, D; S).

3. TA = ∅.

4. MDLPCut(A, TA; D, S).

5. Output TA.

Related Topics

OPTIMAL BINNING Algorithms
Notation (optimal binning algorithms)
Simple MDLP (optimal binning algorithms)
Class Entropy (optimal binning algorithms)
Class Information Entropy (optimal binning algorithms)
Information Gain (optimal binning algorithms)
MDLP Acceptance Criterion (optimal binning algorithms)
Algorithm: BinaryDiscretization (optimal binning algorithms)
Algorithm: MDLPCut (optimal binning algorithms)
Algorithm: SimpleMDLP (optimal binning algorithms)
Hybrid MDLP (optimal binning algorithms)
Algorithm: EqualFrequency (optimal binning algorithms)
Merging Sparsely Populated Bins (optimal binning algorithms)
Example (optimal binning algorithms)
References (optimal binning algorithms)


Model Entropy

The model entropy is a measure of the predictive accuracy of an attribute A binned on the class variable C. Given a set of instances S, suppose that A is discretized into I bins given C, where the ith bin has the value Ai. Letting Si ⊂ S be the subset of instances in S with the value Ai, the model entropy is defined as:

Em=IΣi=1P(Ai)(−JΣj=1P(Cj|Ai)log2P(Cj|Ai))

where P(Ai)=|Si||S| and P(Cj|Ai)=P(Cj,Ai)P(Ai)=P(Cj,Si).


Merging Sparsely Populated Bins (optimal binning algorithms)

optimal binning algorithms,optimal binning algorithms,optimal binning algorithms
merging bins,merging bins,merging bins

Occasionally, the procedure may produce bins with very few cases. The following strategy deletes these pseudo cut points:

For a given variable, suppose that the algorithm found nfinal cut points, and thus nfinal+1 bins. For bins i = 2, ..., nfinal (the second lowest-valued bin through the second highest-valued bin), compute

sizeof(bi)min(sizeof(bi−1),sizeof(bi+1))

where sizeof(bin) is the number of cases in the bin.

When this value is less than a user-specified merging threshold, bi is considered sparsely populated and is merged with bi−1 or bi+1, whichever has the lower class information entropy. See the topic Class Information Entropy (optimal binning algorithms) for more information.

The procedure makes a single pass through the bins.

Related Topics

OPTIMAL BINNING Algorithms
Notation (optimal binning algorithms)
Simple MDLP (optimal binning algorithms)
Class Entropy (optimal binning algorithms)
Class Information Entropy (optimal binning algorithms)
Information Gain (optimal binning algorithms)
MDLP Acceptance Criterion (optimal binning algorithms)
Algorithm: BinaryDiscretization (optimal binning algorithms)
Algorithm: MDLPCut (optimal binning algorithms)
Algorithm: SimpleMDLP (optimal binning algorithms)
Hybrid MDLP (optimal binning algorithms)
Algorithm: EqualFrequency (optimal binning algorithms)
Algorithm: HybridMDLP (optimal binning algorithms)
Example (optimal binning algorithms)
References (optimal binning algorithms)


Example (optimal binning algorithms)

The following example shows the process of simple MDLP using an artificial data set S with 250 instances. S is not shown here, but can be reconstructed (sorted in ascending order of values of A) from the matrix M below.

First, sort S by the value of A in ascending order. Then find a set, D, of all distinct values in S.

|D| = 46.

D = {-2.6, -2.4, -2.1, -2, -1.9, -1.8, -1.7, -1.6, -1.5, -1.4, -1.3, -1.2, -1.1, -1, -0.9, -0.8, -0.7, -0.6, -0.5, -0.4, -0.3, -0.2, -0.1, 0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 2, 2.1, 2.3}

Compute the frequencies of instances with respect to each class for each distinct value di ∈ D and construct a matrix M. Its element, mij, denotes the total number of instances that have value di and belong to the jth class.

2-Dimensional matrix M
D | Class |  |  |  | D | Class
 | 0 | 1 | 2 | 3 |  | 0 | 1 | 2 | 3
-2.6 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 14
-2.4 | 0 | 1 | 0 | 0 | 0.1 | 0 | 0 | 0 | 6
-2.1 | 0 | 2 | 0 | 0 | 0.2 | 0 | 0 | 0 | 10
-2 | 0 | 0 | 2 | 0 | 0.3 | 0 | 0 | 0 | 14
-1.9 | 0 | 0 | 2 | 0 | 0.4 | 0 | 0 | 0 | 12
-1.8 | 0 | 0 | 3 | 0 | 0.5 | 0 | 0 | 0 | 4
-1.7 | 0 | 0 | 2 | 0 | 0.6 | 0 | 0 | 0 | 9
-1.6 | 0 | 0 | 3 | 0 | 0.7 | 0 | 0 | 0 | 5
-1.5 | 0 | 0 | 3 | 0 | 0.8 | 0 | 0 | 0 | 3
-1.4 | 0 | 0 | 2 | 0 | 0.9 | 0 | 0 | 0 | 10
-1.3 | 0 | 0 | 4 | 0 | 1 | 3 | 0 | 0 | 0
-1.2 | 0 | 0 | 3 | 0 | 1.1 | 8 | 0 | 0 | 0
-1.1 | 0 | 0 | 3 | 0 | 1.2 | 5 | 0 | 0 | 0
-1 | 0 | 0 | 8 | 0 | 1.3 | 7 | 0 | 0 | 0
-0.9 | 0 | 0 | 6 | 0 | 1.4 | 2 | 0 | 0 | 0
-0.8 | 0 | 0 | 7 | 0 | 1.5 | 2 | 0 | 0 | 0
-0.7 | 0 | 0 | 13 | 0 | 1.6 | 3 | 0 | 0 | 0
-0.6 | 0 | 0 | 8 | 0 | 1.7 | 3 | 0 | 0 | 0
-0.5 | 0 | 0 | 4 | 0 | 1.8 | 4 | 0 | 0 | 0
-0.4 | 0 | 0 | 6 | 0 | 1.9 | 4 | 0 | 0 | 0
-0.3 | 0 | 0 | 7 | 0 | 2 | 2 | 0 | 0 | 0
-0.2 | 0 | 0 | 13 | 0 | 2.1 | 2 | 0 | 0 | 0
-0.1 | 0 | 0 | 14 | 0 | 2.3 | 1 | 0 | 0 | 0

MDLPCut(A, TA; D, S)

Calculate E(A, di; S) for each di ∈ D for which di and di+1 do not belong to the same class.

di | -2.1 | -0.1 | 0.9
E(A, di; D, S) | 1.4742 | 0.5955 | 0.9038
TA = {-0.1}

D1 = {-2.6, -2.4, -2.1, -2, -1.9, -1.8, -1.7, -1.6, -1.5, -1.4, -1.3, -1.2, -1.1, -1, -0.9, -0.8, -0.7, -0.6, -0.5, -0.4, -0.3, -0.2, -0.1}

S1 = {all instances with A-values ≤ -0.1}

D2 = { 0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 2, 2.1, 2.3}

S2 = {all instances with A-values > -0.1}

Calculate E(A, di; S1) for each di ∈ D1 for which di and di+1 do not belong to the same class.

di | -2.1
E(A, di; D1, S1) | 0.0
TA = {-0.1, -2.1}

D1,1 = {-2.6, -2.4, -2.1}

S1,1 = {all instances with A-values between -2.6 and -2.1}

D1,2 = { -2, -1.9, -1.8, -1.7, -1.6, -1.5, -1.4, -1.3, -1.2, -1.1, -1, -0.9, -0.8, -0.7, -0.6, -0.5, -0.4, -0.3, -0.2, -0.1}

S1,2 = {all instances with A-values between -2 and -0.1}

All instances in S1,1 belong to the same class, thus S1,1 can’t be split further.

All instances in S1,2 belong to the same class, thus S1,2 can’t be split further.

Calculate E(A, di; S2) for each di ∈ D2 for which di and di+1 do not belong to the same class.

di | 0.9
E(A, di; D2, S2) | 0.0
TA = {-0.1, -2.1, 0.9}

D2,1 = {0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9}

S2,1 = {all instances with A-values between 0 and 0.9}

D2,2 = {1, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 2, 2.1, 2.3}

S2,2 = {all instances with A-values between 1 and 2.3}

All instances in S2,1 belong to the same class, thus S2,1 can’t be split further.

All instances in S2,2 belong to the same class, thus S2,2 can’t be split further.

Related Topics

OPTIMAL BINNING Algorithms
Notation (optimal binning algorithms)
Simple MDLP (optimal binning algorithms)
Class Entropy (optimal binning algorithms)
Class Information Entropy (optimal binning algorithms)
Information Gain (optimal binning algorithms)
MDLP Acceptance Criterion (optimal binning algorithms)
Algorithm: BinaryDiscretization (optimal binning algorithms)
Algorithm: MDLPCut (optimal binning algorithms)
Algorithm: SimpleMDLP (optimal binning algorithms)
Hybrid MDLP (optimal binning algorithms)
Algorithm: EqualFrequency (optimal binning algorithms)
Algorithm: HybridMDLP (optimal binning algorithms)
Merging Sparsely Populated Bins (optimal binning algorithms)
References (optimal binning algorithms)


References (optimal binning algorithms)

optimal binning algorithms,optimal binning algorithms,optimal binning algorithms
references,references,references

Fayyad, U., and K. Irani. 1993. Multi-interval discretization of continuous-value attributes for classification learning. In: Proceedings of the Thirteenth International Joint Conference on Artificial Intelligence. San Mateo, CA: Morgan Kaufmann.

Dougherty, J., R. Kohavi, and M. Sahami. 1995. Supervised and unsupervised discretization of continuous features. In: Proceedings of the Twelfth International Conference on Machine Learning. Los Altos, CA: Morgan Kaufmann.

Liu, H., F. Hussain, C. L. Tan, and M. Dash. 2002. Discretization: An Enabling Technique. Data Mining and Knowledge Discovery, 6, 393-423.

Related Topics

OPTIMAL BINNING Algorithms
Notation (optimal binning algorithms)
Simple MDLP (optimal binning algorithms)
Class Entropy (optimal binning algorithms)
Class Information Entropy (optimal binning algorithms)
Information Gain (optimal binning algorithms)
MDLP Acceptance Criterion (optimal binning algorithms)
Algorithm: BinaryDiscretization (optimal binning algorithms)
Algorithm: MDLPCut (optimal binning algorithms)
Algorithm: SimpleMDLP (optimal binning algorithms)
Hybrid MDLP (optimal binning algorithms)
Algorithm: EqualFrequency (optimal binning algorithms)
Algorithm: HybridMDLP (optimal binning algorithms)
Merging Sparsely Populated Bins (optimal binning algorithms)
Example (optimal binning algorithms)


ORTHOPLAN Algorithms

ORTHOPLAN (command),ORTHOPLAN (command),ORTHOPLAN (command)
algorithms,algorithms,algorithms
Generate Orthogonal Design,Generate Orthogonal Design,Generate Orthogonal Design
algorithms,algorithms,algorithms
orthogonal designs algorithms,orthogonal designs algorithms,orthogonal designs algorithms

This procedure generates an orthogonal main-effects design. It will find the smallest orthogonal plan to fit the factors having at least as many combinations as requested.

Related Topics

Selecting the Plan (orthogonal designs algorithms)
Adapting the Prepared Plans (orthogonal designs algorithms)
Library of Prepared Plans (orthogonal designs algorithms)
Plackett-Burman Plans (orthogonal designs algorithms)
Addelman Plans (orthogonal designs algorithms)
Decision Rules (orthogonal designs algorithms)
Randomization (orthogonal designs algorithms)
References (orthogonal designs algorithms)


Selecting the Plan (orthogonal designs algorithms)

orthogonal designs algorithms,orthogonal designs algorithms,orthogonal designs algorithms
selecting a plan,selecting a plan,selecting a plan

From a library of prepared plans, select the shortest plan that can be adapted to the design and that satisfies the minimum size requirement provided by the user. If no plan exists that satisfies the minimum size requirement, pick the largest plan that can be adapted.

Related Topics

ORTHOPLAN Algorithms
Adapting the Prepared Plans (orthogonal designs algorithms)
Library of Prepared Plans (orthogonal designs algorithms)
Plackett-Burman Plans (orthogonal designs algorithms)
Addelman Plans (orthogonal designs algorithms)
Decision Rules (orthogonal designs algorithms)
Randomization (orthogonal designs algorithms)
References (orthogonal designs algorithms)


Adapting the Prepared Plans (orthogonal designs algorithms)

orthogonal designs algorithms,orthogonal designs algorithms,orthogonal designs algorithms
adapting plans,adapting plans,adapting plans

Generating Multiple Factors from One Column

A four-level factor can be transformed into three two-level factors using the rule in the following table.

Converting a four-level factor to three two-level factors
Original Code | A | B | C
0 | 0 | 0 | 0
1 | 0 | 1 | 1
2 | 1 | 0 | 1
3 | 1 | 1 | 0

An eight-level factor can be transformed into seven two-level factors using the rule in the following table.

Converting an eight-level factor to seven two-level factors
Original Code | A | B | C | D | E | F | G
0 | 0 | 0 | 0 | 0 | 0 | 0 | 0
1 | 1 | 0 | 0 | 1 | 1 | 0 | 1
2 | 0 | 1 | 0 | 1 | 0 | 1 | 1
3 | 1 | 1 | 0 | 0 | 1 | 1 | 0
4 | 0 | 0 | 1 | 0 | 1 | 1 | 1
5 | 1 | 0 | 1 | 1 | 0 | 1 | 0
6 | 0 | 1 | 1 | 1 | 1 | 0 | 0
7 | 1 | 1 | 1 | 0 | 0 | 0 | 1

A nine-level factor can be transformed into four three-level factors using the rule in the following table.

Converting a nine-level factor to four three-level factors
Original Code | A | B | C | D
0 | 0 | 0 | 0 | 0
1 | 0 | 1 | 1 | 2
2 | 0 | 2 | 2 | 1
3 | 1 | 0 | 1 | 1
4 | 1 | 1 | 2 | 0
5 | 1 | 2 | 0 | 2
6 | 2 | 0 | 2 | 2
7 | 2 | 1 | 0 | 1
8 | 2 | 2 | 1 | 0

Changing the Number of Levels in a Column

Any factor of m levels can be transformed into a factor of n<m levels by many-to-one mappings without changing its orthogonality. Any mapping can be used; i mod n is used here.

Related Topics

ORTHOPLAN Algorithms
Selecting the Plan (orthogonal designs algorithms)
Library of Prepared Plans (orthogonal designs algorithms)
Plackett-Burman Plans (orthogonal designs algorithms)
Addelman Plans (orthogonal designs algorithms)
Decision Rules (orthogonal designs algorithms)
Randomization (orthogonal designs algorithms)
References (orthogonal designs algorithms)


Library of Prepared Plans (orthogonal designs algorithms)

This section describes previously developed plans.

Related Topics

ORTHOPLAN Algorithms
Selecting the Plan (orthogonal designs algorithms)
Adapting the Prepared Plans (orthogonal designs algorithms)
Plackett-Burman Plans (orthogonal designs algorithms)
Addelman Plans (orthogonal designs algorithms)
Decision Rules (orthogonal designs algorithms)
Randomization (orthogonal designs algorithms)
References (orthogonal designs algorithms)


Plackett-Burman Plans (orthogonal designs algorithms)

orthogonal designs algorithms,orthogonal designs algorithms,orthogonal designs algorithms
Plackett-Burman plans,Plackett-Burman plans,Plackett-Burman plans
Plackett-Burman plans,Plackett-Burman plans,Plackett-Burman plans
orthogonal designs algorithms,orthogonal designs algorithms,orthogonal designs algorithms

Plackett and Burman (1946) describe a series of plans that can be generated from a single column by rotation. The general algorithm for generating any of these plans is:

• Let L be the number of levels for which the plan is designed. No factor in the specific design can have more than L levels.

• Let N be the number of rows (combinations) finally to be generated. Note that N=F+1 where F is defined below.

• Starting with a given column of N−1 level codes, rotate one position to generate each new column.

• Finally, add a row of zeroes.

(N−1)(L−1)orthogonal columns can be generated in this fashion.

The Plackett-Burman plans used here are designated PBL.F, where L is the maximum number of levels and F is the number of factors:

Label | Generating Column
PB 2.7 | 11101 00
PB 2.11 | 11011 10001 0
PB 2.15 | 11110 10110 01000
PB 2.19 | 11001 11101 01000 0110
PB 2.23 | 11111 01011 0110 01010 000
PB 2.31 | 00001 01011 10110 00111 11001 10100 1
PB 2.35 | 01011 10001 11110 111 00 10000 10101 10010
PB 2.43 | 11001 01001 11011 11100 01011 10000 01000 11010 110
PB 2.47 | 11111 01111 00101 01110 01001 10110 00101 01100 00100 00
PB 2.59 | 11011 10101 00100 11101 11100 11111 00000 11000 01000 11011 01010 0010
PB 3.4 | 01220 211
PB 3.13 | 00101 21120 11100 20212 21022 2
PB 3.40 | 01111 20121 12120 20221 10201 10012 22021 00200 02222 10212 21210 10112 20102 20021 11012 00100
PB 5.6 | 04112 10322 42014 43402 3313
PB 7.8 | 01262 21605 32335 20413 11430 65155 61024 54425 03646 634

Related Topics

ORTHOPLAN Algorithms
Selecting the Plan (orthogonal designs algorithms)
Adapting the Prepared Plans (orthogonal designs algorithms)
Library of Prepared Plans (orthogonal designs algorithms)
Addelman Plans (orthogonal designs algorithms)
Decision Rules (orthogonal designs algorithms)
Randomization (orthogonal designs algorithms)
References (orthogonal designs algorithms)


Addelman Plans (orthogonal designs algorithms)

orthogonal designs algorithms,orthogonal designs algorithms,orthogonal designs algorithms
Addelman plans,Addelman plans,Addelman plans
Addelman plans,Addelman plans,Addelman plans
orthogonal designs algorithms,orthogonal designs algorithms,orthogonal designs algorithms

Addelman (1961) described general methods for generating orthogonal main effects plans. That paper included a number of such designs, and using those methods, the authors generated more.

18 rows, 7 columns of 3 levels each
0000000 | 0021011
0112111 | 0100122
0221222 | 0212200
1011120 | 1002221
1120201 | 1111002
1202012 | 1220110
2022102 | 2010212
2101210 | 2122020
2210021 | 2201101
8 rows, 1 column of 4 levels plus 4 columns of 2 levels
0 | 0000
0 | 1111
1 | 0011
1 | 1100
2 | 0101
2 | 1010
3 | 0110
3 | 1001
16 rows, 5 columns of 4 levels each
00000 | 02231
10111 | 12320
20222 | 22013
30333 | 32102
01123 | 03312
11032 | 13203
21301 | 23130
31210 | 33021
32 rows, 9 columns of 4 levels each
000000000 | 002130213
011231111 | 013301302
022312222 | 020222031
033123333 | 031013120
101111032 | 103021221
110320123 | 112210330
123203210 | 121333003
132032301 | 130102112
202223102 | 200313311
213012013 | 211122200
220131320 | 222001133
231300231 | 233230022
303332130 | 301202323
312103021 | 310033232
321020312 | 323110101
330211203 | 332321010
64 rows, 21 columns of 4 levels each
000000000000000000000 | 000222233331111022220
111111111111111100000 | 111333322220000122220
222222222222222200000 | 222000011113333222220
333333333333333300000 | 333111100002222322220
123012301230123012301 | 123230132101032030121
032103210321032112301 | 032321023010123130121
301230123012301212301 | 301012310323210230121
210321032103210312301 | 210103201232301330121
231023102310231023102 | 231201331021320001322
320132013201320123102 | 320310220130231101322
013201320132013223102 | 013023113203102201322
102310231023102323102 | 102132002312013301322
312031203120312031203 | 312213030211203013023
203120312031203131203 | 203302121300312113023
130213021302130231203 | 130031212033021213023
021302130213021331203 | 021120303122130313023
000111122223333011110 | 000333311112222033330
111000033332222111110 | 111222200003333133330
222333300001111211110 | 222111133330000233330
333222211110000311110 | 333000022221111333330
123103223013210003211 | 123321010322301021031
032012332102301103211 | 032230101233210121031
301321001231032203211 | 301103232100123221031
210230110320123303211 | 210012323011032321031
231132020133102032012 | 231310213202013010232
320023131022013132012 | 320201302313102110232
013310202311320232012 | 013132031020231210232
102201313200231332012 | 102023120131320310232
312120321303021020313 | 312302112032130002133
203031230212130120313 | 203213003123021102133
130302103121203220313 | 130120330210312202133
021213012030312320313 | 021031221301203302133
16 rows, 1 column of 8 levels plus 8 columns of 2 levels
0 | 00000000 | 0 | 11111111
1 | 01010101 | 1 | 10101010
2 | 00001111 | 2 | 11110000
3 | 01011010 | 3 | 10100101
4 | 00111100 | 4 | 11000011
5 | 01101001 | 5 | 10010110
6 | 00110011 | 6 | 11001100
7 | 01100110 | 7 | 10011001
31 rows, 1 column of 8 levels plus 8 columns of 4 levels
0 | 00000000 | 0 | 22222222
1 | 01230123 | 1 | 23012301
2 | 02021313 | 2 | 20203131
3 | 03211230 | 3 | 21033012
4 | 00113322 | 4 | 22331100
5 | 01323201 | 5 | 23101023
6 | 02132031 | 6 | 20310213
7 | 03302112 | 7 | 21120330
0 | 11111111 | 0 | 33333333
1 | 10321032 | 1 | 32103210
2 | 13130202 | 2 | 31312020
3 | 12300321 | 3 | 30122103
4 | 11002233 | 4 | 33220011
5 | 10232310 | 5 | 32010132
6 | 13023120 | 6 | 31201302
7 | 12213003 | 7 | 30031221
64 rows, 9 columns of 8 levels each
000000000 | 202222222 | 404444444 | 606666666
011234567 | 213016745 | 415670123 | 617452301
022456713 | 220647531 | 426021357 | 624203175
033651274 | 231473056 | 437215630 | 635037412
044517326 | 246735104 | 440153762 | 642371540
055723641 | 257501463 | 451367205 | 653145927
066172435 | 264350617 | 462536071 | 660714253
077346152 | 275164370 | 473702516 | 671520734
101111111 | 303333333 | 505555555 | 707777777
110325476 | 312107654 | 514761032 | 7165432210
123574602 | 321756420 | 527130246 | 725312064
132140365 | 330562147 | 536304721 | 734126503
145406237 | 347624015 | 541042673 | 743260451
154632750 | 356410572 | 550276314 | 752054136
167063524 | 356241706 | 563427160 | 761605342
176257043 | 374075261 | 572613407 | 770481625
27 rows, 1 column of 9 levels plus 9 columns of 3 levels
0 | 000000000 | 3 | 011001111 | 6 | 022002222
0 | 112121212 | 3 | 120122020 | 6 | 101120101
0 | 221212121 | 3 | 202210202 | 6 | 210211010
1 | 000111122 | 4 | 011112200 | 7 | 022110011
1 | 112202001 | 4 | 120200112 | 7 | 101201220
1 | 221020210 | 4 | 202021021 | 7 | 210022102
2 | 000222211 | 5 | 011220022 | 8 | 022221100
2 | 112010120 | 5 | 120011201 | 8 | 101012012
2 | 221101002 | 5 | 202102110 | 8 | 210100221
81 rows, 10 columns of 9 levels each
0000000000 | 0336258147 | 0663174285
1011111111 | 1347036258 | 1674285063
2022222222 | 2358147036 | 2685063174
3033333333 | 3360582471 | 3606417528
4044444444 | 4371360582 | 4617528306
5055555555 | 5382471360 | 5628306417
6066666666 | 6303825714 | 6630741852
7077777777 | 7314603825 | 7641852630
8088888888 | 8325714603 | 8652630741
0112345678 | 0448561723 | 0775426831
1120453786 | 1456372804 | 1783507642
2101534867 | 2437480615 | 2764318750
3145678012 | 3472804156 | 3718750264
4153786120 | 4480615237 | 4726831075
5134867201 | 5461723048 | 5707642183
6178012345 | 6415237480 | 6742183507
7186120453 | 7423048561 | 7750264318
8167201534 | 8404156372 | 8731075426
0221687354 | 0557813462 | 0884732516
1202768435 | 1538624570 | 1865840327
2210876543 | 2546705381 | 2873651408
3254021687 | 3581246705 | 3827165840
4235102768 | 4562057813 | 4808273651
5243210876 | 5570138624 | 5816084732
6287354021 | 6524570138 | 6851408273
7268435102 | 7505381246 | 7832516084
8276543210 | 8513462057 | 8840327165

Related Topics

ORTHOPLAN Algorithms
Selecting the Plan (orthogonal designs algorithms)
Adapting the Prepared Plans (orthogonal designs algorithms)
Library of Prepared Plans (orthogonal designs algorithms)
Plackett-Burman Plans (orthogonal designs algorithms)
Decision Rules (orthogonal designs algorithms)
Randomization (orthogonal designs algorithms)
References (orthogonal designs algorithms)


Decision Rules (orthogonal designs algorithms)

orthogonal designs algorithms,orthogonal designs algorithms,orthogonal designs algorithms
decision rules,decision rules,decision rules

Each value of L (the maximum number of levels in the design) has a distinct decision rule. In their descriptions, the following notation is used:

M | The user-supplied minimum number of rows desired in the plan
F | The number of factors in the design

L = 2

If all factors have two levels, simply select the smallest two-level Plackett-Burman plan for which Nplan≥max(M, F+1).

L = 3

Let P = the number of factors with more than two levels, and let K=F+2P.

If M<9 and F<6 and P<2, base the plan on Table “8 rows, 1 column of 4 levels plus 4 columns of 2 levels”.

If M<10 and F<5, base the plan on PB 3.4.

Otherwise, if M<17 and K<16, base it on Table “16 rows, 5 columns of 4 levels each”.

Otherwise, if M<19 and K<8, base it on Table “18 rows, 7 columns of 3 levels each”.

Otherwise, if M<28 and K<14, base it on PB 3.13.

Otherwise, if M<65 and K<22, use the rules for L=4.

Otherwise, if F<41, base the plan on PB 3.40.

If F>40, there are too many factors.

L = 4

Let P = the number of factors with more than two levels, and let K=F+2P.

If M<9 and F<6 and P<2, base the plan on Table “8 rows, 1 column of 4 levels plus 4 columns of 2 levels”.

Otherwise, if M<17 and K<15, base it on Table “16 rows, 5 columns of 4 levels each”.

Otherwise, if M<26 and K<19, base it on PB 5.6.

Otherwise, if M<33 and K<28, base it on Table “32 rows, 9 columns of 4 levels each”.

Otherwise, if M<49 and K<23, use the rules for L=7.

Otherwise, if K<64, base the plan on Table “64 rows, 21 columns of 4 levels each”.

Otherwise, there are too many factors.

A four-level factor can be transformed into three two-level factors using the rule in Table “Converting a four-level factor to three two-level factors”.

L = 5

Create a plan based on the L=7 rules.

If that plan has 26 or more rows and M<26 and F<7, base the plan on PB 5.6.

Otherwise, use the plan generated in step 1.

L = 6

Treat this case as L=7.

L = 7

Generate the best plan based on L=8.

If that plan has more than 49 rows and M<50 and F<9, base the plan on PB 7.8.

Otherwise, use the plan generated in step 1.

L = 8

Let P be the number of factors with more than two levels, and Q be the number of factors with more than four levels.

If M<17 and F<10 and P<2, then base the plan on Table “16 rows, 1 column of 8 levels plus 8 columns of 2 levels”.

Otherwise, if M<28 and F<11 and only one factor has more than three levels, base the plan on the L=9 rules.

Otherwise, if M<33 and Q<2 and F+2P+4Q<32, base the plan on Table “31 rows, 1 column of 8 levels plus 8 columns of 4 levels”.

Otherwise, if M<65 and F+6P<64, base it on Table “64 rows, 9 columns of 8 levels each”.

Otherwise, base the plan on the L=9 rules.

An eight-level factor can be transformed into seven two-level factors using the rule in Table “Converting an eight-level factor to seven two-level factors”..

L = 9

Let P be the number of factors with more than three levels, and K=F+3P.

If M<28 and F<11 and P<2, then base the plan on Table “27 rows, 1 column of 9 levels plus 9 columns of 3 levels”.

Otherwise, if K<41, base it on Table “81 rows, 10 columns of 9 levels each”.

Otherwise, there are too many factors.

A nine-level factor can be transformed into four three-level factors using the rule in Table “Converting a nine-level factor to four three-level factors”..

Related Topics

ORTHOPLAN Algorithms
Selecting the Plan (orthogonal designs algorithms)
Adapting the Prepared Plans (orthogonal designs algorithms)
Library of Prepared Plans (orthogonal designs algorithms)
Plackett-Burman Plans (orthogonal designs algorithms)
Addelman Plans (orthogonal designs algorithms)
Randomization (orthogonal designs algorithms)
References (orthogonal designs algorithms)


Randomization (orthogonal designs algorithms)

After a basic plan has been selected, columns are selected at random (if possible) to fit the given design. If the basic plan is asymmetric; that is, one column has more levels than the others, then the factor in the plan with many levels must be assigned to the factor in the design with many levels, and the remaining plan factors must be assigned randomly to the remaining design factors.

If factors are to be transformed into multiple factors (for example, eight-level factors transformed into two-level factors), you can randomly assign columns from the plan to design factors with many levels first, then transform the remaining columns, and then select from the transformed columns at random the columns needed.

Related Topics

ORTHOPLAN Algorithms
Selecting the Plan (orthogonal designs algorithms)
Adapting the Prepared Plans (orthogonal designs algorithms)
Library of Prepared Plans (orthogonal designs algorithms)
Plackett-Burman Plans (orthogonal designs algorithms)
Addelman Plans (orthogonal designs algorithms)
Decision Rules (orthogonal designs algorithms)
References (orthogonal designs algorithms)


References (orthogonal designs algorithms)

orthogonal designs algorithms,orthogonal designs algorithms,orthogonal designs algorithms
references,references,references

Addelman, S. 1962. Symmetrical and asymmetrical fractional factorial plans. Technometrics, 4, 47-58.

Plackett, R. L., and J. P. Burman. 1946. The design of optimum multifactorial experiments. Biometrika, 33, 305-325.

Related Topics

ORTHOPLAN Algorithms
Selecting the Plan (orthogonal designs algorithms)
Adapting the Prepared Plans (orthogonal designs algorithms)
Library of Prepared Plans (orthogonal designs algorithms)
Plackett-Burman Plans (orthogonal designs algorithms)
Addelman Plans (orthogonal designs algorithms)
Decision Rules (orthogonal designs algorithms)
Randomization (orthogonal designs algorithms)


OVERALS Algorithms

OVERALS (command),OVERALS (command),OVERALS (command)
algorithms,algorithms,algorithms
Nonlinear Canonical Correlation Analysis,Nonlinear Canonical Correlation Analysis,Nonlinear Canonical Correlation Analysis
algorithms,algorithms,algorithms
OVERALS algorithms,OVERALS algorithms,OVERALS algorithms

The OVERALS algorithm was first described in Gifi (1981) and Van der Burg, De Leeuw and Verdegaal (1984); also see Verdegaal (1986), Van de Geer(1987), Van der Burg, De Leeuw and Verdegaal (1988), and Van der Burg (1988). Characteristic features of OVERALS, conceived by De Leeuw (1973), are the partitioning of the variables into K sets and the ability to specify any of a number of measurement levels for each variable separately. Analogously to the situation in multiple regression and canonical correlation analysis, OVERALS focuses on the relationships between sets; any particular variable contributes to the results only inasmuch as it provides information that is independent of the other variables in the same set.

Related Topics

Notation (OVERALS algorithms)
Objective Function Optimization (OVERALS algorithms)
Optimal Scaling Levels (OVERALS algorithms)
Optimization (OVERALS algorithms)
Diagnostics (OVERALS algorithms)
References (OVERALS algorithms)


Notation (OVERALS algorithms)

OVERALS algorithms,OVERALS algorithms,OVERALS algorithms
notation,notation,notation

The following notation is used throughout this chapter unless otherwise stated:

n | Number of cases (objects)
m | Number of variables
p | Number of dimensions
K | Number of sets

For variable j; j=1, ..., m

kj | Number of valid categories (distinct values) of variable j
Gj | Indicator matrix for variable j, of order n×kj

g(j) i r={
1 | when the i th object is in the r th category of variable j
0 | when the i th object is not in the r th category of variable j

Dj

Diagonal matrix, containing the univariate marginals; that is, the column sums of Gj

For set k; k=1, ..., K

J(k) | Index set of the variables that belong to set k (so that you can write jJ(k))
mk | Number of variables in set k (number of elements in J(k))
Mj | Binary diagonal n×n matrix, with diagonal elements defined as

m(j) i i={
1 when the i th observation is within the range [1,kj] for all jJ(k)
0
when the i th observation outside the range [1,kj] for all jJ(k)

The quantification matrices and parameter vectors are:

X | Object scores, of order n×p
Xj | Auxiliary matrix of order n×p, with corrected object scores when fitting variable j
Yj | Category quantifications for multiple variables, of order kj×p
yj | Category quantifications for single variables, of order kj
aj | Variable weights for single variables, of order p
Qk | Quantified variables of the kth set, of order n×mk with columns qj=Gjyj
Y | Collection of multiple and single category quantifications across variables and sets.

Note: The matrices Mk, Gj, Mj, and Dj are exclusively notational devices; they are stored in reduced form, and the program fully profits from their sparseness by replacing matrix multiplications with selective accumulation.

Related Topics

OVERALS Algorithms
Objective Function Optimization (OVERALS algorithms)
Optimal Scaling Levels (OVERALS algorithms)
Optimization (OVERALS algorithms)
Diagnostics (OVERALS algorithms)
References (OVERALS algorithms)


Objective Function Optimization (OVERALS algorithms)

OVERALS algorithms,OVERALS algorithms,OVERALS algorithms
objective function,objective function,objective function

The OVERALS objective is to find object scores X and a set of Yj (for j=1,...,m) — the underlining indicates that they may be restricted in various ways — so that the function

σ(X;Y)=1/K
Σ
k
tr[(X−
Σ
jJ(k)
GjYj)´Mk(X−
Σ
jJ(k)
GjYj)]

is minimal, under the normalization restriction X´M*X=knI where M*=
Σ
k
Mk and I is the p×p identity matrix. The inclusion of Mk in σ(X;Y) provides the following mechanism for weighting the loss: whenever any of the data values for object i in set k falls outside its particular range [1, kj], a circumstance that may indicate either genuine missing values or simulated missing values for the sake of analysis, all other data values for object i in set k are disregarded (listwise deletion per set). The diagonal of M* contains the number of "active" sets for each object. The object scores are also centered; that is, they satisfy u´M*WX=0 with u denoting an n-vector with ones.

Related Topics

OVERALS Algorithms
Notation (OVERALS algorithms)
Optimal Scaling Levels (OVERALS algorithms)
Optimization (OVERALS algorithms)
Diagnostics (OVERALS algorithms)
References (OVERALS algorithms)


Optimal Scaling Levels (OVERALS algorithms)

OVERALS algorithms,OVERALS algorithms,OVERALS algorithms
optimal scaling levels,optimal scaling levels,optimal scaling levels

The following optimal scaling levels are distinguished in OVERALS:

Multiple Nominal.Yj=Yj (equality restriction only).

(Single) Nominal.Yj=yja´j (equality and rank – one restrictions).

(Single) Ordinal.Yj=yja´j and yjCj (equality, rank – one, and monotonicity restrictions). The monotonicity restriction yjCj means that yj must be located in the convex cone of all kj-vectors with nondecreasing elements.

(Single) Numerical.Yj=yja´j and yjLj (equality, rank – one, and linearity restrictions). The linearity restriction yjLj means that yj must be located in the subspace of all kj-vectors that are a linear transformation of the vector consisting of kj successive integers.

For each variable, these levels can be chosen independently. The general requirement for all options is that equal category indicators receive equal quantifications. The general requirement for the non-multiple options is Yj=yja´j; that is, Yj is of rank one; for identification purposes, yj is always normalized so that y´jDjyj=nw.

Related Topics

OVERALS Algorithms
Notation (OVERALS algorithms)
Objective Function Optimization (OVERALS algorithms)
Optimization (OVERALS algorithms)
Diagnostics (OVERALS algorithms)
References (OVERALS algorithms)


Optimization (OVERALS algorithms)

Optimization is achieved by executing the following iteration scheme:

1. Initialization I or II

2. Loop across sets and variables

3. Eliminate contributions of other variables

4. Update category quantifications

5. Update object scores

6. Orthonormalization

7. Convergence test: repeat (2) through (6) or continue

8. Rotation

Steps (1) through (8) are explained below.

Initialization

I. Random

The object scores X are initialized with random numbers. Then X is normalized so that u´M*WX=0 and X´M*X=knI , yielding
˜
X
. For multiple variables, the initial category quantifications are set equal to 0. For single variables, the initial category quantifications
˜
y
j are defined as the first kj successive integers normalized in such a way that u´Dj
˜
y
j=0 and
˜
y
jDj
˜
y
j=n, and the initial variable weights are set equal to 0.

II. Nested

In this case, the above iteration scheme is executed twice. In the first cycle, (initialized with initialization I) all single variables are temporarily treated as single numerical, so that for the second, proper cycle, all relevant quantities can be copies from the results of the first one.

Loop across sets and variables

The next two steps are repeated for k=1,...,K and all jJ(k). During the updating of variable j, all parameters of the remaining variables are fixed at their current values.

Eliminate contributions of other variables

For quantifying variable j in set k, define the auxiliary matrix

V(k)j=ΣjJ(k)GjYj− GjYj

which accumulates the contributions of the other variables in set k; then in (X−V(k)j), the contributions of the other variables are eliminated from the object scores. This device enables you to write the loss σ(X;Yj) as a function of X and Yj only:

σ(X;Yj)= constant +1/K tr [((X−V(k)j)−GjYj)´Mk((X−V(k)j)−GjYj)]

With fixed current values
˜
X
the unconstrained minimum over Yj is attained for the matrix

˜
Y
j=(G´jMkGj)−1G´jMk(
˜
X
−V(k)j)

which forms the basis of the further computations. When switching to another variable l in the same set, the matrix V(k) l is not computed from scratch, but updated:

V(k) l←V(k) j+GjYj−GlYl

Update category quantifications

For multiple nominal variables, the new category quantifications are simply

Y+j=
˜
Y
j

For single variables one cycle of an ALS algorithm (De Leeuw et al., 1976) is executed for computing the rank-one decomposition of
˜
Y
j, with restrictions on the left-hand vector. This cycle starts from the previous category quantification
˜
y
j with

a+j=
˜
Y
´jDj
˜
y
j

When the current variable is numerical, we are ready; otherwise we compute

y*j=
˜
Y
ja+j.

Now, when the current variable is single nominal, you can simply obtain y+j by normalizing y*j in the way indicated below; otherwise the variable must be ordinal, and you have to insert the weighted monotonic regression process

y*j← WMON(*yj) .

The notation WMON( ) is used to denote the weighted monotonic regression process, which makes y*j monotonically increasing. The weights used are the diagonal elements of Dj and the subalgorithm used is the up-and-down-blocks minimum violators algorithm (Kruskal, 1964; Barlow et al., 1972). The result is normalized:

y+j=n1/2wy*j(y´*jDjy*j)−1/2

Finally, we set Y+j=y+ja´+j.

Update object scores

First the auxiliary score matrix W is computed as

W←W+MkΣjJ(k)GjY+j

and centered with respect to M*:

X*={I−M*uu´/u´M*u}W

These two steps yield locally the best updates when there would be no orthogonality constraints.

Orthonormalization

The problem is to find an M*-orthonormal X+ that is closest to M−1*X* in the M*-weighted least squares sense. In OVERALS, this is done by setting

X+←m1/2M−1/2* PROCRU (M−1/2*X*)

The notation PROCRU( ) is used to denote the Procrustes orthonormalization process. If the singular value decomposition of the input matrix M−1/2*X* is denoted by KΛ´L´, with K´K=I, L´L=I, and Λ diagonal, then the output matrix KL´=M−1/2*X*LΛ´−1L´ satisfies orthonormality in the metric M*. The calculation of L and Λ is based on tridiagonalization with Householder transformations followed by the implicit QL algorithm (Wilkinson, 1965).

Convergence test

The difference between consecutive values of trΛ4 is compared with the user-specified convergence criterion ε - a small positive number. After convergence, the badness-of-fit values is also given. Steps (2) through (6) are repeated as long as the loss difference exceeds ε.

Rotation

The OVERALS loss function σ(X;Y) is invariant under simultaneous rotations of X and Y. It can be shown that the solution is related to the principal axes of the average projection operator

Q*=1/KΣkMkQk(Q´kMkQk)−1Q´kMk

In order to achieve principal axes orientation, which is useful for purposes of interpretation and comparison, it is sufficient to find a rotation matrix that makes the cross-products of the matrix M−1/2*X* diagonal - a matrix identical to the one used in the Procrustes orthonormalization in step (6). In the terminology of that section, we rotate the matrices X+, Y+, and the vectors aj with the matrix L. The rotation matrix L is taken from the last PROCRU operation as described in step (6).

Related Topics

OVERALS Algorithms
Notation (OVERALS algorithms)
Objective Function Optimization (OVERALS algorithms)
Optimal Scaling Levels (OVERALS algorithms)
Diagnostics (OVERALS algorithms)
References (OVERALS algorithms)


Diagnostics (OVERALS algorithms)

OVERALS algorithms,OVERALS algorithms,OVERALS algorithms
diagnostics,diagnostics,diagnostics

The following diagnostics are available.

Related Topics

OVERALS Algorithms
Notation (OVERALS algorithms)
Objective Function Optimization (OVERALS algorithms)
Optimal Scaling Levels (OVERALS algorithms)
Optimization (OVERALS algorithms)
References (OVERALS algorithms)
Maximum Rank (OVERALS algorithms)
Marginal Frequencies (OVERALS algorithms)
Fit and Loss Measures (OVERALS algorithms)
Loss Per Set (OVERALS algorithms)
Eigenvalue (OVERALS algorithms)
Multiple Fit (OVERALS algorithms)
Single Fit (OVERALS algorithms)
Single Loss (OVERALS algorithms)
Component Loadings (for Single Variables) (OVERALS algorithms)
Category Quantifications (OVERALS algorithms)
Category Centroids (OVERALS algorithms)
Projected Category Centroids (OVERALS algorithms)


Maximum Rank (OVERALS algorithms)

maximum rank,maximum rank,maximum rank
OVERALS algorithms,OVERALS algorithms,OVERALS algorithms

The maximum rank ρmax indicates the maximum number of dimensions that can be computed for any dataset (if exceeded, OVERALS adjusts the number of dimensions if possible and issues a message). In general,

ρmax={
min{(n−1), r1, r2} | if K=2
min{(n−1), maxrk} | if K>2

where the quantities rk are defined as

rk=
Σ
jJM(k)
kj+mk1−mk2

Here mk1 is the number of multiple variables with no missing values in set k, mk2 is the number of single variables in set k, and JM(k) is an index set recording which variables are multiple in set k. Furthermore, OVERALS stops when any one of the following conditions is not satisfied:

1. rk<nk−1

2. nk>2

3.
Σ
k
rk≤Σk(nk−1)−(nmax−1)

Here nk denotes the number of nonmissing objects in set k, and nmax﻿ denotes the maximum across all of nk.

Related Topics

Diagnostics (OVERALS algorithms)
Marginal Frequencies (OVERALS algorithms)
Fit and Loss Measures (OVERALS algorithms)
Loss Per Set (OVERALS algorithms)
Eigenvalue (OVERALS algorithms)
Multiple Fit (OVERALS algorithms)
Single Fit (OVERALS algorithms)
Single Loss (OVERALS algorithms)
Component Loadings (for Single Variables) (OVERALS algorithms)
Category Quantifications (OVERALS algorithms)
Category Centroids (OVERALS algorithms)
Projected Category Centroids (OVERALS algorithms)


Marginal Frequencies (OVERALS algorithms)

marginal frequencies,marginal frequencies,marginal frequencies
OVERALS algorithms,OVERALS algorithms,OVERALS algorithms

The frequencies table gives the univariate marginals and the number of missing values (that is, values that are regarded as out of range for the current analysis) for each variable. These are computed as the column sums of Dj and the total sum of Mk for jJ(k).

Related Topics

Diagnostics (OVERALS algorithms)
Maximum Rank (OVERALS algorithms)
Fit and Loss Measures (OVERALS algorithms)
Loss Per Set (OVERALS algorithms)
Eigenvalue (OVERALS algorithms)
Multiple Fit (OVERALS algorithms)
Single Fit (OVERALS algorithms)
Single Loss (OVERALS algorithms)
Component Loadings (for Single Variables) (OVERALS algorithms)
Category Quantifications (OVERALS algorithms)
Category Centroids (OVERALS algorithms)
Projected Category Centroids (OVERALS algorithms)


Fit and Loss Measures (OVERALS algorithms)

In the Summary of Analysis, loss and fit measures are reported.

Related Topics

Diagnostics (OVERALS algorithms)
Maximum Rank (OVERALS algorithms)
Marginal Frequencies (OVERALS algorithms)
Loss Per Set (OVERALS algorithms)
Eigenvalue (OVERALS algorithms)
Multiple Fit (OVERALS algorithms)
Single Fit (OVERALS algorithms)
Single Loss (OVERALS algorithms)
Component Loadings (for Single Variables) (OVERALS algorithms)
Category Quantifications (OVERALS algorithms)
Category Centroids (OVERALS algorithms)
Projected Category Centroids (OVERALS algorithms)


Loss Per Set (OVERALS algorithms)

This is K times σ(X;Y), partitioned with respect to sets and dimensions; the means per dimension are also given.

Related Topics

Diagnostics (OVERALS algorithms)
Maximum Rank (OVERALS algorithms)
Marginal Frequencies (OVERALS algorithms)
Fit and Loss Measures (OVERALS algorithms)
Eigenvalue (OVERALS algorithms)
Multiple Fit (OVERALS algorithms)
Single Fit (OVERALS algorithms)
Single Loss (OVERALS algorithms)
Component Loadings (for Single Variables) (OVERALS algorithms)
Category Quantifications (OVERALS algorithms)
Category Centroids (OVERALS algorithms)
Projected Category Centroids (OVERALS algorithms)


Eigenvalue (OVERALS algorithms)

The values listed here are 1 minus the means per dimension defined above, forming a partitioning of FIT, which is ρ−σ(X;Y) when convergence is reached. These quantities are the eigenvalues of Q* defined in section (8).

Related Topics

Diagnostics (OVERALS algorithms)
Maximum Rank (OVERALS algorithms)
Marginal Frequencies (OVERALS algorithms)
Fit and Loss Measures (OVERALS algorithms)
Loss Per Set (OVERALS algorithms)
Multiple Fit (OVERALS algorithms)
Single Fit (OVERALS algorithms)
Single Loss (OVERALS algorithms)
Component Loadings (for Single Variables) (OVERALS algorithms)
Category Quantifications (OVERALS algorithms)
Category Centroids (OVERALS algorithms)
Projected Category Centroids (OVERALS algorithms)


Multiple Fit (OVERALS algorithms)

This measure is computed as the diagonal of the matrix Y´jDjYj, computed for all variables (rows) with dimensions given in the columns.

Related Topics

Diagnostics (OVERALS algorithms)
Maximum Rank (OVERALS algorithms)
Marginal Frequencies (OVERALS algorithms)
Fit and Loss Measures (OVERALS algorithms)
Loss Per Set (OVERALS algorithms)
Eigenvalue (OVERALS algorithms)
Single Fit (OVERALS algorithms)
Single Loss (OVERALS algorithms)
Component Loadings (for Single Variables) (OVERALS algorithms)
Category Quantifications (OVERALS algorithms)
Category Centroids (OVERALS algorithms)
Projected Category Centroids (OVERALS algorithms)


Single Fit (OVERALS algorithms)

This table gives the squared weights, computed only for variables that are single. The sum of squares of the weights: a´jaj.

Related Topics

Diagnostics (OVERALS algorithms)
Maximum Rank (OVERALS algorithms)
Marginal Frequencies (OVERALS algorithms)
Fit and Loss Measures (OVERALS algorithms)
Loss Per Set (OVERALS algorithms)
Eigenvalue (OVERALS algorithms)
Multiple Fit (OVERALS algorithms)
Single Loss (OVERALS algorithms)
Component Loadings (for Single Variables) (OVERALS algorithms)
Category Quantifications (OVERALS algorithms)
Category Centroids (OVERALS algorithms)
Projected Category Centroids (OVERALS algorithms)


Single Loss (OVERALS algorithms)

Single loss is equal to multiple fit minus single fit for single variables only. It is the loss incurred by the imposition of the rank-one measurement level restrictions.

Related Topics

Diagnostics (OVERALS algorithms)
Maximum Rank (OVERALS algorithms)
Marginal Frequencies (OVERALS algorithms)
Fit and Loss Measures (OVERALS algorithms)
Loss Per Set (OVERALS algorithms)
Eigenvalue (OVERALS algorithms)
Multiple Fit (OVERALS algorithms)
Single Fit (OVERALS algorithms)
Component Loadings (for Single Variables) (OVERALS algorithms)
Category Quantifications (OVERALS algorithms)
Category Centroids (OVERALS algorithms)
Projected Category Centroids (OVERALS algorithms)


Component Loadings (for Single Variables) (OVERALS algorithms)

component loadings,component loadings,component loadings
OVERALS algorithms,OVERALS algorithms,OVERALS algorithms

Loadings are the lengths of the projections of the quantified (single) variables onto the object space: q´jX. When there are no missing data, the loadings are equal to the correlations between the quantified variables and the object scores (the principal components).

Related Topics

Diagnostics (OVERALS algorithms)
Maximum Rank (OVERALS algorithms)
Marginal Frequencies (OVERALS algorithms)
Fit and Loss Measures (OVERALS algorithms)
Loss Per Set (OVERALS algorithms)
Eigenvalue (OVERALS algorithms)
Multiple Fit (OVERALS algorithms)
Single Fit (OVERALS algorithms)
Single Loss (OVERALS algorithms)
Category Quantifications (OVERALS algorithms)
Category Centroids (OVERALS algorithms)
Projected Category Centroids (OVERALS algorithms)


Category Quantifications (OVERALS algorithms)

category quantifications,category quantifications,category quantifications
OVERALS algorithms,OVERALS algorithms,OVERALS algorithms

Single Coordinates. For single variables only: Yj=yja´j.

Multiple Coordinates. These are
˜
Y
j defined previously; that is, the unconstrained minimizers of the loss function, for multiple variables equal to the category quantifications.

Related Topics

Diagnostics (OVERALS algorithms)
Maximum Rank (OVERALS algorithms)
Marginal Frequencies (OVERALS algorithms)
Fit and Loss Measures (OVERALS algorithms)
Loss Per Set (OVERALS algorithms)
Eigenvalue (OVERALS algorithms)
Multiple Fit (OVERALS algorithms)
Single Fit (OVERALS algorithms)
Single Loss (OVERALS algorithms)
Component Loadings (for Single Variables) (OVERALS algorithms)
Category Centroids (OVERALS algorithms)
Projected Category Centroids (OVERALS algorithms)


Category Centroids (OVERALS algorithms)

category centroids,category centroids,category centroids
OVERALS algorithms,OVERALS algorithms,OVERALS algorithms

The centroids of all objects that share the same category, D−1jG´jX. Note that they are not necessarily equal to the multiple coordinates.

Related Topics

Diagnostics (OVERALS algorithms)
Maximum Rank (OVERALS algorithms)
Marginal Frequencies (OVERALS algorithms)
Fit and Loss Measures (OVERALS algorithms)
Loss Per Set (OVERALS algorithms)
Eigenvalue (OVERALS algorithms)
Multiple Fit (OVERALS algorithms)
Single Fit (OVERALS algorithms)
Single Loss (OVERALS algorithms)
Component Loadings (for Single Variables) (OVERALS algorithms)
Category Quantifications (OVERALS algorithms)
Projected Category Centroids (OVERALS algorithms)


Projected Category Centroids (OVERALS algorithms)

projected category centroids,projected category centroids,projected category centroids
OVERALS algorithms,OVERALS algorithms,OVERALS algorithms

For single variables only, yjb´j. These are the points on a line in the direction given by the loadings bj that result from projection of the category centroids with weights Dj.

Related Topics

Diagnostics (OVERALS algorithms)
Maximum Rank (OVERALS algorithms)
Marginal Frequencies (OVERALS algorithms)
Fit and Loss Measures (OVERALS algorithms)
Loss Per Set (OVERALS algorithms)
Eigenvalue (OVERALS algorithms)
Multiple Fit (OVERALS algorithms)
Single Fit (OVERALS algorithms)
Single Loss (OVERALS algorithms)
Component Loadings (for Single Variables) (OVERALS algorithms)
Category Quantifications (OVERALS algorithms)
Category Centroids (OVERALS algorithms)


References (OVERALS algorithms)

OVERALS algorithms,OVERALS algorithms,OVERALS algorithms
references,references,references

Barlow, R. E., D. J. Bartholomew, D. J. Bremner, and H. D. Brunk. 1972. Statistical inference under order restrictions. New York: John Wiley and Sons.

Cliff, N. 1966. Orthogonal rotation to congruence. Psychometrika, 31, 33-42.

De Leeuw, J. 1984. Canonical analysis of categorical data, 2nd ed. Leiden: DSWO Press.

De Leeuw, J., F. W. Young, and Y. Takane. 1976. Additive structure in qualitative data: An alternating least squares method with optimal scaling features. Psychometrika, 41, 471-503.

Gifi, A. 1990. Nonlinear multivariate analysis. Chichester: John Wiley and Sons.

Kruskal, J. B. 1964. Nonmetric multidimensional scaling: A numerical method. Psychometrika, 29, 115-129.

Van de Geer, J. P. 1987. Algebra and geometry of OVERALS: Internal Report RR-87–13. Leiden: Department of Data Theory, University of Leiden.

Van der Burg, E. 1988. Nonlinear canonical correlation and some related techniques. Leiden: DSWO Press.

Van der Burg, E., J. De Leeuw, and R. Verdegaal. 1984. Non-linear canonical correlation analysis: Internal Report RR-84–12. Leiden: Department of Data Theory, University of Leiden.

Van der Burg, E., J. De Leeuw, and R. Verdegaal. 1988. Homogeneity analysis with k sets of variables: An alternating least squares method with optimal scaling features. Psychometrika, 53, 177-197.

Verdegaal, R. 1986. OVERALS: Internal Report UG-86–01. Leiden: Department of Data Theory, University of Leiden.

Wilkinson, J. H. 1965. The algebraic eigenvalue problem. Oxford: Clarendon Press.

Related Topics

OVERALS Algorithms
Notation (OVERALS algorithms)
Objective Function Optimization (OVERALS algorithms)
Optimal Scaling Levels (OVERALS algorithms)
Optimization (OVERALS algorithms)
Diagnostics (OVERALS algorithms)


PARTIAL CORR Algorithms

PARTIAL CORR (command),PARTIAL CORR (command),PARTIAL CORR (command)
algorithms,algorithms,algorithms
Partial Correlations,Partial Correlations,Partial Correlations
algorithms,algorithms,algorithms
partial correlations algorithms,partial correlations algorithms,partial correlations algorithms

PARTIAL CORR produces partial correlation coefficients that describe the relationship between two variables while adjusting for the effects of one or more additional variables.

Related Topics

Notation (partial correlations algorithms)
Statistics (partial correlations algorithms)
Zero-Order Correlations (partial correlations algorithms)
Means and Standard Deviations (partial correlations algorithms)
Partial Correlations (partial correlations algorithms)
Significance Level (partial correlations algorithms)
References (partial correlations algorithms)


Notation (partial correlations algorithms)

partial correlations algorithms,partial correlations algorithms,partial correlations algorithms
notation,notation,notation

The following notation is used throughout this section unless otherwise stated:

N | Number of cases
Xkl | Value of variable k for case l
wl | Weight for case l
Wij | Sum of the weights of cases used in computation of statistics for variable i and j
Wi | Sum of the weights of cases used in computation of statistics for variable i

Related Topics

PARTIAL CORR Algorithms
Statistics (partial correlations algorithms)
Zero-Order Correlations (partial correlations algorithms)
Means and Standard Deviations (partial correlations algorithms)
Partial Correlations (partial correlations algorithms)
Significance Level (partial correlations algorithms)
References (partial correlations algorithms)


Statistics (partial correlations algorithms)

partial correlations algorithms,partial correlations algorithms,partial correlations algorithms
statistics,statistics,statistics

Related Topics

PARTIAL CORR Algorithms
Notation (partial correlations algorithms)
Zero-Order Correlations (partial correlations algorithms)
Means and Standard Deviations (partial correlations algorithms)
Partial Correlations (partial correlations algorithms)
Significance Level (partial correlations algorithms)
References (partial correlations algorithms)


Zero-Order Correlations (partial correlations algorithms)

partial correlations algorithms,partial correlations algorithms,partial correlations algorithms
zero-order correlations,zero-order correlations,zero-order correlations

rij=NΣl=1wlXilXjl−(NΣl=1wlXil)(NΣl=1wlXjl)/Wij
√ (NΣl=1wlX2il−(NΣl=1wlXil)2/Wij)(NΣl=1wlX2jl−(NΣl=1wlXjl)2/Wij)

Noncomputable coefficients are set to system missing. The significance level for rij is based on

t=rij
√ Wij−21−r2ij

which, under the null hypothesis, is distributed as a t with Wij−2 degrees of freedom. By default, one-tailed significance levels are printed.

Related Topics

PARTIAL CORR Algorithms
Notation (partial correlations algorithms)
Statistics (partial correlations algorithms)
Means and Standard Deviations (partial correlations algorithms)
Partial Correlations (partial correlations algorithms)
Significance Level (partial correlations algorithms)
References (partial correlations algorithms)


Means and Standard Deviations (partial correlations algorithms)

partial correlations algorithms,partial correlations algorithms,partial correlations algorithms
means and standard deviations,means and standard deviations,means and standard deviations
Xj=NΣi=1wiXji/Wj

Sj=
√ (NΣi=1wiX2ji−X2jWj)/(Wj−1)

If pairwise deletion is selected, means and standard deviations are based on all nonmissing cases. For listwise deletion, only cases with no missing values on any specified variables are included.

Related Topics

PARTIAL CORR Algorithms
Notation (partial correlations algorithms)
Statistics (partial correlations algorithms)
Zero-Order Correlations (partial correlations algorithms)
Partial Correlations (partial correlations algorithms)
Significance Level (partial correlations algorithms)
References (partial correlations algorithms)


Partial Correlations (partial correlations algorithms)

partial correlations algorithms,partial correlations algorithms,partial correlations algorithms
partial correlations,partial correlations,partial correlations

Partial correlations are calculated recursively from the lower-order coefficients using

rij.k=rij−rkirkj
√ (1−r2ki)(1−r2kj)
(first order)
rij.kl=rij.k−ril.krjl.k
√ (1−r2il.k)(1−r2jl.k)
(second order)

and similarly for higher orders ((Morrison, 1976) p. 94).

If the denominator is less than 10−20, or if any of the lower-order coefficients necessary for calculations are system missing, the coefficient is set to system missing. If a coefficient in absolute value is greater than 1, it is set to system missing. (This may occur with pairwise deletion.)

Related Topics

PARTIAL CORR Algorithms
Notation (partial correlations algorithms)
Statistics (partial correlations algorithms)
Zero-Order Correlations (partial correlations algorithms)
Means and Standard Deviations (partial correlations algorithms)
Significance Level (partial correlations algorithms)
References (partial correlations algorithms)


Significance Level (partial correlations algorithms)

partial correlations algorithms,partial correlations algorithms,partial correlations algorithms
significance level,significance level,significance level

The significance level is based on

t=r
√ df1−r2

The degrees of freedom are

df=M−θ−2

where θ is the order of the coefficient and M is the minimum sum of weights from which the zero-order coefficients involved in the computations were calculated. Thus, for rij.kl

M=min﻿(Wij,Wki,Wkj,Wil,Wlk,Wjl)

where Wij is the sum of weights of the cases used to calculated rij. If listwise deletion of missing values (default) was used, all Wij are equal. By default, the significance level is one-tailed.

Related Topics

PARTIAL CORR Algorithms
Notation (partial correlations algorithms)
Statistics (partial correlations algorithms)
Zero-Order Correlations (partial correlations algorithms)
Means and Standard Deviations (partial correlations algorithms)
Partial Correlations (partial correlations algorithms)
References (partial correlations algorithms)


References (partial correlations algorithms)

partial correlations algorithms,partial correlations algorithms,partial correlations algorithms
references,references,references

Morrison, D. F. 1976. Multivariate statistical methods. New York: McGraw-Hill.

Related Topics

PARTIAL CORR Algorithms
Notation (partial correlations algorithms)
Statistics (partial correlations algorithms)
Zero-Order Correlations (partial correlations algorithms)
Means and Standard Deviations (partial correlations algorithms)
Partial Correlations (partial correlations algorithms)
Significance Level (partial correlations algorithms)


PLS Algorithms

PLS (command),PLS (command),PLS (command)
algorithms,algorithms,algorithms
Partial Least Squares Regression,Partial Least Squares Regression,Partial Least Squares Regression
algorithms,algorithms,algorithms
partial least squares algorithms,partial least squares algorithms,partial least squares algorithms

Partial least squares (PLS) regression fits a model for one or more dependent variables based upon one or more predictors. It is especially useful when the predictors exhibit multicollinearity, or there are more predictors than cases.

Related Topics

Notation (partial least squares algorithms)
Preprocessing (partial least squares algorithms)
Estimation (partial least squares algorithms)
Output Statistics (partial least squares algorithms)
References (partial least squares algorithms)


Notation (partial least squares algorithms)

partial least squares algorithms,partial least squares algorithms,partial least squares algorithms
notation,notation,notation

The following notation is used throughout this chapter unless otherwise stated:

X | N × n design matrix of independent variables, centered and perhaps standardized. Note that there is no intercept term.
Y | N × m matrix of dependent variables, centered and perhaps standardized
c | m × 1 column vector of weights
u | N × 1 column vector of Y scores
w | n × 1 column vector of weights
t | N × 1 column vector of X scores
d | number of PLS factors to extract
p | n × 1 loading vector
q | m × 1 loading vector
P | n × d loading matrix
Q | m × d loading matrix
T | N × d score matrix, T=XW*
U | N × d score matrix
W | n × d matrix of X-weights
W* | n × d matrix of X-weights in original coordinates; these weights can be directly applied to X, W*=W(P´W)−1
C | m × d matrix of Y-weights; these weights can be directly applied to Y.
B | n × m matrix of regression parameters, B=W*C´
E | N × n matrix of residuals, E = X – TP'
F | N × m matrix of residuals, F = Y – UQ' = Y – XB
DModX | N × 1 vector of distances of X variables to the model
DModY | N × 1 vector of distances of Y variables to the model
VIP | n × d matrix of Variable Importance in the Projection

Related Topics

PLS Algorithms
Preprocessing (partial least squares algorithms)
Estimation (partial least squares algorithms)
Output Statistics (partial least squares algorithms)
References (partial least squares algorithms)


Preprocessing (partial least squares algorithms)

The following steps are performed before the estimation algorithm commences.

Related Topics

PLS Algorithms
Notation (partial least squares algorithms)
Estimation (partial least squares algorithms)
Output Statistics (partial least squares algorithms)
References (partial least squares algorithms)
Design Matrix (partial least squares algorithms)
Categorical Variable Encoding (partial least squares algorithms)
Missing Values (partial least squares algorithms)
Center and Standardize Variables (partial least squares algorithms)


Design Matrix (partial least squares algorithms)

partial least squares algorithms,partial least squares algorithms,partial least squares algorithms
design matrix,design matrix,design matrix

The design matrix X is constructed from the independent variables as in GLM models without an intercept.

Related Topics

Preprocessing (partial least squares algorithms)
Categorical Variable Encoding (partial least squares algorithms)
Missing Values (partial least squares algorithms)
Center and Standardize Variables (partial least squares algorithms)


Categorical Variable Encoding (partial least squares algorithms)

partial least squares algorithms,partial least squares algorithms,partial least squares algorithms
categorical variable encoding,categorical variable encoding,categorical variable encoding

The procedure temporarily recodes categorical dependent variables using one-of-c coding for the duration of the procedure. If there are c categories of a variable, then the variable is stored as c vectors, with the first category denoted (1,0,...,0), the next category (0,1,0,...,0), ..., and the final category (0,0,...,0,1).

Categorical dependent variables are represented using dummy coding; that is, simply omit the indicator corresponding to the reference category. In particular, when there is a single dependent variable with exactly two levels, there will be a single indicator, and convergence will occur in a single NIPALS iteration.

Related Topics

Preprocessing (partial least squares algorithms)
Design Matrix (partial least squares algorithms)
Missing Values (partial least squares algorithms)
Center and Standardize Variables (partial least squares algorithms)


Missing Values (partial least squares algorithms)

partial least squares algorithms,partial least squares algorithms,partial least squares algorithms
missing values,missing values,missing values

Cases with user- or system-missing values are handled as follows:

Listwise Deletion. Only cases with complete values for all X and Y variables will be used.

Related Topics

Preprocessing (partial least squares algorithms)
Design Matrix (partial least squares algorithms)
Categorical Variable Encoding (partial least squares algorithms)
Center and Standardize Variables (partial least squares algorithms)


Center and Standardize Variables (partial least squares algorithms)

Given a matrix of independent variables X and of dependent variables Y (with the design matrix, categorical variable encoding, and missing values), compute the mean and standard deviation of each variable, and replace X with the centered and standardized variates X:=(X−μX)Σ−1X where ΣX is a diagonal matrix of standard deviations and μX is the vector of means; similarly for Y: Y:=(Y−μY)Σ−1Y. This change of coordinates must be reversed after all components have been extracted;
^
Y
:=YΣ−1Y+μY.

Related Topics

Preprocessing (partial least squares algorithms)
Design Matrix (partial least squares algorithms)
Categorical Variable Encoding (partial least squares algorithms)
Missing Values (partial least squares algorithms)


Estimation (partial least squares algorithms)

partial least squares algorithms,partial least squares algorithms,partial least squares algorithms
estimation,estimation,estimation

When there is only one dependent variable (m=1), use the NIPALS algorithm. Only one iteration will be required. When there is more than one dependent variable (m>1), solve the equivalent eigenproblem, solving for the vector with the smallest dimension. Use the resulting eigenvector as the input to NIPALS, checking the vector with the greatest length for convergence. (This check may turn out to be unneeded, in which case one iteration of NIPALS will still be needed to obtain all the required vectors.)

This diagram illustrates the relationship between the vectors and matrices used in the NIPALS algorithm, where the vectors should be taken as determined only up to scalar multiples:

 |  |  | Y´ | c |  |  |  |
 | X´ |  | ↗ |  | ↘ | Y |  |
p=X´t/(t´t) | ← | t |  |  |  | u | → | q=Y´u/(u´u)
 |  | X | ↖ |  | ↙ |  | Y´ |
 |  |  |  | w | X´ |  |  |

Related Topics

PLS Algorithms
Notation (partial least squares algorithms)
Preprocessing (partial least squares algorithms)
Output Statistics (partial least squares algorithms)
References (partial least squares algorithms)
NonLinear Iterative Partial Least Squares (NIPALS) Algorithm (partial least squares algorithms)
NIPALS-Equivalent Eigenproblem (partial least squares algorithms)
Power Method (partial least squares algorithms)
Rayleigh Quotient Iteration (partial least squares algorithms)


NonLinear Iterative Partial Least Squares (NIPALS) Algorithm (partial least squares algorithms)

partial least squares algorithms,partial least squares algorithms,partial least squares algorithms
NIPALS,NIPALS,NIPALS

The classical NIPALS algorithm explicitly takes c and w to have unit norm. In particular, note that if there is only one dependent variable Y, then c is a 1×1 unit vector so c = 1, and this will be the most useful starting point: initialize u = Y; otherwise, initialize u or any of the vectors to some random starting value. Also, when c = 1, then NIPALS converges in only one iteration.

The following loop may be entered at any point which is most convenient, most especially when m = 1, c = 1, begin at step 1 with u = Y:

Repeat until convergence:

1. w = X'u/(u'u)

2. w := w/||w||

3. t = Xw

4. c = Y't/(t't)

5. c := c/||c||

6. u = Yc

Although the NIPALS algorithm will in practice be replaced with the solution of an eigenproblem (see NIPALS-Equivalent Eigenproblem (partial least squares algorithms)) the relationships defined in the sequence above will be used to obtain all the matrices and vectors required.

Regress X on t and Y on u:

1. p = X't/(t't)

2. q = Y'u/(u'u)

Deflate X and Y matrices:

1. X := X – tp'

2. Y := Y – tc' (use c from step 4, not step 5, above)

Note that the deflated matrices are the errors E, F at that stage.

Repeat d times, assembling the t, p, u, q vectors into matrices to obtain the desired factorizations into scores T, U, loadings P, Q, weights W, C, and residuals E, F:

• X = TP' + E

• Y = UQ' + F

Since the matrices X, Y are centered, note that (t´t)−1t´Y is the normal equation for a regression of Y on t, likewise (u´u)−1u´X regresses X on u. Thus the NIPALS algorithm alternates between regression and projection. If vectors are considered to be determined only up to length, there is no longer any distinction between the two.

The matrix of regression coefficients for predicting Y from X is given by either any of the following expressions, and is independent of the scalings of T and U:

B=W*C´
B=W(P´W)−1C´
B=X´U(T´XX´U)−1T´Y

W and C are obtained by assembling the w and c vectors into n× d and m× d matrices. This solves the PLS Regression equation:

Y = XB + F

Until now the X and Y matrices have been assumed to be centered, and (optionally) standardized. The parameters B and residuals E and F must be restored to their original coordinates B*=Σ−1XBΣY, E*=EΣX, with the final regression equation in the original coordinates given by
^
Y
=XB*+(μY−μXB*). Also, the residuals F left over after deflating the Y matrix should not be used, but are recalculated from the predictions in the centered and rescaled coordinates as F = Y – XB; F*=FΣY in the original coordinates.

Related Topics

Estimation (partial least squares algorithms)
NIPALS-Equivalent Eigenproblem (partial least squares algorithms)
Power Method (partial least squares algorithms)
Rayleigh Quotient Iteration (partial least squares algorithms)


NIPALS-Equivalent Eigenproblem (partial least squares algorithms)

Regarding the vectors as determined only up to length allows the NIPALS loop to be replaced by an eigenproblem. One can choose to solve any of the following; typically selecting the matrix with the smallest dimension, which will often be the first equation:

Y´XX´Yc=λc
YY´XX´u=λu
X´YY´Xw=λw
XX´YY´t=λt

Once c (or any of the others) are determined, the rest of the vectors can be determined; at this point it is important to keep track of the lengths.

The eigenproblem can be solved by the Power Method.

Related Topics

Estimation (partial least squares algorithms)
NonLinear Iterative Partial Least Squares (NIPALS) Algorithm (partial least squares algorithms)
Power Method (partial least squares algorithms)
Rayleigh Quotient Iteration (partial least squares algorithms)


Power Method (partial least squares algorithms)

xi+1=Axi
λi=x´iAxi=x´ixi+1
xi+1:=xi+1/||xi+1||

Initialize a vector x0, say to the vector 1, normalize to unit length, then iterate until convergence. The sequence of iterates is guaranteed to converge to the eigenvector associated to the dominant (that is, the largest) eigenvalue. Moreover the dominant eigenvalue is guaranteed to be unique.

Rather than continue to iterate using the power method, switch to Rayleigh Quotient Iteration (RQI).

Related Topics

Estimation (partial least squares algorithms)
NonLinear Iterative Partial Least Squares (NIPALS) Algorithm (partial least squares algorithms)
NIPALS-Equivalent Eigenproblem (partial least squares algorithms)
Rayleigh Quotient Iteration (partial least squares algorithms)


Rayleigh Quotient Iteration (partial least squares algorithms)

Begin with initial estimates of x0 and λ0 obtained from one or two iterations of the Power Method. Then repeat until convergence:

(A−λiI)w=xi (solve for w)
xi+1=w/||w||
λi+1=x´i+1Axi+1

The conjugate gradient method may be used to solve for w.

The eigenproblem is considered solved when the difference between two iterations is small enough. However, the eigenproblem is typically solved for c, but the vector of interest is t. One iteration of NIPALS is used to obtain the vectors (c, u, w, t).

Related Topics

Estimation (partial least squares algorithms)
NonLinear Iterative Partial Least Squares (NIPALS) Algorithm (partial least squares algorithms)
NIPALS-Equivalent Eigenproblem (partial least squares algorithms)
Power Method (partial least squares algorithms)


Output Statistics (partial least squares algorithms)

The following output statistics are available.

Related Topics

PLS Algorithms
Notation (partial least squares algorithms)
Preprocessing (partial least squares algorithms)
Estimation (partial least squares algorithms)
References (partial least squares algorithms)
Proportion of Variance Explained (partial least squares algorithms)
Variable Importance in the Projection (VIP) (partial least squares algorithms)
Distance to the Model (partial least squares algorithms)
PRESS Statistic (partial least squares algorithms)


Proportion of Variance Explained (partial least squares algorithms)

proportion of variance explained,proportion of variance explained,proportion of variance explained
partial least squares algorithms,partial least squares algorithms,partial least squares algorithms

The proportion of variance explained by the extraction of factor k is given by computing:

SSk(Y) | =(t´(k)t(k))·trace(c(k)c´(k))
 | =(t´(k)t(k))·(c´(k)c(k))
VarPropk(Y)=SSk(Y)trace(Y´Y)

The cumulative proportion of variance explained is

CumVarPropk(Y)=kΣi=1Vari(Y)

Here t(k) and c(k) are the column vectors obtained after k factors have been extracted; that is, the kth columns of T and C. Note that c(k) is taken from step 4 of the NIPALS algorithm, and is not rescaled to unit length as in step 5.

The proportion of variance explained in X is similar:

SSk(X) | =(t´(k)t(k))·trace(p(k)p´(k))
 | =(t´(k)t(k))·(p´(k)p(k))
VarPropk(X)=SSk(X)trace(X´X)
CumVarPropk(X)=kΣi=1Vari(X)

Related Topics

Output Statistics (partial least squares algorithms)
Variable Importance in the Projection (VIP) (partial least squares algorithms)
Distance to the Model (partial least squares algorithms)
PRESS Statistic (partial least squares algorithms)


Variable Importance in the Projection (VIP) (partial least squares algorithms)

variable importance in the projection (VIP),variable importance in the projection (VIP),variable importance in the projection (VIP)
partial least squares algorithms,partial least squares algorithms,partial least squares algorithms
VIP,VIP,VIP
partial least squares algorithms,partial least squares algorithms,partial least squares algorithms

The VIP statistic is computed for each variable and latent factor as

VIP jk=
√ nkΣl=1w*jl2·SSl(Y)kΣl=1SSl(Y)

Here 1≤j≤n and 1≤k≤d; w*jk is the jth element of w*(k), where w*(k) is the kth column of W.

Related Topics

Output Statistics (partial least squares algorithms)
Proportion of Variance Explained (partial least squares algorithms)
Distance to the Model (partial least squares algorithms)
PRESS Statistic (partial least squares algorithms)


Distance to the Model (partial least squares algorithms)

distance to the model,distance to the model,distance to the model
partial least squares algorithms,partial least squares algorithms,partial least squares algorithms

Distance to the model, sometimes denoted DModX and DModY, is given by:

DModXi=
√ e´iei
DModYi=
√ fifi

for each row ei of E and fi of F. This may be normalized to:

DModXi=
√ NN−d−1e´iei
DModYi=
√ NN−d−1fifi

Related Topics

Output Statistics (partial least squares algorithms)
Proportion of Variance Explained (partial least squares algorithms)
Variable Importance in the Projection (VIP) (partial least squares algorithms)
PRESS Statistic (partial least squares algorithms)


PRESS Statistic (partial least squares algorithms)

PRESS statistic,PRESS statistic,PRESS statistic
partial least squares algorithms,partial least squares algorithms,partial least squares algorithms

The PRESS residuals are fi´f, that is, DModY2i before any normalizations are carried out. The PRESS statistic is simply

PRESS =NΣi=1DModY2i

"Jackknifed", or more correctly, leave-one-out PRESS residuals are calculated as f(i)=Yi−
^
Y
i
√ 1−hii
where Yi is the ith row of Y,
^
Y
i is the predicted value for that row, and hii is the ith diagonal element of the “hat” matrix X(X´X)−1X´. Leave-one-out PRESS residuals are not available when there are more variables than cases, or when X'X is not invertible for any other reason. The Jackknifed PRESS statistic for model selection is the sum of the squared norm of the Jackknifed PRESS residuals:

PRESS=NΣi=1f´(i)f(i)

Related Topics

Output Statistics (partial least squares algorithms)
Proportion of Variance Explained (partial least squares algorithms)
Variable Importance in the Projection (VIP) (partial least squares algorithms)
Distance to the Model (partial least squares algorithms)


References (partial least squares algorithms)

partial least squares algorithms,partial least squares algorithms,partial least squares algorithms
references,references,references

Rosipal, R., and N. Krämer. 2006. Overview and Recent Advances in Partial Least Squares. In: Subspace, Latent Structure and Feature Selection Techniques, C. Saunders, M. Grobelnik, S. Gunn, and J. Shawe-Taylor, eds. Berlin: Springer-Verlag.

Related Topics

PLS Algorithms
Notation (partial least squares algorithms)
Preprocessing (partial least squares algorithms)
Estimation (partial least squares algorithms)
Output Statistics (partial least squares algorithms)


PLUM Algorithms

PLUM (command),PLUM (command),PLUM (command)
algorithms,algorithms,algorithms
Ordinal Regression,Ordinal Regression,Ordinal Regression
algorithms,algorithms,algorithms
ordinal regression algorithms,ordinal regression algorithms,ordinal regression algorithms

The purpose of the PLUM procedure is to model the dependence of an ordinal categorical response variable on a set of categorical and scale independent variables.

Since the choice and the number of response categories can be quite arbitrary, it is essential to model the dependence such that the choice of the response categories does not affect the conclusion of the inference. That is, the final conclusion should be the same if any two or more adjacent categories of the old scale are combined. Such considerations lead to modeling the dependence of the response on the independent variables by means of the cumulative response probability.

Related Topics

Notation (ordinal regression algorithms)
Data Aggregation (ordinal regression algorithms)
Data Assumptions (ordinal regression algorithms)
Model (ordinal regression algorithms)
Log-likelihood Function (ordinal regression algorithms)
Parameter Estimation (ordinal regression algorithms)
Statistics (ordinal regression algorithms)
Linear Hypothesis Testing (ordinal regression algorithms)
References (ordinal regression algorithms)


Notation (ordinal regression algorithms)

ordinal regression algorithms,ordinal regression algorithms,ordinal regression algorithms
notation,notation,notation

The following notation is used throughout this chapter unless otherwise stated:

Y

The response variable, which takes integer values from 1 to J.

J

The number of categories of the ordinal response.

m

The number of subpopulations.

XA

m×pA matrix with vector-element xAi, the observed values at the ith subpopulation, determined by the independent variables specified in the command.

X

m×p matrix with vector-element xi, the observed values of the location model's independent variables at the ith subpopulation.

Z

m×p matrix with vector-element xi, the observed values of the scale model's independent variables at the ith subpopulation.

fijs

The frequency weight for the sth observation which belongs to the cell corresponding to Y=j at subpopulation i.

nij

The sum of frequency weights of the observations that belong to the cell corresponding to Y=j at subpopulation i.

rij

The cumulative total up to and including Y=j at subpopulation i.

ni

The marginal frequency of subpopulation i.

n

The sum of all frequency weights.

πij

The cell probability corresponding to Y=j at subpopulation i.

γij

The cumulative response probability up to and including Y=j at subpopulation i.

θ

(J−1)×1 vector of threshold parameters in the location part of the model.

β

p×1 vector of location parameters in the location part of the model.

τ

q×1 vector of scale parameters in the scale part of the model.

B=(θT,βT,τT)T

The {(J−1) + p + q}×1 vector of unknown parameters in the general model.

^
B
=(
^
θ
T ,
^
β
T ,
^
τ
T ) T

The {(J−1) + p + q}×1 vector of maximum likelihood estimates of the parameters in the general model.

B=(θT,β T ) T

The {(J−1) + p}×1 vector of maximum likelihood estimates of the parameters in the location-only model.

^
γ
ij

The cumulative response probability estimate based on the maximum likelihood estimate
^
B
in the general model.

γij

The cumulative response probability estimate based on the maximum likelihood estimate B in the location-only model.

^
π
ij

The cell response probability estimate based on the maximum likelihood estimate
^
B
in the general model.

πij

The cell response probability estimate based on the maximum likelihood estimate B in the location-only model.

^
e

Number of non-redundant parameters in the general model. If all parameters are non-redundant,
^
e
= (J−1) + p + q.

e

Number of non-redundant parameters in the location-only model. If all parameters are non-redundant, e = (J−1) + p.

Related Topics

PLUM Algorithms
Data Aggregation (ordinal regression algorithms)
Data Assumptions (ordinal regression algorithms)
Model (ordinal regression algorithms)
Log-likelihood Function (ordinal regression algorithms)
Parameter Estimation (ordinal regression algorithms)
Statistics (ordinal regression algorithms)
Linear Hypothesis Testing (ordinal regression algorithms)
References (ordinal regression algorithms)


Data Aggregation (ordinal regression algorithms)

Observations with negative or missing frequency weights are discarded. Observations are aggregated by the definition of subpopulations. Subpopulations are defined by the cross-classifications of either the set of independent variables specified in the command or the set of independent variables specified in the subpopulation command.

Let ni be the marginal count of subpopulation i,

ni=JΣj=1nij

If there is no observation for the cell of Y=j at subpopulation i, it is assumed that nij=0, provided that ni≠0. A non-negative scalar δc[0,1) may be added to any zero cell (i.e., cell with nij=0) if its marginal count ni is nonzero. The value of δ is zero by default.

Related Topics

PLUM Algorithms
Notation (ordinal regression algorithms)
Data Assumptions (ordinal regression algorithms)
Model (ordinal regression algorithms)
Log-likelihood Function (ordinal regression algorithms)
Parameter Estimation (ordinal regression algorithms)
Statistics (ordinal regression algorithms)
Linear Hypothesis Testing (ordinal regression algorithms)
References (ordinal regression algorithms)


Data Assumptions (ordinal regression algorithms)

Let (ni1,...,niJ) T be the J×1 vector of counts for the categories of Y at subpopulation. It is assumed that each (ni1,...,niJ) T is independently multinomial distributed with probability vector (πi1,...,πiJ) T of dimension J×1 and fixed total ni.

Related Topics

PLUM Algorithms
Notation (ordinal regression algorithms)
Data Aggregation (ordinal regression algorithms)
Model (ordinal regression algorithms)
Log-likelihood Function (ordinal regression algorithms)
Parameter Estimation (ordinal regression algorithms)
Statistics (ordinal regression algorithms)
Linear Hypothesis Testing (ordinal regression algorithms)
References (ordinal regression algorithms)


Model (ordinal regression algorithms)

ordinal regression algorithms,ordinal regression algorithms,ordinal regression algorithms
model,model,model

Let γij=Prob(Y≤j|xi) be the cumulative response probability for Y; that is,

γij=jΣl=1πil

for j = 1, …, J−1. Note that γiJ=1, hence only the first J−1 γ's are needed in the model.

Related Topics

PLUM Algorithms
Notation (ordinal regression algorithms)
Data Aggregation (ordinal regression algorithms)
Data Assumptions (ordinal regression algorithms)
Log-likelihood Function (ordinal regression algorithms)
Parameter Estimation (ordinal regression algorithms)
Statistics (ordinal regression algorithms)
Linear Hypothesis Testing (ordinal regression algorithms)
References (ordinal regression algorithms)
General Model (ordinal regression algorithms)
Location-Only Model (ordinal regression algorithms)


General Model (ordinal regression algorithms)

The general model is given by

ηij = θj− b T xiσ(zi)

where

ηij = link( γij)

Possible link functions are

link( γ ) = {
log(γ1−γ) | Logit link
log(−log(1−γ)) | Complementary log-log link
−log(−log(γ)) | Negative Log-log link
Φ−1(γ) | Probit link
tan(π(γ−0.5)) | Cauchit (Inverse Cauchy) link

The numerator in the right hand side of the general model specifies the location of the model, θj− b T xi. In the location part of the model, θ is the vector of thresholds. Values of the thresholds are subject to a monotonicity property θ1≤...≤θJ−1. β is the vector of location parameters.

The denominator is the scale part of the model, σ(z). Possible forms are:

σ(z)={
1 | if unity scale is assumed
exp(τ T z) | if non-constant scale is assumed

τ is the vector of scale parameters.

Related Topics

Model (ordinal regression algorithms)
Location-Only Model (ordinal regression algorithms)


Location-Only Model (ordinal regression algorithms)

If unity scale is assumed, then the general model is said to reduce to the location-only model. The parameter B reduces to B=(θT,βT)T.

Related Topics

Model (ordinal regression algorithms)
General Model (ordinal regression algorithms)


Log-likelihood Function (ordinal regression algorithms)

ordinal regression algorithms,ordinal regression algorithms,ordinal regression algorithms
log-likelihood function,log-likelihood function,log-likelihood function

The log-likelihood of the model is

l=mΣi=1J−1Σj=1rijij−ri(j+1)g(ij)

where

rij=jΣk=1nk

and

ij=log(γijγi j+1−γij)

and

g()= log (1+ exp ())= log (γi j+1γi j+1−γij)

Note: a constant term c=Σmi=1log{ni!/(ni1!...niJ!)} which is independent of the unknown parameters has been excluded here. Thus, l is in fact the kernel of the true log-likelihood function.

Related Topics

PLUM Algorithms
Notation (ordinal regression algorithms)
Data Aggregation (ordinal regression algorithms)
Data Assumptions (ordinal regression algorithms)
Model (ordinal regression algorithms)
Parameter Estimation (ordinal regression algorithms)
Statistics (ordinal regression algorithms)
Linear Hypothesis Testing (ordinal regression algorithms)
References (ordinal regression algorithms)
Derivatives of the Log-likelihood Function (ordinal regression algorithms)
First Derivative (ordinal regression algorithms)
Second Derivative (ordinal regression algorithms)
Expectation of the Second Derivative (ordinal regression algorithms)


Derivatives of the Log-likelihood Function (ordinal regression algorithms)

The derivatives of the log-likelihood function are used in the iterative parameter estimation algorithm.

Related Topics

Log-likelihood Function (ordinal regression algorithms)
First Derivative (ordinal regression algorithms)
Second Derivative (ordinal regression algorithms)
Expectation of the Second Derivative (ordinal regression algorithms)


First Derivative (ordinal regression algorithms)

The first derivative of l with respect to Bk,k=1,...,(J−1)+p+q, is

∂l∂Bk=mΣi=1J−1Σj=1∂li∂ijUijQijk

where

∂li∂ij=rij−ri(j+1)γijγi j+1

Uij=γi j+1γij(γi j+1−γij)

and

Qij=Pijk∂γij∂ηij−Pi j+1 kγijγi j+1∂γi j+1∂ηi j+1

where

Pijk=∂ηij∂Bk={
δjkexp( T zi) | if 1≤k≤(J−1)
−xi [k−(J−1)]exp( T zi) | if (J−1)+1≤k≤(J−1)+p
−zi [k−{(J−1)+p}]ηij | if (J−1)+p+1≤k≤(J−1)+p+q

δjk=1 if j = k, 0 otherwise, and PjJk=0. For i = 1, …, m, j = 1, …, J−1,

∂γij∂ηij={
γij(1−γij) | Logit link
−(1−γij)log(1−γij) | Complementary log-log link
−γijlog(γij) | Negative Log-log link
φ(Φ−1(γij)) | Probit link
cos 2 (π(γij−0.5))/π | Cauchit link

and ∂γiJ/∂ηiJ=0.

Related Topics

Log-likelihood Function (ordinal regression algorithms)
Derivatives of the Log-likelihood Function (ordinal regression algorithms)
Second Derivative (ordinal regression algorithms)
Expectation of the Second Derivative (ordinal regression algorithms)


Second Derivative (ordinal regression algorithms)

The second derivative is

∂2l∂Bs∂Bk=mΣi=1J−1Σj=1(∂2li∂Bs∂ijUijQijk+∂li∂ij∂Uij∂BsQijk+∂li∂ijUij∂Qijk∂Bs)

for s, k = 1, …, (J – 1) + p + q. The first term of the equation is

∂2li∂Bs∂ijUijQijk=−ri j+1γi j+1UijQijsQijk

The second term is

∂li∂ij∂Uij∂BsQijk=−(rij−ri j+1γijγi j+1)(1γ2ijUijQijs+1(γi j+1−γij)2(Ui j+1Qi j+1 s−UijQijs))Qijk

To calculate the third term, notice that

∂Qijk∂Bs= | ∂Pijk∂Bs∂γij∂ηij+Pijk∂2γij∂Bs∂ηij−∂Pi j+1 k∂Bsγijγi j+1∂γi j+1∂ηi j+1
 | −Pi j+1 kQijsγi j+1∂γi j+1∂ηi j+1−Pi j+1 lγijγi j+1∂2γi j+1∂Bs∂ηi j+1

where

∂Pk∂Bs={
0 | 1≤k≤(J−1)+p and 1≤s≤(J−1)+p
−zi [s−{(J−1)+p}]Pijk | 1≤k≤(J−1)+p and (J−1)+p+1≤s≤(J−1)+p+q
−zi [k−{(J−1)+p}]Pijs | (J−1)+p+1≤k≤(J−1)+p+q

and ∂PiJk/∂Bs=0. Moreover,

∂2γij∂Bs∂ηij=Rij∂γij∂ηijPijs

and ∂2γiJ/∂Bs∂ηiJ=0. Rij has the following form:

Rij={
1−2γij | Logit link
1+log(1−γij) | Complementary log-log link
−(1+logγij) | Negative Log-log link
−φ(Φ−1(γij))Φ−1(γij) | Probit link
sin(2πγij) | Cauchit link

The third term can be calculated by applying these equations.

Related Topics

Log-likelihood Function (ordinal regression algorithms)
Derivatives of the Log-likelihood Function (ordinal regression algorithms)
First Derivative (ordinal regression algorithms)
Expectation of the Second Derivative (ordinal regression algorithms)


Expectation of the Second Derivative (ordinal regression algorithms)

For s, k = 1, …, (J – 1) + p + q.

E (∂2l∂Bs∂Bk) | = | mΣi=1J−1Σj=1 E (∂2li∂Bs∂ijUijQijk)
 | = | mΣi=1J−1Σj=1 E (−ri j+1γi j+1UijQijsQijk)
 | = | −mΣi=1niJ−1Σj=1UijQijsQijk

Related Topics

Log-likelihood Function (ordinal regression algorithms)
Derivatives of the Log-likelihood Function (ordinal regression algorithms)
First Derivative (ordinal regression algorithms)
Second Derivative (ordinal regression algorithms)


Parameter Estimation (ordinal regression algorithms)

ordinal regression algorithms,ordinal regression algorithms,ordinal regression algorithms
parameter estimation,parameter estimation,parameter estimation

Further details of parameter estimation are described here.

Related Topics

PLUM Algorithms
Notation (ordinal regression algorithms)
Data Aggregation (ordinal regression algorithms)
Data Assumptions (ordinal regression algorithms)
Model (ordinal regression algorithms)
Log-likelihood Function (ordinal regression algorithms)
Statistics (ordinal regression algorithms)
Linear Hypothesis Testing (ordinal regression algorithms)
References (ordinal regression algorithms)
Maximum Likelihood Estimate (ordinal regression algorithms)
Stepping (ordinal regression algorithms)
Starting Values of the Parameters (ordinal regression algorithms)
Ordinal Adjustments for the Threshold Parameters (ordinal regression algorithms)
Convergence Criteria (ordinal regression algorithms)


Maximum Likelihood Estimate (ordinal regression algorithms)

To obtain the maximum likelihood estimate of B, a Fisher Scoring iterative estimation method or Newton-Raphson iterative estimation method can be used. Let B(t) be the parameter vector at iteration t and ∂l/∂B(t) be a vector of the first derivatives of l evaluated at B=B(t). Moreover, let A(t) be a {(J−1)+p+q}×{(J−1)+p+q} matrix such that

[A(t)]sk={
−∂2l∂Bs∂Bk|B=B(t) | Newton-Raphson approach
− E (∂2l∂Bs∂Bk)|B=B(t) | Fisher Scoring approach

For a location-only model, the corresponding formulas use the first (J−1)+p elements of ∂l/∂B(t) and the upper {(J−1)+p}×{(J−1)+p} submatrix of A(t).

The parameter vector B at iteration t+1 is updated by B(t+1) where

A(t)B(t+1)=A(t)B(t)+ξ∂l∂B(t)

and ξ>0 is a stepping scalar such that l(B(t+1))−l(B(t))≥0.

Related Topics

Parameter Estimation (ordinal regression algorithms)
Stepping (ordinal regression algorithms)
Starting Values of the Parameters (ordinal regression algorithms)
Ordinal Adjustments for the Threshold Parameters (ordinal regression algorithms)
Convergence Criteria (ordinal regression algorithms)


Stepping (ordinal regression algorithms)

Use the step-halving method if l(B(t+1))−l(B(t))<0. Let V be the maximum number of steps in step-halving; then the set of values of ξ is {1/2v: v = 0, …, V−1}.

Related Topics

Parameter Estimation (ordinal regression algorithms)
Maximum Likelihood Estimate (ordinal regression algorithms)
Starting Values of the Parameters (ordinal regression algorithms)
Ordinal Adjustments for the Threshold Parameters (ordinal regression algorithms)
Convergence Criteria (ordinal regression algorithms)


Starting Values of the Parameters (ordinal regression algorithms)

Location-Only Model

If a location-only model is specified, set B(0)=( q (0) T ,0 T ) T where

θ(0)j= link (mΣi=1jΣk=1nikmΣi=1ni)

for j = 1, …, J−1.

General Model

If a general model is specified, first ignore the scale part; that is, by assuming that τ = 0 and treating the model as if it is a location-only model, and use B(0)=( q (0) T ,0 T ) T as the starting value to obtain the maximum likelihood estimate B. After B is obtained, find the maximum likelihood estimate
^
B
of the general model by starting at (θ T ,β T ,0 T ) T .

The above practice is essentially the same as taking B(0)=( q (0) T ,0 T ,0 T ) T . The advantage is that the maximum likelihood estimate B can be obtained in the process of finding
^
B
.

Related Topics

Parameter Estimation (ordinal regression algorithms)
Maximum Likelihood Estimate (ordinal regression algorithms)
Stepping (ordinal regression algorithms)
Ordinal Adjustments for the Threshold Parameters (ordinal regression algorithms)
Convergence Criteria (ordinal regression algorithms)


Ordinal Adjustments for the Threshold Parameters (ordinal regression algorithms)

If the monotonicity property θ1≤...≤θJ−1 is not preserved at the end of any iteration, an ad hoc adjustment will be taken before the next iteration starts. If θ(t)j>θ(t)j+1 for some j, then both θ(t)j and θ(t)j+1 are set to (θ(t)j+θ(t)j+1)/2 before the next iteration. This value is then compared with θ(t)j+2 and so on.

Related Topics

Parameter Estimation (ordinal regression algorithms)
Maximum Likelihood Estimate (ordinal regression algorithms)
Stepping (ordinal regression algorithms)
Starting Values of the Parameters (ordinal regression algorithms)
Convergence Criteria (ordinal regression algorithms)


Convergence Criteria (ordinal regression algorithms)

Given convergence criteria εk>0 and εp>0, the iteration is considered to be converged if one of the following criteria are satisfied:

|l(B(t+1))−l(B(t))|<εk

max
i
|B(t+1)i−Bti|<εp

Related Topics

Parameter Estimation (ordinal regression algorithms)
Maximum Likelihood Estimate (ordinal regression algorithms)
Stepping (ordinal regression algorithms)
Starting Values of the Parameters (ordinal regression algorithms)
Ordinal Adjustments for the Threshold Parameters (ordinal regression algorithms)


Statistics (ordinal regression algorithms)

ordinal regression algorithms,ordinal regression algorithms,ordinal regression algorithms
output statistics,output statistics,output statistics

The following statistics are available.

Related Topics

PLUM Algorithms
Notation (ordinal regression algorithms)
Data Aggregation (ordinal regression algorithms)
Data Assumptions (ordinal regression algorithms)
Model (ordinal regression algorithms)
Log-likelihood Function (ordinal regression algorithms)
Parameter Estimation (ordinal regression algorithms)
Linear Hypothesis Testing (ordinal regression algorithms)
References (ordinal regression algorithms)
Model Information (ordinal regression algorithms)
Final Model, General (ordinal regression algorithms)
Final Model, Location-Only (ordinal regression algorithms)
Initial Model, Intercept-Only (ordinal regression algorithms)
Model Chi-Square (ordinal regression algorithms)
General Model versus Intercept-Only Model (ordinal regression algorithms)
Location-Only Model versus Intercept-Only Model (ordinal regression algorithms)
General Model versus Location-Only Model (ordinal regression algorithms)
Likelihood Ratio Test for Equal Slopes Assumption (ordinal regression algorithms)
Pseudo R-Squares (ordinal regression algorithms)
Cox and Snell's R-Square (ordinal regression algorithms)
Nagelkerke's R-Square (ordinal regression algorithms)
McFadden's R-Square (ordinal regression algorithms)
Predicted Cell Counts (ordinal regression algorithms)
Predicted Cumulative Totals (ordinal regression algorithms)
Goodness of Fit Measures (ordinal regression algorithms)
Pearson Goodness of Fit Measure (ordinal regression algorithms)
Deviance Goodness of Fit Measure (ordinal regression algorithms)
Covariance and Correlation Matrices (ordinal regression algorithms)
Parameter Statistics (ordinal regression algorithms)


Model Information (ordinal regression algorithms)

The model information is the –2 log-likelihood of the model, computed for a given vector of parameter estimates.

Related Topics

Statistics (ordinal regression algorithms)
Final Model, General (ordinal regression algorithms)
Final Model, Location-Only (ordinal regression algorithms)
Initial Model, Intercept-Only (ordinal regression algorithms)
Model Chi-Square (ordinal regression algorithms)
General Model versus Intercept-Only Model (ordinal regression algorithms)
Location-Only Model versus Intercept-Only Model (ordinal regression algorithms)
General Model versus Location-Only Model (ordinal regression algorithms)
Likelihood Ratio Test for Equal Slopes Assumption (ordinal regression algorithms)
Pseudo R-Squares (ordinal regression algorithms)
Cox and Snell's R-Square (ordinal regression algorithms)
Nagelkerke's R-Square (ordinal regression algorithms)
McFadden's R-Square (ordinal regression algorithms)
Predicted Cell Counts (ordinal regression algorithms)
Predicted Cumulative Totals (ordinal regression algorithms)
Goodness of Fit Measures (ordinal regression algorithms)
Pearson Goodness of Fit Measure (ordinal regression algorithms)
Deviance Goodness of Fit Measure (ordinal regression algorithms)
Covariance and Correlation Matrices (ordinal regression algorithms)
Parameter Statistics (ordinal regression algorithms)


Final Model, General (ordinal regression algorithms)

The value of –2 log-likelihood of the model is given by

−2l(
^
B
)

where l(
^
B
) is the value of the log-likelihood evaluated at
^
B
.

Related Topics

Statistics (ordinal regression algorithms)
Model Information (ordinal regression algorithms)
Final Model, Location-Only (ordinal regression algorithms)
Initial Model, Intercept-Only (ordinal regression algorithms)
Model Chi-Square (ordinal regression algorithms)
General Model versus Intercept-Only Model (ordinal regression algorithms)
Location-Only Model versus Intercept-Only Model (ordinal regression algorithms)
General Model versus Location-Only Model (ordinal regression algorithms)
Likelihood Ratio Test for Equal Slopes Assumption (ordinal regression algorithms)
Pseudo R-Squares (ordinal regression algorithms)
Cox and Snell's R-Square (ordinal regression algorithms)
Nagelkerke's R-Square (ordinal regression algorithms)
McFadden's R-Square (ordinal regression algorithms)
Predicted Cell Counts (ordinal regression algorithms)
Predicted Cumulative Totals (ordinal regression algorithms)
Goodness of Fit Measures (ordinal regression algorithms)
Pearson Goodness of Fit Measure (ordinal regression algorithms)
Deviance Goodness of Fit Measure (ordinal regression algorithms)
Covariance and Correlation Matrices (ordinal regression algorithms)
Parameter Statistics (ordinal regression algorithms)


Final Model, Location-Only (ordinal regression algorithms)

If unity scale is assumed, the general model reduces to the location-only model. The value of –2 log-likelihood of the model is given by

−2l(B)

Related Topics

Statistics (ordinal regression algorithms)
Model Information (ordinal regression algorithms)
Final Model, General (ordinal regression algorithms)
Initial Model, Intercept-Only (ordinal regression algorithms)
Model Chi-Square (ordinal regression algorithms)
General Model versus Intercept-Only Model (ordinal regression algorithms)
Location-Only Model versus Intercept-Only Model (ordinal regression algorithms)
General Model versus Location-Only Model (ordinal regression algorithms)
Likelihood Ratio Test for Equal Slopes Assumption (ordinal regression algorithms)
Pseudo R-Squares (ordinal regression algorithms)
Cox and Snell's R-Square (ordinal regression algorithms)
Nagelkerke's R-Square (ordinal regression algorithms)
McFadden's R-Square (ordinal regression algorithms)
Predicted Cell Counts (ordinal regression algorithms)
Predicted Cumulative Totals (ordinal regression algorithms)
Goodness of Fit Measures (ordinal regression algorithms)
Pearson Goodness of Fit Measure (ordinal regression algorithms)
Deviance Goodness of Fit Measure (ordinal regression algorithms)
Covariance and Correlation Matrices (ordinal regression algorithms)
Parameter Statistics (ordinal regression algorithms)


Initial Model, Intercept-Only (ordinal regression algorithms)

In the initial model, when the intercepts are the only parameters in the model, the parameter vector is B(0)=( q (0) T ,0 T ,0 T ) T . The value of the –2 log-likelihood is

−2l(B(0))

Related Topics

Statistics (ordinal regression algorithms)
Model Information (ordinal regression algorithms)
Final Model, General (ordinal regression algorithms)
Final Model, Location-Only (ordinal regression algorithms)
Model Chi-Square (ordinal regression algorithms)
General Model versus Intercept-Only Model (ordinal regression algorithms)
Location-Only Model versus Intercept-Only Model (ordinal regression algorithms)
General Model versus Location-Only Model (ordinal regression algorithms)
Likelihood Ratio Test for Equal Slopes Assumption (ordinal regression algorithms)
Pseudo R-Squares (ordinal regression algorithms)
Cox and Snell's R-Square (ordinal regression algorithms)
Nagelkerke's R-Square (ordinal regression algorithms)
McFadden's R-Square (ordinal regression algorithms)
Predicted Cell Counts (ordinal regression algorithms)
Predicted Cumulative Totals (ordinal regression algorithms)
Goodness of Fit Measures (ordinal regression algorithms)
Pearson Goodness of Fit Measure (ordinal regression algorithms)
Deviance Goodness of Fit Measure (ordinal regression algorithms)
Covariance and Correlation Matrices (ordinal regression algorithms)
Parameter Statistics (ordinal regression algorithms)


Model Chi-Square (ordinal regression algorithms)

The value of the Model Chi-square statistic is given by the difference between any two nesting models of interest.

Related Topics

Statistics (ordinal regression algorithms)
Model Information (ordinal regression algorithms)
Final Model, General (ordinal regression algorithms)
Final Model, Location-Only (ordinal regression algorithms)
Initial Model, Intercept-Only (ordinal regression algorithms)
General Model versus Intercept-Only Model (ordinal regression algorithms)
Location-Only Model versus Intercept-Only Model (ordinal regression algorithms)
General Model versus Location-Only Model (ordinal regression algorithms)
Likelihood Ratio Test for Equal Slopes Assumption (ordinal regression algorithms)
Pseudo R-Squares (ordinal regression algorithms)
Cox and Snell's R-Square (ordinal regression algorithms)
Nagelkerke's R-Square (ordinal regression algorithms)
McFadden's R-Square (ordinal regression algorithms)
Predicted Cell Counts (ordinal regression algorithms)
Predicted Cumulative Totals (ordinal regression algorithms)
Goodness of Fit Measures (ordinal regression algorithms)
Pearson Goodness of Fit Measure (ordinal regression algorithms)
Deviance Goodness of Fit Measure (ordinal regression algorithms)
Covariance and Correlation Matrices (ordinal regression algorithms)
Parameter Statistics (ordinal regression algorithms)


General Model versus Intercept-Only Model (ordinal regression algorithms)

The following statistic is available when a general model is specified. The Model Chi-square statistic is given by

−2l(B(0))−2l(
^
B
)

Under that null hypothesis that H0: b =0 and t =0, the Model Chi-square is asymptotically chi-squared distributed with
^
e
– (J – 1) degrees of freedoms.

Related Topics

Statistics (ordinal regression algorithms)
Model Information (ordinal regression algorithms)
Final Model, General (ordinal regression algorithms)
Final Model, Location-Only (ordinal regression algorithms)
Initial Model, Intercept-Only (ordinal regression algorithms)
Model Chi-Square (ordinal regression algorithms)
Location-Only Model versus Intercept-Only Model (ordinal regression algorithms)
General Model versus Location-Only Model (ordinal regression algorithms)
Likelihood Ratio Test for Equal Slopes Assumption (ordinal regression algorithms)
Pseudo R-Squares (ordinal regression algorithms)
Cox and Snell's R-Square (ordinal regression algorithms)
Nagelkerke's R-Square (ordinal regression algorithms)
McFadden's R-Square (ordinal regression algorithms)
Predicted Cell Counts (ordinal regression algorithms)
Predicted Cumulative Totals (ordinal regression algorithms)
Goodness of Fit Measures (ordinal regression algorithms)
Pearson Goodness of Fit Measure (ordinal regression algorithms)
Deviance Goodness of Fit Measure (ordinal regression algorithms)
Covariance and Correlation Matrices (ordinal regression algorithms)
Parameter Statistics (ordinal regression algorithms)


Location-Only Model versus Intercept-Only Model (ordinal regression algorithms)

The following statistic is available when a location-only model is specified. The Model Chi-square statistic is given by

−2l(B(0))−2l(B)

Under that null hypothesis that H0: b =0, the Model Chi-square is asymptotically chi-squared distributed with e – (J – 1) degrees of freedoms.

Related Topics

Statistics (ordinal regression algorithms)
Model Information (ordinal regression algorithms)
Final Model, General (ordinal regression algorithms)
Final Model, Location-Only (ordinal regression algorithms)
Initial Model, Intercept-Only (ordinal regression algorithms)
Model Chi-Square (ordinal regression algorithms)
General Model versus Intercept-Only Model (ordinal regression algorithms)
General Model versus Location-Only Model (ordinal regression algorithms)
Likelihood Ratio Test for Equal Slopes Assumption (ordinal regression algorithms)
Pseudo R-Squares (ordinal regression algorithms)
Cox and Snell's R-Square (ordinal regression algorithms)
Nagelkerke's R-Square (ordinal regression algorithms)
McFadden's R-Square (ordinal regression algorithms)
Predicted Cell Counts (ordinal regression algorithms)
Predicted Cumulative Totals (ordinal regression algorithms)
Goodness of Fit Measures (ordinal regression algorithms)
Pearson Goodness of Fit Measure (ordinal regression algorithms)
Deviance Goodness of Fit Measure (ordinal regression algorithms)
Covariance and Correlation Matrices (ordinal regression algorithms)
Parameter Statistics (ordinal regression algorithms)


General Model versus Location-Only Model (ordinal regression algorithms)

The following statistic is available when a general model is specified. The Model Chi-square statistic is given by

−2l(B)−2l(
^
B
)

Under that null hypothesis that H0: t =0, the Model Chi-square is asymptotically chi-squared distributed with
^
e
– e degrees of freedoms.

Related Topics

Statistics (ordinal regression algorithms)
Model Information (ordinal regression algorithms)
Final Model, General (ordinal regression algorithms)
Final Model, Location-Only (ordinal regression algorithms)
Initial Model, Intercept-Only (ordinal regression algorithms)
Model Chi-Square (ordinal regression algorithms)
General Model versus Intercept-Only Model (ordinal regression algorithms)
Location-Only Model versus Intercept-Only Model (ordinal regression algorithms)
Likelihood Ratio Test for Equal Slopes Assumption (ordinal regression algorithms)
Pseudo R-Squares (ordinal regression algorithms)
Cox and Snell's R-Square (ordinal regression algorithms)
Nagelkerke's R-Square (ordinal regression algorithms)
McFadden's R-Square (ordinal regression algorithms)
Predicted Cell Counts (ordinal regression algorithms)
Predicted Cumulative Totals (ordinal regression algorithms)
Goodness of Fit Measures (ordinal regression algorithms)
Pearson Goodness of Fit Measure (ordinal regression algorithms)
Deviance Goodness of Fit Measure (ordinal regression algorithms)
Covariance and Correlation Matrices (ordinal regression algorithms)
Parameter Statistics (ordinal regression algorithms)


Likelihood Ratio Test for Equal Slopes Assumption (ordinal regression algorithms)

parallelism test,parallelism test,parallelism test
ordinal regression algorithms,ordinal regression algorithms,ordinal regression algorithms

For location-only model, a likelihood ratio test of parallel lines in the location is performed. If the regression lines are not parallel, the location can be specified as

ηij=θj− b jxi

for j = 1, …, J−1. That is, the location parameters b j (or slopes) vary with the levels of the response. The parameter for the above “non-parallel” location-only model is B=( q T , b T j,..., b T J−1) T which is of dimension {(J−1)+(J−1)p}×1. The first derivative ∂l/∂B of the log-likelihood is the same as in the “parallel” model, except that Pijk=∂ηij/∂Bk is replaced by the following:

Pijk=∂ηij∂Bk={
δjk | 1≤k≤(J−1)
−xi [k−{(J−1)+sp}] | (J−1)+sp≤k≤(J−1)+sp+p, s=1,...,(J−2)

Similarly, the expected value of the second derivative is the same as in the parallel model, except that the Pijk is replaced by the above equation.

To test the null hypothesis of parallelism H0: b 1=...= b J−1, find the maximum likelihood estimate B of the parallel location-only model and the maximum likelihood estimate B of the non-parallel model. The Model Chi-square statistic is given by

−2l(B)−2l(B)

Under the null hypothesis, the Model Chi-square statistic is asymptotically chi-squared distributed with (k−2)p degrees of freedoms.

Related Topics

Statistics (ordinal regression algorithms)
Model Information (ordinal regression algorithms)
Final Model, General (ordinal regression algorithms)
Final Model, Location-Only (ordinal regression algorithms)
Initial Model, Intercept-Only (ordinal regression algorithms)
Model Chi-Square (ordinal regression algorithms)
General Model versus Intercept-Only Model (ordinal regression algorithms)
Location-Only Model versus Intercept-Only Model (ordinal regression algorithms)
General Model versus Location-Only Model (ordinal regression algorithms)
Pseudo R-Squares (ordinal regression algorithms)
Cox and Snell's R-Square (ordinal regression algorithms)
Nagelkerke's R-Square (ordinal regression algorithms)
McFadden's R-Square (ordinal regression algorithms)
Predicted Cell Counts (ordinal regression algorithms)
Predicted Cumulative Totals (ordinal regression algorithms)
Goodness of Fit Measures (ordinal regression algorithms)
Pearson Goodness of Fit Measure (ordinal regression algorithms)
Deviance Goodness of Fit Measure (ordinal regression algorithms)
Covariance and Correlation Matrices (ordinal regression algorithms)
Parameter Statistics (ordinal regression algorithms)


Pseudo R-Squares (ordinal regression algorithms)

Replace
^
B
by B for a location-only model in the equations below.

Related Topics

Statistics (ordinal regression algorithms)
Model Information (ordinal regression algorithms)
Final Model, General (ordinal regression algorithms)
Final Model, Location-Only (ordinal regression algorithms)
Initial Model, Intercept-Only (ordinal regression algorithms)
Model Chi-Square (ordinal regression algorithms)
General Model versus Intercept-Only Model (ordinal regression algorithms)
Location-Only Model versus Intercept-Only Model (ordinal regression algorithms)
General Model versus Location-Only Model (ordinal regression algorithms)
Likelihood Ratio Test for Equal Slopes Assumption (ordinal regression algorithms)
Cox and Snell's R-Square (ordinal regression algorithms)
Nagelkerke's R-Square (ordinal regression algorithms)
McFadden's R-Square (ordinal regression algorithms)
Predicted Cell Counts (ordinal regression algorithms)
Predicted Cumulative Totals (ordinal regression algorithms)
Goodness of Fit Measures (ordinal regression algorithms)
Pearson Goodness of Fit Measure (ordinal regression algorithms)
Deviance Goodness of Fit Measure (ordinal regression algorithms)
Covariance and Correlation Matrices (ordinal regression algorithms)
Parameter Statistics (ordinal regression algorithms)


Cox and Snell's R-Square (ordinal regression algorithms)

Cox and Snell R-square,Cox and Snell R-square,Cox and Snell R-square
ordinal regression algorithms,ordinal regression algorithms,ordinal regression algorithms

R2 CS =1−(L(B(0))L(
^
B
))2n

Related Topics

Statistics (ordinal regression algorithms)
Model Information (ordinal regression algorithms)
Final Model, General (ordinal regression algorithms)
Final Model, Location-Only (ordinal regression algorithms)
Initial Model, Intercept-Only (ordinal regression algorithms)
Model Chi-Square (ordinal regression algorithms)
General Model versus Intercept-Only Model (ordinal regression algorithms)
Location-Only Model versus Intercept-Only Model (ordinal regression algorithms)
General Model versus Location-Only Model (ordinal regression algorithms)
Likelihood Ratio Test for Equal Slopes Assumption (ordinal regression algorithms)
Pseudo R-Squares (ordinal regression algorithms)
Nagelkerke's R-Square (ordinal regression algorithms)
McFadden's R-Square (ordinal regression algorithms)
Predicted Cell Counts (ordinal regression algorithms)
Predicted Cumulative Totals (ordinal regression algorithms)
Goodness of Fit Measures (ordinal regression algorithms)
Pearson Goodness of Fit Measure (ordinal regression algorithms)
Deviance Goodness of Fit Measure (ordinal regression algorithms)
Covariance and Correlation Matrices (ordinal regression algorithms)
Parameter Statistics (ordinal regression algorithms)


Nagelkerke's R-Square (ordinal regression algorithms)

Nagelkerke R-Square,Nagelkerke R-Square,Nagelkerke R-Square
ordinal regression algorithms,ordinal regression algorithms,ordinal regression algorithms

R2 N =R2 CS 1−L(B(0))2/n

Related Topics

Statistics (ordinal regression algorithms)
Model Information (ordinal regression algorithms)
Final Model, General (ordinal regression algorithms)
Final Model, Location-Only (ordinal regression algorithms)
Initial Model, Intercept-Only (ordinal regression algorithms)
Model Chi-Square (ordinal regression algorithms)
General Model versus Intercept-Only Model (ordinal regression algorithms)
Location-Only Model versus Intercept-Only Model (ordinal regression algorithms)
General Model versus Location-Only Model (ordinal regression algorithms)
Likelihood Ratio Test for Equal Slopes Assumption (ordinal regression algorithms)
Pseudo R-Squares (ordinal regression algorithms)
Cox and Snell's R-Square (ordinal regression algorithms)
McFadden's R-Square (ordinal regression algorithms)
Predicted Cell Counts (ordinal regression algorithms)
Predicted Cumulative Totals (ordinal regression algorithms)
Goodness of Fit Measures (ordinal regression algorithms)
Pearson Goodness of Fit Measure (ordinal regression algorithms)
Deviance Goodness of Fit Measure (ordinal regression algorithms)
Covariance and Correlation Matrices (ordinal regression algorithms)
Parameter Statistics (ordinal regression algorithms)


McFadden's R-Square (ordinal regression algorithms)

McFadden R-square,McFadden R-square,McFadden R-square
ordinal regression algorithms,ordinal regression algorithms,ordinal regression algorithms

R2 M =1−(l(
^
B
)l(B(0)))

Related Topics

Statistics (ordinal regression algorithms)
Model Information (ordinal regression algorithms)
Final Model, General (ordinal regression algorithms)
Final Model, Location-Only (ordinal regression algorithms)
Initial Model, Intercept-Only (ordinal regression algorithms)
Model Chi-Square (ordinal regression algorithms)
General Model versus Intercept-Only Model (ordinal regression algorithms)
Location-Only Model versus Intercept-Only Model (ordinal regression algorithms)
General Model versus Location-Only Model (ordinal regression algorithms)
Likelihood Ratio Test for Equal Slopes Assumption (ordinal regression algorithms)
Pseudo R-Squares (ordinal regression algorithms)
Cox and Snell's R-Square (ordinal regression algorithms)
Nagelkerke's R-Square (ordinal regression algorithms)
Predicted Cell Counts (ordinal regression algorithms)
Predicted Cumulative Totals (ordinal regression algorithms)
Goodness of Fit Measures (ordinal regression algorithms)
Pearson Goodness of Fit Measure (ordinal regression algorithms)
Deviance Goodness of Fit Measure (ordinal regression algorithms)
Covariance and Correlation Matrices (ordinal regression algorithms)
Parameter Statistics (ordinal regression algorithms)


Predicted Cell Counts (ordinal regression algorithms)

The estimated cell response probability based on the maximum likelihood estimate for the general model is

^
π
ij={
^
γ
i1 		j=1
^
γ
ij−
^
γ
i j−1 		j=2,...,J−1
1−
^
γ
i J−1 		j=J

At each subpopulation i, the predicted count for response category Y=j is

^
n
ij=ni
^
π
ij

The (raw) residual is nij−
^
n
ij and the standardized residual is (nij−
^
n
ij)/
√ ni
^
π
ij(1−
^
π
ij)
.

Replace
^
γ
ij by γij,
^
π
ij by πij, and
^
n
ij by nij for a location-only model.

Related Topics

Statistics (ordinal regression algorithms)
Model Information (ordinal regression algorithms)
Final Model, General (ordinal regression algorithms)
Final Model, Location-Only (ordinal regression algorithms)
Initial Model, Intercept-Only (ordinal regression algorithms)
Model Chi-Square (ordinal regression algorithms)
General Model versus Intercept-Only Model (ordinal regression algorithms)
Location-Only Model versus Intercept-Only Model (ordinal regression algorithms)
General Model versus Location-Only Model (ordinal regression algorithms)
Likelihood Ratio Test for Equal Slopes Assumption (ordinal regression algorithms)
Pseudo R-Squares (ordinal regression algorithms)
Cox and Snell's R-Square (ordinal regression algorithms)
Nagelkerke's R-Square (ordinal regression algorithms)
McFadden's R-Square (ordinal regression algorithms)
Predicted Cumulative Totals (ordinal regression algorithms)
Goodness of Fit Measures (ordinal regression algorithms)
Pearson Goodness of Fit Measure (ordinal regression algorithms)
Deviance Goodness of Fit Measure (ordinal regression algorithms)
Covariance and Correlation Matrices (ordinal regression algorithms)
Parameter Statistics (ordinal regression algorithms)


Predicted Cumulative Totals (ordinal regression algorithms)

The predicted cumulative total up to and including Y=j is

^
r
ij=ni
^
γ
ij

The (raw) residual is rij−
^
r
ij and the standardized residual is (rij−
^
r
ij)/
√ ni
^
γ
ij(1−
^
γ
ij)
.

Replace
^
γ
ij by γij and
^
r
ij by rij for a location-only model.

Related Topics

Statistics (ordinal regression algorithms)
Model Information (ordinal regression algorithms)
Final Model, General (ordinal regression algorithms)
Final Model, Location-Only (ordinal regression algorithms)
Initial Model, Intercept-Only (ordinal regression algorithms)
Model Chi-Square (ordinal regression algorithms)
General Model versus Intercept-Only Model (ordinal regression algorithms)
Location-Only Model versus Intercept-Only Model (ordinal regression algorithms)
General Model versus Location-Only Model (ordinal regression algorithms)
Likelihood Ratio Test for Equal Slopes Assumption (ordinal regression algorithms)
Pseudo R-Squares (ordinal regression algorithms)
Cox and Snell's R-Square (ordinal regression algorithms)
Nagelkerke's R-Square (ordinal regression algorithms)
McFadden's R-Square (ordinal regression algorithms)
Predicted Cell Counts (ordinal regression algorithms)
Goodness of Fit Measures (ordinal regression algorithms)
Pearson Goodness of Fit Measure (ordinal regression algorithms)
Deviance Goodness of Fit Measure (ordinal regression algorithms)
Covariance and Correlation Matrices (ordinal regression algorithms)
Parameter Statistics (ordinal regression algorithms)


Goodness of Fit Measures (ordinal regression algorithms)

These are chi-square statistics used to test whether the model adequately fits the data.

Related Topics

Statistics (ordinal regression algorithms)
Model Information (ordinal regression algorithms)
Final Model, General (ordinal regression algorithms)
Final Model, Location-Only (ordinal regression algorithms)
Initial Model, Intercept-Only (ordinal regression algorithms)
Model Chi-Square (ordinal regression algorithms)
General Model versus Intercept-Only Model (ordinal regression algorithms)
Location-Only Model versus Intercept-Only Model (ordinal regression algorithms)
General Model versus Location-Only Model (ordinal regression algorithms)
Likelihood Ratio Test for Equal Slopes Assumption (ordinal regression algorithms)
Pseudo R-Squares (ordinal regression algorithms)
Cox and Snell's R-Square (ordinal regression algorithms)
Nagelkerke's R-Square (ordinal regression algorithms)
McFadden's R-Square (ordinal regression algorithms)
Predicted Cell Counts (ordinal regression algorithms)
Predicted Cumulative Totals (ordinal regression algorithms)
Pearson Goodness of Fit Measure (ordinal regression algorithms)
Deviance Goodness of Fit Measure (ordinal regression algorithms)
Covariance and Correlation Matrices (ordinal regression algorithms)
Parameter Statistics (ordinal regression algorithms)


Pearson Goodness of Fit Measure (ordinal regression algorithms)

Pearson chi-square,Pearson chi-square,Pearson chi-square
ordinal regression algorithms,ordinal regression algorithms,ordinal regression algorithms

The Pearson goodness of fit measure for a general model is

X2=mΣi=1JΣj=1(nij−ni
^
π
ij)2ni
^
π
ij

Under the null hypothesis, the Pearson goodness-of-fit statistic is asymptotically chi-squared distributed with m(J – 1) –
^
e
degrees of freedom.

Replace
^
π
ij by πij and
^
e
by e for a location-only model.

Related Topics

Statistics (ordinal regression algorithms)
Model Information (ordinal regression algorithms)
Final Model, General (ordinal regression algorithms)
Final Model, Location-Only (ordinal regression algorithms)
Initial Model, Intercept-Only (ordinal regression algorithms)
Model Chi-Square (ordinal regression algorithms)
General Model versus Intercept-Only Model (ordinal regression algorithms)
Location-Only Model versus Intercept-Only Model (ordinal regression algorithms)
General Model versus Location-Only Model (ordinal regression algorithms)
Likelihood Ratio Test for Equal Slopes Assumption (ordinal regression algorithms)
Pseudo R-Squares (ordinal regression algorithms)
Cox and Snell's R-Square (ordinal regression algorithms)
Nagelkerke's R-Square (ordinal regression algorithms)
McFadden's R-Square (ordinal regression algorithms)
Predicted Cell Counts (ordinal regression algorithms)
Predicted Cumulative Totals (ordinal regression algorithms)
Goodness of Fit Measures (ordinal regression algorithms)
Deviance Goodness of Fit Measure (ordinal regression algorithms)
Covariance and Correlation Matrices (ordinal regression algorithms)
Parameter Statistics (ordinal regression algorithms)


Deviance Goodness of Fit Measure (ordinal regression algorithms)

deviance,deviance,deviance
ordinal regression algorithms,ordinal regression algorithms,ordinal regression algorithms

The Deviance goodness of fit measure for a general model is

D=2mΣi=1JΣj=1nijlog(nijni
^
π
ij)

Under the null hypothesis, the Deviance goodness-of-fit statistic is asymptotically chi-squared distributed with m(J – 1) –
^
e
degrees of freedom.

Replace
^
π
ij by πij and
^
e
by e for a location-only model.

Related Topics

Statistics (ordinal regression algorithms)
Model Information (ordinal regression algorithms)
Final Model, General (ordinal regression algorithms)
Final Model, Location-Only (ordinal regression algorithms)
Initial Model, Intercept-Only (ordinal regression algorithms)
Model Chi-Square (ordinal regression algorithms)
General Model versus Intercept-Only Model (ordinal regression algorithms)
Location-Only Model versus Intercept-Only Model (ordinal regression algorithms)
General Model versus Location-Only Model (ordinal regression algorithms)
Likelihood Ratio Test for Equal Slopes Assumption (ordinal regression algorithms)
Pseudo R-Squares (ordinal regression algorithms)
Cox and Snell's R-Square (ordinal regression algorithms)
Nagelkerke's R-Square (ordinal regression algorithms)
McFadden's R-Square (ordinal regression algorithms)
Predicted Cell Counts (ordinal regression algorithms)
Predicted Cumulative Totals (ordinal regression algorithms)
Goodness of Fit Measures (ordinal regression algorithms)
Pearson Goodness of Fit Measure (ordinal regression algorithms)
Covariance and Correlation Matrices (ordinal regression algorithms)
Parameter Statistics (ordinal regression algorithms)


Covariance and Correlation Matrices (ordinal regression algorithms)

The estimate of the covariance matrix of
^
B
is

Cov (
^
B
)={
−∂2l∂B∂B|B=
^
B
Newton-Raphson method
− E (∂2l∂B∂B)|B=
^
B
Fisher Scoring method

Let be the {(J−1)+p+q}×1 vector of the square roots of the diagonal elements in Cov(
^
B
). The estimate of the correlation matrix of
^
B
is

Replace
^
B
by B and by (a {(J−1)+p}×1 vector) for a location-only model.

Related Topics

Statistics (ordinal regression algorithms)
Model Information (ordinal regression algorithms)
Final Model, General (ordinal regression algorithms)
Final Model, Location-Only (ordinal regression algorithms)
Initial Model, Intercept-Only (ordinal regression algorithms)
Model Chi-Square (ordinal regression algorithms)
General Model versus Intercept-Only Model (ordinal regression algorithms)
Location-Only Model versus Intercept-Only Model (ordinal regression algorithms)
General Model versus Location-Only Model (ordinal regression algorithms)
Likelihood Ratio Test for Equal Slopes Assumption (ordinal regression algorithms)
Pseudo R-Squares (ordinal regression algorithms)
Cox and Snell's R-Square (ordinal regression algorithms)
Nagelkerke's R-Square (ordinal regression algorithms)
McFadden's R-Square (ordinal regression algorithms)
Predicted Cell Counts (ordinal regression algorithms)
Predicted Cumulative Totals (ordinal regression algorithms)
Goodness of Fit Measures (ordinal regression algorithms)
Pearson Goodness of Fit Measure (ordinal regression algorithms)
Deviance Goodness of Fit Measure (ordinal regression algorithms)
Parameter Statistics (ordinal regression algorithms)


Parameter Statistics (ordinal regression algorithms)

An estimate of the standard deviation of
^
B
k is
^
σ
k. The Wald statistic for
^
B
k is

Wald k=
^
B
k
^
σ
k

Under the null hypothesis that H0:Bk=0, Wald k is asymptotically chi-squared distributed with 1 degree of freedom.

Based on the asymptotic normality of the parameter estimate, a 100(1−α) % Wald confidence interval for
^
B
k is

^
B
k±z1−α/2
^
σ
k

where z1−α/2 is the upper (1−α /2)100th percentile of the standard normal distribution.

Replace
^
B
k by Bk and
^
σ
k by σk for a location-only model.

Related Topics

Statistics (ordinal regression algorithms)
Model Information (ordinal regression algorithms)
Final Model, General (ordinal regression algorithms)
Final Model, Location-Only (ordinal regression algorithms)
Initial Model, Intercept-Only (ordinal regression algorithms)
Model Chi-Square (ordinal regression algorithms)
General Model versus Intercept-Only Model (ordinal regression algorithms)
Location-Only Model versus Intercept-Only Model (ordinal regression algorithms)
General Model versus Location-Only Model (ordinal regression algorithms)
Likelihood Ratio Test for Equal Slopes Assumption (ordinal regression algorithms)
Pseudo R-Squares (ordinal regression algorithms)
Cox and Snell's R-Square (ordinal regression algorithms)
Nagelkerke's R-Square (ordinal regression algorithms)
McFadden's R-Square (ordinal regression algorithms)
Predicted Cell Counts (ordinal regression algorithms)
Predicted Cumulative Totals (ordinal regression algorithms)
Goodness of Fit Measures (ordinal regression algorithms)
Pearson Goodness of Fit Measure (ordinal regression algorithms)
Deviance Goodness of Fit Measure (ordinal regression algorithms)
Covariance and Correlation Matrices (ordinal regression algorithms)


Linear Hypothesis Testing (ordinal regression algorithms)

ordinal regression algorithms,ordinal regression algorithms,ordinal regression algorithms
hypothesis testing,hypothesis testing,hypothesis testing

For a general model, let L be a matrix of coefficients for the linear hypotheses

H0:LB=c

where c is a k×1 vector of constants. The Wald statistic for H0 is

Wald (L,c)=(L
^
B
−c) T {L Cov (
^
B
)L T }−1(L
^
B
−c)

Under the null hypothesis, Wald (L,c) is asymptotically chi-squared distributed with l degrees of freedom, where l is the rank of L.

Replace
^
B
by B for a location-only model.

Related Topics

PLUM Algorithms
Notation (ordinal regression algorithms)
Data Aggregation (ordinal regression algorithms)
Data Assumptions (ordinal regression algorithms)
Model (ordinal regression algorithms)
Log-likelihood Function (ordinal regression algorithms)
Parameter Estimation (ordinal regression algorithms)
Statistics (ordinal regression algorithms)
References (ordinal regression algorithms)


References (ordinal regression algorithms)

ordinal regression algorithms,ordinal regression algorithms,ordinal regression algorithms
references,references,references

Cox, D. R. 1972. Regression models and life tables (with discussion). Journal of the Royal Statistical Society, Series B, 34, 187-220.

Goodman, L. A. 1979. Simple models for the analysis of association in cross-classifications having ordered categories. Journal of the American Statistical Association, 74, 537-552.

Goodman, L. A. 1981. Association Models and Canonical Correlation in the Analysis of Cross-Classifications having Ordered Categories. Journal of American Statistical Association, 76, 320-334.

Greenland, S. 1994. Alternative Models for Ordinal Logistic Regression. Statistics in Medicine, 13, 1665-1677.

Hosmer, D. W. J., and S. Lemeshow. 1981. Applied Logistic Regression Models. Biometrics, 34, 318-327.

Magidson, J. 1995. Introducing a New Graphical Model for the Analysis of an Ordinal Categorical Response – Part I. Journal of Targeting, Measurement and Analysis for Marketing, 4:2, 133-148.

McCullagh, P. 1980. Regression Models for Ordinal Data. Journal of the Royal Statistical Society B, 42:2, 109-142.

Pregibon, D. 1981. Logistic Regression Diagnostics. Annals of Statistics, 9, 705-724.

Williams, D. A. 1982. Extra-Binomial Variation in Logistic Linear Models. Applied Statistics, 31, 144-148.

Related Topics

PLUM Algorithms
Notation (ordinal regression algorithms)
Data Aggregation (ordinal regression algorithms)
Data Assumptions (ordinal regression algorithms)
Model (ordinal regression algorithms)
Log-likelihood Function (ordinal regression algorithms)
Parameter Estimation (ordinal regression algorithms)
Statistics (ordinal regression algorithms)
Linear Hypothesis Testing (ordinal regression algorithms)


PPLOT Algorithms

PPLOT (command),PPLOT (command),PPLOT (command)
algorithms,algorithms,algorithms

PPLOT produces probability plots of one or more sequence or time series variables. The variables can be standardized, differenced, and/or transformed before plotting. Expected normal values or deviations from expected normal values can be plotted. PPLOT can be used to investigate whether the data are from a specified distribution: normal, lognormal, logistic, exponential, Weibull, gamma, beta, uniform, Pareto, Laplace, half normal, chi-square and Student’s t.

Related Topics

Notation (PPLOT algorithms)
Fractional Ranks (PPLOT algorithms)
Scores (PPLOT algorithms)
P-P Plot (PPLOT algorithms)
Q-Q Plot (PPLOT algorithms)
Distributions (PPLOT algorithms)
Estimates of the Parameters (PPLOT algorithms)
References (PPLOT algorithms)


Notation (PPLOT algorithms)

PPLOT algorithms,PPLOT algorithms,PPLOT algorithms
notation,notation,notation

The following notation is used throughout this section unless otherwise stated:

X | Sample mean
S | Sample standard deviation
LX | Sample mean for ln﻿(xi)
LS | Sample standard deviation for ln﻿(xi)
xi | Value of the ith observation
x(i) | The ith smallest observation
Ri | Corresponding rank for xi
n | Sample size
frdist(xi) | Fractional rank of xi for the specified distribution function
adist(xi) | Score for the specified distribution function
α | Location parameter
β | Scale parameter
γ | Shape parameter
ν | Degrees of freedom

Related Topics

PPLOT Algorithms
Fractional Ranks (PPLOT algorithms)
Scores (PPLOT algorithms)
P-P Plot (PPLOT algorithms)
Q-Q Plot (PPLOT algorithms)
Distributions (PPLOT algorithms)
Estimates of the Parameters (PPLOT algorithms)
References (PPLOT algorithms)


Fractional Ranks (PPLOT algorithms)

PPLOT algorithms,PPLOT algorithms,PPLOT algorithms
fractional ranks,fractional ranks,fractional ranks

Based on the rank Ri for the observation xi, the fractional rank frdist(xi) is computed and used to estimate the expected cumulative distribution function of X. One of four methods can be selected to calculate the fractional rank frdist(xi):

frdist(xi)={
(Ri−38)/(n+14) | Blom
(Ri−12)/n | Rankit
(Ri−13)/(n+13) | Tukey
Ri/(n+1) | Van der Waerden

Related Topics

PPLOT Algorithms
Notation (PPLOT algorithms)
Scores (PPLOT algorithms)
P-P Plot (PPLOT algorithms)
Q-Q Plot (PPLOT algorithms)
Distributions (PPLOT algorithms)
Estimates of the Parameters (PPLOT algorithms)
References (PPLOT algorithms)


Scores (PPLOT algorithms)

PPLOT algorithms,PPLOT algorithms,PPLOT algorithms
scores,scores,scores

The score of the specified distribution for case i is defined as

adist(xi)=F−1dist(frdist(xi))i=1,...,n

where Fdist is the inverse cumulative specified distribution function.

Related Topics

PPLOT Algorithms
Notation (PPLOT algorithms)
Fractional Ranks (PPLOT algorithms)
P-P Plot (PPLOT algorithms)
Q-Q Plot (PPLOT algorithms)
Distributions (PPLOT algorithms)
Estimates of the Parameters (PPLOT algorithms)
References (PPLOT algorithms)


P-P Plot (PPLOT algorithms)

PPLOT algorithms,PPLOT algorithms,PPLOT algorithms
P-P plot,P-P plot,P-P plot

For a P-P plot, the fractional rank and the cumulative specified distribution function Fdist are plotted:

(frdist(xi), Fdist(xi))i=1,...,n

Related Topics

PPLOT Algorithms
Notation (PPLOT algorithms)
Fractional Ranks (PPLOT algorithms)
Scores (PPLOT algorithms)
Q-Q Plot (PPLOT algorithms)
Distributions (PPLOT algorithms)
Estimates of the Parameters (PPLOT algorithms)
References (PPLOT algorithms)


Q-Q Plot (PPLOT algorithms)

PPLOT algorithms,PPLOT algorithms,PPLOT algorithms
Q-Q plot,Q-Q plot,Q-Q plot

For a Q-Q plot, the observations and the score for the specified distribution function are plotted.

(xi, adist(xi))i=1,...,n

Related Topics

PPLOT Algorithms
Notation (PPLOT algorithms)
Fractional Ranks (PPLOT algorithms)
Scores (PPLOT algorithms)
P-P Plot (PPLOT algorithms)
Distributions (PPLOT algorithms)
Estimates of the Parameters (PPLOT algorithms)
References (PPLOT algorithms)


Distributions (PPLOT algorithms)

PPLOT algorithms,PPLOT algorithms,PPLOT algorithms
distributions,distributions,distributions

The distributions and their parameters are listed below. Parameters may be either specified by users or estimated from the data. Any parameter values specified by the user should satisfy the conditions indicated.

Beta(β1,β2) | β1 (>0) and β2 (>0) are scale parameters.
Chi-square(ν) | ν (>0) is the degrees of freedom.
Exponential(β) | β (>0) is a scale parameter.
Gamma(γ, β) | γ (>0) is a shape parameter and β (>0) is the scale parameter.
Half Normal(β) | β (>0) is a scale parameter and the location parameter is 0.
Laplace(α, β) | α is the location parameter and β (>0) is the scale parameter.
Logistic(α, β) | α is the location parameter and β (>0) is the scale parameter.
Lognormal(β, γ) | β (>0) is a scale parameter and γ (>0) is a shape parameter.
Normal(α, β) | α is the location parameter and β (>0) is the scale parameter.
Pareto(β,b); | β (>0) is scale parameter and b (>0) is an index of inequality.
Student’s t(ν) | v (>0) is the degrees of freedom specified by the user.
Uniform(a,b) | a is a lower bound and b is an upper bound.
Weibull(β,γ) | β (>0) is a scale parameter and γ (>0) is a shape parameter.

Related Topics

PPLOT Algorithms
Notation (PPLOT algorithms)
Fractional Ranks (PPLOT algorithms)
Scores (PPLOT algorithms)
P-P Plot (PPLOT algorithms)
Q-Q Plot (PPLOT algorithms)
Estimates of the Parameters (PPLOT algorithms)
References (PPLOT algorithms)


Estimates of the Parameters (PPLOT algorithms)

PPLOT algorithms,PPLOT algorithms,PPLOT algorithms
estimates of parameters,estimates of parameters,estimates of parameters

The estimates for parameters for each distribution are defined below.

Beta(β1,β2)

^
β
1=X{X(1−X)S2−1}

scale parameter

^
β
2=(1−X){X(1−X)S2−1}

scale parameter

Chi-square(ν)

ν is the degrees of freedom specified by the user.

Exponential(β)

^
β
=1X

scale parameter

Gamma(γ, β)

^
γ
=X2S2

shape parameter

^
β
=XS2

scale parameter

Half Normal(β)

^
β
=
√ x21+...+x2n

scale parameter

Laplace(α, β)

^
α
=X

location parameter

^
β
=
√ S22

scale parameter

Logistic(α, β)

^
α
=X

location parameter

^
β
=
√ 3
(Sπ), π=3.1415927

scale parameter

Lognormal

^
β
=exp(LX)

scale parameter

^
γ
=LS

shape parameter

Normal(α, β)

^
α
=X

location parameter

^
β
=S

scale parameter

Pareto(β,b);

^
β
= min {x1,...,xn}

scale parameter

^
b
=1LX−ln(
^
β
)

index of inequality

Student’s t(ν)

ν is the degrees of freedom specified by the user.

Uniform(a,b)

^
a
= min {x1,...,xn}

lower bound

^
b
= max {x1,...,xn}

upper bound

Weibull(β,γ)

^
β
=nΣi=1UiYi−nUYnΣi=1(Ui−U)2

scale parameter

^
γ
= exp (−((Y−
^
β
U)/
^
β
))

shape parameter

where Yi=ln(−ln(1−frdist(xi))) and Ui=ln(xi)

Related Topics

PPLOT Algorithms
Notation (PPLOT algorithms)
Fractional Ranks (PPLOT algorithms)
Scores (PPLOT algorithms)
P-P Plot (PPLOT algorithms)
Q-Q Plot (PPLOT algorithms)
Distributions (PPLOT algorithms)
References (PPLOT algorithms)


References (PPLOT algorithms)

PPLOT algorithms,PPLOT algorithms,PPLOT algorithms
references,references,references

Kotz, S., and N. L. Johnson, eds. 1988. Encyclopedia of statistical sciences. New York: John Wiley & Sons, Inc.

Related Topics

PPLOT Algorithms
Notation (PPLOT algorithms)
Fractional Ranks (PPLOT algorithms)
Scores (PPLOT algorithms)
P-P Plot (PPLOT algorithms)
Q-Q Plot (PPLOT algorithms)
Distributions (PPLOT algorithms)
Estimates of the Parameters (PPLOT algorithms)


PRINCALS Algorithms

PRINCALS (command),PRINCALS (command),PRINCALS (command)
algorithms,algorithms,algorithms
PRINCALS algorithms,PRINCALS algorithms,PRINCALS algorithms

The PRINCALS algorithm was first described in Van Rijckevorsel and De Leeuw (1979) and De Leeuw and Van Rijckevorsel (1980); also see Gifi (1981, 1985). Characteristic features of PRINCALS are the ability to specify any of a number of measurement levels for each variable separately and the treatment of missing values by setting weights in the loss function equal to 0.

Related Topics

Notation (PRINCALS algorithms)
Objective Function Optimization (PRINCALS algorithms)
Optimal Scaling Levels (PRINCALS algorithms)
Optimization (PRINCALS algorithms)
Diagnostics (PRINCALS algorithms)
References (PRINCALS algorithms)


Notation (PRINCALS algorithms)

PRINCALS algorithms,PRINCALS algorithms,PRINCALS algorithms
notation,notation,notation

The following notation is used throughout this chapter unless otherwise stated:

n | Number of cases (objects)
m | Number of variables
p | Number of dimensions

For variable j; j=1, ..., m

hj | n-vector with categorical observations
kj | Number of valid categories (distinct values) of variable j
Gj | Indicator matrix for variable j, of order n×kj

g(j) i r={
1 | when the i th object is in the r th category of variable j
0 | when the i th object is not in the r th category of variable j

Dj | Diagonal matrix, containing the univariate marginals; that is, the column sums of Gj
Mj | Binary diagonal n×n matrix, with diagonal elements defined as

m(j) i i={
1 when the i th observation is within the range [1,kj]
0
when the i th observation outside the range [1,kj]

The quantification matrices and parameter vectors are:

X | Object scores, of order n×p
Yj | Multiple category quantifications, of order kj×p
yj | Single category quantifications, of order kj
aj | Variable weights (equal to component loadings), of order p
Q | Transformed data matrix of order n×m with columns qj=Gjyj
Y | Collection of multiple and single category quantifications.

Note: The matrices Gj, Mj, and Dj are exclusively notational devices; they are stored in reduced form, and the program fully profits from their sparseness by replacing matrix multiplications with selective accumulation.

Related Topics

PRINCALS Algorithms
Objective Function Optimization (PRINCALS algorithms)
Optimal Scaling Levels (PRINCALS algorithms)
Optimization (PRINCALS algorithms)
Diagnostics (PRINCALS algorithms)
References (PRINCALS algorithms)


Objective Function Optimization (PRINCALS algorithms)

PRINCALS algorithms,PRINCALS algorithms,PRINCALS algorithms
objective function,objective function,objective function

The PRINCALS objective is to find object scores X and a set of Yj (for j=1,...,m) — the underlining indicates that they may be restricted in various ways — so that the function

σ(X;Y)=1/mΣj tr ((X−GjYj)´Mj(X−GjYj))

is minimal, under the normalization restriction X´M*X=mnI where M*=
Σ
j
Mj and I is the p×p identity matrix. The inclusion of Mj in σ(X;Y) ensures that there is no influence of data values outside the range [1, kj], a circumstance that may indicate either genuine missing values or simulated missing values for the sake of analysis. M* contains the number of "active" data values for each object. The object scores are also centered; that is, they satisfy u´M*WX=0 with u denoting an n-vector with ones.

Related Topics

PRINCALS Algorithms
Notation (PRINCALS algorithms)
Optimal Scaling Levels (PRINCALS algorithms)
Optimization (PRINCALS algorithms)
Diagnostics (PRINCALS algorithms)
References (PRINCALS algorithms)


Optimal Scaling Levels (PRINCALS algorithms)

PRINCALS algorithms,PRINCALS algorithms,PRINCALS algorithms
optimal scaling levels,optimal scaling levels,optimal scaling levels

The following optimal scaling levels are distinguished in PRINCALS:

Multiple Nominal.Yj=Yj (equality restriction only).

(Single) Nominal.Yj=yja´j (equality and rank – one restrictions).

(Single) Ordinal.Yj=yja´j and yjCj (equality, rank – one, and monotonicity restrictions). The monotonicity restriction yjCj means that yj must be located in the convex cone of all kj-vectors with nondecreasing elements.

(Single) Numerical.Yj=yja´j and yjLj (equality, rank – one, and linearity restrictions). The linearity restriction yjLj means that yj must be located in the subspace of all kj-vectors that are a linear transformation of the vector consisting of kj successive integers.

For each variable, these levels can be chosen independently. The general requirement for all options is that equal category indicators receive equal quantifications. The general requirement for the non-multiple options is Yj=yja´j; that is, Yj is of rank one; for identification purposes, yj is always normalized so that y´jDjyj=nw.

Related Topics

PRINCALS Algorithms
Notation (PRINCALS algorithms)
Objective Function Optimization (PRINCALS algorithms)
Optimization (PRINCALS algorithms)
Diagnostics (PRINCALS algorithms)
References (PRINCALS algorithms)


Optimization (PRINCALS algorithms)

Optimization is achieved by executing the following iteration scheme:

1. Initialization I or II

2. Update object scores

3. Orthonormalization

4. Update category quantifications

5. Convergence test: repeat (2) through (4) or continue

6. Rotation

Steps (1) through (6) are explained below.

Initialization

I. Random

The object scores X are initialized with random numbers. Then X is normalized so that u´M*WX=0 and X´M*X=mnI , yielding
˜
X
. For multiple variables, the initial category quantifications are obtained as
˜
Y
j=D−1jG´j
˜
X
. For single variables, the initial category quantifications
˜
y
j are defined as the first kj successive integers normalized in such a way that u´Dj
˜
y
j=0 and
˜
y
jDj
˜
y
j=n, and the initial variable weights are calculated as the vector
˜
a
j=
˜
X
´Gj
˜
y
j, rescaled to unit length.

II. All relevant quantities are copied from the results of the first cycle.

Update object scores

First the auxiliary score matrix Z is computed as

Z←ΣjMjGj
˜
Y
j

and centered with respect to M*:

˜
Z
←{M*−(M*uu´M*/u´M*u)}Z

These two steps yield locally the best updates when there would be no orthogonality constraints.

Orthonormalization

The problem is to find an M*-orthonormal X+ that is closest to
˜
Z
in the least squares sense. In PRINCALS, this is done by setting

X+←m1/2M−1/2* GRAM (M−1/2*
˜
Z
)

which is equal to the genuine least squares estimate up to a rotation—see (6). The notation GRAM( ) is used to denote the Gram-Schmidt transformation (Björk and Golub, 1973).

Update category quantifications

For multiple nominal variables, the new category quantifications are computed as:

Y+j=D−1jG´j
˜
X

For single variables one cycle of an ALS algorithm (De Leeuw et al., 1976) is executed for computing the rank-one decomposition of
˜
Y
j, with restrictions on the left-hand vector. This cycle starts from the previous category quantification
˜
y
j with

a+j=
˜
Y
´jDj
˜
y
j

When the current variable is numerical, we are ready; otherwise we compute

y*j=
˜
Y
ja+j.

Now, when the current variable is single nominal, you can simply obtain y+j by normalizing y*j in the way indicated below; otherwise the variable must be ordinal, and you have to insert the weighted monotonic regression process

y*j← WMON(*yj) .

The notation WMON( ) is used to denote the weighted monotonic regression process, which makes y*j monotonically increasing. The weights used are the diagonal elements of Dj and the subalgorithm used is the up-and-down-blocks minimum violators algorithm (Kruskal, 1964; Barlow et al., 1972). The result is normalized:

y+j=n1/2wy*j(y´*jDjy*j)−1/2

Finally, we set Y+j=y+ja´+j.

Convergence test

The difference between consecutive values of the quantity

TFIT =1/m
Σ
s
[
Σ
jJ
y´(j)sDjy(j)s+
Σ
jJ
a´jaj]

where y(j)s denotes the sth column of Yj and J is an index set recording which variables are multiple, is compared with the user-specified convergence criterion ε - a small positive number. It can be shown that TFIT =p−σ(X; Y ). Steps (2) through (4) are repeated as long as the loss difference exceeds ε.

Rotation

As remarked in (3), during iteration the orientation of X and Y with respect to the coordinate system is not necessarily correct; this also reflects that σ(X; Y ) is invariant under simultaneous rotations of X and Y. From the theory of principal components, it is known that if all variables would be single, the matrix A — which can be formed by stacking the row vectors a ´j—has the property that A'A is diagonal. Therefore you can rotate so that the matrix

1/mA´A=1/m
Σ
j
aja´j=1/m
Σ
j
Y´jDjYj

becomes diagonal. The corresponding eigenvalues are printed after the convergence message of the program. The calculation involves tridiagonalization with Householder transformations followed by the implicit QL algorithm (Wilkinson, 1965).

Related Topics

PRINCALS Algorithms
Notation (PRINCALS algorithms)
Objective Function Optimization (PRINCALS algorithms)
Optimal Scaling Levels (PRINCALS algorithms)
Diagnostics (PRINCALS algorithms)
References (PRINCALS algorithms)


Diagnostics (PRINCALS algorithms)

PRINCALS algorithms,PRINCALS algorithms,PRINCALS algorithms
diagnostics,diagnostics,diagnostics

The following diagnostics are available.

Related Topics

PRINCALS Algorithms
Notation (PRINCALS algorithms)
Objective Function Optimization (PRINCALS algorithms)
Optimal Scaling Levels (PRINCALS algorithms)
Optimization (PRINCALS algorithms)
References (PRINCALS algorithms)


Maximum Rank (may be issued as a warning when exceeded) (PRINCALS algorithms)

maximum rank,maximum rank,maximum rank
PRINCALS algorithms,PRINCALS algorithms,PRINCALS algorithms

The maximum rank pmax indicates the maximum number of dimensions that can be computed for any dataset. In general

pmax=min{(n−1), ((
Σ
jJ
kj+m2)−max(m1, max(0, 1−m2)))}

where m1 is the number of multiple variables with no missing values, m2 is the number of single variables, and J is an index set recording which variables are multiple. Although the number of nontrivial dimensions may be less than pmax when m=2, PRINCALS does allow dimensionalities all the way up to pmax. When, due to empty categories in the actual data, the rank deteriorates below the specified dimensionality, the program stops.

Related Topics

Marginal Frequencies (PRINCALS algorithms)
Fit and Loss Measures (PRINCALS algorithms)
Eigenvalues and Correlations between Optimally Scaled Variables (PRINCALS algorithms)


Marginal Frequencies (PRINCALS algorithms)

marginal frequencies,marginal frequencies,marginal frequencies
PRINCALS algorithms,PRINCALS algorithms,PRINCALS algorithms

The frequencies table gives the univariate marginals and the number of missing values (that is, values that are regarded as out of range for the current analysis) for each variable. These are computed as the column sums of Dj and the total sum of Mj.

Related Topics

Maximum Rank (may be issued as a warning when exceeded) (PRINCALS algorithms)
Fit and Loss Measures (PRINCALS algorithms)
Eigenvalues and Correlations between Optimally Scaled Variables (PRINCALS algorithms)


Fit and Loss Measures (PRINCALS algorithms)

fit,fit,fit
PRINCALS algorithms,PRINCALS algorithms,PRINCALS algorithms

When the HISTORY option is in effect, the following fit and loss measures are reported:

Total fit. This is the quantity TFIT defined in (5).

Total loss. This is σ(X;Y), computed as the sum of multiple loss and single loss defined below.

Multiple loss. This measure is computed as

TMLOSS =p−1/mΣj tr [Y´jDjYj]

Single loss. This measure is computed only when some of the variables are single:

SLOSS =1/m
Σ
jJ
tr [Y´jDjYj]+
Σ
jJ
a´jaj

Related Topics

Maximum Rank (may be issued as a warning when exceeded) (PRINCALS algorithms)
Marginal Frequencies (PRINCALS algorithms)
Eigenvalues and Correlations between Optimally Scaled Variables (PRINCALS algorithms)


Eigenvalues and Correlations between Optimally Scaled Variables (PRINCALS algorithms)

eigenvalues,eigenvalues,eigenvalues
PRINCALS algorithms,PRINCALS algorithms,PRINCALS algorithms

If there are no missing data, the eigenvalues printed by PRINCALS are those of 1/mR(Q), where R(Q) denotes the matrix of correlations between the optimally scaled variables in the columns of Q. For multiple variables, qj is defined here as Gjy(j)1. When all variables are single or when p=1, R(Q) itself is also printed. If there are missing data, then the eigenvalues are those of the matrix with elements q´jM−1*q1, which is not necessarily a correlation matrix, although it is positive semidefinite.

Related Topics

Maximum Rank (may be issued as a warning when exceeded) (PRINCALS algorithms)
Marginal Frequencies (PRINCALS algorithms)
Fit and Loss Measures (PRINCALS algorithms)


References (PRINCALS algorithms)

PRINCALS algorithms,PRINCALS algorithms,PRINCALS algorithms
references,references,references

Barlow, R. E., D. J. Bartholomew, D. J. Bremner, and H. D. Brunk. 1972. Statistical inference under order restrictions. New York: John Wiley and Sons.

Björk, A., and G. H. Golub. 1973. Numerical methods for computing angles between linear subspaces. Mathematics of Computation, 27, 579-594.

De Leeuw, J., and J. Van Rijckevorsel. 1980. HOMALS and PRINCALS—Some generalizations of principal components analysis. In: Data Analysis and Informatics, E. Diday, et al., eds. Amsterdam: North-Holland.

De Leeuw, J., F. W. Young, and Y. Takane. 1976. Additive structure in qualitative data: An alternating least squares method with optimal scaling features. Psychometrika, 41, 471-503.

Gifi, A. 1990. Nonlinear multivariate analysis. Chichester: John Wiley and Sons.

Gifi, A. 1985. PRINCALS. Research Report UG-85-02. Leiden: Department of Data Theory, University of Leiden.

Kruskal, J. B. 1964. Nonmetric multidimensional scaling: A numerical method. Psychometrika, 29, 115-129.

Van Rijckevorsel, J., and J. De Leeuw. 1979. An outline of PRINCALS: Internal Report RB 002–’79. Leiden: Department of Data Theory, University of Leiden.

Wilkinson, J. H. 1965. The algebraic eigenvalue problem. Oxford: Clarendon Press.

Related Topics

PRINCALS Algorithms
Notation (PRINCALS algorithms)
Objective Function Optimization (PRINCALS algorithms)
Optimal Scaling Levels (PRINCALS algorithms)
Optimization (PRINCALS algorithms)
Diagnostics (PRINCALS algorithms)


PROBIT Algorithms

PROBIT (command),PROBIT (command),PROBIT (command)
algorithms,algorithms,algorithms
Probit Analysis,Probit Analysis,Probit Analysis
algorithms,algorithms,algorithms
probit analysis algorithms,probit analysis algorithms,probit analysis algorithms

The Probit procedure is used to estimate the effects of one or more independent variables on a dichotomous dependent variable. The program is designed for dose-response analyses and related models, but Probit can also estimate logistic regression models.

Related Topics

Notation (probit analysis algorithms)
Model (probit analysis algorithms)
Maximum-Likelihood Estimates (MLE) (probit analysis algorithms)
Frequency Table and Goodness of Fit (probit analysis algorithms)
Fiducial Limits, RMP, and Parallelism (probit analysis algorithms)
References (probit analysis algorithms)


Notation (probit analysis algorithms)

probit analysis algorithms,probit analysis algorithms,probit analysis algorithms
notation,notation,notation

The following notation is used throughout this chapter unless otherwise stated:

m | Number of covariate patterns
ni | Number of subjects for ith covariate pattern
ri | Number of responses for ith covariate pattern
p | Number of independent variables
q | Number of levels of the grouping variable. q=0 when there is no grouping variable
c | Natural response rate
X | n×(p+q) matrix with element xij, which represents the jth covariate for the ith covariate pattern
γ | p×1 vector with element γj, which represents the slope parameter of the jth independent variable
α | q×1 vector with element αj, which represents the parameter for the jth level of the grouping variable
β | (p+q)×1 vector which is a composite of γ and α
s | Total number of parameters in the model, equal to p+q if the natural response rate is set to a constant, p+q+1 if the natural response rate is to be estimated by the model

Related Topics

PROBIT Algorithms
Model (probit analysis algorithms)
Maximum-Likelihood Estimates (MLE) (probit analysis algorithms)
Frequency Table and Goodness of Fit (probit analysis algorithms)
Fiducial Limits, RMP, and Parallelism (probit analysis algorithms)
References (probit analysis algorithms)


Model (probit analysis algorithms)

probit analysis algorithms,probit analysis algorithms,probit analysis algorithms
model,model,model

The model assumes a dichotomous dependent variable with probability P for the event of interest. Since the procedure assumes aggregated data for every covariate pattern, the random variable yi takes a binomial distribution.

P(yi=ri)=(
ni
ri
)Prii(1−Pi)ni−rii=1,...,m

Hence, the log likelihood, L, for m observations after ignoring the constant factor can be written as

L=mΣi=1rilnPi+(ni−ri)ln(1−Pi)

For dose-response models, it is further assumed that

Pi=c+(1−c)F(X´iβ)

where X´i is the vector of covariates for the ith covariate pattern and F(X´iβ) has two forms:

F(X´iβ)={
eX´iβ1+eX´iβ if logit model
∫X´iβ−∞1
√ 2π
e−z2/2 dz 		if probit model

When there is no grouping variable, xij is simply the observed value of the jth independent variable for the ith covariate pattern, and β=γ. When there is a grouping variable, a set of indicator variables is constructed. There will be q indicator variables li1,...,liq added to the X matrix and q parameters α1,...,αq added to the β vector.

lij={
1 | if the i th covariate pattern is in the j th level
0 | otherwise

Hence, the Xi vector has p+q elements and the associated parameter vector β is expanded to (β1,...,βp, βp+1,...,βp+q), where αj=βp+j.

Related Topics

PROBIT Algorithms
Notation (probit analysis algorithms)
Maximum-Likelihood Estimates (MLE) (probit analysis algorithms)
Frequency Table and Goodness of Fit (probit analysis algorithms)
Fiducial Limits, RMP, and Parallelism (probit analysis algorithms)
References (probit analysis algorithms)


Maximum-Likelihood Estimates (MLE) (probit analysis algorithms)

probit analysis algorithms,probit analysis algorithms,probit analysis algorithms
maximum likelihood estimates,maximum likelihood estimates,maximum likelihood estimates

To obtain the maximum likelihood estimates for c, and β1,...,βp+q, set the following equations equal to 0:

L*c=mΣi=1ri−niPiPi(1−Pi)[1−F(X´iβ)]

L*βj={
(1−c)mΣi=1ri−niPiPi(1−Pi)xijF(X´iβ)(1−F(X´iβ)) if logit model
(1−c)mΣi=1ri−niPiPi(1−Pi)xij1
√ 2π
exp{−12(X´iβ)2} 		if probit model

where L*βj is the derivative of L with respect to βj.

Related Topics

PROBIT Algorithms
Notation (probit analysis algorithms)
Model (probit analysis algorithms)
Frequency Table and Goodness of Fit (probit analysis algorithms)
Fiducial Limits, RMP, and Parallelism (probit analysis algorithms)
References (probit analysis algorithms)
Algorithm (probit analysis algorithms)
Natural Response Rate (probit analysis algorithms)
Initial Values (probit analysis algorithms)
Criteria (probit analysis algorithms)
Asymptotic Covariance Matrix (probit analysis algorithms)


Algorithm (probit analysis algorithms)

Probit uses the algorithms proposed and implemented in NPSOL by Gill, Murray, Saunders, and Wright. The loss function for this procedure is the negative of the log-likelihood described in the model. The derivatives for the parameters are described above. The only bound for the parameters is 0<c<1. For more details of the NPSOL algorithms, see CNLR (constrained nonlinear regression).

Related Topics

Maximum-Likelihood Estimates (MLE) (probit analysis algorithms)
Natural Response Rate (probit analysis algorithms)
Initial Values (probit analysis algorithms)
Criteria (probit analysis algorithms)
Asymptotic Covariance Matrix (probit analysis algorithms)


Natural Response Rate (probit analysis algorithms)

natural response rate,natural response rate,natural response rate
probit analysis algorithms,probit analysis algorithms,probit analysis algorithms

When the user specifies a fixed number for the natural response rate, L*c is set to 0 for iterations and the bound for c is set equal to the fixed number.

Related Topics

Maximum-Likelihood Estimates (MLE) (probit analysis algorithms)
Algorithm (probit analysis algorithms)
Initial Values (probit analysis algorithms)
Criteria (probit analysis algorithms)
Asymptotic Covariance Matrix (probit analysis algorithms)


Initial Values (probit analysis algorithms)

The initial value for each β is set to 0. If there is a control group, the initial value of c, designated by c0, is set to the ratio of the response to the number of subjects for the control group. If there is no control group, then c0 is set to the minimum ratio of the response to the number of subjects, over all covariate patterns.

Related Topics

Maximum-Likelihood Estimates (MLE) (probit analysis algorithms)
Algorithm (probit analysis algorithms)
Natural Response Rate (probit analysis algorithms)
Criteria (probit analysis algorithms)
Asymptotic Covariance Matrix (probit analysis algorithms)


Criteria (probit analysis algorithms)

Users can control two criteria, ITER and CONV. ITER is the maximum number of iterations allowed. The default value is max(50,3(s+1)). CONV (criterion of convergence) is the same as the OPTOLERANCE criterion in CNLR.

Related Topics

Maximum-Likelihood Estimates (MLE) (probit analysis algorithms)
Algorithm (probit analysis algorithms)
Natural Response Rate (probit analysis algorithms)
Initial Values (probit analysis algorithms)
Asymptotic Covariance Matrix (probit analysis algorithms)


Asymptotic Covariance Matrix (probit analysis algorithms)

The asymptotic covariance matrix for the MLE (
^
c
,
^
β
1,...,
^
β
p+q) is estimated by I−1, where I is the information matrix containing the negatives of the second partial derivatives of L.

∂2L∂c2=mΣi=1[ri−niPiPi(1−Pi)2−riPi(1−Pi)] (1−F(X´iβ))2

∂2L∂c∂βj=mΣi=1xij((1−c)(1−F(X´iβ))[ri−niPiPi(1−Pi)2−riPi(1−Pi)]−ri−niPiPi(1−Pi)) dF(X´iβ)d X´iβ

where

dF(X´iβ)d X´iβ={
F(X´iβ)(1−F(X´iβ)) if logit model
1
√ 2 π
exp{−12(X´iβ)2} 		if probit model

∂2L∂βj∂βh | =(1−c2)mΣi=1[ri−niPiPi(1−Pi)2−riPi(1−Pi)] xijxih(dF(X´iβ)dX´iβ)2
 | +(1−c)mΣi=1[ri−niPiPi(1−Pi)] xijxihd2F(X´iβ)d2 X´iβ

where

d2F(X´iβ)d2 X´iβ={
F(X´iβ)(1−F(X´iβ))(1−2F(X´iβ)) if logit model
1
√ 2π
(−X´iβ)exp(−12(X´iβ)2) 		if probit model

Related Topics

Maximum-Likelihood Estimates (MLE) (probit analysis algorithms)
Algorithm (probit analysis algorithms)
Natural Response Rate (probit analysis algorithms)
Initial Values (probit analysis algorithms)
Criteria (probit analysis algorithms)


Frequency Table and Goodness of Fit (probit analysis algorithms)

probit analysis algorithms,probit analysis algorithms,probit analysis algorithms
frequency table,frequency table,frequency table
probit analysis algorithms,probit analysis algorithms,probit analysis algorithms
goodness-of-fit,goodness-of-fit,goodness-of-fit

For every covariate pattern i, i=1,...,m, compute

^
F
i={
eX´iβ1+eX´iβ if logit model
1
√ 2π
∫X´iβ−∞e−z2/2 dz 		if probit model

^
P
i=
^
c
+(1−
^
c
)
^
F
i

Then the expected frequency is equal to

^
E
i=ni
^
P
i

The Pearson chi-square statistic is defined by

χ2=mΣi=1(ri−
^
E
i)2
^
E
i(1−
^
P
i)

and the degrees of freedom (df) is

df={
(q−1)m−s | if q≥2
m−s | if q=1

Related Topics

PROBIT Algorithms
Notation (probit analysis algorithms)
Model (probit analysis algorithms)
Maximum-Likelihood Estimates (MLE) (probit analysis algorithms)
Fiducial Limits, RMP, and Parallelism (probit analysis algorithms)
References (probit analysis algorithms)


Fiducial Limits, RMP, and Parallelism (probit analysis algorithms)

probit analysis algorithms,probit analysis algorithms,probit analysis algorithms
fiducial limits for effective dose,fiducial limits for effective dose,fiducial limits for effective dose
probit analysis algorithms,probit analysis algorithms,probit analysis algorithms
relative median potency,relative median potency,relative median potency
probit analysis algorithms,probit analysis algorithms,probit analysis algorithms
parallelism test,parallelism test,parallelism test

The parallelism test statistic, fiducial limits, and relative median potency are available when there is only one covariate (predictor variable). Assuming that
^
α
1,...,
^
α
q are the MLE’s for α1,...,αq and
^
γ
is the MLE for γ, v(
^
α
j) is the asymptotic variance for
^
α
j, v(
^
γ
) is the asymptotic variance for
^
γ
, and cov(
^
α
j,
^
γ
) is the asymptotic covariance for
^
α
j and
^
γ
.

Related Topics

PROBIT Algorithms
Notation (probit analysis algorithms)
Model (probit analysis algorithms)
Maximum-Likelihood Estimates (MLE) (probit analysis algorithms)
Frequency Table and Goodness of Fit (probit analysis algorithms)
References (probit analysis algorithms)
Fiducial Limits for Effective dose x (probit analysis algorithms)
Relative Median Potency (probit analysis algorithms)
Parallelism Test Chi-Square Statistic (probit analysis algorithms)


Fiducial Limits for Effective dose x (probit analysis algorithms)

fiducial limits for effective dose,fiducial limits for effective dose,fiducial limits for effective dose
probit analysis algorithms,probit analysis algorithms,probit analysis algorithms

For level of the grouping variable j and P = 0.01 through 0.09, 0.10 through 0.90 (by 0.05), and 0.91 through 0.99, compute

y={
ln(P / (1 - P)) | if logit model
probit (P) | if probit model

Then the effective dose xj to obtain probability P of response for level j is defined by

xj=((y−
^
α
j)/
^
γ
)

and the 95% fiducial limit for effective dose xj is computed by

xj+g1−g(x+cov(
^
α
j,
^
γ
)v(
^
γ
))
±t
^
γ
(1−g)
√ {v(
^
α
j)+2xjcov(
^
α
j,
^
γ
)+x2jv(
^
γ
)−g(v(
^
α
j)−(cov(
^
α
j,
^
γ
))2v(
^
γ
))}h*

where

g={
t2v(
^
γ
)
^
γ
2 		without heterogeneity factor
t2v(
^
γ
)
^
γ
2h 		with heterogeneity factor

t={
1.96 | without heterogeneity factor
t(0.025,df) | with heterogeneity factor

h=x2j/(df)

h*={
1 | without heterogeneity factor
h | with heterogeneity factor

The heterogeneity factor is used if the Pearson chi-square statistic is significant.

Note: If the covariate (predictor variable) x is transformed, transform it back to the original metrics for the estimate and its two limits. For example, if log10 is applied to the predictor for the analysis and
^
x
L,
^
x
, and
^
x
U are the lower limit, the estimate, and the upper limit on the log10 scale, then 10
^
x
L and 10
^
x
U are the lower and upper limits on the original scale.

Related Topics

Fiducial Limits, RMP, and Parallelism (probit analysis algorithms)
Relative Median Potency (probit analysis algorithms)
Parallelism Test Chi-Square Statistic (probit analysis algorithms)


Relative Median Potency (probit analysis algorithms)

relative median potency,relative median potency,relative median potency
probit analysis algorithms,probit analysis algorithms,probit analysis algorithms

The relative median potency is available when there is a factor variable and the covariate is transformed. It is not available if there is no factor variable or if there is more than one covariate.

The estimate of relative median potency for group j versus group k is

Mjk=(
^
α
k−
^
α
j)/
^
γ

and its 95% confidence limit is

Mjk+g1−g(Mjk−v12v22)±t
^
γ
(1−g)
√ {v11−2Mjkv12+M2jkv22−g(v11−v212v22)}h*

where

v11=v(
^
α
j)+v(
^
α
k)−2cov(
^
α
j,
^
α
k)
v12=cov(
^
α
j,
^
γ
)−cov(
^
α
k,
^
γ
)
v22=v(
^
γ
)

Note: If the covariate (predictor variable) x is transformed, transform it back to the original metrics for the relative median potency.

Related Topics

Fiducial Limits, RMP, and Parallelism (probit analysis algorithms)
Fiducial Limits for Effective dose x (probit analysis algorithms)
Parallelism Test Chi-Square Statistic (probit analysis algorithms)


Parallelism Test Chi-Square Statistic (probit analysis algorithms)

parallelism test,parallelism test,parallelism test
probit analysis algorithms,probit analysis algorithms,probit analysis algorithms

The parallelism test is available only if there is a factor variable.

χ2=χ20−qΣj=1χ2j

where χ20 is the Pearson chi-square statistic, assuming that the group variable is in the model and χ2j is the Pearson chi-square for the jth group and the degrees of freedom for χ2 is q−1.

Related Topics

Fiducial Limits, RMP, and Parallelism (probit analysis algorithms)
Fiducial Limits for Effective dose x (probit analysis algorithms)
Relative Median Potency (probit analysis algorithms)


References (probit analysis algorithms)

probit analysis algorithms,probit analysis algorithms,probit analysis algorithms
references,references,references

Finney, D. J. 1971. Probit analysis. Cambridge: Cambridge University Press.

Gill, P. E., W. M. Murray, M. A. Saunders, and M. H. Wright. 1986. User’s guide for NPSOL (version 4.0): A FORTRAN package for nonlinear programming. Technical Report SOL 86-2. Stanford University: Department of Operations Research.

Related Topics

PROBIT Algorithms
Notation (probit analysis algorithms)
Model (probit analysis algorithms)
Maximum-Likelihood Estimates (MLE) (probit analysis algorithms)
Frequency Table and Goodness of Fit (probit analysis algorithms)
Fiducial Limits, RMP, and Parallelism (probit analysis algorithms)


PROXIMITIES Algorithms

PROXIMITIES (command),PROXIMITIES (command),PROXIMITIES (command)
algorithms,algorithms,algorithms
Distances,Distances,Distances
algorithms,algorithms,algorithms
PROXIMITIES algorithms,PROXIMITIES algorithms,PROXIMITIES algorithms

PROXIMITIES computes a variety of measures of similarity, dissimilarity, or distance between pairs of cases or pairs of variables.

Related Topics

Standardizing Cases or Variables (PROXIMITIES algorithms)
Transformations (PROXIMITIES algorithms)
Proximities Measures (PROXIMITIES algorithms)
References (PROXIMITIES algorithms)


Standardizing Cases or Variables (PROXIMITIES algorithms)

PROXIMITIES algorithms,PROXIMITIES algorithms,PROXIMITIES algorithms
standardizing cases or variables,standardizing cases or variables,standardizing cases or variables

Either cases or variables can be standardized. The following methods of standardization are available:

• Z

• RANGE

• RESCALE

• MAX

• MEAN

• SD

Related Topics

Z (PROXIMITIES algorithms)
RANGE (PROXIMITIES algorithms)
RESCALE (PROXIMITIES algorithms)
MAX (PROXIMITIES algorithms)
MEAN (PROXIMITIES algorithms)
SD (PROXIMITIES algorithms)
PROXIMITIES Algorithms
Transformations (PROXIMITIES algorithms)
Proximities Measures (PROXIMITIES algorithms)
References (PROXIMITIES algorithms)


Z (PROXIMITIES algorithms)

PROXIMITIES algorithms,PROXIMITIES algorithms,PROXIMITIES algorithms
Z,Z,Z

PROXIMITIES subtracts the mean from each value for the variable or case being standardized and then divides by the standard deviation of the values. If a standard deviation is 0, PROXIMITIES sets all values for the case or variable to 0.

Related Topics

Standardizing Cases or Variables (PROXIMITIES algorithms)
RANGE (PROXIMITIES algorithms)
RESCALE (PROXIMITIES algorithms)
MAX (PROXIMITIES algorithms)
MEAN (PROXIMITIES algorithms)
SD (PROXIMITIES algorithms)


RANGE (PROXIMITIES algorithms)

PROXIMITIES algorithms,PROXIMITIES algorithms,PROXIMITIES algorithms
RANGE,RANGE,RANGE

PROXIMITIES divides each value for the variable or case being standardized by the range of the values. If the range is 0, PROXIMITIES leaves all values unchanged.

Related Topics

Standardizing Cases or Variables (PROXIMITIES algorithms)
Z (PROXIMITIES algorithms)
RESCALE (PROXIMITIES algorithms)
MAX (PROXIMITIES algorithms)
MEAN (PROXIMITIES algorithms)
SD (PROXIMITIES algorithms)


RESCALE (PROXIMITIES algorithms)

PROXIMITIES algorithms,PROXIMITIES algorithms,PROXIMITIES algorithms
RESCALE,RESCALE,RESCALE

From each value for the variable or case being standardized, PROXIMITIES subtracts the minimum value and then divides by the range. If a range is 0, PROXIMITIES sets all values for the case or variable to 0.50.

Related Topics

Standardizing Cases or Variables (PROXIMITIES algorithms)
Z (PROXIMITIES algorithms)
RANGE (PROXIMITIES algorithms)
MAX (PROXIMITIES algorithms)
MEAN (PROXIMITIES algorithms)
SD (PROXIMITIES algorithms)


MAX (PROXIMITIES algorithms)

PROXIMITIES algorithms,PROXIMITIES algorithms,PROXIMITIES algorithms
MAX,MAX,MAX

PROXIMITIES divides each value for the variable or case being standardized by the maximum of the values. If the maximum of a set of values is 0, PROXIMITIES uses an alternate process to produce a comparable standardization: it divides by the absolute magnitude of the smallest value and adds 1.

Related Topics

Standardizing Cases or Variables (PROXIMITIES algorithms)
Z (PROXIMITIES algorithms)
RANGE (PROXIMITIES algorithms)
RESCALE (PROXIMITIES algorithms)
MEAN (PROXIMITIES algorithms)
SD (PROXIMITIES algorithms)


MEAN (PROXIMITIES algorithms)

PROXIMITIES algorithms,PROXIMITIES algorithms,PROXIMITIES algorithms
MEAN,MEAN,MEAN

PROXIMITIES divides each value for the variable or case being standardized by the mean of the values. If a mean is 0, PROXIMITIES adds one to all values for the case or variable to produce a mean of 1.

Related Topics

Standardizing Cases or Variables (PROXIMITIES algorithms)
Z (PROXIMITIES algorithms)
RANGE (PROXIMITIES algorithms)
RESCALE (PROXIMITIES algorithms)
MAX (PROXIMITIES algorithms)
SD (PROXIMITIES algorithms)


SD (PROXIMITIES algorithms)

PROXIMITIES algorithms,PROXIMITIES algorithms,PROXIMITIES algorithms
SD,SD,SD

PROXIMITIES divides each value for the variable or case being standardized by the standard deviation of the values. PROXIMITIES does not change the values if their standard deviation is 0.

Related Topics

Standardizing Cases or Variables (PROXIMITIES algorithms)
Z (PROXIMITIES algorithms)
RANGE (PROXIMITIES algorithms)
RESCALE (PROXIMITIES algorithms)
MAX (PROXIMITIES algorithms)
MEAN (PROXIMITIES algorithms)


Transformations (PROXIMITIES algorithms)

PROXIMITIES algorithms,PROXIMITIES algorithms,PROXIMITIES algorithms
transformations,transformations,transformations

Three transformations are available for the values PROXIMITIES computes or reads:

• ABSOLUTE

• REVERSE

• RESCALE

Related Topics

ABSOLUTE (PROXIMITIES algorithms)
REVERSE (PROXIMITIES algorithms)
RESCALE (PROXIMITIES algorithms)
PROXIMITIES Algorithms
Standardizing Cases or Variables (PROXIMITIES algorithms)
Proximities Measures (PROXIMITIES algorithms)
References (PROXIMITIES algorithms)


ABSOLUTE (PROXIMITIES algorithms)

PROXIMITIES algorithms,PROXIMITIES algorithms,PROXIMITIES algorithms
ABSOLUTE,ABSOLUTE,ABSOLUTE

Take the absolute values of the proximities.

Related Topics

Transformations (PROXIMITIES algorithms)
REVERSE (PROXIMITIES algorithms)
RESCALE (PROXIMITIES algorithms)


REVERSE (PROXIMITIES algorithms)

PROXIMITIES algorithms,PROXIMITIES algorithms,PROXIMITIES algorithms
REVERSE,REVERSE,REVERSE

Transform similarity values into dissimilarities, or vice versa, by changing the signs of the coefficients.

Related Topics

Transformations (PROXIMITIES algorithms)
ABSOLUTE (PROXIMITIES algorithms)
RESCALE (PROXIMITIES algorithms)


RESCALE (PROXIMITIES algorithms)

PROXIMITIES algorithms,PROXIMITIES algorithms,PROXIMITIES algorithms
RESCALE,RESCALE,RESCALE

RESCALE standardizes the proximities by first subtracting the value of the smallest and then dividing by the range.

If you specify more than one transformation, PROXIMITIES does them in the order listed above: first ABSOLUTE, then REVERSE, then RESCALE.

Related Topics

Transformations (PROXIMITIES algorithms)
ABSOLUTE (PROXIMITIES algorithms)
REVERSE (PROXIMITIES algorithms)


Proximities Measures (PROXIMITIES algorithms)

PROXIMITIES algorithms,PROXIMITIES algorithms,PROXIMITIES algorithms
proximities measures,proximities measures,proximities measures

Measure defines the formula for calculating distance. For example, the Euclidean distance measure calculates the distance as a "straight line" between two clusters.

Related Topics

Measures for Continuous Data (PROXIMITIES algorithms)
Measures for Frequency Count Data (PROXIMITIES algorithms)
Measures for Binary Data (PROXIMITIES algorithms)
Conditional Probabilities (PROXIMITIES algorithms)
Predictability Measures (PROXIMITIES algorithms)
Other Binary Measures (PROXIMITIES algorithms)
PROXIMITIES Algorithms
Standardizing Cases or Variables (PROXIMITIES algorithms)
Transformations (PROXIMITIES algorithms)
References (PROXIMITIES algorithms)


Measures for Continuous Data (PROXIMITIES algorithms)

PROXIMITIES algorithms,PROXIMITIES algorithms,PROXIMITIES algorithms
measures for continuous data,measures for continuous data,measures for continuous data

Measures for continuous data, also called interval measures, assume that the variables are scale.

Related Topics

EUCLID (PROXIMITIES algorithms)
SEUCLID (PROXIMITIES algorithms)
CORRELATION (PROXIMITIES algorithms)
COSINE (PROXIMITIES algorithms)
CHEBYCHEV (PROXIMITIES algorithms)
BLOCK (PROXIMITIES algorithms)
MINKOWSKI(p) (PROXIMITIES algorithms)
POWER(p,r) (PROXIMITIES algorithms)
Measures for Frequency Count Data (PROXIMITIES algorithms)
Measures for Binary Data (PROXIMITIES algorithms)
Conditional Probabilities (PROXIMITIES algorithms)
Predictability Measures (PROXIMITIES algorithms)
Other Binary Measures (PROXIMITIES algorithms)


EUCLID (PROXIMITIES algorithms)

PROXIMITIES algorithms,PROXIMITIES algorithms,PROXIMITIES algorithms
EUCLID,EUCLID,EUCLID

The distance between two items, x and y, is the square root of the sum of the squared differences between the values for the items.

EUCLID (x, y)=
√ Σi(xi−yi)2

Related Topics

Measures for Continuous Data (PROXIMITIES algorithms)
SEUCLID (PROXIMITIES algorithms)
CORRELATION (PROXIMITIES algorithms)
COSINE (PROXIMITIES algorithms)
CHEBYCHEV (PROXIMITIES algorithms)
BLOCK (PROXIMITIES algorithms)
MINKOWSKI(p) (PROXIMITIES algorithms)
POWER(p,r) (PROXIMITIES algorithms)


SEUCLID (PROXIMITIES algorithms)

PROXIMITIES algorithms,PROXIMITIES algorithms,PROXIMITIES algorithms
SEUCLID,SEUCLID,SEUCLID

The distance between two items is the sum of the squared differences between the values for the items.

SEUCLID (x, y)=Σi(xi−yi)2

Related Topics

Measures for Continuous Data (PROXIMITIES algorithms)
EUCLID (PROXIMITIES algorithms)
CORRELATION (PROXIMITIES algorithms)
COSINE (PROXIMITIES algorithms)
CHEBYCHEV (PROXIMITIES algorithms)
BLOCK (PROXIMITIES algorithms)
MINKOWSKI(p) (PROXIMITIES algorithms)
POWER(p,r) (PROXIMITIES algorithms)


CORRELATION (PROXIMITIES algorithms)

PROXIMITIES algorithms,PROXIMITIES algorithms,PROXIMITIES algorithms
CORRELATION,CORRELATION,CORRELATION

This is a pattern similarity measure.

CORRELATION (x, y)=Σi(ZxiZyi)N

where Zxi is the (standardized) Z-score value of x for the ith case or variable, and N is the number of cases or variables.

Related Topics

Measures for Continuous Data (PROXIMITIES algorithms)
EUCLID (PROXIMITIES algorithms)
SEUCLID (PROXIMITIES algorithms)
COSINE (PROXIMITIES algorithms)
CHEBYCHEV (PROXIMITIES algorithms)
BLOCK (PROXIMITIES algorithms)
MINKOWSKI(p) (PROXIMITIES algorithms)
POWER(p,r) (PROXIMITIES algorithms)


COSINE (PROXIMITIES algorithms)

PROXIMITIES algorithms,PROXIMITIES algorithms,PROXIMITIES algorithms
COSINE,COSINE,COSINE

This is a pattern similarity measure.

COSINE (x, y)=Σi(xiyi)
√ ((Σix2i)(Σiy2i))

Related Topics

Measures for Continuous Data (PROXIMITIES algorithms)
EUCLID (PROXIMITIES algorithms)
SEUCLID (PROXIMITIES algorithms)
CORRELATION (PROXIMITIES algorithms)
CHEBYCHEV (PROXIMITIES algorithms)
BLOCK (PROXIMITIES algorithms)
MINKOWSKI(p) (PROXIMITIES algorithms)
POWER(p,r) (PROXIMITIES algorithms)


CHEBYCHEV (PROXIMITIES algorithms)

PROXIMITIES algorithms,PROXIMITIES algorithms,PROXIMITIES algorithms
CHEBYCHEV,CHEBYCHEV,CHEBYCHEV

The distance between two items is the maximum absolute difference between the values for the items.

CHEBYCHEV (x,y)=max﻿i|xi−yi|

Related Topics

Measures for Continuous Data (PROXIMITIES algorithms)
EUCLID (PROXIMITIES algorithms)
SEUCLID (PROXIMITIES algorithms)
CORRELATION (PROXIMITIES algorithms)
COSINE (PROXIMITIES algorithms)
BLOCK (PROXIMITIES algorithms)
MINKOWSKI(p) (PROXIMITIES algorithms)
POWER(p,r) (PROXIMITIES algorithms)


BLOCK (PROXIMITIES algorithms)

PROXIMITIES algorithms,PROXIMITIES algorithms,PROXIMITIES algorithms
BLOCK,BLOCK,BLOCK

The distance between two items is the sum of the absolute differences between the values for the items.

BLOCK (x,y)=Σi|xi−yi|

Related Topics

Measures for Continuous Data (PROXIMITIES algorithms)
EUCLID (PROXIMITIES algorithms)
SEUCLID (PROXIMITIES algorithms)
CORRELATION (PROXIMITIES algorithms)
COSINE (PROXIMITIES algorithms)
CHEBYCHEV (PROXIMITIES algorithms)
MINKOWSKI(p) (PROXIMITIES algorithms)
POWER(p,r) (PROXIMITIES algorithms)


MINKOWSKI(p) (PROXIMITIES algorithms)

PROXIMITIES algorithms,PROXIMITIES algorithms,PROXIMITIES algorithms
MINKOWSKI(p),MINKOWSKI(p),MINKOWSKI(p)

The distance between two items is the pth root of the sum of the absolute differences to the pth power between the values for the items.

MINKOWSKI (x,y)=(Σi|xi−yi|p)1/p

Related Topics

Measures for Continuous Data (PROXIMITIES algorithms)
EUCLID (PROXIMITIES algorithms)
SEUCLID (PROXIMITIES algorithms)
CORRELATION (PROXIMITIES algorithms)
COSINE (PROXIMITIES algorithms)
CHEBYCHEV (PROXIMITIES algorithms)
BLOCK (PROXIMITIES algorithms)
POWER(p,r) (PROXIMITIES algorithms)


POWER(p,r) (PROXIMITIES algorithms)

PROXIMITIES algorithms,PROXIMITIES algorithms,PROXIMITIES algorithms
POWER(p,r),POWER(p,r),POWER(p,r)

The distance between two items is the rth root of the sum of the absolute differences to the pth power between the values for the items.

POWER (x,y)=(Σi|xi−yi|p)1/r

Related Topics

Measures for Continuous Data (PROXIMITIES algorithms)
EUCLID (PROXIMITIES algorithms)
SEUCLID (PROXIMITIES algorithms)
CORRELATION (PROXIMITIES algorithms)
COSINE (PROXIMITIES algorithms)
CHEBYCHEV (PROXIMITIES algorithms)
BLOCK (PROXIMITIES algorithms)
MINKOWSKI(p) (PROXIMITIES algorithms)


Measures for Frequency Count Data (PROXIMITIES algorithms)

PROXIMITIES algorithms,PROXIMITIES algorithms,PROXIMITIES algorithms
measures for frequency count data,measures for frequency count data,measures for frequency count data

Frequency count measures assume that the variables are discrete numeric.

Related Topics

CHISQ (PROXIMITIES algorithms)
PH2 (PROXIMITIES algorithms)
Measures for Continuous Data (PROXIMITIES algorithms)
Measures for Binary Data (PROXIMITIES algorithms)
Conditional Probabilities (PROXIMITIES algorithms)
Predictability Measures (PROXIMITIES algorithms)
Other Binary Measures (PROXIMITIES algorithms)


CHISQ (PROXIMITIES algorithms)

PROXIMITIES algorithms,PROXIMITIES algorithms,PROXIMITIES algorithms
CHISQ,CHISQ,CHISQ

The magnitude of this dissimilarity measure depends on the total frequencies of the two cases or variables whose proximity is computed. Expected values are from the model of independence of cases (or variables), x and y.

CHISQ (x,y)=
√
Σ
i
(xi−E(xi))2E(xi)+
Σ
i
(yi−E(yi))2E(yi)

Related Topics

Measures for Frequency Count Data (PROXIMITIES algorithms)
PH2 (PROXIMITIES algorithms)


PH2 (PROXIMITIES algorithms)

PROXIMITIES algorithms,PROXIMITIES algorithms,PROXIMITIES algorithms
PH2,PH2,PH2

This is the CHISQ measure normalized by the square root of the combined frequency. Therefore, its value does not depend on the total frequencies of the two cases or variables whose proximity is computed.

PH2 (x,y)= CHISQ (x,y)
√ N

Related Topics

Measures for Frequency Count Data (PROXIMITIES algorithms)
CHISQ (PROXIMITIES algorithms)


Measures for Binary Data (PROXIMITIES algorithms)

PROXIMITIES algorithms,PROXIMITIES algorithms,PROXIMITIES algorithms
measures for binary data,measures for binary data,measures for binary data

Binary measures assume that the variables take only two values.

PROXIMITIES constructs a 2×2 contingency table for each pair of items in turn. It uses this table to compute a proximity measure for the pair.

 |  | Item 2
 |  | Present | Absent
Item 1 | Present | a | b
 | Absent | c | d

PROXIMITIES computes all binary measures from the values of a, b, c, and d. These values are tallies across variables (when the items are cases) or tallies across cases (when the items are variables).

Related Topics

Russel and Rao Similarity Measure (PROXIMITIES algorithms)
Simple Matching Similarity Measure (PROXIMITIES algorithms)
Jaccard Similarity Measure (PROXIMITIES algorithms)
Dice or Czekanowski or Sorenson Similarity Measure (PROXIMITIES algorithms)
Sokal and Sneath Similarity Measure 1 (PROXIMITIES algorithms)
Rogers and Tanimoto Similarity Measure (PROXIMITIES algorithms)
Sokal and Sneath Similarity Measure 2 (PROXIMITIES algorithms)
Kulczynski Similarity Measure 1 (PROXIMITIES algorithms)
Sokal and Sneath Similarity Measure 3 (PROXIMITIES algorithms)
Measures for Continuous Data (PROXIMITIES algorithms)
Measures for Frequency Count Data (PROXIMITIES algorithms)
Conditional Probabilities (PROXIMITIES algorithms)
Predictability Measures (PROXIMITIES algorithms)
Other Binary Measures (PROXIMITIES algorithms)


Russel and Rao Similarity Measure (PROXIMITIES algorithms)

PROXIMITIES algorithms,PROXIMITIES algorithms,PROXIMITIES algorithms
Russel and Rao similarity measure,Russel and Rao similarity measure,Russel and Rao similarity measure

This is the binary dot product.

RR (x, y)=aa+b+c+d

Related Topics

Measures for Binary Data (PROXIMITIES algorithms)
Simple Matching Similarity Measure (PROXIMITIES algorithms)
Jaccard Similarity Measure (PROXIMITIES algorithms)
Dice or Czekanowski or Sorenson Similarity Measure (PROXIMITIES algorithms)
Sokal and Sneath Similarity Measure 1 (PROXIMITIES algorithms)
Rogers and Tanimoto Similarity Measure (PROXIMITIES algorithms)
Sokal and Sneath Similarity Measure 2 (PROXIMITIES algorithms)
Kulczynski Similarity Measure 1 (PROXIMITIES algorithms)
Sokal and Sneath Similarity Measure 3 (PROXIMITIES algorithms)


Simple Matching Similarity Measure (PROXIMITIES algorithms)

PROXIMITIES algorithms,PROXIMITIES algorithms,PROXIMITIES algorithms
simple matching similarity measure,simple matching similarity measure,simple matching similarity measure

This is the ratio of the number of matches to the total number of characteristics.

SM (x, y)=a+da+b+c+d

Related Topics

Measures for Binary Data (PROXIMITIES algorithms)
Russel and Rao Similarity Measure (PROXIMITIES algorithms)
Jaccard Similarity Measure (PROXIMITIES algorithms)
Dice or Czekanowski or Sorenson Similarity Measure (PROXIMITIES algorithms)
Sokal and Sneath Similarity Measure 1 (PROXIMITIES algorithms)
Rogers and Tanimoto Similarity Measure (PROXIMITIES algorithms)
Sokal and Sneath Similarity Measure 2 (PROXIMITIES algorithms)
Kulczynski Similarity Measure 1 (PROXIMITIES algorithms)
Sokal and Sneath Similarity Measure 3 (PROXIMITIES algorithms)


Jaccard Similarity Measure (PROXIMITIES algorithms)

PROXIMITIES algorithms,PROXIMITIES algorithms,PROXIMITIES algorithms
Jaccard similarity measure,Jaccard similarity measure,Jaccard similarity measure

This is also known as the similarity ratio.

JACCARD (x, y)=aa+b+c

Related Topics

Measures for Binary Data (PROXIMITIES algorithms)
Russel and Rao Similarity Measure (PROXIMITIES algorithms)
Simple Matching Similarity Measure (PROXIMITIES algorithms)
Dice or Czekanowski or Sorenson Similarity Measure (PROXIMITIES algorithms)
Sokal and Sneath Similarity Measure 1 (PROXIMITIES algorithms)
Rogers and Tanimoto Similarity Measure (PROXIMITIES algorithms)
Sokal and Sneath Similarity Measure 2 (PROXIMITIES algorithms)
Kulczynski Similarity Measure 1 (PROXIMITIES algorithms)
Sokal and Sneath Similarity Measure 3 (PROXIMITIES algorithms)


Dice or Czekanowski or Sorenson Similarity Measure (PROXIMITIES algorithms)

PROXIMITIES algorithms,PROXIMITIES algorithms,PROXIMITIES algorithms
Dice or Czekanowski or Sorenson similarity measure,Dice or Czekanowski or Sorenson similarity measure,Dice or Czekanowski or Sorenson similarity measure
DICE (x, y)=2a2a+b+c

Related Topics

Measures for Binary Data (PROXIMITIES algorithms)
Russel and Rao Similarity Measure (PROXIMITIES algorithms)
Simple Matching Similarity Measure (PROXIMITIES algorithms)
Jaccard Similarity Measure (PROXIMITIES algorithms)
Sokal and Sneath Similarity Measure 1 (PROXIMITIES algorithms)
Rogers and Tanimoto Similarity Measure (PROXIMITIES algorithms)
Sokal and Sneath Similarity Measure 2 (PROXIMITIES algorithms)
Kulczynski Similarity Measure 1 (PROXIMITIES algorithms)
Sokal and Sneath Similarity Measure 3 (PROXIMITIES algorithms)


Sokal and Sneath Similarity Measure 1 (PROXIMITIES algorithms)

PROXIMITIES algorithms,PROXIMITIES algorithms,PROXIMITIES algorithms
Sokal and Sneath similarity measure 1,Sokal and Sneath similarity measure 1,Sokal and Sneath similarity measure 1
SS1 (x, y)=2(a+d)2(a+d)+b+c

Related Topics

Measures for Binary Data (PROXIMITIES algorithms)
Russel and Rao Similarity Measure (PROXIMITIES algorithms)
Simple Matching Similarity Measure (PROXIMITIES algorithms)
Jaccard Similarity Measure (PROXIMITIES algorithms)
Dice or Czekanowski or Sorenson Similarity Measure (PROXIMITIES algorithms)
Rogers and Tanimoto Similarity Measure (PROXIMITIES algorithms)
Sokal and Sneath Similarity Measure 2 (PROXIMITIES algorithms)
Kulczynski Similarity Measure 1 (PROXIMITIES algorithms)
Sokal and Sneath Similarity Measure 3 (PROXIMITIES algorithms)


Rogers and Tanimoto Similarity Measure (PROXIMITIES algorithms)

PROXIMITIES algorithms,PROXIMITIES algorithms,PROXIMITIES algorithms
Rogers and Tanimoto similarity measure,Rogers and Tanimoto similarity measure,Rogers and Tanimoto similarity measure
RT (x, y)=a+da+d+2(b+c)

Related Topics

Measures for Binary Data (PROXIMITIES algorithms)
Russel and Rao Similarity Measure (PROXIMITIES algorithms)
Simple Matching Similarity Measure (PROXIMITIES algorithms)
Jaccard Similarity Measure (PROXIMITIES algorithms)
Dice or Czekanowski or Sorenson Similarity Measure (PROXIMITIES algorithms)
Sokal and Sneath Similarity Measure 1 (PROXIMITIES algorithms)
Sokal and Sneath Similarity Measure 2 (PROXIMITIES algorithms)
Kulczynski Similarity Measure 1 (PROXIMITIES algorithms)
Sokal and Sneath Similarity Measure 3 (PROXIMITIES algorithms)


Sokal and Sneath Similarity Measure 2 (PROXIMITIES algorithms)

PROXIMITIES algorithms,PROXIMITIES algorithms,PROXIMITIES algorithms
Sokal and Sneath similarity measure 2,Sokal and Sneath similarity measure 2,Sokal and Sneath similarity measure 2
SS2 (x, y)=aa+2(b+c)

Related Topics

Measures for Binary Data (PROXIMITIES algorithms)
Russel and Rao Similarity Measure (PROXIMITIES algorithms)
Simple Matching Similarity Measure (PROXIMITIES algorithms)
Jaccard Similarity Measure (PROXIMITIES algorithms)
Dice or Czekanowski or Sorenson Similarity Measure (PROXIMITIES algorithms)
Sokal and Sneath Similarity Measure 1 (PROXIMITIES algorithms)
Rogers and Tanimoto Similarity Measure (PROXIMITIES algorithms)
Kulczynski Similarity Measure 1 (PROXIMITIES algorithms)
Sokal and Sneath Similarity Measure 3 (PROXIMITIES algorithms)


Kulczynski Similarity Measure 1 (PROXIMITIES algorithms)

PROXIMITIES algorithms,PROXIMITIES algorithms,PROXIMITIES algorithms
Kulczynski similarity measure 1,Kulczynski similarity measure 1,Kulczynski similarity measure 1

This measure has a minimum value of 0 and no upper limit. It is undefined when there are no nonmatches (b=0 and c=0). Therefore, PROXIMITIES assigns an artificial upper limit of 9999.999 to K1 when it is undefined or exceeds this value.

K1 (x, y)=ab+c

Related Topics

Measures for Binary Data (PROXIMITIES algorithms)
Russel and Rao Similarity Measure (PROXIMITIES algorithms)
Simple Matching Similarity Measure (PROXIMITIES algorithms)
Jaccard Similarity Measure (PROXIMITIES algorithms)
Dice or Czekanowski or Sorenson Similarity Measure (PROXIMITIES algorithms)
Sokal and Sneath Similarity Measure 1 (PROXIMITIES algorithms)
Rogers and Tanimoto Similarity Measure (PROXIMITIES algorithms)
Sokal and Sneath Similarity Measure 2 (PROXIMITIES algorithms)
Sokal and Sneath Similarity Measure 3 (PROXIMITIES algorithms)


Sokal and Sneath Similarity Measure 3 (PROXIMITIES algorithms)

PROXIMITIES algorithms,PROXIMITIES algorithms,PROXIMITIES algorithms
Sokal and Sneath similarity measure 3,Sokal and Sneath similarity measure 3,Sokal and Sneath similarity measure 3

This measure has a minimum value of 0, has no upper limit, and is undefined when there are no nonmatches (b=0 and c=0). As with K1, PROXIMITIES assigns an artificial upper limit of 9999.999 to SS3 when it is undefined or exceeds this value.

SS3 (x, y)=a+db+c

Related Topics

Measures for Binary Data (PROXIMITIES algorithms)
Russel and Rao Similarity Measure (PROXIMITIES algorithms)
Simple Matching Similarity Measure (PROXIMITIES algorithms)
Jaccard Similarity Measure (PROXIMITIES algorithms)
Dice or Czekanowski or Sorenson Similarity Measure (PROXIMITIES algorithms)
Sokal and Sneath Similarity Measure 1 (PROXIMITIES algorithms)
Rogers and Tanimoto Similarity Measure (PROXIMITIES algorithms)
Sokal and Sneath Similarity Measure 2 (PROXIMITIES algorithms)
Kulczynski Similarity Measure 1 (PROXIMITIES algorithms)


Conditional Probabilities (PROXIMITIES algorithms)

PROXIMITIES algorithms,PROXIMITIES algorithms,PROXIMITIES algorithms
conditional probabilities,conditional probabilities,conditional probabilities

The following three binary measures yield values that you can interpret in terms of conditional probability. All three are similarity measures.

• Kulczynski Similarity Measure 2

• Sokal and Sneath Similarity Measure 4

• Hamann Similarity Measure

Related Topics

Kulczynski Similarity Measure 2 (PROXIMITIES algorithms)
Sokal and Sneath Similarity Measure 4 (PROXIMITIES algorithms)
Hamann Similarity Measure (PROXIMITIES algorithms)
Measures for Continuous Data (PROXIMITIES algorithms)
Measures for Frequency Count Data (PROXIMITIES algorithms)
Measures for Binary Data (PROXIMITIES algorithms)
Predictability Measures (PROXIMITIES algorithms)
Other Binary Measures (PROXIMITIES algorithms)


Kulczynski Similarity Measure 2 (PROXIMITIES algorithms)

PROXIMITIES algorithms,PROXIMITIES algorithms,PROXIMITIES algorithms
Kulczynski similarity measure 2,Kulczynski similarity measure 2,Kulczynski similarity measure 2

This yields the average conditional probability that a characteristic is present in one item given that the characteristic is present in the other item. The measure is an average over both items acting as predictors. It has a range of 0 to 1.

K2 (x, y)=a/(a+b)+a/(a+c)2

Related Topics

Conditional Probabilities (PROXIMITIES algorithms)
Sokal and Sneath Similarity Measure 4 (PROXIMITIES algorithms)
Hamann Similarity Measure (PROXIMITIES algorithms)


Sokal and Sneath Similarity Measure 4 (PROXIMITIES algorithms)

PROXIMITIES algorithms,PROXIMITIES algorithms,PROXIMITIES algorithms
Sokal and Sneath similarity measure 4,Sokal and Sneath similarity measure 4,Sokal and Sneath similarity measure 4

This yields the conditional probability that a characteristic of one item is in the same state (present or absent) as the characteristic of the other item. The measure is an average over both items acting as predictors. It has a range of 0 to 1.

SS4 (x, y)=a/(a+b)+a/(a+c)+d/(b+d)+d/(c+d)4

Related Topics

Conditional Probabilities (PROXIMITIES algorithms)
Kulczynski Similarity Measure 2 (PROXIMITIES algorithms)
Hamann Similarity Measure (PROXIMITIES algorithms)


Hamann Similarity Measure (PROXIMITIES algorithms)

PROXIMITIES algorithms,PROXIMITIES algorithms,PROXIMITIES algorithms
Hamann similarity measure,Hamann similarity measure,Hamann similarity measure

This measure gives the probability that a characteristic has the same state in both items (present in both or absent from both) minus the probability that a characteristic has different states in the two items (present in one and absent from the other). HAMANN has a range of –1 to +1 and is monotonically related to SM, SS1, and RT.

HAMANN (x, y)=(a+d)−(b+c)a+b+c+d

Related Topics

Conditional Probabilities (PROXIMITIES algorithms)
Kulczynski Similarity Measure 2 (PROXIMITIES algorithms)
Sokal and Sneath Similarity Measure 4 (PROXIMITIES algorithms)


Predictability Measures (PROXIMITIES algorithms)

PROXIMITIES algorithms,PROXIMITIES algorithms,PROXIMITIES algorithms
predictability measure,predictability measure,predictability measure

The following four binary measures assess the association between items as the predictability of one given the other. All four measures yield similarities.

• Goodman and Kruskal Lambda (Similarity)

• Anderberg’s D (Similarity)

• Yule’s Y Coefficient of Colligation (Similarity)

• Yule’s Q (Similarity)

Related Topics

Goodman and Kruskal Lambda (Similarity) (PROXIMITIES algorithms)
Anderberg’s D (Similarity) (PROXIMITIES algorithms)
Yule’s Y Coefficient of Colligation (Similarity) (PROXIMITIES algorithms)
Yule’s Q (Similarity) (PROXIMITIES algorithms)
Measures for Continuous Data (PROXIMITIES algorithms)
Measures for Frequency Count Data (PROXIMITIES algorithms)
Measures for Binary Data (PROXIMITIES algorithms)
Conditional Probabilities (PROXIMITIES algorithms)
Other Binary Measures (PROXIMITIES algorithms)


Goodman and Kruskal Lambda (Similarity) (PROXIMITIES algorithms)

PROXIMITIES algorithms,PROXIMITIES algorithms,PROXIMITIES algorithms
Goodman and Kruskal lambda (similarity),Goodman and Kruskal lambda (similarity),Goodman and Kruskal lambda (similarity)

This coefficient assesses the predictability of the state of a characteristic on one item (presence or absence) given the state on the other item. Specifically, lambda measures the proportional reduction in error using one item to predict the other, when the directions of prediction are of equal importance. Lambda has a range of 0 to 1.

t1=max(a, b)+max(c, d)+max(a, c)+max(b, d)
t2=max(a+c, b+d)+max(a+b, c+d)
LAMBDA (x, y)=t1−t22(a+b+c+d)−t2

Related Topics

Predictability Measures (PROXIMITIES algorithms)
Anderberg’s D (Similarity) (PROXIMITIES algorithms)
Yule’s Y Coefficient of Colligation (Similarity) (PROXIMITIES algorithms)
Yule’s Q (Similarity) (PROXIMITIES algorithms)


Anderberg’s D (Similarity) (PROXIMITIES algorithms)

PROXIMITIES algorithms,PROXIMITIES algorithms,PROXIMITIES algorithms
Anderberg's D (similarity),Anderberg's D (similarity),Anderberg's D (similarity)

This coefficient assesses the predictability of the state of a characteristic on one item (presence or absence) given the state on the other. D measures the actual reduction in the error probability when one item is used to predict the other. The range of D is 0 to 1.

t1=max(a, b)+max(c, d)+max(a, c)+max(b, d)
t2=max(a+c, b+d)+max(a+b, c+d)
D (x, y)=t1−t22(a+b+c+d)

Related Topics

Predictability Measures (PROXIMITIES algorithms)
Goodman and Kruskal Lambda (Similarity) (PROXIMITIES algorithms)
Yule’s Y Coefficient of Colligation (Similarity) (PROXIMITIES algorithms)
Yule’s Q (Similarity) (PROXIMITIES algorithms)


Yule’s Y Coefficient of Colligation (Similarity) (PROXIMITIES algorithms)

PROXIMITIES algorithms,PROXIMITIES algorithms,PROXIMITIES algorithms
Yule's Y coefficient of colligation (similarity),Yule's Y coefficient of colligation (similarity),Yule's Y coefficient of colligation (similarity)

This is a function of the cross-product ratio for a 2×2 table. It has a range of –1 to +1.

Y (x, y)=
√ ad
−
√ bc
√ ad
+
√ bc

Related Topics

Predictability Measures (PROXIMITIES algorithms)
Goodman and Kruskal Lambda (Similarity) (PROXIMITIES algorithms)
Anderberg’s D (Similarity) (PROXIMITIES algorithms)
Yule’s Q (Similarity) (PROXIMITIES algorithms)


Yule’s Q (Similarity) (PROXIMITIES algorithms)

PROXIMITIES algorithms,PROXIMITIES algorithms,PROXIMITIES algorithms
Yule's Q (similarity),Yule's Q (similarity),Yule's Q (similarity)

This is the 2×2 version of Goodman and Kruskal’s ordinal measure gamma. Like Yule’s Y, Q is a function of the cross-product ratio for a 2×2 table and has a range of –1 to +1.

Q (x, y)=ad−bcad+bc

Related Topics

Predictability Measures (PROXIMITIES algorithms)
Goodman and Kruskal Lambda (Similarity) (PROXIMITIES algorithms)
Anderberg’s D (Similarity) (PROXIMITIES algorithms)
Yule’s Y Coefficient of Colligation (Similarity) (PROXIMITIES algorithms)


Other Binary Measures (PROXIMITIES algorithms)

PROXIMITIES algorithms,PROXIMITIES algorithms,PROXIMITIES algorithms
other binary measures,other binary measures,other binary measures

The remaining binary measures available in PROXIMITIES are either binary equivalents of association measures for continuous variables or measures of special properties of the relation between items.

Related Topics

Ochiai Similarity Measure (PROXIMITIES algorithms)
Sokal and Sneath Similarity Measure 5 (PROXIMITIES algorithms)
Fourfold Point Correlation (Similarity) (PROXIMITIES algorithms)
Binary Euclidean Distance (PROXIMITIES algorithms)
Binary Squared Euclidean Distance (PROXIMITIES algorithms)
Size Difference (PROXIMITIES algorithms)
Pattern Difference (PROXIMITIES algorithms)
Binary Shape Difference (PROXIMITIES algorithms)
Dispersion Similarity Measure (PROXIMITIES algorithms)
Variance Dissimilarity Measure (PROXIMITIES algorithms)
Binary Lance-and-Williams Nonmetric Dissimilarity Measure (PROXIMITIES algorithms)
Measures for Continuous Data (PROXIMITIES algorithms)
Measures for Frequency Count Data (PROXIMITIES algorithms)
Measures for Binary Data (PROXIMITIES algorithms)
Conditional Probabilities (PROXIMITIES algorithms)
Predictability Measures (PROXIMITIES algorithms)


Ochiai Similarity Measure (PROXIMITIES algorithms)

PROXIMITIES algorithms,PROXIMITIES algorithms,PROXIMITIES algorithms
Ochiai similarity measure,Ochiai similarity measure,Ochiai similarity measure

This is the binary form of the cosine. It has a range of 0 to 1 and is a similarity measure.

OCHIAI (x, y)=
√ (aa+b)(aa+c)

Related Topics

Other Binary Measures (PROXIMITIES algorithms)
Sokal and Sneath Similarity Measure 5 (PROXIMITIES algorithms)
Fourfold Point Correlation (Similarity) (PROXIMITIES algorithms)
Binary Euclidean Distance (PROXIMITIES algorithms)
Binary Squared Euclidean Distance (PROXIMITIES algorithms)
Size Difference (PROXIMITIES algorithms)
Pattern Difference (PROXIMITIES algorithms)
Binary Shape Difference (PROXIMITIES algorithms)
Dispersion Similarity Measure (PROXIMITIES algorithms)
Variance Dissimilarity Measure (PROXIMITIES algorithms)
Binary Lance-and-Williams Nonmetric Dissimilarity Measure (PROXIMITIES algorithms)


Sokal and Sneath Similarity Measure 5 (PROXIMITIES algorithms)

PROXIMITIES algorithms,PROXIMITIES algorithms,PROXIMITIES algorithms
Sokal and Sneath similarity measure 5,Sokal and Sneath similarity measure 5,Sokal and Sneath similarity measure 5

This is a similarity measure. Its range is 0 to 1.

SS5 (x, y)=ad
√ (a+b)(a+c)(b+d)(c+d)

Related Topics

Other Binary Measures (PROXIMITIES algorithms)
Ochiai Similarity Measure (PROXIMITIES algorithms)
Fourfold Point Correlation (Similarity) (PROXIMITIES algorithms)
Binary Euclidean Distance (PROXIMITIES algorithms)
Binary Squared Euclidean Distance (PROXIMITIES algorithms)
Size Difference (PROXIMITIES algorithms)
Pattern Difference (PROXIMITIES algorithms)
Binary Shape Difference (PROXIMITIES algorithms)
Dispersion Similarity Measure (PROXIMITIES algorithms)
Variance Dissimilarity Measure (PROXIMITIES algorithms)
Binary Lance-and-Williams Nonmetric Dissimilarity Measure (PROXIMITIES algorithms)


Fourfold Point Correlation (Similarity) (PROXIMITIES algorithms)

PROXIMITIES algorithms,PROXIMITIES algorithms,PROXIMITIES algorithms
fourfold point correlation (similarity),fourfold point correlation (similarity),fourfold point correlation (similarity)

This is the binary form of the Pearson product-moment correlation coefficient. Phi is a similarity measure, and its range is 0 to 1.

PHI (x, y)=ad−bc
√ (a+b)(a+c)(b+d)(c+d)

Related Topics

Other Binary Measures (PROXIMITIES algorithms)
Ochiai Similarity Measure (PROXIMITIES algorithms)
Sokal and Sneath Similarity Measure 5 (PROXIMITIES algorithms)
Binary Euclidean Distance (PROXIMITIES algorithms)
Binary Squared Euclidean Distance (PROXIMITIES algorithms)
Size Difference (PROXIMITIES algorithms)
Pattern Difference (PROXIMITIES algorithms)
Binary Shape Difference (PROXIMITIES algorithms)
Dispersion Similarity Measure (PROXIMITIES algorithms)
Variance Dissimilarity Measure (PROXIMITIES algorithms)
Binary Lance-and-Williams Nonmetric Dissimilarity Measure (PROXIMITIES algorithms)


Binary Euclidean Distance (PROXIMITIES algorithms)

PROXIMITIES algorithms,PROXIMITIES algorithms,PROXIMITIES algorithms
binary euclidean distance,binary euclidean distance,binary euclidean distance

This is a distance measure. Its minimum value is 0, and it has no upper limit.

BEUCLID (x, y)=
√ b+c

Related Topics

Other Binary Measures (PROXIMITIES algorithms)
Ochiai Similarity Measure (PROXIMITIES algorithms)
Sokal and Sneath Similarity Measure 5 (PROXIMITIES algorithms)
Fourfold Point Correlation (Similarity) (PROXIMITIES algorithms)
Binary Squared Euclidean Distance (PROXIMITIES algorithms)
Size Difference (PROXIMITIES algorithms)
Pattern Difference (PROXIMITIES algorithms)
Binary Shape Difference (PROXIMITIES algorithms)
Dispersion Similarity Measure (PROXIMITIES algorithms)
Variance Dissimilarity Measure (PROXIMITIES algorithms)
Binary Lance-and-Williams Nonmetric Dissimilarity Measure (PROXIMITIES algorithms)


Binary Squared Euclidean Distance (PROXIMITIES algorithms)

PROXIMITIES algorithms,PROXIMITIES algorithms,PROXIMITIES algorithms
binary squared euclidean distance,binary squared euclidean distance,binary squared euclidean distance

This is also a distance measure. Its minimum value is 0, and it has no upper limit.

BSEUCLID (x, y)=b+c

Related Topics

Other Binary Measures (PROXIMITIES algorithms)
Ochiai Similarity Measure (PROXIMITIES algorithms)
Sokal and Sneath Similarity Measure 5 (PROXIMITIES algorithms)
Fourfold Point Correlation (Similarity) (PROXIMITIES algorithms)
Binary Euclidean Distance (PROXIMITIES algorithms)
Size Difference (PROXIMITIES algorithms)
Pattern Difference (PROXIMITIES algorithms)
Binary Shape Difference (PROXIMITIES algorithms)
Dispersion Similarity Measure (PROXIMITIES algorithms)
Variance Dissimilarity Measure (PROXIMITIES algorithms)
Binary Lance-and-Williams Nonmetric Dissimilarity Measure (PROXIMITIES algorithms)


Size Difference (PROXIMITIES algorithms)

PROXIMITIES algorithms,PROXIMITIES algorithms,PROXIMITIES algorithms
size difference,size difference,size difference

This is a dissimilarity measure with a minimum value of 0 and no upper limit.

SIZE (x,y)=(b−c)2(a+b+c+d)2

Related Topics

Other Binary Measures (PROXIMITIES algorithms)
Ochiai Similarity Measure (PROXIMITIES algorithms)
Sokal and Sneath Similarity Measure 5 (PROXIMITIES algorithms)
Fourfold Point Correlation (Similarity) (PROXIMITIES algorithms)
Binary Euclidean Distance (PROXIMITIES algorithms)
Binary Squared Euclidean Distance (PROXIMITIES algorithms)
Pattern Difference (PROXIMITIES algorithms)
Binary Shape Difference (PROXIMITIES algorithms)
Dispersion Similarity Measure (PROXIMITIES algorithms)
Variance Dissimilarity Measure (PROXIMITIES algorithms)
Binary Lance-and-Williams Nonmetric Dissimilarity Measure (PROXIMITIES algorithms)


Pattern Difference (PROXIMITIES algorithms)

PROXIMITIES algorithms,PROXIMITIES algorithms,PROXIMITIES algorithms
pattern difference,pattern difference,pattern difference

This is also a dissimilarity measure. Its range is 0 to 1.

PATTERN (x,y)=bc(a+b+c+d)2

Related Topics

Other Binary Measures (PROXIMITIES algorithms)
Ochiai Similarity Measure (PROXIMITIES algorithms)
Sokal and Sneath Similarity Measure 5 (PROXIMITIES algorithms)
Fourfold Point Correlation (Similarity) (PROXIMITIES algorithms)
Binary Euclidean Distance (PROXIMITIES algorithms)
Binary Squared Euclidean Distance (PROXIMITIES algorithms)
Size Difference (PROXIMITIES algorithms)
Binary Shape Difference (PROXIMITIES algorithms)
Dispersion Similarity Measure (PROXIMITIES algorithms)
Variance Dissimilarity Measure (PROXIMITIES algorithms)
Binary Lance-and-Williams Nonmetric Dissimilarity Measure (PROXIMITIES algorithms)


Binary Shape Difference (PROXIMITIES algorithms)

PROXIMITIES algorithms,PROXIMITIES algorithms,PROXIMITIES algorithms
binary shape difference,binary shape difference,binary shape difference

This dissimilarity measure has no upper or lower limit.

BSHAPE (x,y)=(a+b+c+d)(b+c)−(b−c)2(a+b+c+d)2

Related Topics

Other Binary Measures (PROXIMITIES algorithms)
Ochiai Similarity Measure (PROXIMITIES algorithms)
Sokal and Sneath Similarity Measure 5 (PROXIMITIES algorithms)
Fourfold Point Correlation (Similarity) (PROXIMITIES algorithms)
Binary Euclidean Distance (PROXIMITIES algorithms)
Binary Squared Euclidean Distance (PROXIMITIES algorithms)
Size Difference (PROXIMITIES algorithms)
Pattern Difference (PROXIMITIES algorithms)
Dispersion Similarity Measure (PROXIMITIES algorithms)
Variance Dissimilarity Measure (PROXIMITIES algorithms)
Binary Lance-and-Williams Nonmetric Dissimilarity Measure (PROXIMITIES algorithms)


Dispersion Similarity Measure (PROXIMITIES algorithms)

PROXIMITIES algorithms,PROXIMITIES algorithms,PROXIMITIES algorithms
dispersion similarity measure,dispersion similarity measure,dispersion similarity measure

This similarity measure has a range of –1 to +1.

DISPER (x,y)=ad−bc(a+b+c+d)2

Related Topics

Other Binary Measures (PROXIMITIES algorithms)
Ochiai Similarity Measure (PROXIMITIES algorithms)
Sokal and Sneath Similarity Measure 5 (PROXIMITIES algorithms)
Fourfold Point Correlation (Similarity) (PROXIMITIES algorithms)
Binary Euclidean Distance (PROXIMITIES algorithms)
Binary Squared Euclidean Distance (PROXIMITIES algorithms)
Size Difference (PROXIMITIES algorithms)
Pattern Difference (PROXIMITIES algorithms)
Binary Shape Difference (PROXIMITIES algorithms)
Variance Dissimilarity Measure (PROXIMITIES algorithms)
Binary Lance-and-Williams Nonmetric Dissimilarity Measure (PROXIMITIES algorithms)


Variance Dissimilarity Measure (PROXIMITIES algorithms)

PROXIMITIES algorithms,PROXIMITIES algorithms,PROXIMITIES algorithms
variance dissimilarity measure,variance dissimilarity measure,variance dissimilarity measure

This dissimilarity measure has a minimum value of 0 and no upper limit.

VARIANCE (x,y)=b+c4(a+b+c+d)

Related Topics

Other Binary Measures (PROXIMITIES algorithms)
Ochiai Similarity Measure (PROXIMITIES algorithms)
Sokal and Sneath Similarity Measure 5 (PROXIMITIES algorithms)
Fourfold Point Correlation (Similarity) (PROXIMITIES algorithms)
Binary Euclidean Distance (PROXIMITIES algorithms)
Binary Squared Euclidean Distance (PROXIMITIES algorithms)
Size Difference (PROXIMITIES algorithms)
Pattern Difference (PROXIMITIES algorithms)
Binary Shape Difference (PROXIMITIES algorithms)
Dispersion Similarity Measure (PROXIMITIES algorithms)
Binary Lance-and-Williams Nonmetric Dissimilarity Measure (PROXIMITIES algorithms)


Binary Lance-and-Williams Nonmetric Dissimilarity Measure (PROXIMITIES algorithms)

PROXIMITIES algorithms,PROXIMITIES algorithms,PROXIMITIES algorithms
binary Lance-and-Williams nonmetric dissimilarity measure,binary Lance-and-Williams nonmetric dissimilarity measure,binary Lance-and-Williams nonmetric dissimilarity measure
Bray-Curtis nonmetric coefficient,Bray-Curtis nonmetric coefficient,Bray-Curtis nonmetric coefficient

Also known as the Bray-Curtis nonmetric coefficient, this dissimilarity measure has a range of 0 to 1.

BLWMN (x,y)=b+c2a+b+c

Related Topics

Other Binary Measures (PROXIMITIES algorithms)
Ochiai Similarity Measure (PROXIMITIES algorithms)
Sokal and Sneath Similarity Measure 5 (PROXIMITIES algorithms)
Fourfold Point Correlation (Similarity) (PROXIMITIES algorithms)
Binary Euclidean Distance (PROXIMITIES algorithms)
Binary Squared Euclidean Distance (PROXIMITIES algorithms)
Size Difference (PROXIMITIES algorithms)
Pattern Difference (PROXIMITIES algorithms)
Binary Shape Difference (PROXIMITIES algorithms)
Dispersion Similarity Measure (PROXIMITIES algorithms)
Variance Dissimilarity Measure (PROXIMITIES algorithms)


References (PROXIMITIES algorithms)

PROXIMITIES algorithms,PROXIMITIES algorithms,PROXIMITIES algorithms
references,references,references

Anderberg, M. R. 1973. Cluster analysis for applications. New York: Academic Press.

Romesburg, H. C. 1984. Cluster analysis for researchers. Belmont, Calif.: Lifetime Learning Publications.

Related Topics

PROXIMITIES Algorithms
Standardizing Cases or Variables (PROXIMITIES algorithms)
Transformations (PROXIMITIES algorithms)
Proximities Measures (PROXIMITIES algorithms)


PROXSCAL Algorithms

PROXSCAL (command),PROXSCAL (command),PROXSCAL (command)
algorithms,algorithms,algorithms
Multidimensional Scaling,Multidimensional Scaling,Multidimensional Scaling
algorithms,algorithms,algorithms
PROXSCAL algorithms,PROXSCAL algorithms,PROXSCAL algorithms

PROXSCAL performs multidimensional scaling of proximity data to find a least-squares representation of the objects in a low-dimensional space. Individual differences models can be specified for multiple sources. A majorization algorithm guarantees monotone convergence for optionally transformed, metric and nonmetric data under a variety of models and constraints.

Detailed mathematical derivations concerning the algorithm can be found in Commandeur and Heiser (1993).

Related Topics

Notation (PROXSCAL algorithms)
Introduction (PROXSCAL algorithms)
Preliminaries (PROXSCAL algorithms)
Step 1: Initial Configuration (PROXSCAL algorithms)
Step 2: Configuration Update (PROXSCAL algorithms)
Step 3: Transformation Update (PROXSCAL algorithms)
Step 4: Termination (PROXSCAL algorithms)
Acceleration (PROXSCAL algorithms)
Lowering Dimensionality (PROXSCAL algorithms)
Stress Measures (PROXSCAL algorithms)
Decomposition of Normalized Raw Stress (PROXSCAL algorithms)
Transformations on Output (PROXSCAL algorithms)
References (PROXSCAL algorithms)


Notation (PROXSCAL algorithms)

PROXSCAL algorithms,PROXSCAL algorithms,PROXSCAL algorithms
notation,notation,notation

The following notation is used throughout this chapter unless otherwise stated. For the dimensions of the vectors and matrices:

n | Number of objects
m | Number of sources
p | Number of dimensions
s | Number of independent variables
h | Maximum(s, p)
l | Length of transformation vector
r | Degree of spline
t | Number of interior knots for spline

The input and input-related variables are:

Δk | n×n matrix with raw proximities for source k
Wk | n×n matrix with weights for source k
E | n×s matrix with raw independent variables
F | n×p matrix with fixed coordinates

Output and output-related variables are:

^
D
k

n×n matrix with transformed proximities for source k

Z

n×p matrix with common space coordinates

Ak

p×p matrix with space weights for source k

Xk

n×p matrix with individual space coordinates for source k

Q

n×h matrix with transformed independent variables

B

h×p matrix with regression weights for independent variables

S

l×(r+t) matrix of coefficients for the spline basis

Special matrices and functions are:

J

I−11 T /1 T 1, centering matrix of appropriate size

D(Xk)

n×n matrix with distances, with elements {dijk}, where dijk=
√ (xik−xjk)(xik−xjk)

Vk

n×n matrix with elements {vijk}, where vijk={
−wijk for i≠j
nΣl≠iwilk for i=j

B(Xk)

n×n×m matrix with elements {bijk}, where bijk={
−wijk(δijk)ij(Xk) if dij(Xk)>0 and i≠j
0 if dij(Xk)=0 and i≠j
−nΣl≠ibilk if i=j

Related Topics

PROXSCAL Algorithms
Introduction (PROXSCAL algorithms)
Preliminaries (PROXSCAL algorithms)
Step 1: Initial Configuration (PROXSCAL algorithms)
Step 2: Configuration Update (PROXSCAL algorithms)
Step 3: Transformation Update (PROXSCAL algorithms)
Step 4: Termination (PROXSCAL algorithms)
Acceleration (PROXSCAL algorithms)
Lowering Dimensionality (PROXSCAL algorithms)
Stress Measures (PROXSCAL algorithms)
Decomposition of Normalized Raw Stress (PROXSCAL algorithms)
Transformations on Output (PROXSCAL algorithms)
References (PROXSCAL algorithms)


Introduction (PROXSCAL algorithms)

PROXSCAL algorithms,PROXSCAL algorithms,PROXSCAL algorithms
loss function,loss function,loss function

The following loss function is minimized by PROXSCAL,

σ2≡1mmΣk=1nΣi<jwijk[
^
d
ijk−dij(Xk)]2

which is the weighted mean squared error between the transformed proximities and the distances of n objects within m sources. The transformation function for the proximities provides nonnegative, monotonically nondecreasing values for the transformed proximities
^
d
ijk. The distances d ij(Xk) are simply the Euclidean distances between the object points, with the coordinates in the rows of Xk.

The main algorithm consists of the following major steps:

1. find initial configurations Xk, and evaluate the loss function;

2. find an update for the configurations Xk;

3. find an update for the transformed proximities
^
d
ijk;

4. evaluate the loss function; if some predefined stop criterion is satisfied, stop; otherwise, go to step 2.

Related Topics

PROXSCAL Algorithms
Notation (PROXSCAL algorithms)
Preliminaries (PROXSCAL algorithms)
Step 1: Initial Configuration (PROXSCAL algorithms)
Step 2: Configuration Update (PROXSCAL algorithms)
Step 3: Transformation Update (PROXSCAL algorithms)
Step 4: Termination (PROXSCAL algorithms)
Acceleration (PROXSCAL algorithms)
Lowering Dimensionality (PROXSCAL algorithms)
Stress Measures (PROXSCAL algorithms)
Decomposition of Normalized Raw Stress (PROXSCAL algorithms)
Transformations on Output (PROXSCAL algorithms)
References (PROXSCAL algorithms)


Preliminaries (PROXSCAL algorithms)

At the start of the procedure, several preliminary computations are performed to handle missing weights or proximities, and initialize the raw proximities.

Related Topics

PROXSCAL Algorithms
Notation (PROXSCAL algorithms)
Introduction (PROXSCAL algorithms)
Step 1: Initial Configuration (PROXSCAL algorithms)
Step 2: Configuration Update (PROXSCAL algorithms)
Step 3: Transformation Update (PROXSCAL algorithms)
Step 4: Termination (PROXSCAL algorithms)
Acceleration (PROXSCAL algorithms)
Lowering Dimensionality (PROXSCAL algorithms)
Stress Measures (PROXSCAL algorithms)
Decomposition of Normalized Raw Stress (PROXSCAL algorithms)
Transformations on Output (PROXSCAL algorithms)
References (PROXSCAL algorithms)
Missing Values (PROXSCAL algorithms)
Proximities (PROXSCAL algorithms)
Transformations (PROXSCAL algorithms)
Normalization (PROXSCAL algorithms)


Missing Values (PROXSCAL algorithms)

On input, missing values may occur for both weights and proximities. If a weight is missing, it is set equal to zero. If a proximity is missing, the corresponding weight is set equal to zero.

Related Topics

Preliminaries (PROXSCAL algorithms)
Proximities (PROXSCAL algorithms)
Transformations (PROXSCAL algorithms)
Normalization (PROXSCAL algorithms)


Proximities (PROXSCAL algorithms)

Only the upper or lower triangular part (without the diagonal) of the proximity matrix is needed. In case both triangles are given, the weighted mean of both triangles is used. Next, the raw proximities are transformed such that similarities become dissimilarities by multiplying with -1, taking into account the conditionality, and setting the smallest dissimilarity equal to zero.

Related Topics

Preliminaries (PROXSCAL algorithms)
Missing Values (PROXSCAL algorithms)
Transformations (PROXSCAL algorithms)
Normalization (PROXSCAL algorithms)


Transformations (PROXSCAL algorithms)

For ordinal transformations, the nonmissing proximities are replaced by their ascending rank numbers, also taking into account the conditionality. For spline transformations, the spline basis S is computed.

Related Topics

Preliminaries (PROXSCAL algorithms)
Missing Values (PROXSCAL algorithms)
Proximities (PROXSCAL algorithms)
Normalization (PROXSCAL algorithms)


Normalization (PROXSCAL algorithms)

The proximities are normalized such that the weighted squared proximities equal the sum of the weights, again, taking into account the conditionality.

Related Topics

Preliminaries (PROXSCAL algorithms)
Missing Values (PROXSCAL algorithms)
Proximities (PROXSCAL algorithms)
Transformations (PROXSCAL algorithms)


Step 1: Initial Configuration (PROXSCAL algorithms)

PROXSCAL algorithms,PROXSCAL algorithms,PROXSCAL algorithms
initial configuration,initial configuration,initial configuration

PROXSCAL allows for several initial configurations. Before determining the initial configuration, missings are handled, and the raw proximities are initialized. Finally, after one of the starts described below, the common space Z is centered on the origin and optimally dilated in accordance with the normalized proximities.

Related Topics

PROXSCAL Algorithms
Notation (PROXSCAL algorithms)
Introduction (PROXSCAL algorithms)
Preliminaries (PROXSCAL algorithms)
Step 2: Configuration Update (PROXSCAL algorithms)
Step 3: Transformation Update (PROXSCAL algorithms)
Step 4: Termination (PROXSCAL algorithms)
Acceleration (PROXSCAL algorithms)
Lowering Dimensionality (PROXSCAL algorithms)
Stress Measures (PROXSCAL algorithms)
Decomposition of Normalized Raw Stress (PROXSCAL algorithms)
Transformations on Output (PROXSCAL algorithms)
References (PROXSCAL algorithms)
Simplex Start (PROXSCAL algorithms)
Torgerson Start (PROXSCAL algorithms)
(Multiple) Random Start (PROXSCAL algorithms)
User-Provided Start (PROXSCAL algorithms)


Simplex Start (PROXSCAL algorithms)

The simplex start consists of a rank-p approximation of the matrix V−B(J). Set H, an n×p columnwise orthogonal matrix, satisfying H T H=Ip, where Ip denotes the matrix with the first p columns of the identity matrix. The nonzero rows are selected in such a way that the first Z=B(J)H contains the p columns of B(J) with the largest diagonal elements. The following steps are computed in turn, until convergence is reached:

1. For a fixed Z, H=PQT, where PQT is taken from the singular value decomposition B(J)Z=PLQT;

2. For a fixed H, Z=2−1/2V−B(J)H, where V− is the pseudo-inverse of V.

For a restricted common space Z, the second step is adjusted in order to fullfill the restictions. This procedure was introduced in Heiser (1985).

Related Topics

Step 1: Initial Configuration (PROXSCAL algorithms)
Torgerson Start (PROXSCAL algorithms)
(Multiple) Random Start (PROXSCAL algorithms)
User-Provided Start (PROXSCAL algorithms)


Torgerson Start (PROXSCAL algorithms)

The proximities are aggregated over sources, squared, double centered and multiplied with −0.5, after which an eigenvalue decomposition is used to determine the coordinate values, thus

−0.5JD*J=QΛQ T

where elements of D* are defined as

d*ij=(mΣk=1wijk
^
d
2ijk)(mΣk=1wijk)−1

followed by Z=QΛ1/2, where only the first p positive ordered eigenvalues (λ1≥λ2≥...≥λn) and eigenvectors are used. This technique, classical scaling, is due to Torgerson (1952, 1958) and Gower (1966) and also known under the names Torgerson scaling or Torgerson-Gower scaling.

Related Topics

Step 1: Initial Configuration (PROXSCAL algorithms)
Simplex Start (PROXSCAL algorithms)
(Multiple) Random Start (PROXSCAL algorithms)
User-Provided Start (PROXSCAL algorithms)


(Multiple) Random Start (PROXSCAL algorithms)

The coordinate values are randomly generated from a uniform distribution using the default random number generator from PASW Statistics.

Related Topics

Step 1: Initial Configuration (PROXSCAL algorithms)
Simplex Start (PROXSCAL algorithms)
Torgerson Start (PROXSCAL algorithms)
User-Provided Start (PROXSCAL algorithms)


User-Provided Start (PROXSCAL algorithms)

The coordinate values provided by the user are used.

Related Topics

Step 1: Initial Configuration (PROXSCAL algorithms)
Simplex Start (PROXSCAL algorithms)
Torgerson Start (PROXSCAL algorithms)
(Multiple) Random Start (PROXSCAL algorithms)


Step 2: Configuration Update (PROXSCAL algorithms)

PROXSCAL algorithms,PROXSCAL algorithms,PROXSCAL algorithms
configuration update,configuration update,configuration update

The coordinates of the common space and the space weights (if applicable) are updated.

Related Topics

PROXSCAL Algorithms
Notation (PROXSCAL algorithms)
Introduction (PROXSCAL algorithms)
Preliminaries (PROXSCAL algorithms)
Step 1: Initial Configuration (PROXSCAL algorithms)
Step 3: Transformation Update (PROXSCAL algorithms)
Step 4: Termination (PROXSCAL algorithms)
Acceleration (PROXSCAL algorithms)
Lowering Dimensionality (PROXSCAL algorithms)
Stress Measures (PROXSCAL algorithms)
Decomposition of Normalized Raw Stress (PROXSCAL algorithms)
Transformations on Output (PROXSCAL algorithms)
References (PROXSCAL algorithms)
Update for the Common Space (PROXSCAL algorithms)
Update for the Space Weights (PROXSCAL algorithms)
Restrictions (PROXSCAL algorithms)
Fixed Coordinates (PROXSCAL algorithms)
Independent Variables (PROXSCAL algorithms)


Update for the Common Space (PROXSCAL algorithms)

The common space Z is related to the individual spaces Xk through the model Xk=ZAk, where Ak are matrices containing space weights. Assume that weight matrix Ak is of full rank. Only considering Z defines the loss function as

σ2(z)=c+z T Hz−2z T t,

where

z≡ vec (Z),
H≡1mmΣk=1(AkA T kVk),
t≡ vec (1mmΣk=1B(Xk)XkA T k),

for which a solution is found as

z=H−t

Several special cases exist for which the solution can be simplified. First, the weights matrices Wk may all be equal, or even all equal to one. In these cases H will simplify, as will the pseudo-inverse of H. Another simplification is concerned with the different models, reflected in restrictions for the space weights. This model is the generalized Euclidean model, also known as IDIOSCAL (Carroll and Chang, 1972). The weighted Euclidean model, or INDSCAL, restricts Ak to be diagonal, which does simplify H, but not the pseudo-inverse. The identity model requires Ak=I for all k, and does simplify H and its pseudo-inverse, for the kronecker product vanishes.

To avoid computing the pseudo-inverse of a large matrix, PROXSCAL uses three technical simplifications when appropriate. First, the pseudo-inverse can be replaced by a proper inverse by adding the nullspace, taking the proper inverse and then subtracting the nullspace again as

H−=(H+N)−1−N

where N=(11 T )/(1 T 1). Furthermore, a dimensionwise approach (Heiser and Stoop, 1986) is used which results in a solution for dimension a of Z as

za=V−aza,

where

Va=1mmΣk=1Vke T aAkA T kea,

where ea is the ath column of an identity matrix, and

za=1mmΣk=1[B(Xk)XkA T k−VkPaAkA T k]ea,

with Pa an n×p matrix equal to Z, but with the ath column containing zeros.

Still, the proper inverse of a n×n matrix is required. The final simplification is concerned with a majorization function in which the largest eigenvalue of V allows for an easy update (Heiser, 1987; Groenen, Heiser, and Meulman, 1999). Instead of the largest eigenvalue itself, an upper bound is used for this scalar (Wolkowicz and Styan, 1980).

Related Topics

Step 2: Configuration Update (PROXSCAL algorithms)
Update for the Space Weights (PROXSCAL algorithms)
Restrictions (PROXSCAL algorithms)
Fixed Coordinates (PROXSCAL algorithms)
Independent Variables (PROXSCAL algorithms)


Update for the Space Weights (PROXSCAL algorithms)

An update for the space weights Ak(k=1,...,m) for the generalized Euclidean model is given by

Ak=(Z T VkZ) -1 (Z T B(Xk)Xk)

Suppose PkLkQ T k is the singular value decomposition of Ak for which the diagonal matrix with singular values Lk is in nonincreasing order. Then, for the reduced rank model, the best r(r<p) rank approximation of Ak is given by RkT T k, where Rk contains the first r columns of PkLk, and Tk contains the first r columns of Qk.

For the weighted Euclidean model, the update reduces to a diagonal matrix

Ak= diag (Z T VkZ) -1 diag (Z T B(Xk)Xk)

The space weights for the identity model need no update, since Ak=I for all k. Simplifications can be obtained if all weights W are equal to one and for the reduced rank model, which can be done in r dimensions, as explained in Heiser and Stoop (1986).

Related Topics

Step 2: Configuration Update (PROXSCAL algorithms)
Update for the Common Space (PROXSCAL algorithms)
Restrictions (PROXSCAL algorithms)
Fixed Coordinates (PROXSCAL algorithms)
Independent Variables (PROXSCAL algorithms)


Restrictions (PROXSCAL algorithms)

The user can impose restrictions on the common space by fixing some of the coordinates or specifying that the common space is a weighted sum of independent variables.

Related Topics

Step 2: Configuration Update (PROXSCAL algorithms)
Update for the Common Space (PROXSCAL algorithms)
Update for the Space Weights (PROXSCAL algorithms)
Fixed Coordinates (PROXSCAL algorithms)
Independent Variables (PROXSCAL algorithms)


Fixed Coordinates (PROXSCAL algorithms)

If some of the coordinates of Z are fixed by the user, then only the free coordinates of Z need to be updated. The dimensionwise approach is taken one step further, which results in an update for object i on dimension a as

z+ia=1e T iVaeie T i[1mmΣk=1B(Xk)XkA T kea−1mpΣj≠a(mΣk=1e T jAkA T keaVk)zj]−1e T iVaeie T iVa
˜
z
ia

where the ath column of Z is divided into za=
˜
z
ia+ziaei, with ei the ith column of the identity matrix, and Va=1mmΣk=1e T jAkA T keaVk.

This update procedure will only locally minimize the loss function, and repeatedly cycling through all free coordinates until convergence is reached, will provide global optimization. After all free coordinates have been updated, Z is centered on the origin. On output, the configuration is adapted as to coincide with the initial fixed coordinates.

Related Topics

Step 2: Configuration Update (PROXSCAL algorithms)
Update for the Common Space (PROXSCAL algorithms)
Update for the Space Weights (PROXSCAL algorithms)
Restrictions (PROXSCAL algorithms)
Independent Variables (PROXSCAL algorithms)


Independent Variables (PROXSCAL algorithms)

Independent variables Q are used to express the coordinates of the common space Z as a weighted sum of these independent variables as

Z=QB=hΣj=1qjb T j

An update for Z is found by performing the following calculations for j=1,...,h:

1. Uj=hΣk≠jqkb T k

2. Tj=C−1mmΣk=1VkUjAkA T k, where C=1mmΣk=1B(Xk)XkA T k

3. update bj as bj=(1mmΣk=1qjVkqjAkA T k)−1T T jqj

4. optionally, compute optimally transformed variables by regressing
˜
q
j=1k1Tjbj+(I−1k1Vj)qj, where Vj=1mmΣk=1b T jAkA T kbjVk and k1 is greater than or equal to the largest eigenvalue of Vj, on the original variable qj. Missing elements in the original variable are replaced with the corresponding values from
˜
q
j.

Finally, set Z=QB=hΣj=1qjb T j.

Independent variables restrictions were introduced for the MDS model in Bentler and Weeks (1978), Bloxom (1978), de Leeuw and Heiser (1980) and Meulman and Heiser (1984). If there are more dimensions (p) than independent variables (s), p−s dummy variables are created and treated completely free in the analysis. The transformations for the independent variables from Step 4 are identical to the transformations of the proximities, except that the nonnegativety constraint does not apply. After transformation, the variables q are centered on the origin, normalized on n, and the reverse normalization is applied to the regression weights b.

Related Topics

Step 2: Configuration Update (PROXSCAL algorithms)
Update for the Common Space (PROXSCAL algorithms)
Update for the Space Weights (PROXSCAL algorithms)
Restrictions (PROXSCAL algorithms)
Fixed Coordinates (PROXSCAL algorithms)


Step 3: Transformation Update (PROXSCAL algorithms)

PROXSCAL algorithms,PROXSCAL algorithms,PROXSCAL algorithms
transformation update,transformation update,transformation update

The values of the transformed proximities are updated.

Related Topics

PROXSCAL Algorithms
Notation (PROXSCAL algorithms)
Introduction (PROXSCAL algorithms)
Preliminaries (PROXSCAL algorithms)
Step 1: Initial Configuration (PROXSCAL algorithms)
Step 2: Configuration Update (PROXSCAL algorithms)
Step 4: Termination (PROXSCAL algorithms)
Acceleration (PROXSCAL algorithms)
Lowering Dimensionality (PROXSCAL algorithms)
Stress Measures (PROXSCAL algorithms)
Decomposition of Normalized Raw Stress (PROXSCAL algorithms)
Transformations on Output (PROXSCAL algorithms)
References (PROXSCAL algorithms)
Conditionality (PROXSCAL algorithms)
Transformation Functions (PROXSCAL algorithms)
Normalization (PROXSCAL algorithms)


Conditionality (PROXSCAL algorithms)

Two types of conditionalities exist in PROXSCAL. Conditionality refers to the possible comparison of proximities in the transformation step. For unconditional transformations, all proximities are allowed to be compared with each other, irrespective of the source. Matrix-conditional transformations only allow for comparison of proximities within one matrix k, in PROXSCAL refered to as one source k. Here, the transformation is computed for each source seperately (thus m times).

Related Topics

Step 3: Transformation Update (PROXSCAL algorithms)
Transformation Functions (PROXSCAL algorithms)
Normalization (PROXSCAL algorithms)


Transformation Functions (PROXSCAL algorithms)

All transformation functions in PROXSCAL result in nonnegative values for the transformed proximities. After the transformation, the transformed proximities are normalized and the common space is optimally dilated accordingly. The following transformations are available.

Ratio.
^
D
=Δ. No transformation is necessary, since the scale of
^
D
is adjusted in the normalization step.

Interval.
^
D
=α+βΔ. Both α and β are computed using linear regression, in such a way that both parameters are nonnegative.

Ordinal.
^
D
= WMON (Δ,W). Weighted monotone regression (WMON) is computed using the up-and-down-blocks minimum violators algorithm (Kruskal, 1964; Barlow et al., 1972). For the secondary approach to ties, ties are kept tied, the proximities within tieblocks are first contracted and expanded afterwards.

Spline. vec (
^
D
)=Sb. PROXSCAL uses monotone spline transformations (Ramsay, 1988). In this case, the spline transformation gives a smooth nondecreasing piecewise polynomial transformation. It is computed as a weighted regression of D on the spline basis S. Regression weights b are restricted to be nonnegative and computed using nonnegative alternating least squares (Groenen, van Os and Meulman, 2000).

Related Topics

Step 3: Transformation Update (PROXSCAL algorithms)
Conditionality (PROXSCAL algorithms)
Normalization (PROXSCAL algorithms)


Normalization (PROXSCAL algorithms)

After transformation, the transformed proximities are normalized such that the sum-of-squares of the weighted transformed proximities are equal to mn(n−1)/2 in the unconditional case and equal to n(n−1)/2 in the matrix-conditional case.

Related Topics

Step 3: Transformation Update (PROXSCAL algorithms)
Conditionality (PROXSCAL algorithms)
Transformation Functions (PROXSCAL algorithms)


Step 4: Termination (PROXSCAL algorithms)

After evaluation of the loss function, the old function value and new function values are used to decide whether iterations should continue. If the new function value is smaller than or equal to the minimum Stress value MINSTRESS, provided by the user, iterations are terminated. Also, if the difference in consecutive Stress values is smaller than or equal to the convergence criterion DIFFSTRESS, provided by the user, iterations are terminated. Finally, iterations are terminated if the current number of iterations, exceeds the maximum number of iterations MAXITER, also provided by the user. In all other cases, iterations continue.

Related Topics

PROXSCAL Algorithms
Notation (PROXSCAL algorithms)
Introduction (PROXSCAL algorithms)
Preliminaries (PROXSCAL algorithms)
Step 1: Initial Configuration (PROXSCAL algorithms)
Step 2: Configuration Update (PROXSCAL algorithms)
Step 3: Transformation Update (PROXSCAL algorithms)
Acceleration (PROXSCAL algorithms)
Lowering Dimensionality (PROXSCAL algorithms)
Stress Measures (PROXSCAL algorithms)
Decomposition of Normalized Raw Stress (PROXSCAL algorithms)
Transformations on Output (PROXSCAL algorithms)
References (PROXSCAL algorithms)


Acceleration (PROXSCAL algorithms)

PROXSCAL algorithms,PROXSCAL algorithms,PROXSCAL algorithms
acceleration,acceleration,acceleration

For the identity model without further restictions, the common space can be updated with acceleration as Z new =2Z update −Z old , also refered to as the relaxed update.

Related Topics

PROXSCAL Algorithms
Notation (PROXSCAL algorithms)
Introduction (PROXSCAL algorithms)
Preliminaries (PROXSCAL algorithms)
Step 1: Initial Configuration (PROXSCAL algorithms)
Step 2: Configuration Update (PROXSCAL algorithms)
Step 3: Transformation Update (PROXSCAL algorithms)
Step 4: Termination (PROXSCAL algorithms)
Lowering Dimensionality (PROXSCAL algorithms)
Stress Measures (PROXSCAL algorithms)
Decomposition of Normalized Raw Stress (PROXSCAL algorithms)
Transformations on Output (PROXSCAL algorithms)
References (PROXSCAL algorithms)


Lowering Dimensionality (PROXSCAL algorithms)

For a restart in p−1 dimensions, the p−1 most important dimensions need to be identified. For the identity model, the first p−1 principal axes are used. For the weighted Euclidean model, the p−1 most important space weights are used, and for the generalized Euclidean and reduced rank models, the p−1 largest singular values of the space weights determine the remaining dimensions.

Related Topics

PROXSCAL Algorithms
Notation (PROXSCAL algorithms)
Introduction (PROXSCAL algorithms)
Preliminaries (PROXSCAL algorithms)
Step 1: Initial Configuration (PROXSCAL algorithms)
Step 2: Configuration Update (PROXSCAL algorithms)
Step 3: Transformation Update (PROXSCAL algorithms)
Step 4: Termination (PROXSCAL algorithms)
Acceleration (PROXSCAL algorithms)
Stress Measures (PROXSCAL algorithms)
Decomposition of Normalized Raw Stress (PROXSCAL algorithms)
Transformations on Output (PROXSCAL algorithms)
References (PROXSCAL algorithms)


Stress Measures (PROXSCAL algorithms)

PROXSCAL algorithms,PROXSCAL algorithms,PROXSCAL algorithms
stress measures,stress measures,stress measures

The following statistics are used for the computation of the Stress measures:

η 2 (
^
D
)=mΣk=1nΣi<jwijk
^
d
2ijk
η 4 (
^
D
)=mΣk=1nΣi<jwijk
^
d
4ijk
η 2 (X)=mΣk=1nΣi<jwijk d 2 ij(Xk)
η 4 (X)=mΣk=1nΣi<jwijk d 4 ij(Xk)
ρ(X)=mΣk=1nΣi<jwijk
^
d
ijk d ij(Xk)
ρ2(X)=mΣk=1nΣi<jwijk
^
d
2ijk d 2 ij(Xk)
κ2(X)=mΣk=1nΣi<jwijk( d ij(Xk)− d (X))2

where d (X) is the average distance.

The loss function minimized by PROXSCAL, normalized raw Stress, is given by:

σ2=η 2 (
^
D
)+η2(αX)−2ρ(αX)η 2 (
^
D
), with α=ρ(X)η2(X).

Note that at a local minimum of X, α is equal to one. The other Fit and Stress measures provided by PROXSCAL are given by:

Stress-I: η 2 (
^
D
)+η2(αX)−2ρ(αX)η 2 (αX), with α=η2(
^
D
)ρ(X).

Stress-II: η 2 (
^
D
)+η2(αX)−2ρ(αX)κ 2 (αX), with α=η2(
^
D
)ρ(X).

S-Stress: η 4 (
^
D
)+η4(αX)−2ρ2(αX), with α2=ρ2(X)η4(X).

Dispersion Accounted For (DAF): 1−σ2.

Tucker's coefficient of congruence:
√ 1- σ 2
.

Related Topics

PROXSCAL Algorithms
Notation (PROXSCAL algorithms)
Introduction (PROXSCAL algorithms)
Preliminaries (PROXSCAL algorithms)
Step 1: Initial Configuration (PROXSCAL algorithms)
Step 2: Configuration Update (PROXSCAL algorithms)
Step 3: Transformation Update (PROXSCAL algorithms)
Step 4: Termination (PROXSCAL algorithms)
Acceleration (PROXSCAL algorithms)
Lowering Dimensionality (PROXSCAL algorithms)
Decomposition of Normalized Raw Stress (PROXSCAL algorithms)
Transformations on Output (PROXSCAL algorithms)
References (PROXSCAL algorithms)


Decomposition of Normalized Raw Stress (PROXSCAL algorithms)

PROXSCAL algorithms,PROXSCAL algorithms,PROXSCAL algorithms
stress decomposition,stress decomposition,stress decomposition

Each part of normalized raw Stress, as described before, is assigned to objects and sources. Either sum over objects or sum over sources are equal to total normalized raw Stress.

Related Topics

PROXSCAL Algorithms
Notation (PROXSCAL algorithms)
Introduction (PROXSCAL algorithms)
Preliminaries (PROXSCAL algorithms)
Step 1: Initial Configuration (PROXSCAL algorithms)
Step 2: Configuration Update (PROXSCAL algorithms)
Step 3: Transformation Update (PROXSCAL algorithms)
Step 4: Termination (PROXSCAL algorithms)
Acceleration (PROXSCAL algorithms)
Lowering Dimensionality (PROXSCAL algorithms)
Stress Measures (PROXSCAL algorithms)
Transformations on Output (PROXSCAL algorithms)
References (PROXSCAL algorithms)


Transformations on Output (PROXSCAL algorithms)

On output, whenever fixed coordinates or independent variables do not apply, the models are not unique. In these cases transformations of the common space and the space weights are in order.

For the identity model, the common space Z is rotated to principal axes. For the weighted Euclidean model, Z=
√ n
Z( diag Z T Z)−1/2 so that diag (Z T Z)=nI, and reverse tranformations are applied to the space weights Ak. Further, the sum over sources of the squared space weights are put in descending order as to specify the importance of the dimensions. For the generalized Euclidean model, the Cholesky decomposition Z T Z=LL T specifies the common space on output as Z=
√ n
Z(L T )−1, so that Z T Z=nI.

Related Topics

PROXSCAL Algorithms
Notation (PROXSCAL algorithms)
Introduction (PROXSCAL algorithms)
Preliminaries (PROXSCAL algorithms)
Step 1: Initial Configuration (PROXSCAL algorithms)
Step 2: Configuration Update (PROXSCAL algorithms)
Step 3: Transformation Update (PROXSCAL algorithms)
Step 4: Termination (PROXSCAL algorithms)
Acceleration (PROXSCAL algorithms)
Lowering Dimensionality (PROXSCAL algorithms)
Stress Measures (PROXSCAL algorithms)
Decomposition of Normalized Raw Stress (PROXSCAL algorithms)
References (PROXSCAL algorithms)


References (PROXSCAL algorithms)

PROXSCAL algorithms,PROXSCAL algorithms,PROXSCAL algorithms
references,references,references

Barlow, R. E., D. J. Bartholomew, D. J. Bremner, and H. D. Brunk. 1972. Statistical inference under order restrictions. New York: John Wiley and Sons.

Bentler, P. M., and D. G. Weeks. 1978. Restricted multidimensional scaling models. Journal of Mathematical Psychology, 17, 138-151.

Bloxom, B. 1978. Contrained multidimensional scaling in n spaces. Psychometrika, 43, 397-408.

Carroll, J. D., and J. J. Chang. 1972. IDIOSCAL (Individual differences in orientation scaling). Paper presented at the spring meeting of the Psychometric Society, Princeton, New Jersey. : .

Commandeur, J. J. F., and W. J. Heiser. 1993. Mathematical derivations in the proximity scaling (PROXSCAL) of symmetric data matrices. Leiden: Department of Data Theory, University of Leiden.

De Leeuw, J. 1977. Applications of convex analysis to multidimensional scaling. In: Recent developments in statistics, J. R. Barra, F. Brodeau, G. Romier, and B. van Cutsem, eds. Amsterdam, The Netherlands: North-Holland.

De Leeuw, J., and W. J. Heiser. 1980. Multidimensional scaling with restrictions on the configuration. In: Multivariate Analysis, Vol. V, P. R. Krishnaiah, eds. Amsterdam: North-Holland.

Gower, J. C. 1966. Some distance properties of latent root and vector methods used in multivariate analysis. Biometrika, 53, 325-338.

Groenen, P. J. F., W. J. Heiser, and J. J. Meulman. 1999. Global optimization in least squares multidimensional scaling by distance smoothing. Journal of Classification, 16, 225-254.

Groenen, P. J. F., B. van Os, and J. J. Meulman. 2000. Optimal scaling by alternating length-constained nonnegative least squares, with application to distance-based analysis. Psychometrika, 65, 511-524.

Heiser, W. J. 1985. A general MDS initialization procedure using the SMACOF algorithm-model with constraints: Technical Report No. RR-85-23. Leiden: Department of Data Theory, University of Leiden.

Heiser, W. J. 1987. Joint ordination of species and sites: The unfolding technique. In: Developments in numerical ecology, P. Legendre, and L. Legendre, eds. Berlin, Heidelberg: Springer-Verlag.

Heiser, W. J., and J. De Leeuw. 1986. SMACOF-I: Technical Report No. UG-86-02. Leiden: Department of Data Theory, University of Leiden.

Heiser, W. J., and I. Stoop. 1986. Explicit SMACOF algorithms for individual differences scaling: Technical Report No. RR-86-14. Leiden: Department of Data Theory, University of Leiden.

Kruskal, J. B. 1964. Nonmetric multidimensional scaling: A numerical method. Psychometrika, 29, 115-129.

Meulman, J. J., and W. J. Heiser. 1984. Constrained Multidimensional Scaling: more Directions than Dimensions. In: COMPSTAT 1984, T. Havranek, eds. Wien: Physica Verlag.

Ramsay, J. O. 1989. Monotone regression splines in action. Statistical Science, 4, 425-441.

Stoop, I., W. J. Heiser, and J. De Leeuw. 1981. How to use SMACOF-IA. Leiden: Department of Data Theory.

Stoop, I., and J. De Leeuw. 1982. How to use SMACOF-IB. Leiden: Department of Data Theory.

Torgerson, W. S. 1952. Multidimensional scaling: I. Theory and method. Psychometrika, 17, 401-419.

Torgerson, W. S. 1958. Theory and methods of scaling. New York: Wiley.

Wolkowicz, H., and G. P. H. Styan. 1980. Bounds for eigenvalues using traces. Linear algebra and its applications, 29, 471-506.

Related Topics

PROXSCAL Algorithms
Notation (PROXSCAL algorithms)
Introduction (PROXSCAL algorithms)
Preliminaries (PROXSCAL algorithms)
Step 1: Initial Configuration (PROXSCAL algorithms)
Step 2: Configuration Update (PROXSCAL algorithms)
Step 3: Transformation Update (PROXSCAL algorithms)
Step 4: Termination (PROXSCAL algorithms)
Acceleration (PROXSCAL algorithms)
Lowering Dimensionality (PROXSCAL algorithms)
Stress Measures (PROXSCAL algorithms)
Decomposition of Normalized Raw Stress (PROXSCAL algorithms)
Transformations on Output (PROXSCAL algorithms)


QUICK CLUSTER Algorithms

QUICK CLUSTER (command),QUICK CLUSTER (command),QUICK CLUSTER (command)
algorithms,algorithms,algorithms
K-Means Cluster Analysis,K-Means Cluster Analysis,K-Means Cluster Analysis
algorithms,algorithms,algorithms
k-means cluster analysis algorithms,k-means cluster analysis algorithms,k-means cluster analysis algorithms

When the desired number of clusters is known, QUICK CLUSTER groups cases efficiently into clusters.

Related Topics

Notation (k-means cluster analysis algorithms)
Algorithm (k-means cluster analysis algorithms)
Step 1: Select Initial Cluster Centers (k-means cluster analysis algorithms)
Step 2: Update Initial Cluster Centers (k-means cluster analysis algorithms)
Step 3: Assign Cases to the Nearest Cluster (k-means cluster analysis algorithms)
References (k-means cluster analysis algorithms)


Notation (k-means cluster analysis algorithms)

k-means cluster analysis algorithms,k-means cluster analysis algorithms,k-means cluster analysis algorithms
notation,notation,notation

The following notation is used throughout this section unless otherwise stated:

NC | Number of clusters requested
Mi | Mean of ith cluster
xk | Vector of kth observation
d(xi,xj) | Euclidean distance between vectors xi and xj
dmn | mini,jd(Mi,Mj)
ε | Convergence criteria

Related Topics

QUICK CLUSTER Algorithms
Algorithm (k-means cluster analysis algorithms)
Step 1: Select Initial Cluster Centers (k-means cluster analysis algorithms)
Step 2: Update Initial Cluster Centers (k-means cluster analysis algorithms)
Step 3: Assign Cases to the Nearest Cluster (k-means cluster analysis algorithms)
References (k-means cluster analysis algorithms)


Algorithm (k-means cluster analysis algorithms)

k-means cluster analysis algorithms,k-means cluster analysis algorithms,k-means cluster analysis algorithms
algorithm,algorithm,algorithm

The first iteration involves three steps.

• Step 1: Select Initial Cluster Centers

• Step 2: Update Initial Cluster Centers

• Step 3: Assign Cases to the Nearest Cluster

Related Topics

Step 1: Select Initial Cluster Centers (k-means cluster analysis algorithms)
Step 2: Update Initial Cluster Centers (k-means cluster analysis algorithms)
Step 3: Assign Cases to the Nearest Cluster (k-means cluster analysis algorithms)
QUICK CLUSTER Algorithms
Notation (k-means cluster analysis algorithms)
References (k-means cluster analysis algorithms)


Step 1: Select Initial Cluster Centers (k-means cluster analysis algorithms)

k-means cluster analysis algorithms,k-means cluster analysis algorithms,k-means cluster analysis algorithms
select initial cluster centers,select initial cluster centers,select initial cluster centers

To select the initial cluster centers, a single pass of the data is made. The values of the first NC cases with no missing values are assigned as cluster centers, then the remaining cases are processed as follows:

If minid(xk,Mi)>dmn and d(xk,Mm)>d(xk,Mn), then xk replaces Mn. If minid(xk,Mi)>dmn and d(xk,Mm)<d(xk,Mn), then xk replaces Mm; that is, if the distance between xk and its closest cluster mean is greater than the distance between the two closest means (Mm and Mn), then xk replaces either Mm or Mn, whichever is closer to xk.

If xk does not replace a cluster mean in (a), a second test is made:
Let Mq be the closest cluster mean to xk.
Let Mp be the second closest cluster mean to xk.
If d(xk,Mp)>minid(Mq,Mi), then Mq=xk;
That is, if xk is further from the second closest cluster’s center than the closest cluster’s center is from any other cluster’s center, replace the closest cluster’s center with xk.

At the end of one pass through the data, the initial means of all NC clusters are set. Note that if NOINITIAL is specified, the first NC cases with no missing values are the initial cluster means.

Related Topics

Algorithm (k-means cluster analysis algorithms)
Step 2: Update Initial Cluster Centers (k-means cluster analysis algorithms)
Step 3: Assign Cases to the Nearest Cluster (k-means cluster analysis algorithms)
QUICK CLUSTER Algorithms
Notation (k-means cluster analysis algorithms)
References (k-means cluster analysis algorithms)


Step 2: Update Initial Cluster Centers (k-means cluster analysis algorithms)

k-means cluster analysis algorithms,k-means cluster analysis algorithms,k-means cluster analysis algorithms
update initial cluster centers,update initial cluster centers,update initial cluster centers

Starting with the first case, each case in turn is assigned to the nearest cluster, and that cluster mean is updated. Note that the initial cluster center is included in this mean. The updated cluster means are the classification cluster centers.

Note that if NOUPDATE is specified, this step is skipped.

Related Topics

Algorithm (k-means cluster analysis algorithms)
Step 1: Select Initial Cluster Centers (k-means cluster analysis algorithms)
Step 3: Assign Cases to the Nearest Cluster (k-means cluster analysis algorithms)
QUICK CLUSTER Algorithms
Notation (k-means cluster analysis algorithms)
References (k-means cluster analysis algorithms)


Step 3: Assign Cases to the Nearest Cluster (k-means cluster analysis algorithms)

k-means cluster analysis algorithms,k-means cluster analysis algorithms,k-means cluster analysis algorithms
assign cases to nearest cluster,assign cases to nearest cluster,assign cases to nearest cluster

The third pass through the data assigns each case to the nearest cluster, where distance from a cluster is the Euclidean distance between that case and the (updated) classification centers. Final cluster means are then calculated as the average values of clustering variables for cases assigned to each cluster. Final cluster means do not contain classification centers.

When the number of iterations is greater than one, the final cluster means in step 3 are set to the classification cluster means in the end of step 2, and QUICK CLUSTER repeats step 3 again. The algorithm stops when either the maximum number of iterations is reached or the maximum change of cluster centers in two successive iterations is smaller than ε times the minimum distance among the initial cluster centers.

Related Topics

Algorithm (k-means cluster analysis algorithms)
Step 1: Select Initial Cluster Centers (k-means cluster analysis algorithms)
Step 2: Update Initial Cluster Centers (k-means cluster analysis algorithms)
QUICK CLUSTER Algorithms
Notation (k-means cluster analysis algorithms)
References (k-means cluster analysis algorithms)


References (k-means cluster analysis algorithms)

k-means cluster analysis algorithms,k-means cluster analysis algorithms,k-means cluster analysis algorithms
references,references,references

Hartigan, J. A. 1975. Clustering algorithms. New York: John Wiley and Sons.

Related Topics

QUICK CLUSTER Algorithms
Notation (k-means cluster analysis algorithms)
Algorithm (k-means cluster analysis algorithms)
Step 1: Select Initial Cluster Centers (k-means cluster analysis algorithms)
Step 2: Update Initial Cluster Centers (k-means cluster analysis algorithms)
Step 3: Assign Cases to the Nearest Cluster (k-means cluster analysis algorithms)


RANK Algorithms

RANK (command),RANK (command),RANK (command)
algorithms,algorithms,algorithms
ranking cases,ranking cases,ranking cases
algorithms,algorithms,algorithms
RANK algorithms,RANK algorithms,RANK algorithms

RANK produces new variables containing ranks, normal scores, and Savage and related scores for numeric variables.

Related Topics

Notation (RANK algorithms)
Statistics (RANK algorithms)
Rank (RANK algorithms)
RFRACTION (RANK algorithms)
PERCENT (RANK algorithms)
PROPORTION Estimate for Cumulative Proportion (RANK algorithms)
NORMAL (a) (RANK algorithms)
NITLES (K) (RANK algorithms)
SAVAGE (S) (RANK algorithms)
References (RANK algorithms)


Notation (RANK algorithms)

RANK algorithms,RANK algorithms,RANK algorithms
notation,notation,notation

Let y1<y2< ... <ym be m distinct ordered observations for the sample and C1,C2, ...,Cm be the corresponding sum of caseweights for each value. Define

CCi=iΣk=1Ck= cumulative sum of caseweights up to yi
W=CCm=mΣk=1Ck= total sum of caseweights

Related Topics

RANK Algorithms
Statistics (RANK algorithms)
Rank (RANK algorithms)
RFRACTION (RANK algorithms)
PERCENT (RANK algorithms)
PROPORTION Estimate for Cumulative Proportion (RANK algorithms)
NORMAL (a) (RANK algorithms)
NITLES (K) (RANK algorithms)
SAVAGE (S) (RANK algorithms)
References (RANK algorithms)


Statistics (RANK algorithms)

RANK algorithms,RANK algorithms,RANK algorithms
statistics,statistics,statistics

The following statistics are available.

Related Topics

Rank (RANK algorithms)
RFRACTION (RANK algorithms)
PERCENT (RANK algorithms)
PROPORTION Estimate for Cumulative Proportion (RANK algorithms)
NORMAL (a) (RANK algorithms)
NITLES (K) (RANK algorithms)
SAVAGE (S) (RANK algorithms)
RANK Algorithms
Notation (RANK algorithms)
References (RANK algorithms)


Rank (RANK algorithms)

RANK algorithms,RANK algorithms,RANK algorithms
Rank (Ri),Rank (Ri),Rank (Ri)

A rank is assigned to each case based on four different ways of treating ties or caseweights not equal to 1.

For every i, i=1,...,m,

(a) if Ci≥1

Ri=CCi−1+1 | if TIES = LOW
Ri=CCi | if TIES = HIGH
Ri=CCi−1+(Ci+1)/2 | if TIES = MEAN
Ri=i | if TIES = CONDENSE

(b) if Ci<1

Ri=CCi−1 | if TIES = LOW
Ri=CCi | if TIES = HIGH
Ri=CCi−1+Ci/2 | if TIES = MEAN
Ri=i | if TIES = CONDENSE

Note: CC0=0.

Related Topics

Statistics (RANK algorithms)
RFRACTION (RANK algorithms)
PERCENT (RANK algorithms)
PROPORTION Estimate for Cumulative Proportion (RANK algorithms)
NORMAL (a) (RANK algorithms)
NITLES (K) (RANK algorithms)
SAVAGE (S) (RANK algorithms)
RANK Algorithms
Notation (RANK algorithms)
References (RANK algorithms)


RFRACTION (RANK algorithms)

RANK algorithms,RANK algorithms,RANK algorithms
RFRACTION (RFi),RFRACTION (RFi),RFRACTION (RFi)

Fractional rank:

RFi=Ri/W , i=1,...,m

Related Topics

Statistics (RANK algorithms)
Rank (RANK algorithms)
PERCENT (RANK algorithms)
PROPORTION Estimate for Cumulative Proportion (RANK algorithms)
NORMAL (a) (RANK algorithms)
NITLES (K) (RANK algorithms)
SAVAGE (S) (RANK algorithms)
RANK Algorithms
Notation (RANK algorithms)
References (RANK algorithms)


PERCENT (RANK algorithms)

RANK algorithms,RANK algorithms,RANK algorithms
PERCENT (Pi),PERCENT (Pi),PERCENT (Pi)

Fractional rank as a percentage:

Pi=RiW×100 , i=1,...,m

Related Topics

Statistics (RANK algorithms)
Rank (RANK algorithms)
RFRACTION (RANK algorithms)
PROPORTION Estimate for Cumulative Proportion (RANK algorithms)
NORMAL (a) (RANK algorithms)
NITLES (K) (RANK algorithms)
SAVAGE (S) (RANK algorithms)
RANK Algorithms
Notation (RANK algorithms)
References (RANK algorithms)


PROPORTION Estimate for Cumulative Proportion (RANK algorithms)

RANK algorithms,RANK algorithms,RANK algorithms
PROPORTION (Fi),PROPORTION (Fi),PROPORTION (Fi)
estimate for cumulative proportion,estimate for cumulative proportion,estimate for cumulative proportion

The proportion is calculated for each case based on four different methods of estimating fractional rank:

Fi=(Ri−38)/(W+14) | (BLOM)
Fi=(Ri−12)/W | (RANKIT)
Fi=(Ri−13)/(W+13) | (TUKEY)
Fi=Ri/(W+1) | (Van der Waerden)

Note: Fi will be set to SYSMIS if the calculated value of Fi by the formula is negative.

Related Topics

Statistics (RANK algorithms)
Rank (RANK algorithms)
RFRACTION (RANK algorithms)
PERCENT (RANK algorithms)
NORMAL (a) (RANK algorithms)
NITLES (K) (RANK algorithms)
SAVAGE (S) (RANK algorithms)
RANK Algorithms
Notation (RANK algorithms)
References (RANK algorithms)


NORMAL (a) (RANK algorithms)

RANK algorithms,RANK algorithms,RANK algorithms
NORMAL (a),NORMAL (a),NORMAL (a)

Normal scores that are the Z-scores from the standard normal distribution that corresponds to the estimated cumulative proportion F. The normal score is defined by

ai=Ψ(Fi) , i=1, ...,m

where Ψ is the inverse cumulative standard normal distribution (PROBIT).

Related Topics

Statistics (RANK algorithms)
Rank (RANK algorithms)
RFRACTION (RANK algorithms)
PERCENT (RANK algorithms)
PROPORTION Estimate for Cumulative Proportion (RANK algorithms)
NITLES (K) (RANK algorithms)
SAVAGE (S) (RANK algorithms)
RANK Algorithms
Notation (RANK algorithms)
References (RANK algorithms)


NITLES (K) (RANK algorithms)

RANK algorithms,RANK algorithms,RANK algorithms
NITLES (K),NITLES (K),NITLES (K)

Assign group membership for the requested number of groups. If K groups are requested, the n tile (Ni) for case i is defined by

Ni=[RiKW+1]+1

where [RiKW+1] is the greatest integer that is less than or equal to RiK/(W+1).

Related Topics

Statistics (RANK algorithms)
Rank (RANK algorithms)
RFRACTION (RANK algorithms)
PERCENT (RANK algorithms)
PROPORTION Estimate for Cumulative Proportion (RANK algorithms)
NORMAL (a) (RANK algorithms)
SAVAGE (S) (RANK algorithms)
RANK Algorithms
Notation (RANK algorithms)
References (RANK algorithms)


SAVAGE (S) (RANK algorithms)

RANK algorithms,RANK algorithms,RANK algorithms
SAVAGE (S),SAVAGE (S),SAVAGE (S)

Savage scores based on exponential distribution. The Savage score is calculated by

Si={
{[(1−gi1)li1+1+gi2li2+1+i2Σj=i1+2lj]/Ci}−1 | i1+2≤i2
{[(1−gi1)li1+1+gi2li2+1]/Ci}−1 | i1+1=i2
li1+1−1 | i1=i2

where

i1=[CCi−1], i2=[CCi], W*={
W | if W is an integer
[W]+1 | if W is not an integer
gi1=CCi−1−i1, gi2=CCi−i2

and l1,...,lw* are defined as the expected values of the order statistics from an exponential distribution; that is

lj=jΣK=11W*−K+1

Related Topics

Statistics (RANK algorithms)
Rank (RANK algorithms)
RFRACTION (RANK algorithms)
PERCENT (RANK algorithms)
PROPORTION Estimate for Cumulative Proportion (RANK algorithms)
NORMAL (a) (RANK algorithms)
NITLES (K) (RANK algorithms)
RANK Algorithms
Notation (RANK algorithms)
References (RANK algorithms)


References (RANK algorithms)

RANK algorithms,RANK algorithms,RANK algorithms
references,references,references

Blom, G. 1958. Statistical estimates and transformed beta variables. New York: John Wiley and Sons.

Chambers, J. M., W. S. Cleveland, B. Kleiner, and P. A. Tukey. 1983. Graphical methods for data analysis. Boston: Duxbury Press.

Lehmann, E. L. 1975. Nonparametrics: Statistical methods based on ranks. San Francisco: Holden-Day.

Tukey, J. W. 1962. The future of data analysis. Annals of Mathematical Statistics, 33:22, 1-67.
(Correction: 33:812)

Related Topics

RANK Algorithms
Notation (RANK algorithms)
Statistics (RANK algorithms)
Rank (RANK algorithms)
RFRACTION (RANK algorithms)
PERCENT (RANK algorithms)
PROPORTION Estimate for Cumulative Proportion (RANK algorithms)
NORMAL (a) (RANK algorithms)
NITLES (K) (RANK algorithms)
SAVAGE (S) (RANK algorithms)


RATIO STATISTICS Algorithms

RATIO STATISTICS (command),RATIO STATISTICS (command),RATIO STATISTICS (command)
algorithms,algorithms,algorithms
Ratio Statistics,Ratio Statistics,Ratio Statistics
algorithms,algorithms,algorithms
ratio statistics algorithms,ratio statistics algorithms,ratio statistics algorithms

This procedure provides a variety of descriptive statistics for the ratio of two variables.

Related Topics

Notation (ratio statistics algorithms)
Data (ratio statistics algorithms)
Ratio Statistics (ratio statistics algorithms)
References (ratio statistics algorithms)


Notation (ratio statistics algorithms)

ratio statistics algorithms,ratio statistics algorithms,ratio statistics algorithms
notation,notation,notation

The following notation is used throughout this section unless otherwise stated:

n | Number of observations
Ai | Numerator of the Ith ratio (i=1,...,n). This is usually the appraisal roll value.
Si | Denominator of the ith ratio (i=1,...,n). This is usually the sale price.
Ri | The ith ratio (i=1,...,n). Often called the appraisal ratio.
fi | Case weight associated with the ith ratio (i=1,...,n).

Related Topics

RATIO STATISTICS Algorithms
Data (ratio statistics algorithms)
Ratio Statistics (ratio statistics algorithms)
References (ratio statistics algorithms)


Data (ratio statistics algorithms)

ratio statistics algorithms,ratio statistics algorithms,ratio statistics algorithms
data,data,data

This procedure requires for i = 1, …, n that:

• Ai>0,

• Si>0,

• fi>0, and

• wi is a whole number. If the Weight variable contains fractional values, then only the integral parts are used.

A case is considered valid if it satisfies all four requirements above. This procedure will use only valid cases in computing the requested statistics.

Related Topics

RATIO STATISTICS Algorithms
Notation (ratio statistics algorithms)
Ratio Statistics (ratio statistics algorithms)
References (ratio statistics algorithms)


Ratio Statistics (ratio statistics algorithms)

ratio statistics algorithms,ratio statistics algorithms,ratio statistics algorithms
ratio statistics,ratio statistics,ratio statistics

The following statistics are available.

Related Topics

Ratio (ratio statistics algorithms)
Minimum (ratio statistics algorithms)
Maximum (ratio statistics algorithms)
Range (ratio statistics algorithms)
Median (ratio statistics algorithms)
Average Absolute Deviation (AAD) (ratio statistics algorithms)
Coefficient of Dispersion (COD) (ratio statistics algorithms)
Coefficient of Concentration (COC) (ratio statistics algorithms)
Mean (ratio statistics algorithms)
Standard Deviation (SD) (ratio statistics algorithms)
Coefficient of Variation (COV) (ratio statistics algorithms)
Weighted Mean (ratio statistics algorithms)
Price Related Differential (a.k.a. Index of Regressivity) (ratio statistics algorithms)
Confidence Interval for the Median (ratio statistics algorithms)
Confidence Interval for the Mean (ratio statistics algorithms)
Confidence Interval for the Weighted Mean (ratio statistics algorithms)
RATIO STATISTICS Algorithms
Notation (ratio statistics algorithms)
Data (ratio statistics algorithms)
References (ratio statistics algorithms)


Ratio (ratio statistics algorithms)

ratio statistics algorithms,ratio statistics algorithms,ratio statistics algorithms
ratio,ratio,ratio
Ri=AiSi,   i=1,...,n

Related Topics

Ratio Statistics (ratio statistics algorithms)
Minimum (ratio statistics algorithms)
Maximum (ratio statistics algorithms)
Range (ratio statistics algorithms)
Median (ratio statistics algorithms)
Average Absolute Deviation (AAD) (ratio statistics algorithms)
Coefficient of Dispersion (COD) (ratio statistics algorithms)
Coefficient of Concentration (COC) (ratio statistics algorithms)
Mean (ratio statistics algorithms)
Standard Deviation (SD) (ratio statistics algorithms)
Coefficient of Variation (COV) (ratio statistics algorithms)
Weighted Mean (ratio statistics algorithms)
Price Related Differential (a.k.a. Index of Regressivity) (ratio statistics algorithms)
Confidence Interval for the Median (ratio statistics algorithms)
Confidence Interval for the Mean (ratio statistics algorithms)
Confidence Interval for the Weighted Mean (ratio statistics algorithms)


Minimum (ratio statistics algorithms)

ratio statistics algorithms,ratio statistics algorithms,ratio statistics algorithms
minimum,minimum,minimum

The smallest ratio and is denoted by Rmin.

Related Topics

Ratio Statistics (ratio statistics algorithms)
Ratio (ratio statistics algorithms)
Maximum (ratio statistics algorithms)
Range (ratio statistics algorithms)
Median (ratio statistics algorithms)
Average Absolute Deviation (AAD) (ratio statistics algorithms)
Coefficient of Dispersion (COD) (ratio statistics algorithms)
Coefficient of Concentration (COC) (ratio statistics algorithms)
Mean (ratio statistics algorithms)
Standard Deviation (SD) (ratio statistics algorithms)
Coefficient of Variation (COV) (ratio statistics algorithms)
Weighted Mean (ratio statistics algorithms)
Price Related Differential (a.k.a. Index of Regressivity) (ratio statistics algorithms)
Confidence Interval for the Median (ratio statistics algorithms)
Confidence Interval for the Mean (ratio statistics algorithms)
Confidence Interval for the Weighted Mean (ratio statistics algorithms)


Maximum (ratio statistics algorithms)

ratio statistics algorithms,ratio statistics algorithms,ratio statistics algorithms
maximum,maximum,maximum

The largest ratio and is denoted by Rmax.

Related Topics

Ratio Statistics (ratio statistics algorithms)
Ratio (ratio statistics algorithms)
Minimum (ratio statistics algorithms)
Range (ratio statistics algorithms)
Median (ratio statistics algorithms)
Average Absolute Deviation (AAD) (ratio statistics algorithms)
Coefficient of Dispersion (COD) (ratio statistics algorithms)
Coefficient of Concentration (COC) (ratio statistics algorithms)
Mean (ratio statistics algorithms)
Standard Deviation (SD) (ratio statistics algorithms)
Coefficient of Variation (COV) (ratio statistics algorithms)
Weighted Mean (ratio statistics algorithms)
Price Related Differential (a.k.a. Index of Regressivity) (ratio statistics algorithms)
Confidence Interval for the Median (ratio statistics algorithms)
Confidence Interval for the Mean (ratio statistics algorithms)
Confidence Interval for the Weighted Mean (ratio statistics algorithms)


Range (ratio statistics algorithms)

ratio statistics algorithms,ratio statistics algorithms,ratio statistics algorithms
range,range,range

The difference between the largest and the smallest ratios. It is equal to Rmax−Rmin.

Related Topics

Ratio Statistics (ratio statistics algorithms)
Ratio (ratio statistics algorithms)
Minimum (ratio statistics algorithms)
Maximum (ratio statistics algorithms)
Median (ratio statistics algorithms)
Average Absolute Deviation (AAD) (ratio statistics algorithms)
Coefficient of Dispersion (COD) (ratio statistics algorithms)
Coefficient of Concentration (COC) (ratio statistics algorithms)
Mean (ratio statistics algorithms)
Standard Deviation (SD) (ratio statistics algorithms)
Coefficient of Variation (COV) (ratio statistics algorithms)
Weighted Mean (ratio statistics algorithms)
Price Related Differential (a.k.a. Index of Regressivity) (ratio statistics algorithms)
Confidence Interval for the Median (ratio statistics algorithms)
Confidence Interval for the Mean (ratio statistics algorithms)
Confidence Interval for the Weighted Mean (ratio statistics algorithms)


Median (ratio statistics algorithms)

ratio statistics algorithms,ratio statistics algorithms,ratio statistics algorithms
median,median,median

The middle number of the sorted ratios if n is odd. The mean (average) of the two middle ratios if the n is even. The median is denoted as
˜
R
.

Related Topics

Ratio Statistics (ratio statistics algorithms)
Ratio (ratio statistics algorithms)
Minimum (ratio statistics algorithms)
Maximum (ratio statistics algorithms)
Range (ratio statistics algorithms)
Average Absolute Deviation (AAD) (ratio statistics algorithms)
Coefficient of Dispersion (COD) (ratio statistics algorithms)
Coefficient of Concentration (COC) (ratio statistics algorithms)
Mean (ratio statistics algorithms)
Standard Deviation (SD) (ratio statistics algorithms)
Coefficient of Variation (COV) (ratio statistics algorithms)
Weighted Mean (ratio statistics algorithms)
Price Related Differential (a.k.a. Index of Regressivity) (ratio statistics algorithms)
Confidence Interval for the Median (ratio statistics algorithms)
Confidence Interval for the Mean (ratio statistics algorithms)
Confidence Interval for the Weighted Mean (ratio statistics algorithms)


Average Absolute Deviation (AAD) (ratio statistics algorithms)

ratio statistics algorithms,ratio statistics algorithms,ratio statistics algorithms
average absolute deviation (AAD),average absolute deviation (AAD),average absolute deviation (AAD)
AAD=nΣi=1fi| Ri−
˜
R
|/nΣi=1fi

Related Topics

Ratio Statistics (ratio statistics algorithms)
Ratio (ratio statistics algorithms)
Minimum (ratio statistics algorithms)
Maximum (ratio statistics algorithms)
Range (ratio statistics algorithms)
Median (ratio statistics algorithms)
Coefficient of Dispersion (COD) (ratio statistics algorithms)
Coefficient of Concentration (COC) (ratio statistics algorithms)
Mean (ratio statistics algorithms)
Standard Deviation (SD) (ratio statistics algorithms)
Coefficient of Variation (COV) (ratio statistics algorithms)
Weighted Mean (ratio statistics algorithms)
Price Related Differential (a.k.a. Index of Regressivity) (ratio statistics algorithms)
Confidence Interval for the Median (ratio statistics algorithms)
Confidence Interval for the Mean (ratio statistics algorithms)
Confidence Interval for the Weighted Mean (ratio statistics algorithms)


Coefficient of Dispersion (COD) (ratio statistics algorithms)

ratio statistics algorithms,ratio statistics algorithms,ratio statistics algorithms
coefficient of dispersion (COD),coefficient of dispersion (COD),coefficient of dispersion (COD)
COD=100 %×AAD
˜
R

Related Topics

Ratio Statistics (ratio statistics algorithms)
Ratio (ratio statistics algorithms)
Minimum (ratio statistics algorithms)
Maximum (ratio statistics algorithms)
Range (ratio statistics algorithms)
Median (ratio statistics algorithms)
Average Absolute Deviation (AAD) (ratio statistics algorithms)
Coefficient of Concentration (COC) (ratio statistics algorithms)
Mean (ratio statistics algorithms)
Standard Deviation (SD) (ratio statistics algorithms)
Coefficient of Variation (COV) (ratio statistics algorithms)
Weighted Mean (ratio statistics algorithms)
Price Related Differential (a.k.a. Index of Regressivity) (ratio statistics algorithms)
Confidence Interval for the Median (ratio statistics algorithms)
Confidence Interval for the Mean (ratio statistics algorithms)
Confidence Interval for the Weighted Mean (ratio statistics algorithms)


Coefficient of Concentration (COC) (ratio statistics algorithms)

ratio statistics algorithms,ratio statistics algorithms,ratio statistics algorithms
coefficient of concentration (COC),coefficient of concentration (COC),coefficient of concentration (COC)

Given a percentage 100% × g, the coefficient of concentration is the percentage of ratios falling within the interval [
(1−g)
˜
R
, 		(1+g)
˜
R
]. The higher this coefficient, the better uniformity.

Related Topics

Ratio Statistics (ratio statistics algorithms)
Ratio (ratio statistics algorithms)
Minimum (ratio statistics algorithms)
Maximum (ratio statistics algorithms)
Range (ratio statistics algorithms)
Median (ratio statistics algorithms)
Average Absolute Deviation (AAD) (ratio statistics algorithms)
Coefficient of Dispersion (COD) (ratio statistics algorithms)
Mean (ratio statistics algorithms)
Standard Deviation (SD) (ratio statistics algorithms)
Coefficient of Variation (COV) (ratio statistics algorithms)
Weighted Mean (ratio statistics algorithms)
Price Related Differential (a.k.a. Index of Regressivity) (ratio statistics algorithms)
Confidence Interval for the Median (ratio statistics algorithms)
Confidence Interval for the Mean (ratio statistics algorithms)
Confidence Interval for the Weighted Mean (ratio statistics algorithms)


Mean (ratio statistics algorithms)

ratio statistics algorithms,ratio statistics algorithms,ratio statistics algorithms
mean,mean,mean
A/S=R=nΣi=1fiRi/nΣi=1fi

Related Topics

Ratio Statistics (ratio statistics algorithms)
Ratio (ratio statistics algorithms)
Minimum (ratio statistics algorithms)
Maximum (ratio statistics algorithms)
Range (ratio statistics algorithms)
Median (ratio statistics algorithms)
Average Absolute Deviation (AAD) (ratio statistics algorithms)
Coefficient of Dispersion (COD) (ratio statistics algorithms)
Coefficient of Concentration (COC) (ratio statistics algorithms)
Standard Deviation (SD) (ratio statistics algorithms)
Coefficient of Variation (COV) (ratio statistics algorithms)
Weighted Mean (ratio statistics algorithms)
Price Related Differential (a.k.a. Index of Regressivity) (ratio statistics algorithms)
Confidence Interval for the Median (ratio statistics algorithms)
Confidence Interval for the Mean (ratio statistics algorithms)
Confidence Interval for the Weighted Mean (ratio statistics algorithms)


Standard Deviation (SD) (ratio statistics algorithms)

ratio statistics algorithms,ratio statistics algorithms,ratio statistics algorithms
standard deviation (SD),standard deviation (SD),standard deviation (SD)
s=
√ 1(F−1)nΣi=1fi(Ri−R)2

where F=nΣi=1fi.

Related Topics

Ratio Statistics (ratio statistics algorithms)
Ratio (ratio statistics algorithms)
Minimum (ratio statistics algorithms)
Maximum (ratio statistics algorithms)
Range (ratio statistics algorithms)
Median (ratio statistics algorithms)
Average Absolute Deviation (AAD) (ratio statistics algorithms)
Coefficient of Dispersion (COD) (ratio statistics algorithms)
Coefficient of Concentration (COC) (ratio statistics algorithms)
Mean (ratio statistics algorithms)
Coefficient of Variation (COV) (ratio statistics algorithms)
Weighted Mean (ratio statistics algorithms)
Price Related Differential (a.k.a. Index of Regressivity) (ratio statistics algorithms)
Confidence Interval for the Median (ratio statistics algorithms)
Confidence Interval for the Mean (ratio statistics algorithms)
Confidence Interval for the Weighted Mean (ratio statistics algorithms)


Coefficient of Variation (COV) (ratio statistics algorithms)

ratio statistics algorithms,ratio statistics algorithms,ratio statistics algorithms
coefficient of variation (COV),coefficient of variation (COV),coefficient of variation (COV)
COV=100%×sR

Related Topics

Ratio Statistics (ratio statistics algorithms)
Ratio (ratio statistics algorithms)
Minimum (ratio statistics algorithms)
Maximum (ratio statistics algorithms)
Range (ratio statistics algorithms)
Median (ratio statistics algorithms)
Average Absolute Deviation (AAD) (ratio statistics algorithms)
Coefficient of Dispersion (COD) (ratio statistics algorithms)
Coefficient of Concentration (COC) (ratio statistics algorithms)
Mean (ratio statistics algorithms)
Standard Deviation (SD) (ratio statistics algorithms)
Weighted Mean (ratio statistics algorithms)
Price Related Differential (a.k.a. Index of Regressivity) (ratio statistics algorithms)
Confidence Interval for the Median (ratio statistics algorithms)
Confidence Interval for the Mean (ratio statistics algorithms)
Confidence Interval for the Weighted Mean (ratio statistics algorithms)


Weighted Mean (ratio statistics algorithms)

ratio statistics algorithms,ratio statistics algorithms,ratio statistics algorithms
weighted mean,weighted mean,weighted mean
A/S=nΣi=1fiAinΣi=1fiSi=nΣi=1fiSiRinΣi=1fiSi

This is the weighted mean of the ratios weighted by the sales prices in addition to the usual case weights.

Related Topics

Ratio Statistics (ratio statistics algorithms)
Ratio (ratio statistics algorithms)
Minimum (ratio statistics algorithms)
Maximum (ratio statistics algorithms)
Range (ratio statistics algorithms)
Median (ratio statistics algorithms)
Average Absolute Deviation (AAD) (ratio statistics algorithms)
Coefficient of Dispersion (COD) (ratio statistics algorithms)
Coefficient of Concentration (COC) (ratio statistics algorithms)
Mean (ratio statistics algorithms)
Standard Deviation (SD) (ratio statistics algorithms)
Coefficient of Variation (COV) (ratio statistics algorithms)
Price Related Differential (a.k.a. Index of Regressivity) (ratio statistics algorithms)
Confidence Interval for the Median (ratio statistics algorithms)
Confidence Interval for the Mean (ratio statistics algorithms)
Confidence Interval for the Weighted Mean (ratio statistics algorithms)


Price Related Differential (a.k.a. Index of Regressivity) (ratio statistics algorithms)

ratio statistics algorithms,ratio statistics algorithms,ratio statistics algorithms
price related differential,price related differential,price related differential
index of regressivity,index of regressivity,index of regressivity
PRD=A/SA/S

This is quotient by dividing the Mean by the Weighted Mean.

Property appraisals sometimes result in unequal tax burden between high-value and low-value properties in the same property group. Appraisals are considered regressive if high-value properties are under-appraised relative to low-value properties. On the contrary, appraisals are considered progressive if high-value properties are relatively over-appraised. The price related differential is a measure for measuring assessment regressivity or progressivity. Hence the price related differential is also known as the index of regressivity.

Recall that the [unweighted] mean weights the ratios equally, whereas the weighted mean high-value properties are under-appraised, thus pulling the weighted mean below the mean. On the other hand, if the PRD is less than 1, high-value properties are relatively over-appraised, pulling the weighted mean above the mean.

Related Topics

Ratio Statistics (ratio statistics algorithms)
Ratio (ratio statistics algorithms)
Minimum (ratio statistics algorithms)
Maximum (ratio statistics algorithms)
Range (ratio statistics algorithms)
Median (ratio statistics algorithms)
Average Absolute Deviation (AAD) (ratio statistics algorithms)
Coefficient of Dispersion (COD) (ratio statistics algorithms)
Coefficient of Concentration (COC) (ratio statistics algorithms)
Mean (ratio statistics algorithms)
Standard Deviation (SD) (ratio statistics algorithms)
Coefficient of Variation (COV) (ratio statistics algorithms)
Weighted Mean (ratio statistics algorithms)
Confidence Interval for the Median (ratio statistics algorithms)
Confidence Interval for the Mean (ratio statistics algorithms)
Confidence Interval for the Weighted Mean (ratio statistics algorithms)


Confidence Interval for the Median (ratio statistics algorithms)

ratio statistics algorithms,ratio statistics algorithms,ratio statistics algorithms
confidence interval for the median,confidence interval for the median,confidence interval for the median

The confidence interval can be computed under the assumption that the ratios follow a normal distribution or nonparametrically.

Related Topics

Distribution Free (ratio statistics algorithms)
Normal Distribution (ratio statistics algorithms)
Ratio (ratio statistics algorithms)
Minimum (ratio statistics algorithms)
Maximum (ratio statistics algorithms)
Range (ratio statistics algorithms)
Median (ratio statistics algorithms)
Average Absolute Deviation (AAD) (ratio statistics algorithms)
Coefficient of Dispersion (COD) (ratio statistics algorithms)
Coefficient of Concentration (COC) (ratio statistics algorithms)
Mean (ratio statistics algorithms)
Standard Deviation (SD) (ratio statistics algorithms)
Coefficient of Variation (COV) (ratio statistics algorithms)
Weighted Mean (ratio statistics algorithms)
Price Related Differential (a.k.a. Index of Regressivity) (ratio statistics algorithms)
Confidence Interval for the Mean (ratio statistics algorithms)
Confidence Interval for the Weighted Mean (ratio statistics algorithms)


Distribution Free (ratio statistics algorithms)

ratio statistics algorithms,ratio statistics algorithms,ratio statistics algorithms
distribution free,distribution free,distribution free

Given the confidence level 100%×(1−α), the confidence interval for the median is an interval (R[r],R[n−r+1]) such that

1−α=1−2 I0.5(n−r+1,r)=12nn−rΣk=r (
n
k
),

where R[k] is the 100%×k/nquantile, and I0.5(n−r+1,r) is the incomplete Beta function.

An equivalent formula is

α2= I0.5(n−r+1,r)=12nr−1Σk=0 (
n
k
).

Since the rightmost term is the cumulative Binomial distribution and it is discrete, r is solved as the largest value such that

α2≤12nr−1Σk=0 (
n
k
).

Thus the confidence interval has coverage probability of at least 1−α.

Related Topics

Confidence Interval for the Median (ratio statistics algorithms)
Normal Distribution (ratio statistics algorithms)


Normal Distribution (ratio statistics algorithms)

ratio statistics algorithms,ratio statistics algorithms,ratio statistics algorithms
normal distribution,normal distribution,normal distribution

Assuming the ratios follow a normal distribution, a two-sided 100%×(1−α) confidence interval for the median of a normal distribution is

(R+g(α/2;0.5,d)×s,R+g(1−α/2;0.5,d)×s)

where g(γ;p,d) are values defined in Table 1 of Odeh and Owen (1980).

The value g(γ;p,d) is, in fact, the solution to the following equations:

Pr(Td≤g
√ n
|δ=Kp
√ n
)=γ

with Td follows a noncentral Student t-distribution where d is degrees of freedom associated with the standard deviation s, δ is noncentrality parameter, γ is the probability, n is the sample size, and Kp is the upper p percentile point of a standard normal distribution.

Related Topics

Confidence Interval for the Median (ratio statistics algorithms)
Distribution Free (ratio statistics algorithms)


Confidence Interval for the Mean (ratio statistics algorithms)

ratio statistics algorithms,ratio statistics algorithms,ratio statistics algorithms
confidence interval for the mean,confidence interval for the mean,confidence interval for the mean

The normal distribution is used to approximate the distribution of the ratios. The 100%×(1−α) confidence interval for the mean is:

R±tα/2;F−1×s/
√ F

where tα/2;F−1 is the upper α/2 percentage point of the t distribution with F−1 degrees of freedom, and where F=nΣi=1fi.

Related Topics

Ratio Statistics (ratio statistics algorithms)
Ratio (ratio statistics algorithms)
Minimum (ratio statistics algorithms)
Maximum (ratio statistics algorithms)
Range (ratio statistics algorithms)
Median (ratio statistics algorithms)
Average Absolute Deviation (AAD) (ratio statistics algorithms)
Coefficient of Dispersion (COD) (ratio statistics algorithms)
Coefficient of Concentration (COC) (ratio statistics algorithms)
Mean (ratio statistics algorithms)
Standard Deviation (SD) (ratio statistics algorithms)
Coefficient of Variation (COV) (ratio statistics algorithms)
Weighted Mean (ratio statistics algorithms)
Price Related Differential (a.k.a. Index of Regressivity) (ratio statistics algorithms)
Confidence Interval for the Median (ratio statistics algorithms)
Confidence Interval for the Weighted Mean (ratio statistics algorithms)


Confidence Interval for the Weighted Mean (ratio statistics algorithms)

ratio statistics algorithms,ratio statistics algorithms,ratio statistics algorithms
confidence interval for the weighted mean,confidence interval for the weighted mean,confidence interval for the weighted mean

Using the Delta method, variance of the weighted mean is approximated as

var(AS)≈var(A)S2−2Acov(A,S)S3+A2var(S)S4.

where

var(A)=1(F−1)nΣi=1fi(Ai−A)2×nΣi=1f2i/F2,

var(S)=1(F−1)nΣi=1fi(Si−S)2×nΣi=1f2i/F2, and

cov(A,S)=1(F−1)nΣi=1fi(Ai−A)(Si−S)×nΣi=1f2i/F2.

Related Topics

Ratio Statistics (ratio statistics algorithms)
Ratio (ratio statistics algorithms)
Minimum (ratio statistics algorithms)
Maximum (ratio statistics algorithms)
Range (ratio statistics algorithms)
Median (ratio statistics algorithms)
Average Absolute Deviation (AAD) (ratio statistics algorithms)
Coefficient of Dispersion (COD) (ratio statistics algorithms)
Coefficient of Concentration (COC) (ratio statistics algorithms)
Mean (ratio statistics algorithms)
Standard Deviation (SD) (ratio statistics algorithms)
Coefficient of Variation (COV) (ratio statistics algorithms)
Weighted Mean (ratio statistics algorithms)
Price Related Differential (a.k.a. Index of Regressivity) (ratio statistics algorithms)
Confidence Interval for the Median (ratio statistics algorithms)
Confidence Interval for the Mean (ratio statistics algorithms)


References (ratio statistics algorithms)

ratio statistics algorithms,ratio statistics algorithms,ratio statistics algorithms
references,references,references

International Association of Assessing Officers, . 1990. Property Appraisal and Assessment Administration. International Association of Assessing Officers: Chicago, Illinois.

Odeh, R. E., and D. B. Owen. 1980. Tables for Normal Tolerance Limits, Sampling Plans, and Screening. New York: Marcel Dekker.

Related Topics

RATIO STATISTICS Algorithms
Notation (ratio statistics algorithms)
Data (ratio statistics algorithms)
Ratio Statistics (ratio statistics algorithms)


RBF Algorithms

RBF (command),RBF (command),RBF (command)
algorithms,algorithms,algorithms
Radial Basis Function,Radial Basis Function,Radial Basis Function
algorithms,algorithms,algorithms
radial basis function algorithms,radial basis function algorithms,radial basis function algorithms

A radial basis function (RBF) network is a feed-forward, supervised learning network with only one hidden layer, called the radial basis function layer. The RBF network is a function of one or more predictors (also called inputs or independent variables) that minimizes the prediction error of one or more target variables (also called outputs). Predictors and targets can be a mix of categorical and scale variables.

Related Topics

Notation (radial basis function algorithms)
Architecture (radial basis function algorithms)
Training (radial basis function algorithms)
Determining Basis Functions (radial basis function algorithms)
Automatic Selection of Number of Basis Functions (radial basis function algorithms)
Output Statistics (radial basis function algorithms)
References (radial basis function algorithms)


Notation (radial basis function algorithms)

radial basis function algorithms,radial basis function algorithms,radial basis function algorithms
notation,notation,notation

The following notation is used throughout this chapter unless otherwise stated:

X(m)=(x(m)1,...,x(m)P) | Input vector, pattern m, m=1,...M.
Y(m)=(y(m)1,...,y(m)R) | Target vector, pattern m.
I | Number of layers, discounting the input layer. For an RBF network, I=2.
Ji | Number of units in layer i. J0 = P, Ji = R, discounting the bias unit. J1 is the number of RBF units.
φj(X(m)) | jth RBF unit for input X(m), j=1, …,J1.
μj | center of φj, it is P-dimensional.
σj | width of φj, it is P-dimensional.
h | the RBF overlapping factor.
ami:j | Unit j of layer i, pattern m, j=0,...,Ji;i=0,...,I.
wrj | weight connecting rth output unit and jth hidden unit of RBF layer.

Related Topics

RBF Algorithms
Architecture (radial basis function algorithms)
Training (radial basis function algorithms)
Determining Basis Functions (radial basis function algorithms)
Automatic Selection of Number of Basis Functions (radial basis function algorithms)
Output Statistics (radial basis function algorithms)
References (radial basis function algorithms)


Architecture (radial basis function algorithms)

radial basis function algorithms,radial basis function algorithms,radial basis function algorithms
architecture,architecture,architecture
network architecture,network architecture,network architecture
radial basis function algorithms,radial basis function algorithms,radial basis function algorithms

There are three layers in the RBF network:

Input layer: J0=P units, a0:1,...,a0:J0; with a0:j=xj.

RBF layer: J1 units, , a1:1,...,a1:J1; with a1:j=φj(X) and φj(X) described below.

Output layer: J2=R units, aI:1,...,aI:J2; with aI:r=wr0+J1Σj=1wrjφj(X).

There are many types of radial basis functions; there are two distinct types of Gaussian RBF architectures that we support:

Ordinary RBF (ORBF): This type uses the exp activation function, so the activation of the RBF unit is a Gaussian "bump" as a function of the inputs. In ORBF, the Gaussian basis function takes form

φj(X)=exp(−PΣp=112σ2jP(xp−μjp)2)

Normalized RBF (NRBF): This type uses the softmax activation function, so the activation of all the RBF units are normalized to sum to one. In NRBF networks, the basis function takes form

φj(X)=exp(−PΣp=112σ2jp(xp−μjp)2)/J1Σj=1exp(−PΣp=112σ2jp(xp−μjp)2)

Related Topics

RBF Algorithms
Notation (radial basis function algorithms)
Training (radial basis function algorithms)
Determining Basis Functions (radial basis function algorithms)
Automatic Selection of Number of Basis Functions (radial basis function algorithms)
Output Statistics (radial basis function algorithms)
References (radial basis function algorithms)


Error Function (radial basis function algorithms)

Sum-of-squares error is used:

ET(w)=MΣm=1Em(w)

where

Em(w)=12RΣr=1(y(m)r−amI:r)2

The sum-of-squares error function with identity activation function for output layer can be used for both scale and categorical targets. For scale targets, amI:r approximates the conditional expectation of the target value E(yr|X(m)). For categorical targets, amI:r approximates the posterior probability of class k: P(yr=1|X(m)).

Note: though ΣamI:r=1 (the sum is over all classes of the same categorical target variable), amI:r may not lie in the range [0, 1].


Training (radial basis function algorithms)

radial basis function algorithms,radial basis function algorithms,radial basis function algorithms
training,training,training

The network is trained in two stages:

1. Determine the basis functions by clustering methods. The center and width for each basis function is computed.

2. Determine the weights given the basis functions. For the given basis functions, compute the ordinary least-squares regression estimates of the weights.

The simplicity of these computations allows the RBF network to be trained very quickly.

Related Topics

RBF Algorithms
Notation (radial basis function algorithms)
Architecture (radial basis function algorithms)
Determining Basis Functions (radial basis function algorithms)
Automatic Selection of Number of Basis Functions (radial basis function algorithms)
Output Statistics (radial basis function algorithms)
References (radial basis function algorithms)


Determining Basis Functions (radial basis function algorithms)

radial basis function algorithms,radial basis function algorithms,radial basis function algorithms
center and width for basis functions,center and width for basis functions,center and width for basis functions

The two-step clustering algorithm is used to find the RBF centers and widths. For each cluster, the mean and standard deviation for each scale variable and proportion of each category for each categorical variable are derived. Using the results from clustering, the center of the jth RBF is set as:

μjp={
xjp | if pth variable is scale
πjp | if pth variable is a dummy variable of a categorical variable

where xjp is the jth cluster mean of the pth input variable if it is scale, and πjp is the proportion of the category of a categorical variable that the pth input variable corresponds to. The width of the jth RBF is set as

σjp=h1/2{
sjp if pth variable is scale
√ pjp(1−pjp)
if pth variable is a dummy variable of a categorical variable

where sjp is the jth cluster standard deviation of the pth variable and h>0 is the RBF overlapping factor that controls the amount of overlap among the RBFs. Since some σjp may be zeros, we use spherical shaped Gaussian bumps; that is, a common width

σj=
√ 1PPΣp=1σ2jp

in for all predictors. In the case that σj is zero for some j, set it to be min{σj:σj≠0,}J1j=1. If all σj are zero, set all of them to be
√ h
.

When there are a large number of predictors, PΣp=1(xp−μjp)2 could be easily very large and hence exp(−PΣp=112σ2j(xp−μjp)2) is practically zero for every record and every RBF unit if σj is relatively small. This is especially bad for ORBF because there would be only a constant term in the model when this happens. To avoid this, σj is increased by setting the default overlapping factor h proportional to the number of inputs: h=1 + 0.1 P.

See the topic TWOSTEP CLUSTER Algorithms for more information.

Related Topics

RBF Algorithms
Notation (radial basis function algorithms)
Architecture (radial basis function algorithms)
Training (radial basis function algorithms)
Automatic Selection of Number of Basis Functions (radial basis function algorithms)
Output Statistics (radial basis function algorithms)
References (radial basis function algorithms)


Automatic Selection of Number of Basis Functions (radial basis function algorithms)

radial basis function algorithms,radial basis function algorithms,radial basis function algorithms
automatic selection of number of basis functions,automatic selection of number of basis functions,automatic selection of number of basis functions

The algorithm tries a reasonable range of numbers of hidden units and picks the “best”. By default, the reasonable range [K1, K2] is determined by first using the two-step clustering method to automatically find the number of clusters, K. Then set K1 = min(K, R) for ORBF and K1 =max{2, min(K, R)} for NRBF and K2=max(10, 2K, R).

If a test data set is specified, then the "best" model is the one with the smaller error in the test data. If there is no test data, the BIC (Bayesian information criterion) is used to select the "best" model. The BIC is defined as

BIC=MRln(MSE)+kln(M)

where MSE=1MRMΣm=1RΣr=1(y(m)r−amI:r)2 is the mean squared error and k= (P+1+R)J1 for NRBF and (P+1+R)J1+R for ORBF is the number of parameters in the model.

Related Topics

RBF Algorithms
Notation (radial basis function algorithms)
Architecture (radial basis function algorithms)
Training (radial basis function algorithms)
Determining Basis Functions (radial basis function algorithms)
Output Statistics (radial basis function algorithms)
References (radial basis function algorithms)


Output Statistics (radial basis function algorithms)

radial basis function algorithms,radial basis function algorithms,radial basis function algorithms
statistics,statistics,statistics
sensitivity analysis,sensitivity analysis,sensitivity analysis
radial basis function algorithms,radial basis function algorithms,radial basis function algorithms

The following output statistics are available. Note that, for scale variables, output statistics are reported in terms of the rescaled values of the variables.

Sum-of-Squares Error

As described in Error Function (radial basis function algorithms). The cross entropy error is displayed if the output layer activation function is softmax, otherwise the sum-of-squares error is shown.

Relative Error

For each scale target r:

MΣm=1(y(m)r−
^
y
(m)r)2MΣm=1(y(m)r−yr)2

For each categorical target r, report pr, the percent of incorrect predictions

Average Overall Relative Error

If there is at least one scale target:

MΣm=1RΣr=1(y(m)r−
^
y
(m)r)2MΣm=1RΣr=1(y(m)r−yr)2

where yr is the mean of y(m)r over patterns.

If all targets are categorical, report the average percent of incorrect predictions:

1CCΣr=1pr

where C is the number of categorical variables.

Sensitivity Analysis

For each predictor p and each input pattern m, compute:

dpm=maxxp1,xp2Sp||
^
Y
(m)p1−
^
Y
(m)p2||

where
^
Y
(m)pk is the predicted output vector (standardized if standardization of output variable is used in training) using (x(m)1,...,x(m)p−1,xpk,x(m)p+1,...,x(m)P) as its input, and Sp= {xminp,x(2)p,x(3)p,x(4)p,xmaxp} for scale predictors and {(1,0,...,0),(0,1,0,...,0),...,(0,0,...,1)} for categorical predictors.

Then compute:

dp=1MMΣm=1dpm

and normalize the dps to sum to 1, and report these normalized values as the sensitivity values for the predictors. This is the average maximum amount we can expect the output to change based on changes in the pth predictor. The greater the sensitivity, the more we expect the output to change when the predictor changes.

Related Topics

RBF Algorithms
Notation (radial basis function algorithms)
Architecture (radial basis function algorithms)
Training (radial basis function algorithms)
Determining Basis Functions (radial basis function algorithms)
Automatic Selection of Number of Basis Functions (radial basis function algorithms)
References (radial basis function algorithms)


References (radial basis function algorithms)

radial basis function algorithms,radial basis function algorithms,radial basis function algorithms
references,references,references

Bishop, C. M. 1995. Neural Networks for Pattern Recognition, 3rd ed. Oxford: Oxford University Press.

Fine, T. L. 1999. Feedforward Neural Network Methodology, 3rd ed. New York: Springer-Verlag.

Haykin, S. 1998. Neural Networks: A Comprehensive Foundation, 2nd ed. New York: Macmillan College Publishing.

Ripley, B. D. 1996. Pattern Recognition and Neural Networks. Cambridge: Cambridge University Press.

Tao, K. K. 1993. A closer look at the radial basis function (RBF) networks. In: Conference Record of the Twenty-Seventh Asilomar Conference on Signals, Systems, and Computers, A. Singh, eds. Los Alamitos, Calif.: IEEE Comput. Soc. Press.

Uykan, Z., C. Guzelis, M. E. Celebi, and H. N. Koivo. 2000. Analysis of input-output clustering for determining centers of RBFN. IEEE Transactions on Neural Networks, 11, 851-858.

Related Topics

RBF Algorithms
Notation (radial basis function algorithms)
Architecture (radial basis function algorithms)
Training (radial basis function algorithms)
Determining Basis Functions (radial basis function algorithms)
Automatic Selection of Number of Basis Functions (radial basis function algorithms)
Output Statistics (radial basis function algorithms)


REGRESSION Algorithms

REGRESSION (command),REGRESSION (command),REGRESSION (command)
algorithms,algorithms,algorithms
Linear Regression,Linear Regression,Linear Regression
algorithms,algorithms,algorithms
linear regression algorithms,linear regression algorithms,linear regression algorithms

This procedure performs multiple linear regression with five methods for entry and removal of variables. It also provides extensive analysis of residual and influential cases. Caseweight (CASEWEIGHT) and regression weight (REGWGT) can be specified in the model fitting.

Related Topics

Notation (linear regression algorithms)
Descriptive Statistics (linear regression algorithms)
Sweep Operations (Dempster, 1969) (linear regression algorithms)
Variable Selection Criteria (linear regression algorithms)
Methods for Variable Entry and Removal (linear regression algorithms)
Statistics (linear regression algorithms)
Residuals and Associated Statistics (linear regression algorithms)
Partial Residual Plots (linear regression algorithms)
Missing Values (linear regression algorithms)
References (linear regression algorithms)


Notation (linear regression algorithms)

linear regression algorithms,linear regression algorithms,linear regression algorithms
notation,notation,notation

The following notation is used throughout this section unless otherwise stated:

yi

Dependent variable for case i with variance σ2/gi

ci

Caseweight for case i; ci=1 if CASEWEIGHT is not specified

gi

Regression weight for case i; gi=1 if REGWGT is not specified

l

Number of distinct cases

wi

cigi

W

lΣi=1wi

P

Number of independent variables

C

Sum of caseweights: lΣi=1ci

xki

The kth independent variable for case i

Xk

Sample mean for the kth independent variable: Xk=(lΣi=1wixki)/W

Y

Sample mean for the dependent variable: Y=(lΣi=1wiyi)/W

hi

Leverage for case i

˜
h
i

giW+hi

Skj

Sample covariance for Xk and Xj

Syy

Sample variance for Y

Sky

Sample covariance for Xk and Y

p*

Number of coefficients in the model. p*=p if the intercept is not included; otherwise p*=p+1

R

The sample correlation matrix for X1,...,Xp and Y

Related Topics

REGRESSION Algorithms
Descriptive Statistics (linear regression algorithms)
Sweep Operations (Dempster, 1969) (linear regression algorithms)
Variable Selection Criteria (linear regression algorithms)
Methods for Variable Entry and Removal (linear regression algorithms)
Statistics (linear regression algorithms)
Residuals and Associated Statistics (linear regression algorithms)
Partial Residual Plots (linear regression algorithms)
Missing Values (linear regression algorithms)
References (linear regression algorithms)


Descriptive Statistics (linear regression algorithms)

linear regression algorithms,linear regression algorithms,linear regression algorithms
descriptive statistics,descriptive statistics,descriptive statistics
R=[
r11 | ... | r1p r1y
r21 | ... | r2p r2y
· | ... | · ·
ry1 | ... | ryp ryy
]

where

rkj=Skj
√ SkkSjj

and

ryk=rky=Sky
√ SkkSyy

The sample mean Xi and covariance Sij are computed by a provisional means algorithm. Define

Wk=kΣi=1wi= cumulative weight up to case k.

then

Xi(k)=Xi(k−1)+(xik−Xi(k−1))wkWk

where

Xi(1)=xi1

If the intercept is included,

Cij(k)=Cij(k−1)+(xik−Xi(k−1))(xjk−Xj(k−1))(wk−w2kWk)

where

Cij(1)=0

Otherwise,

Cij(k)=Cij(k−1)+wkxikxjk

where

Cij(1)=w1xi1xj1

The sample covariance Sij is computed as the final Cij divided by C−1.

Related Topics

REGRESSION Algorithms
Notation (linear regression algorithms)
Sweep Operations (Dempster, 1969) (linear regression algorithms)
Variable Selection Criteria (linear regression algorithms)
Methods for Variable Entry and Removal (linear regression algorithms)
Statistics (linear regression algorithms)
Residuals and Associated Statistics (linear regression algorithms)
Partial Residual Plots (linear regression algorithms)
Missing Values (linear regression algorithms)
References (linear regression algorithms)


Sweep Operations (Dempster, 1969) (linear regression algorithms)

linear regression algorithms,linear regression algorithms,linear regression algorithms
sweep operations,sweep operations,sweep operations

For a regression model of the form

Yi=β0+β1X1i+β2X2i+ ... +βpXpi+ei

sweep operations are used to compute the least squares estimates b of β and the associated regression statistics. The sweeping starts with the correlation matrix R. Let
˜
R
be the new matrix produced by sweeping on the kth row and column of R. The elements of
˜
R
are

˜
r
kk=1rkk
˜
r
ik=rikrkk, 		i≠k
˜
r
kj=−rkjrkk, 		j≠k

and

˜
r
ij=rijrkk−rikrkjrkk, 		i≠k, j≠k

If the above sweep operations are repeatedly applied to each row of R11 in

R=(
R11 | R12
R21 | R22
)

where R11 contains independent variables in the equation at the current step, the result is

˜
R
=(
R−111 | −R−111R12
R21R−111 | R22−R21R−111R12
)

The last row of

R21R−111

contains the standardized coefficients (also called BETA), and

R22−R21R−111R12

can be used to obtain the partial correlations for the variables not in the equation, controlling for the variables already in the equation. Note that this routine is its own inverse; that is, exactly the same operations are performed to remove a variable as to enter a variable.

Related Topics

REGRESSION Algorithms
Notation (linear regression algorithms)
Descriptive Statistics (linear regression algorithms)
Variable Selection Criteria (linear regression algorithms)
Methods for Variable Entry and Removal (linear regression algorithms)
Statistics (linear regression algorithms)
Residuals and Associated Statistics (linear regression algorithms)
Partial Residual Plots (linear regression algorithms)
Missing Values (linear regression algorithms)
References (linear regression algorithms)


Variable Selection Criteria (linear regression algorithms)

linear regression algorithms,linear regression algorithms,linear regression algorithms
variable selection criteria,variable selection criteria,variable selection criteria

Let rij be the element in the current swept matrix associated with Xi and Xj. Variables are entered or removed one at a time. Xk is eligible for entry if it is an independent variable not currently in the model with

rkk≥t (tolerance with a default of 0.0001)

and also, for each variable Xj that is currently in the model,

(rjj−rjkrkjrkk) t≤1

The above condition is imposed so that entry of the variable does not reduce the tolerance of variables already in the model to unacceptable levels.

The F-to-enter value for Xk is computed as

F−to−enterk=(C−p*−1)Vkryy−Vk

with 1 and C−p*−1 degrees of freedom, where p* is the number of coefficients currently in the model and

Vk=rykrkyrkk

The F-to-remove value for Xk is computed as

F−to−removek=(C−p*) | Vk|ryy

with 1 and C−p* degrees of freedom.

Related Topics

REGRESSION Algorithms
Notation (linear regression algorithms)
Descriptive Statistics (linear regression algorithms)
Sweep Operations (Dempster, 1969) (linear regression algorithms)
Methods for Variable Entry and Removal (linear regression algorithms)
Statistics (linear regression algorithms)
Residuals and Associated Statistics (linear regression algorithms)
Partial Residual Plots (linear regression algorithms)
Missing Values (linear regression algorithms)
References (linear regression algorithms)


Methods for Variable Entry and Removal (linear regression algorithms)

linear regression algorithms,linear regression algorithms,linear regression algorithms
methods for variable entry and removal,methods for variable entry and removal,methods for variable entry and removal

Five methods for entry and removal of variables are available. The selection process is repeated until the maximum number of steps (MAXSTEP) is reached or no more independent variables qualify for entry or removal. The algorithms for these five methods are described in the following sections.

• Stepwise

• Forward

• Backward

• Enter (Forced Entry)

• Remove (Forced Removal)

Related Topics

Stepwise (linear regression algorithms)
Forward (linear regression algorithms)
Backward (linear regression algorithms)
Enter (Forced Entry) (linear regression algorithms)
Remove (Forced Removal) (linear regression algorithms)
REGRESSION Algorithms
Notation (linear regression algorithms)
Descriptive Statistics (linear regression algorithms)
Sweep Operations (Dempster, 1969) (linear regression algorithms)
Variable Selection Criteria (linear regression algorithms)
Statistics (linear regression algorithms)
Residuals and Associated Statistics (linear regression algorithms)
Partial Residual Plots (linear regression algorithms)
Missing Values (linear regression algorithms)
References (linear regression algorithms)


Stepwise (linear regression algorithms)

linear regression algorithms,linear regression algorithms,linear regression algorithms
stepwise,stepwise,stepwise

If there are independent variables currently entered in the model, choose Xk such that F−to−removek is minimum. Xk is removed if F−to−removek<Fout (default = 2.71) or, if probability criteria are used, P(F−to−removek)>Pout (default = 0.1). If the inequality does not hold, no variable is removed from the model.

If there are no independent variables currently entered in the model or if no entered variable is to be removed, choose Xk such that F−to−enterk is maximum. Xk is entered if F−to−enterk>Fin (default = 3.84) or, P(F−to−enterk)<Pin (default = 0.05). If the inequality does not hold, no variable is entered.

At each step, all eligible variables are considered for removal and entry.

Related Topics

Methods for Variable Entry and Removal (linear regression algorithms)
Forward (linear regression algorithms)
Backward (linear regression algorithms)
Enter (Forced Entry) (linear regression algorithms)
Remove (Forced Removal) (linear regression algorithms)


Forward (linear regression algorithms)

linear regression algorithms,linear regression algorithms,linear regression algorithms
forward,forward,forward

This procedure is the entry phase of the stepwise procedure.

Related Topics

Methods for Variable Entry and Removal (linear regression algorithms)
Stepwise (linear regression algorithms)
Backward (linear regression algorithms)
Enter (Forced Entry) (linear regression algorithms)
Remove (Forced Removal) (linear regression algorithms)


Backward (linear regression algorithms)

linear regression algorithms,linear regression algorithms,linear regression algorithms
backward,backward,backward

This procedure is the removal phase of the stepwise procedure and can be used only after at least one independent variable has been entered in the model.

Related Topics

Methods for Variable Entry and Removal (linear regression algorithms)
Stepwise (linear regression algorithms)
Forward (linear regression algorithms)
Enter (Forced Entry) (linear regression algorithms)
Remove (Forced Removal) (linear regression algorithms)


Enter (Forced Entry) (linear regression algorithms)

linear regression algorithms,linear regression algorithms,linear regression algorithms
enter (forced entry),enter (forced entry),enter (forced entry)

Choose Xk such that rkk is maximum and enter Xk. Repeat for all variables to be entered.

Related Topics

Methods for Variable Entry and Removal (linear regression algorithms)
Stepwise (linear regression algorithms)
Forward (linear regression algorithms)
Backward (linear regression algorithms)
Remove (Forced Removal) (linear regression algorithms)


Remove (Forced Removal) (linear regression algorithms)

linear regression algorithms,linear regression algorithms,linear regression algorithms
remove (forced removal),remove (forced removal),remove (forced removal)

Choose Xk such that rkk is minimum and remove Xk. Repeat for all variables to be removed.

Related Topics

Methods for Variable Entry and Removal (linear regression algorithms)
Stepwise (linear regression algorithms)
Forward (linear regression algorithms)
Backward (linear regression algorithms)
Enter (Forced Entry) (linear regression algorithms)


Statistics (linear regression algorithms)

linear regression algorithms,linear regression algorithms,linear regression algorithms
statistics,statistics,statistics

The following statistics are available.

Related Topics

Summary (linear regression algorithms)
Selection Criteria (linear regression algorithms)
Collinearity (linear regression algorithms)
Statistics for Variables in the Equation (linear regression algorithms)
Statistics for Variables Not in the Equation (linear regression algorithms)
REGRESSION Algorithms
Notation (linear regression algorithms)
Descriptive Statistics (linear regression algorithms)
Sweep Operations (Dempster, 1969) (linear regression algorithms)
Variable Selection Criteria (linear regression algorithms)
Methods for Variable Entry and Removal (linear regression algorithms)
Residuals and Associated Statistics (linear regression algorithms)
Partial Residual Plots (linear regression algorithms)
Missing Values (linear regression algorithms)
References (linear regression algorithms)


Summary (linear regression algorithms)

linear regression algorithms,linear regression algorithms,linear regression algorithms
summary,summary,summary

For the summary statistics, assume p independent variables are currently entered in the equation, of which a block of q variables have been entered or removed in the current step.

Related Topics

Multiple R (linear regression algorithms)
R Square (linear regression algorithms)
Adjusted R Square (linear regression algorithms)
R Square Change (when a block of q independent variables was added or removed) (linear regression algorithms)
F Change and Significance of F Change (linear regression algorithms)
Residual Sum of Squares (linear regression algorithms)
Sum of Squares Due to Regression (linear regression algorithms)
ANOVA Table (linear regression algorithms)
Standard Error of Estimate (linear regression algorithms)
Variance-Covariance Matrix for Unstandardized Regression Coefficient Estimates (linear regression algorithms)
Selection Criteria (linear regression algorithms)
Collinearity (linear regression algorithms)
Statistics for Variables in the Equation (linear regression algorithms)
Statistics for Variables Not in the Equation (linear regression algorithms)


Multiple R (linear regression algorithms)

linear regression algorithms,linear regression algorithms,linear regression algorithms
multiple R,multiple R,multiple R
R=
√ 1−ryy

Related Topics

Summary (linear regression algorithms)
R Square (linear regression algorithms)
Adjusted R Square (linear regression algorithms)
R Square Change (when a block of q independent variables was added or removed) (linear regression algorithms)
F Change and Significance of F Change (linear regression algorithms)
Residual Sum of Squares (linear regression algorithms)
Sum of Squares Due to Regression (linear regression algorithms)
ANOVA Table (linear regression algorithms)
Standard Error of Estimate (linear regression algorithms)
Variance-Covariance Matrix for Unstandardized Regression Coefficient Estimates (linear regression algorithms)


R Square (linear regression algorithms)

linear regression algorithms,linear regression algorithms,linear regression algorithms
R square,R square,R square
R2=1−ryy

Related Topics

Summary (linear regression algorithms)
Multiple R (linear regression algorithms)
Adjusted R Square (linear regression algorithms)
R Square Change (when a block of q independent variables was added or removed) (linear regression algorithms)
F Change and Significance of F Change (linear regression algorithms)
Residual Sum of Squares (linear regression algorithms)
Sum of Squares Due to Regression (linear regression algorithms)
ANOVA Table (linear regression algorithms)
Standard Error of Estimate (linear regression algorithms)
Variance-Covariance Matrix for Unstandardized Regression Coefficient Estimates (linear regression algorithms)


Adjusted R Square (linear regression algorithms)

linear regression algorithms,linear regression algorithms,linear regression algorithms
adjusted R square,adjusted R square,adjusted R square
R2adj=R2−(1−R2)pC−p*

Related Topics

Summary (linear regression algorithms)
Multiple R (linear regression algorithms)
R Square (linear regression algorithms)
R Square Change (when a block of q independent variables was added or removed) (linear regression algorithms)
F Change and Significance of F Change (linear regression algorithms)
Residual Sum of Squares (linear regression algorithms)
Sum of Squares Due to Regression (linear regression algorithms)
ANOVA Table (linear regression algorithms)
Standard Error of Estimate (linear regression algorithms)
Variance-Covariance Matrix for Unstandardized Regression Coefficient Estimates (linear regression algorithms)


R Square Change (when a block of q independent variables was added or removed) (linear regression algorithms)

linear regression algorithms,linear regression algorithms,linear regression algorithms
R square change,R square change,R square change
ΔR2=R2current−R2previous

Related Topics

Summary (linear regression algorithms)
Multiple R (linear regression algorithms)
R Square (linear regression algorithms)
Adjusted R Square (linear regression algorithms)
F Change and Significance of F Change (linear regression algorithms)
Residual Sum of Squares (linear regression algorithms)
Sum of Squares Due to Regression (linear regression algorithms)
ANOVA Table (linear regression algorithms)
Standard Error of Estimate (linear regression algorithms)
Variance-Covariance Matrix for Unstandardized Regression Coefficient Estimates (linear regression algorithms)


F Change and Significance of F Change (linear regression algorithms)

linear regression algorithms,linear regression algorithms,linear regression algorithms
F change,F change,F change
significance of F change,significance of F change,significance of F change
ΔF={
ΔR2(C−p*)q(1−R2current) | for the addition of q independent variables
ΔR2(C−p*−q)q(R2previous−1) | for the removal of q independent variables

the degrees of freedom for the addition are q and C−p*, while the degrees of freedom for the removal are q and C−p*−q.

Related Topics

Summary (linear regression algorithms)
Multiple R (linear regression algorithms)
R Square (linear regression algorithms)
Adjusted R Square (linear regression algorithms)
R Square Change (when a block of q independent variables was added or removed) (linear regression algorithms)
Residual Sum of Squares (linear regression algorithms)
Sum of Squares Due to Regression (linear regression algorithms)
ANOVA Table (linear regression algorithms)
Standard Error of Estimate (linear regression algorithms)
Variance-Covariance Matrix for Unstandardized Regression Coefficient Estimates (linear regression algorithms)


Residual Sum of Squares (linear regression algorithms)

linear regression algorithms,linear regression algorithms,linear regression algorithms
residual sum of squares,residual sum of squares,residual sum of squares
SSe=ryy(C−1)Syy

with degrees of freedom C−p*.

Related Topics

Summary (linear regression algorithms)
Multiple R (linear regression algorithms)
R Square (linear regression algorithms)
Adjusted R Square (linear regression algorithms)
R Square Change (when a block of q independent variables was added or removed) (linear regression algorithms)
F Change and Significance of F Change (linear regression algorithms)
Sum of Squares Due to Regression (linear regression algorithms)
ANOVA Table (linear regression algorithms)
Standard Error of Estimate (linear regression algorithms)
Variance-Covariance Matrix for Unstandardized Regression Coefficient Estimates (linear regression algorithms)


Sum of Squares Due to Regression (linear regression algorithms)

linear regression algorithms,linear regression algorithms,linear regression algorithms
sum of squares due to regression,sum of squares due to regression,sum of squares due to regression
SSR=R2(C−1) Syy

with degrees of freedom p.

Related Topics

Summary (linear regression algorithms)
Multiple R (linear regression algorithms)
R Square (linear regression algorithms)
Adjusted R Square (linear regression algorithms)
R Square Change (when a block of q independent variables was added or removed) (linear regression algorithms)
F Change and Significance of F Change (linear regression algorithms)
Residual Sum of Squares (linear regression algorithms)
ANOVA Table (linear regression algorithms)
Standard Error of Estimate (linear regression algorithms)
Variance-Covariance Matrix for Unstandardized Regression Coefficient Estimates (linear regression algorithms)


ANOVA Table (linear regression algorithms)

linear regression algorithms,linear regression algorithms,linear regression algorithms
ANOVA table,ANOVA table,ANOVA table
Analysis of Variance | df | Sum of Squares | Mean Square
Regression | p | SSR | (SSR)/p
w | C−p* | SSe | (SSe)/(C−p*)

Related Topics

Summary (linear regression algorithms)
Multiple R (linear regression algorithms)
R Square (linear regression algorithms)
Adjusted R Square (linear regression algorithms)
R Square Change (when a block of q independent variables was added or removed) (linear regression algorithms)
F Change and Significance of F Change (linear regression algorithms)
Residual Sum of Squares (linear regression algorithms)
Sum of Squares Due to Regression (linear regression algorithms)
Standard Error of Estimate (linear regression algorithms)
Variance-Covariance Matrix for Unstandardized Regression Coefficient Estimates (linear regression algorithms)


Standard Error of Estimate (linear regression algorithms)

Also known as the standard error of regression, this is simply the square root of the mean square residual from the ANOVA table, or
√ (SSe)/(C−p*)
.

Related Topics

Summary (linear regression algorithms)
Multiple R (linear regression algorithms)
R Square (linear regression algorithms)
Adjusted R Square (linear regression algorithms)
R Square Change (when a block of q independent variables was added or removed) (linear regression algorithms)
F Change and Significance of F Change (linear regression algorithms)
Residual Sum of Squares (linear regression algorithms)
Sum of Squares Due to Regression (linear regression algorithms)
ANOVA Table (linear regression algorithms)
Variance-Covariance Matrix for Unstandardized Regression Coefficient Estimates (linear regression algorithms)


Variance-Covariance Matrix for Unstandardized Regression Coefficient Estimates (linear regression algorithms)

linear regression algorithms,linear regression algorithms,linear regression algorithms
variance-covariance matrix for unstandardized regression coefficient estimates,variance-covariance matrix for unstandardized regression coefficient estimates,variance-covariance matrix for unstandardized regression coefficient estimates

A square matrix of size p with diagonal elements equal to the variance, the below diagonal elements equal to the covariance, and the above diagonal elements equal to the correlations:

var(bk)=rkkryySyySkk(C−p*)
cov(bk,bj)=rkjryySyy
√ SkkSjj
(C−p*)
cor(bk,bj)=rkj
√ rkkrjj

Related Topics

Summary (linear regression algorithms)
Multiple R (linear regression algorithms)
R Square (linear regression algorithms)
Adjusted R Square (linear regression algorithms)
R Square Change (when a block of q independent variables was added or removed) (linear regression algorithms)
F Change and Significance of F Change (linear regression algorithms)
Residual Sum of Squares (linear regression algorithms)
Sum of Squares Due to Regression (linear regression algorithms)
ANOVA Table (linear regression algorithms)
Standard Error of Estimate (linear regression algorithms)


Selection Criteria (linear regression algorithms)

The following selection criteria are available.

Related Topics

Akaike Information Criterion (AIC) (linear regression algorithms)
Amemiya's Prediction Criterion (PC) (linear regression algorithms)
Mallow's CP (linear regression algorithms)
Schwarz Bayesian Criterion (SBC) (linear regression algorithms)
Summary (linear regression algorithms)
Collinearity (linear regression algorithms)
Statistics for Variables in the Equation (linear regression algorithms)
Statistics for Variables Not in the Equation (linear regression algorithms)


Akaike Information Criterion (AIC) (linear regression algorithms)

linear regression algorithms,linear regression algorithms,linear regression algorithms
Akaike information Criterion,Akaike information Criterion,Akaike information Criterion
AIC,AIC,AIC
AIC=Cln(SSeC)+2p*

Related Topics

Selection Criteria (linear regression algorithms)
Amemiya's Prediction Criterion (PC) (linear regression algorithms)
Mallow's CP (linear regression algorithms)
Schwarz Bayesian Criterion (SBC) (linear regression algorithms)


Amemiya's Prediction Criterion (PC) (linear regression algorithms)

linear regression algorithms,linear regression algorithms,linear regression algorithms
Amemiya's prediction criterion,Amemiya's prediction criterion,Amemiya's prediction criterion
PC,PC,PC
PC=(1−R2)(C+p*)C−p*

Related Topics

Selection Criteria (linear regression algorithms)
Akaike Information Criterion (AIC) (linear regression algorithms)
Mallow's CP (linear regression algorithms)
Schwarz Bayesian Criterion (SBC) (linear regression algorithms)


Mallow's CP (linear regression algorithms)

linear regression algorithms,linear regression algorithms,linear regression algorithms
Mallow's Cp,Mallow's Cp,Mallow's Cp
CP,CP,CP
CP=SSe
^
σ
2+2p*−C

where
^
σ
2 is the mean square error from fitting the model that includes all the variables in the variable list.

Related Topics

Selection Criteria (linear regression algorithms)
Akaike Information Criterion (AIC) (linear regression algorithms)
Amemiya's Prediction Criterion (PC) (linear regression algorithms)
Schwarz Bayesian Criterion (SBC) (linear regression algorithms)


Schwarz Bayesian Criterion (SBC) (linear regression algorithms)

linear regression algorithms,linear regression algorithms,linear regression algorithms
Schwarz Bayesian criterion,Schwarz Bayesian criterion,Schwarz Bayesian criterion
SBC,SBC,SBC
SBC=Cln(SSeC)+p*ln(C)

Related Topics

Selection Criteria (linear regression algorithms)
Akaike Information Criterion (AIC) (linear regression algorithms)
Amemiya's Prediction Criterion (PC) (linear regression algorithms)
Mallow's CP (linear regression algorithms)


Collinearity (linear regression algorithms)

linear regression algorithms,linear regression algorithms,linear regression algorithms
collinearity,collinearity,collinearity

The following measures of collinearity are available.

Related Topics

Variance Inflation Factors (linear regression algorithms)
Tolerance (linear regression algorithms)
Eigenvalues (linear regression algorithms)
Condition Indices (linear regression algorithms)
Variance-Decomposition Proportions (linear regression algorithms)
Summary (linear regression algorithms)
Selection Criteria (linear regression algorithms)
Statistics for Variables in the Equation (linear regression algorithms)
Statistics for Variables Not in the Equation (linear regression algorithms)


Variance Inflation Factors (linear regression algorithms)

linear regression algorithms,linear regression algorithms,linear regression algorithms
variance inflation factors,variance inflation factors,variance inflation factors
VIFi=1rii

Related Topics

Collinearity (linear regression algorithms)
Tolerance (linear regression algorithms)
Eigenvalues (linear regression algorithms)
Condition Indices (linear regression algorithms)
Variance-Decomposition Proportions (linear regression algorithms)


Tolerance (linear regression algorithms)

linear regression algorithms,linear regression algorithms,linear regression algorithms
tolerance,tolerance,tolerance

Tolerancei=rii

Related Topics

Collinearity (linear regression algorithms)
Variance Inflation Factors (linear regression algorithms)
Eigenvalues (linear regression algorithms)
Condition Indices (linear regression algorithms)
Variance-Decomposition Proportions (linear regression algorithms)


Eigenvalues (linear regression algorithms)

linear regression algorithms,linear regression algorithms,linear regression algorithms
eigenvalues,eigenvalues,eigenvalues

The eigenvalues of scaled and uncentered cross-product matrix for the independent variables in the equation are computed by the QL method (Wilkinson and Reinsch, 1971).

Related Topics

Collinearity (linear regression algorithms)
Variance Inflation Factors (linear regression algorithms)
Tolerance (linear regression algorithms)
Condition Indices (linear regression algorithms)
Variance-Decomposition Proportions (linear regression algorithms)


Condition Indices (linear regression algorithms)

linear regression algorithms,linear regression algorithms,linear regression algorithms
condition indices,condition indices,condition indices
ηk=maxλjλk

Related Topics

Collinearity (linear regression algorithms)
Variance Inflation Factors (linear regression algorithms)
Tolerance (linear regression algorithms)
Eigenvalues (linear regression algorithms)
Variance-Decomposition Proportions (linear regression algorithms)


Variance-Decomposition Proportions (linear regression algorithms)

linear regression algorithms,linear regression algorithms,linear regression algorithms
variance-decomposition proportions,variance-decomposition proportions,variance-decomposition proportions

Let

vi=(vi1,...,vip)

be the eigenvector associated with eigenvalue λi. Also, let

Φij=v2ij/λi
and Φj=pΣi=1Φij

The variance-decomposition proportion for the jth regression coefficient associated with the ith component is defined as

πij=Φij/Φj

Related Topics

Collinearity (linear regression algorithms)
Variance Inflation Factors (linear regression algorithms)
Tolerance (linear regression algorithms)
Eigenvalues (linear regression algorithms)
Condition Indices (linear regression algorithms)


Statistics for Variables in the Equation (linear regression algorithms)

linear regression algorithms,linear regression algorithms,linear regression algorithms
statistics for variables in the equation,statistics for variables in the equation,statistics for variables in the equation

The following statistics are computed for each variable in the equation.

Related Topics

Regression Coefficient (linear regression algorithms)
95% confidence interval for coefficient (linear regression algorithms)
If the model includes the intercept, the intercept is estimated as (linear regression algorithms)
Beta Coefficients (linear regression algorithms)
Part Correlation (linear regression algorithms)
Partial Correlation (linear regression algorithms)
Summary (linear regression algorithms)
Selection Criteria (linear regression algorithms)
Collinearity (linear regression algorithms)
Statistics for Variables Not in the Equation (linear regression algorithms)


Regression Coefficient (linear regression algorithms)

linear regression algorithms,linear regression algorithms,linear regression algorithms
regression coefficient bk,regression coefficient bk,regression coefficient bk

bk=ryk
√ Syy
√ Skk
for k=1,...,p

The standard error of bk is computed as

^
σ
bk=
√ rkkryySyySkk(C−p*)

Related Topics

Statistics for Variables in the Equation (linear regression algorithms)
95% confidence interval for coefficient (linear regression algorithms)
If the model includes the intercept, the intercept is estimated as (linear regression algorithms)
Beta Coefficients (linear regression algorithms)
Part Correlation (linear regression algorithms)
Partial Correlation (linear regression algorithms)


95% confidence interval for coefficient (linear regression algorithms)

linear regression algorithms,linear regression algorithms,linear regression algorithms
95% confidence interval,95% confidence interval,95% confidence interval
bk±
^
σ
bkt0.975, C−p*

Related Topics

Statistics for Variables in the Equation (linear regression algorithms)
Regression Coefficient (linear regression algorithms)
If the model includes the intercept, the intercept is estimated as (linear regression algorithms)
Beta Coefficients (linear regression algorithms)
Part Correlation (linear regression algorithms)
Partial Correlation (linear regression algorithms)


If the model includes the intercept, the intercept is estimated as (linear regression algorithms)

linear regression algorithms,linear regression algorithms,linear regression algorithms
intercept estimate,intercept estimate,intercept estimate
b0=y−pΣk=1bkXk

The variance of b0 is estimated by

^
σ
2b0=(C−1)ryySyyC(C−p*)+pΣk=1X2k
^
σ
2bk+2pΣk=j+1p−1Σj=1XkXjest. cov (bk,bj)

Related Topics

Statistics for Variables in the Equation (linear regression algorithms)
Regression Coefficient (linear regression algorithms)
95% confidence interval for coefficient (linear regression algorithms)
Beta Coefficients (linear regression algorithms)
Part Correlation (linear regression algorithms)
Partial Correlation (linear regression algorithms)


Beta Coefficients (linear regression algorithms)

linear regression algorithms,linear regression algorithms,linear regression algorithms
beta coefficients,beta coefficients,beta coefficients
Betak=ryk

The standard error of Betak is estimated by

^
σ
Betak=
√ ryyrkkC−p*

F-test for Betak

F=(Betak
^
σ
Betak)2

with 1 and C−p* degrees of freedom.

Related Topics

Statistics for Variables in the Equation (linear regression algorithms)
Regression Coefficient (linear regression algorithms)
95% confidence interval for coefficient (linear regression algorithms)
If the model includes the intercept, the intercept is estimated as (linear regression algorithms)
Part Correlation (linear regression algorithms)
Partial Correlation (linear regression algorithms)


Part Correlation (linear regression algorithms)

linear regression algorithms,linear regression algorithms,linear regression algorithms
part correlation,part correlation,part correlation
Part−Corr(Xk)=ryk
√ rkk

Related Topics

Statistics for Variables in the Equation (linear regression algorithms)
Regression Coefficient (linear regression algorithms)
95% confidence interval for coefficient (linear regression algorithms)
If the model includes the intercept, the intercept is estimated as (linear regression algorithms)
Beta Coefficients (linear regression algorithms)
Partial Correlation (linear regression algorithms)


Partial Correlation (linear regression algorithms)

linear regression algorithms,linear regression algorithms,linear regression algorithms
partial correlation,partial correlation,partial correlation
Partial−Corr(Xk)=ryk
√ rkkryy−rykrky

Related Topics

Statistics for Variables in the Equation (linear regression algorithms)
Regression Coefficient (linear regression algorithms)
95% confidence interval for coefficient (linear regression algorithms)
If the model includes the intercept, the intercept is estimated as (linear regression algorithms)
Beta Coefficients (linear regression algorithms)
Part Correlation (linear regression algorithms)


Statistics for Variables Not in the Equation (linear regression algorithms)

The following statistics are computed for each variable not in the equation.

Related Topics

Standardized regression coefficient Beta if predictor enters the equation at the next step (linear regression algorithms)
Partial Correlation (linear regression algorithms)
Tolerance (linear regression algorithms)
Minimum tolerance among variables already in the equation if predictor enters at the next step is (linear regression algorithms)
Summary (linear regression algorithms)
Selection Criteria (linear regression algorithms)
Collinearity (linear regression algorithms)
Statistics for Variables in the Equation (linear regression algorithms)


Standardized regression coefficient Beta if predictor enters the equation at the next step (linear regression algorithms)

linear regression algorithms,linear regression algorithms,linear regression algorithms
standardized regression coefficient,standardized regression coefficient,standardized regression coefficient
Beta*k=rykrkk

The F-test for Beta*k

F=(C−p*−1)r2ykrkkryy−r2yk

with 1 and C−p* degrees of freedom

Related Topics

Statistics for Variables Not in the Equation (linear regression algorithms)
Partial Correlation (linear regression algorithms)
Tolerance (linear regression algorithms)
Minimum tolerance among variables already in the equation if predictor enters at the next step is (linear regression algorithms)


Partial Correlation (linear regression algorithms)

linear regression algorithms,linear regression algorithms,linear regression algorithms
partial correlation,partial correlation,partial correlation
Partial(Xk)=ryk
√ ryyrkk

Related Topics

Statistics for Variables Not in the Equation (linear regression algorithms)
Standardized regression coefficient Beta if predictor enters the equation at the next step (linear regression algorithms)
Tolerance (linear regression algorithms)
Minimum tolerance among variables already in the equation if predictor enters at the next step is (linear regression algorithms)


Tolerance (linear regression algorithms)

linear regression algorithms,linear regression algorithms,linear regression algorithms
tolerance of Xk,tolerance of Xk,tolerance of Xk
Tolerancek=rkk

Related Topics

Statistics for Variables Not in the Equation (linear regression algorithms)
Standardized regression coefficient Beta if predictor enters the equation at the next step (linear regression algorithms)
Partial Correlation (linear regression algorithms)
Minimum tolerance among variables already in the equation if predictor enters at the next step is (linear regression algorithms)


Minimum tolerance among variables already in the equation if predictor enters at the next step is (linear regression algorithms)

linear regression algorithms,linear regression algorithms,linear regression algorithms
minimum tolerance among variables already in the equation,minimum tolerance among variables already in the equation,minimum tolerance among variables already in the equation
min
1≤j≤p
(1rjj−(rkjrjk)/rkk, rkk)

Related Topics

Statistics for Variables Not in the Equation (linear regression algorithms)
Standardized regression coefficient Beta if predictor enters the equation at the next step (linear regression algorithms)
Partial Correlation (linear regression algorithms)
Tolerance (linear regression algorithms)


Residuals and Associated Statistics (linear regression algorithms)

linear regression algorithms,linear regression algorithms,linear regression algorithms
residuals and associated statistics,residuals and associated statistics,residuals and associated statistics

There are 19 temporary variables that can be added to the active system file. These variables can be requested with the RESIDUAL subcommand.

Related Topics

Centered Leverage Values (linear regression algorithms)
Unstandardized Predicted Values (linear regression algorithms)
Unstandardized Residuals (linear regression algorithms)
Standardized Residuals (linear regression algorithms)
Standardized Predicted Values (linear regression algorithms)
Studentized Residuals (linear regression algorithms)
Deleted Residuals (linear regression algorithms)
Studentized Deleted Residuals (linear regression algorithms)
Adjusted Predicted Values (linear regression algorithms)
DfBeta (linear regression algorithms)
Standardized DfBeta (linear regression algorithms)
DfFit (linear regression algorithms)
Standardized DfFit (linear regression algorithms)
Covratio (linear regression algorithms)
Mahalanobis Distance (linear regression algorithms)
Cook’s Distance (Cook, 1977) (linear regression algorithms)
Standard Errors of the Mean Predicted Values (linear regression algorithms)
95% Confidence Interval for Mean Predicted Response (linear regression algorithms)
95% Confidence Interval for a Single Observation (linear regression algorithms)
Durbin-Watson Statistic (linear regression algorithms)
REGRESSION Algorithms
Notation (linear regression algorithms)
Descriptive Statistics (linear regression algorithms)
Sweep Operations (Dempster, 1969) (linear regression algorithms)
Variable Selection Criteria (linear regression algorithms)
Methods for Variable Entry and Removal (linear regression algorithms)
Statistics (linear regression algorithms)
Partial Residual Plots (linear regression algorithms)
Missing Values (linear regression algorithms)
References (linear regression algorithms)


Centered Leverage Values (linear regression algorithms)

linear regression algorithms,linear regression algorithms,linear regression algorithms
centered leverage values,centered leverage values,centered leverage values

For all cases, compute

hi={
gi(C−1)pΣj=1pΣk=1(Xji−Xj)(Xki−Xk)rjk
√ SjjSkk
if intercept is included
gi(C−1)pΣj=1pΣk=1XjiXkirjk
√ SjjSkk
otherwise

For selected cases, leverage is hi; for unselected case i with positive caseweight, leverage is

h´i={
gi[(1W+hi)/(1+1W+hi)−1W+1] | if intercept is included
hi/(1+hi/gi) | otherwise

Related Topics

Residuals and Associated Statistics (linear regression algorithms)
Unstandardized Predicted Values (linear regression algorithms)
Unstandardized Residuals (linear regression algorithms)
Standardized Residuals (linear regression algorithms)
Standardized Predicted Values (linear regression algorithms)
Studentized Residuals (linear regression algorithms)
Deleted Residuals (linear regression algorithms)
Studentized Deleted Residuals (linear regression algorithms)
Adjusted Predicted Values (linear regression algorithms)
DfBeta (linear regression algorithms)
Standardized DfBeta (linear regression algorithms)
DfFit (linear regression algorithms)
Standardized DfFit (linear regression algorithms)
Covratio (linear regression algorithms)
Mahalanobis Distance (linear regression algorithms)
Cook’s Distance (Cook, 1977) (linear regression algorithms)
Standard Errors of the Mean Predicted Values (linear regression algorithms)
95% Confidence Interval for Mean Predicted Response (linear regression algorithms)
95% Confidence Interval for a Single Observation (linear regression algorithms)
Durbin-Watson Statistic (linear regression algorithms)


Unstandardized Predicted Values (linear regression algorithms)

linear regression algorithms,linear regression algorithms,linear regression algorithms
unstandardized predicted values,unstandardized predicted values,unstandardized predicted values
^
Y
i={
pΣk=1bkXki | if no intercept
b0+pΣk=1bkXki | otherwise

Related Topics

Residuals and Associated Statistics (linear regression algorithms)
Centered Leverage Values (linear regression algorithms)
Unstandardized Residuals (linear regression algorithms)
Standardized Residuals (linear regression algorithms)
Standardized Predicted Values (linear regression algorithms)
Studentized Residuals (linear regression algorithms)
Deleted Residuals (linear regression algorithms)
Studentized Deleted Residuals (linear regression algorithms)
Adjusted Predicted Values (linear regression algorithms)
DfBeta (linear regression algorithms)
Standardized DfBeta (linear regression algorithms)
DfFit (linear regression algorithms)
Standardized DfFit (linear regression algorithms)
Covratio (linear regression algorithms)
Mahalanobis Distance (linear regression algorithms)
Cook’s Distance (Cook, 1977) (linear regression algorithms)
Standard Errors of the Mean Predicted Values (linear regression algorithms)
95% Confidence Interval for Mean Predicted Response (linear regression algorithms)
95% Confidence Interval for a Single Observation (linear regression algorithms)
Durbin-Watson Statistic (linear regression algorithms)


Unstandardized Residuals (linear regression algorithms)

linear regression algorithms,linear regression algorithms,linear regression algorithms
unstandardized residuals,unstandardized residuals,unstandardized residuals
ei=Yi−
^
Y
i

Related Topics

Residuals and Associated Statistics (linear regression algorithms)
Centered Leverage Values (linear regression algorithms)
Unstandardized Predicted Values (linear regression algorithms)
Standardized Residuals (linear regression algorithms)
Standardized Predicted Values (linear regression algorithms)
Studentized Residuals (linear regression algorithms)
Deleted Residuals (linear regression algorithms)
Studentized Deleted Residuals (linear regression algorithms)
Adjusted Predicted Values (linear regression algorithms)
DfBeta (linear regression algorithms)
Standardized DfBeta (linear regression algorithms)
DfFit (linear regression algorithms)
Standardized DfFit (linear regression algorithms)
Covratio (linear regression algorithms)
Mahalanobis Distance (linear regression algorithms)
Cook’s Distance (Cook, 1977) (linear regression algorithms)
Standard Errors of the Mean Predicted Values (linear regression algorithms)
95% Confidence Interval for Mean Predicted Response (linear regression algorithms)
95% Confidence Interval for a Single Observation (linear regression algorithms)
Durbin-Watson Statistic (linear regression algorithms)


Standardized Residuals (linear regression algorithms)

linear regression algorithms,linear regression algorithms,linear regression algorithms
standardized residuals,standardized residuals,standardized residuals
ZRESIDi={
eis | if no regression weight is specified
SYSMIS | otherwise

where s is the square root of the residual mean square.

Related Topics

Residuals and Associated Statistics (linear regression algorithms)
Centered Leverage Values (linear regression algorithms)
Unstandardized Predicted Values (linear regression algorithms)
Unstandardized Residuals (linear regression algorithms)
Standardized Predicted Values (linear regression algorithms)
Studentized Residuals (linear regression algorithms)
Deleted Residuals (linear regression algorithms)
Studentized Deleted Residuals (linear regression algorithms)
Adjusted Predicted Values (linear regression algorithms)
DfBeta (linear regression algorithms)
Standardized DfBeta (linear regression algorithms)
DfFit (linear regression algorithms)
Standardized DfFit (linear regression algorithms)
Covratio (linear regression algorithms)
Mahalanobis Distance (linear regression algorithms)
Cook’s Distance (Cook, 1977) (linear regression algorithms)
Standard Errors of the Mean Predicted Values (linear regression algorithms)
95% Confidence Interval for Mean Predicted Response (linear regression algorithms)
95% Confidence Interval for a Single Observation (linear regression algorithms)
Durbin-Watson Statistic (linear regression algorithms)


Standardized Predicted Values (linear regression algorithms)

linear regression algorithms,linear regression algorithms,linear regression algorithms
standardized predicted values,standardized predicted values,standardized predicted values
ZPREDi={
^
Y
i−Ysd 		if no regression weight is specified
SYSMIS otherwise

where sd is computed as

sd=
√ lΣi=1ci(
^
Y
i−Y)2C−1

Related Topics

Residuals and Associated Statistics (linear regression algorithms)
Centered Leverage Values (linear regression algorithms)
Unstandardized Predicted Values (linear regression algorithms)
Unstandardized Residuals (linear regression algorithms)
Standardized Residuals (linear regression algorithms)
Studentized Residuals (linear regression algorithms)
Deleted Residuals (linear regression algorithms)
Studentized Deleted Residuals (linear regression algorithms)
Adjusted Predicted Values (linear regression algorithms)
DfBeta (linear regression algorithms)
Standardized DfBeta (linear regression algorithms)
DfFit (linear regression algorithms)
Standardized DfFit (linear regression algorithms)
Covratio (linear regression algorithms)
Mahalanobis Distance (linear regression algorithms)
Cook’s Distance (Cook, 1977) (linear regression algorithms)
Standard Errors of the Mean Predicted Values (linear regression algorithms)
95% Confidence Interval for Mean Predicted Response (linear regression algorithms)
95% Confidence Interval for a Single Observation (linear regression algorithms)
Durbin-Watson Statistic (linear regression algorithms)


Studentized Residuals (linear regression algorithms)

linear regression algorithms,linear regression algorithms,linear regression algorithms
studentized residuals,studentized residuals,studentized residuals
SRESi={
ei/s
√ (1−
˜
h
i)/gi
for selected cases with ci>0
ei/s
√ (1+
˜
h
i)/gi
otherwise

Related Topics

Residuals and Associated Statistics (linear regression algorithms)
Centered Leverage Values (linear regression algorithms)
Unstandardized Predicted Values (linear regression algorithms)
Unstandardized Residuals (linear regression algorithms)
Standardized Residuals (linear regression algorithms)
Standardized Predicted Values (linear regression algorithms)
Deleted Residuals (linear regression algorithms)
Studentized Deleted Residuals (linear regression algorithms)
Adjusted Predicted Values (linear regression algorithms)
DfBeta (linear regression algorithms)
Standardized DfBeta (linear regression algorithms)
DfFit (linear regression algorithms)
Standardized DfFit (linear regression algorithms)
Covratio (linear regression algorithms)
Mahalanobis Distance (linear regression algorithms)
Cook’s Distance (Cook, 1977) (linear regression algorithms)
Standard Errors of the Mean Predicted Values (linear regression algorithms)
95% Confidence Interval for Mean Predicted Response (linear regression algorithms)
95% Confidence Interval for a Single Observation (linear regression algorithms)
Durbin-Watson Statistic (linear regression algorithms)


Deleted Residuals (linear regression algorithms)

linear regression algorithms,linear regression algorithms,linear regression algorithms
deleted residuals,deleted residuals,deleted residuals
DRESIDi={
ei/(1−
˜
h
i) 		for selected cases with ci>0
ei otherwise

Related Topics

Residuals and Associated Statistics (linear regression algorithms)
Centered Leverage Values (linear regression algorithms)
Unstandardized Predicted Values (linear regression algorithms)
Unstandardized Residuals (linear regression algorithms)
Standardized Residuals (linear regression algorithms)
Standardized Predicted Values (linear regression algorithms)
Studentized Residuals (linear regression algorithms)
Studentized Deleted Residuals (linear regression algorithms)
Adjusted Predicted Values (linear regression algorithms)
DfBeta (linear regression algorithms)
Standardized DfBeta (linear regression algorithms)
DfFit (linear regression algorithms)
Standardized DfFit (linear regression algorithms)
Covratio (linear regression algorithms)
Mahalanobis Distance (linear regression algorithms)
Cook’s Distance (Cook, 1977) (linear regression algorithms)
Standard Errors of the Mean Predicted Values (linear regression algorithms)
95% Confidence Interval for Mean Predicted Response (linear regression algorithms)
95% Confidence Interval for a Single Observation (linear regression algorithms)
Durbin-Watson Statistic (linear regression algorithms)


Studentized Deleted Residuals (linear regression algorithms)

linear regression algorithms,linear regression algorithms,linear regression algorithms
studentized deleted residuals,studentized deleted residuals,studentized deleted residuals
SDRESIDi={
DRESIDis*(i) for selected cases with ci>0
eis
√ (1+
˜
h
i)/gi
otherwise

where

s*(i)=1
√ C−p*−1
√ (C−p*)s21−
˜
h
i−DRESID2i

Related Topics

Residuals and Associated Statistics (linear regression algorithms)
Centered Leverage Values (linear regression algorithms)
Unstandardized Predicted Values (linear regression algorithms)
Unstandardized Residuals (linear regression algorithms)
Standardized Residuals (linear regression algorithms)
Standardized Predicted Values (linear regression algorithms)
Studentized Residuals (linear regression algorithms)
Deleted Residuals (linear regression algorithms)
Adjusted Predicted Values (linear regression algorithms)
DfBeta (linear regression algorithms)
Standardized DfBeta (linear regression algorithms)
DfFit (linear regression algorithms)
Standardized DfFit (linear regression algorithms)
Covratio (linear regression algorithms)
Mahalanobis Distance (linear regression algorithms)
Cook’s Distance (Cook, 1977) (linear regression algorithms)
Standard Errors of the Mean Predicted Values (linear regression algorithms)
95% Confidence Interval for Mean Predicted Response (linear regression algorithms)
95% Confidence Interval for a Single Observation (linear regression algorithms)
Durbin-Watson Statistic (linear regression algorithms)


Adjusted Predicted Values (linear regression algorithms)

linear regression algorithms,linear regression algorithms,linear regression algorithms
adjusted predicted values,adjusted predicted values,adjusted predicted values
ADJPREDi=Yi−DRESIDi

Related Topics

Residuals and Associated Statistics (linear regression algorithms)
Centered Leverage Values (linear regression algorithms)
Unstandardized Predicted Values (linear regression algorithms)
Unstandardized Residuals (linear regression algorithms)
Standardized Residuals (linear regression algorithms)
Standardized Predicted Values (linear regression algorithms)
Studentized Residuals (linear regression algorithms)
Deleted Residuals (linear regression algorithms)
Studentized Deleted Residuals (linear regression algorithms)
DfBeta (linear regression algorithms)
Standardized DfBeta (linear regression algorithms)
DfFit (linear regression algorithms)
Standardized DfFit (linear regression algorithms)
Covratio (linear regression algorithms)
Mahalanobis Distance (linear regression algorithms)
Cook’s Distance (Cook, 1977) (linear regression algorithms)
Standard Errors of the Mean Predicted Values (linear regression algorithms)
95% Confidence Interval for Mean Predicted Response (linear regression algorithms)
95% Confidence Interval for a Single Observation (linear regression algorithms)
Durbin-Watson Statistic (linear regression algorithms)


DfBeta (linear regression algorithms)

linear regression algorithms,linear regression algorithms,linear regression algorithms
DfBeta,DfBeta,DfBeta
DFBETAi=b−b(i)=giei(X´WX)−1Xti1−
˜
h
i

where

Xti={
(1,X1i,...,Xpi) | if intercept is included
(X1i,...,Xpi) | ottherwise

and W=diag(w1,...,wl).

This is only computed for selected cases with case weight greater than or equal to 1.

Related Topics

Residuals and Associated Statistics (linear regression algorithms)
Centered Leverage Values (linear regression algorithms)
Unstandardized Predicted Values (linear regression algorithms)
Unstandardized Residuals (linear regression algorithms)
Standardized Residuals (linear regression algorithms)
Standardized Predicted Values (linear regression algorithms)
Studentized Residuals (linear regression algorithms)
Deleted Residuals (linear regression algorithms)
Studentized Deleted Residuals (linear regression algorithms)
Adjusted Predicted Values (linear regression algorithms)
Standardized DfBeta (linear regression algorithms)
DfFit (linear regression algorithms)
Standardized DfFit (linear regression algorithms)
Covratio (linear regression algorithms)
Mahalanobis Distance (linear regression algorithms)
Cook’s Distance (Cook, 1977) (linear regression algorithms)
Standard Errors of the Mean Predicted Values (linear regression algorithms)
95% Confidence Interval for Mean Predicted Response (linear regression algorithms)
95% Confidence Interval for a Single Observation (linear regression algorithms)
Durbin-Watson Statistic (linear regression algorithms)


Standardized DfBeta (linear regression algorithms)

linear regression algorithms,linear regression algorithms,linear regression algorithms
standardized DfBeta,standardized DfBeta,standardized DfBeta
SDBETAij=bj−bj(i)s(i)
√ (XtWX)−1jj

where bj−bj(i) is the jth component of b−b(i), and

s(i)=s*(i)
√ 1−
˜
h
i

This is only computed for selected cases with case weight greater than or equal to 1.

Related Topics

Residuals and Associated Statistics (linear regression algorithms)
Centered Leverage Values (linear regression algorithms)
Unstandardized Predicted Values (linear regression algorithms)
Unstandardized Residuals (linear regression algorithms)
Standardized Residuals (linear regression algorithms)
Standardized Predicted Values (linear regression algorithms)
Studentized Residuals (linear regression algorithms)
Deleted Residuals (linear regression algorithms)
Studentized Deleted Residuals (linear regression algorithms)
Adjusted Predicted Values (linear regression algorithms)
DfBeta (linear regression algorithms)
DfFit (linear regression algorithms)
Standardized DfFit (linear regression algorithms)
Covratio (linear regression algorithms)
Mahalanobis Distance (linear regression algorithms)
Cook’s Distance (Cook, 1977) (linear regression algorithms)
Standard Errors of the Mean Predicted Values (linear regression algorithms)
95% Confidence Interval for Mean Predicted Response (linear regression algorithms)
95% Confidence Interval for a Single Observation (linear regression algorithms)
Durbin-Watson Statistic (linear regression algorithms)


DfFit (linear regression algorithms)

linear regression algorithms,linear regression algorithms,linear regression algorithms
DfFit,DfFit,DfFit
DFFITi=Xi[b−b(i)]=
˜
h
iei1−
˜
h
i

This is only computed for selected cases with case weight greater than or equal to 1.

Related Topics

Residuals and Associated Statistics (linear regression algorithms)
Centered Leverage Values (linear regression algorithms)
Unstandardized Predicted Values (linear regression algorithms)
Unstandardized Residuals (linear regression algorithms)
Standardized Residuals (linear regression algorithms)
Standardized Predicted Values (linear regression algorithms)
Studentized Residuals (linear regression algorithms)
Deleted Residuals (linear regression algorithms)
Studentized Deleted Residuals (linear regression algorithms)
Adjusted Predicted Values (linear regression algorithms)
DfBeta (linear regression algorithms)
Standardized DfBeta (linear regression algorithms)
Standardized DfFit (linear regression algorithms)
Covratio (linear regression algorithms)
Mahalanobis Distance (linear regression algorithms)
Cook’s Distance (Cook, 1977) (linear regression algorithms)
Standard Errors of the Mean Predicted Values (linear regression algorithms)
95% Confidence Interval for Mean Predicted Response (linear regression algorithms)
95% Confidence Interval for a Single Observation (linear regression algorithms)
Durbin-Watson Statistic (linear regression algorithms)


Standardized DfFit (linear regression algorithms)

linear regression algorithms,linear regression algorithms,linear regression algorithms
standardized DfFit,standardized DfFit,standardized DfFit
SDFITi=DFFITis(i)
√
˜
h
i

This is only computed for selected cases with case weight greater than or equal to 1.

Related Topics

Residuals and Associated Statistics (linear regression algorithms)
Centered Leverage Values (linear regression algorithms)
Unstandardized Predicted Values (linear regression algorithms)
Unstandardized Residuals (linear regression algorithms)
Standardized Residuals (linear regression algorithms)
Standardized Predicted Values (linear regression algorithms)
Studentized Residuals (linear regression algorithms)
Deleted Residuals (linear regression algorithms)
Studentized Deleted Residuals (linear regression algorithms)
Adjusted Predicted Values (linear regression algorithms)
DfBeta (linear regression algorithms)
Standardized DfBeta (linear regression algorithms)
DfFit (linear regression algorithms)
Covratio (linear regression algorithms)
Mahalanobis Distance (linear regression algorithms)
Cook’s Distance (Cook, 1977) (linear regression algorithms)
Standard Errors of the Mean Predicted Values (linear regression algorithms)
95% Confidence Interval for Mean Predicted Response (linear regression algorithms)
95% Confidence Interval for a Single Observation (linear regression algorithms)
Durbin-Watson Statistic (linear regression algorithms)


Covratio (linear regression algorithms)

linear regression algorithms,linear regression algorithms,linear regression algorithms
covratio,covratio,covratio
COVRATIOi=(s(i)s)2p*×11−
˜
h
i

This is only computed for selected cases with case weight greater than or equal to 1.

Related Topics

Residuals and Associated Statistics (linear regression algorithms)
Centered Leverage Values (linear regression algorithms)
Unstandardized Predicted Values (linear regression algorithms)
Unstandardized Residuals (linear regression algorithms)
Standardized Residuals (linear regression algorithms)
Standardized Predicted Values (linear regression algorithms)
Studentized Residuals (linear regression algorithms)
Deleted Residuals (linear regression algorithms)
Studentized Deleted Residuals (linear regression algorithms)
Adjusted Predicted Values (linear regression algorithms)
DfBeta (linear regression algorithms)
Standardized DfBeta (linear regression algorithms)
DfFit (linear regression algorithms)
Standardized DfFit (linear regression algorithms)
Mahalanobis Distance (linear regression algorithms)
Cook’s Distance (Cook, 1977) (linear regression algorithms)
Standard Errors of the Mean Predicted Values (linear regression algorithms)
95% Confidence Interval for Mean Predicted Response (linear regression algorithms)
95% Confidence Interval for a Single Observation (linear regression algorithms)
Durbin-Watson Statistic (linear regression algorithms)


Mahalanobis Distance (linear regression algorithms)

linear regression algorithms,linear regression algorithms,linear regression algorithms
mahalanobis distance,mahalanobis distance,mahalanobis distance

For selected cases with ci>0,

MAHALi={
(C−1)hi | if intercept is included
C hi | otherwise

For unselected cases with ci>0

MAHALi={
C h´i | if intercept is included
(C+1)h´i | otherwise

Related Topics

Residuals and Associated Statistics (linear regression algorithms)
Centered Leverage Values (linear regression algorithms)
Unstandardized Predicted Values (linear regression algorithms)
Unstandardized Residuals (linear regression algorithms)
Standardized Residuals (linear regression algorithms)
Standardized Predicted Values (linear regression algorithms)
Studentized Residuals (linear regression algorithms)
Deleted Residuals (linear regression algorithms)
Studentized Deleted Residuals (linear regression algorithms)
Adjusted Predicted Values (linear regression algorithms)
DfBeta (linear regression algorithms)
Standardized DfBeta (linear regression algorithms)
DfFit (linear regression algorithms)
Standardized DfFit (linear regression algorithms)
Covratio (linear regression algorithms)
Cook’s Distance (Cook, 1977) (linear regression algorithms)
Standard Errors of the Mean Predicted Values (linear regression algorithms)
95% Confidence Interval for Mean Predicted Response (linear regression algorithms)
95% Confidence Interval for a Single Observation (linear regression algorithms)
Durbin-Watson Statistic (linear regression algorithms)


Cook’s Distance (Cook, 1977) (linear regression algorithms)

linear regression algorithms,linear regression algorithms,linear regression algorithms
Cook's distance,Cook's distance,Cook's distance

For selected cases with ci>0

COOKi={
(DRESID2i
˜
h
igi)/[s2(p+1)] 		if intercept is included
(DRESID2ihigi)/(s2p) otherwise

For unselected cases with ci>0

COOKi={
(DRESID2i(h´i+1W))/[
˜
s
2(p+1)] 		if intercept is included
(DRESID2ih´i)/(
˜
s
2p) 		otherwise

where h´i is the leverage for unselected case i, and
˜
s
2 is computed as

˜
s
2={
1C−p[SSe+e2i(1−h´i−11+W)] | if intercept is included
1C−p+1[SSe+e2i(1−h´i)] | otherwise

Related Topics

Residuals and Associated Statistics (linear regression algorithms)
Centered Leverage Values (linear regression algorithms)
Unstandardized Predicted Values (linear regression algorithms)
Unstandardized Residuals (linear regression algorithms)
Standardized Residuals (linear regression algorithms)
Standardized Predicted Values (linear regression algorithms)
Studentized Residuals (linear regression algorithms)
Deleted Residuals (linear regression algorithms)
Studentized Deleted Residuals (linear regression algorithms)
Adjusted Predicted Values (linear regression algorithms)
DfBeta (linear regression algorithms)
Standardized DfBeta (linear regression algorithms)
DfFit (linear regression algorithms)
Standardized DfFit (linear regression algorithms)
Covratio (linear regression algorithms)
Mahalanobis Distance (linear regression algorithms)
Standard Errors of the Mean Predicted Values (linear regression algorithms)
95% Confidence Interval for Mean Predicted Response (linear regression algorithms)
95% Confidence Interval for a Single Observation (linear regression algorithms)
Durbin-Watson Statistic (linear regression algorithms)


Standard Errors of the Mean Predicted Values (linear regression algorithms)

linear regression algorithms,linear regression algorithms,linear regression algorithms
standard errors of the mean predicted values,standard errors of the mean predicted values,standard errors of the mean predicted values

For all the cases with positive caseweight,

SEPREDi={
s
√
˜
h
i/gi
if intercept is included
s
√ hi/gi
otherwise

Related Topics

Residuals and Associated Statistics (linear regression algorithms)
Centered Leverage Values (linear regression algorithms)
Unstandardized Predicted Values (linear regression algorithms)
Unstandardized Residuals (linear regression algorithms)
Standardized Residuals (linear regression algorithms)
Standardized Predicted Values (linear regression algorithms)
Studentized Residuals (linear regression algorithms)
Deleted Residuals (linear regression algorithms)
Studentized Deleted Residuals (linear regression algorithms)
Adjusted Predicted Values (linear regression algorithms)
DfBeta (linear regression algorithms)
Standardized DfBeta (linear regression algorithms)
DfFit (linear regression algorithms)
Standardized DfFit (linear regression algorithms)
Covratio (linear regression algorithms)
Mahalanobis Distance (linear regression algorithms)
Cook’s Distance (Cook, 1977) (linear regression algorithms)
95% Confidence Interval for Mean Predicted Response (linear regression algorithms)
95% Confidence Interval for a Single Observation (linear regression algorithms)
Durbin-Watson Statistic (linear regression algorithms)


95% Confidence Interval for Mean Predicted Response (linear regression algorithms)

linear regression algorithms,linear regression algorithms,linear regression algorithms
95% confidence interval for mean predicted response,95% confidence interval for mean predicted response,95% confidence interval for mean predicted response
LMCINi=
^
Y
i−t0.975, C−p*SEPREDi
UMCINi=
^
Y
i+t0.975, C−p*SEPREDi

Related Topics

Residuals and Associated Statistics (linear regression algorithms)
Centered Leverage Values (linear regression algorithms)
Unstandardized Predicted Values (linear regression algorithms)
Unstandardized Residuals (linear regression algorithms)
Standardized Residuals (linear regression algorithms)
Standardized Predicted Values (linear regression algorithms)
Studentized Residuals (linear regression algorithms)
Deleted Residuals (linear regression algorithms)
Studentized Deleted Residuals (linear regression algorithms)
Adjusted Predicted Values (linear regression algorithms)
DfBeta (linear regression algorithms)
Standardized DfBeta (linear regression algorithms)
DfFit (linear regression algorithms)
Standardized DfFit (linear regression algorithms)
Covratio (linear regression algorithms)
Mahalanobis Distance (linear regression algorithms)
Cook’s Distance (Cook, 1977) (linear regression algorithms)
Standard Errors of the Mean Predicted Values (linear regression algorithms)
95% Confidence Interval for a Single Observation (linear regression algorithms)
Durbin-Watson Statistic (linear regression algorithms)


95% Confidence Interval for a Single Observation (linear regression algorithms)

linear regression algorithms,linear regression algorithms,linear regression algorithms
95% confidence interval for a single observation,95% confidence interval for a single observation,95% confidence interval for a single observation
LICINi={
^
Y
i−t0.975, C−p*s
√ (
˜
h
i+1)/gi
if intercept is included
^
Y
i−t0.975, C−ps
√ (hi+1)/gi
otherwise
UICINi={
^
Y
i+t0.975, C−p*s
√ (
˜
h
i+1)/gi
if intercept is included
^
Y
i+t0.975, C−ps
√ (hi+1)/gi
otherwise

Related Topics

Residuals and Associated Statistics (linear regression algorithms)
Centered Leverage Values (linear regression algorithms)
Unstandardized Predicted Values (linear regression algorithms)
Unstandardized Residuals (linear regression algorithms)
Standardized Residuals (linear regression algorithms)
Standardized Predicted Values (linear regression algorithms)
Studentized Residuals (linear regression algorithms)
Deleted Residuals (linear regression algorithms)
Studentized Deleted Residuals (linear regression algorithms)
Adjusted Predicted Values (linear regression algorithms)
DfBeta (linear regression algorithms)
Standardized DfBeta (linear regression algorithms)
DfFit (linear regression algorithms)
Standardized DfFit (linear regression algorithms)
Covratio (linear regression algorithms)
Mahalanobis Distance (linear regression algorithms)
Cook’s Distance (Cook, 1977) (linear regression algorithms)
Standard Errors of the Mean Predicted Values (linear regression algorithms)
95% Confidence Interval for Mean Predicted Response (linear regression algorithms)
Durbin-Watson Statistic (linear regression algorithms)


Durbin-Watson Statistic (linear regression algorithms)

linear regression algorithms,linear regression algorithms,linear regression algorithms
Durbin-Watson statistics,Durbin-Watson statistics,Durbin-Watson statistics
DW=lΣi=2(
˜
e
i−
˜
e
i−1)2lΣi=1ci
˜
e
2i

where
˜
e
i=ei
√ gi
.

Note: the Durbin-Watson statistic cannot be computed if there are fractional case weights. Even with integer case weights, the formula is only valid if the case weights represent contiguous case replications in the original sample.

Related Topics

Residuals and Associated Statistics (linear regression algorithms)
Centered Leverage Values (linear regression algorithms)
Unstandardized Predicted Values (linear regression algorithms)
Unstandardized Residuals (linear regression algorithms)
Standardized Residuals (linear regression algorithms)
Standardized Predicted Values (linear regression algorithms)
Studentized Residuals (linear regression algorithms)
Deleted Residuals (linear regression algorithms)
Studentized Deleted Residuals (linear regression algorithms)
Adjusted Predicted Values (linear regression algorithms)
DfBeta (linear regression algorithms)
Standardized DfBeta (linear regression algorithms)
DfFit (linear regression algorithms)
Standardized DfFit (linear regression algorithms)
Covratio (linear regression algorithms)
Mahalanobis Distance (linear regression algorithms)
Cook’s Distance (Cook, 1977) (linear regression algorithms)
Standard Errors of the Mean Predicted Values (linear regression algorithms)
95% Confidence Interval for Mean Predicted Response (linear regression algorithms)
95% Confidence Interval for a Single Observation (linear regression algorithms)


Partial Residual Plots (linear regression algorithms)

linear regression algorithms,linear regression algorithms,linear regression algorithms
partial residual plots,partial residual plots,partial residual plots

The scatterplots of the residuals of the dependent variable and an independent variable when both of these variables are regressed on the rest of the independent variables can be requested in the RESIDUAL branch. The algorithm for these residuals is described in (Velleman and Welsch, 1981).

Related Topics

REGRESSION Algorithms
Notation (linear regression algorithms)
Descriptive Statistics (linear regression algorithms)
Sweep Operations (Dempster, 1969) (linear regression algorithms)
Variable Selection Criteria (linear regression algorithms)
Methods for Variable Entry and Removal (linear regression algorithms)
Statistics (linear regression algorithms)
Residuals and Associated Statistics (linear regression algorithms)
Missing Values (linear regression algorithms)
References (linear regression algorithms)


Missing Values (linear regression algorithms)

linear regression algorithms,linear regression algorithms,linear regression algorithms
missing values,missing values,missing values

By default, a case that has a missing value for any variable is deleted from the computation of the correlation matrix on which all consequent computations are based. Users are allowed to change the treatment of cases with missing values.

Related Topics

REGRESSION Algorithms
Notation (linear regression algorithms)
Descriptive Statistics (linear regression algorithms)
Sweep Operations (Dempster, 1969) (linear regression algorithms)
Variable Selection Criteria (linear regression algorithms)
Methods for Variable Entry and Removal (linear regression algorithms)
Statistics (linear regression algorithms)
Residuals and Associated Statistics (linear regression algorithms)
Partial Residual Plots (linear regression algorithms)
References (linear regression algorithms)


References (linear regression algorithms)

linear regression algorithms,linear regression algorithms,linear regression algorithms
references,references,references

Cook, R. D. 1977. Detection of influential observations in linear regression. Technometrics, 19, 15-18.

Dempster, A. P. 1969. Elements of Continuous Multivariate Analysis. Reading, MA: Addison-Wesley.

Velleman, P. F., and R. E. Welsch. 1981. Efficient computing of regression diagnostics. American Statistician, 35, 234-242.

Wilkinson, J. H., and C. Reinsch. 1971. Linear Algebra. In: Handbook for Automatic Computation, Volume II, J. H. Wilkinson, and C. Reinsch, eds. New York: Springer-Verlag.

Related Topics

REGRESSION Algorithms
Notation (linear regression algorithms)
Descriptive Statistics (linear regression algorithms)
Sweep Operations (Dempster, 1969) (linear regression algorithms)
Variable Selection Criteria (linear regression algorithms)
Methods for Variable Entry and Removal (linear regression algorithms)
Statistics (linear regression algorithms)
Residuals and Associated Statistics (linear regression algorithms)
Partial Residual Plots (linear regression algorithms)
Missing Values (linear regression algorithms)


RELIABILITY Algorithms

RELIABILITY (command),RELIABILITY (command),RELIABILITY (command)
algorithms,algorithms,algorithms
Reliability Analysis,Reliability Analysis,Reliability Analysis
algorithms,algorithms,algorithms
reliability analysis algorithms,reliability analysis algorithms,reliability analysis algorithms

The RELIABILITY procedure employs one of two different computing methods, depending upon the MODEL specification and options and statistics requested.

Method 1 does not involve computing a covariance matrix. It is faster than method 2 and, for large problems, requires much less workspace. However, it can compute coefficients only for ALPHA and SPLIT models, and it does not allow computation of a number of optional statistics, nor does it allow matrix input or output. Method 1 is used only when alpha or split models are requested and only FRIEDMAN, COCHRAN, DESCRIPTIVES, SCALE, and/or ANOVA are specified on the STATISTICS subcommand and/or TOTAL is specified on the SUMMARY subcommand.

Method 2 requires computing a covariance matrix of the variables. It is slower than method 1 and requires more space. However, it can process all models, statistics, and options.

The two methods differ in one other important respect. Method 1 will continue processing a scale containing variables with zero variance and leave them in the scale. Method 2 will delete variables with zero variance and continue processing if at least two variables remain in the scale. If item deletion is required, method 2 can be selected by requesting the covariance method.

Related Topics

Notation (reliability analysis algorithms)
Scale and Item Statistics—Method 1 (reliability analysis algorithms)
The ANOVA Table (Winer, 1971) (reliability analysis algorithms)
Friedman Test or Cochran Test (reliability analysis algorithms)
Kendall's Coefficient of Concordance (reliability analysis algorithms)
Tukey's Test for Nonadditivity (reliability analysis algorithms)
Scale Statistics (reliability analysis algorithms)
Basic Computations—Method 2 (reliability analysis algorithms)
Scale Statistics—Method 2 (reliability analysis algorithms)
Additional Statistics—Method 2 (reliability analysis algorithms)
Intraclass Correlation Coefficients (reliability analysis algorithms)
References (reliability analysis algorithms)


Notation (reliability analysis algorithms)

reliability analysis algorithms,reliability analysis algorithms,reliability analysis algorithms
notation,notation,notation

There are N persons taking a test that consists of k items. A score Xji is given to the jth person on the ith item.

i→ items

1

2

...

i

...

k

1

X11

X12

X1k

P1

·
·
·

·
·
·

j

Xji

Pj

·
·
·

·
·
·

N

XN1

XN2

XNk

PN

T1

T2

...

Ti

...

Tk

G

If the model is SPLIT, k1 items are in part 1 and k2=k−k1 are in part 2. If the number of items in each part is not specified and k is even, the program sets k1=k2=k/2. If k is odd, k1=(k+1)/2. It is assumed that the first k1 items are in part 1.

W=NΣj=1wj | Sum of the weights, where wj is the weight for case j
Pj=kΣi=1Xji | The total score of the jth person
Pj=Pj/k | Mean of the observations for the jth person
Ti=NΣj=1Xjiwj | The total score for the ith item
G=kΣi=1NΣj=1Xjiwj | Grand sum of the scores
G=GWk | Grand mean of the observations

Related Topics

RELIABILITY Algorithms
Scale and Item Statistics—Method 1 (reliability analysis algorithms)
The ANOVA Table (Winer, 1971) (reliability analysis algorithms)
Friedman Test or Cochran Test (reliability analysis algorithms)
Kendall's Coefficient of Concordance (reliability analysis algorithms)
Tukey's Test for Nonadditivity (reliability analysis algorithms)
Scale Statistics (reliability analysis algorithms)
Basic Computations—Method 2 (reliability analysis algorithms)
Scale Statistics—Method 2 (reliability analysis algorithms)
Additional Statistics—Method 2 (reliability analysis algorithms)
Intraclass Correlation Coefficients (reliability analysis algorithms)
References (reliability analysis algorithms)


Scale and Item Statistics—Method 1 (reliability analysis algorithms)

reliability analysis algorithms,reliability analysis algorithms,reliability analysis algorithms
scale and item statistics (method 1),scale and item statistics (method 1),scale and item statistics (method 1)

Related Topics

Item Means and Standard Deviations (reliability analysis algorithms)
Scale Mean and Scale Variance (reliability analysis algorithms)
Item-Total Statistics (reliability analysis algorithms)
RELIABILITY Algorithms
Notation (reliability analysis algorithms)
The ANOVA Table (Winer, 1971) (reliability analysis algorithms)
Friedman Test or Cochran Test (reliability analysis algorithms)
Kendall's Coefficient of Concordance (reliability analysis algorithms)
Tukey's Test for Nonadditivity (reliability analysis algorithms)
Scale Statistics (reliability analysis algorithms)
Basic Computations—Method 2 (reliability analysis algorithms)
Scale Statistics—Method 2 (reliability analysis algorithms)
Additional Statistics—Method 2 (reliability analysis algorithms)
Intraclass Correlation Coefficients (reliability analysis algorithms)
References (reliability analysis algorithms)


Item Means and Standard Deviations (reliability analysis algorithms)

reliability analysis algorithms,reliability analysis algorithms,reliability analysis algorithms
item means and standard deviations,item means and standard deviations,item means and standard deviations

Related Topics

Mean for the ith Item (reliability analysis algorithms)
Standard Deviation for the ith Item (reliability analysis algorithms)
Scale Mean and Scale Variance (reliability analysis algorithms)
Item-Total Statistics (reliability analysis algorithms)


Mean for the ith Item (reliability analysis algorithms)

reliability analysis algorithms,reliability analysis algorithms,reliability analysis algorithms
mean for the ith item,mean for the ith item,mean for the ith item
Ti=Ti/W

Related Topics

Item Means and Standard Deviations (reliability analysis algorithms)
Standard Deviation for the ith Item (reliability analysis algorithms)


Standard Deviation for the ith Item (reliability analysis algorithms)

reliability analysis algorithms,reliability analysis algorithms,reliability analysis algorithms
standard deviations for the ith item,standard deviations for the ith item,standard deviations for the ith item
Si=
√ NΣj=1wjX2ji−WT2iW−1

Related Topics

Item Means and Standard Deviations (reliability analysis algorithms)
Mean for the ith Item (reliability analysis algorithms)


Scale Mean and Scale Variance (reliability analysis algorithms)

reliability analysis algorithms,reliability analysis algorithms,reliability analysis algorithms
scale mean and scale variance,scale mean and scale variance,scale mean and scale variance

Related Topics

Scale Mean (reliability analysis algorithms)
Scale Variance (reliability analysis algorithms)
Item Means and Standard Deviations (reliability analysis algorithms)
Item-Total Statistics (reliability analysis algorithms)


Scale Mean (reliability analysis algorithms)

reliability analysis algorithms,reliability analysis algorithms,reliability analysis algorithms
scale mean,scale mean,scale mean
M=G/W

For the split model:

Mean Part 1

M1=k1Σi=1Ti

Mean Part 2

M2=kΣi=k1+1Ti

Related Topics

Scale Mean and Scale Variance (reliability analysis algorithms)
Scale Variance (reliability analysis algorithms)


Scale Variance (reliability analysis algorithms)

reliability analysis algorithms,reliability analysis algorithms,reliability analysis algorithms
scale variance,scale variance,scale variance
S2p=1(W−1)[NΣj=1P2jwj−W(kΣi=1Ti)2]

For the split model:

Variance Part 1

S2p1=1W−1[NΣj=1wj(k1Σi=1Xji)−W(k1Σi=1Ti)2]

Variance Part 2

S2p2=1W−1[NΣj=1wj(kΣi=k1+1Xji)2−W(kΣi=k1+1Ti)2]

Related Topics

Scale Mean and Scale Variance (reliability analysis algorithms)
Scale Mean (reliability analysis algorithms)


Item-Total Statistics (reliability analysis algorithms)

reliability analysis algorithms,reliability analysis algorithms,reliability analysis algorithms
item-total statistics,item-total statistics,item-total statistics

Related Topics

Scale Mean if the ith Item is Deleted (reliability analysis algorithms)
Scale Variance if the ith Item is Deleted (reliability analysis algorithms)
Alpha if the ith Item Deleted (reliability analysis algorithms)
Correlation between the ith Item and Sum of Others (reliability analysis algorithms)
Item Means and Standard Deviations (reliability analysis algorithms)
Scale Mean and Scale Variance (reliability analysis algorithms)


Scale Mean if the ith Item is Deleted (reliability analysis algorithms)

reliability analysis algorithms,reliability analysis algorithms,reliability analysis algorithms
scale mean if the ith item is deleted,scale mean if the ith item is deleted,scale mean if the ith item is deleted
˜
M
i=M−Ti

Related Topics

Item-Total Statistics (reliability analysis algorithms)
Scale Variance if the ith Item is Deleted (reliability analysis algorithms)
Alpha if the ith Item Deleted (reliability analysis algorithms)
Correlation between the ith Item and Sum of Others (reliability analysis algorithms)


Scale Variance if the ith Item is Deleted (reliability analysis algorithms)

reliability analysis algorithms,reliability analysis algorithms,reliability analysis algorithms
scale variance if the ith item is deleted,scale variance if the ith item is deleted,scale variance if the ith item is deleted
˜
S
2i=S2p+S2i−2cov(Xi, P)

where the covariance between item i and the case score is

cov(Xi, P)=1W−1(NΣj=1PjXjiwj−kΣl=1TlTi)

Related Topics

Item-Total Statistics (reliability analysis algorithms)
Scale Mean if the ith Item is Deleted (reliability analysis algorithms)
Alpha if the ith Item Deleted (reliability analysis algorithms)
Correlation between the ith Item and Sum of Others (reliability analysis algorithms)


Alpha if the ith Item Deleted (reliability analysis algorithms)

reliability analysis algorithms,reliability analysis algorithms,reliability analysis algorithms
alpha if the ith item deleted,alpha if the ith item deleted,alpha if the ith item deleted
Ai=k−1k−2(1−
kΣl=1
l≠i
S2l/
˜
S
2i
)

Related Topics

Item-Total Statistics (reliability analysis algorithms)
Scale Mean if the ith Item is Deleted (reliability analysis algorithms)
Scale Variance if the ith Item is Deleted (reliability analysis algorithms)
Correlation between the ith Item and Sum of Others (reliability analysis algorithms)


Correlation between the ith Item and Sum of Others (reliability analysis algorithms)

reliability analysis algorithms,reliability analysis algorithms,reliability analysis algorithms
correlation between the ith item and sum of orders,correlation between the ith item and sum of orders,correlation between the ith item and sum of orders
Ri=cov(Xi, P)−S2iSi
˜
S
i

Related Topics

Item-Total Statistics (reliability analysis algorithms)
Scale Mean if the ith Item is Deleted (reliability analysis algorithms)
Scale Variance if the ith Item is Deleted (reliability analysis algorithms)
Alpha if the ith Item Deleted (reliability analysis algorithms)


The ANOVA Table (Winer, 1971) (reliability analysis algorithms)

reliability analysis algorithms,reliability analysis algorithms,reliability analysis algorithms
ANOVA table,ANOVA table,ANOVA table
Source of variation | Sum of Squares | df
Between people | NΣj=1P2jwj/k−G2/Wk | W−1
Within people | kΣi=1NΣj=1wjX2ji−NΣj=1P2jwj/k | W(k−1)
Between measures | kΣi=1T2i/W−G2/Wk | k−1
Residual | kΣi=1NΣj=1wjX2ji−NΣj=1P2jwj/k−kΣi=1T2i/W−G2/Wk | (W−1)(k−1)
Total | kΣi=1NΣj=1wjX2ji−G2/Wk | Wk−1

Each of the mean squares is obtained by dividing the sum of squares by the corresponding degrees of freedom. The F ratio for between measures is

F=MS between measures MS residual , df=(k−1, (W−1)(k−1))

Related Topics

RELIABILITY Algorithms
Notation (reliability analysis algorithms)
Scale and Item Statistics—Method 1 (reliability analysis algorithms)
Friedman Test or Cochran Test (reliability analysis algorithms)
Kendall's Coefficient of Concordance (reliability analysis algorithms)
Tukey's Test for Nonadditivity (reliability analysis algorithms)
Scale Statistics (reliability analysis algorithms)
Basic Computations—Method 2 (reliability analysis algorithms)
Scale Statistics—Method 2 (reliability analysis algorithms)
Additional Statistics—Method 2 (reliability analysis algorithms)
Intraclass Correlation Coefficients (reliability analysis algorithms)
References (reliability analysis algorithms)


Friedman Test or Cochran Test (reliability analysis algorithms)

reliability analysis algorithms,reliability analysis algorithms,reliability analysis algorithms
Friedman test,Friedman test,Friedman test
Cochran test,Cochran test,Cochran test
χ2=SS between measures MS within people , df=k−1

Note: Data must be ranks for the Friedman test and a dichotomy for the Cochran test.

Related Topics

RELIABILITY Algorithms
Notation (reliability analysis algorithms)
Scale and Item Statistics—Method 1 (reliability analysis algorithms)
The ANOVA Table (Winer, 1971) (reliability analysis algorithms)
Kendall's Coefficient of Concordance (reliability analysis algorithms)
Tukey's Test for Nonadditivity (reliability analysis algorithms)
Scale Statistics (reliability analysis algorithms)
Basic Computations—Method 2 (reliability analysis algorithms)
Scale Statistics—Method 2 (reliability analysis algorithms)
Additional Statistics—Method 2 (reliability analysis algorithms)
Intraclass Correlation Coefficients (reliability analysis algorithms)
References (reliability analysis algorithms)


Kendall's Coefficient of Concordance (reliability analysis algorithms)

reliability analysis algorithms,reliability analysis algorithms,reliability analysis algorithms
Kendall's coefficient of concordance,Kendall's coefficient of concordance,Kendall's coefficient of concordance
W=SS between measures SS total

(Will not be printed if Cochran is also specified.)

Related Topics

RELIABILITY Algorithms
Notation (reliability analysis algorithms)
Scale and Item Statistics—Method 1 (reliability analysis algorithms)
The ANOVA Table (Winer, 1971) (reliability analysis algorithms)
Friedman Test or Cochran Test (reliability analysis algorithms)
Tukey's Test for Nonadditivity (reliability analysis algorithms)
Scale Statistics (reliability analysis algorithms)
Basic Computations—Method 2 (reliability analysis algorithms)
Scale Statistics—Method 2 (reliability analysis algorithms)
Additional Statistics—Method 2 (reliability analysis algorithms)
Intraclass Correlation Coefficients (reliability analysis algorithms)
References (reliability analysis algorithms)


Tukey's Test for Nonadditivity (reliability analysis algorithms)

reliability analysis algorithms,reliability analysis algorithms,reliability analysis algorithms
Tukey's test for nonadditivity,Tukey's test for nonadditivity,Tukey's test for nonadditivity

The residual sums of squares are further subdivided to

SS nonadd =M2/D, df=1

where

D=(SS bet . meas SS bet . people )/(Wk)
(=[kΣi=1(Ti−G)2][NΣj=1wj(Pj−G)2])
M=kΣi=1TiNΣj=1PjXjiwj−GNΣj=1P2jwj/k−GSS bet . meas
(=NΣj=1wj(Pj−G)[kΣi=1Xji(Ti−G)])
SS bal =SS res −SS nonadd , df=(W−1)(k−1)−1

The test for nonadditivity is

F=
MS nonadd
MS balance 		df=(1, (W−1)(k−1)−1)

The regression coefficient for the nonadditivity term is

^
B
=M/D,

and the power to transform to additivity is

^
p
=1−
^
B
G

Related Topics

RELIABILITY Algorithms
Notation (reliability analysis algorithms)
Scale and Item Statistics—Method 1 (reliability analysis algorithms)
The ANOVA Table (Winer, 1971) (reliability analysis algorithms)
Friedman Test or Cochran Test (reliability analysis algorithms)
Kendall's Coefficient of Concordance (reliability analysis algorithms)
Scale Statistics (reliability analysis algorithms)
Basic Computations—Method 2 (reliability analysis algorithms)
Scale Statistics—Method 2 (reliability analysis algorithms)
Additional Statistics—Method 2 (reliability analysis algorithms)
Intraclass Correlation Coefficients (reliability analysis algorithms)
References (reliability analysis algorithms)


Scale Statistics (reliability analysis algorithms)

reliability analysis algorithms,reliability analysis algorithms,reliability analysis algorithms
scale statistics,scale statistics,scale statistics

Reliability coefficient alpha (Cronbach 1951)

A=kk−1(1−kΣi=1S2iS2p)

If the model is split, separate alphas are computed:

A1=k1k1−1(1−k1Σi=1S2iS2p1)
A2=k2k2−1(1−k2Σi=k1+1S2iS2p2)

Related Topics

For Split Model Only (reliability analysis algorithms)
RELIABILITY Algorithms
Notation (reliability analysis algorithms)
Scale and Item Statistics—Method 1 (reliability analysis algorithms)
The ANOVA Table (Winer, 1971) (reliability analysis algorithms)
Friedman Test or Cochran Test (reliability analysis algorithms)
Kendall's Coefficient of Concordance (reliability analysis algorithms)
Tukey's Test for Nonadditivity (reliability analysis algorithms)
Basic Computations—Method 2 (reliability analysis algorithms)
Scale Statistics—Method 2 (reliability analysis algorithms)
Additional Statistics—Method 2 (reliability analysis algorithms)
Intraclass Correlation Coefficients (reliability analysis algorithms)
References (reliability analysis algorithms)


For Split Model Only (reliability analysis algorithms)

reliability analysis algorithms,reliability analysis algorithms,reliability analysis algorithms
for split model only,for split model only,for split model only

Related Topics

Correlation Between the Two Parts of the Test (reliability analysis algorithms)
Equal Length Spearman-Brown Coefficient (reliability analysis algorithms)
Guttman Split Half (reliability analysis algorithms)
Unequal Length Spearman-Brown (reliability analysis algorithms)


Correlation Between the Two Parts of the Test (reliability analysis algorithms)

reliability analysis algorithms,reliability analysis algorithms,reliability analysis algorithms
correlation between the two parts of the test,correlation between the two parts of the test,correlation between the two parts of the test
R=12(S2p−S2p1−S2p2)Sp1Sp2

Related Topics

For Split Model Only (reliability analysis algorithms)
Equal Length Spearman-Brown Coefficient (reliability analysis algorithms)
Guttman Split Half (reliability analysis algorithms)
Unequal Length Spearman-Brown (reliability analysis algorithms)


Equal Length Spearman-Brown Coefficient (reliability analysis algorithms)

reliability analysis algorithms,reliability analysis algorithms,reliability analysis algorithms
equal length Spearman-Brown coefficient,equal length Spearman-Brown coefficient,equal length Spearman-Brown coefficient
Y=2R1+R

Related Topics

For Split Model Only (reliability analysis algorithms)
Correlation Between the Two Parts of the Test (reliability analysis algorithms)
Guttman Split Half (reliability analysis algorithms)
Unequal Length Spearman-Brown (reliability analysis algorithms)


Guttman Split Half (reliability analysis algorithms)

reliability analysis algorithms,reliability analysis algorithms,reliability analysis algorithms
Guttman split half,Guttman split half,Guttman split half
G=2(S2p−S2p1−S2p2)S2p

Related Topics

For Split Model Only (reliability analysis algorithms)
Correlation Between the Two Parts of the Test (reliability analysis algorithms)
Equal Length Spearman-Brown Coefficient (reliability analysis algorithms)
Unequal Length Spearman-Brown (reliability analysis algorithms)


Unequal Length Spearman-Brown (reliability analysis algorithms)

reliability analysis algorithms,reliability analysis algorithms,reliability analysis algorithms
unequal length Spearman-Brown,unequal length Spearman-Brown,unequal length Spearman-Brown
ULY=−R2+
√ R4+4R2(1−R2)k1k2/k2
2(1−R2)k1k2/k2

Related Topics

For Split Model Only (reliability analysis algorithms)
Correlation Between the Two Parts of the Test (reliability analysis algorithms)
Equal Length Spearman-Brown Coefficient (reliability analysis algorithms)
Guttman Split Half (reliability analysis algorithms)


Basic Computations—Method 2 (reliability analysis algorithms)

reliability analysis algorithms,reliability analysis algorithms,reliability analysis algorithms
basic computations (method 2),basic computations (method 2),basic computations (method 2)

Items with zero variance are deleted from the scale and from k, k1, and k2. The inverses of matrices, when needed, are computed using the sweep operator described by Dempster (1969). If |V|<10−30, a warning is printed and statistics that require V−1 are skipped.

Related Topics

Covariance Matrix V and Correlation Matrix R (reliability analysis algorithms)
Scale Variance (reliability analysis algorithms)
RELIABILITY Algorithms
Notation (reliability analysis algorithms)
Scale and Item Statistics—Method 1 (reliability analysis algorithms)
The ANOVA Table (Winer, 1971) (reliability analysis algorithms)
Friedman Test or Cochran Test (reliability analysis algorithms)
Kendall's Coefficient of Concordance (reliability analysis algorithms)
Tukey's Test for Nonadditivity (reliability analysis algorithms)
Scale Statistics (reliability analysis algorithms)
Scale Statistics—Method 2 (reliability analysis algorithms)
Additional Statistics—Method 2 (reliability analysis algorithms)
Intraclass Correlation Coefficients (reliability analysis algorithms)
References (reliability analysis algorithms)


Covariance Matrix V and Correlation Matrix R (reliability analysis algorithms)

reliability analysis algorithms,reliability analysis algorithms,reliability analysis algorithms
covariance matrix V and correlation matrix R,covariance matrix V and correlation matrix R,covariance matrix V and correlation matrix R

vij={
(1W−1(NΣl=1XliXljwj−WTiTj), i, j=1,...,k) | if raw data input
rijSiSj | if correlation matrix and SD input
rij=vijSiSi, where S2i=vijW−1

Related Topics

Basic Computations—Method 2 (reliability analysis algorithms)
Scale Variance (reliability analysis algorithms)


Scale Variance (reliability analysis algorithms)

reliability analysis algorithms,reliability analysis algorithms,reliability analysis algorithms
scale variance,scale variance,scale variance
S2p=kΣi=1S2i+2
kΣkΣ
i<j
vij

If the model is split,

S2p1=k1Σi=1S2i+2
k1Σk1Σ
i<j
vij
S2p2=kΣi=k1+1S2i+2kΣi=k1+1kΣj>ivij

where the first k1 items are in part 1.

Related Topics

Basic Computations—Method 2 (reliability analysis algorithms)
Covariance Matrix V and Correlation Matrix R (reliability analysis algorithms)


Scale Statistics—Method 2 (reliability analysis algorithms)

reliability analysis algorithms,reliability analysis algorithms,reliability analysis algorithms
scale statistics (method 2),scale statistics (method 2),scale statistics (method 2)

Related Topics

Alpha Model (reliability analysis algorithms)
Split Model (reliability analysis algorithms)
Guttman Model (Guttman 1945) (reliability analysis algorithms)
Parallel Model (Kristof 1963) (reliability analysis algorithms)
Strict Parallel (Kristof 1963) (reliability analysis algorithms)
RELIABILITY Algorithms
Notation (reliability analysis algorithms)
Scale and Item Statistics—Method 1 (reliability analysis algorithms)
The ANOVA Table (Winer, 1971) (reliability analysis algorithms)
Friedman Test or Cochran Test (reliability analysis algorithms)
Kendall's Coefficient of Concordance (reliability analysis algorithms)
Tukey's Test for Nonadditivity (reliability analysis algorithms)
Scale Statistics (reliability analysis algorithms)
Basic Computations—Method 2 (reliability analysis algorithms)
Additional Statistics—Method 2 (reliability analysis algorithms)
Intraclass Correlation Coefficients (reliability analysis algorithms)
References (reliability analysis algorithms)


Alpha Model (reliability analysis algorithms)

reliability analysis algorithms,reliability analysis algorithms,reliability analysis algorithms
alpha model,alpha model,alpha model

Related Topics

Estimated Reliability (reliability analysis algorithms)
Standardized Item Alpha (reliability analysis algorithms)
Split Model (reliability analysis algorithms)
Guttman Model (Guttman 1945) (reliability analysis algorithms)
Parallel Model (Kristof 1963) (reliability analysis algorithms)
Strict Parallel (Kristof 1963) (reliability analysis algorithms)


Estimated Reliability (reliability analysis algorithms)

reliability analysis algorithms,reliability analysis algorithms,reliability analysis algorithms
estimated reliability,estimated reliability,estimated reliability
kk−1(1−kΣi=1S2iS2p)

Related Topics

Alpha Model (reliability analysis algorithms)
Standardized Item Alpha (reliability analysis algorithms)


Standardized Item Alpha (reliability analysis algorithms)

reliability analysis algorithms,reliability analysis algorithms,reliability analysis algorithms
standardized item alpha,standardized item alpha,standardized item alpha
kCorr1+(k−1)Corr

where

Corr =2k(k−1)
kΣkΣ
i<j
rij

Related Topics

Alpha Model (reliability analysis algorithms)
Estimated Reliability (reliability analysis algorithms)


Split Model (reliability analysis algorithms)

reliability analysis algorithms,reliability analysis algorithms,reliability analysis algorithms
split model,split model,split model

Related Topics

Correlation between Forms (reliability analysis algorithms)
Guttman Split-Half (reliability analysis algorithms)
Alpha Model (reliability analysis algorithms)
Guttman Model (Guttman 1945) (reliability analysis algorithms)
Parallel Model (Kristof 1963) (reliability analysis algorithms)
Strict Parallel (Kristof 1963) (reliability analysis algorithms)


Correlation between Forms (reliability analysis algorithms)

reliability analysis algorithms,reliability analysis algorithms,reliability analysis algorithms
correlation between forms,correlation between forms,correlation between forms
k1Σi=1kΣj=k1+1vijSp1Sp2

Related Topics

Split Model (reliability analysis algorithms)
Guttman Split-Half (reliability analysis algorithms)


Guttman Split-Half (reliability analysis algorithms)

reliability analysis algorithms,reliability analysis algorithms,reliability analysis algorithms
Guttman split-half,Guttman split-half,Guttman split-half
G=k1Σi=1kΣj=k1+1vijS2p

Alpha and Spearman-Brown equal and unequal length are computed as in method 1.

Related Topics

Split Model (reliability analysis algorithms)
Correlation between Forms (reliability analysis algorithms)


Guttman Model (Guttman 1945) (reliability analysis algorithms)

reliability analysis algorithms,reliability analysis algorithms,reliability analysis algorithms
Guttman model,Guttman model,Guttman model
L1=1−kΣi=1S2iS2p
L2=L1+
√ 2kk−1
kΣkΣ
i<j
v2ij
S2p
L3=kk−1L1
L4=4
kΣkΣ
i<j
v2ijS2p
L5=L1+2
√
max
i
kΣj≠iv2ij
S2p

L6=1−kΣi=1ε2i/S2p; where ε2i=(V−1)−1ii

Related Topics

Scale Statistics—Method 2 (reliability analysis algorithms)
Alpha Model (reliability analysis algorithms)
Split Model (reliability analysis algorithms)
Parallel Model (Kristof 1963) (reliability analysis algorithms)
Strict Parallel (Kristof 1963) (reliability analysis algorithms)


Parallel Model (Kristof 1963) (reliability analysis algorithms)

reliability analysis algorithms,reliability analysis algorithms,reliability analysis algorithms
parallel model,parallel model,parallel model

Related Topics

Common Variance (reliability analysis algorithms)
True Variance (reliability analysis algorithms)
Error Variance (reliability analysis algorithms)
Common Inter-Item Correlation (reliability analysis algorithms)
Reliability of the Scale (reliability analysis algorithms)
Unbiased Estimate of the Reliability (reliability analysis algorithms)
Test for Goodness of Fit (reliability analysis algorithms)
Log of the Determinant of the Unconstrained Matrix (reliability analysis algorithms)
Log of the Determinant of the Constrained Matrix (reliability analysis algorithms)
Alpha Model (reliability analysis algorithms)
Split Model (reliability analysis algorithms)
Guttman Model (Guttman 1945) (reliability analysis algorithms)
Strict Parallel (Kristof 1963) (reliability analysis algorithms)


Common Variance (reliability analysis algorithms)

reliability analysis algorithms,reliability analysis algorithms,reliability analysis algorithms
common variance,common variance,common variance
CV=var=1kkΣi=1S2i

Related Topics

Parallel Model (Kristof 1963) (reliability analysis algorithms)
True Variance (reliability analysis algorithms)
Error Variance (reliability analysis algorithms)
Common Inter-Item Correlation (reliability analysis algorithms)
Reliability of the Scale (reliability analysis algorithms)
Unbiased Estimate of the Reliability (reliability analysis algorithms)
Test for Goodness of Fit (reliability analysis algorithms)
Log of the Determinant of the Unconstrained Matrix (reliability analysis algorithms)
Log of the Determinant of the Constrained Matrix (reliability analysis algorithms)


True Variance (reliability analysis algorithms)

reliability analysis algorithms,reliability analysis algorithms,reliability analysis algorithms
true variance,true variance,true variance
TV=cov=2k(k−1)
kΣkΣ
i<j
vij

Related Topics

Parallel Model (Kristof 1963) (reliability analysis algorithms)
Common Variance (reliability analysis algorithms)
Error Variance (reliability analysis algorithms)
Common Inter-Item Correlation (reliability analysis algorithms)
Reliability of the Scale (reliability analysis algorithms)
Unbiased Estimate of the Reliability (reliability analysis algorithms)
Test for Goodness of Fit (reliability analysis algorithms)
Log of the Determinant of the Unconstrained Matrix (reliability analysis algorithms)
Log of the Determinant of the Constrained Matrix (reliability analysis algorithms)


Error Variance (reliability analysis algorithms)

reliability analysis algorithms,reliability analysis algorithms,reliability analysis algorithms
error variance,error variance,error variance
EV=var−cov

Related Topics

Parallel Model (Kristof 1963) (reliability analysis algorithms)
Common Variance (reliability analysis algorithms)
True Variance (reliability analysis algorithms)
Common Inter-Item Correlation (reliability analysis algorithms)
Reliability of the Scale (reliability analysis algorithms)
Unbiased Estimate of the Reliability (reliability analysis algorithms)
Test for Goodness of Fit (reliability analysis algorithms)
Log of the Determinant of the Unconstrained Matrix (reliability analysis algorithms)
Log of the Determinant of the Constrained Matrix (reliability analysis algorithms)


Common Inter-Item Correlation (reliability analysis algorithms)

reliability analysis algorithms,reliability analysis algorithms,reliability analysis algorithms
common inter-item correlation,common inter-item correlation,common inter-item correlation
^
R
=cov/ var

Related Topics

Parallel Model (Kristof 1963) (reliability analysis algorithms)
Common Variance (reliability analysis algorithms)
True Variance (reliability analysis algorithms)
Error Variance (reliability analysis algorithms)
Reliability of the Scale (reliability analysis algorithms)
Unbiased Estimate of the Reliability (reliability analysis algorithms)
Test for Goodness of Fit (reliability analysis algorithms)
Log of the Determinant of the Unconstrained Matrix (reliability analysis algorithms)
Log of the Determinant of the Constrained Matrix (reliability analysis algorithms)


Reliability of the Scale (reliability analysis algorithms)

reliability analysis algorithms,reliability analysis algorithms,reliability analysis algorithms
reliability of the scale,reliability of the scale,reliability of the scale
A=kk−1(1−kΣi=1S2iS2p)

Related Topics

Parallel Model (Kristof 1963) (reliability analysis algorithms)
Common Variance (reliability analysis algorithms)
True Variance (reliability analysis algorithms)
Error Variance (reliability analysis algorithms)
Common Inter-Item Correlation (reliability analysis algorithms)
Unbiased Estimate of the Reliability (reliability analysis algorithms)
Test for Goodness of Fit (reliability analysis algorithms)
Log of the Determinant of the Unconstrained Matrix (reliability analysis algorithms)
Log of the Determinant of the Constrained Matrix (reliability analysis algorithms)


Unbiased Estimate of the Reliability (reliability analysis algorithms)

reliability analysis algorithms,reliability analysis algorithms,reliability analysis algorithms
unbiased estimate of the reliability,unbiased estimate of the reliability,unbiased estimate of the reliability
^
A
=2+(W−3)A(W−1)

where A is defined above.

Related Topics

Parallel Model (Kristof 1963) (reliability analysis algorithms)
Common Variance (reliability analysis algorithms)
True Variance (reliability analysis algorithms)
Error Variance (reliability analysis algorithms)
Common Inter-Item Correlation (reliability analysis algorithms)
Reliability of the Scale (reliability analysis algorithms)
Test for Goodness of Fit (reliability analysis algorithms)
Log of the Determinant of the Unconstrained Matrix (reliability analysis algorithms)
Log of the Determinant of the Constrained Matrix (reliability analysis algorithms)


Test for Goodness of Fit (reliability analysis algorithms)

reliability analysis algorithms,reliability analysis algorithms,reliability analysis algorithms
test for goodness of fit,test for goodness of fit,test for goodness of fit
χ2=−(W−1)(1−k(k+1)2(2k−3)12(k−1)(k(k+1)2−2)(W−1))logL

where

L=|V|(var−cov)k−1(var+(k+1)cov)
df=k(k+1)2−2

Related Topics

Parallel Model (Kristof 1963) (reliability analysis algorithms)
Common Variance (reliability analysis algorithms)
True Variance (reliability analysis algorithms)
Error Variance (reliability analysis algorithms)
Common Inter-Item Correlation (reliability analysis algorithms)
Reliability of the Scale (reliability analysis algorithms)
Unbiased Estimate of the Reliability (reliability analysis algorithms)
Log of the Determinant of the Unconstrained Matrix (reliability analysis algorithms)
Log of the Determinant of the Constrained Matrix (reliability analysis algorithms)


Log of the Determinant of the Unconstrained Matrix (reliability analysis algorithms)

reliability analysis algorithms,reliability analysis algorithms,reliability analysis algorithms
log of the determinant of the unconstrained matrix,log of the determinant of the unconstrained matrix,log of the determinant of the unconstrained matrix
logUC=log|V|

Related Topics

Parallel Model (Kristof 1963) (reliability analysis algorithms)
Common Variance (reliability analysis algorithms)
True Variance (reliability analysis algorithms)
Error Variance (reliability analysis algorithms)
Common Inter-Item Correlation (reliability analysis algorithms)
Reliability of the Scale (reliability analysis algorithms)
Unbiased Estimate of the Reliability (reliability analysis algorithms)
Test for Goodness of Fit (reliability analysis algorithms)
Log of the Determinant of the Constrained Matrix (reliability analysis algorithms)


Log of the Determinant of the Constrained Matrix (reliability analysis algorithms)

reliability analysis algorithms,reliability analysis algorithms,reliability analysis algorithms
log of the determinant of the constrained matrix,log of the determinant of the constrained matrix,log of the determinant of the constrained matrix
logC=log((var−cov)k−1(var+(k−1)cov))

Related Topics

Parallel Model (Kristof 1963) (reliability analysis algorithms)
Common Variance (reliability analysis algorithms)
True Variance (reliability analysis algorithms)
Error Variance (reliability analysis algorithms)
Common Inter-Item Correlation (reliability analysis algorithms)
Reliability of the Scale (reliability analysis algorithms)
Unbiased Estimate of the Reliability (reliability analysis algorithms)
Test for Goodness of Fit (reliability analysis algorithms)
Log of the Determinant of the Unconstrained Matrix (reliability analysis algorithms)


Strict Parallel (Kristof 1963) (reliability analysis algorithms)

reliability analysis algorithms,reliability analysis algorithms,reliability analysis algorithms
strict parallel,strict parallel,strict parallel

Related Topics

Common Variance (reliability analysis algorithms)
Error Variance (reliability analysis algorithms)
True Variance (reliability analysis algorithms)
Common Inter-Item Correlation (reliability analysis algorithms)
Reliability of the Scale (reliability analysis algorithms)
Unbiased Estimate of the Reliability (reliability analysis algorithms)
Test for Goodness of Fit (reliability analysis algorithms)
Log of the Determinant of the Unconstrained Matrix (reliability analysis algorithms)
Log of the Determinant of the Constrained Matrix (reliability analysis algorithms)
Alpha Model (reliability analysis algorithms)
Split Model (reliability analysis algorithms)
Guttman Model (Guttman 1945) (reliability analysis algorithms)
Parallel Model (Kristof 1963) (reliability analysis algorithms)


Common Variance (reliability analysis algorithms)

reliability analysis algorithms,reliability analysis algorithms,reliability analysis algorithms
common variance,common variance,common variance
CV=var+1kkΣi=1(Ti−G)2

Related Topics

Strict Parallel (Kristof 1963) (reliability analysis algorithms)
Error Variance (reliability analysis algorithms)
True Variance (reliability analysis algorithms)
Common Inter-Item Correlation (reliability analysis algorithms)
Reliability of the Scale (reliability analysis algorithms)
Unbiased Estimate of the Reliability (reliability analysis algorithms)
Test for Goodness of Fit (reliability analysis algorithms)
Log of the Determinant of the Unconstrained Matrix (reliability analysis algorithms)
Log of the Determinant of the Constrained Matrix (reliability analysis algorithms)


Error Variance (reliability analysis algorithms)

reliability analysis algorithms,reliability analysis algorithms,reliability analysis algorithms
error variance,error variance,error variance
EV=MS within people

All mean squares are calculated as described in the analysis of variance table.

Related Topics

Strict Parallel (Kristof 1963) (reliability analysis algorithms)
Common Variance (reliability analysis algorithms)
True Variance (reliability analysis algorithms)
Common Inter-Item Correlation (reliability analysis algorithms)
Reliability of the Scale (reliability analysis algorithms)
Unbiased Estimate of the Reliability (reliability analysis algorithms)
Test for Goodness of Fit (reliability analysis algorithms)
Log of the Determinant of the Unconstrained Matrix (reliability analysis algorithms)
Log of the Determinant of the Constrained Matrix (reliability analysis algorithms)


True Variance (reliability analysis algorithms)

reliability analysis algorithms,reliability analysis algorithms,reliability analysis algorithms
true variance,true variance,true variance
TV=var+1kkΣi=1(Ti−G)2−EV

Related Topics

Strict Parallel (Kristof 1963) (reliability analysis algorithms)
Common Variance (reliability analysis algorithms)
Error Variance (reliability analysis algorithms)
Common Inter-Item Correlation (reliability analysis algorithms)
Reliability of the Scale (reliability analysis algorithms)
Unbiased Estimate of the Reliability (reliability analysis algorithms)
Test for Goodness of Fit (reliability analysis algorithms)
Log of the Determinant of the Unconstrained Matrix (reliability analysis algorithms)
Log of the Determinant of the Constrained Matrix (reliability analysis algorithms)


Common Inter-Item Correlation (reliability analysis algorithms)

reliability analysis algorithms,reliability analysis algorithms,reliability analysis algorithms
common inter-item correlation,common inter-item correlation,common inter-item correlation
^
R
=cov−1(k−1)kkΣi=1(Ti−G)2var+1kkΣi=1(Ti−G)2

Related Topics

Strict Parallel (Kristof 1963) (reliability analysis algorithms)
Common Variance (reliability analysis algorithms)
Error Variance (reliability analysis algorithms)
True Variance (reliability analysis algorithms)
Reliability of the Scale (reliability analysis algorithms)
Unbiased Estimate of the Reliability (reliability analysis algorithms)
Test for Goodness of Fit (reliability analysis algorithms)
Log of the Determinant of the Unconstrained Matrix (reliability analysis algorithms)
Log of the Determinant of the Constrained Matrix (reliability analysis algorithms)


Reliability of the Scale (reliability analysis algorithms)

reliability analysis algorithms,reliability analysis algorithms,reliability analysis algorithms
reliability of scale,reliability of scale,reliability of scale
Rel=k
^
R
1+(k−1)
^
R

Related Topics

Strict Parallel (Kristof 1963) (reliability analysis algorithms)
Common Variance (reliability analysis algorithms)
Error Variance (reliability analysis algorithms)
True Variance (reliability analysis algorithms)
Common Inter-Item Correlation (reliability analysis algorithms)
Unbiased Estimate of the Reliability (reliability analysis algorithms)
Test for Goodness of Fit (reliability analysis algorithms)
Log of the Determinant of the Unconstrained Matrix (reliability analysis algorithms)
Log of the Determinant of the Constrained Matrix (reliability analysis algorithms)


Unbiased Estimate of the Reliability (reliability analysis algorithms)

reliability analysis algorithms,reliability analysis algorithms,reliability analysis algorithms
unbiased estimate of the reliability,unbiased estimate of the reliability,unbiased estimate of the reliability
Rel=3+(W−3)RelW

Related Topics

Strict Parallel (Kristof 1963) (reliability analysis algorithms)
Common Variance (reliability analysis algorithms)
Error Variance (reliability analysis algorithms)
True Variance (reliability analysis algorithms)
Common Inter-Item Correlation (reliability analysis algorithms)
Reliability of the Scale (reliability analysis algorithms)
Test for Goodness of Fit (reliability analysis algorithms)
Log of the Determinant of the Unconstrained Matrix (reliability analysis algorithms)
Log of the Determinant of the Constrained Matrix (reliability analysis algorithms)


Test for Goodness of Fit (reliability analysis algorithms)

reliability analysis algorithms,reliability analysis algorithms,reliability analysis algorithms
test for goodness of fit,test for goodness of fit,test for goodness of fit
χ2=−(W−1)(1−k(k+1)2(2k−3)12(k−1)(k(k+3)/2−3)(W−1))log﻿L

where

L=|V|(var+(k−1)cov)(var−cov+1kkΣi=1(Ti−G)2)k−1
df=k(k+3)/2−3

Related Topics

Strict Parallel (Kristof 1963) (reliability analysis algorithms)
Common Variance (reliability analysis algorithms)
Error Variance (reliability analysis algorithms)
True Variance (reliability analysis algorithms)
Common Inter-Item Correlation (reliability analysis algorithms)
Reliability of the Scale (reliability analysis algorithms)
Unbiased Estimate of the Reliability (reliability analysis algorithms)
Log of the Determinant of the Unconstrained Matrix (reliability analysis algorithms)
Log of the Determinant of the Constrained Matrix (reliability analysis algorithms)


Log of the Determinant of the Unconstrained Matrix (reliability analysis algorithms)

reliability analysis algorithms,reliability analysis algorithms,reliability analysis algorithms
log of the determinant of the unconstrained matrix,log of the determinant of the unconstrained matrix,log of the determinant of the unconstrained matrix
logUC=log|V|

Related Topics

Strict Parallel (Kristof 1963) (reliability analysis algorithms)
Common Variance (reliability analysis algorithms)
Error Variance (reliability analysis algorithms)
True Variance (reliability analysis algorithms)
Common Inter-Item Correlation (reliability analysis algorithms)
Reliability of the Scale (reliability analysis algorithms)
Unbiased Estimate of the Reliability (reliability analysis algorithms)
Test for Goodness of Fit (reliability analysis algorithms)
Log of the Determinant of the Constrained Matrix (reliability analysis algorithms)


Log of the Determinant of the Constrained Matrix (reliability analysis algorithms)

reliability analysis algorithms,reliability analysis algorithms,reliability analysis algorithms
log of the determinant of the constrained matrix,log of the determinant of the constrained matrix,log of the determinant of the constrained matrix
logC=log(var+(k−1)cov)(var−cov+1k−1kΣi=1(Ti−G)2)k−1

Related Topics

Strict Parallel (Kristof 1963) (reliability analysis algorithms)
Common Variance (reliability analysis algorithms)
Error Variance (reliability analysis algorithms)
True Variance (reliability analysis algorithms)
Common Inter-Item Correlation (reliability analysis algorithms)
Reliability of the Scale (reliability analysis algorithms)
Unbiased Estimate of the Reliability (reliability analysis algorithms)
Test for Goodness of Fit (reliability analysis algorithms)
Log of the Determinant of the Unconstrained Matrix (reliability analysis algorithms)


Additional Statistics—Method 2 (reliability analysis algorithms)

reliability analysis algorithms,reliability analysis algorithms,reliability analysis algorithms
additional statistics (method 2),additional statistics (method 2),additional statistics (method 2)

Descriptive and scale statistics and Tukey’s test are calculated as in method 1. Multiple R2 if an item is deleted is calculated as

˜
R
2i=1−ε2iS2i       		ε2i=1(V−1)ii

Related Topics

Analysis of Variance Table (reliability analysis algorithms)
Hotelling's T-Squared (Winer, 1971) (reliability analysis algorithms)
Item Mean Summaries (reliability analysis algorithms)
Item Variance Summaries (reliability analysis algorithms)
Inter-Item Covariance Summaries (reliability analysis algorithms)
Inter-Item Correlations (reliability analysis algorithms)
RELIABILITY Algorithms
Notation (reliability analysis algorithms)
Scale and Item Statistics—Method 1 (reliability analysis algorithms)
The ANOVA Table (Winer, 1971) (reliability analysis algorithms)
Friedman Test or Cochran Test (reliability analysis algorithms)
Kendall's Coefficient of Concordance (reliability analysis algorithms)
Tukey's Test for Nonadditivity (reliability analysis algorithms)
Scale Statistics (reliability analysis algorithms)
Basic Computations—Method 2 (reliability analysis algorithms)
Scale Statistics—Method 2 (reliability analysis algorithms)
Intraclass Correlation Coefficients (reliability analysis algorithms)
References (reliability analysis algorithms)


Analysis of Variance Table (reliability analysis algorithms)

reliability analysis algorithms,reliability analysis algorithms,reliability analysis algorithms
analysis of variance table,analysis of variance table,analysis of variance table

Source of variation

Sum of Squares

df

Between people

(W−1)[1k(kΣΣi=1S2i−2k−1
kΣkΣ
i<j
vij)]+2(k−1)
Σ
i<j
vij

W−1

Within people

(W−1)(k−1)k[kΣi=1S2i−2k−1
kΣkΣ
i<j
vij]+(W−1)SS bet . people

W(k−1)

Between measures

W(kΣi=1T2i−1k(kΣi=1Ti)2)

k−1

Residual

(W−1)(k−1)k[kΣi=1S2i−2k−1
kΣkΣ
i<j
vij]

(W−1)(k−1)

Total

Between SS + Within SS

Wk−1

Related Topics

Additional Statistics—Method 2 (reliability analysis algorithms)
Hotelling's T-Squared (Winer, 1971) (reliability analysis algorithms)
Item Mean Summaries (reliability analysis algorithms)
Item Variance Summaries (reliability analysis algorithms)
Inter-Item Covariance Summaries (reliability analysis algorithms)
Inter-Item Correlations (reliability analysis algorithms)


Hotelling's T-Squared (Winer, 1971) (reliability analysis algorithms)

reliability analysis algorithms,reliability analysis algorithms,reliability analysis algorithms
Hotellings T2,Hotellings T2,Hotellings T2
T2=WY´B−1Y

where

Y=[
T1−Tk
T2−Tk
·
·
·
Tk−1−Tk
]
B=CVC´

where C is an identity matrix of rank k−1 augmented with a column of –1 on the right.

bij=vij−vik−vjk+S2k

The test will not be done if W<k or |B|<10−30.

The significance level of T2 is based on

F=W−k+1(W−1)(k−1)T2, with df=(k−1, W−k+1)

Related Topics

Additional Statistics—Method 2 (reliability analysis algorithms)
Analysis of Variance Table (reliability analysis algorithms)
Item Mean Summaries (reliability analysis algorithms)
Item Variance Summaries (reliability analysis algorithms)
Inter-Item Covariance Summaries (reliability analysis algorithms)
Inter-Item Correlations (reliability analysis algorithms)


Item Mean Summaries (reliability analysis algorithms)

reliability analysis algorithms,reliability analysis algorithms,reliability analysis algorithms
item mean summaries,item mean summaries,item mean summaries
Mean =kΣi=1Ti/k
Variance= kΣi=1T2i−(kΣi=1Ti)2/k(k−1)
Maximum =
max
i
Ti
Minimum =
min
i
Ti
Range=Maximum−Minimum
Ratio = Maximum Minimum

Related Topics

Additional Statistics—Method 2 (reliability analysis algorithms)
Analysis of Variance Table (reliability analysis algorithms)
Hotelling's T-Squared (Winer, 1971) (reliability analysis algorithms)
Item Variance Summaries (reliability analysis algorithms)
Inter-Item Covariance Summaries (reliability analysis algorithms)
Inter-Item Correlations (reliability analysis algorithms)


Item Variance Summaries (reliability analysis algorithms)

reliability analysis algorithms,reliability analysis algorithms,reliability analysis algorithms
item variance summaries,item variance summaries,item variance summaries

Same as for item means except that S2i is substituted for Ti in all calculations.

Related Topics

Additional Statistics—Method 2 (reliability analysis algorithms)
Analysis of Variance Table (reliability analysis algorithms)
Hotelling's T-Squared (Winer, 1971) (reliability analysis algorithms)
Item Mean Summaries (reliability analysis algorithms)
Inter-Item Covariance Summaries (reliability analysis algorithms)
Inter-Item Correlations (reliability analysis algorithms)


Inter-Item Covariance Summaries (reliability analysis algorithms)

reliability analysis algorithms,reliability analysis algorithms,reliability analysis algorithms
inter-item covariance summaries,inter-item covariance summaries,inter-item covariance summaries
Mean =
kΣkΣ
i<j
vijk(k−1)
Variance= 1k(k−1)−1[
kΣkΣ
i<j
vij−1k(k−1)(
kΣkΣ
i<j
vij)2]
Maximum =
max
i,j
vij
Minimum =
min
i,j
vij
Range=Maximum−Minimum
Ratio = Maximum Minimum

Related Topics

Additional Statistics—Method 2 (reliability analysis algorithms)
Analysis of Variance Table (reliability analysis algorithms)
Hotelling's T-Squared (Winer, 1971) (reliability analysis algorithms)
Item Mean Summaries (reliability analysis algorithms)
Item Variance Summaries (reliability analysis algorithms)
Inter-Item Correlations (reliability analysis algorithms)


Inter-Item Correlations (reliability analysis algorithms)

reliability analysis algorithms,reliability analysis algorithms,reliability analysis algorithms
inter-item correlations,inter-item correlations,inter-item correlations

Same as for inter-item covariances, with vij being replaced by rij.

If the model is split, statistics are also calculated separately for each scale.

Related Topics

Additional Statistics—Method 2 (reliability analysis algorithms)
Analysis of Variance Table (reliability analysis algorithms)
Hotelling's T-Squared (Winer, 1971) (reliability analysis algorithms)
Item Mean Summaries (reliability analysis algorithms)
Item Variance Summaries (reliability analysis algorithms)
Inter-Item Covariance Summaries (reliability analysis algorithms)


Intraclass Correlation Coefficients (reliability analysis algorithms)

reliability analysis algorithms,reliability analysis algorithms,reliability analysis algorithms
intraclass correlation coefficients,intraclass correlation coefficients,intraclass correlation coefficients

Intraclass correlation coefficients are always discussed in a random/mixed effects model setting. McGraw and Wong (1996) is the key reference for this document. See also Shrout and Fleiss (1979).

In this document, two measures of correlation are given for each type under each model: single measure and average measure. Single measure applies to single measurements, for example, the ratings of judges, individual item scores, or the body weights of individuals, whereas average measure applies to average measurements, for example, the average rating for k judges, or the average score for a k-item test.

Related Topics

One-Way Random Effects Model: People Effect Random (reliability analysis algorithms)
Two-Way Random Effects Model: People and Measures Effects Random (reliability analysis algorithms)
Two-Way Mixed Effects Model: People Effects Random, Measures Effects Fixed (reliability analysis algorithms)
RELIABILITY Algorithms
Notation (reliability analysis algorithms)
Scale and Item Statistics—Method 1 (reliability analysis algorithms)
The ANOVA Table (Winer, 1971) (reliability analysis algorithms)
Friedman Test or Cochran Test (reliability analysis algorithms)
Kendall's Coefficient of Concordance (reliability analysis algorithms)
Tukey's Test for Nonadditivity (reliability analysis algorithms)
Scale Statistics (reliability analysis algorithms)
Basic Computations—Method 2 (reliability analysis algorithms)
Scale Statistics—Method 2 (reliability analysis algorithms)
Additional Statistics—Method 2 (reliability analysis algorithms)
References (reliability analysis algorithms)


One-Way Random Effects Model: People Effect Random (reliability analysis algorithms)

reliability analysis algorithms,reliability analysis algorithms,reliability analysis algorithms
one-way random effects model: people effect random,one-way random effects model: people effect random,one-way random effects model: people effect random

Let Xji be the response to the ith measure given by the jth person, i = 1, …, k, j = 1, …, W. Suppose that Xji can be expressed as Xji = μ + pj + wji, where pj is the between-people effect which is normal distributed with zero mean and a variance of σ2p, and wji is the within-people effect which is also normal distributed with zero mean and a variance of σ2w.

Let MS BP and MS WP be the respective between-people Mean Squares and within-people Mean Squares. These two quantities can be computed by dividing the corresponding Sum of Squares with its degrees of freedom. See the topic Analysis of Variance Table (reliability analysis algorithms) for more information.

Related Topics

Single Measure Intraclass Correlation (reliability analysis algorithms)
Average Measure Intraclass Correlation (reliability analysis algorithms)
Two-Way Random Effects Model: People and Measures Effects Random (reliability analysis algorithms)
Two-Way Mixed Effects Model: People Effects Random, Measures Effects Fixed (reliability analysis algorithms)


Single Measure Intraclass Correlation (reliability analysis algorithms)

reliability analysis algorithms,reliability analysis algorithms,reliability analysis algorithms
single measure intraclass correlation,single measure intraclass correlation,single measure intraclass correlation

The single measure intraclass correlation is defined as

ρ(1)=σ2pσ2p+σ2w

Estimate

The single measure intraclass correlation coefficient is estimated by

ICC(1)=MS BP −MS WP MS BP +(k−1)MS WP .

In general,

−1k−1<ICC(1)≤1.

Confidence Interval

For 0 < α < 1, a (1- α)100% confidence interval for ρ(1) is given by

Fp/w−Fα/2,W−1,W(k−1)Fp/w+(k−1)Fα/2,W−1,W(k−1)<ρ(1)<Fp/w−F1−α/2,W−1,W(k−1)Fp/w+(k−1)F1−α/2,W−1,W(k−1),

where

Fp/w=MS BP MS WP

and Fα´,v1,v2 is the upper α´ point of a F-distribution with degrees of freedom v1 and v2.

Hypothesis Testing

The test statistic F(1) for H0:ρ(1)=ρ0, where 1>ρ0≥0 is the hypothesized value, is

F(1)=Fp/w1−ρ01+(k−1)ρ0.

Under the null hypothesis, the test statistic has an F-distribution with W−1,W(k−1) degrees of freedom.

Related Topics

One-Way Random Effects Model: People Effect Random (reliability analysis algorithms)
Average Measure Intraclass Correlation (reliability analysis algorithms)


Average Measure Intraclass Correlation (reliability analysis algorithms)

reliability analysis algorithms,reliability analysis algorithms,reliability analysis algorithms
average measure intraclass correlation,average measure intraclass correlation,average measure intraclass correlation

The average measure intraclass correlation is defined as

ρ(k)=σ2pσ2p+σ2w/k.

Estimate

The average measure intraclass correlation coefficient is estimated by

ICC(k)=MS BP −MS WP MS BP .

Confidence Interval

A (1- α)100% confidence interval for ρ(k) is given by

Fp/w−Fα/2,W−1,W(k−1)Fp/w<ρ(k)<Fp/w−F1−α/2,W−1,W(k−1)Fp/w.

Hypothesis Testing

The test statistic F(k) for H0:ρ(k)=ρ0, where 1>ρ0≥0 is the hypothesized value, is

F(k)=Fp/w(1−ρ0).

Under the null hypothesis, the test statistic has an F-distribution with W−1,W(k−1) degrees of freedom.

Related Topics

One-Way Random Effects Model: People Effect Random (reliability analysis algorithms)
Single Measure Intraclass Correlation (reliability analysis algorithms)


Two-Way Random Effects Model: People and Measures Effects Random (reliability analysis algorithms)

reliability analysis algorithms,reliability analysis algorithms,reliability analysis algorithms
Two-Way Random Effects Model: People and Measures Effects Random,Two-Way Random Effects Model: People and Measures Effects Random,Two-Way Random Effects Model: People and Measures Effects Random

Let Xji be the response to the i-th measure given by the j-th person, i = 1, …, k, j = 1, …, W. Suppose that Xji can be expressed as Xji = μ + pj + mi + pmji + eji, where pj is the people effect which is normal distributed with zero mean and a variance of σ2p, mi is the measures effect which is normal distributed with zero mean and a variance of σ2m, pmji is the interaction effect which is normal distributed with zero mean and a variance of σ2pm, and eji is the error effect which is again normal distributed with zero mean and a variance of σ2e.

Let MS BP , MS BM and MS Res be the respective between-people Mean Squares, between-measures Mean Squares and Residual Mean Squares. These quantities can be computed by dividing the corresponding Sum of Squares with its degrees of freedom. See the topic Analysis of Variance Table (reliability analysis algorithms) for more information.

Related Topics

Type A Single Measure Intraclass Correlation (reliability analysis algorithms)
Type A Average Measure Intraclass Correlation (reliability analysis algorithms)
Type C Single Measure Intraclass Correlation (reliability analysis algorithms)
Type C Average Measure Intraclass Correlation (reliability analysis algorithms)
One-Way Random Effects Model: People Effect Random (reliability analysis algorithms)
Two-Way Mixed Effects Model: People Effects Random, Measures Effects Fixed (reliability analysis algorithms)


Type A Single Measure Intraclass Correlation (reliability analysis algorithms)

reliability analysis algorithms,reliability analysis algorithms,reliability analysis algorithms
type A single measure intraclass correlation,type A single measure intraclass correlation,type A single measure intraclass correlation

The type A single measure intraclass correlation is defined as

ρ(A,1,r)={
σ2pσ2p+σ2m+σ2pm+σ2e | if interaction effect pmji is present
σ2pσ2p+σ2m+σ2e | if interaction effect pmji is absent
.

Estimate

The type A single measure intraclass correlation coefficient is estimated by

ICC(A,1,r)=MS BP −MS Res MS BP +(k−1)MS Res +k(MS BM −MS Res )/W.

Notice that the same estimator is used whether or not the interaction effect pmji is present.

Confidence Interval

A (1- α)100% confidence interval is given by

W(MS BP −Fα/2,W−1,v·MS Res )Fα/2,W−1,v[k·MS BM +(kW−k−W)MS Res ]+W·MS BP <ρ(A,1,r)
<W(MS BP −F1−α/2,W−1,v·MS Res )F1−α/2,W−1,v[k·MS BM +(kW−k−W)MS Res ]+W·MS BP
,

where

ν=(aMS BM +bMS Res )2[(aMS BM )2k−1+(bMS Res )2(W−1)(k−1)]

a=k·ICC(A,1,r)W(1−ICC(A,1,r))

and

b=1+k·ICC(A,1,r)·(W−1)W(1−ICC(A,1,r)).

Hypothesis Testing

The test statistic F(A,1,r) for H0:ρ(A,1,r)=ρ0, where 1>ρ0≥0 is the hypothesized value, is

F(A,1,r)=MS BP a0MS BM +b0MS Res

where

a0=kρ0W(1−ρ0)

and

b0=1+kρ0(W−1)W(1−ρ0).

Under the null hypothesis, the test statistic has an F-distribution with W−1,ν(1)0 degrees of freedom.

ν(1)0=(a0MS BM +b0MS Res )2[(a0MS BM )2k−1+(b0MS Res )2(W−1)(k−1)].

Related Topics

Two-Way Random Effects Model: People and Measures Effects Random (reliability analysis algorithms)
Type A Average Measure Intraclass Correlation (reliability analysis algorithms)
Type C Single Measure Intraclass Correlation (reliability analysis algorithms)
Type C Average Measure Intraclass Correlation (reliability analysis algorithms)


Type A Average Measure Intraclass Correlation (reliability analysis algorithms)

reliability analysis algorithms,reliability analysis algorithms,reliability analysis algorithms
type A average measure intraclass correlation,type A average measure intraclass correlation,type A average measure intraclass correlation

The type A average measure intraclass correlation is defined as

ρ(A,k,r)={
σ2pσ2p+(σ2m+σ2pm+σ2e)/k | if interaction effect pmji is present
σ2pσ2p+(σ2m+σ2e)/k | if interaction effect pmji is absent
.

Estimate

The type A average measure intraclass correlation coefficient is estimated by

ICC(A,k,r)=MS BP −MS Res MS BP +(MS BM −MS Res )/W.

Notice that the same estimator is used whether or not the interaction effect pmji is present.

Confidence Interval

A (1- α)100% confidence interval is given by

W(MS BP −Fα/2,W−1,vMS Res )Fα/2,W−1,v(MS BM −MS Res )+W·MS BP <ρ(A,k,r)
<W(MS BP −F1−α/2,W−1,vMS Res )F1−α/2,W−1,v(MS BM −MS Res )+W·MS BP

where

ν=(cMS BM +dMS Res )2[(cMS BM )2k−1+(dMS Res )2(W−1)(k−1)]

c=ICC(A,k,r)W(1−ICC(A,k,r))

and

d=1+ICC(A,k,r)·(W−1)W(1−ICC(A,k,r)).

Hypothesis Testing

The test statistic for H0:ρ(A,k,r)=ρ0, where 1>ρ0≥0 is the hypothesized value, is

F(A,k,r)=MS BP c0MS BM +d0MS Res

where

c0=ρ0W(1−ρ0)

and

d0=1+ρ0(W−1)W(1−ρ0).

Under the null hypothesis, the test statistic has an F-distribution with W−1,ν(k)0 degrees of freedom.

ν(k)0=(c0MS BM +d0MS Res )2[(c0MS BM )2k−1+(d0MS Res )2(W−1)(k−1)].

Related Topics

Two-Way Random Effects Model: People and Measures Effects Random (reliability analysis algorithms)
Type A Single Measure Intraclass Correlation (reliability analysis algorithms)
Type C Single Measure Intraclass Correlation (reliability analysis algorithms)
Type C Average Measure Intraclass Correlation (reliability analysis algorithms)


Type C Single Measure Intraclass Correlation (reliability analysis algorithms)

reliability analysis algorithms,reliability analysis algorithms,reliability analysis algorithms
type C single measure intraclass correlation,type C single measure intraclass correlation,type C single measure intraclass correlation

The type C single measure intraclass correlation is defined as

ρ(C,1,r)={
σ2pσ2p+σ2pm+σ2e | if interaction effect pmji is present
σ2pσ2p+σ2e | if interaction effect pmji is absent
.

Estimate

The type C single measure intraclass correlation coefficient is estimated by

ICC(C,1,r)=MS BP −MS Res MS BP +(k−1)MS Res .

Notice that the same estimator is used whether or not the interaction effect pmji is present.

Confidence Interval

A (1- α)100% confidence interval is given by

Fp/r−Fα/2,W−1,(W−1)(k−1)Fp/r+(k−1)Fα/2,W−1,(W−1)(k−1)<ρ(C,1,r)<Fp/r−F1−α/2,W−1,(W−1)(k−1)Fp/r+(k−1)F1−α/2,W−1,(W−1)(k−1)

where

Fp/r=MS BP MS Res .

Hypothesis Testing

The test statistic for H0:ρ(C,1,r)=ρ0, where 1>ρ0≥0 is the hypothesized value, is

F(C,1,r)=Fp/r1−ρ01+(k−1)ρ0.

Under the null hypothesis, the test statistic has an F-distribution with W−1,(W−1)(k−1) degrees of freedom.

Related Topics

Two-Way Random Effects Model: People and Measures Effects Random (reliability analysis algorithms)
Type A Single Measure Intraclass Correlation (reliability analysis algorithms)
Type A Average Measure Intraclass Correlation (reliability analysis algorithms)
Type C Average Measure Intraclass Correlation (reliability analysis algorithms)


Type C Average Measure Intraclass Correlation (reliability analysis algorithms)

reliability analysis algorithms,reliability analysis algorithms,reliability analysis algorithms
type C average measure intraclass correlation,type C average measure intraclass correlation,type C average measure intraclass correlation

The type C average measure intraclass correlation is defined as

ρ(C,k,r)={
σ2pσ2p+(σ2pm+σ2e)/k | if interaction effect pmji is present
σ2pσ2p+σ2e/k | if interaction effect pmji is absent
.

Estimate

The type C average measure intraclass correlation coefficient is estimated by

ICC(C,k,r)=MS BP −MS Res MS BP .

Notice that the same estimator is used whether or not the interaction effect pmji is present.

Confidence Interval

A (1- α)100% confidence interval is given by

Fp/r−Fα/2,W−1,(W−1)(k−1)Fp/r<ρ(C,k,r)<Fp/r−F1−α/2,W−1,(W−1)(k−1)Fp/r.

Hypothesis Testing

The test statistic for H0:ρ(C,k,r)=ρ0, where 1>ρ0≥0 is the hypothesized value, is

F(C,k,r)=Fp/r(1−ρ0).

Under the null hypothesis, the test statistic has an F-distribution with W−1,(W−1)(k−1) degrees of freedom.

Related Topics

Two-Way Random Effects Model: People and Measures Effects Random (reliability analysis algorithms)
Type A Single Measure Intraclass Correlation (reliability analysis algorithms)
Type A Average Measure Intraclass Correlation (reliability analysis algorithms)
Type C Single Measure Intraclass Correlation (reliability analysis algorithms)


Two-Way Mixed Effects Model: People Effects Random, Measures Effects Fixed (reliability analysis algorithms)

reliability analysis algorithms,reliability analysis algorithms,reliability analysis algorithms
two-way mixed effects model: people effects random, measures effects fixed,two-way mixed effects model: people effects random, measures effects fixed,two-way mixed effects model: people effects random, measures effects fixed

Let Xji be the response to the i-th measure given by the j-th person, i = 1, …, k, j = 1, …, W. Suppose that Xji can be expressed as Xji = μ + pj + mi + pmji + eji, where pj is the people effect which is normal distributed with zero mean and a variance of σ2p, mi is considered as a fixed effect, pmji is the interaction effect which is normal distributed with zero mean and a variance of σ2pm, and eji is the error effect which is again normal distributed with zero mean and a variance of σ2e. Denote θ2m as the expected measure square of between measures effect mi.

Let MS BP and MS Res be the respective between-people Mean Squares and Residual Mean Squares. These quantities can be computed by dividing the corresponding Sum of Squares with its degrees of freedom. See the topic Analysis of Variance Table (reliability analysis algorithms) for more information.

Related Topics

Type A Single Measure Intraclass correlation (reliability analysis algorithms)
Type A Average Measure Intraclass Correlation (reliability analysis algorithms)
Type C Single Measure Intraclass Correlation (reliability analysis algorithms)
Type C Average Measure Intraclass Correlation (reliability analysis algorithms)
One-Way Random Effects Model: People Effect Random (reliability analysis algorithms)
Two-Way Random Effects Model: People and Measures Effects Random (reliability analysis algorithms)


Type A Single Measure Intraclass correlation (reliability analysis algorithms)

reliability analysis algorithms,reliability analysis algorithms,reliability analysis algorithms
type A single measure intraclass correlation,type A single measure intraclass correlation,type A single measure intraclass correlation

The type A single measure intraclass correlation is defined as

ρ(A,1,m)={
σ2p−σ2pm/(k−1)σ2p+θ2m+(σ2pm+σ2e) | if interaction effect pmji is present
σ2pσ2p+θ2m+σ2e | if interaction effect pmji is absent
.

Estimate

The type A single measure intraclass correlation is estimated by

ICC(A,1,m)=MS BP −MS Res MS BP +(k−1)MS Res +k(MS BM −MS Res )/W.

Notice that the same estimator is used whether or not the interaction effect pmji is present.

Confidence Interval

A (1- α)100% confidence interval for ρ(A,1,m) is the same as that for ρ(A,1,r), with ICC(A,1,r) replaced by ICC(A,1,m).

Hypothesis Testing

The test statistic for H0:ρ(A,1,m)=ρ0, where 1>ρ0≥0 is the hypothesized value, is the same as that for ρ(A,1,r), with the same distribution under the null hypothesis.

Related Topics

Two-Way Mixed Effects Model: People Effects Random, Measures Effects Fixed (reliability analysis algorithms)
Type A Average Measure Intraclass Correlation (reliability analysis algorithms)
Type C Single Measure Intraclass Correlation (reliability analysis algorithms)
Type C Average Measure Intraclass Correlation (reliability analysis algorithms)


Type A Average Measure Intraclass Correlation (reliability analysis algorithms)

reliability analysis algorithms,reliability analysis algorithms,reliability analysis algorithms
type A average measure intraclass correlation,type A average measure intraclass correlation,type A average measure intraclass correlation

The type A average measure intraclass correlation is defined as

ρ(A,k,m)={
σ2p−σ2pm/(k−1)σ2p+(θ2m+σ2pm+σ2e)/k | if interaction effect pmji is present
σ2pσ2p+(θ2m+σ2e)/k | if interaction effect pmji is absent
.

Estimate

The type A single measure intraclass correlation is estimated by

ICC(A,k,m)={
Not estimable | if interaction effect pmji is present
MS BP −MS Res MS BP +(MS BM −MS Res )/W | if interaction effect pmji is absent
.

Confidence Interval

A (1- α)100% confidence interval for ρ(A,k,m) is the same as that for ρ(A,k,r), with ICC(A,k,r) replaced by ICC(A,k,m). Notice that the hypothesis test is not available when the interaction effect pmji is present.

Hypothesis Testing

The test statistic for H0:ρ(A,k,m)=ρ0, where 1>ρ0≥0 is the hypothesized value, is the same as that for ρ(A,k,r), with the same distribution under the null hypothesis. Notice that the hypothesis test is not available when the interaction effect pmji is present.

Related Topics

Two-Way Mixed Effects Model: People Effects Random, Measures Effects Fixed (reliability analysis algorithms)
Type A Single Measure Intraclass correlation (reliability analysis algorithms)
Type C Single Measure Intraclass Correlation (reliability analysis algorithms)
Type C Average Measure Intraclass Correlation (reliability analysis algorithms)


Type C Single Measure Intraclass Correlation (reliability analysis algorithms)

reliability analysis algorithms,reliability analysis algorithms,reliability analysis algorithms
type C single measure intraclass correlation,type C single measure intraclass correlation,type C single measure intraclass correlation

The type C single measure intraclass correlation is defined as

ρ(C,1,m)={
σ2p−σ2pm/(k−1)σ2p+(σ2pm+σ2e) | if interaction effect pmji is present
σ2pσ2p+σ2e | if interaction effect pmji is absent
.

Estimate

The type C single measure intraclass correlation is estimated by

ICC(C,1,m)=MS Between people −MS Residual MS Between people +(k−1)MS Residual .

Notice that the same estimator is used whether or not the interaction effect pmji is present.

Confidence Interval

A (1- α)100% confidence interval is given by

Fp/r−Fα/2,W−1,(W−1)(k−1)Fp/r+(k−1)Fα/2,W−1,(W−1)(k−1)<ρ(C,1,m)<Fp/r−F1−α/2,W−1,(W−1)(k−1)Fp/r+(k−1)F1−α/2,W−1,(W−1)(k−1).

where

Fp/r=MS BP MS Res .

Hypothesis Testing

The test statistic for H0:ρ(C,1,m)=ρ0, where 1>ρ0≥0 is the hypothesized value, is

F(C,1,m)=Fp/r1−ρ01+(k−1)ρ0.

Under the null hypothesis, the test statistic has an F-distribution with W−1,(W−1)(k−1) degrees of freedom.

Related Topics

Two-Way Mixed Effects Model: People Effects Random, Measures Effects Fixed (reliability analysis algorithms)
Type A Single Measure Intraclass correlation (reliability analysis algorithms)
Type A Average Measure Intraclass Correlation (reliability analysis algorithms)
Type C Average Measure Intraclass Correlation (reliability analysis algorithms)


Type C Average Measure Intraclass Correlation (reliability analysis algorithms)

reliability analysis algorithms,reliability analysis algorithms,reliability analysis algorithms
type C average measure intraclass correlation,type C average measure intraclass correlation,type C average measure intraclass correlation

The type C average measure intraclass correlation is defined as

ρ(C,k,m)={
σ2p−σ2pm/(k−1)σ2p+(σ2pm+σ2e)/k | if interaction effect pmji is present
σ2pσ2p+σ2e/k | if interaction effect pmji is absent
.

Estimate

The type C average measure intraclass correlation is estimated by

ICC(C,k,m)={
Not estimable | if interaction effect pmji is present
MS BP −MS Res MS BP | if interaction effect pmji is absent
.

Confidence Interval

A (1- α)100% confidence interval is given by

Fp/r−Fα/2,W−1,(W−1)(k−1)Fp/r<ρ(C,k,m)<Fp/r−F1−α/2,W−1,(W−1)(k−1)Fp/r.

Notice that the confidence interval is not available when the interaction effect pmji is present.

Hypothesis Testing

The test statistic for H0:ρ(C,k,m)=ρ0, where 1>ρ0≥0 is the hypothesized value, is

F(C,1,m)=Fp/r(1−ρ0).

Under the null hypothesis, the test statistic has an F-distribution with W−1,(W−1)(k−1) degrees of freedom. Notice that the F-test is not available when the interaction effect pmji is present.

Related Topics

Two-Way Mixed Effects Model: People Effects Random, Measures Effects Fixed (reliability analysis algorithms)
Type A Single Measure Intraclass correlation (reliability analysis algorithms)
Type A Average Measure Intraclass Correlation (reliability analysis algorithms)
Type C Single Measure Intraclass Correlation (reliability analysis algorithms)


References (reliability analysis algorithms)

reliability analysis algorithms,reliability analysis algorithms,reliability analysis algorithms
references,references,references

Cronbach, L. J. 1951. Coefficient alpha and the internal structure of tests. Psychometrika, 16:3, 297-334.

Dempster, A. P. 1969. Elements of Continuous Multivariate Analysis. Reading, MA: Addison-Wesley.

Guttman, L. 1945. A basis for analyzing test-retest reliability. Psychometrika, 10:4, 255-282.

Kristof, W. 1963. The statistical theory of stepped-up reliability coefficients when a test has been divided into several equivalent parts. Psychometrika, 28:3, 221-238.

Kristof, W. 1969. Estimation of true score and error variance for tests under various equivalence assumptions. Psychometrika, 34:4, 489-507.

McGraw, K. O., and S. P. Wong. 1996. Forming inferences about some intraclass correlation coefficients. Psychological Methods, 1:1, 30-46.

Novick, M. R., and C. Lewis. 1967. Coefficient alpha and the reliability of composite measurements. Psychometrika, 32:1, 1-13.

Shrout, P. E., and J. L. Fleiss. 1979. Intraclass correlations: Uses in assessing reliability. Psychological Bulletin, 86:, 420-428.

Winer, B. J. 1971. Statistical principles in experimental design, 2nd ed. New York: McGraw-Hill.

Related Topics

RELIABILITY Algorithms
Notation (reliability analysis algorithms)
Scale and Item Statistics—Method 1 (reliability analysis algorithms)
The ANOVA Table (Winer, 1971) (reliability analysis algorithms)
Friedman Test or Cochran Test (reliability analysis algorithms)
Kendall's Coefficient of Concordance (reliability analysis algorithms)
Tukey's Test for Nonadditivity (reliability analysis algorithms)
Scale Statistics (reliability analysis algorithms)
Basic Computations—Method 2 (reliability analysis algorithms)
Scale Statistics—Method 2 (reliability analysis algorithms)
Additional Statistics—Method 2 (reliability analysis algorithms)
Intraclass Correlation Coefficients (reliability analysis algorithms)


RMV Algorithms

RMV (command),RMV (command),RMV (command)
algorithms,algorithms,algorithms
RMV algorithms,RMV algorithms,RMV algorithms

Missing values in a time series are estimated.

Related Topics

Notation (RMV algorithms)
Methods for Estimating Missing Values (RMV algorithms)
Linear Interpolation (LINT(X)) (RMV algorithms)
Mean of p Nearest Preceding and p Subsequent Values (MEAN (X,p)) (RMV algorithms)
Median of p Nearest Preceding and p Subsequent Values (MEDIAN (X,p)) (RMV algorithms)
Series Mean (SMEAN (X)) (RMV algorithms)
Linear Trend (TREND(X)) (RMV algorithms)


Notation (RMV algorithms)

RMV algorithms,RMV algorithms,RMV algorithms
notation,notation,notation

The following notation is used throughout this section unless otherwise stated:

X=(X1,...,Xn)

Original series

^
X
i

Estimate for spans

p

Number of spans

k

The number of consecutive missing values

Xi to Xi+k−1

Set of consecutive missing values

Related Topics

RMV Algorithms
Methods for Estimating Missing Values (RMV algorithms)
Linear Interpolation (LINT(X)) (RMV algorithms)
Mean of p Nearest Preceding and p Subsequent Values (MEAN (X,p)) (RMV algorithms)
Median of p Nearest Preceding and p Subsequent Values (MEDIAN (X,p)) (RMV algorithms)
Series Mean (SMEAN (X)) (RMV algorithms)
Linear Trend (TREND(X)) (RMV algorithms)


Methods for Estimating Missing Values (RMV algorithms)

RMV algorithms,RMV algorithms,RMV algorithms
methods for estimating missing values,methods for estimating missing values,methods for estimating missing values

The following methods are available.

Related Topics

RMV Algorithms
Notation (RMV algorithms)
Linear Interpolation (LINT(X)) (RMV algorithms)
Mean of p Nearest Preceding and p Subsequent Values (MEAN (X,p)) (RMV algorithms)
Median of p Nearest Preceding and p Subsequent Values (MEDIAN (X,p)) (RMV algorithms)
Series Mean (SMEAN (X)) (RMV algorithms)
Linear Trend (TREND(X)) (RMV algorithms)


Linear Interpolation (LINT(X)) (RMV algorithms)

RMV algorithms,RMV algorithms,RMV algorithms
linear interpolation,linear interpolation,linear interpolation
(LINT(X)),(LINT(X)),(LINT(X))
^
X
i+l={
Xi−1+l+1k+1(Xi+k−Xi−1) | l=0,...,k−1
SYSMIS | i=1 or i+k−1=n

If k=1 (that is, only one consecutive missing observation), then

^
X
i={
12(Xi−1+Xi+1) | i=2,...,n−1
SYSMIS | i=1 or i=n

Related Topics

RMV Algorithms
Notation (RMV algorithms)
Methods for Estimating Missing Values (RMV algorithms)
Mean of p Nearest Preceding and p Subsequent Values (MEAN (X,p)) (RMV algorithms)
Median of p Nearest Preceding and p Subsequent Values (MEDIAN (X,p)) (RMV algorithms)
Series Mean (SMEAN (X)) (RMV algorithms)
Linear Trend (TREND(X)) (RMV algorithms)


Mean of p Nearest Preceding and p Subsequent Values (MEAN (X,p)) (RMV algorithms)

RMV algorithms,RMV algorithms,RMV algorithms
mean of p nearest preceding and p subsequent values,mean of p nearest preceding and p subsequent values,mean of p nearest preceding and p subsequent values
(MEAN (X,p)),(MEAN (X,p)),(MEAN (X,p))

If the number of nonmissing observations in (X1,...,Xi−1) or (Xi+k,...,Xn) is less than p, then set
^
X
i+l= SYSMIS ; otherwise, set
^
X
i+l= average of p nonmissing observations preceding Xi and p nonmissing observations following Xi+k−1.

Related Topics

RMV Algorithms
Notation (RMV algorithms)
Methods for Estimating Missing Values (RMV algorithms)
Linear Interpolation (LINT(X)) (RMV algorithms)
Median of p Nearest Preceding and p Subsequent Values (MEDIAN (X,p)) (RMV algorithms)
Series Mean (SMEAN (X)) (RMV algorithms)
Linear Trend (TREND(X)) (RMV algorithms)


Median of p Nearest Preceding and p Subsequent Values (MEDIAN (X,p)) (RMV algorithms)

RMV algorithms,RMV algorithms,RMV algorithms
mean of p nearest preceding and p subsequent values,mean of p nearest preceding and p subsequent values,mean of p nearest preceding and p subsequent values
(MEDIAN (X,p)),(MEDIAN (X,p)),(MEDIAN (X,p))

If the number of nonmissing observations in (X1,...,Xi−1) or (Xi+k,...,Xn) is less than p, then set
^
X
i+l= SYSMIS ; otherwise, set
^
X
i+l= median of p nonmissing observations preceding Xi and p nonmissing observations following Xi+k−1.

Related Topics

RMV Algorithms
Notation (RMV algorithms)
Methods for Estimating Missing Values (RMV algorithms)
Linear Interpolation (LINT(X)) (RMV algorithms)
Mean of p Nearest Preceding and p Subsequent Values (MEAN (X,p)) (RMV algorithms)
Series Mean (SMEAN (X)) (RMV algorithms)
Linear Trend (TREND(X)) (RMV algorithms)


Series Mean (SMEAN (X)) (RMV algorithms)

RMV algorithms,RMV algorithms,RMV algorithms
series mean,series mean,series mean
(SMEAN (X)),(SMEAN (X)),(SMEAN (X))

^
X
i+l= average of all nonmissing observations in the series.

Related Topics

RMV Algorithms
Notation (RMV algorithms)
Methods for Estimating Missing Values (RMV algorithms)
Linear Interpolation (LINT(X)) (RMV algorithms)
Mean of p Nearest Preceding and p Subsequent Values (MEAN (X,p)) (RMV algorithms)
Median of p Nearest Preceding and p Subsequent Values (MEDIAN (X,p)) (RMV algorithms)
Linear Trend (TREND(X)) (RMV algorithms)


Linear Trend (TREND(X)) (RMV algorithms)

RMV algorithms,RMV algorithms,RMV algorithms
linear trend,linear trend,linear trend
(TREND(X)),(TREND(X)),(TREND(X))

1. Use all the nonmissing observations in the series to fit the regression line of the form

^
X
t=a+bt

The least squares estimates are

b=Σ(Xt−X)(t−t)Σ(t−t)2
a=X−b t

2. Apply the regression equation to replace the missing values

^
X
i+l=a+b(i+l)

Related Topics

RMV Algorithms
Notation (RMV algorithms)
Methods for Estimating Missing Values (RMV algorithms)
Linear Interpolation (LINT(X)) (RMV algorithms)
Mean of p Nearest Preceding and p Subsequent Values (MEAN (X,p)) (RMV algorithms)
Median of p Nearest Preceding and p Subsequent Values (MEDIAN (X,p)) (RMV algorithms)
Series Mean (SMEAN (X)) (RMV algorithms)


ROC Algorithms

ROC (command),ROC (command),ROC (command)
algorithms,algorithms,algorithms
ROC Curve,ROC Curve,ROC Curve
algorithms,algorithms,algorithms
ROC curve algorithms,ROC curve algorithms,ROC curve algorithms

ROC produces a receiver operating characteristic (ROC) curve.

Related Topics

Notation and Definitions (ROC curve algorithms)
Construction of the ROC Curve (ROC curve algorithms)
The Area Under the ROC Curve (ROC curve algorithms)
SE of the area under the ROC curve statistic, nonparametric assumption (ROC curve algorithms)
The asymptotic confidence interval of the area under the ROC curve (ROC curve algorithms)
Asymptotic P-value (ROC curve algorithms)
References (ROC curve algorithms)


Notation and Definitions (ROC curve algorithms)

ROC curve algorithms,ROC curve algorithms,ROC curve algorithms
notation,notation,notation
di | Actual state for case i, it is either positive or negative; positive usually means that a test detected some evidence for a condition to exist.
xi | Test result score for case i.
n TP | Number of true positive decisions
n FN | Number of false negative decisions
n TN | Number of true negative decisions
n FP | Number of false positive decisions
Sensitivity | Probability of correctly identifying a positive
Specificity | Probability of correctly identifying a negative
C | Cutoff or criterion value on the test result variable
n− | Number of cases with negative actual state
n+ | Number of cases with positive actual state
n−=j | Number of true negative cases with test result equal to j.
n+>j | Number of true positive cases with test result greater than j.
n+=j | Number of true positive cases with test result equal to j.
n−<j | Number of true negative cases with test result less than j.
Q1 | The probability that two randomly chosen positive state subjects will both get a more positive test result than a randomly chosen negative state subject.
Q2 | The probability that one randomly chosen positive state subject will get a more positive test result than two randomly chosen negative state subjects.

Related Topics

ROC Algorithms
Construction of the ROC Curve (ROC curve algorithms)
The Area Under the ROC Curve (ROC curve algorithms)
SE of the area under the ROC curve statistic, nonparametric assumption (ROC curve algorithms)
The asymptotic confidence interval of the area under the ROC curve (ROC curve algorithms)
Asymptotic P-value (ROC curve algorithms)
References (ROC curve algorithms)


Construction of the ROC Curve (ROC curve algorithms)

ROC curve algorithms,ROC curve algorithms,ROC curve algorithms
construction of the ROC curve,construction of the ROC curve,construction of the ROC curve

The ROC plot is merely the graph of points defined by sensitivity and (1 – specificity). Customarily, sensitivity takes the y axis and (1 – specificity) takes the x axis.

Related Topics

Computation of Sensitivity and Specificity (ROC curve algorithms)
Interpolation of the Points (ROC curve algorithms)
ROC Algorithms
Notation and Definitions (ROC curve algorithms)
The Area Under the ROC Curve (ROC curve algorithms)
SE of the area under the ROC curve statistic, nonparametric assumption (ROC curve algorithms)
The asymptotic confidence interval of the area under the ROC curve (ROC curve algorithms)
Asymptotic P-value (ROC curve algorithms)
References (ROC curve algorithms)


Computation of Sensitivity and Specificity (ROC curve algorithms)

ROC curve algorithms,ROC curve algorithms,ROC curve algorithms
computation of sensitivity and specificity,computation of sensitivity and specificity,computation of sensitivity and specificity

The ROC procedure fixes the set of cutoffs to be the set defined by the values half the distance between each successive pair of observed test scores, plus max(xi ) + 1 and min(xi ) – 1.

Given a set of cutoffs, the actual state values, and test result values, one can classify each observation into one of TP, FN, TN, and FP according to a classification rule. Then, the computation of sensitivity and specificity is immediate from their definitions.

Four classification or decision rules are possible:

(1) | a test result is positive if the test result value is greater than or equal to C and that a test result is negative if the test result is less than C;
(2) | a test result is positive if the test result value is greater than C and that a test result is negative if the test result is less than or equal to C;
(3) | a test result is positive if the test result value is less than or equal to C and that a test result is negative if the test result is greater than C; and
(4) | a test result is positive if the test result value is less than C and that a test result is negative if the test result is greater than or equal to C.

Specificity

Specificity is defined by

n TN n TN +n FP

Sensitivity

Sensitivity is defined by

n TP n TP +n FN

Related Topics

Construction of the ROC Curve (ROC curve algorithms)
Interpolation of the Points (ROC curve algorithms)


Interpolation of the Points (ROC curve algorithms)

ROC curve algorithms,ROC curve algorithms,ROC curve algorithms
interpolation of the points,interpolation of the points,interpolation of the points

When the test result variable is a scale variable, the number of distinct test result values and thus the number of cutoff points tend to increase as the number of observations (or test results) increases. Theoretically, in the “limit” the pairs of sensitivity and (1 – specificity) values form a dense set of points in itself and in some continuous curve, the ROC curve. A continuous interpolation of the points may be reasonable in this sense.

Note: The domain of the test result variable need only be a positive-measure subset of the real line. For example, it could be defined only on (-1, 0] and (1, +∞). As long as the variable is not discrete, the ROC curve will be continuous.

When the test result variable is an ordinal discrete variable, the points never become dense, even when there are countably infinite number of (ordinal discrete) values. Thus, a continuous interpolation may not be justifiable. But, when it is reasonable to assume there is some underlying or latent continuous variable, an interpolation such as a linear interpolation, though imprecise, may be attempted. From now on, the test result variable is assumed continuous or practically so.

The problem is related to having ties, but not the same. In the continuous case, when values are tied, they are identical but unique. In the ordinal case with the grouped/discretized continuous interpretation, values in some underlying continuous scale range may be grouped together and represented by a certain value, usually the mid range value. Those values are represented as if they were ties, but in fact they are a collection of unordered values. Now, even if each category/group contains only one observation, the problem still exists unless the observation’s latent value is identical to the representing value of the observation.

Case 1: No ties between actual positive and actual negative groups

If there are ties within a group, the vertical/horizontal distance between the points is simply multiplied by the number of ties. If not, all the points are uniformly spaced within each of the vertical and horizontal directions, because as a cutoff value changes, only one observation at a time switches the test result.

Case 2: Some ties between actual positive and actual negative groups

For ties between actual positive and actual negative groups, both of the n TP and n FP change simultaneously, and we do not know “the correct path between two adjacent points” (Zweig and Campbell, 1993, p. 566). “It could be the minimal path (horizontal first, then vertical) or the maximal path (vice versa). The straight diagonal line segment is the average of the two most extreme paths and tends to underestimate the plot for diagnostically accurate test” (Zweig and Campbell, 1993, p. 566). But, it is our choice here. In passing, the distance and angle of this diagonal line depend on the numbers of ties within D+ and D- groups.

Related Topics

Construction of the ROC Curve (ROC curve algorithms)
Computation of Sensitivity and Specificity (ROC curve algorithms)


The Area Under the ROC Curve (ROC curve algorithms)

ROC curve algorithms,ROC curve algorithms,ROC curve algorithms
area under the ROC curve,area under the ROC curve,area under the ROC curve

Let x represent the scale of the test result variable, with its low values suggesting a negative result and the high values a positive result. Denote by x+ the x values for cases with positive actual states. Similarly, denote by x− the x values for cases with negative actual states. Then, the “true” area under the ROC curve is

θ=Pr(x+>x−).

The nonparametric approximation of θ is

W=1n+n−Σ
all possible
combinations
of(x+,x−)
s(x+,x−),

where n+ is the sample size of D+, n− is the sample size of D-, and

s(x+,x−)={
1 if x+>x−
12 if x+=x−
0 if x+<x−
.

Note that W is the observed area under the ROC curve, which connects successive points by a straight line, i.e., by the trapezoidal rule.
An alternative way to compute W is as follows:

W=1n+n−Σ
x{ set of all test
result values }
{n−=j×n+>j+n−=j×n+=j2}.

When a low value of x suggests a positive test result and a high value a negative test result

If a low value of x suggests a positive test result and a high a negative test result, compute W as above and then

W´=1−W,

where W´ is the estimated area under the curve when a low test result score suggests a positive test result.

Related Topics

ROC Algorithms
Notation and Definitions (ROC curve algorithms)
Construction of the ROC Curve (ROC curve algorithms)
SE of the area under the ROC curve statistic, nonparametric assumption (ROC curve algorithms)
The asymptotic confidence interval of the area under the ROC curve (ROC curve algorithms)
Asymptotic P-value (ROC curve algorithms)
References (ROC curve algorithms)


SE of the area under the ROC curve statistic, nonparametric assumption (ROC curve algorithms)

ROC curve algorithms,ROC curve algorithms,ROC curve algorithms
SE of the area under the ROC curve statistic,SE of the area under the ROC curve statistic,SE of the area under the ROC curve statistic

The standard deviation of W is estimated by:

SE (W)=
√ W(1−W)+(n+−1)(
^
Q
1−W2)+(n−−1)(
^
Q
2−W2)n+n−
.

where

^
Q
1=1n−n2+
Σ
x
n−=j×[n2+>j+n+>j×n+=j+n2+=j3]

and

^
Q
2=1n2−n
Σ
x
n+=j×[n2−<j+n−<j×n−=j+n2−=j3].

When a low value of x suggests a positive test result and a high value a negative test result

If we assume that a low value of x suggests a positive test result and a high value a negative test result, then we estimate the standard deviation of W´ by SE (W´)= SE (W).

Under the bi-negative exponential distribution assumption, given the number of negative results equal number of positive results

Under the bi-negative exponential distribution assumption when n+=n−,

^
Q
1=W2−W

and

^
Q
2=2W21+W.

SE (W) is then computed as before.

When a low value of x suggests a positive test result and a high value a negative test result

Once again, SE(W´) = SE(W).

Related Topics

ROC Algorithms
Notation and Definitions (ROC curve algorithms)
Construction of the ROC Curve (ROC curve algorithms)
The Area Under the ROC Curve (ROC curve algorithms)
The asymptotic confidence interval of the area under the ROC curve (ROC curve algorithms)
Asymptotic P-value (ROC curve algorithms)
References (ROC curve algorithms)


The asymptotic confidence interval of the area under the ROC curve (ROC curve algorithms)

ROC curve algorithms,ROC curve algorithms,ROC curve algorithms
asymptotic confidence interval of the area under the ROC curve,asymptotic confidence interval of the area under the ROC curve,asymptotic confidence interval of the area under the ROC curve

A 2-sided asymptotic c%=(100−α)% confidence interval for the true area under the ROC curve is

W±Zα SE (W).

When a low value of x suggests a positive test result and a high value a negative test result

W´±Zα SE (W´)

Related Topics

ROC Algorithms
Notation and Definitions (ROC curve algorithms)
Construction of the ROC Curve (ROC curve algorithms)
The Area Under the ROC Curve (ROC curve algorithms)
SE of the area under the ROC curve statistic, nonparametric assumption (ROC curve algorithms)
Asymptotic P-value (ROC curve algorithms)
References (ROC curve algorithms)


Asymptotic P-value (ROC curve algorithms)

ROC curve algorithms,ROC curve algorithms,ROC curve algorithms
asymptotic p-value,asymptotic p-value,asymptotic p-value

Since W is asymptotically normal under the null hypothesis that θ=0.5, we can calculate the asymptotic P-value under the null hypothesis that θ=0.5 vs. the alternative hypothesis that θ≠0.5:

Pr (|Z|>|W−0.5 SD (W)|θ=0.5|)=2 Pr (Z>|W−0.5 SD (W)|θ=0.5|)

In the nonparametric case,

SD (W)|θ=0.5=
√ θ(1−θ)+(n+−1)(Q1−θ2)+(n−−1)(Q2−θ2)n+n−
|θ=0.5
=
√ 0.5(1−0.5)+(n+−1)(1/3−0.52)+(n−−1)(1/3−0.52)n+n−
(=
√ n++n−+112n+n−
=
√ n+n−(n++n−+1)12
/n+n−),

because we can deduce that Q1=1/3 and Q2=1/3 under the null hypothesis that θ=0.5. The argument for Q1=1/3 is as follows. θ=0.5 implies that the distribution of test results of positive actual state subjects is identical to the distribution of test results of negative actual state subjects. So, the mixture of the two distributions is identical to either one of the distributions. Then, we can reinterpret Q1 as the probability that, given three randomly chosen subjects from the (mixture) distribution, the subject with the lowest test result was selected, say, first. (One may consider this subject as a negative state subject and the other two as positive state subjects.) From here on, we can pursue a purely combinatorial argument, irrespective of the distribution of subjects’ test results, because the drawings are independent and given. There are 3!=3×2×1=6 ways to order the three subjects, and there are two ways in which the subject with the lowest test result comes first. So, if θ=0.5, Q1=2/6=1/3. The argument for Q2=1/3 is similar.

In the bi-negative exponential case,

SD (W)|θ=0.5=
√ θ(1−θ)+(n+−1)(Q1−θ2)+(n−−1)(Q2−θ2)n+n−
|θ=0.5
=
√ θ(1−θ)+(n+−1)(θ2−θ−θ2)+(n−−1)(2θ21+θ−θ2)n+n−
|θ=0.5
=
√ 0.5(1−0.5)+(n+−1)(0.52−0.5−0.52)+(n−−1)(2×0.521+0.5−0.52)n+n−
=
√ 0.5(1−0.5)+(n+−1)(1/3−0.52)+(n−−1)(1/3−0.52)n+n−
,

where n+=n−. (Note that this formula is identical to the nonparametric one except for the sample size restriction.)

When a low value of x suggests a positive test result and a high value a negative test result

The asymptotic P-value under the null hypothesis that θ´=0.5 vs. the alternative hypothesis that θ´≠0.5, if desired, may be computed, using W´ and SD (W´)|θ=0.5= SD (W)|θ=0.5.

Related Topics

ROC Algorithms
Notation and Definitions (ROC curve algorithms)
Construction of the ROC Curve (ROC curve algorithms)
The Area Under the ROC Curve (ROC curve algorithms)
SE of the area under the ROC curve statistic, nonparametric assumption (ROC curve algorithms)
The asymptotic confidence interval of the area under the ROC curve (ROC curve algorithms)
References (ROC curve algorithms)


References (ROC curve algorithms)

ROC curve algorithms,ROC curve algorithms,ROC curve algorithms
references,references,references

Bamber, D. 1975. The area above the ordinal dominance graph and the area below the receiver operating graph. Journal of Mathematical Psychology, 12, 387-415.

Beck, R. J., and E. Shultz. 1986. The use of relative operating characteristic (ROC) curves in test performance evaluation. Arch. Pathol. Lab. Med., 110, 13-20.

Centor, R. M., and J. S. Schwartz. 1985. An evaluation of methods for estimating the area under the receiver operating statistic (ROC) curve. Med. Decis. Making, 5, 149-156.

Dorfman, D. D., and E. J. Alf. 1968. Maximum likelihood estimation of parameters of signal detection theory—A direct solution. Psychometrika, 33, 117-124.

Dorfman, D. D., and E. J. Alf. 1969. Maximum likelihood estimation of parameters of signal-detection theory and determination of confidence intervals—Rating-method data. Journal of Mathematical Psychology, 6, 487-496.

Green, D., and J. Swets. 1966. Signal Detection Theory and Psychophysics. New York: John Wiley & Sons.

Griner, P. F., R. J. Mayewski, A. I. Mushlin, and P. Greenland. 1981. Selection and interpretation of diagnostic tests and procedures: Principles in applications. Annals of Internal Medicine, 94, 553-600.

Hanley, J. A., and B. J. McNeil. 1982. The Meaning and Use of the Area Under a Receiver Operating Characteristic (ROC) Curve. Radiology, 143:1, 29-36.

Hanley, J. A., and B. J. McNeil. 1983. A method of comparing the areas under receiver operating characteristic curves derived from the same cases. Radiology, 148, 839-843.

Metz, C. E. 1978. Basic principles of ROC analysis. Seminars in Nuclear Medicine, 8, 283-298.

Metz, C. E. 1993. ROC Software Package. : .

Metz, C. E., and H. B. Kronman. 1980. Statistical significance tests for binormal ROC curves. Journal of Mathematical Psychology, 22, 218-243.

Schoonjans, F. 1993–1998. MedCalc Version 4.20.011. : .

Woods, K., and K. W. Bowyer. 1997. Generating ROC curves for artificial neural networks. IEEE Transactions on Medical Imaging, 16, 329-337.

Zweig, M. H., and G. Campbell. 1993. Receiver Operating Characteristic (ROC) Plots: A Fundamental Evaluation Tool in Clinical Medicine. Clinical Chemistry, 39:4, 561-577.

Related Topics

ROC Algorithms
Notation and Definitions (ROC curve algorithms)
Construction of the ROC Curve (ROC curve algorithms)
The Area Under the ROC Curve (ROC curve algorithms)
SE of the area under the ROC curve statistic, nonparametric assumption (ROC curve algorithms)
The asymptotic confidence interval of the area under the ROC curve (ROC curve algorithms)
Asymptotic P-value (ROC curve algorithms)


SAMPLE Algorithms

SAMPLE (command),SAMPLE (command),SAMPLE (command)
algorithms,algorithms,algorithms
SAMPLE algorithms,SAMPLE algorithms,SAMPLE algorithms
selection of random samples,selection of random samples,selection of random samples

SAMPLE permanently draws a random sample of cases for processing in all subsequent procedures.

Related Topics

Selection of a Proportion p
Selection of a Sample
Selection of Cases in Nonparametric Procedures


Selection of a Proportion p

SAMPLE algorithms,SAMPLE algorithms,SAMPLE algorithms
selection of a proportion p,selection of a proportion p,selection of a proportion p

For each case, a random uniform number in the range 0 to 1 is generated. If it is less than p, the case is included in the sample.

Related Topics

SAMPLE Algorithms
Selection of a Sample
Selection of Cases in Nonparametric Procedures


Selection of a Sample

SAMPLE algorithms,SAMPLE algorithms,SAMPLE algorithms
selection of a sample of ni cases out of a total of n,selection of a sample of ni cases out of a total of n,selection of a sample of ni cases out of a total of n

(a)
p=n1n
n=n−1

Select a case if its uniform (0,1) number is less than p. If selected, n1=n1−1, and return to (a).

Related Topics

SAMPLE Algorithms
Selection of a Proportion p
Selection of Cases in Nonparametric Procedures


Selection of Cases in Nonparametric Procedures

SAMPLE algorithms,SAMPLE algorithms,SAMPLE algorithms
selection of cases in nonparametric procedures,selection of cases in nonparametric procedures,selection of cases in nonparametric procedures

The sampling procedure is as follows:

Each time a case is encountered after the limit imposed by the size of the workspace has been reached, the program decides whether to include it in the sample or not at random. The probability that the new cases will enter the sample is equal to the number of cases that can be held in the workspace divided by the number of cases so far encountered.

If the program decides to accept a case, it then picks at random one of the cases previously stored in the workspace and drops it from the analysis, replacing it with the new case. Each case has the same probability of being in the sample.

If case weighting is used, the nonparametric procedures can use a case more than once. For example, if the weight of a case is 2.3, the program will use that case twice, and may choose at random, with a probability of 0.3, to use it a third time. If sampling is in effect, each of these two or three cases is a candidate for sampling.

Related Topics

SAMPLE Algorithms
Selection of a Proportion p
Selection of a Sample


SEASON Algorithms

SEASON (command),SEASON (command),SEASON (command)
algorithms,algorithms,algorithms
SEASON algorithms,SEASON algorithms,SEASON algorithms

Based on the multiplicative or additive model, the SEASON procedure decomposes the existing series into three components: trend-cycle, seasonal, and irregular.

Related Topics

Model (SEASON algorithms)
Moving Average Series (SEASON algorithms)
Ratios or Differences (Seasonal-Irregular Component) (SEASON algorithms)
Seasonal Factors (Seasonal Components) (SEASON algorithms)
Seasonally Adjusted Series (SAS) (SEASON algorithms)
Smoothed Trend-Cycle Series (SEASON algorithms)
Irregular Component (SEASON algorithms)
References (SEASON algorithms)


Model (SEASON algorithms)

SEASON algorithms,SEASON algorithms,SEASON algorithms
model,model,model

Multiplicative Model

Xt=TCtStIt, t=1,...,n

Additive Model

Xt=TCt+St+It, t=1,...,n

where TCt is the “trend-cycle” component, St is the “seasonal” component, and It is the “irregular” or “random” component.

The procedure for estimating the seasonal component is:

(1) | Smooth the series by the moving average method; the moving average series reflects the trend-cycle component.
(2) | Obtain the seasonal-irregular component by dividing the original series by the smoothed values if the model is multiplicative, or by subtracting the smoothed values from the original series if the model is additive.
(3) | Isolate the seasonal component from the seasonal-irregular component by computing the medial average (average) of the specific seasonal relatives for each unit of periods if the model is multiplicative (additive).

Related Topics

SEASON Algorithms
Moving Average Series (SEASON algorithms)
Ratios or Differences (Seasonal-Irregular Component) (SEASON algorithms)
Seasonal Factors (Seasonal Components) (SEASON algorithms)
Seasonally Adjusted Series (SAS) (SEASON algorithms)
Smoothed Trend-Cycle Series (SEASON algorithms)
Irregular Component (SEASON algorithms)
References (SEASON algorithms)


Moving Average Series (SEASON algorithms)

SEASON algorithms,SEASON algorithms,SEASON algorithms
moving average series,moving average series,moving average series

Based on the specified method and period p, the moving average series Zt for Xt is defined as follows:

p is even, weight all points equally

Zt={
t+p2−1Σj=t−p2Xj/p | t=p2+1, ..., n−p2+1
SYSMIS | otherwise

p is even, weights unequal

Zt={
(Xt−p2+Xt+p2)/2p+(t+p2−1Σj=t−p2+1Xj)/p, | t=p2+1, ..., n−p2
SYSMIS | otherwise

p is odd

Zt={
(t+[p2]Σj=t−[p2]Xj)/p, | t=[p2]+1,...,n−[p2]
SYSMIS | otherwise

Related Topics

SEASON Algorithms
Model (SEASON algorithms)
Ratios or Differences (Seasonal-Irregular Component) (SEASON algorithms)
Seasonal Factors (Seasonal Components) (SEASON algorithms)
Seasonally Adjusted Series (SAS) (SEASON algorithms)
Smoothed Trend-Cycle Series (SEASON algorithms)
Irregular Component (SEASON algorithms)
References (SEASON algorithms)


Ratios or Differences (Seasonal-Irregular Component) (SEASON algorithms)

SEASON algorithms,SEASON algorithms,SEASON algorithms
ratios or differences,ratios or differences,ratios or differences
seasonal-irregular component,seasonal-irregular component,seasonal-irregular component

Multiplicative Model

SIt={
SYSMIS, | if Zt= SYSMIS
(Xt/Zt)×100, | otherwise

Additive Model

SIt={
SYSMIS, | if Zt= SYSMIS
Xt−Zt, | otherwise

Related Topics

SEASON Algorithms
Model (SEASON algorithms)
Moving Average Series (SEASON algorithms)
Seasonal Factors (Seasonal Components) (SEASON algorithms)
Seasonally Adjusted Series (SAS) (SEASON algorithms)
Smoothed Trend-Cycle Series (SEASON algorithms)
Irregular Component (SEASON algorithms)
References (SEASON algorithms)


Seasonal Factors (Seasonal Components) (SEASON algorithms)

SEASON algorithms,SEASON algorithms,SEASON algorithms
seasonal factors,seasonal factors,seasonal factors
seasonal components,seasonal components,seasonal components

Multiplicative Model

Ft={
medial average (SIt+p, SIt+2p, ..., SIt+qp), | 1≤t≤L−[Lp]p
medial average (SIt+p, SIt+2p, ..., SIt+(q−1)p), | L−[Lp]p<t≤[p2]
medial average (SIt, SIt+p, ..., SIt+(q−1)p), | [p2]<t≤p

where

L=n−p2+1, | q=[Lp], | if p is even and all points are weighted equally
L=n−[p2], | q=[(n−p/2)/p], | otherwise

and the medial average of a series is the mean value of the series after the smallest and the largest values are excluded. The seasonal factor is defined as

SAFt=Ft100ppΣt=1Ft, t=1, ..., p

Additive Model

Ft is defined as the arithmetic average of the series shown above. Then

SAFt=Ft−F,

where

F=pΣt=1Ft/p

Related Topics

SEASON Algorithms
Model (SEASON algorithms)
Moving Average Series (SEASON algorithms)
Ratios or Differences (Seasonal-Irregular Component) (SEASON algorithms)
Seasonally Adjusted Series (SAS) (SEASON algorithms)
Smoothed Trend-Cycle Series (SEASON algorithms)
Irregular Component (SEASON algorithms)
References (SEASON algorithms)


Seasonally Adjusted Series (SAS) (SEASON algorithms)

SEASON algorithms,SEASON algorithms,SEASON algorithms
seasonally adjusted series,seasonally adjusted series,seasonally adjusted series
SAS,SAS,SAS
SASt={
(Xt/SAFm)100, | if model is multiplicative
Xt−SAFm, | if model is additive

where

m=t−[t/p]p

Related Topics

SEASON Algorithms
Model (SEASON algorithms)
Moving Average Series (SEASON algorithms)
Ratios or Differences (Seasonal-Irregular Component) (SEASON algorithms)
Seasonal Factors (Seasonal Components) (SEASON algorithms)
Smoothed Trend-Cycle Series (SEASON algorithms)
Irregular Component (SEASON algorithms)
References (SEASON algorithms)


Smoothed Trend-Cycle Series (SEASON algorithms)

SEASON algorithms,SEASON algorithms,SEASON algorithms
smoothed trend-cycle series,smoothed trend-cycle series,smoothed trend-cycle series

The smoothed trend-cycle series (STC) is obtained by applying a 3×3 moving average on seasonally adjusted series (SAS). Thus,

STCt=19[(SAS)t−2+2(SAS)t−1+3(SAS)t+2(SAS)t+1+(SAS)t+2],
t=2, ..., n−2

and for the two end points on the beginning and end of the series

(STC)2=13[(SAS)1+(SAS)2+(SAS)3]
(STC)n−1=13[(SAS)n−2+(SAS)n−1+(SAS)n]

(STC)1=(STC)2+12[(STC)2−(STC)3]
(STC)n=(STC)n-1+12[(STC)n−1−(STC)n−2]

Related Topics

SEASON Algorithms
Model (SEASON algorithms)
Moving Average Series (SEASON algorithms)
Ratios or Differences (Seasonal-Irregular Component) (SEASON algorithms)
Seasonal Factors (Seasonal Components) (SEASON algorithms)
Seasonally Adjusted Series (SAS) (SEASON algorithms)
Irregular Component (SEASON algorithms)
References (SEASON algorithms)


Irregular Component (SEASON algorithms)

SEASON algorithms,SEASON algorithms,SEASON algorithms
irregular component,irregular component,irregular component

For t=1, ..., n

It={
(SAS)t/(STC)t, | if model is multiplicative
(SAS)t−(STC)t, | if model is additive

Related Topics

SEASON Algorithms
Model (SEASON algorithms)
Moving Average Series (SEASON algorithms)
Ratios or Differences (Seasonal-Irregular Component) (SEASON algorithms)
Seasonal Factors (Seasonal Components) (SEASON algorithms)
Seasonally Adjusted Series (SAS) (SEASON algorithms)
Smoothed Trend-Cycle Series (SEASON algorithms)
References (SEASON algorithms)


References (SEASON algorithms)

SEASON algorithms,SEASON algorithms,SEASON algorithms
references,references,references

Makridakis, S., S. C. Wheelwright, and V. E. McGee. 1983. Forecasting: Methods and applications. New York: John Wiley and Sons.

Related Topics

SEASON Algorithms
Model (SEASON algorithms)
Moving Average Series (SEASON algorithms)
Ratios or Differences (Seasonal-Irregular Component) (SEASON algorithms)
Seasonal Factors (Seasonal Components) (SEASON algorithms)
Seasonally Adjusted Series (SAS) (SEASON algorithms)
Smoothed Trend-Cycle Series (SEASON algorithms)
Irregular Component (SEASON algorithms)


SELECTPRED

SELECTPRED (command),SELECTPRED (command),SELECTPRED (command)
algorithms,algorithms,algorithms
predictor selection algorithms,predictor selection algorithms,predictor selection algorithms

Data mining problems often involve hundreds, or even thousands, of variables. As a result, the majority of time and effort spent in the model-building process involves examining which variables to include in the model. Fitting a computationally intensive model to a set of variables this large may require more time than is practical.

Predictor selection allows the variable set to be reduced in size, creating a more manageable set of attributes for modeling. Adding predictor selection to the analytical process has several benefits:

• Simplifies and narrows the scope of the variables essential to building a predictive model.

• Minimizes the computational time and memory requirements for building a predictive model because focus can be directed to a subset of predictors.

• Leads to more accurate and/or more parsimonious models.

• Reduces the time for generating scores because the predictive model is based upon only a subset of predictors.

Related Topics

Screening (predictor selection algorithms)
Ranking Predictors (predictor selection algorithms)
Selecting Predictors (predictor selection algorithms)


Screening (predictor selection algorithms)

predictor selection algorithms,predictor selection algorithms,predictor selection algorithms
screening,screening,screening

This step removes variables and cases that do not provide useful information for prediction and issues warnings about variables that may not be useful.

The following variables are removed:

• Variables that have all missing values.

• Variables that have all constant values.

• Variables that represent case ID.

The following cases are removed:

• Cases that have missing target values.

• Cases that have missing values in all its predictors.

The following variables are removed based on user settings:

• Variables that have more than m1% missing values.

• Categorical variables that have a single category counting for more than m2% cases.

• Continuous variables that have standard deviation < m3%.

• Continuous variables that have a coefficient of variation |CV| < m4%. CV = standard deviation / mean.

• Categorical variables that have a number of categories greater than m5% of the cases.

Values m1, m2, m3, m4, and m5 are user-controlled parameters.

Related Topics

SELECTPRED
Ranking Predictors (predictor selection algorithms)
Selecting Predictors (predictor selection algorithms)


Ranking Predictors (predictor selection algorithms)

predictor selection algorithms,predictor selection algorithms,predictor selection algorithms
ranking predictors,ranking predictors,ranking predictors

This step considers one predictor at a time to see how well each predictor alone predicts the target variable. The predictors are ranked according to a user-specified criterion. Available criteria depend on the measurement levels of the target and predictor.

Related Topics

SELECTPRED
Screening (predictor selection algorithms)
Selecting Predictors (predictor selection algorithms)
Categorical Target (predictor selection algorithms)
All Categorical Predictors (predictor selection algorithms)
All Continuous Predictors (predictor selection algorithms)
Mixed Type Predictors (predictor selection algorithms)
Continuous Target (predictor selection algorithms)
All Categorical Predictors (predictor selection algorithms)
All Continuous Predictors (predictor selection algorithms)
Mixed Type Predictors (predictor selection algorithms)


Categorical Target (predictor selection algorithms)

This section describes ranking of predictors for a categorical target under the following scenarios:

• All predictors categorical

• All predictors continuous

• Some predictors categorical, some continuous

Related Topics

Ranking Predictors (predictor selection algorithms)
All Categorical Predictors (predictor selection algorithms)
All Continuous Predictors (predictor selection algorithms)
Mixed Type Predictors (predictor selection algorithms)
Continuous Target (predictor selection algorithms)
All Categorical Predictors (predictor selection algorithms)
All Continuous Predictors (predictor selection algorithms)
Mixed Type Predictors (predictor selection algorithms)


All Categorical Predictors (predictor selection algorithms)

The following notation applies:

X | The predictor under consideration with I categories.
Y | Target variable with J categories.
N | Total number of cases.
Nij | The number of cases with X = i and Y = j.
Ni· | The number of cases with X = i. Ni·=JΣj=1Nij
N·j | The number of cases with Y = j. N·j=IΣi=1Nij

The above notations are based on nonmissing pairs of (X, Y). Hence J, N, and N·j may be different for different predictors.

P Value Based on Pearson's Chi-square

Pearson’s chi-square is a test of independence between X and Y that involves the difference between the observed and expected frequencies. The expected cell frequencies under the null hypothesis of independence are estimated by
^
N
ij=Ni·N·j/N. Under the null hypothesis, Pearson’s chi-square converges asymptotically to a chi-square distribution χ2d with degrees of freedom d = (I−1)(J−1).

The p value based on Pearson's chi-square X2 is calculated by p value = Prob(χ2d > X2), where

X2=IΣi=1JΣj=1(Nij−
^
N
ij)2/
^
N
ij.

Predictors are ranked by the following rules.

1. Sort the predictors by p value in the ascending order

2. If ties occur, sort by chi-square in descending order.

3. If ties still occur, sort by degree of freedom d in ascending order.

4. If ties still occur, sort by the data file order.

P Value Based on Likelihood Ratio Chi-square

The likelihood ratio chi-square is a test of independence between X and Y that involves the ratio between the observed and expected frequencies. The expected cell frequencies under the null hypothesis of independence are estimated by
^
N
ij=Ni·N·j/N. Under the null hypothesis, the likelihood ratio chi-square converges asymptotically to a chi-square distribution χ2d with degrees of freedom d = (I−1)(J−1).

The p value based on likelihood ratio chi-square G2 is calculated by p value = Prob(χ2d> G2), where

G2=2IΣi=1JΣj=1G2ij, with G2ij={
Nijln(Nij/
^
N
ij) 		Nij>0,
0 else.

Predictors are ranked according to the same rules as those for the p value based on Pearson's chi-square.

Cramer’s V

Cramer’s V is a measure of association, between 0 and 1, based upon Pearson’s chi-square. It is defined as

V=(X2N(min{I,J}−1))1/2.

Predictors are ranked by the following rules:

1. Sort predictors by Cramer’s V in descending order.

2. If ties occur, sort by chi-square in descending order.

3. If ties still occur, sort by data file order.

Lambda

Lambda is a measure of association that reflects the proportional reduction in error when values of the independent variable are used to predict values of the dependent variable. A value of 1 means that the independent variable perfectly predicts the dependent variable. A value of 0 means that the independent variable is no help in predicting the dependent variable. It is computed as

λ(Y|X)=Σi
max
j
(Nij)−
max
j
(N·j)N−
max
j
(N·j).

Predictors are ranked by the following rules:

1. Sort predictors by lambda in descending order.

2. If ties occur, sort by I in ascending order.

3. If ties still occur, sort by data file order.

Related Topics

Ranking Predictors (predictor selection algorithms)
Categorical Target (predictor selection algorithms)
All Continuous Predictors (predictor selection algorithms)
Mixed Type Predictors (predictor selection algorithms)
Continuous Target (predictor selection algorithms)
All Categorical Predictors (predictor selection algorithms)
All Continuous Predictors (predictor selection algorithms)
Mixed Type Predictors (predictor selection algorithms)


All Continuous Predictors (predictor selection algorithms)

If all predictors are continuous, p values based on the F statistic are used. The idea is to perform a one-way ANOVA F test for each continuous predictor; this tests if all the different classes of Y have the same mean as X.

The following notation applies:

Nj | The number of cases with Y = j.
xj | The sample mean of predictor X for target class Y = j.
s2j | The sample variance of predictor X for target class Y = j. s2j=NjΣi=1(xij−xj)2/(Nj−1)
x | The grand mean of predictor X. x=JΣj=1Njxj/N

The above notations are based on nonmissing pairs of (X, Y).

P Value Based on the F Statistic

The p value based on the F statistic is calculated by p value = Prob{F(J−1, N−J) > F}, where

F=JΣj=1Nj(xj−x)2/(J−1)JΣj=1(Nj−1)s2j/(N−J),

and F(J−1, N−J) is a random variable that follows an F distribution with degrees of freedom J−1 and N−J. If the denominator for a predictor is zero, set the p value = 0 for the predictor.

Predictors are ranked by the following rules:

1. Sort predictors by p value in ascending order.

2. If ties occur, sort by F in descending order.

3. If ties still occur, sort by N in descending order.

4. If ties still occur, sort by the data file order.

Related Topics

Ranking Predictors (predictor selection algorithms)
Categorical Target (predictor selection algorithms)
All Categorical Predictors (predictor selection algorithms)
Mixed Type Predictors (predictor selection algorithms)
Continuous Target (predictor selection algorithms)
All Categorical Predictors (predictor selection algorithms)
All Continuous Predictors (predictor selection algorithms)
Mixed Type Predictors (predictor selection algorithms)


Mixed Type Predictors (predictor selection algorithms)

If some predictors are continuous and some are categorical, the criterion for continuous predictors is still the p value based on the F statistic, while the available criteria for categorical predictors are restricted to the p value based on Pearson’s chi-square or the p value based on the likelihood ratio chi-square. These p values are comparable and therefore can be used to rank the predictors.

Predictors are ranked by the following rules:

1. Sort predictors by p value in ascending order.

2. If ties occur, follow the rules for breaking ties among all categorical and all continuous predictors separately, then sort these two groups (categorical predictor group and continuous predictor group) by the data file order of their first predictors.

Related Topics

Ranking Predictors (predictor selection algorithms)
Categorical Target (predictor selection algorithms)
All Categorical Predictors (predictor selection algorithms)
All Continuous Predictors (predictor selection algorithms)
Continuous Target (predictor selection algorithms)
All Categorical Predictors (predictor selection algorithms)
All Continuous Predictors (predictor selection algorithms)
Mixed Type Predictors (predictor selection algorithms)


Continuous Target (predictor selection algorithms)

This section describes ranking of predictors for a continuous target under the following scenarios:

• All predictors categorical

• All predictors continuous

• Some predictors categorical, some continuous

Related Topics

Ranking Predictors (predictor selection algorithms)
Categorical Target (predictor selection algorithms)
All Categorical Predictors (predictor selection algorithms)
All Continuous Predictors (predictor selection algorithms)
Mixed Type Predictors (predictor selection algorithms)
All Categorical Predictors (predictor selection algorithms)
All Continuous Predictors (predictor selection algorithms)
Mixed Type Predictors (predictor selection algorithms)


All Categorical Predictors (predictor selection algorithms)

If all predictors are categorical and the target is continuous, p values based on the F statistic are used. The idea is to perform a one-way ANOVA F test for the continuous target using each categorical predictor as a factor; this tests if all different classes of X have the same mean as Y.

The following notation applies:

X | The categorical predictor under consideration with I categories.
Y | The continuous target variable. yij represents the value of the continuous target for the jth case with X = i.
Ni | The number of cases with X = i.
yi | The sample mean of target Y in predictor category X = i.
s(y)2i | The sample variance of target Y for predictor category X = i. s(y)i2=NiΣj=1(yij−yi)2/(Ni−1)
y | The grand mean of target Y. y=ΣIi=1Niyi/N

The above notations are based on nonmissing pairs of (X, Y).

The p value based on the F statistic is p value = Prob{F(I−1, N−I) > F}, where

F=IΣi=1Ni(yi−y)2/(I−1)IΣi=1(Ni−1)s(y)2i/(N−I),

in which F(I−1, N−I) is a random variable that follows a F distribution with degrees of freedom I−1 and N−I. When the denominator of the above formula is zero for a given categorical predictor X, set the p value = 0 for that predictor.

Predictors are ranked by the following rules:

1. Sort predictors by p value in ascending order.

2. If ties occur, sort by F in descending order.

3. If ties still occur, sort by N in descending order.

4. If ties still occur, sort by the data file order.

Related Topics

Ranking Predictors (predictor selection algorithms)
Categorical Target (predictor selection algorithms)
All Categorical Predictors (predictor selection algorithms)
All Continuous Predictors (predictor selection algorithms)
Mixed Type Predictors (predictor selection algorithms)
Continuous Target (predictor selection algorithms)
All Continuous Predictors (predictor selection algorithms)
Mixed Type Predictors (predictor selection algorithms)


All Continuous Predictors (predictor selection algorithms)

If all predictors are continuous and the target is continuous, the p value is based on the asymptotic t distribution of a transformation t on the Pearson correlation coefficient r.

The following notation applies:

X | The continuous predictor under consideration.
Y | The continuous target variable.
x=ΣNi=1xi/N | The sample mean of predictor variable X.
y=ΣNi=1yi/N | The sample mean of target Y.
s(x)2 | The sample variance of predictor variable X.
s(y)2 | The sample variance of target variable Y.

The above notations are based on nonmissing pairs of (X, Y).

The Pearson correlation coefficient r is

r=ΣNi=1(xi−x)(yi−y)/(N−1)
√ s(x)2s(y)2
.

The transformation t on r is given by

t=r
√ N−21−r2
.

Under the null hypothesis that the population Pearson correlation coefficient r = 0, the p value is calculated as

p value={
0 | if r2=1,
2 Prob {T>|t|} | else.

T is a random variable that follows a t distribution with N−2 degrees of freedom. The p value based on the Pearson correlation coefficient is a test of a linear relationship between X and Y. If there is some nonlinear relationship between X and Y, the test may fail to catch it.

Predictors are ranked by the following rules:

1. Sort predictors by p value in ascending order.

2. If ties occur in, sort by r2 in descending order.

3. If ties still occur, sort by N in descending order.

4. If ties still occur, sort by the data file order.

Related Topics

Ranking Predictors (predictor selection algorithms)
Categorical Target (predictor selection algorithms)
All Categorical Predictors (predictor selection algorithms)
All Continuous Predictors (predictor selection algorithms)
Mixed Type Predictors (predictor selection algorithms)
Continuous Target (predictor selection algorithms)
All Categorical Predictors (predictor selection algorithms)
Mixed Type Predictors (predictor selection algorithms)


Mixed Type Predictors (predictor selection algorithms)

If some predictors are continuous and some are categorical in the dataset, the criterion for continuous predictors is still based on the p value from a transformation and that for categorical predictors from the F statistic.

Predictors are ranked by the following rules:

1. Sort predictors by p value in ascending order.

2. If ties occur, follow the rules for breaking ties among all categorical and all continuous predictors separately, then sort these two groups (categorical predictor group and continuous predictor group) by the data file order of their first predictors.

Related Topics

Ranking Predictors (predictor selection algorithms)
Categorical Target (predictor selection algorithms)
All Categorical Predictors (predictor selection algorithms)
All Continuous Predictors (predictor selection algorithms)
Mixed Type Predictors (predictor selection algorithms)
Continuous Target (predictor selection algorithms)
All Categorical Predictors (predictor selection algorithms)
All Continuous Predictors (predictor selection algorithms)


Selecting Predictors (predictor selection algorithms)

If the length of the predictor list has not been prespecified, the following formula provides an automatic approach to determine the length of the list.

Let L0 be the total number of predictors under study. The length of the list L may be determined by

L=[min(max(30, 2
√ L0
), L0)],

where [x] is the closest integer of x. The following table illustrates the length L of the list for different values of the total number of predictors L0.

L0 | L | L/L0(%)
10 | 10 | 100.00%
15 | 15 | 100.00%
20 | 20 | 100.00%
25 | 25 | 100.00%
30 | 30 | 100.00%
40 | 30 | 75.00%
50 | 30 | 60.00%
60 | 30 | 50.00%
100 | 30 | 30.00%
500 | 45 | 9.00%
1000 | 63 | 6.30%
1500 | 77 | 5.13%
2000 | 89 | 4.45%
5000 | 141 | 2.82%
10,000 | 200 | 2.00%
20,000 | 283 | 1.42%
50,000 | 447 | 0.89%

Related Topics

SELECTPRED
Screening (predictor selection algorithms)
Ranking Predictors (predictor selection algorithms)


SPCHART Algorithms

SPCHART (command),SPCHART (command),SPCHART (command)
algorithms,algorithms,algorithms
Control charts,Control charts,Control charts
algorithms,algorithms,algorithms
control charts algorithms,control charts algorithms,control charts algorithms

Nine types of Shewhart control charts can be created. In this chapter, the charts are grouped into five sections:

• X-Bar and R Charts

• X-Bar and s Charts

• Individual and Moving Range Charts

• p and np Charts

• u and c Charts

For each type of control chart, the process, the center line, and the control limits (upper and lower) are described.

Related Topics

Notation (control chart algorithms)
Weight (control chart algorithms)
X-Bar and R Charts (control chart algorithms)
X-Bar and s Charts (control chart algorithms)
Individual and Moving Range Charts (control chart algorithms)
p and np Charts (control chart algorithms)
u and c Charts (control chart algorithms)
Statistics (control chart algorithms)
References (control chart algorithms)


Notation (control chart algorithms)

The following notation is used throughout this chapter unless otherwise stated:

σ | Population standard deviation for measurements X
A | Number of sigmas specified by the user, 0≤A≤9
K | Number of subgroups
ni | Number of units (samples) for subgroup i
N | Total sample size, equal to n1+...+nK
xij | Measurement (observation) for the jth unit (sample) of subgroup i
xi | Mean of measurements for subgroup i, xi=(niΣi=1xij)/ni
Si | Sample standard deviation for subgroup i, S2i=(niΣi=1(xij−xi)2)/(ni−1)
Ri | Sample range for subgroup i, Ri=max(xi1,...,xini)−min(xi1,...,xini)
LCL | Lower Control Limit
UCL | Upper Control Limit

Related Topics

SPCHART Algorithms
Weight (control chart algorithms)
X-Bar and R Charts (control chart algorithms)
X-Bar and s Charts (control chart algorithms)
Individual and Moving Range Charts (control chart algorithms)
p and np Charts (control chart algorithms)
u and c Charts (control chart algorithms)
Statistics (control chart algorithms)
References (control chart algorithms)


Weight (control chart algorithms)

control charts algorithms,control charts algorithms,control charts algorithms
weights,weights,weights

Weights can be used when the data organization is Cases are units.

• Each value for weight must be a positive integer.

• Cases with either non-positive or fractional weights are dropped.

• When weight is in effect, ni is a weighted sum for all the units in subgroup i and xi and x are weighted means.

Related Topics

SPCHART Algorithms
Notation (control chart algorithms)
X-Bar and R Charts (control chart algorithms)
X-Bar and s Charts (control chart algorithms)
Individual and Moving Range Charts (control chart algorithms)
p and np Charts (control chart algorithms)
u and c Charts (control chart algorithms)
Statistics (control chart algorithms)
References (control chart algorithms)


X-Bar and R Charts (control chart algorithms)

control charts algorithms,control charts algorithms,control charts algorithms
X-bar charts,X-bar charts,X-bar charts
control charts algorithms,control charts algorithms,control charts algorithms
R charts,R charts,R charts

When X-Bar and R charts are paired, the sample range statistic R is used to construct the control limits for the X-Bar chart.

Note: Subgroups whose sample sizes are less than the specified minimum value are dropped.

Related Topics

SPCHART Algorithms
Notation (control chart algorithms)
Weight (control chart algorithms)
X-Bar and s Charts (control chart algorithms)
Individual and Moving Range Charts (control chart algorithms)
p and np Charts (control chart algorithms)
u and c Charts (control chart algorithms)
Statistics (control chart algorithms)
References (control chart algorithms)
Equal Sample Sizes (control chart algorithms)
Unequal Sample Sizes (control chart algorithms)


Equal Sample Sizes (control chart algorithms)

Assume that ni=n for i=1,...,K . The process for the X-Bar chart is {xi:i=1,...,K}. The center line for an X-Bar chart is the grand mean statistic:

x=1KKΣi=1xi

and the control limits are

LCL =x−AR/(d2(n)
√ n
)
UCL =x+AR/(d2(n)
√ n
)

where

R=1KKΣi=1Ri

is the mean range statistic. The process for an R chart is {Ri: i=1,...,K}. The center line for an R chart is R and the control limits are

LCL =max(R(1−Ad3(n)/d2(n)), 0)
UCL =R(1+Ad3(n)/d2(n))

The auxiliary functions are

d2(n)=∫∞−∞(1−(1−Φ(x))n−(Φ(x))n) dx

d3(n)=(2∫∞−∞∫x−∞(1−(Φ(x))n−(1−Φ(y))n+(Φ(x)−Φ(y))n) dydx−(d2(n))2)12

Φ(z)=∫x−∞1
√ 2π
e−u2/2du

Related Topics

X-Bar and R Charts (control chart algorithms)
Unequal Sample Sizes (control chart algorithms)


Unequal Sample Sizes (control chart algorithms)

The processes for X-Bar and R charts are the same as described in the section “Equal Sample Sizes” above. The center line for an X-Bar chart is the grand mean statistic (numerically identical to that in the section “Equal Sample Sizes”):

x=1NKΣi=1nixi

and the control limits for subgroup i are

LCL =x−A
^
σ
/
√ ni
UCL =x+A
^
σ
/
√ ni

The center line for an R chart for subgroup i is Ri=
^
σ
d2(ni) for i=1,...,K where

^
σ
=1KKΣi=1(Ri/d2(ni))

and the control limits for subgroup i are

LCL =max(Ri−A
^
σ
d3(ni),0)
UCL =Ri+A
^
σ
d3(ni)

Related Topics

X-Bar and R Charts (control chart algorithms)
Equal Sample Sizes (control chart algorithms)


X-Bar and s Charts (control chart algorithms)

control charts algorithms,control charts algorithms,control charts algorithms
X-bar charts,X-bar charts,X-bar charts
control charts algorithms,control charts algorithms,control charts algorithms
s charts,s charts,s charts

When X-Bar and s charts are paired, the sample sandard deviation is used to construct the control limits for the X-Bar chart.

Related Topics

SPCHART Algorithms
Notation (control chart algorithms)
Weight (control chart algorithms)
X-Bar and R Charts (control chart algorithms)
Individual and Moving Range Charts (control chart algorithms)
p and np Charts (control chart algorithms)
u and c Charts (control chart algorithms)
Statistics (control chart algorithms)
References (control chart algorithms)
Equal Sample Sizes (control chart algorithms)
Unequal Sample Sizes (control chart algorithms)


Equal Sample Sizes (control chart algorithms)

Assume ni=n. The process for the X-Bar chart is {xi:i=1,...,K}. The center line for an X-Bar chart is x and the control limits are

LCL =x−AS/(c4(n)
√ n
)
UCL =x+AS/(c4(n)
√ n
)

The process for an s chart is {Si:i=1,...,K}. The center line for an s chart is

S=1KKΣi=1Si

and the control limits are

LCL =max(S(1−A
√ (1−(c4(n))2)
/c4(n)), 0)
UCL =S(1+A
√ (1−(c4(n))2)
/c4(n))

The auxiliary function is

c4(n)=
√ 2n−1
Γ(n/2)Γ((n−1)/2)

where Γ(.) is the complete Gamma function.

Note: When n≥25, c4(n)
√ n
can be approximated by
√ n−0.5
,
√ (1−(c4(n))2)
/c4(n) can be approximated by 1/
√ 2n−2.5
, and c4(n) can be approximated by
√ (4n−5)/(4n−3)
.

Related Topics

X-Bar and s Charts (control chart algorithms)
Unequal Sample Sizes (control chart algorithms)


Unequal Sample Sizes (control chart algorithms)

The processes for X-Bar and s charts are the same as the processes in the section “Equal Sample Sizes” above. The center line for an X-Bar chart is x and the control limits are

LCL =x−A
^
σ
/
√ ni
UCL =x+A
^
σ
/
√ ni

or

LCL =x−ASi/(c4(ni)
√ ni
)
UCL =x+ASi/(c4(ni)
√ ni
)

where

^
σ
=1KKΣi=1Si/c4(ni)

However, the center line for an s chart for subgroup i is Si=
^
σ
c4(ni) for i=1,...,K and the control limits are

LCL =max(Si−A
^
σ
√ (1−(c4(ni))2)
, 0)
UCL =Si+A
^
σ
√ (1−(c4(ni))2)

or

LCL =max(Si−ASi
√ (1−(c4(ni))2)
/c4(ni), 0)
UCL =Si+ASi
√ (1−(c4(ni))2)
/c4(ni)

Related Topics

X-Bar and s Charts (control chart algorithms)
Equal Sample Sizes (control chart algorithms)


Individual and Moving Range Charts (control chart algorithms)

control charts algorithms,control charts algorithms,control charts algorithms
individual charts,individual charts,individual charts
control charts algorithms,control charts algorithms,control charts algorithms
moving range charts,moving range charts,moving range charts

When a weight variable is specified, each unit of the process is expanded to multiple units based on the case weight associated with this particular unit. The span (specified by the user) is associated with the expanded process. If the span is greater than N (the total number of units of the expanded process), an error message is displayed and neither an Individual nor a Moving Range chart is generated.

Since each subgroup has only one unit, the process for an Individual chart is {yi:i=1,...,N} where yi is the ith unit of the expanded process. For a span of length m, the moving ranges, are

Ri={
max(yi−m+1,...,yi)−min(yi−m+1,...,yi) | if i=m,...,N
SYSMIS | if i=1,...,m−1

The average moving range is

R=1(N−m+1)NΣmRi

The center line for an Individual chart is x and the control limits for an Individual chart are

LCL =x−AR/d2(m)
UCL =x+AR/d2(m)

The process for a moving range chart is {Ri, i = m,..., N}. The center line for a moving range chart is R. The control limits for a moving range chart are

LCL =max(R(1−Ad3(m)/d2(m)), 0)
UCL =R(1+Ad3(m)/d2(m))

Related Topics

SPCHART Algorithms
Notation (control chart algorithms)
Weight (control chart algorithms)
X-Bar and R Charts (control chart algorithms)
X-Bar and s Charts (control chart algorithms)
p and np Charts (control chart algorithms)
u and c Charts (control chart algorithms)
Statistics (control chart algorithms)
References (control chart algorithms)


p and np Charts (control chart algorithms)

control charts algorithms,control charts algorithms,control charts algorithms
p charts,p charts,p charts
control charts algorithms,control charts algorithms,control charts algorithms
np charts,np charts,np charts

The data for p and np charts are attribute data. Each measurement xij is either 0 or 1, where 1 indicates a non-conforming measurement. Therefore,

xi+=niΣj=1xij

is the count of non-conforming units for subgroup i. When a weight variable is specified, xi+ is a weighted sum of non-conforming units. If the data are aggregated and the value of the count variable is greater than the total number of units for any subgroup, this subgroup is dropped.

Related Topics

SPCHART Algorithms
Notation (control chart algorithms)
Weight (control chart algorithms)
X-Bar and R Charts (control chart algorithms)
X-Bar and s Charts (control chart algorithms)
Individual and Moving Range Charts (control chart algorithms)
u and c Charts (control chart algorithms)
Statistics (control chart algorithms)
References (control chart algorithms)
Equal Sample Sizes (control chart algorithms)
Unequal Sample Sizes (control chart algorithms)


Equal Sample Sizes (control chart algorithms)

Assume ni=n. The process for a p chart is {pi:i=1,...,K} where pi=xi+/n. The center line for a p chart is

p=1KKΣi=1pi

and the control limits are

LCL =max(p−A
√ (p(1−p))/n
, 0)
UCL =min(p+A
√ (p(1−p))/n
, 1)

The process for an np chart is {xi+:i=1,...,K}. The center line for an np chart is

x=1KKΣi=1xi+

and the control limits are

LCL =max(x−A
√ np(1−p)
, 0)
UCL =min(x+A
√ np(1−p)
, n)

Related Topics

p and np Charts (control chart algorithms)
Unequal Sample Sizes (control chart algorithms)


Unequal Sample Sizes (control chart algorithms)

The process for a p chart is {pi:i=1,...,K} where pi=xi+/ni. The center line for a p chart is

p=1NKΣi=1xi+=1NKΣi=1nipi

and the control limits for subgroup i are

LCL =max(p−A
√ (p(1−p))/ni
, 0)
UCL =min(p+A
√ (p(1−p))/ni
, 1)

The process for an np chart is {xi+:i=1,...,K}. However, the center line for an np chart for subgroup i is nip. The control limits for subgroup i are

LCL =max(nip−A
√ (nip(1−p))
, 0)
UCL =min(nip+A
√ (nip(1−p))
, ni)

Note: A warning message is issued when an np chart is requested for subgroups of unequal sample sizes.

Related Topics

p and np Charts (control chart algorithms)
Equal Sample Sizes (control chart algorithms)


u and c Charts (control chart algorithms)

control charts algorithms,control charts algorithms,control charts algorithms
u charts,u charts,u charts
control charts algorithms,control charts algorithms,control charts algorithms
c charts,c charts,c charts

Measurements xij show the number of defects for the jth unit for subgroup i. Hence,

xi+=niΣj=1xij

is the total number of defects for subgroup i. When a weight variable is used, xi+ is a weighted sum of defects.

Related Topics

SPCHART Algorithms
Notation (control chart algorithms)
Weight (control chart algorithms)
X-Bar and R Charts (control chart algorithms)
X-Bar and s Charts (control chart algorithms)
Individual and Moving Range Charts (control chart algorithms)
p and np Charts (control chart algorithms)
Statistics (control chart algorithms)
References (control chart algorithms)
Equal Sample Size (control chart algorithms)
Unequal Sample Size (control chart algorithms)


Equal Sample Size (control chart algorithms)

Assume ni=n. The process for a u chart is {ui:i=1,...,K} where ui=xi+/n. The center line for a u chart is

u=1KKΣi=1ui

and the control limits are

LCL =max(u−A
√ u/n
, 0)
UCL =u+A
√ u/n

The process for a c chart is {xi+:i=1,...,K}. The center line for a c chart is

c=1KKΣi=1xi+

and the control limits for a c chart are

LCL =max(c−A
√ c
, 0)
UCL =c+A
√ c

Related Topics

u and c Charts (control chart algorithms)
Unequal Sample Size (control chart algorithms)


Unequal Sample Size (control chart algorithms)

The process for a u chart is {ui:i=1,...,K} where ui=xi+/n. The center line for a u chart is

u=1NKΣi=1xi+

and the control limits are

LCL =max(u−A
√ u/ni
, 0)
UCL =u+A
√ u/ni

The process for a c chart is {xi+:i=1,...,K}. The center line for subgroup i is niu and the control limits are

LCL =max(niu−A
√ niu
, 0)
UCL =niu+A
√ niu

Note: A warning message is issued when a c chart is requested for subgroups of unequal sample sizes.

Related Topics

u and c Charts (control chart algorithms)
Equal Sample Size (control chart algorithms)


Statistics (control chart algorithms)

control charts algorithms,control charts algorithms,control charts algorithms
statistics,statistics,statistics

This section discusses the capability and performance statistics that can be requested through SPCHART, and uses the following notation.

x

the total sample mean.

s

the total sample/process standard deviation.

^
σ

the estimated sigma in the Process Capability Indices.

μo

the nominal or the target value, given by the user.

LSL

the lower specification limit, given by the user.

USL

the upper specification limit, given by the user.

Related Topics

SPCHART Algorithms
Notation (control chart algorithms)
Weight (control chart algorithms)
X-Bar and R Charts (control chart algorithms)
X-Bar and s Charts (control chart algorithms)
Individual and Moving Range Charts (control chart algorithms)
p and np Charts (control chart algorithms)
u and c Charts (control chart algorithms)
References (control chart algorithms)
Assumptions (control chart algorithms)
Prerequisites (control chart algorithms)
Process Capability Indices (control chart algorithms)
CP: Capability of the process (control chart algorithms)
CpL: The distance between the process mean and the lower specification limit scaled by capability sigma (control chart algorithms)
CpU: The distance between the process mean and the upper specification limit scaled by capability sigma (control chart algorithms)
K: The deviation of the process mean from the midpoint of the specification limits (control chart algorithms)
CpK: Capability of process related to both dispersion and centeredness (control chart algorithms)
CR: The reciprocal of CP (control chart algorithms)
CpM: An index relating capability sigma and the difference between the process mean and the target value (control chart algorithms)
Z-lower (Cap): The number of capability sigmas between the process mean and the lower specification limit (control chart algorithms)
Z-upper (Cap): The number of capability sigmas between the process mean and the upper specification limit (control chart algorithms)
Z-min (Cap): The minimum number of capability sigmas between the process mean and the specification limits (control chart algorithms)
Z-max (Cap): The maximum number of capability sigmas between the process mean and the specification limits (control chart algorithms)
The estimated percentage outside the specification limits (Cap) (control chart algorithms)
Process Performance Indices (control chart algorithms)
PP: Performance of the process (control chart algorithms)
PpL: The distance between the process mean and the lower specification limit scaled by process standard deviation (control chart algorithms)
PpU: The distance between the process mean and the upper specification limit scaled by process standard deviation (control chart algorithms)
PpK: Performance of process related to both dispersion and centeredness (control chart algorithms)
PR: The reciprocal of PP (control chart algorithms)
PpM: An index relating process variance and the difference between the process mean and the target value (control chart algorithms)
Z-lower (Perf): The number of standard deviations between the process mean and the lower specification limit (control chart algorithms)
Z-upper (Perf): The number of standard deviations between the process mean and the upper specification limit (control chart algorithms)
Z-min (Perf): The minimum number of standard deviations between the process mean and the specification limits (control chart algorithms)
Z-max (Perf): The maximum number of standard deviations between the process mean and the specification limits (control chart algorithms)
The estimated percentage outside the specification limits (Perf) (control chart algorithms)
Measure(s) for Assessing Normality: The observed percentage outside the specification limits (control chart algorithms)


Assumptions (control chart algorithms)

• The process is in control. (x and s are finitely estimated.)

• The measured variable is normally distributed.

Related Topics

Statistics (control chart algorithms)
Prerequisites (control chart algorithms)
Process Capability Indices (control chart algorithms)
CP: Capability of the process (control chart algorithms)
CpL: The distance between the process mean and the lower specification limit scaled by capability sigma (control chart algorithms)
CpU: The distance between the process mean and the upper specification limit scaled by capability sigma (control chart algorithms)
K: The deviation of the process mean from the midpoint of the specification limits (control chart algorithms)
CpK: Capability of process related to both dispersion and centeredness (control chart algorithms)
CR: The reciprocal of CP (control chart algorithms)
CpM: An index relating capability sigma and the difference between the process mean and the target value (control chart algorithms)
Z-lower (Cap): The number of capability sigmas between the process mean and the lower specification limit (control chart algorithms)
Z-upper (Cap): The number of capability sigmas between the process mean and the upper specification limit (control chart algorithms)
Z-min (Cap): The minimum number of capability sigmas between the process mean and the specification limits (control chart algorithms)
Z-max (Cap): The maximum number of capability sigmas between the process mean and the specification limits (control chart algorithms)
The estimated percentage outside the specification limits (Cap) (control chart algorithms)
Process Performance Indices (control chart algorithms)
PP: Performance of the process (control chart algorithms)
PpL: The distance between the process mean and the lower specification limit scaled by process standard deviation (control chart algorithms)
PpU: The distance between the process mean and the upper specification limit scaled by process standard deviation (control chart algorithms)
PpK: Performance of process related to both dispersion and centeredness (control chart algorithms)
PR: The reciprocal of PP (control chart algorithms)
PpM: An index relating process variance and the difference between the process mean and the target value (control chart algorithms)
Z-lower (Perf): The number of standard deviations between the process mean and the lower specification limit (control chart algorithms)
Z-upper (Perf): The number of standard deviations between the process mean and the upper specification limit (control chart algorithms)
Z-min (Perf): The minimum number of standard deviations between the process mean and the specification limits (control chart algorithms)
Z-max (Perf): The maximum number of standard deviations between the process mean and the specification limits (control chart algorithms)
The estimated percentage outside the specification limits (Perf) (control chart algorithms)
Measure(s) for Assessing Normality: The observed percentage outside the specification limits (control chart algorithms)


Prerequisites (control chart algorithms)

• For the Process Capability Indices except CpK and the Process Performance Indices except PpK, both LSL and USL must be specified by the user, satisfying LSL < USL. For CpK and PpK, at least one of LSL and USL must be specified by the user.

• A target value μo such that LSL ≤μo≤ USL must be given by the user for CpM and PpM to be computed.

Related Topics

Statistics (control chart algorithms)
Assumptions (control chart algorithms)
Process Capability Indices (control chart algorithms)
CP: Capability of the process (control chart algorithms)
CpL: The distance between the process mean and the lower specification limit scaled by capability sigma (control chart algorithms)
CpU: The distance between the process mean and the upper specification limit scaled by capability sigma (control chart algorithms)
K: The deviation of the process mean from the midpoint of the specification limits (control chart algorithms)
CpK: Capability of process related to both dispersion and centeredness (control chart algorithms)
CR: The reciprocal of CP (control chart algorithms)
CpM: An index relating capability sigma and the difference between the process mean and the target value (control chart algorithms)
Z-lower (Cap): The number of capability sigmas between the process mean and the lower specification limit (control chart algorithms)
Z-upper (Cap): The number of capability sigmas between the process mean and the upper specification limit (control chart algorithms)
Z-min (Cap): The minimum number of capability sigmas between the process mean and the specification limits (control chart algorithms)
Z-max (Cap): The maximum number of capability sigmas between the process mean and the specification limits (control chart algorithms)
The estimated percentage outside the specification limits (Cap) (control chart algorithms)
Process Performance Indices (control chart algorithms)
PP: Performance of the process (control chart algorithms)
PpL: The distance between the process mean and the lower specification limit scaled by process standard deviation (control chart algorithms)
PpU: The distance between the process mean and the upper specification limit scaled by process standard deviation (control chart algorithms)
PpK: Performance of process related to both dispersion and centeredness (control chart algorithms)
PR: The reciprocal of PP (control chart algorithms)
PpM: An index relating process variance and the difference between the process mean and the target value (control chart algorithms)
Z-lower (Perf): The number of standard deviations between the process mean and the lower specification limit (control chart algorithms)
Z-upper (Perf): The number of standard deviations between the process mean and the upper specification limit (control chart algorithms)
Z-min (Perf): The minimum number of standard deviations between the process mean and the specification limits (control chart algorithms)
Z-max (Perf): The maximum number of standard deviations between the process mean and the specification limits (control chart algorithms)
The estimated percentage outside the specification limits (Perf) (control chart algorithms)
Measure(s) for Assessing Normality: The observed percentage outside the specification limits (control chart algorithms)


Process Capability Indices (control chart algorithms)

The estimated capability sigma
^
σ
may be computed in one of four ways.

(1). If it is to be based on the sample within-subgroup variance,

^
σ
=
√ kΣi=1niΣj=1(xij−xi)2/kΣi=1(ni−1)

(2). If it is to be based on the mean range,

^
σ
=kΣi=1Rid2(ni)k

where d2(ni)=∞∫−∞1−(1−Φ(x))ni−(Φ(x))nidx with Φ(x)=x∫−∞1
√ 2π
e−u2/2du

Note that ni may or may not be equal for different subgroups. If they are all equal, we may write

^
σ
=Rd2(ni)

where R=Σki=1Ri/k, the mean range.

(3). If it is to be based on the mean standard deviation,

^
σ
=kΣi=1sic4(ni)k

where c4(ni)=
√ 2ni−1
Γ(ni/2)Γ((ni−1)/2), with the complete Gamma function Γ().

Note that ni may or may not be equal for different subgroups. If they are all equal, we may write

^
σ
=sc4(ni)

(4). If it is to be based on the mean moving range,

^
σ
=nΣi=mMRid2(m)n−m+1=MRd2(m)

where

MRi={
max(yi−m+1,...,yi)−min(yi−m+1,...,yi), if i=m,...,n
sysmis, if i=1,...,m−1

and n is the total sample size, m is the user-given length of span, and MRi is the ith moving range for the data.

All of the capability indices, except K, require
^
σ
, and in order to define them, we must have
^
σ
>0.

Related Topics

Statistics (control chart algorithms)
Assumptions (control chart algorithms)
Prerequisites (control chart algorithms)
CP: Capability of the process (control chart algorithms)
CpL: The distance between the process mean and the lower specification limit scaled by capability sigma (control chart algorithms)
CpU: The distance between the process mean and the upper specification limit scaled by capability sigma (control chart algorithms)
K: The deviation of the process mean from the midpoint of the specification limits (control chart algorithms)
CpK: Capability of process related to both dispersion and centeredness (control chart algorithms)
CR: The reciprocal of CP (control chart algorithms)
CpM: An index relating capability sigma and the difference between the process mean and the target value (control chart algorithms)
Z-lower (Cap): The number of capability sigmas between the process mean and the lower specification limit (control chart algorithms)
Z-upper (Cap): The number of capability sigmas between the process mean and the upper specification limit (control chart algorithms)
Z-min (Cap): The minimum number of capability sigmas between the process mean and the specification limits (control chart algorithms)
Z-max (Cap): The maximum number of capability sigmas between the process mean and the specification limits (control chart algorithms)
The estimated percentage outside the specification limits (Cap) (control chart algorithms)
Process Performance Indices (control chart algorithms)
PP: Performance of the process (control chart algorithms)
PpL: The distance between the process mean and the lower specification limit scaled by process standard deviation (control chart algorithms)
PpU: The distance between the process mean and the upper specification limit scaled by process standard deviation (control chart algorithms)
PpK: Performance of process related to both dispersion and centeredness (control chart algorithms)
PR: The reciprocal of PP (control chart algorithms)
PpM: An index relating process variance and the difference between the process mean and the target value (control chart algorithms)
Z-lower (Perf): The number of standard deviations between the process mean and the lower specification limit (control chart algorithms)
Z-upper (Perf): The number of standard deviations between the process mean and the upper specification limit (control chart algorithms)
Z-min (Perf): The minimum number of standard deviations between the process mean and the specification limits (control chart algorithms)
Z-max (Perf): The maximum number of standard deviations between the process mean and the specification limits (control chart algorithms)
The estimated percentage outside the specification limits (Perf) (control chart algorithms)
Measure(s) for Assessing Normality: The observed percentage outside the specification limits (control chart algorithms)


CP: Capability of the process (control chart algorithms)

CP= USL − LSL 6
^
σ

Related Topics

Statistics (control chart algorithms)
Assumptions (control chart algorithms)
Prerequisites (control chart algorithms)
Process Capability Indices (control chart algorithms)
CpL: The distance between the process mean and the lower specification limit scaled by capability sigma (control chart algorithms)
CpU: The distance between the process mean and the upper specification limit scaled by capability sigma (control chart algorithms)
K: The deviation of the process mean from the midpoint of the specification limits (control chart algorithms)
CpK: Capability of process related to both dispersion and centeredness (control chart algorithms)
CR: The reciprocal of CP (control chart algorithms)
CpM: An index relating capability sigma and the difference between the process mean and the target value (control chart algorithms)
Z-lower (Cap): The number of capability sigmas between the process mean and the lower specification limit (control chart algorithms)
Z-upper (Cap): The number of capability sigmas between the process mean and the upper specification limit (control chart algorithms)
Z-min (Cap): The minimum number of capability sigmas between the process mean and the specification limits (control chart algorithms)
Z-max (Cap): The maximum number of capability sigmas between the process mean and the specification limits (control chart algorithms)
The estimated percentage outside the specification limits (Cap) (control chart algorithms)
Process Performance Indices (control chart algorithms)
PP: Performance of the process (control chart algorithms)
PpL: The distance between the process mean and the lower specification limit scaled by process standard deviation (control chart algorithms)
PpU: The distance between the process mean and the upper specification limit scaled by process standard deviation (control chart algorithms)
PpK: Performance of process related to both dispersion and centeredness (control chart algorithms)
PR: The reciprocal of PP (control chart algorithms)
PpM: An index relating process variance and the difference between the process mean and the target value (control chart algorithms)
Z-lower (Perf): The number of standard deviations between the process mean and the lower specification limit (control chart algorithms)
Z-upper (Perf): The number of standard deviations between the process mean and the upper specification limit (control chart algorithms)
Z-min (Perf): The minimum number of standard deviations between the process mean and the specification limits (control chart algorithms)
Z-max (Perf): The maximum number of standard deviations between the process mean and the specification limits (control chart algorithms)
The estimated percentage outside the specification limits (Perf) (control chart algorithms)
Measure(s) for Assessing Normality: The observed percentage outside the specification limits (control chart algorithms)


CpL: The distance between the process mean and the lower specification limit scaled by capability sigma (control chart algorithms)

CpL=x− LSL 3
^
σ

Related Topics

Statistics (control chart algorithms)
Assumptions (control chart algorithms)
Prerequisites (control chart algorithms)
Process Capability Indices (control chart algorithms)
CP: Capability of the process (control chart algorithms)
CpU: The distance between the process mean and the upper specification limit scaled by capability sigma (control chart algorithms)
K: The deviation of the process mean from the midpoint of the specification limits (control chart algorithms)
CpK: Capability of process related to both dispersion and centeredness (control chart algorithms)
CR: The reciprocal of CP (control chart algorithms)
CpM: An index relating capability sigma and the difference between the process mean and the target value (control chart algorithms)
Z-lower (Cap): The number of capability sigmas between the process mean and the lower specification limit (control chart algorithms)
Z-upper (Cap): The number of capability sigmas between the process mean and the upper specification limit (control chart algorithms)
Z-min (Cap): The minimum number of capability sigmas between the process mean and the specification limits (control chart algorithms)
Z-max (Cap): The maximum number of capability sigmas between the process mean and the specification limits (control chart algorithms)
The estimated percentage outside the specification limits (Cap) (control chart algorithms)
Process Performance Indices (control chart algorithms)
PP: Performance of the process (control chart algorithms)
PpL: The distance between the process mean and the lower specification limit scaled by process standard deviation (control chart algorithms)
PpU: The distance between the process mean and the upper specification limit scaled by process standard deviation (control chart algorithms)
PpK: Performance of process related to both dispersion and centeredness (control chart algorithms)
PR: The reciprocal of PP (control chart algorithms)
PpM: An index relating process variance and the difference between the process mean and the target value (control chart algorithms)
Z-lower (Perf): The number of standard deviations between the process mean and the lower specification limit (control chart algorithms)
Z-upper (Perf): The number of standard deviations between the process mean and the upper specification limit (control chart algorithms)
Z-min (Perf): The minimum number of standard deviations between the process mean and the specification limits (control chart algorithms)
Z-max (Perf): The maximum number of standard deviations between the process mean and the specification limits (control chart algorithms)
The estimated percentage outside the specification limits (Perf) (control chart algorithms)
Measure(s) for Assessing Normality: The observed percentage outside the specification limits (control chart algorithms)


CpU: The distance between the process mean and the upper specification limit scaled by capability sigma (control chart algorithms)

CpU= USL −x3
^
σ

Related Topics

Statistics (control chart algorithms)
Assumptions (control chart algorithms)
Prerequisites (control chart algorithms)
Process Capability Indices (control chart algorithms)
CP: Capability of the process (control chart algorithms)
CpL: The distance between the process mean and the lower specification limit scaled by capability sigma (control chart algorithms)
K: The deviation of the process mean from the midpoint of the specification limits (control chart algorithms)
CpK: Capability of process related to both dispersion and centeredness (control chart algorithms)
CR: The reciprocal of CP (control chart algorithms)
CpM: An index relating capability sigma and the difference between the process mean and the target value (control chart algorithms)
Z-lower (Cap): The number of capability sigmas between the process mean and the lower specification limit (control chart algorithms)
Z-upper (Cap): The number of capability sigmas between the process mean and the upper specification limit (control chart algorithms)
Z-min (Cap): The minimum number of capability sigmas between the process mean and the specification limits (control chart algorithms)
Z-max (Cap): The maximum number of capability sigmas between the process mean and the specification limits (control chart algorithms)
The estimated percentage outside the specification limits (Cap) (control chart algorithms)
Process Performance Indices (control chart algorithms)
PP: Performance of the process (control chart algorithms)
PpL: The distance between the process mean and the lower specification limit scaled by process standard deviation (control chart algorithms)
PpU: The distance between the process mean and the upper specification limit scaled by process standard deviation (control chart algorithms)
PpK: Performance of process related to both dispersion and centeredness (control chart algorithms)
PR: The reciprocal of PP (control chart algorithms)
PpM: An index relating process variance and the difference between the process mean and the target value (control chart algorithms)
Z-lower (Perf): The number of standard deviations between the process mean and the lower specification limit (control chart algorithms)
Z-upper (Perf): The number of standard deviations between the process mean and the upper specification limit (control chart algorithms)
Z-min (Perf): The minimum number of standard deviations between the process mean and the specification limits (control chart algorithms)
Z-max (Perf): The maximum number of standard deviations between the process mean and the specification limits (control chart algorithms)
The estimated percentage outside the specification limits (Perf) (control chart algorithms)
Measure(s) for Assessing Normality: The observed percentage outside the specification limits (control chart algorithms)


K: The deviation of the process mean from the midpoint of the specification limits (control chart algorithms)

K=2|( USL + LSL )/2−x| USL − LSL

Note this is computed independently of the estimated capability sigma, so it does not need to be greater than 0 or even specified.

Related Topics

Statistics (control chart algorithms)
Assumptions (control chart algorithms)
Prerequisites (control chart algorithms)
Process Capability Indices (control chart algorithms)
CP: Capability of the process (control chart algorithms)
CpL: The distance between the process mean and the lower specification limit scaled by capability sigma (control chart algorithms)
CpU: The distance between the process mean and the upper specification limit scaled by capability sigma (control chart algorithms)
CpK: Capability of process related to both dispersion and centeredness (control chart algorithms)
CR: The reciprocal of CP (control chart algorithms)
CpM: An index relating capability sigma and the difference between the process mean and the target value (control chart algorithms)
Z-lower (Cap): The number of capability sigmas between the process mean and the lower specification limit (control chart algorithms)
Z-upper (Cap): The number of capability sigmas between the process mean and the upper specification limit (control chart algorithms)
Z-min (Cap): The minimum number of capability sigmas between the process mean and the specification limits (control chart algorithms)
Z-max (Cap): The maximum number of capability sigmas between the process mean and the specification limits (control chart algorithms)
The estimated percentage outside the specification limits (Cap) (control chart algorithms)
Process Performance Indices (control chart algorithms)
PP: Performance of the process (control chart algorithms)
PpL: The distance between the process mean and the lower specification limit scaled by process standard deviation (control chart algorithms)
PpU: The distance between the process mean and the upper specification limit scaled by process standard deviation (control chart algorithms)
PpK: Performance of process related to both dispersion and centeredness (control chart algorithms)
PR: The reciprocal of PP (control chart algorithms)
PpM: An index relating process variance and the difference between the process mean and the target value (control chart algorithms)
Z-lower (Perf): The number of standard deviations between the process mean and the lower specification limit (control chart algorithms)
Z-upper (Perf): The number of standard deviations between the process mean and the upper specification limit (control chart algorithms)
Z-min (Perf): The minimum number of standard deviations between the process mean and the specification limits (control chart algorithms)
Z-max (Perf): The maximum number of standard deviations between the process mean and the specification limits (control chart algorithms)
The estimated percentage outside the specification limits (Perf) (control chart algorithms)
Measure(s) for Assessing Normality: The observed percentage outside the specification limits (control chart algorithms)


CpK: Capability of process related to both dispersion and centeredness (control chart algorithms)

CpK=min(CpU,CpL)

If only one specification limit is provided, we compute and report a unilateral CpK instead of taking the minimum.

Related Topics

Statistics (control chart algorithms)
Assumptions (control chart algorithms)
Prerequisites (control chart algorithms)
Process Capability Indices (control chart algorithms)
CP: Capability of the process (control chart algorithms)
CpL: The distance between the process mean and the lower specification limit scaled by capability sigma (control chart algorithms)
CpU: The distance between the process mean and the upper specification limit scaled by capability sigma (control chart algorithms)
K: The deviation of the process mean from the midpoint of the specification limits (control chart algorithms)
CR: The reciprocal of CP (control chart algorithms)
CpM: An index relating capability sigma and the difference between the process mean and the target value (control chart algorithms)
Z-lower (Cap): The number of capability sigmas between the process mean and the lower specification limit (control chart algorithms)
Z-upper (Cap): The number of capability sigmas between the process mean and the upper specification limit (control chart algorithms)
Z-min (Cap): The minimum number of capability sigmas between the process mean and the specification limits (control chart algorithms)
Z-max (Cap): The maximum number of capability sigmas between the process mean and the specification limits (control chart algorithms)
The estimated percentage outside the specification limits (Cap) (control chart algorithms)
Process Performance Indices (control chart algorithms)
PP: Performance of the process (control chart algorithms)
PpL: The distance between the process mean and the lower specification limit scaled by process standard deviation (control chart algorithms)
PpU: The distance between the process mean and the upper specification limit scaled by process standard deviation (control chart algorithms)
PpK: Performance of process related to both dispersion and centeredness (control chart algorithms)
PR: The reciprocal of PP (control chart algorithms)
PpM: An index relating process variance and the difference between the process mean and the target value (control chart algorithms)
Z-lower (Perf): The number of standard deviations between the process mean and the lower specification limit (control chart algorithms)
Z-upper (Perf): The number of standard deviations between the process mean and the upper specification limit (control chart algorithms)
Z-min (Perf): The minimum number of standard deviations between the process mean and the specification limits (control chart algorithms)
Z-max (Perf): The maximum number of standard deviations between the process mean and the specification limits (control chart algorithms)
The estimated percentage outside the specification limits (Perf) (control chart algorithms)
Measure(s) for Assessing Normality: The observed percentage outside the specification limits (control chart algorithms)


CR: The reciprocal of CP (control chart algorithms)

CR=1CP

Related Topics

Statistics (control chart algorithms)
Assumptions (control chart algorithms)
Prerequisites (control chart algorithms)
Process Capability Indices (control chart algorithms)
CP: Capability of the process (control chart algorithms)
CpL: The distance between the process mean and the lower specification limit scaled by capability sigma (control chart algorithms)
CpU: The distance between the process mean and the upper specification limit scaled by capability sigma (control chart algorithms)
K: The deviation of the process mean from the midpoint of the specification limits (control chart algorithms)
CpK: Capability of process related to both dispersion and centeredness (control chart algorithms)
CpM: An index relating capability sigma and the difference between the process mean and the target value (control chart algorithms)
Z-lower (Cap): The number of capability sigmas between the process mean and the lower specification limit (control chart algorithms)
Z-upper (Cap): The number of capability sigmas between the process mean and the upper specification limit (control chart algorithms)
Z-min (Cap): The minimum number of capability sigmas between the process mean and the specification limits (control chart algorithms)
Z-max (Cap): The maximum number of capability sigmas between the process mean and the specification limits (control chart algorithms)
The estimated percentage outside the specification limits (Cap) (control chart algorithms)
Process Performance Indices (control chart algorithms)
PP: Performance of the process (control chart algorithms)
PpL: The distance between the process mean and the lower specification limit scaled by process standard deviation (control chart algorithms)
PpU: The distance between the process mean and the upper specification limit scaled by process standard deviation (control chart algorithms)
PpK: Performance of process related to both dispersion and centeredness (control chart algorithms)
PR: The reciprocal of PP (control chart algorithms)
PpM: An index relating process variance and the difference between the process mean and the target value (control chart algorithms)
Z-lower (Perf): The number of standard deviations between the process mean and the lower specification limit (control chart algorithms)
Z-upper (Perf): The number of standard deviations between the process mean and the upper specification limit (control chart algorithms)
Z-min (Perf): The minimum number of standard deviations between the process mean and the specification limits (control chart algorithms)
Z-max (Perf): The maximum number of standard deviations between the process mean and the specification limits (control chart algorithms)
The estimated percentage outside the specification limits (Perf) (control chart algorithms)
Measure(s) for Assessing Normality: The observed percentage outside the specification limits (control chart algorithms)


CpM: An index relating capability sigma and the difference between the process mean and the target value (control chart algorithms)

CpM= USL − LSL 6
√
^
σ
2+(x−μo)2

μo must be given by the user.

Related Topics

Statistics (control chart algorithms)
Assumptions (control chart algorithms)
Prerequisites (control chart algorithms)
Process Capability Indices (control chart algorithms)
CP: Capability of the process (control chart algorithms)
CpL: The distance between the process mean and the lower specification limit scaled by capability sigma (control chart algorithms)
CpU: The distance between the process mean and the upper specification limit scaled by capability sigma (control chart algorithms)
K: The deviation of the process mean from the midpoint of the specification limits (control chart algorithms)
CpK: Capability of process related to both dispersion and centeredness (control chart algorithms)
CR: The reciprocal of CP (control chart algorithms)
Z-lower (Cap): The number of capability sigmas between the process mean and the lower specification limit (control chart algorithms)
Z-upper (Cap): The number of capability sigmas between the process mean and the upper specification limit (control chart algorithms)
Z-min (Cap): The minimum number of capability sigmas between the process mean and the specification limits (control chart algorithms)
Z-max (Cap): The maximum number of capability sigmas between the process mean and the specification limits (control chart algorithms)
The estimated percentage outside the specification limits (Cap) (control chart algorithms)
Process Performance Indices (control chart algorithms)
PP: Performance of the process (control chart algorithms)
PpL: The distance between the process mean and the lower specification limit scaled by process standard deviation (control chart algorithms)
PpU: The distance between the process mean and the upper specification limit scaled by process standard deviation (control chart algorithms)
PpK: Performance of process related to both dispersion and centeredness (control chart algorithms)
PR: The reciprocal of PP (control chart algorithms)
PpM: An index relating process variance and the difference between the process mean and the target value (control chart algorithms)
Z-lower (Perf): The number of standard deviations between the process mean and the lower specification limit (control chart algorithms)
Z-upper (Perf): The number of standard deviations between the process mean and the upper specification limit (control chart algorithms)
Z-min (Perf): The minimum number of standard deviations between the process mean and the specification limits (control chart algorithms)
Z-max (Perf): The maximum number of standard deviations between the process mean and the specification limits (control chart algorithms)
The estimated percentage outside the specification limits (Perf) (control chart algorithms)
Measure(s) for Assessing Normality: The observed percentage outside the specification limits (control chart algorithms)


Z-lower (Cap): The number of capability sigmas between the process mean and the lower specification limit (control chart algorithms)

CZL=x− LSL
^
σ

Related Topics

Statistics (control chart algorithms)
Assumptions (control chart algorithms)
Prerequisites (control chart algorithms)
Process Capability Indices (control chart algorithms)
CP: Capability of the process (control chart algorithms)
CpL: The distance between the process mean and the lower specification limit scaled by capability sigma (control chart algorithms)
CpU: The distance between the process mean and the upper specification limit scaled by capability sigma (control chart algorithms)
K: The deviation of the process mean from the midpoint of the specification limits (control chart algorithms)
CpK: Capability of process related to both dispersion and centeredness (control chart algorithms)
CR: The reciprocal of CP (control chart algorithms)
CpM: An index relating capability sigma and the difference between the process mean and the target value (control chart algorithms)
Z-upper (Cap): The number of capability sigmas between the process mean and the upper specification limit (control chart algorithms)
Z-min (Cap): The minimum number of capability sigmas between the process mean and the specification limits (control chart algorithms)
Z-max (Cap): The maximum number of capability sigmas between the process mean and the specification limits (control chart algorithms)
The estimated percentage outside the specification limits (Cap) (control chart algorithms)
Process Performance Indices (control chart algorithms)
PP: Performance of the process (control chart algorithms)
PpL: The distance between the process mean and the lower specification limit scaled by process standard deviation (control chart algorithms)
PpU: The distance between the process mean and the upper specification limit scaled by process standard deviation (control chart algorithms)
PpK: Performance of process related to both dispersion and centeredness (control chart algorithms)
PR: The reciprocal of PP (control chart algorithms)
PpM: An index relating process variance and the difference between the process mean and the target value (control chart algorithms)
Z-lower (Perf): The number of standard deviations between the process mean and the lower specification limit (control chart algorithms)
Z-upper (Perf): The number of standard deviations between the process mean and the upper specification limit (control chart algorithms)
Z-min (Perf): The minimum number of standard deviations between the process mean and the specification limits (control chart algorithms)
Z-max (Perf): The maximum number of standard deviations between the process mean and the specification limits (control chart algorithms)
The estimated percentage outside the specification limits (Perf) (control chart algorithms)
Measure(s) for Assessing Normality: The observed percentage outside the specification limits (control chart algorithms)


Z-upper (Cap): The number of capability sigmas between the process mean and the upper specification limit (control chart algorithms)

CZU= USL −x
^
σ

Related Topics

Statistics (control chart algorithms)
Assumptions (control chart algorithms)
Prerequisites (control chart algorithms)
Process Capability Indices (control chart algorithms)
CP: Capability of the process (control chart algorithms)
CpL: The distance between the process mean and the lower specification limit scaled by capability sigma (control chart algorithms)
CpU: The distance between the process mean and the upper specification limit scaled by capability sigma (control chart algorithms)
K: The deviation of the process mean from the midpoint of the specification limits (control chart algorithms)
CpK: Capability of process related to both dispersion and centeredness (control chart algorithms)
CR: The reciprocal of CP (control chart algorithms)
CpM: An index relating capability sigma and the difference between the process mean and the target value (control chart algorithms)
Z-lower (Cap): The number of capability sigmas between the process mean and the lower specification limit (control chart algorithms)
Z-min (Cap): The minimum number of capability sigmas between the process mean and the specification limits (control chart algorithms)
Z-max (Cap): The maximum number of capability sigmas between the process mean and the specification limits (control chart algorithms)
The estimated percentage outside the specification limits (Cap) (control chart algorithms)
Process Performance Indices (control chart algorithms)
PP: Performance of the process (control chart algorithms)
PpL: The distance between the process mean and the lower specification limit scaled by process standard deviation (control chart algorithms)
PpU: The distance between the process mean and the upper specification limit scaled by process standard deviation (control chart algorithms)
PpK: Performance of process related to both dispersion and centeredness (control chart algorithms)
PR: The reciprocal of PP (control chart algorithms)
PpM: An index relating process variance and the difference between the process mean and the target value (control chart algorithms)
Z-lower (Perf): The number of standard deviations between the process mean and the lower specification limit (control chart algorithms)
Z-upper (Perf): The number of standard deviations between the process mean and the upper specification limit (control chart algorithms)
Z-min (Perf): The minimum number of standard deviations between the process mean and the specification limits (control chart algorithms)
Z-max (Perf): The maximum number of standard deviations between the process mean and the specification limits (control chart algorithms)
The estimated percentage outside the specification limits (Perf) (control chart algorithms)
Measure(s) for Assessing Normality: The observed percentage outside the specification limits (control chart algorithms)


Z-min (Cap): The minimum number of capability sigmas between the process mean and the specification limits (control chart algorithms)

CZmin=min(CZU,CZL)

Note that unlike CpK, this index is undefined unless both specification limits are given and valid.

Related Topics

Statistics (control chart algorithms)
Assumptions (control chart algorithms)
Prerequisites (control chart algorithms)
Process Capability Indices (control chart algorithms)
CP: Capability of the process (control chart algorithms)
CpL: The distance between the process mean and the lower specification limit scaled by capability sigma (control chart algorithms)
CpU: The distance between the process mean and the upper specification limit scaled by capability sigma (control chart algorithms)
K: The deviation of the process mean from the midpoint of the specification limits (control chart algorithms)
CpK: Capability of process related to both dispersion and centeredness (control chart algorithms)
CR: The reciprocal of CP (control chart algorithms)
CpM: An index relating capability sigma and the difference between the process mean and the target value (control chart algorithms)
Z-lower (Cap): The number of capability sigmas between the process mean and the lower specification limit (control chart algorithms)
Z-upper (Cap): The number of capability sigmas between the process mean and the upper specification limit (control chart algorithms)
Z-max (Cap): The maximum number of capability sigmas between the process mean and the specification limits (control chart algorithms)
The estimated percentage outside the specification limits (Cap) (control chart algorithms)
Process Performance Indices (control chart algorithms)
PP: Performance of the process (control chart algorithms)
PpL: The distance between the process mean and the lower specification limit scaled by process standard deviation (control chart algorithms)
PpU: The distance between the process mean and the upper specification limit scaled by process standard deviation (control chart algorithms)
PpK: Performance of process related to both dispersion and centeredness (control chart algorithms)
PR: The reciprocal of PP (control chart algorithms)
PpM: An index relating process variance and the difference between the process mean and the target value (control chart algorithms)
Z-lower (Perf): The number of standard deviations between the process mean and the lower specification limit (control chart algorithms)
Z-upper (Perf): The number of standard deviations between the process mean and the upper specification limit (control chart algorithms)
Z-min (Perf): The minimum number of standard deviations between the process mean and the specification limits (control chart algorithms)
Z-max (Perf): The maximum number of standard deviations between the process mean and the specification limits (control chart algorithms)
The estimated percentage outside the specification limits (Perf) (control chart algorithms)
Measure(s) for Assessing Normality: The observed percentage outside the specification limits (control chart algorithms)


Z-max (Cap): The maximum number of capability sigmas between the process mean and the specification limits (control chart algorithms)

CZmax=max(CZU,CZL)

Note that unlike CpK, this index is undefined unless both specification limits are given and valid.

Related Topics

Statistics (control chart algorithms)
Assumptions (control chart algorithms)
Prerequisites (control chart algorithms)
Process Capability Indices (control chart algorithms)
CP: Capability of the process (control chart algorithms)
CpL: The distance between the process mean and the lower specification limit scaled by capability sigma (control chart algorithms)
CpU: The distance between the process mean and the upper specification limit scaled by capability sigma (control chart algorithms)
K: The deviation of the process mean from the midpoint of the specification limits (control chart algorithms)
CpK: Capability of process related to both dispersion and centeredness (control chart algorithms)
CR: The reciprocal of CP (control chart algorithms)
CpM: An index relating capability sigma and the difference between the process mean and the target value (control chart algorithms)
Z-lower (Cap): The number of capability sigmas between the process mean and the lower specification limit (control chart algorithms)
Z-upper (Cap): The number of capability sigmas between the process mean and the upper specification limit (control chart algorithms)
Z-min (Cap): The minimum number of capability sigmas between the process mean and the specification limits (control chart algorithms)
The estimated percentage outside the specification limits (Cap) (control chart algorithms)
Process Performance Indices (control chart algorithms)
PP: Performance of the process (control chart algorithms)
PpL: The distance between the process mean and the lower specification limit scaled by process standard deviation (control chart algorithms)
PpU: The distance between the process mean and the upper specification limit scaled by process standard deviation (control chart algorithms)
PpK: Performance of process related to both dispersion and centeredness (control chart algorithms)
PR: The reciprocal of PP (control chart algorithms)
PpM: An index relating process variance and the difference between the process mean and the target value (control chart algorithms)
Z-lower (Perf): The number of standard deviations between the process mean and the lower specification limit (control chart algorithms)
Z-upper (Perf): The number of standard deviations between the process mean and the upper specification limit (control chart algorithms)
Z-min (Perf): The minimum number of standard deviations between the process mean and the specification limits (control chart algorithms)
Z-max (Perf): The maximum number of standard deviations between the process mean and the specification limits (control chart algorithms)
The estimated percentage outside the specification limits (Perf) (control chart algorithms)
Measure(s) for Assessing Normality: The observed percentage outside the specification limits (control chart algorithms)


The estimated percentage outside the specification limits (Cap) (control chart algorithms)

(1−Φ(CZU)+Φ(−CZL))×100%

where Φ(x) is the cumulative distribution function of the standard normal distribution.

Related Topics

Statistics (control chart algorithms)
Assumptions (control chart algorithms)
Prerequisites (control chart algorithms)
Process Capability Indices (control chart algorithms)
CP: Capability of the process (control chart algorithms)
CpL: The distance between the process mean and the lower specification limit scaled by capability sigma (control chart algorithms)
CpU: The distance between the process mean and the upper specification limit scaled by capability sigma (control chart algorithms)
K: The deviation of the process mean from the midpoint of the specification limits (control chart algorithms)
CpK: Capability of process related to both dispersion and centeredness (control chart algorithms)
CR: The reciprocal of CP (control chart algorithms)
CpM: An index relating capability sigma and the difference between the process mean and the target value (control chart algorithms)
Z-lower (Cap): The number of capability sigmas between the process mean and the lower specification limit (control chart algorithms)
Z-upper (Cap): The number of capability sigmas between the process mean and the upper specification limit (control chart algorithms)
Z-min (Cap): The minimum number of capability sigmas between the process mean and the specification limits (control chart algorithms)
Z-max (Cap): The maximum number of capability sigmas between the process mean and the specification limits (control chart algorithms)
Process Performance Indices (control chart algorithms)
PP: Performance of the process (control chart algorithms)
PpL: The distance between the process mean and the lower specification limit scaled by process standard deviation (control chart algorithms)
PpU: The distance between the process mean and the upper specification limit scaled by process standard deviation (control chart algorithms)
PpK: Performance of process related to both dispersion and centeredness (control chart algorithms)
PR: The reciprocal of PP (control chart algorithms)
PpM: An index relating process variance and the difference between the process mean and the target value (control chart algorithms)
Z-lower (Perf): The number of standard deviations between the process mean and the lower specification limit (control chart algorithms)
Z-upper (Perf): The number of standard deviations between the process mean and the upper specification limit (control chart algorithms)
Z-min (Perf): The minimum number of standard deviations between the process mean and the specification limits (control chart algorithms)
Z-max (Perf): The maximum number of standard deviations between the process mean and the specification limits (control chart algorithms)
The estimated percentage outside the specification limits (Perf) (control chart algorithms)
Measure(s) for Assessing Normality: The observed percentage outside the specification limits (control chart algorithms)


Process Performance Indices (control chart algorithms)

The estimated performance sigma is always the process standard deviation s. None of the indices in this chapter is defined unless s>0.

Related Topics

Statistics (control chart algorithms)
Assumptions (control chart algorithms)
Prerequisites (control chart algorithms)
Process Capability Indices (control chart algorithms)
CP: Capability of the process (control chart algorithms)
CpL: The distance between the process mean and the lower specification limit scaled by capability sigma (control chart algorithms)
CpU: The distance between the process mean and the upper specification limit scaled by capability sigma (control chart algorithms)
K: The deviation of the process mean from the midpoint of the specification limits (control chart algorithms)
CpK: Capability of process related to both dispersion and centeredness (control chart algorithms)
CR: The reciprocal of CP (control chart algorithms)
CpM: An index relating capability sigma and the difference between the process mean and the target value (control chart algorithms)
Z-lower (Cap): The number of capability sigmas between the process mean and the lower specification limit (control chart algorithms)
Z-upper (Cap): The number of capability sigmas between the process mean and the upper specification limit (control chart algorithms)
Z-min (Cap): The minimum number of capability sigmas between the process mean and the specification limits (control chart algorithms)
Z-max (Cap): The maximum number of capability sigmas between the process mean and the specification limits (control chart algorithms)
The estimated percentage outside the specification limits (Cap) (control chart algorithms)
PP: Performance of the process (control chart algorithms)
PpL: The distance between the process mean and the lower specification limit scaled by process standard deviation (control chart algorithms)
PpU: The distance between the process mean and the upper specification limit scaled by process standard deviation (control chart algorithms)
PpK: Performance of process related to both dispersion and centeredness (control chart algorithms)
PR: The reciprocal of PP (control chart algorithms)
PpM: An index relating process variance and the difference between the process mean and the target value (control chart algorithms)
Z-lower (Perf): The number of standard deviations between the process mean and the lower specification limit (control chart algorithms)
Z-upper (Perf): The number of standard deviations between the process mean and the upper specification limit (control chart algorithms)
Z-min (Perf): The minimum number of standard deviations between the process mean and the specification limits (control chart algorithms)
Z-max (Perf): The maximum number of standard deviations between the process mean and the specification limits (control chart algorithms)
The estimated percentage outside the specification limits (Perf) (control chart algorithms)
Measure(s) for Assessing Normality: The observed percentage outside the specification limits (control chart algorithms)


PP: Performance of the process (control chart algorithms)

PP= USL − LSL 6s

Related Topics

Statistics (control chart algorithms)
Assumptions (control chart algorithms)
Prerequisites (control chart algorithms)
Process Capability Indices (control chart algorithms)
CP: Capability of the process (control chart algorithms)
CpL: The distance between the process mean and the lower specification limit scaled by capability sigma (control chart algorithms)
CpU: The distance between the process mean and the upper specification limit scaled by capability sigma (control chart algorithms)
K: The deviation of the process mean from the midpoint of the specification limits (control chart algorithms)
CpK: Capability of process related to both dispersion and centeredness (control chart algorithms)
CR: The reciprocal of CP (control chart algorithms)
CpM: An index relating capability sigma and the difference between the process mean and the target value (control chart algorithms)
Z-lower (Cap): The number of capability sigmas between the process mean and the lower specification limit (control chart algorithms)
Z-upper (Cap): The number of capability sigmas between the process mean and the upper specification limit (control chart algorithms)
Z-min (Cap): The minimum number of capability sigmas between the process mean and the specification limits (control chart algorithms)
Z-max (Cap): The maximum number of capability sigmas between the process mean and the specification limits (control chart algorithms)
The estimated percentage outside the specification limits (Cap) (control chart algorithms)
Process Performance Indices (control chart algorithms)
PpL: The distance between the process mean and the lower specification limit scaled by process standard deviation (control chart algorithms)
PpU: The distance between the process mean and the upper specification limit scaled by process standard deviation (control chart algorithms)
PpK: Performance of process related to both dispersion and centeredness (control chart algorithms)
PR: The reciprocal of PP (control chart algorithms)
PpM: An index relating process variance and the difference between the process mean and the target value (control chart algorithms)
Z-lower (Perf): The number of standard deviations between the process mean and the lower specification limit (control chart algorithms)
Z-upper (Perf): The number of standard deviations between the process mean and the upper specification limit (control chart algorithms)
Z-min (Perf): The minimum number of standard deviations between the process mean and the specification limits (control chart algorithms)
Z-max (Perf): The maximum number of standard deviations between the process mean and the specification limits (control chart algorithms)
The estimated percentage outside the specification limits (Perf) (control chart algorithms)
Measure(s) for Assessing Normality: The observed percentage outside the specification limits (control chart algorithms)


PpL: The distance between the process mean and the lower specification limit scaled by process standard deviation (control chart algorithms)

PpL=x− LSL 3s

Related Topics

Statistics (control chart algorithms)
Assumptions (control chart algorithms)
Prerequisites (control chart algorithms)
Process Capability Indices (control chart algorithms)
CP: Capability of the process (control chart algorithms)
CpL: The distance between the process mean and the lower specification limit scaled by capability sigma (control chart algorithms)
CpU: The distance between the process mean and the upper specification limit scaled by capability sigma (control chart algorithms)
K: The deviation of the process mean from the midpoint of the specification limits (control chart algorithms)
CpK: Capability of process related to both dispersion and centeredness (control chart algorithms)
CR: The reciprocal of CP (control chart algorithms)
CpM: An index relating capability sigma and the difference between the process mean and the target value (control chart algorithms)
Z-lower (Cap): The number of capability sigmas between the process mean and the lower specification limit (control chart algorithms)
Z-upper (Cap): The number of capability sigmas between the process mean and the upper specification limit (control chart algorithms)
Z-min (Cap): The minimum number of capability sigmas between the process mean and the specification limits (control chart algorithms)
Z-max (Cap): The maximum number of capability sigmas between the process mean and the specification limits (control chart algorithms)
The estimated percentage outside the specification limits (Cap) (control chart algorithms)
Process Performance Indices (control chart algorithms)
PP: Performance of the process (control chart algorithms)
PpU: The distance between the process mean and the upper specification limit scaled by process standard deviation (control chart algorithms)
PpK: Performance of process related to both dispersion and centeredness (control chart algorithms)
PR: The reciprocal of PP (control chart algorithms)
PpM: An index relating process variance and the difference between the process mean and the target value (control chart algorithms)
Z-lower (Perf): The number of standard deviations between the process mean and the lower specification limit (control chart algorithms)
Z-upper (Perf): The number of standard deviations between the process mean and the upper specification limit (control chart algorithms)
Z-min (Perf): The minimum number of standard deviations between the process mean and the specification limits (control chart algorithms)
Z-max (Perf): The maximum number of standard deviations between the process mean and the specification limits (control chart algorithms)
The estimated percentage outside the specification limits (Perf) (control chart algorithms)
Measure(s) for Assessing Normality: The observed percentage outside the specification limits (control chart algorithms)


PpU: The distance between the process mean and the upper specification limit scaled by process standard deviation (control chart algorithms)

PpU= USL −x3s

Related Topics

Statistics (control chart algorithms)
Assumptions (control chart algorithms)
Prerequisites (control chart algorithms)
Process Capability Indices (control chart algorithms)
CP: Capability of the process (control chart algorithms)
CpL: The distance between the process mean and the lower specification limit scaled by capability sigma (control chart algorithms)
CpU: The distance between the process mean and the upper specification limit scaled by capability sigma (control chart algorithms)
K: The deviation of the process mean from the midpoint of the specification limits (control chart algorithms)
CpK: Capability of process related to both dispersion and centeredness (control chart algorithms)
CR: The reciprocal of CP (control chart algorithms)
CpM: An index relating capability sigma and the difference between the process mean and the target value (control chart algorithms)
Z-lower (Cap): The number of capability sigmas between the process mean and the lower specification limit (control chart algorithms)
Z-upper (Cap): The number of capability sigmas between the process mean and the upper specification limit (control chart algorithms)
Z-min (Cap): The minimum number of capability sigmas between the process mean and the specification limits (control chart algorithms)
Z-max (Cap): The maximum number of capability sigmas between the process mean and the specification limits (control chart algorithms)
The estimated percentage outside the specification limits (Cap) (control chart algorithms)
Process Performance Indices (control chart algorithms)
PP: Performance of the process (control chart algorithms)
PpL: The distance between the process mean and the lower specification limit scaled by process standard deviation (control chart algorithms)
PpK: Performance of process related to both dispersion and centeredness (control chart algorithms)
PR: The reciprocal of PP (control chart algorithms)
PpM: An index relating process variance and the difference between the process mean and the target value (control chart algorithms)
Z-lower (Perf): The number of standard deviations between the process mean and the lower specification limit (control chart algorithms)
Z-upper (Perf): The number of standard deviations between the process mean and the upper specification limit (control chart algorithms)
Z-min (Perf): The minimum number of standard deviations between the process mean and the specification limits (control chart algorithms)
Z-max (Perf): The maximum number of standard deviations between the process mean and the specification limits (control chart algorithms)
The estimated percentage outside the specification limits (Perf) (control chart algorithms)
Measure(s) for Assessing Normality: The observed percentage outside the specification limits (control chart algorithms)


PpK: Performance of process related to both dispersion and centeredness (control chart algorithms)

PpK=min(PpU,PpL)

If only one specification limit is provided, we compute and report a unilateral PpK instead of taking the minimum.

Related Topics

Statistics (control chart algorithms)
Assumptions (control chart algorithms)
Prerequisites (control chart algorithms)
Process Capability Indices (control chart algorithms)
CP: Capability of the process (control chart algorithms)
CpL: The distance between the process mean and the lower specification limit scaled by capability sigma (control chart algorithms)
CpU: The distance between the process mean and the upper specification limit scaled by capability sigma (control chart algorithms)
K: The deviation of the process mean from the midpoint of the specification limits (control chart algorithms)
CpK: Capability of process related to both dispersion and centeredness (control chart algorithms)
CR: The reciprocal of CP (control chart algorithms)
CpM: An index relating capability sigma and the difference between the process mean and the target value (control chart algorithms)
Z-lower (Cap): The number of capability sigmas between the process mean and the lower specification limit (control chart algorithms)
Z-upper (Cap): The number of capability sigmas between the process mean and the upper specification limit (control chart algorithms)
Z-min (Cap): The minimum number of capability sigmas between the process mean and the specification limits (control chart algorithms)
Z-max (Cap): The maximum number of capability sigmas between the process mean and the specification limits (control chart algorithms)
The estimated percentage outside the specification limits (Cap) (control chart algorithms)
Process Performance Indices (control chart algorithms)
PP: Performance of the process (control chart algorithms)
PpL: The distance between the process mean and the lower specification limit scaled by process standard deviation (control chart algorithms)
PpU: The distance between the process mean and the upper specification limit scaled by process standard deviation (control chart algorithms)
PR: The reciprocal of PP (control chart algorithms)
PpM: An index relating process variance and the difference between the process mean and the target value (control chart algorithms)
Z-lower (Perf): The number of standard deviations between the process mean and the lower specification limit (control chart algorithms)
Z-upper (Perf): The number of standard deviations between the process mean and the upper specification limit (control chart algorithms)
Z-min (Perf): The minimum number of standard deviations between the process mean and the specification limits (control chart algorithms)
Z-max (Perf): The maximum number of standard deviations between the process mean and the specification limits (control chart algorithms)
The estimated percentage outside the specification limits (Perf) (control chart algorithms)
Measure(s) for Assessing Normality: The observed percentage outside the specification limits (control chart algorithms)


PR: The reciprocal of PP (control chart algorithms)

PR=1PP

Related Topics

Statistics (control chart algorithms)
Assumptions (control chart algorithms)
Prerequisites (control chart algorithms)
Process Capability Indices (control chart algorithms)
CP: Capability of the process (control chart algorithms)
CpL: The distance between the process mean and the lower specification limit scaled by capability sigma (control chart algorithms)
CpU: The distance between the process mean and the upper specification limit scaled by capability sigma (control chart algorithms)
K: The deviation of the process mean from the midpoint of the specification limits (control chart algorithms)
CpK: Capability of process related to both dispersion and centeredness (control chart algorithms)
CR: The reciprocal of CP (control chart algorithms)
CpM: An index relating capability sigma and the difference between the process mean and the target value (control chart algorithms)
Z-lower (Cap): The number of capability sigmas between the process mean and the lower specification limit (control chart algorithms)
Z-upper (Cap): The number of capability sigmas between the process mean and the upper specification limit (control chart algorithms)
Z-min (Cap): The minimum number of capability sigmas between the process mean and the specification limits (control chart algorithms)
Z-max (Cap): The maximum number of capability sigmas between the process mean and the specification limits (control chart algorithms)
The estimated percentage outside the specification limits (Cap) (control chart algorithms)
Process Performance Indices (control chart algorithms)
PP: Performance of the process (control chart algorithms)
PpL: The distance between the process mean and the lower specification limit scaled by process standard deviation (control chart algorithms)
PpU: The distance between the process mean and the upper specification limit scaled by process standard deviation (control chart algorithms)
PpK: Performance of process related to both dispersion and centeredness (control chart algorithms)
PpM: An index relating process variance and the difference between the process mean and the target value (control chart algorithms)
Z-lower (Perf): The number of standard deviations between the process mean and the lower specification limit (control chart algorithms)
Z-upper (Perf): The number of standard deviations between the process mean and the upper specification limit (control chart algorithms)
Z-min (Perf): The minimum number of standard deviations between the process mean and the specification limits (control chart algorithms)
Z-max (Perf): The maximum number of standard deviations between the process mean and the specification limits (control chart algorithms)
The estimated percentage outside the specification limits (Perf) (control chart algorithms)
Measure(s) for Assessing Normality: The observed percentage outside the specification limits (control chart algorithms)


PpM: An index relating process variance and the difference between the process mean and the target value (control chart algorithms)

PpM= USL − LSL 6
√ s2+(x−μo)2

μo must be given by the user.

Related Topics

Statistics (control chart algorithms)
Assumptions (control chart algorithms)
Prerequisites (control chart algorithms)
Process Capability Indices (control chart algorithms)
CP: Capability of the process (control chart algorithms)
CpL: The distance between the process mean and the lower specification limit scaled by capability sigma (control chart algorithms)
CpU: The distance between the process mean and the upper specification limit scaled by capability sigma (control chart algorithms)
K: The deviation of the process mean from the midpoint of the specification limits (control chart algorithms)
CpK: Capability of process related to both dispersion and centeredness (control chart algorithms)
CR: The reciprocal of CP (control chart algorithms)
CpM: An index relating capability sigma and the difference between the process mean and the target value (control chart algorithms)
Z-lower (Cap): The number of capability sigmas between the process mean and the lower specification limit (control chart algorithms)
Z-upper (Cap): The number of capability sigmas between the process mean and the upper specification limit (control chart algorithms)
Z-min (Cap): The minimum number of capability sigmas between the process mean and the specification limits (control chart algorithms)
Z-max (Cap): The maximum number of capability sigmas between the process mean and the specification limits (control chart algorithms)
The estimated percentage outside the specification limits (Cap) (control chart algorithms)
Process Performance Indices (control chart algorithms)
PP: Performance of the process (control chart algorithms)
PpL: The distance between the process mean and the lower specification limit scaled by process standard deviation (control chart algorithms)
PpU: The distance between the process mean and the upper specification limit scaled by process standard deviation (control chart algorithms)
PpK: Performance of process related to both dispersion and centeredness (control chart algorithms)
PR: The reciprocal of PP (control chart algorithms)
Z-lower (Perf): The number of standard deviations between the process mean and the lower specification limit (control chart algorithms)
Z-upper (Perf): The number of standard deviations between the process mean and the upper specification limit (control chart algorithms)
Z-min (Perf): The minimum number of standard deviations between the process mean and the specification limits (control chart algorithms)
Z-max (Perf): The maximum number of standard deviations between the process mean and the specification limits (control chart algorithms)
The estimated percentage outside the specification limits (Perf) (control chart algorithms)
Measure(s) for Assessing Normality: The observed percentage outside the specification limits (control chart algorithms)


Z-lower (Perf): The number of standard deviations between the process mean and the lower specification limit (control chart algorithms)

PZL=x− LSL s

Related Topics

Statistics (control chart algorithms)
Assumptions (control chart algorithms)
Prerequisites (control chart algorithms)
Process Capability Indices (control chart algorithms)
CP: Capability of the process (control chart algorithms)
CpL: The distance between the process mean and the lower specification limit scaled by capability sigma (control chart algorithms)
CpU: The distance between the process mean and the upper specification limit scaled by capability sigma (control chart algorithms)
K: The deviation of the process mean from the midpoint of the specification limits (control chart algorithms)
CpK: Capability of process related to both dispersion and centeredness (control chart algorithms)
CR: The reciprocal of CP (control chart algorithms)
CpM: An index relating capability sigma and the difference between the process mean and the target value (control chart algorithms)
Z-lower (Cap): The number of capability sigmas between the process mean and the lower specification limit (control chart algorithms)
Z-upper (Cap): The number of capability sigmas between the process mean and the upper specification limit (control chart algorithms)
Z-min (Cap): The minimum number of capability sigmas between the process mean and the specification limits (control chart algorithms)
Z-max (Cap): The maximum number of capability sigmas between the process mean and the specification limits (control chart algorithms)
The estimated percentage outside the specification limits (Cap) (control chart algorithms)
Process Performance Indices (control chart algorithms)
PP: Performance of the process (control chart algorithms)
PpL: The distance between the process mean and the lower specification limit scaled by process standard deviation (control chart algorithms)
PpU: The distance between the process mean and the upper specification limit scaled by process standard deviation (control chart algorithms)
PpK: Performance of process related to both dispersion and centeredness (control chart algorithms)
PR: The reciprocal of PP (control chart algorithms)
PpM: An index relating process variance and the difference between the process mean and the target value (control chart algorithms)
Z-upper (Perf): The number of standard deviations between the process mean and the upper specification limit (control chart algorithms)
Z-min (Perf): The minimum number of standard deviations between the process mean and the specification limits (control chart algorithms)
Z-max (Perf): The maximum number of standard deviations between the process mean and the specification limits (control chart algorithms)
The estimated percentage outside the specification limits (Perf) (control chart algorithms)
Measure(s) for Assessing Normality: The observed percentage outside the specification limits (control chart algorithms)


Z-upper (Perf): The number of standard deviations between the process mean and the upper specification limit (control chart algorithms)

PZU= USL −xs

Related Topics

Statistics (control chart algorithms)
Assumptions (control chart algorithms)
Prerequisites (control chart algorithms)
Process Capability Indices (control chart algorithms)
CP: Capability of the process (control chart algorithms)
CpL: The distance between the process mean and the lower specification limit scaled by capability sigma (control chart algorithms)
CpU: The distance between the process mean and the upper specification limit scaled by capability sigma (control chart algorithms)
K: The deviation of the process mean from the midpoint of the specification limits (control chart algorithms)
CpK: Capability of process related to both dispersion and centeredness (control chart algorithms)
CR: The reciprocal of CP (control chart algorithms)
CpM: An index relating capability sigma and the difference between the process mean and the target value (control chart algorithms)
Z-lower (Cap): The number of capability sigmas between the process mean and the lower specification limit (control chart algorithms)
Z-upper (Cap): The number of capability sigmas between the process mean and the upper specification limit (control chart algorithms)
Z-min (Cap): The minimum number of capability sigmas between the process mean and the specification limits (control chart algorithms)
Z-max (Cap): The maximum number of capability sigmas between the process mean and the specification limits (control chart algorithms)
The estimated percentage outside the specification limits (Cap) (control chart algorithms)
Process Performance Indices (control chart algorithms)
PP: Performance of the process (control chart algorithms)
PpL: The distance between the process mean and the lower specification limit scaled by process standard deviation (control chart algorithms)
PpU: The distance between the process mean and the upper specification limit scaled by process standard deviation (control chart algorithms)
PpK: Performance of process related to both dispersion and centeredness (control chart algorithms)
PR: The reciprocal of PP (control chart algorithms)
PpM: An index relating process variance and the difference between the process mean and the target value (control chart algorithms)
Z-lower (Perf): The number of standard deviations between the process mean and the lower specification limit (control chart algorithms)
Z-min (Perf): The minimum number of standard deviations between the process mean and the specification limits (control chart algorithms)
Z-max (Perf): The maximum number of standard deviations between the process mean and the specification limits (control chart algorithms)
The estimated percentage outside the specification limits (Perf) (control chart algorithms)
Measure(s) for Assessing Normality: The observed percentage outside the specification limits (control chart algorithms)


Z-min (Perf): The minimum number of standard deviations between the process mean and the specification limits (control chart algorithms)

PZmin=min(PZU,PZL)

Note that unlike PpK, this index is undefined unless both specification limits are given and valid.

Related Topics

Statistics (control chart algorithms)
Assumptions (control chart algorithms)
Prerequisites (control chart algorithms)
Process Capability Indices (control chart algorithms)
CP: Capability of the process (control chart algorithms)
CpL: The distance between the process mean and the lower specification limit scaled by capability sigma (control chart algorithms)
CpU: The distance between the process mean and the upper specification limit scaled by capability sigma (control chart algorithms)
K: The deviation of the process mean from the midpoint of the specification limits (control chart algorithms)
CpK: Capability of process related to both dispersion and centeredness (control chart algorithms)
CR: The reciprocal of CP (control chart algorithms)
CpM: An index relating capability sigma and the difference between the process mean and the target value (control chart algorithms)
Z-lower (Cap): The number of capability sigmas between the process mean and the lower specification limit (control chart algorithms)
Z-upper (Cap): The number of capability sigmas between the process mean and the upper specification limit (control chart algorithms)
Z-min (Cap): The minimum number of capability sigmas between the process mean and the specification limits (control chart algorithms)
Z-max (Cap): The maximum number of capability sigmas between the process mean and the specification limits (control chart algorithms)
The estimated percentage outside the specification limits (Cap) (control chart algorithms)
Process Performance Indices (control chart algorithms)
PP: Performance of the process (control chart algorithms)
PpL: The distance between the process mean and the lower specification limit scaled by process standard deviation (control chart algorithms)
PpU: The distance between the process mean and the upper specification limit scaled by process standard deviation (control chart algorithms)
PpK: Performance of process related to both dispersion and centeredness (control chart algorithms)
PR: The reciprocal of PP (control chart algorithms)
PpM: An index relating process variance and the difference between the process mean and the target value (control chart algorithms)
Z-lower (Perf): The number of standard deviations between the process mean and the lower specification limit (control chart algorithms)
Z-upper (Perf): The number of standard deviations between the process mean and the upper specification limit (control chart algorithms)
Z-max (Perf): The maximum number of standard deviations between the process mean and the specification limits (control chart algorithms)
The estimated percentage outside the specification limits (Perf) (control chart algorithms)
Measure(s) for Assessing Normality: The observed percentage outside the specification limits (control chart algorithms)


Z-max (Perf): The maximum number of standard deviations between the process mean and the specification limits (control chart algorithms)

PZmax=max(PZU,PZL)

Note that unlike PpK, this index is undefined unless both specification limits are given and valid.

Related Topics

Statistics (control chart algorithms)
Assumptions (control chart algorithms)
Prerequisites (control chart algorithms)
Process Capability Indices (control chart algorithms)
CP: Capability of the process (control chart algorithms)
CpL: The distance between the process mean and the lower specification limit scaled by capability sigma (control chart algorithms)
CpU: The distance between the process mean and the upper specification limit scaled by capability sigma (control chart algorithms)
K: The deviation of the process mean from the midpoint of the specification limits (control chart algorithms)
CpK: Capability of process related to both dispersion and centeredness (control chart algorithms)
CR: The reciprocal of CP (control chart algorithms)
CpM: An index relating capability sigma and the difference between the process mean and the target value (control chart algorithms)
Z-lower (Cap): The number of capability sigmas between the process mean and the lower specification limit (control chart algorithms)
Z-upper (Cap): The number of capability sigmas between the process mean and the upper specification limit (control chart algorithms)
Z-min (Cap): The minimum number of capability sigmas between the process mean and the specification limits (control chart algorithms)
Z-max (Cap): The maximum number of capability sigmas between the process mean and the specification limits (control chart algorithms)
The estimated percentage outside the specification limits (Cap) (control chart algorithms)
Process Performance Indices (control chart algorithms)
PP: Performance of the process (control chart algorithms)
PpL: The distance between the process mean and the lower specification limit scaled by process standard deviation (control chart algorithms)
PpU: The distance between the process mean and the upper specification limit scaled by process standard deviation (control chart algorithms)
PpK: Performance of process related to both dispersion and centeredness (control chart algorithms)
PR: The reciprocal of PP (control chart algorithms)
PpM: An index relating process variance and the difference between the process mean and the target value (control chart algorithms)
Z-lower (Perf): The number of standard deviations between the process mean and the lower specification limit (control chart algorithms)
Z-upper (Perf): The number of standard deviations between the process mean and the upper specification limit (control chart algorithms)
Z-min (Perf): The minimum number of standard deviations between the process mean and the specification limits (control chart algorithms)
The estimated percentage outside the specification limits (Perf) (control chart algorithms)
Measure(s) for Assessing Normality: The observed percentage outside the specification limits (control chart algorithms)


The estimated percentage outside the specification limits (Perf) (control chart algorithms)

(1−Φ(PZU)+Φ(−PZL))×100%

where Φ(x) is the cumulative distribution function of the standard normal distribution.

Related Topics

Statistics (control chart algorithms)
Assumptions (control chart algorithms)
Prerequisites (control chart algorithms)
Process Capability Indices (control chart algorithms)
CP: Capability of the process (control chart algorithms)
CpL: The distance between the process mean and the lower specification limit scaled by capability sigma (control chart algorithms)
CpU: The distance between the process mean and the upper specification limit scaled by capability sigma (control chart algorithms)
K: The deviation of the process mean from the midpoint of the specification limits (control chart algorithms)
CpK: Capability of process related to both dispersion and centeredness (control chart algorithms)
CR: The reciprocal of CP (control chart algorithms)
CpM: An index relating capability sigma and the difference between the process mean and the target value (control chart algorithms)
Z-lower (Cap): The number of capability sigmas between the process mean and the lower specification limit (control chart algorithms)
Z-upper (Cap): The number of capability sigmas between the process mean and the upper specification limit (control chart algorithms)
Z-min (Cap): The minimum number of capability sigmas between the process mean and the specification limits (control chart algorithms)
Z-max (Cap): The maximum number of capability sigmas between the process mean and the specification limits (control chart algorithms)
The estimated percentage outside the specification limits (Cap) (control chart algorithms)
Process Performance Indices (control chart algorithms)
PP: Performance of the process (control chart algorithms)
PpL: The distance between the process mean and the lower specification limit scaled by process standard deviation (control chart algorithms)
PpU: The distance between the process mean and the upper specification limit scaled by process standard deviation (control chart algorithms)
PpK: Performance of process related to both dispersion and centeredness (control chart algorithms)
PR: The reciprocal of PP (control chart algorithms)
PpM: An index relating process variance and the difference between the process mean and the target value (control chart algorithms)
Z-lower (Perf): The number of standard deviations between the process mean and the lower specification limit (control chart algorithms)
Z-upper (Perf): The number of standard deviations between the process mean and the upper specification limit (control chart algorithms)
Z-min (Perf): The minimum number of standard deviations between the process mean and the specification limits (control chart algorithms)
Z-max (Perf): The maximum number of standard deviations between the process mean and the specification limits (control chart algorithms)
Measure(s) for Assessing Normality: The observed percentage outside the specification limits (control chart algorithms)


Measure(s) for Assessing Normality: The observed percentage outside the specification limits (control chart algorithms)

This is the percentage of individual observations in the process which lie outside the specification limits. A point is defined as outside the specification limits when its value is greater than the USL or is less than the LSL.

Related Topics

Statistics (control chart algorithms)
Assumptions (control chart algorithms)
Prerequisites (control chart algorithms)
Process Capability Indices (control chart algorithms)
CP: Capability of the process (control chart algorithms)
CpL: The distance between the process mean and the lower specification limit scaled by capability sigma (control chart algorithms)
CpU: The distance between the process mean and the upper specification limit scaled by capability sigma (control chart algorithms)
K: The deviation of the process mean from the midpoint of the specification limits (control chart algorithms)
CpK: Capability of process related to both dispersion and centeredness (control chart algorithms)
CR: The reciprocal of CP (control chart algorithms)
CpM: An index relating capability sigma and the difference between the process mean and the target value (control chart algorithms)
Z-lower (Cap): The number of capability sigmas between the process mean and the lower specification limit (control chart algorithms)
Z-upper (Cap): The number of capability sigmas between the process mean and the upper specification limit (control chart algorithms)
Z-min (Cap): The minimum number of capability sigmas between the process mean and the specification limits (control chart algorithms)
Z-max (Cap): The maximum number of capability sigmas between the process mean and the specification limits (control chart algorithms)
The estimated percentage outside the specification limits (Cap) (control chart algorithms)
Process Performance Indices (control chart algorithms)
PP: Performance of the process (control chart algorithms)
PpL: The distance between the process mean and the lower specification limit scaled by process standard deviation (control chart algorithms)
PpU: The distance between the process mean and the upper specification limit scaled by process standard deviation (control chart algorithms)
PpK: Performance of process related to both dispersion and centeredness (control chart algorithms)
PR: The reciprocal of PP (control chart algorithms)
PpM: An index relating process variance and the difference between the process mean and the target value (control chart algorithms)
Z-lower (Perf): The number of standard deviations between the process mean and the lower specification limit (control chart algorithms)
Z-upper (Perf): The number of standard deviations between the process mean and the upper specification limit (control chart algorithms)
Z-min (Perf): The minimum number of standard deviations between the process mean and the specification limits (control chart algorithms)
Z-max (Perf): The maximum number of standard deviations between the process mean and the specification limits (control chart algorithms)
The estimated percentage outside the specification limits (Perf) (control chart algorithms)


References (control chart algorithms)

control charts algorithms,control charts algorithms,control charts algorithms
references,references,references

Committee E-11 on Quality and Statistics, . 1990. ASTM Special Technical Publication (STP) 15D: Manual on presentation of data and control chart analysis, 6 ed. Philadelphia: American Society for Testing and Materials.

Grant, E. L., and R. S. Leavenworth. 1980. Statistical quality control, 5 ed. New York: McGraw-Hill.

Harter, H. L. 1969. Order statistics and their use in testing and estimation, Volumes 1 and 2. Washington, D.C.: U.S. Government Printing Office: Aerospace Research Laboratories, United States Air Force.

Related Topics

SPCHART Algorithms
Notation (control chart algorithms)
Weight (control chart algorithms)
X-Bar and R Charts (control chart algorithms)
X-Bar and s Charts (control chart algorithms)
Individual and Moving Range Charts (control chart algorithms)
p and np Charts (control chart algorithms)
u and c Charts (control chart algorithms)
Statistics (control chart algorithms)


SPECTRA Algorithms

SPECTRA (command),SPECTRA (command),SPECTRA (command)
algorithms,algorithms,algorithms
Spectral Plots,Spectral Plots,Spectral Plots
algorithms,algorithms,algorithms
spectral analysis algorithms,spectral analysis algorithms,spectral analysis algorithms

SPECTRA plots the periodogram and spectral density function estimates for one or more series.

Related Topics

Univariate Series (spectral analysis algorithms)
Bivariate Series (spectral analysis algorithms)
Data Windows (spectral analysis algorithms)
References (spectral analysis algorithms)


Univariate Series (spectral analysis algorithms)

spectral analysis algorithms,spectral analysis algorithms,spectral analysis algorithms
univariate series,univariate series,univariate series

For all t, the series Xt can be represented by

Xt=ax0+qΣK=1(axKcos2πfK(t−1)+bxKsin2πfK(t−1))

where

t=1,2,...,N
ax0=X, X=NΣt=1Xt/N
axK=2N[NΣt=1(Xtcos2π fK(t−1))]
bxK=2N[NΣt=1(Xtsin2π fK(t−1))]
fK=K/N
q={
N/2, | if N is even
(N−1)/2, | if N is odd

The following statistics are calculated:

• Frequency

• Period

• Fourier Cosine Coefficient

• Fourier Sine Coefficient

• Periodogram

Related Topics

Frequency (spectral analysis algorithms)
Period (spectral analysis algorithms)
Fourier Cosine Coefficient (spectral analysis algorithms)
Fourier Sine Coefficient (spectral analysis algorithms)
Periodogram (spectral analysis algorithms)
SPECTRA Algorithms
Bivariate Series (spectral analysis algorithms)
Data Windows (spectral analysis algorithms)
References (spectral analysis algorithms)


Frequency (spectral analysis algorithms)

spectral analysis algorithms,spectral analysis algorithms,spectral analysis algorithms
frequency,frequency,frequency
fK=K/N, K=1,...,q

Related Topics

Univariate Series (spectral analysis algorithms)
Period (spectral analysis algorithms)
Fourier Cosine Coefficient (spectral analysis algorithms)
Fourier Sine Coefficient (spectral analysis algorithms)
Periodogram (spectral analysis algorithms)


Period (spectral analysis algorithms)

spectral analysis algorithms,spectral analysis algorithms,spectral analysis algorithms
period,period,period
1/fK=N/K, K=1,...,q

Related Topics

Univariate Series (spectral analysis algorithms)
Frequency (spectral analysis algorithms)
Fourier Cosine Coefficient (spectral analysis algorithms)
Fourier Sine Coefficient (spectral analysis algorithms)
Periodogram (spectral analysis algorithms)


Fourier Cosine Coefficient (spectral analysis algorithms)

spectral analysis algorithms,spectral analysis algorithms,spectral analysis algorithms
fourier cosine coefficient,fourier cosine coefficient,fourier cosine coefficient
axK, K=1,...,q

Related Topics

Univariate Series (spectral analysis algorithms)
Frequency (spectral analysis algorithms)
Period (spectral analysis algorithms)
Fourier Sine Coefficient (spectral analysis algorithms)
Periodogram (spectral analysis algorithms)


Fourier Sine Coefficient (spectral analysis algorithms)

spectral analysis algorithms,spectral analysis algorithms,spectral analysis algorithms
fourier sine coefficient,fourier sine coefficient,fourier sine coefficient
bxK=(axK−ibxK)(axK+ibxK)

Related Topics

Univariate Series (spectral analysis algorithms)
Frequency (spectral analysis algorithms)
Period (spectral analysis algorithms)
Fourier Cosine Coefficient (spectral analysis algorithms)
Periodogram (spectral analysis algorithms)


Periodogram (spectral analysis algorithms)

spectral analysis algorithms,spectral analysis algorithms,spectral analysis algorithms
periodogram,periodogram,periodogram
lxK=[(axK)2+(bxK)2]N/2, K=1,...,q

spectral density estimate

sxK=pΣj=pwjlxK+j, where 2p+1=m (number of spans)

and

lx−K=lxK, K=1,...,q
lx0=lx1
lxK=lN+1−K for K>q

w−p, w−p+1,...,w0, w1,...,wp are the periodogram weights defined by different data windows.

Related Topics

Univariate Series (spectral analysis algorithms)
Frequency (spectral analysis algorithms)
Period (spectral analysis algorithms)
Fourier Cosine Coefficient (spectral analysis algorithms)
Fourier Sine Coefficient (spectral analysis algorithms)


Bivariate Series (spectral analysis algorithms)

spectral analysis algorithms,spectral analysis algorithms,spectral analysis algorithms
bivariate series,bivariate series,bivariate series

For the bivariate series Xt and Yt

Xt=ax0+qΣK=1(axKcos2πfKt+bxKsin2πfKt)t=1,...,N
Yt=ay0+qΣK=1(ayKcos2πfKt+byKsin2πfKt)

Related Topics

Cross-Periodogram of X and Y (spectral analysis algorithms)
Real (spectral analysis algorithms)
Imaginary (spectral analysis algorithms)
Cospectral Density Estimate (spectral analysis algorithms)
Quadrature Spectrum Estimate (spectral analysis algorithms)
Cross-amplitude Values (spectral analysis algorithms)
Squared Coherency Values (spectral analysis algorithms)
Gain Values (spectral analysis algorithms)
Phase Spectrum Estimate (spectral analysis algorithms)
SPECTRA Algorithms
Univariate Series (spectral analysis algorithms)
Data Windows (spectral analysis algorithms)
References (spectral analysis algorithms)


Cross-Periodogram of X and Y (spectral analysis algorithms)

spectral analysis algorithms,spectral analysis algorithms,spectral analysis algorithms
cross-periodogram of X and Y,cross-periodogram of X and Y,cross-periodogram of X and Y
lxyK=N2(axK−ibxK)(ayK+ibyK)
=N2{(axKayK+bxKbyK)+i(axKbyK−bxKayK)}

Related Topics

Bivariate Series (spectral analysis algorithms)
Real (spectral analysis algorithms)
Imaginary (spectral analysis algorithms)
Cospectral Density Estimate (spectral analysis algorithms)
Quadrature Spectrum Estimate (spectral analysis algorithms)
Cross-amplitude Values (spectral analysis algorithms)
Squared Coherency Values (spectral analysis algorithms)
Gain Values (spectral analysis algorithms)
Phase Spectrum Estimate (spectral analysis algorithms)


Real (spectral analysis algorithms)

(RC)K=N2(axKayK+bxKbyK)

Related Topics

Bivariate Series (spectral analysis algorithms)
Cross-Periodogram of X and Y (spectral analysis algorithms)
Imaginary (spectral analysis algorithms)
Cospectral Density Estimate (spectral analysis algorithms)
Quadrature Spectrum Estimate (spectral analysis algorithms)
Cross-amplitude Values (spectral analysis algorithms)
Squared Coherency Values (spectral analysis algorithms)
Gain Values (spectral analysis algorithms)
Phase Spectrum Estimate (spectral analysis algorithms)


Imaginary (spectral analysis algorithms)

(IC)K=N2(axKbyK−bxKayK)

Related Topics

Bivariate Series (spectral analysis algorithms)
Cross-Periodogram of X and Y (spectral analysis algorithms)
Real (spectral analysis algorithms)
Cospectral Density Estimate (spectral analysis algorithms)
Quadrature Spectrum Estimate (spectral analysis algorithms)
Cross-amplitude Values (spectral analysis algorithms)
Squared Coherency Values (spectral analysis algorithms)
Gain Values (spectral analysis algorithms)
Phase Spectrum Estimate (spectral analysis algorithms)


Cospectral Density Estimate (spectral analysis algorithms)

spectral analysis algorithms,spectral analysis algorithms,spectral analysis algorithms
cospectral density estimate,cospectral density estimate,cospectral density estimate
CK=pΣj=−pwj(RC)K+j

Related Topics

Bivariate Series (spectral analysis algorithms)
Cross-Periodogram of X and Y (spectral analysis algorithms)
Real (spectral analysis algorithms)
Imaginary (spectral analysis algorithms)
Quadrature Spectrum Estimate (spectral analysis algorithms)
Cross-amplitude Values (spectral analysis algorithms)
Squared Coherency Values (spectral analysis algorithms)
Gain Values (spectral analysis algorithms)
Phase Spectrum Estimate (spectral analysis algorithms)


Quadrature Spectrum Estimate (spectral analysis algorithms)

spectral analysis algorithms,spectral analysis algorithms,spectral analysis algorithms
quadrature spectrum estimate,quadrature spectrum estimate,quadrature spectrum estimate
QK=pΣj=−pwj(IC)K+j

Related Topics

Bivariate Series (spectral analysis algorithms)
Cross-Periodogram of X and Y (spectral analysis algorithms)
Real (spectral analysis algorithms)
Imaginary (spectral analysis algorithms)
Cospectral Density Estimate (spectral analysis algorithms)
Cross-amplitude Values (spectral analysis algorithms)
Squared Coherency Values (spectral analysis algorithms)
Gain Values (spectral analysis algorithms)
Phase Spectrum Estimate (spectral analysis algorithms)


Cross-amplitude Values (spectral analysis algorithms)

spectral analysis algorithms,spectral analysis algorithms,spectral analysis algorithms
cross-amplitude values,cross-amplitude values,cross-amplitude values
AK=(Q2K+C2K)1/2

Related Topics

Bivariate Series (spectral analysis algorithms)
Cross-Periodogram of X and Y (spectral analysis algorithms)
Real (spectral analysis algorithms)
Imaginary (spectral analysis algorithms)
Cospectral Density Estimate (spectral analysis algorithms)
Quadrature Spectrum Estimate (spectral analysis algorithms)
Squared Coherency Values (spectral analysis algorithms)
Gain Values (spectral analysis algorithms)
Phase Spectrum Estimate (spectral analysis algorithms)


Squared Coherency Values (spectral analysis algorithms)

spectral analysis algorithms,spectral analysis algorithms,spectral analysis algorithms
squared coherency values,squared coherency values,squared coherency values
KK=A2KsxKsyK

Related Topics

Bivariate Series (spectral analysis algorithms)
Cross-Periodogram of X and Y (spectral analysis algorithms)
Real (spectral analysis algorithms)
Imaginary (spectral analysis algorithms)
Cospectral Density Estimate (spectral analysis algorithms)
Quadrature Spectrum Estimate (spectral analysis algorithms)
Cross-amplitude Values (spectral analysis algorithms)
Gain Values (spectral analysis algorithms)
Phase Spectrum Estimate (spectral analysis algorithms)


Gain Values (spectral analysis algorithms)

spectral analysis algorithms,spectral analysis algorithms,spectral analysis algorithms
gain values,gain values,gain values
GK={
AK/sxK | ( gain of Yt over Xt at fK)
AK/syK | ( gain of Xt over Yt at fK)

Related Topics

Bivariate Series (spectral analysis algorithms)
Cross-Periodogram of X and Y (spectral analysis algorithms)
Real (spectral analysis algorithms)
Imaginary (spectral analysis algorithms)
Cospectral Density Estimate (spectral analysis algorithms)
Quadrature Spectrum Estimate (spectral analysis algorithms)
Cross-amplitude Values (spectral analysis algorithms)
Squared Coherency Values (spectral analysis algorithms)
Phase Spectrum Estimate (spectral analysis algorithms)


Phase Spectrum Estimate (spectral analysis algorithms)

spectral analysis algorithms,spectral analysis algorithms,spectral analysis algorithms
phase spectrum estimate,phase spectrum estimate,phase spectrum estimate
ΨK={
tan−1(QK/CK) if
QK>0, CK>0
QK<0, CK>0
tan−1(QK/CK)+π if
QK>0, CK<0
tan−1(QK/CK)−π if
QK<0, CK<0

Related Topics

Bivariate Series (spectral analysis algorithms)
Cross-Periodogram of X and Y (spectral analysis algorithms)
Real (spectral analysis algorithms)
Imaginary (spectral analysis algorithms)
Cospectral Density Estimate (spectral analysis algorithms)
Quadrature Spectrum Estimate (spectral analysis algorithms)
Cross-amplitude Values (spectral analysis algorithms)
Squared Coherency Values (spectral analysis algorithms)
Gain Values (spectral analysis algorithms)


Data Windows (spectral analysis algorithms)

spectral analysis algorithms,spectral analysis algorithms,spectral analysis algorithms
data windows,data windows,data windows

The following spectral windows can be specified. Each formula defines the upper half of the window. The lower half is symmetric with the upper half. In all formulas, p is the integer part of the number of spans divided by 2. To be concise, the formulas are expressed in terms of the Fejer kernel:

Fq(θ)={
q | θ=0, ±2π, ±4π, ...
1q(sin(qθ/2)sin(θ/2))2 | otherwise

and the Dirichlet kernel:

Dq(θ)={
2q+1 | θ=0, ±2π, ±4π, ...
sin((2q+1)θ/2)sin(θ/2) | otherwise

where q is any positive real number.

Related Topics

HAMMING (spectral analysis algorithms)
TUKEY (spectral analysis algorithms)
PARZEN (spectral analysis algorithms)
BARTLETT (spectral analysis algorithms)
DANIELL UNIT (spectral analysis algorithms)
NONE (spectral analysis algorithms)
SPECTRA Algorithms
Univariate Series (spectral analysis algorithms)
Bivariate Series (spectral analysis algorithms)
References (spectral analysis algorithms)


HAMMING (spectral analysis algorithms)

spectral analysis algorithms,spectral analysis algorithms,spectral analysis algorithms
HAMMING,HAMMING,HAMMING

Tukey-Hamming window. The weights are

Wk=0.54Dp(2πfk)+0.23Dp(2πfk+πp)+0.23Dp(2πfk−πp)

for k=0,...,p.

Related Topics

Data Windows (spectral analysis algorithms)
TUKEY (spectral analysis algorithms)
PARZEN (spectral analysis algorithms)
BARTLETT (spectral analysis algorithms)
DANIELL UNIT (spectral analysis algorithms)
NONE (spectral analysis algorithms)


TUKEY (spectral analysis algorithms)

spectral analysis algorithms,spectral analysis algorithms,spectral analysis algorithms
TUKEY,TUKEY,TUKEY

Tukey-Hanning window. The weights are

Wk=0.5Dp(2πfk)+0.25Dp(2πfk+πp)+0.25Dp(2πfk−πp)

for k=0,...,p.

Related Topics

Data Windows (spectral analysis algorithms)
HAMMING (spectral analysis algorithms)
PARZEN (spectral analysis algorithms)
BARTLETT (spectral analysis algorithms)
DANIELL UNIT (spectral analysis algorithms)
NONE (spectral analysis algorithms)


PARZEN (spectral analysis algorithms)

spectral analysis algorithms,spectral analysis algorithms,spectral analysis algorithms
PARZEN,PARZEN,PARZEN

Parzen window. The weights are

Wk=1p(2+cos(2πfk))(Fp/2(2πfk))2

for k=0,...,p.

Related Topics

Data Windows (spectral analysis algorithms)
HAMMING (spectral analysis algorithms)
TUKEY (spectral analysis algorithms)
BARTLETT (spectral analysis algorithms)
DANIELL UNIT (spectral analysis algorithms)
NONE (spectral analysis algorithms)


BARTLETT (spectral analysis algorithms)

spectral analysis algorithms,spectral analysis algorithms,spectral analysis algorithms
BARTLETT,BARTLETT,BARTLETT

Bartlett window. The weights are

Wk=Fp(2πfk)

for k=0,...,p.

Related Topics

Data Windows (spectral analysis algorithms)
HAMMING (spectral analysis algorithms)
TUKEY (spectral analysis algorithms)
PARZEN (spectral analysis algorithms)
DANIELL UNIT (spectral analysis algorithms)
NONE (spectral analysis algorithms)


DANIELL UNIT (spectral analysis algorithms)

spectral analysis algorithms,spectral analysis algorithms,spectral analysis algorithms
DANIELL UNIT,DANIELL UNIT,DANIELL UNIT

Daniell window or rectangular window. The weights are

Wk=1

for k=0,...,p.

Related Topics

Data Windows (spectral analysis algorithms)
HAMMING (spectral analysis algorithms)
TUKEY (spectral analysis algorithms)
PARZEN (spectral analysis algorithms)
BARTLETT (spectral analysis algorithms)
NONE (spectral analysis algorithms)


NONE (spectral analysis algorithms)

spectral analysis algorithms,spectral analysis algorithms,spectral analysis algorithms
NONE,NONE,NONE

No smoothing. If NONE is specified, the spectral density estimate is the same as the periodogram. It is also the case when the number of span is 1.

W−p,..., W0,..., Wp

User-specified weights. If the number of weights is odd, the middle weight is applied to the periodogram value being smoothed and the weights on either side are applied to preceding and following values. If the number of weights are even (it is assumed that Wp is not supplied), the weight after the middle applies to the periodogram value being smoothed. It is required that the weight W0 must be positive.

Related Topics

Data Windows (spectral analysis algorithms)
HAMMING (spectral analysis algorithms)
TUKEY (spectral analysis algorithms)
PARZEN (spectral analysis algorithms)
BARTLETT (spectral analysis algorithms)
DANIELL UNIT (spectral analysis algorithms)


References (spectral analysis algorithms)

spectral analysis algorithms,spectral analysis algorithms,spectral analysis algorithms
references,references,references

Bloomfield, P. 1976. Fourier analysis of time series. New York: John Wiley and Sons.

Fuller, W. A. 1976. Introduction to statistical time series. New York: John Wiley and Sons.

Related Topics

SPECTRA Algorithms
Univariate Series (spectral analysis algorithms)
Bivariate Series (spectral analysis algorithms)
Data Windows (spectral analysis algorithms)


SURVIVAL Algorithms

SURVIVAL (command),SURVIVAL (command),SURVIVAL (command)
algorithms,algorithms,algorithms
Life Tables,Life Tables,Life Tables
algorithms,algorithms,algorithms
life tables algorithms,life tables algorithms,life tables algorithms

Although life table analysis may be useful in many differing situations and disciplines, for simplicity, the usual survival-time-to-death terminology will be used here.

Related Topics

Notation (life tables algorithms)
Construction of Life Table (Gehan, 1975) (life tables algorithms)
Comparison of Survival Distributions (life tables algorithms)
Notation (life tables algorithms)
Computations (life tables algorithms)
Test Statistic and Significance (Wilcoxon (Gehan)) (life tables algorithms)
References (life tables algorithms)


Notation (life tables algorithms)

life tables algorithms,life tables algorithms,life tables algorithms
notation,notation,notation

The following notation is used throughout this chapter unless otherwise stated:

Xj | Time from starting event to terminal event or censoring for case j
wj | Weight for case j
k | Total number of intervals
ti | Beginning time for ith interval
hi | Width of interval i
ci | Sum of weights of cases censored in interval i
di | Sum of weights of cases experiencing the terminal event in interval i

Related Topics

SURVIVAL Algorithms
Construction of Life Table (Gehan, 1975) (life tables algorithms)
Comparison of Survival Distributions (life tables algorithms)
Notation (life tables algorithms)
Computations (life tables algorithms)
Test Statistic and Significance (Wilcoxon (Gehan)) (life tables algorithms)
References (life tables algorithms)


Construction of Life Table (Gehan, 1975) (life tables algorithms)

life tables algorithms,life tables algorithms,life tables algorithms
table construction,table construction,table construction

The following sections detail the construction of the life table.

Related Topics

SURVIVAL Algorithms
Notation (life tables algorithms)
Comparison of Survival Distributions (life tables algorithms)
Notation (life tables algorithms)
Computations (life tables algorithms)
Test Statistic and Significance (Wilcoxon (Gehan)) (life tables algorithms)
References (life tables algorithms)
Computation of Intervals (life tables algorithms)
Count of Events and Censoring (life tables algorithms)
Calculation of Survival Functions (life tables algorithms)
Number Alive at the Beginning (life tables algorithms)
Number Exposed to Risk of an Event (life tables algorithms)
Proportion Terminating (life tables algorithms)
Proportion Surviving (life tables algorithms)
Cumulative Proportion Surviving at End of Interval (life tables algorithms)
Probability Density Function (life tables algorithms)
Hazard Rate (life tables algorithms)
Standard Error of Probability Surviving (life tables algorithms)
Standard Error of Probability Density (life tables algorithms)
Standard Error of the Hazard Rate (life tables algorithms)
Median Survival Time


Computation of Intervals (life tables algorithms)

The widths of the intervals for the actuarial calculations must be defined by the user. In addition to the last interval specified, an additional interval is automatically created to take care of any times exceeding the last. If the upper limits are not in ascending order, a message is printed and the procedure stops. If the interval width does not divide the time range into an integral number of intervals, a warning is printed and the interval width is reset so that the number of intervals will be the nearest integer to that resulting from the user specification.

Related Topics

Construction of Life Table (Gehan, 1975) (life tables algorithms)
Count of Events and Censoring (life tables algorithms)
Calculation of Survival Functions (life tables algorithms)
Number Alive at the Beginning (life tables algorithms)
Number Exposed to Risk of an Event (life tables algorithms)
Proportion Terminating (life tables algorithms)
Proportion Surviving (life tables algorithms)
Cumulative Proportion Surviving at End of Interval (life tables algorithms)
Probability Density Function (life tables algorithms)
Hazard Rate (life tables algorithms)
Standard Error of Probability Surviving (life tables algorithms)
Standard Error of Probability Density (life tables algorithms)
Standard Error of the Hazard Rate (life tables algorithms)
Median Survival Time


Count of Events and Censoring (life tables algorithms)

For each case, the interval i into which the survival time falls is determined.

ti≤Xj<ti+1

If Xj exceeds tk, the starting time for the last interval, it is included in the last interval. The status code is examined to determine whether the observed time is time to event or time to censoring. If it is time to censoring, that is, the terminal event did not occur, ci is incremented by the case weight. If it is time to event, di is incremented by the case weight.

Related Topics

Construction of Life Table (Gehan, 1975) (life tables algorithms)
Computation of Intervals (life tables algorithms)
Calculation of Survival Functions (life tables algorithms)
Number Alive at the Beginning (life tables algorithms)
Number Exposed to Risk of an Event (life tables algorithms)
Proportion Terminating (life tables algorithms)
Proportion Surviving (life tables algorithms)
Cumulative Proportion Surviving at End of Interval (life tables algorithms)
Probability Density Function (life tables algorithms)
Hazard Rate (life tables algorithms)
Standard Error of Probability Surviving (life tables algorithms)
Standard Error of Probability Density (life tables algorithms)
Standard Error of the Hazard Rate (life tables algorithms)
Median Survival Time


Calculation of Survival Functions (life tables algorithms)

For each interval, the following are calculated.

Related Topics

Construction of Life Table (Gehan, 1975) (life tables algorithms)
Computation of Intervals (life tables algorithms)
Count of Events and Censoring (life tables algorithms)
Number Alive at the Beginning (life tables algorithms)
Number Exposed to Risk of an Event (life tables algorithms)
Proportion Terminating (life tables algorithms)
Proportion Surviving (life tables algorithms)
Cumulative Proportion Surviving at End of Interval (life tables algorithms)
Probability Density Function (life tables algorithms)
Hazard Rate (life tables algorithms)
Standard Error of Probability Surviving (life tables algorithms)
Standard Error of Probability Density (life tables algorithms)
Standard Error of the Hazard Rate (life tables algorithms)
Median Survival Time


Number Alive at the Beginning (life tables algorithms)

li=li−1−ci−1−di−1

where l1 is the sum of weights of all cases in the table.

Related Topics

Construction of Life Table (Gehan, 1975) (life tables algorithms)
Computation of Intervals (life tables algorithms)
Count of Events and Censoring (life tables algorithms)
Calculation of Survival Functions (life tables algorithms)
Number Exposed to Risk of an Event (life tables algorithms)
Proportion Terminating (life tables algorithms)
Proportion Surviving (life tables algorithms)
Cumulative Proportion Surviving at End of Interval (life tables algorithms)
Probability Density Function (life tables algorithms)
Hazard Rate (life tables algorithms)
Standard Error of Probability Surviving (life tables algorithms)
Standard Error of Probability Density (life tables algorithms)
Standard Error of the Hazard Rate (life tables algorithms)
Median Survival Time


Number Exposed to Risk of an Event (life tables algorithms)

ri=li−ci/2

Related Topics

Construction of Life Table (Gehan, 1975) (life tables algorithms)
Computation of Intervals (life tables algorithms)
Count of Events and Censoring (life tables algorithms)
Calculation of Survival Functions (life tables algorithms)
Number Alive at the Beginning (life tables algorithms)
Proportion Terminating (life tables algorithms)
Proportion Surviving (life tables algorithms)
Cumulative Proportion Surviving at End of Interval (life tables algorithms)
Probability Density Function (life tables algorithms)
Hazard Rate (life tables algorithms)
Standard Error of Probability Surviving (life tables algorithms)
Standard Error of Probability Density (life tables algorithms)
Standard Error of the Hazard Rate (life tables algorithms)
Median Survival Time


Proportion Terminating (life tables algorithms)

qi=diri

Related Topics

Construction of Life Table (Gehan, 1975) (life tables algorithms)
Computation of Intervals (life tables algorithms)
Count of Events and Censoring (life tables algorithms)
Calculation of Survival Functions (life tables algorithms)
Number Alive at the Beginning (life tables algorithms)
Number Exposed to Risk of an Event (life tables algorithms)
Proportion Surviving (life tables algorithms)
Cumulative Proportion Surviving at End of Interval (life tables algorithms)
Probability Density Function (life tables algorithms)
Hazard Rate (life tables algorithms)
Standard Error of Probability Surviving (life tables algorithms)
Standard Error of Probability Density (life tables algorithms)
Standard Error of the Hazard Rate (life tables algorithms)
Median Survival Time


Proportion Surviving (life tables algorithms)

pi=1−qi

Related Topics

Construction of Life Table (Gehan, 1975) (life tables algorithms)
Computation of Intervals (life tables algorithms)
Count of Events and Censoring (life tables algorithms)
Calculation of Survival Functions (life tables algorithms)
Number Alive at the Beginning (life tables algorithms)
Number Exposed to Risk of an Event (life tables algorithms)
Proportion Terminating (life tables algorithms)
Cumulative Proportion Surviving at End of Interval (life tables algorithms)
Probability Density Function (life tables algorithms)
Hazard Rate (life tables algorithms)
Standard Error of Probability Surviving (life tables algorithms)
Standard Error of Probability Density (life tables algorithms)
Standard Error of the Hazard Rate (life tables algorithms)
Median Survival Time


Cumulative Proportion Surviving at End of Interval (life tables algorithms)

Pi=Pi−1 pi

where

P0=1

Related Topics

Construction of Life Table (Gehan, 1975) (life tables algorithms)
Computation of Intervals (life tables algorithms)
Count of Events and Censoring (life tables algorithms)
Calculation of Survival Functions (life tables algorithms)
Number Alive at the Beginning (life tables algorithms)
Number Exposed to Risk of an Event (life tables algorithms)
Proportion Terminating (life tables algorithms)
Proportion Surviving (life tables algorithms)
Probability Density Function (life tables algorithms)
Hazard Rate (life tables algorithms)
Standard Error of Probability Surviving (life tables algorithms)
Standard Error of Probability Density (life tables algorithms)
Standard Error of the Hazard Rate (life tables algorithms)
Median Survival Time


Probability Density Function (life tables algorithms)

fi=Pi−1−Pihi

Related Topics

Construction of Life Table (Gehan, 1975) (life tables algorithms)
Computation of Intervals (life tables algorithms)
Count of Events and Censoring (life tables algorithms)
Calculation of Survival Functions (life tables algorithms)
Number Alive at the Beginning (life tables algorithms)
Number Exposed to Risk of an Event (life tables algorithms)
Proportion Terminating (life tables algorithms)
Proportion Surviving (life tables algorithms)
Cumulative Proportion Surviving at End of Interval (life tables algorithms)
Hazard Rate (life tables algorithms)
Standard Error of Probability Surviving (life tables algorithms)
Standard Error of Probability Density (life tables algorithms)
Standard Error of the Hazard Rate (life tables algorithms)
Median Survival Time


Hazard Rate (life tables algorithms)

λi=2qihi(1+pi)

Related Topics

Construction of Life Table (Gehan, 1975) (life tables algorithms)
Computation of Intervals (life tables algorithms)
Count of Events and Censoring (life tables algorithms)
Calculation of Survival Functions (life tables algorithms)
Number Alive at the Beginning (life tables algorithms)
Number Exposed to Risk of an Event (life tables algorithms)
Proportion Terminating (life tables algorithms)
Proportion Surviving (life tables algorithms)
Cumulative Proportion Surviving at End of Interval (life tables algorithms)
Probability Density Function (life tables algorithms)
Standard Error of Probability Surviving (life tables algorithms)
Standard Error of Probability Density (life tables algorithms)
Standard Error of the Hazard Rate (life tables algorithms)
Median Survival Time


Standard Error of Probability Surviving (life tables algorithms)

se (Pi)=Pi
√ iΣj=1qj/(rjpj)

Related Topics

Construction of Life Table (Gehan, 1975) (life tables algorithms)
Computation of Intervals (life tables algorithms)
Count of Events and Censoring (life tables algorithms)
Calculation of Survival Functions (life tables algorithms)
Number Alive at the Beginning (life tables algorithms)
Number Exposed to Risk of an Event (life tables algorithms)
Proportion Terminating (life tables algorithms)
Proportion Surviving (life tables algorithms)
Cumulative Proportion Surviving at End of Interval (life tables algorithms)
Probability Density Function (life tables algorithms)
Hazard Rate (life tables algorithms)
Standard Error of Probability Density (life tables algorithms)
Standard Error of the Hazard Rate (life tables algorithms)
Median Survival Time


Standard Error of Probability Density (life tables algorithms)

se (fi)=Piqihi
√ i−1Σj=1qj/(rjpj)+pi/(riqi)

For the first interval

se (f1)=P1q1h1
√ p1r1q1

Related Topics

Construction of Life Table (Gehan, 1975) (life tables algorithms)
Computation of Intervals (life tables algorithms)
Count of Events and Censoring (life tables algorithms)
Calculation of Survival Functions (life tables algorithms)
Number Alive at the Beginning (life tables algorithms)
Number Exposed to Risk of an Event (life tables algorithms)
Proportion Terminating (life tables algorithms)
Proportion Surviving (life tables algorithms)
Cumulative Proportion Surviving at End of Interval (life tables algorithms)
Probability Density Function (life tables algorithms)
Hazard Rate (life tables algorithms)
Standard Error of Probability Surviving (life tables algorithms)
Standard Error of the Hazard Rate (life tables algorithms)
Median Survival Time


Standard Error of the Hazard Rate (life tables algorithms)

se (λi)=
√ λ2iriqi{1−(λihi2)2}

If qi=0, the standard error for interval i is set to 0.

Related Topics

Construction of Life Table (Gehan, 1975) (life tables algorithms)
Computation of Intervals (life tables algorithms)
Count of Events and Censoring (life tables algorithms)
Calculation of Survival Functions (life tables algorithms)
Number Alive at the Beginning (life tables algorithms)
Number Exposed to Risk of an Event (life tables algorithms)
Proportion Terminating (life tables algorithms)
Proportion Surviving (life tables algorithms)
Cumulative Proportion Surviving at End of Interval (life tables algorithms)
Probability Density Function (life tables algorithms)
Hazard Rate (life tables algorithms)
Standard Error of Probability Surviving (life tables algorithms)
Standard Error of Probability Density (life tables algorithms)
Median Survival Time


Median Survival Time

If Pk>0.5 the value printed for median survival time is

tk+

Otherwise, let i be the interval for which Pi<0.5 and Pi−1≥0.5. The estimate of the median survival time is then

Md=(ti)+hi−1(Pi−1−0.5)Pi−1−Pi

Related Topics

Construction of Life Table (Gehan, 1975) (life tables algorithms)
Computation of Intervals (life tables algorithms)
Count of Events and Censoring (life tables algorithms)
Calculation of Survival Functions (life tables algorithms)
Number Alive at the Beginning (life tables algorithms)
Number Exposed to Risk of an Event (life tables algorithms)
Proportion Terminating (life tables algorithms)
Proportion Surviving (life tables algorithms)
Cumulative Proportion Surviving at End of Interval (life tables algorithms)
Probability Density Function (life tables algorithms)
Hazard Rate (life tables algorithms)
Standard Error of Probability Surviving (life tables algorithms)
Standard Error of Probability Density (life tables algorithms)
Standard Error of the Hazard Rate (life tables algorithms)


Comparison of Survival Distributions (life tables algorithms)

life tables algorithms,life tables algorithms,life tables algorithms
comparing survival distributions,comparing survival distributions,comparing survival distributions

The survival times from the groups to be compared are jointly sorted into ascending order. If survival times are equal, the uncensored is taken to be less than the censored. When approximate comparisons are done, they are based on the lifetables, with the beginning of the interval determining the length of survival for cases censored or experiencing the event in that interval.

Related Topics

SURVIVAL Algorithms
Notation (life tables algorithms)
Construction of Life Table (Gehan, 1975) (life tables algorithms)
Notation (life tables algorithms)
Computations (life tables algorithms)
Test Statistic and Significance (Wilcoxon (Gehan)) (life tables algorithms)
References (life tables algorithms)


Notation (life tables algorithms)

The following notation is used throughout this section unless otherwise stated:

N | Number of cases
X(k) | Survival time for case k, where times are sorted into ascending order so that case 1 has the shortest time and case N the longest
wk | Weight for case k
g | Number of nonempty groups in the comparison
Wj | Sum of weights of cases in group j
Wc | Sum of weights of censored cases
Wu | Sum of weights of uncensored cases
W | Sum of weights of all cases

Related Topics

SURVIVAL Algorithms
Notation (life tables algorithms)
Construction of Life Table (Gehan, 1975) (life tables algorithms)
Comparison of Survival Distributions (life tables algorithms)
Computations (life tables algorithms)
Test Statistic and Significance (Wilcoxon (Gehan)) (life tables algorithms)
References (life tables algorithms)


Computations (life tables algorithms)

For each case the following are computed:

• ULEk: Sum of weights of uncensored cases with survival times less than or equal to that of case k.

• CLEk: Same as above, but for censored cases.

• UEk: Sum of weights of uncensored cases with survival times equal to that of case k.

• CEk: Same as above, but for censored cases.

The score for case k is:

Sk={
ULEk | if Xk is censored
A1−A2−A3 | if Xk is uncensored

where

A1=ULEk−UEk | uncensored cases surviving shorter than case k
A3=Wc−CLEk−CEk | censored cases surviving longer than or equal to case k
A3=Wu−ULEk | uncensored cases surviving longer than case k

Related Topics

SURVIVAL Algorithms
Notation (life tables algorithms)
Construction of Life Table (Gehan, 1975) (life tables algorithms)
Comparison of Survival Distributions (life tables algorithms)
Notation (life tables algorithms)
Test Statistic and Significance (Wilcoxon (Gehan)) (life tables algorithms)
References (life tables algorithms)


Test Statistic and Significance (Wilcoxon (Gehan)) (life tables algorithms)

The test statistic is

D=(W−1)BT

where

B=gΣj=1SS2j/Wj
SSj= the sum of scores of cases in group j
T=NΣi=1S2i

Under the hypothesis that the groups are samples from the same survival distribution, D is asymptotically distributed as a chi square with (g−1) degrees of freedom.

Related Topics

SURVIVAL Algorithms
Notation (life tables algorithms)
Construction of Life Table (Gehan, 1975) (life tables algorithms)
Comparison of Survival Distributions (life tables algorithms)
Notation (life tables algorithms)
Computations (life tables algorithms)
References (life tables algorithms)


References (life tables algorithms)

life tables algorithms,life tables algorithms,life tables algorithms
references,references,references

Gehan, E. A. 1975. Statistical methods for survival time studies. In: Cancer Therapy: Prognostic Factors and Criteria, M. J. Staquet, eds. New York: Raven Press.

Lee, E., and M. Desu. 1972. A computer program for comparing k samples with right censored data. Computer Programs in Biomedicine, 2, 315-321.

Related Topics

SURVIVAL Algorithms
Notation (life tables algorithms)
Construction of Life Table (Gehan, 1975) (life tables algorithms)
Comparison of Survival Distributions (life tables algorithms)
Notation (life tables algorithms)
Computations (life tables algorithms)
Test Statistic and Significance (Wilcoxon (Gehan)) (life tables algorithms)


T Test Algorithms

T-TEST (command),T-TEST (command),T-TEST (command)
algorithms,algorithms,algorithms
Independent-Samples T Test,Independent-Samples T Test,Independent-Samples T Test
algorithms,algorithms,algorithms
Paired-Samples T Test,Paired-Samples T Test,Paired-Samples T Test
algorithms,algorithms,algorithms
One-Sample T Test,One-Sample T Test,One-Sample T Test
algorithms,algorithms,algorithms
t test algorithms,t test algorithms,t test algorithms

The T Test procedure compares the means of two groups or (one-sample) compares the means of a group with a constant.

Related Topics

Notation (t test algorithms)
Basic Statistics (t test algorithms)
The t Statistics for Equality of Means (t test algorithms)
The Test for Equality of Variances (t test algorithms)
The t Test for Paired Samples (t test algorithms)
One-Sample t Test (t test algorithms)
References (t test algorithms)


Notation (t test algorithms)

The following notation is used throughout this chapter unless otherwise stated:

Xki | Value for ith case of group k
wki | Weight for ith case of group k
nk | Number of cases in group k
Wk | Sum of weights of cases in group k

Related Topics

T Test Algorithms
Basic Statistics (t test algorithms)
The t Statistics for Equality of Means (t test algorithms)
The Test for Equality of Variances (t test algorithms)
The t Test for Paired Samples (t test algorithms)
One-Sample t Test (t test algorithms)
References (t test algorithms)


Basic Statistics (t test algorithms)

t test algorithms,t test algorithms,t test algorithms
basic statistics,basic statistics,basic statistics

The following statistics are computed.

Related Topics

T Test Algorithms
Notation (t test algorithms)
The t Statistics for Equality of Means (t test algorithms)
The Test for Equality of Variances (t test algorithms)
The t Test for Paired Samples (t test algorithms)
One-Sample t Test (t test algorithms)
References (t test algorithms)
Means (t test algorithms)
Variances (t test algorithms)
Standard Errors of the Mean (t test algorithms)
Differences of the Means for Groups 1 and 2 (t test algorithms)
Unpooled (Separate Variance) Standard Error of the Difference (t test algorithms)
Pooled Standard Error of the Difference (t test algorithms)


Means (t test algorithms)

Xk=nkΣi=1XkiwkiWk k=1, 2

Related Topics

Basic Statistics (t test algorithms)
Variances (t test algorithms)
Standard Errors of the Mean (t test algorithms)
Differences of the Means for Groups 1 and 2 (t test algorithms)
Unpooled (Separate Variance) Standard Error of the Difference (t test algorithms)
Pooled Standard Error of the Difference (t test algorithms)


Variances (t test algorithms)

S2k=nkΣi=1X2kiwki−(nkΣi=1Xkiwki)2/Wk(Wk−1)

Related Topics

Basic Statistics (t test algorithms)
Means (t test algorithms)
Standard Errors of the Mean (t test algorithms)
Differences of the Means for Groups 1 and 2 (t test algorithms)
Unpooled (Separate Variance) Standard Error of the Difference (t test algorithms)
Pooled Standard Error of the Difference (t test algorithms)


Standard Errors of the Mean (t test algorithms)

SEMk=Sk/
√ Wk

Related Topics

Basic Statistics (t test algorithms)
Means (t test algorithms)
Variances (t test algorithms)
Differences of the Means for Groups 1 and 2 (t test algorithms)
Unpooled (Separate Variance) Standard Error of the Difference (t test algorithms)
Pooled Standard Error of the Difference (t test algorithms)


Differences of the Means for Groups 1 and 2 (t test algorithms)

D=X1−X2

Related Topics

Basic Statistics (t test algorithms)
Means (t test algorithms)
Variances (t test algorithms)
Standard Errors of the Mean (t test algorithms)
Unpooled (Separate Variance) Standard Error of the Difference (t test algorithms)
Pooled Standard Error of the Difference (t test algorithms)


Unpooled (Separate Variance) Standard Error of the Difference (t test algorithms)

SD=
√ S21W1+S22W2

The 95% confidence interval for mean difference is

D±tdf´SD

where tdf´ is the upper 2.5% critical value for the t distribution with df´ degrees of freedom.

Related Topics

Basic Statistics (t test algorithms)
Means (t test algorithms)
Variances (t test algorithms)
Standard Errors of the Mean (t test algorithms)
Differences of the Means for Groups 1 and 2 (t test algorithms)
Pooled Standard Error of the Difference (t test algorithms)


Pooled Standard Error of the Difference (t test algorithms)

S´D=Sp
√ 1W1+1W2

where the pooled estimate of the variance is

S2p=(W1−1)S21+(W2−1)S22W1+W2−2

The 95% confidence interval for mean difference

D±tdfS´D

where df is defined in the following.

Related Topics

Basic Statistics (t test algorithms)
Means (t test algorithms)
Variances (t test algorithms)
Standard Errors of the Mean (t test algorithms)
Differences of the Means for Groups 1 and 2 (t test algorithms)
Unpooled (Separate Variance) Standard Error of the Difference (t test algorithms)


The t Statistics for Equality of Means (t test algorithms)

t test algorithms,t test algorithms,t test algorithms
equality of means,equality of means,equality of means

Separate Variance

t=D/SD
df´=1Z1+Z2

where

Zk=(S2k/WkS21/W1+S22/W2)2/(Wk−1)

Pooled Variance

t´=D/S´D
df=W1+W2−2

The two-tailed significance levels are obtained from the t distribution separately for each of the computer t values.

Related Topics

T Test Algorithms
Notation (t test algorithms)
Basic Statistics (t test algorithms)
The Test for Equality of Variances (t test algorithms)
The t Test for Paired Samples (t test algorithms)
One-Sample t Test (t test algorithms)
References (t test algorithms)


The Test for Equality of Variances (t test algorithms)

t test algorithms,t test algorithms,t test algorithms
equality of variances,equality of variances,equality of variances

The Levene statistic is used and defined as

L=(W−2)2Σk=1Wk(Zk−Z)22Σk=1nkΣi=1wki(Zki−Zk)2

where

Zki=|Xki−Xk|
Zk=nkΣi=1wkiZkiWk
Z=2Σk=1WkZkW1+W2

Related Topics

T Test Algorithms
Notation (t test algorithms)
Basic Statistics (t test algorithms)
The t Statistics for Equality of Means (t test algorithms)
The t Test for Paired Samples (t test algorithms)
One-Sample t Test (t test algorithms)
References (t test algorithms)


The t Test for Paired Samples (t test algorithms)

t test algorithms,t test algorithms,t test algorithms
paired samples,paired samples,paired samples

The following notation is used throughout this section unless otherwise stated:

Xi | Value of variable X for case i
Yi | Value of variable Y for case i
wi | Weight for case i
W | Sum of the weights
N | Number of cases

Related Topics

T Test Algorithms
Notation (t test algorithms)
Basic Statistics (t test algorithms)
The t Statistics for Equality of Means (t test algorithms)
The Test for Equality of Variances (t test algorithms)
One-Sample t Test (t test algorithms)
References (t test algorithms)
Means (t test algorithms)
Variances (t test algorithms)
Covariance between X and Y (t test algorithms)
Difference of the Means (t test algorithms)
Standard Error of the Difference (t test algorithms)
t statistic for Equality of Means (t test algorithms)
95% Confidence Interval for Mean Difference (t test algorithms)
Correlation Coefficient between X and Y (t test algorithms)


Means (t test algorithms)

X=NΣi=1wiXi/W
Y=NΣi=1wiYi/W

Related Topics

The t Test for Paired Samples (t test algorithms)
Variances (t test algorithms)
Covariance between X and Y (t test algorithms)
Difference of the Means (t test algorithms)
Standard Error of the Difference (t test algorithms)
t statistic for Equality of Means (t test algorithms)
95% Confidence Interval for Mean Difference (t test algorithms)
Correlation Coefficient between X and Y (t test algorithms)


Variances (t test algorithms)

S2X=NΣi=1wiX2i−(NΣi=1wiXi)2/WW−1

Similarly for S2Y.

Related Topics

The t Test for Paired Samples (t test algorithms)
Means (t test algorithms)
Covariance between X and Y (t test algorithms)
Difference of the Means (t test algorithms)
Standard Error of the Difference (t test algorithms)
t statistic for Equality of Means (t test algorithms)
95% Confidence Interval for Mean Difference (t test algorithms)
Correlation Coefficient between X and Y (t test algorithms)


Covariance between X and Y (t test algorithms)

SXY=1W−1NΣk=1(XkYkwk−(NΣk=1wkXk)(NΣk=1wkYk)/W)

Related Topics

The t Test for Paired Samples (t test algorithms)
Means (t test algorithms)
Variances (t test algorithms)
Difference of the Means (t test algorithms)
Standard Error of the Difference (t test algorithms)
t statistic for Equality of Means (t test algorithms)
95% Confidence Interval for Mean Difference (t test algorithms)
Correlation Coefficient between X and Y (t test algorithms)


Difference of the Means (t test algorithms)

D=X−Y

Related Topics

The t Test for Paired Samples (t test algorithms)
Means (t test algorithms)
Variances (t test algorithms)
Covariance between X and Y (t test algorithms)
Standard Error of the Difference (t test algorithms)
t statistic for Equality of Means (t test algorithms)
95% Confidence Interval for Mean Difference (t test algorithms)
Correlation Coefficient between X and Y (t test algorithms)


Standard Error of the Difference (t test algorithms)

SD=
√ (S2X+S2Y−2SXY)/W

Related Topics

The t Test for Paired Samples (t test algorithms)
Means (t test algorithms)
Variances (t test algorithms)
Covariance between X and Y (t test algorithms)
Difference of the Means (t test algorithms)
t statistic for Equality of Means (t test algorithms)
95% Confidence Interval for Mean Difference (t test algorithms)
Correlation Coefficient between X and Y (t test algorithms)


t statistic for Equality of Means (t test algorithms)

t=D/SD

with (W−1) degrees of freedom. A two-tailed significance level is printed.

Related Topics

The t Test for Paired Samples (t test algorithms)
Means (t test algorithms)
Variances (t test algorithms)
Covariance between X and Y (t test algorithms)
Difference of the Means (t test algorithms)
Standard Error of the Difference (t test algorithms)
95% Confidence Interval for Mean Difference (t test algorithms)
Correlation Coefficient between X and Y (t test algorithms)


95% Confidence Interval for Mean Difference (t test algorithms)

D±tW−1SD

Related Topics

The t Test for Paired Samples (t test algorithms)
Means (t test algorithms)
Variances (t test algorithms)
Covariance between X and Y (t test algorithms)
Difference of the Means (t test algorithms)
Standard Error of the Difference (t test algorithms)
t statistic for Equality of Means (t test algorithms)
Correlation Coefficient between X and Y (t test algorithms)


Correlation Coefficient between X and Y (t test algorithms)

r=SXYSXSY

The two-tailed significance level is based on

t=r
√ W−21−r2

with (W−2) degrees of freedom.

Related Topics

The t Test for Paired Samples (t test algorithms)
Means (t test algorithms)
Variances (t test algorithms)
Covariance between X and Y (t test algorithms)
Difference of the Means (t test algorithms)
Standard Error of the Difference (t test algorithms)
t statistic for Equality of Means (t test algorithms)
95% Confidence Interval for Mean Difference (t test algorithms)


One-Sample t Test (t test algorithms)

t test algorithms,t test algorithms,t test algorithms
one sample,one sample,one sample

The following notation is used throughout this chapter unless otherwise stated:

N | Number of cases
Xi | Value of variable X for case i
wi | Weight for case i
v | Test value

Related Topics

T Test Algorithms
Notation (t test algorithms)
Basic Statistics (t test algorithms)
The t Statistics for Equality of Means (t test algorithms)
The Test for Equality of Variances (t test algorithms)
The t Test for Paired Samples (t test algorithms)
References (t test algorithms)
Mean (t test algorithms)
Variance (t test algorithms)
Standard Deviation (t test algorithms)
Standard Error of the Mean (t test algorithms)
Mean Difference (t test algorithms)
The t value (t test algorithms)
100p% Confidence Interval for the Mean Difference (t test algorithms)


Mean (t test algorithms)

X=1WNΣi=1wiXi

where W=NΣi=1wi is the sum of the weights.

Related Topics

One-Sample t Test (t test algorithms)
Variance (t test algorithms)
Standard Deviation (t test algorithms)
Standard Error of the Mean (t test algorithms)
Mean Difference (t test algorithms)
The t value (t test algorithms)
100p% Confidence Interval for the Mean Difference (t test algorithms)


Variance (t test algorithms)

S2X=1W−1NΣi=1wi(Xi−X)2

Related Topics

One-Sample t Test (t test algorithms)
Mean (t test algorithms)
Standard Deviation (t test algorithms)
Standard Error of the Mean (t test algorithms)
Mean Difference (t test algorithms)
The t value (t test algorithms)
100p% Confidence Interval for the Mean Difference (t test algorithms)


Standard Deviation (t test algorithms)

SX=
√ S2X

Related Topics

One-Sample t Test (t test algorithms)
Mean (t test algorithms)
Variance (t test algorithms)
Standard Error of the Mean (t test algorithms)
Mean Difference (t test algorithms)
The t value (t test algorithms)
100p% Confidence Interval for the Mean Difference (t test algorithms)


Standard Error of the Mean (t test algorithms)

SX=SX/
√ W

Related Topics

One-Sample t Test (t test algorithms)
Mean (t test algorithms)
Variance (t test algorithms)
Standard Deviation (t test algorithms)
Mean Difference (t test algorithms)
The t value (t test algorithms)
100p% Confidence Interval for the Mean Difference (t test algorithms)


Mean Difference (t test algorithms)

D=X−v

Related Topics

One-Sample t Test (t test algorithms)
Mean (t test algorithms)
Variance (t test algorithms)
Standard Deviation (t test algorithms)
Standard Error of the Mean (t test algorithms)
The t value (t test algorithms)
100p% Confidence Interval for the Mean Difference (t test algorithms)


The t value (t test algorithms)

t=D/SX

with (W−1) degrees of freedom. A two-tailed significance level is printed.

Related Topics

One-Sample t Test (t test algorithms)
Mean (t test algorithms)
Variance (t test algorithms)
Standard Deviation (t test algorithms)
Standard Error of the Mean (t test algorithms)
Mean Difference (t test algorithms)
100p% Confidence Interval for the Mean Difference (t test algorithms)


100p% Confidence Interval for the Mean Difference (t test algorithms)

CI =D±tW−1,(p+1)/2SX

where tW−1,(p+1)/2 is the 100((p+1)/2)% percentile of a Student’s t distribution with (W−1) degrees of freedom.

Related Topics

One-Sample t Test (t test algorithms)
Mean (t test algorithms)
Variance (t test algorithms)
Standard Deviation (t test algorithms)
Standard Error of the Mean (t test algorithms)
Mean Difference (t test algorithms)
The t value (t test algorithms)


References (t test algorithms)

t test algorithms,t test algorithms,t test algorithms
references,references,references

Blalock, H. M. 1972. Social statistics. New York: McGraw-Hill.

Related Topics

T Test Algorithms
Notation (t test algorithms)
Basic Statistics (t test algorithms)
The t Statistics for Equality of Means (t test algorithms)
The Test for Equality of Variances (t test algorithms)
The t Test for Paired Samples (t test algorithms)
One-Sample t Test (t test algorithms)


TREE Algorithms

TREE (command),TREE (command),TREE (command)
algorithms,algorithms,algorithms
classification trees,classification trees,classification trees
algorithms,algorithms,algorithms

The TREE procedure creates a tree-based classification model using the CART, CHAID, or QUEST algorithm.


CART Algorithms

TREE (command),TREE (command),TREE (command)
algorithms,algorithms,algorithms
Classification Tree,Classification Tree,Classification Tree
algorithms,algorithms,algorithms
CART algorithms,CART algorithms,CART algorithms

The CART algorithm is based on Classification and Regression Trees by Breiman et al (1984). A CART tree is a binary decision tree that is constructed by splitting a node into two child nodes repeatedly, beginning with the root node that contains the whole learning sample.

Related Topics

Notation (CART algorithms)
Tree Growing Process (CART algorithms)
Splitting Criteria and Impurity Measures (CART algorithms)
Categorical Dependent Variable (CART algorithms)
Twoing Criterion (CART algorithms)
Ordered Twoing Criterion (CART algorithms)
Continuous Dependent Variable (CART algorithms)
Stopping Rules (CART algorithms)
Surrogate Splits (CART algorithms)
Missing Value Handling (CART algorithms)
Variable Importance (CART algorithms)
References (CART algorithms)


Notation (CART algorithms)

CART algorithms,CART algorithms,CART algorithms
notation,notation,notation

The following notation is used throughout this chapter unless otherwise stated:

Y | The dependent, or target, variable. It can be ordinal categorical, nominal categorical or continuous. If Y is categorical with J classes, its class takes values in C = {1, …, J}.
Xm, m=1,...,M | The set of all predictor variables. A predictor can be ordinal categorical, nominal categorical or continuous.
ℏ={xn,yn}Nn=1 | The whole learning sample.
ℏ(t) | The learning samples that fall in node t.
wn | The case weight associated with case n.
fn | The frequency weight associated with case n. Non-integral positive value is rounded to its nearest integer.
π(j), j=1,...,J | Prior probability of Y = j, j = 1, …, J.
p(j,t), j=1,...,J | The probability of a case in class j and node t.
p(t) | The probability of a case in node t.
p(j|t), j=1,...,J | The probability of a case in class j given that it falls into node t.
C(i|j) | The cost of miss-classifying a class j case as a class i case. C(j|j)=0

Related Topics

CART Algorithms
Tree Growing Process (CART algorithms)
Splitting Criteria and Impurity Measures (CART algorithms)
Categorical Dependent Variable (CART algorithms)
Twoing Criterion (CART algorithms)
Ordered Twoing Criterion (CART algorithms)
Continuous Dependent Variable (CART algorithms)
Stopping Rules (CART algorithms)
Surrogate Splits (CART algorithms)
Missing Value Handling (CART algorithms)
Variable Importance (CART algorithms)
References (CART algorithms)


Tree Growing Process (CART algorithms)

CART algorithms,CART algorithms,CART algorithms
tree growing,tree growing,tree growing

The basic idea of tree growing is to choose a split among all the possible splits at each node so that the resulting child nodes are the “purest”. In this algorithm, only univariate splits are considered. That is, each split depends on the value of only one predictor variable. All possible splits consist of possible splits of each predictor. If X is a nominal categorical variable of I categories, there are 2I−1−1 possible splits for this predictor. If X is an ordinal categorical or continuous variable with K different values, there are K−1 different splits on X. A tree is grown starting from the root node by repeatedly using the following steps on each node.

1. Find each predictor’s best split.

For each continuous and ordinal predictor, sort its values from the smallest to the largest. For the sorted predictor, go through each value from top to examine each candidate split point (call it v, if x≤v, the case goes to the left child node, otherwise, it goes to the right) to determine the best. The best split point is the one that maximize the splitting criterion the most when the node is split according to it. The definition of splitting criterion is in a later section.

For each nominal predictor, examine each possible subset of categories (call it A, if xA, the case goes to the left child node, otherwise, it goes to the right) to find the best split.

2. Find the node’s best split.

Among the best splits found in step 1, choose the one that maximizes the splitting criterion.

3. Split the node using its best split found in step 2 if the stopping rules are not satisfied.

Related Topics

CART Algorithms
Notation (CART algorithms)
Splitting Criteria and Impurity Measures (CART algorithms)
Categorical Dependent Variable (CART algorithms)
Twoing Criterion (CART algorithms)
Ordered Twoing Criterion (CART algorithms)
Continuous Dependent Variable (CART algorithms)
Stopping Rules (CART algorithms)
Surrogate Splits (CART algorithms)
Missing Value Handling (CART algorithms)
Variable Importance (CART algorithms)
References (CART algorithms)


Splitting Criteria and Impurity Measures (CART algorithms)

CART algorithms,CART algorithms,CART algorithms
splitting criteria,splitting criteria,splitting criteria
CART algorithms,CART algorithms,CART algorithms
impurity measures,impurity measures,impurity measures

At node t, the best split s is chosen to maximize a splitting criterion Δi(s,t). When the impurity measure for a node can be defined, the splitting criterion corresponds to a decrease in impurity. ΔI(s,t)=p(t)Δi(s,t)is referred to as the improvement.

Related Topics

CART Algorithms
Notation (CART algorithms)
Tree Growing Process (CART algorithms)
Categorical Dependent Variable (CART algorithms)
Twoing Criterion (CART algorithms)
Ordered Twoing Criterion (CART algorithms)
Continuous Dependent Variable (CART algorithms)
Stopping Rules (CART algorithms)
Surrogate Splits (CART algorithms)
Missing Value Handling (CART algorithms)
Variable Importance (CART algorithms)
References (CART algorithms)


Categorical Dependent Variable (CART algorithms)

If Y is categorical, there are three splitting criteria available: Gini, Twoing, and ordered Twoing criteria. At node t, let probabilities p(j,t), p(t) and p(j|t) be estimated by

p(j,t)=π(j)Nw,j(t)Nw,j
p(t)=
Σ
j
p(j,t)
p(j|t)=p(j,t)p(t)=p(j,t)
Σ
j
p(j,t)

where

Nw,j=
Σ
nℏ
wnfnI(yn=j)
Nw,j(t)=
Σ
nℏ(t)
wnfnI(yn=j)

with I(a=b) being the indicator function taking value 1 when a=b, 0 otherwise.

Related Topics

CART Algorithms
Notation (CART algorithms)
Tree Growing Process (CART algorithms)
Splitting Criteria and Impurity Measures (CART algorithms)
Twoing Criterion (CART algorithms)
Ordered Twoing Criterion (CART algorithms)
Continuous Dependent Variable (CART algorithms)
Stopping Rules (CART algorithms)
Surrogate Splits (CART algorithms)
Missing Value Handling (CART algorithms)
Variable Importance (CART algorithms)
References (CART algorithms)


Gini Criterion (CART algorithms)

Gini,Gini,Gini
CART algorithms,CART algorithms,CART algorithms

The Gini impurity measure at a node t is defined as

i(t)=Σi,jC(i|j)p(i|t)p(j|t)

The Gini splitting criterion is the decrease of impurity defined as

Δi(s,t)=i(t)−pLi(tL)−pRi(tR)

where pL and pR are probabilities of sending a case to the left child node tL and to the right child node tR respectively. They are estimated as pL=p(tL)/p(t) and pR=p(tR)/p(t).

Note: When user-specified costs are involved, the altered priors can optionally be used to replace the priors. When altered priors are used, the problem is considered as if no costs are involved. The altered prior is defined as π´(j) = C(j)π(j)
Σ
j
C(j)π(j), where C(j)=ΣiC(i|j).


Twoing Criterion (CART algorithms)

twoing,twoing,twoing
CART algorithms,CART algorithms,CART algorithms
Δi(s,t)=pLp[
Σ
j
|p(j|tL)−p(j|tR)|]2

Related Topics

CART Algorithms
Notation (CART algorithms)
Tree Growing Process (CART algorithms)
Splitting Criteria and Impurity Measures (CART algorithms)
Categorical Dependent Variable (CART algorithms)
Ordered Twoing Criterion (CART algorithms)
Continuous Dependent Variable (CART algorithms)
Stopping Rules (CART algorithms)
Surrogate Splits (CART algorithms)
Missing Value Handling (CART algorithms)
Variable Importance (CART algorithms)
References (CART algorithms)


Ordered Twoing Criterion (CART algorithms)

ordered twoing,ordered twoing,ordered twoing
CART algorithms,CART algorithms,CART algorithms

Ordered Twoing is used only when Y is ordinal categorical. Its algorithm is as follows:

1. First separate the class C = {1, …, J} of Y as two super-classes C1 and C2 = C−C1 such that C1 is of the form C1 = {1, …, j1}, j1 = 1, …, J−1.

2. Using the 2-class measure i(t) = p(C1 | t)p(C2 | t), find the split s*(C1) that maximizes

Δi(s,t)=i(t)−pLi(tL)−pRi(tR)=pLpR[
Σ
jC1
{p(j|tL)−p(j|tR)}]2

3. Find the super-class C*1 of C1 which maximizes Δi(s*(C1),t).

Related Topics

CART Algorithms
Notation (CART algorithms)
Tree Growing Process (CART algorithms)
Splitting Criteria and Impurity Measures (CART algorithms)
Categorical Dependent Variable (CART algorithms)
Twoing Criterion (CART algorithms)
Continuous Dependent Variable (CART algorithms)
Stopping Rules (CART algorithms)
Surrogate Splits (CART algorithms)
Missing Value Handling (CART algorithms)
Variable Importance (CART algorithms)
References (CART algorithms)


Continuous Dependent Variable (CART algorithms)

When Y is continuous, the splitting criterion Δi(s,t)=i(t)−pLi(tL)−pRi(tR) is used with the Least Squares Deviation (LSD) impurity measures

i(t)=
Σ
nℏ(t)
wnfn(yn−y(t))2
Σ
nℏ(t)
wnfn

where

pL=Nw(tL)/Nw(t), pR=Nw(tR)/Nw(t), Nw(t)=
Σ
nℏ(t)
wnfn

y(t)=
Σ
nℏ(t)
wnfnynNw(t)

Related Topics

CART Algorithms
Notation (CART algorithms)
Tree Growing Process (CART algorithms)
Splitting Criteria and Impurity Measures (CART algorithms)
Categorical Dependent Variable (CART algorithms)
Twoing Criterion (CART algorithms)
Ordered Twoing Criterion (CART algorithms)
Stopping Rules (CART algorithms)
Surrogate Splits (CART algorithms)
Missing Value Handling (CART algorithms)
Variable Importance (CART algorithms)
References (CART algorithms)


Stopping Rules (CART algorithms)

CART algorithms,CART algorithms,CART algorithms
stopping rules,stopping rules,stopping rules

Stopping rules control if the tree growing process should be stopped or not. The following stopping rules are used:

• If a node becomes pure; that is, all cases in a node have identical values of the dependent variable, the node will not be split.

• If all cases in a node have identical values for each predictor, the node will not be split.

• If the current tree depth reaches the user-specified maximum tree depth limit value, the tree growing process will stop.

• If the size of a node is less than the user-specified minimum node size value, the node will not be split.

• If the split of a node results in a child node whose node size is less than the user-specified minimum child node size value, the node will not be split.

• If for the best split s* of node t, the improvement ΔI(s*,t)=p(t)Δi(s*,t) is smaller than the user-specified minimum improvement, the node will not be split.

Related Topics

CART Algorithms
Notation (CART algorithms)
Tree Growing Process (CART algorithms)
Splitting Criteria and Impurity Measures (CART algorithms)
Categorical Dependent Variable (CART algorithms)
Twoing Criterion (CART algorithms)
Ordered Twoing Criterion (CART algorithms)
Continuous Dependent Variable (CART algorithms)
Surrogate Splits (CART algorithms)
Missing Value Handling (CART algorithms)
Variable Importance (CART algorithms)
References (CART algorithms)


Surrogate Splits (CART algorithms)

CART algorithms,CART algorithms,CART algorithms
surrogate splits,surrogate splits,surrogate splits

Given a split X*≤s*, its surrogate split is a split using another predictor variable X, X≤sX (or X>sX), such that this split is most similar to it and is with positive predictive measure of association. There may be multiple surrogate splits. The bigger the predictive measure of association is, the better the surrogate split is.

Predictive measure of association

Let ℏX*∩X (resp. ℏX*∩X(t)) be the set of learning cases (resp. learning cases in node t) that has non-missing values of both X* and X. Let p(s*≈sX|t) be the probability of sending a case in ℏX*∩X(t) to the same child by both s* and sX, and
˜
s
X be the split with maximized probability p(s*≈
˜
s
X|t)=
max
sX
(p(s*≈sX|t)).

The predictive measure of association λ(s*≈
˜
s
X|t) between s* and
˜
s
X at node t is

λ(s*≈
˜
s
X|t)=min(pL,pR)−(1−p(s*≈
˜
s
X|t))min(pL,pR)

where pL (resp. pR) is the relative probability that the best split s* at node t sends a case with non-missing value of X* to the left (resp. right) child node. And where

p(s*≈sX|t)={
Σ
j
π(j)Nw,j(s*≈sX,t)Nw,j(X*∩X) 		if Y is categorical
Nw(s*≈sX,t)Nw(X*∩X) if Y is continuous

with

Nw(X*∩X)=
Σ
nℏX*∩X
wnfn, Nw(X*∩X,t)=
Σ
nℏX*∩X(t)
wnfn

Nw(s*≈sX,t)=
Σ
nℏX*∩X(t)
wnfnI(n:s*≈sX)

Nw,j(X*∩X)=
Σ
nℏX*∩X
wnfnI(yn=j), Nw,j(X*∩X)=
Σ
nℏX*∩X(t)
wnfnI(yn=j)

Nw,j(s*≈sX,t)=
Σ
nℏX*∩X(t)
wnfnI(yn=j)I(n:s*≈sX)

and I(n:s*≈sX) being the indicator function taking value 1 when both splits s* and sX send the case n to the same child, 0 otherwise.

Related Topics

CART Algorithms
Notation (CART algorithms)
Tree Growing Process (CART algorithms)
Splitting Criteria and Impurity Measures (CART algorithms)
Categorical Dependent Variable (CART algorithms)
Twoing Criterion (CART algorithms)
Ordered Twoing Criterion (CART algorithms)
Continuous Dependent Variable (CART algorithms)
Stopping Rules (CART algorithms)
Missing Value Handling (CART algorithms)
Variable Importance (CART algorithms)
References (CART algorithms)


Missing Value Handling (CART algorithms)

CART algorithms,CART algorithms,CART algorithms
missing values,missing values,missing values

If the dependent variable of a case is missing, this case will be ignored in the analysis. If all predictor variables of a case are missing, this case will also be ignored. If the case weight is missing, zero, or negative, the case is ignored. If the frequency weight is missing, zero, or negative, the case is ignored.

The surrogate split method is otherwise used to deal with missing data in predictor variables. Suppose that X* < s* is the best split at a node. If value of X* is missing for a case, the best surrogate split (among all non-missing predictors associated with surrogate splits) will be used to decide which child node it should go. If there are no surrogate splits or all the predictors associated with surrogate splits for a case are missing, the majority rule is used.

Related Topics

CART Algorithms
Notation (CART algorithms)
Tree Growing Process (CART algorithms)
Splitting Criteria and Impurity Measures (CART algorithms)
Categorical Dependent Variable (CART algorithms)
Twoing Criterion (CART algorithms)
Ordered Twoing Criterion (CART algorithms)
Continuous Dependent Variable (CART algorithms)
Stopping Rules (CART algorithms)
Surrogate Splits (CART algorithms)
Variable Importance (CART algorithms)
References (CART algorithms)


Variable Importance (CART algorithms)

CART algorithms,CART algorithms,CART algorithms
variable importance,variable importance,variable importance

The Measure of Importance M(X) of a predictor variable X in relation to the final tree T is defined as the (weighted) sum across all splits in the tree of the improvements that X has when it is used as a primary or surrogate (but not competitor) splitter. That is,

M(X)=
Σ
tT
Δ(
˜
s
X,t)

If, for a given t, the rank of the surrogate is larger than the maximum number of surrogates to keep in each node, then the contribution of that split is set to 0.

The Variable Importance VI(X) of X is expressed in terms of a normalized quantity relative to the variable having the largest measure of importance. It ranges from 0 to 100, with the variable having the largest measure of importance scored as 100. That is,

VI(X)=M(X)
max
X
M(X)×100

Related Topics

CART Algorithms
Notation (CART algorithms)
Tree Growing Process (CART algorithms)
Splitting Criteria and Impurity Measures (CART algorithms)
Categorical Dependent Variable (CART algorithms)
Twoing Criterion (CART algorithms)
Ordered Twoing Criterion (CART algorithms)
Continuous Dependent Variable (CART algorithms)
Stopping Rules (CART algorithms)
Surrogate Splits (CART algorithms)
Missing Value Handling (CART algorithms)
References (CART algorithms)


References (CART algorithms)

CART algorithms,CART algorithms,CART algorithms
references,references,references

Breiman, L., J. H. Friedman, R. A. Olshen, and C. J. Stone. 1984. Classification and Regression Trees. New York: Chapman & Hall/CRC.

Related Topics

CART Algorithms
Notation (CART algorithms)
Tree Growing Process (CART algorithms)
Splitting Criteria and Impurity Measures (CART algorithms)
Categorical Dependent Variable (CART algorithms)
Twoing Criterion (CART algorithms)
Ordered Twoing Criterion (CART algorithms)
Continuous Dependent Variable (CART algorithms)
Stopping Rules (CART algorithms)
Surrogate Splits (CART algorithms)
Missing Value Handling (CART algorithms)
Variable Importance (CART algorithms)


CHAID and Exhaustive CHAID Algorithms

TREE (command),TREE (command),TREE (command)
algorithms,algorithms,algorithms
Decision Tree,Decision Tree,Decision Tree
algorithms,algorithms,algorithms
CHAID algorithms,CHAID algorithms,CHAID algorithms

The CHAID algorithm is originally proposed by Kass (1980) and the Exhaustive CHAID is by Biggs et al (1991). Algorithm CHAID and Exhaustive CHAID allow multiple splits of a node.

Both CHAID and exhaustive CHAID algorithms consist of three steps: merging, splitting and stopping. A tree is grown by repeatedly using these three steps on each node starting from the root node.

Related Topics

Notation (CHAID algorithms)
CHAID Algorithm (CHAID algorithms)
Binning Continuous Predictors (CHAID algorithms)
Merging (CHAID algorithms)
Splitting (CHAID algorithms)
Stopping (CHAID algorithms)
Exhaustive CHAID Algorithm (CHAID algorithms)
Merging (CHAID algorithms)
p-Value Calculations (CHAID algorithms)
Scale Dependent Variable (CHAID algorithms)
Nominal Dependent Variable (CHAID algorithms)
Ordinal Dependent Variable (CHAID algorithms)
Bonferroni Adjustments (CHAID algorithms)
Missing Values (CHAID algorithms)
References (CHAID algorithms)


Notation (CHAID algorithms)

CHAID algorithms,CHAID algorithms,CHAID algorithms
notation,notation,notation

The following notation is used throughout this chapter unless otherwise stated:

Y | The dependent variable, or target variable. It can be ordinal categorical, nominal categorical or continuous. If Y is categorical with J classes, its class takes values in C = {1, …, J}.
Xm, m=1, ..., M | The set of all predictor variables. A predictor can be ordinal categorical, nominal categorical or continuous.
ℏ={xn,yn}Nn=1 | The whole learning sample.
wn | The case weight associated with case n.
fn | The frequency weight associated with case n. Non-integral positive value is rounded to its nearest integer.

Related Topics

CHAID and Exhaustive CHAID Algorithms
CHAID Algorithm (CHAID algorithms)
Binning Continuous Predictors (CHAID algorithms)
Merging (CHAID algorithms)
Splitting (CHAID algorithms)
Stopping (CHAID algorithms)
Exhaustive CHAID Algorithm (CHAID algorithms)
Merging (CHAID algorithms)
p-Value Calculations (CHAID algorithms)
Scale Dependent Variable (CHAID algorithms)
Nominal Dependent Variable (CHAID algorithms)
Ordinal Dependent Variable (CHAID algorithms)
Bonferroni Adjustments (CHAID algorithms)
Missing Values (CHAID algorithms)
References (CHAID algorithms)


CHAID Algorithm (CHAID algorithms)

The following algorithm only accepts nominal or ordinal categorical predictors. When predictors are continuous, they are transformed into ordinal predictors before using the following algorithm.

Related Topics

CHAID and Exhaustive CHAID Algorithms
Notation (CHAID algorithms)
Binning Continuous Predictors (CHAID algorithms)
Merging (CHAID algorithms)
Splitting (CHAID algorithms)
Stopping (CHAID algorithms)
Exhaustive CHAID Algorithm (CHAID algorithms)
Merging (CHAID algorithms)
p-Value Calculations (CHAID algorithms)
Scale Dependent Variable (CHAID algorithms)
Nominal Dependent Variable (CHAID algorithms)
Ordinal Dependent Variable (CHAID algorithms)
Bonferroni Adjustments (CHAID algorithms)
Missing Values (CHAID algorithms)
References (CHAID algorithms)


Binning Continuous Predictors (CHAID algorithms)

CHAID algorithms,CHAID algorithms,CHAID algorithms
binning,binning,binning

For a given set of break points a1,a2,...,aK−1 (in ascending order), a given x is mapped into category C(x) as follows:

C(x)={
1 | x≤a1
k+1 | ak<x≤ak+1,k=1,...,K−2
K | aK−1<x

If K is the desired number of bins, the break points are computed as follows:

Calculate the rank of xi. Frequency weights are incorporated when calculating the ranks. If there are ties, the average rank is used. Denote the rank and the corresponding values in ascending order as {r(i),x(i)}ni=1.

For k = 0 to (K−1), set Ik={i:r(i)KNf+1=k} where x denotes the floor integer of x. If Ik is not empty, ik=max﻿{i:iIk}. The break points are set equal to the x values corresponding to the ik, excluding the largest.

Related Topics

CHAID and Exhaustive CHAID Algorithms
Notation (CHAID algorithms)
CHAID Algorithm (CHAID algorithms)
Merging (CHAID algorithms)
Splitting (CHAID algorithms)
Stopping (CHAID algorithms)
Exhaustive CHAID Algorithm (CHAID algorithms)
Merging (CHAID algorithms)
p-Value Calculations (CHAID algorithms)
Scale Dependent Variable (CHAID algorithms)
Nominal Dependent Variable (CHAID algorithms)
Ordinal Dependent Variable (CHAID algorithms)
Bonferroni Adjustments (CHAID algorithms)
Missing Values (CHAID algorithms)
References (CHAID algorithms)


Merging (CHAID algorithms)

CHAID algorithms,CHAID algorithms,CHAID algorithms
merging,merging,merging

For each predictor variable X, merge non-significant categories. Each final category of X will result in one child node if X is used to split the node. The merging step also calculates the adjusted p-value that is to be used in the splitting step.

1. If X has 1 category only, stop and set the adjusted p-value to be 1.

2. If X has 2 categories, go to step 8.

3. Else, find the allowable pair of categories of X (an allowable pair of categories for ordinal predictor is two adjacent categories, and for nominal predictor is any two categories) that is least significantly different (i.e., most similar). The most similar pair is the pair whose test statistic gives the largest p-value with respect to the dependent variable Y. How to calculate p-value under various situations will be described in later sections.

4. For the pair having the largest p-value, check if its p-value is larger than a user-specified alpha-level α merge . If it does, this pair is merged into a single compound category. Then a new set of categories of X is formed. If it does not, then go to step 7.

5. (Optional) If the newly formed compound category consists of three or more original categories, then find the best binary split within the compound category which p-value is the smallest. Perform this binary split if its p-value is not larger than an alpha-level α split-merge .

6. Go to step 2.

7. (Optional) Any category having too few observations (as compared with a user-specified minimum segment size) is merged with the most similar other category as measured by the largest of the p-values.

8. The adjusted p-value is computed for the merged categories by applying Bonferroni adjustments that are to be discussed later.

Related Topics

CHAID and Exhaustive CHAID Algorithms
Notation (CHAID algorithms)
CHAID Algorithm (CHAID algorithms)
Binning Continuous Predictors (CHAID algorithms)
Splitting (CHAID algorithms)
Stopping (CHAID algorithms)
Exhaustive CHAID Algorithm (CHAID algorithms)
Merging (CHAID algorithms)
p-Value Calculations (CHAID algorithms)
Scale Dependent Variable (CHAID algorithms)
Nominal Dependent Variable (CHAID algorithms)
Ordinal Dependent Variable (CHAID algorithms)
Bonferroni Adjustments (CHAID algorithms)
Missing Values (CHAID algorithms)
References (CHAID algorithms)


Splitting (CHAID algorithms)

CHAID algorithms,CHAID algorithms,CHAID algorithms
splitting,splitting,splitting

The “best” split for each predictor is found in the merging step. The splitting step selects which predictor to be used to best split the node. Selection is accomplished by comparing the adjusted p-value associated with each predictor. The adjusted p-value is obtained in the merging step.

1. Select the predictor that has the smallest adjusted p-value (i.e., most significant).

2. If this adjusted p-value is less than or equal to a user-specified alpha-level α split , split the node using this predictor. Else, do not split and the node is considered as a terminal node.

Related Topics

CHAID and Exhaustive CHAID Algorithms
Notation (CHAID algorithms)
CHAID Algorithm (CHAID algorithms)
Binning Continuous Predictors (CHAID algorithms)
Merging (CHAID algorithms)
Stopping (CHAID algorithms)
Exhaustive CHAID Algorithm (CHAID algorithms)
Merging (CHAID algorithms)
p-Value Calculations (CHAID algorithms)
Scale Dependent Variable (CHAID algorithms)
Nominal Dependent Variable (CHAID algorithms)
Ordinal Dependent Variable (CHAID algorithms)
Bonferroni Adjustments (CHAID algorithms)
Missing Values (CHAID algorithms)
References (CHAID algorithms)


Stopping (CHAID algorithms)

CHAID algorithms,CHAID algorithms,CHAID algorithms
stopping,stopping,stopping

The stopping step checks if the tree growing process should be stopped according to the following stopping rules.

1. If a node becomes pure; that is, all cases in a node have identical values of the dependent variable, the node will not be split.

2. If all cases in a node have identical values for each predictor, the node will not be split.

3. If the current tree depth reaches the user specified maximum tree depth limit value, the tree growing process will stop.

4. If the size of a node is less than the user-specified minimum node size value, the node will not be split.

5. If the split of a node results in a child node whose node size is less than the user-specified minimum child node size value, child nodes that have too few cases (as compared with this minimum) will merge with the most similar child node as measured by the largest of the p-values. However, if the resulting number of child nodes is 1, the node will not be split.

Related Topics

CHAID and Exhaustive CHAID Algorithms
Notation (CHAID algorithms)
CHAID Algorithm (CHAID algorithms)
Binning Continuous Predictors (CHAID algorithms)
Merging (CHAID algorithms)
Splitting (CHAID algorithms)
Exhaustive CHAID Algorithm (CHAID algorithms)
Merging (CHAID algorithms)
p-Value Calculations (CHAID algorithms)
Scale Dependent Variable (CHAID algorithms)
Nominal Dependent Variable (CHAID algorithms)
Ordinal Dependent Variable (CHAID algorithms)
Bonferroni Adjustments (CHAID algorithms)
Missing Values (CHAID algorithms)
References (CHAID algorithms)


Exhaustive CHAID Algorithm (CHAID algorithms)

CHAID algorithms,CHAID algorithms,CHAID algorithms
Exhaustive CHAID,Exhaustive CHAID,Exhaustive CHAID
Exhaustive CHAID,Exhaustive CHAID,Exhaustive CHAID
CHAID algorithms,CHAID algorithms,CHAID algorithms

Splitting and stopping steps in Exhaustive CHAID algorithm are the same as those in CHAID. Merging step uses an exhaustive search procedure to merge any similar pair until only a single pair remains.

Also like CHAID, only nominal or ordinal categorical predictors are allowed, continuous predictors are first transformed into ordinal predictors before using the following algorithm.

Related Topics

CHAID and Exhaustive CHAID Algorithms
Notation (CHAID algorithms)
CHAID Algorithm (CHAID algorithms)
Binning Continuous Predictors (CHAID algorithms)
Merging (CHAID algorithms)
Splitting (CHAID algorithms)
Stopping (CHAID algorithms)
Merging (CHAID algorithms)
p-Value Calculations (CHAID algorithms)
Scale Dependent Variable (CHAID algorithms)
Nominal Dependent Variable (CHAID algorithms)
Ordinal Dependent Variable (CHAID algorithms)
Bonferroni Adjustments (CHAID algorithms)
Missing Values (CHAID algorithms)
References (CHAID algorithms)


Merging (CHAID algorithms)

CHAID algorithms,CHAID algorithms,CHAID algorithms
merging,merging,merging

1. If X has 1 category only, then set the adjusted p-value to be 1.

2. Set index = 0. Calculate the p-value based on the set of categories of X at this time. Call the p-value p(index) = p(0).

3. Else, find the allowable pair of categories of X that is least significantly different; that is, most similar. This can be determined by the pair whose test statistic gives the largest p-value with respect to the dependent variable Y. How to calculate p-value under various situations will be described in a later section.

4. Merge the pair that gives the largest p-value into a compound category.

5. (Optional) If the compound category just formed contains three or more original categories, search for a binary split of this compound category that gives the smallest p-value. If this p-value is larger than the one in forming the compound category by merging in the previous step, perform the binary split on that compound category.

6. Update the index = index + 1, calculate the p-value based on the set of categories of X at this time. Denote p(index) as the p-value.

7. Repeat 3 to 6 until only two categories remain. Then among all the indices, find the set of categories such that p(index) is the smallest.

8. (Optional) Any category having too few observations (as compared with a user-specified minimum segment size) is merged with the most similar other category as measured by the largest p-value.

9. The adjusted p-value is computed by applying Bonferroni adjustments which are to be discussed in a later section.

Unlike CHAID algorithm, no user-specified alpha-level is needed. Only the alpha-level αsplit is needed in the splitting step.

Related Topics

CHAID and Exhaustive CHAID Algorithms
Notation (CHAID algorithms)
CHAID Algorithm (CHAID algorithms)
Binning Continuous Predictors (CHAID algorithms)
Merging (CHAID algorithms)
Splitting (CHAID algorithms)
Stopping (CHAID algorithms)
Exhaustive CHAID Algorithm (CHAID algorithms)
p-Value Calculations (CHAID algorithms)
Scale Dependent Variable (CHAID algorithms)
Nominal Dependent Variable (CHAID algorithms)
Ordinal Dependent Variable (CHAID algorithms)
Bonferroni Adjustments (CHAID algorithms)
Missing Values (CHAID algorithms)
References (CHAID algorithms)


p-Value Calculations (CHAID algorithms)

CHAID algorithms,CHAID algorithms,CHAID algorithms
p-values,p-values,p-values

Calculations of (unadjusted) p-values in the above algorithms depend on the type of dependent variable.

The merging step of both CHAID and Exhaustive CHAID sometimes needs the p-value for a pair of X categories, and sometimes needs the p-value for all the categories of X. When the p-value for a pair of X categories is needed, only part of data in the current node is relevant. Let D denote the relevant data. Suppose in D there are I categories of X, and J categories of Y (if Y is categorical). The p-value calculation using data in D is given below.

Related Topics

CHAID and Exhaustive CHAID Algorithms
Notation (CHAID algorithms)
CHAID Algorithm (CHAID algorithms)
Binning Continuous Predictors (CHAID algorithms)
Merging (CHAID algorithms)
Splitting (CHAID algorithms)
Stopping (CHAID algorithms)
Exhaustive CHAID Algorithm (CHAID algorithms)
Merging (CHAID algorithms)
Scale Dependent Variable (CHAID algorithms)
Nominal Dependent Variable (CHAID algorithms)
Ordinal Dependent Variable (CHAID algorithms)
Bonferroni Adjustments (CHAID algorithms)
Missing Values (CHAID algorithms)
References (CHAID algorithms)


Scale Dependent Variable (CHAID algorithms)

If the dependent variable Y is scale, perform an ANOVA F test that tests if the means of Y for different categories of X are the same. This ANOVA F test calculates the F-statistic and hence derives the p-value as

F=IΣi=1
Σ
nD
wnfnI(xn=i)(yi−y)2/(I−1)IΣi=1
Σ
nD
wnfnI(xn=i)(yn−yi)2/(Nf−I)
p=Pr(F(I−1,Nf−I)>F)

where

yi=
Σ
nD
wnfnynI(xn=i)
Σ
nD
wnfnI(xn=i), y=
Σ
nD
wnfnyn
Σ
nD
wnfn, Nf=
Σ
nD
fn

and F(I−1,Nf−I) is a random variable following a F-distribution with degrees of freedom I−1 and Nf−I.

Related Topics

CHAID and Exhaustive CHAID Algorithms
Notation (CHAID algorithms)
CHAID Algorithm (CHAID algorithms)
Binning Continuous Predictors (CHAID algorithms)
Merging (CHAID algorithms)
Splitting (CHAID algorithms)
Stopping (CHAID algorithms)
Exhaustive CHAID Algorithm (CHAID algorithms)
Merging (CHAID algorithms)
p-Value Calculations (CHAID algorithms)
Nominal Dependent Variable (CHAID algorithms)
Ordinal Dependent Variable (CHAID algorithms)
Bonferroni Adjustments (CHAID algorithms)
Missing Values (CHAID algorithms)
References (CHAID algorithms)


Nominal Dependent Variable (CHAID algorithms)

If the dependent variable Y is nominal categorical, the null hypothesis of independence of X and Y is tested. To perform the test, a contingency (or count) table is formed using classes of Y as columns and categories of the predictor X as rows. The expected cell frequencies under the null hypothesis are estimated. The observed cell frequencies and the expected cell frequencies are used to calculate the Pearson chi-squared statistic or likelihood ratio statistic. The p-value is computed based on either one of these two statistics.

The Pearson’s Chi-square statistic and likelihood ratio statistic are, respectively,

X2=JΣj=1IΣi=1(nij−
^
m
ij)2
^
m
ij
G2=2JΣjIΣi=1nijln(nij/
^
m
ij)

where nij=
Σ
nD
fnI(xn=i∧yn=j) is the observed cell frequency and
^
m
ij is the estimated expected cell frequency for cell (xn=i,yn=j) following the independence model. The corresponding p-value is given by p=Pr(χ2d>X2) for Pearson’s Chi-square test or p=Pr(χ2d>G2) for likelihood ratio test, where χ2d follows a chi-squared distribution with degrees of freedom d = (J−1)(I−1).

Estimation of Expected Cell Frequencies without Case Weights

^
m
ij=ni.n.jn..

where

ni.=JtΣj=1nij, n.j=ItΣi=1nij, n..=JtΣj=1ItΣi=1nij

Estimation of Expected Cell Frequencies with Case Weights

If case weights are specified, the expected cell frequency under the null hypothesis of independence is of the form

mij=w−1ijαiβj

where αi and βj are parameters to be estimated, and

wij=wijnij, wij=ΣnDwnfnI(x=i∧yn=j)

Parameters estimates
^
α
i,
^
β
j, and hence
^
m
ij, are resulted from the following iterative procedure.

1. k=0, α(0)i=β(0)j=1, m(0)ij=w−1ij

2. α(k+1)i=ni.
Σ
j
w−1ijβ(k)j=α(k)ini.
Σ
j
m(k)ij

3. β(k+1)j=n.j
Σ
i
w−1ijα(k+1)i

4. m(k+1)ij=w−1ijα(k+1)iβ(k+1)j

5. If
max
i,j
|m(k+1)ij−m(k)ij|<ε, stop and output α(k+1)i,β(k+1)j and m(k+1)ij as the final estimates. Otherwise, k=k+1, go to step 2.

Related Topics

CHAID and Exhaustive CHAID Algorithms
Notation (CHAID algorithms)
CHAID Algorithm (CHAID algorithms)
Binning Continuous Predictors (CHAID algorithms)
Merging (CHAID algorithms)
Splitting (CHAID algorithms)
Stopping (CHAID algorithms)
Exhaustive CHAID Algorithm (CHAID algorithms)
Merging (CHAID algorithms)
p-Value Calculations (CHAID algorithms)
Scale Dependent Variable (CHAID algorithms)
Ordinal Dependent Variable (CHAID algorithms)
Bonferroni Adjustments (CHAID algorithms)
Missing Values (CHAID algorithms)
References (CHAID algorithms)


Ordinal Dependent Variable (CHAID algorithms)

If the dependent variable Y is categorical ordinal, the null hypothesis of independence of X and Y is tested against the row effects model, with the rows being the categories of X and columns the classes of Y, proposed by Goodman (1979). Two sets of expected cell frequencies,
^
m
ij (under the hypothesis of independence) and
^
^
m
ij (under the hypothesis that the data follow a row effects model), are both estimated. The likelihood ratio statistic and the p-value are

H2=2IΣi=1JΣj=1
^
^
m
ijln(
^
^
m
ij/
^
m
ij)
p=Pr(χ2I−1>H2)

Estimation of Expected Cell Frequencies under Row Effects Model

In the row effects model, scores for classes of Y are needed. By default, the order of a class of Y is used as the class score. Users can specify their own set of scores. Scores are set at the beginning of the tree and kept unchanged afterward. Let sj be the score for class j of Y, j = 1, …, J. The expected cell frequency under the row effects model is given by

mij=w−1ijαiβjγi

where

s=JΣj=1w.jsj/JΣj=1w.j

in which w.j=Σiwij, αi, βj and γi are unknown parameters to be estimated. Parameters estimates
^
^
α
i,
^
^
β
j,
^
^
γ
i and hence
^
^
m
ij are resulted from the following iterative procedure.

1. k=0, α(0)i=β(0)j=γ(0)i=1, m(0)ij=w−1ij

2. α(k+1)i=n.j
Σ
j
w−1ijβ(k)j(γ(k)i)(sj−s)=α(k)ini.
Σ
j
m(k)ij

3. β(k+1)j=n.j
Σ
i
w−1ijα(k+1)i(γ(k)i)(sj−s)

4. m*ij=w−1ijα(k+1)iβ(k+1)j(γ(k)i)(sj−s), Gi=1+Σj(sj−s)(nij−m*ij)Σj(sj−s)2m*ij

5. γ(k+1)i={
γ(k)iGi | Gi>0
γ(k)i | otherwise

6. m(k+1)ij=w−1ijα(k+1)iβ(k+1)j(γ(k+1)i)(sj−s)

7. If
max
i,j
|m(k+1)ij−m(k)ij|<ε, stop and output α(k+1)i,β(k+1)j,γ(k+1)i and m(k+1)ij as the final estimates. Otherwise, k=k+1, go to step 2.

Related Topics

CHAID and Exhaustive CHAID Algorithms
Notation (CHAID algorithms)
CHAID Algorithm (CHAID algorithms)
Binning Continuous Predictors (CHAID algorithms)
Merging (CHAID algorithms)
Splitting (CHAID algorithms)
Stopping (CHAID algorithms)
Exhaustive CHAID Algorithm (CHAID algorithms)
Merging (CHAID algorithms)
p-Value Calculations (CHAID algorithms)
Scale Dependent Variable (CHAID algorithms)
Nominal Dependent Variable (CHAID algorithms)
Bonferroni Adjustments (CHAID algorithms)
Missing Values (CHAID algorithms)
References (CHAID algorithms)


Bonferroni Adjustments (CHAID algorithms)

CHAID algorithms,CHAID algorithms,CHAID algorithms
Bonferroni adjustments,Bonferroni adjustments,Bonferroni adjustments
Bonferroni,Bonferroni,Bonferroni
CHAID algorithms,CHAID algorithms,CHAID algorithms

The adjusted p-value is calculated as the p-value times a Bonferroni multiplier. The Bonferroni multiplier adjusts for multiple tests.

CHAID

Suppose that a predictor variable originally has I categories, and it is reduced to r categories after the merging step. The Bonferroni multiplier B is the number of possible ways that I categories can be merged into r categories. For r = I, B = 1. For 2≤r<I, use the following equation.

B={
(
I−1
r−1
) 		Ordinal predictor
r−1Σv=0(−1)v(r−v)Iv!(r−v)! Nominal predictor
(
I−2
r−2
)+r(
I−2
r−1
) 		Ordinal with a missing category

Exhaustive CHAID

Exhaustive CHAID merges two categories iteratively until only two categories left. The Bonferroni multiplier B is the sum of number of possible ways of merging two categories at each iteration.

B={
I(I−1)2 | Ordinal predictor
I(I2−1)2 | Nominal predictor
I(I−1)2 | Ordinal with a missing category

Related Topics

CHAID and Exhaustive CHAID Algorithms
Notation (CHAID algorithms)
CHAID Algorithm (CHAID algorithms)
Binning Continuous Predictors (CHAID algorithms)
Merging (CHAID algorithms)
Splitting (CHAID algorithms)
Stopping (CHAID algorithms)
Exhaustive CHAID Algorithm (CHAID algorithms)
Merging (CHAID algorithms)
p-Value Calculations (CHAID algorithms)
Scale Dependent Variable (CHAID algorithms)
Nominal Dependent Variable (CHAID algorithms)
Ordinal Dependent Variable (CHAID algorithms)
Missing Values (CHAID algorithms)
References (CHAID algorithms)


Missing Values (CHAID algorithms)

CHAID algorithms,CHAID algorithms,CHAID algorithms
missing values,missing values,missing values

If the dependent variable of a case is missing, it will not be used in the analysis. If all predictor variables of a case are missing, this case is ignored. If the case weight is missing, zero, or negative, the case is ignored. If the frequency weight is missing, zero, or negative, the case is ignored.

Otherwise, missing values will be treated as a predictor category. For ordinal predictors, the algorithm first generates the “best” set of categories using all non-missing information from the data. Next the algorithm identifies the category that is most similar to the missing category. Finally, the algorithm decides whether to merge the missing category with its most similar category or to keep the missing category as a separate category. Two p-values are calculated, one for the set of categories formed by merging the missing category with its most similar category, and the other for the set of categories formed by adding the missing category as a separate category. Take the action that gives the smallest p-value.

For nominal predictors, the missing category is treated the same as other categories in the analysis.

Related Topics

CHAID and Exhaustive CHAID Algorithms
Notation (CHAID algorithms)
CHAID Algorithm (CHAID algorithms)
Binning Continuous Predictors (CHAID algorithms)
Merging (CHAID algorithms)
Splitting (CHAID algorithms)
Stopping (CHAID algorithms)
Exhaustive CHAID Algorithm (CHAID algorithms)
Merging (CHAID algorithms)
p-Value Calculations (CHAID algorithms)
Scale Dependent Variable (CHAID algorithms)
Nominal Dependent Variable (CHAID algorithms)
Ordinal Dependent Variable (CHAID algorithms)
Bonferroni Adjustments (CHAID algorithms)
References (CHAID algorithms)


References (CHAID algorithms)

CHAID algorithms,CHAID algorithms,CHAID algorithms
references,references,references

Biggs, D., B. de Ville, and E. Suen. 1991. A method of choosing multiway partitions for classification and decision trees. Journal of Applied Statistics, 18, 49-62.

Goodman, L. A. 1979. Simple models for the analysis of association in cross-classifications having ordered categories. Journal of the American Statistical Association, 74, 537-552.

Kass, G. 1980. An exploratory technique for investigating large quantities of categorical data. Applied Statistics, 29:2, 119-127.

Related Topics

CHAID and Exhaustive CHAID Algorithms
Notation (CHAID algorithms)
CHAID Algorithm (CHAID algorithms)
Binning Continuous Predictors (CHAID algorithms)
Merging (CHAID algorithms)
Splitting (CHAID algorithms)
Stopping (CHAID algorithms)
Exhaustive CHAID Algorithm (CHAID algorithms)
Merging (CHAID algorithms)
p-Value Calculations (CHAID algorithms)
Scale Dependent Variable (CHAID algorithms)
Nominal Dependent Variable (CHAID algorithms)
Ordinal Dependent Variable (CHAID algorithms)
Bonferroni Adjustments (CHAID algorithms)
Missing Values (CHAID algorithms)


QUEST Algorithms

TREE (command),TREE (command),TREE (command)
algorithms,algorithms,algorithms
Decision Tree,Decision Tree,Decision Tree
algorithms,algorithms,algorithms
QUEST algorithms,QUEST algorithms,QUEST algorithms

QUEST is proposed by Loh and Shih (1997) as a Quick, Unbiased, Efficient, Statistical Tree. It is a tree-structured classification algorithm that yields a binary decision tree. A comparison study of QUEST and other algorithms was conducted by Lim et al (2000).

Related Topics

Notation (QUEST algorithms)
Tree Growing Process (QUEST algorithms)
Selection of Split Predictor (QUEST algorithms)
ANOVA F Test (QUEST algorithms)
Pearson's Chi-Square Test (QUEST algorithms)
Levene's F Test (QUEST algorithms)
Selection of Split Point (QUEST algorithms)
Continuous Splitting Predictor (QUEST algorithms)
Nominal Splitting Predictor (QUEST algorithms)
Transforming a Categorical Predictor into a Continuous Predictor (QUEST algorithms)
Stopping (QUEST algorithms)
Missing Values (QUEST algorithms)
References (QUEST algorithms)


Notation (QUEST algorithms)

QUEST algorithms,QUEST algorithms,QUEST algorithms
notation,notation,notation

The following notation is used throughout this chapter unless otherwise stated:

Y

The dependent, or target, variable. It must be nominal categorical. If Y is categorical with J classes, its class takes values in C = {1, …, J}.

Xm, m=1, ..., M

The set of all predictor variables. A predictor can be nominal categorical or continuous (including ordinal categorical).

ℏ={xn,yn}Nn=1

The whole learning sample.

ℏ(t)

The learning samples that fall in node t.

fn

The frequency weight associated with case n. Non-integral positive value is rounded to its nearest integer.

Nf

Total number of learning cases, Nf=
Σ
nℏ
fn

Nf,j

Total number of class j learning cases, Nf,j=
Σ
nℏ
fnI(yn=j)

Nf(t)

Total number of learning cases in node t, Nf(t)=
Σ
nℏ(t)
fn

Nf,j(t)

Total number of class j learning cases in node t, Nf,j(t)=
Σ
nℏ(t)
fnI(yn=j).

π(j), j=1,...,J

Prior probability of Y = j, j = 1, …, J.

p(j,t), j=1,...,J

The probability of a case in class j and node t.

p(t)

The probability of a case in node t.

p(j|t), j=1,...,J

The probability of a case in class j given that it falls into node t.

C(i|j)

The cost of miss-classifying a class j case as a class i case. C(j|j)=0

Related Topics

QUEST Algorithms
Tree Growing Process (QUEST algorithms)
Selection of Split Predictor (QUEST algorithms)
ANOVA F Test (QUEST algorithms)
Pearson's Chi-Square Test (QUEST algorithms)
Levene's F Test (QUEST algorithms)
Selection of Split Point (QUEST algorithms)
Continuous Splitting Predictor (QUEST algorithms)
Nominal Splitting Predictor (QUEST algorithms)
Transforming a Categorical Predictor into a Continuous Predictor (QUEST algorithms)
Stopping (QUEST algorithms)
Missing Values (QUEST algorithms)
References (QUEST algorithms)


Tree Growing Process (QUEST algorithms)

QUEST algorithms,QUEST algorithms,QUEST algorithms
tree growth,tree growth,tree growth

The QUEST tree growing process consists of the selection of a split predictor, selection of a split point for the selected predictor, and stopping. In this algorithm, only univariate splits are considered.

Related Topics

QUEST Algorithms
Notation (QUEST algorithms)
Selection of Split Predictor (QUEST algorithms)
ANOVA F Test (QUEST algorithms)
Pearson's Chi-Square Test (QUEST algorithms)
Levene's F Test (QUEST algorithms)
Selection of Split Point (QUEST algorithms)
Continuous Splitting Predictor (QUEST algorithms)
Nominal Splitting Predictor (QUEST algorithms)
Transforming a Categorical Predictor into a Continuous Predictor (QUEST algorithms)
Stopping (QUEST algorithms)
Missing Values (QUEST algorithms)
References (QUEST algorithms)


Selection of Split Predictor (QUEST algorithms)

1. For each continuous predictor X, perform an ANOVA F test that tests if all the different classes of the dependent variable Y have the same mean of X, and calculate the p-value according to the F statistics. For each categorical predictor, perform a Pearson’s chi-square test of Y and X’s independence, and calculate the p-value according to the chi-square statistics.

2. Find the predictor with the smallest p-value and denote it X*.

3. If this smallest p-value is less than α / M, where α∈(0,1) is a user-specified level of significance and M is the total number of predictor variables, predictor X* is selected as the split predictor for the node. If not, go to 4.

4. For each continuous predictor X, compute a Levene’s F statistic based on the absolute deviation of X from its class mean to test if the variances of X for different classes of Y are the same, and calculate the p-value for the test.

5. Find the predictor with the smallest p-value and denote it as X**.

6. If this smallest p-value is less than α/(M + M1), where M1 is the number of continuous predictors, X** is selected as the split predictor for the node. Otherwise, this node is not split.

Related Topics

QUEST Algorithms
Notation (QUEST algorithms)
Tree Growing Process (QUEST algorithms)
ANOVA F Test (QUEST algorithms)
Pearson's Chi-Square Test (QUEST algorithms)
Levene's F Test (QUEST algorithms)
Selection of Split Point (QUEST algorithms)
Continuous Splitting Predictor (QUEST algorithms)
Nominal Splitting Predictor (QUEST algorithms)
Transforming a Categorical Predictor into a Continuous Predictor (QUEST algorithms)
Stopping (QUEST algorithms)
Missing Values (QUEST algorithms)
References (QUEST algorithms)


ANOVA F Test (QUEST algorithms)

Suppose, for node t, there are Jt classes of dependent variable Y. The F statistic for a continuous predictor X is given by

FX=JtΣj=1Nf,j(t)(x(j)(t)−x(t))2/(Jt−1)
Σ
nℏ(t)
fn(xn−x(yn)(t))2/(Nf(t)−Jt)

where

x(j)(t)=
Σ
nℏ(t)
fnxnI(yn=j)Nf,j(t), x(t)=
Σ
nℏ(t)
fnxnNf(t)

Its corresponding p-value is given by

pX=Pr(F(Jt−1,Nf(t)−Jt)>FX)

where F( Jt−1 , Nf(t)−Jt) follows an F distribution with Jt−1 and Nf(t)−Jt degrees of freedom.

Related Topics

QUEST Algorithms
Notation (QUEST algorithms)
Tree Growing Process (QUEST algorithms)
Selection of Split Predictor (QUEST algorithms)
Pearson's Chi-Square Test (QUEST algorithms)
Levene's F Test (QUEST algorithms)
Selection of Split Point (QUEST algorithms)
Continuous Splitting Predictor (QUEST algorithms)
Nominal Splitting Predictor (QUEST algorithms)
Transforming a Categorical Predictor into a Continuous Predictor (QUEST algorithms)
Stopping (QUEST algorithms)
Missing Values (QUEST algorithms)
References (QUEST algorithms)


Pearson's Chi-Square Test (QUEST algorithms)

Suppose, for node t, there are Jt classes of dependent variable Y. The Pearson's Chi-Square statistic for a categorical predictor X with It categories is given by

X2=JtΣj=1ItΣi=1(nij−
^
m
ij)2
^
m
ij

where

nij=
Σ
nℏ(t)
fnI(yn=j∧xn=i),
^
m
ij=ni.n.jn..

with

ni.=JtΣj=1nij, n.j=ItΣi=1nij, n..=JtΣj=1ItΣi=1nij

where I(yn=j∧xn=i)=1 if case n has yn=j and xn=i; 0 otherwise.

The corresponding p-value is given by pX=Pr(χ2d>X2) where χ2d follows a chi-squared distribution with degrees of freedom d = (Jt−1)(It−1).

Related Topics

QUEST Algorithms
Notation (QUEST algorithms)
Tree Growing Process (QUEST algorithms)
Selection of Split Predictor (QUEST algorithms)
ANOVA F Test (QUEST algorithms)
Levene's F Test (QUEST algorithms)
Selection of Split Point (QUEST algorithms)
Continuous Splitting Predictor (QUEST algorithms)
Nominal Splitting Predictor (QUEST algorithms)
Transforming a Categorical Predictor into a Continuous Predictor (QUEST algorithms)
Stopping (QUEST algorithms)
Missing Values (QUEST algorithms)
References (QUEST algorithms)


Levene's F Test (QUEST algorithms)

For continuous predictor X, calculate zn=|xn−x(yn).(t)|. The Levene’s F statistics for predictor X is the ANOVA F statistic for zn.

Related Topics

QUEST Algorithms
Notation (QUEST algorithms)
Tree Growing Process (QUEST algorithms)
Selection of Split Predictor (QUEST algorithms)
ANOVA F Test (QUEST algorithms)
Pearson's Chi-Square Test (QUEST algorithms)
Selection of Split Point (QUEST algorithms)
Continuous Splitting Predictor (QUEST algorithms)
Nominal Splitting Predictor (QUEST algorithms)
Transforming a Categorical Predictor into a Continuous Predictor (QUEST algorithms)
Stopping (QUEST algorithms)
Missing Values (QUEST algorithms)
References (QUEST algorithms)


Selection of Split Point (QUEST algorithms)

At a node, suppose that a predictor variable X has been selected for splitting. The next step is to determine the split point. If X is a continuous predictor variable, a split point d in the split X≤d is to be determined. If X is a nominal categorical predictor variable, a subset K of the set of all values taken by X in the split X∈K is to be determined. The algorithm is as follows.

Related Topics

QUEST Algorithms
Notation (QUEST algorithms)
Tree Growing Process (QUEST algorithms)
Selection of Split Predictor (QUEST algorithms)
ANOVA F Test (QUEST algorithms)
Pearson's Chi-Square Test (QUEST algorithms)
Levene's F Test (QUEST algorithms)
Continuous Splitting Predictor (QUEST algorithms)
Nominal Splitting Predictor (QUEST algorithms)
Transforming a Categorical Predictor into a Continuous Predictor (QUEST algorithms)
Stopping (QUEST algorithms)
Missing Values (QUEST algorithms)
References (QUEST algorithms)


Continuous Splitting Predictor (QUEST algorithms)

If the selected predictor variable X is continuous:

1. Group classes of dependent variable Y into two super-classes. If there are only two classes of Y, go to step 2. Otherwise, calculate the sample mean of X for each class of Y. If all class means are identical, the class with the most cases is gathered as super-class A and the other classes as super-class B. If there are two or more classes with the same maximum number of cases, the one with the smallest class index j is chosen to form A and the rest to B. If not all the class means are identical, a k-means clustering method, with the initial cluster centers set at the two most extreme class means, is applied to class means to divide classes of Y into two super-classes: A and B. Let xA and s2A denote the sample mean and variance for super-class A, xB and s2B the sample mean and variance for super-class B.

2. If min(s2A,s2B)=0, order the two super-classes by their variance in increasing order and denote the variances by s21≤s22, and the corresponding means by x1,x2. Let ε be a very small positive number, say ε=10-12. If x1<x2, d=x1(1+ε). Else, d=x1(1−ε).

3. If min(s2A,s2B)≠0, quadratic discriminant analysis (QDA) is applied to determine the split point d. QDA assumes that X follows a normal distributions in each super-class with the calculated sample mean and variance. The split point is among the roots that make probability Pr﻿(x,A|t)=Pr﻿(x,B|t) for node t, where

Pr(x,A|t)=P(x|A,t)P(A|t)=P(A|t)1
√ 2πs2A
exp﻿{−(x−xA)22s2A}

with

p(A|t)=
Σ
jA
p(j|t)=
Σ
jA
p(j,t)
Σ
j
p(j,t), p(j,t)=π(j)Nf,j(t)Nf,j

Solving P(X,A|t)=P(X,B|t) is equivalent to solving the following quadratic equation

ax2+bx+c=0

where

a=s2A−s2B, b=2(xAs2B−xBs2A)

c=xBs2A−xAs2B+2s2As2Blog﻿p(A|t)sBp(B|t)sA

If there is only one real root, it is chosen to be the split point, provided this yields two non-empty nodes. If there are two real roots, choose the one that is closer to xA, provided this yields two non-empty nodes. Otherwise use the mean (xA+xB)/2 as split point.

Note: In step 3, the prior probability distribution for the dependent variable is needed. When user specified costs are involved, the altered priors can be used to replace the priors (optional). The altered prior is defined as π´(j) = C(j)π(j)
Σ
j
C(j)π(j), where C(j) = ΣiC(i|j).

Related Topics

QUEST Algorithms
Notation (QUEST algorithms)
Tree Growing Process (QUEST algorithms)
Selection of Split Predictor (QUEST algorithms)
ANOVA F Test (QUEST algorithms)
Pearson's Chi-Square Test (QUEST algorithms)
Levene's F Test (QUEST algorithms)
Selection of Split Point (QUEST algorithms)
Nominal Splitting Predictor (QUEST algorithms)
Transforming a Categorical Predictor into a Continuous Predictor (QUEST algorithms)
Stopping (QUEST algorithms)
Missing Values (QUEST algorithms)
References (QUEST algorithms)


Nominal Splitting Predictor (QUEST algorithms)

If the selected predictor variable X is nominal and with more than two categories (if X is binary, the split point is clear), QUEST first transforms it into a continuous variable (call it ξ) by assigning the largest discriminant coordinates to categories of the predictor. QUEST then applies the split point selection algorithm for continuous predictor on ξ to determine the split point.

Related Topics

QUEST Algorithms
Notation (QUEST algorithms)
Tree Growing Process (QUEST algorithms)
Selection of Split Predictor (QUEST algorithms)
ANOVA F Test (QUEST algorithms)
Pearson's Chi-Square Test (QUEST algorithms)
Levene's F Test (QUEST algorithms)
Selection of Split Point (QUEST algorithms)
Continuous Splitting Predictor (QUEST algorithms)
Transforming a Categorical Predictor into a Continuous Predictor (QUEST algorithms)
Stopping (QUEST algorithms)
Missing Values (QUEST algorithms)
References (QUEST algorithms)


Transforming a Categorical Predictor into a Continuous Predictor (QUEST algorithms)

Let X be a nominal categorical predictor taking values in the set {b1, …, bI}. Transform X into a continuous variable ξ such that the ratio of between-classes to within-classes sum squares of ξ is maximized (the classes here refer to the classes of dependent variable). The details are as follows:

• Transform each value x of X in ℏ into an I-dimensional dummy vector v = (v1, …, vI)’, where vi={
1 | x=bi
0 | otherwise
.

• Calculate the overall and class j mean of v

v=
Σ
nℏ
fnvnNf, v(j)=
Σ
nℏ
fnvnI(yn=j)Nf,j

• Calculate the following I×I matrices.

B=JΣj=1Nf,j(v(j)−v)(v(j)−v)´

T=
Σ
nℏ
fn(vn−v)(vn−v)´

• Perform single value decomposition on T to obtain T = QDQ’, where Q is an I×I orthogonal matrix, D = diag(d1, …, dI) such that d1 ≥ … ≥ dI ≥ 0. Let D−12 = diag(d*1 , …, d*I) where d*i=d−1/2i if di > 0, 0 otherwise. Perform single value decomposition on D−12Q´BQD−12 to obtain its eigenvector a which is associated with its largest eigenvalue.

• The largest discriminant coordinate of v is the projection

ξ=a´D−12Q´v

Note: The original QUEST by Loh and Shih (1997) transforms a categorical predictor into a continuous predictor at a considered node based on the data in the node. This implementation of QUEST does the transformation only once at the very beginning based on the whole learning sample.

Related Topics

QUEST Algorithms
Notation (QUEST algorithms)
Tree Growing Process (QUEST algorithms)
Selection of Split Predictor (QUEST algorithms)
ANOVA F Test (QUEST algorithms)
Pearson's Chi-Square Test (QUEST algorithms)
Levene's F Test (QUEST algorithms)
Selection of Split Point (QUEST algorithms)
Continuous Splitting Predictor (QUEST algorithms)
Nominal Splitting Predictor (QUEST algorithms)
Stopping (QUEST algorithms)
Missing Values (QUEST algorithms)
References (QUEST algorithms)


Stopping (QUEST algorithms)

QUEST algorithms,QUEST algorithms,QUEST algorithms
stopping criteria,stopping criteria,stopping criteria

The stopping step checks if the tree growing process should be stopped according to the following stopping rules.

1. If a node becomes pure; that is, all cases belong to the same dependent variable class at the node, the node will not be split.

2. If all cases in a node have identical values for each predictor, the node will not be split.

3. If the current tree depth reaches the user-specified maximum tree depth limit value, the tree growing process will stop.

4. If the size of a node is less than the user-specified minimum node size value, the node will not be split.

5. If the split of a node results in a child node whose node size is less than the user-specified minimum child node size value, the node will not be split.

Related Topics

QUEST Algorithms
Notation (QUEST algorithms)
Tree Growing Process (QUEST algorithms)
Selection of Split Predictor (QUEST algorithms)
ANOVA F Test (QUEST algorithms)
Pearson's Chi-Square Test (QUEST algorithms)
Levene's F Test (QUEST algorithms)
Selection of Split Point (QUEST algorithms)
Continuous Splitting Predictor (QUEST algorithms)
Nominal Splitting Predictor (QUEST algorithms)
Transforming a Categorical Predictor into a Continuous Predictor (QUEST algorithms)
Missing Values (QUEST algorithms)
References (QUEST algorithms)


Missing Values (QUEST algorithms)

QUEST algorithms,QUEST algorithms,QUEST algorithms
missing values,missing values,missing values

If the dependent variable of a case is missing, this case will be ignored in the analysis. If all predictor variables of a case are missing, this case will be ignored. If the frequency weight is missing, zero or negative, the case will be ignored.

Otherwise, the surrogate split method will be used to deal with missing data in predictor variables. If a case has a missing value at the selected predictor, the assignment will be done based on the surrogate split. The method of defining and calculating surrogate splits is the same as that in CART. See the topic Missing Value Handling (CART algorithms) for more information.

Related Topics

QUEST Algorithms
Notation (QUEST algorithms)
Tree Growing Process (QUEST algorithms)
Selection of Split Predictor (QUEST algorithms)
ANOVA F Test (QUEST algorithms)
Pearson's Chi-Square Test (QUEST algorithms)
Levene's F Test (QUEST algorithms)
Selection of Split Point (QUEST algorithms)
Continuous Splitting Predictor (QUEST algorithms)
Nominal Splitting Predictor (QUEST algorithms)
Transforming a Categorical Predictor into a Continuous Predictor (QUEST algorithms)
Stopping (QUEST algorithms)
References (QUEST algorithms)


References (QUEST algorithms)

QUEST algorithms,QUEST algorithms,QUEST algorithms
references,references,references

Lim, T. S., W. Y. Loh, and Y. S. Shih. 2000. A Comparison of Prediction Accuracy, Complexity, and Training Time of Thirty-three Old and New Classification Algorithms. Machine Learning, 40:3, 203-228.

Loh, W. Y., and Y. S. Shih. 1997. Split selection methods for classification trees. Statistica Sinica, 7, 815-840.

Related Topics

QUEST Algorithms
Notation (QUEST algorithms)
Tree Growing Process (QUEST algorithms)
Selection of Split Predictor (QUEST algorithms)
ANOVA F Test (QUEST algorithms)
Pearson's Chi-Square Test (QUEST algorithms)
Levene's F Test (QUEST algorithms)
Selection of Split Point (QUEST algorithms)
Continuous Splitting Predictor (QUEST algorithms)
Nominal Splitting Predictor (QUEST algorithms)
Transforming a Categorical Predictor into a Continuous Predictor (QUEST algorithms)
Stopping (QUEST algorithms)
Missing Values (QUEST algorithms)


Assignment and Risk Estimation Algorithms

TREE (command),TREE (command),TREE (command)
algorithms,algorithms,algorithms
Decision Tree,Decision Tree,Decision Tree
algorithms,algorithms,algorithms
decision tree algorithms,decision tree algorithms,decision tree algorithms
assignment and risk,assignment and risk,assignment and risk

This section discusses how a class or a value is assigned to a node and to a case and three methods of risk estimation: the resubstitution method, test sample method and cross validation method. The information is applicable to the tree growing algorithms CART, CHAID, exhaustive CHAID and QUEST. Materials in this document are based on Classification and Regression Trees by Breiman, et al (1984). It is assumed that a CART, CHAID, exhaustive CHAID or QUEST tree has been grown successfully using a learning sample.

Related Topics

Notation (decision tree algorithms)
Assignment (decision tree algorithms)
Assignment of a Node (decision tree algorithms)
Assignment of a Case (decision tree algorithms)
Risk Estimation (decision tree algorithms)
Loss Function (decision tree algorithms)
Risk Estimation of a Tree (decision tree algorithms)
Resubstitution Estimate of the Risk (decision tree algorithms)
Test Sample Estimate of the Risk (decision tree algorithms)
Cross Validation Estimate of the Risk (decision tree algorithms)
References (decision tree algorithms)


Notation (decision tree algorithms)

The following notation is used throughout this chapter unless otherwise stated:

Y | The dependent variable, or target variable. It can be either categorical (nominal or ordinal) or continuous. If Y is categorical with J classes, its class takes values in C = {1, …, J}.
ℏ={xn,yn}Nn=1 | The learning sample where xn and ynare the predictor vector and dependent variable for case n.
ℏ(t) | The learning samples that fall in node t.
fn | The frequency weight associated with case n. Non-integral positive value is rounded to its nearest integer.
wn | The case weight associated with case n.
π(j), j=1,...,J | Prior probability of Y = j
C(i | j) | The cost of miss-classifying a class j case as a class i case, C(j | j)=0.

Related Topics

Assignment and Risk Estimation Algorithms
Assignment (decision tree algorithms)
Assignment of a Node (decision tree algorithms)
Assignment of a Case (decision tree algorithms)
Risk Estimation (decision tree algorithms)
Loss Function (decision tree algorithms)
Risk Estimation of a Tree (decision tree algorithms)
Resubstitution Estimate of the Risk (decision tree algorithms)
Test Sample Estimate of the Risk (decision tree algorithms)
Cross Validation Estimate of the Risk (decision tree algorithms)
References (decision tree algorithms)


Assignment (decision tree algorithms)

decision tree algorithms,decision tree algorithms,decision tree algorithms
assignment,assignment,assignment

Once the tree is grown, an assignment (also called action or decision) is given to each node based on the learning sample. To predict the dependent variable value for an incoming case, we first find in which terminal node it falls, then use the assignment of that terminal node for prediction.

Related Topics

Assignment and Risk Estimation Algorithms
Notation (decision tree algorithms)
Assignment of a Node (decision tree algorithms)
Assignment of a Case (decision tree algorithms)
Risk Estimation (decision tree algorithms)
Loss Function (decision tree algorithms)
Risk Estimation of a Tree (decision tree algorithms)
Resubstitution Estimate of the Risk (decision tree algorithms)
Test Sample Estimate of the Risk (decision tree algorithms)
Cross Validation Estimate of the Risk (decision tree algorithms)
References (decision tree algorithms)


Assignment of a Node (decision tree algorithms)

node assignment,node assignment,node assignment
decision tree algorithms,decision tree algorithms,decision tree algorithms

For any node t, let dt be the assignment given to node t,

dt={
j*(t) | Y is categorical
y(t) | Y is continuous
j*(t)=arg
min
i
ΣjC(i|j)p(j|t)
y(t)=1Nw(t)
Σ
n ℏ(t)
wnfnyn

where

p(j|t)=p(j,t)
Σ
j
p(j,t), p(j,t)=π(j)Nw,j(t)Nw,j

Nw=
Σ
nℏ
wnfn, Nw,j=
Σ
nℏ
wnfnI(yn=j)

Nw(t)=
Σ
nℏ(t)
wnfn, Nw,j(t)=
Σ
nℏ(t)
wnfnI(yn=j)

If there is more than one class j that achieves the minimum, choose j*(t) to be the smallest such j for which Nf,j(t)=
Σ
nℏ(t)
fnI(yn=j) is greater than 0, or the absolute smallest if Nf, j(t) is zero for all of them. For CHAID and exhaustive CHAID, use π(j)=Nw,j/Nw in the equation.

Related Topics

Assignment and Risk Estimation Algorithms
Notation (decision tree algorithms)
Assignment (decision tree algorithms)
Assignment of a Case (decision tree algorithms)
Risk Estimation (decision tree algorithms)
Loss Function (decision tree algorithms)
Risk Estimation of a Tree (decision tree algorithms)
Resubstitution Estimate of the Risk (decision tree algorithms)
Test Sample Estimate of the Risk (decision tree algorithms)
Cross Validation Estimate of the Risk (decision tree algorithms)
References (decision tree algorithms)


Assignment of a Case (decision tree algorithms)

case assignment,case assignment,case assignment
decision tree algorithms,decision tree algorithms,decision tree algorithms

For a case with predictor vector x, the assignment or prediction dT(x) for this case by the tree T is

dT(x)={
j*(t(x)) | Y is categorical
y(t(x)) | Y is continuous

where t(x) is the terminal node the case falls in.

Related Topics

Assignment and Risk Estimation Algorithms
Notation (decision tree algorithms)
Assignment (decision tree algorithms)
Assignment of a Node (decision tree algorithms)
Risk Estimation (decision tree algorithms)
Loss Function (decision tree algorithms)
Risk Estimation of a Tree (decision tree algorithms)
Resubstitution Estimate of the Risk (decision tree algorithms)
Test Sample Estimate of the Risk (decision tree algorithms)
Cross Validation Estimate of the Risk (decision tree algorithms)
References (decision tree algorithms)


Risk Estimation (decision tree algorithms)

decision tree algorithms,decision tree algorithms,decision tree algorithms
risk,risk,risk
risk,risk,risk
decision tree algorithms,decision tree algorithms,decision tree algorithms

Note that case weight is not involved in risk estimation, though it is involved in tree growing process and class assignment.

Related Topics

Assignment and Risk Estimation Algorithms
Notation (decision tree algorithms)
Assignment (decision tree algorithms)
Assignment of a Node (decision tree algorithms)
Assignment of a Case (decision tree algorithms)
Loss Function (decision tree algorithms)
Risk Estimation of a Tree (decision tree algorithms)
Resubstitution Estimate of the Risk (decision tree algorithms)
Test Sample Estimate of the Risk (decision tree algorithms)
Cross Validation Estimate of the Risk (decision tree algorithms)
References (decision tree algorithms)


Loss Function (decision tree algorithms)

loss function,loss function,loss function
decision tree algorithms,decision tree algorithms,decision tree algorithms

A loss function L(y, a) is a real-valued function in which y is the actual value of Y and a is the assignment taken. Throughout this document, the following types of loss functions are used.

L(y,a)={
C(a|y) | Y is categorical
(y−a)2 | Y is continuous

Related Topics

Assignment and Risk Estimation Algorithms
Notation (decision tree algorithms)
Assignment (decision tree algorithms)
Assignment of a Node (decision tree algorithms)
Assignment of a Case (decision tree algorithms)
Risk Estimation (decision tree algorithms)
Risk Estimation of a Tree (decision tree algorithms)
Resubstitution Estimate of the Risk (decision tree algorithms)
Test Sample Estimate of the Risk (decision tree algorithms)
Cross Validation Estimate of the Risk (decision tree algorithms)
References (decision tree algorithms)


Risk Estimation of a Tree (decision tree algorithms)

Suppose that a tree T is grown and assignments have been given to each node. Let
˜
T
denote the set of terminal nodes of the tree. Let D be the data set used to calculate the risk. Dropping all cases in D to T, let D(t) denote the set of cases that fall in node t. The risk of the tree based on data D is estimated by

R(T|D)={
Σ
j
π(j)Lj 		Y categorical
L Y continuous
={
L | Y categorical, M1
Σ
j
π(j)Lj 		Y categorical, M2
L | Y continuous

where M1 represents empirical prior situation, and M2 non-empirical prior, and

L=1Nf
Σ
nD
fnL(yn,dT(xn)), Lj=1Nf,j
Σ
nD
fnL(yn,dT(xn))I(yn=j)

Nf=
Σ
nD
fn, Nf,j=
Σ
nD
fnI(yn=j)

Assuming that L(yn,dT(xn)) are independent of each other, then the variance of R(T) is estimated by

Var (R(T))={
Σ
j
π(j)2s2jNf,j 		Y categorical, M2
s2Nf Y con, or, Y cat and M1

where

s2j=1Nf,j
Σ
nD
fn(L(yn,dT(xn))−Lj)2I(yn=j)
=1Nf,j
Σ
nD
fnL2(yn,dT(xn))I(yn=j)−Lj
s2=1Nf
Σ
nD
fn(L(yn,dT(xn))−L)2=1Nf
Σ
nD
fnL2(yn,dT(xn))−L2

Putting everything together:

R(T|D)={
1NfΣt
˜
T
ΣjC(j*(t)|j)Nf,j(t) 		Y categorical, M1
Σ
j
π(j)Nf,j
Σ
t
˜
T
C(j*(t)|j)Nf,j(t) 		Y categorical, M2
1NfΣt
˜
T
Σ
nD(t)
fn(yn−y(t))2 		Y continuous
Var (R(T|D))
={
1(Nf)2{
Σ
j
Σ
t
˜
T
Nf,j(t)C(j*(t)|j)2−NfR(T|D)2} 		Y cat, M1
Σ
j
(π(j)Nf,j)2[
Σ
t
˜
T
Nf,j(t)C(j*(t)|j)2−{
Σ
t
˜
T
Nf,j(t)C(j*(t)|j)}2Nf,j] 		Y cat, M2
1Nf{
Σ
t
˜
T
Σ
nD(t)
fn(yn−y(t))4−NfR(T|D)2} 		Y con

where

Nf,j(t)=
Σ
nD(t)
fnI(yn=j)

The estimated standard error of R(T|D) is given by se (R(T|D))=
√ var(R(T|D))
.

Risk estimation of a tree is often written as R(T|D)=
Σ
t
˜
T
R(t|D) with R(t|D) being the contribution from node t to the tree risk such that

R(t|D)={
1NfΣjNf,j(t)C(j*(t)|j) Y categorical, M1
Σ
j
π(j)Nf,j(t)Nf,jC(j*(t)|j) 		Y categorical, M2
1Nf
Σ
nD(t)
fn(yn−y(t))2 		Y continuous

Related Topics

Assignment and Risk Estimation Algorithms
Notation (decision tree algorithms)
Assignment (decision tree algorithms)
Assignment of a Node (decision tree algorithms)
Assignment of a Case (decision tree algorithms)
Risk Estimation (decision tree algorithms)
Loss Function (decision tree algorithms)
Resubstitution Estimate of the Risk (decision tree algorithms)
Test Sample Estimate of the Risk (decision tree algorithms)
Cross Validation Estimate of the Risk (decision tree algorithms)
References (decision tree algorithms)


Resubstitution Estimate of the Risk (decision tree algorithms)

The resubstitution risk estimation method uses the same set of data (learning sample) that is used to grow the tree T to calculate its risk, that is:

R(t)=R(t|ℏ)
R(T)=R(T|ℏ)=
Σ
t
˜
T
R(t)
Var (R(T))= Var (R(T|ℏ))

Related Topics

Assignment and Risk Estimation Algorithms
Notation (decision tree algorithms)
Assignment (decision tree algorithms)
Assignment of a Node (decision tree algorithms)
Assignment of a Case (decision tree algorithms)
Risk Estimation (decision tree algorithms)
Loss Function (decision tree algorithms)
Risk Estimation of a Tree (decision tree algorithms)
Test Sample Estimate of the Risk (decision tree algorithms)
Cross Validation Estimate of the Risk (decision tree algorithms)
References (decision tree algorithms)


Test Sample Estimate of the Risk (decision tree algorithms)

The idea of test sample risk estimation is that the whole data set is divided into 2 mutually exclusive subsets ℏ and ℏ´. ℏ is used as a learning sample to grow a tree T and ℏ´ is used as a test sample to check the accuracy of the tree. The test sample estimate is

Rts(T)=R(T|ℏ´)
Var (Rts(T))= Var (R(T|ℏ´))

Related Topics

Assignment and Risk Estimation Algorithms
Notation (decision tree algorithms)
Assignment (decision tree algorithms)
Assignment of a Node (decision tree algorithms)
Assignment of a Case (decision tree algorithms)
Risk Estimation (decision tree algorithms)
Loss Function (decision tree algorithms)
Risk Estimation of a Tree (decision tree algorithms)
Resubstitution Estimate of the Risk (decision tree algorithms)
Cross Validation Estimate of the Risk (decision tree algorithms)
References (decision tree algorithms)


Cross Validation Estimate of the Risk (decision tree algorithms)

Cross validation estimation is provided only when a tree is grown using the automatic tree growing process. Let T be a tree which has been grown using all data from the whole data set ℏ0. Let V≥2 be a positive integer.

1. Divide ℏ0 into V mutually exclusive subsets ℏ´v, v = 1, …, V. Let ℏv be ℏ0−ℏ´v , v = 1, …, V.

2. For each v, consider ℏv as a learning sample and grow a tree Tv on ℏv by using the same set of user specified stopping rules which was applied to grow T.

3. After Tv is grown and assignment j*v(t) or yv(t) for node t of Tv is done, consider ℏ´v as a test sample and calculate its test sample risk estimate Rts(Tv).

4. Repeat above for each v = 1, …, V. The weighted average of these test sample risk estimates is used as the V-fold cross validation risk estimate of T.

The V-fold cross validation estimate, Rcv(T), of the risk of a tree T and its variance are estimated by

RCV(T)={
Σ
j
π(j)1N0f,j
Σ
v
N´v,f,jRts(Tv|j) 		Y categorical, M2
1N0f
Σ
v
N´v,fRts(Tv) 		Y con, or, Y cat and M1
Var (RCV(T))
={
1(N0f)2{
Σ
v
Σ
j
Σ
t
˜
T
v
N´v,f,j(t)C(j*v(t)|j)2−N0fRcv(T)2} 		Y cat, M1
Σ
j
(π(j)N0f,j)2[
Σ
v
Σ
t
˜
T
v
N´v,f,j(t)C(j*v(t)|j)2−{
Σ
v
N´v,f,jRts(Tv|Y=j)}2N0f,j] 		Y cat, M2
1 (N0f)2{
Σ
v
Σ
t
˜
T
v
Σ
nℏ´v(t)
fn(yn−yv(t))4−N0fRcv(T)2} 		Y con

where

Rts(Tv|j)=1N´v,f,j
Σ
t
˜
T
v
N´v,f,j(t)C(j*v(t)|j)

N0f=
Σ
nℏ0
fn, N0f,j=
Σ
nℏ0
fnI(yn=j)

N´v,f=
Σ
nℏ´v
fn, N´v,f,j=
Σ
nℏ´v
fnI(yn=j), N´v,f,j(t)=
Σ
nℏ´v(t)
fnI(yn=j)

Related Topics

Assignment and Risk Estimation Algorithms
Notation (decision tree algorithms)
Assignment (decision tree algorithms)
Assignment of a Node (decision tree algorithms)
Assignment of a Case (decision tree algorithms)
Risk Estimation (decision tree algorithms)
Loss Function (decision tree algorithms)
Risk Estimation of a Tree (decision tree algorithms)
Resubstitution Estimate of the Risk (decision tree algorithms)
Test Sample Estimate of the Risk (decision tree algorithms)
References (decision tree algorithms)


References (decision tree algorithms)

decision tree algorithms,decision tree algorithms,decision tree algorithms
references,references,references

Breiman, L., J. H. Friedman, R. A. Olshen, and C. J. Stone. 1984. Classification and Regression Trees. New York: Chapman & Hall/CRC.

Related Topics

Assignment and Risk Estimation Algorithms
Notation (decision tree algorithms)
Assignment (decision tree algorithms)
Assignment of a Node (decision tree algorithms)
Assignment of a Case (decision tree algorithms)
Risk Estimation (decision tree algorithms)
Loss Function (decision tree algorithms)
Risk Estimation of a Tree (decision tree algorithms)
Resubstitution Estimate of the Risk (decision tree algorithms)
Test Sample Estimate of the Risk (decision tree algorithms)
Cross Validation Estimate of the Risk (decision tree algorithms)


Gain Summary Algorithms

gain summary algorithms,gain summary algorithms,gain summary algorithms

The Gain Summary summarizes a tree by displaying descriptive statistics for each terminal node. This allows users to recognize the relative contribution of each terminal node and identify the subsets of terminal nodes that are most useful. This document can be used for all tree growing algorithms CART, CHAID, exhaustive CHAID and QUEST.

Note that case weight is not involved in gain summary calculations though it is involved in tree growing process and class assignment.

Related Topics

Types of Gain Summaries
Notation (Gain Summary algorithms)
Node by Node Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Size: n (Gain Summary algorithms)
Size: % (Gain Summary algorithms)
Gain: n (Gain Summary algorithms)
Gain: % (Gain Summary algorithms)
Score (Gain Summary algorithms)
ROI (Return on Investment) (Gain Summary algorithms)
Index (%) (Gain Summary algorithms)
Cumulative Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Cumulative Size: n (Gain Summary algorithms)
Cumulative Size: % (Gain Summary algorithms)
Cumulative Gain: n (Gain Summary algorithms)
Cumulative Gain: % (Gain Summary algorithms)
Score (Gain Summary algorithms)
Cumulative ROI (Gain Summary algorithms)
Cumulative Index % (Gain Summary algorithms)
Percentile Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Percentile (%) (Gain Summary algorithms)
Percentile: n (Gain Summary algorithms)
Gain: n (Gain Summary algorithms)
Gain: % (Gain Summary algorithms)
Percentile Score (Gain Summary algorithms)
Percentile ROI (Gain Summary algorithms)
Percentile Index (Gain Summary algorithms)


Types of Gain Summaries

Depending on the type of dependent variable, different statistics are given in the gain summary.

Average Oriented Gain Summary (Y continuous). Statistics related to the node mean of Y are given. Through this summary, users may identify the terminal nodes that give the largest (or smallest) average of the dependent variable.

Target Class Gain Summary (Y categorical). Statistics related to an interested dependent variable class (target class) are given. Users may identify the terminal nodes that have a large relative contribution to the target class.

Average Profit Value Gain Summary (Y categorical). Statistics related to average profits are given. Users may be interested in identifying the terminal nodes that have relatively large average profit values.

Node-by-Node, Cumulative, Percentile Gain Summary. To assist users in identifying the interesting terminal nodes and in understanding the result of a tree, three different ways (node-by-node, cumulative and percentile) of looking at the gain summaries mentioned above are provided.

Related Topics

Gain Summary Algorithms
Notation (Gain Summary algorithms)
Node by Node Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Size: n (Gain Summary algorithms)
Size: % (Gain Summary algorithms)
Gain: n (Gain Summary algorithms)
Gain: % (Gain Summary algorithms)
Score (Gain Summary algorithms)
ROI (Return on Investment) (Gain Summary algorithms)
Index (%) (Gain Summary algorithms)
Cumulative Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Cumulative Size: n (Gain Summary algorithms)
Cumulative Size: % (Gain Summary algorithms)
Cumulative Gain: n (Gain Summary algorithms)
Cumulative Gain: % (Gain Summary algorithms)
Score (Gain Summary algorithms)
Cumulative ROI (Gain Summary algorithms)
Cumulative Index % (Gain Summary algorithms)
Percentile Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Percentile (%) (Gain Summary algorithms)
Percentile: n (Gain Summary algorithms)
Gain: n (Gain Summary algorithms)
Gain: % (Gain Summary algorithms)
Percentile Score (Gain Summary algorithms)
Percentile ROI (Gain Summary algorithms)
Percentile Index (Gain Summary algorithms)


Notation (Gain Summary algorithms)

gain summary algorithms,gain summary algorithms,gain summary algorithms
notation,notation,notation

The following notation is used throughout this chapter unless otherwise stated:

Y

The dependent, or target, variable. It can be either categorical (nominal or ordinal) or continuous. If Y is categorical with J classes, its class takes values in C = {1, …, J}.

D

Data set used to calculate gain statistics. It can be either learning sample data set or test sample data set.

D(t)

Cases in D in node t.

yn

The dependent variable value for case n.

fn

The frequency weight associated with case n. Non-integral positive value is rounded to its nearest integer.

Nf

The number of cases in D, Nf=
Σ
nD
fn

Nf(t)

The number of cases in D(t), Nf(t)=
Σ
nD(t)
fn

Nf,j

The number of class j cases in D, Nf,j=
Σ
nD
fnI(yn=j)

Nf,j(t)

The number of class j cases in D(t), Nf,j(t)=
Σ
nD(t)
fnI(yn=j)

y(t)

The mean of dependent variable in D(t), y(t)=1Nf(t)
Σ
nD(t)
fnyn

j´´

Target class of interest; it is any value in {1, …, J}. If not user-specified, the default target class is 1.

r(j), e(j)

Respectively, the revenue and expense associated with class j.

pv(j)

The profit value associated with class j, pv(j) = r(j)−e(j)

j*(
˜
t
)

Class assignment given by terminal node
˜
t
.

π(j)

Prior probability of class j, j = 1, …, J.

M1

For categorical Y, denotes the empirical prior situation. CHAID and exhaustive CHAID are always considered as having an empirical prior.

M2

For categorical Y, denotes the non-empirical prior situation.

Related Topics

Gain Summary Algorithms
Types of Gain Summaries
Node by Node Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Size: n (Gain Summary algorithms)
Size: % (Gain Summary algorithms)
Gain: n (Gain Summary algorithms)
Gain: % (Gain Summary algorithms)
Score (Gain Summary algorithms)
ROI (Return on Investment) (Gain Summary algorithms)
Index (%) (Gain Summary algorithms)
Cumulative Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Cumulative Size: n (Gain Summary algorithms)
Cumulative Size: % (Gain Summary algorithms)
Cumulative Gain: n (Gain Summary algorithms)
Cumulative Gain: % (Gain Summary algorithms)
Score (Gain Summary algorithms)
Cumulative ROI (Gain Summary algorithms)
Cumulative Index % (Gain Summary algorithms)
Percentile Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Percentile (%) (Gain Summary algorithms)
Percentile: n (Gain Summary algorithms)
Gain: n (Gain Summary algorithms)
Gain: % (Gain Summary algorithms)
Percentile Score (Gain Summary algorithms)
Percentile ROI (Gain Summary algorithms)
Percentile Index (Gain Summary algorithms)


Node by Node Summary (Gain Summary algorithms)

gain summary algorithms,gain summary algorithms,gain summary algorithms
node by node,node by node,node by node

The node-by-node gain summary includes statistics for each node that are defined as follows.

Related Topics

Gain Summary Algorithms
Types of Gain Summaries
Notation (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Size: n (Gain Summary algorithms)
Size: % (Gain Summary algorithms)
Gain: n (Gain Summary algorithms)
Gain: % (Gain Summary algorithms)
Score (Gain Summary algorithms)
ROI (Return on Investment) (Gain Summary algorithms)
Index (%) (Gain Summary algorithms)
Cumulative Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Cumulative Size: n (Gain Summary algorithms)
Cumulative Size: % (Gain Summary algorithms)
Cumulative Gain: n (Gain Summary algorithms)
Cumulative Gain: % (Gain Summary algorithms)
Score (Gain Summary algorithms)
Cumulative ROI (Gain Summary algorithms)
Cumulative Index % (Gain Summary algorithms)
Percentile Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Percentile (%) (Gain Summary algorithms)
Percentile: n (Gain Summary algorithms)
Gain: n (Gain Summary algorithms)
Gain: % (Gain Summary algorithms)
Percentile Score (Gain Summary algorithms)
Percentile ROI (Gain Summary algorithms)
Percentile Index (Gain Summary algorithms)


Terminal Node (Gain Summary algorithms)

terminal node,terminal node,terminal node
gain summary algorithms,gain summary algorithms,gain summary algorithms

The identity of a terminal node. It is denoted by
˜
t
.

Related Topics

Gain Summary Algorithms
Types of Gain Summaries
Notation (Gain Summary algorithms)
Node by Node Summary (Gain Summary algorithms)
Size: n (Gain Summary algorithms)
Size: % (Gain Summary algorithms)
Gain: n (Gain Summary algorithms)
Gain: % (Gain Summary algorithms)
Score (Gain Summary algorithms)
ROI (Return on Investment) (Gain Summary algorithms)
Index (%) (Gain Summary algorithms)
Cumulative Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Cumulative Size: n (Gain Summary algorithms)
Cumulative Size: % (Gain Summary algorithms)
Cumulative Gain: n (Gain Summary algorithms)
Cumulative Gain: % (Gain Summary algorithms)
Score (Gain Summary algorithms)
Cumulative ROI (Gain Summary algorithms)
Cumulative Index % (Gain Summary algorithms)
Percentile Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Percentile (%) (Gain Summary algorithms)
Percentile: n (Gain Summary algorithms)
Gain: n (Gain Summary algorithms)
Gain: % (Gain Summary algorithms)
Percentile Score (Gain Summary algorithms)
Percentile ROI (Gain Summary algorithms)
Percentile Index (Gain Summary algorithms)


Size: n (Gain Summary algorithms)

Total number of cases in the terminal node. It is denoted by Nf(t˜).

Related Topics

Gain Summary Algorithms
Types of Gain Summaries
Notation (Gain Summary algorithms)
Node by Node Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Size: % (Gain Summary algorithms)
Gain: n (Gain Summary algorithms)
Gain: % (Gain Summary algorithms)
Score (Gain Summary algorithms)
ROI (Return on Investment) (Gain Summary algorithms)
Index (%) (Gain Summary algorithms)
Cumulative Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Cumulative Size: n (Gain Summary algorithms)
Cumulative Size: % (Gain Summary algorithms)
Cumulative Gain: n (Gain Summary algorithms)
Cumulative Gain: % (Gain Summary algorithms)
Score (Gain Summary algorithms)
Cumulative ROI (Gain Summary algorithms)
Cumulative Index % (Gain Summary algorithms)
Percentile Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Percentile (%) (Gain Summary algorithms)
Percentile: n (Gain Summary algorithms)
Gain: n (Gain Summary algorithms)
Gain: % (Gain Summary algorithms)
Percentile Score (Gain Summary algorithms)
Percentile ROI (Gain Summary algorithms)
Percentile Index (Gain Summary algorithms)


Size: % (Gain Summary algorithms)

Percentage of cases in the node. It is denoted by pf(t˜)100%, where pf(t˜) is given by

pf(
˜
t
)={
Nf(
˜
t
)Nf 		M1, or, Y continuous
Σ
j
π(j)Nf,j(
˜
t
)Nf,j 		M2

Related Topics

Gain Summary Algorithms
Types of Gain Summaries
Notation (Gain Summary algorithms)
Node by Node Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Size: n (Gain Summary algorithms)
Gain: n (Gain Summary algorithms)
Gain: % (Gain Summary algorithms)
Score (Gain Summary algorithms)
ROI (Return on Investment) (Gain Summary algorithms)
Index (%) (Gain Summary algorithms)
Cumulative Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Cumulative Size: n (Gain Summary algorithms)
Cumulative Size: % (Gain Summary algorithms)
Cumulative Gain: n (Gain Summary algorithms)
Cumulative Gain: % (Gain Summary algorithms)
Score (Gain Summary algorithms)
Cumulative ROI (Gain Summary algorithms)
Cumulative Index % (Gain Summary algorithms)
Percentile Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Percentile (%) (Gain Summary algorithms)
Percentile: n (Gain Summary algorithms)
Gain: n (Gain Summary algorithms)
Gain: % (Gain Summary algorithms)
Percentile Score (Gain Summary algorithms)
Percentile ROI (Gain Summary algorithms)
Percentile Index (Gain Summary algorithms)


Gain: n (Gain Summary algorithms)

Total number of target class j´´ cases in the node, Nf,j´´(
˜
t
).

This is only computed for the target class gain summary type.

Related Topics

Gain Summary Algorithms
Types of Gain Summaries
Notation (Gain Summary algorithms)
Node by Node Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Size: n (Gain Summary algorithms)
Size: % (Gain Summary algorithms)
Gain: % (Gain Summary algorithms)
Score (Gain Summary algorithms)
ROI (Return on Investment) (Gain Summary algorithms)
Index (%) (Gain Summary algorithms)
Cumulative Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Cumulative Size: n (Gain Summary algorithms)
Cumulative Size: % (Gain Summary algorithms)
Cumulative Gain: n (Gain Summary algorithms)
Cumulative Gain: % (Gain Summary algorithms)
Score (Gain Summary algorithms)
Cumulative ROI (Gain Summary algorithms)
Cumulative Index % (Gain Summary algorithms)
Percentile Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Percentile (%) (Gain Summary algorithms)
Percentile: n (Gain Summary algorithms)
Gain: n (Gain Summary algorithms)
Gain: % (Gain Summary algorithms)
Percentile Score (Gain Summary algorithms)
Percentile ROI (Gain Summary algorithms)
Percentile Index (Gain Summary algorithms)


Gain: % (Gain Summary algorithms)

Percentage of target class j´´ cases in the sample that belong to the node. It is denoted by pf(
˜
t
|j´´)100%, where

pf(
˜
t
|j´´)=Nf,j´´(
˜
t
)Nf,j´´

This is only computed for the target class gain summary type.

Related Topics

Gain Summary Algorithms
Types of Gain Summaries
Notation (Gain Summary algorithms)
Node by Node Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Size: n (Gain Summary algorithms)
Size: % (Gain Summary algorithms)
Gain: n (Gain Summary algorithms)
Score (Gain Summary algorithms)
ROI (Return on Investment) (Gain Summary algorithms)
Index (%) (Gain Summary algorithms)
Cumulative Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Cumulative Size: n (Gain Summary algorithms)
Cumulative Size: % (Gain Summary algorithms)
Cumulative Gain: n (Gain Summary algorithms)
Cumulative Gain: % (Gain Summary algorithms)
Score (Gain Summary algorithms)
Cumulative ROI (Gain Summary algorithms)
Cumulative Index % (Gain Summary algorithms)
Percentile Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Percentile (%) (Gain Summary algorithms)
Percentile: n (Gain Summary algorithms)
Gain: n (Gain Summary algorithms)
Gain: % (Gain Summary algorithms)
Percentile Score (Gain Summary algorithms)
Percentile ROI (Gain Summary algorithms)
Percentile Index (Gain Summary algorithms)


Score (Gain Summary algorithms)

gain summary algorithms,gain summary algorithms,gain summary algorithms
score,score,score
score,score,score
gain summary algorithms,gain summary algorithms,gain summary algorithms

Depending on the type of gain summary, the score is defined and named differently. But they are all denoted by s(
˜
t
).

Response: % (for target class gain summary only)

The ratio of the number of target class j´´ cases in the node to the total number of cases in the node.

s(
˜
t
)={
Nf,j´´(
˜
t
)Nf(
˜
t
) 		M1
1pf (
˜
t
)·π(j´´)Nf,j´´(
˜
t
)Nf,j´´ 		M2

Average Profit (for average profit value gain summary only)

The average profit value for the node.

s(
˜
t
)={
Σ
j
Nf,j(
˜
t
)·pv(j)Nf(
˜
t
) 		M1
1pf (
˜
t
)·
Σ
j
π(j)Nf,j(
˜
t
)·pv(j)Nf,j 		M2

Mean (for average oriented gain summary only)

The respective mean of the continuous dependent variable Y at the node.

s(
˜
t
)=y(
˜
t
)

Related Topics

Gain Summary Algorithms
Types of Gain Summaries
Notation (Gain Summary algorithms)
Node by Node Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Size: n (Gain Summary algorithms)
Size: % (Gain Summary algorithms)
Gain: n (Gain Summary algorithms)
Gain: % (Gain Summary algorithms)
ROI (Return on Investment) (Gain Summary algorithms)
Index (%) (Gain Summary algorithms)
Cumulative Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Cumulative Size: n (Gain Summary algorithms)
Cumulative Size: % (Gain Summary algorithms)
Cumulative Gain: n (Gain Summary algorithms)
Cumulative Gain: % (Gain Summary algorithms)
Score (Gain Summary algorithms)
Cumulative ROI (Gain Summary algorithms)
Cumulative Index % (Gain Summary algorithms)
Percentile Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Percentile (%) (Gain Summary algorithms)
Percentile: n (Gain Summary algorithms)
Gain: n (Gain Summary algorithms)
Gain: % (Gain Summary algorithms)
Percentile Score (Gain Summary algorithms)
Percentile ROI (Gain Summary algorithms)
Percentile Index (Gain Summary algorithms)


ROI (Return on Investment) (Gain Summary algorithms)

gain summary algorithms,gain summary algorithms,gain summary algorithms
ROI (return on investment),ROI (return on investment),ROI (return on investment)
return on investment,return on investment,return on investment
gain summary algorithms,gain summary algorithms,gain summary algorithms
ROI,ROI,ROI
gain summary algorithms,gain summary algorithms,gain summary algorithms

ROI for a node is calculated as average profit divided by average expense.

ROI(
˜
t
)=s(
˜
t
)s0(
˜
t
)

Where s0(
˜
t
) is the average expense for node
˜
t
and is calculated using equation for s(
˜
t
) with pv(j) replaced by e(j).

This is only computed for the average profit value gain summary type.

Related Topics

Gain Summary Algorithms
Types of Gain Summaries
Notation (Gain Summary algorithms)
Node by Node Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Size: n (Gain Summary algorithms)
Size: % (Gain Summary algorithms)
Gain: n (Gain Summary algorithms)
Gain: % (Gain Summary algorithms)
Score (Gain Summary algorithms)
Index (%) (Gain Summary algorithms)
Cumulative Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Cumulative Size: n (Gain Summary algorithms)
Cumulative Size: % (Gain Summary algorithms)
Cumulative Gain: n (Gain Summary algorithms)
Cumulative Gain: % (Gain Summary algorithms)
Score (Gain Summary algorithms)
Cumulative ROI (Gain Summary algorithms)
Cumulative Index % (Gain Summary algorithms)
Percentile Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Percentile (%) (Gain Summary algorithms)
Percentile: n (Gain Summary algorithms)
Gain: n (Gain Summary algorithms)
Gain: % (Gain Summary algorithms)
Percentile Score (Gain Summary algorithms)
Percentile ROI (Gain Summary algorithms)
Percentile Index (Gain Summary algorithms)


Index (%) (Gain Summary algorithms)

For the target class gain summary, it is the ratio of the score for the node to the proportion of class j´´ cases in the sample. It is denoted by is(
˜
t
)100%, where is(
˜
t
) is

is(
˜
t
)={
s (
˜
t
) Nf,j´´/Nf 		M1
s (
˜
t
) π(j´´) 		M2

For the average profit value gain summary, it is the ratio of the score for the node to the average profit value for the sample.

is (
˜
t
)={
s (
˜
t
)
Σ
j
Nf,jpv(j)/Nf 		M1
s (
˜
t
)
Σ
j
π(j)pv(j) 		M2

For the average oriented gain summary, it is the ratio of the gain score for the node to the gain score s(t = 1) for root node t = 1.

is(
˜
t
)=s(
˜
t
)s(t=1)

Note: if the denominator is 0, the index is not available.

Related Topics

Gain Summary Algorithms
Types of Gain Summaries
Notation (Gain Summary algorithms)
Node by Node Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Size: n (Gain Summary algorithms)
Size: % (Gain Summary algorithms)
Gain: n (Gain Summary algorithms)
Gain: % (Gain Summary algorithms)
Score (Gain Summary algorithms)
ROI (Return on Investment) (Gain Summary algorithms)
Cumulative Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Cumulative Size: n (Gain Summary algorithms)
Cumulative Size: % (Gain Summary algorithms)
Cumulative Gain: n (Gain Summary algorithms)
Cumulative Gain: % (Gain Summary algorithms)
Score (Gain Summary algorithms)
Cumulative ROI (Gain Summary algorithms)
Cumulative Index % (Gain Summary algorithms)
Percentile Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Percentile (%) (Gain Summary algorithms)
Percentile: n (Gain Summary algorithms)
Gain: n (Gain Summary algorithms)
Gain: % (Gain Summary algorithms)
Percentile Score (Gain Summary algorithms)
Percentile ROI (Gain Summary algorithms)
Percentile Index (Gain Summary algorithms)


Cumulative Summary (Gain Summary algorithms)

gain summary algorithms,gain summary algorithms,gain summary algorithms
cumulative,cumulative,cumulative

In the cumulative gain summary, all nodes are first sorted with respect to the values of the score s(
˜
t
). To simplify the formulas, we assume that nodes in the collection {
˜
t
1,
˜
t
2, …,
˜
t
|
˜
T
|} are already sorted either in descending or ascending order.

Related Topics

Gain Summary Algorithms
Types of Gain Summaries
Notation (Gain Summary algorithms)
Node by Node Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Size: n (Gain Summary algorithms)
Size: % (Gain Summary algorithms)
Gain: n (Gain Summary algorithms)
Gain: % (Gain Summary algorithms)
Score (Gain Summary algorithms)
ROI (Return on Investment) (Gain Summary algorithms)
Index (%) (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Cumulative Size: n (Gain Summary algorithms)
Cumulative Size: % (Gain Summary algorithms)
Cumulative Gain: n (Gain Summary algorithms)
Cumulative Gain: % (Gain Summary algorithms)
Score (Gain Summary algorithms)
Cumulative ROI (Gain Summary algorithms)
Cumulative Index % (Gain Summary algorithms)
Percentile Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Percentile (%) (Gain Summary algorithms)
Percentile: n (Gain Summary algorithms)
Gain: n (Gain Summary algorithms)
Gain: % (Gain Summary algorithms)
Percentile Score (Gain Summary algorithms)
Percentile ROI (Gain Summary algorithms)
Percentile Index (Gain Summary algorithms)


Terminal Node (Gain Summary algorithms)

terminal node,terminal node,terminal node
gain summary algorithms,gain summary algorithms,gain summary algorithms

The identity of a terminal node. It is denoted by
˜
t
s.

Related Topics

Gain Summary Algorithms
Types of Gain Summaries
Notation (Gain Summary algorithms)
Node by Node Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Size: n (Gain Summary algorithms)
Size: % (Gain Summary algorithms)
Gain: n (Gain Summary algorithms)
Gain: % (Gain Summary algorithms)
Score (Gain Summary algorithms)
ROI (Return on Investment) (Gain Summary algorithms)
Index (%) (Gain Summary algorithms)
Cumulative Summary (Gain Summary algorithms)
Cumulative Size: n (Gain Summary algorithms)
Cumulative Size: % (Gain Summary algorithms)
Cumulative Gain: n (Gain Summary algorithms)
Cumulative Gain: % (Gain Summary algorithms)
Score (Gain Summary algorithms)
Cumulative ROI (Gain Summary algorithms)
Cumulative Index % (Gain Summary algorithms)
Percentile Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Percentile (%) (Gain Summary algorithms)
Percentile: n (Gain Summary algorithms)
Gain: n (Gain Summary algorithms)
Gain: % (Gain Summary algorithms)
Percentile Score (Gain Summary algorithms)
Percentile ROI (Gain Summary algorithms)
Percentile Index (Gain Summary algorithms)


Cumulative Size: n (Gain Summary algorithms)

Nf(
˜
t
s)=sΣi=1Nf(
˜
t
s)

Related Topics

Gain Summary Algorithms
Types of Gain Summaries
Notation (Gain Summary algorithms)
Node by Node Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Size: n (Gain Summary algorithms)
Size: % (Gain Summary algorithms)
Gain: n (Gain Summary algorithms)
Gain: % (Gain Summary algorithms)
Score (Gain Summary algorithms)
ROI (Return on Investment) (Gain Summary algorithms)
Index (%) (Gain Summary algorithms)
Cumulative Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Cumulative Size: % (Gain Summary algorithms)
Cumulative Gain: n (Gain Summary algorithms)
Cumulative Gain: % (Gain Summary algorithms)
Score (Gain Summary algorithms)
Cumulative ROI (Gain Summary algorithms)
Cumulative Index % (Gain Summary algorithms)
Percentile Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Percentile (%) (Gain Summary algorithms)
Percentile: n (Gain Summary algorithms)
Gain: n (Gain Summary algorithms)
Gain: % (Gain Summary algorithms)
Percentile Score (Gain Summary algorithms)
Percentile ROI (Gain Summary algorithms)
Percentile Index (Gain Summary algorithms)


Cumulative Size: % (Gain Summary algorithms)

pf(
˜
t
s)=sΣi=1pf(
˜
t
s)

Related Topics

Gain Summary Algorithms
Types of Gain Summaries
Notation (Gain Summary algorithms)
Node by Node Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Size: n (Gain Summary algorithms)
Size: % (Gain Summary algorithms)
Gain: n (Gain Summary algorithms)
Gain: % (Gain Summary algorithms)
Score (Gain Summary algorithms)
ROI (Return on Investment) (Gain Summary algorithms)
Index (%) (Gain Summary algorithms)
Cumulative Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Cumulative Size: n (Gain Summary algorithms)
Cumulative Gain: n (Gain Summary algorithms)
Cumulative Gain: % (Gain Summary algorithms)
Score (Gain Summary algorithms)
Cumulative ROI (Gain Summary algorithms)
Cumulative Index % (Gain Summary algorithms)
Percentile Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Percentile (%) (Gain Summary algorithms)
Percentile: n (Gain Summary algorithms)
Gain: n (Gain Summary algorithms)
Gain: % (Gain Summary algorithms)
Percentile Score (Gain Summary algorithms)
Percentile ROI (Gain Summary algorithms)
Percentile Index (Gain Summary algorithms)


Cumulative Gain: n (Gain Summary algorithms)

Nf,j´´(
˜
t
s)=sΣi=1Nf,j´´(
˜
t
s)

Related Topics

Gain Summary Algorithms
Types of Gain Summaries
Notation (Gain Summary algorithms)
Node by Node Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Size: n (Gain Summary algorithms)
Size: % (Gain Summary algorithms)
Gain: n (Gain Summary algorithms)
Gain: % (Gain Summary algorithms)
Score (Gain Summary algorithms)
ROI (Return on Investment) (Gain Summary algorithms)
Index (%) (Gain Summary algorithms)
Cumulative Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Cumulative Size: n (Gain Summary algorithms)
Cumulative Size: % (Gain Summary algorithms)
Cumulative Gain: % (Gain Summary algorithms)
Score (Gain Summary algorithms)
Cumulative ROI (Gain Summary algorithms)
Cumulative Index % (Gain Summary algorithms)
Percentile Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Percentile (%) (Gain Summary algorithms)
Percentile: n (Gain Summary algorithms)
Gain: n (Gain Summary algorithms)
Gain: % (Gain Summary algorithms)
Percentile Score (Gain Summary algorithms)
Percentile ROI (Gain Summary algorithms)
Percentile Index (Gain Summary algorithms)


Cumulative Gain: % (Gain Summary algorithms)

pf(
˜
t
s|j´´)=sΣi=1pf(
˜
t
s|j´´)

Related Topics

Gain Summary Algorithms
Types of Gain Summaries
Notation (Gain Summary algorithms)
Node by Node Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Size: n (Gain Summary algorithms)
Size: % (Gain Summary algorithms)
Gain: n (Gain Summary algorithms)
Gain: % (Gain Summary algorithms)
Score (Gain Summary algorithms)
ROI (Return on Investment) (Gain Summary algorithms)
Index (%) (Gain Summary algorithms)
Cumulative Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Cumulative Size: n (Gain Summary algorithms)
Cumulative Size: % (Gain Summary algorithms)
Cumulative Gain: n (Gain Summary algorithms)
Score (Gain Summary algorithms)
Cumulative ROI (Gain Summary algorithms)
Cumulative Index % (Gain Summary algorithms)
Percentile Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Percentile (%) (Gain Summary algorithms)
Percentile: n (Gain Summary algorithms)
Gain: n (Gain Summary algorithms)
Gain: % (Gain Summary algorithms)
Percentile Score (Gain Summary algorithms)
Percentile ROI (Gain Summary algorithms)
Percentile Index (Gain Summary algorithms)


Score (Gain Summary algorithms)

gain summary algorithms,gain summary algorithms,gain summary algorithms
score,score,score
score,score,score
gain summary algorithms,gain summary algorithms,gain summary algorithms

For Cumulative response, it is the ratio of the number of target class j´´ cases up to the node to the total number of cases up to the node. For cumulative average profit, it is the average profit value up to the node. For cumulative mean, it is the mean of all yn’s up to the terminal nodes. In all cases, the same formula is used, but the appropriate formulas for s(
˜
t
s) and pf(
˜
t
s) should be used in the calculations. This cumulative score is denoted by:

s (
˜
t
s)={
sΣi=1s (
˜
t
i)·Nf(
˜
t
i)sΣi=1Nf(
˜
t
i) 		M1, or, Y continuous
sΣi=1s(
˜
t
i)·pf (
˜
t
i)sΣi=1pf(
˜
t
i) 		M2

Related Topics

Gain Summary Algorithms
Types of Gain Summaries
Notation (Gain Summary algorithms)
Node by Node Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Size: n (Gain Summary algorithms)
Size: % (Gain Summary algorithms)
Gain: n (Gain Summary algorithms)
Gain: % (Gain Summary algorithms)
Score (Gain Summary algorithms)
ROI (Return on Investment) (Gain Summary algorithms)
Index (%) (Gain Summary algorithms)
Cumulative Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Cumulative Size: n (Gain Summary algorithms)
Cumulative Size: % (Gain Summary algorithms)
Cumulative Gain: n (Gain Summary algorithms)
Cumulative Gain: % (Gain Summary algorithms)
Cumulative ROI (Gain Summary algorithms)
Cumulative Index % (Gain Summary algorithms)
Percentile Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Percentile (%) (Gain Summary algorithms)
Percentile: n (Gain Summary algorithms)
Gain: n (Gain Summary algorithms)
Gain: % (Gain Summary algorithms)
Percentile Score (Gain Summary algorithms)
Percentile ROI (Gain Summary algorithms)
Percentile Index (Gain Summary algorithms)


Cumulative ROI (Gain Summary algorithms)

gain summary algorithms,gain summary algorithms,gain summary algorithms
ROI (return on investment),ROI (return on investment),ROI (return on investment)
return on investment,return on investment,return on investment
gain summary algorithms,gain summary algorithms,gain summary algorithms
ROI,ROI,ROI
gain summary algorithms,gain summary algorithms,gain summary algorithms
ROI(
˜
t
s)=s(
˜
t
s)s0(
˜
t
s)

Where s0(
˜
t
s) is the cumulative expense and calculated by equation for s(
˜
t
s) with pv(
˜
t
) replaced by e(
˜
t
).

This is only computed for the average profit value gain summary type.

Related Topics

Gain Summary Algorithms
Types of Gain Summaries
Notation (Gain Summary algorithms)
Node by Node Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Size: n (Gain Summary algorithms)
Size: % (Gain Summary algorithms)
Gain: n (Gain Summary algorithms)
Gain: % (Gain Summary algorithms)
Score (Gain Summary algorithms)
ROI (Return on Investment) (Gain Summary algorithms)
Index (%) (Gain Summary algorithms)
Cumulative Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Cumulative Size: n (Gain Summary algorithms)
Cumulative Size: % (Gain Summary algorithms)
Cumulative Gain: n (Gain Summary algorithms)
Cumulative Gain: % (Gain Summary algorithms)
Score (Gain Summary algorithms)
Cumulative Index % (Gain Summary algorithms)
Percentile Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Percentile (%) (Gain Summary algorithms)
Percentile: n (Gain Summary algorithms)
Gain: n (Gain Summary algorithms)
Gain: % (Gain Summary algorithms)
Percentile Score (Gain Summary algorithms)
Percentile ROI (Gain Summary algorithms)
Percentile Index (Gain Summary algorithms)


Cumulative Index % (Gain Summary algorithms)

For the target class cumulative gain summary, it is the ratio of the cumulative gain score for the node to the proportion of class j´´ cases in the sample. It is denoted by is (
˜
t
s ) 100%, where:

is (
˜
t
s ) ={
s (
˜
t
s ) Nf,j´´/Nf 		M1
s (
˜
t
s ) π(j´´) 		M2

For the average profit value cumulative gain summary, it is the ratio of the cumulative gain score for the node to the average profit value for the sample.

is(
˜
t
s)={
s (
˜
t
s)
Σ
j
Nf,j·pv(j)/Nf 		M1
s(
˜
t
s)
Σ
j
π(j)·pv(j) 		M2

For the average oriented cumulative gain summary, it is the ratio of the cumulative score for the node to the score s(t = 1) for root node t = 1.

is(
˜
t
s)= s(
˜
t
s)s(t=1)=sΣi=1is(
˜
t
i)

Note: if the denominator is 0, the index is not available.

Related Topics

Gain Summary Algorithms
Types of Gain Summaries
Notation (Gain Summary algorithms)
Node by Node Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Size: n (Gain Summary algorithms)
Size: % (Gain Summary algorithms)
Gain: n (Gain Summary algorithms)
Gain: % (Gain Summary algorithms)
Score (Gain Summary algorithms)
ROI (Return on Investment) (Gain Summary algorithms)
Index (%) (Gain Summary algorithms)
Cumulative Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Cumulative Size: n (Gain Summary algorithms)
Cumulative Size: % (Gain Summary algorithms)
Cumulative Gain: n (Gain Summary algorithms)
Cumulative Gain: % (Gain Summary algorithms)
Score (Gain Summary algorithms)
Cumulative ROI (Gain Summary algorithms)
Percentile Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Percentile (%) (Gain Summary algorithms)
Percentile: n (Gain Summary algorithms)
Gain: n (Gain Summary algorithms)
Gain: % (Gain Summary algorithms)
Percentile Score (Gain Summary algorithms)
Percentile ROI (Gain Summary algorithms)
Percentile Index (Gain Summary algorithms)


Percentile Summary (Gain Summary algorithms)

gain summary algorithms,gain summary algorithms,gain summary algorithms
percentile,percentile,percentile

Like cumulative gain summary, all nodes are first sorted with respect to the values of their scores. To simplify the formulas, we assume that nodes in the collection {
˜
t
1,
˜
t
2, …,
˜
t
|
˜
T
|} are already sorted in either descending or ascending order. Let q be any positive integer divisible to 100. The value of q will be used as the percentage increment for percentiles, and is user-specified (default q = 10). For fixed q, the number of percentiles to be studied is 100/q. The pth percentile to be studied is the pq%-tile, and its size is Nf·pq=Nf·pq%, p = 1, …, 100/q. For any pq%-tile, let sp and s´p be the two smallest integers in {1, …, |
˜
T
|} such that

Nf.pq(Nf(
˜
t
sp−1),Nf(
˜
t
sp)], Nf.pq[Nf(
˜
t
s´p−1),Nf(
˜
t
s´p))

where Nf(
˜
t
0)≡0

Related Topics

Gain Summary Algorithms
Types of Gain Summaries
Notation (Gain Summary algorithms)
Node by Node Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Size: n (Gain Summary algorithms)
Size: % (Gain Summary algorithms)
Gain: n (Gain Summary algorithms)
Gain: % (Gain Summary algorithms)
Score (Gain Summary algorithms)
ROI (Return on Investment) (Gain Summary algorithms)
Index (%) (Gain Summary algorithms)
Cumulative Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Cumulative Size: n (Gain Summary algorithms)
Cumulative Size: % (Gain Summary algorithms)
Cumulative Gain: n (Gain Summary algorithms)
Cumulative Gain: % (Gain Summary algorithms)
Score (Gain Summary algorithms)
Cumulative ROI (Gain Summary algorithms)
Cumulative Index % (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Percentile (%) (Gain Summary algorithms)
Percentile: n (Gain Summary algorithms)
Gain: n (Gain Summary algorithms)
Gain: % (Gain Summary algorithms)
Percentile Score (Gain Summary algorithms)
Percentile ROI (Gain Summary algorithms)
Percentile Index (Gain Summary algorithms)


Terminal Node (Gain Summary algorithms)

terminal node,terminal node,terminal node
gain summary algorithms,gain summary algorithms,gain summary algorithms

The identity of all terminal nodes that belong to the pth increment. Node
˜
t
belongs to the pth increment if
˜
t
[s´p−1,sp].

Related Topics

Gain Summary Algorithms
Types of Gain Summaries
Notation (Gain Summary algorithms)
Node by Node Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Size: n (Gain Summary algorithms)
Size: % (Gain Summary algorithms)
Gain: n (Gain Summary algorithms)
Gain: % (Gain Summary algorithms)
Score (Gain Summary algorithms)
ROI (Return on Investment) (Gain Summary algorithms)
Index (%) (Gain Summary algorithms)
Cumulative Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Cumulative Size: n (Gain Summary algorithms)
Cumulative Size: % (Gain Summary algorithms)
Cumulative Gain: n (Gain Summary algorithms)
Cumulative Gain: % (Gain Summary algorithms)
Score (Gain Summary algorithms)
Cumulative ROI (Gain Summary algorithms)
Cumulative Index % (Gain Summary algorithms)
Percentile Summary (Gain Summary algorithms)
Percentile (%) (Gain Summary algorithms)
Percentile: n (Gain Summary algorithms)
Gain: n (Gain Summary algorithms)
Gain: % (Gain Summary algorithms)
Percentile Score (Gain Summary algorithms)
Percentile ROI (Gain Summary algorithms)
Percentile Index (Gain Summary algorithms)


Percentile (%) (Gain Summary algorithms)

Percentile being studied. The pth percentile is the pq%-tile.

Related Topics

Gain Summary Algorithms
Types of Gain Summaries
Notation (Gain Summary algorithms)
Node by Node Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Size: n (Gain Summary algorithms)
Size: % (Gain Summary algorithms)
Gain: n (Gain Summary algorithms)
Gain: % (Gain Summary algorithms)
Score (Gain Summary algorithms)
ROI (Return on Investment) (Gain Summary algorithms)
Index (%) (Gain Summary algorithms)
Cumulative Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Cumulative Size: n (Gain Summary algorithms)
Cumulative Size: % (Gain Summary algorithms)
Cumulative Gain: n (Gain Summary algorithms)
Cumulative Gain: % (Gain Summary algorithms)
Score (Gain Summary algorithms)
Cumulative ROI (Gain Summary algorithms)
Cumulative Index % (Gain Summary algorithms)
Percentile Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Percentile: n (Gain Summary algorithms)
Gain: n (Gain Summary algorithms)
Gain: % (Gain Summary algorithms)
Percentile Score (Gain Summary algorithms)
Percentile ROI (Gain Summary algorithms)
Percentile Index (Gain Summary algorithms)


Percentile: n (Gain Summary algorithms)

Total number of cases in the percentile, N*f·pq=[Nf·pq%], where [x] denotes the nearest integer of x.

Related Topics

Gain Summary Algorithms
Types of Gain Summaries
Notation (Gain Summary algorithms)
Node by Node Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Size: n (Gain Summary algorithms)
Size: % (Gain Summary algorithms)
Gain: n (Gain Summary algorithms)
Gain: % (Gain Summary algorithms)
Score (Gain Summary algorithms)
ROI (Return on Investment) (Gain Summary algorithms)
Index (%) (Gain Summary algorithms)
Cumulative Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Cumulative Size: n (Gain Summary algorithms)
Cumulative Size: % (Gain Summary algorithms)
Cumulative Gain: n (Gain Summary algorithms)
Cumulative Gain: % (Gain Summary algorithms)
Score (Gain Summary algorithms)
Cumulative ROI (Gain Summary algorithms)
Cumulative Index % (Gain Summary algorithms)
Percentile Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Percentile (%) (Gain Summary algorithms)
Gain: n (Gain Summary algorithms)
Gain: % (Gain Summary algorithms)
Percentile Score (Gain Summary algorithms)
Percentile ROI (Gain Summary algorithms)
Percentile Index (Gain Summary algorithms)


Gain: n (Gain Summary algorithms)

Total number of class j´´ cases in the pq-percentile.

◊Nf,j´´(p)=Nf,j´´(
˜
t
sp−1)+Nf·pq−Nf(
˜
t
sp−1)Nf(tsp)Nf,j´´(
˜
t
sp)

where Nf,j´´(
˜
t
0) is defined to be 0.

This is only computed for the target class percentile gain summary type.

Related Topics

Gain Summary Algorithms
Types of Gain Summaries
Notation (Gain Summary algorithms)
Node by Node Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Size: n (Gain Summary algorithms)
Size: % (Gain Summary algorithms)
Gain: n (Gain Summary algorithms)
Gain: % (Gain Summary algorithms)
Score (Gain Summary algorithms)
ROI (Return on Investment) (Gain Summary algorithms)
Index (%) (Gain Summary algorithms)
Cumulative Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Cumulative Size: n (Gain Summary algorithms)
Cumulative Size: % (Gain Summary algorithms)
Cumulative Gain: n (Gain Summary algorithms)
Cumulative Gain: % (Gain Summary algorithms)
Score (Gain Summary algorithms)
Cumulative ROI (Gain Summary algorithms)
Cumulative Index % (Gain Summary algorithms)
Percentile Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Percentile (%) (Gain Summary algorithms)
Percentile: n (Gain Summary algorithms)
Gain: % (Gain Summary algorithms)
Percentile Score (Gain Summary algorithms)
Percentile ROI (Gain Summary algorithms)
Percentile Index (Gain Summary algorithms)


Gain: % (Gain Summary algorithms)

Percentage of class j´´ cases in the sample that belong to the pq%-tile. It is denoted by ◊pf,j´´(p)100%, where

◊pf,j´´(p)=◊Nf,j´´ ( p)Nf,j´´

This is only computed for the target class percentile gain summary type.

Related Topics

Gain Summary Algorithms
Types of Gain Summaries
Notation (Gain Summary algorithms)
Node by Node Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Size: n (Gain Summary algorithms)
Size: % (Gain Summary algorithms)
Gain: n (Gain Summary algorithms)
Gain: % (Gain Summary algorithms)
Score (Gain Summary algorithms)
ROI (Return on Investment) (Gain Summary algorithms)
Index (%) (Gain Summary algorithms)
Cumulative Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Cumulative Size: n (Gain Summary algorithms)
Cumulative Size: % (Gain Summary algorithms)
Cumulative Gain: n (Gain Summary algorithms)
Cumulative Gain: % (Gain Summary algorithms)
Score (Gain Summary algorithms)
Cumulative ROI (Gain Summary algorithms)
Cumulative Index % (Gain Summary algorithms)
Percentile Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Percentile (%) (Gain Summary algorithms)
Percentile: n (Gain Summary algorithms)
Gain: n (Gain Summary algorithms)
Percentile Score (Gain Summary algorithms)
Percentile ROI (Gain Summary algorithms)
Percentile Index (Gain Summary algorithms)


Percentile Score (Gain Summary algorithms)

gain summary algorithms,gain summary algorithms,gain summary algorithms
score,score,score
score,score,score
gain summary algorithms,gain summary algorithms,gain summary algorithms

For the target class percentile gain summary, it is an estimate of the ratio of the number of class j´´ cases in the pq-percentile to the total number of cases in the percentile. For the average profit value percentile gain summary, it is an estimate of the average profit value in the pq-percetile. For the average oriented percentile gain summary, it is an estimate of the average of the gain score for all nodes in the percentile. In all charts, the same formula is used.

◊s(p)={
Nf(
˜
t
sp−1)·s(
˜
t
sp−1)+{Nf.pq− Nf(
˜
t
sp−1)}·s(
˜
t
sp)Nf.pq 		M1
pf(
˜
t
sp−1)·s(
˜
t
sp−1)+{pf.pq− pf(
˜
t
sp−1)}·s(
˜
t
sp)pf.pq 		M2

where

pf.pq=pf(
˜
t
sp−1)+Nf.pq− Nf(
˜
t
sp−1)Nf(
˜
t
sp)pf(
˜
t
sp)

Related Topics

Gain Summary Algorithms
Types of Gain Summaries
Notation (Gain Summary algorithms)
Node by Node Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Size: n (Gain Summary algorithms)
Size: % (Gain Summary algorithms)
Gain: n (Gain Summary algorithms)
Gain: % (Gain Summary algorithms)
Score (Gain Summary algorithms)
ROI (Return on Investment) (Gain Summary algorithms)
Index (%) (Gain Summary algorithms)
Cumulative Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Cumulative Size: n (Gain Summary algorithms)
Cumulative Size: % (Gain Summary algorithms)
Cumulative Gain: n (Gain Summary algorithms)
Cumulative Gain: % (Gain Summary algorithms)
Score (Gain Summary algorithms)
Cumulative ROI (Gain Summary algorithms)
Cumulative Index % (Gain Summary algorithms)
Percentile Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Percentile (%) (Gain Summary algorithms)
Percentile: n (Gain Summary algorithms)
Gain: n (Gain Summary algorithms)
Gain: % (Gain Summary algorithms)
Percentile ROI (Gain Summary algorithms)
Percentile Index (Gain Summary algorithms)


Percentile ROI (Gain Summary algorithms)

gain summary algorithms,gain summary algorithms,gain summary algorithms
ROI (return on investment),ROI (return on investment),ROI (return on investment)
return on investment,return on investment,return on investment
gain summary algorithms,gain summary algorithms,gain summary algorithms
ROI,ROI,ROI
gain summary algorithms,gain summary algorithms,gain summary algorithms
◊ROI(p)=◊s(p)◊s0(p)

where ◊s0(p) is the percentile expense and calculated through equation ◊s(p) with pv(
˜
t
) replaced by e(
˜
t
).

This is only computed for the average profit value gain summary type.

Related Topics

Gain Summary Algorithms
Types of Gain Summaries
Notation (Gain Summary algorithms)
Node by Node Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Size: n (Gain Summary algorithms)
Size: % (Gain Summary algorithms)
Gain: n (Gain Summary algorithms)
Gain: % (Gain Summary algorithms)
Score (Gain Summary algorithms)
ROI (Return on Investment) (Gain Summary algorithms)
Index (%) (Gain Summary algorithms)
Cumulative Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Cumulative Size: n (Gain Summary algorithms)
Cumulative Size: % (Gain Summary algorithms)
Cumulative Gain: n (Gain Summary algorithms)
Cumulative Gain: % (Gain Summary algorithms)
Score (Gain Summary algorithms)
Cumulative ROI (Gain Summary algorithms)
Cumulative Index % (Gain Summary algorithms)
Percentile Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Percentile (%) (Gain Summary algorithms)
Percentile: n (Gain Summary algorithms)
Gain: n (Gain Summary algorithms)
Gain: % (Gain Summary algorithms)
Percentile Score (Gain Summary algorithms)
Percentile Index (Gain Summary algorithms)


Percentile Index (Gain Summary algorithms)

For the target class percentile gain summary, it is the ratio of the percentile gain score for the pq-percentile to the proportion of class j´´ cases in the sample. It is denoted by ◊is(p)100 percent, where

◊is ( p ) ={
◊s ( p ) Nf,j´´/Nf | M1
◊ s( p ) π(j´´) | M2

For the average profit value percentile gain summary, it is the ratio of the percentile gain score for the pq-percentile to the average of the profit values for the sample.

◊is ( p)={
◊s ( p)
Σ
j
Nf,j·pv(j)/Nf 		M1
◊s ( p)
Σ
j
π(j)·pv(j) 		M2

For the average oriented cumulative gain summary, it is the ratio of the percentile gain score in the pq-percentile to the gain score s(t = 1) for root node t = 1.

◊is(p)=◊s(p)s(t=1)

Note: if the denominator, which is the average or the median of yn’s in the sample, is 0, the index is not available.

Related Topics

Gain Summary Algorithms
Types of Gain Summaries
Notation (Gain Summary algorithms)
Node by Node Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Size: n (Gain Summary algorithms)
Size: % (Gain Summary algorithms)
Gain: n (Gain Summary algorithms)
Gain: % (Gain Summary algorithms)
Score (Gain Summary algorithms)
ROI (Return on Investment) (Gain Summary algorithms)
Index (%) (Gain Summary algorithms)
Cumulative Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Cumulative Size: n (Gain Summary algorithms)
Cumulative Size: % (Gain Summary algorithms)
Cumulative Gain: n (Gain Summary algorithms)
Cumulative Gain: % (Gain Summary algorithms)
Score (Gain Summary algorithms)
Cumulative ROI (Gain Summary algorithms)
Cumulative Index % (Gain Summary algorithms)
Percentile Summary (Gain Summary algorithms)
Terminal Node (Gain Summary algorithms)
Percentile (%) (Gain Summary algorithms)
Percentile: n (Gain Summary algorithms)
Gain: n (Gain Summary algorithms)
Gain: % (Gain Summary algorithms)
Percentile Score (Gain Summary algorithms)
Percentile ROI (Gain Summary algorithms)


Cost—Complexity Pruning Algorithms

pruning algorithms,pruning algorithms,pruning algorithms

Assuming a CART or QUEST tree has been grown successfully using a learning sample, this document describes the automatic cost-complexity pruning process for both CART and QUEST trees. Materials in this document are based on Classification and Regression Trees by Breiman et al (1984). Calculations of the risk estimates used throughout this document are given in TREE Algorithms.

Related Topics

Cost-Complexity Risk of a Tree (tree pruning algorithms)
Smallest Optimally Pruned Subtree (tree pruning algorithms)
Cost-Complexity Pruning Process (tree pruning algorithms)
Generate a sequence of smallest optimally pruned subtrees (tree pruning algorithms)
Selecting the Right Sized Subtree (tree pruning algorithms)
References (tree pruning algorithms)


Cost-Complexity Risk of a Tree (tree pruning algorithms)

pruning algorithms,pruning algorithms,pruning algorithms
cost-complexity risk,cost-complexity risk,cost-complexity risk
cost-complexity risk,cost-complexity risk,cost-complexity risk
pruning algorithms,pruning algorithms,pruning algorithms

Given a tree T and a real number α, the cost-complexity risk of T with respect to α is

Rα(T)=R(T)+α|
˜
T
|

where |
˜
T
| is the number of terminal nodes and R(T) is the resubstitution risk estimate of T.

Related Topics

Cost—Complexity Pruning Algorithms
Smallest Optimally Pruned Subtree (tree pruning algorithms)
Cost-Complexity Pruning Process (tree pruning algorithms)
Generate a sequence of smallest optimally pruned subtrees (tree pruning algorithms)
Selecting the Right Sized Subtree (tree pruning algorithms)
References (tree pruning algorithms)


Smallest Optimally Pruned Subtree (tree pruning algorithms)

Pruned subtree. For any tree T, T´ is a pruned subtree of T if T´ is a tree with the same root node as T and all nodes of T´ are also nodes of T. Denote T´≺T if T´ is a pruned subtree of T.

Optimally pruned subtree. Given α, a pruned subtree T´ of T is called an optimally pruned subtree of T with respect to α if Rα(T´)=
min
T´´≺T
Rα(T´´). The optimally pruned subtree may not be unique.

Smallest optimally pruned subtree. If T´≺ T´´ for any optimally pruned subtree T´´≺T0such that Rα(T´) = Rα(T´´), then T´ is the smallest optimally pruned subtree of T0 with respect to α, and is denoted by T0(α).

Related Topics

Cost—Complexity Pruning Algorithms
Cost-Complexity Risk of a Tree (tree pruning algorithms)
Cost-Complexity Pruning Process (tree pruning algorithms)
Generate a sequence of smallest optimally pruned subtrees (tree pruning algorithms)
Selecting the Right Sized Subtree (tree pruning algorithms)
References (tree pruning algorithms)


Cost-Complexity Pruning Process (tree pruning algorithms)

Suppose that a tree T0 was grown. The cost-complexity pruning process consists of two steps:

1. Based on the learning sample, find a sequence of pruned subtrees {Tk}Kk=0 of T0 such that T0 ≻ T1 ≻ T2 ≻ … ≻ TK, where TK has only the root node of T0.

2. Find an “honest” risk estimate
^
R
(Tk) of each subtree. Select a right sized tree from the sequence of pruned subtrees.

Related Topics

Cost—Complexity Pruning Algorithms
Cost-Complexity Risk of a Tree (tree pruning algorithms)
Smallest Optimally Pruned Subtree (tree pruning algorithms)
Generate a sequence of smallest optimally pruned subtrees (tree pruning algorithms)
Selecting the Right Sized Subtree (tree pruning algorithms)
References (tree pruning algorithms)


Generate a sequence of smallest optimally pruned subtrees (tree pruning algorithms)

To generate a sequence of pruned subtrees, the cost-complexity pruning technique developed by Breiman et. al. (1984) is used. In generating the sequence of subtrees, only the learning sample is used. Given any real value αmin (αmin=0) and an initial tree T0, there exists a sequence of real values −∞<α1=αmin<α2<...<αK<+∞ and a sequence of pruned subtrees T0≻T1≻...≻TK, such that the smallest optimally pruned subtree of T0 for a given α is

T0(α)={
T0
T0(αk)=Tk
T0(αK)=TK
α<α1
αk≤α<αk+1 1≤k<K
αK≤α

where

αk+1=
min
tTk
gk(t), Tk+1={tTk:gk(s)>αk+1 for all ancestors of t }

gk(t)={
R(t)−R(Tk,t)|
˜
T
k,t|−1 		tTk−
˜
T
k
+∞   t
˜
T
k

˜
T
k,t is the branch of Tk stemming from node t, and R(t) is the resubstitution risk estimate of node t based on the learning sample.

Explicit algorithm

For node t, let

lt(t)={
0 | t is terminal
left child of t | otherwise
rt(t)={
0 | t is terminal
right child of t | otherwise
pa(t)={
0 | t is root node
parent of t | otherwise
˜
N
(t)={
1 t is terminal
|
˜
T
k,t| 		otherwise
S(t)={
R(t) | t is terminal
R(Tk,t) | otherwise
G(t)=
min
sTk,t
gk(s)

Then the explicit algorithm is as follows:

Initialization. Set k=1, α=αmin

For t=#T0 to 1:

if t is a terminal node, set

˜
N
(t)=1, S(t)=R(t), g(t)=G(t)=+∞

else set

˜
N
(t)=
˜
N
(lt(t))+
˜
N
(rt(t))

S(t) = S(lt(t)) + S(rt(t))

g(t) = (R(t) −S(t))/(
˜
N
(t)−1)

G(t) = min{g(t), G(lt(t)), G(rt(t))}

Main algorithm. If G(1) > α, set

αk=α and Tk={tTk−1:g(s)>αk for all ancestor s of t }

α=G(1), k=k+1

else if
˜
N
(1)=1, terminate the process.

Set t=1.

While G(t) < g(t), t={
lt(t) | G(t)=G(lt(t))
rt(t) | otherwise

Make the current node t terminal by setting
˜
N
(t)=1, S(t)=R(t), g(t)=G(t)=+∞

Update ancestor's information of current node t; while t>1

t=pa(t)

˜
N
(t)=
˜
N
(lt(t))+
˜
N
(rt(t))

S(t) = S(lt(t)) + S(rt(t))

g(t) = (R(t) −S(t))/(
˜
N
(t)−1)

G(t) = min{g(t), G(lt(t)), G(rt(t))}

Repeat the main algorithm until the process terminates.

Related Topics

Cost—Complexity Pruning Algorithms
Cost-Complexity Risk of a Tree (tree pruning algorithms)
Smallest Optimally Pruned Subtree (tree pruning algorithms)
Cost-Complexity Pruning Process (tree pruning algorithms)
Selecting the Right Sized Subtree (tree pruning algorithms)
References (tree pruning algorithms)


Selecting the Right Sized Subtree (tree pruning algorithms)

To select the right sized pruned subtree from the sequence of pruned subtrees {Tk}Kk=0 of T0, an “honest” method is used to estimate the risk
^
R
(Tk) and its standard error se(
^
R
(Tk)) of each subtree Tk. Two methods can be used: the resubstitution estimation method and the test sample estimation method. Resubstitution estimation is used if there is no test sample. Test sample estimation is used if there is a testing sample. Select the subtree Tk* as the right sized subtree of T0 based on one of the following rules.

Simple rule

The right sized tree is selected as the k* ∈ {0, 1, 2, …, K} such that

^
R
(Tk*)=
min
k
^
R
(Tk)

b-SE rule

For any nonnegative real value b (default b = 1), the right sized tree is selected as the largest k** ∈ {0, 1, 2, …, K} such that

^
R
(Tk**)≤
^
R
(Tk*)+b·se(
^
R
(Tk*))

Related Topics

Cost—Complexity Pruning Algorithms
Cost-Complexity Risk of a Tree (tree pruning algorithms)
Smallest Optimally Pruned Subtree (tree pruning algorithms)
Cost-Complexity Pruning Process (tree pruning algorithms)
Generate a sequence of smallest optimally pruned subtrees (tree pruning algorithms)
References (tree pruning algorithms)


References (tree pruning algorithms)

pruning algorithms,pruning algorithms,pruning algorithms
references,references,references

Breiman, L., J. H. Friedman, R. A. Olshen, and C. J. Stone. 1984. Classification and Regression Trees. New York: Chapman & Hall/CRC.

Related Topics

Cost—Complexity Pruning Algorithms
Cost-Complexity Risk of a Tree (tree pruning algorithms)
Smallest Optimally Pruned Subtree (tree pruning algorithms)
Cost-Complexity Pruning Process (tree pruning algorithms)
Generate a sequence of smallest optimally pruned subtrees (tree pruning algorithms)
Selecting the Right Sized Subtree (tree pruning algorithms)


TSMODEL Algorithms

TSMODEL (command),TSMODEL (command),TSMODEL (command)
algorithms,algorithms,algorithms
TSMODEL algorithms,TSMODEL algorithms,TSMODEL algorithms

The TSMODEL procedure builds univariate exponential smoothing, ARIMA (Autoregressive Integrated Moving Average), and transfer function (TF) models for time series, and produces forecasts. The procedure includes an Expert Modeler that identifies and estimates an appropriate model for each dependent variable series. Alternatively, you can specify a custom model.

This algorithm is designed with help from professor Ruey Tsay at The University of Chicago.

Related Topics

Notation (TSMODEL algorithms)
Models (TSMODEL algorithms)
ARIMA and Transfer Function Models (TSMODEL algorithms)
Outlier Detection in Time Series Analysis (TSMODEL algorithms)
Goodness-of-Fit Statistics (TSMODEL algorithms)
Expert Modeling (TSMODEL algorithms)
References (TSMODEL algorithms)


Notation (TSMODEL algorithms)

TSMODEL algorithms,TSMODEL algorithms,TSMODEL algorithms
notation,notation,notation

The following notation is used throughout this chapter unless otherwise stated:

Yt (t=1, 2, ..., n)

Univariate time series under investigation.

n

Total number of observations.

^
Y
t(k)

Model-estimated k-step ahead forecast at time t for series Y.

S

The seasonal length.

Related Topics

TSMODEL Algorithms
Models (TSMODEL algorithms)
ARIMA and Transfer Function Models (TSMODEL algorithms)
Outlier Detection in Time Series Analysis (TSMODEL algorithms)
Goodness-of-Fit Statistics (TSMODEL algorithms)
Expert Modeling (TSMODEL algorithms)
References (TSMODEL algorithms)


Models (TSMODEL algorithms)

TSMODEL algorithms,TSMODEL algorithms,TSMODEL algorithms
models,models,models

TSMODEL estimates exponential smoothing models and ARIMA/TF models.

Related Topics

TSMODEL Algorithms
Notation (TSMODEL algorithms)
ARIMA and Transfer Function Models (TSMODEL algorithms)
Outlier Detection in Time Series Analysis (TSMODEL algorithms)
Goodness-of-Fit Statistics (TSMODEL algorithms)
Expert Modeling (TSMODEL algorithms)
References (TSMODEL algorithms)


Exponential Smoothing Models (TSMODEL algorithms)

TSMODEL algorithms,TSMODEL algorithms,TSMODEL algorithms
exponential smoothing models,exponential smoothing models,exponential smoothing models

The following notation is specific to exponential smoothing models:

α | Level smoothing weight
γ | Trend smoothing weight
φ | Damped trend smoothing weight
δ | Season smoothing weight

Related Topics

Simple Exponential Smoothing (TSMODEL algorithms)
Brown’s Exponential Smoothing (TSMODEL algorithms)
Holt’s Exponential Smoothing (TSMODEL algorithms)
Damped-Trend Exponential Smoothing (TSMODEL algorithms)
Simple Seasonal Exponential Smoothing (TSMODEL algorithms)
Winters’ Additive Exponential Smoothing (TSMODEL algorithms)
Winters’ Multiplicative Exponential Smoothing (TSMODEL algorithms)
Estimation and Forecasting of Exponential Smoothing (TSMODEL algorithms)


Simple Exponential Smoothing (TSMODEL algorithms)

TSMODEL algorithms,TSMODEL algorithms,TSMODEL algorithms
simple exponential smoothing,simple exponential smoothing,simple exponential smoothing
Time Series algorithms,Time Series algorithms,Time Series algorithms
simple exponential smoothing,simple exponential smoothing,simple exponential smoothing

Simple exponential smoothing has a single level parameter and can be described by the following equations:

L(t)=αY(t)+(1−α)L(t−1)

^
Y
t(k)=L(t)

It is functionally equivalent to an ARIMA(0,1,1) process.

Related Topics

Exponential Smoothing Models (TSMODEL algorithms)
Brown’s Exponential Smoothing (TSMODEL algorithms)
Holt’s Exponential Smoothing (TSMODEL algorithms)
Damped-Trend Exponential Smoothing (TSMODEL algorithms)
Simple Seasonal Exponential Smoothing (TSMODEL algorithms)
Winters’ Additive Exponential Smoothing (TSMODEL algorithms)
Winters’ Multiplicative Exponential Smoothing (TSMODEL algorithms)
Estimation and Forecasting of Exponential Smoothing (TSMODEL algorithms)


Brown’s Exponential Smoothing (TSMODEL algorithms)

TSMODEL algorithms,TSMODEL algorithms,TSMODEL algorithms
Brown's exponential smoothing,Brown's exponential smoothing,Brown's exponential smoothing

Brown’s exponential smoothing has level and trend parameters and can be described by the following equations:

L(t)=αY(t)+(1−α)L(t−1)

T(t)=α(L(t)−L(t−1))+(1−α)T(t−1)

^
Y
t(k)=L(t)+((k−1)+α−1)T(t)

It is functionally equivalent to an ARIMA(0,2,2) with restriction among MA parameters.

Related Topics

Exponential Smoothing Models (TSMODEL algorithms)
Simple Exponential Smoothing (TSMODEL algorithms)
Holt’s Exponential Smoothing (TSMODEL algorithms)
Damped-Trend Exponential Smoothing (TSMODEL algorithms)
Simple Seasonal Exponential Smoothing (TSMODEL algorithms)
Winters’ Additive Exponential Smoothing (TSMODEL algorithms)
Winters’ Multiplicative Exponential Smoothing (TSMODEL algorithms)
Estimation and Forecasting of Exponential Smoothing (TSMODEL algorithms)


Holt’s Exponential Smoothing (TSMODEL algorithms)

TSMODEL algorithms,TSMODEL algorithms,TSMODEL algorithms
Holt's exponential smoothing,Holt's exponential smoothing,Holt's exponential smoothing

Holt’s exponential smoothing has level and trend parameters and can be described by the following equations:

L(t)=αY(t)+(1−α)(L(t−1)+T(t−1))

T(t)=γ(L(t)−L(t−1))+(1−γ)T(t−1)

^
Y
t(k)=L(t)+kT(t)

It is functionally equivalent to an ARIMA(0,2,2).

Related Topics

Exponential Smoothing Models (TSMODEL algorithms)
Simple Exponential Smoothing (TSMODEL algorithms)
Brown’s Exponential Smoothing (TSMODEL algorithms)
Damped-Trend Exponential Smoothing (TSMODEL algorithms)
Simple Seasonal Exponential Smoothing (TSMODEL algorithms)
Winters’ Additive Exponential Smoothing (TSMODEL algorithms)
Winters’ Multiplicative Exponential Smoothing (TSMODEL algorithms)
Estimation and Forecasting of Exponential Smoothing (TSMODEL algorithms)


Damped-Trend Exponential Smoothing (TSMODEL algorithms)

TSMODEL algorithms,TSMODEL algorithms,TSMODEL algorithms
damped-trend exponential smoothing,damped-trend exponential smoothing,damped-trend exponential smoothing

Damped-Trend exponential smoothing has level and damped trend parameters and can be described by the following equations:

L(t)=αY(t)+(1−α)(L(t−1)+φT(t−1))

T(t)=γ(L(t)−L(t−1))+(1−γ)φT(t−1)

^
Y
t(k)=L(t)+kΣi=1φiT(t)

It is functionally equivalent to an ARIMA(1,1,2).

Related Topics

Exponential Smoothing Models (TSMODEL algorithms)
Simple Exponential Smoothing (TSMODEL algorithms)
Brown’s Exponential Smoothing (TSMODEL algorithms)
Holt’s Exponential Smoothing (TSMODEL algorithms)
Simple Seasonal Exponential Smoothing (TSMODEL algorithms)
Winters’ Additive Exponential Smoothing (TSMODEL algorithms)
Winters’ Multiplicative Exponential Smoothing (TSMODEL algorithms)
Estimation and Forecasting of Exponential Smoothing (TSMODEL algorithms)


Simple Seasonal Exponential Smoothing (TSMODEL algorithms)

TSMODEL algorithms,TSMODEL algorithms,TSMODEL algorithms
simple seasonal exponential smoothing,simple seasonal exponential smoothing,simple seasonal exponential smoothing

Simple seasonal exponential smoothing has level and season parameters and can be described by the following equations:

L(t)=α(Y(t)−S(t−s))+(1−α)L(t−1)

S(t)=δ(Y(t)−L(t))+(1−δ)S(t−s)

^
Y
t(k)=L(t)+S(t+k−s)

It is functionally equivalent to an ARIMA(0,1,(1,s,s+1))(0,1,0) with restrictions among MA parameters.

Related Topics

Exponential Smoothing Models (TSMODEL algorithms)
Simple Exponential Smoothing (TSMODEL algorithms)
Brown’s Exponential Smoothing (TSMODEL algorithms)
Holt’s Exponential Smoothing (TSMODEL algorithms)
Damped-Trend Exponential Smoothing (TSMODEL algorithms)
Winters’ Additive Exponential Smoothing (TSMODEL algorithms)
Winters’ Multiplicative Exponential Smoothing (TSMODEL algorithms)
Estimation and Forecasting of Exponential Smoothing (TSMODEL algorithms)


Winters’ Additive Exponential Smoothing (TSMODEL algorithms)

TSMODEL algorithms,TSMODEL algorithms,TSMODEL algorithms
Winters' additive exponential smoothing,Winters' additive exponential smoothing,Winters' additive exponential smoothing

Winters’ additive exponential smoothing has level, trend, and season parameters and can be described by the following equations:

L(t)=α(Y(t)−S(t−s))+(1−α)(L(t−1)+T(t−1))

T(t)=γ(L(t)−L(t−1))+(1−γ)T(t−1)

S(t)=δ(Y(t)−L(t))+(1−δ)S(t−s)

^
Y
t(k)=L(t)+kT(t)+S(t+k−s)

It is functionally equivalent to an ARIMA(0,1,s+1)(0,1,0) with restrictions among MA parameters.

Related Topics

Exponential Smoothing Models (TSMODEL algorithms)
Simple Exponential Smoothing (TSMODEL algorithms)
Brown’s Exponential Smoothing (TSMODEL algorithms)
Holt’s Exponential Smoothing (TSMODEL algorithms)
Damped-Trend Exponential Smoothing (TSMODEL algorithms)
Simple Seasonal Exponential Smoothing (TSMODEL algorithms)
Winters’ Multiplicative Exponential Smoothing (TSMODEL algorithms)
Estimation and Forecasting of Exponential Smoothing (TSMODEL algorithms)


Winters’ Multiplicative Exponential Smoothing (TSMODEL algorithms)

TSMODEL algorithms,TSMODEL algorithms,TSMODEL algorithms
Winters' exponential smoothing,Winters' exponential smoothing,Winters' exponential smoothing

Winters’ multiplicative exponential smoothing has level, trend and season parameters and can be described by the following equations:

L(t)=α(Y(t)/S(t−s))+(1−α)(L(t−1)+T(t−1))

T(t)=γ(L(t)−L(t−1))+(1−γ)T(t−1)

S(t)=δ(Y(t)/L(t))+(1−δ)S(t−s)

^
Y
t(k)=(L(t)+kT(t))S(t+k−s)

There is no equivalent ARIMA model.

Related Topics

Exponential Smoothing Models (TSMODEL algorithms)
Simple Exponential Smoothing (TSMODEL algorithms)
Brown’s Exponential Smoothing (TSMODEL algorithms)
Holt’s Exponential Smoothing (TSMODEL algorithms)
Damped-Trend Exponential Smoothing (TSMODEL algorithms)
Simple Seasonal Exponential Smoothing (TSMODEL algorithms)
Winters’ Additive Exponential Smoothing (TSMODEL algorithms)
Estimation and Forecasting of Exponential Smoothing (TSMODEL algorithms)


Estimation and Forecasting of Exponential Smoothing (TSMODEL algorithms)

TSMODEL algorithms,TSMODEL algorithms,TSMODEL algorithms
estimation and forecasting of exponential smoothing,estimation and forecasting of exponential smoothing,estimation and forecasting of exponential smoothing

The sum of squares of the one-step ahead prediction error, Σ(Yt−
^
Y
t−1(1))2, is minimized to optimize the smoothing weights.

Related Topics

Initialization of Exponential Smoothing (TSMODEL algorithms)
Simple Exponential Smoothing (TSMODEL algorithms)
Brown’s Exponential Smoothing (TSMODEL algorithms)
Holt’s Exponential Smoothing (TSMODEL algorithms)
Damped-Trend Exponential Smoothing (TSMODEL algorithms)
Simple Seasonal Exponential Smoothing (TSMODEL algorithms)
Winters’ Additive Exponential Smoothing (TSMODEL algorithms)
Winters’ Multiplicative Exponential Smoothing (TSMODEL algorithms)


Initialization of Exponential Smoothing (TSMODEL algorithms)

TSMODEL algorithms,TSMODEL algorithms,TSMODEL algorithms
initialization of exponential smoothing,initialization of exponential smoothing,initialization of exponential smoothing

Let L denote the level, T the trend and, S, a vector of length s, denote the seasonal states. The initial smoothing states are made by back-casting from t=n to t=0. Initialization for back-casting is described here.

For all the models L=yn.

For all non-seasonal models with trend, T is the slope of the line (with intercept) fitted to the data with time as a regressor.

For the simple seasonal model, the elements of S are seasonal averages minus the sample mean; for example, for monthly data the element corresponding to January will be average of all January values in the sample minus the sample mean.

For the additive Winters' model, fit y=αt+sΣi=1βiIi(t) to the data where t is time and Ii(t) are seasonal dummies. Note that the model does not have an intercept. Then T=α, and S=β−mean(β).

For the multiplicative Winters' model, fit a separate line (with intercept) for each season with time as a regressor. Suppose μ is the vector of intercepts and β is the vector of slopes (these vectors will be of length s). Then T=mean(β) and S=(μ+β)/(Σμi+βi).

Related Topics

Estimation and Forecasting of Exponential Smoothing (TSMODEL algorithms)


ARIMA and Transfer Function Models (TSMODEL algorithms)

TSMODEL algorithms,TSMODEL algorithms,TSMODEL algorithms
ARIMA and transfer function models,ARIMA and transfer function models,ARIMA and transfer function models

The following notation is specific to ARIMA/TF models:

at (t = 1, 2, ... , n) | White noise series normally distributed with mean zero and variance σ2
p | Order of the non-seasonal autoregressive part of the model
q | Order of the non-seasonal moving average part of the model
d | Order of the non-seasonal differencing
P | Order of the seasonal autoregressive part of the model
Q | Order of the seasonal moving-average part of the model
D | Order of the seasonal differencing
s | Seasonality or period of the model
φp(B) | AR polynomial of B of order p, φp(B)=1−1B−2B2−...−pBp
θq(B) | MA polynomial of B of order q, θq(B)=1−1B−2B2−...−qBq
ΦP(Bs) | Seasonal AR polynomial of BS of order P, ΦP(Bs)=1−Φ1Bs−Φ2Bs2−...−ΦPBsP
ΘQ(Bs) | Seasonal MA polynomial of BS of order Q, ΘQ(Bs)=1−Θ1Bs−Θ2Bs2−...−ΘQBsQ
Δ | Differencing operator Δ=(1−B)d(1−Bs)D
B | Backward shift operator with BYt=Yt−1 and Bat=at−1
Zσ2t | Prediction variance of Zt
Nσ2t | Prediction variance of the noise forecasts

Transfer function (TF) models form a very large class of models, which include univariate ARIMA models as a special case. Suppose Yt is the dependent series and, optionally, X1t,X2t,...,Xkt are to be used as predictor series in this model. A TF model describing the relationship between the dependent and predictor series has the following form:

Zt=f(Yt),

ΔZt=μ+kΣi=1NumiDeniΔiBbifi(Xit)+MAARat.

The univariate ARIMA model simply drops the predictors from the TF model; thus, it has the following form:

ΔZt=μ+MAARat

The main features of this model are:

• An initial transformation of the dependent and predictor series, f and fi. This transformation is optional and is applicable only when the dependent series values are positive. Allowed transformations are log and square root. These transformations are sometimes called variance-stabilizing transformations.

• A constant term μ.

• The unobserved i.i.d., zero mean, Gaussian error process at with variance σ2.

• The moving average lag polynomial MA=θq(B)ΘQ(Bs) and the auto-regressive lag polynomial AR=φp(B)ΦP(Bs).

• The difference/lag operators Δ and Δi.

• A delay term, Bbi, where bi is the order of the delay

• Predictors are assumed given. Their numerator and denominator lag polynomials are of the form: Numi=(ωi0−ωi1B−...−ωiuBu)(1−Ωi1Bs−...−ΩivBvs)Bb and Deni=(1−δi1B−...−δirBr)(1−Δi1Bs−...).

• The “noise” series

Nt=ΔZt−μ−kΣi=1NumiDeniΔiBbiXit

is assumed to be a mean zero, stationary ARMA process.

Interventions and Events

Interventions and events are handled like any other predictor; typically they are coded as 0/1 variables, but note that a given intervention variable's exact effect upon the model is determined by the transfer function in front of it.

Related Topics

Estimation and Forecasting of ARIMA/TF (TSMODEL algorithms)
Diagnostic Statistics (TSMODEL algorithms)
TSMODEL Algorithms
Notation (TSMODEL algorithms)
Models (TSMODEL algorithms)
Outlier Detection in Time Series Analysis (TSMODEL algorithms)
Goodness-of-Fit Statistics (TSMODEL algorithms)
Expert Modeling (TSMODEL algorithms)
References (TSMODEL algorithms)


Estimation and Forecasting of ARIMA/TF (TSMODEL algorithms)

TSMODEL algorithms,TSMODEL algorithms,TSMODEL algorithms
estimation and forecasting of ARIMA/TF,estimation and forecasting of ARIMA/TF,estimation and forecasting of ARIMA/TF

There are two forecasting algorithms available: Conditional Least Squares (CLS) and Exact Least Squares (ELS) or Unconditional Least Squares forecasting (ULS). These two algorithms differ in only one aspect: they forecast the noise process differently. The general steps in the forecasting computations are as follows:

1. Computation of noise process Nt through the historical period.

2. Forecasting the noise process Nt up to the forecast horizon. This is one step ahead forecasting during the historical period and multi-step ahead forecasting after that. The differences in CLS and ELS forecasting methodologies surface in this step. The prediction variances of noise forecasts are also computed in this step.

3. Final forecasts are obtained by first adding back to the noise forecasts the contributions of the constant term and the transfer function inputs and then integrating and back-transforming the result. The prediction variances of noise forecasts also may have to be processed to obtain the final prediction variances.

Let
^
N
t(k) and σ2t(k) be the k-step forecast and forecast variance, respectively.

Related Topics

Conditional Least Squares (CLS) Method (TSMODEL algorithms)
Maximum Likelihood (ML) Method (Brockwell and Davis, 1991) (TSMODEL algorithms)
Error Variance (TSMODEL algorithms)
Initialization of ARIMA/TF (TSMODEL algorithms)
Diagnostic Statistics (TSMODEL algorithms)


Conditional Least Squares (CLS) Method (TSMODEL algorithms)

TSMODEL algorithms,TSMODEL algorithms,TSMODEL algorithms
conditional least squares (CLS) method,conditional least squares (CLS) method,conditional least squares (CLS) method
CLS,CLS,CLS

^
N
t(k)=E(Nt+k|Nt,Nt−1,...) assuming Nt=0 for t<0.

σ2t(k)=σ2k−1Σj=0ψ2j

where ψj are coefficients of the power series expansion of MA/(Δ×AR).

Minimize S=Σ(Nt−
^
N
t(1))2.

Missing values are imputed with forecast values of Nt.

Related Topics

Estimation and Forecasting of ARIMA/TF (TSMODEL algorithms)
Maximum Likelihood (ML) Method (Brockwell and Davis, 1991) (TSMODEL algorithms)
Error Variance (TSMODEL algorithms)
Initialization of ARIMA/TF (TSMODEL algorithms)


Maximum Likelihood (ML) Method (Brockwell and Davis, 1991) (TSMODEL algorithms)

TSMODEL algorithms,TSMODEL algorithms,TSMODEL algorithms
maximum likelihood (ML) method,maximum likelihood (ML) method,maximum likelihood (ML) method
ML,ML,ML

^
N
t(k)=E(Nt+k|Nt,Nt−1,...,N1)

Maximize likelihood of {Nt−
^
N
t(1)}nt=1; that is,

L=−ln(S/n)−(1/n)nΣj=1ln(ηj)

where S=Σ(Nt−
^
N
t(1))2/ηt, and σ2t=σ2ηt is the one-step ahead forecast variance.

When missing values are present, a Kalman filter is used to calculate
^
N
t(k).

Related Topics

Estimation and Forecasting of ARIMA/TF (TSMODEL algorithms)
Conditional Least Squares (CLS) Method (TSMODEL algorithms)
Error Variance (TSMODEL algorithms)
Initialization of ARIMA/TF (TSMODEL algorithms)


Error Variance (TSMODEL algorithms)

TSMODEL algorithms,TSMODEL algorithms,TSMODEL algorithms
error variance,error variance,error variance

^
σ
2=S/(n−k)

in both methods. Here n is the number of non-zero residuals and k is the number of parameters (excluding error variance).

Related Topics

Estimation and Forecasting of ARIMA/TF (TSMODEL algorithms)
Conditional Least Squares (CLS) Method (TSMODEL algorithms)
Maximum Likelihood (ML) Method (Brockwell and Davis, 1991) (TSMODEL algorithms)
Initialization of ARIMA/TF (TSMODEL algorithms)


Initialization of ARIMA/TF (TSMODEL algorithms)

TSMODEL algorithms,TSMODEL algorithms,TSMODEL algorithms
initialization of ARIMA/TF,initialization of ARIMA/TF,initialization of ARIMA/TF

A slightly modified Levenberg-Marquardt algorithm is used to optimize the objective function. The modification takes into account the “admissibility” constraints on the parameters. The admissibility constraint requires that the roots of AR and MA polynomials be outside the unit circle and the sum of denominator polynomial parameters be non-zero for each predictor variable. The minimization algorithm requires a starting value to begin its iterative search. All the numerator and denominator polynomial parameters are initialized to zero except the coefficient of the 0th power in the numerator polynomial, which is initialized to the corresponding regression coefficient.

The ARMA parameters are initialized as follows:

Assume that the series Yt follows an ARMA(p,q)(P,Q) model with mean 0; that is:

Yt−1Yt−1−...−pYt−p=at−θ1at−1−...−θqat−q

In the following cl and ρl represent the lth lag autocovariance and autocorrelation of Yt respectively, and
^
c
l and
^
ρ
l represent their estimates.

Non-Seasonal AR Parameters

For AR parameter initial values, the estimated method is the same as that in appendix A6.2 of (Box, Jenkins, and Reinsel, 1994). Denote the estimates as
^
´1,...,
^
´p+q.

Non-Seasonal MA Parameters

Let

wt=Yt−1Yt−1−...−pYt−p=at−θ1at−1−...−θqat−q

The cross covariance

λl=E(wt+lat)=E((at+l−θ1at+l−1−...−θqat+l−q)at)={
σ2a | l=0
−θ1σ2a | l=1
... ...
−θqσ2a
0
l=q
l>q

Assuming that an AR(p+q) can approximate Yt, it follows that:

Yt−´1Yt−1−...−´pYt−p−´p+1Yt−p−1−...−´p+qYt−p−q=at

The AR parameters of this model are estimated as above and are denoted as
^
´1,...,
^
´p+q.

Thus λl can be estimated by

λl≈E((Yt+l−1Yt+l−1−...−pYt+l−p)(Yt−´1Yt−1−...−´p+qYt−p−q))
=(ρl−p+qΣj=1jρl+j−pΣi=1iρl−i+pΣi=1p+qΣj=1ijρl+j−i)c0

And the error variance σ2a is approximated by

^
σ
2a=Var(−p+qΣj=0´jYt−j)=p+qΣi=0p+qΣj=0´i´jci−j=c0p+qΣi=0p+qΣj=0´i´jρi−j

with
^
´0=−1.

Then the initial MA parameters are approximated by θl=−λl/σ2a and estimated by

^
θ
l=−
^
λ
l/
^
σ
2a=ρl−p+qΣj=1
^
jρl+j−pΣi=1
^
iρl−i+pΣi=1p+qΣj=1
^
i
^
jρl+j−ip+qΣi=0p+qΣj=0
^
´i
^
´jρi−j

So
^
θ
l can be calculated by
^
´j,
^
i, and {
^
ρ
l}p+2ql=1. In this procedure, only {
^
ρ
l}p+ql=1 are used and all other parameters are set to 0.

Seasonal parameters

For seasonal AR and MA components, the autocorrelations at the seasonal lags in the above equations are used.

Related Topics

Estimation and Forecasting of ARIMA/TF (TSMODEL algorithms)
Conditional Least Squares (CLS) Method (TSMODEL algorithms)
Maximum Likelihood (ML) Method (Brockwell and Davis, 1991) (TSMODEL algorithms)
Error Variance (TSMODEL algorithms)


Diagnostic Statistics (TSMODEL algorithms)

TSMODEL algorithms,TSMODEL algorithms,TSMODEL algorithms
diagnostic statistics,diagnostic statistics,diagnostic statistics

ARIMA/TF diagnostic statistics are based on residuals of the noise process, R(t)=N(t)−
^
N
(t).

Related Topics

Ljung-Box Statistic (TSMODEL algorithms)
Estimation and Forecasting of ARIMA/TF (TSMODEL algorithms)


Ljung-Box Statistic (TSMODEL algorithms)

TSMODEL algorithms,TSMODEL algorithms,TSMODEL algorithms
Ljung-Box statistic,Ljung-Box statistic,Ljung-Box statistic

Q(K)=n(n+2)KΣk=1r2k/(n−k)

where rk is the kth lag ACF of residual.

Q(K) is approximately distributed as χ2(K−m), where m is the number of parameters other than the constant term and predictor related-parameters.

Related Topics

Diagnostic Statistics (TSMODEL algorithms)


Outlier Detection in Time Series Analysis (TSMODEL algorithms)

TSMODEL algorithms,TSMODEL algorithms,TSMODEL algorithms
outlier detection in time series analysis,outlier detection in time series analysis,outlier detection in time series analysis

The observed series may be contaminated by so-called outliers. These outliers may change the mean level of the uncontaminated series. The purpose of outlier detection is to find if there are outliers and what are their locations, types, and magnitudes.

TSMODEL considers seven types of outliers. They are additive outliers (AO), innovational outliers (IO), level shift (LS), temporary (or transient) change (TC), seasonal additive (SA), local trend (LT), and AO patch (AOP).

Related Topics

Notation (TSMODEL algorithms)
Definitions of Outliers (TSMODEL algorithms)
Estimating the Effects of an Outlier (TSMODEL algorithms)
Detection of Outliers (TSMODEL algorithms)
TSMODEL Algorithms
Notation (TSMODEL algorithms)
Models (TSMODEL algorithms)
ARIMA and Transfer Function Models (TSMODEL algorithms)
Goodness-of-Fit Statistics (TSMODEL algorithms)
Expert Modeling (TSMODEL algorithms)
References (TSMODEL algorithms)


Notation (TSMODEL algorithms)

TSMODEL algorithms,TSMODEL algorithms,TSMODEL algorithms
notation,notation,notation

The following notation is specific to outlier detection:

U(t) or Ut

The uncontaminated series, outlier free. It is assumed to be a univariate ARIMA or transfer function model.

Related Topics

Outlier Detection in Time Series Analysis (TSMODEL algorithms)
Definitions of Outliers (TSMODEL algorithms)
Estimating the Effects of an Outlier (TSMODEL algorithms)
Detection of Outliers (TSMODEL algorithms)


Definitions of Outliers (TSMODEL algorithms)

TSMODEL algorithms,TSMODEL algorithms,TSMODEL algorithms
definitions of outliers,definitions of outliers,definitions of outliers

Types of outliers are defined separately here. In practice any combination of these types can occur in the series under study.

Related Topics

AO (Additive Outliers) (TSMODEL algorithms)
IO (Innovational Outliers) (TSMODEL algorithms)
LS (Level Shift) (TSMODEL algorithms)
TC (Temporary/Transient Change) (TSMODEL algorithms)
SA (Seasonal Additive) (TSMODEL algorithms)
LT (Local Trend) (TSMODEL algorithms)
AOP (AO patch) (TSMODEL algorithms)
Summary (TSMODEL algorithms)
Notation (TSMODEL algorithms)
Estimating the Effects of an Outlier (TSMODEL algorithms)
Detection of Outliers (TSMODEL algorithms)


AO (Additive Outliers) (TSMODEL algorithms)

TSMODEL algorithms,TSMODEL algorithms,TSMODEL algorithms
AO (additive outliers),AO (additive outliers),AO (additive outliers)
additive outliers,additive outliers,additive outliers

Assuming that an AO outlier occurs at time t=T, the observed series can be represented as

Y(t)=U(t)+wIT(t)

where IT(t)={
0 | t≠T
1 | t=T
 is a pulse function and w is the deviation from the true U(T) caused by the outlier.

Related Topics

Definitions of Outliers (TSMODEL algorithms)
IO (Innovational Outliers) (TSMODEL algorithms)
LS (Level Shift) (TSMODEL algorithms)
TC (Temporary/Transient Change) (TSMODEL algorithms)
SA (Seasonal Additive) (TSMODEL algorithms)
LT (Local Trend) (TSMODEL algorithms)
AOP (AO patch) (TSMODEL algorithms)
Summary (TSMODEL algorithms)


IO (Innovational Outliers) (TSMODEL algorithms)

TSMODEL algorithms,TSMODEL algorithms,TSMODEL algorithms
IO (innovational outliers),IO (innovational outliers),IO (innovational outliers)
innovational outliers,innovational outliers,innovational outliers

Assuming that an IO outlier occurs at time t=T, then

Y(t)=μ(t)+θ(B)Δ(B)(a(t)+wIT(t))

Related Topics

Definitions of Outliers (TSMODEL algorithms)
AO (Additive Outliers) (TSMODEL algorithms)
LS (Level Shift) (TSMODEL algorithms)
TC (Temporary/Transient Change) (TSMODEL algorithms)
SA (Seasonal Additive) (TSMODEL algorithms)
LT (Local Trend) (TSMODEL algorithms)
AOP (AO patch) (TSMODEL algorithms)
Summary (TSMODEL algorithms)


LS (Level Shift) (TSMODEL algorithms)

TSMODEL algorithms,TSMODEL algorithms,TSMODEL algorithms
LS (level shift),LS (level shift),LS (level shift)
level shift,level shift,level shift

Assuming that a LS outlier occurs at time t=T, then

Y(t)=U(t)+wST(t)

where ST(t)=11−BIT(t)={
0 | t<T
1 | t≥T
 is a step function.

Related Topics

Definitions of Outliers (TSMODEL algorithms)
AO (Additive Outliers) (TSMODEL algorithms)
IO (Innovational Outliers) (TSMODEL algorithms)
TC (Temporary/Transient Change) (TSMODEL algorithms)
SA (Seasonal Additive) (TSMODEL algorithms)
LT (Local Trend) (TSMODEL algorithms)
AOP (AO patch) (TSMODEL algorithms)
Summary (TSMODEL algorithms)


TC (Temporary/Transient Change) (TSMODEL algorithms)

TSMODEL algorithms,TSMODEL algorithms,TSMODEL algorithms
TC (temporary/transient change),TC (temporary/transient change),TC (temporary/transient change)
temporary/transient change,temporary/transient change,temporary/transient change

Assuming that a TC outlier occurs at time t=T, then

Y(t)=U(t)+wDT(t)

where DT(t)=11−δBIT(t), 0<δ<1 is a damping function.

Related Topics

Definitions of Outliers (TSMODEL algorithms)
AO (Additive Outliers) (TSMODEL algorithms)
IO (Innovational Outliers) (TSMODEL algorithms)
LS (Level Shift) (TSMODEL algorithms)
SA (Seasonal Additive) (TSMODEL algorithms)
LT (Local Trend) (TSMODEL algorithms)
AOP (AO patch) (TSMODEL algorithms)
Summary (TSMODEL algorithms)


SA (Seasonal Additive) (TSMODEL algorithms)

TSMODEL algorithms,TSMODEL algorithms,TSMODEL algorithms
SA (seasonal additive),SA (seasonal additive),SA (seasonal additive)
seasonal additive,seasonal additive,seasonal additive

Assuming that a SA outlier occurs at time t=T, then

Y(t)=U(t)+wSST(t)

where SST(t)=11−BsIT(t)={
1 | t=T+ks,k≥0
0 | o.w.
 is a step seasonal pulse function.

Related Topics

Definitions of Outliers (TSMODEL algorithms)
AO (Additive Outliers) (TSMODEL algorithms)
IO (Innovational Outliers) (TSMODEL algorithms)
LS (Level Shift) (TSMODEL algorithms)
TC (Temporary/Transient Change) (TSMODEL algorithms)
LT (Local Trend) (TSMODEL algorithms)
AOP (AO patch) (TSMODEL algorithms)
Summary (TSMODEL algorithms)


LT (Local Trend) (TSMODEL algorithms)

TSMODEL algorithms,TSMODEL algorithms,TSMODEL algorithms
LT (local trend),LT (local trend),LT (local trend)
local trend,local trend,local trend

Assuming that a LT outlier occurs at time t=T, then

Y(t)=U(t)+wTT(t)

where TT(t)=1(1−B)2IT(t)={
t+1−T | t≥T
0 | o.w.
 is a local trend function.

Related Topics

Definitions of Outliers (TSMODEL algorithms)
AO (Additive Outliers) (TSMODEL algorithms)
IO (Innovational Outliers) (TSMODEL algorithms)
LS (Level Shift) (TSMODEL algorithms)
TC (Temporary/Transient Change) (TSMODEL algorithms)
SA (Seasonal Additive) (TSMODEL algorithms)
AOP (AO patch) (TSMODEL algorithms)
Summary (TSMODEL algorithms)


AOP (AO patch) (TSMODEL algorithms)

TSMODEL algorithms,TSMODEL algorithms,TSMODEL algorithms
AO patch (AOP),AO patch (AOP),AO patch (AOP)
AOP,AOP,AOP

An AO patch is a group of two or more consecutive AO outliers. An AO patch can be described by its starting time and length. Assuming that there is a patch of AO outliers of length k at time t=T, the observed series can be represented as

Y(t)=U(t)+kΣi=1wiIT−1+i(t)

Due to a masking effect, a patch of AO outliers is very difficult to detect when searching for outliers one by one. This is why the AO patch is considered as a separate type from individual AO. For type AO patch, the procedure searches for the whole patch together.

Related Topics

Definitions of Outliers (TSMODEL algorithms)
AO (Additive Outliers) (TSMODEL algorithms)
IO (Innovational Outliers) (TSMODEL algorithms)
LS (Level Shift) (TSMODEL algorithms)
TC (Temporary/Transient Change) (TSMODEL algorithms)
SA (Seasonal Additive) (TSMODEL algorithms)
LT (Local Trend) (TSMODEL algorithms)
Summary (TSMODEL algorithms)


Summary (TSMODEL algorithms)

TSMODEL algorithms,TSMODEL algorithms,TSMODEL algorithms
outliers summary,outliers summary,outliers summary

For an outlier of type O at time t=T (except AO patch):

Y(t)=μ(t)+wLO(B)IT(t)+θ(B)Δ(B)a(t)

where

LO(B)={
1 | O=AO
1/(Δπ(B)) | O=IO
1/(1−B) | O=LS
1/(1−δB) | O=TC
1/(1−Bs)
1/(1−B)2
O=SA
O=LT

with π(B)=(B)/θ(B). A general model for incorporating outliers can thus be written as follows:

Y(t)=μ(t)+MΣk=1wkLOk(B)ITk(t)+θ(B)Δ(B)a(t)

where M is the number of outliers.

Related Topics

Definitions of Outliers (TSMODEL algorithms)
AO (Additive Outliers) (TSMODEL algorithms)
IO (Innovational Outliers) (TSMODEL algorithms)
LS (Level Shift) (TSMODEL algorithms)
TC (Temporary/Transient Change) (TSMODEL algorithms)
SA (Seasonal Additive) (TSMODEL algorithms)
LT (Local Trend) (TSMODEL algorithms)
AOP (AO patch) (TSMODEL algorithms)


Estimating the Effects of an Outlier (TSMODEL algorithms)

TSMODEL algorithms,TSMODEL algorithms,TSMODEL algorithms
estimating the effects of an outlier,estimating the effects of an outlier,estimating the effects of an outlier

Suppose that the model and the model parameters are known. Also suppose that the type and location of an outlier are known. Estimation of the magnitude of the outlier and test statistics are as follows.

The results in this section are only used in the intermediate steps of outlier detection procedure. The final estimates of outliers are from the model incorporating all the outliers in which all parameters are jointly estimated.

Related Topics

Non-AO Patch Deterministic Outliers (TSMODEL algorithms)
AO Patch Outliers (TSMODEL algorithms)
Notation (TSMODEL algorithms)
Definitions of Outliers (TSMODEL algorithms)
Detection of Outliers (TSMODEL algorithms)


Non-AO Patch Deterministic Outliers (TSMODEL algorithms)

TSMODEL algorithms,TSMODEL algorithms,TSMODEL algorithms
non-AO patch deterministic outliers,non-AO patch deterministic outliers,non-AO patch deterministic outliers

For a deterministic outlier of any type at time T (except AO patch), let e(t) be the residual and x(t)=π(B)L(B)ΔIT(t), so:

e(t)=wx(t)+a(t)

From residuals e(t), the parameters for outliers at time T are estimated by simple linear regression of e(t) on x(t).

For j = 1 (AO), 2 (IO), 3 (LS), 4 (TC), 5 (SA), 6 (LT), define test statistics:

λj (T) =wj(T)
√ Var (wj(T))

Under the null hypothesis of no outlier, λj (T) is distributed as N(0,1) assuming the model and model parameters are known.

Related Topics

Estimating the Effects of an Outlier (TSMODEL algorithms)
AO Patch Outliers (TSMODEL algorithms)


AO Patch Outliers (TSMODEL algorithms)

TSMODEL algorithms,TSMODEL algorithms,TSMODEL algorithms
AO patch outliers,AO patch outliers,AO patch outliers

For an AO patch of length k starting at time T, let xi(t;T)=π(B)ΔIT+i−1(t) for i = 1 to k, then

e(t)=kΣi=1wi(T)xi(t;T)+a(t)

Multiple linear regression is used to fit this model. Test statistics are defined as:

χ2(T)=w´(T)(XTXT)w(T)σ2

Assuming the model and model parameters are known, χ2(T) has a Chi-square distribution with k degrees of freedom under the null hypothesis w1(T)=...=wk(T)=0.

Related Topics

Estimating the Effects of an Outlier (TSMODEL algorithms)
Non-AO Patch Deterministic Outliers (TSMODEL algorithms)


Detection of Outliers (TSMODEL algorithms)

TSMODEL algorithms,TSMODEL algorithms,TSMODEL algorithms
detection of outliers,detection of outliers,detection of outliers

The following flow chart demonstrates how automatic outlier detection works. Let M be the total number of outliers and Nadj be the number of times the series is adjusted for outliers. At the beginning of the procedure, M = 0 and Nadj = 0.

Related Topics

Outlier Detection in Time Series Analysis (TSMODEL algorithms)
Notation (TSMODEL algorithms)
Definitions of Outliers (TSMODEL algorithms)
Estimating the Effects of an Outlier (TSMODEL algorithms)


Goodness-of-Fit Statistics (TSMODEL algorithms)

TSMODEL algorithms,TSMODEL algorithms,TSMODEL algorithms
goodness-of-fit statistics,goodness-of-fit statistics,goodness-of-fit statistics

Goodness-of-fit statistics are based on the original series Y(t). Let k= number of parameters in the model, n = number of non-missing residuals.

Related Topics

Mean Squared Error (TSMODEL algorithms)
Mean Absolute Percent Error (TSMODEL algorithms)
Maximum Absolute Percent Error (TSMODEL algorithms)
Mean Absolute Error (TSMODEL algorithms)
Maximum Absolute Error (TSMODEL algorithms)
Normalized Bayesian Information Criterion (TSMODEL algorithms)
R-Squared (TSMODEL algorithms)
Stationary R-Squared (TSMODEL algorithms)
TSMODEL Algorithms
Notation (TSMODEL algorithms)
Models (TSMODEL algorithms)
ARIMA and Transfer Function Models (TSMODEL algorithms)
Outlier Detection in Time Series Analysis (TSMODEL algorithms)
Expert Modeling (TSMODEL algorithms)
References (TSMODEL algorithms)


Mean Squared Error (TSMODEL algorithms)

TSMODEL algorithms,TSMODEL algorithms,TSMODEL algorithms
mean squared error,mean squared error,mean squared error

MSE=Σ(Y(t)−
^
Y
(t))2n−k

Related Topics

Goodness-of-Fit Statistics (TSMODEL algorithms)
Mean Absolute Percent Error (TSMODEL algorithms)
Maximum Absolute Percent Error (TSMODEL algorithms)
Mean Absolute Error (TSMODEL algorithms)
Maximum Absolute Error (TSMODEL algorithms)
Normalized Bayesian Information Criterion (TSMODEL algorithms)
R-Squared (TSMODEL algorithms)
Stationary R-Squared (TSMODEL algorithms)


Mean Absolute Percent Error (TSMODEL algorithms)

TSMODEL algorithms,TSMODEL algorithms,TSMODEL algorithms
mean absolute percent error,mean absolute percent error,mean absolute percent error

MAPE=100nΣ|(Y(t)−
^
Y
(t))/Y(t)|

Related Topics

Goodness-of-Fit Statistics (TSMODEL algorithms)
Mean Squared Error (TSMODEL algorithms)
Maximum Absolute Percent Error (TSMODEL algorithms)
Mean Absolute Error (TSMODEL algorithms)
Maximum Absolute Error (TSMODEL algorithms)
Normalized Bayesian Information Criterion (TSMODEL algorithms)
R-Squared (TSMODEL algorithms)
Stationary R-Squared (TSMODEL algorithms)


Maximum Absolute Percent Error (TSMODEL algorithms)

TSMODEL algorithms,TSMODEL algorithms,TSMODEL algorithms
maximum absolute percent error,maximum absolute percent error,maximum absolute percent error

MaxAPE=100max(|(Y(t)−
^
Y
(t))/Y(t)|)

Related Topics

Goodness-of-Fit Statistics (TSMODEL algorithms)
Mean Squared Error (TSMODEL algorithms)
Mean Absolute Percent Error (TSMODEL algorithms)
Mean Absolute Error (TSMODEL algorithms)
Maximum Absolute Error (TSMODEL algorithms)
Normalized Bayesian Information Criterion (TSMODEL algorithms)
R-Squared (TSMODEL algorithms)
Stationary R-Squared (TSMODEL algorithms)


Mean Absolute Error (TSMODEL algorithms)

TSMODEL algorithms,TSMODEL algorithms,TSMODEL algorithms
mean absolute error,mean absolute error,mean absolute error

MAE=1nΣ|Y(t)−
^
Y
(t)|

Related Topics

Goodness-of-Fit Statistics (TSMODEL algorithms)
Mean Squared Error (TSMODEL algorithms)
Mean Absolute Percent Error (TSMODEL algorithms)
Maximum Absolute Percent Error (TSMODEL algorithms)
Maximum Absolute Error (TSMODEL algorithms)
Normalized Bayesian Information Criterion (TSMODEL algorithms)
R-Squared (TSMODEL algorithms)
Stationary R-Squared (TSMODEL algorithms)


Maximum Absolute Error (TSMODEL algorithms)

TSMODEL algorithms,TSMODEL algorithms,TSMODEL algorithms
maximum absolute error,maximum absolute error,maximum absolute error

MaxAE=max(|Y(t)−
^
Y
(t)|)

Related Topics

Goodness-of-Fit Statistics (TSMODEL algorithms)
Mean Squared Error (TSMODEL algorithms)
Mean Absolute Percent Error (TSMODEL algorithms)
Maximum Absolute Percent Error (TSMODEL algorithms)
Mean Absolute Error (TSMODEL algorithms)
Normalized Bayesian Information Criterion (TSMODEL algorithms)
R-Squared (TSMODEL algorithms)
Stationary R-Squared (TSMODEL algorithms)


Normalized Bayesian Information Criterion (TSMODEL algorithms)

TSMODEL algorithms,TSMODEL algorithms,TSMODEL algorithms
normalized bayesian information criterion,normalized bayesian information criterion,normalized bayesian information criterion

Normalized BIC=ln(MSE)+kln(n)n

Related Topics

Goodness-of-Fit Statistics (TSMODEL algorithms)
Mean Squared Error (TSMODEL algorithms)
Mean Absolute Percent Error (TSMODEL algorithms)
Maximum Absolute Percent Error (TSMODEL algorithms)
Mean Absolute Error (TSMODEL algorithms)
Maximum Absolute Error (TSMODEL algorithms)
R-Squared (TSMODEL algorithms)
Stationary R-Squared (TSMODEL algorithms)


R-Squared (TSMODEL algorithms)

TSMODEL algorithms,TSMODEL algorithms,TSMODEL algorithms
R-squared,R-squared,R-squared

R2=1−Σ(Y(t)−
^
Y
(t))2Σ(Y(t)−Y)2

Related Topics

Goodness-of-Fit Statistics (TSMODEL algorithms)
Mean Squared Error (TSMODEL algorithms)
Mean Absolute Percent Error (TSMODEL algorithms)
Maximum Absolute Percent Error (TSMODEL algorithms)
Mean Absolute Error (TSMODEL algorithms)
Maximum Absolute Error (TSMODEL algorithms)
Normalized Bayesian Information Criterion (TSMODEL algorithms)
Stationary R-Squared (TSMODEL algorithms)


Stationary R-Squared (TSMODEL algorithms)

TSMODEL algorithms,TSMODEL algorithms,TSMODEL algorithms
stationary R-squared,stationary R-squared,stationary R-squared

A similar statistic was used by Harvey (Harvey, 1989).

R2S=1−Σt(Z(t)−
^
Z
(t))2Σt(ΔZ(t)−ΔZ)2

where

The sum is over the terms in which both Z(t)−
^
Z
(t) and ΔZ(t)−ΔZ are not missing.

ΔZ is the simple mean model for the differenced transformed series, which is equivalent to the univariate baseline model ARIMA(0,d,0)(0,D,0).

For the exponential smoothing models currently under consideration, use the differencing orders (corresponding to their equivalent ARIMA models if there is one).

d={
2 | Brown, Holt
1 | other
, D={
0 | s=1
1 | s>1

Note: Both the stationary and usual R-squared can be negative with range (−∞,1]. A negative R-squared value means that the model under consideration is worse than the baseline model. Zero R-squared means that the model under consideration is as good or bad as the baseline model. Positive R-squared means that the model under consideration is better than the baseline model.

Related Topics

Goodness-of-Fit Statistics (TSMODEL algorithms)
Mean Squared Error (TSMODEL algorithms)
Mean Absolute Percent Error (TSMODEL algorithms)
Maximum Absolute Percent Error (TSMODEL algorithms)
Mean Absolute Error (TSMODEL algorithms)
Maximum Absolute Error (TSMODEL algorithms)
Normalized Bayesian Information Criterion (TSMODEL algorithms)
R-Squared (TSMODEL algorithms)


Expert Modeling (TSMODEL algorithms)

TSMODEL algorithms,TSMODEL algorithms,TSMODEL algorithms
expert modeling,expert modeling,expert modeling

Related Topics

Univariate Series (TSMODEL algorithms)
Multivariate Series (TSMODEL algorithms)
TSMODEL Algorithms
Notation (TSMODEL algorithms)
Models (TSMODEL algorithms)
ARIMA and Transfer Function Models (TSMODEL algorithms)
Outlier Detection in Time Series Analysis (TSMODEL algorithms)
Goodness-of-Fit Statistics (TSMODEL algorithms)
References (TSMODEL algorithms)


Univariate Series (TSMODEL algorithms)

TSMODEL algorithms,TSMODEL algorithms,TSMODEL algorithms
univariate series,univariate series,univariate series

Users can let the Expert Modeler select a model for them from:

• All models (default).

• Exponential smoothing models only.

• ARIMA models only.

Related Topics

Exponential Smoothing Expert Model (TSMODEL algorithms)
ARIMA Expert Model (TSMODEL algorithms)
All Models Expert Model (TSMODEL algorithms)
Multivariate Series (TSMODEL algorithms)


Exponential Smoothing Expert Model (TSMODEL algorithms)

TSMODEL algorithms,TSMODEL algorithms,TSMODEL algorithms
exponential smoothing expert model,exponential smoothing expert model,exponential smoothing expert model

Note: For short series, 1<n≤10, fit simple ES.

Related Topics

Univariate Series (TSMODEL algorithms)
ARIMA Expert Model (TSMODEL algorithms)
All Models Expert Model (TSMODEL algorithms)


ARIMA Expert Model (TSMODEL algorithms)

TSMODEL algorithms,TSMODEL algorithms,TSMODEL algorithms
ARIMA expert model,ARIMA expert model,ARIMA expert model

Note: For short series, do the following:

• If n<=10, fit AR(1) with constant term.

• If 10<n<3s, set s=1 to build a non-seasonal model.

Related Topics

Univariate Series (TSMODEL algorithms)
Exponential Smoothing Expert Model (TSMODEL algorithms)
All Models Expert Model (TSMODEL algorithms)


All Models Expert Model (TSMODEL algorithms)

TSMODEL algorithms,TSMODEL algorithms,TSMODEL algorithms
all models expert model,all models expert model,all models expert model

In this case, the Exponential Smoothing and ARIMA expert models are computed, and the model with the smaller normalized BIC is chosen.

Note: For short series, n<max(20,3s), use Exponential Smoothing Expert Model.

Related Topics

Univariate Series (TSMODEL algorithms)
Exponential Smoothing Expert Model (TSMODEL algorithms)
ARIMA Expert Model (TSMODEL algorithms)


Multivariate Series (TSMODEL algorithms)

TSMODEL algorithms,TSMODEL algorithms,TSMODEL algorithms
multivariate series,multivariate series,multivariate series

In the multivariate situation, users can let the Expert Modeler select a model for them from:

• All models (default). Note that if the multivariate expert ARIMA model drops all the predictors and ends up with a univariate expert ARIMA model, this univariate expert ARIMA model will be compared with expert exponential smoothing models as before and the Expert Modeler will decide which is the best overall model.

• ARIMA models only.

Related Topics

Transfer Function Expert Model (TSMODEL algorithms)
Univariate Series (TSMODEL algorithms)


Transfer Function Expert Model (TSMODEL algorithms)

TSMODEL algorithms,TSMODEL algorithms,TSMODEL algorithms
transfer function expert model,transfer function expert model,transfer function expert model

Note: For short series, n<max(20,3s), fit a univariate expert model.

Related Topics

Multivariate Series (TSMODEL algorithms)


References (TSMODEL algorithms)

TSMODEL algorithms,TSMODEL algorithms,TSMODEL algorithms
references,references,references

Box, G. E. P., G. M. Jenkins, and G. C. Reinsel. 1994. Time series analysis: Forecasting and control, 3rd ed. Englewood Cliffs, N.J.: Prentice Hall.

Brockwell, P. J., and R. A. Davis. 1991. Time Series: Theory and Methods, 2 ed. : Springer-Verlag.

Gardner, E. S. 1985. Exponential smoothing: The state of the art. Journal of Forecasting, 4, 1-28.

Harvey, A. C. 1989. Forecasting, structural time series models and the Kalman filter. Cambridge: Cambridge University Press.

Makridakis, S. G., S. C. Wheelwright, and R. J. Hyndman. 1997. Forecasting: Methods and applications, 3rd ed. ed. New York: John Wiley and Sons.

Melard, G. 1984. A fast algorithm for the exact likelihood of autoregressive-moving average models. Applied Statistics, 33:1, 104-119.

Pena, D., G. C. Tiao, and R. S. Tsay, eds. 2001. A course in time series analysis. New York: John Wiley and Sons.

Related Topics

TSMODEL Algorithms
Notation (TSMODEL algorithms)
Models (TSMODEL algorithms)
ARIMA and Transfer Function Models (TSMODEL algorithms)
Outlier Detection in Time Series Analysis (TSMODEL algorithms)
Goodness-of-Fit Statistics (TSMODEL algorithms)
Expert Modeling (TSMODEL algorithms)


TWOSTEP CLUSTER Algorithms

clustering,clustering,clustering
TwoStep algorithm,TwoStep algorithm,TwoStep algorithm
TWOSTEP CLUSTER (command),TWOSTEP CLUSTER (command),TWOSTEP CLUSTER (command)
algorithms,algorithms,algorithms
TwoStep Cluster Analysis,TwoStep Cluster Analysis,TwoStep Cluster Analysis
algorithms,algorithms,algorithms
TwoStep clustering algorithms,TwoStep clustering algorithms,TwoStep clustering algorithms

The TwoStep cluster method is a scalable cluster analysis algorithm designed to handle very large data sets. It can handle both continuous and categorical variables or attributes. It requires only one data pass. It has two steps 1) pre-cluster the cases (or records) into many small sub-clusters; 2) cluster the sub-clusters resulting from pre-cluster step into the desired number of clusters. It can also automatically select the number of clusters.

Related Topics

Notation (TwoStep clustering algorithms)
TwoStep Clustering Procedure (TwoStep clustering algorithms)
Pre-cluster
Outlier Handling
Cluster (TwoStep clustering algorithms)
Accuracy (TwoStep clustering algorithms)
Distance Measure (TwoStep clustering algorithms)
Log-Likelihood Distance (TwoStep clustering algorithms)
Euclidean Distance (TwoStep clustering algorithms)
Number of Clusters (auto-clustering) (TwoStep clustering algorithms)
Cluster Membership Assignment (TwoStep clustering algorithms)
Without Outlier-Handling (TwoStep clustering algorithms)
With Outlier-Handling (TwoStep clustering algorithms)
Log-Likelihood Distance (TwoStep clustering algorithms)
Euclidean Distance (TwoStep clustering algorithms)
Missing Values (TwoStep clustering algorithms)
References (TwoStep clustering algorithms)
Cluster Evaluation Algorithms


Notation (TwoStep clustering algorithms)

TwoStep clustering algorithms,TwoStep clustering algorithms,TwoStep clustering algorithms
notation,notation,notation

The following notation is used throughout this chapter unless otherwise stated:

KA

Total number of continuous variables used in the procedure.

KB

Total number of categorical variables used in the procedure.

Lk

Number of categories for the kth categorical variable.

Rk

The range of the kth continuous variable.

N

Number of data records in total.

Nk

Number of data records in cluster k.

^
μ
k

The estimated mean of the kth continuous variable across the entire dataset.

^
σ
2k

The estimated variance of the kth continuous variable across the entire dataset.

^
μ
jk

The estimated mean of the kth continuous variable in cluster j.

^
σ
2jk

The estimated variance of the kth continuous variable in cluster j.

Njkl

Number of data records in cluster j whose kth categorical variable takes the lth category.

Nkl

Number of data records in the kth categorical variable that take the lth category.

d(j, s)

Distance between clusters j and s.

<j,s>

Index that represents the cluster formed by combining clusters j and s.

Related Topics

TWOSTEP CLUSTER Algorithms
TwoStep Clustering Procedure (TwoStep clustering algorithms)
Pre-cluster
Outlier Handling
Cluster (TwoStep clustering algorithms)
Accuracy (TwoStep clustering algorithms)
Distance Measure (TwoStep clustering algorithms)
Log-Likelihood Distance (TwoStep clustering algorithms)
Euclidean Distance (TwoStep clustering algorithms)
Number of Clusters (auto-clustering) (TwoStep clustering algorithms)
Cluster Membership Assignment (TwoStep clustering algorithms)
Without Outlier-Handling (TwoStep clustering algorithms)
With Outlier-Handling (TwoStep clustering algorithms)
Log-Likelihood Distance (TwoStep clustering algorithms)
Euclidean Distance (TwoStep clustering algorithms)
Missing Values (TwoStep clustering algorithms)
References (TwoStep clustering algorithms)


TwoStep Clustering Procedure (TwoStep clustering algorithms)

The TwoStep clustering procedure consists of the following steps:

Pre-clustering,

Outlier handling (optional),

Clustering

Related Topics

TWOSTEP CLUSTER Algorithms
Notation (TwoStep clustering algorithms)
Pre-cluster
Outlier Handling
Cluster (TwoStep clustering algorithms)
Accuracy (TwoStep clustering algorithms)
Distance Measure (TwoStep clustering algorithms)
Log-Likelihood Distance (TwoStep clustering algorithms)
Euclidean Distance (TwoStep clustering algorithms)
Number of Clusters (auto-clustering) (TwoStep clustering algorithms)
Cluster Membership Assignment (TwoStep clustering algorithms)
Without Outlier-Handling (TwoStep clustering algorithms)
With Outlier-Handling (TwoStep clustering algorithms)
Log-Likelihood Distance (TwoStep clustering algorithms)
Euclidean Distance (TwoStep clustering algorithms)
Missing Values (TwoStep clustering algorithms)
References (TwoStep clustering algorithms)


Pre-cluster

TwoStep clustering algorithms,TwoStep clustering algorithms,TwoStep clustering algorithms
pre-clustering step,pre-clustering step,pre-clustering step
pre-clustering,pre-clustering,pre-clustering
in TwoStep clustering algorithms,in TwoStep clustering algorithms,in TwoStep clustering algorithms

The pre-cluster step uses a sequential clustering approach. It scans the data records one by one and decides if the current record should be merged with the previously formed clusters or starts a new cluster based on the distance criterion (described below).

TwoStep clustering algorithms,TwoStep clustering algorithms,TwoStep clustering algorithms
cluster feature tree,cluster feature tree,cluster feature tree
cluster feature tree,cluster feature tree,cluster feature tree
in TwoStep clustering algorithms,in TwoStep clustering algorithms,in TwoStep clustering algorithms
CF (cluster feature) tree,CF (cluster feature) tree,CF (cluster feature) tree
in TwoStep clustering algorithms,in TwoStep clustering algorithms,in TwoStep clustering algorithms

The procedure is implemented by constructing a modified cluster feature (CF) tree. The CF tree consists of levels of nodes, and each node contains a number of entries. A leaf entry (an entry in the leaf node) represents a final sub-cluster. The non-leaf nodes and their entries are used to guide a new record quickly into a correct leaf node. Each entry is characterized by its CF that consists of the entry’s number of records, mean and variance of each range field, and counts for each category of each symbolic field. For each successive record, starting from the root node, it is recursively guided by the closest entry in the node to find the closest child node, and descends along the CF tree. Upon reaching a leaf node, it finds the closest leaf entry in the leaf node. If the record is within a threshold distance of the closest leaf entry, it is absorbed into the leaf entry and the CF of that leaf entry is updated. Otherwise it starts its own leaf entry in the leaf node. If there is no space in the leaf node to create a new leaf entry, the leaf node is split into two. The entries in the original leaf node are divided into two groups using the farthest pair as seeds, and redistributing the remaining entries based on the closeness criterion.

BIRCH algorithm,BIRCH algorithm,BIRCH algorithm
in TwoStep clustering algorithms,in TwoStep clustering algorithms,in TwoStep clustering algorithms

If the CF tree grows beyond allowed maximum size, the CF tree is rebuilt based on the existing CF tree by increasing the threshold distance criterion. The rebuilt CF tree is smaller and hence has space for new input records. This process continues until a complete data pass is finished. For details of CF tree construction, see the BIRCH algorithm (Zhang, Ramakrishnon, and Livny, 1996).

All records falling in the same entry can be collectively represented by the entry’s CF. When a new record is added to an entry, the new CF can be computed from this new record and the old CF without knowing the individual records in the entry. These properties of CF make it possible to maintain only the entry CFs, rather than the sets of individual records. Hence the CF-tree is much smaller than the original data and can be stored in memory more efficiently.

Note that the structure of the constructed CF tree may depend on the input order of the cases or records. To minimize the order effect, randomly order the records before building the model.

Related Topics

TWOSTEP CLUSTER Algorithms
Notation (TwoStep clustering algorithms)
TwoStep Clustering Procedure (TwoStep clustering algorithms)
Outlier Handling
Cluster (TwoStep clustering algorithms)
Accuracy (TwoStep clustering algorithms)
Distance Measure (TwoStep clustering algorithms)
Log-Likelihood Distance (TwoStep clustering algorithms)
Euclidean Distance (TwoStep clustering algorithms)
Number of Clusters (auto-clustering) (TwoStep clustering algorithms)
Cluster Membership Assignment (TwoStep clustering algorithms)
Without Outlier-Handling (TwoStep clustering algorithms)
With Outlier-Handling (TwoStep clustering algorithms)
Log-Likelihood Distance (TwoStep clustering algorithms)
Euclidean Distance (TwoStep clustering algorithms)
Missing Values (TwoStep clustering algorithms)
References (TwoStep clustering algorithms)


Outlier Handling

TwoStep clustering algorithms,TwoStep clustering algorithms,TwoStep clustering algorithms
outlier handling,outlier handling,outlier handling
outlier handling,outlier handling,outlier handling
in TwoStep clustering algorithms,in TwoStep clustering algorithms,in TwoStep clustering algorithms

An optional outlier-handling step is implemented in the algorithm in the process of building the CF tree. Outliers are considered as data records that do not fit well into any cluster. We consider data records in a leaf entry as outliers if the number of records in the entry is less than a certain fraction (25% by default) of the size of the largest leaf entry in the CF tree. Before rebuilding the CF tree, the procedure checks for potential outliers and sets them aside. After rebuilding the CF tree, the procedure checks to see if these outliers can fit in without increasing the tree size. At the end of CF tree building, small entries that cannot fit in are outliers.

Related Topics

TWOSTEP CLUSTER Algorithms
Notation (TwoStep clustering algorithms)
TwoStep Clustering Procedure (TwoStep clustering algorithms)
Pre-cluster
Cluster (TwoStep clustering algorithms)
Accuracy (TwoStep clustering algorithms)
Distance Measure (TwoStep clustering algorithms)
Log-Likelihood Distance (TwoStep clustering algorithms)
Euclidean Distance (TwoStep clustering algorithms)
Number of Clusters (auto-clustering) (TwoStep clustering algorithms)
Cluster Membership Assignment (TwoStep clustering algorithms)
Without Outlier-Handling (TwoStep clustering algorithms)
With Outlier-Handling (TwoStep clustering algorithms)
Log-Likelihood Distance (TwoStep clustering algorithms)
Euclidean Distance (TwoStep clustering algorithms)
Missing Values (TwoStep clustering algorithms)
References (TwoStep clustering algorithms)


Cluster (TwoStep clustering algorithms)

TwoStep clustering algorithms,TwoStep clustering algorithms,TwoStep clustering algorithms
clustering step,clustering step,clustering step

The cluster step takes sub-clusters (non-outlier sub-clusters if outlier handling is used) resulting from the pre-cluster step as input and then groups them into the desired number of clusters. Since the number of sub-clusters is much less than the number of original records, traditional clustering methods can be used effectively. TwoStep uses an agglomerative hierarchical clustering method, because it works well with the auto-cluster method (see the section on auto-clustering below).

hierarchical clustering,hierarchical clustering,hierarchical clustering
in TwoStep clustering algorithms,in TwoStep clustering algorithms,in TwoStep clustering algorithms

Hierarchical clustering refers to a process by which clusters are recursively merged, until at the end of the process only one cluster remains containing all records. The process starts by defining a starting cluster for each of the sub-clusters produced in the pre-cluster step. (See the topic Pre-cluster for more information. ) All clusters are then compared, and the pair of clusters with the smallest distance between them is selected and merged into a single cluster. After merging, the new set of clusters is compared, the closest pair is merged, and the process repeats until all clusters have been merged. (If you are familiar with the way a decision tree is built, this is a similar process, except in reverse.) Because the clusters are merged recursively in this way, it is easy to compare solutions with different numbers of clusters. To get a five-cluster solution, simply stop merging when there are five clusters left; to get a four-cluster solution, take the five-cluster solution and perform one more merge operation, and so on.

Related Topics

TWOSTEP CLUSTER Algorithms
Notation (TwoStep clustering algorithms)
TwoStep Clustering Procedure (TwoStep clustering algorithms)
Pre-cluster
Outlier Handling
Accuracy (TwoStep clustering algorithms)
Distance Measure (TwoStep clustering algorithms)
Log-Likelihood Distance (TwoStep clustering algorithms)
Euclidean Distance (TwoStep clustering algorithms)
Number of Clusters (auto-clustering) (TwoStep clustering algorithms)
Cluster Membership Assignment (TwoStep clustering algorithms)
Without Outlier-Handling (TwoStep clustering algorithms)
With Outlier-Handling (TwoStep clustering algorithms)
Log-Likelihood Distance (TwoStep clustering algorithms)
Euclidean Distance (TwoStep clustering algorithms)
Missing Values (TwoStep clustering algorithms)
References (TwoStep clustering algorithms)


Accuracy (TwoStep clustering algorithms)

In general, the larger the number of sub-clusters produced by the pre-cluster step, the more accurate the final result is. However, too many sub-clusters will slow down the clustering during the second step. The maximum number of sub-clusters should be carefully chosen so that it is large enough to produce accurate results and small enough not to slow down the second step clustering.

Related Topics

TWOSTEP CLUSTER Algorithms
Notation (TwoStep clustering algorithms)
TwoStep Clustering Procedure (TwoStep clustering algorithms)
Pre-cluster
Outlier Handling
Cluster (TwoStep clustering algorithms)
Distance Measure (TwoStep clustering algorithms)
Log-Likelihood Distance (TwoStep clustering algorithms)
Euclidean Distance (TwoStep clustering algorithms)
Number of Clusters (auto-clustering) (TwoStep clustering algorithms)
Cluster Membership Assignment (TwoStep clustering algorithms)
Without Outlier-Handling (TwoStep clustering algorithms)
With Outlier-Handling (TwoStep clustering algorithms)
Log-Likelihood Distance (TwoStep clustering algorithms)
Euclidean Distance (TwoStep clustering algorithms)
Missing Values (TwoStep clustering algorithms)
References (TwoStep clustering algorithms)


Distance Measure (TwoStep clustering algorithms)

TwoStep clustering algorithms,TwoStep clustering algorithms,TwoStep clustering algorithms
distance measure,distance measure,distance measure

A log-likelihood or Euclidean measure can be used to calculate the distance between clusters.

Related Topics

TWOSTEP CLUSTER Algorithms
Notation (TwoStep clustering algorithms)
TwoStep Clustering Procedure (TwoStep clustering algorithms)
Pre-cluster
Outlier Handling
Cluster (TwoStep clustering algorithms)
Accuracy (TwoStep clustering algorithms)
Log-Likelihood Distance (TwoStep clustering algorithms)
Euclidean Distance (TwoStep clustering algorithms)
Number of Clusters (auto-clustering) (TwoStep clustering algorithms)
Cluster Membership Assignment (TwoStep clustering algorithms)
Without Outlier-Handling (TwoStep clustering algorithms)
With Outlier-Handling (TwoStep clustering algorithms)
Log-Likelihood Distance (TwoStep clustering algorithms)
Euclidean Distance (TwoStep clustering algorithms)
Missing Values (TwoStep clustering algorithms)
References (TwoStep clustering algorithms)


Log-Likelihood Distance (TwoStep clustering algorithms)

The log-likelihood distance measure can handle both continuous and categorical variables. It is a probability based distance. The distance between two clusters is related to the decrease in log-likelihood as they are combined into one cluster. In calculating log-likelihood, normal distributions for continuous variables and multinomial distributions for categorical variables are assumed. It is also assumed that the variables are independent of each other, and so are the cases. The distance between clusters j and s is defined as:

d(i,j)=ξi+ξj−ξ<i,j>

where

ξv=−Nv(KAΣk=112log(
^
σ
2k+
^
σ
2vk)+KBΣk=1
^
E
vk)

and

^
E
vk=−LkΣl=1NvklNvlogNvklNv

If
^
σ
2k is ignored in the expression for ξv, the distance between clusters i and j would be exactly the decrease in log-likelihood when the two clusters are combined. The
^
σ
2k term is added to solve the problem caused by
^
σ
2vk=0, which would result in the natural logarithm being undefined. (This would occur, for example, when a cluster has only one case.)

Related Topics

TWOSTEP CLUSTER Algorithms
Notation (TwoStep clustering algorithms)
TwoStep Clustering Procedure (TwoStep clustering algorithms)
Pre-cluster
Outlier Handling
Cluster (TwoStep clustering algorithms)
Accuracy (TwoStep clustering algorithms)
Distance Measure (TwoStep clustering algorithms)
Euclidean Distance (TwoStep clustering algorithms)
Number of Clusters (auto-clustering) (TwoStep clustering algorithms)
Cluster Membership Assignment (TwoStep clustering algorithms)
Without Outlier-Handling (TwoStep clustering algorithms)
With Outlier-Handling (TwoStep clustering algorithms)
Log-Likelihood Distance (TwoStep clustering algorithms)
Euclidean Distance (TwoStep clustering algorithms)
Missing Values (TwoStep clustering algorithms)
References (TwoStep clustering algorithms)


Euclidean Distance (TwoStep clustering algorithms)

This distance measure can only be applied if all variables are continuous. The Euclidean distance between two points is clearly defined. The distance between two clusters is here defined by the Euclidean distance between the two cluster centers. A cluster center is defined as the vector of cluster means of each variable.

Related Topics

TWOSTEP CLUSTER Algorithms
Notation (TwoStep clustering algorithms)
TwoStep Clustering Procedure (TwoStep clustering algorithms)
Pre-cluster
Outlier Handling
Cluster (TwoStep clustering algorithms)
Accuracy (TwoStep clustering algorithms)
Distance Measure (TwoStep clustering algorithms)
Log-Likelihood Distance (TwoStep clustering algorithms)
Number of Clusters (auto-clustering) (TwoStep clustering algorithms)
Cluster Membership Assignment (TwoStep clustering algorithms)
Without Outlier-Handling (TwoStep clustering algorithms)
With Outlier-Handling (TwoStep clustering algorithms)
Log-Likelihood Distance (TwoStep clustering algorithms)
Euclidean Distance (TwoStep clustering algorithms)
Missing Values (TwoStep clustering algorithms)
References (TwoStep clustering algorithms)


Number of Clusters (auto-clustering) (TwoStep clustering algorithms)

TwoStep clustering algorithms,TwoStep clustering algorithms,TwoStep clustering algorithms
auto-clustering,auto-clustering,auto-clustering
auto-clustering,auto-clustering,auto-clustering
in TwoStep clustering algorithms,in TwoStep clustering algorithms,in TwoStep clustering algorithms
number of clusters,number of clusters,number of clusters
auto-selecting in TwoStep clustering algorithms,auto-selecting in TwoStep clustering algorithms,auto-selecting in TwoStep clustering algorithms
Bayes Information Criterion (BIC),Bayes Information Criterion (BIC),Bayes Information Criterion (BIC)
in TwoStep clustering algorithms,in TwoStep clustering algorithms,in TwoStep clustering algorithms

TwoStep can use the hierarchical clustering method in the second step to assess multiple cluster solutions and automatically determine the optimal number of clusters for the input data. A characteristic of hierarchical clustering is that it produces a sequence of partitions in one run: 1, 2, 3, … clusters. In contrast, a k-means algorithm would need to run multiple times (one for each specified number of clusters) in order to generate the sequence. To determine the number of clusters automatically, TwoStep uses a two-stage procedure that works well with the hierarchical clustering method. In the first stage, the BIC for each number of clusters within a specified range is calculated and used to find the initial estimate for the number of clusters. The BIC is computed as

BIC(J)=−2JΣj=1ξj+mJlog(N)

where

mJ=J{2KA+KBΣk=1(LK−1)}

and other terms defined as in Distance Measure (TwoStep clustering algorithms). The ratio of change in BIC at each successive merging relative to the first merging determines the initial estimate. Let dBIC(J) be the difference in BIC between the model with J clusters and that with (J + 1) clusters, dBIC(J)=BIC(J)−BIC(J+1). Then the change ratio for model J is

R1(J)=dBIC(J)dBIC(1)

If dBIC(1)<0, then the number of clusters is set to 1 (and the second stage is omitted). Otherwise, the initial estimate for number of clustersk is the smallest number for which R1(J)<0.04

In the second stage, the initial estimate is refined by finding the largest relative increase in distance between the two closest clusters in each hierarchical clustering stage. This is done as follows:

Starting with the model Ck indicated by the BIC criterion, take the ratio of minimum inter-cluster distance for that model and the next larger model Ck+1, that is, the previous model in the hierarchical clustering procedure,

R2(k)=dmin(Ck)dmin(Ck+1)

where Ck is the cluster model containing k clusters and dmin(C) is the minimum inter-cluster distance for cluster model C.

Now from model Ck-1, compute the same ratio with the following model Ck, as above. Repeat for each subsequent model until you have the ratio R2(2).

Compare the two largest R2 ratios; if the largest is more that 1.15 times the second largest, then select the model with the largest R2 ratio as the optimal number of clusters; otherwise, from those two models with the largest R2 values, select the one with the larger number of clusters as the optimal model.

Related Topics

TWOSTEP CLUSTER Algorithms
Notation (TwoStep clustering algorithms)
TwoStep Clustering Procedure (TwoStep clustering algorithms)
Pre-cluster
Outlier Handling
Cluster (TwoStep clustering algorithms)
Accuracy (TwoStep clustering algorithms)
Distance Measure (TwoStep clustering algorithms)
Log-Likelihood Distance (TwoStep clustering algorithms)
Euclidean Distance (TwoStep clustering algorithms)
Cluster Membership Assignment (TwoStep clustering algorithms)
Without Outlier-Handling (TwoStep clustering algorithms)
With Outlier-Handling (TwoStep clustering algorithms)
Log-Likelihood Distance (TwoStep clustering algorithms)
Euclidean Distance (TwoStep clustering algorithms)
Missing Values (TwoStep clustering algorithms)
References (TwoStep clustering algorithms)


Cluster Membership Assignment (TwoStep clustering algorithms)

TwoStep clustering algorithms,TwoStep clustering algorithms,TwoStep clustering algorithms
cluster assignment,cluster assignment,cluster assignment

Records are assigned to clusters based upon the specified outlier handling and distance measure options.

Related Topics

TWOSTEP CLUSTER Algorithms
Notation (TwoStep clustering algorithms)
TwoStep Clustering Procedure (TwoStep clustering algorithms)
Pre-cluster
Outlier Handling
Cluster (TwoStep clustering algorithms)
Accuracy (TwoStep clustering algorithms)
Distance Measure (TwoStep clustering algorithms)
Log-Likelihood Distance (TwoStep clustering algorithms)
Euclidean Distance (TwoStep clustering algorithms)
Number of Clusters (auto-clustering) (TwoStep clustering algorithms)
Without Outlier-Handling (TwoStep clustering algorithms)
With Outlier-Handling (TwoStep clustering algorithms)
Log-Likelihood Distance (TwoStep clustering algorithms)
Euclidean Distance (TwoStep clustering algorithms)
Missing Values (TwoStep clustering algorithms)
References (TwoStep clustering algorithms)


Without Outlier-Handling (TwoStep clustering algorithms)

Assign a record to the closest cluster according to the distance measure.

Related Topics

TWOSTEP CLUSTER Algorithms
Notation (TwoStep clustering algorithms)
TwoStep Clustering Procedure (TwoStep clustering algorithms)
Pre-cluster
Outlier Handling
Cluster (TwoStep clustering algorithms)
Accuracy (TwoStep clustering algorithms)
Distance Measure (TwoStep clustering algorithms)
Log-Likelihood Distance (TwoStep clustering algorithms)
Euclidean Distance (TwoStep clustering algorithms)
Number of Clusters (auto-clustering) (TwoStep clustering algorithms)
Cluster Membership Assignment (TwoStep clustering algorithms)
With Outlier-Handling (TwoStep clustering algorithms)
Log-Likelihood Distance (TwoStep clustering algorithms)
Euclidean Distance (TwoStep clustering algorithms)
Missing Values (TwoStep clustering algorithms)
References (TwoStep clustering algorithms)


With Outlier-Handling (TwoStep clustering algorithms)

With outlier handling, records are assigned depending upon the distance measure specified.

Related Topics

TWOSTEP CLUSTER Algorithms
Notation (TwoStep clustering algorithms)
TwoStep Clustering Procedure (TwoStep clustering algorithms)
Pre-cluster
Outlier Handling
Cluster (TwoStep clustering algorithms)
Accuracy (TwoStep clustering algorithms)
Distance Measure (TwoStep clustering algorithms)
Log-Likelihood Distance (TwoStep clustering algorithms)
Euclidean Distance (TwoStep clustering algorithms)
Number of Clusters (auto-clustering) (TwoStep clustering algorithms)
Cluster Membership Assignment (TwoStep clustering algorithms)
Without Outlier-Handling (TwoStep clustering algorithms)
Log-Likelihood Distance (TwoStep clustering algorithms)
Euclidean Distance (TwoStep clustering algorithms)
Missing Values (TwoStep clustering algorithms)
References (TwoStep clustering algorithms)


Log-Likelihood Distance (TwoStep clustering algorithms)

Assume outliers or noises follow a uniform distribution. Calculate both the log-likelihood resulting from assigning a record to a noise cluster and that resulting from assigning it to the closest non-noise cluster. The record is then assigned to the cluster which leads to the larger log-likelihood. This is equivalent to assigning a record to its closest non-noise cluster if the distance between them is smaller than a critical value C=log(V), where V=∏mRm∏mLm. Otherwise, designate it as an outlier.

Related Topics

TWOSTEP CLUSTER Algorithms
Notation (TwoStep clustering algorithms)
TwoStep Clustering Procedure (TwoStep clustering algorithms)
Pre-cluster
Outlier Handling
Cluster (TwoStep clustering algorithms)
Accuracy (TwoStep clustering algorithms)
Distance Measure (TwoStep clustering algorithms)
Log-Likelihood Distance (TwoStep clustering algorithms)
Euclidean Distance (TwoStep clustering algorithms)
Number of Clusters (auto-clustering) (TwoStep clustering algorithms)
Cluster Membership Assignment (TwoStep clustering algorithms)
Without Outlier-Handling (TwoStep clustering algorithms)
With Outlier-Handling (TwoStep clustering algorithms)
Euclidean Distance (TwoStep clustering algorithms)
Missing Values (TwoStep clustering algorithms)
References (TwoStep clustering algorithms)


Euclidean Distance (TwoStep clustering algorithms)

Assign a record to its closest non-noise cluster if the Euclidean distance between them is smaller than a critical value C=2
√ 1JKAJΣj=1KAΣk=1
^
σ
2jk
. Otherwise, designate it as an outlier.

Related Topics

TWOSTEP CLUSTER Algorithms
Notation (TwoStep clustering algorithms)
TwoStep Clustering Procedure (TwoStep clustering algorithms)
Pre-cluster
Outlier Handling
Cluster (TwoStep clustering algorithms)
Accuracy (TwoStep clustering algorithms)
Distance Measure (TwoStep clustering algorithms)
Log-Likelihood Distance (TwoStep clustering algorithms)
Euclidean Distance (TwoStep clustering algorithms)
Number of Clusters (auto-clustering) (TwoStep clustering algorithms)
Cluster Membership Assignment (TwoStep clustering algorithms)
Without Outlier-Handling (TwoStep clustering algorithms)
With Outlier-Handling (TwoStep clustering algorithms)
Log-Likelihood Distance (TwoStep clustering algorithms)
Missing Values (TwoStep clustering algorithms)
References (TwoStep clustering algorithms)


Missing Values (TwoStep clustering algorithms)

TwoStep clustering algorithms,TwoStep clustering algorithms,TwoStep clustering algorithms
missing values,missing values,missing values

No missing values are allowed. Cases with missing values are deleted on a listwise basis.

Related Topics

TWOSTEP CLUSTER Algorithms
Notation (TwoStep clustering algorithms)
TwoStep Clustering Procedure (TwoStep clustering algorithms)
Pre-cluster
Outlier Handling
Cluster (TwoStep clustering algorithms)
Accuracy (TwoStep clustering algorithms)
Distance Measure (TwoStep clustering algorithms)
Log-Likelihood Distance (TwoStep clustering algorithms)
Euclidean Distance (TwoStep clustering algorithms)
Number of Clusters (auto-clustering) (TwoStep clustering algorithms)
Cluster Membership Assignment (TwoStep clustering algorithms)
Without Outlier-Handling (TwoStep clustering algorithms)
With Outlier-Handling (TwoStep clustering algorithms)
Log-Likelihood Distance (TwoStep clustering algorithms)
Euclidean Distance (TwoStep clustering algorithms)
References (TwoStep clustering algorithms)


References (TwoStep clustering algorithms)

Zhang, T., R. Ramakrishnon, and M. Livny. 1996. BIRCH: An efficient data clustering method for very large databases. In: Proceedings of the ACM SIGMOD Conference on Management of Data. Montreal, Canada: ACM.

Chiu, T., D. Fang, J. Chen, Y. Wang, and C. Jeris. 2001. A Robust and Scalable Clustering Algorithm for Mixed Type Attributes in Large Database Environment. In: Proceedings of the seventh ACM SIGKDD international conference on knowledge discovery and data mining. San Francisco, CA: ACM.

Related Topics

TWOSTEP CLUSTER Algorithms
Notation (TwoStep clustering algorithms)
TwoStep Clustering Procedure (TwoStep clustering algorithms)
Pre-cluster
Outlier Handling
Cluster (TwoStep clustering algorithms)
Accuracy (TwoStep clustering algorithms)
Distance Measure (TwoStep clustering algorithms)
Log-Likelihood Distance (TwoStep clustering algorithms)
Euclidean Distance (TwoStep clustering algorithms)
Number of Clusters (auto-clustering) (TwoStep clustering algorithms)
Cluster Membership Assignment (TwoStep clustering algorithms)
Without Outlier-Handling (TwoStep clustering algorithms)
With Outlier-Handling (TwoStep clustering algorithms)
Log-Likelihood Distance (TwoStep clustering algorithms)
Euclidean Distance (TwoStep clustering algorithms)
Missing Values (TwoStep clustering algorithms)


VARCOMP Algorithms

VARCOMP (command),VARCOMP (command),VARCOMP (command)
algorithms,algorithms,algorithms
Variance Components,Variance Components,Variance Components
algorithms,algorithms,algorithms
variance components algorithms,variance components algorithms,variance components algorithms

The Variance Components procedure provides estimates for variances of random effects under a general linear model framework. Four types of estimation methods are available in this procedure.

Related Topics

Notation (variance components algorithms)
Weights (variance components algorithms)
Model (variance components algorithms)
Minimum Norm Quadratic Unbiased Estimate (MINQUE) (variance components algorithms)
Maximum Likelihood Estimate (MLE) (variance components algorithms)
Restricted Maximum Likelihood Estimate (REML) (variance components algorithms)
ANOVA (variance components algorithms)
References (variance components algorithms)


Notation (variance components algorithms)

variance components algorithms,variance components algorithms,variance components algorithms
notation,notation,notation

The following notation is used throughout this chapter. Unless otherwise stated, all vectors are column vectors and all quantities are known.

n | Number of observations, n≥1
k | Number of random effects, k≥0
m0 | Number of parameters in the fixed effects, m0≥0
mi | Number of parameters in the ith random effect, mi≥0, i=1,...,k
m | Total number of parameters, m=m0+m1+ ... +mk
σ2i | Unknown variance of the ith random effect, σ2i≥0, i=1,...,k
σ2e | Unknown variance of the residual term, same as σ2k+1, σ2e>0
γ2i | Unknown variance ratio of the ith random effect, γ2i=σ2i/σ2e, γ2i≥0, i=1,...,k, and γ2k+1=1
y | The length n vector of observations
e | The length n vector of residuals
Xi | The n×mi design matrix, i=0,1,...,k
β0 | The length m0 vector of parameters of the fixed effects
βi | The length mi vector of parameters of the ith random effect, i=1,...,k

Unless otherwise stated, a p×p identity matrix is denoted as Ip, a p×q zero matrix is denoted as 0p×q, and a zero vector of length p is denoted as 0p.

Related Topics

VARCOMP Algorithms
Weights (variance components algorithms)
Model (variance components algorithms)
Minimum Norm Quadratic Unbiased Estimate (MINQUE) (variance components algorithms)
Maximum Likelihood Estimate (MLE) (variance components algorithms)
Restricted Maximum Likelihood Estimate (REML) (variance components algorithms)
ANOVA (variance components algorithms)
References (variance components algorithms)


Weights (variance components algorithms)

variance components algorithms,variance components algorithms,variance components algorithms
weights,weights,weights

For the sake of clarity and simplicity, the algorithms described in this chapter assume unit frequency weight and unit regression weight for all cases. Weights can be applied as described in the following two sections.

Related Topics

VARCOMP Algorithms
Notation (variance components algorithms)
Model (variance components algorithms)
Minimum Norm Quadratic Unbiased Estimate (MINQUE) (variance components algorithms)
Maximum Likelihood Estimate (MLE) (variance components algorithms)
Restricted Maximum Likelihood Estimate (REML) (variance components algorithms)
ANOVA (variance components algorithms)
References (variance components algorithms)
Frequency Weight (variance components algorithms)
Regression Weight (variance components algorithms)


Frequency Weight (variance components algorithms)

The WEIGHT command specifies frequency weights.

• Cases with nonpositive frequency are excluded from all calculations in the procedure.

• Non-integral frequency weight is rounded to the nearest integer.

• The total sample size is equal to the sum of positive rounded frequency weights.

Related Topics

Weights (variance components algorithms)
Regression Weight (variance components algorithms)


Regression Weight (variance components algorithms)

The REGWGT subcommand specifies regression weights. Suppose the lth case has a regression weight wi>0 (cases with nonpositive regression weights are excluded from all calculations in the procedure). Let W=diag(w1,...,wn) be the n×n diagonal weight matrix. Then the VARCOMP procedure will perform all calculations as if y is physically transformed to W12y and Xi to W12Xi, i=0,1,...,k; and then the pertinent algorithm is applied to the transformed data.

Related Topics

Weights (variance components algorithms)
Frequency Weight (variance components algorithms)


Model (variance components algorithms)

variance components algorithms,variance components algorithms,variance components algorithms
model,model,model

The mixed model is represented, following Rao (1973), as

y=X0β0+kΣi=1Xiβi+e

The random vectors β1,...,βk and e are assumed to be jointly independent. Moreover, the random vector βi is distributed as Nmi(0,σ2iImi) for i=1,...,k and the residual vector e is distributed as Nn(0,σ2eIn). It follows from these assumptions that y is distributed as Nn(X0 b 0,σ2eV) where

V=kΣi=1γ2iXiX´i+In=k+1Σi=1γ2iVi

where Vi=XiX´i, i=1,...,k, and Vi=In.

Related Topics

VARCOMP Algorithms
Notation (variance components algorithms)
Weights (variance components algorithms)
Minimum Norm Quadratic Unbiased Estimate (MINQUE) (variance components algorithms)
Maximum Likelihood Estimate (MLE) (variance components algorithms)
Restricted Maximum Likelihood Estimate (REML) (variance components algorithms)
ANOVA (variance components algorithms)
References (variance components algorithms)


Minimum Norm Quadratic Unbiased Estimate (MINQUE) (variance components algorithms)

variance components algorithms,variance components algorithms,variance components algorithms
MINQUE,MINQUE,MINQUE

Given the initial guess or the prior values γ2i=αi(αi≥0), i=1,...,k+1, the MINQUE of σ are obtained as a solution of the linear system of equations:

Sσ=q

where S={sij} is a (k+1)×(k+1) symmetric matrix, q={qi} is a (k+1) vector, and σ=(σ21,...,σ2k+1). Define

R=V−1−V−1X0(X´0V−1X0)−X´0V−1

The elements of S and q are

sij={
SSQ(X´iRXj) | i=1,...,k, | j=1,...,k
SSQ(X´iR) | i=1,...,k, | j=k+1
SSQ(RXj) | i=k+1, | j=1,...,k
SSQ(R) | i=k+1, | j=k+1

and

qi={
SSQ(X´iRy) | i=1,...,k
SSQ(Ry) | i=k+1

where SSQ(A) is the sum of squares of all elements of a matrix A.

Related Topics

VARCOMP Algorithms
Notation (variance components algorithms)
Weights (variance components algorithms)
Model (variance components algorithms)
Maximum Likelihood Estimate (MLE) (variance components algorithms)
Restricted Maximum Likelihood Estimate (REML) (variance components algorithms)
ANOVA (variance components algorithms)
References (variance components algorithms)
MINQUE(0) (variance components algorithms)
MINQUE(1) (variance components algorithms)


MINQUE(0) (variance components algorithms)

The prior values are αi=0, i=1,...,k, and αk+1=1. Under this set of prior values, V=In and R=In−X0(X´0X0)−X´0. Since this R is an idempotent matrix, some of the elements of S and q can be simplified to

si,k+1=trace(X´iRXi) | i=1,...,k;
sk+1,j=trace(X´jRXj) | j=1,...,k;
sk+1,k+1=n−rank(X0)
qk+1=y´Ry

Using the algorithm by Goodnight (1978), the elements of S and q are obtained without explicitly computing R. The steps are described as follows:

Step 1. Form the symmetric matrix:

[
X´0X0 X´0X1 ... X´0Xk X´0y
X´1X0 X´1X1 ... X´1Xk X´1y
·
·
·
·
·
·
·
·
·
·
·
·
X´kX0 X´kX1 ... X´kXk X´ky
y´X0 y´X1 ... y´Xk y´y
]

Step 2. Sweep the above matrix by pivoting on each diagonal of X´0X0. This produces the following matrix:

[
G GX´0X1 ... GX´0Xk GX´0y
X´1X0G X´1RX1 ... X´1RXk X´1Ry
·
·
·
·
·
·
·
·
·
·
·
·
X´kX0G X´kRX1 ... X´kRXk X´kRy
y´X0G y´RX1 ... y´RXk y´Ry
]

where G=(X´0X0)−. In the process of computing the above matrix, the rank of X0 is obtained as the number of nonzero pivots found.

Step 3. Form S and q. The MINQUE(0) of σ are
^
σ
=S−q.

Related Topics

Minimum Norm Quadratic Unbiased Estimate (MINQUE) (variance components algorithms)
MINQUE(1) (variance components algorithms)


MINQUE(1) (variance components algorithms)

The prior values are αi=1, i=1,...,k+1. Under this set of prior values, V=k+1Σi=1X´iXi. Using Giesbrecht (1983), the matrix S and the vector q are obtained through an iterative procedure. The steps are described as follows:

Step 1. Construct the augmented matrix A=[X0| X1| ... | Xk| y]. Then compute the (m+1)×(m+1) matrix T(k+1)=A´A.

Step 2. Define H(l)=k+1Σi=lX´iXi, and T(l)=A´H−1(l)A, l=1,...,k. Update T(l+1) to T(l) using the W Transform given in Goodnight and Hemmerle (1979). The updating formula is

T(l)=T(l+1)−A´H−1(l+1)Xl(Iml+X´lH−1(l+1)Xl)−X´lH−1(l+1)A

Step 3. Once T(1)=A´H−1(1)A=A´V−1A is obtained, apply the Sweep operation to the diagonal elements of upper left m0×m0 submatrix of T(1). The resulting matrix will contain the quadratic form y´Ry, the vectors y´RXj, j=1,...,k, and the matrices X´iRXj, i, j=1,...,k .

Step 4. Compute the elements of S and q. Since RVR=R, then

SSQ(RXj)=tr(X´jRXj)−kΣi=1SSQ(X´jRXi) j=1,...,k
SSQ(R)=n−rank(X0)−kΣi=1tr(X´iRXi)−kΣj=1SSQ(RXj)
SSQ(Ry)=y´Ry−kΣj=1SSQ(y´RXj)

The MINQUE(1) of σ are
^
σ
=S−q.

Related Topics

Minimum Norm Quadratic Unbiased Estimate (MINQUE) (variance components algorithms)
MINQUE(0) (variance components algorithms)


Maximum Likelihood Estimate (MLE) (variance components algorithms)

variance components algorithms,variance components algorithms,variance components algorithms
maximum likelihood estimates,maximum likelihood estimates,maximum likelihood estimates

The maximum likelihood estimates are obtained using the algorithm by Jennrich and Sampson (1976). The algorithm is an iterative procedure that combines Newton-Raphson steps and Fisher scoring steps.

Related Topics

VARCOMP Algorithms
Notation (variance components algorithms)
Weights (variance components algorithms)
Model (variance components algorithms)
Minimum Norm Quadratic Unbiased Estimate (MINQUE) (variance components algorithms)
Restricted Maximum Likelihood Estimate (REML) (variance components algorithms)
ANOVA (variance components algorithms)
References (variance components algorithms)
Parameters (variance components algorithms)
Likelihood Function (variance components algorithms)
Gradient Vector (variance components algorithms)
Hessian Matrix (variance components algorithms)
Fisher Information Matrix (variance components algorithms)
Iteration Procedure (variance components algorithms)
Initial Values (variance components algorithms)
Updating (variance components algorithms)
Choice of Step (variance components algorithms)
Convergence Criteria (variance components algorithms)
Negative Variance Estimates (variance components algorithms)
Covariance Matrix (variance components algorithms)


Parameters (variance components algorithms)

The parameter vector is θ=[
β0
γ2
σ2e
] where γ2=[
γ21
·
·
·
γ2k
].

Related Topics

Maximum Likelihood Estimate (MLE) (variance components algorithms)
Likelihood Function (variance components algorithms)
Gradient Vector (variance components algorithms)
Hessian Matrix (variance components algorithms)
Fisher Information Matrix (variance components algorithms)
Iteration Procedure (variance components algorithms)
Initial Values (variance components algorithms)
Updating (variance components algorithms)
Choice of Step (variance components algorithms)
Convergence Criteria (variance components algorithms)
Negative Variance Estimates (variance components algorithms)
Covariance Matrix (variance components algorithms)


Likelihood Function (variance components algorithms)

The likelihood function is

L≡L(θ)=(2π)−n/2|σ2eV|−1/2exp(−12(y−X0β0)´V−1(y−X0β0)/σ2e).

The log-likelihood function is

l=logL=−n2log(2π)−n2log(σ2e)−12log|V|−12σ2e(y−X0β0)´V−1(y−X0β0).

Related Topics

Maximum Likelihood Estimate (MLE) (variance components algorithms)
Parameters (variance components algorithms)
Gradient Vector (variance components algorithms)
Hessian Matrix (variance components algorithms)
Fisher Information Matrix (variance components algorithms)
Iteration Procedure (variance components algorithms)
Initial Values (variance components algorithms)
Updating (variance components algorithms)
Choice of Step (variance components algorithms)
Convergence Criteria (variance components algorithms)
Negative Variance Estimates (variance components algorithms)
Covariance Matrix (variance components algorithms)


Gradient Vector (variance components algorithms)

∂ l∂ β0=1σ2eX´0V−1r,
∂ l∂ γ2i=12σ2er´V−1XiX´iV−1r−12tr(X´iV−1Xi), i=1,...,k
,
∂ l∂ σ2e=12σ4er´V−1r−n2σ2e.

where r=y−X0β0. The gradient vector is

dldθ=[
∂ l∂ β0
∂ l∂ γ2
∂ l∂ σ2e
]

Related Topics

Maximum Likelihood Estimate (MLE) (variance components algorithms)
Parameters (variance components algorithms)
Likelihood Function (variance components algorithms)
Hessian Matrix (variance components algorithms)
Fisher Information Matrix (variance components algorithms)
Iteration Procedure (variance components algorithms)
Initial Values (variance components algorithms)
Updating (variance components algorithms)
Choice of Step (variance components algorithms)
Convergence Criteria (variance components algorithms)
Negative Variance Estimates (variance components algorithms)
Covariance Matrix (variance components algorithms)


Hessian Matrix (variance components algorithms)

∂2l∂β0∂β0=−1σ2eX´0V−1X0

∂2l∂γ2i∂β0=−1σ2er´V−1XiX´iV−1X0   i=1,...,k
,
∂2 l∂ γ2i∂ γ2j=12tr(X´iV−1XjX´jV−1Xi)
−1σ2er´V−1XiX´iV−1XjX´jV−1r   i=1,...,k;j=1,...,k
,

∂2 l∂ σ2e∂ β0=−1σ4er´V−1X0
∂2 l∂ σ2e∂ γ2j=−12σ4er´V−1XjX´jV−1r   j=1,...,k
∂2 l∂ σ2e∂ σ2e=n2σ4e−1σ6er´V−1r

The Hessian matrix is

d2ldθdθ=[
∂2 l∂ β0∂ β0 | ∂2l∂β0∂γ2 | ∂2l∂β0∂σ2e
∂2l∂γ2∂β0 | ∂2l∂γ2∂γ2 | ∂2l∂γ2∂σ2e
∂2 l∂σ2e∂β0 | ∂2l∂σ2e∂γ2 | ∂2 l∂ σ2e∂ σ2e
]

where

∂2l∂γ2∂β0=[
∂2l∂γ21∂β0
·
·
·
∂2l∂γ2k∂β0
],

∂2l∂γ2∂γ2=[
∂2l∂γ21∂γ21 ... ∂2l∂γ21∂γ2k
·
·
·
·
·
·
·
·
·
∂2l∂γ2k∂γ21 ... ∂2l∂γ2k∂γ2k
]

and

∂2l∂σ2e∂γ2=[
∂2l∂σ2e∂γ21
·
·
·
∂2l∂σ2e∂γ2k
]

Related Topics

Maximum Likelihood Estimate (MLE) (variance components algorithms)
Parameters (variance components algorithms)
Likelihood Function (variance components algorithms)
Gradient Vector (variance components algorithms)
Fisher Information Matrix (variance components algorithms)
Iteration Procedure (variance components algorithms)
Initial Values (variance components algorithms)
Updating (variance components algorithms)
Choice of Step (variance components algorithms)
Convergence Criteria (variance components algorithms)
Negative Variance Estimates (variance components algorithms)
Covariance Matrix (variance components algorithms)


Fisher Information Matrix (variance components algorithms)

As E(r)=0n and E(r´V−1r)=nσ2e, the expected second derivatives are

E(∂2l∂β0∂β0)=−1σ2eX´0V−1X0

E(∂2l∂γ2i∂β0)=0´m0   i=1,...,k
E(∂2l∂γ2i∂γ2j)=−12tr(X´iV−1XjX´jV−1Xi)   i=1,...,k,j=1,...,k

E(∂2l∂σ2e∂β0)=0´m0
E(∂2l∂σ2e∂γ2j)=−12σ2etr(X´jV−1Xj) j=1,...,k
,
E(∂2l∂σ2e∂σ2e)=−n2σ4e

The Fisher Information matrix is

E(d2ldθdθ)=[
∂2l∂β0∂β0 | 0m0×(m−m0) | 0m0
0(m−m0)×m0 | E(∂2l∂γ2∂γ2) | E(∂2l∂γ2∂σ2e)
0´m0 | E(∂2l∂σ2e∂γ2) | E(∂2l∂σ2e∂σ2e)
]

where

E(∂2l∂γ2∂γ2)=[
E(∂2l∂γ21∂γ21) ... E(∂2l∂γ21∂γ2k)
·
·
·
·
·
·
·
·
·
E(∂2l∂γ2k∂γ21) ... E(∂2l∂γ2k∂γ2k)
]

and

E(∂2l∂σ2e∂ γ2)=[
E(∂2l∂σ2e∂γ21)
·
·
·
E(∂2l∂σ2e∂γ2k)
]

Related Topics

Maximum Likelihood Estimate (MLE) (variance components algorithms)
Parameters (variance components algorithms)
Likelihood Function (variance components algorithms)
Gradient Vector (variance components algorithms)
Hessian Matrix (variance components algorithms)
Iteration Procedure (variance components algorithms)
Initial Values (variance components algorithms)
Updating (variance components algorithms)
Choice of Step (variance components algorithms)
Convergence Criteria (variance components algorithms)
Negative Variance Estimates (variance components algorithms)
Covariance Matrix (variance components algorithms)


Iteration Procedure (variance components algorithms)

The iterative estimation algorithm proceeds according to the details in the following sections.

Related Topics

Maximum Likelihood Estimate (MLE) (variance components algorithms)
Parameters (variance components algorithms)
Likelihood Function (variance components algorithms)
Gradient Vector (variance components algorithms)
Hessian Matrix (variance components algorithms)
Fisher Information Matrix (variance components algorithms)
Initial Values (variance components algorithms)
Updating (variance components algorithms)
Choice of Step (variance components algorithms)
Convergence Criteria (variance components algorithms)
Negative Variance Estimates (variance components algorithms)
Covariance Matrix (variance components algorithms)


Initial Values (variance components algorithms)

• Fixed Effect Parameters:
^
β
0=(X´0X0)−X´0y.

• Random Effect Variance Components: For the ith random effect, compute
^
β
i=(X´iXi)−X´iy. Then assign the variance of the mi elements of
^
β
i using divisor (mi−1) to the estimate
^
σ
2i if mi≥2; otherwise
^
σ
2i=0.

• Residual Variance:
^
σ
2e=r´r/n where X=[X0| X1| ... | Xk] and r=y−(X´X)−X´y. If
^
σ
2e=0 but k≥1 then reset
^
σ
2e=10−8 so that the iteration can continue.

The variance ratios are then computed as
^
γ
2i=
^
σ
2i/
^
σ
2e. Following the same method in which the residual variance is initialized,
^
σ
2e>0 for k≥1.

Related Topics

Maximum Likelihood Estimate (MLE) (variance components algorithms)
Parameters (variance components algorithms)
Likelihood Function (variance components algorithms)
Gradient Vector (variance components algorithms)
Hessian Matrix (variance components algorithms)
Fisher Information Matrix (variance components algorithms)
Iteration Procedure (variance components algorithms)
Updating (variance components algorithms)
Choice of Step (variance components algorithms)
Convergence Criteria (variance components algorithms)
Negative Variance Estimates (variance components algorithms)
Covariance Matrix (variance components algorithms)


Updating (variance components algorithms)

At the sth iteration, s=0,1,..., the parameter vector is updated as

^
θ
(s+1)=
^
θ
s+ρΔ
^
θ
s

where Δ
^
θ
s is the value of increment Δθ evaluated at θ=
^
θ
s, and ρ>0 is a step size such that l(
^
θ
(s+1))>l(
^
θ
s). The increment vector depends on the choice of step type—Newton-Raphson versus Fisher scoring. The step size is determined by the step-halving technique with ρ=1 initially and a maximum of 10 halvings.

Related Topics

Maximum Likelihood Estimate (MLE) (variance components algorithms)
Parameters (variance components algorithms)
Likelihood Function (variance components algorithms)
Gradient Vector (variance components algorithms)
Hessian Matrix (variance components algorithms)
Fisher Information Matrix (variance components algorithms)
Iteration Procedure (variance components algorithms)
Initial Values (variance components algorithms)
Choice of Step (variance components algorithms)
Convergence Criteria (variance components algorithms)
Negative Variance Estimates (variance components algorithms)
Covariance Matrix (variance components algorithms)


Choice of Step (variance components algorithms)

Following Jennrich and Sampson (1976), the first iteration is always the Fisher scoring step because it is more robust to poor initial values. For subsequent iteration the Newton-Raphson step is used if:

1. The Hessian matrix is nonnegative definite, and

2. The increment in the log-likelihood function of step 1 is less than or equal to one.

Otherwise the Fisher scoring step is used. The increment vector for each type of step is:

• Newton-Raphson Step: Δθ=(−d2ldθdθ)−1dldθ.

• Fisher Scoring Step: Δθ=(−E(d2ldθdθ))−1dldθ.

Related Topics

Maximum Likelihood Estimate (MLE) (variance components algorithms)
Parameters (variance components algorithms)
Likelihood Function (variance components algorithms)
Gradient Vector (variance components algorithms)
Hessian Matrix (variance components algorithms)
Fisher Information Matrix (variance components algorithms)
Iteration Procedure (variance components algorithms)
Initial Values (variance components algorithms)
Updating (variance components algorithms)
Convergence Criteria (variance components algorithms)
Negative Variance Estimates (variance components algorithms)
Covariance Matrix (variance components algorithms)


Convergence Criteria (variance components algorithms)

Given the convergence criterion ε>0, the iteration is considered converged when the following criteria are satisfied:

1. |l(
^
θ
(s+1))−l(
^
θ
s)|<ε×max(1,|
^
θ
s|) , and

2. <l(
^
θ
(s+1))−l(
^
θ
s)><ε×max(1,<
^
θ
s>) where <a> is the sum of absolute values of elements of the vector a.

Related Topics

Maximum Likelihood Estimate (MLE) (variance components algorithms)
Parameters (variance components algorithms)
Likelihood Function (variance components algorithms)
Gradient Vector (variance components algorithms)
Hessian Matrix (variance components algorithms)
Fisher Information Matrix (variance components algorithms)
Iteration Procedure (variance components algorithms)
Initial Values (variance components algorithms)
Updating (variance components algorithms)
Choice of Step (variance components algorithms)
Negative Variance Estimates (variance components algorithms)
Covariance Matrix (variance components algorithms)


Negative Variance Estimates (variance components algorithms)

Negative variance estimates can occur at the end of an iteration. An ad hoc method is to set those estimates to zero before the next iteration.

Related Topics

Maximum Likelihood Estimate (MLE) (variance components algorithms)
Parameters (variance components algorithms)
Likelihood Function (variance components algorithms)
Gradient Vector (variance components algorithms)
Hessian Matrix (variance components algorithms)
Fisher Information Matrix (variance components algorithms)
Iteration Procedure (variance components algorithms)
Initial Values (variance components algorithms)
Updating (variance components algorithms)
Choice of Step (variance components algorithms)
Convergence Criteria (variance components algorithms)
Covariance Matrix (variance components algorithms)


Covariance Matrix (variance components algorithms)

Let
^
θ
be the vector of maximum likelihood estimates. Their covariance matrix is given by

cov(
^
θ
)=(−E(d2ldθdθ)|θ=
^
θ
)−1

Let

Ψ=[
β0
σ21
·
·
·
σ2k
σ2e
]

be the original parameters. Their maximum likelihood estimates are given by

^
Ψ
=[
^
β
0
^
σ
2e
^
γ
21
·
·
·
^
σ
2e
^
γ
2k
^
σ
2e
]

and their covariance matrix is estimated by

cov(
^
Ψ
)=Jcov(
^
θ
)J´

where

J=[
Im0 | 0m0×k | 0m0
0k×m0 | σ2eIk | γ
0 | 0 | 1
]

which is the (m0+k+1)×(m0+k+1) Jacobian matrix of transforming θ to ψ.

Related Topics

Maximum Likelihood Estimate (MLE) (variance components algorithms)
Parameters (variance components algorithms)
Likelihood Function (variance components algorithms)
Gradient Vector (variance components algorithms)
Hessian Matrix (variance components algorithms)
Fisher Information Matrix (variance components algorithms)
Iteration Procedure (variance components algorithms)
Initial Values (variance components algorithms)
Updating (variance components algorithms)
Choice of Step (variance components algorithms)
Convergence Criteria (variance components algorithms)
Negative Variance Estimates (variance components algorithms)


Restricted Maximum Likelihood Estimate (REML) (variance components algorithms)

variance components algorithms,variance components algorithms,variance components algorithms
restricted maximum likelihood estimates,restricted maximum likelihood estimates,restricted maximum likelihood estimates

The restricted maximum likelihood method finds a linear transformation on y such that the resulting vector does not involve the fixed effect parameter vector b 0 regardless of their values. It has been shown that these linear combinations are the residuals obtained after a linear regression on the fixed effects. Suppose r is the rank of X0; then there are at most n−r linearly independent combinations. Let K be an n×(n−r) matrix whose columns are these linearly independent combinations. Then the properties of K are (Searle et al., 1992, Chapter 6):

K´X0=0(n−r)×m0
K´=TM

where T is a (n−r)×n matrix with linearly independent rows and

M=In−X0(X´0X0)−X´0

It can be shown that REML estimation is invariant to K (Searle et al., 1992, Chapter 6); thus, we can choose K such that K´K=In−r to simplify calculations. It follows that the distribution of K´y is Nn−r(0,σ2eK´VK).

Related Topics

VARCOMP Algorithms
Notation (variance components algorithms)
Weights (variance components algorithms)
Model (variance components algorithms)
Minimum Norm Quadratic Unbiased Estimate (MINQUE) (variance components algorithms)
Maximum Likelihood Estimate (MLE) (variance components algorithms)
ANOVA (variance components algorithms)
References (variance components algorithms)
Parameters (variance components algorithms)
Likelihood Function (variance components algorithms)
Gradient Vector (variance components algorithms)
Hessian Matrix (variance components algorithms)
Fisher Information Matrix (variance components algorithms)
Iteration Procedure (variance components algorithms)
Initial Values (variance components algorithms)
Updating (variance components algorithms)
Choice of Step (variance components algorithms)
Convergence Criteria (variance components algorithms)
Negative Variance Estimates (variance components algorithms)
Covariance Matrix (variance components algorithms)


Parameters (variance components algorithms)

The parameter vector is θ=[
γ2
σ2e
] where γ2=[
γ21
·
·
·
γ2k
].

Related Topics

Restricted Maximum Likelihood Estimate (REML) (variance components algorithms)
Likelihood Function (variance components algorithms)
Gradient Vector (variance components algorithms)
Hessian Matrix (variance components algorithms)
Fisher Information Matrix (variance components algorithms)
Iteration Procedure (variance components algorithms)
Initial Values (variance components algorithms)
Updating (variance components algorithms)
Choice of Step (variance components algorithms)
Convergence Criteria (variance components algorithms)
Negative Variance Estimates (variance components algorithms)
Covariance Matrix (variance components algorithms)


Likelihood Function (variance components algorithms)

The likelihood function of K´y is

L≡L(θ)=(2π)−(n−r)/2|σ2eK´VK|−1/2exp(−12y´K(K´VK)−1K´y/σ2e).

It can be shown (Searle et al., 1992) that

R≡V−1−V−1X0(X´0V−1X0)−X´0V−1=K(K´VK)−1K´

Thus, the log-likelihood function is

l=logL=−n−r2log(2π)−n−r2log(σ2e)−12log|K´VK|−12σ2ey´Ry.

Related Topics

Restricted Maximum Likelihood Estimate (REML) (variance components algorithms)
Parameters (variance components algorithms)
Gradient Vector (variance components algorithms)
Hessian Matrix (variance components algorithms)
Fisher Information Matrix (variance components algorithms)
Iteration Procedure (variance components algorithms)
Initial Values (variance components algorithms)
Updating (variance components algorithms)
Choice of Step (variance components algorithms)
Convergence Criteria (variance components algorithms)
Negative Variance Estimates (variance components algorithms)
Covariance Matrix (variance components algorithms)


Gradient Vector (variance components algorithms)

∂ l∂ γ2i=12σ2ey´RXiX´iRy−12tr(X´iRXi)   i=1,...,k
∂ l∂ σ2e=12σ4ey´Ry−(n−r)2σ2e

The gradient vector is

dldθ=[
∂ l∂ γ2
∂ l∂ σ2e
]

Related Topics

Restricted Maximum Likelihood Estimate (REML) (variance components algorithms)
Parameters (variance components algorithms)
Likelihood Function (variance components algorithms)
Hessian Matrix (variance components algorithms)
Fisher Information Matrix (variance components algorithms)
Iteration Procedure (variance components algorithms)
Initial Values (variance components algorithms)
Updating (variance components algorithms)
Choice of Step (variance components algorithms)
Convergence Criteria (variance components algorithms)
Negative Variance Estimates (variance components algorithms)
Covariance Matrix (variance components algorithms)


Hessian Matrix (variance components algorithms)

∂2 l∂ γ2i∂ γ2j=−1σ2ey´RXiX´iRXjX´jRy+12tr(X´iRXjX´jRXi)   i=1,...,k;j=1,...,k
∂2 l∂ σ2e∂ γ2j=−12σ4ey´RXjX´jRy j=1,...,k
∂2 l∂ σ2e∂ σ2e=−1σ6ey´Ry+n−r2σ4e

The Hessian matrix is

d2ldθdθ=[
∂2 l∂ γ2∂ γ2 | ∂2 l∂ γ2∂ σ2e
∂2 l∂ σ2e∂ γ2 | ∂2 l∂ σ2e∂ σ2e
]

where

∂2 l∂ γ2∂γ2=[
∂2 l∂ γ21∂ γ21 ... ∂2 l∂ γ21∂ γ2k
·
·
·
·
·
·
·
·
·
∂2 l∂ γ2k∂ γ21 ... ∂2 l∂ γ2k∂ γ2k
]

and

∂2 l∂ σ2e∂ γ2=[
∂2 l∂ σ2e∂ γ21
·
·
·
∂2 l∂ σ2e∂ γ2k
]

Related Topics

Restricted Maximum Likelihood Estimate (REML) (variance components algorithms)
Parameters (variance components algorithms)
Likelihood Function (variance components algorithms)
Gradient Vector (variance components algorithms)
Fisher Information Matrix (variance components algorithms)
Iteration Procedure (variance components algorithms)
Initial Values (variance components algorithms)
Updating (variance components algorithms)
Choice of Step (variance components algorithms)
Convergence Criteria (variance components algorithms)
Negative Variance Estimates (variance components algorithms)
Covariance Matrix (variance components algorithms)


Fisher Information Matrix (variance components algorithms)

Since K´X0=0(n−r)×m0 and trace(RV)=n−r, the expected second derivatives are

E(∂2 l∂ γ2i∂ γ2j)=−12tr(X´iRXjX´jRXi)   i=1,...,k,j=1,...,k

E(∂2 l∂ σ2e∂ γ2j)=−12σ2etr(X´jRXj) j=1,...,k
E(∂2 l∂ σ2e∂ σ2e)=−n−r2σ4e

The Fisher Information matrix is

E(d2ldθdθ)=[
E(∂2 l∂ γ2∂ γ2) | E(∂2 l∂ γ2∂ σ2e)
E(∂2 l∂ σ2e∂ γ2) | E(∂2 l∂ σ2e∂ σ2e)
]

where

E(∂2l∂γ2∂γ2)=[
E(∂2 l∂ γ21∂ γ21) ... E(∂2 l∂ γ21∂ γ2k)
·
·
·
·
·
·
·
·
·
E(∂2 l∂ γ2k∂ γ21) ... E(∂2 l∂ γ2k∂ γ2k)
]

and

E(∂2 l∂ σ2e∂ g 2)=[
E(∂2 l∂ σ2e∂ γ21)
·
·
·
E(∂2 l∂ σ2e∂ γ2k)
]

Related Topics

Restricted Maximum Likelihood Estimate (REML) (variance components algorithms)
Parameters (variance components algorithms)
Likelihood Function (variance components algorithms)
Gradient Vector (variance components algorithms)
Hessian Matrix (variance components algorithms)
Iteration Procedure (variance components algorithms)
Initial Values (variance components algorithms)
Updating (variance components algorithms)
Choice of Step (variance components algorithms)
Convergence Criteria (variance components algorithms)
Negative Variance Estimates (variance components algorithms)
Covariance Matrix (variance components algorithms)


Iteration Procedure (variance components algorithms)

The iterative estimation algorithm proceeds according to the details in the following sections.

Related Topics

Restricted Maximum Likelihood Estimate (REML) (variance components algorithms)
Parameters (variance components algorithms)
Likelihood Function (variance components algorithms)
Gradient Vector (variance components algorithms)
Hessian Matrix (variance components algorithms)
Fisher Information Matrix (variance components algorithms)
Initial Values (variance components algorithms)
Updating (variance components algorithms)
Choice of Step (variance components algorithms)
Convergence Criteria (variance components algorithms)
Negative Variance Estimates (variance components algorithms)
Covariance Matrix (variance components algorithms)


Initial Values (variance components algorithms)

• Random Effect Variance Components: For the ith random effect, compute
^
β
i=(X´iXi)−X´iy. Then assign the variance of the mi elements of b i using divisor (mi−1) to the estimate
^
σ
2i if mi≥2; otherwise
^
σ
2i=0.

• Residual Variance:
^
σ
2e=r´r/n where X=[X0| X1| ... | Xk] and r=y−(X´X)−X´y. If
^
σ
2e=0 but k≥1 then reset
^
σ
2e=10−8 so that the iteration can continue.

The variance ratios are then computed as
^
γ
2i=
^
σ
2i/
^
σ
2e. Following the same method in which the residual variance is initialized,
^
σ
2e>0 for k≥1.

Related Topics

Restricted Maximum Likelihood Estimate (REML) (variance components algorithms)
Parameters (variance components algorithms)
Likelihood Function (variance components algorithms)
Gradient Vector (variance components algorithms)
Hessian Matrix (variance components algorithms)
Fisher Information Matrix (variance components algorithms)
Iteration Procedure (variance components algorithms)
Updating (variance components algorithms)
Choice of Step (variance components algorithms)
Convergence Criteria (variance components algorithms)
Negative Variance Estimates (variance components algorithms)
Covariance Matrix (variance components algorithms)


Updating (variance components algorithms)

At the sth iteration, s=0,1,..., the parameter vector is updated as

^
θ
(s+1)=
^
θ
s+ρΔ
^
θ
s

where Δ
^
θ
s is the value of increment Δθ evaluated at θ=
^
θ
s, and ρ>0 is a step size such that l(
^
θ
(s+1))>l(
^
θ
s). The increment vector depends on the choice of step type—Newton-Raphson versus Fisher scoring. The step size is determined by the step-halving technique with ρ=1 initially and a maximum of 10 halvings.

Related Topics

Restricted Maximum Likelihood Estimate (REML) (variance components algorithms)
Parameters (variance components algorithms)
Likelihood Function (variance components algorithms)
Gradient Vector (variance components algorithms)
Hessian Matrix (variance components algorithms)
Fisher Information Matrix (variance components algorithms)
Iteration Procedure (variance components algorithms)
Initial Values (variance components algorithms)
Choice of Step (variance components algorithms)
Convergence Criteria (variance components algorithms)
Negative Variance Estimates (variance components algorithms)
Covariance Matrix (variance components algorithms)


Choice of Step (variance components algorithms)

Following Jennrich and Sampson (1976), the first iteration is always the Fisher scoring step because it is more robust to poor initial values. For subsequent iterations the Newton-Raphson step is used if:

1. The Hessian matrix is nonnegative definite, and

2. The increment in the log-likelihood function of step 1 is less than or equal to one.

Otherwise the Fisher scoring step is used. The increment vector for each type of step is:

• Newton-Raphson Step: Δθ=(−d2ldθdθ)−1dldθ.

• Fisher Scoring Step: Δθ=(−E(d2ldθdθ))−1dldθ.

Related Topics

Restricted Maximum Likelihood Estimate (REML) (variance components algorithms)
Parameters (variance components algorithms)
Likelihood Function (variance components algorithms)
Gradient Vector (variance components algorithms)
Hessian Matrix (variance components algorithms)
Fisher Information Matrix (variance components algorithms)
Iteration Procedure (variance components algorithms)
Initial Values (variance components algorithms)
Updating (variance components algorithms)
Convergence Criteria (variance components algorithms)
Negative Variance Estimates (variance components algorithms)
Covariance Matrix (variance components algorithms)


Convergence Criteria (variance components algorithms)

Given the convergence criterion ε>0, the iteration is considered converged when the following criteria are satisfied:

Given the convergence criterion ε>0, the iteration is considered converged when the following criteria are satisfied:

1. |l(
^
θ
(s+1))−l(
^
θ
s)|<ε×max(1,|
^
θ
s|) , and

2. <l(
^
θ
(s+1))−l(
^
θ
s)><ε×max(1,<
^
θ
s>) where <a> is the sum of absolute values of elements of the vector a.

Related Topics

Restricted Maximum Likelihood Estimate (REML) (variance components algorithms)
Parameters (variance components algorithms)
Likelihood Function (variance components algorithms)
Gradient Vector (variance components algorithms)
Hessian Matrix (variance components algorithms)
Fisher Information Matrix (variance components algorithms)
Iteration Procedure (variance components algorithms)
Initial Values (variance components algorithms)
Updating (variance components algorithms)
Choice of Step (variance components algorithms)
Negative Variance Estimates (variance components algorithms)
Covariance Matrix (variance components algorithms)


Negative Variance Estimates (variance components algorithms)

Negative variance estimates can occur at the end of an iteration. An ad hoc method is to set those estimates to zero before the next iteration.

Related Topics

Restricted Maximum Likelihood Estimate (REML) (variance components algorithms)
Parameters (variance components algorithms)
Likelihood Function (variance components algorithms)
Gradient Vector (variance components algorithms)
Hessian Matrix (variance components algorithms)
Fisher Information Matrix (variance components algorithms)
Iteration Procedure (variance components algorithms)
Initial Values (variance components algorithms)
Updating (variance components algorithms)
Choice of Step (variance components algorithms)
Convergence Criteria (variance components algorithms)
Covariance Matrix (variance components algorithms)


Covariance Matrix (variance components algorithms)

Let
^
θ
be the vector of maximum likelihood estimates. Their covariance matrix is given by

cov(
^
θ
)=(−E(d2ldθdθ)|θ=
^
θ
)−1

Let

Ψ=[
σ21
·
·
·
σ2k
σ2e
]

be the original parameters. Their maximum likelihood estimates are given by

^
Ψ
=[
^
σ
2e
^
γ
21
·
·
·
^
σ
2e
^
γ
2k
^
σ
2e
]

and their covariance matrix is estimated by

cov(
^
Ψ
)=Jcov(
^
θ
)J´

where

J=[
σ2eIk | γ
0 | 1
]

which is the (k+1)×(k+1) Jacobian matrix of transforming θ to ψ.

Related Topics

Restricted Maximum Likelihood Estimate (REML) (variance components algorithms)
Parameters (variance components algorithms)
Likelihood Function (variance components algorithms)
Gradient Vector (variance components algorithms)
Hessian Matrix (variance components algorithms)
Fisher Information Matrix (variance components algorithms)
Iteration Procedure (variance components algorithms)
Initial Values (variance components algorithms)
Updating (variance components algorithms)
Choice of Step (variance components algorithms)
Convergence Criteria (variance components algorithms)
Negative Variance Estimates (variance components algorithms)


ANOVA (variance components algorithms)

variance components algorithms,variance components algorithms,variance components algorithms
ANOVA estimates,ANOVA estimates,ANOVA estimates

The ANOVA variance component estimates are obtained by equating the expected mean squares of the random effects to their observed mean squares. The VARCOMP procedure offers two types of sum of squares: Type I and Type III (see Appendix 11 for details).

Let

Ψ=[
σ21
·
·
·
σ2k
σ2e
]

be the vector of variance components.

Let

q=[
MS1
·
·
·
MSk
MSE
]

where MSi is the observed mean squares of the ith random effect, and MSE is the residual mean squares.

Let

S=[
s´1
·
·
·
s´k
s´k+1
]

be a (k+1)×(k+1) matrix whose rows are coefficients for the expected mean squares. For example, the expected mean squares of the ith random effect is s´i y . Algorithms for computing the expected mean squares can be found in the section “Univariate Mixed Model” in the chapter GLM Univariate and Multivariate. The ANOVA variance component estimates are then obtained by solving the system of linear equations:

S y =q

Related Topics

VARCOMP Algorithms
Notation (variance components algorithms)
Weights (variance components algorithms)
Model (variance components algorithms)
Minimum Norm Quadratic Unbiased Estimate (MINQUE) (variance components algorithms)
Maximum Likelihood Estimate (MLE) (variance components algorithms)
Restricted Maximum Likelihood Estimate (REML) (variance components algorithms)
References (variance components algorithms)


References (variance components algorithms)

variance components algorithms,variance components algorithms,variance components algorithms
references,references,references

Giesbrecht, F. G. 1983. An efficient procedure for computing MINQUE of variance components and generalized least squares estimates of fixed effects. Communications in Statistics, Part A - Theory and Methods, 12:, 2169-2177.

Goodnight, J. H. 1978. Computing MIVQUE0 Estimates of Variance Components. SAS Technical Report, R-105, - .

Goodnight, J. H., and W. J. Hemmerle. 1979. A simplified algorithm for the W transformation in variance component estimation. Technometrics, 21, 265-267.

Jennrich, R. I., and P. F. Sampson. 1976. Newton-Raphson and related algorithms for maximum likelihood variance component estimation. Technometrics, 18:, 11-17.

Rao, C. R. 1973. Linear statistical inference and its applications, 2nd ed. New York: John Wiley and Sons.

Searle, S. R., G. Casella, and C. E. McCulloch. 1992. Variance Components. New York: John Wiley and Sons.

Related Topics

VARCOMP Algorithms
Notation (variance components algorithms)
Weights (variance components algorithms)
Model (variance components algorithms)
Minimum Norm Quadratic Unbiased Estimate (MINQUE) (variance components algorithms)
Maximum Likelihood Estimate (MLE) (variance components algorithms)
Restricted Maximum Likelihood Estimate (REML) (variance components algorithms)
ANOVA (variance components algorithms)


WLS Algorithms

WLS (command),WLS (command),WLS (command)
algorithms,algorithms,algorithms
Weight Estimation,Weight Estimation,Weight Estimation
algorithms,algorithms,algorithms
weighted least-squares algorithms,weighted least-squares algorithms,weighted least-squares algorithms

WLS estimates regression model with different weights for different cases.

Related Topics

Notation (weighted least-squares algorithms)
Model (weighted least-squares algorithms)
Computational Details (weighted least-squares algorithms)


Notation (weighted least-squares algorithms)

weighted least-squares algorithms,weighted least-squares algorithms,weighted least-squares algorithms
notation,notation,notation

The following notation is used throughout this chapter unless otherwise stated:

n | The number of cases
p | The number of parameters for the model
y | n×1 vector with element yi, which represents the observed dependent variable for case i
X | n×p matrix with element xij, which represents the observed value of the ith case of the jth independent variable
β | p×1 vector with element βj, which represents the regression coefficient of the jth independent variable
w | n×1 vector with element wi, which represents the weight for case i

Related Topics

WLS Algorithms
Model (weighted least-squares algorithms)
Computational Details (weighted least-squares algorithms)


Model (weighted least-squares algorithms)

weighted least-squares algorithms,weighted least-squares algorithms,weighted least-squares algorithms
model,model,model

The linear regression model has the form of

yi=X´iβ+εi, i=1,...,n

where Xi is the vector of covariates for the ith case, E(εi)=0, and var(εi)=w−1iσ2. Assuming that ε1,...,εn follow a normal distribution, the log-likelihood function is

L=0.5{−nln2π−nlnσ2+nΣi=1lnwi−nΣi=1wi(yi−X´iβ)2σ2}

Related Topics

WLS Algorithms
Notation (weighted least-squares algorithms)
Computational Details (weighted least-squares algorithms)


Computational Details (weighted least-squares algorithms)

The algorithm used to obtain the weighted least-square estimates for the parameters in the model is the same as the REGRESSION procedure with regression weight. For details of the algorithm and statistics (the ANOVA table and the variables in the equation), see REGRESSION.

After the estimation is finished, the log-likelihood function is estimated by

^
L
=0.5{−nln2π−nln
^
σ
2+nΣi=1lnwi−(n−p)}

where
^
σ
2 is the mean square error in the ANOVA table.

Related Topics

WLS Algorithms
Notation (weighted least-squares algorithms)
Model (weighted least-squares algorithms)


Significance Level of a Standard Normal Deviate

significance level of a standard normal deviate algorithms,significance level of a standard normal deviate algorithms,significance level of a standard normal deviate algorithms

The significance level is based on a polynomial approximation.

Related Topics

Notation (Significance Level of a Standard Normal Deviate)
Computation (Significance Level of a Standard Normal Deviate)
References (Significance Level of a Standard Normal Deviate)


Notation (Significance Level of a Standard Normal Deviate)

significance level of a standard normal deviate algorithms,significance level of a standard normal deviate algorithms,significance level of a standard normal deviate algorithms
notation,notation,notation

The following notation is used throughout this section unless otherwise stated:

X | Value of the standard normal deviate
Q | One-sided significance level

Related Topics

Significance Level of a Standard Normal Deviate
Computation (Significance Level of a Standard Normal Deviate)
References (Significance Level of a Standard Normal Deviate)


Computation (Significance Level of a Standard Normal Deviate)

significance level of a standard normal deviate algorithms,significance level of a standard normal deviate algorithms,significance level of a standard normal deviate algorithms
computation,computation,computation

Q(X)=0.5{1+Z(a1+Z(a2+Z(a3+Z(a4+Z(a5+Za6)))))}−16

where

Z={
0.7071067812|X| | if |X|≤14.14
10 | otherwise

a1=0.070523078... | a4=0.0001520143
a2=0.0422820123 | a5=0.0002765672
a3=0.0092705272 | a6=0.0000430638

Related Topics

Significance Level of a Standard Normal Deviate
Notation (Significance Level of a Standard Normal Deviate)
References (Significance Level of a Standard Normal Deviate)


References (Significance Level of a Standard Normal Deviate)

significance level of a standard normal deviate algorithms,significance level of a standard normal deviate algorithms,significance level of a standard normal deviate algorithms
references,references,references

Abramowitz, M., and I. A. Stegun, eds. 1970. Handbook of mathematical functions. New York: Dover Publications.

Ling, R. E. 1978. A study of the accuracy of some approximations for t, chi-square, and F tail probabilities. Journal of American Statistical Association, 73, 274-283.

Related Topics

Significance Level of a Standard Normal Deviate
Notation (Significance Level of a Standard Normal Deviate)
Computation (Significance Level of a Standard Normal Deviate)


Significance of a t Statistic

significance of a t statistic algorithms,significance of a t statistic algorithms,significance of a t statistic algorithms

An exact formula is used for 30 or fewer degrees of freedom, the Cornish-Fisher approximation otherwise.

Related Topics

Notation (Significance of a t Statistic)
Computation (Significance of a t Statistic)
References (Significance of a t Statistic)


Notation (Significance of a t Statistic)

significance of a t statistic algorithms,significance of a t statistic algorithms,significance of a t statistic algorithms
notation,notation,notation

The following notation is used throughout this section unless otherwise stated:

X | Absolute value of the t variable
k | Integer degrees of freedom
Q | Two-sided significance level

Related Topics

Significance of a t Statistic
Computation (Significance of a t Statistic)
References (Significance of a t Statistic)


Computation (Significance of a t Statistic)

significance of a t statistic algorithms,significance of a t statistic algorithms,significance of a t statistic algorithms
computation,computation,computation

• For k≥30,

Q=1−A(k)

where, for k odd,

A(k)={
2π{θ+sinθ[cosθ+23cos3θ+ ... +2·4...(k−3)3·5...(k−2)cosk−2θ]} | k≠1
2θπ | k=1

For k even,

A(k)=sinθ{1+12cos2θ+1·32·4cos4θ+ ... +1·3...(k−3)2·4...(k−2)cosk−2θ}

and

θ=arctanX
√ k
sin(θ)=
˜
θ
√ 1+
˜
θ
2
cos(θ)=1
√ 1+
˜
θ
2

where

˜
θ
=X
√ k

• If k>30 and X<5×10−5

Q=1

If k>30 and X≥5×10−5

Q=2(QN(X)+XRexp(−X2/2)
√ 2π
)

where QN(X) is the normal one-tailed significance probability, and

R=(X2+1)4k+−3+X2(−5+X2(−7+3X2))96k2
+(−15)+X2(−3+X2(6+X2(14+X2(−11+X2))))384k3
+945+X2(−915+X2(−213+X2(−939+X2(−2141+X2(2225+X2(−375+15X2))))))92160k4
+17955+X2(5355+X2(180+X2(1140+X2(2490+X2(5994+X2(−7516+X2(1764+X2(−133+3X2))))))))368640k5

Related Topics

Significance of a t Statistic
Notation (Significance of a t Statistic)
References (Significance of a t Statistic)


References (Significance of a t Statistic)

significance of a t statistic algorithms,significance of a t statistic algorithms,significance of a t statistic algorithms
references,references,references

Abramowitz, M., and I. A. Stegun, eds. 1970. Handbook of mathematical functions. New York: Dover Publications.

Related Topics

Significance of a t Statistic
Notation (Significance of a t Statistic)
Computation (Significance of a t Statistic)


Significance of a Chi-Square Statistic

significance of a chi-square statistic algorithms,significance of a chi-square statistic algorithms,significance of a chi-square statistic algorithms

For 30 or fewer degrees of freedom, an exact series expansion is used; otherwise the Peizer-Pratt approximation is used.

Related Topics

Notation (Significance of a Chi-Square Statistic)
Computation (Significance of a Chi-Square Statistic)
References (Significance of a Chi-Square Statistic)


Notation (Significance of a Chi-Square Statistic)

significance of a chi-square statistic algorithms,significance of a chi-square statistic algorithms,significance of a chi-square statistic algorithms
notation,notation,notation

The following notation is used throughout this section unless otherwise stated:

X | Value of the chi-square statistic
k | Degrees of freedom
Q | Significance level (right-tail probability)

Related Topics

Significance of a Chi-Square Statistic
Computation (Significance of a Chi-Square Statistic)
References (Significance of a Chi-Square Statistic)


Computation (Significance of a Chi-Square Statistic)

significance of a chi-square statistic algorithms,significance of a chi-square statistic algorithms,significance of a chi-square statistic algorithms
computation,computation,computation

• If X≤0 or k<1,

Q=1

• If k=1,

Q=2QN(
√ X
)

where QN(
√ X
) is the standard normal one-tailed significance probability.

• For k≤30, an exact series expansion is used (Abramowitz and Stegun, 1965, eqs. 26.4.4 and 26.4.5)

Q={
2QN(
√ X
)+R
√ 2π
exp(−X2) 		k odd
exp(−X2)×(1+R)
k even

where

R={
(k−1)/2Σr=1Xr−1/21·3...(2r−1) k odd
(k−2)/2Σr=1Xr2·4...2r
k even

• If k>30, the Peizer-Pratt approximation is used (Peizer and Pratt, 1968, eq 2.24a).

• If X≥150,

Q=0

otherwise

Q=QN(Z)

where

Z={
(−(13+0.08k))/(
√ 2k−2
) 		if X=k−1
(d
√ (k−1)log(k−1X)+X−(k−1)
)
/|X−(k−1)| 		if X≠k−1

where

d=X−k+2/3−0.08/k

• If Z<0,

Q=1−QN(Z)

Related Topics

Significance of a Chi-Square Statistic
Notation (Significance of a Chi-Square Statistic)
References (Significance of a Chi-Square Statistic)


References (Significance of a Chi-Square Statistic)

significance of a chi-square statistic algorithms,significance of a chi-square statistic algorithms,significance of a chi-square statistic algorithms
references,references,references

Abramowitz, M., and I. A. Stegun, eds. 1970. Handbook of mathematical functions. New York: Dover Publications.

Peizer, D. B., and J. W. Pratt. 1968. A normal approximation for binomial, F, beta and other common related tail probabilities. Journal of American Statistical Association, 63, 1416-1456.

Related Topics

Significance of a Chi-Square Statistic
Notation (Significance of a Chi-Square Statistic)
Computation (Significance of a Chi-Square Statistic)


Significance of an F Statistic

significance of an F statistic algorithms,significance of an F statistic algorithms,significance of an F statistic algorithms

Either the Peizer-Pratt approximation or an exact algorithm suggested by O. G. Ludwig (1963) and improved by Bosten and Battiste is used.

Related Topics

Notation (Significance of an F Statistic)
Computation (Significance of an F Statistic)
References (Significance of an F Statistic)


Notation (Significance of an F Statistic)

significance of an F statistic algorithms,significance of an F statistic algorithms,significance of an F statistic algorithms
notation,notation,notation

The following notation is used throughout this section unless otherwise stated:

F | Value of the F statistic
k1 | Numerator degrees of freedom
k2 | Denominator degrees of freedom
QF | One-tailed significance level

Related Topics

Significance of an F Statistic
Computation (Significance of an F Statistic)
References (Significance of an F Statistic)


Computation (Significance of an F Statistic)

significance of an F statistic algorithms,significance of an F statistic algorithms,significance of an F statistic algorithms
computation,computation,computation

• If k1≥20 and k2≥20 and if F>12, QF=C

• Peizer-Pratt (1968, p.1420)

The Peizer-Pratt approximation is used if k1≥20 and k2≥20 and F≤12, or min(k1, k2)≥6 and max(k1, k2)>2000,

QF=QN(Z)

where

Z=d×
√ 1+qg(Snp)+pg(Tnq)(n+16)pq

and

d=S+16−(n+13)p+0.04(qk2−pk1+q−0.5k1+k2)
S=k2−12 T=k1−12
n=k1+k2−22 p=k2k1F+k2 q=1−p
g(X)=(1−X2+2Xlog(X))/(1−X)2 for X≠1, X>0
g(0)=1, g(1)=0

If Z<0, QF=1−QN(Z). If Z>10, QF=0.

• Exact Algorithm

Determine the parameters for the incomplete beta functions

X=k2k2+k1F
a={
k2/2 | X≤0.5
k1/2 | X>0.5
b={
k1/2 | X≤0.5
k2/2 | X>0.5
Y={
X | X≤0.5
1−X | X>0.5

The F and incomplete beta functions are related as

QF(F, k1, k2)={
IX(k2/2, k1/2) | X≤0.5
1−I1−X(k1/2, k2/2) | X>0.5

The following is used for the computations:

IY(a, b)=INFSUM×YaΓ(a+1)×Γ(PS+a)Γ(PS)+FINSUM×Γ(a+b)Γ(a)Γ(b+1)×Ya(1−Y)b

where

INFSUM=∞Σi=0(1−PS)iaa+iYii!
(1−PS)i={
1 | i=0
1+i−PS1−PS | i>0
PS={
1 | b is an integer
b−[b] | otherwise

and

[b]= largest integer less than or equal to b
FINSUM=[b]Σi=1b(b−1) ... (b−i+1)(a+b−1)(a+b−2) ... (a+b−i)1(1−Y)i

Summation of INFSUM terminates when a summand is less than 10−78 or less than FINSUM×10−6.

Related Topics

Significance of an F Statistic
Notation (Significance of an F Statistic)
References (Significance of an F Statistic)


References (Significance of an F Statistic)

significance of an F statistic algorithms,significance of an F statistic algorithms,significance of an F statistic algorithms
references,references,references

Bosten, N. E., and E. L. Battiste. 1980. Remark on Algorithm 179. Collected Algorithms from ACM, , 179-P-2-R1.

Ludwig, O. G. 1963. Algorithm 179: Incomplete beta ratio. Communications of the ACM, 6, 314-314.

Peizer, D. B., and J. W. Pratt. 1968. A normal approximation for binomial, F, beta and other common related tail probabilities. Journal of American Statistical Association, 63, 1416-1456.

Related Topics

Significance of an F Statistic
Notation (Significance of an F Statistic)
Computation (Significance of an F Statistic)


Significance Levels for Fisher's Exact Test

significance levels for Fisher's exact test algorithms,significance levels for Fisher's exact test algorithms,significance levels for Fisher's exact test algorithms

The procedure described in this appendix is used to calculate the exact one-tailed and two-tailed significance levels of Fisher's exact test for a 2×2 table under the assumption of independence of rows and columns and conditional on the marginal totals. All cell counts are rounded to the nearest integers.

Related Topics

Background (Significance Levels for Fisher's Exact Test)
Computations (Significance Levels for Fisher's Exact Test)
Table Rearrangement (Significance Levels for Fisher's Exact Test)
One-Tailed Significance Level (Significance Levels for Fisher's Exact Test)
Two-Tailed Significance Level (Significance Levels for Fisher's Exact Test)


Background (Significance Levels for Fisher's Exact Test)

significance levels for Fisher's exact test algorithms,significance levels for Fisher's exact test algorithms,significance levels for Fisher's exact test algorithms
background,background,background

Consider the following observed 2×2 table:

n1 | n2 | n1+n2
n3 | n4 | n3+n4
n1+n3 | n2+n4 | N

Conditional on the observed marginal totals, the values of the four cell counts can be expressed as the observed count of the first cell n1 only. Under the hypothesis of independence, the count of the first cell N1 follows a hypergeometric distribution with the probability of N1=n1 given by

Prob (N1=n1)=(n1+n2)!(n3+n4)!(n1+n3)!(n2+n4)!N!n1!n2!n3!n4!

where N1 ranges from max(0, n1−n4) to min(n1+n2, n1+n3) and N=n1+n2+n3+n4.

The exact one-tailed significance level p1 is defined as

p1={
Prob (N1≥n1) | if n1>E(N1)
Prob (N1≤n1) | if n1≤E(N1)

where E(N1)=(n1+n2)(n1+n3)/N.

The exact two-tailed significance level p2 is defined as the sum of the one-tailed significance level p1 and the probabilities of all points in the other side of the sample space of N1 which are not greater than the probability of N1=n1.

Related Topics

Significance Levels for Fisher's Exact Test
Computations (Significance Levels for Fisher's Exact Test)
Table Rearrangement (Significance Levels for Fisher's Exact Test)
One-Tailed Significance Level (Significance Levels for Fisher's Exact Test)
Two-Tailed Significance Level (Significance Levels for Fisher's Exact Test)


Computations (Significance Levels for Fisher's Exact Test)

significance levels for Fisher's exact test algorithms,significance levels for Fisher's exact test algorithms,significance levels for Fisher's exact test algorithms
background,background,background

To begin the computation of the two significance levels p1 and p2, the counts in the observed 2×2 table are rearranged. Then the exact one-tailed and two-tailed significance levels are computed using the CDF.HYPER cumulative distribution function.

Related Topics

Significance Levels for Fisher's Exact Test
Background (Significance Levels for Fisher's Exact Test)
Table Rearrangement (Significance Levels for Fisher's Exact Test)
One-Tailed Significance Level (Significance Levels for Fisher's Exact Test)
Two-Tailed Significance Level (Significance Levels for Fisher's Exact Test)


Table Rearrangement (Significance Levels for Fisher's Exact Test)

significance levels for Fisher's exact test algorithms,significance levels for Fisher's exact test algorithms,significance levels for Fisher's exact test algorithms
background,background,background

The following steps are used to rearrange the table:

1. Check whether n1>E(N1), which can be done by checking whether n1n4>n2n3. If so, rearrange the table so that the first cell contains the minimum of n2 and n3, maintaining the row and column totals; otherwise, rearrange the table so that the first cell contains the minimum of n1 and n4, again maintaining the row and column totals.

2. Without loss of generality, we assume that the count of the first cell is n1 after the above rearrangement. Calculate the first row total, the first column total, and the overall total, and name them SAMPLE, HITS, and TOTAL, respectively.

Related Topics

Significance Levels for Fisher's Exact Test
Background (Significance Levels for Fisher's Exact Test)
Computations (Significance Levels for Fisher's Exact Test)
One-Tailed Significance Level (Significance Levels for Fisher's Exact Test)
Two-Tailed Significance Level (Significance Levels for Fisher's Exact Test)


One-Tailed Significance Level (Significance Levels for Fisher's Exact Test)

significance levels for Fisher's exact test algorithms,significance levels for Fisher's exact test algorithms,significance levels for Fisher's exact test algorithms
background,background,background

The following steps are used to calculate the one-tailed significance level:

1. If TOTAL=0, set the one-tailed significance level p1 equal to 1; otherwise, obtain p1 by using the CDF.HYPER cumulative distribution function with arguments n1, SAMPLE, HITS, and TOTAL.

2. Also calculate the probability of the first cell count equal to n1 by finding the difference between p1 and the value obtained from CDF.HYPER with n1−1, SAMPLE, HITS, and TOTAL as its arguments, provided that n1>0. Call this probability PEXACT.

3. If n1=0, set PEXACT=p1. PEXACT will be used in the next step to find the points for which the probabilities are not greater than PEXACT.

Related Topics

Significance Levels for Fisher's Exact Test
Background (Significance Levels for Fisher's Exact Test)
Computations (Significance Levels for Fisher's Exact Test)
Table Rearrangement (Significance Levels for Fisher's Exact Test)
Two-Tailed Significance Level (Significance Levels for Fisher's Exact Test)


Two-Tailed Significance Level (Significance Levels for Fisher's Exact Test)

significance levels for Fisher's exact test algorithms,significance levels for Fisher's exact test algorithms,significance levels for Fisher's exact test algorithms
background,background,background

The following steps are used to calculate the two-tailed significance level:

1. If TOTAL=0, set the two-tailed significance level p2 equal to 1; otherwise, start searching backwards from min(n1+n2, n1+n3) to (n1+1), and find the first point x with its point probability greater than PEXACT. (Notice that this backward search takes advantage of the unimodal property of the hypergeometric distribution.)

2. If such an x exists between min(n1+n2, n1+n3) and (n1+1), calculate the probability value obtained from CDF.HYPER with arguments x, SAMPLE, HITS, and TOTAL. Call this probability px.

3. The two-tailed significance level p2 is obtained by finding the sum of p1 and (1−px). If no qualified x exists, the two-tailed significance level is equal to 1.

Related Topics

Significance Levels for Fisher's Exact Test
Background (Significance Levels for Fisher's Exact Test)
Computations (Significance Levels for Fisher's Exact Test)
Table Rearrangement (Significance Levels for Fisher's Exact Test)
One-Tailed Significance Level (Significance Levels for Fisher's Exact Test)


Sorting and Searching

sorting and searching algorithms,sorting and searching algorithms,sorting and searching algorithms

Sorting and searching have a significant impact on the performance of a number of procedures. For those procedures, the methods used are identified here.

Related Topics

CROSSTABS (Sorting and Searching algorithms)
FREQUENCIES (Sorting and Searching algorithms)
NONPAR CORR and NPAR TESTS (Sorting and Searching algorithms)
SURVIVAL (Sorting and Searching algorithms)
References (Sorting and Searching algorithms)


CROSSTABS (Sorting and Searching algorithms)

sorting and searching algorithms,sorting and searching algorithms,sorting and searching algorithms
CROSSTABS,CROSSTABS,CROSSTABS

In the general mode, the table of cells is searched using an unordered open scatter table search and insertion algorithm similar to Knuth’s Algorithm L (Knuth, 1973, p. 518). The scatter table contains only pointers to the actual cell contents and is twice as large as it need be (that is, if there is room for m cells, the scatter table has room for 2m pointers). This means it can never be more than half full. Collisions are resolved by sequential search from the initial location until an empty pointer is found.

Letting

k be the table number

p be the dimension of the table

v(i), i=1,...,p, be the bit string used to represent the value of the ith variable defining table k

m be the length of the scatter table

n be the resulting hash value, to be used as an index in the scatter table

The hash function used is given by the following algorithm:

j:=k
for i:=1 to p
  j:=j rotated left 3 bits
  j:=j EXCLUSIVE OR v(i)
end
n:=(j modulo m)+1

When the tables have been completed, the cells are sorted by table numbers and the values of the defining variables using the algorithm described by Singleton (1969).

Related Topics

Sorting and Searching
FREQUENCIES (Sorting and Searching algorithms)
NONPAR CORR and NPAR TESTS (Sorting and Searching algorithms)
SURVIVAL (Sorting and Searching algorithms)
References (Sorting and Searching algorithms)


FREQUENCIES (Sorting and Searching algorithms)

sorting and searching algorithms,sorting and searching algorithms,sorting and searching algorithms
FREQUENCIES,FREQUENCIES,FREQUENCIES

FREQUENCIES uses the same search and sort algorithms as CROSSTABS, except that its hashing function is given by:

h=(((k+16807v) modulo 2 31 ) modulo m)+1

where

h is the hash value, to be used as an index in the scatter table

k is the table number

v is the integer value of the bits representing the value to be tabulated

m is the length of the scatter table

Related Topics

Sorting and Searching
CROSSTABS (Sorting and Searching algorithms)
NONPAR CORR and NPAR TESTS (Sorting and Searching algorithms)
SURVIVAL (Sorting and Searching algorithms)
References (Sorting and Searching algorithms)


NONPAR CORR and NPAR TESTS (Sorting and Searching algorithms)

sorting and searching algorithms,sorting and searching algorithms,sorting and searching algorithms
NONPAR CORR and NPAR TESTS,NONPAR CORR and NPAR TESTS,NONPAR CORR and NPAR TESTS

Both use the method of Singleton to sort cases for computing ranks.

Related Topics

Sorting and Searching
CROSSTABS (Sorting and Searching algorithms)
FREQUENCIES (Sorting and Searching algorithms)
SURVIVAL (Sorting and Searching algorithms)
References (Sorting and Searching algorithms)


SURVIVAL (Sorting and Searching algorithms)

sorting and searching algorithms,sorting and searching algorithms,sorting and searching algorithms
SURVIVAL,SURVIVAL,SURVIVAL

SURVIVAL uses a modified Quicksort similar to Knuth’s algorithm Q (Knuth, 1973, p. 116) to sort cases.

Related Topics

Sorting and Searching
CROSSTABS (Sorting and Searching algorithms)
FREQUENCIES (Sorting and Searching algorithms)
NONPAR CORR and NPAR TESTS (Sorting and Searching algorithms)
References (Sorting and Searching algorithms)


References (Sorting and Searching algorithms)

sorting and searching algorithms,sorting and searching algorithms,sorting and searching algorithms
references,references,references

Knuth, D. E. 1973. The Art of Computer Programming, volume3: Sorting and Searching. Reading, MA: Addison-Wesley.

Singleton, R. C. 1969. Algorithm 347: Efficient sorting in minimal storage. Communications of the ACM, 12, 185-187.

Related Topics

Sorting and Searching
CROSSTABS (Sorting and Searching algorithms)
FREQUENCIES (Sorting and Searching algorithms)
NONPAR CORR and NPAR TESTS (Sorting and Searching algorithms)
SURVIVAL (Sorting and Searching algorithms)


Generation of Uniform Random Numbers

generation of random numbers algorithms,generation of random numbers algorithms,generation of random numbers algorithms

Two different random number generators are available:

• Version 12 Compatible. The random number generator used in version 12 and previous releases. If you need to reproduce randomized results generated in previous releases based on a specified seed value, use this random number generator.

• Mersenne Twister. A newer random number generator that is more reliable for simulation purposes. If reproducing randomized results from version 12 or earlier is not an issue, use this random number generator.

Specifically, the Mersenne Twister has a far longer period (number of draws before it repeats) and far higher order of equidistribution (its results are "more uniform") than the PASW Statistics 12 Compatible generator. The Mersenne Twister is also very fast and uses memory efficiently.

Related Topics

PASW Statistics 12 Compatible Random Number Generator
Mersenne Twister Random Number Generator
References (Generation of Random Numbers)


PASW Statistics 12 Compatible Random Number Generator

generation of random numbers algorithms,generation of random numbers algorithms,generation of random numbers algorithms
version 12 compatible,version 12 compatible,version 12 compatible
multiplicative congruential generator,multiplicative congruential generator,multiplicative congruential generator
generation of random numbers,generation of random numbers,generation of random numbers

Uniform numbers are generated using the algorithm of (Fishman and Moore, 1981). It is a multiplicative congruential generator that is simply stated as:

       seed(t+1) = (a * seed(t)) modulo p
       rand = seed(t+1) / (p+1)

where a = 397204094 and p = 231−1 = 2147483647, which is also its period.   Seed(t) is a
32-bit integer that can be displayed using SHOW SEED. See  the topic SHOW  for more information. SET SEED=number sets seed(t) to the specified number, truncated
to an integer. SET SEED=RANDOM sets seed(t) to the current time of day in milliseconds since midnight. See  the topic SET for more information.

Related Topics

Generation of Uniform Random Numbers
Mersenne Twister Random Number Generator
References (Generation of Random Numbers)


Mersenne Twister Random Number Generator

generation of random numbers algorithms,generation of random numbers algorithms,generation of random numbers algorithms
Mersenne Twister,Mersenne Twister,Mersenne Twister
Mersenne Twister,Mersenne Twister,Mersenne Twister
generation of random numbers,generation of random numbers,generation of random numbers

The Mersenne Twister (MT) algorithm generates uniform 32-bit pseudorandom integers. The algorithm provides a period of 219937−1, assured 623-dimensional equal distribution, and 32-bit accuracy. Following the description given by Matsumoto and Nishimura (1998), the algorithm is based on the linear recurrence:

xk+n=xk+m(xuk|xlk+1)A, k=0,1,...

(1)

where

x | is a word vector; a w-dimensional row vector over the two-element field F2={0,1}
n | is the degree of recurrence (recursion)
r | is an integer, 0≤r≤w−1, the separation point of one word
m | is an integer, 1≤m≤n, the middle term
A | is a constant w×w matrix with entries in F2
xuk | is the upper (w−r) bits of xk
xlk+1 | is the lower r bits of xk+1 ; thus
xuk|xlk+1 | is the word vector obtained by concatenating the upper (w−r) bits of xk and the lower r bits of xk+1
 | Bitwise addition modulo two (XOR)

Given initial seeds x0,x1,...,xn−1, the algorithm generates xn+k by the above recurrence for k=0, 1, ...

A form of the matrix A is chosen so that multiplication by A is very fast. A candidate is

A=(
1
1
·
·
·
1
aw−1 aw−2 ... ... a0
)

(2)

where a=(aw−1,aw−2,...,a0) and x=(xw−1,xw−2,...,x0); then xA can be computed using only bit operations

xA={
shiftright(x)
if x0=0
shiftright(x)a
if x0=1

(3)

Thus calculation of the recurrence is realized with bitshift, bitwise EXCLUSIVE-OR, bitwise OR, and bitwise AND operations.

For improving the k-distribution to v-bit accuracy, we multiply each generated word by a suitable w×w invertible matrix T from the right (called tempering in (Matsumoto and Kurita, 1994)). For the tempering matrix z=xT, we choose the following successive transformations

y:=x(x>>u) | (4)
y:=y((y<<s)ANDb) | (5)
y:=y((y<<t)ANDc) | (6)
z:=y((y>>l) | (7)

where

l, s, t, u | are integers
b, c | are suitable bitmasks of word size
x>>u | denotes the u-bit shiftright
x<<u | denotes the u-bit shiftleft

To execute the recurrence, let x[0:n−1]be an array of n unsigned integers of word size, i be an integer variable, and x,v,a be unsigned constant integers of word size vectors.

Step 0

u ←
1...1
w−r
0...0
r
; bitmask for upper (w−r) bits
v ←
0...0
w−r
1...1
r
; bitmask for lower r bits
a ← aw−1aw−2...a0; the last row of matrix A

Step 1

i ← 0
Initialize the state space vector array x[0],x[1],...,x[n−1].

Step 2

y ← (x[i]ANDu)OR(x[(i+1)modn])ANDv; computing (xui|xli+1)

Step 3

If the least significant bit of y equals to zero then
x[i] ← x[(i+m)modn](y>>1)0
If the least significant bit of y equals to one then
x[i] ← x[(i+m)modn](y>>1)a

Step 4

calculate x[i]T
y ← x[i]
y ← y(y>>u)
y ← y ((y<<s)ANDb)
y ← y((y<<t)ANDc)
y ← y(y>>l)

Step 5

i ← (i+1)modn

Step 6

Go to Step 2.

Related Topics

Generation of Uniform Random Numbers
PASW Statistics 12 Compatible Random Number Generator
References (Generation of Random Numbers)


PASW Statistics Usage

The MT algorithm provides 32 random bits in each draw. PASW Statistics draws 64-bit floating-point numbers in the range [0..1] with 53 random bits in the mantissa using

Draw = (226*[k(t)/25]+[k(t+1)/26])/253

where k(t) and k(t+1) are successive 32-bit integer draws and [x] represents the integer part of x. Since the period of the integer generator is an odd number, the period of this floating point generator is the same as that of the integer generator.

There are two options for initializing the state space vector array. SET RNG=MT MTINDEX=x accepts a 64-bit floating point number x to set the seed. SET RNG=MT MTINDEX=RANDOM uses the current time of day in milliseconds since midnight to set the seed. See the topic SET for more information.

If x is a positive integer requiring less than 32 bits, the generator is initialized by using that integer in the following function:

init_genrand(unsigned32 s,unsigned32 &x[])
{

x[0]=s ;
f= 1812433253 ; f is an unsigned long interger from i=0 to n
x[i+1]=f(x[i]>>30) mod 2w

}

Otherwise, the generator is initialized using the following function init_by_array. It is given an array of three integers computed from the argument x with the following algorithm:

k[0]: 8*d+4*c+2*b+a

k[1]: y = trunc(z*226)

k[2]: z*253 - y*227

where

x | is the argument
a | is 1 if x == 0, or 0 otherwise
b | is 1 if x<0, or 0 otherwise
c | is 1 if |x| >= 1, or 0 otherwise
d | is an integer such that
 |  | if |x| > 1, .5 <= |x|/2d < 1,
 |  | else if |x| > 0, .5 <= |x|*2d < 1
 |  | else x == 0 and d == 0.
e | is d if |x| <= 1, else -d
z | is |x|*2e

init_by_array(unsigend32 init_key[ ] ,int key_length, unsigned32 &x[])
{

init_genrand(19650218, x);

i=1,j=0,k=max(key_length,n)

for ( ; k ; k−−)

x[i]=(x[i]( (x[i−1](x[i−1]>>30) ) f1))
+init_key[j]+j;

if i>=n then
x[0]=x[n−1];
i=1;
if (j>=key_length) then
j=0 ;

end for

for (k=n−1 ; k ; k−−)

x[i]=(x[i]((x[i−1](x[i−1]>>30)) f2))−i ;
if i>=n then
x[0]=x[n−1];
i=1;

end for

}

f1= 1664525  is an unsigned
long interger;
f2= 1566083941  is an unsigned long interger;


References (Generation of Random Numbers)

generation of random numbers algorithms,generation of random numbers algorithms,generation of random numbers algorithms
references,references,references

Fishman, G., and L. R. I. Moore. 1981. In search of correlation in multiplicative congruential generators with modulus 2**31-1. In: Computer Science and Statistics, Proceedings of the 13th Symposium on the Interface, W. F. Eddy, eds. New York: Springer-Verlag.

Knuth, D. E. 1981. The Art of Computer Programming, volume 2, p. 106. Reading, MA: Addison-Wesley.

Matsumoto, M., and T. Nishimura. 1998. Mersenne Twister, A 623–dimensionally equidistributed uniform pseudorandom number generator. ACM Trans. on Modeling and Computer Simulation, 8:1, 3-30.

Matsumoto, M., and Y. Kurita. 1994. Twisted GFSR generators II. ACM Trans. on Modeling and Computer Simulation, 4:3, 254-266.

Related Topics

Generation of Uniform Random Numbers
PASW Statistics 12 Compatible Random Number Generator
Mersenne Twister Random Number Generator


Grouped Percentiles

grouped percentiles,grouped percentiles,grouped percentiles
algorithms,algorithms,algorithms
grouped percentiles algorithms,grouped percentiles algorithms,grouped percentiles algorithms

Two summary functions, GMEDIAN and GPTILE are used in procedures such as Frequencies and Graph, to calculate the percentiles for the data which are grouped by specifying a value for each grouping. It is assumed that the actual data values give represent midpoints of the grouped intervals.

Related Topics

Notation (grouped percentiles algorithms)
Finding Percentiles (grouped percentiles algorithms)


Notation (grouped percentiles algorithms)

grouped percentiles algorithms,grouped percentiles algorithms,grouped percentiles algorithms
notation,notation,notation

The following notation is used throughout this section unless otherwise stated:

xi<...<xk | Distinct observed values with frequencies (caseweights) c1,...,ck
k | Number of distinct observed data points
p | percentile/100 (a number between 0 and 1)
ccl | Cumulative frequency up to and including xl

ccl=l−1Σi=1ci+0.5*cl     l=1,...,n

Related Topics

Grouped Percentiles
Finding Percentiles (grouped percentiles algorithms)


Finding Percentiles (grouped percentiles algorithms)

grouped percentiles algorithms,grouped percentiles algorithms,grouped percentiles algorithms
finding percentiles,finding percentiles,finding percentiles

To find the 100pth grouped percentile, first find i such that cci−1≤wp<cci, where w=kΣj=1cj, the total sum of caseweights. Then the grouped percentile is

(1−R)xi−1+Rxi

where

R=wp−cci−1cci−cci−1

Note the following:

• If wp<cc1, the grouped percentile is system missing and a warning message “Since the lower bound of the first interval is unknown, some percentiles are undefined” is produced.

• If wp>cck, the grouped percentile is system missing and a warning message “Since the upper bound of the last interval is unknown, some percentiles are undefined” is produced.

• If wp=cck, the grouped percentile is equal to xk.

Related Topics

Grouped Percentiles
Notation (grouped percentiles algorithms)


Indicator Method

indicator method,indicator method,indicator method
algorithms,algorithms,algorithms
indicator method algorithms,indicator method algorithms,indicator method algorithms

The indicator method is used in the GENLOG and the GLM procedures to generate the design matrix corresponding to the design specified. Under this method, each parameter (either non-redundant or redundant) in the model corresponds uniquely to a column in the design matrix. Therefore, the terms parameter and design matrix column are often used interchangeably without ambiguity.

Related Topics

Notation (indicator method algorithms)
Row Dimension (indicator method algorithms)
Column Dimension (Indicator Method algorithms)
Elements (indicator method algorithms)
Redundancy (indicator method algorithms)
References (indicator method algorithms)


Notation (indicator method algorithms)

indicator method algorithms,indicator method algorithms,indicator method algorithms
notation,notation,notation

The following notation is used throughout this chapter unless otherwise stated:

n | Number of valid observations
p | Number of parameters
X | n×p design matrix (also known as model matrix)
xij | Elements of X

Related Topics

Indicator Method
Row Dimension (indicator method algorithms)
Column Dimension (Indicator Method algorithms)
Elements (indicator method algorithms)
Redundancy (indicator method algorithms)
References (indicator method algorithms)


Row Dimension (indicator method algorithms)

indicator method algorithms,indicator method algorithms,indicator method algorithms
row dimension,row dimension,row dimension

The design matrix has as many rows as the number of valid observations. In the GLM procedure, an observation is a case in the data file. In the GENLOG procedure, an observation is a cell. In both procedures, the observations are uniquely identified by the factor-level combination. Therefore, rows of the design matrix are also uniquely identified by the factor-level combination.

Related Topics

Indicator Method
Notation (indicator method algorithms)
Column Dimension (Indicator Method algorithms)
Elements (indicator method algorithms)
Redundancy (indicator method algorithms)
References (indicator method algorithms)


Column Dimension (Indicator Method algorithms)

indicator method algorithms,indicator method algorithms,indicator method algorithms
column dimension,column dimension,column dimension

The design matrix has as many columns as the number of parameters in the model. Columns of the design matrix are uniquely indexed by the parameters, which are in turn related to factor-level combinations.

Related Topics

Indicator Method
Notation (indicator method algorithms)
Row Dimension (indicator method algorithms)
Elements (indicator method algorithms)
Redundancy (indicator method algorithms)
References (indicator method algorithms)


Elements (indicator method algorithms)

indicator method algorithms,indicator method algorithms,indicator method algorithms
elements,elements,elements

A factor-level combination is contained in another factor-level combination if the following conditions are true:

• All factor levels in the former combination appear in the latter combination.

• There are factor levels in the latter combination which do not appear in the former combination.

For example, the combination [A=1] is contained in [A=1]*[B=3] and so is the combination [B=3]. However, neither [A=3] nor [C=1] is contained in [A=1]*[B=3].

The design matrix X is generated by rows. Elements of the ith row are generated as follows:

• If the jth column corresponds to the intercept term, then xij=1.

• If the jth column is a parameter of a factorial effect which is constituted of factors only, then xij=1 if the factor-level combination of the jth column is contained in that of the ith row. Otherwise xij=0.

• If the jth column is a parameter of an effect involving covariates (or, in the GLM procedure, a product of covariates), then xij is equal to the covariate value (or the product of the covariate values in GLM) of the ith row if the levels combination of the factors of the jth column is contained in that of the ith row. Otherwise xij=0.

Related Topics

Indicator Method
Notation (indicator method algorithms)
Row Dimension (indicator method algorithms)
Column Dimension (Indicator Method algorithms)
Redundancy (indicator method algorithms)
References (indicator method algorithms)


Redundancy (indicator method algorithms)

indicator method algorithms,indicator method algorithms,indicator method algorithms
redundancy,redundancy,redundancy

A parameter is redundant if the corresponding column in the design matrix is linearly dependent on other columns. Linear dependent columns are detected using the SWEEP algorithm by Clarke (1982) and Ridout and Cobby (1989). Redundant parameters are permanently set to zero and their standard errors are set to system missing.

Related Topics

Indicator Method
Notation (indicator method algorithms)
Row Dimension (indicator method algorithms)
Column Dimension (Indicator Method algorithms)
Elements (indicator method algorithms)
References (indicator method algorithms)


References (indicator method algorithms)

indicator method algorithms,indicator method algorithms,indicator method algorithms
references,references,references

Clarke, M. R. B. 1982. Algorithm AS 178: The Gauss-Jordan sweep operator with detection of collinearity. Applied Statistics, 31:2, 166-168.

Ridout, M. S., and J. M. Cobby. 1989. A remark on algorithm AS 178. Applied Statistics, 38, 420-422.

Related Topics

Indicator Method
Notation (indicator method algorithms)
Row Dimension (indicator method algorithms)
Column Dimension (Indicator Method algorithms)
Elements (indicator method algorithms)
Redundancy (indicator method algorithms)


Post Hoc Tests

post hoc tests,post hoc tests,post hoc tests
algorithms,algorithms,algorithms
post hoc tests algorithms,post hoc tests algorithms,post hoc tests algorithms

Post hoc tests are available in more than one procedure, including ONEWAY and GLM.

Related Topics

Notation (Post Hoc Tests algorithms)
Studentized Range and Studentized Maximum Modulus (Post Hoc Tests algorithms)
Methods (Post Hoc Tests algorithms)
Equal Variances (Post Hoc Tests algorithms)
Unequal Sample Sizes and Unequal Variances (Post Hoc Tests algorithms)
References (Post Hoc Tests algorithms)


Notation (Post Hoc Tests algorithms)

post hoc tests algorithms,post hoc tests algorithms,post hoc tests algorithms
notation,notation,notation

The following notation is used throughout this section unless otherwise stated:

k

Number of levels for an effect

ni

Number of observations at level i

xi

Mean at level i

si

Standard deviation of level i

vi

Degrees of freedom for level i, ni−1

spp

Square root of the mean square error

ε

Experimentwise error rate under the complete null hypothesis

α

Comparisonwise error rate

r

Number of steps between means

f

Degrees of freedom for the within-groups mean square kΣi=1(ni−1)

vi , j

Absolute difference between the ith and jth means | xi−xj |

k *

k(k−1)/2

Qi , j

spp
√ 12(1ni+1nj)

nh

Harmonic mean of the sample size nh=k
Σ
1≤i≤k
n−1i

Qh

spp/
√ nh

Related Topics

Post Hoc Tests
Studentized Range and Studentized Maximum Modulus (Post Hoc Tests algorithms)
Methods (Post Hoc Tests algorithms)
Equal Variances (Post Hoc Tests algorithms)
Unequal Sample Sizes and Unequal Variances (Post Hoc Tests algorithms)
References (Post Hoc Tests algorithms)


Studentized Range and Studentized Maximum Modulus (Post Hoc Tests algorithms)

post hoc tests algorithms,post hoc tests algorithms,post hoc tests algorithms
studentized range and studentized maximum modulus,studentized range and studentized maximum modulus,studentized range and studentized maximum modulus

Let x1 , x2 , ... , xr be independent and identically distributed N(μ,σ). Let sm be an estimate of σ with m degrees of freedom, which is independent of the {xi}, and ms2m/σ2˜χ2. Then the quantity

Sr,m=max(x1,...,xr)−min(x1,...,xr)sm

is called the Studentized range. The upper-ε critical point of this distribution is denoted by Sε,r,m.

The quantity

Mr,m=max(|x1|, ... , |xr|)sm

is called the Studentized maximum modulus. The upper-ε critical point of this distribution is denoted as Mε,r,m.

Related Topics

Post Hoc Tests
Notation (Post Hoc Tests algorithms)
Methods (Post Hoc Tests algorithms)
Equal Variances (Post Hoc Tests algorithms)
Unequal Sample Sizes and Unequal Variances (Post Hoc Tests algorithms)
References (Post Hoc Tests algorithms)


Methods (Post Hoc Tests algorithms)

post hoc tests algorithms,post hoc tests algorithms,post hoc tests algorithms
methods,methods,methods

The tests are grouped as follows according to assumptions about sample sizes and variances.

Related Topics

Post Hoc Tests
Notation (Post Hoc Tests algorithms)
Studentized Range and Studentized Maximum Modulus (Post Hoc Tests algorithms)
Equal Variances (Post Hoc Tests algorithms)
Unequal Sample Sizes and Unequal Variances (Post Hoc Tests algorithms)
References (Post Hoc Tests algorithms)


Equal Variances (Post Hoc Tests algorithms)

post hoc tests algorithms,post hoc tests algorithms,post hoc tests algorithms
equal variances,equal variances,equal variances

The tests in this section are based on the assumption that variances are equal.

Related Topics

Waller-Duncan t Test (Post Hoc Tests algorithms)
Constructing Homogeneous Subsets (Post Hoc Tests algorithms)
Range Values (Post Hoc Tests algorithms)
Least Significant Difference (LSD), Bonferroni, and Sidak (Post Hoc Tests algorithms)
Dunnett Tests (Post Hoc Tests algorithms)
Ryan-Einot-Gabriel-Welsch (R-E-G-W) Multiple Stepdown Procedures (Post Hoc Tests algorithms)
Post Hoc Tests
Notation (Post Hoc Tests algorithms)
Studentized Range and Studentized Maximum Modulus (Post Hoc Tests algorithms)
Methods (Post Hoc Tests algorithms)
Unequal Sample Sizes and Unequal Variances (Post Hoc Tests algorithms)
References (Post Hoc Tests algorithms)


Waller-Duncan t Test (Post Hoc Tests algorithms)

post hoc tests algorithms,post hoc tests algorithms,post hoc tests algorithms
Waller-Duncan t test,Waller-Duncan t test,Waller-Duncan t test

The Waller-Duncan t test statistic is given by

vi , j= | xi−xj | ≥tB(w , F , q , f)S
√ 2 / n

where tB ( w , F , q , f ) is the Bayesian t value that depends on w (a measure of the relative seriousness of a Type I error versus a Type II error), the F statistic for the one-way ANOVA,

F=MStreatMSerror

and

S2=MSerror

Here f=k ( n−1 ) and q=k−1. MSerror and MStreat are the usual mean squares in the ANOVA table.

Only homogeneous subsets are given for the Waller-Duncan t test. This method is for equal sample sizes. For unequal sample sizes, the harmonic mean nh is used instead of n.

Related Topics

Equal Variances (Post Hoc Tests algorithms)
Constructing Homogeneous Subsets (Post Hoc Tests algorithms)
Range Values (Post Hoc Tests algorithms)
Least Significant Difference (LSD), Bonferroni, and Sidak (Post Hoc Tests algorithms)
Dunnett Tests (Post Hoc Tests algorithms)
Ryan-Einot-Gabriel-Welsch (R-E-G-W) Multiple Stepdown Procedures (Post Hoc Tests algorithms)


Constructing Homogeneous Subsets (Post Hoc Tests algorithms)

post hoc tests algorithms,post hoc tests algorithms,post hoc tests algorithms
constructing homogeneous subsets,constructing homogeneous subsets,constructing homogeneous subsets

For many tests assuming equal variances, homogeneous subsets are constructed using a range determined by the specific test being used. The following steps are used to construct the homogeneous subsets:

1. Rank the k means in ascending order and denote the ordered means as x ( 1 ) , ... , x ( k ) .

2. Determine the range value, Rε,k,f, for the specific test, as shown in Range Values.

3. If x ( k ) −x ( 1 ) >QhRε,k,f, there is a significant range and the ranges of the two sets of k−1 means {x ( 1 ) , ... , x ( k−1 ) } and {x ( 2 ) , ... , x ( k ) } are compared with QhRε,k−1,f. Smaller subsets of means are examined as long as the previous subset has a significant range. For some tests, Qi,j is used instead of Qh. See the topic Range Values (Post Hoc Tests algorithms) for more information.

4. Each time a range proves nonsignificant, the means involved are included in a single group—a homogeneous subset.

Related Topics

Equal Variances (Post Hoc Tests algorithms)
Waller-Duncan t Test (Post Hoc Tests algorithms)
Range Values (Post Hoc Tests algorithms)
Least Significant Difference (LSD), Bonferroni, and Sidak (Post Hoc Tests algorithms)
Dunnett Tests (Post Hoc Tests algorithms)
Ryan-Einot-Gabriel-Welsch (R-E-G-W) Multiple Stepdown Procedures (Post Hoc Tests algorithms)


Range Values (Post Hoc Tests algorithms)

post hoc tests algorithms,post hoc tests algorithms,post hoc tests algorithms
range values,range values,range values

Following are range values for the various types of tests.

Related Topics

Student-Newman-Keuls (SNK) (Post Hoc Tests algorithms)
Tukey's Honestly Significant Difference Test (TUKEY) (Post Hoc Tests algorithms)
Tukey's b (TUKEYB) (Post Hoc Tests algorithms)
Duncan's Multiple Range Test (DUNCAN) (Post Hoc Tests algorithms)
Scheffé Test (SCHEFFE) (Post Hoc Tests algorithms)
Hochberg's GT2 (GT2) (Post Hoc Tests algorithms)
Gabriel's Pairwise Comparisons Test (GABRIEL) (Post Hoc Tests algorithms)
Waller-Duncan t Test (Post Hoc Tests algorithms)
Constructing Homogeneous Subsets (Post Hoc Tests algorithms)
Least Significant Difference (LSD), Bonferroni, and Sidak (Post Hoc Tests algorithms)
Dunnett Tests (Post Hoc Tests algorithms)
Ryan-Einot-Gabriel-Welsch (R-E-G-W) Multiple Stepdown Procedures (Post Hoc Tests algorithms)


Student-Newman-Keuls (SNK) (Post Hoc Tests algorithms)

post hoc tests algorithms,post hoc tests algorithms,post hoc tests algorithms
Student-Newman-Keuls (SNK),Student-Newman-Keuls (SNK),Student-Newman-Keuls (SNK)
SNK,SNK,SNK

Rε,r,f=Sε,r,f

Related Topics

Range Values (Post Hoc Tests algorithms)
Tukey's Honestly Significant Difference Test (TUKEY) (Post Hoc Tests algorithms)
Tukey's b (TUKEYB) (Post Hoc Tests algorithms)
Duncan's Multiple Range Test (DUNCAN) (Post Hoc Tests algorithms)
Scheffé Test (SCHEFFE) (Post Hoc Tests algorithms)
Hochberg's GT2 (GT2) (Post Hoc Tests algorithms)
Gabriel's Pairwise Comparisons Test (GABRIEL) (Post Hoc Tests algorithms)


Tukey's Honestly Significant Difference Test (TUKEY) (Post Hoc Tests algorithms)

post hoc tests algorithms,post hoc tests algorithms,post hoc tests algorithms
Tukey's honestly significant difference test (TUKEY),Tukey's honestly significant difference test (TUKEY),Tukey's honestly significant difference test (TUKEY)
TUKEY,TUKEY,TUKEY

Rε,r,f=Sε,k,f

The confidence intervals of the mean difference are calculated using Qi,j instead of Qh.

Related Topics

Range Values (Post Hoc Tests algorithms)
Student-Newman-Keuls (SNK) (Post Hoc Tests algorithms)
Tukey's b (TUKEYB) (Post Hoc Tests algorithms)
Duncan's Multiple Range Test (DUNCAN) (Post Hoc Tests algorithms)
Scheffé Test (SCHEFFE) (Post Hoc Tests algorithms)
Hochberg's GT2 (GT2) (Post Hoc Tests algorithms)
Gabriel's Pairwise Comparisons Test (GABRIEL) (Post Hoc Tests algorithms)


Tukey's b (TUKEYB) (Post Hoc Tests algorithms)

post hoc tests algorithms,post hoc tests algorithms,post hoc tests algorithms
Tukey's b (TUKEYB),Tukey's b (TUKEYB),Tukey's b (TUKEYB)
TUKEYB,TUKEYB,TUKEYB

Rε,r,f=Sε,r,f+Sε,k,f2

Related Topics

Range Values (Post Hoc Tests algorithms)
Student-Newman-Keuls (SNK) (Post Hoc Tests algorithms)
Tukey's Honestly Significant Difference Test (TUKEY) (Post Hoc Tests algorithms)
Duncan's Multiple Range Test (DUNCAN) (Post Hoc Tests algorithms)
Scheffé Test (SCHEFFE) (Post Hoc Tests algorithms)
Hochberg's GT2 (GT2) (Post Hoc Tests algorithms)
Gabriel's Pairwise Comparisons Test (GABRIEL) (Post Hoc Tests algorithms)


Duncan's Multiple Range Test (DUNCAN) (Post Hoc Tests algorithms)

post hoc tests algorithms,post hoc tests algorithms,post hoc tests algorithms
Duncan's multiple range test (DUNCAN),Duncan's multiple range test (DUNCAN),Duncan's multiple range test (DUNCAN)
DUNCAN,DUNCAN,DUNCAN

Rε,r,f=Sαr,r,f where αr=1−(1−ε)r−1

Related Topics

Range Values (Post Hoc Tests algorithms)
Student-Newman-Keuls (SNK) (Post Hoc Tests algorithms)
Tukey's Honestly Significant Difference Test (TUKEY) (Post Hoc Tests algorithms)
Tukey's b (TUKEYB) (Post Hoc Tests algorithms)
Scheffé Test (SCHEFFE) (Post Hoc Tests algorithms)
Hochberg's GT2 (GT2) (Post Hoc Tests algorithms)
Gabriel's Pairwise Comparisons Test (GABRIEL) (Post Hoc Tests algorithms)


Scheffé Test (SCHEFFE) (Post Hoc Tests algorithms)

post hoc tests algorithms,post hoc tests algorithms,post hoc tests algorithms
Scheffé test (SCHEFFE),Scheffé test (SCHEFFE),Scheffé test (SCHEFFE)
SCHEFFE,SCHEFFE,SCHEFFE

Rε,r,f=
√ 2( k − 1 )F1−ε( k − 1 ,f)

The confidence intervals of the mean difference are calculated using Qi,j instead of Qh.

Related Topics

Range Values (Post Hoc Tests algorithms)
Student-Newman-Keuls (SNK) (Post Hoc Tests algorithms)
Tukey's Honestly Significant Difference Test (TUKEY) (Post Hoc Tests algorithms)
Tukey's b (TUKEYB) (Post Hoc Tests algorithms)
Duncan's Multiple Range Test (DUNCAN) (Post Hoc Tests algorithms)
Hochberg's GT2 (GT2) (Post Hoc Tests algorithms)
Gabriel's Pairwise Comparisons Test (GABRIEL) (Post Hoc Tests algorithms)


Hochberg's GT2 (GT2) (Post Hoc Tests algorithms)

post hoc tests algorithms,post hoc tests algorithms,post hoc tests algorithms
Hochberg's GT2,Hochberg's GT2,Hochberg's GT2
GT2,GT2,GT2

Rε,r,f=
√ 2
Mε,k*,f

The confidence intervals of the mean difference are calculated using Qi,j instead of Qh.

Related Topics

Range Values (Post Hoc Tests algorithms)
Student-Newman-Keuls (SNK) (Post Hoc Tests algorithms)
Tukey's Honestly Significant Difference Test (TUKEY) (Post Hoc Tests algorithms)
Tukey's b (TUKEYB) (Post Hoc Tests algorithms)
Duncan's Multiple Range Test (DUNCAN) (Post Hoc Tests algorithms)
Scheffé Test (SCHEFFE) (Post Hoc Tests algorithms)
Gabriel's Pairwise Comparisons Test (GABRIEL) (Post Hoc Tests algorithms)


Gabriel's Pairwise Comparisons Test (GABRIEL) (Post Hoc Tests algorithms)

post hoc tests algorithms,post hoc tests algorithms,post hoc tests algorithms
Gabriel's pairwise comparisons test (GABRIEL),Gabriel's pairwise comparisons test (GABRIEL),Gabriel's pairwise comparisons test (GABRIEL)
GABRIEL,GABRIEL,GABRIEL

The test statistic and the critical point are as follows:

|xi−xj|≥spp ( 1
√ 2ni
+1
√ 2nj
) Mε,k*,f

For homogeneous subsets, nh is used instead of ni and nj. The confidence intervals of the mean difference are calculated based on the above equation.

Related Topics

Range Values (Post Hoc Tests algorithms)
Student-Newman-Keuls (SNK) (Post Hoc Tests algorithms)
Tukey's Honestly Significant Difference Test (TUKEY) (Post Hoc Tests algorithms)
Tukey's b (TUKEYB) (Post Hoc Tests algorithms)
Duncan's Multiple Range Test (DUNCAN) (Post Hoc Tests algorithms)
Scheffé Test (SCHEFFE) (Post Hoc Tests algorithms)
Hochberg's GT2 (GT2) (Post Hoc Tests algorithms)


Least Significant Difference (LSD), Bonferroni, and Sidak (Post Hoc Tests algorithms)

post hoc tests algorithms,post hoc tests algorithms,post hoc tests algorithms
least significant difference (LSD), Bonferroni, and Sidak,least significant difference (LSD), Bonferroni, and Sidak,least significant difference (LSD), Bonferroni, and Sidak
LSD,LSD,LSD
Bonferroni,Bonferroni,Bonferroni
Sidak,Sidak,Sidak

For the least significant difference, Bonferroni, and Sidak tests, only pairwise confidence intervals are given. The test statistic is

x i −x j >Qi,jRε,k,f

where the range, Rε,k,f, for each test is provided below.

Related Topics

Least Significant Difference (LSD) (Post Hoc Tests algorithms)
Bonferroni t Test (BONFERRONI or MODLSD) (Post Hoc Tests algorithms)
Sidak t Test (SIDAK) (Post Hoc Tests algorithms)
Waller-Duncan t Test (Post Hoc Tests algorithms)
Constructing Homogeneous Subsets (Post Hoc Tests algorithms)
Range Values (Post Hoc Tests algorithms)
Dunnett Tests (Post Hoc Tests algorithms)
Ryan-Einot-Gabriel-Welsch (R-E-G-W) Multiple Stepdown Procedures (Post Hoc Tests algorithms)


Least Significant Difference (LSD) (Post Hoc Tests algorithms)

post hoc tests algorithms,post hoc tests algorithms,post hoc tests algorithms
least significant difference (LSD),least significant difference (LSD),least significant difference (LSD)
LSD,LSD,LSD

Rα,r,f=
√ 2F1−α(1,f)

Related Topics

Least Significant Difference (LSD), Bonferroni, and Sidak (Post Hoc Tests algorithms)
Bonferroni t Test (BONFERRONI or MODLSD) (Post Hoc Tests algorithms)
Sidak t Test (SIDAK) (Post Hoc Tests algorithms)


Bonferroni t Test (BONFERRONI or MODLSD) (Post Hoc Tests algorithms)

post hoc tests algorithms,post hoc tests algorithms,post hoc tests algorithms
Bonferroni t test (BONFERRONI or MODLSD),Bonferroni t test (BONFERRONI or MODLSD),Bonferroni t test (BONFERRONI or MODLSD)
BONFERRONI,BONFERRONI,BONFERRONI
MODLSD,MODLSD,MODLSD

Rε,r,f=
√ 2F1−α´(1,f)

where α´=ε/k*.

Related Topics

Least Significant Difference (LSD), Bonferroni, and Sidak (Post Hoc Tests algorithms)
Least Significant Difference (LSD) (Post Hoc Tests algorithms)
Sidak t Test (SIDAK) (Post Hoc Tests algorithms)


Sidak t Test (SIDAK) (Post Hoc Tests algorithms)

post hoc tests algorithms,post hoc tests algorithms,post hoc tests algorithms
Sidak t test (SIDAK),Sidak t test (SIDAK),Sidak t test (SIDAK)
SIDAK,SIDAK,SIDAK

Rε,r,f=
√ 2F1−α,1,f

where α=1−(1−ε)2k ( k−1 ) .

Related Topics

Least Significant Difference (LSD), Bonferroni, and Sidak (Post Hoc Tests algorithms)
Least Significant Difference (LSD) (Post Hoc Tests algorithms)
Bonferroni t Test (BONFERRONI or MODLSD) (Post Hoc Tests algorithms)


Dunnett Tests (Post Hoc Tests algorithms)

post hoc tests algorithms,post hoc tests algorithms,post hoc tests algorithms
Dunnett tests,Dunnett tests,Dunnett tests

For the Dunnett tests, confidence intervals are given only for the difference between the control group and the other groups.

Related Topics

Dunnett's Two-Tailed t Test (DUNNETT) (Post Hoc Tests algorithms)
Dunnett's One-Tailed t Test (DUNNETTL) (Post Hoc Tests algorithms)
Dunnett's One-Tailed t Test (DUNNETTR) (Post Hoc Tests algorithms)
Waller-Duncan t Test (Post Hoc Tests algorithms)
Constructing Homogeneous Subsets (Post Hoc Tests algorithms)
Range Values (Post Hoc Tests algorithms)
Least Significant Difference (LSD), Bonferroni, and Sidak (Post Hoc Tests algorithms)
Ryan-Einot-Gabriel-Welsch (R-E-G-W) Multiple Stepdown Procedures (Post Hoc Tests algorithms)


Dunnett's Two-Tailed t Test (DUNNETT) (Post Hoc Tests algorithms)

post hoc tests algorithms,post hoc tests algorithms,post hoc tests algorithms
Dunnett's two-tailed t test (DUNNETT),Dunnett's two-tailed t test (DUNNETT),Dunnett's two-tailed t test (DUNNETT)
DUNNET,DUNNET,DUNNET

When a set of new treatments (xi) is compared with a control (x0), Dunnett's two-tailed t test is usually used under the equal variances assumption.

For two-tailed tests,

vi , 0=|xi−x0|>dεk,vsdd
√ 1n0+1ni

where dεk,v is the upper 100ε percentage point of the distribution of

T=
max
1≤i≤k
{|Ti|}

where Ti=(xi−x0)sdd
√ 1n0+1ni
and s2dd=Σki=0Σnij=1(xij−xi . )2Σki=0(ni−1)

Related Topics

Dunnett Tests (Post Hoc Tests algorithms)
Dunnett's One-Tailed t Test (DUNNETTL) (Post Hoc Tests algorithms)
Dunnett's One-Tailed t Test (DUNNETTR) (Post Hoc Tests algorithms)


Dunnett's One-Tailed t Test (DUNNETTL) (Post Hoc Tests algorithms)

post hoc tests algorithms,post hoc tests algorithms,post hoc tests algorithms
Dunnett's one-tailed t test (DUNNETTL),Dunnett's one-tailed t test (DUNNETTL),Dunnett's one-tailed t test (DUNNETTL)
DUNNETTL,DUNNETTL,DUNNETTL

This Dunnett's one-tailed t test indicates whether the mean at any level is smaller than a reference category.

xi−x0>dUεk , vsdd
√ 1n0+1ni

where dUεk,v is the upper 100ε percentage point of the distribution of

T=
max
1≤i≤k
{ Ti }

Confidence intervals are given only for the difference between the control group and the other groups.

Related Topics

Dunnett Tests (Post Hoc Tests algorithms)
Dunnett's Two-Tailed t Test (DUNNETT) (Post Hoc Tests algorithms)
Dunnett's One-Tailed t Test (DUNNETTR) (Post Hoc Tests algorithms)


Dunnett's One-Tailed t Test (DUNNETTR) (Post Hoc Tests algorithms)

post hoc tests algorithms,post hoc tests algorithms,post hoc tests algorithms
Dunnett's one-tailed t test (DUNNETTR),Dunnett's one-tailed t test (DUNNETTR),Dunnett's one-tailed t test (DUNNETTR)
DUNNETTR,DUNNETTR,DUNNETTR

This Dunnett's one-tailed t test indicates whether the mean at any level is larger than a reference category.

xi−x0<dLεk , vsdd
√ 1n0+1ni

where dLεk,v is the upper 100ε percentage point of the distribution of

T=
max
1≤i≤k
{Ti}

Confidence intervals are given only for the difference between the control group and the other groups.

Related Topics

Dunnett Tests (Post Hoc Tests algorithms)
Dunnett's Two-Tailed t Test (DUNNETT) (Post Hoc Tests algorithms)
Dunnett's One-Tailed t Test (DUNNETTL) (Post Hoc Tests algorithms)


Ryan-Einot-Gabriel-Welsch (R-E-G-W) Multiple Stepdown Procedures (Post Hoc Tests algorithms)

post hoc tests algorithms,post hoc tests algorithms,post hoc tests algorithms
Ryan-Einot-Gabriel-Welsch (R-E-G-W) multiple stepdown procedures,Ryan-Einot-Gabriel-Welsch (R-E-G-W) multiple stepdown procedures,Ryan-Einot-Gabriel-Welsch (R-E-G-W) multiple stepdown procedures
R-E-G-W,R-E-G-W,R-E-G-W

For the R-E-G-W F test and the R-E-G-W Q test, a new significant level, γr, based on the number of steps between means is introduced:

γr={
1− ( 1−ε ) r / k | if r<k−1
ε | if r≥k−1

Note: For homogeneous subsets, the ni and nj are used for the R-E-G-W F test and the R-E-G-W Q test. To apply these methods, the procedures are same as in Constructing Homogeneous Subsets (Post Hoc Tests algorithms), using the tests provided below.

Related Topics

Ryan-Einot-Gabriel-Welsch Based on the Studentized Range Test (QREGW) (Post Hoc Tests algorithms)
Ryan-Einot-Gabriel-Welsch Procedure Based on an F Test (FREGW) (Post Hoc Tests algorithms)
Waller-Duncan t Test (Post Hoc Tests algorithms)
Constructing Homogeneous Subsets (Post Hoc Tests algorithms)
Range Values (Post Hoc Tests algorithms)
Least Significant Difference (LSD), Bonferroni, and Sidak (Post Hoc Tests algorithms)
Dunnett Tests (Post Hoc Tests algorithms)


Ryan-Einot-Gabriel-Welsch Based on the Studentized Range Test (QREGW) (Post Hoc Tests algorithms)

post hoc tests algorithms,post hoc tests algorithms,post hoc tests algorithms
Ryan-Einot-Gabriel-Welsch based on the studentized range test (QREGW),Ryan-Einot-Gabriel-Welsch based on the studentized range test (QREGW),Ryan-Einot-Gabriel-Welsch based on the studentized range test (QREGW)
QREGW,QREGW,QREGW

The R-E-G-W Q test is based on

max
i,jR
{(xi−xj)
√ min(ni,nj)
}/spp≥Sγr , r , f

Related Topics

Ryan-Einot-Gabriel-Welsch (R-E-G-W) Multiple Stepdown Procedures (Post Hoc Tests algorithms)
Ryan-Einot-Gabriel-Welsch Procedure Based on an F Test (FREGW) (Post Hoc Tests algorithms)


Ryan-Einot-Gabriel-Welsch Procedure Based on an F Test (FREGW) (Post Hoc Tests algorithms)

post hoc tests algorithms,post hoc tests algorithms,post hoc tests algorithms
Ryan-Einot-Gabriel-Welsch procedure based on an F test (FREGW),Ryan-Einot-Gabriel-Welsch procedure based on an F test (FREGW),Ryan-Einot-Gabriel-Welsch procedure based on an F test (FREGW)

The R-E-G-W F test is based on

(
Σ
iR
nix2i−(
Σ
iR
nixi)2/
Σ
iR
ni)(r−1)s2pp≥Fγr,r−1,f

where r=j−i+1 and summations are over R={i,...,j}.

Related Topics

Ryan-Einot-Gabriel-Welsch (R-E-G-W) Multiple Stepdown Procedures (Post Hoc Tests algorithms)
Ryan-Einot-Gabriel-Welsch Based on the Studentized Range Test (QREGW) (Post Hoc Tests algorithms)


Unequal Sample Sizes and Unequal Variances (Post Hoc Tests algorithms)

post hoc tests algorithms,post hoc tests algorithms,post hoc tests algorithms
unequal sample sizes and unequal variances,unequal sample sizes and unequal variances,unequal sample sizes and unequal variances

The tests in this section are based on assumptions that variances are unequal and sample sizes are unequal. An estimate of the degrees of freedom is used. The estimator is

v=(s2i/ni+s2j/nj)2s4i/n2ivi+s4j/n2jvj

Two means are significantly different if

|xi−xj|≥Q*i,jRε,r,v

where

Q*i,j=
√ s2ini+s2jnj

and Rε,r,γ depends on the specific test being used, as listed below.

For the Games-Howell, Tamhane's T2, Dunnett's T3, and Dunnett's C tests, only pairwise confidence intervals are given.

Related Topics

Games-Howell Pairwise Comparison Test (GH) (Post Hoc Tests algorithms)
Tamhane's T2 (T2) (Post Hoc Tests algorithms)
Dunnett's T3 (T3) (Post Hoc Tests algorithms)
Dunnett's C (C) (Post Hoc Tests algorithms)
Post Hoc Tests
Notation (Post Hoc Tests algorithms)
Studentized Range and Studentized Maximum Modulus (Post Hoc Tests algorithms)
Methods (Post Hoc Tests algorithms)
Equal Variances (Post Hoc Tests algorithms)
References (Post Hoc Tests algorithms)


Games-Howell Pairwise Comparison Test (GH) (Post Hoc Tests algorithms)

post hoc tests algorithms,post hoc tests algorithms,post hoc tests algorithms
Games-Howell pairwise comparison test (GH),Games-Howell pairwise comparison test (GH),Games-Howell pairwise comparison test (GH)
GH,GH,GH

Rε,r,v=Sε,k,v/
√ 2

Related Topics

Unequal Sample Sizes and Unequal Variances (Post Hoc Tests algorithms)
Tamhane's T2 (T2) (Post Hoc Tests algorithms)
Dunnett's T3 (T3) (Post Hoc Tests algorithms)
Dunnett's C (C) (Post Hoc Tests algorithms)


Tamhane's T2 (T2) (Post Hoc Tests algorithms)

post hoc tests algorithms,post hoc tests algorithms,post hoc tests algorithms
Tamhane's T2 (T2),Tamhane's T2 (T2),Tamhane's T2 (T2)
T2,T2,T2

Rε,r,v=
√ Fγ,1,v
=tγ,v where γ=1−(1−ε)1/k*

Related Topics

Unequal Sample Sizes and Unequal Variances (Post Hoc Tests algorithms)
Games-Howell Pairwise Comparison Test (GH) (Post Hoc Tests algorithms)
Dunnett's T3 (T3) (Post Hoc Tests algorithms)
Dunnett's C (C) (Post Hoc Tests algorithms)


Dunnett's T3 (T3) (Post Hoc Tests algorithms)

post hoc tests algorithms,post hoc tests algorithms,post hoc tests algorithms
Dunnett's T3 (T3),Dunnett's T3 (T3),Dunnett's T3 (T3)
T3,T3,T3

Rε,r,v=Mε,k*,v

Related Topics

Unequal Sample Sizes and Unequal Variances (Post Hoc Tests algorithms)
Games-Howell Pairwise Comparison Test (GH) (Post Hoc Tests algorithms)
Tamhane's T2 (T2) (Post Hoc Tests algorithms)
Dunnett's C (C) (Post Hoc Tests algorithms)


Dunnett's C (C) (Post Hoc Tests algorithms)

post hoc tests algorithms,post hoc tests algorithms,post hoc tests algorithms
Dunnett's C (C),Dunnett's C (C),Dunnett's C (C)
C,C,C

Rε,r,v=(Sε,k,ni−1s2i/ni+Sε,k,nj−1s2j/nj)/
√ 2
s2i/ni+s2j/nj

Related Topics

Unequal Sample Sizes and Unequal Variances (Post Hoc Tests algorithms)
Games-Howell Pairwise Comparison Test (GH) (Post Hoc Tests algorithms)
Tamhane's T2 (T2) (Post Hoc Tests algorithms)
Dunnett's T3 (T3) (Post Hoc Tests algorithms)


References (Post Hoc Tests algorithms)

post hoc tests algorithms,post hoc tests algorithms,post hoc tests algorithms
references,references,references

Cheng, P. H., and C. Y. K. Meng. 1992. A New Formula for Tail probabilities of DUNNETT's T with Unequal Sample Sizes. ASA Proc. Stat. Comp., , 177-182.

Duncan, D. B. 1955. Multiple Range and Multiple F tests. Biometrics, 11, 1-42.

Duncan, D. B. 1975. t Tests and Intervals for Comparisons Suggested by the Data. Biometrics, 31, 339-360.

Dunnett, C. W. 1955. A Multiple Comparisons Procedure for Comparing Several Treatments with a Control. Journal of the American Statistical Association, 50, 1096-1121.

Dunnett, C. W. 1980. Pairwise Multiple Comparisons in Homogeneous Variance, Unequal Sample Size Case. Journal of the American Statistical Association, 75, 789-795.

Dunnett, C. W. 1980. Pairwise Multiple Comparisons in the Unequal Variance Case. Journal of the American Statistical Association, 75, 796-800.

Dunnett, C. W. 1989. Multivariate Normal Probability Integrals with Product Correlation Structure. Applied Statistics, 38, 564-571.

Einot, I., and K. R. Gabriel. 1975. A Study of the powers of Several Methods of Multiple Comparisons. Journal of the American Statistical Association, 70, 574-783.

Gabriel, K. R. 1978. A Simple method of Multiple Comparisons of Means. Journal of the American Statistical Association, 73, 724-729.

Games, P. A., and J. F. Howell. 1976. Pairwise Multiple Comparison Procedures with Unequal N's and/or Variances: A Monte Carlo Study. Journal of Educational Statistics, 1, 113-125.

Gebhardt, F. 1966. Approximation to the Critical Values for Duncan's Multiple Range Test. Biometrics, 22, 179-182.

Hochberg, Y. 1974. Some Generalizations of the T-method in Simultaneous Inference. Journal of Multivariate Analysis, 4, 224-234.

Hochberg, Y., and A. C. Tamhane. 1987. Multiple Comparison Procedures. New York: John Wiley & Sons, Inc..

Hsu, J. C. 1989. Multiple Comparison Procedures. : American Statistical Association Short Course.

Miller, R. G. 1980. Simultaneous Statistical Inference, 2 ed. New York: Springer-Verlag.

Milliken, G., and D. Johnson. 1992. Analysis of Messy Data: Volume 1. Designed Experiments. New York: Chapman & Hall.

Ramsey, P. H. 1978. Power Differences Between Pairwise Multiple Comparisons. Journal of the American Statistical Association, 73, 479-485.

Ryan, T. A. 1959. Multiple Comparisons in Psychological Research. Psychological Bulletin, 56, 26-47.

Ryan, T. A. 1960. Significance Tests for Multiple Comparison of Proportions, Variances, and Other Statistics. Psychological Bulletin, 57, 318-328.

Scheffe, H. 1953. A method for judging all contrasts in the analysis of variance. Biometrika, 40, 87-104.

Scheffe, H. 1959. The Analysis of Variance. New York: John Wiley & Sons, Inc..

Searle, S. R. 1971. Linear Models. New York: John Wiley & Sons, Inc.

Sidak, Z. 1967. Rectangular confidence regions for the means of multivariate normal distributions. Journal of the American Statistical Association, 62, 626-633.

SAS Institute, Inc., . 1990. SAS/STAT User's Guide, Version 6, 4 ed. Cary, NC: SAS Institute Inc..

Tamhane, A. C. 1977. Multiple Comparisons in Model I One-Way ANOVA with Unequal Variances. Communications in Statistics, 6, 15-32.

Tamhane, A. C. 1979. A Comparison of Procedures for Multiple Comparisons of Means with Unequal Variances. Journal of the American Statistical Association, 74, 471-480.

Waller, R. A., and D. B. Duncan. 1969. A Bayes Rule for the Symmetric Multiple Comparison Problem. Journal of the American Statistical Association, 64, 1484-1499.

Waller, R. A., and D. B. Duncan. 1972. . Journal of the American Statistical Association, 67, 253-255.

Waller, R. A., and K. E. Kemp. 1975. Computations of Bayesian t-value for Multiple Comparison. Journal of statistical computation and simulation, 4, 169-172.

Welsch, R. E. 1977. Stepwise Multiple Comparison Procedures. Journal of the American Statistical Association, 72, 566-575.

Related Topics

Post Hoc Tests
Notation (Post Hoc Tests algorithms)
Studentized Range and Studentized Maximum Modulus (Post Hoc Tests algorithms)
Methods (Post Hoc Tests algorithms)
Equal Variances (Post Hoc Tests algorithms)
Unequal Sample Sizes and Unequal Variances (Post Hoc Tests algorithms)


Sums of Squares

sums of squares algorithms,sums of squares algorithms,sums of squares algorithms

This appendix describes methods for computing sums of squares.

Related Topics

Notation (Sums of Squares algorithms)
Type I Sum of Squares and Hypothesis Matrix (Sums of Squares algorithms)
Type II Sum of Squares and Hypothesis Matrix (Sums of Squares algorithms)
Type III Sum of Squares and Hypothesis Matrix (Sums of Squares algorithms)
Type IV Sum of Squares and Hypothesis Matrix (Sums of Squares algorithms)


Notation (Sums of Squares algorithms)

sums of squares algorithms,sums of squares algorithms,sums of squares algorithms
notation,notation,notation

The notation used in this appendix is the same as that in the GLM Univariate and Multivariate chapter.

Related Topics

Sums of Squares
Type I Sum of Squares and Hypothesis Matrix (Sums of Squares algorithms)
Type II Sum of Squares and Hypothesis Matrix (Sums of Squares algorithms)
Type III Sum of Squares and Hypothesis Matrix (Sums of Squares algorithms)
Type IV Sum of Squares and Hypothesis Matrix (Sums of Squares algorithms)


Type I Sum of Squares and Hypothesis Matrix (Sums of Squares algorithms)

sums of squares algorithms,sums of squares algorithms,sums of squares algorithms
type I sum of squares and hypothesis matrix,type I sum of squares and hypothesis matrix,type I sum of squares and hypothesis matrix

The Type I sum of squares is computed by fitting the model in steps according to the order of the effects specified in the design and recording the difference in error sum of squares (ESS) at each step.

By applying the SWEEP operator on the rows and columns of the augmented matrix Z´WZ, of dimension (p+r)×(p+r), the Type I sum of squares and its hypothesis matrix for each effect (except for the intercept effect, if any) is obtained.

Related Topics

Calculating the Sum of Squares (Sums of Squares algorithms)
Constructing a Hypothesis Matrix (Sums of Squares algorithms)
Sums of Squares
Notation (Sums of Squares algorithms)
Type II Sum of Squares and Hypothesis Matrix (Sums of Squares algorithms)
Type III Sum of Squares and Hypothesis Matrix (Sums of Squares algorithms)
Type IV Sum of Squares and Hypothesis Matrix (Sums of Squares algorithms)


Calculating the Sum of Squares (Sums of Squares algorithms)

sums of squares algorithms,sums of squares algorithms,sums of squares algorithms
calculating the sum of squares (type I),calculating the sum of squares (type I),calculating the sum of squares (type I)

The following procedure is used to find the Type I sum of squares for effect F:

Let the order of effects specified in the design be F0, F1, F2, ..., Fm. The columns of X are partitioned into X0, X1, X2, ..., Xm, where X0=1 corresponds to the intercept effect F0, and the columns in the submatrix Xj correspond to effect Fj, j=0,1,...,m.

Let Fj be the effect F of interest. Let ESSj-1(l) and ESSj(l) be the lth diagonal elements of the r×r lower diagonal submatrix of Z´WZ after the SWEEP operator is applied to the columns associated with X0, X1, X2, ..., Xj, . When the lth column of Y is used as the dependent variable, the Type I sum of squares for effect Fj is ESS j−1(l)− ESS j(l), l=1,...,r, where ESS-1(l) is defined as 0.

Related Topics

Type I Sum of Squares and Hypothesis Matrix (Sums of Squares algorithms)
Constructing a Hypothesis Matrix (Sums of Squares algorithms)


Constructing a Hypothesis Matrix (Sums of Squares algorithms)

sums of squares algorithms,sums of squares algorithms,sums of squares algorithms
constructing a hypothesis matrix (type I),constructing a hypothesis matrix (type I),constructing a hypothesis matrix (type I)

The hypothesis matrix L is constructed using the following steps:

1. Let L0 be the upper diagonal p×p submatrix of Z´WZ after the SWEEP operator is applied to the columns associated with the effects preceding F. Set the columns and rows of L0 , which are associated with the effects preceding F, to 0.

2. For the rows of L0 associated with the effects ordered after Fj, if any, set the corresponding rows of L0 to 0. Remove all of the 0 rows in the matrix L0. The row dimension of L0 is then less than p.

3. Use row operations on the rows of L0 to remove any linearly dependent rows. The set of all nonzero rows of L0 forms a Type I hypothesis matrix L.

Related Topics

Type I Sum of Squares and Hypothesis Matrix (Sums of Squares algorithms)
Calculating the Sum of Squares (Sums of Squares algorithms)


Type II Sum of Squares and Hypothesis Matrix (Sums of Squares algorithms)

sums of squares algorithms,sums of squares algorithms,sums of squares algorithms
type II sum of squares and hypothesis matrix,type II sum of squares and hypothesis matrix,type II sum of squares and hypothesis matrix

A Type II sum of squares is the reduction in ESS due to adding an effect after all other terms have been added to the model except effects that contain the effect being tested.

For any two effects F and F', F is contained in F' if the following conditions are true:

• Both effects F and F' involve the same covariate, if any.

• F' consists of more factors than F.

• All factors in F also appear in F'.

Intercept Effect. The intercept effect μ is contained in all the pure factor effects. However, it is not contained in any effect involving a covariate. No other effect is contained in the intercept effect.

Related Topics

Calculating the Sum of Squares (Sums of Squares algorithms)
Constructing a Hypothesis Matrix (Sums of Squares algorithms)
Sums of Squares
Notation (Sums of Squares algorithms)
Type I Sum of Squares and Hypothesis Matrix (Sums of Squares algorithms)
Type III Sum of Squares and Hypothesis Matrix (Sums of Squares algorithms)
Type IV Sum of Squares and Hypothesis Matrix (Sums of Squares algorithms)


Calculating the Sum of Squares (Sums of Squares algorithms)

sums of squares algorithms,sums of squares algorithms,sums of squares algorithms
calculating the sum of squares (type II),calculating the sum of squares (type II),calculating the sum of squares (type II)

To find the Type II (and also Type III and IV) sum of squares associated with any effect F, you must distinguish which effects in the model contain F and which do not. The columns of X can then be partitioned into three groups: X1, X2 and X3, where:

• X1 consists of columns of X that are associated with effects that do not contain F.

• X2 consists of columns that are associated with F.

• X3 consists of columns that are associated with effects that contain F.

The SWEEP operator applied on the augmented matrix Z´WZ is used to find the Type II sum of squares for each effect. The order of sweeping is determined by the “contained” relationship between the effect being tested and all other effects specified in the design.

Once the ordering is defined, the Type II sum of squares and its hypothesis matrix L can be obtained by a procedure similar to that used for the Type I sum of squares.

Related Topics

Type II Sum of Squares and Hypothesis Matrix (Sums of Squares algorithms)
Constructing a Hypothesis Matrix (Sums of Squares algorithms)


Constructing a Hypothesis Matrix (Sums of Squares algorithms)

sums of squares algorithms,sums of squares algorithms,sums of squares algorithms
constructing a hypothesis matrix (type II),constructing a hypothesis matrix (type II),constructing a hypothesis matrix (type II)

A hypothesis matrix L for the effect F has the form

L=(
0 CX´ 2 W12M1W12X 2 CX´ 2 W12M1W12X 3
)

where

M1=I−W12X1(X´1WX1)*X1W12

C=(X´2W12M1W12X2)*

A* is a g2 generalized inverse of a symmetric matrix A.

Related Topics

Type II Sum of Squares and Hypothesis Matrix (Sums of Squares algorithms)
Calculating the Sum of Squares (Sums of Squares algorithms)


Type III Sum of Squares and Hypothesis Matrix (Sums of Squares algorithms)

sums of squares algorithms,sums of squares algorithms,sums of squares algorithms
type III sum of squares and hypothesis matrix,type III sum of squares and hypothesis matrix,type III sum of squares and hypothesis matrix

The Type III sum of squares for an effect F can best be described as the sum of squares for F adjusted for effects that do not contain it, and orthogonal to effects (if any) that contain it.

Related Topics

Constructing a Hypothesis Matrix (Sums of Squares algorithms)
Calculating the Sum of Squares (Sums of Squares algorithms)
Sums of Squares
Notation (Sums of Squares algorithms)
Type I Sum of Squares and Hypothesis Matrix (Sums of Squares algorithms)
Type II Sum of Squares and Hypothesis Matrix (Sums of Squares algorithms)
Type IV Sum of Squares and Hypothesis Matrix (Sums of Squares algorithms)


Constructing a Hypothesis Matrix (Sums of Squares algorithms)

sums of squares algorithms,sums of squares algorithms,sums of squares algorithms
constructing a hypothesis matrix (type III),constructing a hypothesis matrix (type III),constructing a hypothesis matrix (type III)

A Type III hypothesis matrix L for an effect F is constructed using the following steps:

1. The design matrix X is reordered such that the columns can be grouped in three parts as described in the Type II approach. Compute H=(X´WX)*X´WX. Notice that the columns of H can also be partitioned into three parts: the columns corresponding to effects not containing F, the columns corresponding to the effect F, and the columns corresponding to the effects containing F (if any).

2. The columns of those effects not containing F (except F) are set to 0 by means of the row operation. That is:

a) For each of those columns that is not already 0, fix any nonzero element in that column and call this nonzero element the pivot element.

b) Divide the row that corresponds to the pivot element by the value of the pivot element itself.

c) Use row operations to introduce zeros to all other nonzero elements (except the pivot element itself) in that column.

d) Set the whole row containing the pivot element to 0. The column and the row corresponding to this pivot element should now be 0.

e) Continue the process for the next column that is not 0 until all columns corresponding to those effects that do not contain F are 0.

3. For each column associated with effect F, find a nonzero element, use it as pivot, and perform the Gaussian elimination method as described in a, b, and c of step 2. After all such columns are processed, remove all of the 0 rows from the resulting matrix. If there is no column corresponding to effects containing F (which is the case when F contains all other effects), the matrix just constructed is the Type III hypothesis matrix for effect F. If there are columns corresponding to effects that contain F, continue with step 4.

4. The rows of the resulting matrix in step 3 can now be categorized into two groups. In one group, the columns corresponding to the effect F are all 0; call this group of rows G0. In the other group, those columns are nonzero; call this group of rows G1. Notice that the rows in G0 form a generating basis for the effects that contain F. Transform the rows in G1 such that they are orthogonal to any rows in G0.

Related Topics

Type III Sum of Squares and Hypothesis Matrix (Sums of Squares algorithms)
Calculating the Sum of Squares (Sums of Squares algorithms)


Calculating the Sum of Squares (Sums of Squares algorithms)

sums of squares algorithms,sums of squares algorithms,sums of squares algorithms
calculating the sum of squares (type III),calculating the sum of squares (type III),calculating the sum of squares (type III)

Once a hypothesis matrix is constructed, the corresponding sum of squares can be calculated by (L
^
B
)´(LGL´)*L
^
B
.

Related Topics

Type III Sum of Squares and Hypothesis Matrix (Sums of Squares algorithms)
Constructing a Hypothesis Matrix (Sums of Squares algorithms)


Type IV Sum of Squares and Hypothesis Matrix (Sums of Squares algorithms)

sums of squares algorithms,sums of squares algorithms,sums of squares algorithms
type IV sum of squares and hypothesis matrix,type IV sum of squares and hypothesis matrix,type IV sum of squares and hypothesis matrix

A hypothesis matrix L of a Type IV sum of squares for an effect F is constructed such that for each row of L, the columns corresponding to effect F are distributed equitably across the columns of effects containing F. Such a distribution is affected by the availability and the pattern of the nonmissing cells.

Related Topics

Constructing a Hypothesis Matrix (Sums of Squares algorithms)
Calculating the Sum of Squares (Sums of Squares algorithms)
Sums of Squares
Notation (Sums of Squares algorithms)
Type I Sum of Squares and Hypothesis Matrix (Sums of Squares algorithms)
Type II Sum of Squares and Hypothesis Matrix (Sums of Squares algorithms)
Type III Sum of Squares and Hypothesis Matrix (Sums of Squares algorithms)


Constructing a Hypothesis Matrix (Sums of Squares algorithms)

sums of squares algorithms,sums of squares algorithms,sums of squares algorithms
constructing a hypothesis matrix (type IV),constructing a hypothesis matrix (type IV),constructing a hypothesis matrix (type IV)

A Type IV hypothesis matrix L for effect F is constructed using the following steps:

1. Perform steps 1, 2, and 3 as described for the Type III sum of squares.

2. If there are no columns corresponding to the effects containing F, the resulting matrix is a Type IV hypothesis matrix for effect F. If there are columns corresponding to the effects containing F, the following step is needed.

3. First, notice that each column corresponding to effect F represents a level in F. Moreover, the values in these columns can be viewed as the coefficients of a contrast for comparing different levels in F. For each row, the values of the columns corresponding to the effects that contain F are based on the values in that contrast. The final hypothesis matrix L consists of rows with nonzero columns corresponding to effect A. For each row with nonzero columns corresponding to effect F:

a) If the value of any column (or level) corresponding to effect F is 0, set to 0 all values of columns corresponding to effects containing F and involving that level of F.

b) For columns (or levels) of F that have nonzero values, count the number of times that those levels occur in one or more common levels of the other effects. This count will be based on the availability of the nonmissing cells in the data. Then set each column corresponding to an effect that contains F and involves that level of F to the value of the column that corresponds to that level of F divided by the count.

c) If any value of the column corresponding to an effect that contains F and involves a level (column) of F is undetermined, while the value for that level (column) of F is nonzero, set the value to 0 and claim that the hypothesis matrix created may not be unique.

Related Topics

Type IV Sum of Squares and Hypothesis Matrix (Sums of Squares algorithms)
Calculating the Sum of Squares (Sums of Squares algorithms)


Calculating the Sum of Squares (Sums of Squares algorithms)

sums of squares algorithms,sums of squares algorithms,sums of squares algorithms
calculating the sum of squares (type IV),calculating the sum of squares (type IV),calculating the sum of squares (type IV)

Once a hypothesis matrix is constructed, the corresponding sum of squares can be calculated by (L
^
B
)´(LGL´)*L
^
B
. The corresponding degrees of freedom for this test is the row rank of the hypothesis matrix.

Related Topics

Type IV Sum of Squares and Hypothesis Matrix (Sums of Squares algorithms)
Constructing a Hypothesis Matrix (Sums of Squares algorithms)


Distribution and Special Functions

cumulative distribution functions,cumulative distribution functions,cumulative distribution functions
algorithms,algorithms,algorithms
percentile functions,percentile functions,percentile functions
algorithms,algorithms,algorithms
random number functions,random number functions,random number functions
algorithms,algorithms,algorithms

The functions described in this appendix are used in more than one procedure. They are grouped into the following categories:

• Continuous Distributions. Beta, Cauchy, chi-square, exponential, F, gamma, Laplace, logistic, lognormal, normal, noncentral beta, noncentral chi-square, noncentral F, noncentral Student’s t, Pareto, Student’s t, uniform, and Weibull

• Discrete Distributions. Bernoulli, binomial, geometric, hypergeometric, negative binomial, and Poisson

• Special Functions. Gamma function, beta function, incomplete gamma function (ratio), incomplete beta function (ratio), and standard normal function

Related Topics

Notation (Distribution and Special Functions algorithms)
Continuous Distributions (Distribution and Special Functions algorithms)
Discrete Distributions (Distribution and Special Functions algorithms)
Special Functions (Distribution and Special Functions algorithms)
Algorithm Index (Distribution and Special Functions algorithms)
References (Distribution and Special Functions algorithms)


Notation (Distribution and Special Functions algorithms)

The following notation is used throughout this chapter unless otherwise stated:

f(x) | Density function of continuous random variable X or probability mass function of discrete random variable X
F(x) | Cumulative distribution function of continuous or discrete variable X
F−1(x) | Inverse cumulative distribution function of X

Related Topics

Distribution and Special Functions
Continuous Distributions (Distribution and Special Functions algorithms)
Discrete Distributions (Distribution and Special Functions algorithms)
Special Functions (Distribution and Special Functions algorithms)
Algorithm Index (Distribution and Special Functions algorithms)
References (Distribution and Special Functions algorithms)


Continuous Distributions (Distribution and Special Functions algorithms)

These are functions of a single scale variable.

• Beta

• Cauchy

• Chi-Square

• Exponential

• F

• Gamma

• Laplace

• Logistic

• Lognormal

• Normal

• Noncentral beta

• Noncentral chi-Square

• Noncentral F

• Noncentral Student's t

• Pareto

• Student's t

• Uniform

• Weibull

Related Topics

Beta (Distribution and Special Functions algorithms)
Bivariate Normal (Distribution and Special Functions algorithms)
Cauchy (Distribution and Special Functions algorithms)
Chi-Square (Distribution and Special Functions algorithms)
Exponential (Distribution and Special Functions algorithms)
F (Distribution and Special Functions algorithms)
Gamma (Distribution and Special Functions algorithms)
Half-normal (Distribution and Special Functions algorithms)
Inverse Gaussian (Distribution and Special Functions algorithms)
Laplace (Distribution and Special Functions algorithms)
Logistic (Distribution and Special Functions algorithms)
Lognormal (Distribution and Special Functions algorithms)
Noncentral Beta (Distribution and Special Functions algorithms)
Noncentral Chi-Square (Distribution and Special Functions algorithms)
Noncentral F (Distribution and Special Functions algorithms)
Noncentral Student's t (Distribution and Special Functions algorithms)
Normal (Distribution and Special Functions algorithms)
Pareto (Distribution and Special Functions algorithms)
Studentized Maximum Modulus (Distribution and Special Functions algorithms)
Studentized Range (Distribution and Special Functions algorithms)
Student's t (Distribution and Special Functions algorithms)
Uniform (Distribution and Special Functions algorithms)
Weibull (Distribution and Special Functions algorithms)
Distribution and Special Functions
Notation (Distribution and Special Functions algorithms)
Discrete Distributions (Distribution and Special Functions algorithms)
Special Functions (Distribution and Special Functions algorithms)
Algorithm Index (Distribution and Special Functions algorithms)
References (Distribution and Special Functions algorithms)


Beta (Distribution and Special Functions algorithms)

beta distribution function,beta distribution function,beta distribution function
algorithms,algorithms,algorithms

Random Number Generation

Special case (a=1 or b=1)

1. Generate U from Uniform(0,1).

2. If a=1, set X=1−(1−U)1/b.

3. If b=1, set X=U1/a.

4. If both a=1 and b=1, set X=U.

Algorithm BN due to Ahrens and Dieter (1974) for a > 1 and b > 1

1. Set e=a−1, f=b−1, c=e+f, g=cln(c), u=e/c, and s =0 .5/
√ c
.

2. Generate Y from N(0,1) and set X=sY+u.

3. If X<0 or X>1, go to step 2.

4. Generate U from Uniform(0,1).

5. If ln(U)≤(eln(X/e)+fln((1−X)/f)+g+0.5Y2), finish; otherwise go to step 2.

References. CDF: AS 63 (1973); ICDF: AS 64 (1973) and AS 109 (1977); RV: AS 134 (1979), (Ahrens and Dieter, 1974), and (Cheng, 1978). (See the Algorithm Index and References.)

Related Topics

Continuous Distributions (Distribution and Special Functions algorithms)
Bivariate Normal (Distribution and Special Functions algorithms)
Cauchy (Distribution and Special Functions algorithms)
Chi-Square (Distribution and Special Functions algorithms)
Exponential (Distribution and Special Functions algorithms)
F (Distribution and Special Functions algorithms)
Gamma (Distribution and Special Functions algorithms)
Half-normal (Distribution and Special Functions algorithms)
Inverse Gaussian (Distribution and Special Functions algorithms)
Laplace (Distribution and Special Functions algorithms)
Logistic (Distribution and Special Functions algorithms)
Lognormal (Distribution and Special Functions algorithms)
Noncentral Beta (Distribution and Special Functions algorithms)
Noncentral Chi-Square (Distribution and Special Functions algorithms)
Noncentral F (Distribution and Special Functions algorithms)
Noncentral Student's t (Distribution and Special Functions algorithms)
Normal (Distribution and Special Functions algorithms)
Pareto (Distribution and Special Functions algorithms)
Studentized Maximum Modulus (Distribution and Special Functions algorithms)
Studentized Range (Distribution and Special Functions algorithms)
Student's t (Distribution and Special Functions algorithms)
Uniform (Distribution and Special Functions algorithms)
Weibull (Distribution and Special Functions algorithms)


Bivariate Normal (Distribution and Special Functions algorithms)

bivariate normal distribution function,bivariate normal distribution function,bivariate normal distribution function
algorithms,algorithms,algorithms

Numerical algorithms for computing the CDF are described in the references.

References. AS 462 (1973) and AS 195. (See the Algorithm Index and References.)

Related Topics

Continuous Distributions (Distribution and Special Functions algorithms)
Beta (Distribution and Special Functions algorithms)
Cauchy (Distribution and Special Functions algorithms)
Chi-Square (Distribution and Special Functions algorithms)
Exponential (Distribution and Special Functions algorithms)
F (Distribution and Special Functions algorithms)
Gamma (Distribution and Special Functions algorithms)
Half-normal (Distribution and Special Functions algorithms)
Inverse Gaussian (Distribution and Special Functions algorithms)
Laplace (Distribution and Special Functions algorithms)
Logistic (Distribution and Special Functions algorithms)
Lognormal (Distribution and Special Functions algorithms)
Noncentral Beta (Distribution and Special Functions algorithms)
Noncentral Chi-Square (Distribution and Special Functions algorithms)
Noncentral F (Distribution and Special Functions algorithms)
Noncentral Student's t (Distribution and Special Functions algorithms)
Normal (Distribution and Special Functions algorithms)
Pareto (Distribution and Special Functions algorithms)
Studentized Maximum Modulus (Distribution and Special Functions algorithms)
Studentized Range (Distribution and Special Functions algorithms)
Student's t (Distribution and Special Functions algorithms)
Uniform (Distribution and Special Functions algorithms)
Weibull (Distribution and Special Functions algorithms)


Cauchy (Distribution and Special Functions algorithms)

Cauchy distribution function,Cauchy distribution function,Cauchy distribution function
algorithms,algorithms,algorithms

Random Number Generation

Inverse CDF algorithm

1. Generate U from Uniform(0,1).

2. Set X=a+btan(π(U−1/2))

Related Topics

Continuous Distributions (Distribution and Special Functions algorithms)
Beta (Distribution and Special Functions algorithms)
Bivariate Normal (Distribution and Special Functions algorithms)
Chi-Square (Distribution and Special Functions algorithms)
Exponential (Distribution and Special Functions algorithms)
F (Distribution and Special Functions algorithms)
Gamma (Distribution and Special Functions algorithms)
Half-normal (Distribution and Special Functions algorithms)
Inverse Gaussian (Distribution and Special Functions algorithms)
Laplace (Distribution and Special Functions algorithms)
Logistic (Distribution and Special Functions algorithms)
Lognormal (Distribution and Special Functions algorithms)
Noncentral Beta (Distribution and Special Functions algorithms)
Noncentral Chi-Square (Distribution and Special Functions algorithms)
Noncentral F (Distribution and Special Functions algorithms)
Noncentral Student's t (Distribution and Special Functions algorithms)
Normal (Distribution and Special Functions algorithms)
Pareto (Distribution and Special Functions algorithms)
Studentized Maximum Modulus (Distribution and Special Functions algorithms)
Studentized Range (Distribution and Special Functions algorithms)
Student's t (Distribution and Special Functions algorithms)
Uniform (Distribution and Special Functions algorithms)
Weibull (Distribution and Special Functions algorithms)


Chi-Square (Distribution and Special Functions algorithms)

chi-square distribution function,chi-square distribution function,chi-square distribution function
algorithms,algorithms,algorithms

Random Number Generation

Generate X from the Gamma(a/2, 1/2) distribution.

References. CDF: CACM 299 (1967); ICDF: AS 91 (1975), AS R85(1991), and CACM 451 (1973). (See the Algorithm Index and References.)

Related Topics

Continuous Distributions (Distribution and Special Functions algorithms)
Beta (Distribution and Special Functions algorithms)
Bivariate Normal (Distribution and Special Functions algorithms)
Cauchy (Distribution and Special Functions algorithms)
Exponential (Distribution and Special Functions algorithms)
F (Distribution and Special Functions algorithms)
Gamma (Distribution and Special Functions algorithms)
Half-normal (Distribution and Special Functions algorithms)
Inverse Gaussian (Distribution and Special Functions algorithms)
Laplace (Distribution and Special Functions algorithms)
Logistic (Distribution and Special Functions algorithms)
Lognormal (Distribution and Special Functions algorithms)
Noncentral Beta (Distribution and Special Functions algorithms)
Noncentral Chi-Square (Distribution and Special Functions algorithms)
Noncentral F (Distribution and Special Functions algorithms)
Noncentral Student's t (Distribution and Special Functions algorithms)
Normal (Distribution and Special Functions algorithms)
Pareto (Distribution and Special Functions algorithms)
Studentized Maximum Modulus (Distribution and Special Functions algorithms)
Studentized Range (Distribution and Special Functions algorithms)
Student's t (Distribution and Special Functions algorithms)
Uniform (Distribution and Special Functions algorithms)
Weibull (Distribution and Special Functions algorithms)


Exponential (Distribution and Special Functions algorithms)

exponential distribution function,exponential distribution function,exponential distribution function
algorithms,algorithms,algorithms

Random Number Generation

Inverse CDF algorithm

Generate U from Uniform(0,1); X=−ln(1−U)/a.

Related Topics

Continuous Distributions (Distribution and Special Functions algorithms)
Beta (Distribution and Special Functions algorithms)
Bivariate Normal (Distribution and Special Functions algorithms)
Cauchy (Distribution and Special Functions algorithms)
Chi-Square (Distribution and Special Functions algorithms)
F (Distribution and Special Functions algorithms)
Gamma (Distribution and Special Functions algorithms)
Half-normal (Distribution and Special Functions algorithms)
Inverse Gaussian (Distribution and Special Functions algorithms)
Laplace (Distribution and Special Functions algorithms)
Logistic (Distribution and Special Functions algorithms)
Lognormal (Distribution and Special Functions algorithms)
Noncentral Beta (Distribution and Special Functions algorithms)
Noncentral Chi-Square (Distribution and Special Functions algorithms)
Noncentral F (Distribution and Special Functions algorithms)
Noncentral Student's t (Distribution and Special Functions algorithms)
Normal (Distribution and Special Functions algorithms)
Pareto (Distribution and Special Functions algorithms)
Studentized Maximum Modulus (Distribution and Special Functions algorithms)
Studentized Range (Distribution and Special Functions algorithms)
Student's t (Distribution and Special Functions algorithms)
Uniform (Distribution and Special Functions algorithms)
Weibull (Distribution and Special Functions algorithms)


F (Distribution and Special Functions algorithms)

F distribution function,F distribution function,F distribution function
algorithms,algorithms,algorithms

Random Number Generation

Using the chi-square distribution

1. Generate Y and Z independently from chi-square(a) and chi-square(b), respectively.

2. Set X=(Y/a) / (Z/b).

References. CDF: CACM 332 (1968). ICDF: use inverse of incomplete beta function. (See the Algorithm Index and References.)

Related Topics

Continuous Distributions (Distribution and Special Functions algorithms)
Beta (Distribution and Special Functions algorithms)
Bivariate Normal (Distribution and Special Functions algorithms)
Cauchy (Distribution and Special Functions algorithms)
Chi-Square (Distribution and Special Functions algorithms)
Exponential (Distribution and Special Functions algorithms)
Gamma (Distribution and Special Functions algorithms)
Half-normal (Distribution and Special Functions algorithms)
Inverse Gaussian (Distribution and Special Functions algorithms)
Laplace (Distribution and Special Functions algorithms)
Logistic (Distribution and Special Functions algorithms)
Lognormal (Distribution and Special Functions algorithms)
Noncentral Beta (Distribution and Special Functions algorithms)
Noncentral Chi-Square (Distribution and Special Functions algorithms)
Noncentral F (Distribution and Special Functions algorithms)
Noncentral Student's t (Distribution and Special Functions algorithms)
Normal (Distribution and Special Functions algorithms)
Pareto (Distribution and Special Functions algorithms)
Studentized Maximum Modulus (Distribution and Special Functions algorithms)
Studentized Range (Distribution and Special Functions algorithms)
Student's t (Distribution and Special Functions algorithms)
Uniform (Distribution and Special Functions algorithms)
Weibull (Distribution and Special Functions algorithms)


Gamma (Distribution and Special Functions algorithms)

gamma distribution function,gamma distribution function,gamma distribution function
algorithms,algorithms,algorithms

Random Number Generation

Special case

If a = 1 and b > 0, generate X from an exponential distribution with parameter b.

Algorithm GS due to Ahrens and Dieter (1974) for 0<a<1 and b=1

1. Generate U from Uniform(0,1). Set c=(e+a)/e, where e=exp(1).

2. Set P=cU. If P>1, go to step 4.

3. (P≤1) Set X=P1/a. Generate V from Uniform(0,1). If V>exp(−x), go to step 1; otherwise finish.

4. (P>1) Set X=−ln((c−P)/a). If X<0, go to step 1; otherwise go to step 5.

5. Generate V from Uniform(0,1). If V>Xa−1, go to step 1; otherwise finish.

Algorithm due to Fishman (1976) for a>1 and b=1

1. Generate Y from Exponential (1).

2. Generate U from Uniform(0,1).

3. If lnU≤(a−1)(1−Y+lnY), X=aY; otherwise go to Step 1.

References. CDF: AS 32 (1970) and AS 239 (1988); ICDF: Use the relationship between gamma and chi-square distributions. RV: (Ahrens and Dieter, 1974), (Fishman, 1976), and (Tadikamalla, 1978). (See the Algorithm Index and References.)

Related Topics

Continuous Distributions (Distribution and Special Functions algorithms)
Beta (Distribution and Special Functions algorithms)
Bivariate Normal (Distribution and Special Functions algorithms)
Cauchy (Distribution and Special Functions algorithms)
Chi-Square (Distribution and Special Functions algorithms)
Exponential (Distribution and Special Functions algorithms)
F (Distribution and Special Functions algorithms)
Half-normal (Distribution and Special Functions algorithms)
Inverse Gaussian (Distribution and Special Functions algorithms)
Laplace (Distribution and Special Functions algorithms)
Logistic (Distribution and Special Functions algorithms)
Lognormal (Distribution and Special Functions algorithms)
Noncentral Beta (Distribution and Special Functions algorithms)
Noncentral Chi-Square (Distribution and Special Functions algorithms)
Noncentral F (Distribution and Special Functions algorithms)
Noncentral Student's t (Distribution and Special Functions algorithms)
Normal (Distribution and Special Functions algorithms)
Pareto (Distribution and Special Functions algorithms)
Studentized Maximum Modulus (Distribution and Special Functions algorithms)
Studentized Range (Distribution and Special Functions algorithms)
Student's t (Distribution and Special Functions algorithms)
Uniform (Distribution and Special Functions algorithms)
Weibull (Distribution and Special Functions algorithms)


Half-normal (Distribution and Special Functions algorithms)

half-normal distribution function,half-normal distribution function,half-normal distribution function
algorithms,algorithms,algorithms

Random Number Generation

1. Generate X from a normal(a,b) distribution.

2. Then |X−a| has a half normal distribution.

Related Topics

Continuous Distributions (Distribution and Special Functions algorithms)
Beta (Distribution and Special Functions algorithms)
Bivariate Normal (Distribution and Special Functions algorithms)
Cauchy (Distribution and Special Functions algorithms)
Chi-Square (Distribution and Special Functions algorithms)
Exponential (Distribution and Special Functions algorithms)
F (Distribution and Special Functions algorithms)
Gamma (Distribution and Special Functions algorithms)
Inverse Gaussian (Distribution and Special Functions algorithms)
Laplace (Distribution and Special Functions algorithms)
Logistic (Distribution and Special Functions algorithms)
Lognormal (Distribution and Special Functions algorithms)
Noncentral Beta (Distribution and Special Functions algorithms)
Noncentral Chi-Square (Distribution and Special Functions algorithms)
Noncentral F (Distribution and Special Functions algorithms)
Noncentral Student's t (Distribution and Special Functions algorithms)
Normal (Distribution and Special Functions algorithms)
Pareto (Distribution and Special Functions algorithms)
Studentized Maximum Modulus (Distribution and Special Functions algorithms)
Studentized Range (Distribution and Special Functions algorithms)
Student's t (Distribution and Special Functions algorithms)
Uniform (Distribution and Special Functions algorithms)
Weibull (Distribution and Special Functions algorithms)


Inverse Gaussian (Distribution and Special Functions algorithms)

inverse Gaussian distribution function,inverse Gaussian distribution function,inverse Gaussian distribution function
algorithms,algorithms,algorithms

Inverse CDF Approximation

For the upper tail, an inverse Gaussian variable X can be approximated by

X=αχ2v+β

where

α=3a2/4b
β=a/3
v=8b/9a

For the lower tail, one can use the approximation

X=(αχ2v+β)−1

where

α=(3b+8a)/[4b(b+2a)]
β=(b+3a)/[a(3b+8a)]
v=8(b+2a)3/[a(8a+3b)2]

Random Number Generation

1. Generate a standard normal variate Z.

2. Let w=aZ2

3. Let x=a+a2b(w−
√ w(4b+w)
)

4. Let p=a/(a+x)

5. Then the inverse Gaussian variate will take value x with probability 1−p and value a2/x with probability p.

References.(Mudholkar and Natarajan, 1999) and (Michael, Schucany, and Haas, 1976). (See the Algorithm Index and References.)

Related Topics

Continuous Distributions (Distribution and Special Functions algorithms)
Beta (Distribution and Special Functions algorithms)
Bivariate Normal (Distribution and Special Functions algorithms)
Cauchy (Distribution and Special Functions algorithms)
Chi-Square (Distribution and Special Functions algorithms)
Exponential (Distribution and Special Functions algorithms)
F (Distribution and Special Functions algorithms)
Gamma (Distribution and Special Functions algorithms)
Half-normal (Distribution and Special Functions algorithms)
Laplace (Distribution and Special Functions algorithms)
Logistic (Distribution and Special Functions algorithms)
Lognormal (Distribution and Special Functions algorithms)
Noncentral Beta (Distribution and Special Functions algorithms)
Noncentral Chi-Square (Distribution and Special Functions algorithms)
Noncentral F (Distribution and Special Functions algorithms)
Noncentral Student's t (Distribution and Special Functions algorithms)
Normal (Distribution and Special Functions algorithms)
Pareto (Distribution and Special Functions algorithms)
Studentized Maximum Modulus (Distribution and Special Functions algorithms)
Studentized Range (Distribution and Special Functions algorithms)
Student's t (Distribution and Special Functions algorithms)
Uniform (Distribution and Special Functions algorithms)
Weibull (Distribution and Special Functions algorithms)


Laplace (Distribution and Special Functions algorithms)

Laplace distribution function,Laplace distribution function,Laplace distribution function
algorithms,algorithms,algorithms

Random Number Generation

Inverse CDF algorithm

1. Generate Y and U independently from Exponential(1/ b) and Uniform(0,1), respectively.

2. If U≥0.5, set X=a+Y; otherwise set X=a−Y.

Related Topics

Continuous Distributions (Distribution and Special Functions algorithms)
Beta (Distribution and Special Functions algorithms)
Bivariate Normal (Distribution and Special Functions algorithms)
Cauchy (Distribution and Special Functions algorithms)
Chi-Square (Distribution and Special Functions algorithms)
Exponential (Distribution and Special Functions algorithms)
F (Distribution and Special Functions algorithms)
Gamma (Distribution and Special Functions algorithms)
Half-normal (Distribution and Special Functions algorithms)
Inverse Gaussian (Distribution and Special Functions algorithms)
Logistic (Distribution and Special Functions algorithms)
Lognormal (Distribution and Special Functions algorithms)
Noncentral Beta (Distribution and Special Functions algorithms)
Noncentral Chi-Square (Distribution and Special Functions algorithms)
Noncentral F (Distribution and Special Functions algorithms)
Noncentral Student's t (Distribution and Special Functions algorithms)
Normal (Distribution and Special Functions algorithms)
Pareto (Distribution and Special Functions algorithms)
Studentized Maximum Modulus (Distribution and Special Functions algorithms)
Studentized Range (Distribution and Special Functions algorithms)
Student's t (Distribution and Special Functions algorithms)
Uniform (Distribution and Special Functions algorithms)
Weibull (Distribution and Special Functions algorithms)


Logistic (Distribution and Special Functions algorithms)

logistic distribution function,logistic distribution function,logistic distribution function
algorithms,algorithms,algorithms

Random Number Generation

Inverse CDF algorithm

1. Generate U from Uniform(0,1).

2. Set X=a+bln(U/(1−U)).

Related Topics

Continuous Distributions (Distribution and Special Functions algorithms)
Beta (Distribution and Special Functions algorithms)
Bivariate Normal (Distribution and Special Functions algorithms)
Cauchy (Distribution and Special Functions algorithms)
Chi-Square (Distribution and Special Functions algorithms)
Exponential (Distribution and Special Functions algorithms)
F (Distribution and Special Functions algorithms)
Gamma (Distribution and Special Functions algorithms)
Half-normal (Distribution and Special Functions algorithms)
Inverse Gaussian (Distribution and Special Functions algorithms)
Laplace (Distribution and Special Functions algorithms)
Lognormal (Distribution and Special Functions algorithms)
Noncentral Beta (Distribution and Special Functions algorithms)
Noncentral Chi-Square (Distribution and Special Functions algorithms)
Noncentral F (Distribution and Special Functions algorithms)
Noncentral Student's t (Distribution and Special Functions algorithms)
Normal (Distribution and Special Functions algorithms)
Pareto (Distribution and Special Functions algorithms)
Studentized Maximum Modulus (Distribution and Special Functions algorithms)
Studentized Range (Distribution and Special Functions algorithms)
Student's t (Distribution and Special Functions algorithms)
Uniform (Distribution and Special Functions algorithms)
Weibull (Distribution and Special Functions algorithms)


Lognormal (Distribution and Special Functions algorithms)

lognormal distribution function,lognormal distribution function,lognormal distribution function
algorithms,algorithms,algorithms

Random Number Generation

Inverse CDF algorithm

1. Generate Z from N(0,1).

2. Set X=aexp(bZ).

Related Topics

Continuous Distributions (Distribution and Special Functions algorithms)
Beta (Distribution and Special Functions algorithms)
Bivariate Normal (Distribution and Special Functions algorithms)
Cauchy (Distribution and Special Functions algorithms)
Chi-Square (Distribution and Special Functions algorithms)
Exponential (Distribution and Special Functions algorithms)
F (Distribution and Special Functions algorithms)
Gamma (Distribution and Special Functions algorithms)
Half-normal (Distribution and Special Functions algorithms)
Inverse Gaussian (Distribution and Special Functions algorithms)
Laplace (Distribution and Special Functions algorithms)
Logistic (Distribution and Special Functions algorithms)
Noncentral Beta (Distribution and Special Functions algorithms)
Noncentral Chi-Square (Distribution and Special Functions algorithms)
Noncentral F (Distribution and Special Functions algorithms)
Noncentral Student's t (Distribution and Special Functions algorithms)
Normal (Distribution and Special Functions algorithms)
Pareto (Distribution and Special Functions algorithms)
Studentized Maximum Modulus (Distribution and Special Functions algorithms)
Studentized Range (Distribution and Special Functions algorithms)
Student's t (Distribution and Special Functions algorithms)
Uniform (Distribution and Special Functions algorithms)
Weibull (Distribution and Special Functions algorithms)


Noncentral Beta (Distribution and Special Functions algorithms)

noncentral beta distribution function,noncentral beta distribution function,noncentral beta distribution function
algorithms,algorithms,algorithms

References. CDF: (Abramowitz and Stegun, 1970) Chapter 26, AS 226 (1987), and AS R84 (1990). (See the Algorithm Index and References.)

Related Topics

Continuous Distributions (Distribution and Special Functions algorithms)
Beta (Distribution and Special Functions algorithms)
Bivariate Normal (Distribution and Special Functions algorithms)
Cauchy (Distribution and Special Functions algorithms)
Chi-Square (Distribution and Special Functions algorithms)
Exponential (Distribution and Special Functions algorithms)
F (Distribution and Special Functions algorithms)
Gamma (Distribution and Special Functions algorithms)
Half-normal (Distribution and Special Functions algorithms)
Inverse Gaussian (Distribution and Special Functions algorithms)
Laplace (Distribution and Special Functions algorithms)
Logistic (Distribution and Special Functions algorithms)
Lognormal (Distribution and Special Functions algorithms)
Noncentral Chi-Square (Distribution and Special Functions algorithms)
Noncentral F (Distribution and Special Functions algorithms)
Noncentral Student's t (Distribution and Special Functions algorithms)
Normal (Distribution and Special Functions algorithms)
Pareto (Distribution and Special Functions algorithms)
Studentized Maximum Modulus (Distribution and Special Functions algorithms)
Studentized Range (Distribution and Special Functions algorithms)
Student's t (Distribution and Special Functions algorithms)
Uniform (Distribution and Special Functions algorithms)
Weibull (Distribution and Special Functions algorithms)


Noncentral Chi-Square (Distribution and Special Functions algorithms)

noncentral chi-square distribution function,noncentral chi-square distribution function,noncentral chi-square distribution function
algorithms,algorithms,algorithms

References. CDF: (Abramowitz and Stegun, 1970) Chapter 26, AS 170 (1981), AS 231 (1987). Density: AS 275 (1992). (See the Algorithm Index and References.)

Related Topics

Continuous Distributions (Distribution and Special Functions algorithms)
Beta (Distribution and Special Functions algorithms)
Bivariate Normal (Distribution and Special Functions algorithms)
Cauchy (Distribution and Special Functions algorithms)
Chi-Square (Distribution and Special Functions algorithms)
Exponential (Distribution and Special Functions algorithms)
F (Distribution and Special Functions algorithms)
Gamma (Distribution and Special Functions algorithms)
Half-normal (Distribution and Special Functions algorithms)
Inverse Gaussian (Distribution and Special Functions algorithms)
Laplace (Distribution and Special Functions algorithms)
Logistic (Distribution and Special Functions algorithms)
Lognormal (Distribution and Special Functions algorithms)
Noncentral Beta (Distribution and Special Functions algorithms)
Noncentral F (Distribution and Special Functions algorithms)
Noncentral Student's t (Distribution and Special Functions algorithms)
Normal (Distribution and Special Functions algorithms)
Pareto (Distribution and Special Functions algorithms)
Studentized Maximum Modulus (Distribution and Special Functions algorithms)
Studentized Range (Distribution and Special Functions algorithms)
Student's t (Distribution and Special Functions algorithms)
Uniform (Distribution and Special Functions algorithms)
Weibull (Distribution and Special Functions algorithms)


Noncentral F (Distribution and Special Functions algorithms)

noncentral F distribution function,noncentral F distribution function,noncentral F distribution function
algorithms,algorithms,algorithms

References. CDF: (Abramowitz and Stegun, 1970) Chapter 26. (See the Algorithm Index and References.)

Related Topics

Continuous Distributions (Distribution and Special Functions algorithms)
Beta (Distribution and Special Functions algorithms)
Bivariate Normal (Distribution and Special Functions algorithms)
Cauchy (Distribution and Special Functions algorithms)
Chi-Square (Distribution and Special Functions algorithms)
Exponential (Distribution and Special Functions algorithms)
F (Distribution and Special Functions algorithms)
Gamma (Distribution and Special Functions algorithms)
Half-normal (Distribution and Special Functions algorithms)
Inverse Gaussian (Distribution and Special Functions algorithms)
Laplace (Distribution and Special Functions algorithms)
Logistic (Distribution and Special Functions algorithms)
Lognormal (Distribution and Special Functions algorithms)
Noncentral Beta (Distribution and Special Functions algorithms)
Noncentral Chi-Square (Distribution and Special Functions algorithms)
Noncentral Student's t (Distribution and Special Functions algorithms)
Normal (Distribution and Special Functions algorithms)
Pareto (Distribution and Special Functions algorithms)
Studentized Maximum Modulus (Distribution and Special Functions algorithms)
Studentized Range (Distribution and Special Functions algorithms)
Student's t (Distribution and Special Functions algorithms)
Uniform (Distribution and Special Functions algorithms)
Weibull (Distribution and Special Functions algorithms)


Noncentral Student's t (Distribution and Special Functions algorithms)

noncentral student's t distribution function,noncentral student's t distribution function,noncentral student's t distribution function
algorithms,algorithms,algorithms

Special case

F(0)=1−Φ(c)

References. CDF: (Abramowitz and Stegun, 1970) Chapter 26, AS 5 (1968), AS 76 (1974), and AS 243 (1989). (See the Algorithm Index and References.)

Related Topics

Continuous Distributions (Distribution and Special Functions algorithms)
Beta (Distribution and Special Functions algorithms)
Bivariate Normal (Distribution and Special Functions algorithms)
Cauchy (Distribution and Special Functions algorithms)
Chi-Square (Distribution and Special Functions algorithms)
Exponential (Distribution and Special Functions algorithms)
F (Distribution and Special Functions algorithms)
Gamma (Distribution and Special Functions algorithms)
Half-normal (Distribution and Special Functions algorithms)
Inverse Gaussian (Distribution and Special Functions algorithms)
Laplace (Distribution and Special Functions algorithms)
Logistic (Distribution and Special Functions algorithms)
Lognormal (Distribution and Special Functions algorithms)
Noncentral Beta (Distribution and Special Functions algorithms)
Noncentral Chi-Square (Distribution and Special Functions algorithms)
Noncentral F (Distribution and Special Functions algorithms)
Normal (Distribution and Special Functions algorithms)
Pareto (Distribution and Special Functions algorithms)
Studentized Maximum Modulus (Distribution and Special Functions algorithms)
Studentized Range (Distribution and Special Functions algorithms)
Student's t (Distribution and Special Functions algorithms)
Uniform (Distribution and Special Functions algorithms)
Weibull (Distribution and Special Functions algorithms)


Normal (Distribution and Special Functions algorithms)

normal distribution function,normal distribution function,normal distribution function
algorithms,algorithms,algorithms

For Φ and Φ−1, see Standard Normal (Distribution and Special Functions algorithms)

Random Number Generation

Kinderman and Ramage (1976) method

1. Generate as X=a+bz, where z is an N(0,1) random number.

References. CDF: AS 66 (1973); ICDF: AS 111 (1977) and AS 241 (1988); RV: CACM 488 (1974) and (Kinderman and Ramage, 1976). (See the Algorithm Index and References.)

Related Topics

Continuous Distributions (Distribution and Special Functions algorithms)
Beta (Distribution and Special Functions algorithms)
Bivariate Normal (Distribution and Special Functions algorithms)
Cauchy (Distribution and Special Functions algorithms)
Chi-Square (Distribution and Special Functions algorithms)
Exponential (Distribution and Special Functions algorithms)
F (Distribution and Special Functions algorithms)
Gamma (Distribution and Special Functions algorithms)
Half-normal (Distribution and Special Functions algorithms)
Inverse Gaussian (Distribution and Special Functions algorithms)
Laplace (Distribution and Special Functions algorithms)
Logistic (Distribution and Special Functions algorithms)
Lognormal (Distribution and Special Functions algorithms)
Noncentral Beta (Distribution and Special Functions algorithms)
Noncentral Chi-Square (Distribution and Special Functions algorithms)
Noncentral F (Distribution and Special Functions algorithms)
Noncentral Student's t (Distribution and Special Functions algorithms)
Pareto (Distribution and Special Functions algorithms)
Studentized Maximum Modulus (Distribution and Special Functions algorithms)
Studentized Range (Distribution and Special Functions algorithms)
Student's t (Distribution and Special Functions algorithms)
Uniform (Distribution and Special Functions algorithms)
Weibull (Distribution and Special Functions algorithms)


Pareto (Distribution and Special Functions algorithms)

Pareto distribution function,Pareto distribution function,Pareto distribution function
algorithms,algorithms,algorithms

Random Number Generation

Inverse CDF

1. Generate U from Uniform(0,1).

2. Set X=a(1−U)−1/b.

Related Topics

Continuous Distributions (Distribution and Special Functions algorithms)
Beta (Distribution and Special Functions algorithms)
Bivariate Normal (Distribution and Special Functions algorithms)
Cauchy (Distribution and Special Functions algorithms)
Chi-Square (Distribution and Special Functions algorithms)
Exponential (Distribution and Special Functions algorithms)
F (Distribution and Special Functions algorithms)
Gamma (Distribution and Special Functions algorithms)
Half-normal (Distribution and Special Functions algorithms)
Inverse Gaussian (Distribution and Special Functions algorithms)
Laplace (Distribution and Special Functions algorithms)
Logistic (Distribution and Special Functions algorithms)
Lognormal (Distribution and Special Functions algorithms)
Noncentral Beta (Distribution and Special Functions algorithms)
Noncentral Chi-Square (Distribution and Special Functions algorithms)
Noncentral F (Distribution and Special Functions algorithms)
Noncentral Student's t (Distribution and Special Functions algorithms)
Normal (Distribution and Special Functions algorithms)
Studentized Maximum Modulus (Distribution and Special Functions algorithms)
Studentized Range (Distribution and Special Functions algorithms)
Student's t (Distribution and Special Functions algorithms)
Uniform (Distribution and Special Functions algorithms)
Weibull (Distribution and Special Functions algorithms)


Studentized Maximum Modulus (Distribution and Special Functions algorithms)

Studentized maximum modulus distribution function,Studentized maximum modulus distribution function,Studentized maximum modulus distribution function
algorithms,algorithms,algorithms

The Studentized maximum modulus distribution has CDF

F(x)=∞∫0[2Φ(xu)−1]k* dg ν(u)

where φ(·) and Φ(·) are the PDF and CDF of the standard normal distribution and

dg ν(u)=νν/2Γ(ν2)2uν−1 exp (−νu2/2) d u

The IDF does not have a closed form. The CDF can be computed by using numerical integration. The inverse CDF can be found by solving F(x) = p numerically for given p.

Related Topics

Continuous Distributions (Distribution and Special Functions algorithms)
Beta (Distribution and Special Functions algorithms)
Bivariate Normal (Distribution and Special Functions algorithms)
Cauchy (Distribution and Special Functions algorithms)
Chi-Square (Distribution and Special Functions algorithms)
Exponential (Distribution and Special Functions algorithms)
F (Distribution and Special Functions algorithms)
Gamma (Distribution and Special Functions algorithms)
Half-normal (Distribution and Special Functions algorithms)
Inverse Gaussian (Distribution and Special Functions algorithms)
Laplace (Distribution and Special Functions algorithms)
Logistic (Distribution and Special Functions algorithms)
Lognormal (Distribution and Special Functions algorithms)
Noncentral Beta (Distribution and Special Functions algorithms)
Noncentral Chi-Square (Distribution and Special Functions algorithms)
Noncentral F (Distribution and Special Functions algorithms)
Noncentral Student's t (Distribution and Special Functions algorithms)
Normal (Distribution and Special Functions algorithms)
Pareto (Distribution and Special Functions algorithms)
Studentized Range (Distribution and Special Functions algorithms)
Student's t (Distribution and Special Functions algorithms)
Uniform (Distribution and Special Functions algorithms)
Weibull (Distribution and Special Functions algorithms)


Studentized Range (Distribution and Special Functions algorithms)

Studentized range distribution function,Studentized range distribution function,Studentized range distribution function
algorithms,algorithms,algorithms

The Studentized range distribution has CDF

F(x)=∞∫0∞∫−∞aφ(t)[Φ(t)−Φ(t−xu)]k−1 d t dg ν(u)

where φ(·) and Φ(·) are the PDF and CDF of the standard normal distribution and

dg ν(u)=νν/2Γ(ν2)2uν−1 exp (−νu2/2) d u

The IDF does not have a closed form. Both the CDF and IDF have to be computed numerically (see the following references).

References. AS 190, plus correction and remark. (See the Algorithm Index and References.)

Related Topics

Continuous Distributions (Distribution and Special Functions algorithms)
Beta (Distribution and Special Functions algorithms)
Bivariate Normal (Distribution and Special Functions algorithms)
Cauchy (Distribution and Special Functions algorithms)
Chi-Square (Distribution and Special Functions algorithms)
Exponential (Distribution and Special Functions algorithms)
F (Distribution and Special Functions algorithms)
Gamma (Distribution and Special Functions algorithms)
Half-normal (Distribution and Special Functions algorithms)
Inverse Gaussian (Distribution and Special Functions algorithms)
Laplace (Distribution and Special Functions algorithms)
Logistic (Distribution and Special Functions algorithms)
Lognormal (Distribution and Special Functions algorithms)
Noncentral Beta (Distribution and Special Functions algorithms)
Noncentral Chi-Square (Distribution and Special Functions algorithms)
Noncentral F (Distribution and Special Functions algorithms)
Noncentral Student's t (Distribution and Special Functions algorithms)
Normal (Distribution and Special Functions algorithms)
Pareto (Distribution and Special Functions algorithms)
Studentized Maximum Modulus (Distribution and Special Functions algorithms)
Student's t (Distribution and Special Functions algorithms)
Uniform (Distribution and Special Functions algorithms)
Weibull (Distribution and Special Functions algorithms)


Student's t (Distribution and Special Functions algorithms)

t distribution function,t distribution function,t distribution function
algorithms,algorithms,algorithms

Random Number Generation

Special case

If a=1, generate X from a Cauchy (0, 1) distribution.

Using the normal and the chi-square distributions

1. Generate Z from N(0,1) and V from Chi-square(a) independently.

2. Set X=Z/
√ V/a
.

References. CDF: AS 3 (1968), AS 27 (1970), and CACM 395 (1970); ICDF: CACM 396 (1970). (See the Algorithm Index and References.)

Related Topics

Continuous Distributions (Distribution and Special Functions algorithms)
Beta (Distribution and Special Functions algorithms)
Bivariate Normal (Distribution and Special Functions algorithms)
Cauchy (Distribution and Special Functions algorithms)
Chi-Square (Distribution and Special Functions algorithms)
Exponential (Distribution and Special Functions algorithms)
F (Distribution and Special Functions algorithms)
Gamma (Distribution and Special Functions algorithms)
Half-normal (Distribution and Special Functions algorithms)
Inverse Gaussian (Distribution and Special Functions algorithms)
Laplace (Distribution and Special Functions algorithms)
Logistic (Distribution and Special Functions algorithms)
Lognormal (Distribution and Special Functions algorithms)
Noncentral Beta (Distribution and Special Functions algorithms)
Noncentral Chi-Square (Distribution and Special Functions algorithms)
Noncentral F (Distribution and Special Functions algorithms)
Noncentral Student's t (Distribution and Special Functions algorithms)
Normal (Distribution and Special Functions algorithms)
Pareto (Distribution and Special Functions algorithms)
Studentized Maximum Modulus (Distribution and Special Functions algorithms)
Studentized Range (Distribution and Special Functions algorithms)
Uniform (Distribution and Special Functions algorithms)
Weibull (Distribution and Special Functions algorithms)


Uniform (Distribution and Special Functions algorithms)

uniform distribution function,uniform distribution function,uniform distribution function
algorithms,algorithms,algorithms

Random Number Generation

Inverse CDF algorithm

1. Generate U from Uniform(0,1).

2. Set X=a+(b−a)U.

References. Uniform of (0,1) is generated by the method in (Schrage, 1979).

Related Topics

Continuous Distributions (Distribution and Special Functions algorithms)
Beta (Distribution and Special Functions algorithms)
Bivariate Normal (Distribution and Special Functions algorithms)
Cauchy (Distribution and Special Functions algorithms)
Chi-Square (Distribution and Special Functions algorithms)
Exponential (Distribution and Special Functions algorithms)
F (Distribution and Special Functions algorithms)
Gamma (Distribution and Special Functions algorithms)
Half-normal (Distribution and Special Functions algorithms)
Inverse Gaussian (Distribution and Special Functions algorithms)
Laplace (Distribution and Special Functions algorithms)
Logistic (Distribution and Special Functions algorithms)
Lognormal (Distribution and Special Functions algorithms)
Noncentral Beta (Distribution and Special Functions algorithms)
Noncentral Chi-Square (Distribution and Special Functions algorithms)
Noncentral F (Distribution and Special Functions algorithms)
Noncentral Student's t (Distribution and Special Functions algorithms)
Normal (Distribution and Special Functions algorithms)
Pareto (Distribution and Special Functions algorithms)
Studentized Maximum Modulus (Distribution and Special Functions algorithms)
Studentized Range (Distribution and Special Functions algorithms)
Student's t (Distribution and Special Functions algorithms)
Weibull (Distribution and Special Functions algorithms)


Weibull (Distribution and Special Functions algorithms)

Weibull distribution function,Weibull distribution function,Weibull distribution function
algorithms,algorithms,algorithms

Random Number Generation

Inverse CDF algorithm

1. Generate U from Uniform(0,1).

2. Set X=a(−ln(1−U))1/b

Related Topics

Continuous Distributions (Distribution and Special Functions algorithms)
Beta (Distribution and Special Functions algorithms)
Bivariate Normal (Distribution and Special Functions algorithms)
Cauchy (Distribution and Special Functions algorithms)
Chi-Square (Distribution and Special Functions algorithms)
Exponential (Distribution and Special Functions algorithms)
F (Distribution and Special Functions algorithms)
Gamma (Distribution and Special Functions algorithms)
Half-normal (Distribution and Special Functions algorithms)
Inverse Gaussian (Distribution and Special Functions algorithms)
Laplace (Distribution and Special Functions algorithms)
Logistic (Distribution and Special Functions algorithms)
Lognormal (Distribution and Special Functions algorithms)
Noncentral Beta (Distribution and Special Functions algorithms)
Noncentral Chi-Square (Distribution and Special Functions algorithms)
Noncentral F (Distribution and Special Functions algorithms)
Noncentral Student's t (Distribution and Special Functions algorithms)
Normal (Distribution and Special Functions algorithms)
Pareto (Distribution and Special Functions algorithms)
Studentized Maximum Modulus (Distribution and Special Functions algorithms)
Studentized Range (Distribution and Special Functions algorithms)
Student's t (Distribution and Special Functions algorithms)
Uniform (Distribution and Special Functions algorithms)


Discrete Distributions (Distribution and Special Functions algorithms)

These are functions of a single variable that takes integer values.

• Bernoulli

• Binomial

• Geometric

• Hypergeometric

• Negative Binomial

• Poisson

Related Topics

Bernoulli (Distribution and Special Functions algorithms)
Binomial (Distribution and Special Functions algorithms)
Geometric (Distribution and Special Functions algorithms)
Hypergeometric (Distribution and Special Functions algorithms)
Negative Binomial (Distribution and Special Functions algorithms)
Poisson (Distribution and Special Functions algorithms)
Distribution and Special Functions
Notation (Distribution and Special Functions algorithms)
Continuous Distributions (Distribution and Special Functions algorithms)
Special Functions (Distribution and Special Functions algorithms)
Algorithm Index (Distribution and Special Functions algorithms)
References (Distribution and Special Functions algorithms)


Bernoulli (Distribution and Special Functions algorithms)

Bernoulli distribution function,Bernoulli distribution function,Bernoulli distribution function
algorithms,algorithms,algorithms

Random Number Generation

Special case

If a=0, X=0. If a=1, X=1.

Direct algorithm for 0<a<1

1. Generate U from Uniform(0,1).

2. Set X=1 if U≤a (a success) and X=0 if U>a (a failure).

Related Topics

Discrete Distributions (Distribution and Special Functions algorithms)
Binomial (Distribution and Special Functions algorithms)
Geometric (Distribution and Special Functions algorithms)
Hypergeometric (Distribution and Special Functions algorithms)
Negative Binomial (Distribution and Special Functions algorithms)
Poisson (Distribution and Special Functions algorithms)


Binomial (Distribution and Special Functions algorithms)

binomial distribution function,binomial distribution function,binomial distribution function
algorithms,algorithms,algorithms

Random Number Generation

Special case

If b = 0, X = 0. If b = 1, X = a.

Algorithm BB due to Ahrens and Dieter (1974) for 0 < b < 1

1. Set c=a, d=b, k=0, y=0, and h=1.

2. If c<40, generate J from Binomial(c, d) using algorithm BU. X=k+J.

3. If c is odd, go to step 4. If c is even, set c=c−1 and generate U from Uniform(0,1). If U≤d, set k=k+1.

4. Set s=(c+1)/2 and generate S from Beta(s, s). Set G=hs and Z=y+G.

5. If Z≤b, set y=Z, h=h−d, d=(b−Z)/h, and k=k+s; otherwise set h=G and d=(b−y)/h.

6. Set c=s−1 and go to step 2.

Computation time for algorithm BB is O(log a).

References. RV: (Ahrens and Dieter, 1974).

Related Topics

Discrete Distributions (Distribution and Special Functions algorithms)
Bernoulli (Distribution and Special Functions algorithms)
Geometric (Distribution and Special Functions algorithms)
Hypergeometric (Distribution and Special Functions algorithms)
Negative Binomial (Distribution and Special Functions algorithms)
Poisson (Distribution and Special Functions algorithms)


Geometric (Distribution and Special Functions algorithms)

geometric distribution function,geometric distribution function,geometric distribution function
algorithms,algorithms,algorithms

Random Number Generation

Special case

If a=1, X=1.

Direct algorithm for 0 < a < 1

1. Set X=1.

2. Generate U from Uniform(0,1).

3. If U>a, set X=X+1 and go to step 2; otherwise finish.

Related Topics

Discrete Distributions (Distribution and Special Functions algorithms)
Bernoulli (Distribution and Special Functions algorithms)
Binomial (Distribution and Special Functions algorithms)
Hypergeometric (Distribution and Special Functions algorithms)
Negative Binomial (Distribution and Special Functions algorithms)
Poisson (Distribution and Special Functions algorithms)


Hypergeometric (Distribution and Special Functions algorithms)

hypergeometric distribution function,hypergeometric distribution function,hypergeometric distribution function
algorithms,algorithms,algorithms

Random Number Generation

Special case

If b=a, X=c. If c=a, X=b.

Direct algorithm

1. (Initialization) X=0, g=c, h=b, t=a.

2. Do the following loop exactly b times:

Begin Loop

i. Generate U from Uniform(0,1).

ii. If U≤(g/t), set X=X+1, g=g−1, else h=h−1.

iii. If g=0, go to step 3.

iv. If h=0, set X=X+b−i, where i (from 1 to b) is the loop index. Go to step 3.

v. Set t=t−1.

End Loop

3. Finish.

References. CDF: AS 152 (1989), AS R77 (1989), and AS R86 (1991). (See the Algorithm Index and References.)

Related Topics

Discrete Distributions (Distribution and Special Functions algorithms)
Bernoulli (Distribution and Special Functions algorithms)
Binomial (Distribution and Special Functions algorithms)
Geometric (Distribution and Special Functions algorithms)
Negative Binomial (Distribution and Special Functions algorithms)
Poisson (Distribution and Special Functions algorithms)


Negative Binomial (Distribution and Special Functions algorithms)

negative binomial distribution function,negative binomial distribution function,negative binomial distribution function
algorithms,algorithms,algorithms

Random Number Generation

Special case

If b=1, X=a.

Direct algorithm

1. Generate G from Gamma(a, b/(1−b)).

2. If G=0, go to step 1. Otherwise generate P from Poisson (G).

3. Compute X=P+a.

Related Topics

Discrete Distributions (Distribution and Special Functions algorithms)
Bernoulli (Distribution and Special Functions algorithms)
Binomial (Distribution and Special Functions algorithms)
Geometric (Distribution and Special Functions algorithms)
Hypergeometric (Distribution and Special Functions algorithms)
Poisson (Distribution and Special Functions algorithms)


Poisson (Distribution and Special Functions algorithms)

Poisson distribution function,Poisson distribution function,Poisson distribution function
algorithms,algorithms,algorithms

Random Number Generation

Algorithm PG due to Ahrens and Dieter (1974)

1. (Initialization) Set X=0 and w=a.

2. If w>16, go to step 6.

3. Set c=exp(−w) and p=1.

4. Generate U from Uniform(0,1). Set p=pU.

5. If p<c, continue with step 6; otherwise set X=X+1 and go to step 4.

6. Set n=[7w/8]. Generate G from Gamma(n, 1).

7. If G>w, generate Y from Binomial(n−1, w/G), set X=X+Y.

8. If G≤w, set X=X+n, w=w−G, and go to step 2.

Notes. [y] means the integer part of y.

Steps 3 to 5 of Algorithm PG are in fact the direct algorithm.

References. RV: (Ahrens and Dieter, 1974).

Related Topics

Discrete Distributions (Distribution and Special Functions algorithms)
Bernoulli (Distribution and Special Functions algorithms)
Binomial (Distribution and Special Functions algorithms)
Geometric (Distribution and Special Functions algorithms)
Hypergeometric (Distribution and Special Functions algorithms)
Negative Binomial (Distribution and Special Functions algorithms)


Special Functions (Distribution and Special Functions algorithms)

These are not distribution functions, but are used in the functional definition of one or more distributions.

• Gamma

• Beta

• Incomplete Gamma Function (Ratio)

• Incomplete Beta Function (Ratio)

• Standard Normal

Related Topics

Gamma Function (Distribution and Special Functions algorithms)
Beta Function (Distribution and Special Functions algorithms)
Incomplete Gamma Function (Ratio) (Distribution and Special Functions algorithms)
Incomplete Beta Function (Ratio) (Distribution and Special Functions algorithms)
Standard Normal (Distribution and Special Functions algorithms)
Distribution and Special Functions
Notation (Distribution and Special Functions algorithms)
Continuous Distributions (Distribution and Special Functions algorithms)
Discrete Distributions (Distribution and Special Functions algorithms)
Algorithm Index (Distribution and Special Functions algorithms)
References (Distribution and Special Functions algorithms)


Gamma Function (Distribution and Special Functions algorithms)

gamma function,gamma function,gamma function
algorithms,algorithms,algorithms

Γ(a)=∫∞0xa−1e−xdxa>0

The gamma function has the following properties:

• Γ(1)=1

• Γ(1/2)=
√ π

• Γ(a)=(a−1)Γ(a−1)     a>1

• Γ(a)=(a−1)! when a is a positive integer

Note. Since Γ(a) can be very large even for a moderate value of a, the (natural) logarithm of Γ(a) is computed instead.

References. The ln(Γ(a)) function: CACM 291 (1966) and AS 245 (1989). (See the Algorithm Index and References.)

Related Topics

Special Functions (Distribution and Special Functions algorithms)
Beta Function (Distribution and Special Functions algorithms)
Incomplete Gamma Function (Ratio) (Distribution and Special Functions algorithms)
Incomplete Beta Function (Ratio) (Distribution and Special Functions algorithms)
Standard Normal (Distribution and Special Functions algorithms)


Beta Function (Distribution and Special Functions algorithms)

beta function,beta function,beta function
algorithms,algorithms,algorithms

B (a,b)=∫10xa−1(1−x)b−1dx     a>0, b>0

The beta function has the following properties:

• B (a,1)=1/a

• B ( 1 2 ,12)=π

• B (a , b)=Γ(a)Γ(b)/Γ(a+b)

• B (b , a)= B (a,b)

• B (a , b)=(b−1) B (a+1,b−1)/a

• B (a,b)=(a+b) B (a+1,b)/a

Note. Usually, B(x, y) is calculated as:

B (x,y)=exp(ln(Γ(x))+ln(Γ(y))−ln(Γ(x+y)))

Related Topics

Special Functions (Distribution and Special Functions algorithms)
Gamma Function (Distribution and Special Functions algorithms)
Incomplete Gamma Function (Ratio) (Distribution and Special Functions algorithms)
Incomplete Beta Function (Ratio) (Distribution and Special Functions algorithms)
Standard Normal (Distribution and Special Functions algorithms)


Incomplete Gamma Function (Ratio) (Distribution and Special Functions algorithms)

incomplete gamma function,incomplete gamma function,incomplete gamma function
algorithms,algorithms,algorithms

IG (x;a)=∫x01Γ(a)ta−1e−tdt x≥0
xp= IG −1(p;a)⇔p= IG (xp;a)     0≤p≤1

for a>0

The incomplete gamma function has the following properties:

• IG (x;1)=1−e−x

• Using integration by parts, for a>1

IG (x;a)=1Γ(a+1)xae−x+ IG (x;a+1)

Note. IG -1 (1,a)=∞.

References. AS 32 (1970), AS 147 (1980), and AS 239 (1988). (See the Algorithm Index and References.)

Related Topics

Special Functions (Distribution and Special Functions algorithms)
Gamma Function (Distribution and Special Functions algorithms)
Beta Function (Distribution and Special Functions algorithms)
Incomplete Beta Function (Ratio) (Distribution and Special Functions algorithms)
Standard Normal (Distribution and Special Functions algorithms)


Incomplete Beta Function (Ratio) (Distribution and Special Functions algorithms)

incomplete beta function,incomplete beta function,incomplete beta function
algorithms,algorithms,algorithms

IB (x;a,b)=∫x01 B (a,b)ta−1(1dt     0≤x≤1
xp= IB −1(p;a,b)⇔p= IB (xp;a,b)     0≤p≤1
for a>0 and b>0

The incomplete beta function has the following properties:

• IB (x;a,1)=xa

• Using the transformation t=sin2θ, we get IB (x;12,12)=2πsin−1
√ x

• IB (x;a,b)=1− IB (1−x;b,a)

• Using integration by parts, we get, for b>1,

IB (x;a,b)=Γ(a+b)Γ(a)Γ(b)xa(1−x)b−1+ IB (x;a+1,b−1)

• Using the fact that ddxxa(1−x)b=axa−1(1−x)b−1−(a+b)xa(1−x)b−1 we have

IB (x;a,b)=Γ(a+b)Γ(a+1)Γ(b)xa(1−x)b+ IB (x ; a + 1 , b)

References. AS 63 (1973); Inverse: AS 64 (1973), AS 109 (1977). (See the Algorithm Index and References.)

Related Topics

Special Functions (Distribution and Special Functions algorithms)
Gamma Function (Distribution and Special Functions algorithms)
Beta Function (Distribution and Special Functions algorithms)
Incomplete Gamma Function (Ratio) (Distribution and Special Functions algorithms)
Standard Normal (Distribution and Special Functions algorithms)


Standard Normal (Distribution and Special Functions algorithms)

standard normal,standard normal,standard normal
algorithms,algorithms,algorithms

Φ(x)=∫x−∞1
√ 2π
e−u2/2du     −∞<x<∞
xp=Φ−1(p)⇔Φ(x)=p

For Φ−1, the Abramowitz and Stegun method is used.

References. AS 66 (1973); Inverse: AS 111 (1977) and AS 241 (1988). See (Patel and Read, 1982) for related distributions, and see the Algorithm Index and References.

Related Topics

Special Functions (Distribution and Special Functions algorithms)
Gamma Function (Distribution and Special Functions algorithms)
Beta Function (Distribution and Special Functions algorithms)
Incomplete Gamma Function (Ratio) (Distribution and Special Functions algorithms)
Incomplete Beta Function (Ratio) (Distribution and Special Functions algorithms)


Algorithm Index (Distribution and Special Functions algorithms)

AS 3: (Cooper, 1968)a

AS 5: (Cooper, 1968)b

AS 27: (Taylor, 1970)

AS 32: (Bhattacharjee, 1970)

AS 63: (Majumder and Bhattacharjee, 1973)a

AS 64: (Majumder and Bhattacharjee, 1973)b

AS 66: (Hill, 1973)

AS 76: (Young and Minder, 1974)

AS 91: (Best and Roberts, 1975)

AS 109: (Cran, Martin, and Thomas, 1977)

AS 111: (Beasley and Springer, 1977)

AS 134: (Atkinson and Whittaker, 1979)

AS 147: (Lau, 1980)

AS 152: (Lund, 1980)

AS 170: (Narula and Desu, 1981)

AS 190: (Lund and Lund, 1983) , Correction (Lund and Lund, 1985), Remark (Royston, 1987)

AS 195: (Schervish, 1984)

AS 226: (Lenth, 1987)

AS 231: (Farebrother, 1987)

AS 239: (Shea, 1988)

AS 241: (Wichura, 1988)

AS 243: (Lenth, 1989)

AS 245: (Macleod, 1989)

AS 275: (Ding, 1992)

AS 462: (Donnelly, 1973)

AS R85: Shea (1991)

CACM 291: (Pike and Hill, 1966)

CACM 299: (Hill and Pike, 1967)

CACM 332: (Dorrer, 1968)

CACM 395: (Hill, 1970)a

CACM 396: (Hill, 1970)b

CACM 451: (Goldstein, 1973)

CACM 488: (Brent, 1974)

Related Topics

Distribution and Special Functions
Notation (Distribution and Special Functions algorithms)
Continuous Distributions (Distribution and Special Functions algorithms)
Discrete Distributions (Distribution and Special Functions algorithms)
Special Functions (Distribution and Special Functions algorithms)
References (Distribution and Special Functions algorithms)


References (Distribution and Special Functions algorithms)

Abramowitz, M., and I. A. Stegun, eds. 1970. Handbook of mathematical functions. New York: Dover Publications.

Ahrens, J. H., and U. Dieter. 1974. Computer methods for sampling from gamma, beta, Poisson and binomial distributions. Computing, 12, 223-246.

Atkinson, A. C., and J. Whittaker. 1979. Algorithm AS 134: The generation of beta random variables with one parameter greater than and one parameter less than 1. Applied Statistics, 28, 90-93.

Beasley, J. D., and S. G. Springer. 1977. Algorithm AS 111: The percentage points of the normal distribution. Applied Statistics, 26, 118-121.

Berger, R. L. 1991. AS R86: A remark on algorithm AS 152. Applied Statistics, 40, 374-375.

Best, D. J., and D. E. Roberts. 1975. Algorithm AS 91: The percentage points of the c2 distribution. Applied Statistics, 24, 385-388.

Bhattacharjee, G. P. 1970. Algorithm AS 32: The incomplete gamma integral. Applied Statistics, 19, 285-287.

Box, G. E. P., and M. E. Muller. 1958. A note on the generation of random normal deviates. Annals of Mathematical Statistics, 29, 610-611.

Bratley, P., and L. E. Schrage. 1987. A Guide to Simulation. New York: Springer-Verlag.

Brent, R. P. 1974. Algorithm 488: A Gaussian pseudo–random number generator. Communications of the ACM, 17, 704-706.

Cheng, R. C. H. 1978. Generating beta variates with nonintegral shape parameters. Communications of the ACM, 21, 317-322.

Cooper, B. E. 1968. Algorithm AS 3: The integral of Student’s t distribution. Applied Statistics, 17, 189-190.

Cooper, B. E. 1968. Algorithm AS 5: The integral of the noncentral t distribution. Applied Statistics, 17, 193-194.

Cran, G. W., K. J. Martin, and G. E. Thomas. 1977. Algorithm AS 109: A remark on algorithms: AS 63 and AS 64 (replacing AS 64). Applied Statistics, 26, 111-114.

Ding, C. G. 1992. Algorithm AS 275: Computing the noncentral chi-squared distribution function. Applied Statistics, 41, 478-482.

Donnelly, T. G. 1973. Algorithm 462: Bivariate Normal Distribution. Communications of ACM, 16, 638.

Dorrer, E. 1968. Algorithm 332: F-distribution. Communications of the ACM, 11, 115-116.

Farebrother, R. W. 1987. Algorithm AS 231: The distribution of a noncentral c2 variable with nonnegative degrees of freedom (Correction: 38: 204). Applied Statistics, 36, 402-405.

Fishman, G. S. 1976. Sampling from the gamma distribution on a computer. Communications of the ACM, 19, 407-409.

Frick, H. 1990. Algorithm AS R84: A remark on algorithm AS 226. Applied Statistics, 39, 311-312.

Goldstein, R. B. 1973. Algorithm 451: Chi-square quantiles. Communications of the ACM, 16, 483-485.

Hill, G. W. 1970. Algorithm 395: Student’s t-distribution. Communications of the ACM, 13, 617-619.

Hill, G. W. 1970. Algorithm 396: Student’s t-quantiles. Communications of the ACM, 13, 619-620.

Hill, I. D. 1973. Algorithm AS 66: The normal integral. Applied Statistics, 22, 424-424.

Hill, I. D., and A. C. Pike. 1967. Algorithm 299: Chi-squared integral. Communications of the ACM, 10, 243-244.

Jöhnk, M. D. 1964. Erzeugung von Betaverteilten und Gammaverteilten Zufallszahlen. Metrika, 8, 5-15.

Johnson, N. L., S. Kotz, and A. W. Kemp. 1992. Univariate Discrete Distributions, 2 ed. New York: John Wiley.

Johnson, N. L., S. Kotz, and N. Balakrishnan. 1994. Continuous Univariate Distributions, 2 ed. New York: John Wiley.

Kennedy, W. J., and J. E. Gentle. 1980. Statistical computing. New York: Marcel Dekker.

Kinderman, A. J., and J. G. Ramage. 1976. Computer generation of normal random variables (Correction: 85: 212). Journal of the American Statistical Association, 71, 893-896.

Lau, C. L. 1980. Algorithm AS 147: A simple series for the incomplete gamma integral. Applied Statistics, 29, 113-114.

Lenth, R. V. 1987. Algorithm AS 226: Computing noncentral beta probabilities (Correction: 39: 311–312). Applied Statistics, 36, 241-244.

Lenth, R. V. 1989. Algorithm AS 243: Cumulative distribution function of the noncentral t distribution. Applied Statistics, 38, 185-189.

Lund, R. E. 1980. Algorithm AS 152: Cumulative hypergeometric probabilities. Applied Statistics, 29, 221-223.

Lund, R. E., and J. R. Lund. 1983. Algorithm AS 190: Probabilities and upper quantiles for the studentized range. , 32, 204-210.

Lund, R. E., and J. R. Lund. 1985. Correction to Algorithm AS 190. , 34, 104-.

Macleod, A. J. 1989. Algorithm AS 245: A robust and reliable algorithm for the logarithm of the gamma function. Applied Statistics, 38, 397-402.

Majumder, K. L., and G. P. Bhattacharjee. 1973. Algorithm AS 63: The incomplete beta integral.. Applied Statistics, 22, 409-411.

Majumder, K. L., and G. P. Bhattacharjee. 1973. Algorithm AS 64: Inverse of the incomplete beta function ratio. Applied Statistics, 22, 412-414.

Marsaglia, G. 1962. Random variables and computers. In: Information theory statistical decision functions random processes: Transactions of the third Prague conference, J. Kozesnik, eds. Prague, Czechoslovak: Czechoslovak Academy of Science.

Michael, J., W. Schucany, and R. Haas. 1976. Generating random variates using transformation with multiple roots. American Statistician, 30, 88-90.

Mudholkar, G. S., Y. P. Chaubrey, and C. Lin. 1976. Approximations for the doubly noncentral F-distribution. Communications in Statistics, Part A, 5, 49-53.

Mudholkar, G. S., Y. P. Chaubrey, and C. Lin. 1976. Some Approximations for the noncentral F-distribution. Technometrics, 18, 351-358.

Mudholkar, G., and R. Natarajan. 1999. Approximations for the inverse Gaussian probabilities and percentiles. Communications in Statistics - Simulation and Computation, 28:4, 1051-1071.

Narula, S. C., and M. M. Desu. 1981. Computation of probability and noncentrality parameter of a noncentral chi-square distribution. Applied Statistics, 30, 349-352.

Patel, J. K., and C. B. Read. 1982. Handbook of the normal distribution. New York: Marcel Dekker.

Pike, M. C., and I. D. Hill. 1966. Algorithm 291: Logarithm of gamma function. Communications of the ACM, 9, 684-684.

Royston, J. P. 1987. AS R69: A remark on Algorithm AS 190. Applied Statistics, 36, 119.

Schervish, M. J. 1984. Algorithm AS 195: Multivariate normal probabilities with error bound. Applied Statistics, 33, 81-94.

Schrage, L. 1979. A more portable Fortran random number generator. ACM Transactions on Mathematical Software, 5:2, 132-132.

Shea, B. L. 1988. Algorithm AS 239: Chi-squared and incomplete gamma integral. Applied Statistics, 37, 466-473.

Shea, B. L. 1989. AS R77: A remark on algorithm AS 152. Applied Statistics, 38, 199-204.

Tadikamalla, P. R. 1978. Computer generation of gamma random variables. Communications of the ACM, 21, 419-422.

Taylor, G. A. R. 1970. Algorithm AS 27: The integral of Student’s t-distribution. Applied Statistics, 19, 113-114.

Von Neumann, J. 1951. Various techniques used in connection with random digits. National Bureau of Standards Applied Mathematics, 12, 36-38.

Wichura, M. J. 1988. Algorithm AS 241: The percentage points of the normal distribution. Applied Statistics, 37, 477-484.

Young, J. C., and C. E. Minder. 1974. Algorithm AS 76: An integral useful in calculating noncentral t and bivariate normal probabilities. Applied Statistics, 23, 455-457.

Related Topics

Distribution and Special Functions
Notation (Distribution and Special Functions algorithms)
Continuous Distributions (Distribution and Special Functions algorithms)
Discrete Distributions (Distribution and Special Functions algorithms)
Special Functions (Distribution and Special Functions algorithms)
Algorithm Index (Distribution and Special Functions algorithms)


Box's M Test

Box's M test,Box's M test,Box's M test
algorithms,algorithms,algorithms
Box's M test algorithms,Box's M test algorithms,Box's M test algorithms

Box’s M statistic is used to test for homogeneity of covariance matrices. The jth set of r dependent variables in the ith cell are y´ij=x´ijB+e´ij where eij˜Nr(0,w−1ijΣi) for i=1,...,g and j=1, ...,ni. The null hypothesis of the test for homogeneity of covariance matrices is Ho:Σ1= ... =Σg. Box (1949) derived a test statistic based on the likelihood-ratio test. The test statistic is called Box’s M statistic. For moderate to small sample sizes, an F approximation is used to compute its significance.

Box’s M statistic is not designed to be used in a linear model context; therefore the observed cell means are used in computing the statistic.

Note: Although Anderson (Anderson, 1958) mentioned that the population cell means can be expressed as linear combinations of parameters, he assumed that the combination coefficients are different for different cells, which is not the model assumed for GLM.

Related Topics

Notation (Box's M Test algorithms)
Means (Box's M Test algorithms)
Cell Covariance Matrix (Box's M Test algorithms)
Pooled Covariance Matrix (Box's M Test algorithms)
Box's M Statistic (Box's M Test algorithms)
Significance (Box's M Test algorithms)
References (Box's M Test algorithms)


Notation (Box's M Test algorithms)

Box's M test algorithms,Box's M test algorithms,Box's M test algorithms
notation,notation,notation

The following notation is used throughout this chapter unless otherwise stated:

g | Number of cells with non-singular covariance matrices.
ni | Number of cases in the ith cell.
n | Total sample size, n=n1+ ... +ng
yij | The jth set of dependent variables in the ith cell. A column vector of length r.
wij | Regression weight associated with yij. It is assumed wij>0.

Related Topics

Box's M Test
Means (Box's M Test algorithms)
Cell Covariance Matrix (Box's M Test algorithms)
Pooled Covariance Matrix (Box's M Test algorithms)
Box's M Statistic (Box's M Test algorithms)
Significance (Box's M Test algorithms)
References (Box's M Test algorithms)


Means (Box's M Test algorithms)

Box's M test algorithms,Box's M test algorithms,Box's M test algorithms
means,means,means

yi=Σnij=1yij/ni

Related Topics

Box's M Test
Notation (Box's M Test algorithms)
Cell Covariance Matrix (Box's M Test algorithms)
Pooled Covariance Matrix (Box's M Test algorithms)
Box's M Statistic (Box's M Test algorithms)
Significance (Box's M Test algorithms)
References (Box's M Test algorithms)


Cell Covariance Matrix (Box's M Test algorithms)

Box's M test algorithms,Box's M test algorithms,Box's M test algorithms
cell covariance matrix,cell covariance matrix,cell covariance matrix

Si={
Σnij=1wij(yij−yi)(yij−yi)´/(ni−1) | if ni>1
0 | if ni≤1

Related Topics

Box's M Test
Notation (Box's M Test algorithms)
Means (Box's M Test algorithms)
Pooled Covariance Matrix (Box's M Test algorithms)
Box's M Statistic (Box's M Test algorithms)
Significance (Box's M Test algorithms)
References (Box's M Test algorithms)


Pooled Covariance Matrix (Box's M Test algorithms)

Box's M test algorithms,Box's M test algorithms,Box's M test algorithms
pooled covariance matrix,pooled covariance matrix,pooled covariance matrix

S={
Σgi=1(ni−1)Si/(n−g) | if n>g
0 | if n≤g

Related Topics

Box's M Test
Notation (Box's M Test algorithms)
Means (Box's M Test algorithms)
Cell Covariance Matrix (Box's M Test algorithms)
Box's M Statistic (Box's M Test algorithms)
Significance (Box's M Test algorithms)
References (Box's M Test algorithms)


Box's M Statistic (Box's M Test algorithms)

Box's M test algorithms,Box's M test algorithms,Box's M test algorithms
Box's M statistic,Box's M statistic,Box's M statistic

M={
(n−g)log|S|−gΣi=1(ni−1)log|Si| | if |S|>0
SYSMIS | if |S|≤0

Related Topics

Box's M Test
Notation (Box's M Test algorithms)
Means (Box's M Test algorithms)
Cell Covariance Matrix (Box's M Test algorithms)
Pooled Covariance Matrix (Box's M Test algorithms)
Significance (Box's M Test algorithms)
References (Box's M Test algorithms)


Significance (Box's M Test algorithms)

Box's M test algorithms,Box's M test algorithms,Box's M test algorithms
significance,significance,significance

1−CDF.F(γM,f1,f2)

where CDF.F is the PASW Statistics function for the cumulative F distribution and

f1=(g−1)r(r+1)/2
ρ=1−2r2+3r−16(r+1)(g−1)(gΣi=11(ni−1)−1(n−g))
τ−(r−1)(r+2)6(g−1)(gΣi=11(ni−1)2−1(n−g)2)
f2=f1+2|τ−(1−ρ)2|
γ=(ρ−f1/f2)f1

The significance is a system-missing value whenever the denominator is zero in the above expression.

Related Topics

Box's M Test
Notation (Box's M Test algorithms)
Means (Box's M Test algorithms)
Cell Covariance Matrix (Box's M Test algorithms)
Pooled Covariance Matrix (Box's M Test algorithms)
Box's M Statistic (Box's M Test algorithms)
References (Box's M Test algorithms)


References (Box's M Test algorithms)

Box's M test algorithms,Box's M test algorithms,Box's M test algorithms
references,references,references

Anderson, T. W. 1958. Introduction to multivariate statistical analysis. New York: John Wiley & Sons, Inc..

Box, G. E. P. 1949. A general distribution theory for a class of likelihood criteria. Biometrika, 36, 317-346.

Seber, G. A. F. 1984. Multivariate observations. New York: John Wiley & Sons, Inc.

Related Topics

Box's M Test
Notation (Box's M Test algorithms)
Means (Box's M Test algorithms)
Cell Covariance Matrix (Box's M Test algorithms)
Pooled Covariance Matrix (Box's M Test algorithms)
Box's M Statistic (Box's M Test algorithms)
Significance (Box's M Test algorithms)


Confidence Intervals for Percentages and Counts Algorithms

confidence intervals for percentages and counts algorithms,confidence intervals for percentages and counts algorithms,confidence intervals for percentages and counts algorithms

This document describes the algorithms for computing confidence intervals for percentages and counts for bar charts. The data are assumed to be from a simple random sample, and each confidence interval is a separate or individual interval, based on a binomial proportion of the total count. The computed binomial intervals are equal-tailed Jeffreys prior intervals (see Brown, Cai, & DasGupta, 2001, 2002, 2003). Note that they are generally not symmetric around the observed proportion. Therefore, the plotted interval bounds are generally not symmetric around the observed percentage or count.

Related Topics

Notation (confidence intervals for percentages and counts algorithms)
Confidence Intervals for Counts (confidence intervals for percentages and counts algorithms)
Confidence Intervals for Percentages (confidence intervals for percentages and counts algorithms)
References (confidence intervals for percentages and counts algorithms)


Notation (confidence intervals for percentages and counts algorithms)

confidence intervals for percentages and counts algorithms,confidence intervals for percentages and counts algorithms,confidence intervals for percentages and counts algorithms
notation,notation,notation

The following notation is used throughout this section unless otherwise noted:

Xi | Distinct values of the category axis variable Xi
wi | Rounded sum of weights for cases with value
W=Σiwi | Total sum of weights over values of X
Pi | Population proportion of cases at Xi
• | Specified error level for 100(1- • )% confidence intervals

IDF.BETA(p,shape1,shape2) in COMPUTE gives the pth quantile of the beta distribution or incomplete beta function with shape parameters shape1 and shape2. For a precise mathematical definition, see Beta Function (Distribution and Special Functions algorithms).

Related Topics

Confidence Intervals for Percentages and Counts Algorithms
Confidence Intervals for Counts (confidence intervals for percentages and counts algorithms)
Confidence Intervals for Percentages (confidence intervals for percentages and counts algorithms)
References (confidence intervals for percentages and counts algorithms)


Confidence Intervals for Counts (confidence intervals for percentages and counts algorithms)

confidence intervals for percentages and counts algorithms,confidence intervals for percentages and counts algorithms,confidence intervals for percentages and counts algorithms
confidence intervals for counts (Wpi),confidence intervals for counts (Wpi),confidence intervals for counts (Wpi)

Lower bound for W pi = W [IDF.BETA(•/2,wi +.5,W−wi +.5)].

Upper bound for W pi = W [IDF.BETA(1-•/2,wi +.5,W−wi +.5)].

Related Topics

Confidence Intervals for Percentages and Counts Algorithms
Notation (confidence intervals for percentages and counts algorithms)
Confidence Intervals for Percentages (confidence intervals for percentages and counts algorithms)
References (confidence intervals for percentages and counts algorithms)


Confidence Intervals for Percentages (confidence intervals for percentages and counts algorithms)

confidence intervals for percentages and counts algorithms,confidence intervals for percentages and counts algorithms,confidence intervals for percentages and counts algorithms
confidence intervals for percentages (100pi),confidence intervals for percentages (100pi),confidence intervals for percentages (100pi)

Lower bound for 100 pi = 100 [IDF.BETA(•/2,wi +.5,W−wi +.5)].

Upper bound for 100 pi = 100 [IDF.BETA(1-•/2,wi +.5,W−wi +.5)].

Related Topics

Confidence Intervals for Percentages and Counts Algorithms
Notation (confidence intervals for percentages and counts algorithms)
Confidence Intervals for Counts (confidence intervals for percentages and counts algorithms)
References (confidence intervals for percentages and counts algorithms)


References (confidence intervals for percentages and counts algorithms)

confidence intervals for percentages and counts algorithms,confidence intervals for percentages and counts algorithms,confidence intervals for percentages and counts algorithms
references,references,references

Brown, L. D., T. Cai, and A. DasGupta. 2001. Interval estimation for a binomial proportion. Statistical Science, 16(2), 101-133.

Brown, L. D., T. Cai, and A. DasGupta. 2002. Confidence intervals for a binomial Proportion and asymptotic expansions. The Annals of Statistics, 30(4), 160-201.

Brown, L. D., T. Cai, and A. DasGupta. 2003. Interval estimation in exponential families. Statistica Sinica, 13, 19-49.

Related Topics

Confidence Intervals for Percentages and Counts Algorithms
Notation (confidence intervals for percentages and counts algorithms)
Confidence Intervals for Counts (confidence intervals for percentages and counts algorithms)
Confidence Intervals for Percentages (confidence intervals for percentages and counts algorithms)


Bibliography

Abraham, B., and J. Ledolter. 1983. Statistical methods of forecasting. New York: John Wiley and Sons.
Abramowitz, M., and I. A. Stegun, eds. 1970. Handbook of mathematical functions. New York: Dover Publications.
Addelman, S. 1962. Symmetrical and asymmetrical fractional factorial plans. Technometrics, 4, 47-58.
Agresti, A. 2002. Categorical Data Analysis, 2nd ed. New York: John Wiley and Sons.
Agresti, A. 1996. An Introduction to Categorical Data Analysis. New York: John Wiley and Sons.
Agresti, A. 1990. Categorical Data Analysis. New York: John Wiley.
Ahrens, J. H., and U. Dieter. 1974. Computer methods for sampling from gamma, beta, Poisson and binomial distributions. Computing, 12, 223-246.
Aitkin, M., D. Anderson, B. Francis, and J. Hinde. 1989. Statistical Modelling in GLIM. Oxford: Oxford Science Publications.
Akaah, I. P., and P. K. Korgaonkar. 1988. A conjoint investigation of the relative importance of risk relievers in direct marketing. Journal of Advertising Research, 28:4, 38-44.
Akaike, H. 1974. A new look at the statistical model identification. IEEE Transaction on Automatic Control, AC–19, 716-723.
Albert, A., and J. A. Anderson. 1984. On the Existence of Maximum Likelihood Estimates in Logistic Regression Models. Biometrika, 71, 1-10.
Aldrich, J. H., and F. D. Nelson. 1994. Linear Probability, Logit and Probit Models. Thousand Oaks, Calif.: Sage Publications, Inc..
Anderberg, M. R. 1973. Cluster analysis for applications. New York: Academic Press.
Anderson, T. W. 1958. Introduction to multivariate statistical analysis. New York: John Wiley & Sons, Inc..
Andrews, F., J. Morgan, J. Sonquist, and L. Klein. 1973. Multiple classification analysis, 2nd ed. Ann Arbor: University of Michigan.
Arya, S., and D. M. Mount. 1993. Algorithms for fast vector quantization. In: Proceedings of the Data Compression Conference 1993. : IEEE Press.
Atkinson, A. C., and J. Whittaker. 1979. Algorithm AS 134: The generation of beta random variables with one parameter greater than and one parameter less than 1. Applied Statistics, 28, 90-93.
Bamber, D. 1975. The area above the ordinal dominance graph and the area below the receiver operating graph. Journal of Mathematical Psychology, 12, 387-415.
Barlow, R. E., D. J. Bartholomew, D. J. Bremner, and H. D. Brunk. 1972. Statistical inference under order restrictions. New York: John Wiley and Sons.
Bartlett, M. S. 1946. On the theoretical specification of sampling properties of autocorrelated time series. Journal of Royal Statistical Society, Series B, 8, 27-27.
Bayes, T. 1763. An essay towards solving a problem in the doctrine of chances. Philosophical Transactions of the Royal Society, 53:, 370-418.
Beasley, J. D., and S. G. Springer. 1977. Algorithm AS 111: The percentage points of the normal distribution. Applied Statistics, 26, 118-121.
Beck, R. J., and E. Shultz. 1986. The use of relative operating characteristic (ROC) curves in test performance evaluation. Arch. Pathol. Lab. Med., 110, 13-20.
Becker, B., R. Kohavi, and D. Sommerfield. 2001. Visualizing the Simple Bayesian Classifier. In: Information Visualization in Data Mining and Knowledge Discovery, U. Fayyad, G. Grinstein, and A. Wierse, eds. San Francisco: Morgan Kaufmann Publishers.
Bell, E. H. 1961. Social foundations of human behavior: Introduction to the study of sociology. New York: Harper & Row.
Belsley, D. A., E. Kuh, and R. E. Welsch. 1980. Regression diagnostics: Identifying influential data and sources of collinearity. New York: John Wiley and Sons.
Bentler, P. M., and D. G. Weeks. 1978. Restricted multidimensional scaling models. Journal of Mathematical Psychology, 17, 138-151.
Benzécri, J. P. 1969. Statistical analysis as a tool to make patterns emerge from data. In: Methodologies of Pattern Recognition, S. Watanabe, eds. New York: Academic Press.
Berger, R. L. 1991. AS R86: A remark on algorithm AS 152. Applied Statistics, 40, 374-375.
Berk, K. N. 1977. Tolerance and condition in regression computation. Journal of the American Statistical Association, 72, 863-866.
Best, D. J., and D. E. Roberts. 1975. Algorithm AS 91: The percentage points of the c2 distribution. Applied Statistics, 24, 385-388.
Bhattacharjee, G. P. 1970. Algorithm AS 32: The incomplete gamma integral. Applied Statistics, 19, 285-287.
Biggs, D., B. de Ville, and E. Suen. 1991. A method of choosing multiway partitions for classification and decision trees. Journal of Applied Statistics, 18, 49-62.
Binder, D. A. 1983. On the variances of asymptotically normal estimators from complex surveys. International Statistical Review, 51, 279-292.
Binder, D. A. 1992. Fitting Cox’s Proportional Hazards Models from Survey Data. Biometrika, 79, 139-147.
Bishop, Y. M., S. E. Feinberg, and P. W. Holland. 1975. Discrete multivariate analysis: Theory and practice. Cambridge, Mass.: MIT Press.
Bishop, Y. M., S. E. Fienberg, and P. W. Holland. 1977. Discrete Multivariate Analysis: Theory and Practice. Cambridge, MA: MIT Press.
Bishop, C. M. 1995. Neural Networks for Pattern Recognition, 3rd ed. Oxford: Oxford University Press.
Björk, A., and G. H. Golub. 1973. Numerical methods for computing angles between linear subspaces. Mathematics of Computation, 27, 579-594.
Blake, C. L., and C. J. Merz. 1998. "UCI Repository of machine learning databases." Available at http://www.ics.uci.edu/~mlearn/MLRepository.html.
Blalock, H. M. 1972. Social statistics. New York: McGraw-Hill.
Bliss, C. I. 1967. Statistics in biology, Volume 1. New York: McGraw-Hill.
Blom, G. 1958. Statistical estimates and transformed beta variables. New York: John Wiley and Sons.
Bloomfield, P. 1976. Fourier analysis of time series. New York: John Wiley and Sons.
Bloxom, B. 1978. Contrained multidimensional scaling in n spaces. Psychometrika, 43, 397-408.
Bock, R. D. 1975. Multivariate statistical methods in behavioral research. New York: McGraw-Hill.
Bock, R. D. 1985. Multivariate statistical methods in behavioral research. Chicago: Scientific Software, Inc..
Bosten, N. E., and E. L. Battiste. 1980. Remark on Algorithm 179. Collected Algorithms from ACM, , 179-P-2-R1.
Bowker, A. H. 1948. A test for symmetry in contingency tables. Journal of the American Statistical Association, 43, 572-574.
Box, G. E. P., and D. R. Cox. 1964. An analysis of transformations. Journal of the Royal Statistical Society, Series B, 26, 211-246.
Box, G. E. P. 1949. A general distribution theory for a class of likelihood criteria. Biometrika, 36, 317-346.
Box, G. E. P., and M. E. Muller. 1958. A note on the generation of random normal deviates. Annals of Mathematical Statistics, 29, 610-611.
Box, G. E. P., and G. M. Jenkins. 1976. Time series analysis: Forecasting and control, Rev. ed. San Francisco: Holden-Day.
Box, G. E. P., G. M. Jenkins, and G. C. Reinsel. 1994. Time series analysis: Forecasting and control, 3rd ed. Englewood Cliffs, N.J.: Prentice Hall.
Box, G. E. P., and G. C. Tiao. 1975. Intervention analysis with applications to economic and environmental problems. Journal of the American Statistical Association, 70:3, 70-79.
Bozdogan, H. 1987. Model Selection and Akaike's Information Criterion (AIC): The General Theory and Its Analytical Extensions. Psychometrika, 52, 345-370.
Bratley, P., and L. E. Schrage. 1987. A Guide to Simulation. New York: Springer-Verlag.
Breiman, L., and J. H. Friedman. 1985. Estimating optimal transformations for multiple regression and correlation. Journal of the American Statistical Association, 80, 580-598.
Breiman, L., J. H. Friedman, R. A. Olshen, and C. J. Stone. 1984. Classification and Regression Trees. New York: Chapman & Hall/CRC.
Brent, R. P. 1974. Algorithm 488: A Gaussian pseudo–random number generator. Communications of the ACM, 17, 704-706.
Breslow, N. E. 1974. Covariance analysis of censored survival data. Biometrics, 30, 89-99.
Breslow, N. E., and N. E. Day. 1980. Statistical Methods in Cancer Research, 1, The Analysis of Case-Control Studies. : International Agency for Research on Cancer, Lyon..
Brewer, K. W. R. 1963. A Model of Systematic Sampling with Unequal Probabilities. Australian Journal of Statistics, 5, 93-105.
Brigham, E. O. 1974. The fast Fourier transform. Englewood Cliffs, N.J.: Prentice-Hall.
Brockwell, P. J., and R. A. Davis. 1991. Time Series: Theory and Methods, 2 ed. : Springer-Verlag.
Brown, M. B., and A. B. Forsythe. 1974b. Robust tests for the equality of variances. Journal of the American Statistical Association, 69:, 364-367.
Brown, M. B. 1975. The asymptotic standard errors of some estimates of uncertainty in the two-way contingency table. Psychometrika, 40(3), 291.
Brown, M. B., and J. K. Benedetti. 1977. Sampling behavior of tests for correlation in two-way contingency tables. Journal of the American Statistical Association, 72, 309-315.
Brown, L. D., T. Cai, and A. DasGupta. 2001. Interval estimation for a binomial proportion. Statistical Science, 16(2), 101-133.
Brown, L. D., T. Cai, and A. DasGupta. 2002. Confidence intervals for a binomial Proportion and asymptotic expansions. The Annals of Statistics, 30(4), 160-201.
Brown, L. D., T. Cai, and A. DasGupta. 2003. Interval estimation in exponential families. Statistica Sinica, 13, 19-49.
Brown, M. B., and A. B. Forsythe. 1974a. The small sample behavior of some statistics which test the equality of several means. Technometrics, 16, 129-132.
Brownlee, K. A. 1965. Statistical theory and methodology in science and engineering. New York: John Wiley & Sons, Inc.
Burns, P. R. 1984. Multiple comparison methods in MANOVA. In: Proceedings of the 7th SPSS Users and Coordinators Conference. : .
Cain, K. C., and N. T. Lange. 1984. Approximate case influence for the proportional hazards regression model with censored data. Biometrics, 40, 493-499.
Cameron, A. C., and P. K. Trivedi. 1998. Regression Analysis of Count Data. Cambridge: Cambridge University Press.
Campbell, G., and J. H. Skillings. 1985. Nonparametric Stepwise Multiple Comparison Procedures. Journal of the American Statistical Association, 80, 998-998.
Carroll, J. D., and J. J. Chang. 1970. Analysis of individual differences in multidimensional scaling via an n-way generalization of “Eckart-Young” decomposition. Psychometrika, 35, 238-319.
Carroll, J. D., and J. J. Chang. 1972. IDIOSCAL (Individual differences in orientation scaling). Paper presented at the spring meeting of the Psychometric Society, Princeton, New Jersey. : .
Carroll, J. D., S. Pruzansky, and J. B. Kruskal. 1980. CANDELINC: A general approach to multidimensional analysis with linear constraints on parameters. Psychometrika, 45, 3-24.
Cattell, R. B. 1966. The scree test for the number of factors. Journal of Multivariate Behavioral Research, 1, 245-276.
Centor, R. M., and J. S. Schwartz. 1985. An evaluation of methods for estimating the area under the receiver operating statistic (ROC) curve. Med. Decis. Making, 5, 149-156.
Chambers, R., and C. Skinner, eds. 2003. Analysis of Survey Data. New York: John Wiley & Sons.
Chambers, J. M., W. S. Cleveland, B. Kleiner, and P. A. Tukey. 1983. Graphical methods for data analysis. Boston: Duxbury Press.
Cheng, R. C. H. 1978. Generating beta variates with nonintegral shape parameters. Communications of the ACM, 21, 317-322.
Cheng, P. H., and C. Y. K. Meng. 1992. A New Formula for Tail probabilities of DUNNETT's T with Unequal Sample Sizes. ASA Proc. Stat. Comp., , 177-182.
Chiu, T., D. Fang, J. Chen, Y. Wang, and C. Jeris. 2001. A Robust and Scalable Clustering Algorithm for Mixed Type Attributes in Large Database Environment. In: Proceedings of the seventh ACM SIGKDD international conference on knowledge discovery and data mining. San Francisco, CA: ACM.
Christensen, R. 1990. Log-linear models. New York: Springer-Verlag.
Chromy, J. R. 1979. . Sequential Sample Selection Methods, , 401-406.
Clarke, M. R. B. 1982. Algorithm AS 178: The Gauss-Jordan sweep operator with detection of collinearity. Applied Statistics, 31:2, 166-168.
Cliff, N. 1966. Orthogonal rotation to congruence. Psychometrika, 31, 33-42.
Cochran, W. G. 1977. Sampling Techniques, 3rd ed. New York: John Wiley and Sons.
Cochran, W. G. 1954. Some methods of strengthening the common chi-square tests. Biometrics, 10, 417-451.
Cohen, A., and M. Rom. 1994. A Method for Hypothesis Tests in Polychotomous Logistic Regression. Computational Statistics and Data Analysis, 17, 277-288.
Cohen, J. 1977. Statistical power analysis for the behavioral sciences. San Diego, California: Academic Press.
Collett, D. 2003. Modelling survival data in medical research, 2 ed. Boca Raton: Chapman & Hall/CRC.
Commandeur, J. J. F., and W. J. Heiser. 1993. Mathematical derivations in the proximity scaling (PROXSCAL) of symmetric data matrices. Leiden: Department of Data Theory, University of Leiden.
Committee E-11 on Quality and Statistics, . 1990. ASTM Special Technical Publication (STP) 15D: Manual on presentation of data and control chart analysis, 6 ed. Philadelphia: American Society for Testing and Materials.
Cook, R. D. 1977. Detection of influential observations in linear regression. Technometrics, 19, 15-18.
Cooley, W. W., and P. R. Lohnes. 1971. Multivariate data analysis. New York: John Wiley & Sons, Inc..
Cooper, B. E. 1968. Algorithm AS 3: The integral of Student’s t distribution. Applied Statistics, 17, 189-190.
Cooper, B. E. 1968. Algorithm AS 5: The integral of the noncentral t distribution. Applied Statistics, 17, 193-194.
Cox, D. R. 1972. Regression models and life tables (with discussion). Journal of the Royal Statistical Society, Series B, 34, 187-220.
Cox, D. R., and E. J. Snell. 1989. The Analysis of Binary Data, 2nd ed. London: Chapman and Hall.
Cramer, J. S., and G. Ridder. 1988. The Logit Model in Economics. Statistica Neerlandica, 42, 291-314.
Cran, G. W., K. J. Martin, and G. E. Thomas. 1977. Algorithm AS 109: A remark on algorithms: AS 63 and AS 64 (replacing AS 64). Applied Statistics, 26, 111-114.
Cronbach, L. J. 1951. Coefficient alpha and the internal structure of tests. Psychometrika, 16:3, 297-334.
Cryer, J. D. 1986. Time series analysis. Boston, Mass.: Duxbury Press.
Cunningham, P., and S. J. Delaney. 2007. k-Nearest Neighbor Classifiers. Technical Report UCD-CSI-2007-4, School of Computer Science and Informatics, University College Dublin, Ireland, , - .
Dallal, G. E., and L. Wilkinson. 1986. An analytic approximation to the distribution of Lilliefor's test statistic for normality. The American Statistician, 40(4): 294–296 (Correction: 41: 248), - .
Davison, A. C., and D. V. Hinkley. 2006. Bootstrap Methods and their Application. : Cambridge University Press.
De Leeuw, J. 1977. Applications of convex analysis to multidimensional scaling. In: Recent developments in statistics, J. R. Barra, F. Brodeau, G. Romier, and B. van Cutsem, eds. Amsterdam, The Netherlands: North-Holland.
De Leeuw, J. 1984. Canonical analysis of categorical data, 2nd ed. Leiden: DSWO Press.
De Leeuw, J., and W. J. Heiser. 1980. Multidimensional scaling with restrictions on the configuration. In: Multivariate Analysis, Vol. V, P. R. Krishnaiah, eds. Amsterdam: North-Holland.
De Leeuw, J., and J. Van Rijckevorsel. 1980. HOMALS and PRINCALS—Some generalizations of principal components analysis. In: Data Analysis and Informatics, E. Diday, et al., eds. Amsterdam: North-Holland.
De Leeuw, J., F. W. Young, and Y. Takane. 1976. Additive structure in qualitative data: An alternating least squares method with optimal scaling features. Psychometrika, 41, 471-503.
Dempster, A. P., N. M. Laird, and D. B. Rubin. 1977. Maximum likelihood from incomplete data via the EM algorithm. Journal of the Royal Statistical Society, B, 39, 1-38.
Dempster, A. P. 1969. Elements of Continuous Multivariate Analysis. Reading, MA: Addison-Wesley.
Diggle, P. J., P. Heagerty, K. Y. Liang, and S. L. Zeger. 2002. The analysis of Longitudinal Data, 2 ed. Oxford: Oxford University Press.
Dillon, W. R., and M. Goldstein. 1984. Multivariate analysis: Methods and applications. New York: John Wiley and Sons.
Dineen, L. C., and B. C. Blakesley. 1973. Algorithm AS 62: Generator for the sampling distribution of the Mann-Whitney U statistic. Applied Statistics, 22, 269-273.
Ding, C. G. 1992. Algorithm AS 275: Computing the noncentral chi-squared distribution function. Applied Statistics, 41, 478-482.
Dixon, W. J. 1973. BMD Biomedical computer programs. Los Angeles: University of California Press.
Dixon, W. J. 1983. BMDP statistical software. Berkeley: University of California Press.
Dobson, A. J. 2002. An Introduction to Generalized Linear Models, 2 ed. Boca Raton, FL: Chapman & Hall/CRC.
Domingos, P., and M. J. Pazzani. 1996. Beyond Independence: conditions for the optimality of the simple Bayesian classifier. In: Machine Learning: Proceedings of the Thirteenth International Conference, L. Saitta, eds. : Morgan Kaufman.
Donnelly, T. G. 1973. Algorithm 462: Bivariate Normal Distribution. Communications of ACM, 16, 638.
Dorfman, D. D., and E. J. Alf. 1968. Maximum likelihood estimation of parameters of signal detection theory—A direct solution. Psychometrika, 33, 117-124.
Dorfman, D. D., and E. J. Alf. 1969. Maximum likelihood estimation of parameters of signal-detection theory and determination of confidence intervals—Rating-method data. Journal of Mathematical Psychology, 6, 487-496.
Dorrer, E. 1968. Algorithm 332: F-distribution. Communications of the ACM, 11, 115-116.
Dougherty, J., R. Kohavi, and M. Sahami. 1995. Supervised and unsupervised discretization of continuous features. In: Proceedings of the Twelfth International Conference on Machine Learning. Los Altos, CA: Morgan Kaufmann.
Draper, N. R., and H. Smith. 1981. Applied regression analysis, 2nd ed. New York: John Wiley and Sons.
Duncan, D. B. 1955. Multiple Range and Multiple F tests. Biometrics, 11, 1-42.
Duncan, D. B. 1975. t Tests and Intervals for Comparisons Suggested by the Data. Biometrics, 31, 339-360.
Dunn, O. J. 1964. Multiple Comparisons Using Rank Sums. Technometrics, 6, 241-241.
Dunn, P. K., and G. K. Smyth. 2005. Series Evaluation of Tweedie Exponential Dispersion Model Densities. Statistics and Computing, 15, 267-280.
Dunn, P. K., and G. K. Smyth. 2001. Tweedie Family Densities: Methods of Evaluation. In: Proceedings of the 16th International Workshop on Statistical Modelling. Odense, Denmark: .
Dunnett, C. W. 1955. A Multiple Comparisons Procedure for Comparing Several Treatments with a Control. Journal of the American Statistical Association, 50, 1096-1121.
Dunnett, C. W. 1980. Pairwise Multiple Comparisons in Homogeneous Variance, Unequal Sample Size Case. Journal of the American Statistical Association, 75, 789-795.
Dunnett, C. W. 1980. Pairwise Multiple Comparisons in the Unequal Variance Case. Journal of the American Statistical Association, 75, 796-800.
Dunnett, C. W. 1989. Multivariate Normal Probability Integrals with Product Correlation Structure. Applied Statistics, 38, 564-571.
Dziuban, C. D., and E. C. Shirkey. 1974. When is a correlation matrix appropriate for factor analysis?. Psychological Bulletin, 81, 358-361.
Eckart, C., and G. Young. 1936. The approximation of one matrix by another one of lower rank. Psychometrika, 1, 211-218.
Einot, I., and K. R. Gabriel. 1975. A Study of the powers of Several Methods of Multiple Comparisons. Journal of the American Statistical Association, 70, 574-783.
Eisenhart, C., M. W. Hastay, and N. A. Wallis, eds. 1947. Significance of the largest of a set of sample estimates of variance. In: Techniques of Statistical Analysis. New York: McGraw-Hill.
Emerson, P. L. 1968. Numerical construction of orthogonal polynomials from a general recurrence formula. Biometrics, 24, 695-701.
Everitt, B. S. 1977. The Analysis of Contingency Tables. London: Chapman & Hall.
Fai, A. H. T., and P. L. Cornelius. 1996. Approximate F-tests of Multiple Degree of Freedom Hypotheses in Generalized Least Squares Analyses of Unbalanced Split-plot Experiments. Journal of Statistical Computation and Simulation, 54, 363-378.
Fan, C. T., M. E. Muller, and I. Rezucha. 1962. Development of Sampling Plans by Using Sequential (Item by Item) Selection Techniques and Digital Computers. Journal of the American Statistical Association, 57, 387-402.
Farebrother, R. W. 1987. Algorithm AS 231: The distribution of a noncentral c2 variable with nonnegative degrees of freedom (Correction: 38: 204). Applied Statistics, 36, 402-405.
Fayyad, U., and K. Irani. 1993. Multi-interval discretization of continuous-value attributes for classification learning. In: Proceedings of the Thirteenth International Joint Conference on Artificial Intelligence. San Mateo, CA: Morgan Kaufmann.
Fellegi, I. P. 1980. Approximate tests of independence and goodness of fit based on stratified multistage samples. Journal of the American Statistical Association, 75, 261-268.
Fienberg, S. E. 1994. The Analysis of Cross-Classified Categorical Data, 2nd ed. Cambridge, MA: MIT Press.
Fine, T. L. 1999. Feedforward Neural Network Methodology, 3rd ed. New York: Springer-Verlag.
Finn, J. D. 1974. A general model for multivariate analysis. New York: Holt, Rinehart and Winston.
Finn, J. D. 1977. Multivariate analysis of variance and covariance. In: Statistical Methods for Digital Computers, Volume 3, K. Enslein, A. Ralston, and H. Wilf, eds. New York: John Wiley & Sons, Inc.
Finney, D. J. 1971. Probit analysis. Cambridge: Cambridge University Press.
Fisher, R. A. 1973. Statistical methods for research workers, 14th ed. New York: Hafner Publishing Company.
Fishman, G. S. 1976. Sampling from the gamma distribution on a computer. Communications of the ACM, 19, 407-409.
Fishman, G., and L. R. I. Moore. 1981. In search of correlation in multiplicative congruential generators with modulus 2**31-1. In: Computer Science and Statistics, Proceedings of the 13th Symposium on the Interface, W. F. Eddy, eds. New York: Springer-Verlag.
Fox, J. 1984. Linear statistical models and related methods: With applications to social research. New York: John Wiley and Sons.
Fox, D. R. 1989. Computer Selection of Size-Biased Samples. The American Statistician, 43:3, 168-171.
Frick, H. 1990. Algorithm AS R84: A remark on algorithm AS 226. Applied Statistics, 39, 311-312.
Friedman, J. H., J. L. Bentley, and R. A. Finkel. 1977. An algorithm for finding best matches in logarithm expected time. ACM Transactions on Mathematical Software, 3, 209-226.
Frigge, M., D. C. Hoaglin, and B. Iglewicz. 1987. Some implementations for the boxplot. In: Computer Science and Statistics Proceedings of the 19th Symposium on the Interface, R. M. Heiberger, and M. Martin, eds. Alexandria, Virginia: American Statistical Association.
Fuller, W. A. 1975. Regression analysis for sample survey. Sankhya, Series C, 37, 117-132.
Fuller, W. A. 1976. Introduction to statistical time series. New York: John Wiley and Sons.
Gabriel, K. R. 1978. A Simple method of Multiple Comparisons of Means. Journal of the American Statistical Association, 73, 724-729.
Games, P. A., and J. F. Howell. 1976. Pairwise Multiple Comparison Procedures with Unequal N's and/or Variances: A Monte Carlo Study. Journal of Educational Statistics, 1, 113-125.
Gardner, E. S. 1985. Exponential smoothing: The state of the art. Journal of Forecasting, 4, 1-28.
Gebhardt, F. 1966. Approximation to the Critical Values for Duncan's Multiple Range Test. Biometrics, 22, 179-182.
Gehan, E. A. 1975. Statistical methods for survival time studies. In: Cancer Therapy: Prognostic Factors and Criteria, M. J. Staquet, eds. New York: Raven Press.
Gibbons, J. D., and S. Chakraborti. 2003. Nonparametric Statistical Inference, 4th edition. : Marcel Dekker.
Giesbrecht, F. G. 1983. An efficient procedure for computing MINQUE of variance components and generalized least squares estimates of fixed effects. Communications in Statistics, Part A - Theory and Methods, 12:, 2169-2177.
Giesbrecht, F. G., and J. C. Burns. 1985. Two-Stage Analysis Based on a Mixed Model: Large-sample Asymptotic Theory and Small-Sample Simulation Results. Biometrics, 41, 477-486.
Gifi, A. 1985. PRINCALS. Research Report UG-85-02. Leiden: Department of Data Theory, University of Leiden.
Gifi, A. 1990. Nonlinear multivariate analysis. Chichester: John Wiley and Sons.
Gill, P. E., W. M. Murray, and M. A. Saunders. 1981. Practical Optimization. London: Academic Press.
Gill, P. E., W. M. Murray, M. A. Saunders, and M. H. Wright. 1984. Procedures for optimization problems with a mixture of bounds and general linear constraints. ACM Transactions on Mathematical Software, 10:3, 282-296.
Gill, P. E., W. M. Murray, M. A. Saunders, and M. H. Wright. 1986. User’s guide for NPSOL (version 4.0): A FORTRAN package for nonlinear programming. Technical Report SOL 86-2. Stanford University: Department of Operations Research.
Gill, J. 2000. Generalized Linear Models: A Unified Approach. Thousand Oaks, CA: Sage Publications.
Glaser, R. E. 1983. Levene's Robust Test of Homogeneity of Variances. In: Encyclopedia of Statistical Sciences 4. New York: Wiley, p608–610.
Goldstein, R. B. 1973. Algorithm 451: Chi-square quantiles. Communications of the ACM, 16, 483-485.
Golmant, J. 1990. Correction: Computer Selection of Size-Biased Samples. The American Statistician, , 194-194.
Golub, G. H., and C. Reinsch. 1971. Linear Algebra. In: Handbook for Automatic Computation, Volume II, J. H. Wilkinson, and C. Reinsch, eds. New York: Springer-Verlag.
Golub, G. H. 1969. Matrix decompositions and statistical calculations. In: Statistical Computation, R. C. Milton, and J. A. Nelder, eds. New York: Academic Press.
Goodman, L. A. 1981. Association Models and Canonical Correlation in the Analysis of Cross-Classifications having Ordered Categories. Journal of American Statistical Association, 76, 320-334.
Goodman, L. A. 1978. Analyzing qualitative/categorical data. New York: University Press of America.
Goodman, L. A. 1979. Simple models for the analysis of association in cross-classifications having ordered categories. Journal of the American Statistical Association, 74, 537-552.
Goodman, L. A., and W. H. Kruskal. 1954. Measures of association for cross-classification.. Journal of the American Statistical Association, 49, 732-764.
Goodman, L. A., and W. H. Kruskal. 1972. Measures of association for cross-classification, IV: simplification and asymptotic variances. Journal of the American Statistical Association, 67, 415-421.
Goodnight, J. H. 1978. Computing MIVQUE0 Estimates of Variance Components. SAS Technical Report, R-105, - .
Goodnight, J. H., and W. J. Hemmerle. 1979. A simplified algorithm for the W transformation in variance component estimation. Technometrics, 21, 265-267.
Goodnight, J. H. 1979. A tutorial on the SWEEP operator. The American Statistician, 33:3, 149-158.
Gottman, J. M. 1981. Time-series analysis: A comprehensive introduction for social scientists. Cambridge: Cambridge University Press.
Gower, J. C. 1966. Some distance properties of latent root and vector methods used in multivariate analysis. Biometrika, 53, 325-338.
Grambsch, P., and T. Therneau. 1994. Proportional hazards tests and diagnostics based on weighted residuals. Biometrika, 81, 515-526.
Grant, E. L., and R. S. Leavenworth. 1980. Statistical quality control, 5 ed. New York: McGraw-Hill.
Graubard, B. I., and E. L. Korn. Graubard. Hypothesis testing with complex survey data: The use of classical quadratic test statistics with particular reference to regression problems. Journal of the American Statistical Association, 88, 629-641.
Green, P. E., and V. Rao. 1972. Applied multidimensional scaling. Hinsdale, Ill.: Dryden Press.
Green, P. E., and Y. Wind. 1973. Multiattribute decisions in marketing: A measurement approach. Hinsdale, Ill.: Dryden Press.
Green, P. E. 1978. Analyzing multivariate data. Hinsdale, Ill.: The Dryden Press.
Green, D., and J. Swets. 1966. Signal Detection Theory and Psychophysics. New York: John Wiley & Sons.
Greenacre, M. J. 1984. Theory and applications of correspondence analysis. London: Academic Press.
Greenhouse, S. W., and S. Geisser. 1959. On methods in the analysis of profile data. Psychometrika, 24:2, 95-111.
Greenland, S. 1994. Alternative Models for Ordinal Logistic Regression. Statistics in Medicine, 13, 1665-1677.
Griner, P. F., R. J. Mayewski, A. I. Mushlin, and P. Greenland. 1981. Selection and interpretation of diagnostic tests and procedures: Principles in applications. Annals of Internal Medicine, 94, 553-600.
Groenen, P. J. F., W. J. Heiser, and J. J. Meulman. 1999. Global optimization in least squares multidimensional scaling by distance smoothing. Journal of Classification, 16, 225-254.
Groenen, P. J. F., B. van Os, and J. J. Meulman. 2000. Optimal scaling by alternating length-constained nonnegative least squares, with application to distance-based analysis. Psychometrika, 65, 511-524.
Guttman, L. 1941. The quantification of a class of attributes: A theory and method of scale construction. In: The Prediction of Personal Adjustment, P. Horst, eds. New York: Social Science Research Council.
Guttman, L. 1968. A general nonmetric technique for finding the smallest coordinate space for configurations of points. Psychometrika, 33, 469-506.
Guttman, L. 1945. A basis for analyzing test-retest reliability. Psychometrika, 10:4, 255-282.
Haberman, S. 1974. The Analysis of Frequency Data. Chicago: University of Chicago Press.
Haberman, S. J. 1982. Analysis of dispersion of multinomial responses. Journal of the American Statistical Association, 77, 568-580.
Haberman, S. J. 1977. Maximum likelihood estimates in exponential response models. Annals of Statistics, 5, 815-841.
Haberman, S. J. 1973. The analysis of residuals in cross-classified tables. Biometrics, 29, 205-220.
Haberman, S. J. 1978. Analysis of qualitative data. London: Academic Press.
Hanley, J. A., and B. J. McNeil. 1982. The Meaning and Use of the Area Under a Receiver Operating Characteristic (ROC) Curve. Radiology, 143:1, 29-36.
Hanley, J. A., and B. J. McNeil. 1983. A method of comparing the areas under receiver operating characteristic curves derived from the same cases. Radiology, 148, 839-843.
Hansen, M. H., and W. N. Hurwitz. 1943. On the theory of sampling from finite populations. Annals of Mathematical Statistics, 14, 333-362.
Hansen, M. H., W. N. Hurwitz, and W. G. Madow. 1953. Sample Survey Methods and Theory, Volume II Theory. New York: John Wiley & Sons.
Hanurav, T. V. 1967. Optimum Utilization of Auxiliary Information: PPS Sampling of Two Units from a Stratum. Journal of the Royal Statistical Society, Series B, 29, 374-391.
Hardin, J. W., and J. M. Hilbe. 2003. Generalized Linear Models and Extension. Station, TX: Stata Press.
Hardin, J. W., and J. M. Hilbe. 2001. Generalized Estimating Equations. Boca Raton, FL: Chapman & Hall/CRC.
Harman, H. H. 1976. Modern Factor Analysis, 3rd ed. Chicago: University of Chicago Press.
Harshman, R. A. 1970. Foundations of the PARAFAC procedure: Models and conditions for an explanatory multi-model factor analysis, Working Papers in Phonetics No. 16 ed. Los Angeles: University of California.
Harter, H. L. 1969. Order statistics and their use in testing and estimation, Volumes 1 and 2. Washington, D.C.: U.S. Government Printing Office: Aerospace Research Laboratories, United States Air Force.
Hartigan, J. A. 1975. Clustering algorithms. New York: John Wiley and Sons.
Harvey, A. C. 1989. Forecasting, structural time series models and the Kalman filter. Cambridge: Cambridge University Press.
Harvey, A. C. 1981. The econometric analysis of time series. Oxford: Philip Allan.
Harvey, A. C. 1981. Time series models. Oxford: Phillip Allan.
Hastie, T., and R. Tibshirani. 1990. Generalized additive models. London: Chapman and Hall.
Hauck, W. W., and A. Donner. 1977. Wald’s Test as Applied to Hypotheses in Logit Analysis. Journal of the American Statistical Association, 72, 851-853.
Hauck, W. 1989. Odds ratio inference from stratified samples. Commun. Statis.-Theory Meth., 18, 767-800.
Haykin, S. 1998. Neural Networks: A Comprehensive Foundation, 2nd ed. New York: Macmillan College Publishing.
Hays, W. L. 1981. Statistics, 3rd ed. New York: Holt, Rinehart, and Winston.
Hays, W. L. 1981. Statistics for the social sciences, 3rd ed. New York: Holt, Rinehart, and Winston.
Hays, W. L. 1973. Statistics for the social sciences. New York: Holt, Rinehart, and Winston.
Heiser, W. J. 1981. Unfolding analysis of proximity data. Leiden: Department of Data Theory, University of Leiden.
Heiser, W. J. 1985. A general MDS initialization procedure using the SMACOF algorithm-model with constraints: Technical Report No. RR-85-23. Leiden: Department of Data Theory, University of Leiden.
Heiser, W. J., and J. De Leeuw. 1986. SMACOF-I: Technical Report No. UG-86-02. Leiden: Department of Data Theory, University of Leiden.
Heiser, W. J., and I. Stoop. 1986. Explicit SMACOF algorithms for individual differences scaling: Technical Report No. RR-86-14. Leiden: Department of Data Theory, University of Leiden.
Heiser, W. J. 1987. Joint ordination of species and sites: The unfolding technique. In: Developments in numerical ecology, P. Legendre, and L. Legendre, eds. Berlin, Heidelberg: Springer-Verlag.
Henderson, C. R. 1984. Applications of Linear Models in Animal Breeding. Guelph, Ontario: University of Guelph.
Hendrickson, A. E., and P. O. White. 1964. Promax: a quick method for rotation to oblique simple structure. British Journal of Statistical Psychology, 17, 65-70.
Hettmansperger, T. P., and S. J. Sheather. 1986. Confidence Interval Based on Interpolated Order Statistics. Statistical Probability Letters, 4, 75-79.
Hill, G. W. 1970. Algorithm 395: Student’s t-distribution. Communications of the ACM, 13, 617-619.
Hill, G. W. 1970. Algorithm 396: Student’s t-quantiles. Communications of the ACM, 13, 619-620.
Hill, I. D. 1973. Algorithm AS 66: The normal integral. Applied Statistics, 22, 424-424.
Hill, I. D., and A. C. Pike. 1967. Algorithm 299: Chi-squared integral. Communications of the ACM, 10, 243-244.
Hoaglin, D. C., F. Mosteller, and J. W. Tukey. 1983. Understanding robust and exploratory data analysis. New York: John Wiley and Sons.
Hoaglin, D. C., F. Mosteller, and J. W. Tukey. 1985. Exploring data tables, trends, and shapes. New York: John Wiley and Sons.
Hoaglin, D. C., and R. E. Welsch. 1978. The hat matrix in regression and ANOVA. American Statistician, 32, 17-22.
Hochberg, Y. 1974. Some Generalizations of the T-method in Simultaneous Inference. Journal of Multivariate Analysis, 4, 224-234.
Hochberg, Y., and A. C. Tamhane. 1987. Multiple Comparison Procedures. New York: John Wiley & Sons, Inc..
Hollander, M., and D. A. Wolfe. 1999. Nonparametric Statistical Methods, 2nd edition. New York: John Wiley & Sons.
Holm, S. 1979. A simple sequentially rejective multiple test procedure. Scandinavian Journal of Statistics, 6, 65-70.
Horst, P. 1963. Matrix algebra for social scientists. New York: Holt, Rinehart and Winston.
Horton, N. J., and S. R. Lipsitz. 1999. Review of Software to Fit Generalized Estimating Equation Regression Models. The American Statistician, 53, 160-169.
Horwitz, D. G., and D. J. Thompson. 1952. A generalization of sampling without replacement from a finite universe. Journal of the American Statistical Association, 47, 663-685.
Hosmer, D. W. J., and S. Lemeshow. 1981. Applied Logistic Regression Models. Biometrics, 34, 318-327.
Hosmer, D. W., and S. Lemeshow. 2000. Applied Logistic Regression, 2nd ed. New York: John Wiley and Sons.
Hsu, J. C. 1989. Multiple Comparison Procedures. : American Statistical Association Short Course.
Hsu, C., H. Huang, and T. Wong. 2000. Why Discretization Works for Naive Bayesian Classifiers. In: Proceedings of the 17th International Conference on Machine Learning. San Francisco: Morgan Kaufman.
Huber, P. J. 1967. The Behavior of Maximum Likelihood Estimates under Nonstandard Conditions. In: Proceedings of the Fifth Berkeley Symposium on Mathematical Statistics and Probability. Berkeley, CA: University of California Press.
Huberty, C. J. 1972. Multivariate indices of strength of association. Multivariate Behavioral Research, 7, 516-523.
Hurvich, C. M., and C. L. Tsai. 1989. Regression and Time Series Model Selection in Small Samples. Biometrika, 76, 297-307.
Huynh, H., and L. S. Feldt. 1970. Conditions under which mean square ratios in repeated measurements designs have exact F-distributions. Journal of the American Statistical Association, 65, 1582-1589.
Huynh, H., and L. S. Feldt. 1976. Estimation of the Box correction for degrees of freedom from sample data in the randomized block and split plot designs. Journal of Educational Statistics, 1, 69-82.
International Association of Assessing Officers, . 1990. Property Appraisal and Assessment Administration. International Association of Assessing Officers: Chicago, Illinois.
Israëls, A. 1987. Eigenvalue techniques for qualitative data. Leiden: DSWO Press.
James, G. S. 1951. The comparison of several groups of observations when the ratios of the population variances are unknown. Biometrika, 38, 324-329.
Jennrich, R. I., and P. F. Sampson. 1976. Newton-Raphson and related algorithms for maximum likelihood variance component estimation. Technometrics, 18:, 11-17.
Jennrich, R. I., and P. F. Sampson. 1966. Rotation for simple loadings. Psychometrika, 31, 313-323.
Jöhnk, M. D. 1964. Erzeugung von Betaverteilten und Gammaverteilten Zufallszahlen. Metrika, 8, 5-15.
Johnson, R., and D. W. Wichern. 1982. Applied multivariate statistical analysis. Englewood Cliffs, N.J.: Prentice-Hall.
Johnson, N. L., S. Kotz, and A. W. Kemp. 1992. Univariate Discrete Distributions, 2 ed. New York: John Wiley.
Johnson, N. L., S. Kotz, and N. Balakrishnan. 1994. Continuous Univariate Distributions, 2 ed. New York: John Wiley.
Johnston, J. 1984. Econometric methods. New York: McGraw-Hill.
Jones, L. E., and F. W. Young. 1972. Structure of a social environment: longitudinal individual differences scaling of an intact group. Journal of Personality and Social Psychology, 24, 108-121.
Jöreskog, K. G. 1977. Factor analysis by least-square and maximum-likelihood method. In: Statistical Methods for Digital Computers, volume 3, K. Enslein, A. Ralston, and R. S. Wilf, eds. New York: John Wiley and Sons.
Jöreskog, K. G., and D. N. Lawley. 1968. New methods in maximum likelihood factor analysis. British Journal of Mathematical and Statistical Psychology, 21, 85-96.
Judge, G. G., W. E. Griffiths, R. C. Hill, H. Lutkepohl, and T. C. Lee. 1980. The theory and practice of econometrics, 2nd ed. New York: John Wiley and Sons.
Kaiser, H. F. 1963. Image analysis. In: Problems in Measuring Change, C. W. Harris, eds. Madison: University of Wisconsin Press.
Kaiser, H. F. 1970. A second-generation Little Jiffy. Psychometrika, 35, 401-415.
Kaiser, H. F., and J. Caffry. 1965. Alpha factor analysis. Psychometrika, 30, 1-14.
Kalbfleisch, J. D., and R. L. Prentice. 2002. The statistical analysis of failure time data, 2 ed. New York: John Wiley & Sons, Inc.
Kass, G. 1980. An exploratory technique for investigating large quantities of categorical data. Applied Statistics, 29:2, 119-127.
Kaufman, L., and P. J. Rousseeuw. 1990. Finding groups in data: An introduction to cluster analysis. New York: John Wiley and Sons.
Kendall, M. G. 1955. Rank correlation methods. London: Charles Griffin.
Kennedy, W. J., and J. E. Gentle. 1980. Statistical computing. New York: Marcel Dekker.
Kennedy, R., C. Riquier, and B. Sharp. 1996. Practical applications of correspondence analysis to categorical data in market research. Journal of Targeting, Measurement, and Analysis for Marketing, 5, 56-70.
Kinderman, A. J., and J. G. Ramage. 1976. Computer generation of normal random variables (Correction: 85: 212). Journal of the American Statistical Association, 71, 893-896.
Kirk, R. E. 1982. Experimental design, 2nd ed. Monterey, California: Brooks/Cole.
Kish, L., and M. R. Frankel. 1974. Inference from complex samples. Journal of the Royal Statistical Society B, 36, 1-37.
Kish, L. 1965. Survey Sampling. New York: John Wiley and Sons.
Kish, L. 1987. Statistical Design for Research. New York: John Wiley and Sons.
Kish, L. 1995. Methods for Design Effects. Journal of Official Statistics, 11, 119-127.
Knuth, D. E. 1973. The Art of Computer Programming, volume3: Sorting and Searching. Reading, MA: Addison-Wesley.
Knuth, D. E. 1981. The Art of Computer Programming, volume 2, p. 106. Reading, MA: Addison-Wesley.
Koch, G. G., D. H. Freeman, and J. L. Freeman. 1975. Strategies in the multivariate analysis of data from complex surveys. International Statistical Review, 43, 59-78.
Kohavi, R., and D. Sommerfield. 1995. Feature subset selection using the wrapper model: Overfitting and dynamic search space topology. In: The First International Conference on Knowledge Discovery and Data Mining. Menlo Park, California: AAAI Press.
Kohavi, R., B. Becker, and D. Sommerfield. 1997. Improving Simple Bayes. In: Proceedings of the European Conference on Machine Learning. : .
Kohn, R., and C. Ansley. 1986. Estimation, prediction, and interpolation for ARIMA models with missing data. Journal of the American Statistical Association, 81, 751-761.
Kohn, R., and C. Ansley. 1985. Efficient estimation and prediction in time series regression models. Biometrika, 72:3, 694-697.
Korn, E. L., and B. L. Graubard. 1990. Simultaneous testing of regression coefficients with complex survey data: Use of Bonferroni t statistics. American Statistician, 44, 270-276.
Kotz, S., and N. L. Johnson, eds. 1988. Encyclopedia of statistical sciences. New York: John Wiley & Sons, Inc.
Kraemer, H. C. 1982. Kappa Coefficient. In: Encyclopedia of Statistical Sciences, S. Kotz, and N. L. Johnson, eds. New York: John Wiley and Sons.
Kramer, C. Y. 1956. Extension of multiple range tests to group means with unequal numbers of replications. Biometrics, 12, 307-310.
Kristof, W. 1963. The statistical theory of stepped-up reliability coefficients when a test has been divided into several equivalent parts. Psychometrika, 28:3, 221-238.
Kristof, W. 1969. Estimation of true score and error variance for tests under various equivalence assumptions. Psychometrika, 34:4, 489-507.
Kruskal, J. B. 1964. Multidimensional scaling by optimizing goodness of fit to a nonmetric hypothesis. Psychometrika, 29, 1-28.
Kruskal, J. B. 1964. Nonmetric multidimensional scaling: A numerical method. Psychometrika, 29, 115-129.
Lane, P. W., and J. A. Nelder. 1982. Analysis of Covariance and Standardization as Instances of Prediction. Biometrics, 38, 613-621.
Lau, C. L. 1980. Algorithm AS 147: A simple series for the incomplete gamma integral. Applied Statistics, 29, 113-114.
Lawless, R. F. 1982. Statistical models and methods for lifetime data. New York: John Wiley & Sons, Inc..
Lawless, J. E. 1984. Negative Binomial and Mixed Poisson Regression. The Canadian Journal of Statistics, 15, 209-225.
Ledolter, J., and B. Abraham. 1984. Some comments on the initialization of exponential smoothing. Journal of Forecasting, 3, 79-84.
Lee, E., and M. Desu. 1972. A computer program for comparing k samples with right censored data. Computer Programs in Biomedicine, 2, 315-321.
Lehmann, E. L. 1975. Nonparametrics: Statistical methods based on ranks. San Francisco: Holden-Day.
Lehmann, E. L. 1985. Nonparametrics: Statistical Methods Based on Ranks. San Francisco: McGraw-Hill.
Lenth, R. V. 1987. Algorithm AS 226: Computing noncentral beta probabilities (Correction: 39: 311–312). Applied Statistics, 36, 241-244.
Lenth, R. V. 1989. Algorithm AS 243: Cumulative distribution function of the noncentral t distribution. Applied Statistics, 38, 185-189.
Li, K. H., T. E. Raghunathan, and D. B. Rubin. 1991. Large-Sample Significance Levels from Multiply Imputed Data Using Moment-Based Statistics and an F Reference Distribution. Journal of the American Statistical Association, 86, 1065-1073.
Liang, K. Y., and S. L. Zeger. 1986. Longitudinal Data Analysis Using Generalized Linear Models. Biometrika, 73, 13-22.
Lilliefors, H. W. 1967. On the Kolmogorov-Smirnov tests for normality with mean and variance unknown. Journal of the American Statistical Association, 62, 399-402.
Lim, T. S., W. Y. Loh, and Y. S. Shih. 2000. A Comparison of Prediction Accuracy, Complexity, and Training Time of Thirty-three Old and New Classification Algorithms. Machine Learning, 40:3, 203-228.
Lin, D. Y. 2000. On fitting Cox’s proportional hazards models to survey data. Biometrika, 87, 37-47.
Ling, R. E. 1978. A study of the accuracy of some approximations for t, chi-square, and F tail probabilities. Journal of American Statistical Association, 73, 274-283.
Link, C. L. 1984. Confidence intervals for the survival function using Cox's proportional hazards model with covariates. Biometrics, 40, 601-610.
Link, C. L. 1986. Confidence intervals for the survival function in the presence of covariates. Biometrics, 42, 219-220.
Lipsitz, S. H., K. Kim, and L. Zhao. 1994. Analysis of Repeated Categorical Data Using Generalized Estimating Equations. Statistics in Medicine, 13, 1149-1163.
Little, R. J. A. 1988. A test of missing completely at random for multivariate data with missing values. Journal of the American Statistical Association, 83, 1198-1202.
Little, R. J. A., and D. B. Rubin. 1987. Statistical analysis with missing data. New York: John Wiley & Sons, Inc. .
Liu, H., F. Hussain, C. L. Tan, and M. Dash. 2002. Discretization: An Enabling Technique. Data Mining and Knowledge Discovery, 6, 393-423.
Loh, W. Y., and Y. S. Shih. 1997. Split selection methods for classification trees. Statistica Sinica, 7, 815-840.
Loh, W. Y. 1987. Some Modifications of Levene's Test of Variance Homogeneity. Journal of the Statistical Computation and Similarities, 28, 213-226.
Long, J. S. 1997. Regression Models for Categorical and Limited Dependent Variables. New York: Advanced Quantitative Techniques in the Social Sciences Series.
Louise, T. A. 1982. Finding the observed information matrix when using the EM algorithm. Journal of the Royal Statistical Society, B, 44:2, 226-233.
Luce, R. D. 1959. Individual Choice Behavior. New York: John Wiley.
Ludwig, O. G. 1963. Algorithm 179: Incomplete beta ratio. Communications of the ACM, 6, 314-314.
Lund, R. E. 1980. Algorithm AS 152: Cumulative hypergeometric probabilities. Applied Statistics, 29, 221-223.
Lund, R. E., and J. R. Lund. 1983. Algorithm AS 190: Probabilities and upper quantiles for the studentized range. , 32, 204-210.
Lund, R. E., and J. R. Lund. 1985. Correction to Algorithm AS 190. , 34, 104-.
MacCallum, R. C. 1977. Effects of conditionality on INDSCAL and ALSCAL weights. Psychometrika, 42, 297-305.
Macleod, A. J. 1989. Algorithm AS 245: A robust and reliable algorithm for the logarithm of the gamma function. Applied Statistics, 38, 397-402.
Magidson, J. 1995. Introducing a New Graphical Model for the Analysis of an Ordinal Categorical Response – Part I. Journal of Targeting, Measurement and Analysis for Marketing, 4:2, 133-148.
Majumder, K. L., and G. P. Bhattacharjee. 1973. Algorithm AS 63: The incomplete beta integral.. Applied Statistics, 22, 409-411.
Majumder, K. L., and G. P. Bhattacharjee. 1973. Algorithm AS 64: Inverse of the incomplete beta function ratio. Applied Statistics, 22, 412-414.
Makridakis, S. G., S. C. Wheelwright, and R. J. Hyndman. 1997. Forecasting: Methods and applications, 3rd ed. ed. New York: John Wiley and Sons.
Makridakis, S., S. C. Wheelwright, and V. E. McGee. 1983. Forecasting: Methods and applications. New York: John Wiley and Sons.
Mantel, N., and W. Haenszel. 1959. Statistical aspects of the analysis of data from retrospective studies of disease. J. Natl. Cancer Inst., 22, 719-748.
Mardia, K. V. 1972. Statistics of Directional Data. New York: Academic Press.
Mardia, K. V., J. T. Kent, and J. M. Bibby. 1979. Multivariate Analysis. New York: Academic Press.
Marsaglia, G. 1962. Random variables and computers. In: Information theory statistical decision functions random processes: Transactions of the third Prague conference, J. Kozesnik, eds. Prague, Czechoslovak: Czechoslovak Academy of Science.
Matsumoto, M., and T. Nishimura. 1998. Mersenne Twister, A 623–dimensionally equidistributed uniform pseudorandom number generator. ACM Trans. on Modeling and Computer Simulation, 8:1, 3-30.
Matsumoto, M., and Y. Kurita. 1994. Twisted GFSR generators II. ACM Trans. on Modeling and Computer Simulation, 4:3, 254-266.
Mauchly, J. W. 1940. Significance test for sphericity of a normal n-variate distribution. Annals of Mathematical Statistics, 11, 204-209.
Max, J. 1960. Quantizing for minimum distortion. Proceedings IEEE (Information Theory), 6, 7-12.
McCleary, R., and R. A. Hay. 1980. Applied time series analysis for the social sciences. Beverly Hills, Calif.: Sage Publications.
McCullagh, P. 1980. Regression Models for Ordinal Data. Journal of the Royal Statistical Society B, 42:2, 109-142.
McCullagh, P. 1983. Quasi-Likelihood Functions. Annals of Statistics, 11, 59-67.
McCullagh, P., and J. A. Nelder. 1989. Generalized Linear Models, 2nd ed. London: Chapman & Hall.
McFadden, D. 1974. Conditional logit analysis of qualitative choice behavior. In: Frontiers in Economics, P. Zarembka, eds. New York: Academic Press.
McGraw, K. O., and S. P. Wong. 1996. Forming inferences about some intraclass correlation coefficients. Psychological Methods, 1:1, 30-46.
McLaughlin, R. L. 1984. Forecasting techniques for decision making. Rockville, Md.: Control Data Management Institute.
McLean, R. A., and W. L. Sanders. 1988. Approximating Degrees of Freedom for Standard Errors in Mixed Linear Models. In: Proceedings of the Statistical Computing Section, American Statistical Association. New Orleans: American Statistical Association.
McNemar, Q. 1947. Note on the sampling error of the difference between correlated proportions or percentages. Psychometrika, 12, 153-157.
Melard, G. 1984. A fast algorithm for the exact likelihood of autoregressive-moving average models. Applied Statistics, 33:1, 104-119.
Menec, V., N. Roos, D. Nowicki, L. MacWilliam, G. Finlayson, and C. Black. 1999. Seasonal Patterns of Winnipeg Hospital Use. : Manitoba Centre for Health Policy.
Metz, C. E. 1978. Basic principles of ROC analysis. Seminars in Nuclear Medicine, 8, 283-298.
Metz, C. E. 1993. ROC Software Package. : .
Metz, C. E., and H. B. Kronman. 1980. Statistical significance tests for binormal ROC curves. Journal of Mathematical Psychology, 22, 218-243.
Meulman, J. J., and W. J. Heiser. 1984. Constrained Multidimensional Scaling: more Directions than Dimensions. In: COMPSTAT 1984, T. Havranek, eds. Wien: Physica Verlag.
Meulman, J. J. 1982. Homogeneity analysis of incomplete data. Leiden: DSWO Press.
Meyer, L. S., and M. S. Younger. 1976. Estimation of standardized coefficients. Journal of the American Statistical Association, 71, 154-157.
Michael, J., W. Schucany, and R. Haas. 1976. Generating random variates using transformation with multiple roots. American Statistician, 30, 88-90.
Miller, R. G. 1980. Simultaneous Statistical Inference, 2 ed. New York: Springer-Verlag.
Miller, R. G. J. 1966. Simultaneous statistical inference. New York: McGraw-Hill.
Miller, M. E., C. S. Davis, and J. R. Landis. 1993. The Analysis of Longitudinal Polytomous Data: Generalized Estimating Equations and Connections with Weighted Least Squares. Biometrics, 49, 1033-1044.
Milliken, G., and D. Johnson. 1992. Analysis of Messy Data: Volume 1. Designed Experiments. New York: Chapman & Hall.
Monro, D. M. 1975. Algorithm AS 83: Complex discrete fast Fourier transform. Applied Statistics, 24, 153-160.
Monro, D. M., and J. L. Branch. 1977. Algorithm AS 117: The Chirp discrete Fourier transform of general length. Applied Statistics, 26, 351-361.
Montgomery, D. C., and E. A. Peck. 1982. Introduction to linear regression analysis. New York: John Wiley and Sons.
Moré, J. J. 1977. The Levenberg-Marquardt algorithm: implementation and theory in numerical analysis. In: Lecture Notes in Mathematics , G. A. Watson, eds. Berlin: Springer-Verlag.
Morf, M., G. S. Sidhu, and T. Kailath. 1974. Some new algorithms for recursive estimation in constant, linear, discrete-time systems. IEEE Transactions on Automatic Control, AC-19:4, 315-323.
Morrison, D. F. 1976. Multivariate statistical methods. New York: McGraw-Hill.
Mudholkar, G. S., Y. P. Chaubrey, and C. Lin. 1976. Approximations for the doubly noncentral F-distribution. Communications in Statistics, Part A, 5, 49-53.
Mudholkar, G. S., Y. P. Chaubrey, and C. Lin. 1976. Some Approximations for the noncentral F-distribution. Technometrics, 18, 351-358.
Mudholkar, G. S., Y. P. Chaubrey, and C. Lin. 1976. Some Approximations for the noncentral F-distribution. Technometrics, 18, 351-358.
Mudholkar, G., and R. Natarajan. 1999. Approximations for the inverse Gaussian probabilities and percentiles. Communications in Statistics - Simulation and Computation, 28:4, 1051-1071.
Muller, K. E., and B. L. Peterson. 1984. Practical methods for computing power in testing the multivariate general linear hypothesis. Computational Statistics and Data Analysis, 2, 143-158.
Murthy, M. N. 1957. Ordered and Unordered Estimators in Sampling Without Replacement. Sankhya, 18, 379-390.
Murthy, M. N. 1967. Sampling Theory and Methods. Calcutta, India: Statistical Publishing Society.
Nagelkerke, N. J. D. 1991. A note on the general definition of the coefficient of determination. Biometrika, 78:3, 691-692.
Narula, S. C., and M. M. Desu. 1981. Computation of probability and noncentrality parameter of a noncentral chi-square distribution. Applied Statistics, 30, 349-352.
Natarajan, R., and E. Pednault. 2001. Using Simulated Pseudo Data to Speed Up Statistical Predictive Modeling from Massive Data Sets. In: SIAM First International Conference on Data Mining. : .
Nelder, J. A., and R. W. M. Wedderburn. 1972. Generalized Linear Models. Journal of the Royal Statistical Society Series A, 135, 370-384.
Nishisato, S. 1980. Analysis of categorical data: Dual scaling and its applications. Toronto: University of Toronto Press.
Novick, M. R., and C. Lewis. 1967. Coefficient alpha and the reliability of composite measurements. Psychometrika, 32:1, 1-13.
Null, C. H., and W. S. Sarle. 1982. Multidimensional scaling by least squares. Proceedings of the 7th Annual SAS User's Group International, , - .
Odeh, R. E., and D. B. Owen. 1980. Tables for Normal Tolerance Limits, Sampling Plans, and Screening. New York: Marcel Dekker.
Orchard, T., and M. A. Woodbury. 1972. . In: Missing information principal: Theory and applications. Berkeley: University of California Press.
Pan, W. 2001. Akaike’s Information Criterion in Generalized Estimating Equations. Biometrics, 57, 120-125.
Pankratz, A. 1983. Forecasting with univariate Box-Jenkins models: Concepts and cases. New York: John Wiley and Sons.
Patel, J. K., and C. B. Read. 1982. Handbook of the normal distribution. New York: Marcel Dekker.
Pearlman, J. G. 1980. An algorithm for the exact likelihood of a high-order autoregressive-moving average process. Biometrika, 67:1, 232-233.
Peizer, D. B., and J. W. Pratt. 1968. A normal approximation for binomial, F, beta and other common related tail probabilities. Journal of American Statistical Association, 63, 1416-1456.
Pena, D., G. C. Tiao, and R. S. Tsay, eds. 2001. A course in time series analysis. New York: John Wiley and Sons.
Peterson, B., and F. Harrell. 1990. Partial proportional odds models for ordinal response variables. Applied Statistics, 39, 205-217.
Pierce, D. A., and D. W. Schafer. 1986. Residuals in generalized linear models. Journal of the American Statistical Association, 81, 977-986.
Pike, M. C., and I. D. Hill. 1966. Algorithm 291: Logarithm of gamma function. Communications of the ACM, 9, 684-684.
Pillai, K. C. S. 1967. Upper percentage points of the largest root of a matrix in multivariate analysis. Biometrika, 54, 189-194.
Plackett, R. L., and J. P. Burman. 1946. The design of optimum multifactorial experiments. Biometrika, 33, 305-325.
Pratt, J. W. 1987. Dividing the indivisible: Using simple symmetry to partition variance explained. In: Proceedings of the Second International Conference in Statistics, T. Pukkila, and S. Puntanen, eds. Tampere, Finland: University of Tampere.
Pregibon, D. 1981. Logistic Regression Diagnostics. Annals of Statistics, 9, 705-724.
Price, R. H., and D. L. Bouffard. 1974. Behavioral appropriateness and situational constraints as dimensions of social behavior. Journal of Personality and Social Psychology, 30, 579-586.
Priestley, M. B. 1981. Spectral analysis and time series, volumes 1 and 2. London: Academic Press.
Quenouville, M. H. 1949. Approximate tests of correlation in time series. Journal of the Royal Statistical Society, Series B, 11, 68-68.
Raghunathan, T. E., J. M. Lepkowski, J. van Hoewyk, and P. Solenberger. 2001. A multivariate technique for multiply imputing missing values using a sequence of regression models. Survey Methodology , 27, 85-95.
Ramsay, J. O. 1989. Monotone regression splines in action. Statistical Science, 4, 425-441.
Ramsey, P. H. 1978. Power Differences Between Pairwise Multiple Comparisons. Journal of the American Statistical Association, 73, 479-485.
Rao, C. R. 1973. Linear statistical inference and its applications, 2nd ed. New York: John Wiley and Sons.
Rao, C. R. 1980. Matrix approximations and reduction of dimensionality in multivariate statistical analysis. In: Multivariate Analysis, Vol. 5, P. R. Krishnaiah, eds. Amsterdam: North-Holland.
Rao, J. N. K., and A. J. Scott. 1981. The analysis of categorical data from complex sample surveys: chi-squared tests for goodness of fit and independence in two-way tables. Journal of the American Statistical Association, 76, 221-230.
Rao, J. N. K., and A. J. Scott. 1984. On chi-squared tests for multiway contingency tables with cell proportions estimated from survey data. Annals of Statistics, 12, 46-60.
Rao, J. N. K., and D. R. Thomas. 2003. Analysis of categorical response data from complex surveys: an Appraisal and update. In: Analysis of Survey Data, R. Chambers, and C. Skinner, eds. New York: John Wiley & Sons.
Rao, C. R. 1951. An asymptotic expansion of the distribution of Wilks’ criterion. Bulletin of the International Statistical Institute, 33:2, 177-180.
Rickman, R., N. Mitchell, J. Dingman, and J. E. Dalen. 1974. Changes in serum cholesterol during the Stillman Diet. Journal of the American Medical Association, 228:, 54-58.
Ridout, M. S., and J. M. Cobby. 1989. A remark on algorithm AS 178. Applied Statistics, 38, 420-422.
Ripley, B. D. 1996. Pattern Recognition and Neural Networks. Cambridge: Cambridge University Press.
Robins, J., N. Breslow, and S. Greenland. 1986. Estimators of the Mantel-Haenszel variance consistent in both sparse data and large-strata limiting models. Biometrics, 42, 311-323.
Robson, D. S. 1959. A simple method for construction of orthogonal polynomials when the independent variable is unequally spaced. Biometrics, 15, 187-191.
Romesburg, H. C. 1984. Cluster analysis for researchers. Belmont, Calif.: Lifetime Learning Publications.
Rosenberg, S., and M. P. Kim. 1975. The method of sorting as a data-gathering procedure in multivariate research. Multivariate Behavioral Research, 10, 489-502.
Rosipal, R., and N. Krämer. 2006. Overview and Recent Advances in Partial Least Squares. In: Subspace, Latent Structure and Feature Selection Techniques, C. Saunders, M. Grobelnik, S. Gunn, and J. Shawe-Taylor, eds. Berlin: Springer-Verlag.
Royston, J. P. 1987. AS R69: A remark on Algorithm AS 190. Applied Statistics, 36, 119.
Rubin, R. B. 1987. Multiple Imputation for Nonresponse in Surveys. New York: John Wiley and Sons, Inc..
Rubin, D. B. 1987. Multiple imputation for nonresponse data in surveys. New York: John Wiley & Sons, Inc..
Rummel, R. J. 1970. Applied factor analysis. Evanston: Ill.: Northwestern University Press.
Ryan, T. A. 1959. Multiple Comparisons in Psychological Research. Psychological Bulletin, 56, 26-47.
Ryan, T. A. 1960. Significance Tests for Multiple Comparison of Proportions, Variances, and Other Statistics. Psychological Bulletin, 57, 318-328.
Sampford, M. R. 1967. On Sampling without Replacement with Unequal Probabilities of Selection. Biometrika, 54, 499-513.
Santner, T. J., and E. D. Duffy. 1986. A Note on A. Albert and J.A. Anderson's Conditions for the Existence of Maximum Likelihood Estimates in Logistic Regression Models. Biometrika, 73, 755-758.
Särndal, C., B. Swensson, and J. Wretman. 1992. Model Assisted Survey Sampling. New York: Springer-Verlag.
SAS Institute, Inc., . 1990. SAS/STAT User's Guide, Version 6, 4 ed. Cary, NC: SAS Institute Inc..
Satterthwaite, F. E. 1946. An approximate distribution of estimates of variance components. Biometrics Bulletin, 2, 110-114.
Schafer, J. L. 1997. Analysis of Incomplete Multivariate Data. London: Chapman and Hall.
Scheffe, H. 1953. A method for judging all contrasts in the analysis of variance. Biometrika, 40, 87-104.
Scheffe, H. 1959. The Analysis of Variance. New York: John Wiley & Sons, Inc..
Schervish, M. J. 1984. Algorithm AS 195: Multivariate normal probabilities with error bound. Applied Statistics, 33, 81-94.
Schiffman, S. S., M. L. Reynolds, and F. W. Young. 1981. Introduction to multidimensional scaling: theory, methods and applications. New York: Academic Press.
Schoonjans, F. 1993–1998. MedCalc Version 4.20.011. : .
Schrage, L. 1979. A more portable Fortran random number generator. ACM Transactions on Mathematical Software, 5:2, 132-132.
Schwartz, G. 1978. Estimating the dimensions of a model. Annals of Statistics, 6, 461-464.
Schwarz, G. 1978. Estimating the Dimension of a Model. Annals of Statistics, 6, 461-464.
Searle, R. S. 1987. Linear Models for Unbalanced Data. New York: Wiley.
Searle, S. R., F. M. Speed, and G. A. Milliken. 1980. Population marginal means in the linear model: an alternative to least squares means. The American Statistician, 34, 216-221.
Searle, S. R. 1971. Linear Models. New York: John Wiley & Sons, Inc.
Searle, S. R. 1982. Matrix algebra useful for statistics. New York: John Wiley & Sons, Inc..
Searle, S. R., G. Casella, and C. E. McCulloch. 1992. Variance Components. New York: John Wiley and Sons.
Searle, S. R. 1966. Matrix algebra for the biological sciences. New York: John Wiley & Sons, Inc.
Seber, G. A. F. 1984. Multivariate observations. New York: John Wiley & Sons, Inc.
Sen, A. R. 1953. On the estimate of the variance in sampling with varying probabilities. Journal of the Indian Society of Agricultural Statistics, 5, 55-77.
Shah, B. V., M. M. Holt, and R. E. Folsom. 1977. Inference about regression models from sample survey data. Bulletin of the International Statistical Institute, 67:3, 43-57.
Shao, J., and D. Tu. 1995. The Jackknife and Bootstrap. New York: Springer.
Shapiro, S. S., and M. B. Wilk. 1965. An analysis of variance test for normality. Biometrika, 52:3, 591-599.
Shea, B. L. 1988. Algorithm AS 239: Chi-squared and incomplete gamma integral. Applied Statistics, 37, 466-473.
Shea, B. L. 1989. AS R77: A remark on algorithm AS 152. Applied Statistics, 38, 199-204.
Sheskin, D. J. 2007. Handbook of Parametric and Nonparametric Statistical Procedures, 4th edition. : Chapman & Hall/CRC.
Shrout, P. E., and J. L. Fleiss. 1979. Intraclass correlations: Uses in assessing reliability. Psychological Bulletin, 86:, 420-428.
Sidak, Z. 1967. Rectangular confidence regions for the means of multivariate normal distributions. Journal of the American Statistical Association, 62, 626-633.
Siegel, S., and N. J. Castellan. 1988. Nonparametric statistics for the behavioral sciences. New York: McGraw-Hill, Inc..
Siegel, S. 1956. Nonparametric statistics for the behavioral sciences. New York: McGraw-Hill.
Singleton, R. C. 1969. Algorithm 347: Efficient sorting in minimal storage. Communications of the ACM, 12, 185-187.
Smirnov, N. V. 1948. Table for estimating the goodness of fit of empirical distributions. Annals of the Mathematical Statistics, 19, 279-281.
Smyth, G. K., and B. Jorgensen. 2002. Fitting Tweedie’s Compound Poisson Model to Insurance Claims Data: Dispersion Modelling. ASTIN Bulletin, 32, 143-157.
Snedecor, G. W., and W. G. Cochran. 1980. Statistical Methods, 7th ed. Ames, Iowa: Iowa University Press.
Snedecor, G. W., and W. G. Cochran. 1967. Statistical methods. Ames, Iowa: Iowa State University Press.
Somes, G. W., and K. F. O'Brien. 1985. Mantel-Haenszel statistic. In Encyclopedia of Statistical Sciences, Vol. 5 (S. Kotz and N. L. Johnson, eds.) 214–217. New York: John Wiley.
Speed, M. F. 1976. Response curves in the one way classification with unequal numbers of observations per cell. In: Proceedings of the Statistical Computing Section. Alexandria, VA: American Statistical Association.
Spicer, C. C. 1972. Algorithm AS 52: Calculation of power sums of deviations about the mean. Applied Statistics, 21, 226-227.
Stewart, G. W. 1973. Introduction to matrix computations. New York: Academic Press.
Stoop, I., W. J. Heiser, and J. De Leeuw. 1981. How to use SMACOF-IA. Leiden: Department of Data Theory.
Stoop, I., and J. De Leeuw. 1982. How to use SMACOF-IB. Leiden: Department of Data Theory.
Storer, B. E., and J. Crowley. 1985. A diagnostic for Cox regression and general conditional likelihoods. Journal of the American Statistical Association, 80, 139-147.
Tadikamalla, P. R. 1978. Computer generation of gamma random variables. Communications of the ACM, 21, 419-422.
Takane, Y., F. W. Young, and J. de Leeuw. 1977. Nonmetric individual differences multidimensional scaling: An alternating least squares method with optimal scaling features. Psychometrika, 42, 7-67.
Tamhane, A. C. 1977. Multiple Comparisons in Model I One-Way ANOVA with Unequal Variances. Communications in Statistics, 6, 15-32.
Tamhane, A. C. 1979. A Comparison of Procedures for Multiple Comparisons of Means with Unequal Variances. Journal of the American Statistical Association, 74, 471-480.
Tan, P., M. Steinbach, and V. Kumar. 2006. Introduction to Data Mining. : Addison-Wesley.
Tao, K. K. 1993. A closer look at the radial basis function (RBF) networks. In: Conference Record of the Twenty-Seventh Asilomar Conference on Signals, Systems, and Computers, A. Singh, eds. Los Alamitos, Calif.: IEEE Comput. Soc. Press.
Tarone, R. 1975. Tests for trend in life table analysis. Biometrika, 62, 679-682.
Tarone, R., and J. Ware. 1977. On distribution free tests for equality of survival distributions. Biometrika, 64, 156-160.
Tarone, R. E. 1985. On heterogeneity tests based on efficient scores. Biometrika, 72, 91-95.
Tatsuoka, M. M. 1971. Multivariate analysis. New York: John Wiley & Sons, Inc..
Taylor, G. A. R. 1970. Algorithm AS 27: The integral of Student’s t-distribution. Applied Statistics, 19, 113-114.
Theil, H. 1953. Repeated least square applied to complete equation systems. Netherlands: The Hague: Central Planning Bureau.
Theil, H. 1953. Estimation and simultaneous correlation in complete equation systems. Netherlands: The Hague: Central Planning Bureau.
Therneau, T., and P. Grambsch. 2000. Modeling Survival Data: Extending the Cox Model. New York: Springer.
Thomas, D. R., and J. N. K. Rao. 1987. Small-sample comparisons of level and power for simple goodness-of-fit statistics under cluster sampling. Journal of the American Statistical Association, 82, 630-636.
Timm, N. H. 1975. Multivariate statistics: With applications in education and psychology. Monterey, California: Brooks/Cole.
Torgerson, W. S. 1952. Multidimensional scaling: I. Theory and method. Psychometrika, 17, 401-419.
Torgerson, W. S. 1958. Theory and methods of scaling. New York: Wiley.
Tucker, L. R. 1972. Relations between multidimensional scaling and three mode factor analysis. Psychometrika, 37, 3-28.
Tukey, J. W. 1977. Exploratory data analysis. Reading, MA: Addison-Wesley.
Tukey, J. W. 1962. The future of data analysis. Annals of Mathematical Statistics, 33:22, 1-67.
Uykan, Z., C. Guzelis, M. E. Celebi, and H. N. Koivo. 2000. Analysis of input-output clustering for determining centers of RBFN. IEEE Transactions on Neural Networks, 11, 851-858.
Van Buuren, S. 2007. Multiple imputation of discrete and continuous data by fully conditional specification. Statistical Methods in Medical Research, 16, 219-242.
Van Buuren, S., H. C. Boshuizen, and D. L. Knook. 1999. Multiple imputation of missing blood pressure covariates in survival analysis. Statistics in Medicine, 18, 681-694.
Van de Geer, J. P. 1987. Algebra and geometry of OVERALS: Internal Report RR-87–13. Leiden: Department of Data Theory, University of Leiden.
Van der Burg, E., J. De Leeuw, and R. Verdegaal. 1984. Non-linear canonical correlation analysis: Internal Report RR-84–12. Leiden: Department of Data Theory, University of Leiden.
Van der Burg, E. 1988. Nonlinear canonical correlation and some related techniques. Leiden: DSWO Press.
Van der Burg, E., J. De Leeuw, and R. Verdegaal. 1988. Homogeneity analysis with k sets of variables: An alternating least squares method with optimal scaling features. Psychometrika, 53, 177-197.
Van der Ham, T., J. J. Meulman, D. C. Van Strien, and H. Van Engeland. 1997. Empirically based subgrouping of eating disorders in adolescents: A longitudinal perspective. British Journal of Psychiatry, 170, 363-368.
Van der Kooij, A. J., J. J. Meulman, and W. J. Heiser. 2006. Local Minima in Categorical Multiple Regression. Computational Statistics and Data Analysis, 50, 446-462.
Van der Kooij, A. J. 2007. Prediction Accuracy and Stability of Regression with Optimal Scaling Transformations (Thesis). : Leiden University.
Van Rijckevorsel, J., and J. De Leeuw. 1979. An outline of PRINCALS: Internal Report RB 002–’79. Leiden: Department of Data Theory, University of Leiden.
Velleman, P. F., and D. C. Hoaglin. 1981. Applications, basics, and computing of exploratory data analysis. Boston, Mass.: Duxbury Press.
Velleman, P. F., and R. E. Welsch. 1981. Efficient computing of regression diagnostics. American Statistician, 35, 234-242.
Velleman, P. F. 1980. Definition and comparison of robust nonlinear data smoothing algorithms. Journal of the American Statistical Association, 75, 609-615.
Verdegaal, R. 1986. OVERALS: Internal Report UG-86–01. Leiden: Department of Data Theory, University of Leiden.
Verdegaal, R. 1985. Meer sets analyse voor kwalitatieve gegevens (in Dutch). Leiden: Department of Data Theory, University of Leiden.
Vijayan, K. 1968. An Exact PPS Sampling Scheme: Generalization of a Method of Hanurav. Journal of the Royal Statistical Society, Series B, 54, 556-566.
Von Neumann, J. 1951. Various techniques used in connection with random digits. National Bureau of Standards Applied Mathematics, 12, 36-38.
Waller, R. A., and D. B. Duncan. 1969. A Bayes Rule for the Symmetric Multiple Comparison Problem. Journal of the American Statistical Association, 64, 1484-1499.
Waller, R. A., and D. B. Duncan. 1972. . Journal of the American Statistical Association, 67, 253-255.
Waller, R. A., and K. E. Kemp. 1975. Computations of Bayesian t-value for Multiple Comparison. Journal of statistical computation and simulation, 4, 169-172.
Ware, J. H., D. W. Dockery, A. Spiro III, F. E. Speizer, and B. G. Ferris Jr.. 1984. Passive smoking, gas cooking, and respiratory health of children living in six cities. American Review of Respiratory Diseases, 129, 366-374.
Watts, D. L. 1991. Correction: Computer Selection of Size-Biased Samples. The American Statistician, 45:2, 172-172.
Welch, B. L. 1951. On the Comparison of Several Mean Values: An Alternative Approach. Biometrika, 38:, 330-336.
Welch, B. L. 1947. The generalization of Student's problem when several different population variances are involved. Biometrika, 34, 28-35.
Welsch, R. E. 1977. Stepwise Multiple Comparison Procedures. Journal of the American Statistical Association, 72, 566-575.
White, H. 1980. A Heteroskedasticity-Consistent Covariance Matrix Estimator and a Direct Test for Heteroskedasticity. Econometrica, 48, 817-836.
Wichura, M. J. 1988. Algorithm AS 241: The percentage points of the normal distribution. Applied Statistics, 37, 477-484.
Wilkinson, J. H. 1965. The algebraic eigenvalue problem. Oxford: Clarendon Press.
Wilkinson, L. 2005. The Grammar of Graphics, 2nd ed. New York: Springer-Verlag.
Wilkinson, J. H., and C. Reinsch. 1971. Linear Algebra. In: Handbook for Automatic Computation, Volume II, J. H. Wilkinson, and C. Reinsch, eds. New York: Springer-Verlag.
Williams, D. A. 1987. Generalized Linear Models Diagnostics Using the Deviance and Single Case Deletions. Applied Statistics, 36, 181-191.
Williams, D. A. 1982. Extra-Binomial Variation in Logistic Linear Models. Applied Statistics, 31, 144-148.
Winer, B. J. 1971. Statistical principles in experimental design, 2nd ed. New York: McGraw-Hill.
Wolfinger, R., R. Tobias, and J. Sall. 1994. Computing Gaussian likelihoods and their derivatives for general linear mixed models. SIAM Journal on Scientific Computing, 15:6, 1294-1310.
Wolkowicz, H., and G. P. H. Styan. 1980. Bounds for eigenvalues using traces. Linear algebra and its applications, 29, 471-506.
Wolter, K. M. 1985. Introduction to variance estimation. Berlin: Springer-Verlag.
Woodruff, R. S. 1971. A Simple Method for Approximating the Variance of a Complicated Estimate. Journal of the American Statistical Association, 66, 411-414.
Woods, K., and K. W. Bowyer. 1997. Generating ROC curves for artificial neural networks. IEEE Transactions on Medical Imaging, 16, 329-337.
Wright, S. P. 1992. Adjusted P-values for simultaneous inference. Biometrics, 48, 1005-1013.
Yates, F., and P. M. Grundy. 1953. Selection without replacement from within strata with probability proportional to size. Journal of the Royal Statistical Society Series B, 15, 253-261.
Young, F. W. 1975. An asymmetric Euclidean model for multiprocess asymmetric data. In: Proceedings of U.S.–Japan Seminar on Multidimensional Scaling. San Diego: .
Young, J. C., and C. E. Minder. 1974. Algorithm AS 76: An integral useful in calculating noncentral t and bivariate normal probabilities. Applied Statistics, 23, 455-457.
Young, F. W., and R. Lewyckyj. 1979. ALSCAL-4 user's guide. Carrboro: N.C.: Data Analysis and Theory Associates.
Young, F. W., Y. Takane, and R. Lewyckyj. 1978. ALSCAL: A nonmetric multidimensional scaling program with several different options. Behavioral Research Methods and Instrumentation, 10, 451-453.
Young, F. W., D. V. Easterling, and B. N. Forsyth. 1984. The general Euclidean model for scaling three mode dissimilarities: theory and application. In: Research Methods for Multi-mode Data Analysis in the Behavioral Sciences, H. G. Law, G. W. Snyder, Jr., J. Hattie, and R. P. McDonald, eds. New York: Praeger.
Young, E. A., and E. W. Cramer. 1971. Some results relevant to choice of sum and sum-of-product algorithms. Technometrics, 13, 657-665.
Zeger, S. L., and K. Y. Liang. 1986. Longitudinal Data Analysis for Discrete and Continuous Outcomes. Biometrics, 42, 121-130.
Zhang, J., and S. D. Hoffman. 1993. Discrete-Choice Logit Models. Testing the IIA Property. Sociological Methods and Research, 22:2, 193-213.
Zhang, T., R. Ramakrishnon, and M. Livny. 1996. BIRCH: An efficient data clustering method for very large databases. In: Proceedings of the ACM SIGMOD Conference on Management of Data. Montreal, Canada: ACM.
Zhang, D. 2005. "Analysis of Survival Data, lecture notes, Chapter 10." Available at http://www4.stat.ncsu.edu/%7Edzhang2/st745/chap10.pdf.
Zweig, M. H., and G. Campbell. 1993. Receiver Operating Characteristic (ROC) Plots: A Fundamental Evaluation Tool in Clinical Medicine. Clinical Chemistry, 39:4, 561-577.


Annotated Text Example


Axis Line, Labels, and Title Example


3-D Bar Charts Examples

A. Summaries for Groups of Cases

Categories of two variables are summarized. Bar height is determined by the Bars Represent option. For example, if the Bars Represent option were Number of cases and the two categorical variables were gender and handedness, there would be four bars. Each bar would represent the count of the gender/handedness pairs:

• Number of left-handed females

• Number of left-handed males

• Number of right-handed females

• Number of right-handed males

Minimum specifications

Two Category Axis variables.

How to

B. Summaries of Separate Variables by Group

Two or more variables are summarized. Each bar represents one of the variables for each group in a categorical variable. For example, if the Bars Represent variables were starting salary and current salary and the Group by variable were gender, there would be four bars. Each bar would represent a summary function of salary (for example, mean):

• Mean starting salary for females

• Mean starting salary for males

• Mean current salary for females

• Mean current salary for males

Minimum specifications

Two or more Bars Represent variables and one Group by variable.

How to

C. Values of Individual Cases in Groups

The value of a single variable is displayed. Each bar represents an individual case. For example, if the Bars Represent variable were current salary, the Group by variable were gender, and there were two cases, there would be two bars. Each bar would represent the value of current salary for each case:

• Current salary for case 1, positioned according to gender

• Current salary for case 2, positioned according to gender

Minimum specifications

A single Bars Represent variable and one Group by variable.

How to

D. Values of Individual Cases for Separate Variables

The values for two or more variables are displayed. Each bar represents the value of each variable for each case. For example, if the Bars Represent variables were starting salary and current salary and there were two cases, there would be four bars. Each bar would represent the value of starting or current salary for each case:

• Starting salary for case 1

• Current salary for case 1

• Starting salary for case 2

• Current salary for case 2

Minimum specifications

Two or more Bars Represent variables.

How to


Autocorrelations Charts Examples

Plots the autocorrelations (or partial autocorrelations) of one or more time series variables as a function of lag.

Minimum specifications

One or more numeric time series variables. There will be a separate plot for each variable.

How to


Area Charts: Simple Examples

A. Summaries for Groups of Cases

Categories of a single variable are summarized. The y-height of the points is determined by the Area Represents option.

Minimum specification

A single Category Axis variable.

How to

B. Summaries of Separate Variables

Two or more variables are summarized. Each point represents one of the variables.

Minimum specification

Two or more Area Represents variables.

How to

C. Values of Individual Cases

A single variable is summarized. Each point represents an individual case.

Minimum specification

A single Area Represents variable.

How to


Bar Charts: Simple Examples

A. Summaries for Groups of Cases

Categories of a single variable are summarized. Bar height is determined by the Bars Represent option.

Minimum specifications

A single Category Axis variable.

How to

B. Summaries of Separate Variables

Two or more variables are summarized. Each bar represents one of the variables.

Minimum specifications

Two or more Bars Represent variables.

How to

C. Values of Individual Cases

A single variable is summarized. Each bar represents an individual case.

Minimum specifications

A single Bars Represent variable.

How to


Cross-Correlations Charts Examples

Plots the cross-correlation functions of two or more time series.

Minimum specifications

Two or more numeric time series variables. A separate cross-correlation function is plotted for each possible pair of variables.

How to


Line Charts: Drop Line Examples

A. Summaries for Groups of Cases

Categories of one variable are summarized within categories of another variable. The y-height of the points is determined by the Points Represent option.

Minimum specifications

• A Category Axis variable (Category Variable 1).

• A Define Points by variable (Cat Var 2).

How to

B. Summaries of Separate Variables

Two or more variables are summarized within categories of another variable.

Minimum specifications

• Two or more Points Represent variables (Var 1, Var 2).

• A Category Axis variable (Category Variable).

How to

C. Values of Individual Cases

Two or more variables are summarized for each case.

Minimum specifications

Two or more Points Represent variables (Var 1, Var 2).

How to


Bar Charts: Clustered Examples

A. Summaries for Groups of Cases

Categories of one variable are summarized within categories of another variable. Bar height is determined by the Bars Represent option.

Minimum specifications

• A Category Axis variable (Category Variable 1).

• A Define Clusters by variable (Cat Var 2).

How to

B. Summaries of Separate Variables

Two or more variables are summarized within categories of another variable.

Minimum specifications

• Two or more Bars Represent variables (Var 1, Var 2).

• A Category Axis variable (Category Variable).

How to

C. Values of Individual Cases

Two or more variables are summarized for each case.

Minimum specifications

Two or more Bars Represent variables (Var 1, Var 2).

How to


Line Charts: Simple Examples

A. Summaries for Groups of Cases

Categories of a single variable are summarized. The y-height of the points is determined by the Line Represents option.

Minimum specification

A single Category Axis variable.

How to

B. Summaries of Separate Variables

Two or more variables are summarized. Each point represents one of the variables.

Minimum specification

Two or more Line Represents variables.

How to

C. Values of Individual Cases

A single variable is summarized. Each point represents an individual case.

Minimum specification

A single Line Represents variable.

How to


Area Charts: Stacked Examples

A. Summaries for Groups of Cases

Categories of one variable are summarized within categories of another variable. The y-height of the points is determined by the Areas Represent option.

Minimum specifications

• A Category Axis variable (Category Variable 1).

• A Define Areas by variable (Cat Var 2).

How to

B. Summaries of Separate Variables

Two or more variables are summarized within categories of a category axis variable.

Minimum specifications

• Two or more Areas Represent variables (Var 1, Var 2).

• A Category Axis variable (Category Variable).

How to

C. Values of Individual Cases

Two or more variables are summarized for each case.

Minimum specifications

Two or more Areas Represent variables (Var 1, Var 2).

How to


Mixed Charts Examples

A. Summaries of Separate Variables

Two or more variables are summarized by values of a categorical variable. Each bar and the end point of each line segment represents the variable value for each group in a categorical variable.

Minimum specifications

Two or more continuous Bars Represent variables and one Category Axis variable.

How to

B. Summaries of Groups of Cases

Categories of two variables are summarized. Bar height and the position of line segment end point is determined by the Bars Represent option.

Minimum specifications

A Category Axis variable and a Define Clusters by variable.

How to


Line Charts: Multiple Examples

A. Summaries for Groups of Cases

Categories of one variable are summarized within categories of another variable. The y-height of the points is determined by the Lines Represent option.

Minimum specifications

• A Category Axis variable (Category Variable 1).

• A Define Lines by variable (Cat Var 2).

How to

B. Summaries of Separate Variables

Two or more variables are summarized within categories of another variable.

Minimum specifications

• Two or more Lines Represent variables (Var 1, Var 2).

• A Category Axis variable (Category Variable).

How to

C. Values of Individual Cases

Two or more variables are summarized for each case.

Minimum specifications

Two or more Lines Represent variables (Var 1, Var 2).

How to


Normal P-P Charts Examples

The cumulative proportion for a single numeric variable is plotted against the cumulative proportion expected if the sample were from a normal distribution. If the sample is from a normal distribution, points will cluster around a straight line.

Minimum specification

One or more numeric variables. A separate plot will be produced for each variable.

How to


Normal Q-Q Charts Examples

Observed values of a single numeric variable are plotted against the expected values if the sample were from a normal distribution. If the sample is from a normal distribution, points will cluster around a straight line.

Minimum specification

One or more numeric variables. A separate plot will be produced for each variable.

How to


Pareto: Simple Examples

A. Counts or Sums for Groups of Cases

A single variable is summarized by category. Bar height is determined by the Bars Represent option. The line represents the cumulative percentage.

Minimum specification

A Category Axis variable.

How to

B. Sums of Separate Variables

Two or more variables are summarized. Each bar represents one of the selected variables.

Minimum specifications

• Two or more numeric variables.

• A Category Axis variable.

How to

C. Values of Individual Cases

A single variable is summarized. Each bar represents the value of an individual case.

Minimum specification

A single numeric variable.

How to


Bar Charts: Stacked Examples

A. Summaries for Groups of Cases

Categories of one variable are summarized within categories of another variable. Bar height is determined by the Bars Represent option.

Minimum specifications

• A Category Axis variable (Category Variable 1).

• A Define Stacks by variable (Cat Var 2).

How to

B. Summaries of Separate Variables

Two or more variables are summarized within categories of another variable.

Minimum specifications

• Two or more Bars Represent variables (Var 1, Var 2).

• A Category Axis variable (Category Variable).

How to

C. Values of Individual Cases

Two or more variables are summarized for each case.

Minimum specifications

Two or more Bars Represent variables (Var 1, Var 2).

How to


Pareto: Stacked Examples

A. Counts or Sums for Groups of Cases

Categories of one variable are summarized within categories of another variable. Bar height is determined by the Bars Represent option. The line represents the cumulative percentage.

Minimum specifications

• A Category Axis variable (Category Variable 1).

• A Define Stacks by variable (Cat Var 2).

How to

B. Sums of Separate Variables

Two or more numeric variables are summarized within categories of a categorical variable. Each segment within a stack represents one of the variables.

Minimum specifications

• Two or more numeric variables (Var 1, Var 2).

• A Category Axis variable (Category Variable).

How to

C. Values of Individual Cases

Two or more variables are summarized for each case. Each segment within a stack represents one of the variables.

Minimum specifications

Two or more numeric variables (Var 1, Var 2).

How to


Spectral Charts Examples

A periodogram is plotted for each selected variable, with frequency or wavelength on the horizontal axis and relative weight (using a logarithmic scale) on the vertical axis.

Minimum specifications

One or more numeric time series variables. A separate periodogram is created for each variable. Series that have missing data cannot be analyzed with this procedure.

How to


Sequence Charts Examples

One or more numeric variables are plotted. Cases are plotted in sequence. Use only when cases are sorted in a meaningful order (time series data).

Minimum specifications

One or more numeric sequence or time series variables. There will be a separate line for each variable.

How to


Binomial Test: Related Procedures

If the test variable is not dichotomous and you want to specify more than two categories, use the Chi-Square Test procedure.

Related Topics

Automatic Recode
Chi-Square Test: Related Procedures
Runs Test: Related Procedures
Chi-Square Test
Binomial Test
Binomial Test Options
Binomial Test
Binomial Test Options


Simple Boxplot: Summaries for Groups of Cases Example

A single numeric variable is summarized within categories of another variable. Each box shows the median, quartiles, and extreme values within a category.

Minimum specifications

• A numeric summary variable.

• A Category Axis variable.


Simple Boxplot: Summaries of Separate Variables Example

One or more numeric variables are summarized. Each box represents one of the variables.

Minimum specifications

One or more numeric summary variables.


Boxplots: Simple Examples

A. Summaries for Groups of Cases

A single numeric variable is summarized within categories of another variable. Each box shows the median, quartiles, and extreme values within a category.

Minimum specifications

• A numeric summary variable.

• A Category Axis variable.

How to

B. Summaries of Separate Variables

One or more numeric variables are summarized. Each box represents one of the variables.

Minimum specifications

One or more numeric summary variables.

How to


c and u Control Charts: Cases are Subgroups Example

A single characteristic variable is summarized. Each point represents the number of nonconforming units for a subgroup.

Minimum specification

• A Characteristic variable that contains the number of nonconformities found for each subgroup.

• A constant or variable defining the subgroup size.


c and u Control Charts: Cases are Units Example

A single characteristic variable is summarized within subgroups of cases defined by a second categorical variable. Each point represents the number of nonconforming units for a subgroup.

Minimum specification

• A Characteristic variable that contains the number of nonconformities found for each unit.

• A Subgroups Defined by variable.


Simple Bar: Summaries for Groups of Cases Example

A single variable (Region) is summarized. Each bar represents a group of cases or category.

How to


Clustered Bar: Summaries for Groups of Cases Example

Categories of one variable (Flavor) are summarized within categories of another variable (Region).

How to


Boxplots: Clustered Examples

A. Summaries for Groups of Cases

A single numeric variable is summarized within clusters defined by a categorical variable. Each box within a cluster represents a category of a second categorical variable.

Minimum specifications

• A numeric variable to be summarized.

• A Category Axis variable (Category Variable 1).

• A Define Clusters by variable (Cat Var 2).

How to

B. Summaries of Separate Variables

Several numeric variables are summarized. Each box within a cluster represents one of the summary variables.

Minimum specifications

• Two or more numeric variables (Var 1, Var 2, etc.)

• A Category Axis variable (Category Variable)

How to


Clustered Boxplot: Summaries for Groups of Cases Example

A single numeric variable is summarized within clusters defined by a categorical variable. Each box within a cluster represents a category of a second categorical variable.

Minimum specifications

• A numeric variable to be summarized.

• A Category Axis variable (Category Variable 1).

• A Define Clusters by variable (Cat Var 2).


Clustered Boxplot: Summaries of Separate Variables Example

Several numeric variables are summarized. Each box within a cluster represents one of the summary variables.

Minimum specifications

• Two or more numeric variables (Var 1, Var 2, etc.)

• A Category Axis variable (Category Variable)


Error Bars: Clustered Examples

A. Summaries for Groups of Cases

A single numeric variable is summarized within clusters defined by a categorical variable. Each bar within a cluster represents a category of a second categorical variable.

Minimum specifications

• A numeric variable to be summarized.

• A Category Axis variable (Category Variable 1).

• A Define Clusters by variable (Cat Var 2).

How to

B. Summaries of Separate Variables

Several numeric variables are summarized. Each bar within a cluster represents one of the summary variables.

Minimum specifications

• Two or more numeric variables (Var 1, Var 2, etc.)

• A Category Axis variable (Category Variable)

How to


Clustered Error Bar: Summaries for Groups of Cases Example

A single numeric variable is summarized within clusters defined by a categorical variable. Each bar within a cluster represents a category of a second categorical variable.

Minimum specifications

• A numeric variable to be summarized.

• A Category Axis variable (Category Variable 1).

• A Define Clusters by variable (Cat Var 2).


Clustered Error Bar: Summaries of Separate Variables Example

Several numeric variables are summarized. Each bar within a cluster represents one of the summary variables.

Minimum specifications

• Two or more numeric variables (Var 1, Var 2, etc.)

• A Category Axis variable (Category Variable)


Chi-Square Test: Related Procedures

To obtain chi-square tests of the relationship between two or more variables, use the Crosstabs procedure.

Related Topics

Automatic Recode
Binomial Test: Related Procedures
Runs Test: Related Procedures
Crosstabs
Chi-Square Test
Chi-Square Test Expected Range and Expected Values
Chi-Square Test Options


Clustered High-Low-Close: Values of Individual Cases Example

Two or more variable sets (high-low pairs or triplets) are summarized for each case. Each bar within a cluster represents one of the variable sets.

Minimum specifications

• Two High variables.

• Two Low variables.


Clustered High-Low-Close: Summaries for Groups of Cases Example

Two or three variables are summarized within clusters defined by a categorical variable. Each bar within a cluster represents a category of a second categorical variable.

Minimum specifications

• A High summary variable.

• A Low summary variable.

• A Category Axis variable (Category Variable 1).

• A Define Clusters by variable (Cat Var 2).


Clustered High-Low-Close: Summaries of Separate Variables Example

Two or more variable sets (high-low pairs or triplets) are summarized. Each bar within a cluster represents one of the sets.

Minimum specifications

• Two High variables.

• Two Low variables.

• A Category Axis variable (Category Variable).


Clustered Bar: Values of Individual Cases Example

Two or more variables are summarized for each case.

Minimum specifications

Two or more Bars Represent variables (Var 1, Var 2).


Clustered Bar: Summaries for Groups of Cases Example

Categories of one variable are summarized within categories of another variable. Bar height is determined by the Bars Represent option.

Minimum specifications

• A Category Axis variable (Category Variable 1).

• A Define Clusters by variable (Cat Var 2).


Clustered Bar: Summaries of Separate Variables Example

Two or more variables are summarized within categories of another variable.

Minimum specifications

• Two or more Bars Represent variables (Var 1, Var 2).

• A Category Axis variable (Category Variable).


Command Not Found

Sorry. Unable to locate this command. Try using the Index to find the command that you want.


Control Chart Example

Control charts display some characteristic of quality that has been measured or tested. The measurement or test is performed for a process over a period of time or over a number of samples. Control charts contain several elements:

• Center Line

• Upper and Lower Control Limits

• Process Line


Clustered Range Bar: Values of Individual Cases Example

Two variable pairs are summarized within clusters for each case. Each bar within a cluster represents one of the pairs.

Minimum specifications

• Two 1st variables.

• Two 2nd variables.


Clustered Range Bar: Summaries for Groups of Cases Example

A pair of variables is summarized within clusters defined by a categorical variable. Each bar within a cluster represents a category of a second categorical variable.

Minimum specifications

• A 1st summary variable.

• A 2nd summary variable.

• A Category Axis variable (Category Variable 1).

• A Define Clusters by variable (Cat Var 2).


Clustered Range Bar: Summaries of Separate Variables Example

Two variable pairs are summarized within clusters. Each bar within a cluster represents one of the variable pairs.

Minimum specifications

• Two 1st variables.

• Two 2nd variables.

• A Category Axis variable (Category Variable).


Crosstabs: Related Procedures

To model the relationships between two or more categorical variables, use the General Loglinear procedure (available in the Advanced Statistics option) to fit a model to the cell frequencies. For defining intervals along a quantitative variable, use Recode on the Transform menu. For example, if you want to look at the relationship between salary and job satisfaction, and salary is recorded to the nearest dollar, use the Recode procedure to define intervals such as less than $20,000, $20,000 to $30,000, and so on.

Related Topics

General Loglinear Analysis
Recode into Same Variables
Recode into Different Variables
Crosstabs
Crosstabs Layers
Crosstabs Clustered Bar Charts
Crosstabs Statistics
Crosstabs Cell Display
Crosstabs Table Format


Curve Estimation: Related Procedures

To screen your data graphically, use the Chart Builder on the Graphs menu to create a scatterplot. If the relationship between the dependent and the independent variable appears normal, use the Linear Regression procedure.

Related Topics

Curve Estimation
Curve Estimation Models
Curve Estimation Save


Descriptives: Related Procedures

For the median, mode, quartiles, percentiles, and a histogram, use the Frequencies procedure. To compute summary statistics for each of several groups of cases (for example, if you want separate statistics for males and females or for people living in four regions of a country), use the Explore or the Means procedure. You can also use Split File on the Data menu.

Related Topics

Split File
Means
Frequencies
Explore
Descriptives
Descriptives Options


Difference Area: Values of Individual Cases Example

A differenced variable pair is summarized. Each point represents an individual case for one of the variables.

Minimum specifications

• A 1st variable (Var 1).

• A 2nd variable (Var 2).


Difference Area: Summaries for Groups of Cases Example

Each category of a dichotomous variable (having two categories or values) is summarized within categories of a separate categorical variable.

Minimum specifications

• A Category Axis variable (Category Variable 1).

• A Define 2 Groups by variable (Cat Var 2). This variable must be dichotomous.


Difference Area: Summaries of Separate Variables Example

A differenced variable pair is summarized within categories defined by a separate categorical variable.

Minimum specifications

• A 1st variable (Var 1).

• A 2nd variable (Var 2).

• A Category Axis variable (Category Variable).


Discriminant Analysis: Related Procedures

If your grouping variable has two categories, you may want to use Logistic Regression (available in the Advanced option), which depends on less stringent assumptions. If your dependent variable is continuous, consider Linear Regression. Discriminant analysis is also related to multivariate analysis of variance, in that Wilks' lambda, the same test statistic used in GLM Multivariate (available in the Advanced Statistics option), is used to test the equality of group centroids. You can use the ROC Curve procedure to plot probabilities saved with the Discriminant Analysis procedure.

Related Topics

ROC Curves
Logistic Regression
Linear Regression
Discriminant Analysis
Discriminant Analysis Define Range
Discriminant Analysis Select Cases
Discriminant Analysis Statistics
Discriminant Analysis Stepwise Method
Discriminant Analysis Classification
Discriminant Analysis Save


Drop Line: Values of Individual Cases Example

Two or more variables are summarized for each case.

Minimum specifications

Two or more Points Represent variables (Var 1, Var 2).


Drop Line: Summaries for Groups of Cases Example

Categories of one variable are summarized within categories of another variable. The y-height of the points is determined by the Points Represent option.

Minimum specifications

• A Category Axis variable (Category Variable 1).

• A Define Points by variable (Cat Var 2).


Drop Line: Summaries of Separate Variables Example

Two or more variables are summarized within categories of another variable.

Minimum specifications

• Two or more Points Represent variables (Var 1, Var 2).

• A Category Axis variable (Category Variable).


Error Bars: Simple Examples

A. Summaries for Groups of Cases

A single numeric variable is summarized within categories of another variable. The Bars Represent option determines the length of each bar.

Minimum specifications

• A numeric summary variable.

• A Category Axis variable.

How to

B. Summaries of Separate Variables

One or more numeric variables are summarized. Each bar represents one of the variables.

Minimum specifications

One or more numeric summary variables.

How to


Simple Error Bar: Summaries for Groups of Cases Example

A single numeric variable is summarized within categories of another variable. The Bars Represent option determines the length of each bar.

Minimum specifications

• A numeric summary variable.

• A Category Axis variable.


Simple Error Bar: Summaries of Separate Variables Example

One or more numeric variables are summarized. Each bar represents one of the variables.

Minimum specifications

One or more numeric summary variables.


Explore: Related Procedures

If you just want a few simple summary statistics for groups of cases, use the Means procedure. To obtain counts, percentage of cases, or specific percentiles, use the Frequencies procedure. To compute z scores, use the Descriptives procedure.

Related Topics

Frequencies
Descriptives
Means
Explore
Explore Statistics
Explore Plots
Explore Power Transformations
Explore Options


Factor Analysis: Related Procedures

Use the Chart Builder on the Graphs menu to obtain bivariate scatterplots or scatterplot matrices. Scatterplots aid in the screening of your data. The Explore procedure can also be used to screen your data. If your data appear non-normally distributed, you can try transforming them. The factor analysis procedure can accept input in the form of a correlation matrix generated from another procedure, such as the Correlations procedure You must use command syntax to read in matrix data.

Related Topics

Bivariate Correlations
Explore
Factor Analysis
Factor Analysis Select Cases
Factor Analysis Descriptives
Factor Analysis Extraction
Factor Analysis Rotation
Factor Analysis Scores
Factor Analysis Options


Frequencies: Related Procedures

If you want to compute summary statistics for each of several groups of cases (for example, you want separate statistics for males and females or for people living in four regions of a country), use Split File on the Data menu, or use the Explore, Means, or Summarize procedure. For a group of histograms that all use the same scale, use the Explore procedure.

Related Topics

Summarize
Split File
Means
Explore
Frequencies
Frequencies Statistics
Frequencies Charts
Frequencies Format


Control Charts: c, u Examples

Each point on the process line represents the number (c charts) or proportion (u charts) of nonconformities for a given subgroup. These charts are used rather than p and np charts when each unit may have multiple nonconformities.

A. Cases are Units

A single characteristic variable is summarized within subgroups of cases defined by a second categorical variable. Each point represents the number of nonconforming units for a subgroup.

Minimum specification

• A Characteristic variable that contains the number of nonconformities found for each unit.

• A Subgroups Defined by variable.

How to

B. Cases are Subgroups

A single characteristic variable is summarized. Each point represents the number of nonconforming units for a subgroup.

Minimum specification

• A Characteristic variable that contains the number of nonconformities found for each subgroup.

• A constant or variable defining the subgroup size.

How to


Individuals, Moving Range Control Charts: Cases are Units Example

A single process variable is summarized. Each point on the process line represents an individual case. For moving range charts, each point plots the difference between each value and the previous values.

Minimum specification

A numeric Process Measurement variable.


Control Charts: p, np Examples

Each point on the process line represents the proportion (p charts) or number (np charts) of nonconforming units within a subgroup.

A. Cases are Units

A single characteristic variable is summarized within subgroups of cases defined by a categorical variable. Each point represents the proportion or number of nonconforming units within a subgroup.

Minimum specification

• A Characteristic variable containing the conforming or nonconforming value (either numeric or string).

• A value indicating conforming or nonconforming.

• A Subgroups Defined by variable.

How to

B. Cases are Subgroups

A single characteristic variable is summarized. Each point represents the proportion or number of nonconforming units within a subgroup.

Minimum specification

• A Characteristic variable containing the number of nonconforming units in each subgroup.

• A constant or variable defining the subgroup size.

How to


Control Charts: X-Bar, R, and s Examples

An ongoing process is summarized. Each point represents the mean, range, or standard deviation for a subgroup of continuous measurements.

A. Cases are Units

A single process variable is summarized within subgroups defined by a categorical variable.

Minimum specifications

• A Process Measurement variable.

• A Subgroups Defined by variable.

How to

B. Cases are Subgroups

Two or more variables (samples or unit measurements) are summarized. Each point summarizes the selected variables across a single case (row).

Minimum specifications

Two or more numeric Sample variables.

How to


Histograms Examples

A single numeric variable is summarized. The histogram shows the number of cases that fall within each interval.

Minimum specification

A single numeric variable.

How to


Hierarchical Cluster Analysis: Related Procedures

The Proximities procedure can be used independently to generate distance or similarity scores, which can then be read by the Cluster procedure using command syntax. Once you have identified groups, you can determine which variables distinguish between them using the Discriminant procedure. If you know ahead of time how many clusters to look for, use k-means cluster analysis for a quicker solution.

Related Topics

K-Means Cluster Analysis
Discriminant Analysis
Hierarchical Cluster Analysis
Hierarchical Cluster Analysis Method
Hierarchical Cluster Analysis Measures for Interval Data
Hierarchical Cluster Analysis Measures for Count Data
Hierarchical Cluster Analysis Measures for Binary Data
Hierarchical Cluster Analysis Transform Values
Hierarchical Cluster Analysis Statistics
Hierarchical Cluster Analysis Plots
Hierarchical Cluster Analysis Save New Variables


Simple High-Low-Close: Values of Individual Cases Example

Two or three variables are summarized. Each bar represents an individual case.

Minimum specifications

• A High variable (High Var).

• A Low variable (Low Var).


Simple High-Low-Close: Summaries for Groups of Cases Example

A single "high-low-close" variable is summarized within categories defined by a categorical variable.

Minimum specifications

• A High-low-close variable with two (or three) values or categories.

• A Category Axis variable (Category Variable).


Simple High-Low-Close: Summaries of Separate Variables Example

Two (or three) variables are summarized within categories defined by a categorical variable.

Minimum specifications

• A High variable (High Var).

• A Low variable (Low Var).

• A Category Axis variable (Category Variable).


Autocorrelations

autocorrelation,autocorrelation,autocorrelation
autocorrelation,autocorrelation,autocorrelation
charts,charts,charts
autocorrelation,autocorrelation,autocorrelation
transforming values,transforming values,transforming values
autocorrelation,autocorrelation,autocorrelation
partial,partial,partial
charts,charts,charts
time series,time series,time series
charts,charts,charts
autocorrelation,autocorrelation,autocorrelation
time series analysis,time series analysis,time series analysis
time series analysis,time series analysis,time series analysis
charts,charts,charts
time series analysis,time series analysis,time series analysis
autocorrelation,autocorrelation,autocorrelation
Plots the autocorrelation function (ACF) and partial autocorrelation function of one or more series. The Autocorrelations procedure is appropriate only for time series data.

Select one or more numeric variables and move them onto the Variables field.

Under Display, select Autocorrelations, Partial autocorrelations, or both.

Displaying partial autocorrelations requires the solution of a system of equations whose size grows with the number of lags. Be careful about requesting partial autocorrelations to a high number of lags (over 24). Even on a fast machine, this will take much longer than the autocorrelations. If you have a series with seasonal effects and need to look at high lags, look at the autocorrelations alone until you are sure the series is stationary. Then ask for the partials as well.

You can transform your data by selecting Natural log transform, Difference, or Seasonally difference from the Transform group.

If you select either Difference or Seasonally difference, enter the degree of differencing in the text box next to the selection. This number must be a positive integer.

The current periodicity is displayed beneath these options.

Click Options to set the maximum number of lags or the method for calculating standard errors or to display autocorrelations only at seasonal lags.

Related Topics

Obtaining Autocorrelation Charts
Sequence Charts
Cross-Correlations
Spectral Plots
Autocorrelations Options
ACF


Autocorrelations Options

Bartlett's approximation,Bartlett's approximation,Bartlett's approximation
Bartlett's approximation,Bartlett's approximation,Bartlett's approximation
autocorrelation,autocorrelation,autocorrelation
independence model,independence model,independence model
independence model,independence model,independence model
autocorrelation,autocorrelation,autocorrelation
autocorrelation,autocorrelation,autocorrelation
autocorrelation,autocorrelation,autocorrelation
lags,lags,lags
autocorrelation,autocorrelation,autocorrelation
periodic lags,periodic lags,periodic lags
autocorrelation,autocorrelation,autocorrelation
standard error method,standard error method,standard error method
lags,lags,lags
lags,lags,lags
autocorrelation,autocorrelation,autocorrelation
periodic lags,periodic lags,periodic lags
periodic lags,periodic lags,periodic lags
autocorrelation,autocorrelation,autocorrelation

You can enter a new number in the Maximum Number of Lags text box to define a new maximum number of lags.

Select one of the Standard Error Method options to determine the method used for computing standard error. These options are not available if Autocorrelations is deselected in the main dialog box. Available methods are Independence model and Bartlett's approximation.

If the seasonality of your data is defined, you can select Display autocorrelations at periodic lags to display autocorrelations only at the seasonal lags.

Related Topics

Specifying Options for Autocorrelations Charts
Autocorrelations
Obtaining Autocorrelation Charts


Cross-Correlations

Cross-correlations,Cross-correlations,Cross-correlations
Cross-correlations,Cross-correlations,Cross-correlations
transforming values,transforming values,transforming values
charts,charts,charts
cross-correlation,cross-correlation,cross-correlation
time series analysis,time series analysis,time series analysis
time series analysis,time series analysis,time series analysis
cross-correlation,cross-correlation,cross-correlation
time series analysis,time series analysis,time series analysis
charts,charts,charts
Plots the cross-correlation function of two or more series for positive, negative, and zero lags. The Cross-Correlations procedure is appropriate only for time series data.

Select at least two variables and move them onto the Variables field.

You can transform your data by selecting Natural log transform, Difference, or Seasonally difference from the Transform group.

If you select either Difference or Seasonally difference, enter the degree of differencing in the text box next to the selection. This number must be a positive integer.

The current periodicity is displayed beneath these options.

Click Options to specify the range of lags at which cross-correlations are displayed or (if you have defined the seasonality of your data) to display cross-correlations for seasonal lags only.

Related Topics

Obtaining Cross-Correlations Charts
Sequence Charts
Autocorrelations
Spectral Plots
Cross-Correlations Options
CCF


Cross-Correlations Options

Cross-correlations,Cross-correlations,Cross-correlations
Cross-correlations,Cross-correlations,Cross-correlations
lags,lags,lags
Cross-correlations,Cross-correlations,Cross-correlations
periodic lags,periodic lags,periodic lags
time series analysis,time series analysis,time series analysis
cross-correlation,cross-correlation,cross-correlation
time series analysis,time series analysis,time series analysis
charts,charts,charts
lags,lags,lags
lags,lags,lags
Cross-correlations,Cross-correlations,Cross-correlations
periodic lags,periodic lags,periodic lags
periodic lags,periodic lags,periodic lags
Cross-correlations,Cross-correlations,Cross-correlations

To set the maximum range of positive and negative lags for a series, enter the maximum number in the Maximum Number of Lags text box. For example, if you specify 7 as the maximum number of lags, the output ranges from a lag of −7 to a lag of 7.

Select Display cross-correlations at periodic lags to focus attention on the seasonal component by plotting cross-correlations only at periodic lags. This option is not available unless you have defined periodicity in the Define Dates dialog box in the Data menu.

Related Topics

Specifying Options for Cross-Correlations Charts
Cross-Correlations
Obtaining Cross-Correlations Charts


RFM Data Format

If data rows represent transactions (each row represents a single transaction, and there may be multiple transactions for each customer), select Transaction data.

If data rows represent customers with summary information for all transactions (with columns that contain values for total amount spent, total number of transactions, and most recent transaction date), select Customer data.

Transaction vs. customer data


Stacked Area Summaries for Groups of Cases

Creates a chart summarizing categories of one variable within categories of another variable.

Select a variable for the category axis and move it into the Category Axis field. This variable may be numeric, string, or long string.

Select one of the alternatives in the Areas Represent group to specify how the data are represented on the scale axis.

If the scale axis displays a function of another summary variable, select Other statistic (e.g., mean) and then select a numeric variable to be summarized. To change the summary function, click Change Statistic.

To define lines, you must select a variable and move it into the Define Areas By field. Separate lines are generated for each category of the area variable, with the area below each line shaded with a different color or pattern. This variable may be numeric, string, or long string.

To panel the chart, move one or more categorical variables into the Panel By group. See the topic Paneled Charts for more information.

Related Topics

Obtaining Stacked Area Charts Summarizing Groups of Cases
Area Charts
Simple Area Summaries for Groups of Cases
Simple Area Summaries of Separate Variables
Simple Area Values of Individual Cases
Stacked Area Summaries of Separate Variables
Stacked Area Values of Individual Cases
GRAPH
Obtaining Simple or Stacked Area Charts


Stacked Area Values of Individual Cases

Creates a chart summarizing two or more variables for each case.

Select at least two variables and move them into the Areas Represent field. These variables must be numeric.

A separate line is generated for each variable in this field with the area below each line shaded with a different color or pattern.

Select one of the alternatives in the Category Labels group to label categories either by Case number or by Variable. If you select Variable, then you must select a variable from the target list and move it into the Variable field. This variable may be numeric, string, or long string.

To panel the chart, move one or more categorical variables into the Panel By group. See the topic Paneled Charts for more information.

Related Topics

Obtaining Stacked Area Charts Showing Individual Cases
Area Charts
Simple Area Summaries for Groups of Cases
Simple Area Summaries of Separate Variables
Simple Area Values of Individual Cases
Stacked Area Summaries for Groups of Cases
Stacked Area Summaries of Separate Variables
GRAPH
Obtaining Simple or Stacked Area Charts


Stacked Area Summaries of Separate Variables

Creates a chart summarizing two or more variables within categories of another variable.

Select at least two variables and move them into the Areas Represent field. These variables must be numeric.

A separate line is generated for each variable in this field with the area below each line shaded with a different color or pattern.

The function used to summarize the variable in the chart is displayed in the field.

Click Change Statistic to define the function used to summarize the variables for the chart.

Select a category variable and move it into the Category Axis field. This variable may be numeric, string, or long string.

To panel the chart, move one or more categorical variables into the Panel By group. See the topic Paneled Charts for more information.

Related Topics

Obtaining Stacked Area Charts Summarizing Separate Variables
Area Charts
Simple Area Summaries for Groups of Cases
Simple Area Summaries of Separate Variables
Simple Area Values of Individual Cases
Stacked Area Summaries for Groups of Cases
Stacked Area Values of Individual Cases
GRAPH
Obtaining Simple or Stacked Area Charts


Area Charts

Area Charts allows you to make selections that determine the type of chart you obtain. Select the icon for the chart type you want and select the option under the Data in Chart Are group that best describes your data.

You can click on the icons below to browse examples of available chart types. If you find an example that looks like the chart you want, click on the How To button next to that example for specific instructions on how to obtain that chart.

Simple
Stacked

Related Topics

Obtaining Simple or Stacked Area Charts
Simple Area Summaries for Groups of Cases
Simple Area Summaries of Separate Variables
Simple Area Values of Individual Cases
Stacked Area Summaries for Groups of Cases
Stacked Area Summaries of Separate Variables
Stacked Area Values of Individual Cases
GRAPH


Simple Area Summaries for Groups of Cases

Creates a chart summarizing categories of a single variable.

Select a variable for the category axis and move it into the Category Axis field. This variable may be numeric, string, or long string.

Select one of the alternatives in the Area Represents group to specify how the data are represented on the scale axis.

If the scale axis displays a function of another summary variable, select Other statistic (e.g., mean) and then select a numeric variable to be summarized. To change the summary function, click Change Statistic.

To panel the chart, move one or more categorical variables into the Panel By group. See the topic Paneled Charts for more information.

Related Topics

Obtaining Simple Area Charts Summarizing Groups of Cases
Area Charts
Simple Area Summaries of Separate Variables
Simple Area Values of Individual Cases
Stacked Area Summaries for Groups of Cases
Stacked Area Summaries of Separate Variables
Stacked Area Values of Individual Cases
GRAPH
Obtaining Simple or Stacked Area Charts


Simple Area Values of Individual Cases

Creates a chart summarizing a single variable by individual case.

Select one variable and move it into the Area Represents field. This must be a numeric variable.

Select one of the alternatives in the Category Labels group to label items either by Case number or by Variable. If you select Variable, then you must select a variable from the target list and move it into the Variable field. This variable may be numeric, string, or long string.

To panel the chart, move one or more categorical variables into the Panel By group. See the topic Paneled Charts for more information.

Related Topics

Obtaining Simple Area Charts Showing Individual Cases
Area Charts
Simple Area Summaries for Groups of Cases
Simple Area Summaries of Separate Variables
Stacked Area Summaries for Groups of Cases
Stacked Area Summaries of Separate Variables
Stacked Area Values of Individual Cases
GRAPH
Obtaining Simple or Stacked Area Charts


Simple Area Summaries of Separate Variables

Creates a chart summarizing two or more variables.

Select at least two variables and move them into the Area Represents field. These variables must be numeric.

The function used to summarize the variable in the chart is displayed in the field.

To change the summary function for a variable, select the variable in the Area Represents field and click Change Statistic.

To panel the chart, move one or more categorical variables into the Panel By group. See the topic Paneled Charts for more information.

Related Topics

Obtaining Simple Area Charts Summarizing Separate Variables
Area Charts
Simple Area Summaries for Groups of Cases
Simple Area Values of Individual Cases
Stacked Area Summaries for Groups of Cases
Stacked Area Summaries of Separate Variables
Stacked Area Values of Individual Cases
GRAPH
Obtaining Simple or Stacked Area Charts


Bar Charts

Bar Charts allows you to make selections that determine the type of chart you obtain. Select the icon for the chart type you want and select the option under the Data in Chart Are group that best describes your data.

You can click on the icons below to browse examples of available chart types. If you find an example that looks like the chart you want, click on the How To button next to that example for specific instructions on how to obtain that chart.

Simple
Clustered
Stacked

Related Topics

Obtaining Simple, Clustered, or Stacked Bar Charts
Simple Bar Summaries for Groups of Cases
Simple Bar Summaries of Separate Variables
Simple Bar Values of Individual Cases
Clustered Bar Summaries for Groups of Cases
Clustered Bar Summaries of Separate Variables
Clustered Bar Values of Individual Cases
Stacked Bar Summaries for Groups of Cases
Stacked Bar Summaries of Separate Variables
Stacked Bar Values of Individual Cases
GRAPH


Clustered Bar Summaries for Groups of Cases

Creates a chart summarizing categories of one variable within categories of another. Bar height may represent a function of either the cluster definition variable or another summary variable.

Select a variable for the category axis and move it into the Category Axis field. This variable may be numeric, string, or long string.

Select one of the alternatives in the Bars Represent group to specify how the data are represented on the scale axis.

If the scale axis displays a function of another summary variable, select Other statistic (e.g., mean) and then select a numeric variable to be summarized. To change the summary function, click Change Statistic.

Select a cluster variable used to group bars and move it into the Define Clusters By field. Each cluster will consist of one bar for each value of the cluster variable at every level of the category variable.

To panel the chart, move one or more categorical variables into the Panel By group. See the topic Paneled Charts for more information.

Related Topics

Obtaining Clustered Bar Charts Summarizing Groups of Cases
Bar Charts
Simple Bar Summaries for Groups of Cases
Simple Bar Summaries of Separate Variables
Simple Bar Values of Individual Cases
Clustered Bar Summaries of Separate Variables
Clustered Bar Values of Individual Cases
Stacked Bar Summaries for Groups of Cases
Stacked Bar Summaries of Separate Variables
Stacked Bar Values of Individual Cases
GRAPH
Obtaining Simple, Clustered, or Stacked Bar Charts


Clustered Bar Values of Individual Cases

Creates a chart summarizing values of two or more variables for each case.

Select at least two variables and move them into the Bars Represent field. These variables must be numeric.

Select one of the alternatives in the Category Labels group to label categories either by Case number or by Variable. If you select Variable, then you must select a variable from the target list and move it into the Variable field. This variable may be numeric, string, or long string.

To panel the chart, move one or more categorical variables into the Panel By group. See the topic Paneled Charts for more information.

Related Topics

Obtaining Clustered Bar Charts Showing Individual Cases
Bar Charts
Simple Bar Summaries for Groups of Cases
Simple Bar Summaries of Separate Variables
Simple Bar Values of Individual Cases
Clustered Bar Summaries for Groups of Cases
Clustered Bar Summaries of Separate Variables
Stacked Bar Summaries for Groups of Cases
Stacked Bar Summaries of Separate Variables
Stacked Bar Values of Individual Cases
GRAPH
Obtaining Simple, Clustered, or Stacked Bar Charts


Clustered Bar Summaries of Separate Variables

Creates a chart summarizing two or more variables within categories of another variable.

Select at least two variables and move them into the Bars Represent field. These variables must be numeric.

Each variable in this field constitutes one segment of the stacked bar. The function used to summarize the variable in the chart is displayed in the field.

To change the summary function for a variable, select the variable in the Bars Represent field and click Change Statistic.

Select a category variable and move it into the Category Axis field. This variable may be numeric, string, or long string.

To panel the chart, move one or more categorical variables into the Panel By group. See the topic Paneled Charts for more information.

Related Topics

Obtaining Clustered Bar Charts Summarizing Separate Variables
Bar Charts
Simple Bar Summaries for Groups of Cases
Simple Bar Summaries of Separate Variables
Simple Bar Values of Individual Cases
Clustered Bar Summaries for Groups of Cases
Clustered Bar Values of Individual Cases
Stacked Bar Summaries for Groups of Cases
Stacked Bar Summaries of Separate Variables
Stacked Bar Values of Individual Cases
GRAPH
Obtaining Simple, Clustered, or Stacked Bar Charts


Boxplots

Boxplot allows you to make selections that determine the type of chart you obtain. Select the icon for the chart type you want and select the option under the Data in Chart Are group that best describes your data.

You can click on the icons below to browse examples of available chart types. If you find an example that looks like the chart you want, click on the How To button next to that example for specific instructions on how to create that chart.

Simple
Clustered

Boxplots show the median, interquartile range, outliers, and extreme cases of individual variables.

Related Topics

Obtaining Simple and Clustered Boxplots
EXAMINE
Simple Boxplot Summaries for Groups of Cases
Simple Boxplot Summaries of Separate Variables
Clustered Boxplot Summaries for Groups of Cases
Clustered Boxplot Summaries of Separate Variables


Simple Bar Summaries for Groups of Cases

Creates a chart summarizing categories of a single variable. Bar height represents a function of either the category variable itself or another summary variable.

Select a variable for the category axis and move it into the Category Axis field. This variable may be numeric, string, or long string.

Select one of the alternatives in the Bars Represent group to specify how the data are represented on the scale axis.

If the scale axis displays a function of another summary variable, select Other statistic (e.g., mean) and then select a numeric variable to be summarized. To change the summary function, click Change Statistic.

To panel the chart, move one or more categorical variables into the Panel By group. See the topic Paneled Charts for more information.

Related Topics

Obtaining Simple Bar Charts Summarizing Groups of Cases
Bar Charts
Simple Bar Summaries of Separate Variables
Simple Bar Values of Individual Cases
Clustered Bar Summaries for Groups of Cases
Clustered Bar Summaries of Separate Variables
Clustered Bar Values of Individual Cases
Stacked Bar Summaries for Groups of Cases
Stacked Bar Summaries of Separate Variables
Stacked Bar Values of Individual Cases
GRAPH
Obtaining Simple, Clustered, or Stacked Bar Charts


Simple Bar Values of Individual Cases

Creates a chart summarizing a single variable by individual case.

Select one variable and move it into the Bars Represent field. This variable must be a numeric variable.

Select one of the alternatives in the Category Labels group to label categories either by Case number or by Variable. If you select Variable, then you must select a variable from the target list and move it into the Variable field. This variable may be numeric, string, or long string.

To panel the chart, move one or more categorical variables into the Panel By group. See the topic Paneled Charts for more information.

Related Topics

Obtaining Simple Bar Charts Showing Individual Cases
Bar Charts
Simple Bar Summaries for Groups of Cases
Simple Bar Summaries of Separate Variables
Clustered Bar Summaries for Groups of Cases
Clustered Bar Summaries of Separate Variables
Clustered Bar Values of Individual Cases
Stacked Bar Summaries for Groups of Cases
Stacked Bar Summaries of Separate Variables
Stacked Bar Values of Individual Cases
GRAPH
Obtaining Simple, Clustered, or Stacked Bar Charts


Simple Bar Summaries of Separate Variables

Creates a chart summarizing two or more variables. There is one bar for each variable.

Select at least two variables and move them into the Bars Represent field. These variables must be numeric.

To change the summary function for a variable, select the variable in the Bars Represent field and click Change Statistic.

To panel the chart, move one or more categorical variables into the Panel By group. See the topic Paneled Charts for more information.

Related Topics

Obtaining Simple Bar Charts Summarizing Separate Variables
Bar Charts
Simple Bar Summaries for Groups of Cases
Simple Bar Values of Individual Cases
Clustered Bar Summaries for Groups of Cases
Clustered Bar Summaries of Separate Variables
Clustered Bar Values of Individual Cases
Stacked Bar Summaries for Groups of Cases
Stacked Bar Summaries of Separate Variables
Stacked Bar Values of Individual Cases
GRAPH
Obtaining Simple, Clustered, or Stacked Bar Charts


Stacked Bar Summaries for Groups of Cases

Creates a chart in which bar segments are stacked on top of each other. There is one bar for each value of the category axis variable. Segments within each bar represent categories of the stack variable.

Select a variable for the category axis and move it into the Category Axis field. This variable may be numeric, string, or long string.

Select one of the alternatives in the Bars Represent group to specify how the data are represented on the scale axis.

If the scale axis displays a function of another summary variable, select Other statistic (e.g., mean) and then select a numeric variable to be summarized. To change the summary function, click Change Statistic.

Select a stack variable and move it into the Define Stacks By field. This variable may be numeric, string, or long string. Each stack consists of a bar divided into segments stacked on top of one another. The height of each segment represents its value. There is one stacked bar at every level of the category variable.

To panel the chart, move one or more categorical variables into the Panel By group. See the topic Paneled Charts for more information.

Related Topics

Obtaining Stacked Bar Charts Summarizing Groups of Cases
Bar Charts
Simple Bar Summaries for Groups of Cases
Simple Bar Summaries of Separate Variables
Simple Bar Values of Individual Cases
Clustered Bar Summaries for Groups of Cases
Clustered Bar Summaries of Separate Variables
Clustered Bar Values of Individual Cases
Stacked Bar Summaries of Separate Variables
Stacked Bar Values of Individual Cases
GRAPH
Obtaining Simple, Clustered, or Stacked Bar Charts


Stacked Bar Values of Individual Cases

Creates a chart summarizing two or more variables for each case.

Select at least two variables and move them into the Bars Represent field. These variables must be numeric.

Select one of the alternatives in the Category Labels group to label categories either by Case number or by Variable. If you select Variable, then you must select a variable from the target list and move it into the Variable field. This variable may be numeric, string, or long string.

To panel the chart, move one or more categorical variables into the Panel By group. See the topic Paneled Charts for more information.

Related Topics

Obtaining Stacked Bar Charts Showing Individual Cases
Bar Charts
Simple Bar Summaries for Groups of Cases
Simple Bar Summaries of Separate Variables
Simple Bar Values of Individual Cases
Clustered Bar Summaries for Groups of Cases
Clustered Bar Summaries of Separate Variables
Clustered Bar Values of Individual Cases
Stacked Bar Summaries for Groups of Cases
Stacked Bar Summaries of Separate Variables
GRAPH
Obtaining Simple, Clustered, or Stacked Bar Charts


Stacked Bar Summaries of Separate Variables

Creates a chart summarizing two or more variables within categories.

Select at least two variables and move them into the Bars Represent field. These variables must be numeric.

Each variable in this field constitutes one segment of the stacked bar. The function used to summarize the variable in the chart is displayed in the field.

To change the function used to summarize the variables for the graph, click Change Statistic.

Select a category variable and move it into the Category Axis field. This variable may be numeric, string, or long string.

To panel the chart, move one or more categorical variables into the Panel By group. See the topic Paneled Charts for more information.

Related Topics

Obtaining Stacked Bar Charts Summarizing Separate Variables
Bar Charts
Simple Bar Summaries for Groups of Cases
Simple Bar Summaries of Separate Variables
Simple Bar Values of Individual Cases
Clustered Bar Summaries for Groups of Cases
Clustered Bar Summaries of Separate Variables
Clustered Bar Values of Individual Cases
Stacked Bar Summaries for Groups of Cases
Stacked Bar Values of Individual Cases
GRAPH
Obtaining Simple, Clustered, or Stacked Bar Charts


Individuals and Moving Range

control charts,control charts,control charts
control charts,control charts,control charts
individuals,individuals,individuals
control charts,control charts,control charts
moving range,moving range,moving range
individuals charts,individuals charts,individuals charts
moving range charts,moving range charts,moving range charts
Charts a single process measurement variable by individual case. For moving range charts, each point represents the difference between the current value and the previous value. (Click for example.)

Select one numeric variable that contains the measurements for the process being analyzed and move it into the Process Measurement field.

You can select one variable to label your subgroups and move it into the Subgroups Labeled By field.

Select one of the Charts options to choose the type of charts to generate.

• Individuals and moving range produces an individuals chart and a moving range chart.

• Individuals produces an individuals chart only

Enter a value into Span to specify the number of cases used in calculating the control limits for both chart types and the span of time units used to calculate the moving range.

Click Options to specify the number of sigmas displayed on the chart and to define the control limits. Click Control Rules to specify rules for identifying out-of-control points.

Related Topics

Obtaining Individuals and Moving Range Control Charts
Individuals, Moving Range Options
Individuals, Moving Range Statistics
Control Rules
Control Charts
X-Bar, R, s Cases Are Units
X-Bar, R, s Cases Are Subgroups
X-Bar, R, and s Chart Options
X-Bar, R, and s Chart Statistics
p, np Cases Are Units
p, np Cases Are Subgroups
p, np, c, u Options
c, u Cases Are Units
c, u Cases Are Subgroups
Obtaining Control Charts
SPCHART


Individuals, Moving Range Options

individuals charts,individuals charts,individuals charts
individuals charts,individuals charts,individuals charts
sigma,sigma,sigma
moving range charts,moving range charts,moving range charts
moving range charts,moving range charts,moving range charts
sigma,sigma,sigma

Enter a value into Number of Sigmas to specify the number of standard deviations displayed on either side of the center line.

Select Display subgroups defined by missing values to display each missing value for the subgroup variable (including the system-missing value) as a separate group in the chart. If this option is not selected, cases with system-missing or user-missing values for the subgroup variable are excluded from the chart.

Related Topics

Specifying Options for Individuals and Moving Range Charts
Individuals and Moving Range
Individuals, Moving Range Statistics
Control Rules
Control Charts
X-Bar, R, s Cases Are Units
X-Bar, R, s Cases Are Subgroups
X-Bar, R, and s Chart Options
X-Bar, R, and s Chart Statistics
p, np Cases Are Units
p, np Cases Are Subgroups
p, np, c, u Options
c, u Cases Are Units
c, u Cases Are Subgroups


Control Rules

X-bar charts,X-bar charts,X-bar charts
control rules,control rules,control rules
individuals charts,individuals charts,individuals charts
control rules,control rules,control rules
moving range charts,moving range charts,moving range charts
control rules,control rules,control rules
control rules,control rules,control rules

The Control Rules allow you to specify one or more rules. If a point violates any rule, it appears in the chart or charts with a different shape and color compared to in-control points. This feature allows you to quickly identify points that are out of control.

The output also includes rule violations tables for both the primary and secondary charts. If a point violates more than one rule, it will be listed multiple times, for each rule violation. By default, the subgroup variable is used to identify points in the table. You can specify a different variable in the Identify Points By field in the main control chart dialog box.

Related Topics

Specifying Rules for Control Charts
X-Bar, R, s Cases Are Units
X-Bar, R, s Cases Are Subgroups
X-Bar, R, and s Chart Options
X-Bar, R, and s Chart Statistics
Individuals and Moving Range
Individuals, Moving Range Options
Individuals, Moving Range Statistics
p, np Cases Are Units
p, np Cases Are Subgroups
p, np, c, u Options
c, u Cases Are Units
c, u Cases Are Subgroups


Individuals, Moving Range Statistics

individuals charts,individuals charts,individuals charts
individuals charts,individuals charts,individuals charts
control limits,control limits,control limits
individuals charts,individuals charts,individuals charts
capability indices,capability indices,capability indices
individuals charts,individuals charts,individuals charts
performance indices,performance indices,performance indices
moving range charts,moving range charts,moving range charts
moving range charts,moving range charts,moving range charts
control limits,control limits,control limits
moving range charts,moving range charts,moving range charts
capability indices,capability indices,capability indices
moving range charts,moving range charts,moving range charts
performance indices,performance indices,performance indices
control limits,control limits,control limits
specification limits,specification limits,specification limits
performance indices,performance indices,performance indices
capability indices,capability indices,capability indices

The Specification Limits for Individuals Chart group allows you to specify fixed limits to be displayed on the chart along with the calculated limits. This can be useful if you want to determine whether a process falls within predetermined tolerance limits.

• To display a fixed upper limit, select Upper and enter the value of the upper limit.

• To display a fixed lower limit, select Lower and enter the value of the lower limit.

• To display a target value for the process, select Target and enter the target value.

The Actual % outside specification limits is the percentage of individual observations in the process that lie outside the specification limits.

The Process Capability Indices allow you to select for display various statistics that measure the capability of the process. Most of these indices are based upon the capability sigma (which is computed using the mean moving sample range) and/or the specification limits chosen in this dialog box.

The Process Performance Indices allow you to select for display various statistics that measure the performance of the process. Most of these indices are based upon the standard deviation of the process and/or the specification limits chosen in this dialog box.

Related Topics

Specifying Statistics for Individuals and Moving Range Charts
Individuals and Moving Range
Individuals, Moving Range Options
Control Rules
Control Charts
X-Bar, R, s Cases Are Units
X-Bar, R, s Cases Are Subgroups
X-Bar, R, and s Chart Options
X-Bar, R, and s Chart Statistics
p, np Cases Are Units
p, np Cases Are Subgroups
p, np, c, u Options
c, u Cases Are Units
c, u Cases Are Subgroups


p, np Cases Are Subgroups

control charts,control charts,control charts
control charts,control charts,control charts
p charts,p charts,p charts
control charts,control charts,control charts
np charts,np charts,np charts
p charts,p charts,p charts
p charts,p charts,p charts
cases are subgroups,cases are subgroups,cases are subgroups
p charts,p charts,p charts
nonconforming values,nonconforming values,nonconforming values
p charts,p charts,p charts
subgroup identifier,subgroup identifier,subgroup identifier
np charts,np charts,np charts
np charts,np charts,np charts
cases are subgroups,cases are subgroups,cases are subgroups
np charts,np charts,np charts
nonconforming values,nonconforming values,nonconforming values
np charts,np charts,np charts
subgroup identifier,subgroup identifier,subgroup identifier
Creates a process control chart summarizing the proportion or number of nonconforming units within subgroups. (Click for example.)

Select one numeric variable and move it into the Number Nonconforming field.

You can select one variable to label your subgroups and move it into the Subgroups Labeled By field.

The Sample Size options allow you to specify the size of the samples.

• Select Constant to specify a constant number of units per sample. Enter the value into the Constant text box. This value must be a positive integer.

• Select Variable to specify a variable containing the number of units for each sample. Move the variable into the Variable field.

The Chart group allows you to chart either the number or the proportion of samples that do not conform to the variable selected for Number Nonconforming.

• p (Proportion nonconforming) charts the proportion.

• np (Number of nonconforming) charts the number.

Click Options to specify the number of sigmas displayed on the chart and to specify the treatment of missing values in your data. Click Control Rules to specify rules for identifying out-of-control points.

Related Topics

Obtaining p and np Charts Where Cases Are Subgroups
p, np Cases Are Units
p, np, c, u Options
Control Rules
Control Charts
X-Bar, R, s Cases Are Units
X-Bar, R, s Cases Are Subgroups
X-Bar, R, and s Chart Options
X-Bar, R, and s Chart Statistics
Individuals and Moving Range
Individuals, Moving Range Options
Individuals, Moving Range Statistics
c, u Cases Are Units
c, u Cases Are Subgroups
Obtaining Control Charts
SPCHART


p, np, c, u Options

p charts,p charts,p charts
np charts,np charts,np charts
c charts,c charts,c charts
u charts,u charts,u charts
p charts,p charts,p charts
sigma,sigma,sigma
p charts,p charts,p charts
missing values,missing values,missing values
np charts,np charts,np charts
sigma,sigma,sigma
np charts,np charts,np charts
missing values,missing values,missing values
c charts,c charts,c charts
sigma,sigma,sigma
c charts,c charts,c charts
missing values,missing values,missing values
u charts,u charts,u charts
sigma,sigma,sigma
u charts,u charts,u charts
missing values,missing values,missing values

Enter a value into Number of Sigmas to specify the number of standard deviations displayed on the chart. For p and np charts, calculation of sigmas is based on the binomial distribution. For c and u charts, calculation of sigmas is based on the Poisson distribution.

Select Display subgroups defined by missing values to display each missing value for the subgroup variable (including the system-missing value) as a separate group in the chart. If this option is not selected, cases with system-missing or user-missing values for the subgroup variable are excluded from the chart.

Related Topics

Specifying Options for p, np, c, and u Charts
p, np Cases Are Units
p, np Cases Are Subgroups
Control Rules
c, u Cases Are Units
c, u Cases Are Subgroups
Control Charts
X-Bar, R, s Cases Are Units
X-Bar, R, s Cases Are Subgroups
X-Bar, R, and s Chart Options
X-Bar, R, and s Chart Statistics
Individuals and Moving Range
Individuals, Moving Range Options
Individuals, Moving Range Statistics


p, np Cases Are Units

control charts,control charts,control charts
control charts,control charts,control charts
p charts,p charts,p charts
control charts,control charts,control charts
np charts,np charts,np charts
p charts,p charts,p charts
p charts,p charts,p charts
cases are units,cases are units,cases are units
p charts,p charts,p charts
conforming values,conforming values,conforming values
p charts,p charts,p charts
subgroup identifier,subgroup identifier,subgroup identifier
np charts,np charts,np charts
np charts,np charts,np charts
cases are units,cases are units,cases are units
np charts,np charts,np charts
conforming values,conforming values,conforming values
np charts,np charts,np charts
subgroup identifier,subgroup identifier,subgroup identifier
Creates a process control chart summarizing the proportion or number of nonconforming units within subgroups. (Click for example.)

Select one variable containing the characteristic to be charted and move it into the Characteristic field. This variable may be numeric, string, or long string.

The Value to Count group allows you to define the value to be counted and charted. If you select Nonconforming, the value specified for Value to Count represents nonconforming units. If you select Conforming, the value specified for Value to Count represents conforming units. Enter the value into the Value text box.

Select one categorical variable that defines your subgroups and move it into the Subgroups Defined By field.

Select one of the Charts options to choose the type of charts to generate.

• p (Proportion of nonconforming) produces a p chart.

• np (Number of nonconforming) produces an np chart.

Click Options to specify the number of sigmas displayed on the chart and to specify the treatment of missing values in your data. Click Control Rules to specify rules for identifying out-of-control points.

Related Topics

Obtaining p and np Charts Where Cases Are Units
p, np Cases Are Subgroups
p, np, c, u Options
Control Rules
Control Charts
X-Bar, R, s Cases Are Units
X-Bar, R, s Cases Are Subgroups
X-Bar, R, and s Chart Options
X-Bar, R, and s Chart Statistics
Individuals and Moving Range
Individuals, Moving Range Options
Individuals, Moving Range Statistics
c, u Cases Are Units
c, u Cases Are Subgroups
Obtaining Control Charts
SPCHART


Control Charts

control charts,control charts,control charts
charts,charts,charts
control,control,control

Control Charts allows you to make selections that determine the type of chart you obtain. Select the icon for the chart type you want and then select the option under Data Organization that best describes your data.

You can click on the icons below to browse examples of available chart types. If you find an example that looks like the chart you want, click on the How To button next to that example for specific instructions on how to create that chart.

X-bar, R, s
Individuals, Moving Range
p, np
c, u

Show me

Related Topics

Obtaining Control Charts
X-Bar, R, s Cases Are Units
X-Bar, R, s Cases Are Subgroups
Individuals and Moving Range
p, np Cases Are Units
p, np Cases Are Subgroups
c, u Cases Are Units
c, u Cases Are Subgroups
X-Bar, R, and s Chart Options
X-Bar, R, and s Chart Statistics
Individuals, Moving Range Options
Individuals, Moving Range Statistics
p, np, c, u Options
SPCHART


c, u Cases Are Subgroups

control charts,control charts,control charts
control charts,control charts,control charts
c charts,c charts,c charts
control charts,control charts,control charts
u charts,u charts,u charts
c charts,c charts,c charts
c charts,c charts,c charts
cases are subgroups,cases are subgroups,cases are subgroups
c charts,c charts,c charts
nonconforming values,nonconforming values,nonconforming values
c charts,c charts,c charts
subgroup identifier,subgroup identifier,subgroup identifier
u charts,u charts,u charts
u charts,u charts,u charts
cases are subgroups,cases are subgroups,cases are subgroups
u charts,u charts,u charts
nonconforming values,nonconforming values,nonconforming values
u charts,u charts,u charts
subgroup identifier,subgroup identifier,subgroup identifier
Creates a process control chart summarizing the number of nonconformities (or nonconformities per unit) within subgroups. A single characteristic variable is summarized. (Click for example.)

Select one numeric variable that contains the total number of nonconformities per subgroup, and move it into the Number of Nonconformities field.

You can select one variable to label your subgroups and move it into the Subgroups Labeled By field.

Select one of the Charts options to choose the type of charts to generate.

• u (Nonconformities per unit) produces a u chart.

• c (Number of nonconformities) produces a c chart.

Select one of the Sample Size options to define the size of your samples.

• Select Constant if you have a constant sample size for each subgroup and enter the size of the sample.

• Select Variable if you have unequal sample sizes for the subgroups. Enter the variable containing the values of the sample sizes into Variable.

Click Options to specify the number of sigmas displayed on the chart and to specify the treatment of missing values in your data. Click Control Rules to specify rules for identifying out-of-control points.

Related Topics

Obtaining c and u Charts Where Cases Are Subgroups
p, np, c, u Options
c, u Cases Are Units
Control Rules
Control Charts
X-Bar, R, s Cases Are Units
X-Bar, R, s Cases Are Subgroups
X-Bar, R, and s Chart Options
X-Bar, R, and s Chart Statistics
Individuals and Moving Range
Individuals, Moving Range Options
Individuals, Moving Range Statistics
p, np Cases Are Units
p, np Cases Are Subgroups
Obtaining Control Charts
SPCHART


c, u Cases Are Units

control charts,control charts,control charts
control charts,control charts,control charts
c charts,c charts,c charts
control charts,control charts,control charts
u charts,u charts,u charts
c charts,c charts,c charts
c charts,c charts,c charts
cases are units,cases are units,cases are units
c charts,c charts,c charts
nonconforming values,nonconforming values,nonconforming values
c charts,c charts,c charts
subgroup identifier,subgroup identifier,subgroup identifier
u charts,u charts,u charts
u charts,u charts,u charts
cases are units,cases are units,cases are units
u charts,u charts,u charts
nonconforming values,nonconforming values,nonconforming values
u charts,u charts,u charts
subgroup identifier,subgroup identifier,subgroup identifier
Creates a process control chart summarizing the number of nonconformities (or nonconformities per unit) within subgroups. (Click for example.)

Select one variable containing the characteristic to be charted and move it into the Characteristic field.

Select one categorical variable that defines your subgroups and move it into the Subgroups Defined By field.

Select one of the Charts options to choose the type of charts to generate.

• u (Nonconformities per unit) produces a u chart.

• c (Number of nonconformities) produces a c chart.

Click Options to specify the number of sigmas displayed on the chart and to specify the treatment of missing values in your data. Click Control Rules to specify rules for identifying out-of-control points.

Related Topics

Obtaining c and u Charts Where Cases Are Units
p, np, c, u Options
c, u Cases Are Subgroups
Control Rules
Control Charts
X-Bar, R, s Cases Are Units
X-Bar, R, s Cases Are Subgroups
X-Bar, R, and s Chart Options
X-Bar, R, and s Chart Statistics
Individuals and Moving Range
Individuals, Moving Range Options
Individuals, Moving Range Statistics
p, np Cases Are Units
p, np Cases Are Subgroups
Obtaining Control Charts
SPCHART


X-Bar, R, s Cases Are Subgroups

control charts,control charts,control charts
control charts,control charts,control charts
X-bar charts,X-bar charts,X-bar charts
control charts,control charts,control charts
R charts,R charts,R charts
control charts,control charts,control charts
s charts,s charts,s charts
X-bar charts,X-bar charts,X-bar charts
X-bar charts,X-bar charts,X-bar charts
cases are subgroups,cases are subgroups,cases are subgroups
R charts,R charts,R charts
R charts,R charts,R charts
cases are subgroups,cases are subgroups,cases are subgroups
range charts,range charts,range charts
range charts,range charts,range charts
cases are subgroups,cases are subgroups,cases are subgroups
s charts,s charts,s charts
s charts,s charts,s charts
cases are subgroups,cases are subgroups,cases are subgroups
Creates X-bar, R, and s charts that plot either the mean, range, or standard deviation for subgroups of measurements of some ongoing process. (Click for example.)

Select two or more numeric variables that contain the measurements for samples and move them to the Samples field.

You can select one variable to label your subgroups and move it to the Subgroups Labeled By field. This variable may be numeric, string, or long string.

Select one of the options in the Charts group to choose the type of charts to generate.

• X-bar using range produces an X-bar chart and a range chart.

• X-bar using standard deviation produces an X-bar chart and a standard deviation chart .

Click Options to specify the number of sigmas displayed on the chart, define the control limits, specify a minimum subgroup sample size, and specify the treatment of missing values in your data. Click Control Rules to specify rules for identifying out-of-control points.

Related Topics

Obtaining X-Bar, R, and s Charts Summarizing Two or More Sample Variables
X-Bar, R, s Cases Are Units
X-Bar, R, and s Chart Options
X-Bar, R, and s Chart Statistics
Control Rules
Control Charts
Individuals and Moving Range
Individuals, Moving Range Options
Individuals, Moving Range Statistics
p, np Cases Are Units
p, np Cases Are Subgroups
p, np, c, u Options
c, u Cases Are Units
c, u Cases Are Subgroups
Obtaining Control Charts
SPCHART


X-Bar, R, and s Chart Options

X-bar charts,X-bar charts,X-bar charts
X-bar charts,X-bar charts,X-bar charts
sigma,sigma,sigma
X-bar charts,X-bar charts,X-bar charts
minimum sample size,minimum sample size,minimum sample size
R charts,R charts,R charts
R charts,R charts,R charts
sigma,sigma,sigma
R charts,R charts,R charts
control limits,control limits,control limits
R charts,R charts,R charts
minimum sample size,minimum sample size,minimum sample size
range charts,range charts,range charts
range charts,range charts,range charts
sigma,sigma,sigma
range charts,range charts,range charts
minimum sample size,minimum sample size,minimum sample size
s charts,s charts,s charts
s charts,s charts,s charts
sigma,sigma,sigma
s charts,s charts,s charts
minimum sample size,minimum sample size,minimum sample size

Enter a value into Number of Sigmas text box to specify the number of standard deviations displayed on either side of the center line. Calculation of sigmas is based on the normal distribution for X-bar, r, and s charts.

Enter a value into the Minimum Subgroup Sample Size text box to specify the minimum sample size allowed for subgroups. If the number in a sample is less than the specified value, the subgroup is eliminated from the chart and from all calculations.

Select Display subgroups defined by missing values to display each missing value for the subgroup variable (including the system-missing value) as a separate group in the chart. If this option is not selected, cases with system-missing or user-missing values for the subgroup variable are excluded from the chart.

Related Topics

Specifying Options for X-Bar, R, and s Charts
Control Charts
X-Bar, R, s Cases Are Units
X-Bar, R, s Cases Are Subgroups
X-Bar, R, and s Chart Statistics
Individuals and Moving Range
Individuals, Moving Range Options
Individuals, Moving Range Statistics
p, np Cases Are Units
p, np Cases Are Subgroups
p, np, c, u Options
c, u Cases Are Units
c, u Cases Are Subgroups
Control Rules


X-Bar, R, and s Chart Statistics

X-bar charts,X-bar charts,X-bar charts
X-bar charts,X-bar charts,X-bar charts
capability sigma,capability sigma,capability sigma
X-bar charts,X-bar charts,X-bar charts
control limits,control limits,control limits
X-bar charts,X-bar charts,X-bar charts
capability indices,capability indices,capability indices
X-bar charts,X-bar charts,X-bar charts
performance indices,performance indices,performance indices
R charts,R charts,R charts
R charts,R charts,R charts
capability sigma,capability sigma,capability sigma
R charts,R charts,R charts
control limits,control limits,control limits
R charts,R charts,R charts
capability indices,capability indices,capability indices
R charts,R charts,R charts
performance indices,performance indices,performance indices
range charts,range charts,range charts
range charts,range charts,range charts
capability sigma,capability sigma,capability sigma
range charts,range charts,range charts
control limits,control limits,control limits
range charts,range charts,range charts
capability indices,capability indices,capability indices
range charts,range charts,range charts
performance indices,performance indices,performance indices
s charts,s charts,s charts
s charts,s charts,s charts
capability sigma,capability sigma,capability sigma
s charts,s charts,s charts
control limits,control limits,control limits
s charts,s charts,s charts
capability indices,capability indices,capability indices
s charts,s charts,s charts
performance indices,performance indices,performance indices
control limits,control limits,control limits
specification limits,specification limits,specification limits
performance indices,performance indices,performance indices
capability indices,capability indices,capability indices
capability sigma,capability sigma,capability sigma

The Specification Limits for X-bar Chart group allows you to specify fixed limits to be displayed on the chart along with the calculated limits. This can be useful if you want to determine whether a process falls within predetermined tolerance limits.

• To display a fixed upper limit, select Upper and enter the value of the upper limit.

• To display a fixed lower limit, select Lower and enter the value of the lower limit.

• To display a target value for the process, select Target and enter the target value.

The Capability Sigma is a measure of variation used in the computation of capability indices. You may choose to have it computed based upon R-bar (the mean range), S-bar (the mean standard deviation), or the within subgroup variation of the process.

The Actual % outside specification limits is the percentage of individual observations in the process that lie outside the specification limits.

The Process Capability Indices allow you to select for display various statistics that measure the capability of the process. Most of these indices are based upon the capability sigma and/or the specification limits chosen in this dialog box.

The Process Performance Indices allow you to select for display various statistics that measure the performance of the process. Most of these indices are based upon the standard deviation of the process and/or the specification limits chosen in this dialog box.

Related Topics

Specifying Statistics for X-Bar, R, and s Charts
Control Charts
X-Bar, R, s Cases Are Units
X-Bar, R, s Cases Are Subgroups
X-Bar, R, and s Chart Options
Individuals and Moving Range
Individuals, Moving Range Options
Individuals, Moving Range Statistics
p, np Cases Are Units
p, np Cases Are Subgroups
p, np, c, u Options
c, u Cases Are Units
c, u Cases Are Subgroups
Control Rules


X-Bar, R, s Cases Are Units

control charts,control charts,control charts
control charts,control charts,control charts
X-bar charts,X-bar charts,X-bar charts
control charts,control charts,control charts
R charts,R charts,R charts
control charts,control charts,control charts
s charts,s charts,s charts
X-bar charts,X-bar charts,X-bar charts
X-bar charts,X-bar charts,X-bar charts
cases are units,cases are units,cases are units
R charts,R charts,R charts
R charts,R charts,R charts
cases are units,cases are units,cases are units
s charts,s charts,s charts
s charts,s charts,s charts
cases are units,cases are units,cases are units
Creates X-bar, R, and s charts that plot either the mean, range, or standard deviation for measurements of some process over time. (Click for example.)

Select one numeric variable that contains the measurements for the process being analyzed and move it into the Process Measurement field.

Select the categorical variable that defines your subgroups and move it into the Subgroups Defined By field.

Select one of the Charts options to choose the type of charts to generate.

• X-bar using range produces an X-bar chart and a range chart.

• X-bar using standard deviation produces an X-bar chart and a standard deviation chart.

Click Options to specify the number of sigmas displayed on the chart, define the control limits, specify a minimum subgroup sample size, and specify the treatment of missing values in your data. Click Control Rules to specify rules for identifying out-of-control points.

Related Topics

Obtaining X-Bar, R, and s Charts Summarizing a Single Process Measurement Variable
X-Bar, R, s Cases Are Subgroups
X-Bar, R, and s Chart Options
X-Bar, R, and s Chart Statistics
Control Rules
Control Charts
Individuals and Moving Range
Individuals, Moving Range Options
Individuals, Moving Range Statistics
p, np Cases Are Units
p, np Cases Are Subgroups
p, np, c, u Options
c, u Cases Are Units
c, u Cases Are Subgroups
Obtaining Control Charts
SPCHART


Error Bar Charts

Error Bar Charts allows you to make selections that determine the type of chart you obtain. Select the icon for the chart type you want and select the option under the Data in Chart Are group that best describes your data.

You can click on the icons below to browse examples of available chart types. If you find an example that looks like the chart you want, click on the How To button next to that example for specific instructions on how to create that chart.

Simple
Clustered

Error bar charts plot the confidence intervals, standard errors, or standard deviations of individual variables.

Related Topics

Obtaining Error Bar Charts
Simple Error Bar Summaries for Groups of Cases
Simple Error Bar Summaries of Separate Variables
Clustered Error Bar Summaries for Groups of Cases
Clustered Error Bar Summaries of Separate Variables
GRAPH


Clustered Error Bar Summaries for Groups of Cases

Creates a chart summarizing the distribution of a single numeric variable within clusters defined by a categorical variable. Each bar within a cluster is defined by a second categorical variable. (Click for example.)

Select one variable and move it into the Variable field. This variable must be numeric.

Select a variable for the category axis and move it into the Category Axis field. This variable may be numeric, string, or long string.

Select a cluster variable used to group bars and move it into the Define Clusters By field. This variable may be numeric, string, or long string. Each cluster will consist of one error bar for each value of the cluster variable at every level of the category variable.

Select one of the alternatives from the Bars Represent group to choose whether the error bars represent Confidence interval for mean, Standard error of mean, or Standard deviation.

• If you have selected Confidence interval for mean, you can enter the desired confidence level into the Level text box.

• If you have selected either Standard error of mean or Standard deviation, you can choose a multiplier. Enter the value by which you want to multiply the statistic into Multiplier.

To panel the chart, move one or more categorical variables into the Panel By group. See the topic Paneled Charts for more information.

Related Topics

Obtaining Clustered Error Bar Charts Summarizing Groups of Cases
Error Bar Charts
Simple Error Bar Summaries for Groups of Cases
Simple Error Bar Summaries of Separate Variables
Clustered Error Bar Summaries of Separate Variables
GRAPH
Obtaining Error Bar Charts


Clustered Error Bar Summaries of Separate Variables

Creates a chart summarizing the distribution of one or more numeric variables within clusters defined by a categorical variable.

Select at least two variables and move them into the Variables field. These variables must be numeric.

Select a category variable and move it into the Category Axis field. This variable may be numeric, string, or long string.

Select one of the alternatives from the Bars Represent group to choose whether the error bars represent Confidence interval for mean, Standard error of mean, or Standard deviation.

• If you have selected Confidence interval for mean, you can enter the desired confidence level into the Level text box.

• If you have selected either Standard error of mean or Standard deviation, you can choose a multiplier. Enter the value by which you want to multiply the statistic into Multiplier.

To panel the chart, move one or more categorical variables into the Panel By group. See the topic Paneled Charts for more information.

Related Topics

Obtaining Clustered Error Bar Charts Summarizing Separate Variables
Error Bar Charts
Simple Error Bar Summaries for Groups of Cases
Simple Error Bar Summaries of Separate Variables
Clustered Error Bar Summaries for Groups of Cases
GRAPH
Obtaining Error Bar Charts


Clustered Range Bar Summaries for Groups of Cases

Creates a chart summarizing a pair of variables within clusters defined by a categorical variable. Each bar within a cluster represents a category of a second categorical variable. (Click for example.)

Select the first variable from which you wish to form bars and move it into the 1st field. Select the second variable from which you wish to form bars and move it into the 2nd field. These variables must be numeric.

The values of the summary functions for the two variables represent the top and bottom of each range bar.

The function used to summarize the variable appears in the Bars Represent group.

To change the summary function for a variable, select the variable in the Bars Represent group and click Change Statistic.

Select a variable for the category axis and move it into the Category Axis field. This variable may be numeric, string, or long string.

Select a cluster variable used to group bars and move it into the Define Clusters By field. This variable must be numeric. Each cluster will consist of one bar for each value of the cluster variable at every level of the category variable.

To panel the chart, move one or more categorical variables into the Panel By group. See the topic Paneled Charts for more information.

Related Topics

Obtaining Clustered Range Bar Charts Summarizing Groups of Cases
High-Low Charts
Simple High-Low-Close Summaries for Groups of Cases
Simple High-Low-Close Summaries of Separate Variables
Simple High-Low-Close Values of Individual Cases
Clustered High-Low-Close Summaries for Groups of Cases
Clustered High-Low-Close Summaries of Separate Variables
Clustered High-Low-Close Values of Individual Cases
Simple Range Bar Summaries for Groups of Cases
Simple Range Bar Summaries of Separate Variables
Simple Range Bar Values of Individual Cases
Clustered Range Bar Summaries of Separate Variables
Clustered Range Bar Values of Individual Cases
Difference Area Summaries for Groups of Cases
Difference Area Summaries of Separate Variables
Difference Area Values of Individual Cases
GRAPH
Obtaining High-Low, Difference Area, and Range Bar Charts


Clustered Range Bar Values of Individual Cases

Creates a chart summarizing two or more variable pairs within clusters for each case. Each bar within a cluster represents one of the variable pairs. (Click for example.)

You must define at least two variable pairs from which to form clusters. Clusters consist of each of the cluster variables for every case.

Select two variables and move them into the 1st and 2nd fields in the Pair group. These variables must be numeric.

Click Next to define another variable. (You can click Previous to return to previous variables.)

Select one of the alternatives in the Category Labels group to label categories either by Case number or by Variable. If you select Variable, then you must select a variable from the target list and move it into the Variable field. This variable may be numeric, string, or long string.

To panel the chart, move one or more categorical variables into the Panel By group. See the topic Paneled Charts for more information.

Related Topics

Obtaining Clustered Range Bar Charts Showing Individual Cases
High-Low Charts
Simple High-Low-Close Summaries for Groups of Cases
Simple High-Low-Close Summaries of Separate Variables
Simple High-Low-Close Values of Individual Cases
Clustered High-Low-Close Summaries for Groups of Cases
Clustered High-Low-Close Summaries of Separate Variables
Clustered High-Low-Close Values of Individual Cases
Simple Range Bar Summaries for Groups of Cases
Simple Range Bar Summaries of Separate Variables
Simple Range Bar Values of Individual Cases
Clustered Range Bar Summaries for Groups of Cases
Clustered Range Bar Summaries of Separate Variables
Difference Area Summaries for Groups of Cases
Difference Area Summaries of Separate Variables
Difference Area Values of Individual Cases
GRAPH
Obtaining High-Low, Difference Area, and Range Bar Charts


Clustered Range Bar Summaries of Separate Variables

Creates a chart summarizing two or more variable pairs within clusters defined by a categorical variable. Each bar within a cluster represents one of the variable pairs. (Click for example.)

You must define at least two variable pairs that define the range bars within each cluster.

Select two variables and move them into the 1st and 2nd fields in the Pair group. These variables must be numeric.

Click Next to define another variable pair. (You can click Previous to return to previous variables.)

The function used to summarize the variable in the chart is displayed in the field next to the variable name.

To change the summary function for a variable, select the variable in the Pair group and click Change Statistic.

Select a variable for the category axis and move it into the Category Axis field. This variable may be numeric, string, or long string.

To panel the chart, move one or more categorical variables into the Panel By group. See the topic Paneled Charts for more information.

Related Topics

Obtaining Clustered Range Bar Charts Summarizing Separate Variables
High-Low Charts
Simple High-Low-Close Summaries for Groups of Cases
Simple High-Low-Close Summaries of Separate Variables
Simple High-Low-Close Values of Individual Cases
Clustered High-Low-Close Summaries for Groups of Cases
Clustered High-Low-Close Summaries of Separate Variables
Clustered High-Low-Close Values of Individual Cases
Simple Range Bar Summaries for Groups of Cases
Simple Range Bar Summaries of Separate Variables
Simple Range Bar Values of Individual Cases
Clustered Range Bar Summaries for Groups of Cases
Clustered Range Bar Values of Individual Cases
Difference Area Summaries for Groups of Cases
Difference Area Summaries of Separate Variables
Difference Area Values of Individual Cases
GRAPH
Obtaining High-Low, Difference Area, and Range Bar Charts


Difference Area Summaries for Groups of Cases

Creates a chart summarizing a dichotomous variable within categories of another variable.

Select a variable for the category axis and move it into the Category Axis field. This variable may be numeric, string, or long string.

Select a dichotomous variable and move it into the Define 2 Groups By field. This variable may be numeric, string, or long string.

Lines are generated for each of the two categories of this variable, with the area between the lines filled in.

Select one of the alternatives in the Lines Represent group to specify how the data are represented on the scale axis.

If the scale axis displays a function of another summary variable, select Other statistic (e.g., mean) and then select a numeric variable to be summarized. To change the summary function, click Change Statistic.

To panel the chart, move one or more categorical variables into the Panel By group. See the topic Paneled Charts for more information.

Related Topics

Obtaining Difference Area Charts Summarizing Groups of Cases
High-Low Charts
Simple High-Low-Close Summaries for Groups of Cases
Simple High-Low-Close Summaries of Separate Variables
Simple High-Low-Close Values of Individual Cases
Clustered High-Low-Close Summaries for Groups of Cases
Clustered High-Low-Close Summaries of Separate Variables
Clustered High-Low-Close Values of Individual Cases
Simple Range Bar Summaries for Groups of Cases
Simple Range Bar Summaries of Separate Variables
Simple Range Bar Values of Individual Cases
Clustered Range Bar Summaries for Groups of Cases
Clustered Range Bar Summaries of Separate Variables
Clustered Range Bar Values of Individual Cases
Difference Area Summaries of Separate Variables
Difference Area Values of Individual Cases
GRAPH
Obtaining High-Low, Difference Area, and Range Bar Charts


Difference Area Values of Individual Cases

Creates a chart summarizing a differenced variable pair.

You must select two variables and move them into the 1st and 2nd fields in the Differenced Pair Represents group. These variables must be numeric.

Lines are generated for each of these variables, with the area between the lines filled in.

Select one of the alternatives in the Category Labels group to label categories either by Case number or by Variable. If you select Variable, then you must select a variable from the target list and move it into the Variable field. This variable may be numeric, string, or long string.

To panel the chart, move one or more categorical variables into the Panel By group. See the topic Paneled Charts for more information.

Related Topics

Obtaining Difference Area Charts Showing Individual Cases
High-Low Charts
Simple High-Low-Close Summaries for Groups of Cases
Simple High-Low-Close Summaries of Separate Variables
Simple High-Low-Close Values of Individual Cases
Clustered High-Low-Close Summaries for Groups of Cases
Clustered High-Low-Close Summaries of Separate Variables
Clustered High-Low-Close Values of Individual Cases
Simple Range Bar Summaries for Groups of Cases
Simple Range Bar Summaries of Separate Variables
Simple Range Bar Values of Individual Cases
Clustered Range Bar Summaries for Groups of Cases
Clustered Range Bar Summaries of Separate Variables
Clustered Range Bar Values of Individual Cases
Difference Area Summaries for Groups of Cases
Difference Area Summaries of Separate Variables
GRAPH
Obtaining High-Low, Difference Area, and Range Bar Charts


Difference Area Summaries of Separate Variables

Creates a chart summarizing a differenced variable pair within categories of another variable.

Select two variables and move them into the 1st and 2nd fields in the Differenced Pair Represents group. These variables must be numeric.

Lines are generated for each of these variables, with the area between the lines filled in. The function used to summarize each variable in the chart is displayed in the field next to each variable name.

To change the summary function for a variable, select the variable in the 1st or 2nd field and click Change Statistic.

Select a category variable and move it into the Category Axis field. This variable may be numeric, string, or long string.

To panel the chart, move one or more categorical variables into the Panel By group. See the topic Paneled Charts for more information.

Related Topics

Obtaining Difference Area Charts Summarizing Separate Variables
High-Low Charts
Simple High-Low-Close Summaries for Groups of Cases
Simple High-Low-Close Summaries of Separate Variables
Simple High-Low-Close Values of Individual Cases
Clustered High-Low-Close Summaries for Groups of Cases
Clustered High-Low-Close Summaries of Separate Variables
Clustered High-Low-Close Values of Individual Cases
Simple Range Bar Summaries for Groups of Cases
Simple Range Bar Summaries of Separate Variables
Simple Range Bar Values of Individual Cases
Clustered Range Bar Summaries for Groups of Cases
Clustered Range Bar Summaries of Separate Variables
Clustered Range Bar Values of Individual Cases
Difference Area Summaries for Groups of Cases
Difference Area Values of Individual Cases
GRAPH
Obtaining High-Low, Difference Area, and Range Bar Charts


Simple Error Bar Summaries for Groups of Cases

Creates a chart summarizing the distribution of a single numeric variable within categories of another variable.

Select one variable and move it into the Variable field. This variable must be numeric.

Select one variable and move it into the Category Axis field. This variable may be numeric, string, or long string. Error bars for the variable are charted for each category on the Category Axis.

Select one of the alternatives from the Bars Represent group to choose whether the error bars represent Confidence interval for mean, Standard error of mean, or Standard deviation.

• If you have selected Confidence interval for mean, you can enter the desired confidence level into the Level text box.

• If you have selected either Standard error of mean or Standard deviation, you can choose a multiplier. Enter the value by which you want to multiply the statistic into Multiplier.

To panel the chart, move one or more categorical variables into the Panel By group. See the topic Paneled Charts for more information.

Related Topics

Obtaining Simple Error Bar Charts Summarizing Groups of Cases
Error Bar Charts
Simple Error Bar Summaries of Separate Variables
Clustered Error Bar Summaries for Groups of Cases
Clustered Error Bar Summaries of Separate Variables
GRAPH
Obtaining Error Bar Charts


Simple Error Bar Summaries of Separate Variables

Creates a chart summarizing the distribution of one or more numeric variables.

Select at least one numeric variable and move it into the Error Bars field. Error bars are charted for every variable in this field.

Select one of the alternatives from the Bars Represent group to choose whether the error bars represent Confidence interval for mean, Standard error of mean, or Standard deviation.

• If you have selected Confidence interval for mean, you can enter the desired confidence level into the Level text box.

• If you have selected either Standard error of mean or Standard deviation, you can choose a multiplier. Enter the value by which you want to multiply the statistic into Multiplier.

To panel the chart, move one or more categorical variables into the Panel By group. See the topic Paneled Charts for more information.

Related Topics

Obtaining Simple Error Bar Charts Summarizing Separate Variables
Error Bar Charts
Simple Error Bar Summaries for Groups of Cases
Clustered Error Bar Summaries for Groups of Cases
Clustered Error Bar Summaries of Separate Variables
GRAPH
Obtaining Error Bar Charts


Simple High-Low-Close Summaries for Groups of Cases

Creates a chart summarizing a single dichotomous or trichotomous variable within categories of another variable.

Select one variable and move it into the Category Axis field. This variable may be numeric, string, or long string.

High-low-close bars are charted for each category of this variable.

Select one variable and move it into the Define High-Low-Close By field. This variable may be numeric, string, or long string.

This variable defines the high and low values for the high-low-close bars and may also define a closing value for each case. This variable must be dichotomous if it defines only high and low values or trichotomous if it defines high, low, and closing values.

Select one of the alternatives in the Bars Represent group to specify how the data are represented on the scale axis.

If the scale axis displays a function of another summary variable, select Other statistic (e.g., mean) and then select a numeric variable to be summarized. To change the summary function, click Change Statistic.

To panel the chart, move one or more categorical variables into the Panel By group. See the topic Paneled Charts for more information.

Related Topics

Obtaining Simple High-Low Charts Summarizing Groups of Cases
High-Low Charts
Simple High-Low-Close Summaries of Separate Variables
Simple High-Low-Close Values of Individual Cases
Clustered High-Low-Close Summaries for Groups of Cases
Clustered High-Low-Close Summaries of Separate Variables
Clustered High-Low-Close Values of Individual Cases
Simple Range Bar Summaries for Groups of Cases
Simple Range Bar Summaries of Separate Variables
Simple Range Bar Values of Individual Cases
Clustered Range Bar Summaries for Groups of Cases
Clustered Range Bar Summaries of Separate Variables
Clustered Range Bar Values of Individual Cases
Difference Area Summaries for Groups of Cases
Difference Area Summaries of Separate Variables
Difference Area Values of Individual Cases
GRAPH
Obtaining High-Low, Difference Area, and Range Bar Charts


Simple High-Low-Close Values of Individual Cases

Creates a chart summarizing separate high and low (and optional close) variables for each case.

Select one variable representing the high for each case and move it into the High field. Select one variable representing the low for each case and move it into the Low field. These variables must be numeric.

You may also select a variable representing the closing value for each case and move it into the Close field.

Select one of the alternatives in the Category Labels group to label categories either by Case number or by Variable. If you select Variable, then you must select a variable from the target list and move it into the Variable field. This variable may be numeric, string, or long string.

To panel the chart, move one or more categorical variables into the Panel By group. See the topic Paneled Charts for more information.

Related Topics

Obtaining Simple High-Low Charts Showing Individual Cases
High-Low Charts
Simple High-Low-Close Summaries for Groups of Cases
Simple High-Low-Close Summaries of Separate Variables
Clustered High-Low-Close Summaries for Groups of Cases
Clustered High-Low-Close Summaries of Separate Variables
Clustered High-Low-Close Values of Individual Cases
Simple Range Bar Summaries for Groups of Cases
Simple Range Bar Summaries of Separate Variables
Simple Range Bar Values of Individual Cases
Clustered Range Bar Summaries for Groups of Cases
Clustered Range Bar Summaries of Separate Variables
Clustered Range Bar Values of Individual Cases
Difference Area Summaries for Groups of Cases
Difference Area Summaries of Separate Variables
Difference Area Values of Individual Cases
GRAPH
Obtaining High-Low, Difference Area, and Range Bar Charts


Simple High-Low-Close Summaries of Separate Variables

Creates a chart summarizing separate high and low (and optional close) variables within categories of another variable.

Select one variable representing the high value and move it into the High field. Select one variable representing the low value and move it into the Low field. These variables must be numeric.

You may also select a variable representing the closing value and move it into the Close field.

The function used to summarize the variable in the chart is displayed in the field next to the variable name.

To change the summary function for a variable, select the variable in the Bars Represent field and click Change Statistic.

You can select the same variable for High, Low, and Close and assign different summary functions to determine the high, low, and closing values.

Select a category variable and move it into the Category Axis field. This variable may be numeric, string, or long string.

To panel the chart, move one or more categorical variables into the Panel By group. See the topic Paneled Charts for more information.

Related Topics

Obtaining Simple High-Low Charts Summarizing Separate Variables
High-Low Charts
Simple High-Low-Close Summaries for Groups of Cases
Simple High-Low-Close Values of Individual Cases
Clustered High-Low-Close Summaries for Groups of Cases
Clustered High-Low-Close Summaries of Separate Variables
Clustered High-Low-Close Values of Individual Cases
Simple Range Bar Summaries for Groups of Cases
Simple Range Bar Summaries of Separate Variables
Simple Range Bar Values of Individual Cases
Clustered Range Bar Summaries for Groups of Cases
Clustered Range Bar Summaries of Separate Variables
Clustered Range Bar Values of Individual Cases
Difference Area Summaries for Groups of Cases
Difference Area Summaries of Separate Variables
Difference Area Values of Individual Cases
GRAPH
Obtaining High-Low, Difference Area, and Range Bar Charts


High-Low Charts

High-Low Charts allows you to make selections that determine the type of chart you obtain. Select the icon for the chart type you want and select the option under the Data in Chart Are group that best describes your data.

You can click on the icons below to browse examples of available chart types. If you find an example that looks like the chart you want, click on the How To button next to that example for specific instructions on how to create that chart.

Simple high-low-close
Clustered high-low-close
Difference area
Simple range bar
Clustered range bar

Related Topics

Obtaining High-Low, Difference Area, and Range Bar Charts
Simple High-Low-Close Summaries for Groups of Cases
Simple High-Low-Close Summaries of Separate Variables
Simple High-Low-Close Values of Individual Cases
Clustered High-Low-Close Summaries for Groups of Cases
Clustered High-Low-Close Summaries of Separate Variables
Clustered High-Low-Close Values of Individual Cases
Simple Range Bar Summaries for Groups of Cases
Simple Range Bar Summaries of Separate Variables
Simple Range Bar Values of Individual Cases
Clustered Range Bar Summaries for Groups of Cases
Clustered Range Bar Summaries of Separate Variables
Clustered Range Bar Values of Individual Cases
Difference Area Summaries for Groups of Cases
Difference Area Summaries of Separate Variables
Difference Area Values of Individual Cases
GRAPH


Histograms

Creates a histogram showing the distribution of a single numeric variable.

Select a numeric variable for Variable in the Histogram dialog box.

Select Display normal curve to display a normal curve on the histogram.

To panel the chart, move one or more categorical variables into the Panel By group. See the topic Paneled Charts for more information.

Click Titles to define lines of text to be placed at the top or bottom of the plot.

Related Topics

Obtaining Histograms
GRAPH


Simple Range Bar Summaries for Groups of Cases

Creates a chart summarizing a dichotomous variable within categories of another variable.

Select one variable and move it into the Category Axis field. Range bars are charted for each category of this variable. This variable may be numeric, string, or long string.

Select one dichotomous variable and move it into the Define 2 Groups By field. This variable defines the two groups that the bars represent. This variable may be numeric, string, or long string.

Select one of the alternatives in the Bars Represent group to specify how the data are represented on the scale axis.

If the scale axis displays a function of another summary variable, select Other statistic (e.g., mean) and then select a numeric variable to be summarized. To change the summary function, click Change Statistic.

To panel the chart, move one or more categorical variables into the Panel By group. See the topic Paneled Charts for more information.

Related Topics

Obtaining Simple Range Bar Charts Summarizing Groups of Cases
High-Low Charts
Simple High-Low-Close Summaries for Groups of Cases
Simple High-Low-Close Summaries of Separate Variables
Simple High-Low-Close Values of Individual Cases
Clustered High-Low-Close Summaries for Groups of Cases
Clustered High-Low-Close Summaries of Separate Variables
Clustered High-Low-Close Values of Individual Cases
Simple Range Bar Summaries of Separate Variables
Simple Range Bar Values of Individual Cases
Clustered Range Bar Summaries for Groups of Cases
Clustered Range Bar Summaries of Separate Variables
Clustered Range Bar Values of Individual Cases
Difference Area Summaries for Groups of Cases
Difference Area Summaries of Separate Variables
Difference Area Values of Individual Cases
GRAPH
Obtaining High-Low, Difference Area, and Range Bar Charts


Simple Range Bar Values of Individual Cases

Creates a chart summarizing a pair of numeric variables.

Select the two variables that the range bars represent and move them into the fields in the Bar Pair Represents group. These variables must be numeric.

The values of the two variables represent the top and bottom of each range bar.

Select one of the alternatives in the Category Labels group to label categories either by Case number or by Variable. If you select Variable, then you must select a variable from the target list and move it into the Variable field. This variable may be numeric, string, or long string.

To panel the chart, move one or more categorical variables into the Panel By group. See the topic Paneled Charts for more information.

Related Topics

Obtaining Simple Range Bar Charts Showing Individual Cases
High-Low Charts
Simple High-Low-Close Summaries for Groups of Cases
Simple High-Low-Close Summaries of Separate Variables
Simple High-Low-Close Values of Individual Cases
Clustered High-Low-Close Summaries for Groups of Cases
Clustered High-Low-Close Summaries of Separate Variables
Clustered High-Low-Close Values of Individual Cases
Simple Range Bar Summaries for Groups of Cases
Simple Range Bar Summaries of Separate Variables
Clustered Range Bar Summaries for Groups of Cases
Clustered Range Bar Summaries of Separate Variables
Clustered Range Bar Values of Individual Cases
Difference Area Summaries for Groups of Cases
Difference Area Summaries of Separate Variables
Difference Area Values of Individual Cases
GRAPH
Obtaining High-Low, Difference Area, and Range Bar Charts


Simple Range Bar Summaries of Separate Variables

Creates a chart summarizing a pair of numeric variables within categories of another variable.

You must select two variables and move them into the 1st and 2nd fields in the Bars Represent group. These variables must be numeric.

The function used to summarize the variable in the chart is displayed in the field next to the variable name.

To change the summary function for a variable, select the variable in the Bars Represent field and click Change Statistic.

Select a variable for the category axis and move it into the Category Axis field. This variable may be numeric, string, or long string.

To panel the chart, move one or more categorical variables into the Panel By group. See the topic Paneled Charts for more information.

Related Topics

Obtaining Simple Range Bar Charts Summarizing Separate Variables
High-Low Charts
Simple High-Low-Close Summaries for Groups of Cases
Simple High-Low-Close Summaries of Separate Variables
Simple High-Low-Close Values of Individual Cases
Clustered High-Low-Close Summaries for Groups of Cases
Clustered High-Low-Close Summaries of Separate Variables
Clustered High-Low-Close Values of Individual Cases
Simple Range Bar Summaries for Groups of Cases
Simple Range Bar Values of Individual Cases
Clustered Range Bar Summaries for Groups of Cases
Clustered Range Bar Summaries of Separate Variables
Clustered Range Bar Values of Individual Cases
Difference Area Summaries for Groups of Cases
Difference Area Summaries of Separate Variables
Difference Area Values of Individual Cases
GRAPH
Obtaining High-Low, Difference Area, and Range Bar Charts


Clustered High-Low-Close Summaries for Groups of Cases

Creates a chart summarizing two or three variables within clusters defined by a categorical variable. Each bar within a cluster is defined by a second categorical variable.

Select one variable representing the high value and move it into the High field. Select one variable representing the low value and move it into the Low field. These variables must be numeric.

You may also select a variable representing the closing value and move it into the Close field.

The function used to summarize the variable in the chart is displayed in the field next to the variable name.

To change the summary function for a variable, select the variable in the Bars Represent field and click Change Statistic.

You can select the same variable for High, Low, and Close and assign different summary functions to determine the high, low, and closing values.

Select a category variable and move it into the Category Axis field. This variable may be numeric, string, or long string.

Select a cluster variable used to group bars and move it into the Define Clusters By field. This variable must be numeric. Each cluster will consist of one bar for each value of the cluster variable at every level of the category variable.

To panel the chart, move one or more categorical variables into the Panel By group. See the topic Paneled Charts for more information.

Related Topics

Obtaining Clustered High-Low Charts Summarizing Groups of Cases
High-Low Charts
Simple High-Low-Close Summaries for Groups of Cases
Simple High-Low-Close Summaries of Separate Variables
Simple High-Low-Close Values of Individual Cases
Clustered High-Low-Close Summaries of Separate Variables
Clustered High-Low-Close Values of Individual Cases
Simple Range Bar Summaries for Groups of Cases
Simple Range Bar Summaries of Separate Variables
Simple Range Bar Values of Individual Cases
Clustered Range Bar Summaries for Groups of Cases
Clustered Range Bar Summaries of Separate Variables
Clustered Range Bar Values of Individual Cases
Difference Area Summaries for Groups of Cases
Difference Area Summaries of Separate Variables
Difference Area Values of Individual Cases
GRAPH
Obtaining High-Low, Difference Area, and Range Bar Charts


Clustered High-Low-Close Values of Individual Cases

Creates a chart summarizing two or more variable sets (pairs or triplets) for each case. Each variable set defines a high-low-close bar within a cluster.

You must define at least two variable sets from which to form clusters. Each variable set is composed of a high variable and a low variable and may also contain a close variable.

To define variable sets, select one variable representing the high value and move it into the High field. Select one variable representing the low value and move it into the Low field. These variables must be numeric.

You may also select a variable representing the closing value and move it into the Close field.

Click Next to define another variable set.

Select one of the alternatives in the Category Labels group to label categories either by Case number or by Variable. If you select Variable, then you must select a variable from the target list and move it into the Variable field. This variable may be numeric, string, or long string.

To panel the chart, move one or more categorical variables into the Panel By group. See the topic Paneled Charts for more information.

Related Topics

Obtaining Clustered High-Low Charts Showing Individual Cases
High-Low Charts
Simple High-Low-Close Summaries for Groups of Cases
Simple High-Low-Close Summaries of Separate Variables
Simple High-Low-Close Values of Individual Cases
Clustered High-Low-Close Summaries for Groups of Cases
Clustered High-Low-Close Summaries of Separate Variables
Simple Range Bar Summaries for Groups of Cases
Simple Range Bar Summaries of Separate Variables
Simple Range Bar Values of Individual Cases
Clustered Range Bar Summaries for Groups of Cases
Clustered Range Bar Summaries of Separate Variables
Clustered Range Bar Values of Individual Cases
Difference Area Summaries for Groups of Cases
Difference Area Summaries of Separate Variables
Difference Area Values of Individual Cases
GRAPH
Obtaining High-Low, Difference Area, and Range Bar Charts


Clustered High-Low-Close Summaries of Separate Variables

Creates a chart summarizing two or more variable sets (either pairs or triplets) within clusters defined by a categorical variable. Each bar within a cluster represents one of the variable sets.

You must define at least two variable sets that define the high-low-close bars within each cluster.

Select one variable representing the high value and move it into the High field. Select one variable representing the low value and move it into the Low field. These variables must be numeric.

You may also select a variable representing the closing value and move it into the Close field.

Click Next to define another variable set.

The function used to summarize the variable in the chart is displayed in the field next to the variable name.

To change the summary function for a variable, select the variable in the Bars Represent field and click Change Statistic.

You can select the same variable for High, Low, and Close and assign different summary functions to determine the high, low, and closing values.

Select a category variable and move it into the Category Axis field. This variable may be numeric, string, or long string.

To panel the chart, move one or more categorical variables into the Panel By group. See the topic Paneled Charts for more information.

Related Topics

Obtaining Clustered High-Low Charts Summarizing Separate Variables
High-Low Charts
Simple High-Low-Close Summaries for Groups of Cases
Simple High-Low-Close Summaries of Separate Variables
Simple High-Low-Close Values of Individual Cases
Clustered High-Low-Close Summaries for Groups of Cases
Clustered High-Low-Close Values of Individual Cases
Simple Range Bar Summaries for Groups of Cases
Simple Range Bar Summaries of Separate Variables
Simple Range Bar Values of Individual Cases
Clustered Range Bar Summaries for Groups of Cases
Clustered Range Bar Summaries of Separate Variables
Clustered Range Bar Values of Individual Cases
Difference Area Summaries for Groups of Cases
Difference Area Summaries of Separate Variables
Difference Area Values of Individual Cases
GRAPH
Obtaining High-Low, Difference Area, and Range Bar Charts


Drop-Line Summaries for Groups of Cases

Creates a chart summarizing categories of one variable within categories of another.

Select a variable for the category axis and move it into the Category Axis field. This variable may be numeric, string, or long string.

Select one of the alternatives in the Points Represent group to specify how the data are represented on the scale axis.

If the scale axis displays a function of another summary variable, select Other statistic (e.g., mean) and then select a numeric variable to be summarized. To change the summary function, click Change Statistic.

To define lines, you must select a variable and move it into the Define Points By field. Markers are generated for each category of the line variable, with vertical lines connecting the markers within each group. This variable may be numeric, string, or long string.

To panel the chart, move one or more categorical variables into the Panel By group. See the topic Paneled Charts for more information.

Related Topics

Obtaining Drop-Line Charts Summarizing Groups of Cases
Line Charts
Simple Line Summaries for Groups of Cases
Simple Line Summaries of Separate Variables
Simple Line Values of Individual Cases
Multiple Line Summaries for Groups of Cases
Multiple Line Summaries of Separate Variables
Multiple Line Values of Individual Cases
Drop-Line Summaries of Separate Variables
Drop-Line Values of Individual Cases
GRAPH
Obtaining Simple, Multiple, or Drop-Line Charts


Drop-Line Values of Individual Cases

Creates a chart summarizing two or more variables for each case.

Select at least two variables and move them into the Points Represent field. These variables must be numeric.

Markers are generated for each variable in this field, with vertical lines connecting the markers within each case.

Select one of the alternatives in the Category Labels group to label categories either by Case number or by Variable. If you select Variable, then you must select a variable from the target list and move it into the Variable field. This variable may be numeric, string, or long string.

To panel the chart, move one or more categorical variables into the Panel By group. See the topic Paneled Charts for more information.

Related Topics

Obtaining Drop-Line Charts Showing Individual Cases
Line Charts
Simple Line Summaries for Groups of Cases
Simple Line Summaries of Separate Variables
Simple Line Values of Individual Cases
Multiple Line Summaries for Groups of Cases
Multiple Line Summaries of Separate Variables
Multiple Line Values of Individual Cases
Drop-Line Summaries for Groups of Cases
Drop-Line Summaries of Separate Variables
GRAPH
Obtaining Simple, Multiple, or Drop-Line Charts


Drop-Line Summaries of Separate Variables

Creates a chart summarizing two or more variables within categories of another variable.

Select at least two variables and move them into the Points Represent field. These variables must be numeric.

Markers are generated for each variable in this field, with vertical lines connecting the markers within each variable.

The function used to summarize the variable in the chart is displayed in the field.

Click Change Statistic to define the function used to summarize the variables for the chart.

Select a category variable and move it into the Category Axis field. This variable may be numeric, string, or long string.

To panel the chart, move one or more categorical variables into the Panel By group. See the topic Paneled Charts for more information.

Related Topics

Obtaining Drop-Line Charts Summarizing Separate Variables
Line Charts
Simple Line Summaries for Groups of Cases
Simple Line Summaries of Separate Variables
Simple Line Values of Individual Cases
Multiple Line Summaries for Groups of Cases
Multiple Line Summaries of Separate Variables
Multiple Line Values of Individual Cases
Drop-Line Summaries for Groups of Cases
Drop-Line Values of Individual Cases
GRAPH
Obtaining Simple, Multiple, or Drop-Line Charts


Line Charts

Line Charts allows you to make selections that determine the type of chart you obtain. Select the icon for the chart type you want and select the option under the Data in Chart Are group that best describes your data.

You can click on the icons below to browse examples of available chart types. If you find an example that looks like the chart you want, click on the How To button next to that example for specific instructions on how to obtain that chart.

Simple
Multiple
Drop-line

Related Topics

Obtaining Simple, Multiple, or Drop-Line Charts
Simple Line Summaries for Groups of Cases
Simple Line Summaries of Separate Variables
Simple Line Values of Individual Cases
Multiple Line Summaries for Groups of Cases
Multiple Line Summaries of Separate Variables
Multiple Line Values of Individual Cases
Drop-Line Summaries for Groups of Cases
Drop-Line Summaries of Separate Variables
Drop-Line Values of Individual Cases
GRAPH


Multiple Line Summaries for Groups of Cases

Creates a chart summarizing categories of one variable within categories of another.

Select a variable for the category axis and move it into the Category Axis field. This variable may be numeric, string, or long string.

Select one of the alternatives in the Lines Represent group to specify how the data are represented on the scale axis.

If the scale axis displays a function of another summary variable, select Other statistic (e.g., mean) and then select a numeric variable to be summarized. To change the summary function, click Change Statistic.

To define lines, you must select a variable and move it into the Define Lines By field. Separate lines are generated for each category of the line variable. This variable may be numeric, string, or long string.

To panel the chart, move one or more categorical variables into the Panel By group. See the topic Paneled Charts for more information.

Related Topics

Obtaining Multiple Line Charts Summarizing Groups of Cases
Line Charts
Simple Line Summaries for Groups of Cases
Simple Line Summaries of Separate Variables
Simple Line Values of Individual Cases
Multiple Line Summaries of Separate Variables
Multiple Line Values of Individual Cases
Drop-Line Summaries for Groups of Cases
Drop-Line Summaries of Separate Variables
Drop-Line Values of Individual Cases
GRAPH
Obtaining Simple, Multiple, or Drop-Line Charts


Multiple Line Values of Individual Cases

Creates a chart summarizing two or more variables for each case.

Select at least two variables and move them into the Lines Represent field. A separate line is generated for each variable in this field. These variables must be numeric.

Select one of the alternatives in the Category Labels group to label categories either by Case number or by Variable. If you select Variable, then you must select a variable from the target list and move it into the Variable field. This variable may be numeric, string, or long string.

To panel the chart, move one or more categorical variables into the Panel By group. See the topic Paneled Charts for more information.

Related Topics

Obtaining Multiple Line Charts Showing Individual Cases
Line Charts
Simple Line Summaries for Groups of Cases
Simple Line Summaries of Separate Variables
Simple Line Values of Individual Cases
Multiple Line Summaries for Groups of Cases
Multiple Line Summaries of Separate Variables
Drop-Line Summaries for Groups of Cases
Drop-Line Summaries of Separate Variables
Drop-Line Values of Individual Cases
GRAPH
Obtaining Simple, Multiple, or Drop-Line Charts


Multiple Line Summaries of Separate Variables

Creates a chart summarizing two or more variables within categories of another variable.

Select at least two variables and move them into the Lines Represent field. A separate line is generated for each variable in this field. These variables must be numeric.

The function used to summarize the variable in the chart is displayed in the field.

Click Change Statistic to define the function used to summarize the variables for the chart.

Select a category variable and move it into the Category Axis field. This variable may be numeric, string, or long string.

To panel the chart, move one or more categorical variables into the Panel By group. See the topic Paneled Charts for more information.

Related Topics

Obtaining Multiple Line Charts Summarizing Separate Variables
Line Charts
Simple Line Summaries for Groups of Cases
Simple Line Summaries of Separate Variables
Simple Line Values of Individual Cases
Multiple Line Summaries for Groups of Cases
Multiple Line Values of Individual Cases
Drop-Line Summaries for Groups of Cases
Drop-Line Summaries of Separate Variables
Drop-Line Values of Individual Cases
GRAPH
Obtaining Simple, Multiple, or Drop-Line Charts


Simple Line Summaries for Groups of Cases

Creates a chart summarizing categories of a single variable.

Select a variable for the category axis and move it into the Category Axis field. This variable may be numeric, string, or long string.

Select one of the alternatives in the Line Represents group to specify how the data are represented on the scale axis.

If the scale axis displays a function of another summary variable, select Other statistic (e.g., mean) and then select a numeric variable to be summarized. To change the summary function, click Change Statistic.

To panel the chart, move one or more categorical variables into the Panel By group. See the topic Paneled Charts for more information.

Related Topics

Obtaining Simple Line Charts Summarizing Groups of Cases
Line Charts
Simple Line Summaries of Separate Variables
Simple Line Values of Individual Cases
Multiple Line Summaries for Groups of Cases
Multiple Line Summaries of Separate Variables
Multiple Line Values of Individual Cases
Drop-Line Summaries for Groups of Cases
Drop-Line Summaries of Separate Variables
Drop-Line Values of Individual Cases
GRAPH
Obtaining Simple, Multiple, or Drop-Line Charts


Simple Line Values of Individual Cases

Creates a chart summarizing a single variable by individual case.

Select one variable and move it into the Line Represents field. This variable must be a numeric variable.

Select one of the alternatives in the Category Labels group to label categories either by Case number or by Variable. If you select Variable, then you must select a variable from the target list and move it into the Variable field. This variable may be numeric, string, or long string.

To panel the chart, move one or more categorical variables into the Panel By group. See the topic Paneled Charts for more information.

Related Topics

Obtaining Simple Line Charts Showing Individual Cases
Line Charts
Simple Line Summaries for Groups of Cases
Simple Line Summaries of Separate Variables
Multiple Line Summaries for Groups of Cases
Multiple Line Summaries of Separate Variables
Multiple Line Values of Individual Cases
Drop-Line Summaries for Groups of Cases
Drop-Line Summaries of Separate Variables
Drop-Line Values of Individual Cases
GRAPH
Obtaining Simple, Multiple, or Drop-Line Charts


Simple Line Summaries of Separate Variables

Creates a chart summarizing two or more variables.

Select at least two variables and move them into the Line Represents field. These variables must be numeric.

The function used to summarize the variable in the chart is displayed in the field.

To change the summary function for a variable, select the variable in the Line Represents field and click Change Statistic.

To panel the chart, move one or more categorical variables into the Panel By group. See the topic Paneled Charts for more information.

Related Topics

Obtaining Simple Line Charts Summarizing Separate Variables
Line Charts
Simple Line Summaries for Groups of Cases
Simple Line Values of Individual Cases
Multiple Line Summaries for Groups of Cases
Multiple Line Summaries of Separate Variables
Multiple Line Values of Individual Cases
Drop-Line Summaries for Groups of Cases
Drop-Line Summaries of Separate Variables
Drop-Line Values of Individual Cases
GRAPH
Obtaining Simple, Multiple, or Drop-Line Charts


P-P Plot

probability plots,probability plots,probability plots
probability plots,probability plots,probability plots
P-P,P-P,P-P
P-P probability plots,P-P probability plots,P-P probability plots
normal probability plots,normal probability plots,normal probability plots
normal probability plots,normal probability plots,normal probability plots
P-P,P-P,P-P
charts,charts,charts
probability plots,probability plots,probability plots
Plots a variable's cumulative proportions against the cumulative proportions of any of a number of test distributions. Probability plots are generally used to determine whether the distribution of a variable matches a given distribution. If the selected variable matches the test distribution, the points cluster around a straight line.

Available test distributions include beta, chi-square, exponential, gamma, half-normal, Laplace, Logistic, Lognormal, normal, pareto, Student's t, Weibull, and uniform. Depending on the distribution selected, you can specify degrees of freedom and other parameters.

• You obtain probability plots for transformed values. Transformation options include natural log, standardize values, difference, and seasonally difference.

• You can specify the method for calculating expected distributions and for resolving "ties" (multiple observations with the same value).

Related Topics

Obtaining P-P Probability Plots
Q-Q Plot
Normal Distribution Methods Used in Different Procedures
PPLOT


Q-Q Plot

probability plots,probability plots,probability plots
probability plots,probability plots,probability plots
Q-Q,Q-Q,Q-Q
Q-Q probability plots,Q-Q probability plots,Q-Q probability plots
normal probability plots,normal probability plots,normal probability plots
normal probability plots,normal probability plots,normal probability plots
Q-Q,Q-Q,Q-Q
charts,charts,charts
probability plots,probability plots,probability plots
Plots the quantiles of a variable's distribution against the quantiles of any of a number of test distributions. Probability plots are generally used to determine whether the distribution of a variable matches a given distribution. If the selected variable matches the test distribution, the points cluster around a straight line.

Available test distributions include beta, chi-square, exponential, gamma, half-normal, Laplace, Logistic, Lognormal, normal, pareto, Student's t, Weibull, and uniform. Depending on the distribution selected, you can specify degrees of freedom and other parameters.

• You obtain probability plots for transformed values. Transformation options include natural log, standardize values, difference, and seasonally difference.

• You can specify the method for calculating expected distributions and for resolving "ties" (multiple observations with the same value).

Related Topics

Obtaining Q-Q Probability Plots
P-P Plot
Normal Distribution Methods Used in Different Procedures
PPLOT


Pareto Charts

pareto charts,pareto charts,pareto charts
charts,charts,charts
pareto,pareto,pareto

Pareto Charts allows you to make selections that determine the type of chart you obtain. Select the icon for the chart type you want and select the option under the Data in Chart Are group that best describes your data.

You can click on the icons below to browse examples of available chart types. If you find an example that looks like the chart you want, click on the How To button next to that example for specific instructions on how to create that chart.

Simple
Stacked

Related Topics

Obtaining Simple and Stacked Pareto Charts
Simple Pareto Counts or Sums for Groups of Cases
Simple Pareto Sums of Separate Variables
Simple Pareto Values of Individual Cases
Stacked Pareto Counts or Sums for Groups of Cases
Stacked Pareto Sums of Separate Variables
Stacked Pareto Values of Individual Cases
GRAPH


Pie Charts

Pie Charts allows you to specify how data are represented in the chart. Select the option under the Data in Chart Are group that best describes your data.

You can click on the icons below to browse examples of available chart types. If you find an example that looks like the chart you want, click on the How To button next to that example for specific instructions on how to create that chart.

Examples

Related Topics

Obtaining Pie Charts
Pie Summaries for Groups of Cases
Pie Summaries of Separate Variables
Pie Values of Individual Cases
GRAPH


Pie Summaries for Groups of Cases

Creates a chart summarizing categories of a single variable.

Select a variable and move it into the Define Slices By field. This variable may be numeric, string, or long string.

One slice is generated for each category of the slice variable.

Select one of the alternatives in the Slices Represent group to specify how the data are represented in the sections of the pie chart.

To display the sum of a variable, select Sum of Variable, and then select the variable and move it into the Variable field. This variable must be numeric.

To panel the chart, move one or more categorical variables into the Panel By group. See the topic Paneled Charts for more information.

Related Topics

Obtaining Pie Charts Summarizing Groups of Cases
Pie Charts
Pie Summaries of Separate Variables
Pie Values of Individual Cases
GRAPH
Obtaining Pie Charts


Pie Values of Individual Cases

Creates a chart summarizing a single variable by individual case.

Select one variable and move it into the Slices Represent field. This variable must be numeric.

Select one of the alternatives in the Slice Labels group to label slices either by Case number or by Variable. If you select Variable, then you must select a variable from the target list and move it into the Variable field. This variable may be numeric, string, or long string.

To panel the chart, move one or more categorical variables into the Panel By group. See the topic Paneled Charts for more information.

Related Topics

Obtaining Pie Charts Showing Individual Cases
Pie Charts
Pie Summaries for Groups of Cases
Pie Summaries of Separate Variables
GRAPH
Obtaining Pie Charts


Pie Summaries of Separate Variables

Creates a chart summarizing two or more variables.

Select at least two variables and move them into the Slices field. These variables must be numeric.

The function used to summarize each variable in the graph is displayed in the field.

To panel the chart, move one or more categorical variables into the Panel By group. See the topic Paneled Charts for more information.

Related Topics

Obtaining Pie Charts Summarizing Separate Variables
Pie Charts
Pie Summaries for Groups of Cases
Pie Values of Individual Cases
GRAPH
Obtaining Pie Charts


Chart Options

The chart options that are available depend on the chart type and the data.

Missing Values. These options are available only when the new chart will display or summarize more than one variable (not including variables that define groups):

• Exclude cases listwise excludes a case from the entire chart if it has a missing value for any of the variables summarized.

• Exclude cases variable by variable excludes a case separately from each summary statistic calculated. Different chart elements may be based on different groups of cases.

Display groups defined by missing values. This option is available only when you use a categorical variable to define groups for a new chart. If selected, each missing value for the grouping variable (including the system-missing value) will appear as a separate group in the chart. If not, cases with system-missing or user-missing values for the grouping variable are excluded from the chart.

Display chart with case labels. This option is available only when you are defining a scatterplot and have specified a variable for Label Cases By field in the main dialog box. If selected, the value labels (or values if labels are not defined) of the specified variable are displayed in the chart as point labels.

Display error bars. This option is available only for simple categorical charts in which the area, bars, or lines in the chart represent a mean, median, count, or percent. Error bars are not available for 3-D charts. For means, you can choose to display confidence intervals around category means, plus and minus n times the variable standard deviation or plus and minus n times the standard error of the mean. For medians, counts, and percentages, only confidence intervals are available.

All confidence intervals are individual intervals, with coverage levels (based on the specified alpha) applying to individual categories, not the set of all categories in the chart simultaneously. For counts and percentages, the intervals are based on binomial intervals for the proportions of each category of the total over all categories, appropriately rescaled to the count or percentage metric. Note that the confidence intervals for counts, medians, and percentages are generally not symmetric around the statistic.

Related Topics

Dot Plot Options
Chart Titles (Creating Charts)
Population Pyramids
Obtaining Population Pyramids
Scale Options for Population Pyramids


Scale Axis Summary Function

Select one of the summary function alternatives. The summary function applies to the variable on the scale axis.

Expand Show details Collapse Hide details

• Mean. A measure of central tendency. The arithmetic average, the sum divided by the number of cases.

• Median. The value above and below which half of the cases fall, the 50th percentile. If there is an even number of cases, the median is the average of the two middle cases when they are sorted in ascending or descending order. The median is a measure of central tendency not sensitive to outlying values (unlike the mean, which can be affected by a few extremely high or low values).

• Mode. The most frequently occurring value. If several values share the greatest frequency of occurrence, each of them is a mode.

• Number of cases. The number of cases (observations or records).

• Sum. The sum or total of the values, across all cases with nonmissing values.

• Standard Deviation. A measure of dispersion around the mean. In a normal distribution, 68% of cases fall within one standard deviation of the mean and 95% of cases fall within two standard deviations. For example, if the mean age is 45, with a standard deviation of 10, 95% of the cases would be between 25 and 65 in a normal distribution.

• Variance. A measure of dispersion around the mean, equal to the sum of squared deviations from the mean divided by one less than the number of cases. The variance is measured in units that are the square of those of the variable itself.

• Minimum. The smallest value of a numeric variable.

• Maximum. The largest value of a numeric variable.

• Cumulative Sum. A transformation which replaces each value by the cumulative sum of the existing series. This is the inverse function of first-order differencing.

The group in the center of the dialog box allows you to specify a value. The value graphed represents the percentage or number of cases above or below the specified value. Type the value into the Value text box and select one of the following alternatives: Percentage above, Percentage below, Percentile, Number above, or Number below.

The next group allows you to specify two values. The value graphed represents the percentage or number of cases falling in the interval between the specified values. Type the lower of the two values into the Low text box and type the higher of the two values into the High text box. Select one of the following alternatives:

• Percentage inside graphs. The percentage of cases of the summary variable falling inside the specified interval for each value of the category variable.

• Number inside graphs. The number of cases of the summary variable falling inside the specified interval for each value of the category variable.

The Values are grouped midpoints check box is available only when you request Median of values or Percentile. When this option is selected, the median or percentile is calculated as if the values were uniformly distributed over the whole interval.

Related Topics

Specifying the Scale Axis Summary Function


Chart Titles (Creating Charts)

Titles allows you to specify text to be placed at the top or bottom of a chart. The line title and subtitle appear on the top of the chart, and the footnote appears on the bottom of the chart. Each line of the title, subtitle, and footnote may contain up to 72 characters.

None of these fields is required. You may choose to leave any or all of them blank.

Special considerations for split or weighted data files:

• Split File (from Data menu). Subtitles (not shown in this dialog box) indicate, for each chart, the values of the splitting variable(s). If you specify a subtitle, split-file identification does not appear on the charts.

• Weighted File (from Data menu). A footnote (not shown in this dialog box) indicates that the chart represents weighted data. If you specify a footnote, the default weighting footnote does not appear on the chart.

You can also add titles and footnotes to charts by editing the chart after it appears in the Output Navigator.

Related Topics

Specifying Chart Titles
Chart Options
Dot Plot Options


3-D Scatterplots

Plots three numeric variables in three dimensions.

Select one variable for the y axis, one for the x axis, and one for the z axis. These variables must be numeric but should not be in date format.

To panel the chart, move one or more categorical variables into the Panel By group. See the topic Paneled Charts for more information.

Click Titles to define lines of text to be placed at the top or bottom of the plot.

Related Topics

Obtaining 3-D Scatterplots
Scatterplots
Simple Scatterplots
Overlay Scatterplots
Scatterplot Matrix
GRAPH
Obtaining Scatterplots
Simple Dot Plots


Scatterplots

Scatterplots allows you to specify the type of scatterplot you want.

You can click on the icons below to browse examples of available chart types. If you find an example that looks like the chart you want, click on the How To button next to that example for specific instructions on how to create that chart.

Simple
Overlay
Matrix
3-D
Simple Dot

Related Topics

Obtaining Scatterplots
Simple Scatterplots
Overlay Scatterplots
Scatterplot Matrix
3-D Scatterplots
Simple Dot Plots
GRAPH
XGRAPH


Sequence Charts

sequence charts,sequence charts,sequence charts
sequence charts,sequence charts,sequence charts
transforming values,transforming values,transforming values
case plots,case plots,case plots
time series,time series,time series
time series,time series,time series
sequence charts,sequence charts,sequence charts
Plots cases in sequence. This procedure requires that you have either time series data or other data where cases are sorted in meaningful order.

Select one or more numeric variables and move them onto the Variables field.

You can select a categorical variable and move it into the Time Axis Labels field. This variable may be numeric, string, or long string. The values of this variable are used to label the time axis.

You can transform your data by selecting Natural log transform, Difference, or Seasonally difference from the Transform group.

If you select either Difference or Seasonally difference, enter the degree of differencing in the text box next to the selection. This number must be a positive integer. The current periodicity is displayed beneath these options. These options are meaningful only for time series, or similar, data.

Select One chart per variable to generate a separate chart for each variable on the Variables field. If you do not select this option, all variables are plotted on the same chart.

Click Time Lines to define reference lines for the time axis.

Click Format to define which axis displays time, whether the chart is a line or area chart, and whether to display a reference line at the mean of the series.

Related Topics

Obtaining Sequence Charts
Sequence Charts Format
Sequence Charts Time Axis Reference Lines
Autocorrelations
Cross-Correlations
Spectral Plots
CASEPLOT
TSPLOT


Sequence Charts Format

sequence charts,sequence charts,sequence charts
sequence charts,sequence charts,sequence charts
swapping axes,swapping axes,swapping axes
sequence charts,sequence charts,sequence charts
reference lines,reference lines,reference lines
sequence charts,sequence charts,sequence charts
multiple variables,multiple variables,multiple variables

Select Time on horizontal axis to produce a plot with time values on the horizontal axis and series values on the vertical axis. Deselect it for a plot with time values on the vertical axis and series values on the horizontal axis.

If you have selected only one variable, or if you have selected One chart per variable, then select one of the Single Variable Chart(s) options to display either a line chart or an area chart.

Select Reference line at mean of series to plot a reference line indicating the series mean.

If you are displaying multiple variables on the chart, you can select Connect cases between variables to plot the values for each series and join together the values for each observation by a line.

Related Topics

Specifying Format Options for Sequence Charts
Sequence Charts
Obtaining Sequence Charts
Sequence Charts Time Axis Reference Lines


Sequence Charts Time Axis Reference Lines

sequence charts,sequence charts,sequence charts
sequence charts,sequence charts,sequence charts
time axis reference lines,time axis reference lines,time axis reference lines

Select one of the options to display no reference lines, lines at each change of a reference variable, or line at date.

If you select Line at each change of, you must select a Reference Variable. The variable list displays all variables in your file, except those that have already been selected in the main dialog box. A reference line is displayed each time the value of the reference variable changes across the series.

Line at date allows you to display a single reference line at a particular point, defined either by date or by observation number.

• If you have defined dates, all date IDs that you defined with Define Dates are displayed. Enter the date at which you want to display a reference line.

• If you have not defined dates, enter the observation number at which you want to display a reference line.

Related Topics

Adding Time Axis Reference Lines to Sequence Charts
Sequence Charts
Obtaining Sequence Charts
Sequence Charts Format


Scatterplot Matrix

Plots all possible combinations of two or more numeric variables against one another.

Select at least two Matrix Variables. These variables must be numeric but should not be in date format.

You may select a variable and move it into the Set Markers By field. Each value of this variable is marked by a different symbol on the scatterplot. This variable may be numeric or string.

You can select a numeric or a string variable and move it into the Label Cases By field. You can label points on the plot with this variable.

• If selected, the value labels (or values if no labels are defined) of this variable are used as point labels.

• If you do not select a variable to label cases by, case numbers can be used to label outliers and extremes.

To panel the chart, move one or more categorical variables into the Panel By group. See the topic Paneled Charts for more information.

Click Options to specify the treatment of missing values in your data and control whether labels are to be displayed for points on the plot.

Click Titles to define lines of text to be placed at the top or bottom of the plot.

Related Topics

Obtaining a Scatterplot Matrix
Scatterplots
Simple Scatterplots
Overlay Scatterplots
3-D Scatterplots
GRAPH
Obtaining Scatterplots
Simple Dot Plots


Overlay Scatterplots

Plots two or more variable pairs.

Select at least two pairs of variables.

Variables should be numeric but should not be in date format.

You can select a numeric or a string variable and move it into the Label Cases By field. You can label points on the plot with this variable.

• If selected, the value labels (or values if no labels are defined) of this variable are used as point labels.

• If you do not select a variable to label cases by, case numbers can be used to label outliers and extremes.

To panel the chart, move one or more categorical variables into the Panel By group. See the topic Paneled Charts for more information.

Click Options to specify the treatment of missing values in your data and control whether labels are to be displayed for points on the plot.

Click Titles to define lines of text to be placed at the top or bottom of the plot.

Related Topics

Obtaining Overlay Scatterplots
Scatterplots
Simple Scatterplots
Scatterplot Matrix
3-D Scatterplots
GRAPH
Obtaining Scatterplots
Simple Dot Plots


Simple Scatterplots

Plots two numeric variables against each other.

You must select a variable for the y axis and a variable for the x axis. These variables must be numeric but should not be in date format.

You can select a variable and move it into the Set Markers By field. Each value of this variable is marked by a different symbol on the scatterplot. This variable may be numeric or string.

You can select a numeric or a string variable and move it into the Label Cases By field. You can label points on the plot with this variable.

• If selected, the value labels (or values if no labels are defined) of this variable are used as point labels.

• If you do not select a variable to label cases by, case numbers can be used to label outliers and extremes.

To panel the chart, move one or more categorical variables into the Panel By group. See the topic Paneled Charts for more information.

Click Options to specify the treatment of missing values in your data and control whether labels are to be displayed for points on the plot.

Click Titles to define lines of text to be placed at the top or bottom of the plot.

Related Topics

Obtaining Simple Scatterplots
Scatterplots
Overlay Scatterplots
Scatterplot Matrix
3-D Scatterplots
GRAPH
Obtaining Scatterplots
Simple Dot Plots


Simple Pareto Counts or Sums for Groups of Cases

pareto charts,pareto charts,pareto charts
pareto charts,pareto charts,pareto charts
simple,simple,simple
Creates a bar chart summarizing categories of a single variable, sorted in descending order. A line shows the cumulative sum. (Click for example.)

Select a variable for the category axis and move it into the Category Axis field. This variable may be numeric, string, or long string.

Select one of the alternatives in the Bars Represent group to specify how the data are represented on the scale axis.

If the scale axis displays counts of the category variable itself, select Counts.

If the scale axis displays the sum of another summary variable, select Sums of variable and then select the variable and move it into the Sums of Variable field. This variable must be numeric.

To panel the chart, move one or more categorical variables into the Panel By group. See the topic Paneled Charts for more information.

Note: Because each panel has the same values on the categorical axis, bars in a paneled pareto chart are not arranged in descending order for each panel. The bars are arranged in descending order based on the overall count for each category.

Related Topics

Obtaining Simple Pareto Charts Showing Counts or Sums for Groups of Cases
Pareto Charts
Simple Pareto Sums of Separate Variables
Simple Pareto Values of Individual Cases
Stacked Pareto Counts or Sums for Groups of Cases
Stacked Pareto Sums of Separate Variables
Stacked Pareto Values of Individual Cases
GRAPH
Obtaining Simple and Stacked Pareto Charts


Simple Pareto Values of Individual Cases

pareto charts,pareto charts,pareto charts
pareto charts,pareto charts,pareto charts
simple,simple,simple
Creates a bar chart summarizing two or more variables, with bars sorted in descending order. A line plots the cumulative sum. (Click for example.)

Select one variable and move it into the Values field. This variable must be a numeric variable.

Select one of the alternatives in the Category Labels group to label categories either by Case number or by Variable. If you select Variable, then you must select a variable from the target list and move it into the Variable field. This variable may be numeric, string, or long string.

To panel the chart, move one or more categorical variables into the Panel By group. See the topic Paneled Charts for more information.

Note: Because each panel has the same values on the categorical axis, bars in a paneled pareto chart are not arranged in descending order for each panel. The bars are arranged in descending order based on the overall count for each category.

Related Topics

Obtaining Simple Pareto Charts Showing Individual Cases
Pareto Charts
Simple Pareto Counts or Sums for Groups of Cases
Simple Pareto Sums of Separate Variables
Stacked Pareto Counts or Sums for Groups of Cases
Stacked Pareto Sums of Separate Variables
Stacked Pareto Values of Individual Cases
GRAPH
Obtaining Simple and Stacked Pareto Charts


Simple Pareto Sums of Separate Variables

pareto charts,pareto charts,pareto charts
pareto charts,pareto charts,pareto charts
simple,simple,simple
Creates a bar chart summarizing two or more variables, with bars sorted in descending order. A line shows the cumulative sum. (Click for example.)

Select at least two variables and move them into the Variables field. These variables must be numeric.

To panel the chart, move one or more categorical variables into the Panel By group. See the topic Paneled Charts for more information.

Note: Because each panel has the same values on the categorical axis, bars in a paneled pareto chart are not arranged in descending order for each panel. The bars are arranged in descending order based on the overall count for each category.

Related Topics

Obtaining Simple Pareto Charts Showing Sums of Separate Variables
Pareto Charts
Simple Pareto Counts or Sums for Groups of Cases
Simple Pareto Values of Individual Cases
Stacked Pareto Counts or Sums for Groups of Cases
Stacked Pareto Sums of Separate Variables
Stacked Pareto Values of Individual Cases
GRAPH
Obtaining Simple and Stacked Pareto Charts


Stacked Pareto Counts or Sums for Groups of Cases

pareto charts,pareto charts,pareto charts
pareto charts,pareto charts,pareto charts
stacked,stacked,stacked
stacked pareto charts,stacked pareto charts,stacked pareto charts
stacked pareto charts,stacked pareto charts,stacked pareto charts
counts of sums for groups of cases,counts of sums for groups of cases,counts of sums for groups of cases
Creates a bar chart summarizing categories of one variable within categories of another, with bars sorted in descending order. A line plots the cumulative sum. (Click for example.)

Select a variable for the category axis and move it into the Category Axis field. This variable may be numeric, string, or long string.

Select one of the alternatives in the Bars Represent group to specify how the data are represented on the scale axis.

If the scale axis displays counts of the category variable itself, select Counts.

If the scale axis displays the sum of another summary variable, select Sums of variable and then select the summarized variable and move it into the Sums of Variable field. This variable must be numeric.

You must select a variable to define stacks and move it into the Define Stacks By field. Separate stacks are generated for each category of the variable. This variable may be numeric, string, or long string.

To panel the chart, move one or more categorical variables into the Panel By group. See the topic Paneled Charts for more information.

Note: Because each panel has the same values on the categorical axis, bars in a paneled pareto chart are not arranged in descending order for each panel. The bars are arranged in descending order based on the overall count for each category.

Related Topics

Obtaining Stacked Pareto Charts Showing Counts or Sums for Groups of Cases
Pareto Charts
Simple Pareto Counts or Sums for Groups of Cases
Simple Pareto Sums of Separate Variables
Simple Pareto Values of Individual Cases
Stacked Pareto Sums of Separate Variables
Stacked Pareto Values of Individual Cases
GRAPH
Obtaining Simple and Stacked Pareto Charts


Stacked Pareto Values of Individual Cases

pareto charts,pareto charts,pareto charts
pareto charts,pareto charts,pareto charts
stacked,stacked,stacked
stacked pareto charts,stacked pareto charts,stacked pareto charts
stacked pareto charts,stacked pareto charts,stacked pareto charts
values of individual cases,values of individual cases,values of individual cases
Creates a bar chart summarizing two or more variables by individual case, with bars sorted in descending order. A line plots the cumulative sum. (Click for example.)

Select at least two variables and move them into the Values field. A separate segment within each stack is generated for each variable in this field. These variables must be numeric.

Select one of the alternatives in the Category Labels group to label categories either by Case number or by Variable. If you select Variable, then you must select a variable from the target list and move it into the Variable field. This variable may be numeric, string, or long string.

To panel the chart, move one or more categorical variables into the Panel By group. See the topic Paneled Charts for more information.

Note: Because each panel has the same values on the categorical axis, bars in a paneled pareto chart are not arranged in descending order for each panel. The bars are arranged in descending order based on the overall count for each category.

Related Topics

Obtaining Stacked Pareto Charts Showing Individual Cases
Pareto Charts
Simple Pareto Counts or Sums for Groups of Cases
Simple Pareto Sums of Separate Variables
Simple Pareto Values of Individual Cases
Stacked Pareto Counts or Sums for Groups of Cases
Stacked Pareto Sums of Separate Variables
GRAPH
Obtaining Simple and Stacked Pareto Charts


Stacked Pareto Sums of Separate Variables

pareto charts,pareto charts,pareto charts
pareto charts,pareto charts,pareto charts
stacked,stacked,stacked
stacked pareto charts,stacked pareto charts,stacked pareto charts
stacked pareto charts,stacked pareto charts,stacked pareto charts
sums of separate variables,sums of separate variables,sums of separate variables
Creates a bar chart summarizing two or more variables within categories of another variable, with bars sorted in descending order. A line plots the cumulative sum. (Click for example.)

Select at least two variables and move them into the Variables field. A separate segment within each stack is generated for each variable in this field. These variables must be numeric.

Select a category variable and move it into the Category Axis field. This variable may be numeric, string, or long string.

To panel the chart, move one or more categorical variables into the Panel By group. See the topic Paneled Charts for more information.

Note: Because each panel has the same values on the categorical axis, bars in a paneled pareto chart are not arranged in descending order for each panel. The bars are arranged in descending order based on the overall count for each category.

Related Topics

Obtaining Stacked Pareto Charts Showing Sums of Separate Variables
Pareto Charts
Simple Pareto Counts or Sums for Groups of Cases
Simple Pareto Sums of Separate Variables
Simple Pareto Values of Individual Cases
Stacked Pareto Counts or Sums for Groups of Cases
Stacked Pareto Values of Individual Cases
GRAPH
Obtaining Simple and Stacked Pareto Charts


Clustered Boxplot Summaries for Groups of Cases

Creates a boxplot summarizing the median, quartiles, and extreme values for a single numeric variable, within clusters defined by a categorical variable. Each box within a cluster is defined by a second categorical variable. (Click for example.)

Select the variable for which you want boxplots and move it into the Variable field.

Select a variable for the category axis and move it into the Category Axis field. This variable may be numeric, string, or long string.

Select a cluster variable to define a group of boxes and move it into the Define Clusters By field. This variable may be numeric, string, or long string. Each cluster will consist of one box for each value of the cluster variable at every level of the category variable.

You can select a variable and move it into the Label Cases By field. This variable can be numeric or string. If selected, the value labels (or values if no labels are defined) of this variable can be used to label outliers or extreme cases on the plot.

If you do not select a variable to label cases by, case numbers can be used to label outliers and extremes.

Click Options to specify the treatment of missing values in your data and control whether labels are to be displayed for outliers and extremes.

To panel the chart, move one or more categorical variables into the Panel By group. See the topic Paneled Charts for more information.

Related Topics

Obtaining Clustered Boxplots Summarizing Groups of Cases
Boxplots
Simple Boxplot Summaries for Groups of Cases
Simple Boxplot Summaries of Separate Variables
Clustered Boxplot Summaries of Separate Variables
Obtaining Simple and Clustered Boxplots
EXAMINE


Clustered Boxplot Summaries of Separate Variables

Creates a boxplot summarizing the median, quartiles, and extreme values for a one or more numeric variables, within clusters defined by a categorical variable. (Click for example.)

Select at least two variables and move them into the Boxes Represent field. These variables must be numeric.

Select a category variable and move it into the Category Axis field. This variable may be numeric, string, or long string.

You can select a variable and move it into the Label Cases By field. This variable can be numeric or string. If selected, the value labels (or values if no labels are defined) of this variable can be used to label outliers or extreme cases on the plot.

If you do not select a variable to label cases by, case numbers can be used to label outliers and extremes.

Click Options to specify the treatment of missing values in your data and control whether labels are to be displayed for outliers and extremes.

To panel the chart, move one or more categorical variables into the Panel By group. See the topic Paneled Charts for more information.

Related Topics

Obtaining Clustered Boxplots Summarizing Separate Variables
Boxplots
Simple Boxplot Summaries for Groups of Cases
Simple Boxplot Summaries of Separate Variables
Clustered Boxplot Summaries for Groups of Cases
Obtaining Simple and Clustered Boxplots
EXAMINE


Simple Boxplot Summaries for Groups of Cases

Creates a boxplot summarizing a single numeric variable within categories of another variable. Each box shows the median, quartiles, and extreme values within a category. (Click for example.)

Select the variable for which you want boxplots and move it into the Variable field.

Select a variable for the category axis and move it into the Category Axis field. This variable may be numeric, string, or long string.

You can select a variable and move it into the Label Cases By field. This variable can be numeric or string. If selected, the value labels (or values if no labels are defined) of this variable can be used to label outliers or extreme cases on the plot.

If you do not select a variable to label cases by, case numbers can be used to label outliers and extremes.

Click Options to specify the treatment of missing values in your data and control whether labels are to be displayed for outliers and extremes.

To panel the chart, move one or more categorical variables into the Panel By group. See the topic Paneled Charts for more information.

Related Topics

Obtaining Simple Boxplots Summarizing Groups of Cases
Boxplots
Simple Boxplot Summaries of Separate Variables
Clustered Boxplot Summaries for Groups of Cases
Clustered Boxplot Summaries of Separate Variables
Obtaining Simple and Clustered Boxplots
EXAMINE


Simple Boxplot Summaries of Separate Variables

Creates a boxplot summarizing one or more numeric variables. Each box shows the median, quartiles, and extreme values for one of the summary variables. (Click for example.)

Select at least one numeric variable for which you want boxplots and move it into Boxes Represent field.

You can select a variable and move it into the Label Cases By field. This variable can be numeric or string. If selected, the value labels (or values if no labels are defined) of this variable can be used to label outliers or extreme cases on the plot.

If you do not select a variable to label cases by, case numbers can be used to label outliers and extremes.

Click Options to specify the treatment of missing values in your data and control whether labels are to be displayed for outliers and extremes.

To panel the chart, move one or more categorical variables into the Panel By group. See the topic Paneled Charts for more information.

Related Topics

Obtaining Simple Boxplots Summarizing Separate Variables
Boxplots
Simple Boxplot Summaries for Groups of Cases
Clustered Boxplot Summaries for Groups of Cases
Clustered Boxplot Summaries of Separate Variables
Obtaining Simple and Clustered Boxplots
EXAMINE


Summary Functions for 3-D Bar Charts

Select one of the summary functions. The value of the summary function determines the height of the bars. If there is a question mark (?) in the setting for Bars Represent, you need to specify a parameter by clicking the Set Parameter button on the main dialog box. This parameter is used to calculate bar height using a summary function and the value of the variable.

Summary Functions with No Parameters Collapse Hide details

Summary Functions with No Parameters

Number of cases. The height of the bars represents the number of cases with particular x-axis and z-axis values.

Percentage of cases. The height of the bars represents the percentage of cases with particular x-axis and z-axis values. The percentage base is the z-axis value. Therefore, the values of all the bars with a particular z-axis value add up to 100%.

Mean of values. The height of the bars represents the mean of the variable for cases with particular x-axis and z-axis values.

Median of values. The height of the bars represents the median of the variable for cases with particular x-axis and z-axis values.

Mode of values. The height of the bars represents the mode of the variable for cases with particular x-axis and z-axis values.

Sum of values. The height of the bars represents the sum of the variable for cases with particular x-axis and z-axis values.

Standard deviation. The height of the bars represents the standard deviation of the variable for cases with particular x-axis and z-axis values.

Variance. The height of the bars represents the variance of the variable for cases with particular x-axis and z-axis values.

Minimum value. The height of the bars represents the minimum of the variable for cases with particular x-axis and z-axis values.

Maximum value. The height of the bars represents the maximum of the variable for cases with particular x-axis and z-axis values.

Cumulative sum. The height of the bars represents the cumulative sum of the variable. Each bar is the sum of the variable for cases with particular x-axis and z-axis values plus the total sum of the variable for every bar drawn previously in the direction of the origin.

Cum. number of cases. The height of the bars represents the cumulative number of cases. Each bar is the number of cases with particular x-axis and z-axis values plus the total number of cases for every bar drawn previously in the direction of the origin.

Cum. percentage of cases. The height of the bars represents the cumulative percentage of cases. Each bar is the percentage of cases with particular x-axis and z-axis values plus the total percentage of cases for every bar drawn previously in the direction of the origin.

Summary Functions with Parameters Collapse Hide details

Summary Functions with Parameters

Percentage above. The height of the bars represents the percentage of cases for which the value of the variable is greater than the number you specify.

Percentage below. The height of the bars represents the percentage of cases for which the value of the variable is less than the number you specify.

Percentile. The height of the bars represents the percentile value of the variable for the number that you specify. For example, if the number is 50, the height of the bars is the 50th percentile value of the variable.

Number above. The height of the bars represents the number of cases for which the value of the variable is greater than the number you specify.

Number below. The height of the bars represents the number of cases for which the value of the variable is less than the number you specify.

Percentage in range. The height of the bars represents the percentage of cases for which the value of the variable is greater than the Minimum and less than the Maximum.

Number in range. The height of the bars represents the number of cases for which the value of the variable is greater than the Minimum and less than the Maximum.

Related Topics

3-D Bar Charts
Obtaining 3-D Bar Charts for Groups of Cases
Obtaining 3-D Bar Charts for Summaries of Separate Variables by Group
Obtaining 3-D Bar Charts for Values of Individual Cases in Groups
Obtaining 3-D Bar Charts for Values of Individual Cases for Separate Variables


3-D Bar Charts

3-D Bar Charts allows you to select which data appear on the axes. Click the icon below to explore examples of bar charts with different types of data on the axes.

Examples

Related Topics

Obtaining 3-D Bar Charts for Groups of Cases
Obtaining 3-D Bar Charts for Summaries of Separate Variables by Group
Obtaining 3-D Bar Charts for Values of Individual Cases in Groups
Obtaining 3-D Bar Charts for Values of Individual Cases for Separate Variables
Summary Functions for 3-D Bar Charts
XGRAPH


Obtaining 3-D Bar Charts for Groups of Cases

This feature requires the Statistics Base option.

From the menus choose:

Graphs
Legacy Dialogs
3-D Bar

In the 3-D Bar Charts dialog box, select Groups of cases for both the x axis and the z axis.

Click Define.

Select one of the summary functions from the Bars Represent drop-down list to specify what determines the height of the bars. If you need to specify a value for the summary function (for example, a range), click Set Parameters. See the topic Summary Functions for 3-D Bar Charts for more information. Also, if you are using a summary function that requires a continuous variable (for example, mean), move a continuous variable to the Variable field.

Move a categorical variable to each Category Axis field.

If you want to panel the chart, drag and drop a variable into the Panel By group. See the topic Paneled Charts for more information.

If you want to stack or cluster bars using up to two more categorical variables, move the variables into the Stack/Cluster By group. You cannot stack and cluster on both axes.

If you want to format the chart using an existing template, select Use chart specifications from and then click File to locate the template file. See the topic Use Template from File for more information.

If necessary, click Titles to specify the title, subtitle, and footnotes to appear in the chart. See the topic Chart Titles (Creating Charts) for more information.

You can also click Options to specify whether groups defined by missing values are displayed. See the topic Chart Options for more information.

To Change the Measurement Level of a Variable Collapse Hide details

To Change the Measurement Level of a Variable

Right-click the variable in the variable list (you can do this only in the variable list, before moving the variable to a specific field).

Select Categorical or Scale from the context menu.

Related Topics

3-D Bar Charts
Obtaining 3-D Bar Charts for Summaries of Separate Variables by Group
Obtaining 3-D Bar Charts for Values of Individual Cases in Groups
Obtaining 3-D Bar Charts for Values of Individual Cases for Separate Variables
Summary Functions for 3-D Bar Charts
XGRAPH


Obtaining 3-D Bar Charts for Summaries of Separate Variables by Group

This feature requires the Statistics Base option.

From the menus choose:

Graphs
Legacy Dialogs
3-D Bar

In the 3-D Bar Charts dialog box, select Groups of cases for either the x axis or the z axis.

Select Separate variables for the other axis.

Click Define.

Move two or more continuous variables to the Bars Represent field and select a summary function to specify what determines the height of the bars. If you need to specify a value for the summary function (for example, a range), click Set Parameters. See the topic Summary Functions for 3-D Bar Charts for more information. .

Move a categorical variable into the Group By group and specify on which axis the categorical variable appears.

If you want to panel the chart, drag and drop a variable into the Panel By group. See the topic Paneled Charts for more information.

If you want to stack or cluster bars using up to two more categorical variables, move the variables into the Stack/Cluster By group. You cannot stack and cluster on both axes.

If you want to format the chart using an existing template, select Use chart specifications from and then click File to locate the template file. See the topic Use Template from File for more information.

If necessary, click Titles to specify the title, subtitle, and footnotes to appear in the chart. See the topic Chart Titles (Creating Charts) for more information.

You can also click Options to specify whether groups defined by missing values are displayed. See the topic Chart Options for more information.

To Change the Measurement Level of a Variable Collapse Hide details

To Change the Measurement Level of a Variable

Right-click the variable in the variable list (you can do this only in the variable list, before moving the variable to a specific field).

Select Categorical or Scale from the context menu.

Related Topics

3-D Bar Charts
Obtaining 3-D Bar Charts for Groups of Cases
Obtaining 3-D Bar Charts for Values of Individual Cases in Groups
Obtaining 3-D Bar Charts for Values of Individual Cases for Separate Variables
Summary Functions for 3-D Bar Charts
XGRAPH


Obtaining 3-D Bar Charts for Values of Individual Cases in Groups

This feature requires the Statistics Base option.

From the menus choose:

Graphs
Legacy Dialogs
3-D Bar

In the 3-D Bar Charts dialog box, select Groups of cases for either the x axis or the z axis.

Select Individual cases for the other axis.

Click Define.

Move a continuous variable to the Bars Represent field to specify what determines the height of the bars.

Move a categorical variable into the Group By group to define how the bars are grouped.

In the Show Cases On group, specify on which axis the individual cases appear.

Select one of the alternatives in the Category Labels group to label categories either by Case number or by Variable. If you select Variable, then you must move a variable to the Variable field. This variable may be numeric, string, or long string.

If you want to panel the chart, drag and drop a variable into the Panel By group. See the topic Paneled Charts for more information.

If you want to format the chart using an existing template, select Use chart specifications from and then click File to locate the template file. See the topic Use Template from File for more information.

If necessary, click Titles to specify the title, subtitle, and footnotes to appear in the chart. See the topic Chart Titles (Creating Charts) for more information.

To Change the Measurement Level of a Variable Collapse Hide details

To Change the Measurement Level of a Variable

Right-click the variable in the variable list (you can do this only in the variable list, before moving the variable to a specific field).

Select Categorical or Scale from the context menu.

Related Topics

3-D Bar Charts
Obtaining 3-D Bar Charts for Groups of Cases
Obtaining 3-D Bar Charts for Summaries of Separate Variables by Group
Obtaining 3-D Bar Charts for Values of Individual Cases for Separate Variables
Summary Functions for 3-D Bar Charts
XGRAPH


Obtaining 3-D Bar Charts for Values of Individual Cases for Separate Variables

This feature requires the Statistics Base option.

From the menus choose:

Graphs
Legacy Dialogs
3-D Bar

In the 3-D Bar Charts dialog box, select Separate variables for either the x axis or the z axis.

Select Individual cases for the other axis.

Click Define.

Move two or more continuous variables to the Bars Represent field. The values of these variables for each case determine the height of the bars.

In the Show Cases On group, specify on which axis the individual cases appear.

Select one of the alternatives in the Category Labels group to label categories either by Case number or by Variable. If you select Variable, then you must move a variable to the Variable field. This variable may be numeric, string, or long string.

If you want to panel the chart, drag and drop a variable into the Panel By group. See the topic Paneled Charts for more information.

If you want to stack or cluster bars using up to two more categorical variables, move the variables into the Stack/Cluster By group. You cannot stack and cluster on both axes.

If you want to format the chart using an existing template, select Use chart specifications from and then click File to locate the template file. See the topic Use Template from File for more information.

If necessary, click Titles to specify the title, subtitle, and footnotes to appear in the chart. See the topic Chart Titles (Creating Charts) for more information.

You can also click Options to specify whether groups defined by missing values are displayed. See the topic Chart Options for more information.

To Change the Measurement Level of a Variable Collapse Hide details

To Change the Measurement Level of a Variable

Right-click the variable in the variable list (you can do this only in the variable list, before moving the variable to a specific field).

Select Categorical or Scale from the context menu.

Related Topics

3-D Bar Charts
Obtaining 3-D Bar Charts for Groups of Cases
Obtaining 3-D Bar Charts for Summaries of Separate Variables by Group
Obtaining 3-D Bar Charts for Values of Individual Cases in Groups
Summary Functions for 3-D Bar Charts
XGRAPH


Scale Options for Population Pyramids

When the variable used for the distribution is continuous (scale), you can specify settings for the bins in the resulting chart. The bins are the bars in the chart and represent a group of data values. For example, if there are four bins in a chart and the values range from 0–100, all points with values of 0–24 would be in the first bin, those with values of 25–49 would be in the second bin, and so on. You can also display a normal curve for each "chart." These options are the same as those for editing histograms, because each half of the population is a histogram when the distribution variable is continuous.

Display normal curve. Superimpose over the histogram or histograms a normal curve with the same mean and standard deviation as the data.

Anchor Bin. Specify the starting value of a bin. If the value is less than the lowest data value, this is the starting value of the first bin. By default, the first bin will include the lowest data value. The anchor is set so that bin boundaries are at good values. You can change the default so that the first bin includes values that are not in the dataset. For example, you might want the values of 0–5 to be included even though the lowest value in the dataset is 6.

Note: If the variable being binned is a date, the starting value must be a date literal in the date format specified for the variable on the Variable View tab in the Data Editor (for example, 01/01/2001).

Bin Sizes. Change the size of the bins. You can either specify the number of bins or the width of each bin. The width also affects the number of bins. For example, if the axis range is 0–100 and you specify the width as 5, there will be 20 bins. The greater the number of bins, the more detailed the histogram is. However, more bins may make the histogram too irregular to see the shape of the distribution.

Note: If the variable being binned is a date, the units used for the width are days. Therefore, specifying a width of 30 indicates 30 days.

To Change the Scale Options for a Population Pyramid Collapse Hide details

On the Define Population Pyramid dialog box, click Scale Options.

Change any required settings for the normal curve and bins.

Click Continue.

Related Topics

Population Pyramids
Obtaining Population Pyramids
Chart Options


Obtaining Population Pyramids

From the menus choose:

Graphs
Legacy Dialogs
Population Pyramid

In the Define Population Pyramid dialog box, specify whether counts are computed from the data or are taken from a variable that contains preaggregated values. For example, if you have a variable that contains population values for different age groups, you would select Get Counts from variable and drag and drop the variable into the Variable field. If none of the variables contains preaggregated data, select Compute counts from data.

From the variable list, drag and drop the variable that you want to summarize into the Show Distribution Over field. This variable will appear on the vertical axis of the population pyramid. If your data includes a variable with preaggregated counts, you must specify a categorical variable for the distribution. Otherwise, the variables can be categorical or scale.

Drag and drop a categorical variable into the Split By field. This variable determines the split of each population pyramid. If there are more than two categories in the variable, the resulting chart will include multiple population pyramids, with the direction of the bars alternating for each category.

If you want to panel the chart, drag and drop a variable into the Panel By group. See the topic Paneled Charts for more information.

If necessary, click Titles to specify the title, subtitle, and footnotes to appear in the chart. See the topic Chart Titles (Creating Charts) for more information.

If you want to format the chart using an existing template, select Use chart specifications from and then click File to locate the template file. See the topic Use Template from File for more information.

If the Show Distribution Over variable is continuous (scale), click Scale Options to change the binning (grouping) settings for bars on the vertical axis. See the topic Scale Options for Population Pyramids for more information. If the variable is categorical, click Categorical Options to specify whether groups defined by missing values are displayed.

To Change the Measurement Level of a Variable Collapse Hide details

To Change the Measurement Level of a Variable

Right-click the variable in the variable list (you can do this only in the variable list, before moving the variable to a specific field).

Select Categorical or Scale from the context menu.

Related Topics

Population Pyramids
Scale Options for Population Pyramids
Chart Options
XGRAPH


Simple Dot Plots

Plots one continuous or categorical variable. For a continuous variable, dots are binned automatically when values are close together.

Select one variable for the x axis. This variable must be numeric and can be categorical or scale.

To panel the chart, move one or more categorical variables into the Panel By group. See the topic Paneled Charts for more information.

Click Options to specify the treatment of missing values in your data and to select a shape for the dot plot. See the topic Dot Plot Options for more information.

Click Titles to define lines of text to be placed at the top or bottom of the plot.

Related Topics

Obtaining Simple Dot Plots
XGRAPH
Scatterplots
Obtaining Scatterplots
Simple Scatterplots
Overlay Scatterplots
Scatterplot Matrix
3-D Scatterplots


Dot Plot Options

The chart options that are available depend on the chart type and the data.

Missing Values. These options are available only when the new chart will display or summarize more than one variable (not including variables that define groups):

• Exclude cases listwise. This option excludes a case from the entire chart if it has a missing value for any of the variables summarized.

• Exclude cases variable by variable. This option excludes a case separately from each summary statistic calculated. Different chart elements may be based on different groups of cases.

Display groups defined by missing values. This option is available only when you use a categorical variable to define groups for a new chart. If selected, each missing value for the grouping variable (including the system-missing value) will appear as a separate group in the chart. If not, cases with system-missing or user-missing values for the grouping variable are excluded from the chart.

Plot shape. This option specifies the layout of the dot plot. In most cases, the default, asymmetric, is the best option. However, you can also create a dot plot with the points centered around an arbitrary horizontal line (symmetric) or without stacking (flat).

Related Topics

Chart Options
Chart Titles (Creating Charts)


Save Current Order

You can save the original (pre-sorted) variable order in a custom variable attribute. For each variable, the value of the attribute is an integer value indicating its position prior to sorting; so by sorting variables based on the value of that custom attribute you can restore the original variable order. See the topic Sort Variables for more information.


Find and Replace in Syntax Windows

Use this dialog to find and replace text in a syntax window.


Select Graphic Element to Label Dialog Box

When you use the data label mode to display data labels for specific graphic elements, some of the graphic elements might overlap. Therefore, the Chart Editor does not know for which graphic element you want to display a label. When this happens, the Chart Editor displays the Select Graphic Element to Label dialog box. The dialog box shows you an ID (for example, a case number) for the graphic elements that overlap in the area that you clicked while in data label mode.

You can choose to display the labels for all the graphic elements, or you can select individual graphic elements. Hold the Ctrl key while clicking to select more than one graphic element.

Click OK to display the labels for the selected graphic elements.

Related Topics

Data Labels


Independent-Samples T Test: Related Procedures

If you have more than two independent groups, consider the One-Way ANOVA procedure. If your groups are not independent--for example, if you measure an employee's performance before and after a training program--use the Paired-Samples T Test procedure. If the test variable is categorical (nominal or ordinal level of measurement), use the Crosstabs procedure. If the data are not normally distributed, or not quantitative, but ordered, use the Mann-Whitney U test (select 2 Independent Samples from the Nonparametric Tests submenu).

Related Topics

Two-Independent-Samples Tests
Paired-Samples T Test
One-Sample T Test
Crosstabs
One-Way ANOVA
Independent-Samples T Test
Independent-Samples T Test Define Groups
Independent-Samples T Test Options


K-Means Cluster Analysis: Related Procedures

The main advantage of the K-Means Cluster Analysis procedure is that it is much faster than the Hierarchical Cluster Analysis procedure. On the other hand, the hierarchical procedure allows much more flexibility in your cluster analysis: you can use any of a number of distance or similarity measures, including options for binary and count data, and you do not need to specify the number of clusters a priori. Once you have identified groups, you can build a model useful for identifying new cases using the Discriminant procedure. You can also use saved cluster membership information to explore other relationships in subsequent analyses, such as Crosstabs or GLM Univariate.

Related Topics

Means
One-Way ANOVA
Crosstabs
Discriminant Analysis
Hierarchical Cluster Analysis
K-Means Cluster Analysis
K-Means Cluster Analysis Efficiency
K-Means Cluster Analysis Iterate
K-Means Cluster Analysis Save
K-Means Cluster Analysis Options


OLAP Cubes: Related Procedures

Use the One-Way ANOVA procedure to obtain a one-way analysis of variance, a priori contrasts, post hoc range tests, and pairwise multiple comparisons. For an analysis of variance with more than one factor, use the GLM Univariate procedure. To list the cases in each subgroup, use the Report Summaries in Rows procedure.

Related Topics

Report Summaries in Rows
Means
One-Way ANOVA
Explore
Summarize
OLAP Cubes
OLAP Cubes Statistics
OLAP Cubes Differences
OLAP Cubes Title


Difference Area Charts Examples

A. Summaries for Groups of Cases

Each category of a dichotomous variable (having two categories or values) is summarized within categories of a separate categorical variable.

Minimum specifications

• A Category Axis variable (Category Variable 1)

• A Define 2 Groups by variable (Cat Var 2). This variable must be dichotomous.

How to

B. Summaries of Separate Variables

A differenced variable pair is summarized within categories defined by a separate categorical variable.

Minimum specifications

• A 1st variable (Var 1).

• A 2nd variable (Var 2).

• A Category Axis variable (Category Variable).

How to

C. Values of Individual Cases

A differenced variable pair is summarized. Each point represents an individual case for one of the variables.

Minimum specifications

• A 1st variable (Var 1).

• A 2nd variable (Var 2).

How to


High-Low-Close: Clustered Examples

A. Summaries for Groups of Cases

Two or three variables are summarized within clusters defined by a categorical variable. Each bar within a cluster represents a category of a second categorical variable.

Minimum specifications

• A High summary variable.

• A Low summary variable.

• A Category Axis variable (Category Variable 1).

• A Define Clusters by variable (Cat Var 2).

How to

B. Summaries of Separate Variables

Two or more variable sets (high-low pairs or triplets) are summarized. Each bar within a cluster represents one of the sets.

Minimum specifications

• Two High variables.

• Two Low variables.

• A Category Axis variable (Category Variable).

How to

C. Values of Individual Cases

Two or more variable sets (high-low pairs or triplets) are summarized for each case. Each bar within a cluster represents one of the variable sets.

Minimum specifications

• Two High variables.

• Two Low variables.

How to


Range Bar: Clustered Examples

A. Summaries for Groups of Cases

A pair of variables is summarized within clusters defined by a categorical variable. Each bar within a cluster represents a category of a second categorical variable.

Minimum specifications

• A 1st summary variable, and a 2nd summary variable.

• A Category Axis variable (Category Variable 1).

• A Define Clusters by variable (Cat Var 2).

How to

B. Summaries of Separate Variables

Two variable pairs are summarized within clusters. Each bar within a cluster represents one of the variable pairs.

Minimum specifications

• Two 1st variables.

• Two 2nd variables.

• A Category Axis variable (Category Variable).

How to

C. Values of Individual Cases

Two variable pairs are summarized within clusters for each case. Each bar within a cluster represents one of the pairs.

Minimum specifications

• Two 1st variables.

• Two 2nd variables.

How to


High-Low-Close: Simple Examples

A. Summaries for Groups of Cases

A single "high-low-close" variable is summarized within categories defined by a categorical variable.

Minimum specifications

• A High-low-close variable with two (or three) values or categories.

• A Category Axis variable (Category Variable).

How to

B. Summaries of Separate Variables

Two (or three) variables are summarized within categories defined by a categorical variable.

Minimum specifications

• A High variable (High Var).

• A Low variable (Low Var).

• A Category Axis variable (Category Variable).

How to

C. Values of Individual Cases

Two or three variables are summarized. Each bar represents an individual case.

Minimum specifications

• A High variable (High Var).

• A Low variable (Low Var).

How to


Range Bar: Simple Examples

A. Summaries for Groups of Cases

Each category of a dichotomous variable (having two categories or values) is summarized within categories of a separate categorical variable.

Minimum specifications

• A Category Axis variable (Category Variable 1)

• A Define 2 Groups by variable (Cat Var 2). This variable must be dichotomous.

How to

B. Summaries of Separate Variables

A pair of variables is summarized within categories defined by a separate categorical variable.

Minimum specifications

• A 1st variable (Var 1).

• A 2nd variable (Var 2).

• A Category Axis variable (Category Variable).

How to

C. Values of Individual Cases

A pair of variables is summarized. Each point represents an individual case for one of the variables.

Minimum specifications

• A 1st variable (Var 1).

• A 2nd variable (Var 2).

How to


Linear Regression: Related Procedures

parameter constraints,parameter constraints,parameter constraints
constrained regression,constrained regression,constrained regression

Use the Chart Builder on the Graphs menu to obtain bivariate scatterplots or scatterplot matrices. Scatterplots aid in the screening of your data. The Explore procedure can also be used to screen your data. Explore provides tests for normality and homogeneity of variance, as well as graphical displays. If your data appear to violate an assumption (such as normality or constant variance), try transforming them. If your data are not related linearly and a transformation does not help, use an alternate model in the Curve Estimation procedure. If your dependent variable is dichotomous, such as whether a particular sale is completed or not or whether an item is defective or not, use the Logistic Regression procedure, available in Advanced option. If your dependent variable is censored, such as survival time after surgery, use Life Tables, Kaplan-Meier, or Cox Regression, available in the Advanced Statistics option. If your data are not independent-for example, if you observe the same person under several conditions-use the GLM Repeated Measures procedure, available in the Advanced Statistics option. If you want to place constraints on the values of the regression coefficients, use the Nonlinear Regression procedure.

Related Topics

Cox Regression Analysis
Kaplan-Meier Survival Analysis
Life Tables
Logistic Regression
Nonlinear Regression
Linear Regression
Linear Regression Variable Selection Methods
Linear Regression Set Rule
Linear Regression Plots
Linear Regression: Saving New Variables
Linear Regression Statistics
Linear Regression Options


Obtaining Simple or Stacked Area Charts

This feature requires the Statistics Base option.

From the menus choose:

Graphs
Legacy Dialogs
Area

In the Area Charts dialog box, select the icon for Simple or Stacked.

Select an option under the Data in Chart Are group.

Click Define.

Select variables and options for the chart.

Related Topics

Area Charts
Simple Area Summaries for Groups of Cases
Simple Area Summaries of Separate Variables
Simple Area Values of Individual Cases
Stacked Area Summaries for Groups of Cases
Stacked Area Summaries of Separate Variables
Stacked Area Values of Individual Cases


Obtaining Simple Area Charts Showing Individual Cases

This feature requires the Statistics Base option.

From the menus choose:

Graphs
Legacy Dialogs
Area

Select the icon for Simple and select Values of individual cases.

Click Define.

Select one variable and move it into the Area Represents field. This must be a numeric variable.

Select one of the alternatives in the Category Labels group to label items either by Case number or by Variable. If you select Variable, then you must select a variable from the target list and move it into the Variable field. This variable may be numeric, string, or long string.


Obtaining Simple Area Charts Summarizing Groups of Cases

This feature requires the Statistics Base option.

From the menus choose:

Graphs
Legacy Dialogs
Area

Select the icon for Simple and select Summaries for groups of cases.

Click Define.

Select a variable for the category axis and move it into the Category Axis field. This variable may be numeric, string, or long string.

Select one of the alternatives in the Area Represents group to specify how the data are represented on the scale axis.


Obtaining Simple Area Charts Summarizing Separate Variables

This feature requires the Statistics Base option.

From the menus choose:

Graphs
Legacy Dialogs
Area

Select the icon for Simple and select Summaries of separate variables.

Click Define.

Select at least two variables and move them into the Area Represents field. These variables must be numeric.

To change the summary function for a variable, select the variable in the Area Represents field and click Change Statistic.


Obtaining Stacked Area Charts Showing Individual Cases

This feature requires the Statistics Base option.

From the menus choose:

Graphs
Legacy Dialogs
Area

Select the icon for Stacked and select Values of individual cases.

Click Define.

Select at least two variables and move them into the Areas Represent field. These variables must be numeric.

Select one of the alternatives in the Category Labels group to label categories either by Case number or by Variable. If you select Variable, then you must select a variable from the target list and move it into the Variable field. This variable may be numeric, string, or long string.


Obtaining Stacked Area Charts Summarizing Groups of Cases

This feature requires the Statistics Base option.

From the menus choose:

Graphs
Legacy Dialogs
Area

Select the icon for Stacked and select Summaries for groups of cases.

Click Define.

Select a variable for the category axis and move it into the Category Axis field. This variable may be numeric, string, or long string.

Select one of the alternatives in the Areas Represent group to specify how the data are represented on the scale axis.

To define lines, you must select a variable and move it into the Define Areas By field. Separate lines are generated for each category of the area variable, with the area below each line shaded with a different color or pattern. This variable may be numeric, string, or long string.


Obtaining Stacked Area Charts Summarizing Separate Variables

This feature requires the Statistics Base option.

From the menus choose:

Graphs
Legacy Dialogs
Area

Select the icon for Stacked and select Summaries of separate variables.

Click Define.

Select at least two variables and move them into the Areas Represent field. These variables must be numeric.

Click Change Statistic to define the function used to summarize the variables for the chart.

Select a category variable and move it into the Category Axis field. This variable may be numeric, string, or long string.


Obtaining Autocorrelation Charts

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Forecasting
Autocorrelations

Select one or more numeric variables and move them onto the Variables field.

Under Display, select Autocorrelations, Partial autocorrelations, or both.

Related Topics

Autocorrelations
Autocorrelations Options


Specifying Options for Autocorrelations Charts

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Forecasting
Autocorrelations

In the Autocorrelations dialog box, click Options.


Obtaining Simple, Clustered, or Stacked Bar Charts

This feature requires the Statistics Base option.

From the menus choose:

Graphs
Legacy Dialogs
Bar

In the Bar Charts dialog box, select the icon for Simple, Clustered, or Stacked.

Select the option under the Data in Chart Are group that best fits your data.

Click Define.

Select variables and options for the chart.

Related Topics

Bar Charts
Simple Bar Summaries for Groups of Cases
Simple Bar Summaries of Separate Variables
Simple Bar Values of Individual Cases
Clustered Bar Summaries for Groups of Cases
Clustered Bar Summaries of Separate Variables
Clustered Bar Values of Individual Cases
Stacked Bar Summaries for Groups of Cases
Stacked Bar Summaries of Separate Variables
Stacked Bar Values of Individual Cases


Obtaining Clustered Bar Charts Showing Individual Cases

This feature requires the Statistics Base option.

From the menus choose:

Graphs
Legacy Dialogs
Bar

Select the icon for Clustered and select Values of individual cases.

Click Define.

Select at least two variables and move them into the Bars Represent field. These variables must be numeric.

Select one of the alternatives in the Category Labels group to label categories either by Case number or by Variable. If you select Variable, then you must select a variable from the target list and move it into the Variable field. This variable may be numeric, string, or long string.


Obtaining Clustered Bar Charts Summarizing Groups of Cases

This feature requires the Statistics Base option.

From the menus choose:

Graphs
Legacy Dialogs
Bar

Select the icon for Clustered and select Summaries for groups of cases.

Click Define.

Select a variable for the category axis and move it into the Category Axis field. This variable may be numeric, string, or long string.

Select one of the alternatives in the Bars Represent group to specify how the data are represented on the scale axis.

Select a cluster variable used to group bars and move it into the Define Clusters By field. Each cluster will consist of one bar for each value of the cluster variable at every level of the category variable.


Obtaining Clustered Bar Charts Summarizing Separate Variables

This feature requires the Statistics Base option.

From the menus choose:

Graphs
Legacy Dialogs
Bar

Select the icon for Clustered and select Summaries of separate variables.

Click Define.

Select at least two variables and move them into the Bars Represent field. These variables must be numeric.

To change the summary function for a variable, select the variable in the Bars Represent field and click Change Statistic.

Select a category variable and move it into the Category Axis field. This variable may be numeric, string, or long string.


Obtaining Simple Bar Charts Showing Individual Cases

This feature requires the Statistics Base option.

From the menus choose:

Graphs
Legacy Dialogs
Bar

Select the icon for Simple and select Values of individual cases.

Click Define.

Select one variable and move it into the Bars Represent field. This variable must be a numeric variable.

Select one of the alternatives in the Category Labels group to label categories either by Case number or by Variable. If you select Variable, then you must select a variable from the target list and move it into the Variable field. This variable may be numeric, string, or long string.


Obtaining Simple Bar Charts Summarizing Groups of Cases

This feature requires the Statistics Base option.

From the menus choose:

Graphs
Legacy Dialogs
Bar

Select the icon for Simple and select Summaries for groups of cases.

Click Define.

Select a variable for the category axis and move it into the Category Axis field. This variable may be numeric, string, or long string.

Select one of the alternatives in the Bars Represent group to specify how the data are represented on the scale axis.


Obtaining Simple Bar Charts Summarizing Separate Variables

This feature requires the Statistics Base option.

From the menus choose:

Graphs
Legacy Dialogs
Bar

Select the icon for Simple and select Summaries of separate variables.

Click Define.

Select at least two variables and move them into the Bars Represent field. These variables must be numeric.

To change the summary function for a variable, select the variable in the Bars Represent field and click Change Statistic.


Obtaining Stacked Bar Charts Showing Individual Cases

This feature requires the Statistics Base option.

From the menus choose:

Graphs
Legacy Dialogs
Bar

Select the icon for Stacked and select Values of individual cases.

Click Define.

Select at least two variables and move them into the Bars Represent field. These variables must be numeric.

Select one of the alternatives in the Category Labels group to label categories either by Case number or by Variable. If you select Variable, then you must select a variable from the target list and move it into the Variable field. This variable may be numeric, string, or long string.


Obtaining Stacked Bar Charts Summarizing Groups of Cases

This feature requires the Statistics Base option.

From the menus choose:

Graphs
Legacy Dialogs
Bar

Select the icon for Stacked and select Summaries for groups of cases.

Click Define.

Select a variable for the category axis and move it into the Category Axis field. This variable may be numeric, string, or long string.

Select one of the alternatives in the Bars Represent group to specify how the data are represented on the scale axis.

Select a stack variable and move it into the Define Stacks By field. This variable may be numeric, string, or long string. Each stack consists of a bar divided into segments stacked on top of one another. The height of each segment represents its value. There is one stacked bar at every level of the category variable.


Obtaining Stacked Bar Charts Summarizing Separate Variables

This feature requires the Statistics Base option.

From the menus choose:

Graphs
Legacy Dialogs
Bar

Select the icon for Stacked and select Summaries of separate variables.

Click Define.

Select at least two variables and move them into the Bars Represent field. These variables must be numeric.

To change the function used to summarize the variables for the graph, click Change Statistic.

Select a category variable and move it into the Category Axis field. This variable may be numeric, string, or long string.


Obtaining Simple and Clustered Boxplots

This feature requires the Statistics Base option.

From the menus choose:

Graphs
Legacy Dialogs
Boxplot

In the Boxplot dialog box, select the icon for Simple or Clustered.

Select an option under the Data in Chart Are group.

Click Define.

Select variables and options for the chart.

Related Topics

Boxplots
Simple Boxplot Summaries for Groups of Cases
Simple Boxplot Summaries of Separate Variables
Clustered Boxplot Summaries for Groups of Cases
Clustered Boxplot Summaries of Separate Variables


Obtaining Clustered Boxplots Summarizing Groups of Cases

This feature requires the Statistics Base option.

From the menus choose:

Graphs
Legacy Dialogs
Boxplot

Select the icon for Clustered and select Summaries for groups of cases.

Click Define.

Select the variable for which you want boxplots and move it into the Variable field.

Select a variable for the category axis and move it into the Category Axis field. This variable may be numeric, string, or long string.

Select a cluster variable to define a group of boxes and move it into the Define Clusters By field. This variable may be numeric, string, or long string. Each cluster will consist of one box for each value of the cluster variable at every level of the category variable.

You can select a variable and move it into the Label Cases By field. This variable can be numeric or string. If selected, the value labels (or values if no labels are defined) of this variable can be used to label outliers or extreme cases on the plot.


Obtaining Clustered Boxplots Summarizing Separate Variables

This feature requires the Statistics Base option.

From the menus choose:

Graphs
Legacy Dialogs
Boxplot

Select the icon for Clustered and select Summaries of separate variables.

Click Define.

Select at least two variables and move them into the Boxes Represent field. These variables must be numeric.

Select a category variable and move it into the Category Axis field. This variable may be numeric, string, or long string.

You can select a variable and move it into the Label Cases By field. This variable can be numeric or string. If selected, the value labels (or values if no labels are defined) of this variable can be used to label outliers or extreme cases on the plot.


Obtaining Simple Boxplots Summarizing Groups of Cases

This feature requires the Statistics Base option.

From the menus choose:

Graphs
Legacy Dialogs
Boxplot

Select the icon for Simple and select Summaries for groups of cases.

Click Define.

Select the variable for which you want boxplots and move it into the Variable field.

Select a variable for the category axis and move it into the Category Axis field. This variable may be numeric, string, or long string.

You can select a variable and move it into the Label Cases By field. This variable can be numeric or string. If selected, the value labels (or values if no labels are defined) of this variable can be used to label outliers or extreme cases on the plot.


Obtaining Simple Boxplots Summarizing Separate Variables

This feature requires the Statistics Base option.

From the menus choose:

Graphs
Legacy Dialogs
Boxplot

Select the icon for Simple and select Summaries of separate variables.

Click Define.

Select at least one numeric variable for which you want boxplots and move it into Boxes Represent field.

You can select a variable and move it into the Label Cases By field. This variable can be numeric or string. If selected, the value labels (or values if no labels are defined) of this variable can be used to label outliers or extreme cases on the plot.


Obtaining c and u Charts Where Cases Are Subgroups

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Quality Control
Control Charts

Select the icon for c, u and select Cases are subgroups.

Click Define.

Select one numeric variable that contains the total number of nonconformities per subgroup and move it into the Number of Nonconformities field.

You can select one variable to label your subgroups and move it into the Subgroups Labeled By field.

If using control rules, select a variable and move it into the Identify Points By field. This variable identifies points in the rule violations table. Otherwise, the subgroup variable is used.

Click Control Rules and specify rules for identifying out-of-control points. These points have a different shape and color in the chart. The output also includes a rule violations table.

Select one of the Chart options to choose the type of charts to generate.

Select one of the Sample Size options to define the size of your samples.


Obtaining c and u Charts Where Cases Are Units

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Quality Control
Control Charts

Select the icon for c, u and select Cases are units.

Click Define.

Select one variable containing the characteristic to be charted and move it into the Characteristic field.

Select one categorical variable that defines your subgroups and move it into the Subgroups Defined By field.

If using control rules, select a variable and move it into the Identify Points By field. This variable identifies points in the rule violations table. Otherwise, the subgroup variable is used.

Click Control Rules and specify rules for identifying out-of-control points. These points have a different shape and color in the chart. The output also includes a rule violations table.

Select one of the Charts options to choose the type of charts to generate.


Obtaining Control Charts

control charts,control charts,control charts

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Quality Control
Control Charts

In the Control Charts dialog box, select the icon for the type of control chart you want.

Select an option under the Data Organization group.

Click Define.

Select variables and options for the chart.

Related Topics

Control Charts
X-Bar, R, s Cases Are Units
X-Bar, R, s Cases Are Subgroups
Individuals and Moving Range
p, np Cases Are Units
p, np Cases Are Subgroups
c, u Cases Are Units
c, u Cases Are Subgroups


Specifying Options for X-Bar, R, and s Charts

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Quality Control
Control Charts

Select options for the chart type you want and click Define.

In the define control chart dialog box, click Options.


Specifying Rules for Control Charts

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Quality Control
Control Charts

Select options for the chart type you want and click Define.

In the define control chart dialog box, click Control Rules.


Specifying Statistics for X-Bar, R, and s Charts

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Quality Control
Control Charts

Select options for the chart type you want and click Define.

In the define control chart dialog box, click Statistics.


Obtaining Cross-Correlations Charts

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Forecasting
Cross-Correlations

Select at least two variables and move them into the Variables field.

Related Topics

Cross-Correlations
Cross-Correlations Options


Specifying Options for Cross-Correlations Charts

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Forecasting
Cross-Correlations

In the Cross-Correlations dialog box, click Options.


Applying a Template to a New Chart

Select options for the chart you want and click Define.

In the define chart dialog box, select Use chart specifications from and click File.

Enter the name of the file from which you would like to use chart specifications.

Chart templates created in releases prior to 12.0 will not work in release 12.0 or later. You must create new chart templates. Obsolete chart templates usually have an .sct extension. New chart templates have an .sgt extension.

Note: This option is available for most (but not all) chart types.


Specifying Chart Options

Select options for the chart you want and click Define.

In the define chart dialog box, click Options.

Note: Options are available for most (but not all) chart types.


Specifying the Scale Axis Summary Function

Select options for the chart you want and click Define.

In the define chart dialog box, click Change Statistic. (You may need to first select Other statistic (e.g., mean) and select a variable to be summarized.)

Note: This option is available only for Bar, Line, Area, Pie, and High-Low charts and is never available when Values of individual cases is selected.


Specifying Chart Titles

Select options for the chart you want and click Define.

In the define chart dialog box, click Titles.

Type the text that you wish to appear as a Title, Subtitle, or Footnote into the appropriate text box.


Obtaining Difference Area Charts Showing Individual Cases

This feature requires the Statistics Base option.

From the menus choose:

Graphs
Legacy Dialogs
High-Low

Select the icon for Difference Area and select Values of individual cases.

Click Define.

You must select two variables and move them into the 1st and 2nd fields in the Differenced Pair Represents group. These variables must be numeric.

Select one of the alternatives in the Category Labels group to label categories either by Case number or by Variable. If you select Variable, then you must select a variable from the target list and move it into the Variable field. This variable may be numeric, string, or long string.


Obtaining Difference Area Charts Summarizing Groups of Cases

This feature requires the Statistics Base option.

From the menus choose:

Graphs
Legacy Dialogs
High-Low

Select the icon for Difference Area and select Summaries for groups of cases.

Click Define.

Select a variable for the category axis and move it into the Category Axis field. This variable may be numeric, string, or long string.

Select a dichotomous variable and move it into the Define 2 Groups By field. This variable may be numeric, string, or long string.

Select one of the alternatives in the Lines Represent group to specify how the data are represented on the scale axis.


Obtaining Difference Area Charts Summarizing Separate Variables

This feature requires the Statistics Base option.

From the menus choose:

Graphs
Legacy Dialogs
High-Low

Select the icon for Difference Area and select Summaries of separate variables.

Click Define.

Select two variables and move them into the 1st and 2nd fields in the Differenced Pair Represents group. These variables must be numeric.

To change the summary function for a variable, select the variable in the 1st or 2nd field and click Change Statistic.

Select a category variable and move it into the Category Axis field. This variable may be numeric, string, or long string.


Obtaining Error Bar Charts

This feature requires the Statistics Base option.

From the menus choose:

Graphs
Legacy Dialogs
Error Bar

In the Error Bar dialog box, select the icon for Simple or Clustered.

Select an option under the Data in Chart Are group.

Click Define.

Select variables and options for the chart.

Related Topics

Error Bar Charts
Simple Error Bar Summaries for Groups of Cases
Simple Error Bar Summaries of Separate Variables
Clustered Error Bar Summaries for Groups of Cases
Clustered Error Bar Summaries of Separate Variables


Obtaining Clustered Error Bar Charts Summarizing Groups of Cases

This feature requires the Statistics Base option.

From the menus choose:

Graphs
Legacy Dialogs
Error Bar

Select the icon for Clustered and select Summaries for groups of cases.

Click Define.

Select one variable and move it into the Variable field. This variable must be numeric.

Select a variable for the category axis and move it into the Category Axis field. This variable may be numeric, string, or long string.

Select a cluster variable used to group bars and move it into the Define Clusters By field. This variable may be numeric, string, or long string. Each cluster will consist of one error bar for each value of the cluster variable at every level of the category variable.

Select one of the alternatives from the Bars Represent group to choose whether the error bars represent Confidence interval for mean, Standard error of mean, or Standard deviation.


Obtaining Clustered Error Bar Charts Summarizing Separate Variables

This feature requires the Statistics Base option.

From the menus choose:

Graphs
Legacy Dialogs
Error Bar

Select the icon for Clustered and select Summaries of separate variables.

Click Define.

Select at least two variables and move them into the Variables field. These variables must be numeric.

Select a category variable and move it into the Category Axis field. This variable may be numeric, string, or long string.

Select one of the alternatives from the Bars Represent group to choose whether the error bars represent Confidence interval for mean, Standard error of mean, or Standard deviation.


Obtaining Simple Error Bar Charts Summarizing Groups of Cases

This feature requires the Statistics Base option.

From the menus choose:

Graphs
Legacy Dialogs
Error Bar

Select the icon for Simple and select Summaries for groups of cases.

Click Define.

Select one variable and move it into the Variable field. This variable must be numeric.

Select one variable and move it into the Category Axis field. This variable may be numeric, string, or long string. Error bars for the variable are charted for each category on the Category Axis.

Select one of the alternatives from the Bars Represent group to choose whether the error bars represent Confidence interval for mean, Standard error of mean, or Standard deviation.


Obtaining Simple Error Bar Charts Summarizing Separate Variables

This feature requires the Statistics Base option.

From the menus choose:

Graphs
Legacy Dialogs
Error Bar

Select the icon for Simple and select Summaries of separate variables.

Click Define.

Select at least one numeric variable and move it into the Error Bars field. Error bars are charted for every variable in this field.

Select one of the alternatives from the Bars Represent group to choose whether the error bars represent Confidence interval for mean, Standard error of mean, or Standard deviation.


Obtaining High-Low, Difference Area, and Range Bar Charts

This feature requires the Statistics Base option.

From the menus choose:

Graphs
Legacy Dialogs
High-Low

In the High-Low Charts dialog box, select the icon for the chart type you want.

Select an option under the Data in Chart Are group.

Click Define.

Select variables and options for the chart.

Related Topics

High-Low Charts
Simple High-Low-Close Summaries for Groups of Cases
Simple High-Low-Close Summaries of Separate Variables
Simple High-Low-Close Values of Individual Cases
Clustered High-Low-Close Summaries for Groups of Cases
Clustered High-Low-Close Summaries of Separate Variables
Clustered High-Low-Close Values of Individual Cases
Simple Range Bar Summaries for Groups of Cases
Simple Range Bar Summaries of Separate Variables
Simple Range Bar Values of Individual Cases
Clustered Range Bar Summaries for Groups of Cases
Clustered Range Bar Summaries of Separate Variables
Clustered Range Bar Values of Individual Cases
Difference Area Summaries for Groups of Cases
Difference Area Summaries of Separate Variables
Difference Area Values of Individual Cases


Obtaining Clustered High-Low Charts Showing Individual Cases

This feature requires the Statistics Base option.

From the menus choose:

Graphs
Legacy Dialogs
High-Low

Select the icon for Clustered high-low-close and select Values of individual cases.

Click Define.

To define variable sets, select one variable representing the high value and move it into the High field. Select one variable representing the low value and move it into the Low field. These variables must be numeric.

You may also select a variable representing the closing value and move it into the Close field.

Click Next to define another variable set.

Select one of the alternatives in the Category Labels group to label categories either by Case number or by Variable. If you select Variable, then you must select a variable from the target list and move it into the Variable field. This variable may be numeric, string, or long string.


Obtaining Clustered High-Low Charts Summarizing Groups of Cases

This feature requires the Statistics Base option.

From the menus choose:

Graphs
Legacy Dialogs
High-Low

Select the icon for Clustered high-low-close and select Summaries for groups of cases.

Click Define.

Select one variable representing the high value and move it into the High field. Select one variable representing the low value and move it into the Low field. These variables must be numeric.

You may also select a variable representing the closing value and move it into the Close field.

To change the summary function for a variable, select the variable in the Bars Represent field and click Change Statistic.

Select a category variable and move it into the Category Axis field. This variable may be numeric, string, or long string.

Select a cluster variable used to group bars and move it into the Define Clusters By field. This variable must be numeric. Each cluster will consist of one bar for each value of the cluster variable at every level of the category variable.


Obtaining Clustered High-Low Charts Summarizing Separate Variables

This feature requires the Statistics Base option.

From the menus choose:

Graphs
Legacy Dialogs
High-Low

Select the icon for Clustered high-low-close and select Summaries of separate variables.

Click Define.

Select one variable representing the high value and move it into the High field. Select one variable representing the low value and move it into the Low field. These variables must be numeric.

You may also select a variable representing the closing value and move it into the Close field.

Click Next to define another variable set.

To change the summary function for a variable, select the variable in the Bars Represent field and click Change Statistic.

Select a category variable and move it into the Category Axis field. This variable may be numeric, string, or long string.


Obtaining Simple High-Low Charts Showing Individual Cases

This feature requires the Statistics Base option.

From the menus choose:

Graphs
Legacy Dialogs
High-Low

Select the icon for Simple high-low-close and select Values of individual cases.

Click Define.

Select one variable representing the high for each case and move it into the High field. Select one variable representing the low for each case and move it into the Low field. These variables must be numeric.

You may also select a variable representing the closing value for each case and move it into the Close field.

Select one of the alternatives in the Category Labels group to label categories either by Case number or by Variable. If you select Variable, then you must select a variable from the target list and move it into the Variable field. This variable may be numeric, string, or long string.


Obtaining Simple High-Low Charts Summarizing Groups of Cases

This feature requires the Statistics Base option.

From the menus choose:

Graphs
Legacy Dialogs
High-Low

Select the icon for Simple high-low-close and select Summaries for groups of cases.

Select one variable and move it into the Category Axis field. This variable may be numeric, string, or long string.

Select one variable and move it into the Define High-Low-Close By field. This variable may be numeric, string, or long string.

Select one of the alternatives in the Bars Represent group to specify how the data are represented on the scale axis.


Obtaining Simple High-Low Charts Summarizing Separate Variables

This feature requires the Statistics Base option.

From the menus choose:

Graphs
Legacy Dialogs
High-Low

Select the icon for Simple high-low-close and select Summaries of separate variables.

Click Define.

Select one variable representing the high value and move it into the High field. Select one variable representing the low value and move it into the Low field. These variables must be numeric.

You may also select a variable representing the closing value and move it into the Close field.

To change the summary function for a variable, select the variable in the Bars Represent field and click Change Statistic.

Select a category variable and move it into the Category Axis field. This variable may be numeric, string, or long string.


Obtaining Histograms

This feature requires the Statistics Base option.

From the menus choose:

Graphs
Legacy Dialogs
Histogram

Select a numeric variable for Variable in the Histogram dialog box.

Select Display normal curve to display a normal curve on the histogram.

Related Topics

Histograms


Obtaining Individuals and Moving Range Control Charts

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Quality Control
Control Charts

Select the icon for Individuals, Moving Range.

Click Define.

Select one numeric variable that contains the measurements for the process being analyzed and move it into the Process Measurement field.

You can select one variable to label your subgroups and move it into the Subgroups Labeled By field.

If using control rules, select a variable and move it into the Identify Points By field. This variable identifies points in the rule violations table. Otherwise, the subgroup variable is used.

Click Control Rules and specify rules for identifying out-of-control points. These points have a different shape and color in the charts. The output also includes rule violations tables for the primary and secondary charts.

Select one of the Charts options to choose the type of charts to generate.

Enter a value into Span to specify the number of cases used in calculating the control limits for both chart types and the span of time units used to calculate the moving range.


Specifying Options for Individuals and Moving Range Charts

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Quality Control
Control Charts

Select the icon for Individuals, Moving Range. (Cases are units will be selected automatically.)

Click Define.

In the define chart dialog box, click Options.


Specifying Statistics for Individuals and Moving Range Charts

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Quality Control
Control Charts

Select the icon for Individuals, Moving Range. (Cases are units will be selected automatically.)

Click Define.

In the define chart dialog box, click Statistics.


Obtaining Simple, Multiple, or Drop-Line Charts

This feature requires the Statistics Base option.

From the menus choose:

Graphs
Legacy Dialogs
Line

In the Line Charts dialog box, select the icon for Simple, Multiple, or Drop-line.

Select an option under the Data in Chart Are group.

Click Define.

Select variables and options for the chart.

Related Topics

Line Charts
Simple Line Summaries for Groups of Cases
Simple Line Summaries of Separate Variables
Simple Line Values of Individual Cases
Multiple Line Summaries for Groups of Cases
Multiple Line Summaries of Separate Variables
Multiple Line Values of Individual Cases
Drop-Line Summaries for Groups of Cases
Drop-Line Summaries of Separate Variables
Drop-Line Values of Individual Cases


Obtaining Drop-Line Charts Showing Individual Cases

This feature requires the Statistics Base option.

From the menus choose:

Graphs
Legacy Dialogs
Line

Select the icon for Drop-line and select Values of individual cases.

Click Define.

Select at least two variables and move them into the Points Represent field. These variables must be numeric.

Select one of the alternatives in the Category Labels group to label categories either by Case number or by Variable. If you select Variable, then you must select a variable from the target list and move it into the Variable field. This variable may be numeric, string, or long string.


Obtaining Drop-Line Charts Summarizing Groups of Cases

This feature requires the Statistics Base option.

From the menus choose:

Graphs
Legacy Dialogs
Line

Select the icon for Drop-line and select Summaries for groups of cases.

Click Define.

Select a variable for the category axis and move it into the Category Axis field. This variable may be numeric, string, or long string.

Select one of the alternatives in the Points Represent group to specify how the data are represented on the scale axis.

To define lines, you must select a variable and move it into the Define Points By field. Markers are generated for each category of the line variable, with vertical lines connecting the markers within each group. This variable may be numeric, string, or long string.


Obtaining Drop-Line Charts Summarizing Separate Variables

This feature requires the Statistics Base option.

From the menus choose:

Graphs
Legacy Dialogs
Line

Select the icon for Drop-line and select Summaries of separate variables.

Click Define.

Select at least two variables and move them into the Points Represent field. These variables must be numeric.

Click Change Statistic to define the function used to summarize the variables for the chart.

Select a category variable and move it into the Category Axis field. This variable may be numeric, string, or long string.


Obtaining Multiple Line Charts Showing Individual Cases

This feature requires the Statistics Base option.

From the menus choose:

Graphs
Legacy Dialogs
Line

Select the icon for Multiple and select Values of individual cases.

Click Define.

Select at least two variables and move them into the Lines Represent field. A separate line is generated for each variable in this field. These variables must be numeric.

Select one of the alternatives in the Category Labels group to label categories either by Case number or by Variable. If you select Variable, then you must select a variable from the target list and move it into the Variable field. This variable may be numeric, string, or long string.


Obtaining Multiple Line Charts Summarizing Groups of Cases

This feature requires the Statistics Base option.

From the menus choose:

Graphs
Legacy Dialogs
Line

Select the icon for Multiple and select Summaries for groups of cases.

Click Define.

Select a variable for the category axis and move it into the Category Axis field. This variable may be numeric, string, or long string.

Select one of the alternatives in the Lines Represent group to specify how the data are represented on the scale axis.

To define lines, you must select a variable and move it into the Define Lines By field. Separate lines are generated for each category of the line variable. This variable may be numeric, string, or long string.


Obtaining Multiple Line Charts Summarizing Separate Variables

This feature requires the Statistics Base option.

From the menus choose:

Graphs
Legacy Dialogs
Line

Select the icon for Multiple and select Summaries of separate variables.

Click Define.

Select at least two variables and move them into the Lines Represent field. A separate line is generated for each variable in this field. These variables must be numeric.

Click Change Statistic to define the function used to summarize the variables for the chart.

Select a category variable and move it into the Category Axis field. This variable may be numeric, string, or long string.


Obtaining Simple Line Charts Showing Individual Cases

This feature requires the Statistics Base option.

From the menus choose:

Graphs
Legacy Dialogs
Line

Select the icon for Simple and select Values of individual cases.

Click Define.

Select one variable and move it into the Line Represents field. This variable must be a numeric variable.

Select one of the alternatives in the Category Labels group to label categories either by Case number or by Variable. If you select Variable, then you must select a variable from the target list and move it into the Variable field. This variable may be numeric, string, or long string.


Obtaining Simple Line Charts Summarizing Groups of Cases

This feature requires the Statistics Base option.

From the menus choose:

Graphs
Legacy Dialogs
Line

Select the icon for Simple and select Summaries for groups of cases.

Click Define.

Select a variable for the category axis and move it into the Category Axis field. This variable may be numeric, string, or long string.

Select one of the alternatives in the Line Represents group to specify how the data are represented on the scale axis.


Obtaining Simple Line Charts Summarizing Separate Variables

This feature requires the Statistics Base option.

From the menus choose:

Graphs
Legacy Dialogs
Line

Select the icon for Simple and select Summaries of separate variables.

Click Define.

Select at least two variables and move them into the Line Represents field. These variables must be numeric.

To change the summary function for a variable, select the variable in the Line Represents field and click Change Statistic.


Obtaining Mixed Charts

Create a clustered bar chart of groups of cases or summaries of separate variables. When you are creating a chart of groups of cases, make sure that the groups you want to change to lines are defined by the Define Cluster By variable.

Double-click the chart in the Output Viewer to open it in the Chart Editor.

In the Chart Editor, click the swatch associated with the group or variable that you want to convert to a line.

From the Chart Editor menus choose:

Transform
Line


Obtaining P-P Probability Plots

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Descriptive Statistics
P-P

Select one or more numeric variables and move them onto the Variables field.

Select a test distribution.

Optionally, you can select transformation options to obtain probability plots for transformed values and specify a method for calculating expected distributions.


Obtaining Q-Q Probability Plots

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Descriptive Statistics
Q-Q

Select one or more numeric variables and move them onto the Variables field.

Select a test distribution.

Optionally, you can select transformation options to obtain probability plots for transformed values and specify a method for calculating expected distributions.


Specifying Options for p, np, c, and u Charts

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Quality Control
Control Charts

Select the icon for p, np or c, u, and select either Cases are units or Cases are subgroups.

Click Define.

In the define chart dialog box, click Options.


Obtaining p and np Charts Where Cases Are Subgroups

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Quality Control
Control Charts

Select the icon for p, np and select Cases are subgroups.

Click Define.

Select one numeric variable and move it into the Number Nonconforming field.

You can select one variable to label your subgroups and move it into the Subgroups Labeled By field.

If using control rules, select a variable and move it into the Identify Points By field. This variable identifies points in the rule violations table. Otherwise, the subgroup variable is used.

Click Control Rules and specify rules for identifying out-of-control points. These points have a different shape and color in the chart. The output also includes a rule violations table.


Obtaining p and np Charts Where Cases Are Units

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Quality Control
Control Charts

Select the icon for p, np and select Cases are units.

Click Define.

Select one variable containing the characteristic to be charted and move it into the Characteristic field. This variable may be numeric, string, or long string.

The Value to Count group allows you to define the value to be counted and charted. If you select Nonconforming, the value specified for Value to Count represents nonconforming units. If you select Conforming, the value specified for Value to Count represents conforming units. Enter the value into the Value text box.

Select one categorical variable that defines your subgroups and move it into the Subgroups Defined By field.

If using control rules, select a variable and move it into the Identify Points By field. This variable identifies points in the rule violations table. Otherwise, the subgroup variable is used.

Click Control Rules and specify rules for identifying out-of-control points. These points have a different shape and color in the chart. The output also includes a rule violations table.

Select one of the Charts options to choose the type of charts to generate.


Obtaining Simple and Stacked Pareto Charts

pareto charts,pareto charts,pareto charts

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Quality Control
Pareto Charts

In the Pareto Charts dialog box, select the icon for a Simple or Stacked pareto chart.

Select an option under the Data in Chart Are group.

Click Define.

Select variables and options for the chart.

Related Topics

Pareto Charts
Simple Pareto Counts or Sums for Groups of Cases
Simple Pareto Sums of Separate Variables
Simple Pareto Values of Individual Cases
Stacked Pareto Counts or Sums for Groups of Cases
Stacked Pareto Sums of Separate Variables
Stacked Pareto Values of Individual Cases


Obtaining Simple Pareto Charts Showing Individual Cases

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Quality Control
Pareto Charts

Select the icon for Simple and select Values of individual cases.

Click Define.

Select one variable and move it into the Values field. This variable must be a numeric variable.

Select one of the alternatives in the Category Labels group to label categories either by Case number or by Variable. If you select Variable, then you must select a variable from the target list and move it into the Variable field. This variable may be numeric, string, or long string.


Obtaining Simple Pareto Charts Showing Counts or Sums for Groups of Cases

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Quality Control
Pareto Charts

Select the icon for Simple and select Counts or sums for groups of cases.

Click Define.

Select a variable for the category axis and move it into the Category Axis field. This variable may be numeric, string, or long string.

Select one of the alternatives in the Bars Represent group to specify how the data are represented on the scale axis.


Obtaining Simple Pareto Charts Showing Sums of Separate Variables

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Quality Control
Pareto Charts

Select the icon for Simple and select Sums of separate variables.

Click Define.

Select at least two variables and move them into the Variables field. These variables must be numeric.


Obtaining Stacked Pareto Charts Showing Individual Cases

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Quality Control
Pareto Charts

Select the icon for Stacked and select Values of individual cases.

Click Define.

Select at least two variables and move them into the Values field. A separate segment within each stack is generated for each variable in this field. These variables must be numeric.

Select one of the alternatives in the Category Labels group to label categories either by Case number or by Variable. If you select Variable, then you must select a variable from the target list and move it into the Variable field. This variable may be numeric, string, or long string.


Obtaining Stacked Pareto Charts Showing Counts or Sums for Groups of Cases

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Quality Control
Pareto Charts

Select the icon for Stacked and select Counts or sums for groups of cases.

Click Define.

Select a variable for the category axis and move it into the Category Axis field. This variable may be numeric, string, or long string.

Select one of the alternatives in the Bars Represent group to specify how the data are represented on the scale axis.

You must select a variable to define stacks and move it into the Define Stacks By field. Separate stacks are generated for each category of the variable. This variable may be numeric, string, or long string.


Obtaining Stacked Pareto Charts Showing Sums of Separate Variables

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Quality Control
Pareto Charts

Select the icon for Stacked and select Sums of separate variables.

Click Define.

Select at least two variables and move them into the Variables field. A separate segment within each stack is generated for each variable in this field. These variables must be numeric.

Select a category variable and move it into the Category Axis field. This variable may be numeric, string, or long string.


Obtaining Pie Charts

This feature requires the Statistics Base option.

From the menus choose:

Graphs
Legacy Dialogs
Pie

In the Pie Charts dialog box, select an option under the Data in Chart Are group.

Click Define.

Select variables and options for the chart.

Related Topics

Pie Charts
Pie Summaries for Groups of Cases
Pie Summaries of Separate Variables
Pie Values of Individual Cases


Obtaining Pie Charts Showing Individual Cases

This feature requires the Statistics Base option.

From the menus choose:

Graphs
Legacy Dialogs
Pie

Select Values of individual cases.

Click Define.

Select one variable and move it into the Slices Represent field. This variable must be numeric.

Select one of the alternatives in the Slice Labels group to label slices either by Case number or by Variable. If you select Variable, then you must select a variable from the target list and move it into the Variable field. This variable may be numeric, string, or long string.


Obtaining Pie Charts Summarizing Groups of Cases

This feature requires the Statistics Base option.

From the menus choose:

Graphs
Legacy Dialogs
Pie

Select Summaries for groups of cases.

Click Define.

Select a variable and move it into the Define Slices By field. This variable may be numeric, string, or long string.

Select one of the alternatives in the Slices Represent group to specify how the data are represented in the sections of the pie chart.


Obtaining Pie Charts Summarizing Separate Variables

This feature requires the Statistics Base option.

From the menus choose:

Graphs
Legacy Dialogs
Pie

Select Summaries of separate variables.

Click Define.

Select at least two variables and move them into the Slices field. These variables must be numeric.


Population Pyramids

A population pyramid shows the distribution of a variable across categories. It is two back-to-back histograms (when the distribution variable is scale) or two back-to-back bar charts (when the distribution variable is categorical), with the bars in the chart being horizontal rather than vertical. When there are more than two categories, creating the chart results in more than one population pyramid, depending on the number of categories. For example, if there were four categories, there would be two population pyramids, one for each category pair.

Population pyramids are often used for demographic data. A common population pyramid displays the counts for age groups in each gender, with the youngest age at the bottom. A viewer can easily distinguish differences among the age groups and between genders because of the different bar lengths and the symmetry between halves.

Example

Related Topics

Obtaining Population Pyramids
Scale Options for Population Pyramids
Chart Options
XGRAPH


Obtaining Clustered Range Bar Charts Showing Individual Cases

This feature requires the Statistics Base option.

From the menus choose:

Graphs
Legacy Dialogs
High-Low

Select the icon for Clustered range bar and select Values of individual cases.

Click Define.

Select two variables and move them into the 1st and 2nd fields in the Pair group. These variables must be numeric.

Click Next to define another variable. (You can click Previous to return to previous variables.)

Select one of the alternatives in the Category Labels group to label categories either by Case number or by Variable. If you select Variable, then you must select a variable from the target list and move it into the Variable field. This variable may be numeric, string, or long string.


Obtaining Clustered Range Bar Charts Summarizing Groups of Cases

This feature requires the Statistics Base option.

From the menus choose:

Graphs
Legacy Dialogs
High-Low

Select the icon for Clustered range bar and select Summaries for groups of cases.

Click Define.

Select the first variable from which you wish to form bars and move it into the 1st field. Select the second variable from which you wish to form bars and move it into the 2nd field. These variables must be numeric.

To change the summary function for a variable, select the variable in the Bars Represent group and click Change Statistic.

Select a variable for the category axis and move it into the Category Axis field. This variable may be numeric, string, or long string.

Select a cluster variable used to group bars and move it into the Define Clusters By field. This variable must be numeric. Each cluster will consist of one bar for each value of the cluster variable at every level of the category variable.


Obtaining Clustered Range Bar Charts Summarizing Separate Variables

This feature requires the Statistics Base option.

From the menus choose:

Graphs
Legacy Dialogs
High-Low

Select the icon for Clustered range bar and select Summaries of separate variables.

Click Define.

Select two variables and move them into the 1st and 2nd fields in the Pair group. These variables must be numeric.

Click Next to define another variable pair. (You can click Previous to return to previous variables.)

To change the summary function for a variable, select the variable in the Pair group and click Change Statistic.

Select a variable for the category axis and move it into the Category Axis field. This variable may be numeric, string, or long string.


Obtaining Simple Range Bar Charts Showing Individual Cases

This feature requires the Statistics Base option.

From the menus choose:

Graphs
Legacy Dialogs
High-Low

Select the icon for Simple range bar and select Values of individual cases.

Click Define.

Select the two variables that the range bars represent and move them into the fields in the Bar Pair Represents group. These variables must be numeric.

Select one of the alternatives in the Category Labels group to label categories either by Case number or by Variable. If you select Variable, then you must select a variable from the target list and move it into the Variable field. This variable may be numeric, string, or long string.


Obtaining Simple Range Bar Charts Summarizing Groups of Cases

This feature requires the Statistics Base option.

From the menus choose:

Graphs
Legacy Dialogs
High-Low

Select the icon for Simple range bar and select Summaries for groups of cases.

Click Define.

Select one variable and move it into the Category Axis field. Range bars are charted for each category of this variable. This variable may be numeric, string, or long string.

Select one dichotomous variable and move it into the Define 2 Groups By field. This variable defines the two groups that the bars represent. This variable may be numeric, string, or long string.

Select one of the alternatives in the Bars Represent group to specify how the data are represented on the scale axis.


Obtaining Simple Range Bar Charts Summarizing Separate Variables

This feature requires the Statistics Base option.

From the menus choose:

Graphs
Legacy Dialogs
High-Low

Select the icon for Simple range bar and select Summaries of separate variables.

Click Define.

You must select two variables and move them into the 1st and 2nd fields in the Bars Represent group. These variables must be numeric.

To change the summary function for a variable, select the variable in the Bars Represent field and click Change Statistic.

Select a variable for the category axis and move it into the Category Axis field. This variable may be numeric, string, or long string.


Obtaining Scatterplots

This feature requires the Statistics Base option.

From the menus choose:

Graphs
Legacy Dialogs
Scatter/Dot

In the Scatterplot dialog box, select the icon for Simple, Overlay, Matrix, 3-D, or Simple Dot.

Click Define.

Select variables and options for the chart.

Related Topics

Scatterplots
Simple Scatterplots
Overlay Scatterplots
Scatterplot Matrix
3-D Scatterplots
Simple Dot Plots


Obtaining 3-D Scatterplots

This feature requires the Statistics Base option.

From the menus choose:

Graphs
Legacy Dialogs
Scatter/Dot

Select the icon for 3-D.

Click Define.

Select one variable for the y axis, one for the x axis, and one for the z axis. These variables must be numeric but should not be in date format.


Obtaining Simple Dot Plots

This feature requires the Statistics Base option.

From the menus choose:

Graphs
Legacy Dialogs
Scatter/Dot

Select the icon for Simple Dot.

Click Define.

Select a variable for the x axis. This variable must be numeric and can be categorical or scale.

To Change the Measurement Level of a Variable Collapse Hide details

To Change the Measurement Level of a Variable

Right-click the variable in the variable list (you can do this only in the variable list, before moving the variable to a specific field).

Select Categorical or Scale from the context menu.


Obtaining a Scatterplot Matrix

This feature requires the Statistics Base option.

From the menus choose:

Graphs
Legacy Dialogs
Scatter/Dot

Select the icon for Matrix.

Click Define.

Select at least two Matrix Variables. These variables must be numeric but should not be in date format.

You may select a variable and move it into the Set Markers By field. Each value of this variable is marked by a different symbol on the scatterplot. This variable may be numeric or string.

You can select a numeric or a string variable and move it into the Label Cases By field. You can label points on the plot with this variable.


Obtaining Overlay Scatterplots

This feature requires the Statistics Base option.

From the menus choose:

Graphs
Legacy Dialogs
Scatter/Dot

Select the icon for Overlay.

Click Define.

Select each variable separately. The first variable selected will appear in the Y Variable cell of Pair 1, the second variable selected will appear in the X Variable cell of Pair 1, and so on.

You can select a numeric or a string variable and move it into the Label Cases By field. You can label points on the plot with this variable.


Obtaining Simple Scatterplots

This feature requires the Statistics Base option.

From the menus choose:

Graphs
Legacy Dialogs
Scatter/Dot

Select the icon for Simple.

Click Define.

You must select a variable for the y axis and a variable for the x axis. These variables must be numeric but should not be in date format.

You can select a variable and move it into the Set Markers By field. Each value of this variable is marked by a different symbol on the scatterplot. This variable may be numeric or string.

You can select a numeric or a string variable and move it into the Label Cases By field. You can label points on the plot with this variable.


Obtaining Sequence Charts

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Forecasting
Sequence Charts

Select one or more numeric variables and move them into the Variables field.

You can select a categorical variable and move it into the Time Axis Labels field. This variable may be numeric, string, or long string. The values of this variable are used to label the time axis.

Related Topics

Sequence Charts
Sequence Charts Format
Sequence Charts Time Axis Reference Lines


Specifying Format Options for Sequence Charts

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Forecasting
Sequence Charts

In the Sequence Charts dialog box, click Format.


Adding Time Axis Reference Lines to Sequence Charts

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Forecasting
Sequence Charts

In the Sequence Charts dialog box, click Time Lines.


Obtaining X-Bar, R, and s Charts Summarizing Two or More Sample Variables

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Quality Control
Control Charts

Select the icon for X-bar, R, s and select Cases are subgroups.

Click Define.

Select two or more numeric variables that contain the measurements for samples and move them to the Samples field.

You can select one variable to label your subgroups and move it to the Subgroups Labeled By field. This variable may be numeric, string, or long string.

If using control rules, select a variable and move it into the Identify Points By field. This variable identifies points in the rule violations table. Otherwise, the subgroup variable is used.

Click Control Rules and specify rules for identifying out-of-control points. These points have a different shape and color in the charts. The output also includes rule violations tables for the primary and secondary charts.

Select one of the options in the Charts group to choose the type of charts to generate.


Obtaining X-Bar, R, and s Charts Summarizing a Single Process Measurement Variable

This feature requires the Statistics Base option.

From the menus choose:

Analyze
Quality Control
Control Charts

Select the icon for X-bar, R, s and select Cases are units.

Click Define.

Select one numeric variable that contains the measurements for the process being analyzed and move it into the Process Measurement field.

Select the categorical variable that defines your subgroups and move it into the Subgroups Defined By field.

If using control rules, select a variable and move it into the Identify Points By field. This variable identifies points in the rule violations table. Otherwise, the subgroup variable is used.

Click Control Rules and specify rules for identifying out-of-control points. These points have a different shape and color in the charts. The output also includes rule violations tables for the primary and secondary charts.

Select one of the options in the Charts group to choose the type of charts to generate.


Means: Related Procedures

Use the One-Way ANOVA procedure to obtain a one-way analysis of variance, a priori contrasts, post hoc range tests, and pairwise multiple comparisons. For an analysis of variance with more than one factor, use the GLM Univariate procedure. To list the cases in each subgroup, use the Report Summaries in Rows procedure.

Related Topics

Report Summaries in Rows
One-Way ANOVA
Explore
Summarize
Means
Means Options


Mixed Charts

A mixed chart graphs separate variables or groups of cases as a combination of lines and bars. This is useful when you want to distinguish the separate variables or groups of cases more clearly.

Although there isn't a specific option for creating mixed charts, you can create them by creating a clustered bar chart and using the Chart Editor to change some of the bars to lines.

Example

Related Topics

Obtaining Mixed Charts


Multiple Line: Values of Individual Cases

Two or more variables are summarized for each case.

Minimum specifications

Two or more Lines Represent variables (Var 1, Var 2).


Multiple Line: Summaries for Groups of Cases Example

Categories of one variable are summarized within categories of another variable. The y-height of the points is determined by the Lines Represent option.

Minimum specifications

• A Category Axis variable (Category Variable 1).

• A Define Lines by variable (Cat Var 2).


Multiple Line: Summaries of Separate Variables Example

Two or more variables are summarized within categories of another variable.

Minimum specifications

• Two or more Lines Represent variables (Var 1, Var 2).

• A Category Axis variable (Category Variable).


Previous [image] [image] Next

Name Labels Example


What's New in Version 7.0

new features,new features,new features
version 7.0,version 7.0,version 7.0

Version 7.0 takes full advantage of the improved features of Windows 95 to bring you:

New output display. Most of the statistical procedures in the Core system have been improved to provide presentation-quality results.

Pivot tables. Pivot table output allows you to view your results in many different ways. You can switch row and column variables, selectively show and hide categories, and manipulate multidimensional tables.

Easy access context menus. A simple right-mouse button click anywhere in a pivot table opens a context menu that provides access to common editing tasks right at your fingertips.

Improved online Help. Right-mouse button context menus also provide access to online Help on individual controls on dialog boxes and selected items in output results.

Unconstrained multiple document interface.PASW Statistics windows are no longer constrained to fit inside an overall application window with a single menu bar and toolbar. Each window has its own menus and toolbars and can be placed anywhere on the screen.

New Summarize procedure. Create presentation-quality listings of the cases in your data file, combined with summary statistics for subgroups of cases defined by one or more grouping variables. You can also suppress display of cases to obtain totals and subtotals for all combinations of the selected grouping variables.

New GLM procedure. The general linear model (GLM) is a flexible statistical model incorporating analyses involving normally distributed dependent variables and combinations of categorical and continuous predictor variables.

New output display with pivot table manipulation

Related Topics

What's New in Version 18?
What's New in Version 17.0?
What's New in Version 16.0?
What's New in Version 15.0?
What's New in Version 14.0.1
What's New in Version 14.0?
What's New in Version 13.0?
What's New in Version 12.0?
What's New in Version 11.5?
What's New in Version 11.0
What's New in Version 10.0.5
What's New in Version 10.0
What's New in Version 9.0
What's New in Version 8.0
What's New in Version 7.5


One-Sample Kolmogorov-Smirnov Test: Related Procedures

When the parameters of the test distribution are estimated from the sample, the distribution of the test statistic changes. Tests for normality that make this correction are available using the Explore procedure. Also, see the section "NPAR TESTS Command Additional Features (One-Sample Kolmogorov-Smirnov Test)."

Related Topics

Explore
One-Sample Kolmogorov-Smirnov Test
One-Sample Kolmogorov-Smirnov Test Options
One-Sample Kolmogorov-Smirnov Test
One-Sample Kolmogorov-Smirnov Test Options


One-Sample T Test: Related Procedures

If you want to test a sample mean from one group of cases against that from another group of cases, use the Independent-Samples T Test procedure. To test the means of two variables estimated from the same sample, use the Paired-Samples T Test procedure.

Related Topics

Paired-Samples T Test
Independent-Samples T Test
One-Sample T Test
One-Sample T Test Options


One-Way ANOVA: Related Procedures

Use the Explore procedure to screen your data. Study the shape of each group's distribution, and if the groups are not normally distributed, use the Kruskal-Wallis test in the K Independent Samples procedure, available in the Nonparametric Tests procedure. If your groups are normally distributed but two or more variables are used to form groups, use the GLM Univariate procedure. If your groups are not independent--for example, if you observe the same person under several conditions--use the GLM Repeated Measures procedure, available in the Advanced Statistics option.

Related Topics

Tests for Several Independent Samples
Means
One-Way ANOVA
One-Way ANOVA Contrasts
One-Way ANOVA Post Hoc Tests
One-Way ANOVA Options


p and np Control Charts: Cases are Subgroups Example

A single characteristic variable is summarized. Each point represents the proportion or number of nonconforming units within a subgroup.

Minimum specification

• A Characteristic variable that contains the number of nonconforming units in each subgroup.

• A constant or variable defining the subgroup size.


p and np Control Charts: Cases are Units Example

A single characteristic variable is summarized within subgroups of cases defined by a categorical variable. Each point represents the proportion or number of nonconforming units within a subgroup.

Minimum specification

• A Characteristic variable containing the conforming or nonconforming value (either numeric or string).

• A value indicating conforming or nonconforming.

• A Subgroups Defined by variable.


Paired-Samples T Test: Related Procedures

To test a sample mean from one group of cases against that from another group of cases, use the Independent-Samples T Test. If you want to compare a sample mean against a constant value, use the One-Sample T Test. If the data in the test variable are not quantitative, but ordered, or are not normally distributed, use the Wilcoxon signed-rank test (select 2 Related Samples from the Nonparametric Tests submenu).

Related Topics

Two-Related-Samples Tests
Independent-Samples T Test
One-Sample T Test
Paired-Samples T Test
Paired-Samples T Test Options


Paneled Chart Example

For most charts, you have the option to panel by one or more categorical variables when you create a chart. A paneled chart consists of rows and/or columns of related subcharts. In the example, the bar chart is paneled by rows using a categorical variable with two categories. The resulting subcharts share the same axes, so you can easily compare the results across categories.


Paneled Charts

Example

A paneled chart is a grid of subcharts. The subcharts are of the same chart type and share axes, but for a different group of one or more categorical variables. For example, a paneled bar chart might show one bar chart for females and one for males. The paneling can help you compare data patterns across groups.

To Panel a Chart Collapse Hide details

To Panel a Chart

Select options for the chart you want and click Define.

In the define chart dialog box, move one or more categorical variables to the Panel By fields. For some charts, you can panel only by rows or by columns. For other charts, you can panel by both.

Select Nest variables (no empty rows/columns) if the variables in the rows and/or columns are nested. A panel is created only for each nesting, not every combination of categories.

A variable is nested if its meaning depends on the value of another variable. For example, a city name is nested in a state name. "Springfield" has a meaning only in conjunction with a specific state. When nesting, make sure the parent variable (for example, state) is above the child variable (for example, city) in the Panel By field. Otherwise, the parent will be nested in the child.

If you don't select Nest variables (no empty rows/columns), the variables are crossed, which means that a panel is created for every combination of the categories in each variable. This might result in blank rows or columns if the variables should be nested.

Note: This option is available for most (but not all) chart types.

For charts of percents: The base for percents is the total number of cases. Therefore, the percents shown in each panel are percents of all cases, not just those in each panel.

For pareto charts: Because each panel has the same values on the categorical axis, bars in a paneled pareto chart are not arranged in descending order for each panel. The bars are arranged in descending order based on the overall count for each category.


Partial Correlations: Related Procedures

If there is reason to suspect that the variables are related in a nonlinear way, the partial correlation coefficient is not an appropriate statistic to calculate. Try transforming the data. Use the Explore procedure to screen your data for symmetry and outliers (which can cause misleading results). If your data do not appear symmetric, try transforming them.

Related Topics

Explore
Partial Correlations
Partial Correlations Options


Pie Charts Examples

A. Summaries for Groups of Cases

Categories of a single variable are summarized. Slice size is determined by the Slices Represent option.

Minimum specification

A single Define Slices by variable.

How to

B. Summaries of Separate Variables

Several variables are summarized. Each slice represents one of the variables.

Minimum specification

Two or more Slices Represent variables.

How to

C. Values of Individual Cases

A single variable is summarized. Each slice represents the value of an individual case.

Minimum specification

A single Slices Represent variable.

How to


Pie Chart: Values of Individual Cases Example

A single variable is summarized. Each slice represents the value of an individual case.

Minimum specification

A single Slices Represent variable.


Pie Chart: Summaries for Groups of Cases Example

Categories of a single variable are summarized. Slice size is determined by the Slices Represent option.

Minimum specification

A single Define Slices by variable.


Pie Chart: Summaries of Separate Variables Example

Several variables are summarized. Each slice represents one of the variables.

Minimum specification

Two or more Slices Represent variables.


Population Pyramids Example

A single variable is summarized. The population pyramid shows the distribution of counts across the variable and within categories.

Minimum specification

A single numeric or categorical variable to be summarized and a categorical variable to split the population pyramid.

How to


Simple Range Bar: Values of Individual Cases Example

A pair of variables is summarized. Each point represents an individual case for one of the variables.

Minimum specifications

• A 1st variable (Var 1).

• A 2nd variable (Var 2).


Simple Range Bar: Summaries for Groups of Cases Example

Each category of a dichotomous variable (having two categories or values) is summarized within categories of a separate categorical variable.

Minimum specifications

• A Category Axis variable (Category Variable 1)

• A Define 2 Groups by variable (Cat Var 2). This variable must be dichotomous.


Simple Range Bar: Summaries of Separate Variables Example

A pair of variables is summarized within categories defined by a separate categorical variable.

Minimum specifications

• A 1st variable (Var 1).

• A 2nd variable (Var 2).

• A Category Axis variable (Category Variable).


Normal Distribution Methods Used in Different Procedures

probability plots,probability plots,probability plots
normal distribution methods,normal distribution methods,normal distribution methods
P-P probability plots,P-P probability plots,P-P probability plots
normal distribution methods,normal distribution methods,normal distribution methods
Q-Q probability plots,Q-Q probability plots,Q-Q probability plots
normal distribution methods,normal distribution methods,normal distribution methods
normal distribution,normal distribution,normal distribution
rank types,rank types,rank types
Blom estimates,Blom estimates,Blom estimates
Tukey estimates,Tukey estimates,Tukey estimates
Rankit estimates,Rankit estimates,Rankit estimates
Van der Waerden estimates,Van der Waerden estimates,Van der Waerden estimates

Different PASW Statistics procedures offer different methods to approximate the normal distribution.

• Blom method. Normal P-P Plot, Normal Q-Q Plot, Rank Cases, and Linear Regression.

• Tukey method. General, Hierarchical, and Logit Loglinear analysis. Optional in Rank Cases, Normal P-P Plot, and Normal Q-Q Plot.

• Rankit method. Optional in Rank Cases, Normal P-P Plot, and Normal Q-Q Plot.

• Van der Waerden method. Explore, General Factorial ANOVA, Multivariate ANOVA, and Repeated Measures ANOVA. Optional in Rank Cases, Normal P-P Plot, and Normal Q-Q Plot.

Starting with release 6.1, all procedures (by default) break ties by using the mean rank of the tied cases.

Related Topics

P-P Plot
Q-Q Plot


Runs Test: Related Procedures

To test that two samples come from populations with the same distributions, use the Wald-Wolfowitz runs test, available in the Two-Independent-Samples procedure.

Related Topics

Two-Independent-Samples Tests
Automatic Recode
Binomial Test: Related Procedures
Chi-Square Test: Related Procedures
Runs Test
Runs Test Cut Point
Runs Test Options
Runs Test
Runs Test Cut Point
Runs Test Options


Stacked Bar: Values of Individual Cases Example

Two or more variables are summarized for each case.

Minimum specifications

Two or more Bars Represent variables (Var 1, Var 2).


Stacked Bar: Summaries for Groups of Cases Example

Categories of one variable are summarized within categories of another variable. Bar height is determined by the Bars Represent option.

Minimum specifications

• A Category Axis variable (Category Variable 1).

• A Define Stacks by variable (Cat Var 2).


Stacked Bar: Summaries of Separate Variables Example

Two or more variables are summarized within categories of another variable.

Minimum specifications

• Two or more Bars Represent variables (Var 1, Var 2).

• A Category Axis variable (Category Variable).


Simple Scatterplot Example

One numeric variable is plotted against another.

Minimum specifications

• A Y Axis variable (Y Var).

• An X Axis variable (X Var).


Simple Scatterplot with Optional Control Variable Example

Two variables are be plotted within categories defined by a third (marker) variable. Do not confuse this with an overlay scatterplot.

Minimum specifications

• A Y Axis variable (Y Var).

• An X Axis variable (X Var).

• A Set Markers by variable.


Scatterplots: 3-D Examples

Three variables are plotted in three dimensions.

Minimum specification

• A Y Axis variable (Y Var).

• An X Axis variable (X Var).

• A Z Axis variable (Z Var).

How to


Simple Dot Plots Example

Plots individual observations at the values for a numeric variable. In this example, the dots are stacked on the x axis. They can also be centered around an arbitrary horizontal line or placed on the axis without stacking. Note that there is no other axis. Therefore, the vertical position of a dot does not indicate a particular value.

Minimum specification

A single numeric variable.

How to


Scatterplots: Scatterplot Matrix Examples

The number of rows and columns is equal to the number of matrix variables selected. All possible combinations of variables are shown (Var 1 vs. Var 2) and also "flipped" (Var 2 vs. Var 1).

Minimum specification

Two or more Matrix variables.

How to


Scatterplots: Overlay Examples

Two or more y-x variable pairs are plotted. Each pair is indicated by a different marker.

Minimum specification

Two or more y-x pairs.

How to


Scatterplots: Simple Examples

A. Simple Scatterplot

One numeric variable is plotted against another.

Minimum specification

• A Y Axis variable (Y Var).

• An X Axis variable (X Var).

How to

B. Simple Scatterplot with Optional Control Variable

Two variables can be plotted within categories defined by a third (marker) variable. Do not confuse this with an overlay scatterplot.

Minimum specification

• A Y Axis variable (Y Var).

• An X Axis variable (X Var).

• A Set Markers by variable.

How to


Simple Area: Values of Individual Cases Example

A single variable is summarized. Each point represents an individual case.

Minimum specification

A single Area Represents variable.


Simple Area: Summaries for Groups of Cases Example

Categories of a single variable are summarized. The y-height of the points is determined by the Area Represents option.

Minimum specification

A single Category Axis variable.


Simple Area: Summaries of Separate Variables Example

Two or more variables are summarized. Each point represents one of the variables.

Minimum specification

Two or more Area Represents variables.


Simple Bar: Values of Individual Cases Example

A single variable is summarized. Each bar represents an individual case.

Minimum specifications

A single Bars Represent variable.


Simple Bar: Summaries for Groups of Cases Example

Categories of a single variable are summarized. Bar height is determined by the Bars Represent option.

Minimum specifications

A single Category Axis variable.


Simple Line: Values of Individual Cases Example

A single variable is summarized. Each point represents an individual case.

Minimum specification

A single Line Represents variable.


Simple Line: Summaries for Groups of Cases Example

Categories of a single variable are summarized. The y-height of the points is determined by the Line Represents option.

Minimum specification

A single Category Axis variable.


Simple Line: Summaries of Separate Variables Example

Two or more variables are summarized. Each point represents one of the variables.

Minimum specification

Two or more Line Represents variables.


Simple Pareto: Values of Individual Cases Example

A single variable is summarized. Each bar represents the value of an individual case.

Minimum specification

A single numeric variable.


Simple Pareto: Counts or Sums for Groups of Cases Example

A single variable is summarized by category. Bar height is determined by the Bars Represent option. The line represents the cumulative percentage.

Minimum specification

A Category Axis variable.


Simple Pareto: Sums of Separate Variables Example

Two or more variables are summarized. Each bar represents one of the selected variables.

Minimum specifications

• Two or more numeric variables.

• A Category Axis variable


Simple Bar: Summaries of Separate Variables Example

Two or more variables are summarized. Each bar represents one of the variables.

Minimum specifications

Two or more Bars Represent variables.


GLM Univariate: Related Procedures

Use Split File in combination with the Explore procedure to screen your data. Study the shape of each group's distribution, and, if the groups are not normally distributed, use the K Independent Samples Tests procedure, available in the Nonparametric Tests procedure. If your groups are not independent--for example, if you observe the same people under several conditions--use the GLM Repeated Measures procedure, available in the Advanced Statistics option. For multiple dependent variables, factor-by-covariate interactions in the analysis of covariance, or nested or nonfactorial designs, use the GLM Multivariate procedure, available in the Advanced Statistics option.

Related Topics

Split File
One-Way ANOVA
Means
GLM Univariate Analysis
GLM Model
GLM Contrasts
GLM Profile Plots
GLM Post Hoc Comparisons
GLM Save
GLM Options


Stacked Area: Values of Individual Cases Example

Two or more variables are summarized for each case.

Minimum specifications

Two or more Areas Represent variables (Var 1, Var 2).


Stacked Area: Summaries for Groups of Cases Example

Categories of one variable are summarized within categories of another variable. The y-height of the points is determined by the Areas Represent option.

Minimum specifications

• A Category Axis variable (Category Variable 1).

• A Define Areas by variable (Cat Var 2).


Stacked Area: Summaries of Separate Variables Example

Two or more variables are summarized within categories of a category axis variable.

Minimum specifications

• Two or more Areas Represent variables (Var 1, Var 2).

• A Category Axis variable (Category Variable).


Stacked Pareto: Values of Individual Cases Example

Two or more variables are summarized for each case. Each segment within a stack represents one of the variables.

Minimum specifications

Two or more numeric variables (Var 1, Var 2).


Stacked Pareto: Counts or Sums for Groups of Cases Example

Categories of one variable are summarized within categories of another variable. Bar height is determined by the Bars Represent option. The line represents the cumulative percentage.

Minimum specifications

• A Category Axis variable (Category Variable 1).

• A Define Stacks by variable (Cat Var 2).


Stacked Pareto: Sums of Separate Variables Example

Two or more numeric variables are summarized within categories of a categorical variable. Each segment within a stack represents one of the variables.

Minimum specifications

• Two or more numeric variables (Var 1, Var 2).

• A Category Axis variable (Category Variable).


Summarize: Related Procedures

To obtain more extensive statistics and graphical displays for each cell, use the Split File procedure in combination with the Explore procedure. If you have a large number of subgroups and want to list cases, the Report Summaries in Rows procedure will make better use of your computer's memory.

Related Topics

Split File
Report Summaries in Rows
Descriptives
Frequencies
Explore
Means
Summarize
Summarize Options
Summarize Statistics


Tick Marks and Grid Lines Example


Two-Independent-Samples Tests: Related Procedures

If you are performing a Mann-Whitney U test, use the Explore procedure to verify that the samples are similar in shape. If you have more than two samples, use the K Independent Samples Tests procedure. If the samples come from normal distributions with equal population variances, use the Independent-Samples T Test procedure.

Related Topics

Independent-Samples T Test
Two-Independent-Samples Tests
Two-Independent-Samples Test Types
Two-Independent-Samples Tests Define Groups
Two-Independent-Samples Tests Options
Two-Independent-Samples Tests
Two-Independent-Samples Test Types
Two-Independent-Samples Tests Define Groups
Two-Independent-Samples Tests Options


Two-Related-Samples Tests: Related Procedures

If the samples come from normal distributions, use the Paired-Samples T Test procedure.

Related Topics

Paired-Samples T Test
Two-Related-Samples Tests
Two-Related-Samples Test Types
Two-Related-Samples Tests Options
Two-Related-Samples Tests
Two-Related-Samples Test Types
Two-Related-Samples Tests Options


Use Template from File

Use Template from File allows you to apply the chart specifications from an existing chart file to the current chart. For example, if you have already customized the title, point size, and bar style in a previously saved bar chart, you can apply the same specifications to all new bar charts that you create.

The file that you specify should be a chart template file saved after modifying the chart in the Viewer. The template file need not be of the same chart type; however, applying specifications from a chart of a different type may not always give expected results.

Related Topics

Applying a Template to a New Chart


Simple Bar: Summaries of Separate Variables Example

Two or more continuous variables are summarized. Each bar represents one of the variables.

How to


Clustered Bar: Summaries of Separate Variables Example

Two or more continuous variables (Grape and Lime) are summarized within categories of another variable (Region).

How to


What's New in Version 10.0

new features,new features,new features
version 10,version 10,version 10
multiple sessions,multiple sessions,multiple sessions
multiple data files,multiple data files,multiple data files
data files,data files,data files
opening multiple data files,opening multiple data files,opening multiple data files

Improved data access. Analyze large data files without requiring large amounts of temporary disk storage space. File size limitations are virtually eliminated because duplicate copies of the data file (automatically created and stored in temporary disk space in previous releases) are no longer required.

Distributed analysis. Dramatically improve the speed of your analysis by using a remote server computer to do perform data- and compute-intensive work for you. Using distributed analysis mode with the server version, you can perform complex analyses on large data files without tying up your desktop computer.

Multiple sessions. You can now run multiple sessions simultaneously on the same desktop computer, making it possible to analyze more than one data file at the same time.

Direct Excel access. Read Excel 5 or later files directly into PASW Statistics simply by selecting the Excel file in the Open File dialog box. You no longer need to use special Excel ODBC drivers to read Excel files. And now you can read columns that contain mixed data types without any loss of data. Columns with mixed data types are automatically read as string variables and all values are read as valid string values.

New Data Editor. The Data Editor has been redesigned with a new Variables tab that makes it much easier to view and define variable attributes such as data types and descriptive variable and value labels.

Multiple test variables with ROC curves. The ROC Curve procedure has been enhanced to compare multiple test variables.

Improved quality for interactive graphics used in other applications and improved printing performance. Interactive graphs can now be copied as Windows metafiles, which are better suited to resizing and printing in other applications without jagged lines and edges. Interactive graphs can be printed as metafiles for faster results at the same high quality.

Polytomous Logit Universal Models (PLUM). Enables you to apply regression techniques to ordinal outcomes (such as low, medium and high). Available in the Advanced Statistics option.

Thematic mapping. Enables you to graphically summarize data by geographic regions, using bar, pie, range of value, graduated symbol, and dot density charts displayed on high-quality maps. Available in the new Map option.

New optimal scaling procedure. A new nonlinear principal components analysis procedure (CATPCA) is available in the Categories option.

Improved output for Logistic Regression and Cox Regression. Logistic Regression (Regression option) and Cox Regression (Advanced Statistics option) now produce high-quality, flexible, pivot table output.

Related Topics

What's New in Version 18?
What's New in Version 17.0?
What's New in Version 16.0?
What's New in Version 15.0?
What's New in Version 14.0.1
What's New in Version 14.0?
What's New in Version 13.0?
What's New in Version 12.0?
What's New in Version 11.5?
What's New in Version 11.0
What's New in Version 10.0.5
What's New in Version 9.0
What's New in Version 8.0
What's New in Version 7.5
What's New in Version 7.0


What's New in Version 11.0

new features,new features,new features
version 11,version 11,version 11

Ratio Statistics. A new procedure provides a comprehensive list of summary statistics for describing the ratio between two scale variables, including coefficient of dispersion, coefficient of variation, price-related differential, and average absolute deviation.

Linear Mixed Models. A new procedure enables you to construct predictive models when you have a nested data structure. You can formulate a wide variety of models, including Fixed Effects ANOVA Model, Randomized Complete Blocks Design, Split-Plot Design, Purely Random Effects Model, Random Coefficient Model, Multilevel Analysis, Unconditional Linear Growth Model, Linear Growth Model with a person-level covariate, Repeated Measures Analysis, and Repeated Measures Analysis with time-dependent covariate. In addition, you can work with repeated measure designs, such as incomplete repeated measurements in which the number of observations varies across subjects. Available in the Advanced Statistics option.

Performance enhancements. General Linear Models, Proximities, Hierarchical Cluster Analysis (Core system), and Multinomial Logistic Regression (Regression) now run much faster than in previous releases.

Data management. Restructure data to create a single case (record) from multiple cases or create multiple cases from a single case.

Database Wizard. Now allows you to automatically recode categorical string values to numeric variables (using the original values as value labels), auto-join tables using primary/foreign key relationships, and obtain random samples from large data sources.

Text Wizard. Now allows you to read CSV-format text data that contains text qualifiers (such as, "1,000", "2,000", ...).

OLAP Cubes. Now allows you to calculate arithmetic and percentage differences between categories of a grouping variable or between separate variables.

One-Way ANOVA. Now includes the Brown-Forsythe and Welch tests.

Scientific notation for small numbers. You can choose not to see it in your output (from the Edit menu, choose Options, and then click the General tab).

Aggregate. Median has been added to the list of available Aggregate functions.

Arithmetic functions. Available functions in arithmetic expressions are expanded to include density functions for continuous and discrete distributions.

Multinomial Logistic Regression. New functionality added to this procedure allows you to save estimated response probabilities, predicted response categories, probability of predicted response categories, and probability of actual response categories. Available in the Regression option.

Categorical Regression. This procedure has been redesigned to make it more powerful and easier to use. Available in the Categories option.

Categorical Principal Components Analysis. Improvements in this procedure now make results easier to understand. Available in the Categories option.

Related Topics

What's New in Version 18?
What's New in Version 17.0?
What's New in Version 16.0?
What's New in Version 15.0?
What's New in Version 14.0.1
What's New in Version 14.0?
What's New in Version 13.0?
What's New in Version 12.0?
What's New in Version 11.5?
What's New in Version 10.0.5
What's New in Version 10.0
What's New in Version 9.0
What's New in Version 8.0
What's New in Version 7.5
What's New in Version 7.0


What's New in Version 11.5?

new features,new features,new features
version 11.5,version 11.5,version 11.5

New data definition tools. Two new features make defining data faster and easier:

• The Copy Data Properties wizard provides the ability to use an external data file as a template for defining file and variable properties in the active dataset. You can also use variables in the active dataset as templates for other variables in the active dataset. Copy Data Properties is available on the Data menu in the Data Editor window. See the topic Copying Data Properties for more information.

• Define Variable Properties (also available on the Data menu in the Data Editor window) scans your data and lists all unique data values for any selected variables, identifies unlabeled values, and provides an auto-label feature. This is particularly useful for categorical variables that use numeric codes to represent categories--for example, 0 = Male, 1 = Female. See the topic Defining Variable Properties for more information.

Expanded support for SAS format data files. You can now save data files in SAS version 6, SAS version 7, and SAS Transport file format. See the topic Saving Data: Data File Types for more information.

Expanded output export capabilities. You can now export entire Viewer documents or selected output objects in Word/RTF format and Excel format (charts are not included in Excel format). See the topic Export Output for more information.

Multiple output languages. You can now produce pivot table output in different languages and switch languages during the same session. See the topic General Options for more information.

TwoStep Cluster Analysis. This new clustering procedure offers the following features not available in the other PASW Statistics clustering procedures:

• Automatic selection of the best number of clusters, in addition to measures for choosing between cluster models.

• Ability to create cluster models simultaneously based on categorical and continuous variables.

• Ability to save the cluster model to an external XML file, then read that file and update the cluster model using newer data.

• Ability to analyze large data files with a single clustering procedure.

See the topic TwoStep Cluster Analysis for more information.

New Custom Tables option. If you have used the Tables option in the past, you will discover that almost everything is new in this release, including:

• A simple, drag-and-drop table builder interface that allows you to preview your table as you select variables and options.

• A single, unified table builder interface instead of multiple menu choices and dialog boxes for different types of tables.

• Subtotals for subsets of categories of a categorical variable.

• Custom control over category display order and ability to selectively show or hide categories.

Note: Custom Tables is not included in the Core system. It is only available if you have purchased the Custom Tables add-on option.

Related Topics

What's New in Version 18?
What's New in Version 17.0?
What's New in Version 16.0?
What's New in Version 15.0?
What's New in Version 14.0.1
What's New in Version 14.0?
What's New in Version 13.0?
What's New in Version 12.0?
What's New in Version 11.0
What's New in Version 10.0.5
What's New in Version 10.0
What's New in Version 9.0
What's New in Version 8.0
What's New in Version 7.5
What's New in Version 7.0


What's New in Version 7.5

new features,new features,new features
version 7.5,version 7.5,version 7.5

Scripting and automation. With new scripting features and OLE automation, you can automate many tasks, including customizing pivot table output. You can use the sample scripts, customize them to meet your needs, or create your own scripts.

• Use Options on the Edit menu and select the Scripts tab on the Options dialog box to select autoscripts (scripts that run automatically each time you create a specified table type) and select specific autoscript functions.

• Use Create/Modify Autoscripts on the Utilities menu to create new autoscript functions for the currently selected output object type in the Viewer.

• Use Run Scripts on the Edit menu to run a personal script on the currently selected output object in the Viewer (a variety of sample personal scripts are supplied with PASW Statistics).

• Use Open or New on the File menu to modify any personal script or create a new personal script.

HTML and ASCII format for exporting output. You can export output in HTML (HTML 3.0) and ASCII text format. For HTML format, pivot tables can be exported as HTML tables, and charts can be exported in JPEG format and automatically embedded by reference in your HTML document. Use Export on the File menu of the Viewer to export output.

Expanded features for reading databases. The new Database Wizard enables you to specify multiple joins, including both inner and outer joins. Use Database Capture on the File menu to read databases into PASW Statistics.

Customizable toolbars. You can modify toolbars and create your own toolbars to include the features you use often, including personal scripts and any items available on the menus. Use Toolbars on the View menu to customize toolbars.

Statistics Coach. For users who are not familiar with PASW Statistics or with the available statistical procedures, the Statistics Coach can help you get started with many of the basic statistical techniques in the Core system.

More statistical procedures in the Core system. Factor analysis, discriminant analysis, cluster analysis, and proximity and distance measures are now included in the Core system (Analyze menu) and feature new, flexible, pivot table output.

Variance Components Analysis. A new procedure in the Advanced Statistics option, Variance Components Analysis extends the analytic capabilities of the General Linear Model procedures.

Statistical enhancements. Many statistical procedures now have additional features:

• Crosstabs. McNemar test and clustered bar charts.

• Frequencies. Pie charts.

• Factor Analysis. Promax rotation method.

• Discriminant Analysis. Leave-one-out classification (similar to jackknifing).

• Logistic Regression (Professional Statistics). Pseudo R Squared measures and Hosmer-Lemeshow goodness-of-fit statistics.

• General Linear Model (Advanced Statistics). Expanded set of analysis options and techniques.

New tables features. With the Custom Tables option, you can save multiple response set information, and pivoting features have been enhanced to provide greater flexibility for pivoting tables.

More printing control. Printing features have been expanded to include alignment control of individual output items, user-specified page and column breaks in large tables, and widow and orphan control for tables that break across pages.

• Use Align Left, Center, or Align Right on the Format menu in the Viewer to change the alignment for the selected output item.

• Use Break on the Format menu in an activated pivot table to specify a page or column break at the selected row or column. Use Keep Together to prevent page or column breaks between rows or columns you want to remain together.

• Use Table Properties on the Format menu in an activated pivot table to change widow/orphan settings.

More pivot table control. Features for modifying pivot tables have been expanded to include the ability to: reorder categories by dragging and dropping selected rows or columns, rotate row and column labels, and create groups of related rows and columns with group labels.

• Use Rotate on the Format menu in an activated pivot table to rotate inner column or outer row labels.

• Use Group on the Edit menu in an activated pivot table to create groups of related rows or columns with group labels.

Other new features. Other new features include:

• Variable labels up to 256 characters.

• Ability to read SYSTAT 6.0 for Windows files directly.

Related Topics

What's New in Version 18?
What's New in Version 17.0?
What's New in Version 16.0?
What's New in Version 15.0?
What's New in Version 14.0.1
What's New in Version 14.0?
What's New in Version 13.0?
What's New in Version 12.0?
What's New in Version 11.5?
What's New in Version 11.0
What's New in Version 10.0.5
What's New in Version 10.0
What's New in Version 9.0
What's New in Version 8.0
What's New in Version 7.0


What's New in Version 8.0

new features,new features,new features
version 8.0,version 8.0,version 8.0

Dynamic, interactive charts and graphs. New graphing features make it easier to explore your data visually.

• Drag and drop new variables, and update charts on the fly.

• Split a single chart into multiple panels for side-by-side comparisons.

• Paste "live" charts into applications that support ActiveX objects.

Statistical enhancements. Perform more in-depth analysis with additional statistics, including:

• New ANOVA procedure with custom models and post-hoc tests.

• Robust Levene test to compare variance between groups in the Explore procedure.

• Harmonic and geometric means in the Means procedure.

• Interclass correlation in the Reliability procedure (Professional Statistics option).

• One-minus-survival functions in Survival procedures (Advanced Statistics option).

• Improved correspondence analysis and multiple regression for categorical data (Categories option).

Data management. Work faster and easier with data management improvements, including:

• Display descriptive variable labels instead of variable names in dialog boxes. Variable labels can be up to 256 characters long.

• Create and execute database queries faster. Save queries created by the Database Wizard and create prompted queries that allow you to use the same query to retrieve different subsets of data (such as sales data for different quarters).

• Include a date and time stamp in journal files for archiving.

Output enhancements. Create more pivot tables and have more control over output, including:

• See the bottom line faster with the new Layered Reports procedure that provides summary reports with each subgroup in a separate layer. Drill down to custom views of your results and reveal key information.

• Pick the output format you want: interactive pivot tables or simple text output. (For text output, choose Options from the Edit menu, click the General tab, and click Draft for output type.)

• Control default column width in pivot tables and save column width settings in the Data Editor.

• Use bookmarks to save different views of pivot tables.

• Display correlation coefficients and significance levels next to each other in the Bivariate Correlations procedure.

• Organize results by variable or by table type in the Frequencies procedure.

Online Help. Online Help has been expanded to include more just-in-time training features, including:

• Easily understand your results with the Results Coach. Annotated sample output that helps you understand how to interpret your results is available for all pivot tables in the Core system.

• Get the information you need faster and easier with "Ask Me" help -- a natural language interface that helps you find the answers you need without needing to know any complicated jargon.

Related Topics

What's New in Version 18?
What's New in Version 17.0?
What's New in Version 16.0?
What's New in Version 15.0?
What's New in Version 14.0.1
What's New in Version 14.0?
What's New in Version 13.0?
What's New in Version 12.0?
What's New in Version 11.5?
What's New in Version 11.0
What's New in Version 10.0.5
What's New in Version 10.0
What's New in Version 9.0
What's New in Version 7.5
What's New in Version 7.0


What's New in Version 9.0

new features,new features,new features
version 9.0,version 9.0,version 9.0

A (Slightly) New Look. The Analyze menu replaces the Statistics menu, and:

• Procedures formerly available on the Summarize submenu have been reorganized into two new submenus: Reports and Descriptive Statistics.

• Layered Reports is now OLAP Cubes.

• GLM-General Factorial is now GLM Univariate.

Interactive Graphics. More charts and more features, including:

• More chart types, including area charts, stacked bar charts, and charts of multiple variables.

• More chart features, including reference lines, secondary axes, spikes in scatterplots, control of category order and display of categories with missing data, more flexibility in key display, and more control over panel display.

• Charts from pivot tables. Just select the part of the table you want to display as a chart, right-click anywhere in the selected area, and select Create Graph.

Draft Viewer. Better-looking output in the Draft Viewer with:

• Improved table borders using box characters that produce clean, solid lines for row, column, and cell borders.

• Better page breaks for multipage tables and more control over how multipage tables are displayed.

Statistical Enhancements. Statistical enhancements include:

• Reliability analysis, multidimensional scaling (ALSCAL), and the Matrix language are now available in the Core system.

• New ROC Curve procedure for evaluating the performance of classification schemes where there is one variable with two categories by which subjects are classified.

• Crosstabs procedure enhanced to include Cochran-Mantel-Haenszel statistic.

• New Nominal Regression procedure for analyzing the relationship between categorical variables with two or more categories and multiple independent variables (available in the Regression option).

File Management. The new Text Wizard makes it easier than ever to read text data files in a variety of formats.

Titles. Support for syntax commands TITLE and SUBTITLE.

Related Topics

What's New in Version 18?
What's New in Version 17.0?
What's New in Version 16.0?
What's New in Version 15.0?
What's New in Version 14.0.1
What's New in Version 14.0?
What's New in Version 13.0?
What's New in Version 12.0?
What's New in Version 11.5?
What's New in Version 11.0
What's New in Version 10.0.5
What's New in Version 10.0
What's New in Version 8.0
What's New in Version 7.5
What's New in Version 7.0


What's New in Version 10.0.5

new features,new features,new features
version 10,version 10,version 10

Read native SAS files with GET SAS. The GET SAS command has been enhanced to read native SAS data files in addition to SAS transport files.

Cache data automatically. The Cache facility now automatically creates a data cache after a certain number of changes to the active data file. By default, the number of changes is 20. You can change the number with the SET command, CACHE subcommand.

See the Command Syntax Reference for more information on SET and GET SAS.

Related Topics

What's New in Version 18?
What's New in Version 17.0?
What's New in Version 16.0?
What's New in Version 15.0?
What's New in Version 14.0.1
What's New in Version 14.0?
What's New in Version 13.0?
What's New in Version 12.0?
What's New in Version 11.5?
What's New in Version 11.0
What's New in Version 10.0
What's New in Version 9.0
What's New in Version 8.0
What's New in Version 7.5
What's New in Version 7.0


What's New in Version 12.0?

new features,new features,new features
version 12.0,version 12.0,version 12.0

Improved Charting Features

• Better default chart appearance

• Support for long text strings and automatic text wrapping

• Control of default scale ranges using chart templates

• 3-D effects for pie and bar charts

• Improved color and pattern choices, and much more

See the topic What's New and Different for more information.

New Data Management Features

• Longer variable names. The maximum length for variable names is now 64 bytes, compared to 8 bytes for previous releases. See the topic Variable Names for more information.

• Visual Binning. The Visual Binning dialog is designed to help you "bin" scale data into categorical ranges (for example, age in 10-year ranges). See the topic Visual Binning for more information.

• Duplicate record finder. Identify, flag, report, and filter duplicate records with the new Identify Duplicate Cases feature. See the topic Identifying Duplicate Cases for more information.

• Output management system. Turn output into input with the new OMS command. With OMS, you can automatically write selected categories of output to different output files in different formats, including HTML, XML, text, and PASW Statistics data files. See the topic Output Management System for more information.

• Command syntax to delete variables. The new DELETE VARIABLES command makes it easy to delete variables you do not need anymore, such as temporary variables used in transformations.

Statistical Enhancements

• New options for handling weighted data in the Crosstabs procedure. See the topic Crosstabs Cell Display for more information.

• New stepwise function in Multinomial Logistic Regression (NOMREG command, Regression option). See the topic Multinomial Logistic Regression for more information.

New Complex Samples Option

This new add-on module provides the specialized planning tools and statistics that you need when working with sample survey data. Most conventional statistical software assumes your data arise from simple random sampling. In most large-scale surveys, however, simple random sampling generally is not feasible or cost effective. Using Complex Samples with sample survey data reduces the risk of reaching incorrect or misleading inferences. The new Complex Samples add-on module enables you to make more statistically valid inferences for a population by incorporating the sample design into survey analysis. It is an indispensable statistical tool for survey and market researchers, public opinion researchers or social scientists, and it enables you to reach more accurate conclusions when working with sample survey methodology.

Related Topics

What's New in Version 18?
What's New in Version 17.0?
What's New in Version 16.0?
What's New in Version 15.0?
What's New in Version 14.0.1
What's New in Version 14.0?
What's New in Version 13.0?
What's New in Version 11.5?
What's New in Version 11.0
What's New in Version 10.0.5
What's New in Version 10.0
What's New in Version 9.0
What's New in Version 8.0
What's New in Version 7.5
What's New in Version 7.0


What's New in Version 13.0?

new features,new features,new features
version 13.0,version 13.0,version 13.0

Data Management

• The Date and Time Wizard makes it easy to perform many calculations with dates and times, including calculating the difference between dates and adding or subtracting a duration from a date. See the topic Date and Time Wizard for more information.

• You can append aggregated results to the active dataset. See the topic Aggregate Data for more information.

• You can create consistent autorecoding schemes for multiple variables and data files. See the topic Automatic Recode for more information.

• String values can be up to 32,767 bytes long. Previously, the limit was 255 bytes.

• You can create multiple panes in Data View of the Data Editor. See the topic Data Editor Display Options for more information.

Charts

• 3-D bar charts. See the topic 3-D Bar Charts for more information.

• Population pyramids. See the topic Obtaining Population Pyramids for more information.

• Dot plots. See the topic Scatterplots for more information.

• Paneled charts. See the topic Paneled Charts for more information.

Statistical Enhancements

• New Decision Tree option for building tree models. See the topic Creating Decision Trees for more information.

• New GLM procedure in the Complex Samples option. See the topic Complex Samples General Linear Model for more information.

• New Logistic Regression procedure in the Complex Samples option. See the topic Complex Samples Logistic Regression for more information.

• New Multiple Correspondence procedure in the Categories option. See the topic Multiple Correspondence Analysis for more information.

• AIC and BIC statistics added to Multinomial Logistic Regression in the Regression option, plus the ability to specify the type of statistic used for determining the addition and removal of model terms when using various stepwise methods. See the topic Multinomial Logistic Regression Statistics for more information.

Output

• Output Management System Control Panel. See the topic Output Management System for more information.

• Export Viewer output to PowerPoint. See the topic Export Output for more information.

• More output sorting options and the ability to hide subtotaled categories in Custom Tables (Custom Tables option). See the topic Categories and Totals for more information.

• Pivot table output for Curve Estimation and Multiple Response in the Core system, all time series procedures (including the Forecasting option), Kaplan-Meier and Life Tables in the Advanced Statistics option, and Nonlinear Regression in the Regression option.

Command Syntax

• You can control the working directory with the new CD command.

• You can control the treatment of error conditions in included command syntax files with the new INSERT command.

• You can use the FILE HANDLE command to define directory paths.

More information about command syntax is available in the Command Syntax Reference PDF file, which you can access from the Help menu.

PASW Statistics Server

• You can score data based on models built with many PASW Statistics procedures. See the topic Scoring Data with Predictive Models for more information.

• You can work with database sources more efficiently by preaggregating and/or presorting data in the database before reading it into PASW Statistics. See the topic Aggregating Data for more information.

Related Topics

What's New in Version 18?
What's New in Version 17.0?
What's New in Version 16.0?
What's New in Version 15.0?
What's New in Version 14.0.1
What's New in Version 14.0?
What's New in Version 12.0?
What's New in Version 11.5?
What's New in Version 11.0
What's New in Version 10.0.5
What's New in Version 10.0
What's New in Version 9.0
What's New in Version 8.0
What's New in Version 7.5
What's New in Version 7.0


What's New in Version 14.0?

new features,new features,new features
version 14.0,version 14.0,version 14.0

Data Management

• Have multiple data sources open at the same time, making it easier to compare data files, copy data and attributes from one file to another file, and merge multiple data sources without saving each data source as a sorted data file first. For more information, see and DATASET NAME.

• Read and write Stata-format data files. You can read Stata version 4–8 data files and write Stata version 5–8 data files. For more information, see Reading Stata Files, Saving Data Files in Stata Format, GET STATA, SAVE TRANSLATE.

• Read data from PASW Data Collection data sources. See the topic Reading PASW Data Collection Data for more information. (Note: This is available only on Microsoft Windows operating systems.)

• Read data from OLE DB data sources. See the topic Selecting a Data Source for more information. (Note: This is available only on Microsoft Windows operating systems.)

• Define descriptive value labels up to 120 bytes (previous limit was 60 bytes).

• Create data values from value labels or use them in transformation logic with the VALUELABEL function. See the topic VALUELABEL Function for more information.

• Find and replace string values with the REPLACE function. See the topic String Functions for more information.

• Define custom variable attributes and data file attributes with the VARIABLE ATTRIBUTE and DATAFILE ATTRIBUTE commands.

• Write data to database tables and other formats by using field/column names that are not constrained by PASW Statistics variable-naming rules. SAVE TRANSLATE has been enhanced to allow you to use quoted values for field/column names that contain spaces, commas, or other characters that are not allowed in ˜variable names. See the topic RENAME Subcommand (SAVE TRANSLATE command) for more information.

• Use the new SQL subcommand of the SAVE TRANSLATE command to append new columns to database tables, modify database table column attributes, join tables, and perform other actions that are permitted with valid SQL statements. See the topic SQL Subcommand (SAVE TRANSLATE command) for more information.

Charts

• Use the new Chart Builder interface (Graphs menu) to build charts from predefined gallery charts or from the individual parts (for example, coordinate systems and bars) that make up a chart. See the topic Building Charts for more information.

• Create custom chart types by using powerful GGRAPH and GPL command syntax. See the topic GGRAPH for more information.

Statistical Enhancements

• New Expert Modeler in the Forecasting option automatically identifies and estimates the best-fitting model for one or more time series, thus eliminating the need to identify an appropriate model through trial and error. For more information, see Time Series Modeler and TSMODEL.

• New Data Validation option provides a quick visual snapshot of your data and provides the ability to apply validation rules that identify invalid data values. You can create rules that flag out-of-range values, missing values, or blank values. You can also save variables that record individual rule violations and the total number of rule violations per case. A limited set of predefined rules is provided that you can copy or modify. For more information, see Introduction to Data Preparation and VALIDATEDATA.

New Anomaly Detection procedure in the Data Validation option finds unusual observations that could adversely affect predictive models. Some of these outlying observations represent truly unique cases and are thus unsuitable for prediction, while other observations are caused by data-entry errors in which the values are technically “correct” and thus cannot be caught by the Validate Data procedure. For more information, see Identify Unusual Cases and DETECTANOMALY.

• New Multidimensional Unfolding procedure (PREFSCAL) in the Categories option attempts to find the structure in a set of proximity measures between row and column objects. This process is accomplished by assigning observations to specific locations in a conceptual low-dimensional space such that the distances between points in the space match the given (dis)similarities as closely as possible. The result is a least-squares representation of the objects in that low-dimensional space, which, in many cases, helps you further understand your data. This procedure is currently available with PREFSCAL command syntax. See the topic PREFSCAL for more information.

• New Predictor Selection procedure (SELECTPRED) in PASW Statistics Server sifts through a very large number of categorical and continuous predictor variables. The procedure selects a smaller subset for use in predictive modeling procedures that cannot accept so many predictors. This procedure is currently available with SELECTPRED command syntax. See the topic SELECTPRED for more information.

• New Naïve Bayes procedure (NAIVEBAYES) in PASW Statistics Server produces a simple and stable model for predictor selection and classification. This procedure is currently available with NAIVEBAYES command syntax. See the topic NAIVEBAYES for more information.

• Improved significance testing capabilities in the Custom Tables option allows you to now perform significance tests on subtotals and multiple response sets. See the topic Custom Tables: Test Statistics Tab for more information.

• More flexibility is available in defining multiple response sets for multiple dichotomies. See the topic Defining Multiple Response Sets for more information.

Output

• Pivot table output is now provided for Rank Cases (RANK), Replace Missing Values (RMV), and Create Time Series (CREATE) in the Core system; all procedures in the Conjoint option; Model Selection Loglinear Analysis (HILOGLINEAR) in the Advanced Statistics option; and Probit Analysis (PROBIT), Weight Estimation (WLS), and 2-Stage Least Squares (2SLS) in the Regression option.

Performance Enhancements

• Table structures that previously took a long time to create or that might run out of memory with the Custom Tables option (CTABLES) can now be created quickly and efficiently.

Related Topics

What's New in Version 18?
What's New in Version 17.0?
What's New in Version 16.0?
What's New in Version 15.0?
What's New in Version 14.0.1
What's New in Version 13.0?
What's New in Version 12.0?
What's New in Version 11.5?
What's New in Version 11.0
What's New in Version 10.0.5
What's New in Version 10.0
What's New in Version 9.0
What's New in Version 8.0
What's New in Version 7.5
What's New in Version 7.0
Version 14.0 Compatibility with Previous Releases


Version 14.0 Compatibility with Previous Releases

Logistic Regression

In previous versions, the order of recoded string values was dependent on the order of values in the data file. For example, when recoding the dependent variable, the first string value encountered was recoded to 0, and the second string value encountered was recoded to 1. The procedure now recodes string variables so that the order of recoded values is the alphanumeric order of the string values. Thus, the procedure may recode string variables differently than in previous versions. Logistic Regression is available in the Regression option.

Macro Facility

Improvements to the macro facility may cause errors in jobs that previously ran without errors. Specifically, for syntax that is processed with interactive rules, if a macro call occurs at the end of a command, and there is no command terminator (either a period or a blank line), the next command after the macro expansion will be interpreted as a continuation line instead of a new command, as in:

DEFINE !macro1()
var1 var2 var3
!ENDDEFINE.
FREQUENCIES VARIABLES = !macro1
DESCRIPTIVES VARIABLES = !macro1.

In interactive mode, the DESCRIPTIVES command will be interpreted as a continuation of the FREQUENCIES command, and neither command will run.

Related Topics

What's New in Version 14.0.1
What's New in Version 14.0?


What's New in Version 15.0?

new features,new features,new features
version 15.0,version 15.0,version 15.0

Data Management

Custom variable attributes. In addition to the standard variable attributes (for example, value labels, missing values, measurement level), you can create your own custom variable attributes. You can display and edit these attributes directly in Variable View of the Data Editor. Like standard variable attributes, these custom attributes are saved with PASW Statistics data files. See the topic Custom Variable Attributes for more information. (A syntax-only implementation of custom variable attributes was introduced in version 14 with the VARIABLE ATTRIBUTE command.)

Variable sets. You can now use variable sets to control which variables are displayed in the Data Editor as well as in dialog box variable lists. (In previous releases, variable sets affected only dialog box variable lists.) Variable sets make it easier to work with data files that contain a large number of variables. See the topic Define Variable Sets for more information.

Export to Database Wizard. Create new database tables, replace values for selected fields, and add new fields to an existing table, all without having to write a single line of SQL code yourself. See the topic Exporting to a Database for more information.

Export to PASW Data Collection. Export to PASW Data Collection creates a data file in PASW Statistics format and a PASW Data Collection metadata file that you can use to read the data into PASW Data Collection applications. See the topic Exporting to PASW Data Collection for more information. (Note: This is only available on Microsoft Windows operating systems.)

Save data in CSV format. Save data in CSV (comma-separated values) format. CSV is a common data format recognized by many applications. See the topic Saving Data Files in External Formats for more information. For information on command syntax for saving data in CSV format, see SAVE TRANSLATE.

Reporting

Export results in PDF format. Export output in PDF format, including Viewer outline headings as bookmarks in the PDF file. See the topic Export Output for more information.

Control chart enhancements. You can now define rules for control charts to help you quickly identify points that are out of control.

More chart types in Chart Builder. The Chart Builder has been expanded to include histograms, boxplots, scatterplot matrices, overlay scatterplots, population pyramids, error bar charts, high-low-close charts, difference area charts, range bar charts, dot plots, charts of separate variables, and paneled charts. You can also create charts that were not previously available, such as charts with dual, independent y axes.

Chart Editor enhancements. The Chart Editor now offers more control over your charts. Major features include an updated Variables tab for changing chart types easily, automatic control of white space, additional distribution curves for histograms, a tool for quickly rescaling axes, and the ability to use custom equations to create reference lines. See the topic What's New and Different for more information.

Programmatic control of output documents. You can now create, open, activate, save, and close Viewer and documents with command syntax using OUTPUT NEW, OUTPUT NAME, OUTPUT ACTIVATE, OUTPUT OPEN, OUTPUT SAVE, and OUTPUT CLOSE.

Statistical Enhancements

Ordinal Regression. This procedure, previously available as part of the Advanced Statistics add-on option, is now available in the Core system. See the topic Ordinal Regression for more information.

PMML model files with transformations. You can now include transformations in PMML model files and merge information from model files using the TMS BEGIN-TMS END and TMS MERGE commands.

Generalized Linear Models. The Generalized Linear Models procedure expands the general linear model so that the dependent variable is linearly related to the factors and covariates via a specified link function. Moreover, the model allows for the dependent variable to have a non-normal distribution. This procedure is available in the Advanced Statistics option. See the topic Generalized Linear Models Response for more information.

Generalized Estimating Equations. The Generalized Estimating Equations procedure extends the generalized linear model to allow for analysis of repeated measurements. This procedure is available in the Advanced Statistics option. See the topic Generalized Estimating Equations for more information.

Complex Samples Ordinal Regression. The Complex Samples Ordinal Regression procedure performs regression analysis on a binary or ordinal dependent variable for samples drawn by complex sampling methods. Optionally, you can request analyses for a subpopulation. This procedure is available in the Complex Samples option. See the topic Complex Samples Ordinal Regression for more information.

Optimal Binning. The Optimal Binning procedure discretizes one or more scale variables by distributing the values of each variable into bins. Bin formation is optimal with respect to a categorical guide variable that "supervises" the binning process. Bins can then be used instead of the original data values for further analysis. This procedure is available in the Data Preparation option. See the topic Optimal Binning for more information.

Programmability Extension

The Programmability Extension now allows you to write to the active dataset and create custom pivot tables and custom procedures. For more information go to http://www.spss.com/devcentral

Related Topics

What's New in Version 18?
What's New in Version 17.0?
What's New in Version 16.0?
What's New in Version 14.0.1
What's New in Version 14.0?
What's New in Version 13.0?
What's New in Version 12.0?
What's New in Version 11.5?
What's New in Version 11.0
What's New in Version 10.0.5
What's New in Version 10.0
What's New in Version 9.0
What's New in Version 8.0
What's New in Version 7.5
What's New in Version 7.0


What's New in Version 16.0?

new features,new features,new features
version 16.0,version 16.0,version 16.0

User interface enhancements. Enhancements to the point-and-click interface include:

• All dialog boxes are now resizable. The ability to make a dialog box wider makes variable lists wider so that you can see more of the variable names and/or descriptive labels. The ability to make a dialog box longer makes variable lists longer so that you can see more variables without scrolling.

• Drag-and-drop variable selection is now supported in all dialog boxes.

• Variable list display order and display characteristics can be changed on the fly in all dialog boxes. Change the sort order (alphabetic, file order, measurement level) and/or switch between display of variable names or variable labels whenever you want. See the topic Variable Names and Variable Labels in Dialog Box Lists for more information.

Data and output management. Data and output management enhancements include:

• Read and write Excel 2007 files.

• Choose between working with multiple datasets or one dataset at a time. See the topic General Options for more information.

• Search and replace information in Viewer documents, including hidden items and layers in multidimensional pivot tables. See the topic Finding and Replacing Information in the Viewer for more information.

• Assign missing values and value labels to any string variable, regardless of the defined string width (previously limited to strings with a defined width of 8 or less bytes).

• New character-based string functions. See the topic String Functions for more information.

• Output Management System (OMS) support for Viewer file format (.spv) and VML-format charts and image maps with pop-up chart information for HTML documents. See the topic Output Management System for more information.

• Customize Variable View in the Data Editor. Change the display order of the attribute columns, and control which attribute columns are displayed. See the topic Customizing Variable View for more information.

• Sort variables in the active dataset alphabetically or by attribute (dictionary) values. See the topic Sort Variables for more information.

• Spell check variable labels and value labels in Variable View. See the topic Spell Checking for more information.

• Change basic variable type (string, numeric), change the defined width of string variables, and automatically set the width of string variables to the longest observed value for each variable. See the topic ALTER TYPE for more information.

• Read and write Unicode data and syntax files. See the topic General Options for more information.

• Control the default directory location to look for and save files. See the topic File Locations Options for more information.

Performance. For computers with multiple processors or processors with multiple cores, multithreading for faster performance is now available for some procedures. See the topic THREADS Subcommand (SET command) for more information.

Statistical enhancements. Statistical enhancements include:

• Partial Least Squares (PLS). A predictive technique that is an alternative to ordinary least squares (OLS) regression, canonical correlation, or structural equation modeling, and it is particularly useful when predictor variables are highly correlated or when the number of predictors exceeds the number of cases. See the topic Partial Least Squares Regression for more information.

• Multilayer perceptron (MLP). The MLP procedure fits a particular kind of neural network called a multilayer perceptron. The multilayer perceptron uses a feed-forward architecture and can have multiple hidden layers. The multilayer perceptron is very flexible in the types of models it can fit. It is one of the most commonly used neural network architectures. This procedure is available in the new Neural Networks option. See the topic Multilayer Perceptron for more information.

• Radial basis function (RBF). A Radial basis function (RBF) network is a feed-forward, supervised learning network with only one hidden layer, called the radial basis function layer. Like the multilayer perceptron (MLP) network, the RBF network can do both prediction and classification. It can be much faster than MLP, however it is not as flexible in the types of models it can fit. This procedure is available in the new Neural Networks option. See the topic Radial Basis Function for more information.

• Generalized Linear Models supports numerous new features, including ordinal multinomial and Tweedie distributions, maximum likelihood estimation of the negative binomial ancillary parameter, and likelihood-ratio statistics. This procedure is available in the Advanced Statistics option. See the topic Generalized Linear Models Response for more information.

• Cox Regression now provides the ability to export model information to an XML (PMML) file. This procedure is available in the Advanced Statistics option. See the topic Cox Regression Save New Variables for more information.

• Complex Samples Cox Regression. Apply Cox proportional hazards regression to analysis of survival times—that is, the length of time before the occurrence of an event for samples drawn by complex sampling methods. This procedure supports continuous and categorical predictors, which can be time-dependent. This procedure provides an easy way of considering differences in subgroups as well as analyzing effects of a set of predictors. The procedure estimates variances by taking into account the sample design used to select the sample, including equal probability and probability proportional to size (PPS) methods and with replacement (WR) and without replacement (WOR) sampling procedures. This procedure is available in the Complex Samples option.

Programmability extension. Programmability extension enhancements include:

• R-Plugin. Combine the power of PASW Statistics with the ability to write your own statistical routines with R. This plug-in is available only as a download from www.spss.com/devcentral.

• Nested Begin Program-End Program command structures. See the topic BEGIN PROGRAM-END PROGRAM for more information.

• Ability to create and manage multiple datasets.

Command syntax. For a complete list of command syntax additions and changes, see Release History.

Features No Longer Supported

• There is no longer a separate chart editor for "interactive" charts. Charts created from the legacy "interactive" chart dialog boxes and from IGRAPH command syntax are created in the same format as all other charts and edited in the same chart editor.

• Some features provided in the legacy "interactive" chart dialog boxes and IGRAPH command syntax are no longer available. See the "Release History" section of IGRAPH for details.

• The Draft Viewer is no longer available. See What Happened to the Draft Viewer? for text output alternatives.

• You cannot open Viewer files created in previous versions of PASW Statistics (.spo files) in PASW Statistics 16.0. For Windows operating systems, the installation CD includes a Legacy Viewer that you can install to view and edit Viewer files created in previous releases.See the topic Opening Old Viewer (.spo) Files for more information.

• The Maps option is no longer available.

• Dialog box interfaces for the legacy procedures in the Trends and Tables options are no longer available. For Trends, this includes the following commands: AREG, ARIMA, and EXSMOOTH. For Tables, this includes the TABLES command. If you have a license for either of these options that includes the legacy procedures, command syntax for these commands is still supported.

Related Topics

What's New in Version 18?
What's New in Version 17.0?
What's New in Version 15.0?
What's New in Version 14.0.1
What's New in Version 14.0?
What's New in Version 13.0?
What's New in Version 12.0?
What's New in Version 11.5?
What's New in Version 11.0
What's New in Version 10.0.5
What's New in Version 10.0
What's New in Version 9.0
What's New in Version 8.0
What's New in Version 7.5
What's New in Version 7.0


What's New in Version 17.0?

new features,new features,new features
version 17.0,version 17.0,version 17.0

New Syntax Editor. The syntax editor has been completely redesigned with features such as auto-completion, color coding, bookmarks, and breakpoints. Auto-completion provides you with a list of valid command names, subcommands, and keywords; so you’ll spend less time referring to syntax charts. Color coding allows you to quickly spot unrecognized terms as well as some common syntactical errors. Bookmarks allow you to quickly navigate large command syntax files. Breakpoints allow you to stop execution at specified points so you can inspect data or output before proceeding. See the topic Using the Syntax Editor for more information.

Custom Dialog Builder. The Custom Dialog Builder allows you to create and manage custom dialogs for generating command syntax. You can create custom dialogs to generate syntax from multiple commands, including custom extension commands implemented in Python or R. See the topic Creating and Managing Custom Dialogs for more information.

Multiple language support. In addition to the ability to change the output language available in previous releases, you can now change the user interface language. See the topic General Options for more information.

Codebook. The Codebook procedure reports the dictionary information -- such as variable names, variable labels, value labels, missing values -- and summary statistics for all or specified variables and multiple response sets in the active dataset. For nominal and ordinal variables and multiple response sets, summary statistics include counts and percents. For scale variables, summary statistics include mean, standard deviation, and quartiles. See the topic Codebook for more information.

Nearest Neighbor analysis. Nearest Neighbor analysis is a method for classifying cases based on their similarity to other cases. In machine learning, it was developed as a way to recognize patterns of data without requiring an exact match to any stored patterns, or cases. Similar cases are near each other and dissimilar cases are distant from each other. Thus, the distance between two cases is a measure of their dissimilarity. See the topic Nearest Neighbor Analysis for more information.

Multiple Imputation. The Multiple Imputation procedure performs multiple imputation of missing data values. Given a dataset containing missing values, it outputs one or more datasets in which missing values are replaced with plausible estimates. You can then obtain pooled results when running other procedures. The procedure also summarizes missing values in the working dataset. This feature is available in the Missing Values add-on option. See the topic Impute Missing Data Values (Multiple Imputation) for more information.

RFM analysis. RFM (recency, frequency, monetary) analysis is a technique used to identify existing customers who are most likely to respond to a new offer. This technique is commonly used in direct marketing. This feature is available in the EZ RFM add-on option. See the topic RFM Analysis for more information.

Categorical Regression enhancements. Categorical Regression has been enhanced to include regularization and resampling methods to assess and improve prediction accuracy. Together, these new methods make it possible to create state-of-the-art models, even for high-volume data (where there are more variables than observations, such as in genomics). This feature is available in the Categories add-on option. See the topic Categorical Regression (CATREG) for more information.

Graphboard. Graphboard visualizations are graphs, charts, and plots created from a visualization template. PASW Statistics ships with built-in visualization templates. You can also use a separate product, PASW Viz Designer, to create your own visualization templates. The new visualization templates are effectively custom visualization types. See the topic Creating and Editing Graphboard Visualizations for more information.

Exporting Output. More output export format options and more control over exported content, including:

• Wrap or shrink wide table in Word documents. See the topic Word/RTF Options for more information.

• Create new worksheets or append data to existing worksheets in an Excel workbook. See the topic Excel Options for more information.

• Save output export specifications in the form of command syntax with the OUTPUT EXPORT command. All the features for exporting output in the Export Output dialog are now also available in command syntax; so you can save and re-run your export specifications and include them in automated production jobs. See the topic OUTPUT EXPORT for more information.

• The Output Management System (OMS) now supports these additional output formats: Word, Excel, and PDF. See the topic Output Management System for more information.

Shift Values. Shift Values creates new variables that contain the values of existing variables from preceding (lag) or subsequent (lead) cases. See the topic Shift Values for more information.

Aggregate enhancements. You can now use the features of the Aggregate procedure without specifying a break variable. See the topic Aggregate Data for more information.

Median function. A median function is now available for computing the median value across selected variables for each case. See the topic Statistical Functions for more information.

Related Topics

What's New in Version 18?
What's New in Version 16.0?
What's New in Version 15.0?
What's New in Version 14.0.1
What's New in Version 14.0?
What's New in Version 13.0?
What's New in Version 12.0?
What's New in Version 11.5?
What's New in Version 11.0
What's New in Version 10.0.5
What's New in Version 10.0
What's New in Version 9.0
What's New in Version 8.0
What's New in Version 7.5
What's New in Version 7.0


What's New in Version 14.0.1

new features,new features,new features
version 14.0.1,version 14.0.1,version 14.0.1

• Dialog box interface for new PREFSCAL procedure, introduced in version 14.0. This procedure is available in the Categories option.See the topic Multidimensional Unfolding (PREFSCAL) for more information.

• New add-on option: Adaptor for Predictive Enterprise Services enables you to publish and share objects through a central repository. Objects can be shared among users, shared with other applications, and tracked using versioning, thus eliminating the need for ad-hoc file systems to manage enterprise-wide assets.

• Access to data for external programming languages. The Programmability Extension has been enhanced to provide the ability to send data to an external programming language.

Related Topics

What's New in Version 18?
What's New in Version 17.0?
What's New in Version 16.0?
What's New in Version 15.0?
What's New in Version 14.0?
What's New in Version 13.0?
What's New in Version 12.0?
What's New in Version 11.5?
What's New in Version 11.0
What's New in Version 10.0.5
What's New in Version 10.0
What's New in Version 9.0
What's New in Version 8.0
What's New in Version 7.5
What's New in Version 7.0
Version 14.0 Compatibility with Previous Releases


X-Bar, r, and s Control Charts: Cases are Subgroups Example

Two or more variables (sample or unit measurements) are summarized. Each point represents the mean, range, or standard deviation for the selected variables across a single case (row).

Minimum specifications

Two or more numeric Sample variables.


X-Bar, r, and s Control Charts: Cases are Units Example

A single process variable is summarized. Each point represents the mean, range, or standard deviation for a subgroup of cases defined by a categorical variable.

Minimum specifications

• A Process Measurement variable.

• A Subgroups Defined by variable.